amis/pkg/tinymce_327be45.js

144 lines
1.3 MiB
Raw Blame History

This file contains invisible Unicode characters

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

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

;/*!node_modules/tinymce/tinymce.js*/
amis.define("node_modules/tinymce/tinymce",function(e,t,n){!function(e){"use strict";function t(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 r(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function o(){for(var e=0,t=0,n=arguments.length;n>t;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;n>t;t++)for(var i=arguments[t],a=0,u=i.length;u>a;a++,o++)r[o]=i[a];return r}function i(e){var t={},n={},r=[],o={},i={},a=function(t,n,r){var o=e[t];return o?o=eu(o,/[, ]/,eu(o.toUpperCase(),/[, ]/)):(o=Qa[t],o||(o=eu(n," ",eu(n.toUpperCase()," ")),o=nu(o,r),Qa[t]=o)),o};e=e||{};var u=au(e.schema);e.verify_html===!1&&(e.valid_elements="*[*]");var c=uu(e.valid_styles),s=uu(e.invalid_styles,"map"),f=uu(e.valid_classes,"map"),l=a("whitespace_elements","pre script noscript style textarea video audio iframe object code"),d=a("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),m=a("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),g=a("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),p=a("non_empty_elements","td th iframe video audio object script pre code",m),h=a("move_caret_before_on_enter_elements","table",p),v=a("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"),y=a("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",v),b=a("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp");tu((e.special||"script noscript iframe noframes noembed title style textarea xmp").split(" "),function(e){i[e]=new RegExp("</"+e+"[^>]*>","gi")});var C=function(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")},w=function(e){var n,o,i,a,u,c,s,f,l,d,m,g,p,h,v,y,b,w,x=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,S=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,N=/[*?+]/;if(e)for(e=iu(e,","),t["@"]&&(y=t["@"].attributes,b=t["@"].attributesOrder),n=0,o=e.length;o>n;n++)if(u=x.exec(e[n])){if(h=u[1],l=u[2],v=u[3],f=u[5],g={},p=[],c={attributes:g,attributesOrder:p},"#"===h&&(c.paddEmpty=!0),"-"===h&&(c.removeEmpty=!0),"!"===u[4]&&(c.removeEmptyAttrs=!0),y&&(vn(y,function(e,t){g[t]=e}),p.push.apply(p,b)),f)for(f=iu(f,"|"),i=0,a=f.length;a>i;i++)if(u=S.exec(f[i])){if(s={},m=u[1],d=u[2].replace(/[\\:]:/g,":"),h=u[3],w=u[4],"!"===m&&(c.attributesRequired=c.attributesRequired||[],c.attributesRequired.push(d),s.required=!0),"-"===m){delete g[d],p.splice(ou(p,d),1);continue}h&&("="===h&&(c.attributesDefault=c.attributesDefault||[],c.attributesDefault.push({name:d,value:w}),s.defaultValue=w),":"===h&&(c.attributesForced=c.attributesForced||[],c.attributesForced.push({name:d,value:w}),s.forcedValue=w),"<"===h&&(s.validValues=eu(w,"?"))),N.test(d)?(c.attributePatterns=c.attributePatterns||[],s.pattern=C(d),c.attributePatterns.push(s)):(g[d]||p.push(d),g[d]=s)}y||"@"!==l||(y=g,b=p),v&&(c.outputName=l,t[v]=c),N.test(l)?(c.pattern=C(l),r.push(c)):t[l]=c}},x=function(e){t={},r=[],w(e),tu(u,function(e,t){n[t]=e.children})},S=function(e){var r=/^(~)?(.+)$/;e&&(Qa.text_block_elements=Qa.block_elements=null,tu(iu(e,","),function(e){var i=r.exec(e),a="~"===i[1],u=a?"span":"div",c=i[2];if(n[c]=n[u],o[c]=u,a||(y[c.toUpperCase()]={},y[c]={}),!t[c]){var s=t[u];s=nu({},s),delete s.removeEmptyAttrs,delete s.removeEmpty,t[c]=s}tu(n,function(e,t){e[u]&&(n[t]=e=nu({},n[t]),e[c]=e[u])})}))},N=function(t){var r=/^([+\-]?)([A-Za-z0-9_\-\.\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u037f-\u1fff\u200c-\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]+)\[([^\]]+)\]$/;Qa[e.schema]=null,t&&tu(iu(t,","),function(e){var t,o,i=r.exec(e);i&&(o=i[1],t=o?n[i[2]]:n[i[2]]={"#comment":{}},t=n[i[2]],tu(iu(i[3],"|"),function(e){"-"===o?delete t[e]:t[e]={}}))})},E=function(e){var n,o=t[e];if(o)return o;for(n=r.length;n--;)if(o=r[n],o.pattern.test(e))return o};e.valid_elements?x(e.valid_elements):(tu(u,function(e,r){t[r]={attributes:e.attributes,attributesOrder:e.attributesOrder},n[r]=e.children}),"html5"!==e.schema&&tu(iu("strong/b em/i"),function(e){e=iu(e,"/"),t[e[1]].outputName=e[0]}),tu(iu("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){t[e]&&(t[e].removeEmpty=!0)}),tu(iu("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"),function(e){t[e].paddEmpty=!0}),tu(iu("span"),function(e){t[e].removeEmptyAttrs=!0})),S(e.custom_elements),N(e.valid_children),w(e.extended_valid_elements),N("+ol[ul|ol],+ul[ul|ol]"),tu({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},function(e,n){t[n]&&(t[n].parentsRequired=iu(e))}),e.invalid_elements&&tu(ru(e.invalid_elements),function(e){t[e]&&delete t[e]}),E("span")||w("span[!data-mce-type|*]");var k=function(){return c},_=function(){return s},T=function(){return f},R=function(){return g},A=function(){return y},D=function(){return v},O=function(){return b},B=function(){return m},P=function(){return d},L=function(){return p},I=function(){return h},M=function(){return l},F=function(){return i},U=function(e,t){var r=n[e.toLowerCase()];return!(!r||!r[t.toLowerCase()])},z=function(e,t){var n,r,o=E(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},j=function(){return o};return{children:n,elements:t,getValidStyles:k,getValidClasses:T,getBlockElements:A,getInvalidStyles:_,getShortEndedElements:B,getTextBlockElements:D,getTextInlineElements:O,getBoolAttrs:R,getElementRule:E,getSelfClosingElements:P,getNonEmptyElements:L,getMoveCaretBeforeOnEnterElements:I,getWhiteSpaceElements:M,getSpecialElements:F,isValidChild:U,isValid:z,getCustomElements:j,addValidElements:w,setValidElements:x,addCustomElements:S,addValidChildren:N}}function a(){function e(n,r){return t.push(n+" ")>j.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function u(e){return e[ku]=!0,e}function c(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||Lu)-(~e.sourceIndex||Lu);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function f(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return u(function(t){return t=+t,u(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 d(e){return e&&typeof e.getElementsByTagName!==Pu&&e}function m(){}function g(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function p(e,t,n){var r=t.dir,o=n&&"parentNode"===r,i=Ru++;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=[Tu,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(c=t[ku]||(t[ku]={}),(u=c[r])&&u[0]===Tu&&u[1]===i)return s[2]=u[2];if(c[r]=s,s[2]=e(t,n,a))return!0}}}function h(e){return e.length>1?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function v(e,t,n){for(var r=0,o=t.length;o>r;r++)fc(e,t[r],n);return n}function y(e,t,n,r,o){for(var i,a=[],u=0,c=e.length,s=null!=t;c>u;u++)(i=e[u])&&(!n||n(i,r,o))&&(a.push(i),s&&t.push(u));return a}function b(e,t,n,r,o,i){return r&&!r[ku]&&(r=b(r)),o&&!o[ku]&&(o=b(o,i)),u(function(i,a,u,c){var s,f,l,d=[],m=[],g=a.length,p=i||v(t||"*",u.nodeType?[u]:u,[]),h=!e||!i&&t?p:y(p,d,e,u,c),b=n?o||(i?e:g||r)?[]:a:h;if(n&&n(h,b,u,c),r)for(s=y(b,m),r(s,[],u,c),f=s.length;f--;)(l=s[f])&&(b[m[f]]=!(h[m[f]]=l));if(i){if(o||e){if(o){for(s=[],f=b.length;f--;)(l=b[f])&&s.push(h[f]=l);o(null,b=[],s,c)}for(f=b.length;f--;)(l=b[f])&&(s=o?Hu.call(i,l):d[f])>-1&&(i[s]=!(a[s]=l))}}else b=y(b===a?b.splice(g,b.length):b),o?o(null,a,b,c):zu.apply(a,b)})}function C(e){for(var t,n,r,o=e.length,i=j.relative[e[0].type],a=i||j.relative[" "],u=i?1:0,c=p(function(e){return e===t},a,!0),s=p(function(e){return Hu.call(t,e)>-1},a,!0),f=[function(e,n,r){return!i&&(r||n!==K)||((t=n).nodeType?c(e,n,r):s(e,n,r))}];o>u;u++)if(n=j.relative[e[u].type])f=[p(h(f),n)];else{if(n=j.filter[e[u].type].apply(null,e[u].matches),n[ku]){for(r=++u;o>r&&!j.relative[e[r].type];r++);return b(u>1&&h(f),u>1&&g(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(Xu,"$1"),n,r>u&&C(e.slice(u,r)),o>r&&C(e=e.slice(r)),o>r&&g(e))}f.push(n)}return h(f)}function w(e,t){var n=t.length>0,r=e.length>0,o=function(o,i,a,u,c){var s,f,l,d=0,m="0",g=o&&[],p=[],h=K,v=o||r&&j.find.TAG("*",c),b=Tu+=null==h?1:Math.random()||.1,C=v.length;for(c&&(K=i!==J&&i);m!==C&&null!=(s=v[m]);m++){if(r&&s){for(f=0;l=e[f++];)if(l(s,i,a)){u.push(s);break}c&&(Tu=b)}n&&((s=!l&&s)&&d--,o&&g.push(s))}if(d+=m,n&&m!==d){for(f=0;l=t[f++];)l(g,p,i,a);if(o){if(d>0)for(;m--;)g[m]||p[m]||(p[m]=Fu.call(u));p=y(p)}zu.apply(u,p),c&&!o&&p.length>0&&d+t.length>1&&fc.uniqueSort(u)}return c&&(Tu=b,K=h),g};return n?u(o):o}function x(t,n){void 0===n&&(n={});var r=0,o={},i=uo.fromDom(t),a=Lo(i),u=n.maxLoadTime||5e3,c=function(e){n.referrerPolicy=e},s=function(e){ii(Zo(i),e)},f=function(i,c,f){var l,d,m,g=function(e){m.status=e,m.passed=[],m.failed=[],l&&(l.onload=null,l.onerror=null,l=null)},p=function(){for(var e=m.passed,t=e.length;t--;)e[t]();g(2)},h=function(){for(var e=m.failed,t=e.length;t--;)e[t]();g(3)},v=function(){var t=e.navigator.userAgent.match(/WebKit\/(\d*)/);return!!(t&&parseInt(t[1],10)<536)},y=function(e,t){e()||((new Date).getTime()-w<u?vs.setTimeout(t):h())},b=function(){y(function(){for(var e,n,r=t.styleSheets,o=r.length;o--;)if(e=r[o],n=e.ownerNode?e.ownerNode:e.owningElement,n&&n.id===l.id)return p(),!0},b)},C=function(){y(function(){try{var e=d.sheet.cssRules;return p(),!!e}catch(t){}},C)};if(i=to._addCacheSuffix(i),o[i]?m=o[i]:(m={passed:[],failed:[]},o[i]=m),c&&m.passed.push(c),f&&m.failed.push(f),1!==m.status){if(2===m.status)return void p();if(3===m.status)return void h();m.status=1,l=a.dom().createElement("link"),l.rel="stylesheet",l.type="text/css",l.id="u"+r++,l.async=!1,l.defer=!1;var w=(new Date).getTime();if(n.contentCssCors&&(l.crossOrigin="anonymous"),n.referrerPolicy&&Wi(uo.fromDom(l),"referrerpolicy",n.referrerPolicy),"onload"in l&&!v())l.onload=b,l.onerror=h;else{if(e.navigator.userAgent.indexOf("Firefox")>0)return d=a.dom().createElement("style"),d.textContent='@import "'+i+'"',C(),void s(uo.fromDom(d));b()}s(uo.fromDom(l)),l.href=i}},l=function(e){return Zc.nu(function(t){f(e,ht(t,yt(is.value(e))),ht(t,yt(is.error(e))))})},d=function(e,t,n){ts(Xt(e,l)).get(function(e){var r=Jt(e,function(e){return e.isValue()});r.fail.length>0?n(r.fail.map(cs)):t(r.pass.map(cs))})};return{load:f,loadAll:d,_setReferrerPolicy:c}}function S(t,n){var r=this;void 0===n&&(n={});var o={},a=e.window,u={},c=0,s=!0,f=!0,l=bs.forElement(uo.fromDom(t),{contentCssCors:n.contentCssCors,referrerPolicy:n.referrerPolicy}),d=[],m=n.schema?n.schema:i({}),g=mu({url_converter:n.url_converter,url_converter_scope:n.url_converter_scope},n.schema),p=n.ownEvents?new Eu:Eu.Event,h=m.getBlockElements(),v=zc.overrideDefaults(function(){return{context:t,element:Rt.getRoot()}}),y=function(e){if("string"==typeof e)return!!h[e];if(e){var t=e.nodeType;if(t)return!(1!==t||!h[e.nodeName])}return!1},b=function(e){return e&&t&&Bt(e)?t.getElementById(e):e},C=function(e){return v("string"==typeof e?b(e):e)},w=function(e,t,n){var r,o,i=C(e);return i.length&&(r=At[t],o=r&&r.get?r.get(i,t):i.attr(t)),"undefined"==typeof o&&(o=n||""),o},x=function(e){var t=b(e);return t?t.attributes:[]},N=function(e,t,r){""===r&&(r=null);var o=C(e),i=o.attr(t);if(o.length){var a=At[t];a&&a.set?a.set(o,r,t):o.attr(t,r),i!==r&&n.onSetAttrib&&n.onSetAttrib({attrElm:o,attrName:t,attrValue:r})}},E=function(e,n){if(!xs||1!==e.nodeType||n)return e.cloneNode(n);var r=t.createElement(e.nodeName);return Cs(x(e),function(t){N(r,t.nodeName,w(e,t.nodeName))}),r},k=function(){return n.root_element||t.body},_=function(e){var t=Ni(e);return{x:t.x,y:t.y,w:t.width,h:t.height}},T=function(e,n){return ca(t.body,b(e),n)},R=function(e,t,r){var o=Bt(t)?C(e).css(t,r):C(e).css(t);n.update_styles&&ks(g,o)},A=function(e,t){var r=C(e).css(t);n.update_styles&&ks(g,r)},D=function(e,t,n){var r=C(e);return n?r.css(t):(t=t.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}),"float"===t&&(t=Hr.browser.isIE()?"styleFloat":"cssFloat"),r[0]&&r[0].style?r[0].style[t]:void 0)},O=function(e){var t,n;return e=b(e),t=D(e,"width"),n=D(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}},B=function(e){e=b(e);var t=T(e),n=O(e);return{x:t.x,y:t.y,w:n.w,h:n.h}},P=function(e,t){var n;if(!e)return!1;if(!Array.isArray(e)){if("*"===t)return 1===e.nodeType;if(Ss.test(t)){var r=t.toLowerCase().split(/,/),o=e.nodeName.toLowerCase();for(n=r.length-1;n>=0;n--)if(r[n]===o)return!0;return!1}if(e.nodeType&&1!==e.nodeType)return!1}var i=Array.isArray(e)?e:[e];return fc(t,i[0].ownerDocument||i[0],null,i).length>0},L=function(e,t,n,r){var o,i=[],a=b(e);for(r=void 0===r,n=n||("BODY"!==k().nodeName?k().parentNode:null),to.is(t,"string")&&(o=t,t="*"===t?function(e){return 1===e.nodeType}:function(e){return P(e,o)});a&&a!==n&&a.nodeType&&9!==a.nodeType;){if(!t||"function"==typeof t&&t(a)){if(!r)return[a];i.push(a)}a=a.parentNode}return r?i:null},I=function(e,t,n){var r=L(e,t,n,!1);return r&&r.length>0?r[0]:null},M=function(e,t,n){var r=t;if(e)for("string"==typeof t&&(r=function(e){return P(e,t)}),e=e[n];e;e=e[n])if("function"==typeof r&&r(e))return e;return null},F=function(e,t){return M(e,t,"nextSibling")},U=function(e,t){return M(e,t,"previousSibling")},z=function(e,r){return fc(e,b(r)||n.root_element||t,[])},j=function(e,t,n){var o,i="string"==typeof e?b(e):e;if(!i)return!1;if(to.isArray(i)&&(i.length||0===i.length))return o=[],Cs(i,function(e,r){e&&("string"==typeof e&&(e=b(e)),o.push(t.call(n,e,r)))}),o;var a=n?n:r;return t.call(a,i)},H=function(e,t){C(e).each(function(e,n){Cs(t,function(e,t){N(n,t,e)})})},V=function(e,t){var n=C(e);xs?n.each(function(e,n){if(n.canHaveHTML!==!1){for(;n.firstChild;)n.removeChild(n.firstChild);try{n.innerHTML="<br>"+t,n.removeChild(n.firstChild)}catch(r){zc("<div></div>").html("<br>"+t).contents().slice(1).appendTo(n)}return t}}):n.html(t)},q=function(e,n,r,o,i){return j(e,function(e){var a="string"==typeof n?t.createElement(n):n;return H(a,r),o&&("string"!=typeof o&&o.nodeType?a.appendChild(o):"string"==typeof o&&V(a,o)),i?a:e.appendChild(a)})},$=function(e,n,r){return q(t.createElement(e),e,n,r,!0)},W=Ja.decode,K=Ja.encodeAllRaw,X=function(e,t,n){var r,o="";o+="<"+e;for(r in t)t.hasOwnProperty(r)&&null!==t[r]&&"undefined"!=typeof t[r]&&(o+=" "+r+'="'+K(t[r])+'"');return"undefined"!=typeof n?o+">"+n+"</"+e+">":o+" />"},Y=function(e){var n,r=t.createElement("div"),o=t.createDocumentFragment();for(o.appendChild(r),e&&(r.innerHTML=e);n=r.firstChild;)o.appendChild(n);return o.removeChild(r),o},G=function(e,t){var n=C(e);return t?n.each(function(){for(var e;e=this.firstChild;)3===e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}).remove():n.remove(),n.length>1?n.toArray():n[0]},J=function(e){return j(e,function(e){var t,n=e.attributes;for(t=n.length-1;t>=0;t--)e.removeAttributeNode(n.item(t))})},Q=function(e){return g.parse(e)},Z=function(e,t){return g.serialize(e,t)},et=function(n){var r,i;if(Rt!==S.DOM&&t===e.document){if(o[n])return;o[n]=!0}i=t.getElementById("mceDefaultStyles"),i||(i=t.createElement("style"),i.id="mceDefaultStyles",i.type="text/css",r=t.getElementsByTagName("head")[0],r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i)),i.styleSheet?i.styleSheet.cssText+=n:i.appendChild(t.createTextNode(n))},tt=function(r){if(Rt!==S.DOM&&t===e.document)return void S.DOM.loadCSS(r);r||(r="");var o=t.getElementsByTagName("head")[0];Cs(r.split(","),function(e){if(e=to._addCacheSuffix(e),!u[e]){u[e]=!0;var t=$("link",Fn(Fn({rel:"stylesheet",type:"text/css",href:e},n.contentCssCors?{crossOrigin:"anonymous"}:{}),n.referrerPolicy?{referrerPolicy:n.referrerPolicy}:{}));o.appendChild(t)}})},nt=function(e,t,n){C(e).toggleClass(t,n).each(function(){""===this.className&&zc(this).attr("class",null)})},rt=function(e,t){C(e).addClass(t)},ot=function(e,t){nt(e,t,!1)},it=function(e,t){return C(e).hasClass(t)},at=function(e){C(e).show()},ut=function(e){C(e).hide()},ct=function(e){return"none"===C(e).css("display")},st=function(e){return(e?e:"mce_")+c++},ft=function(e){var t="string"==typeof e?b(e):e;return _i(t)?t.outerHTML:zc("<div></div>").append(zc(t).clone()).html()},lt=function(e,t){C(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}G(zc(this).html(t),!0)})},dt=function(e,t){var n=b(t);return j(e,function(e){var t=n.parentNode,r=n.nextSibling;return r?t.insertBefore(e,r):t.appendChild(e),e})},mt=function(e,t,n){return j(t,function(t){return to.is(t,"array")&&(e=e.cloneNode(!0)),n&&Cs(ws(t.childNodes),function(t){e.appendChild(t)}),t.parentNode.replaceChild(e,t)})},gt=function(e,t){var n;return e.nodeName!==t.toUpperCase()&&(n=$(t),Cs(x(e),function(t){N(n,t.nodeName,w(e,t.nodeName))}),mt(n,e,!0)),n||e},pt=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},ht=function(e){return g.toHex(to.trim(e))},vt=function(e){if(_i(e)){var t="a"===e.nodeName.toLowerCase()&&!w(e,"href")&&w(e,"id");if(w(e,"name")||w(e,"data-mce-bookmark")||t)return!0}return!1},yt=function(e,t){var n,r,o=0;if(vt(e))return!1;if(e=e.firstChild){var i=new jc(e,e.parentNode),a=m?m.getWhiteSpaceElements():{};t=t||(m?m.getNonEmptyElements():null);do{if(n=e.nodeType,_i(e)){var u=e.getAttribute("data-mce-bogus");if(u){e=i.next("all"===u);continue}if(r=e.nodeName.toLowerCase(),t&&t[r]){if("br"===r){o++,e=i.next();continue}return!1}if(vt(e))return!1}if(8===n)return!1;if(3===n&&!Ns.test(e.nodeValue))return!1;if(3===n&&e.parentNode&&a[e.parentNode.nodeName]&&Ns.test(e.nodeValue))return!1;e=i.next()}while(e)}return 1>=o},bt=function(){return t.createRange()},Ct=function(e,t,n){var r,o,i,a=bt();return e&&t?(a.setStart(e.parentNode,_s(e)),a.setEnd(t.parentNode,_s(t)),r=a.extractContents(),a=bt(),a.setStart(t.parentNode,_s(t)+1),a.setEnd(e.parentNode,_s(e)+1),o=a.extractContents(),i=e.parentNode,i.insertBefore(Ba(Rt,r),e),n?i.insertBefore(n,e):i.insertBefore(t,e),i.insertBefore(Ba(Rt,o),e),G(e),n||t):void 0},wt=function(e,r,o,i){if(to.isArray(e)){for(var u=e.length,c=[];u--;)c[u]=wt(e[u],r,o,i);return c}return!n.collect||e!==t&&e!==a||d.push([e,r,o,i]),p.bind(e,r,o,i||Rt)},xt=function(e,n,r){var o;if(to.isArray(e)){o=e.length;for(var i=[];o--;)i[o]=xt(e[o],n,r);return i}if(d.length>0&&(e===t||e===a))for(o=d.length;o--;){var u=d[o];e!==u[0]||n&&n!==u[1]||r&&r!==u[2]||p.unbind(u[0],u[1],u[2])}return p.unbind(e,n,r)},St=function(e,t,n){return p.fire(e,t,n)},Nt=function(e){if(e&&_i(e)){var t=e.getAttribute("data-mce-contenteditable");return t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null}return null},Et=function(e){for(var t=k(),n=null;e&&e!==t&&(n=Nt(e),null===n);e=e.parentNode);return n},kt=function(){if(d.length>0)for(var e=d.length;e--;){var t=d[e];p.unbind(t[0],t[1],t[2])}fc.setDocument&&fc.setDocument()},_t=function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},Tt=function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset},Rt={doc:t,settings:n,win:a,files:u,stdMode:s,boxModel:f,styleSheetLoader:l,boundEvents:d,styles:g,schema:m,events:p,isBlock:y,$:v,$$:C,root:null,clone:E,getRoot:k,getViewPort:_,getRect:B,getSize:O,getParent:I,getParents:L,get:b,getNext:F,getPrev:U,select:z,is:P,add:q,create:$,createHTML:X,createFragment:Y,remove:G,setStyle:R,getStyle:D,setStyles:A,removeAllAttribs:J,setAttrib:N,setAttribs:H,getAttrib:w,getPos:T,parseStyle:Q,serializeStyle:Z,addStyle:et,loadCSS:tt,addClass:rt,removeClass:ot,hasClass:it,toggleClass:nt,show:at,hide:ut,isHidden:ct,uniqueId:st,setHTML:V,getOuterHTML:ft,setOuterHTML:lt,decode:W,encode:K,insertAfter:dt,replace:mt,rename:gt,findCommonAncestor:pt,toHex:ht,run:j,getAttribs:x,isEmpty:yt,createRng:bt,nodeIndex:_s,split:Ct,bind:wt,unbind:xt,fire:St,getContentEditable:Nt,getContentEditableParent:Et,destroy:kt,isChildOf:_t,dumpRng:Tt},At=Es(g,n,function(){return Rt});return Rt}function N(){var e=this,t=[],n={},r={},o=[],i=function(e,t){var n=Qt(o,function(n){return n.name===e&&n.state===t});Yt(n,function(e){return e.callback()})},a=function(e){return r[e]?r[e].instance:void 0},u=function(e){var t;return r[e]&&(t=r[e].dependencies),t||[]},c=function(e,t){N.languageLoad!==!1&&p(e,function(){var r=Gs.getCode(),o=","+(t||"")+",";!r||t&&-1===o.indexOf(","+r+",")||Is.ScriptLoader.add(n[e]+"/langs/"+r+".js")},"loaded")},s=function(e,n,o){var a=n;return t.push(a),r[e]={instance:a,dependencies:o},i(e,"added"),a},f=function(e){delete n[e],delete r[e]},l=function(e,t){return"object"==typeof t?t:"string"==typeof e?{prefix:"",resource:t,suffix:""}:{prefix:e.prefix,resource:t,suffix:e.suffix}},d=function(t,n){var r=e.urls[t];Yt(n,function(e){Is.ScriptLoader.add(r+"/"+e)})},m=function(e,t,n,r){var o=u(e);Yt(o,function(e){var n=l(t,e);g(n.resource,n,void 0,void 0)}),n&&n.call(r?r:Is)},g=function(e,t,o,a,u){if(!n[e]){var c="string"==typeof t?t:t.prefix+t.resource+t.suffix;0!==c.indexOf("/")&&-1===c.indexOf("://")&&(c=N.baseURL+"/"+c),n[e]=c.substring(0,c.lastIndexOf("/"));var s=function(){i(e,"loaded"),m(e,t,o,a)};r[e]?s():Is.ScriptLoader.add(c,s,a,u)}},p=function(e,t,i){void 0===i&&(i="added"),_n(r,e)&&"added"===i?t():_n(n,e)&&"loaded"===i?t():o.push({name:e,state:i,callback:t})};return{items:t,urls:n,lookup:r,_listeners:o,get:a,dependencies:u,requireLangPack:c,add:s,remove:f,createUrl:l,addComponents:d,load:g,waitFor:p}}function E(e,t,n,r,o){return e(n,r)?Tt.some(n):Ut(o)&&o(n)?Tt.none():t(n,r,o)}function k(e,t,n){var r=function(){return ql(e)?0===t:0===t},o=function(){return ql(e)?t>=e.data.length:t>=e.childNodes.length},i=function(){var n=Xl(e.ownerDocument);return n.setStart(e,t),n.setEnd(e,t),n},a=function(){return n||(n=rd(k(e,t))),n},u=function(){return a().length>0},c=function(n){return n&&e===n.container()&&t===n.offset()},s=function(n){return Kl(e,n?t-1:t)};return{container:yt(e),offset:yt(t),toRange:i,getClientRects:a,isVisible:u,isAtStart:r,isAtEnd:o,isEqual:c,getNode:s}}function _(e,t){var n=function(n){if(!e(n))throw new Error("Can only get "+t+" value of a "+t+" node");return r(n).getOr("")},r=function(t){return e(t)?Tt.from(t.dom().nodeValue):Tt.none()},o=function(n,r){if(!e(n))throw new Error("Can only set raw "+t+" value of a "+t+" node");n.dom().nodeValue=r};return{get:n,getOption:r,set:o}}function T(e,t){void 0===t&&(t=i());var n=function(){};e=e||{},e.fix_self_closing!==!1&&(e.fix_self_closing=!0);var r=e.comment?e.comment:n,o=e.cdata?e.cdata:n,a=e.text?e.text:n,u=e.start?e.start:n,c=e.end?e.end:n,s=e.pi?e.pi:n,f=e.doctype?e.doctype:n,l=function(n,i){void 0===i&&(i="html");for(var l,d,m,g,p,h,v,y,b,C,w,x,S,N,E,k,_,T,R,A,D=n.html,O=0,B=[],P=0,L=Ja.decode,I=to.makeMap("src,href,data,background,formaction,poster,xlink:href"),M=/((java|vb)script|mhtml):/i,F="html"===i?0:1,U=function(e){var t,n;for(t=B.length;t--&&B[t].name!==e;);if(t>=0){for(n=B.length-1;n>=t;n--)e=B[n],e.valid&&c(e.name);B.length=t}},z=function(e,t){return a(rv(e,n),t)},j=function(t){""!==t&&(">"===t.charAt(0)&&(t=" "+t),e.allow_conditional_comments||"[if"!==t.substr(0,3).toLowerCase()||(t=" "+t),r(rv(t,n)))},H=function(e){return kn(n.uris,e).getOr(e)},V=function(e,t){var n=e||"",r=!br(n,"--"),o=sv(D,r,t);return e=D.substr(t,o-t),j(r?n+e:e),o+1},q=(function(t,n,r,o,i){var a,u,c=/[\s\u0000-\u001F]+/g;if(n=n.toLowerCase(),r=H(n in Y?n:L(r||o||i||"")),G&&!y&&iv(n)===!1){if(a=N[n],!a&&E){for(u=E.length;u--&&(a=E[u],!a.pattern.test(n)););-1===u&&(a=null)}if(!a)return;if(a.validValues&&!(r in a.validValues))return}if(I[n]&&!e.allow_script_urls){var s=r.replace(c,"");try{s=decodeURIComponent(s)}catch(f){s=unescape(s)}if(M.test(s))return;if(av(e,s))return}y&&(n in I||0===n.indexOf("on"))||(g.map[n]=r,g.push({name:n,value:r}))}),$=new RegExp("<(?:(?:!--([\\w\\W]*?)--!?>)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:![Dd][Oo][Cc][Tt][Yy][Pp][Ee]([\\w\\W]*?)>)|(?:!(--)?)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),W=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,K=t.getShortEndedElements(),X=e.self_closing_elements||t.getSelfClosingElements(),Y=t.getBoolAttrs(),G=e.validate,J=e.remove_internals,Q=e.fix_self_closing,Z=t.getSpecialElements(),et=D+">";l=$.exec(et);){var tt=l[0];if(O<l.index&&z(L(D.substr(O,l.index-O))),d=l[7])d=d.toLowerCase(),":"===d.charAt(0)&&(d=d.substr(1)),U(d);else if(d=l[8]){if(l.index+tt.length>D.length){z(L(D.substr(l.index))),O=l.index+tt.length;continue}d=d.toLowerCase(),":"===d.charAt(0)&&(d=d.substr(1)),b=d in K,Q&&X[d]&&B.length>0&&B[B.length-1].name===d&&U(d);var nt=fv(W,l[9]);if(null!==nt){if("all"===nt){O=uv(t,D,$.lastIndex),$.lastIndex=O;continue}w=!1}if(!G||(C=t.getElementRule(d))){if(w=!0,G&&(N=C.attributes,E=C.attributePatterns),(S=l[9])?(y=-1!==S.indexOf("data-mce-type"),y&&J&&(w=!1),g=[],g.map={},S.replace(W,q)):(g=[],g.map={}),G&&!y){if(k=C.attributesRequired,_=C.attributesDefault,T=C.attributesForced,R=C.removeEmptyAttrs,R&&!g.length&&(w=!1),T)for(p=T.length;p--;)x=T[p],v=x.name,A=x.value,"{$uid}"===A&&(A="mce_"+P++),g.map[v]=A,g.push({name:v,value:A});if(_)for(p=_.length;p--;)x=_[p],v=x.name,v in g.map||(A=x.value,"{$uid}"===A&&(A="mce_"+P++),g.map[v]=A,g.push({name:v,value:A}));if(k){for(p=k.length;p--&&!(k[p]in g.map););-1===p&&(w=!1)}if(x=g.map["data-mce-bogus"]){if("all"===x){O=uv(t,D,$.lastIndex),$.lastIndex=O;continue}w=!1}}w&&u(d,g,b)}else w=!1;if(m=Z[d]){m.lastIndex=O=l.index+tt.length,(l=m.exec(D))?(w&&(h=D.substr(O,l.index-O)),O=l.index+l[0].length):(h=D.substr(O),O=D.length),w&&(h.length>0&&z(h,!0),c(d)),$.lastIndex=O;continue}b||(S&&S.indexOf("/")===S.length-1?w&&c(d):B.push({name:d,valid:w}))}else if(d=l[1])j(d);else if(d=l[2]){var rt=1===F||e.preserve_cdata||B.length>0&&t.isValidChild(B[B.length-1].name,"#cdata");if(!rt){O=V("",l.index+2),$.lastIndex=O;continue}o(d)}else if(d=l[3])f(d);else{if((d=l[4])||"<!"===tt){O=V(d,l.index+tt.length),$.lastIndex=O;continue}if(d=l[5]){if(1!==F){O=V("?",l.index+2),$.lastIndex=O;continue}s(d,l[6])}}O=l.index+tt.length}for(O<D.length&&z(L(D.substr(O))),p=B.length-1;p>=0;p--)d=B[p],d.valid&&c(d.name)},d=function(e,t){void 0===t&&(t="html"),l(nv(e),t)};return{parse:d}}function R(){var e=function(){throw new Error("Theme did not provide a NotificationManager implementation.")};return{open:e,close:e,reposition:e,getArgs:e}}function A(e){var t=[],n=function(){var t=e.theme;return t&&t.getNotificationManagerImpl?t.getNotificationManagerImpl():R()},r=function(){return Tt.from(t[0])},o=function(e,t){return!(e.type!==t.type||e.text!==t.text||e.progressBar||e.timeout||t.progressBar||t.timeout)},i=function(){t.length>0&&n().reposition(t)},a=function(e){t.push(e)},u=function(e){rn(t,function(t){return t===e}).each(function(e){t.splice(e,1)})},c=function(r){return!e.removed&&qE(e)?nn(t,function(e){return o(n().getArgs(e),r)}).getOrThunk(function(){e.editorManager.setActive(e);var t=n().open(r,function(){u(t),i()});return a(t),i(),t}):void 0},s=function(){r().each(function(e){n().close(e),u(e),i()})},f=function(){return t},l=function(e){e.on("SkinLoaded",function(){var t=_m(e);t&&c({text:t,type:"warning",timeout:0})}),e.on("ResizeEditor ResizeWindow NodeChange",function(){vs.requestAnimationFrame(i)}),e.on("remove",function(){Yt(t.slice(),function(e){n().close(e)})})};return l(e),{open:c,close:s,getNotifications:f}}function D(){var e=function(){throw new Error("Theme did not provide a WindowManager implementation.")};return{open:e,openUrl:e,alert:e,confirm:e,close:e,getParams:e,setParams:e}}function O(e,t){var n=function(t,n){if(!zt(n)&&!n.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+n);var r=t.dom();qi(r)&&(r.style[e]=n+"px")},r=function(n){var r=t(n);if(0>=r||null===r){var o=Zi(n,e);return parseFloat(o)||0}return r},o=r,i=function(e,t){return en(t,function(t,n){var r=Zi(e,n),o=void 0===r?0:parseInt(r,10);return isNaN(o)?t:t+o},0)},a=function(e,t,n){var r=i(e,n),o=t>r?t-r:0;return o};return{set:n,get:r,getOuter:o,aggregate:i,max:a}}function B(e){return{getBookmark:t(Ip,e),moveToBookmark:t(Mp,e)}}function P(e,t){var n,r;return{selectorChangedWithUnbind:function(o,i){return n||(n={},r={},t.on("NodeChange",function(t){var o=t.element,i=e.getParents(o,null,e.getRoot()),a={};to.each(n,function(t,n){to.each(i,function(o){return e.is(o,n)?(r[n]||(to.each(t,function(e){e(!0,{node:o,selector:n,parents:i})}),r[n]=t),a[n]=t,!1):void 0})}),to.each(r,function(e,t){a[t]||(delete r[t],to.each(e,function(e){e(!1,{node:o,selector:t,parents:i})}))})})),n[o]||(n[o]=[]),n[o].push(i),{unbind:function(){S_(n,o,i),S_(r,o,i)}}}}}function L(e,t){var n={},r=function(r,o){o||(o=yt(!0));var i=Qt(H_(r),function(t){var n=t.src;return Hr.fileApi?t.hasAttribute("data-mce-bogus")?!1:t.hasAttribute("data-mce-placeholder")?!1:n&&n!==Hr.transparentSrc?0===n.indexOf("blob:")?!e.isUploaded(n)&&o(t):0===n.indexOf("data:")?o(t):!1:!1:!1}),a=Xt(i,function(e){if(void 0!==n[e.src])return new fs(function(t){n[e.src].then(function(n){return"string"==typeof n?n:void t({image:e,blobInfo:n.blobInfo})})});var r=new fs(function(n,r){j_(t,e,n,r)}).then(function(e){return delete n[e.image.src],e}).catch(function(t){return delete n[e.src],t});return n[e.src]=r,r});return fs.all(a)};return{findAll:r}}function I(t,n){var r={},o=function(e,t){return e?e.replace(/\/$/,"")+"/"+t.replace(/^\//,""):t},i=function(t,r,i,a){var u=new e.XMLHttpRequest;u.open("POST",n.url),u.withCredentials=n.credentials,u.upload.onprogress=function(e){a(e.loaded/e.total*100)},u.onerror=function(){i("Image upload failed due to a XHR Transport error. Code: "+u.status)},u.onload=function(){if(u.status<200||u.status>=300)return void i("HTTP Error: "+u.status);var e=JSON.parse(u.responseText);return e&&"string"==typeof e.location?void r(o(n.basePath,e.location)):void i("Invalid JSON: "+u.responseText)};var c=new e.FormData;c.append("file",t.blob(),t.filename()),u.send(c)},a=function(){return new fs(function(e){e([])})},u=function(e,t){return{url:t,blobInfo:e,status:!0}},c=function(e,t){return{url:"",blobInfo:e,status:!1,error:t}},s=function(e,t){to.each(r[e],function(e){e(t)}),delete r[e]},f=function(e,n,r){return t.markPending(e.blobUri()),new fs(function(o){var i,a,f=function(){};try{var l=function(){i&&(i.close(),a=f)},d=function(n){l(),t.markUploaded(e.blobUri(),n),s(e.blobUri(),u(e,n)),o(u(e,n))},m=function(n){l(),t.removeFailed(e.blobUri()),s(e.blobUri(),c(e,n)),o(c(e,n))};a=function(e){0>e||e>100||(i||(i=r()),i.progressBar.value(e))},n(e,d,m,a)}catch(g){o(c(e,g.message))}})},l=function(e){return e===i},d=function(e){var t=e.blobUri();return new fs(function(e){r[t]=r[t]||[],r[t].push(e)
})},m=function(e,r){return e=to.grep(e,function(e){return!t.isUploaded(e.blobUri())}),fs.all(to.map(e,function(e){return t.isPending(e.blobUri())?d(e):f(e,n.handler,r)}))},g=function(e,t){return!n.url&&l(n.handler)?a():m(e,t)};return Ut(n.handler)===!1&&(n.handler=i),{upload:g}}function M(){var e=1,t=2,n={},r=function(e,t){return{status:e,resultUri:t}},o=function(e){return e in n},i=function(e){var t=n[e];return t?t.resultUri:null},a=function(t){return o(t)?n[t].status===e:!1},u=function(e){return o(e)?n[e].status===t:!1},c=function(t){n[t]=r(e,null)},s=function(e,o){n[e]=r(t,o)},f=function(e){delete n[e]},l=function(){n={}};return{hasBlobUri:o,getResultUri:i,isPending:a,isUploaded:u,markPending:c,markUploaded:s,removeFailed:f,destroy:l}}function F(e){var t={},n=function(e){return e?t[e]:t},r=function(e){return _n(t,e)},o=function(e,n){e&&("string"!=typeof e?to.each(e,function(e,t){o(t,e)}):(Lt(n)||(n=[n]),to.each(n,function(e){"undefined"==typeof e.deep&&(e.deep=!e.selector),"undefined"==typeof e.split&&(e.split=!e.selector||e.inline),"undefined"==typeof e.remove&&e.selector&&!e.inline&&(e.remove="none"),e.selector&&e.inline&&(e.mixed=!0,e.block_expand=!0),"string"==typeof e.classes&&(e.classes=e.classes.split(/\s+/))}),t[e]=n))},i=function(e){return e&&t[e]&&delete t[e],t};return o(RT(e.dom)),o(Dm(e)),{get:n,has:r,register:o,unregister:i}}function U(e){var t=function(t,n){return wh(e,t,n)},n=ww,r=function(t){return c_(e,t).fold(yt(!1),function(e){return t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),!0})};return{walk:t,split:n,normalize:r}}var z,j,H,V,q,$,W,K,X,Y,G,J,Q,Z,et,tt,nt,rt,ot=function(e){if(null===e)return"null";if(void 0===e)return"undefined";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},it=function(e){return-1!==["undefined","boolean","number","string","function","xml","null"].indexOf(e)},at=function(e,t){var n=Array.prototype.slice.call(e);return n.sort(t)},ut=function(e,t){return ct(function(n,r){return e.eq(t(n),t(r))})},ct=function(e){return{eq:e}},st=ct(function(e,t){return e===t}),ft=st,lt=function(e){return ct(function(t,n){if(t.length!==n.length)return!1;for(var r=t.length,o=0;r>o;o++)if(!e.eq(t[o],n[o]))return!1;return!0})},dt=function(e,t){return ut(lt(e),function(e){return at(e,t)})},mt=function(e){return ct(function(t,n){var r=Object.keys(t),o=Object.keys(n);if(!dt(ft).eq(r,o))return!1;for(var i=r.length,a=0;i>a;a++){var u=r[a];if(!e.eq(t[u],n[u]))return!1}return!0})},gt=ct(function(e,t){if(e===t)return!0;var n=ot(e),r=ot(t);return n!==r?!1:it(n)?e===t:"array"===n?lt(gt).eq(e,t):"object"===n?mt(gt).eq(e,t):!1}),pt=function(){},ht=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e(t.apply(null,n))}},vt=function(e,t){return function(n){return e(t(n))}},yt=function(e){return function(){return e}},bt=function(e){return e},Ct=function(e){return function(t){return!e(t)}},wt=function(e){return function(){throw new Error(e)}},xt=yt(!1),St=yt(!0),Nt=function(){return Et},Et=function(){var e=function(e){return e.isNone()},t=function(e){return e()},n=function(e){return e},r={fold:function(e){return e()},is:xt,isSome:xt,isNone:St,getOr:n,getOrThunk:t,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:yt(null),getOrUndefined:yt(void 0),or:n,orThunk:t,map:Nt,each:pt,bind:Nt,exists:xt,forall:St,filter:Nt,equals:e,equals_:e,toArray:function(){return[]},toString:yt("none()")};return r}(),kt=function(e){var t=yt(e),n=function(){return o},r=function(t){return t(e)},o={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:St,isNone:xt,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return kt(t(e))},each:function(t){t(e)},bind:r,exists:r,forall:r,filter:function(t){return t(e)?o:Et},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(xt,function(t){return n(e,t)})}};return o},_t=function(e){return null===e||void 0===e?Et:kt(e)},Tt={some:kt,none:Nt,from:_t},Rt=function(e){var t=typeof e;return null===e?"null":"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},At=function(e){return function(t){return Rt(t)===e}},Dt=function(e){return function(t){return typeof t===e}},Ot=function(e){return function(t){return e===t}},Bt=At("string"),Pt=At("object"),Lt=At("array"),It=Ot(null),Mt=Dt("boolean"),Ft=Ot(void 0),Ut=Dt("function"),zt=Dt("number"),jt=Array.prototype.slice,Ht=Array.prototype.indexOf,Vt=Array.prototype.push,qt=function(e,t){return Ht.call(e,t)},$t=function(e,t){var n=qt(e,t);return-1===n?Tt.none():Tt.some(n)},Wt=function(e,t){return qt(e,t)>-1},Kt=function(e,t){for(var n=0,r=e.length;r>n;n++){var o=e[n];if(t(o,n))return!0}return!1},Xt=function(e,t){for(var n=e.length,r=new Array(n),o=0;n>o;o++){var i=e[o];r[o]=t(i,o)}return r},Yt=function(e,t){for(var n=0,r=e.length;r>n;n++){var o=e[n];t(o,n)}},Gt=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];t(r,n)}},Jt=function(e,t){for(var n=[],r=[],o=0,i=e.length;i>o;o++){var a=e[o],u=t(a,o)?n:r;u.push(a)}return{pass:n,fail:r}},Qt=function(e,t){for(var n=[],r=0,o=e.length;o>r;r++){var i=e[r];t(i,r)&&n.push(i)}return n},Zt=function(e,t,n){return Gt(e,function(e){n=t(n,e)}),n},en=function(e,t,n){return Yt(e,function(e){n=t(n,e)}),n},tn=function(e,t,n){for(var r=0,o=e.length;o>r;r++){var i=e[r];if(t(i,r))return Tt.some(i);if(n(i,r))break}return Tt.none()},nn=function(e,t){return tn(e,t,xt)},rn=function(e,t){for(var n=0,r=e.length;r>n;n++){var o=e[n];if(t(o,n))return Tt.some(n)}return Tt.none()},on=function(e){for(var t=[],n=0,r=e.length;r>n;++n){if(!Lt(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);Vt.apply(t,e[n])}return t},an=function(e,t){return on(Xt(e,t))},un=function(e,t){for(var n=0,r=e.length;r>n;++n){var o=e[n];if(t(o,n)!==!0)return!1}return!0},cn=function(e){var t=jt.call(e,0);return t.reverse(),t},sn=function(e,t){return Qt(e,function(e){return!Wt(t,e)})},fn=function(e,t){for(var n={},r=0,o=e.length;o>r;r++){var i=e[r];n[String(i)]=t(i,r)}return n},ln=function(e,t){var n=jt.call(e,0);return n.sort(t),n},dn=function(e){return 0===e.length?Tt.none():Tt.some(e[0])},mn=function(e){return 0===e.length?Tt.none():Tt.some(e[e.length-1])},gn=Ut(Array.from)?Array.from:function(e){return jt.call(e)},pn=Object.keys,hn=Object.hasOwnProperty,vn=function(e,t){for(var n=pn(e),r=0,o=n.length;o>r;r++){var i=n[r],a=e[i];t(a,i)}},yn=function(e,t){return bn(e,function(e,n){return{k:n,v:t(e,n)}})},bn=function(e,t){var n={};return vn(e,function(e,r){var o=t(e,r);n[o.k]=o.v}),n},Cn=function(e){return function(t,n){e[n]=t}},wn=function(e,t,n,r){var o={};return vn(e,function(e,o){(t(e,o)?n:r)(e,o)}),o},xn=function(e,t){var n={},r={};return wn(e,t,Cn(n),Cn(r)),{t:n,f:r}},Sn=function(e,t){var n={};return wn(e,t,Cn(n),pt),n},Nn=function(e,t){var n=[];return vn(e,function(e,r){n.push(t(e,r))}),n},En=function(e){return Nn(e,function(e){return e})},kn=function(e,t){return _n(e,t)?Tt.from(e[t]):Tt.none()},_n=function(e,t){return hn.call(e,t)},Tn=function(e,t,n){return void 0===n&&(n=gt),mt(n).eq(e,t)},Rn=Array.isArray,An=function(e){var t,n,r=e;if(!Rn(e))for(r=[],t=0,n=e.length;n>t;t++)r[t]=e[t];return r},Dn=function(e,t,n){var r,o;if(!e)return 0;if(n=n||e,void 0!==e.length){for(r=0,o=e.length;o>r;r++)if(t.call(n,e[r],r,e)===!1)return 0}else for(r in e)if(e.hasOwnProperty(r)&&t.call(n,e[r],r,e)===!1)return 0;return 1},On=function(e,t){var n=[];return Dn(e,function(r,o){n.push(t(r,o,e))}),n},Bn=function(e,t){var n=[];return Dn(e,function(r,o){(!t||t(r,o,e))&&n.push(r)}),n},Pn=function(e,t){var n,r;if(e)for(n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1},Ln=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},In=function(e,t,n){var r,o;for(r=0,o=e.length;o>r;r++)if(t.call(n,e[r],r,e))return r;return-1},Mn=function(e){return e[e.length-1]},Fn=function(){return Fn=Object.assign||function(e){for(var t,n=1,r=arguments.length;r>n;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Fn.apply(this,arguments)},Un=function(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}},zn=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}return void 0},jn=function(e,t){var n=zn(e,t);if(!n)return{major:0,minor:0};var r=function(e){return Number(t.replace(n,"$"+e))};return qn(r(1),r(2))},Hn=function(e,t){var n=String(t).toLowerCase();return 0===e.length?Vn():jn(e,n)},Vn=function(){return qn(0,0)},qn=function(e,t){return{major:e,minor:t}},$n={nu:qn,detect:Hn,unknown:Vn},Wn="Edge",Kn="Chrome",Xn="IE",Yn="Opera",Gn="Firefox",Jn="Safari",Qn=function(){return Zn({current:void 0,version:$n.unknown()})},Zn=function(e){var t=e.current,n=e.version,r=function(e){return function(){return t===e}};return{current:t,version:n,isEdge:r(Wn),isChrome:r(Kn),isIE:r(Xn),isOpera:r(Yn),isFirefox:r(Gn),isSafari:r(Jn)}},er={unknown:Qn,nu:Zn,edge:yt(Wn),chrome:yt(Kn),ie:yt(Xn),opera:yt(Yn),firefox:yt(Gn),safari:yt(Jn)},tr="Windows",nr="iOS",rr="Android",or="Linux",ir="OSX",ar="Solaris",ur="FreeBSD",cr="ChromeOS",sr=function(){return fr({current:void 0,version:$n.unknown()})},fr=function(e){var t=e.current,n=e.version,r=function(e){return function(){return t===e}};return{current:t,version:n,isWindows:r(tr),isiOS:r(nr),isAndroid:r(rr),isOSX:r(ir),isLinux:r(or),isSolaris:r(ar),isFreeBSD:r(ur),isChromeOS:r(cr)}},lr={unknown:sr,nu:fr,windows:yt(tr),ios:yt(nr),android:yt(rr),linux:yt(or),osx:yt(ir),solaris:yt(ar),freebsd:yt(ur),chromeos:yt(cr)},dr=function(e,t,n,r){var o=e.isiOS()&&/ipad/i.test(n)===!0,i=e.isiOS()&&!o,a=e.isiOS()||e.isAndroid(),u=a||r("(pointer:coarse)"),c=o||!i&&a&&r("(min-device-width:768px)"),s=i||a&&!c,f=t.isSafari()&&e.isiOS()&&/safari/i.test(n)===!1,l=!s&&!c&&!f;return{isiPad:yt(o),isiPhone:yt(i),isTablet:yt(c),isPhone:yt(s),isTouch:yt(u),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:yt(f),isDesktop:yt(l)}},mr=function(e,t){var n=String(t).toLowerCase();return nn(e,function(e){return e.search(n)})},gr=function(e,t){return mr(e,t).map(function(e){var n=$n.detect(e.versionRegexes,t);return{current:e.name,version:n}})},pr=function(e,t){return mr(e,t).map(function(e){var n=$n.detect(e.versionRegexes,t);return{current:e.name,version:n}})},hr={detectBrowser:gr,detectOs:pr},vr=function(e,t,n){return""===t||e.length>=t.length&&e.substr(n,n+t.length)===t},yr=function(e,t){return-1!==e.indexOf(t)},br=function(e,t){return vr(e,t,0)},Cr=function(e){return function(t){return t.replace(e,"")}},wr=Cr(/^\s+|\s+$/g),xr=Cr(/^\s+/g),Sr=Cr(/\s+$/g),Nr=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Er=function(e){return function(t){return yr(t,e)}},kr=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return yr(e,"edge/")&&yr(e,"chrome")&&yr(e,"safari")&&yr(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Nr],search:function(e){return yr(e,"chrome")&&!yr(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return yr(e,"msie")||yr(e,"trident")}},{name:"Opera",versionRegexes:[Nr,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Er("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Er("firefox")},{name:"Safari",versionRegexes:[Nr,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(yr(e,"safari")||yr(e,"mobile/"))&&yr(e,"applewebkit")}}],_r=[{name:"Windows",search:Er("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return yr(e,"iphone")||yr(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Er("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Er("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Er("linux"),versionRegexes:[]},{name:"Solaris",search:Er("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Er("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Er("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Tr={browsers:yt(kr),oses:yt(_r)},Rr=function(e,t){var n=Tr.browsers(),r=Tr.oses(),o=hr.detectBrowser(n,e).fold(er.unknown,er.nu),i=hr.detectOs(r,e).fold(lr.unknown,lr.nu),a=dr(i,o,e,t);return{browser:o,os:i,deviceType:a}},Ar={detect:Rr},Dr=function(t){return e.window.matchMedia(t).matches},Or=Un(function(){return Ar.detect(e.navigator.userAgent,Dr)}),Br=function(){return Or()},Pr=e.navigator.userAgent,Lr=Br(),Ir=Lr.browser,Mr=Lr.os,Fr=Lr.deviceType,Ur=/WebKit/.test(Pr)&&!Ir.isEdge(),zr="FormData"in e.window&&"FileReader"in e.window&&"URL"in e.window&&!!e.URL.createObjectURL,jr=-1!==Pr.indexOf("Windows Phone"),Hr={opera:Ir.isOpera(),webkit:Ur,ie:Ir.isIE()||Ir.isEdge()?Ir.version.major:!1,gecko:Ir.isFirefox(),mac:Mr.isOSX()||Mr.isiOS(),iOS:Fr.isiPad()||Fr.isiPhone(),android:Mr.isAndroid(),contentEditable:!0,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:!0,range:e.window.getSelection&&"Range"in e.window,documentMode:Ir.isIE()?e.document.documentMode||7:10,fileApi:zr,ceFalse:!0,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!Ir.isIE(),desktop:Fr.isDesktop(),windowsPhone:jr,browser:{current:Ir.current,version:Ir.version,isChrome:Ir.isChrome,isEdge:Ir.isEdge,isFirefox:Ir.isFirefox,isIE:Ir.isIE,isOpera:Ir.isOpera,isSafari:Ir.isSafari},os:{current:Mr.current,version:Mr.version,isAndroid:Mr.isAndroid,isChromeOS:Mr.isChromeOS,isFreeBSD:Mr.isFreeBSD,isiOS:Mr.isiOS,isLinux:Mr.isLinux,isOSX:Mr.isOSX,isSolaris:Mr.isSolaris,isWindows:Mr.isWindows},deviceType:{isDesktop:Fr.isDesktop,isiPad:Fr.isiPad,isiPhone:Fr.isiPhone,isPhone:Fr.isPhone,isTablet:Fr.isTablet,isTouch:Fr.isTouch,isWebView:Fr.isWebView}},Vr=/^\s*|\s*$/g,qr=function(e){return null===e||void 0===e?"":(""+e).replace(Vr,"")},$r=function(e,t){return t?"array"===t&&Rn(e)?!0:typeof e===t:void 0!==e},Wr=function(e,t,n){var r;for(e=e||[],t=t||",","string"==typeof e&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n},Kr=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Xr=function(e,t,n){var r,o,i,a=this,u=0;e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e);var c=e[3].match(/(^|\.)(\w+)$/i)[2],s=a.createNS(e[3].replace(/\.\w+$/,""),n);if(!s[c]){if("static"===e[2])return s[c]=t,void(this.onCreate&&this.onCreate(e[2],e[3],s[c]));t[c]||(t[c]=function(){},u=1),s[c]=t[c],a.extend(s[c].prototype,t),e[5]&&(r=a.resolve(e[5]).prototype,o=e[5].match(/\.(\w+)$/i)[1],i=s[c],s[c]=u?function(){return r[o].apply(this,arguments)}:function(){return this.parent=r[o],i.apply(this,arguments)},s[c].prototype[c]=s[c],a.each(r,function(e,t){s[c].prototype[t]=r[t]}),a.each(t,function(e,t){r[t]?s[c].prototype[t]=function(){return this.parent=r[t],e.apply(this,arguments)}:t!==c&&(s[c].prototype[t]=e)})),a.each(t.static,function(e,t){s[c][t]=e})}},Yr=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++){var o=t[r];for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];void 0!==a&&(e[i]=a)}}return e},Gr=function(e,t,n,r){r=r||this,e&&(n&&(e=e[n]),Dn(e,function(e,o){return t.call(r,e,o,n)===!1?!1:void Gr(e,t,n,r)}))},Jr=function(t,n){var r,o;for(n=n||e.window,t=t.split("."),r=0;r<t.length;r++)o=t[r],n[o]||(n[o]={}),n=n[o];return n},Qr=function(t,n){var r,o;for(n=n||e.window,t=t.split("."),r=0,o=t.length;o>r&&(n=n[t[r]],n);r++);return n},Zr=function(e,t){return!e||$r(e,"array")?e:On(e.split(t||","),qr)},eo=function(e){var t=Hr.cacheSuffix;return t&&(e+=(-1===e.indexOf("?")?"?":"&")+t),e},to={trim:qr,isArray:Rn,is:$r,toArray:An,makeMap:Wr,each:Dn,map:On,grep:Bn,inArray:Pn,hasOwn:Kr,extend:Yr,create:Xr,walk:Gr,createNS:Jr,resolve:Qr,explode:Zr,_addCacheSuffix:eo},no=function(t,n){var r=n||e.document,o=r.createElement("div");if(o.innerHTML=t,!o.hasChildNodes()||o.childNodes.length>1)throw e.console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return io(o.childNodes[0])},ro=function(t,n){var r=n||e.document,o=r.createElement(t);return io(o)},oo=function(t,n){var r=n||e.document,o=r.createTextNode(t);return io(o)},io=function(e){if(null===e||void 0===e)throw new Error("Node cannot be null or undefined");return{dom:yt(e)}},ao=function(e,t,n){var r=e.dom();return Tt.from(r.elementFromPoint(t,n)).map(io)},uo={fromHtml:no,fromTag:ro,fromText:oo,fromDom:io,fromPoint:ao},co=("undefined"!=typeof e.window?e.window:Function("return this;")(),8),so=9,fo=11,lo=1,mo=3,go=function(e){var t=e.dom().nodeName;return t.toLowerCase()},po=function(e){return e.dom().nodeType},ho=function(e){return function(t){return po(t)===e}},vo=function(e){return po(e)===co||"#comment"===go(e)},yo=ho(lo),bo=ho(mo),Co=ho(so),wo=ho(fo),xo=function(e){var t=e.dom().head;if(null===t||void 0===t)throw new Error("Head is not available yet");return uo.fromDom(t)},So=function(e,t){var n=[],r=function(e){return n.push(e),t(e)},o=t(e);do o=o.bind(r);while(o.isSome());return n},No=function(e,t,n){return 0!==(e.compareDocumentPosition(t)&n)},Eo=function(t,n){return No(t,n,e.Node.DOCUMENT_POSITION_CONTAINED_BY)},ko=function(e,t){var n=e.dom();if(n.nodeType!==lo)return!1;var r=n;if(void 0!==r.matches)return r.matches(t);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(t);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(t);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},_o=function(e){return e.nodeType!==lo&&e.nodeType!==so&&e.nodeType!==fo||0===e.childElementCount},To=function(t,n){var r=void 0===n?e.document:n.dom();return _o(r)?[]:Xt(r.querySelectorAll(t),uo.fromDom)},Ro=function(t,n){var r=void 0===n?e.document:n.dom();return _o(r)?Tt.none():Tt.from(r.querySelector(t)).map(uo.fromDom)},Ao=function(e,t){return e.dom()===t.dom()},Do=function(e,t){var n=e.dom(),r=t.dom();return n===r?!1:n.contains(r)},Oo=function(e,t){return Eo(e.dom(),t.dom())},Bo=function(e,t){return Br().browser.isIE()?Oo(e,t):Do(e,t)},Po=function(e){return uo.fromDom(e.dom().ownerDocument)},Lo=function(e){return Co(e)?e:Po(e)},Io=function(e){return uo.fromDom(e.dom().ownerDocument.documentElement)},Mo=function(e){return uo.fromDom(e.dom().ownerDocument.defaultView)},Fo=function(e){return Tt.from(e.dom().parentNode).map(uo.fromDom)},Uo=function(e,t){for(var n=Ut(t)?t:xt,r=e.dom(),o=[];null!==r.parentNode&&void 0!==r.parentNode;){var i=r.parentNode,a=uo.fromDom(i);if(o.push(a),n(a)===!0)break;r=i}return o},zo=function(e){var t=function(t){return Qt(t,function(t){return!Ao(e,t)})};return Fo(e).map($o).map(t).getOr([])},jo=function(e){return Tt.from(e.dom().previousSibling).map(uo.fromDom)},Ho=function(e){return Tt.from(e.dom().nextSibling).map(uo.fromDom)},Vo=function(e){return cn(So(e,jo))},qo=function(e){return So(e,Ho)},$o=function(e){return Xt(e.dom().childNodes,uo.fromDom)},Wo=function(e,t){var n=e.dom().childNodes;return Tt.from(n[t]).map(uo.fromDom)},Ko=function(e){return Wo(e,0)},Xo=function(e){return Wo(e,e.dom().childNodes.length-1)},Yo=function(e){return e.dom().childNodes.length},Go=function(e){return wo(e)},Jo=Ut(e.Element.prototype.attachShadow)&&Ut(e.Node.prototype.getRootNode),Qo=Jo?function(e){return uo.fromDom(e.dom().getRootNode())}:Lo,Zo=function(e){return Go(e)?e:xo(Lo(e))},ei=function(e){var t=Qo(e);return Go(t)?Tt.some(t):Tt.none()},ti=function(e){return uo.fromDom(e.dom().host)},ni=function(e,t){var n=Fo(e);n.each(function(n){n.dom().insertBefore(t.dom(),e.dom())})},ri=function(e,t){var n=Ho(e);n.fold(function(){var n=Fo(e);n.each(function(e){ii(e,t)})},function(e){ni(e,t)})},oi=function(e,t){var n=Ko(e);n.fold(function(){ii(e,t)},function(n){e.dom().insertBefore(t.dom(),n.dom())})},ii=function(e,t){e.dom().appendChild(t.dom())},ai=function(e,t){ni(e,t),ii(t,e)},ui=function(e,t){Yt(t,function(t){ni(e,t)})},ci=function(e,t){Yt(t,function(t){ii(e,t)})},si=function(e){e.dom().textContent="",Yt($o(e),function(e){fi(e)})},fi=function(e){var t=e.dom();null!==t.parentNode&&t.parentNode.removeChild(t)},li=function(e){var t=$o(e);t.length>0&&ui(e,t),fi(e)},di=function(e){var t=bo(e)?e.dom().parentNode:e.dom();return void 0===t||null===t||null===t.ownerDocument?!1:ei(uo.fromDom(t)).fold(function(){return t.ownerDocument.body.contains(t)},vt(di,ti))},mi=function(e,t){var n=function(n,r){return mi(e+n,t+r)};return{left:yt(e),top:yt(t),translate:n}},gi=mi,pi=function(e){var t=e.getBoundingClientRect();return gi(t.left,t.top)},hi=function(e,t){return void 0!==e?e:void 0!==t?t:0},vi=function(e){var t=e.dom().ownerDocument,n=t.body,r=t.defaultView,o=t.documentElement;if(n===e.dom())return gi(n.offsetLeft,n.offsetTop);var i=hi(r.pageYOffset,o.scrollTop),a=hi(r.pageXOffset,o.scrollLeft),u=hi(o.clientTop,n.clientTop),c=hi(o.clientLeft,n.clientLeft);return yi(e).translate(a-c,i-u)},yi=function(e){var t=e.dom(),n=t.ownerDocument,r=n.body;return r===t?gi(r.offsetLeft,r.offsetTop):di(e)?pi(t):gi(0,0)},bi=function(t){var n=void 0!==t?t.dom():e.document,r=n.body.scrollLeft||n.documentElement.scrollLeft,o=n.body.scrollTop||n.documentElement.scrollTop;return gi(r,o)},Ci=function(t,n,r){var o=void 0!==r?r.dom():e.document,i=o.defaultView;i.scrollTo(t,n)},wi=function(e,t){var n=Br().browser.isSafari();n&&Ut(e.dom().scrollIntoViewIfNeeded)?e.dom().scrollIntoViewIfNeeded(!1):e.dom().scrollIntoView(t)},xi=function(t){var n=void 0===t?e.window:t;return Tt.from(n.visualViewport)},Si=function(e,t,n,r){return{x:e,y:t,width:n,height:r,right:e+n,bottom:t+r}},Ni=function(t){var n=void 0===t?e.window:t,r=n.document,o=bi(uo.fromDom(r));return xi(n).fold(function(){var e=n.document.documentElement,t=e.clientWidth,r=e.clientHeight;return Si(o.left(),o.top(),t,r)},function(e){return Si(Math.max(e.pageLeft,o.left()),Math.max(e.pageTop,o.top()),e.width,e.height)})},Ei=function(e){return function(t){return!!t&&t.nodeType===e}},ki=function(e){return!!e&&!Object.getPrototypeOf(e)},_i=Ei(1),Ti=function(e){var t=e.map(function(e){return e.toLowerCase()});return function(e){if(e&&e.nodeName){var n=e.nodeName.toLowerCase();return Wt(t,n)}return!1}},Ri=function(e,t){var n=t.toLowerCase().split(" ");return function(t){var r,o;if(_i(t))for(r=0;r<n.length;r++){var i=t.ownerDocument.defaultView.getComputedStyle(t,null);if(o=i?i.getPropertyValue(e):null,o===n[r])return!0}return!1}},Ai=function(e){return function(t){return _i(t)&&t.hasAttribute(e)}},Di=function(e,t){return function(n){return _i(n)&&n.getAttribute(e)===t}},Oi=function(e){return _i(e)&&e.hasAttribute("data-mce-bogus")},Bi=function(e){return _i(e)&&"all"===e.getAttribute("data-mce-bogus")},Pi=function(e){return _i(e)&&"TABLE"===e.tagName},Li=function(e){return function(t){if(_i(t)){if(t.contentEditable===e)return!0;if(t.getAttribute("data-mce-contenteditable")===e)return!0}return!1}},Ii=Ti(["textarea","input"]),Mi=Ei(3),Fi=Ei(8),Ui=Ei(9),zi=Ei(11),ji=Ti(["br"]),Hi=Li("true"),Vi=Li("false"),qi=function(e){return void 0!==e.style&&Ut(e.style.getPropertyValue)},$i=function(t,n,r){if(!(Bt(r)||Mt(r)||zt(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+"")},Wi=function(e,t,n){$i(e.dom(),t,n)},Ki=function(e,t){var n=e.dom();vn(t,function(e,t){$i(n,t,e)})},Xi=function(e,t){var n=e.dom().getAttribute(t);return null===n?void 0:n},Yi=function(e,t){return Tt.from(Xi(e,t))},Gi=function(e,t){var n=e.dom();return n&&n.hasAttribute?n.hasAttribute(t):!1},Ji=function(e,t){e.dom().removeAttribute(t)},Qi=function(e){return en(e.dom().attributes,function(e,t){return e[t.name]=t.value,e},{})},Zi=function(t,n){var r=t.dom(),o=e.window.getComputedStyle(r),i=o.getPropertyValue(n);return""!==i||di(t)?i:ea(r,n)},ea=function(e,t){return qi(e)?e.style.getPropertyValue(t):""},ta=function(e,t){var n=e.dom(),r=ea(n,t);return Tt.from(r).filter(function(e){return e.length>0})},na=function(e){var t={},n=e.dom();if(qi(n))for(var r=0;r<n.style.length;r++){var o=n.style.item(r);t[o]=n.style[o]}return t},ra=function(e){return e.dom().offsetWidth},oa=Br().browser,ia=function(e){return nn(e,yo)},aa=function(e){return oa.isFirefox()&&"table"===go(e)?ia($o(e)).filter(function(e){return"caption"===go(e)}).bind(function(e){return ia(qo(e)).map(function(t){var n=t.dom().offsetTop,r=e.dom().offsetTop,o=e.dom().offsetHeight;return r>=n?-o:0})}).getOr(0):0},ua=function(e,t){return e.children&&Wt(e.children,t)},ca=function(e,t,n){var r,o,i=0,a=0,u=e.ownerDocument;if(n=n?n:e,t){if(n===e&&t.getBoundingClientRect&&"static"===Zi(uo.fromDom(e),"position"))return o=t.getBoundingClientRect(),i=o.left+(u.documentElement.scrollLeft||e.scrollLeft)-u.documentElement.clientLeft,a=o.top+(u.documentElement.scrollTop||e.scrollTop)-u.documentElement.clientTop,{x:i,y:a};for(r=t;r&&r!==n&&r.nodeType&&!ua(r,n);)i+=r.offsetLeft||0,a+=r.offsetTop||0,r=r.offsetParent;for(r=t.parentNode;r&&r!==n&&r.nodeType&&!ua(r,n);)i-=r.scrollLeft||0,a-=r.scrollTop||0,r=r.parentNode;a+=aa(uo.fromDom(t))}return{x:i,y:a}},sa=["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"],fa=["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param","embed","source","wbr","track"],la=["td","th"],da=["thead","tbody","tfoot"],ma=["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"],ga=["h1","h2","h3","h4","h5","h6"],pa=["li","dd","dt"],ha=["ul","ol","dl"],va=["pre","script","textarea","style"],ya=function(e){var t;return function(n){return t=t?t:fn(e,yt(!0)),t.hasOwnProperty(go(n))}},ba=ya(ga),Ca=ya(sa),wa=function(e){return"table"===go(e)},xa=function(e){return yo(e)&&!Ca(e)},Sa=function(e){return yo(e)&&"br"===go(e)},Na=ya(ma),Ea=ya(ha),ka=ya(pa),_a=ya(fa),Ta=ya(da),Ra=ya(la),Aa=ya(va),Da=function(e){var t=e.previousSibling&&"SPAN"===e.previousSibling.nodeName,n=e.nextSibling&&"SPAN"===e.nextSibling.nodeName;return t&&n},Oa=function(e){return e&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},Ba=function(e,t){var n,r=t.childNodes;if(!_i(t)||!Oa(t)){for(n=r.length-1;n>=0;n--)Ba(e,r[n]);if(Ui(t)===!1){if(Mi(t)&&t.nodeValue.length>0){var o=to.trim(t.nodeValue).length;if(e.isBlock(t.parentNode)||o>0)return;if(0===o&&Da(t))return}else if(_i(t)&&(r=t.childNodes,1===r.length&&Oa(r[0])&&t.parentNode.insertBefore(r[0],t),r.length||_a(uo.fromDom(t))))return;e.remove(t)}return t}},Pa=to.makeMap,La=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ia=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ma=/[<>&\"\']/g,Fa=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,Ua={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:"Ÿ"},za={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},ja={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},Ha=function(e){var t=uo.fromTag("div").dom();return t.innerHTML=e,t.textContent||t.innerText||e},Va=function(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)),za[r]||(o="&"+e[n+1]+";",i[r]=o,i[o]=r);return i}},qa=Va("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),$a=function(e,t){return e.replace(t?La:Ia,function(e){return za[e]||e})},Wa=function(e){return(""+e).replace(Ma,function(e){return za[e]||e})},Ka=function(e,t){return e.replace(t?La:Ia,function(e){return e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":za[e]||"&#"+e.charCodeAt(0)+";"})},Xa=function(e,t,n){return n=n||qa,e.replace(t?La:Ia,function(e){return za[e]||n[e]||e})},Ya=function(e,t){var n=Va(t)||qa,r=function(e,t){return e.replace(t?La:Ia,function(e){return void 0!==za[e]?za[e]:void 0!==n[e]?n[e]:e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":"&#"+e.charCodeAt(0)+";"})},o=function(e,t){return Xa(e,t,n)},i=Pa(e.replace(/\+/g,","));return i.named&&i.numeric?r:i.named?t?o:Xa:i.numeric?Ka:$a},Ga=function(e){return e.replace(Fa,function(e,t){return t?(t="x"===t.charAt(0).toLowerCase()?parseInt(t.substr(1),16):parseInt(t,10),t>65535?(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))):Ua[t]||String.fromCharCode(t)):ja[e]||qa[e]||Ha(e)})},Ja={encodeRaw:$a,encodeAllRaw:Wa,encodeNumeric:Ka,encodeNamed:Xa,getEncodeFunc:Ya,decode:Ga},Qa={},Za={},eu=to.makeMap,tu=to.each,nu=to.extend,ru=to.explode,ou=to.inArray,iu=function(e,t){return e=to.trim(e),e?e.split(t||" "):[]},au=function(e){var t,n,r,o,i,a,u={},c=function(e,n,r){var o,i,a,c=function(e,t){var n,r,o={};for(n=0,r=e.length;r>n;n++)o[e[n]]=t||{};return o};for(r=r||[],n=n||"","string"==typeof r&&(r=iu(r)),e=iu(e),o=e.length;o--;)i=iu([t,n].join(" ")),a={attributes:c(i),attributesOrder:i,children:c(r,Za)},u[e[o]]=a},s=function(e,t){var n,r,o,i;
for(e=iu(e),n=e.length,t=iu(t);n--;)for(r=u[e[n]],o=0,i=t.length;i>o;o++)r.attributes[t[o]]={},r.attributesOrder.push(t[o])};return Qa[e]?Qa[e]:(t="id accesskey class dir lang style tabindex title role",n="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",r="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&&(t+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",n+=" article aside details dialog figure main header footer hgroup section nav",r+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!==e&&(t+=" xml:lang",a="acronym applet basefont big font strike tt",r=[r,a].join(" "),tu(iu(a),function(e){c(e,"",r)}),i="center dir isindex noframes",n=[n,i].join(" "),o=[n,r].join(" "),tu(iu(i),function(e){c(e,"",o)})),o=o||[n,r].join(" "),c("html","manifest","head body"),c("head","","base command link meta noscript script style title"),c("title hr noscript br"),c("base","href target"),c("link","href rel media hreflang type sizes hreflang"),c("meta","name http-equiv content charset"),c("style","media type scoped"),c("script","src async defer type charset"),c("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",o),c("address dt dd div caption","",o),c("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","",r),c("blockquote","cite",o),c("ol","reversed start type","li"),c("ul","","li"),c("li","value",o),c("dl","","dt dd"),c("a","href target rel media hreflang type",r),c("q","cite",r),c("ins del","cite datetime",o),c("img","src sizes srcset alt usemap ismap width height"),c("iframe","src name width height",o),c("embed","src type width height"),c("object","data type typemustmatch name usemap form width height",[o,"param"].join(" ")),c("param","name value"),c("map","name",[o,"area"].join(" ")),c("area","alt coords shape href target rel media hreflang type"),c("table","border","caption colgroup thead tfoot tbody tr"+("html4"===e?" col":"")),c("colgroup","span","col"),c("col","span"),c("tbody thead tfoot","","tr"),c("tr","","td th"),c("td","colspan rowspan headers",o),c("th","colspan rowspan headers scope abbr",o),c("form","accept-charset action autocomplete enctype method name novalidate target",o),c("fieldset","disabled form name",[o,"legend"].join(" ")),c("label","form for",r),c("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"),c("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===e?o:r),c("select","disabled form multiple name required size","option optgroup"),c("optgroup","disabled label","option"),c("option","disabled label selected value"),c("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),c("menu","type label",[o,"li"].join(" ")),c("noscript","",o),"html4"!==e&&(c("wbr"),c("ruby","",[r,"rt rp"].join(" ")),c("figcaption","",o),c("mark rt rp summary bdi","",r),c("canvas","width height",o),c("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[o,"track source"].join(" ")),c("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[o,"track source"].join(" ")),c("picture","","img source"),c("source","src srcset type media sizes"),c("track","kind src srclang label default"),c("datalist","",[r,"option"].join(" ")),c("article section nav aside main header footer","",o),c("hgroup","","h1 h2 h3 h4 h5 h6"),c("figure","",[o,"figcaption"].join(" ")),c("time","datetime",r),c("dialog","open",o),c("command","type label icon disabled checked radiogroup command"),c("output","for form name",r),c("progress","value max",r),c("meter","value min max low high optimum",r),c("details","open",[o,"summary"].join(" ")),c("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!==e&&(s("script","language xml:space"),s("style","xml:space"),s("object","declare classid code codebase codetype archive standby align border hspace vspace"),s("embed","align name hspace vspace"),s("param","valuetype type"),s("a","charset name rev shape coords"),s("br","clear"),s("applet","codebase archive code object alt name width height align hspace vspace"),s("img","name longdesc align border hspace vspace"),s("iframe","longdesc frameborder marginwidth marginheight scrolling align"),s("font basefont","size color face"),s("input","usemap align"),s("select"),s("textarea"),s("h1 h2 h3 h4 h5 h6 div p legend caption","align"),s("ul","type compact"),s("li","type"),s("ol dl menu dir","compact"),s("pre","width xml:space"),s("hr","align noshade size width"),s("isindex","prompt"),s("table","summary width frame rules cellspacing cellpadding align bgcolor"),s("col","width align char charoff valign"),s("colgroup","width align char charoff valign"),s("thead","align char charoff valign"),s("tr","align char charoff valign bgcolor"),s("th","axis align char charoff valign nowrap bgcolor width height"),s("form","accept"),s("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),s("tfoot","align char charoff valign"),s("tbody","align char charoff valign"),s("area","nohref"),s("body","background bgcolor text link vlink alink")),"html4"!==e&&(s("input button select textarea","autofocus"),s("input textarea","placeholder"),s("a","download"),s("link script img","crossorigin"),s("img","loading"),s("iframe","sandbox seamless allowfullscreen loading")),tu(iu("a form meter progress dfn"),function(e){u[e]&&delete u[e].children[e]}),delete u.caption.children.table,delete u.script,Qa[e]=u,u)},uu=function(e,t){var n;return e&&(n={},"string"==typeof e&&(e={"*":e}),tu(e,function(e,r){n[r]=n[r.toUpperCase()]="map"===t?eu(e,/[, ]/):ru(e,/[, ]/)})),n},cu="",su=" ",fu=function(e){return e===cu},lu=function(e){return e.replace(/\uFEFF/g,"")},du=function(e,t,n,r){var o=function(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e};return"#"+o(t)+o(n)+o(r)},mu=function(e,t){var n,r,o,i=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,a=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,u=/\s*([^:]+):\s*([^;]+);?/g,c=/\s+$/,s={},f=cu;e=e||{},t&&(r=t.getValidStyles(),o=t.getInvalidStyles());var l=("\\\" \\' \\; \\: ; : "+f).split(" ");for(n=0;n<l.length;n++)s[l[n]]=f+n,s[f+n]=l[n];return{toHex:function(e){return e.replace(i,du)},parse:function(t){var r,o,l,d,m={},g=e.url_converter,p=e.url_converter_scope||this,h=function(e,t,r){var o=m[e+"-top"+t];if(o){var i=m[e+"-right"+t];if(i){var a=m[e+"-bottom"+t];if(a){var u=m[e+"-left"+t];if(u){var c=[o,i,a,u];for(n=c.length-1;n--&&c[n]===c[n+1];);n>-1&&r||(m[e+t]=-1===n?c[0]:c.join(" "),delete m[e+"-top"+t],delete m[e+"-right"+t],delete m[e+"-bottom"+t],delete m[e+"-left"+t])}}}}},v=function(e){var t,n=m[e];if(n){for(n=n.split(" "),t=n.length;t--;)if(n[t]!==n[0])return!1;return m[e]=n[0],!0}},y=function(e,t,n,r){v(t)&&v(n)&&v(r)&&(m[e]=m[t]+" "+m[n]+" "+m[r],delete m[t],delete m[n],delete m[r])},b=function(e){return d=!0,s[e]},C=function(e,t){return d&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return s[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e},w=function(e){return String.fromCharCode(parseInt(e.slice(1),16))},x=function(e){return e.replace(/\\[0-9a-f]+/gi,w)},S=function(t,n,r,o,i,a){if(i=i||a)return i=C(i),"'"+i.replace(/\'/g,"\\'")+"'";if(n=C(n||r||o),!e.allow_script_urls){var u=n.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(u))return"";if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(u))return""}return g&&(n=g.call(p,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"};if(t){for(t=t.replace(/[\u0000-\u001F]/g,""),t=t.replace(/\\[\"\';:\uFEFF]/g,b).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,b)});r=u.exec(t);)if(u.lastIndex=r.index+r[0].length,o=r[1].replace(c,"").toLowerCase(),l=r[2].replace(c,""),o&&l){if(o=x(o),l=x(l),-1!==o.indexOf(f)||-1!==o.indexOf('"'))continue;if(!e.allow_script_urls&&("behavior"===o||/expression\s*\(|\/\*|\*\//.test(l)))continue;"font-weight"===o&&"700"===l?l="bold":("color"===o||"background-color"===o)&&(l=l.toLowerCase()),l=l.replace(i,du),l=l.replace(a,S),m[o]=d?C(l,!0):l}h("border","",!0),h("border","-width"),h("border","-color"),h("border","-style"),h("padding",""),h("margin",""),y("border","border-width","border-style","border-color"),"medium none"===m.border&&delete m.border,"none"===m["border-image"]&&delete m["border-image"]}return m},serialize:function(e,t){var n="",i=function(t){var o,i=r[t];if(i)for(var a=0,u=i.length;u>a;a++)t=i[a],o=e[t],o&&(n+=(n.length>0?" ":"")+t+": "+o+";")},a=function(e,t){var n=o["*"];return n&&n[e]?!1:(n=o[t],!(n&&n[e]))};return t&&r?(i("*"),i(t)):vn(e,function(e,r){!e||o&&!a(r,t)||(n+=(n.length>0?" ":"")+r+": "+e+";")}),n}}},gu="mce-data-",pu=/^(?:mouse|contextmenu)|click/,hu={keyLocation:1,layerX:1,layerY:1,returnValue:1,webkitMovementX:1,webkitMovementY:1,keyIdentifier:1,mozPressure:1},vu=function(e){return e.isDefaultPrevented===bu||e.isDefaultPrevented===yu},yu=function(){return!1},bu=function(){return!0},Cu=function(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r||!1):e.attachEvent&&e.attachEvent("on"+t,n)},wu=function(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r||!1):e.detachEvent&&e.detachEvent("on"+t,n)},xu=function(e,t){if(e.composedPath){var n=e.composedPath();if(n&&n.length>0)return n[0]}return t},Su=function(t,n){var r,o=n||{};for(r in t)hu[r]||(o[r]=t[r]);if(o.target||(o.target=o.srcElement||e.document),Hr.experimentalShadowDom&&(o.target=xu(t,o.target)),t&&pu.test(t.type)&&void 0===t.pageX&&void 0!==t.clientX){var i=o.target.ownerDocument||e.document,a=i.documentElement,u=i.body;o.pageX=t.clientX+(a&&a.scrollLeft||u&&u.scrollLeft||0)-(a&&a.clientLeft||u&&u.clientLeft||0),o.pageY=t.clientY+(a&&a.scrollTop||u&&u.scrollTop||0)-(a&&a.clientTop||u&&u.clientTop||0)}return o.preventDefault=function(){o.isDefaultPrevented=bu,t&&(t.preventDefault?t.preventDefault():t.returnValue=!1)},o.stopPropagation=function(){o.isPropagationStopped=bu,t&&(t.stopPropagation?t.stopPropagation():t.cancelBubble=!0)},o.stopImmediatePropagation=function(){o.isImmediatePropagationStopped=bu,o.stopPropagation()},vu(o)===!1&&(o.isDefaultPrevented=yu,o.isPropagationStopped=yu,o.isImmediatePropagationStopped=yu),"undefined"==typeof o.metaKey&&(o.metaKey=!1),o},Nu=function(e,t,n){var r=e.document,o={type:"ready"};if(n.domLoaded)return void t(o);var i=function(){return"complete"===r.readyState||"interactive"===r.readyState&&r.body},a=function(){wu(e,"DOMContentLoaded",a),wu(e,"load",a),n.domLoaded||(n.domLoaded=!0,t(o))};i()?a():Cu(e,"DOMContentLoaded",a),Cu(e,"load",a)},Eu=function(){function t(){this.domLoaded=!1,this.events={},this.count=1,this.expando=gu+(+new Date).toString(32),this.hasMouseEnterLeave="onmouseenter"in e.document.documentElement,this.hasFocusIn="onfocusin"in e.document.documentElement,this.count=1}return t.prototype.bind=function(t,n,r,o){var i,a,u,c,s,f,l,d=this,m=e.window,g=function(e){d.executeHandlers(Su(e||m.event),i)};if(t&&3!==t.nodeType&&8!==t.nodeType){t[d.expando]?i=t[d.expando]:(i=d.count++,t[d.expando]=i,d.events[i]={}),o=o||t;var p=n.split(" ");for(u=p.length;u--;)c=p[u],f=g,s=l=!1,"DOMContentLoaded"===c&&(c="ready"),d.domLoaded&&"ready"===c&&"complete"===t.readyState?r.call(o,Su({type:c})):(d.hasMouseEnterLeave||(s=d.mouseEnterLeave[c],s&&(f=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=Su(e||m.event),e.type="mouseout"===e.type?"mouseleave":"mouseenter",e.target=t,d.executeHandlers(e,i))})),d.hasFocusIn||"focusin"!==c&&"focusout"!==c||(l=!0,s="focusin"===c?"focus":"blur",f=function(e){e=Su(e||m.event),e.type="focus"===e.type?"focusin":"focusout",d.executeHandlers(e,i)}),a=d.events[i][c],a?"ready"===c&&d.domLoaded?r(Su({type:c})):a.push({func:r,scope:o}):(d.events[i][c]=a=[{func:r,scope:o}],a.fakeName=s,a.capture=l,a.nativeHandler=f,"ready"===c?Nu(t,f,d):Cu(t,s||c,f,l)));return t=a=0,r}},t.prototype.unbind=function(e,t,n){var r,o,i,a,u;if(!e||3===e.nodeType||8===e.nodeType)return this;var c=e[this.expando];if(c){if(u=this.events[c],t){var s=t.split(" ");for(o=s.length;o--;)if(a=s[o],r=u[a]){if(n)for(i=r.length;i--;)if(r[i].func===n){var f=r.nativeHandler,l=r.fakeName,d=r.capture;r=r.slice(0,i).concat(r.slice(i+1)),r.nativeHandler=f,r.fakeName=l,r.capture=d,u[a]=r}n&&0!==r.length||(delete u[a],wu(e,r.fakeName||a,r.nativeHandler,r.capture))}}else vn(u,function(t,n){wu(e,t.fakeName||n,t.nativeHandler,t.capture)}),u={};for(a in u)if(_n(u,a))return this;delete this.events[c];try{delete e[this.expando]}catch(m){e[this.expando]=null}}return this},t.prototype.fire=function(e,t,n){var r;if(!e||3===e.nodeType||8===e.nodeType)return this;var o=Su(null,n);o.type=t,o.target=e;do r=e[this.expando],r&&this.executeHandlers(o,r),e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow;while(e&&!o.isPropagationStopped());return this},t.prototype.clean=function(e){var t,n;if(!e||3===e.nodeType||8===e.nodeType)return this;if(e[this.expando]&&this.unbind(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(this.unbind(e),n=e.getElementsByTagName("*"),t=n.length;t--;)e=n[t],e[this.expando]&&this.unbind(e);return this},t.prototype.destroy=function(){this.events={}},t.prototype.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1},t.prototype.executeHandlers=function(e,t){var n=this.events[t],r=n&&n[e.type];if(r)for(var o=0,i=r.length;i>o;o++){var a=r[o];if(a&&a.func.call(a.scope,e)===!1&&e.preventDefault(),e.isImmediatePropagationStopped())return}},t.Event=new t,t}(),ku="sizzle"+-new Date,_u=e.window.document,Tu=0,Ru=0,Au=a(),Du=a(),Ou=a(),Bu=function(e,t){return e===t&&(Y=!0),0},Pu="undefined",Lu=1<<31,Iu={}.hasOwnProperty,Mu=[],Fu=Mu.pop,Uu=Mu.push,zu=Mu.push,ju=Mu.slice,Hu=Mu.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},Vu="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",qu="[\\x20\\t\\r\\n\\f]",$u="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",Wu="\\["+qu+"*("+$u+")(?:"+qu+"*([*^$|!~]?=)"+qu+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+$u+"))|)"+qu+"*\\]",Ku=":("+$u+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+Wu+")*)|.*)\\)|)",Xu=new RegExp("^"+qu+"+|((?:^|[^\\\\])(?:\\\\.)*)"+qu+"+$","g"),Yu=new RegExp("^"+qu+"*,"+qu+"*"),Gu=new RegExp("^"+qu+"*([>+~]|"+qu+")"+qu+"*"),Ju=new RegExp("="+qu+"*([^\\]'\"]*?)"+qu+"*\\]","g"),Qu=new RegExp(Ku),Zu=new RegExp("^"+$u+"$"),ec={ID:new RegExp("^#("+$u+")"),CLASS:new RegExp("^\\.("+$u+")"),TAG:new RegExp("^("+$u+"|[*])"),ATTR:new RegExp("^"+Wu),PSEUDO:new RegExp("^"+Ku),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+qu+"*(even|odd|(([+-]|)(\\d*)n|)"+qu+"*(?:([+-]|)"+qu+"*(\\d+)|))"+qu+"*\\)|)","i"),bool:new RegExp("^(?:"+Vu+")$","i"),needsContext:new RegExp("^"+qu+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+qu+"*((?:-\\d)?\\d*)"+qu+"*\\)|)(?=[^-]|$)","i")},tc=/^(?:input|select|textarea|button)$/i,nc=/^h\d$/i,rc=/^[^{]+\{\s*\[native \w/,oc=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ic=/[+~]/,ac=/'|\\/g,uc=new RegExp("\\\\([\\da-f]{1,6}"+qu+"?|("+qu+")|.)","ig"),cc=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{zu.apply(Mu=ju.call(_u.childNodes),_u.childNodes),Mu[_u.childNodes.length].nodeType}catch(sc){zu={apply:Mu.length?function(e,t){Uu.apply(e,ju.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}var fc=function(e,t,n,r){var o,i,a,u,c,s,f,l,m,p;if((t?t.ownerDocument||t:_u)!==J&&G(t),t=t||J,n=n||[],!e||"string"!=typeof e)return n;if(1!==(u=t.nodeType)&&9!==u)return[];if(Z&&!r){if(o=oc.exec(e))if(a=o[1]){if(9===u){if(i=t.getElementById(a),!i||!i.parentNode)return n;if(i.id===a)return n.push(i),n}else if(t.ownerDocument&&(i=t.ownerDocument.getElementById(a))&&rt(t,i)&&i.id===a)return n.push(i),n}else{if(o[2])return zu.apply(n,t.getElementsByTagName(e)),n;if((a=o[3])&&z.getElementsByClassName)return zu.apply(n,t.getElementsByClassName(a)),n}if(z.qsa&&(!et||!et.test(e))){if(l=f=ku,m=t,p=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){for(s=q(e),(f=t.getAttribute("id"))?l=f.replace(ac,"\\$&"):t.setAttribute("id",l),l="[id='"+l+"'] ",c=s.length;c--;)s[c]=l+g(s[c]);m=ic.test(e)&&d(t.parentNode)||t,p=s.join(",")}if(p)try{return zu.apply(n,m.querySelectorAll(p)),n}catch(h){}finally{f||t.removeAttribute("id")}}}return W(e.replace(Xu,"$1"),t,n,r)};z=fc.support={},V=fc.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},G=fc.setDocument=function(e){function t(e){try{return e.top}catch(t){}return null}var n,r=e?e.ownerDocument||e:_u,o=r.defaultView;return r!==J&&9===r.nodeType&&r.documentElement?(J=r,Q=r.documentElement,Z=!V(r),o&&o!==t(o)&&(o.addEventListener?o.addEventListener("unload",function(){G()},!1):o.attachEvent&&o.attachEvent("onunload",function(){G()})),z.attributes=!0,z.getElementsByTagName=!0,z.getElementsByClassName=rc.test(r.getElementsByClassName),z.getById=!0,j.find.ID=function(e,t){if(typeof t.getElementById!==Pu&&Z){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},j.filter.ID=function(e){var t=e.replace(uc,cc);return function(e){return e.getAttribute("id")===t}},j.find.TAG=z.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==Pu?t.getElementsByTagName(e):void 0}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},j.find.CLASS=z.getElementsByClassName&&function(e,t){return Z?t.getElementsByClassName(e):void 0},tt=[],et=[],z.disconnectedMatch=!0,et=et.length&&new RegExp(et.join("|")),tt=tt.length&&new RegExp(tt.join("|")),n=rc.test(Q.compareDocumentPosition),rt=n||rc.test(Q.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Bu=n?function(e,t){if(e===t)return Y=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!z.sortDetached&&t.compareDocumentPosition(e)===n?e===r||e.ownerDocument===_u&&rt(_u,e)?-1:t===r||t.ownerDocument===_u&&rt(_u,t)?1:X?Hu.call(X,e)-Hu.call(X,t):0:4&n?-1:1)}:function(e,t){if(e===t)return Y=!0,0;var n,o=0,i=e.parentNode,a=t.parentNode,u=[e],s=[t];if(!i||!a)return e===r?-1:t===r?1:i?-1:a?1:X?Hu.call(X,e)-Hu.call(X,t):0;if(i===a)return c(e,t);for(n=e;n=n.parentNode;)u.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;u[o]===s[o];)o++;return o?c(u[o],s[o]):u[o]===_u?-1:s[o]===_u?1:0},r):J},fc.matches=function(e,t){return fc(e,null,null,t)},fc.matchesSelector=function(e,t){if((e.ownerDocument||e)!==J&&G(e),t=t.replace(Ju,"='$1']"),!(!z.matchesSelector||!Z||tt&&tt.test(t)||et&&et.test(t)))try{var n=nt.call(e,t);if(n||z.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return fc(t,J,null,[e]).length>0},fc.contains=function(e,t){return(e.ownerDocument||e)!==J&&G(e),rt(e,t)},fc.attr=function(e,t){(e.ownerDocument||e)!==J&&G(e);var n=j.attrHandle[t.toLowerCase()],r=n&&Iu.call(j.attrHandle,t.toLowerCase())?n(e,t,!Z):void 0;return void 0!==r?r:z.attributes||!Z?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},fc.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},fc.uniqueSort=function(e){var t,n=[],r=0,o=0;if(Y=!z.detectDuplicates,X=!z.sortStable&&e.slice(0),e.sort(Bu),Y){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return X=null,e},H=fc.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+=H(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=H(t);return n},j=fc.selectors={cacheLength:50,createPseudo:u,match:ec,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(uc,cc),e[3]=(e[3]||e[4]||e[5]||"").replace(uc,cc),"~="===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]||fc.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]&&fc.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return ec.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&Qu.test(n)&&(t=q(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(uc,cc).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=Au[e+" "];return t||(t=new RegExp("(^|"+qu+")"+e+"("+qu+"|$)"))&&Au(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==Pu&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var o=fc.attr(r,e);return null==o?"!="===t:t?(o+="","="===t?o===n:"!="===t?o!==n:"^="===t?n&&0===o.indexOf(n):"*="===t?n&&o.indexOf(n)>-1:"$="===t?n&&o.slice(-n.length)===n:"~="===t?(" "+o+" ").indexOf(n)>-1:"|="===t?o===n||o.slice(0,n.length+1)===n+"-":!1):!0}},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,f,l,d,m,g,p=i!==a?"nextSibling":"previousSibling",h=t.parentNode,v=u&&t.nodeName.toLowerCase(),y=!c&&!u;if(h){if(i){for(;p;){for(l=t;l=l[p];)if(u?l.nodeName.toLowerCase()===v:1===l.nodeType)return!1;g=p="only"===e&&!g&&"nextSibling"}return!0}if(g=[a?h.firstChild:h.lastChild],a&&y){for(f=h[ku]||(h[ku]={}),s=f[e]||[],m=s[0]===Tu&&s[1],d=s[0]===Tu&&s[2],l=m&&h.childNodes[m];l=++m&&l&&l[p]||(d=m=0)||g.pop();)if(1===l.nodeType&&++d&&l===t){f[e]=[Tu,m,d];break}}else if(y&&(s=(t[ku]||(t[ku]={}))[e])&&s[0]===Tu)d=s[1];else for(;(l=++m&&l&&l[p]||(d=m=0)||g.pop())&&((u?l.nodeName.toLowerCase()!==v:1!==l.nodeType)||!++d||(y&&((l[ku]||(l[ku]={}))[e]=[Tu,d]),l!==t)););return d-=o,d===r||d%r===0&&d/r>=0}}},PSEUDO:function(e,t){var n,r=j.pseudos[e]||j.setFilters[e.toLowerCase()]||fc.error("unsupported pseudo: "+e);return r[ku]?r(t):r.length>1?(n=[e,e,"",t],j.setFilters.hasOwnProperty(e.toLowerCase())?u(function(e,n){for(var o,i=r(e,t),a=i.length;a--;)o=Hu.call(e,i[a]),e[o]=!(n[o]=i[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:u(function(e){var t=[],n=[],r=$(e.replace(Xu,"$1"));return r[ku]?u(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:u(function(e){return function(t){return fc(e,t).length>0}}),contains:u(function(e){return e=e.replace(uc,cc),function(t){return(t.textContent||t.innerText||H(t)).indexOf(e)>-1}}),lang:u(function(e){return Zu.test(e||"")||fc.error("unsupported lang: "+e),e=e.replace(uc,cc).toLowerCase(),function(t){var n;do if(n=Z?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.window.location&&e.window.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===Q},focus:function(e){return e===J.activeElement&&(!J.hasFocus||J.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},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,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!j.pseudos.empty(e)},header:function(e){return nc.test(e.nodeName)},input:function(e){return tc.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[0>n?n+t:n]}),even:l(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:l(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:l(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=0>n?n+t:n;++r<t;)e.push(r);return e})}},j.pseudos.nth=j.pseudos.eq,Yt(["radio","checkbox","file","password","image"],function(e){j.pseudos[e]=s(e)}),Yt(["submit","reset"],function(e){j.pseudos[e]=f(e)}),m.prototype=j.filters=j.pseudos,j.setFilters=new m,q=fc.tokenize=function(e,t){var n,r,o,i,a,u,c,s=Du[e+" "];if(s)return t?0:s.slice(0);for(a=e,u=[],c=j.preFilter;a;){(!n||(r=Yu.exec(a)))&&(r&&(a=a.slice(r[0].length)||a),u.push(o=[])),n=!1,(r=Gu.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(Xu," ")}),a=a.slice(n.length));for(i in j.filter)j.filter.hasOwnProperty(i)&&(!(r=ec[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?fc.error(e):Du(e,u).slice(0)},$=fc.compile=function(e,t){var n,r=[],o=[],i=Ou[e+" "];if(!i){for(t||(t=q(e)),n=t.length;n--;)i=C(t[n]),i[ku]?r.push(i):o.push(i);i=Ou(e,w(o,r)),i.selector=e}return i},W=fc.select=function(e,t,n,r){var o,i,a,u,c,s="function"==typeof e&&e,f=!r&&q(e=s.selector||e);if(n=n||[],1===f.length){if(i=f[0]=f[0].slice(0),i.length>2&&"ID"===(a=i[0]).type&&z.getById&&9===t.nodeType&&Z&&j.relative[i[1].type]){if(t=(j.find.ID(a.matches[0].replace(uc,cc),t)||[])[0],!t)return n;s&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(o=ec.needsContext.test(e)?0:i.length;o--&&(a=i[o],!j.relative[u=a.type]);)if((c=j.find[u])&&(r=c(a.matches[0].replace(uc,cc),ic.test(i[0].type)&&d(t.parentNode)||t))){if(i.splice(o,1),e=r.length&&g(i),!e)return zu.apply(n,r),n;break}}return(s||$(e,f))(r,t,!Z,n,ic.test(e)&&d(t.parentNode)||t),n},z.sortStable=ku.split("").sort(Bu).join("")===ku,z.detectDuplicates=!!Y,G(),z.sortDetached=!0;var lc=e.document,dc=Array.prototype.push,mc=Array.prototype.slice,gc=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,pc=Eu.Event,hc=to.makeMap("children,contents,next,prev"),vc=function(e){return"undefined"!=typeof e},yc=function(e){return"string"==typeof e},bc=function(e){return e&&e===e.window},Cc=function(e,t){t=t||lc;var n=t.createElement("div"),r=t.createDocumentFragment();n.innerHTML=e;for(var o;o=n.firstChild;)r.appendChild(o);return r},wc=function(e,t,n,r){var o;if(yc(t))t=Cc(t,Ic(e[0]));else if(t.length&&!t.nodeType){if(t=zc.makeArray(t),r)for(o=t.length-1;o>=0;o--)wc(e,t[o],n,r);else for(o=0;o<t.length;o++)wc(e,t[o],n,r);return e}if(t.nodeType)for(o=e.length;o--;)n.call(e[o],t);return e},xc=function(e,t){return e&&t&&-1!==(" "+e.className+" ").indexOf(" "+t+" ")},Sc=function(e,t,n){var r,o;return t=zc(t)[0],e.each(function(){var e=this;n&&r===e.parentNode?o.appendChild(e):(r=e.parentNode,o=t.cloneNode(!1),e.parentNode.insertBefore(o,e),o.appendChild(e))}),e},Nc=to.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),Ec=to.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),kc={"for":"htmlFor","class":"className",readonly:"readOnly"},_c={"float":"cssFloat"},Tc={},Rc={},Ac=function(e,t){return new zc.fn.init(e,t)},Dc=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},Oc=/^\s*|\s*$/g,Bc=function(e){return null===e||void 0===e?"":(""+e).replace(Oc,"")},Pc=function(e,t){var n,r,o,i;if(e)if(n=e.length,void 0===n){for(r in e)if(e.hasOwnProperty(r)&&(i=e[r],t.call(i,r,i)===!1))break}else for(o=0;n>o&&(i=e[o],t.call(i,o,i)!==!1);o++);return e},Lc=function(e,t){var n=[];return Pc(e,function(e,r){t(r,e)&&n.push(r)}),n},Ic=function(e){return e?9===e.nodeType?e:e.ownerDocument:lc};Ac.fn=Ac.prototype={constructor:Ac,selector:"",context:null,length:0,init:function(t,n){var r,o,i=this;if(!t)return i;if(t.nodeType)return i.context=i[0]=t,i.length=1,i;if(n&&n.nodeType)i.context=n;else{if(n)return zc(t).attr(n);i.context=n=e.document}if(yc(t)){if(i.selector=t,r="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:gc.exec(t),!r)return zc(n).find(t);if(r[1])for(o=Cc(t,Ic(n)).firstChild;o;)dc.call(i,o),o=o.nextSibling;else{if(o=Ic(n).getElementById(r[2]),!o)return i;if(o.id!==r[2])return i.find(t);i.length=1,i[0]=o}}else this.add(t,!1);return i},toArray:function(){return to.toArray(this)},add:function(e,t){var n,r,o=this;if(yc(e))return o.add(zc(e));if(t!==!1)for(n=zc.unique(o.toArray().concat(zc.makeArray(e))),o.length=n.length,r=0;r<n.length;r++)o[r]=n[r];else dc.apply(o,zc.makeArray(e));return o},attr:function(e,t){var n,r=this;if("object"==typeof e)Pc(e,function(e,t){r.attr(e,t)});else{if(!vc(t)){if(r[0]&&1===r[0].nodeType){if(n=Tc[e],n&&n.get)return n.get(r[0],e);if(Ec[e])return r.prop(e)?e:void 0;t=r[0].getAttribute(e,2),null===t&&(t=void 0)}return t}this.each(function(){var n;if(1===this.nodeType){if(n=Tc[e],n&&n.set)return void n.set(this,t);null===t?this.removeAttribute(e,2):this.setAttribute(e,t,2)}})}return r},removeAttr:function(e){return this.attr(e,null)},prop:function(e,t){var n=this;if(e=kc[e]||e,"object"==typeof e)Pc(e,function(e,t){n.prop(e,t)});else{if(!vc(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){var n,r,o=this,i=function(e){return e.replace(/-(\D)/g,function(e,t){return t.toUpperCase()})},a=function(e){return e.replace(/[A-Z]/g,function(e){return"-"+e})};if("object"==typeof e)Pc(e,function(e,t){o.css(e,t)});else if(vc(t))e=i(e),"number"!=typeof t||Nc[e]||(t=t.toString()+"px"),o.each(function(){var n=this.style;if(r=Rc[e],r&&r.set)return void r.set(this,t);try{this.style[_c[e]||e]=t}catch(o){}(null===t||""===t)&&(n.removeProperty?n.removeProperty(a(e)):n.removeAttribute(e))});else{if(n=o[0],r=Rc[e],r&&r.get)return r.get(n);if(!n.ownerDocument.defaultView)return n.currentStyle?n.currentStyle[i(e)]:"";try{return n.ownerDocument.defaultView.getComputedStyle(n,null).getPropertyValue(a(e))}catch(u){return void 0}}return o},remove:function(){for(var e,t=this,n=this.length;n--;)e=t[n],pc.clean(e),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var e,t=this,n=this.length;n--;)for(e=t[n];e.firstChild;)e.removeChild(e.firstChild);return this},html:function(e){var t,n=this;if(vc(e)){t=n.length;try{for(;t--;)n[t].innerHTML=e}catch(r){zc(n[t]).empty().append(e)}return n}return n[0]?n[0].innerHTML:""},text:function(e){var t,n=this;if(vc(e)){for(t=n.length;t--;)"innerText"in n[t]?n[t].innerText=e:n[0].textContent=e;return n}return n[0]?n[0].innerText||n[0].textContent:""},append:function(){return wc(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(e)})},prepend:function(){return wc(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.insertBefore(e,this.firstChild)
},!0)},before:function(){var e=this;return e[0]&&e[0].parentNode?wc(e,arguments,function(e){this.parentNode.insertBefore(e,this)}):e},after:function(){var e=this;return e[0]&&e[0].parentNode?wc(e,arguments,function(e){this.parentNode.insertBefore(e,this.nextSibling)},!0):e},appendTo:function(e){return zc(e).append(this),this},prependTo:function(e){return zc(e).prepend(this),this},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){return Sc(this,e)},wrapAll:function(e){return Sc(this,e,!0)},wrapInner:function(e){return this.each(function(){zc(this).contents().wrapAll(e)}),this},unwrap:function(){return this.parent().each(function(){zc(this).replaceWith(this.childNodes)})},clone:function(){var e=[];return this.each(function(){e.push(this.cloneNode(!0))}),zc(e)},addClass:function(e){return this.toggleClass(e,!0)},removeClass:function(e){return this.toggleClass(e,!1)},toggleClass:function(e,t){var n=this;return"string"!=typeof e?n:(-1!==e.indexOf(" ")?Pc(e.split(" "),function(){n.toggleClass(this,t)}):n.each(function(n,r){var o=xc(r,e);if(o!==t){var i=r.className;o?r.className=Bc((" "+i+" ").replace(" "+e+" "," ")):r.className+=i?" "+e:e}}),n)},hasClass:function(e){return xc(this[0],e)},each:function(e){return Pc(this,e)},on:function(e,t){return this.each(function(){pc.bind(this,e,t)})},off:function(e,t){return this.each(function(){pc.unbind(this,e,t)})},trigger:function(e){return this.each(function(){"object"==typeof e?pc.fire(this,e.type,e):pc.fire(this,e)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return new zc(mc.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(e){var t,n,r=[];for(t=0,n=this.length;n>t;t++)zc.find(e,this[t],r);return zc(r)},filter:function(e){return zc("function"==typeof e?Lc(this.toArray(),function(t,n){return e(n,t)}):zc.filter(e,this.toArray()))},closest:function(e){var t=[];return e instanceof zc&&(e=e[0]),this.each(function(n,r){for(;r;){if("string"==typeof e&&zc(r).is(e)){t.push(r);break}if(r===e){t.push(r);break}r=r.parentNode}}),zc(t)},offset:function(e){var t,n,r,o,i=0,a=0;return e?this.css(e):(t=this[0],t&&(n=t.ownerDocument,r=n.documentElement,t.getBoundingClientRect&&(o=t.getBoundingClientRect(),i=o.left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,a=o.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:a})},push:dc,sort:Array.prototype.sort,splice:Array.prototype.splice},to.extend(Ac,{extend:to.extend,makeArray:function(e){return bc(e)||e.nodeType?[e]:to.toArray(e)},inArray:Dc,isArray:to.isArray,each:Pc,trim:Bc,grep:Lc,find:fc,expr:fc.selectors,unique:fc.uniqueSort,text:fc.getText,contains:fc.contains,filter:function(e,t,n){var r=t.length;for(n&&(e=":not("+e+")");r--;)1!==t[r].nodeType&&t.splice(r,1);return t=1===t.length?zc.find.matchesSelector(t[0],e)?[t[0]]:[]:zc.find.matches(e,t)}});var Mc=function(e,t,n){var r=[],o=e[t];for("string"!=typeof n&&n instanceof zc&&(n=n[0]);o&&9!==o.nodeType;){if(void 0!==n){if(o===n)break;if("string"==typeof n&&zc(o).is(n))break}1===o.nodeType&&r.push(o),o=o[t]}return r},Fc=function(e,t,n,r){var o=[];for(r instanceof zc&&(r=r[0]);e;e=e[t])if(!n||e.nodeType===n){if(void 0!==r){if(e===r)break;if("string"==typeof r&&zc(e).is(r))break}o.push(e)}return o},Uc=function(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType===n)return e;return null};Pc({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Mc(e,"parentNode")},next:function(e){return Uc(e,"nextSibling",1)},prev:function(e){return Uc(e,"previousSibling",1)},children:function(e){return Fc(e.firstChild,"nextSibling",1)},contents:function(e){return to.toArray(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(e,t){Ac.fn[e]=function(n){var r=this,o=[];r.each(function(){var e=t.call(o,this,n,o);e&&(zc.isArray(e)?o.push.apply(o,e):o.push(e))}),this.length>1&&(hc[e]||(o=zc.unique(o)),0===e.indexOf("parents")&&(o=o.reverse()));var i=zc(o);return n?i.filter(n):i}}),Pc({parentsUntil:function(e,t){return Mc(e,"parentNode",t)},nextUntil:function(e,t){return Fc(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return Fc(e,"previousSibling",1,t).slice(1)}},function(e,t){Ac.fn[e]=function(n,r){var o=this,i=[];o.each(function(){var e=t.call(i,this,n,i);e&&(zc.isArray(e)?i.push.apply(i,e):i.push(e))}),this.length>1&&(i=zc.unique(i),(0===e.indexOf("parents")||"prevUntil"===e)&&(i=i.reverse()));var a=zc(i);return r?a.filter(r):a}}),Ac.fn.is=function(e){return!!e&&this.filter(e).length>0},Ac.fn.init.prototype=Ac.fn,Ac.overrideDefaults=function(e){var t,n=function(r,o){return t=t||e(),0===arguments.length&&(r=t.element),o||(o=t.context),new n.fn.init(r,o)};return zc.extend(n,this),n},Ac.attrHooks=Tc,Ac.cssHooks=Rc;var zc=Ac,jc=function(){function e(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)}return e.prototype.current=function(){return this.node},e.prototype.next=function(e){return this.node=this.findSibling(this.node,"firstChild","nextSibling",e),this.node},e.prototype.prev=function(e){return this.node=this.findSibling(this.node,"lastChild","previousSibling",e),this.node},e.prototype.prev2=function(e){return this.node=this.findPreviousNode(this.node,"lastChild","previousSibling",e),this.node},e.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}}},e.prototype.findPreviousNode=function(e,t,n,r){var o,i,a;if(e){if(o=e[n],this.rootNode&&o===this.rootNode)return;if(o){if(!r)for(a=o[t];a;a=a[t])if(!a[t])return a;return o}if(i=e.parentNode,i&&i!==this.rootNode)return i}},e}(),Hc={},Vc={exports:Hc};!function(e,t,n,r){!function(r){if("object"==typeof t&&"undefined"!=typeof n)n.exports=r();else if("function"==typeof e&&e.amd)e([],r);else{var o;o="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,o.EphoxContactWrapper=r()}}(function(){return function(){function e(t,n,o){function i(u,c){if(!n[u]){if(!t[u]){var s="function"==typeof r&&r;if(!c&&s)return s(u,!0);if(a)return a(u,!0);var f=new Error("Cannot find module '"+u+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[u]={exports:{}};t[u][0].call(l.exports,function(e){var n=t[u][1][e];return i(n||e)},l,l.exports,e,t,n,o)}return n[u].exports}for(var a="function"==typeof r&&r,u=0;u<o.length;u++)i(o[u]);return i}return e}()({1:[function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(f===setTimeout)return setTimeout(e,0);if((f===n||!f)&&setTimeout)return f=setTimeout,setTimeout(e,0);try{return f(e,0)}catch(t){try{return f.call(null,e,0)}catch(t){return f.call(this,e,0)}}}function i(e){if(l===clearTimeout)return clearTimeout(e);if((l===r||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(e);try{return l(e)}catch(t){try{return l.call(null,e)}catch(t){return l.call(this,e)}}}function a(){p&&m&&(p=!1,m.length?g=m.concat(g):h=-1,g.length&&u())}function u(){if(!p){var e=o(a);p=!0;for(var t=g.length;t;){for(m=g,g=[];++h<t;)m&&m[h].run();h=-1,t=g.length}m=null,p=!1,i(e)}}function c(e,t){this.fun=e,this.array=t}function s(){}var f,l,d=t.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:n}catch(e){f=n}try{l="function"==typeof clearTimeout?clearTimeout:r}catch(e){l=r}}();var m,g=[],p=!1,h=-1;d.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];g.push(new c(e,t)),1!==g.length||p||o(u)},c.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=s,d.addListener=s,d.once=s,d.off=s,d.removeListener=s,d.removeAllListeners=s,d.emit=s,d.prependListener=s,d.prependOnceListener=s,d.listeners=function(){return[]},d.binding=function(){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},{}],2:[function(e,t){(function(e){!function(n){function r(){}function o(e,t){return function(){e.apply(t,arguments)}}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=void 0,this._deferreds=[],l(e,this)}function a(e,t){for(;3===e._state;)e=e._value;return 0===e._state?void e._deferreds.push(t):(e._handled=!0,void i._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null===n)return void(1===e._state?u:c)(t.promise,e._value);var r;try{r=n(e._value)}catch(o){return void c(t.promise,o)}u(t.promise,r)}))}function u(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(o(n,t),e)}e._state=1,e._value=t,s(e)}catch(r){c(e,r)}}function c(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;n>t;t++)a(e,e._deferreds[t]);e._deferreds=null}function f(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,u(t,e))},function(e){n||(n=!0,c(t,e))})}catch(r){if(n)return;n=!0,c(t,r)}}var d=setTimeout;i.prototype["catch"]=function(e){return this.then(null,e)},i.prototype.then=function(e,t){var n=new this.constructor(r);return a(this,new f(e,t,n)),n},i.all=function(e){var t=Array.prototype.slice.call(e);return new i(function(e,n){function r(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){r(i,e)},n)}t[i]=a,0===--o&&e(t)}catch(c){n(c)}}if(0===t.length)return e([]);for(var o=t.length,i=0;i<t.length;i++)r(i,t[i])})},i.resolve=function(e){return e&&"object"==typeof e&&e.constructor===i?e:new i(function(t){t(e)})},i.reject=function(e){return new i(function(t,n){n(e)})},i.race=function(e){return new i(function(t,n){for(var r=0,o=e.length;o>r;r++)e[r].then(t,n)})},i._immediateFn="function"==typeof e?function(t){e(t)}:function(e){d(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},"undefined"!=typeof t&&t.exports?t.exports=i:n.Promise||(n.Promise=i)}(this)}).call(this,e("timers").setImmediate)},{timers:3}],3:[function(e,t,n){(function(t,r){function o(e,t){this._id=e,this._clearFn=t}var i=e("process/browser.js").nextTick,a=Function.prototype.apply,u=Array.prototype.slice,c={},s=0;n.setTimeout=function(){return new o(a.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new o(a.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},o.prototype.unref=o.prototype.ref=function(){},o.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;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n.setImmediate="function"==typeof t?t:function(e){var t=s++,r=arguments.length<2?!1:u.call(arguments,1);return c[t]=!0,i(function(){c[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))}),t},n.clearImmediate="function"==typeof r?r:function(e){delete c[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(e,t){var n=e("promise-polyfill"),r=function(){return"undefined"!=typeof window?window:Function("return this;")()}();t.exports={boltExport:r.Promise||n}},{"promise-polyfill":2}]},{},[4])(4)})}(void 0,Hc,Vc,void 0);var qc,$c=Vc.exports.boltExport,Wc=function(t){var n=Tt.none(),r=[],o=function(e){return Wc(function(t){i(function(n){t(e(n))})})},i=function(e){u()?s(e):r.push(e)},a=function(e){u()||(n=Tt.some(e),c(r),r=[])},u=function(){return n.isSome()},c=function(e){Yt(e,s)},s=function(t){n.each(function(n){e.setTimeout(function(){t(n)},0)})};return t(a),{get:i,map:o,isReady:u}},Kc=function(e){return Wc(function(t){t(e)})},Xc={nu:Wc,pure:Kc},Yc=function(t){e.setTimeout(function(){throw t},0)},Gc=function(e){var t=function(t){e().then(t,Yc)},n=function(t){return Gc(function(){return e().then(t)})},r=function(t){return Gc(function(){return e().then(function(e){return t(e).toPromise()})})},o=function(t){return Gc(function(){return e().then(function(){return t.toPromise()})})},i=function(){return Xc.nu(t)},a=function(){var t=null;return Gc(function(){return null===t&&(t=e()),t})},u=e;return{map:n,bind:r,anonBind:o,toLazy:i,toCached:a,toPromise:u,get:t}},Jc=function(e){return Gc(function(){return new $c(e)})},Qc=function(e){return Gc(function(){return $c.resolve(e)})},Zc={nu:Jc,pure:Qc},es=function(e,t){return t(function(t){var n=[],r=0,o=function(o){return function(i){n[o]=i,r++,r>=e.length&&t(n)}};0===e.length?t([]):Yt(e,function(e,t){e.get(o(t))})})},ts=function(e){return es(e,Zc.nu)},ns=function(e){var t=function(t){return e===t},n=function(){return ns(e)},r=function(){return ns(e)},o=function(t){return ns(t(e))},i=function(){return ns(e)},a=function(t){t(e)},u=function(t){return t(e)},c=function(t,n){return n(e)},s=function(t){return t(e)},f=function(t){return t(e)},l=function(){return Tt.some(e)};return{is:t,isValue:St,isError:xt,getOr:yt(e),getOrThunk:yt(e),getOrDie:yt(e),or:n,orThunk:r,fold:c,map:o,mapError:i,each:a,bind:u,exists:s,forall:f,toOption:l}},rs=function(e){var t=function(e){return e()},n=function(){return wt(String(e))()},r=function(e){return e},o=function(e){return e()},i=function(){return rs(e)},a=function(t){return rs(t(e))},u=function(){return rs(e)},c=function(t){return t(e)};return{is:xt,isValue:xt,isError:St,getOr:bt,getOrThunk:t,getOrDie:n,or:r,orThunk:o,fold:c,map:i,mapError:a,each:pt,bind:u,exists:xt,forall:St,toOption:Tt.none}},os=function(e,t){return e.fold(function(){return rs(t)},ns)},is={value:ns,error:rs,fromOption:os},as=function(t){if(!Lt(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 Yt(t,function(o,i){var a=pn(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(!Lt(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];var s=function(e){var t=pn(e);if(n.length!==t.length)throw new Error("Wrong number of arguments to match. Expected: "+n.join(",")+"\nActual: "+t.join(","));var r=un(n,function(e){return Wt(t,e)});if(!r)throw new Error("Not all branches were specified when using match. Specified: "+t.join(", ")+"\nRequired: "+n.join(", "));return e[u].apply(null,o)};return{fold:function(){if(arguments.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+arguments.length);var e=arguments[i];return e.apply(null,o)},match:s,log:function(t){e.console.log(t,{constructors:n,constructor:u,params:o})}}}}),r},us={generate:as},cs=(us.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]),function(e){return e.fold(bt,bt)}),ss=function(){function t(e,t){return function(){e.apply(t,arguments)}}function n(e){var t=this;return null===this._state?void this._deferreds.push(e):void f(function(){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return void(t._state?e.resolve:e.reject)(t._value);var r;try{r=n(t._value)}catch(o){return void e.reject(o)}e.resolve(r)})}function r(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void u(t(n,e),t(r,this),t(o,this))}this._state=!0,this._value=e,i.call(this)}catch(a){o.call(this,a)}}function o(e){this._state=!1,this._value=e,i.call(this)}function i(){for(var e=0,t=this._deferreds.length;t>e;e++)n.call(this,this._deferreds[e]);this._deferreds=null}function a(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}function u(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)}}var c=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=function(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=[],u(e,t(r,this),t(o,this))},f=s.immediateFn||"function"==typeof e.setImmediate&&e.setImmediate||function(t){e.setTimeout(t,1)};return s.prototype.catch=function(e){return this.then(null,e)},s.prototype.then=function(e,t){var r=this;return new s(function(o,i){n.call(r,new a(e,t,o,i))})},s.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&c(arguments[0])?arguments[0]:arguments);return new s(function(t,n){function r(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){r(i,e)},n)}e[i]=a,0===--o&&t(e)}catch(c){n(c)}}if(0===e.length)return t([]);for(var o=e.length,i=0;i<e.length;i++)r(i,e[i])})},s.resolve=function(e){return e&&"object"==typeof e&&e.constructor===s?e:new s(function(t){t(e)})},s.reject=function(e){return new s(function(t,n){n(e)})},s.race=function(e){return new s(function(t,n){for(var r=0,o=e.length;o>r;r++)e[r].then(t,n)})},s},fs=window.Promise?window.Promise:ss(),ls=function(t,n){var r,o=e.window.requestAnimationFrame,i=["ms","moz","webkit"],a=function(t){e.window.setTimeout(t,0)};for(r=0;r<i.length&&!o;r++)o=e.window[i[r]+"RequestAnimationFrame"];o||(o=a),o(t,n)},ds=function(t,n){return"number"!=typeof n&&(n=0),e.setTimeout(t,n)},ms=function(t,n){return"number"!=typeof n&&(n=1),e.setInterval(t,n)},gs=function(t){return e.clearTimeout(t)},ps=function(t){return e.clearInterval(t)},hs=function(t,n){var r,o=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];e.clearTimeout(r),r=ds(function(){t.apply(this,o)},n)};return o.stop=function(){e.clearTimeout(r)},o},vs={requestAnimationFrame:function(t,n){return qc?void qc.then(t):void(qc=new fs(function(t){n||(n=e.document.body),ls(t,n)}).then(t))},setTimeout:ds,setInterval:ms,setEditorTimeout:function(e,t,n){return ds(function(){e.removed||t()},n)},setEditorInterval:function(t,n,r){var o=ms(function(){t.removed?e.clearInterval(o):n()},r);return o},debounce:hs,throttle:hs,clearInterval:ps,clearTimeout:gs},ys=function(){var e=new WeakMap,t=function(t,n){var r=Qo(t),o=r.dom();return Tt.from(e.get(o)).getOrThunk(function(){var t=x(o,n);return e.set(o,t),t})};return{forElement:t}},bs=ys(),Cs=to.each,ws=to.grep,xs=Hr.ie,Ss=/^([a-z0-9],?)+$/i,Ns=/^[ \t\r\n]*$/,Es=function(e,t,n){var r=t.keep_values,o={set:function(e,r,o){t.url_converter&&(r=t.url_converter.call(t.url_converter_scope||n(),r,o,e[0])),e.attr("data-mce-"+o,r).attr(o,r)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}},i={style:{set:function(t,n){return null!==n&&"object"==typeof n?void t.css(n):(r&&t.attr("data-mce-style",n),void(null!==n&&"string"==typeof n?(t.removeAttr("style"),t.css(e.parse(n))):t.attr("style",n)))},get:function(t){var n=t.attr("data-mce-style")||t.attr("style");return n=e.serialize(e.parse(n),t[0].nodeName)}}};return r&&(i.href=i.src=o),i},ks=function(e,t){var n=t.attr("style"),r=e.serialize(e.parse(n),t[0].nodeName);r||(r=null),t.attr("data-mce-style",r)},_s=function(e,t){var n,r,o=0;if(e)for(n=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)r=e.nodeType,(!t||3!==r||r!==n&&e.nodeValue.length)&&(o++,n=r);return o};!function(t){t.DOM=t(e.document),t.nodeIndex=_s}(S||(S={}));var Ts=S,Rs=Ts.DOM,As=to.each,Ds=to.grep,Os=0,Bs=1,Ps=2,Ls=3,Is=function(){function t(e){void 0===e&&(e={}),this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=0,this.settings=e}return t.prototype._setReferrerPolicy=function(e){this.settings.referrerPolicy=e},t.prototype.loadScript=function(t,n,r){var o,i=Rs,a=function(){i.remove(c),o&&(o.onreadystatechange=o.onload=o=null),n()},u=function(){Ut(r)?r():"undefined"!=typeof e.console&&e.console.log&&e.console.log("Failed to load script: "+t)},c=i.uniqueId();o=e.document.createElement("script"),o.id=c,o.type="text/javascript",o.src=to._addCacheSuffix(t),this.settings.referrerPolicy&&i.setAttrib(o,"referrerpolicy",this.settings.referrerPolicy),o.onload=a,o.onerror=u,(e.document.getElementsByTagName("head")[0]||e.document.body).appendChild(o)},t.prototype.isDone=function(e){return this.states[e]===Ps},t.prototype.markDone=function(e){this.states[e]=Ps},t.prototype.add=function(e,t,n,r){var o=this.states[e];void 0===o&&(this.queue.push(e),this.states[e]=Os),t&&(this.scriptLoadedCallbacks[e]||(this.scriptLoadedCallbacks[e]=[]),this.scriptLoadedCallbacks[e].push({success:t,failure:r,scope:n||this}))},t.prototype.load=function(e,t,n,r){return this.add(e,t,n,r)},t.prototype.remove=function(e){delete this.states[e],delete this.scriptLoadedCallbacks[e]},t.prototype.loadQueue=function(e,t,n){this.loadScripts(this.queue,e,t,n)},t.prototype.loadScripts=function(e,t,n,r){var o=this,i=[],a=function(e,t){As(o.scriptLoadedCallbacks[t],function(t){Ut(t[e])&&t[e].call(t.scope)}),o.scriptLoadedCallbacks[t]=void 0};o.queueLoadedCallbacks.push({success:t,failure:r,scope:n||this});var u=function(){var t=Ds(e);if(e.length=0,As(t,function(e){return o.states[e]===Ps?void a("success",e):o.states[e]===Ls?void a("failure",e):void(o.states[e]!==Bs&&(o.states[e]=Bs,o.loading++,o.loadScript(e,function(){o.states[e]=Ps,o.loading--,a("success",e),u()},function(){o.states[e]=Ls,o.loading--,i.push(e),a("failure",e),u()})))}),!o.loading){var n=o.queueLoadedCallbacks.slice(0);o.queueLoadedCallbacks.length=0,As(n,function(e){0===i.length?Ut(e.success)&&e.success.call(e.scope):Ut(e.failure)&&e.failure.call(e.scope,i)})}};u()},t.ScriptLoader=new t,t}(),Ms=function(e){var t=e,n=function(){return t},r=function(e){t=e};return{get:n,set:r}},Fs=function(e){return Pt(e)&&_n(e,"raw")},Us=function(e){return Lt(e)&&e.length>1},zs={},js=Ms("en"),Hs=function(){return kn(zs,js.get())},Vs=function(){return yn(zs,function(e){return Fn({},e)})},qs=function(e){e&&js.set(e)},$s=function(){return js.get()},Ws=function(e,t){var n=zs[e];n||(zs[e]=n={}),vn(t,function(e,t){n[t.toLowerCase()]=e})},Ks=function(e){var t=Hs().getOr({}),n=function(e){return Ut(e)?Object.prototype.toString.call(e):r(e)?"":""+e},r=function(e){return""===e||null===e||void 0===e},o=function(e){var r=n(e);return kn(t,r.toLowerCase()).map(n).getOr(r)},i=function(e){return e.replace(/{context:\w+}$/,"")},a=function(e){return e};if(r(e))return a("");if(Fs(e))return a(n(e.raw));if(Us(e)){var u=e.slice(1),c=o(e[0]).replace(/\{([0-9]+)\}/g,function(e,t){return _n(u,t)?n(u[t]):e});return a(i(c))}return a(i(o(e)))},Xs=function(){return Hs().bind(function(e){return kn(e,"_dir")}).exists(function(e){return"rtl"===e})},Ys=function(e){return _n(zs,e)},Gs={getData:Vs,setCode:qs,getCode:$s,add:Ws,translate:Ks,isRtl:Xs,hasCode:Ys};!function(e){e.PluginManager=e(),e.ThemeManager=e()}(N||(N={}));var Js=N,Qs=function(t,n){var r=null,o=function(){null!==r&&(e.clearTimeout(r),r=null)},i=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];null===r&&(r=e.setTimeout(function(){t.apply(null,o),r=null},n))};return{cancel:o,throttle:i}},Zs=function(t,n){var r=null,o=function(){null!==r&&(e.clearTimeout(r),r=null)},i=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];null!==r&&e.clearTimeout(r),r=e.setTimeout(function(){t.apply(null,o),r=null},n)};return{cancel:o,throttle:i}},ef=function(e,t){var n=Xi(e,t);return void 0===n||""===n?[]:n.split(" ")},tf=function(e,t,n){var r=ef(e,t),o=r.concat([n]);return Wi(e,t,o.join(" ")),!0},nf=function(e,t,n){var r=Qt(ef(e,t),function(e){return e!==n});return r.length>0?Wi(e,t,r.join(" ")):Ji(e,t),!1},rf=function(e){return void 0!==e.dom().classList},of=function(e){return ef(e,"class")},af=function(e,t){return tf(e,"class",t)},uf=function(e,t){return nf(e,"class",t)},cf=function(e,t){rf(e)?e.dom().classList.add(t):af(e,t)},sf=function(e){var t=rf(e)?e.dom().classList:of(e);0===t.length&&Ji(e,"class")},ff=function(e,t){if(rf(e)){var n=e.dom().classList;n.remove(t)}else uf(e,t);sf(e)},lf=function(e,t){return rf(e)&&e.dom().classList.contains(t)},df=function(e,t){var n=[];return Yt($o(e),function(e){t(e)&&(n=n.concat([e])),n=n.concat(df(e,t))}),n},mf=function(e,t){return To(t,e)},gf=function(e,t,n){for(var r=e.dom(),o=Ut(n)?n:yt(!1);r.parentNode;){r=r.parentNode;var i=uo.fromDom(r);if(t(i))return Tt.some(i);if(o(i))break}return Tt.none()},pf=function(e,t,n){var r=function(e,t){return t(e)};return E(r,gf,e,t,n)},hf=function(e,t,n){return gf(e,function(e){return ko(e,t)},n)},vf=function(e,t){return Ro(t,e)},yf=function(e,t,n){var r=function(e,t){return ko(e,t)};return E(r,hf,e,t,n)},bf=yt("mce-annotation"),Cf=yt("data-mce-annotation"),wf=yt("data-mce-annotation-uid"),xf=function(e,t){var n=e.selection.getRng(),r=uo.fromDom(n.startContainer),o=uo.fromDom(e.getBody()),i=t.fold(function(){return"."+bf()},function(e){return"["+Cf()+'="'+e+'"]'}),a=Wo(r,n.startOffset).getOr(r),u=yf(a,i,function(e){return Ao(e,o)}),c=function(e,t){return Gi(e,t)?Tt.some(Xi(e,t)):Tt.none()};return u.bind(function(t){return c(t,""+wf()).bind(function(n){return c(t,""+Cf()).map(function(t){var r=Nf(e,n);return{uid:n,name:t,elements:r}})})})},Sf=function(e){return yo(e)&&lf(e,bf())},Nf=function(e,t){var n=uo.fromDom(e.getBody());return mf(n,"["+wf()+'="'+t+'"]')},Ef=function(e,t){var n=uo.fromDom(e.getBody()),r=mf(n,"["+Cf()+'="'+t+'"]'),o={};return Yt(r,function(e){var t=Xi(e,wf()),n=o.hasOwnProperty(t)?o[t]:[];o[t]=n.concat([e])}),o},kf=function(e){var t=Ms({}),n=function(){return{listeners:[],previous:Ms(Tt.none())}},r=function(e,t){o(e,function(e){return t(e),e})},o=function(e,r){var o=t.get(),i=o.hasOwnProperty(e)?o[e]:n(),a=r(i);o[e]=a,t.set(o)},i=function(e,t,n){r(e,function(r){Yt(r.listeners,function(r){return r(!0,e,{uid:t,nodes:Xt(n,function(e){return e.dom()})})})})},a=function(e){r(e,function(t){Yt(t.listeners,function(t){return t(!1,e)})})},u=Zs(function(){var n=t.get(),r=ln(pn(n));Yt(r,function(t){o(t,function(n){var r=n.previous.get();return xf(e,Tt.some(t)).fold(function(){r.isSome()&&(a(t),n.previous.set(Tt.none()))},function(e){var t=e.uid,o=e.name,a=e.elements;r.is(t)||(i(o,t,a),n.previous.set(Tt.some(t)))}),{previous:n.previous,listeners:n.listeners}})})},30);e.on("remove",function(){u.cancel()}),e.on("NodeChange",function(){u.throttle()});var c=function(e,t){o(e,function(e){return{previous:e.previous,listeners:e.listeners.concat([t])}})};return{addListener:c}},_f=function(e,t){var n=function(e){return Tt.from(e.attr(Cf())).bind(t.lookup)};e.on("init",function(){e.serializer.addNodeFilter("span",function(e){Yt(e,function(e){n(e).each(function(t){t.persistent===!1&&e.unwrap()})})})})},Tf=function(){var e={},t=function(t,n){e[t]={name:t,settings:n}},n=function(t){return e.hasOwnProperty(t)?Tt.from(e[t]).map(function(e){return e.settings}):Tt.none()};return{register:t,lookup:n}},Rf=0,Af=function(e){var t=new Date,n=t.getTime(),r=Math.floor(1e9*Math.random());return Rf++,e+"_"+r+Rf+String(n)},Df=function(e,t){Yt(t,function(t){cf(e,t)})},Of=function(t,n){var r=n||e.document,o=r.createElement("div");return o.innerHTML=t,$o(uo.fromDom(o))},Bf=function(e){return e.dom().innerHTML},Pf=function(e,t){var n=Po(e),r=n.dom(),o=uo.fromDom(r.createDocumentFragment()),i=Of(t,r);ci(o,i),si(e),ii(e,o)},Lf=function(e,t){return uo.fromDom(e.dom().cloneNode(t))},If=function(e){return Lf(e,!1)},Mf=function(e){return Lf(e,!0)},Ff=function(e,t,n){void 0===n&&(n=xt);var r=new jc(e,t),o=function(e){var t;do t=r[e]();while(t&&!Mi(t)&&!n(t));return Tt.from(t).filter(Mi)};return{current:function(){return Tt.from(r.current()).filter(Mi)},next:function(){return o("next")},prev:function(){return o("prev")},prev2:function(){return o("prev2")}}},Uf=function(e,t){var n=t?t:function(t){return e.isBlock(t)||ji(t)||Vi(t)},r=function(e,t,n,o){if(Mi(e)){var i=o(e,t,e.data);if(-1!==i)return Tt.some({container:e,offset:i})}return n().bind(function(e){return r(e.container,e.offset,n,o)})},o=function(e,t,o,i){var a=Ff(e,i,n);return r(e,t,function(){return a.prev().map(function(e){return{container:e,offset:e.length}})},o).getOrNull()},i=function(e,t,o,i){var a=Ff(e,i,n);return r(e,t,function(){return a.next().map(function(e){return{container:e,offset:0}})},o).getOrNull()};return{backwards:o,forwards:i}},zf=cu,jf=fu,Hf=lu,Vf=_i,qf=Mi,$f=function(e){return qf(e)&&(e=e.parentNode),Vf(e)&&e.hasAttribute("data-mce-caret")},Wf=function(e){return qf(e)&&jf(e.data)},Kf=function(e){return $f(e)||Wf(e)},Xf=function(e){return e.firstChild!==e.lastChild||!ji(e.firstChild)},Yf=function(e,t){var n,r=e.ownerDocument,o=r.createTextNode(zf),i=e.parentNode;if(t){if(n=e.previousSibling,qf(n)){if(Kf(n))return n;if(tl(n))return n.splitText(n.data.length-1)}i.insertBefore(o,e)}else{if(n=e.nextSibling,qf(n)){if(Kf(n))return n;if(el(n))return n.splitText(1),n}e.nextSibling?i.insertBefore(o,e.nextSibling):i.appendChild(o)}return o},Gf=function(e){var t=e.container();return e&&Mi(t)?t.data.charAt(e.offset())===zf||e.isAtStart()&&Wf(t.previousSibling):!1},Jf=function(e){var t=e.container();return e&&Mi(t)?t.data.charAt(e.offset()-1)===zf||e.isAtEnd()&&Wf(t.nextSibling):!1},Qf=function(){var t=e.document.createElement("br");return t.setAttribute("data-mce-bogus","1"),t},Zf=function(e,t,n){var r=t.ownerDocument,o=r.createElement(e);o.setAttribute("data-mce-caret",n?"before":"after"),o.setAttribute("data-mce-bogus","all"),o.appendChild(Qf());var i=t.parentNode;return n?i.insertBefore(o,t):t.nextSibling?i.insertBefore(o,t.nextSibling):i.appendChild(o),o},el=function(e){return qf(e)&&e.data[0]===zf},tl=function(e){return qf(e)&&e.data[e.data.length-1]===zf},nl=function(e){var t=e.getElementsByTagName("br"),n=t[t.length-1];Oi(n)&&n.parentNode.removeChild(n)},rl=function(e){return e&&e.hasAttribute("data-mce-caret")?(nl(e),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("_moz_abspos"),e):null},ol=function(e){return $f(e.startContainer)},il=function(e){for(var t=[],n=function(e){t.push(e)},r=0;r<e.length;r++)e[r].each(n);return t},al=function(e,t,n){return e.isSome()&&t.isSome()?Tt.some(n(e.getOrDie(),t.getOrDie())):Tt.none()},ul=function(e,t,n,r){return e.isSome()&&t.isSome()&&n.isSome()?Tt.some(r(e.getOrDie(),t.getOrDie(),n.getOrDie())):Tt.none()},cl=function(e,t){return e?Tt.some(t):Tt.none()},sl=Math.round,fl=function(e){return e?{left:sl(e.left),top:sl(e.top),bottom:sl(e.bottom),right:sl(e.right),width:sl(e.width),height:sl(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}},ll=function(e,t){return e=fl(e),t?e.right=e.left:(e.left=e.left+e.width,e.right=e.left),e.width=0,e
},dl=function(e,t){return e.left===t.left&&e.top===t.top&&e.bottom===t.bottom&&e.right===t.right},ml=function(e,t,n){return e>=0&&e<=Math.min(t.height,n.height)/2},gl=function(e,t){return e.bottom-e.height/2<t.top?!0:e.top>t.bottom?!1:ml(t.top-e.bottom,e,t)},pl=function(e,t){return e.top>t.bottom?!0:e.bottom<t.top?!1:ml(t.bottom-e.top,e,t)},hl=function(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom},vl=function(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset===n+1?t.childNodes[n]:null},yl=function(e,t){return 1===e.nodeType&&e.hasChildNodes()&&(t>=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e},bl=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ंऺ़ु-ै्॑-ॗॢ-ॣঁ়াু-ৄ্ৗৢ-ৣਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼ુ-ૅે-ૈ્ૢ-ૣଁ଼ାିୁ-ୄ୍ୖୗୢ-ୣஂாீ்ௗఀా-ీె-ైొ-్ౕ-ౖౢ-ౣಁ಼ಿೂೆೌ-್ೕ-ೖೢ-ೣഁാു-ൄ്ൗൢ-ൣ්ාි-ුූෟัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹᷀-᷵᷼-᷿‌-‍⃐-⃜⃝-⃠⃡⃢-⃤⃥-⃰⳯-⵿⳱ⷠ-〪ⷿ-〭〮-゙〯-゚꙯꙰-꙲ꙴ-꙽ꚞ-ꚟ꛰-꛱ꠂ꠆ꠋꠥ-ꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-゙︯-゚]"),Cl=function(e){return"string"==typeof e&&e.charCodeAt(0)>=768&&bl.test(e)},wl=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){for(var n=0;n<e.length;n++)if(e[n](t))return!0;return!1}},xl=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){for(var n=0;n<e.length;n++)if(!e[n](t))return!1;return!0}},Sl=Hi,Nl=Vi,El=ji,kl=Mi,_l=Ti(["script","style","textarea"]),Tl=Ti(["img","input","textarea","hr","iframe","video","audio","object"]),Rl=Ti(["table"]),Al=Kf,Dl=function(e){return Al(e)?!1:kl(e)?_l(e.parentNode)?!1:!0:Tl(e)||El(e)||Rl(e)||Bl(e)},Ol=function(e){return _i(e)&&"true"===e.getAttribute("unselectable")},Bl=function(e){return Ol(e)===!1&&Nl(e)},Pl=function(e,t){for(e=e.parentNode;e&&e!==t;e=e.parentNode){if(Bl(e))return!1;if(Sl(e))return!0}return!0},Ll=function(e){return Bl(e)?en(gn(e.getElementsByTagName("*")),function(e,t){return e||Sl(t)},!1)!==!0:!1},Il=function(e){return Tl(e)||Ll(e)},Ml=function(e,t){return Dl(e)&&Pl(e,t)},Fl=_i,Ul=Dl,zl=Ri("display","block table"),jl=Ri("float","left right"),Hl=xl(Fl,Ul,Ct(jl)),Vl=Ct(Ri("white-space","pre pre-line pre-wrap")),ql=Mi,$l=ji,Wl=Ts.nodeIndex,Kl=yl,Xl=function(e){return"createRange"in e?e.createRange():Ts.DOM.createRng()},Yl=function(e){return e&&/[\r\n\t ]/.test(e)},Gl=function(e){return!!e.setStart&&!!e.setEnd},Jl=function(e){var t,n=e.startContainer,r=e.startOffset;return Yl(e.toString())&&Vl(n.parentNode)&&Mi(n)&&(t=n.data,Yl(t[r-1])||Yl(t[r+1]))?!0:!1},Ql=function(e){var t=e.ownerDocument,n=Xl(t),r=t.createTextNode(su),o=e.parentNode;o.insertBefore(r,e),n.setStart(r,0),n.setEnd(r,1);var i=fl(n.getBoundingClientRect());return o.removeChild(r),i},Zl=function(e){var t=e.startContainer,n=e.endContainer,r=e.startOffset,o=e.endOffset;if(t===n&&Mi(n)&&0===r&&1===o){var i=e.cloneRange();return i.setEndAfter(n),td(i)}return null},ed=function(e){return 0===e.left&&0===e.right&&0===e.top&&0===e.bottom},td=function(e){var t,n=e.getClientRects();return t=fl(n.length>0?n[0]:e.getBoundingClientRect()),!Gl(e)&&$l(e)&&ed(t)?Ql(e):ed(t)&&Gl(e)?Zl(e):t},nd=function(e,t){var n=ll(e,t);return n.width=1,n.right=n.left+1,n},rd=function(e){var t,n,r=[],o=function(e){0!==e.height&&(r.length>0&&dl(e,r[r.length-1])||r.push(e))},i=function(e,t){var n=Xl(e.ownerDocument);if(t<e.data.length){if(Cl(e.data[t]))return r;if(Cl(e.data[t-1])&&(n.setStart(e,t),n.setEnd(e,t+1),!Jl(n)))return o(nd(td(n),!1)),r}t>0&&(n.setStart(e,t-1),n.setEnd(e,t),Jl(n)||o(nd(td(n),!1))),t<e.data.length&&(n.setStart(e,t),n.setEnd(e,t+1),Jl(n)||o(nd(td(n),!0)))};if(ql(e.container()))return i(e.container(),e.offset()),r;if(Fl(e.container()))if(e.isAtEnd())n=Kl(e.container(),e.offset()),ql(n)&&i(n,n.data.length),Hl(n)&&!$l(n)&&o(nd(td(n),!1));else{if(n=Kl(e.container(),e.offset()),ql(n)&&i(n,0),Hl(n)&&e.isAtEnd())return o(nd(td(n),!1)),r;t=Kl(e.container(),e.offset()-1),Hl(t)&&!$l(t)&&(zl(t)||zl(n)||!Hl(n))&&o(nd(td(t),!1)),Hl(n)&&o(nd(td(n),!0))}return r};!function(e){e.fromRangeStart=function(t){return e(t.startContainer,t.startOffset)},e.fromRangeEnd=function(t){return e(t.endContainer,t.endOffset)},e.after=function(t){return e(t.parentNode,Wl(t)+1)},e.before=function(t){return e(t.parentNode,Wl(t))},e.isAbove=function(e,t){return al(dn(t.getClientRects()),mn(e.getClientRects()),gl).getOr(!1)},e.isBelow=function(e,t){return al(mn(t.getClientRects()),dn(e.getClientRects()),pl).getOr(!1)},e.isAtStart=function(e){return e?e.isAtStart():!1},e.isAtEnd=function(e){return e?e.isAtEnd():!1},e.isTextPosition=function(e){return e?Mi(e.container()):!1},e.isElementPosition=function(t){return e.isTextPosition(t)===!1}}(k||(k={}));var od,id=k,ad=function(e,t){Mi(t)&&0===t.data.length&&e.remove(t)},ud=function(e,t,n){t.insertNode(n),ad(e,n.previousSibling),ad(e,n.nextSibling)},cd=function(e,t,n){var r=Tt.from(n.firstChild),o=Tt.from(n.lastChild);t.insertNode(n),r.each(function(t){return ad(e,t.previousSibling)}),o.each(function(t){return ad(e,t.nextSibling)})},sd=function(e,t,n){zi(n)?cd(e,t,n):ud(e,t,n)},fd=Mi,ld=Oi,dd=Ts.nodeIndex,md=function(e){var t=e.parentNode;return ld(t)?md(t):t},gd=function(e){return e?Ln(e.childNodes,function(e,t){return ld(t)&&"BR"!==t.nodeName?e=e.concat(gd(t)):e.push(t),e},[]):[]},pd=function(e,t){for(;(e=e.previousSibling)&&fd(e);)t+=e.data.length;return t},hd=function(e){return function(t){return e===t}},vd=function(e){var t,n;t=gd(md(e)),n=In(t,hd(e),e),t=t.slice(0,n+1);var r=Ln(t,function(e,n,r){return fd(n)&&fd(t[r-1])&&e++,e},0);return t=Bn(t,Ti([e.nodeName])),n=In(t,hd(e),e),n-r},yd=function(e){var t;return t=fd(e)?"text()":e.nodeName.toLowerCase(),t+"["+vd(e)+"]"},bd=function(e,t,n){var r=[];for(t=t.parentNode;t!==e&&(!n||!n(t));t=t.parentNode)r.push(t);return r},Cd=function(e,t){var n,r,o,i,a,u=[];return n=t.container(),r=t.offset(),fd(n)?o=pd(n,r):(i=n.childNodes,r>=i.length?(o="after",r=i.length-1):o="before",n=i[r]),u.push(yd(n)),a=bd(e,n),a=Bn(a,Ct(Oi)),u=u.concat(On(a,function(e){return yd(e)})),u.reverse().join("/")+","+o},wd=function(e,t,n){var r=gd(e);return r=Bn(r,function(e,t){return!fd(e)||!fd(r[t-1])}),r=Bn(r,Ti([t])),r[n]},xd=function(e,t){for(var n,r=e,o=0;fd(r);){if(n=r.data.length,t>=o&&o+n>=t){e=r,t-=o;break}if(!fd(r.nextSibling)){e=r,t=n;break}o+=n,r=r.nextSibling}return fd(e)&&t>e.data.length&&(t=e.data.length),id(e,t)},Sd=function(e,t){var n;if(!t)return null;var r=t.split(","),o=r[0].split("/");n=r.length>1?r[1]:"before";var i=Ln(o,function(e,t){return(t=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t))?("text()"===t[1]&&(t[1]="#text"),wd(e,t[1],parseInt(t[2],10))):null},e);return i?fd(i)?xd(i,parseInt(n,10)):(n="after"===n?dd(i)+1:dd(i),id(i.parentNode,n)):null},Nd=Vi,Ed=function(e,t,n){var r,o;for(o=e(t.data.slice(0,n)).length,r=t.previousSibling;r&&Mi(r);r=r.previousSibling)o+=e(r.data).length;return o},kd=function(e,t,n,r,o){var i,a=r[o?"startContainer":"endContainer"],u=r[o?"startOffset":"endOffset"],c=[],s=0,f=e.getRoot();for(Mi(a)?c.push(n?Ed(t,a,u):u):(i=a.childNodes,u>=i.length&&i.length&&(s=1,u=Math.max(0,i.length-1)),c.push(e.nodeIndex(i[u],n)+s));a&&a!==f;a=a.parentNode)c.push(e.nodeIndex(a,n));return c},_d=function(e,t,n,r){var o=t.dom,i={};return i.start=kd(o,e,n,r,!0),t.isCollapsed()||(i.end=kd(o,e,n,r,!1)),i},Td=function(e,t,n){var r=0;return to.each(e.select(t),function(e){return"all"!==e.getAttribute("data-mce-bogus")?e===n?!1:void r++:void 0}),r},Rd=function(e,t){var n,r,o,i=t?"start":"end";n=e[i+"Container"],r=e[i+"Offset"],_i(n)&&"TR"===n.nodeName&&(o=n.childNodes,n=o[Math.min(t?r:r-1,o.length-1)],n&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r)))},Ad=function(e){return Rd(e,!0),Rd(e,!1),e},Dd=function(e,t){var n;if(_i(e)&&(e=yl(e,t),Nd(e)))return e;if(Kf(e)){if(Mi(e)&&$f(e)&&(e=e.parentNode),n=e.previousSibling,Nd(n))return n;if(n=e.nextSibling,Nd(n))return n}},Od=function(e){return Dd(e.startContainer,e.startOffset)||Dd(e.endContainer,e.endOffset)},Bd=function(e,t,n){var r=n.getNode(),o=r?r.nodeName:null,i=n.getRng();if(Nd(r)||"IMG"===o)return{name:o,index:Td(n.dom,o,r)};var a=Od(i);return a?(o=a.tagName,{name:o,index:Td(n.dom,o,a)}):_d(e,n,t,i)},Pd=function(e){var t=e.getRng();return{start:Cd(e.dom.getRoot(),id.fromRangeStart(t)),end:Cd(e.dom.getRoot(),id.fromRangeEnd(t))}},Ld=function(e){return{rng:e.getRng()}},Id=function(e,t,n){var r={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"};return n?e.create("span",r,"&#xFEFF;"):e.create("span",r)},Md=function(e,t){var n=e.dom,r=e.getRng(),o=n.uniqueId(),i=e.isCollapsed(),a=e.getNode(),u=a.nodeName;if("IMG"===u)return{name:u,index:Td(n,u,a)};var c=Ad(r.cloneRange());if(!i){c.collapse(!1);var s=Id(n,o+"_end",t);sd(n,c,s)}r=Ad(r),r.collapse(!0);var f=Id(n,o+"_start",t);return sd(n,r,f),e.moveToBookmark({id:o,keep:!0}),{id:o}},Fd=function(e,t,n){return 2===t?Bd(Hf,n,e):3===t?Pd(e):t?Ld(e):Md(e,!1)},Ud=t(Bd,bt,!0),zd=Ts.DOM,jd="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow",Hd=function(e,t,n){var r=e.getParam(t,n);if(-1!==r.indexOf("=")){var o=e.getParam(t,"","hash");return o.hasOwnProperty(e.id)?o[e.id]:n}return r},Vd=function(e){return e.getParam("iframe_attrs",{})},qd=function(e){return e.getParam("doctype","<!DOCTYPE html>")},$d=function(e){return e.getParam("document_base_url","")},Wd=function(e){return Hd(e,"body_id","tinymce")},Kd=function(e){return Hd(e,"body_class","")},Xd=function(e){return e.getParam("content_security_policy","")},Yd=function(e){return e.getParam("br_in_pre",!0)},Gd=function(e){if(e.getParam("force_p_newlines",!1))return"p";var t=e.getParam("forced_root_block","p");return t===!1?"":t===!0?"p":t},Jd=function(e){return e.getParam("forced_root_block_attrs",{})},Qd=function(e){return e.getParam("br_newline_selector",".mce-toc h2,figcaption,caption")},Zd=function(e){return e.getParam("no_newline_selector","")},em=function(e){return e.getParam("keep_styles",!0)},tm=function(e){return e.getParam("end_container_on_empty_block",!1)},nm=function(e){return to.explode(e.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large"))},rm=function(e){return to.explode(e.getParam("font_size_classes",""))},om=function(e){return e.getParam("images_dataimg_filter",yt(!0),"function")},im=function(e){return e.getParam("automatic_uploads",!0,"boolean")},am=function(e){return e.getParam("images_reuse_filename",!1,"boolean")},um=function(e){return e.getParam("images_replace_blob_uris",!0,"boolean")},cm=function(e){return e.getParam("icons","","string")},sm=function(e){return e.getParam("icons_url","","string")},fm=function(e){return e.getParam("images_upload_url","","string")},lm=function(e){return e.getParam("images_upload_base_path","","string")},dm=function(e){return e.getParam("images_upload_credentials",!1,"boolean")},mm=function(e){return e.getParam("images_upload_handler",null,"function")},gm=function(e){return e.getParam("content_css_cors",!1,"boolean")},pm=function(e){return e.getParam("referrer_policy","","string")},hm=function(e){return e.getParam("language","en","string")},vm=function(e){return e.getParam("language_url","","string")},ym=function(e){return e.getParam("indent_use_margin",!1)},bm=function(e){return e.getParam("indentation","40px","string")},Cm=function(e){var t=e.getParam("content_css");return Bt(t)?Xt(t.split(","),wr):Lt(t)?t:t===!1||e.inline?[]:["default"]},wm=function(e){return e.getParam("directionality",Gs.isRtl()?"rtl":void 0)},xm=function(e){return e.getParam("inline_boundaries_selector","a[href],code,.mce-annotation","string")},Sm=function(e){return e.getParam("object_resizing")},Nm=function(e){return e.getParam("resize_img_proportional",!0,"boolean")},Em=function(e){return e.getParam("placeholder",zd.getAttrib(e.getElement(),"placeholder"),"string")},km=function(e){return e.getParam("event_root")},_m=function(e){return e.getParam("service_message")},Tm=function(e){return e.getParam("theme")},Rm=function(e){return e.getParam("validate")},Am=function(e){return e.getParam("inline_boundaries")!==!1},Dm=function(e){return e.getParam("formats")},Om=function(e){var t=e.getParam("preview_styles",jd);return Bt(t)?t:""},Bm=function(e){return e.getParam("custom_ui_selector","","string")},Pm=function(e){return e.getParam("theme_url")},Lm=function(e){return e.getParam("inline")},Im=function(e){return e.getParam("hidden_input")},Mm=function(e){return e.getParam("submit_patch")},Fm=function(e){return"xml"===e.getParam("encoding")},Um=function(e){return e.getParam("add_form_submit_trigger")},zm=function(e){return e.getParam("add_unload_trigger")},jm=function(e){return""!==Gd(e)},Hm=function(e){return e.getParam("custom_undo_redo_levels",0,"number")},Vm=function(e){return e.getParam("disable_nodechange")},qm=function(e){return e.getParam("readonly")},$m=function(e){return e.getParam("content_css_cors")},Wm=function(e){return e.getParam("plugins")},Km=function(e){return e.getParam("external_plugins")},Xm=function(e){return e.getParam("block_unsupported_drop",!0,"boolean")},Ym=_i,Gm=Mi,Jm=function(e){var t=e.parentNode;t&&t.removeChild(e)},Qm=function(e){try{return e.nodeValue}catch(t){return""}},Zm=function(e,t){0===t.length?Jm(e):e.nodeValue=t},eg=function(e){var t=Hf(e);return{count:e.length-t.length,text:t}},tg=function(e,t){return ug(e),t},ng=function(e,t){var n=eg(e.data.substr(0,t.offset())),r=eg(e.data.substr(t.offset())),o=n.text+r.text;return o.length>0?(Zm(e,o),id(e,t.offset()-n.count)):t},rg=function(e,t){var n=t.container(),r=$t(gn(n.childNodes),e).map(function(e){return e<t.offset()?id(n,t.offset()-1):t}).getOr(t);return ug(e),r},og=function(e,t){return Gm(e)&&t.container()===e?ng(e,t):tg(e,t)},ig=function(e,t){return t.container()===e.parentNode?rg(e,t):tg(e,t)},ag=function(e,t){return id.isTextPosition(t)?og(e,t):ig(e,t)},ug=function(e){if(Ym(e)&&Kf(e)&&(Xf(e)?e.removeAttribute("data-mce-caret"):Jm(e)),Gm(e)){var t=Hf(Qm(e));Zm(e,t)}},cg=Br().browser,sg=Vi,fg=function(e){return _i(e)&&/^(TD|TH)$/i.test(e.tagName)},lg=function(e,t,n){var r,o,i,a,u,c=ll(t.getBoundingClientRect(),n);return"BODY"===e.tagName?(r=e.ownerDocument.documentElement,o=e.scrollLeft||r.scrollLeft,i=e.scrollTop||r.scrollTop):(u=e.getBoundingClientRect(),o=e.scrollLeft-u.left,i=e.scrollTop-u.top),c.left+=o,c.right+=o,c.top+=i,c.bottom+=i,c.width=1,a=t.offsetWidth-t.clientWidth,a>0&&(n&&(a*=-1),c.left+=a,c.right+=a),c},dg=function(e){var t,n,r,o,i=mf(uo.fromDom(e),"*[contentEditable=false]");for(r=0;r<i.length;r++)t=i[r].dom(),n=t.previousSibling,tl(n)&&(o=n.data,1===o.length?n.parentNode.removeChild(n):n.deleteData(o.length-1,1)),n=t.nextSibling,el(n)&&(o=n.data,1===o.length?n.parentNode.removeChild(n):n.deleteData(0,1))},mg=function(e,t,n,r){var o,i,a=Ms(Tt.none()),u=Gd(e),c=u.length>0?u:"p",s=function(e,r){var o,u;if(f(),fg(r))return null;if(!n(r))return i=Yf(r,e),u=r.ownerDocument.createRange(),sg(i.nextSibling)?(u.setStart(i,0),u.setEnd(i,0)):(u.setStart(i,1),u.setEnd(i,1)),u;i=Zf(c,r,e),o=lg(t,r,e),zc(i).css("top",o.top);var s=zc('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(o).appendTo(t)[0];return a.set(Tt.some({caret:s,element:r,before:e})),a.get().each(function(t){e&&zc(t.caret).addClass("mce-visual-caret-before")}),l(),u=r.ownerDocument.createRange(),u.setStart(i,0),u.setEnd(i,0),u},f=function(){dg(t),i&&(ug(i),i=null),a.get().each(function(e){zc(e.caret).remove(),a.set(Tt.none())}),o&&(vs.clearInterval(o),o=null)},l=function(){o=vs.setInterval(function(){r()?zc("div.mce-visual-caret",t).toggleClass("mce-visual-caret-hidden"):zc("div.mce-visual-caret",t).addClass("mce-visual-caret-hidden")},500)},d=function(){a.get().each(function(e){var n=lg(t,e.element,e.before);zc(e.caret).css(Fn({},n))})},m=function(){return vs.clearInterval(o)},g=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;}"};return{show:s,hide:f,getCss:g,reposition:d,destroy:m}},gg=function(){return cg.isIE()||cg.isEdge()||cg.isFirefox()},pg=function(e){return sg(e)||Pi(e)&&gg()},hg=Vi,vg=Ri("display","block table table-cell table-caption list-item"),yg=Kf,bg=$f,Cg=_i,wg=Dl,xg=function(e){return e>0},Sg=function(e){return 0>e},Ng=function(e,t){for(var n;n=e(t);)if(!bg(n))return n;return null},Eg=function(e,t,n,r,o){var i=new jc(e,r);if(Sg(t)){if((hg(e)||bg(e))&&(e=Ng(i.prev,!0),n(e)))return e;for(;e=Ng(i.prev,o);)if(n(e))return e}if(xg(t)){if((hg(e)||bg(e))&&(e=Ng(i.next,!0),n(e)))return e;for(;e=Ng(i.next,o);)if(n(e))return e}return null},kg=function(e,t){for(;e&&e!==t;){if(vg(e))return e;e=e.parentNode}return null},_g=function(e,t,n){return kg(e.container(),n)===kg(t.container(),n)},Tg=function(e,t){if(!t)return null;var n=t.container(),r=t.offset();return Cg(n)?n.childNodes[r+e]:null},Rg=function(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n},Ag=function(e,t,n){return kg(t,e)===kg(n,e)},Dg=function(e,t,n){var r,o;for(o=e?"previousSibling":"nextSibling";n&&n!==t;){if(r=n[o],yg(r)&&(r=r[o]),hg(r)){if(Ag(t,r,n))return r;break}if(wg(r))break;n=n.parentNode}return null},Og=t(Rg,!0),Bg=t(Rg,!1),Pg=function(e,n,r){var o,i,a,u=t(Dg,!0,n),c=t(Dg,!1,n);i=r.startContainer;var s=r.startOffset;if($f(i)){if(Cg(i)||(i=i.parentNode),a=i.getAttribute("data-mce-caret"),"before"===a&&(o=i.nextSibling,pg(o)))return Og(o);if("after"===a&&(o=i.previousSibling,pg(o)))return Bg(o)}if(!r.collapsed)return r;if(Mi(i)){if(yg(i)){if(1===e){if(o=c(i))return Og(o);if(o=u(i))return Bg(o)}if(-1===e){if(o=u(i))return Bg(o);if(o=c(i))return Og(o)}return r}if(tl(i)&&s>=i.data.length-1)return 1===e&&(o=c(i))?Og(o):r;if(el(i)&&1>=s)return-1===e&&(o=u(i))?Bg(o):r;if(s===i.data.length)return o=c(i),o?Og(o):r;if(0===s)return o=u(i),o?Bg(o):r}return r},Lg=function(e,t){return Tt.from(Tg(e?0:-1,t)).filter(hg)},Ig=function(e,t,n){var r=Pg(e,t,n);return-1===e?k.fromRangeStart(r):k.fromRangeEnd(r)},Mg=function(e){return Tt.from(e.getNode()).map(uo.fromDom)},Fg=function(e){return Tt.from(e.getNode(!0)).map(uo.fromDom)},Ug=function(e,t){for(;t=e(t);)if(t.isVisible())return t;return t},zg=function(e,t){var n=_g(e,t);return!n&&ji(e.getNode())?!0:n};!function(e){e[e.Backwards=-1]="Backwards",e[e.Forwards=1]="Forwards"}(od||(od={}));var jg=Vi,Hg=Mi,Vg=_i,qg=ji,$g=Dl,Wg=Il,Kg=Ml,Xg=function(e,t){for(var n=[];e&&e!==t;)n.push(e),e=e.parentNode;return n},Yg=function(e,t){return e.hasChildNodes()&&t<e.childNodes.length?e.childNodes[t]:null},Gg=function(e,t){if(xg(e)){if($g(t.previousSibling)&&!Hg(t.previousSibling))return id.before(t);if(Hg(t))return id(t,0)}if(Sg(e)){if($g(t.nextSibling)&&!Hg(t.nextSibling))return id.after(t);if(Hg(t))return id(t,t.data.length)}return Sg(e)?qg(t)?id.before(t):id.after(t):id.before(t)},Jg=function(e,t){var n=t.nextSibling;return n&&$g(n)?Hg(n)?id(n,0):id.before(n):Qg(od.Forwards,id.after(t),e)},Qg=function(e,t,n){var r,o,i,a;if(!Vg(n)||!t)return null;if(t.isEqual(id.after(n))&&n.lastChild){if(a=id.after(n.lastChild),Sg(e)&&$g(n.lastChild)&&Vg(n.lastChild))return qg(n.lastChild)?id.before(n.lastChild):a}else a=t;var u=a.container(),c=a.offset();if(Hg(u)){if(Sg(e)&&c>0)return id(u,--c);if(xg(e)&&c<u.length)return id(u,++c);r=u}else{if(Sg(e)&&c>0&&(o=Yg(u,c-1),$g(o)))return!Wg(o)&&(i=Eg(o,e,Kg,o))?Hg(i)?id(i,i.data.length):id.after(i):Hg(o)?id(o,o.data.length):id.before(o);if(xg(e)&&c<u.childNodes.length&&(o=Yg(u,c),$g(o)))return qg(o)?Jg(n,o):!Wg(o)&&(i=Eg(o,e,Kg,o))?Hg(i)?id(i,0):id.before(i):Hg(o)?id(o,0):id.after(o);r=o?o:a.getNode()}if((xg(e)&&a.isAtEnd()||Sg(e)&&a.isAtStart())&&(r=Eg(r,e,yt(!0),n,!0),Kg(r,n)))return Gg(e,r);o=Eg(r,e,Kg,n);var s=Mn(Qt(Xg(u,n),jg));return!s||o&&s.contains(o)?o?Gg(e,o):null:a=xg(e)?id.after(s):id.before(s)},Zg=function(e){return{next:function(t){return Qg(od.Forwards,t,e)},prev:function(t){return Qg(od.Backwards,t,e)}}},ep=function(e,t,n){var r=e?id.before(n):id.after(n);return up(e,t,r)},tp=function(e){return ji(e)?id.before(e):id.after(e)},np=function(e){return id.isTextPosition(e)?0===e.offset():Dl(e.getNode())},rp=function(e){if(id.isTextPosition(e)){var t=e.container();return e.offset()===t.data.length}return Dl(e.getNode(!0))},op=function(e,t){return!id.isTextPosition(e)&&!id.isTextPosition(t)&&e.getNode()===t.getNode(!0)},ip=function(e){return!id.isTextPosition(e)&&ji(e.getNode())},ap=function(e,t,n){return e?!op(t,n)&&!ip(t)&&rp(t)&&np(n):!op(n,t)&&np(t)&&rp(n)},up=function(e,t,n){var r=Zg(t);return Tt.from(e?r.next(n):r.prev(n))},cp=function(e,t,n){return up(e,t,n).bind(function(r){return _g(n,r,t)&&ap(e,n,r)?up(e,t,r):Tt.some(r)})},sp=function(e,t,n,r){return cp(e,t,n).bind(function(n){return r(n)?sp(e,t,n,r):Tt.some(n)})},fp=function(e,t){var n=e?t.firstChild:t.lastChild;return Mi(n)?Tt.some(id(n,e?0:n.data.length)):n?Dl(n)?Tt.some(e?id.before(n):tp(n)):ep(e,t,n):Tt.none()},lp=t(up,!0),dp=t(up,!1),mp=t(fp,!0),gp=t(fp,!1),pp="_mce_caret",hp=function(e){return _i(e)&&e.id===pp},vp=function(e,t){for(;t&&t!==e;){if(t.id===pp)return t;t=t.parentNode}return null},yp=function(e){return"string"==typeof e.start},bp=function(e){return e.hasOwnProperty("rng")},Cp=function(e){return e.hasOwnProperty("id")},wp=function(e){return e.hasOwnProperty("name")},xp=function(e){return to.isArray(e.start)},Sp=function(e,t){return _i(t)&&e.isBlock(t)&&!t.innerHTML&&!Hr.ie&&(t.innerHTML='<br data-mce-bogus="1" />'),t},Np=function(e,t){var n,r=e.createRng();return n=Sd(e.getRoot(),t.start),r.setStart(n.container(),n.offset()),n=Sd(e.getRoot(),t.end),r.setEnd(n.container(),n.offset()),r},Ep=function(e,t){var n=e.ownerDocument.createTextNode(zf);e.appendChild(n),t.setStart(n,0),t.setEnd(n,0)},kp=function(e){return e.hasChildNodes()===!1},_p=function(e,t){return gp(e).fold(function(){return!1},function(e){return t.setStart(e.container(),e.offset()),t.setEnd(e.container(),e.offset()),!0})},Tp=function(e,t,n){return kp(t)&&vp(e,t)?(Ep(t,n),!0):!1},Rp=function(e,t,n,r){var o,i,a,u,c=n[t?"start":"end"],s=e.getRoot();if(c){for(a=c[0],i=s,o=c.length-1;o>=1;o--){if(u=i.childNodes,Tp(s,i,r))return!0;if(c[o]>u.length-1)return Tp(s,i,r)?!0:_p(i,r);i=u[c[o]]}3===i.nodeType&&(a=Math.min(c[0],i.nodeValue.length)),1===i.nodeType&&(a=Math.min(c[0],i.childNodes.length)),t?r.setStart(i,a):r.setEnd(i,a)}return!0},Ap=function(e){return Mi(e)&&e.data.length>0},Dp=function(e,t,n){var r,o,i,a,u,c,s=e.get(n.id+"_"+t),f=n.keep;if(s){if(r=s.parentNode,"start"===t?(f?s.hasChildNodes()?(r=s.firstChild,o=1):Ap(s.nextSibling)?(r=s.nextSibling,o=0):Ap(s.previousSibling)?(r=s.previousSibling,o=s.previousSibling.data.length):(r=s.parentNode,o=e.nodeIndex(s)+1):o=e.nodeIndex(s),u=r,c=o):(f?s.hasChildNodes()?(r=s.firstChild,o=1):Ap(s.previousSibling)?(r=s.previousSibling,o=s.previousSibling.data.length):(r=s.parentNode,o=e.nodeIndex(s)):o=e.nodeIndex(s),u=r,c=o),!f){for(a=s.previousSibling,i=s.nextSibling,to.each(to.grep(s.childNodes),function(e){Mi(e)&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});s=e.get(n.id+"_"+t);)e.remove(s,!0);a&&i&&a.nodeType===i.nodeType&&Mi(a)&&!Hr.opera&&(o=a.nodeValue.length,a.appendData(i.nodeValue),e.remove(i),"start"===t?(u=a,c=o):(u=a,c=o))}return Tt.some(id(u,c))}return Tt.none()},Op=function(e,t){var n=e.createRng();return Rp(e,!0,t,n)&&Rp(e,!1,t,n)?Tt.some(n):Tt.none()},Bp=function(e,t){var n=Dp(e,"start",t),r=Dp(e,"end",t);return al(n,r.or(n),function(t,n){var r=e.createRng();return r.setStart(Sp(e,t.container()),t.offset()),r.setEnd(Sp(e,n.container()),n.offset()),r})},Pp=function(e,t){return Tt.from(e.select(t.name)[t.index]).map(function(t){var n=e.createRng();return n.selectNode(t),n})},Lp=function(e,t){var n=e.dom;if(t){if(xp(t))return Op(n,t);if(yp(t))return Tt.some(Np(n,t));if(Cp(t))return Bp(n,t);if(wp(t))return Pp(n,t);if(bp(t))return Tt.some(t.rng)}return Tt.none()},Ip=function(e,t,n){return Fd(e,t,n)},Mp=function(e,t){Lp(e,t).each(function(t){e.setRng(t)})},Fp=function(e){return _i(e)&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},Up=function(e){return function(t){return e===t}},zp=Up(su),jp=function(e){return""!==e&&-1!==" \f\n\r ".indexOf(e)},Hp=function(e){return!jp(e)&&!zp(e)},Vp=function(e){return!!e.nodeType},qp=function(e){return e&&/^(IMG)$/.test(e.nodeName)},$p=function(e,t,n){var r,o,i,a=n.startOffset,u=n.startContainer;if((n.startContainer!==n.endContainer||!qp(n.startContainer.childNodes[n.startOffset]))&&1===u.nodeType)for(i=u.childNodes,a<i.length?(u=i[a],r=new jc(u,e.getParent(u,e.isBlock))):(u=i[i.length-1],r=new jc(u,e.getParent(u,e.isBlock)),r.next(!0)),o=r.current();o;o=r.next())if(3===o.nodeType&&!Yp(o))return n.setStart(o,0),void t.setRng(n)},Wp=function(e,t,n){if(e){var r=t?"nextSibling":"previousSibling";for(e=n?e:e[r];e;e=e[r])if(1===e.nodeType||!Yp(e))return e}},Kp=function(e,t){return Vp(t)&&(t=t.nodeName),!!e.schema.getTextBlockElements()[t.toLowerCase()]},Xp=function(e,t,n){return e.schema.isValidChild(t,n)},Yp=function(e){return e&&Mi(e)&&/^([\t \r\n]+|)$/.test(e.nodeValue)},Gp=function(e){return e&&Mi(e)&&0===e.length},Jp=function(e,t){return"string"!=typeof e?e=e(t):t&&(e=e.replace(/%(\w+)/g,function(e,n){return t[n]||e})),e},Qp=function(e,t){return e=e||"",t=t||"",e=""+(e.nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()===t.toLowerCase()},Zp=function(e,t,n){return("color"===n||"backgroundColor"===n)&&(t=e.toHex(t)),"fontWeight"===n&&700===t&&(t="bold"),"fontFamily"===n&&(t=t.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+t},eh=function(e,t,n){return Zp(e,e.getStyle(t,n),n)},th=function(e,t){var n;return e.getParent(t,function(t){return n=e.getStyle(t,"text-decoration"),n&&"none"!==n}),n},nh=function(e,t,n){return e.getParents(t,n,e.getRoot())},rh=function(e,t){var n=function(e){var t=function(e){return e.length>1&&"%"===e.charAt(0)};return Kt(["styles","attributes"],function(n){return kn(e,n).exists(function(e){var n=Lt(e)?e:En(e);return Kt(n,t)})})};return Kt(e.formatter.get(t),n)},oh=function(e,t,n){var r=["inline","block","selector","attributes","styles","classes"],o=function(e){return Sn(e,function(e,t){return Kt(r,function(e){return e===t})})};return Kt(e.formatter.get(t),function(t){var r=o(t);return Kt(e.formatter.get(n),function(e){var t=o(e);return Tn(r,t)})})},ih=Fp,ah=nh,uh=Yp,ch=Kp,sh=function(e){return"BR"===e.nodeName&&e.getAttribute("data-mce-bogus")&&!e.nextSibling},fh=function(e,t){for(var n=t;n;){if(_i(n)&&e.getContentEditable(n))return"false"===e.getContentEditable(n)?n:t;n=n.parentNode}return t},lh=function(e,t,n,r){for(var o=t.data,i=n;e?i>=0:i<o.length;e?i--:i++)if(r(o.charAt(i)))return e?i+1:i;return-1},dh=function(e,t,n){return lh(e,t,n,function(e){return zp(e)||jp(e)})},mh=function(e,t,n){return lh(e,t,n,Hp)},gh=function(e,t,n,r,o,i){var a,u=e.getParent(n,e.isBlock)||t,c=function(t,n,r){var i=Uf(e),c=o?i.backwards:i.forwards;return Tt.from(c(t,n,function(e,t){return ih(e.parentNode)?-1:(a=e,r(o,e,t))},u))},s=c(n,r,dh);return s.bind(function(e){return i?c(e.container,e.offset+(o?-1:0),mh):Tt.some(e)}).orThunk(function(){return a?Tt.some({container:a,offset:o?0:a.length}):Tt.none()})},ph=function(e,t,n,r,o){Mi(r)&&0===r.nodeValue.length&&r[o]&&(r=r[o]);for(var i=ah(e,r),a=0;a<i.length;a++)for(var u=0;u<t.length;u++){var c=t[u];if(!("collapsed"in c&&c.collapsed!==n.collapsed)&&e.is(i[a],c.selector))return i[a]}return r},hh=function(e,t,n,r){var o,i=e.dom,a=i.getRoot();if(t[0].wrapper||(o=i.getParent(n,t[0].block,a)),!o){var u=i.getParent(n,"LI,TD,TH");o=i.getParent(Mi(n)?n.parentNode:n,function(t){return t!==a&&ch(e,t)},u)}if(o&&t[0].wrapper&&(o=ah(i,o,"ul,ol").reverse()[0]||o),!o)for(o=n;o[r]&&!i.isBlock(o[r])&&(o=o[r],!Qp(o,"br")););return o||n},vh=function(e,t,n,r,o,i,a){var u,c,s;u=c=a?n:o;var f=a?"previousSibling":"nextSibling",l=e.getRoot();if(Mi(u)&&!uh(u)&&(a?r>0:i<u.nodeValue.length))return u;for(;;){if(!t[0].block_expand&&e.isBlock(c))return c;for(s=c[f];s;s=s[f])if(!ih(s)&&!uh(s)&&!sh(s))return c;if(c===l||c.parentNode===l){u=c;break}c=c.parentNode}return u},yh=function(e,t,n,r){void 0===r&&(r=!1);var o=t.startContainer,i=t.startOffset,a=t.endContainer,u=t.endOffset,c=e.dom;if(_i(o)&&o.hasChildNodes()&&(o=yl(o,i),Mi(o)&&(i=0)),_i(a)&&a.hasChildNodes()&&(a=yl(a,t.collapsed?u:u-1),Mi(a)&&(u=a.nodeValue.length)),o=fh(c,o),a=fh(c,a),(ih(o.parentNode)||ih(o))&&(o=ih(o)?o:o.parentNode,o=t.collapsed?o.previousSibling||o:o.nextSibling||o,Mi(o)&&(i=t.collapsed?o.length:0)),(ih(a.parentNode)||ih(a))&&(a=ih(a)?a:a.parentNode,a=t.collapsed?a.nextSibling||a:a.previousSibling||a,Mi(a)&&(u=t.collapsed?0:a.length)),t.collapsed){var s=gh(c,e.getBody(),o,i,!0,r);s.each(function(e){var t=e.container,n=e.offset;o=t,i=n});var f=gh(c,e.getBody(),a,u,!1,r);f.each(function(e){var t=e.container,n=e.offset;a=t,u=n})}return(n[0].inline||n[0].block_expand)&&(n[0].inline&&Mi(o)&&0!==i||(o=vh(c,n,o,i,a,u,!0)),n[0].inline&&Mi(a)&&u!==a.nodeValue.length||(a=vh(c,n,o,i,a,u,!1))),n[0].selector&&n[0].expand!==!1&&!n[0].inline&&(o=ph(c,n,t,o,"previousSibling"),a=ph(c,n,t,a,"nextSibling")),(n[0].block||n[0].selector)&&(o=hh(e,n,o,"previousSibling"),a=hh(e,n,a,"nextSibling"),n[0].block&&(c.isBlock(o)||(o=vh(c,n,o,i,a,u,!0)),c.isBlock(a)||(a=vh(c,n,o,i,a,u,!1)))),_i(o)&&(i=c.nodeIndex(o),o=o.parentNode),_i(a)&&(u=c.nodeIndex(a)+1,a=a.parentNode),{startContainer:o,startOffset:i,endContainer:a,endOffset:u}},bh=function(e,t){var n=e.childNodes;return t>=n.length?t=n.length-1:0>t&&(t=0),n[t]||e},Ch=function(e,t){return bh(e,t-1)},wh=function(e,t,n){var r=t.startContainer,o=t.startOffset,i=t.endContainer,a=t.endOffset,u=function(e){var t;return t=e[0],3===t.nodeType&&t===r&&o>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===a&&e.length>0&&t===i&&3===t.nodeType&&e.splice(e.length-1,1),e},c=function(e,t,n){for(var r=[];e&&e!==n;e=e[t])r.push(e);return r},s=function(e,t){do{if(e.parentNode===t)return e;e=e.parentNode}while(e)},f=function(e,t,r){for(var o=r?"nextSibling":"previousSibling",i=e,a=i.parentNode;i&&i!==t;i=a){a=i.parentNode;var s=c(i===e?i:i[o],o);s.length&&(r||s.reverse(),n(u(s)))}};if(1===r.nodeType&&r.hasChildNodes()&&(r=bh(r,o)),1===i.nodeType&&i.hasChildNodes()&&(i=Ch(i,a)),r===i)return n(u([r]));for(var l=e.findCommonAncestor(r,i),d=r;d;d=d.parentNode){if(d===i)return f(r,l,!0);if(d===l)break}for(var d=i;d;d=d.parentNode){if(d===r)return f(i,l);if(d===l)break}var m=s(r,l)||r,g=s(i,l)||i;f(r,m,!0);var p=c(m===r?m:m.nextSibling,"nextSibling",g===i?g.nextSibling:g);p.length&&n(u(p)),f(i,g)},xh=function(e){var t=[];if(e)for(var n=0;n<e.rangeCount;n++)t.push(e.getRangeAt(n));return t},Sh=function(e){return an(e,function(e){var t=vl(e);return t?[uo.fromDom(t)]:[]})},Nh=function(e){return xh(e).length>1},Eh=function(e){return Qt(Sh(e),Ra)},kh=function(e){return mf(e,"td[data-mce-selected],th[data-mce-selected]")},_h=function(e,t){var n=kh(t);return n.length>0?n:Eh(e)},Th=function(e){return _h(xh(e.selection.getSel()),uo.fromDom(e.getBody()))},Rh=function(e){var t=e.startContainer,n=e.startOffset;return Mi(t)?0===n?Tt.some(uo.fromDom(t)):Tt.none():Tt.from(t.childNodes[n]).map(uo.fromDom)},Ah=function(e){var t=e.endContainer,n=e.endOffset;return Mi(t)?n===t.data.length?Tt.some(uo.fromDom(t)):Tt.none():Tt.from(t.childNodes[n-1]).map(uo.fromDom)},Dh=function(e){return Ko(e).fold(yt([e]),function(t){return[e].concat(Dh(t))})},Oh=function(e){return Xo(e).fold(yt([e]),function(t){return"br"===go(t)?jo(t).map(function(t){return[e].concat(Oh(t))}).getOr([]):[e].concat(Oh(t))})},Bh=function(e,n){return al(Rh(n),Ah(n),function(n,r){var o=nn(Dh(e),t(Ao,n)),i=nn(Oh(e),t(Ao,r));return o.isSome()&&i.isSome()}).getOr(!1)},Ph=function(e,t,n,r){var o=n,i=new jc(n,o),a=e.schema.getNonEmptyElements();do{if(3===n.nodeType&&0!==to.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))},Lh=function(e){var t=e.selection.getSel();return t&&t.rangeCount>0},Ih=function(e,t){var n=Th(e);n.length>0?Yt(n,function(n){var r=n.dom(),o=e.dom.createRng();o.setStartBefore(r),o.setEndAfter(r),t(o,!0)}):t(e.selection.getRng(),!1)},Mh=function(e,t,n){var r=Md(e,t);n(r),e.moveToBookmark(r)},Fh=_(bo,"text"),Uh=function(e){return Fh.get(e)},zh=function(e){return bo(e)&&Uh(e)===cu},jh=function(e,t,n,r){return Fo(t).fold(function(){return"skipping"},function(o){return"br"===r||zh(t)?"valid":Sf(t)?"existing":hp(t)?"caret":Xp(e,n,r)&&Xp(e,go(o),n)?"valid":"invalid-child"})},Hh=function(e,t){var n=yh(e,t,[{inline:!0}]);t.setStart(n.startContainer,n.startOffset),t.setEnd(n.endContainer,n.endOffset),e.selection.setRng(t)},Vh=function(e,t,n,o){var i=t.uid,a=void 0===i?Af("mce-annotation"):i,u=r(t,["uid"]),c=uo.fromTag("span",e);cf(c,bf()),Wi(c,""+wf(),a),Wi(c,""+Cf(),n);var s=o(a,u),f=s.attributes,l=void 0===f?{}:f,d=s.classes,m=void 0===d?[]:d;return Ki(c,l),Df(c,m),c},qh=function(e,t,n,r,o){var i=[],a=Vh(e.getDoc(),o,n,r),u=Ms(Tt.none()),c=function(){u.set(Tt.none())},s=function(){return u.get().getOrThunk(function(){var e=If(a);return i.push(e),u.set(Tt.some(e)),e})},f=function(e){Yt(e,l)},l=function(t){var n=jh(e,t,"span",go(t));switch(n){case"invalid-child":c();var r=$o(t);f(r),c();break;case"valid":var o=s();ai(t,o)}},d=function(e){var t=Xt(e,uo.fromDom);f(t)};return wh(e.dom,t,function(e){c(),d(e)}),i},$h=function(e,t,n,r){e.undoManager.transact(function(){var o=e.selection,i=o.getRng(),a=Th(e).length>0;if(i.collapsed&&!a&&Hh(e,i),o.getRng().collapsed&&!a){var u=Vh(e.getDoc(),r,t,n.decorate);Pf(u,su),o.getRng().insertNode(u.dom()),o.select(u.dom())}else Mh(o,!1,function(){Ih(e,function(o){qh(e,o,t,n.decorate,r)})})})},Wh=function(e){var t=Tf();_f(e,t);var n=kf(e);return{register:function(e,n){t.register(e,n)},annotate:function(n,r){t.lookup(n).each(function(t){$h(e,n,t,r)})},annotationChanged:function(e,t){n.addListener(e,t)},remove:function(t){xf(e,Tt.some(t)).each(function(e){var t=e.elements;Yt(t,li)})},getAll:function(t){var n=Ef(e,t);return yn(n,function(e){return Xt(e,function(e){return e.dom()})})}}},Kh=/^[ \t\r\n]*$/,Xh={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},Yh=function(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}},Gh=function(e){if(!Kh.test(e.value))return!1;var t=e.parent;return t&&("span"!==t.name||t.attr("style"))&&/^[ ]+$/.test(e.value)?!1:!0},Jh=function(e){var t="a"===e.name&&!e.attr("href")&&e.attr("id");return e.attr("name")||e.attr("id")&&!e.firstChild||e.attr("data-mce-bookmark")||t},Qh=function(){function e(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}return e.create=function(t,n){var r=new e(t,Xh[t]||1);return n&&vn(n,function(e,t){r.attr(t,e)}),r},e.prototype.replace=function(e){var t=this;return e.parent&&e.remove(),t.insert(e,t),t.remove(),t},e.prototype.attr=function(e,t){var n,r=this;if("string"!=typeof e)return void 0!==e&&null!==e&&vn(e,function(e,t){r.attr(t,e)}),r;if(n=r.attributes){if(void 0!==t){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),r}return r}if(e in n.map){for(var 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,r}return n.map[e]}},e.prototype.clone=function(){var t,n=this,r=new e(n.name,n.type);if(t=n.attributes){var o=[];o.map={};for(var i=0,a=t.length;a>i;i++){var u=t[i];"id"!==u.name&&(o[o.length]={name:u.name,value:u.value},o.map[u.name]=u.value)}r.attributes=o}return r.value=n.value,r.shortEnded=n.shortEnded,r},e.prototype.wrap=function(e){var t=this;return t.parent.insert(e,t),e.append(t),t},e.prototype.unwrap=function(){for(var e=this,t=e.firstChild;t;){var n=t.next;e.insert(t,e,!0),t=n}e.remove()},e.prototype.remove=function(){var e=this,t=e.parent,n=e.next,r=e.prev;return t&&(t.firstChild===e?(t.firstChild=n,n&&(n.prev=null)):r.next=n,t.lastChild===e?(t.lastChild=r,r&&(r.next=null)):n.prev=r,e.parent=e.next=e.prev=null),e},e.prototype.append=function(e){var t=this;e.parent&&e.remove();var n=t.lastChild;return n?(n.next=e,e.prev=n,t.lastChild=e):t.lastChild=t.firstChild=e,e.parent=t,e},e.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,t.prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,e.prev=t,t.next=e),e.parent=r,e},e.prototype.getAll=function(e){for(var t=this,n=[],r=t.firstChild;r;r=Yh(r,t))r.name===e&&n.push(r);return n},e.prototype.empty=function(){var e=this;if(e.firstChild){for(var t=[],n=e.firstChild;n;n=Yh(n,e))t.push(n);for(var r=t.length;r--;){var n=t[r];n.parent=n.firstChild=n.lastChild=n.next=n.prev=null}}return e.firstChild=e.lastChild=null,e},e.prototype.isEmpty=function(e,t,n){void 0===t&&(t={});var r=this,o=r.firstChild;if(Jh(r))return!1;if(o)do{if(1===o.type){if(o.attr("data-mce-bogus"))continue;if(e[o.name])return!1;if(Jh(o))return!1}if(8===o.type)return!1;if(3===o.type&&!Gh(o))return!1;if(3===o.type&&o.parent&&t[o.parent.name]&&Kh.test(o.value))return!1;if(n&&n(o))return!1}while(o=Yh(o,r));return!0},e.prototype.walk=function(e){return Yh(this,null,e)},e}(),Zh=to.makeMap,ev=function(e){var t=[];e=e||{};var n=e.indent,r=Zh(e.indent_before||""),o=Zh(e.indent_after||""),i=Ja.getEncodeFunc(e.entity_encoding||"raw",e.entities),a="html"===e.element_format;return{start:function(e,u,c){var s,f,l,d;if(n&&r[e]&&t.length>0&&(d=t[t.length-1],d.length>0&&"\n"!==d&&t.push("\n")),t.push("<",e),u)for(s=0,f=u.length;f>s;s++)l=u[s],t.push(" ",l.name,'="',i(l.value,!0),'"');t[t.length]=!c||a?">":" />",c&&n&&o[e]&&t.length>0&&(d=t[t.length-1],d.length>0&&"\n"!==d&&t.push("\n"))},end:function(e){var r;t.push("</",e,">"),n&&o[e]&&t.length>0&&(r=t[t.length-1],r.length>0&&"\n"!==r&&t.push("\n"))},text:function(e,n){e.length>0&&(t[t.length]=n?e:i(e))},cdata:function(e){t.push("<![CDATA[",e,"]]>")},comment:function(e){t.push("<!--",e,"-->")},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$/,"")}}},tv=function(e,t){void 0===t&&(t=i());var n=ev(e);e=e||{},e.validate="validate"in e?e.validate:!0;var r=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)do a(e);while(e=e.next)}};n.reset();var a=function(e){var r,u,c,s,f,l,d,m,g,p=i[e.type];if(p)p(e);else{if(r=e.name,u=e.shortEnded,c=e.attributes,o&&c&&c.length>1&&(l=[],l.map={},g=t.getElementRule(e.name))){for(d=0,m=g.attributesOrder.length;m>d;d++)s=g.attributesOrder[d],s in c.map&&(f=c.map[s],l.map[s]=f,l.push({name:s,value:f}));for(d=0,m=c.length;m>d;d++)s=c[d].name,s in l.map||(f=c.map[s],l.map[s]=f,l.push({name:s,value:f}));c=l}if(n.start(e.name,c,u),!u){if(e=e.firstChild)do a(e);while(e=e.next);n.end(r)}}};return 1!==r.type||e.inner?i[11](r):a(r),n.getContent()};return{serialize:r}},nv=function(e){for(var t,n=/data:[^;]+;base64,([a-z0-9\+\/=]+)/gi,r=[],o={},i=Af("img"),a=0,u=0;t=n.exec(e);){var c=t[0],s=i+"_"+u++;o[s]=c,a<t.index&&r.push(e.substr(a,t.index-a)),r.push(s),a=t.index+c.length}return 0===a?{prefix:i,uris:o,html:e}:(a<e.length&&r.push(e.substr(a)),{prefix:i,uris:o,html:r.join("")})},rv=function(e,t){return e.replace(new RegExp(t.prefix+"_[0-9]+","g"),function(e){return kn(t.uris,e).getOr(e)})},ov=function(e){var t=/data:([^;]+);base64,([a-z0-9\+\/=]+)/i.exec(e);return t?Tt.some({type:t[1],data:decodeURIComponent(t[2])}):Tt.none()},iv=function(e){return 0===e.indexOf("data-")||0===e.indexOf("aria-")},av=function(e,t){return e.allow_html_data_urls?!1:/^data:image\//i.test(t)?e.allow_svg_data_urls===!1&&/^data:image\/svg\+xml/i.test(t):/^data:/i.test(t)},uv=function(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},cv=function(e,t){return/^\s*\[if [\w\W]+\]>.*<!\[endif\](--!?)?>/.test(e.substr(t))},sv=function(e,t,n){void 0===n&&(n=0);var r=e.toLowerCase();if(-1!==r.indexOf("[if ",n)&&cv(r,n)){var o=r.indexOf("[endif]",n);return r.indexOf(">",o)}if(t){var i=r.indexOf(">",n);return-1!==i?i:r.length}var a=/--!?>/;a.lastIndex=n;var u=a.exec(e);return u?u.index+u[0].length:r.length},fv=function(e,t){var n=e.exec(t);if(n){var r=n[1],o=n[2];return"string"==typeof r&&"data-mce-bogus"===r.toLowerCase()?o:null}return null};!function(e){e.findEndTag=uv}(T||(T={}));var lv,dv=T,mv=function(e,t){var n=new RegExp(["\\s?("+e.join("|")+')="[^"]+"'].join("|"),"gi");return t.replace(n,"")},gv=function(e,t){var n,r,o,i,a=t,u=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,c=e.schema;a=mv(e.getTempAttrs(),a);for(var s=c.getShortEndedElements();i=u.exec(a);)r=u.lastIndex,o=i[0].length,n=s[i[1]]?r:dv.findEndTag(c,a,r),a=a.substring(0,r-o)+a.substring(n),u.lastIndex=r-o;return Hf(a)},pv=gv,hv=function(e,t){var n=Gd(e),r=new RegExp("^(<"+n+"[^>]*>(&nbsp;|&#160;|\\s| |<br \\/>|)<\\/"+n+">[\r\n]*|<br \\/>[\r\n]*)$");return t.replace(r,"")},vv=function(e,t,n,r){var o;if(t.format=n,t.get=!0,t.getInner=!0,t.no_events||e.fire("BeforeGetContent",t),"raw"===t.format)o=to.trim(pv(e.serializer,r.innerHTML));else if("text"===t.format)o=Hf(r.innerText||r.textContent);else{if("tree"===t.format)return e.serializer.serialize(r,t);o=hv(e,e.serializer.serialize(r,t))}return t.content="text"===t.format||Aa(uo.fromDom(r))?o:to.trim(o),t.no_events||e.fire("GetContent",t),t.content},yv=function(e,t,n){return Tt.from(e.getBody()).fold(yt("tree"===t.format?new Qh("body",11):""),function(r){return vv(e,t,n,r)})},bv=to.each,Cv=function(e){this.compare=function(t,n){if(t.nodeName!==n.nodeName)return!1;var r=function(t){var n={};return bv(e.getAttribs(t),function(r){var o=r.nodeName.toLowerCase();0!==o.indexOf("_")&&"style"!==o&&0!==o.indexOf("data-")&&(n[o]=e.getAttrib(t,o))}),n},o=function(e,t){var n,r;for(r in e)if(e.hasOwnProperty(r)){if(n=t[r],"undefined"==typeof n)return!1;if(e[r]!==n)return!1;delete t[r]}for(r in t)if(t.hasOwnProperty(r))return!1;return!0};return o(r(t),r(n))&&o(e.parseStyle(e.getAttrib(t,"style")),e.parseStyle(e.getAttrib(n,"style")))?!Fp(t)&&!Fp(n):!1}},wv=function(e,t,n){return Tt.from(n.container()).filter(Mi).exists(function(r){var o=e?0:-1;return t(r.data.charAt(n.offset()+o))})},xv=t(wv,!0,jp),Sv=t(wv,!1,jp),Nv=function(e){var t=e.container();return Mi(t)&&0===t.data.length},Ev=function(e,t){return function(n){return Tt.from(Tg(e?0:-1,n)).filter(t).isSome()}},kv=function(e){return"IMG"===e.nodeName&&"block"===Zi(uo.fromDom(e),"display")},_v=function(e){return Vi(e)&&!Bi(e)},Tv=Ev(!0,kv),Rv=Ev(!1,kv),Av=Ev(!0,Pi),Dv=Ev(!1,Pi),Ov=Ev(!0,_v),Bv=Ev(!1,_v),Pv=function(e,t,n){return hf(e,t,n).isSome()},Lv=function(e,n){var r=uo.fromDom(e),o=uo.fromDom(n);return Pv(o,"pre,code",t(Ao,r))},Iv=function(e,t){return Mi(t)&&/^[ \t\r\n]*$/.test(t.data)&&Lv(e,t)===!1},Mv=function(e){return _i(e)&&"A"===e.nodeName&&e.hasAttribute("name")},Fv=function(e,t){return Dl(t)&&Iv(e,t)===!1||Mv(t)||Uv(t)},Uv=Ai("data-mce-bookmark"),zv=Ai("data-mce-bogus"),jv=Di("data-mce-bogus","all"),Hv=function(e,t){var n,r=0;if(Fv(e,e))return!1;if(n=e.firstChild,!n)return!0;var o=new jc(n,e);do{if(t){if(jv(n)){n=o.next(!0);continue}if(zv(n)){n=o.next();continue}}if(ji(n))r++,n=o.next();else{if(Fv(e,n))return!1;n=o.next()}}while(n);return 1>=r},Vv=function(e,t){return void 0===t&&(t=!0),Hv(e.dom(),t)},qv=function(e){for(var t=[],n=e.dom();n;)t.push(uo.fromDom(n)),n=n.lastChild;return t},$v=function(e){var t=mf(e,"br"),n=Qt(qv(e).slice(-1),Sa);t.length===n.length&&Yt(n,fi)},Wv=function(e){si(e),ii(e,uo.fromHtml('<br data-mce-bogus="1">'))},Kv=function(e){Xo(e).each(function(t){jo(t).each(function(n){Ca(e)&&Sa(t)&&Ca(n)&&fi(t)})})},Xv=function(e){return e.slice(0,-1)},Yv=function(e,t,n){return Bo(t,e)?Xv(Uo(e,function(e){return n(e)||Ao(e,t)})):[]},Gv=function(e,t){return Yv(e,t,yt(!1))},Jv=function(e,t){return[e].concat(Gv(e,t))},Qv=function(e,t,n){var r=en(e,function(r,o){return jp(o)||zp(o)?r.previousCharIsSpace||""===r.str&&t||r.str.length===e.length-1&&n?{previousCharIsSpace:!1,str:r.str+su}:{previousCharIsSpace:!0,str:r.str+" "}:{previousCharIsSpace:!1,str:r.str+o}},{previousCharIsSpace:!1,str:""});return r.str},Zv=function(e,t,n){if(0!==n){var r=e.data.slice(t,t+n),o=t+n>=e.data.length,i=0===t;e.replaceData(t,n,Qv(r,i,o))}},ey=function(e,t){var n=e.data.slice(t),r=n.length-xr(n).length;return Zv(e,t,r)},ty=function(e,t){var n=e.data.slice(0,t),r=n.length-Sr(n).length;return Zv(e,t-r,r)},ny=function(e,t,n){var r=Sr(e.data).length;return e.appendData(t.data),fi(uo.fromDom(t)),n&&ey(e,r),e},ry=function(e,t){var n=e.container(),r=e.offset();return id.isTextPosition(e)===!1&&n===t.parentNode&&r>id.before(t).offset()},oy=function(e,t){return ry(t,e)?id(t.container(),t.offset()-1):t},iy=function(e){return Mi(e)?id(e,0):id.before(e)},ay=function(e){return Mi(e)?id(e,e.data.length):id.after(e)},uy=function(e){return Dl(e.previousSibling)?Tt.some(ay(e.previousSibling)):e.previousSibling?gp(e.previousSibling):Tt.none()},cy=function(e){return Dl(e.nextSibling)?Tt.some(iy(e.nextSibling)):e.nextSibling?mp(e.nextSibling):Tt.none()},sy=function(e,t){var n=id.before(t.previousSibling?t.previousSibling:t.parentNode);return dp(e,n).fold(function(){return lp(e,id.after(t))},Tt.some)},fy=function(e,t){return lp(e,id.after(t)).fold(function(){return dp(e,id.before(t))},Tt.some)},ly=function(e,t){return uy(t).orThunk(function(){return cy(t)}).orThunk(function(){return sy(e,t)})},dy=function(e,t){return cy(t).orThunk(function(){return uy(t)}).orThunk(function(){return fy(e,t)})},my=function(e,t,n){return e?dy(t,n):ly(t,n)},gy=function(e,n,r){return my(e,n,r).map(t(oy,r))},py=function(e,t,n){n.fold(function(){e.focus()},function(n){e.selection.setRng(n.toRange(),t)})},hy=function(e){return function(t){return t.dom()===e}},vy=function(e,t){return t&&e.schema.getBlockElements().hasOwnProperty(go(t))},yy=function(e){if(Vv(e)){var t=uo.fromHtml('<br data-mce-bogus="1">');return si(e),ii(e,t),Tt.some(id.before(t.dom()))}return Tt.none()},by=function(e,t,n){var r=jo(e).filter(bo),o=Ho(e).filter(bo);return fi(e),ul(r,o,t,function(e,t,r){var o=e.dom(),i=t.dom(),a=o.data.length;return ny(o,i,n),r.container()===i?id(o,a):r}).orThunk(function(){return n&&(r.each(function(e){return ty(e.dom(),e.dom().length)}),o.each(function(e){return ey(e.dom(),0)})),t})},Cy=function(e,t){return _n(e.schema.getTextInlineElements(),go(t))},wy=function(e,n,r,o){void 0===o&&(o=!0);var i=gy(n,e.getBody(),r.dom()),a=gf(r,t(vy,e),hy(e.getBody())),u=by(r,i,Cy(e,r));e.dom.isEmpty(e.getBody())?(e.setContent(""),e.selection.setCursorLocation()):a.bind(yy).fold(function(){o&&py(e,n,u)},function(t){o&&py(e,n,Tt.some(t))})},xy=function(e,t){return{start:e,end:t}},Sy=function(e,t,n){return{rng:e,table:t,cells:n}},Ny=us.generate([{removeTable:["element"]},{emptyCells:["cells"]},{deleteCellSelection:["rng","cell"]}]),Ey=function(e){return function(t){return Ao(e,t)}},ky=function(e,t){return yf(uo.fromDom(e),"td,th",t)},_y=function(e,t){return hf(e,"table",t)},Ty=function(e){return!Ao(e.start,e.end)},Ry=function(e,t){return _y(e.start,t).bind(function(n){return _y(e.end,t).bind(function(e){return cl(Ao(n,e),n)})})},Ay=function(e,t){return!Ty(e)&&Ry(e,t).exists(function(e){var t=e.dom().rows;return 1===t.length&&1===t[0].cells.length})},Dy=function(e){return mf(e,"td,th")},Oy=function(e,t){var n=ky(e.startContainer,t),r=ky(e.endContainer,t);return al(n,r,xy)},By=function(e,t){return _y(e.start,t).bind(function(t){return mn(Dy(t)).map(function(t){return xy(e.start,t)})})},Py=function(e,t){var n=ky(t.startContainer,e),r=ky(t.endContainer,e);return t.collapsed?Tt.none():al(n,r,xy).fold(function(){return n.fold(function(){return r.bind(function(t){return _y(t,e).bind(function(e){return dn(Dy(e)).map(function(e){return xy(e,t)})})})},function(t){return _y(t,e).bind(function(e){return mn(Dy(e)).map(function(e){return xy(t,e)})})})},function(t){return Ly(e,t)?Tt.none():By(t,e)})},Ly=function(e,t){return Ry(t,e).isSome()},Iy=function(e,t){return Ry(e,t).map(function(t){return Sy(e,t,Dy(t))})},My=function(e,t,n){return e.filter(function(e){return Ty(e)&&Ly(n,e)}).orThunk(function(){return Py(n,t)}).bind(function(e){return Iy(e,n)})},Fy=function(e,t){return rn(e,function(e){return Ao(e,t)})},Uy=function(e){return al(Fy(e.cells,e.rng.start),Fy(e.cells,e.rng.end),function(t,n){return e.cells.slice(t,n+1)})},zy=function(e,t,n){return e.filter(function(e){return Ay(e,n)&&Bh(e.start,t)}).map(function(e){return e.start})},jy=function(e){return Uy(e).map(function(t){var n=e.cells;return t.length===n.length?Ny.removeTable(e.table):Ny.emptyCells(t)})},Hy=function(e,t){var n=Ey(e),r=Oy(t,n);return zy(r,t,n).map(function(e){return Ny.deleteCellSelection(t,e)}).orThunk(function(){return My(r,t,n).bind(jy)})},Vy=function(e){var t=vo(e)?jo(e):Xo(e);return t.bind(Vy).orThunk(function(){return Tt.some(e)})},qy=function(e,t){return Yt(t,Wv),e.selection.setCursorLocation(t[0].dom(),0),!0},$y=function(e,t,n){t.deleteContents();var r=Vy(n).getOr(n),o=uo.fromDom(e.dom.getParent(r.dom(),e.dom.isBlock));if(Vv(o)&&(Wv(o),e.selection.setCursorLocation(o.dom(),0)),!Ao(n,o)){var i=Fo(o).is(n)?[]:zo(o);Yt(i.concat($o(n)),function(e){Ao(e,o)||Bo(e,o)||fi(e)})}return!0},Wy=function(e,t){return wy(e,!1,t),!0},Ky=function(e,n,r){return Hy(n,r).map(function(n){return n.fold(t(Wy,e),t(qy,e),t($y,e))})},Xy=function(e,t){return eb(e,t)},Yy=function(e,t,n,r){return Qy(t,r).fold(function(){return Ky(e,t,n)},function(t){return Xy(e,t)}).getOr(!1)},Gy=function(e,t){var n=uo.fromDom(e.getBody()),r=e.selection.getRng(),o=Th(e);return 0!==o.length?qy(e,o):Yy(e,n,r,t)},Jy=function(e,t){return nn(Jv(t,e),Ra)},Qy=function(e,t){return nn(Jv(t,e),function(e){return"caption"===go(e)})},Zy=function(e,t,n,r,o){return cp(n,e.getBody(),o).bind(function(e){return Jy(t,uo.fromDom(e.getNode())).map(function(e){return Ao(e,r)===!1})})},eb=function(e,t){return Wv(t),e.selection.setCursorLocation(t.dom(),0),Tt.some(!0)},tb=function(e,t,n,r){return mp(e.dom()).bind(function(o){return gp(e.dom()).map(function(e){return t?n.isEqual(o)&&r.isEqual(e):n.isEqual(e)&&r.isEqual(o)})}).getOr(!0)},nb=function(e,t){return eb(e,t)},rb=function(e,t,n){return Qy(e,uo.fromDom(n.getNode())).map(function(e){return Ao(e,t)===!1})},ob=function(e,t,n,r,o){return cp(n,e.getBody(),o).bind(function(i){return tb(r,n,o,i)?nb(e,r):rb(t,r,i)}).or(Tt.some(!0))},ib=function(e,t,n,r){var o=id.fromRangeStart(e.selection.getRng());return Jy(n,r).bind(function(r){return Vv(r)?eb(e,r):Zy(e,n,t,r,o)}).getOr(!1)},ab=function(e,t,n,r){var o=id.fromRangeStart(e.selection.getRng());return Vv(r)?eb(e,r):ob(e,n,t,r,o)},ub=function(e,t){return e?Av(t):Dv(t)},cb=function(e,t){var n=id.fromRangeStart(e.selection.getRng());return ub(t,n)||up(t,e.getBody(),n).map(function(e){return ub(t,e)}).getOr(!1)},sb=function(e,t,n){var r=uo.fromDom(e.getBody());return Qy(r,n).fold(function(){return ib(e,t,r,n)||cb(e,t)},function(n){return ab(e,t,r,n).getOr(!1)})},fb=function(e,t){var n=uo.fromDom(e.selection.getStart(!0)),r=Th(e);return e.selection.isCollapsed()&&0===r.length?sb(e,t,n):Gy(e,n)},lb=function(t,n,r,o){var i=e.document.createRange();return i.setStart(t,n),i.setEnd(r,o),i},db=function(e){var t=id.fromRangeStart(e),n=id.fromRangeEnd(e),r=e.commonAncestorContainer;return up(!1,r,n).map(function(o){return!_g(t,n,r)&&_g(t,o,r)?lb(t.container(),t.offset(),o.container(),o.offset()):e}).getOr(e)},mb=function(e){return e.collapsed?e:db(e)},gb=function(e){return e.firstChild&&e.firstChild===e.lastChild},pb=function(e){return"br"===e.name||e.value===su},hb=function(e,t){var n=e.getBlockElements();return n[t.name]&&gb(t)&&pb(t.firstChild)},vb=function(e,t){var n=e.getNonEmptyElements();return t&&(t.isEmpty(n)||hb(e,t))},yb=function(e,t){var n=t.firstChild,r=t.lastChild;return n&&"meta"===n.name&&(n=n.next),r&&"mce_marker"===r.attr("id")&&(r=r.prev),vb(e,r)&&(r=r.prev),n&&n===r?"ul"===n.name||"ol"===n.name:!1},bb=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},Cb=function(e,t,n){var r=t.serialize(n),o=e.createFragment(r);return bb(o)},wb=function(e){return to.grep(e.childNodes,function(e){return"LI"===e.nodeName})},xb=function(e){return e.data===su||ji(e)},Sb=function(e){return e&&e.firstChild&&e.firstChild===e.lastChild&&xb(e.firstChild)},Nb=function(e){return!e.firstChild||Sb(e)},Eb=function(e){return e.length>0&&Nb(e[e.length-1])?e.slice(0,-1):e},kb=function(e,t){var n=e.getParent(t,e.isBlock);return n&&"LI"===n.nodeName?n:null},_b=function(e,t){return!!kb(e,t)},Tb=function(e,t){var n=t.cloneRange(),r=t.cloneRange();return n.setStartBefore(e),r.setEndAfter(e),[n.cloneContents(),r.cloneContents()]},Rb=function(e,t){var n=id.before(e),r=Zg(t),o=r.next(n);return o?o.toRange():null},Ab=function(e,t){var n=id.after(e),r=Zg(t),o=r.prev(n);return o?o.toRange():null},Db=function(e,t,n,r){var o=Tb(e,r),i=e.parentNode;return i.insertBefore(o[0],e),to.each(t,function(t){i.insertBefore(t,e)}),i.insertBefore(o[1],e),i.removeChild(e),Ab(t[t.length-1],n)},Ob=function(e,t,n){var r=e.parentNode;return to.each(t,function(t){r.insertBefore(t,e)}),Rb(e,n)},Bb=function(e,t,n,r){return r.insertAfter(t.reverse(),e),Ab(t[0],n)},Pb=function(e,t,n,r){var o=Cb(t,e,r),i=kb(t,n.startContainer),a=Eb(wb(o.firstChild)),u=1,c=2,s=t.getRoot(),f=function(e){var r=id.fromRangeStart(n),o=Zg(t.getRoot()),a=e===u?o.prev(r):o.next(r);return a?kb(t,a.getNode())!==i:!0};return f(u)?Ob(i,a,s):f(c)?Bb(i,a,s,t):Db(i,a,s,n)},Lb=function(e,t){return Mi(e)&&e.nodeValue[t-1]===su},Ib=function(e,t){var n=e.startContainer,r=e.startOffset,o=function(e){return n[e]&&3===n[e].nodeType};return Mi(n)&&(r>0?t=t.replace(/^&nbsp;/," "):o("previousSibling")||(t=t.replace(/^ /,"&nbsp;")),r<n.length?t=t.replace(/&nbsp;(<br>|)$/," "):o("nextSibling")||(t=t.replace(/(&nbsp;| )(<br>|)$/,"&nbsp;"))),t},Mb=function(e,t){var n=e.startContainer,r=e.startOffset;return Mi(n)&&e.collapsed&&(n.data[r]===su?(n.deleteData(r,1),/[\u00a0| ]$/.test(t)||(t+=" ")):n.data[r-1]===su&&(n.deleteData(r-1,1),/[\u00a0| ]$/.test(t)||(t=" "+t))),t},Fb=Ti(["td","th"]),Ub=function(e,t,n){if(null!==n){var r=e.getParent(t.endContainer,Fb);return n===r&&Bh(uo.fromDom(n),t)}return!1},zb=function(e,t){var n=e.selection.getRng(),r=n.startContainer,o=n.startOffset;n.collapsed&&Lb(r,o)&&Mi(r)&&(r.insertData(o-1," "),r.deleteData(o,1),n.setStart(r,o),n.setEnd(r,o),e.selection.setRng(n)),e.selection.setContent(t)},jb=function(e,t,n){if("all"===n.getAttribute("data-mce-bogus"))n.parentNode.insertBefore(e.dom.createFragment(t),n);else{var r=n.firstChild,o=n.lastChild;!r||r===o&&"BR"===r.nodeName?e.dom.setHTML(n,t):zb(e,t)}},Hb=function(e,t){Tt.from(e.getParent(t,"td,th")).map(uo.fromDom).each(Kv)},Vb=function(e,t){var n=e.schema.getTextInlineElements(),r=e.dom;if(t){var o=e.getBody(),i=new Cv(r);to.each(r.select("*[data-mce-fragment]"),function(e){for(var t=e.parentNode;t&&t!==o;t=t.parentNode)n[e.nodeName.toLowerCase()]&&i.compare(t,e)&&r.remove(e,!0)})}},qb=function(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")},$b=function(e){to.each(e.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")})},Wb=function(e){return!!e.getAttribute("data-mce-fragment")},Kb=function(e,t){return t&&!e.schema.getShortEndedElements()[t.nodeName]},Xb=function(e,t){var n,r,o=e.dom,i=e.selection,a=function(t){for(var n=e.getBody();t&&t!==n;t=t.parentNode)if("false"===e.dom.getContentEditable(t))return t;return null};if(t){e.selection.scrollIntoView(t);var u=a(t);if(u)return o.remove(t),void i.select(u);var c=o.createRng(),s=t.previousSibling;s&&3===s.nodeType?(c.setStart(s,s.nodeValue.length),Hr.ie||(r=t.nextSibling,r&&3===r.nodeType&&(s.appendData(r.data),r.parentNode.removeChild(r)))):(c.setStartBefore(t),c.setEndBefore(t));var f=function(t){var n=id.fromRangeStart(t),r=Zg(e.getBody());return n=r.next(n),n?n.toRange():void 0},l=o.getParent(t,o.isBlock);o.remove(t),l&&o.isEmpty(l)&&(e.$(l).empty(),c.setStart(l,0),c.setEnd(l,0),Fb(l)||Wb(l)||!(n=f(c))?o.add(l,o.create("br",{"data-mce-bogus":"1"})):(c=n,o.remove(l))),i.setRng(c)}},Yb=function(e){var t=e.dom,n=mb(e.selection.getRng());e.selection.setRng(n);var r=t.getParent(n.startContainer,Fb);Ub(t,n,r)?$y(e,n,uo.fromDom(r)):e.getDoc().execCommand("Delete",!1,null)},Gb=function(e,t,n){var r,o,i,a,u,c,s=e.selection,f=e.dom;/^ | $/.test(t)&&(t=Ib(s.getRng(),t));var l=e.parser,d=n.merge,m=tv({validate:Rm(e)},e.schema),g='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;&#x200B;</span>';if(i={content:t,format:"html",selection:!0,paste:n.paste},i=e.fire("BeforeSetContent",i),i.isDefaultPrevented())return void e.fire("SetContent",{content:i.content,format:"html",selection:!0,paste:n.paste});t=i.content,-1===t.indexOf("{$caret}")&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,g),u=s.getRng();var p=u.startContainer||(u.parentElement?u.parentElement():null),h=e.getBody();p===h&&s.isCollapsed()&&f.isBlock(h.firstChild)&&Kb(e,h.firstChild)&&f.isEmpty(h.firstChild)&&(u=f.createRng(),u.setStart(h.firstChild,0),u.setEnd(h.firstChild,0),s.setRng(u)),s.isCollapsed()||(Yb(e),t=Mb(e.selection.getRng(),t)),r=s.getNode();var v={context:r.nodeName.toLowerCase(),data:n.data,insert:!0},y=l.parse(t,v);if(n.paste===!0&&yb(e.schema,y)&&_b(f,r))return u=Pb(m,f,e.selection.getRng(),y),e.selection.setRng(u),void e.fire("SetContent",i);if(qb(y),c=y.lastChild,"mce_marker"===c.attr("id"))for(a=c,c=c.prev;c;c=c.walk(!0))if(3===c.type||!f.isBlock(c.name)){e.schema.isValidChild(c.parent.name,"span")&&c.parent.insert(a,c,"br"===c.name);break}if(e._selectionOverrides.showBlockCaretContainer(r),v.invalid){for(zb(e,g),r=s.getNode(),o=e.getBody(),9===r.nodeType?r=c=o:c=r;c!==o;)r=c,c=c.parentNode;t=r===o?o.innerHTML:f.getOuterHTML(r),t=m.serialize(l.parse(t.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return m.serialize(y)}))),r===o?f.setHTML(o,t):f.setOuterHTML(r,t)}else t=m.serialize(y),jb(e,t,r);Vb(e,d),Xb(e,f.get("mce_marker")),$b(e.getBody()),Hb(e.dom,e.selection.getStart()),e.fire("SetContent",i),e.addVisual()},Jb=function(){return uo.fromDom(e.document)},Qb=function(e){var t=Qo(e).dom();return e.dom()===t.activeElement},Zb=function(e){return void 0===e&&(e=Jb()),Tt.from(e.dom().activeElement).map(uo.fromDom)},eC=function(e){return Zb(Qo(e)).filter(function(t){return e.dom().contains(t.dom())})},tC=function(e,t,n,r){return{start:yt(e),soffset:yt(t),finish:yt(n),foffset:yt(r)}},nC={create:tC},rC=us.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),oC=function(e,t,n,r){return e.fold(t,n,r)},iC=function(e){return e.fold(bt,bt,bt)},aC=rC.before,uC=rC.on,cC=rC.after,sC={before:aC,on:uC,after:cC,cata:oC,getStart:iC},fC=us.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),lC=function(e){return fC.exact(e.start(),e.soffset(),e.finish(),e.foffset())},dC=function(e){return e.match({domRange:function(e){return uo.fromDom(e.startContainer)},relative:function(e){return sC.getStart(e)},exact:function(e){return e}})},mC=fC.domRange,gC=fC.relative,pC=fC.exact,hC=function(e){var t=dC(e);return Mo(t)},vC=nC.create,yC={domRange:mC,relative:gC,exact:pC,exactFromRange:lC,getWin:hC,range:vC},bC=Br().browser,CC=function(e,t){var n=bo(t)?Uh(t).length:$o(t).length+1;return e>n?n:0>e?0:e},wC=function(e){return yC.range(e.start(),CC(e.soffset(),e.start()),e.finish(),CC(e.foffset(),e.finish()))},xC=function(e,t){return!ki(t.dom())&&(Bo(e,t)||Ao(e,t))},SC=function(e){return function(t){return xC(e,t.start())&&xC(e,t.finish())}},NC=function(e){return e.inline===!0||bC.isIE()},EC=function(e){return yC.range(uo.fromDom(e.startContainer),e.startOffset,uo.fromDom(e.endContainer),e.endOffset)},kC=function(e){var t=e.getSelection(),n=t&&0!==t.rangeCount?Tt.from(t.getRangeAt(0)):Tt.none();return n.map(EC)},_C=function(e){var t=Mo(e);return kC(t.dom()).filter(SC(e))},TC=function(e,t){return Tt.from(t).filter(SC(e)).map(wC)},RC=function(t){var n=e.document.createRange();try{return n.setStart(t.start().dom(),t.soffset()),n.setEnd(t.finish().dom(),t.foffset()),Tt.some(n)}catch(r){return Tt.none()}},AC=function(e){var t=NC(e)?_C(uo.fromDom(e.getBody())):Tt.none();e.bookmark=t.isSome()?t:e.bookmark},DC=function(e,t){var n=uo.fromDom(e.getBody()),r=NC(e)?Tt.from(t):Tt.none(),o=r.map(EC).filter(SC(n));e.bookmark=o.isSome()?o:e.bookmark},OC=function(e){var t=e.bookmark?e.bookmark:Tt.none();return t.bind(function(t){return TC(uo.fromDom(e.getBody()),t)}).bind(RC)},BC=function(e){OC(e).each(function(t){e.selection.setRng(t)})},PC=function(e){var t=e.className.toString();return-1!==t.indexOf("tox-")||-1!==t.indexOf("mce-")},LC={isEditorUIElement:PC},IC=function(e){return"nodechange"===e.type&&e.selectionChange},MC=function(t,n){var r=function(){n.throttle()};Ts.DOM.bind(e.document,"mouseup",r),t.on("remove",function(){Ts.DOM.unbind(e.document,"mouseup",r)})},FC=function(e){e.on("focusout",function(){AC(e)})},UC=function(e,t){e.on("mouseup touchend",function(){t.throttle()})},zC=function(e,t){var n=Br().browser;n.isIE()?FC(e):UC(e,t),e.on("keyup NodeChange",function(t){IC(t)||AC(e)})},jC=function(e){var t=Qs(function(){AC(e)},0);e.on("init",function(){e.inline&&MC(e,t),zC(e,t)}),e.on("remove",function(){t.cancel()})},HC=Ts.DOM,VC=function(e){return LC.isEditorUIElement(e)},qC=function(e){var t=e.classList;return void 0!==t?t.contains("tox-edit-area")||t.contains("tox-edit-area__iframe")||t.contains("mce-content-body"):!1},$C=function(e,t){var n=Bm(e),r=HC.getParent(t,function(t){return VC(t)||(n?e.dom.is(t,n):!1)});return null!==r},WC=function(){try{return e.document.activeElement}catch(t){return e.document.body}},KC=function(t,n){var r=n.editor;jC(r),r.on("focusin",function(){var e=this,n=t.focusedEditor;n!==e&&(n&&n.fire("blur",{focusedEditor:e}),t.setActive(e),t.focusedEditor=e,e.fire("focus",{blurredEditor:n}),e.focus(!0))}),r.on("focusout",function(){var e=this;vs.setEditorTimeout(e,function(){var n=t.focusedEditor;$C(e,WC())||n!==e||(e.fire("blur",{focusedEditor:null}),t.focusedEditor=null)})}),lv||(lv=function(n){var r=t.activeEditor,o=n.target;r&&o.ownerDocument===e.document&&(o===e.document.body||$C(r,o)||t.focusedEditor!==r||(r.fire("blur",{focusedEditor:null}),t.focusedEditor=null))},HC.bind(e.document,"focusin",lv))},XC=function(t,n){t.focusedEditor===n.editor&&(t.focusedEditor=null),t.activeEditor||(HC.unbind(e.document,"focusin",lv),lv=null)},YC=function(e){e.on("AddEditor",t(KC,e)),e.on("RemoveEditor",t(XC,e))},GC=function(e,t){return e.dom.getParent(t,function(t){return"true"===e.dom.getContentEditable(t)})},JC=function(e){return e.collapsed?Tt.from(yl(e.startContainer,e.startOffset)).map(uo.fromDom):Tt.none()},QC=function(e,t){return JC(t).bind(function(t){return Ta(t)?Tt.some(t):Bo(e,t)===!1?Tt.some(e):Tt.none()})},ZC=function(e,t){QC(uo.fromDom(e.getBody()),t).bind(function(e){return mp(e.dom())}).fold(function(){e.selection.normalize()},function(t){return e.selection.setRng(t.toRange())})},ew=function(e){if(e.setActive)try{e.setActive()}catch(t){e.focus()}else e.focus()},tw=function(e){return Qb(e)||eC(e).isSome()},nw=function(e){return e.iframeElement&&Qb(uo.fromDom(e.iframeElement))
},rw=function(e){var t=e.getBody();return t&&tw(uo.fromDom(t))},ow=function(e){return Zb().filter(function(t){return!qC(t.dom())&&$C(e,t.dom())}).isSome()},iw=function(e){return e.inline?rw(e):nw(e)},aw=function(e){return iw(e)||ow(e)},uw=function(e){var t=e.selection,n=e.getBody(),r=t.getRng();e.quirks.refreshContentEditable(),void 0!==e.bookmark&&iw(e)===!1&&OC(e).each(function(t){e.selection.setRng(t),r=t});var o=GC(e,t.getNode());return e.$.contains(n,o)?(ew(o),ZC(e,r),void cw(e)):(e.inline||(Hr.opera||ew(n),e.getWin().focus()),(Hr.gecko||e.inline)&&(ew(n),ZC(e,r)),void cw(e))},cw=function(e){return e.editorManager.setActive(e)},sw=function(e,t){e.removed||(t?cw(e):uw(e))},fw=function(e,t){t(e),e.firstChild&&fw(e.firstChild,t),e.next&&fw(e.next,t)},lw=function(e,t,n){var r={},o={},i=[];n.firstChild&&fw(n.firstChild,function(n){Yt(e,function(e){e.name===n.name&&(r[e.name]?r[e.name].nodes.push(n):r[e.name]={filter:e,nodes:[n]})}),Yt(t,function(e){"string"==typeof n.attr(e.name)&&(o[e.name]?o[e.name].nodes.push(n):o[e.name]={filter:e,nodes:[n]})})});for(var a in r)r.hasOwnProperty(a)&&i.push(r[a]);for(var u in o)o.hasOwnProperty(u)&&i.push(o[u]);return i},dw=function(e,t,n){var r=lw(e,t,n);Yt(r,function(e){Yt(e.filter.callbacks,function(t){t(e.nodes,e.filter.name,{})})})},mw="html",gw=function(e){return e instanceof Qh},pw=function(e){iw(e)&&mp(e.getBody()).each(function(t){var n=t.getNode(),r=Pi(n)?mp(n).getOr(t):t;e.selection.setRng(r.toRange())})},hw=function(e,t){e.dom.setHTML(e.getBody(),t),pw(e)},vw=function(e,t,n,r){var o,i;return 0===n.length||/^\s+$/.test(n)?(i='<br data-mce-bogus="1">',"TABLE"===t.nodeName?n="<tr><td>"+i+"</td></tr>":/^(UL|OL)$/.test(t.nodeName)&&(n="<li>"+i+"</li>"),o=Gd(e),o&&e.schema.isValidChild(t.nodeName.toLowerCase(),o.toLowerCase())?(n=i,n=e.dom.createHTML(o,Jd(e),n)):n||(n='<br data-mce-bogus="1">'),hw(e,n),e.fire("SetContent",r)):("raw"!==r.format&&(n=tv({validate:e.validate},e.schema).serialize(e.parser.parse(n,{isRootContent:!0,insert:!0}))),r.content=Aa(uo.fromDom(t))?n:to.trim(n),hw(e,r.content),r.no_events||e.fire("SetContent",r)),r.content},yw=function(e,t,n,r){dw(e.parser.getNodeFilters(),e.parser.getAttributeFilters(),n);var o=tv({validate:e.validate},e.schema).serialize(n);return r.content=Aa(uo.fromDom(t))?o:to.trim(o),hw(e,r.content),r.no_events||e.fire("SetContent",r),n},bw=function(e,t,n){return n.format=n.format?n.format:mw,n.set=!0,n.content=gw(t)?"":t,gw(t)||n.no_events||(e.fire("BeforeSetContent",n),t=n.content),Tt.from(e.getBody()).fold(yt(t),function(r){return gw(t)?yw(e,r,t,n):vw(e,r,t,n)})},Cw=function(e,t){return e.splitText(t)},ww=function(e){var t=e.startContainer,n=e.startOffset,r=e.endContainer,o=e.endOffset;return t===r&&Mi(t)?n>0&&n<t.nodeValue.length&&(r=Cw(t,n),t=r.previousSibling,o>n?(o-=n,t=r=Cw(r,o).previousSibling,o=r.nodeValue.length,n=0):o=0):(Mi(t)&&n>0&&n<t.nodeValue.length&&(t=Cw(t,n),n=0),Mi(r)&&o>0&&o<r.nodeValue.length&&(r=Cw(r,o).previousSibling,o=r.nodeValue.length)),{startContainer:t,startOffset:n,endContainer:r,endOffset:o}},xw=Qp,Sw=function(e,t,n){var r=e.formatter.get(n);if(r)for(var o=0;o<r.length;o++)if(r[o].inherit===!1&&e.dom.is(t,r[o].selector))return!0;return!1},Nw=function(e,t,n,r){var o=e.dom.getRoot();return t===o?!1:(t=e.dom.getParent(t,function(t){return Sw(e,t,n)?!0:t.parentNode===o||!!_w(e,t,n,r,!0)}),_w(e,t,n,r))},Ew=function(e,t,n){return xw(t,n.inline)?!0:xw(t,n.block)?!0:n.selector?1===t.nodeType&&e.is(t,n.selector):void 0},kw=function(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("undefined"==typeof s.length){for(a in s)if(s.hasOwnProperty(a)){if(u="attributes"===r?e.getAttrib(t,a):eh(e,t,a),o&&!u&&!n.exact)return;if((!o||n.exact)&&!xw(u,Zp(e,Jp(s[a],i),a)))return}}else for(c=0;c<s.length;c++)if("attributes"===r?e.getAttrib(t,s[c]):eh(e,t,s[c]))return n;return n},_w=function(e,t,n,r,o){var i,a,u,c,s=e.formatter.get(n),f=e.dom;if(s&&t)for(a=0;a<s.length;a++)if(i=s[a],Ew(e.dom,t,i)&&kw(f,t,i,"attributes",o,r)&&kw(f,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}},Tw=function(e,t,n,r){if(r)return Nw(e,r,t,n);if(r=e.selection.getNode(),Nw(e,r,t,n))return!0;var o=e.selection.getStart();return o!==r&&Nw(e,o,t,n)?!0:!1},Rw=function(e,t,n){var r=[],o={},i=e.selection.getStart();return e.dom.getParent(i,function(i){for(var a=0;a<t.length;a++){var u=t[a];!o[u]&&_w(e,i,u,n)&&(o[u]=!0,r.push(u))}},e.dom.getRoot()),r},Aw=function(e,t){var n,r,o,i,a,u=e.formatter.get(t),c=e.dom;if(u)for(n=e.selection.getStart(),r=nh(c,n),i=u.length-1;i>=0;i--){if(a=u[i].selector,!a||u[i].defaultBlock)return!0;for(o=r.length-1;o>=0;o--)if(c.is(r[o],a))return!0}return!1},Dw=function(e,t,n){return en(n,function(n,r){var o=rh(e,r);return e.formatter.matchNode(t,r,{},o)?n.concat([r]):n},[])},Ow=zf,Bw="_mce_caret",Pw=function(e,t){return e.importNode(t,!0)},Lw=function(e){for(var t=[];e;){if(3===e.nodeType&&e.nodeValue!==Ow||e.childNodes.length>1)return[];1===e.nodeType&&t.push(e),e=e.firstChild}return t},Iw=function(e){return Lw(e).length>0},Mw=function(e){if(e){var t=new jc(e,e);for(e=t.current();e;e=t.next())if(Mi(e))return e}return null},Fw=function(e){var t=uo.fromTag("span");return Ki(t,{id:Bw,"data-mce-bogus":"1","data-mce-type":"format-caret"}),e&&ii(t,uo.fromText(Ow)),t},Uw=function(e){var t=Mw(e);return t&&t.nodeValue.charAt(0)===Ow&&t.deleteData(0,1),t},zw=function(e,t,n){void 0===n&&(n=!0);var r=e.dom,o=e.selection;if(Iw(t))wy(e,!1,uo.fromDom(t),n);else{var i=o.getRng(),a=r.getParent(t,r.isBlock),u=i.startContainer,c=i.startOffset,s=i.endContainer,f=i.endOffset,l=Uw(t);r.remove(t,!0),u===l&&c>0&&i.setStart(l,c-1),s===l&&f>0&&i.setEnd(l,f-1),a&&r.isEmpty(a)&&Wv(uo.fromDom(a)),o.setRng(i)}},jw=function(e,t,n){void 0===n&&(n=!0);var r=e.dom,o=e.selection;if(t)zw(e,t,n);else if(t=vp(e.getBody(),o.getStart()),!t)for(;t=r.get(Bw);)zw(e,t,!1)},Hw=function(e,n,r){var o=e.dom,i=o.getParent(r,t(Kp,e));i&&o.isEmpty(i)?r.parentNode.replaceChild(n,r):($v(uo.fromDom(r)),o.isEmpty(r)?r.parentNode.replaceChild(n,r):o.insertAfter(n,r))},Vw=function(e,t){return e.appendChild(t),t},qw=function(e,t){var n=Zt(e,function(e,t){return Vw(e,t.cloneNode(!1))},t);return Vw(n,n.ownerDocument.createTextNode(Ow))},$w=function(e,t,n,r,o,i){var a=e.formatter,u=e.dom,c=Qt(pn(a.get()),function(e){return"removeformat"!==e&&e!==r}),s=Dw(e,n,c),f=Qt(s,function(t){return!oh(e,t,r)});if(f.length>0){var l=n.cloneNode(!1);return u.add(t,l),a.remove(r,o,l,i),u.remove(l),Tt.some(l)}return Tt.none()},Ww=function(e,t,n){var r,o,i=e.selection,a=i.getRng(),u=a.startOffset,c=a.startContainer,s=c.nodeValue;r=vp(e.getBody(),i.getStart()),r&&(o=Mw(r));var f=/[^\s\u00a0\u00ad\u200b\ufeff]/;if(s&&u>0&&u<s.length&&f.test(s.charAt(u))&&f.test(s.charAt(u-1))){var l=i.getBookmark();a.collapse(!0);var d=yh(e,a,e.formatter.get(t));d=ww(d),e.formatter.apply(t,n,d),i.moveToBookmark(l)}else r&&o.nodeValue===Ow?e.formatter.apply(t,n,r):(r=Pw(e.getDoc(),Fw(!0).dom()),o=r.firstChild,a.insertNode(r),u=1,e.formatter.apply(t,n,r)),i.setCursorLocation(o,u)},Kw=function(e,t,n,r){var o,i,a,u=e.dom,c=e.selection,s=[],f=c.getRng(),l=f.startContainer,d=f.startOffset;for(i=l,3===l.nodeType&&(d!==l.nodeValue.length&&(o=!0),i=i.parentNode);i;){if(_w(e,i,t,n,r)){a=i;break}i.nextSibling&&(o=!0),s.push(i),i=i.parentNode}if(a)if(o){var m=c.getBookmark();f.collapse(!0);var g=yh(e,f,e.formatter.get(t),!0);g=ww(g),e.formatter.remove(t,n,g,r),c.moveToBookmark(m)}else{var p=vp(e.getBody(),a),h=Fw(!1).dom();Hw(e,h,null!==p?p:a);var v=$w(e,h,a,t,n,r),y=qw(s.concat(v.toArray()),h);zw(e,p,!1),c.setCursorLocation(y,1),u.isEmpty(a)&&u.remove(a)}},Xw=function(e,t){var n=e.selection,r=e.getBody();jw(e,null,!1),8!==t&&46!==t||!n.isCollapsed()||n.getStart().innerHTML!==Ow||jw(e,vp(r,n.getStart())),(37===t||39===t)&&jw(e,vp(r,n.getStart()))},Yw=function(e){e.on("mouseup keydown",function(t){Xw(e,t.keyCode)})},Gw=function(e,t){var n=Fw(!1),r=qw(t,n.dom());return ni(uo.fromDom(e),n),fi(uo.fromDom(e)),id(r,0)},Jw=function(e,t){var n=e.schema.getTextInlineElements();return n.hasOwnProperty(go(t))&&!hp(t.dom())&&!Oi(t.dom())},Qw=function(e){return hp(e.dom())&&Iw(e.dom())},Zw={},ex=Bn,tx=Dn,nx=function(e,t){var n=Zw[e];n||(Zw[e]=[]),Zw[e].push(t)},rx=function(e,t){tx(Zw[e],function(e){e(t)})};nx("pre",function(e){var t,n=e.selection.getRng(),r=function(e){return i(e.previousSibling)&&-1!==Pn(t,e.previousSibling)},o=function(e,t){zc(t).remove(),zc(e).append("<br><br>").append(t.childNodes)},i=Ti(["pre"]);n.collapsed||(t=e.selection.getSelectedBlocks(),tx(ex(ex(t,i),r),function(e){o(e.previousSibling,e)}))});var ox=/^(src|href|style)$/,ix=to.each,ax=Qp,ux=function(e){return/^(TR|TH|TD)$/.test(e.nodeName)},cx=function(e,t,n){return e.isChildOf(t,n)&&t!==n&&!e.isBlock(n)},sx=function(e,t,n){var r,o;if(r=t[n?"startContainer":"endContainer"],o=t[n?"startOffset":"endOffset"],_i(r)){var i=r.childNodes.length-1;!n&&o&&o--,r=r.childNodes[o>i?i:o]}return Mi(r)&&n&&o>=r.nodeValue.length&&(r=new jc(r,e.getBody()).next()||r),Mi(r)&&!n&&0===o&&(r=new jc(r,e.getBody()).prev()||r),r},fx=function(e,t){var n=t?"firstChild":"lastChild";if(ux(e)&&e[n]){var r=e[n];return"TR"===e.nodeName?r[n]||r:r}return e},lx=function(e,t,n,r){var o=e.create(n,r);return t.parentNode.insertBefore(o,t),o.appendChild(t),o},dx=function(e,t,n,r,o){var i=uo.fromDom(t),a=uo.fromDom(e.create(r,o)),u=n?qo(i):Vo(i);return ci(a,u),n?(ni(i,a),oi(a,i)):(ri(i,a),ii(a,i)),a.dom()},mx=function(e,t,n){return ax(t,n.inline)?!0:ax(t,n.block)?!0:n.selector?_i(t)&&e.is(t,n.selector):void 0},gx=function(e,t){return t.links&&"A"===e.nodeName},px=function(e,t,n,r){return t=Wp(t,n,r),!t||"BR"===t.nodeName||e.isBlock(t)},hx=function(e,t,n){var r,o=t.parentNode,i=e.dom,a=Gd(e);n.block&&(a?o===i.getRoot()&&(n.list_block&&ax(t,n.list_block)||Yt(gn(t.childNodes),function(t){Xp(e,a,t.nodeName.toLowerCase())?r?r.appendChild(t):(r=lx(i,t,a),i.setAttribs(r,e.settings.forced_root_block_attrs)):r=0})):i.isBlock(t)&&!i.isBlock(o)&&(px(i,t,!1)||px(i,t.firstChild,!0,!0)||t.insertBefore(i.create("br"),t.firstChild),px(i,t,!0)||px(i,t.lastChild,!1,!0)||t.appendChild(i.create("br")))),n.selector&&n.inline&&!ax(n.inline,t)||i.remove(t,!0)},vx=function(e,t,n,r,o){var i,a=e.dom;if(!mx(a,r,t)&&!gx(r,t))return!1;var u=r;if(t.inline&&"all"===t.remove&&Lt(t.preserve_attributes)){var c=Qt(a.getAttribs(u),function(e){return Wt(t.preserve_attributes,e.name.toLowerCase())});if(a.removeAllAttribs(u),Yt(c,function(e){return a.setAttrib(u,e.name,e.value)}),c.length>0)return e.dom.rename(r,"span"),!0}if("all"!==t.remove){ix(t.styles,function(e,r){e=Zp(a,Jp(e,n),r),"number"==typeof r&&(r=e,o=null),(t.remove_similar||!o||ax(eh(a,o,r),e))&&a.setStyle(u,r,""),i=!0}),i&&""===a.getAttrib(u,"style")&&(u.removeAttribute("style"),u.removeAttribute("data-mce-style")),ix(t.attributes,function(e,r){var i;if(e=Jp(e,n),"number"==typeof r&&(r=e,o=null),t.remove_similar||!o||ax(a.getAttrib(o,r),e)){if("class"===r&&(e=a.getAttrib(u,r),e&&(i="",Yt(e.split(/\s+/),function(e){/mce\-\w+/.test(e)&&(i+=(i?" ":"")+e)}),i)))return void a.setAttrib(u,r,i);"class"===r&&u.removeAttribute("className"),ox.test(r)&&u.removeAttribute("data-mce-"+r),u.removeAttribute(r)}}),ix(t.classes,function(e){e=Jp(e,n),(!o||a.hasClass(o,e))&&a.removeClass(u,e)});for(var s=a.getAttribs(u),f=0;f<s.length;f++){var l=s[f].nodeName;if(0!==l.indexOf("_")&&0!==l.indexOf("data-"))return!1}}return"none"!==t.remove?(hx(e,u,t),!0):void 0},yx=function(e,t,n,r,o){var i;return Yt(nh(e.dom,t.parentNode).reverse(),function(t){if(!i&&"_start"!==t.id&&"_end"!==t.id){var a=_w(e,t,n,r,o);a&&a.split!==!1&&(i=t)}}),i},bx=function(e,t,n,r,o,i,a,u){var c,s,f,l=e.dom;if(n){for(var d=n.parentNode,m=r.parentNode;m&&m!==d;m=m.parentNode){c=l.clone(m,!1);for(var g=0;g<t.length;g++)if(vx(e,t[g],u,c,c)){c=0;break}c&&(s&&c.appendChild(s),f||(f=c),s=c)}!i||a.mixed&&l.isBlock(n)||(r=l.split(n,r)),s&&(o.parentNode.insertBefore(s,o),f.appendChild(o))}return r},Cx=function(e,t,n,r,o){var i=e.formatter.get(t),a=i[0],u=!0,c=e.dom,s=e.selection,f=function(r){var u=yx(e,r,t,n,o);return bx(e,i,u,r,r,!0,a,n)},l=function(e){return Fp(e)&&_i(e)&&("_start"===e.id||"_end"===e.id)},d=function(t){var r,o;_i(t)&&c.getContentEditable(t)&&(r=u,u="true"===c.getContentEditable(t),o=!0);var s=gn(t.childNodes);if(u&&!o)for(var f=0;f<i.length&&!vx(e,i[f],n,t,t);f++);if(a.deep&&s.length){for(var f=0;f<s.length;f++)d(s[f]);o&&(u=r)}},m=function(e){var t=c.get(e?"_start":"_end"),n=t[e?"firstChild":"lastChild"];return l(n)&&(n=n[e?"firstChild":"lastChild"]),Mi(n)&&0===n.data.length&&(n=e?t.previousSibling||t.nextSibling:t.nextSibling||t.previousSibling),c.remove(t,!0),n},g=function(t){var n,r,o=yh(e,t,i,!0);if(a.split){if(o=ww(o),n=sx(e,o,!0),r=sx(e,o),n!==r){if(n=fx(n,!0),r=fx(r,!1),cx(c,n,r)){var u=Tt.from(n.firstChild).getOr(n);return f(dx(c,u,!0,"span",{id:"_start","data-mce-type":"bookmark"})),void m(!0)}if(cx(c,r,n)){var u=Tt.from(r.lastChild).getOr(r);return f(dx(c,u,!1,"span",{id:"_end","data-mce-type":"bookmark"})),void m(!1)}n=lx(c,n,"span",{id:"_start","data-mce-type":"bookmark"}),r=lx(c,r,"span",{id:"_end","data-mce-type":"bookmark"});var s=c.createRng();s.setStartAfter(n),s.setEndBefore(r),wh(c,s,function(e){Yt(e,function(e){Fp(e)||Fp(e.parentNode)||f(e)})}),f(n),f(r),n=m(!0),r=m()}else n=r=f(n);o.startContainer=n.parentNode?n.parentNode:n,o.startOffset=c.nodeIndex(n),o.endContainer=r.parentNode?r.parentNode:r,o.endOffset=c.nodeIndex(r)+1}wh(c,o,function(t){Yt(t,function(t){d(t);var n=["underline","line-through","overline"];Yt(n,function(n){_i(t)&&e.dom.getStyle(t,"text-decoration")===n&&t.parentNode&&th(c,t.parentNode)===n&&vx(e,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:n}},null,t)})})})};if(r)if(Vp(r)){var p=c.createRng();p.setStartBefore(r),p.setEndAfter(r),g(p)}else g(r);else if("false"!==c.getContentEditable(s.getNode()))s.isCollapsed()&&a.inline&&!Th(e).length?Kw(e,t,n,o):(Mh(s,!0,function(){Ih(e,g)}),a.inline&&Tw(e,t,n,s.getStart())&&$p(c,s,s.getRng()),e.nodeChanged());else{r=s.getNode();for(var h=0;h<i.length&&(!i[h].ceFalseOverride||!vx(e,i[h],n,r,r));h++);}},wx=to.each,xx=function(e){return _i(e)&&!Fp(e)&&!hp(e)&&!Oi(e)},Sx=function(e,t){var n;for(n=e;n;n=n[t]){if(Mi(n)&&0!==n.nodeValue.length)return e;if(_i(n)&&!Fp(n))return n}return e},Nx=function(e,t,n){var r,o,i=new Cv(e);if(t&&n&&(t=Sx(t,"previousSibling"),n=Sx(n,"nextSibling"),i.compare(t,n))){for(r=t.nextSibling;r&&r!==n;)o=r,r=r.nextSibling,t.appendChild(o);return e.remove(n),to.each(to.grep(n.childNodes),function(e){t.appendChild(e)}),t}return n},Ex=function(e,t,n){wx(e.childNodes,function(e){xx(e)&&(t(e)&&n(e),e.hasChildNodes()&&Ex(e,t,n))})},kx=function(e,t){return function(n){return!(!n||!eh(e,n,t))}},_x=function(e,t,n){return function(r){e.setStyle(r,t,n),""===r.getAttribute("style")&&r.removeAttribute("style"),Tx(e,r)}},Tx=function(e,t){"SPAN"===t.nodeName&&0===e.getAttribs(t).length&&e.remove(t,!0)},Rx=function(e,t,n,r){var o=function(t){if(1===t.nodeType&&t.parentNode&&1===t.parentNode.nodeType){var n=th(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)}};t.styles&&(t.styles.color||t.styles.textDecoration)&&(to.walk(r,o,"childNodes"),o(r))},Ax=function(e,t,n,r){t.styles&&t.styles.backgroundColor&&Ex(r,kx(e,"fontSize"),_x(e,"backgroundColor",Jp(t.styles.backgroundColor,n)))},Dx=function(e,t,n,r){("sub"===t.inline||"sup"===t.inline)&&(Ex(r,kx(e,"fontSize"),_x(e,"fontSize","")),e.remove(e.select("sup"===t.inline?"sub":"sup",r),!0))},Ox=function(e,t,n,r){r&&t.merge_siblings!==!1&&(r=Nx(e,Wp(r),r),r=Nx(e,r,Wp(r,!0)))},Bx=function(e,t,n){if(t.clear_child_styles){var r=t.links?"*:not(a)":"*";wx(e.select(r,n),function(n){xx(n)&&wx(t.styles,function(t,r){e.setStyle(n,r,"")})})}},Px=function(e,t,n,r){wx(t,function(t){wx(e.dom.select(t.inline,r),function(r){xx(r)&&vx(e,t,n,r,t.exact?r:null)}),Bx(e.dom,t,r)})},Lx=function(e,t,n,r,o){_w(e,o.parentNode,n,r)&&vx(e,t,r,o)||t.merge_with_parents&&e.dom.getParent(o.parentNode,function(i){return _w(e,i,n,r)?(vx(e,t,r,o),!0):void 0})},Ix=to.each,Mx=function(e){return e&&1===e.nodeType&&!Fp(e)&&!hp(e)&&!Oi(e)},Fx=function(e,t,n,r){var o,i=e.formatter.get(t),a=i[0],u=!r&&e.selection.isCollapsed(),c=e.dom,s=e.selection,f=function(e,t){if(t=t||a,e){if(t.onformat&&t.onformat(e,t,n,r),Ix(t.styles,function(t,r){c.setStyle(e,r,Jp(t,n))}),t.styles){var o=c.getAttrib(e,"style");o&&c.setAttrib(e,"data-mce-style",o)}Ix(t.attributes,function(t,r){c.setAttrib(e,r,Jp(t,n))}),Ix(t.classes,function(t){t=Jp(t,n),c.hasClass(e,t)||c.addClass(e,t)})}},l=function(e,t){var n=!1;return a.selector?(Ix(e,function(e){return"collapsed"in e&&e.collapsed!==u?void 0:c.is(t,e.selector)&&!hp(t)?(f(t,e),n=!0,!1):void 0}),n):!1},d=function(r,o,u,c){var s=[],d=!0,m=a.inline||a.block,g=r.create(m);f(g),wh(r,o,function(o){var u,p=function(o){var h=!1,v=d,y=o.nodeName.toLowerCase(),b=o.parentNode.nodeName.toLowerCase();if(_i(o)&&r.getContentEditable(o)&&(v=d,d="true"===r.getContentEditable(o),h=!0),Qp(y,"br"))return u=0,void(a.block&&r.remove(o));if(a.wrapper&&_w(e,o,t,n))return void(u=0);if(d&&!h&&a.block&&!a.wrapper&&Kp(e,y)&&Xp(e,b,m))return o=r.rename(o,m),f(o),s.push(o),void(u=0);if(a.selector){var C=l(i,o);if(!a.inline||C)return void(u=0)}!d||h||!Xp(e,m,y)||!Xp(e,b,m)||!c&&3===o.nodeType&&1===o.nodeValue.length&&65279===o.nodeValue.charCodeAt(0)||hp(o)||a.inline&&r.isBlock(o)?(u=0,Ix(to.grep(o.childNodes),p),h&&(d=v),u=0):(u||(u=r.clone(g,!1),o.parentNode.insertBefore(u,o),s.push(u)),u.appendChild(o))};Ix(o,p)}),a.links===!0&&Ix(s,function(e){var t=function(e){"A"===e.nodeName&&f(e,a),Ix(to.grep(e.childNodes),t)};t(e)}),Ix(s,function(o){var u=function(e){var t=0;return Ix(e.childNodes,function(e){Gp(e)||Fp(e)||t++}),t},c=function(e){var t=!1;return Ix(e.childNodes,function(e){return Mx(e)?(t=e,!1):void 0}),t},l=function(e){var t,n=c(e);return n&&!Fp(n)&&Ew(r,n,a)&&(t=r.clone(n,!1),f(t),r.replace(t,e,!0),r.remove(n,!0)),t||e},d=u(o);return(s.length>1||!r.isBlock(o))&&0===d?void r.remove(o,!0):void((a.inline||a.wrapper)&&(a.exact||1!==d||(o=l(o)),Px(e,i,n,o),Lx(e,a,t,n,o),Ax(r,a,n,o),Rx(r,a,n,o),Dx(r,a,n,o),Ox(r,a,n,o)))})};if("false"!==c.getContentEditable(s.getNode())){if(a){if(r)Vp(r)?l(i,r)||(o=c.createRng(),o.setStartBefore(r),o.setEndAfter(r),d(c,yh(e,o,i),null,!0)):d(c,r,null,!0);else if(u&&a.inline&&!Th(e).length)Ww(e,t,n);else{var m=s.getNode();e.settings.forced_root_block||!i[0].defaultBlock||c.getParent(m,c.isBlock)||Fx(e,i[0].defaultBlock),s.setRng(mb(s.getRng())),Mh(s,!0,function(){Ih(e,function(t,n){var r=n?t:yh(e,t,i);d(c,r)})}),$p(c,s,s.getRng()),e.nodeChanged()}rx(t,e)}}else{r=s.getNode();for(var g=0,p=i.length;p>g;g++)if(i[g].ceFalseOverride&&c.is(r,i[g].selector))return void f(r,i[g])}},Ux=function(e,t,n,r){var o=e.formatter.get(t);!Tw(e,t,n,r)||"toggle"in o[0]&&!o[0].toggle?Fx(e,t,n,r):Cx(e,t,n,r)},zx=function(e,t){return Xt(t,function(t){var n=e.fire("GetSelectionRange",{range:t});return n.range!==t?n.range:t})},jx=function(t,n){var r=n||e.document,o=r.createDocumentFragment();return Yt(t,function(e){o.appendChild(e.dom())}),uo.fromDom(o)},Hx=function(e,t,n){return{element:yt(e),width:yt(t),rows:yt(n)}},Vx=function(e,t){return{element:yt(e),cells:yt(t)}},qx=function(e,t){return{x:yt(e),y:yt(t)}},$x=function(e,t){var n=parseInt(Xi(e,t),10);return isNaN(n)?1:n},Wx=function(e,t,n,r,o){for(var i=$x(o,"rowspan"),a=$x(o,"colspan"),u=e.rows(),c=n;n+i>c;c++){u[c]||(u[c]=Vx(Mf(r),[]));for(var s=t;t+a>s;s++){var f=u[c].cells();f[s]=c===n&&s===t?o:If(o)}}},Kx=function(e,t,n){var r=e.rows(),o=r[n]?r[n].cells():[];return!!o[t]},Xx=function(e,t,n){for(;Kx(e,t,n);)t++;return t},Yx=function(e){return en(e,function(e,t){return t.cells().length>e?t.cells().length:e},0)},Gx=function(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(Ao(o[i],t))return Tt.some(qx(i,r));return Tt.none()},Jx=function(e,t,n,r,o){for(var i=[],a=e.rows(),u=n;o>=u;u++){var c=a[u].cells(),s=r>t?c.slice(t,r+1):c.slice(r,t+1);i.push(Vx(a[u].element(),s))}return i},Qx=function(e,t,n){var r=t.x(),o=t.y(),i=n.x(),a=n.y(),u=a>o?Jx(e,r,o,i,a):Jx(e,r,a,i,o);return Hx(e.element(),Yx(u),u)},Zx=function(e,t){var n=If(e.element()),r=uo.fromTag("tbody");return ci(r,t),ii(n,r),n},eS=function(e){return Xt(e.rows(),function(e){var t=Xt(e.cells(),function(e){var t=Mf(e);return Ji(t,"colspan"),Ji(t,"rowspan"),t}),n=If(e.element());return ci(n,t),n})},tS=function(e){var t=Hx(If(e),0,[]);return Yt(mf(e,"tr"),function(e,n){Yt(mf(e,"td,th"),function(r,o){Wx(t,Xx(t,o,n),n,e,r)})}),Hx(t.element(),Yx(t.rows()),t.rows())},nS=function(e){return Zx(e,eS(e))},rS=function(e,t,n){return Gx(e,t).bind(function(t){return Gx(e,n).map(function(n){return Qx(e,t,n)})})},oS=function(e){return nn(e,function(e){return"ul"===go(e)||"ol"===go(e)})},iS=function(e,t){return nn(e,function(e){return"li"===go(e)&&Bh(e,t)}).fold(yt([]),function(){return oS(e).map(function(e){return[uo.fromTag("li"),uo.fromTag(go(e))]}).getOr([])})},aS=function(e,t){var n=en(t,function(e,t){return ii(t,e),t},e);return t.length>0?jx([n]):n},uS=function(e){return ka(e)?Fo(e).filter(Ea).fold(yt([]),function(t){return[e,t]}):Ea(e)?[e]:[]},cS=function(e,t){var n=uo.fromDom(t.commonAncestorContainer),r=Jv(n,e),o=Qt(r,function(e){return xa(e)||ba(e)}),i=iS(r,t),a=o.concat(i.length?i:uS(n));return Xt(a,If)},sS=function(){return jx([])},fS=function(e,t){return aS(uo.fromDom(t.cloneContents()),cS(e,t))},lS=function(e,n){return hf(n,"table",t(Ao,e))},dS=function(e,t){return lS(e,t[0]).bind(function(e){var n=t[0],r=t[t.length-1],o=tS(e);return rS(o,n,r).map(function(e){return jx([nS(e)])})}).getOrThunk(sS)},mS=function(e,t){return t.length>0&&t[0].collapsed?sS():fS(e,t[0])},gS=function(e,t){var n=_h(t,e);return n.length>0?dS(e,n):mS(e,t)},pS=function(e){return e.replace(/^[ \f\n\r\t\v]+/,"")},hS=function(e,t){return t>=0&&t<e.length&&jp(e.charAt(t))},vS=function(e){var t=Hf(e.innerText);return Hr.browser.isIE()?pS(t):t},yS=function(e){return Tt.from(e.selection.getRng()).map(function(t){var n=e.dom.add(e.getBody(),"div",{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},t.cloneContents()),r=vS(n),o=Hf(n.textContent);if(e.dom.remove(n),hS(o,0)||hS(o,o.length-1)){var i=e.dom.getParent(t.commonAncestorContainer,e.dom.isBlock),a=vS(i),u=a.indexOf(r);if(-1!==u){var c=hS(a,u-1),s=hS(a,u+r.length);return(c?" ":"")+r+(s?" ":"")}return r}return r}).getOr("")},bS=function(e,t){var n=e.selection.getRng(),r=e.dom.create("body"),o=e.selection.getSel(),i=zx(e,xh(o)),a=t.contextual?gS(uo.fromDom(e.getBody()),i).dom():n.cloneContents();return a&&r.appendChild(a),e.selection.serializer.serialize(r,t)},CS=function(e,t,n){if(void 0===n&&(n={}),n.get=!0,n.format=t,n.selection=!0,n=e.fire("BeforeGetContent",n),n.isDefaultPrevented())return e.fire("GetContent",n),n.content;if("text"===n.format)return yS(e);n.getInner=!0;var r=bS(e,n);return"tree"===n.format?r:(n.content=e.selection.isCollapsed()?"":r,e.fire("GetContent",n),n.content)},wS=0,xS=1,SS=2,NS=function(e,t){var n=e.length+t.length+2,r=new Array(n),o=new Array(n),i=function(e,t,n){return{start:e,end:t,diag:n}},a=function(n,r,o,i,u){var s=c(n,r,o,i);if(null===s||s.start===r&&s.diag===r-i||s.end===n&&s.diag===n-o)for(var f=n,l=o;r>f||i>l;)r>f&&i>l&&e[f]===t[l]?(u.push([wS,e[f]]),++f,++l):r-n>i-o?(u.push([SS,e[f]]),++f):(u.push([xS,t[l]]),++l);else{a(n,s.start,o,s.start-s.diag,u);for(var d=s.start;d<s.end;++d)u.push([wS,e[d]]);a(s.end,r,s.end-s.diag,i,u)}},u=function(n,r,o,a){for(var u=n;a>u-r&&o>u&&e[u]===t[u-r];)++u;return i(n,u,r)},c=function(n,i,a,c){var s=i-n,f=c-a;if(0===s||0===f)return null;var l=s-f,d=f+s,m=(d%2===0?d:d+1)/2;r[1+m]=n,o[1+m]=i+1;var g,p,h,v,y;for(g=0;m>=g;++g){for(p=-g;g>=p;p+=2){for(h=p+m,r[h]=p===-g||p!==g&&r[h-1]<r[h+1]?r[h+1]:r[h-1]+1,v=r[h],y=v-n+a-p;i>v&&c>y&&e[v]===t[y];)r[h]=++v,++y;if(l%2!==0&&p>=l-g&&l+g>=p&&o[h-l]<=r[h])return u(o[h-l],p+n-a,i,c)}for(p=l-g;l+g>=p;p+=2){for(h=p+m-l,o[h]=p===l-g||p!==l+g&&o[h+1]<=o[h-1]?o[h+1]-1:o[h-1],v=o[h]-1,y=v-n+a-p;v>=n&&y>=a&&e[v]===t[y];)o[h]=v--,y--;if(l%2===0&&p>=-g&&g>=p&&o[h]<=r[h+l])return u(o[h],p+n-a,i,c)}}},s=[];return a(0,e.length,0,t.length,s),s},ES=function(e){return _i(e)?e.outerHTML:Mi(e)?Ja.encodeRaw(e.data,!1):Fi(e)?"<!--"+e.data+"-->":""},kS=function(t){var n,r=e.document.createElement("div"),o=e.document.createDocumentFragment();for(t&&(r.innerHTML=t);n=r.firstChild;)o.appendChild(n);return o},_S=function(e,t,n){var r=kS(t);if(e.hasChildNodes()&&n<e.childNodes.length){var o=e.childNodes[n];o.parentNode.insertBefore(r,o)}else e.appendChild(r)},TS=function(e,t){if(e.hasChildNodes()&&t<e.childNodes.length){var n=e.childNodes[t];n.parentNode.removeChild(n)}},RS=function(e,t){var n=0;Yt(e,function(e){e[0]===wS?n++:e[0]===xS?(_S(t,e[1],n),n++):e[0]===SS&&TS(t,n)})},AS=function(e){return Qt(Xt(gn(e.childNodes),ES),function(e){return e.length>0})},DS=function(e,t){var n=Xt(gn(t.childNodes),ES);return RS(NS(n,e),t),t},OS=Ms(Tt.none()),BS=function(){return OS.get().getOrThunk(function(){var t=e.document.implementation.createHTMLDocument("undo");return OS.set(Tt.some(t)),t})},PS=function(e){return-1!==e.indexOf("</iframe>")},LS=function(e){return{type:"fragmented",fragments:e,content:"",bookmark:null,beforeBookmark:null}},IS=function(e){return{type:"complete",fragments:null,content:e,bookmark:null,beforeBookmark:null}},MS=function(e){var t=AS(e.getBody()),n=an(t,function(t){var n=gv(e.serializer,t);return n.length>0?[n]:[]}),r=n.join("");return PS(r)?LS(n):IS(r)},FS=function(e,t,n){"fragmented"===t.type?DS(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(n?t.beforeBookmark:t.bookmark)},US=function(e){return"fragmented"===e.type?e.fragments.join(""):e.content},zS=function(e){var t=uo.fromTag("body",BS());return Pf(t,US(e)),Yt(mf(t,"*[data-mce-bogus]"),li),Bf(t)},jS=function(e,t){return US(e)===US(t)},HS=function(e,t){return zS(e)===zS(t)},VS=function(e,t){return e&&t?jS(e,t)?!0:HS(e,t):!1},qS=function(e){return 0===e.get()},$S=function(e,t,n){qS(n)&&(e.typing=t)},WS=function(e,t){e.typing&&($S(e,!1,t),e.add())},KS=function(e){e.typing&&(e.typing=!1,e.add())},XS=function(e,t,n){qS(t)&&n.set(Tt.some(Ud(e.selection)))},YS=function(e,t,n,r,o,i,a){var u=MS(e);if(i=i||{},i=to.extend(i,u),qS(r)===!1||e.removed)return null;var c=t.data[n.get()];if(e.fire("BeforeAddUndo",{level:i,lastLevel:c,originalEvent:a}).isDefaultPrevented())return null;if(c&&VS(c,i))return null;t.data[n.get()]&&o.get().each(function(e){t.data[n.get()].beforeBookmark=e});var s=Hm(e);if(s&&t.data.length>s){for(var f=0;f<t.data.length-1;f++)t.data[f]=t.data[f+1];t.data.length--,n.set(t.data.length)}i.bookmark=Ud(e.selection),n.get()<t.data.length-1&&(t.data.length=n.get()+1),t.data.push(i),n.set(t.data.length-1);var l={level:i,lastLevel:c,originalEvent:a};return e.fire("AddUndo",l),n.get()>0&&(e.setDirty(!0),e.fire("change",l)),i},GS=function(e,t,n){t.data=[],n.set(0),t.typing=!1,e.fire("ClearUndos")},JS=function(e,t,n,r,o){if(t.transact(r)){var i=t.data[n.get()].bookmark,a=t.data[n.get()-1];FS(e,a,!0),t.transact(o)&&(t.data[n.get()-1].beforeBookmark=i)}},QS=function(e,t,n){var r;return t.get()<n.length-1&&(t.set(t.get()+1),r=n[t.get()],FS(e,r,!1),e.setDirty(!0),e.fire("Redo",{level:r})),r},ZS=function(e,t,n,r){var o;return t.typing&&(t.add(),t.typing=!1,$S(t,!1,n)),r.get()>0&&(r.set(r.get()-1),o=t.data[r.get()],FS(e,o,!0),e.setDirty(!0),e.fire("Undo",{level:o})),o},eN=function(e){e.clear(),e.add()},tN=function(e,t,n){return n.get()>0||t.typing&&t.data[0]&&!VS(MS(e),t.data[0])},nN=function(e,t){return t.get()<e.data.length-1&&!e.typing},rN=function(e,t,n){return WS(e,t),e.beforeChange(),e.ignore(n),e.add()},oN=function(e,t){try{e.set(e.get()+1),t()}finally{e.set(e.get()-1)}},iN=function(e){return e instanceof Qh},aN=function(e,t){dw(e.serializer.getNodeFilters(),e.serializer.getAttributeFilters(),t)},uN=function(){return{type:"complete",fragments:[],content:"",bookmark:null,beforeBookmark:null}},cN=function(e){return{undoManager:{beforeChange:function(t,n){return XS(e,t,n)},addUndoLevel:function(t,n,r,o,i,a){return YS(e,t,n,r,o,i,a)},undo:function(t,n,r){return ZS(e,t,n,r)},redo:function(t,n){return QS(e,t,n)},clear:function(t,n){return GS(e,t,n)},reset:function(e){return eN(e)},hasUndo:function(t,n){return tN(e,t,n)},hasRedo:function(e,t){return nN(e,t)},transact:function(e,t,n){return rN(e,t,n)},ignore:function(e,t){return oN(e,t)},extra:function(t,n,r,o){return JS(e,t,n,r,o)}},formatter:{apply:function(t,n,r){return Fx(e,t,n,r)},remove:function(t,n,r,o){return Cx(e,t,n,r,o)},toggle:function(t,n,r){return Ux(e,t,n,r)}},editor:{getContent:function(t,n){return yv(e,t,n)},setContent:function(t,n){return bw(e,t,n)},insertContent:function(t,n){return Gb(e,t,n)}},selection:{getContent:function(t,n){return CS(e,t,n)}},raw:{getModel:function(){return Tt.none()}}}},sN=function(e,t){var n=function(e){return Pt(e)?e:{}},r=wt("Unimplemented feature for rtc"),o=pt;return{undoManager:{beforeChange:o,addUndoLevel:r,undo:function(){return t.undo(),uN()},redo:function(){return t.redo(),uN()},clear:r,reset:r,hasUndo:function(){return t.hasUndo()},hasRedo:function(){return t.hasRedo()},transact:function(e,n,r){return t.transact(r),uN()},ignore:r,extra:r},formatter:{apply:function(e,r){return t.applyFormat(e,n(r))},remove:function(e,r){return t.removeFormat(e,n(r))},toggle:function(e,r){return t.toggleFormat(e,n(r))}},editor:{getContent:function(n,r){if("html"===r||"tree"===r){var o=t.getContent(),i=tv({inner:!0});return aN(e,o),"tree"===r?o:i.serialize(o)}return cN(e).editor.getContent(n,r)},setContent:function(n){var r=iN(n)?n:e.parser.parse(n,{isRootContent:!0,insert:!0});return t.setContent(r),n},insertContent:function(n){var r=iN(n)?n:e.parser.parse(n,{insert:!0});t.insertContent(r)}},selection:{getContent:function(n,r){if("html"===n||"tree"===n){var o=t.getSelectedContent(),i=tv({});return aN(e,o),"tree"===n?o:i.serialize(o)}return cN(e).selection.getContent(n,r)}},raw:{getModel:function(){return Tt.some(t.getRawModel())}}}},fN=function(e){return _n(e.plugins,"rtc")},lN=function(e){var t=e;return kn(e.plugins,"rtc").fold(function(){return t.rtcInstance=cN(e),Tt.none()},function(n){return Tt.some(n.setup().then(function(n){return t.rtcInstance=sN(e,n),n.isRemote}))})},dN=function(e){return e.rtcInstance?e.rtcInstance:cN(e)},mN=function(e){var t=e.rtcInstance;if(t)return t;throw new Error("Failed to get RTC instance not yet initialized.")},gN=function(e,t,n){mN(e).undoManager.beforeChange(t,n)},pN=function(e,t,n,r,o,i,a){return mN(e).undoManager.addUndoLevel(t,n,r,o,i,a)},hN=function(e,t,n,r){return mN(e).undoManager.undo(t,n,r)},vN=function(e,t,n){return mN(e).undoManager.redo(t,n)},yN=function(e,t,n){mN(e).undoManager.clear(t,n)},bN=function(e,t){mN(e).undoManager.reset(t)},CN=function(e,t,n){return mN(e).undoManager.hasUndo(t,n)},wN=function(e,t,n){return mN(e).undoManager.hasRedo(t,n)},xN=function(e,t,n,r){return mN(e).undoManager.transact(t,n,r)},SN=function(e,t,n){mN(e).undoManager.ignore(t,n)},NN=function(e,t,n,r,o){mN(e).undoManager.extra(t,n,r,o)},EN=function(e,t,n,r){mN(e).formatter.apply(t,n,r)},kN=function(e,t,n,r,o){mN(e).formatter.remove(t,n,r,o)},_N=function(e,t,n,r){mN(e).formatter.toggle(t,n,r)},TN=function(e,t,n){return dN(e).editor.getContent(t,n)},RN=function(e,t,n){return dN(e).editor.setContent(t,n)},AN=function(e,t,n){return dN(e).editor.insertContent(t,n)},DN=function(e,t,n){return mN(e).selection.getContent(t,n)},ON="html",BN=function(e,t){void 0===t&&(t={});var n=t.format?t.format:ON;return TN(e,t,n)},PN=function(e,t,n){return void 0===n&&(n={}),RN(e,t,n)},LN=function(e,t){return e.fire("PreProcess",t)},IN=function(e,t){return e.fire("PostProcess",t)},MN=function(e){return e.fire("remove")},FN=function(e){return e.fire("detach")},UN=function(e,t){return e.fire("SwitchMode",{mode:t})},zN=function(e,t,n,r){e.fire("ObjectResizeStart",{target:t,width:n,height:r})
},jN=function(e,t,n,r){e.fire("ObjectResized",{target:t,width:n,height:r})},HN=function(e){return e.fire("PreInit")},VN=function(e){return e.fire("PostRender")},qN=function(e){return e.fire("Init")},$N=function(e,t){return e.fire("PlaceholderToggle",{state:t})},WN=function(e,t,n){return e.fire(t,n)},KN=Ts.DOM,XN=function(e){KN.setStyle(e.id,"display",e.orgDisplay)},YN=function(e){return Tt.from(e).each(function(e){return e.destroy()})},GN=function(e){e.contentAreaContainer=e.formElement=e.container=e.editorContainer=null,e.bodyElement=e.contentDocument=e.contentWindow=null,e.iframeElement=e.targetElm=null,e.selection&&(e.selection=e.selection.win=e.selection.dom=e.selection.dom.doc=null)},JN=function(e){var t=e.formElement;t&&(t._mceOldSubmit&&(t.submit=t._mceOldSubmit,t._mceOldSubmit=null),KN.unbind(t,"submit reset",e.formEventDelegate))},QN=function(e){if(!e.removed){var t=e._selectionOverrides,n=e.editorUpload,r=e.getBody(),o=e.getElement();r&&e.save({is_removing:!0}),e.removed=!0,e.unbindAllNativeEvents(),e.hasHiddenInput&&o&&KN.remove(o.nextSibling),MN(e),e.editorManager.remove(e),!e.inline&&r&&XN(e),FN(e),KN.remove(e.getContainer()),YN(t),YN(n),e.destroy()}},ZN=function(e,t){var n=e.selection,r=e.dom;if(!e.destroyed){if(!t&&!e.removed)return void e.remove();t||(e.editorManager.off("beforeunload",e._beforeUnload),e.theme&&e.theme.destroy&&e.theme.destroy(),YN(n),YN(r)),JN(e),GN(e),e.destroyed=!0}},eE=Object.prototype.hasOwnProperty,tE=function(e,t){var n=Pt(e)&&Pt(t);return n?rE(e,t):t},nE=function(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=t[o];for(var a in i)eE.call(i,a)&&(r[a]=e(r[a],i[a]))}return r}},rE=nE(tE),oE=function(e,t){return{sections:yt(e),settings:yt(t)}},iE=Br().deviceType,aE=iE.isTouch(),uE=iE.isPhone(),cE=iE.isTablet(),sE=["lists","autolink","autosave"],fE={table_grid:!1,object_resizing:!1,resize:!1},lE=function(e){var t=Lt(e)?e.join(" "):e,n=Xt(Bt(t)?t.split(" "):[],wr);return Qt(n,function(e){return e.length>0})},dE=function(e){return Qt(e,t(Wt,sE))},mE=function(e,t){var n=xn(t,function(t,n){return Wt(e,n)});return oE(n.t,n.f)},gE=function(e,t,n){void 0===n&&(n={});var r=e.sections(),o=r.hasOwnProperty(t)?r[t]:{};return to.extend({},n,o)},pE=function(e,t){return e.sections().hasOwnProperty(t)},hE=function(e,t,n){var r=e.sections();return pE(e,t)&&r[t].theme===n},vE=function(e,t){return pE(e,t)?e.sections()[t]:{}},yE=function(e,t){return kn(e,"toolbar_mode").orThunk(function(){return kn(e,"toolbar_drawer").map(function(e){return e===!1?"wrap":e})}).getOr(t)},bE=function(e,t,n,r,o){var i={id:t,theme:"silver",toolbar_mode:yE(e,"floating"),plugins:"",document_base_url:n,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:o.convertURL,url_converter_scope:o};return Fn(Fn({},i),r?fE:{})},CE=function(e,t){var n={resize:!1,toolbar_mode:yE(e,"scrolling"),toolbar_sticky:!1},r={menubar:!1};return Fn(Fn(Fn({},fE),n),t?r:{})},wE=function(e,t){var n=t.external_plugins?t.external_plugins:{};return e&&e.external_plugins?to.extend({},e.external_plugins,n):n},xE=function(e,t){return[].concat(lE(e)).concat(lE(t))},SE=function(e,t,n,r){var o=lE(n.forced_plugins),i=lE(r.plugins),a=vE(t,"mobile"),u=a.plugins?lE(a.plugins):i,c=e&&hE(t,"mobile","mobile")?dE(u):e&&pE(t,"mobile")?u:i,s=xE(o,c);return to.extend(r,{plugins:s.join(" ")})},NE=function(e,t){return e&&pE(t,"mobile")},EE=function(e,t,n,r,o){var i=e?{mobile:CE(o.mobile||{},t)}:{},a=mE(["mobile"],rE(i,o)),u=to.extend(n,r,a.settings(),NE(e,a)?gE(a,"mobile"):{},{validate:!0,external_plugins:wE(r,a.settings())});return SE(e,a,r,u)},kE=function(e,t,n,r,o){var i=bE(o,t,n,aE,e);return EE(uE||cE,uE,i,r,o)},_E=function(e,t,n){return Tt.from(t.settings[n]).filter(e)},TE=function(e){var t={};return"string"==typeof e?Yt(e.split(e.indexOf("=")>0?/[;,](?![^=;,]*(?:[;,]|$))/:","),function(e){var n=e.split("=");t[to.trim(n[0])]=to.trim(n.length>1?n[1]:n[0])}):t=e,t},RE=function(e){return function(t){return Lt(t)&&un(t,e)}},AE=function(e,t,n,r){var o=t in e.settings?e.settings[t]:n;return"hash"===r?TE(o):"string"===r?_E(Bt,e,t).getOr(n):"number"===r?_E(zt,e,t).getOr(n):"boolean"===r?_E(Mt,e,t).getOr(n):"object"===r?_E(Pt,e,t).getOr(n):"array"===r?_E(Lt,e,t).getOr(n):"string[]"===r?_E(RE(Bt),e,t).getOr(n):"function"===r?_E(Ut,e,t).getOr(n):o},DE=function(){var e={},t=function(t,n){e[t]=n},n=function(t){return e[t]?e[t]:{icons:{}}},r=function(t){return _n(e,t)};return{add:t,get:n,has:r}},OE=DE(),BE=function(e,t){var n=t.dom();return n[e]},PE=function(e,t){return parseInt(Zi(t,e),10)},LE=t(BE,"clientWidth"),IE=t(BE,"clientHeight"),ME=t(PE,"margin-top"),FE=t(PE,"margin-left"),UE=function(e){return e.dom().getBoundingClientRect()},zE=function(e,t,n){var r=LE(e),o=IE(e);return t>=0&&n>=0&&r>=t&&o>=n},jE=function(e,t,n,r){var o=UE(t),i=e?o.left+t.dom().clientLeft+FE(t):0,a=e?o.top+t.dom().clientTop+ME(t):0,u=n-i,c=r-a;return{x:u,y:c}},HE=function(e,t,n){var r=uo.fromDom(e.getBody()),o=e.inline?r:Io(r),i=jE(e.inline,o,t,n);return zE(o,i.x,i.y)},VE=function(e){return Tt.from(e).map(uo.fromDom)},qE=function(e){var t=e.inline?e.getBody():e.getContentAreaContainer();return VE(t).map(function(e){return Bo(Po(e),e)}).getOr(!1)},$E=Js.PluginManager,WE=Js.ThemeManager,KE=function(e){var t=[],n=function(){var t=e.theme;return t&&t.getWindowManagerImpl?t.getWindowManagerImpl():D()},r=function(e,t){return function(){return t?t.apply(e,arguments):void 0}},o=function(t){e.fire("OpenWindow",{dialog:t})},i=function(t){e.fire("CloseWindow",{dialog:t})},a=function(e){t.push(e),o(e)},u=function(n){i(n),t=Qt(t,function(e){return e!==n}),0===t.length&&e.focus()},c=function(){return Tt.from(t[t.length-1])},s=function(t){e.editorManager.setActive(e),AC(e);var n=t();return a(n),n},f=function(e,t){return s(function(){return n().open(e,t,u)})},l=function(e){return s(function(){return n().openUrl(e,u)})},d=function(e,t,o){n().alert(e,r(o?o:this,t))},m=function(e,t,o){n().confirm(e,r(o?o:this,t))},g=function(){c().each(function(e){n().close(e),u(e)})};return e.on("remove",function(){Yt(t,function(e){n().close(e)})}),{open:f,openUrl:l,alert:d,confirm:m,close:g}},XE=function(e,t){e.notificationManager.open({type:"error",text:t})},YE=function(e,t){e._skinLoaded?XE(e,t):e.on("SkinLoaded",function(){XE(e,t)})},GE=function(e,t){YE(e,Gs.translate(["Failed to upload image: {0}",t]))},JE=function(t,n,r){WN(t,n,{message:r}),e.console.error(r)},QE=function(e,t,n){return n?"Failed to load "+e+": "+n+" from url "+t:"Failed to load "+e+" url: "+t},ZE=function(e,t,n){JE(e,"PluginLoadError",QE("plugin",t,n))},ek=function(e,t,n){JE(e,"IconsLoadError",QE("icons",t,n))},tk=function(e,t,n){JE(e,"LanguageLoadError",QE("language",t,n))},nk=function(e,t,n){var r=Gs.translate(["Failed to initialize plugin: {0}",t]);rk(r,n),YE(e,r)},rk=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=e.window.console;i&&(i.error?i.error.apply(i,o([t],n)):i.log.apply(i,o([t],n)))},ok=function(e){return/^[a-z0-9\-]+$/i.test(e)},ik=function(e){var t=Cm(e),n=e.editorManager.baseURL+"/skins/content",r=e.editorManager.suffix,o="content"+r+".css",i=e.inline===!0;return Xt(t,function(t){return ok(t)&&!i?n+"/"+t+"/"+o:e.documentBaseURI.toAbsolute(t)})},ak=function(e){e.contentCSS=e.contentCSS.concat(ik(e))},uk=O("height",function(e){var t=e.dom();return di(e)?t.getBoundingClientRect().height:t.offsetHeight}),ck=function(e){return uk.get(e)},sk=function(e,t){var n=e.view(t);return n.fold(yt([]),function(t){var n=e.owner(t),r=sk(e,n);return[t].concat(r)})},fk=function(e,t){var n=t.owner(e);return sk(t,n)},lk=function(t){var n=t.dom()===e.document?Tt.none():Tt.from(t.dom().defaultView.frameElement);return n.map(uo.fromDom)},dk=function(e){return Po(e)},mk=Object.freeze({__proto__:null,view:lk,owner:dk}),gk=function(t){var n=uo.fromDom(e.document),r=bi(n),o=fk(t,mk),i=yi(t),a=Zt(o,function(e,t){var n=yi(t);return{left:e.left+n.left(),top:e.top+n.top()}},{left:0,top:0});return gi(a.left+i.left()+r.left(),a.top+i.top()+r.top())},pk=function(e){return"textarea"===go(e)},hk=function(e,t){var n=e.fire("ScrollIntoView",t);return n.isDefaultPrevented()},vk=function(e,t){e.fire("AfterScrollIntoView",t)},yk=function(e,t){var n=$o(e);if(0===n.length||pk(e))return{element:e,offset:t};if(t<n.length&&!pk(n[t]))return{element:n[t],offset:0};var r=n[n.length-1];return pk(r)?{element:e,offset:t}:"img"===go(r)?{element:r,offset:1}:bo(r)?{element:r,offset:Uh(r).length}:{element:r,offset:$o(r).length}},bk=function(e,t){var n=vi(e),r=ck(e);return{element:e,bottom:n.top()+r,height:r,pos:n,cleanup:t}},Ck=function(e,t){var n=yk(e,t),r=uo.fromHtml('<span data-mce-bogus="all">'+zf+"</span>");return ni(n.element,r),bk(r,function(){return fi(r)})},wk=function(e){return bk(uo.fromDom(e),pt)},xk=function(e,t,n,r){kk(e,function(){return Nk(e,t,n,r)},n)},Sk=function(e,t,n,r,o){var i={elm:r.element.dom(),alignToTop:o};if(!hk(e,i)){var a=bi(t).top();n(t,a,r,o),vk(e,i)}},Nk=function(e,t,n,r){var o=uo.fromDom(e.getBody()),i=uo.fromDom(e.getDoc());ra(o);var a=Ck(uo.fromDom(n.startContainer),n.startOffset);Sk(e,i,t,a,r),a.cleanup()},Ek=function(e,t,n,r){var o=uo.fromDom(e.getDoc());Sk(e,o,n,wk(t),r)},kk=function(e,t,n){var r=n.startContainer,o=n.startOffset,i=n.endContainer,a=n.endOffset;t(uo.fromDom(r),uo.fromDom(i));var u=e.dom.createRng();u.setStart(r,o),u.setEnd(i,a),e.selection.setRng(n)},_k=function(e,t,n,r){var o=e.pos;if(n)Ci(o.left(),o.top(),r);else{var i=o.top()-t+e.height;Ci(o.left(),i,r)}},Tk=function(e,t,n,r,o){var i=n+t,a=r.pos.top(),u=r.bottom,c=u-a>=n;if(t>a)_k(r,n,o!==!1,e);else if(a>i){var s=c?o!==!1:o===!0;_k(r,n,s,e)}else u>i&&!c&&_k(r,n,o===!0,e)},Rk=function(e,t,n,r){var o=e.dom().defaultView.innerHeight;Tk(e,t,o,n,r)},Ak=function(t,n,r,o){var i=t.dom().defaultView.innerHeight;Tk(t,n,i,r,o);var a=gk(r.element),u=Ni(e.window);a.top()<u.y?wi(r.element,o!==!1):a.top()>u.bottom&&wi(r.element,o===!0)},Dk=function(e,t,n){return xk(e,Rk,t,n)},Ok=function(e,t,n){return Ek(e,t,Rk,n)},Bk=function(e,t,n){return xk(e,Ak,t,n)},Pk=function(e,t,n){return Ek(e,t,Ak,n)},Lk=function(e,t,n){var r=e.inline?Ok:Pk;r(e,t,n)},Ik=function(e,t,n){var r=e.inline?Dk:Bk;r(e,t,n)},Mk=function(e){return Hi(e)||Vi(e)},Fk=function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null},Uk=function(e,t,n){var r,o=n.elementFromPoint(e,t),i=n.body.createTextRange();if(o&&"HTML"!==o.tagName||(o=n.body),i.moveToElementText(o),r=to.toArray(i.getClientRects()),r=r.sort(function(e,n){return e=Math.abs(Math.max(e.top-t,e.bottom-t)),n=Math.abs(Math.max(n.top-t,n.bottom-t)),e-n}),r.length>0){t=(r[0].bottom+r[0].top)/2;try{return i.moveToPoint(e,t),i.collapse(!0),i}catch(a){}}return null},zk=function(e,t){var n=e&&e.parentElement?e.parentElement():null;return Vi(Fk(n,t,Mk))?null:e},jk=function(e,t,n){var r,o,i=n;if(i.caretPositionFromPoint)o=i.caretPositionFromPoint(e,t),o&&(r=n.createRange(),r.setStart(o.offsetNode,o.offset),r.collapse(!0));else if(n.caretRangeFromPoint)r=n.caretRangeFromPoint(e,t);else if(i.body.createTextRange){r=i.body.createTextRange();try{r.moveToPoint(e,t),r.collapse(!0)}catch(a){r=Uk(e,t,n)}return zk(r,n.body)}return r},Hk=function(e,t,n,r,o){var i=n?t.startContainer:t.endContainer,a=n?t.startOffset:t.endOffset;return Tt.from(i).map(uo.fromDom).map(function(e){return r&&t.collapsed?e:Wo(e,o(e,a)).getOr(e)}).bind(function(e){return yo(e)?Tt.some(e):Fo(e).filter(yo)}).map(function(e){return e.dom()}).getOr(e)},Vk=function(e,t,n){return Hk(e,t,!0,n,function(e,t){return Math.min(Yo(e),t)})},qk=function(e,t,n){return Hk(e,t,!1,n,function(e,t){return t>0?t-1:t})},$k=function(e,t){for(var n=e;e&&Mi(e)&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n},Wk=function(e,t){var n,r,o;if(!t)return e;r=t.startContainer,o=t.endContainer;var i=t.startOffset,a=t.endOffset;return n=t.commonAncestorContainer,!t.collapsed&&(r===o&&2>a-i&&r.hasChildNodes()&&(n=r.childNodes[i]),3===r.nodeType&&3===o.nodeType&&(r=r.length===i?$k(r.nextSibling,!0):r.parentNode,o=0===a?$k(o.previousSibling,!1):o.parentNode,r&&r===o))?r:n&&3===n.nodeType?n.parentNode:n},Kk=function(e,t,n,r){var o,i=[],a=e.getRoot();if(n=e.getParent(n||Vk(a,t,t.collapsed),e.isBlock),r=e.getParent(r||qk(a,t,t.collapsed),e.isBlock),n&&n!==a&&i.push(n),n&&r&&n!==r){o=n;for(var u=new jc(n,a);(o=u.next())&&o!==r;)e.isBlock(o)&&i.push(o)}return r&&n!==r&&r!==a&&i.push(r),i},Xk=function(e,t,n){return Tt.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&&(Ph(e,o,t,!0),Ph(e,o,t,!1)),o})},Yk=function(e,t){void 0===t&&(t={});var n=t.format?t.format:"html";return DN(e,n,t)},Gk=function(e,t){return e&&t&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset},Jk=function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null},Qk=function(e,t,n){return null!==Jk(e,t,n)},Zk=function(e,t,n){return Qk(e,t,function(e){return e.nodeName===n})},e_=function(e){return e&&"TABLE"===e.nodeName},t_=function(e){return e&&/^(TD|TH|CAPTION)$/.test(e.nodeName)},n_=function(e,t){return Kf(e)&&Qk(e,t,hp)===!1},r_=function(e,t,n){for(var r=new jc(t,e.getParent(t.parentNode,e.isBlock)||e.getRoot());t=r[n?"prev":"next"]();)if(ji(t))return!0},o_=function(e,t){return e.previousSibling&&e.previousSibling.nodeName===t},i_=function(e,t){for(;t&&t!==e;){if(Vi(t))return!0;t=t.parentNode}return!1},a_=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&&ji(o)&&t&&e.isEmpty(s))return Tt.some(k(o.parentNode,e.nodeIndex(o)));for(var f=new jc(o,s);a=f[r?"prev":"next"]();){if("false"===e.getContentEditableParent(a)||n_(a,u))return Tt.none();if(Mi(a)&&a.nodeValue.length>0)return Zk(a,u,"A")===!1?Tt.some(k(a,r?a.nodeValue.length:0)):Tt.none();if(e.isBlock(a)||c[a.nodeName.toLowerCase()])return Tt.none();i=a}return n&&i?Tt.some(k(i,0)):Tt.none()},u_=function(e,t,n,r){var o,i,a,u,c=e.getRoot(),s=!1;o=r[(n?"start":"end")+"Container"],i=r[(n?"start":"end")+"Offset"];var f=_i(o)&&i===o.childNodes.length,l=e.schema.getNonEmptyElements();if(u=n,Kf(o))return Tt.none();if(_i(o)&&i>o.childNodes.length-1&&(u=!1),Ui(o)&&(o=c,i=0),o===c){if(u&&(a=o.childNodes[i>0?i-1:0])){if(Kf(a))return Tt.none();if(l[a.nodeName]||e_(a))return Tt.none()}if(o.hasChildNodes()){if(i=Math.min(!u&&i>0?i-1:i,o.childNodes.length-1),o=o.childNodes[i],i=Mi(o)&&f?o.data.length:0,!t&&o===c.lastChild&&e_(o))return Tt.none();if(i_(c,o)||Kf(o))return Tt.none();if(o.hasChildNodes()&&e_(o)===!1){a=o;var d=new jc(o,c);do{if(Vi(a)||Kf(a)){s=!1;break}if(Mi(a)&&a.nodeValue.length>0){i=u?0:a.nodeValue.length,o=a,s=!0;break}if(l[a.nodeName.toLowerCase()]&&!t_(a)){i=e.nodeIndex(a),o=a.parentNode,u||i++,s=!0;break}}while(a=u?d.next():d.prev())}}}return t&&(Mi(o)&&0===i&&a_(e,f,t,!0,o).each(function(e){o=e.container(),i=e.offset(),s=!0}),_i(o)&&(a=o.childNodes[i],a||(a=o.childNodes[i-1]),!a||!ji(a)||o_(a,"A")||r_(e,a,!1)||r_(e,a,!0)||a_(e,f,t,!0,a).each(function(e){o=e.container(),i=e.offset(),s=!0}))),u&&!t&&Mi(o)&&i===o.nodeValue.length&&a_(e,f,t,!1,o).each(function(e){o=e.container(),i=e.offset(),s=!0}),s?Tt.some(k(o,i)):Tt.none()},c_=function(e,t){var n=t.collapsed,r=t.cloneRange(),o=k.fromRangeStart(t);return u_(e,n,!0,r).each(function(e){n&&k.isAbove(o,e)||r.setStart(e.container(),e.offset())}),n||u_(e,n,!1,r).each(function(e){r.setEnd(e.container(),e.offset())}),n&&r.collapse(!0),Gk(t,r)?Tt.none():Tt.some(r)},s_=function(e,t){e.insertData(0,t)},f_=function(e){return 0===e.dom().length?(fi(e),Tt.none()):Tt.some(e)},l_=function(e,t){var n=Tt.from(t.firstChild).map(uo.fromDom),r=Tt.from(t.lastChild).map(uo.fromDom);e.deleteContents(),e.insertNode(t);var o=n.bind(jo).filter(bo).bind(f_),i=r.bind(Ho).filter(bo).bind(f_);al(o,n.filter(bo),function(e,t){s_(t.dom(),e.dom().data),fi(e)}),al(i,r.filter(bo),function(t,n){var r=n.dom().length;n.dom().appendData(t.dom().data),e.setEnd(n.dom(),r),fi(t)}),e.collapse(!1)},d_=function(e,t){return Fn(Fn({format:"html"},e),{set:!0,selection:!0,content:t})},m_=function(e,t){if("raw"!==t.format){var n=e.parser.parse(t.content,Fn({isRootContent:!0,forced_root_block:!1},t));return tv({validate:e.validate},e.schema).serialize(n)}return t.content},g_=function(e,t,n){void 0===n&&(n={});var r=d_(n,t);if(!r.no_events&&(r=e.fire("BeforeSetContent",r),r.isDefaultPrevented()))return void e.fire("SetContent",r);n.content=m_(e,r);var o=e.selection.getRng();l_(o,o.createContextualFragment(n.content)),e.selection.setRng(o),Ik(e,o),r.no_events||e.fire("SetContent",r)};!function(e){e.isBookmarkNode=Fp}(B||(B={}));var p_,h_=B,v_=function(e,t,n){if(n.collapsed)return!1;if(Hr.browser.isIE()&&n.startOffset===n.endOffset-1&&n.startContainer===n.endContainer){var r=n.startContainer.childNodes[n.startOffset];if(_i(r))return Kt(r.getClientRects(),function(n){return hl(n,e,t)})}return Kt(n.getClientRects(),function(n){return hl(n,e,t)})},y_={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 Hr.mac?e.metaKey:e.ctrlKey&&!e.altKey}},b_=Vi,C_=Hi,w_=function(e,t){for(;t&&t!==e;){if(C_(t)||b_(t))return t;t=t.parentNode}return null},x_=function(t,n){var r,o,i,a,u,c,s,f,l,d,m,g,p,h,v,y,b=n.dom,C=to.each,w=n.getDoc(),x=e.document,S=Math.abs,N=Math.round,E=n.getBody(),k={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},_=function(e){return e&&("IMG"===e.nodeName||n.dom.is(e,"figure.image"))},T=function(e,t){if("longpress"===e.type||0===e.type.indexOf("touch")){var n=e.touches[0];return _(e.target)&&!v_(n.clientX,n.clientY,t)}return _(e.target)&&!v_(e.clientX,e.clientY,t)},R=function(e){var t=e.target;T(e,n.selection.getRng())&&!e.isDefaultPrevented()&&n.selection.select(t)},A=function(e){return n.dom.is(e,"figure.image")?e.querySelector("img"):e},D=function(e){var t=Sm(n);return t===!1||Hr.iOS?!1:("string"!=typeof t&&(t="table,img,figure.image,div"),"false"===e.getAttribute("data-mce-resize")?!1:e===n.getBody()?!1:ko(uo.fromDom(e),t))},O=function(e,t,n){b.setStyles(A(e),{width:t,height:n})},B=function(e){var t,C,w,x,k;t=e.screenX-u,C=e.screenY-c,p=t*a[2]+l,h=C*a[3]+d,p=5>p?5:p,h=5>h?5:h,w=_(r)&&Nm(n)!==!1?!y_.modifierPressed(e):y_.modifierPressed(e),w&&(S(t)>S(C)?(h=N(p*m),p=N(h/m)):(p=N(h/m),h=N(p*m))),O(o,p,h),x=a.startPos.x+t,k=a.startPos.y+C,x=x>0?x:0,k=k>0?k:0,b.setStyles(i,{left:x,top:k,display:"block"}),i.innerHTML=p+" &times; "+h,a[2]<0&&o.clientWidth<=p&&b.setStyle(o,"left",s+(l-p)),a[3]<0&&o.clientHeight<=h&&b.setStyle(o,"top",f+(d-h)),t=E.scrollWidth-v,C=E.scrollHeight-y,t+C!==0&&b.setStyles(i,{left:x-t,top:k-C}),g||(zN(n,r,l,d),g=!0)},P=function(){var e=g;g=!1;var t=function(e,t){t&&(r.style[e]||!n.schema.isValid(r.nodeName.toLowerCase(),e)?b.setStyle(A(r),e,t):b.setAttrib(A(r),e,""+t))};e&&(t("width",p),t("height",h)),b.unbind(w,"mousemove",B),b.unbind(w,"mouseup",P),x!==w&&(b.unbind(x,"mousemove",B),b.unbind(x,"mouseup",P)),b.remove(o),b.remove(i),L(r),e&&(jN(n,r,p,h),b.setAttrib(r,"style",b.getAttrib(r,"style"))),n.nodeChanged()},L=function(e){I(),U();var t=b.getPos(e,E),s=t.x,f=t.y,g=e.getBoundingClientRect(),S=g.width||g.right-g.left,N=g.height||g.bottom-g.top;r!==e&&(r=e,p=h=0);var _=n.fire("ObjectSelected",{target:e});D(e)&&!_.isDefaultPrevented()?C(k,function(e,t){var n,g=function(t){u=t.screenX,c=t.screenY,l=A(r).clientWidth,d=A(r).clientHeight,m=d/l,a=e,e.startPos={x:S*e[0]+s,y:N*e[1]+f},v=E.scrollWidth,y=E.scrollHeight,o=r.cloneNode(!0),b.addClass(o,"mce-clonedresizable"),b.setAttrib(o,"data-mce-bogus","all"),o.contentEditable=!1,o.unSelectabe=!0,b.setStyles(o,{left:s,top:f,margin:0}),O(o,S,N),o.removeAttribute("data-mce-selected"),E.appendChild(o),b.bind(w,"mousemove",B),b.bind(w,"mouseup",P),x!==w&&(b.bind(x,"mousemove",B),b.bind(x,"mouseup",P)),i=b.add(E,"div",{"class":"mce-resize-helper","data-mce-bogus":"all"},l+" &times; "+d)};n=b.get("mceResizeHandle"+t),n&&b.remove(n),n=b.add(E,"div",{id:"mceResizeHandle"+t,"data-mce-bogus":"all","class":"mce-resizehandle",unselectable:!0,style:"cursor:"+t+"-resize; margin:0; padding:0"}),11===Hr.ie&&(n.contentEditable=!1),b.bind(n,"mousedown",function(e){e.stopImmediatePropagation(),e.preventDefault(),g(e)}),e.elm=n,b.setStyles(n,{left:S*e[0]+s-n.offsetWidth/2,top:N*e[1]+f-n.offsetHeight/2})}):I(),r.setAttribute("data-mce-selected","1")},I=function(){U(),r&&r.removeAttribute("data-mce-selected"),vn(k,function(e,t){var n=b.get("mceResizeHandle"+t);n&&(b.unbind(n),b.remove(n))})},M=function(e){var r,o,i=function(e,t){if(e)do if(e===t)return!0;while(e=e.parentNode)};return g||n.removed?void 0:(C(b.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),o="mousedown"===e.type?e.target:t.getNode(),o=b.$(o).closest("table,img,figure.image,hr")[0],i(o,E)&&(z(),r=t.getStart(!0),i(r,o)&&i(t.getEnd(!0),o))?void L(o):void I())},F=function(e){return b_(w_(n.getBody(),e))},U=function(){vn(k,function(e){e.elm&&(b.unbind(e.elm),delete e.elm)})},z=function(){try{n.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}};n.on("init",function(){if(z(),Hr.browser.isIE()||Hr.browser.isEdge()){n.on("mousedown click",function(e){var t=e.target,r=t.nodeName;g||!/^(TABLE|IMG|HR)$/.test(r)||F(t)||(2!==e.button&&n.selection.select(t,"TABLE"===r),"mousedown"===e.type&&n.nodeChanged())});var e=function(e){var t=function(e){vs.setEditorTimeout(n,function(){return n.selection.select(e)})};return F(e.target)?(e.preventDefault(),void t(e.target)):void(/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"===e.target.tagName&&t(e.target)))};b.bind(E,"mscontrolselect",e),n.on("remove",function(){return b.unbind(E,"mscontrolselect",e)})}var t=vs.throttle(function(e){n.composing||M(e)});n.on("nodechange ResizeEditor ResizeWindow ResizeContent drop FullscreenStateChanged",t),n.on("keyup compositionend",function(e){r&&"TABLE"===r.nodeName&&t(e)}),n.on("hide blur",I),n.on("contextmenu longpress",R,!0)}),n.on("remove",U);var j=function(){r=o=null};return{isResizable:D,showResizeRect:L,hideResizeRect:I,updateResizeRect:M,destroy:j}},S_=function(e,t,n){if(e&&e.hasOwnProperty(t)){var r=Qt(e[t],function(e){return e!==n});0===r.length?delete e[t]:e[t]=r}},N_=function(e){return!!e.select},E_=function(e){return!(!e||!e.ownerDocument)&&Bo(uo.fromDom(e.ownerDocument),uo.fromDom(e))},k_=function(e){return e?N_(e)?!0:E_(e.startContainer)&&E_(e.endContainer):!1},__=function(e,t,n,r){var o,i,a=P(e,r).selectorChangedWithUnbind,u=function(t,n){var o=e.createRng();t?(o.setStart(t,n),o.setEnd(t,n),b(o),h(!1)):(Ph(e,o,r.getBody(),!0),b(o))},c=function(e){return Yk(r,e)},s=function(e,t){return g_(r,e,t)},f=function(e){return Vk(r.getBody(),y(),e)},l=function(e){return qk(r.getBody(),y(),e)},d=function(e,t){return O.getBookmark(e,t)},m=function(e){return O.moveToBookmark(e)},g=function(t,n){return Xk(e,t,n).each(b),t},p=function(){var e=y(),t=v();return!e||e.item?!1:e.compareEndPoints?0===e.compareEndPoints("StartToEnd",e):!t||e.collapsed},h=function(e){var t=y();t.collapse(!!e),b(t)},v=function(){return t.getSelection?t.getSelection():t.document.selection},y=function(){var n,a,u,c=function(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(r){return-1}};if(!t)return null;var s=t.document;if("undefined"==typeof s||null===s)return null;if(void 0!==r.bookmark&&iw(r)===!1){var f=OC(r);if(f.isSome())return f.map(function(e){return zx(r,[e])[0]}).getOr(s.createRange())}try{(n=v())&&!ki(n.anchorNode)&&(a=n.rangeCount>0?n.getRangeAt(0):n.createRange?n.createRange():s.createRange())}catch(l){}return a=zx(r,[a])[0],a||(a=s.createRange?s.createRange():s.body.createTextRange()),a.setStart&&9===a.startContainer.nodeType&&a.collapsed&&(u=e.getRoot(),a.setStart(u,0),a.setEnd(u,0)),o&&i&&(0===c(a.START_TO_START,a,o)&&0===c(a.END_TO_END,a,o)?a=i:(o=null,i=null)),a},b=function(e,t){var n;if(k_(e)){var a=N_(e)?e:null;if(a){i=null;try{a.select()}catch(u){}}else{var c=v(),s=r.fire("SetSelectionRange",{range:e,forward:t});if(e=s.range,c){i=e;try{c.removeAllRanges(),c.addRange(e)}catch(u){}t===!1&&c.extend&&(c.collapse(e.endContainer,e.endOffset),c.extend(e.startContainer,e.startOffset)),o=c.rangeCount>0?c.getRangeAt(0):null}e.collapsed||e.startContainer!==e.endContainer||!c.setBaseAndExtent||Hr.ie||e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()&&(n=e.startContainer.childNodes[e.startOffset],n&&"IMG"===n.tagName&&(c.setBaseAndExtent(e.startContainer,e.startOffset,e.endContainer,e.endOffset),(c.anchorNode!==e.startContainer||c.focusNode!==e.endContainer)&&c.setBaseAndExtent(n,0,n,1))),r.fire("AfterSetSelectionRange",{range:e,forward:t})}}},C=function(t){return s(e.getOuterHTML(t)),t},w=function(){return Wk(r.getBody(),y())},x=function(t,n){return Kk(e,y(),t,n)},S=function(){var t=v();if(!t||!t.anchorNode||!t.focusNode)return!0;var n=e.createRng();n.setStart(t.anchorNode,t.anchorOffset),n.collapse(!0);var r=e.createRng();return r.setStart(t.focusNode,t.focusOffset),r.collapse(!0),n.compareBoundaryPoints(n.START_TO_START,r)<=0},N=function(){var t=y(),n=v();if(!Nh(n)&&Lh(r)){var o=c_(e,t);return o.each(function(e){b(e,S())}),o.getOr(t)}return t},E=function(e,t){return a(e,t),D},k=function(){for(var t,n=e.getRoot();n&&"BODY"!==n.nodeName;){if(n.scrollHeight>n.clientHeight){t=n;break}n=n.parentNode}return t},_=function(e,t){return Lk(r,e,t)},T=function(e,t){return b(jk(e,t,r.getDoc()))},R=function(){var e=y();return e.collapsed?id.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},A=function(){t=o=i=null,B.destroy()},D={bookmarkManager:null,controlSelection:null,dom:e,win:t,serializer:n,editor:r,collapse:h,setCursorLocation:u,getContent:c,setContent:s,getBookmark:d,moveToBookmark:m,select:g,isCollapsed:p,isForward:S,setNode:C,getNode:w,getSel:v,setRng:b,getRng:y,getStart:f,getEnd:l,getSelectedBlocks:x,normalize:N,selectorChanged:E,selectorChangedWithUnbind:a,getScrollContainer:k,scrollIntoView:_,placeCaretAt:T,getBoundingClientRect:R,destroy:A},O=h_(D),B=x_(D,r);return D.bookmarkManager=O,D.controlSelection=B,D},T_=function(e,t){Yt(t,function(t){e.attr(t,null)})},R_=function(e,t,n){e.addNodeFilter("font",function(e){Yt(e,function(e){var r=t.parse(e.attr("style")),o=e.attr("color"),i=e.attr("face"),a=e.attr("size");o&&(r.color=o),i&&(r["font-family"]=i),a&&(r["font-size"]=n[parseInt(e.attr("size"),10)-1]),e.name="span",e.attr("style",t.serialize(r)),T_(e,["color","face","size"])})})},A_=function(e,t){e.addNodeFilter("strike",function(e){Yt(e,function(e){var n=t.parse(e.attr("style"));n["text-decoration"]="line-through",e.name="span",e.attr("style",t.serialize(n))})})},D_=function(e,t){var n=mu();t.convert_fonts_to_spans&&R_(e,n,to.explode(t.font_size_legacy_values)),A_(e,n)},O_=function(e,t){t.inline_styles&&D_(e,t)},B_=function(t){return new fs(function(n,r){var o=function(){r("Cannot convert "+t+" to Blob. Resource might not exist or is inaccessible.")};try{var i=new e.XMLHttpRequest;i.open("GET",t,!0),i.responseType="blob",i.onload=function(){200===this.status?n(this.response):o()},i.onerror=o,i.send()}catch(a){o()}})},P_=function(e){var t,n=decodeURIComponent(e).split(","),r=/data:([^;]+)/.exec(n[0]);return r&&(t=r[1]),{type:t,data:n[1]}},L_=function(t,n){var r;try{r=e.atob(n)}catch(o){return Tt.none()}for(var i=new Uint8Array(r.length),a=0;a<i.length;a++)i[a]=r.charCodeAt(a);return Tt.some(new e.Blob([i],{type:t}))},I_=function(t){return new fs(function(n){var r=P_(t),o=r.type,i=r.data;L_(o,i).fold(function(){return n(new e.Blob([]))},n)})},M_=function(e){return 0===e.indexOf("blob:")?B_(e):0===e.indexOf("data:")?I_(e):null},F_=function(t){return new fs(function(n){var r=new e.FileReader;r.onloadend=function(){n(r.result)},r.readAsDataURL(t)})},U_=0,z_=function(e){return(e||"blobid")+U_++},j_=function(e,t,n,r){var o,i;if(0===t.src.indexOf("blob:"))return i=e.getByUri(t.src),void(i?n({image:t,blobInfo:i}):M_(t.src).then(function(r){F_(r).then(function(a){o=P_(a).data,i=e.create(z_(),r,o),e.add(i),n({image:t,blobInfo:i})})},function(e){r(e)}));var a=P_(t.src),u=a.data,c=a.type;o=u,i=e.getByData(o,c),i?n({image:t,blobInfo:i}):M_(t.src).then(function(r){i=e.create(z_(),r,o),e.add(i),n({image:t,blobInfo:i})},function(e){r(e)})},H_=function(e){return e?gn(e.getElementsByTagName("img")):[]},V_=function(e,t,n,r){var o=e.padd_empty_with_br||t.insert;o&&n[r.name]?r.empty().append(new Qh("br",1)).shortEnded=!0:r.empty().append(new Qh("#text",3)).value=su},q_=function(e){return $_(e,"#text")&&e.firstChild.value===su},$_=function(e,t){return e&&e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.name===t},W_=function(e,t){var n=e.getElementRule(t.name);return n&&n.paddEmpty},K_=function(e,t,n,r){return r.isEmpty(t,n,function(t){return W_(e,t)})},X_=function(e,t){return e&&(t[e.name]||"br"===e.name)},Y_=function(e){return e.attr("data-mce-bogus")},G_=function(e){return e.attr("src")===Hr.transparentSrc||e.attr("data-mce-placeholder")},J_=function(t,n){if(n.images_dataimg_filter){var r=new e.Image;return r.src=t.attr("src"),vn(t.attributes.map,function(e,t){r.setAttribute(t,e)}),n.images_dataimg_filter(r)}return!0},Q_=function(e,t){var n=t.blob_cache,r=function(e){var r=e.attr("src");G_(e)||Y_(e)||ov(r).filter(function(){return J_(e,t)}).bind(function(e){var t=e.type,r=e.data;return Tt.from(n.getByData(r,t)).orThunk(function(){return L_(t,r).map(function(e){var t=n.create(z_(),e,r);return n.add(t),t})})}).each(function(t){e.attr("src",t.blobUri())})};n&&e.addAttributeFilter("src",function(e){return Yt(e,r)})},Z_=function(e,t){var n=e.schema;t.remove_trailing_brs&&e.addNodeFilter("br",function(e,r,o){var i,a,u,c,s,f,l,d,m=e.length,g=to.extend({},n.getBlockElements()),p=n.getNonEmptyElements(),h=n.getWhiteSpaceElements();for(g.body=1,i=0;m>i;i++)if(a=e[i],u=a.parent,g[a.parent.name]&&a===u.lastChild){for(s=a.prev;s;){if(f=s.name,"span"!==f||"bookmark"!==s.attr("data-mce-type")){if("br"!==f)break;if("br"===f){a=null;break}}s=s.prev}a&&(a.remove(),K_(n,p,h,u)&&(l=n.getElementRule(u.name),l&&(l.removeEmpty?u.remove():l.paddEmpty&&V_(t,o,g,u))))}else{for(c=a;u&&u.firstChild===c&&u.lastChild===c&&(c=u,!g[u.name]);)u=u.parent;c===u&&t.padd_empty_with_br!==!0&&(d=new Qh("#text",3),d.value=su,a.replace(d))}}),e.addAttributeFilter("href",function(e){var n=e.length,r=function(e){var t=e.split(" ").filter(function(e){return e.length>0});return t.concat(["noopener"]).sort().join(" ")},o=function(e){var t=e?to.trim(e):"";return/\b(noopener)\b/g.test(t)?t:r(t)};if(!t.allow_unsafe_link_target)for(;n--;){var i=e[n];"a"===i.name&&"_blank"===i.attr("target")&&i.attr("rel",o(i.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(o=e[i],"a"===o.name&&o.firstChild&&!o.attr("href")){r=o.parent,t=o.lastChild;do n=t.prev,r.insert(t,o),t=n;while(t)}}),t.fix_list_elements&&e.addNodeFilter("ul,ol",function(e){for(var t,n,r=e.length;r--;)if(t=e[r],n=t.parent,"ul"===n.name||"ol"===n.name)if(t.prev&&"li"===t.prev.name)t.prev.append(t);else{var o=new Qh("li",1);o.attr("style","list-style-type: none"),t.wrap(o)
}}),t.validate&&n.getValidClasses()&&e.addAttributeFilter("class",function(e){for(var t,r,o,i,a,u,c,s=e.length,f=n.getValidClasses();s--;){for(t=e[s],r=t.attr("class").split(" "),a="",o=0;o<r.length;o++)i=r[o],c=!1,u=f["*"],u&&u[i]&&(c=!0),u=f[t.name],!c&&u&&u[i]&&(c=!0),c&&(a&&(a+=" "),a+=i);a.length||(a=null),t.attr("class",a)}}),Q_(e,t)},eT=to.makeMap,tT=to.each,nT=to.explode,rT=to.extend,oT=function(e,t){void 0===t&&(t=i());var n={},r=[],o={},a={};e=e||{},e.validate="validate"in e?e.validate:!0,e.root_name=e.root_name||"body";var u=function(e){var n,r,o,i,a,u,s,f,l,d,m,g=eT("tr,td,th,tbody,thead,tfoot,table"),p=t.getNonEmptyElements(),h=t.getWhiteSpaceElements(),v=t.getTextBlockElements(),y=t.getSpecialElements();for(n=0;n<e.length;n++)if(r=e[n],r.parent&&!r.fixed)if(v[r.name]&&"li"===r.parent.name){for(d=r.next;d&&v[d.name];)d.name="li",d.fixed=!0,r.parent.insert(d,r.parent),d=d.next;r.unwrap(r)}else{for(i=[r],o=r.parent;o&&!t.isValidChild(o.name,r.name)&&!g[o.name];o=o.parent)i.push(o);if(o&&i.length>1){for(i.reverse(),a=u=c(i[0].clone()),l=0;l<i.length-1;l++){for(t.isValidChild(u.name,i[l].name)?(s=c(i[l].clone()),u.append(s)):s=u,f=i[l].firstChild;f&&f!==i[l+1];)m=f.next,s.append(f),f=m;u=s}K_(t,p,h,a)?o.insert(r,i[0],!0):(o.insert(a,i[0],!0),o.insert(r,a)),o=i[0],(K_(t,p,h,o)||$_(o,"br"))&&o.empty().remove()}else if(r.parent){if("li"===r.name){if(d=r.prev,d&&("ul"===d.name||"ul"===d.name)){d.append(r);continue}if(d=r.next,d&&("ul"===d.name||"ul"===d.name)){d.insert(r,d.firstChild,!0);continue}r.wrap(c(new Qh("ul",1)));continue}t.isValidChild(r.parent.name,"div")&&t.isValidChild("div",r.name)?r.wrap(c(new Qh("div",1))):y[r.name]?r.empty().remove():r.unwrap()}}},c=function(e){var t,i,u;i=e.name,i in n&&(u=o[i],u?u.push(e):o[i]=[e]),t=r.length;for(;t--;)i=r[t].name,i in e.attributes.map&&(u=a[i],u?u.push(e):a[i]=[e]);return e},s=function(e,t){tT(nT(e),function(e){var r=n[e];r||(n[e]=r=[]),r.push(t)})},f=function(){var e=[];for(var t in n)n.hasOwnProperty(t)&&e.push({name:t,callbacks:n[t]});return e},l=function(e,t){tT(nT(e),function(e){var n;for(n=0;n<r.length;n++)if(r[n].name===e)return void r[n].callbacks.push(t);r.push({name:e,callbacks:[t]})})},d=function(){return[].concat(r)},m=function(i,c){var s,f,l,d,m,g,p,h,v,y=[],b=function(e){return e===!1?"":e===!0?"p":e};c=c||{},o={},a={};var C=rT(eT("script,style,head,html,body,title,meta,param"),t.getBlockElements()),w=t.getNonEmptyElements(),x=t.children,S=e.validate,N="forced_root_block"in c?c.forced_root_block:e.forced_root_block,E=b(N),k=t.getWhiteSpaceElements(),_=/^[ \t\r\n]+/,T=/[ \t\r\n]+$/,R=/[ \t\r\n]+/g,A=/^[ \t\r\n]+$/;h=k.hasOwnProperty(c.context)||k.hasOwnProperty(e.root_name);var D=function(){var n,r,o=I.firstChild,i=function(e){e&&(o=e.firstChild,o&&3===o.type&&(o.value=o.value.replace(_,"")),o=e.lastChild,o&&3===o.type&&(o.value=o.value.replace(T,"")))};if(t.isValidChild(I.name,E.toLowerCase())){for(;o;)n=o.next,3===o.type||1===o.type&&"p"!==o.name&&!C[o.name]&&!o.attr("data-mce-type")?r?r.append(o):(r=O(E,1),r.attr(e.forced_root_block_attrs),I.insert(r,o),r.append(o)):(i(r),r=null),o=n;i(r)}},O=function(e,t){var r,i=new Qh(e,t);return e in n&&(r=o[e],r?r.push(i):o[e]=[i]),i},B=function(e){var n,r,o,i,a=t.getBlockElements();for(n=e.prev;n&&3===n.type;){if(o=n.value.replace(T,""),o.length>0)return void(n.value=o);if(r=n.next){if(3===r.type&&r.value.length){n=n.prev;continue}if(!a[r.name]&&"script"!==r.name&&"style"!==r.name){n=n.prev;continue}}i=n.prev,n.remove(),n=i}},P=function(e){var t,n={};for(t in e)"li"!==t&&"p"!==t&&(n[t]=e[t]);return n},L=dv({validate:S,allow_html_data_urls:e.allow_html_data_urls,allow_script_urls:e.allow_script_urls,allow_conditional_comments:e.allow_conditional_comments,preserve_cdata:e.preserve_cdata,self_closing_elements:P(t.getSelfClosingElements()),cdata:function(e){v.append(O("#cdata",4)).value=e},text:function(e,t){var n;h||(e=e.replace(R," "),X_(v.lastChild,C)&&(e=e.replace(_,""))),0!==e.length&&(n=O("#text",3),n.raw=!!t,v.append(n).value=e)},comment:function(e){v.append(O("#comment",8)).value=e},pi:function(e,t){v.append(O(e,7)).value=t,B(v)},doctype:function(e){var t=v.append(O("#doctype",10));t.value=e,B(v)},start:function(e,n,o){var i,u,c,s,f=S?t.getElementRule(e):{};if(f){for(i=O(f.outputName||e,1),i.attributes=n,i.shortEnded=o,v.append(i),s=x[v.name],s&&x[i.name]&&!s[i.name]&&y.push(i),u=r.length;u--;)c=r[u].name,c in n.map&&(g=a[c],g?g.push(i):a[c]=[i]);C[e]&&B(i),o||(v=i),!h&&k[e]&&(h=!0)}},end:function(n){var r,o,i,a,u=S?t.getElementRule(n):{};if(u){if(C[n]&&!h){if(r=v.firstChild,r&&3===r.type)if(o=r.value.replace(_,""),o.length>0)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||A.test(o))&&(r.remove(),r=i),r=i;if(r=v.lastChild,r&&3===r.type)if(o=r.value.replace(T,""),o.length>0)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||A.test(o))&&(r.remove(),r=i),r=i}if(h&&k[n]&&(h=!1),u.removeEmpty&&K_(t,w,k,v))return a=v.parent,C[v.name]?v.empty().remove():v.unwrap(),void(v=a);u.paddEmpty&&(q_(v)||K_(t,w,k,v))&&V_(e,c,C,v),v=v.parent}}},t),I=v=new Qh(c.context||e.root_name,11);if(L.parse(i,c.format),S&&y.length&&(c.context?c.invalid=!0:u(y)),E&&("body"===I.name||c.isRootContent)&&D(),!c.invalid){for(p in o)if(o.hasOwnProperty(p)){for(g=n[p],s=o[p],d=s.length;d--;)s[d].parent||s.splice(d,1);for(f=0,l=g.length;l>f;f++)g[f](s,p,c)}for(f=0,l=r.length;l>f;f++)if(g=r[f],g.name in a){for(s=a[g.name],d=s.length;d--;)s[d].parent||s.splice(d,1);for(d=0,m=g.callbacks.length;m>d;d++)g.callbacks[d](s,g.name,c)}}return I},g={schema:t,addAttributeFilter:l,getAttributeFilters:d,addNodeFilter:s,getNodeFilters:f,filterNode:c,parse:m};return Z_(g,e),O_(g,e),g},iT=function(e,t,n){e.addAttributeFilter("data-mce-tabindex",function(e,t){for(var n,r=e.length;r--;)n=e[r],n.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--;)o=e[a],i=o.attr(u),void 0!==i?(o.attr(r,i.length>0?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,i.length>0?i:null))}),e.addAttributeFilter("class",function(e){for(var t,n,r=e.length;r--;)t=e[r],n=t.attr("class"),n&&(n=t.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),t.attr("class",n.length>0?n:null))}),e.addAttributeFilter("data-mce-type",function(e,t,n){for(var r,o=e.length;o--;)if(r=e[o],"bookmark"===r.attr("data-mce-type")&&!n.cleanup){var i=Tt.from(r.firstChild).exists(function(e){return!jf(e.value)});i?r.unwrap():r.remove()}}),e.addNodeFilter("noscript",function(e){for(var t,n=e.length;n--;)t=e[n].firstChild,t&&(t.value=Ja.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--;)r=e[a],o=r.firstChild?r.firstChild.value:"","script"===n?(i=r.attr("type"),i&&r.attr("type","mce-no/type"===i?null:i.replace(/^mce\-/,"")),"xhtml"===t.element_format&&o.length>0&&(r.firstChild.value="// <![CDATA[\n"+u(o)+"\n// ]]>")):"xhtml"===t.element_format&&o.length>0&&(r.firstChild.value="<!--\n"+u(o)+"\n-->")}),e.addNodeFilter("#comment",function(e){for(var r,o=e.length;o--;)r=e[o],t.preserve_cdata&&0===r.value.indexOf("[CDATA[")?(r.name="#cdata",r.type=4,r.value=n.decode(r.value.replace(/^\[CDATA\[|\]\]$/g,""))):0===r.value.indexOf("mce:protected ")&&(r.name="#text",r.type=3,r.raw=!0,r.value=unescape(r.value).substr(14))}),e.addNodeFilter("xml:namespace,input",function(e,t){for(var n,r=e.length;r--;)n=e[r],7===n.type?n.remove():1===n.type&&("input"!==t||n.attr("type")||n.attr("type","text"))}),e.addAttributeFilter("data-mce-type",function(t){Yt(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,data-mce-placeholder",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)})},aT=function(e){var t=function(e){return e&&"br"===e.name},n=e.lastChild;if(t(n)){var r=n.prev;t(r)&&(n.remove(),r.remove())}},uT=function(t,n,r){var o,i,a=t.dom;n=n.cloneNode(!0);var u=e.document.implementation;return u.createHTMLDocument&&(o=u.createHTMLDocument(""),to.each("BODY"===n.nodeName?n.childNodes:[n],function(e){o.body.appendChild(o.importNode(e,!0))}),n="BODY"!==n.nodeName?o.body.firstChild:o.body,i=a.doc,a.doc=o),LN(t,Fn(Fn({},r),{node:n})),i&&(a.doc=i),n},cT=function(e,t){return e&&e.hasEventListeners("PreProcess")&&!t.no_events},sT=function(e,t,n){return cT(e,n)?uT(e,t,n):t},fT=function(e,t,n){-1===to.inArray(t,n)&&(e.addAttributeFilter(n,function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),t.push(n))},lT=function(e,t,n){if(!t.no_events&&e){var r=IN(e,Fn(Fn({},t),{content:n}));return r.content}return n},dT=function(e,t,n){var r=Hf(n.getInner?t.innerHTML:e.getOuterHTML(t));return n.selection||Aa(uo.fromDom(t))?r:to.trim(r)},mT=function(e,t,n){var r=n.selection?Fn({forced_root_block:!1},n):n,o=e.parse(t,r);return aT(o),o},gT=function(e,t,n){var r=tv(e,t);return r.serialize(n)},pT=function(e,t,n,r,o){var i=gT(t,n,r);return lT(e,o,i)},hT=function(e,n){var r=["data-mce-selected"],o=n&&n.dom?n.dom:Ts.DOM,a=n&&n.schema?n.schema:i(e);e.entity_encoding=e.entity_encoding||"named",e.remove_trailing_brs="remove_trailing_brs"in e?e.remove_trailing_brs:!0;var u=oT(e,a);iT(u,e,o);var c=function(t,r){void 0===r&&(r={});var i=Fn({format:"html"},r),c=sT(n,t,i),s=dT(o,c,i),f=mT(u,s,i);return"tree"===i.format?f:pT(n,e,a,f,i)};return{schema:a,addNodeFilter:u.addNodeFilter,addAttributeFilter:u.addAttributeFilter,serialize:c,addRules:function(e){a.addValidElements(e)},setRules:function(e){a.setValidElements(e)},addTempAttr:t(fT,u,r),getTempAttrs:function(){return r},getNodeFilters:u.getNodeFilters,getAttributeFilters:u.getAttributeFilters}},vT=function(e,t){var n=hT(e,t);return{schema:n.schema,addNodeFilter:n.addNodeFilter,addAttributeFilter:n.addAttributeFilter,serialize:n.serialize,addRules:n.addRules,setRules:n.setRules,addTempAttr:n.addTempAttr,getTempAttrs:n.getTempAttrs,getNodeFilters:n.getNodeFilters,getAttributeFilters:n.getAttributeFilters}},yT=0,bT=function(){var e=function(){return Math.round(4294967295*Math.random()).toString(36)},t=(new Date).getTime();return"s"+t.toString(36)+e()+e()+e()},CT=function(e){return e+yT++ +bT()},wT=function(){var t=[],n=function(e){var t={"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png"};return t[e.toLowerCase()]||"dat"},r=function(e,t,n,r){if(Bt(e)){var i=e;return o({id:i,name:r,blob:t,base64:n})}if(Pt(e))return o(e);throw new Error("Unknown input type")},o=function(t){if(!t.blob||!t.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");var r=t.id||CT("blobid"),o=t.name||r;return{id:yt(r),name:yt(o),filename:yt(o+"."+n(t.blob.type)),blob:yt(t.blob),base64:yt(t.base64),blobUri:yt(t.blobUri||e.URL.createObjectURL(t.blob)),uri:yt(t.uri)}},i=function(e){u(e.id())||t.push(e)},a=function(e){return nn(t,e).getOrUndefined()},u=function(e){return a(function(t){return t.id()===e})},c=function(e){return a(function(t){return t.blobUri()===e})},s=function(e,t){return a(function(n){return n.base64()===e&&n.blob().type===t})},f=function(n){t=Qt(t,function(t){return t.blobUri()===n?(e.URL.revokeObjectURL(t.blobUri()),!1):!0})},l=function(){Yt(t,function(t){e.URL.revokeObjectURL(t.blobUri())}),t=[]};return{create:r,add:i,get:u,getByUri:c,getByData:s,findFirst:a,removeByUri:f,destroy:l}},xT=function(e){var t,n,r=wT(),o=M(),i=[],a=function(t){return function(n){return e.selection?t(n):[]}},u=function(e){return e+(-1===e.indexOf("?")?"?":"&")+(new Date).getTime()},c=function(e,t,n){var r=0;do r=e.indexOf(t,r),-1!==r&&(e=e.substring(0,r)+n+e.substr(r+t.length),r+=n.length-t.length+1);while(-1!==r);return e},s=function(e,t,n){return e=c(e,'src="'+t+'"','src="'+n+'"'),e=c(e,'data-mce-src="'+t+'"','data-mce-src="'+n+'"')},f=function(t,n){Yt(e.undoManager.data,function(e){"fragmented"===e.type?e.fragments=Xt(e.fragments,function(e){return s(e,t,n)}):e.content=s(e.content,t,n)})},l=function(){return e.notificationManager.open({text:e.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})},d=function(t,n){var r=e.convertURL(n,"src");f(t.src,n),e.$(t).attr({src:am(e)?u(n):n,"data-mce-src":r})},m=function(n){return t||(t=I(o,{url:fm(e),basePath:lm(e),credentials:dm(e),handler:mm(e)})),v().then(a(function(o){var i=Xt(o,function(e){return e.blobInfo});return t.upload(i,l).then(a(function(t){var i=Xt(t,function(t,n){var i=o[n].blobInfo,a=o[n].image;return t.status&&um(e)?(r.removeByUri(a.src),d(a,t.url)):t.error&&GE(e,t.error),{element:a,status:t.status,uploadUri:t.url,blobInfo:i}});return n&&n(i),i}))}))},g=function(t){return im(e)?m(t):void 0},p=function(t){if(un(i,function(e){return e(t)})===!1)return!1;if(0===t.getAttribute("src").indexOf("data:")){var n=om(e);return n(t)}return!0},h=function(e){i.push(e)},v=function(){return n||(n=L(o,r)),n.findAll(e.getBody(),p).then(a(function(t){return t=Qt(t,function(t){return"string"==typeof t?(YE(e,t),!1):!0}),Yt(t,function(e){f(e.image.src,e.blobInfo.blobUri()),e.image.src=e.blobInfo.blobUri(),e.image.removeAttribute("data-mce-src")}),t}))},y=function(){r.destroy(),o.destroy(),n=t=null},b=function(t){return t.replace(/src="(blob:[^"]+)"/g,function(t,n){var i=o.getResultUri(n);if(i)return'src="'+i+'"';var a=r.getByUri(n);if(a||(a=en(e.editorManager.get(),function(e,t){return e||t.editorUpload&&t.editorUpload.blobCache.getByUri(n)},null)),a){var u=a.blob();return'src="data:'+u.type+";base64,"+a.base64()+'"'}return t})};return e.on("SetContent",function(){im(e)?g():v()}),e.on("RawSaveContent",function(e){e.content=b(e.content)}),e.on("GetContent",function(e){e.source_view||"raw"===e.format||(e.content=b(e.content))}),e.on("PostRender",function(){e.parser.addNodeFilter("img",function(e){Yt(e,function(e){var t=e.attr("src");if(!r.getByUri(t)){var n=o.getResultUri(t);n&&e.attr("src",n)}})})}),{blobCache:r,addFilter:h,uploadImages:m,uploadImagesAuto:g,scanForImages:v,destroy:y}},ST=function(e,t){var n=Ms({});e.set({}),t.on("NodeChange",function(r){NT(t,r.element,n,e.get())})},NT=function(e,t,n,r){var o=pn(n.get()),i={},a={},u=Qt(nh(e.dom,t),function(e){return 1===e.nodeType&&!e.getAttribute("data-mce-bogus")});vn(r,function(t,n){to.each(u,function(r){return e.formatter.matchNode(r,n,{},t.similar)?(-1===o.indexOf(n)&&(Yt(t.callbacks,function(e){e(!0,{node:r,format:n,parents:u})}),i[n]=t.callbacks),a[n]=t.callbacks,!1):Sw(e,r,n)?!1:void 0})});var c=ET(n.get(),a,t,u);n.set(Fn(Fn({},i),c))},ET=function(e,t,n,r){return xn(e,function(e,o){return _n(t,o)?!0:(Yt(e,function(e){e(!1,{node:n,format:o,parents:r})}),!1)}).t},kT=function(e,t,n,r){var o=e.get();Yt(t.split(","),function(e){o[e]||(o[e]={similar:r,callbacks:[]}),o[e].callbacks.push(n)}),e.set(o)},_T=function(e,t,n){var r=e.get();Yt(t.split(","),function(e){r[e].callbacks=Qt(r[e].callbacks,function(e){return e!==n}),0===r[e].callbacks.length&&delete r[e]}),e.set(r)},TT=function(e,t,n,r,o){return null===t.get()&&ST(t,e),kT(t,n,r,o),{unbind:function(){return _T(t,n,r)}}},RT=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",preserve_attributes:["class","style"]},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all",preserve_attributes:["class","style"]}],italic:[{inline:"em",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all",preserve_attributes:["class","style"]}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all",preserve_attributes:["class","style"]}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all",preserve_attributes:["class","style"]}],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){to.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 to.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},AT=to.each,DT=Ts.DOM,OT=function(e,t){var n,r,o,a=t&&t.schema||i({}),u=function(e,t){t.classes.length&&DT.addClass(e,t.classes.join(" ")),DT.setAttribs(e,t.attrs)},c=function(e){r="string"==typeof e?{name:e,classes:[],attrs:{}}:e;var t=DT.create(r.name);return u(t,r),t},s=function(e,t){var n="string"!=typeof e?e.nodeName.toLowerCase():e,r=a.getElementRule(n),o=r&&r.parentsRequired;return o&&o.length?t&&-1!==to.inArray(o,t)?t:o[0]:!1},f=function(e,t,n){var r,o,i=t.length>0&&t[0],a=i&&i.name,u=s(e,a);if(u)a===u?(o=t[0],t=t.slice(1)):o=u;else if(i)o=t[0],t=t.slice(1);else if(!n)return e;return o&&(r=c(o),r.appendChild(e)),n&&(r||(r=DT.create("div"),r.appendChild(e)),to.each(n,function(t){var n=c(t);r.insertBefore(n,e)})),f(r,t,o&&o.siblings)};return e&&e.length?(r=e[0],n=c(r),o=DT.create("div"),o.appendChild(f(n,e.slice(1),r.siblings)),o):""},BT=function(e){var t,n={classes:[],attrs:{}};return e=n.selector=to.trim(e),"*"!==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!==to.inArray("checked disabled enabled read-only required".split(" "),r)&&(n.attrs[r]=r)}if("["===o){var a=i.match(/([\w\-]+)(?:\=\"([^\"]+))?/);a&&(n.attrs[a[1]]=a[2])}return""})),n.name=t||"div",n},PT=function(e){return e&&"string"==typeof e?(e=e.split(/\s*,\s*/)[0],e=e.replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),to.map(e.split(/(?:>|\s+(?![^\[\]]+\]))/),function(e){var t=to.map(e.split(/(?:~\+|~|\+)/),BT),n=t.pop();return t.length&&(n.siblings=t),n}).reverse()):[]},LT=function(e,t){var n,r,o,i="",a=Om(e);if(""===a)return"";var u=function(e){return e.replace(/%(\w+)/g,"")};if("string"==typeof t){if(t=e.formatter.get(t),!t)return;t=t[0]}if("preview"in t){var c=kn(t,"preview");if(c.is(!1))return"";a=c.getOr(a)}n=t.block||t.inline||"span";var s=PT(t.selector);s.length?(s[0].name||(s[0].name=n),n=t.selector,r=OT(s,e)):r=OT([n],e);var f=DT.select(n,r)[0]||r.firstChild;return AT(t.styles,function(e,t){e=u(e),e&&DT.setStyle(f,t,e)}),AT(t.attributes,function(e,t){e=u(e),e&&DT.setAttrib(f,t,e)}),AT(t.classes,function(e){e=u(e),DT.hasClass(f,e)||DT.addClass(f,e)}),e.fire("PreviewFormats"),DT.setStyles(r,{position:"absolute",left:-65535}),e.getBody().appendChild(r),o=DT.getStyle(e.getBody(),"fontSize",!0),o=/px$/.test(o)?parseInt(o,10):0,AT(a.split(" "),function(t){var n=DT.getStyle(f,t,!0);if(!("background-color"===t&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=DT.getStyle(e.getBody(),t,!0),"#ffffff"===DT.toHex(n).toLowerCase())||"color"===t&&"#000000"===DT.toHex(n).toLowerCase())){if("font-size"===t&&/em|%$/.test(n)){if(0===o)return;var r=parseFloat(n)/(/%$/.test(n)?100:1);n=r*o+"px"}"border"===t&&n&&(i+="padding:0 2px;"),i+=t+":"+n+";"}}),e.fire("AfterPreviewFormats"),DT.remove(r),i},IT=function(e){e.addShortcut("meta+b","","Bold"),e.addShortcut("meta+i","","Italic"),e.addShortcut("meta+u","","Underline");for(var t=1;6>=t;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"])},MT=function(e){var n=F(e),r=Ms(null);return IT(e),Yw(e),{get:n.get,has:n.has,register:n.register,unregister:n.unregister,apply:function(t,n,r){EN(e,t,n,r)},remove:function(t,n,r,o){kN(e,t,n,r,o)},toggle:function(t,n,r){_N(e,t,n,r)},match:t(Tw,e),matchAll:t(Rw,e),matchNode:t(_w,e),canApply:t(Aw,e),formatChanged:t(TT,e,r),getCssText:t(LT,e)}},FT=function(e,t,n){var r=Ms(!1),o=function(e){$S(t,!1,n),t.add({},e)};e.on("init",function(){t.add()}),e.on("BeforeExecCommand",function(e){var r=e.command.toLowerCase();"undo"!==r&&"redo"!==r&&"mcerepaint"!==r&&(WS(t,n),t.beforeChange())}),e.on("ExecCommand",function(e){var t=e.command.toLowerCase();"undo"!==t&&"redo"!==t&&"mcerepaint"!==t&&o(e)}),e.on("ObjectResizeStart cut",function(){t.beforeChange()}),e.on("SaveContent ObjectResized blur",o),e.on("dragend",o),e.on("keyup",function(n){var i=n.keyCode;n.isDefaultPrevented()||((i>=33&&36>=i||i>=37&&40>=i||45===i||n.ctrlKey)&&(o(),e.nodeChanged()),(46===i||8===i)&&e.nodeChanged(),r.get()&&t.typing&&VS(MS(e),t.data[0])===!1&&(e.isDirty()===!1&&(e.setDirty(!0),e.fire("change",{level:t.data[0],lastLevel:null})),e.fire("TypingUndo"),r.set(!1),e.nodeChanged()))}),e.on("keydown",function(e){var i=e.keyCode;if(!e.isDefaultPrevented()){if(i>=33&&36>=i||i>=37&&40>=i||45===i)return void(t.typing&&o(e));var a=e.ctrlKey&&!e.altKey||e.metaKey;!(16>i||i>20)||224===i||91===i||t.typing||a||(t.beforeChange(),$S(t,!0,n),t.add({},e),r.set(!0))}}),e.on("mousedown",function(e){t.typing&&o(e)});var i=function(e){return"insertReplacementText"===e.inputType},a=function(e){return"insertText"===e.inputType&&null===e.data},u=function(e){return"insertFromPaste"===e.inputType||"insertFromDrop"===e.inputType};e.on("input",function(e){e.inputType&&(i(e)||a(e)||u(e))&&o(e)}),e.on("AddUndo Undo Redo ClearUndos",function(t){t.isDefaultPrevented()||e.nodeChanged()})},UT=function(e){e.addShortcut("meta+z","","Undo"),e.addShortcut("meta+y,meta+shift+z","","Redo")},zT=function(e){var t=Ms(Tt.none()),n=Ms(0),r=Ms(0),o={data:[],typing:!1,beforeChange:function(){gN(e,n,t)},add:function(i,a){return pN(e,o,r,n,t,i,a)},undo:function(){return hN(e,o,n,r)},redo:function(){return vN(e,r,o.data)},clear:function(){yN(e,o,r)},reset:function(){bN(e,o)},hasUndo:function(){return CN(e,o,r)},hasRedo:function(){return wN(e,o,r)},transact:function(t){return xN(e,o,n,t)},ignore:function(t){SN(e,n,t)},extra:function(t,n){NN(e,o,r,t,n)}};return fN(e)||FT(e,o,n),UT(e),o},jT=[9,27,y_.HOME,y_.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,y_.DOWN,y_.UP,y_.LEFT,y_.RIGHT].concat(Hr.browser.isFirefox()?[224]:[]),HT="data-mce-placeholder",VT=function(e){return"keydown"===e.type||"keyup"===e.type},qT=function(e){var t=e.keyCode;return t===y_.BACKSPACE||t===y_.DELETE},$T=function(e){if(VT(e)){var t=e.keyCode;return!qT(e)&&(y_.metaKeyPressed(e)||e.altKey||t>=112&&123>=t||Wt(jT,t))}return!1},WT=function(e){return VT(e)&&!(qT(e)||"keyup"===e.type&&229===e.keyCode)},KT=function(e,t,n){if(Vv(uo.fromDom(t),!1)){var r=""===n,o=t.firstElementChild;return o?e.getStyle(t.firstElementChild,"padding-left")||e.getStyle(t.firstElementChild,"padding-right")?!1:r?!e.isBlock(o):n===o.nodeName.toLowerCase():!0}return!1},XT=function(e){var t=e.dom,n=Gd(e),r=Em(e),o=function(i,a){if(!$T(i)){var u=e.getBody(),c=WT(i)?!1:KT(t,u,n),s=""!==t.getAttrib(u,HT);(s!==c||a)&&(t.setAttrib(u,HT,c?r:null),t.setAttrib(u,"aria-placeholder",c?r:null),$N(e,c),e.on(c?"keydown":"keyup",o),e.off(c?"keyup":"keydown",o))}};r&&e.on("init",function(t){o(t,!0),e.on("change SetContent ExecCommand",o),e.on("paste",function(t){return vs.setEditorTimeout(e,function(){return o(t)})})})},YT=5,GT=400,JT=function(e){return void 0===e.touches||1!==e.touches.length?Tt.none():Tt.some(e.touches[0])},QT=function(e,t){var n=Math.abs(e.clientX-t.x()),r=Math.abs(e.clientY-t.y());return n>YT||r>YT},ZT=function(e){var t=Ms(Tt.none()),n=Ms(!1),r=Zs(function(t){e.fire("longpress",Fn(Fn({},t),{type:"longpress"})),n.set(!0)},GT);e.on("touchstart",function(e){JT(e).each(function(o){r.cancel();var i={x:yt(o.clientX),y:yt(o.clientY),target:yt(e.target)};r.throttle(e),n.set(!1),t.set(Tt.some(i))})},!0),e.on("touchmove",function(o){r.cancel(),JT(o).each(function(r){t.get().each(function(o){QT(r,o)&&(t.set(Tt.none()),n.set(!1),e.fire("longpresscancel"))})})},!0),e.on("touchend touchcancel",function(o){r.cancel(),"touchcancel"!==o.type&&t.get().filter(function(e){return e.target().isEqualNode(o.target)}).each(function(){n.get()?o.preventDefault():e.fire("tap",Fn(Fn({},o),{type:"tap"}))})},!0)},eR=function(e,t){return e.hasOwnProperty(t.nodeName)},tR=function(e,t){return Mi(t)?!0:_i(t)?!eR(e,t)&&!Fp(t):!1},nR=function(e,t,n){return Kt(Gv(uo.fromDom(n),uo.fromDom(t)),function(t){return eR(e,t.dom())})},rR=function(e,t){if(Mi(t)){if(0===t.nodeValue.length)return!0;if(/^\s+$/.test(t.nodeValue)&&(!t.nextSibling||eR(e,t.nextSibling)))return!0}return!1},oR=function(e){var t,n,r,o=e.dom,i=e.selection,a=e.schema,u=a.getBlockElements(),c=i.getStart(),s=e.getBody(),f=Gd(e);if(c&&_i(c)&&f){var l=s.nodeName.toLowerCase();if(a.isValidChild(l,f.toLowerCase())&&!nR(u,s,c)){var d=i.getRng(),m=d.startContainer,g=d.startOffset,p=d.endContainer,h=d.endOffset,v=iw(e);for(c=s.firstChild;c;)if(tR(u,c)){if(rR(u,c)){n=c,c=c.nextSibling,o.remove(n);continue}t||(t=o.create(f,Jd(e)),c.parentNode.insertBefore(t,c),r=!0),n=c,c=c.nextSibling,t.appendChild(n)}else t=null,c=c.nextSibling;r&&v&&(d.setStart(m,g),d.setEnd(p,h),i.setRng(d),e.nodeChanged())}}},iR=function(e){Gd(e)&&e.on("NodeChange",t(oR,e))},aR=function(e){return Ut(e.selection.getSel().modify)},uR=function(e,t,n){var r=e?1:-1;return t.setRng(id(n.container(),n.offset()+r).toRange()),t.getSel().modify("move",e?"forward":"backward","word"),!0},cR=function(e,t){var n=t.selection.getRng(),r=e?id.fromRangeEnd(n):id.fromRangeStart(n);return aR(t)?e&&Gf(r)?uR(!0,t.selection,r):!e&&Jf(r)?uR(!1,t.selection,r):!1:!1},sR=Mi,fR=function(e){return sR(e)&&e.data[0]===zf},lR=function(e){return sR(e)&&e.data[e.data.length-1]===zf},dR=function(e){return e.ownerDocument.createTextNode(zf)},mR=function(e){if(sR(e.previousSibling))return lR(e.previousSibling)?e.previousSibling:(e.previousSibling.appendData(zf),e.previousSibling);if(sR(e))return fR(e)?e:(e.insertData(0,zf),e);var t=dR(e);return e.parentNode.insertBefore(t,e),t},gR=function(e){if(sR(e.nextSibling))return fR(e.nextSibling)?e.nextSibling:(e.nextSibling.insertData(0,zf),e.nextSibling);if(sR(e))return lR(e)?e:(e.appendData(zf),e);var t=dR(e);return e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t),t},pR=function(e,t){return e?mR(t):gR(t)},hR=t(pR,!0),vR=t(pR,!1),yR=function(e,t){return Mi(e.container())?pR(t,e.container()):pR(t,e.getNode())},bR=function(e,t){var n=t.get();return n&&e.container()===n&&Wf(n)},CR=function(e,t){return t.fold(function(t){ug(e.get());var n=hR(t);return e.set(n),Tt.some(id(n,n.length-1))},function(t){return mp(t).map(function(t){if(bR(t,e))return id(e.get(),1);ug(e.get());var n=yR(t,!0);return e.set(n),id(n,1)})},function(t){return gp(t).map(function(t){if(bR(t,e))return id(e.get(),e.get().length-1);ug(e.get());var n=yR(t,!1);return e.set(n),id(n,n.length-1)})},function(t){ug(e.get());var n=vR(t);return e.set(n),Tt.some(id(n,1))})},wR=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,xR=function(e){return wR.test(e)},SR=function(e,t){return ko(uo.fromDom(t),xm(e))},NR=function(e){return"rtl"===Ts.DOM.getStyle(e,"direction",!0)||xR(e.textContent)},ER=function(e,t,n){return Qt(Ts.DOM.getParents(n.container(),"*",t),e)},kR=function(e,t,n){var r=ER(e,t,n);return Tt.from(r[r.length-1])},_R=function(e,t,n){var r=kg(t,e),o=kg(n,e);return r&&r===o},TR=function(e){return Gf(e)||Jf(e)},RR=function(e,t){if(!t)return t;var n=t.container(),r=t.offset();return e?Wf(n)?Mi(n.nextSibling)?id(n.nextSibling,0):id.after(n):Gf(t)?id(n,r+1):t:Wf(n)?Mi(n.previousSibling)?id(n.previousSibling,n.previousSibling.data.length):id.before(n):Jf(t)?id(n,r-1):t},AR=t(RR,!0),DR=t(RR,!1),OR=function(e,t){for(var n=0;n<e.length;n++){var r=e[n].apply(null,t);if(r.isSome())return r}return Tt.none()},BR=us.generate([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),PR=function(e,t){var n=kg(t,e);return n?n:e},LR=function(e,n,r){var o=AR(r),i=PR(n,o.container());return kR(e,i,o).fold(function(){return lp(i,o).bind(t(kR,e,i)).map(function(e){return BR.before(e)})},Tt.none)},IR=function(e,t){return null===vp(e,t)},MR=function(e,n,r){return kR(e,n,r).filter(t(IR,n))},FR=function(e,t,n){var r=DR(n);return MR(e,t,r).bind(function(e){var t=dp(e,r);return t.isNone()?Tt.some(BR.start(e)):Tt.none()})},UR=function(e,t,n){var r=AR(n);return MR(e,t,r).bind(function(e){var t=lp(e,r);return t.isNone()?Tt.some(BR.end(e)):Tt.none()})},zR=function(e,n,r){var o=DR(r),i=PR(n,o.container());return kR(e,i,o).fold(function(){return dp(i,o).bind(t(kR,e,i)).map(function(e){return BR.after(e)})},Tt.none)},jR=function(e){return NR(VR(e))===!1},HR=function(e,t,n){var r=OR([LR,FR,UR,zR],[e,t,n]);return r.filter(jR)},VR=function(e){return e.fold(bt,bt,bt,bt)},qR=function(e){return e.fold(yt("before"),yt("start"),yt("end"),yt("after"))},$R=function(e){return e.fold(BR.before,BR.before,BR.after,BR.after)},WR=function(e){return e.fold(BR.start,BR.start,BR.end,BR.end)},KR=function(e,t){return qR(e)===qR(t)&&VR(e)===VR(t)},XR=function(e,t,n,r,o,i){return al(kR(t,n,r),kR(t,n,o),function(t,r){return t!==r&&_R(n,t,r)?BR.after(e?t:r):i}).getOr(i)},YR=function(e,t){return e.fold(yt(!0),function(e){return!KR(e,t)})},GR=function(e,n,r,o,i){var a=RR(e,i),u=up(e,r,a).map(t(RR,e)),c=u.fold(function(){return o.map($R)},function(i){return HR(n,r,i).map(t(XR,e,n,r,a,i)).filter(t(YR,o))});return c.filter(jR)},JR=function(e,t){return e?t.fold(ht(Tt.some,BR.start),Tt.none,ht(Tt.some,BR.after),Tt.none):t.fold(Tt.none,ht(Tt.some,BR.before),Tt.none,ht(Tt.some,BR.end))
},QR=function(e,n,r,o){var i=RR(e,o),a=HR(n,r,i);return HR(n,r,i).bind(t(JR,e)).orThunk(function(){return GR(e,n,r,a,o)})},ZR=(t(QR,!1),t(QR,!0),function(e,t){var n=e.dom.createRng();n.setStart(t.container(),t.offset()),n.setEnd(t.container(),t.offset()),e.selection.setRng(n)}),eA=function(e,t){e?t.setAttribute("data-mce-selected","inline-boundary"):t.removeAttribute("data-mce-selected")},tA=function(e,t,n){return CR(t,n).map(function(t){return ZR(e,t),n})},nA=function(e,n,r){var o=e.getBody(),i=id.fromRangeStart(e.selection.getRng()),a=t(SR,e),u=QR(r,a,o,i);return u.bind(function(t){return tA(e,n,t)})},rA=function(e,n,r){var o=Xt(mf(uo.fromDom(n.getRoot()),'*[data-mce-selected="inline-boundary"]'),function(e){return e.dom()}),i=Qt(o,e),a=Qt(r,e);Yt(sn(i,a),t(eA,!1)),Yt(sn(a,i),t(eA,!0))},oA=function(e,t){if(e.selection.isCollapsed()&&e.composing!==!0&&t.get()){var n=id.fromRangeStart(e.selection.getRng());id.isTextPosition(n)&&TR(n)===!1&&(ZR(e,ag(t.get(),n)),t.set(null))}},iA=function(e,t,n,r){if(t.selection.isCollapsed()){var o=Qt(r,e);Yt(o,function(){var r=id.fromRangeStart(t.selection.getRng());HR(e,t.getBody(),r).bind(function(e){return tA(t,n,e)})})}},aA=function(e,t,n){return function(){return Am(e)?nA(e,t,n).isSome():!1}},uA=function(e,t){return function(){return Am(t)?cR(e,t):!1}},cA=function(e){var n=Ms(null),r=t(SR,e);return e.on("NodeChange",function(t){!Am(e)||Hr.browser.isIE()&&t.initial||(rA(r,e.dom,t.parents),oA(e,n),iA(r,e,n,t.parents))}),n},sA=t(uA,!0),fA=t(uA,!1);!function(e){e[e.Br=0]="Br",e[e.Block=1]="Block",e[e.Wrap=2]="Wrap",e[e.Eol=3]="Eol"}(p_||(p_={}));var lA,dA=function(e,t){return e===od.Backwards?cn(t):t},mA=function(e,t,n){return e===od.Forwards?t.next(n):t.prev(n)},gA=function(e,t,n,r){return ji(r.getNode(t===od.Forwards))?p_.Br:_g(n,r)===!1?p_.Block:p_.Wrap},pA=function(e,t,n,r){for(var o,i=Zg(n),a=r,u=[];a&&(o=mA(t,i,a));){if(ji(o.getNode(!1)))return t===od.Forwards?{positions:dA(t,u).concat([o]),breakType:p_.Br,breakAt:Tt.some(o)}:{positions:dA(t,u),breakType:p_.Br,breakAt:Tt.some(o)};if(o.isVisible()){if(e(a,o)){var c=gA(n,t,a,o);return{positions:dA(t,u),breakType:c,breakAt:Tt.some(o)}}u.push(o),a=o}else a=o}return{positions:dA(t,u),breakType:p_.Eol,breakAt:Tt.none()}},hA=function(e,t,n,r){return t(n,r).breakAt.map(function(r){var o=t(n,r).positions;return e===od.Backwards?o.concat(r):[r].concat(o)}).getOr([])},vA=function(e,t){return en(e,function(e,n){return e.fold(function(){return Tt.some(n)},function(r){return al(dn(r.getClientRects()),dn(n.getClientRects()),function(e,o){var i=Math.abs(t-e.left),a=Math.abs(t-o.left);return i>=a?n:r}).or(e)})},Tt.none())},yA=function(e,t){return dn(t.getClientRects()).bind(function(t){return vA(e,t.left)})},bA=t(pA,k.isAbove,-1),CA=t(pA,k.isBelow,1),wA=function(e,t){return bA(e,t).breakAt.isNone()},xA=function(e,t){return CA(e,t).breakAt.isNone()},SA=t(hA,-1,bA),NA=t(hA,1,CA),EA=function(e){return mp(e).map(function(t){return[t].concat(CA(e,t).positions)}).getOr([])},kA=function(e){return gp(e).map(function(t){return bA(e,t).positions.concat(t)}).getOr([])},_A=function(e){var t=function(t){return Xt(t,function(t){return t=fl(t),t.node=e,t})};if(_i(e))return t(e.getClientRects());if(Mi(e)){var n=e.ownerDocument.createRange();return n.setStart(e,0),n.setEnd(e,e.data.length),t(n.getClientRects())}},TA=function(e){return an(e,_A)};!function(e){e[e.Up=-1]="Up",e[e.Down=1]="Down"}(lA||(lA={}));var RA,AA,DA=function(e,t,n,r){for(;r=Eg(r,e,Ml,t);)if(n(r))return},OA=function(e,t,n,r,o,i){var a=0,u=[],c=function(r){var i,c,f;for(f=TA([r]),-1===e&&(f=f.reverse()),i=0;i<f.length;i++)if(c=f[i],!n(c,s)){if(u.length>0&&t(c,Mn(u))&&a++,c.line=a,o(c))return!0;u.push(c)}},s=Mn(i.getClientRects());if(!s)return u;var f=i.getNode();return c(f),DA(e,r,c,f),u},BA=function(e,t){return t.line>e},PA=function(e,t){return t.line===e},LA=t(OA,lA.Up,gl,pl),IA=t(OA,lA.Down,pl,gl),MA=function(e,t,n,r){var o,i,a,u,c,s=Zg(t),f=[],l=0,d=function(t){return Mn(1===e?t.getClientRects():t.getClientRects())};1===e?(o=s.next,i=pl,a=gl,u=id.after(r)):(o=s.prev,i=gl,a=pl,u=id.before(r));var m=d(u);do if(u.isVisible()&&(c=d(u),!a(c,m))){if(f.length>0&&i(c,Mn(f))&&l++,c=fl(c),c.position=u,c.line=l,n(c))return f;f.push(c)}while(u=o(u));return f},FA=function(e){return function(t){return BA(e,t)}},UA=function(e){return function(t){return PA(e,t)}},zA=Vi,jA=Eg,HA=function(e,t){return Math.abs(e.left-t)},VA=function(e,t){return Math.abs(e.right-t)},qA=function(e,t){return e>=t.left&&e<=t.right},$A=function(e,t){return e>=t.top&&e<=t.bottom},WA=function(e,t){return Ln(e,function(e,n){var r=Math.min(HA(e,t),VA(e,t)),o=Math.min(HA(n,t),VA(n,t));return qA(t,n)?n:qA(t,e)?e:o===r&&zA(n.node)?n:r>o?n:e})},KA=function(e,t,n,r,o){var i=jA(r,e,Ml,t,!o);do if(!i||n(i))return;while(i=jA(i,e,Ml,t))},XA=function(e,n,r){void 0===r&&(r=!0);var o=[],i=function(e,t){var r=Qt(TA([t]),function(t){return!e(t,n)});return o=o.concat(r),0===r.length};return o.push(n),KA(lA.Up,e,t(i,gl),n.node,r),KA(lA.Down,e,t(i,pl),n.node,r),o},YA=function(e){return Qt(gn(e.getElementsByTagName("*")),pg)},GA=function(e,t){return{node:e.node,before:HA(e,t)<VA(e,t)}},JA=function(e,n,r){var o=TA(YA(e)),i=Qt(o,t($A,r)),a=WA(i,n);if(a){var u=!Pi(a.node);if(a=WA(XA(e,a,u),n),a&&pg(a.node))return GA(a,n)}return null},QA=Hi,ZA=Vi,eD=function(e,t,n,r,o){return t._selectionOverrides.showCaret(e,n,r,o)},tD=function(e){var t=e.ownerDocument.createRange();return t.selectNode(e),t},nD=function(e,t){var n=e.fire("BeforeObjectSelected",{target:t});return n.isDefaultPrevented()?null:tD(t)},rD=function(e,t,n){var r=Pg(1,e.getBody(),t),o=id.fromRangeStart(r),i=o.getNode();if(ZA(i))return eD(1,e,i,!o.isAtEnd(),!1);var a=o.getNode(!0);if(ZA(a))return eD(1,e,a,!1,!1);var u=e.dom.getParent(o.getNode(),function(e){return ZA(e)||QA(e)});return ZA(u)?eD(1,e,u,!1,n):null},oD=function(e,t,n){if(!t||!t.collapsed)return t;var r=rD(e,t,n);return r?r:t},iD=Vi,aD=vl,uD=function(e,t,n,r){var o=e===od.Forwards,i=o?Ov:Bv;if(!r.collapsed){var a=aD(r);if(iD(a))return eD(e,t,a,e===od.Backwards,!0)}var u=ol(r),c=Ig(e,t.getBody(),r);if(i(c))return nD(t,c.getNode(!o));var s=RR(o,n(c));if(!s)return u?r:null;if(i(s))return eD(e,t,s.getNode(!o),o,!0);var f=n(s);return f&&i(f)&&zg(s,f)?eD(e,t,f.getNode(!o),o,!0):u?oD(t,s.toRange(),!0):null},cD=function(e,t,n,r){var o,i,a,u;u=aD(r);var c=Ig(e,t.getBody(),r),s=n(t.getBody(),FA(1),c),f=Qt(s,UA(1)),l=Mn(c.getClientRects());if((Ov(c)||Av(c))&&(u=c.getNode()),(Bv(c)||Dv(c))&&(u=c.getNode(!0)),!l)return null;var d=l.left;if(o=WA(f,d),o&&iD(o.node))return i=Math.abs(d-o.left),a=Math.abs(d-o.right),eD(e,t,o.node,a>i,!0);if(u){var m=MA(e,t.getBody(),FA(1),u);if(o=WA(Qt(m,UA(1)),d))return oD(t,o.position.toRange(),!0);if(o=Mn(Qt(m,UA(0))))return oD(t,o.position.toRange(),!0)}},sD=function(e){var t=e.dom.create(Gd(e));return(!Hr.ie||Hr.ie>=11)&&(t.innerHTML='<br data-mce-bogus="1">'),t},fD=function(e,n,r){var o,i,a,u=Zg(e.getBody()),c=t(Ug,u.next),s=t(Ug,u.prev);if(r.collapsed&&jm(e)){if(o=e.dom.getParent(r.startContainer,"PRE"),!o)return;i=1===n?c(id.fromRangeStart(r)):s(id.fromRangeStart(r)),i||(a=sD(e),1===n?e.$(o).after(a):e.$(o).before(a),e.selection.select(a,!0),e.selection.collapse())}},lD=function(e,n){var r,o=Zg(e.getBody()),i=t(Ug,o.next),a=t(Ug,o.prev),u=n?od.Forwards:od.Backwards,c=n?i:a,s=e.selection.getRng();return(r=uD(u,e,c,s))?r:(r=fD(e,u,s),r?r:null)},dD=function(e,t){var n,r=t?1:-1,o=t?IA:LA,i=e.selection.getRng();return(n=cD(r,e,o,i))?n:(n=fD(e,r,i),n?n:null)},mD=function(e,t){return function(){var n=lD(e,t);return n?(e.selection.setRng(n),!0):!1}},gD=function(e,t){return function(){var n=dD(e,t);return n?(e.selection.setRng(n),!0):!1}},pD=function(e){return function(t){return e?Bv(t):Ov(t)}},hD=function(e,t){return function(){var n=t?id.fromRangeEnd(e.selection.getRng()):id.fromRangeStart(e.selection.getRng()),r=t?CA(e.getBody(),n):bA(e.getBody(),n),o=t?mn(r.positions):dn(r.positions);return o.filter(pD(t)).fold(yt(!1),function(t){return e.selection.setRng(t.toRange()),!0})}},vD=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}},yD=function(e,t){return an(t,function(t){var n=vD(fl(t.getBoundingClientRect()),-1);return[{x:n.left,y:e(n),cell:t},{x:n.right,y:e(n),cell:t}]})},bD=function(e,t,n){return en(e,function(e,r){return e.fold(function(){return Tt.some(r)},function(e){var o=Math.sqrt(Math.abs(e.x-t)+Math.abs(e.y-n)),i=Math.sqrt(Math.abs(r.x-t)+Math.abs(r.y-n));return Tt.some(o>i?r:e)})},Tt.none())},CD=function(e,t,n,r,o){var i=mf(uo.fromDom(n),"td,th,caption").map(function(e){return e.dom()}),a=Qt(yD(e,i),function(e){return t(e,o)});return bD(a,r,o).map(function(e){return e.cell})},wD=function(e){return e.bottom},xD=function(e){return e.top},SD=function(e,t){return e.y<t},ND=function(e,t){return e.y>t},ED=t(CD,wD,SD),kD=t(CD,xD,ND),_D=function(e,t){return dn(t.getClientRects()).bind(function(t){return ED(e,t.left,t.top)}).bind(function(e){return yA(kA(e),t)})},TD=function(e,t){return mn(t.getClientRects()).bind(function(t){return kD(e,t.left,t.top)}).bind(function(e){return yA(EA(e),t)})},RD=function(e,t){e.selection.setRng(t),Ik(e,t)},AD=function(e,t,n){return n.breakAt.map(function(n){return e(t,n).breakAt.isSome()}).getOr(!1)},DD=function(e){return e.breakType===p_.Wrap&&0===e.positions.length},OD=function(e){return e.breakType===p_.Br&&1===e.positions.length},BD=function(e,t,n){var r=e(t,n);return DD(r)||!ji(n.getNode())&&OD(r)?!AD(e,t,r):r.breakAt.isNone()},PD=t(BD,bA),LD=t(BD,CA),ID=function(e,t,n){var r=id.fromRangeStart(t);return fp(!e,n).map(function(e){return e.isEqual(r)}).getOr(!1)},MD=function(e,t,n){var r=e.selection.getRng(),o=t?1:-1;if(gg()&&ID(t,r,n)){var i=eD(o,e,n,!t,!0);return RD(e,i),!0}return!1},FD=function(e,t,n){return _D(t,n).orThunk(function(){return dn(n.getClientRects()).bind(function(n){return vA(SA(e,id.before(t)),n.left)})}).getOr(id.before(t))},UD=function(e,t,n){return TD(t,n).orThunk(function(){return dn(n.getClientRects()).bind(function(n){return vA(NA(e,id.after(t)),n.left)})}).getOr(id.after(t))},zD=function(e,t){var n=t.getNode(e);return _i(n)&&"TABLE"===n.nodeName?Tt.some(n):Tt.none()},jD=function(e,t,n,r){var o=Gd(t);o?t.undoManager.transact(function(){var r=uo.fromTag(o);Ki(r,Jd(t)),ii(r,uo.fromTag("br")),e?ri(uo.fromDom(n),r):ni(uo.fromDom(n),r);var i=t.dom.createRng();i.setStart(r.dom(),0),i.setEnd(r.dom(),0),RD(t,i)}):RD(t,r.toRange())},HD=function(e,t,n){var r=t?zD(!0,n):zD(!1,n),o=t===!1;r.fold(function(){return RD(e,n.toRange())},function(r){return fp(o,e.getBody()).filter(function(e){return e.isEqual(n)}).fold(function(){return RD(e,n.toRange())},function(){return jD(t,e,r,n)})})},VD=function(e,t,n,r){var o=e.selection.getRng(),i=id.fromRangeStart(o),a=e.getBody();if(!t&&PD(r,i)){var u=FD(a,n,i);return HD(e,t,u),!0}if(t&&LD(r,i)){var u=UD(a,n,i);return HD(e,t,u),!0}return!1},qD=function(e,t){return function(){return Tt.from(e.dom.getParent(e.selection.getNode(),"td,th")).bind(function(n){return Tt.from(e.dom.getParent(n,"table")).map(function(n){return MD(e,t,n)})}).getOr(!1)}},$D=function(e,t){return function(){return Tt.from(e.dom.getParent(e.selection.getNode(),"td,th")).bind(function(n){return Tt.from(e.dom.getParent(n,"table")).map(function(r){return VD(e,t,r,n)})}).getOr(!1)}},WD=function(e){return Wt(["figcaption"],go(e))},KD=function(t){var n=e.document.createRange();return n.setStartBefore(t.dom()),n.setEndBefore(t.dom()),n},XD=function(e,t,n){n?ii(e,t):oi(e,t)},YD=function(e,t){var n=uo.fromTag("br");return XD(e,n,t),KD(n)},GD=function(e,t,n,r){var o=uo.fromTag(n),i=uo.fromTag("br");return Ki(o,r),ii(o,i),XD(e,o,t),KD(i)},JD=function(e,t,n,r){return""===t?YD(e,r):GD(e,r,t,n)},QD=function(e,n){var r=t(Ao,n);return pf(uo.fromDom(e.container()),Ca,r).filter(WD)},ZD=function(e,t,n){return t?xA(e.dom(),n):wA(e.dom(),n)},eO=function(e,t){var n=uo.fromDom(e.getBody()),r=id.fromRangeStart(e.selection.getRng()),o=Gd(e),i=Jd(e);return QD(r,n).exists(function(){if(ZD(n,t,r)){var a=JD(n,o,i,t);return e.selection.setRng(a),!0}return!1})},tO=function(e,t){return function(){return e.selection.isCollapsed()?eO(e,t):!1}},nO=function(e){return Xt(e,function(e){return Fn({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:pt},e)})},rO=function(e,t){return t.keyCode===e.keyCode&&t.shiftKey===e.shiftKey&&t.altKey===e.altKey&&t.ctrlKey===e.ctrlKey&&t.metaKey===e.metaKey},oO=function(e,t){return an(nO(e),function(e){return rO(e,t)?[e]:[]})},iO=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(null,t)}},aO=function(e,t){return nn(oO(e,t),function(e){return e.action()})},uO=function(e,t,n){var r=Br().os;aO([{keyCode:y_.RIGHT,action:mD(e,!0)},{keyCode:y_.LEFT,action:mD(e,!1)},{keyCode:y_.UP,action:gD(e,!1)},{keyCode:y_.DOWN,action:gD(e,!0)},{keyCode:y_.RIGHT,action:qD(e,!0)},{keyCode:y_.LEFT,action:qD(e,!1)},{keyCode:y_.UP,action:$D(e,!1)},{keyCode:y_.DOWN,action:$D(e,!0)},{keyCode:y_.RIGHT,action:aA(e,t,!0)},{keyCode:y_.LEFT,action:aA(e,t,!1)},{keyCode:y_.RIGHT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:sA(e,t)},{keyCode:y_.LEFT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:fA(e,t)},{keyCode:y_.UP,action:tO(e,!1)},{keyCode:y_.DOWN,action:tO(e,!0)}],n).each(function(){n.preventDefault()})},cO=function(e,t){e.on("keydown",function(n){n.isDefaultPrevented()===!1&&uO(e,t,n)})},sO=function(e){return function(t){return Ao(e,uo.fromDom(t.dom().parentNode))}},fO=function(e,t){return Bo(e,t)?pf(t,function(e){return Na(e)||ka(e)},sO(e)):Tt.none()},lO=function(e){var t=e.getBody(),n=t.firstChild&&e.dom.isBlock(t.firstChild)?t.firstChild:t;e.selection.setCursorLocation(n,0)},dO=function(e){e.dom.isEmpty(e.getBody())&&(e.setContent(""),lO(e))},mO=function(e,t,n){return al(mp(n),gp(n),function(r,o){var i=RR(!0,r),a=RR(!1,o),u=RR(!1,t);return e?lp(n,u).map(function(e){return e.isEqual(a)&&t.isEqual(i)}).getOr(!1):dp(n,u).map(function(e){return e.isEqual(i)&&t.isEqual(a)}).getOr(!1)}).getOr(!0)},gO=function(e,t){return{block:e,position:t}},pO=function(e,t){return{from:e,to:t}},hO=function(e,t){var n=uo.fromDom(e),r=uo.fromDom(t.container());return fO(n,r).map(function(e){return gO(e,t)})},vO=function(e){return Ao(e.from.block,e.to.block)===!1},yO=function(e){return Fo(e.from.block).bind(function(t){return Fo(e.to.block).filter(function(e){return Ao(t,e)})}).isSome()},bO=function(e){return Vi(e.from.block.dom())===!1&&Vi(e.to.block.dom())===!1},CO=function(e,t,n){return ji(n.position.getNode())&&Vv(n.block)===!1?fp(!1,n.block.dom()).bind(function(r){return r.isEqual(n.position)?up(t,e,r).bind(function(t){return hO(e,t)}):Tt.some(n)}).getOr(n):n},wO=function(e,t,n){var r=hO(e,id.fromRangeStart(n)),o=r.bind(function(n){return up(t,e,n.position).bind(function(n){return hO(e,n).map(function(n){return CO(e,t,n)})})});return al(r,o,pO).filter(function(e){return vO(e)&&yO(e)&&bO(e)})},xO=function(e,t,n){return n.collapsed?wO(e,t,n):Tt.none()},SO=function(e){var t=$o(e);return rn(t,Ca).fold(function(){return t},function(e){return t.slice(0,e)})},NO=function(e){var t=SO(e);return Yt(t,fi),t},EO=function(e,t){var n=Jv(t,e);return nn(n.reverse(),function(e){return Vv(e)}).each(fi)},kO=function(e){return 0===Qt(Vo(e),function(e){return!Vv(e)}).length},_O=function(e,t,n,r){if(Vv(n))return Wv(n),mp(n.dom());kO(r)&&Vv(t)&&ni(r,uo.fromTag("br"));var o=dp(n.dom(),id.before(r.dom()));return Yt(NO(t),function(e){ni(r,e)}),EO(e,t),o},TO=function(e,t,n){if(Vv(n))return fi(n),Vv(t)&&Wv(t),mp(t.dom());var r=gp(n.dom());return Yt(NO(t),function(e){ii(n,e)}),EO(e,t),r},RO=function(e,t){var n=Jv(t,e);return Tt.from(n[n.length-1])},AO=function(e,t){return Bo(t,e)?RO(t,e):Tt.none()},DO=function(e,t){fp(e,t.dom()).map(function(e){return e.getNode()}).map(uo.fromDom).filter(Sa).each(fi)},OO=function(e,n,r){return DO(!0,n),DO(!1,r),AO(n,r).fold(t(TO,e,n,r),t(_O,e,n,r))},BO=function(e,t,n,r){return t?OO(e,r,n):OO(e,n,r)},PO=function(e,t){var n=uo.fromDom(e.getBody()),r=xO(n.dom(),t,e.selection.getRng()).bind(function(e){return BO(n,t,e.from.block,e.to.block)});return r.each(function(t){e.selection.setRng(t.toRange())}),r.isSome()},LO=function(e,t){var n=t.getRng();return al(fO(e,uo.fromDom(n.startContainer)),fO(e,uo.fromDom(n.endContainer)),function(r,o){return Ao(r,o)===!1?(n.deleteContents(),BO(e,!0,r,o).each(function(e){t.setRng(e.toRange())}),!0):!1}).getOr(!1)},IO=function(e,n){var r=uo.fromDom(n),o=t(Ao,e);return gf(r,Ra,o).isSome()},MO=function(e,t){return IO(e,t.startContainer)||IO(e,t.endContainer)},FO=function(e,t){var n=dp(e.dom(),id.fromRangeStart(t)).isNone(),r=lp(e.dom(),id.fromRangeEnd(t)).isNone();return!MO(e,t)&&n&&r},UO=function(e){return e.setContent(""),e.selection.setCursorLocation(),!0},zO=function(e){var t=uo.fromDom(e.getBody()),n=e.selection.getRng();return FO(t,n)?UO(e):LO(t,e.selection)},jO=function(e){return e.selection.isCollapsed()?!1:zO(e)},HO=function(e){return Mg(e).exists(Sa)},VO=function(e,t,n){var r=Qt(Jv(uo.fromDom(n.container()),t),Ca),o=dn(r).getOr(t);return up(e,o.dom(),n).filter(HO)},qO=function(e,t){return Mg(t).exists(Sa)||VO(!0,e,t).isSome()},$O=function(e,t){return Fg(t).exists(Sa)||VO(!1,e,t).isSome()},WO=t(VO,!1),KO=t(VO,!0),XO=function(e){return Ra(uo.fromDom(e))||ka(uo.fromDom(e))},YO=us.generate([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),GO=function(e,t){var n=t.getNode(e===!1),r=e?"after":"before";return _i(n)&&n.getAttribute("data-mce-caret")===r},JO=function(e,t,n,r){var o=function(t){return xa(uo.fromDom(t))&&!_g(n,r,e)};return Lg(!t,n).fold(function(){return Lg(t,r).fold(yt(!1),o)},o)},QO=function(e,t,n,r){var o=r.getNode(t===!1);return fO(uo.fromDom(e),uo.fromDom(n.getNode())).map(function(e){return Vv(e)?YO.remove(e.dom()):YO.moveToElement(o)}).orThunk(function(){return Tt.some(YO.moveToElement(o))})},ZO=function(e,t,n){return up(t,e,n).bind(function(r){return XO(r.getNode())?Tt.none():JO(e,t,n,r)?Tt.none():t&&Vi(r.getNode())?QO(e,t,n,r):t===!1&&Vi(r.getNode(!0))?QO(e,t,n,r):t&&Bv(n)?Tt.some(YO.moveToPosition(r)):t===!1&&Ov(n)?Tt.some(YO.moveToPosition(r)):Tt.none()})},eB=function(e,t){return e&&Vi(t.nextSibling)?Tt.some(YO.moveToElement(t.nextSibling)):e===!1&&Vi(t.previousSibling)?Tt.some(YO.moveToElement(t.previousSibling)):Tt.none()},tB=function(e,t,n){return n.fold(function(e){return Tt.some(YO.remove(e))},function(e){return Tt.some(YO.moveToElement(e))},function(n){return _g(t,n,e)?Tt.none():Tt.some(YO.moveToPosition(n))})},nB=function(e,t,n){return GO(t,n)?eB(t,n.getNode(t===!1)).fold(function(){return ZO(e,t,n)},Tt.some):ZO(e,t,n).bind(function(t){return tB(e,n,t)})},rB=function(e,t,n){var r=Pg(t?1:-1,e,n),o=id.fromRangeStart(r),i=uo.fromDom(e);return t===!1&&Bv(o)?Tt.some(YO.remove(o.getNode(!0))):t&&Ov(o)?Tt.some(YO.remove(o.getNode())):t===!1&&Ov(o)&&$O(i,o)?WO(i,o).map(function(e){return YO.remove(e.getNode())}):t&&Bv(o)&&qO(i,o)?KO(i,o).map(function(e){return YO.remove(e.getNode())}):nB(e,t,o)},oB=function(e,t){return function(n){return e._selectionOverrides.hideFakeCaret(),wy(e,t,uo.fromDom(n)),!0}},iB=function(e,t){return function(n){var r=t?id.before(n):id.after(n);return e.selection.setRng(r.toRange()),!0}},aB=function(e){return function(t){return e.selection.setRng(t.toRange()),!0}},uB=function(e,t){return Tt.from(lB(e.getBody(),t))},cB=function(e,t){var n=e.selection.getNode();return uB(e,n).filter(Vi).fold(function(){var n=rB(e.getBody(),t,e.selection.getRng()).map(function(n){return n.fold(oB(e,t),iB(e,t),aB(e))});return n.getOr(!1)},function(){return!0})},sB=function(e){Yt(mf(e,".mce-offscreen-selection"),fi)},fB=function(e,t){var n=e.selection.getNode();if(Vi(n)){var r=uB(e,n.parentNode).filter(Vi);return r.fold(function(){return sB(uo.fromDom(e.getBody())),wy(e,t,uo.fromDom(e.selection.getNode())),dO(e),!0},function(){return!0})}return!1},lB=function(e,t){for(;t&&t!==e;){if(Hi(t)||Vi(t))return t;t=t.parentNode}return null},dB=function(e){var t,n=lB(e.getBody(),e.selection.getNode());return Hi(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(id.before(t).toRange())),!0},mB=function(e,t){return e.selection.isCollapsed()?cB(e,t):fB(e,t)},gB=function(e,t){Mi(t)&&0===t.data.length&&e.remove(t)},pB=function(e,t,n,r,o,i){var a=eD(r,e,i.getNode(!o),o,!0);if(t.collapsed){var u=t.cloneRange();o?u.setEnd(a.startContainer,a.startOffset):u.setStart(a.endContainer,a.endOffset),u.deleteContents()}else t.deleteContents();return e.selection.setRng(a),gB(e.dom,n),!0},hB=function(e,n){var r=e.selection.getRng();if(!Mi(r.commonAncestorContainer))return!1;var o=n?od.Forwards:od.Backwards,i=Zg(e.getBody()),a=t(Ug,i.next),u=t(Ug,i.prev),c=n?a:u,s=n?Ov:Bv,f=Ig(o,e.getBody(),r),l=RR(n,c(f));if(!l||!zg(f,l))return!1;if(s(l))return pB(e,r,f.getNode(),o,n,l);var d=c(l);return d&&s(d)&&zg(l,d)?pB(e,r,f.getNode(),o,n,d):!1},vB=function(e,t){return hB(e,t)},yB=function(t,n){var r=e.document.createRange();return r.setStart(t.container(),t.offset()),r.setEnd(n.container(),n.offset()),r},bB=function(e){return al(mp(e),gp(e),function(t,n){var r=RR(!0,t),o=RR(!1,n);return lp(e,r).map(function(e){return e.isEqual(o)}).getOr(!0)}).getOr(!0)},CB=function(e,t){return function(n){return CR(t,n).map(function(t){return ZR(e,t),!0}).getOr(!1)}},wB=function(e,n,r,o){var i=e.getBody(),a=t(SR,e);e.undoManager.ignore(function(){e.selection.setRng(yB(r,o)),e.execCommand("Delete"),HR(a,i,id.fromRangeStart(e.selection.getRng())).map(WR).map(CB(e,n))}),e.nodeChanged()},xB=function(e,t){var n=kg(t,e);return n?n:e},SB=function(e,n,r,o){var i=xB(e.getBody(),o.container()),a=t(SR,e),u=HR(a,i,o);return u.bind(function(e){return r?e.fold(yt(Tt.some(WR(e))),Tt.none,yt(Tt.some($R(e))),Tt.none):e.fold(Tt.none,yt(Tt.some($R(e))),Tt.none,yt(Tt.some(WR(e))))}).map(CB(e,n)).getOrThunk(function(){var t=cp(r,i,o),c=t.bind(function(e){return HR(a,i,e)});return u.isSome()&&c.isSome()?kR(a,i,o).map(function(t){return bB(t)?(wy(e,r,uo.fromDom(t)),!0):!1}).getOr(!1):c.bind(function(){return t.map(function(t){return r?wB(e,n,o,t):wB(e,n,t,o),!0})}).getOr(!1)})},NB=function(e,t,n){if(e.selection.isCollapsed()&&Am(e)){var r=id.fromRangeStart(e.selection.getRng());return SB(e,t,n,r)}return!1},EB=function(e,t){var n=Jv(t,e);return rn(n,Ca).fold(yt(n),function(e){return n.slice(0,e)})},kB=function(e){return 1===$o(e).length},_B=function(e,n,r,o){var i=t(Jw,n),a=Xt(Qt(o,i),function(e){return e.dom()});if(0===a.length)wy(n,e,r);else{var u=Gw(r.dom(),a);n.selection.setRng(u.toRange())}},TB=function(e,t){var n=uo.fromDom(e.getBody()),r=uo.fromDom(e.selection.getStart()),o=Qt(EB(n,r),kB);return mn(o).map(function(n){var r=id.fromRangeStart(e.selection.getRng());return mO(t,r,n.dom())&&!Qw(n)?(_B(t,e,n,o),!0):!1}).getOr(!1)},RB=function(e,t){return e.selection.isCollapsed()?TB(e,t):!1},AB=function(e,t){var n=id.fromRangeStart(e.selection.getRng());return up(t,e.getBody(),n).filter(function(e){return t?Tv(e):Rv(e)}).bind(function(e){return Tt.from(Tg(t?0:-1,e))}).map(function(t){return e.selection.select(t),!0}).getOr(!1)},DB=function(e,t){return e.selection.isCollapsed()?AB(e,t):!1},OB=function(e){return pf(e,function(e){return Hi(e.dom())||Vi(e.dom())}).exists(function(e){return Hi(e.dom())})},BB=function(e){var t=parseInt(e,10);return isNaN(t)?0:t},PB=function(e,t){var n=e||wa(t)?"margin":"padding",r="rtl"===Zi(t,"direction")?"-right":"-left";return n+r},LB=function(e,t,n,r,o,i){var a=PB(n,uo.fromDom(i));if("outdent"===t){var u=Math.max(0,BB(i.style[a])-r);e.setStyle(i,a,u?u+o:"")}else{var u=BB(i.style[a])+r+o;e.setStyle(i,a,u)}},IB=function(e,t){return un(t,function(t){var n=PB(ym(e),t),r=ta(t,n).map(BB).getOr(0),o=e.dom.getContentEditable(t.dom());return"false"!==o&&r>0})},MB=function(e){var t=zB(e);return!e.mode.isReadOnly()&&(t.length>1||IB(e,t))},FB=function(e){return Ea(e)||ka(e)},UB=function(e){return Fo(e).map(FB).getOr(!1)},zB=function(e){return Qt(Xt(e.selection.getSelectedBlocks(),uo.fromDom),function(e){return!FB(e)&&!UB(e)&&OB(e)})},jB=function(e,t){var n=e.dom,r=e.selection,o=e.formatter,i=bm(e),a=/[a-z%]+$/i.exec(i)[0],u=parseInt(i,10),c=ym(e),s=Gd(e);e.queryCommandState("InsertUnorderedList")||e.queryCommandState("InsertOrderedList")||""!==s||n.getParent(r.getNode(),n.isBlock)||o.apply("div"),Yt(zB(e),function(e){LB(n,t,c,u,a,e.dom())})},HB=function(e,t,n){return sp(e,t,n,Nv)},VB=function(e,t){return nn(Jv(uo.fromDom(t.container()),e),Ca)},qB=function(e,t,n){return HB(e,t.dom(),n).forall(function(e){return VB(t,n).fold(function(){return _g(e,n,t.dom())===!1},function(r){return _g(e,n,t.dom())===!1&&Bo(r,uo.fromDom(e.container()))})})},$B=function(e,t,n){return VB(t,n).fold(function(){return HB(e,t.dom(),n).forall(function(e){return _g(e,n,t.dom())===!1})},function(t){return HB(e,t.dom(),n).isNone()})},WB=t($B,!1),KB=t($B,!0),XB=t(qB,!1),YB=t(qB,!0),GB=function(e){if(e.selection.isCollapsed()&&MB(e)){var t=e.dom,n=e.selection.getRng(),r=id.fromRangeStart(n),o=t.getParent(n.startContainer,t.isBlock);if(null!==o&&WB(uo.fromDom(o),r))return jB(e,"outdent"),!0}return!1},JB=function(e,t,n){aO([{keyCode:y_.BACKSPACE,action:iO(GB,e,!1)},{keyCode:y_.BACKSPACE,action:iO(mB,e,!1)},{keyCode:y_.DELETE,action:iO(mB,e,!0)},{keyCode:y_.BACKSPACE,action:iO(vB,e,!1)},{keyCode:y_.DELETE,action:iO(vB,e,!0)},{keyCode:y_.BACKSPACE,action:iO(NB,e,t,!1)},{keyCode:y_.DELETE,action:iO(NB,e,t,!0)},{keyCode:y_.BACKSPACE,action:iO(fb,e,!1)},{keyCode:y_.DELETE,action:iO(fb,e,!0)},{keyCode:y_.BACKSPACE,action:iO(DB,e,!1)},{keyCode:y_.DELETE,action:iO(DB,e,!0)},{keyCode:y_.BACKSPACE,action:iO(jO,e,!1)},{keyCode:y_.DELETE,action:iO(jO,e,!0)},{keyCode:y_.BACKSPACE,action:iO(PO,e,!1)},{keyCode:y_.DELETE,action:iO(PO,e,!0)},{keyCode:y_.BACKSPACE,action:iO(RB,e,!1)},{keyCode:y_.DELETE,action:iO(RB,e,!0)}],n).each(function(){n.preventDefault()})},QB=function(e,t){aO([{keyCode:y_.BACKSPACE,action:iO(dB,e)},{keyCode:y_.DELETE,action:iO(dB,e)}],t)},ZB=function(e,t){e.on("keydown",function(n){n.isDefaultPrevented()===!1&&JB(e,t,n)}),e.on("keyup",function(t){t.isDefaultPrevented()===!1&&QB(e,t)})},eP=function(e){for(;e;){if(1===e.nodeType||3===e.nodeType&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}},tP=function(e,t){var n,r=t,o=e.dom,i=e.schema.getMoveCaretBeforeOnEnterElements();if(t){if(/^(LI|DT|DD)$/.test(t.nodeName)){var a=eP(t.firstChild);a&&/^(UL|OL|DL)$/.test(a.nodeName)&&t.insertBefore(o.doc.createTextNode(su),t.firstChild)}var u=o.createRng();if(t.normalize(),t.hasChildNodes()){for(var c=new jc(t,t);n=c.current();){if(Mi(n)){u.setStart(n,0),u.setEnd(n,0);break}if(i[n.nodeName.toLowerCase()]){u.setStartBefore(n),u.setEndBefore(n);break}r=n,n=c.next()}n||(u.setStart(r,0),u.setEnd(r,0))}else ji(t)?t.nextSibling&&o.isBlock(t.nextSibling)?(u.setStartBefore(t),u.setEndBefore(t)):(u.setStartAfter(t),u.setEndAfter(t)):(u.setStart(t,0),u.setEnd(t,0));e.selection.setRng(u),Ik(e,u)}},nP=function(e,t){var n,r,o=e.getRoot();for(n=t;n!==o&&"false"!==e.getContentEditable(n);)"true"===e.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},rP=function(e){return Tt.from(e.dom.getParent(e.selection.getStart(!0),e.dom.isBlock))},oP=function(e){return rP(e).fold(yt(""),function(e){return e.nodeName.toUpperCase()})},iP=function(e){return rP(e).filter(function(e){return ka(uo.fromDom(e))}).isSome()},aP=function(e,t){return e.firstChild&&e.firstChild.nodeName===t},uP=function(e,t){return e&&e.parentNode&&e.parentNode.nodeName===t},cP=function(e){return e&&/^(OL|UL|LI)$/.test(e.nodeName)},sP=function(e){return cP(e)&&cP(e.parentNode)},fP=function(e){var t=e.parentNode;return/^(LI|DT|DD)$/.test(t.nodeName)?t:e},lP=function(e,t,n){for(var r=e[n?"firstChild":"lastChild"];r&&!_i(r);)r=r[n?"nextSibling":"previousSibling"];return r===t},dP=function(e,t,n,r,o){var i=e.dom,a=e.selection.getRng();if(n!==e.getBody()){sP(n)&&(o="LI");var u=o?t(o):i.create("BR");if(lP(n,r,!0)&&lP(n,r,!1))uP(n,"LI")?i.insertAfter(u,fP(n)):i.replace(u,n);else if(lP(n,r,!0))uP(n,"LI")?(i.insertAfter(u,fP(n)),u.appendChild(i.doc.createTextNode(" ")),u.appendChild(n)):n.parentNode.insertBefore(u,n);else if(lP(n,r,!1))i.insertAfter(u,fP(n));else{n=fP(n);var c=a.cloneRange();c.setStartAfter(r),c.setEndAfter(n);var s=c.extractContents();"LI"===o&&aP(s,"LI")?(u=s.firstChild,i.insertAfter(s,n)):(i.insertAfter(s,n),i.insertAfter(u,n))}i.remove(r),tP(e,u)}},mP=function(e){Yt(df(uo.fromDom(e),bo),function(e){var t=e.dom();t.nodeValue=Hf(t.nodeValue)})},gP=function(e,t){return t&&"A"===t.nodeName&&e.isEmpty(t)},pP=function(e){return e&&/^(TD|TH|CAPTION)$/.test(e.nodeName)},hP=function(e){e.innerHTML='<br data-mce-bogus="1">'},vP=function(e,t){return e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t},yP=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)},bP=function(e,t,n){var r,o=n,i=[];if(o){for(;o=o.firstChild;){if(e.isBlock(o))return;_i(o)&&!t[o.nodeName.toLowerCase()]&&i.push(o)}for(r=i.length;r--;)o=i[r],!o.hasChildNodes()||o.firstChild===o.lastChild&&""===o.firstChild.nodeValue?e.remove(o):gP(e,o)&&e.remove(o)}},CP=function(e,t,n){return Mi(t)===!1?n:e?1===n&&t.data.charAt(n-1)===zf?0:n:n===t.data.length-1&&t.data.charAt(n)===zf?t.data.length:n},wP=function(e){var t=e.cloneRange();return t.setStart(e.startContainer,CP(!0,e.startContainer,e.startOffset)),t.setEnd(e.endContainer,CP(!1,e.endContainer,e.endOffset)),t},xP=function(e){do Mi(e)&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;while(e)},SP=function(e,t){var n,r,o=e.getRoot();for(n=t;n!==o&&"false"!==e.getContentEditable(n);)"true"===e.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},NP=function(e,t,n){Tt.from(n.style).map(e.dom.parseStyle).each(function(n){var r=na(uo.fromDom(t)),o=Fn(Fn({},r),n);e.dom.setStyles(t,o)});var r=Tt.from(n.class).map(function(e){return e.split(/\s+/)}),i=Tt.from(t.className).map(function(e){return Qt(e.split(/\s+/),function(e){return""!==e})});al(r,i,function(n,r){var i=Qt(r,function(e){return!Wt(n,e)}),a=o(n,i);e.dom.setAttrib(t,"class",a.join(" "))});var a=["style","class"],u=Sn(n,function(e,t){return!Wt(a,t)});e.dom.setAttribs(t,u)},EP=function(e,t){var n=Gd(e);if(n&&n.toLowerCase()===t.tagName.toLowerCase()){var r=Jd(e);NP(e,t,r)}},kP=function(e,t,n,r,o){var i,a,u,c,s,f,l=t||"P",d=e.dom,m=SP(d,r);if(a=d.getParent(r,d.isBlock),!a||!yP(d,a)){if(a=a||m,f=a===e.getBody()||pP(a)?a.nodeName.toLowerCase():a.parentNode.nodeName.toLowerCase(),!a.hasChildNodes())return i=d.create(l),EP(e,i),a.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i;for(c=r;c.parentNode!==a;)c=c.parentNode;for(;c&&!d.isBlock(c);)u=c,c=c.previousSibling;if(u&&e.schema.isValidChild(f,l.toLowerCase())){for(i=d.create(l),EP(e,i),u.parentNode.insertBefore(i,u),c=u;c&&!d.isBlock(c);)s=c.nextSibling,i.appendChild(c),c=s;n.setStart(r,o),n.setEnd(r,o)}}return r},_P=function(e,t){t.normalize();var n=t.lastChild;(!n||/^(left|right)$/gi.test(e.getStyle(n,"float",!0)))&&e.add(t,"br")},TP=function(e,t){var n,r,o,i,a,u,c,s,f,l,d=e.dom,m=e.schema,g=m.getNonEmptyElements(),p=e.selection.getRng(),h=function(t){var n,o,a,u=r,c=m.getTextInlineElements();if(n=t||"TABLE"===s||"HR"===s?d.create(t||f):i.cloneNode(!1),a=n,em(e)===!1)d.setAttrib(n,"style",null),d.setAttrib(n,"class",null);else do if(c[u.nodeName]){if(hp(u)||Fp(u))continue;o=u.cloneNode(!1),d.setAttrib(o,"id",""),n.hasChildNodes()?(o.appendChild(n.firstChild),n.appendChild(o)):(a=o,n.appendChild(o))}while((u=u.parentNode)&&u!==w);return EP(e,n),hP(a),n},v=function(e){var t,n,a=CP(e,r,o);if(Mi(r)&&(e?a>0:a<r.nodeValue.length))return!1;if(r.parentNode===i&&l&&!e)return!0;if(e&&_i(r)&&r===i.firstChild)return!0;if(vP(r,"TABLE")||vP(r,"HR"))return l&&!e||!l&&e;var u=new jc(r,i);for(Mi(r)&&(e&&0===a?u.prev():e||a!==r.nodeValue.length||u.next());t=u.current();){if(_i(t)){if(!t.getAttribute("data-mce-bogus")&&(n=t.nodeName.toLowerCase(),g[n]&&"br"!==n))return!1
}else if(Mi(t)&&!/^[ \t\r\n]*$/.test(t.nodeValue))return!1;e?u.prev():u.next()}return!0},y=function(){a=/^(H[1-6]|PRE|FIGURE)$/.test(s)&&"HGROUP"!==x?h(f):h(),tm(e)&&yP(d,c)&&d.isEmpty(i)?a=d.split(c,i):d.insertAfter(a,i),tP(e,a)};c_(d,p).each(function(e){p.setStart(e.startContainer,e.startOffset),p.setEnd(e.endContainer,e.endOffset)}),r=p.startContainer,o=p.startOffset,f=Gd(e);var b=!(!t||!t.shiftKey),C=!(!t||!t.ctrlKey);_i(r)&&r.hasChildNodes()&&(l=o>r.childNodes.length-1,r=r.childNodes[Math.min(o,r.childNodes.length-1)]||r,o=l&&Mi(r)?r.nodeValue.length:0);var w=SP(d,r);if(w){(f&&!b||!f&&b)&&(r=kP(e,f,p,r,o)),i=d.getParent(r,d.isBlock),c=i?d.getParent(i.parentNode,d.isBlock):null,s=i?i.nodeName.toUpperCase():"";var x=c?c.nodeName.toUpperCase():"";return"LI"!==x||C||(i=c,c=c.parentNode,s=x),/^(LI|DT|DD)$/.test(s)&&d.isEmpty(i)?void dP(e,h,c,i,f):void(f&&i===e.getBody()||(f=f||"P",$f(i)?(a=rl(i),d.isEmpty(i)&&hP(i),EP(e,a),tP(e,a)):v()?y():v(!0)?(a=i.parentNode.insertBefore(h(),i),tP(e,vP(i,"HR")?a:i)):(n=wP(p).cloneRange(),n.setEndAfter(i),u=n.extractContents(),mP(u),xP(u),a=u.firstChild,d.insertAfter(u,i),bP(d,g,a),_P(d,i),d.isEmpty(i)&&hP(i),a.normalize(),d.isEmpty(a)?(d.remove(a),y()):(EP(e,a),tP(e,a))),d.setAttrib(a,"id",""),e.fire("NewBlock",{newBlock:a})))}},RP=function(e,t,n){for(var r,o=new jc(t,n),i=e.getNonEmptyElements();r=o.next();)if(i[r.nodeName.toLowerCase()]||r.length>0)return!0},AP=function(e,t,n){var r=e.create("span",{},"&nbsp;");n.parentNode.insertBefore(r,n),t.scrollIntoView(r),e.remove(r)},DP=function(e,t,n,r){var o=e.createRng();r?(o.setStartBefore(n),o.setEndBefore(n)):(o.setStartAfter(n),o.setEndAfter(n)),t.setRng(o)},OP=function(e,t){var n,r,o=e.selection,i=e.dom,a=o.getRng();c_(i,a).each(function(e){a.setStart(e.startContainer,e.startOffset),a.setEnd(e.endContainer,e.endOffset)});var u=a.startOffset,c=a.startContainer;if(1===c.nodeType&&c.hasChildNodes()){var s=u>c.childNodes.length-1;c=c.childNodes[Math.min(u,c.childNodes.length-1)]||c,u=s&&3===c.nodeType?c.nodeValue.length:0}var f=i.getParent(c,i.isBlock),l=f?i.getParent(f.parentNode,i.isBlock):null,d=l?l.nodeName.toUpperCase():"",m=!(!t||!t.ctrlKey);"LI"!==d||m||(f=l),c&&3===c.nodeType&&u>=c.nodeValue.length&&(RP(e.schema,c,f)||(n=i.create("br"),a.insertNode(n),a.setStartAfter(n),a.setEndAfter(n),r=!0)),n=i.create("br"),sd(i,a,n),AP(i,o,n),DP(i,o,n,r),e.undoManager.add()},BP=function(e,t){var n=uo.fromTag("br");ni(uo.fromDom(t),n),e.undoManager.add()},PP=function(e,t){IP(e.getBody(),t)||ri(uo.fromDom(t),uo.fromTag("br"));var n=uo.fromTag("br");ri(uo.fromDom(t),n),AP(e.dom,e.selection,n.dom()),DP(e.dom,e.selection,n.dom(),!1),e.undoManager.add()},LP=function(e){return ji(e.getNode())},IP=function(e,t){return LP(id.after(t))?!0:lp(e,id.after(t)).map(function(e){return ji(e.getNode())}).getOr(!1)},MP=function(e){return e&&"A"===e.nodeName&&"href"in e},FP=function(e){return e.fold(yt(!1),MP,MP,yt(!1))},UP=function(e){var n=t(SR,e),r=id.fromRangeStart(e.selection.getRng());return HR(n,e.getBody(),r).filter(FP)},zP=function(e,n){n.fold(pt,t(BP,e),t(PP,e),pt)},jP=function(e,n){var r=UP(e);r.isSome()?r.each(t(zP,e)):OP(e,n)},HP=function(e,t){return rP(e).filter(function(e){return t.length>0&&ko(uo.fromDom(e),t)}).isSome()},VP=function(e){return HP(e,Qd(e))},qP=function(e){return HP(e,Zd(e))},$P=us.generate([{br:[]},{block:[]},{none:[]}]),WP=function(e){return qP(e)},KP=function(e){return function(t){var n=""===Gd(t);return n===e}},XP=function(e){return function(t){return iP(t)===e}},YP=function(e,t){return function(n){var r=oP(n)===e.toUpperCase();return r===t}},GP=function(e){return YP("pre",e)},JP=function(){return YP("summary",!0)},QP=function(e){return function(t){return Yd(t)===e}},ZP=function(e){return VP(e)},eL=function(e,t){return t},tL=function(e){var t=Gd(e),n=nP(e.dom,e.selection.getStart());return n&&e.schema.isValidChild(n.nodeName,t?t:"P")},nL=function(e,t){return function(n,r){var o=en(e,function(e,t){return e&&t(n,r)},!0);return o?Tt.some(t):Tt.none()}},rL=function(e,t){return OR([nL([WP],$P.none()),nL([JP()],$P.br()),nL([GP(!0),QP(!1),eL],$P.br()),nL([GP(!0),QP(!1)],$P.block()),nL([GP(!0),QP(!0),eL],$P.block()),nL([GP(!0),QP(!0)],$P.br()),nL([XP(!0),eL],$P.br()),nL([XP(!0)],$P.block()),nL([KP(!0),eL,tL],$P.block()),nL([KP(!0)],$P.br()),nL([ZP],$P.br()),nL([KP(!1),eL],$P.br()),nL([tL],$P.block())],[e,!(!t||!t.shiftKey)]).getOr($P.none())},oL=function(e,t){rL(e,t).fold(function(){jP(e,t)},function(){TP(e,t)},pt)},iL=function(e,t){t.isDefaultPrevented()||(t.preventDefault(),KS(e.undoManager),e.undoManager.transact(function(){e.selection.isCollapsed()===!1&&e.execCommand("Delete"),oL(e,t)}))},aL=function(e){e.on("keydown",function(t){t.keyCode===y_.ENTER&&iL(e,t)})},uL=function(e,t){var n=t.container(),r=t.offset();return Mi(n)?(n.insertData(r,e),Tt.some(k(n,r+e.length))):Mg(t).map(function(n){var r=uo.fromText(e);return t.isAtEnd()?ri(n,r):ni(n,r),k(r.dom(),e.length)})},cL=t(uL,su),sL=t(uL," "),fL=function(e){return k.isTextPosition(e)&&!e.isAtStart()&&!e.isAtEnd()},lL=function(e,t){var n=Qt(Jv(uo.fromDom(t.container()),e),Ca);return dn(n).getOr(e)},dL=function(e,t){return fL(t)?Sv(t):Sv(t)||dp(lL(e,t).dom(),t).exists(Sv)},mL=function(e,t){return fL(t)?xv(t):xv(t)||lp(lL(e,t).dom(),t).exists(xv)},gL=function(e){return Wt(["pre","pre-wrap"],e)},pL=function(e){return Mg(e).bind(function(e){return pf(e,yo)}).exists(function(e){return gL(Zi(e,"white-space"))})},hL=function(e,t){return dp(e.dom(),t).isNone()},vL=function(e,t){return lp(e.dom(),t).isNone()},yL=function(e,t){return hL(e,t)||vL(e,t)||WB(e,t)||KB(e,t)||$O(e,t)||qO(e,t)},bL=function(e,t){return pL(t)?!1:yL(e,t)||dL(e,t)||mL(e,t)},CL=function(e,t){return pL(t)?!1:WB(e,t)||XB(e,t)||$O(e,t)||dL(e,t)},wL=function(e){var t=e.container(),n=e.offset();return Mi(t)&&n<t.data.length?k(t,n+1):e},xL=function(e,t){var n=wL(t);return pL(n)?!1:KB(e,n)||YB(e,n)||qO(e,n)||mL(e,n)},SL=function(e,t){return CL(e,t)||xL(e,t)},NL=function(e,t){return zp(e.charAt(t))},EL=function(e){var t=e.container();return Mi(t)&&yr(t.data,su)},kL=function(e){var t=e.split("");return Xt(t,function(e,n){return zp(e)&&n>0&&n<t.length-1&&Hp(t[n-1])&&Hp(t[n+1])?" ":e}).join("")},_L=function(e,t){var n=t.data,r=k(t,0);return NL(n,0)&&!SL(e,r)?(t.data=" "+n.slice(1),!0):!1},TL=function(e){var t=e.data,n=kL(t);return n!==t?(e.data=n,!0):!1},RL=function(e,t){var n=t.data,r=k(t,n.length-1);return NL(n,n.length-1)&&!SL(e,r)?(t.data=n.slice(0,-1)+" ",!0):!1},AL=function(e,t){return Tt.some(t).filter(EL).bind(function(t){var n=t.container(),r=_L(e,n)||TL(n)||RL(e,n);return r?Tt.some(t):Tt.none()})},DL=function(e){var t=uo.fromDom(e.getBody());e.selection.isCollapsed()&&AL(t,k.fromRangeStart(e.selection.getRng())).each(function(t){e.selection.setRng(t.toRange())})},OL=function(e){return function(t){return t.fold(function(t){return dp(e.dom(),id.before(t))},function(e){return mp(e)},function(e){return gp(e)},function(t){return lp(e.dom(),id.after(t))})}},BL=function(e,t){return function(n){return bL(e,n)?cL(t):sL(t)}},PL=function(e){return function(t){return e.selection.setRng(t.toRange()),e.nodeChanged(),!0}},LL=function(e){var n=id.fromRangeStart(e.selection.getRng()),r=uo.fromDom(e.getBody());if(e.selection.isCollapsed()){var o=t(SR,e),i=id.fromRangeStart(e.selection.getRng());return HR(o,e.getBody(),i).bind(OL(r)).bind(BL(r,n)).exists(PL(e))}return!1},IL=function(e,t){aO([{keyCode:y_.SPACEBAR,action:iO(LL,e)}],t).each(function(){t.preventDefault()})},ML=function(e){e.on("keydown",function(t){t.isDefaultPrevented()===!1&&IL(e,t)})},FL=function(e){return vf(uo.fromDom(e.getBody()),"*[data-mce-caret]").fold(yt(null),function(e){return e.dom()})},UL=function(e){e.selection.setRng(e.selection.getRng())},zL=function(e,t){t.hasAttribute("data-mce-caret")&&(rl(t),UL(e),e.selection.scrollIntoView(t))},jL=function(e,t){var n=FL(e);if(n)return"compositionstart"===t.type?(t.preventDefault(),t.stopPropagation(),void zL(e,n)):void(Xf(n)&&(zL(e,n),e.undoManager.add()))},HL=function(e){e.on("keyup compositionstart",t(jL,e))},VL=Br().browser,qL=function(e){var t=Qs(function(){e.composing||DL(e)},0);VL.isIE()&&(e.on("keypress",function(){t.throttle()}),e.on("remove",function(){t.cancel()}))},$L=function(e){qL(e),e.on("input",function(t){t.isComposing===!1&&DL(e)})},WL=function(e,t){aO([{keyCode:y_.END,action:hD(e,!0)},{keyCode:y_.HOME,action:hD(e,!1)}],t).each(function(){t.preventDefault()})},KL=function(e){e.on("keydown",function(t){t.isDefaultPrevented()===!1&&WL(e,t)})},XL=function(e){var t=cA(e);HL(e),cO(e,t),ZB(e,t),aL(e),ML(e),$L(e),KL(e)},YL=function(e){fN(e)||XL(e)},GL=function(){function e(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(),o={startContainer:r.startContainer,startOffset:r.startOffset,endContainer:r.endContainer,endOffset:r.endOffset};"nodechange"!==n.type&&Gk(o,t)||e.fire("SelectionChange"),t=o}),e.on("contextmenu",function(){e.fire("SelectionChange")}),e.on("SelectionChange",function(){var t=e.selection.getStart(!0);!t||!Hr.range&&e.selection.isCollapsed()||Lh(e)&&!n.isSameElementPath(t)&&e.dom.isChildOf(t,e.getBody())&&e.nodeChanged({selectionChange:!0})}),e.on("mouseup",function(t){!t.isDefaultPrevented()&&Lh(e)&&("IMG"===e.selection.getNode().nodeName?vs.setEditorTimeout(e,function(){e.nodeChanged()}):e.nodeChanged())})}return e.prototype.nodeChanged=function(e){var t,n,r,o=this.editor.selection;this.editor.initialized&&o&&!Vm(this.editor)&&!this.editor.mode.isReadOnly()&&(r=this.editor.getBody(),t=o.getStart(!0)||r,t.ownerDocument===this.editor.getDoc()&&this.editor.dom.isChildOf(t,r)||(t=r),n=[],this.editor.dom.getParent(t,function(e){return e===r?!0:void n.push(e)}),e=e||{},e.element=t,e.parents=n,this.editor.fire("NodeChange",e))},e.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;t>=0&&n[t]===this.lastPath[t];t--);if(-1===t)return this.lastPath=n,!0}return this.lastPath=n,!1},e}(),JL=function(e){e.on("click",function(t){e.dom.getParent(t.target,"details")&&t.preventDefault()})},QL=function(e){e.parser.addNodeFilter("details",function(e){Yt(e,function(e){e.attr("data-mce-open",e.attr("open")),e.attr("open","open")})}),e.serializer.addNodeFilter("details",function(e){Yt(e,function(e){var t=e.attr("data-mce-open");e.attr("open",Bt(t)?t:null),e.attr("data-mce-open",null)})})},ZL=function(e){JL(e),QL(e)},eI=function(e){return _i(e)&&Na(uo.fromDom(e))},tI=function(e){var t=e.selection.getRng(),n=k.fromRangeStart(t),r=k.fromRangeEnd(t);if(k.isElementPosition(n)){var o=n.container();eI(o)&&mp(o).each(function(e){return t.setStart(e.container(),e.offset())})}if(k.isElementPosition(r)){var o=n.container();eI(o)&&gp(o).each(function(e){return t.setEnd(e.container(),e.offset())})}e.selection.setRng(mb(t))},nI=function(e){e.on("click",function(t){t.detail>=3&&tI(e)})},rI=function(e){var t=e.getBoundingClientRect(),n=e.ownerDocument,r=n.documentElement,o=n.defaultView;return{top:t.top+o.pageYOffset-r.clientTop,left:t.left+o.pageXOffset-r.clientLeft}},oI=function(e){return e.inline?rI(e.getBody()):{left:0,top:0}},iI=function(e){var t=e.getBody();return e.inline?{left:t.scrollLeft,top:t.scrollTop}:{left:0,top:0}},aI=function(e){var t=e.getBody(),n=e.getDoc().documentElement,r={left:t.scrollLeft,top:t.scrollTop},o={left:t.scrollLeft||n.scrollLeft,top:t.scrollTop||n.scrollTop};return e.inline?r:o},uI=function(e,t){if(t.target.ownerDocument!==e.getDoc()){var n=rI(e.getContentAreaContainer()),r=aI(e);return{left:t.pageX-n.left+r.left,top:t.pageY-n.top+r.top}}return{left:t.pageX,top:t.pageY}},cI=function(e,t,n){return{pageX:n.left-e.left+t.left,pageY:n.top-e.top+t.top}},sI=function(e,t){return cI(oI(e),iI(e),uI(e,t))},fI=Vi,lI=Hi,dI=function(e,t){return fI(t)&&t!==e},mI=function(e,t,n){return t===n||e.dom.isChildOf(t,n)?!1:!fI(t)},gI=function(e){var t=e.cloneNode(!0);return t.removeAttribute("data-mce-selected"),t},pI=function(e,t,n,r){var o=t.cloneNode(!0);e.dom.setStyles(o,{width:n,height:r}),e.dom.setAttrib(o,"data-mce-selected",null);var i=e.dom.create("div",{"class":"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return e.dom.setStyles(i,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:r}),e.dom.setStyles(o,{margin:0,boxSizing:"border-box"}),i.appendChild(o),i},hI=function(e,t){e.parentNode!==t&&t.appendChild(e)},vI=function(e,t,n,r,o,i){var a=0,u=0;e.style.left=t.pageX+"px",e.style.top=t.pageY+"px",t.pageX+n>o&&(a=t.pageX+n-o),t.pageY+r>i&&(u=t.pageY+r-i),e.style.width=n-a+"px",e.style.height=r-u+"px"},yI=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},bI=function(e){return 0===e.button},CI=function(e){return e.element},wI=function(e,t){return{pageX:t.pageX-e.relX,pageY:t.pageY+5}},xI=function(e,t){return function(n){if(bI(n)){var r=nn(t.dom.getParents(n.target),wl(fI,lI)).getOr(null);if(dI(t.getBody(),r)){var o=t.dom.getPos(r),i=t.getBody(),a=t.getDoc().documentElement;e.element=r,e.screenX=n.screenX,e.screenY=n.screenY,e.maxX=(t.inline?i.scrollWidth:a.offsetWidth)-2,e.maxY=(t.inline?i.scrollHeight:a.offsetHeight)-2,e.relX=n.pageX-o.x,e.relY=n.pageY-o.y,e.width=r.offsetWidth,e.height=r.offsetHeight,e.ghost=pI(t,r,e.width,e.height)}}}},SI=function(e,t){var n=vs.throttle(function(e,n){t._selectionOverrides.hideFakeCaret(),t.selection.placeCaretAt(e,n)},0);return function(r){var o=Math.max(Math.abs(r.screenX-e.screenX),Math.abs(r.screenY-e.screenY));if(CI(e)&&!e.dragging&&o>10){var i=t.fire("dragstart",{target:e.element});if(i.isDefaultPrevented())return;e.dragging=!0,t.focus()}if(e.dragging){var a=wI(e,sI(t,r));hI(e.ghost,t.getBody()),vI(e.ghost,a,e.width,e.height,e.maxX,e.maxY),n(r.clientX,r.clientY)}}},NI=function(e){var t=e.getSel().getRangeAt(0),n=t.startContainer;return 3===n.nodeType?n.parentNode:n},EI=function(e,t){return function(n){if(e.dragging&&mI(t,NI(t.selection),e.element)){var r=gI(e.element),o=t.fire("drop",{targetClone:r,clientX:n.clientX,clientY:n.clientY});o.isDefaultPrevented()||(r=o.targetClone,t.undoManager.transact(function(){yI(e.element),t.insertContent(t.dom.getOuterHTML(r)),t._selectionOverrides.hideFakeCaret()}))}_I(e)}},kI=function(e,t){return function(){e.dragging&&t.fire("dragend"),_I(e)}},_I=function(e){e.dragging=!1,e.element=null,yI(e.ghost)},TI=function(t){var n={},r=Ts.DOM,o=e.document,i=xI(n,t),a=SI(n,t),u=EI(n,t),c=kI(n,t);t.on("mousedown",i),t.on("mousemove",a),t.on("mouseup",u),r.bind(o,"mousemove",a),r.bind(o,"mouseup",c),t.on("remove",function(){r.unbind(o,"mousemove",a),r.unbind(o,"mouseup",c)})},RI=function(e){e.on("drop",function(t){var n="undefined"!=typeof t.clientX?e.getDoc().elementFromPoint(t.clientX,t.clientY):null;(fI(n)||fI(e.dom.getContentEditableParent(n)))&&t.preventDefault()})},AI=function(t){var n=function(e){if(!e.defaultPrevented){var t=e.dataTransfer;t&&(Wt(t.types,"Files")||t.files.length>0)&&e.preventDefault()}},r=function(e){$C(t,e.target)&&n(e)},o=function(){var o=Ts.DOM,i=t.dom,a=e.document,u=t.inline?t.getBody():t.getDoc(),c=["drop","dragover"];Yt(c,function(e){o.bind(a,e,r),i.bind(u,e,n)}),t.on("remove",function(){Yt(c,function(e){o.unbind(a,e,r),i.unbind(u,e,n)})})};t.on("init",function(){vs.setEditorTimeout(t,o,0)})},DI=function(e){TI(e),RI(e),Xm(e)&&AI(e)},OI=function(t){var n=Qs(function(){if(!t.removed&&t.getBody().contains(e.document.activeElement)){var n=t.selection.getRng();if(n.collapsed){var r=oD(t,t.selection.getRng(),!1);t.selection.setRng(r)}}},0);t.on("focus",function(){n.throttle()}),t.on("blur",function(){n.cancel()})},BI=Hi,PI=Vi,LI=function(e,t){for(var n=e.getBody();t&&t!==n;){if(BI(t)||PI(t))return t;t=t.parentNode}return null},II=function(e){var t,n=function(t){return e.dom.isBlock(t)},r=e.getBody(),o=mg(e,r,n,function(){return iw(e)}),i="sel-"+e.dom.uniqueId(),a=function(t){return e.dom.hasClass(t,"mce-offscreen-selection")},u=function(){var t=e.dom.get(i);return t?t.getElementsByTagName("*")[0]:t},c=function(t){t&&e.selection.setRng(t)},s=function(){return e.selection.getRng()},f=function(t,n,r,i){void 0===i&&(i=!0);var a=e.fire("ShowCaret",{target:n,direction:t,before:r});return a.isDefaultPrevented()?null:(i&&e.selection.scrollIntoView(n,-1===t),o.show(r,n))},l=function(t){t.hasAttribute("data-mce-caret")&&(rl(t),c(s()),e.selection.scrollIntoView(t))},d=function(){e.on("mouseup",function(t){var n=s();n.collapsed&&HE(e,t.clientX,t.clientY)&&c(rD(e,n,!1))}),e.on("click",function(t){var n=LI(e,t.target);n&&(PI(n)&&(t.preventDefault(),e.focus()),BI(n)&&e.dom.isChildOf(n,e.selection.getNode())&&v())}),e.on("blur NewBlock",function(){v()}),e.on("ResizeWindow FullscreenStateChanged",function(){return o.reposition()});var n=function(e){e.on("tap",function(t){var n=LI(e,t.target);PI(n)&&(t.preventDefault(),h(nD(e,n)))},!0)},i=function(e){var t=Zg(e);if(!e.firstChild)return!1;var n=id.before(e.firstChild),r=t.next(n);return r&&!Ov(r)&&!Bv(r)},l=function(t,n){var r=e.dom.getParent(t,e.dom.isBlock),o=e.dom.getParent(n,e.dom.isBlock);return r===o},d=function(t,n){var r=e.dom.getParent(t,e.dom.isBlock),o=e.dom.getParent(n,e.dom.isBlock);return r&&e.dom.isChildOf(r,o)&&PI(LI(e,r))===!1?!0:r&&!l(r,o)&&i(r)};n(e),e.on("mousedown",function(t){var n=t.target;if((n===r||"HTML"===n.nodeName||e.dom.isChildOf(n,r))&&HE(e,t.clientX,t.clientY)!==!1){var o=LI(e,n);if(o)PI(o)?(t.preventDefault(),h(nD(e,o))):(v(),BI(o)&&t.shiftKey||v_(t.clientX,t.clientY,e.selection.getRng())||(b(),e.selection.placeCaretAt(t.clientX,t.clientY)));else if(pg(n)===!1){v(),b();var i=JA(r,t.clientX,t.clientY);if(i&&!d(t.target,i.node)){t.preventDefault();var a=f(1,i.node,i.before,!1);e.getBody().focus(),c(a)}}}}),e.on("keypress",function(t){if(!y_.modifierPressed(t))switch(t.keyCode){default:PI(e.selection.getNode())&&t.preventDefault()}}),e.on("GetSelectionRange",function(e){var n=e.range;if(t){if(!t.parentNode)return void(t=null);n=n.cloneRange(),n.selectNode(t),e.range=n}}),e.on("SetSelectionRange",function(e){e.range=p(e.range);var t=h(e.range,e.forward);t&&(e.range=t)});var m=function(e){return"mcepastebin"===e.id};e.on("AfterSetSelectionRange",function(e){var t=e.range;g(t)||m(t.startContainer.parentNode)||b(),a(t.startContainer.parentNode)||v()}),e.on("copy",function(e){var t=e.clipboardData;if(!e.isDefaultPrevented()&&e.clipboardData&&!Hr.ie){var n=u();n&&(e.preventDefault(),t.clearData(),t.setData("text/html",n.outerHTML),t.setData("text/plain",n.outerText))}}),DI(e),OI(e)},m=function(e){return Kf(e)||el(e)||tl(e)},g=function(e){return m(e.startContainer)||m(e.endContainer)},p=function(t){var n=e.schema.getShortEndedElements(),r=e.dom.createRng(),o=t.startContainer,i=t.startOffset,a=t.endContainer,u=t.endOffset;return _n(n,o.nodeName.toLowerCase())?0===i?r.setStartBefore(o):r.setStartAfter(o):r.setStart(o,i),_n(n,a.nodeName.toLowerCase())?0===u?r.setEndBefore(a):r.setEndAfter(a):r.setEnd(a,u),r},h=function(n,o){var a,u,c,s,l,d,m,p=e.$,h=e.dom;if(!n)return null;if(n.collapsed){if(!g(n))if(o===!1){if(l=Ig(-1,r,n),pg(l.getNode(!0)))return f(-1,l.getNode(!0),!1,!1);if(pg(l.getNode()))return f(-1,l.getNode(),!l.isAtEnd(),!1)}else{if(l=Ig(1,r,n),pg(l.getNode()))return f(1,l.getNode(),!l.isAtEnd(),!1);if(pg(l.getNode(!0)))return f(1,l.getNode(!0),!1,!1)}return null}c=n.startContainer,s=n.startOffset;var v=n.endOffset;if(3===c.nodeType&&0===s&&PI(c.parentNode)&&(c=c.parentNode,s=h.nodeIndex(c),c=c.parentNode),1!==c.nodeType)return null;if(v===s+1&&c===n.endContainer&&(a=c.childNodes[s]),!PI(a))return null;d=m=a.cloneNode(!0);var y=e.fire("ObjectSelected",{target:a,targetClone:d});if(y.isDefaultPrevented())return null;u=vf(uo.fromDom(e.getBody()),"#"+i).fold(function(){return p([])},function(e){return p([e.dom()])}),d=y.targetClone,0===u.length&&(u=p('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",i),u.appendTo(e.getBody())),n=e.dom.createRng(),d===m&&Hr.ie?(u.empty().append('<p style="font-size: 0" data-mce-bogus="all"> </p>').append(d),n.setStartAfter(u[0].firstChild.firstChild),n.setEndAfter(d)):(u.empty().append(su).append(d).append(su),n.setStart(u[0].firstChild,1),n.setEnd(u[0].lastChild,0)),u.css({top:h.getPos(a,e.getBody()).y}),u[0].focus();var C=e.selection.getSel();C.removeAllRanges(),C.addRange(n);var w=uo.fromDom(a);return Yt(mf(uo.fromDom(e.getBody()),"*[data-mce-selected]"),function(e){Ao(w,e)||Ji(e,"data-mce-selected")}),e.dom.getAttrib(a,"data-mce-selected")||a.setAttribute("data-mce-selected","1"),t=a,b(),n},v=function(){t&&(t.removeAttribute("data-mce-selected"),vf(uo.fromDom(e.getBody()),"#"+i).each(fi),t=null),vf(uo.fromDom(e.getBody()),"#"+i).each(fi),t=null},y=function(){o.destroy(),t=null},b=function(){o.hide()};return Hr.ceFalse&&d(),{showCaret:f,showBlockCaretContainer:l,hideFakeCaret:b,destroy:y}},MI=function(t){var n=to.each,r=y_.BACKSPACE,o=y_.DELETE,i=t.dom,a=t.selection,u=t.parser,c=Hr.gecko,s=Hr.ie,f=Hr.webkit,l="data:text/mce-internal,",d=s?"Text":"URL",m=function(e,n){try{t.getDoc().execCommand(e,!1,n)}catch(r){}},g=function(e){return e.isDefaultPrevented()},p=function(e){var n,r;e.dataTransfer&&(t.selection.isCollapsed()&&"IMG"===e.target.tagName&&a.select(e.target),n=t.selection.getContent(),n.length>0&&(r=l+escape(t.id)+","+escape(n),e.dataTransfer.setData(d,r)))},h=function(e){var t;return e.dataTransfer&&(t=e.dataTransfer.getData(d),t&&t.indexOf(l)>=0)?(t=t.substr(l.length).split(","),{id:unescape(t[0]),html:unescape(t[1])}):null},v=function(e,n){t.queryCommandSupported("mceInsertClipboardContent")?t.execCommand("mceInsertClipboardContent",!1,{content:e,internal:n}):t.execCommand("mceInsertContent",!1,e)},y=function(){var e=function(e){var t=i.create("body"),n=e.cloneContents();return t.appendChild(n),a.serializer.serialize(t,{format:"html"})},n=function(n){var r=e(n),o=i.createRng();o.selectNode(t.getBody());var a=e(o);return r===a};t.on("keydown",function(e){var a,u,c=e.keyCode;if(!g(e)&&(c===o||c===r)){if(a=t.selection.isCollapsed(),u=t.getBody(),a&&!i.isEmpty(u))return;if(!a&&!n(t.selection.getRng()))return;e.preventDefault(),t.setContent(""),u.firstChild&&i.isBlock(u.firstChild)?t.selection.setCursorLocation(u.firstChild,0):t.selection.setCursorLocation(u,0),t.nodeChanged()}})},b=function(){t.shortcuts.add("meta+a",null,"SelectAll")},C=function(){t.inline||i.bind(t.getDoc(),"mousedown mouseup",function(e){var n;if(e.target===t.getDoc().documentElement)if(n=a.getRng(),t.getBody().focus(),"mousedown"===e.type){if(Kf(n.startContainer))return;a.placeCaretAt(e.clientX,e.clientY)}else a.setRng(n)})},w=function(){t.on("keydown",function(e){if(!g(e)&&e.keyCode===r){if(!t.getBody().getElementsByTagName("hr").length)return;if(a.isCollapsed()&&0===a.getRng().startOffset){var n=a.getNode(),o=n.previousSibling;if("HR"===n.nodeName)return i.remove(n),void e.preventDefault();o&&o.nodeName&&"hr"===o.nodeName.toLowerCase()&&(i.remove(o),e.preventDefault())}}})},x=function(){e.Range.prototype.getClientRects||t.on("mousedown",function(e){if(!g(e)&&"HTML"===e.target.nodeName){var n=t.getBody();n.blur(),vs.setEditorTimeout(t,function(){n.focus()})}})},S=function(){t.on("click",function(e){var n=e.target;/^(IMG|HR)$/.test(n.nodeName)&&"false"!==i.getContentEditableParent(n)&&(e.preventDefault(),t.selection.select(n),t.nodeChanged()),"A"===n.nodeName&&i.hasClass(n,"mce-item-anchor")&&(e.preventDefault(),a.select(n))})},N=function(){var e=function(){var e=i.getAttribs(a.getStart().cloneNode(!1));return function(){var r=a.getStart();r!==t.getBody()&&(i.setAttrib(r,"style",null),n(e,function(e){r.setAttributeNode(e.cloneNode(!0))}))}},r=function(){return!a.isCollapsed()&&i.getParent(a.getStart(),i.isBlock)!==i.getParent(a.getEnd(),i.isBlock)};t.on("keypress",function(n){var o;return g(n)||8!==n.keyCode&&46!==n.keyCode||!r()?void 0:(o=e(),t.getDoc().execCommand("delete",!1,null),o(),n.preventDefault(),!1)}),i.bind(t.getDoc(),"cut",function(n){var o;!g(n)&&r()&&(o=e(),vs.setEditorTimeout(t,function(){o()}))})},E=function(){t.on("keydown",function(e){if(!g(e)&&e.keyCode===r&&a.isCollapsed()&&0===a.getRng().startOffset){var t=a.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})},k=function(){t.on("keydown",function(e){var n,r;if(!g(e)&&e.keyCode===y_.BACKSPACE){n=a.getRng();var o=n.startContainer,u=n.startOffset,c=i.getRoot();if(r=o,n.collapsed&&0===u){for(;r&&r.parentNode&&r.parentNode.firstChild===r&&r.parentNode!==c;)r=r.parentNode;"BLOCKQUOTE"===r.tagName&&(t.formatter.toggle("blockquote",null,r),n=i.createRng(),n.setStart(o,0),n.setEnd(o,0),a.setRng(n))}}})},_=function(){var e=function(){m("StyleWithCSS",!1),m("enableInlineTableEditing",!1),Sm(t)||m("enableObjectResizing",!1)};qm(t)||t.on("BeforeExecCommand mousedown",e)},T=function(){var e=function(){n(i.select("a"),function(e){var t=e.parentNode,n=i.getRoot();if(t.lastChild===e){for(;t&&!i.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}i.add(t,"br",{"data-mce-bogus":1})}})};t.on("SetContent ExecCommand",function(t){("setcontent"===t.type||"mceInsertLink"===t.command)&&e()})},R=function(){Gd(t)&&t.on("init",function(){m("DefaultParagraphSeparator",Gd(t))})},A=function(){t.on("keyup focusin mouseup",function(e){y_.modifierPressed(e)||a.normalize()},!0)},D=function(){t.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")},O=function(){t.inline||t.on("keydown",function(){e.document.activeElement===e.document.body&&t.getWin().focus()})},B=function(){t.inline||(t.contentStyles.push("body {min-height: 150px}"),t.on("click",function(e){var n;if("HTML"===e.target.nodeName){if(Hr.ie>11)return void t.getBody().focus();n=t.selection.getRng(),t.getBody().focus(),t.selection.setRng(n),t.selection.normalize(),t.nodeChanged()}}))},P=function(){Hr.mac&&t.on("keydown",function(e){if(y_.metaKeyPressed(e)&&!e.shiftKey&&(37===e.keyCode||39===e.keyCode)){e.preventDefault();var n=t.selection.getSel();n.modify("move",37===e.keyCode?"backward":"forward","lineboundary")}})},L=function(){m("AutoUrlDetect",!1)},I=function(){t.on("click",function(e){var t=e.target;do if("A"===t.tagName)return void e.preventDefault();while(t=t.parentNode)}),t.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")},M=function(){t.on("init",function(){t.dom.bind(t.getBody(),"submit",function(e){e.preventDefault()})})},F=function(){u.addNodeFilter("br",function(e){for(var t=e.length;t--;)"Apple-interchange-newline"===e[t].attr("class")&&e[t].remove()})},U=function(){t.on("dragstart",function(e){p(e)}),t.on("drop",function(e){if(!g(e)){var n=h(e);if(n&&n.id!==t.id){e.preventDefault();var r=jk(e.x,e.y,t.getDoc());a.setRng(r),v(n.html,!0)}}})},z=function(){},j=function(){if(!c||t.removed)return!1;var e=t.selection.getSel();return!e||!e.rangeCount||0===e.rangeCount};return k(),y(),Hr.windowsPhone||A(),f&&(C(),S(),R(),M(),E(),F(),Hr.iOS?(O(),B(),I()):b()),Hr.ie>=11&&(B(),E()),Hr.ie&&(b(),L(),U()),c&&(w(),x(),N(),_(),T(),D(),P(),E()),{refreshContentEditable:z,isHidden:j}},FI=Ts.DOM,UI=function(e,t){var n=uo.fromDom(e.getDoc().head),r=uo.fromTag("style");Wi(r,"type","text/css"),ii(r,uo.fromText(t)),ii(n,r)},zI=function(e){return e.inline?e.getElement().nodeName.toLowerCase():void 0},jI=function(e){return Sn(e,function(e){return Ft(e)===!1})},HI=function(e){var t=e.settings,n=e.editorUpload.blobCache;return jI({allow_conditional_comments:t.allow_conditional_comments,allow_html_data_urls:t.allow_html_data_urls,allow_html_in_named_anchor:t.allow_html_in_named_anchor,allow_script_urls:t.allow_script_urls,allow_unsafe_link_target:t.allow_unsafe_link_target,convert_fonts_to_spans:t.convert_fonts_to_spans,fix_list_elements:t.fix_list_elements,font_size_legacy_values:t.font_size_legacy_values,forced_root_block:t.forced_root_block,forced_root_block_attrs:t.forced_root_block_attrs,padd_empty_with_br:t.padd_empty_with_br,preserve_cdata:t.preserve_cdata,remove_trailing_brs:t.remove_trailing_brs,inline_styles:t.inline_styles,root_name:zI(e),validate:!0,blob_cache:n,images_dataimg_filter:t.images_dataimg_filter})},VI=function(e){var t=e.settings;return Fn(Fn({},HI(e)),jI({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope,element_format:t.element_format,entities:t.entities,entity_encoding:t.entity_encoding,indent:t.indent,indent_after:t.indent_after,indent_before:t.indent_before,block_elements:t.block_elements,boolean_attributes:t.boolean_attributes,custom_elements:t.custom_elements,extended_valid_elements:t.extended_valid_elements,invalid_elements:t.invalid_elements,invalid_styles:t.invalid_styles,move_caret_before_on_enter_elements:t.move_caret_before_on_enter_elements,non_empty_elements:t.non_empty_elements,schema:t.schema,self_closing_elements:t.self_closing_elements,short_ended_elements:t.short_ended_elements,special:t.special,text_block_elements:t.text_block_elements,text_inline_elements:t.text_inline_elements,valid_children:t.valid_children,valid_classes:t.valid_classes,valid_elements:t.valid_elements,valid_styles:t.valid_styles,verify_html:t.verify_html,whitespace_elements:t.whitespace_elements}))},qI=function(e){var t=oT(HI(e),e.schema);return t.addAttributeFilter("src,href,style,tabindex",function(t,n){for(var r,o,i=t.length,a=e.dom,u="data-mce-"+n;i--;)if(r=t[i],o=r.attr(n),o&&!r.attr(u)){if(0===o.indexOf("data:")||0===o.indexOf("blob:"))continue;"style"===n?(o=a.serializeStyle(a.parseStyle(o),r.name),o.length||(o=null),r.attr(u,o),r.attr(n,o)):"tabindex"===n?(r.attr(u,o),r.attr(n,null)):r.attr(u,e.convertURL(o,n,r.name))}}),t.addNodeFilter("script",function(e){for(var t=e.length;t--;){var n=e[t],r=n.attr("type")||"no/type";0!==r.indexOf("mce-")&&n.attr("type","mce-"+r)}}),e.settings.preserve_cdata&&t.addNodeFilter("#cdata",function(t){for(var n=t.length;n--;){var r=t[n];r.type=8,r.name="#comment",r.value="[CDATA["+e.dom.encode(r.value)+"]]"}}),t.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(t){for(var n=t.length,r=e.schema.getNonEmptyElements();n--;){var o=t[n];o.isEmpty(r)&&0===o.getAll("br").length&&(o.append(new Qh("br",1)).shortEnded=!0)}}),t},$I=function(e){e.settings.auto_focus&&vs.setEditorTimeout(e,function(){var t;t=e.settings.auto_focus===!0?e:e.editorManager.get(e.settings.auto_focus),t.destroyed||t.focus()},100)},WI=function(e){var t=e.dom.getRoot();e.inline||Lh(e)&&e.selection.getStart(!0)!==t||mp(t).each(function(t){var n=t.getNode(),r=Pi(n)?mp(n).getOr(t):t;Hr.browser.isIE()?DC(e,r.toRange()):e.selection.setRng(r.toRange())})},KI=function(e){e.bindPendingEventDelegates(),e.initialized=!0,qN(e),e.focus(!0),WI(e),e.nodeChanged({initial:!0}),e.execCallback("init_instance_callback",e),$I(e)},XI=function(e){return e.inline?FI.styleSheetLoader:e.dom.styleSheetLoader},YI=function(e,t){var n=e.settings,r=e.getDoc(),o=e.getBody();n.browser_spellcheck||n.gecko_spellcheck||(r.body.spellcheck=!1,FI.setAttrib(o,"spellcheck","false")),e.quirks=MI(e),VN(e);var i=wm(e);if(void 0!==i&&(o.dir=i),n.protect&&e.on("BeforeSetContent",function(e){to.each(n.protect,function(t){e.content=e.content.replace(t,function(e){return"<!--mce:protected "+escape(e)+"-->"})})}),e.on("SetContent",function(){e.addVisual(e.getBody())}),t===!1&&e.load({initial:!0,format:"html"}),e.startContent=e.getContent({format:"raw"}),e.on("compositionstart compositionend",function(t){e.composing="compositionstart"===t.type}),e.contentStyles.length>0){var a="";to.each(e.contentStyles,function(e){a+=e+"\r\n"}),e.dom.addStyle(a)}XI(e).loadAll(e.contentCSS,function(){KI(e)},function(){KI(e)}),n.content_style&&UI(e,n.content_style)},GI=function(t,n){var r=t.settings,o=t.getElement(),a=t.getDoc();r.inline||(t.getElement().style.visibility=t.orgVisibility),n||t.inline||(a.open(),a.write(t.iframeHTML),a.close()),t.inline&&(FI.addClass(o,"mce-content-body"),t.contentDocument=a=e.document,t.contentWindow=e.window,t.bodyElement=o,t.contentAreaContainer=o);var u=t.getBody();
u.disabled=!0,t.readonly=!!r.readonly,t.readonly||(t.inline&&"static"===FI.getStyle(u,"position",!0)&&(u.style.position="relative"),u.contentEditable=t.getParam("content_editable_state",!0)),u.disabled=!1,t.editorUpload=xT(t),t.schema=i(r),t.dom=Ts(a,{keep_values:!0,url_converter:t.convertURL,url_converter_scope:t,hex_colors:r.force_hex_style_colors,update_styles:!0,root_element:t.inline?t.getBody():null,collect:function(){return t.inline},schema:t.schema,contentCssCors:gm(t),referrerPolicy:pm(t),onSetAttrib:function(e){t.fire("SetAttrib",e)}}),t.parser=qI(t),t.serializer=vT(VI(t),t),t.selection=__(t.dom,t.getWin(),t.serializer,t),t.annotator=Wh(t),t.formatter=MT(t),t.undoManager=zT(t),t._nodeChangeDispatcher=new GL(t),t._selectionOverrides=II(t),ZT(t),ZL(t),fN(t)||nI(t),YL(t),iR(t),XT(t),HN(t),lN(t).fold(function(){YI(t,!1)},function(e){t.setProgressState(!0),e.then(function(e){t.setProgressState(!1),YI(t,e)})})},JI=Ts.DOM,QI=function(t,n){if(e.document.domain!==e.window.location.hostname&&Hr.browser.isIE()){var r=CT("mce");t[r]=function(){GI(t)};var o='javascript:(function(){document.open();document.domain="'+e.document.domain+'";var ed = window.parent.tinymce.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.'+r+"(true);})()";return JI.setAttrib(n,"src",o),!0}return!1},ZI=function(e,t,n,r){var o=uo.fromTag("iframe");return Ki(o,r),Ki(o,{id:e+"_ifr",frameBorder:"0",allowTransparency:"true",title:t}),cf(o,"tox-edit-area__iframe"),o},eM=function(e){var t=qd(e)+"<html><head>";$d(e)!==e.documentBaseUrl&&(t+='<base href="'+e.documentBaseURI.getURI()+'" />'),t+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';var n=Wd(e),r=Kd(e);return Xd(e)&&(t+='<meta http-equiv="Content-Security-Policy" content="'+Xd(e)+'" />'),t+='</head><body id="'+n+'" class="mce-content-body '+r+'" data-id="'+e.id+'"><br></body></html>'},tM=function(e,t){var n=e.editorManager.translate("Rich Text Area. Press ALT-0 for help."),r=ZI(e.id,n,t.height,Vd(e)).dom();r.onload=function(){r.onload=null,e.fire("load")};var o=QI(e,r);return e.contentAreaContainer=t.iframeContainer,e.iframeElement=r,e.iframeHTML=eM(e),JI.add(t.iframeContainer,r),o},nM=function(e,t){var n=tM(e,t);t.editorContainer&&(JI.get(t.editorContainer).style.display=e.orgDisplay,e.hidden=JI.isHidden(t.editorContainer)),e.getElement().style.display="none",JI.setAttrib(e.id,"aria-hidden","true"),n||GI(e)},rM=Ts.DOM,oM=function(e,t,n){var r=$E.get(n),o=$E.urls[n]||e.documentBaseUrl.replace(/\/$/,"");if(n=to.trim(n),r&&-1===to.inArray(t,n)){if(to.each($E.dependencies(n),function(n){oM(e,t,n)}),e.plugins[n])return;try{var i=new r(e,o,e.$);e.plugins[n]=i,i.init&&(i.init(e,o),t.push(n))}catch(a){nk(e,n,a)}}},iM=function(e){return e.replace(/^\-/,"")},aM=function(e){var t=[];to.each(Wm(e).split(/[ ,]/),function(n){oM(e,t,iM(n))})},uM=function(e){var t=to.trim(cm(e)),n=e.ui.registry.getAll().icons,r=Fn(Fn({},OE.get("default").icons),OE.get(t).icons);vn(r,function(t,r){_n(n,r)||e.ui.registry.addIcon(r,t)})},cM=function(e){var t=Tm(e);if(Bt(t)){e.settings.theme=iM(t);var n=WE.get(t);e.theme=new n(e,WE.urls[t]),e.theme.init&&e.theme.init(e,WE.urls[t]||e.documentBaseUrl.replace(/\/$/,""),e.$)}else e.theme={}},sM=function(e){return e.theme.renderUI()},fM=function(e){var t=e.getElement(),n=Tm(e),r=n(e,t);return r.editorContainer.nodeType&&(r.editorContainer.id=r.editorContainer.id||e.id+"_parent"),r.iframeContainer&&r.iframeContainer.nodeType&&(r.iframeContainer.id=r.iframeContainer.id||e.id+"_iframecontainer"),r.height=r.iframeHeight?r.iframeHeight:t.offsetHeight,r},lM=function(e){return{editorContainer:e,iframeContainer:e}},dM=function(e){var t=rM.create("div");return rM.insertAfter(t,e),lM(t)},mM=function(e){var t=e.getElement();return e.inline?lM(null):dM(t)},gM=function(e){var t=e.getElement();return e.orgDisplay=t.style.display,Bt(Tm(e))?sM(e):Ut(Tm(e))?fM(e):mM(e)},pM=function(e){e.fire("ScriptsLoaded"),uM(e),cM(e),aM(e);var t=gM(e);return e.editorContainer=t.editorContainer?t.editorContainer:null,ak(e),e.inline?GI(e):nM(e,t)},hM=Ts.DOM,vM=function(e){return"-"===e.charAt(0)},yM=function(e,t){var n=hm(t),r=vm(t);if(Gs.hasCode(n)===!1&&"en"!==n){var o=""!==r?r:t.editorManager.baseURL+"/langs/"+n+".js";e.add(o,pt,void 0,function(){tk(t,o,n)})}},bM=function(e,t,n,r){var o=Tm(t);if(Bt(o)){if(!vM(o)&&!WE.urls.hasOwnProperty(o)){var i=Pm(t);i?WE.load(o,t.documentBaseURI.toAbsolute(i)):WE.load(o,"themes/"+o+"/theme"+n+".js")}e.loadQueue(function(){WE.waitFor(o,r)})}else r()},CM=function(e){return Tt.from(sm(e)).filter(function(e){return e.length>0}).map(function(e){return{url:e,name:Tt.none()}})},wM=function(e,t,n){return Tt.from(t).filter(function(e){return e.length>0&&!OE.has(e)}).map(function(t){return{url:e.editorManager.baseURL+"/icons/"+t+"/icons"+n+".js",name:Tt.some(t)}})},xM=function(e,t,n){var r=wM(t,"default",n),o=CM(t).orThunk(function(){return wM(t,cm(t),"")});Yt(il([r,o]),function(n){e.add(n.url,pt,void 0,function(){ek(t,n.url,n.name.getOrUndefined())})})},SM=function(e,t){to.each(Km(e),function(t,n){$E.load(n,t,pt,void 0,function(){ZE(e,t,n)}),e.settings.plugins+=" "+n}),to.each(Wm(e).split(/[ ,]/),function(n){if(n=to.trim(n),n&&!$E.urls[n])if(vM(n)){n=n.substr(1,n.length);var r=$E.dependencies(n);to.each(r,function(n){var r={prefix:"plugins/",resource:n,suffix:"/plugin"+t+".js"},o=$E.createUrl(r,n);$E.load(o.resource,o,pt,void 0,function(){ZE(e,o.prefix+o.resource+o.suffix,o.resource)})})}else{var o={prefix:"plugins/",resource:n,suffix:"/plugin"+t+".js"};$E.load(n,o,pt,void 0,function(){ZE(e,o.prefix+o.resource+o.suffix,n)})}})},NM=function(e,t){var n=Is.ScriptLoader;bM(n,e,t,function(){yM(n,e),xM(n,e,t),SM(e,t),n.loadQueue(function(){e.removed||pM(e)},e,function(){e.removed||pM(e)})})},EM=function(e,t){return bs.forElement(e,{contentCssCors:$m(t),referrerPolicy:pm(t)})},kM=function(t){var n=t.id;Gs.setCode(hm(t));var r=function(){hM.unbind(e.window,"ready",r),t.render()};if(!Eu.Event.domLoaded)return void hM.bind(e.window,"ready",r);if(t.getElement()&&Hr.contentEditable){var o=uo.fromDom(t.getElement()),i=Qi(o);t.on("remove",function(){Gt(o.dom().attributes,function(e){return Ji(o,e.name)}),Ki(o,i)}),t.ui.styleSheetLoader=EM(o,t),Lm(t)?t.inline=!0:(t.orgVisibility=t.getElement().style.visibility,t.getElement().style.visibility="hidden");var a=t.getElement().form||hM.getParent(n,"form");a&&(t.formElement=a,Im(t)&&!Ii(t.getElement())&&(hM.insertAfter(hM.create("input",{type:"hidden",name:n}),n),t.hasHiddenInput=!0),t.formEventDelegate=function(e){t.fire(e.type,e)},hM.bind(a,"submit reset",t.formEventDelegate),t.on("reset",function(){t.resetContent()}),!Mm(t)||a.submit.nodeType||a.submit.length||a._mceOldSubmit||(a._mceOldSubmit=a.submit,a.submit=function(){return t.editorManager.triggerSave(),t.setDirty(!1),a._mceOldSubmit(a)})),t.windowManager=KE(t),t.notificationManager=A(t),Fm(t)&&t.on("GetContent",function(e){e.save&&(e.content=hM.encode(e.content))}),Um(t)&&t.on("submit",function(){t.initialized&&t.save()}),zm(t)&&(t._beforeUnload=function(){!t.initialized||t.destroyed||t.isHidden()||t.save({format:"raw",no_events:!0,set_dirty:!1})},t.editorManager.on("BeforeUnload",t._beforeUnload)),t.editorManager.add(t),NM(t,t.suffix)}},_M=function(e){return Ut(e)?e:yt(!1)},TM=function(e,t,n){for(var r=e.dom(),o=_M(n);r.parentNode;){r=r.parentNode;var i=uo.fromDom(r),a=t(i);if(a.isSome())return a;if(o(i))break}return Tt.none()},RM=function(e,t,n){var r=t(e),o=_M(n);return r.orThunk(function(){return o(e)?Tt.none():TM(e,t,o)})},AM={"font-size":"size","font-family":"face"},DM=function(e,t,n){var r=function(t){return ta(t,e).orThunk(function(){return"font"===go(t)?kn(AM,e).bind(function(e){return Yi(t,e)}):Tt.none()})},o=function(e){return Ao(uo.fromDom(t),e)};return RM(uo.fromDom(n),function(e){return r(e)},o)},OM=function(e){return e.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")},BM=function(e,t){return Tt.from(Ts.DOM.getStyle(t,e,!0))},PM=function(e){return function(t,n){return Tt.from(n).map(uo.fromDom).filter(yo).bind(function(n){return DM(e,t,n.dom()).or(BM(e,n.dom()))}).getOr("")}},LM=PM("font-size"),IM=ht(OM,PM("font-family")),MM=function(e){return mp(e.getBody()).map(function(e){var t=e.container();return Mi(t)?t.parentNode:t})},FM=function(e,t){return e.startContainer===t&&0===e.startOffset},UM=function(e){return Tt.from(e.selection.getRng()).bind(function(t){var n=e.getBody();return FM(t,n)?Tt.none():Tt.from(e.selection.getStart(!0))})},zM=function(e,t){if(/^[0-9\.]+$/.test(t)){var n=parseInt(t,10);if(n>=1&&7>=n){var r=nm(e),o=rm(e);return o?o[n-1]||t:r[n-1]||t}return t}return t},jM=function(e){var t=e.split(/\s*,\s*/);return Xt(t,function(e){return-1===e.indexOf(" ")||br(e,'"')||br(e,"'")?e:"'"+e+"'"}).join(",")},HM=function(e,t){var n=zM(e,t);e.formatter.toggle("fontname",{value:jM(n)}),e.nodeChanged()},VM=function(e){return UM(e).fold(function(){return MM(e).map(function(t){return IM(e.getBody(),t)}).getOr("")},function(t){return IM(e.getBody(),t)})},qM=function(e,t){e.formatter.toggle("fontsize",{value:zM(e,t)}),e.nodeChanged()},$M=function(e){return UM(e).fold(function(){return MM(e).map(function(t){return LM(e.getBody(),t)}).getOr("")},function(t){return LM(e.getBody(),t)})},WM=function(e){var t;return"string"!=typeof e?(t=to.extend({paste:e.paste,data:{paste:e.paste}},e),{content:e.content,details:t}):{content:e,details:{}}},KM=function(e,t){var n=WM(t);AN(e,n.content,n.details)},XM=function(e,t){e.getDoc().execCommand(t,!1,null)},YM=function(e){GB(e)||mB(e,!1)||vB(e,!1)||NB(e,!1)||PO(e,!1)||fb(e)||jO(e)||RB(e,!1)||(XM(e,"Delete"),dO(e))},GM=function(e){mB(e,!0)||vB(e,!0)||NB(e,!0)||PO(e,!0)||fb(e)||jO(e)||RB(e,!0)||XM(e,"ForwardDelete")},JM=to.each,QM=to.map,ZM=to.inArray,eF=function(){function e(e){this.commands={state:{},exec:{},value:{}},this.editor=e,this.setupCommands(e)}return e.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?BC(a.editor):a.editor.focus(),r=a.editor.fire("BeforeExecCommand",{command:e,ui:t,value:n}),r.isDefaultPrevented())return!1;var u=e.toLowerCase();if(o=a.commands.exec[u])return o(u,t,n),a.editor.fire("ExecCommand",{command:e,ui:t,value:n}),!0;if(JM(this.editor.plugins,function(r){return r.execCommand&&r.execCommand(e,t,n)?(a.editor.fire("ExecCommand",{command:e,ui:t,value:n}),i=!0,!1):void 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(c){}return i?(a.editor.fire("ExecCommand",{command:e,ui:t,value:n}),!0):!1}},e.prototype.queryCommandState=function(e){var t;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(e=e.toLowerCase(),t=this.commands.state[e])return t(e);try{return this.editor.getDoc().queryCommandState(e)}catch(n){}return!1}},e.prototype.queryCommandValue=function(e){var t;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(e=e.toLowerCase(),t=this.commands.value[e])return t(e);try{return this.editor.getDoc().queryCommandValue(e)}catch(n){}}},e.prototype.addCommands=function(e,t){var n=this;t=t||"exec",JM(e,function(e,r){JM(r.toLowerCase().split(","),function(r){n.commands[t][r]=e})})},e.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)}},e.prototype.queryCommandSupported=function(e){if(e=e.toLowerCase(),this.commands.exec[e])return!0;try{return this.editor.getDoc().queryCommandSupported(e)}catch(t){}return!1},e.prototype.addQueryStateHandler=function(e,t,n){var r=this;e=e.toLowerCase(),this.commands.state[e]=function(){return t.call(n||r.editor)}},e.prototype.addQueryValueHandler=function(e,t,n){var r=this;e=e.toLowerCase(),this.commands.value[e]=function(){return t.call(n||r.editor)}},e.prototype.hasCustomCommand=function(e){return e=e.toLowerCase(),!!this.commands.exec[e]},e.prototype.execNativeCommand=function(e,t,n){return void 0===t&&(t=!1),void 0===n&&(n=null),this.editor.getDoc().execCommand(e,t,n)},e.prototype.isFormatMatch=function(e){return this.editor.formatter.match(e)},e.prototype.toggleFormat=function(e,t){this.editor.formatter.toggle(e,t?{value:t}:void 0),this.editor.nodeChanged()},e.prototype.storeSelection=function(e){this.selectionBookmark=this.editor.selection.getBookmark(e)},e.prototype.restoreSelection=function(){this.editor.selection.moveToBookmark(this.selectionBookmark)},e.prototype.setupCommands=function(e){var t=this;this.addCommands({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){e.undoManager.add()},"Cut,Copy,Paste":function(n){var r,o=e.getDoc();try{t.execNativeCommand(n)}catch(i){r=!0}if("paste"!==n||o.queryCommandEnabled(n)||(r=!0),r||!o.queryCommandSupported(n)){var a=e.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");Hr.mac&&(a=a.replace(/Ctrl\+/g,"⌘+")),e.notificationManager.open({text:a,type:"error"})}},unlink:function(){if(e.selection.isCollapsed()){var t=e.dom.getParent(e.selection.getStart(),"a");return void(t&&e.dom.remove(t,!0))}e.formatter.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(n){var r=n.substring(7);"full"===r&&(r="justify"),JM("left,center,right,justify".split(","),function(t){r!==t&&e.formatter.remove("align"+t)}),"none"!==r&&t.toggleFormat("align"+r)},"InsertUnorderedList,InsertOrderedList":function(n){var r;t.execNativeCommand(n);var o=e.dom.getParent(e.selection.getNode(),"ol,ul");o&&(r=o.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(r.nodeName)&&(t.storeSelection(),e.dom.split(r,o),t.restoreSelection()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){t.toggleFormat(e)},"ForeColor,HiliteColor":function(e,n,r){t.toggleFormat(e,r)},FontName:function(t,n,r){HM(e,r)},FontSize:function(t,n,r){qM(e,r)},RemoveFormat:function(t){e.formatter.remove(t)},mceBlockQuote:function(){t.toggleFormat("blockquote")},FormatBlock:function(e,n,r){return t.toggleFormat(r||"p")},mceCleanup:function(){var t=e.selection.getBookmark();e.setContent(e.getContent()),e.selection.moveToBookmark(t)},mceRemoveNode:function(n,r,o){var i=o||e.selection.getNode();i!==e.getBody()&&(t.storeSelection(),e.dom.remove(i,!0),t.restoreSelection())},mceSelectNodeDepth:function(t,n,r){var o=0;e.dom.getParent(e.selection.getNode(),function(t){return 1===t.nodeType&&o++===r?(e.selection.select(t),!1):void 0},e.getBody())},mceSelectNode:function(t,n,r){e.selection.select(r)},mceInsertContent:function(t,n,r){KM(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){oL(e,r)},mceToggleFormat:function(e,n,r){t.toggleFormat(r)},mceSetContent:function(t,n,r){e.setContent(r)},"Indent,Outdent":function(t){jB(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){"string"==typeof r&&(r={href:r});var 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=e.dom.getParent(e.selection.getStart(),Hi);if(t){var n=e.dom.createRng();n.selectNodeContents(t),e.selection.setRng(n)}},"delete":function(){YM(e)},forwardDelete:function(){GM(e)},mceNewDocument:function(){e.setContent("")},InsertLineBreak:function(t,n,r){return jP(e,r),!0}});var n=function(t){return function(){var n=e.selection.isCollapsed()?[e.dom.getParent(e.selection.getNode(),e.dom.isBlock)]:e.selection.getSelectedBlocks(),r=QM(n,function(n){return!!e.formatter.matchNode(n,t)});return-1!==ZM(r,!0)}};t.addCommands({JustifyLeft:n("alignleft"),JustifyCenter:n("aligncenter"),JustifyRight:n("alignright"),JustifyFull:n("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return t.isFormatMatch(e)},mceBlockQuote:function(){return t.isFormatMatch("blockquote")},Outdent:function(){return MB(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"),t.addCommands({Undo:function(){e.undoManager.undo()},Redo:function(){e.undoManager.redo()}}),t.addQueryValueHandler("FontName",function(){return VM(e)},this),t.addQueryValueHandler("FontSize",function(){return $M(e)},this)},e}(),tF="data-mce-contenteditable",nF=function(e,t,n){lf(e,t)&&n===!1?ff(e,t):n&&cf(e,t)},rF=function(e,t,n){try{e.getDoc().execCommand(t,!1,n)}catch(r){}},oF=function(e,t){e.dom().contentEditable=t?"true":"false"},iF=function(e){Yt(mf(e,'*[contenteditable="true"]'),function(e){Wi(e,tF,"true"),oF(e,!1)})},aF=function(e){Yt(mf(e,"*["+tF+'="true"]'),function(e){Ji(e,tF),oF(e,!0)})},uF=function(e){Tt.from(e.selection.getNode()).each(function(e){e.removeAttribute("data-mce-selected")})},cF=function(e){e.selection.setRng(e.selection.getRng())},sF=function(e,t){var n=uo.fromDom(e.getBody());nF(n,"mce-content-readonly",t),t?(e.selection.controlSelection.hideResizeRect(),e._selectionOverrides.hideFakeCaret(),uF(e),e.readonly=!0,oF(n,!1),iF(n)):(e.readonly=!1,oF(n,!0),aF(n),rF(e,"StyleWithCSS",!1),rF(e,"enableInlineTableEditing",!1),rF(e,"enableObjectResizing",!1),aw(e)&&e.focus(),cF(e),e.nodeChanged())},fF=function(e){return e.readonly},lF=function(e){e.parser.addAttributeFilter("contenteditable",function(t){fF(e)&&Yt(t,function(e){e.attr(tF,e.attr("contenteditable")),e.attr("contenteditable","false")})}),e.serializer.addAttributeFilter(tF,function(t){fF(e)&&Yt(t,function(e){e.attr("contenteditable",e.attr(tF))})}),e.serializer.addTempAttr(tF)},dF=function(e){e.serializer?lF(e):e.on("PreInit",function(){lF(e)})},mF=function(e){return"click"===e.type},gF=function(e,t){return null!==e.dom.getParent(t,"a")},pF=function(e,t){var n=t.target;mF(t)&&!y_.metaKeyPressed(t)&&gF(e,n)&&t.preventDefault()},hF=function(e){e.on("ShowCaret",function(t){fF(e)&&t.preventDefault()}),e.on("ObjectSelected",function(t){fF(e)&&t.preventDefault()})},vF=to.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"," "),yF=function(){function e(e){this.bindings={},this.settings=e||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||xt}return e.isNative=function(e){return!!vF[e.toLowerCase()]},e.prototype.fire=function(e,t){e=e.toLowerCase(),t=t||{},t.type=e,t.target||(t.target=this.scope),t.preventDefault||(t.preventDefault=function(){t.isDefaultPrevented=St},t.stopPropagation=function(){t.isPropagationStopped=St},t.stopImmediatePropagation=function(){t.isImmediatePropagationStopped=St},t.isDefaultPrevented=xt,t.isPropagationStopped=xt,t.isImmediatePropagationStopped=xt),this.settings.beforeFire&&this.settings.beforeFire(t);var n=this.bindings[e];if(n)for(var r=0,o=n.length;o>r;r++){var i=n[r];if(i.once&&this.off(e,i.func),t.isImmediatePropagationStopped())return t.stopPropagation(),t;if(i.func.call(this.scope,t)===!1)return t.preventDefault(),t}return t},e.prototype.on=function(e,t,n,r){var o,i,a;if(t===!1&&(t=xt),t){var u={func:t};for(r&&to.extend(u,r),i=e.toLowerCase().split(" "),a=i.length;a--;)e=i[a],o=this.bindings[e],o||(o=this.bindings[e]=[],this.toggleEvent(e,!0)),n?o.unshift(u):o.push(u)}return this},e.prototype.off=function(e,t){var n,r,o,i,a=this;if(e)for(o=e.toLowerCase().split(" "),n=o.length;n--;){if(e=o[n],r=this.bindings[e],!e)return vn(this.bindings,function(e,t){a.toggleEvent(t,!1),delete a.bindings[t]}),this;if(r){if(t)for(i=r.length;i--;)r[i].func===t&&(r=r.slice(0,i).concat(r.slice(i+1)),this.bindings[e]=r);else r.length=0;r.length||(this.toggleEvent(e,!1),delete this.bindings[e])}}else vn(this.bindings,function(e,t){a.toggleEvent(t,!1)}),this.bindings={};return this},e.prototype.once=function(e,t,n){return this.on(e,t,n,{once:!0})},e.prototype.has=function(e){return e=e.toLowerCase(),!(!this.bindings[e]||0===this.bindings[e].length)},e}(),bF=function(e){return e._eventDispatcher||(e._eventDispatcher=new yF({scope:e,toggleEvent:function(t,n){yF.isNative(t)&&e.toggleNativeEvent&&e.toggleNativeEvent(t,n)}})),e._eventDispatcher},CF={fire:function(e,t,n){var r=this;if(r.removed&&"remove"!==e&&"detach"!==e)return t;var o=bF(r).fire(e,t);if(n!==!1&&r.parent)for(var i=r.parent();i&&!o.isPropagationStopped();)i.fire(e,o,!1),i=i.parent();return o},on:function(e,t,n){return bF(this).on(e,t,n)},off:function(e,t){return bF(this).off(e,t)},once:function(e,t){return bF(this).once(e,t)},hasEventListeners:function(e){return bF(this).has(e)}},wF=Ts.DOM,xF=function(e,t){if("selectionchange"===t)return e.getDoc();if(!e.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(t))return e.getDoc().documentElement;var n=km(e);return n?(e.eventRoot||(e.eventRoot=wF.select(n)[0]),e.eventRoot):e.getBody()},SF=function(e){return!e.hidden&&!fF(e)},NF=function(e,t,n){SF(e)?e.fire(t,n):fF(e)&&pF(e,n)},EF=function(e,t){var n;if(e.delegates||(e.delegates={}),!e.delegates[t]&&!e.removed){var r=xF(e,t);if(km(e)){if(RA||(RA={},e.editorManager.on("removeEditor",function(){e.editorManager.activeEditor||RA&&(vn(RA,function(t,n){e.dom.unbind(xF(e,n))}),RA=null)})),RA[t])return;n=function(n){for(var r=n.target,o=e.editorManager.get(),i=o.length;i--;){var a=o[i].getBody();(a===r||wF.isChildOf(r,a))&&NF(o[i],t,n)}},RA[t]=n,wF.bind(r,t,n)}else n=function(n){NF(e,t,n)},wF.bind(r,t,n),e.delegates[t]=n}},kF=Fn(Fn({},CF),{bindPendingEventDelegates:function(){var e=this;to.each(e._pendingNativeEvents,function(t){EF(e,t)})},toggleNativeEvent:function(e,t){var n=this;"focus"!==e&&"blur"!==e&&(t?n.initialized?EF(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&(n.dom.unbind(xF(n,e),e,n.delegates[e]),delete n.delegates[e]))},unbindAllNativeEvents:function(){var e=this,t=e.getBody(),n=e.dom;e.delegates&&(vn(e.delegates,function(t,n){e.dom.unbind(xF(e,n),n,t)}),delete e.delegates),!e.inline&&t&&n&&(t.onload=null,n.unbind(e.getWin()),n.unbind(e.getDoc())),n&&(n.unbind(t),n.unbind(e.getContainer()))}}),_F=["design","readonly"],TF=function(t,n,r,o){var i=r[n.get()],a=r[o];try{a.activate()}catch(u){return void e.console.error("problem while activating editor mode "+o+":",u)}i.deactivate(),i.editorReadOnly!==a.editorReadOnly&&sF(t,a.editorReadOnly),n.set(o),UN(t,o)},RF=function(e,t,n,r){if(r!==n.get()){if(!_n(t,r))throw new Error("Editor mode '"+r+"' is invalid");e.initialized?TF(e,n,t,r):e.on("init",function(){return TF(e,n,t,r)})}},AF=function(t,n,r){var o;if(Wt(_F,n))throw new Error("Cannot override default mode "+n);return Fn(Fn({},t),(o={},o[n]=Fn(Fn({},r),{deactivate:function(){try{r.deactivate()}catch(t){e.console.error("problem while deactivating editor mode "+n+":",t)}}}),o))},DF=function(e){var t=Ms("design"),n=Ms({design:{activate:pt,deactivate:pt,editorReadOnly:!1},readonly:{activate:pt,deactivate:pt,editorReadOnly:!0}});return dF(e),hF(e),{isReadOnly:function(){return fF(e)},set:function(r){return RF(e,n.get(),t,r)},get:function(){return t.get()},register:function(e,t){n.set(AF(n.get(),e,t))}}},OF=to.each,BF=to.explode,PF={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},LF=to.makeMap("alt,ctrl,shift,meta,access"),IF=function(){function e(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()||(OF(t.shortcuts,function(n){return t.matchShortcut(e,n)?(t.pendingPatterns=n.subpatterns.slice(0),"keydown"===e.type&&t.executeShortcutAction(n),!0):void 0}),t.matchShortcut(e,t.pendingPatterns[0])&&(1===t.pendingPatterns.length&&"keydown"===e.type&&t.executeShortcutAction(t.pendingPatterns[0]),t.pendingPatterns.shift()))})}return e.prototype.add=function(e,t,n,r){var o=this,i=n;return"string"==typeof i?n=function(){o.editor.execCommand(i,!1,null)}:to.isArray(i)&&(n=function(){o.editor.execCommand(i[0],i[1],i[2])}),OF(BF(to.trim(e)),function(e){var i=o.createShortcut(e,t,n,r);o.shortcuts[i.id]=i}),!0},e.prototype.remove=function(e){var t=this.createShortcut(e);return this.shortcuts[t.id]?(delete this.shortcuts[t.id],!0):!1},e.prototype.parseShortcut=function(e){var t,n={};OF(BF(e.toLowerCase(),"+"),function(e){e in LF?n[e]=!0:/^[0-9]{2,}$/.test(e)?n.keyCode=parseInt(e,10):(n.charCode=e.charCodeAt(0),n.keyCode=PF[e]||e.toUpperCase().charCodeAt(0))});var r=[n.keyCode];for(t in LF)n[t]?r.push(t):n[t]=!1;return n.id=r.join(","),n.access&&(n.alt=!0,Hr.mac?n.ctrl=!0:n.shift=!0),n.meta&&(Hr.mac?n.meta=!0:(n.ctrl=!0,n.meta=!1)),n},e.prototype.createShortcut=function(e,t,n,r){var o=to.map(BF(e,">"),this.parseShortcut);return o[o.length-1]=to.extend(o[o.length-1],{func:n,scope:r||this.editor}),to.extend(o[0],{desc:this.editor.translate(t),subpatterns:o.slice(1)})},e.prototype.hasModifier=function(e){return e.altKey||e.ctrlKey||e.metaKey},e.prototype.isFunctionKey=function(e){return"keydown"===e.type&&e.keyCode>=112&&e.keyCode<=123},e.prototype.matchShortcut=function(e,t){return t?t.ctrl!==e.ctrlKey||t.meta!==e.metaKey?!1:t.alt!==e.altKey||t.shift!==e.shiftKey?!1:e.keyCode===t.keyCode||e.charCode&&e.charCode===t.charCode?(e.preventDefault(),!0):!1:!1},e.prototype.executeShortcutAction=function(e){return e.func?e.func.call(e.scope):null},e}(),MF=function(){var e={},t={},n={},r={},o={},i={},a={},u=function(e,t){return function(n,r){return e[n.toLowerCase()]=Fn(Fn({},r),{type:t})}},c=function(e,t){return r[e.toLowerCase()]=t};return{addButton:u(e,"button"),addGroupToolbarButton:u(e,"grouptoolbarbutton"),addToggleButton:u(e,"togglebutton"),addMenuButton:u(e,"menubutton"),addSplitButton:u(e,"splitbutton"),addMenuItem:u(t,"menuitem"),addNestedMenuItem:u(t,"nestedmenuitem"),addToggleMenuItem:u(t,"togglemenuitem"),addAutocompleter:u(n,"autocompleter"),addContextMenu:u(o,"contextmenu"),addContextToolbar:u(i,"contexttoolbar"),addContextForm:u(i,"contextform"),addSidebar:u(a,"sidebar"),addIcon:c,getAll:function(){return{buttons:e,menuItems:t,icons:r,popups:n,contextMenus:o,contextToolbars:i,sidebars:a}}}},FF=function(){var e=MF();return{addAutocompleter:e.addAutocompleter,addButton:e.addButton,addContextForm:e.addContextForm,addContextMenu:e.addContextMenu,addContextToolbar:e.addContextToolbar,addIcon:e.addIcon,addMenuButton:e.addMenuButton,addMenuItem:e.addMenuItem,addNestedMenuItem:e.addNestedMenuItem,addSidebar:e.addSidebar,addSplitButton:e.addSplitButton,addToggleButton:e.addToggleButton,addGroupToolbarButton:e.addGroupToolbarButton,addToggleMenuItem:e.addToggleMenuItem,getAll:e.getAll}},UF=to.each,zF=to.trim,jF="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),HF={ftp:21,http:80,https:443,mailto:25},VF=function(){function t(n,r){n=zF(n),this.settings=r||{};var o=this.settings.base_uri,i=this;if(/^([\w\-]+):([^\/]{2})/i.test(n)||/^\s*#/.test(n))return void(i.source=n);var a=0===n.indexOf("//");if(0!==n.indexOf("/")||a||(n=(o?o.protocol||"http":"http")+"://mce_host"+n),!/^[\w\-]*:?\/\//.test(n)){var u=this.settings.base_uri?this.settings.base_uri.path:new t(e.document.location.href).directory;if(this.settings.base_uri&&""==this.settings.base_uri.protocol)n="//mce_host"+i.toAbsPath(u,n);else{var c=/([^#?]*)([#?]?.*)/.exec(n);n=(o&&o.protocol||"http")+"://mce_host"+i.toAbsPath(u,c[1])+c[2]}}n=n.replace(/@@/g,"(mce_at)");var s=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(n);UF(jF,function(e,t){var n=s[t];n&&(n=n.replace(/\(mce_at\)/g,"@@")),i[e]=n}),o&&(i.protocol||(i.protocol=o.protocol),i.userInfo||(i.userInfo=o.userInfo),i.port||"mce_host"!==i.host||(i.port=o.port),i.host&&"mce_host"!==i.host||(i.host=o.host),i.source=""),a&&(i.protocol="")}return t.parseDataUri=function(e){var t,n=decodeURIComponent(e).split(","),r=/data:([^;]+)/.exec(n[0]);return r&&(t=r[1]),{type:t,data:n[1]}},t.getDocumentBaseUrl=function(e){var t;return t=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?e.href:e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),t},t.prototype.setPath=function(e){var t=/^(.*?)\/?(\w+)?$/.exec(e);this.path=t[0],this.directory=t[1],this.file=t[2],this.source="",this.getURI()},t.prototype.toRelative=function(e){var n;if("./"===e)return e;var r=new t(e,{base_uri:this});if("mce_host"!==r.host&&this.host!==r.host&&r.host||this.port!==r.port||this.protocol!==r.protocol&&""!==r.protocol)return r.getURI();var o=this.getURI(),i=r.getURI();return o===i||"/"===o.charAt(o.length-1)&&o.substr(0,o.length-1)===i?o:(n=this.toRelPath(this.path,r.path),r.query&&(n+="?"+r.query),r.anchor&&(n+="#"+r.anchor),n)},t.prototype.toAbsolute=function(e,n){var r=new t(e,{base_uri:this});return r.getURI(n&&this.isSameOrigin(r))},t.prototype.isSameOrigin=function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=HF[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},t.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;r>n;n++)if(n>=u.length||a[n]!==u[n]){o=n+1;break}if(a.length<u.length)for(n=0,r=u.length;r>n;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);r>n;n++)i+="../";for(n=o-1,r=u.length;r>n;n++)i+=n!==o-1?"/"+u[n]:u[n];return i},t.prototype.toAbsPath=function(e,t){var n,r,o=0,i=[],a=/\/$/.test(t)?"/":"",u=e.split("/"),c=t.split("/");for(UF(u,function(e){e&&i.push(e)}),u=i,n=c.length-1,i=[];n>=0;n--)0!==c[n].length&&"."!==c[n]&&(".."!==c[n]?o>0?o--:i.push(c[n]):o++);return n=u.length-o,r=0>=n?cn(i).join("/"):u.slice(0,n).join("/")+"/"+cn(i).join("/"),0!==r.indexOf("/")&&(r="/"+r),a&&r.lastIndexOf("/")!==r.length-1&&(r+=a),r},t.prototype.getURI=function(e){void 0===e&&(e=!1);var t;return(!this.source||e)&&(t="",e||(t+=this.protocol?this.protocol+"://":"//",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},t}(),qF=Ts.DOM,$F=to.extend,WF=to.each,KF=to.resolve,XF=Hr.ie,YF=function(){function e(e,t,n){var r=this;this.plugins={},this.contentCSS=[],this.contentStyles=[],this.loadedCSS={},this.isNotDirty=!1,this.editorManager=n,this.documentBaseUrl=n.documentBaseURL,$F(this,kF),this.settings=kE(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&&(Is.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy),Ts.DOM.styleSheetLoader._setReferrerPolicy(this.settings.referrer_policy)),Js.languageLoad=this.settings.language_load,Js.baseURL=n.baseURL,this.id=e,this.setDirty(!1),this.documentBaseURI=new VF(this.settings.document_base_url,{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=!!this.settings.inline,this.shortcuts=new IF(this),this.editorCommands=new eF(this),this.settings.cache_suffix&&(Hr.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,"")),this.ui={registry:FF(),styleSheetLoader:void 0};
var o=this,i=DF(o);this.mode=i,this.setMode=i.set,n.fire("SetupEditor",{editor:this}),this.execCallback("setup",this),this.$=zc.overrideDefaults(function(){return{context:r.inline?r.getBody():r.getDoc(),element:r.getBody()}})}return e.prototype.render=function(){kM(this)},e.prototype.focus=function(e){sw(this,e)},e.prototype.hasFocus=function(){return iw(this)},e.prototype.execCallback=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r,o=this,i=o.settings[e];return i?(o.callbackLookup&&(r=o.callbackLookup[e])&&(i=r.func,r=r.scope),"string"==typeof i&&(r=i.replace(/\.\w+$/,""),r=r?KF(r):0,i=KF(i),o.callbackLookup=o.callbackLookup||{},o.callbackLookup[e]={func:i,scope:r}),i.apply(r||o,t)):void 0},e.prototype.translate=function(e){return Gs.translate(e)},e.prototype.getParam=function(e,t,n){return AE(this,e,t,n)},e.prototype.nodeChanged=function(e){this._nodeChangeDispatcher.nodeChanged(e)},e.prototype.addCommand=function(e,t,n){this.editorCommands.addCommand(e,t,n)},e.prototype.addQueryStateHandler=function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},e.prototype.addQueryValueHandler=function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},e.prototype.addShortcut=function(e,t,n,r){this.shortcuts.add(e,t,n,r)},e.prototype.execCommand=function(e,t,n,r){return this.editorCommands.execCommand(e,t,n,r)},e.prototype.queryCommandState=function(e){return this.editorCommands.queryCommandState(e)},e.prototype.queryCommandValue=function(e){return this.editorCommands.queryCommandValue(e)},e.prototype.queryCommandSupported=function(e){return this.editorCommands.queryCommandSupported(e)},e.prototype.show=function(){var e=this;e.hidden&&(e.hidden=!1,e.inline?e.getBody().contentEditable="true":(qF.show(e.getContainer()),qF.hide(e.id)),e.load(),e.fire("show"))},e.prototype.hide=function(){var e=this,t=e.getDoc();e.hidden||(XF&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable="false",e===e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(qF.hide(e.getContainer()),qF.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},e.prototype.isHidden=function(){return!!this.hidden},e.prototype.setProgressState=function(e,t){this.fire("ProgressState",{state:e,time:t})},e.prototype.load=function(e){var t,n=this,r=n.getElement();if(n.removed)return"";if(r){e=e||{},e.load=!0;var o=Ii(r)?r.value:r.innerHTML;return t=n.setContent(o,e),e.element=r,e.no_events||n.fire("LoadContent",e),e.element=r=null,t}},e.prototype.save=function(e){var t,n,r=this,o=r.getElement();return o&&r.initialized&&!r.removed?(e=e||{},e.save=!0,e.element=o,t=e.content=r.getContent(e),e.no_events||r.fire("SaveContent",e),"raw"===e.format&&r.fire("RawSaveContent",e),t=e.content,Ii(o)?o.value=t:((e.is_removing||!r.inline)&&(o.innerHTML=t),(n=qF.getParent(r.id,"form"))&&WF(n.elements,function(e){return e.name===r.id?(e.value=t,!1):void 0})),e.element=o=null,e.set_dirty!==!1&&r.setDirty(!1),t):void 0},e.prototype.setContent=function(e,t){return PN(this,e,t)},e.prototype.getContent=function(e){return BN(this,e)},e.prototype.insertContent=function(e,t){t&&(e=$F({content:e},t)),this.execCommand("mceInsertContent",!1,e)},e.prototype.resetContent=function(e){void 0===e?PN(this,this.startContent,{format:"raw"}):PN(this,e),this.undoManager.reset(),this.setDirty(!1),this.nodeChanged()},e.prototype.isDirty=function(){return!this.isNotDirty},e.prototype.setDirty=function(e){var t=!this.isNotDirty;this.isNotDirty=!e,e&&e!==t&&this.fire("dirty")},e.prototype.getContainer=function(){var e=this;return e.container||(e.container=qF.get(e.editorContainer||e.id+"_parent")),e.container},e.prototype.getContentAreaContainer=function(){return this.contentAreaContainer},e.prototype.getElement=function(){return this.targetElm||(this.targetElm=qF.get(this.id)),this.targetElm},e.prototype.getWin=function(){var e,t=this;return t.contentWindow||(e=t.iframeElement,e&&(t.contentWindow=e.contentWindow)),t.contentWindow},e.prototype.getDoc=function(){var e,t=this;return t.contentDocument||(e=t.getWin(),e&&(t.contentDocument=e.document)),t.contentDocument},e.prototype.getBody=function(){var e=this.getDoc();return this.bodyElement||(e?e.body:null)},e.prototype.convertURL=function(e,t,n){var r=this,o=r.settings;return o.urlconverter_callback?r.execCallback("urlconverter_callback",e,n,!0,t):!o.convert_urls||n&&"LINK"===n.nodeName||0===e.indexOf("file:")||0===e.length?e:o.relative_urls?r.documentBaseURI.toRelative(e):e=r.documentBaseURI.toAbsolute(e,o.remove_script_host)},e.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),WF(o.select("table,a",e),function(e){var i;switch(e.nodeName){case"TABLE":return t=r.visual_table_class||"mce-item-table",i=o.getAttrib(e,"border"),void(i&&"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})},e.prototype.remove=function(){QN(this)},e.prototype.destroy=function(e){ZN(this,e)},e.prototype.uploadImages=function(e){return this.editorUpload.uploadImages(e)},e.prototype._scanForImages=function(){return this.editorUpload.scanForImages()},e.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")},e.prototype.addSidebar=function(){throw new Error("editor.addSidebar has been removed in tinymce 5x, use editor.ui.registry.addSidebar instead")},e.prototype.addMenuItem=function(){throw new Error("editor.addMenuItem has been removed in tinymce 5x, use editor.ui.registry.addMenuItem instead")},e.prototype.addContextToolbar=function(){throw new Error("editor.addContextToolbar has been removed in tinymce 5x, use editor.ui.registry.addContextToolbar instead")},e}(),GF=Ts.DOM,JF=to.explode,QF=to.each,ZF=to.extend,eU=0,tU=!1,nU=[],rU=[],oU=function(e){return"length"!==e},iU=function(e){var t=e.type;QF(fU.get(),function(n){switch(t){case"scroll":n.fire("ScrollWindow",e);break;case"resize":n.fire("ResizeWindow",e)}})},aU=function(e){e!==tU&&(e?zc(window).on("resize scroll",iU):zc(window).off("resize scroll",iU),tU=e)},uU=function(e){var t=rU;delete nU[e.id];for(var n=0;n<nU.length;n++)if(nU[n]===e){nU.splice(n,1);break}return rU=Qt(rU,function(t){return e!==t}),fU.activeEditor===e&&(fU.activeEditor=rU.length>0?rU[0]:null),fU.focusedEditor===e&&(fU.focusedEditor=null),t.length!==rU.length},cU=function(e){return e&&e.initialized&&!(e.getContainer()||e.getBody()).parentNode&&(uU(e),e.unbindAllNativeEvents(),e.destroy(!0),e.removed=!0,e=null),e},sU="CSS1Compat"!==e.document.compatMode,fU=Fn(Fn({},CF),{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:zc,majorVersion:"5",minorVersion:"4.1",releaseDate:"2020-07-08",editors:nU,i18n:Gs,activeEditor:null,focusedEditor:null,settings:{},setup:function(){var t,n,r=this,o="";n=VF.getDocumentBaseUrl(e.document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(n)&&(n=n.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(n)||(n+="/"));var i=window.tinymce||window.tinyMCEPreInit;if(i)t=i.base||i.baseURL,o=i.suffix;else{for(var a=e.document.getElementsByTagName("script"),u=0;u<a.length;u++){var c=a[u].src||"";if(""!==c){var s=c.substring(c.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(c)){-1!==s.indexOf(".min")&&(o=".min"),t=c.substring(0,c.lastIndexOf("/"));break}}}if(!t&&e.document.currentScript){var c=e.document.currentScript.src;-1!==c.indexOf(".min")&&(o=".min"),t=c.substring(0,c.lastIndexOf("/"))}}r.baseURL=new VF(n).toAbsolute(t),r.documentBaseURL=n,r.baseURI=new VF(r.baseURL),r.suffix=o,YC(r)},overrideDefaults:function(e){var t=e.base_url;t&&this._setBaseUrl(t);var n=e.suffix;e.suffix&&(this.suffix=n),this.defaultSettings=e;var r=e.plugin_base_urls;void 0!==r&&vn(r,function(e,t){Js.PluginManager.urls[t]=e})},init:function(t){var n,r=this,o=to.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=kn(e,"name").filter(function(e){return!GF.get(e)}).getOrThunk(GF.uniqueId),e.setAttribute("id",t)),t},u=function(e){var n=t[e];if(n)return n.apply(r,Array.prototype.slice.call(arguments,2))},c=function(e,t){return t.constructor===RegExp?t.test(e.className):GF.hasClass(e,t)},s=function(t){var n=[];if(Hr.browser.isIE()&&Hr.browser.version.major<11)return rk("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(sU)return rk("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[];if(t.types)return QF(t.types,function(e){n=n.concat(GF.select(e.selector))}),n;if(t.selector)return GF.select(t.selector);if(t.target)return[t.target];switch(t.mode){case"exact":var r=t.elements||"";r.length>0&&QF(JF(r),function(t){var r=GF.get(t);r?n.push(r):QF(e.document.forms,function(e){QF(e.elements,function(e){e.name===t&&(t="mce_editor_"+eU++,GF.setAttrib(e,"id",t),n.push(e))})})});break;case"textareas":case"specific_textareas":QF(GF.select("textarea"),function(e){t.editor_deselector&&c(e,t.editor_deselector)||(!t.editor_selector||c(e,t.editor_selector))&&n.push(e)})}return n},f=function(e){n=e},l=function(){var e,n=0,o=[],c=function(t,i,a){var u=new YF(t,i,r);o.push(u),u.on("init",function(){++n===e.length&&f(o)}),u.targetElm=u.targetElm||a,u.render()};return GF.unbind(window,"ready",l),u("onpageload"),e=zc.unique(s(t)),t.types?void QF(t.types,function(n){to.each(e,function(e){return GF.is(e,n.selector)?(c(a(e),ZF({},t,n),e),!1):!0})}):(to.each(e,function(e){cU(r.get(e.id))}),e=to.grep(e,function(e){return!r.get(e.id)}),void(0===e.length?f([]):QF(e,function(e){i(t,e)?rk("Could not initialize inline editor on invalid inline target element",e):c(a(e),t,e)})))};return r.settings=t,GF.bind(window,"ready",l),new fs(function(e){n?e(n):f=function(t){e(t)}})},get:function(e){return 0===arguments.length?rU.slice(0):Bt(e)?nn(rU,function(t){return t.id===e}).getOr(null):zt(e)&&rU[e]?rU[e]:null},add:function(e){var t=this,n=nU[e.id];return n===e?e:(null===t.get(e.id)&&(oU(e.id)&&(nU[e.id]=e),nU.push(e),rU.push(e)),aU(!0),t.activeEditor=e,t.fire("AddEditor",{editor:e}),AA||(AA=function(e){var n=t.fire("BeforeUnload");return n.returnValue?(e.preventDefault(),e.returnValue=n.returnValue,n.returnValue):void 0},window.addEventListener("beforeunload",AA)),e)},createEditor:function(e,t){return this.add(new YF(e,t,this))},remove:function(e){var t,n,r=this;if(e)return Bt(e)?void QF(GF.select(e),function(e){n=r.get(e.id),n&&r.remove(n)}):(n=e,It(r.get(n.id))?null:(uU(n)&&r.fire("RemoveEditor",{editor:n}),0===rU.length&&window.removeEventListener("beforeunload",AA),n.remove(),aU(rU.length>0),n));for(t=rU.length-1;t>=0;t--)r.remove(rU[t])},execCommand:function(e,t,n){var r=this,o=r.get(n);switch(e){case"mceAddEditor":return r.get(n)||new YF(n,r.settings,r).render(),!0;case"mceRemoveEditor":return o&&o.remove(),!0;case"mceToggleEditor":return o?(o.isHidden()?o.show():o.hide(),!0):(r.execCommand("mceAddEditor",0,n),!0)}return r.activeEditor?r.activeEditor.execCommand(e,t,n):!1},triggerSave:function(){QF(rU,function(e){e.save()})},addI18n:function(e,t){Gs.add(e,t)},translate:function(e){return Gs.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 VF(this.documentBaseURL).toAbsolute(e.replace(/\/+$/,"")),this.baseURI=new VF(this.baseURL)}});fU.setup(),function(e){e.compareRanges=Gk,e.getCaretRangeFromPoint=jk,e.getSelectedNode=vl,e.getNode=yl}(U||(U={}));var lU,dU,mU=U,gU=function(t,n,r){void 0===r&&(r=1e3);var o=!1,i=null,a=function(t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];o||(o=!0,null!==i&&(e.clearTimeout(i),i=null),t.apply(null,n))}},u=a(t),c=a(n),s=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];o||null!==i||(i=e.setTimeout(function(){return c.apply(null,t)},r))};return{start:s,resolve:u,reject:c}},pU=function(){var e={},t={},n=function(n,r){var o='Script at URL "'+r+'" failed to load',i='Script at URL "'+r+"\" did not call `tinymce.Resource.add('"+n+"', data)` within 1 second";if(void 0!==e[n])return e[n];var a=new fs(function(e,a){var u=gU(e,a);t[n]=u.resolve,Is.ScriptLoader.loadScript(r,function(){return u.start(i)},function(){return u.reject(o)})});return e[n]=a,a},r=function(n,r){void 0!==t[n]&&(t[n](r),delete t[n]),e[n]=fs.resolve(r)};return{load:n,add:r}},hU=pU(),vU=Math.min,yU=Math.max,bU=Math.round,CU=function(e,t,n){var r=t.x,o=t.y,i=e.w,a=e.h,u=t.w,c=t.h;return n=(n||"").split(""),"b"===n[0]&&(o+=c),"r"===n[1]&&(r+=u),"c"===n[0]&&(o+=bU(c/2)),"c"===n[1]&&(r+=bU(u/2)),"b"===n[3]&&(o-=a),"r"===n[4]&&(r-=i),"c"===n[3]&&(o-=bU(a/2)),"c"===n[4]&&(r-=bU(i/2)),EU(r,o,i,a)},wU=function(e,t,n,r){var o,i;for(i=0;i<r.length;i++)if(o=CU(e,t,r[i]),o.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},xU=function(e,t,n){return EU(e.x-t,e.y-n,e.w+2*t,e.h+2*n)},SU=function(e,t){var n=yU(e.x,t.x),r=yU(e.y,t.y),o=vU(e.x+e.w,t.x+t.w),i=vU(e.y+e.h,t.y+t.h);return 0>o-n||0>i-r?null:EU(n,r,o-n,i-r)},NU=function(e,t,n){var r=e.x,o=e.y,i=e.x+e.w,a=e.y+e.h,u=t.x+t.w,c=t.y+t.h,s=yU(0,t.x-r),f=yU(0,t.y-o),l=yU(0,i-u),d=yU(0,a-c);return r+=s,o+=f,n&&(i+=s,a+=f,r-=l,o-=d),i-=l,a-=d,EU(r,o,i-r,a-o)},EU=function(e,t,n,r){return{x:e,y:t,w:n,h:r}},kU=function(e){return EU(e.left,e.top,e.width,e.height)},_U={inflate:xU,relativePosition:CU,findBestRelativePosition:wU,intersect:SU,clamp:NU,create:EU,fromClientRect:kU},TU=to.each,RU=to.extend,AU=function(){};AU.extend=lU=function(e){var t=this,n=t.prototype,r=function(){var e,t,n,r=this;if(!dU&&(r.init&&r.init.apply(r,arguments),t=r.Mixins))for(e=t.length;e--;)n=t[e],n.init&&n.init.apply(r,arguments)},o=function(){return this},i=function(e,t){return function(){var r=this,o=r._super;r._super=n[e];var i=t.apply(r,arguments);return r._super=o,i}};dU=!0;var a=new t;return dU=!1,e.Mixins&&(TU(e.Mixins,function(t){for(var n in t)"init"!==n&&(e[n]=t[n])}),n.Mixins&&(e.Mixins=n.Mixins.concat(e.Mixins))),e.Methods&&TU(e.Methods.split(","),function(t){e[t]=o}),e.Properties&&TU(e.Properties.split(","),function(t){var n="_"+t;e[t]=function(e){var t=this;return void 0!==e?(t[n]=e,t):t[n]}}),e.Statics&&TU(e.Statics,function(e,t){r[t]=e}),e.Defaults&&n.Defaults&&(e.Defaults=RU({},n.Defaults,e.Defaults)),vn(e,function(e,t){a[t]="function"==typeof e&&n[t]?i(t,e):e}),r.prototype=a,r.constructor=r,r.extend=lU,r};var DU,OU=Math.min,BU=Math.max,PU=Math.round,LU=function(e){var t={},n=0,r=0,o=0,i=function(e,t,n){var r,o,i;r=0,o=0,i=0,e/=255,t/=255,n/=255;var a=OU(e,OU(t,n)),u=BU(e,BU(t,n));if(a===u)return i=a,{h:0,s:0,v:100*i};var c=e===a?t-n:n===a?e-t:n-e;return r=e===a?3:n===a?1:5,r=60*(r-c/(u-a)),o=(u-a)/u,i=u,{h:PU(r),s:PU(100*o),v:PU(100*i)}},a=function(e,t,i){if(e=(parseInt(e,10)||0)%360,t=parseInt(t,10)/100,i=parseInt(i,10)/100,t=BU(0,OU(t,1)),i=BU(0,OU(i,1)),0===t)return void(n=r=o=PU(255*i));var a=e/60,u=i*t,c=u*(1-Math.abs(a%2-1)),s=i-u;switch(Math.floor(a)){case 0:n=u,r=c,o=0;break;case 1:n=c,r=u,o=0;break;case 2:n=0,r=u,o=c;break;case 3:n=0,r=c,o=u;break;case 4:n=c,r=0,o=u;break;case 5:n=u,r=0,o=c;break;default:n=r=o=0}n=PU(255*(n+s)),r=PU(255*(r+s)),o=PU(255*(o+s))},u=function(){var e=function(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e};return"#"+e(n)+e(r)+e(o)},c=function(){return{r:n,g:r,b:o}},s=function(){return i(n,r,o)},f=function(e){var i;return"object"==typeof e?"r"in e?(n=e.r,r=e.g,o=e.b):"v"in e&&a(e.h,e.s,e.v):(i=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(n=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10)):(i=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(n=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16)):(i=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(n=parseInt(i[1]+i[1],16),r=parseInt(i[2]+i[2],16),o=parseInt(i[3]+i[3],16)),n=0>n?0:n>255?255:n,r=0>r?0:r>255?255:r,o=0>o?0:o>255?255:o,t};return e&&f(e),t.toRgb=c,t.toHsv=s,t.toHex=u,t.parse=f,t},IU=function(e){var t=JSON.stringify(e);return Bt(t)?t.replace(/[\u0080-\uFFFF]/g,function(e){var t=e.charCodeAt(0).toString(16);return"\\u"+"0000".substring(t.length)+t}):t},MU={serialize:IU,parse:function(e){try{return JSON.parse(e)}catch(t){}}},FU={callbacks:{},count:0,send:function(e){var t=this,n=Ts.DOM,r=void 0!==e.count?e.count: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++}},UU=Fn(Fn({},CF),{send:function(t){var n,r=0,o=function(){!t.async||4===n.readyState||r++>1e4?(t.success&&1e4>r&&200===n.status?t.success.call(t.success_scope,""+n.responseText,n,t):t.error&&t.error.call(t.error_scope,r>1e4?"TIMED_OUT":"GENERAL",n,t),n=null):vs.setTimeout(o,10)};if(t.scope=t.scope||this,t.success_scope=t.success_scope||t.scope,t.error_scope=t.error_scope||t.scope,t.async=t.async!==!1,t.data=t.data||"",UU.fire("beforeInitialize",{settings:t}),n=new e.XMLHttpRequest){if(n.overrideMimeType&&n.overrideMimeType(t.content_type),n.open(t.type||(t.data?"POST":"GET"),t.url,t.async),t.crossDomain&&(n.withCredentials=!0),t.content_type&&n.setRequestHeader("Content-Type",t.content_type),t.requestheaders&&to.each(t.requestheaders,function(e){n.setRequestHeader(e.key,e.value)}),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n=UU.fire("beforeSend",{xhr:n,settings:t}).xhr,n.send(t.data),!t.async)return o();vs.setTimeout(o,10)}}}),zU=to.extend,jU=function(){function e(e){this.settings=zU({},e),this.count=0}return e.sendRPC=function(t){return(new e).send(t)},e.prototype.send=function(e){var t=e.error,n=e.success,r=zU(this.settings,e);r.success=function(e,o){e=MU.parse(e),"undefined"==typeof e&&(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=MU.serialize({id:e.id||"c"+this.count++,method:e.method,params:e.params}),r.content_type="application/json",UU.send(r)},e}(),HU=function(){return function(){var e={},t=[],n={getItem:function(t){var n=e[t];return n?n:null},setItem:function(n,r){t.push(n),e[n]=String(r)},key:function(e){return t[e]},removeItem:function(n){t=t.filter(function(e){return e===n}),delete e[n]},clear:function(){t=[],e={}},length:0};return Object.defineProperty(n,"length",{get:function(){return t.length},configurable:!1,enumerable:!1}),n}()};try{var VU="__storage_test__";DU=e.window.localStorage,DU.setItem(VU,VU),DU.removeItem(VU)}catch(sc){DU=HU()}var qU=DU,$U={geom:{Rect:_U},util:{Promise:fs,Delay:vs,Tools:to,VK:y_,URI:VF,Class:AU,EventDispatcher:yF,Observable:CF,I18n:Gs,XHR:UU,JSON:MU,JSONRequest:jU,JSONP:FU,LocalStorage:qU,Color:LU},dom:{EventUtils:Eu,Sizzle:fc,DomQuery:zc,TreeWalker:jc,TextSeeker:Uf,DOMUtils:Ts,ScriptLoader:Is,RangeUtils:mU,Serializer:vT,StyleSheetLoader:x,ControlSelection:x_,BookmarkManager:h_,Selection:__,Event:Eu.Event},html:{Styles:mu,Entities:Ja,Node:Qh,Schema:i,SaxParser:dv,DomParser:oT,Writer:ev,Serializer:tv},Env:Hr,AddOnManager:Js,Annotator:Wh,Formatter:MT,UndoManager:zT,EditorCommands:eF,WindowManager:KE,NotificationManager:A,EditorObservable:kF,Shortcuts:IF,Editor:YF,FocusManager:LC,EditorManager:fU,DOM:Ts.DOM,ScriptLoader:Is.ScriptLoader,PluginManager:Js.PluginManager,ThemeManager:Js.ThemeManager,IconManager:OE,Resource:hU,trim:to.trim,isArray:to.isArray,is:to.is,toArray:to.toArray,makeMap:to.makeMap,each:to.each,map:to.map,grep:to.grep,inArray:to.inArray,extend:to.extend,create:to.create,walk:to.walk,createNS:to.createNS,resolve:to.resolve,explode:to.explode,_addCacheSuffix:to._addCacheSuffix,isOpera:Hr.opera,isWebKit:Hr.webkit,isIE:Hr.ie,isGecko:Hr.gecko,isMac:Hr.mac},WU=to.extend(fU,$U),KU=function(e){if("object"==typeof n)try{n.exports=e}catch(t){}},XU=function(e){window.tinymce=e,window.tinyMCE=e};XU(WU),KU(WU)}(window)});
;/*!node_modules/tinymce/themes/silver/theme.js*/
amis.define("node_modules/tinymce/themes/silver/theme",function(){!function(n){"use strict";function t(n){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var r=t.concat(e);return n.apply(null,r)}}function e(n,t){var e={};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&t.indexOf(o)<0&&(e[o]=n[o]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(n);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(n,o[r])&&(e[o[r]]=n[o[r]]);return e}function o(){for(var n=0,t=0,e=arguments.length;e>t;t++)n+=arguments[t].length;for(var o=Array(n),r=0,t=0;e>t;t++)for(var i=arguments[t],u=0,a=i.length;a>u;u++,r++)o[r]=i[u];return o}function r(n,t){var e=function(t,e){if(!Rt(e)&&!e.match(/^[0-9]+$/))throw new Error(n+".set accepts only positive integer values. Value was "+e);var o=t.dom();Ts(o)&&(o.style[n]=e+"px")},o=function(e){var o=t(e);if(0>=o||null===o){var r=Gs(e,n);return parseFloat(r)||0}return o},r=o,i=function(n,t){return Qt(t,function(t,e){var o=Gs(n,e),r=void 0===o?0:parseInt(o,10);return isNaN(r)?t:t+r},0)},u=function(n,t,e){var o=i(n,e),r=t>o?t-o:0;return r};return{set:e,get:o,getOuter:r,aggregate:i,max:u}}function i(n,t,e,o,r){return n(e,o)?St.some(e):It(r)&&r(e)?St.none():t(e,o,r)}function u(n,t){var e=function(e){if(!n(e))throw new Error("Can only get "+t+" value of a "+t+" node");return o(e).getOr("")},o=function(t){return n(t)?St.from(t.dom().nodeValue):St.none()},r=function(e,o){if(!n(e))throw new Error("Can only set raw "+t+" value of a "+t+" node");e.dom().nodeValue=o};return{get:e,getOption:o,set:r}}function a(n){return void 0!==n.uid}function c(n,t,e){var o=t.backstage,r=function(n){switch(n){case"bc-bc":return RS;case"tc-tc":return IS;case"tc-bc":return fd;case"bc-tc":default:return ld}},i=function(n){Yt(n,function(n){return n.moveTo(0,0)})},u=function(n){n.length>0&&(se(n).each(function(n){return n.moveRel(null,"banner")}),Yt(n,function(t,e){e>0&&t.moveRel(n[e-1].getEl(),"bc-tc")}))},a=function(n){i(n),u(n)},c=function(n,i){var u=!n.closeButton&&n.timeout&&(n.timeout>0||n.timeout<0),a=function(){i(),CS.hide(s)},c=mf(XS.sketch({text:n.text,level:jt(["success","error","warning","warn","info"],n.type)?n.type:void 0,progress:n.progressBar===!0,icon:St.from(n.icon),closeButton:!u,onAction:a,iconProvider:o.shared.providers.icons,translationProvider:o.shared.providers.translate})),s=mf(CS.sketch(ht({dom:{tag:"div",classes:["tox-notifications-container"]},lazySink:t.backstage.shared.getSink,fireDismissalEventInstead:{}},o.shared.header.isPositionedAtTop()?{}:{fireRepositionEventInstead:{}})));return e.add(s),n.timeout>0&&VS.setTimeout(function(){a()},n.timeout),{close:a,moveTo:function(n,t){CS.showAt(s,{anchor:"makeshift",x:n,y:t},gf(c))},moveRel:function(n,e){if("banner"!==e){var o=r(e),i={anchor:"node",root:Hs(),node:St.some(ni.fromDom(n)),layouts:{onRtl:function(){return[o]},onLtr:function(){return[o]}}};CS.showAt(s,i,gf(c))}else CS.showAt(s,t.backstage.shared.anchors.banner(),gf(c))},text:function(n){XS.updateText(c,n)},settings:n,getEl:function(){return c.element().dom()},progressBar:{value:function(n){XS.updateProgress(c,n)}}}},s=function(n){n.close()},f=function(n){return n.settings};return{open:c,close:s,reposition:a,getArgs:f}}function s(n){void 0===n&&(n=10);var t=fT.getItem(lT),e=Tt(t)?JSON.parse(t):[],o=function(t){var e=n-t.length;return 0>e?t.slice(0,n):t},r=o(e),i=function(t){Lt(r,t).each(u),r.unshift(t),r.length>n&&r.pop(),fT.setItem(lT,JSON.stringify(r))},u=function(n){r.splice(n,1)},a=function(){return r.slice(0)};return{add:i,state:a}}function f(n,t){var e=DT(t.colorinput.getColors(),t.colorinput.hasCustomColors()),o=t.colorinput.getColorCols(),r="color",i=PT(Sc("menu-value"),e,function(t){n.onAction({value:t})},o,r,Ak.CLOSE_ON_EXECUTE,function(){return!1},t.shared.providers),u=ht(ht({},i),{markers:qk(r),movement:zT(o,r)});return{type:"widget",data:{value:Sc("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[E_().widget(sS.sketch(u))]}}function l(t,e){var o=null,r=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];o=n.setTimeout(function(){t.apply(null,r),o=null},e)},i=function(){null!==o&&(n.clearTimeout(o),o=null)};return{cancel:i,schedule:r}}function d(){var n={},t=function(t,e,o){Ae(o,function(o,r){var i=void 0!==n[r]?n[r]:{};i[e]=ns(o,t),n[r]=i})},e=function(n,t){return Bc(t).fold(function(){return St.none()},function(e){return n.bind(function(n){return Ne(n,e)}).map(function(n){return FE(t,n)})})},o=function(t){return Ne(n,t).map(function(n){return Pe(n,function(n,t){return IE(t,n)})}).getOr([])},r=function(t,o,r){var i=Ne(n,o);return su(r,function(n){return e(i,n)},t)},i=function(t){Ae(n,function(n){n.hasOwnProperty(t)&&delete n[t]})};return{registerId:t,unregisterId:i,filterByType:o,find:r}}function m(){var n=d(),t={},e=function(n){var t=n.element();return Bc(t).fold(function(){return Tc("uid-",n.element())},function(n){return n})},o=function(n,e){var o=t[e];if(o!==n)throw new Error('The tagId "'+e+'" is already used by: '+hc(o.element())+"\nCannot use it for: "+hc(n.element())+"\nThe conflicting element is"+(Ps(o.element())?" ":" not ")+"already in the DOM");i(n)},r=function(r){var i=e(r);je(t,i)&&o(r,i);var u=[r];n.registerId(u,i,r.events()),t[i]=r},i=function(e){Bc(e.element()).each(function(e){delete t[e],n.unregisterId(e)})},u=function(t){return n.filterByType(t)},a=function(t,e,o){return n.find(t,e,o)},c=function(n){return Ne(t,n)};return{find:a,filter:u,register:r,unregister:i,getById:c}}function g(t,e){return h(n.document.createElement("canvas"),t,e)}function p(n){var t=g(n.width,n.height),e=v(t);return e.drawImage(n,0,0),t}function v(n){return n.getContext("2d")}function h(n,t,e){return n.width=t,n.height=e,n}function b(n){return n.naturalWidth||n.width}function y(n){return n.naturalHeight||n.height}function x(t){return new JF(function(e,o){function r(){c(),e(a)}function i(){c(),o("Unable to load data of type "+t.type+": "+u)}var u=n.URL.createObjectURL(t),a=new n.Image,c=function(){a.removeEventListener("load",r),a.removeEventListener("error",i)};a.addEventListener("load",r),a.addEventListener("error",i),a.src=u,a.complete&&r()})}function w(t){var e=t.split(","),o=/data:([^;]+)/.exec(e[0]);if(!o)return St.none();for(var r=o[1],i=e[1],u=1024,a=n.atob(i),c=a.length,s=Math.ceil(c/u),f=new Array(s),l=0;s>l;++l){for(var d=l*u,m=Math.min(d+u,c),g=new Array(m-d),p=d,v=0;m>p;++v,++p)g[v]=a[p].charCodeAt(0);f[l]=new Uint8Array(g)}return St.some(new n.Blob(f,{type:r}))}function S(n){return new JF(function(t,e){w(n).fold(function(){e("uri is not base64: "+n)},t)})}function k(t,e,o){return e=e||"image/png",n.HTMLCanvasElement.prototype.toBlob?new JF(function(n,r){t.toBlob(function(t){t?n(t):r()},e,o)}):S(t.toDataURL(e,o))}function C(n,t,e){return t=t||"image/png",n.toDataURL(t,e)}function O(n){return x(n).then(function(n){T(n);var t=g(b(n),y(n)),e=v(t);return e.drawImage(n,0,0),t})}function _(t){return new JF(function(e){var o=new n.FileReader;o.onloadend=function(){e(o.result)},o.readAsDataURL(t)})}function T(t){n.URL.revokeObjectURL(t.src)}function E(n,t,e){function o(){return JF.resolve(t)}function r(){return e.split(",")[1]}function i(t,e){return n.then(function(n){return k(n,t,e)})}function u(t,e){return n.then(function(n){return C(n,t,e)})}function a(n,t){return u(n,t).then(function(n){return n.split(",")[1]})}function c(){return n.then(p)}var s=t.type,f=ft(s),l=ft(e);return{getType:f,toBlob:o,toDataURL:l,toBase64:r,toAdjustedBlob:i,toAdjustedDataURL:u,toAdjustedBase64:a,toCanvas:c}}function B(n){return _(n).then(function(t){return E(O(n),n,t)})}function D(n,t){return k(n,t).then(function(t){return E(JF.resolve(n),t,n.toDataURL())})}function A(n,t,e){var o="string"==typeof n?parseFloat(n):n;return o>e?o=e:t>o&&(o=t),o}function M(){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]}function F(n,t){for(var e,o=[],r=new Array(25),i=0;5>i;i++){for(var u=0;5>u;u++)o[u]=t[u+5*i];for(var u=0;5>u;u++){e=0;for(var a=0;5>a;a++)e+=n[u+5*a]*o[a];r[u+5*i]=e}}return r}function I(n,t){var e;return t=A(t,-1,1),t*=100,0>t?e=127+t/100*127:(e=t%1,e=0===e?QF[t]:QF[Math.floor(t)]*(1-e)+QF[Math.floor(t)+1]*e,e=127*e+127),F(n,[e/127,0,0,0,.5*(127-e),0,e/127,0,0,.5*(127-e),0,0,e/127,0,.5*(127-e),0,0,0,1,0,0,0,0,0,1])}function R(n,t){return t=A(255*t,-255,255),F(n,[1,0,0,0,t,0,1,0,0,t,0,0,1,0,t,0,0,0,1,0,0,0,0,0,1])}function V(n,t,e,o){return t=A(t,0,2),e=A(e,0,2),o=A(o,0,2),F(n,[t,0,0,0,0,0,e,0,0,0,0,0,o,0,0,0,0,0,1,0,0,0,0,0,1])}function P(n,t){return n.toCanvas().then(function(e){return H(e,n.getType(),t)})}function H(n,t,e){function o(n,t){for(var e,o,r,i,u=n.data,a=t[0],c=t[1],s=t[2],f=t[3],l=t[4],d=t[5],m=t[6],g=t[7],p=t[8],v=t[9],h=t[10],b=t[11],y=t[12],x=t[13],w=t[14],S=t[15],k=t[16],C=t[17],O=t[18],_=t[19],T=0;T<u.length;T+=4)e=u[T],o=u[T+1],r=u[T+2],i=u[T+3],u[T]=e*a+o*c+r*s+i*f+l,u[T+1]=e*d+o*m+r*g+i*p+v,u[T+2]=e*h+o*b+r*y+i*x+w,u[T+3]=e*S+o*k+r*C+i*O+_;return n}var r=v(n),i=o(r.getImageData(0,0,n.width,n.height),e);return r.putImageData(i,0,0),D(n,t)}function z(n,t){return n.toCanvas().then(function(e){return N(e,n.getType(),t)})}function N(n,t,e){function o(n,t,e){function o(n,t,e){return n>e?n=e:t>n&&(n=t),n}for(var r=Math.round(Math.sqrt(e.length)),i=Math.floor(r/2),u=n.data,a=t.data,c=n.width,s=n.height,f=0;s>f;f++)for(var l=0;c>l;l++){for(var d=0,m=0,g=0,p=0;r>p;p++)for(var v=0;r>v;v++){var h=o(l+v-i,0,c-1),b=o(f+p-i,0,s-1),y=4*(b*c+h),x=e[p*r+v];d+=u[y]*x,m+=u[y+1]*x,g+=u[y+2]*x}var w=4*(f*c+l);a[w]=o(d,0,255),a[w+1]=o(m,0,255),a[w+2]=o(g,0,255)}return t}var r=v(n),i=r.getImageData(0,0,n.width,n.height),u=r.getImageData(0,0,n.width,n.height);return u=o(i,u,e),r.putImageData(u,0,0),D(n,t)}function L(n){var t=function(t,e,o){function r(n,t){for(var e=n.data,o=0;o<e.length;o+=4)e[o]=t[e[o]],e[o+1]=t[e[o+1]],e[o+2]=t[e[o+2]];return n}for(var i=v(t),u=new Array(256),a=0;a<u.length;a++)u[a]=n(a,o);var c=r(i.getImageData(0,0,t.width,t.height),u);return i.putImageData(c,0,0),D(t,e)};return function(n,e){return n.toCanvas().then(function(o){return t(o,n.getType(),e)})}}function j(n){return function(t,e){return P(t,n(M(),e))}}function U(n){return function(t){return P(t,n)}}function W(n){return function(t){return z(t,n)}}function G(n,t,e){var o=b(n),r=y(n),i=t/o,u=e/r,a=!1;(.5>i||i>2)&&(i=.5>i?.5:2,a=!0),(.5>u||u>2)&&(u=.5>u?.5:2,a=!0);var c=X(n,i,u);return a?c.then(function(n){return G(n,t,e)}):c}function X(n,t,e){return new JF(function(o){var r=b(n),i=y(n),u=Math.floor(r*t),a=Math.floor(i*e),c=g(u,a),s=v(c);s.drawImage(n,0,0,r,i,0,0,u,a),o(c)})}function Y(n,t){return n.toCanvas().then(function(e){return q(e,n.getType(),t)})}function q(n,t,e){var o=g(n.width,n.height),r=v(o),i=0,u=0;return e=0>e?360+e:e,(90===e||270===e)&&h(o,o.height,o.width),(90===e||180===e)&&(i=o.width),(270===e||180===e)&&(u=o.height),r.translate(i,u),r.rotate(e*Math.PI/180),r.drawImage(n,0,0),D(o,t)}function K(n,t){return n.toCanvas().then(function(e){return J(e,n.getType(),t)})}function J(n,t,e){var o=g(n.width,n.height),r=v(o);return"v"===e?(r.scale(1,-1),r.drawImage(n,0,-o.height)):(r.scale(-1,1),r.drawImage(n,-o.width,0)),D(o,t)}function $(n,t,e,o,r){return n.toCanvas().then(function(i){return Q(i,n.getType(),t,e,o,r)})}function Q(n,t,e,o,r,i){var u=g(r,i),a=v(u);return a.drawImage(n,-e,-o),D(u,t)}function Z(n,t,e){return n.toCanvas().then(function(o){return G(o,t,e).then(function(t){return D(t,n.getType())})})}function nt(n){var t=Math.max,e=n.documentElement,o=n.body,r=t(e.scrollWidth,o.scrollWidth),i=t(e.clientWidth,o.clientWidth),u=t(e.offsetWidth,o.offsetWidth),a=t(e.scrollHeight,o.scrollHeight),c=t(e.clientHeight,o.clientHeight),s=t(e.offsetHeight,o.offsetHeight);return{width:u>r?i:r,height:s>a?c:a}}function tt(n){var t,e;if(n.changedTouches)for(t="screenX screenY pageX pageY clientX clientY".split(" "),e=0;e<t.length;e++)n[t[e]]=n.changedTouches[0][t[e]]}function et(t,e){var o,r,i,u,a=e.document||n.document;e=e||{};var c=a.getElementById(e.handle||t),s=function(t){var s,d=nt(a);tt(t),t.preventDefault(),r=t.button;var m=c;i=t.screenX,u=t.screenY,s=n.window.getComputedStyle?n.window.getComputedStyle(m,null).getPropertyValue("cursor"):m.runtimeStyle.cursor,o=SR("<div></div>").css({position:"absolute",top:0,left:0,width:d.width,height:d.height,zIndex:2147483647,opacity:1e-4,cursor:s}).appendTo(a.body),SR(a).on("mousemove touchmove",f).on("mouseup touchend",l),e.start(t)},f=function(n){return tt(n),n.button!==r?l(n):(n.deltaX=n.screenX-i,n.deltaY=n.screenY-u,n.preventDefault(),void e.drag(n))},l=function(n){tt(n),SR(a).off("mousemove touchmove",f).off("mouseup touchend",l),o.remove(),e.stop&&e.stop(n)};this.destroy=function(){SR(c).off()},SR(c).on("mousedown touchstart",s)}function ot(){function n(n){var t=i.splice(++u);return i.push(n),{state:n,removed:t}}function t(){return o()?i[--u]:void 0}function e(){return r()?i[++u]:void 0}function o(){return u>0}function r(){return-1!==u&&u<i.length-1}var i=[],u=-1;return{data:i,add:n,undo:t,redo:e,canUndo:o,canRedo:r}}function rt(){vt.add("silver",function(n){var t=qX(n),e=t.uiMothership,o=t.backstage,r=t.renderUI,i=t.getUi;uE.register(n,o.shared);var u=oJ({editor:n,backstage:o});return{renderUI:r,getWindowManagerImpl:ft(u),getNotificationManagerImpl:function(){return c(n,{backstage:o},e)},ui:i()}})}var it,ut=function(){},at=function(n){return function(){return n()}},ct=function(n,t){return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return n(t.apply(null,e))}},st=function(n,t){return function(e){return n(t(e))}},ft=function(n){return function(){return n}},lt=function(n){return n},dt=function(n){return function(t){return!n(t)}},mt=function(n){return function(){throw new Error(n)}},gt=ft(!1),pt=ft(!0),vt=tinymce.util.Tools.resolve("tinymce.ThemeManager"),ht=function(){return ht=Object.assign||function(n){for(var t,e=1,o=arguments.length;o>e;e++){t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},ht.apply(this,arguments)},bt=function(){return yt},yt=function(){var n=function(n){return n.isNone()},t=function(n){return n()},e=function(n){return n},o={fold:function(n){return n()},is:gt,isSome:gt,isNone:pt,getOr:e,getOrThunk:t,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:ft(null),getOrUndefined:ft(void 0),or:e,orThunk:t,map:bt,each:ut,bind:bt,exists:gt,forall:pt,filter:bt,equals:n,equals_:n,toArray:function(){return[]},toString:ft("none()")};return o}(),xt=function(n){var t=ft(n),e=function(){return r},o=function(t){return t(n)},r={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:pt,isNone:gt,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(t){return xt(t(n))},each:function(t){t(n)},bind:o,exists:o,forall:o,filter:function(t){return t(n)?r:yt},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(gt,function(t){return e(n,t)})}};return r},wt=function(n){return null===n||void 0===n?yt:xt(n)},St={some:xt,none:bt,from:wt},kt=function(n){var t=typeof n;return null===n?"null":"object"===t&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":t},Ct=function(n){return function(t){return kt(t)===n}},Ot=function(n){return function(t){return typeof t===n}},_t=function(n){return function(t){return n===t}},Tt=Ct("string"),Et=Ct("object"),Bt=Ct("array"),Dt=Ot("boolean"),At=_t(void 0),Mt=function(n){return null===n||void 0===n},Ft=function(n){return!Mt(n)},It=Ot("function"),Rt=Ot("number"),Vt=function(n,t){if(Bt(n)){for(var e=0,o=n.length;o>e;++e)if(!t(n[e]))return!1;return!0}return!1},Pt=Array.prototype.slice,Ht=Array.prototype.indexOf,zt=Array.prototype.push,Nt=function(n,t){return Ht.call(n,t)},Lt=function(n,t){var e=Nt(n,t);return-1===e?St.none():St.some(e)},jt=function(n,t){return Nt(n,t)>-1},Ut=function(n,t){for(var e=0,o=n.length;o>e;e++){var r=n[e];if(t(r,e))return!0}return!1},Wt=function(n,t){for(var e=[],o=0;n>o;o++)e.push(t(o));return e},Gt=function(n,t){for(var e=[],o=0;o<n.length;o+=t){var r=Pt.call(n,o,o+t);e.push(r)}return e},Xt=function(n,t){for(var e=n.length,o=new Array(e),r=0;e>r;r++){var i=n[r];o[r]=t(i,r)}return o},Yt=function(n,t){for(var e=0,o=n.length;o>e;e++){var r=n[e];t(r,e)}},qt=function(n,t){for(var e=n.length-1;e>=0;e--){var o=n[e];t(o,e)}},Kt=function(n,t){for(var e=[],o=[],r=0,i=n.length;i>r;r++){var u=n[r],a=t(u,r)?e:o;a.push(u)}return{pass:e,fail:o}},Jt=function(n,t){for(var e=[],o=0,r=n.length;r>o;o++){var i=n[o];t(i,o)&&e.push(i)}return e},$t=function(n,t,e){return qt(n,function(n){e=t(e,n)}),e},Qt=function(n,t,e){return Yt(n,function(n){e=t(e,n)}),e},Zt=function(n,t,e){for(var o=0,r=n.length;r>o;o++){var i=n[o];if(t(i,o))return St.some(i);if(e(i,o))break}return St.none()},ne=function(n,t){return Zt(n,t,gt)},te=function(n,t){for(var e=0,o=n.length;o>e;e++){var r=n[e];if(t(r,e))return St.some(e)}return St.none()},ee=function(n){for(var t=[],e=0,o=n.length;o>e;++e){if(!Bt(n[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+n);zt.apply(t,n[e])}return t},oe=function(n,t){return ee(Xt(n,t))},re=function(n,t){for(var e=0,o=n.length;o>e;++e){var r=n[e];if(t(r,e)!==!0)return!1}return!0},ie=function(n){var t=Pt.call(n,0);return t.reverse(),t},ue=function(n,t){return Jt(n,function(n){return!jt(t,n)})},ae=function(n,t){for(var e={},o=0,r=n.length;r>o;o++){var i=n[o];e[String(i)]=t(i,o)}return e},ce=function(n,t){var e=Pt.call(n,0);return e.sort(t),e},se=function(n){return 0===n.length?St.none():St.some(n[0])},fe=function(n){return 0===n.length?St.none():St.some(n[n.length-1])},le=It(Array.from)?Array.from:function(n){return Pt.call(n)},de=function(n,t){for(var e=0;e<n.length;e++){var o=t(n[e],e);if(o.isSome())return o}return St.none()},me=function(n){var t=function(t){return n===t},e=function(){return me(n)},o=function(){return me(n)},r=function(t){return me(t(n))},i=function(){return me(n)},u=function(t){t(n)},a=function(t){return t(n)},c=function(t,e){return e(n)},s=function(t){return t(n)},f=function(t){return t(n)},l=function(){return St.some(n)};return{is:t,isValue:pt,isError:gt,getOr:ft(n),getOrThunk:ft(n),getOrDie:ft(n),or:e,orThunk:o,fold:c,map:r,mapError:i,each:u,bind:a,exists:s,forall:f,toOption:l}},ge=function(n){var t=function(n){return n()},e=function(){return mt(String(n))()},o=function(n){return n},r=function(n){return n()},i=function(){return ge(n)},u=function(t){return ge(t(n))},a=function(){return ge(n)},c=function(t){return t(n)};return{is:gt,isValue:gt,isError:pt,getOr:lt,getOrThunk:t,getOrDie:e,or:o,orThunk:r,fold:c,map:i,mapError:u,each:ut,bind:a,exists:gt,forall:pt,toOption:St.none}},pe=function(n,t){return n.fold(function(){return ge(t)},me)},ve={value:me,error:ge,fromOption:pe};!function(n){n[n.Error=0]="Error",n[n.Value=1]="Value"}(it||(it={}));var he,be=function(n,t,e){return n.stype===it.Error?t(n.serror):e(n.svalue)},ye=function(n){var t=[],e=[];return Yt(n,function(n){be(n,function(n){return e.push(n)},function(n){return t.push(n)})}),{values:t,errors:e}},xe=function(n,t){return n.stype===it.Error?{stype:it.Error,serror:t(n.serror)}:n},we=function(n,t){return n.stype===it.Value?{stype:it.Value,svalue:t(n.svalue)}:n},Se=function(n,t){return n.stype===it.Value?t(n.svalue):n},ke=function(n,t){return n.stype===it.Error?t(n.serror):n},Ce=function(n){return{stype:it.Value,svalue:n}},Oe=function(n){return{stype:it.Error,serror:n}},_e=function(n){return be(n,ve.error,ve.value)},Te=function(n){return n.fold(Oe,Ce)},Ee={fromResult:Te,toResult:_e,svalue:Ce,partition:ye,serror:Oe,bind:Se,bindError:ke,map:we,mapError:xe,fold:be},Be=Object.keys,De=Object.hasOwnProperty,Ae=function(n,t){for(var e=Be(n),o=0,r=e.length;r>o;o++){var i=e[o],u=n[i];t(u,i)}},Me=function(n,t){return Fe(n,function(n,e){return{k:e,v:t(n,e)}})},Fe=function(n,t){var e={};return Ae(n,function(n,o){var r=t(n,o);e[r.k]=r.v}),e},Ie=function(n){return function(t,e){n[e]=t}},Re=function(n,t,e,o){var r={};return Ae(n,function(n,r){(t(n,r)?e:o)(n,r)}),r},Ve=function(n,t){var e={};return Re(n,t,Ie(e),ut),e},Pe=function(n,t){var e=[];return Ae(n,function(n,o){e.push(t(n,o))}),e},He=function(n,t){for(var e=Be(n),o=0,r=e.length;r>o;o++){var i=e[o],u=n[i];if(t(u,i,n))return St.some(u)}return St.none()},ze=function(n){return Pe(n,function(n){return n})},Ne=function(n,t){return Le(n,t)?St.from(n[t]):St.none()},Le=function(n,t){return De.call(n,t)},je=function(n,t){return Le(n,t)&&void 0!==n[t]&&null!==n[t]},Ue=function(t){if(!Bt(t))throw new Error("cases must be an array");if(0===t.length)throw new Error("there must be at least one case");var e=[],o={};return Yt(t,function(r,i){var u=Be(r);if(1!==u.length)throw new Error("one and only one name per case");var a=u[0],c=r[a];if(void 0!==o[a])throw new Error("duplicate key detected:"+a);if("cata"===a)throw new Error("cannot have a case named cata (sorry)");if(!Bt(c))throw new Error("case arguments must be an array");e.push(a),o[a]=function(){var o=arguments.length;if(o!==c.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+c.length+" ("+c+"), got "+o);for(var r=new Array(o),u=0;u<r.length;u++)r[u]=arguments[u];var s=function(n){var t=Be(n);if(e.length!==t.length)throw new Error("Wrong number of arguments to match. Expected: "+e.join(",")+"\nActual: "+t.join(","));var o=re(e,function(n){return jt(t,n)});if(!o)throw new Error("Not all branches were specified when using match. Specified: "+t.join(", ")+"\nRequired: "+e.join(", "));return n[a].apply(null,r)};return{fold:function(){if(arguments.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+arguments.length);var n=arguments[i];return n.apply(null,r)},match:s,log:function(t){n.console.log(t,{constructors:e,constructor:a,params:r})}}}}),o},We={generate:Ue},Ge=Object.prototype.hasOwnProperty,Xe=function(n,t){return t},Ye=function(n,t){var e=Et(n)&&Et(t);return e?Ke(n,t):t},qe=function(n){return function(){for(var t=new Array(arguments.length),e=0;e<t.length;e++)t[e]=arguments[e];if(0===t.length)throw new Error("Can't merge zero objects");for(var o={},r=0;r<t.length;r++){var i=t[r];for(var u in i)Ge.call(i,u)&&(o[u]=n(o[u],i[u]))}return o}},Ke=qe(Ye),Je=qe(Xe),$e=function(n){var t,e=!1;return function(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];return e||(e=!0,t=n.apply(null,o)),t}},Qe=We.generate([{strict:[]},{defaultedThunk:["fallbackThunk"]},{asOption:[]},{asDefaultedOptionThunk:["fallbackThunk"]},{mergeWithThunk:["baseThunk"]}]),Ze=function(n){return Qe.defaultedThunk(ft(n))},no=function(n){return Qe.mergeWithThunk(ft(n))},to=Qe.strict,eo=Qe.asOption,oo=Qe.defaultedThunk,ro=(Qe.asDefaultedOptionThunk,Qe.mergeWithThunk),io=function(n,t){var e={};return Ae(n,function(n,o){jt(t,o)||(e[o]=n)}),e},uo=function(n,t){var e;return e={},e[n]=t,e},ao=function(n){var t={};return Yt(n,function(n){t[n.key]=n.value}),t},co=(We.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]),function(n){var t=[],e=[];return Yt(n,function(n){n.fold(function(n){t.push(n)},function(n){e.push(n)})}),{errors:t,values:e}}),so=function(n,t){return io(n,t)},fo=function(n,t){return uo(n,t)},lo=function(n){return ao(n)},mo=function(n,t){return ve.value(0===n.length?t:Ke(t,Je.apply(void 0,n)))},go=function(n){return ve.error(ee(n))},po=function(n,t){var e=co(n);return e.errors.length>0?go(e.errors):mo(e.values,t)},vo=function(n,t){return Ee.svalue(n.length>0?Ke(t,Je.apply(void 0,n)):t)},ho=function(n){return ct(Ee.serror,ee)(n)},bo=function(n,t){var e=Ee.partition(n);return e.errors.length>0?ho(e.errors):vo(e.values,t)},yo=function(n){var t=Ee.partition(n);return t.errors.length>0?ho(t.errors):Ee.svalue(t.values)},xo={consolidateObj:bo,consolidateArr:yo},wo=function(n){return Et(n)&&Be(n).length>100?" removed due to size":JSON.stringify(n,null,2)},So=function(n){var t=n.length>10?n.slice(0,10).concat([{path:[],getErrorInfo:function(){return"... (only showing first ten failures)"}}]):n;return Xt(t,function(n){return"Failed path: ("+n.path.join(" > ")+")\n"+n.getErrorInfo()})},ko=function(n,t){return Ee.serror([{path:n,getErrorInfo:t}])},Co=function(n,t,e){return ko(n,function(){return'Could not find valid *strict* value for "'+t+'" in '+wo(e)})},Oo=function(n,t){return ko(n,function(){return'Choice schema did not contain choice key: "'+t+'"'})},_o=function(n,t,e){return ko(n,function(){return'The chosen schema: "'+e+'" did not exist in branches: '+wo(t)})},To=function(n,t){return ko(n,function(){return"There are unsupported fields: ["+t.join(", ")+"] specified"})},Eo=function(n,t){return ko(n,function(){return t})},Bo=We.generate([{field:["key","okey","presence","prop"]},{state:["okey","instantiator"]}]),Do=function(n,t,e){return Ne(t,e).fold(function(){return Co(n,e,t)},Ee.svalue)},Ao=function(n,t,e){var o=Ne(n,t).fold(function(){return e(n)},lt);return Ee.svalue(o)},Mo=function(n,t){return Ee.svalue(Ne(n,t))},Fo=function(n,t,e){var o=Ne(n,t).map(function(t){return t===!0?e(n):t});return Ee.svalue(o)},Io=function(n,t,e,o){return e.fold(function(e,r,i,u){var a=function(t){var i=u.extract(n.concat([e]),o,t);return Ee.map(i,function(n){return uo(r,o(n))})},c=function(t){return t.fold(function(){var n=uo(r,o(St.none()));return Ee.svalue(n)},function(t){var i=u.extract(n.concat([e]),o,t);return Ee.map(i,function(n){return uo(r,o(St.some(n)))})})};return function(){return i.fold(function(){return Ee.bind(Do(n,t,e),a)},function(n){return Ee.bind(Ao(t,e,n),a)},function(){return Ee.bind(Mo(t,e),c)},function(n){return Ee.bind(Fo(t,e,n),c)},function(n){var o=n(t),r=Ee.map(Ao(t,e,ft({})),function(n){return Ke(o,n)});return Ee.bind(r,a)})}()},function(n,e){var r=e(t);return Ee.svalue(uo(n,o(r)))})},Ro=function(n,t,e,o){var r=Xt(e,function(e){return Io(n,t,e,o)});return xo.consolidateObj(r,{})},Vo=function(n){var t=function(t,e,o){return n().extract(t,e,o)},e=function(){return n().toString()};return{extract:t,toString:e}},Po=function(n){var t=function(t,e,o){return Ee.bindError(n(o,e),function(n){return Eo(t,n)})},e=function(){return"val"};return{extract:t,toString:e}},Ho=function(n){return Be(Ve(n,function(n){return void 0!==n&&null!==n}))},zo=function(n){var t=No(n),e=$t(n,function(n,t){return t.fold(function(t){return Ke(n,fo(t,!0))},ft(n))},{}),o=function(n,o,r){var i=Dt(r)?[]:Ho(r),u=Jt(i,function(n){return!je(e,n)});return 0===u.length?t.extract(n,o,r):To(n,u)};return{extract:o,toString:t.toString}},No=function(n){var t=function(t,e,o){return Ro(t,o,n,e)},e=function(){var t=Xt(n,function(n){return n.fold(function(n,t,e,o){return n+" -> "+o.toString()},function(n){return"state("+n+")"})});return"obj{\n"+t.join("\n")+"}"};return{extract:t,toString:e}},Lo=function(n){var t=function(t,e,o){var r=Xt(o,function(o,r){return n.extract(t.concat(["["+r+"]"]),e,o)});return xo.consolidateArr(r)},e=function(){return"array("+n.toString()+")"};return{extract:t,toString:e}},jo=function(n){var t=function(t,e,o){for(var r=[],i=0,u=n;i<u.length;i++){var a=u[i],c=a.extract(t,e,o);if(c.stype===it.Value)return c;r.push(c)}return xo.consolidateArr(r)},e=function(){return"oneOf("+Xt(n,function(n){return n.toString()}).join(", ")+")"};return{extract:t,toString:e}},Uo=function(n,t){var e=function(t,e){return Lo(Po(n)).extract(t,lt,e)},o=function(n,o,r){var i=Be(r),u=e(n,i);return Ee.bind(u,function(e){var i=Xt(e,function(n){return Bo.field(n,n,to(),t)});return No(i).extract(n,o,r)})},r=function(){return"setOf("+t.toString()+")"};return{extract:o,toString:r}},Wo=ft(Po(Ee.svalue)),Go=ct(Lo,No),Xo=Bo.state,Yo=Bo.field,qo=function(n,t,e,o,r){var i=Ne(o,r);return i.fold(function(){return _o(n,o,r)},function(o){return o.extract(n.concat(["branch: "+r]),t,e)})},Ko=function(n,t){var e=function(e,o,r){var i=Ne(r,n);return i.fold(function(){return Oo(e,n)},function(n){return qo(e,o,r,t,n)})},o=function(){return"chooseOn("+n+"). Possible values: "+Be(t)};return{extract:e,toString:o}},Jo=Po(Ee.svalue),$o=function(n){return Go(n)},Qo=function(){return Lo(Jo)},Zo=Vo,nr=function(n){return Po(function(t){return n(t).fold(Ee.serror,Ee.svalue)})},tr=function(n,t){return Uo(function(t){return Ee.fromResult(n(t))},t)},er=function(n,t,e,o){var r=t.extract([n],e,o);return Ee.mapError(r,function(n){return{input:o,errors:n}})},or=function(n,t,e){return Ee.toResult(er(n,t,lt,e))},rr=function(n){return n.fold(function(n){throw new Error(ur(n))},lt)},ir=function(n,t,e){return rr(or(n,t,e))},ur=function(n){return"Errors: \n"+So(n.errors).join("\n")+"\n\nInput object: "+wo(n.input)},ar=function(n,t){return Ko(n,t)},cr=function(n,t){return Ko(n,Me(t,No))},sr=ft(Jo),fr=function(n,t){return Po(function(e){var o=typeof e;return n(e)?Ee.svalue(e):Ee.serror("Expected type: "+t+" but got: "+o)})},lr=fr(Rt,"number"),dr=fr(Tt,"string"),mr=fr(Dt,"boolean"),gr=fr(It,"function"),pr=function(n){var t=function(n,t){for(var e=n.next();!e.done;){if(!t(e.value))return!1;e=n.next()}return!0};if(Object(n)!==n)return!0;switch({}.toString.call(n).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(n).every(function(t){return pr(n[t])});case"Map":return t(n.keys(),pr)&&t(n.values(),pr);case"Set":return t(n.keys(),pr);default:return!1}},vr=Po(function(n){return pr(n)?Ee.svalue(n):Ee.serror("Expected value to be acceptable for sending via postMessage")}),hr=function(n){return nr(function(t){return jt(n,t)?ve.value(t):ve.error('Unsupported value: "'+t+'", choose one of "'+n.join(", ")+'".')})},br=function(n){return Yo(n,n,to(),Wo())},yr=function(n,t){return Yo(n,n,to(),t)},xr=function(n){return yr(n,lr)},wr=function(n){return yr(n,dr)},Sr=function(n,t){return Yo(n,n,to(),hr(t))},kr=function(n){return yr(n,mr)},Cr=function(n){return yr(n,gr)},Or=function(n,t){return Yo(n,n,eo(),Po(function(){return Ee.serror("The field: "+n+" is forbidden. "+t)}))},_r=function(n,t){return Yo(n,n,to(),No(t))},Tr=function(n,t){return Yo(n,n,to(),Go(t))},Er=function(n,t){return Yo(n,n,to(),Lo(t))},Br=function(n){return Yo(n,n,eo(),Wo())},Dr=function(n,t){return Yo(n,n,eo(),t)},Ar=function(n){return Dr(n,lr)},Mr=function(n){return Dr(n,dr)},Fr=function(n){return Dr(n,gr)},Ir=function(n,t){return Dr(n,Lo(t))},Rr=function(n,t){return Dr(n,No(t))},Vr=function(n,t){return Dr(n,zo(t))},Pr=function(n,t){return Yo(n,n,Ze(t),Wo())},Hr=function(n,t,e){return Yo(n,n,Ze(t),e)},zr=function(n,t){return Hr(n,t,lr)},Nr=function(n,t){return Hr(n,t,dr)},Lr=function(n,t,e){return Hr(n,t,hr(e))},jr=function(n,t){return Hr(n,t,mr)},Ur=function(n,t){return Hr(n,t,gr)},Wr=function(n,t){return Hr(n,t,vr)},Gr=function(n,t,e){return Hr(n,t,Lo(e))},Xr=function(n,t,e){return Hr(n,t,No(e))},Yr=function(n,t){return Xo(n,t)},qr=function(n){var t=n,e=function(){return t},o=function(n){t=n};return{get:e,set:o}},Kr=function(t,e){var o=e||n.document,r=o.createElement("div");if(r.innerHTML=t,!r.hasChildNodes()||r.childNodes.length>1)throw n.console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return Qr(r.childNodes[0])},Jr=function(t,e){var o=e||n.document,r=o.createElement(t);return Qr(r)},$r=function(t,e){var o=e||n.document,r=o.createTextNode(t);return Qr(r)},Qr=function(n){if(null===n||void 0===n)throw new Error("Node cannot be null or undefined");return{dom:ft(n)}},Zr=function(n,t,e){var o=n.dom();return St.from(o.elementFromPoint(t,e)).map(Qr)},ni={fromHtml:Kr,fromTag:Jr,fromText:$r,fromDom:Qr,fromPoint:Zr},ti=function(n,t,e){return 0!==(n.compareDocumentPosition(t)&e)},ei=function(t,e){return ti(t,e,n.Node.DOCUMENT_POSITION_CONTAINED_BY)
},oi=function(n,t){for(var e=0;e<n.length;e++){var o=n[e];if(o.test(t))return o}return void 0},ri=function(n,t){var e=oi(n,t);if(!e)return{major:0,minor:0};var o=function(n){return Number(t.replace(e,"$"+n))};return ai(o(1),o(2))},ii=function(n,t){var e=String(t).toLowerCase();return 0===n.length?ui():ri(n,e)},ui=function(){return ai(0,0)},ai=function(n,t){return{major:n,minor:t}},ci={nu:ai,detect:ii,unknown:ui},si="Edge",fi="Chrome",li="IE",di="Opera",mi="Firefox",gi="Safari",pi=function(){return vi({current:void 0,version:ci.unknown()})},vi=function(n){var t=n.current,e=n.version,o=function(n){return function(){return t===n}};return{current:t,version:e,isEdge:o(si),isChrome:o(fi),isIE:o(li),isOpera:o(di),isFirefox:o(mi),isSafari:o(gi)}},hi={unknown:pi,nu:vi,edge:ft(si),chrome:ft(fi),ie:ft(li),opera:ft(di),firefox:ft(mi),safari:ft(gi)},bi="Windows",yi="iOS",xi="Android",wi="Linux",Si="OSX",ki="Solaris",Ci="FreeBSD",Oi="ChromeOS",_i=function(){return Ti({current:void 0,version:ci.unknown()})},Ti=function(n){var t=n.current,e=n.version,o=function(n){return function(){return t===n}};return{current:t,version:e,isWindows:o(bi),isiOS:o(yi),isAndroid:o(xi),isOSX:o(Si),isLinux:o(wi),isSolaris:o(ki),isFreeBSD:o(Ci),isChromeOS:o(Oi)}},Ei={unknown:_i,nu:Ti,windows:ft(bi),ios:ft(yi),android:ft(xi),linux:ft(wi),osx:ft(Si),solaris:ft(ki),freebsd:ft(Ci),chromeos:ft(Oi)},Bi=function(n,t,e,o){var r=n.isiOS()&&/ipad/i.test(e)===!0,i=n.isiOS()&&!r,u=n.isiOS()||n.isAndroid(),a=u||o("(pointer:coarse)"),c=r||!i&&u&&o("(min-device-width:768px)"),s=i||u&&!c,f=t.isSafari()&&n.isiOS()&&/safari/i.test(e)===!1,l=!s&&!c&&!f;return{isiPad:ft(r),isiPhone:ft(i),isTablet:ft(c),isPhone:ft(s),isTouch:ft(a),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:ft(f),isDesktop:ft(l)}},Di=function(n,t){var e=String(t).toLowerCase();return ne(n,function(n){return n.search(e)})},Ai=function(n,t){return Di(n,t).map(function(n){var e=ci.detect(n.versionRegexes,t);return{current:n.name,version:e}})},Mi=function(n,t){return Di(n,t).map(function(n){var e=ci.detect(n.versionRegexes,t);return{current:n.name,version:e}})},Fi={detectBrowser:Ai,detectOs:Mi},Ii=function(n,t,e){return""===t||n.length>=t.length&&n.substr(e,e+t.length)===t},Ri=function(n,t){return-1!==n.indexOf(t)},Vi=function(n,t){return Ii(n,t,n.length-t.length)},Pi=function(n){return function(t){return t.replace(n,"")}},Hi=Pi(/^\s+|\s+$/g),zi=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Ni=function(n){return function(t){return Ri(t,n)}},Li=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(n){return Ri(n,"edge/")&&Ri(n,"chrome")&&Ri(n,"safari")&&Ri(n,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,zi],search:function(n){return Ri(n,"chrome")&&!Ri(n,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(n){return Ri(n,"msie")||Ri(n,"trident")}},{name:"Opera",versionRegexes:[zi,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Ni("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Ni("firefox")},{name:"Safari",versionRegexes:[zi,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(n){return(Ri(n,"safari")||Ri(n,"mobile/"))&&Ri(n,"applewebkit")}}],ji=[{name:"Windows",search:Ni("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(n){return Ri(n,"iphone")||Ri(n,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Ni("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Ni("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Ni("linux"),versionRegexes:[]},{name:"Solaris",search:Ni("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Ni("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Ni("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Ui={browsers:ft(Li),oses:ft(ji)},Wi=function(n,t){var e=Ui.browsers(),o=Ui.oses(),r=Fi.detectBrowser(e,n).fold(hi.unknown,hi.nu),i=Fi.detectOs(o,n).fold(Ei.unknown,Ei.nu),u=Bi(i,r,n,t);return{browser:r,os:i,deviceType:u}},Gi={detect:Wi},Xi=function(t){return n.window.matchMedia(t).matches},Yi=$e(function(){return Gi.detect(n.navigator.userAgent,Xi)}),qi=function(){return Yi()},Ki=9,Ji=11,$i=1,Qi=3,Zi=function(n,t){var e=n.dom();if(e.nodeType!==$i)return!1;var o=e;if(void 0!==o.matches)return o.matches(t);if(void 0!==o.msMatchesSelector)return o.msMatchesSelector(t);if(void 0!==o.webkitMatchesSelector)return o.webkitMatchesSelector(t);if(void 0!==o.mozMatchesSelector)return o.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},nu=function(n){return n.nodeType!==$i&&n.nodeType!==Ki&&n.nodeType!==Ji||0===n.childElementCount},tu=function(t,e){var o=void 0===e?n.document:e.dom();return nu(o)?[]:Xt(o.querySelectorAll(t),ni.fromDom)},eu=function(t,e){var o=void 0===e?n.document:e.dom();return nu(o)?St.none():St.from(o.querySelector(t)).map(ni.fromDom)},ou=function(n,t){return n.dom()===t.dom()},ru=function(n,t){var e=n.dom(),o=t.dom();return e===o?!1:e.contains(o)},iu=function(n,t){return ei(n.dom(),t.dom())},uu=function(n,t){return qi().browser.isIE()?iu(n,t):ru(n,t)},au=function(n){return It(n)?n:ft(!1)},cu=function(n,t,e){for(var o=n.dom(),r=au(e);o.parentNode;){o=o.parentNode;var i=ni.fromDom(o),u=t(i);if(u.isSome())return u;if(r(i))break}return St.none()},su=function(n,t,e){var o=t(n),r=au(e);return o.orThunk(function(){return r(n)?St.none():cu(n,t,r)})},fu=function(n,t){return ou(n.element(),t.event().target())},lu=function(n){if(!je(n,"can")&&!je(n,"abort")&&!je(n,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(n,null,2)+" does not have can, abort, or run!");return ir("Extracting event.handler",zo([Pr("can",ft(!0)),Pr("abort",ft(!1)),Pr("run",ut)]),n)},du=function(n,t){return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return Qt(n,function(n,o){return n&&t(o).apply(void 0,e)},!0)}},mu=function(n,t){return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return Qt(n,function(n,o){return n||t(o).apply(void 0,e)},!1)}},gu=function(n){return It(n)?{can:ft(!0),abort:ft(!1),run:n}:n},pu=function(n){var t=du(n,function(n){return n.can}),e=mu(n,function(n){return n.abort}),o=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];Yt(n,function(n){n.run.apply(void 0,t)})};return lu({can:t,abort:e,run:o})},vu=ft("touchstart"),hu=ft("touchmove"),bu=ft("touchend"),yu=ft("touchcancel"),xu=ft("mousedown"),wu=ft("mousemove"),Su=ft("mouseout"),ku=ft("mouseup"),Cu=ft("mouseover"),Ou=ft("focusin"),_u=ft("focusout"),Tu=ft("keydown"),Eu=ft("keyup"),Bu=ft("input"),Du=ft("change"),Au=ft("click"),Mu=ft("transitionend"),Fu=ft("selectstart"),Iu={tap:ft("alloy.tap")},Ru=ft("alloy.focus"),Vu=ft("alloy.blur.post"),Pu=ft("alloy.paste.post"),Hu=ft("alloy.receive"),zu=ft("alloy.execute"),Nu=ft("alloy.focus.item"),Lu=Iu.tap,ju=ft("alloy.longpress"),Uu=ft("alloy.sandbox.close"),Wu=ft("alloy.typeahead.cancel"),Gu=ft("alloy.system.init"),Xu=ft("alloy.system.touchmove"),Yu=ft("alloy.system.touchend"),qu=ft("alloy.system.scroll"),Ku=ft("alloy.system.resize"),Ju=ft("alloy.system.attached"),$u=ft("alloy.system.detached"),Qu=ft("alloy.system.dismissRequested"),Zu=ft("alloy.system.repositionRequested"),na=ft("alloy.focusmanager.shifted"),ta=ft("alloy.slotcontainer.visibility"),ea=ft("alloy.change.tab"),oa=ft("alloy.dismiss.tab"),ra=ft("alloy.highlight"),ia=ft("alloy.dehighlight"),ua=function(n,t){fa(n,n.element(),t,{})},aa=function(n,t,e){fa(n,n.element(),t,e)},ca=function(n){ua(n,zu())},sa=function(n,t,e){fa(n,t,e,{})},fa=function(n,t,e,o){var r=ht({target:t},o);n.getSystem().triggerEvent(e,t,Me(r,ft))},la=function(n,t,e,o){n.getSystem().triggerEvent(e,t,o.event())},da=function(n){return lo(n)},ma=function(n,t){return{key:n,value:lu({abort:t})}},ga=function(n,t){return{key:n,value:lu({can:t})}},pa=function(n){return{key:n,value:lu({run:function(n,t){t.event().prevent()}})}},va=function(n,t){return{key:n,value:lu({run:t})}},ha=function(n,t,e){return{key:n,value:lu({run:function(n,o){t.apply(void 0,[n,o].concat(e))}})}},ba=function(n){return function(t){return va(n,t)}},ya=function(n){return function(t){return{key:n,value:lu({run:function(n,e){fu(n,e)&&t(n,e)}})}}},xa=function(n,t){return va(n,function(e,o){e.getSystem().getByUid(t).each(function(t){la(t,t.element(),n,o)})})},wa=function(n,t,e){var o=t.partUids[e];return xa(n,o)},Sa=function(n,t){return va(n,function(n,e){var o=e.event(),r=n.getSystem().getByDom(o.target()).fold(function(){var t=su(o.target(),function(t){return n.getSystem().getByDom(t).toOption()},ft(!1));return t.getOr(n)},function(n){return n});t(n,r,e)})},ka=function(n){return va(n,function(n,t){t.cut()})},Ca=function(n){return va(n,function(n,t){t.stop()})},Oa=function(n,t){return ya(n)(t)},_a=ya(Ju()),Ta=ya($u()),Ea=ya(Gu()),Ba=ba(zu()),Da=("undefined"!=typeof n.window?n.window:Function("return this;")(),function(n){var t=n.dom().nodeName;return t.toLowerCase()}),Aa=function(n){return n.dom().nodeType},Ma=function(n){return function(t){return Aa(t)===n}},Fa=Ma($i),Ia=Ma(Qi),Ra=Ma(Ki),Va=Ma(Ji),Pa=function(n){return ni.fromDom(n.dom().ownerDocument)},Ha=function(n){return Ra(n)?n:Pa(n)},za=function(n){return ni.fromDom(n.dom().ownerDocument.documentElement)},Na=function(n){return ni.fromDom(n.dom().ownerDocument.defaultView)},La=function(n){return St.from(n.dom().parentNode).map(ni.fromDom)},ja=function(n){return St.from(n.dom().offsetParent).map(ni.fromDom)},Ua=function(n){return St.from(n.dom().nextSibling).map(ni.fromDom)},Wa=function(n){return Xt(n.dom().childNodes,ni.fromDom)},Ga=function(n,t){var e=n.dom().childNodes;return St.from(e[t]).map(ni.fromDom)},Xa=function(n){return Ga(n,0)},Ya=function(n,t){var e=La(n);e.each(function(e){e.dom().insertBefore(t.dom(),n.dom())})},qa=function(n,t){var e=Ua(n);e.fold(function(){var e=La(n);e.each(function(n){Ja(n,t)})},function(n){Ya(n,t)})},Ka=function(n,t){var e=Xa(n);e.fold(function(){Ja(n,t)},function(e){n.dom().insertBefore(t.dom(),e.dom())})},Ja=function(n,t){n.dom().appendChild(t.dom())},$a=function(n,t,e){Ga(n,e).fold(function(){Ja(n,t)},function(n){Ya(n,t)})},Qa=function(n,t){Yt(t,function(t){Ya(n,t)})},Za=function(n,t){Yt(t,function(t){Ja(n,t)})},nc=function(n){n.dom().textContent="",Yt(Wa(n),function(n){tc(n)})},tc=function(n){var t=n.dom();null!==t.parentNode&&t.parentNode.removeChild(t)},ec=function(n){var t=Wa(n);t.length>0&&Qa(n,t),tc(n)},oc=function(t,e){var o=e||n.document,r=o.createElement("div");return r.innerHTML=t,Wa(ni.fromDom(r))},rc=function(n){return n.dom().innerHTML},ic=function(n,t){var e=Pa(n),o=e.dom(),r=ni.fromDom(o.createDocumentFragment()),i=oc(t,o);Za(r,i),nc(n),Ja(n,r)},uc=function(n){var t=ni.fromTag("div"),e=ni.fromDom(n.dom().cloneNode(!0));return Ja(t,e),rc(t)},ac=function(t,e,o){if(!(Tt(o)||Dt(o)||Rt(o)))throw n.console.error("Invalid call to Attr.set. Key ",e,":: Value ",o,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,o+"")},cc=function(n,t,e){ac(n.dom(),t,e)},sc=function(n,t){var e=n.dom();Ae(t,function(n,t){ac(e,t,n)})},fc=function(n,t){var e=n.dom().getAttribute(t);return null===e?void 0:e},lc=function(n,t){return St.from(fc(n,t))},dc=function(n,t){var e=n.dom();return e&&e.hasAttribute?e.hasAttribute(t):!1},mc=function(n,t){n.dom().removeAttribute(t)},gc=function(n,t){return ni.fromDom(n.dom().cloneNode(t))},pc=function(n){return gc(n,!1)},vc=function(n){var t=pc(n);return uc(t)},hc=function(n){return vc(n)},bc=function(n,t,e){return ou(t,n.element())&&!ou(t,e)},yc=da([ga(Ru(),function(t,e){var o=e.event().originator(),r=e.event().target();return bc(t,o,r)?(n.console.warn(Ru()+" did not get interpreted by the desired target. \nOriginator: "+hc(o)+"\nTarget: "+hc(r)+"\nCheck the "+Ru()+" event handlers"),!1):!0})]),xc=Object.freeze({__proto__:null,events:yc}),wc=0,Sc=function(n){var t=new Date,e=t.getTime(),o=Math.floor(1e9*Math.random());return wc++,n+"_"+o+wc+String(e)},kc=ft("alloy-id-"),Cc=ft("data-alloy-id"),Oc=kc(),_c=Cc(),Tc=function(n,t){var e=Sc(Oc+n);return Ec(t,e),e},Ec=function(n,t){Object.defineProperty(n.dom(),_c,{value:t,writable:!0})},Bc=function(n){var t=Fa(n)?n.dom()[_c]:null;return St.from(t)},Dc=function(n){return Sc(n)},Ac=lt,Mc=function(n){var t=function(t){return function(){throw new Error("The component must be in a context to send: "+t+(n?"\n"+hc(n().element())+" is not in context.":""))}};return{debugInfo:ft("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:ft(!1)}},Fc=Mc(),Ic=function(n,t,e){var o=e.toString(),r=o.indexOf(")")+1,i=o.indexOf("("),u=o.substring(i+1,r-1).split(/,\s*/);return n.toFunctionAnnotation=function(){return{name:t,parameters:Rc(u.slice(0,1).concat(u.slice(3)))}},n},Rc=function(n){return Xt(n,function(n){return Vi(n,"/*")?n.substring(0,n.length-"/*".length):n})},Vc=function(n,t){var e=n.toString(),o=e.indexOf(")")+1,r=e.indexOf("("),i=e.substring(r+1,o-1).split(/,\s*/);return n.toFunctionAnnotation=function(){return{name:t,parameters:Rc(i)}},n},Pc=function(n,t){var e=t.toString(),o=e.indexOf(")")+1,r=e.indexOf("("),i=e.substring(r+1,o-1).split(/,\s*/);return n.toFunctionAnnotation=function(){return{name:"OVERRIDE",parameters:Rc(i.slice(1))}},n},Hc=Sc("alloy-premade"),zc=function(n){return fo(Hc,n)},Nc=function(n){return Ne(n,Hc)},Lc=function(n){return Pc(function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return n.apply(void 0,o([t.getApis(),t],e))},n)},jc={init:function(){return Uc({readState:function(){return"No State required"}})}},Uc=function(n){return n},Wc=function(n,t){var e=Xt(t,function(n){return Rr(n.name(),[br("config"),Pr("state",jc)])}),o=or("component.behaviours",No(e),n.behaviours).fold(function(t){throw new Error(ur(t)+"\nComplete spec:\n"+JSON.stringify(n,null,2))},function(n){return n});return{list:t,data:Me(o,function(n){var t=n.map(function(n){return{config:n.config,state:n.state.init(n.config)}});return function(){return t}})}},Gc=function(n){return n.list},Xc=function(n){return n.data},Yc=function(n,t){var e={};return Ae(n,function(n,o){Ae(n,function(n,r){var i=Ne(e,r).getOr([]);e[r]=i.concat([t(o,n)])})}),e},qc=function(n){return{classes:void 0!==n.classes?n.classes:[],attributes:void 0!==n.attributes?n.attributes:{},styles:void 0!==n.styles?n.styles:{}}},Kc=function(n,t){return ht(ht({},n),{attributes:ht(ht({},n.attributes),t.attributes),styles:ht(ht({},n.styles),t.styles),classes:n.classes.concat(t.classes)})},Jc=function(n,t,e,o){var r=ht({},t);Yt(e,function(t){r[t.name()]=t.exhibit(n,o)});var i=Yc(r,function(n,t){return{name:n,modification:t}}),u=function(n){return $t(n,function(n,t){return ht(ht({},t.modification),n)},{})},a=$t(i.classes,function(n,t){return t.modification.concat(n)},[]),c=u(i.attributes),s=u(i.styles);return qc({classes:a,attributes:c,styles:s})},$c=function(n,t,e,o){try{var r=ce(e,function(e,r){var i=e[t](),u=r[t](),a=o.indexOf(i),c=o.indexOf(u);if(-1===a)throw new Error("The ordering for "+n+" does not have an entry for "+i+".\nOrder specified: "+JSON.stringify(o,null,2));if(-1===c)throw new Error("The ordering for "+n+" does not have an entry for "+u+".\nOrder specified: "+JSON.stringify(o,null,2));return c>a?-1:a>c?1:0});return ve.value(r)}catch(i){return ve.error([i])}},Qc=function(n,t){return{handler:n,purpose:ft(t)}},Zc=function(n,t){return{cHandler:n,purpose:ft(t)}},ns=function(n,e){return Zc(t.apply(void 0,[n.handler].concat(e)),n.purpose())},ts=function(n){return n.cHandler},es=function(n,t){return{name:ft(n),handler:ft(t)}},os=function(n,t){var e={};return Yt(n,function(n){e[n.name()]=n.handlers(t)}),e},rs=function(n,t,e){var o=ht(ht({},e),os(t,n));return Yc(o,es)},is=function(n,t,e,o){var r=rs(n,e,o);return ss(r,t)},us=function(n){var t=gu(n);return function(n,e){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];var i=[n,e].concat(o);t.abort.apply(void 0,i)?e.stop():t.can.apply(void 0,i)&&t.run.apply(void 0,i)}},as=function(n,t){return ve.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(Xt(t,function(n){return n.name()}),null,2)])},cs=function(n,t,e){var o=t[e];return o?$c("Event: "+e,"name",n,o).map(function(n){var t=Xt(n,function(n){return n.handler()});return pu(t)}):as(e,n)},ss=function(n,t){var e=Pe(n,function(n,e){var o=1===n.length?ve.value(n[0].handler()):cs(n,t,e);return o.map(function(o){var r=us(o),i=n.length>1?Jt(t[e],function(t){return Ut(n,function(n){return n.name()===t})}).join(" > "):n[0].name();return fo(e,Qc(r,i))})});return po(e,{})},fs=function(n){return or("custom.definition",No([Yo("dom","dom",to(),No([br("tag"),Pr("styles",{}),Pr("classes",[]),Pr("attributes",{}),Br("value"),Br("innerHtml")])),br("components"),br("uid"),Pr("events",{}),Pr("apis",{}),Yo("eventOrder","eventOrder",no({"alloy.execute":["disabling","alloy.base.behaviour","toggling","typeaheadevents"],"alloy.focus":["alloy.base.behaviour","focusing","keying"],"alloy.system.init":["alloy.base.behaviour","disabling","toggling","representing"],input:["alloy.base.behaviour","representing","streaming","invalidating"],"alloy.system.detached":["alloy.base.behaviour","representing","item-events","tooltipping"],mousedown:["focusing","alloy.base.behaviour","item-type-events"],touchstart:["focusing","alloy.base.behaviour","item-type-events"],mouseover:["item-type-events","tooltipping"],"alloy.receive":["receiving","reflecting","tooltipping"]}),sr()),Br("domModification")]),n)},ls=function(n){return ht(ht({},n.dom),{uid:n.uid,domChildren:Xt(n.components,function(n){return n.element()})})},ds=function(n){return n.domModification.fold(function(){return qc({})},qc)},ms=function(n){return n.events},gs=function(n,t){var e=fc(n,t);return void 0===e||""===e?[]:e.split(" ")},ps=function(n,t,e){var o=gs(n,t),r=o.concat([e]);return cc(n,t,r.join(" ")),!0},vs=function(n,t,e){var o=Jt(gs(n,t),function(n){return n!==e});return o.length>0?cc(n,t,o.join(" ")):mc(n,t),!1},hs=function(n){return void 0!==n.dom().classList},bs=function(n){return gs(n,"class")},ys=function(n,t){return ps(n,"class",t)},xs=function(n,t){return vs(n,"class",t)},ws=function(n,t){hs(n)?n.dom().classList.add(t):ys(n,t)},Ss=function(n){var t=hs(n)?n.dom().classList:bs(n);0===t.length&&mc(n,"class")},ks=function(n,t){if(hs(n)){var e=n.dom().classList;e.remove(t)}else xs(n,t);Ss(n)},Cs=function(n,t){return hs(n)&&n.dom().classList.contains(t)},Os=function(n,t){Yt(t,function(t){ws(n,t)})},_s=function(n,t){Yt(t,function(t){ks(n,t)})},Ts=function(n){return void 0!==n.style&&It(n.style.getPropertyValue)},Es=function(n){return Va(n)},Bs=It(n.Element.prototype.attachShadow)&&It(n.Node.prototype.getRootNode),Ds=ft(Bs),As=Bs?function(n){return ni.fromDom(n.dom().getRootNode())}:Ha,Ms=function(n){return Es(n)?n:ni.fromDom(Ha(n).dom().body)},Fs=function(n){var t=As(n);return Es(t)?St.some(t):St.none()},Is=function(n){return ni.fromDom(n.dom().host)},Rs=function(n){if(Ds()&&Ft(n.target)){var t=ni.fromDom(n.target);if(Fa(t)&&Vs(ni.fromDom(n.target))){var e=n;if(e.composed&&e.composedPath){var o=e.composedPath();if(o)return se(o)}}}return St.from(n.target)},Vs=function(n){return Ft(n.dom().shadowRoot)},Ps=function(n){var t=Ia(n)?n.dom().parentNode:n.dom();return void 0===t||null===t||null===t.ownerDocument?!1:Fs(ni.fromDom(t)).fold(function(){return t.ownerDocument.body.contains(t)},st(Ps,Is))},Hs=function(){return zs(ni.fromDom(n.document))},zs=function(n){var t=n.dom().body;if(null===t||void 0===t)throw new Error("Body is not available yet");return ni.fromDom(t)},Ns=function(t,e,o){if(!Tt(o))throw n.console.error("Invalid call to CSS.set. Property ",e,":: Value ",o,":: Element ",t),new Error("CSS value must be a string: "+o);Ts(t)&&t.style.setProperty(e,o)},Ls=function(n,t){Ts(n)&&n.style.removeProperty(t)},js=function(n,t,e){var o=n.dom();Ns(o,t,e)},Us=function(n,t){var e=n.dom();Ae(t,function(n,t){Ns(e,t,n)})},Ws=function(n,t){var e=n.dom();Ae(t,function(n,t){n.fold(function(){Ls(e,t)},function(n){Ns(e,t,n)})})},Gs=function(t,e){var o=t.dom(),r=n.window.getComputedStyle(o),i=r.getPropertyValue(e);return""!==i||Ps(t)?i:Xs(o,e)},Xs=function(n,t){return Ts(n)?n.style.getPropertyValue(t):""},Ys=function(n,t){var e=n.dom(),o=Xs(e,t);return St.from(o).filter(function(n){return n.length>0})},qs=function(n){var t={},e=n.dom();if(Ts(e))for(var o=0;o<e.style.length;o++){var r=e.style.item(o);t[r]=e.style[r]}return t},Ks=function(n,t,e){var o=ni.fromTag(n);js(o,t,e);var r=Ys(o,t);return r.isSome()},Js=function(n,t){var e=n.dom();Ls(e,t),lc(n,"style").map(Hi).is("")&&mc(n,"style")},$s=function(n){return n.dom().offsetWidth},Qs=function(n){return n.dom().value},Zs=function(n,t){if(void 0===t)throw new Error("Value.set was undefined");n.dom().value=t},nf=function(n){var t=ni.fromTag(n.tag);sc(t,n.attributes),Os(t,n.classes),Us(t,n.styles),n.innerHtml.each(function(n){return ic(t,n)});var e=n.domChildren;return Za(t,e),n.value.each(function(n){Zs(t,n)}),!n.uid,Ec(t,n.uid),t},tf=function(n){var t=Ne(n,"behaviours").getOr({}),e=Jt(Be(t),function(n){return void 0!==t[n]});return Xt(e,function(n){return t[n].me})},ef=function(n,t){return Wc(n,t)},of=function(n){var t=tf(n);return ef(n,t)},rf=function(n,t,e){var o=ls(n),r=ds(n),i={"alloy.base.modification":r},u=t.length>0?Jc(e,i,t,o):r;return Kc(o,u)},uf=function(n,t,e){var o={"alloy.base.behaviour":ms(n)};return is(e,n.eventOrder,t,o).getOrDie()},af=function(n){var t=function(){return b},e=qr(Fc),o=rr(fs(n)),r=of(n),i=Gc(r),u=Xc(r),a=rf(o,i,u),c=nf(a),s=uf(o,i,u),f=qr(o.components),l=function(n){e.set(n)},d=function(){e.set(Mc(t))},m=function(){var n=Wa(c),t=oe(n,function(n){return e.get().getByDom(n).fold(function(){return[]},function(n){return[n]})});f.set(t)},g=function(t){var e=u,o=It(e[t.name()])?e[t.name()]:function(){throw new Error("Could not find "+t.name()+" in "+JSON.stringify(n,null,2))};return o()},p=function(n){return It(u[n.name()])},v=function(){return o.apis},h=function(n){return u[n]().map(function(n){return n.state.readState()}).getOr("not enabled")},b={getSystem:e.get,config:g,hasConfigured:p,spec:ft(n),readState:h,getApis:v,connect:l,disconnect:d,element:ft(c),syncComponents:m,components:f.get,events:ft(s)};return b},cf=function(n){var t=Ne(n,"components").getOr([]);return Xt(t,mf)},sf=function(n){var t=Ac(n),o=t.events,r=e(t,["events"]),i=cf(r),u=ht(ht({},r),{events:ht(ht({},xc),o),components:i});return ve.value(af(u))},ff=function(n){var t=ni.fromText(n);return lf({element:t})},lf=function(n){var t=ir("external.component",zo([br("element"),Br("uid")]),n),e=qr(Mc()),o=function(n){e.set(n)},r=function(){e.set(Mc(function(){return i}))};t.uid.each(function(n){Ec(t.element,n)});var i={getSystem:e.get,config:St.none,hasConfigured:ft(!1),connect:o,disconnect:r,getApis:function(){return{}},element:ft(t.element),spec:ft(n),readState:ft("No state"),syncComponents:ut,components:ft([]),events:ft({})};return zc(i)},df=Dc,mf=function(n){return Nc(n).fold(function(){var t=n.hasOwnProperty("uid")?n:ht({uid:df("")},n);return sf(t).getOrDie()},function(n){return n})},gf=zc,pf=r("height",function(n){var t=n.dom();return Ps(n)?t.getBoundingClientRect().height:t.offsetHeight}),vf=function(n){return pf.get(n)},hf=function(n){return pf.getOuter(n)},bf=function(n,t){var e=["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"],o=pf.max(n,t,e);js(n,"max-height",o+"px")},yf=function(n,t){var e=function(e,o){return yf(n+e,t+o)};return{left:ft(n),top:ft(t),translate:e}},xf=yf,wf=function(n){var t=n.getBoundingClientRect();return xf(t.left,t.top)},Sf=function(n,t){return void 0!==n?n:void 0!==t?t:0},kf=function(n){var t=n.dom().ownerDocument,e=t.body,o=t.defaultView,r=t.documentElement;if(e===n.dom())return xf(e.offsetLeft,e.offsetTop);var i=Sf(o.pageYOffset,r.scrollTop),u=Sf(o.pageXOffset,r.scrollLeft),a=Sf(r.clientTop,e.clientTop),c=Sf(r.clientLeft,e.clientLeft);return Cf(n).translate(u-c,i-a)},Cf=function(n){var t=n.dom(),e=t.ownerDocument,o=e.body;return o===t?xf(o.offsetLeft,o.offsetTop):Ps(n)?wf(t):xf(0,0)},Of=r("width",function(n){return n.dom().offsetWidth}),_f=function(n,t){return Of.set(n,t)},Tf=function(n){return Of.get(n)},Ef=function(n){return Of.getOuter(n)},Bf=function(n,t){var e=["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"],o=Of.max(n,t,e);js(n,"max-width",o+"px")},Df=function(n,t,e,o,r,i,u){return{target:ft(n),x:ft(t),y:ft(e),stop:o,prevent:r,kill:i,raw:ft(u)}},Af=function(n){var t=ni.fromDom(Rs(n).getOr(n.target)),e=function(){return n.stopPropagation()},o=function(){return n.preventDefault()},r=ct(o,e);return Df(t,n.clientX,n.clientY,e,o,r,n)},Mf=function(n,t){return function(e){n(e)&&t(Af(e))}},Ff=function(n,e,o,r,i){var u=Mf(o,r);return n.dom().addEventListener(e,u,i),{unbind:t(Vf,n,e,u,i)}},If=function(n,t,e,o){return Ff(n,t,e,o,!1)},Rf=function(n,t,e,o){return Ff(n,t,e,o,!0)},Vf=function(n,t,e,o){n.dom().removeEventListener(t,e,o)},Pf=function(t){var e=void 0!==t?t.dom():n.document,o=e.body.scrollLeft||e.documentElement.scrollLeft,r=e.body.scrollTop||e.documentElement.scrollTop;return xf(o,r)},Hf=function(t,e,o){var r=void 0!==o?o.dom():n.document,i=r.defaultView;i.scrollTo(t,e)},zf=function(t){var e=void 0===t?n.window:t;return St.from(e.visualViewport)},Nf=function(n,t,e,o){return{x:n,y:t,width:e,height:o,right:n+e,bottom:t+o}},Lf=function(t){var e=void 0===t?n.window:t,o=e.document,r=Pf(ni.fromDom(o));return zf(e).fold(function(){var n=e.document.documentElement,t=n.clientWidth,o=n.clientHeight;return Nf(r.left(),r.top(),t,o)},function(n){return Nf(Math.max(n.pageLeft,r.left()),Math.max(n.pageTop,r.top()),n.width,n.height)})},jf=function(n,t){var e=n.view(t);return e.fold(ft([]),function(t){var e=n.owner(t),o=jf(n,e);return[t].concat(o)})},Uf=function(n,t){var e=t.owner(n),o=jf(t,e);return St.some(o)},Wf=function(t){var e=t.dom()===n.document?St.none():St.from(t.dom().defaultView.frameElement);return e.map(ni.fromDom)},Gf=function(n){return Pa(n)},Xf=Object.freeze({__proto__:null,view:Wf,owner:Gf}),Yf=function(e){var o=ni.fromDom(n.document),r=Pf(o),i=Uf(e,Xf);return i.fold(t(kf,e),function(n){var t=Cf(e),o=$t(n,function(n,t){var e=Cf(t);return{left:n.left+e.left(),top:n.top+e.top()}},{left:0,top:0});return xf(o.left+t.left()+r.left(),o.top+t.top()+r.top())})},qf=function(n,t,e){return{point:n,width:t,height:e}},Kf=function(n,t,e,o){return{x:n,y:t,width:e,height:o}},Jf=function(n,t,e,o){return{x:n,y:t,width:e,height:o,right:n+e,bottom:t+o}},$f=function(n){var t=kf(n),e=Ef(n),o=hf(n);return Jf(t.left(),t.top(),e,o)},Qf=function(n){var t=Yf(n),e=Ef(n),o=hf(n);return Jf(t.left(),t.top(),e,o)},Zf=function(){return Lf(n.window)},nl=function(n,t,e){for(var o=n.dom(),r=It(e)?e:ft(!1);o.parentNode;){o=o.parentNode;var i=ni.fromDom(o);if(t(i))return St.some(i);if(r(i))break}return St.none()},tl=function(n,t,e){var o=function(n,t){return t(n)};return i(o,nl,n,t,e)},el=function(n,t){var e=function(n){for(var o=0;o<n.childNodes.length;o++){var r=ni.fromDom(n.childNodes[o]);if(t(r))return St.some(r);var i=e(n.childNodes[o]);if(i.isSome())return i}return St.none()};return e(n.dom())},ol=function(n,t,e){return tl(n,t,e).isSome()},rl=function(n,t,e){return nl(n,function(n){return Zi(n,t)},e)},il=function(n,t){return eu(t,n)},ul=function(n,t,e){var o=function(n,t){return Zi(n,t)};return i(o,rl,n,t,e)},al=function(n){var t=tl(n,function(n){if(!Fa(n))return!1;var t=fc(n,"id");return void 0!==t&&t.indexOf("aria-owns")>-1});return t.bind(function(n){var t=fc(n,"id"),e=Pa(n);return il(e,'[aria-owns="'+t+'"]')})},cl=function(){var n=Sc("aria-owns"),t=function(t){cc(t,"aria-owns",n)},e=function(n){mc(n,"aria-owns")};return{id:n,link:t,unlink:e}},sl=function(n,t){return al(t).exists(function(t){return fl(n,t)})},fl=function(n,t){return ol(t,function(t){return ou(t,n.element())},ft(!1))||sl(n,t)},ll="unknown";!function(n){n[n.STOP=0]="STOP",n[n.NORMAL=1]="NORMAL",n[n.LOGGING=2]="LOGGING"}(he||(he={}));var dl,ml=qr({}),gl=function(t,e){var o=[],r=(new Date).getTime();return{logEventCut:function(n,t,e){o.push({outcome:"cut",target:t,purpose:e})},logEventStopped:function(n,t,e){o.push({outcome:"stopped",target:t,purpose:e})},logNoParent:function(n,t,e){o.push({outcome:"no-parent",target:t,purpose:e})},logEventNoHandlers:function(n,t){o.push({outcome:"no-handlers-left",target:t})},logEventResponse:function(n,t,e){o.push({outcome:"response",purpose:e,target:t})},write:function(){var i=(new Date).getTime();jt(["mousemove","mouseover","mouseout",Gu()],t)||n.console.log(t,{event:t,time:i-r,target:e.dom(),sequence:Xt(o,function(n){return jt(["cut","stopped","response"],n.outcome)?"{"+n.purpose+"} "+n.outcome+" at ("+hc(n.target)+")":n.outcome})})}}},pl=function(n,t,e){var o=Ne(ml.get(),n).orThunk(function(){var t=Be(ml.get());return de(t,function(t){return n.indexOf(t)>-1?St.some(ml.get()[t]):St.none()})}).getOr(he.NORMAL);switch(o){case he.NORMAL:return e(xl());case he.LOGGING:var r=gl(n,t),i=e(r);return r.write(),i;case he.STOP:return!0}},vl=["alloy/data/Fields","alloy/debugging/Debugging"],hl=function(){var n=new Error;if(void 0!==n.stack){var t=n.stack.split("\n");return ne(t,function(n){return n.indexOf("alloy")>0&&!Ut(vl,function(t){return n.indexOf(t)>-1})}).getOr(ll)}return ll},bl={logEventCut:ut,logEventStopped:ut,logNoParent:ut,logEventNoHandlers:ut,logEventResponse:ut,write:ut},yl=function(n,t,e){return pl(n,t,e)},xl=ft(bl),wl=ft([br("menu"),br("selectedMenu")]),Sl=ft([br("item"),br("selectedItem")]),kl=(ft(No(Sl().concat(wl()))),ft(No(Sl()))),Cl=_r("initSize",[br("numColumns"),br("numRows")]),Ol=function(){return yr("markers",kl())},_l=function(){return _r("markers",[br("backgroundMenu")].concat(wl()).concat(Sl()))},Tl=function(n){return _r("markers",Xt(n,br))},El=function(n,t,e){hl();return Yo(t,t,e,nr(function(n){return ve.value(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n.apply(void 0,t)})}))},Bl=function(n){return El("onHandler",n,Ze(ut))},Dl=function(n){return El("onKeyboardHandler",n,Ze(St.none))},Al=function(n){return El("onHandler",n,to())},Ml=function(n){return El("onKeyboardHandler",n,to())},Fl=function(n,t){return Yr(n,ft(t))},Il=function(n){return Yr(n,lt)},Rl=ft(Cl),Vl=function(n,t,e,o,r,i){return{x:ft(n),y:ft(t),bubble:ft(e),direction:ft(o),boundsRestriction:ft(r),label:ft(i)}},Pl=We.generate([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),Hl=function(n,t,e,o,r,i,u,a,c){return n.fold(t,e,o,r,i,u,a,c)},zl=function(n,t,e,o){return n.fold(t,t,o,o,t,o,e,e)},Nl=function(n,t,e,o){return n.fold(t,o,t,o,e,e,t,o)},Ll=Pl.southeast,jl=Pl.southwest,Ul=Pl.northeast,Wl=Pl.northwest,Gl=Pl.south,Xl=Pl.north,Yl=Pl.east,ql=Pl.west,Kl=function(n,t){switch(t){case 1:return n.x;case 0:return n.x+n.width;case 2:return n.y;case 3:return n.y+n.height}},Jl=function(n,t){return ae(["left","right","top","bottom"],function(e){return Ne(t,e).map(function(t){return Kl(n,t)})})},$l=function(n,t,e){var o=function(n,o){var r="top"===n||"bottom"===n?e.top():e.left();return Ne(t,n).bind(lt).bind(function(t){return"left"===n||"top"===n?t>=o?St.some(t):St.none():o>=t?St.some(t):St.none()}).map(function(n){return n+r}).getOr(o)},r=o("left",n.x),i=o("top",n.y),u=o("right",n.right),a=o("bottom",n.bottom);return Jf(r,i,u-r,a-i)},Ql=function(n){return n.x},Zl=function(n,t){return n.x+n.width/2-t.width/2},nd=function(n,t){return n.x+n.width-t.width
},td=function(n,t){return n.y-t.height},ed=function(n){return n.y+n.height},od=function(n,t){return n.y+n.height/2-t.height/2},rd=function(n){return n.x+n.width},id=function(n,t){return n.x-t.width},ud=function(n,t,e){return Vl(Ql(n),ed(n),e.southeast(),Ll(),Jl(n,{left:1,top:3}),"layout-se")},ad=function(n,t,e){return Vl(nd(n,t),ed(n),e.southwest(),jl(),Jl(n,{right:0,top:3}),"layout-sw")},cd=function(n,t,e){return Vl(Ql(n),td(n,t),e.northeast(),Ul(),Jl(n,{left:1,bottom:2}),"layout-ne")},sd=function(n,t,e){return Vl(nd(n,t),td(n,t),e.northwest(),Wl(),Jl(n,{right:0,bottom:2}),"layout-nw")},fd=function(n,t,e){return Vl(Zl(n,t),td(n,t),e.north(),Xl(),Jl(n,{bottom:2}),"layout-n")},ld=function(n,t,e){return Vl(Zl(n,t),ed(n),e.south(),Gl(),Jl(n,{top:3}),"layout-s")},dd=function(n,t,e){return Vl(rd(n),od(n,t),e.east(),Yl(),Jl(n,{left:0}),"layout-e")},md=function(n,t,e){return Vl(id(n,t),od(n,t),e.west(),ql(),Jl(n,{right:1}),"layout-w")},gd=function(){return[ud,ad,cd,sd,ld,fd,dd,md]},pd=function(){return[ad,ud,sd,cd,ld,fd,dd,md]},vd=function(){return[cd,sd,ud,ad,fd,ld]},hd=function(){return[sd,cd,ad,ud,fd,ld]},bd=function(){return[ud,ad,cd,sd,ld,fd]},yd=function(){return[ad,ud,sd,cd,ld,fd]},xd=function(n,t,e){return Ba(function(o){e(o,n,t)})},wd=function(n,t,e){return Ea(function(o){e(o,n,t)})},Sd=function(n,t,e,o,r,i){var u=zo(n),a=Rr(t,[Vr("config",n)]);return _d(u,a,t,e,o,r,i)},kd=function(n,t,e,o,r,i){var u=n,a=Rr(t,[Dr("config",n)]);return _d(u,a,t,e,o,r,i)},Cd=function(n,t,e){var o=function(o){for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var u=[o].concat(r);return o.config({name:ft(n)}).fold(function(){throw new Error("We could not find any behaviour configuration for: "+n+". Using API: "+e)},function(n){var e=Array.prototype.slice.call(u,1);return t.apply(void 0,[o,n.config,n.state].concat(e))})};return Ic(o,e,t)},Od=function(n){return{key:n,value:void 0}},_d=function(n,e,o,r,i,u,a){var c=function(n){return je(n,o)?n[o]():St.none()},s=Me(i,function(n,t){return Cd(o,n,t)}),f=Me(u,function(n,t){return Vc(n,t)}),l=ht(ht(ht({},f),s),{revoke:t(Od,o),config:function(t){var e=ir(o+"-config",n,t);return{key:o,value:{config:e,me:l,configAsRaw:$e(function(){return ir(o+"-config",n,t)}),initialConfig:t,state:a}}},schema:function(){return e},exhibit:function(n,t){return c(n).bind(function(n){return Ne(r,"exhibit").map(function(e){return e(t,n.config,n.state)})}).getOr(qc({}))},name:function(){return o},handlers:function(n){return c(n).map(function(n){var t=Ne(r,"events").getOr(function(){return{}});return t(n.config,n.state)}).getOr({})}});return l},Td=function(n){return lo(n)},Ed=zo([br("fields"),br("name"),Pr("active",{}),Pr("apis",{}),Pr("state",jc),Pr("extra",{})]),Bd=function(n){var t=ir("Creating behaviour: "+n.name,Ed,n);return Sd(t.fields,t.name,t.active,t.apis,t.extra,t.state)},Dd=zo([br("branchKey"),br("branches"),br("name"),Pr("active",{}),Pr("apis",{}),Pr("state",jc),Pr("extra",{})]),Ad=function(n){var t=ir("Creating behaviour: "+n.name,Dd,n);return kd(cr(t.branchKey,t.branches),t.name,t.active,t.apis,t.extra,t.state)},Md=ft(void 0),Fd=function(n,t){return t.universal()?n:Jt(n,function(n){return jt(t.channels(),n)})},Id=function(n){return da([va(Hu(),function(t,e){var o=n.channels,r=Be(o),i=e,u=Fd(r,i);Yt(u,function(n){var e=o[n],r=e.schema,u=ir("channel["+n+"] data\nReceiver: "+hc(t.element()),r,i.data());e.onReceive(t,u)})})])},Rd=Object.freeze({__proto__:null,events:Id}),Vd=[yr("channels",tr(ve.value,zo([Al("onReceive"),Pr("schema",sr())])))],Pd=Bd({fields:Vd,name:"receiving",active:Rd}),Hd=function(n,t){return qc({classes:[],styles:t.useFixed()?{}:{position:"relative"}})},zd=Object.freeze({__proto__:null,exhibit:Hd}),Nd=function(){return ni.fromDom(n.document)},Ld=function(n){return n.dom().focus()},jd=function(n){return n.dom().blur()},Ud=function(n){var t=As(n).dom();return n.dom()===t.activeElement},Wd=function(n){return void 0===n&&(n=Nd()),St.from(n.dom().activeElement).map(ni.fromDom)},Gd=function(n){return Wd(As(n)).filter(function(t){return n.dom().contains(t.dom())})},Xd=function(n,t){var e=Pa(t),o=Wd(e).bind(function(n){var e=function(t){return ou(n,t)};return e(t)?St.some(t):el(t,e)}),r=n(t);return o.each(function(n){Wd(e).filter(function(t){return ou(t,n)}).fold(function(){Ld(n)},ut)}),r},Yd=function(n,t,e,o,r){return{position:ft(n),left:ft(t),top:ft(e),right:ft(o),bottom:ft(r)}},qd=function(n,t){var e=function(n){return n+"px"};Ws(n,{position:St.some(t.position()),left:t.left().map(e),top:t.top().map(e),right:t.right().map(e),bottom:t.bottom().map(e)})},Kd=We.generate([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),Jd=function(n,t,e,o,r,i){var u=t.x-e,a=t.y-o,c=t.width,s=t.height,f=r-(u+c),l=i-(a+s),d=St.some(u),m=St.some(a),g=St.some(f),p=St.some(l),v=St.none();return Hl(t.direction,function(){return Yd(n,d,m,v,v)},function(){return Yd(n,v,m,g,v)},function(){return Yd(n,d,v,v,p)},function(){return Yd(n,v,v,g,p)},function(){return Yd(n,d,m,v,v)},function(){return Yd(n,d,v,v,p)},function(){return Yd(n,d,m,v,v)},function(){return Yd(n,v,m,g,v)})},$d=function(n,t){return n.fold(function(){return Yd("absolute",St.some(t.x),St.some(t.y),St.none(),St.none())},function(n,e,o,r){return Jd("absolute",t,n,e,o,r)},function(n,e,o,r){return Jd("fixed",t,n,e,o,r)})},Qd=function(n,e){var o=t(Yf,e),r=n.fold(o,o,function(){var n=Pf();return Yf(e).translate(-n.left(),-n.top())}),i=Ef(e),u=hf(e);return Jf(r.left(),r.top(),i,u)},Zd=function(n,t){return t.fold(function(){return n.fold(Zf,Zf,Jf)},function(t){return n.fold(t,t,function(){var e=t(),o=nm(n,e.x,e.y);return Jf(o.left(),o.top(),e.width,e.height)})})},nm=function(n,t,e){var o=xf(t,e),r=function(){var n=Pf();return o.translate(-n.left(),-n.top())};return n.fold(ft(o),ft(o),r)},tm=function(n,t,e,o){return n.fold(t,e,o)},em=(Kd.none,Kd.relative),om=Kd.fixed,rm=function(n,t){return{anchorBox:ft(n),origin:ft(t)}},im=function(n,t){return rm(n,t)},um=function(n,t,e,o){var r=n+t;return r>o?e:e>r?o:r},am=function(n,t,e){return Math.min(Math.max(n,t),e)},cm=We.generate([{fit:["reposition"]},{nofit:["reposition","deltaW","deltaH"]}]),sm=function(n,t,e,o,r){var i=r.x,u=r.y,a=r.width,c=r.height,s=n>=i,f=t>=u,l=s&&f,d=i+a>=n+e,m=u+c>=t+o,g=d&&m,p=Math.abs(Math.min(e,s?i+a-n:i-(n+e))),v=Math.abs(Math.min(o,f?u+c-t:u-(t+o))),h=Math.max(r.x,r.right-e),b=Math.max(r.y,r.bottom-o),y=am(n,r.x,h),x=am(t,r.y,b);return{originInBounds:l,sizeInBounds:g,limitX:y,limitY:x,deltaW:p,deltaH:v}},fm=function(n,t,e,o){var r=n.x(),i=n.y(),u=n.bubble().offset(),a=u.left(),c=u.top(),s=$l(o,n.boundsRestriction(),u),f=s.y,l=s.bottom,d=s.x,m=s.right,g=r+a,p=i+c,v=sm(g,p,t,e,s),h=v.originInBounds,b=v.sizeInBounds,y=v.limitX,x=v.limitY,w=v.deltaW,S=v.deltaH,k=ft(x+S-f),C=ft(l-x),O=zl(n.direction(),C,C,k),_=ft(y+w-d),T=ft(m-y),E=Nl(n.direction(),T,T,_),B={x:y,y:x,width:w,height:S,maxHeight:O,maxWidth:E,direction:n.direction(),classes:{on:n.bubble().classesOn(),off:n.bubble().classesOff()},label:n.label(),candidateYforTest:p};return h&&b?cm.fit(B):cm.nofit(B,w,S)},lm=function(n,e,o,r,i){var u=o.width,a=o.height,c=function(n,t,c,s){var f=n(e,o,r),l=fm(f,u,a,i);return l.fold(cm.fit,function(n,e,o){var r=o>s||e>c;return r?cm.nofit(n,e,o):cm.nofit(t,c,s)})},s=Qt(n,function(n,e){var o=t(c,e);return n.fold(cm.fit,o)},cm.nofit({x:e.x,y:e.y,width:o.width,height:o.height,maxHeight:o.height,maxWidth:o.width,direction:Ll(),classes:{on:[],off:[]},label:"none",candidateYforTest:e.y},-1,-1));return s.fold(lt,lt)},dm=function(n){return{width:Ef(n),height:hf(n)}},mm=function(n,t,e,o){Js(t,"max-height"),Js(t,"max-width");var r=dm(t);return lm(o.preference,n,r,e,o.bounds)},gm=function(n,t){var e=t.classes;_s(n,e.off),Os(n,e.on)},pm=function(n,t,e){var o=e.maxHeightFunction;o(n,t.maxHeight)},vm=function(n,t,e){var o=e.maxWidthFunction;o(n,t.maxWidth)},hm=function(n,t,e){qd(n,$d(e.origin,t))},bm=function(n,t){bf(n,Math.floor(t))},ym=ft(function(n,t){bm(n,t),Us(n,{"overflow-x":"hidden","overflow-y":"auto"})}),xm=ft(function(n,t){bm(n,t)}),wm=function(n,t,e){return void 0===n[t]?e:n[t]},Sm=function(n,t,e,o,r,i){var u=wm(i,"maxHeightFunction",ym()),a=wm(i,"maxWidthFunction",ut),c=n.anchorBox(),s=n.origin(),f={bounds:Zd(s,r),origin:s,preference:o,maxHeightFunction:u,maxWidthFunction:a};km(c,t,e,f)},km=function(n,t,e,o){var r=mm(n,t,e,o);hm(t,r,o),gm(t,r),pm(t,r,o),vm(t,r,o)},Cm=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right"],Om=function(n,t,e){var o=function(n){return Ne(e,n).getOr([])},r=function(n,t,e){var r=ue(Cm,e);return{offset:function(){return xf(n,t)},classesOn:function(){return oe(e,o)},classesOff:function(){return oe(r,o)}}};return{southeast:function(){return r(-n,t,["top","alignLeft"])},southwest:function(){return r(n,t,["top","alignRight"])},south:function(){return r(-n/2,t,["top","alignCentre"])},northeast:function(){return r(-n,-t,["bottom","alignLeft"])},northwest:function(){return r(n,-t,["bottom","alignRight"])},north:function(){return r(-n/2,-t,["bottom","alignCentre"])},east:function(){return r(n,-t/2,["valignCentre","left"])},west:function(){return r(-n,-t/2,["valignCentre","right"])},innerNorthwest:function(){return r(-n,t,["top","alignRight"])},innerNortheast:function(){return r(n,t,["top","alignLeft"])},innerNorth:function(){return r(-n/2,t,["top","alignCentre"])},innerSouthwest:function(){return r(-n,-t,["bottom","alignRight"])},innerSoutheast:function(){return r(n,-t,["bottom","alignLeft"])},innerSouth:function(){return r(-n/2,-t,["bottom","alignCentre"])},innerWest:function(){return r(n,-t/2,["valignCentre","right"])},innerEast:function(){return r(-n,-t/2,["valignCentre","left"])}}},_m=function(){return Om(0,0,{})},Tm=function(n){return n},Em=function(n,t){return function(e){return"rtl"===Bm(e)?t:n}},Bm=function(n){return"rtl"===Gs(n,"direction")?"rtl":"ltr"};!function(n){n.TopToBottom="toptobottom",n.BottomToTop="bottomtotop"}(dl||(dl={}));var Dm,Am="data-alloy-vertical-dir",Mm=function(n){return ol(n,function(n){return Fa(n)&&fc(n,Am)===dl.BottomToTop})},Fm=function(){return Rr("layouts",[br("onLtr"),br("onRtl"),Br("onBottomLtr"),Br("onBottomRtl")])},Im=function(n,t,e,o,r,i,u){var a=u.map(Mm).getOr(!1),c=t.layouts.map(function(t){return t.onLtr(n)}),s=t.layouts.map(function(t){return t.onRtl(n)}),f=a?t.layouts.bind(function(t){return t.onBottomLtr.map(function(t){return t(n)})}).or(c).getOr(r):c.getOr(e),l=a?t.layouts.bind(function(t){return t.onBottomRtl.map(function(t){return t(n)})}).or(s).getOr(i):s.getOr(o),d=Em(f,l);return d(n)},Rm=function(n,t,e){var o=t.hotspot,r=Qd(e,o.element()),i=Im(n.element(),t,bd(),yd(),vd(),hd(),St.some(t.hotspot.element()));return St.some(Tm({anchorBox:r,bubble:t.bubble.getOr(_m()),overrides:t.overrides,layouts:i,placer:St.none()}))},Vm=[br("hotspot"),Br("bubble"),Pr("overrides",{}),Fm(),Fl("placement",Rm)],Pm=function(n,t,e){var o=nm(e,t.x,t.y),r=Jf(o.left(),o.top(),t.width,t.height),i=Im(n.element(),t,gd(),pd(),gd(),pd(),St.none());return St.some(Tm({anchorBox:r,bubble:t.bubble,overrides:t.overrides,layouts:i,placer:St.none()}))},Hm=[br("x"),br("y"),Pr("height",0),Pr("width",0),Pr("bubble",_m()),Pr("overrides",{}),Fm(),Fl("placement",Pm)],zm="",Nm=" ",Lm=function(n,t,e,o){return{start:ft(n),soffset:ft(t),finish:ft(e),foffset:ft(o)}},jm={create:Lm},Um=We.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Wm=function(n,t,e,o){return n.fold(t,e,o)},Gm=function(n){return n.fold(lt,lt,lt)},Xm=Um.before,Ym=Um.on,qm=Um.after,Km={before:Xm,on:Ym,after:qm,cata:Wm,getStart:Gm},Jm=We.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),$m=function(n){return Jm.exact(n.start(),n.soffset(),n.finish(),n.foffset())},Qm=function(n){return n.match({domRange:function(n){return ni.fromDom(n.startContainer)},relative:function(n){return Km.getStart(n)},exact:function(n){return n}})},Zm=Jm.domRange,ng=Jm.relative,tg=Jm.exact,eg=function(n){var t=Qm(n);return Na(t)},og=jm.create,rg={domRange:Zm,relative:ng,exact:tg,exactFromRange:$m,getWin:eg,range:og},ig=function(n,t){t.fold(function(t){n.setStartBefore(t.dom())},function(t,e){n.setStart(t.dom(),e)},function(t){n.setStartAfter(t.dom())})},ug=function(n,t){t.fold(function(t){n.setEndBefore(t.dom())},function(t,e){n.setEnd(t.dom(),e)},function(t){n.setEndAfter(t.dom())})},ag=function(n,t,e){var o=n.document.createRange();return ig(o,t),ug(o,e),o},cg=function(n,t,e,o,r){var i=n.document.createRange();return i.setStart(t.dom(),e),i.setEnd(o.dom(),r),i},sg=function(n){return{left:ft(n.left),top:ft(n.top),right:ft(n.right),bottom:ft(n.bottom),width:ft(n.width),height:ft(n.height)}},fg=function(n){var t=n.getClientRects(),e=t.length>0?t[0]:n.getBoundingClientRect();return e.width>0||e.height>0?St.some(e).map(sg):St.none()},lg=We.generate([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),dg=function(n,t,e){return t(ni.fromDom(e.startContainer),e.startOffset,ni.fromDom(e.endContainer),e.endOffset)},mg=function(n,t){return t.match({domRange:function(n){return{ltr:ft(n),rtl:St.none}},relative:function(t,e){return{ltr:$e(function(){return ag(n,t,e)}),rtl:$e(function(){return St.some(ag(n,e,t))})}},exact:function(t,e,o,r){return{ltr:$e(function(){return cg(n,t,e,o,r)}),rtl:$e(function(){return St.some(cg(n,o,r,t,e))})}}})},gg=function(n,t){var e=t.ltr();if(e.collapsed){var o=t.rtl().filter(function(n){return n.collapsed===!1});return o.map(function(n){return lg.rtl(ni.fromDom(n.endContainer),n.endOffset,ni.fromDom(n.startContainer),n.startOffset)}).getOrThunk(function(){return dg(n,lg.ltr,e)})}return dg(n,lg.ltr,e)},pg=function(n,t){var e=mg(n,t);return gg(n,e)},vg=function(n,t){var e=pg(n,t);return e.match({ltr:function(t,e,o,r){var i=n.document.createRange();return i.setStart(t.dom(),e),i.setEnd(o.dom(),r),i},rtl:function(t,e,o,r){var i=n.document.createRange();return i.setStart(o.dom(),r),i.setEnd(t.dom(),e),i}})},hg=(lg.ltr,lg.rtl,u(Ia,"text")),bg=function(n){return hg.get(n)},yg=function(n){return hg.getOption(n)},xg=function(n){return"img"===Da(n)?1:yg(n).fold(function(){return Wa(n).length},function(n){return n.length})},wg=function(n){return yg(n).filter(function(n){return 0!==n.trim().length||n.indexOf(Nm)>-1}).isSome()},Sg=["img","br"],kg=function(n){var t=wg(n);return t||jt(Sg,Da(n))},Cg=function(n){return Og(n,kg)},Og=function(n,t){var e=function(n){for(var o=Wa(n),r=o.length-1;r>=0;r--){var i=o[r];if(t(i))return St.some(i);var u=e(i);if(u.isSome())return u}return St.none()};return e(n)},_g=function(n,t){return tu(t,n)},Tg=function(n,t,e,o){var r=Pa(n),i=r.dom().createRange();return i.setStart(n.dom(),t),i.setEnd(e.dom(),o),i},Eg=function(n,t,e,o){var r=Tg(n,t,e,o),i=ou(n,e)&&t===o;return r.collapsed&&!i},Bg=function(n){if(n.rangeCount>0){var t=n.getRangeAt(0),e=n.getRangeAt(n.rangeCount-1);return St.some(jm.create(ni.fromDom(t.startContainer),t.startOffset,ni.fromDom(e.endContainer),e.endOffset))}return St.none()},Dg=function(n){var t=ni.fromDom(n.anchorNode),e=ni.fromDom(n.focusNode);return Eg(t,n.anchorOffset,e,n.focusOffset)?St.some(jm.create(t,n.anchorOffset,e,n.focusOffset)):Bg(n)},Ag=function(n){return St.from(n.getSelection()).filter(function(n){return n.rangeCount>0}).bind(Dg)},Mg=function(n,t){var e=vg(n,t);return fg(e)},Fg=function(n,t){return{element:n,offset:t}},Ig=function(n,t){var e=Wa(n);if(0===e.length)return Fg(n,t);if(t<e.length)return Fg(e[t],0);var o=e[e.length-1],r=Ia(o)?bg(o).length:Wa(o).length;return Fg(o,r)},Rg=We.generate([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),Vg=function(n){return n.fold(lt,function(n,t,e){return n.translate(-t,-e)})},Pg=function(n){return n.fold(lt,lt)},Hg=function(n){return Qt(n,function(n,t){return n.translate(t.left(),t.top())},xf(0,0))},zg=function(n){var t=Xt(n,Vg);return Hg(t)},Ng=function(n){var t=Xt(n,Pg);return Hg(t)},Lg=Rg.screen,jg=Rg.absolute,Ug=function(n,t,e){var o=Na(e.root).dom(),r=function(t){var e=Pa(t),o=Pa(n.element());return ou(e,o)};return St.from(o.frameElement).map(ni.fromDom).filter(r).map(kf)},Wg=function(n,t,e){var o=Pa(n.element()),r=Pf(o),i=Ug(n,t,e).getOr(r);return jg(i,r.left(),r.top())},Gg=function(n,t,e,o){var r=n,i=t,u=e,a=o;0>n&&(r=0,u=e+n),0>t&&(i=0,a=o+t);var c=Lg(xf(r,i));return St.some(qf(c,u,a))},Xg=function(n,t,e,o,r){return n.map(function(n){var i=[t,n.point],u=tm(o,function(){return Ng(i)},function(){return Ng(i)},function(){return zg(i)}),a=Kf(u.left(),u.top(),n.width,n.height),c=e.showAbove?vd():bd(),s=(e.showAbove,yd()),f=Im(r,e,c,s,c,s,St.none());return Tm({anchorBox:a,bubble:e.bubble.getOr(_m()),overrides:e.overrides,layouts:f,placer:St.none()})})},Yg=function(n,t){return{element:n,offset:t}},qg=function(n,t){return Ia(n)?Yg(n,t):Ig(n,t)},Kg=function(n,t){var e=t.getSelection.getOrThunk(function(){return function(){return Ag(n)}});return e().map(function(n){var t=qg(n.start(),n.soffset()),e=qg(n.finish(),n.foffset());return rg.range(t.element,t.offset,e.element,e.offset)})},Jg=function(n,t,e){var o=Na(t.root).dom(),r=Wg(n,e,t),i=Kg(o,t).bind(function(n){var t=Mg(o,rg.exactFromRange(n)).orThunk(function(){var t=ni.fromText(zm);return Ya(n.start(),t),Mg(o,rg.exact(t,0,t,1)).map(function(n){return tc(t),n})});return t.bind(function(n){return Gg(n.left(),n.top(),n.width(),n.height())})}),u=Kg(o,t).bind(function(n){return Fa(n.start())?St.some(n.start()):La(n.start())}),a=u.getOr(n.element());return Xg(i,r,t,e,a)},$g=[Br("getSelection"),br("root"),Br("bubble"),Fm(),Pr("overrides",{}),Pr("showAbove",!1),Fl("placement",Jg)],Qg=function(n,t,e){var o=Wg(n,e,t);return t.node.bind(function(r){var i=r.dom().getBoundingClientRect(),u=Gg(i.left,i.top,i.width,i.height),a=t.node.getOr(n.element());return Xg(u,o,t,e,a)})},Zg=[br("node"),br("root"),Br("bubble"),Fm(),Pr("overrides",{}),Pr("showAbove",!1),Fl("placement",Qg)],np=function(n){return n.x+n.width},tp=function(n,t){return n.x-t.width},ep=function(n,t){return n.y-t.height+n.height},op=function(n){return n.y},rp=function(n,t,e){return Vl(np(n),op(n),e.southeast(),Ll(),Jl(n,{left:0,top:2}),"link-layout-se")},ip=function(n,t,e){return Vl(tp(n,t),op(n),e.southwest(),jl(),Jl(n,{right:1,top:2}),"link-layout-sw")},up=function(n,t,e){return Vl(np(n),ep(n,t),e.northeast(),Ul(),Jl(n,{left:0,bottom:3}),"link-layout-ne")},ap=function(n,t,e){return Vl(tp(n,t),ep(n,t),e.northwest(),Wl(),Jl(n,{right:1,bottom:3}),"link-layout-nw")},cp=function(){return[rp,ip,up,ap]},sp=function(){return[ip,rp,ap,up]},fp=function(n,t,e){var o=Qd(e,t.item.element()),r=Im(n.element(),t,cp(),sp(),cp(),sp(),St.none());return St.some(Tm({anchorBox:o,bubble:_m(),overrides:t.overrides,layouts:r,placer:St.none()}))},lp=[br("item"),Fm(),Pr("overrides",{}),Fl("placement",fp)],dp=cr("anchor",{selection:$g,node:Zg,hotspot:Vm,submenu:lp,makeshift:Hm}),mp=function(){var t=n.document.documentElement;return om(0,0,t.clientWidth,t.clientHeight)},gp=function(n){var t=kf(n.element()),e=n.element().dom().getBoundingClientRect();return em(t.left(),t.top(),e.width,e.height)},pp=function(n,t,e,o,r){var i=im(e.anchorBox,t);Sm(i,r.element(),e.bubble,e.layouts,o,e.overrides)},vp=function(n,t,e,o,r){hp(n,t,e,o,r,St.none())},hp=function(n,t,e,o,r,i){var u=i.map($f);return bp(n,t,e,o,r,u)},bp=function(n,t,e,o,r,i){var u=ir("positioning anchor.info",dp,o);Xd(function(){js(r.element(),"position","fixed");var e=Ys(r.element(),"visibility");js(r.element(),"visibility","hidden");var o=t.useFixed()?mp():gp(n),a=u.placement,c=i.map(ft).or(t.getBounds);a(n,u,o).each(function(t){var e=t.placer.getOr(pp);e(n,o,t,c,r)}),e.fold(function(){Js(r.element(),"visibility")},function(n){js(r.element(),"visibility",n)}),Ys(r.element(),"left").isNone()&&Ys(r.element(),"top").isNone()&&Ys(r.element(),"right").isNone()&&Ys(r.element(),"bottom").isNone()&&Ys(r.element(),"position").is("fixed")&&Js(r.element(),"position")},r.element())},yp=function(n,t){return t.useFixed()?"fixed":"absolute"},xp=Object.freeze({__proto__:null,position:vp,positionWithin:hp,positionWithinBounds:bp,getMode:yp}),wp=[Pr("useFixed",gt),Br("getBounds")],Sp=Bd({fields:wp,name:"positioning",active:zd,apis:xp}),kp=function(n){ua(n,$u());var t=n.components();Yt(t,kp)},Cp=function(n){var t=n.components();Yt(t,Cp),ua(n,Ju())},Op=function(n,t){Ja(n.element(),t.element())},_p=function(n){Yt(n.components(),function(n){return tc(n.element())}),nc(n.element()),n.syncComponents()},Tp=function(n,t){var e=n.components();_p(n);var o=ue(e,t);Yt(o,function(t){kp(t),n.getSystem().removeFromWorld(t)}),Yt(t,function(t){t.getSystem().isConnected()?Op(n,t):(n.getSystem().addToWorld(t),Op(n,t),Ps(n.element())&&Cp(t)),n.syncComponents()})},Ep=function(n,t){Bp(n,t,Ja)},Bp=function(n,t,e){n.getSystem().addToWorld(t),e(n.element(),t.element()),Ps(n.element())&&Cp(t),n.syncComponents()},Dp=function(n){kp(n),tc(n.element()),n.getSystem().removeFromWorld(n)},Ap=function(n){var t=La(n.element()).bind(function(t){return n.getSystem().getByDom(t).toOption()});Dp(n),t.each(function(n){n.syncComponents()})},Mp=function(n){var t=n.components();Yt(t,Dp),nc(n.element()),n.syncComponents()},Fp=function(n,t){Rp(n,t,Ja)},Ip=function(n,t){Rp(n,t,qa)},Rp=function(n,t,e){e(n,t.element());var o=Wa(t.element());Yt(o,function(n){t.getByDom(n).each(Cp)})},Vp=function(n){var t=Wa(n.element());Yt(t,function(t){n.getByDom(t).each(kp)}),tc(n.element())},Pp=function(n,t,e,o){e.get().each(function(){Mp(n)});var r=t.getAttachPoint(n);Ep(r,n);var i=n.getSystem().build(o);return Ep(n,i),e.set(i),i},Hp=function(n,t,e,o){var r=Pp(n,t,e,o);return t.onOpen(n,r),r},zp=function(n,t,e,o){return e.get().map(function(){return Pp(n,t,e,o)})},Np=function(n,t,e,o,r){Yp(n,t),Hp(n,t,e,o),r(),Kp(n,t)},Lp=function(n,t,e){e.get().each(function(o){Mp(n),Ap(n),t.onClose(n,o),e.clear()})},jp=function(n,t,e){return e.isOpen()},Up=function(n,t,e,o){return jp(n,t,e)&&e.get().exists(function(e){return t.isPartOf(n,e,o)})},Wp=function(n,t,e){return e.get()},Gp=function(n,t,e,o){Ys(n.element(),t).fold(function(){mc(n.element(),e)},function(t){cc(n.element(),e,t)}),js(n.element(),t,o)},Xp=function(n,t,e){lc(n.element(),e).fold(function(){return Js(n.element(),t)},function(e){return js(n.element(),t,e)})},Yp=function(n,t){var e=t.getAttachPoint(n);js(n.element(),"position",Sp.getMode(e)),Gp(n,"visibility",t.cloakVisibilityAttr,"hidden")},qp=function(n){return Ut(["top","left","right","bottom"],function(t){return Ys(n,t).isSome()})},Kp=function(n,t){qp(n.element())||Js(n.element(),"position"),Xp(n,"visibility",t.cloakVisibilityAttr)},Jp=Object.freeze({__proto__:null,cloak:Yp,decloak:Kp,open:Hp,openWhileCloaked:Np,close:Lp,isOpen:jp,isPartOf:Up,getState:Wp,setContent:zp}),$p=function(n,t){return da([va(Uu(),function(e){Lp(e,n,t)})])},Qp=Object.freeze({__proto__:null,events:$p}),Zp=[Bl("onOpen"),Bl("onClose"),br("isPartOf"),br("getAttachPoint"),Pr("cloakVisibilityAttr","data-precloak-visibility")],nv=function(){var n=qr(St.none()),t=ft("not-implemented"),e=function(){return n.get().isSome()},o=function(t){n.set(St.some(t))},r=function(){return n.get()},i=function(){n.set(St.none())};return Uc({readState:t,isOpen:e,clear:i,set:o,get:r})},tv=Object.freeze({__proto__:null,init:nv}),ev=Bd({fields:Zp,name:"sandboxing",active:Qp,apis:Jp,state:tv}),ov=ft("dismiss.popups"),rv=ft("reposition.popups"),iv=ft("mouse.released"),uv=zo([Pr("isExtraPart",ft(!1)),Rr("fireEventInstead",[Pr("event",Qu())])]),av=function(n){var t,e=ir("Dismissal",uv,n);return t={},t[ov()]={schema:zo([br("target")]),onReceive:function(n,t){if(ev.isOpen(n)){var o=ev.isPartOf(n,t.target)||e.isExtraPart(n,t.target);o||e.fireEventInstead.fold(function(){return ev.close(n)},function(t){return ua(n,t.event)})}}},t},cv=zo([Rr("fireEventInstead",[Pr("event",Zu())]),Cr("doReposition")]),sv=function(n){var t,e=ir("Reposition",cv,n);return t={},t[rv()]={onReceive:function(n){ev.isOpen(n)&&e.fireEventInstead.fold(function(){return e.doReposition(n)},function(t){return ua(n,t.event)})}},t},fv=function(n,t,e){t.store.manager.onLoad(n,t,e)},lv=function(n,t,e){t.store.manager.onUnload(n,t,e)},dv=function(n,t,e,o){t.store.manager.setValue(n,t,e,o)},mv=function(n,t,e){return t.store.manager.getValue(n,t,e)},gv=function(n,t,e){return e},pv=Object.freeze({__proto__:null,onLoad:fv,onUnload:lv,setValue:dv,getValue:mv,getState:gv}),vv=function(n,t){var e=n.resetOnDom?[_a(function(e){fv(e,n,t)}),Ta(function(e){lv(e,n,t)})]:[wd(n,t,fv)];return da(e)},hv=Object.freeze({__proto__:null,events:vv}),bv=function(){var n=qr(null),t=function(){return{mode:"memory",value:n.get()}},e=function(){return null===n.get()},o=function(){n.set(null)};return Uc({set:n.set,get:n.get,isNotSet:e,clear:o,readState:t})},yv=function(){var n=function(){};return Uc({readState:n})},xv=function(){var n=qr({}),t=qr({}),e=function(){return{mode:"dataset",dataByValue:n.get(),dataByText:t.get()}},o=function(){n.set({}),t.set({})},r=function(e){return Ne(n.get(),e).orThunk(function(){return Ne(t.get(),e)})},i=function(e){var o=n.get(),r=t.get(),i={},u={};Yt(e,function(n){i[n.value]=n,Ne(n,"meta").each(function(t){Ne(t,"text").each(function(t){u[t]=n})})}),n.set(ht(ht({},o),i)),t.set(ht(ht({},r),u))};return Uc({readState:e,lookup:r,update:i,clear:o})},wv=function(n){return n.store.manager.state(n)},Sv=Object.freeze({__proto__:null,memory:bv,dataset:xv,manual:yv,init:wv}),kv=function(n,t,e,o){var r=t.store;e.update([o]),r.setValue(n,o),t.onSetValue(n,o)},Cv=function(n,t,e){var o=t.store,r=o.getDataKey(n);return e.lookup(r).fold(function(){return o.getFallbackEntry(r)},function(n){return n})},Ov=function(n,t,e){var o=t.store;o.initialValue.each(function(o){kv(n,t,e,o)})},_v=function(n,t,e){e.clear()},Tv=[Br("initialValue"),br("getFallbackEntry"),br("getDataKey"),br("setValue"),Fl("manager",{setValue:kv,getValue:Cv,onLoad:Ov,onUnload:_v,state:xv})],Ev=function(n,t){return t.store.getValue(n)},Bv=function(n,t,e,o){t.store.setValue(n,o),t.onSetValue(n,o)},Dv=function(n,t){t.store.initialValue.each(function(e){t.store.setValue(n,e)})},Av=[br("getValue"),Pr("setValue",ut),Br("initialValue"),Fl("manager",{setValue:Bv,getValue:Ev,onLoad:Dv,onUnload:ut,state:jc.init})],Mv=function(n,t,e,o){e.set(o),t.onSetValue(n,o)},Fv=function(n,t,e){return e.get()},Iv=function(n,t,e){t.store.initialValue.each(function(n){e.isNotSet()&&e.set(n)})},Rv=function(n,t,e){e.clear()},Vv=[Br("initialValue"),Fl("manager",{setValue:Mv,getValue:Fv,onLoad:Iv,onUnload:Rv,state:bv})],Pv=[Hr("store",{mode:"memory"},cr("mode",{memory:Vv,manual:Av,dataset:Tv})),Bl("onSetValue"),Pr("resetOnDom",!1)],Hv=Bd({fields:Pv,name:"representing",active:hv,apis:pv,extra:{setValueFrom:function(n,t){var e=Hv.getValue(t);Hv.setValue(n,e)}},state:Sv}),zv=function(n,t){return Xr(n,{},Xt(t,function(t){return Or(t.name(),"Cannot configure "+t.name()+" for "+n)}).concat([Yr("dump",lt)]))},Nv=function(n){return n.dump},Lv=function(n,t){return ht(ht({},n.dump),Td(t))},jv={field:zv,augment:Lv,get:Nv},Uv="placeholder",Wv=We.generate([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),Gv=function(n){return Le(n,"uiType")},Xv=function(n,t,e,o){return n.exists(function(n){return n!==e.owner})?Wv.single(!0,ft(e)):Ne(o,e.name).fold(function(){throw new Error("Unknown placeholder component: "+e.name+"\nKnown: ["+Be(o)+"]\nNamespace: "+n.getOr("none")+"\nSpec: "+JSON.stringify(e,null,2))},function(n){return n.replace()})},Yv=function(n,t,e,o){return Gv(e)&&e.uiType===Uv?Xv(n,t,e,o):Wv.single(!1,ft(e))},qv=function(n,t,e,o){var r=Yv(n,t,e,o);return r.fold(function(r,i){var u=Gv(e)?i(t,e.config,e.validated):i(t),a=Ne(u,"components").getOr([]),c=oe(a,function(e){return qv(n,t,e,o)});return[ht(ht({},u),{components:c})]},function(n,o){if(Gv(e)){var r=o(t,e.config,e.validated),i=e.validated.preprocess.getOr(lt);return i(r)}return o(t)})},Kv=function(n,t,e,o){return oe(e,function(e){return qv(n,t,e,o)})},Jv=function(n,t){var e=!1,o=function(){return e},r=function(){if(e)throw new Error("Trying to use the same placeholder more than once: "+n);return e=!0,t},i=function(){return t.fold(function(n){return n},function(n){return n})};return{name:ft(n),required:i,used:o,replace:r}},$v=function(n,t,e,o){var r=Me(o,function(n,t){return Jv(t,n)}),i=Kv(n,t,e,r);return Ae(r,function(e){if(e.used()===!1&&e.required())throw new Error("Placeholder: "+e.name()+" was not found in components list\nNamespace: "+n.getOr("none")+"\nComponents: "+JSON.stringify(t.components,null,2))}),i},Qv=Wv.single,Zv=Wv.multiple,nh=ft(Uv),th=We.generate([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),eh=Pr("factory",{sketch:lt}),oh=Pr("schema",[]),rh=br("name"),ih=Yo("pname","pname",oo(function(n){return"<alloy."+Sc(n.name)+">"}),sr()),uh=Yr("schema",function(){return[Br("preprocess")]}),ah=Pr("defaults",ft({})),ch=Pr("overrides",ft({})),sh=No([eh,oh,rh,ih,ah,ch]),fh=No([eh,oh,rh,ah,ch]),lh=No([eh,oh,rh,ih,ah,ch]),dh=No([eh,uh,rh,br("unit"),ih,ah,ch]),mh=function(n){return n.fold(St.some,St.none,St.some,St.some)},gh=function(n){var t=function(n){return n.name};return n.fold(t,t,t,t)},ph=function(n){return n.fold(lt,lt,lt,lt)},vh=function(n,t){return function(e){var o=ir("Converting part type",t,e);return n(o)}},hh=vh(th.required,sh),bh=vh(th.external,fh),yh=vh(th.optional,lh),xh=vh(th.group,dh),wh=ft("entirety"),Sh=Object.freeze({__proto__:null,required:hh,external:bh,optional:yh,group:xh,asNamedPart:mh,name:gh,asCommon:ph,original:wh}),kh=function(n,t,e,o){return Ke(t.defaults(n,e,o),e,{uid:n.partUids[t.name]},t.overrides(n,e,o))},Ch=function(n,t,e){var o={},r={};return Yt(e,function(n){n.fold(function(n){o[n.pname]=Qv(!0,function(t,e,o){return n.factory.sketch(kh(t,n,e,o))})},function(n){var e=t.parts[n.name];r[n.name]=ft(n.factory.sketch(kh(t,n,e[wh()]),e))},function(n){o[n.pname]=Qv(!1,function(t,e,o){return n.factory.sketch(kh(t,n,e,o))})},function(n){o[n.pname]=Zv(!0,function(t,e,o){var r=t[n.name];return Xt(r,function(e){return n.factory.sketch(Ke(n.defaults(t,e,o),e,n.overrides(t,e)))})})})}),{internals:ft(o),externals:ft(r)}},Oh=function(n,t){var e={};return Yt(t,function(t){mh(t).each(function(t){var o=_h(n,t.pname);e[t.name]=function(e){var r=ir("Part: "+t.name+" in "+n,No(t.schema),e);return ht(ht({},o),{config:e,validated:r})}})}),e},_h=function(n,t){return{uiType:nh(),owner:n,name:t}},Th=function(n,t,e){return{uiType:nh(),owner:n,name:t,config:e,validated:{}}},Eh=function(n){return oe(n,function(n){return n.fold(St.none,St.some,St.none,St.none).map(function(n){return _r(n.name,n.schema.concat([Il(wh())]))}).toArray()})},Bh=function(n){return Xt(n,gh)},Dh=function(n,t,e){return Ch(n,t,e)},Ah=function(n,t,e){return $v(St.some(n),t,t.components,e)},Mh=function(n,t,e){var o=t.partUids[e];return n.getSystem().getByUid(o).toOption()},Fh=function(n,t,e){return Mh(n,t,e).getOrDie("Could not find part: "+e)},Ih=function(n,t,e){var o={},r=t.partUids,i=n.getSystem();return Yt(e,function(n){o[n]=ft(i.getByUid(r[n]))}),o},Rh=function(n,t){var e=n.getSystem();return Me(t.partUids,function(n){return ft(e.getByUid(n))})},Vh=function(n){return Be(n.partUids)},Ph=function(n,t,e){var o={},r=t.partUids,i=n.getSystem();return Yt(e,function(n){o[n]=ft(i.getByUid(r[n]).getOrDie())}),o},Hh=function(n,t){var e=Bh(t);return lo(Xt(e,function(t){return{key:t,value:n+"-"+t}}))},zh=function(n){return Yo("partUids","partUids",ro(function(t){return Hh(t.uid,n)}),sr())},Nh=Object.freeze({__proto__:null,generate:Oh,generateOne:Th,schemas:Eh,names:Bh,substitutes:Dh,components:Ah,defaultUids:Hh,defaultUidsSchema:zh,getAllParts:Rh,getAllPartNames:Vh,getPart:Mh,getPartOrDie:Fh,getParts:Ih,getPartsOrDie:Ph}),Lh=function(n,t){var e=n.length>0?[_r("parts",n)]:[];return e.concat([br("uid"),Pr("dom",{}),Pr("components",[]),Il("originalSpec"),Pr("debug.sketcher",{})]).concat(t)},jh=function(n,t,e,o,r){var i=Lh(o,r);return ir(n+" [SpecSchema]",zo(i.concat(t)),e)},Uh=function(n,t,e,o){var r=Xh(o),i=jh(n,t,r,[],[]);return e(i,r)},Wh=function(n,t,e,o,r){var i=Xh(r),u=Eh(e),a=zh(e),c=jh(n,t,i,u,[a]),s=Dh(n,c,e),f=Ah(n,c,s.internals());
return o(c,f,i,s.externals())},Gh=function(n){return Le(n,"uid")},Xh=function(n){return Gh(n)?n:ht(ht({},n),{uid:Dc("uid")})},Yh=zo([br("name"),br("factory"),br("configFields"),Pr("apis",{}),Pr("extraApis",{})]),qh=zo([br("name"),br("factory"),br("configFields"),br("partFields"),Pr("apis",{}),Pr("extraApis",{})]),Kh=function(n){var t=ir("Sketcher for "+n.name,Yh,n),e=function(n){return Uh(t.name,t.configFields,t.factory,n)},o=Me(t.apis,Lc),r=Me(t.extraApis,function(n,t){return Vc(n,t)});return ht(ht({name:ft(t.name),configFields:ft(t.configFields),sketch:e},o),r)},Jh=function(n){var t=ir("Sketcher for "+n.name,qh,n),e=function(n){return Wh(t.name,t.configFields,t.partFields,t.factory,n)},o=Oh(t.name,t.partFields),r=Me(t.apis,Lc),i=Me(t.extraApis,function(n,t){return Vc(n,t)});return ht(ht({name:ft(t.name),partFields:ft(t.partFields),configFields:ft(t.configFields),sketch:e,parts:ft(o)},r),i)},$h=function(n){for(var t=[],e=function(n){t.push(n)},o=0;o<n.length;o++)n[o].each(e);return t},Qh=function(n){for(var t=[],e=0;e<n.length;e++){var o=n[e];if(!o.isSome())return St.none();t.push(o.getOrDie())}return St.some(t)},Zh=function(n,t,e){return n.isSome()&&t.isSome()?St.some(e(n.getOrDie(),t.getOrDie())):St.none()},nb=function(n,t,e,o){return n.isSome()&&t.isSome()&&e.isSome()?St.some(o(n.getOrDie(),t.getOrDie(),e.getOrDie())):St.none()},tb=function(n){return"input"===Da(n)&&"radio"!==fc(n,"type")||"textarea"===Da(n)},eb=function(n,t){return t.find(n)},ob=Object.freeze({__proto__:null,getCurrent:eb}),rb=[br("find")],ib=Bd({fields:rb,name:"composing",apis:ob}),ub=function(n,t,e,o){var r=_g(n.element(),"."+t.highlightClass);Yt(r,function(e){Ut(o,function(n){return n.element()===e})||(ks(e,t.highlightClass),n.getSystem().getByDom(e).each(function(e){t.onDehighlight(n,e),ua(e,ia())}))})},ab=function(n,t,e){return ub(n,t,e,[])},cb=function(n,t,e,o){gb(n,t,e,o)&&(ks(o.element(),t.highlightClass),t.onDehighlight(n,o),ua(o,ia()))},sb=function(n,t,e,o){ub(n,t,e,[o]),gb(n,t,e,o)||(ws(o.element(),t.highlightClass),t.onHighlight(n,o),ua(o,ra()))},fb=function(n,t,e){hb(n,t).each(function(o){sb(n,t,e,o)})},lb=function(n,t,e){bb(n,t).each(function(o){sb(n,t,e,o)})},db=function(n,t,e,o){vb(n,t,e,o).fold(function(n){throw new Error(n)},function(o){sb(n,t,e,o)})},mb=function(n,t,e,o){var r=Sb(n,t),i=ne(r,o);i.each(function(o){sb(n,t,e,o)})},gb=function(n,t,e,o){return Cs(o.element(),t.highlightClass)},pb=function(n,t){return il(n.element(),"."+t.highlightClass).bind(function(t){return n.getSystem().getByDom(t).toOption()})},vb=function(n,t,e,o){var r=_g(n.element(),"."+t.itemClass);return St.from(r[o]).fold(function(){return ve.error("No element found with index "+o)},n.getSystem().getByDom)},hb=function(n,t){return il(n.element(),"."+t.itemClass).bind(function(t){return n.getSystem().getByDom(t).toOption()})},bb=function(n,t){var e=_g(n.element(),"."+t.itemClass),o=e.length>0?St.some(e[e.length-1]):St.none();return o.bind(function(t){return n.getSystem().getByDom(t).toOption()})},yb=function(n,t,e,o){var r=_g(n.element(),"."+t.itemClass),i=te(r,function(n){return Cs(n,t.highlightClass)});return i.bind(function(t){var e=um(t,o,0,r.length-1);return n.getSystem().getByDom(r[e]).toOption()})},xb=function(n,t,e){return yb(n,t,e,-1)},wb=function(n,t,e){return yb(n,t,e,1)},Sb=function(n,t){var e=_g(n.element(),"."+t.itemClass);return $h(Xt(e,function(t){return n.getSystem().getByDom(t).toOption()}))},kb=Object.freeze({__proto__:null,dehighlightAll:ab,dehighlight:cb,highlight:sb,highlightFirst:fb,highlightLast:lb,highlightAt:db,highlightBy:mb,isHighlighted:gb,getHighlighted:pb,getFirst:hb,getLast:bb,getPrevious:xb,getNext:wb,getCandidates:Sb}),Cb=[br("highlightClass"),br("itemClass"),Bl("onHighlight"),Bl("onDehighlight")],Ob=Bd({fields:Cb,name:"highlighting",apis:kb}),_b=function(){return[8]},Tb=function(){return[9]},Eb=function(){return[13]},Bb=function(){return[27]},Db=function(){return[32]},Ab=function(){return[37]},Mb=function(){return[38]},Fb=function(){return[39]},Ib=function(){return[40]},Rb=function(n,t,e){var o=ie(n.slice(0,t)),r=ie(n.slice(t+1));return ne(o.concat(r),e)},Vb=function(n,t,e){var o=ie(n.slice(0,t));return ne(o,e)},Pb=function(n,t,e){var o=n.slice(0,t),r=n.slice(t+1);return ne(r.concat(o),e)},Hb=function(n,t,e){var o=n.slice(t+1);return ne(o,e)},zb=function(n){return function(t){var e=t.raw();return jt(n,e.which)}},Nb=function(n){return function(t){return re(n,function(n){return n(t)})}},Lb=function(n){var t=n.raw();return t.shiftKey===!0},jb=function(n){var t=n.raw();return t.ctrlKey===!0},Ub=dt(Lb),Wb=function(n,t){return{matches:n,classification:t}},Gb=function(n,t){var e=ne(n,function(n){return n.matches(t)});return e.map(function(n){return n.classification})},Xb=function(n,t,e){var o=t.exists(function(n){return e.exists(function(t){return ou(t,n)})});o||aa(n,na(),{prevFocus:t,newFocus:e})},Yb=function(){var n=function(n){return Gd(n.element())},t=function(t,e){var o=n(t);t.getSystem().triggerFocus(e,t.element());var r=n(t);Xb(t,o,r)};return{get:n,set:t}},qb=function(){var n=function(n){return Ob.getHighlighted(n).map(function(n){return n.element()})},t=function(t,e){var o=n(t);t.getSystem().getByDom(e).fold(ut,function(n){Ob.highlight(t,n)});var r=n(t);Xb(t,o,r)};return{get:n,set:t}};!function(n){n.OnFocusMode="onFocus",n.OnEnterOrSpaceMode="onEnterOrSpace",n.OnApiMode="onApi"}(Dm||(Dm={}));var Kb,Jb=function(n,t,e,o,r){var i=function(){return n.concat([Pr("focusManager",Yb()),Hr("focusInside","onFocus",nr(function(n){return jt(["onFocus","onEnterOrSpace","onApi"],n)?ve.value(n):ve.error("Invalid value for focusInside")})),Fl("handler",c),Fl("state",t),Fl("sendFocusIn",r)])},u=function(n,t,e,o,r){var i=e(n,t,o,r);return Gb(i,t.event()).bind(function(e){return e(n,t,o,r)})},a=function(n,t){var i=n.focusInside!==Dm.OnFocusMode?St.none():r(n).map(function(e){return va(Ru(),function(o,r){e(o,n,t),r.stop()})}),a=function(e,o){var i=zb(Db().concat(Eb()))(o.event());n.focusInside===Dm.OnEnterOrSpaceMode&&i&&fu(e,o)&&r(n).each(function(r){r(e,n,t),o.stop()})},c=[va(Tu(),function(o,r){u(o,r,e,n,t).fold(function(){a(o,r)},function(){r.stop()})}),va(Eu(),function(e,r){u(e,r,o,n,t).each(function(){r.stop()})})];return da(i.toArray().concat(c))},c={schema:i,processKey:u,toEvents:a};return c},$b=function(n){var e=[Br("onEscape"),Br("onEnter"),Pr("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),Pr("firstTabstop",0),Pr("useTabstopAt",ft(!0)),Br("visibilitySelector")].concat([n]),o=function(n,t){var e=n.visibilitySelector.bind(function(n){return ul(t,n)}).getOr(t);return vf(e)>0},r=function(n,t){var e=_g(n.element(),t.selector),r=Jt(e,function(n){return o(t,n)});return St.from(r[t.firstTabstop])},i=function(n,t){return t.focusManager.get(n).bind(function(n){return ul(n,t.selector)})},u=function(n,t){return o(n,t)&&n.useTabstopAt(t)},a=function(n,t){r(n,t).each(function(e){t.focusManager.set(n,e)})},c=function(n,t,e,o,r){return r(t,e,function(n){return u(o,n)}).fold(function(){return o.cyclic?St.some(!0):St.none()},function(t){return o.focusManager.set(n,t),St.some(!0)})},s=function(n,e,o,r){var u=_g(n.element(),o.selector);return i(n,o).bind(function(e){var i=te(u,t(ou,e));return i.bind(function(t){return c(n,u,t,o,r)})})},f=function(n,t,e){var o=e.cyclic?Rb:Vb;return s(n,t,e,o)},l=function(n,t,e){var o=e.cyclic?Pb:Hb;return s(n,t,e,o)},d=function(n,t,e){return e.onEnter.bind(function(e){return e(n,t)})},m=function(n,t,e){return e.onEscape.bind(function(e){return e(n,t)})},g=ft([Wb(Nb([Lb,zb(Tb())]),f),Wb(zb(Tb()),l),Wb(zb(Bb()),m),Wb(Nb([Ub,zb(Eb())]),d)]),p=ft([]);return Jb(e,jc.init,g,p,function(){return St.some(a)})},Qb=$b(Yr("cyclic",ft(!1))),Zb=$b(Yr("cyclic",ft(!0))),ny=function(n,t,e){return sa(n,e,zu()),St.some(!0)},ty=function(n,t,e){var o=tb(e)&&zb(Db())(t.event());return o?St.none():ny(n,t,e)},ey=function(){return St.some(!0)},oy=[Pr("execute",ty),Pr("useSpace",!1),Pr("useEnter",!0),Pr("useControlEnter",!1),Pr("useDown",!1)],ry=function(n,t,e){return e.execute(n,t,n.element())},iy=function(n,t,e){var o=e.useSpace&&!tb(n.element())?Db():[],r=e.useEnter?Eb():[],i=e.useDown?Ib():[],u=o.concat(r).concat(i);return[Wb(zb(u),ry)].concat(e.useControlEnter?[Wb(Nb([jb,zb(Eb())]),ry)]:[])},uy=function(n,t,e){return e.useSpace&&!tb(n.element())?[Wb(zb(Db()),ey)]:[]},ay=Jb(oy,jc.init,iy,uy,function(){return St.none()}),cy=function(){var n=qr(St.none()),t=function(t,e){n.set(St.some({numRows:t,numColumns:e}))},e=function(){return n.get().map(function(n){return n.numRows})},o=function(){return n.get().map(function(n){return n.numColumns})};return Uc({readState:function(){return n.get().map(function(n){return{numRows:String(n.numRows),numColumns:String(n.numColumns)}}).getOr({numRows:"?",numColumns:"?"})},setGridSize:t,getNumRows:e,getNumColumns:o})},sy=function(n){return n.state(n)},fy=Object.freeze({__proto__:null,flatgrid:cy,init:sy}),ly=function(n){return function(t,e,o,r){var i=n(t.element());return py(i,t,e,o,r)}},dy=function(n,t){var e=Em(n,t);return ly(e)},my=function(n,t){var e=Em(t,n);return ly(e)},gy=function(n){return function(t,e,o,r){return py(n,t,e,o,r)}},py=function(n,t,e,o,r){var i=o.focusManager.get(t).bind(function(e){return n(t.element(),e,o,r)});return i.map(function(n){return o.focusManager.set(t,n),!0})},vy=gy,hy=gy,by=gy,yy=function(n){return n.offsetWidth<=0&&n.offsetHeight<=0},xy=function(n){return!yy(n.dom())},wy=function(n,t){return te(n,t).map(function(t){return{index:ft(t),candidates:ft(n)}})},Sy=function(n,t,e){var o=function(n){return ou(n,t)},r=_g(n,e),i=Jt(r,xy);return wy(i,o)},ky=function(n,t){return te(n,function(n){return ou(t,n)})},Cy=function(n,t,e,o){var r=Math.floor(t/e),i=t%e;return o(r,i).bind(function(t){var o=t.row()*e+t.column();return o>=0&&o<n.length?St.some(n[o]):St.none()})},Oy=function(n,t,e,o,r){return Cy(n,t,o,function(t,i){var u=t===e-1,a=u?n.length-t*o:o,c=um(i,r,0,a-1);return St.some({row:ft(t),column:ft(c)})})},_y=function(n,t,e,o,r){return Cy(n,t,o,function(t,i){var u=um(t,r,0,e-1),a=u===e-1,c=a?n.length-u*o:o,s=am(i,0,c-1);return St.some({row:ft(u),column:ft(s)})})},Ty=function(n,t,e,o){return Oy(n,t,e,o,1)},Ey=function(n,t,e,o){return Oy(n,t,e,o,-1)},By=function(n,t,e,o){return _y(n,t,e,o,-1)},Dy=function(n,t,e,o){return _y(n,t,e,o,1)},Ay=[br("selector"),Pr("execute",ty),Dl("onEscape"),Pr("captureTab",!1),Rl()],My=function(n,t){il(n.element(),t.selector).each(function(e){t.focusManager.set(n,e)})},Fy=function(n,t){return t.focusManager.get(n).bind(function(n){return ul(n,t.selector)})},Iy=function(n,t,e){return Fy(n,e).bind(function(o){return e.execute(n,t,o)})},Ry=function(n){return function(t,e,o,r){return Sy(t,e,o.selector).bind(function(t){return n(t.candidates(),t.index(),r.getNumRows().getOr(o.initSize.numRows),r.getNumColumns().getOr(o.initSize.numColumns))})}},Vy=function(n,t,e){return e.captureTab?St.some(!0):St.none()},Py=function(n,t,e){return e.onEscape(n,t)},Hy=Ry(Ey),zy=Ry(Ty),Ny=Ry(By),Ly=Ry(Dy),jy=ft([Wb(zb(Ab()),dy(Hy,zy)),Wb(zb(Fb()),my(Hy,zy)),Wb(zb(Mb()),vy(Ny)),Wb(zb(Ib()),hy(Ly)),Wb(Nb([Lb,zb(Tb())]),Vy),Wb(Nb([Ub,zb(Tb())]),Vy),Wb(zb(Bb()),Py),Wb(zb(Db().concat(Eb())),Iy)]),Uy=ft([Wb(zb(Db()),ey)]),Wy=Jb(Ay,cy,jy,Uy,function(){return St.some(My)}),Gy=function(n,t,e,o){var r=function(n){return"button"===Da(n)&&"disabled"===fc(n,"disabled")},i=function(n,t,e){var u=um(t,o,0,e.length-1);return u===n?St.none():r(e[u])?i(n,u,e):St.from(e[u])};return Sy(n,e,t).bind(function(n){var t=n.index(),e=n.candidates();return i(t,t,e)})},Xy=[br("selector"),Pr("getInitial",St.none),Pr("execute",ty),Dl("onEscape"),Pr("executeOnMove",!1),Pr("allowVertical",!0)],Yy=function(n,t){return t.focusManager.get(n).bind(function(n){return ul(n,t.selector)})},qy=function(n,t,e){return Yy(n,e).bind(function(o){return e.execute(n,t,o)})},Ky=function(n,t){t.getInitial(n).orThunk(function(){return il(n.element(),t.selector)}).each(function(e){t.focusManager.set(n,e)})},Jy=function(n,t,e){return Gy(n,e.selector,t,-1)},$y=function(n,t,e){return Gy(n,e.selector,t,1)},Qy=function(n){return function(t,e,o,r){return n(t,e,o,r).bind(function(){return o.executeOnMove?qy(t,e,o):St.some(!0)})}},Zy=function(n,t,e){return e.onEscape(n,t)},nx=function(n,t,e){var o=Ab().concat(e.allowVertical?Mb():[]),r=Fb().concat(e.allowVertical?Ib():[]);return[Wb(zb(o),Qy(dy(Jy,$y))),Wb(zb(r),Qy(my(Jy,$y))),Wb(zb(Eb()),qy),Wb(zb(Db()),qy),Wb(zb(Bb()),Zy)]},tx=ft([Wb(zb(Db()),ey)]),ex=Jb(Xy,jc.init,nx,tx,function(){return St.some(Ky)}),ox=function(n,t,e){return St.from(n[t]).bind(function(n){return St.from(n[e]).map(function(n){return{rowIndex:t,columnIndex:e,cell:n}})})},rx=function(n,t,e,o){var r=n[t],i=r.length,u=um(e,o,0,i-1);return ox(n,t,u)},ix=function(n,t,e,o){var r=um(e,o,0,n.length-1),i=n[r].length,u=am(t,0,i-1);return ox(n,r,u)},ux=function(n,t,e,o){var r=n[t],i=r.length,u=am(e+o,0,i-1);return ox(n,t,u)},ax=function(n,t,e,o){var r=am(e+o,0,n.length-1),i=n[r].length,u=am(t,0,i-1);return ox(n,r,u)},cx=function(n,t,e){return rx(n,t,e,1)},sx=function(n,t,e){return rx(n,t,e,-1)},fx=function(n,t,e){return ix(n,e,t,-1)},lx=function(n,t,e){return ix(n,e,t,1)},dx=function(n,t,e){return ux(n,t,e,-1)},mx=function(n,t,e){return ux(n,t,e,1)},gx=function(n,t,e){return ax(n,e,t,-1)},px=function(n,t,e){return ax(n,e,t,1)},vx=[_r("selectors",[br("row"),br("cell")]),Pr("cycles",!0),Pr("previousSelector",St.none),Pr("execute",ty)],hx=function(n,t){var e=t.previousSelector(n).orThunk(function(){var e=t.selectors;return il(n.element(),e.cell)});e.each(function(e){t.focusManager.set(n,e)})},bx=function(n,t,e){return Gd(n.element()).bind(function(o){return e.execute(n,t,o)})},yx=function(n,t){return Xt(n,function(n){return _g(n,t.selectors.cell)})},xx=function(n,t){return function(e,o,r){var i=r.cycles?n:t;return ul(o,r.selectors.row).bind(function(n){var t=_g(n,r.selectors.cell);return ky(t,o).bind(function(t){var o=_g(e,r.selectors.row);return ky(o,n).bind(function(n){var e=yx(o,r);return i(e,n,t).map(function(n){return n.cell})})})})}},wx=xx(sx,dx),Sx=xx(cx,mx),kx=xx(fx,gx),Cx=xx(lx,px),Ox=ft([Wb(zb(Ab()),dy(wx,Sx)),Wb(zb(Fb()),my(wx,Sx)),Wb(zb(Mb()),vy(kx)),Wb(zb(Ib()),hy(Cx)),Wb(zb(Db().concat(Eb())),bx)]),_x=ft([Wb(zb(Db()),ey)]),Tx=Jb(vx,jc.init,Ox,_x,function(){return St.some(hx)}),Ex=[br("selector"),Pr("execute",ty),Pr("moveOnTab",!1)],Bx=function(n,t,e){return e.focusManager.get(n).bind(function(o){return e.execute(n,t,o)})},Dx=function(n,t){il(n.element(),t.selector).each(function(e){t.focusManager.set(n,e)})},Ax=function(n,t,e){return Gy(n,e.selector,t,-1)},Mx=function(n,t,e){return Gy(n,e.selector,t,1)},Fx=function(n,t,e,o){return e.moveOnTab?by(Ax)(n,t,e,o):St.none()},Ix=function(n,t,e,o){return e.moveOnTab?by(Mx)(n,t,e,o):St.none()},Rx=ft([Wb(zb(Mb()),by(Ax)),Wb(zb(Ib()),by(Mx)),Wb(Nb([Lb,zb(Tb())]),Fx),Wb(Nb([Ub,zb(Tb())]),Ix),Wb(zb(Eb()),Bx),Wb(zb(Db()),Bx)]),Vx=ft([Wb(zb(Db()),ey)]),Px=Jb(Ex,jc.init,Rx,Vx,function(){return St.some(Dx)}),Hx=[Dl("onSpace"),Dl("onEnter"),Dl("onShiftEnter"),Dl("onLeft"),Dl("onRight"),Dl("onTab"),Dl("onShiftTab"),Dl("onUp"),Dl("onDown"),Dl("onEscape"),Pr("stopSpaceKeyup",!1),Br("focusIn")],zx=function(n,t,e){return[Wb(zb(Db()),e.onSpace),Wb(Nb([Ub,zb(Eb())]),e.onEnter),Wb(Nb([Lb,zb(Eb())]),e.onShiftEnter),Wb(Nb([Lb,zb(Tb())]),e.onShiftTab),Wb(Nb([Ub,zb(Tb())]),e.onTab),Wb(zb(Mb()),e.onUp),Wb(zb(Ib()),e.onDown),Wb(zb(Ab()),e.onLeft),Wb(zb(Fb()),e.onRight),Wb(zb(Db()),e.onSpace),Wb(zb(Bb()),e.onEscape)]},Nx=function(n,t,e){return e.stopSpaceKeyup?[Wb(zb(Db()),ey)]:[]},Lx=Jb(Hx,jc.init,zx,Nx,function(n){return n.focusIn}),jx=Qb.schema(),Ux=Zb.schema(),Wx=ex.schema(),Gx=Wy.schema(),Xx=Tx.schema(),Yx=ay.schema(),qx=Px.schema(),Kx=Lx.schema(),Jx=Object.freeze({__proto__:null,acyclic:jx,cyclic:Ux,flow:Wx,flatgrid:Gx,matrix:Xx,execution:Yx,menu:qx,special:Kx}),$x=function(n){return je(n,"setGridSize")},Qx=Ad({branchKey:"mode",branches:Jx,name:"keying",active:{events:function(n,t){var e=n.handler;return e.toEvents(n,t)}},apis:{focusIn:function(n,t,e){t.sendFocusIn(t).fold(function(){n.getSystem().triggerFocus(n.element(),n.element())},function(o){o(n,t,e)})},setGridSize:function(t,e,o,r,i){$x(o)?o.setGridSize(r,i):n.console.error("Layout does not support setGridSize")}},state:fy}),Zx=function(n,t,e,o){Xd(function(){var t=Xt(o,n.getSystem().build);Tp(n,t)},n.element())},nw=function(n,t,e,o){var r=n.getSystem().build(o);Bp(n,r,e)},tw=function(n,t,e,o){nw(n,t,Ja,o)},ew=function(n,t,e,o){nw(n,t,Ka,o)},ow=function(n,t,e,o){var r=rw(n),i=ne(r,function(n){return ou(o.element(),n.element())});i.each(Ap)},rw=function(n){return n.components()},iw=function(n,t,e,o,r){var i=rw(n);return St.from(i[o]).map(function(i){return ow(n,t,e,i),r.each(function(e){nw(n,t,function(n,t){$a(n,t,o)},e)}),i})},uw=function(n,t,e,o,r){var i=rw(n);return te(i,o).bind(function(o){return iw(n,t,e,o,r)})},aw=Object.freeze({__proto__:null,append:tw,prepend:ew,remove:ow,replaceAt:iw,replaceBy:uw,set:Zx,contents:rw}),cw=Bd({fields:[],name:"replacing",apis:aw}),sw=function(n,t){var e=da(t);return Bd({fields:[br("enabled")],name:n,active:{events:ft(e)}})},fw=function(n,t){var e=sw(n,t);return{key:n,value:{config:{},me:e,configAsRaw:ft({}),initialConfig:{},state:jc}}},lw=function(n,t){t.ignore||(Ld(n.element()),t.onFocus(n))},dw=function(n,t){t.ignore||jd(n.element())},mw=function(n){return Ud(n.element())},gw=Object.freeze({__proto__:null,focus:lw,blur:dw,isFocused:mw}),pw=function(n,t){var e=t.ignore?{}:{attributes:{tabindex:"-1"}};return qc(e)},vw=function(n){return da([va(Ru(),function(t,e){lw(t,n),e.stop()})].concat(n.stopMousedown?[va(xu(),function(n,t){t.event().prevent()})]:[]))},hw=Object.freeze({__proto__:null,exhibit:pw,events:vw}),bw=[Bl("onFocus"),Pr("stopMousedown",!1),Pr("ignore",!1)],yw=Bd({fields:bw,name:"focusing",active:hw,apis:gw}),xw=function(n,t,e){var o=t.aria;o.update(n,o,e.get())},ww=function(n,t,e){t.toggleClass.each(function(t){e.get()?ws(n.element(),t):ks(n.element(),t)})},Sw=function(n,t,e){Ow(n,t,e,!e.get())},kw=function(n,t,e){e.set(!0),ww(n,t,e),xw(n,t,e)},Cw=function(n,t,e){e.set(!1),ww(n,t,e),xw(n,t,e)},Ow=function(n,t,e,o){var r=o?kw:Cw;r(n,t,e)},_w=function(n,t,e){return e.get()},Tw=function(n,t,e){Ow(n,t,e,t.selected)},Ew=Object.freeze({__proto__:null,onLoad:Tw,toggle:Sw,isOn:_w,on:kw,off:Cw,set:Ow}),Bw=function(){return qc({})},Dw=function(n,t){var e=xd(n,t,Sw),o=wd(n,t,Tw);return da(ee([n.toggleOnExecute?[e]:[],[o]]))},Aw=Object.freeze({__proto__:null,exhibit:Bw,events:Dw}),Mw=function(n){var t=function(){var t=qr(n),e=function(){return t.get()},o=function(n){return t.set(n)},r=function(){return t.set(n)},i=function(){return t.get()};return{get:e,set:o,clear:r,readState:i}};return{init:t}},Fw=function(n,t,e){cc(n.element(),"aria-pressed",e),t.syncWithExpanded&&Vw(n,t,e)},Iw=function(n,t,e){cc(n.element(),"aria-selected",e)},Rw=function(n,t,e){cc(n.element(),"aria-checked",e)},Vw=function(n,t,e){cc(n.element(),"aria-expanded",e)},Pw=[Pr("selected",!1),Br("toggleClass"),Pr("toggleOnExecute",!0),Hr("aria",{mode:"none"},cr("mode",{pressed:[Pr("syncWithExpanded",!1),Fl("update",Fw)],checked:[Fl("update",Rw)],expanded:[Fl("update",Vw)],selected:[Fl("update",Iw)],none:[Fl("update",ut)]}))],Hw=Bd({fields:Pw,name:"toggling",active:Aw,apis:Ew,state:Mw(!1)}),zw=function(){var n=function(n,t){t.stop(),ca(n)};return[va(Au(),n),va(Lu(),n),ka(vu()),ka(xu())]},Nw=function(n){var t=function(n){return Ba(function(t,e){n(t),e.stop()})};return da(ee([n.map(t).toArray(),zw()]))},Lw="alloy.item-hover",jw="alloy.item-focus",Uw=function(n){(Gd(n.element()).isNone()||yw.isFocused(n))&&(yw.isFocused(n)||yw.focus(n),aa(n,Lw,{item:n}))},Ww=function(n){aa(n,jw,{item:n})},Gw=ft(Lw),Xw=ft(jw),Yw=function(n){return{dom:n.dom,domModification:ht(ht({},n.domModification),{attributes:ht(ht(ht({role:n.toggling.isSome()?"menuitemcheckbox":"menuitem"},n.domModification.attributes),{"aria-haspopup":n.hasSubmenu}),n.hasSubmenu?{"aria-expanded":!1}:{})}),behaviours:jv.augment(n.itemBehaviours,[n.toggling.fold(Hw.revoke,function(n){return Hw.config(ht({aria:{mode:"checked"}},n))}),yw.config({ignore:n.ignoreFocus,stopMousedown:n.ignoreFocus,onFocus:function(n){Ww(n)}}),Qx.config({mode:"execution"}),Hv.config({store:{mode:"memory",initialValue:n.data}}),fw("item-type-events",o(zw(),[va(Cu(),Uw),va(Nu(),yw.focus)]))]),components:n.components,eventOrder:n.eventOrder}},qw=[br("data"),br("components"),br("dom"),Pr("hasSubmenu",!1),Br("toggling"),jv.field("itemBehaviours",[Hw,yw,Qx,Hv]),Pr("ignoreFocus",!1),Pr("domModification",{}),Fl("builder",Yw),Pr("eventOrder",{})],Kw=function(n){return{dom:n.dom,components:n.components,events:da([Ca(Nu())])}},Jw=[br("dom"),br("components"),Fl("builder",Kw)],$w=function(){return"item-widget"},Qw=ft([hh({name:"widget",overrides:function(n){return{behaviours:Td([Hv.config({store:{mode:"manual",getValue:function(){return n.data},setValue:function(){}}})])}}})]),Zw=function(n){var t=Dh($w(),n,Qw()),e=Ah($w(),n,t.internals()),o=function(t){return Mh(t,n,"widget").map(function(n){return Qx.focusIn(n),n})},r=function(t,e){return tb(e.event().target())?St.none():function(){return n.autofocus?(e.setSource(t.element()),St.none()):St.none()}()};return{dom:n.dom,components:e,domModification:n.domModification,events:da([Ba(function(n,t){o(n).each(function(){t.stop()})}),va(Cu(),Uw),va(Nu(),function(t){n.autofocus?o(t):yw.focus(t)})]),behaviours:jv.augment(n.widgetBehaviours,[Hv.config({store:{mode:"memory",initialValue:n.data}}),yw.config({ignore:n.ignoreFocus,onFocus:function(n){Ww(n)}}),Qx.config({mode:"special",focusIn:n.autofocus?function(n){o(n)}:Md(),onLeft:r,onRight:r,onEscape:function(t,e){return yw.isFocused(t)||n.autofocus?n.autofocus?(e.setSource(t.element()),St.none()):St.none():(yw.focus(t),St.some(!0))}})])}},nS=[br("uid"),br("data"),br("components"),br("dom"),Pr("autofocus",!1),Pr("ignoreFocus",!1),jv.field("widgetBehaviours",[Hv,yw,Qx]),Pr("domModification",{}),zh(Qw()),Fl("builder",Zw)],tS=cr("type",{widget:nS,item:qw,separator:Jw}),eS=function(n,t){return{mode:"flatgrid",selector:"."+n.markers.item,initSize:{numColumns:t.initSize.numColumns,numRows:t.initSize.numRows},focusManager:n.focusManager}},oS=function(n,t){return{mode:"matrix",selectors:{row:t.rowSelector,cell:"."+n.markers.item},focusManager:n.focusManager}},rS=function(n,t){return{mode:"menu",selector:"."+n.markers.item,moveOnTab:t.moveOnTab,focusManager:n.focusManager}},iS=ft([xh({factory:{sketch:function(n){var t=ir("menu.spec item",tS,n);return t.builder(t)}},name:"items",unit:"item",defaults:function(n,t){return t.hasOwnProperty("uid")?t:ht(ht({},t),{uid:Dc("item")})},overrides:function(n,t){return{type:t.type,ignoreFocus:n.fakeFocus,domModification:{classes:[n.markers.item]}}}})]),uS=ft([br("value"),br("items"),br("dom"),br("components"),Pr("eventOrder",{}),zv("menuBehaviours",[Ob,Hv,ib,Qx]),Hr("movement",{mode:"menu",moveOnTab:!0},cr("mode",{grid:[Rl(),Fl("config",eS)],matrix:[Fl("config",oS),br("rowSelector")],menu:[Pr("moveOnTab",!0),Fl("config",rS)]})),Ol(),Pr("fakeFocus",!1),Pr("focusManager",Yb()),Bl("onHighlight")]),aS=ft("alloy.menu-focus"),cS=function(n,t){return{uid:n.uid,dom:n.dom,markers:n.markers,behaviours:Lv(n.menuBehaviours,[Ob.config({highlightClass:n.markers.selectedItem,itemClass:n.markers.item,onHighlight:n.onHighlight}),Hv.config({store:{mode:"memory",initialValue:n.value}}),ib.config({find:St.some}),Qx.config(n.movement.config(n,n.movement))]),events:da([va(Xw(),function(n,t){var e=t.event();n.getSystem().getByDom(e.target()).each(function(e){Ob.highlight(n,e),t.stop(),aa(n,aS(),{menu:n,item:e})})}),va(Gw(),function(n,t){var e=t.event().item();Ob.highlight(n,e)})]),components:t,eventOrder:n.eventOrder,domModification:{attributes:{role:"menu"}}}},sS=Jh({name:"Menu",configFields:uS(),partFields:iS(),factory:cS}),fS=function(n){return Fe(n,function(n,t){return{k:n,v:t}})},lS=function(n,t,e,o){return Ne(e,o).bind(function(o){return Ne(n,o).bind(function(o){var r=lS(n,t,e,o);return St.some([o].concat(r))})}).getOr([])},dS=function(n,t){var e={};Ae(n,function(n,t){Yt(n,function(n){e[n]=t})});var o=t,r=fS(t),i=Me(r,function(n,t){return[t].concat(lS(e,o,r,t))});return Me(e,function(n){return Ne(i,n).getOr([n])})},mS=function(){var n=qr({}),t=qr({}),e=qr({}),o=qr(St.none()),r=qr({}),i=function(){n.set({}),t.set({}),e.set({}),o.set(St.none())},u=function(){return o.get().isNone()},a=function(n,e){var o;t.set(ht(ht({},t.get()),(o={},o[n]={type:"prepared",menu:e},o)))},c=function(i,u,a,c){o.set(St.some(i)),n.set(a),t.set(u),r.set(c);var s=dS(c,a);e.set(s)},s=function(t){return He(n.get(),function(n){return n===t})},f=function(n,t,e){return p(n).bind(function(o){return s(n).bind(function(n){return t(n).map(function(n){return{triggeredMenu:o,triggeringItem:n,triggeringPath:e}})})})},l=function(n,t){var r=Jt(h(n).toArray(),function(n){return p(n).isSome()});return Ne(e.get(),n).bind(function(n){var e=ie(r.concat(n)),i=oe(e,function(n,r){return f(n,t,e.slice(0,r+1)).fold(function(){return o.get().is(n)?[]:[St.none()]},function(n){return[St.some(n)]})});return Qh(i)})},d=function(t){return Ne(n.get(),t).map(function(n){var o=Ne(e.get(),t).getOr([]);return[n].concat(o)})},m=function(n){return Ne(e.get(),n).bind(function(n){return n.length>1?St.some(n.slice(1)):St.none()})},g=function(n){return Ne(e.get(),n)},p=function(n){return v(n).bind(gS)},v=function(n){return Ne(t.get(),n)},h=function(t){return Ne(n.get(),t)},b=function(n){var t=r.get();return ue(Be(t),n)},y=function(){return o.get().bind(p)},x=function(){return t.get()};return{setMenuBuilt:a,setContents:c,expand:d,refresh:g,collapse:m,lookupMenu:v,lookupItem:h,otherMenus:b,getPrimary:y,getMenus:x,clear:i,isClear:u,getTriggeringPath:l}},gS=function(n){return"prepared"===n.type?St.some(n.menu):St.none()},pS={init:mS,extractPreparedMenu:gS},vS=function(n){var t,e=qr(St.none()),o=function(t,e,o){return Me(o,function(o,r){var i=function(){return sS.sketch(ht(ht({},o),{value:r,markers:n.markers,fakeFocus:n.fakeFocus,onHighlight:n.onHighlight,focusManager:n.fakeFocus?qb():Yb()}))};return r===e?{type:"prepared",menu:t.getSystem().build(i())}:{type:"notbuilt",nbMenu:i}})},r=pS.init(),i=function(t){var e=o(t,n.data.primary,n.data.menus),i=c();return r.setContents(n.data.primary,e,n.data.expansions,i),r.getPrimary()},u=function(n){return Hv.getValue(n).value},a=function(n,t,e){return de(t,function(n){if(!n.getSystem().isConnected())return St.none();var t=Ob.getCandidates(n);return ne(t,function(n){return u(n)===e})})},c=function(){return Me(n.data.menus,function(n){return oe(n.items,function(n){return"separator"===n.type?[]:[n.data.value]})})},s=function(n,t){Ob.highlight(n,t),Ob.getHighlighted(t).orThunk(function(){return Ob.getFirst(t)}).each(function(t){sa(n,t.element(),Nu())})},f=function(n,t){return $h(Xt(t,function(t){return n.lookupMenu(t).bind(function(n){return"prepared"===n.type?St.some(n.menu):St.none()})}))},l=function(t,e,o){var r=f(e,e.otherMenus(o));Yt(r,function(e){_s(e.element(),[n.markers.backgroundMenu]),n.stayInDom||cw.remove(t,e)})},d=function(t){return e.get().getOrThunk(function(){var o={},r=_g(t.element(),"."+n.markers.item),i=Jt(r,function(n){return"true"===fc(n,"aria-haspopup")});return Yt(i,function(n){t.getSystem().getByDom(n).each(function(n){var t=u(n);o[t]=n})}),e.set(St.some(o)),o})},m=function(n,t){var e=d(n);Ae(e,function(n,e){var o=jt(t,e);cc(n.element(),"aria-expanded",o)})},g=function(t,e,o){return St.from(o[0]).bind(function(r){return e.lookupMenu(r).bind(function(r){if("notbuilt"===r.type)return St.none();var i=r.menu,u=f(e,o.slice(1));return Yt(u,function(t){ws(t.element(),n.markers.backgroundMenu)}),Ps(i.element())||cw.append(t,gf(i)),_s(i.element(),[n.markers.backgroundMenu]),s(t,i),l(t,e,o),St.some(i)})})};!function(n){n[n.HighlightSubmenu=0]="HighlightSubmenu",n[n.HighlightParent=1]="HighlightParent"}(t||(t={}));var p=function(n,t,e){if("notbuilt"===e.type){var o=n.getSystem().build(e.nbMenu());return r.setMenuBuilt(t,o),o}return e.menu},v=function(e,o,i){void 0===i&&(i=t.HighlightSubmenu);var a=u(o);return r.expand(a).bind(function(u){return m(e,u),St.from(u[0]).bind(function(a){return r.lookupMenu(a).bind(function(c){var s=p(e,a,c);return Ps(s.element())||cw.append(e,gf(s)),n.onOpenSubmenu(e,o,s,ie(u)),i===t.HighlightSubmenu?(Ob.highlightFirst(s),g(e,r,u)):(Ob.dehighlightAll(s),St.some(o))})})})},h=function(t,e){var o=u(e);return r.collapse(o).bind(function(o){return m(t,o),g(t,r,o).map(function(o){return n.onCollapseMenu(t,e,o),o})})},b=function(n,t){var e=u(t);return r.refresh(e).bind(function(t){return m(n,t),g(n,r,t)})},y=function(n,e){return tb(e.element())?St.none():v(n,e,t.HighlightSubmenu)},x=function(n,t){return tb(t.element())?St.none():h(n,t)},w=function(t,e){return h(t,e).orThunk(function(){return n.onEscape(t,e).map(function(){return t})})},S=function(t){return function(e,o){return ul(o.getSource(),"."+n.markers.item).bind(function(n){return e.getSystem().getByDom(n).toOption().bind(function(n){return t(e,n).map(function(){return!0})})})}},k=da([va(aS(),function(n,t){var e=t.event().item();r.lookupItem(u(e)).each(function(){var e=t.event().menu();Ob.highlight(n,e);var o=u(t.event().item());r.refresh(o).each(function(t){return l(n,r,t)})})}),Ba(function(e,o){var r=o.event().target();e.getSystem().getByDom(r).each(function(o){var r=u(o);0===r.indexOf("collapse-item")&&h(e,o),v(e,o,t.HighlightSubmenu).fold(function(){n.onExecute(e,o)},function(){})})}),_a(function(t){i(t).each(function(e){cw.append(t,gf(e)),n.onOpenMenu(t,e),n.highlightImmediately&&s(t,e)})})].concat(n.navigateOnHover?[va(Gw(),function(e,o){var r=o.event().item();b(e,r),v(e,r,t.HighlightParent),n.onHover(e,r)})]:[])),C=function(n){return Ob.getHighlighted(n).bind(Ob.getHighlighted)},O=function(n){C(n).each(function(t){h(n,t)})},_=function(n){r.getPrimary().each(function(t){s(n,t)})},T=function(n){return St.from(n.components()[0]).filter(function(n){return"menu"===fc(n.element(),"role")})},E=function(t){var e=r.getPrimary().bind(function(n){return C(t).bind(function(n){var e=u(n),o=ze(r.getMenus()),i=$h(Xt(o,pS.extractPreparedMenu));return r.getTriggeringPath(e,function(n){return a(t,i,n)})}).map(function(t){return{primary:n,triggeringPath:t}})});e.fold(function(){T(t).each(function(e){n.onRepositionMenu(t,e,[])})},function(e){var o=e.primary,r=e.triggeringPath;n.onRepositionMenu(t,o,r)})},B={collapseMenu:O,highlightPrimary:_,repositionMenus:E};return{uid:n.uid,dom:n.dom,markers:n.markers,behaviours:Lv(n.tmenuBehaviours,[Qx.config({mode:"special",onRight:S(y),onLeft:S(x),onEscape:S(w),focusIn:function(n){r.getPrimary().each(function(t){sa(n,t.element(),Nu())})}}),Ob.config({highlightClass:n.markers.selectedMenu,itemClass:n.markers.menu}),ib.config({find:function(n){return Ob.getHighlighted(n)}}),cw.config({})]),eventOrder:n.eventOrder,apis:B,events:k}},hS=ft("collapse-item"),bS=function(n,t,e){return{primary:n,menus:t,expansions:e}},yS=function(n,t){return{primary:n,menus:fo(n,t),expansions:{}}},xS=function(n){return{value:Sc(hS()),meta:{text:n}}},wS=Kh({name:"TieredMenu",configFields:[Ml("onExecute"),Ml("onEscape"),Al("onOpenMenu"),Al("onOpenSubmenu"),Bl("onRepositionMenu"),Bl("onCollapseMenu"),Pr("highlightImmediately",!0),_r("data",[br("primary"),br("menus"),br("expansions")]),Pr("fakeFocus",!1),Bl("onHighlight"),Bl("onHover"),_l(),br("dom"),Pr("navigateOnHover",!0),Pr("stayInDom",!1),zv("tmenuBehaviours",[Qx,Ob,ib,cw]),Pr("eventOrder",{})],apis:{collapseMenu:function(n,t){n.collapseMenu(t)},highlightPrimary:function(n,t){n.highlightPrimary(t)},repositionMenus:function(n,t){n.repositionMenus(t)}},factory:vS,extraApis:{tieredData:bS,singleData:yS,collapseItem:xS}}),SS=function(n,t,e,o,r){var i=function(){return n.lazySink(t)},u="horizontal"===o.type?{layouts:{onLtr:function(){return bd()},onRtl:function(){return yd()}}}:{},a=function(n){return 2===n.length},c=function(n){return a(n)?u:{}};return wS.sketch({dom:{tag:"div"},data:o.data,markers:o.menu.markers,highlightImmediately:o.menu.highlightImmediately,onEscape:function(){return ev.close(t),n.onEscape.map(function(n){return n(t)
}),St.some(!0)},onExecute:function(){return St.some(!0)},onOpenMenu:function(n,t){Sp.positionWithinBounds(i().getOrDie(),e,t,r())},onOpenSubmenu:function(n,t,e,o){var r=i().getOrDie();Sp.position(r,ht({anchor:"submenu",item:t},c(o)),e)},onRepositionMenu:function(n,t,o){var u=i().getOrDie();Sp.positionWithinBounds(u,e,t,r()),Yt(o,function(n){var t=c(n.triggeringPath);Sp.position(u,ht({anchor:"submenu",item:n.triggeringItem},t),n.triggeredMenu)})}})},kS=function(n,t){var e=function(t,e){var o=n.getRelated(t);return o.exists(function(n){return fl(n,e)})},o=function(n,t){ev.setContent(n,t)},r=function(n,t,e){i(n,t,e,St.none())},i=function(n,t,e,o){u(n,t,e,function(){return o.map(function(n){return $f(n)})})},u=function(t,e,o,r){var i=n.lazySink(t).getOrDie();ev.openWhileCloaked(t,o,function(){return Sp.positionWithinBounds(i,e,t,r())}),Hv.setValue(t,St.some({mode:"position",anchor:e,getBounds:r}))},a=function(n,t,e){c(n,t,e,function(){return St.none()})},c=function(t,e,o,r){var i=SS(n,t,e,o,r);ev.open(t,i),Hv.setValue(t,St.some({mode:"menu",menu:i}))},s=function(n){ev.isOpen(n)&&(Hv.setValue(n,St.none()),ev.close(n))},f=function(n){return ev.getState(n)},l=function(t){ev.isOpen(t)&&Hv.getValue(t).each(function(e){switch(e.mode){case"menu":ev.getState(t).each(function(n){wS.repositionMenus(n)});break;case"position":var o=n.lazySink(t).getOrDie();Sp.positionWithinBounds(o,e.anchor,t,e.getBounds())}})},d={setContent:o,showAt:r,showWithin:i,showWithinBounds:u,showMenuAt:a,showMenuWithinBounds:c,hide:s,getContent:f,reposition:l,isOpen:ev.isOpen};return{uid:n.uid,dom:n.dom,behaviours:Lv(n.inlineBehaviours,[ev.config({isPartOf:function(n,t,o){return fl(t,o)||e(n,o)},getAttachPoint:function(t){return n.lazySink(t).getOrDie()},onOpen:function(t){n.onShow(t)},onClose:function(t){n.onHide(t)}}),Hv.config({store:{mode:"memory",initialValue:St.none()}}),Pd.config({channels:ht(ht({},av(ht({isExtraPart:t.isExtraPart},n.fireDismissalEventInstead.map(function(n){return{fireEventInstead:{event:n.event}}}).getOr({})))),sv(ht(ht({},n.fireRepositionEventInstead.map(function(n){return{fireEventInstead:{event:n.event}}}).getOr({})),{doReposition:l})))})]),eventOrder:n.eventOrder,apis:d}},CS=Kh({name:"InlineView",configFields:[br("lazySink"),Bl("onShow"),Bl("onHide"),Fr("onEscape"),zv("inlineBehaviours",[ev,Hv,Pd]),Rr("fireDismissalEventInstead",[Pr("event",Qu())]),Rr("fireRepositionEventInstead",[Pr("event",Zu())]),Pr("getRelated",St.none),Pr("isExtraPart",gt),Pr("eventOrder",St.none)],factory:kS,apis:{showAt:function(n,t,e,o){n.showAt(t,e,o)},showWithin:function(n,t,e,o,r){n.showWithin(t,e,o,r)},showWithinBounds:function(n,t,e,o,r){n.showWithinBounds(t,e,o,r)},showMenuAt:function(n,t,e,o){n.showMenuAt(t,e,o)},showMenuWithinBounds:function(n,t,e,o,r){n.showMenuWithinBounds(t,e,o,r)},hide:function(n,t){n.hide(t)},isOpen:function(n,t){return n.isOpen(t)},getContent:function(n,t){return n.getContent(t)},setContent:function(n,t,e){n.setContent(t,e)},reposition:function(n,t){n.reposition(t)}}}),OS=function(n){return n.x},_S=function(n,t){return n.x+n.width/2-t.width/2},TS=function(n,t){return n.x+n.width-t.width},ES=function(n){return n.y},BS=function(n,t){return n.y+n.height-t.height},DS=function(n,t,e){return Vl(TS(n,t),BS(n,t),e.innerSoutheast(),Wl(),Jl(n,{right:0,bottom:3}),"layout-inner-se")},AS=function(n,t,e){return Vl(OS(n),BS(n,t),e.innerSouthwest(),Ul(),Jl(n,{left:1,bottom:3}),"layout-inner-sw")},MS=function(n,t,e){return Vl(TS(n,t),ES(n),e.innerNortheast(),jl(),Jl(n,{right:0,top:2}),"layout-inner-ne")},FS=function(n,t,e){return Vl(OS(n),ES(n),e.innerNorthwest(),Ll(),Jl(n,{left:1,top:2}),"layout-inner-nw")},IS=function(n,t,e){return Vl(_S(n,t),ES(n),e.innerNorth(),Gl(),Jl(n,{top:2}),"layout-inner-n")},RS=function(n,t,e){return Vl(_S(n,t),BS(n,t),e.innerSouth(),Xl(),Jl(n,{bottom:3}),"layout-inner-s")},VS=tinymce.util.Tools.resolve("tinymce.util.Delay"),PS=function(n){var t=Nw(n.action),e=n.dom.tag,o=function(t){return Ne(n.dom,"attributes").bind(function(n){return Ne(n,t)})},r=function(){if("button"===e){var n=o("type").getOr("button"),t=o("role").map(function(n){return{role:n}}).getOr({});return ht({type:n},t)}var r=o("role").getOr("button");return{role:r}};return{uid:n.uid,dom:n.dom,components:n.components,events:t,behaviours:jv.augment(n.buttonBehaviours,[yw.config({}),Qx.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:r()},eventOrder:n.eventOrder}},HS=Kh({name:"Button",factory:PS,configFields:[Pr("uid",void 0),br("dom"),Pr("components",[]),jv.field("buttonBehaviours",[yw,Qx]),Br("action"),Br("role"),Pr("eventOrder",{})]}),zS=function(n){var t=a(n)&&je(n,"uid")?n.uid:Dc("memento"),e=function(n){return n.getSystem().getByUid(t).getOrDie()},o=function(n){return n.getSystem().getByUid(t).toOption()},r=function(){return ht(ht({},n),{uid:t})};return{get:e,getOpt:o,asSpec:r}},NS=function(n){return St.from(n()["temporary-placeholder"]).getOr("!not found!")},LS=function(n,t){return St.from(t()[n.toLowerCase()]).getOrThunk(function(){return NS(t)})},jS=function(n,t,e){return St.from(t()[n.toLowerCase()]).or(e).getOrThunk(function(){return NS(t)})},US=function(n,t){return de(n,function(n){return St.from(t()[n.toLowerCase()])}).getOrThunk(function(){return NS(t)})},WS={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},GS=function(n){var t=zS({dom:{tag:"p",innerHtml:n.translationProvider(n.text)},behaviours:Td([cw.config({})])}),e=function(n){return{dom:{tag:"div",classes:["tox-bar"],attributes:{style:"width: "+n+"%"}}}},o=function(n){return{dom:{tag:"div",classes:["tox-text"],innerHtml:n+"%"}}},r=zS({dom:{tag:"div",classes:n.progress?["tox-progress-bar","tox-progress-indicator"]:["tox-progress-bar"]},components:[{dom:{tag:"div",classes:["tox-bar-container"]},components:[e(0)]},o(0)],behaviours:Td([cw.config({})])}),i=function(n,t){n.getSystem().isConnected()&&r.getOpt(n).each(function(n){cw.set(n,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[e(t)]},o(t)])})},u=function(n,e){if(n.getSystem().isConnected()){var o=t.get(n);cw.set(o,[ff(e)])}},a={updateProgress:i,updateText:u},c=ee([n.icon.toArray(),n.level.toArray(),n.level.bind(function(n){return St.from(WS[n])}).toArray()]);return{uid:n.uid,dom:{tag:"div",attributes:{role:"alert"},classes:n.level.map(function(n){return["tox-notification","tox-notification--in","tox-notification--"+n]}).getOr(["tox-notification","tox-notification--in"])},components:[{dom:{tag:"div",classes:["tox-notification__icon"],innerHtml:US(c,n.iconProvider)}},{dom:{tag:"div",classes:["tox-notification__body"]},components:[t.asSpec()],behaviours:Td([cw.config({})])}].concat(n.progress?[r.asSpec()]:[]).concat(n.closeButton?[HS.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"]},components:[{dom:{tag:"div",classes:["tox-icon"],innerHtml:LS("close",n.iconProvider),attributes:{"aria-label":n.translationProvider("Close")}}}],action:function(t){n.onAction(t)}})]:[]),apis:a}},XS=Kh({name:"Notification",factory:GS,configFields:[Br("level"),br("progress"),br("icon"),br("onAction"),br("text"),br("iconProvider"),br("translationProvider"),jr("closeButton",!0)],apis:{updateProgress:function(n,t,e){n.updateProgress(t,e)},updateText:function(n,t,e){n.updateText(t,e)}}}),YS=function(t,e){var o=null,r=function(){null!==o&&(n.clearTimeout(o),o=null)},i=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];null===o&&(o=n.setTimeout(function(){t.apply(null,r),o=null},e))};return{cancel:r,throttle:i}},qS=function(t,e){var o=null,r=function(){null!==o&&(n.clearTimeout(o),o=null)},i=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];null!==o&&n.clearTimeout(o),o=n.setTimeout(function(){t.apply(null,r),o=null},e)};return{cancel:r,throttle:i}},KS=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker"),JS=function(n,t){return n.isBlock(t)||jt(["BR","IMG","HR","INPUT"],t.nodeName)||"false"===n.getContentEditable(t)},$S=function(n,t,e,o,r){var i=KS(n,function(t){return JS(n,t)});return St.from(i.backwards(t,e,o,r))},QS="[data-mce-autocompleter]",ZS=function(n,t){return nk(ni.fromDom(n.selection.getNode())).getOrThunk(function(){var e=ni.fromHtml('<span data-mce-autocompleter="1" data-mce-bogus="1"></span>',n.getDoc());return Ja(e,ni.fromDom(t.extractContents())),t.insertNode(e.dom()),La(e).each(function(n){return n.dom().normalize()}),Cg(e).map(function(t){n.selection.setCursorLocation(t.dom(),xg(t))}),e})},nk=function(n){return ul(n,QS)},tk=function(n){return n.collapsed&&3===n.startContainer.nodeType},ek=function(n){return n.toString().replace(/\u00A0/g," ").replace(/\uFEFF/g,"")},ok=function(n){return""!==n&&-1!=="  \f\n\r ".indexOf(n)},rk=function(n,t){return n.substring(t.length)},ik=function(n,t,e){var o;for(o=t-1;o>=0;o--){var r=n.charAt(o);if(ok(r))return St.none();if(r===e)break}return St.some(o)},uk=function(n,t,e,o){if(void 0===o&&(o=0),!tk(t))return St.none();var r=function(n,t,o){return ik(o,t,e).getOr(t)},i=n.getParent(t.startContainer,n.isBlock)||n.getRoot();return $S(n,t.startContainer,t.startOffset,r,i).bind(function(n){var r=t.cloneRange();if(r.setStart(n.container,n.offset),r.setEnd(t.endContainer,t.endOffset),r.collapsed)return St.none();var i=ek(r),u=i.lastIndexOf(e);return 0!==u||rk(i,e).length<o?St.none():St.some({text:rk(i,e),range:r,triggerChar:e})})},ak=function(n,t,e,o){return void 0===o&&(o=0),nk(ni.fromDom(t.startContainer)).fold(function(){return uk(n,t,e,o)},function(t){var o=n.createRng();o.selectNode(t.dom());var r=ek(o);return St.some({range:o,text:rk(r,e),triggerChar:e})})},ck=function(n,t){t.on("keypress compositionend",n.onKeypress.throttle),t.on("remove",n.onKeypress.cancel);var e=function(n,t){aa(n,Tu(),{raw:t})};t.on("keydown",function(t){var o=function(){return n.getView().bind(Ob.getHighlighted)};8===t.which&&n.onKeypress.throttle(t),n.isActive()&&(27===t.which&&n.cancelIfNecessary(),n.isMenuOpen()?13===t.which?(o().each(ca),t.preventDefault()):40===t.which?(o().fold(function(){n.getView().each(Ob.highlightFirst)},function(n){e(n,t)}),t.preventDefault(),t.stopImmediatePropagation()):(37===t.which||38===t.which||39===t.which)&&o().each(function(n){e(n,t),t.preventDefault(),t.stopImmediatePropagation()}):(13===t.which||38===t.which||40===t.which)&&n.cancelIfNecessary())}),t.on("NodeChange",function(t){n.isActive()&&!n.isProcessingAction()&&nk(ni.fromDom(t.element)).isNone()&&n.cancelIfNecessary()})},sk={setup:ck},fk=tinymce.util.Tools.resolve("tinymce.util.Promise"),lk=function(n,t){return{container:n,offset:t}},dk=function(t){return t.nodeType===n.Node.TEXT_NODE},mk=function(t){return t.nodeType===n.Node.ELEMENT_NODE},gk=function(n){if(dk(n))return lk(n,n.data.length);var t=n.childNodes;return t.length>0?gk(t[t.length-1]):lk(n,t.length)},pk=function(n,t){var e=n.childNodes;return e.length>0&&t<e.length?pk(e[t],0):e.length>0&&mk(n)&&e.length===t?gk(e[e.length-1]):lk(n,t)},vk=function(n,t){return $S(n,t.container,t.offset,function(n,t){return 0===t?-1:t},n.getRoot()).filter(function(n){var t=n.container.data.charAt(n.offset-1);return!ok(t)}).isSome()},hk=function(n){return function(t){var e=pk(t.startContainer,t.startOffset);return!vk(n,e)}},bk=function(n,t,e){return de(e.triggerChars,function(e){return ak(n,t,e)})},yk=function(n,t){var e=t(),o=n.selection.getRng();return bk(n.dom,o,e).bind(function(e){return xk(n,t,e)})},xk=function(n,t,e,o){void 0===o&&(o={});var r=t(),i=n.selection.getRng(),u=i.startContainer.nodeValue,a=Jt(r.lookupByChar(e.triggerChar),function(t){return e.text.length>=t.minChars&&t.matches.getOrThunk(function(){return hk(n.dom)})(e.range,u,e.text)});if(0===a.length)return St.none();var c=fk.all(Xt(a,function(n){var t=n.fetch(e.text,n.maxResults,o);return t.then(function(t){return{matchText:e.text,items:t,columns:n.columns,onAction:n.onAction}})}));return St.some({lookupData:c,context:e})},wk=No([wr("type"),Mr("text")]),Sk=function(n){return or("separatormenuitem",wk,n)},kk=No([Yr("type",function(){return"autocompleteitem"}),Yr("active",function(){return!1}),Yr("disabled",function(){return!1}),Pr("meta",{}),wr("value"),Mr("text"),Mr("icon")]),Ck=No([wr("type"),wr("ch"),zr("minChars",1),Pr("columns",1),zr("maxResults",10),Fr("matches"),Cr("fetch"),Cr("onAction")]),Ok=function(n){return or("Autocompleter.Separator",wk,n)},_k=function(n){return or("Autocompleter.Item",kk,n)},Tk=function(n){return or("Autocompleter",Ck,n)},Ek=function(n){var t={};return Yt(n,function(n){t[n]={}}),Be(t)},Bk=function(n){var t=n.ui.registry.getAll().popups,e=Me(t,function(n){return Tk(n).fold(function(n){throw new Error(ur(n))},function(n){return n})}),o=Ek(Pe(e,function(n){return n.ch})),r=ze(e),i=function(n){return Jt(r,function(t){return t.ch===n})};return{dataset:e,triggerChars:o,lookupByChar:i}};!function(n){n[n.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",n[n.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX"}(Kb||(Kb={}));var Dk,Ak=Kb,Mk="tox-menu-nav__js",Fk="tox-collection__item",Ik="tox-swatch",Rk={normal:Mk,color:Ik},Vk="tox-collection__item--enabled",Pk="tox-collection__group-heading",Hk="tox-collection__item-icon",zk="tox-collection__item-label",Nk="tox-collection__item-accessory",Lk="tox-collection__item-caret",jk="tox-collection__item-checkmark",Uk="tox-collection__item--active",Wk="tox-collection__item-icon-rtl",Gk=function(n){return Ne(Rk,n).getOr(Mk)},Xk=function(n){return"color"===n?"tox-swatches":"tox-menu"},Yk=function(n){return{backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:Xk(n),tieredMenu:"tox-tiered-menu"}},qk=function(n){var t=Yk(n);return{backgroundMenu:t.backgroundMenu,selectedMenu:t.selectedMenu,menu:t.menu,selectedItem:t.selectedItem,item:Gk(n)}},Kk=function(n,t,e){var o=Yk(e);return{tag:"div",classes:ee([[o.menu,"tox-menu-"+t+"-column"],n?[o.hasIcons]:[]])}},Jk=[sS.parts().items({})],$k=function(n,t,e){var o=Yk(e),r={tag:"div",classes:ee([[o.tieredMenu]])};return{dom:r,markers:qk(e)}},Qk=function(n,t){return function(e){var o=Gt(e,t);return Xt(o,function(t){return{dom:n,components:t}})}},Zk=function(n){return{dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[sS.parts().items({preprocess:"auto"!==n?Qk({tag:"div",classes:["tox-swatches__row"]},n):lt})]}]}},nC=function(n){return{dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[sS.parts().items({preprocess:Qk({tag:"div",classes:["tox-collection__group"]},n)})]}},tC=function(n,t){var e=[],o=[];return Yt(n,function(n,r){t(n,r)?(o.length>0&&e.push(o),o=[],Le(n.dom,"innerHtml")&&o.push(n)):o.push(n)}),o.length>0&&e.push(o),Xt(e,function(n){return{dom:{tag:"div",classes:["tox-collection__group"]},components:n}})},eC=function(n,t){return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===n?["tox-collection--list"]:["tox-collection--grid"])},components:[sS.parts().items({preprocess:function(e){return"auto"!==n&&n>1?Qk({tag:"div",classes:["tox-collection__group"]},n)(e):tC(e,function(n,e){return"separator"===t[e].type})}})]}},oC=function(n){return{dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[sS.parts().items({preprocess:function(t){return tC(t,function(t,e){return"separator"===n[e].type})}})]}},rC=function(n){return Ut(n,function(n){return"icon"in n&&void 0!==n.icon})},iC=function(t){return n.console.error(ur(t)),n.console.log(t),St.none()},uC=function(n,t,e){var o=oC(e);return{value:n,dom:o.dom,components:o.components,items:e}},aC=function(n,t,e,o,r){if("color"===r){var i=Zk(o);return{value:n,dom:i.dom,components:i.components,items:e}}if("normal"===r&&"auto"===o){var i=eC(o,e);return{value:n,dom:i.dom,components:i.components,items:e}}if("normal"===r&&1===o){var i=eC(1,e);return{value:n,dom:i.dom,components:i.components,items:e}}if("normal"===r){var i=eC(o,e);return{value:n,dom:i.dom,components:i.components,items:e}}if("listpreview"===r&&"auto"!==o){var i=nC(o);return{value:n,dom:i.dom,components:i.components,items:e}}return{value:n,dom:Kk(t,o,r),components:Jk,items:e}},cC=[jr("disabled",!1),Mr("text"),Mr("shortcut"),Yo("value","value",oo(function(){return Sc("menuitem-value")}),sr()),Pr("meta",{})],sC=No([wr("type"),jr("active",!1),Mr("icon")].concat(cC)),fC=function(n){return or("choicemenuitem",sC,n)},lC=["inserttable","colorswatch"],dC=No([wr("type"),Sr("fancytype",lC),Ur("onAction",ut)]),mC=function(n){return or("fancymenuitem",dC,n)},gC=No([wr("type"),Ur("onSetup",function(){return ut}),Ur("onAction",ut),Mr("icon")].concat(cC)),pC=function(n){return or("menuitem",gC,n)},vC=No([wr("type"),Cr("getSubmenuItems"),Ur("onSetup",function(){return ut}),Mr("icon")].concat(cC)),hC=function(n){return or("nestedmenuitem",vC,n)},bC=No([wr("type"),Mr("icon"),jr("active",!1),Ur("onSetup",function(){return ut}),Cr("onAction")].concat(cC)),yC=function(n){return or("togglemenuitem",bC,n)},xC=function(n,t,e){var o=_g(n.element(),"."+e);if(o.length>0){var r=te(o,function(n){var e=n.dom().getBoundingClientRect().top,r=o[0].dom().getBoundingClientRect().top;return Math.abs(e-r)>t}).getOr(o.length);return St.some({numColumns:r,numRows:Math.ceil(o.length/r)})}return St.none()},wC=function(n,t){return Td([fw(n,t)])},SC=function(n){return wC(Sc("unnamed-events"),n)},kC={namedEvents:wC,unnamedEvents:SC},CC=[br("lazySink"),br("tooltipDom"),Pr("exclusive",!0),Pr("tooltipComponents",[]),Pr("delay",300),Lr("mode","normal",["normal","follow-highlight"]),Pr("anchor",function(n){return{anchor:"hotspot",hotspot:n,layouts:{onLtr:ft([ld,fd,ud,cd,ad,sd]),onRtl:ft([ld,fd,ud,cd,ad,sd])}}}),Bl("onHide"),Bl("onShow")],OC=function(){var t=qr(St.none()),e=qr(St.none()),o=function(){return e.get()},r=function(n){e.set(St.some(n))},i=function(){e.set(St.none())},u=function(){t.get().each(function(t){n.clearTimeout(t)})},a=function(e,o){u(),t.set(St.some(n.setTimeout(function(){e()},o)))},c=function(){return e.get().isSome()},s=ft("not-implemented");return Uc({getTooltip:o,isShowing:c,setTooltip:r,clearTooltip:i,clearTimer:u,resetTimer:a,readState:s})},_C=Object.freeze({__proto__:null,init:OC}),TC=Sc("tooltip.exclusive"),EC=Sc("tooltip.show"),BC=Sc("tooltip.hide"),DC=function(n){n.getSystem().broadcastOn([TC],{})},AC=function(n,t,e,o){e.getTooltip().each(function(n){n.getSystem().isConnected()&&cw.set(n,o)})},MC=Object.freeze({__proto__:null,hideAllExclusive:DC,setComponents:AC}),FC=function(n,t){var e=function(e){t.getTooltip().each(function(o){Ap(o),n.onHide(e,o),t.clearTooltip()}),t.clearTimer()},o=function(e){if(!t.isShowing()){DC(e);var o=n.lazySink(e).getOrDie(),r=e.getSystem().build({dom:n.tooltipDom,components:n.tooltipComponents,events:da("normal"===n.mode?[va(Cu(),function(){ua(e,EC)}),va(Su(),function(){ua(e,BC)})]:[]),behaviours:Td([cw.config({})])});t.setTooltip(r),Ep(o,r),n.onShow(e,r),Sp.position(o,n.anchor(e),r)}};return da(ee([[va(EC,function(e){t.resetTimer(function(){o(e)},n.delay)}),va(BC,function(o){t.resetTimer(function(){e(o)},n.delay)}),va(Hu(),function(n,t){var o=t;jt(o.channels(),TC)&&e(n)}),Ta(function(n){e(n)})],"normal"===n.mode?[va(Ou(),function(n){ua(n,EC)}),va(Vu(),function(n){ua(n,BC)}),va(Cu(),function(n){ua(n,EC)}),va(Su(),function(n){ua(n,BC)})]:[va(ra(),function(n){ua(n,EC)}),va(ia(),function(n){ua(n,BC)})]]))},IC=Object.freeze({__proto__:null,events:FC}),RC=Bd({fields:CC,name:"tooltipping",active:IC,state:_C,apis:MC}),VC=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),PC=tinymce.util.Tools.resolve("tinymce.util.I18n"),HC=["input","button","textarea","select"],zC=function(n,t,e){var o=t.disabled()?YC:qC;o(n,t,e)},NC=function(n,t){return t.useNative===!0&&jt(HC,Da(n.element()))},LC=function(n){return dc(n.element(),"disabled")},jC=function(n){cc(n.element(),"disabled","disabled")},UC=function(n){mc(n.element(),"disabled")},WC=function(n){return"true"===fc(n.element(),"aria-disabled")},GC=function(n){cc(n.element(),"aria-disabled","true")},XC=function(n){cc(n.element(),"aria-disabled","false")},YC=function(n,t){t.disableClass.each(function(t){ws(n.element(),t)});var e=NC(n,t)?jC:GC;e(n),t.onDisabled(n)},qC=function(n,t){t.disableClass.each(function(t){ks(n.element(),t)});var e=NC(n,t)?UC:XC;e(n),t.onEnabled(n)},KC=function(n,t){return NC(n,t)?LC(n):WC(n)},JC=function(n,t,e,o){var r=o?YC:qC;r(n,t,e)},$C=Object.freeze({__proto__:null,enable:qC,disable:YC,isDisabled:KC,onLoad:zC,set:JC}),QC=function(n,t){return qc({classes:t.disabled()?t.disableClass.toArray():[]})},ZC=function(n,t){return da([ma(zu(),function(t){return KC(t,n)}),wd(n,t,zC)])},nO=Object.freeze({__proto__:null,exhibit:QC,events:ZC}),tO=[Ur("disabled",gt),Pr("useNative",!0),Br("disableClass"),Bl("onDisabled"),Bl("onEnabled")],eO=Bd({fields:tO,name:"disabling",active:nO,apis:$C}),oO=tinymce.util.Tools.resolve("tinymce.EditorManager"),rO=function(n){var t=n.getParam("skin"),e=n.getParam("skin_url");if(t!==!1){var o=t?t:"oxide";e=e?n.documentBaseURI.toAbsolute(e):oO.baseURL+"/skins/ui/"+o}return e},iO=function(n){return n.getParam("readonly",!1,"boolean")},uO=function(n){return n.getParam("skin")===!1},aO=function(n){return n.getParam("height",Math.max(n.getElement().offsetHeight,200))},cO=function(n){return n.getParam("width",VC.DOM.getStyle(n.getElement(),"width"))},sO=function(n){return St.from(n.getParam("min_width")).filter(Rt)},fO=function(n){return St.from(n.getParam("min_height")).filter(Rt)},lO=function(n){return St.from(n.getParam("max_width")).filter(Rt)},dO=function(n){return St.from(n.getParam("max_height")).filter(Rt)},mO=function(n){return St.from(n.getParam("style_formats")).filter(Bt)},gO=function(n){return n.getParam("style_formats_merge",!1,"boolean")},pO=function(n){return n.getParam("removed_menuitems","")},vO=function(n){return n.getParam("menubar",!0,"boolean")!==!1},hO=function(n){var t=n.getParam("toolbar",!0),e=t===!0,o=Tt(t),r=Bt(t)&&t.length>0;return!yO(n)&&(r||o||e)},bO=function(n){var t=Wt(9,function(t){return n.getParam("toolbar"+(t+1),!1,"string")}),e=Jt(t,function(n){return"string"==typeof n});return e.length>0?St.some(e):St.none()},yO=function(n){return bO(n).fold(function(){var t=n.getParam("toolbar",[],"string[]");return t.length>0},function(){return!0})};!function(n){n["default"]="wrap",n.floating="floating",n.sliding="sliding",n.scrolling="scrolling"}(Dk||(Dk={}));var xO,wO=function(n){return n.getParam("toolbar_mode","","string")};!function(n){n.auto="auto",n.top="top",n.bottom="bottom"}(xO||(xO={}));var SO,kO=function(n){return n.getParam("toolbar_groups",{},"object")},CO=function(n){return n.getParam("toolbar_location",xO.auto,"string")},OO=function(n){return CO(n)===xO.bottom},_O=function(n){return n.getParam("fixed_toolbar_container","","string")},TO=function(n){var t=_O(n);return t.length>0&&n.inline?il(Hs(),t):St.none()},EO=function(n){return n.inline&&TO(n).isSome()},BO=function(n){var t=TO(n);return t.getOr(Hs())},DO=function(n){return n.inline&&!vO(n)&&!hO(n)&&!yO(n)},AO=function(n){var t=n.getParam("toolbar_sticky",!1,"boolean");return(t||n.inline)&&!EO(n)&&!DO(n)},MO=function(n){return n.getParam("draggable_modal",!1,"boolean")},FO=function(n){var t=n.getParam("menu");return t?Me(t,function(n){return ht(ht({},n),{items:n.items})}):{}},IO=function(n){return n.getParam("menubar")},RO=function(n){return n.getParam("toolbar",!0)},VO=function(n){return n.getParam("file_picker_callback")},PO=function(n){return n.getParam("file_picker_types")},HO=function(n){return n.getParam("file_browser_callback_types")},zO=function(n){return n.getParam("typeahead_urls")===!1},NO=function(n){return n.getParam("anchor_top","#top","string")},LO=function(n){return n.getParam("anchor_bottom","#bottom","string")},jO=function(n){var t=n.getParam("file_picker_validator_handler",void 0,"function");return void 0===t?n.getParam("filepicker_validator_handler",void 0,"function"):t},UO="silver.readonly",WO=No([kr("readonly")]),GO=function(n,t){var e=n.outerContainer,o=e.element();t&&(n.mothership.broadcastOn([ov()],{target:o}),n.uiMothership.broadcastOn([ov()],{target:o})),n.mothership.broadcastOn([UO],{readonly:t}),n.uiMothership.broadcastOn([UO],{readonly:t})},XO=function(n,t){n.on("init",function(){n.mode.isReadOnly()&&GO(t,!0)}),n.on("SwitchMode",function(){return GO(t,n.mode.isReadOnly())}),iO(n)&&n.setMode("readonly")},YO=function(){var n;return Pd.config({channels:(n={},n[UO]={schema:WO,onReceive:function(n,t){eO.set(n,t.readonly)}},n)})},qO=function(n){return eO.config({disabled:n,disableClass:"tox-collection__item--state-disabled"})},KO=function(n){return eO.config({disabled:n})},JO=function(n){return eO.config({disabled:n,disableClass:"tox-tbtn--disabled"})},$O=function(n){return eO.config({disabled:n,disableClass:"tox-tbtn--disabled",useNative:!1})},QO={item:qO,button:KO,splitButton:JO,toolbarButton:$O},ZO=function(n,t){var e=n.getApi(t);return function(n){n(e)}},n_=function(n,t){return _a(function(e){var o=ZO(n,e);o(function(e){var o=n.onSetup(e);null!==o&&void 0!==o&&t.set(o)})})},t_=function(n,t){return Ta(function(e){return ZO(n,e)(t.get())})},e_=function(n,t){return Ba(function(e,o){ZO(n,e)(n.onAction),n.triggersSubmenu||t!==Ak.CLOSE_ON_EXECUTE||(ua(e,Uu()),o.stop())})},o_={"alloy.execute":["disabling","alloy.base.behaviour","toggling","item-events"]},r_=function(n){return oe(n,function(n){return n.toArray()})},i_=function(n,t,e,o){var r=qr(ut);return{type:"item",dom:t.dom,components:r_(t.optComponents),data:n.data,eventOrder:o_,hasSubmenu:n.triggersSubmenu,itemBehaviours:Td([fw("item-events",[e_(n,e),n_(n,r),t_(n,r)]),QO.item(function(){return n.disabled||o.isReadOnly()}),YO(),cw.config({})].concat(n.itemBehaviours))}},u_=function(n){return{value:n.value,meta:ht({text:n.text.getOr("")},n.meta)}},a_=tinymce.util.Tools.resolve("tinymce.Env"),c_=function(n){var t={alt:"&#x2325;",ctrl:"&#x2303;",shift:"&#x21E7;",meta:"&#x2318;",access:"&#x2303;&#x2325;"},e={meta:"Ctrl",access:"Shift+Alt"},o=a_.mac?t:e,r=n.split("+"),i=Xt(r,function(n){var t=n.toLowerCase().trim();return Le(o,t)?o[t]:n});return i.join(a_.mac?"":"+")},s_=function(n){return{dom:{tag:"div",classes:[Hk],innerHtml:n}}},f_=function(n){return{dom:{tag:"div",classes:[zk]},components:[ff(PC.translate(n))]}},l_=function(n){return{dom:{tag:"div",classes:[zk],innerHtml:n}}},d_=function(n,t){return{dom:{tag:"div",classes:[zk]},components:[{dom:{tag:n.tag,styles:n.styles},components:[ff(PC.translate(t))]}]}},m_=function(n){return{dom:{tag:"div",classes:[Nk],innerHtml:c_(n)}}},g_=function(n){return{dom:{tag:"div",classes:[jk],innerHtml:LS("checkmark",n)}}},p_=function(n){return{dom:{tag:"div",classes:[Lk],innerHtml:LS("chevron-right",n)}}},v_=function(n){return{dom:{tag:"div",classes:[Lk],innerHtml:LS("chevron-down",n)}}},h_=function(n,t,e,r){var i="custom",u="remove",a=function(){var a=Ik,c=e.getOr(""),s=n.map(function(n){return{title:r.translate(n)}}).getOr({}),f={tag:"div",attributes:s,classes:[a]};return t===i?ht(ht({},f),{tag:"button",classes:o(f.classes,["tox-swatches__picker-btn"]),innerHtml:c}):t===u?ht(ht({},f),{classes:o(f.classes,["tox-swatch--remove"]),innerHtml:c}):ht(ht({},f),{attributes:ht(ht({},f.attributes),{"data-mce-color":t}),styles:{"background-color":t}})};return{dom:a(),optComponents:[]}},b_=function(n,t,e,o,r){var i=e?t.or(St.some("")).map(s_):St.none(),u=n.checkMark,a=n.ariaLabel.map(function(n){return{attributes:{title:PC.translate(n)}}}).getOr({}),c=ht({tag:"div",classes:[Mk,Fk].concat(r?[Wk]:[])},a),s=n.htmlContent.fold(function(){return n.textContent.map(o)},function(n){return St.some(l_(n))}),f={dom:c,optComponents:[i,s,n.shortcutContent.map(m_),u,n.caret]};return f},y_=["list-num-default","list-num-lower-alpha","list-num-lower-greek","list-num-lower-roman","list-num-upper-alpha","list-num-upper-roman"],x_=["list-bull-circle","list-bull-default","list-bull-square"],w_=function(n,e,o,r){void 0===r&&(r=St.none());var i=function(n){return n.map(function(n){return PC.isRtl()&&jt(y_,n)?n+"-rtl":n})},u=PC.isRtl()&&n.iconContent.exists(function(n){return jt(x_,n)}),a=i(n.iconContent).map(function(n){return jS(n,e.icons,r)}),c=St.from(n.meta).fold(function(){return f_},function(n){return Le(n,"style")?t(d_,n.style):f_});return"color"===n.presets?h_(n.ariaLabel,n.value,a,e):b_(n,a,o,c,u)},S_=function(n,t){return Ne(n,"tooltipWorker").map(function(n){return[RC.config({lazySink:t.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:function(n){return{anchor:"submenu",item:n,overrides:{maxHeightFunction:xm}}},mode:"follow-highlight",onShow:function(t){n(function(n){RC.setComponents(t,[lf({element:ni.fromDom(n)})])})}})]}).getOr([])},k_=function(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},C_=function(n){return VC.DOM.encode(n)},O_=function(n,t){var e=PC.translate(n),o=C_(e);if(t.length>0){var r=new RegExp(k_(t),"gi");return o.replace(r,function(n){return'<span class="tox-autocompleter-highlight">'+n+"</span>"})}return o},__=function(n,t,e,o,r,i,u,a){void 0===a&&(a=!0);var c=w_({presets:o,textContent:St.none(),htmlContent:e?n.text.map(function(n){return O_(n,t)}):St.none(),ariaLabel:n.text,iconContent:n.icon,shortcutContent:St.none(),checkMark:St.none(),caret:St.none(),value:n.value},u.providers,a,n.icon);return i_({data:u_(n),disabled:n.disabled,getApi:function(){return{}},onAction:function(){return r(n.value,n.meta)},onSetup:function(){return function(){}},triggersSubmenu:!1,itemBehaviours:S_(n.meta,u)},c,i,u.providers)},T_=function(n,t,e,o,r,i,u,a){void 0===a&&(a=!0);var c=function(n){return{setActive:function(t){Hw.set(n,t)},isActive:function(){return Hw.isOn(n)},isDisabled:function(){return eO.isDisabled(n)},setDisabled:function(t){return eO.set(n,t)}}},s=w_({presets:e,textContent:t?n.text:St.none(),htmlContent:St.none(),ariaLabel:n.text,iconContent:n.icon,shortcutContent:t?n.shortcut:St.none(),checkMark:t?St.some(g_(u.icons)):St.none(),caret:St.none(),value:n.value},u,a);return Ke(i_({data:u_(n),disabled:n.disabled,getApi:c,onAction:function(){return o(n.value)},onSetup:function(n){return n.setActive(r),function(){}},triggersSubmenu:!1,itemBehaviours:[]},s,i,u),{toggling:{toggleClass:Vk,toggleOnExecute:!1,selected:n.active}})},E_=ft(Oh($w(),Qw())),B_=Sc("cell-over"),D_=Sc("cell-execute"),A_=function(n,t,e){var o,r=function(e){return aa(e,B_,{row:n,col:t})},i=function(e){return aa(e,D_,{row:n,col:t})},u=function(n,t){t.stop(),i(n)};return mf({dom:{tag:"div",attributes:(o={role:"button"},o["aria-labelledby"]=e,o)},behaviours:Td([fw("insert-table-picker-cell",[va(Cu(),yw.focus),va(zu(),i),va(Au(),u),va(Lu(),u)]),Hw.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),yw.config({onFocus:r})])})},M_=function(n,t,e){for(var o=[],r=0;t>r;r++){for(var i=[],u=0;e>u;u++)i.push(A_(r,u,n));o.push(i)}return o},F_=function(n,t,e,o,r){for(var i=0;o>i;i++)for(var u=0;r>u;u++)Hw.set(n[i][u],t>=i&&e>=u)},I_=function(n){return oe(n,function(n){return Xt(n,gf)})},R_=function(n,t){return ff(t+1+"x"+(n+1))},V_=function(n){var t=10,e=10,o=Sc("size-label"),r=M_(o,t,e),i=zS({dom:{tag:"span",classes:["tox-insert-table-picker__label"],attributes:{id:o}},components:[ff("0x0")],behaviours:Td([cw.config({})])});return{type:"widget",data:{value:Sc("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[E_().widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:I_(r).concat(i.asSpec()),behaviours:Td([fw("insert-table-picker",[Sa(B_,function(n,o,u){var a=u.event().row(),c=u.event().col();F_(r,a,c,t,e),cw.set(i.get(n),[R_(a,c)])}),Sa(D_,function(t,e,o){n.onAction({numRows:o.event().row()+1,numColumns:o.event().col()+1}),ua(t,Uu())})]),Qx.config({initSize:{numRows:t,numColumns:e},mode:"flatgrid",selector:'[role="button"]'})])})]}},P_=function(n){return{value:n}},H_=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,z_=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,N_=function(n){return H_.test(n)||z_.test(n)},L_=function(n){var t=n.value.replace(H_,function(n,t,e,o){return t+t+e+e+o+o
});return{value:t}},j_=function(n){var t=L_(n),e=z_.exec(t.value);return null===e?["FFFFFF","FF","FF","FF"]:e},U_=function(n){var t=n.toString(16);return 1===t.length?"0"+t:t},W_=function(n){var t=U_(n.red)+U_(n.green)+U_(n.blue);return P_(t)},G_=Math.min,X_=Math.max,Y_=Math.round,q_=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,K_=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,J_=function(n,t,e,o){return{red:n,green:t,blue:e,alpha:o}},$_=function(n){var t=parseInt(n,10);return t.toString()===n&&t>=0&&255>=t},Q_=function(n){var t,e,o,r=(n.hue||0)%360,i=n.saturation/100,u=n.value/100;if(i=X_(0,G_(i,1)),u=X_(0,G_(u,1)),0===i)return t=e=o=Y_(255*u),J_(t,e,o,1);var a=r/60,c=u*i,s=c*(1-Math.abs(a%2-1)),f=u-c;switch(Math.floor(a)){case 0:t=c,e=s,o=0;break;case 1:t=s,e=c,o=0;break;case 2:t=0,e=c,o=s;break;case 3:t=0,e=s,o=c;break;case 4:t=s,e=0,o=c;break;case 5:t=c,e=0,o=s;break;default:t=e=o=0}return t=Y_(255*(t+f)),e=Y_(255*(e+f)),o=Y_(255*(o+f)),J_(t,e,o,1)},Z_=function(n){var t=j_(n),e=parseInt(t[1],16),o=parseInt(t[2],16),r=parseInt(t[3],16);return J_(e,o,r,1)},nT=function(n,t,e,o){var r=parseInt(n,10),i=parseInt(t,10),u=parseInt(e,10),a=parseFloat(o);return J_(r,i,u,a)},tT=function(n){if("transparent"===n)return St.some(J_(0,0,0,0));var t=q_.exec(n);if(null!==t)return St.some(nT(t[1],t[2],t[3],"1"));var e=K_.exec(n);return null!==e?St.some(nT(e[1],e[2],e[3],e[4])):St.none()},eT=function(n){return"rgba("+n.red+","+n.green+","+n.blue+","+n.alpha+")"},oT=J_(255,0,0,1),rT=function(n){return n.fire("SkinLoaded")},iT=function(n,t){return n.fire("SkinLoadError",t)},uT=function(n){return n.fire("ResizeEditor")},aT=function(n,t){return n.fire("ResizeContent",t)},cT=function(n,t){return n.fire("ScrollContent",t)},sT=function(n,t){return n.fire("TextColorChange",t)},fT=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),lT="tinymce-custom-colors",dT="choiceitem",mT=[{type:dT,text:"Light Green",value:"#BFEDD2"},{type:dT,text:"Light Yellow",value:"#FBEEB8"},{type:dT,text:"Light Red",value:"#F8CAC6"},{type:dT,text:"Light Purple",value:"#ECCAFA"},{type:dT,text:"Light Blue",value:"#C2E0F4"},{type:dT,text:"Green",value:"#2DC26B"},{type:dT,text:"Yellow",value:"#F1C40F"},{type:dT,text:"Red",value:"#E03E2D"},{type:dT,text:"Purple",value:"#B96AD9"},{type:dT,text:"Blue",value:"#3598DB"},{type:dT,text:"Dark Turquoise",value:"#169179"},{type:dT,text:"Orange",value:"#E67E23"},{type:dT,text:"Dark Red",value:"#BA372A"},{type:dT,text:"Dark Purple",value:"#843FA1"},{type:dT,text:"Dark Blue",value:"#236FA1"},{type:dT,text:"Light Gray",value:"#ECF0F1"},{type:dT,text:"Medium Gray",value:"#CED4D9"},{type:dT,text:"Gray",value:"#95A5A6"},{type:dT,text:"Dark Gray",value:"#7E8C8D"},{type:dT,text:"Navy Blue",value:"#34495E"},{type:dT,text:"Black",value:"#000000"},{type:dT,text:"White",value:"#ffffff"}],gT=s(10),pT=function(t){var e=[],o=n.document.createElement("canvas");o.height=1,o.width=1;for(var r=o.getContext("2d"),i=function(n,t){var e=255,o=t/255,r=Math.round(n*o+e*(1-o));return("0"+r.toString(16)).slice(-2).toUpperCase()},u=function(n){if(/^[0-9A-Fa-f]{6}$/.test(n))return"#"+n.toUpperCase();r.clearRect(0,0,o.width,o.height),r.fillStyle="#FFFFFF",r.fillStyle=n,r.fillRect(0,0,1,1);var t=r.getImageData(0,0,1,1).data,e=t[0],u=t[1],a=t[2],c=t[3];return"#"+i(e,c)+i(u,c)+i(a,c)},a=0;a<t.length;a+=2)e.push({text:t[a+1],value:u(t[a]),type:"choiceitem"});return e},vT=function(n,t){return n.getParam("color_cols",t,"number")},hT=function(n){return n.getParam("custom_colors")!==!1},bT=function(n){return n.getParam("color_map")},yT=function(n){var t=bT(n);return void 0!==t?pT(t):mT},xT=function(){return Xt(gT.state(),function(n){return{type:dT,text:n,value:n}})},wT=function(n){gT.add(n)},ST=function(n,t){var e;return n.dom.getParents(n.selection.getStart(),function(n){var o;(o=n.style["forecolor"===t?"color":"background-color"])&&(e=e?e:o)}),e},kT=function(n,t,e){n.undoManager.transact(function(){n.focus(),n.formatter.apply(t,{value:e}),n.nodeChanged()})},CT=function(n,t){n.undoManager.transact(function(){n.focus(),n.formatter.remove(t,{value:null},null,!0),n.nodeChanged()})},OT=function(n){n.addCommand("mceApplyTextcolor",function(t,e){kT(n,t,e)}),n.addCommand("mceRemoveTextcolor",function(t){CT(n,t)})},_T=function(n){return Math.max(5,Math.ceil(Math.sqrt(n)))},TT=function(n){var t=yT(n),e=_T(t.length);return vT(n,e)},ET=function(n){var t="choiceitem",e={type:t,text:"Remove color",icon:"color-swatch-remove-color",value:"remove"},o={type:t,text:"Custom color",icon:"color-picker",value:"custom"};return n?[e,o]:[e]},BT=function(n,t,e,o){if("custom"===e){var r=RT(n);r(function(e){e.each(function(e){wT(e),n.execCommand("mceApplyTextcolor",t,e),o(e)})},"#000000")}else"remove"===e?(o(""),n.execCommand("mceRemoveTextcolor",t)):(o(e),n.execCommand("mceApplyTextcolor",t,e))},DT=function(n,t){return n.concat(xT().concat(ET(t)))},AT=function(n,t){return function(e){e(DT(n,t))}},MT=function(n,t,e){var o=function(t,e){n.setIconFill(t,e),n.setIconStroke(t,e)},r="forecolor"===t?"tox-icon-text-color__color":"tox-icon-highlight-bg-color__color";o(r,e)},FT=function(n,t,e,o,r){n.ui.registry.addSplitButton(t,{tooltip:o,presets:"color",icon:"forecolor"===t?"text-color":"highlight-bg-color",select:function(t){var o=St.from(ST(n,e));return o.bind(function(n){return tT(n).map(function(n){var e=W_(n).value;return Ri(t.toLowerCase(),e)})}).getOr(!1)},columns:TT(n),fetch:AT(yT(n),hT(n)),onAction:function(){null!==r.get()&&BT(n,e,r.get(),function(){})},onItemAction:function(o,i){BT(n,e,i,function(e){r.set(e),sT(n,{name:t,color:e})})},onSetup:function(e){null!==r.get()&&MT(e,t,r.get());var o=function(n){n.name===t&&MT(e,n.name,n.color)};return n.on("TextColorChange",o),function(){n.off("TextColorChange",o)}}})},IT=function(n,t,e,o){n.ui.registry.addNestedMenuItem(t,{text:o,icon:"forecolor"===t?"text-color":"highlight-bg-color",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"colorswatch",onAction:function(t){BT(n,e,t.value,ut)}}]}})},RT=function(n){return function(t,e){var o=function(n){return function(t){var e=t.getData();n(St.from(e.colorpicker)),t.close()}},r=function(n,t){"hex-valid"===t.name&&(t.value?n.enable("ok"):n.disable("ok"))},i={colorpicker:e},u=o(t);n.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:i,onAction:r,onSubmit:u,onClose:function(){},onCancel:function(){t(St.none())}})}},VT=function(n){OT(n);var t=qr(null),e=qr(null);FT(n,"forecolor","forecolor","Text color",t),FT(n,"backcolor","hilitecolor","Background color",e),IT(n,"forecolor","forecolor","Text color"),IT(n,"backcolor","hilitecolor","Background color")},PT=function(n,t,e,o,r,i,u,a){var c=rC(t),s="color"!==r?"normal":"color",f=HT(t,e,o,s,i,u,a);return aC(n,c,f,o,r)},HT=function(n,t,e,o,r,i,u){return $h(Xt(n,function(a){return"choiceitem"===a.type?fC(a).fold(iC,function(c){return St.some(T_(c,1===e,o,t,i(a.value),r,u,rC(n)))}):St.none()}))},zT=function(n,t){var e=qk(t);if(1===n)return{mode:"menu",moveOnTab:!0};if("auto"===n)return{mode:"grid",selector:"."+e.item,initSize:{numColumns:1,numRows:1}};var o="color"===t?"tox-swatches__row":"tox-collection__group";return{mode:"matrix",rowSelector:"."+o}},NT=function(n,t){return 1===n?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===n?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:"color"===t?".tox-swatches__row":".tox-collection__group",cell:"color"===t?"."+Ik:"."+Fk}}},LT={inserttable:V_,colorswatch:f},jT=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)?St.some(n[t]):St.none()},UT=function(n,t){return jT(LT,n.fancytype).map(function(e){return e(n,t)})},WT=function(n,t,e,o){void 0===o&&(o=!0);var r=function(n){return{isDisabled:function(){return eO.isDisabled(n)},setDisabled:function(t){return eO.set(n,t)}}},i=w_({presets:"normal",iconContent:n.icon,textContent:n.text,htmlContent:St.none(),ariaLabel:n.text,caret:St.none(),checkMark:St.none(),shortcutContent:n.shortcut},e,o);return i_({data:u_(n),getApi:r,disabled:n.disabled,onAction:n.onAction,onSetup:n.onSetup,triggersSubmenu:!1,itemBehaviours:[]},i,t,e)},GT=function(n,t,e,o,r){void 0===o&&(o=!0),void 0===r&&(r=!1);var i=r?v_(e.icons):p_(e.icons),u=function(n){return{isDisabled:function(){return eO.isDisabled(n)},setDisabled:function(t){return eO.set(n,t)}}},a=w_({presets:"normal",iconContent:n.icon,textContent:n.text,htmlContent:St.none(),ariaLabel:n.text,caret:St.some(i),checkMark:St.none(),shortcutContent:n.shortcut},e,o);return i_({data:u_(n),getApi:u,disabled:n.disabled,onAction:ut,onSetup:n.onSetup,triggersSubmenu:!0,itemBehaviours:[]},a,t,e)},XT=function(n){var t=n.text.fold(function(){return{}},function(n){return{innerHtml:n}});return{type:"separator",dom:ht({tag:"div",classes:[Fk,Pk]},t),components:[]}},YT=function(n,t,e,o){void 0===o&&(o=!0);var r=function(n){return{setActive:function(t){Hw.set(n,t)},isActive:function(){return Hw.isOn(n)},isDisabled:function(){return eO.isDisabled(n)},setDisabled:function(t){return eO.set(n,t)}}},i=w_({iconContent:n.icon,textContent:n.text,htmlContent:St.none(),ariaLabel:n.text,checkMark:St.some(g_(e.icons)),caret:St.none(),shortcutContent:n.shortcut,presets:"normal",meta:n.meta},e,o);return Ke(i_({data:u_(n),disabled:n.disabled,getApi:r,onAction:n.onAction,onSetup:n.onSetup,triggersSubmenu:!1,itemBehaviours:[]},i,t,e),{toggling:{toggleClass:Vk,toggleOnExecute:!1,selected:n.active}})},qT=__,KT=XT,JT=WT,$T=GT,QT=YT,ZT=UT;!function(n){n[n.ContentFocus=0]="ContentFocus",n[n.UiFocus=1]="UiFocus"}(SO||(SO={}));var nE=function(t,e,o,r,i){var u=o.shared.providers,a=function(n){return i?ht(ht({},n),{shortcut:St.none(),icon:n.text.isSome()?St.none():n.icon}):n};switch(t.type){case"menuitem":return pC(t).fold(iC,function(n){return St.some(JT(a(n),e,u,r))});case"nestedmenuitem":return hC(t).fold(iC,function(n){return St.some($T(a(n),e,u,r,i))});case"togglemenuitem":return yC(t).fold(iC,function(n){return St.some(QT(a(n),e,u,r))});case"separator":return Sk(t).fold(iC,function(n){return St.some(KT(n))});case"fancymenuitem":return mC(t).fold(iC,function(n){return ZT(a(n),o)});default:return n.console.error("Unknown item in general menu",t),St.none()}},tE=function(n,t,e,o,r,i){var u=1===o,a=!u||rC(n);return $h(Xt(n,function(n){return"separator"===n.type?Ok(n).fold(iC,function(n){return St.some(KT(n))}):_k(n).fold(iC,function(n){return St.some(qT(n,t,u,"normal",e,r,i,a))})}))},eE=function(n,t,e,o,r){var i=rC(t),u=$h(Xt(t,function(n){var t=function(n){return r?!n.hasOwnProperty("text"):i},u=function(n){return nE(n,e,o,t(n),r)};return u("nestedmenuitem"===n.type&&n.getSubmenuItems().length<=0?ht(ht({},n),{disabled:!0}):n)})),a=r?uC:aC;return a(n,i,u,1,"normal")},oE=function(n){return wS.singleData(n.value,n)},rE=function(n,t,e,o){var r=e===SO.ContentFocus?qb():Yb(),i=zT(t,o),u=qk(o);return{dom:n.dom,components:n.components,items:n.items,value:n.value,markers:{selectedItem:u.selectedItem,item:u.item},movement:i,fakeFocus:e===SO.ContentFocus,focusManager:r,menuBehaviours:kC.unnamedEvents("auto"!==t?[]:[_a(function(n){xC(n,4,u.item).each(function(t){var e=t.numColumns,o=t.numRows;Qx.setGridSize(n,o,e)})})])}},iE=function(t,e){var o=qr(St.none()),r=qr(!1),i=mf(CS.sketch({dom:{tag:"div",classes:["tox-autocompleter"]},components:[],fireDismissalEventInstead:{},inlineBehaviours:Td([fw("dismissAutocompleter",[va(Qu(),function(){return s()})])]),lazySink:e.getSink})),u=function(){return CS.isOpen(i)},a=function(){return o.get().isSome()},c=function(){a()&&CS.hide(i)},s=function(){if(a()){var n=o.get().map(function(n){return n.element});nk(n.getOr(ni.fromDom(t.selection.getNode()))).each(ec),c(),o.set(St.none()),r.set(!1)}},f=$e(function(){return Bk(t)}),l=function(o,i){var u=de(i,function(n){return St.from(n.columns)}).getOr(1);return oe(i,function(i){var a=i.items;return tE(a,i.matchText,function(e,u){var a=t.selection.getRng();ak(t.dom,a,o).fold(function(){return n.console.error("Lost context. Cursor probably moved")},function(n){var t=n.range,o={hide:function(){s()},reload:function(n){c(),p(n)}};r.set(!0),i.onAction(o,t,e,u),r.set(!1)})},u,Ak.BUBBLE_TO_SANDBOX,e)})},d=function(n){if(!a()){var e=ZS(t,n.range);o.set(St.some({triggerChar:n.triggerChar,element:e,matchLength:n.text.length})),r.set(!1)}},m=function(n,e,o,r){n.matchLength=e.text.length;var u=de(o,function(n){return St.from(n.columns)}).getOr(1);CS.showAt(i,{anchor:"node",root:ni.fromDom(t.getBody()),node:St.from(n.element)},sS.sketch(rE(aC("autocompleter-value",!0,r,u,"normal"),u,SO.ContentFocus,"normal"))),CS.getContent(i).each(Ob.highlightFirst)},g=function(n){return o.get().map(function(e){return ak(t.dom,t.selection.getRng(),e.triggerChar).bind(function(e){return xk(t,f,e,n)})}).getOrThunk(function(){return yk(t,f)})},p=function(n){g(n).fold(s,function(n){d(n.context),n.lookupData.then(function(t){o.get().map(function(e){var o=n.context;if(e.triggerChar===o.triggerChar){var r=l(o.triggerChar,t);r.length>0?m(e,o,t,r):o.text.length-e.matchLength>=10?s():c()}})})})},v=qS(function(n){27!==n.which&&p()},50),h={onKeypress:v,cancelIfNecessary:s,isMenuOpen:u,isActive:a,isProcessingAction:r.get,getView:function(){return CS.getContent(i)}};sk.setup(h,t)},uE={register:iE},aE=ft(!0),cE=function(n,t,e){return If(n,t,aE,e)},sE=function(n,t,e){return Rf(n,t,aE,e)},fE=Af,lE=function(n,t,e){return ul(n,t,e).isSome()},dE=5,mE=400,gE=function(n){var t=n.raw();return void 0===t.touches||1!==t.touches.length?St.none():St.some(t.touches[0])},pE=function(n,t){var e=Math.abs(n.clientX-t.x),o=Math.abs(n.clientY-t.y);return e>dE||o>dE},vE=function(n){var t=qr(St.none()),e=qr(!1),o=l(function(t){n.triggerEvent(ju(),t),e.set(!0)},mE),r=function(n){return gE(n).each(function(r){o.cancel();var i={x:r.clientX,y:r.clientY,target:n.target()};o.schedule(n),e.set(!1),t.set(St.some(i))}),St.none()},i=function(n){return o.cancel(),gE(n).each(function(n){t.get().each(function(e){pE(n,e)&&t.set(St.none())})}),St.none()},u=function(r){o.cancel();var i=function(n){return ou(n.target,r.target())};return t.get().filter(i).map(function(){return e.get()?(r.prevent(),!1):n.triggerEvent(Lu(),r)})},a=lo([{key:vu(),value:r},{key:hu(),value:i},{key:bu(),value:u}]),c=function(n,t){return Ne(a,t).bind(function(t){return t(n)})};return{fireIfReady:c}},hE=function(n){var t=n.raw();return t.which===_b()[0]&&!jt(["input","textarea"],Da(n.target()))&&!lE(n.target(),'[contenteditable="true"]')},bE=function(){return qi().browser.isFirefox()},yE=zo([Cr("triggerEvent"),Pr("stopBackspace",!0)]),xE=function(n,t){return bE()?sE(n,"focus",t):cE(n,"focusin",t)},wE=function(n,t){return bE()?sE(n,"blur",t):cE(n,"focusout",t)},SE=function(t,e){var o=ir("Getting GUI events settings",yE,e),r=["touchstart","touchmove","touchend","touchcancel","gesturestart","mousedown","mouseup","mouseover","mousemove","mouseout","click"],i=vE(o),u=Xt(r.concat(["selectstart","input","contextmenu","change","transitionend","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),function(n){return cE(t,n,function(t){i.fireIfReady(t,n).each(function(n){n&&t.kill()});var e=o.triggerEvent(n,t);e&&t.kill()})}),a=qr(St.none()),c=cE(t,"paste",function(t){i.fireIfReady(t,"paste").each(function(n){n&&t.kill()});var e=o.triggerEvent("paste",t);e&&t.kill(),a.set(St.some(n.setTimeout(function(){o.triggerEvent(Pu(),t)},0)))}),s=cE(t,"keydown",function(n){var t=o.triggerEvent("keydown",n);t?n.kill():o.stopBackspace===!0&&hE(n)&&n.prevent()}),f=xE(t,function(n){var t=o.triggerEvent("focusin",n);t&&n.kill()}),l=qr(St.none()),d=wE(t,function(t){var e=o.triggerEvent("focusout",t);e&&t.kill(),l.set(St.some(n.setTimeout(function(){o.triggerEvent(Vu(),t)},0)))}),m=function(){Yt(u,function(n){n.unbind()}),s.unbind(),f.unbind(),d.unbind(),c.unbind(),a.get().each(n.clearTimeout),l.get().each(n.clearTimeout)};return{unbind:m}},kE=function(n,t){var e=Ne(n,"target").map(function(n){return n()}).getOr(t);return qr(e)},CE=function(n,t){var e=qr(!1),o=qr(!1),r=function(){e.set(!0)},i=function(){o.set(!0)};return{stop:r,cut:i,isStopped:e.get,isCut:o.get,event:ft(n),setSource:t.set,getSource:t.get}},OE=function(n){var t=qr(!1),e=function(){t.set(!0)};return{stop:e,cut:ut,isStopped:t.get,isCut:ft(!1),event:ft(n),setSource:mt("Cannot set source of a broadcasted event"),getSource:mt("Cannot get source of a broadcasted event")}},_E=We.generate([{stopped:[]},{resume:["element"]},{complete:[]}]),TE=function(n,t,e,o,r,i){var u=n(t,o),a=CE(e,r);return u.fold(function(){return i.logEventNoHandlers(t,o),_E.complete()},function(n){var e=n.descHandler,o=ts(e);return o(a),a.isStopped()?(i.logEventStopped(t,n.element,e.purpose()),_E.stopped()):a.isCut()?(i.logEventCut(t,n.element,e.purpose()),_E.complete()):La(n.element).fold(function(){return i.logNoParent(t,n.element,e.purpose()),_E.complete()},function(o){return i.logEventResponse(t,n.element,e.purpose()),_E.resume(o)})})},EE=function(n,t,e,o,r,i){return TE(n,t,e,o,r,i).fold(function(){return!0},function(o){return EE(n,t,e,o,r,i)},function(){return!1})},BE=function(n,t,e,o,r){var i=kE(e,o);return TE(n,t,e,o,i,r)},DE=function(n,t){var e=OE(t);return Yt(n,function(n){var t=n.descHandler(),o=ts(t);o(e)}),e.isStopped()},AE=function(n,t,e,o){var r=e.target();return ME(n,t,e,r,o)},ME=function(n,t,e,o,r){var i=kE(e,o);return EE(n,t,e,o,i,r)},FE=function(n,t){return{element:n,descHandler:t}},IE=function(n,t){return{id:ft(n),descHandler:ft(t)}},RE=function(n){var t=n.dom,o=t.attributes,r=e(t,["attributes"]);return{uid:n.uid,dom:ht({tag:"div",attributes:ht({role:"presentation"},o)},r),components:n.components,behaviours:Nv(n.containerBehaviours),events:n.events,domModification:n.domModification,eventOrder:n.eventOrder}},VE=Kh({name:"Container",factory:RE,configFields:[Pr("components",[]),zv("containerBehaviours",[]),Pr("events",{}),Pr("domModification",{}),Pr("eventOrder",{})]}),PE=function(n){var t=function(t){return La(n.element()).fold(function(){return!0},function(n){return ou(t,n)})},e=m(),o=function(n,o){return e.find(t,n,o)},r=SE(n.element(),{triggerEvent:function(n,t){return yl(n,t.target(),function(e){return AE(o,n,t,e)})}}),i={debugInfo:ft("real"),triggerEvent:function(n,t,e){yl(n,t,function(r){return ME(o,n,e,t,r)})},triggerFocus:function(n,t){Bc(n).fold(function(){Ld(n)},function(){yl(Ru(),n,function(e){return BE(o,Ru(),{originator:ft(t),kill:ut,prevent:ut,target:ft(n)},n,e),!1})})},triggerEscape:function(n,t){i.triggerEvent("keydown",n.element(),t.event())},getByUid:function(n){return v(n)},getByDom:function(n){return h(n)},build:mf,addToGui:function(n){c(n)},removeFromGui:function(n){s(n)},addToWorld:function(n){u(n)},removeFromWorld:function(n){a(n)},broadcast:function(n){d(n)},broadcastOn:function(n,t){g(n,t)},broadcastEvent:function(n,t){p(n,t)},isConnected:ft(!0)},u=function(n){n.connect(i),Ia(n.element())||(e.register(n),Yt(n.components(),u),i.triggerEvent(Gu(),n.element(),{target:ft(n.element())}))},a=function(n){Ia(n.element())||(Yt(n.components(),a),e.unregister(n)),n.disconnect()},c=function(t){Ep(n,t)},s=function(n){Ap(n)},f=function(){r.unbind(),tc(n.element())},l=function(n){var t=e.filter(Hu());Yt(t,function(t){var e=t.descHandler(),o=ts(e);o(n)})},d=function(n){l({universal:ft(!0),data:ft(n)})},g=function(n,t){l({universal:ft(!1),channels:ft(n),data:ft(t)})},p=function(n,t){var o=e.filter(n);return DE(o,t)},v=function(n){return e.getById(n).fold(function(){return ve.error(new Error('Could not find component with uid: "'+n+'" in system.'))},ve.value)},h=function(n){var t=Bc(n).getOr("not found");return v(t)};return u(n),{root:ft(n),element:n.element,destroy:f,add:c,remove:s,getByUid:v,getByDom:h,addToWorld:u,removeFromWorld:a,broadcast:d,broadcastOn:g,broadcastEvent:p}},HE=function(n,t){return{dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:Xt(n.items,t.interpreter)}},zE=ft([Pr("prefix","form-field"),zv("fieldBehaviours",[ib,Hv])]),NE=ft([yh({schema:[br("dom")],name:"label"}),yh({factory:{sketch:function(n){return{uid:n.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:n.text}}}},schema:[br("text")],name:"aria-descriptor"}),hh({factory:{sketch:function(n){var t=so(n,["factory"]);return n.factory.sketch(t)}},schema:[br("factory")],name:"field"})]),LE=function(n,t){var e=Lv(n.fieldBehaviours,[ib.config({find:function(t){return Mh(t,n,"field")}}),Hv.config({store:{mode:"manual",getValue:function(n){return ib.getCurrent(n).bind(Hv.getValue)},setValue:function(n,t){ib.getCurrent(n).each(function(n){Hv.setValue(n,t)})}}})]),o=da([_a(function(t){var e=Ih(t,n,["label","field","aria-descriptor"]);e.field().each(function(t){var o=Sc(n.prefix);e.label().each(function(n){cc(n.element(),"for",o),cc(t.element(),"id",o)}),e["aria-descriptor"]().each(function(e){var o=Sc(n.prefix);cc(e.element(),"id",o),cc(t.element(),"aria-describedby",o)})})})]),r={getField:function(t){return Mh(t,n,"field")},getLabel:function(t){return Mh(t,n,"label")}};return{uid:n.uid,dom:n.dom,components:t,behaviours:e,events:o,apis:r}},jE=Jh({name:"FormField",configFields:zE(),partFields:NE(),factory:LE,apis:{getField:function(n,t){return n.getField(t)},getLabel:function(n,t){return n.getLabel(t)}}}),UE=function(n,t){return qc({attributes:lo([{key:t.tabAttr,value:"true"}])})},WE=Object.freeze({__proto__:null,exhibit:UE}),GE=[Pr("tabAttr","data-alloy-tabstop")],XE=Bd({fields:GE,name:"tabstopping",active:WE}),YE=function(n,t,e,o){var r=KE(n,t,e,o);return jE.sketch(r)},qE=function(n,t){return YE(n,t,[],[])},KE=function(n,t,e,o){return{dom:$E(e),components:n.toArray().concat([t]),fieldBehaviours:Td(o)}},JE=function(){return $E([])},$E=function(n){return{tag:"div",classes:["tox-form__group"].concat(n)}},QE=function(n,t){return jE.parts().label({dom:{tag:"label",classes:["tox-label"],innerHtml:t.translate(n)}})},ZE=Sc("form-component-change"),nB=Sc("form-close"),tB=Sc("form-cancel"),eB=Sc("form-action"),oB=Sc("form-submit"),rB=Sc("form-block"),iB=Sc("form-unblock"),uB=Sc("form-tabchange"),aB=Sc("form-resize"),cB=function(n,t){var e=n.label.map(function(n){return QE(n,t)}),o=function(n){return function(t,e){ul(e.event().target(),"[data-collection-item-value]").each(function(o){n(t,e,o,fc(o,"data-collection-item-value"))})}},r=function(n){return'"'===n?"&quot;":n},i=function(e,o){var i=Xt(o,function(e){var o=PC.translate(e.text),i=1===n.columns?'<div class="tox-collection__item-label">'+o+"</div>":"",u='<div class="tox-collection__item-icon">'+e.icon+"</div>",a={_:" "," - ":" ","-":" "},c=o.replace(/\_| \- |\-/g,function(n){return a[n]}),s=t.isReadOnly()?" tox-collection__item--state-disabled":"";return'<div class="tox-collection__item'+s+'" tabindex="-1" data-collection-item-value="'+r(e.value)+'" title="'+c+'" aria-label="'+c+'">'+u+i+"</div>"}),u=n.columns>1&&"auto"!==n.columns?Gt(i,n.columns):[i],a=Xt(u,function(n){return'<div class="tox-collection__group">'+n.join("")+"</div>"});ic(e.element(),a.join(""))},u=o(function(e,o,r,i){o.stop(),t.isReadOnly()||aa(e,eB,{name:n.name,value:i})}),a=[va(Cu(),o(function(n,t,e){Ld(e)})),va(Au(),u),va(Lu(),u),va(Ou(),o(function(n,t,e){il(n.element(),"."+Uk).each(function(n){ks(n,Uk)}),ws(e,Uk)})),va(_u(),o(function(n){il(n.element(),"."+Uk).each(function(n){ks(n,Uk)})})),Ba(o(function(t,e,o,r){aa(t,eB,{name:n.name,value:r})}))],c=function(n,t){return Xt(_g(n.element(),".tox-collection__item"),t)},s=jE.parts().field({dom:{tag:"div",classes:["tox-collection"].concat(1!==n.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:lt},behaviours:Td([eO.config({disabled:t.isReadOnly,onDisabled:function(n){c(n,function(n){ws(n,"tox-collection__item--state-disabled"),cc(n,"aria-disabled",!0)})},onEnabled:function(n){c(n,function(n){ks(n,"tox-collection__item--state-disabled"),mc(n,"aria-disabled")})}}),YO(),cw.config({}),Hv.config({store:{mode:"memory",initialValue:[]},onSetValue:function(t,e){i(t,e),"auto"===n.columns&&xC(t,5,"tox-collection__item").each(function(n){var e=n.numRows,o=n.numColumns;Qx.setGridSize(t,e,o)}),ua(t,aB)}}),XE.config({}),Qx.config(NT(n.columns,"normal")),fw("collection-events",a)]),eventOrder:{"alloy.execute":["disabling","alloy.base.behaviour","collection-events"]}}),f=["tox-form__group--collection"];return YE(e,s,f,[])},sB=ft([Br("data"),Pr("inputAttributes",{}),Pr("inputStyles",{}),Pr("tag","input"),Pr("inputClasses",[]),Bl("onSetValue"),Pr("styles",{}),Pr("eventOrder",{}),zv("inputBehaviours",[Hv,yw]),Pr("selectOnFocus",!0)]),fB=function(n){return Td([yw.config({onFocus:n.selectOnFocus?function(n){var t=n.element(),e=Qs(t);t.dom().setSelectionRange(0,e.length)}:ut})])},lB=function(n){return ht(ht({},fB(n)),Lv(n.inputBehaviours,[Hv.config({store:ht(ht({mode:"manual"},n.data.map(function(n){return{initialValue:n}}).getOr({})),{getValue:function(n){return Qs(n.element())},setValue:function(n,t){var e=Qs(n.element());e!==t&&Zs(n.element(),t)}}),onSetValue:n.onSetValue})]))},dB=function(n){return{tag:n.tag,attributes:ht({type:"text"},n.inputAttributes),styles:n.inputStyles,classes:n.inputClasses}},mB=function(n){return{uid:n.uid,dom:dB(n),components:[],behaviours:lB(n),eventOrder:n.eventOrder}},gB=Kh({name:"Input",configFields:sB(),factory:mB}),pB={},vB={exports:pB};!function(n,t,e,o){!function(o){if("object"==typeof t&&"undefined"!=typeof e)e.exports=o();else if("function"==typeof n&&n.amd)n([],o);else{var r;r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,r.EphoxContactWrapper=o()}}(function(){return function(){function n(t,e,r){function i(a,c){if(!e[a]){if(!t[a]){var s="function"==typeof o&&o;if(!c&&s)return s(a,!0);if(u)return u(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var l=e[a]={exports:{}};t[a][0].call(l.exports,function(n){var e=t[a][1][n];return i(e||n)},l,l.exports,n,t,e,r)}return e[a].exports}for(var u="function"==typeof o&&o,a=0;a<r.length;a++)i(r[a]);return i}return n}()({1:[function(n,t){function e(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function r(n){if(f===setTimeout)return setTimeout(n,0);if((f===e||!f)&&setTimeout)return f=setTimeout,setTimeout(n,0);try{return f(n,0)}catch(t){try{return f.call(null,n,0)}catch(t){return f.call(this,n,0)}}}function i(n){if(l===clearTimeout)return clearTimeout(n);if((l===o||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(n);try{return l(n)}catch(t){try{return l.call(null,n)}catch(t){return l.call(this,n)}}}function u(){p&&m&&(p=!1,m.length?g=m.concat(g):v=-1,g.length&&a())}function a(){if(!p){var n=r(u);p=!0;for(var t=g.length;t;){for(m=g,g=[];++v<t;)m&&m[v].run();v=-1,t=g.length}m=null,p=!1,i(n)}}function c(n,t){this.fun=n,this.array=t}function s(){}var f,l,d=t.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:e}catch(n){f=e}try{l="function"==typeof clearTimeout?clearTimeout:o}catch(n){l=o}}();var m,g=[],p=!1,v=-1;d.nextTick=function(n){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];g.push(new c(n,t)),1!==g.length||p||r(a)},c.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=s,d.addListener=s,d.once=s,d.off=s,d.removeListener=s,d.removeAllListeners=s,d.emit=s,d.prependListener=s,d.prependOnceListener=s,d.listeners=function(){return[]},d.binding=function(){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},{}],2:[function(n,t){(function(n){!function(e){function o(){}function r(n,t){return function(){n.apply(t,arguments)}}function i(n){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof n)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],l(n,this)}function u(n,t){for(;3===n._state;)n=n._value;return 0===n._state?void n._deferreds.push(t):(n._handled=!0,void i._immediateFn(function(){var e=1===n._state?t.onFulfilled:t.onRejected;if(null===e)return void(1===n._state?a:c)(t.promise,n._value);var o;try{o=e(n._value)}catch(r){return void c(t.promise,r)}a(t.promise,o)}))}function a(n,t){try{if(t===n)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var e=t.then;if(t instanceof i)return n._state=3,n._value=t,void s(n);if("function"==typeof e)return void l(r(e,t),n)}n._state=1,n._value=t,s(n)}catch(o){c(n,o)}}function c(n,t){n._state=2,n._value=t,s(n)}function s(n){2===n._state&&0===n._deferreds.length&&i._immediateFn(function(){n._handled||i._unhandledRejectionFn(n._value)});for(var t=0,e=n._deferreds.length;e>t;t++)u(n,n._deferreds[t]);n._deferreds=null}function f(n,t,e){this.onFulfilled="function"==typeof n?n:null,this.onRejected="function"==typeof t?t:null,this.promise=e}function l(n,t){var e=!1;try{n(function(n){e||(e=!0,a(t,n))},function(n){e||(e=!0,c(t,n))})}catch(o){if(e)return;e=!0,c(t,o)}}var d=setTimeout;i.prototype["catch"]=function(n){return this.then(null,n)},i.prototype.then=function(n,t){var e=new this.constructor(o);return u(this,new f(n,t,e)),e},i.all=function(n){var t=Array.prototype.slice.call(n);return new i(function(n,e){function o(i,u){try{if(u&&("object"==typeof u||"function"==typeof u)){var a=u.then;if("function"==typeof a)return void a.call(u,function(n){o(i,n)},e)}t[i]=u,0===--r&&n(t)}catch(c){e(c)}}if(0===t.length)return n([]);for(var r=t.length,i=0;i<t.length;i++)o(i,t[i])})},i.resolve=function(n){return n&&"object"==typeof n&&n.constructor===i?n:new i(function(t){t(n)})},i.reject=function(n){return new i(function(t,e){e(n)})},i.race=function(n){return new i(function(t,e){for(var o=0,r=n.length;r>o;o++)n[o].then(t,e)})},i._immediateFn="function"==typeof n?function(t){n(t)}:function(n){d(n,0)},i._unhandledRejectionFn=function(n){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",n)},i._setImmediateFn=function(n){i._immediateFn=n},i._setUnhandledRejectionFn=function(n){i._unhandledRejectionFn=n},"undefined"!=typeof t&&t.exports?t.exports=i:e.Promise||(e.Promise=i)}(this)}).call(this,n("timers").setImmediate)},{timers:3}],3:[function(n,t,e){(function(t,o){function r(n,t){this._id=n,this._clearFn=t}var i=n("process/browser.js").nextTick,u=Function.prototype.apply,a=Array.prototype.slice,c={},s=0;e.setTimeout=function(){return new r(u.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new r(u.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(n){n.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(n,t){clearTimeout(n._idleTimeoutId),n._idleTimeout=t},e.unenroll=function(n){clearTimeout(n._idleTimeoutId),n._idleTimeout=-1},e._unrefActive=e.active=function(n){clearTimeout(n._idleTimeoutId);var t=n._idleTimeout;t>=0&&(n._idleTimeoutId=setTimeout(function(){n._onTimeout&&n._onTimeout()},t))},e.setImmediate="function"==typeof t?t:function(n){var t=s++,o=arguments.length<2?!1:a.call(arguments,1);return c[t]=!0,i(function(){c[t]&&(o?n.apply(null,o):n.call(null),e.clearImmediate(t))}),t},e.clearImmediate="function"==typeof o?o:function(n){delete c[n]}}).call(this,n("timers").setImmediate,n("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(n,t){var e=n("promise-polyfill"),o=function(){return"undefined"!=typeof window?window:Function("return this;")()}();t.exports={boltExport:o.Promise||e}},{"promise-polyfill":2}]},{},[4])(4)})}(void 0,pB,vB,void 0);var hB,bB=vB.exports.boltExport,yB=function(t){var e=St.none(),o=[],r=function(n){return yB(function(t){i(function(e){t(n(e))
})})},i=function(n){a()?s(n):o.push(n)},u=function(n){a()||(e=St.some(n),c(o),o=[])},a=function(){return e.isSome()},c=function(n){Yt(n,s)},s=function(t){e.each(function(e){n.setTimeout(function(){t(e)},0)})};return t(u),{get:i,map:r,isReady:a}},xB=function(n){return yB(function(t){t(n)})},wB={nu:yB,pure:xB},SB=function(t){n.setTimeout(function(){throw t},0)},kB=function(n){var t=function(t){n().then(t,SB)},e=function(t){return kB(function(){return n().then(t)})},o=function(t){return kB(function(){return n().then(function(n){return t(n).toPromise()})})},r=function(t){return kB(function(){return n().then(function(){return t.toPromise()})})},i=function(){return wB.nu(t)},u=function(){var t=null;return kB(function(){return null===t&&(t=n()),t})},a=n;return{map:e,bind:o,anonBind:r,toLazy:i,toCached:u,toPromise:a,get:t}},CB=function(n){return kB(function(){return new bB(n)})},OB=function(n){return kB(function(){return bB.resolve(n)})},_B={nu:CB,pure:OB},TB=["input","textarea"],EB=function(n){var t=Da(n);return jt(TB,t)},BB=function(n,t){var e=t.getRoot(n).getOr(n.element());ks(e,t.invalidClass),t.notify.each(function(t){EB(n.element())&&cc(n.element(),"aria-invalid",!1),t.getContainer(n).each(function(n){ic(n,t.validHtml)}),t.onValid(n)})},DB=function(n,t,e,o){var r=t.getRoot(n).getOr(n.element());ws(r,t.invalidClass),t.notify.each(function(t){EB(n.element())&&cc(n.element(),"aria-invalid",!0),t.getContainer(n).each(function(n){ic(n,o)}),t.onInvalid(n,o)})},AB=function(n,t){return t.validator.fold(function(){return _B.pure(ve.value(!0))},function(t){return t.validate(n)})},MB=function(n,t,e){return t.notify.each(function(t){t.onValidate(n)}),AB(n,t).map(function(o){return n.getSystem().isConnected()?o.fold(function(o){return DB(n,t,e,o),ve.error(o)},function(e){return BB(n,t),ve.value(e)}):ve.error("No longer in system")})},FB=function(n,t){var e=t.getRoot(n).getOr(n.element());return Cs(e,t.invalidClass)},IB=Object.freeze({__proto__:null,markValid:BB,markInvalid:DB,query:AB,run:MB,isInvalid:FB}),RB=function(n,t){return n.validator.map(function(e){return da([va(e.onEvent,function(e){MB(e,n,t).get(lt)})].concat(e.validateOnLoad?[_a(function(e){MB(e,n,t).get(ut)})]:[]))}).getOr({})},VB=Object.freeze({__proto__:null,events:RB}),PB=[br("invalidClass"),Pr("getRoot",St.none),Rr("notify",[Pr("aria","alert"),Pr("getContainer",St.none),Pr("validHtml",""),Bl("onValid"),Bl("onInvalid"),Bl("onValidate")]),Rr("validator",[br("validate"),Pr("onEvent","input"),Pr("validateOnLoad",!0)])],HB=Bd({fields:PB,name:"invalidating",active:VB,apis:IB,extra:{validation:function(n){return function(t){var e=Hv.getValue(t);return _B.pure(n(e))}}}}),zB=function(n,t,e,o){return e.getOrCreate(n,t,o)},NB=Object.freeze({__proto__:null,getCoupled:zB}),LB=[yr("others",tr(ve.value,sr()))],jB=function(){var n={},t=function(t,e,o){var r=Be(e.others);if(r)return Ne(n,o).getOrThunk(function(){var r=Ne(e.others,o).getOrDie("No information found for coupled component: "+o),i=r(t),u=t.getSystem().build(i);return n[o]=u,u});throw new Error("Cannot find coupled component: "+o+". Known coupled components: "+JSON.stringify(r,null,2))},e=ft({});return Uc({readState:e,getOrCreate:t})},UB=Object.freeze({__proto__:null,init:jB}),WB=Bd({fields:LB,name:"coupling",apis:NB,state:UB}),GB=ft("sink"),XB=ft(yh({name:GB(),overrides:ft({dom:{tag:"div"},behaviours:Td([Sp.config({useFixed:pt})]),events:da([ka(Tu()),ka(xu()),ka(Au())])})}));!function(n){n[n.HighlightFirst=0]="HighlightFirst",n[n.HighlightNone=1]="HighlightNone"}(hB||(hB={}));var YB,qB=function(n,t){var e=n.getHotspot(t).getOr(t),o="hotspot",r=n.getAnchorOverrides();return n.layouts.fold(function(){return{anchor:o,hotspot:e,overrides:r}},function(n){return{anchor:o,hotspot:e,overrides:r,layouts:n}})},KB=function(n,t,e){var o=n.fetch;return o(e).map(t)},JB=function(n,t,e,o,r,i,u){var a=KB(n,t,o),c=tD(o,n);return a.map(function(n){return n.bind(function(n){return St.from(wS.sketch(ht(ht({},i.menu()),{uid:Dc(""),data:n,highlightImmediately:u===hB.HighlightFirst,onOpenMenu:function(n,t){var o=c().getOrDie();Sp.position(o,e,t),ev.decloak(r)},onOpenSubmenu:function(n,t,e){var o=c().getOrDie();Sp.position(o,{anchor:"submenu",item:t},e),ev.decloak(r)},onRepositionMenu:function(n,t,o){var r=c().getOrDie();Sp.position(r,e,t),Yt(o,function(n){Sp.position(r,{anchor:"submenu",item:n.triggeringItem},n.triggeredMenu)})},onEscape:function(){return yw.focus(o),ev.close(r),St.some(!0)}})))})})},$B=function(n,t,e,o,r,i,u){var a=qB(n,e),c=JB(n,t,a,e,o,r,u);return c.map(function(n){return n.fold(function(){ev.isOpen(o)&&ev.close(o)},function(n){ev.cloak(o),ev.open(o,n),i(o)}),o})},QB=function(n,t,e,o){return ev.close(o),_B.pure(o)},ZB=function(n,t,e,o,r,i){var u=WB.getCoupled(e,"sandbox"),a=ev.isOpen(u),c=a?QB:$B;return c(n,t,e,u,o,r,i)},nD=function(n,t,e){var o=ib.getCurrent(t).getOr(t),r=Tf(n.element());e?js(o.element(),"min-width",r+"px"):_f(o.element(),r)},tD=function(n,t){return n.getSystem().getByUid(t.uid+"-"+GB()).map(function(n){return function(){return ve.value(n)}}).getOrThunk(function(){return t.lazySink.fold(function(){return function(){return ve.error(new Error("No internal sink is specified, nor could an external sink be found"))}},function(t){return function(){return t(n)}})})},eD=function(n){ev.getState(n).each(function(n){wS.repositionMenus(n)})},oD=function(n,t,e){var o=cl(),r=function(r,i){var u=qB(n,t);o.link(t.element()),n.matchWidth&&nD(u.hotspot,i,n.useMinWidth),n.onOpen(u,r,i),void 0!==e&&void 0!==e.onOpen&&e.onOpen(r,i)},i=function(n,r){o.unlink(t.element()),void 0!==e&&void 0!==e.onClose&&e.onClose(n,r)},u=tD(t,n);return{dom:{tag:"div",classes:n.sandboxClasses,attributes:{id:o.id,role:"listbox"}},behaviours:jv.augment(n.sandboxBehaviours,[Hv.config({store:{mode:"memory",initialValue:t}}),ev.config({onOpen:r,onClose:i,isPartOf:function(n,e,o){return fl(e,o)||fl(t,o)},getAttachPoint:function(){return u().getOrDie()}}),ib.config({find:function(n){return ev.getState(n).bind(function(n){return ib.getCurrent(n)})}}),Pd.config({channels:ht(ht({},av({isExtraPart:gt})),sv({doReposition:eD}))})])}},rD=function(n){var t=WB.getCoupled(n,"sandbox");eD(t)},iD=function(){return[Pr("sandboxClasses",[]),jv.field("sandboxBehaviours",[ib,Pd,ev,Hv])]},uD=ft([br("dom"),br("fetch"),Bl("onOpen"),Dl("onExecute"),Pr("getHotspot",St.some),Pr("getAnchorOverrides",ft({})),Fm(),zv("dropdownBehaviours",[Hw,WB,Qx,yw]),br("toggleClass"),Pr("eventOrder",{}),Br("lazySink"),Pr("matchWidth",!1),Pr("useMinWidth",!1),Br("role")].concat(iD())),aD=ft([bh({schema:[_l()],name:"menu",defaults:function(n){return{onExecute:n.onExecute}}}),XB()]),cD=function(n,t,e,o){var r,i=function(t){return Ne(n.dom,"attributes").bind(function(n){return Ne(n,t)})},u=function(n){ev.getState(n).each(function(n){wS.highlightPrimary(n)})},a=function(t){var e=u;ZB(n,function(n){return n},t,o,e,hB.HighlightFirst).get(ut)},c={expand:function(t){Hw.isOn(t)||ZB(n,function(n){return n},t,o,ut,hB.HighlightNone).get(ut)},open:function(t){Hw.isOn(t)||ZB(n,function(n){return n},t,o,ut,hB.HighlightFirst).get(ut)},isOpen:Hw.isOn,close:function(t){Hw.isOn(t)&&ZB(n,function(n){return n},t,o,ut,hB.HighlightFirst).get(ut)},repositionMenus:function(n){Hw.isOn(n)&&rD(n)}},s=function(n){return ca(n),St.some(!0)};return{uid:n.uid,dom:n.dom,components:t,behaviours:Lv(n.dropdownBehaviours,[Hw.config({toggleClass:n.toggleClass,aria:{mode:"expanded"}}),WB.config({others:{sandbox:function(t){return oD(n,t,{onOpen:function(){Hw.on(t)},onClose:function(){Hw.off(t)}})}}}),Qx.config({mode:"special",onSpace:s,onEnter:s,onDown:function(n){if(sD.isOpen(n)){var t=WB.getCoupled(n,"sandbox");u(t)}else sD.open(n);return St.some(!0)},onEscape:function(n){return sD.isOpen(n)?(sD.close(n),St.some(!0)):St.none()}}),yw.config({})]),events:Nw(St.some(a)),eventOrder:ht(ht({},n.eventOrder),(r={},r[zu()]=["disabling","toggling","alloy.base.behaviour"],r)),apis:c,domModification:{attributes:ht(ht({"aria-haspopup":"true"},n.role.fold(function(){return{}},function(n){return{role:n}})),"button"===n.dom.tag?{type:i("type").getOr("button")}:{})}}},sD=Jh({name:"Dropdown",configFields:uD(),partFields:aD(),factory:cD,apis:{open:function(n,t){return n.open(t)},expand:function(n,t){return n.expand(t)},close:function(n,t){return n.close(t)},isOpen:function(n,t){return n.isOpen(t)},repositionMenus:function(n,t){return n.repositionMenus(t)}}}),fD=function(){return qc({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})},lD=function(){return da([ma(Fu(),ft(!0))])},dD=Object.freeze({__proto__:null,events:lD,exhibit:fD}),mD=Bd({fields:[],name:"unselecting",active:dD}),gD=function(n,t){return sD.sketch({dom:n.dom,components:n.components,toggleClass:"mce-active",dropdownBehaviours:Td([QO.button(t.providers.isReadOnly),YO(),mD.config({}),XE.config({})]),layouts:n.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:t.getSink,fetch:function(e){return _B.nu(function(t){return n.fetch(t)}).map(function(o){return St.from(oE(Ke(PT(Sc("menu-value"),o,function(t){n.onItemAction(e,t)},n.columns,n.presets,Ak.CLOSE_ON_EXECUTE,function(){return!1},t.providers),{movement:zT(n.columns,n.presets)})))})},parts:{menu:$k(!1,1,n.presets)}})},pD=Sc("color-input-change"),vD=Sc("color-swatch-change"),hD=Sc("color-picker-cancel"),bD=function(n,t,e){var o=jE.parts().field({factory:gB,inputClasses:["tox-textfield"],onSetValue:function(n){return HB.run(n).get(function(){})},inputBehaviours:Td([eO.config({disabled:t.providers.isReadOnly}),YO(),XE.config({}),HB.config({invalidClass:"tox-textbox-field-invalid",getRoot:function(n){return La(n.element())},notify:{onValid:function(n){var t=Hv.getValue(n);aa(n,pD,{color:t})}},validator:{validateOnLoad:!1,validate:function(n){var t=Hv.getValue(n);if(0===t.length)return _B.pure(ve.value(!0));var e=ni.fromTag("span");js(e,"background-color",t);var o=Ys(e,"background-color").fold(function(){return ve.error("blah")},function(){return ve.value(t)});return _B.pure(o)}}})]),selectOnFocus:!1}),r=n.label.map(function(n){return QE(n,t.providers)}),i=function(n,t){aa(n,vD,{value:t})},u=function(n,t){a.getOpt(n).each(function(n){"custom"===t?e.colorPicker(function(t){t.fold(function(){return ua(n,hD)},function(t){i(n,t),wT(t)})},"#ffffff"):"remove"===t?i(n,""):i(n,t)})},a=zS(gD({dom:{tag:"span",attributes:{"aria-label":t.providers.translate("Color swatch")}},layouts:{onRtl:function(){return[ad,ud,ld]},onLtr:function(){return[ud,ad,ld]}},components:[],fetch:AT(e.getColors(),e.hasCustomColors()),columns:e.getColorCols(),presets:"color",onItemAction:u},t));return jE.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:r.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[o,a.asSpec()]}]),fieldBehaviours:Td([fw("form-field-events",[va(pD,function(t,e){a.getOpt(t).each(function(n){js(n.element(),"background-color",e.event().color())}),aa(t,ZE,{name:n.name})}),va(vD,function(n,t){jE.getField(n).each(function(e){Hv.setValue(e,t.event().value()),ib.getCurrent(n).each(yw.focus)})}),va(hD,function(n){jE.getField(n).each(function(){ib.getCurrent(n).each(yw.focus)})})])])})},yD=function(n,t,e){return{hue:n,saturation:t,value:e}},xD=function(n){var t=0,e=0,o=0,r=n.red/255,i=n.green/255,u=n.blue/255,a=Math.min(r,Math.min(i,u)),c=Math.max(r,Math.max(i,u));if(a===c)return o=a,yD(0,0,100*o);var s=r===a?i-u:u===a?r-i:u-r;return t=r===a?3:u===a?1:5,t=60*(t-s/(c-a)),e=(c-a)/c,o=c,yD(Math.round(t),Math.round(100*e),Math.round(100*o))},wD=function(n){var t=(100-n)/100*360,e=yD(t,100,100),o=Q_(e);return W_(o)},SD=Sc("rgb-hex-update"),kD=Sc("slider-update"),CD=Sc("palette-update"),OD=yh({schema:[br("dom")],name:"label"}),_D=function(n){return yh({name:""+n+"-edge",overrides:function(t){var e=t.model.manager.edgeActions[n];return e.fold(function(){return{}},function(n){return{events:da([ha(vu(),function(t,e,o){return n(t,o)},[t]),ha(xu(),function(t,e,o){return n(t,o)},[t]),ha(wu(),function(t,e,o){o.mouseIsDown.get()&&n(t,o)},[t])])}})}})},TD=_D("top-left"),ED=_D("top"),BD=_D("top-right"),DD=_D("right"),AD=_D("bottom-right"),MD=_D("bottom"),FD=_D("bottom-left"),ID=_D("left"),RD=hh({name:"thumb",defaults:ft({dom:{styles:{position:"absolute"}}}),overrides:function(n){return{events:da([wa(vu(),n,"spectrum"),wa(hu(),n,"spectrum"),wa(bu(),n,"spectrum"),wa(xu(),n,"spectrum"),wa(wu(),n,"spectrum"),wa(ku(),n,"spectrum")])}}}),VD=hh({schema:[Yr("mouseIsDown",function(){return qr(!1)})],name:"spectrum",overrides:function(n){var t=n.model,e=t.manager,o=function(t,o){return e.getValueFromEvent(o).map(function(o){return e.setValueFrom(t,n,o)})};return{behaviours:Td([Qx.config({mode:"special",onLeft:function(t){return e.onLeft(t,n)},onRight:function(t){return e.onRight(t,n)},onUp:function(t){return e.onUp(t,n)},onDown:function(t){return e.onDown(t,n)}}),yw.config({})]),events:da([va(vu(),o),va(hu(),o),va(xu(),o),va(wu(),function(t,e){n.mouseIsDown.get()&&o(t,e)})])}}}),PD=[OD,ID,DD,ED,MD,TD,BD,FD,AD,RD,VD],HD="slider.change.value",zD=ft(HD),ND=function(n){return-1!==n.type.indexOf("touch")},LD=function(n){var t=n.event().raw();if(ND(t)){var e=t;return void 0!==e.touches&&1===e.touches.length?St.some(e.touches[0]).map(function(n){return xf(n.clientX,n.clientY)}):St.none()}var o=t;return void 0!==o.clientX?St.some(o).map(function(n){return xf(n.clientX,n.clientY)}):St.none()},jD="top",UD="right",WD="bottom",GD="left",XD=function(n){return n.model.minX},YD=function(n){return n.model.minY},qD=function(n){return n.model.minX-1},KD=function(n){return n.model.minY-1},JD=function(n){return n.model.maxX},$D=function(n){return n.model.maxY},QD=function(n){return n.model.maxX+1},ZD=function(n){return n.model.maxY+1},nA=function(n,t,e){return t(n)-e(n)},tA=function(n){return nA(n,JD,XD)},eA=function(n){return nA(n,$D,YD)},oA=function(n){return tA(n)/2},rA=function(n){return eA(n)/2},iA=function(n){return n.stepSize},uA=function(n){return n.snapToGrid},aA=function(n){return n.snapStart},cA=function(n){return n.rounded},sA=function(n,t){return void 0!==n[t+"-edge"]},fA=function(n){return sA(n,GD)},lA=function(n){return sA(n,UD)},dA=function(n){return sA(n,jD)},mA=function(n){return sA(n,WD)},gA=function(n){return n.model.value.get()},pA=function(n){return{x:ft(n)}},vA=function(n){return{y:ft(n)}},hA=function(n,t){return{x:ft(n),y:ft(t)}},bA=function(n,t){aa(n,zD(),{value:t})},yA=function(n,t){bA(n,hA(qD(t),KD(t)))},xA=function(n,t){bA(n,vA(KD(t)))},wA=function(n,t){bA(n,hA(oA(t),KD(t)))},SA=function(n,t){bA(n,hA(QD(t),KD(t)))},kA=function(n,t){bA(n,pA(QD(t)))},CA=function(n,t){bA(n,hA(QD(t),rA(t)))},OA=function(n,t){bA(n,hA(QD(t),ZD(t)))},_A=function(n,t){bA(n,vA(ZD(t)))},TA=function(n,t){bA(n,hA(oA(t),ZD(t)))},EA=function(n,t){bA(n,hA(qD(t),ZD(t)))},BA=function(n,t){bA(n,pA(qD(t)))},DA=function(n,t){bA(n,hA(qD(t),rA(t)))},AA=function(n,t,e,o){return t>n?n:n>e?e:n===t?t-1:Math.max(t,n-o)},MA=function(n,t,e,o){return n>e?n:t>n?t:n===e?e+1:Math.min(e,n+o)},FA=function(n,t,e){return Math.max(t,Math.min(e,n))},IA=function(n,t,e,o,r){return r.fold(function(){var r=n-t,i=Math.round(r/o)*o;return FA(t+i,t-1,e+1)},function(t){var r=(n-t)%o,i=Math.round(r/o),u=Math.floor((n-t)/o),a=Math.floor((e-t)/o),c=Math.min(a,u+i),s=t+c*o;return Math.max(t,s)})},RA=function(n,t,e){return Math.min(e,Math.max(n,t))-t},VA=function(n){var t=n.min,e=n.max,o=n.range,r=n.value,i=n.step,u=n.snap,a=n.snapStart,c=n.rounded,s=n.hasMinEdge,f=n.hasMaxEdge,l=n.minBound,d=n.maxBound,m=n.screenRange,g=s?t-1:t,p=f?e+1:e;if(l>r)return g;if(r>d)return p;var v=RA(r,l,d),h=FA(v/m*o+t,g,p);return u&&h>=t&&e>=h?IA(h,t,e,i,a):c?Math.round(h):h},PA=function(n){var t=n.min,e=n.max,o=n.range,r=n.value,i=n.hasMinEdge,u=n.hasMaxEdge,a=n.maxBound,c=n.maxOffset,s=n.centerMinEdge,f=n.centerMaxEdge;return t>r?i?0:s:r>e?u?a:f:(r-t)/o*c},HA="top",zA="right",NA="bottom",LA="left",jA="width",UA="height",WA=function(n){return n.element().dom().getBoundingClientRect()},GA=function(n,t){return n[t]},XA=function(n){var t=WA(n);return GA(t,LA)},YA=function(n){var t=WA(n);return GA(t,zA)},qA=function(n){var t=WA(n);return GA(t,HA)},KA=function(n){var t=WA(n);return GA(t,NA)},JA=function(n){var t=WA(n);return GA(t,jA)},$A=function(n){var t=WA(n);return GA(t,UA)},QA=function(n,t,e){return(n+t)/2-e},ZA=function(n,t){var e=WA(n),o=WA(t),r=GA(e,LA),i=GA(e,zA),u=GA(o,LA);return QA(r,i,u)},nM=function(n,t){var e=WA(n),o=WA(t),r=GA(e,HA),i=GA(e,NA),u=GA(o,HA);return QA(r,i,u)},tM=function(n,t){aa(n,zD(),{value:t})},eM=function(n){return{x:ft(n)}},oM=function(n,t,e){var o={min:XD(t),max:JD(t),range:tA(t),value:e,step:iA(t),snap:uA(t),snapStart:aA(t),rounded:cA(t),hasMinEdge:fA(t),hasMaxEdge:lA(t),minBound:XA(n),maxBound:YA(n),screenRange:JA(n)};return VA(o)},rM=function(n,t,e){var o=oM(n,t,e),r=eM(o);return tM(n,r),o},iM=function(n,t){var e=XD(t);tM(n,eM(e))},uM=function(n,t){var e=JD(t);tM(n,eM(e))},aM=function(n,t,e){var o=n>0?MA:AA,r=o(gA(e).x(),XD(e),JD(e),iA(e));return tM(t,eM(r)),St.some(r)},cM=function(n){return function(t,e){return aM(n,t,e).map(function(){return!0})}},sM=function(n){var t=LD(n);return t.map(function(n){return n.left()})},fM=function(n,t,e,o,r){var i=0,u=JA(n),a=o.bind(function(t){return St.some(ZA(t,n))}).getOr(i),c=r.bind(function(t){return St.some(ZA(t,n))}).getOr(u),s={min:XD(t),max:JD(t),range:tA(t),value:e,hasMinEdge:fA(t),hasMaxEdge:lA(t),minBound:XA(n),minOffset:i,maxBound:YA(n),maxOffset:u,centerMinEdge:a,centerMaxEdge:c};return PA(s)},lM=function(n,t,e,o,r,i){var u=fM(t,i,e,o,r);return XA(t)-XA(n)+u},dM=function(n,t,e,o){var r=gA(e),i=lM(n,o.getSpectrum(n),r.x(),o.getLeftEdge(n),o.getRightEdge(n),e),u=Tf(t.element())/2;js(t.element(),"left",i-u+"px")},mM=cM(-1),gM=cM(1),pM=St.none,vM=St.none,hM={"top-left":St.none(),top:St.none(),"top-right":St.none(),right:St.some(kA),"bottom-right":St.none(),bottom:St.none(),"bottom-left":St.none(),left:St.some(BA)},bM=Object.freeze({__proto__:null,setValueFrom:rM,setToMin:iM,setToMax:uM,findValueOfOffset:oM,getValueFromEvent:sM,findPositionOfValue:lM,setPositionFromValue:dM,onLeft:mM,onRight:gM,onUp:pM,onDown:vM,edgeActions:hM}),yM=function(n,t){aa(n,zD(),{value:t})},xM=function(n){return{y:ft(n)}},wM=function(n,t,e){var o={min:YD(t),max:$D(t),range:eA(t),value:e,step:iA(t),snap:uA(t),snapStart:aA(t),rounded:cA(t),hasMinEdge:dA(t),hasMaxEdge:mA(t),minBound:qA(n),maxBound:KA(n),screenRange:$A(n)};return VA(o)},SM=function(n,t,e){var o=wM(n,t,e),r=xM(o);return yM(n,r),o},kM=function(n,t){var e=YD(t);yM(n,xM(e))},CM=function(n,t){var e=$D(t);yM(n,xM(e))},OM=function(n,t,e){var o=n>0?MA:AA,r=o(gA(e).y(),YD(e),$D(e),iA(e));return yM(t,xM(r)),St.some(r)},_M=function(n){return function(t,e){return OM(n,t,e).map(function(){return!0})}},TM=function(n){var t=LD(n);return t.map(function(n){return n.top()})},EM=function(n,t,e,o,r){var i=0,u=$A(n),a=o.bind(function(t){return St.some(nM(t,n))}).getOr(i),c=r.bind(function(t){return St.some(nM(t,n))}).getOr(u),s={min:YD(t),max:$D(t),range:eA(t),value:e,hasMinEdge:dA(t),hasMaxEdge:mA(t),minBound:qA(n),minOffset:i,maxBound:KA(n),maxOffset:u,centerMinEdge:a,centerMaxEdge:c};return PA(s)},BM=function(n,t,e,o,r,i){var u=EM(t,i,e,o,r);return qA(t)-qA(n)+u},DM=function(n,t,e,o){var r=gA(e),i=BM(n,o.getSpectrum(n),r.y(),o.getTopEdge(n),o.getBottomEdge(n),e),u=vf(t.element())/2;js(t.element(),"top",i-u+"px")},AM=St.none,MM=St.none,FM=_M(-1),IM=_M(1),RM={"top-left":St.none(),top:St.some(xA),"top-right":St.none(),right:St.none(),"bottom-right":St.none(),bottom:St.some(_A),"bottom-left":St.none(),left:St.none()},VM=Object.freeze({__proto__:null,setValueFrom:SM,setToMin:kM,setToMax:CM,findValueOfOffset:wM,getValueFromEvent:TM,findPositionOfValue:BM,setPositionFromValue:DM,onLeft:AM,onRight:MM,onUp:FM,onDown:IM,edgeActions:RM}),PM=function(n,t){aa(n,zD(),{value:t})},HM=function(n,t){return{x:ft(n),y:ft(t)}},zM=function(n,t,e){var o=oM(n,t,e.left()),r=wM(n,t,e.top()),i=HM(o,r);return PM(n,i),i},NM=function(n,t,e,o){var r=n>0?MA:AA,i=t?gA(o).x():r(gA(o).x(),XD(o),JD(o),iA(o)),u=t?r(gA(o).y(),YD(o),$D(o),iA(o)):gA(o).y();return PM(e,HM(i,u)),St.some(i)},LM=function(n,t){return function(e,o){return NM(n,t,e,o).map(function(){return!0})}},jM=function(n,t){var e=XD(t),o=YD(t);PM(n,HM(e,o))},UM=function(n,t){var e=JD(t),o=$D(t);PM(n,HM(e,o))},WM=function(n){return LD(n)},GM=function(n,t,e,o){var r=gA(e),i=lM(n,o.getSpectrum(n),r.x(),o.getLeftEdge(n),o.getRightEdge(n),e),u=BM(n,o.getSpectrum(n),r.y(),o.getTopEdge(n),o.getBottomEdge(n),e),a=Tf(t.element())/2,c=vf(t.element())/2;js(t.element(),"left",i-a+"px"),js(t.element(),"top",u-c+"px")},XM=LM(-1,!1),YM=LM(1,!1),qM=LM(-1,!0),KM=LM(1,!0),JM={"top-left":St.some(yA),top:St.some(wA),"top-right":St.some(SA),right:St.some(CA),"bottom-right":St.some(OA),bottom:St.some(TA),"bottom-left":St.some(EA),left:St.some(DA)},$M=Object.freeze({__proto__:null,setValueFrom:zM,setToMin:jM,setToMax:UM,getValueFromEvent:WM,setPositionFromValue:GM,onLeft:XM,onRight:YM,onUp:qM,onDown:KM,edgeActions:JM}),QM=[Pr("stepSize",1),Pr("onChange",ut),Pr("onChoose",ut),Pr("onInit",ut),Pr("onDragStart",ut),Pr("onDragEnd",ut),Pr("snapToGrid",!1),Pr("rounded",!0),Br("snapStart"),yr("model",cr("mode",{x:[Pr("minX",0),Pr("maxX",100),Yr("value",function(n){return qr(n.mode.minX)}),br("getInitialValue"),Fl("manager",bM)],y:[Pr("minY",0),Pr("maxY",100),Yr("value",function(n){return qr(n.mode.minY)}),br("getInitialValue"),Fl("manager",VM)],xy:[Pr("minX",0),Pr("maxX",100),Pr("minY",0),Pr("maxY",100),Yr("value",function(n){return qr({x:ft(n.mode.minX),y:ft(n.mode.minY)})}),br("getInitialValue"),Fl("manager",$M)]})),zv("sliderBehaviours",[Qx,Hv]),Yr("mouseIsDown",function(){return qr(!1)})],ZM=function(n,t){var e,o=function(t){return Fh(t,n,"thumb")},r=function(t){return Fh(t,n,"spectrum")},i=function(t){return Mh(t,n,"left-edge")},u=function(t){return Mh(t,n,"right-edge")},a=function(t){return Mh(t,n,"top-edge")},c=function(t){return Mh(t,n,"bottom-edge")},s=n.model,f=s.manager,l=function(t,e){f.setPositionFromValue(t,e,n,{getLeftEdge:i,getRightEdge:u,getTopEdge:a,getBottomEdge:c,getSpectrum:r})},d=function(t,e){s.value.set(e);var r=o(t);return l(t,r),n.onChange(t,r,e),St.some(!0)},m=function(t){f.setToMin(t,n)},g=function(t){f.setToMax(t,n)},p=function(t){var e=function(){Mh(t,n,"thumb").each(function(e){var o=s.value.get();n.onChoose(t,e,o)})},o=n.mouseIsDown.get();n.mouseIsDown.set(!1),o&&e()},v=function(t,e){e.stop(),n.mouseIsDown.set(!0),n.onDragStart(t,o(t))},h=function(t,e){e.stop(),n.onDragEnd(t,o(t)),p(t)};return{uid:n.uid,dom:n.dom,components:t,behaviours:Lv(n.sliderBehaviours,[Qx.config({mode:"special",focusIn:function(t){return Mh(t,n,"spectrum").map(Qx.focusIn).map(ft(!0))}}),Hv.config({store:{mode:"manual",getValue:function(){return s.value.get()}}}),Pd.config({channels:(e={},e[iv()]={onReceive:p},e)})]),events:da([va(zD(),function(n,t){d(n,t.event().value())}),_a(function(t){var e=s.getInitialValue();s.value.set(e);var i=o(t);l(t,i);var u=r(t);n.onInit(t,i,u,s.value.get())}),va(vu(),v),va(bu(),h),va(xu(),v),va(ku(),h)]),apis:{resetToMin:m,resetToMax:g,changeValue:d,refresh:l},domModification:{styles:{position:"relative"}}}},nF=Jh({name:"Slider",configFields:QM,partFields:PD,factory:ZM,apis:{resetToMin:function(n,t){n.resetToMin(t)},resetToMax:function(n,t){n.resetToMax(t)},refresh:function(n,t){n.refresh(t)}}}),tF=function(n,t){var e=nF.parts().spectrum({dom:{tag:"div",classes:[t("hue-slider-spectrum")],attributes:{role:"presentation"}}}),o=nF.parts().thumb({dom:{tag:"div",classes:[t("hue-slider-thumb")],attributes:{role:"presentation"}}});return nF.sketch({dom:{tag:"div",classes:[t("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:ft({y:ft(0)})},components:[e,o],sliderBehaviours:Td([yw.config({})]),onChange:function(n,t,e){aa(n,kD,{value:e})}})},eF="form",oF=[zv("formBehaviours",[Hv])],rF=function(n){return"<alloy.field."+n+">"},iF=function(n){var t=function(){var n=[],t=function(t,e){return n.push(t),Th(eF,rF(t),e)};return{field:t,record:function(){return n}}}(),e=n(t),o=t.record(),r=Xt(o,function(n){return hh({name:n,pname:rF(n)})});return Wh(eF,oF,r,aF,e)},uF=function(n,t){return n.fold(function(){return ve.error(t)},ve.value)},aF=function(n,t){return{uid:n.uid,dom:n.dom,components:t,behaviours:Lv(n.formBehaviours,[Hv.config({store:{mode:"manual",getValue:function(t){var e=Rh(t,n);return Me(e,function(n,t){return n().bind(function(n){var e=ib.getCurrent(n);return uF(e,new Error("Cannot find a current component to extract the value from for form part '"+t+"': "+hc(n.element())))}).map(Hv.getValue)})},setValue:function(t,e){Ae(e,function(e,o){Mh(t,n,o).each(function(n){ib.getCurrent(n).each(function(n){Hv.setValue(n,e)})})})}}})]),apis:{getField:function(t,e){return Mh(t,n,e).bind(ib.getCurrent)}}}},cF={getField:Lc(function(n,t,e){return n.getField(t,e)}),sketch:iF},sF=Sc("valid-input"),fF=Sc("invalid-input"),lF=Sc("validating-input"),dF="colorcustom.rgb.",mF=function(n,t,e,o){var r=function(e,o){return HB.config({invalidClass:t("invalid"),notify:{onValidate:function(n){aa(n,lF,{type:e})},onValid:function(n){aa(n,sF,{type:e,value:Hv.getValue(n)})},onInvalid:function(n){aa(n,fF,{type:e,value:Hv.getValue(n)})}},validator:{validate:function(t){var e=Hv.getValue(t),r=o(e)?ve.value(!0):ve.error(n("aria.input.invalid"));return _B.pure(r)},validateOnLoad:!1}})},i=function(e,o,i,u,a){var c=n(dF+"range"),s=jE.parts().label({dom:{tag:"label",innerHtml:i,attributes:{"aria-label":u}}}),f=jE.parts().field({data:a,factory:gB,inputAttributes:ht({type:"text"},"hex"===o?{"aria-live":"polite"}:{}),inputClasses:[t("textfield")],inputBehaviours:Td([r(o,e),XE.config({})]),onSetValue:function(n){if(HB.isInvalid(n)){var t=HB.run(n);t.get(ut)}}}),l=[s,f],d="hex"!==o?[jE.parts()["aria-descriptor"]({text:c})]:[],m=l.concat(d);return{dom:{tag:"div",attributes:{role:"presentation"}},components:m}},u=function(n,t){var e=W_(t);return cF.getField(n,"hex").each(function(t){yw.isFocused(t)||Hv.setValue(n,{hex:e.value})}),e},a=function(n,t){var e=t.red,o=t.green,r=t.blue;Hv.setValue(n,{red:e,green:o,blue:r})},c=zS({dom:{tag:"div",classes:[t("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),s=function(n,t){c.getOpt(n).each(function(n){js(n.element(),"background-color","#"+t.value)})},f=function(){var r={red:qr(St.some(255)),green:qr(St.some(255)),blue:qr(St.some(255)),hex:qr(St.some("ffffff"))},f=function(n,t){var e=Z_(t);a(n,e),g(e)},l=function(n){return r[n].get()},d=function(n,t){r[n].set(t)},m=function(){return l("red").bind(function(n){return l("green").bind(function(t){return l("blue").map(function(e){return J_(n,t,e,1)})})})},g=function(n){var t=n.red,e=n.green,o=n.blue;d("red",St.some(t)),d("green",St.some(e)),d("blue",St.some(o))},p=function(n,t){var e=t.event();"hex"!==e.type()?d(e.type(),St.none()):o(n)},v=function(n,t){e(n);var o=P_(t);d("hex",St.some(t));var r=Z_(o);a(n,r),g(r),aa(n,SD,{hex:o}),s(n,o)},h=function(n,t,e){var o=parseInt(e,10);d(t,St.some(o)),m().each(function(t){var e=u(n,t);s(n,e)})},b=function(n){return"hex"===n.type()},y=function(n,t){var e=t.event();b(e)?v(n,e.value()):h(n,e.type(),e.value())},x=function(t){return{label:n(dF+t+".label"),description:n(dF+t+".description")}},w=x("red"),S=x("green"),k=x("blue"),C=x("hex");return Ke(cF.sketch(function(e){return{dom:{tag:"form",classes:[t("rgb-form")],attributes:{"aria-label":n("aria.color.picker")}},components:[e.field("red",jE.sketch(i($_,"red",w.label,w.description,255))),e.field("green",jE.sketch(i($_,"green",S.label,S.description,255))),e.field("blue",jE.sketch(i($_,"blue",k.label,k.description,255))),e.field("hex",jE.sketch(i(N_,"hex",C.label,C.description,"ffffff"))),c.asSpec()],formBehaviours:Td([HB.config({invalidClass:t("form-invalid")}),fw("rgb-form-events",[va(sF,y),va(fF,p),va(lF,p)])])}}),{apis:{updateHex:function(n,t){Hv.setValue(n,{hex:t.value}),f(n,t),s(n,t)}}})},l=Kh({factory:f,name:"RgbForm",configFields:[],apis:{updateHex:function(n,t,e){n.updateHex(t,e)}},extraApis:{}});return l},gF=function(n,t){var e=nF.parts().spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[t("sv-palette-spectrum")]}}),o=nF.parts().thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[t("sv-palette-thumb")],innerHtml:"<div class="+t("sv-palette-inner-thumb")+' role="presentation"></div>'}}),r=function(n,t){var e=n.width,o=n.height,r=n.getContext("2d");if(null!==r){r.fillStyle=t,r.fillRect(0,0,e,o);var i=r.createLinearGradient(0,0,e,0);i.addColorStop(0,"rgba(255,255,255,1)"),i.addColorStop(1,"rgba(255,255,255,0)"),r.fillStyle=i,r.fillRect(0,0,e,o);var u=r.createLinearGradient(0,0,0,o);u.addColorStop(0,"rgba(0,0,0,0)"),u.addColorStop(1,"rgba(0,0,0,1)"),r.fillStyle=u,r.fillRect(0,0,e,o)}},i=function(n,t){var e=n.components()[0].element().dom();r(e,eT(t))},u=function(){var n=ft({x:ft(0),y:ft(0)}),i=function(n,t,e){aa(n,CD,{value:e})},u=function(n,t,e){r(e.element().dom(),eT(oT))},a=Td([ib.config({find:St.some}),yw.config({})]);return nF.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[t("sv-palette")]},model:{mode:"xy",getInitialValue:n},rounded:!1,components:[e,o],onChange:i,onInit:u,sliderBehaviours:a})},a=Kh({factory:u,name:"SaturationBrightnessPalette",configFields:[],apis:{setRgba:function(n,t,e){i(t,e)}},extraApis:{}});return a},pF=function(n,t){var e=function(e){var o=mF(n,t,e.onValidHex,e.onInvalidHex),r=gF(n,t),i={paletteRgba:qr(oT)},u=zS(r.sketch({})),a=zS(o.sketch({})),c=function(n,t){u.getOpt(n).each(function(n){var e=Z_(t);i.paletteRgba.set(e),r.setRgba(n,e)})},s=function(n,t){a.getOpt(n).each(function(n){o.updateHex(n,t)})},f=function(n,t,e){Yt(e,function(e){e(n,t)})},l=function(){var n=[s];return function(t,e){var o=e.event().value(),r=i.paletteRgba.get(),u=xD(r),a=yD(u.hue,o.x(),100-o.y()),c=Q_(a),s=W_(c);f(t,s,n)}},d=function(){var n=[c,s];return function(t,e){var o=e.event().value(),r=wD(o.y());f(t,r,n)}};return{uid:e.uid,dom:e.dom,components:[u.asSpec(),tF(n,t),a.asSpec()],behaviours:Td([fw("colour-picker-events",[va(CD,l()),va(kD,d())]),ib.config({find:function(n){return a.getOpt(n)}}),Qx.config({mode:"acyclic"})])}},o=Kh({name:"ColourPicker",configFields:[br("dom"),Pr("onValidHex",ut),Pr("onInvalidHex",ut)],factory:e});return o},vF=function(){return ib.config({find:St.some})},hF=function(n){return ib.config({find:n.getOpt})},bF=function(n){return ib.config({find:function(t){return Ga(t.element(),n).bind(function(n){return t.getSystem().getByDom(n).toOption()})}})},yF={self:vF,memento:hF,childAt:bF},xF={"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"},wF=function(n){return xF[n]},SF=function(n){return wF(n)},kF=function(){var t=function(n){return"tox-"+n},e=pF(SF,t),o=function(n){aa(n,eB,{name:"hex-valid",value:!0})},r=function(n){aa(n,eB,{name:"hex-valid",value:!1})},i=zS(e.sketch({dom:{tag:"div",classes:[t("color-picker-container")],attributes:{role:"presentation"}},onValidHex:o,onInvalidHex:r}));return{dom:{tag:"div"},components:[i.asSpec()],behaviours:Td([Hv.config({store:{mode:"manual",getValue:function(n){var t=i.get(n),e=ib.getCurrent(t),o=e.bind(function(n){var t=Hv.getValue(n);
return t.hex});return o.map(function(n){return"#"+n}).getOr("")},setValue:function(t,e){var o=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/,r=o.exec(e),u=i.get(t),a=ib.getCurrent(u);a.fold(function(){n.console.log("Can not find form")},function(n){Hv.setValue(n,{hex:St.from(r[1]).getOr("")}),cF.getField(n,"hex").each(function(n){ua(n,Bu())})})}}}),yF.self()])}},CF=tinymce.util.Tools.resolve("tinymce.Resource"),OF=function(n){return Object.prototype.hasOwnProperty.call(n,"init")},_F=function(n){var t=qr(St.none()),e=zS({dom:{tag:n.tag}}),o=qr(St.none());return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:Td([fw("editor-foo-events",[_a(function(r){e.getOpt(r).each(function(e){(OF(n)?n.init(e.element().dom()):CF.load(n.scriptId,n.scriptUrl).then(function(t){return t(e.element().dom(),n.settings)})).then(function(n){o.get().each(function(t){n.setValue(t)}),o.set(St.none()),t.set(St.some(n))})})})]),Hv.config({store:{mode:"manual",getValue:function(){return t.get().fold(function(){return o.get().getOr("")},function(n){return n.getValue()})},setValue:function(n,e){t.get().fold(function(){o.set(St.some(e))},function(n){return n.setValue(e)})}}}),yF.self()]),components:[e.asSpec()]}},TF=No([Pr("preprocess",lt),Pr("postprocess",lt)]),EF=function(n,t){var e=ir("RepresentingConfigs.memento processors",TF,t);return Hv.config({store:{mode:"manual",getValue:function(t){var o=n.get(t),r=Hv.getValue(o);return e.postprocess(r)},setValue:function(t,o){var r=e.preprocess(o),i=n.get(t);Hv.setValue(i,r)}}})},BF=function(n,t,e){return Hv.config(Ke({store:{mode:"manual",getValue:t,setValue:e}},n.map(function(n){return{store:{initialValue:n}}}).getOr({})))},DF=function(n,t,e){return BF(n,function(n){return t(n.element())},function(n,t){return e(n.element(),t)})},AF=function(n){return DF(n,Qs,Zs)},MF=function(n){return DF(n,rc,ic)},FF=function(n){return Hv.config({store:{mode:"memory",initialValue:n}})},IF={memento:EF,withElement:DF,withComp:BF,domValue:AF,domHtml:MF,memory:FF},RF=".jpg,.jpeg,.png,.gif",VF=function(n){var t=new RegExp("("+RF.split(/\s*,\s*/).join("|")+")$","i");return Jt(le(n),function(n){return t.test(n.name)})},PF=function(n,t){var e=function(n,t){t.stop()},o=function(n){return function(t,e){Yt(n,function(n){n(t,e)})}},r=function(n,t){if(!eO.isDisabled(n)){var e=t.event().raw();u(n,e.dataTransfer.files)}},i=function(n,t){var e=t.event().raw().target.files;u(n,e)},u=function(t,e){Hv.setValue(t,VF(e)),aa(t,ZE,{name:n.name})},a=zS({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:Td([fw("input-file-events",[ka(Au()),ka(Lu())])])}),c=function(n){return{uid:n.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:Td([IF.memory([]),yF.self(),eO.config({}),Hw.config({toggleClass:"dragenter",toggleOnExecute:!1}),fw("dropzone-events",[va("dragenter",o([e,Hw.toggle])),va("dragleave",o([e,Hw.toggle])),va("dragover",e),va("drop",o([e,r])),va(Du(),i)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:t.translate("Drop an image here")}},HS.sketch({dom:{tag:"button",innerHtml:t.translate("Browse for an image"),styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[a.asSpec()],action:function(n){var t=a.get(n);t.element().dom().click()},buttonBehaviours:Td([XE.config({}),QO.button(t.isReadOnly),YO()])})]}]}},s=n.label.map(function(n){return QE(n,t)}),f=jE.parts().field({factory:{sketch:c}});return YE(s,f,["tox-form__group--stretched"],[])},HF=function(n,t){return{dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--"+n.columns+"col"]},components:Xt(n.items,t.interpreter)}},zF=Sc("alloy-fake-before-tabstop"),NF=Sc("alloy-fake-after-tabstop"),LF=function(n){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:n},behaviours:Td([yw.config({ignore:!0}),XE.config({})])}},jF=function(n){return{dom:{tag:"div",classes:["tox-navobj"]},components:[LF([zF]),n,LF([NF])],behaviours:Td([yF.childAt(1)])}},UF=function(n,t){aa(n,Tu(),{raw:{which:9,shiftKey:t}})},WF=function(n,t){var e=t.element();Cs(e,zF)?UF(n,!0):Cs(e,NF)&&UF(n,!1)},GF=function(n){return lE(n,["."+zF,"."+NF].join(","),ft(!1))},XF=!(qi().browser.isIE()||qi().browser.isEdge()),YF=function(n){var t=qr("");return{getValue:function(){return t.get()},setValue:function(e,o){if(n)cc(e.element(),"srcdoc",o);else{cc(e.element(),"src","javascript:''");var r=e.element().dom().contentWindow.document;r.open(),r.write(o),r.close()}t.set(o)}}},qF=function(n,t){var e=XF&&n.sandboxed,o=ht(ht({},n.label.map(function(n){return{title:n}}).getOr({})),e?{sandbox:"allow-scripts allow-same-origin"}:{}),r=YF(e),i=n.label.map(function(n){return QE(n,t)}),u=function(n){return jF({uid:n.uid,dom:{tag:"iframe",attributes:o},behaviours:Td([XE.config({}),yw.config({}),IF.withComp(St.none(),r.getValue,r.setValue)])})},a=jE.parts().field({factory:{sketch:u}});return YE(i,a,["tox-form__group--stretched"],[])},KF=function(){function t(n,t){return function(){return n.apply(t,arguments)}}function e(n){var t=this;return null===this._state?void this._deferreds.push(n):void s(function(){var e=t._state?n.onFulfilled:n.onRejected;if(null===e)return void(t._state?n.resolve:n.reject)(t._value);var o;try{o=e(t._value)}catch(r){return void n.reject(r)}n.resolve(o)})}function o(n){try{if(n===this)throw new TypeError("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var e=n.then;if("function"==typeof e)return void a(t(e,n),t(o,this),t(r,this))}this._state=!0,this._value=n,i.call(this)}catch(u){r.call(this,u)}}function r(n){this._state=!1,this._value=n,i.call(this)}function i(){for(var n=0,t=this._deferreds;n<t.length;n++){var o=t[n];e.call(this,o)}this._deferreds=[]}function u(n,t,e,o){this.onFulfilled="function"==typeof n?n:null,this.onRejected="function"==typeof t?t:null,this.resolve=e,this.reject=o}function a(n,t,e){var o=!1;try{n(function(n){o||(o=!0,t(n))},function(n){o||(o=!0,e(n))})}catch(r){if(o)return;o=!0,e(r)}}var c=function(n){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof n)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],a(n,t(o,this),t(r,this))},s=c.immediateFn||"function"==typeof window.setImmediate&&window.setImmediate||function(t){n.setTimeout(t,1)},f=Array.isArray||function(n){return"[object Array]"===Object.prototype.toString.call(n)};return c.prototype.catch=function(n){return this.then(null,n)},c.prototype.then=function(n,t){var o=this;return new c(function(r,i){e.call(o,new u(n,t,r,i))})},c.all=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=Array.prototype.slice.call(1===n.length&&f(n[0])?n[0]:n);return new c(function(n,t){function o(i,u){try{if(u&&("object"==typeof u||"function"==typeof u)){var a=u.then;if("function"==typeof a)return void a.call(u,function(n){o(i,n)},t)}e[i]=u,0===--r&&n(e)}catch(c){t(c)}}if(0===e.length)return n([]);for(var r=e.length,i=0;i<e.length;i++)o(i,e[i])})},c.resolve=function(n){return n&&"object"==typeof n&&n.constructor===c?n:new c(function(t){t(n)})},c.reject=function(n){return new c(function(t,e){e(n)})},c.race=function(n){return new c(function(t,e){for(var o=0,r=n;o<r.length;o++){var i=r[o];i.then(t,e)}})},c},JF=window.Promise?window.Promise:KF(),$F=function(n){return B(n)},QF=[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],ZF=U([-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]),nI=j(R),tI=j(I),eI=function(n,t,e,o){return P(n,V(M(),t,e,o))},oI=W([0,-1,0,-1,5,-1,0,-1,0]),rI=L(function(n,t){return 255*Math.pow(n/255,1-t)}),iI=function(n){return ZF(n)},uI=function(n){return oI(n)},aI=function(n,t){return rI(n,t)},cI=function(n,t,e,o){return eI(n,t,e,o)},sI=function(n,t){return nI(n,t)},fI=function(n,t){return tI(n,t)},lI=function(n,t){return K(n,t)},dI=function(n,t,e,o,r){return $(n,t,e,o,r)},mI=function(n,t,e){return Z(n,t,e)},gI=function(n,t){return Y(n,t)},pI=function(n,t){return ht({dom:{tag:"span",innerHtml:n,classes:["tox-icon","tox-tbtn__icon-wrap"]}},t)},vI=function(n,t){return pI(LS(n,t),{})},hI=function(n,t){return pI(LS(n,t),{behaviours:Td([cw.config({})])})},bI=function(n,t,e){return{dom:{tag:"span",innerHtml:e.translate(n),classes:[t+"__select-label"]},behaviours:Td([cw.config({})])}},yI=Sc("toolbar.button.execute"),xI=function(n){return Ba(function(t){ZO(n,t)(function(e){aa(t,yI,{buttonApi:e}),n.onAction(e)})})},wI={"alloy.execute":["disabling","alloy.base.behaviour","toggling","toolbar-button-events"]},SI=Sc("update-menu-text"),kI=Sc("update-menu-icon"),CI=function(n,t,e){var r=qr(ut),i=n.text.map(function(n){return zS(bI(n,t,e.providers))}),u=n.icon.map(function(n){return zS(hI(n,e.providers.icons))}),a=function(n,t){var e=Hv.getValue(n);return yw.focus(e),aa(e,"keydown",{raw:t.event().raw()}),sD.close(e),St.some(!0)},c=n.role.fold(function(){return{}},function(n){return{role:n}}),s=n.tooltip.fold(function(){return{}},function(n){var t=e.providers.translate(n);return{title:t,"aria-label":t}}),f=zS(sD.sketch(ht(ht({},c),{dom:{tag:"button",classes:[t,t+"--select"].concat(Xt(n.classes,function(n){return t+"--"+n})),attributes:ht({},s)},components:r_([u.map(function(n){return n.asSpec()}),i.map(function(n){return n.asSpec()}),St.some({dom:{tag:"div",classes:[t+"__select-chevron"],innerHtml:LS("chevron-down",e.providers.icons)}})]),matchWidth:!0,useMinWidth:!0,dropdownBehaviours:Td(o(n.dropdownBehaviours,[QO.button(function(){return n.disabled||e.providers.isReadOnly()}),YO(),mD.config({}),cw.config({}),fw("dropdown-events",[n_(n,r),t_(n,r)]),fw("menubutton-update-display-text",[va(SI,function(n,t){i.bind(function(t){return t.getOpt(n)}).each(function(n){cw.set(n,[ff(e.providers.translate(t.event().text()))])})}),va(kI,function(n,t){u.bind(function(t){return t.getOpt(n)}).each(function(n){cw.set(n,[hI(t.event().icon(),e.providers.icons)])})})])])),eventOrder:Ke(wI,{mousedown:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"]}),sandboxBehaviours:Td([Qx.config({mode:"special",onLeft:a,onRight:a})]),lazySink:e.getSink,toggleClass:t+"--active",parts:{menu:$k(!1,n.columns,n.presets)},fetch:function(){return _B.nu(n.fetch)}})));return f.asSpec()},OI=function(n){return Tt(n)},_I=function(n){return"separator"===n.type},TI=function(n){return Le(n,"getSubmenuItems")},EI={type:"separator"},BI=function(n,t){var e=Qt(n,function(n,e){return OI(e)?""===e?n:"|"===e?n.length>0&&!_I(n[n.length-1])?n.concat([EI]):n:Le(t,e.toLowerCase())?n.concat([t[e.toLowerCase()]]):n:n.concat([e])},[]);return e.length>0&&_I(e[e.length-1])&&e.pop(),e},DI=function(n,t){var e=n.getSubmenuItems(),o=FI(e,t),r=Ke(o.menus,fo(n.value,o.items)),i=Ke(o.expansions,fo(n.value,n.value));return{item:n,menus:r,expansions:i}},AI=function(n,t){return TI(n)?DI(n,t):{item:n,menus:{},expansions:{}}},MI=function(n){if(_I(n))return n;var t=Ne(n,"value").getOrThunk(function(){return Sc("generated-menu-item")});return Ke({value:t},n)},FI=function(n,t){var e=BI(Tt(n)?n.split(" "):n,t);return $t(e,function(n,e){var o=MI(e),r=AI(o,t);return{menus:Ke(n.menus,r.menus),items:[r.item].concat(n.items),expansions:Ke(n.expansions,r.expansions)}},{menus:{},expansions:{},items:[]})},II=function(n,t,e,o){var r=Sc("primary-menu"),i=FI(n,e.shared.providers.menuItems());if(0===i.items.length)return St.none();var u=eE(r,i.items,t,e,o),a=Me(i.menus,function(n,o){return eE(o,n,t,e,!1)}),c=Ke(a,fo(r,u));return St.from(wS.tieredData(r,c,i.expansions))},RI=function(n){return{isDisabled:function(){return eO.isDisabled(n)},setDisabled:function(t){return eO.set(n,t)},setActive:function(t){var e=n.element();t?(ws(e,"tox-tbtn--enabled"),cc(e,"aria-pressed",!0)):(ks(e,"tox-tbtn--enabled"),mc(e,"aria-pressed"))},isActive:function(){return Cs(n.element(),"tox-tbtn--enabled")}}},VI=function(n,t,e,o){return CI({text:n.text,icon:n.icon,tooltip:n.tooltip,role:o,fetch:function(t){n.fetch(function(n){t(II(n,Ak.CLOSE_ON_EXECUTE,e,!1))})},onSetup:n.onSetup,getApi:RI,columns:1,presets:"normal",classes:[],dropdownBehaviours:[XE.config({})]},t,e.shared)},PI=function(n,t,e){var o=function(n){return function(o){var r=!o.isActive();o.setActive(r),n.storage.set(r),e.shared.getSink().each(function(e){t().getOpt(e).each(function(t){Ld(t.element()),aa(t,eB,{name:n.name,value:n.storage.get()})})})}},r=function(n){return function(t){t.setActive(n.storage.get())}};return function(t){t(Xt(n,function(n){var t=n.text.fold(function(){return{}},function(n){return{text:n}});return ht(ht({type:n.type,active:!1},t),{onAction:o(n),onSetup:r(n)})}))}},HI=function(n,t,e,o,r,i){void 0===e&&(e=[]);var u=t.fold(function(){return{}},function(n){return{action:n}}),a=ht({buttonBehaviours:Td([QO.button(function(){return n.disabled||i.isReadOnly()}),YO(),XE.config({}),fw("button press",[pa("click"),pa("mousedown")])].concat(e)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]}},u),c=Ke(a,{dom:o});return Ke(c,{components:r})},zI=function(n,t,e,o){void 0===o&&(o=[]);var r=n.tooltip.map(function(n){return{"aria-label":e.translate(n),title:e.translate(n)}}).getOr({}),i={tag:"button",classes:["tox-tbtn"],attributes:r},u=n.icon.map(function(n){return vI(n,e.icons)}),a=r_([u]);return HI(n,t,o,i,a,e)},NI=function(n,t,e,o){void 0===o&&(o=[]);var r=zI(n,St.some(t),e,o);return HS.sketch(r)},LI=function(n,t,e,r,i){void 0===r&&(r=[]),void 0===i&&(i=[]);var u=e.translate(n.text),a=n.icon?n.icon.map(function(n){return vI(n,e.icons)}):St.none(),c=a.isSome()?r_([a]):[],s=a.isSome()?{}:{innerHtml:u},f=o(n.primary||n.borderless?["tox-button"]:["tox-button","tox-button--secondary"],a.isSome()?["tox-button--icon"]:[],n.borderless?["tox-button--naked"]:[],i),l=ht(ht({tag:"button",classes:f},s),{attributes:{title:u}});return HI(n,t,r,l,c,e)},jI=function(n,t,e,o,r){void 0===o&&(o=[]),void 0===r&&(r=[]);var i=LI(n,St.some(t),e,o,r);return HS.sketch(i)},UI=function(t,e){return function(o){"custom"===e?aa(o,eB,{name:t,value:{}}):"submit"===e?ua(o,oB):"cancel"===e?ua(o,tB):n.console.error("Unknown button type: ",e)}},WI=function(n,t){return"menu"===t},GI=function(n,t){return"custom"===t||"cancel"===t||"submit"===t},XI=function(t,e,o){if(WI(t,e)){var r=function(){return a},i=t,u=ht(ht({},t),{onSetup:function(n){return n.setDisabled(t.disabled),ut},fetch:PI(i.items,r,o)}),a=zS(VI(u,"tox-tbtn",o,St.none()));return a.asSpec()}if(GI(t,e)){var c=UI(t.name,e),s=ht(ht({},t),{borderless:!1});return jI(s,c,o.shared.providers,[])}n.console.error("Unknown footer button type: ",e)},YI=function(n,t){var e=UI(n.name,"custom");return qE(St.none(),jE.parts().field(ht({factory:HS},LI(n,St.some(e),t,[IF.memory(""),yF.self()]))))},qI=ft([Pr("field1Name","field1"),Pr("field2Name","field2"),Al("onLockedChange"),Tl(["lockClass"]),Pr("locked",!1),jv.field("coupledFieldBehaviours",[ib,Hv])]),KI=function(n,t,e){return Mh(n,t,e).bind(ib.getCurrent)},JI=function(n,t){return hh({factory:jE,name:n,overrides:function(n){return{fieldBehaviours:Td([fw("coupled-input-behaviour",[va(Bu(),function(e){KI(e,n,t).each(function(t){Mh(e,n,"lock").each(function(o){Hw.isOn(o)&&n.onLockedChange(e,t,o)})})})])])}}})},$I=ft([JI("field1","field2"),JI("field2","field1"),hh({factory:HS,schema:[br("dom")],name:"lock",overrides:function(n){return{buttonBehaviours:Td([Hw.config({selected:n.locked,toggleClass:n.markers.lockClass,aria:{mode:"pressed"}})])}}})]),QI=function(n,t){return{uid:n.uid,dom:n.dom,components:t,behaviours:jv.augment(n.coupledFieldBehaviours,[ib.config({find:St.some}),Hv.config({store:{mode:"manual",getValue:function(t){var e,o=Ph(t,n,["field1","field2"]);return e={},e[n.field1Name]=Hv.getValue(o.field1()),e[n.field2Name]=Hv.getValue(o.field2()),e},setValue:function(t,e){var o=Ph(t,n,["field1","field2"]);je(e,n.field1Name)&&Hv.setValue(o.field1(),e[n.field1Name]),je(e,n.field2Name)&&Hv.setValue(o.field2(),e[n.field2Name])}}})]),apis:{getField1:function(t){return Mh(t,n,"field1")},getField2:function(t){return Mh(t,n,"field2")},getLock:function(t){return Mh(t,n,"lock")}}}},ZI=Jh({name:"FormCoupledInputs",configFields:qI(),partFields:$I(),factory:QI,apis:{getField1:function(n,t){return n.getField1(t)},getField2:function(n,t){return n.getField2(t)},getLock:function(n,t){return n.getLock(t)}}}),nR=function(n){var t={"":0,px:0,pt:1,mm:1,pc:2,ex:2,em:2,ch:2,rem:2,cm:3,"in":4,"%":4},e=function(n){return n in t?t[n]:1},o=n.value.toFixed(e(n.unit));return-1!==o.indexOf(".")&&(o=o.replace(/\.?0*$/,"")),o+n.unit},tR=function(n){var t=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/,e=t.exec(n);if(null!==e){var o=parseFloat(e[1]),r=e[2];return ve.value({value:o,unit:r})}return ve.error(n)},eR=function(n,t){var e={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,"in":1},o=function(n){return Object.prototype.hasOwnProperty.call(e,n)};return n.unit===t?St.some(n.value):o(n.unit)&&o(t)?St.some(e[n.unit]===e[t]?n.value:n.value/e[n.unit]*e[t]):St.none()},oR=function(){return St.none()},rR=function(n,t){return function(e){return eR(e,t).map(function(e){return{value:e*n,unit:t}})}},iR=function(n,t){var e=tR(n).toOption(),o=tR(t).toOption();return Zh(e,o,function(n,t){return eR(n,t.unit).map(function(n){return t.value/n}).map(function(n){return rR(n,t.unit)}).getOr(oR)}).getOr(oR)},uR=function(n,t){var e=oR,o=Sc("ratio-event"),r=ZI.parts().lock({dom:{tag:"button",classes:["tox-lock","tox-button","tox-button--naked","tox-button--icon"],attributes:{title:t.translate(n.label.getOr("Constrain proportions"))}},components:[{dom:{tag:"span",classes:["tox-icon","tox-lock-icon__lock"],innerHtml:LS("lock",t.icons)}},{dom:{tag:"span",classes:["tox-icon","tox-lock-icon__unlock"],innerHtml:LS("unlock",t.icons)}}],buttonBehaviours:Td([eO.config({disabled:function(){return n.disabled||t.isReadOnly()}}),YO(),XE.config({})])}),i=function(n){return{dom:{tag:"div",classes:["tox-form__group"]},components:n}},u=function(e){return jE.parts().field({factory:gB,inputClasses:["tox-textfield"],inputBehaviours:Td([eO.config({disabled:function(){return n.disabled||t.isReadOnly()}}),YO(),XE.config({}),fw("size-input-events",[va(Ou(),function(n){aa(n,o,{isField1:e})}),va(Du(),function(t){aa(t,ZE,{name:n.name})})])]),selectOnFocus:!1})},a=function(n){return{dom:{tag:"label",classes:["tox-label"],innerHtml:t.translate(n)}}},c=ZI.parts().field1(i([jE.parts().label(a("Width")),u(!0)])),s=ZI.parts().field2(i([jE.parts().label(a("Height")),u(!1)]));return ZI.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[c,s,i([a("&nbsp;"),r])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:function(n,t){tR(Hv.getValue(n)).each(function(n){e(n).each(function(n){Hv.setValue(t,nR(n))})})},coupledFieldBehaviours:Td([eO.config({disabled:function(){return n.disabled||t.isReadOnly()},onDisabled:function(n){ZI.getField1(n).bind(jE.getField).each(eO.disable),ZI.getField2(n).bind(jE.getField).each(eO.disable),ZI.getLock(n).each(eO.disable)},onEnabled:function(n){ZI.getField1(n).bind(jE.getField).each(eO.enable),ZI.getField2(n).bind(jE.getField).each(eO.enable),ZI.getLock(n).each(eO.enable)}}),YO(),fw("size-input-events2",[va(o,function(n,t){var o=t.event().isField1(),r=o?ZI.getField1(n):ZI.getField2(n),i=o?ZI.getField2(n):ZI.getField1(n),u=r.map(Hv.getValue).getOr(""),a=i.map(Hv.getValue).getOr("");e=iR(u,a)})])])})},aR=ft(Sc("undo")),cR=ft(Sc("redo")),sR=ft(Sc("zoom")),fR=ft(Sc("back")),lR=ft(Sc("apply")),dR=ft(Sc("swap")),mR=ft(Sc("transform")),gR=ft(Sc("temp-transform")),pR=ft(Sc("transform-apply")),vR={undo:aR,redo:cR,zoom:sR,back:fR,apply:lR,swap:dR,transform:mR,tempTransform:gR,transformApply:pR},hR=ft("save-state"),bR=ft("disable"),yR=ft("enable"),xR={formActionEvent:eB,saveState:hR,disable:bR,enable:yR},wR=function(n,t){var e=function(n,e,o,r){return zS(jI({name:n,text:n,disabled:o,primary:r,icon:St.none(),borderless:!1},e,t))},o=function(n,e,o,r){return zS(NI({name:n,icon:St.some(n),tooltip:St.some(e),disabled:r,primary:!1,borderless:!1},o,t))},r=function(n,t){n.map(function(n){var e=n.get(t);e.hasConfigured(eO)&&eO.disable(e)})},i=function(n,t){n.map(function(n){var e=n.get(t);e.hasConfigured(eO)&&eO.enable(e)})},u={tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools-edit-panel"]},a=ut,c=function(n,t,e){aa(n,t,e)},s=function(n){return ua(n,xR.disable())},f=function(n){return ua(n,xR.enable())},l=function(n,t){s(n),c(n,vR.transform(),{transform:t}),f(n)},d=function(n,t){s(n),c(n,vR.tempTransform(),{transform:t}),f(n)},m=function(n){return function(){ot.getOpt(n).each(function(n){cw.set(n,[tt])})}},g=function(n,t){s(n),c(n,vR.transformApply(),{transform:t,swap:m(n)}),f(n)},p=function(){return e("Back",function(n){return c(n,vR.back(),{swap:m(n)})},!1,!1)},v=function(){return zS({dom:{tag:"div",classes:["tox-spacer"]},behaviours:Td([eO.config({})])})},h=function(){return e("Apply",function(n){return c(n,vR.apply(),{swap:m(n)})},!0,!0)},b=function(){return function(t){var e=n.getRect();return dI(t,e.x,e.y,e.w,e.h)}},y=[p(),v(),e("Apply",function(t){var e=b();g(t,e),n.hideCrop()},!1,!0)],x=VE.sketch({dom:u,components:y.map(function(n){return n.asSpec()}),containerBehaviours:Td([fw("image-tools-crop-buttons-events",[va(xR.disable(),function(n){r(y,n)}),va(xR.enable(),function(n){i(y,n)})])])}),w=zS(uR({name:"size",label:St.none(),constrain:!0,disabled:!1},t)),S=function(n,t){return function(e){return mI(e,n,t)}},k=[p(),v(),w,v(),e("Apply",function(n){w.getOpt(n).each(function(t){var e=Hv.getValue(t),o=parseInt(e.width,10),r=parseInt(e.height,10),i=S(o,r);g(n,i)})},!1,!0)],C=VE.sketch({dom:u,components:k.map(function(n){return n.asSpec()}),containerBehaviours:Td([fw("image-tools-resize-buttons-events",[va(xR.disable(),function(n){r(k,n)}),va(xR.enable(),function(n){i(k,n)})])])}),O=function(n,t){return function(e){return n(e,t)}},_=O(lI,"h"),T=O(lI,"v"),E=O(gI,-90),B=O(gI,90),D=function(n,t){d(n,t)},A=[p(),v(),o("flip-horizontally","Flip horizontally",function(n){D(n,_)},!1),o("flip-vertically","Flip vertically",function(n){D(n,T)},!1),o("rotate-left","Rotate counterclockwise",function(n){D(n,E)},!1),o("rotate-right","Rotate clockwise",function(n){D(n,B)},!1),v(),h()],M=VE.sketch({dom:u,components:A.map(function(n){return n.asSpec()}),containerBehaviours:Td([fw("image-tools-fliprotate-buttons-events",[va(xR.disable(),function(n){r(A,n)}),va(xR.enable(),function(n){i(A,n)})])])}),F=function(n,e,o,r,i){var u=nF.parts().label({dom:{tag:"label",classes:["tox-label"],innerHtml:t.translate(n)}}),a=nF.parts().spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),c=nF.parts().thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return zS(nF.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:o,maxX:i,getInitialValue:ft({x:ft(r)})},components:[u,a,c],sliderBehaviours:Td([yw.config({})]),onChoose:e}))},I=function(n,t,e,o,r){var i=function(n,e,o){var r=O(t,o.x()/100);l(n,r)};return F(n,i,e,o,r)},R=function(n,t,e,o,r){return[p(),I(n,t,e,o,r),h()]},V=function(n,t,e,o,a){var c=R(n,t,e,o,a);return VE.sketch({dom:u,components:c.map(function(n){return n.asSpec()}),containerBehaviours:Td([fw("image-tools-filter-panel-buttons-events",[va(xR.disable(),function(n){r(c,n)}),va(xR.enable(),function(n){i(c,n)})])])})},P=[p(),v(),h()],H=VE.sketch({dom:u,components:P.map(function(n){return n.asSpec()})}),z=V("Brightness",sI,-100,0,100),N=V("Contrast",fI,-100,0,100),L=V("Gamma",aI,-100,0,100),j=function(n,t,e){return function(o){return cI(o,n,t,e)}},U=function(n){var t=function(n){var t=W.getOpt(n),e=X.getOpt(n),o=G.getOpt(n);t.each(function(t){e.each(function(e){o.each(function(o){var r=Hv.getValue(t).x()/100,i=Hv.getValue(o).x()/100,u=Hv.getValue(e).x()/100,a=j(r,i,u);l(n,a)})})})};return F(n,t,0,100,200)},W=U("R"),G=U("G"),X=U("B"),Y=[p(),W,G,X,h()],q=VE.sketch({dom:u,components:Y.map(function(n){return n.asSpec()})}),K=function(n,t,e){return function(o){var r=function(){ot.getOpt(o).each(function(t){cw.set(t,[n]),e(t)})};c(o,vR.swap(),{transform:t,swap:r})}},J=function(){n.showCrop()},$=function(t){w.getOpt(t).each(function(t){var e=n.getMeasurements(),o=e.width,r=e.height;Hv.setValue(t,{width:o,height:r})})},Q=St.some(uI),Z=St.some(iI),nt=[o("crop","Crop",K(x,St.none(),J),!1),o("resize","Resize",K(C,St.none(),$),!1),o("orientation","Orientation",K(M,St.none(),a),!1),o("brightness","Brightness",K(z,St.none(),a),!1),o("sharpen","Sharpen",K(H,Q,a),!1),o("contrast","Contrast",K(N,St.none(),a),!1),o("color-levels","Color levels",K(q,St.none(),a),!1),o("gamma","Gamma",K(L,St.none(),a),!1),o("invert","Invert",K(H,Z,a),!1)],tt=VE.sketch({dom:u,components:nt.map(function(n){return n.asSpec()})}),et=VE.sketch({dom:{tag:"div"},components:[tt],containerBehaviours:Td([cw.config({})])}),ot=zS(et),rt=function(n){return ot.getOpt(n).map(function(n){var t=n.components()[0];return t.components()[t.components().length-1]})};return{memContainer:ot,getApplyButton:rt}},SR=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),kR=tinymce.util.Tools.resolve("tinymce.geom.Rect"),CR=tinymce.util.Tools.resolve("tinymce.util.Observable"),OR=tinymce.util.Tools.resolve("tinymce.util.Tools"),_R=tinymce.util.Tools.resolve("tinymce.util.VK"),TR=0,ER=function(n,t,e,o,r){function i(t,o,r,i){var u,a,c,s,f;u=o.x,a=o.y,c=o.w,s=o.h,u+=r*t.deltaX,a+=i*t.deltaY,c+=r*t.deltaW,s+=i*t.deltaH,20>c&&(c=20),20>s&&(s=20),f=n=kR.clamp({x:u,y:a,w:c,h:s},e,"move"===t.name),f=x(e,f),S.fire("updateRect",{rect:f}),l(f)}function u(){function t(t){var e;return new et(v,{document:o.ownerDocument,handle:v+"-"+t.name,start:function(){e=n},drag:function(n){i(t,e,n.deltaX,n.deltaY)}})}SR('<div id="'+v+'" class="'+p+'croprect-container" role="grid" aria-dropeffect="execute">').appendTo(o),OR.each(b,function(n){SR("#"+v,o).append('<div id="'+v+"-"+n+'"class="'+p+'croprect-block" style="display: none" data-mce-bogus="all">')}),OR.each(h,function(n){SR("#"+v,o).append('<div id="'+v+"-"+n.name+'" class="'+p+"croprect-handle "+p+"croprect-handle-"+n.name+'"style="display: none" data-mce-bogus="all" role="gridcell" tabindex="-1" aria-label="'+n.label+'" aria-grabbed="false" title="'+n.label+'">')}),g=OR.map(h,t),c(n),SR(o).on("focusin focusout",function(n){SR(n.target).attr("aria-grabbed","focus"===n.type?"true":"false")}),SR(o).on("keydown",function(t){function e(n,t,e,r,u){n.stopPropagation(),n.preventDefault(),i(o,e,r,u)}var o;switch(OR.each(h,function(n){return t.target.id===v+"-"+n.name?(o=n,!1):void 0}),t.keyCode){case _R.LEFT:e(t,o,n,-10,0);break;case _R.RIGHT:e(t,o,n,10,0);break;case _R.UP:e(t,o,n,0,-10);break;case _R.DOWN:e(t,o,n,0,10);break;case _R.ENTER:case _R.SPACEBAR:t.preventDefault(),r()}})}function a(n){var t=OR.map(h,function(n){return"#"+v+"-"+n.name}).concat(OR.map(b,function(n){return"#"+v+"-"+n})).join(",");n?SR(t,o).show():SR(t,o).hide()}function c(n){function e(n,t){t.h<0&&(t.h=0),t.w<0&&(t.w=0),SR("#"+v+"-"+n,o).css({left:t.x,top:t.y,width:t.w,height:t.h})}OR.each(h,function(t){SR("#"+v+"-"+t.name,o).css({left:n.w*t.xMul+n.x,top:n.h*t.yMul+n.y})}),e("top",{x:t.x,y:t.y,w:t.w,h:n.y-t.y}),e("right",{x:n.x+n.w,y:n.y,w:t.w-n.x-n.w+t.x,h:n.h}),e("bottom",{x:t.x,y:n.y+n.h,w:t.w,h:t.h-n.y-n.h+t.y}),e("left",{x:t.x,y:n.y,w:n.x-t.x,h:n.h}),e("move",n)}function s(t){n=t,c(n)}function f(e){t=e,c(n)}function l(n){s(y(e,n))}function d(t){e=t,c(n)}function m(){OR.each(g,function(n){n.destroy()}),g=[]}var g,p="tox-",v=p+"crid-"+TR++,h=[{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"}],b=["top","right","bottom","left"],y=function(n,t){return{x:t.x+n.x,y:t.y+n.y,w:t.w,h:t.h}},x=function(n,t){return{x:t.x-n.x,y:t.y-n.y,w:t.w,h:t.h}},w=function(){return x(e,n)};u();var S=OR.extend({toggleVisibility:a,setClampRect:d,setRect:s,getInnerRect:w,setInnerRect:l,setViewPortRect:f,destroy:m},CR);return S},BR={create:ER},DR=function(n){return new fk(function(t){var e=function(){n.removeEventListener("load",e),t(n)};n.complete?t(n):n.addEventListener("load",e)})},AR=function(n){var t=zS({dom:{tag:"div",classes:["tox-image-tools__image-bg"],attributes:{role:"presentation"}}}),e=qr(1),o=qr(St.none()),r=qr({x:0,y:0,w:1,h:1}),i=qr({x:0,y:0,w:1,h:1}),u=function(n,i){g.getOpt(n).each(function(n){var u=e.get(),a=Tf(n.element()),c=vf(n.element()),s=i.dom().naturalWidth*u,f=i.dom().naturalHeight*u,l=Math.max(0,a/2-s/2),d=Math.max(0,c/2-f/2),m={left:l.toString()+"px",top:d.toString()+"px",width:s.toString()+"px",height:f.toString()+"px",position:"absolute"};Us(i,m),t.getOpt(n).each(function(n){Us(n.element(),m)}),o.get().each(function(n){var t=r.get();n.setRect({x:t.x*u+l,y:t.y*u+d,w:t.w*u,h:t.h*u}),n.setClampRect({x:l,y:d,w:s,h:f}),n.setViewPortRect({x:0,y:0,w:a,h:c})})})},a=function(n,t){g.getOpt(n).each(function(n){var o=Tf(n.element()),r=vf(n.element()),i=t.dom().naturalWidth,u=t.dom().naturalHeight,a=Math.min(o/i,r/u);e.set(a>=1?1:a)})},c=function(n,t){var e=ni.fromTag("img");return cc(e,"src",t),DR(e.dom()).then(function(){return g.getOpt(n).map(function(n){var t=lf({element:e});cw.replaceAt(n,1,St.some(t));var o=i.get(),c={x:0,y:0,w:e.dom().naturalWidth,h:e.dom().naturalHeight};i.set(c);var s=kR.inflate(c,-20,-20);return r.set(s),(o.w!==c.w||o.h!==c.h)&&a(n,e),u(n,e),e})})},s=function(n,t){var o=e.get(),r=t>0?Math.min(2,o+.1):Math.max(.1,o-.1);e.set(r),g.getOpt(n).each(function(n){var t=n.components()[1].element();u(n,t)})},f=function(){o.get().each(function(n){n.toggleVisibility(!0)})},l=function(){o.get().each(function(n){n.toggleVisibility(!1)})},d=function(){return r.get()},m=VE.sketch({dom:{tag:"div",classes:["tox-image-tools__image"]},components:[t.asSpec(),{dom:{tag:"img",attributes:{src:n}}},{dom:{tag:"div"},behaviours:Td([fw("image-panel-crop-events",[_a(function(n){g.getOpt(n).each(function(n){var t=n.element().dom(),i=BR.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},t,function(){});i.toggleVisibility(!1),i.on("updateRect",function(n){var t=n.rect,o=e.get(),i={x:Math.round(t.x/o),y:Math.round(t.y/o),w:Math.round(t.w/o),h:Math.round(t.h/o)};r.set(i)}),o.set(St.some(i))})})])])}],containerBehaviours:Td([cw.config({}),fw("image-panel-events",[_a(function(t){c(t,n)})])])}),g=zS(m),p=function(){var n=i.get();return{width:n.w,height:n.h}};return{memContainer:g,updateSrc:c,zoom:s,showCrop:f,hideCrop:l,getRect:d,getMeasurements:p}},MR=function(n,t,e,o,r){return NI({name:n,icon:St.some(t),disabled:e,tooltip:St.some(n),primary:!1,borderless:!1},o,r)},FR=function(n,t){t?eO.enable(n):eO.disable(n)},IR=function(n){var t=function(n,t,r){e.getOpt(n).each(function(n){FR(n,t)}),o.getOpt(n).each(function(n){FR(n,r)})},e=zS(MR("Undo","undo",!0,function(n){aa(n,vR.undo(),{direction:1})},n)),o=zS(MR("Redo","redo",!0,function(n){aa(n,vR.redo(),{direction:1})},n)),r=VE.sketch({dom:{tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools__sidebar"]},components:[e.asSpec(),o.asSpec(),MR("Zoom in","zoom-in",!1,function(n){aa(n,vR.zoom(),{direction:1})},n),MR("Zoom out","zoom-out",!1,function(n){aa(n,vR.zoom(),{direction:-1})},n)]});return{container:r,updateButtonUndoStates:t}},RR=function(t){var e=qr(t),o=qr(St.none()),r=ot();
r.add(t);var i=function(){return e.get()},u=function(n){e.set(n)},a=function(){return o.get().fold(function(){return e.get()},function(n){return n})},c=function(n){var t=s(n);return d(),o.set(St.some(t)),t.url},s=function(t){return{blob:t,url:n.URL.createObjectURL(t)}},f=function(t){n.URL.revokeObjectURL(t.url)},l=function(n){OR.each(n,f)},d=function(){o.get().each(f),o.set(St.none())},m=function(n){var t=s(n);u(t);var e=r.add(t).removed;return l(e),t.url},g=function(n){var t=s(n);return o.set(St.some(t)),t.url},p=function(n){return o.get().fold(function(){},function(t){m(t.blob),n()})},v=function(){var n=r.undo();return u(n),n.url},h=function(){var n=r.redo();return u(n),n.url},b=function(){var n=r.canUndo(),t=r.canRedo();return{undoEnabled:n,redoEnabled:t}};return{getBlobState:i,setBlobState:u,addBlobState:m,getTempState:a,updateTempState:c,addTempState:g,applyTempState:p,destroyTempState:d,undo:v,redo:h,getHistoryStates:b}},VR=function(t,e){var o=RR(t.currentState),r=function(n,t){var e=t.event().direction();C.zoom(n,e)},i=function(n){var t=o.getHistoryStates();O.updateButtonUndoStates(n,t.undoEnabled,t.redoEnabled),aa(n,xR.formActionEvent,{name:xR.saveState(),value:t.undoEnabled})},u=function(n){O.updateButtonUndoStates(n,!1,!1)},a=function(n){var t=o.undo();d(n,t).then(function(){l(n),i(n)})},c=function(n){var t=o.redo();d(n,t).then(function(){l(n),i(n)})},s=function(n){return n.toBlob()},f=function(n){aa(n,xR.formActionEvent,{name:xR.disable(),value:{}})},l=function(n){_.getApplyButton(n).each(function(n){eO.enable(n)}),aa(n,xR.formActionEvent,{name:xR.enable(),value:{}})},d=function(n,t){return f(n),C.updateSrc(n,t)},m=function(t,e,o,r,u){return f(t),$F(e).then(o).then(s).then(r).then(function(n){return d(t,n).then(function(n){return i(t),u(),l(t),n})}).catch(function(e){return n.console.log(e),l(t),e})},g=function(n,t,e){var r=o.getBlobState().blob,i=function(n){return o.updateTempState(n)};m(n,r,t,i,e)},p=function(n,t){var e=o.getTempState().blob,r=function(n){return o.addTempState(n)};m(n,e,t,r,ut)},v=function(n,t,e){var r=o.getBlobState().blob,i=function(t){var e=o.addBlobState(t);return b(n),e};m(n,r,t,i,e)},h=function(n,t){var e=function(){b(n);var e=t.event().swap();e()};o.applyTempState(e)},b=function(n){var t=o.getBlobState().url;return o.destroyTempState(),i(n),t},y=function(n){var t=b(n);d(n,t).then(function(){l(n)})},x=function(n,t){y(n);var e=t.event().swap();e(),C.hideCrop()},w=function(n,t){return g(n,t.event().transform(),ut)},S=function(n,t){return p(n,t.event().transform())},k=function(n,t){return v(n,t.event().transform(),t.event().swap())},C=AR(t.currentState.url),O=IR(e),_=wR(C,e),T=function(n,t){u(n);var e=t.event().transform(),o=t.event().swap();e.fold(function(){o()},function(t){g(n,t,o)})};return{dom:{tag:"div",attributes:{role:"presentation"}},components:[_.memContainer.asSpec(),C.memContainer.asSpec(),O.container],behaviours:Td([Hv.config({store:{mode:"manual",getValue:function(){return o.getBlobState()}}}),fw("image-tools-events",[va(vR.undo(),a),va(vR.redo(),c),va(vR.zoom(),r),va(vR.back(),x),va(vR.apply(),h),va(vR.transform(),w),va(vR.tempTransform(),S),va(vR.transformApply(),k),va(vR.swap(),T)]),yF.self()])}},PR=function(n,t){var e={dom:{tag:"label",innerHtml:t.providers.translate(n.label),classes:["tox-label"]}},o=Xt(n.items,t.interpreter);return{dom:{tag:"div",classes:["tox-form__group"]},components:[e].concat(o),behaviours:Td([yF.self(),cw.config({}),IF.domHtml(St.none()),Qx.config({mode:"acyclic"})])}},HR=function(n,t){return{dom:{tag:"div",classes:n.classes},components:Xt(n.items,t.shared.interpreter)}},zR=function(n){var t=Xt(n.options,function(n){return{dom:{tag:"option",value:n.value,innerHtml:n.text}}}),e=n.data.map(function(n){return fo("initialValue",n)}).getOr({});return{uid:n.uid,dom:{tag:"select",classes:n.selectClasses,attributes:n.selectAttributes},components:t,behaviours:Lv(n.selectBehaviours,[yw.config({}),Hv.config({store:ht({mode:"manual",getValue:function(n){return Qs(n.element())},setValue:function(t,e){var o=ne(n.options,function(n){return n.value===e});o.isSome()&&Zs(t.element(),e)}},e)})])}},NR=Kh({name:"HtmlSelect",configFields:[br("options"),zv("selectBehaviours",[yw,Hv]),Pr("selectClasses",[]),Pr("selectAttributes",{}),Br("data")],factory:zR}),LR=function(n,t){var e=Xt(n.items,function(n){return{text:t.translate(n.text),value:n.value}}),o=n.label.map(function(n){return QE(n,t)}),r=jE.parts().field({dom:{},selectAttributes:{size:n.size},options:e,factory:NR,selectBehaviours:Td([eO.config({disabled:function(){return n.disabled||t.isReadOnly()}}),XE.config({}),fw("selectbox-change",[va(Du(),function(t){aa(t,ZE,{name:n.name})})])])}),i=n.size>1?St.none():St.some({dom:{tag:"div",classes:["tox-selectfield__icon-js"],innerHtml:LS("chevron-down",t.icons)}}),u={dom:{tag:"div",classes:["tox-selectfield"]},components:ee([[r],i.toArray()])};return jE.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:ee([o.toArray(),[u]]),fieldBehaviours:Td([eO.config({disabled:function(){return n.disabled||t.isReadOnly()},onDisabled:function(n){jE.getField(n).each(eO.disable)},onEnabled:function(n){jE.getField(n).each(eO.enable)}}),YO()])})},jR=function(n,t){var e=function(n){return{dom:{tag:"th",innerHtml:t.translate(n)}}},o=function(n){return{dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:Xt(n,e)}]}},r=function(n){return{dom:{tag:"td",innerHtml:t.translate(n)}}},i=function(n){return{dom:{tag:"tr"},components:Xt(n,r)}},u=function(n){return{dom:{tag:"tbody"},components:Xt(n,i)}};return{dom:{tag:"table",classes:["tox-dialog__table"]},components:[o(n.header),u(n.cells)],behaviours:Td([XE.config({}),yw.config({})])}},UR=function(n,t){var e=n.label.map(function(n){return QE(n,t)}),o=[eO.config({disabled:function(){return n.disabled||t.isReadOnly()}}),YO(),Qx.config({mode:"execution",useEnter:n.multiline!==!0,useControlEnter:n.multiline===!0,execute:function(n){return ua(n,oB),St.some(!0)}}),fw("textfield-change",[va(Bu(),function(t){aa(t,ZE,{name:n.name})}),va(Pu(),function(t){aa(t,ZE,{name:n.name})})]),XE.config({})],r=n.validation.map(function(n){return HB.config({getRoot:function(n){return La(n.element())},invalidClass:"tox-invalid",validator:{validate:function(t){var e=Hv.getValue(t),o=n.validator(e);return _B.pure(o===!0?ve.value(e):ve.error(o))},validateOnLoad:n.validateOnLoad}})}).toArray(),i=n.placeholder.fold(ft({}),function(n){return{placeholder:t.translate(n)}}),u=n.inputMode.fold(ft({}),function(n){return{inputmode:n}}),a=ht(ht({},i),u),c=jE.parts().field({tag:n.multiline===!0?"textarea":"input",inputAttributes:a,inputClasses:[n.classname],inputBehaviours:Td(ee([o,r])),selectOnFocus:!1,factory:gB}),s=n.flex?["tox-form__group--stretched"]:[],f=s.concat(n.maximized?["tox-form-group--maximize"]:[]),l=[eO.config({disabled:function(){return n.disabled||t.isReadOnly()},onDisabled:function(n){jE.getField(n).each(eO.disable)},onEnabled:function(n){jE.getField(n).each(eO.enable)}}),YO()];return YE(e,c,f,l)},WR=function(n,t){return UR({name:n.name,multiline:!1,label:n.label,inputMode:n.inputMode,placeholder:n.placeholder,flex:!1,disabled:n.disabled,classname:"tox-textfield",validation:St.none(),maximized:n.maximized},t)},GR=function(n,t){return UR({name:n.name,multiline:!0,label:n.label,inputMode:St.none(),placeholder:n.placeholder,flex:!0,disabled:n.disabled,classname:"tox-textarea",validation:St.none(),maximized:n.maximized},t)},XR=function(n,t){var e=n.stream.streams,o=e.setup(n,t);return da([va(n.event,o),Ta(function(){return t.cancel()})].concat(n.cancelEvent.map(function(n){return[va(n,function(){return t.cancel()})]}).getOr([])))},YR=Object.freeze({__proto__:null,events:XR}),qR=function(){var n=qr(null),t=function(){return{timer:null!==n.get()?"set":"unset"}},e=function(t){n.set(t)},o=function(){var t=n.get();null!==t&&t.cancel()};return Uc({readState:t,setTimer:e,cancel:o})},KR=function(n){return n.stream.streams.state(n)},JR=Object.freeze({__proto__:null,throttle:qR,init:KR}),$R=function(n,t){var e=n.stream,o=qS(n.onStream,e.delay);return t.setTimer(o),function(n,t){o.throttle(n,t),e.stopEvent&&t.stop()}},QR=[yr("stream",cr("mode",{throttle:[br("delay"),Pr("stopEvent",!0),Fl("streams",{setup:$R,state:qR})]})),Pr("event","input"),Br("cancelEvent"),Al("onStream")],ZR=Bd({fields:QR,name:"streaming",active:YR,state:JR}),nV=function(n,t,e){var o=Hv.getValue(e);Hv.setValue(t,o),eV(t)},tV=function(n,t){var e=n.element(),o=Qs(e),r=e.dom();"number"!==fc(e,"type")&&t(r,o)},eV=function(n){tV(n,function(n,t){return n.setSelectionRange(t.length,t.length)})},oV=function(n,t){tV(n,function(n,e){return n.setSelectionRange(t,e.length)})},rV=function(n,t,e){if(n.selectsOver){var o=Hv.getValue(t),r=n.getDisplayText(o),i=Hv.getValue(e),u=n.getDisplayText(i);return 0===u.indexOf(r)?St.some(function(){nV(n,t,e),oV(t,r.length)}):St.none()}return St.none()},iV=ft("alloy.typeahead.itemexecute"),uV=function(n,t,e,o){var r=function(t,e,r){n.previewing.set(!1);var i=WB.getCoupled(t,"sandbox");if(ev.isOpen(i))ib.getCurrent(i).each(function(n){Ob.getHighlighted(n).fold(function(){r(n)},function(){la(i,n.element(),"keydown",e)})});else{var a=function(n){ib.getCurrent(n).each(r)};$B(n,u(t),t,i,o,a,hB.HighlightFirst).get(ut)}},i=fB(n),u=function(n){return function(t){return t.map(function(t){var e=ze(t.menus),o=oe(e,function(n){return Jt(n.items,function(n){return"item"===n.type})}),r=Hv.getState(n);return r.update(Xt(o,function(n){return n.data})),t})}},a=[yw.config({}),Hv.config({onSetValue:n.onSetValue,store:ht({mode:"dataset",getDataKey:function(n){return Qs(n.element())},getFallbackEntry:function(n){return{value:n,meta:{}}},setValue:function(t,e){Zs(t.element(),n.model.getDisplayText(e))}},n.initialData.map(function(n){return fo("initialValue",n)}).getOr({}))}),ZR.config({stream:{mode:"throttle",delay:n.responseTime,stopEvent:!1},onStream:function(t){var e=WB.getCoupled(t,"sandbox"),r=yw.isFocused(t);if(r&&Qs(t.element()).length>=n.minChars){var i=ib.getCurrent(e).bind(function(n){return Ob.getHighlighted(n).map(Hv.getValue)});n.previewing.set(!0);var a=function(){ib.getCurrent(e).each(function(t){i.fold(function(){n.model.selectsOver&&Ob.highlightFirst(t)},function(n){Ob.highlightBy(t,function(t){var e=Hv.getValue(t);return e.value===n.value}),Ob.getHighlighted(t).orThunk(function(){return Ob.highlightFirst(t),St.none()})})})};$B(n,u(t),t,e,o,a,hB.HighlightFirst).get(ut)}},cancelEvent:Wu()}),Qx.config({mode:"special",onDown:function(n,t){return r(n,t,Ob.highlightFirst),St.some(!0)},onEscape:function(n){var t=WB.getCoupled(n,"sandbox");return ev.isOpen(t)?(ev.close(t),St.some(!0)):St.none()},onUp:function(n,t){return r(n,t,Ob.highlightLast),St.some(!0)},onEnter:function(t){var e=WB.getCoupled(t,"sandbox"),o=ev.isOpen(e);if(o&&!n.previewing.get())return ib.getCurrent(e).bind(function(n){return Ob.getHighlighted(n)}).map(function(n){return aa(t,iV(),{item:n}),!0});var r=Hv.getValue(t);return ua(t,Wu()),n.onExecute(e,t,r),o&&ev.close(e),St.some(!0)}}),Hw.config({toggleClass:n.markers.openClass,aria:{mode:"expanded"}}),WB.config({others:{sandbox:function(t){return oD(n,t,{onOpen:function(){return Hw.on(t)},onClose:function(){return Hw.off(t)}})}}}),fw("typeaheadevents",[Ba(function(t){var e=ut;ZB(n,u(t),t,o,e,hB.HighlightFirst).get(ut)}),va(iV(),function(t,e){var o=WB.getCoupled(t,"sandbox");nV(n.model,t,e.event().item()),ua(t,Wu()),n.onItemExecute(t,o,e.event().item(),Hv.getValue(t)),ev.close(o),eV(t)})].concat(n.dismissOnBlur?[va(Vu(),function(n){var t=WB.getCoupled(n,"sandbox");Gd(t.element()).isNone()&&ev.close(t)})]:[]))];return{uid:n.uid,dom:dB(Ke(n,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:ht(ht({},i),Lv(n.typeaheadBehaviours,a)),eventOrder:n.eventOrder}},aV=ft([Br("lazySink"),br("fetch"),Pr("minChars",5),Pr("responseTime",1e3),Bl("onOpen"),Pr("getHotspot",St.some),Pr("getAnchorOverrides",ft({})),Pr("layouts",St.none()),Pr("eventOrder",{}),Xr("model",{},[Pr("getDisplayText",function(n){return void 0!==n.meta&&void 0!==n.meta.text?n.meta.text:n.value}),Pr("selectsOver",!0),Pr("populateFromBrowse",!0)]),Bl("onSetValue"),Dl("onExecute"),Bl("onItemExecute"),Pr("inputClasses",[]),Pr("inputAttributes",{}),Pr("inputStyles",{}),Pr("matchWidth",!0),Pr("useMinWidth",!1),Pr("dismissOnBlur",!0),Tl(["openClass"]),Br("initialData"),zv("typeaheadBehaviours",[yw,Hv,ZR,Qx,Hw,WB]),Yr("previewing",function(){return qr(!0)})].concat(sB()).concat(iD())),cV=ft([bh({schema:[_l()],name:"menu",overrides:function(n){return{fakeFocus:!0,onHighlight:function(t,e){t.getSystem().getByUid(n.uid).each(n.previewing.get()?function(o){rV(n.model,o,e).fold(function(){return Ob.dehighlight(t,e)},function(n){return n()})}:function(t){n.model.populateFromBrowse&&nV(n.model,t,e)}),n.previewing.set(!1)},onExecute:function(t,e){return t.getSystem().getByUid(n.uid).toOption().map(function(n){return aa(n,iV(),{item:e}),!0})},onHover:function(t,e){n.previewing.set(!1),t.getSystem().getByUid(n.uid).each(function(t){n.model.populateFromBrowse&&nV(n.model,t,e)})}}}})]),sV=Jh({name:"Typeahead",configFields:aV(),partFields:cV(),factory:uV}),fV=function(t){var e=function(){return fV(t.toCached())},o=function(n){return fV(t.bind(function(t){return t.fold(function(n){return _B.pure(ve.error(n))},function(t){return n(t)})}))},r=function(n){return fV(t.map(function(t){return t.bind(n)}))},i=function(n){return fV(t.map(function(t){return t.map(n)}))},u=function(n){return fV(t.map(function(t){return t.mapError(n)}))},a=function(n,e){return t.map(function(t){return t.fold(n,e)})},c=function(e,o){return fV(_B.nu(function(r){var i=!1,u=n.setTimeout(function(){i=!0,r(ve.error(o()))},e);t.get(function(t){i||(n.clearTimeout(u),r(t))})}))};return ht(ht({},t),{toCached:e,bindFuture:o,bindResult:r,mapResult:i,mapError:u,foldResult:a,withTimeout:c})},lV=function(n){return fV(_B.nu(n))},dV=function(n){return fV(_B.pure(ve.value(n)))},mV=function(n){return fV(_B.pure(ve.error(n)))},gV=function(n){return fV(_B.pure(n))},pV=function(n){return fV(n.map(ve.value))},vV=function(n){return lV(function(t){n.then(function(n){t(ve.value(n))},function(n){t(ve.error(n))})})},hV={nu:lV,wrap:fV,pure:dV,value:dV,error:mV,fromResult:gV,fromFuture:pV,fromPromise:vV},bV={type:"separator"},yV=function(n){return{type:"menuitem",value:n.url,text:n.title,meta:{attach:n.attach},onAction:function(){}}},xV=function(n,t){return{type:"menuitem",value:t,text:n,meta:{attach:void 0},onAction:function(){}}},wV=function(n){return Xt(n,yV)},SV=function(n,t){return Jt(t,function(t){return t.type===n})},kV=function(n,t){return wV(SV(n,t))},CV=function(n){return kV("header",n.targets)},OV=function(n){return kV("anchor",n.targets)},_V=function(n){return St.from(n.anchorTop).map(function(n){return xV("<top>",n)}).toArray()},TV=function(n){return St.from(n.anchorBottom).map(function(n){return xV("<bottom>",n)}).toArray()},EV=function(n){return Xt(n,function(n){return xV(n,n)})},BV=function(n){return Qt(n,function(n,t){var e=0===n.length||0===t.length;return e?n.concat(t):n.concat(bV,t)},[])},DV=function(n,t){var e=n.toLowerCase();return Jt(t,function(n){var t=void 0!==n.meta&&void 0!==n.meta.text?n.meta.text:n.text;return Ri(t.toLowerCase(),e)||Ri(n.value.toLowerCase(),e)})},AV=function(n,t,e){var o=Hv.getValue(t),r=void 0!==o.meta.text?o.meta.text:o.value,i=e.getLinkInformation();return i.fold(function(){return[]},function(t){var o=DV(r,EV(e.getHistory(n)));return"file"===n?BV([o,DV(r,CV(t)),DV(r,ee([_V(t),OV(t),TV(t)]))]):o})},MV=Sc("aria-invalid"),FV=function(n,t,e){var o,r=t.shared.providers,i=function(t){var o=Hv.getValue(t);e.addToHistory(o.value,n.filetype)},u=jE.parts().field({factory:sV,dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":MV,type:"url"},minChars:0,responseTime:0,fetch:function(o){var r=AV(n.filetype,o,e),i=II(r,Ak.BUBBLE_TO_SANDBOX,t,!1);return _B.pure(i)},getHotspot:function(n){return m.getOpt(n)},onSetValue:function(n){n.hasConfigured(HB)&&HB.run(n).get(ut)},typeaheadBehaviours:Td(ee([e.getValidationHandler().map(function(t){return HB.config({getRoot:function(n){return La(n.element())},invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:function(n,t){s.getOpt(n).each(function(n){cc(n.element(),"title",r.translate(t))})}},validator:{validate:function(e){var o=Hv.getValue(e);return hV.nu(function(e){t({type:n.filetype,url:o.value},function(n){if("invalid"===n.status){var t=ve.error(n.message);e(t)}else{var o=ve.value(n.message);e(o)}})})},validateOnLoad:!1}})}).toArray(),[eO.config({disabled:function(){return n.disabled||r.isReadOnly()}}),XE.config({}),fw("urlinput-events",ee(["file"===n.filetype?[va(Bu(),function(t){aa(t,ZE,{name:n.name})})]:[],[va(Du(),function(t){aa(t,ZE,{name:n.name}),i(t)}),va(Pu(),function(t){aa(t,ZE,{name:n.name}),i(t)})]]))]])),eventOrder:(o={},o[Bu()]=["streaming","urlinput-events","invalidating"],o),model:{getDisplayText:function(n){return n.value},selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:t.shared.getSink,parts:{menu:$k(!1,1,"normal")},onExecute:function(n,t){aa(t,oB,{})},onItemExecute:function(t){i(t),aa(t,ZE,{name:n.name})}}),a=n.label.map(function(n){return QE(n,r)}),c=function(n,t,e,o){return void 0===e&&(e=n),void 0===o&&(o=n),{dom:{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+n],innerHtml:LS(e,r.icons),attributes:ht({title:r.translate(o),"aria-live":"polite"},t.fold(function(){return{}},function(n){return{id:n}}))}}},s=zS(c("invalid",St.some(MV),"warning")),f=zS({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[s.asSpec()]}),l=e.getUrlPicker(n.filetype),d=Sc("browser.url.event"),m=zS({dom:{tag:"div",classes:["tox-control-wrap"]},components:[u,f.asSpec()],behaviours:Td([eO.config({disabled:function(){return n.disabled||r.isReadOnly()}})])}),g=zS(jI({name:n.name,icon:St.some("browse"),text:n.label.getOr(""),disabled:n.disabled,primary:!1,borderless:!0},function(n){return ua(n,d)},r,[],["tox-browse-url"])),p=function(){return{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:ee([[m.asSpec()],l.map(function(){return g.asSpec()}).toArray()])}},v=function(t){ib.getCurrent(t).each(function(e){var o=Hv.getValue(e),r=ht({fieldname:n.name},o);l.each(function(o){o(r).get(function(o){Hv.setValue(e,o),aa(t,ZE,{name:n.name})})})})};return jE.sketch({dom:JE(),components:a.toArray().concat([p()]),fieldBehaviours:Td([eO.config({disabled:function(){return n.disabled||r.isReadOnly()},onDisabled:function(n){jE.getField(n).each(eO.disable),g.getOpt(n).each(eO.disable)},onEnabled:function(n){jE.getField(n).each(eO.enable),g.getOpt(n).each(eO.enable)}}),YO(),fw("url-input-events",[va(d,v)])])})},IV=function(n,t){return VE.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:[HS.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:LS(n.icon,t.icons),attributes:{title:t.translate(n.iconTooltip)}},action:function(t){aa(t,eB,{name:"alert-banner",value:n.url})}})]},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:t.translate(n.text)}}]})},RV=function(n,t){var e=Hv.config({store:{mode:"manual",getValue:function(n){var t=n.element().dom();return t.checked},setValue:function(n,t){var e=n.element().dom();e.checked=t}}}),o=function(n){return n.element().dom().click(),St.some(!0)},r=jE.parts().field({factory:{sketch:lt},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:Td([yF.self(),eO.config({disabled:function(){return n.disabled||t.isReadOnly()}}),XE.config({}),yw.config({}),e,Qx.config({mode:"special",onEnter:o,onSpace:o,stopSpaceKeyup:!0}),fw("checkbox-events",[va(Du(),function(t){aa(t,ZE,{name:n.name})})])])}),i=jE.parts().label({dom:{tag:"span",classes:["tox-checkbox__label"],innerHtml:t.translate(n.label)},behaviours:Td([mD.config({})])}),u=function(n){var e="checked"===n?"selected":"unselected";return{dom:{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+n],innerHtml:LS(e,t.icons)}}},a=zS({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[u("checked"),u("unchecked")]});return jE.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[r,a.asSpec(),i],fieldBehaviours:Td([eO.config({disabled:function(){return n.disabled||t.isReadOnly()},disableClass:"tox-checkbox--disabled",onDisabled:function(n){jE.getField(n).each(eO.disable)},onEnabled:function(n){jE.getField(n).each(eO.enable)}}),YO()])})},VV=function(n){return VE.sketch("presentation"===n.presets?{dom:{tag:"div",classes:["tox-form__group"],innerHtml:n.html}}:{dom:{tag:"div",classes:["tox-form__group"],innerHtml:n.html,attributes:{role:"document"}},containerBehaviours:Td([XE.config({}),yw.config({})])})},PV=function(n){return function(t,e,o){return Ne(e,"name").fold(function(){return n(e,o)},function(r){return t.field(r,n(e,o))})}},HV=function(n){return function(t,e,o){var r=Ke(e,{source:"dynamic"});return PV(n)(t,r,o)}},zV={bar:PV(function(n,t){return HE(n,t.shared)}),collection:PV(function(n,t){return cB(n,t.shared.providers)}),alertbanner:PV(function(n,t){return IV(n,t.shared.providers)}),input:PV(function(n,t){return WR(n,t.shared.providers)}),textarea:PV(function(n,t){return GR(n,t.shared.providers)}),label:PV(function(n,t){return PR(n,t.shared)}),iframe:HV(function(n,t){return qF(n,t.shared.providers)}),button:PV(function(n,t){return YI(n,t.shared.providers)}),checkbox:PV(function(n,t){return RV(n,t.shared.providers)}),colorinput:PV(function(n,t){return bD(n,t.shared,t.colorinput)}),colorpicker:PV(kF),dropzone:PV(function(n,t){return PF(n,t.shared.providers)}),grid:PV(function(n,t){return HF(n,t.shared)}),selectbox:PV(function(n,t){return LR(n,t.shared.providers)}),sizeinput:PV(function(n,t){return uR(n,t.shared.providers)}),urlinput:PV(function(n,t){return FV(n,t,t.urlinput)}),customeditor:PV(_F),htmlpanel:PV(VV),imagetools:PV(function(n,t){return VR(n,t.shared.providers)}),table:PV(function(n,t){return jR(n,t.shared.providers)}),panel:PV(function(n,t){return HR(n,t)})},NV={field:function(n,t){return t}},LV=function(n,t,e){var o=Ke(e,{shared:{interpreter:function(t){return jV(n,t,o)}}});return jV(n,t,o)},jV=function(t,e,o){return Ne(zV,e.type).fold(function(){return n.console.error('Unknown factory type "'+e.type+'", defaulting to container: ',e),e},function(n){return n(t,e,o)})},UV=function(n,t){var e=NV;return jV(e,n,t)},WV={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},GV=function(n,t,e){var o=Om(-12,12,WV),r={maxHeightFunction:xm()},i=function(){return{anchor:"node",root:zs(Pa(n())),node:St.from(n()),bubble:o,layouts:{onRtl:function(){return[FS]},onLtr:function(){return[MS]}},overrides:r}},u=function(){return{anchor:"hotspot",hotspot:t(),bubble:o,layouts:{onRtl:function(){return[ud]},onLtr:function(){return[ad]}},overrides:r}};return function(){return e()?i():u()}},XV=function(n,t,e){var o=function(){return{anchor:"node",root:zs(Pa(n())),node:St.from(n()),layouts:{onRtl:function(){return[IS]},onLtr:function(){return[IS]}}}},r=function(){return{anchor:"hotspot",hotspot:t(),layouts:{onRtl:function(){return[ld]},onLtr:function(){return[ld]}}}};return function(){return e()?o():r()}},YV=function(n,t){return function(){return{anchor:"selection",root:t(),getSelection:function(){var t=n.selection.getRng();return St.some(rg.range(ni.fromDom(t.startContainer),t.startOffset,ni.fromDom(t.endContainer),t.endOffset))}}}},qV=function(n){return function(t){return{anchor:"node",root:n(),node:t}}},KV=function(n,t,e){var o=EO(n),r=function(){return ni.fromDom(n.getBody())},i=function(){return ni.fromDom(n.getContentAreaContainer())},u=function(){return o||!e()};return{inlineDialog:GV(i,t,u),banner:XV(i,t,u),cursor:YV(n,r),node:qV(r)}},JV=function(n){return function(t,e){var o=RT(n);o(t,e)}},$V=function(n){return function(){return hT(n)}},QV=function(n){return function(){return yT(n)}},ZV=function(n){return function(){return TT(n)}},nP=function(n){return{colorPicker:JV(n),hasCustomColors:$V(n),getColors:QV(n),getColorCols:ZV(n)}},tP=function(n){return function(){return MO(n)}},eP=function(n){return{isDraggableModal:tP(n)}},oP=function(n){var t=qr(OO(n)?"bottom":"top");return{isPositionedAtTop:function(){return"top"===t.get()},getDockingMode:t.get,setDockingMode:t.set}},rP=[{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",format:"bold"},{title:"Italic",format:"italic"},{title:"Underline",format:"underline"},{title:"Strikethrough",format:"strikethrough"},{title:"Superscript",format:"superscript"},{title:"Subscript",format:"subscript"},{title:"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",format:"alignleft"},{title:"Center",format:"aligncenter"},{title:"Right",format:"alignright"},{title:"Justify",format:"alignjustify"}]}],iP=function(n){return Le(n,"items")},uP=function(n){return Le(n,"block")},aP=function(n){return Le(n,"inline")},cP=function(n){return Le(n,"selector")},sP=function(n){return Qt(n,function(n,t){if(iP(t)){var e=sP(t.items);return{customFormats:n.customFormats.concat(e.customFormats),formats:n.formats.concat([{title:t.title,items:e.formats}])}}if(aP(t)||uP(t)||cP(t)){var o="custom-"+t.title.toLowerCase();return{customFormats:n.customFormats.concat([{name:o,format:t}]),formats:n.formats.concat([{title:t.title,format:o,icon:t.icon}])}}return ht(ht({},n),{formats:n.formats.concat(t)})},{customFormats:[],formats:[]})},fP=function(n,t){var e=sP(t),o=function(t){Yt(t,function(t){n.formatter.has(t.name)||n.formatter.register(t.name,t.format)})};return n.formatter?o(e.customFormats):n.on("init",function(){o(e.customFormats)}),e.formats},lP=function(n){return mO(n).map(function(t){var e=fP(n,t);return gO(n)?rP.concat(e):e}).getOr(rP)},dP=function(n,t,e){var o={type:"formatter",isSelected:t(n.format),getStylePreview:e(n.format)};return Ke(n,o)},mP=function(n,t,e,o){var r=function(n){return dP(n,e,o)},i=function(n){var t={type:"submenu"};return Ke(n,t)},u=function(t){var r=Sc(t.title),i={type:"formatter",format:r,isSelected:e(r),getStylePreview:o(r)},u=Ke(t,i);return n.formatter.register(r,u),u},a=function(n){return Xt(n,function(n){var t=Be(n);if(je(n,"items")){var e=a(n.items);return Ke(i(n),{getStyleItems:function(){return e}})}return je(n,"format")?r(n):1===t.length&&jt(t,"title")?Ke(n,{type:"separator"}):u(n)})};return a(t)},gP=function(n){var t=function(t){return function(){return n.formatter.match(t)}},e=function(t){return function(){var e=n.formatter.get(t);return void 0!==e?St.some({tag:e.length>0?e[0].inline||e[0].block||"div":"div",styles:n.dom.parseStyle(n.formatter.getCssText(t))}):St.none()}},o=function(n){var t=n.items;return void 0!==t&&t.length>0?oe(t,o):[n.format]},r=qr([]),i=qr([]),u=qr([]),a=qr([]),c=qr(!1);n.on("PreInit",function(){var u=lP(n),a=mP(n,u,t,e);r.set(a),i.set(oe(a,o))}),n.on("addStyleModifications",function(r){var i=mP(n,r.items,t,e);u.set(i),c.set(r.replace),a.set(oe(i,o))});var s=function(){var n=c.get()?[]:r.get(),t=u.get();return n.concat(t)},f=function(){var n=c.get()?[]:i.get(),t=a.get();return n.concat(t)};return{getData:s,getFlattenedKeys:f}},pP=OR.trim,vP=function(n){return function(t){if(t&&1===t.nodeType){if(t.contentEditable===n)return!0;if(t.getAttribute("data-mce-contenteditable")===n)return!0}return!1}},hP=vP("true"),bP=vP("false"),yP=function(n,t,e,o,r){return{type:n,title:t,url:e,level:o,attach:r}},xP=function(n){for(;n=n.parentNode;){var t=n.contentEditable;if(t&&"inherit"!==t)return hP(n)}return!1},wP=function(n,t){return Xt(_g(ni.fromDom(t),n),function(n){return n.dom()})},SP=function(n){return n.innerText||n.textContent},kP=function(n){return n.id?n.id:Sc("h")},CP=function(n){return n&&"A"===n.nodeName&&void 0!==(n.id||n.name)},OP=function(n){return CP(n)&&TP(n)},_P=function(n){return n&&/^(H[1-6])$/.test(n.nodeName)},TP=function(n){return xP(n)&&!bP(n)},EP=function(n){return _P(n)&&TP(n)},BP=function(n){return _P(n)?parseInt(n.nodeName.substr(1),10):0},DP=function(n){var t=kP(n),e=function(){n.id=t};return yP("header",SP(n),"#"+t,BP(n),e)},AP=function(n){var t=n.id||n.name,e=SP(n);return yP("anchor",e?e:"#"+t,"#"+t,0,ut)},MP=function(n){return Xt(Jt(n,EP),DP)},FP=function(n){return Xt(Jt(n,OP),AP)},IP=function(n){var t=wP("h1,h2,h3,h4,h5,h6,a:not([href])",n);return t},RP=function(n){return pP(n.title).length>0},VP=function(n){var t=IP(n);return Jt(MP(t).concat(FP(t)),RP)},PP={find:VP},HP="tinymce-url-history",zP=5,NP=function(n){return Tt(n)&&/^https?/.test(n)},LP=function(n){return Bt(n)&&n.length<=zP&&re(n,NP)},jP=function(n){return Et(n)&&He(n,function(n){return!LP(n)}).isNone()},UP=function(){var t=fT.getItem(HP);if(null===t)return{};var e;try{e=JSON.parse(t)}catch(o){if(o instanceof SyntaxError)return n.console.log("Local storage "+HP+" was not valid JSON",o),{};throw o}return jP(e)?e:(n.console.log("Local storage "+HP+" was not valid format",e),{})},WP=function(n){if(!jP(n))throw new Error("Bad format for history:\n"+JSON.stringify(n));fT.setItem(HP,JSON.stringify(n))},GP=function(n){var t=UP();return Object.prototype.hasOwnProperty.call(t,n)?t[n]:[]},XP=function(n,t){if(NP(n)){var e=UP(),o=Object.prototype.hasOwnProperty.call(e,t)?e[t]:[],r=Jt(o,function(t){return t!==n});e[t]=[n].concat(r).slice(0,zP),WP(e)}},YP=function(n){return!!n},qP=function(n){return Me(OR.makeMap(n,/[, ]/),YP)},KP=function(n){return St.from(VO(n)).filter(It)},JP=function(n){var t=St.some(PO(n)).filter(YP),e=St.some(HO(n)).filter(YP),o=t.or(e).map(qP);return KP(n).fold(function(){return!1},function(){return o.fold(function(){return!0},function(n){return Be(n).length>0?n:!1})})},$P=function(n,t){var e=JP(n);return Dt(e)?e?KP(n):St.none():e[t]?KP(n):St.none()},QP=function(n,t){return $P(n,t).map(function(e){return function(o){return _B.nu(function(r){var i=function(n,t){if(!Tt(n))throw new Error("Expected value to be string");if(void 0!==t&&!Et(t))throw new Error("Expected meta to be a object");var e={value:n,meta:t};r(e)},u=ht({filetype:t,fieldname:o.fieldname},St.from(o.meta).getOr({}));e.call(n,i,o.value,u)})}})},ZP=function(n){return zO(n)?St.none():St.some({targets:PP.find(n.getBody()),anchorTop:NO(n),anchorBottom:LO(n)})},nH=function(n){return St.from(jO(n))},tH=function(n){return{getHistory:GP,addToHistory:XP,getLinkInformation:function(){return ZP(n)},getValidationHandler:function(){return nH(n)},getUrlPicker:function(t){return QP(n,t)}}},eH=function(n,t,e){var o=qr(!1),r=oP(t),i={shared:{providers:{icons:function(){return t.ui.registry.getAll().icons},menuItems:function(){return t.ui.registry.getAll().menuItems},translate:PC.translate,isReadOnly:function(){return t.mode.isReadOnly()}},interpreter:function(n){return UV(n,i)},anchors:KV(t,e,r.isPositionedAtTop),header:r,getSink:function(){return ve.value(n)}},urlinput:tH(t),styleselect:gP(t),colorinput:nP(t),dialog:eP(t),isContextMenuOpen:function(){return o.get()},setContextMenuState:function(n){return o.set(n)}};return i},oH=ft(function(n,t){Bf(n,Math.floor(t))}),rH="contexttoolbar-show",iH="contexttoolbar-hide",uH=ft([br("items"),Tl(["itemSelector"]),zv("tgroupBehaviours",[Qx])]),aH=ft([xh({name:"items",unit:"item"})]),cH=function(n,t){return{uid:n.uid,dom:n.dom,components:t,behaviours:Lv(n.tgroupBehaviours,[Qx.config({mode:"flow",selector:n.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}}},sH=Jh({name:"ToolbarGroup",configFields:uH(),partFields:aH(),factory:cH}),fH=ft([br("dom"),Pr("shell",!0),zv("toolbarBehaviours",[cw])]),lH=function(){return{behaviours:Td([cw.config({})])}
},dH=ft([yh({name:"groups",overrides:lH})]),mH=function(t,e){var o=function(t,e){r(t).fold(function(){throw n.console.error("Toolbar was defined to not be a shell, but no groups container was specified in components"),new Error("Toolbar was defined to not be a shell, but no groups container was specified in components")},function(n){cw.set(n,e)})},r=function(n){return t.shell?St.some(n):Mh(n,t,"groups")},i=t.shell?{behaviours:[cw.config({})],components:[]}:{behaviours:[],components:e};return{uid:t.uid,dom:t.dom,components:i.components,behaviours:Lv(t.toolbarBehaviours,i.behaviours),apis:{setGroups:o},domModification:{attributes:{role:"group"}}}},gH=Jh({name:"Toolbar",configFields:fH(),partFields:dH(),factory:mH,apis:{setGroups:function(n,t,e){n.setGroups(t,e)}}}),pH=function(n,t){var e={len:0,list:[]},o=Qt(n,function(n,e){var o=t(e,n.len);return o.fold(ft(n),function(t){return{len:t.finish(),list:n.list.concat([t])}})},e);return o.list},vH=function(n,t,e){return{within:ft(n),extra:ft(t),withinWidth:ft(e)}},hH=function(n,t,e){var o=pH(n,function(n,t){var o=e(n);return St.some({element:ft(n),start:ft(t),finish:ft(t+o),width:ft(o)})}),r=Jt(o,function(n){return n.finish()<=t}),i=$t(r,function(n,t){return n+t.width()},0),u=o.slice(r.length);return{within:ft(r),extra:ft(u),withinWidth:ft(i)}},bH=function(n){return Xt(n,function(n){return n.element()})},yH=function(n,t,e){var o=bH(n.concat(t));return vH(o,[],e)},xH=function(n,t,e,o){var r=bH(n).concat([e]);return vH(r,bH(t),o)},wH=function(n,t,e){return vH(bH(n),[],e)},SH=function(n,t,e){var o=hH(t,n,e);return 0===o.extra().length?St.some(o):St.none()},kH=function(n,t,e,o){var r=SH(n,t,e).getOrThunk(function(){return hH(t,n-e(o),e)}),i=r.within(),u=r.extra(),a=r.withinWidth();return 1===u.length&&u[0].width()<=e(o)?yH(i,u,a):u.length>=1?xH(i,u,o,a):wH(i,u,a)},CH=function(n,t){var e=Xt(t,function(n){return gf(n)});gH.setGroups(n,e)},OH=function(n){return de(n,function(n){return Gd(n.element()).bind(function(t){return n.getSystem().getByDom(t).toOption()})})},_H=function(n,t,e){var o=Fh(n,t,"primary"),r=WB.getCoupled(n,"overflowGroup");js(o.element(),"visibility","hidden");var i=t.builtGroups.get().concat([r]),u=OH(i);e([]),CH(o,i);var a=Tf(o.element()),c=kH(a,t.builtGroups.get(),function(n){return Tf(n.element())},r);0===c.extra().length?(cw.remove(o,r),e([])):(CH(o,c.within()),e(c.extra())),Js(o.element(),"visibility"),$s(o.element()),u.each(yw.focus)},TH=ft([zv("splitToolbarBehaviours",[WB]),Yr("builtGroups",function(){return qr([])})]),EH=ft([Tl(["overflowToggledClass"]),Fr("getOverflowBounds"),br("lazySink"),Yr("overflowGroups",function(){return qr([])})].concat(TH())),BH=ft([hh({factory:gH,schema:fH(),name:"primary"}),bh({schema:fH(),name:"overflow"}),bh({name:"overflow-button"}),bh({name:"overflow-group"})]),DH=ft([Tl(["toggledClass"]),br("lazySink"),Cr("fetch"),Fr("getBounds"),Rr("fireDismissalEventInstead",[Pr("event",Qu())]),Fm()]),AH=ft([bh({name:"button",overrides:function(n){return{dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:Td([Hw.config({toggleClass:n.markers.toggledClass,aria:{mode:"expanded"},toggleOnExecute:!1})])}}}),bh({factory:gH,schema:fH(),name:"toolbar",overrides:function(n){return{toolbarBehaviours:Td([Qx.config({mode:"cyclic",onEscape:function(t){return Mh(t,n,"button").each(yw.focus),St.none()}})])}}})]),MH=function(n,t){var e=WB.getCoupled(n,"toolbarSandbox");ev.isOpen(e)?ev.close(e):ev.open(e,t.toolbar())},FH=function(n,t,e,o){var r=e.getBounds.map(function(n){return n()}),i=e.lazySink(n).getOrDie();Sp.positionWithinBounds(i,{anchor:"hotspot",hotspot:n,layouts:o,overrides:{maxWidthFunction:oH()}},t,r)},IH=function(n,t,e,o,r){gH.setGroups(t,r),FH(n,t,e,o),Hw.on(n)},RH=function(n,t,e){var o=cl(),r=function(r,i){e.fetch().get(function(r){IH(n,i,e,t.layouts,r),o.link(n.element()),Qx.focusIn(i)})},i=function(){Hw.off(n),yw.focus(n),o.unlink(n.element())};return{dom:{tag:"div",attributes:{id:o.id}},behaviours:Td([Qx.config({mode:"special",onEscape:function(n){return ev.close(n),St.some(!0)}}),ev.config({onOpen:r,onClose:i,isPartOf:function(t,e,o){return fl(e,o)||fl(n,o)},getAttachPoint:function(){return e.lazySink(n).getOrDie()}}),Pd.config({channels:ht(ht({},av(ht({isExtraPart:gt},e.fireDismissalEventInstead.map(function(n){return{fireEventInstead:{event:n.event}}}).getOr({})))),sv({doReposition:function(){ev.getState(WB.getCoupled(n,"toolbarSandbox")).each(function(o){FH(n,o,e,t.layouts)})}}))})])}},VH=function(n,t,e,o){return ht(ht({},HS.sketch(ht(ht({},o.button()),{action:function(n){MH(n,o)},buttonBehaviours:jv.augment({dump:o.button().buttonBehaviours},[WB.config({others:{toolbarSandbox:function(t){return RH(t,e,n)}}})])}))),{apis:{setGroups:function(t,o){ev.getState(WB.getCoupled(t,"toolbarSandbox")).each(function(r){IH(t,r,n,e.layouts,o)})},reposition:function(t){ev.getState(WB.getCoupled(t,"toolbarSandbox")).each(function(o){FH(t,o,n,e.layouts)})},toggle:function(n){MH(n,o)},getToolbar:function(n){return ev.getState(WB.getCoupled(n,"toolbarSandbox"))}}})},PH=Jh({name:"FloatingToolbarButton",factory:VH,configFields:DH(),partFields:AH(),apis:{setGroups:function(n,t,e){n.setGroups(t,e)},reposition:function(n,t){n.reposition(t)},toggle:function(n,t){n.toggle(t)},getToolbar:function(n,t){return n.getToolbar(t)}}}),HH=function(n){return Xt(n,function(n){return gf(n)})},zH=function(n,t,e){_H(n,e,function(o){e.overflowGroups.set(o),t.getOpt(n).each(function(n){PH.setGroups(n,HH(o))})})},NH=function(n,t,e,o){var r=zS(PH.sketch({fetch:function(){return _B.nu(function(t){t(HH(n.overflowGroups.get()))})},layouts:{onLtr:function(){return[ad,ud]},onRtl:function(){return[ud,ad]},onBottomLtr:function(){return[sd,cd]},onBottomRtl:function(){return[cd,sd]}},getBounds:e.getOverflowBounds,lazySink:n.lazySink,fireDismissalEventInstead:{},markers:{toggledClass:n.markers.overflowToggledClass},parts:{button:o["overflow-button"](),toolbar:o.overflow()}}));return{uid:n.uid,dom:n.dom,components:t,behaviours:Lv(n.splitToolbarBehaviours,[WB.config({others:{overflowGroup:function(){return sH.sketch(ht(ht({},o["overflow-group"]()),{items:[r.asSpec()]}))}}})]),apis:{setGroups:function(t,e){n.builtGroups.set(Xt(e,t.getSystem().build)),zH(t,r,n)},refresh:function(t){return zH(t,r,n)},toggle:function(n){r.getOpt(n).each(function(n){PH.toggle(n)})},reposition:function(n){r.getOpt(n).each(function(n){PH.reposition(n)})},getOverflow:function(n){return r.getOpt(n).bind(function(n){return PH.getToolbar(n)})}},domModification:{attributes:{role:"group"}}}},LH=Jh({name:"SplitFloatingToolbar",configFields:EH(),partFields:BH(),factory:NH,apis:{setGroups:function(n,t,e){n.setGroups(t,e)},refresh:function(n,t){n.refresh(t)},reposition:function(n,t){n.reposition(t)},toggle:function(n,t){n.toggle(t)},getOverflow:function(n,t){return n.getOverflow(t)}}}),jH=function(n,t){return t.getAnimationRoot.fold(function(){return n.element()},function(t){return t(n)})},UH=function(n){return n.dimension.property},WH=function(n,t){return n.dimension.getDimension(t)},GH=function(n,t){var e=jH(n,t);_s(e,[t.shrinkingClass,t.growingClass])},XH=function(n,t){ks(n.element(),t.openClass),ws(n.element(),t.closedClass),js(n.element(),UH(t),"0px"),$s(n.element())},YH=function(n,t){ks(n.element(),t.closedClass),ws(n.element(),t.openClass),Js(n.element(),UH(t))},qH=function(n,t,e){e.setCollapsed(),js(n.element(),UH(t),WH(t,n.element())),$s(n.element()),GH(n,t),XH(n,t),t.onStartShrink(n),t.onShrunk(n)},KH=function(n,t,e,o){var r=o.getOrThunk(function(){return WH(t,n.element())});e.setCollapsed(),js(n.element(),UH(t),r),$s(n.element());var i=jH(n,t);ks(i,t.growingClass),ws(i,t.shrinkingClass),XH(n,t),t.onStartShrink(n)},JH=function(n,t,e){var o=WH(t,n.element()),r="0px"===o?qH:KH;r(n,t,e,St.some(o))},$H=function(n,t,e){var o=jH(n,t),r=Cs(o,t.shrinkingClass),i=WH(t,n.element());YH(n,t);var u=WH(t,n.element()),a=function(){js(n.element(),UH(t),i),$s(n.element())},c=function(){XH(n,t)},s=r?a:c;s(),ks(o,t.shrinkingClass),ws(o,t.growingClass),YH(n,t),js(n.element(),UH(t),u),e.setExpanded(),t.onStartGrow(n)},QH=function(n,t,e){if(e.isExpanded()){Js(n.element(),UH(t));var o=WH(t,n.element());js(n.element(),UH(t),o)}},ZH=function(n,t,e){e.isExpanded()||$H(n,t,e)},nz=function(n,t,e){e.isExpanded()&&JH(n,t,e)},tz=function(n,t,e){e.isExpanded()&&qH(n,t,e,St.none())},ez=function(n,t,e){return e.isExpanded()},oz=function(n,t,e){return e.isCollapsed()},rz=function(n,t){var e=jH(n,t);return Cs(e,t.growingClass)===!0},iz=function(n,t){var e=jH(n,t);return Cs(e,t.shrinkingClass)===!0},uz=function(n,t){return rz(n,t)===!0||iz(n,t)===!0},az=function(n,t,e){var o=e.isExpanded()?JH:$H;o(n,t,e)},cz=Object.freeze({__proto__:null,refresh:QH,grow:ZH,shrink:nz,immediateShrink:tz,hasGrown:ez,hasShrunk:oz,isGrowing:rz,isShrinking:iz,isTransitioning:uz,toggleGrow:az,disableTransitions:GH}),sz=function(n,t){var e=t.expanded;return qc(e?{classes:[t.openClass],styles:{}}:{classes:[t.closedClass],styles:fo(t.dimension.property,"0px")})},fz=function(n,t){return da([Oa(Mu(),function(e,o){var r=o.event().raw();if(r.propertyName===n.dimension.property){GH(e,n),t.isExpanded()&&Js(e.element(),n.dimension.property);var i=t.isExpanded()?n.onGrown:n.onShrunk;i(e)}})])},lz=Object.freeze({__proto__:null,exhibit:sz,events:fz}),dz=[br("closedClass"),br("openClass"),br("shrinkingClass"),br("growingClass"),Br("getAnimationRoot"),Bl("onShrunk"),Bl("onStartShrink"),Bl("onGrown"),Bl("onStartGrow"),Pr("expanded",!1),yr("dimension",cr("property",{width:[Fl("property","width"),Fl("getDimension",function(n){return Tf(n)+"px"})],height:[Fl("property","height"),Fl("getDimension",function(n){return vf(n)+"px"})]}))],mz=function(n){var e=qr(n.expanded),o=function(){return"expanded: "+e.get()};return Uc({isExpanded:function(){return e.get()===!0},isCollapsed:function(){return e.get()===!1},setCollapsed:t(e.set,!1),setExpanded:t(e.set,!0),readState:o})},gz=Object.freeze({__proto__:null,init:mz}),pz=Bd({fields:dz,name:"sliding",active:lz,apis:cz,state:gz}),vz=ft([Tl(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),Bl("onOpened"),Bl("onClosed")].concat(TH())),hz=ft([hh({factory:gH,schema:fH(),name:"primary"}),hh({factory:gH,schema:fH(),name:"overflow",overrides:function(n){return{toolbarBehaviours:Td([pz.config({dimension:{property:"height"},closedClass:n.markers.closedClass,openClass:n.markers.openClass,shrinkingClass:n.markers.shrinkingClass,growingClass:n.markers.growingClass,onShrunk:function(t){Mh(t,n,"overflow-button").each(function(n){Hw.off(n),yw.focus(n)}),n.onClosed(t)},onGrown:function(t){Qx.focusIn(t),n.onOpened(t)},onStartGrow:function(t){Mh(t,n,"overflow-button").each(Hw.on)}}),Qx.config({mode:"acyclic",onEscape:function(t){return Mh(t,n,"overflow-button").each(yw.focus),St.some(!0)}})])}}}),bh({name:"overflow-button",overrides:function(n){return{buttonBehaviours:Td([Hw.config({toggleClass:n.markers.overflowToggledClass,aria:{mode:"pressed"},toggleOnExecute:!1})])}}}),bh({name:"overflow-group"})]),bz=function(n,t){Mh(n,t,"overflow").each(function(e){yz(n,t),pz.toggleGrow(e)})},yz=function(n,t){Mh(n,t,"overflow").each(function(e){_H(n,t,function(n){var t=Xt(n,function(n){return gf(n)});gH.setGroups(e,t)}),Mh(n,t,"overflow-button").each(function(n){pz.hasGrown(e)&&Hw.on(n)}),pz.refresh(e)})},xz=function(n,t,e,o){var r="alloy.toolbar.toggle",i=function(t,e){var o=Xt(e,t.getSystem().build);n.builtGroups.set(o)};return{uid:n.uid,dom:n.dom,components:t,behaviours:Lv(n.splitToolbarBehaviours,[WB.config({others:{overflowGroup:function(n){return sH.sketch(ht(ht({},o["overflow-group"]()),{items:[HS.sketch(ht(ht({},o["overflow-button"]()),{action:function(){ua(n,r)}}))]}))}}}),fw("toolbar-toggle-events",[va(r,function(t){Mh(t,n,"overflow").each(function(e){yz(t,n),pz.toggleGrow(e)})})])]),apis:{setGroups:function(t,e){i(t,e),yz(t,n)},refresh:function(t){return yz(t,n)},toggle:function(t){return bz(t,n)}},domModification:{attributes:{role:"group"}}}},wz=Jh({name:"SplitSlidingToolbar",configFields:vz(),partFields:hz(),factory:xz,apis:{setGroups:function(n,t,e){n.setGroups(t,e)},refresh:function(n,t){n.refresh(t)},toggle:function(n,t){n.toggle(t)}}}),Sz=ft(Sc("toolbar-height-change")),kz=function(n){var t=n.title.fold(function(){return{}},function(n){return{attributes:{title:n}}});return{dom:ht({tag:"div",classes:["tox-toolbar__group"]},t),components:[sH.parts().items({})],items:n.items,markers:{itemSelector:"*:not(.tox-split-button) > .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-js:not([disabled])"},tgroupBehaviours:Td([XE.config({}),yw.config({})])}},Cz=function(n){return sH.sketch(kz(n))},Oz=function(n,t){var e=_a(function(t){var e=Xt(n.initGroups,Cz);gH.setGroups(t,e)});return Td([QO.toolbarButton(n.providers.isReadOnly),YO(),Qx.config({mode:t,onEscape:n.onEscape,selector:".tox-toolbar__group"}),fw("toolbar-events",[e])])},_z=function(n){var t=n.cyclicKeying?"cyclic":"acyclic";return{uid:n.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":kz({title:St.none(),items:[]}),"overflow-button":zI({name:"more",icon:St.some("more-drawer"),disabled:!1,tooltip:St.some("More..."),primary:!1,borderless:!1},St.none(),n.providers)},splitToolbarBehaviours:Oz(n,t)}},Tz=function(n){var t=_z(n),e=4,o=LH.parts().primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return LH.sketch(ht(ht({},t),{lazySink:n.getSink,getOverflowBounds:function(){var t=n.moreDrawerData.lazyHeader().element(),o=Qf(t),r=za(t),i=Qf(r),u=Math.max(r.dom().scrollHeight,i.height);return Jf(o.x+e,i.y,o.width-2*e,u)},parts:ht(ht({},t.parts),{overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:n.attributes}}}),components:[o],markers:{overflowToggledClass:"tox-tbtn--enabled"}}))},Ez=function(n){var t=wz.parts().primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),e=wz.parts().overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),o=_z(n);return wz.sketch(ht(ht({},o),{components:[t,e],markers:{openClass:"tox-toolbar__overflow--open",closedClass:"tox-toolbar__overflow--closed",growingClass:"tox-toolbar__overflow--growing",shrinkingClass:"tox-toolbar__overflow--shrinking",overflowToggledClass:"tox-tbtn--enabled"},onOpened:function(n){n.getSystem().broadcastOn([Sz()],{type:"opened"})},onClosed:function(n){n.getSystem().broadcastOn([Sz()],{type:"closed"})}}))},Bz=function(n){var t=n.cyclicKeying?"cyclic":"acyclic";return gH.sketch({uid:n.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(n.type===Dk.scrolling?["tox-toolbar--scrolling"]:[])},components:[gH.parts().groups({})],toolbarBehaviours:Oz(n,t)})},Dz=[jr("disabled",!1),Mr("tooltip"),Mr("icon"),Mr("text"),Ur("onSetup",function(){return ut})],Az=No([wr("type"),Cr("onAction")].concat(Dz)),Mz=function(n){return or("toolbarbutton",Az,n)},Fz=[Mr("text"),Mr("tooltip"),Mr("icon"),Cr("fetch"),Ur("onSetup",function(){return ut})],Iz=No(o([wr("type")],Fz)),Rz=function(n){return or("menubutton",Iz,n)},Vz=No([wr("type"),Mr("tooltip"),Mr("icon"),Mr("text"),Fr("select"),Cr("fetch"),Ur("onSetup",function(){return ut}),Lr("presets","normal",["normal","color","listpreview"]),Pr("columns",1),Cr("onAction"),Cr("onItemAction")]),Pz=function(n){return or("SplitButton",Vz,n)},Hz=[jr("active",!1)].concat(Dz),zz=No(Hz.concat([wr("type"),Cr("onAction")])),Nz=function(n){return or("ToggleButton",zz,n)},Lz=No([wr("type"),yr("items",jo([$o([wr("name"),Er("items",dr)]),dr]))].concat(Dz)),jz=function(n){return or("GroupToolbarButton",Lz,n)},Uz=[Ur("predicate",function(){return!1}),Lr("scope","node",["node","editor"]),Lr("position","selection",["node","selection","line"])],Wz=Dz.concat([Pr("type","contextformbutton"),Pr("primary",!1),Cr("onAction"),Yr("original",lt)]),Gz=Hz.concat([Pr("type","contextformbutton"),Pr("primary",!1),Cr("onAction"),Yr("original",lt)]),Xz=Dz.concat([Pr("type","contextformbutton")]),Yz=Hz.concat([Pr("type","contextformtogglebutton")]),qz=cr("type",{contextformbutton:Wz,contextformtogglebutton:Gz}),Kz=No([Pr("type","contextform"),Ur("initValue",function(){return""}),Mr("label"),Er("commands",qz),Dr("launch",cr("type",{contextformbutton:Xz,contextformtogglebutton:Yz}))].concat(Uz)),Jz=No([Pr("type","contexttoolbar"),wr("items")].concat(Uz)),$z=function(n){return or("ContextToolbar",Jz,n)},Qz=function(n){return or("ContextForm",Kz,n)},Zz=function(n,t,e){return e},nN=Object.freeze({__proto__:null,getState:Zz}),tN=function(n,t){var e=function(e,o){n.updateState.each(function(n){var r=n(e,o);t.set(r)}),n.renderComponents.each(function(n){var r=n(o,t.get()),i=Xt(r,e.getSystem().build);Tp(e,i)})};return da([va(Hu(),function(t,o){var r=o,i=n.channel;jt(r.channels(),i)&&e(t,r.data())}),_a(function(t){n.initialData.each(function(n){e(t,n)})})])},eN=Object.freeze({__proto__:null,events:tN}),oN=function(){var n=qr(St.none()),t=function(t){return n.set(t)},e=function(){return n.set(St.none())},o=function(){return n.get()},r=function(){return n.get().fold(function(){return"none"},function(n){return n})};return{readState:r,get:o,set:t,clear:e}},rN=Object.freeze({__proto__:null,init:oN}),iN=[br("channel"),Br("renderComponents"),Br("updateState"),Br("initialData")],uN=Bd({fields:iN,name:"reflecting",active:eN,apis:nN,state:rN}),aN=ft([br("toggleClass"),br("fetch"),Al("onExecute"),Pr("getHotspot",St.some),Pr("getAnchorOverrides",ft({})),Fm(),Al("onItemExecute"),Br("lazySink"),br("dom"),Bl("onOpen"),zv("splitDropdownBehaviours",[WB,Qx,yw]),Pr("matchWidth",!1),Pr("useMinWidth",!1),Pr("eventOrder",{}),Br("role")].concat(iD())),cN=hh({factory:HS,schema:[br("dom")],name:"arrow",defaults:function(){return{buttonBehaviours:Td([yw.revoke()])}},overrides:function(n){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(t){t.getSystem().getByUid(n.uid).each(ca)},buttonBehaviours:Td([Hw.config({toggleOnExecute:!1,toggleClass:n.toggleClass})])}}}),sN=hh({factory:HS,schema:[br("dom")],name:"button",defaults:function(){return{buttonBehaviours:Td([yw.revoke()])}},overrides:function(n){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(t){t.getSystem().getByUid(n.uid).each(function(e){n.onExecute(e,t)})}}}}),fN=ft([cN,sN,yh({factory:{sketch:function(n){return{uid:n.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:n.text}}}},schema:[br("text")],name:"aria-descriptor"}),bh({schema:[_l()],name:"menu",defaults:function(n){return{onExecute:function(t,e){t.getSystem().getByUid(n.uid).each(function(o){n.onItemExecute(o,t,e)})}}}}),XB()]),lN=function(n,t,e,o){var r=function(n){ib.getCurrent(n).each(function(n){Ob.highlightFirst(n),Qx.focusIn(n)})},i=function(t){var e=r;ZB(n,function(n){return n},t,o,e,hB.HighlightFirst).get(ut)},u=function(n){return i(n),St.some(!0)},a=function(t){var e=Fh(t,n,"button");return ca(e),St.some(!0)},c=ht(ht({},da([_a(function(t){var e=Mh(t,n,"aria-descriptor");e.each(function(n){var e=Sc("aria");cc(n.element(),"id",e),cc(t.element(),"aria-describedby",e)})})])),Nw(St.some(i))),s={repositionMenus:function(n){Hw.isOn(n)&&rD(n)}};return{uid:n.uid,dom:n.dom,components:t,apis:s,eventOrder:ht(ht({},n.eventOrder),{"alloy.execute":["disabling","toggling","alloy.base.behaviour"]}),events:c,behaviours:Lv(n.splitDropdownBehaviours,[WB.config({others:{sandbox:function(t){var e=Fh(t,n,"arrow"),o={onOpen:function(){Hw.on(e),Hw.on(t)},onClose:function(){Hw.off(e),Hw.off(t)}};return oD(n,t,o)}}}),Qx.config({mode:"special",onSpace:a,onEnter:a,onDown:u}),yw.config({}),Hw.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:n.role.getOr("button"),"aria-haspopup":!0}}}},dN=Jh({name:"SplitDropdown",configFields:aN(),partFields:fN(),factory:lN,apis:{repositionMenus:function(n,t){return n.repositionMenus(t)}}}),mN=function(n){return{isDisabled:function(){return eO.isDisabled(n)},setDisabled:function(t){return eO.set(n,t)}}},gN=function(n){return{setActive:function(t){Hw.set(n,t)},isActive:function(){return Hw.isOn(n)},isDisabled:function(){return eO.isDisabled(n)},setDisabled:function(t){return eO.set(n,t)}}},pN=function(n,t){return n.map(function(n){return{"aria-label":t.translate(n),title:t.translate(n)}}).getOr({})},vN=Sc("focus-button"),hN=["checklist","ordered-list"],bN=["indent","outdent","table-insert-column-after","table-insert-column-before","unordered-list"],yN=function(n,t,e,o,r,i){var u,a=function(n){return PC.isRtl()&&jt(hN,n)?n+"-rtl":n},c=PC.isRtl()&&n.exists(function(n){return jt(bN,n)});return{dom:{tag:"button",classes:["tox-tbtn"].concat(t.isSome()?["tox-tbtn--select"]:[]).concat(c?["tox-tbtn__icon-rtl"]:[]),attributes:pN(e,i)},components:r_([n.map(function(n){return vI(a(n),i.icons)}),t.map(function(n){return bI(n,"tox-tbtn",i)})]),eventOrder:(u={},u[xu()]=["focusing","alloy.base.behaviour","common-button-display-events"],u),buttonBehaviours:Td([QO.toolbarButton(i.isReadOnly),YO(),fw("common-button-display-events",[va(xu(),function(n,t){t.event().prevent(),ua(n,vN)})])].concat(o.map(function(e){return uN.config({channel:e,initialData:{icon:n,text:t},renderComponents:function(n){return r_([n.icon.map(function(n){return vI(a(n),i.icons)}),n.text.map(function(n){return bI(n,"tox-tbtn",i)})])}})}).toArray()).concat(r.getOr([])))}},xN=function(n,t,e,o){var r=t.shared;return PH.sketch({lazySink:r.getSink,fetch:function(){return _B.nu(function(t){t(Xt(e(n.items),Cz))})},markers:{toggledClass:"tox-tbtn--enabled"},parts:{button:yN(n.icon,n.text,n.tooltip,St.none(),St.none(),r.providers),toolbar:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:o}}}})},wN=function(n,t,e){var o=qr(ut),r=yN(n.icon,n.text,n.tooltip,St.none(),St.none(),e);return HS.sketch({dom:r.dom,components:r.components,eventOrder:wI,buttonBehaviours:Td([fw("toolbar-button-events",[xI({onAction:n.onAction,getApi:t.getApi}),n_(t,o),t_(t,o)]),QO.toolbarButton(function(){return n.disabled||e.isReadOnly()}),YO()].concat(t.toolbarButtonBehaviours))})},SN=function(n,t){return kN(n,t,[])},kN=function(n,t,e){return wN(n,{toolbarButtonBehaviours:[].concat(e.length>0?[fw("toolbarButtonWith",e)]:[]),getApi:mN,onSetup:n.onSetup},t)},CN=function(n,t){return ON(n,t,[])},ON=function(n,t,e){return Ke(wN(n,{toolbarButtonBehaviours:[cw.config({}),Hw.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(e.length>0?[fw("toolbarToggleButtonWith",e)]:[]),getApi:gN,onSetup:n.onSetup},t))},_N=function(n,t,e){return function(o){return _B.nu(function(n){return t.fetch(n)}).map(function(r){return St.from(oE(Ke(PT(Sc("menu-value"),r,function(e){t.onItemAction(n(o),e)},t.columns,t.presets,Ak.CLOSE_ON_EXECUTE,t.select.getOr(function(){return!1}),e),{movement:zT(t.columns,t.presets),menuBehaviours:kC.unnamedEvents("auto"!==t.columns?[]:[_a(function(n){xC(n,4,Gk(t.presets)).each(function(t){var e=t.numRows,o=t.numColumns;Qx.setGridSize(n,e,o)})})])})))})}},TN=function(n,t){var e,o=Sc("channel-update-split-dropdown-display"),r=function(n){return{isDisabled:function(){return eO.isDisabled(n)},setDisabled:function(t){return eO.set(n,t)},setIconFill:function(t,e){il(n.element(),'svg path[id="'+t+'"], rect[id="'+t+'"]').each(function(n){cc(n,"fill",e)})},setIconStroke:function(t,e){il(n.element(),'svg path[id="'+t+'"], rect[id="'+t+'"]').each(function(n){cc(n,"stroke",e)})},setActive:function(t){cc(n.element(),"aria-pressed",t),il(n.element(),"span").each(function(e){n.getSystem().getByDom(e).each(function(n){return Hw.set(n,t)})})},isActive:function(){return il(n.element(),"span").exists(function(t){return n.getSystem().getByDom(t).exists(Hw.isOn)})}}},i=qr(ut),u={getApi:r,onSetup:n.onSetup};return dN.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:ht({"aria-pressed":!1},pN(n.tooltip,t.providers))},onExecute:function(t){n.onAction(r(t))},onItemExecute:function(){},splitDropdownBehaviours:Td([QO.splitButton(t.providers.isReadOnly),YO(),fw("split-dropdown-events",[va(vN,yw.focus),n_(u,i),t_(u,i)]),mD.config({})]),eventOrder:(e={},e[Ju()]=["alloy.base.behaviour","split-dropdown-events"],e),toggleClass:"tox-tbtn--enabled",lazySink:t.getSink,fetch:_N(r,n,t.providers),parts:{menu:$k(!1,n.columns,n.presets)},components:[dN.parts().button(yN(n.icon,n.text,St.none(),St.some(o),St.some([Hw.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:!1})]),t.providers)),dN.parts().arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:LS("chevron-down",t.providers.icons)},buttonBehaviours:Td([QO.splitButton(t.providers.isReadOnly),YO()])}),dN.parts()["aria-descriptor"]({text:t.providers.translate("To open the popup, press Shift+Enter")})]})},EN=function(n){return{hide:function(){return ua(n,Uu())},getValue:function(){return Hv.getValue(n)}}},BN=function(n,t){return va(yI,function(e,o){var r=n.get(e),i=EN(r);t.onAction(i,o.event().buttonApi())})},DN=function(n,t,o){var r=t.original,i=(r.primary,e(r,["primary"])),u=rr(Mz(ht(ht({},i),{type:"button",onAction:function(){}})));return kN(u,o.backstage.shared.providers,[BN(n,t)])},AN=function(n,t,o){var r=t.original,i=(r.primary,e(r,["primary"])),u=rr(Nz(ht(ht({},i),{type:"togglebutton",onAction:function(){}})));return ON(u,o.backstage.shared.providers,[BN(n,t)])},MN=function(n,t,e){var o={backstage:{shared:{providers:e}}};return"contextformtogglebutton"===t.type?AN(n,t,o):DN(n,t,o)},FN=function(n,t,e){var o=Xt(t,function(t){return zS(MN(n,t,e))}),r=function(){return Xt(o,function(n){return n.asSpec()})},i=function(n){return de(t,function(t,e){return t.primary?St.from(o[e]).bind(function(t){return t.getOpt(n)}).filter(dt(eO.isDisabled)):St.none()})};return{asSpecs:r,findPrimary:i}},IN=function(n,t){var e=n.label.fold(function(){return{}},function(n){return{"aria-label":n}}),o=zS(gB.sketch({inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-js"],data:n.initValue(),inputAttributes:e,selectOnFocus:!0,inputBehaviours:Td([Qx.config({mode:"special",onEnter:function(n){return r.findPrimary(n).map(function(n){return ca(n),!0})},onLeft:function(n,t){return t.cut(),St.none()},onRight:function(n,t){return t.cut(),St.none()}})])})),r=FN(o,n.commands,t);return[{title:St.none(),items:[o.asSpec()]},{title:St.none(),items:r.asSpecs()}]},RN=function(n,t,e){return Bz({type:n,uid:Sc("context-toolbar"),initGroups:IN(t,e),onEscape:St.none,cyclicKeying:!0,providers:e})},VN={renderContextForm:RN,buildInitGroups:IN},PN=function(n,t){var e=Math.max(t.x,n.x),o=n.right-e,r=t.width-(e-t.x),i=Math.min(o,r);return{x:e,width:i}},HN=function(n,t,e,o){var r=ni.fromDom(n.getContainer()),i=il(r,".tox-editor-header").getOr(r),u=$f(i),a=u.y>=t.bottom,c=o&&!a;if(n.inline&&c)return{y:Math.max(u.bottom,e.y),bottom:e.bottom};if(n.inline&&!c)return{y:e.y,bottom:Math.min(u.y,e.bottom)};var s=$f(r);return c?{y:Math.max(u.bottom,e.y),bottom:Math.min(s.bottom,e.bottom)}:{y:Math.max(s.y,e.y),bottom:Math.min(u.y,e.bottom)}},zN=function(t,e){var o=Lf(n.window),r=$f(ni.fromDom(t.getContentAreaContainer())),i=vO(t)||hO(t)||yO(t),u=PN(r,o),a=u.x,c=u.width;if(t.inline&&!i)return Jf(a,o.y,c,o.height);var s=e.header.isPositionedAtTop(),f=HN(t,r,o,s),l=f.y,d=f.bottom;return Jf(a,l,c,d-l)},NN=function(n,t){var e=Jt(t,function(t){return t.predicate(n.dom())}),o=Kt(e,function(n){return"contexttoolbar"===n.type}),r=o.pass,i=o.fail;return{contextToolbars:r,contextForms:i}},LN=function(n){if(n.length<=1)return n;var t=function(t){return Ut(n,function(n){return n.position===t})},e=function(t){return Jt(n,function(n){return n.position===t})},o=t("selection"),r=t("node");if(o||r){if(r&&o){var i=e("node"),u=Xt(e("selection"),function(n){return ht(ht({},n),{position:"node"})});return i.concat(u)}return e(o?"selection":"node")}return e("line")},jN=function(n){if(n.length<=1)return n;var t=function(t){return ne(n,function(n){return n.position===t})},e=t("selection").orThunk(function(){return t("node")}).orThunk(function(){return t("line")}).map(function(n){return n.position});return e.fold(function(){return[]},function(t){return Jt(n,function(n){return n.position===t})})},UN=function(n,t,e){var o=NN(n,t);if(o.contextForms.length>0)return St.some({elem:n,toolbars:[o.contextForms[0]]});var r=NN(n,e);if(r.contextForms.length>0)return St.some({elem:n,toolbars:[r.contextForms[0]]});if(o.contextToolbars.length>0||r.contextToolbars.length>0){var i=LN(o.contextToolbars.concat(r.contextToolbars));return St.some({elem:n,toolbars:i})}return St.none()},WN=function(n,t,e){return n(t)?St.none():cu(t,function(n){var t=NN(n,e.inNodeScope),o=t.contextToolbars,r=t.contextForms,i=r.length>0?r:jN(o);return i.length>0?St.some({elem:n,toolbars:i}):St.none()},n)},GN=function(n,t){var e=ni.fromDom(t.getBody()),o=function(n){return ou(n,e)},r=function(n){return!o(n)&&!uu(e,n)},i=ni.fromDom(t.selection.getNode());return r(i)?St.none():UN(i,n.inNodeScope,n.inEditorScope).orThunk(function(){return WN(o,i,n)})},XN=function(n,t){var e={},o=[],r=[],i={},u={},a=function(n,a){var c=rr(Qz(a));e[n]=c,c.launch.map(function(e){i["form:"+n]=ht(ht({},a.launch),{type:"contextformtogglebutton"===e.type?"togglebutton":"button",onAction:function(){t(c)}})}),"editor"===c.scope?r.push(c):o.push(c),u[n]=c},c=function(n,t){$z(t).each(function(e){"editor"===t.scope?r.push(e):o.push(e),u[n]=e})},s=Be(n);return Yt(s,function(t){var e=n[t];"contextform"===e.type?a(t,e):"contexttoolbar"===e.type&&c(t,e)}),{forms:e,inNodeScope:o,inEditorScope:r,lookupTable:u,formNavigators:i}},YN=Sc("forward-slide"),qN=Sc("backward-slide"),KN=Sc("change-slide-event"),JN="tox-pop--resizing",$N=function(n){var t=qr([]);return CS.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:function(n){t.set([]),CS.getContent(n).each(function(n){Js(n.element(),"visibility")}),ks(n.element(),JN),Js(n.element(),"width")},inlineBehaviours:Td([fw("context-toolbar-events",[Oa(Mu(),function(n){ks(n.element(),JN),Js(n.element(),"width")}),va(KN,function(n,t){Js(n.element(),"width");var e=Tf(n.element());CS.setContent(n,t.event().contents()),ws(n.element(),JN);var o=Tf(n.element());js(n.element(),"width",e+"px"),CS.getContent(n).each(function(e){t.event().focus().bind(function(t){return Ld(t),Gd(n.element())}).orThunk(function(){return Qx.focusIn(e),Wd()})}),VS.setTimeout(function(){js(n.element(),"width",o+"px")},0)}),va(YN,function(n,e){CS.getContent(n).each(function(n){t.set(t.get().concat([{bar:n,focus:Wd()}]))}),aa(n,KN,{contents:e.event().forwardContents(),focus:St.none()})}),va(qN,function(n){fe(t.get()).each(function(e){t.set(t.get().slice(0,t.get().length-1)),aa(n,KN,{contents:gf(e.bar),focus:e.focus})})})]),Qx.config({mode:"special",onEscape:function(e){return fe(t.get()).fold(function(){return n.onEscape()},function(){return ua(e,qN),St.some(!0)})}})]),lazySink:function(){return ve.value(n.sink)}})},QN=function(n,t,e){var o=function(n,o,i,u){var a=t.shared.providers.translate(n.title);if("separator"===n.type)return St.some({type:"separator",text:a});if("submenu"===n.type){var c=oe(n.getStyleItems(),function(n){return r(n,o,u)});return 0===o&&c.length<=0?St.none():St.some({type:"nestedmenuitem",text:a,disabled:c.length<=0,getSubmenuItems:function(){return oe(n.getStyleItems(),function(n){return r(n,o,u)})}})}return St.some(ht({type:"togglemenuitem",text:a,icon:n.icon,active:n.isSelected(u),disabled:i,onAction:e.onAction(n)},n.getStylePreview().fold(function(){return{}},function(n){return{meta:{style:n}}})))},r=function(n,t,r){var i="formatter"===n.type&&e.isInvalid(n);return 0===t?i?[]:o(n,t,!1,r).toArray():o(n,t,i,r).toArray()},i=function(n){var t=e.getCurrentValue(),o=e.shouldHide?0:1;return oe(n,function(n){return r(n,o,t)})},u=function(n,t){return function(e){var o=t(),r=i(o),u=II(r,Ak.CLOSE_ON_EXECUTE,n,!1);e(u)}};return{validateItems:i,getFetch:u}},ZN=function(n,t,e){var o=e.dataset,r="basic"===o.type?function(){return Xt(o.data,function(n){return dP(n,e.isSelectedFor,e.getPreviewFor)})}:o.getData;return{items:QN(n,t,e),getStyleItems:r}},nL=function(n,t,e){var o=ZN(n,t,e),r=o.items,i=o.getStyleItems,u=function(n){return{getComponent:function(){return n}}
},a=function(t){return e.setInitialValue.each(function(n){return n(t.getComponent())}),e.nodeChangeHandler.map(function(e){var o=e(t.getComponent());return n.on("NodeChange",o),function(){n.off("NodeChange",o)}}).getOr(ut)};return CI({text:e.icon.isSome()?St.none():St.some(""),icon:e.icon,tooltip:St.from(e.tooltip),role:St.none(),fetch:r.getFetch(t,i),onSetup:a,getApi:u,columns:1,presets:"normal",classes:e.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[]},"tox-tbtn",t.shared)},tL=function(n){return Xt(n,function(n){var t=n,e=n,o=n.split("=");return o.length>1&&(t=o[0],e=o[1]),{title:t,format:e}})},eL=function(n){return{type:"basic",data:n}};!function(n){n[n.SemiColon=0]="SemiColon",n[n.Space=1]="Space"}(YB||(YB={}));var oL,rL=function(n,t){return t===YB.SemiColon?n.replace(/;$/,"").split(";"):n.split(" ")},iL=function(n,t,e,o){var r=n.getParam(t,e,"string"),i=tL(rL(r,o));return{type:"basic",data:i}},uL=[{title:"Left",icon:"align-left",format:"alignleft",command:"JustifyLeft"},{title:"Center",icon:"align-center",format:"aligncenter",command:"JustifyCenter"},{title:"Right",icon:"align-right",format:"alignright",command:"JustifyRight"},{title:"Justify",icon:"align-justify",format:"alignjustify",command:"JustifyFull"}],aL=function(n){var t=function(){return ne(uL,function(t){return n.formatter.match(t.format)})},e=function(t){return function(){return n.formatter.match(t)}},o=function(){return function(){return St.none()}},r=function(n){var e=t(),o=e.fold(function(){return"left"},function(n){return n.title.toLowerCase()});aa(n,kI,{icon:"align-"+o})},i=St.some(function(n){return function(){return r(n)}}),u=St.some(function(n){return r(n)}),a=eL(uL),c=function(t){return function(){return ne(uL,function(n){return n.format===t.format}).each(function(t){return n.execCommand(t.command)})}};return{tooltip:"Align",icon:St.some("align-left"),isSelectedFor:e,getCurrentValue:ft(St.none()),getPreviewFor:o,onAction:c,setInitialValue:u,nodeChangeHandler:i,dataset:a,shouldHide:!1,isInvalid:function(t){return!n.formatter.canApply(t.format)}}},cL=function(n,t){return nL(n,t,aL(n))},sL=function(n,t){var e=ZN(n,t,aL(n));n.ui.registry.addNestedMenuItem("align",{text:t.shared.providers.translate("Align"),getSubmenuItems:function(){return e.items.validateItems(e.getStyleItems())}})},fL="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",lL=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],dL=function(n){var t=n.split(/\s*,\s*/);return Xt(t,function(n){return n.replace(/^['"]+|['"]+$/g,"")})},mL=function(n){var t=function(){var t=dL(n.toLowerCase());return re(lL,function(n){return t.indexOf(n.toLowerCase())>-1})};return 0===n.indexOf("-apple-system")&&t()},gL=function(n){var t=function(){var t=function(n){return n?dL(n)[0]:""},e=n.queryCommandValue("FontName"),o=s.data,r=e?e.toLowerCase():"",i=ne(o,function(n){var e=n.format;return e.toLowerCase()===r||t(e).toLowerCase()===t(r).toLowerCase()}).orThunk(function(){return mL(r)?St.from({title:"System Font",format:r}):St.none()});return{matchOpt:i,font:e}},e=function(n){return function(t){return t.exists(function(t){return t.format===n})}},o=function(){var n=t().matchOpt;return n},r=function(n){return function(){return St.some({tag:"div",styles:-1===n.indexOf("dings")?{"font-family":n}:{}})}},i=function(t){return function(){n.undoManager.transact(function(){n.focus(),n.execCommand("FontName",!1,t.format)})}},u=function(n){var e=t(),o=e.matchOpt,r=e.font,i=o.fold(function(){return r},function(n){return n.title});aa(n,SI,{text:i})},a=St.some(function(n){return function(){return u(n)}}),c=St.some(function(n){return u(n)}),s=iL(n,"font_formats",fL,YB.SemiColon);return{tooltip:"Fonts",icon:St.none(),isSelectedFor:e,getCurrentValue:o,getPreviewFor:r,onAction:i,setInitialValue:c,nodeChangeHandler:a,dataset:s,shouldHide:!1,isInvalid:function(){return!1}}},pL=function(n,t){return nL(n,t,gL(n))},vL=function(n,t){var e=ZN(n,t,gL(n));n.ui.registry.addNestedMenuItem("fontformats",{text:t.shared.providers.translate("Fonts"),getSubmenuItems:function(){return e.items.validateItems(e.getStyleItems())}})},hL="8pt 10pt 12pt 14pt 18pt 24pt 36pt",bL={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},yL=function(n,t){var e=Math.pow(10,t);return Math.round(n*e)/e},xL=function(n,t){return/[0-9.]+px$/.test(n)?yL(72*parseInt(n,10)/96,t||0)+"pt":n},wL=function(n){return Ne(bL,n).getOr("")},SL=function(n){var t=function(){var t=St.none(),e=s.data,o=n.queryCommandValue("FontSize");if(o)for(var r=function(n){var r=xL(o,n),i=wL(r);t=ne(e,function(n){return n.format===o||n.format===r||n.format===i})},i=3;t.isNone()&&i>=0;i--)r(i);return{matchOpt:t,size:o}},e=function(n){return function(t){return t.exists(function(t){return t.format===n})}},o=function(){var n=t().matchOpt;return n},r=ft(ft(St.none())),i=function(t){return function(){n.undoManager.transact(function(){n.focus(),n.execCommand("FontSize",!1,t.format)})}},u=function(n){var e=t(),o=e.matchOpt,r=e.size,i=o.fold(function(){return r},function(n){return n.title});aa(n,SI,{text:i})},a=St.some(function(n){return function(){return u(n)}}),c=St.some(function(n){return u(n)}),s=iL(n,"fontsize_formats",hL,YB.Space);return{tooltip:"Font sizes",icon:St.none(),isSelectedFor:e,getPreviewFor:r,getCurrentValue:o,onAction:i,setInitialValue:c,nodeChangeHandler:a,dataset:s,shouldHide:!1,isInvalid:function(){return!1}}},kL=function(n,t){return nL(n,t,SL(n))},CL=function(n,t){var e=ZN(n,t,SL(n));n.ui.registry.addNestedMenuItem("fontsizes",{text:"Font sizes",getSubmenuItems:function(){return e.items.validateItems(e.getStyleItems())}})},OL=function(n,t,e){var o=t();return de(e,function(t){return ne(o,function(e){return n.formatter.matchNode(t,e.format)})}).orThunk(function(){return n.formatter.match("p")?St.some({title:"Paragraph",format:"p"}):St.none()})},_L=function(n){var t=n.selection.getStart(!0)||n.getBody();return n.dom.getParents(t,function(){return!0},n.getBody())},TL=function(n,t){return function(e){var o=qr(St.none()),r=function(){e.setActive(n.formatter.match(t));var r=n.formatter.formatChanged(t,e.setActive).unbind;o.set(St.some(r))};return n.initialized?r():n.on("init",r),function(){return o.get().each(function(n){return n()})}}},EL=function(n){return function(t){return function(){n.undoManager.transact(function(){n.focus(),n.execCommand("mceToggleFormat",!1,t.format)})}}},BL="Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre",DL=function(n){var t=function(t){return OL(n,function(){return a.data},t)},e=function(t){return function(){return n.formatter.match(t)}},o=function(t){return function(){var e=n.formatter.get(t);return St.some({tag:e.length>0?e[0].inline||e[0].block||"div":"div",styles:n.dom.parseStyle(n.formatter.getCssText(t))})}},r=function(n,e){var o=t(n),r=o.fold(function(){return"Paragraph"},function(n){return n.title});aa(e,SI,{text:r})},i=St.some(function(n){return function(t){return r(t.parents,n)}}),u=St.some(function(t){var e=_L(n);r(e,t)}),a=iL(n,"block_formats",BL,YB.SemiColon);return{tooltip:"Blocks",icon:St.none(),isSelectedFor:e,getCurrentValue:ft(St.none()),getPreviewFor:o,onAction:EL(n),setInitialValue:u,nodeChangeHandler:i,dataset:a,shouldHide:!1,isInvalid:function(t){return!n.formatter.canApply(t.format)}}},AL=function(n,t){return nL(n,t,DL(n))},ML=function(n,t){var e=ZN(n,t,DL(n));n.ui.registry.addNestedMenuItem("blockformats",{text:"Blocks",getSubmenuItems:function(){return e.items.validateItems(e.getStyleItems())}})},FL=function(n,t){var e=function(t){return function(){return n.formatter.match(t)}},o=function(t){return function(){var e=n.formatter.get(t);return void 0!==e?St.some({tag:e.length>0?e[0].inline||e[0].block||"div":"div",styles:n.dom.parseStyle(n.formatter.getCssText(t))}):St.none()}},r=function(t,e){var o=function(n){var t=n.items;return void 0!==t&&t.length>0?oe(t,o):[{title:n.title,format:n.format}]},r=oe(lP(n),o),i=OL(n,function(){return r},t),u=i.fold(function(){return"Paragraph"},function(n){return n.title});aa(e,SI,{text:u})},i=St.some(function(n){return function(t){return r(t.parents,n)}}),u=St.some(function(t){var e=_L(n);r(e,t)});return{tooltip:"Formats",icon:St.none(),isSelectedFor:e,getCurrentValue:ft(St.none()),getPreviewFor:o,onAction:EL(n),setInitialValue:u,nodeChangeHandler:i,shouldHide:n.getParam("style_formats_autohide",!1,"boolean"),isInvalid:function(t){return!n.formatter.canApply(t.format)},dataset:t}},IL=function(n,t){var e=ht({type:"advanced"},t.styleselect);return nL(n,t,FL(n,e))},RL=function(n,t){var e=ht({type:"advanced"},t.styleselect),o=ZN(n,t,FL(n,e));n.ui.registry.addNestedMenuItem("formats",{text:"Formats",getSubmenuItems:function(){return o.items.validateItems(o.getStyleItems())}})},VL=[{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"]}],PL=function(n,t){return function(e,o,r){var i=n(e).mapError(function(n){return ur(n)}).getOrDie();return t(i,o,r)}},HL={button:PL(Mz,function(n,t){return SN(n,t.backstage.shared.providers)}),togglebutton:PL(Nz,function(n,t){return CN(n,t.backstage.shared.providers)}),menubutton:PL(Rz,function(n,t){return VI(n,"tox-tbtn",t.backstage,St.none())}),splitbutton:PL(Pz,function(n,t){return TN(n,t.backstage.shared)}),grouptoolbarbutton:PL(jz,function(n,t,e){var o,r=e.ui.registry.getAll().buttons,i=function(n){return XL(e,{buttons:r,toolbar:n,allowToolbarGroups:!1},t,St.none())},u=(o={},o[Am]=t.backstage.shared.header.isPositionedAtTop()?dl.TopToBottom:dl.BottomToTop,o);switch(wO(e)){case Dk.floating:return xN(n,t.backstage,i,u);default:throw new Error("Toolbar groups are only supported when using floating toolbar mode")}}),styleSelectButton:function(n,t){return IL(n,t.backstage)},fontsizeSelectButton:function(n,t){return kL(n,t.backstage)},fontSelectButton:function(n,t){return pL(n,t.backstage)},formatButton:function(n,t){return AL(n,t.backstage)},alignMenuButton:function(n,t){return cL(n,t.backstage)}},zL=function(t,e,o){return Ne(HL,t.type).fold(function(){return n.console.error("skipping button defined by",t),St.none()},function(n){return St.some(n(t,e,o))})},NL={styleselect:HL.styleSelectButton,fontsizeselect:HL.fontsizeSelectButton,fontselect:HL.fontSelectButton,formatselect:HL.formatButton,align:HL.alignMenuButton},LL=function(n){var t=Xt(VL,function(t){var e=Jt(t.items,function(t){return Le(n,t)||Le(NL,t)});return{name:t.name,items:e}});return Jt(t,function(n){return n.items.length>0})},jL=function(n){var t=n.split("|");return Xt(t,function(n){return{items:n.trim().split(" ")}})},UL=function(n){return Vt(n,function(n){return Le(n,"name")&&Le(n,"items")})},WL=function(t){var e=t.toolbar,o=t.buttons;return e===!1?[]:void 0===e||e===!0?LL(o):Tt(e)?jL(e):UL(e)?e:(n.console.error("Toolbar type should be string, string[], boolean or ToolbarGroup[]"),[])},GL=function(t,e,o,r,i,u){return Ne(e,o.toLowerCase()).orThunk(function(){return u.bind(function(n){return de(n,function(n){return Ne(e,n+o.toLowerCase())})})}).fold(function(){return Ne(NL,o.toLowerCase()).map(function(n){return n(t,i)}).orThunk(function(){return St.none()})},function(e){return"grouptoolbarbutton"!==e.type||r?zL(e,i,t):(n.console.warn("Ignoring the '"+o+"' toolbar button. Group toolbar buttons are only supported when using floating toolbar mode and cannot be nested."),St.none())})},XL=function(n,t,e,o){var r=WL(t),i=Xt(r,function(r){var i=oe(r.items,function(r){return 0===r.trim().length?[]:GL(n,t.buttons,r,t.allowToolbarGroups,e,o).toArray()});return{title:St.from(n.translate(r.name)),items:i}});return Jt(i,function(n){return n.items.length>0})},YL=12,qL={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"]},KL={maxHeightFunction:xm(),maxWidthFunction:oH()},JL={onLtr:function(){return[fd,ld,cd,ud,sd,ad,IS,RS,MS,DS,FS,AS]},onRtl:function(){return[fd,ld,sd,ad,cd,ud,IS,RS,FS,AS,MS,DS]}},$L={onLtr:function(){return[ld,ud,ad,cd,sd,fd,IS,RS,MS,DS,FS,AS]},onRtl:function(){return[ld,ad,ud,sd,cd,fd,IS,RS,FS,AS,MS,DS]}},QL=function(n,t){return"line"===n?{bubble:Om(YL,0,qL),layouts:{onLtr:function(){return[dd]},onRtl:function(){return[md]}},overrides:KL}:{bubble:Om(0,YL,qL),layouts:t?$L:JL,overrides:KL}},ZL=function(n,t,e,o){var r=qi().deviceType.isTouch,i=mf($N({sink:e,onEscape:function(){return n.focus(),St.some(!0)}})),u=function(){return zN(n,o.backstage.shared)},a=function(n,t,e,o){return Math.max(n,e)<=Math.min(t,o)},c=function(){var t=m.get().map(function(n){return n.getBoundingClientRect()}).getOrThunk(function(){return n.selection.getRng().getBoundingClientRect()}),e=n.inline?Pf().top():Qf(ni.fromDom(n.getBody())).y;return{y:t.top+e,bottom:t.bottom+e}},s=function(){if(r()&&o.backstage.isContextMenuOpen())return!0;var n=c(),t=u();return!a(n.y,n.bottom,t.y,t.bottom)},f=function(){CS.hide(i)},l=function(){d.get().each(function(n){var t=i.element();Js(t,"display"),s()?js(t,"display","none"):Sp.positionWithinBounds(e,n,i,St.some(u()))})},d=qr(St.none()),m=qr(St.none()),g=qr(null),p=function(t){return{dom:{tag:"div",classes:["tox-pop__dialog"]},components:[t],behaviours:Td([Qx.config({mode:"acyclic"}),fw("pop-dialog-wrap-events",[_a(function(t){n.shortcuts.add("ctrl+F9","focus statusbar",function(){return Qx.focusIn(t)})}),Ta(function(){n.shortcuts.remove("ctrl+F9")})])])}},v=$e(function(){return XN(t,function(n){var t=y([n]);aa(i,YN,{forwardContents:p(t)})})}),h=function(t,e){return XL(n,{buttons:t,toolbar:e.items,allowToolbarGroups:!1},o,St.some(["form:"]))},b=function(n,t){return VN.buildInitGroups(n,t)},y=function(t){var e=n.ui.registry.getAll().buttons,r=v(),i=ht(ht({},e),r.formNavigators),u=wO(n)===Dk.scrolling?Dk.scrolling:Dk.default,a=ee(Xt(t,function(n){return"contexttoolbar"===n.type?h(i,n):b(n,o.backstage.shared.providers)}));return Bz({type:u,uid:Sc("context-toolbar"),initGroups:a,onEscape:St.none,cyclicKeying:!0,providers:o.backstage.shared.providers})};n.on(rH,function(t){var e=v();Ne(e.lookupTable,t.toolbarKey).each(function(e){w([e],t.target===n?St.none():St.some(t)),CS.getContent(i).each(Qx.focusIn)})});var x=function(n,t){var e="node"===n?o.backstage.shared.anchors.node(t):o.backstage.shared.anchors.cursor();return Ke(e,QL(n,r()))},w=function(n,t){if(k(),!r()||!o.backstage.isContextMenuOpen()){var e=y(n),a=t.map(ni.fromDom),c=x(n[0].position,a);d.set(St.some(c)),m.set(t);var f=i.element();Js(f,"display"),CS.showWithinBounds(i,c,p(e),function(){return St.some(u())}),s()&&js(f,"display","none")}},S=function(){if(n.hasFocus()){var t=v();GN(t,n).fold(function(){d.set(St.none()),CS.hide(i)},function(n){w(n.toolbars,St.some(n.elem.dom()))})}},k=function(){var n=g.get();null!==n&&(VS.clearTimeout(n),g.set(null))},C=function(n){k(),g.set(n)};n.on("init",function(){n.on(iH,f),n.on("ScrollContent ScrollWindow longpress",l),n.on("click keyup focus SetContent ObjectResized ResizeEditor",function(){C(VS.setEditorTimeout(n,S,0))}),n.on("focusout",function(){VS.setEditorTimeout(n,function(){Gd(e.element()).isNone()&&Gd(i.element()).isNone()&&(d.set(St.none()),CS.hide(i))},0)}),n.on("SwitchMode",function(){n.mode.isReadOnly()&&(d.set(St.none()),CS.hide(i))}),n.on("NodeChange",function(){Gd(i.element()).fold(function(){C(VS.setEditorTimeout(n,S,0))},function(){})})})},nj=function(t,e,o){var r=function(n,t){Yt([e,o],function(e){e.broadcastEvent(n,t)})},i=function(n,t){Yt([e,o],function(e){e.broadcastOn([n],t)})},u=function(n){return i(ov(),{target:n.target()})},a=cE(ni.fromDom(n.document),"touchstart",u),c=cE(ni.fromDom(n.document),"touchmove",function(n){return r(Xu(),n)}),s=cE(ni.fromDom(n.document),"touchend",function(n){return r(Yu(),n)}),f=cE(ni.fromDom(n.document),"mousedown",u),l=cE(ni.fromDom(n.document),"mouseup",function(n){0===n.raw().button&&i(iv(),{target:n.target()})}),d=function(n){return i(ov(),{target:ni.fromDom(n.target)})},m=function(n){0===n.button&&i(iv(),{target:ni.fromDom(n.target)})},g=function(n){return r(qu(),fE(n))},p=function(n){i(rv(),{}),r(Ku(),fE(n))},v=function(){return i(rv(),{})};t.on("PostRender",function(){t.on("click",d),t.on("tap",d),t.on("mouseup",m),t.on("ScrollWindow",g),t.on("ResizeWindow",p),t.on("ResizeEditor",v)}),t.on("remove",function(){t.off("click",d),t.off("tap",d),t.off("mouseup",m),t.off("ScrollWindow",g),t.off("ResizeWindow",p),t.off("ResizeEditor",v),f.unbind(),a.unbind(),c.unbind(),s.unbind(),l.unbind()}),t.on("detach",function(){Vp(e),Vp(o),e.destroy(),o.destroy()})},tj=Nh,ej=Sh,oj=ft([Pr("shell",!1),br("makeItem"),Pr("setupItem",ut),jv.field("listBehaviours",[cw])]),rj=function(){return{behaviours:Td([cw.config({})])}},ij=yh({name:"items",overrides:rj}),uj=ft([ij]),aj=ft("CustomList"),cj=function(t,e){var o=function(e,o){i(e).fold(function(){throw n.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(n){var r=cw.contents(n),i=o.length,u=i-r.length,a=u>0?Wt(u,function(){return t.makeItem()}):[],c=r.slice(i);Yt(c,function(t){return cw.remove(n,t)}),Yt(a,function(t){return cw.append(n,t)});var s=cw.contents(n);Yt(s,function(n,r){t.setupItem(e,n,o[r],r)})})},r=t.shell?{behaviours:[cw.config({})],components:[]}:{behaviours:[],components:e},i=function(n){return t.shell?St.some(n):Mh(n,t,"items")};return{uid:t.uid,dom:t.dom,components:r.components,behaviours:Lv(t.listBehaviours,r.behaviours),apis:{setItems:o}}},sj=Jh({name:aj(),configFields:oj(),partFields:uj(),factory:cj,apis:{setItems:function(n,t,e){n.setItems(t,e)}}}),fj=function(n){var t=Ys(n,"position").is("fixed"),e=t?St.none():ja(n);return e.orThunk(function(){var t=ni.fromTag("span");return La(n).bind(function(n){Ja(n,t);var e=ja(t);return tc(t),e})})},lj=function(n){return fj(n).map(kf).getOrThunk(function(){return xf(0,0)})},dj=We.generate([{"static":[]},{absolute:["positionCss"]},{fixed:["positionCss"]}]),mj=function(n,t){var e=n.element();ws(e,t.transitionClass),ks(e,t.fadeOutClass),ws(e,t.fadeInClass),t.onShow(n)},gj=function(n,t){var e=n.element();ws(e,t.transitionClass),ks(e,t.fadeInClass),ws(e,t.fadeOutClass),t.onHide(n)},pj=function(n,t){return n.y<t.bottom&&n.bottom>t.y},vj=function(n,t){return n.y>=t.y},hj=function(n,t){return n.bottom<=t.bottom},bj=function(n,t,e){return re(n,function(n){switch(n){case"bottom":return hj(t,e);case"top":return vj(t,e)}})},yj=function(n,t){return t.getInitialPosition().map(function(t){return Jf(t.bounds.x,t.bounds.y,Tf(n),vf(n))})},xj=function(n,t,e){e.setInitialPosition(St.some({style:qs(n),position:Gs(n,"position")||"static",bounds:t}))},wj=function(n,t,e){return e.getInitialPosition().bind(function(o){switch(e.setInitialPosition(St.none()),o.position){case"static":return St.some(dj.static());case"absolute":var r=fj(n).map($f).getOrThunk(function(){return $f(Hs())});return St.some(dj.absolute(Yd("absolute",Ne(o.style,"left").map(function(){return t.x-r.x}),Ne(o.style,"top").map(function(){return t.y-r.y}),Ne(o.style,"right").map(function(){return r.right-t.right}),Ne(o.style,"bottom").map(function(){return r.bottom-t.bottom}))));default:return St.none()}})},Sj=function(n,t,e){return yj(n,e).filter(function(n){return bj(e.getModes(),n,t)}).bind(function(t){return wj(n,t,e)})},kj=function(n,t,e){var o=$f(n);if(bj(e.getModes(),o,t))return St.none();xj(n,o,e);var r=Zf(),i=o.x-r.x,u=t.y-r.y,a=r.bottom-t.bottom,c=o.y<=t.y;return St.some(dj.fixed(Yd("fixed",St.some(i),c?St.some(u):St.none(),St.none(),c?St.none():St.some(a))))},Cj=function(n,t,e){var o=n.element(),r=Ys(o,"position").is("fixed");return r?Sj(o,t,e):kj(o,t,e)},Oj=function(n,t){var e=n.element();return yj(e,t).bind(function(n){return wj(e,n,t)})},_j=function(n,t){Yt(["left","right","top","bottom","position"],function(t){return Js(n.element(),t)}),t.onUndocked(n)},Tj=function(n,t,e){qd(n.element(),e);var o="fixed"===e.position()?t.onDocked:t.onUndocked;o(n)},Ej=function(n,t,e,o,r){void 0===r&&(r=!1),t.contextual.each(function(t){t.lazyContext(n).each(function(i){var u=pj(i,o);if(u!==e.isVisible())if(e.setVisible(u),r&&!u)Os(n.element(),[t.fadeOutClass]),t.onHide(n);else{var a=u?mj:gj;a(n,t)}})})},Bj=function(n,t,e){var o=t.lazyViewport(n),r=e.isDocked();r&&Ej(n,t,e,o),Cj(n,o,e).each(function(i){e.setDocked(!r),i.fold(function(){return _j(n,t)},function(e){return Tj(n,t,e)},function(r){Ej(n,t,e,o,!0),Tj(n,t,r)})})},Dj=function(n,t,e){var o=n.element();e.setDocked(!1),Oj(n,e).each(function(e){e.fold(function(){return _j(n,t)},function(e){return Tj(n,t,e)},ut)}),e.setVisible(!0),t.contextual.each(function(t){_s(o,[t.fadeInClass,t.fadeOutClass,t.transitionClass]),t.onShow(n)}),Aj(n,t,e)},Aj=function(n,t,e){n.getSystem().isConnected()&&Bj(n,t,e)},Mj=function(n,t,e){e.isDocked()&&Dj(n,t,e)},Fj=function(n,t,e){return e.isDocked()},Ij=function(n,t,e,o){return e.setModes(o)},Rj=function(n,t,e){return e.getModes()},Vj=Object.freeze({__proto__:null,refresh:Aj,reset:Mj,isDocked:Fj,getModes:Rj,setModes:Ij}),Pj=function(n,t){return da([Oa(Mu(),function(e,o){n.contextual.each(function(n){if(Cs(e.element(),n.transitionClass)){_s(e.element(),[n.transitionClass,n.fadeInClass]);var r=t.isVisible()?n.onShown:n.onHidden;r(e)}o.stop()})}),va(qu(),function(e){Aj(e,n,t)}),va(Ku(),function(e){Mj(e,n,t)})])},Hj=Object.freeze({__proto__:null,events:Pj}),zj=[Rr("contextual",[wr("fadeInClass"),wr("fadeOutClass"),wr("transitionClass"),Cr("lazyContext"),Bl("onShow"),Bl("onShown"),Bl("onHide"),Bl("onHidden")]),Ur("lazyViewport",Zf),Gr("modes",["top","bottom"],dr),Bl("onDocked"),Bl("onUndocked")],Nj=function(n){var t=qr(!1),e=qr(!0),o=qr(St.none()),r=qr(n.modes),i=function(){return"docked: "+t.get()+", visible: "+e.get()+", modes: "+r.get().join(",")};return Uc({isDocked:t.get,setDocked:t.set,getInitialPosition:o.get,setInitialPosition:o.set,isVisible:e.get,setVisible:e.set,getModes:r.get,setModes:r.set,readState:i})},Lj=Object.freeze({__proto__:null,init:Nj}),jj=Bd({fields:zj,name:"docking",active:Hj,apis:Vj,state:Lj}),Uj={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},Wj="tox-tinymce--toolbar-sticky-on",Gj="tox-tinymce--toolbar-sticky-off",Xj=function(n,t){var e=Pa(t),o=e.dom().defaultView.innerHeight,r=Pf(e),i=ni.fromDom(n.elm),u=Qf(i),a=vf(i),c=u.y,s=c+a,f=kf(t),l=vf(t),d=f.top(),m=d+l,g=Math.abs(d-r.top())<2,p=Math.abs(m-(r.top()+o))<2;if(g&&m>c)Hf(r.left(),c-l,e);else if(p&&s>d){var v=c-o+a+l;Hf(r.left(),v,e)}},Yj=function(n,t){return jt(jj.getModes(n),t)},qj=function(n){var t=function(n){return hf(n)+(parseInt(Gs(n,"margin-top"),10)||0)+(parseInt(Gs(n,"margin-bottom"),10)||0)},e=n.element();La(e).each(function(o){var r="padding-"+jj.getModes(n)[0];if(jj.isDocked(n)){var i=Tf(o);js(e,"width",i+"px"),js(o,r,t(e)+"px")}else Js(e,"width"),Js(o,r)})},Kj=function(n,t){t?(ks(n,Uj.fadeOutClass),Os(n,[Uj.transitionClass,Uj.fadeInClass])):(ks(n,Uj.fadeInClass),Os(n,[Uj.fadeOutClass,Uj.transitionClass]))},Jj=function(n,t){var e=ni.fromDom(n.getContainer());t?(ws(e,Wj),ks(e,Gj)):(ws(e,Gj),ks(e,Wj))},$j=function(n,t){var e=Pa(t);Wd(e).filter(function(n){return!ou(t,n)}).filter(function(t){return ou(t,ni.fromDom(e.dom().body))||uu(n,t)}).each(function(){return Ld(t)})},Qj=function(n,t){return Gd(n).orThunk(function(){return t().toOption().bind(function(n){return Gd(n.element())})})},Zj=function(n,t,e){n.inline||(t.header.isPositionedAtTop()||n.on("ResizeEditor",function(){e().each(jj.reset)}),n.on("ResizeWindow ResizeEditor",function(){e().each(qj)}),n.on("SkinLoaded",function(){e().each(function(n){jj.isDocked(n)?jj.reset(n):jj.refresh(n)})}),n.on("FullscreenStateChanged",function(){e().each(jj.reset)})),n.on("AfterScrollIntoView",function(n){e().each(function(t){jj.refresh(t);var e=t.element();xy(e)&&Xj(n,e)})}),n.on("PostRender",function(){Jj(n,!1)})},nU=function(n){return n().map(jj.isDocked).getOr(!1)},tU=function(){var n;return[Pd.config({channels:(n={},n[Sz()]={onReceive:qj},n)})]},eU=function(n,t){var e=qr(St.none()),r=t.getSink,i=function(n){r().each(function(t){return n(t.element())})},u=function(t){n.inline||qj(t),Jj(n,jj.isDocked(t)),t.getSystem().broadcastOn([rv()],{}),r().each(function(n){return n.getSystem().broadcastOn([rv()],{})})},a=n.inline?[]:tU();return o([yw.config({}),jj.config({contextual:ht({lazyContext:function(t){var e=hf(t.element()),o=n.inline?n.getContentAreaContainer():n.getContainer(),r=$f(ni.fromDom(o)),i=r.height-e,u=r.y+(Yj(t,"top")?0:e);return St.some(Jf(r.x,u,r.width,i))},onShow:function(){i(function(n){return Kj(n,!0)})},onShown:function(n){i(function(n){return _s(n,[Uj.transitionClass,Uj.fadeInClass])}),e.get().each(function(t){$j(n.element(),t),e.set(St.none())})},onHide:function(n){e.set(Qj(n.element(),r)),i(function(n){return Kj(n,!1)})},onHidden:function(){i(function(n){return _s(n,[Uj.transitionClass])})}},Uj),modes:[t.header.getDockingMode()],onDocked:u,onUndocked:u})],a)},oU=Object.freeze({__proto__:null,setup:Zj,isDocked:nU,getBehaviours:eU}),rU=ut,iU=gt,uU=ft([]),aU=Object.freeze({__proto__:null,setup:rU,isDocked:iU,getBehaviours:uU}),cU=function(n){var t=n.editor,e=n.sticky?eU:uU;return{uid:n.uid,dom:n.dom,components:n.components,behaviours:Td(e(t,n.sharedBackstage))}},sU=function(n,t){var e=function(n,e){var o=Xt(e,function(n){var e={type:"menubutton",text:n.text,fetch:function(t){t(n.getItems())}},o=Rz(e).mapError(function(n){return ur(n)}).getOrDie();return VI(o,"tox-mbtn",t.backstage,St.some("menuitem"))});cw.set(n,o)},o={focus:Qx.focusIn,setMenus:e};return{uid:n.uid,dom:n.dom,components:[],behaviours:Td([cw.config({}),fw("menubar-events",[_a(function(t){n.onSetup(t)}),va(Cu(),function(n,t){il(n.element(),".tox-mbtn--active").each(function(e){ul(t.event().target(),".tox-mbtn").each(function(t){ou(e,t)||n.getSystem().getByDom(e).each(function(e){n.getSystem().getByDom(t).each(function(n){sD.expand(n),sD.close(e),yw.focus(n)})})})})}),va(na(),function(n,t){t.event().prevFocus().bind(function(t){return n.getSystem().getByDom(t).toOption()}).each(function(e){t.event().newFocus().bind(function(t){return n.getSystem().getByDom(t).toOption()}).each(function(n){sD.isOpen(e)&&(sD.expand(n),sD.close(e))})})})]),Qx.config({mode:"flow",selector:".tox-mbtn",onEscape:function(t){return n.onEscape(t),St.some(!0)}}),XE.config({})]),apis:o,domModification:{attributes:{role:"menubar"}}}},fU=Kh({factory:sU,name:"silver.Menubar",configFields:[br("dom"),br("uid"),br("onEscape"),br("backstage"),Pr("onSetup",ut)],apis:{focus:function(n,t){n.focus(t)},setMenus:function(n,t,e){n.setMenus(t,e)}}}),lU="container",dU=[zv("slotBehaviours",[])],mU=function(n){return"<alloy.field."+n+">"},gU=function(n){var t=function(){var n=[],t=function(t,e){return n.push(t),Th(lU,mU(t),e)};return{slot:t,record:function(){return n}}}(),e=n(t),o=t.record(),r=Xt(o,function(n){return hh({name:n,pname:mU(n)})});return Wh(lU,dU,r,pU,e)},pU=function(n,t){var e=function(){return Vh(n)},o=function(t,e){return Mh(t,n,e)},r=function(t,e){return function(o,r){return Mh(o,n,r).map(function(n){return t(n,r)}).getOr(e)}},i=function(n){return function(t,e){Yt(e,function(e){return n(t,e)})}},u=function(n){return"true"!==fc(n.element(),"aria-hidden")},a=function(n,t){if(!u(n)){var e=n.element();Js(e,"display"),mc(e,"aria-hidden"),aa(n,ta(),{name:t,visible:!0})}},c=function(n,t){if(u(n)){var e=n.element();js(e,"display","none"),cc(e,"aria-hidden","true"),aa(n,ta(),{name:t,visible:!1})}},s=r(u,!1),f=r(c),l=i(f),d=function(n){return l(n,e())},m=r(a),g={getSlotNames:e,getSlot:o,isShowing:s,hideSlot:f,hideAllSlots:d,showSlot:m};return{uid:n.uid,dom:n.dom,components:t,behaviours:Nv(n.slotBehaviours),apis:g}},vU=Me({getSlotNames:function(n,t){return n.getSlotNames(t)},getSlot:function(n,t,e){return n.getSlot(t,e)},isShowing:function(n,t,e){return n.isShowing(t,e)},hideSlot:function(n,t,e){return n.hideSlot(t,e)},hideAllSlots:function(n,t){return n.hideAllSlots(t)},showSlot:function(n,t,e){return n.showSlot(t,e)}},function(n){return Lc(n)}),hU=ht(ht({},vU),{sketch:gU}),bU=No([Mr("icon"),Mr("tooltip"),Ur("onShow",ut),Ur("onHide",ut),Ur("onSetup",function(){return ut})]),yU=function(n){return or("sidebar",bU,n)},xU=function(n){var t=n.ui.registry.getAll().sidebars;Yt(Be(t),function(e){var o=t[e],r=function(){return St.from(n.queryCommandValue("ToggleSidebar")).is(e)};n.ui.registry.addToggleButton(e,{icon:o.icon,tooltip:o.tooltip,onAction:function(t){n.execCommand("ToggleSidebar",!1,e),t.setActive(r())},onSetup:function(t){var e=function(){return t.setActive(r())};return n.on("ToggleSidebar",e),function(){n.off("ToggleSidebar",e)}}})})},wU=function(n){return{element:function(){return n.element().dom()}}},SU=function(n,t){var e=Xt(Be(t),function(n){var e=t[n],o=rr(yU(e));return{name:n,getApi:wU,onSetup:o.onSetup,onShow:o.onShow,onHide:o.onHide}});return Xt(e,function(t){var o=qr(ut);return n.slot(t.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:kC.unnamedEvents([n_(t,o),t_(t,o),va(ta(),function(n,t){var o=t.event(),r=ne(e,function(n){return n.name===o.name()});r.each(function(t){var e=o.visible()?t.onShow:t.onHide;e(t.getApi(n))})})])})})},kU=function(n){return hU.sketch(function(t){return{dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:SU(t,n),slotBehaviours:kC.unnamedEvents([_a(function(n){return hU.hideAllSlots(n)})])}})},CU=function(n,t){var e=ib.getCurrent(n);e.each(function(n){return cw.set(n,[kU(t)])})},OU=function(n,t){var e=ib.getCurrent(n);e.each(function(n){var e=ib.getCurrent(n);e.each(function(e){pz.hasGrown(n)?hU.isShowing(e,t)?pz.shrink(n):(hU.hideAllSlots(e),hU.showSlot(e,t)):(hU.hideAllSlots(e),hU.showSlot(e,t),pz.grow(n))})})},_U=function(n){var t=ib.getCurrent(n);return t.bind(function(n){var t=pz.isGrowing(n)||pz.hasGrown(n);if(t){var e=ib.getCurrent(n);return e.bind(function(n){return ne(hU.getSlotNames(n),function(t){return hU.isShowing(n,t)})})}return St.none()})},TU=Sc("FixSizeEvent"),EU=Sc("AutoSizeEvent"),BU=function(n){return{uid:n.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"complementary"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:Td([XE.config({}),yw.config({}),pz.config({dimension:{property:"width"},closedClass:"tox-sidebar--sliding-closed",openClass:"tox-sidebar--sliding-open",shrinkingClass:"tox-sidebar--sliding-shrinking",growingClass:"tox-sidebar--sliding-growing",onShrunk:function(n){var t=ib.getCurrent(n);t.each(hU.hideAllSlots),ua(n,EU)},onGrown:function(n){ua(n,EU)},onStartGrow:function(n){aa(n,TU,{width:Ys(n.element(),"width").getOr("")})},onStartShrink:function(n){aa(n,TU,{width:Tf(n.element())+"px"})}}),cw.config({}),ib.config({find:function(n){var t=cw.contents(n);return se(t)}})])}],behaviours:Td([yF.childAt(0),fw("sidebar-sliding-events",[va(TU,function(n,t){js(n.element(),"width",t.event().width())}),va(EU,function(n){Js(n.element(),"width")})])])}},DU=function(n){var t=void 0!==n.dom().attributes?n.dom().attributes:[];return Qt(t,function(n,t){var e;return"class"===t.name?n:ht(ht({},n),(e={},e[t.name]=t.value,e))},{})},AU=function(n){return Array.prototype.slice.call(n.dom().classList,0)},MU=function(n){var t=ni.fromHtml(n),e=Wa(t),o=DU(t),r=AU(t),i=0===e.length?{}:{innerHtml:rc(t)};
return ht({tag:Da(t),classes:r,attributes:o},i)},FU=function(n){return{dom:{tag:"div",attributes:{"aria-label":n.translate("Loading...")},classes:["tox-throbber__busy-spinner"]},components:[{dom:MU('<div class="tox-spinner"><div></div><div></div><div></div></div>')}],behaviours:Td([Qx.config({mode:"special",onTab:function(){return St.some(!0)},onShiftTab:function(){return St.some(!0)}}),yw.config({})])}},IU=function(n,t,e){var o=n.element();t===!0?(cw.set(n,[FU(e)]),Js(o,"display"),mc(o,"aria-hidden")):(cw.set(n,[]),js(o,"display","none"),cc(o,"aria-hidden","true"))},RU=function(n){return{uid:n.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:Td([cw.config({})]),components:[]}},VU=function(n,t,e){var o=qr(!1),r=qr(St.none()),i=function(n){n!==o.get()&&(IU(t(),n,e.providers),o.set(n))};n.on("ProgressState",function(t){if(r.get().each(VS.clearTimeout),Rt(t.time)){var e=VS.setEditorTimeout(n,function(){return i(t.state)},t.time);r.set(St.some(e))}else i(t.state),r.set(St.none())})},PU=function(n,t){var e={getSocket:function(t){return tj.getPart(t,n,"socket")},setSidebar:function(t,e){tj.getPart(t,n,"sidebar").each(function(n){return CU(n,e)})},toggleSidebar:function(t,e){tj.getPart(t,n,"sidebar").each(function(n){return OU(n,e)})},whichSidebar:function(t){return tj.getPart(t,n,"sidebar").bind(_U).getOrNull()},getHeader:function(t){return tj.getPart(t,n,"header")},getToolbar:function(t){return tj.getPart(t,n,"toolbar")},setToolbar:function(t,e){tj.getPart(t,n,"toolbar").each(function(n){n.getApis().setGroups(n,e)})},setToolbars:function(t,e){tj.getPart(t,n,"multiple-toolbar").each(function(n){sj.setItems(n,e)})},refreshToolbar:function(t){var e=tj.getPart(t,n,"toolbar");e.each(function(n){return n.getApis().refresh(n)})},getThrobber:function(t){return tj.getPart(t,n,"throbber")},focusToolbar:function(t){var e=tj.getPart(t,n,"toolbar").orThunk(function(){return tj.getPart(t,n,"multiple-toolbar")});e.each(function(n){Qx.focusIn(n)})},setMenubar:function(t,e){tj.getPart(t,n,"menubar").each(function(n){fU.setMenus(n,e)})},focusMenubar:function(t){tj.getPart(t,n,"menubar").each(function(n){fU.focus(n)})}};return{uid:n.uid,dom:n.dom,components:t,apis:e,behaviours:n.behaviours}},HU=ej.optional({factory:fU,name:"menubar",schema:[br("backstage")]}),zU=function(n){return n.type===Dk.sliding?Ez:n.type===Dk.floating?Tz:Bz},NU=ej.optional({factory:{sketch:function(n){return sj.sketch({uid:n.uid,dom:n.dom,listBehaviours:Td([Qx.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:function(){return Bz({type:n.type,uid:Sc("multiple-toolbar-item"),cyclicKeying:!1,initGroups:[],providers:n.providers,onEscape:function(){return St.none()}})},setupItem:function(n,t,e){gH.setGroups(t,e)},shell:!0})}},name:"multiple-toolbar",schema:[br("dom"),br("onEscape")]}),LU=ej.optional({factory:{sketch:function(n){var t=zU(n),e={type:n.type,uid:n.uid,onEscape:function(){return n.onEscape(),St.some(!0)},cyclicKeying:!1,initGroups:[],getSink:n.getSink,providers:n.providers,moreDrawerData:{lazyToolbar:n.lazyToolbar,lazyMoreButton:n.lazyMoreButton,lazyHeader:n.lazyHeader},attributes:n.attributes};return t(e)}},name:"toolbar",schema:[br("dom"),br("onEscape"),br("getSink")]}),jU=ej.optional({factory:{sketch:cU},name:"header",schema:[br("dom")]}),UU=ej.optional({name:"socket",schema:[br("dom")]}),WU=ej.optional({factory:{sketch:BU},name:"sidebar",schema:[br("dom")]}),GU=ej.optional({factory:{sketch:RU},name:"throbber",schema:[br("dom")]}),XU=Jh({name:"OuterContainer",factory:PU,configFields:[br("dom"),br("behaviours")],partFields:[jU,HU,LU,NU,UU,WU,GU],apis:{getSocket:function(n,t){return n.getSocket(t)},setSidebar:function(n,t,e){n.setSidebar(t,e)},toggleSidebar:function(n,t,e){n.toggleSidebar(t,e)},whichSidebar:function(n,t){return n.whichSidebar(t)},getHeader:function(n,t){return n.getHeader(t)},getToolbar:function(n,t){return n.getToolbar(t)},setToolbar:function(n,t,e){var o=Xt(e,function(n){return Cz(n)});n.setToolbar(t,o)},setToolbars:function(n,t,e){var o=Xt(e,function(n){return Xt(n,Cz)});n.setToolbars(t,o)},refreshToolbar:function(n,t){return n.refreshToolbar(t)},getThrobber:function(n,t){return n.getThrobber(t)},setMenubar:function(n,t,e){n.setMenubar(t,e)},focusMenubar:function(n,t){n.focusMenubar(t)},focusToolbar:function(n,t){n.focusToolbar(t)}}}),YU="file edit view insert format tools table help",qU={file:{title:"File",items:"newdocument restoredraft | preview | print | deleteallconversations"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall | searchreplace"},view:{title:"View",items:"code | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments"},insert:{title:"Insert",items:"image link media addcomment pageembed template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor toc | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | formats blockformats fontformats fontsizes align | forecolor backcolor | removeformat"},tools:{title:"Tools",items:"spellchecker spellcheckerlanguage | a11ycheck code wordcount"},table:{title:"Table",items:"inserttable | cell row column | advtablesort | tableprops deletetable"},help:{title:"Help",items:"help"}},KU=function(n,t,e){var o=pO(e).split(/[ ,]/);return{text:n.title,getItems:function(){return oe(n.items,function(n){var e=n.toLowerCase();return 0===e.trim().length?[]:Ut(o,function(n){return n===e})?[]:"separator"===e||"|"===e?[{type:"separator"}]:t.menuItems[e]?[t.menuItems[e]]:[]})}}},JU=function(n){return"string"==typeof n?n.split(" "):n},$U=function(n,t){var e=ht(ht({},qU),t.menus),o=Be(t.menus).length>0,r=JU(void 0===t.menubar||t.menubar===!0?YU:t.menubar===!1?"":t.menubar),i=Jt(r,function(n){return o?t.menus.hasOwnProperty(n)&&t.menus[n].hasOwnProperty("items")||qU.hasOwnProperty(n):qU.hasOwnProperty(n)}),u=Xt(i,function(o){var r=e[o];return KU({title:r.title,items:JU(r.items)},t,n)});return Jt(u,function(n){var t=function(n){return"separator"!==n.type};return n.getItems().length>0&&Ut(n.getItems(),t)})},QU=function(n){var t=function(){n._skinLoaded=!0,rT(n)};return function(){n.initialized?t():n.on("init",t)}},ZU=function(n,t){return function(){return iT(n,{message:t})}},nW=function(n,t){var e,o=rO(t);o&&(e=o+"/skin.min.css",t.contentCSS.push(o+(n?"/content.inline":"/content")+".min.css")),uO(t)===!1&&e?t.ui.styleSheetLoader.load(e,QU(t),ZU(t,"Skin could not be loaded")):QU(t)()},tW=t(nW,!1),eW=t(nW,!0),oW=function(n,t,e,o){var r=t.outerContainer,i=e.toolbar,u=e.buttons;if(Vt(i,Tt)){var a=i.map(function(t){var r={toolbar:t,buttons:u,allowToolbarGroups:e.allowToolbarGroups};return XL(n,r,{backstage:o},St.none())});XU.setToolbars(r,a)}else XU.setToolbar(r,XL(n,e,{backstage:o},St.none()))},rW=VC.DOM,iW=qi(),uW=iW.os.isiOS()&&iW.os.version.major<=12,aW=function(n){var t=n.getWin(),e=n.getDoc().documentElement,o=qr(xf(t.innerWidth,t.innerHeight)),r=qr(xf(e.offsetWidth,e.offsetHeight)),i=function(e){var r=o.get();(r.left()!==t.innerWidth||r.top()!==t.innerHeight)&&(o.set(xf(t.innerWidth,t.innerHeight)),aT(n,e))},u=function(t){var e=n.getDoc().documentElement,o=r.get();(o.left()!==e.offsetWidth||o.top()!==e.offsetHeight)&&(r.set(xf(e.offsetWidth,e.offsetHeight)),aT(n,t))},a=function(t){return cT(n,t)};rW.bind(t,"resize",i),rW.bind(t,"scroll",a);var c=sE(ni.fromDom(n.getBody()),"load",u);n.on("NodeChange",u),n.on("remove",function(){c.unbind(),rW.unbind(t,"resize",i),rW.unbind(t,"scroll",a)})},cW=function(n,t,e,o,r){var i=qr(0);tW(n);var u=ni.fromDom(r.targetNode),a=Ms(As(u));Ip(u,t.mothership),Fp(a,t.uiMothership),n.on("PostRender",function(){oW(n,t,e,o),i.set(n.getWin().innerWidth),XU.setMenubar(t.outerContainer,$U(n,e)),XU.setSidebar(t.outerContainer,e.sidebar),aW(n)});var c=XU.getSocket(t.outerContainer).getOrDie("Could not find expected socket element");if(uW===!0){Us(c.element(),{overflow:"scroll","-webkit-overflow-scrolling":"touch"});var s=YS(function(){n.fire("ScrollContent")},20);cE(c.element(),"scroll",s.throttle)}XO(n,t),n.addCommand("ToggleSidebar",function(e,o){XU.toggleSidebar(t.outerContainer,o),n.fire("ToggleSidebar")}),n.addQueryValueHandler("ToggleSidebar",function(){return XU.whichSidebar(t.outerContainer)});var f=wO(n),l=function(){XU.refreshToolbar(t.outerContainer)};return(f===Dk.sliding||f===Dk.floating)&&n.on("ResizeWindow ResizeEditor ResizeContent",function(){var t=n.getWin().innerWidth;t!==i.get()&&(l(),i.set(t))}),{iframeContainer:c.element().dom(),editorContainer:t.outerContainer.element().dom()}},sW=Object.freeze({__proto__:null,render:cW}),fW=function(n){var t=qr(St.none()),e=function(){t.get().each(n)},o=function(){e(),t.set(St.none())},r=function(n){e(),t.set(St.some(n))},i=function(){return t.get().isSome()};return{clear:o,isSet:i,set:r}},lW=function(){return fW(function(n){n.unbind()})},dW=function(){var n=qr(St.none()),t=function(){n.set(St.none())},e=function(t){n.set(St.some(t))},o=function(t){n.get().each(t)},r=function(){return n.get().isSome()};return{clear:t,set:e,isSet:r,on:o}},mW=function(n){var t=/^[0-9\.]+(|px)$/i;return t.test(""+n)?St.some(parseInt(""+n,10)):St.none()},gW=function(n){return Rt(n)?n+"px":n},pW=function(n,t,e){var o=t.filter(function(t){return t>n}),r=e.filter(function(t){return n>t});return o.or(r).getOr(n)},vW=function(n){var t=aO(n),e=fO(n),o=dO(n);return mW(t).map(function(n){return pW(n,e,o)})},hW=function(n){var t=vW(n);return t.getOr(aO(n))},bW=function(n){var t=cO(n),e=sO(n),o=lO(n);return mW(t).map(function(n){return pW(n,e,o)})},yW=function(n){var t=bW(n);return t.getOr(cO(n))},xW=function(n,t,e,o,r){var i=e.uiMothership,u=e.outerContainer,a=VC.DOM,c=EO(n),s=AO(n),f=lO(n).or(bW(n)),l=o.shared.header,d=l.isPositionedAtTop,m=wO(n),g=m===Dk.sliding||m===Dk.floating,p=qr(!1),v=function(){return p.get()&&!n.removed},h=function(n){return g?n.fold(function(){return 0},function(n){return n.components().length>1?vf(n.components()[1].element()):0}):0},b=function(e){switch(CO(n)){case xO.auto:var o=XU.getToolbar(u),r=h(o),i=vf(e.element())-r,a=$f(t),c=a.y>i;if(c)return"top";var s=za(t),f=Math.max(s.dom().scrollHeight,vf(s)),l=a.bottom<f-i;if(l)return"bottom";var d=Zf(),m=d.bottom<a.bottom-i;return m?"bottom":"top";case xO.bottom:return"bottom";case xO.top:default:return"top"}},y=function(n){var t=r.get();jj.setModes(t,[n]),l.setDockingMode(n);var e=d()?dl.TopToBottom:dl.BottomToTop;cc(t.element(),Am,e)},x=function(){var n=f.getOrThunk(function(){var n=mW(Gs(Hs(),"margin-left")).getOr(0);return Tf(Hs())-kf(t).left()+n});js(r.get().element(),"max-width",n+"px")},w=function(){var n=XU.getToolbar(u),e=h(n),o=$f(t),i=d()?Math.max(o.y-vf(r.get().element())+e,0):o.bottom;Us(u.element(),{position:"absolute",top:Math.round(i)+"px",left:Math.round(o.x)+"px"})},S=function(){i.broadcastOn([rv()],{})},k=function(n){if(void 0===n&&(n=!1),v()){if(c||x(),g&&XU.refreshToolbar(u),c||w(),s){var t=r.get();n?jj.reset(t):jj.refresh(t)}S()}},C=function(n){if(void 0===n&&(n=!0),!c&&s&&v()){var t=l.getDockingMode(),e=b(r.get());e!==t&&(y(e),n&&k(!0))}},O=function(){p.set(!0),js(u.element(),"display","flex"),a.addClass(n.getBody(),"mce-edit-focus"),Js(i.element(),"display"),C(!1),k()},_=function(){p.set(!1),e.outerContainer&&(js(u.element(),"display","none"),a.removeClass(n.getBody(),"mce-edit-focus")),js(i.element(),"display","none")};return{isVisible:v,isPositionedAtTop:d,show:O,hide:_,update:k,updateMode:C,repositionPopups:S}},wW=function(n,t){var e=$f(n);return{pos:t?e.y:e.bottom,bounds:e}},SW=function(n,t,e){var o=qr(wW(t,e.isPositionedAtTop())),r=function(r){var i=wW(t,e.isPositionedAtTop()),u=i.pos,a=i.bounds,c=o.get(),s=c.pos,f=c.bounds,l=a.height!==f.height||a.width!==f.width;o.set({pos:u,bounds:a}),l&&aT(n,r),e.isVisible()&&(s!==u?e.update(!0):l&&(e.updateMode(),e.repositionPopups()))};n.on("activate",e.show),n.on("deactivate",e.hide),n.on("SkinLoaded ResizeWindow",function(){return e.update(!0)}),n.on("NodeChange keydown",function(n){VS.requestAnimationFrame(function(){return r(n)})}),n.on("ScrollWindow",function(){return e.updateMode()});var i=lW();i.set(sE(ni.fromDom(n.getBody()),"load",r)),n.on("remove",function(){i.clear()})},kW=function(n,t,e,o,r){var i=t.mothership,u=t.uiMothership,a=t.outerContainer,c=qr(null),s=ni.fromDom(r.targetNode),f=xW(n,s,t,o,c);eW(n);var l=function(){if(c.get())return void f.show();c.set(XU.getHeader(a).getOrDie());var r=BO(n);Fp(r,i),Fp(r,u),oW(n,t,e,o),XU.setMenubar(a,$U(n,e)),f.show(),SW(n,s,f),n.nodeChanged()};return n.on("focus",l),n.on("blur hide",f.hide),n.on("init",function(){n.hasFocus()&&l()}),XO(n,t),{editorContainer:a.element().dom()}},CW=Object.freeze({__proto__:null,render:kW}),OW=function(n){var t=[{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"}];OR.each(t,function(t){n.ui.registry.addToggleButton(t.name,{tooltip:t.text,onAction:function(){return n.execCommand(t.cmd)},icon:t.icon,onSetup:TL(n,t.name)})});var e={name:"alignnone",text:"No alignment",cmd:"JustifyNone",icon:"align-none"};n.ui.registry.addButton(e.name,{tooltip:e.text,onAction:function(){return n.execCommand(e.cmd)},icon:e.icon})},_W=function(n,t){return function(){n.execCommand("mceToggleFormat",!1,t)}},TW=function(n){OR.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.ui.registry.addToggleButton(t.name,{tooltip:t.text,icon:t.icon,onSetup:TL(n,t.name),onAction:_W(n,t.name)})});for(var t=1;6>=t;t++){var e="h"+t;n.ui.registry.addToggleButton(e,{text:e.toUpperCase(),tooltip:"Heading "+t,onSetup:TL(n,e),onAction:_W(n,e)})}},EW=function(n){OR.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){n.ui.registry.addButton(t.name,{tooltip:t.text,icon:t.icon,onAction:function(){return n.execCommand(t.action)}})})},BW=function(n){OR.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],function(t){n.ui.registry.addToggleButton(t.name,{tooltip:t.text,icon:t.icon,onAction:function(){return n.execCommand(t.action)},onSetup:TL(n,t.name)})})},DW=function(n){TW(n),EW(n),BW(n)},AW=function(n){OR.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(t){n.ui.registry.addMenuItem(t.name,{text:t.text,icon:t.icon,shortcut:t.shortcut,onAction:function(){return n.execCommand(t.action)}})}),n.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onAction:_W(n,"code")})},MW=function(n){DW(n),AW(n)},FW=function(n,t,e){var o=function(){return t.undoManager?t.undoManager[e]():!1},r=function(){n.setDisabled(t.mode.isReadOnly()||!o())};return n.setDisabled(!o()),t.on("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",r),function(){return t.off("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",r)}},IW=function(n){n.ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:function(t){return FW(t,n,"hasUndo")},onAction:function(){return n.execCommand("undo")}}),n.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:function(t){return FW(t,n,"hasRedo")},onAction:function(){return n.execCommand("redo")}})},RW=function(n){n.ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",onSetup:function(t){return FW(t,n,"hasUndo")},onAction:function(){return n.execCommand("undo")}}),n.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",onSetup:function(t){return FW(t,n,"hasRedo")},onAction:function(){return n.execCommand("redo")}})},VW=function(n){IW(n),RW(n)},PW=function(n,t){n.setActive(t.hasVisual);var e=function(t){n.setActive(t.hasVisual)};return t.on("VisualAid",e),function(){return t.off("VisualAid",e)}},HW=function(n){n.ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:function(t){return PW(t,n)},onAction:function(){n.execCommand("mceToggleVisualAid")}})},zW=function(n){n.ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:function(){return n.execCommand("mceToggleVisualAid")}})},NW=function(n){zW(n),HW(n)},LW=function(n,t){n.setDisabled(!t.queryCommandState("outdent"));var e=function(){n.setDisabled(!t.queryCommandState("outdent"))};return t.on("NodeChange",e),function(){return t.off("NodeChange",e)}},jW=function(n){n.ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:function(t){return LW(t,n)},onAction:function(){return n.execCommand("outdent")}}),n.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onAction:function(){return n.execCommand("indent")}})},UW=function(n){jW(n)},WW=function(n,t){sL(n,t),vL(n,t),RL(n,t),ML(n,t),CL(n,t)},GW=function(n,t){OW(n),MW(n),WW(n,t),VW(n),VT(n),NW(n),UW(n)},XW=function(n,t){return{anchor:"makeshift",x:n,y:t}},YW=function(n,t,e){return XW(n.x+t,n.y+e)},qW=function(n){return"longpress"===n.type||0===n.type.indexOf("touch")},KW=function(n){if(qW(n)){var t=n.touches[0];return XW(t.pageX,t.pageY)}return XW(n.pageX,n.pageY)},JW=function(n){if(qW(n)){var t=n.touches[0];return XW(t.clientX,t.clientY)}return XW(n.clientX,n.clientY)},$W=function(n,t){var e=VC.DOM.getPos(n);return YW(t,e.x,e.y)},QW=function(n,t){return"contextmenu"===t.type||"longpress"===t.type?n.inline?KW(t):$W(n.getContentAreaContainer(),JW(t)):ZW(n)},ZW=function(n){return{anchor:"selection",root:ni.fromDom(n.selection.getNode())}},nG=function(n){return{anchor:"node",node:St.some(ni.fromDom(n.selection.getNode())),root:ni.fromDom(n.getBody())}},tG=function(n,t,e){return e?nG(n):QW(n,t)},eG=function(n,t,e,o,r,i){var u=e(),a=tG(n,t,i);II(u,Ak.CLOSE_ON_EXECUTE,o,!1).map(function(n){t.preventDefault(),CS.showMenuAt(r,a,{menu:{markers:qk("normal")},data:n})})},oG={onLtr:function(){return[ld,ud,ad,cd,sd,fd,IS,RS,MS,DS,FS,AS]},onRtl:function(){return[ld,ad,ud,sd,cd,fd,IS,RS,FS,AS,MS,DS]}},rG=12,iG={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"]},uG=function(n,t){var e=n.selection;if(e.isCollapsed()||t.touches.length<1)return!1;var o=t.touches[0],r=e.getRng(),i=Mg(n.getWin(),rg.domRange(r));return i.exists(function(n){return n.left()<=o.clientX&&n.right()>=o.clientX&&n.top()<=o.clientY&&n.bottom()>=o.clientY})},aG=function(n,t,e){var o=t?nG(n):QW(n,e);return ht({bubble:Om(0,rG,iG),layouts:oG,overrides:{maxWidthFunction:oH(),maxHeightFunction:xm()}},o)},cG=function(n){var t=n.selection.getRng(),e=function(){VS.setEditorTimeout(n,function(){n.selection.setRng(t)},10),i()};n.once("touchend",e);var o=function(n){n.preventDefault(),n.stopImmediatePropagation()};n.on("mousedown",o,!0);var r=function(){return i()};n.once("longpresscancel",r);var i=function(){n.off("touchend",e),n.off("longpresscancel",r),n.off("mousedown",o)}},sG=function(n,t,e,o,r,i,u){var a=aG(n,i,t);II(e,Ak.CLOSE_ON_EXECUTE,o,!0).map(function(e){t.preventDefault(),CS.showMenuWithinBounds(r,a,{menu:{markers:qk("normal"),highlightImmediately:u},data:e,type:"horizontal"},function(){return St.some(zN(n,o.shared))}),n.fire(iH)})},fG=function(n,t,e,o,r,i){var u=qi(),a=u.os.isiOS(),c=u.os.isOSX(),s=u.os.isAndroid(),f=u.deviceType.isTouch(),l=function(){return!(s||a||c&&f)},d=function(){var u=e();sG(n,t,u,o,r,i,l())};if(!c&&!a||i)s&&!i&&n.selection.setCursorLocation(t.target,0),d();else{var m=function(){cG(n),d()};uG(n,t)?m():(n.once("selectionchange",m),n.once("touchend",function(){return n.off("selectionchange",m)}))}},lG=function(n){return"string"==typeof n?n.split(/[ ,]/):n},dG=function(n){return n.getParam("contextmenu_never_use_native",!1,"boolean")},mG=function(n,t,e){var o=n.ui.registry.getAll().contextMenus;return St.from(n.getParam(t)).map(lG).getOrThunk(function(){return Jt(lG(e),function(n){return Le(o,n)})})},gG=function(n){return n.getParam("contextmenu")===!1},pG=function(n){return mG(n,"contextmenu","link linkchecker image imagetools table spellchecker configurepermanentpen")},vG=function(n){return Tt(n)?"|"===n:"separator"===n.type},hG={type:"separator"},bG=function(n){if(Tt(n))return n;switch(n.type){case"separator":return hG;case"submenu":return{type:"nestedmenuitem",text:n.text,icon:n.icon,getSubmenuItems:function(){var t=n.getSubmenuItems();return Tt(t)?t:Xt(t,bG)}};default:return{type:"menuitem",text:n.text,icon:n.icon,onAction:at(n.onAction)}}},yG=function(n,t){if(0===t.length)return n;var e=fe(n).filter(function(n){return!vG(n)}),o=e.fold(function(){return[]},function(){return[hG]});return n.concat(o).concat(t).concat([hG])},xG=function(n,t,e){var o=Qt(t,function(t,o){if(Le(n,o)){var r=n[o].update(e);if(Tt(r))return yG(t,r.split(" "));if(r.length>0){var i=Xt(r,bG);return yG(t,i)}return t}return t.concat([o])},[]);return o.length>0&&vG(o[o.length-1])&&o.pop(),o},wG=function(n,t){return t.ctrlKey&&!dG(n)},SG=function(n,t){return"longpress"!==t.type&&(2!==t.button||t.target===n.getBody()&&""===t.pointerType)},kG=function(n,t,e){var o=qi(),r=o.deviceType.isTouch,i=mf(CS.sketch({dom:{tag:"div"},lazySink:t,onEscape:function(){return n.focus()},onShow:function(){return e.setContextMenuState(!0)},onHide:function(){return e.setContextMenuState(!1)},fireDismissalEventInstead:{},inlineBehaviours:Td([fw("dismissContextMenu",[va(Qu(),function(t){ev.close(t),n.focus()})])])})),u=function(){return CS.hide(i)},a=function(t){if(dG(n)&&t.preventDefault(),!wG(n,t)&&!gG(n)){var o=SG(n,t),u=function(){var e=o?n.selection.getStart(!0):t.target,r=n.ui.registry.getAll(),i=pG(n);return xG(r.contextMenus,i,e)},a=r()?fG:eG;a(n,t,u,e,i,o)}};n.on("init",function(){var t="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(r()?"":" ResizeWindow");n.on(t,u),n.on("longpress contextmenu",a)})},CG=We.generate([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),OG=function(n){return function(t){return t.translate(-n.left(),-n.top())}},_G=function(n){return function(t){return t.translate(n.left(),n.top())}},TG=function(n){return function(t,e){return Qt(n,function(n,t){return t(n)},xf(t,e))}},EG=function(n,t,e){return n.fold(TG([_G(e),OG(t)]),TG([OG(t)]),TG([]))},BG=function(n,t,e){return n.fold(TG([_G(e)]),TG([]),TG([_G(t)]))},DG=function(n,t,e){return n.fold(TG([]),TG([OG(e)]),TG([_G(t),OG(e)]))},AG=function(n,t,e,o,r,i){var u=BG(n,r,i),a=BG(t,r,i);return Math.abs(u.left()-a.left())<=e&&Math.abs(u.top()-a.top())<=o},MG=function(n,t,e,o,r,i){var u=BG(n,r,i),a=BG(t,r,i),c=Math.abs(u.left()-a.left()),s=Math.abs(u.top()-a.top());return xf(c,s)},FG=function(n,t,e){var o=n.fold(function(n,t){return{position:St.some("absolute"),left:St.some(n+"px"),top:St.some(t+"px")}},function(n,t){return{position:St.some("absolute"),left:St.some(n-e.left()+"px"),top:St.some(t-e.top()+"px")}},function(n,t){return{position:St.some("fixed"),left:St.some(n+"px"),top:St.some(t+"px")}});return ht({right:St.none(),bottom:St.none()},o)},IG=function(n,t,e){return n.fold(function(n,o){return VG(n+t,o+e)},function(n,o){return PG(n+t,o+e)},function(n,o){return HG(n+t,o+e)})},RG=function(n,t,e,o){var r=function(n,r){return function(i,u){var a=n(t,e,o);return r(i.getOr(a.left()),u.getOr(a.top()))}};return n.fold(r(DG,VG),r(BG,PG),r(EG,HG))},VG=CG.offset,PG=CG.absolute,HG=CG.fixed,zG=function(n,t){var e=fc(n,t);return At(e)?0/0:parseInt(e,10)},NG=function(n,t){var e=n.element(),o=zG(e,t.leftAttr),r=zG(e,t.topAttr);return isNaN(o)||isNaN(r)?St.none():St.some(xf(o,r))},LG=function(n,t,e){var o=n.element();cc(o,t.leftAttr,e.left()+"px"),cc(o,t.topAttr,e.top()+"px")},jG=function(n,t){var e=n.element();mc(e,t.leftAttr),mc(e,t.topAttr)},UG=function(n,t,e,o){return NG(n,t).fold(function(){return e},function(n){return HG(n.left()+o.left(),n.top()+o.top())})},WG=function(n,t,e,o,r,i){var u=UG(n,t,e,o),a=t.mustSnap?YG(n,t,u,r,i):qG(n,t,u,r,i),c=EG(u,r,i);return LG(n,t,c),a.fold(function(){return{coord:HG(c.left(),c.top()),extra:St.none()}},function(n){return{coord:n.output,extra:n.extra}})},GG=function(n,t){jG(n,t)},XG=function(n,t,e,o){return de(n,function(n){var r=n.sensor,i=AG(t,r,n.range.left(),n.range.top(),e,o);return i?St.some({output:RG(n.output,t,e,o),extra:n.extra}):St.none()})},YG=function(n,t,e,o,r){var i=t.getSnapPoints(n),u=XG(i,e,o,r);return u.orThunk(function(){var n=Qt(i,function(n,t){var i=t.sensor,u=MG(e,i,t.range.left(),t.range.top(),o,r);return n.deltas.fold(function(){return{deltas:St.some(u),snap:St.some(t)}},function(e){var o=(u.left()+u.top())/2,r=(e.left()+e.top())/2;return r>=o?{deltas:St.some(u),snap:St.some(t)}:n})},{deltas:St.none(),snap:St.none()});return n.snap.map(function(n){return{output:RG(n.output,e,o,r),extra:n.extra}})})},qG=function(n,t,e,o,r){var i=t.getSnapPoints(n);return XG(i,e,o,r)},KG=function(n,t,e){return{coord:RG(n.output,n.output,t,e),extra:n.extra}},JG=function(n,t,e,o){var r=t.getTarget(n.element());if(t.repositionTarget){var i=Pa(n.element()),u=Pf(i),a=lj(r),c=KG(o,u,a),s=FG(c.coord,u,a);Ws(r,s)}},$G=Object.freeze({__proto__:null,snapTo:JG}),QG="data-initial-z-index",ZG=function(n){La(n.element()).filter(Fa).each(function(n){lc(n,QG).fold(function(){return Js(n,"z-index")},function(t){return js(n,"z-index",t)}),mc(n,QG)})},nX=function(n){La(n.element()).filter(Fa).each(function(t){Ys(t,"z-index").each(function(n){cc(t,QG,n)}),js(t,"z-index",Gs(n.element(),"z-index"))})},tX=function(n,t){n.getSystem().addToGui(t),nX(t)},eX=function(n){ZG(n),n.getSystem().removeFromGui(n)},oX=function(n,t,e){return n.getSystem().build(VE.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[t]},events:e}))},rX=Rr("snaps",[br("getSnapPoints"),Bl("onSensor"),br("leftAttr"),br("topAttr"),Pr("lazyViewport",Zf),Pr("mustSnap",!1)]),iX=[Pr("useFixed",gt),br("blockerClass"),Pr("getTarget",lt),Pr("onDrag",ut),Pr("repositionTarget",!0),Pr("onDrop",ut),Ur("getBounds",Zf),rX],uX=function(n){return nb(Ys(n,"left"),Ys(n,"top"),Ys(n,"position"),function(n,t,e){var o="fixed"===e?HG:VG;return o(parseInt(n,10),parseInt(t,10))}).getOrThunk(function(){var t=kf(n);return PG(t.left(),t.top())})},aX=function(n,t,e,o,r){var i=r.bounds,u=BG(t,e,o),a=am(u.left(),i.x,i.x+i.width-r.width),c=am(u.top(),i.y,i.y+i.height-r.height),s=PG(a,c);return t.fold(function(){var n=DG(s,e,o);return VG(n.left(),n.top())},function(){return s},function(){var n=EG(s,e,o);return HG(n.left(),n.top())})},cX=function(n,t,e,o,r,i,u){var a=t.fold(function(){var n=IG(e,i.left(),i.top()),t=EG(n,o,r);return HG(t.left(),t.top())},function(t){var u=WG(n,t,e,i,o,r);return u.extra.each(function(e){t.onSensor(n,e)}),u.coord});return aX(n,a,o,r,u)},sX=function(n,t,e,o){var r=t.getTarget(n.element());if(t.repositionTarget){var i=Pa(n.element()),u=Pf(i),a=lj(r),c=uX(r),s=cX(n,t.snaps,c,u,a,o,e),f=FG(s,u,a);Ws(r,f)}t.onDrag(n,r,o)},fX=function(n,t){return{bounds:n.getBounds(),height:hf(t.element()),width:Ef(t.element())}},lX=function(n,t,e,o,r){var i=e.update(o,r),u=e.getStartData().getOrThunk(function(){return fX(t,n)});i.each(function(e){sX(n,t,u,e)})},dX=function(n,t,e,o){t.each(eX),e.snaps.each(function(t){GG(n,t)});var r=e.getTarget(n.element());o.reset(),e.onDrop(n,r)},mX=function(n){return function(t,e){var r=function(n){e.setStartData(fX(t,n))};return da(o([va(qu(),function(n){e.getStartData().each(function(){return r(n)})})],n(t,e,r)))}},gX=function(n){return da([va(xu(),n.forceDrop),va(ku(),n.drop),va(wu(),function(t,e){n.move(e.event())}),va(Su(),n.delayDrop)])},pX=function(n){return St.from(xf(n.x(),n.y()))},vX=function(n,t){return xf(t.left()-n.left(),t.top()-n.top())},hX=Object.freeze({__proto__:null,getData:pX,getDelta:vX}),bX=function(n,t,e){return[va(xu(),function(o,r){var i=r.event().raw();if(0===i.button){r.stop();var u=function(){return dX(o,St.some(s),n,t)},a=l(u,200),c={drop:u,delayDrop:a.schedule,forceDrop:u,move:function(e){a.cancel(),lX(o,n,t,hX,e)}},s=oX(o,n.blockerClass,gX(c)),f=function(){e(o),tX(o,s)};f()}})]},yX=o(iX,[Fl("dragger",{handlers:mX(bX)})]),xX=function(n){return da([va(vu(),n.forceDrop),va(bu(),n.drop),va(yu(),n.drop),va(hu(),function(t,e){n.move(e.event())})])},wX=function(n){var t=n[0];return St.some(xf(t.clientX,t.clientY))},SX=function(n){var t=n.raw(),e=t.touches;return 1===e.length?wX(e):St.none()},kX=function(n,t){return xf(t.left()-n.left(),t.top()-n.top())},CX=Object.freeze({__proto__:null,getData:SX,getDelta:kX}),OX=function(n,t,e){var o=qr(St.none());return[va(vu(),function(r,i){i.stop();var u=function(){dX(r,o.get(),n,t),o.set(St.none())},a={drop:u,delayDrop:function(){},forceDrop:u,move:function(e){lX(r,n,t,CX,e)}},c=oX(r,n.blockerClass,xX(a));o.set(St.some(c));var s=function(){e(r),tX(r,c)};s()}),va(hu(),function(e,o){o.stop(),lX(e,n,t,CX,o.event())}),va(bu(),function(e,r){r.stop(),dX(e,o.get(),n,t),o.set(St.none())}),va(yu(),function(e){dX(e,o.get(),n,t),o.set(St.none())})]},_X=o(iX,[Fl("dragger",{handlers:mX(OX)})]),TX=function(n,t,e){return o(bX(n,t,e),OX(n,t,e))},EX=o(iX,[Fl("dragger",{handlers:mX(TX)})]),BX=yX,DX=_X,AX=EX,MX=Object.freeze({__proto__:null,mouse:BX,touch:DX,mouseOrTouch:AX}),FX=function(){var n=St.none(),t=St.none(),e=function(){n=St.none(),t=St.none()},o=function(t,e){var o=n.map(function(n){return t.getDelta(n,e)});return n=St.some(e),o},r=function(n,t){return n.getData(t).bind(function(t){return o(n,t)})},i=function(n){t=St.some(n)},u=function(){return t},a=ft({});return Uc({readState:a,reset:e,update:r,getStartData:u,setStartData:i})},IX=Object.freeze({__proto__:null,init:FX}),RX=Ad({branchKey:"mode",branches:MX,name:"dragging",active:{events:function(n,t){var e=n.dragger;return e.handlers(n,t)}},extra:{snap:function(n){return{sensor:n.sensor,range:n.range,output:n.output,extra:St.from(n.extra)}}},state:IX,apis:$G}),VX=40,PX=VX/2,HX=function(n,t,e,o,r,i){return n.fold(function(){return RX.snap({sensor:PG(e-PX,o-PX),range:xf(r,i),output:PG(St.some(e),St.some(o)),extra:{td:t}})},function(n){var r=e-PX,i=o-PX,u=VX,a=VX,c=n.element().dom().getBoundingClientRect();return RX.snap({sensor:PG(r,i),range:xf(u,a),output:PG(St.some(e-c.width/2),St.some(o-c.height/2)),extra:{td:t}})})},zX=function(n,t,e){var o=function(n,t){return n.exists(function(n){return ou(n,t)})};return{getSnapPoints:n,leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:function(n,r){var i=r.td;
o(t.get(),i)||(t.set(St.some(i)),e(i))},mustSnap:!0}},NX=function(n){return zS(HS.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:Td([RX.config({mode:"mouseOrTouch",blockerClass:"blocker",snaps:n}),mD.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}}))},LX=function(n,t){var e=qr([]),o=qr([]),r=qr(!1),i=qr(St.none()),u=qr(St.none()),a=function(n){var e=Qf(n);return HX(m.getOpt(t),n,e.x,e.y,e.width,e.height)},c=function(){return Xt(e.get(),function(n){return a(n)})},s=function(n){var e=Qf(n);return HX(g.getOpt(t),n,e.right,e.bottom,e.width,e.height)},f=function(){return Xt(o.get(),function(n){return s(n)})},l=zX(c,i,function(t){u.get().each(function(e){n.fire("TableSelectorChange",{start:t,finish:e})})}),d=zX(f,u,function(t){i.get().each(function(e){n.fire("TableSelectorChange",{start:e,finish:t})})}),m=NX(l),g=NX(d),p=mf(m.asSpec()),v=mf(g.asSpec()),h=function(t,e,o,r){var i=e.dom().getBoundingClientRect();Js(t.element(),"display");var u=Na(ni.fromDom(n.getBody())).dom().innerHeight,a=o(i),c=r(i,u);(a||c)&&js(t.element(),"display","none")},b=function(n,t,e,o){var r=e(t);RX.snapTo(n,r);var i=function(n){return n[o]<0},u=function(n,t){return n[o]>t};h(n,t,i,u)},y=function(n){return b(p,n,a,"top")},x=function(){return i.get().each(y)},w=function(n){return b(v,n,s,"bottom")},S=function(){return u.get().each(w)};qi().deviceType.isTouch()&&(n.on("TableSelectionChange",function(n){r.get()||(Ep(t,p),Ep(t,v),r.set(!0)),i.set(St.some(n.start)),u.set(St.some(n.finish)),n.otherCells.each(function(t){e.set(t.upOrLeftCells),o.set(t.downOrRightCells),y(n.start),w(n.finish)})}),n.on("ResizeEditor ResizeWindow ScrollContent",function(){x(),S()}),n.on("TableSelectionClear",function(){r.get()&&(Ap(p),Ap(v),r.set(!1)),i.set(St.none()),u.set(St.none())}))};!function(n){n[n.None=0]="None",n[n.Both=1]="Both",n[n.Vertical=2]="Vertical"}(oL||(oL={}));var jX=function(n,t,e,o,r){var i={};return i.height=pW(o+t.top(),fO(n),dO(n)),e===oL.Both&&(i.width=pW(r+t.left(),sO(n),lO(n))),i},UX=function(n,t,e){var o=ni.fromDom(n.getContainer()),r=jX(n,t,e,vf(o),Tf(o));Ae(r,function(n,t){return js(o,t,gW(n))}),uT(n)},WX=function(n){if(1===n.nodeType){if("BR"===n.nodeName||n.getAttribute("data-mce-bogus"))return!0;if("bookmark"===n.getAttribute("data-mce-type"))return!0}return!1},GX=function(n,t,e){t.delimiter||(t.delimiter="»");var o=function(o){var r=o||[],i=Xt(r,function(t,o){return HS.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{role:"button","data-index":o,"tab-index":-1,"aria-level":o+1},innerHtml:t.name},action:function(){n.focus(),n.selection.select(t.element),n.nodeChanged()},buttonBehaviours:Td([QO.button(e.isReadOnly),YO()])})}),u={dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0},innerHtml:" "+t.delimiter+" "}};return Qt(i.slice(1),function(n,t){var e=n;return e.push(u),e.push(t),e},[i[0]])},r=function(t){for(var e=[],o=t.length;o-->0;){var r=t[o];if(1===r.nodeType&&!WX(r)){var i=n.fire("ResolveName",{name:r.nodeName.toLowerCase(),target:r});if(i.isDefaultPrevented()||e.push({name:i.name,element:r}),i.isPropagationStopped())break}}return e};return{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:Td([Qx.config({mode:"flow",selector:"div[role=button]"}),eO.config({disabled:e.isReadOnly}),YO(),XE.config({}),cw.config({}),fw("elementPathEvents",[_a(function(t){n.shortcuts.add("alt+F11","focus statusbar elementpath",function(){return Qx.focusIn(t)}),n.on("NodeChange",function(n){var e=r(n.parents);e.length>0?cw.set(t,o(e)):cw.set(t,[])})})])]),components:[]}},XX=function(n,t){var e=function(n,e,o){return cw.set(n,[ff(t.translate(["{0} "+o,e[o]]))])};return HS.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:Td([QO.button(t.isReadOnly),YO(),XE.config({}),cw.config({}),Hv.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),fw("wordcount-events",[Ba(function(n){var t=Hv.getValue(n),o="words"===t.mode?"characters":"words";Hv.setValue(n,{mode:o,count:t.count}),e(n,t.count,o)}),_a(function(t){n.on("wordCountUpdate",function(n){var o=Hv.getValue(t).mode;Hv.setValue(t,{mode:o,count:n.wordCount}),e(t,n.wordCount,o)})})])]),eventOrder:{"alloy.execute":["disabling","alloy.base.behaviour","wordcount-events"]}})},YX=function(n,t){var e=function(e){return{dom:{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{title:t.translate("Resize"),"aria-hidden":"true"},innerHtml:LS("resize-handle",t.icons)},behaviours:Td([RX.config({mode:"mouse",repositionTarget:!1,onDrag:function(t,o,r){UX(n,r,e)},blockerClass:"tox-blocker"})])}},o=function(){var n=PC.translate(["Powered by {0}","Tiny"]),t='<a href="https://www.tiny.cloud/?utm_campaign=editor_referral&amp;utm_medium=poweredby&amp;utm_source=tinymce&amp;utm_content=v5" rel="noopener" target="_blank" tabindex="-1" aria-label="'+n+'">'+n+"</a>";return{dom:{tag:"span",classes:["tox-statusbar__branding"],innerHtml:t}}},r=function(n){var t=!Ri(n.getParam("plugins","","string"),"autoresize"),e=n.getParam("resize",t);return e===!1?oL.None:"both"===e?oL.Both:oL.Vertical},i=function(){var e=[];return n.getParam("elementpath",!0,"boolean")&&e.push(GX(n,{},t)),Ri(n.getParam("plugins","","string"),"wordcount")&&e.push(XX(n,t)),n.getParam("branding",!0,"boolean")&&e.push(o()),e.length>0?[{dom:{tag:"div",classes:["tox-statusbar__text-container"]},components:e}]:[]},u=function(){var t=i(),o=r(n);return o!==oL.None&&t.push(e(o)),t};return{dom:{tag:"div",classes:["tox-statusbar"]},components:u()}},qX=function(n){var t,e=n.inline,o=e?CW:sW,r=AO(n)?oU:aU,i=St.none(),u=qi(),a=u.browser.isIE(),c=a?["tox-platform-ie"]:[],s=u.deviceType.isTouch(),f="tox-platform-touch",l=s?[f]:[],d=OO(n),m=PC.isRtl()?{attributes:{dir:"rtl"}}:{},g={attributes:(t={},t[Am]=d?dl.BottomToTop:dl.TopToBottom,t)},p=function(){return i.bind(XU.getHeader)},v=function(){return r.isDocked(p)},h=mf({dom:ht({tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(c).concat(l)},m),behaviours:Td([Sp.config({useFixed:function(){return v()}})])}),b=function(){return ve.value(h)},y=zS({dom:{tag:"div",classes:["tox-anchorbar"]}}),x=function(){return i.bind(function(n){return y.getOpt(n)}).getOrDie("Could not find a anchor bar element")},w=function(){return i.bind(function(n){return XU.getToolbar(n)}).getOrDie("Could not find more toolbar element")},S=function(){return i.bind(function(n){return XU.getThrobber(n)}).getOrDie("Could not find throbber element")},k=eH(h,n,x),C=XU.parts().menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:k,onEscape:function(){n.focus()}}),O=wO(n),_=XU.parts().toolbar(ht({dom:{tag:"div",classes:["tox-toolbar"]},getSink:b,providers:k.shared.providers,onEscape:function(){n.focus()},type:O,lazyToolbar:w,lazyHeader:function(){return p().getOrDie("Could not find header element")}},g)),T=XU.parts()["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},providers:k.shared.providers,onEscape:function(){},type:O}),E=XU.parts().socket({dom:{tag:"div",classes:["tox-edit-area"]}}),B=XU.parts().sidebar({dom:{tag:"div",classes:["tox-sidebar"]}}),D=XU.parts().throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:k}),A=n.getParam("statusbar",!0,"boolean"),M=A&&!e?St.some(YX(n,k.shared.providers)):St.none(),F={dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[E,B]},I=yO(n),R=hO(n),V=vO(n),P=function(){return I?[T]:R?[_]:[]},H=XU.parts().header({dom:ht({tag:"div",classes:["tox-editor-header"]},g),components:ee([V?[C]:[],P(),EO(n)?[]:[y.asSpec()]]),sticky:AO(n),editor:n,sharedBackstage:k.shared}),z=ee([d?[]:[H],e?[]:[F],d?[H]:[]]),N={dom:{tag:"div",classes:["tox-editor-container"]},components:z},L=ee([[N],e?[]:M.toArray(),[D]]),j=DO(n),U=ht(ht({role:"application"},PC.isRtl()?{dir:"rtl"}:{}),j?{"aria-hidden":"true"}:{}),W=mf(XU.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(e?["tox-tinymce-inline"]:[]).concat(d?["tox-tinymce--toolbar-bottom"]:[]).concat(l).concat(c),styles:ht({visibility:"hidden"},j?{opacity:"0",border:"0"}:{}),attributes:U},components:L,behaviours:Td([Qx.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"})])}));i=St.some(W),n.shortcuts.add("alt+F9","focus menubar",function(){XU.focusMenubar(W)}),n.shortcuts.add("alt+F10","focus toolbar",function(){XU.focusToolbar(W)});var G=PE(W),X=PE(h);nj(n,G,X);var Y=function(){var n={broadcastAll:X.broadcast,broadcastOn:X.broadcastOn,register:function(){}};return{channels:n}},q=function(){var t=gW(hW(n)),e=gW(yW(n));return n.inline||(Ks("div","width",e)&&js(W.element(),"width",e),Ks("div","height",t)?js(W.element(),"height",t):js(W.element(),"height","200px")),t},K=function(){r.setup(n,k.shared,p),GW(n,k),kG(n,b,k),xU(n),VU(n,S,k.shared),Me(kO(n),function(t,e){n.ui.registry.addGroupToolbarButton(e,t)});var t=n.ui.registry.getAll(),e=t.buttons,i=t.menuItems,u=t.contextToolbars,a=t.sidebars,c=bO(n),s={menuItems:i,menus:FO(n),menubar:IO(n),toolbar:c.getOrThunk(function(){return RO(n)}),allowToolbarGroups:O===Dk.floating,buttons:e,sidebar:a};ZL(n,u,h,{backstage:k}),LX(n,h);var f=n.getElement(),l=q(),d={mothership:G,uiMothership:X,outerContainer:W},m={targetNode:f,height:l};return o.render(n,d,s,k,m)};return{mothership:G,uiMothership:X,backstage:k,renderUI:K,getUi:Y}},KX=function(n,t){var e=St.from(fc(n,"id")).fold(function(){var n=Sc("dialog-describe");return cc(t,"id",n),n},lt);cc(n,"aria-describedby",e)},JX=function(n,t){var e=St.from(fc(n,"id")).fold(function(){var n=Sc("dialog-label");return cc(t,"id",n),n},lt);cc(n,"aria-labelledby",e)},$X=ft([br("lazySink"),Br("dragBlockClass"),Ur("getBounds",Zf),Pr("useTabstopAt",ft(!0)),Pr("eventOrder",{}),zv("modalBehaviours",[Qx]),Dl("onExecute"),Ml("onEscape")]),QX={sketch:lt},ZX=ft([yh({name:"draghandle",overrides:function(n,t){return{behaviours:Td([RX.config({mode:"mouse",getTarget:function(n){return rl(n,'[role="dialog"]').getOr(n)},blockerClass:n.dragBlockClass.getOrDie(new Error("The drag blocker class was not specified for a dialog with a drag handle: \n"+JSON.stringify(t,null,2)).message),getBounds:n.getDragBounds})])}}}),hh({schema:[br("dom")],name:"title"}),hh({factory:QX,schema:[br("dom")],name:"close"}),hh({factory:QX,schema:[br("dom")],name:"body"}),yh({factory:QX,schema:[br("dom")],name:"footer"}),bh({factory:{sketch:function(n,t){return ht(ht({},n),{dom:t.dom,components:t.components})}},schema:[Pr("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),Pr("components",[])],name:"blocker"})]),nY=function(n,t,e,o){var r=Sc("alloy.dialog.busy"),i=Sc("alloy.dialog.idle"),u=Td([Qx.config({mode:"special",onTab:function(){return St.some(!0)},onShiftTab:function(){return St.some(!0)}}),yw.config({})]),a=function(t){var e=n.lazySink(t).getOrDie(),a=qr(St.none()),c=o.blocker(),s=e.getSystem().build(ht(ht({},c),{components:c.components.concat([gf(t)]),behaviours:Td([yw.config({}),fw("dialog-blocker-events",[Oa(Ou(),function(){Qx.focusIn(t)}),va(i,function(){dc(t.element(),"aria-busy")&&(mc(t.element(),"aria-busy"),a.get().each(function(n){return cw.remove(t,n)}))}),va(r,function(n,e){cc(t.element(),"aria-busy","true");var o=e.event().getBusySpec();a.get().each(function(n){cw.remove(t,n)});var r=o(t,u),i=n.getSystem().build(r);a.set(St.some(i)),cw.append(t,gf(i)),i.hasConfigured(Qx)&&Qx.focusIn(i)})])])}));Ep(e,s),Qx.focusIn(t)},c=function(n){La(n.element()).each(function(t){n.getSystem().getByDom(t).each(function(n){Ap(n)})})},s=function(t){return Fh(t,n,"body")},f=function(t){return Fh(t,n,"footer")},l=function(n,t){aa(n,r,{getBusySpec:t})},d=function(n){ua(n,i)},m=Sc("modal-events"),g=ht(ht({},n.eventOrder),{"alloy.system.attached":[m].concat(n.eventOrder["alloy.system.attached"]||[])});return{uid:n.uid,dom:n.dom,components:t,apis:{show:a,hide:c,getBody:s,getFooter:f,setIdle:d,setBusy:l},eventOrder:g,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:Lv(n.modalBehaviours,[cw.config({}),Qx.config({mode:"cyclic",onEnter:n.onExecute,onEscape:n.onEscape,useTabstopAt:n.useTabstopAt}),fw(m,[_a(function(t){JX(t.element(),Fh(t,n,"title").element()),KX(t.element(),Fh(t,n,"body").element())})])])}},tY=Jh({name:"ModalDialog",configFields:$X(),partFields:ZX(),factory:nY,apis:{show:function(n,t){n.show(t)},hide:function(n,t){n.hide(t)},getBody:function(n,t){return n.getBody(t)},getFooter:function(n,t){return n.getFooter(t)},setBusy:function(n,t,e){n.setBusy(t,e)},setIdle:function(n,t){n.setIdle(t)}}}),eY=No([wr("type"),wr("name")].concat(cC)),oY=mr,rY=[Yo("name","name",oo(function(){return Sc("button-name")}),dr),Mr("icon"),Lr("align","end",["start","end"]),jr("primary",!1),jr("disabled",!1)],iY=o(rY,[wr("text")]),uY=o([Sr("type",["submit","cancel","custom"])],iY),aY=o([Sr("type",["menu"]),Mr("text"),Mr("tooltip"),Mr("icon"),Er("items",eY)],rY),cY=cr("type",{submit:uY,cancel:uY,custom:uY,menu:aY}),sY=[wr("type"),wr("text"),Sr("level",["info","warn","error","success"]),wr("icon"),Pr("url","")],fY=No(sY),lY=function(n){return[wr("type"),n]},dY=[wr("type"),wr("text"),jr("disabled",!1),jr("primary",!1),Yo("name","name",oo(function(){return Sc("button-name")}),dr),Mr("icon"),jr("borderless",!1)],mY=No(dY),gY=[wr("type"),wr("name"),wr("label"),jr("disabled",!1)],pY=No(gY),vY=mr,hY=[wr("type"),wr("name")],bY=hY.concat([Mr("label")]),yY=bY,xY=No(yY),wY=dr,SY=bY,kY=No(SY),CY=dr,OY=bY,_Y=No(OY),TY=Qo(),EY=function(n){return[wr("type"),xr("columns"),n]},BY=bY.concat([jr("sandboxed",!0)]),DY=No(BY),AY=dr,MY=bY.concat([Mr("inputMode"),Mr("placeholder"),jr("maximized",!1),jr("disabled",!1)]),FY=No(MY),IY=dr,RY=bY.concat([Tr("items",[wr("text"),wr("value")]),zr("size",1),jr("disabled",!1)]),VY=No(RY),PY=dr,HY=bY.concat([jr("constrain",!0),jr("disabled",!1)]),zY=No(HY),NY=No([wr("width"),wr("height")]),LY=bY.concat([Mr("placeholder"),jr("maximized",!1),jr("disabled",!1)]),jY=No(LY),UY=dr,WY=bY.concat([Lr("filetype","file",["image","media","file"]),Pr("disabled",!1)]),GY=No(WY),XY=No([wr("value"),Pr("meta",{})]),YY=hY.concat([Nr("tag","textarea"),wr("scriptId"),wr("scriptUrl"),Wr("settings",void 0)]),qY=hY.concat([Nr("tag","textarea"),Cr("init")]),KY=nr(function(n){return or("customeditor.old",zo(qY),n).orThunk(function(){return or("customeditor.new",zo(YY),n)})}),JY=dr,$Y=[wr("type"),wr("html"),Lr("presets","presentation",["presentation","document"])],QY=No($Y),ZY=bY.concat([yr("currentState",No([br("blob"),wr("url")]))]),nq=No(ZY),tq=bY.concat([Pr("columns","auto")]),eq=No(tq),oq=$o([wr("value"),wr("text"),wr("icon")]),rq=function(n){return[wr("type"),wr("label"),n]},iq=[wr("type"),Er("header",dr),Er("cells",Lo(dr))],uq=No(iq),aq=function(n){return Yo("items","items",to(),Lo(nr(function(t){return or("Checking item of "+n,cq,t).fold(function(n){return ve.error(ur(n))},function(n){return ve.value(n)})})))},cq=Zo(function(){return ar("type",{alertbanner:fY,bar:No(lY(aq("bar"))),button:mY,checkbox:pY,colorinput:xY,colorpicker:kY,dropzone:_Y,grid:No(EY(aq("grid"))),iframe:DY,input:FY,selectbox:VY,sizeinput:zY,textarea:jY,urlinput:GY,customeditor:KY,htmlpanel:QY,imagetools:nq,collection:eq,label:No(rq(aq("label"))),table:uq,panel:fq})}),sq=[wr("type"),Pr("classes",[]),Er("items",cq)],fq=No(sq),lq=[Yo("name","name",oo(function(){return Sc("tab-name")}),dr),wr("title"),Er("items",cq)],dq=[wr("type"),Tr("tabs",lq)],mq=No(dq),gq=iY,pq=cY,vq=No([wr("title"),yr("body",ar("type",{panel:fq,tabpanel:mq})),Nr("size","normal"),Er("buttons",pq),Pr("initialData",{}),Ur("onAction",ut),Ur("onChange",ut),Ur("onSubmit",ut),Ur("onClose",ut),Ur("onCancel",ut),Pr("onTabChange",ut)]),hq=function(n){return or("dialog",vq,n)},bq=function(n){return Et(n)?[n].concat(oe(ze(n),bq)):Bt(n)?oe(n,bq):[]},yq=function(n){return Tt(n.type)&&Tt(n.name)},xq={checkbox:vY,colorinput:wY,colorpicker:CY,dropzone:TY,input:IY,iframe:AY,sizeinput:NY,selectbox:PY,size:NY,textarea:UY,urlinput:XY,customeditor:JY,collection:oq,togglemenuitem:oY},wq=function(n){return St.from(xq[n.type])},Sq=function(n){return Jt(bq(n),yq)},kq=function(n){var t=Sq(n),e=oe(t,function(n){return wq(n).fold(function(){return[]},function(t){return[yr(n.name,t)]})});return No(e)},Cq=No(o([Sr("type",["cancel","custom"])],gq)),Oq=No([wr("title"),wr("url"),Ar("height"),Ar("width"),Ir("buttons",Cq),Ur("onAction",ut),Ur("onCancel",ut),Ur("onClose",ut),Ur("onMessage",ut)]),_q=function(n){return or("dialog",Oq,n)},Tq=function(n){var t=rr(hq(n)),e=kq(n),o=n.initialData;return{internalDialog:t,dataValidator:e,initialData:o}},Eq={open:function(n,t){var e=Tq(t);return n(e.internalDialog,e.initialData,e.dataValidator)},openUrl:function(n,t){var e=rr(_q(t));return n(e)},redial:function(n){return Tq(n)}},Bq=function(n){var t=[],e={};return Ae(n,function(n,o){n.fold(function(){t.push(o)},function(n){e[o]=n})}),t.length>0?ve.error(t):ve.value(e)},Dq=function(t,e){var o=zS(cF.sketch(function(n){return{dom:{tag:"div",classes:["tox-form"].concat(t.classes)},components:Xt(t.items,function(t){return LV(n,t,e)})}}));return{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[o.asSpec()]}],behaviours:Td([Qx.config({mode:"acyclic",useTabstopAt:dt(GF)}),yF.memento(o),IF.memento(o,{postprocess:function(t){return Bq(t).fold(function(t){return n.console.error(t),{}},function(n){return n})}})])}},Aq=function(n){return{uid:n.uid,dom:n.dom,components:n.components,events:Nw(n.action),behaviours:Lv(n.tabButtonBehaviours,[yw.config({}),Qx.config({mode:"execution",useSpace:!0,useEnter:!0}),Hv.config({store:{mode:"memory",initialValue:n.value}})]),domModification:n.domModification}},Mq=Kh({name:"TabButton",configFields:[Pr("uid",void 0),br("value"),Yo("dom","dom",ro(function(){return{attributes:{role:"tab",id:Sc("aria"),"aria-selected":"false"}}}),sr()),Br("action"),Pr("domModification",{}),zv("tabButtonBehaviours",[yw,Qx,Hv]),br("view")],factory:Aq}),Fq=ft([br("tabs"),br("dom"),Pr("clickToDismiss",!1),zv("tabbarBehaviours",[Ob,Qx]),Tl(["tabClass","selectedClass"])]),Iq=xh({factory:Mq,name:"tabs",unit:"tab",overrides:function(n){var t=function(n,t){Ob.dehighlight(n,t),aa(n,oa(),{tabbar:n,button:t})},e=function(n,t){Ob.highlight(n,t),aa(n,ea(),{tabbar:n,button:t})};return{action:function(o){var r=o.getSystem().getByUid(n.uid).getOrDie(),i=Ob.isHighlighted(r,o),u=function(){return i&&n.clickToDismiss?t:i?ut:e}();u(r,o)},domModification:{classes:[n.markers.tabClass]}}}}),Rq=ft([Iq]),Vq=function(n,t){return{uid:n.uid,dom:n.dom,components:t,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:Lv(n.tabbarBehaviours,[Ob.config({highlightClass:n.markers.selectedClass,itemClass:n.markers.tabClass,onHighlight:function(n,t){cc(t.element(),"aria-selected","true")},onDehighlight:function(n,t){cc(t.element(),"aria-selected","false")}}),Qx.config({mode:"flow",getInitial:function(n){return Ob.getHighlighted(n).map(function(n){return n.element()})},selector:"."+n.markers.tabClass,executeOnMove:!0})])}},Pq=Jh({name:"Tabbar",configFields:Fq(),partFields:Rq(),factory:Vq}),Hq=function(n){return{uid:n.uid,dom:n.dom,behaviours:Lv(n.tabviewBehaviours,[cw.config({})]),domModification:{attributes:{role:"tabpanel"}}}},zq=Kh({name:"Tabview",configFields:[zv("tabviewBehaviours",[cw])],factory:Hq}),Nq=ft([Pr("selectFirst",!0),Bl("onChangeTab"),Bl("onDismissTab"),Pr("tabs",[]),zv("tabSectionBehaviours",[])]),Lq=hh({factory:Pq,schema:[br("dom"),_r("markers",[br("tabClass"),br("selectedClass")])],name:"tabbar",defaults:function(n){return{tabs:n.tabs}}}),jq=hh({factory:zq,name:"tabview"}),Uq=ft([Lq,jq]),Wq=function(n,t){var e=function(t){var e=Hv.getValue(t);Mh(t,n,"tabview").each(function(o){var r=ne(n.tabs,function(n){return n.value===e});r.each(function(e){var r=e.view();lc(t.element(),"id").each(function(n){cc(o.element(),"aria-labelledby",n)}),cw.set(o,r),n.onChangeTab(o,t,r)})})},o=function(t,e){Mh(t,n,"tabbar").each(function(n){e(n).each(ca)})};return{uid:n.uid,dom:n.dom,components:t,behaviours:Nv(n.tabSectionBehaviours),events:da(ee([n.selectFirst?[_a(function(n){o(n,Ob.getFirst)})]:[],[va(ea(),function(n,t){var o=t.event().button();e(o)}),va(oa(),function(t,e){var o=e.event().button();n.onDismissTab(t,o)})]])),apis:{getViewItems:function(t){return Mh(t,n,"tabview").map(function(n){return cw.contents(n)}).getOr([])},showTab:function(n,t){var e=function(n){var e=Ob.getCandidates(n),o=ne(e,function(n){return Hv.getValue(n)===t});return o.filter(function(t){return!Ob.isHighlighted(n,t)})};o(n,e)}}}},Gq=Jh({name:"TabSection",configFields:Nq(),partFields:Uq(),factory:Wq,apis:{getViewItems:function(n,t){return n.getViewItems(t)},showTab:function(n,t,e){n.showTab(t,e)}}}),Xq=function(n,t,e){return Xt(n,function(o,r){cw.set(e,n[r].view());var i=t.dom().getBoundingClientRect();return cw.set(e,[]),i.height})},Yq=function(n){return se(ce(n,function(n,t){return n>t?-1:t>n?1:0}))},qq=function(t,e,o){var r,i=za(t).dom(),u=rl(t,".tox-dialog-wrap").getOr(t),a="fixed"===Gs(u,"position");r=a?Math.max(i.clientHeight,n.window.innerHeight):Math.max(i.offsetHeight,i.scrollHeight);var c=vf(e),s=e.dom().offsetLeft>=o.dom().offsetLeft+Tf(o),f=s?Math.max(vf(o),c):c,l=parseInt(Gs(t,"margin-top"),10)||0,d=parseInt(Gs(t,"margin-bottom"),10)||0,m=vf(t)+l+d,g=m-f;return r-g},Kq=function(n,t){se(n).each(function(n){return Gq.showTab(t,n.value)})},Jq=function(n,t){js(n,"height",t+"px"),qi().browser.isIE()?Js(n,"flex-basis"):js(n,"flex-basis",t+"px")},$q=function(n,t,e){rl(n,'[role="dialog"]').each(function(n){il(n,'[role="tablist"]').each(function(o){e.get().map(function(e){return js(t,"height","0"),js(t,"flex-basis","0"),Math.min(e,qq(n,t,o))}).each(function(n){Jq(t,n)})})})},Qq=function(n){return il(n,'[role="tabpanel"]')},Zq=function(n){var t=function(){var t=qr(St.none()),e=[_a(function(e){var o=e.element();Qq(o).each(function(r){js(r,"visibility","hidden"),e.getSystem().getByDom(r).toOption().each(function(e){var o=Xq(n,r,e),i=Yq(o);t.set(i)}),$q(o,r,t),Js(r,"visibility"),Kq(n,e),VS.requestAnimationFrame(function(){$q(o,r,t)})})}),va(Ku(),function(n){var e=n.element();Qq(e).each(function(n){$q(e,n,t)})}),va(aB,function(n){var e=n.element();Qq(e).each(function(n){var o=Wd();js(n,"visibility","hidden");var r=Ys(n,"height").map(function(n){return parseInt(n,10)});Js(n,"height"),Js(n,"flex-basis");var i=n.dom().getBoundingClientRect().height,u=r.forall(function(n){return i>n});u?(t.set(St.from(i)),$q(e,n,t)):r.each(function(t){Jq(n,t)}),Js(n,"visibility"),o.each(Ld)})})],o=!1;return{extraEvents:e,selectFirst:o}}(),e=function(){var n=[],t=!0;return{extraEvents:n,selectFirst:t}}();return{smartTabHeight:t,naiveTabHeight:e}},nK="send-data-to-section",tK="send-data-to-view",eK=function(n,t){var e=qr({}),o=function(n){var t=Hv.getValue(n),o=Bq(t).getOr({}),r=e.get(),i=Ke(r,o);e.set(i)},r=function(n){var t=e.get();Hv.setValue(n,t)},i=qr(null),u=Xt(n.tabs,function(n){return{value:n.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"],innerHtml:t.shared.providers.translate(n.title)},view:function(){return[cF.sketch(function(e){return{dom:{tag:"div",classes:["tox-form"]},components:Xt(n.items,function(n){return LV(e,n,t)}),formBehaviours:Td([Qx.config({mode:"acyclic",useTabstopAt:dt(GF)}),fw("TabView.form.events",[_a(r),Ta(o)]),Pd.config({channels:lo([{key:nK,value:{onReceive:o}},{key:tK,value:{onReceive:r}}])})])}})]}}}),a=Zq(u).smartTabHeight;return Gq.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:function(n,t){var e=Hv.getValue(t);aa(n,uB,{name:e,oldName:i.get()}),i.set(e)},tabs:u,components:[Gq.parts().tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[Pq.parts().tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:Td([XE.config({})])}),Gq.parts().tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:a.selectFirst,tabSectionBehaviours:Td([fw("tabpanel",a.extraEvents),Qx.config({mode:"acyclic"}),ib.config({find:function(n){return se(Gq.getViewItems(n))}}),Hv.config({store:{mode:"manual",getValue:function(n){return n.getSystem().broadcastOn([nK],{}),e.get()},setValue:function(n,t){e.set(t),n.getSystem().broadcastOn([tK],{})}}})])})},oK=Sc("update-dialog"),rK=Sc("update-title"),iK=Sc("update-body"),uK=Sc("update-footer"),aK=Sc("body-send-message"),cK=function(n,t,e,o){var r=function(n){switch(n.body.type){case"tabpanel":return[eK(n.body,e)];default:return[Dq(n.body,e)]}},i=function(n,t){return St.some({isTabPanel:function(){return"tabpanel"===t.body.type}})},u={"aria-live":"polite"};return{dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:ht(ht({},t.map(function(n){return{id:n}}).getOr({})),o?u:{})},components:[],behaviours:Td([yF.childAt(0),uN.config({channel:iK,updateState:i,renderComponents:r,initialData:n})])}},sK=function(n,t,e,o){return cK(n,St.some(t),e,o)},fK=function(n,t){var e=cK(n,St.none(),t,!1);return tY.parts().body(e)},lK=function(n){var t={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[jF({dom:{tag:"iframe",attributes:{src:n.url}},behaviours:Td([XE.config({}),yw.config({})])})]}],behaviours:Td([Qx.config({mode:"acyclic",useTabstopAt:dt(GF)})])};return tY.parts().body(t)},dK=a_.deviceType.isTouch(),mK=function(n,t){return{dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[n,t]}},gK=function(n,t){return tY.parts().close(HS.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close")}},action:n,buttonBehaviours:Td([XE.config({})])}))},pK=function(){return tY.parts().title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}})},vK=function(n,t){return tY.parts().body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:MU("<p>"+t.translate(n)+"</p>")}]}]})},hK=function(n){return tY.parts().footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:n})},bK=function(n,t){return[VE.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:n}),VE.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:t})]},yK=function(n){var t,e="tox-dialog",r=e+"-wrap",i=r+"__backdrop",u=e+"__disable-scroll";return tY.sketch({lazySink:n.lazySink,onEscape:function(t){return n.onEscape(t),St.some(!0)},useTabstopAt:function(n){return!GF(n)},dom:{tag:"div",classes:[e].concat(n.extraClasses),styles:ht({position:"relative"},n.extraStyles)},components:o([n.header,n.body],n.footer.toArray()),parts:{blocker:{dom:MU('<div class="'+r+'"></div>'),components:[{dom:{tag:"div",classes:dK?[i,i+"--opaque"]:[i]}}]}},dragBlockClass:r,modalBehaviours:Td(o([yw.config({}),fw("dialog-events",n.dialogEvents.concat([Oa(Ou(),function(n){Qx.focusIn(n)})])),fw("scroll-lock",[_a(function(){ws(Hs(),u)}),Ta(function(){ks(Hs(),u)})])],n.extraBehaviours)),eventOrder:ht((t={},t[zu()]=["dialog-events"],t[Ju()]=["scroll-lock","dialog-events","alloy.base.behaviour"],t[$u()]=["alloy.base.behaviour","dialog-events","scroll-lock"],t),n.eventOrder)})},xK=function(n){return HS.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":n.translate("Close"),title:n.translate("Close")}},components:[{dom:{tag:"div",classes:["tox-icon"],innerHtml:'<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg"><path d="M17.953 7.453L13.422 12l4.531 4.547-1.406 1.406L12 13.422l-4.547 4.531-1.406-1.406L10.578 12 6.047 7.453l1.406-1.406L12 10.578l4.547-4.531z" fill-rule="evenodd"></path></svg>'}}],action:function(n){ua(n,tB)}})},wK=function(n,t,e){var o=function(n){return[ff(e.translate(n.title))]};return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:ht({},t.map(function(n){return{id:n}}).getOr({}))},components:o(n),behaviours:Td([uN.config({channel:rK,renderComponents:o})])}},SK=function(){return{dom:MU('<div class="tox-dialog__draghandle"></div>')}},kK=function(n,t,e){return VE.sketch({dom:MU('<div class="tox-dialog__header"></div>'),components:[wK(n,St.some(t),e),SK(),xK(e)],containerBehaviours:Td([RX.config({mode:"mouse",blockerClass:"blocker",getTarget:function(n){return ul(n,'[role="dialog"]').getOrDie()},snaps:{getSnapPoints:function(){return[]},leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])})},CK=function(n,t){var e=tY.parts().title(wK(n,St.none(),t)),o=tY.parts().draghandle(SK()),r=tY.parts().close(xK(t)),i=[e].concat(n.draggable?[o]:[]).concat([r]);return VE.sketch({dom:MU('<div class="tox-dialog__header"></div>'),components:i})},OK=function(n,t){return CK({title:t.shared.providers.translate(n),draggable:t.dialog.isDraggableModal()},t.shared.providers)},_K=function(n,t){return{onClose:function(){return t.closeWindow()},onBlock:function(t){tY.setBusy(n(),function(n,e){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:e,components:[{dom:MU('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}})},onUnblock:function(){tY.setIdle(n())}}},TK=function(n,t,e,r){var i,u=function(n,t){return St.some(t)};return mf(yK(ht(ht({},n),{lazySink:r.shared.getSink,extraBehaviours:o([uN.config({channel:oK,updateState:u,initialData:t}),IF.memory({})],n.extraBehaviours),onEscape:function(n){ua(n,tB)},dialogEvents:e,eventOrder:(i={},i[Hu()]=["reflecting","receiving"],i[Ju()]=["scroll-lock","reflecting","messages","dialog-events","alloy.base.behaviour"],i[$u()]=["alloy.base.behaviour","dialog-events","messages","reflecting","scroll-lock"],i)})))},EK=function(n){var t=function(n){var t=Xt(n.items,function(n){var t=qr(!1);return ht(ht({},n),{storage:t})});return ht(ht({},n),{items:t})};return Xt(n,function(n){return"menu"===n.type?t(n):n})},BK=function(n){return Qt(n,function(n,t){if("menu"===t.type){var e=t;return Qt(e.items,function(n,t){return n[t.name]=t.storage,n},n)}return n},{})},DK=function(n,t){return[Sa(Ou(),WF),n(nB,function(n,e){t.onClose(),e.onClose()}),n(tB,function(n,t,e,o){t.onCancel(n),ua(o,nB)}),va(iB,function(){return t.onUnblock()}),va(rB,function(n,e){return t.onBlock(e.event())})]},AK=function(n,t){var e=function(t,e){return va(t,function(t,o){r(t,function(r){e(n(),r,o.event(),t)})})},r=function(n,t){uN.getState(n).get().each(function(e){t(e,n)})};return o(DK(e,t),[e(eB,function(n,t,e){t.onAction(n,{name:e.name()})})])},MK=function(n,t,e){var r=function(t,e){return va(t,function(t,o){i(t,function(r){e(n(),r,o.event(),t)})})},i=function(n,t){uN.getState(n).get().each(function(e){t(e.internalDialog,n)})};return o(DK(r,t),[r(oB,function(n,t){return t.onSubmit(n)}),r(ZE,function(n,t,e){t.onChange(n,{name:e.name()})}),r(eB,function(n,t,o,r){var i=function(){return Qx.focusIn(r)},u=function(n){return dc(n,"disabled")||lc(n,"aria-disabled").exists(function(n){return"true"===n})},a=Wd();t.onAction(n,{name:o.name(),value:o.value()}),Wd().fold(i,function(n){u(n)?i():a.exists(function(t){return uu(n,t)&&u(t)})?i():e().toOption().filter(function(t){return!uu(t.element(),n)}).each(i)})}),r(uB,function(n,t,e){t.onTabChange(n,{newTabName:e.name(),oldTabName:e.oldName()})}),Ta(function(t){var e=n();Hv.setValue(t,e.getData())})])},FK={initUrlDialog:AK,initDialog:MK},IK=function(n,t){return XI(n,n.type,t)},RK=function(n,t,e){return ne(t,function(n){return n.name===e}).bind(function(t){return t.memento.getOpt(n)})},VK=function(n,t){var e=t.map(function(n){return n.footerButtons}).getOr([]),o=Kt(e,function(n){return"start"===n.align}),r=function(n,t){return VE.sketch({dom:{tag:"div",classes:["tox-dialog__footer-"+n]},components:Xt(t,function(n){return n.memento.asSpec()
})})},i=r("start",o.pass),u=r("end",o.fail);return[i,u]},PK=function(n,t){var e=function(n,e){var o=Xt(e.buttons,function(n){var e=zS(IK(n,t));return{name:n.name,align:n.align,memento:e}}),r=function(n,t){return RK(n,o,t)};return St.some({lookupByName:r,footerButtons:o})};return{dom:MU('<div class="tox-dialog__footer"></div>'),components:[],behaviours:Td([uN.config({channel:uK,initialData:n,updateState:e,renderComponents:VK})])}},HK=function(n,t){return PK(n,t)},zK=function(n,t){return tY.parts().footer(PK(n,t))},NK=function(n,t){var e=n.getRoot();if(e.getSystem().isConnected()){var o=ib.getCurrent(n.getFormWrapper()).getOr(n.getFormWrapper());return cF.getField(o,t).fold(function(){var e=n.getFooter(),r=uN.getState(e);return r.get().bind(function(n){return n.lookupByName(o,t)})},function(n){return St.some(n)})}return St.none()},LK=function(n,t){var e=n.getRoot();return uN.getState(e).get().map(function(n){return rr(or("data",n.dataValidator,t))}).getOr(t)},jK=function(n,t,e){var o=function(t){var e=n.getRoot();e.getSystem().isConnected()&&t(e)},r=function(){var t=n.getRoot(),o=t.getSystem().isConnected()?n.getFormWrapper():t,r=Hv.getValue(o),i=Me(e,function(n){return n.get()});return ht(ht({},r),i)},i=function(t){o(function(){var o=g.getData(),r=ht(ht({},o),t),i=LK(n,r),u=n.getFormWrapper();Hv.setValue(u,i),Ae(e,function(n,t){Le(r,t)&&n.set(r[t])})})},u=function(t){NK(n,t).each(eO.disable)},a=function(t){NK(n,t).each(eO.enable)},c=function(t){NK(n,t).each(yw.focus)},s=function(n){if(!Tt(n))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");o(function(t){aa(t,rB,{message:n})})},f=function(){o(function(n){ua(n,iB)})},l=function(t){o(function(){var e=n.getBody(),o=uN.getState(e);o.get().exists(function(n){return n.isTabPanel()})&&ib.getCurrent(e).each(function(n){Gq.showTab(n,t)})})},d=function(n){o(function(e){var o=t(n);e.getSystem().broadcastOn([oK],o),e.getSystem().broadcastOn([rK],o.internalDialog),e.getSystem().broadcastOn([iK],o.internalDialog),e.getSystem().broadcastOn([uK],o.internalDialog),g.setData(o.initialData)})},m=function(){o(function(n){ua(n,nB)})},g={getData:r,setData:i,disable:u,enable:a,focus:c,block:s,unblock:f,showTab:l,redial:d,close:m};return g},UK=function(n,t,e){var o=OK(n.internalDialog.title,e),r=fK({body:n.internalDialog.body},e),i=EK(n.internalDialog.buttons),u=BK(i),a=zK({buttons:i},e),c=FK.initDialog(function(){return m},_K(function(){return l},t),e.shared.getSink),s="normal"!==n.internalDialog.size?"large"===n.internalDialog.size?["tox-dialog--width-lg"]:["tox-dialog--width-md"]:[],f={header:o,body:r,footer:St.some(a),extraClasses:s,extraBehaviours:[],extraStyles:{}},l=TK(f,n,c,e),d=function(){var n=function(){var n=tY.getBody(l);return ib.getCurrent(n).getOr(n)};return{getRoot:function(){return l},getBody:function(){return tY.getBody(l)},getFooter:function(){return tY.getFooter(l)},getFormWrapper:n}}(),m=jK(d,t.redial,u);return{dialog:l,instanceApi:m}},WK=function(n,t,e,o){var r,i,u=Sc("dialog-label"),a=Sc("dialog-content"),c=function(n,t){return St.some(t)},s=zS(kK({title:n.internalDialog.title,draggable:!0},u,e.shared.providers)),f=zS(sK({body:n.internalDialog.body},a,e,o)),l=EK(n.internalDialog.buttons),d=BK(l),m=zS(HK({buttons:l},e)),g=FK.initDialog(function(){return v},{onBlock:function(){},onUnblock:function(){},onClose:function(){return t.closeWindow()}},e.shared.getSink),p=mf({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline"],attributes:(r={role:"dialog"},r["aria-labelledby"]=u,r["aria-describedby"]=""+a,r)},eventOrder:(i={},i[Hu()]=[uN.name(),Pd.name()],i[zu()]=["execute-on-form"],i[Ju()]=["reflecting","execute-on-form"],i),behaviours:Td([Qx.config({mode:"cyclic",onEscape:function(n){return ua(n,nB),St.some(!0)},useTabstopAt:function(n){return!GF(n)&&("button"!==Da(n)||"disabled"!==fc(n,"disabled"))}}),uN.config({channel:oK,updateState:c,initialData:n}),yw.config({}),fw("execute-on-form",g.concat([Oa(Ou(),function(n){Qx.focusIn(n)})])),IF.memory({})]),components:[s.asSpec(),f.asSpec(),m.asSpec()]}),v=jK({getRoot:function(){return p},getFooter:function(){return m.get(p)},getBody:function(){return f.get(p)},getFormWrapper:function(){var n=f.get(p);return ib.getCurrent(n).getOr(n)}},t.redial,d);return{dialog:p,instanceApi:v}},GK=tinymce.util.Tools.resolve("tinymce.util.URI"),XK=function(n){var t=function(t){n.getSystem().isConnected()&&t(n)},e=function(n){if(!Tt(n))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");t(function(t){aa(t,rB,{message:n})})},o=function(){t(function(n){ua(n,iB)})},r=function(){t(function(n){ua(n,nB)})},i=function(n){t(function(t){t.getSystem().broadcastOn([aK],n)})};return{block:e,unblock:o,close:r,sendMessage:i}},YK=["insertContent","setContent","execCommand","close","block","unblock"],qK=function(n){return Et(n)&&-1!==YK.indexOf(n.mceAction)},KK=function(n){return!qK(n)&&Et(n)&&Le(n,"mceAction")},JK=function(n,t,e){switch(e.mceAction){case"insertContent":n.insertContent(e.content);break;case"setContent":n.setContent(e.content);break;case"execCommand":var o=Dt(e.ui)?e.ui:!1;n.execCommand(e.cmd,o,e.value);break;case"close":t.close();break;case"block":t.block(e.message);break;case"unblock":t.unblock()}},$K=function(t,e,o,r){var i,u=OK(t.title,r),a=lK(t),c=t.buttons.bind(function(n){return 0===n.length?St.none():St.some(zK({buttons:n},r))}),s=FK.initUrlDialog(function(){return b},_K(function(){return h},e)),f=ht(ht({},t.height.fold(function(){return{}},function(n){return{height:n+"px","max-height":n+"px"}})),t.width.fold(function(){return{}},function(n){return{width:n+"px","max-width":n+"px"}})),l=t.width.isNone()&&t.height.isNone()?["tox-dialog--width-lg"]:[],d=new GK(t.url,{base_uri:new GK(n.window.location.href)}),m=d.protocol+"://"+d.host+(d.port?":"+d.port:""),g=qr(St.none()),p=[fw("messages",[_a(function(){var e=cE(ni.fromDom(n.window),"message",function(n){if(d.isSameOrigin(new GK(n.raw().origin))){var e=n.raw().data;qK(e)?JK(o,b,e):KK(e)&&t.onMessage(b,e)}});g.set(St.some(e))}),Ta(function(){g.get().each(function(n){return n.unbind()})})]),Pd.config({channels:(i={},i[aK]={onReceive:function(n,t){il(n.element(),"iframe").each(function(n){var e=n.dom().contentWindow;e.postMessage(t,m)})}},i)})],v={header:u,body:a,footer:c,extraClasses:l,extraBehaviours:p,extraStyles:f},h=TK(v,t,s,r),b=XK(h);return{dialog:h,instanceApi:b}},QK=function(n){var t=n.backstage.shared,e=function(e,o){var r=function(){tY.hide(c),o()},i=zS(XI({name:"close-alert",text:"OK",primary:!0,align:"end",disabled:!1,icon:St.none()},"cancel",n.backstage)),u=pK(),a=gK(r,t.providers),c=mf(yK({lazySink:function(){return t.getSink()},header:mK(u,a),body:vK(e,t.providers),footer:St.some(hK(bK([],[i.asSpec()]))),onEscape:r,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[va(tB,r)],eventOrder:{}}));tY.show(c);var s=i.get(c);yw.focus(s)};return{open:e}},ZK=function(n){var t=n.backstage.shared,e=function(e,o){var r=function(n){tY.hide(s),o(n)},i=zS(XI({name:"yes",text:"Yes",primary:!0,align:"end",disabled:!1,icon:St.none()},"submit",n.backstage)),u=XI({name:"no",text:"No",primary:!1,align:"end",disabled:!1,icon:St.none()},"cancel",n.backstage),a=pK(),c=gK(function(){return r(!1)},t.providers),s=mf(yK({lazySink:function(){return t.getSink()},header:mK(a,c),body:vK(e,t.providers),footer:St.some(hK(bK([],[u,i.asSpec()]))),onEscape:function(){return r(!1)},extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[va(tB,function(){return r(!1)}),va(oB,function(){return r(!0)})],eventOrder:{}}));tY.show(s);var f=i.get(s);yw.focus(f)};return{open:e}},nJ=function(n,t){return rr(or("data",t,n))},tJ=function(n){return lE(n,".tox-alert-dialog")||lE(n,".tox-confirm-dialog")},eJ=function(n,t,e){return t&&e?[]:[jj.config({contextual:{lazyContext:function(){return St.some($f(ni.fromDom(n.getContentAreaContainer())))},fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"]})]},oJ=function(n){var t=n.backstage,e=n.editor,r=AO(e),i=QK(n),u=ZK(n),a=function(n,e,o){return void 0!==e&&"toolbar"===e.inline?l(n,t.shared.anchors.inlineDialog(),o,e.ariaAttrs):void 0!==e&&"cursor"===e.inline?l(n,t.shared.anchors.cursor(),o,e.ariaAttrs):f(n,o)},c=function(n,t){return s(n,t)},s=function(n,o){var r=function(n){var r=$K(n,{closeWindow:function(){tY.hide(r.dialog),o(r.instanceApi)}},e,t);return tY.show(r.dialog),r.instanceApi};return Eq.openUrl(r,n)},f=function(n,e){var o=function(n,o,r){var i=o,u={dataValidator:r,initialData:i,internalDialog:n},a=UK(u,{redial:Eq.redial,closeWindow:function(){tY.hide(a.dialog),e(a.instanceApi)}},t);return tY.show(a.dialog),a.instanceApi.setData(i),a.instanceApi};return Eq.open(o,n)},l=function(n,i,u,a){var c=function(n,c,s){var f=nJ(c,s),l=dW(),d=t.shared.header.isPositionedAtTop(),m={dataValidator:s,initialData:f,internalDialog:n},g=function(){return l.on(function(n){CS.reposition(n),jj.refresh(n)})},p=WK(m,{redial:Eq.redial,closeWindow:function(){l.on(CS.hide),e.off("ResizeEditor",g),l.clear(),u(p.instanceApi)}},t,a),v=mf(CS.sketch(ht(ht({lazySink:t.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{}},d?{}:{fireRepositionEventInstead:{}}),{inlineBehaviours:Td(o([fw("window-manager-inline-events",[va(Qu(),function(){ua(p.dialog,tB)})])],eJ(e,r,d))),isExtraPart:function(n,t){return tJ(t)}})));return l.set(v),CS.showWithin(v,i,gf(p.dialog),St.some(Hs())),r&&d||(jj.refresh(v),e.on("ResizeEditor",g)),p.instanceApi.setData(f),Qx.focusIn(p.dialog),p.instanceApi};return Eq.open(c,n)},d=function(n,t){u.open(n,function(n){t(n)})},m=function(n,t){i.open(n,function(){t()})},g=function(n){n.close()};return{open:a,openUrl:c,alert:m,close:g,confirm:d}};rt()}(window)});
;/*!node_modules/tinymce/themes/silver/index.js*/
amis.define("node_modules/tinymce/themes/silver/index",function(e){e("node_modules/tinymce/themes/silver/theme")});
;/*!node_modules/tinymce/plugins/advlist/plugin.js*/
amis.define("node_modules/tinymce/plugins/advlist/plugin",function(){!function(){"use strict";function n(){t.add("advlist",function(n){var t=function(n,t){return-1!==e.inArray(n.getParam("plugins","","string").split(/[ ,]/),t)};t(n,"lists")&&(U(n),o(n))})}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.util.Tools"),r=function(n,t,e){var r="UL"===t?"InsertUnorderedList":"InsertOrderedList";n.execCommand(r,!1,e===!1?null:{"list-style-type":e})},o=function(n){n.addCommand("ApplyUnorderedListStyle",function(t,e){r(n,"UL",e["list-style-type"])}),n.addCommand("ApplyOrderedListStyle",function(t,e){r(n,"OL",e["list-style-type"])})},i=function(n){var t=n.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");return t?t.split(/[ ,]/):[]},u=function(n){var t=n.getParam("advlist_bullet_styles","default,circle,square");return t?t.split(/[ ,]/):[]},l=function(){},c=function(n){return function(){return n}},s=c(!1),f=c(!0),a=function(){return d},d=function(){var n=function(n){return n.isNone()},t=function(n){return n()},e=function(n){return n},r={fold:function(n){return n()},is:s,isSome:s,isNone:f,getOr:e,getOrThunk:t,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:c(null),getOrUndefined:c(void 0),or:e,orThunk:t,map:a,each:l,bind:a,exists:s,forall:f,filter:a,equals:n,equals_:n,toArray:function(){return[]},toString:c("none()")};return r}(),m=function(n){var t=c(n),e=function(){return o},r=function(t){return t(n)},o={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:f,isNone:s,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(t){return m(t(n))},each:function(t){t(n)},bind:r,exists:r,forall:r,filter:function(t){return t(n)?o:d},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(s,function(t){return e(n,t)})}};return o},g=function(n){return null===n||void 0===n?d:m(n)},p={some:m,none:a,from:g},v=function(n,t){return n.$.contains(n.getBody(),t)},y=function(n){return n&&/^(TH|TD)$/.test(n.nodeName)},O=function(n){return function(t){return t&&/^(OL|UL|DL)$/.test(t.nodeName)&&v(n,t)}},h=function(n){var t=n.dom.getParent(n.selection.getNode(),"ol,ul"),e=n.dom.getStyle(t,"listStyleType");return p.from(e)},L=function(n,t){for(var e=0;e<n.length;e++){var r=n[e];if(t(r))return e}return-1},N=function(n){return n.replace(/\-/g," ").replace(/\b\w/g,function(n){return n.toUpperCase()})},S=function(n,t,r){var o=L(t.parents,y),i=-1!==o?t.parents.slice(0,o):t.parents,u=e.grep(i,O(n));return u.length>0&&u[0].nodeName===r},T=function(n,t,o,i,u,l){n.ui.registry.addSplitButton(t,{tooltip:o,icon:"OL"===u?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:function(n){var t=e.map(l,function(n){var t="OL"===u?"num":"bull",e="disc"===n||"decimal"===n?"default":n,r="default"===n?"":n,o=N(n);return{type:"choiceitem",value:r,icon:"list-"+t+"-"+e,text:o}});n(t)},onAction:function(){return n.execCommand(i)},onItemAction:function(t,e){r(n,u,e)},select:function(t){var e=h(n);return e.map(function(n){return t===n}).getOr(!1)},onSetup:function(t){var e=function(e){t.setActive(S(n,e,u))};return n.on("NodeChange",e),function(){return n.off("NodeChange",e)}}})},A=function(n,t,e,r,o){n.ui.registry.addToggleButton(t,{active:!1,tooltip:e,icon:"OL"===o?"ordered-list":"unordered-list",onSetup:function(t){var e=function(e){t.setActive(S(n,e,o))};return n.on("NodeChange",e),function(){return n.off("NodeChange",e)}},onAction:function(){return n.execCommand(r)}})},C=function(n,t,e,r,o,i){i.length>1?T(n,t,e,r,o,i):A(n,t,e,r,o)},U=function(n){C(n,"numlist","Numbered list","InsertOrderedList","OL",i(n)),C(n,"bullist","Bullet list","InsertUnorderedList","UL",u(n))};n()}()});
;/*!node_modules/tinymce/plugins/advlist/index.js*/
amis.define("node_modules/tinymce/plugins/advlist/index",function(i){i("node_modules/tinymce/plugins/advlist/plugin")});
;/*!node_modules/tinymce/plugins/autolink/plugin.js*/
amis.define("node_modules/tinymce/plugins/autolink/plugin",function(){!function(){"use strict";function t(){e.add("autolink",function(t){h(t)})}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.Env"),i=function(t){return t.getParam("autolink_pattern",/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@(?!.*@))(.+)$/i)},o=function(t){return t.getParam("default_link_target",!1)},r=function(t){return t.getParam("link_default_protocol","http","string")},a=function(t,e){return t===e||" "===t||160===t.charCodeAt(0)},d=function(t){g(t,-1,"(")},f=function(t){g(t,0,"")},s=function(t){g(t,-1,"")},l=function(t,e){if(0>e&&(e=0),3===t.nodeType){var n=t.data.length;e>n&&(e=n)}return e},u=function(t,e,n){1!==e.nodeType||e.hasChildNodes()?t.setStart(e,l(e,n)):t.setStartBefore(e)},c=function(t,e,n){1!==e.nodeType||e.hasChildNodes()?t.setEnd(e,l(e,n)):t.setEndAfter(e)},g=function(t,e,n){var d,f,s,l,g,h,m,C=i(t),y=o(t);if("A"!==t.selection.getNode().tagName){var v=t.selection.getRng().cloneRange();if(v.startOffset<5){if(g=v.endContainer.previousSibling,!g){if(!v.endContainer.firstChild||!v.endContainer.firstChild.nextSibling)return;g=v.endContainer.firstChild.nextSibling}if(h=g.length,u(v,g,h),c(v,g,h),v.endOffset<5)return;d=v.endOffset,f=g}else{if(f=v.endContainer,3!==f.nodeType&&f.firstChild){for(;3!==f.nodeType&&f.firstChild;)f=f.firstChild;3===f.nodeType&&(u(v,f,0),c(v,f,f.nodeValue.length))}d=1===v.endOffset?2:v.endOffset-1-e}var k=d;do u(v,f,d>=2?d-2:0),c(v,f,d>=1?d-1:0),d-=1,m=v.toString();while(" "!==m&&""!==m&&160!==m.charCodeAt(0)&&d-2>=0&&m!==n);a(v.toString(),n)?(u(v,f,d),c(v,f,k),d+=1):0===v.startOffset?(u(v,f,0),c(v,f,k)):(u(v,f,d),c(v,f,k)),l=v.toString(),"."===l.charAt(l.length-1)&&c(v,f,k-1),l=v.toString().trim();var p=l.match(C),w=r(t);p&&("www."===p[1]?p[1]=w+"://www.":/@$/.test(p[1])&&!/^mailto:/.test(p[1])&&(p[1]="mailto:"+p[1]),s=t.selection.getBookmark(),t.selection.setRng(v),t.execCommand("createlink",!1,p[1]+p[2]),y!==!1&&t.dom.setAttrib(t.selection.getNode(),"target",y),t.selection.moveToBookmark(s),t.nodeChanged())}},h=function(t){var e;return t.on("keydown",function(e){return 13===e.keyCode?s(t):void 0}),n.browser.isIE()?void t.on("focus",function(){if(!e){e=!0;try{t.execCommand("AutoUrlDetect",!1,!0)}catch(n){}}}):(t.on("keypress",function(e){return 41===e.keyCode?d(t):void 0}),void t.on("keyup",function(e){return 32===e.keyCode?f(t):void 0}))};t()}()});
;/*!node_modules/tinymce/plugins/autolink/index.js*/
amis.define("node_modules/tinymce/plugins/autolink/index",function(n){n("node_modules/tinymce/plugins/autolink/plugin")});
;/*!node_modules/tinymce/plugins/lists/plugin.js*/
amis.define("node_modules/tinymce/plugins/lists/plugin",function(){!function(n){"use strict";function e(){t.add("lists",function(n){return jo(n)===!1&&(Ko(n),Ho(n)),Vo(n),Wo(n),_o(n)})}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=function(){},o=function(n){return function(){return n}},i=function(n){return function(e){return!n(e)}},u=o(!1),a=o(!0),c=function(){return s},s=function(){var n=function(n){return n.isNone()},e=function(n){return n()},t=function(n){return n},i={fold:function(n){return n()},is:u,isSome:u,isNone:a,getOr:t,getOrThunk:e,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(void 0),or:t,orThunk:e,map:c,each:r,bind:c,exists:u,forall:a,filter:c,equals:n,equals_:n,toArray:function(){return[]},toString:o("none()")};return i}(),f=function(n){var e=o(n),t=function(){return i},r=function(e){return e(n)},i={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:a,isNone:u,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return f(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?i:s},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(u,function(e){return t(n,e)})}};return i},d=function(n){return null===n||void 0===n?s:f(n)},l={some:f,none:c,from:d},m=function(n){var e=typeof n;return null===n?"null":"object"===e&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":e},p=function(n){return function(e){return m(e)===n}},v=function(n){return function(e){return typeof e===n}},g=p("string"),h=p("array"),y=v("boolean"),S=v("function"),b=v("number"),C=Array.prototype.slice,N=Array.prototype.push,O=function(n,e){for(var t=n.length,r=new Array(t),o=0;t>o;o++){var i=n[o];r[o]=e(i,o)}return r},L=function(n,e){for(var t=0,r=n.length;r>t;t++){var o=n[t];e(o,t)}},w=function(n,e){for(var t=[],r=0,o=n.length;o>r;r++){var i=n[r];e(i,r)&&t.push(i)}return t},T=function(n,e){if(0===n.length)return[];for(var t=e(n[0]),r=[],o=[],i=0,u=n.length;u>i;i++){var a=n[i],c=e(a);c!==t&&(r.push(o),o=[]),t=c,o.push(a)}return 0!==o.length&&r.push(o),r},D=function(n,e,t){return L(n,function(n){t=e(t,n)}),t},k=function(n,e,t){for(var r=0,o=n.length;o>r;r++){var i=n[r];if(e(i,r))return l.some(i);if(t(i,r))break}return l.none()},x=function(n,e){return k(n,e,u)},A=function(n){for(var e=[],t=0,r=n.length;r>t;++t){if(!h(n[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+n);N.apply(e,n[t])}return e},E=function(n,e){return A(O(n,e))},B=function(n){var e=C.call(n,0);return e.reverse(),e},P=function(n){return 0===n.length?l.none():l.some(n[0])},R=function(n){return 0===n.length?l.none():l.some(n[n.length-1])},I=function(n,e,t){return 0!==(n.compareDocumentPosition(e)&t)},M=function(e,t){return I(e,t,n.Node.DOCUMENT_POSITION_CONTAINED_BY)},U=function(){return U=Object.assign||function(n){for(var e,t=1,r=arguments.length;r>t;t++){e=arguments[t];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])}return n},U.apply(this,arguments)},_=function(n){var e,t=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t||(t=!0,e=n.apply(null,r)),e}},F=function(n,e){for(var t=0;t<n.length;t++){var r=n[t];if(r.test(e))return r}return void 0},$=function(n,e){var t=F(n,e);if(!t)return{major:0,minor:0};var r=function(n){return Number(e.replace(t,"$"+n))};return q(r(1),r(2))},H=function(n,e){var t=String(e).toLowerCase();return 0===n.length?j():$(n,t)},j=function(){return q(0,0)},q=function(n,e){return{major:n,minor:e}},K={nu:q,detect:H,unknown:j},V="Edge",W="Chrome",Q="IE",X="Opera",z="Firefox",Y="Safari",G=function(){return J({current:void 0,version:K.unknown()})},J=function(n){var e=n.current,t=n.version,r=function(n){return function(){return e===n}};return{current:e,version:t,isEdge:r(V),isChrome:r(W),isIE:r(Q),isOpera:r(X),isFirefox:r(z),isSafari:r(Y)}},Z={unknown:G,nu:J,edge:o(V),chrome:o(W),ie:o(Q),opera:o(X),firefox:o(z),safari:o(Y)},ne="Windows",ee="iOS",te="Android",re="Linux",oe="OSX",ie="Solaris",ue="FreeBSD",ae="ChromeOS",ce=function(){return se({current:void 0,version:K.unknown()})},se=function(n){var e=n.current,t=n.version,r=function(n){return function(){return e===n}};return{current:e,version:t,isWindows:r(ne),isiOS:r(ee),isAndroid:r(te),isOSX:r(oe),isLinux:r(re),isSolaris:r(ie),isFreeBSD:r(ue),isChromeOS:r(ae)}},fe={unknown:ce,nu:se,windows:o(ne),ios:o(ee),android:o(te),linux:o(re),osx:o(oe),solaris:o(ie),freebsd:o(ue),chromeos:o(ae)},de=function(n,e,t,r){var i=n.isiOS()&&/ipad/i.test(t)===!0,u=n.isiOS()&&!i,a=n.isiOS()||n.isAndroid(),c=a||r("(pointer:coarse)"),s=i||!u&&a&&r("(min-device-width:768px)"),f=u||a&&!s,d=e.isSafari()&&n.isiOS()&&/safari/i.test(t)===!1,l=!f&&!s&&!d;return{isiPad:o(i),isiPhone:o(u),isTablet:o(s),isPhone:o(f),isTouch:o(c),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:o(d),isDesktop:o(l)}},le=function(n,e){var t=String(e).toLowerCase();return x(n,function(n){return n.search(t)})},me=function(n,e){return le(n,e).map(function(n){var t=K.detect(n.versionRegexes,e);return{current:n.name,version:t}})},pe=function(n,e){return le(n,e).map(function(n){var t=K.detect(n.versionRegexes,e);return{current:n.name,version:t}})},ve={detectBrowser:me,detectOs:pe},ge=function(n,e){return-1!==n.indexOf(e)},he=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,ye=function(n){return function(e){return ge(e,n)}},Se=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(n){return ge(n,"edge/")&&ge(n,"chrome")&&ge(n,"safari")&&ge(n,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,he],search:function(n){return ge(n,"chrome")&&!ge(n,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(n){return ge(n,"msie")||ge(n,"trident")}},{name:"Opera",versionRegexes:[he,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:ye("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:ye("firefox")},{name:"Safari",versionRegexes:[he,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(n){return(ge(n,"safari")||ge(n,"mobile/"))&&ge(n,"applewebkit")}}],be=[{name:"Windows",search:ye("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(n){return ge(n,"iphone")||ge(n,"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("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:ye("linux"),versionRegexes:[]},{name:"Solaris",search:ye("sunos"),versionRegexes:[]},{name:"FreeBSD",search:ye("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:ye("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Ce={browsers:o(Se),oses:o(be)},Ne=function(n,e){var t=Ce.browsers(),r=Ce.oses(),o=ve.detectBrowser(t,n).fold(Z.unknown,Z.nu),i=ve.detectOs(r,n).fold(fe.unknown,fe.nu),u=de(i,o,n,e);return{browser:o,os:i,deviceType:u}},Oe={detect:Ne},Le=function(e){return n.window.matchMedia(e).matches},we=_(function(){return Oe.detect(n.navigator.userAgent,Le)}),Te=function(){return we()},De=function(e,t){var r=t||n.document,o=r.createElement("div");if(o.innerHTML=e,!o.hasChildNodes()||o.childNodes.length>1)throw n.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return Ae(o.childNodes[0])},ke=function(e,t){var r=t||n.document,o=r.createElement(e);return Ae(o)},xe=function(e,t){var r=t||n.document,o=r.createTextNode(e);return Ae(o)},Ae=function(n){if(null===n||void 0===n)throw new Error("Node cannot be null or undefined");return{dom:o(n)}},Ee=function(n,e,t){var r=n.dom();return l.from(r.elementFromPoint(e,t)).map(Ae)},Be={fromHtml:De,fromTag:ke,fromText:xe,fromDom:Ae,fromPoint:Ee},Pe=1,Re=function(n,e){var t=n.dom();if(t.nodeType!==Pe)return!1;var r=t;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")},Ie=function(n,e){return n.dom()===e.dom()},Me=function(n,e){var t=n.dom(),r=e.dom();return t===r?!1:t.contains(r)},Ue=function(n,e){return M(n.dom(),e.dom())},_e=function(n,e){return Te().browser.isIE()?Ue(n,e):Me(n,e)},Fe=Re,$e=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),He=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),je=tinymce.util.Tools.resolve("tinymce.util.VK"),qe=function(n,e,t){return n.isSome()&&e.isSome()?l.some(t(n.getOrDie(),e.getOrDie())):l.none()},Ke=function(e,t){var r=t||n.document,o=r.createDocumentFragment();return L(e,function(n){o.appendChild(n.dom())}),Be.fromDom(o)},Ve=("undefined"!=typeof n.window?n.window:Function("return this;")(),function(n){var e=n.dom().nodeName;return e.toLowerCase()}),We=function(n){return n.dom().nodeType},Qe=function(n){return function(e){return We(e)===n}},Xe=Qe(Pe),ze=function(n){return l.from(n.dom().parentNode).map(Be.fromDom)},Ye=function(n){return O(n.dom().childNodes,Be.fromDom)},Ge=function(n,e){var t=n.dom().childNodes;return l.from(t[e]).map(Be.fromDom)},Je=function(n){return Ge(n,0)},Ze=function(n){return Ge(n,n.dom().childNodes.length-1)},nt=function(n,e){var t=ze(n);t.each(function(t){t.dom().insertBefore(e.dom(),n.dom())})},et=function(n,e){n.dom().appendChild(e.dom())},tt=function(n,e){L(e,function(e){nt(n,e)})},rt=function(n,e){L(e,function(e){et(n,e)})},ot=function(n){var e=n.dom();null!==e.parentNode&&e.parentNode.removeChild(e)},it=function(n,e,t){return n.fire("ListMutation",{action:e,element:t})},ut=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),at=tinymce.util.Tools.resolve("tinymce.util.Tools"),ct=function(n){return function(e){return e&&e.nodeName.toLowerCase()===n}},st=function(n){return function(e){return e&&n.test(e.nodeName)}},ft=function(n){return n&&3===n.nodeType},dt=st(/^(OL|UL|DL)$/),lt=st(/^(OL|UL)$/),mt=ct("ol"),pt=st(/^(LI|DT|DD)$/),vt=st(/^(DT|DD)$/),gt=st(/^(TH|TD)$/),ht=ct("br"),yt=function(n){return n.parentNode.firstChild===n},St=function(n,e){return e&&!!n.schema.getTextBlockElements()[e.nodeName]},bt=function(n,e){return n&&n.nodeName in e},Ct=function(n,e){return ht(e)&&n.isBlock(e.nextSibling)&&!ht(e.previousSibling)?!0:!1},Nt=function(n,e,t){var r=n.isEmpty(e);return t&&n.select("span[data-mce-type=bookmark]",e).length>0?!1:r},Ot=function(n,e){return n.isChildOf(e,n.getRoot())},Lt=function(n,e){var t=e||n.selection.getStart(!0);return n.dom.getParent(t,"OL,UL,DL",Et(n,t))},wt=function(n,e){return n&&1===e.length&&e[0]===n},Tt=function(n){return at.grep(n.querySelectorAll("ol,ul,dl"),function(n){return dt(n)})},Dt=function(n){var e=Lt(n),t=n.selection.getSelectedBlocks();return wt(e,t)?Tt(e):at.grep(t,function(n){return dt(n)&&e!==n})},kt=function(n,e){var t=at.map(e,function(e){var t=n.dom.getParent(e,"li,dd,dt",Et(n,e));return t?t:e});return ut.unique(t)},xt=function(n){var e=n.selection.getSelectedBlocks();return at.grep(kt(n,e),function(n){return pt(n)})},At=function(n){return w(xt(n),vt)},Et=function(n,e){var t=n.dom.getParents(e,"TD,TH"),r=t.length>0?t[0]:n.getBody();return r},Bt=function(n,e){var t=n.dom.getParents(e,"ol,ul",Et(n,e));return R(t)},Pt=function(n){var e=Bt(n,n.selection.getStart()),t=w(n.selection.getSelectedBlocks(),lt);return e.toArray().concat(t)},Rt=function(n){var e=Pt(n);return It(n,e)},It=function(n,e){var t=O(e,function(e){return Bt(n,e).getOr(e)});return ut.unique(t)},Mt=function(n){return n.getParam("lists_indent_on_tab",!0)},Ut=function(n){var e=n.getParam("forced_root_block","p");return e===!1?"":e===!0?"p":e},_t=function(n){return n.getParam("forced_root_block_attrs",{})},Ft=function(n,e){var t,r,o,i=n.dom,u=n.schema.getBlockElements(),a=i.createFragment(),c=Ut(n);if(c&&(r=i.create(c),r.tagName===c.toUpperCase()&&i.setAttribs(r,_t(n)),bt(e.firstChild,u)||a.appendChild(r)),e)for(;t=e.firstChild;){var s=t.nodeName;o||"SPAN"===s&&"bookmark"===t.getAttribute("data-mce-type")||(o=!0),bt(t,u)?(a.appendChild(t),r=null):c?(r||(r=i.create(c),a.appendChild(r)),r.appendChild(t)):a.appendChild(t)}return c?o||r.appendChild(i.create("br",{"data-mce-bogus":"1"})):a.appendChild(i.create("br")),a},$t=Object.keys,Ht=function(n,e){for(var t=$t(n),r=0,o=t.length;o>r;r++){var i=t[r],u=n[i];e(u,i)}},jt=function(n){return function(e,t){n[t]=e}},qt=function(n,e,t,r){var o={};return Ht(n,function(n,o){(e(n,o)?t:r)(n,o)}),o},Kt=function(n,e){var t={};return qt(n,e,jt(t),r),t},Vt=function(e,t,r){if(!(g(r)||y(r)||b(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+"")},Wt=function(n,e){var t=n.dom();Ht(e,function(n,e){Vt(t,e,n)})},Qt=function(n){return D(n.dom().attributes,function(n,e){return n[e.name]=e.value,n},{})},Xt=function(n){return void 0!==n.style&&S(n.style.getPropertyValue)},zt=(S(n.Element.prototype.attachShadow)&&S(n.Node.prototype.getRootNode),function(e,t,r){if(!g(r))throw n.console.error("Invalid call to CSS.set. Property ",t,":: Value ",r,":: Element ",e),new Error("CSS value must be a string: "+r);Xt(e)&&e.style.setProperty(t,r)}),Yt=function(n,e,t){var r=n.dom();zt(r,e,t)},Gt=function(n,e){return Be.fromDom(n.dom().cloneNode(e))},Jt=function(n){return Gt(n,!0)},Zt=function(n,e){var t=Be.fromTag(e),r=Qt(n);return Wt(t,r),t},nr=function(n,e){var t=Zt(n,e);nt(n,t);var r=Ye(n);return rt(t,r),ot(n),t},er=function(n,e){et(n.item,e.list)},tr=function(n){for(var e=1;e<n.length;e++)er(n[e-1],n[e])},rr=function(n,e){qe(R(n),P(e),er)},or=function(n,e){var t={list:Be.fromTag(e,n),item:Be.fromTag("li",n)};return et(t.list,t.item),t},ir=function(n,e,t){for(var r=[],o=0;t>o;o++)r.push(or(n,e.listType));return r},ur=function(n,e){for(var t=0;t<n.length-1;t++)Yt(n[t].item,"list-style-type","none");R(n).each(function(n){Wt(n.list,e.listAttributes),Wt(n.item,e.itemAttributes),rt(n.item,e.content)})},ar=function(n,e){Ve(n.list)!==e.listType&&(n.list=nr(n.list,e.listType)),Wt(n.list,e.listAttributes)},cr=function(n,e,t){var r=Be.fromTag("li",n);return Wt(r,e),rt(r,t),r},sr=function(n,e){et(n.list,e),n.item=e},fr=function(n,e,t){var r=e.slice(0,t.depth);return R(r).each(function(e){var r=cr(n,t.itemAttributes,t.content);sr(e,r),ar(e,t)}),r},dr=function(n,e,t){var r=ir(n,t,t.depth-e.length);return tr(r),ur(r,t),rr(e,r),e.concat(r)},lr=function(n,e){var t=D(e,function(e,t){return t.depth>e.length?dr(n,e,t):fr(n,e,t)},[]);return P(t).map(function(n){return n.list})},mr=function(n){return Fe(n,"OL,UL")},pr=function(n){return Je(n).map(mr).getOr(!1)},vr=function(n){return Ze(n).map(mr).getOr(!1)},gr=function(n){return n.depth>0},hr=function(n){return n.isSelected},yr=function(n){var e=Ye(n),t=vr(n)?e.slice(0,-1):e;return O(t,Jt)},Sr=function(n,e,t){return ze(n).filter(Xe).map(function(r){return{depth:e,dirty:!1,isSelected:t,content:yr(n),itemAttributes:Qt(n),listAttributes:Qt(r),listType:Ve(r)}})},br=function(n,e){switch(n){case"Indent":e.depth++;break;case"Outdent":e.depth--;break;case"Flatten":e.depth=0}e.dirty=!0},Cr=function(n,e){n.listType=e.listType,n.listAttributes=U({},e.listAttributes)},Nr=function(n){n.listAttributes=Kt(n.listAttributes,function(n,e){return"start"!==e})},Or=function(n,e){var t=n[e].depth,r=function(n){return n.depth===t&&!n.dirty},o=function(n){return n.depth<t};return k(B(n.slice(0,e)),r,o).orThunk(function(){return k(n.slice(e+1),r,o)})},Lr=function(n){return L(n,function(e,t){Or(n,t).fold(function(){e.dirty&&Nr(e)},function(n){return Cr(e,n)})}),n},wr=function(n){var e=n,t=function(){return e},r=function(n){e=n};return{get:t,set:r}},Tr=function(n,e,t,r){return Je(r).filter(mr).fold(function(){e.each(function(n){Ie(n.start,r)&&t.set(!0)});var o=Sr(r,n,t.get());e.each(function(n){Ie(n.end,r)&&t.set(!1)});var i=Ze(r).filter(mr).map(function(r){return Dr(n,e,t,r)}).getOr([]);return o.toArray().concat(i)},function(r){return Dr(n,e,t,r)})},Dr=function(n,e,t,r){return E(Ye(r),function(r){var o=mr(r)?Dr:Tr,i=n+1;return o(i,e,t,r)})},kr=function(n,e){var t=wr(!1),r=0;return O(n,function(n){return{sourceList:n,entries:Dr(r,e,t,n)}})},xr=function(n,e){var t=Lr(e);return O(t,function(e){var t=Ke(e.content);return Be.fromDom(Ft(n,t.dom()))})},Ar=function(n,e){var t=Lr(e);return lr(n.contentDocument,t).toArray()},Er=function(n,e){return E(T(e,gr),function(e){var t=P(e).map(gr).getOr(!1);return t?Ar(n,e):xr(n,e)})},Br=function(n,e){L(w(n,hr),function(n){return br(e,n)})},Pr=function(n){var e=O(xt(n),Be.fromDom);return qe(x(e,i(pr)),x(B(e),i(pr)),function(n,e){return{start:n,end:e}})},Rr=function(n,e,t){var r=kr(e,Pr(n));L(r,function(e){Br(e.entries,t);var r=Er(n,e.entries);L(r,function(e){it(n,"Indent"===t?"IndentList":"OutdentList",e.dom())}),tt(e.sourceList,r),ot(e.sourceList)})},Ir=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Mr=Ir.DOM,Ur=function(n,e,t){var r=function(n){at.each(o,function(e){n.parentNode.insertBefore(e,t.parentNode)}),Mr.remove(n)},o=Mr.select('span[data-mce-type="bookmark"]',e),i=Ft(n,t),u=Mr.createRng();u.setStartAfter(t),u.setEndAfter(e);for(var a=u.extractContents(),c=a.firstChild;c;c=c.firstChild)if("LI"===c.nodeName&&n.dom.isEmpty(c)){Mr.remove(c);break}n.dom.isEmpty(a)||Mr.insertAfter(a,e),Mr.insertAfter(i,e),Nt(n.dom,t.parentNode)&&r(t.parentNode),Mr.remove(t),Nt(n.dom,e)&&Mr.remove(e)},_r=function(n,e){Fe(e,"dd")?nr(e,"dt"):Fe(e,"dt")&&ze(e).each(function(t){return Ur(n,t.dom(),e.dom())})},Fr=function(n){Fe(n,"dt")&&nr(n,"dd")},$r=function(n,e,t){"Indent"===e?L(t,Fr):L(t,function(e){return _r(n,e)})},Hr=function(n,e){if(ft(n))return{container:n,offset:e};var t=$e.getNode(n,e);return ft(t)?{container:t,offset:e>=n.childNodes.length?t.data.length:0}:t.previousSibling&&ft(t.previousSibling)?{container:t.previousSibling,offset:t.previousSibling.data.length}:t.nextSibling&&ft(t.nextSibling)?{container:t.nextSibling,offset:0}:{container:n,offset:e}},jr=function(n){var e=n.cloneRange(),t=Hr(n.startContainer,n.startOffset);e.setStart(t.container,t.offset);var r=Hr(n.endContainer,n.endOffset);return e.setEnd(r.container,r.offset),e},qr=function(n,e){var t=O(Rt(n),Be.fromDom),r=O(At(n),Be.fromDom),o=!1;if(t.length||r.length){var i=n.selection.getBookmark();Rr(n,t,e),$r(n,e,r),n.selection.moveToBookmark(i),n.selection.setRng(jr(n.selection.getRng())),n.nodeChanged(),o=!0}return o},Kr=function(n){return qr(n,"Indent")},Vr=function(n){return qr(n,"Outdent")},Wr=function(n){return qr(n,"Flatten")},Qr=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),Xr=Ir.DOM,zr=function(n){var e={},t=function(t){var r,o,i;o=n[t?"startContainer":"endContainer"],i=n[t?"startOffset":"endOffset"],1===o.nodeType&&(r=Xr.create("span",{"data-mce-type":"bookmark"}),o.hasChildNodes()?(i=Math.min(i,o.childNodes.length-1),t?o.insertBefore(r,o.childNodes[i]):Xr.insertAfter(r,o.childNodes[i])):o.appendChild(r),o=r,i=0),e[t?"startContainer":"endContainer"]=o,e[t?"startOffset":"endOffset"]=i};return t(!0),n.collapsed||t(),e},Yr=function(n){function e(e){var t,r,o,i=function(n){for(var e=n.parentNode.firstChild,t=0;e;){if(e===n)return t;(1!==e.nodeType||"bookmark"!==e.getAttribute("data-mce-type"))&&t++,e=e.nextSibling}return-1};t=o=n[e?"startContainer":"endContainer"],r=n[e?"startOffset":"endOffset"],t&&(1===t.nodeType&&(r=i(t),t=t.parentNode,Xr.remove(o),!t.hasChildNodes()&&Xr.isBlock(t)&&t.appendChild(Xr.create("br"))),n[e?"startContainer":"endContainer"]=t,n[e?"startOffset":"endOffset"]=r)}e(!0),e();var t=Xr.createRng();return t.setStart(n.startContainer,n.startOffset),n.endContainer&&t.setEnd(n.endContainer,n.endOffset),jr(t)},Gr=function(n){switch(n){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}},Jr=function(n){return/\btox\-/.test(n.className)},Zr=function(n,e,t){return function(){var r=function(n){var r=k(n.parents,dt,gt).filter(function(n){return n.nodeName===e&&!Jr(n)}).isSome();t(r)};return n.on("NodeChange",r),function(){return n.off("NodeChange",r)}}},no=function(n,e,t){var r=t["list-style-type"]?t["list-style-type"]:null;n.setStyle(e,"list-style-type",r)},eo=function(n,e){at.each(e,function(e,t){n.setAttribute(t,e)})},to=function(n,e,t){eo(e,t["list-attributes"]),at.each(n.select("li",e),function(n){eo(n,t["list-item-attributes"])})},ro=function(n,e,t){no(n,e,t),to(n,e,t)},oo=function(n,e,t){at.each(t,function(t){var r;return n.setStyle(e,(r={},r[t]="",r))})},io=function(n,e,t,r){var o=e[t?"startContainer":"endContainer"],i=e[t?"startOffset":"endOffset"];for(1===o.nodeType&&(o=o.childNodes[Math.min(i,o.childNodes.length-1)]||o),!t&&ht(o.nextSibling)&&(o=o.nextSibling);o.parentNode!==r;){if(St(n,o))return o;if(/^(TD|TH)$/.test(o.parentNode.nodeName))return o;o=o.parentNode}return o},uo=function(n,e,t){for(var r,o=[],i=n.dom,u=io(n,e,!0,t),a=io(n,e,!1,t),c=[],s=u;s&&(c.push(s),s!==a);s=s.nextSibling);return at.each(c,function(e){if(St(n,e))return o.push(e),void(r=null);if(i.isBlock(e)||ht(e))return ht(e)&&i.remove(e),void(r=null);var u=e.nextSibling;return Qr.isBookmarkNode(e)&&(St(n,u)||!u&&e.parentNode===t)?void(r=null):(r||(r=i.create("p"),e.parentNode.insertBefore(r,e),o.push(r)),void r.appendChild(e))}),o},ao=function(n,e,t){var r=n.getStyle(e,"list-style-type"),o=t?t["list-style-type"]:"";return o=null===o?"":o,r===o},co=function(n,e,t){void 0===t&&(t={});var r=n.selection.getRng(),o="LI",i=Et(n,n.selection.getStart(!0)),u=n.dom;if("false"!==u.getContentEditable(n.selection.getNode())){e=e.toUpperCase(),"DL"===e&&(o="DT");var a=zr(r);at.each(uo(n,r,i),function(r){var i,a=r.previousSibling;a&&dt(a)&&a.nodeName===e&&ao(u,a,t)?(i=a,r=u.rename(r,o),a.appendChild(r)):(i=u.create(e),r.parentNode.insertBefore(i,r),i.appendChild(r),r=u.rename(r,o)),oo(u,r,["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"]),ro(u,i,t),po(n.dom,i)}),n.selection.setRng(Yr(a))}},so=function(n,e){return n&&e&&dt(n)&&n.nodeName===e.nodeName},fo=function(n,e,t){var r=n.getStyle(e,"list-style-type",!0),o=n.getStyle(t,"list-style-type",!0);return r===o},lo=function(n,e){return n.className===e.className},mo=function(n,e,t){return so(e,t)&&fo(n,e,t)&&lo(e,t)},po=function(n,e){var t,r;if(t=e.nextSibling,mo(n,e,t)){for(;r=t.firstChild;)e.appendChild(r);n.remove(t)}if(t=e.previousSibling,mo(n,e,t)){for(;r=t.lastChild;)e.insertBefore(r,e.firstChild);n.remove(t)}},vo=function(n,e,t,r){if(e.nodeName!==t){var o=n.dom.rename(e,t);ro(n.dom,o,r),it(n,Gr(t),o)}else ro(n.dom,e,r),it(n,Gr(t),e)},go=function(n,e,t,r,o){if(e.nodeName!==r||ho(o)){var i=zr(n.selection.getRng(!0));at.each([e].concat(t),function(e){vo(n,e,r,o)}),n.selection.setRng(Yr(i))}else Wr(n)},ho=function(n){return"list-style-type"in n},yo=function(n,e,t,r){if(e!==n.getBody())if(e)if(e.nodeName!==t||ho(r)||Jr(e)){var o=zr(n.selection.getRng(!0));ro(n.dom,e,r);var i=n.dom.rename(e,t);po(n.dom,i),n.selection.setRng(Yr(o)),it(n,Gr(t),i)}else Wr(n);else co(n,t,r),it(n,Gr(t),e)},So=function(n,e,t){var r=Lt(n),o=Dt(n);t=t?t:{},r&&o.length>0?go(n,r,o,e,t):yo(n,r,e,t)},bo=Ir.DOM,Co=function(n,e){var t,r=e.parentNode;"LI"===r.nodeName&&r.firstChild===e&&(t=r.previousSibling,t&&"LI"===t.nodeName?(t.appendChild(e),Nt(n,r)&&bo.remove(r)):bo.setStyle(r,"listStyleType","none")),dt(r)&&(t=r.previousSibling,t&&"LI"===t.nodeName&&t.appendChild(e))},No=function(n,e){at.each(at.grep(n.select("ol,ul",e)),function(e){Co(n,e)})},Oo=function(n,e,t,r){var o=e.startContainer,i=e.startOffset;if(ft(o)&&(t?i<o.data.length:i>0))return o;var u=n.schema.getNonEmptyElements();1===o.nodeType&&(o=$e.getNode(o,i));var a=new He(o,r);for(t&&Ct(n.dom,o)&&a.next();o=a[t?"next":"prev2"]();){if("LI"===o.nodeName&&!o.hasChildNodes())return o;if(u[o.nodeName])return o;if(ft(o)&&o.data.length>0)return o}},Lo=function(n,e){var t=e.childNodes;return 1===t.length&&!dt(t[0])&&n.isBlock(t[0])},wo=function(n,e){Lo(n,e)&&n.remove(e.firstChild,!0)},To=function(n,e,t){var r,o=Lo(n,t)?t.firstChild:t;if(wo(n,e),!Nt(n,e,!0))for(;r=e.firstChild;)o.appendChild(r)},Do=function(n,e,t){var r,o=e.parentNode;if(Ot(n,e)&&Ot(n,t)){dt(t.lastChild)&&(r=t.lastChild),o===t.lastChild&&ht(o.previousSibling)&&n.remove(o.previousSibling);var i=t.lastChild;i&&ht(i)&&e.hasChildNodes()&&n.remove(i),Nt(n,t,!0)&&n.$(t).empty(),To(n,e,t),r&&t.appendChild(r);var u=_e(Be.fromDom(t),Be.fromDom(e)),a=u?n.getParents(e,dt,t):[];n.remove(e),L(a,function(e){Nt(n,e)&&e!==n.getRoot()&&n.remove(e)})}},ko=function(n,e,t){n.dom.$(t).empty(),Do(n.dom,e,t),n.selection.setCursorLocation(t)},xo=function(n,e,t,r){var o=n.dom;if(o.isEmpty(r))ko(n,t,r);else{var i=zr(e);Do(o,t,r),n.selection.setRng(Yr(i))}},Ao=function(n,e,t,r){var o=zr(e);Do(n.dom,t,r);var i=Yr(o);n.selection.setRng(i)},Eo=function(n,e){var t=n.dom,r=n.selection,o=r.getStart(),i=Et(n,o),u=t.getParent(r.getStart(),"LI",i);if(u){var a=u.parentNode;if(a===n.getBody()&&Nt(t,a))return!0;var c=jr(r.getRng()),s=t.getParent(Oo(n,c,e,i),"LI",i);if(s&&s!==u)return n.undoManager.transact(function(){e?xo(n,c,s,u):yt(u)?Vr(n):Ao(n,c,u,s)}),!0;if(!s&&!e&&0===c.startOffset&&0===c.endOffset)return n.undoManager.transact(function(){Wr(n)}),!0}return!1},Bo=function(n,e,t){var r=n.getParent(e.parentNode,n.isBlock,t);n.remove(e),r&&n.isEmpty(r)&&n.remove(r)},Po=function(n,e){var t=n.dom,r=n.selection.getStart(),o=Et(n,r),i=t.getParent(r,t.isBlock,o);if(i&&t.isEmpty(i)){var u=jr(n.selection.getRng()),a=t.getParent(Oo(n,u,e,o),"LI",o);if(a)return n.undoManager.transact(function(){Bo(t,i,o),po(t,a.parentNode),n.selection.select(a,!0),n.selection.collapse(e)}),!0}return!1},Ro=function(n,e){return Eo(n,e)||Po(n,e)},Io=function(n){var e=n.selection.getStart(),t=Et(n,e),r=n.dom.getParent(e,"LI,DT,DD",t);return r||xt(n).length>0?(n.undoManager.transact(function(){n.execCommand("Delete"),No(n.dom,n.getBody())}),!0):!1},Mo=function(n,e){return n.selection.isCollapsed()?Ro(n,e):Io(n)},Uo=function(n){n.on("keydown",function(e){e.keyCode===je.BACKSPACE?Mo(n,!1)&&e.preventDefault():e.keyCode===je.DELETE&&Mo(n,!0)&&e.preventDefault()})},_o=function(n){return{backspaceDelete:function(e){Mo(n,e)}}},Fo=function(n){var e=n.dom,t=Lt(n);mt(t)&&n.windowManager.open({title:"List Properties",body:{type:"panel",items:[{type:"input",name:"start",label:"Start list at number",inputMode:"numeric"}]},initialData:{start:e.getAttrib(t,"start")||"1"},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(t){var r=t.getData();n.undoManager.transact(function(){e.setAttrib(Lt(n),"start","1"===r.start?"":r.start)}),t.close()}})},$o=function(n,e){return function(){var t=n.dom.getParent(n.selection.getStart(),"UL,OL,DL");return t&&t.nodeName===e}},Ho=function(n){n.on("BeforeExecCommand",function(e){var t=e.command.toLowerCase();"indent"===t?Kr(n):"outdent"===t&&Vr(n)}),n.addCommand("InsertUnorderedList",function(e,t){So(n,"UL",t)}),n.addCommand("InsertOrderedList",function(e,t){So(n,"OL",t)}),n.addCommand("InsertDefinitionList",function(e,t){So(n,"DL",t)}),n.addCommand("RemoveList",function(){Wr(n)}),n.addCommand("mceListProps",function(){Fo(n)}),n.addQueryStateHandler("InsertUnorderedList",$o(n,"UL")),n.addQueryStateHandler("InsertOrderedList",$o(n,"OL")),n.addQueryStateHandler("InsertDefinitionList",$o(n,"DL"))},jo=function(n){return/(^|[ ,])rtc([, ]|$)/.test(n.getParam("plugins","","string"))&&t.get("rtc")?!0:!1},qo=function(n){n.on("keydown",function(e){e.keyCode!==je.TAB||je.metaKeyPressed(e)||n.undoManager.transact(function(){(e.shiftKey?Vr(n):Kr(n))&&e.preventDefault()})})},Ko=function(n){Mt(n)&&qo(n),Uo(n)},Vo=function(n){var e=function(n,e){var t=n.getParam("plugins","","string");return-1!==at.inArray(t.split(/[ ,]/),e)},t=function(e){return function(){return n.execCommand(e)}};e(n,"advlist")||(n.ui.registry.addToggleButton("numlist",{icon:"ordered-list",active:!1,tooltip:"Numbered list",onAction:t("InsertOrderedList"),onSetup:function(e){return Zr(n,"OL",e.setActive)}}),n.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:!1,tooltip:"Bullet list",onAction:t("InsertUnorderedList"),onSetup:function(e){return Zr(n,"UL",e.setActive)}}))},Wo=function(n){var e={text:"List properties...",icon:"ordered-list",onAction:function(){return Fo(n)},onSetup:function(e){return Zr(n,"OL",function(n){return e.setDisabled(!n)})}};n.ui.registry.addMenuItem("listprops",e),n.ui.registry.addContextMenu("lists",{update:function(e){var t=Lt(n,e);return mt(t)?["listprops"]:[]}})};e()}(window)});
;/*!node_modules/tinymce/plugins/lists/index.js*/
amis.define("node_modules/tinymce/plugins/lists/index",function(i){i("node_modules/tinymce/plugins/lists/plugin")});
;/*!node_modules/tinymce/plugins/link/plugin.js*/
amis.define("node_modules/tinymce/plugins/link/plugin",function(){!function(n){"use strict";function t(){e.add("link",function(n){xe(n),be(n),Oe(n),we(n),he(n),ke(n),ye(n)})}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=tinymce.util.Tools.resolve("tinymce.util.VK"),o=function(n){var t=typeof n;return null===n?"null":"object"===t&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":t},i=function(n){return function(t){return o(t)===n}},u=function(n){return function(t){return typeof t===n}},a=function(n){return function(t){return n===t}},c=i("string"),l=i("array"),f=a(null),s=u("boolean"),g=u("function"),m=function(n){var t=n.getParam("link_assume_external_targets",!1);return s(t)&&t?1:!c(t)||"http"!==t&&"https"!==t?0:t},d=function(n){return n.getParam("link_context_toolbar",!1,"boolean")},h=function(n){return n.getParam("link_list")},v=function(n){return n.getParam("default_link_target")},p=function(n){return n.getParam("target_list",!0)},k=function(n){return n.getParam("rel_list",[],"array")},y=function(n){return n.getParam("link_class_list",[],"array")},x=function(n){return n.getParam("link_title",!0,"boolean")},b=function(n){return n.getParam("allow_unsafe_link_target",!1,"boolean")},O=function(n){return n.getParam("link_quicklink",!1,"boolean")},w=function(n){return n.getParam("link_default_protocol","http","string")},C=function(){},A=function(n){return function(){return n}},N=A(!1),_=A(!0),P=function(){return T},T=function(){var n=function(n){return n.isNone()},t=function(n){return n()},e=function(n){return n},r={fold:function(n){return n()},is:N,isSome:N,isNone:_,getOr:e,getOrThunk:t,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:A(null),getOrUndefined:A(void 0),or:e,orThunk:t,map:P,each:C,bind:P,exists:N,forall:_,filter:P,equals:n,equals_:n,toArray:function(){return[]},toString:A("none()")};return r}(),S=function(n){var t=A(n),e=function(){return o},r=function(t){return t(n)},o={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:_,isNone:N,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(t){return S(t(n))},each:function(t){t(n)},bind:r,exists:r,forall:r,filter:function(t){return t(n)?o:T},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(N,function(t){return e(n,t)})}};return o},D=function(n){return null===n||void 0===n?T:S(n)},L={some:S,none:P,from:D},M=Array.prototype.indexOf,R=Array.prototype.push,E=function(n,t){return M.call(n,t)},U=function(n,t){return E(n,t)>-1},q=function(n,t){for(var e=n.length,r=new Array(e),o=0;e>o;o++){var i=n[o];r[o]=t(i,o)}return r},K=function(n,t){for(var e=0,r=n.length;r>e;e++){var o=n[e];t(o,e)}},z=function(n,t,e){return K(n,function(n){e=t(e,n)}),e},I=function(n){for(var t=[],e=0,r=n.length;r>e;++e){if(!l(n[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+n);R.apply(t,n[e])}return t},j=function(n,t){return I(q(n,t))},B=function(n,t){for(var e=0;e<n.length;e++){var r=t(n[e],e);if(r.isSome())return r}return L.none()},V=function(n){for(var t=[],e=function(n){t.push(n)},r=0;r<n.length;r++)n[r].each(e);return t},F=tinymce.util.Tools.resolve("tinymce.util.Tools"),W=function(n){return c(n.value)?n.value:""},$=function(n,t){var e=[];return F.each(n,function(n){var r=c(n.text)?n.text:c(n.title)?n.title:"";if(void 0!==n.menu);else{var o=t(n);e.push({text:r,value:o})}}),e},H=function(n){return void 0===n&&(n=W),function(t){return L.from(t).map(function(t){return $(t,n)})}},G=function(n){return H(W)(n)},J=function(n,t){return function(e){return{name:n,type:"selectbox",label:t,items:e}}},X={sanitize:G,sanitizeWith:H,createUi:J,getValue:W},Q=function(){return Q=Object.assign||function(n){for(var t,e=1,r=arguments.length;r>e;e++){t=arguments[e];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o])}return n},Q.apply(this,arguments)},Y=Object.keys,Z=function(n,t){for(var e=Y(n),r=0,o=e.length;o>r;r++){var i=e[r],u=n[i];t(u,i)}},nt=function(n){return function(t,e){n[e]=t}},tt=function(n,t,e,r){var o={};return Z(n,function(n,o){(t(n,o)?e:r)(n,o)}),o},et=function(n,t){var e={};return tt(n,t,nt(e),C),e},rt=function(n){return/(^|[ ,])rtc([, ]|$)/.test(n.getParam("plugins","","string"))&&e.get("rtc")?!0:!1},ot=function(n){return/^\w+:/i.test(n)},it=function(n){var t=n.getAttribute("data-mce-href");return t?t:n.getAttribute("href")},ut=function(n,t){var e=["noopener"],r=n?n.split(/\s+/):[],o=function(n){return F.trim(n.sort().join(" "))},i=function(n){return n=u(n),n.length>0?n.concat(e):e},u=function(n){return n.filter(function(n){return-1===F.inArray(e,n)})},a=t?i(r):u(r);return a.length>0?o(a):""},at=function(n){return n.replace(/\uFEFF/g,"")},ct=function(n,t){return t=t||n.selection.getNode(),mt(t)?n.dom.select("a[href]",t)[0]:n.dom.getParent(t,"a[href]")},lt=function(n,t){var e=t?t.innerText||t.textContent:n.getContent({format:"text"});return at(e)},ft=function(n){return n&&"A"===n.nodeName&&!!it(n)},st=function(n){return F.grep(n,ft).length>0},gt=function(n){return!/</.test(n)||/^<a [^>]+>[^<]+<\/a>$/.test(n)&&-1!==n.indexOf("href=")?!0:!1},mt=function(n){return n&&"FIGURE"===n.nodeName&&/\bimage\b/i.test(n.className)},dt=function(n){return z(["title","rel","class","target"],function(t,e){return n[e].each(function(n){t[e]=n.length>0?n:null}),t},{href:n.href})},ht=function(n,t){return"http"!==t&&"https"!==t||ot(n)?n:t+"://"+n},vt=function(n,t){var e=Q({},t);if(!(k(n).length>0)&&b(n)===!1){var r=ut(e.rel,"_blank"===e.target);e.rel=r?r:null}return L.from(e.target).isNone()&&p(n)===!1&&(e.target=v(n)),e.href=ht(e.href,m(n)),e},pt=function(n,t,e,r){e.each(function(n){t.hasOwnProperty("innerText")?t.innerText=n:t.textContent=n}),n.dom.setAttribs(t,r),n.selection.select(t)},kt=function(n,t,e,r){mt(t)?At(n,t,r):e.fold(function(){n.execCommand("mceInsertLink",!1,r)},function(t){n.insertContent(n.dom.createHTML("a",r,n.dom.encode(t)))})},yt=function(n,t,e){var r=n.selection.getNode(),o=ct(n,r),i=vt(n,dt(e));n.undoManager.transact(function(){e.href===t.href&&t.attach(),o?(n.focus(),pt(n,o,e.text,i)):kt(n,r,e.text,i)})},xt=function(n){n.undoManager.transact(function(){var t=n.selection.getNode();if(mt(t))Ct(n,t);else{var e=n.dom.getParent(t,"a[href]",n.getBody());e&&n.dom.remove(e,!0)}n.focus()})},bt=function(n){var t=n.class,e=n.href,r=n.rel,o=n.target,i=n.text,u=n.title;return et({"class":t.getOrNull(),href:e,rel:r.getOrNull(),target:o.getOrNull(),text:i.getOrNull(),title:u.getOrNull()},function(n){return f(n)===!1})},Ot=function(n,t,e){rt(n)?n.execCommand("createlink",!1,bt(e)):yt(n,t,e)},wt=function(n){rt(n)?n.execCommand("unlink"):xt(n)},Ct=function(n,t){var e=n.dom.select("img",t)[0];if(e){var r=n.dom.getParents(e,"a[href]",t)[0];r&&(r.parentNode.insertBefore(e,r),n.dom.remove(r))}},At=function(n,t,e){var r=n.dom.select("img",t)[0];if(r){var o=n.dom.create("a",e);r.parentNode.insertBefore(o,r),o.appendChild(r)}},Nt=function(n){var t=n,e=function(){return t},r=function(n){t=n};return{get:e,set:r}},_t=function(n,t){return B(t,function(t){return L.some(t).filter(function(t){return t.value===n})})},Pt=function(n,t,e,r){var o=r[t],i=n.length>0;return void 0!==o?_t(o,e).map(function(t){return{url:{value:t.value,meta:{text:i?n:t.text,attach:C}},text:i?n:t.text}}):L.none()},Tt=function(n,t){return"link"===t?n.catalogs.link:"anchor"===t?n.catalogs.anchor:L.none()},St=function(n,t){var e=Nt(n.text),r=function(n){if(e.get().length<=0){var t=void 0!==n.url.meta.text?n.url.meta.text:n.url.value,r=void 0!==n.url.meta.title?n.url.meta.title:"";return L.some({text:t,title:r})}return L.none()},o=function(n,r){var o=Tt(t,r.name).getOr([]);return Pt(e.get(),r.name,o,n)},i=function(n,t){return"url"===t.name?r(n()):U(["anchor","link"],t.name)?o(n(),t):"text"===t.name?(e.set(n().text),L.none()):L.none()};return{onChange:i}},Dt={init:St,getDelta:Pt},Lt=tinymce.util.Tools.resolve("tinymce.util.Delay"),Mt=tinymce.util.Tools.resolve("tinymce.util.Promise"),Rt=function(n,t,e){var r=n.selection.getRng();Lt.setEditorTimeout(n,function(){n.windowManager.confirm(t,function(t){n.selection.setRng(r),e(t)})})},Et=function(n){var t=n.href,e=t.indexOf("@")>0&&-1===t.indexOf("/")&&-1===t.indexOf("mailto:");return e?L.some({message:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",preprocess:function(n){return Q(Q({},n),{href:"mailto:"+t})}}):L.none()},Ut=function(n,t){return function(e){var r=e.href,o=1===n&&!ot(r)||0===n&&/^\s*www[\.|\d\.]/i.test(r);return o?L.some({message:"The URL you entered seems to be an external link. Do you want to add the required "+t+":// prefix?",preprocess:function(n){return Q(Q({},n),{href:t+"://"+r})}}):L.none()}},qt=function(n,t){return B([Et,Ut(m(n),w(n))],function(n){return n(t)}).fold(function(){return Mt.resolve(t)},function(e){return new Mt(function(r){Rt(n,e.message,function(n){r(n?e.preprocess(t):t)})})})},Kt={preprocess:qt},zt=function(n){var t=n.dom.select("a:not([href])"),e=j(t,function(n){var t=n.name||n.id;return t?[{text:t,value:"#"+t}]:[]});return e.length>0?L.some([{text:"None",value:""}].concat(e)):L.none()},It={getAnchors:zt},jt=function(n){var t=y(n);return t.length>0?X.sanitize(t):L.none()},Bt={getClasses:jt},Vt=tinymce.util.Tools.resolve("tinymce.util.XHR"),Ft=function(n){try{return L.some(JSON.parse(n))}catch(t){return L.none()}},Wt=function(n){var t=function(t){return n.convertURL(t.value||t.url,"href")},e=h(n);return new Mt(function(n){c(e)?Vt.send({url:e,success:function(t){return n(Ft(t))},error:function(){return n(L.none())}}):g(e)?e(function(t){return n(L.some(t))}):n(L.from(e))}).then(function(n){return n.bind(X.sanitizeWith(t)).map(function(n){return n.length>0?[{text:"None",value:""}].concat(n):n})})},$t={getLinks:Wt},Ht=function(n,t){var e=k(n);if(e.length>0){var r=t.is("_blank"),o=b(n)===!1,i=function(n){return ut(X.getValue(n),r)},u=o?X.sanitizeWith(i):X.sanitize;return u(e)}return L.none()},Gt={getRels:Ht},Jt=[{text:"Current window",value:""},{text:"New window",value:"_blank"}],Xt=function(n){var t=p(n);return l(t)?X.sanitize(t).orThunk(function(){return L.some(Jt)}):t===!1?L.none():L.some(Jt)},Qt={getTargets:Xt},Yt=function(n,t,e){var r=n.getAttrib(t,e);return null!==r&&r.length>0?L.some(r):L.none()},Zt=function(n,t){var e=n.dom,r=gt(n.selection.getContent()),o=r?L.some(lt(n.selection,t)):L.none(),i=t?L.some(e.getAttrib(t,"href")):L.none(),u=t?L.from(e.getAttrib(t,"target")):L.none(),a=Yt(e,t,"rel"),c=Yt(e,t,"class"),l=Yt(e,t,"title");return{url:i,text:o,title:l,target:u,rel:a,linkClass:c}},ne=function(n,t){return $t.getLinks(n).then(function(e){var r=Zt(n,t);return{anchor:r,catalogs:{targets:Qt.getTargets(n),rels:Gt.getRels(n,r.target),classes:Bt.getClasses(n),anchor:It.getAnchors(n),link:e},optNode:L.from(t),flags:{titleEnabled:x(n)}}})},te={collect:ne},ee=function(n,t){return function(e){var r=e.getData();if(!r.url.value)return wt(n),void e.close();var o=function(n){return L.from(r[n]).filter(function(e){return!t.anchor[n].is(e)})},i={href:r.url.value,text:o("text"),target:o("target"),rel:o("rel"),"class":o("linkClass"),title:o("title")},u={href:r.url.value,attach:void 0!==r.url.meta&&r.url.meta.attach?r.url.meta.attach:function(){}};Kt.preprocess(n,i).then(function(t){Ot(n,u,t)}),e.close()}},re=function(n){var t=ct(n);return te.collect(n,t)},oe=function(n,t){return{url:{value:n.anchor.url.getOr(""),meta:{attach:function(){},text:n.anchor.url.fold(function(){return""},function(){return n.anchor.text.getOr("")}),original:{value:n.anchor.url.getOr("")}}},text:n.anchor.text.getOr(""),title:n.anchor.title.getOr(""),anchor:n.anchor.url.getOr(""),link:n.anchor.url.getOr(""),rel:n.anchor.rel.getOr(""),target:n.anchor.target.or(t).getOr(""),linkClass:n.anchor.linkClass.getOr("")}},ie=function(n,t,e){var r=[{name:"url",type:"urlinput",filetype:"file",label:"URL"}],o=n.anchor.text.map(function(){return{name:"text",type:"input",label:"Text to display"}}).toArray(),i=n.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[],u=L.from(v(e)),a=oe(n,u),c=Dt.init(a,n),l=n.catalogs,f={type:"panel",items:I([r,o,i,V([l.anchor.map(X.createUi("anchor","Anchors")),l.rels.map(X.createUi("rel","Rel")),l.targets.map(X.createUi("target","Open link in...")),l.link.map(X.createUi("link","Link list")),l.classes.map(X.createUi("linkClass","Class"))])])};return{title:"Insert/Edit Link",size:"normal",body:f,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:a,onChange:function(n,t){var e=t.name;c.onChange(n.getData,{name:e}).each(function(t){n.setData(t)})},onSubmit:t}},ue=function(n){var t=re(n);t.then(function(t){var e=ee(n,t);return ie(t,e,n)}).then(function(t){n.windowManager.open(t)})},ae=function(t,e){n.document.body.appendChild(t),t.dispatchEvent(e),n.document.body.removeChild(t)},ce=function(t){var e=n.document.createElement("a");e.target="_blank",e.href=t,e.rel="noreferrer noopener";var r=n.document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,n.window,0,0,0,0,0,!1,!1,!1,!1,0,null),ae(e,r)},le=function(n,t){return n.dom.getParent(t,"a[href]")},fe=function(n){return le(n,n.selection.getStart())},se=function(n){return n.altKey===!0&&n.shiftKey===!1&&n.ctrlKey===!1&&n.metaKey===!1},ge=function(n,t){if(t){var e=it(t);if(/^#/.test(e)){var r=n.$(e);r.length&&n.selection.scrollIntoView(r[0],!0)}else ce(t.href)}},me=function(n){return function(){ue(n)}},de=function(n){return function(){ge(n,fe(n))}},he=function(n){n.on("click",function(t){var e=le(n,t.target);e&&r.metaKeyPressed(t)&&(t.preventDefault(),ge(n,e))}),n.on("keydown",function(t){var e=fe(n);e&&13===t.keyCode&&se(t)&&(t.preventDefault(),ge(n,e))})},ve=function(n){return function(t){var e=function(e){return t.setActive(!n.mode.isReadOnly()&&!!ct(n,e.element))};return n.on("NodeChange",e),function(){return n.off("NodeChange",e)}}},pe=function(n){return function(t){var e=n.dom.getParents(n.selection.getStart());t.setDisabled(!st(e));var r=function(n){return t.setDisabled(!st(n.parents))};return n.on("NodeChange",r),function(){return n.off("NodeChange",r)}}},ke=function(n){n.addCommand("mceLink",function(){O(n)?n.fire("contexttoolbar-show",{toolbarKey:"quicklink"}):me(n)()})},ye=function(n){n.addShortcut("Meta+K","",function(){n.execCommand("mceLink")})},xe=function(n){n.ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",onAction:me(n),onSetup:ve(n)}),n.ui.registry.addButton("openlink",{icon:"new-tab",tooltip:"Open link",onAction:de(n),onSetup:pe(n)}),n.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:function(){return wt(n)},onSetup:pe(n)})},be=function(n){n.ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:de(n),onSetup:pe(n)}),n.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onAction:me(n)}),n.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:function(){return wt(n)},onSetup:pe(n)})},Oe=function(n){var t="link unlink openlink",e="link";n.ui.registry.addContextMenu("link",{update:function(r){return st(n.dom.getParents(r,"a"))?t:e}})},we=function(n){var t=function(n){n.selection.collapse(!1)},e=function(t){var e=n.selection.getNode();return t.setDisabled(!ct(n,e)),function(){}};n.ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:ve(n)},label:"Link",predicate:function(t){return!!ct(n,t)&&d(n)},initValue:function(){var t=ct(n);return t?it(t):""},commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:!0,onSetup:function(t){var e=n.selection.getNode();return t.setActive(!!ct(n,e)),ve(n)(t)},onAction:function(e){var r=ct(n),o=e.getValue();if(r)n.undoManager.transact(function(){n.dom.setAttrib(r,"href",o),t(n),e.hide()});else{var i={href:o,attach:function(){}},u=gt(n.selection.getContent()),a=u?L.some(lt(n.selection,r)).filter(function(n){return n.length>0}).or(L.from(o)):L.none();Ot(n,i,{href:o,text:a,title:L.none(),rel:L.none(),target:L.none(),"class":L.none()}),e.hide()}}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:e,onAction:function(t){wt(n),t.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:e,onAction:function(t){de(n)(),t.hide()}}]})};t()}(window)});
;/*!node_modules/tinymce/plugins/link/index.js*/
amis.define("node_modules/tinymce/plugins/link/index",function(n){n("node_modules/tinymce/plugins/link/plugin")});
;/*!node_modules/tinymce/plugins/image/plugin.js*/
amis.define("node_modules/tinymce/plugins/image/plugin",function(){!function(e){"use strict";function t(t){var n=function(n,r,i,a){var o=new e.XMLHttpRequest;o.open("POST",t.url),o.withCredentials=t.credentials,o.upload.onprogress=function(e){a(e.loaded/e.total*100)},o.onerror=function(){i("Image upload failed due to a XHR Transport error. Code: "+o.status)},o.onload=function(){if(o.status<200||o.status>=300)return void i("HTTP Error: "+o.status);var e=JSON.parse(o.responseText);return e&&"string"==typeof e.location?void r(fn(t.basePath,e.location)):void i("Invalid JSON: "+o.responseText)};var u=new e.FormData;u.append("file",n.blob(),n.filename()),o.send(u)},r=function(e,t){return new F(function(n,r){try{t(e,n,r,i)}catch(a){r(a.message)}})},a=function(e){return e===n},o=function(e){return!t.url&&a(t.handler)?F.reject("Upload url missing from the settings."):r(e,t.handler)};return t=rn.extend({credentials:!1,handler:n},t),{upload:o}}function n(){r.add("image",function(e){ir(e),ar(e),tr(e)})}var r=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(){},a=function(e){return function(){return e}},o=a(!1),u=a(!0),s=function(){return c},c=function(){var e=function(e){return e.isNone()},t=function(e){return e()},n=function(e){return e},r={fold:function(e){return e()},is:o,isSome:o,isNone:u,getOr:n,getOrThunk:t,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:a(null),getOrUndefined:a(void 0),or:n,orThunk:t,map:s,each:i,bind:s,exists:o,forall:u,filter:s,equals:e,equals_:e,toArray:function(){return[]},toString:a("none()")};return r}(),l=function(e){var t=a(e),n=function(){return i},r=function(t){return t(e)},i={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:u,isNone:o,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return l(t(e))},each:function(t){t(e)},bind:r,exists:r,forall:r,filter:function(t){return t(e)?i:c},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(o,function(t){return n(e,t)})}};return i},m=function(e){return null===e||void 0===e?c:l(e)},d={some:l,none:s,from:m},f=function(e){var t=typeof e;return null===e?"null":"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},g=function(e){return function(t){return f(t)===e}},p=function(e){return function(t){return typeof t===e}},h=function(e){return function(t){return e===t}},b=g("string"),v=g("object"),y=g("array"),w=h(null),A=p("boolean"),D=p("number"),S=Array.prototype.push,T=function(e){for(var t=[],n=0,r=e.length;r>n;++n){if(!y(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);S.apply(t,e[n])}return t},x=function(e){return 0===e.length?d.none():d.some(e[0])},C=function(e,t){for(var n=0;n<e.length;n++){var r=t(e[n],n);if(r.isSome())return r}return d.none()},U=Object.prototype.hasOwnProperty,I=function(e,t){var n=v(e)&&v(t);return n?N(e,t):t},O=function(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={},i=0;i<t.length;i++){var a=t[i];for(var o in a)U.call(a,o)&&(r[o]=e(r[o],a[o]))}return r}},N=O(I),P=function(){return P=Object.assign||function(e){for(var t,n=1,r=arguments.length;r>n;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},P.apply(this,arguments)},L=("undefined"!=typeof e.window?e.window:Function("return this;")(),function(t,n,r){if(!(b(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(e,t,n){L(e.dom(),t,n)},E=function(e,t){e.dom().removeAttribute(t)},k=function(t,n){var r=n||e.document,i=r.createElement("div");if(i.innerHTML=t,!i.hasChildNodes()||i.childNodes.length>1)throw e.console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return R(i.childNodes[0])},z=function(t,n){var r=n||e.document,i=r.createElement(t);return R(i)},M=function(t,n){var r=n||e.document,i=r.createTextNode(t);return R(i)},R=function(e){if(null===e||void 0===e)throw new Error("Node cannot be null or undefined");return{dom:a(e)}},H=function(e,t,n){var r=e.dom();return d.from(r.elementFromPoint(t,n)).map(R)},j={fromHtml:k,fromTag:z,fromText:M,fromDom:R,fromPoint:H},B=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),F=tinymce.util.Tools.resolve("tinymce.util.Promise"),G=tinymce.util.Tools.resolve("tinymce.util.XHR"),W=function(e){return e.getParam("image_dimensions",!0,"boolean")},q=function(e){return e.getParam("image_advtab",!1,"boolean")},$=function(e){return e.getParam("image_uploadtab",!0,"boolean")},J=function(e){return e.getParam("image_prepend_url","","string")},X=function(e){return e.getParam("image_class_list")},V=function(e){return e.getParam("image_description",!0,"boolean")},K=function(e){return e.getParam("image_title",!1,"boolean")},Z=function(e){return e.getParam("image_caption",!1,"boolean")},Q=function(e){return e.getParam("image_list",!1)},Y=function(e){return!!tt(e)},et=function(e){return!!nt(e)},tt=function(e){return e.getParam("images_upload_url","","string")},nt=function(e){return e.getParam("images_upload_handler",void 0,"function")},rt=function(e){return e.getParam("images_upload_base_path",void 0,"string")},it=function(e){return e.getParam("images_upload_credentials",!1,"boolean")},at=function(e){return e.getParam("a11y_advanced_options",!1,"boolean")},ot=function(e){return e.getParam("automatic_uploads",!0,"boolean")},ut=function(e,t){return Math.max(parseInt(e,10),parseInt(t,10))},st=function(t){return new F(function(n){var r=e.document.createElement("img"),i=function(e){r.parentNode&&r.parentNode.removeChild(r),n(e)};r.onload=function(){var e=ut(r.width,r.clientWidth),t=ut(r.height,r.clientHeight),n={width:e,height:t};i(F.resolve(n))},r.onerror=function(){i(F.reject("Failed to get image dimensions for: "+t))};var a=r.style;a.visibility="hidden",a.position="fixed",a.bottom=a.left="0px",a.width=a.height="auto",e.document.body.appendChild(r),r.src=t})},ct=function(e){return e&&(e=e.replace(/px$/,"")),e},lt=function(e){return e.length>0&&/^[0-9]+$/.test(e)&&(e+="px"),e},mt=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},dt=function(e,t){var n=Q(e);"string"==typeof n?G.send({url:n,success:function(e){t(JSON.parse(e))}}):"function"==typeof n?n(t):t(n)},ft=function(e,t,n){var r=function(){n.onload=n.onerror=null,e.selection&&(e.selection.select(n),e.nodeChanged())};n.onload=function(){t.width||t.height||!W(e)||e.dom.setAttribs(n,{width:String(n.clientWidth),height:String(n.clientHeight)}),r()},n.onerror=r},gt=function(t){return new F(function(n,r){var i=new e.FileReader;i.onload=function(){n(i.result)},i.onerror=function(){r(i.error.message)},i.readAsDataURL(t)})},pt=function(e){return"IMG"===e.nodeName&&(e.hasAttribute("data-mce-object")||e.hasAttribute("data-mce-placeholder"))},ht=B.DOM,bt=function(e){return e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?ct(e.style.marginLeft):""},vt=function(e){return e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?ct(e.style.marginTop):""},yt=function(e){return e.style.borderWidth?ct(e.style.borderWidth):""},wt=function(e,t){return e.hasAttribute(t)?e.getAttribute(t):""},At=function(e,t){return e.style[t]?e.style[t]:""},Dt=function(e){return null!==e.parentNode&&"FIGURE"===e.parentNode.nodeName},St=function(e,t,n){""===n?e.removeAttribute(t):e.setAttribute(t,n)},Tt=function(e){var t=ht.create("figure",{"class":"image"});ht.insertAfter(t,e),t.appendChild(e),t.appendChild(ht.create("figcaption",{contentEditable:"true"},"Caption")),t.contentEditable="false"},xt=function(e){var t=e.parentNode;ht.insertAfter(e,t),ht.remove(t)},Ct=function(e){Dt(e)?xt(e):Tt(e)},Ut=function(e,t){var n=e.getAttribute("style"),r=t(null!==n?n:"");r.length>0?(e.setAttribute("style",r),e.setAttribute("data-mce-style",r)):e.removeAttribute("style")},It=function(e,t){return function(e,n,r){e.style[n]?(e.style[n]=lt(r),Ut(e,t)):St(e,n,r)}},Ot=function(e,t){return e.style[t]?ct(e.style[t]):wt(e,t)},Nt=function(e,t){var n=lt(t);e.style.marginLeft=n,e.style.marginRight=n},Pt=function(e,t){var n=lt(t);e.style.marginTop=n,e.style.marginBottom=n},Lt=function(e,t){var n=lt(t);e.style.borderWidth=n},_t=function(e,t){e.style.borderStyle=t},Et=function(e){return At(e,"borderStyle")},kt=function(e){return"FIGURE"===e.nodeName},zt=function(e){return"IMG"===e.nodeName},Mt=function(e){return 0===ht.getAttrib(e,"alt").length&&"presentation"===ht.getAttrib(e,"role")},Rt=function(e){return Mt(e)?"":wt(e,"alt")},Ht=function(){return{src:"",alt:"",title:"",width:"",height:"","class":"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}},jt=function(t,n){var r=e.document.createElement("img");return St(r,"style",n.style),(bt(r)||""!==n.hspace)&&Nt(r,n.hspace),(vt(r)||""!==n.vspace)&&Pt(r,n.vspace),(yt(r)||""!==n.border)&&Lt(r,n.border),(Et(r)||""!==n.borderStyle)&&_t(r,n.borderStyle),t(r.getAttribute("style"))},Bt=function(t,n){var r=e.document.createElement("img");if(Jt(t,P(P({},n),{caption:!1}),r),Wt(r,n.alt,n.isDecorative),n.caption){var i=ht.create("figure",{"class":"image"});return i.appendChild(r),i.appendChild(ht.create("figcaption",{contentEditable:"true"},"Caption")),i.contentEditable="false",i}return r},Ft=function(e,t){return{src:wt(t,"src"),alt:Rt(t),title:wt(t,"title"),width:Ot(t,"width"),height:Ot(t,"height"),"class":wt(t,"class"),style:e(wt(t,"style")),caption:Dt(t),hspace:bt(t),vspace:vt(t),border:yt(t),borderStyle:At(t,"borderStyle"),isDecorative:Mt(t)}},Gt=function(e,t,n,r,i){n[r]!==t[r]&&i(e,r,n[r])},Wt=function(e,t,n){if(n){ht.setAttrib(e,"role","presentation");var r=j.fromDom(e);_(r,"alt","")}else{if(w(t)){var r=j.fromDom(e);E(r,"alt")}else{var r=j.fromDom(e);_(r,"alt",t)}"presentation"===ht.getAttrib(e,"role")&&ht.setAttrib(e,"role","")}},qt=function(e,t,n){(n.alt!==t.alt||n.isDecorative!==t.isDecorative)&&Wt(e,n.alt,n.isDecorative)},$t=function(e,t){return function(n,r,i){e(n,i),Ut(n,t)}},Jt=function(e,t,n){var r=Ft(e,n);Gt(n,r,t,"caption",function(e){return Ct(e)}),Gt(n,r,t,"src",St),Gt(n,r,t,"title",St),Gt(n,r,t,"width",It("width",e)),Gt(n,r,t,"height",It("height",e)),Gt(n,r,t,"class",St),Gt(n,r,t,"style",$t(function(e,t){return St(e,"style",t)},e)),Gt(n,r,t,"hspace",$t(Nt,e)),Gt(n,r,t,"vspace",$t(Pt,e)),Gt(n,r,t,"border",$t(Lt,e)),Gt(n,r,t,"borderStyle",$t(_t,e)),qt(n,r,t)},Xt=function(e,t){var n=e.dom.styles.parse(t),r=mt(n),i=e.dom.styles.parse(e.dom.styles.serialize(r));return e.dom.styles.serialize(i)},Vt=function(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||pt(t))?null:t},Kt=function(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},Zt=function(e){var t=Vt(e);return t?Ft(function(t){return Xt(e,t)},t):Ht()},Qt=function(e,t){var n=Bt(function(t){return Xt(e,t)},t);e.dom.setAttrib(n,"data-mce-id","__mcenew"),e.focus(),e.selection.setContent(n.outerHTML);var r=e.dom.select('*[data-mce-id="__mcenew"]')[0];if(e.dom.setAttrib(r,"data-mce-id",null),kt(r)){var i=Kt(e,r);e.selection.select(i)}else e.selection.select(r)},Yt=function(e,t){e.dom.setAttrib(t,"src",t.getAttribute("src"))},en=function(e,t){if(t){var n=e.dom.is(t.parentNode,"figure.image")?t.parentNode:t;e.dom.remove(n),e.focus(),e.nodeChanged(),e.dom.isEmpty(e.getBody())&&(e.setContent(""),e.selection.setCursorLocation())}},tn=function(e,t){var n=Vt(e);if(Jt(function(t){return Xt(e,t)},t,n),Yt(e,n),kt(n.parentNode)){var r=n.parentNode;Kt(e,r),e.selection.select(n.parentNode)}else e.selection.select(n),ft(e,t,n)},nn=function(e,t){var n=Vt(e);if(n){var r=Ft(function(t){return Xt(e,t)},n),i=P(P({},r),t);i.src?tn(e,i):en(e,n)}else t.src&&Qt(e,P(P({},Ht()),t))},rn=tinymce.util.Tools.resolve("tinymce.util.Tools"),an=function(e){return b(e.value)?e.value:""},on=function(e,t){var n=[];return rn.each(e,function(e){var r=b(e.text)?e.text:b(e.title)?e.title:"";if(void 0!==e.menu){var i=on(e.menu,t);n.push({text:r,items:i})}else{var a=t(e);n.push({text:r,value:a})}}),n},un=function(e){return void 0===e&&(e=an),function(t){return t?d.from(t).map(function(t){return on(t,e)}):d.none()}},sn=function(e){return un(an)(e)},cn=function(e){return Object.prototype.hasOwnProperty.call(e,"items")},ln=function(e,t){return C(e,function(e){return cn(e)?ln(e.items,t):e.value===t?d.some(e):d.none()})},mn=function(e,t){return e.bind(function(e){return ln(e,t)})},dn={sanitizer:un,sanitize:sn,findEntry:mn},fn=function(e,t){return e?e.replace(/\/$/,"")+"/"+t.replace(/^\//,""):t},gn=function(){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"}]}]}]}},pn={makeTab:gn},hn=function(e){var t=dn.sanitizer(function(t){return e.convertURL(t.value||t.url,"src")}),n=new F(function(n){dt(e,function(e){n(t(e).map(function(e){return T([[{text:"None",value:""}],e])}))})}),r=dn.sanitize(X(e)),i=q(e),a=$(e),o=Y(e),u=et(e),s=Zt(e),c=V(e),l=K(e),m=W(e),f=Z(e),g=at(e),p=tt(e),h=rt(e),v=it(e),y=nt(e),w=ot(e),A=d.some(J(e)).filter(function(e){return b(e)&&e.length>0});return n.then(function(e){return{image:s,imageList:e,classList:r,hasAdvTab:i,hasUploadTab:a,hasUploadUrl:o,hasUploadHandler:u,hasDescription:c,hasImageTitle:l,hasDimensions:m,hasImageCaption:f,url:p,basePath:h,credentials:v,handler:y,prependURL:A,hasAccessibilityOptions:g,automaticUploads:w}})},bn=function(e){var t={name:"src",type:"urlinput",filetype:"image",label:"Source"},n=e.imageList.map(function(e){return{name:"images",type:"selectbox",label:"Image list",items:e}}),r={name:"alt",type:"input",label:"Alternative description",disabled:e.hasAccessibilityOptions&&e.image.isDecorative},i={name:"title",type:"input",label:"Image title"},a={name:"dimensions",type:"sizeinput"},o={type:"label",label:"Accessibility",items:[{name:"isDecorative",type:"checkbox",label:"Image is decorative"}]},u=e.classList.map(function(e){return{name:"classes",type:"selectbox",label:"Class",items:e}}),s={type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]};return T([[t],n.toArray(),e.hasAccessibilityOptions&&e.hasDescription?[o]:[],e.hasDescription?[r]:[],e.hasImageTitle?[i]:[],e.hasDimensions?[a]:[],[{type:"grid",columns:2,items:T([u.toArray(),e.hasImageCaption?[s]:[]])}]])},vn=function(e){return{title:"General",name:"general",items:bn(e)}},yn={makeTab:vn,makeItems:bn},wn=function(){var e=[{type:"dropzone",name:"fileinput"}];return{title:"Upload",name:"upload",items:e}},An={makeTab:wn},Dn=function(e){return{prevImage:dn.findEntry(e.imageList,e.image.src),prevAlt:e.image.alt,open:!0}},Sn=function(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:[],isDecorative:e.isDecorative}},Tn=function(e,t){return{src:e.src.value,alt:0===e.alt.length&&t?null: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,isDecorative:e.isDecorative}},xn=function(e,t){return/^(?:[a-zA-Z]+:)?\/\//.test(t)?d.none():e.prependURL.bind(function(e){return t.substring(0,e.length)!==e?d.some(e+t):d.none()})},Cn=function(e,t){var n=t.getData();xn(e,n.src.value).each(function(e){t.setData({src:{value:e,meta:n.src.meta}})})},Un=function(e,t,n){e.hasDescription&&b(n.alt)&&(t.alt=n.alt),e.hasAccessibilityOptions&&(t.isDecorative=n.isDecorative||t.isDecorative||!1),e.hasImageTitle&&b(n.title)&&(t.title=n.title),e.hasDimensions&&(b(n.width)&&(t.dimensions.width=n.width),b(n.height)&&(t.dimensions.height=n.height)),b(n.class)&&dn.findEntry(e.classList,n.class).each(function(e){t.classes=e.value}),e.hasImageCaption&&A(n.caption)&&(t.caption=n.caption),e.hasAdvTab&&(b(n.style)&&(t.style=n.style),b(n.vspace)&&(t.vspace=n.vspace),b(n.border)&&(t.border=n.border),b(n.hspace)&&(t.hspace=n.hspace),b(n.borderstyle)&&(t.borderstyle=n.borderstyle))},In=function(e,t){var n=t.getData(),r=n.src.meta;if(void 0!==r){var i=N({},n);Un(e,i,r),t.setData(i)}},On=function(e,t,n,r){var i=r.getData(),a=i.src.value,o=i.src.meta||{};o.width||o.height||!t.hasDimensions||e.imageSize(a).then(function(e){n.open&&r.setData({dimensions:e})})},Nn=function(e,t,n){var r=n.getData(),i=dn.findEntry(e.imageList,r.src.value);t.prevImage=i,n.setData({images:i.map(function(e){return e.value}).getOr("")})},Pn=function(e,t,n,r){Cn(t,r),In(t,r),On(e,t,n,r),Nn(t,n,r)},Ln=function(e,t,n,r){var i=r.getData(),a=dn.findEntry(t.imageList,i.images);a.each(function(e){var t=""===i.alt||n.prevImage.map(function(e){return e.text===i.alt}).getOr(!1);r.setData(t?""===e.value?{src:e,alt:n.prevAlt}:{src:e,alt:e.text}:{src:e})}),n.prevImage=a,Pn(e,t,n,r)},_n=function(e){var t=e["margin-top"]&&e["margin-bottom"]&&e["margin-top"]===e["margin-bottom"];return t?ct(String(e["margin-top"])):""},En=function(e){var t=e["margin-right"]&&e["margin-left"]&&e["margin-right"]===e["margin-left"];return t?ct(String(e["margin-right"])):""},kn=function(e){return e["border-width"]?ct(String(e["border-width"])):""},zn=function(e){return e["border-style"]?String(e["border-style"]):""},Mn=function(e,t,n){return t(e(t(n)))},Rn=function(e,t,n){var r=mt(e(n.style)),i=N({},n);return i.vspace=_n(r),i.hspace=En(r),i.border=kn(r),i.borderstyle=zn(r),i.style=Mn(e,t,r),i},Hn=function(e,t){var n=t.getData(),r=Rn(e.parseStyle,e.serializeStyle,n);t.setData(r)},jn=function(e,t,n){var r=N(Sn(t.image),n.getData()),i=jt(e.normalizeCss,Tn(r,!1));n.setData({style:i})},Bn=function(n,r,i,a){var o=a.getData();a.block("Uploading image"),x(o.fileinput).fold(function(){a.unblock()},function(o){var u=e.URL.createObjectURL(o),s=t({url:r.url,basePath:r.basePath,credentials:r.credentials,handler:r.handler}),c=function(){a.unblock(),e.URL.revokeObjectURL(u)},l=function(e){a.setData({src:{value:e,meta:{}}}),a.showTab("general"),Pn(n,r,i,a)};gt(o).then(function(e){var t=n.createBlobCache(o,u,e);r.automaticUploads?s.upload(t).then(function(e){l(e),c()}).catch(function(e){c(),n.alertErr(e)}):(n.addToBlobCache(t),l(t.blobUri()),a.unblock())})})},Fn=function(e,t,n){return function(r,i){"src"===i.name?Pn(e,t,n,r):"images"===i.name?Ln(e,t,n,r):"alt"===i.name?n.prevAlt=r.getData().alt:"style"===i.name?Hn(e,r):"vspace"===i.name||"hspace"===i.name||"border"===i.name||"borderstyle"===i.name?jn(e,t,r):"fileinput"===i.name?Bn(e,t,n,r):"isDecorative"===i.name&&(r.getData().isDecorative?r.disable("alt"):r.enable("alt"))}},Gn=function(e){return function(){e.open=!1}},Wn=function(e){if(e.hasAdvTab||e.hasUploadUrl||e.hasUploadHandler){var t={type:"tabpanel",tabs:T([[yn.makeTab(e)],e.hasAdvTab?[pn.makeTab(e)]:[],e.hasUploadTab&&(e.hasUploadUrl||e.hasUploadHandler)?[An.makeTab(e)]:[]])};return t}var n={type:"panel",items:yn.makeItems(e)};return n},qn=function(e){return function(t){var n=Dn(t);return{title:"Insert/Edit Image",size:"normal",body:Wn(t),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:Sn(t.image),onSubmit:e.onSubmit(t),onChange:Fn(e,t,n),onClose:Gn(n)}}},$n=function(e){return function(t){return function(n){var r=N(Sn(t.image),n.getData());e.execCommand("mceUpdateImage",!1,Tn(r,t.hasAccessibilityOptions)),e.editorUpload.uploadImagesAuto(),n.close()}}},Jn=function(e){return function(t){return st(e.documentBaseURI.toAbsolute(t)).then(function(e){return{width:String(e.width),height:String(e.height)}})}},Xn=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]})}},Vn=function(e){return function(t){e.editorUpload.blobCache.add(t)}},Kn=function(e){return function(t){e.windowManager.alert(t)}},Zn=function(e){return function(t){return Xt(e,t)}},Qn=function(e){return function(t){return e.dom.parseStyle(t)}},Yn=function(e){return function(t,n){return e.dom.serializeStyle(t,n)}},er=function(e){var t={onSubmit:$n(e),imageSize:Jn(e),addToBlobCache:Vn(e),createBlobCache:Xn(e),alertErr:Kn(e),normalizeCss:Zn(e),parseStyle:Qn(e),serializeStyle:Yn(e)},n=function(){return hn(e).then(qn(t)).then(function(t){return e.windowManager.open(t)})},r=function(){n()};return{open:n,openLater:r}},tr=function(e){e.addCommand("mceImage",er(e).openLater),e.addCommand("mceUpdateImage",function(t,n){e.undoManager.transact(function(){return nn(e,n)})})},nr=function(e){var t=e.attr("class");return t&&/\bimage\b/.test(t)},rr=function(e){return function(t){for(var n=t.length,r=function(t){t.attr("contenteditable",e?"true":null)};n--;){var i=t[n];nr(i)&&(i.attr("contenteditable",e?"false":null),rn.each(i.getAll("figcaption"),r))}}},ir=function(e){e.on("PreInit",function(){e.parser.addNodeFilter("figure",rr(!0)),e.serializer.addNodeFilter("figure",rr(!1))})},ar=function(e){e.ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:er(e).openLater,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:er(e).openLater}),e.ui.registry.addContextMenu("image",{update:function(e){return kt(e)||zt(e)&&!pt(e)?["image"]:[]}})};n()}(window)});
;/*!node_modules/tinymce/plugins/image/index.js*/
amis.define("node_modules/tinymce/plugins/image/index",function(e){e("node_modules/tinymce/plugins/image/plugin")});
;/*!node_modules/tinymce/plugins/charmap/plugin.js*/
amis.define("node_modules/tinymce/plugins/charmap/plugin",function(){!function(n){"use strict";function e(){r.add("charmap",function(n){var e=U(n);return G(n,e),W(n),Q(n,e[0]),D(n)})}var r=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(n,e){return n.fire("insertCustomChar",{chr:e})},a=function(n,e){var r=t(n,e).chr;n.execCommand("mceInsertContent",!1,r)},i=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=function(n){return n.getParam("charmap")},u=function(n){return n.getParam("charmap_append")},c=function(){},s=function(n){return function(){return n}},l=s(!1),g=s(!0),f=function(){return m},m=function(){var n=function(n){return n.isNone()},e=function(n){return n()},r=function(n){return n},t={fold:function(n){return n()},is:l,isSome:l,isNone:g,getOr:r,getOrThunk:e,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:s(null),getOrUndefined:s(void 0),or:r,orThunk:e,map:f,each:c,bind:f,exists:l,forall:g,filter:f,equals:n,equals_:n,toArray:function(){return[]},toString:s("none()")};return t}(),h=function(n){var e=s(n),r=function(){return a},t=function(e){return e(n)},a={fold:function(e,r){return r(n)},is:function(e){return n===e},isSome:g,isNone:l,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:r,orThunk:r,map:function(e){return h(e(n))},each:function(e){e(n)},bind:t,exists:t,forall:t,filter:function(e){return e(n)?a:m},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,r){return e.fold(l,function(e){return r(n,e)})}};return a},p=function(n){return null===n||void 0===n?m:h(n)},d={some:h,none:f,from:p},y=function(n){var e=typeof n;return null===n?"null":"object"===e&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":e},v=function(n){return function(e){return y(e)===n}},w=v("array"),b=Array.prototype.push,k=function(n,e){for(var r=n.length,t=new Array(r),a=0;r>a;a++){var i=n[a];t[a]=e(i,a)}return t},C=function(n,e){for(var r=0,t=n.length;t>r;r++){var a=n[r];e(a,r)}},x=function(n,e,r){for(var t=0,a=n.length;a>t;t++){var i=n[t];if(e(i,t))return d.some(i);if(r(i,t))break}return d.none()},A=function(n,e){return x(n,e,l)},O=function(n){for(var e=[],r=0,t=n.length;t>r;++r){if(!w(n[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+n);b.apply(e,n[r])}return e},q=function(n,e){return O(k(n,e))},S=i.isArray,T="User Defined",E=function(){return[{name:"Currency",characters:[[36,"dollar sign"],[162,"cent sign"],[8364,"euro sign"],[163,"pound sign"],[165,"yen sign"],[164,"currency sign"],[8352,"euro-currency sign"],[8353,"colon sign"],[8354,"cruzeiro sign"],[8355,"french franc sign"],[8356,"lira sign"],[8357,"mill sign"],[8358,"naira sign"],[8359,"peseta sign"],[8360,"rupee sign"],[8361,"won sign"],[8362,"new sheqel sign"],[8363,"dong sign"],[8365,"kip sign"],[8366,"tugrik sign"],[8367,"drachma sign"],[8368,"german penny symbol"],[8369,"peso sign"],[8370,"guarani sign"],[8371,"austral sign"],[8372,"hryvnia sign"],[8373,"cedi sign"],[8374,"livre tournois sign"],[8375,"spesmilo sign"],[8376,"tenge sign"],[8377,"indian rupee sign"],[8378,"turkish lira sign"],[8379,"nordic mark sign"],[8380,"manat sign"],[8381,"ruble sign"],[20870,"yen character"],[20803,"yuan character"],[22291,"yuan character, in hong kong and taiwan"],[22278,"yen/yuan character variant one"]]},{name:"Text",characters:[[169,"copyright sign"],[174,"registered sign"],[8482,"trade mark sign"],[8240,"per mille sign"],[181,"micro sign"],[183,"middle dot"],[8226,"bullet"],[8230,"three dot leader"],[8242,"minutes / feet"],[8243,"seconds / inches"],[167,"section sign"],[182,"paragraph sign"],[223,"sharp s / ess-zed"]]},{name:"Quotations",characters:[[8249,"single left-pointing angle quotation mark"],[8250,"single right-pointing angle quotation mark"],[171,"left pointing guillemet"],[187,"right pointing guillemet"],[8216,"left single quotation mark"],[8217,"right single quotation mark"],[8220,"left double quotation mark"],[8221,"right double quotation mark"],[8218,"single low-9 quotation mark"],[8222,"double low-9 quotation mark"],[60,"less-than sign"],[62,"greater-than sign"],[8804,"less-than or equal to"],[8805,"greater-than or equal to"],[8211,"en dash"],[8212,"em dash"],[175,"macron"],[8254,"overline"],[164,"currency sign"],[166,"broken bar"],[168,"diaeresis"],[161,"inverted exclamation mark"],[191,"turned question mark"],[710,"circumflex accent"],[732,"small tilde"],[176,"degree sign"],[8722,"minus sign"],[177,"plus-minus sign"],[247,"division sign"],[8260,"fraction slash"],[215,"multiplication sign"],[185,"superscript one"],[178,"superscript two"],[179,"superscript three"],[188,"fraction one quarter"],[189,"fraction one half"],[190,"fraction three quarters"]]},{name:"Mathematical",characters:[[402,"function / florin"],[8747,"integral"],[8721,"n-ary sumation"],[8734,"infinity"],[8730,"square root"],[8764,"similar to"],[8773,"approximately equal to"],[8776,"almost equal to"],[8800,"not equal to"],[8801,"identical to"],[8712,"element of"],[8713,"not an element of"],[8715,"contains as member"],[8719,"n-ary product"],[8743,"logical and"],[8744,"logical or"],[172,"not sign"],[8745,"intersection"],[8746,"union"],[8706,"partial differential"],[8704,"for all"],[8707,"there exists"],[8709,"diameter"],[8711,"backward difference"],[8727,"asterisk operator"],[8733,"proportional to"],[8736,"angle"]]},{name:"Extended Latin",characters:[[192,"A - grave"],[193,"A - acute"],[194,"A - circumflex"],[195,"A - tilde"],[196,"A - diaeresis"],[197,"A - ring above"],[256,"A - macron"],[198,"ligature AE"],[199,"C - cedilla"],[200,"E - grave"],[201,"E - acute"],[202,"E - circumflex"],[203,"E - diaeresis"],[274,"E - macron"],[204,"I - grave"],[205,"I - acute"],[206,"I - circumflex"],[207,"I - diaeresis"],[298,"I - macron"],[208,"ETH"],[209,"N - tilde"],[210,"O - grave"],[211,"O - acute"],[212,"O - circumflex"],[213,"O - tilde"],[214,"O - diaeresis"],[216,"O - slash"],[332,"O - macron"],[338,"ligature OE"],[352,"S - caron"],[217,"U - grave"],[218,"U - acute"],[219,"U - circumflex"],[220,"U - diaeresis"],[362,"U - macron"],[221,"Y - acute"],[376,"Y - diaeresis"],[562,"Y - macron"],[222,"THORN"],[224,"a - grave"],[225,"a - acute"],[226,"a - circumflex"],[227,"a - tilde"],[228,"a - diaeresis"],[229,"a - ring above"],[257,"a - macron"],[230,"ligature ae"],[231,"c - cedilla"],[232,"e - grave"],[233,"e - acute"],[234,"e - circumflex"],[235,"e - diaeresis"],[275,"e - macron"],[236,"i - grave"],[237,"i - acute"],[238,"i - circumflex"],[239,"i - diaeresis"],[299,"i - macron"],[240,"eth"],[241,"n - tilde"],[242,"o - grave"],[243,"o - acute"],[244,"o - circumflex"],[245,"o - tilde"],[246,"o - diaeresis"],[248,"o slash"],[333,"o macron"],[339,"ligature oe"],[353,"s - caron"],[249,"u - grave"],[250,"u - acute"],[251,"u - circumflex"],[252,"u - diaeresis"],[363,"u - macron"],[253,"y - acute"],[254,"thorn"],[255,"y - diaeresis"],[563,"y - macron"],[913,"Alpha"],[914,"Beta"],[915,"Gamma"],[916,"Delta"],[917,"Epsilon"],[918,"Zeta"],[919,"Eta"],[920,"Theta"],[921,"Iota"],[922,"Kappa"],[923,"Lambda"],[924,"Mu"],[925,"Nu"],[926,"Xi"],[927,"Omicron"],[928,"Pi"],[929,"Rho"],[931,"Sigma"],[932,"Tau"],[933,"Upsilon"],[934,"Phi"],[935,"Chi"],[936,"Psi"],[937,"Omega"],[945,"alpha"],[946,"beta"],[947,"gamma"],[948,"delta"],[949,"epsilon"],[950,"zeta"],[951,"eta"],[952,"theta"],[953,"iota"],[954,"kappa"],[955,"lambda"],[956,"mu"],[957,"nu"],[958,"xi"],[959,"omicron"],[960,"pi"],[961,"rho"],[962,"final sigma"],[963,"sigma"],[964,"tau"],[965,"upsilon"],[966,"phi"],[967,"chi"],[968,"psi"],[969,"omega"]]},{name:"Symbols",characters:[[8501,"alef symbol"],[982,"pi symbol"],[8476,"real part symbol"],[978,"upsilon - hook symbol"],[8472,"Weierstrass p"],[8465,"imaginary part"]]},{name:"Arrows",characters:[[8592,"leftwards arrow"],[8593,"upwards arrow"],[8594,"rightwards arrow"],[8595,"downwards arrow"],[8596,"left right arrow"],[8629,"carriage return"],[8656,"leftwards double arrow"],[8657,"upwards double arrow"],[8658,"rightwards double arrow"],[8659,"downwards double arrow"],[8660,"left right double arrow"],[8756,"therefore"],[8834,"subset of"],[8835,"superset of"],[8836,"not a subset of"],[8838,"subset of or equal to"],[8839,"superset of or equal to"],[8853,"circled plus"],[8855,"circled times"],[8869,"perpendicular"],[8901,"dot operator"],[8968,"left ceiling"],[8969,"right ceiling"],[8970,"left floor"],[8971,"right floor"],[9001,"left-pointing angle bracket"],[9002,"right-pointing angle bracket"],[9674,"lozenge"],[9824,"black spade suit"],[9827,"black club suit"],[9829,"black heart suit"],[9830,"black diamond suit"],[8194,"en space"],[8195,"em space"],[8201,"thin space"],[8204,"zero width non-joiner"],[8205,"zero width joiner"],[8206,"left-to-right mark"],[8207,"right-to-left mark"]]}]},P=function(n){return i.grep(n,function(n){return S(n)&&2===n.length})},I=function(n){return S(n)?[].concat(P(n)):"function"==typeof n?n():[]},N=function(n,e){var r=o(n);r&&(e=[{name:T,characters:I(r)}]);var t=u(n);if(t){var a=i.grep(e,function(n){return n.name===T});return a.length?(a[0].characters=[].concat(a[0].characters).concat(I(t)),e):[].concat(e).concat({name:T,characters:I(t)})}return e},U=function(n){var e=N(n,E());return e.length>1?[{name:"All",characters:q(e,function(n){return n.characters})}].concat(e):e},D=function(n){var e=function(){return U(n)},r=function(e){a(n,e)};return{getCharMap:e,insertChar:r}},z=function(n){var e=n,r=function(){return e},t=function(n){e=n};return{get:r,set:t}},L=function(e,r){var t=null,a=function(){null!==t&&(n.clearTimeout(t),t=null)},i=function(){for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];null!==t&&n.clearTimeout(t),t=n.setTimeout(function(){e.apply(null,a),t=null},r)};return{cancel:a,throttle:i}},M=String.fromCodePoint,j=function(n,e){return-1!==n.indexOf(e)},R=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];if(M)return M.apply(void 0,n);for(var r=[],t=0,a="",i=0,o=n.length;i!==o;++i){var u=+n[i];if(!(1114111>u&&u>>>0===u))throw RangeError("Invalid code point: "+u);65535>=u?t=r.push(u):(u-=65536,t=r.push((u>>10)+55296,u%1024+56320)),t>=16383&&(a+=String.fromCharCode.apply(null,r),r.length=0)}return a+String.fromCharCode.apply(null,r)},_=function(n,e,r){return j(R(n).toLowerCase(),r)?!0:j(e.toLowerCase(),r)||j(e.toLowerCase().replace(/\s+/g,""),r)},Y=function(n,e){var r=[],t=e.toLowerCase();return C(n.characters,function(n){_(n[0],n[1],t)&&r.push(n)}),k(r,function(n){return{text:n[1],value:R(n[0]),icon:R(n[0])}})},B="pattern",H=function(n,e){var r=function(){return[{label:"Search",type:"input",name:B},{type:"collection",name:"results"}]},t=function(){return k(e,function(n){return{title:n.name,name:n.name,items:r()}})},i=function(){return{type:"panel",items:r()}},o=function(){return{type:"tabpanel",tabs:t()}},u=z(1===e.length?T:"All"),c=function(n,r){A(e,function(n){return n.name===u.get()}).each(function(e){var t=Y(e,r);n.setData({results:t})})},s=40,l=L(function(n){var e=n.getData().pattern;c(n,e)},s),g=1===e.length?i():o(),f={pattern:"",results:Y(e[0],"")},m={title:"Special Character",size:"normal",body:g,buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:f,onAction:function(e,r){"results"===r.name&&(a(n,r.value),e.close())},onTabChange:function(n,e){u.set(e.newTabName),l.throttle(n)},onChange:function(n,e){e.name===B&&l.throttle(n)}},h=n.windowManager.open(m);h.focus(B)},G=function(n,e){n.addCommand("mceShowCharmap",function(){H(n,e)})},K=tinymce.util.Tools.resolve("tinymce.util.Promise"),Q=function(n,e){n.ui.registry.addAutocompleter("charmap",{ch:":",columns:"auto",minChars:2,fetch:function(n){return new K(function(r){r(Y(e,n))})},onAction:function(e,r,t){n.selection.setRng(r),n.insertContent(t),e.hide()}})},W=function(n){n.ui.registry.addButton("charmap",{icon:"insert-character",tooltip:"Special character",onAction:function(){return n.execCommand("mceShowCharmap")}}),n.ui.registry.addMenuItem("charmap",{icon:"insert-character",text:"Special character...",onAction:function(){return n.execCommand("mceShowCharmap")}})};e()}(window)});
;/*!node_modules/tinymce/plugins/charmap/index.js*/
amis.define("node_modules/tinymce/plugins/charmap/index",function(n){n("node_modules/tinymce/plugins/charmap/plugin")});
;/*!node_modules/tinymce/plugins/print/plugin.js*/
amis.define("node_modules/tinymce/plugins/print/plugin",function(){!function(){"use strict";function n(){t.add("print",function(n){e(n),o(n),n.addShortcut("Meta+P","","mcePrint")})}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=tinymce.util.Tools.resolve("tinymce.Env"),e=function(n){n.addCommand("mcePrint",function(){i.browser.isIE()?n.getDoc().execCommand("print",!1,null):n.getWin().print()})},o=function(n){n.ui.registry.addButton("print",{icon:"print",tooltip:"Print",onAction:function(){return n.execCommand("mcePrint")}}),n.ui.registry.addMenuItem("print",{text:"Print...",icon:"print",onAction:function(){return n.execCommand("mcePrint")}})};n()}()});
;/*!node_modules/tinymce/plugins/print/index.js*/
amis.define("node_modules/tinymce/plugins/print/index",function(n){n("node_modules/tinymce/plugins/print/plugin")});
;/*!node_modules/tinymce/plugins/preview/plugin.js*/
amis.define("node_modules/tinymce/plugins/preview/plugin",function(){!function(){"use strict";function e(){t.add("preview",function(e){l(e),y(e)})}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.Env"),i=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=function(e){return e.getParam("content_style","")},r=function(e){return e.getParam("content_css_cors",!1,"boolean")},a=function(e){var t=e.getParam("body_class","","hash");return t[e.id]||""},c=function(e){var t=e.getParam("body_class","","string");return-1===t.indexOf("=")?t:a(e)},s=function(e){var t=e.getParam("body_id","","hash");return t[e.id]||t},u=function(e){var t=e.getParam("body_id","tinymce","string");return-1===t.indexOf("=")?t:s(e)},d=function(e){var t="",a=e.dom.encode,s=o(e);t+='<base href="'+a(e.documentBaseURI.getURI())+'">',s&&(t+='<style type="text/css">'+s+"</style>");var d=r(e)?' crossorigin="anonymous"':"";i.each(e.contentCSS,function(n){t+='<link type="text/css" rel="stylesheet" href="'+a(e.documentBaseURI.toAbsolute(n))+'"'+d+">"});var m=u(e),l=c(e),y=n.mac?"e.metaKey":"e.ctrlKey && !e.altKey",v='<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A" && !('+y+")) {e.preventDefault();}}}, false);</script> ",f=e.getBody().dir,p=f?' dir="'+a(f)+'"':"",g="<!DOCTYPE html><html><head>"+t+'</head><body id="'+a(m)+'" class="mce-content-body '+a(l)+'"'+p+">"+e.getContent()+v+"</body></html>";return g},m=function(e){var t=d(e),n=e.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:t}});n.focus("close")},l=function(e){e.addCommand("mcePreview",function(){m(e)})},y=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()}()});
;/*!node_modules/tinymce/plugins/preview/index.js*/
amis.define("node_modules/tinymce/plugins/preview/index",function(e){e("node_modules/tinymce/plugins/preview/plugin")});
;/*!node_modules/tinymce/plugins/anchor/plugin.js*/
amis.define("node_modules/tinymce/plugins/anchor/plugin",function(){!function(){"use strict";function n(){t.add("anchor",function(n){s(n),u(n),m(n)})}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(n,t){return"A"===t.tagName&&""===n.dom.getAttrib(t,"href")},o=function(n){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(n)},i=function(n){var t=n.selection.getNode();return e(n,t)?t.getAttribute("id")||t.getAttribute("name"):""},r=function(n,t){var o=n.selection.getNode();e(n,o)?(o.removeAttribute("name"),o.id=t,n.undoManager.add()):(n.focus(),n.selection.collapse(!0),n.insertContent(n.dom.createHTML("a",{id:t})))},a=function(n,t){return o(t)?(r(n,t),!0):(n.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),!1)},c=function(n){var t=i(n);n.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){a(n,t.getData().id)&&t.close()}})},u=function(n){n.addCommand("mceAnchor",function(){c(n)})},d=function(n){return!n.attr("href")&&(n.attr("id")||n.attr("name"))&&!n.firstChild},l=function(n){return function(t){for(var e=0;e<t.length;e++)d(t[e])&&t[e].attr("contenteditable",n)}},s=function(n){n.on("PreInit",function(){n.parser.addNodeFilter("a",l("false")),n.serializer.addNodeFilter("a",l(null))})},m=function(n){n.ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:function(){return n.execCommand("mceAnchor")},onSetup:function(t){return n.selection.selectorChangedWithUnbind("a:not([href])",t.setActive).unbind}}),n.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:function(){return n.execCommand("mceAnchor")}})};n()}()});
;/*!node_modules/tinymce/plugins/anchor/index.js*/
amis.define("node_modules/tinymce/plugins/anchor/index",function(n){n("node_modules/tinymce/plugins/anchor/plugin")});
;/*!node_modules/tinymce/plugins/searchreplace/plugin.js*/
amis.define("node_modules/tinymce/plugins/searchreplace/plugin",function(){!function(e){"use strict";function n(e,n){var t=function(t){if(!e(t))throw new Error("Can only get "+n+" value of a "+n+" node");return r(t).getOr("")},r=function(n){return e(n)?p.from(n.dom().nodeValue):p.none()},o=function(t,r){if(!e(t))throw new Error("Can only set raw "+n+" value of a "+n+" node");t.dom().nodeValue=r};return{get:t,getOption:r,set:o}}function t(){o.add("searchreplace",function(e){var n=r({index:-1,count:0,text:"",matchCase:!1,wholeWord:!1,inSelection:!1});return tt(e,n),ot(e,n),Yn(e,n)})}var r=function(e){var n=e,t=function(){return n},r=function(e){n=e};return{get:t,set:r}},o=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(){return i=Object.assign||function(e){for(var n,t=1,r=arguments.length;r>t;t++){n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},i.apply(this,arguments)},a=function(){},u=function(e){return function(){return e}},c=u(!1),f=u(!0),l="[!-#%-*,-\\/:;?@\\[-\\]_{}¡«·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰෴๏๚๛༄-༒༺-༽྅࿐-࿔࿙࿚၊-၏჻፡-፨᐀᙭᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰⸱、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!----]_{}⦅-・]",s=u(l),d=function(){return m},m=function(){var e=function(e){return e.isNone()},n=function(e){return e()},t=function(e){return e},r={fold:function(e){return e()},is:c,isSome:c,isNone:f,getOr:t,getOrThunk:n,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:u(null),getOrUndefined:u(void 0),or:t,orThunk:n,map:d,each:a,bind:d,exists:c,forall:f,filter:d,equals:e,equals_:e,toArray:function(){return[]},toString:u("none()")};return r}(),h=function(e){var n=u(e),t=function(){return o},r=function(n){return n(e)},o={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:f,isNone:c,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return h(n(e))},each:function(n){n(e)},bind:r,exists:r,forall:r,filter:function(n){return n(e)?o:m},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(c,function(n){return t(e,n)})}};return o},g=function(e){return null===e||void 0===e?m:h(e)},p={some:h,none:d,from:g},v=s,y=tinymce.util.Tools.resolve("tinymce.util.Tools"),x=function(e){var n=typeof e;return null===e?"null":"object"===n&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===n&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":n},w=function(e){return function(n){return x(n)===e}},b=function(e){return function(n){return typeof n===e}},O=w("string"),C=w("array"),N=b("boolean"),T=b("function"),E=b("number"),k=Array.prototype.slice,S=Array.prototype.push,A=function(e,n){for(var t=e.length,r=new Array(t),o=0;t>o;o++){var i=e[o];r[o]=n(i,o)}return r},D=function(e,n){for(var t=0,r=e.length;r>t;t++){var o=e[t];n(o,t)}},M=function(e,n){for(var t=e.length-1;t>=0;t--){var r=e[t];n(r,t)}},B=function(e,n){if(0===e.length)return[];for(var t=n(e[0]),r=[],o=[],i=0,a=e.length;a>i;i++){var u=e[i],c=n(u);c!==t&&(r.push(o),o=[]),t=c,o.push(u)}return 0!==o.length&&r.push(o),r},F=function(e,n,t){return D(e,function(e){t=n(t,e)}),t},I=function(e){for(var n=[],t=0,r=e.length;r>t;++t){if(!C(e[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+e);S.apply(n,e[t])}return n},P=function(e,n){return I(A(e,n))},R=function(e,n){var t=k.call(e,0);return t.sort(n),t},W=Object.hasOwnProperty,j=function(e,n){return W.call(e,n)},_=("undefined"!=typeof e.window?e.window:Function("return this;")(),9),q=11,V=1,H=3,L=function(e){return e.dom().nodeType},U=function(e){return function(n){return L(n)===e}},$=U(H),z=function(n,t,r){if(!(O(r)||N(r)||E(r)))throw e.console.error("Invalid call to Attr.set. Key ",t,":: Value ",r,":: Element ",n),new Error("Attribute value was not simple");n.setAttribute(t,r+"")},G=function(e,n,t){z(e.dom(),n,t)},K=function(n,t){var r=t||e.document,o=r.createElement("div");if(o.innerHTML=n,!o.hasChildNodes()||o.childNodes.length>1)throw e.console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return X(o.childNodes[0])},J=function(n,t){var r=t||e.document,o=r.createElement(n);return X(o)},Q=function(n,t){var r=t||e.document,o=r.createTextNode(n);return X(o)},X=function(e){if(null===e||void 0===e)throw new Error("Node cannot be null or undefined");return{dom:u(e)}},Y=function(e,n,t){var r=e.dom();return p.from(r.elementFromPoint(n,t)).map(X)},Z={fromHtml:K,fromTag:J,fromText:Q,fromDom:X,fromPoint:Y},en=function(e,n,t){return 0!==(e.compareDocumentPosition(n)&t)},nn=function(n,t){return en(n,t,e.Node.DOCUMENT_POSITION_PRECEDING)},tn=function(e){return e.nodeType!==V&&e.nodeType!==_&&e.nodeType!==q||0===e.childElementCount},rn=function(n,t){var r=void 0===t?e.document:t.dom();return tn(r)?[]:A(r.querySelectorAll(n),Z.fromDom)},on=function(e){return p.from(e.dom().parentNode).map(Z.fromDom)},an=function(e){return A(e.dom().childNodes,Z.fromDom)},un=function(e,n){return{element:u(e),offset:u(n)}},cn=function(e,n){var t=an(e);return t.length>0&&n<t.length?un(t[n],0):un(e,n)},fn=function(e,n){var t=on(e);t.each(function(t){t.dom().insertBefore(n.dom(),e.dom())})},ln=function(e,n){e.dom().appendChild(n.dom())},sn=function(e,n){fn(e,n),ln(n,e)},dn=n($,"text"),mn=function(e){return dn.get(e)},hn=(T(e.Element.prototype.attachShadow)&&T(e.Node.prototype.getRootNode),function(e,n){return rn(n,e)}),gn=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),pn=function(e,n){return e.isBlock(n)||j(e.schema.getShortEndedElements(),n.nodeName)},vn=function(e,n){return"false"===e.getContentEditable(n)},yn=function(e,n){return"true"===e.getContentEditable(n)&&"false"===e.getContentEditableParent(n.parentNode)},xn=function(e,n){return!e.isBlock(n)&&j(e.schema.getWhiteSpaceElements(),n.nodeName)},wn=function(e,n){return pn(e,n)||vn(e,n)||xn(e,n)||yn(e,n)},bn=function(e){return 3===e.nodeType},On=function(){return{sOffset:0,fOffset:0,elements:[]}},Cn=function(e,n){return cn(Z.fromDom(e),n)},Nn=function(e,n,t,r,o,i){void 0===i&&(i=!0);for(var a=i?n(!1):t;a;){var u=vn(e,a);if(u||xn(e,a)){var c=u?r.cef(a):r.boundary(a);if(c)break;a=n(!0)}else{if(pn(e,a)){if(r.boundary(a))break}else bn(a)&&r.text(a);if(a===o)break;a=n(!1)}}},Tn=function(e,n,t,r,o){if(!wn(e,t)){var i=e.getParent(r,e.isBlock),a=new gn(t,i),u=o?a.next:a.prev;Nn(e,u,t,{boundary:f,cef:f,text:function(e){o?n.fOffset+=e.length:n.sOffset+=e.length,n.elements.push(Z.fromDom(e))}})}},En=function(e,n,t,r,o,i){void 0===i&&(i=!0);var a=new gn(t,n),u=[],c=On();Tn(e,c,t,n,!1);var f=function(){return c.elements.length>0&&(u.push(c),c=On()),!1};return Nn(e,a.next,t,{boundary:f,cef:function(e){return f(),o&&u.push.apply(u,o.cef(e)),!1},text:function(e){c.elements.push(Z.fromDom(e)),o&&o.text(e,c)}},r,i),r&&Tn(e,c,r,n,!0),f(),u},kn=function(e,n){var t=Cn(n.startContainer,n.startOffset),r=t.element().dom(),o=Cn(n.endContainer,n.endOffset),i=o.element().dom();return En(e,n.commonAncestorContainer,r,i,{text:function(e,n){e===i?n.fOffset+=e.length-o.offset():e===r&&(n.sOffset+=t.offset())},cef:function(n){var t=P(hn(Z.fromDom(n),"*[contenteditable=true]"),function(n){var t=n.dom();return En(e,t,t)});return R(t,function(e,n){return nn(e.elements[0].dom(),n.elements[0].dom())?1:-1})}},!1)},Sn=function(e,n){return n.collapsed?[]:kn(e,n)},An=function(e,n){var t=e.createRng();return t.selectNode(n),Sn(e,t)},Dn=function(e,n){return P(n,function(n){return An(e,n)})},Mn=function(e,n,t,r){void 0===t&&(t=0),void 0===r&&(r=e.length);var o=n.regex;o.lastIndex=t;for(var i,a=[];i=o.exec(e);){var u=i[n.matchIndex],c=i.index+i[0].indexOf(u),f=c+u.length;if(f>r)break;a.push({start:c,finish:f}),o.lastIndex=f}return a},Bn=function(e,n){var t=F(e,function(e,t){var r=mn(t),o=e.last,i=o+r.length,a=P(n,function(e,n){return e.start<i&&e.finish>o?[{element:t,start:Math.max(o,e.start)-o,finish:Math.min(i,e.finish)-o,matchId:n}]:[]});return{results:e.results.concat(a),last:i}},{results:[],last:0}).results;return B(t,function(e){return e.matchId})},Fn=function(e,n){return P(n,function(n){var t=n.elements,r=A(t,mn).join(""),o=Mn(r,e,n.sOffset,r.length-n.fOffset);return Bn(t,o)})},In=function(e,n){M(e,function(e,t){M(e,function(e){var r=Z.fromDom(n.cloneNode(!1));G(r,"data-mce-index",t);var o=e.element.dom();if(o.length===e.finish&&0===e.start)sn(e.element,r);else{o.length!==e.finish&&o.splitText(e.finish);var i=o.splitText(e.start);sn(Z.fromDom(i),r)}})})},Pn=function(e,n,t,r){var o=An(e,t),i=Fn(n,o);return In(i,r),i.length},Rn=function(e,n,t,r){var o=t.getBookmark(),i=e.select("td[data-mce-selected],th[data-mce-selected]"),a=i.length>0?Dn(e,i):Sn(e,t.getRng()),u=Fn(n,a);return In(u,r),t.moveToBookmark(o),u.length},Wn=function(e){var n=e.getAttribute("data-mce-index");return"number"==typeof n?""+n:n},jn=function(e,n,t,r){var o=e.dom.create("span",{"data-mce-bogus":1});o.className="mce-match-marker";var i=e.getBody();return Jn(e,n,!1),r?Rn(e.dom,t,e.selection,o):Pn(e.dom,t,i,o)},_n=function(e){var n=e.parentNode;e.firstChild&&n.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)},qn=function(e,n){var t=[],r=y.toArray(e.getBody().getElementsByTagName("span"));if(r.length)for(var o=0;o<r.length;o++){var i=Wn(r[o]);null!==i&&i.length&&i===n.toString()&&t.push(r[o])}return t},Vn=function(e,n,t){var r=n.get(),o=r.index,i=e.dom;t=t!==!1,t?o+1===r.count?o=0:o++:o-1===-1?o=r.count-1:o--,i.removeClass(qn(e,r.index),"mce-match-marker-selected");var a=qn(e,o);return a.length?(i.addClass(qn(e,o),"mce-match-marker-selected"),e.selection.scrollIntoView(a[0]),o):-1},Hn=function(e,n){var t=n.parentNode;e.remove(n),e.isEmpty(t)&&e.remove(t)},Ln=function(e,n){var t=e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&").replace(/\s/g,"[^\\S\\r\\n\\uFEFF]"),r="("+t+")";return n?"(?:^|\\s|"+v()+")"+r+("(?=$|\\s|"+v()+")"):r},Un=function(e,n,t,r,o,i){var a=Ln(t,o),u={regex:new RegExp(a,r?"g":"gi"),matchIndex:1},c=jn(e,n,u,i);if(c){var f=Vn(e,n,!0);n.set({index:f,count:c,text:t,matchCase:r,wholeWord:o,inSelection:i})}return c},$n=function(e,n){var t=Vn(e,n,!0);n.set(i(i({},n.get()),{index:t}))},zn=function(e,n){var t=Vn(e,n,!1);n.set(i(i({},n.get()),{index:t}))},Gn=function(e){var n=Wn(e);return null!==n&&n.length>0},Kn=function(e,n,t,r,o){var a,u=n.get(),c=u.index,f=c;r=r!==!1;for(var l=e.getBody(),s=y.grep(y.toArray(l.getElementsByTagName("span")),Gn),d=0;d<s.length;d++){var m=Wn(s[d]),h=a=parseInt(m,10);if(o||h===u.index){for(t.length?(s[d].firstChild.nodeValue=t,_n(s[d])):Hn(e.dom,s[d]);s[++d];){if(h=parseInt(Wn(s[d]),10),h!==a){d--;break}Hn(e.dom,s[d])}r&&f--}else a>c&&s[d].setAttribute("data-mce-index",String(a-1))}return n.set(i(i({},u),{count:o?0:u.count-1,index:f})),r?$n(e,n):zn(e,n),!o&&n.get().count>0},Jn=function(e,n,t){var r,o,a,u=n.get(),c=y.toArray(e.getBody().getElementsByTagName("span"));for(r=0;r<c.length;r++){var f=Wn(c[r]);null!==f&&f.length&&(f===u.index.toString()&&(o||(o=c[r].firstChild),a=c[r].firstChild),_n(c[r]))}if(n.set(i(i({},u),{index:-1,count:0,text:""})),o&&a){var l=e.dom.createRng();return l.setStart(o,0),l.setEnd(a,a.data.length),t!==!1&&e.selection.setRng(l),l}},Qn=function(e,n){return n.get().count>1},Xn=function(e,n){return n.get().count>1},Yn=function(e,n){var t=function(t){return Jn(e,n,t)},r=function(t,r,o,i){return void 0===i&&(i=!1),Un(e,n,t,r,o,i)},o=function(){return $n(e,n)},i=function(){return zn(e,n)},a=function(t,r,o){return Kn(e,n,t,r,o)};return{done:t,find:r,next:o,prev:i,replace:a}},Zn=function(){var e=r(p.none()),n=function(){e.set(p.none())},t=function(n){e.set(p.some(n))},o=function(n){e.get().each(n)},i=function(){return e.get().isSome()};return{clear:n,set:t,isSet:i,on:o}},et=tinymce.util.Tools.resolve("tinymce.Env"),nt=function(e,n){function t(t){var r=Qn(e,n)?t.enable:t.disable;r("next");var o=Xn(e,n)?t.enable:t.disable;o("prev")}function r(n){e.windowManager.alert("Could not find the specified string.",function(){n.focus("findtext")})}var o=Zn();e.undoManager.add();var a=y.trim(e.selection.getContent({format:"text"})),u=function(e){var t=e.getData(),r=n.get();n.set(i(i({},r),{matchCase:t.matchcase,wholeWord:t.wholewords,inSelection:t.inselection}))},c=function(e,n){var t=["replace","replaceall","prev","next"],r=n?e.disable:e.enable;D(t,r)},f=function(e,n){et.browser.isSafari()&&et.deviceType.isTouch()&&("find"===n||"replace"===n||"replaceall"===n)&&e.focus(n)},l=function(r){Jn(e,n,!1),c(r,!0),t(r)},s=function(o){var i=o.getData(),a=n.get();if(!i.findtext.length)return void l(o);if(a.text===i.findtext&&a.matchCase===i.matchcase&&a.wholeWord===i.wholewords)$n(e,n);else{var u=Un(e,n,i.findtext,i.matchcase,i.wholewords,i.inselection);0>=u&&r(o),c(o,0===u)}t(o)},d=n.get(),m={findtext:a,replacetext:"",wholewords:d.wholeWord,matchcase:d.matchCase,inselection:d.inSelection},h={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:"togglemenuitem",name:"inselection",text:"Find in selection"}]},{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:m,onChange:function(e,t){"findtext"===t.name&&n.get().count>0&&l(e)},onAction:function(r,o){var i=r.getData();switch(o.name){case"find":s(r);break;case"replace":Kn(e,n,i.replacetext)?t(r):l(r);break;case"replaceall":Kn(e,n,i.replacetext,!0,!0),l(r);break;case"prev":zn(e,n),t(r);break;case"next":$n(e,n),t(r);break;case"matchcase":case"wholewords":case"inselection":u(r),l(r)}f(r,o.name)},onSubmit:function(e){s(e),f(e,"find")},onClose:function(){e.focus(),Jn(e,n),e.undoManager.add()}};o.set(e.windowManager.open(h,{inline:"toolbar"}))},tt=function(e,n){e.addCommand("SearchReplace",function(){nt(e,n)})},rt=function(e,n){return function(){nt(e,n)}},ot=function(e,n){e.ui.registry.addMenuItem("searchreplace",{text:"Find and replace...",shortcut:"Meta+F",onAction:rt(e,n),icon:"search"}),e.ui.registry.addButton("searchreplace",{tooltip:"Find and replace",onAction:rt(e,n),icon:"search"}),e.shortcuts.add("Meta+F","",rt(e,n))};t()}(window)});
;/*!node_modules/tinymce/plugins/searchreplace/index.js*/
amis.define("node_modules/tinymce/plugins/searchreplace/index",function(e){e("node_modules/tinymce/plugins/searchreplace/plugin")});
;/*!node_modules/tinymce/plugins/visualblocks/plugin.js*/
amis.define("node_modules/tinymce/plugins/visualblocks/plugin",function(){!function(){"use strict";function n(){o.add("visualblocks",function(n,o){var e=t(!1);u(n,o,e),a(n,e),s(n,o,e)})}var t=function(n){var t=n,o=function(){return t},e=function(n){t=n};return{get:o,set:e}},o=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(n,t){n.fire("VisualBlocks",{state:t})},i=function(n,t,o){var i=n.dom;i.toggleClass(n.getBody(),"mce-visualblocks"),o.set(!o.get()),e(n,o.get())},u=function(n,t,o){n.addCommand("mceVisualBlocks",function(){i(n,t,o)})},c=function(n){return n.getParam("visualblocks_default_state",!1,"boolean")},s=function(n,t,o){n.on("PreviewFormats AfterPreviewFormats",function(t){o.get()&&n.dom.toggleClass(n.getBody(),"mce-visualblocks","afterpreviewformats"===t.type)}),n.on("init",function(){c(n)&&i(n,t,o)})},l=function(n,t){return function(o){o.setActive(t.get());var e=function(n){return o.setActive(n.state)};return n.on("VisualBlocks",e),function(){return n.off("VisualBlocks",e)}}},a=function(n,t){n.ui.registry.addToggleButton("visualblocks",{icon:"visualblocks",tooltip:"Show blocks",onAction:function(){return n.execCommand("mceVisualBlocks")},onSetup:l(n,t)}),n.ui.registry.addToggleMenuItem("visualblocks",{text:"Show blocks",icon:"visualblocks",onAction:function(){return n.execCommand("mceVisualBlocks")},onSetup:l(n,t)})};n()}()});
;/*!node_modules/tinymce/plugins/visualblocks/index.js*/
amis.define("node_modules/tinymce/plugins/visualblocks/index",function(i){i("node_modules/tinymce/plugins/visualblocks/plugin")});
;/*!node_modules/tinymce/plugins/code/plugin.js*/
amis.define("node_modules/tinymce/plugins/code/plugin",function(){!function(){"use strict";function e(){n.add("code",function(e){return i(e),u(e),{}})}var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e,n){e.focus(),e.undoManager.transact(function(){e.setContent(n)}),e.selection.setCursorLocation(),e.nodeChanged()},o=function(e){return e.getContent({source_view:!0})},c=function(e){var n=o(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:n},onSubmit:function(n){t(e,n.getData().code),n.close()}})},i=function(e){e.addCommand("mceCodeEditor",function(){c(e)})},u=function(e){e.ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:function(){return c(e)}}),e.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:function(){return c(e)}})};e()}()});
;/*!node_modules/tinymce/plugins/code/index.js*/
amis.define("node_modules/tinymce/plugins/code/index",function(e){e("node_modules/tinymce/plugins/code/plugin")});
;/*!node_modules/tinymce/plugins/fullscreen/plugin.js*/
amis.define("node_modules/tinymce/plugins/fullscreen/plugin",function(){!function(n){"use strict";function t(){r.add("fullscreen",function(n){var t=e(null);return n.inline?o(t):(ie(n,t),fe(n,t),n.addShortcut("Meta+Shift+F","","mceFullScreen"),o(t))})}var e=function(n){var t=n,e=function(){return t},r=function(n){t=n};return{get:e,set:r}},r=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(n){return{isFullscreen:function(){return null!==n.get()}}},u=function(){},i=function(n,t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return n(t.apply(null,e))}},c=function(n,t){return function(e){return n(t(e))}},f=function(n){return function(){return n}},l=f(!1),a=f(!0),s=function(){return d},d=function(){var n=function(n){return n.isNone()},t=function(n){return n()},e=function(n){return n},r={fold:function(n){return n()},is:l,isSome:l,isNone:a,getOr:e,getOrThunk:t,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:f(null),getOrUndefined:f(void 0),or:e,orThunk:t,map:s,each:u,bind:s,exists:l,forall:a,filter:s,equals:n,equals_:n,toArray:function(){return[]},toString:f("none()")};return r}(),m=function(n){var t=f(n),e=function(){return o},r=function(t){return t(n)},o={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:a,isNone:l,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(t){return m(t(n))},each:function(t){t(n)},bind:r,exists:r,forall:r,filter:function(t){return t(n)?o:d},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(l,function(t){return e(n,t)})}};return o},h=function(n){return null===n||void 0===n?d:m(n)},v={some:m,none:s,from:h},p=function(n){var t=e(v.none()),r=function(){t.get().each(n)},o=function(){r(),t.set(v.none())},u=function(n){r(),t.set(v.some(n))},i=function(){return t.get().isSome()};return{clear:o,isSet:i,set:u}},g=function(){return p(function(n){n.unbind()})},y=function(){var n=e(v.none()),t=function(){n.set(v.none())},r=function(t){n.set(v.some(t))},o=function(t){n.get().each(t)},u=function(){return n.get().isSome()};return{clear:t,set:r,isSet:u,on:o}},w=function(n){var t=typeof n;return null===n?"null":"object"===t&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":t},b=function(n){return function(t){return w(t)===n}},S=function(n){return function(t){return typeof t===n}},T=b("string"),x=b("array"),D=S("boolean"),E=function(n){return null===n||void 0===n},A=function(n){return!E(n)},N=S("function"),O=S("number"),C=Array.prototype.push,M=function(n,t){for(var e=n.length,r=new Array(e),o=0;e>o;o++){var u=n[o];r[o]=t(u,o)}return r},k=function(n,t){for(var e=0,r=n.length;r>e;e++){var o=n[e];t(o,e)}},F=function(n,t){for(var e=[],r=0,o=n.length;o>r;r++){var u=n[r];t(u,r)&&e.push(u)}return e},P=function(n){for(var t=[],e=0,r=n.length;r>e;++e){if(!x(n[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+n);C.apply(t,n[e])}return t},L=function(n,t){return P(M(n,t))},H=function(n){return 0===n.length?v.none():v.some(n[0])},q=Object.keys,V=function(n,t){for(var e=q(n),r=0,o=e.length;o>r;r++){var u=e[r],i=n[u];t(i,u)}},W=function(n){return void 0!==n.style&&N(n.style.getPropertyValue)},j=function(t,e){var r=e||n.document,o=r.createElement("div");if(o.innerHTML=t,!o.hasChildNodes()||o.childNodes.length>1)throw n.console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return I(o.childNodes[0])},z=function(t,e){var r=e||n.document,o=r.createElement(t);return I(o)},B=function(t,e){var r=e||n.document,o=r.createTextNode(t);return I(o)},I=function(n){if(null===n||void 0===n)throw new Error("Node cannot be null or undefined");return{dom:f(n)}},R=function(n,t,e){var r=n.dom();return v.from(r.elementFromPoint(t,e)).map(I)},U={fromHtml:j,fromTag:z,fromText:B,fromDom:I,fromPoint:R},_=("undefined"!=typeof n.window?n.window:Function("return this;")(),9),K=11,X=1,Y=3,G=function(n){return n.dom().nodeType},J=function(n){return function(t){return G(t)===n}},Q=J(X),Z=J(Y),$=J(_),nt=J(K),tt=function(n,t){var e=n.dom();if(e.nodeType!==X)return!1;var r=e;if(void 0!==r.matches)return r.matches(t);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(t);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(t);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},et=function(n){return n.nodeType!==X&&n.nodeType!==_&&n.nodeType!==K||0===n.childElementCount},rt=function(t,e){var r=void 0===e?n.document:e.dom();return et(r)?[]:M(r.querySelectorAll(t),U.fromDom)},ot=function(n,t){return n.dom()===t.dom()},ut=function(n){return U.fromDom(n.dom().ownerDocument)},it=function(n){return $(n)?n:ut(n)},ct=function(n){return v.from(n.dom().parentNode).map(U.fromDom)},ft=function(n,t){for(var e=N(t)?t:l,r=n.dom(),o=[];null!==r.parentNode&&void 0!==r.parentNode;){var u=r.parentNode,i=U.fromDom(u);if(o.push(i),e(i)===!0)break;r=u}return o},lt=function(n){var t=function(t){return F(t,function(t){return!ot(n,t)})};return ct(n).map(at).map(t).getOr([])},at=function(n){return M(n.dom().childNodes,U.fromDom)},st=function(n){return nt(n)},dt=N(n.Element.prototype.attachShadow)&&N(n.Node.prototype.getRootNode),mt=f(dt),ht=dt?function(n){return U.fromDom(n.dom().getRootNode())}:it,vt=function(n){var t=ht(n);return st(t)?v.some(t):v.none()},pt=function(n){return U.fromDom(n.dom().host)},gt=function(n){if(mt()&&A(n.target)){var t=U.fromDom(n.target);if(Q(t)&&yt(U.fromDom(n.target))){var e=n;if(e.composed&&e.composedPath){var r=e.composedPath();if(r)return H(r)}}}return v.from(n.target)},yt=function(n){return A(n.dom().shadowRoot)},wt=function(n){var t=Z(n)?n.dom().parentNode:n.dom();return void 0===t||null===t||null===t.ownerDocument?!1:vt(U.fromDom(t)).fold(function(){return t.ownerDocument.body.contains(t)},c(wt,pt))},bt=function(t,e,r){if(!(T(r)||D(r)||O(r)))throw n.console.error("Invalid call to Attr.set. Key ",e,":: Value ",r,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,r+"")},St=function(n,t,e){bt(n.dom(),t,e)},Tt=function(n,t){var e=n.dom().getAttribute(t);return null===e?void 0:e},xt=function(n,t){n.dom().removeAttribute(t)},Dt=function(t,e,r){if(!T(r))throw n.console.error("Invalid call to CSS.set. Property ",e,":: Value ",r,":: Element ",t),new Error("CSS value must be a string: "+r);W(t)&&t.style.setProperty(e,r)},Et=function(n,t){var e=n.dom();V(t,function(n,t){Dt(e,t,n)})},At=function(t,e){var r=t.dom(),o=n.window.getComputedStyle(r),u=o.getPropertyValue(e);return""!==u||wt(t)?u:Nt(r,e)},Nt=function(n,t){return W(n)?n.style.getPropertyValue(t):""},Ot=function(n,t,e,r,o,u,i){return{target:f(n),x:f(t),y:f(e),stop:r,prevent:o,kill:u,raw:f(i)}},Ct=function(n){var t=U.fromDom(gt(n).getOr(n.target)),e=function(){return n.stopPropagation()},r=function(){return n.preventDefault()},o=i(r,e);return Ot(t,n.clientX,n.clientY,e,r,o,n)},Mt=function(n,t){var e=function(e,r){return Mt(n+e,t+r)};return{left:f(n),top:f(t),translate:e}},kt=Mt,Ft=function(t){var e=void 0!==t?t.dom():n.document,r=e.body.scrollLeft||e.documentElement.scrollLeft,o=e.body.scrollTop||e.documentElement.scrollTop;return kt(r,o)},Pt=function(t){var e=void 0===t?n.window:t;return v.from(e.visualViewport)},Lt=function(n,t,e,r){return{x:n,y:t,width:e,height:r,right:n+e,bottom:t+r}},Ht=function(t){var e=void 0===t?n.window:t,r=e.document,o=Ft(U.fromDom(r));return Pt(e).fold(function(){var n=e.document.documentElement,t=n.clientWidth,r=n.clientHeight;return Lt(o.left(),o.top(),t,r)},function(n){return Lt(Math.max(n.pageLeft,o.left()),Math.max(n.pageTop,o.top()),n.width,n.height)})},qt=function(n,t,e){return Pt(e).map(function(t){var e=function(n){return Ct(n)};return t.addEventListener(n,e),{unbind:function(){return t.removeEventListener(n,e)}}}).getOrThunk(function(){return{unbind:u}})},Vt=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Wt=tinymce.util.Tools.resolve("tinymce.Env"),jt=tinymce.util.Tools.resolve("tinymce.util.Delay"),zt=function(n,t){n.fire("FullscreenStateChanged",{state:t})},Bt=function(n,t,e){return F(ft(n,e),t)},It=function(n,t){return F(lt(n),t)},Rt=function(n){return rt(n)},Ut=function(n,t,e){return Bt(n,function(n){return tt(n,t)},e)},_t=function(n,t){return It(n,function(n){return tt(n,t)})},Kt="data-ephox-mobile-fullscreen-style",Xt="display:none!important;",Yt="position:absolute!important;",Gt="top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;",Jt="background-color:rgb(255,255,255)!important;",Qt=Wt.os.isAndroid(),Zt=function(n){var t=At(n,"background-color");return void 0!==t&&""!==t?"background-color:"+t+"!important":Jt},$t=function(n,t,e){var r=function(n){return _t(n,"*:not(.tox-silver-sink)")},o=function(t){return function(e){var r=Tt(e,"style"),o=void 0===r?"no-styles":r.trim();o!==t&&(St(e,Kt,o),Et(e,n.parseStyle(t)))}},u=Ut(t,"*"),i=L(u,r),c=Zt(e);k(i,o(Xt)),k(u,o(Yt+Gt+c));var f=Qt===!0?"":Yt;o(f+Gt+c)(t)},ne=function(n){var t=Rt("["+Kt+"]");k(t,function(t){var e=Tt(t,Kt);"no-styles"!==e?Et(t,n.parseStyle(e)):xt(t,"style"),xt(t,Kt)})},te=Vt.DOM,ee=function(){var t=Ht(n.window);return{x:t.x,y:t.y}},re=function(t){n.window.scrollTo(t.x,t.y)},oe=Pt().fold(function(){return{bind:u,unbind:u}},function(t){var e=y(),r=g(),o=g(),u=function(){n.document.body.scrollTop=0,n.document.documentElement.scrollTop=0},i=function(){n.window.requestAnimationFrame(function(){e.on(function(n){return Et(n,{top:t.offsetTop+"px",left:t.offsetLeft+"px",height:t.height+"px",width:t.width+"px"})})})},c=jt.throttle(function(){u(),i()},50),f=function(n){e.set(n),c(),r.set(qt("resize")),o.set(qt("scroll"))},l=function(){e.on(function(){r.clear(),o.clear()}),e.clear()};return{bind:f,unbind:l}}),ue=function(t,e){var r=n.document.body,o=n.document.documentElement,u=t.getContainer(),i=U.fromDom(u),c=e.get(),f=U.fromDom(t.getBody()),l=Wt.deviceType.isTouch(),a=u.style,s=t.iframeElement,d=s.style,m=function(){l&&ne(t.dom),te.removeClass(r,"tox-fullscreen"),te.removeClass(o,"tox-fullscreen"),te.removeClass(u,"tox-fullscreen"),oe.unbind()};if(c)d.width=c.iframeWidth,d.height=c.iframeHeight,a.width=c.containerWidth,a.height=c.containerHeight,a.top=c.containerTop,a.left=c.containerLeft,re(c.scrollPos),e.set(null),zt(t,!1),m(),t.off("remove",m);else{var h={scrollPos:ee(),containerWidth:a.width,containerHeight:a.height,containerTop:a.top,containerLeft:a.left,iframeWidth:d.width,iframeHeight:d.height};l&&$t(t.dom,i,f),d.width=d.height="100%",a.width=a.height="",te.addClass(r,"tox-fullscreen"),te.addClass(o,"tox-fullscreen"),te.addClass(u,"tox-fullscreen"),oe.bind(i),t.on("remove",m),e.set(h),zt(t,!0)}},ie=function(n,t){n.addCommand("mceFullScreen",function(){ue(n,t)})},ce=function(n,t){return function(e){e.setActive(null!==t.get());var r=function(n){return e.setActive(n.state)};return n.on("FullscreenStateChanged",r),function(){return n.off("FullscreenStateChanged",r)}}},fe=function(n,t){n.ui.registry.addToggleMenuItem("fullscreen",{text:"Fullscreen",icon:"fullscreen",shortcut:"Meta+Shift+F",onAction:function(){return n.execCommand("mceFullScreen")},onSetup:ce(n,t)}),n.ui.registry.addToggleButton("fullscreen",{tooltip:"Fullscreen",icon:"fullscreen",onAction:function(){return n.execCommand("mceFullScreen")},onSetup:ce(n,t)})};t()}(window)});
;/*!node_modules/tinymce/plugins/fullscreen/index.js*/
amis.define("node_modules/tinymce/plugins/fullscreen/index",function(e){e("node_modules/tinymce/plugins/fullscreen/plugin")});
;/*!node_modules/tinymce/plugins/insertdatetime/plugin.js*/
amis.define("node_modules/tinymce/plugins/insertdatetime/plugin",function(){!function(){"use strict";function e(){t.add("insertdatetime",function(e){g(e),S(e)})}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return e.getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d"))},r=function(e){return e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S"))},a=function(e){return e.getParam("insertdatetime_formats",["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"])},i=function(e){var t=a(e);return t.length>0?t[0]:r(e)},o=function(e){return e.getParam("insertdatetime_element",!1)},u="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),c="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),m="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),s="January February March April May June July August September October November December".split(" "),l=function(e,t){if(e=""+e,e.length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e},d=function(e,t,n){return n=n||new Date,t=t.replace("%D","%m/%d/%Y"),t=t.replace("%r","%I:%M:%S %p"),t=t.replace("%Y",""+n.getFullYear()),t=t.replace("%y",""+n.getYear()),t=t.replace("%m",l(n.getMonth()+1,2)),t=t.replace("%d",l(n.getDate(),2)),t=t.replace("%H",""+l(n.getHours(),2)),t=t.replace("%M",""+l(n.getMinutes(),2)),t=t.replace("%S",""+l(n.getSeconds(),2)),t=t.replace("%I",""+((n.getHours()+11)%12+1)),t=t.replace("%p",""+(n.getHours()<12?"AM":"PM")),t=t.replace("%B",""+e.translate(s[n.getMonth()])),t=t.replace("%b",""+e.translate(m[n.getMonth()])),t=t.replace("%A",""+e.translate(c[n.getDay()])),t=t.replace("%a",""+e.translate(u[n.getDay()])),t=t.replace("%%","%")},f=function(e,t,n,r){var a=e.dom.create("time",{datetime:n},r);t.parentNode.insertBefore(a,t),e.dom.remove(t),e.selection.select(a,!0),e.selection.collapse(!1)},p=function(e,t){if(o(e)){var n=d(e,t),r=void 0;r=/%[HMSIp]/.test(t)?d(e,"%Y-%m-%dT%H:%M"):d(e,"%Y-%m-%d");var a=e.dom.getParent(e.selection.getStart(),"time");a?f(e,a,r,n):e.insertContent('<time datetime="'+r+'">'+n+"</time>")}else e.insertContent(d(e,t))},g=function(e){e.addCommand("mceInsertDate",function(){p(e,n(e))}),e.addCommand("mceInsertTime",function(){p(e,r(e))})},y=function(e){var t=e,n=function(){return t},r=function(e){t=e};return{get:n,set:r}},M=tinymce.util.Tools.resolve("tinymce.util.Tools"),S=function(e){var t=a(e),n=y(i(e));e.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:function(e){return e===n.get()},fetch:function(n){n(M.map(t,function(t){return{type:"choiceitem",text:d(e,t),value:t}}))},onAction:function(){p(e,n.get())},onItemAction:function(t,r){n.set(r),p(e,r)}});var r=function(t){return function(){n.set(t),p(e,t)}};e.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:function(){return M.map(t,function(t){return{type:"menuitem",text:d(e,t),onAction:r(t)}})}})};e()}()});
;/*!node_modules/tinymce/plugins/insertdatetime/index.js*/
amis.define("node_modules/tinymce/plugins/insertdatetime/index",function(e){e("node_modules/tinymce/plugins/insertdatetime/plugin")});
;/*!node_modules/tinymce/plugins/media/plugin.js*/
amis.define("node_modules/tinymce/plugins/media/plugin",function(){!function(){"use strict";function e(){t.add("media",function(e){return Pt(e),Wt(e),It(e),Lt(e),qt(e),Ct(e)})}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=function(){return r=Object.assign||function(e){for(var t,r=1,n=arguments.length;n>r;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},r.apply(this,arguments)},n=function(){},i=function(e){return function(){return e}},o=i(!1),a=i(!0),c=function(){return u},u=function(){var e=function(e){return e.isNone()},t=function(e){return e()},r=function(e){return e},u={fold:function(e){return e()},is:o,isSome:o,isNone:a,getOr:r,getOrThunk:t,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(void 0),or:r,orThunk:t,map:c,each:n,bind:c,exists:o,forall:a,filter:c,equals:e,equals_:e,toArray:function(){return[]},toString:i("none()")};return u}(),s=function(e){var t=i(e),r=function(){return c},n=function(t){return t(e)},c={fold:function(t,r){return r(e)},is:function(t){return e===t},isSome:a,isNone:o,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:r,orThunk:r,map:function(t){return s(t(e))},each:function(t){t(e)},bind:n,exists:n,forall:n,filter:function(t){return t(e)?c:u},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,r){return t.fold(o,function(t){return r(e,t)})}};return c},l=function(e){return null===e||void 0===e?u:s(e)},m={some:s,none:c,from:l},d=function(e){var t=typeof e;return null===e?"null":"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},f=function(e){return function(t){return d(t)===e}},h=f("string"),p=f("object"),g=f("array"),v=Array.prototype.push,w=function(e,t){for(var r=0,n=e.length;n>r;r++){var i=e[r];t(i,r)}},b=function(e){for(var t=[],r=0,n=e.length;n>r;++r){if(!g(e[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+e);v.apply(t,e[r])}return t},y=function(e){var t=e,r=function(){return t},n=function(e){t=e};return{get:r,set:n}},x=Object.keys,j=Object.hasOwnProperty,O=function(e,t){for(var r=x(e),n=0,i=r.length;i>n;n++){var o=r[n],a=e[o];t(a,o)}},S=function(e,t){return _(e,t)?m.from(e[t]):m.none()},_=function(e,t){return j.call(e,t)},k=function(e){return e.getParam("media_scripts")},A=function(e){return e.getParam("audio_template_callback")},T=function(e){return e.getParam("video_template_callback")},C=function(e){return e.getParam("media_live_embeds",!0)},P=function(e){return e.getParam("media_filter_html",!0)},D=function(e){return e.getParam("media_url_resolver")},$=function(e){return e.getParam("media_alt_source",!0)},F=function(e){return e.getParam("media_poster",!0)},M=function(e){return e.getParam("media_dimensions",!0)},z=tinymce.util.Tools.resolve("tinymce.util.Tools"),N=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),U=tinymce.util.Tools.resolve("tinymce.html.SaxParser"),E=function(e,t){if(e)for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r].filter))return e[r]},R=N.DOM,L=function(e){return e.replace(/px$/,"")},I=function(e){var t=e.map.style,r=t?R.parseStyle(t):{};return{type:"ephox-embed-iri",source:e.map["data-ephox-embed-iri"],altsource:"",poster:"",width:S(r,"max-width").map(L).getOr(""),height:S(r,"max-height").map(L).getOr("")}},q=function(e,t){var r=y(!1),n={};return U({validate:!1,allow_conditional_comments:!0,start:function(t,i){if(r.get());else if(_(i.map,"data-ephox-embed-iri"))r.set(!0),n=I(i);else{if(n.source||"param"!==t||(n.source=i.map.movie),("iframe"===t||"object"===t||"embed"===t||"video"===t||"audio"===t)&&(n.type||(n.type=t),n=z.extend(i.map,n)),"script"===t){var o=E(e,i.map.src);if(!o)return;n={type:"script",source:i.map.src,width:String(o.width),height:String(o.height)}}"source"===t&&(n.source?n.altsource||(n.altsource=i.map.src):n.source=i.map.src),"img"!==t||n.poster||(n.poster=i.map.src)}}}).parse(t),n.source=n.source||n.src||n.data,n.altsource=n.altsource||"",n.poster=n.poster||"",n},B=function(e){var t={mp3:"audio/mpeg",m4a:"audio/x-m4a",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"},r=e.toLowerCase().split(".").pop(),n=t[r];return n?n:""},W=tinymce.util.Tools.resolve("tinymce.html.Schema"),G=tinymce.util.Tools.resolve("tinymce.html.Writer"),H=N.DOM,J=function(e){return/^[0-9.]+$/.test(e)?e+"px":e},K=function(e,t){O(t,function(t,r){var n=""+t;if(e.map[r])for(var i=e.length;i--;){var o=e[i];o.name===r&&(n?(e.map[r]=n,o.value=n):(delete e.map[r],e.splice(i,1)))}else n&&(e.push({name:r,value:n}),e.map[r]=n)})},Q=function(e,t){var r=t.map.style,n=r?H.parseStyle(r):{};n["max-width"]=J(e.width),n["max-height"]=J(e.height),K(t,{style:H.serializeStyle(n)})},V=["source","altsource"],X=function(e,t,r){var n,i=G(),o=y(!1),a=0;return U({validate:!1,allow_conditional_comments:!0,comment:function(e){i.comment(e)},cdata:function(e){i.cdata(e)},text:function(e,t){i.text(e,t)},start:function(e,c,u){if(o.get());else if(_(c.map,"data-ephox-embed-iri"))o.set(!0),Q(t,c);else{switch(e){case"video":case"object":case"embed":case"img":case"iframe":void 0!==t.height&&void 0!==t.width&&K(c,{width:t.width,height:t.height})}if(r)switch(e){case"video":K(c,{poster:t.poster,src:""}),t.altsource&&K(c,{src:""});break;case"iframe":K(c,{src:t.source});break;case"source":if(2>a&&(K(c,{src:t[V[a]],type:t[V[a]+"mime"]}),!t[V[a]]))return;a++;break;case"img":if(!t.poster)return;n=!0}}i.start(e,c,u)},end:function(e){if(!o.get()){if("video"===e&&r)for(var c=0;2>c;c++)if(t[V[c]]){var u=[];u.map={},c>a&&(K(u,{src:t[V[c]],type:t[V[c]+"mime"]}),i.start("source",u,!0))}if(t.poster&&"object"===e&&r&&!n){var s=[];s.map={},K(s,{src:t.poster,width:t.width,height:t.height}),i.start("img",s,!0)}}i.end(e)}},W({})).parse(e),i.getContent()},Y=[{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&amp;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}],Z=function(e){var t=e.match(/^(https?:\/\/|www\.)(.+)$/i);return t&&t.length>1?"www."===t[1]?"https://":t[1]:"https://"},et=function(e,t){for(var r=Z(t),n=e.regex.exec(t),i=r+e.url,o=function(e){i=i.replace("$"+e,function(){return n[e]?n[e]:""})},a=0;a<n.length;a++)o(a);return i.replace(/\?$/,"")},tt=function(e){var t=Y.filter(function(t){return t.regex.test(e)});return t.length>0?z.extend({},t[0],{url:et(t[0],e)}):null},rt=function(e){var t=e.allowFullscreen?' allowFullscreen="1"':"";return'<iframe src="'+e.source+'" width="'+e.width+'" height="'+e.height+'"'+t+"></iframe>"},nt=function(e){var t='<object data="'+e.source+'" 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>"},it=function(e,t){return t?t(e):'<audio controls="controls" src="'+e.source+'">'+(e.altsource?'\n<source src="'+e.altsource+'"'+(e.altsourcemime?' type="'+e.altsourcemime+'"':"")+" />\n":"")+"</audio>"},ot=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.source+'"'+(e.sourcemime?' type="'+e.sourcemime+'"':"")+" />\n"+(e.altsource?'<source src="'+e.altsource+'"'+(e.altsourcemime?' type="'+e.altsourcemime+'"':"")+" />\n":"")+"</video>"},at=function(e){return'<script src="'+e.source+'"></script>'},ct=function(e,t){var r=z.extend({},t);if(!r.source&&(z.extend(r,q(k(e),r.embed)),!r.source))return"";r.altsource||(r.altsource=""),r.poster||(r.poster=""),r.source=e.convertURL(r.source,"source"),r.altsource=e.convertURL(r.altsource,"source"),r.sourcemime=B(r.source),r.altsourcemime=B(r.altsource),r.poster=e.convertURL(r.poster,"poster");var n=tt(r.source);if(n&&(r.source=n.url,r.type=n.type,r.allowFullscreen=n.allowFullscreen,r.width=r.width||String(n.w),r.height=r.height||String(n.h)),r.embed)return X(r.embed,r,!0);var i=E(k(e),r.source);i&&(r.type="script",r.width=String(i.width),r.height=String(i.height));var o=A(e),a=T(e);return r.width=r.width||"300",r.height=r.height||"150",z.each(r,function(t,n){r[n]=e.dom.encode(""+t)}),"iframe"===r.type?rt(r):"application/x-shockwave-flash"===r.sourcemime?nt(r):-1!==r.sourcemime.indexOf("audio")?it(r,o):"script"===r.type?at(r):ot(r,a)},ut=tinymce.util.Tools.resolve("tinymce.util.Promise"),st={},lt=function(e,t,r){return new ut(function(n,i){var o=function(r){return r.html&&(st[e.source]=r),n({url:e.source,html:r.html?r.html:t(e)})};st[e.source]?o(st[e.source]):r({url:e.source},o,i)})},mt=function(e,t){return new ut(function(r){r({html:t(e),url:e.source})})},dt=function(e){return function(t){return ct(e,t)}},ft=function(e,t){var r=D(e);return r?lt(t,dt(e),r):mt(t,dt(e))},ht=function(e){return st.hasOwnProperty(e)},pt=function(e,t){return S(t,e).bind(function(e){return S(e,"meta")})},gt=function(e,t,r){return function(n){var i,o=function(){return S(e,n)},a=function(){return S(t,n)},c=function(e){return S(e,"value").bind(function(e){return e.length>0?m.some(e):m.none()})},u=function(){return o().bind(function(e){return p(e)?c(e).orThunk(a):a().orThunk(function(){return m.from(e)})})},s=function(){return a().orThunk(function(){return o().bind(function(e){return p(e)?c(e):m.from(e)})})};return i={},i[n]=(n===r?u():s()).getOr(""),i}},vt=function(e,t){var r={};return S(e,"dimensions").each(function(e){w(["width","height"],function(n){S(t,n).orThunk(function(){return S(e,n)}).each(function(e){return r[n]=e})})}),r},wt=function(e,t){var n=t?pt(t,e).getOr({}):{},i=gt(e,n,t);return r(r(r(r(r({},i("source")),i("altsource")),i("poster")),i("embed")),vt(e,n))},bt=function(e){var t=r(r({},e),{source:{value:S(e,"source").getOr("")},altsource:{value:S(e,"altsource").getOr("")},poster:{value:S(e,"poster").getOr("")}});return w(["width","height"],function(r){S(e,r).each(function(e){var n=t.dimensions||{};n[r]=e,t.dimensions=n})}),t},yt=function(e){return function(t){var r=t&&t.msg?"Media embed handler error: "+t.msg:"Media embed handler threw unknown error.";e.notificationManager.open({type:"error",text:r})}},xt=function(e,t){return q(k(e),t)},jt=function(e){return e.getAttribute("data-mce-object")||e.getAttribute("data-ephox-embed-iri")},Ot=function(e){var t=e.selection.getNode(),n=jt(t)?e.serializer.serialize(t,{selection:!0}):"";return r({embed:n},q(k(e),n))},St=function(e,t){return function(n){if(h(n.url)&&n.url.trim().length>0){var i=n.html,o=xt(t,i),a=r(r({},o),{source:n.url,embed:i});e.setData(bt(a))}}},_t=function(e,t){for(var r=e.dom.select("img[data-mce-object]"),n=0;n<t.length;n++)for(var i=r.length-1;i>=0;i--)t[n]===r[i]&&r.splice(i,1);e.selection.select(r[0])},kt=function(e,t){var r=e.dom.select("img[data-mce-object]");e.insertContent(t),_t(e,r),e.nodeChanged()},At=function(e,t,r){t.embed=X(t.embed,t),t.embed&&(e.source===t.source||ht(t.source))?kt(r,t.embed):ft(r,t).then(function(e){kt(r,e.html)}).catch(yt(r))},Tt=function(e){var t=Ot(e),n=y(t),i=bt(t),o=function(t,r){var n=wt(r.getData(),"source");t.source!==n.source&&(St(v,e)({url:n.source,html:""}),ft(e,n).then(St(v,e)).catch(yt(e)))},a=function(t){var r=wt(t.getData()),n=xt(e,r.embed);t.setData(bt(n))},c=function(t,n){var i=wt(t.getData(),n),o=ct(e,i);t.setData(bt(r(r({},i),{embed:o})))},u=[{name:"source",type:"urlinput",filetype:"media",label:"Source"}],s=M(e)?[{type:"sizeinput",name:"dimensions",label:"Constrain proportions",constrain:!0}]:[],l={title:"General",name:"general",items:b([u,s])},m={type:"textarea",name:"embed",label:"Paste your embed code below:"},d={title:"Embed",items:[m]},f=[];$(e)&&f.push({name:"altsource",type:"urlinput",filetype:"media",label:"Alternative source URL"}),F(e)&&f.push({name:"poster",type:"urlinput",filetype:"image",label:"Media poster (Image URL)"});var h={title:"Advanced",name:"advanced",items:f},p=[l,d];f.length>0&&p.push(h);var g={type:"tabpanel",tabs:p},v=e.windowManager.open({title:"Insert/Edit Media",size:"normal",body:g,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(t){var r=wt(t.getData());At(n.get(),r,e),t.close()},onChange:function(e,t){switch(t.name){case"source":o(n.get(),e);break;case"embed":a(e);break;case"dimensions":case"altsource":case"poster":c(e,t.name)}n.set(wt(e.getData()))},initialData:i})},Ct=function(e){var t=function(){Tt(e)};return{showDialog:t}},Pt=function(e){var t=function(){Tt(e)};e.addCommand("mceMedia",t)},Dt=tinymce.util.Tools.resolve("tinymce.html.Node"),$t=tinymce.util.Tools.resolve("tinymce.Env"),Ft=function(e,t){if(P(e)===!1)return t;var r,n=G();return U({validate:!1,allow_conditional_comments:!1,comment:function(e){n.comment(e)},cdata:function(e){n.cdata(e)},text:function(e,t){n.text(e,t)},start:function(t,i,o){if(r=!0,"script"!==t&&"noscript"!==t&&"svg"!==t){for(var a=i.length-1;a>=0;a--){var c=i[a].name;0===c.indexOf("on")&&(delete i.map[c],i.splice(a,1)),"style"===c&&(i[a].value=e.dom.serializeStyle(e.dom.parseStyle(i[a].value),t))}n.start(t,i,o),r=!1}},end:function(e){r||n.end(e)}},W({})).parse(t),n.getContent()},Mt=function(e,t){var r=t.name,n=new Dt("img",1);return n.shortEnded=!0,Nt(e,t,n),n.attr({width:t.attr("width")||"300",height:t.attr("height")||("audio"===r?"30":"150"),style:t.attr("style"),src:$t.transparentSrc,"data-mce-object":r,"class":"mce-object mce-object-"+r}),n},zt=function(e,t){var r=t.name,n=new Dt("span",1);n.attr({contentEditable:"false",style:t.attr("style"),"data-mce-object":r,"class":"mce-preview-object mce-object-"+r}),Nt(e,t,n);var i=new Dt(r,1);i.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"});var o=new Dt("span",1);return o.attr("class","mce-shim"),n.append(i),n.append(o),n},Nt=function(e,t,r){var n,i,o,a=t.attributes;for(o=a.length;o--;)n=a[o].name,i=a[o].value,"width"!==n&&"height"!==n&&"style"!==n&&(("data"===n||"src"===n)&&(i=e.convertURL(i,n)),r.attr("data-mce-p-"+n,i));var c=t.firstChild&&t.firstChild.value;c&&(r.attr("data-mce-html",escape(Ft(e,c))),r.firstChild=null)},Ut=function(e){var t=e.attr("class");return t&&/\btiny-pageembed\b/.test(t)},Et=function(e){for(;e=e.parent;)if(e.attr("data-ephox-embed-iri")||Ut(e))return!0;return!1},Rt=function(e){return function(t){for(var r,n,i=t.length;i--;)r=t[i],r.parent&&(r.parent.attr("data-mce-object")||("script"!==r.name||(n=E(k(e),r.attr("src"))))&&(n&&(n.width&&r.attr("width",n.width.toString()),n.height&&r.attr("height",n.height.toString())),"iframe"===r.name&&C(e)&&$t.ceFalse?Et(r)||r.replace(zt(e,r)):Et(r)||r.replace(Mt(e,r))))}},Lt=function(e){e.on("preInit",function(){var t=e.schema.getSpecialElements();z.each("video audio iframe object".split(" "),function(e){t[e]=new RegExp("</"+e+"[^>]*>","gi")});var r=e.schema.getBoolAttrs();z.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(e){r[e]={}}),e.parser.addNodeFilter("iframe,video,audio,object,embed,script",Rt(e)),e.serializer.addAttributeFilter("data-mce-object",function(t,r){for(var n,i,o,a,c,u,s,l,m=t.length;m--;)if(n=t[m],n.parent){for(s=n.attr(r),i=new Dt(s,1),"audio"!==s&&"script"!==s&&(l=n.attr("class"),i.attr(l&&-1!==l.indexOf("mce-preview-object")?{width:n.firstChild.attr("width"),height:n.firstChild.attr("height")}:{width:n.attr("width"),height:n.attr("height")})),i.attr({style:n.attr("style")}),a=n.attributes,o=a.length;o--;){var d=a[o].name;0===d.indexOf("data-mce-p-")&&i.attr(d.substr(11),a[o].value)}"script"===s&&i.attr("type","text/javascript"),c=n.attr("data-mce-html"),c&&(u=new Dt("#text",3),u.raw=!0,u.value=Ft(e,unescape(c)),i.append(u)),n.replace(i)}})}),e.on("SetContent",function(){e.$("span.mce-preview-object").each(function(t,r){var n=e.$(r);0===n.find("span.mce-shim").length&&n.append('<span class="mce-shim"></span>')})})},It=function(e){e.on("ResolveName",function(e){var t;1===e.target.nodeType&&(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)})},qt=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,r=e.target;r.getAttribute("data-mce-object")&&(t=r.getAttribute("data-mce-html"),t&&(t=unescape(t),r.setAttribute("data-mce-html",escape(X(t,{width:String(e.width),height:String(e.height)})))))})},Bt=function(e,t){return function(r){return e.selection.selectorChangedWithUnbind(t.join(","),r.setActive).unbind}},Wt=function(e){e.ui.registry.addToggleButton("media",{tooltip:"Insert/edit media",icon:"embed",onAction:function(){e.execCommand("mceMedia")},onSetup:Bt(e,["img[data-mce-object]","span[data-mce-object]","div[data-ephox-embed-iri]"])}),e.ui.registry.addMenuItem("media",{icon:"embed",text:"Media...",onAction:function(){e.execCommand("mceMedia")}})};e()}()});
;/*!node_modules/tinymce/plugins/media/index.js*/
amis.define("node_modules/tinymce/plugins/media/index",function(e){e("node_modules/tinymce/plugins/media/plugin")});
;/*!node_modules/tinymce/plugins/table/plugin.js*/
amis.define("node_modules/tinymce/plugins/table/plugin",function(){!function(n){"use strict";function t(n){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.concat(e);return n.apply(null,o)}}function e(n,t,e,r,o){return n(e,r)?D.some(e):W(o)&&o(e)?D.none():t(e,r,o)}function r(n,t){var e=function(e){if(!n(e))throw new Error("Can only get "+t+" value of a "+t+" node");return r(e).getOr("")},r=function(t){return n(t)?D.from(t.dom().nodeValue):D.none()},o=function(e,r){if(!n(e))throw new Error("Can only set raw "+t+" value of a "+t+" node");e.dom().nodeValue=r};return{get:e,getOption:r,set:o}}function o(){var n=function(n){return Qt.fromDom(n.dom().cloneNode(!1))},t=function(n){return n.dom().ownerDocument},e=function(n){return Dt(n)?"body"===xt(n)?!0:q(Bu,xt(n)):!1},r=function(n){return Dt(n)?q(["br","img","hr","input"],xt(n)):!1},o=function(n){return Dt(n)&&"false"===Mt(n,"contenteditable")},u=function(n,t){return n.dom().compareDocumentPosition(t.dom())},i=function(n,t){var e=jt(n);Et(t,e)};return{up:h({selector:ao,closest:so,predicate:oo,all:rr}),down:h({selector:ro,predicate:no}),styles:h({get:Rr,getRaw:Dr,set:xr,remove:Ar}),attrs:h({get:Mt,set:kt,remove:Wt,copyTo:i}),insert:h({before:Ir,after:Pr,afterAll:_r,append:Er,appendAll:Wr,prepend:kr,wrap:Mr}),remove:h({unwrap:Fr,remove:zr}),create:h({nu:Qt.fromTag,clone:n,text:Qt.fromText}),query:h({comparePosition:u,prevSibling:ur,nextSibling:ir}),property:h({children:cr,name:xt,parent:er,document:t,isText:At,isComment:Ot,isElement:Dt,getText:Uo,setText:$o,isBoundary:e,isEmptyTag:r,isNonEditable:o}),eq:Ge,is:Qe}}function u(n,t){var e=function(t,e){if(!j(e)&&!e.match(/^[0-9]+$/))throw new Error(n+".set accepts only positive integer values. Value was "+e);var r=t.dom();Kt(r)&&(r.style[n]=e+"px")},r=function(e){var r=t(e);if(0>=r||null===r){var o=Rr(e,n);return parseFloat(o)||0}return r},o=r,u=function(n,t){return J(t,function(t,e){var r=Rr(n,e),o=void 0===r?0:parseInt(r,10);return isNaN(o)?t:t+o},0)},i=function(n,t,e){var r=u(n,e),o=t>r?t-r:0;return o};return{set:e,get:r,getOuter:o,aggregate:u,max:i}}function i(){var n=D.none(),t=function(){n=D.none()},e=function(t,e){var r=n.map(function(n){return t.compare(n,e)});return n=D.some(e),r},r=function(n,t){var r=t.extract(n);r.each(function(n){var r=e(t,n);r.each(function(n){o.trigger.move(n)})})},o=Aa({move:Da(["info"])});return{onEvent:r,reset:t,events:o.registry}}function c(){return{onEvent:g,reset:g}}function a(){var n=c(),t=i(),e=n,r=function(){e.reset(),e=t},o=function(){e.reset(),e=n},u=function(n,t){e.onEvent(n,t)},a=function(){return e===t};return{on:r,off:o,isOn:a,onEvent:u,events:t.events}}function l(n,t,e,r){var o=D.none(),u=function(){o=D.none()},i=function(n){r.clear(t),o=Sb(n.target(),e)},c=function(u){o.each(function(o){r.clearBeforeUpdate(t),Sb(u.target(),e).each(function(u){Hu(o,u,e).each(function(e){var i=e.boxes.getOr([]);(i.length>1||1===i.length&&!Ge(o,u))&&(r.selectRange(t,i,e.start,e.finish),n.selectContents(u))})})})},a=function(){o.each(u)};return{mousedown:i,mouseover:c,mouseup:a}}function f(n,t,e){var r=function(t,r,o){e.targets().each(function(e){var u=Ro(r);u.each(function(u){var i=_f(n),c=su(g,Qt.fromDom(n.getDoc()),i),a=$b(u,e,c);ff(n,t,r,o,a)})})},o=function(){return sf(n)},u=Vb.byAttr(fi,r,o);return n.on("init",function(){var e=n.getWin(),r=zf(n),o=Hf(n),i=function(){var t=n.selection,e=Qt.fromDom(t.getStart()),o=Qt.fromDom(t.getEnd()),i=zu(Ro,[e,o]);i.fold(function(){return u.clear(r)},g)},c=_b(e,r,o,u),a=Wb(e,r,o,u),l=jb(e,r,o,u),f=function(n){return n.raw().shiftKey===!0};n.on("TableSelectorChange",function(n){return l(n.start,n.finish)});var s=function(t,r){f(t)&&(r.kill()&&t.kill(),r.selection().each(function(t){var r=Pp.relative(t.start(),t.finish()),o=Up(e,r);n.selection.setRng(o)}))},d=function(t){var e=Xa(t);if(e.raw().shiftKey&&Db(e.raw().which)){var r=n.selection.getRng(),o=Qt.fromDom(r.startContainer),u=Qt.fromDom(r.endContainer);a.keyup(e,o,r.startOffset,u,r.endOffset).each(function(n){s(e,n)})}},m=function(e){var r=Xa(e);t().each(function(n){return n.hideBars()});var o=n.selection.getRng(),u=Qt.fromDom(n.selection.getStart()),i=Qt.fromDom(o.startContainer),c=Qt.fromDom(o.endContainer),l=Jf(u).isRtl()?Bb:Ab;a.keydown(r,i,o.startOffset,c,o.endOffset,l).each(function(n){s(r,n)}),t().each(function(n){return n.showBars()})},p=function(n){return 0===n.button},v=function(n){return void 0===n.buttons?!0:Zg.browser.isEdge()&&0===n.buttons?!0:0!==(1&n.buttons)},h=function(n){p(n)&&Gb(n)&&c.mousedown(Xa(n))},b=function(n){v(n)&&Gb(n)&&c.mouseover(Xa(n))},w=function(n){p(n)&&Gb(n)&&c.mouseup(Xa(n))},y=function(){var n=Qf(Qt.fromDom(r)),t=Qf(0),e=function(e){var r=Qt.fromDom(e.target);if("td"===xt(r)||"th"===xt(r)){var o=n.get(),u=t.get();Ge(o,r)&&e.timeStamp-u<300&&(e.preventDefault(),l(r,r))}n.set(r),t.set(e.timeStamp)};return{touchEnd:e}},S=y();n.on("mousedown",h),n.on("mouseover",b),n.on("mouseup",w),n.on("touchend",S.touchEnd),n.on("keyup",d),n.on("keydown",m),n.on("NodeChange",i)}),{clear:u.clear}}function s(n){var t=Vm(n),e=Xb(n,t),r=hs(n),o=f(n,r.lazyResize,e),u=Ym(n,r.lazyWire),i=cp();return up(n,u,o,t,i),ip(n,u,t),Ai(n,t,u,o),Qb(n,e,i),Yb(n,e,i),Jb(n),n.on("PreInit",function(){n.serializer.addTempAttr(ii),n.serializer.addTempAttr(ai),nw(n)}),Sf(n)&&n.on("keydown",function(t){Fv(t,n,u,r.lazyWire)}),n.on("remove",function(){r.destroy()}),mg(n,i,r,e)}function d(){m.add("table",s)}var m=tinymce.util.Tools.resolve("tinymce.PluginManager"),g=function(){},p=function(n,t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return n(t.apply(null,e))}},v=function(n,t){return function(e){return n(t(e))}},h=function(n){return function(){return n}},b=function(n){return n},w=function(n){return function(t){return!n(t)}},y=function(n){return function(){throw new Error(n)}},S=h(!1),C=h(!0),x=function(){return T},T=function(){var n=function(n){return n.isNone()},t=function(n){return n()},e=function(n){return n},r={fold:function(n){return n()},is:S,isSome:S,isNone:C,getOr:e,getOrThunk:t,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:h(null),getOrUndefined:h(void 0),or:e,orThunk:t,map:x,each:g,bind:x,exists:S,forall:C,filter:x,equals:n,equals_:n,toArray:function(){return[]},toString:h("none()")};return r}(),R=function(n){var t=h(n),e=function(){return o},r=function(t){return t(n)},o={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:C,isNone:S,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(t){return R(t(n))},each:function(t){t(n)},bind:r,exists:r,forall:r,filter:function(t){return t(n)?o:T},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(S,function(t){return e(n,t)})}};return o},O=function(n){return null===n||void 0===n?T:R(n)},D={some:R,none:x,from:O},A=function(n){var t=typeof n;return null===n?"null":"object"===t&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":t},B=function(n){return function(t){return A(t)===n}},I=function(n){return function(t){return typeof t===n}},P=B("string"),k=B("object"),E=B("array"),M=I("boolean"),N=function(n){return null===n||void 0===n},_=function(n){return!N(n)},W=I("function"),j=I("number"),z=Array.prototype.slice,F=Array.prototype.indexOf,L=Array.prototype.push,H=function(n,t){return F.call(n,t)},q=function(n,t){return H(n,t)>-1},V=function(n,t){for(var e=0,r=n.length;r>e;e++){var o=n[e];if(t(o,e))return!0}return!1},U=function(n,t){for(var e=[],r=0;n>r;r++)e.push(t(r));return e},K=function(n,t){for(var e=n.length,r=new Array(e),o=0;e>o;o++){var u=n[o];r[o]=t(u,o)}return r},$=function(n,t){for(var e=0,r=n.length;r>e;e++){var o=n[e];t(o,e)}},G=function(n,t){for(var e=n.length-1;e>=0;e--){var r=n[e];t(r,e)}},X=function(n,t){for(var e=[],r=0,o=n.length;o>r;r++){var u=n[r];t(u,r)&&e.push(u)}return e},Y=function(n,t,e){return G(n,function(n){e=t(e,n)}),e},J=function(n,t,e){return $(n,function(n){e=t(e,n)}),e},Q=function(n,t,e){for(var r=0,o=n.length;o>r;r++){var u=n[r];if(t(u,r))return D.some(u);if(e(u,r))break}return D.none()},Z=function(n,t){return Q(n,t,S)},nt=function(n,t){for(var e=0,r=n.length;r>e;e++){var o=n[e];if(t(o,e))return D.some(e)}return D.none()},tt=function(n){for(var t=[],e=0,r=n.length;r>e;++e){if(!E(n[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+n);L.apply(t,n[e])}return t},et=function(n,t){return tt(K(n,t))},rt=function(n,t){for(var e=0,r=n.length;r>e;++e){var o=n[e];if(t(o,e)!==!0)return!1}return!0},ot=function(n){var t=z.call(n,0);return t.reverse(),t},ut=function(n){return 0===n.length?D.none():D.some(n[0])},it=function(n){return 0===n.length?D.none():D.some(n[n.length-1])},ct=function(n,t){for(var e=0;e<n.length;e++){var r=t(n[e],e);if(r.isSome())return r}return D.none()},at=Object.keys,lt=Object.hasOwnProperty,ft=function(n,t){for(var e=at(n),r=0,o=e.length;o>r;r++){var u=e[r],i=n[u];t(i,u)}},st=function(n,t){return dt(n,function(n,e){return{k:e,v:t(n,e)}})},dt=function(n,t){var e={};return ft(n,function(n,r){var o=t(n,r);e[o.k]=o.v}),e},mt=function(n){return function(t,e){n[e]=t}},gt=function(n,t,e,r){var o={};return ft(n,function(n,o){(t(n,o)?e:r)(n,o)}),o},pt=function(n,t){var e={};return gt(n,t,mt(e),g),e},vt=function(n,t){return ht(n,t)?D.from(n[t]):D.none()},ht=function(n,t){return lt.call(n,t)},bt=("undefined"!=typeof n.window?n.window:Function("return this;")(),8),wt=9,yt=11,St=1,Ct=3,xt=function(n){var t=n.dom().nodeName;return t.toLowerCase()},Tt=function(n){return n.dom().nodeType},Rt=function(n){return function(t){return Tt(t)===n}},Ot=function(n){return Tt(n)===bt||"#comment"===xt(n)},Dt=Rt(St),At=Rt(Ct),Bt=Rt(wt),It=Rt(yt),Pt=function(t,e,r){if(!(P(r)||M(r)||j(r)))throw n.console.error("Invalid call to Attr.set. Key ",e,":: Value ",r,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,r+"")},kt=function(n,t,e){Pt(n.dom(),t,e)},Et=function(n,t){var e=n.dom();ft(t,function(n,t){Pt(e,t,n)})},Mt=function(n,t){var e=n.dom().getAttribute(t);return null===e?void 0:e},Nt=function(n,t){return D.from(Mt(n,t))},_t=function(n,t){var e=n.dom();return e&&e.hasAttribute?e.hasAttribute(t):!1},Wt=function(n,t){n.dom().removeAttribute(t)},jt=function(n){return J(n.dom().attributes,function(n,t){return n[t.name]=t.value,n},{})},zt=function(n,t,e){return""===t||n.length>=t.length&&n.substr(e,e+t.length)===t},Ft=function(n,t){return-1!==n.indexOf(t)},Lt=function(n,t){return zt(n,t,0)},Ht=function(n,t){return zt(n,t,n.length-t.length)},qt=function(n){return function(t){return t.replace(n,"")}},Vt=qt(/^\s+|\s+$/g),Ut=function(n){return n.length>0},Kt=function(n){return void 0!==n.style&&W(n.style.getPropertyValue)},$t=function(t,e){var r=e||n.document,o=r.createElement("div");if(o.innerHTML=t,!o.hasChildNodes()||o.childNodes.length>1)throw n.console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return Yt(o.childNodes[0])},Gt=function(t,e){var r=e||n.document,o=r.createElement(t);return Yt(o)},Xt=function(t,e){var r=e||n.document,o=r.createTextNode(t);return Yt(o)},Yt=function(n){if(null===n||void 0===n)throw new Error("Node cannot be null or undefined");return{dom:h(n)}},Jt=function(n,t,e){var r=n.dom();return D.from(r.elementFromPoint(t,e)).map(Yt)},Qt={fromHtml:$t,fromTag:Gt,fromText:Xt,fromDom:Yt,fromPoint:Jt},Zt=function(n,t,e){return 0!==(n.compareDocumentPosition(t)&e)},ne=function(t,e){return Zt(t,e,n.Node.DOCUMENT_POSITION_CONTAINED_BY)},te=function(){return te=Object.assign||function(n){for(var t,e=1,r=arguments.length;r>e;e++){t=arguments[e];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o])}return n},te.apply(this,arguments)},ee=function(n){var t,e=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return e||(e=!0,t=n.apply(null,r)),t}},re=function(n,t){for(var e=0;e<n.length;e++){var r=n[e];if(r.test(t))return r}return void 0},oe=function(n,t){var e=re(n,t);if(!e)return{major:0,minor:0};var r=function(n){return Number(t.replace(e,"$"+n))};return ce(r(1),r(2))},ue=function(n,t){var e=String(t).toLowerCase();return 0===n.length?ie():oe(n,e)},ie=function(){return ce(0,0)},ce=function(n,t){return{major:n,minor:t}},ae={nu:ce,detect:ue,unknown:ie},le="Edge",fe="Chrome",se="IE",de="Opera",me="Firefox",ge="Safari",pe=function(){return ve({current:void 0,version:ae.unknown()})},ve=function(n){var t=n.current,e=n.version,r=function(n){return function(){return t===n}};return{current:t,version:e,isEdge:r(le),isChrome:r(fe),isIE:r(se),isOpera:r(de),isFirefox:r(me),isSafari:r(ge)}},he={unknown:pe,nu:ve,edge:h(le),chrome:h(fe),ie:h(se),opera:h(de),firefox:h(me),safari:h(ge)},be="Windows",we="iOS",ye="Android",Se="Linux",Ce="OSX",xe="Solaris",Te="FreeBSD",Re="ChromeOS",Oe=function(){return De({current:void 0,version:ae.unknown()})},De=function(n){var t=n.current,e=n.version,r=function(n){return function(){return t===n}};return{current:t,version:e,isWindows:r(be),isiOS:r(we),isAndroid:r(ye),isOSX:r(Ce),isLinux:r(Se),isSolaris:r(xe),isFreeBSD:r(Te),isChromeOS:r(Re)}},Ae={unknown:Oe,nu:De,windows:h(be),ios:h(we),android:h(ye),linux:h(Se),osx:h(Ce),solaris:h(xe),freebsd:h(Te),chromeos:h(Re)},Be=function(n,t,e,r){var o=n.isiOS()&&/ipad/i.test(e)===!0,u=n.isiOS()&&!o,i=n.isiOS()||n.isAndroid(),c=i||r("(pointer:coarse)"),a=o||!u&&i&&r("(min-device-width:768px)"),l=u||i&&!a,f=t.isSafari()&&n.isiOS()&&/safari/i.test(e)===!1,s=!l&&!a&&!f;return{isiPad:h(o),isiPhone:h(u),isTablet:h(a),isPhone:h(l),isTouch:h(c),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:h(f),isDesktop:h(s)}},Ie=function(n,t){var e=String(t).toLowerCase();return Z(n,function(n){return n.search(e)})},Pe=function(n,t){return Ie(n,t).map(function(n){var e=ae.detect(n.versionRegexes,t);return{current:n.name,version:e}})},ke=function(n,t){return Ie(n,t).map(function(n){var e=ae.detect(n.versionRegexes,t);return{current:n.name,version:e}})},Ee={detectBrowser:Pe,detectOs:ke},Me=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Ne=function(n){return function(t){return Ft(t,n)}},_e=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(n){return Ft(n,"edge/")&&Ft(n,"chrome")&&Ft(n,"safari")&&Ft(n,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Me],search:function(n){return Ft(n,"chrome")&&!Ft(n,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(n){return Ft(n,"msie")||Ft(n,"trident")}},{name:"Opera",versionRegexes:[Me,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Ne("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Ne("firefox")},{name:"Safari",versionRegexes:[Me,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(n){return(Ft(n,"safari")||Ft(n,"mobile/"))&&Ft(n,"applewebkit")}}],We=[{name:"Windows",search:Ne("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(n){return Ft(n,"iphone")||Ft(n,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Ne("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Ne("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Ne("linux"),versionRegexes:[]},{name:"Solaris",search:Ne("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Ne("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Ne("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],je={browsers:h(_e),oses:h(We)},ze=function(n,t){var e=je.browsers(),r=je.oses(),o=Ee.detectBrowser(e,n).fold(he.unknown,he.nu),u=Ee.detectOs(r,n).fold(Ae.unknown,Ae.nu),i=Be(u,o,n,t);return{browser:o,os:u,deviceType:i}},Fe={detect:ze},Le=function(t){return n.window.matchMedia(t).matches},He=ee(function(){return Fe.detect(n.navigator.userAgent,Le)}),qe=function(){return He()},Ve=function(n,t){var e=n.dom();if(e.nodeType!==St)return!1;var r=e;if(void 0!==r.matches)return r.matches(t);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(t);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(t);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},Ue=function(n){return n.nodeType!==St&&n.nodeType!==wt&&n.nodeType!==yt||0===n.childElementCount},Ke=function(t,e){var r=void 0===e?n.document:e.dom();return Ue(r)?[]:K(r.querySelectorAll(t),Qt.fromDom)},$e=function(t,e){var r=void 0===e?n.document:e.dom();return Ue(r)?D.none():D.from(r.querySelector(t)).map(Qt.fromDom)},Ge=function(n,t){return n.dom()===t.dom()},Xe=function(n,t){var e=n.dom(),r=t.dom();return e===r?!1:e.contains(r)},Ye=function(n,t){return ne(n.dom(),t.dom())},Je=function(n,t){return qe().browser.isIE()?Ye(n,t):Xe(n,t)},Qe=Ve,Ze=function(n){return Qt.fromDom(n.dom().ownerDocument)},nr=function(n){return Bt(n)?n:Ze(n)},tr=function(n){return Qt.fromDom(n.dom().ownerDocument.defaultView)},er=function(n){return D.from(n.dom().parentNode).map(Qt.fromDom)},rr=function(n,t){for(var e=W(t)?t:S,r=n.dom(),o=[];null!==r.parentNode&&void 0!==r.parentNode;){var u=r.parentNode,i=Qt.fromDom(u);if(o.push(i),e(i)===!0)break;r=u}return o},or=function(n){return D.from(n.dom().offsetParent).map(Qt.fromDom)},ur=function(n){return D.from(n.dom().previousSibling).map(Qt.fromDom)},ir=function(n){return D.from(n.dom().nextSibling).map(Qt.fromDom)},cr=function(n){return K(n.dom().childNodes,Qt.fromDom)},ar=function(n,t){var e=n.dom().childNodes;return D.from(e[t]).map(Qt.fromDom)},lr=function(n){return ar(n,0)},fr=function(n){return It(n)},sr=W(n.Element.prototype.attachShadow)&&W(n.Node.prototype.getRootNode),dr=h(sr),mr=sr?function(n){return Qt.fromDom(n.dom().getRootNode())}:nr,gr=function(n){var t=mr(n);return fr(t)?D.some(t):D.none()},pr=function(n){return Qt.fromDom(n.dom().host)},vr=function(n){if(dr()&&_(n.target)){var t=Qt.fromDom(n.target);if(Dt(t)&&hr(Qt.fromDom(n.target))){var e=n;if(e.composed&&e.composedPath){var r=e.composedPath();if(r)return ut(r)}}}return D.from(n.target)},hr=function(n){return _(n.dom().shadowRoot)},br=function(n){var t=At(n)?n.dom().parentNode:n.dom();return void 0===t||null===t||null===t.ownerDocument?!1:gr(Qt.fromDom(t)).fold(function(){return t.ownerDocument.body.contains(t)},v(br,pr))},wr=function(){return yr(Qt.fromDom(n.document))},yr=function(n){var t=n.dom().body;if(null===t||void 0===t)throw new Error("Body is not available yet");return Qt.fromDom(t)},Sr=function(t,e,r){if(!P(r))throw n.console.error("Invalid call to CSS.set. Property ",e,":: Value ",r,":: Element ",t),new Error("CSS value must be a string: "+r);Kt(t)&&t.style.setProperty(e,r)},Cr=function(n,t){Kt(n)&&n.style.removeProperty(t)},xr=function(n,t,e){var r=n.dom();Sr(r,t,e)},Tr=function(n,t){var e=n.dom();ft(t,function(n,t){Sr(e,t,n)})},Rr=function(t,e){var r=t.dom(),o=n.window.getComputedStyle(r),u=o.getPropertyValue(e);return""!==u||br(t)?u:Or(r,e)},Or=function(n,t){return Kt(n)?n.style.getPropertyValue(t):""},Dr=function(n,t){var e=n.dom(),r=Or(e,t);return D.from(r).filter(function(n){return n.length>0})},Ar=function(n,t){var e=n.dom();Cr(e,t),Nt(n,"style").map(Vt).is("")&&Wt(n,"style")},Br=function(n,t){var e=n.dom(),r=t.dom();Kt(e)&&Kt(r)&&(r.style.cssText=e.style.cssText)},Ir=function(n,t){var e=er(n);e.each(function(e){e.dom().insertBefore(t.dom(),n.dom())})},Pr=function(n,t){var e=ir(n);e.fold(function(){var e=er(n);e.each(function(n){Er(n,t)})},function(n){Ir(n,t)})},kr=function(n,t){var e=lr(n);e.fold(function(){Er(n,t)},function(e){n.dom().insertBefore(t.dom(),e.dom())})},Er=function(n,t){n.dom().appendChild(t.dom())},Mr=function(n,t){Ir(n,t),Er(t,n)},Nr=function(n,t){$(t,function(t){Ir(n,t)})},_r=function(n,t){$(t,function(e,r){var o=0===r?n:t[r-1];Pr(o,e)})},Wr=function(n,t){$(t,function(t){Er(n,t)})},jr=function(n){n.dom().textContent="",$(cr(n),function(n){zr(n)})},zr=function(n){var t=n.dom();null!==t.parentNode&&t.parentNode.removeChild(t)},Fr=function(n){var t=cr(n);t.length>0&&Nr(n,t),zr(n)},Lr=function(n,t){return{rows:h(n),columns:h(t)}},Hr=function(n,t){return{row:h(n),column:h(t)}},qr=function(n,t,e){return{element:h(n),rowspan:h(t),colspan:h(e)}},Vr=function(n,t,e,r){return{element:h(n),rowspan:h(t),colspan:h(e),isNew:h(r)}},Ur=function(n,t,e,r,o){return{element:h(n),rowspan:h(t),colspan:h(e),row:h(r),column:h(o)}},Kr=function(n,t,e){return{element:h(n),cells:h(t),section:h(e)}},$r=function(n,t){return{element:h(n),isNew:h(t)}},Gr=function(n,t,e,r){return{element:h(n),cells:h(t),section:h(e),isNew:h(r)}},Xr=function(n,t){return{cells:h(n),section:h(t)}},Yr=function(n,t){return{details:h(n),section:h(t)}},Jr=function(n,t,e,r){return{startRow:h(n),startCol:h(t),finishRow:h(e),finishCol:h(r)}},Qr=function(n,t,e){return X(rr(n,e),t)},Zr=function(n,t){return X(cr(n),t)},no=function(n,t){var e=[];return $(cr(n),function(n){t(n)&&(e=e.concat([n])),e=e.concat(no(n,t))}),e},to=function(n,t,e){return Qr(n,function(n){return Ve(n,t)},e)},eo=function(n,t){return Zr(n,function(n){return Ve(n,t)})},ro=function(n,t){return Ke(t,n)},oo=function(n,t,e){for(var r=n.dom(),o=W(e)?e:h(!1);r.parentNode;){r=r.parentNode;var u=Qt.fromDom(r);if(t(u))return D.some(u);if(o(u))break}return D.none()},uo=function(n,t,r){var o=function(n,t){return t(n)};return e(o,oo,n,t,r)},io=function(n,t){var e=function(n){return t(Qt.fromDom(n))},r=Z(n.dom().childNodes,e);return r.map(Qt.fromDom)},co=function(n,t){var e=function(n){for(var r=0;r<n.childNodes.length;r++){var o=Qt.fromDom(n.childNodes[r]);if(t(o))return D.some(o);var u=e(n.childNodes[r]);if(u.isSome())return u}return D.none()};return e(n.dom())},ao=function(n,t,e){return oo(n,function(n){return Ve(n,t)},e)},lo=function(n,t){return io(n,function(n){return Ve(n,t)})},fo=function(n,t){return $e(t,n)},so=function(n,t,r){var o=function(n,t){return Ve(n,t)};return e(o,ao,n,t,r)},mo=function(n,t,e){return void 0===e&&(e=0),Nt(n,t).map(function(n){return parseInt(n,10)}).getOr(e)},go=function(n,t){return mo(n,t,1)},po=function(n){return go(n,"colspan")>1},vo=function(n){return go(n,"rowspan")>1},ho=function(n,t){return parseInt(Rr(n,t),10)},bo=h(10),wo=h(10),yo=function(n,t){return So(n,t,h(!0))},So=function(n,t,e){return et(cr(n),function(n){return Ve(n,t)?e(n)?[n]:[]:So(n,t,e)})},Co=function(n,t,e){if(void 0===e&&(e=S),e(t))return D.none();if(q(n,xt(t)))return D.some(t);var r=function(n){return Ve(n,"table")||e(n)};return ao(t,n.join(","),r)},xo=function(n,t){return Co(["td","th"],n,t)},To=function(n){return yo(n,"th,td")},Ro=function(n,t){return so(n,"table",t)},Oo=function(n){return yo(n,"tr")},Do=function(n){var t=Oo(n);return K(t,function(n){var t=n,e=er(t),r=e.map(function(n){var t=xt(n);return"tfoot"===t||"thead"===t||"tbody"===t?t:"tbody"}).getOr("tbody"),o=K(To(n),function(n){var t=mo(n,"rowspan",1),e=mo(n,"colspan",1);return qr(n,t,e)});return Kr(t,o,r)})},Ao=function(n,t){return K(n,function(n){var e=K(To(n),function(n){var t=mo(n,"rowspan",1),e=mo(n,"colspan",1);return qr(n,t,e)});return Kr(n,e,t.section())})},Bo=function(n,t){return n+","+t},Io=function(n,t,e){var r=n.access[Bo(t,e)];return void 0!==r?D.some(r):D.none()},Po=function(n,t,e){var r=ko(n,function(n){return e(t,n.element())});return r.length>0?D.some(r[0]):D.none()},ko=function(n,t){var e=et(n.all,function(n){return n.cells()});return X(e,t)},Eo=function(n){var t={},e=[],r=n.length,o=0;$(n,function(n,r){var u=[];$(n.cells(),function(n){for(var e=0;void 0!==t[Bo(r,e)];)e++;for(var i=Ur(n.element(),n.rowspan(),n.colspan(),r,e),c=0;c<n.colspan();c++)for(var a=0;a<n.rowspan();a++){var l=r+a,f=e+c,s=Bo(l,f);t[s]=i,o=Math.max(o,f+1)}u.push(i)}),e.push(Kr(n.element(),u,n.section()))});var u=Lr(r,o);return{grid:u,access:t,all:e}},Mo=function(n){var t=Do(n);return Eo(t)},No=function(n){var t=K(n.all,function(n){return n.cells()});return tt(t)},_o={fromTable:Mo,generate:Eo,getAt:Io,findItem:Po,filterItems:ko,justCells:No},Wo=function(n,t,e,r){return{minRow:n,minCol:t,maxRow:e,maxCol:r}},jo=function(n,t){var e=n.grid.columns(),r=n.grid.rows(),o=r,u=e,i=0,c=0;return ft(n.access,function(n){if(t(n)){var e=n.row(),r=e+n.rowspan()-1,a=n.column(),l=a+n.colspan()-1;o>e?o=e:r>i&&(i=r),u>a?u=a:l>c&&(c=l)}}),Wo(o,u,i,c)},zo=function(n,t,e){var r=n[e].element(),o=Qt.fromTag("td");Er(o,Qt.fromTag("br"));var u=t?Er:kr;u(r,o)},Fo=function(n,t,e,r){for(var o=t.grid.columns(),u=t.grid.rows(),i=0;u>i;i++)for(var c=!1,a=0;o>a;a++)if(!(i<e.minRow||i>e.maxRow||a<e.minCol||a>e.maxCol)){var l=_o.getAt(t,i,a).filter(r).isNone();l?zo(n,c,i):c=!0}},Lo=function(n,t){var e=X(yo(n,"tr"),function(n){return 0===n.dom().childElementCount});$(e,zr),(t.minCol===t.maxCol||t.minRow===t.maxRow)&&$(yo(n,"th,td"),function(n){Wt(n,"rowspan"),Wt(n,"colspan")}),Wt(n,"width"),Wt(n,"height"),Ar(n,"width"),Ar(n,"height")},Ho=function(n,t){var e=function(n){return Ve(n.element(),t)},r=Do(n),o=_o.generate(r),u=jo(o,e),i="th:not("+t+"),td:not("+t+")",c=So(n,"th,td",function(n){return Ve(n,i)});return $(c,zr),Fo(r,o,u,e),Lo(n,u),n},qo=" ",Vo=r(At,"text"),Uo=function(n){return Vo.get(n)},Ko=function(n){return Vo.getOption(n)},$o=function(n,t){return Vo.set(n,t)},Go=function(n){return"img"===xt(n)?1:Ko(n).fold(function(){return cr(n).length},function(n){return n.length})},Xo=function(n){return Ko(n).filter(function(n){return 0!==n.trim().length||n.indexOf(qo)>-1}).isSome()},Yo=["img","br"],Jo=function(n){var t=Xo(n);return t||q(Yo,xt(n))},Qo=function(n){return co(n,Jo)},Zo=function(n){return nu(n,Jo)},nu=function(n,t){var e=function(n){for(var r=cr(n),o=r.length-1;o>=0;o--){var u=r[o];if(t(u))return D.some(u);var i=e(u);if(i.isSome())return i}return D.none()};return e(n)},tu=function(n,t){return Qt.fromDom(n.dom().cloneNode(t))},eu=function(n){return tu(n,!1)},ru=function(n){return tu(n,!0)},ou=function(n,t){var e=Qt.fromTag(t),r=jt(n);return Et(e,r),e},uu=function(n,t){var e=ou(n,t),r=cr(ru(n));return Wr(e,r),e},iu=function(){var n=Qt.fromTag("td");return Er(n,Qt.fromTag("br")),n},cu=function(n,t,e){var r=uu(n,t);return ft(e,function(n,t){null===n?Wt(r,t):kt(r,t,n)}),r},au=function(n){return n},lu=function(n){return function(){return Qt.fromTag("tr",n.dom())}},fu=function(n,t,e){var r=Qo(n);return r.map(function(r){var o=e.join(","),u=to(r,o,function(t){return Ge(t,n)});return Y(u,function(n,t){var e=eu(t);return Wt(e,"contenteditable"),Er(n,e),e},t)}).getOr(t)},su=function(n,t,e){var r=function(t){var r=Ze(t.element()),o=Qt.fromTag(xt(t.element()),r.dom()),u=e.getOr(["strong","em","b","i","span","font","h1","h2","h3","h4","h5","h6","p","div"]),i=u.length>0?fu(t.element(),o,u):o;return Er(i,Qt.fromTag("br")),Br(t.element(),o),Ar(o,"height"),1!==t.colspan()&&Ar(t.element(),"width"),n(t.element(),o),o};return{row:lu(t),cell:r,replace:cu,gap:iu}},du=function(n){return{row:lu(n),cell:iu,replace:au,gap:iu}},mu=function(t,e){var r=e||n.document,o=r.createElement("div");return o.innerHTML=t,cr(Qt.fromDom(o))},gu=function(n){return K(n,Qt.fromDom)},pu=function(n,t){var e=t.column(),r=t.column()+t.colspan()-1,o=t.row(),u=t.row()+t.rowspan()-1;return e<=n.finishCol()&&r>=n.startCol()&&o<=n.finishRow()&&u>=n.startRow()},vu=function(n,t){return t.column()>=n.startCol()&&t.column()+t.colspan()-1<=n.finishCol()&&t.row()>=n.startRow()&&t.row()+t.rowspan()-1<=n.finishRow()},hu=function(n,e){for(var r=!0,o=t(vu,e),u=e.startRow();u<=e.finishRow();u++)for(var i=e.startCol();i<=e.finishCol();i++)r=r&&_o.getAt(n,u,i).exists(o);return r?D.some(e):D.none()},bu=function(n,t){return Jr(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))},wu=function(n,t,e){var r=_o.findItem(n,t,Ge),o=_o.findItem(n,e,Ge);return r.bind(function(n){return o.map(function(t){return bu(n,t)})})},yu=function(n,t,e){return wu(n,t,e).bind(function(t){return hu(n,t)})},Su=function(n,t,e,r){return _o.findItem(n,t,Ge).bind(function(t){var o=e>0?t.row()+t.rowspan()-1:t.row(),u=r>0?t.column()+t.colspan()-1:t.column(),i=_o.getAt(n,o+e,u+r);return i.map(function(n){return n.element()})})},Cu=function(n,e,r){return wu(n,e,r).map(function(e){var r=_o.filterItems(n,t(pu,e));return K(r,function(n){return n.element()})})},xu=function(n,t){var e=function(n,t){return Je(t,n)};return _o.findItem(n,t,e).map(function(n){return n.element()})},Tu=function(n,t,e){return Ro(n).bind(function(r){var o=Au(r);return Su(o,n,t,e)})},Ru=function(n,t,e){var r=Au(n);return Cu(r,t,e)},Ou=function(n,t,e,r,o){var u=Au(n),i=Ge(n,e)?D.some(t):xu(u,t),c=Ge(n,o)?D.some(r):xu(u,r);return i.bind(function(n){return c.bind(function(t){return Cu(u,n,t)})})},Du=function(n,t,e){var r=Au(n);return yu(r,t,e)},Au=_o.fromTable,Bu=["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"],Iu=function(n,t,e,r){var o=e[0],u=e.slice(1);return r(n,t,o,u)},Pu=function(n,t,e){return e.length>0?Iu(n,t,e,ku):D.none()},ku=function(n,t,e,r){var o=t(n,e);return Y(r,function(e,r){var o=t(n,r);return Eu(n,e,o)},o)},Eu=function(n,e,r){return e.bind(function(e){return r.filter(t(n.eq,e))})},Mu=function(n,e){return t(n.eq,e)},Nu=function(n,t,e,r){void 0===r&&(r=S);var o=[t].concat(n.up().all(t)),u=[e].concat(n.up().all(e)),i=function(n){var t=nt(n,r);return t.fold(function(){return n},function(t){return n.slice(0,t+1)})},c=i(o),a=i(u),l=Z(c,function(t){return V(a,Mu(n,t))});return{firstpath:h(c),secondpath:h(a),shared:h(l)}},_u=Pu,Wu=Nu,ju=o(),zu=function(n,t){return _u(ju,function(t,e){return n(e)},t)},Fu=function(n,t,e){return Wu(ju,n,t,e)},Lu=function(n){return ao(n,"table")},Hu=function(n,t,e){var r=function(n){return function(t){return void 0!==e&&e(t)||Ge(t,n)}};return Ge(n,t)?D.some({boxes:D.some([n]),start:n,finish:t}):Lu(n).bind(function(o){return Lu(t).bind(function(u){if(Ge(o,u))return D.some({boxes:Ru(o,n,t),start:n,finish:t});if(Je(o,u)){var i=to(t,"td,th",r(o)),c=i.length>0?i[i.length-1]:t;return D.some({boxes:Ou(o,n,o,t,u),start:n,finish:c})}if(Je(u,o)){var i=to(n,"td,th",r(u)),a=i.length>0?i[i.length-1]:n;return D.some({boxes:Ou(u,n,o,t,u),start:n,finish:a})}return Fu(n,t).shared().bind(function(i){return so(i,"table",e).bind(function(e){var i=to(t,"td,th",r(e)),c=i.length>0?i[i.length-1]:t,a=to(n,"td,th",r(e)),l=a.length>0?a[a.length-1]:n;return D.some({boxes:Ou(e,n,o,t,u),start:l,finish:c})})})})})},qu=function(n,t){var e=ro(n,t);return e.length>0?D.some(e):D.none()},Vu=function(n,t){return Z(n,function(n){return Ve(n,t)})},Uu=function(n,t,e){return fo(n,t).bind(function(t){return fo(n,e).bind(function(n){return zu(Lu,[t,n]).map(function(e){return{first:h(t),last:h(n),table:h(e)}})})})},Ku=function(n,t){return ao(n,"table").bind(function(e){return fo(e,t).bind(function(t){return Hu(t,n).bind(function(n){return n.boxes.map(function(t){return{boxes:t,start:n.start,finish:n.finish}})})})})},$u=function(n,t,e,r,o){return Vu(n,o).bind(function(n){return Tu(n,t,e).bind(function(n){return Ku(n,r)})})},Gu=function(n,t){return qu(n,t)},Xu=function(n,t,e){return Uu(n,t,e).bind(function(t){var e=function(t){return Ge(n,t)},r=ao(t.first(),"thead,tfoot,tbody,table",e),o=ao(t.last(),"thead,tfoot,tbody,table",e);return r.bind(function(n){return o.bind(function(e){return Ge(n,e)?Du(t.table(),t.first(),t.last()):D.none()})})})},Yu="data-mce-selected",Ju="td["+Yu+"],th["+Yu+"]",Qu="["+Yu+"]",Zu="data-mce-first-selected",ni="td["+Zu+"],th["+Zu+"]",ti="data-mce-last-selected",ei="td["+ti+"],th["+ti+"]",ri=Yu,oi=Ju,ui=Qu,ii=Zu,ci=ni,ai=ti,li=ei,fi=Object.freeze({__proto__:null,selected:ri,selectedSelector:oi,attributeSelector:ui,firstSelected:ii,firstSelectedSelector:ci,lastSelected:ai,lastSelectedSelector:li}),si=function(t){if(!E(t))throw new Error("cases must be an array");
if(0===t.length)throw new Error("there must be at least one case");var e=[],r={};return $(t,function(o,u){var i=at(o);if(1!==i.length)throw new Error("one and only one name per case");var c=i[0],a=o[c];if(void 0!==r[c])throw new Error("duplicate key detected:"+c);if("cata"===c)throw new Error("cannot have a case named cata (sorry)");if(!E(a))throw new Error("case arguments must be an array");e.push(c),r[c]=function(){var r=arguments.length;if(r!==a.length)throw new Error("Wrong number of arguments to case "+c+". Expected "+a.length+" ("+a+"), got "+r);for(var o=new Array(r),i=0;i<o.length;i++)o[i]=arguments[i];var l=function(n){var t=at(n);if(e.length!==t.length)throw new Error("Wrong number of arguments to match. Expected: "+e.join(",")+"\nActual: "+t.join(","));var r=rt(e,function(n){return q(t,n)});if(!r)throw new Error("Not all branches were specified when using match. Specified: "+t.join(", ")+"\nRequired: "+e.join(", "));return n[c].apply(null,o)};return{fold:function(){if(arguments.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+arguments.length);var n=arguments[u];return n.apply(null,o)},match:l,log:function(t){n.console.log(t,{constructors:e,constructor:c,params:o})}}}}),r},di={generate:si},mi=di.generate([{none:[]},{multiple:["elements"]},{single:["selection"]}]),gi=function(n,t,e,r){return n.fold(t,e,r)},pi=mi.none,vi=mi.multiple,hi=mi.single,bi=function(n,t){return gi(t.get(),h([]),b,h([n]))},wi=function(n,t){var e=function(n){return _t(n,"rowspan")&&parseInt(Mt(n,"rowspan"),10)>1||_t(n,"colspan")&&parseInt(Mt(n,"colspan"),10)>1},r=bi(n,t);return r.length>0&&rt(r,e)?D.some(r):D.none()},yi=function(n,t){return gi(t.get(),D.none,function(t){return 0===t.length?D.none():Xu(n,ci,li).bind(function(n){return t.length>1?D.some({bounds:h(n),cells:h(t)}):D.none()})},D.none)},Si=function(n){return{element:h(n),mergable:D.none,unmergable:D.none,selection:h([n])}},Ci=function(n,t,e){return{element:h(e),mergable:h(yi(t,n)),unmergable:h(wi(e,n)),selection:h(bi(e,n))}},xi=function(n,t,e){return{element:h(n),clipboard:h(t),generators:h(e)}},Ti=function(n,t,e,r){return{selection:h(bi(t,n)),clipboard:h(e),generators:h(r)}},Ri=function(n){return Ro(n[0]).map(ru).map(function(n){return[Ho(n,ui)]})},Oi=function(n,t){return K(t,function(t){return n.selection.serializer.serialize(t.dom(),{})}).join("")},Di=function(n){return K(n,function(n){return n.dom().innerText}).join("")},Ai=function(n,t,e,r){n.on("BeforeGetContent",function(e){var r=function(t){e.preventDefault(),Ri(t).each(function(t){e.content="text"===e.format?Di(t):Oi(n,t)})};e.selection===!0&&gi(t.get(),g,r,g)}),n.on("BeforeSetContent",function(t){if(t.selection===!0&&t.paste===!0){var o=D.from(n.dom.getParent(n.selection.getStart(),"th,td"));o.each(function(o){var u=Qt.fromDom(o);Ro(u).each(function(o){var i=X(mu(t.content),function(n){return"meta"!==xt(n)}),c=function(n){return"table"===xt(n)};if(1===i.length&&c(i[0])){t.preventDefault();var a=Qt.fromDom(n.getDoc()),l=du(a),f=xi(u,i[0],l);e.pasteCells(o,f).each(function(t){n.selection.setRng(t),n.focus(),r.clear(o)})}})})}})},Bi=function(n,t){var e=function(e,r){return Bi(n+e,t+r)};return{left:h(n),top:h(t),translate:e}},Ii=Bi,Pi=function(n){var t=n.getBoundingClientRect();return Ii(t.left,t.top)},ki=function(n,t){return void 0!==n?n:void 0!==t?t:0},Ei=function(n){var t=n.dom().ownerDocument,e=t.body,r=t.defaultView,o=t.documentElement;if(e===n.dom())return Ii(e.offsetLeft,e.offsetTop);var u=ki(r.pageYOffset,o.scrollTop),i=ki(r.pageXOffset,o.scrollLeft),c=ki(o.clientTop,e.clientTop),a=ki(o.clientLeft,e.clientLeft);return Mi(n).translate(i-a,u-c)},Mi=function(n){var t=n.dom(),e=t.ownerDocument,r=e.body;return r===t?Ii(r.offsetLeft,r.offsetTop):br(n)?Pi(t):Ii(0,0)},Ni=function(n){var t=D.from(n.dom().documentElement).map(Qt.fromDom).getOr(n);return{parent:h(t),view:h(n),origin:h(Ii(0,0))}},_i=function(n,t){var e=function(){return Ei(t)};return{parent:h(t),view:h(n),origin:e}},Wi=function(n,t){return{parent:h(t),view:h(n),origin:h(Ii(0,0))}},ji={only:Ni,detached:_i,body:Wi},zi=u("height",function(n){var t=n.dom();return br(n)?t.getBoundingClientRect().height:t.offsetHeight}),Fi=function(n){return zi.get(n)},Li=function(n){return zi.getOuter(n)},Hi=u("width",function(n){return n.dom().offsetWidth}),qi=function(n){return Hi.get(n)},Vi=function(n){return Hi.getOuter(n)},Ui=function(n,t){return{row:n,y:t}},Ki=function(n,t){return{col:n,x:t}},$i=function(n){var t=Ei(n);return t.left()+Vi(n)},Gi=function(n){return Ei(n).left()},Xi=function(n,t){return Ki(n,Gi(t))},Yi=function(n,t){return Ki(n,$i(t))},Ji=function(n){return Ei(n).top()},Qi=function(n,t){return Ui(n,Ji(t))},Zi=function(n,t){return Ui(n,Ji(t)+Li(t))},nc=function(n,t,e){if(0===e.length)return[];var r=K(e.slice(1),function(t,e){return t.map(function(t){return n(e,t)})}),o=e[e.length-1].map(function(n){return t(e.length-1,n)});return r.concat([o])},tc=function(n){return-n},ec={delta:b,positions:function(n){return nc(Qi,Zi,n)},edge:Ji},rc={delta:b,edge:Gi,positions:function(n){return nc(Xi,Yi,n)}},oc={delta:tc,edge:$i,positions:function(n){return nc(Yi,Xi,n)}},uc=function(n){var t=n.grid,e=U(t.columns(),b),r=U(t.rows(),b);return K(e,function(t){var e=function(){return et(r,function(e){return _o.getAt(n,e,t).filter(function(n){return n.column()===t}).fold(h([]),function(n){return[n]})})},o=function(n){return 1===n.colspan()},u=function(){return _o.getAt(n,0,t)};return ic(e,o,u)})},ic=function(n,t,e){var r=n(),o=Z(r,t),u=o.orThunk(function(){return D.from(r[0]).orThunk(e)});return u.map(function(n){return n.element()})},cc=function(n){var t=n.grid,e=U(t.rows(),b),r=U(t.columns(),b);return K(e,function(t){var e=function(){return et(r,function(e){return _o.getAt(n,t,e).filter(function(n){return n.row()===t}).fold(h([]),function(n){return[n]})})},o=function(n){return 1===n.rowspan()},u=function(){return _o.getAt(n,t,0)};return ic(e,o,u)})},ac=function(n,t){if(0>t||t>=n.length-1)return D.none();var e=n[t].fold(function(){var e=ot(n.slice(0,t));return ct(e,function(n,t){return n.map(function(n){return{value:n,delta:t+1}})})},function(n){return D.some({value:n,delta:0})}),r=n[t+1].fold(function(){var e=n.slice(t+1);return ct(e,function(n,t){return n.map(function(n){return{value:n,delta:t+1}})})},function(n){return D.some({value:n,delta:1})});return e.bind(function(n){return r.map(function(t){var e=t.delta+n.delta;return Math.abs(t.value-n.value)/e})})},lc=function(){var n=qe().browser;return n.isIE()||n.isEdge()},fc=function(n,t){var e=parseFloat(n);return isNaN(e)?t:e},sc=function(n,t,e){return fc(Rr(n,t),e)},dc=function(n){var t=n.dom().getBoundingClientRect().height,e=Rr(n,"box-sizing");if("border-box"===e)return t;var r=sc(n,"padding-top",0),o=sc(n,"padding-bottom",0),u=sc(n,"border-top-width",0),i=sc(n,"border-bottom-width",0),c=u+i;return t-r-o-c},mc=function(n){var t=n.dom().getBoundingClientRect().width,e=Rr(n,"box-sizing");if("border-box"===e)return t;var r=sc(n,"padding-left",0),o=sc(n,"padding-right",0),u=sc(n,"border-left-width",0),i=sc(n,"border-right-width",0),c=u+i;return t-r-o-c},gc=function(n){return lc()?dc(n):sc(n,"height",Fi(n))},pc=function(n){return lc()?mc(n):sc(n,"width",qi(n))},vc=/(\d+(\.\d+)?)(\w|%)*/,hc=/(\d+(\.\d+)?)%/,bc=/(\d+(\.\d+)?)px|em/,wc=function(n,t){var e=or(n).getOr(yr(Ze(n)));return t(n)/t(e)*100},yc=function(n,t){xr(n,"width",t+"px")},Sc=function(n,t){xr(n,"width",t+"%")},Cc=function(n,t){xr(n,"height",t+"px")},xc=function(n){return Dr(n,"height").getOrThunk(function(){return gc(n)+"px"})},Tc=function(n,t,e,r){var o=Ro(n).map(function(n){var r=e(n);return Math.floor(t/100*r)}).getOr(t);return r(n,o),o},Rc=function(n,t,e,r){var o=parseInt(n,10);return Ht(n,"%")&&"table"!==xt(t)?Tc(t,o,e,r):o},Oc=function(n){var t=xc(n);return t?Rc(t,n,Fi,Cc):Fi(n)},Dc=function(n,t,e){var r=e(n),o=go(n,t);return r/o},Ac=function(n){var t=Dr(n,"width");return t.fold(function(){return D.from(Mt(n,"width"))},function(n){return D.some(n)})},Bc=function(n,t){return n/t.pixelWidth()*100},Ic=function(n,t,e){var r=hc.exec(t);if(null!==r)return parseFloat(r[1]);var o=pc(n);return Bc(o,e)},Pc=function(n,t){var e=Ac(n);return e.fold(function(){var e=qi(n);return Bc(e,t)},function(e){return Ic(n,e,t)})},kc=function(n,t){return n/100*t.pixelWidth()},Ec=function(n,t,e){var r=bc.exec(t);if(null!==r)return parseInt(r[1],10);var o=hc.exec(t);if(null!==o){var u=parseFloat(o[1]);return kc(u,e)}return pc(n)},Mc=function(n,t){var e=Ac(n);return e.fold(function(){return pc(n)},function(e){return Ec(n,e,t)})},Nc=function(n){return Dc(n,"rowspan",Oc)},_c=function(n){var t=Ac(n);return t.bind(function(n){var t=vc.exec(n);return null!==t?D.some({width:h(parseFloat(t[1])),unit:h(t[3])}):D.none()})},Wc=function(n,t,e){xr(n,"width",t+e)},jc=function(n){return qi(n)+"px"},zc=function(n){return wc(n,qi)+"%"},Fc=function(n){return Ac(n).exists(function(n){return hc.test(n)})},Lc=function(n){return Ac(n).exists(function(n){return bc.test(n)})},Hc=function(n){return Ac(n).isNone()},qc=h(hc),Vc=h(bc),Uc=function(n,t,e){return Dr(n,t).fold(function(){return e(n)+"px"},function(n){return n})},Kc=function(n,t){return Uc(n,"width",function(n){return Mc(n,t)})},$c=function(n){return Uc(n,"height",Nc)},Gc=function(n,t,e,r,o){var u=uc(n),i=K(u,function(n){return n.map(t.edge)});return K(u,function(n,t){var u=n.filter(w(po));return u.fold(function(){var n=ac(i,t);return r(n)},function(n){return e(n,o)})})},Xc=function(n){return n.map(function(n){return n+"px"}).getOr("")},Yc=function(n,t,e){return Gc(n,t,Kc,Xc,e)},Jc=function(n,t,e){return Gc(n,t,Pc,function(n){return n.fold(function(){return e.minCellWidth()},function(n){return n/e.pixelWidth()*100})},e)},Qc=function(n,t,e){return Gc(n,t,Mc,function(n){return n.getOrThunk(e.minCellWidth)},e)},Zc=function(n,t,e,r){var o=cc(n),u=K(o,function(n){return n.map(t.edge)});return K(o,function(n,t){var o=n.filter(w(vo));return o.fold(function(){var n=ac(u,t);return r(n)},function(n){return e(n)})})},na=function(n,t){return Zc(n,t,Nc,function(n){return n.getOrThunk(wo)})},ta=function(n,t){return Zc(n,t,$c,Xc)},ea=di.generate([{invalid:["raw"]},{pixels:["value"]},{percent:["value"]}]),ra=function(n,t,e){var r=e.substring(0,e.length-n.length),o=parseFloat(r);return r===o.toString()?t(o):ea.invalid(e)},oa=function(n){return Ht(n,"%")?ra("%",ea.percent,n):Ht(n,"px")?ra("px",ea.pixels,n):ea.invalid(n)},ua=te(te({},ea),{from:oa}),ia=function(n,t){return K(n,function(n){var e=ua.from(n);return e.fold(function(){return n},function(n){var e=n/t*100;return e+"%"},function(n){return n+"%"})})},ca=function(n,t,e){var r=e/t;return K(n,function(n){var t=ua.from(n);return t.fold(function(){return n},function(n){return n*r+"px"},function(n){return n/100*e+"px"})})},aa=function(n,t){var e=n.fold(function(){return h("")},function(n){var e=n/t;return h(e+"px")},function(n){var e=n/t;return h(e+"px")});return U(t,e)},la=function(n,t,e){return n.fold(function(){return t},function(n){return ca(t,e,n)},function(){return ia(t,e)})},fa=function(n,t,e){var r=ua.from(e),o=rt(n,function(n){return"0px"===n})?aa(r,n.length):la(r,n,t);return ga(o)},sa=function(n,t){return 0===n.length?t:Y(n,function(n,t){return ua.from(t).fold(h(0),b,b)+n},0)},da=function(n,t){var e=Math.floor(n);return{value:e+t,remainder:n-e}},ma=function(n,t){return ua.from(n).fold(h(n),function(n){return n+t+"px"},function(n){return n+t+"%"})},ga=function(n){if(0===n.length)return n;var t=Y(n,function(n,t){var e=ua.from(t).fold(function(){return{value:t,remainder:0}},function(n){return da(n,"px")},function(n){return{value:n+"%",remainder:0}});return{output:[e.value].concat(n.output),remainder:n.remainder+e.remainder}},{output:[],remainder:0}),e=t.output;return e.slice(0,e.length-1).concat([ma(e[e.length-1],Math.round(t.remainder))])},pa=ua.from,va=function(n,t,e){$(t,function(t){var r=n.slice(t.column(),t.colspan()+t.column()),o=sa(r,bo());xr(t.element(),"width",o+e)})},ha=function(n,t,e,r){$(e,function(t){var e=n.slice(t.row(),t.rowspan()+t.row()),o=sa(e,wo());xr(t.element(),"height",o+r)}),$(t,function(t,e){xr(t.element(),"height",n[e])})},ba=function(n){return pa(n).fold(h("px"),h("px"),h("%"))},wa=function(n,t,e,r,o){var u=_o.fromTable(n),i=u.all,c=_o.justCells(u);t.each(function(t){var e=ba(t),i=qi(n),a=Yc(u,r,o),l=fa(a,i,t);va(l,c,e),xr(n,"width",t)}),e.each(function(t){var e=ba(t),r=Fi(n),o=ta(u,ec),a=fa(o,r,t);ha(a,i,c,e),xr(n,"height",t)})},ya=Fc,Sa=Lc,Ca=Hc,xa=zc,Ta={ltr:rc,rtl:oc},Ra=function(n){var t=function(t){return n(t).isRtl()?Ta.rtl:Ta.ltr},e=function(n,e){return t(e).delta(n,e)},r=function(n,e){return t(e).positions(n,e)},o=function(n){return t(n).edge(n)};return{delta:e,edge:o,positions:r}},Oa=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(n.length!==t.length)throw new Error('Wrong number of arguments to struct. Expected "['+n.length+']", got '+t.length+" arguments");var r={};return $(n,function(n,e){r[n]=h(t[e])}),r}},Da=function(n){var t=Oa.apply(null,n),e=[],r=function(n){if(void 0===n)throw new Error("Event bind error: undefined handler");e.push(n)},o=function(n){e=X(e,function(t){return t!==n})},u=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=t.apply(null,n);$(e,function(n){n(o)})};return{bind:r,unbind:o,trigger:u}},Aa=function(n){var t=st(n,function(n){return{bind:n.bind,unbind:n.unbind}}),e=st(n,function(n){return n.trigger});return{registry:t,trigger:e}},Ba=di.generate([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}]),Ia=te({},Ba),Pa=function(n,t){return 0===n.length?Ia.none():1===n.length?Ia.only(0):0===t?Ia.left(0,1):t===n.length-1?Ia.right(t-1,t):t>0&&t<n.length-1?Ia.middle(t-1,t,t+1):Ia.none()},ka=function(n,t,e,r){var o=n.slice(0),u=Pa(n,t),i=function(n){return K(n,h(0))},c=h(i(o)),a=function(n){return r.singleColumnWidth(o[n],e)},l=function(n,t){if(e>=0){var u=Math.max(r.minCellWidth(),o[t]-e);return i(o.slice(0,n)).concat([e,u-o[t]]).concat(i(o.slice(t+1)))}var c=Math.max(r.minCellWidth(),o[n]+e),a=o[n]-c;return i(o.slice(0,n)).concat([c-o[n],a]).concat(i(o.slice(t+1)))},f=l,s=function(n,t,e){return l(t,e)},d=function(n,t){if(e>=0)return i(o.slice(0,t)).concat([e]);var u=Math.max(r.minCellWidth(),o[t]+e);return i(o.slice(0,t)).concat([u-o[t]])};return u.fold(c,a,f,s,d)},Ea=function(n,t,e){for(var r=0,o=n;t>o;o++)r+=void 0!==e[o]?e[o]:0;return r},Ma=function(n,t){var e=_o.justCells(n);return K(e,function(n){var e=Ea(n.column(),n.column()+n.colspan(),t);return{element:n.element(),width:e,colspan:n.colspan()}})},Na=function(n,t){var e=_o.justCells(n);return K(e,function(n){var e=Ea(n.row(),n.row()+n.rowspan(),t);return{element:n.element,height:h(e),rowspan:n.rowspan}})},_a=function(n,t){return K(n.all,function(n,e){return{element:n.element,height:h(t[e])}})},Wa=function(n){return Y(n,function(n,t){return n+t},0)},ja=function(n,t,e,r,o){var u=o.getCellDelta(t),i=_o.fromTable(n),c=o.getWidths(i,r,o),a=ka(c,e,u,o),l=K(a,function(n,t){return n+c[t]}),f=Ma(i,l);$(f,function(n){o.setElementWidth(n.element,n.width)}),e===i.grid.columns()-1&&o.adjustTableWidth(u)},za=function(n,t,e,r){var o=_o.fromTable(n),u=na(o,r),i=K(u,function(n,r){return e===r?Math.max(t+n,wo()):n}),c=Na(o,i),a=_a(o,i);$(a,function(n){Cc(n.element(),n.height())}),$(c,function(n){Cc(n.element(),n.height())});var l=Wa(i);Cc(n,l)},Fa=function(n,t,e,r){var o=_o.generate(t),u=r.getWidths(o,e,r),i=Ma(o,u);$(i,function(n){r.setElementWidth(n.element,n.width)})},La=function(n,t,e,r,o,u,i){return{target:h(n),x:h(t),y:h(e),stop:r,prevent:o,kill:u,raw:h(i)}},Ha=function(n){var t=Qt.fromDom(vr(n).getOr(n.target)),e=function(){return n.stopPropagation()},r=function(){return n.preventDefault()},o=p(r,e);return La(t,n.clientX,n.clientY,e,r,o,n)},qa=function(n,t){return function(e){n(e)&&t(Ha(e))}},Va=function(n,e,r,o,u){var i=qa(r,o);return n.dom().addEventListener(e,i,u),{unbind:t(Ka,n,e,i,u)}},Ua=function(n,t,e,r){return Va(n,t,e,r,!1)},Ka=function(n,t,e,r){n.dom().removeEventListener(t,e,r)},$a=h(!0),Ga=function(n,t,e){return Ua(n,t,$a,e)},Xa=Ha,Ya=function(n,t){var e=Mt(n,t);return void 0===e||""===e?[]:e.split(" ")},Ja=function(n,t,e){var r=Ya(n,t),o=r.concat([e]);return kt(n,t,o.join(" ")),!0},Qa=function(n,t,e){var r=X(Ya(n,t),function(n){return n!==e});return r.length>0?kt(n,t,r.join(" ")):Wt(n,t),!1},Za=function(n){return void 0!==n.dom().classList},nl=function(n){return Ya(n,"class")},tl=function(n,t){return Ja(n,"class",t)},el=function(n,t){return Qa(n,"class",t)},rl=function(n,t){Za(n)?n.dom().classList.add(t):tl(n,t)},ol=function(n){var t=Za(n)?n.dom().classList:nl(n);0===t.length&&Wt(n,"class")},ul=function(n,t){if(Za(n)){var e=n.dom().classList;e.remove(t)}else el(n,t);ol(n)},il=function(n,t){return Za(n)&&n.dom().classList.contains(t)},cl=function(n){var t=n.replace(/\./g,"-"),e=function(n){return t+"-"+n};return{resolve:e}},al=cl("ephox-dragster"),ll=al.resolve,fl=function(n){var t=te({layerClass:ll("blocker")},n),e=Qt.fromTag("div");kt(e,"role","presentation"),Tr(e,{position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%"}),rl(e,ll("blocker")),rl(e,t.layerClass);var r=function(){return e},o=function(){zr(e)};return{element:r,destroy:o}},sl=function(n){return n.slice(0).sort()},dl=function(n,t){throw new Error("All required keys ("+sl(n).join(", ")+") were not specified. Specified keys were: "+sl(t).join(", ")+".")},ml=function(n){throw new Error("Unsupported keys for object: "+sl(n).join(", "))},gl=function(n,t){if(!E(t))throw new Error("The "+n+" fields must be an array. Was: "+t+".");$(t,function(t){if(!P(t))throw new Error("The value "+t+" in the "+n+" fields was not a string.")})},pl=function(n,t){throw new Error("All values need to be of type: "+t+". Keys ("+sl(n).join(", ")+") were not.")},vl=function(n){var t=sl(n),e=Z(t,function(n,e){return e<t.length-1&&n===t[e+1]});e.each(function(n){throw new Error("The field: "+n+" occurs more than once in the combined fields: ["+t.join(", ")+"].")})},hl=function(n,t){return bl(n,t,{validate:W,label:"function"})},bl=function(n,t,e){if(0===t.length)throw new Error("You must specify at least one required field.");return gl("required",t),vl(t),function(r){var o=at(r),u=rt(t,function(n){return q(o,n)});u||dl(t,o),n(t,o);var i=X(t,function(n){return!e.validate(r[n],n)});return i.length>0&&pl(i,e.label),r}},wl=function(n,t){var e=X(t,function(t){return!q(n,t)});e.length>0&&ml(e)},yl=function(n){return hl(wl,n)},Sl=yl(["compare","extract","mutate","sink"]),Cl=yl(["element","start","stop","destroy"]),xl=yl(["forceDrop","drop","move","delayDrop"]),Tl=function(n,t){return Ii(t.left()-n.left(),t.top()-n.top())},Rl=function(n){return D.some(Ii(n.x(),n.y()))},Ol=function(n,t){n.mutate(t.left(),t.top())},Dl=function(n,t){var e=fl(t),r=Ga(e.element(),"mousedown",n.forceDrop),o=Ga(e.element(),"mouseup",n.drop),u=Ga(e.element(),"mousemove",n.move),i=Ga(e.element(),"mouseout",n.delayDrop),c=function(){e.destroy(),o.unbind(),u.unbind(),i.unbind(),r.unbind()},a=function(n){Er(n,e.element())},l=function(){zr(e.element())};return Cl({element:e.element,start:a,stop:l,destroy:c})},Al=Sl({compare:Tl,extract:Rl,sink:Dl,mutate:Ol}),Bl=function(t,e){var r=null,o=function(){null!==r&&(n.clearTimeout(r),r=null)},u=function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];null!==r&&n.clearTimeout(r),r=n.setTimeout(function(){t.apply(null,o),r=null},e)};return{cancel:o,throttle:u}},Il=function(n,t,e){var r=!1,o=Aa({start:Da([]),stop:Da([])}),u=a(),i=function(){g.stop(),u.isOn()&&(u.off(),o.trigger.stop())},c=Bl(i,200),l=function(n){g.start(n),u.on(),o.trigger.start()},f=function(n){c.cancel(),u.onEvent(n,t)};u.events.move.bind(function(e){t.mutate(n,e.info())});var s=function(){r=!0},d=function(){r=!1},m=function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];r&&n.apply(null,t)}},g=t.sink(xl({forceDrop:i,drop:m(i),move:m(f),delayDrop:m(c.throttle)}),e),p=function(){g.destroy()};return{element:g.element,go:l,on:s,off:d,destroy:p,events:o.registry}},Pl=function(n,t){void 0===t&&(t={});var e=void 0!==t.mode?t.mode:Al;return Il(n,e,t)},kl=function(n){return"true"===Mt(n,"contenteditable")},El=function(n,t){return so(n,"[contenteditable]",t)},Ml=cl("ephox-snooker"),Nl=Ml.resolve,_l=function(){var n=Aa({drag:Da(["xDelta","yDelta"])}),t=function(t,e){n.trigger.drag(t,e)};return{mutate:t,events:n.registry}},Wl=function(){var n=Aa({drag:Da(["xDelta","yDelta","target"])}),t=D.none(),e=_l();e.events.drag.bind(function(e){t.each(function(t){n.trigger.drag(e.xDelta(),e.yDelta(),t)})});var r=function(n){t=D.some(n)},o=function(){return t};return{assign:r,get:o,mutate:e.mutate,events:n.registry}},jl=function(n,t,e,r,o){var u=Qt.fromTag("div");return Tr(u,{position:"absolute",left:t-r/2+"px",top:e+"px",height:o+"px",width:r+"px"}),Et(u,{"data-column":n,role:"presentation"}),u},zl=function(n,t,e,r,o){var u=Qt.fromTag("div");return Tr(u,{position:"absolute",left:t+"px",top:e-o/2+"px",height:o+"px",width:r+"px"}),Et(u,{"data-row":n,role:"presentation"}),u},Fl=Nl("resizer-bar"),Ll=Nl("resizer-rows"),Hl=Nl("resizer-cols"),ql=7,Vl=function(n){var t=ro(n.parent(),"."+Fl);$(t,zr)},Ul=function(n,t,e){var r=n.origin();$(t,function(t){t.each(function(t){var o=e(r,t);rl(o,Fl),Er(n.parent(),o)})})},Kl=function(n,t,e,r){Ul(n,t,function(n,t){var o=jl(t.col,t.x-n.left(),e.top()-n.top(),ql,r);return rl(o,Hl),o})},$l=function(n,t,e,r){Ul(n,t,function(n,t){var o=zl(t.row,e.left()-n.left(),t.y-n.top(),r,ql);return rl(o,Ll),o})},Gl=function(n,t,e,r,o,u){var i=Ei(t),c=e.length>0?o.positions(e,t):[];$l(n,c,i,Vi(t));var a=r.length>0?u.positions(r,t):[];Kl(n,a,i,Li(t))},Xl=function(n,t,e,r){Vl(n);var o=_o.fromTable(t),u=cc(o),i=uc(o);Gl(n,t,u,i,e,r)},Yl=function(n,t){var e=ro(n.parent(),"."+Fl);$(e,t)},Jl=function(n){Yl(n,function(n){xr(n,"display","none")})},Ql=function(n){Yl(n,function(n){xr(n,"display","block")})},Zl=function(n){return il(n,Ll)},nf=function(n){return il(n,Hl)},tf=Nl("resizer-bar-dragging"),ef=function(n,e,r){var o=Wl(),u=Pl(o,{}),i=D.none(),c=function(n,t){return D.from(Mt(n,t))};o.events.drag.bind(function(n){c(n.target(),"data-row").each(function(){var t=ho(n.target(),"top");xr(n.target(),"top",t+n.yDelta()+"px")}),c(n.target(),"data-column").each(function(){var t=ho(n.target(),"left");xr(n.target(),"left",t+n.xDelta()+"px")})});var a=function(n,t){var e=ho(n,t),r=mo(n,"data-initial-"+t,0);return e-r};u.events.stop.bind(function(){o.get().each(function(t){i.each(function(o){c(t,"data-row").each(function(n){var e=a(t,"top");Wt(t,"data-initial-top"),v.trigger.adjustHeight(o,e,parseInt(n,10))}),c(t,"data-column").each(function(n){var e=a(t,"left");Wt(t,"data-initial-left"),v.trigger.adjustWidth(o,e,parseInt(n,10))}),Xl(n,o,r,e)})})});var l=function(t,e){v.trigger.startAdjust(),o.assign(t),kt(t,"data-initial-"+e,ho(t,e)),rl(t,tf),xr(t,"opacity","0.2"),u.go(n.parent())},f=Ga(n.parent(),"mousedown",function(n){Zl(n.target())&&l(n.target(),"top"),nf(n.target())&&l(n.target(),"left")}),s=function(t){return Ge(t,n.view())},d=function(n){return so(n,"table",s).filter(function(n){return El(n,s).exists(kl)})},m=Ga(n.view(),"mouseover",function(t){d(t.target()).fold(function(){br(t.target())&&Vl(n)},function(t){i=D.some(t),Xl(n,t,r,e)})}),g=function(){f.unbind(),m.unbind(),u.destroy(),Vl(n)},p=function(t){Xl(n,t,r,e)},v=Aa({adjustHeight:Da(["table","delta","row"]),adjustWidth:Da(["table","delta","column"]),startAdjust:Da([])});return{destroy:g,refresh:p,on:u.on,off:u.off,hideBars:t(Jl,n),showBars:t(Ql,n),events:v.registry}},rf=function(n,t,e){var r=ec,o=ef(n,t,r),u=Aa({beforeResize:Da(["table"]),afterResize:Da(["table"]),startDrag:Da([])});return o.events.adjustHeight.bind(function(n){var t=n.table();u.trigger.beforeResize(t);var e=r.delta(n.delta(),t);za(t,e,n.row(),r),u.trigger.afterResize(t)}),o.events.startAdjust.bind(function(){u.trigger.startDrag()}),o.events.adjustWidth.bind(function(n){var r=n.table();u.trigger.beforeResize(r);var o=t.delta(n.delta(),r),i=e(r);ja(r,o,n.column(),t,i),u.trigger.afterResize(r)}),{on:o.on,off:o.off,hideBars:o.hideBars,showBars:o.showBars,destroy:o.destroy,events:u.registry}},of={create:rf},uf=function(n,t){return n.fire("newrow",{node:t})},cf=function(n,t){return n.fire("newcell",{node:t})},af=function(n,t,e,r){n.fire("ObjectResizeStart",{target:t,width:e,height:r})},lf=function(n,t,e,r){n.fire("ObjectResized",{target:t,width:e,height:r})},ff=function(n,t,e,r,o){n.fire("TableSelectionChange",{cells:t,start:e,finish:r,otherCells:o})},sf=function(n){n.fire("TableSelectionClear")},df="tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol",mf={"border-collapse":"collapse",width:"100%"},gf=function(n){if(kf(n)){var t=n.getBody().offsetWidth;return te(te({},mf),{width:t+"px"})}return Ef(n)?pt(mf,function(n,t){return"width"!==t}):mf},pf={border:"1"},vf=function(n){return n.getParam("table_sizing_mode","auto")},hf=function(n){return n.getParam("table_responsive_width")},bf=function(n){return n.getParam("table_default_attributes",pf,"object")},wf=function(n){return n.getParam("table_default_styles",gf(n),"object")},yf=function(n){return n.getParam("table_resize_bars",!0,"boolean")},Sf=function(n){return n.getParam("table_tab_navigation",!0,"boolean")},Cf=function(n){return n.getParam("table_cell_advtab",!0,"boolean")},xf=function(n){return n.getParam("table_row_advtab",!0,"boolean")},Tf=function(n){return n.getParam("table_advtab",!0,"boolean")},Rf=function(n){return n.getParam("table_appearance_options",!0,"boolean")},Of=function(n){return n.getParam("table_grid",!0,"boolean")},Df=function(n){return n.getParam("table_style_by_css",!1,"boolean")},Af=function(n){return n.getParam("table_cell_class_list",[],"array")},Bf=function(n){return n.getParam("table_row_class_list",[],"array")},If=function(n){return n.getParam("table_class_list",[],"array")},Pf=function(n){return"relative"===vf(n)||hf(n)===!0},kf=function(n){return"fixed"===vf(n)||hf(n)===!1},Ef=function(n){return"responsive"===vf(n)},Mf=function(n){return n.getParam("table_toolbar",df)},Nf=function(n){var t="section",e=n.getParam("table_header_type",t,"string"),r=["section","cells","sectionCells","auto"];return q(r,e)?e:t},_f=function(n){var t=n.getParam("table_clone_elements");return P(t)?D.some(t.split(/[ ,]/)):Array.isArray(t)?D.some(t):D.none()},Wf=function(n){var t=n.getParam("object_resizing",!0);return P(t)?"table"===t:t},jf=function(n){return n.nodeName.toLowerCase()},zf=function(n){return Qt.fromDom(n.getBody())},Ff=function(n){return n.getBoundingClientRect().width},Lf=function(n){return n.getBoundingClientRect().height},Hf=function(n){return function(t){return Ge(t,zf(n))}},qf=function(n){return n?n.replace(/px$/,""):""},Vf=function(n){return/^\d+(\.\d+)?$/.test(n)?n+"px":n},Uf=function(n){Wt(n,"data-mce-style"),$(To(n),function(n){return Wt(n,"data-mce-style")})},Kf=function(n,t){var e=n.dom.getStyle(t,"width")||n.dom.getAttrib(t,"width");return D.from(e).filter(Ut)},$f=function(n){return/^(\d+(\.\d+)?)%$/.test(n)},Gf=function(n){return"rtl"===Rr(n,"direction")?"rtl":"ltr"},Xf={isRtl:h(!1)},Yf={isRtl:h(!0)},Jf=function(n){var t=Gf(n);return"rtl"===t?Yf:Xf},Qf=function(n){var t=n,e=function(){return t},r=function(n){t=n};return{get:e,set:r}},Zf=function(n){var t=function(){return qi(n)},e=h(0);return{width:t,pixelWidth:t,getWidths:Qc,getCellDelta:e,singleColumnWidth:h([0]),minCellWidth:e,setElementWidth:g,adjustTableWidth:g,label:"none"}},ns=function(n,t){var e=Qf(parseFloat(n)),r=Qf(qi(t)),o=function(n){return n/r.get()*100},u=function(n){return[100-n]},i=function(){return bo()/r.get()*100},c=function(n){var o=e.get(),u=n/100*o,i=o+u;Sc(t,i),e.set(i),r.set(qi(t))};return{width:e.get,pixelWidth:r.get,getWidths:Jc,getCellDelta:o,singleColumnWidth:u,minCellWidth:i,setElementWidth:Sc,adjustTableWidth:c,label:"percent"}},ts=function(n,t){var e=Qf(n),r=e.get,o=b,u=function(n,t){var e=Math.max(bo(),n+t);return[e-n]},i=function(n){var o=r()+n;yc(t,o),e.set(o)};return{width:r,pixelWidth:r,getWidths:Qc,getCellDelta:o,singleColumnWidth:u,minCellWidth:bo,setElementWidth:yc,adjustTableWidth:i,label:"pixel"}},es=function(n,t){var e=qc().exec(t);if(null!==e)return ns(e[1],n);var r=Vc().exec(t);if(null!==r){var o=parseInt(r[1],10);return ts(o,n)}var u=qi(n);return ts(u,n)},rs=function(n){var t=Ac(n);return t.fold(function(){return Zf(n)},function(t){return es(n,t)})},os={getTableSize:rs,pixelSize:ts,percentageSize:ns,noneSize:Zf},us=function(n,t){if(Pf(n)){var e=Kf(n,t.dom()).filter($f).getOrThunk(function(){return xa(t)});return os.percentageSize(e,t)}return kf(n)?os.pixelSize(qi(t),t):os.getTableSize(t)},is=function(n){Wt(n,"width")},cs=function(n,t,e){var r=zc(n);wa(n,D.some(r),D.none(),t,e),is(n)},as=function(n,t,e){var r=jc(n);wa(n,D.some(r),D.none(),t,e),is(n)},ls=function(n){Ar(n,"width"),$(To(n),function(n){Ar(n,"width"),is(n)}),is(n)},fs=function(n,t){var e=Ra(Jf),r=us(n,t);cs(t,e,r)},ss=function(n,t){var e=Ra(Jf),r=us(n,t);as(t,e,r)},ds=ls,ms=function(n){$(To(n),function(n){var t=Rr(n,"width");xr(n,"width",t),Wt(n,"width")})},gs=function(){var n=Qt.fromTag("div");return Tr(n,{position:"static",height:"0",width:"0",padding:"0",margin:"0",border:"0"}),Er(wr(),n),n},ps=function(n){return n.inline?ji.body(zf(n),gs()):ji.only(Qt.fromDom(n.getDoc()))},vs=function(n,t){n.inline&&zr(t.parent())},hs=function(n){var t,e,r=D.none(),o=D.none(),u=D.none(),i=function(n){return"TABLE"===n.nodeName},c=function(){return o},a=function(){return u.getOr(ji.only(Qt.fromDom(n.getBody())))},l=function(){o.each(function(n){n.destroy()}),u.each(function(t){vs(n,t)})};return n.on("init",function(){var t=Ra(Jf),e=ps(n);if(u=D.some(e),Wf(n)&&yf(n)){var i=function(t){return us(n,t)},c=of.create(e,t,i);c.on(),c.events.startDrag.bind(function(){r=D.some(n.selection.getRng())}),c.events.beforeResize.bind(function(t){var e=t.table().dom();af(n,e,Ff(e),Lf(e))}),c.events.afterResize.bind(function(t){var e=t.table(),o=e.dom();Uf(e),r.each(function(t){n.selection.setRng(t),n.focus()}),lf(n,o,Ff(o),Lf(o)),n.undoManager.add()}),o=D.some(c)}}),n.on("ObjectResizeStart",function(r){var o=r.target;if(i(o)){var u=Qt.fromDom(o);!Sa(u)&&kf(n)?ss(n,u):!ya(u)&&Pf(n)&&fs(n,u),t=r.width,e=Kf(n,o).getOr("")}}),n.on("ObjectResized",function(r){var o=r.target;if(i(o)){var u=Qt.fromDom(o);if(""===e||!$f(e)&&Ef(n))fs(n,u);else if($f(e)){var c=parseFloat(e.replace("%","")),a=r.width*c/t;xr(u,"width",a+"%")}else ms(u);Uf(u)}}),n.on("SwitchMode",function(){c().each(function(t){n.mode.isReadOnly()?t.hideBars():t.showBars()})}),{lazyResize:c,lazyWire:a,destroy:l}},bs=function(n,t){return{element:h(n),offset:h(t)}},ws=function(n,t,e){return n.property().isText(t)&&0===n.property().getText(t).trim().length||n.property().isComment(t)?e(t).bind(function(t){return ws(n,t,e).orThunk(function(){return D.some(t)})}):D.none()},ys=function(n,t){if(n.property().isText(t))return n.property().getText(t).length;var e=n.property().children(t);return e.length},Ss=function(n,t){var e=ws(n,t,n.query().prevSibling).getOr(t);if(n.property().isText(e))return bs(e,ys(n,e));var r=n.property().children(e);return r.length>0?Ss(n,r[r.length-1]):bs(e,ys(n,e))},Cs=Ss,xs=o(),Ts=function(n){return Cs(xs,n)},Rs=function(n,t){var e=_c(n);e.each(function(e){var r=e.width()/2;Wc(n,r,e.unit()),Wc(t,r,e.unit())})},Os=function(n){var t=_o.fromTable(n);return t.grid},Ds=function(n){for(var t=[],e=function(n){t.push(n)},r=0;r<n.length;r++)n[r].each(e);return t},As=function(n,t,e){return n.isSome()&&t.isSome()?D.some(e(n.getOrDie(),t.getOrDie())):D.none()},Bs=function(n,t,e,r){e===r?Wt(n,t):kt(n,t,e)},Is=function(n,e){var r=[],o=[],u=it(eo(n,"caption,colgroup")).fold(function(){return t(kr,n)},function(n){return t(Pr,n)}),i=function(t,e){var i=lo(n,e).getOrThunk(function(){var t=Qt.fromTag(e,Ze(n).dom());return"thead"===e?u(t):Er(n,t),t
});jr(i);var c=K(t,function(n){n.isNew()&&r.push(n.element());var t=n.element();return jr(t),$(n.cells(),function(n){n.isNew()&&o.push(n.element()),Bs(n.element(),"colspan",n.colspan(),1),Bs(n.element(),"rowspan",n.rowspan(),1),Er(t,n.element())}),t});Wr(i,c)},c=function(t){lo(n,t).each(zr)},a=function(n,t){n.length>0?i(n,t):c(t)},l=[],f=[],s=[];return $(e,function(n){switch(n.section()){case"thead":l.push(n);break;case"tbody":f.push(n);break;case"tfoot":s.push(n)}}),a(l,"thead"),a(f,"tbody"),a(s,"tfoot"),{newRows:r,newCells:o}},Ps=function(n){return K(n,function(n){var t=eu(n.element());return $(n.cells(),function(n){var e=ru(n.element());Bs(e,"colspan",n.colspan(),1),Bs(e,"rowspan",n.rowspan(),1),Er(t,e)}),t})},ks=function(n,t,e){var r=n.cells(),o=r.slice(0,t),u=r.slice(t),i=o.concat([e]).concat(u);return Ms(n,i)},Es=function(n,t,e){var r=n.cells();r[t]=e},Ms=function(n,t){return Xr(t,n.section())},Ns=function(n,t){var e=n.cells(),r=K(e,t);return Xr(r,n.section())},_s=function(n,t){return n.cells()[t]},Ws=function(n,t){return _s(n,t).element()},js=function(n){return n.cells().length},zs=function(n,t){return K(n,function(n){return _s(n,t)})},Fs=function(n,t){return n[t]},Ls=function(n,t){if(0===n.length)return 0;var e=n[0],r=nt(n,function(n){return!t(e.element(),n.element())});return r.fold(function(){return n.length},function(n){return n})},Hs=function(n,t,e,r){var o=Fs(n,t).cells().slice(e),u=Ls(o,r),i=zs(n,e).slice(t),c=Ls(i,r);return{colspan:u,rowspan:c}},qs=function(n,t){var e=K(n,function(n){return K(n.cells(),function(){return!1})}),r=function(n,t,r,o){for(var u=n;n+r>u;u++)for(var i=t;t+o>i;i++)e[u][i]=!0};return K(n,function(o,u){var i=et(o.cells(),function(o,i){if(e[u][i]===!1){var c=Hs(n,u,i,t);return r(u,i,c.rowspan,c.colspan),[Vr(o.element(),c.rowspan,c.colspan,o.isNew())]}return[]});return Yr(i,o.section())})},Vs=function(n,t,e){for(var r=[],o=0;o<n.grid.rows();o++){for(var u=[],i=0;i<n.grid.columns();i++){var c=_o.getAt(n,o,i).map(function(n){return $r(n.element(),e)}).getOrThunk(function(){return $r(t.gap(),!0)});u.push(c)}var a=Xr(u,n.all[o].section());r.push(a)}return r},Us=function(n,t){return Vs(n,t,!1)},Ks=function(n,t){var e=function(n){var e=ct(n,function(n){return er(n.element()).map(function(n){var t=er(n).isNone();return $r(n,t)})});return e.getOrThunk(function(){return $r(t.row(),!0)})};return K(n,function(n){var t=e(n.details());return Gr(t.element(),n.details(),n.section(),t.isNew())})},$s=function(n,t){var e=qs(n,Ge);return Ks(e,t)},Gs=function(n,t){return ct(n.all,function(n){return Z(n.cells(),function(n){return Ge(t,n.element())})})},Xs=function(n,t,e,r,o){return function(u,i,c,a,l,f){var s=_o.fromTable(i),d=t(s,c).map(function(t){var e=Us(s,a),r=n(e,t,Ge,o(a)),u=$s(r.grid(),a);return{grid:h(u),cursor:r.cursor}});return d.fold(function(){return D.none()},function(n){var t=Is(i,n.grid()),o=D.from(f).getOrThunk(function(){return os.getTableSize(i)});return e(i,n.grid(),l,o),r(i),Xl(u,i,ec,l),D.some({cursor:n.cursor,newRows:h(t.newRows),newCells:h(t.newCells)})})}},Ys=function(n,t){return xo(t.element()).bind(function(t){return Gs(n,t)})},Js=function(n,t){return xo(t.element()).bind(function(e){return Gs(n,e).map(function(n){var e=te(te({},n),{generators:t.generators,clipboard:t.clipboard});return e})})},Qs=function(n,t){var e=K(t.selection(),function(t){return xo(t).bind(function(t){return Gs(n,t)})}),r=Ds(e);return r.length>0?D.some({cells:r,generators:t.generators,clipboard:t.clipboard}):D.none()},Zs=function(n,t){return t.mergable()},nd=function(n,t){return t.unmergable()},td=function(n,t){var e=K(t.selection(),function(t){return xo(t).bind(function(t){return Gs(n,t)})}),r=Ds(e);return r.length>0?D.some(r):D.none()},ed=function(n,t,e,r){if(0===n.length)return n;for(var o=t.startRow();o<=t.finishRow();o++)for(var u=t.startCol();u<=t.finishCol();u++)Es(n[o],u,$r(r(),!1));return n},rd=function(n,t,e,r){for(var o=!0,u=0;u<n.length;u++)for(var i=0;i<js(n[0]);i++){var c=Ws(n[u],i),a=e(c,t);a===!0&&o===!1?Es(n[u],i,$r(r(),!0)):a===!0&&(o=!1)}return n},od=function(n,t){return J(n,function(n,e){return V(n,function(n){return t(n.element(),e.element())})?n:n.concat([e])},[])},ud=function(n,t,e,r){return t>0&&t<n[0].cells().length&&$(n,function(n){var o=n.cells()[t-1],u=n.cells()[t],i=e(u.element(),o.element());i&&Es(n,t,$r(r(),!0))}),n},id=function(n,t,e,r){if(t>0&&t<n.length){var o=n[t-1].cells(),u=od(o,e);$(u,function(o){for(var u=D.none(),i=function(t){for(var i=function(i){var c=n[t].cells()[i],a=e(c.element(),o.element());a&&(u.isNone()&&(u=D.some(r())),u.each(function(e){Es(n[t],i,$r(e,!0))}))},c=0;c<js(n[0]);c++)i(c)},c=t;c<n.length;c++)i(c)})}return n},cd=function(n){var t=function(t){return n===t},e=function(){return cd(n)},r=function(){return cd(n)},o=function(t){return cd(t(n))},u=function(){return cd(n)},i=function(t){t(n)},c=function(t){return t(n)},a=function(t,e){return e(n)},l=function(t){return t(n)},f=function(t){return t(n)},s=function(){return D.some(n)};return{is:t,isValue:C,isError:S,getOr:h(n),getOrThunk:h(n),getOrDie:h(n),or:e,orThunk:r,fold:a,map:o,mapError:u,each:i,bind:c,exists:l,forall:f,toOption:s}},ad=function(n){var t=function(n){return n()},e=function(){return y(String(n))()},r=function(n){return n},o=function(n){return n()},u=function(){return ad(n)},i=function(t){return ad(t(n))},c=function(){return ad(n)},a=function(t){return t(n)};return{is:S,isValue:S,isError:C,getOr:b,getOrThunk:t,getOrDie:e,or:r,orThunk:o,fold:a,map:u,mapError:i,each:g,bind:c,exists:S,forall:C,toOption:D.none}},ld=function(n,t){return n.fold(function(){return ad(t)},cd)},fd={value:cd,error:ad,fromOption:ld},sd=function(n,t,e){if(n.row()>=t.length||n.column()>js(t[0]))return fd.error("invalid start address out of table bounds, row: "+n.row()+", column: "+n.column());var r=t.slice(n.row()),o=r[0].cells().slice(n.column()),u=js(e[0]),i=e.length;return fd.value({rowDelta:r.length-i,colDelta:o.length-u})},dd=function(n,t){var e=js(n[0]),r=js(t[0]);return{rowDelta:0,colDelta:e-r}},md=function(n,t){var e=n.length,r=t.length;return{rowDelta:e-r,colDelta:0}},gd=function(n,t){return K(n,function(){return $r(t.cell(),!0)})},pd=function(n,t,e){return n.concat(U(t,function(){return Ms(n[n.length-1],gd(n[n.length-1].cells(),e))}))},vd=function(n,t,e){return K(n,function(n){return Ms(n,n.cells().concat(gd(U(t,b),e)))})},hd=function(n,t,e){var r=t.colDelta<0?vd:b,o=t.rowDelta<0?pd:b,u=r(n,Math.abs(t.colDelta),e);return o(u,Math.abs(t.rowDelta),e)},bd=function(n,e,r,o){var u=_s(n[e],r),i=t(o,u.element()),c=n[e];return n.length>1&&js(c)>1&&(r>0&&i(Ws(c,r-1))||r<c.cells().length-1&&i(Ws(c,r+1))||e>0&&i(Ws(n[e-1],r))||e<n.length-1&&i(Ws(n[e+1],r)))},wd=function(n,t,e,r,o){for(var u=n.row(),i=n.column(),c=e.length,a=js(e[0]),l=u+c,f=i+a,s=u;l>s;s++)for(var d=i;f>d;d++){bd(t,s,d,o)&&rd(t,Ws(t[s],d),o,r.cell);var m=Ws(e[s-u],d-i),g=r.replace(m);Es(t[s],d,$r(g,!0))}return t},yd=function(n,t,e,r,o){var u=sd(n,t,e);return u.map(function(u){var i=hd(t,u,r);return wd(n,i,e,r,o)})},Sd=function(n,t,e,r,o){ud(t,n,o,r.cell);var u=md(e,t),i=hd(e,u,r),c=md(t,i),a=hd(t,c,r);return K(a,function(t,e){var r=t.cells().slice(0,n).concat(i[e].cells()).concat(t.cells().slice(n,t.cells().length));return Ms(t,r)})},Cd=function(n,t,e,r,o){id(t,n,o,r.cell);var u=dd(e,t),i=hd(e,u,r),c=dd(t,i),a=hd(t,c,r);return a.slice(0,n).concat(i).concat(a.slice(n,a.length))},xd=function(n,t,e,r,o){var u=n.slice(0,t),i=n.slice(t),c=Ns(n[e],function(e,u){var i=t>0&&t<n.length&&r(Ws(n[t-1],u),Ws(n[t],u)),c=i?_s(n[t],u):$r(o(e.element(),r),!0);return c});return u.concat([c]).concat(i)},Td=function(n,t,e,r,o){return K(n,function(n){var u=t>0&&t<js(n)&&r(Ws(n,t-1),Ws(n,t)),i=u?_s(n,t):$r(o(Ws(n,e),r),!0);return ks(n,t,i)})},Rd=function(n,t,e){var r=K(n,function(n){var r=n.cells().slice(0,t).concat(n.cells().slice(e+1));return Xr(r,n.section())});return X(r,function(n){return n.cells().length>0})},Od=function(n,t,e){return n.slice(0,t).concat(n.slice(e+1))},Dd=function(n,t,e,r){var o=function(n){return V(t,function(t){return e(n.element(),t.element())})};return K(n,function(n){return Ns(n,function(n){return o(n)?$r(r(n.element(),e),!0):n})})},Ad=function(n,t,e,r){return void 0!==Ws(n[t],e)&&t>0&&r(Ws(n[t-1],e),Ws(n[t],e))},Bd=function(n,t,e){return t>0&&e(Ws(n,t-1),Ws(n,t))},Id=function(n,t,e,r){var o=et(n,function(r,o){var u=Ad(n,o,t,e)||Bd(r,t,e);return u?[]:[_s(r,t)]});return Dd(n,o,e,r)},Pd=function(n,t,e,r){var o=n[t],u=et(o.cells(),function(r,u){var i=Ad(n,t,u,e)||Bd(o,u,e);return i?[]:[r]});return Dd(n,u,e,r)},kd=yl(["cell","row","replace","gap"]),Ed=function(n){var t=mo(n,"colspan",1),e=mo(n,"rowspan",1);return{element:h(n),colspan:h(t),rowspan:h(e)}},Md=function(n,t){void 0===t&&(t=Ed),kd(n);var e=Qf(D.none()),r=function(t){return n.cell(t)},o=function(n){var e=t(n);return r(e)},u=function(n){var t=o(n);return e.get().isNone()&&e.set(D.some(t)),i=D.some({item:n,replacement:t}),t},i=D.none(),c=function(n,t){return i.fold(function(){return u(n)},function(e){return t(n,e.item)?e.replacement:u(n)})};return{getOrInit:c,cursor:e.get}},Nd=function(n,t){return function(e){var r=Qf(D.none());kd(e);var o=[],u=function(n,t){return Z(o,function(e){return t(e.item,n)})},i=function(u){var i={scope:n},c=e.replace(u,t,i);return o.push({item:u,sub:c}),r.get().isNone()&&r.set(D.some(c)),c},c=function(n,t){return u(n,t).fold(function(){return i(n)},function(e){return t(n,e.item)?e.sub:i(n)})};return{replaceOrInit:c,cursor:r.get}}},_d=function(n){kd(n);var t=Qf(D.none()),e=function(e){return t.get().isNone()&&t.set(D.some(e)),function(){var t=n.cell({element:h(e),colspan:h(1),rowspan:h(1)});return Ar(t,"width"),Ar(e,"width"),t}};return{combine:e,cursor:t.get}},Wd={modification:Md,transform:Nd,merging:_d},jd=["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"],zd=function(n,t){var e=n.property().name(t);return q(["ol","ul"],e)},Fd=function(n,t){var e=n.property().name(t);return q(jd,e)},Ld=function(n,t){return q(["br","img","hr","input"],n.property().name(t))},Hd=o(),qd=function(n){return Fd(Hd,n)},Vd=function(n){return zd(Hd,n)},Ud=function(n){return Ld(Hd,n)},Kd=function(n){var t=function(n){return"br"===xt(n)},e=function(n){return rt(n,function(n){return t(n)||At(n)&&0===Uo(n).trim().length})},r=function(n){return"li"===xt(n)||oo(n,Vd).isSome()},o=function(n){return ir(n).map(function(n){return qd(n)?!0:Ud(n)?"img"===xt(n)?!1:!0:!1}).getOr(!1)},u=function(n){return Zo(n).bind(function(e){var u=o(e);return er(e).map(function(o){return u===!0||r(o)||t(e)||qd(o)&&!Ge(n,o)?[]:[Qt.fromTag("br")]})}).getOr([])},i=function(){var t=et(n,function(n){var t=cr(n);return e(t)?[]:t.concat(u(n))});return 0===t.length?[Qt.fromTag("br")]:t},c=i();jr(n[0]),Wr(n[0],c)},$d=function(n){var t=To(n);0===t.length&&zr(n)},Gd=function(n,t){return{grid:h(n),cursor:h(t)}},Xd=function(n,t,e){return Yd(n,t,e).orThunk(function(){return Yd(n,0,0)})},Yd=function(n,t,e){return D.from(n[t]).bind(function(n){return D.from(n.cells()[e]).bind(function(n){return D.from(n.element())})})},Jd=function(n,t,e){return Gd(n,Yd(n,t,e))},Qd=function(n){return J(n,function(n,t){return V(n,function(n){return n.row()===t.row()})?n:n.concat([t])},[]).sort(function(n,t){return n.row()-t.row()})},Zd=function(n){return J(n,function(n,t){return V(n,function(n){return n.column()===t.column()})?n:n.concat([t])},[]).sort(function(n,t){return n.column()-t.column()})},nm=function(n,t,e,r){var o=t[0].row(),u=t[0].row(),i=Qd(t),c=J(i,function(n){return xd(n,u,o,e,r.getOrInit)},n);return Jd(c,u,t[0].column())},tm=function(n,t,e,r){var o=Qd(t),u=o[o.length-1].row(),i=o[o.length-1].row()+o[o.length-1].rowspan(),c=J(o,function(n){return xd(n,i,u,e,r.getOrInit)},n);return Jd(c,i,t[0].column())},em=function(n,t,e,r){var o=Zd(t),u=o[0].column(),i=o[0].column(),c=J(o,function(n){return Td(n,i,u,e,r.getOrInit)},n);return Jd(c,t[0].row(),i)},rm=function(n,t,e,r){var o=t[t.length-1].column(),u=t[t.length-1].column()+t[t.length-1].colspan(),i=Zd(t),c=J(i,function(n){return Td(n,u,o,e,r.getOrInit)},n);return Jd(c,t[0].row(),u)},om=function(n,t,e,r){var o=Pd(n,t.row(),e,r.replaceOrInit);return Jd(o,t.row(),t.column())},um=function(n,t,e,r){var o=Id(n,t.column(),e,r.replaceOrInit);return Jd(o,t.row(),t.column())},im=function(n,t,e,r){var o=Pd(n,t.row(),e,r.replaceOrInit);return Jd(o,t.row(),t.column())},cm=function(n,t,e,r){var o=Id(n,t.column(),e,r.replaceOrInit);return Jd(o,t.row(),t.column())},am=function(n,t){var e=Zd(t),r=Rd(n,e[0].column(),e[e.length-1].column()),o=Xd(r,t[0].row(),t[0].column());return Gd(r,o)},lm=function(n,t){var e=Qd(t),r=Od(n,e[0].row(),e[e.length-1].row()),o=Xd(r,t[0].row(),t[0].column());return Gd(r,o)},fm=function(n,t,e){var r=t.cells();Kd(r);var o=ed(n,t.bounds(),e,h(r[0]));return Gd(o,D.from(r[0]))},sm=function(n,t,e,r){var o=Y(t,function(n,t){return rd(n,t,e,r.combine(t))},n);return Gd(o,D.from(t[0]))},dm=function(n,t,e){var r=function(n,t){var e=_o.fromTable(n);return Vs(e,t,!0)},o=r(t.clipboard(),t.generators()),u=Hr(t.row(),t.column()),i=yd(u,n,o,t.generators(),e);return i.fold(function(){return Gd(n,D.some(t.element()))},function(n){var e=Xd(n,t.row(),t.column());return Gd(n,e)})},mm=function(n,t,e){var r=Ao(n,e),o=_o.generate(r);return Vs(o,t,!0)},gm=function(n,t,e){var r=n[t.cells[0].row()],o=t.cells[0].column(),u=mm(t.clipboard(),t.generators(),r),i=Sd(o,n,u,t.generators(),e),c=Xd(i,t.cells[0].row(),t.cells[0].column());return Gd(i,c)},pm=function(n,t,e){var r=n[t.cells[0].row()],o=t.cells[t.cells.length-1].column()+t.cells[t.cells.length-1].colspan(),u=mm(t.clipboard(),t.generators(),r),i=Sd(o,n,u,t.generators(),e),c=Xd(i,t.cells[0].row(),t.cells[0].column());return Gd(i,c)},vm=function(n,t,e){var r=n[t.cells[0].row()],o=t.cells[0].row(),u=mm(t.clipboard(),t.generators(),r),i=Cd(o,n,u,t.generators(),e),c=Xd(i,t.cells[0].row(),t.cells[0].column());return Gd(i,c)},hm=function(n,t,e){var r=n[t.cells[0].row()],o=t.cells[t.cells.length-1].row()+t.cells[t.cells.length-1].rowspan(),u=mm(t.clipboard(),t.generators(),r),i=Cd(o,n,u,t.generators(),e),c=Xd(i,t.cells[0].row(),t.cells[0].column());return Gd(i,c)},bm=function(n,t){var e=_o.fromTable(n),r=td(e,t);return r.bind(function(n){var t=n[n.length-1],r=n[0].column(),o=t.column()+t.colspan(),u=tt(K(e.all,function(n){return X(n.cells(),function(n){return n.column()>=r&&n.column()<o})}));return wm(u,function(n){return"th"===xt(n.element())})}).getOr("")},wm=function(n,t){var e=X(n,t);return 0===e.length?D.some("td"):e.length===n.length?D.some("th"):D.none()},ym=Fa,Sm=Xs(nm,td,g,g,Wd.modification),Cm=Xs(tm,td,g,g,Wd.modification),xm=Xs(em,td,ym,g,Wd.modification),Tm=Xs(rm,td,ym,g,Wd.modification),Rm=Xs(am,td,ym,$d,Wd.modification),Om=Xs(lm,td,g,$d,Wd.modification),Dm=Xs(um,Ys,g,g,Wd.transform("row","th")),Am=Xs(cm,Ys,g,g,Wd.transform(null,"td")),Bm=(Xs(om,Ys,g,g,Wd.transform("col","th")),Xs(im,Ys,g,g,Wd.transform(null,"td")),Xs(fm,Zs,g,g,Wd.merging)),Im=Xs(sm,nd,ym,g,Wd.merging),Pm=Xs(dm,Js,ym,g,Wd.modification),km=Xs(gm,Qs,g,g,Wd.modification),Em=Xs(pm,Qs,g,g,Wd.modification),Mm=Xs(vm,Qs,g,g,Wd.modification),Nm=Xs(hm,Qs,g,g,Wd.modification),_m=bm,Wm=function(n){return jf(n.parentNode)},jm=function(n){return"thead"===n?"header":"tfoot"===n?"footer":"body"},zm=function(n,t){var e="thead"===Wm(t),r=!V(t.cells,function(n){return"th"!==jf(n)});return e||r?D.some({thead:e,ths:r}):D.none()},Fm=function(n,t){return jm(zm(n,t).fold(function(){return Wm(t)},function(){return"thead"}))},Lm=function(n,t,e){var r=n.getParent(t,"table"),o=t.parentNode,u=jf(o);if(e!==u){var i=n.select(e,r)[0];if(!i){i=n.create(e);var c=r.firstChild;"thead"===e?it(eo(Qt.fromDom(r),"caption,colgroup")).fold(function(){return r.insertBefore(i,c)},function(t){return n.insertAfter(i,t.dom())}):r.appendChild(i)}"tbody"===e&&"thead"===u&&i.firstChild?i.insertBefore(t,i.firstChild):i.appendChild(t),o.hasChildNodes()||n.remove(o)}},Hm=function(n,t,e,r){return $(t,function(t){var o=jf(t)!==e?n.rename(t,e):t;n.setAttrib(o,"scope",r)})},qm=function(n,t,e){var r=function(){var e=Ro(Qt.fromDom(t.cells[0])).map(function(n){return Oo(n)}).getOr([]);return ct(e,function(t){return zm(n,t.dom())}).map(function(n){return n.thead&&n.ths?"sectionCells":n.thead?"section":"cells"}).getOr("section")},o=n.dom;if("header"===e){var u=Nf(n),i="auto"===u?r():u;Hm(o,t.cells,"section"===i?"td":"th","col"),Lm(o,t,"cells"===i?"tbody":"thead")}else Hm(o,t.cells,"td",null),Lm(o,t,"footer"===e?"tfoot":"tbody")},Vm=function(n){var t=function(){var t=zf(n);return Gu(t,oi).fold(function(){return void 0===n.selection.getStart()?pi():hi(n.selection)},function(n){return vi(n)})};return{get:t}},Um=function(n){return function(t){return D.from(t.dom.getParent(t.selection.getStart(),n)).map(function(n){return Qt.fromDom(n)})}},Km=Um("th,td"),$m=Um("th,td,caption"),Gm=function(n){return Km(n).map(function(t){return bi(t,Vm(n))}).map(function(n){return K(n,function(n){return n.dom()})}).getOr([])},Xm=function(n){var t=Km(n),e=t.bind(function(n){return Ro(n)}).map(function(n){return Oo(n)}).map(function(n){return K(n,function(n){return n.dom()})});return As(t,e,function(t,e){return X(e,function(e){return V(e.cells,function(e){return"1"===n.dom.getAttrib(e,ri)||e===t.dom()})})}).getOr([])},Ym=function(n,t){var e=function(n){return"table"===xt(zf(n))},r=function(t){return e(n)===!1||Os(t).rows()>1},o=function(t){return e(n)===!1||Os(t).columns()>1},u=_f(n),i=function(t,e,r,o){return function(i,c){Uf(i);var a=o(),l=Qt.fromDom(n.getDoc()),f=Ra(Jf),s=su(r,l,u),d=us(n,i);return e(i)?t(a,i,c,s,f,d).bind(function(t){return $(t.newRows(),function(t){uf(n,t.dom())}),$(t.newCells(),function(t){cf(n,t.dom())}),t.cursor().map(function(t){var e=Ts(t),r=n.dom.createRng();return r.setStart(e.element().dom(),e.offset()),r.setEnd(e.element().dom(),e.offset()),r})}):D.none()}},c=i(Om,r,g,t),a=i(Rm,o,g,t),l=i(Sm,C,g,t),f=i(Cm,C,g,t),s=i(xm,C,Rs,t),d=i(Tm,C,Rs,t),m=i(Bm,C,g,t),p=i(Im,C,g,t),v=i(km,C,g,t),h=i(Em,C,g,t),b=i(Mm,C,g,t),w=i(Nm,C,g,t),y=i(Pm,C,g,t),S=function(n,t){return vt(n,"type").filter(function(n){return q(t,n)})},x=function(n,t){return S(t,["td","th"]).each(function(t){Hm(n.dom,Gm(n),t,null)})},T=function(n,t){return S(t,["header","body","footer"]).each(function(t){K(Xm(n),function(e){return qm(n,e,t)})})},R=i(Dm,C,g,t),O=i(Am,C,g,t),A=function(n){var t=Xm(n);if(t.length>0){var e=K(t,function(t){return Fm(n,t)}),r=q(e,"header"),o=q(e,"footer");if(r||o){var u=q(e,"body");return!r||u||o?r||u||!o?"":"footer":"header"}return"body"}},B=function(n){return wm(Gm(n),function(n){return"th"===jf(n)}).getOr("")},I=_m;return{deleteRow:c,deleteColumn:a,insertRowsBefore:l,insertRowsAfter:f,insertColumnsBefore:s,insertColumnsAfter:d,mergeCells:m,unmergeCells:p,pasteColsBefore:v,pasteColsAfter:h,pasteRowsBefore:b,pasteRowsAfter:w,pasteCells:y,setTableCellType:x,setTableRowType:T,makeColumnHeader:R,unmakeColumnHeader:O,getTableRowType:A,getTableCellType:B,getTableColType:I}},Jm={styles:{"border-collapse":"collapse",width:"100%"},attributes:{border:"1"}},Qm=function(){return Qt.fromTag("th")},Zm=function(){return Qt.fromTag("td")},ng=function(n,t,e,r){for(var o=Qt.fromTag("tr"),u=0;n>u;u++){var i=t>r||e>u?Qm():Zm();e>u&&kt(i,"scope","row"),t>r&&kt(i,"scope","col"),Er(i,Qt.fromTag("br")),Er(o,i)}return o},tg=function(n,t,e,r){return U(n,function(n){return ng(t,e,r,n)})},eg=function(n,t,e,r,o,u){void 0===u&&(u=Jm);var i=Qt.fromTag("table"),c="cells"!==o;Tr(i,u.styles),Et(i,u.attributes);var a=Math.min(n,e);if(c&&e>0){var l=Qt.fromTag("thead");Er(i,l);var f="sectionCells"===o?a:0,s=tg(e,t,f,r);Wr(l,s)}var d=Qt.fromTag("tbody");Er(i,d);var m=c?n-a:n,g=c?0:e,p=tg(m,t,g,r);return Wr(d,p),i},rg=function(n){return n.dom().innerHTML},og=function(n){var t=Qt.fromTag("div"),e=Qt.fromDom(n.dom().cloneNode(!0));return Er(t,e),rg(t)},ug=function(n,t){n.selection.select(t.dom(),!0),n.selection.collapse(!0)},ig=function(n,e){fo(e,"td,th").each(t(ug,n))},cg=function(n,t){$(ro(t,"tr"),function(t){uf(n,t.dom()),$(ro(t,"th,td"),function(t){cf(n,t.dom())})})},ag=function(n){return P(n)&&-1!==n.indexOf("%")},lg=function(n,t,e,r,o){var u=wf(n),i={styles:u,attributes:bf(n)},c=eg(e,t,o,r,Nf(n),i);kt(c,"data-mce-id","__mce");var a=og(c);return n.insertContent(a),fo(zf(n),'table[data-mce-id="__mce"]').map(function(t){return kf(n)?ss(n,t):Ef(n)?ds(t):(Pf(n)||ag(u.width))&&fs(n,t),Uf(t),Wt(t,"data-mce-id"),cg(n,t),ig(n,t),t.dom()}).getOr(null)},fg=function(n,t,e,r,o){void 0===r&&(r={});var u=function(n){return j(n)&&n>0};if(u(t)&&u(e)){var i=r.headerRows||0,c=r.headerColumns||0;return lg(n,e,t,c,i)}return console.error(o),null},sg=function(n){return function(){return n().fold(function(){return[]},function(n){return K(n,function(n){return n.dom()})})}},dg=function(n){return function(t){var e=t.length>0?D.some(gu(t)):D.none();n(e)}},mg=function(n,t,e,r){return{insertTable:function(t,e,r){return void 0===r&&(r={}),fg(n,e,t,r,"Invalid values for insertTable - rows and columns values are required to insert a table.")},setClipboardRows:dg(t.setRows),getClipboardRows:sg(t.getRows),setClipboardCols:dg(t.setColumns),getClipboardCols:sg(t.getColumns),resizeHandler:e,selectionTargets:r}},gg=function(n,t,e){var r=go(n,t);1===e||1>=r?Wt(n,t):kt(n,t,Math.min(e,r))},pg=function(n,t){var e=_o.fromTable(n),r=td(e,t);return r.map(function(n){var t=n[n.length-1],r=n[0].column(),o=t.column()+t.colspan();return K(e.all,function(n){var t=X(n.cells(),function(n){return n.column()>=r&&n.column()<o}),e=K(t,function(n){var t=ru(n.element());return gg(t,"colspan",o-r),t}),u=Qt.fromTag("tr");return Wr(u,e),u})})},vg=function(n,t,e){var r=_o.fromTable(n),o=td(r,t);return o.map(function(n){var t=Vs(r,e,!1),o=t.slice(n[0].row(),n[n.length-1].row()+n[n.length-1].rowspan()),u=$s(o,e);return Ps(u)})},hg=tinymce.util.Tools.resolve("tinymce.util.Tools"),bg=function(n,t,e){var r,o=n.select("td,th",t),u=function(t,r){for(var o=0;o<r.length;o++){var u=n.getStyle(r[o],e);if("undefined"==typeof t&&(t=u),t!==u)return""}return t};return u(r,o)},wg=function(n,t,e){e&&n.formatter.apply("align"+e,{},t)},yg=function(n,t,e){e&&n.formatter.apply("valign"+e,{},t)},Sg=function(n,t){hg.each("left center right".split(" "),function(e){n.formatter.remove("align"+e,{},t)})},Cg=function(n,t){hg.each("top middle bottom".split(" "),function(e){n.formatter.remove("valign"+e,{},t)})},xg=function(n,t){var e=function(n,t){return t.concat(K(n,function(n){return{text:n.text||n.title,value:n.value}}))};return e(n,t||[])},Tg=function(n){return function(t){return Lt(t,"rgb")?n.toHex(t):t}},Rg=function(n,t){var e=Qt.fromDom(t);return{borderwidth:Dr(e,"border-width").getOr(""),borderstyle:Dr(e,"border-style").getOr(""),bordercolor:Dr(e,"border-color").map(Tg(n)).getOr(""),backgroundcolor:Dr(e,"background-color").map(Tg(n)).getOr("")}},Og=function(n){var t=n[0],e=n.slice(1);return $(e,function(n){$(at(t),function(e){ft(n,function(n,r){var o=t[e];""!==o&&e===r&&o!==n&&(t[e]="")})})}),t},Dg=function(n){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"}],e={name:"borderwidth",type:"input",label:"Border width"},r="cell"===n?[e].concat(t):t;return{title:"Advanced",name:"advanced",items:r}},Ag=function(n,t,e,r){return Z(n,function(n){return e.formatter.matchNode(r,t+n)}).getOr("")},Bg=t(Ag,["left","center","right"],"align"),Ig=t(Ag,["top","middle","bottom"],"valign"),Pg=function(n,t){var e=wf(n),r=bf(n),o=function(n){return{borderstyle:vt(e,"border-style").getOr(""),bordercolor:Tg(n)(vt(e,"border-color").getOr("")),backgroundcolor:Tg(n)(vt(e,"background-color").getOr(""))}},u={height:"",width:"100%",cellspacing:"",cellpadding:"",caption:!1,"class":"",align:"",border:""},i=function(){var t=e["border-width"];return Df(n)&&t?{border:t}:vt(r,"border").fold(function(){return{}},function(n){return{border:n}})},c=t?o(n.dom):{},a=function(){var n=vt(e,"border-spacing").or(vt(r,"cellspacing")).fold(function(){return{}},function(n){return{cellspacing:n}}),t=vt(e,"border-padding").or(vt(r,"cellpadding")).fold(function(){return{}},function(n){return{cellpadding:n}});return te(te({},n),t)},l=te(te(te(te(te(te({},u),e),r),c),i()),a());return l},kg=function(n,t,e){var r=function(t,e){var r=Dr(Qt.fromDom(e),"border-width");return Df(n)&&r.isSome()?r.getOr(""):t.getAttrib(e,"border")||bg(n.dom,e,"border-width")||bg(n.dom,e,"border")},o=n.dom;return te({width:o.getStyle(t,"width")||o.getAttrib(t,"width"),height:o.getStyle(t,"height")||o.getAttrib(t,"height"),cellspacing:o.getStyle(t,"border-spacing")||o.getAttrib(t,"cellspacing"),cellpadding:o.getAttrib(t,"cellpadding")||bg(n.dom,t,"padding"),border:r(o,t),caption:!!o.select("caption",t)[0],"class":o.getAttrib(t,"class",""),align:Bg(n,t)},e?Rg(o,t):{})},Eg=function(n,t,e){var r=n.dom;return te({height:r.getStyle(t,"height")||r.getAttrib(t,"height"),scope:r.getAttrib(t,"scope"),"class":r.getAttrib(t,"class",""),type:Fm(n,t),align:Bg(n,t)},e?Rg(r,t):{})},Mg=function(n,t,e){var r=n.dom;return te({width:r.getStyle(t,"width")||r.getAttrib(t,"width"),height:r.getStyle(t,"height")||r.getAttrib(t,"height"),scope:r.getAttrib(t,"scope"),celltype:jf(t),"class":r.getAttrib(t,"class",""),halign:Bg(n,t),valign:Ig(n,t)},e?Rg(r,t):{})},Ng=function(n){var t=xg(Af(n));return t.length>0?D.some({name:"class",type:"selectbox",label:"Class",items:t}):D.none()},_g=[{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"}]}],Wg=function(n){return Ng(n).fold(function(){return _g},function(n){return _g.concat(n)})},jg=function(n){return function(t,e){var r=t.dom,o=function(t,o){(!n||o)&&r.setAttrib(e,t,o)},u=function(t,o){(!n||o)&&r.setStyle(e,t,o)},i=function(r,o){(!n||o)&&(""===o?t.formatter.remove(r,{value:null},e,!0):t.formatter.apply(r,{value:o},e))};return{setAttrib:o,setStyle:u,setFormat:i}}},zg={normal:jg(!1),ifTruthy:jg(!0)},Fg=function(n,t){n.setAttrib("scope",t.scope),n.setAttrib("class",t.class),n.setStyle("width",Vf(t.width)),n.setStyle("height",Vf(t.height))},Lg=function(n,t){n.setFormat("tablecellbackgroundcolor",t.backgroundcolor),n.setFormat("tablecellbordercolor",t.bordercolor),n.setFormat("tablecellborderstyle",t.borderstyle),n.setFormat("tablecellborderwidth",Vf(t.borderwidth))},Hg=function(n,t,e){var r=n.dom,o=1===t.length;$(t,function(t){var u=e.celltype&&jf(t)!==e.celltype?r.rename(t,e.celltype):t,i=o?zg.normal(n,u):zg.ifTruthy(n,u);Fg(i,e),Cf(n)&&Lg(i,e),o&&(Sg(n,u),Cg(n,u)),e.halign&&wg(n,u,e.halign),e.valign&&yg(n,u,e.valign)})},qg=function(n,t,e){var r=e.getData();e.close(),n.undoManager.transact(function(){Hg(n,t,r),n.focus()})},Vg=function(n){var e=Gm(n);if(0!==e.length){var r=K(e,function(t){return Mg(n,t,Cf(n))}),o=Og(r),u={type:"tabpanel",tabs:[{title:"General",name:"general",items:Wg(n)},Dg("cell")]},i={type:"panel",items:[{type:"grid",columns:2,items:Wg(n)}]};n.windowManager.open({title:"Cell Properties",size:"normal",body:Cf(n)?u:i,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:o,onSubmit:t(qg,n,e)})}},Ug=function(n){var t=xg(Bf(n));return t.length>0?D.some({name:"class",type:"selectbox",label:"Class",items:t}):D.none()},Kg=[{type:"selectbox",name:"type",label:"Row type",items:[{text:"Header",value:"header"},{text:"Body",value:"body"},{text:"Footer",value:"footer"}]},{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"}],$g=function(n){return Ug(n).fold(function(){return Kg},function(n){return Kg.concat(n)})},Gg=function(n,t){n.setAttrib("scope",t.scope),n.setAttrib("class",t.class),n.setStyle("height",Vf(t.height))},Xg=function(n,t){n.setStyle("background-color",t.backgroundcolor),n.setStyle("border-color",t.bordercolor),n.setStyle("border-style",t.borderstyle)},Yg=function(n,t,e,r){var o=1===t.length;$(t,function(t){r.type!==jf(t.parentNode)&&qm(n,t,r.type);var u=o?zg.normal(n,t):zg.ifTruthy(n,t);Gg(u,r),xf(n)&&Xg(u,r),r.align!==e.align&&(Sg(n,t),wg(n,t,r.align))})},Jg=function(n,t,e,r){var o=r.getData();r.close(),n.undoManager.transact(function(){Yg(n,t,e,o),n.focus()})},Qg=function(n){var e=Xm(n);if(0!==e.length){var r=K(e,function(t){return Eg(n,t,xf(n))}),o=Og(r),u={type:"tabpanel",tabs:[{title:"General",name:"general",items:$g(n)},Dg("row")]},i={type:"panel",items:[{type:"grid",columns:2,items:$g(n)}]};n.windowManager.open({title:"Row Properties",size:"normal",body:xf(n)?u:i,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:o,onSubmit:t(Jg,n,e,o)})}},Zg=tinymce.util.Tools.resolve("tinymce.Env"),np=function(n,t,e){var r=e?[{type:"input",name:"cols",label:"Cols",inputMode:"numeric"},{type:"input",name:"rows",label:"Rows",inputMode:"numeric"}]:[],o=[{type:"input",name:"width",label:"Width"},{type:"input",name:"height",label:"Height"}],u=Rf(n)?[{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"}]}]:[],i=[{type:"selectbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]}],c=t.length>0?[{type:"selectbox",name:"class",label:"Class",items:t}]:[];return r.concat(o).concat(u).concat(i).concat(c)},tp=function(n,t,e,r){if("TD"===t.tagName||"TH"===t.tagName)P(e)?n.setStyle(t,e,r):n.setStyle(t,e);else if(t.children)for(var o=0;o<t.children.length;o++)tp(n,t.children[o],e,r)},ep=function(n,t,e){var r=n.dom,o={},u={};if(o.class=e.class,u.height=Vf(e.height),r.getAttrib(t,"width")&&!Df(n)?o.width=qf(e.width):u.width=Vf(e.width),Df(n)?(u["border-width"]=Vf(e.border),u["border-spacing"]=Vf(e.cellspacing)):(o.border=e.border,o.cellpadding=e.cellpadding,o.cellspacing=e.cellspacing),Df(n)&&t.children)for(var i=0;i<t.children.length;i++)tp(r,t.children[i],{"border-width":Vf(e.border),padding:Vf(e.cellpadding)}),Tf(n)&&tp(r,t.children[i],{"border-color":e.bordercolor});Tf(n)&&(u["background-color"]=e.backgroundcolor,u["border-color"]=e.bordercolor,u["border-style"]=e.borderstyle),o.style=r.serializeStyle(te(te({},wf(n)),u)),r.setAttribs(t,te(te({},bf(n)),o))},rp=function(n,t,e){var r,o=n.dom,u=e.getData();e.close(),""===u.class&&delete u.class,n.undoManager.transact(function(){if(!t){var e=parseInt(u.cols,10)||1,i=parseInt(u.rows,10)||1;t=lg(n,e,i,0,0)}ep(n,t,u),r=o.select("caption",t)[0],r&&!u.caption&&o.remove(r),!r&&u.caption&&(r=o.create("caption"),r.innerHTML=Zg.ie?qo:'<br data-mce-bogus="1"/>',t.insertBefore(r,t.firstChild)),""===u.align?Sg(n,t):wg(n,t,u.align),n.focus(),n.addVisual()
})},op=function(n,e){var r,o=n.dom,u=Pg(n,Tf(n));e===!1?(r=o.getParent(n.selection.getStart(),"table"),r?u=kg(n,r,Tf(n)):Tf(n)&&(u.borderstyle="",u.bordercolor="",u.backgroundcolor="")):(u.cols="1",u.rows="1",Tf(n)&&(u.borderstyle="",u.bordercolor="",u.backgroundcolor=""));var i=xg(If(n));i.length>0&&u.class&&(u.class=u.class.replace(/\s*mce\-item\-table\s*/g,""));var c={type:"grid",columns:2,items:np(n,i,e)},a=function(){return{type:"panel",items:[c]}},l=function(){return{type:"tabpanel",tabs:[{title:"General",name:"general",items:[c]},Dg("table")]}},f=Tf(n)?l():a();n.windowManager.open({title:"Table Properties",size:"normal",body:f,onSubmit:t(rp,n,r),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:u})},up=function(n,e,r,o,u){var i=Hf(n),c=function(){return $m(n).each(function(t){Ro(t,i).filter(w(i)).each(function(t){var e=Qt.fromText("");if(Pr(t,e),zr(t),n.dom.isEmpty(n.getBody()))n.setContent(""),n.selection.setCursorLocation();else{var r=n.dom.createRng();r.setStart(e.dom(),0),r.setEnd(e.dom(),0),n.selection.setRng(r),n.nodeChanged()}})})},a=function(t){return $m(n).each(function(e){var r=Ef(n)||kf(n)||Pf(n);r||Ro(e,i).each(function(e){"relative"!==t||ya(e)?"fixed"!==t||Sa(e)?"responsive"!==t||Ca(e)||ds(e):ss(n,e):fs(n,e),Uf(e)})})},l=function(n){return Ro(n,i)},f=function(t){return Km(n).each(function(e){l(e).each(function(u){var i=Ci(o,u,e);t(u,i).each(function(t){n.selection.setRng(t),n.focus(),r.clear(u),Uf(u)})})})},s=function(){return Km(n).map(function(t){return l(t).bind(function(e){var r=Ci(o,e,t),u=su(g,Qt.fromDom(n.getDoc()),D.none());return vg(e,r,u)})})},d=function(){return Km(n).map(function(n){return l(n).bind(function(t){var e=Ci(o,t,n);return pg(t,e)})})},m=function(t,e){return e().each(function(e){var u=K(e,function(n){return ru(n)});Km(n).each(function(e){return l(e).each(function(i){var c=du(Qt.fromDom(n.getDoc())),a=Ti(o,e,u,c);t(i,a).each(function(t){n.selection.setRng(t),n.focus(),r.clear(i)})})})})};ft({mceTableSplitCells:function(){return f(e.unmergeCells)},mceTableMergeCells:function(){return f(e.mergeCells)},mceTableInsertRowBefore:function(){return f(e.insertRowsBefore)},mceTableInsertRowAfter:function(){return f(e.insertRowsAfter)},mceTableInsertColBefore:function(){return f(e.insertColumnsBefore)},mceTableInsertColAfter:function(){return f(e.insertColumnsAfter)},mceTableDeleteCol:function(){return f(e.deleteColumn)},mceTableDeleteRow:function(){return f(e.deleteRow)},mceTableCutCol:function(){return d().each(function(n){u.setColumns(n),f(e.deleteColumn)})},mceTableCutRow:function(){return s().each(function(n){u.setRows(n),f(e.deleteRow)})},mceTableCopyCol:function(){return d().each(function(n){return u.setColumns(n)})},mceTableCopyRow:function(){return s().each(function(n){return u.setRows(n)})},mceTablePasteColBefore:function(){return m(e.pasteColsBefore,u.getColumns)},mceTablePasteColAfter:function(){return m(e.pasteColsAfter,u.getColumns)},mceTablePasteRowBefore:function(){return m(e.pasteRowsBefore,u.getRows)},mceTablePasteRowAfter:function(){return m(e.pasteRowsAfter,u.getRows)},mceTableDelete:c,mceTableSizingMode:function(n,t){return a(t)}},function(t,e){return n.addCommand(e,t)}),ft({mceTableCellType:function(t,r){return e.setTableCellType(n,r)},mceTableRowType:function(t,r){return e.setTableRowType(n,r)}},function(t,e){return n.addCommand(e,t)}),n.addCommand("mceTableColType",function(n,t){return vt(t,"type").each(function(n){return f("th"===n?e.makeColumnHeader:e.unmakeColumnHeader)})}),ft({mceTableProps:t(op,n,!1),mceTableRowProps:t(Qg,n),mceTableCellProps:t(Vg,n)},function(t,e){return n.addCommand(e,function(){return t()})}),n.addCommand("mceInsertTable",function(t,e){k(e)&&at(e).length>0?fg(n,e.rows,e.columns,e.options,"Invalid values for mceInsertTable - rows and columns values are required to insert a table."):op(n,!0)}),n.addCommand("mceTableApplyCellStyle",function(t,e){if(k(e)){var r=Gm(n);0!==r.length&&ft(e,function(t,e){var o="tablecell"+e.toLowerCase().replace("-","");n.formatter.has(o)&&P(t)&&$(r,function(e){zg.normal(n,e).setFormat(o,t)})})}})},ip=function(n,t,e){var r=Hf(n),o=function(n){return Ro(n,r)};ft({mceTableRowType:function(){return t.getTableRowType(n)},mceTableCellType:function(){return t.getTableCellType(n)},mceTableColType:function(){return Km(n).bind(function(n){return o(n).map(function(r){var o=Ci(e,r,n);return t.getTableColType(r,o)})}).getOr("")}},function(t,e){return n.addQueryValueHandler(e,t)})},cp=function(){var n=Qf(D.none()),t=Qf(D.none()),e=function(n){n.set(D.none())};return{getRows:n.get,setRows:function(r){n.set(r),e(t)},clearRows:function(){return e(n)},getColumns:t.get,setColumns:function(r){t.set(r),e(n)},clearColumns:function(){return e(t)}}},ap=di.generate([{none:["current"]},{first:["current"]},{middle:["current","target"]},{last:["current"]}]),lp=function(n){return void 0===n&&(n=void 0),ap.none(n)},fp=te(te({},ap),{none:lp}),sp=function(n,t){return Ro(n,t).bind(function(t){var e=To(t),r=nt(e,function(t){return Ge(n,t)});return r.map(function(n){return{index:n,all:e}})})},dp=function(n,t){var e=sp(n,t);return e.fold(function(){return fp.none(n)},function(t){return t.index+1<t.all.length?fp.middle(n,t.all[t.index+1]):fp.last(n)})},mp=function(n,t){var e=sp(n,t);return e.fold(function(){return fp.none()},function(t){return t.index-1>=0?fp.middle(n,t.all[t.index-1]):fp.first(n)})},gp=function(n,t,e,r){return{start:h(n),soffset:h(t),finish:h(e),foffset:h(r)}},pp={create:gp},vp=di.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),hp=function(n,t,e,r){return n.fold(t,e,r)},bp=function(n){return n.fold(b,b,b)},wp=vp.before,yp=vp.on,Sp=vp.after,Cp={before:wp,on:yp,after:Sp,cata:hp,getStart:bp},xp=di.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Tp=function(n){return xp.exact(n.start(),n.soffset(),n.finish(),n.foffset())},Rp=function(n){return n.match({domRange:function(n){return Qt.fromDom(n.startContainer)},relative:function(n){return Cp.getStart(n)},exact:function(n){return n}})},Op=xp.domRange,Dp=xp.relative,Ap=xp.exact,Bp=function(n){var t=Rp(n);return tr(t)},Ip=pp.create,Pp={domRange:Op,relative:Dp,exact:Ap,exactFromRange:Tp,getWin:Bp,range:Ip},kp=function(n,t){var e=n.document.createRange();return Ep(e,t),e},Ep=function(n,t){return n.selectNodeContents(t.dom())},Mp=function(n,t){t.fold(function(t){n.setStartBefore(t.dom())},function(t,e){n.setStart(t.dom(),e)},function(t){n.setStartAfter(t.dom())})},Np=function(n,t){t.fold(function(t){n.setEndBefore(t.dom())},function(t,e){n.setEnd(t.dom(),e)},function(t){n.setEndAfter(t.dom())})},_p=function(n,t,e){var r=n.document.createRange();return Mp(r,t),Np(r,e),r},Wp=function(n,t,e,r,o){var u=n.document.createRange();return u.setStart(t.dom(),e),u.setEnd(r.dom(),o),u},jp=function(n){return{left:h(n.left),top:h(n.top),right:h(n.right),bottom:h(n.bottom),width:h(n.width),height:h(n.height)}},zp=function(n){var t=n.getClientRects(),e=t.length>0?t[0]:n.getBoundingClientRect();return e.width>0||e.height>0?D.some(e).map(jp):D.none()},Fp=di.generate([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Lp=function(n,t,e){return t(Qt.fromDom(e.startContainer),e.startOffset,Qt.fromDom(e.endContainer),e.endOffset)},Hp=function(n,t){return t.match({domRange:function(n){return{ltr:h(n),rtl:D.none}},relative:function(t,e){return{ltr:ee(function(){return _p(n,t,e)}),rtl:ee(function(){return D.some(_p(n,e,t))})}},exact:function(t,e,r,o){return{ltr:ee(function(){return Wp(n,t,e,r,o)}),rtl:ee(function(){return D.some(Wp(n,r,o,t,e))})}}})},qp=function(n,t){var e=t.ltr();if(e.collapsed){var r=t.rtl().filter(function(n){return n.collapsed===!1});return r.map(function(n){return Fp.rtl(Qt.fromDom(n.endContainer),n.endOffset,Qt.fromDom(n.startContainer),n.startOffset)}).getOrThunk(function(){return Lp(n,Fp.ltr,e)})}return Lp(n,Fp.ltr,e)},Vp=function(n,t){var e=Hp(n,t);return qp(n,e)},Up=function(n,t){var e=Vp(n,t);return e.match({ltr:function(t,e,r,o){var u=n.document.createRange();return u.setStart(t.dom(),e),u.setEnd(r.dom(),o),u},rtl:function(t,e,r,o){var u=n.document.createRange();return u.setStart(r.dom(),o),u.setEnd(t.dom(),e),u}})},Kp=(Fp.ltr,Fp.rtl,function(n,t,e,r,o){if(0===o)return 0;if(t===r)return o-1;for(var u=r,i=1;o>i;i++){var c=n(i),a=Math.abs(t-c.left);if(e<=c.bottom){if(e<c.top||a>u)return i-1;u=a}}return 0}),$p=function(n,t,e){return t>=n.left&&t<=n.right&&e>=n.top&&e<=n.bottom},Gp=function(n,t,e,r,o){var u=function(e){var r=n.dom().createRange();return r.setStart(t.dom(),e),r.collapse(!0),r},i=function(n){var t=u(n);return t.getBoundingClientRect()},c=Uo(t).length,a=Kp(i,e,r,o.right,c);return u(a)},Xp=function(n,t,e,r){var o=n.dom().createRange();o.selectNode(t.dom());var u=o.getClientRects(),i=ct(u,function(n){return $p(n,e,r)?D.some(n):D.none()});return i.map(function(o){return Gp(n,t,e,r,o)})},Yp=function(n,t,e,r){var o=n.dom().createRange(),u=cr(t);return ct(u,function(t){return o.selectNode(t.dom()),$p(o.getBoundingClientRect(),e,r)?Jp(n,t,e,r):D.none()})},Jp=function(n,t,e,r){return At(t)?Xp(n,t,e,r):Yp(n,t,e,r)},Qp=function(n,t,e,r){var o=n.dom().createRange();o.selectNode(t.dom());var u=o.getBoundingClientRect(),i=Math.max(u.left,Math.min(u.right,e)),c=Math.max(u.top,Math.min(u.bottom,r));return Jp(n,t,i,c)},Zp=!0,nv=!1,tv=function(n,t){return t-n.left<n.right-t?Zp:nv},ev=function(n,t,e){var r=n.dom().createRange();return r.selectNode(t.dom()),r.collapse(e),r},rv=function(n,t,e){var r=n.dom().createRange();r.selectNode(t.dom());var o=r.getBoundingClientRect(),u=tv(o,e),i=u===Zp?Qo:Zo;return i(t).map(function(t){return ev(n,t,u)})},ov=function(n,t,e){var r=t.dom().getBoundingClientRect(),o=tv(r,e);return D.some(ev(n,t,o))},uv=function(n,t,e){var r=0===cr(t).length?ov:rv;return r(n,t,e)},iv=function(n,t,e){return D.from(n.dom().caretPositionFromPoint(t,e)).bind(function(t){if(null===t.offsetNode)return D.none();var e=n.dom().createRange();return e.setStart(t.offsetNode,t.offset),e.collapse(),D.some(e)})},cv=function(n,t,e){return D.from(n.dom().caretRangeFromPoint(t,e))},av=function(n,t,e,r){var o=n.dom().createRange();o.selectNode(t.dom());var u=o.getBoundingClientRect(),i=Math.max(u.left,Math.min(u.right,e)),c=Math.max(u.top,Math.min(u.bottom,r));return Qp(n,t,i,c)},lv=function(n,t,e){return Qt.fromPoint(n,t,e).bind(function(r){var o=function(){return uv(n,r,t)};return 0===cr(r).length?o():av(n,r,t,e).orThunk(o)})},fv=document.caretPositionFromPoint?iv:document.caretRangeFromPoint?cv:lv,sv=function(n,t,e){var r=Qt.fromDom(n.document);return fv(r,t,e).map(function(n){return pp.create(Qt.fromDom(n.startContainer),n.startOffset,Qt.fromDom(n.endContainer),n.endOffset)})},dv=function(n,t){var e=xt(n);return"input"===e?Cp.after(n):q(["br","img"],e)?0===t?Cp.before(n):Cp.after(n):Cp.on(n,t)},mv=function(n,t){var e=n.fold(Cp.before,dv,Cp.after),r=t.fold(Cp.before,dv,Cp.after);return Pp.relative(e,r)},gv=function(n,t,e,r){var o=dv(n,t),u=dv(e,r);return Pp.relative(o,u)},pv=function(n){return n.match({domRange:function(n){var t=Qt.fromDom(n.startContainer),e=Qt.fromDom(n.endContainer);return gv(t,n.startOffset,e,n.endOffset)},relative:mv,exact:gv})},vv=function(n,t,e,r){var o=Ze(n),u=o.dom().createRange();return u.setStart(n.dom(),t),u.setEnd(e.dom(),r),u},hv=function(n,t,e,r){var o=vv(n,t,e,r),u=Ge(n,e)&&t===r;return o.collapsed&&!u},bv=function(n,t){D.from(n.getSelection()).each(function(n){n.removeAllRanges(),n.addRange(t)})},wv=function(n,t,e,r,o){var u=Wp(n,t,e,r,o);bv(n,u)},yv=function(n,t,e,r,o,u){t.collapse(e.dom(),r),t.extend(o.dom(),u)},Sv=function(n,t){return Vp(n,t).match({ltr:function(t,e,r,o){wv(n,t,e,r,o)},rtl:function(t,e,r,o){var u=n.getSelection();if(u.setBaseAndExtent)u.setBaseAndExtent(t.dom(),e,r.dom(),o);else if(u.extend)try{yv(n,u,t,e,r,o)}catch(i){wv(n,r,o,t,e)}else wv(n,r,o,t,e)}})},Cv=function(n,t,e,r,o){var u=gv(t,e,r,o);Sv(n,u)},xv=function(n,t,e){var r=mv(t,e);Sv(n,r)},Tv=function(n){var t=Pp.getWin(n).dom(),e=function(n,e,r,o){return Wp(t,n,e,r,o)},r=pv(n);return Vp(t,r).match({ltr:e,rtl:e})},Rv=function(n){if(n.rangeCount>0){var t=n.getRangeAt(0),e=n.getRangeAt(n.rangeCount-1);return D.some(pp.create(Qt.fromDom(t.startContainer),t.startOffset,Qt.fromDom(e.endContainer),e.endOffset))}return D.none()},Ov=function(n){var t=Qt.fromDom(n.anchorNode),e=Qt.fromDom(n.focusNode);return hv(t,n.anchorOffset,e,n.focusOffset)?D.some(pp.create(t,n.anchorOffset,e,n.focusOffset)):Rv(n)},Dv=function(n,t){var e=kp(n,t);bv(n,e)},Av=function(n){return D.from(n.getSelection()).filter(function(n){return n.rangeCount>0}).bind(Ov)},Bv=function(n){return Av(n).map(function(n){return Pp.exact(n.start(),n.soffset(),n.finish(),n.foffset())})},Iv=function(n,t){var e=Up(n,t);return zp(e)},Pv=function(n,t,e){return sv(n,t,e)},kv=function(n){var t=n.getSelection();t.removeAllRanges()},Ev=tinymce.util.Tools.resolve("tinymce.util.VK"),Mv=function(n,t,e,r){return jv(n,t,dp(e),r)},Nv=function(n,t,e,r){return jv(n,t,mp(e),r)},_v=function(n,t){var e=Pp.exact(t,0,t,0);return Tv(e)},Wv=function(n,t){var e=ro(t,"tr");return it(e).bind(function(t){return fo(t,"td,th").map(function(t){return _v(n,t)})})},jv=function(n,t,e,r){return e.fold(D.none,D.none,function(t,e){return Qo(e).map(function(t){return _v(n,t)})},function(e){return Ro(e,t).bind(function(t){var o=Si(e);return n.undoManager.transact(function(){r.insertRowsAfter(t,o)}),Wv(n,t)})})},zv=["table","li","dl"],Fv=function(n,t,e,r){if(n.keyCode===Ev.TAB){var o=zf(t),u=function(n){var t=xt(n);return Ge(n,o)||q(zv,t)},i=t.selection.getRng();if(i.collapsed){var c=Qt.fromDom(i.startContainer);xo(c,u).each(function(o){n.preventDefault();var i=n.shiftKey?Nv:Mv,c=i(t,u,o,e,r);c.each(function(n){t.selection.setRng(n)})})}}},Lv=function(n,t){return{selection:h(n),kill:h(t)}},Hv={create:Lv},qv=function(n,t,e,r){return{start:h(Cp.on(n,t)),finish:h(Cp.on(e,r))}},Vv={create:qv},Uv=function(n,t){var e=Up(n,t);return pp.create(Qt.fromDom(e.startContainer),e.startOffset,Qt.fromDom(e.endContainer),e.endOffset)},Kv=Vv.create,$v=function(n,t,e,r,o,u,i){return Ge(e,o)&&r===u?D.none():so(e,"td,th",t).bind(function(e){return so(o,"td,th",t).bind(function(r){return Gv(n,t,e,r,i)})})},Gv=function(n,t,e,r,o){return Ge(e,r)?D.none():Hu(e,r,t).bind(function(t){var r=t.boxes.getOr([]);return r.length>0?(o(n,r,t.start,t.finish),D.some(Hv.create(D.some(Kv(e,0,e,Go(e))),!0))):D.none()})},Xv=function(n,t,e,r,o){var u=function(n){return o.clearBeforeUpdate(e),o.selectRange(e,n.boxes,n.start,n.finish),n.boxes};return $u(r,n,t,o.firstSelectedSelector,o.lastSelectedSelector).map(u)},Yv=function(n,t){return{item:h(n),mode:h(t)}},Jv=function(n,t,e,r){return void 0===r&&(r=Qv),n.property().parent(t).map(function(n){return Yv(n,r)})},Qv=function(n,t,e,r){return void 0===r&&(r=Zv),e.sibling(n,t).map(function(n){return Yv(n,r)})},Zv=function(n,t,e,r){void 0===r&&(r=Zv);var o=n.property().children(t),u=e.first(o);return u.map(function(n){return Yv(n,r)})},nh=[{current:Jv,next:Qv,fallback:D.none()},{current:Qv,next:Zv,fallback:D.some(Jv)},{current:Zv,next:Zv,fallback:D.some(Qv)}],th=function(n,t,e,r,o){void 0===o&&(o=nh);var u=Z(o,function(n){return n.current===e});return u.bind(function(e){return e.current(n,t,r,e.next).orThunk(function(){return e.fallback.bind(function(e){return th(n,t,e,r)})})})},eh=function(){var n=function(n,t){return n.query().prevSibling(t)},t=function(n){return n.length>0?D.some(n[n.length-1]):D.none()};return{sibling:n,first:t}},rh=function(){var n=function(n,t){return n.query().nextSibling(t)},t=function(n){return n.length>0?D.some(n[0]):D.none()};return{sibling:n,first:t}},oh={left:eh,right:rh},uh=function(n,t,e,r,o,u){var i=th(n,t,r,o);return i.bind(function(t){return u(t.item())?D.none():e(t.item())?D.some(t.item()):uh(n,t.item(),e,t.mode(),o,u)})},ih=function(n,t,e,r){return uh(n,t,e,Qv,oh.left(),r)},ch=function(n,t,e,r){return uh(n,t,e,Qv,oh.right(),r)},ah=function(n){return function(t){return 0===n.property().children(t).length}},lh=function(n,t,e){return sh(n,t,ah(n),e)},fh=function(n,t,e){return dh(n,t,ah(n),e)},sh=ih,dh=ch,mh=o(),gh=function(n,t){return lh(mh,n,t)},ph=function(n,t){return fh(mh,n,t)},vh=function(n,t,e){return sh(mh,n,t,e)},hh=function(n,t,e){return dh(mh,n,t,e)},bh=function(n,t,e){return oo(n,t,e).isSome()},wh=di.generate([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}]),yh=function(n,t,e){var r=n.getRect(t),o=n.getRect(e);return o.right>r.left&&o.left<r.right},Sh=function(n){return so(n,"tr")},Ch=function(n,t,e,r,o,u,i){return so(r,"td,th",i).bind(function(e){return so(t,"td,th",i).map(function(t){return Ge(e,t)?Ge(r,e)&&Go(e)===o?u(t):wh.none("in same cell"):zu(Sh,[e,t]).fold(function(){return yh(n,t,e)?wh.success():u(t)},function(){return u(t)})})}).getOr(wh.none("default"))},xh=function(n,t,e,r,o){return n.fold(t,e,r,o)},Th=te(te({},wh),{verify:Ch,cata:xh}),Rh=function(n,t,e,r){return{parent:h(n),children:h(t),element:h(e),index:h(r)}},Oh=function(n){return er(n).bind(function(t){var e=cr(t);return Dh(e,n).map(function(r){return Rh(t,e,n,r)})})},Dh=function(n,e){return nt(n,t(Ge,e))},Ah=function(n){return"br"===xt(n)},Bh=function(n,t,e){return t(n,e).bind(function(n){return At(n)&&0===Uo(n).trim().length?Bh(n,t,e):D.some(n)})},Ih=function(n,t,e){return e.traverse(t).orThunk(function(){return Bh(t,e.gather,n)}).map(e.relative)},Ph=function(n,t){return ar(n,t).filter(Ah).orThunk(function(){return ar(n,t-1).filter(Ah)})},kh=function(n,t,e,r){return Ph(t,e).bind(function(t){return r.traverse(t).fold(function(){return Bh(t,r.gather,n).map(r.relative)},function(n){return Oh(n).map(function(n){return Cp.on(n.parent(),n.index())})})})},Eh=function(n,t,e,r){var o=Ah(t)?Ih(n,t,r):kh(n,t,e,r);return o.map(function(n){return{start:h(n),finish:h(n)}})},Mh=function(n){return Th.cata(n,function(){return D.none()},function(){return D.none()},function(n){return D.some(bs(n,0))},function(n){return D.some(bs(n,Go(n)))})},Nh=function(n,t){return{left:n.left,top:n.top+t,right:n.right,bottom:n.bottom+t}},_h=function(n,t){return{left:n.left,top:n.top-t,right:n.right,bottom:n.bottom-t}},Wh=function(n,t,e){return{left:n.left+t,top:n.top+e,right:n.right+t,bottom:n.bottom+e}},jh=function(n){return n.top},zh=function(n){return n.bottom},Fh=function(n,t,e){return e>=0&&e<Go(t)?n.getRangedRect(t,e,t,e+1):e>0?n.getRangedRect(t,e-1,t,e):D.none()},Lh=function(n){return{left:n.left,top:n.top,right:n.right,bottom:n.bottom}},Hh=function(n,t){return D.some(n.getRect(t))},qh=function(n,t,e){return Dt(t)?Hh(n,t).map(Lh):At(t)?Fh(n,t,e).map(Lh):D.none()},Vh=function(n,t){return Dt(t)?Hh(n,t).map(Lh):At(t)?n.getRangedRect(t,0,t,Go(t)).map(Lh):D.none()},Uh=5,Kh=100,$h=di.generate([{none:[]},{retry:["caret"]}]),Gh=function(n,t){return n.left<t.left||Math.abs(t.right-n.left)<1||n.left>t.right},Xh=function(n,t,e){return uo(t,qd).fold(h(!1),function(t){return Vh(n,t).exists(function(n){return Gh(e,n)})})},Yh=function(n,t,e,r,o){var u=Nh(o,Uh);return Math.abs(e.bottom-r.bottom)<1?$h.retry(u):e.top>o.bottom?$h.retry(u):e.top===o.bottom?$h.retry(Nh(o,1)):Xh(n,t,o)?$h.retry(Wh(u,Uh,0)):$h.none()},Jh=function(n,t,e,r,o){var u=_h(o,Uh);return Math.abs(e.top-r.top)<1?$h.retry(u):e.bottom<o.top?$h.retry(u):e.bottom===o.top?$h.retry(_h(o,1)):Xh(n,t,o)?$h.retry(Wh(u,Uh,0)):$h.none()},Qh={point:jh,adjuster:Jh,move:_h,gather:gh},Zh={point:zh,adjuster:Yh,move:Nh,gather:ph},nb=function(n,t,e){return n.elementFromPoint(t,e).filter(function(n){return"table"===xt(n)}).isSome()},tb=function(n,t,e,r,o){return eb(n,t,e,t.move(r,Uh),o)},eb=function(n,t,e,r,o){return 0===o?D.some(r):nb(n,r.left,t.point(r))?tb(n,t,e,r,o-1):n.situsFromPoint(r.left,t.point(r)).bind(function(u){return u.start().fold(D.none,function(u){return Vh(n,u).bind(function(i){return t.adjuster(n,u,i,e,r).fold(D.none,function(r){return eb(n,t,e,r,o-1)})}).orThunk(function(){return D.some(r)})},D.none)})},rb=function(n,t){return n.situsFromPoint(t.left,t.bottom+Uh)},ob=function(n,t){return n.situsFromPoint(t.left,t.top-Uh)},ub=function(n,t,e){return n.point(t)>e.getInnerHeight()?D.some(n.point(t)-e.getInnerHeight()):n.point(t)<0?D.some(-n.point(t)):D.none()},ib=function(n,t,e){var r=n.move(e,Uh),o=eb(t,n,e,r,Kh).getOr(r);return ub(n,o,t).fold(function(){return t.situsFromPoint(o.left,n.point(o))},function(e){return t.scrollBy(0,e),t.situsFromPoint(o.left,n.point(o)-e)})},cb={tryUp:t(ib,Qh),tryDown:t(ib,Zh),ieTryUp:ob,ieTryDown:rb,getJumpSize:h(Uh)},ab=20,lb=function(n,t,e){return n.getSelection().bind(function(r){return Eh(t,r.finish(),r.foffset(),e).fold(function(){return D.some(bs(r.finish(),r.foffset()))},function(o){var u=n.fromSitus(o),i=Th.verify(n,r.finish(),r.foffset(),u.finish(),u.foffset(),e.failure,t);return Mh(i)})})},fb=function(n,t,e,r,o,u){return 0===u?D.none():mb(n,t,e,r,o).bind(function(i){var c=n.fromSitus(i),a=Th.verify(n,e,r,c.finish(),c.foffset(),o.failure,t);return Th.cata(a,function(){return D.none()},function(){return D.some(i)},function(i){return Ge(e,i)&&0===r?sb(n,e,r,_h,o):fb(n,t,i,0,o,u-1)},function(i){return Ge(e,i)&&r===Go(i)?sb(n,e,r,Nh,o):fb(n,t,i,Go(i),o,u-1)})})},sb=function(n,t,e,r,o){return qh(n,t,e).bind(function(t){return db(n,o,r(t,cb.getJumpSize()))})},db=function(n,t,e){var r=qe().browser;return r.isChrome()||r.isSafari()||r.isFirefox()||r.isEdge()?t.otherRetry(n,e):r.isIE()?t.ieRetry(n,e):D.none()},mb=function(n,t,e,r,o){return qh(n,e,r).bind(function(t){return db(n,o,t)})},gb=function(n,t,e){return lb(n,t,e).bind(function(r){return fb(n,t,r.element(),r.offset(),e,ab).map(n.fromSitus)})},pb=function(n,t){return bh(n,function(n){return er(n).exists(function(n){return Ge(n,t)})})},vb=function(n,t,e,r,o){return so(r,"td,th",t).bind(function(r){return so(r,"table",t).bind(function(u){return pb(o,u)?gb(n,t,e).bind(function(n){return so(n.finish(),"td,th",t).map(function(t){return{start:h(r),finish:h(t),range:h(n)}})}):D.none()})})},hb=function(n,t,e,r,o,u){return qe().browser.isIE()?D.none():u(r,t).orThunk(function(){return vb(n,t,e,r,o).map(function(n){var t=n.range();return Hv.create(D.some(Kv(t.start(),t.soffset(),t.finish(),t.foffset())),!0)})})},bb=function(n,t){return so(n,"tr",t).bind(function(n){return so(n,"table",t).bind(function(e){var r=ro(e,"tr");return Ge(n,r[0])?vh(e,function(n){return Zo(n).isSome()},t).map(function(n){var t=Go(n);return Hv.create(D.some(Kv(n,t,n,t)),!0)}):D.none()})})},wb=function(n,t){return so(n,"tr",t).bind(function(n){return so(n,"table",t).bind(function(e){var r=ro(e,"tr");return Ge(n,r[r.length-1])?hh(e,function(n){return Qo(n).isSome()},t).map(function(n){return Hv.create(D.some(Kv(n,0,n,0)),!0)}):D.none()})})},yb=function(n,t,e,r,o,u,i){return vb(n,e,r,o,u).bind(function(n){return Gv(t,e,n.start(),n.finish(),i)})},Sb=function(n,t){return so(n,"td,th",t)},Cb={traverse:ir,gather:ph,relative:Cp.before,otherRetry:cb.tryDown,ieRetry:cb.ieTryDown,failure:Th.failedDown},xb={traverse:ur,gather:gh,relative:Cp.before,otherRetry:cb.tryUp,ieRetry:cb.ieTryUp,failure:Th.failedUp},Tb=function(n){return function(t){return t===n}},Rb=Tb(38),Ob=Tb(40),Db=function(n){return n>=37&&40>=n},Ab={isBackward:Tb(37),isForward:Tb(39)},Bb={isBackward:Tb(39),isForward:Tb(37)},Ib=function(n){return{left:n.left(),top:n.top(),right:n.right(),bottom:n.bottom(),width:n.width(),height:n.height()}},Pb={toRaw:Ib},kb=function(t){var e=void 0!==t?t.dom():n.document,r=e.body.scrollLeft||e.documentElement.scrollLeft,o=e.body.scrollTop||e.documentElement.scrollTop;return Ii(r,o)},Eb=function(t,e,r){var o=void 0!==r?r.dom():n.document,u=o.defaultView;u.scrollBy(t,e)},Mb=function(n){var t=function(t,e){return Qt.fromPoint(Qt.fromDom(n.document),t,e)},e=function(n){return n.dom().getBoundingClientRect()},r=function(t,e,r,o){var u=Pp.exact(t,e,r,o);return Iv(n,u).map(Pb.toRaw)},o=function(){return Bv(n).map(function(t){return Uv(n,t)})},u=function(t){var e=Pp.relative(t.start(),t.finish());return Uv(n,e)},i=function(t,e){return Pv(n,t,e).map(function(n){return Vv.create(n.start(),n.soffset(),n.finish(),n.foffset())})},c=function(){kv(n)},a=function(t){void 0===t&&(t=!1),Bv(n).each(function(e){return e.fold(function(n){return n.collapse(t)},function(e,r){var o=t?e:r;xv(n,o,o)},function(e,r,o,u){var i=t?e:o,c=t?r:u;Cv(n,i,c,i,c)})})},l=function(t){Dv(n,t)},f=function(t){Cv(n,t.start(),t.soffset(),t.finish(),t.foffset())},s=function(t,e){xv(n,t,e)},d=function(){return n.innerHeight},m=function(){var t=kb(Qt.fromDom(n.document));return t.top()},g=function(t,e){Eb(t,e,Qt.fromDom(n.document))};return{elementFromPoint:t,getRect:e,getRangedRect:r,getSelection:o,fromSitus:u,situsFromPoint:i,clearSelection:c,collapseSelection:a,setSelection:f,setRelativeSelection:s,selectContents:l,getInnerHeight:d,getScrollY:m,scrollBy:g}},Nb=function(n,t){return{rows:n,cols:t}},_b=function(n,t,e,r){var o=Mb(n),u=l(o,t,e,r);return{mousedown:u.mousedown,mouseover:u.mouseover,mouseup:u.mouseup}},Wb=function(n,e,r,o){var u=Mb(n),i=function(){return o.clear(e),D.none()},c=function(n,c,a,l,f,s){var d=n.raw(),m=d.which,g=d.shiftKey===!0,p=qu(e,o.selectedSelector).fold(function(){return Ob(m)&&g?t(yb,u,e,r,Cb,l,c,o.selectRange):Rb(m)&&g?t(yb,u,e,r,xb,l,c,o.selectRange):Ob(m)?t(hb,u,r,Cb,l,c,wb):Rb(m)?t(hb,u,r,xb,l,c,bb):D.none},function(n){var t=function(t){return function(){var r=ct(t,function(t){return Xv(t.rows,t.cols,e,n,o)});return r.fold(function(){return Uu(e,o.firstSelectedSelector,o.lastSelectedSelector).map(function(n){var t=Ob(m)||s.isForward(m)?Cp.after:Cp.before;return u.setRelativeSelection(Cp.on(n.first(),0),t(n.table())),o.clear(e),Hv.create(D.none(),!0)})},function(){return D.some(Hv.create(D.none(),!0))})}};return Ob(m)&&g?t([Nb(1,0)]):Rb(m)&&g?t([Nb(-1,0)]):s.isBackward(m)&&g?t([Nb(0,-1),Nb(-1,0)]):s.isForward(m)&&g?t([Nb(0,1),Nb(1,0)]):Db(m)&&g===!1?i:D.none});return p()},a=function(n,t,u,i,c){return qu(e,o.selectedSelector).fold(function(){var a=n.raw(),l=a.which,f=a.shiftKey===!0;return f===!1?D.none():Db(l)?$v(e,r,t,u,i,c,o.selectRange):D.none()},D.none)};return{keydown:c,keyup:a}},jb=function(n,t,e,r){var o=Mb(n);return function(n,u){r.clearBeforeUpdate(t),Hu(n,u,e).each(function(n){var e=n.boxes.getOr([]);r.selectRange(t,e,n.start,n.finish),o.selectContents(u),o.collapseSelection()})}},zb=function(n,t){$(t,function(t){ul(n,t)})},Fb=function(n){return function(t){rl(t,n)}},Lb=function(n){return function(t){zb(t,n)}},Hb=function(n){var t=Fb(n.selected),e=Lb([n.selected,n.lastSelected,n.firstSelected]),r=function(t){var r=ro(t,n.selectedSelector);$(r,e)},o=function(e,o,u,i){r(e),$(o,t),rl(u,n.firstSelected),rl(i,n.lastSelected)};return{clearBeforeUpdate:r,clear:r,selectRange:o,selectedSelector:n.selectedSelector,firstSelectedSelector:n.firstSelectedSelector,lastSelectedSelector:n.lastSelectedSelector}},qb=function(n,t,e){var r=function(t){Wt(t,n.selected),Wt(t,n.firstSelected),Wt(t,n.lastSelected)},o=function(t){kt(t,n.selected,"1")},u=function(n){i(n),e()},i=function(t){var e=ro(t,n.selectedSelector);$(e,r)},c=function(e,r,i,c){u(e),$(r,o),kt(i,n.firstSelected,"1"),kt(c,n.lastSelected,"1"),t(r,i,c)};return{clearBeforeUpdate:i,clear:u,selectRange:c,selectedSelector:n.selectedSelector,firstSelectedSelector:n.firstSelectedSelector,lastSelectedSelector:n.lastSelectedSelector}},Vb={byClass:Hb,byAttr:qb},Ub=function(n,t,e){var r=n.slice(0,t[t.length-1].row()+1),o=$s(r,e);return et(o,function(n){var e=n.cells().slice(0,t[t.length-1].column()+1);return K(e,function(n){return n.element()})})},Kb=function(n,t,e){var r=n.slice(t[0].row()+t[0].rowspan()-1,n.length),o=$s(r,e);return et(o,function(n){var e=n.cells().slice(t[0].column()+t[0].colspan()-1,+n.cells().length);return K(e,function(n){return n.element()})})},$b=function(n,t,e){var r=_o.fromTable(n),o=td(r,t);return o.map(function(n){var t=Vs(r,e,!1),o=Ub(t,n,e),u=Kb(t,n,e);return{upOrLeftCells:o,downOrRightCells:u}})},Gb=function(n){return il(Qt.fromDom(n.target),"ephox-snooker-resizer-bar")===!1},Xb=function(n,t){var e=Qf(D.none()),r=Qf([]),o=function(){return $m(n).bind(function(n){var e=Ro(n),r=function(n){return"caption"===xt(n)};return e.map(function(e){return r(n)?Si(n):Ci(t,e,n)})})},u=function(){e.set(ee(o)()),$(r.get(),function(n){return n()})},i=function(n,t){var o=function(){return e.get().fold(function(){n.setDisabled(!0)},function(e){n.setDisabled(t(e))})};return o(),r.set(r.get().concat([o])),function(){r.set(X(r.get(),function(n){return n!==o}))}},c=function(n){return i(n,function(){return!1})},a=function(n){return i(n,function(n){return"caption"===xt(n.element())})},l=function(n){return function(t){return i(t,function(t){return"caption"===xt(t.element())||n().isNone()})}},f=function(n){return i(n,function(n){return n.mergable().isNone()})},s=function(n){return i(n,function(n){return n.unmergable().isNone()})};return n.on("NodeChange ExecCommand TableSelectorChange",u),{onSetupTable:c,onSetupCellOrRow:a,onSetupPasteable:l,onSetupMergeable:f,onSetupUnmergeable:s,resetTargets:u,targets:function(){return e.get()}}},Yb=function(n,t,e){n.ui.registry.addMenuButton("table",{tooltip:"Table",icon:"table",fetch:function(n){return n("inserttable | cell row column | advtablesort | tableprops deletetable")}});var r=function(t){return function(){return n.execCommand(t)}};n.ui.registry.addButton("tableprops",{tooltip:"Table properties",onAction:r("mceTableProps"),icon:"table",onSetup:t.onSetupTable}),n.ui.registry.addButton("tabledelete",{tooltip:"Delete table",onAction:r("mceTableDelete"),icon:"table-delete-table",onSetup:t.onSetupTable}),n.ui.registry.addButton("tablecellprops",{tooltip:"Cell properties",onAction:r("mceTableCellProps"),icon:"table-cell-properties",onSetup:t.onSetupCellOrRow}),n.ui.registry.addButton("tablemergecells",{tooltip:"Merge cells",onAction:r("mceTableMergeCells"),icon:"table-merge-cells",onSetup:t.onSetupMergeable}),n.ui.registry.addButton("tablesplitcells",{tooltip:"Split cell",onAction:r("mceTableSplitCells"),icon:"table-split-cells",onSetup:t.onSetupUnmergeable}),n.ui.registry.addButton("tableinsertrowbefore",{tooltip:"Insert row before",onAction:r("mceTableInsertRowBefore"),icon:"table-insert-row-above",onSetup:t.onSetupCellOrRow}),n.ui.registry.addButton("tableinsertrowafter",{tooltip:"Insert row after",onAction:r("mceTableInsertRowAfter"),icon:"table-insert-row-after",onSetup:t.onSetupCellOrRow}),n.ui.registry.addButton("tabledeleterow",{tooltip:"Delete row",onAction:r("mceTableDeleteRow"),icon:"table-delete-row",onSetup:t.onSetupCellOrRow}),n.ui.registry.addButton("tablerowprops",{tooltip:"Row properties",onAction:r("mceTableRowProps"),icon:"table-row-properties",onSetup:t.onSetupCellOrRow}),n.ui.registry.addButton("tableinsertcolbefore",{tooltip:"Insert column before",onAction:r("mceTableInsertColBefore"),icon:"table-insert-column-before",onSetup:t.onSetupCellOrRow}),n.ui.registry.addButton("tableinsertcolafter",{tooltip:"Insert column after",onAction:r("mceTableInsertColAfter"),icon:"table-insert-column-after",onSetup:t.onSetupCellOrRow}),n.ui.registry.addButton("tabledeletecol",{tooltip:"Delete column",onAction:r("mceTableDeleteCol"),icon:"table-delete-column",onSetup:t.onSetupCellOrRow}),n.ui.registry.addButton("tablecutrow",{tooltip:"Cut row",icon:"cut-row",onAction:r("mceTableCutRow"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addButton("tablecopyrow",{tooltip:"Copy row",icon:"duplicate-row",onAction:r("mceTableCopyRow"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addButton("tablepasterowbefore",{tooltip:"Paste row before",icon:"paste-row-before",onAction:r("mceTablePasteRowBefore"),onSetup:t.onSetupPasteable(e.getRows)}),n.ui.registry.addButton("tablepasterowafter",{tooltip:"Paste row after",icon:"paste-row-after",onAction:r("mceTablePasteRowAfter"),onSetup:t.onSetupPasteable(e.getRows)}),n.ui.registry.addButton("tablecutcol",{tooltip:"Cut column",icon:"cut-column",onAction:r("mceTableCutCol"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addButton("tablecopycol",{tooltip:"Copy column",icon:"duplicate-column",onAction:r("mceTableCopyCol"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addButton("tablepastecolbefore",{tooltip:"Paste column before",icon:"paste-column-before",onAction:r("mceTablePasteColBefore"),onSetup:t.onSetupPasteable(e.getColumns)}),n.ui.registry.addButton("tablepastecolafter",{tooltip:"Paste column after",icon:"paste-column-after",onAction:r("mceTablePasteColAfter"),onSetup:t.onSetupPasteable(e.getColumns)}),n.ui.registry.addButton("tableinsertdialog",{tooltip:"Insert table",onAction:r("mceInsertTable"),icon:"table"})
},Jb=function(n){var t=function(t){return n.dom.is(t,"table")&&n.getBody().contains(t)},e=Mf(n);e.length>0&&n.ui.registry.addContextToolbar("table",{predicate:t,items:e,scope:"node",position:"node"})},Qb=function(n,t,e){var r=function(t){return function(){return n.execCommand(t)}},o=function(t){var e=t.numRows,r=t.numColumns;n.undoManager.transact(function(){lg(n,r,e,0,0)}),n.addVisual()},u={text:"Table properties",onSetup:t.onSetupTable,onAction:r("mceTableProps")},i={text:"Delete table",icon:"table-delete-table",onSetup:t.onSetupTable,onAction:r("mceTableDelete")};n.ui.registry.addMenuItem("tableinsertrowbefore",{text:"Insert row before",icon:"table-insert-row-above",onAction:r("mceTableInsertRowBefore"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addMenuItem("tableinsertrowafter",{text:"Insert row after",icon:"table-insert-row-after",onAction:r("mceTableInsertRowAfter"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addMenuItem("tabledeleterow",{text:"Delete row",icon:"table-delete-row",onAction:r("mceTableDeleteRow"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addMenuItem("tablerowprops",{text:"Row properties",icon:"table-row-properties",onAction:r("mceTableRowProps"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addMenuItem("tablecutrow",{text:"Cut row",icon:"cut-row",onAction:r("mceTableCutRow"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addMenuItem("tablecopyrow",{text:"Copy row",icon:"duplicate-row",onAction:r("mceTableCopyRow"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addMenuItem("tablepasterowbefore",{text:"Paste row before",icon:"paste-row-before",onAction:r("mceTablePasteRowBefore"),onSetup:t.onSetupPasteable(e.getRows)}),n.ui.registry.addMenuItem("tablepasterowafter",{text:"Paste row after",icon:"paste-row-after",onAction:r("mceTablePasteRowAfter"),onSetup:t.onSetupPasteable(e.getRows)});var c={type:"nestedmenuitem",text:"Row",getSubmenuItems:function(){return"tableinsertrowbefore tableinsertrowafter tabledeleterow tablerowprops | tablecutrow tablecopyrow tablepasterowbefore tablepasterowafter"}};n.ui.registry.addMenuItem("tableinsertcolumnbefore",{text:"Insert column before",icon:"table-insert-column-before",onAction:r("mceTableInsertColBefore"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addMenuItem("tableinsertcolumnafter",{text:"Insert column after",icon:"table-insert-column-after",onAction:r("mceTableInsertColAfter"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addMenuItem("tabledeletecolumn",{text:"Delete column",icon:"table-delete-column",onAction:r("mceTableDeleteCol"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addMenuItem("tablecutcolumn",{text:"Cut column",icon:"cut-column",onAction:r("mceTableCutCol"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addMenuItem("tablecopycolumn",{text:"Copy column",icon:"duplicate-column",onAction:r("mceTableCopyCol"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addMenuItem("tablepastecolumnbefore",{text:"Paste column before",icon:"paste-column-before",onAction:r("mceTablePasteColBefore"),onSetup:t.onSetupPasteable(e.getColumns)}),n.ui.registry.addMenuItem("tablepastecolumnafter",{text:"Paste column after",icon:"paste-column-after",onAction:r("mceTablePasteColAfter"),onSetup:t.onSetupPasteable(e.getColumns)});var a={type:"nestedmenuitem",text:"Column",getSubmenuItems:function(){return"tableinsertcolumnbefore tableinsertcolumnafter tabledeletecolumn"}};n.ui.registry.addMenuItem("tablecellprops",{text:"Cell properties",icon:"table-cell-properties",onAction:r("mceTableCellProps"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addMenuItem("tablemergecells",{text:"Merge cells",icon:"table-merge-cells",onAction:r("mceTableMergeCells"),onSetup:t.onSetupMergeable}),n.ui.registry.addMenuItem("tablesplitcells",{text:"Split cell",icon:"table-split-cells",onAction:r("mceTableSplitCells"),onSetup:t.onSetupUnmergeable});var l={type:"nestedmenuitem",text:"Cell",getSubmenuItems:function(){return"tablecellprops tablemergecells tablesplitcells"}};Of(n)===!1?n.ui.registry.addMenuItem("inserttable",{text:"Table",icon:"table",onAction:r("mceInsertTable")}):n.ui.registry.addNestedMenuItem("inserttable",{text:"Table",icon:"table",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"inserttable",onAction:o}]}}),n.ui.registry.addMenuItem("inserttabledialog",{text:"Insert table",icon:"table",onAction:r("mceInsertTable")}),n.ui.registry.addMenuItem("tableprops",u),n.ui.registry.addMenuItem("deletetable",i),n.ui.registry.addNestedMenuItem("row",c),n.ui.registry.addNestedMenuItem("column",a),n.ui.registry.addNestedMenuItem("cell",l),n.ui.registry.addContextMenu("table",{update:function(){return t.resetTargets(),t.targets().fold(function(){return""},function(n){return"caption"===xt(n.element())?"tableprops deletetable":"cell row column | advtablesort | tableprops deletetable"})}})},Zb={tablecellbackgroundcolor:{selector:"td,th",styles:{backgroundColor:"%value"},remove_similar:!0},tablecellbordercolor:{selector:"td,th",styles:{borderColor:"%value"},remove_similar:!0},tablecellborderstyle:{selector:"td,th",styles:{borderStyle:"%value"},remove_similar:!0},tablecellborderwidth:{selector:"td,th",styles:{borderWidth:"%value"},remove_similar:!0}},nw=function(n){n.formatter.register(Zb)};d()}(window)});
;/*!node_modules/tinymce/plugins/table/index.js*/
amis.define("node_modules/tinymce/plugins/table/index",function(e){e("node_modules/tinymce/plugins/table/plugin")});
;/*!node_modules/tinymce/plugins/paste/plugin.js*/
amis.define("node_modules/tinymce/plugins/paste/plugin",function(){!function(t){"use strict";function e(t,e){return X.each(e,function(e){t=e.constructor===RegExp?t.replace(e,""):t.replace(e[0],e[1])}),t}function n(t){function n(t){var e=t.name,r=t;if("br"===e)return void(i+="\n");if("wbr"!==e){if(a[e]&&(i+=" "),u[e])return void(i+=" ");if(3===t.type&&(i+=t.value),!t.shortEnded&&(t=t.firstChild))do n(t);while(t=t.next);s[e]&&r.next&&(i+="\n","p"===e&&(i+="\n"))}}var r=fe(),o=ue({},r),i="",a=r.getShortEndedElements(),u=X.makeMap("script noscript style textarea video audio iframe object"," "),s=r.getBlockElements();return t=e(t,[/<!\[[^\]]+\]>/g]),n(o.parse(t)),i}function r(t){function n(t,e,n){return e||n?ce:" "}return t=e(t,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,n],/<br class="Apple-interchange-newline">/g,/<br>$/i])}function o(t){var e=0;return function(){return t+e++}}function i(t){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i.test(t)||/class="OutlineElement/.test(t)||/id="?docs\-internal\-guid\-/.test(t)}function a(t){var e,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 t=t.replace(/^[\u00a0 ]+/,""),X.each(n,function(n){return n.test(t)?(e=!0,!1):void 0}),e}function u(t){return/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(t)}function s(t){function e(t){var n="";if(3===t.type)return t.value;if(t=t.firstChild)do n+=e(t);while(t=t.next);return n}function n(t,e){if(3===t.type&&e.test(t.value))return t.value=t.value.replace(e,""),!1;if(t=t.firstChild)do if(!n(t,e))return!1;while(t=t.next);return!0}function r(t){if(t._listIgnore)return void t.remove();if(t=t.firstChild)do r(t);while(t=t.next)}function o(t,e,o){var a=t._listLevel||c;a!==c&&(c>a?i&&(i=i.parent.parent):(s=i,i=null)),i&&i.name===e?i.append(t):(s=s||i,i=new le(e,1),o>1&&i.attr("start",""+o),t.wrap(i)),t.name="li",a>c&&s&&s.lastChild.append(i),c=a,r(t),n(t,/^\u00a0+/),n(t,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),n(t,/^\u00a0+/)}for(var i,s,c=1,l=[],f=t.firstChild;"undefined"!=typeof f&&null!==f;)if(l.push(f),f=f.walk(),null!==f)for(;"undefined"!=typeof f&&f.parent!==t;)f=f.walk();for(var d=0;d<l.length;d++)if(t=l[d],"p"===t.name&&t.firstChild){var m=e(t);if(u(m)){o(t,"ul");continue}if(a(m)){var p=/([0-9]+)\./.exec(m),g=1;p&&(g=parseInt(p[1],10)),o(t,"ol",g);continue}if(t._listLevel){o(t,"ul",1);continue}i=null}else s=i,i=null}function c(t,e,n,r){var o,i={},a=t.dom.parseStyle(r);return X.each(a,function(a,u){switch(u){case"mso-list":o=/\w+ \w+([0-9]+)/i.exec(r),o&&(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()}return 0===u.indexOf("mso-comment")?void n.remove():void(0!==u.indexOf("mso-")&&("all"===Pe(t)||e&&e[u])&&(i[u]=a))}),/(bold)/i.test(i["font-weight"])&&(delete i["font-weight"],n.wrap(new le("b",1))),/(italic)/i.test(i["font-style"])&&(delete i["font-style"],n.wrap(new le("i",1))),i=t.dom.serializeStyle(i,n.name),i?i:null}function l(t,e){t.on("PastePreProcess",function(n){n.content=e(t,n.content,n.internal,n.wordContent)})}function f(t,e){t.on("PastePostProcess",function(n){e(t,n.node)})}function d(t,n){if(!i(n))return n;var r=[];X.each(t.schema.getBlockElements(),function(t,e){r.push(e)});var o=new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?("+r.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g");return n=e(n,[[o,"$1"]]),n=e(n,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}function m(t,e,n,r){if(r||n)return e;var o,i=he(t);if(ye(t)===!1||"all"===i)return e;if(i&&(o=i.split(/[, ]/)),o){var a=t.dom,u=t.selection.getNode();e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(t,e,n,r){var i=a.parseStyle(a.decode(n)),s={};if("none"===o)return e+r;for(var c=0;c<o.length;c++){var l=i[o[c]],f=a.getStyle(u,o[c],!0);/color/.test(o[c])&&(l=a.toHex(l),f=a.toHex(f)),f!==l&&(s[o[c]]=l)}return s=a.serializeStyle(s,"span"),s?e+' style="'+s+'"'+r:e+r})}else e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return e=e.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(t,e,n,r){return e+' style="'+n+'"'+r})}function p(t,e){t.$("a",e).find("font,u").each(function(e,n){t.dom.remove(n,!0)})}function g(){h.add("paste",function(t){if(y(t)===!1){var e=v(!1),n=v(we(t)?"text":"html"),r=En(t,n),o=Zn(t);return Jn(t,r),C(t,r),Yn(t),Un(t),Wn(t,r,e),b(r,o)}})}var v=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},h=tinymce.util.Tools.resolve("tinymce.PluginManager"),y=function(e){return/(^|[ ,])powerpaste([, ]|$)/.test(e.getParam("plugins"))&&h.get("powerpaste")?("undefined"!=typeof t.window.console&&t.window.console.log&&t.window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),!0):!1},b=function(t,e){return{clipboard:t,quirks:e}},x=function(t,e,n,r){return t.fire("PastePreProcess",{content:e,internal:n,wordContent:r})},w=function(t,e,n,r){return t.fire("PastePostProcess",{node:e,internal:n,wordContent:r})},P=function(t,e){return t.fire("PastePlainTextToggle",{state:e})},_=function(t,e){return t.fire("paste",{ieFake:e})},T=function(t,e){"text"===e.pasteFormat.get()?(e.pasteFormat.set("html"),P(t,!1)):(e.pasteFormat.set("text"),P(t,!0)),t.focus()},C=function(t,e){t.addCommand("mceTogglePlainTextPaste",function(){T(t,e)}),t.addCommand("mceInsertClipboardContent",function(t,n){n.content&&e.pasteHtml(n.content,n.internal),n.text&&e.pasteText(n.text)})},D=function(){},k=function(t){return function(){return t}},S=k(!1),O=k(!0),R=function(){return A},A=function(){var t=function(t){return t.isNone()},e=function(t){return t()},n=function(t){return t},r={fold:function(t){return t()},is:S,isSome:S,isNone:O,getOr:n,getOrThunk:e,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:k(null),getOrUndefined:k(void 0),or:n,orThunk:e,map:R,each:D,bind:R,exists:S,forall:O,filter:R,equals:t,equals_:t,toArray:function(){return[]},toString:k("none()")};return r}(),I=function(t){var e=k(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:O,isNone:S,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return I(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:A},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 o},E=function(t){return null===t||void 0===t?A:I(t)},F={some:I,none:R,from:E},M=function(t){return function(e){return typeof e===t}},N=M("function"),B=Array.prototype.slice,$=function(t,e){for(var n=t.length,r=new Array(n),o=0;n>o;o++){var i=t[o];r[o]=e(i,o)}return r},H=function(t,e){for(var n=0,r=t.length;r>n;n++){var o=t[n];e(o,n)}},j=function(t,e){for(var n=[],r=0,o=t.length;o>r;r++){var i=t[r];e(i,r)&&n.push(i)}return n},L=function(t,e,n){return H(t,function(t){n=e(n,t)}),n},z=N(Array.from)?Array.from:function(t){return B.call(t)},U=function(){var t=v(F.none()),e=function(){t.set(F.none())},n=function(e){t.set(F.some(e))},r=function(e){t.get().each(e)},o=function(){return t.get().isSome()};return{clear:e,set:n,isSet:o,on:r}},q=tinymce.util.Tools.resolve("tinymce.Env"),V=tinymce.util.Tools.resolve("tinymce.util.Delay"),K=tinymce.util.Tools.resolve("tinymce.util.Promise"),X=tinymce.util.Tools.resolve("tinymce.util.Tools"),W=tinymce.util.Tools.resolve("tinymce.util.VK"),Y="x-tinymce/html",Z="<!-- "+Y+" -->",G=function(t){return Z+t},J=function(t){return t.replace(Z,"")},Q=function(t){return-1!==t.indexOf(Z)},te=function(){return Y},ee=tinymce.util.Tools.resolve("tinymce.html.Entities"),ne=function(t){return!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(t)},re=function(t){return t.replace(/\r?\n/g,"<br>")},oe=function(t,e){var n,r=[],o="<"+t;if("object"==typeof e){for(n in e)e.hasOwnProperty(n)&&r.push(n+'="'+ee.encodeAllRaw(e[n])+'"');r.length&&(o+=" "+r.join(" "))}return o+">"},ie=function(t,e,n){var r=t.split(/\n\n/),o=oe(e,n),i="</"+e+">",a=X.map(r,function(t){return t.split(/\n/).join("<br />")}),u=function(t){return o+t+i};return 1===a.length?a[0]:X.map(a,u).join("")},ae=function(t,e,n){return e?ie(t,e===!0?"p":e,n):re(t)},ue=tinymce.util.Tools.resolve("tinymce.html.DomParser"),se=tinymce.util.Tools.resolve("tinymce.html.Serializer"),ce=" ",le=tinymce.util.Tools.resolve("tinymce.html.Node"),fe=tinymce.util.Tools.resolve("tinymce.html.Schema"),de=function(t){return t.getParam("paste_block_drop",!1)},me=function(t){return t.getParam("paste_data_images",!1)},pe=function(t){return t.getParam("paste_filter_drop",!0)},ge=function(t){return t.getParam("paste_preprocess")},ve=function(t){return t.getParam("paste_postprocess")},he=function(t){return t.getParam("paste_webkit_styles")},ye=function(t){return t.getParam("paste_remove_styles_if_webkit",!0)},be=function(t){return t.getParam("paste_merge_formats",!0)},xe=function(t){return t.getParam("smart_paste",!0)},we=function(t){return t.getParam("paste_as_text",!1)},Pe=function(t){return t.getParam("paste_retain_style_properties")},_e=function(t){var e="-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";return t.getParam("paste_word_valid_elements",e)},Te=function(t){return t.getParam("paste_convert_word_fake_lists",!0)},Ce=function(t){return t.getParam("paste_enable_default_filters",!0)},De=function(t){return t.getParam("validate")},ke=function(t){return t.getParam("allow_html_data_urls",!1,"boolean")},Se=function(t){return t.getParam("paste_data_images",!1,"boolean")},Oe=function(t){return t.getParam("images_dataimg_filter")},Re=function(t){return t.getParam("images_reuse_filename")},Ae=function(t){return t.getParam("forced_root_block")},Ie=function(t){return t.getParam("forced_root_block_attrs")},Ee=function(){return-1!==t.navigator.userAgent.indexOf(" Edge/")},Fe=function(t,n){var r,o=Pe(t);o&&(r=X.makeMap(o.split(/[, ]/))),n=e(n,[/<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>"],[/&nbsp;/gi,ce],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(t,e){return e.length>0?e.replace(/./," ").slice(Math.floor(e.length/2)).split("").join(ce):""}]]);var i=_e(t),a=fe({valid_elements:i,valid_children:"-li[p]"});X.each(a.elements,function(t){t.attributes.class||(t.attributes.class={},t.attributesOrder.push("class")),t.attributes.style||(t.attributes.style={},t.attributesOrder.push("style"))});var u=ue({},a);u.addAttributeFilter("style",function(e){for(var n,o=e.length;o--;)n=e[o],n.attr("style",c(t,r,n,n.attr("style"))),"span"===n.name&&n.parent&&!n.attributes.length&&n.unwrap()}),u.addAttributeFilter("class",function(t){for(var e,n,r=t.length;r--;)e=t[r],n=e.attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&e.remove(),e.attr("class",null)}),u.addNodeFilter("del",function(t){for(var e=t.length;e--;)t[e].remove()}),u.addNodeFilter("a",function(t){for(var e,n,r,o=t.length;o--;)if(e=t[o],n=e.attr("href"),r=e.attr("name"),n&&-1!==n.indexOf("#_msocom_"))e.remove();else if(n&&0===n.indexOf("file://")&&(n=n.split("#")[1],n&&(n="#"+n)),n||r){if(r&&!/^_?(?:toc|edn|ftn)/i.test(r)){e.unwrap();continue}e.attr({href:n,name:r})}else e.unwrap()});var l=u.parse(n);return Te(t)&&s(l),n=se({validate:De(t)},a).serialize(l)},Me=function(t,e){return Ce(t)?Fe(t,e):e},Ne=function(t,e){var n=ue({},t.schema);n.addNodeFilter("meta",function(t){X.each(t,function(t){return t.remove()})});var r=n.parse(e,{forced_root_block:!1,isRootContent:!0});return se({validate:De(t)},t.schema).serialize(r)},Be=function(t,e){return{content:t,cancelled:e}},$e=function(t,e,n,r){var o=t.dom.create("div",{style:"display:none"},e),i=w(t,o,n,r);return Be(i.node.innerHTML,i.isDefaultPrevented())},He=function(t,e,n,r){var o=x(t,e,n,r),i=Ne(t,o.content);return t.hasEventListeners("PastePostProcess")&&!o.isDefaultPrevented()?$e(t,i,n,r):Be(i,o.isDefaultPrevented())},je=function(t,e,n){var r=i(e),o=r?Me(t,e):e;return He(t,o,n,r)},Le=function(t,e){return t.insertContent(e,{merge:be(t),paste:!0}),!0},ze=function(t){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(t)},Ue=function(t){return ze(t)&&/.(gif|jpe?g|png)$/.test(t)},qe=function(t,e,n){return t.undoManager.extra(function(){n(t,e)},function(){t.insertContent('<img src="'+e+'">')}),!0},Ve=function(t,e,n){return t.undoManager.extra(function(){n(t,e)},function(){t.execCommand("mceInsertLink",!1,e)}),!0},Ke=function(t,e,n){return t.selection.isCollapsed()===!1&&ze(e)?Ve(t,e,n):!1},Xe=function(t,e,n){return Ue(e)?qe(t,e,n):!1},We=function(t,e){X.each([Ke,Xe,Le],function(n){return n(t,e,Le)!==!0})},Ye=function(t,e,n){n||xe(t)===!1?Le(t,e):We(t,e)},Ze=function(t){return-1!==" \f ".indexOf(t)},Ge=function(t){return"\n"===t||"\r"===t},Je=function(t,e){return e<t.length&&e>=0?Ge(t[e]):!1},Qe=function(t){var e=L(t,function(e,n){return Ze(n)||n===ce?e.pcIsSpace||""===e.str||e.str.length===t.length-1||Je(t,e.str.length+1)?{pcIsSpace:!1,str:e.str+ce}:{pcIsSpace:!0,str:e.str+" "}:{pcIsSpace:Ge(n),str:e.str+n}},{pcIsSpace:!1,str:""});return e.str},tn=function(t,e,n,r){var o=je(t,e,n);o.cancelled===!1&&Ye(t,o.content,r)},en=function(t,e,n){var r=n?n:Q(e);tn(t,J(e),r,!1)},nn=function(t,e){var n=t.dom.encode(e).replace(/\r\n/g,"\n"),r=Qe(n),o=ae(r,Ae(t),Ie(t));tn(t,o,!1,!0)},rn=function(t){var e={},n="data:text/mce-internal,";if(t){if(t.getData){var r=t.getData("Text");r&&r.length>0&&-1===r.indexOf(n)&&(e["text/plain"]=r)}if(t.types)for(var o=0;o<t.types.length;o++){var i=t.types[o];try{e[i]=t.getData(i)}catch(a){e[i]=""}}}return e},on=function(t,e){var n=rn(e.clipboardData||t.getDoc().dataTransfer);return Ee()?X.extend(n,{"text/html":""}):n},an=function(t,e){return e in t&&t[e].length>0},un=function(t){return an(t,"text/html")||an(t,"text/plain")},sn=function(t){var e=/data:([^;]+);base64,([a-z0-9\+\/=]+)/i.exec(t);return e?{type:e[1],data:decodeURIComponent(e[2])}:{type:null,data:null}},cn=function(t,e){var n=Oe(t);return n?n(e):!0},ln=function(t,e){var n=e.match(/([\s\S]+?)\.(?:jpeg|jpg|png|gif)$/i);return n?t.dom.encode(n[1]):null},fn=o("mceclip"),dn=function(e,n){var r=sn(n.uri),o=r.data,i=r.type,a=fn(),u=Re(e)&&n.blob.name?ln(e,n.blob.name):a,s=new t.Image;if(s.src=n.uri,cn(e,s)){var c=e.editorUpload.blobCache,l=void 0,f=c.getByData(o,i);f?l=f:(l=c.create(a,n.blob,o,u),c.add(l)),en(e,'<img src="'+l.blobUri()+'">',!1)}else en(e,'<img src="'+n.uri+'">',!1)},mn=function(t){return"paste"===t.type},pn=function(t){return K.all($(t,function(t){return new K(function(e){var n=t.getAsFile?t.getAsFile():t,r=new window.FileReader;r.onload=function(){e({blob:n,uri:r.result})},r.readAsDataURL(n)})}))},gn=function(t){var e=t.items?$(z(t.items),function(t){return t.getAsFile()}):[],n=t.files?z(t.files):[],r=j(e.length>0?e:n,function(t){return/^image\/(jpeg|png|gif|bmp)$/.test(t.type)});return r},vn=function(t,e,n){var r=mn(e)?e.clipboardData:e.dataTransfer;if(Se(t)&&r){var o=gn(r);if(o.length>0)return e.preventDefault(),pn(o).then(function(e){n&&t.selection.setRng(n),H(e,function(e){dn(t,e)})}),!0}return!1},hn=function(e){var n=e.clipboardData;return-1!==t.navigator.userAgent.indexOf("Android")&&n&&n.items&&0===n.items.length},yn=function(t){return W.metaKeyPressed(t)&&86===t.keyCode||t.shiftKey&&45===t.keyCode},bn=function(e,o,i){function a(t,i,a,u){var s;an(t,"text/html")?s=t["text/html"]:(s=o.getHtml(),u=u?u:Q(s),o.isDefaultContent(s)&&(a=!0)),s=r(s),o.remove();var c=u===!1&&ne(s),l=Ue(s);return(!s.length||c&&!l)&&(a=!0),(a||l)&&(s=an(t,"text/plain")&&c?t["text/plain"]:n(s)),o.isDefaultContent(s)?void(i||e.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents.")):void(a?nn(e,s):en(e,s,u))}var u,s=U();e.on("keydown",function(n){function r(t){yn(t)&&!t.isDefaultPrevented()&&o.remove()}if(yn(n)&&!n.isDefaultPrevented()){if(u=n.shiftKey&&86===n.keyCode,u&&q.webkit&&-1!==t.navigator.userAgent.indexOf("Version/"))return;if(n.stopImmediatePropagation(),s.set(n),window.setTimeout(function(){s.clear()},100),q.ie&&u)return n.preventDefault(),void _(e,!0);o.remove(),o.create(),e.once("keyup",r),e.once("paste",function(){e.off("keyup",r)})}});var c=function(){return o.getLastRng()||e.selection.getRng()};e.on("paste",function(t){var n=s.isSet(),r=on(e,t),l="text"===i.get()||u,f=an(r,te());return u=!1,t.isDefaultPrevented()||hn(t)?void o.remove():!un(r)&&vn(e,t,c())?void o.remove():(n||t.preventDefault(),!q.ie||n&&!t.ieFake||an(r,"text/html")||(o.create(),e.dom.bind(o.getEl(),"paste",function(t){t.stopPropagation()}),e.getDoc().execCommand("Paste",!1,null),r["text/html"]=o.getHtml()),void(an(r,"text/html")?(t.preventDefault(),f||(f=Q(r["text/html"])),a(r,n,l,f)):V.setEditorTimeout(e,function(){a(r,n,l,f)},0)))})},xn=function(t,e,n){bn(t,e,n);var r;t.parser.addNodeFilter("img",function(e,n,o){var i=function(t){return t.data&&t.data.paste===!0},a=function(t){t.attr("data-mce-object")||r===q.transparentSrc||t.remove()},u=function(t){return 0===t.indexOf("webkit-fake-url")},s=function(t){return 0===t.indexOf("data:")};if(!Se(t)&&i(o))for(var c=e.length;c--;)r=e[c].attr("src"),r&&(u(r)?a(e[c]):!ke(t)&&s(r)&&a(e[c]))})},wn=function(e){return q.ie&&e.inline?t.document.body:e.getBody()},Pn=function(t){return wn(t)!==t.getBody()},_n=function(t,e,n){Pn(t)&&t.dom.bind(e,"paste keyup",function(){An(t,n)||t.fire("paste")})},Tn=function(t,e,n){var r=t.dom,o=t.getBody();e.set(t.selection.getRng());var i=t.dom.add(wn(t),"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"},n);(q.ie||q.gecko)&&r.setStyle(i,"left","rtl"===r.getStyle(o,"direction",!0)?65535:-65535),r.bind(i,"beforedeactivate focusin focusout",function(t){t.stopPropagation()}),_n(t,i,n),i.focus(),t.selection.select(i,!0)},Cn=function(t,e){if(Dn(t)){for(var n=void 0,r=e.get();n=t.dom.get("mcepastebin");)t.dom.remove(n),t.dom.unbind(n);r&&t.selection.setRng(r)}e.set(null)},Dn=function(t){return t.dom.get("mcepastebin")},kn=function(t){var e=function(e,n){e.appendChild(n),t.dom.remove(n,!0)},n=X.grep(wn(t).childNodes,function(t){return"mcepastebin"===t.id}),r=n.shift();X.each(n,function(t){e(r,t)});for(var o=t.dom.select("div[id=mcepastebin]",r),i=o.length-1;i>=0;i--){var a=t.dom.create("div");r.insertBefore(a,o[i]),e(a,o[i])}return r?r.innerHTML:""},Sn=function(t){return t.get()},On=function(t,e){return e===t},Rn=function(t){return t&&"mcepastebin"===t.id},An=function(t,e){var n=Dn(t);return Rn(n)&&On(e,n.innerHTML)},In=function(t){var e=v(null),n="%MCEPASTEBIN%";return{create:function(){return Tn(t,e,n)},remove:function(){return Cn(t,e)},getEl:function(){return Dn(t)},getHtml:function(){return kn(t)},getLastRng:function(){return Sn(e)},isDefault:function(){return An(t,n)},isDefaultContent:function(t){return On(n,t)}}},En=function(t,e){var n=In(t);return t.on("PreInit",function(){return xn(t,n,e)}),{pasteFormat:e,pasteHtml:function(e,n){return en(t,e,n)},pasteText:function(e){return nn(t,e)},pasteImageData:function(e,n){return vn(t,e,n)},getDataTransferItems:rn,hasHtmlOrText:un,hasContentType:an}},Fn=function(t){return q.iOS===!1&&void 0!==t&&"function"==typeof t.setData&&Ee()!==!0},Mn=function(t,e,n){if(!Fn(t))return!1;try{return t.clearData(),t.setData("text/html",e),t.setData("text/plain",n),t.setData(te(),e),!0}catch(r){return!1}},Nn=function(t,e,n,r){Mn(t.clipboardData,e.html,e.text)?(t.preventDefault(),r()):n(e.html,r)},Bn=function(t){return function(e,n){var r=G(e),o=t.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),i=t.dom.create("div",{contenteditable:"true"},r);t.dom.setStyles(o,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),o.appendChild(i),t.dom.add(t.getBody(),o);var a=t.selection.getRng();i.focus();var u=t.dom.createRng();u.selectNodeContents(i),t.selection.setRng(u),V.setTimeout(function(){t.selection.setRng(a),o.parentNode.removeChild(o),n()},0)}},$n=function(t){return{html:t.selection.getContent({contextual:!0}),text:t.selection.getContent({format:"text"})}},Hn=function(t){return!!t.dom.getParent(t.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",t.getBody())},jn=function(t){return!t.selection.isCollapsed()||Hn(t)},Ln=function(t){return function(e){jn(t)&&Nn(e,$n(t),Bn(t),function(){if(q.browser.isChrome()){var e=t.selection.getRng();V.setEditorTimeout(t,function(){t.selection.setRng(e),t.execCommand("Delete")},0)}else t.execCommand("Delete")})}},zn=function(t){return function(e){jn(t)&&Nn(e,$n(t),Bn(t),function(){})}},Un=function(t){t.on("cut",Ln(t)),t.on("copy",zn(t))},qn=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),Vn=function(t,e){return qn.getCaretRangeFromPoint(e.clientX,e.clientY,t.getDoc())},Kn=function(t){var e=t["text/plain"];return e?0===e.indexOf("file://"):!1},Xn=function(t,e){t.focus(),t.selection.setRng(e)},Wn=function(t,e,n){de(t)&&t.on("dragend dragover draggesture dragdrop drop drag",function(t){t.preventDefault(),t.stopPropagation()}),me(t)||t.on("drop",function(t){var e=t.dataTransfer;e&&e.files&&e.files.length>0&&t.preventDefault()}),t.on("drop",function(o){var i=Vn(t,o);if(!o.isDefaultPrevented()&&!n.get()){var a=e.getDataTransferItems(o.dataTransfer),u=e.hasContentType(a,te());if((e.hasHtmlOrText(a)&&!Kn(a)||!e.pasteImageData(o,i))&&i&&pe(t)){var s=a["mce-internal"]||a["text/html"]||a["text/plain"];s&&(o.preventDefault(),V.setEditorTimeout(t,function(){t.undoManager.transact(function(){a["mce-internal"]&&t.execCommand("Delete"),Xn(t,i),s=r(s),a["text/html"]?e.pasteHtml(s,u):e.pasteText(s)})}))}}}),t.on("dragstart",function(){n.set(!0)}),t.on("dragover dragend",function(e){me(t)&&n.get()===!1&&(e.preventDefault(),Xn(t,Vn(t,e))),"dragend"===e.type&&n.set(!1)})},Yn=function(t){var e=t.plugins.paste,n=ge(t);n&&t.on("PastePreProcess",function(t){n.call(e,e,t)});var r=ve(t);r&&t.on("PastePostProcess",function(t){r.call(e,e,t)})},Zn=function(t){q.webkit&&l(t,m),q.ie&&(l(t,d),f(t,p))},Gn=function(t,e){return function(n){n.setActive("text"===e.pasteFormat.get());var r=function(t){return n.setActive(t.state)};return t.on("PastePlainTextToggle",r),function(){return t.off("PastePlainTextToggle",r)}}},Jn=function(t,e){t.ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:function(){return t.execCommand("mceTogglePlainTextPaste")},onSetup:Gn(t,e)}),t.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",icon:"paste-text",onAction:function(){return t.execCommand("mceTogglePlainTextPaste")},onSetup:Gn(t,e)})};g()}(window)});
;/*!node_modules/tinymce/plugins/paste/index.js*/
amis.define("node_modules/tinymce/plugins/paste/index",function(e){e("node_modules/tinymce/plugins/paste/plugin")});
;/*!node_modules/tinymce/plugins/help/plugin.js*/
amis.define("node_modules/tinymce/plugins/help/plugin",function(){!function(){"use strict";function e(){n.add("help",function(e){var n=t({}),r=o(n),s=z(e,n);return i(e,s),a(e,s),e.shortcuts.add("Alt+0","Open help dialog","mceHelp"),r})}var t=function(e){var t=e,n=function(){return t},o=function(e){t=e};return{get:n,set:o}},n=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(e){var t=function(t){var n=e.get();n[t.name]=t,e.set(n)};return{addTab:t}},a=function(e,t){e.addCommand("mceHelp",t)},i=function(e,t){e.ui.registry.addButton("help",{icon:"help",tooltip:"Help",onAction:t}),e.ui.registry.addMenuItem("help",{text:"Help",icon:"help",shortcut:"Alt+0",onAction:t})},r=function(){return r=Object.assign||function(e){for(var t,n=1,o=arguments.length;o>n;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},r.apply(this,arguments)},s=function(){},c=function(e){return function(){return e}},l=c(!1),u=c(!0),h=function(){return m},m=function(){var e=function(e){return e.isNone()},t=function(e){return e()},n=function(e){return e},o={fold:function(e){return e()},is:l,isSome:l,isNone:u,getOr:n,getOrThunk:t,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:c(null),getOrUndefined:c(void 0),or:n,orThunk:t,map:h,each:s,bind:h,exists:l,forall:u,filter:h,equals:e,equals_:e,toArray:function(){return[]},toString:c("none()")};return o}(),d=function(e){var t=c(e),n=function(){return a},o=function(t){return t(e)},a={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:u,isNone:l,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return d(t(e))},each:function(t){t(e)},bind:o,exists:o,forall:o,filter:function(t){return t(e)?a:m},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 a},p=function(e){return null===e||void 0===e?m:d(e)},f={some:d,none:h,from:p},g=Array.prototype.indexOf,b=function(e,t){return g.call(e,t)},y=function(e,t){return b(e,t)>-1},k=function(e,t){for(var n=e.length,o=new Array(n),a=0;n>a;a++){var i=e[a];o[a]=t(i,a)}return o},v=function(e,t){for(var n=[],o=0,a=e.length;a>o;o++){var i=e[o];t(i,o)&&n.push(i)}return n},w=function(e,t,n){for(var o=0,a=e.length;a>o;o++){var i=e[o];if(t(i,o))return f.some(i);if(n(i,o))break}return f.none()},A=function(e,t){return w(e,t,l)},C=Object.keys,T=Object.hasOwnProperty,x=function(e,t){return P(e,t)?f.from(e[t]):f.none()},P=function(e,t){return T.call(e,t)},M=function(e){for(var t=[],n=function(e){t.push(e)},o=0;o<e.length;o++)e[o].each(n);return t},F=function(e){return f.from(e.getParam("help_tabs"))},O=function(e){return e.getParam("forced_plugins")},S=[{shortcuts:["Meta + B"],action:"Bold"},{shortcuts:["Meta + I"],action:"Italic"},{shortcuts:["Meta + U"],action:"Underline"},{shortcuts:["Meta + A"],action:"Select all"},{shortcuts:["Meta + Y","Meta + Shift + Z"],action:"Redo"},{shortcuts:["Meta + Z"],action:"Undo"},{shortcuts:["Access + 1"],action:"Header 1"},{shortcuts:["Access + 2"],action:"Header 2"},{shortcuts:["Access + 3"],action:"Header 3"},{shortcuts:["Access + 4"],action:"Header 4"},{shortcuts:["Access + 5"],action:"Header 5"},{shortcuts:["Access + 6"],action:"Header 6"},{shortcuts:["Access + 7"],action:"Paragraph"},{shortcuts:["Access + 8"],action:"Div"},{shortcuts:["Access + 9"],action:"Address"},{shortcuts:["Alt + 0"],action:"Open help dialog"},{shortcuts:["Alt + F9"],action:"Focus to menubar"},{shortcuts:["Alt + F10"],action:"Focus to toolbar"},{shortcuts:["Alt + F11"],action:"Focus to element path"},{shortcuts:["Ctrl + F9"],action:"Focus to contextual toolbar"},{shortcuts:["Shift + Enter"],action:"Open popup menu for split buttons"},{shortcuts:["Meta + K"],action:"Insert link (if link plugin activated)"},{shortcuts:["Meta + S"],action:"Save (if save plugin activated)"},{shortcuts:["Meta + F"],action:"Find (if searchreplace plugin activated)"},{shortcuts:["Meta + Shift + F"],action:"Switch to or from fullscreen mode"}],_=tinymce.util.Tools.resolve("tinymce.Env"),E=function(e){var t={alt:"&#x2325;",ctrl:"&#x2303;",shift:"&#x21E7;",meta:"&#x2318;",access:"&#x2303;&#x2325;"},n={meta:"Ctrl ",access:"Shift + Alt "},o=_.mac?t:n,a=e.split("+"),i=k(a,function(e){var t=e.toLowerCase().trim();return P(o,t)?o[t]:e});return _.mac?i.join("").replace(/\s/,""):i.join("+")},I=function(){var e=k(S,function(e){var t=k(e.shortcuts,E).join(" or ");return[e.action,t]}),t={type:"table",header:["Action","Shortcut"],cells:e};return{name:"shortcuts",title:"Handy Shortcuts",items:[t]}},H=tinymce.util.Tools.resolve("tinymce.util.I18n"),U=[{key:"advlist",name:"Advanced List"},{key:"anchor",name:"Anchor"},{key:"autolink",name:"Autolink"},{key:"autoresize",name:"Autoresize"},{key:"autosave",name:"Autosave"},{key:"bbcode",name:"BBCode"},{key:"charmap",name:"Character Map"},{key:"code",name:"Code"},{key:"codesample",name:"Code Sample"},{key:"colorpicker",name:"Color Picker"},{key:"directionality",name:"Directionality"},{key:"emoticons",name:"Emoticons"},{key:"fullpage",name:"Full Page"},{key:"fullscreen",name:"Full Screen"},{key:"help",name:"Help"},{key:"hr",name:"Horizontal Rule"},{key:"image",name:"Image"},{key:"imagetools",name:"Image Tools"},{key:"importcss",name:"Import CSS"},{key:"insertdatetime",name:"Insert Date/Time"},{key:"legacyoutput",name:"Legacy Output"},{key:"link",name:"Link"},{key:"lists",name:"Lists"},{key:"media",name:"Media"},{key:"nonbreaking",name:"Nonbreaking"},{key:"noneditable",name:"Noneditable"},{key:"pagebreak",name:"Page Break"},{key:"paste",name:"Paste"},{key:"preview",name:"Preview"},{key:"print",name:"Print"},{key:"save",name:"Save"},{key:"searchreplace",name:"Search and Replace"},{key:"spellchecker",name:"Spell Checker"},{key:"tabfocus",name:"Tab Focus"},{key:"table",name:"Table"},{key:"template",name:"Template"},{key:"textcolor",name:"Text Color"},{key:"textpattern",name:"Text Pattern"},{key:"toc",name:"Table of Contents"},{key:"visualblocks",name:"Visual Blocks"},{key:"visualchars",name:"Visual Characters"},{key:"wordcount",name:"Word Count"},{key:"advcode",name:"Advanced Code Editor*"},{key:"formatpainter",name:"Format Painter*"},{key:"powerpaste",name:"PowerPaste*"},{key:"tinydrive",name:"Tiny Drive*",slug:"drive"},{key:"tinymcespellchecker",name:"Spell Checker Pro*"},{key:"a11ychecker",name:"Accessibility Checker*"},{key:"linkchecker",name:"Link Checker*"},{key:"mentions",name:"Mentions*"},{key:"mediaembed",name:"Enhanced Media Embed*"},{key:"checklist",name:"Checklist*"},{key:"casechange",name:"Case Change*"},{key:"permanentpen",name:"Permanent Pen*"},{key:"pageembed",name:"Page Embed*"},{key:"tinycomments",name:"Tiny Comments*",slug:"comments"},{key:"advtable",name:"Advanced Tables*"},{key:"autocorrect",name:"Autocorrect*"}],j=function(e){var t=function(){var e=["Accessibility Checker","Advanced Code Editor","Advanced Tables","Case Change","Checklist","Tiny Comments","Tiny Drive","Enhanced Media Embed","Format Painter","Link Checker","Mentions","MoxieManager","Page Embed","Permanent Pen","PowerPaste","Spell Checker Pro"],t=k(e,function(e){return"<li>"+H.translate(e)+"</li>"}).join("");return'<div data-mce-tabstop="1" tabindex="-1"><p><b>'+H.translate("Premium plugins:")+"</b></p><ul>"+t+'<li class="tox-help__more-link" "><a href="https://www.tiny.cloud/pricing/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">'+H.translate("Learn more...")+"</a></li></ul></div>"},n=function(e){return'<a href="'+e.url+'" target="_blank" rel="noopener">'+e.name+"</a>"},o=function(e,t){return A(U,function(e){return e.key===t}).fold(function(){var o=e.plugins[t].getMetadata;return"function"==typeof o?n(o()):t},function(e){var t=e.slug||e.key;return n({name:e.name,url:"https://www.tiny.cloud/docs/plugins/"+t})})},a=function(e){var t=C(e.plugins),n=O(e);return void 0===n?t:v(t,function(e){return!y(n,e)})},i=function(e){var t=a(e),n=k(t,function(t){return"<li>"+o(e,t)+"</li>"}),i=n.length,r=n.join(""),s="<p><b>"+H.translate(["Plugins installed ({0}):",i])+"</b></p><ul>"+r+"</ul>";return s},r=function(e){return null==e?"":'<div data-mce-tabstop="1" tabindex="-1">'+i(e)+"</div>"},s={type:"htmlpanel",presets:"document",html:[r(e),t()].join("")};return{name:"plugins",title:"Plugins",items:[s]}},W=tinymce.util.Tools.resolve("tinymce.EditorManager"),D=function(){var e=function(e,t){return 0===e.indexOf("@")?"X.X.X":e+"."+t},t=e(W.majorVersion,W.minorVersion),n='<a href="https://www.tinymce.com/docs/changelog/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">TinyMCE '+t+"</a>",o={type:"htmlpanel",html:"<p>"+H.translate(["You are using {0}",n])+"</p>",presets:"document"};return{name:"versions",title:"Version",items:[o]}},N="<h1>Editor UI keyboard navigation</h1>\n\n<h2>Activating keyboard navigation</h2>\n\n<p>The sections of the outer UI of the editor - the menubar, toolbar, sidebar and footer - are all keyboard navigable. As such, there are multiple ways to activate keyboard navigation:</p>\n<ul>\n <li>Focus the menubar: Alt + F9 (Windows) or &#x2325;F9 (MacOS)</li>\n <li>Focus the toolbar: Alt + F10 (Windows) or &#x2325;F10 (MacOS)</li>\n <li>Focus the footer: Alt + F11 (Windows) or &#x2325;F11 (MacOS)</li>\n</ul>\n\n<p>Focusing the menubar or toolbar will start keyboard navigation at the first item in the menubar or toolbar, which will be highlighted with a gray background. Focusing the footer will start keyboard navigation at the first item in the element path, which will be highlighted with an underline. </p>\n\n<h2>Moving between UI sections</h2>\n\n<p>When keyboard navigation is active, pressing tab will move the focus to the next major section of the UI, where applicable. These sections are:</p>\n<ul>\n <li>the menubar</li>\n <li>each group of the toolbar </li>\n <li>the sidebar</li>\n <li>the element path in the footer </li>\n <li>the wordcount toggle button in the footer </li>\n <li>the branding link in the footer </li>\n</ul>\n\n<p>Pressing shift + tab will move backwards through the same sections, except when moving from the footer to the toolbar. Focusing the element path then pressing shift + tab will move focus to the first toolbar group, not the last.</p>\n\n<h2>Moving within UI sections</h2>\n\n<p>Keyboard navigation within UI sections can usually be achieved using the left and right arrow keys. This includes:</p>\n<ul>\n <li>moving between menus in the menubar</li>\n <li>moving between buttons in a toolbar group</li>\n <li>moving between items in the element path</li>\n</ul>\n\n<p>In all these UI sections, keyboard navigation will cycle within the section. For example, focusing the last button in a toolbar group then pressing right arrow will move focus to the first item in the same toolbar group. </p>\n\n<h1>Executing buttons</h1>\n\n<p>To execute a button, navigate the selection to the desired button and hit space or enter.</p>\n\n<h1>Opening, navigating and closing menus</h1>\n\n<p>When focusing a menubar button or a toolbar button with a menu, pressing space, enter or down arrow will open the menu. When the menu opens the first item will be selected. To move up or down the menu, press the up or down arrow key respectively. This is the same for submenus, which can also be opened and closed using the left and right arrow keys.</p>\n\n<p>To close any active menu, hit the escape key. When a menu is closed the selection will be restored to its previous selection. This also works for closing submenus.</p>\n\n<h1>Context toolbars and menus</h1>\n\n<p>To focus an open context toolbar such as the table context toolbar, press Ctrl + F9 (Windows) or &#x2303;F9 (MacOS).</p>\n\n<p>Context toolbar navigation is the same as toolbar navigation, and context menu navigation is the same as standard menu navigation.</p>\n\n<h1>Dialog navigation</h1>\n\n<p>There are two types of dialog UIs in TinyMCE: tabbed dialogs and non-tabbed dialogs.</p>\n\n<p>When a non-tabbed dialog is opened, the first interactive component in the dialog will be focused. Users can navigate between interactive components by pressing tab. This includes any footer buttons. Navigation will cycle back to the first dialog component if tab is pressed while focusing the last component in the dialog. Pressing shift + tab will navigate backwards.</p>\n\n<p>When a tabbed dialog is opened, the first button in the tab menu is focused. Pressing tab will navigate to the first interactive component in that tab, and will cycle through the tabs components, the footer buttons, then back to the tab button. To switch to another tab, focus the tab button for the current tab, then use the arrow keys to cycle through the tab buttons.</p>",L=function(){var e={type:"htmlpanel",presets:"document",html:N};return{name:"keyboardnav",title:"Keyboard Navigation",items:[e]}},B=function(e,t){var n={},o=k(e,function(e){return"string"==typeof e?(P(t,e)&&(n[e]=t[e]),e):(n[e.name]=e,e.name)});return{tabs:n,names:o}},V=function(e){var t=C(e),n=t.indexOf("versions");return-1!==n&&(t.splice(n,1),t.push("versions")),{tabs:e,names:t}},q=function(e,t){var n,o=I(),a=L(),i=j(e),s=D(),c=r((n={},n[o.name]=o,n[a.name]=a,n[i.name]=i,n[s.name]=s,n),t.get());return F(e).fold(function(){return V(c)},function(e){return B(e,c)})},z=function(e,t){return function(){var n=q(e,t),o=n.tabs,a=n.names,i=k(a,function(e){return x(o,e)}),r=M(i),s={type:"tabpanel",tabs:r};e.windowManager.open({title:"Help",size:"medium",body:s,buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{}})}};e()}()});
;/*!node_modules/tinymce/plugins/help/index.js*/
amis.define("node_modules/tinymce/plugins/help/index",function(e){e("node_modules/tinymce/plugins/help/plugin")});
;/*!node_modules/tinymce/plugins/wordcount/plugin.js*/
amis.define("node_modules/tinymce/plugins/wordcount/plugin",function(){!function(){"use strict";function t(t){void 0===t&&(t=300),n.add("wordcount",function(n){var e=X(n);return $(n,e),_(n,e,t),e})}var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(t){return t},r=function(){return r=Object.assign||function(t){for(var n,e=1,r=arguments.length;r>e;e++){n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},r.apply(this,arguments)},o="",u=function(t){return t.replace(/\uFEFF/g,"")},i="[!-#%-*,-\\/:;?@\\[-\\]_{}¡«·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰෴๏๚๛༄-༒༺-༽྅࿐-࿔࿙࿚၊-၏჻፡-፨᐀᙭᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰⸱、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!----]_{}⦅-・]",c={aletter:"[A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-׳ؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆༀཀ-ཇཉ-ཬྈ-ྌႠ-Ⴥა-ჺჼᄀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᯀ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ--ℝℤΩℨK--ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⒶ-ⓩⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⴀ-ⴥⴰ-ⵥⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〻〼ㄅ-ㄭㄱ-ㆎㆠ-ㆺꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐꞑꞠ-ꞩꟺ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA---하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]",midnumlet:"[-'\\.‘’․﹒'.]",midletter:"[:··״‧︓﹕:]",midnum:"[±+*/,;;։،؍٬߸⁄︐︔﹐﹔,;]",numeric:"[0-9٠-٩٫۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹]",cr:"\\r",lf:"\\n",newline:"[ \f…\u2028\u2029]",extend:"[̀-ͯ҃-҉֑-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ऀ-ःऺ-़ा-ॏ॑-ॗॢॣঁ-ঃ়া-ৄেৈো-্ৗৢৣਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑੰੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣஂா-ூெ-ைொ-்ௗఁ-ఃా-ౄె-ైొ-్ౕౖౢౣಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣംഃാ-ൄെ-ൈൊ-്ൗൢൣංඃ්ා-ුූෘ-ෟෲෳัิ-ฺ็-๎ັິ-ູົຼ່-ໍ༹༘༙༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏႚ-ႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳា-៓៝᠋-᠍ᢩᤠ-ᤫᤰ-᤻ᦰ-ᧀᧈᧉᨗ-ᨛᩕ-ᩞ᩠-᩿᩼ᬀ-ᬄ᬴-᭄᭫-᭳ᮀ-ᮂᮡ-᯦᮪-᯳ᰤ-᰷᳐-᳔᳒-᳨᳭ᳲ᷀-ᷦ᷼-᷿‌‍⃐-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꙯-꙲꙼꙽꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣠-꣱ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀ꨩ-ꨶꩃꩌꩍꩻꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꯣ-ꯪ꯬꯭ﬞ︀-️︠-゙゚︦]",format:"[­؀-؃۝܏឴឵‎‏‪----]",katakana:"[〱-〵゛゜゠-ヺー-ヿㇰ-ㇿ㋐-㋾㌀-㍗ヲ-ン]",extendnumlet:"[=_‿⁀⁔︳︴-﹏_∀-<>]",punctuation:i},a={ALETTER:0,MIDNUMLET:1,MIDLETTER:2,MIDNUM:3,NUMERIC:4,CR:5,LF:6,NEWLINE:7,EXTEND:8,FORMAT:9,KATAKANA:10,EXTENDNUMLET:11,AT:12,OTHER:13},E=[new RegExp(c.aletter),new RegExp(c.midnumlet),new RegExp(c.midletter),new RegExp(c.midnum),new RegExp(c.numeric),new RegExp(c.cr),new RegExp(c.lf),new RegExp(c.newline),new RegExp(c.extend),new RegExp(c.format),new RegExp(c.katakana),new RegExp(c.extendnumlet),new RegExp("@")],l="",s=new RegExp("^"+c.punctuation+"$"),g=/^\s+$/,d=function(t,n){for(var e=t.length,r=new Array(e),o=0;e>o;o++){var u=t[o];r[o]=n(u,o)}return r},f=E,T=a.OTHER,p=function(t){for(var n=T,e=f.length,r=0;e>r;++r){var o=f[r];if(o&&o.test(t)){n=r;break}}return n},h=function(t){var n={};return function(e){if(n[e])return n[e];var r=t(e);return n[e]=r,r}},C=function(t){var n=h(p);return d(t,n)},R=function(t,n){var e=t[n],r=t[n+1];if(0>n||n>t.length-1&&0!==n)return!1;if(e===a.ALETTER&&r===a.ALETTER)return!1;var o=t[n+2];if(e===a.ALETTER&&(r===a.MIDLETTER||r===a.MIDNUMLET||r===a.AT)&&o===a.ALETTER)return!1;var u=t[n-1];return(e!==a.MIDLETTER&&e!==a.MIDNUMLET&&r!==a.AT||r!==a.ALETTER||u!==a.ALETTER)&&(e!==a.NUMERIC&&e!==a.ALETTER||r!==a.NUMERIC&&r!==a.ALETTER)&&(e!==a.MIDNUM&&e!==a.MIDNUMLET||r!==a.NUMERIC||u!==a.NUMERIC)&&(e!==a.NUMERIC||r!==a.MIDNUM&&r!==a.MIDNUMLET||o!==a.NUMERIC)?e===a.EXTEND||e===a.FORMAT||u===a.EXTEND||u===a.FORMAT||r===a.EXTEND||r===a.FORMAT?!1:e===a.CR&&r===a.LF?!1:e===a.NEWLINE||e===a.CR||e===a.LF?!0:r===a.NEWLINE||r===a.CR||r===a.LF?!0:e===a.KATAKANA&&r===a.KATAKANA?!1:(r!==a.EXTENDNUMLET||e!==a.ALETTER&&e!==a.NUMERIC&&e!==a.KATAKANA&&e!==a.EXTENDNUMLET)&&(e!==a.EXTENDNUMLET||r!==a.ALETTER&&r!==a.NUMERIC&&r!==a.KATAKANA)?e===a.AT?!1:!0:!1:!1},A=l,N=g,m=s,M=function(t){return"http"===t||"https"===t},v=function(t,n){var e;for(e=n;e<t.length&&!N.test(t[e]);e++);return e},y=function(t,n){var e=v(t,n+1),r=t.slice(n+1,e).join(A);return"://"===r.substr(0,3)?e:n},L=function(t,n,e,r){for(var o=[],u=[],i=0;i<e.length;++i)if(u.push(t[i]),R(e,i)){var c=n[i];if(!(!r.includeWhitespace&&N.test(c)||!r.includePunctuation&&m.test(c))){var a=i-u.length+1,E=i+1,l=n.slice(a,E).join(A);if(M(l)){var s=y(n,i),g=t.slice(E,s);Array.prototype.push.apply(u,g),i=s}o.push(u)}u=[]}return o},w=function(){return{includeWhitespace:!1,includePunctuation:!1}},D=function(t,n,e){e=r(r({},w()),e);for(var u=[],i=[],c=0;c<t.length;c++){var a=n(t[c]);a!==o&&(u.push(t[c]),i.push(a))}var E=C(i);return L(u,i,E,e)},I=D,U=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),x=function(t,n){for(var e=n.getBlockElements(),r=n.getShortEndedElements(),o=function(t){return e[t.nodeName]||r[t.nodeName]},i=[],c="",a=new U(t,t);t=a.next();)3===t.nodeType?c+=u(t.data):o(t)&&c.length&&(i.push(c),c="");return c.length&&i.push(c),i},W=function(t){return t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length},F=function(t,n){var r=x(t,n).join("\n");return I(r.split(""),e).length},b=function(t,n){var e=x(t,n).join("");return W(e)},S=function(t,n){var e=x(t,n).join("").replace(/\s/g,"");return W(e)},K=function(t,n){return function(){return n(t.getBody(),t.schema)}},O=function(t,n){return function(){return n(t.selection.getRng().cloneContents(),t.schema)}},k=function(t){return K(t,F)},X=function(t){return{body:{getWordCount:k(t),getCharacterCount:K(t,b),getCharacterCountWithoutSpaces:K(t,S)},selection:{getWordCount:O(t,F),getCharacterCount:O(t,b),getCharacterCountWithoutSpaces:O(t,S)},getCount:k(t)}},j=tinymce.util.Tools.resolve("tinymce.util.Delay"),B=function(t,n){t.fire("wordCountUpdate",{wordCount:{words:n.body.getWordCount(),characters:n.body.getCharacterCount(),charactersWithoutSpaces:n.body.getCharacterCountWithoutSpaces()}})},P=function(t,n){B(t,n)},_=function(t,n,e){var r=j.debounce(function(){return P(t,n)},e);t.on("init",function(){P(t,n),j.setEditorTimeout(t,function(){t.on("SetContent BeforeAddUndo Undo Redo keyup",r)},0)})},H=function(t,n){t.windowManager.open({title:"Word Count",body:{type:"panel",items:[{type:"table",header:["Count","Document","Selection"],cells:[["Words",String(n.body.getWordCount()),String(n.selection.getWordCount())],["Characters (no spaces)",String(n.body.getCharacterCountWithoutSpaces()),String(n.selection.getCharacterCountWithoutSpaces())],["Characters",String(n.body.getCharacterCount()),String(n.selection.getCharacterCount())]]}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}]})},$=function(t,n){t.ui.registry.addButton("wordcount",{tooltip:"Word count",icon:"character-count",onAction:function(){return H(t,n)}}),t.ui.registry.addMenuItem("wordcount",{text:"Word count",icon:"character-count",onAction:function(){return H(t,n)}})};t()}()});
;/*!node_modules/tinymce/plugins/wordcount/index.js*/
amis.define("node_modules/tinymce/plugins/wordcount/index",function(n){n("node_modules/tinymce/plugins/wordcount/plugin")});
;/*!node_modules/tinymce/plugins/hr/plugin.js*/
amis.define("node_modules/tinymce/plugins/hr/plugin",function(){!function(){"use strict";function n(){o.add("hr",function(n){t(n),e(n)})}var o=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(n){n.addCommand("InsertHorizontalRule",function(){n.execCommand("mceInsertContent",!1,"<hr />")})},e=function(n){n.ui.registry.addButton("hr",{icon:"horizontal-rule",tooltip:"Horizontal line",onAction:function(){return n.execCommand("InsertHorizontalRule")}}),n.ui.registry.addMenuItem("hr",{icon:"horizontal-rule",text:"Horizontal line",onAction:function(){return n.execCommand("InsertHorizontalRule")}})};n()}()});
;/*!node_modules/tinymce/plugins/hr/index.js*/
amis.define("node_modules/tinymce/plugins/hr/index",function(n){n("node_modules/tinymce/plugins/hr/plugin")});
;/*!node_modules/tinymce/plugins/pagebreak/plugin.js*/
amis.define("node_modules/tinymce/plugins/pagebreak/plugin",function(){!function(){"use strict";function e(){n.add("pagebreak",function(e){u(e),m(e),c(e),g(e)})}var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.Env"),t=function(e){return e.getParam("pagebreak_separator","<!-- pagebreak -->")},r=function(e){return e.getParam("pagebreak_split_block",!1)},o=function(){return"mce-pagebreak"},i=function(){return'<img src="'+a.transparentSrc+'" class="'+o()+'" data-mce-resize="false" data-mce-placeholder />'},c=function(e){var n=t(e),a=new RegExp(n.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi");e.on("BeforeSetContent",function(e){e.content=e.content.replace(a,i())}),e.on("PreInit",function(){e.serializer.addNodeFilter("img",function(a){for(var t,o,i=a.length;i--;)if(t=a[i],o=t.attr("class"),o&&-1!==o.indexOf("mce-pagebreak")){var c=t.parent;if(e.schema.getBlockElements()[c.name]&&r(e)){c.type=3,c.value=n,c.raw=!0,t.remove();continue}t.type=3,t.value=n,t.raw=!0}})})},u=function(e){e.addCommand("mcePageBreak",function(){e.insertContent(r(e)?"<p>"+i()+"</p>":i())})},g=function(e){e.on("ResolveName",function(n){"IMG"===n.target.nodeName&&e.dom.hasClass(n.target,o())&&(n.name="pagebreak")})},m=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")}})};e()}()});
;/*!node_modules/tinymce/plugins/pagebreak/index.js*/
amis.define("node_modules/tinymce/plugins/pagebreak/index",function(e){e("node_modules/tinymce/plugins/pagebreak/plugin")});
;/*!node_modules/tinymce/plugins/spellchecker/plugin.js*/
amis.define("node_modules/tinymce/plugins/spellchecker/plugin",function(){!function(e){"use strict";function t(e){return e&&1===e.nodeType&&"false"===e.contentEditable}function n(){o.add("spellchecker",function(e,t){if(i(e)===!1){var n=r(!1),o=r(h(e)),a=r(null),c=r(null);return D(e,t,n,a,o,c),J(e,t,c,n,a,o),E(e,t,n,a,c,o),C(e,n,c,a,o)}})}var r=function(e){var t=e,n=function(){return t},r=function(e){t=e};return{get:n,set:r}},o=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(t){return/(^|[ ,])tinymcespellchecker([, ]|$)/.test(t.getParam("plugins"))&&o.get("tinymcespellchecker")?("undefined"!=typeof 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):!1},a=Object.hasOwnProperty,c=function(e){for(var t in e)if(a.call(e,t))return!1;return!0},u=tinymce.util.Tools.resolve("tinymce.util.Tools"),s=tinymce.util.Tools.resolve("tinymce.util.URI"),l=tinymce.util.Tools.resolve("tinymce.util.XHR"),d=function(e){return e.fire("SpellcheckStart")},f=function(e){return e.fire("SpellcheckEnd")},g=function(e){var t="English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv";return e.getParam("spellchecker_languages",t)},h=function(e){var t=e.getParam("language","en");return e.getParam("spellchecker_language",t)},p=function(e){return e.getParam("spellchecker_rpc_url")},m=function(e){return e.getParam("spellchecker_callback")},v=function(e){var t=new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`§©«®±¶·¸»¼½¾¿×÷¤”“„    ]+',"g");return e.getParam("spellchecker_wordchar_pattern",t)},x=function(e,n){function r(e,t){if(!e[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");return{start:e.index,end:e.index+e[0].length,text:e[0],data:t}}function o(e){var n;if(3===e.nodeType)return e.data;if(A[e.nodeName]&&!T[e.nodeName])return"";if(t(e))return"\n";if(n="",(T[e.nodeName]||B[e.nodeName])&&(n+="\n"),e=e.firstChild)do n+=o(e);while(e=e.nextSibling);return n}function i(e,n,r){var o,i,a,c,u,s=[],l=0,d=e,f=0;n=n.slice(0),n.sort(function(e,t){return e.start-t.start}),u=n.shift();e:for(;;){if((T[d.nodeName]||B[d.nodeName]||t(d))&&l++,3===d.nodeType&&(!i&&d.length+l>=u.end?(i=d,c=u.end-l):o&&s.push(d),!o&&d.length+l>u.start&&(o=d,a=u.start-l),l+=d.length),o&&i){if(d=r({startNode:o,startNodeIndex:a,endNode:i,endNodeIndex:c,innerNodes:s,match:u.text,matchIndex:f}),l-=i.length-c,o=null,i=null,s=[],u=n.shift(),f++,!u)break}else if(A[d.nodeName]&&!T[d.nodeName]||!d.firstChild){if(d.nextSibling){d=d.nextSibling;continue}}else if(!t(d)){d=d.firstChild;continue}for(;;){if(d.nextSibling){d=d.nextSibling;break}if(d.parentNode===e)break e;d=d.parentNode}}}function a(e){function t(t,n){var r=w[n];r.stencil||(r.stencil=e(r));var o=r.stencil.cloneNode(!1);return o.setAttribute("data-mce-index",n),t&&o.appendChild(b.doc.createTextNode(t)),o}return function(e){var n,r,o,i=e.startNode,a=e.endNode,c=e.matchIndex,u=b.doc;if(i===a){var s=i;o=s.parentNode,e.startNodeIndex>0&&(n=u.createTextNode(s.data.substring(0,e.startNodeIndex)),o.insertBefore(n,s));var l=t(e.match,c);return o.insertBefore(l,s),e.endNodeIndex<s.length&&(r=u.createTextNode(s.data.substring(e.endNodeIndex)),o.insertBefore(r,s)),s.parentNode.removeChild(s),l}n=u.createTextNode(i.data.substring(0,e.startNodeIndex)),r=u.createTextNode(a.data.substring(e.endNodeIndex));for(var d=t(i.data.substring(e.startNodeIndex),c),f=0,g=e.innerNodes.length;g>f;++f){var h=e.innerNodes[f],p=t(h.data,c);h.parentNode.replaceChild(p,h)}var m=t(a.data.substring(0,e.endNodeIndex),c);return o=i.parentNode,o.insertBefore(n,i),o.insertBefore(d,i),o.removeChild(i),o=a.parentNode,o.insertBefore(m,a),o.insertBefore(r,a),o.removeChild(a),m}}function c(e){for(var t=e.parentNode;e.childNodes.length>0;)t.insertBefore(e.childNodes[0],e);t.removeChild(e)}function u(e){return-1!==e.className.indexOf("mce-spellchecker-word")}function s(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&&u(i)&&(a===t||null===t)&&r.push(i)}return r}function l(e){for(var t=w.length;t--;)if(w[t]===e)return t;return-1}function d(e){var t=[];return f(function(n,r){e(n,r)&&t.push(n)}),w=t,this}function f(e){for(var t=0,n=w.length;n>t&&e(w[t],t)!==!1;t++);return this}function g(t){return w.length&&i(e,w,a(t)),this}function h(e,t){if(P&&e.global)for(;S=e.exec(P);)w.push(r(S,t));return this}function p(e){var t,n=s(e?l(e):null);for(t=n.length;t--;)c(n[t]);return this}function m(e){return w[e.getAttribute("data-mce-index")]}function v(e){return s(l(e))[0]}function x(e,t,n){return w.push({start:e,end:e+t,text:P.substr(e,t),data:n}),this}function N(e){var t=s(l(e)),r=n.dom.createRng();return r.setStartBefore(t[0]),r.setEndAfter(t[t.length-1]),r}function k(e,t){var r=N(e);return r.deleteContents(),t.length>0&&r.insertNode(n.dom.doc.createTextNode(t)),r}function y(){return w.splice(0,w.length),p(),this}var S,w=[],b=n.dom,T=n.schema.getBlockElements(),A=n.schema.getWhiteSpaceElements(),B=n.schema.getShortEndedElements(),P=o(e);return{text:P,matches:w,each:f,filter:d,reset:y,matchFromElement:m,elementFromMatch:v,find:h,add:x,wrap:g,unwrap:p,replace:k,rangeFromMatch:N,indexOf:l}},N=function(e,t){if(!t.get()){var n=x(e.getBody(),e);t.set(n)}return t.get()},k=function(e,t,n){return function(r,o,i,a){var c={method:r,lang:n.get()},d="";c["addToDictionary"===r?"word":"text"]=o,u.each(c,function(e,t){d&&(d+="&"),d+=t+"="+encodeURIComponent(e)}),l.send({url:new s(t).toAbsolute(p(e)),type:"post",content_type:"application/x-www-form-urlencoded",data:d,success:function(t){var n=JSON.parse(t);if(n)n.error?a(n.error):i(n);else{var r=e.translate("Server response wasn't proper JSON.");a(r)}},error:function(){var t=e.translate("The spelling service was not found: (")+p(e)+e.translate(")");a(t)}})}},y=function(e,t,n,r,o,i,a){var c=m(e),u=c?c:k(e,t,n);u.call(e.plugins.spellchecker,r,o,i,a)},S=function(e,t,n,r,o,i){if(!A(e,n,r)){var a=function(t){e.notificationManager.open({text:t,type:"error"}),e.setProgressState(!1),A(e,n,r)},c=function(t){I(e,n,r,o,t)};e.setProgressState(!0),y(e,t,i,"spellcheck",N(e,r).text,c,a),e.focus()}},w=function(e,t,n){e.dom.select("span.mce-spellchecker-word").length||A(e,t,n)},b=function(e,t,n,r,o,i,a){e.setProgressState(!0),y(e,t,o,"addToDictionary",i,function(){e.setProgressState(!1),e.dom.remove(a,!0),w(e,n,r)},function(t){e.notificationManager.open({text:t,type:"error"}),e.setProgressState(!1)})},T=function(e,t,n,r,o,i){e.selection.collapse(),i?u.each(e.dom.select("span.mce-spellchecker-word"),function(t){t.getAttribute("data-mce-word")===r&&e.dom.remove(t,!0)}):e.dom.remove(o,!0),w(e,t,n)},A=function(e,t,n){var r=e.selection.getBookmark();return N(e,n).reset(),e.selection.moveToBookmark(r),n.set(null),t.get()?(t.set(!1),f(e),!0):void 0},B=function(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t},P=function(e,t){var n=[],r=u.toArray(e.getBody().getElementsByTagName("span"));if(r.length)for(var o=0;o<r.length;o++){var i=B(r[o]);null!==i&&i.length&&i===t.toString()&&n.push(r[o])}return n},I=function(e,t,n,r,o){var i=!!o.dictionary,a=o.words;if(e.setProgressState(!1),c(a)){var u=e.translate("No misspellings found.");return e.notificationManager.open({text:u,type:"info"}),void t.set(!1)}r.set({suggestions:a,hasDictionarySupport:i});var s=e.selection.getBookmark();N(e,n).find(v(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(s),t.set(!0),d(e)},C=function(e,t,n,r,o){var i=function(){return o.get()},a=function(){return v(e)},c=function(o){I(e,t,r,n,o)},u=function(){return r.get()};return{getTextMatcher:u,getWordCharPattern:a,markErrors:c,getLanguage:i}},E=function(e,t,n,r,o,i){e.addCommand("mceSpellCheck",function(){S(e,t,n,r,o,i)})},_=function(){return _=Object.assign||function(e){for(var t,n=1,r=arguments.length;r>n;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},_.apply(this,arguments)},R="SpellcheckStart SpellcheckEnd",M=function(e,t){var n=[];return u.each(t,function(e){n.push({selectable:!0,text:e.name,data:e.value})}),n},O=function(e){return u.map(g(e).split(","),function(e){return e=e.split("="),{name:e[0],value:e[1]}})},D=function(e,t,n,r,o,i){var a=M("Language",O(e)),c=function(){S(e,t,n,r,i,o)},s={tooltip:"Spellcheck",onAction:c,icon:"spell-check",onSetup:function(t){var r=function(){t.setActive(n.get())};return e.on(R,r),function(){e.off(R,r)}}},l=_(_({},s),{type:"splitbutton",select:function(e){return e===o.get()},fetch:function(e){var t=u.map(a,function(e){return{type:"choiceitem",value:e.data,text:e.text}});e(t)},onItemAction:function(e,t){o.set(t)}});a.length>1?e.ui.registry.addSplitButton("spellchecker",l):e.ui.registry.addToggleButton("spellchecker",s),e.ui.registry.addToggleMenuItem("spellchecker",{text:"Spellcheck",icon:"spell-check",onSetup:function(t){t.setActive(n.get());var r=function(){t.setActive(n.get())};return e.on(R,r),function(){e.off(R,r)}},onAction:c})},F=!0,j=function(e,t,n,r,o,i,a,c){var s=[],l=n.get().suggestions[a];u.each(l,function(t){s.push({text:t,onAction:function(){e.insertContent(e.dom.encode(t)),e.dom.remove(c),w(e,r,o)}})});var d=n.get().hasDictionarySupport;return d&&(s.push({type:"separator"}),s.push({text:"Add to dictionary",onAction:function(){b(e,t,r,o,i,a,c)}})),s.push.apply(s,[{type:"separator"},{text:"Ignore",onAction:function(){T(e,r,o,a,c)}},{text:"Ignore all",onAction:function(){T(e,r,o,a,c,F)}}]),s},J=function(e,t,n,r,o,i){var a=function(a){var c=a;if("mce-spellchecker-word"!==c.className)return[];var u=P(e,B(c));if(u.length>0){var s=e.dom.createRng();return s.setStartBefore(u[0]),s.setEndAfter(u[u.length-1]),e.selection.setRng(s),j(e,t,n,r,o,i,c.getAttribute("data-mce-word"),u)}};e.ui.registry.addContextMenu("spellchecker",{update:a})};n()}(window)});
;/*!node_modules/tinymce/plugins/spellchecker/index.js*/
amis.define("node_modules/tinymce/plugins/spellchecker/index",function(e){e("node_modules/tinymce/plugins/spellchecker/plugin")});
;/*!node_modules/tinymce/plugins/visualchars/plugin.js*/
amis.define("node_modules/tinymce/plugins/visualchars/plugin",function(){!function(n){"use strict";function t(){o.add("visualchars",function(n){var t=r(!1);return vt(n,t),Nt(n,t),yt(n,t),wt(n,t),e(t)})}var r=function(n){var t=n,r=function(){return t},o=function(n){t=n};return{get:r,set:o}},o=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(n){var t=function(){return n.get()};return{isEnabled:t}},u=function(n,t){return n.fire("VisualChars",{state:t})},i=function(){},c=function(n){return function(){return n}},a=c(!1),f=c(!0),s=function(){return l},l=function(){var n=function(n){return n.isNone()},t=function(n){return n()},r=function(n){return n},o={fold:function(n){return n()},is:a,isSome:a,isNone:f,getOr:r,getOrThunk:t,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:c(null),getOrUndefined:c(void 0),or:r,orThunk:t,map:s,each:i,bind:s,exists:a,forall:f,filter:s,equals:n,equals_:n,toArray:function(){return[]},toString:c("none()")};return o}(),d=function(n){var t=c(n),r=function(){return e},o=function(t){return t(n)},e={fold:function(t,r){return r(n)},is:function(t){return n===t},isSome:f,isNone:a,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:r,orThunk:r,map:function(t){return d(t(n))},each:function(t){t(n)},bind:o,exists:o,forall:o,filter:function(t){return t(n)?e:l},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(t){return t.is(n)},equals_:function(t,r){return t.fold(a,function(t){return r(n,t)})}};return e},m=function(n){return null===n||void 0===n?l:d(n)},v={some:d,none:s,from:m},g=function(n){var t=typeof n;return null===n?"null":"object"===t&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":t},h=function(n){return function(t){return g(t)===n}},p=function(n){return function(t){return typeof t===n}},y=h("string"),w=p("boolean"),b=p("number"),N=function(n,t){for(var r=n.length,o=new Array(r),e=0;r>e;e++){var u=n[e];o[e]=t(u,e)}return o},T=function(n,t){for(var r=0,o=n.length;o>r;r++){var e=n[r];t(e,r)}},k=function(n,t){for(var r=[],o=0,e=n.length;e>o;o++){var u=n[o];t(u,o)&&r.push(u)}return r},A=Object.keys,O=function(n,t){for(var r=A(n),o=0,e=r.length;e>o;o++){var u=r[o],i=n[u];t(i,u)}},C=("undefined"!=typeof n.window?n.window:Function("return this;")(),3),S=function(n){return n.dom().nodeType},D=function(n){return n.dom().nodeValue},E=function(n){return function(t){return S(t)===n}},L=E(C),x=function(t,r,o){if(!(y(o)||w(o)||b(o)))throw n.console.error("Invalid call to Attr.set. Key ",r,":: Value ",o,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(r,o+"")},V=function(n,t,r){x(n.dom(),t,r)},B=function(n,t){var r=n.dom().getAttribute(t);return null===r?void 0:r},P=function(n,t){n.dom().removeAttribute(t)},_=function(n,t){var r=B(n,t);return void 0===r||""===r?[]:r.split(" ")},j=function(n,t,r){var o=_(n,t),e=o.concat([r]);return V(n,t,e.join(" ")),!0},M=function(n,t,r){var o=k(_(n,t),function(n){return n!==r});return o.length>0?V(n,t,o.join(" ")):P(n,t),!1},q=function(n){return void 0!==n.dom().classList},H=function(n){return _(n,"class")},F=function(n,t){return j(n,"class",t)},I=function(n,t){return M(n,"class",t)},U=function(n,t){q(n)?n.dom().classList.add(t):F(n,t)},K=function(n){var t=q(n)?n.dom().classList:H(n);0===t.length&&P(n,"class")},R=function(n,t){if(q(n)){var r=n.dom().classList;r.remove(t)}else I(n,t);K(n)},z=function(t,r){var o=r||n.document,e=o.createElement("div");if(e.innerHTML=t,!e.hasChildNodes()||e.childNodes.length>1)throw n.console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return Q(e.childNodes[0])},G=function(t,r){var o=r||n.document,e=o.createElement(t);return Q(e)},J=function(t,r){var o=r||n.document,e=o.createTextNode(t);return Q(e)},Q=function(n){if(null===n||void 0===n)throw new Error("Node cannot be null or undefined");return{dom:c(n)}},W=function(n,t,r){var o=n.dom();return v.from(o.elementFromPoint(t,r)).map(Q)},X={fromHtml:z,fromTag:G,fromText:J,fromDom:Q,fromPoint:W},Y={" ":"nbsp","­":"shy"},Z=function(n,t){var r="";return O(n,function(n,t){r+=t}),new RegExp("["+r+"]",t?"g":"")},$=function(n){var t="";return O(n,function(n){t&&(t+=","),t+="span.mce-"+n}),t},nt=Z(Y),tt=Z(Y,!0),rt=$(Y),ot="mce-nbsp",et=function(n){return'<span data-mce-bogus="1" class="mce-'+Y[n]+'">'+n+"</span>"},ut=function(n){var t=D(n);return L(n)&&void 0!==t&&nt.test(t)},it=function(n,t){var r=[],o=n.dom(),e=N(o.childNodes,X.fromDom);return T(e,function(n){t(n)&&(r=r.concat([n])),r=r.concat(it(n,t))}),r},ct=function(n,t){for(;n.parentNode;){if(n.parentNode===t)return n;n=n.parentNode}},at=function(n){return n.replace(tt,et)},ft=function(n){return"span"===n.nodeName.toLowerCase()&&n.classList.contains("mce-nbsp-wrap")},st=function(n,t){var r=it(X.fromDom(t),ut);T(r,function(t){var r=t.dom().parentNode;if(ft(r))U(X.fromDom(r),ot);else{for(var o=at(n.dom.encode(D(t))),e=n.dom.create("div",null,o),u=void 0;u=e.lastChild;)n.dom.insertAfter(u,t.dom());n.dom.remove(t.dom())}})},lt=function(n,t){var r=n.dom.select(rt,t);T(r,function(t){ft(t)?R(X.fromDom(t),ot):n.dom.remove(t,!0)})},dt=function(n){var t=n.getBody(),r=n.selection.getBookmark(),o=ct(n.selection.getNode(),t);o=void 0!==o?o:t,lt(n,o),st(n,o),n.selection.moveToBookmark(r)},mt=function(n,t){var r=n.getBody(),o=n.selection;t.set(!t.get()),u(n,t.get());var e=o.getBookmark();t.get()===!0?st(n,r):lt(n,r),o.moveToBookmark(e)},vt=function(n,t){n.addCommand("mceVisualChars",function(){mt(n,t)})},gt=tinymce.util.Tools.resolve("tinymce.util.Delay"),ht=function(n){return n.getParam("visualchars_default_state",!1)},pt=function(n){return n.getParam("forced_root_block")!==!1},yt=function(n,t){var r=gt.debounce(function(){dt(n)},300);pt(n)&&n.on("keydown",function(o){t.get()===!0&&(13===o.keyCode?dt(n):r())})},wt=function(n,t){n.on("init",function(){var r=!ht(n);t.set(r),mt(n,t)})},bt=function(n,t){return function(r){r.setActive(t.get());var o=function(n){return r.setActive(n.state)};return n.on("VisualChars",o),function(){return n.off("VisualChars",o)}}},Nt=function(n,t){n.ui.registry.addToggleButton("visualchars",{tooltip:"Show invisible characters",icon:"visualchars",onAction:function(){return n.execCommand("mceVisualChars")},onSetup:bt(n,t)}),n.ui.registry.addToggleMenuItem("visualchars",{text:"Show invisible characters",icon:"visualchars",onAction:function(){return n.execCommand("mceVisualChars")},onSetup:bt(n,t)})};t()}(window)});
;/*!node_modules/tinymce/plugins/visualchars/index.js*/
amis.define("node_modules/tinymce/plugins/visualchars/index",function(i){i("node_modules/tinymce/plugins/visualchars/plugin")});
;/*!node_modules/tinymce/plugins/template/plugin.js*/
amis.define("node_modules/tinymce/plugins/template/plugin",function(){!function(){"use strict";function e(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 a=t.concat(n);return e.apply(null,a)}}function t(){n.add("template",function(e){j(e),P(e),w(e)})}var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=function(){},a=function(e){return function(){return e}},o=a(!1),u=a(!0),i=tinymce.util.Tools.resolve("tinymce.util.Tools"),c=tinymce.util.Tools.resolve("tinymce.util.XHR"),l=function(e){return e.getParam("template_cdate_classes","cdate")},s=function(e){return e.getParam("template_mdate_classes","mdate")},f=function(e){return e.getParam("template_selected_content_classes","selcontent")},m=function(e){return e.getParam("template_preview_replace_values")},p=function(e){return e.getParam("template_replace_values")},d=function(e){return e.getParam("templates")},g=function(e){return e.getParam("template_cdate_format",e.translate("%Y-%m-%d"))},v=function(e){return e.getParam("template_mdate_format",e.translate("%Y-%m-%d"))},h=function(e){var t=e.getParam("body_class","","hash");return t[e.id]||""},y=function(e){var t=e.getParam("body_class","","string");return-1===t.indexOf("=")?t:h(e)},b=function(e,t){if(e=""+e,e.length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e},M=function(e,t,n){var r="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),a="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),o="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.replace("%D","%m/%d/%Y"),t=t.replace("%r","%I:%M:%S %p"),t=t.replace("%Y",""+n.getFullYear()),t=t.replace("%y",""+n.getYear()),t=t.replace("%m",b(n.getMonth()+1,2)),t=t.replace("%d",b(n.getDate(),2)),t=t.replace("%H",""+b(n.getHours(),2)),t=t.replace("%M",""+b(n.getMinutes(),2)),t=t.replace("%S",""+b(n.getSeconds(),2)),t=t.replace("%I",""+((n.getHours()+11)%12+1)),t=t.replace("%p",""+(n.getHours()<12?"AM":"PM")),t=t.replace("%B",""+e.translate(u[n.getMonth()])),t=t.replace("%b",""+e.translate(o[n.getMonth()])),t=t.replace("%A",""+e.translate(a[n.getDay()])),t=t.replace("%a",""+e.translate(r[n.getDay()])),t=t.replace("%%","%")},T=function(e,t){return function(){var n=d(e);return"function"==typeof n?void n(t):void("string"==typeof n?c.send({url:n,success:function(e){t(JSON.parse(e))}}):t(n))}},O=function(e,t){return i.each(t,function(t,n){"function"==typeof t&&(t=t(n)),e=e.replace(new RegExp("\\{\\$"+n+"\\}","g"),t)}),e},_=function(e,t){var n=e.dom,r=p(e);i.each(n.select("*",t),function(e){i.each(r,function(t,a){n.hasClass(e,a)&&"function"==typeof r[a]&&r[a](e)})})},x=function(e,t){return new RegExp("\\b"+t+"\\b","g").test(e.className)},S=function(e,t,n){var r,a=e.dom,o=e.selection.getContent();n=O(n,p(e)),r=a.create("div",null,n);var u=a.select(".mceTmpl",r);u&&u.length>0&&(r=a.create("div",null),r.appendChild(u[0].cloneNode(!0))),i.each(a.select("*",r),function(t){x(t,l(e).replace(/\s+/g,"|"))&&(t.innerHTML=M(e,g(e))),x(t,s(e).replace(/\s+/g,"|"))&&(t.innerHTML=M(e,v(e))),x(t,f(e).replace(/\s+/g,"|"))&&(t.innerHTML=o)}),_(e,r),e.execCommand("mceInsertContent",!1,r.innerHTML),e.addVisual()},P=function(t){t.addCommand("mceInsertTemplate",e(S,t))},w=function(e){e.on("PreProcess",function(t){var n=e.dom,r=v(e);i.each(n.select("div",t.node),function(t){n.hasClass(t,"mceTmpl")&&(i.each(n.select("*",t),function(t){n.hasClass(t,s(e).replace(/\s+/g,"|"))&&(t.innerHTML=M(e,r))}),_(e,t))})})},D=function(){return C},C=function(){var e=function(e){return e.isNone()},t=function(e){return e()},n=function(e){return e},i={fold:function(e){return e()},is:o,isSome:o,isNone:u,getOr:n,getOrThunk:t,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:a(null),getOrUndefined:a(void 0),or:n,orThunk:t,map:D,each:r,bind:D,exists:o,forall:u,filter:D,equals:e,equals_:e,toArray:function(){return[]},toString:a("none()")};return i}(),A=function(e){var t=a(e),n=function(){return i},r=function(t){return t(e)},i={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:u,isNone:o,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return A(t(e))},each:function(t){t(e)},bind:r,exists:r,forall:r,filter:function(t){return t(e)?i:C},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(o,function(t){return n(e,t)})}};return i},N=function(e){return null===e||void 0===e?C:A(e)},H={some:A,none:D,from:N},k=function(e,t){for(var n=e.length,r=new Array(n),a=0;n>a;a++){var o=e[a];r[a]=t(o,a)}return r},I=function(e,t,n){for(var r=0,a=e.length;a>r;r++){var o=e[r];if(t(o,r))return H.some(o);if(n(o,r))break}return H.none()},J=function(e,t){return I(e,t,o)},L=tinymce.util.Tools.resolve("tinymce.util.Promise"),Y=Object.hasOwnProperty,q=function(e,t){return F(e,t)?H.from(e[t]):H.none()},F=function(e,t){return Y.call(e,t)},B={'"':"&quot;","<":"&lt;",">":"&gt;","&":"&amp;","'":"&#039;"},E=function(e){return e.replace(/["'<>&]/g,function(e){return q(B,e).getOr(e)})},R=function(e,t){if(-1===t.indexOf("<html>")){var n="";i.each(e.contentCSS,function(t){n+='<link type="text/css" rel="stylesheet" href="'+e.documentBaseURI.toAbsolute(t)+'">'});var r=y(e),a=e.dom.encode,o=e.getBody().dir,u=o?' dir="'+a(o)+'"':"";t="<!DOCTYPE html><html><head>"+n+'</head><body class="'+a(r)+'"'+u+">"+t+"</body></html>"}return O(t,m(e))},U=function(e,t){var n=function(){if(!t||0===t.length){var n=e.translate("No templates defined.");return e.notificationManager.open({text:n,type:"info"}),H.none()}return H.from(i.map(t,function(e,t){var n=function(e){return void 0!==e.url};return{selected:0===t,text:e.title,value:{url:n(e)?H.from(e.url):H.none(),content:n(e)?H.none():H.from(e.content),description:e.description}}}))},r=function(e){return k(e,function(e){return{text:e.text,value:e.text}})},a=function(e,t){return J(e,function(e){return e.text===t})},o=function(t){e.windowManager.alert("Could not load the specified template.",function(){return t.focus("template")})},u=function(e){return new L(function(t,n){e.value.url.fold(function(){return t(e.value.content.getOr(""))},function(e){return c.send({url:e,success:function(e){t(e)},error:function(e){n(e)}})})})},l=function(e,t){return function(n,r){if("template"===r.name){var i=n.getData().template;a(e,i).each(function(e){n.block("Loading..."),u(e).then(function(r){t(n,e,r)}).catch(function(){t(n,e,""),n.disable("save"),o(n)})})}}},s=function(t){return function(n){var r=n.getData();a(t,r.template).each(function(t){u(t).then(function(t){S(e,!1,t),n.close()}).catch(function(){n.disable("save"),o(n)})})}},f=function(t){var n=r(t),a=function(e,n){return{title:"Insert Template",size:"large",body:{type:"panel",items:e},initialData:n,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:s(t),onChange:l(t,i)}},i=function(t,r,o){var u=R(e,o),i=[{type:"selectbox",name:"template",label:"Templates",items:n},{type:"htmlpanel",html:'<p aria-live="polite">'+E(r.value.description)+"</p>"},{label:"Preview",type:"iframe",name:"preview",sandboxed:!1}],c={template:r.text,preview:u};t.unblock(),t.redial(a(i,c)),t.focus("template")},c=e.windowManager.open(a([],{template:"",preview:""}));c.block("Loading..."),u(t[0]).then(function(e){i(c,t[0],e)}).catch(function(){i(c,t[0],""),c.disable("save"),o(c)})},m=n();m.each(f)},W=function(e){return function(t){U(e,t)}},j=function(e){e.ui.registry.addButton("template",{icon:"template",tooltip:"Insert template",onAction:T(e,W(e))}),e.ui.registry.addMenuItem("template",{icon:"template",text:"Insert template...",onAction:T(e,W(e))})};t()}()});
;/*!node_modules/tinymce/plugins/template/index.js*/
amis.define("node_modules/tinymce/plugins/template/index",function(e){e("node_modules/tinymce/plugins/template/plugin")});
;/*!node_modules/tinymce/plugins/nonbreaking/plugin.js*/
amis.define("node_modules/tinymce/plugins/nonbreaking/plugin",function(){!function(){"use strict";function n(){e.add("nonbreaking",function(n){u(n),f(n),s(n)})}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(n){var e=n.getParam("nonbreaking_force_tab",0);return"boolean"==typeof e?e===!0?3:0:e},t=function(n){return n.getParam("nonbreaking_wrap",!0,"boolean")},o=function(n,e){for(var i="",t=0;e>t;t++)i+=n;return i},r=function(n){return n.plugins.visualchars?n.plugins.visualchars.isEnabled():!1},a=function(n,e){var i=function(){return r(n)?"mce-nbsp-wrap mce-nbsp":"mce-nbsp-wrap"},a=function(){return'<span class="'+i()+'" contenteditable="false">'+o("&nbsp;",e)+"</span>"},u=t(n),c=u||n.plugins.visualchars?a():o("&nbsp;",e);n.undoManager.transact(function(){return n.insertContent(c)})},u=function(n){n.addCommand("mceNonBreaking",function(){a(n,1)})},c=tinymce.util.Tools.resolve("tinymce.util.VK"),s=function(n){var e=i(n);e>0&&n.on("keydown",function(i){if(i.keyCode===c.TAB&&!i.isDefaultPrevented()){if(i.shiftKey)return;i.preventDefault(),i.stopImmediatePropagation(),a(n,e)}})},f=function(n){n.ui.registry.addButton("nonbreaking",{icon:"non-breaking",tooltip:"Nonbreaking space",onAction:function(){return n.execCommand("mceNonBreaking")}}),n.ui.registry.addMenuItem("nonbreaking",{icon:"non-breaking",text:"Nonbreaking space",onAction:function(){return n.execCommand("mceNonBreaking")}})};n()}()});
;/*!node_modules/tinymce/plugins/nonbreaking/index.js*/
amis.define("node_modules/tinymce/plugins/nonbreaking/index",function(n){n("node_modules/tinymce/plugins/nonbreaking/plugin")});
;/*!node_modules/tinymce/plugins/emoticons/plugin.js*/
amis.define("node_modules/tinymce/plugins/emoticons/plugin",function(){!function(n){"use strict";function t(){e.add("emoticons",function(n,t){var e=q(n,t),r=I(n),o=G(n,e,r);K(n,o),h(n,o)})}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=function(){},o=function(n){return function(){return n}},i=o(!1),u=o(!0),a=function(){return c},c=function(){var n=function(n){return n.isNone()},t=function(n){return n()},e=function(n){return n},c={fold:function(n){return n()},is:i,isSome:i,isNone:u,getOr:e,getOrThunk:t,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(void 0),or:e,orThunk:t,map:a,each:r,bind:a,exists:i,forall:u,filter:a,equals:n,equals_:n,toArray:function(){return[]},toString:o("none()")};return c}(),l=function(n){var t=o(n),e=function(){return a},r=function(t){return t(n)},a={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:u,isNone:i,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(t){return l(t(n))},each:function(t){t(n)},bind:r,exists:r,forall:r,filter:function(t){return t(n)?a:c},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(i,function(t){return e(n,t)})}};return a},s=function(n){return null===n||void 0===n?c:l(n)},f={some:l,none:a,from:s},m=function(n,t){for(var e=0,r=n.length;r>e;e++){var o=n[e];if(t(o,e))return!0}return!1},g=function(n,t){for(var e=n.length,r=new Array(e),o=0;e>o;o++){var i=n[o];r[o]=t(i,o)}return r},d=function(n,t){return-1!==n.indexOf(t)},v=function(n,t){return d(n.title.toLowerCase(),t)||m(n.keywords,function(n){return d(n.toLowerCase(),t)})},y=function(n,t,e){for(var r=[],o=t.toLowerCase(),u=e.fold(function(){return i},function(n){return function(t){return t>=n}}),a=0;a<n.length&&(0!==t.length&&!v(n[a],o)||(r.push({value:n[a].char,text:n[a].title,icon:n[a].char}),!u(r.length)));a++);return r},h=function(n,t){n.ui.registry.addAutocompleter("emoticons",{ch:":",columns:"auto",minChars:2,fetch:function(n,e){return t.waitForLoad().then(function(){var r=t.listAll();return y(r,n,f.some(e))})},onAction:function(t,e,r){n.selection.setRng(e),n.insertContent(r),t.hide()}})},p=function(n){var t=n,e=function(){return t},r=function(n){t=n};return{get:e,set:r}},b=function(t,e){var r=null,o=function(){null!==r&&(n.clearTimeout(r),r=null)},i=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];null!==r&&n.clearTimeout(r),r=n.setTimeout(function(){t.apply(null,o),r=null},e)};return{cancel:o,throttle:i}},w=function(n,t){n.insertContent(t)},O=function(){return O=Object.assign||function(n){for(var t,e=1,r=arguments.length;r>e;e++){t=arguments[e];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o])}return n},O.apply(this,arguments)},C=Object.prototype.hasOwnProperty,k=function(n,t){return t},j=function(n){return function(){for(var t=new Array(arguments.length),e=0;e<t.length;e++)t[e]=arguments[e];if(0===t.length)throw new Error("Can't merge zero objects");for(var r={},o=0;o<t.length;o++){var i=t[o];for(var u in i)C.call(i,u)&&(r[u]=n(r[u],i[u]))}return r}},A=j(k),T=Object.keys,_=Object.hasOwnProperty,D=function(n,t){for(var e=T(n),r=0,o=e.length;o>r;r++){var i=e[r],u=n[i];t(u,i)}},P=function(n,t){return x(n,function(n,e){return{k:e,v:t(n,e)}})},x=function(n,t){var e={};return D(n,function(n,r){var o=t(n,r);e[o.k]=o.v}),e},L=function(n,t){return _.call(n,t)},S=tinymce.util.Tools.resolve("tinymce.Resource"),N=tinymce.util.Tools.resolve("tinymce.util.Delay"),E=tinymce.util.Tools.resolve("tinymce.util.Promise"),F="tinymce.plugins.emoticons",q=function(n,t){return n.getParam("emoticons_database_url",t+"/js/emojis"+n.suffix+".js")},I=function(n){return n.getParam("emoticons_database_id",F,"string")},M=function(n){return n.getParam("emoticons_append",{},"object")},U="All",z={symbols:"Symbols",people:"People",animals_and_nature:"Animals and Nature",food_and_drink:"Food and Drink",activity:"Activity",travel_and_places:"Travel and Places",objects:"Objects",flags:"Flags",user:"User Defined"},R=function(n,t){return L(n,t)?n[t]:t},B=function(n){var t=M(n);return P(t,function(n){return O({keywords:[],category:"user"},n)})},G=function(t,e,r){var o=p(f.none()),i=p(f.none()),u=function(n){var t={},e=[];D(n,function(n,r){var o={title:r,keywords:n.keywords,"char":n.char,category:R(z,n.category)},i=void 0!==t[o.category]?t[o.category]:[];t[o.category]=i.concat([o]),e.push(o)}),o.set(f.some(t)),i.set(f.some(e))};t.on("init",function(){S.load(r,e).then(function(n){var e=B(t);u(A(n,e))},function(t){n.console.log("Failed to load emoticons: "+t),o.set(f.some({})),i.set(f.some([]))})});var a=function(n){return n===U?c():o.get().bind(function(t){return f.from(t[n])}).getOr([])},c=function(){return i.get().getOr([])},l=function(){return[U].concat(T(o.get().getOr({})))},s=function(){return m()?E.resolve(!0):new E(function(t,r){var o=15,i=N.setInterval(function(){m()?(N.clearInterval(i),t(!0)):(o--,0>o&&(n.console.log("Could not load emojis from url: "+e),N.clearInterval(i),r(!1)))},100)})},m=function(){return o.get().isSome()&&i.get().isSome()};return{listCategories:l,hasLoaded:m,waitForLoad:s,listAll:c,listCategory:a}},H="pattern",J=function(n,t){var e={pattern:"",results:y(t.listAll(),"",f.some(300))},r=p(U),o=function(n){var e=n.getData(),o=r.get(),i=t.listCategory(o),u=y(i,e[H],o===U?f.some(300):f.none());n.setData({results:u})},i=b(function(n){o(n)},200),u={label:"Search",type:"input",name:H},a={type:"collection",name:"results"},c=function(){var o={type:"tabpanel",tabs:g(t.listCategories(),function(n){return{title:n,name:n,items:[u,a]}})};return{title:"Emoticons",size:"normal",body:o,initialData:e,onTabChange:function(n,t){r.set(t.newTabName),i.throttle(n)},onChange:i.throttle,onAction:function(t,e){"results"===e.name&&(w(n,e.value),t.close())},buttons:[{type:"cancel",text:"Close",primary:!0}]}},l=n.windowManager.open(c());l.focus(H),t.hasLoaded()||(l.block("Loading emoticons..."),t.waitForLoad().then(function(){l.redial(c()),i.throttle(l),l.focus(H),l.unblock()}).catch(function(){l.redial({title:"Emoticons",body:{type:"panel",items:[{type:"alertbanner",level:"error",icon:"warning",text:"<p>Could not load emoticons</p>"}]},buttons:[{type:"cancel",text:"Close",primary:!0}],initialData:{pattern:"",results:[]}}),l.focus(H),l.unblock()}))},K=function(n,t){var e=function(){return J(n,t)};n.ui.registry.addButton("emoticons",{tooltip:"Emoticons",icon:"emoji",onAction:e}),n.ui.registry.addMenuItem("emoticons",{text:"Emoticons...",icon:"emoji",onAction:e})};t()}(window)});
;/*!node_modules/tinymce/plugins/emoticons/index.js*/
amis.define("node_modules/tinymce/plugins/emoticons/index",function(n){n("node_modules/tinymce/plugins/emoticons/plugin")});
;/*!node_modules/tinymce/plugins/emoticons/js/emojis.js*/
amis.define("node_modules/tinymce/plugins/emoticons/js/emojis",function(){window.tinymce.Resource.add("tinymce.plugins.emoticons",{grinning:{keywords:["face","smile","happy","joy",":D","grin"],"char":"😀",fitzpatrick_scale:!1,category:"people"},grimacing:{keywords:["face","grimace","teeth"],"char":"😬",fitzpatrick_scale:!1,category:"people"},grin:{keywords:["face","happy","smile","joy","kawaii"],"char":"😁",fitzpatrick_scale:!1,category:"people"},joy:{keywords:["face","cry","tears","weep","happy","happytears","haha"],"char":"😂",fitzpatrick_scale:!1,category:"people"},rofl:{keywords:["face","rolling","floor","laughing","lol","haha"],"char":"🤣",fitzpatrick_scale:!1,category:"people"},smiley:{keywords:["face","happy","joy","haha",":D",":)","smile","funny"],"char":"😃",fitzpatrick_scale:!1,category:"people"},smile:{keywords:["face","happy","joy","funny","haha","laugh","like",":D",":)"],"char":"😄",fitzpatrick_scale:!1,category:"people"},sweat_smile:{keywords:["face","hot","happy","laugh","sweat","smile","relief"],"char":"😅",fitzpatrick_scale:!1,category:"people"},laughing:{keywords:["happy","joy","lol","satisfied","haha","face","glad","XD","laugh"],"char":"😆",fitzpatrick_scale:!1,category:"people"},innocent:{keywords:["face","angel","heaven","halo"],"char":"😇",fitzpatrick_scale:!1,category:"people"},wink:{keywords:["face","happy","mischievous","secret",";)","smile","eye"],"char":"😉",fitzpatrick_scale:!1,category:"people"},blush:{keywords:["face","smile","happy","flushed","crush","embarrassed","shy","joy"],"char":"😊",fitzpatrick_scale:!1,category:"people"},slightly_smiling_face:{keywords:["face","smile"],"char":"🙂",fitzpatrick_scale:!1,category:"people"},upside_down_face:{keywords:["face","flipped","silly","smile"],"char":"🙃",fitzpatrick_scale:!1,category:"people"},relaxed:{keywords:["face","blush","massage","happiness"],"char":"☺️",fitzpatrick_scale:!1,category:"people"},yum:{keywords:["happy","joy","tongue","smile","face","silly","yummy","nom","delicious","savouring"],"char":"😋",fitzpatrick_scale:!1,category:"people"},relieved:{keywords:["face","relaxed","phew","massage","happiness"],"char":"😌",fitzpatrick_scale:!1,category:"people"},heart_eyes:{keywords:["face","love","like","affection","valentines","infatuation","crush","heart"],"char":"😍",fitzpatrick_scale:!1,category:"people"},kissing_heart:{keywords:["face","love","like","affection","valentines","infatuation","kiss"],"char":"😘",fitzpatrick_scale:!1,category:"people"},kissing:{keywords:["love","like","face","3","valentines","infatuation","kiss"],"char":"😗",fitzpatrick_scale:!1,category:"people"},kissing_smiling_eyes:{keywords:["face","affection","valentines","infatuation","kiss"],"char":"😙",fitzpatrick_scale:!1,category:"people"},kissing_closed_eyes:{keywords:["face","love","like","affection","valentines","infatuation","kiss"],"char":"😚",fitzpatrick_scale:!1,category:"people"},stuck_out_tongue_winking_eye:{keywords:["face","prank","childish","playful","mischievous","smile","wink","tongue"],"char":"😜",fitzpatrick_scale:!1,category:"people"},zany:{keywords:["face","goofy","crazy"],"char":"🤪",fitzpatrick_scale:!1,category:"people"},raised_eyebrow:{keywords:["face","distrust","scepticism","disapproval","disbelief","surprise"],"char":"🤨",fitzpatrick_scale:!1,category:"people"},monocle:{keywords:["face","stuffy","wealthy"],"char":"🧐",fitzpatrick_scale:!1,category:"people"},stuck_out_tongue_closed_eyes:{keywords:["face","prank","playful","mischievous","smile","tongue"],"char":"😝",fitzpatrick_scale:!1,category:"people"},stuck_out_tongue:{keywords:["face","prank","childish","playful","mischievous","smile","tongue"],"char":"😛",fitzpatrick_scale:!1,category:"people"},money_mouth_face:{keywords:["face","rich","dollar","money"],"char":"🤑",fitzpatrick_scale:!1,category:"people"},nerd_face:{keywords:["face","nerdy","geek","dork"],"char":"🤓",fitzpatrick_scale:!1,category:"people"},sunglasses:{keywords:["face","cool","smile","summer","beach","sunglass"],"char":"😎",fitzpatrick_scale:!1,category:"people"},star_struck:{keywords:["face","smile","starry","eyes","grinning"],"char":"🤩",fitzpatrick_scale:!1,category:"people"},clown_face:{keywords:["face"],"char":"🤡",fitzpatrick_scale:!1,category:"people"},cowboy_hat_face:{keywords:["face","cowgirl","hat"],"char":"🤠",fitzpatrick_scale:!1,category:"people"},hugs:{keywords:["face","smile","hug"],"char":"🤗",fitzpatrick_scale:!1,category:"people"},smirk:{keywords:["face","smile","mean","prank","smug","sarcasm"],"char":"😏",fitzpatrick_scale:!1,category:"people"},no_mouth:{keywords:["face","hellokitty"],"char":"😶",fitzpatrick_scale:!1,category:"people"},neutral_face:{keywords:["indifference","meh",":|","neutral"],"char":"😐",fitzpatrick_scale:!1,category:"people"},expressionless:{keywords:["face","indifferent","-_-","meh","deadpan"],"char":"😑",fitzpatrick_scale:!1,category:"people"},unamused:{keywords:["indifference","bored","straight face","serious","sarcasm","unimpressed","skeptical","dubious","side_eye"],"char":"😒",fitzpatrick_scale:!1,category:"people"},roll_eyes:{keywords:["face","eyeroll","frustrated"],"char":"🙄",fitzpatrick_scale:!1,category:"people"},thinking:{keywords:["face","hmmm","think","consider"],"char":"🤔",fitzpatrick_scale:!1,category:"people"},lying_face:{keywords:["face","lie","pinocchio"],"char":"🤥",fitzpatrick_scale:!1,category:"people"},hand_over_mouth:{keywords:["face","whoops","shock","surprise"],"char":"🤭",fitzpatrick_scale:!1,category:"people"},shushing:{keywords:["face","quiet","shhh"],"char":"🤫",fitzpatrick_scale:!1,category:"people"},symbols_over_mouth:{keywords:["face","swearing","cursing","cussing","profanity","expletive"],"char":"🤬",fitzpatrick_scale:!1,category:"people"},exploding_head:{keywords:["face","shocked","mind","blown"],"char":"🤯",fitzpatrick_scale:!1,category:"people"},flushed:{keywords:["face","blush","shy","flattered"],"char":"😳",fitzpatrick_scale:!1,category:"people"},disappointed:{keywords:["face","sad","upset","depressed",":("],"char":"😞",fitzpatrick_scale:!1,category:"people"},worried:{keywords:["face","concern","nervous",":("],"char":"😟",fitzpatrick_scale:!1,category:"people"},angry:{keywords:["mad","face","annoyed","frustrated"],"char":"😠",fitzpatrick_scale:!1,category:"people"},rage:{keywords:["angry","mad","hate","despise"],"char":"😡",fitzpatrick_scale:!1,category:"people"},pensive:{keywords:["face","sad","depressed","upset"],"char":"😔",fitzpatrick_scale:!1,category:"people"},confused:{keywords:["face","indifference","huh","weird","hmmm",":/"],"char":"😕",fitzpatrick_scale:!1,category:"people"},slightly_frowning_face:{keywords:["face","frowning","disappointed","sad","upset"],"char":"🙁",fitzpatrick_scale:!1,category:"people"},frowning_face:{keywords:["face","sad","upset","frown"],"char":"☹",fitzpatrick_scale:!1,category:"people"},persevere:{keywords:["face","sick","no","upset","oops"],"char":"😣",fitzpatrick_scale:!1,category:"people"},confounded:{keywords:["face","confused","sick","unwell","oops",":S"],"char":"😖",fitzpatrick_scale:!1,category:"people"},tired_face:{keywords:["sick","whine","upset","frustrated"],"char":"😫",fitzpatrick_scale:!1,category:"people"},weary:{keywords:["face","tired","sleepy","sad","frustrated","upset"],"char":"😩",fitzpatrick_scale:!1,category:"people"},triumph:{keywords:["face","gas","phew","proud","pride"],"char":"😤",fitzpatrick_scale:!1,category:"people"},open_mouth:{keywords:["face","surprise","impressed","wow","whoa",":O"],"char":"😮",fitzpatrick_scale:!1,category:"people"},scream:{keywords:["face","munch","scared","omg"],"char":"😱",fitzpatrick_scale:!1,category:"people"},fearful:{keywords:["face","scared","terrified","nervous","oops","huh"],"char":"😨",fitzpatrick_scale:!1,category:"people"},cold_sweat:{keywords:["face","nervous","sweat"],"char":"😰",fitzpatrick_scale:!1,category:"people"},hushed:{keywords:["face","woo","shh"],"char":"😯",fitzpatrick_scale:!1,category:"people"},frowning:{keywords:["face","aw","what"],"char":"😦",fitzpatrick_scale:!1,category:"people"},anguished:{keywords:["face","stunned","nervous"],"char":"😧",fitzpatrick_scale:!1,category:"people"},cry:{keywords:["face","tears","sad","depressed","upset",":'("],"char":"😢",fitzpatrick_scale:!1,category:"people"},disappointed_relieved:{keywords:["face","phew","sweat","nervous"],"char":"😥",fitzpatrick_scale:!1,category:"people"},drooling_face:{keywords:["face"],"char":"🤤",fitzpatrick_scale:!1,category:"people"},sleepy:{keywords:["face","tired","rest","nap"],"char":"😪",fitzpatrick_scale:!1,category:"people"},sweat:{keywords:["face","hot","sad","tired","exercise"],"char":"😓",fitzpatrick_scale:!1,category:"people"},sob:{keywords:["face","cry","tears","sad","upset","depressed"],"char":"😭",fitzpatrick_scale:!1,category:"people"},dizzy_face:{keywords:["spent","unconscious","xox","dizzy"],"char":"😵",fitzpatrick_scale:!1,category:"people"},astonished:{keywords:["face","xox","surprised","poisoned"],"char":"😲",fitzpatrick_scale:!1,category:"people"},zipper_mouth_face:{keywords:["face","sealed","zipper","secret"],"char":"🤐",fitzpatrick_scale:!1,category:"people"},nauseated_face:{keywords:["face","vomit","gross","green","sick","throw up","ill"],"char":"🤢",fitzpatrick_scale:!1,category:"people"},sneezing_face:{keywords:["face","gesundheit","sneeze","sick","allergy"],"char":"🤧",fitzpatrick_scale:!1,category:"people"},vomiting:{keywords:["face","sick"],"char":"🤮",fitzpatrick_scale:!1,category:"people"},mask:{keywords:["face","sick","ill","disease"],"char":"😷",fitzpatrick_scale:!1,category:"people"},face_with_thermometer:{keywords:["sick","temperature","thermometer","cold","fever"],"char":"🤒",fitzpatrick_scale:!1,category:"people"},face_with_head_bandage:{keywords:["injured","clumsy","bandage","hurt"],"char":"🤕",fitzpatrick_scale:!1,category:"people"},sleeping:{keywords:["face","tired","sleepy","night","zzz"],"char":"😴",fitzpatrick_scale:!1,category:"people"},zzz:{keywords:["sleepy","tired","dream"],"char":"💤",fitzpatrick_scale:!1,category:"people"},poop:{keywords:["hankey","shitface","fail","turd","shit"],"char":"💩",fitzpatrick_scale:!1,category:"people"},smiling_imp:{keywords:["devil","horns"],"char":"😈",fitzpatrick_scale:!1,category:"people"},imp:{keywords:["devil","angry","horns"],"char":"👿",fitzpatrick_scale:!1,category:"people"},japanese_ogre:{keywords:["monster","red","mask","halloween","scary","creepy","devil","demon","japanese","ogre"],"char":"👹",fitzpatrick_scale:!1,category:"people"},japanese_goblin:{keywords:["red","evil","mask","monster","scary","creepy","japanese","goblin"],"char":"👺",fitzpatrick_scale:!1,category:"people"},skull:{keywords:["dead","skeleton","creepy","death"],"char":"💀",fitzpatrick_scale:!1,category:"people"},ghost:{keywords:["halloween","spooky","scary"],"char":"👻",fitzpatrick_scale:!1,category:"people"},alien:{keywords:["UFO","paul","weird","outer_space"],"char":"👽",fitzpatrick_scale:!1,category:"people"},robot:{keywords:["computer","machine","bot"],"char":"🤖",fitzpatrick_scale:!1,category:"people"},smiley_cat:{keywords:["animal","cats","happy","smile"],"char":"😺",fitzpatrick_scale:!1,category:"people"},smile_cat:{keywords:["animal","cats","smile"],"char":"😸",fitzpatrick_scale:!1,category:"people"},joy_cat:{keywords:["animal","cats","haha","happy","tears"],"char":"😹",fitzpatrick_scale:!1,category:"people"},heart_eyes_cat:{keywords:["animal","love","like","affection","cats","valentines","heart"],"char":"😻",fitzpatrick_scale:!1,category:"people"},smirk_cat:{keywords:["animal","cats","smirk"],"char":"😼",fitzpatrick_scale:!1,category:"people"},kissing_cat:{keywords:["animal","cats","kiss"],"char":"😽",fitzpatrick_scale:!1,category:"people"},scream_cat:{keywords:["animal","cats","munch","scared","scream"],"char":"🙀",fitzpatrick_scale:!1,category:"people"},crying_cat_face:{keywords:["animal","tears","weep","sad","cats","upset","cry"],"char":"😿",fitzpatrick_scale:!1,category:"people"},pouting_cat:{keywords:["animal","cats"],"char":"😾",fitzpatrick_scale:!1,category:"people"},palms_up:{keywords:["hands","gesture","cupped","prayer"],"char":"🤲",fitzpatrick_scale:!0,category:"people"},raised_hands:{keywords:["gesture","hooray","yea","celebration","hands"],"char":"🙌",fitzpatrick_scale:!0,category:"people"},clap:{keywords:["hands","praise","applause","congrats","yay"],"char":"👏",fitzpatrick_scale:!0,category:"people"},wave:{keywords:["hands","gesture","goodbye","solong","farewell","hello","hi","palm"],"char":"👋",fitzpatrick_scale:!0,category:"people"},call_me_hand:{keywords:["hands","gesture"],"char":"🤙",fitzpatrick_scale:!0,category:"people"},"+1":{keywords:["thumbsup","yes","awesome","good","agree","accept","cool","hand","like"],"char":"👍",fitzpatrick_scale:!0,category:"people"},"-1":{keywords:["thumbsdown","no","dislike","hand"],"char":"👎",fitzpatrick_scale:!0,category:"people"},facepunch:{keywords:["angry","violence","fist","hit","attack","hand"],"char":"👊",fitzpatrick_scale:!0,category:"people"},fist:{keywords:["fingers","hand","grasp"],"char":"✊",fitzpatrick_scale:!0,category:"people"},fist_left:{keywords:["hand","fistbump"],"char":"🤛",fitzpatrick_scale:!0,category:"people"},fist_right:{keywords:["hand","fistbump"],"char":"🤜",fitzpatrick_scale:!0,category:"people"},v:{keywords:["fingers","ohyeah","hand","peace","victory","two"],"char":"✌",fitzpatrick_scale:!0,category:"people"},ok_hand:{keywords:["fingers","limbs","perfect","ok","okay"],"char":"👌",fitzpatrick_scale:!0,category:"people"},raised_hand:{keywords:["fingers","stop","highfive","palm","ban"],"char":"✋",fitzpatrick_scale:!0,category:"people"},raised_back_of_hand:{keywords:["fingers","raised","backhand"],"char":"🤚",fitzpatrick_scale:!0,category:"people"},open_hands:{keywords:["fingers","butterfly","hands","open"],"char":"👐",fitzpatrick_scale:!0,category:"people"},muscle:{keywords:["arm","flex","hand","summer","strong","biceps"],"char":"💪",fitzpatrick_scale:!0,category:"people"},pray:{keywords:["please","hope","wish","namaste","highfive"],"char":"🙏",fitzpatrick_scale:!0,category:"people"},handshake:{keywords:["agreement","shake"],"char":"🤝",fitzpatrick_scale:!1,category:"people"},point_up:{keywords:["hand","fingers","direction","up"],"char":"☝",fitzpatrick_scale:!0,category:"people"},point_up_2:{keywords:["fingers","hand","direction","up"],"char":"👆",fitzpatrick_scale:!0,category:"people"},point_down:{keywords:["fingers","hand","direction","down"],"char":"👇",fitzpatrick_scale:!0,category:"people"},point_left:{keywords:["direction","fingers","hand","left"],"char":"👈",fitzpatrick_scale:!0,category:"people"},point_right:{keywords:["fingers","hand","direction","right"],"char":"👉",fitzpatrick_scale:!0,category:"people"},fu:{keywords:["hand","fingers","rude","middle","flipping"],"char":"🖕",fitzpatrick_scale:!0,category:"people"},raised_hand_with_fingers_splayed:{keywords:["hand","fingers","palm"],"char":"🖐",fitzpatrick_scale:!0,category:"people"},love_you:{keywords:["hand","fingers","gesture"],"char":"🤟",fitzpatrick_scale:!0,category:"people"},metal:{keywords:["hand","fingers","evil_eye","sign_of_horns","rock_on"],"char":"🤘",fitzpatrick_scale:!0,category:"people"},crossed_fingers:{keywords:["good","lucky"],"char":"🤞",fitzpatrick_scale:!0,category:"people"},vulcan_salute:{keywords:["hand","fingers","spock","star trek"],"char":"🖖",fitzpatrick_scale:!0,category:"people"},writing_hand:{keywords:["lower_left_ballpoint_pen","stationery","write","compose"],"char":"✍",fitzpatrick_scale:!0,category:"people"},selfie:{keywords:["camera","phone"],"char":"🤳",fitzpatrick_scale:!0,category:"people"},nail_care:{keywords:["beauty","manicure","finger","fashion","nail"],"char":"💅",fitzpatrick_scale:!0,category:"people"},lips:{keywords:["mouth","kiss"],"char":"👄",fitzpatrick_scale:!1,category:"people"},tongue:{keywords:["mouth","playful"],"char":"👅",fitzpatrick_scale:!1,category:"people"},ear:{keywords:["face","hear","sound","listen"],"char":"👂",fitzpatrick_scale:!0,category:"people"},nose:{keywords:["smell","sniff"],"char":"👃",fitzpatrick_scale:!0,category:"people"},eye:{keywords:["face","look","see","watch","stare"],"char":"👁",fitzpatrick_scale:!1,category:"people"},eyes:{keywords:["look","watch","stalk","peek","see"],"char":"👀",fitzpatrick_scale:!1,category:"people"},brain:{keywords:["smart","intelligent"],"char":"🧠",fitzpatrick_scale:!1,category:"people"},bust_in_silhouette:{keywords:["user","person","human"],"char":"👤",fitzpatrick_scale:!1,category:"people"},busts_in_silhouette:{keywords:["user","person","human","group","team"],"char":"👥",fitzpatrick_scale:!1,category:"people"},speaking_head:{keywords:["user","person","human","sing","say","talk"],"char":"🗣",fitzpatrick_scale:!1,category:"people"},baby:{keywords:["child","boy","girl","toddler"],"char":"👶",fitzpatrick_scale:!0,category:"people"},child:{keywords:["gender-neutral","young"],"char":"🧒",fitzpatrick_scale:!0,category:"people"},boy:{keywords:["man","male","guy","teenager"],"char":"👦",fitzpatrick_scale:!0,category:"people"},girl:{keywords:["female","woman","teenager"],"char":"👧",fitzpatrick_scale:!0,category:"people"},adult:{keywords:["gender-neutral","person"],"char":"🧑",fitzpatrick_scale:!0,category:"people"},man:{keywords:["mustache","father","dad","guy","classy","sir","moustache"],"char":"👨",fitzpatrick_scale:!0,category:"people"},woman:{keywords:["female","girls","lady"],"char":"👩",fitzpatrick_scale:!0,category:"people"},blonde_woman:{keywords:["woman","female","girl","blonde","person"],"char":"👱‍♀️",fitzpatrick_scale:!0,category:"people"},blonde_man:{keywords:["man","male","boy","blonde","guy","person"],"char":"👱",fitzpatrick_scale:!0,category:"people"},bearded_person:{keywords:["person","bewhiskered"],"char":"🧔",fitzpatrick_scale:!0,category:"people"},older_adult:{keywords:["human","elder","senior","gender-neutral"],"char":"🧓",fitzpatrick_scale:!0,category:"people"},older_man:{keywords:["human","male","men","old","elder","senior"],"char":"👴",fitzpatrick_scale:!0,category:"people"},older_woman:{keywords:["human","female","women","lady","old","elder","senior"],"char":"👵",fitzpatrick_scale:!0,category:"people"},man_with_gua_pi_mao:{keywords:["male","boy","chinese"],"char":"👲",fitzpatrick_scale:!0,category:"people"},woman_with_headscarf:{keywords:["female","hijab","mantilla","tichel"],"char":"🧕",fitzpatrick_scale:!0,category:"people"},woman_with_turban:{keywords:["female","indian","hinduism","arabs","woman"],"char":"👳‍♀️",fitzpatrick_scale:!0,category:"people"},man_with_turban:{keywords:["male","indian","hinduism","arabs"],"char":"👳",fitzpatrick_scale:!0,category:"people"},policewoman:{keywords:["woman","police","law","legal","enforcement","arrest","911","female"],"char":"👮‍♀️",fitzpatrick_scale:!0,category:"people"},policeman:{keywords:["man","police","law","legal","enforcement","arrest","911"],"char":"👮",fitzpatrick_scale:!0,category:"people"},construction_worker_woman:{keywords:["female","human","wip","build","construction","worker","labor","woman"],"char":"👷‍♀️",fitzpatrick_scale:!0,category:"people"},construction_worker_man:{keywords:["male","human","wip","guy","build","construction","worker","labor"],"char":"👷",fitzpatrick_scale:!0,category:"people"},guardswoman:{keywords:["uk","gb","british","female","royal","woman"],"char":"💂‍♀️",fitzpatrick_scale:!0,category:"people"},guardsman:{keywords:["uk","gb","british","male","guy","royal"],"char":"💂",fitzpatrick_scale:!0,category:"people"},female_detective:{keywords:["human","spy","detective","female","woman"],"char":"🕵️‍♀️",fitzpatrick_scale:!0,category:"people"},male_detective:{keywords:["human","spy","detective"],"char":"🕵",fitzpatrick_scale:!0,category:"people"},woman_health_worker:{keywords:["doctor","nurse","therapist","healthcare","woman","human"],"char":"👩‍⚕️",fitzpatrick_scale:!0,category:"people"},man_health_worker:{keywords:["doctor","nurse","therapist","healthcare","man","human"],"char":"👨‍⚕️",fitzpatrick_scale:!0,category:"people"},woman_farmer:{keywords:["rancher","gardener","woman","human"],"char":"👩‍🌾",fitzpatrick_scale:!0,category:"people"},man_farmer:{keywords:["rancher","gardener","man","human"],"char":"👨‍🌾",fitzpatrick_scale:!0,category:"people"},woman_cook:{keywords:["chef","woman","human"],"char":"👩‍🍳",fitzpatrick_scale:!0,category:"people"},man_cook:{keywords:["chef","man","human"],"char":"👨‍🍳",fitzpatrick_scale:!0,category:"people"},woman_student:{keywords:["graduate","woman","human"],"char":"👩‍🎓",fitzpatrick_scale:!0,category:"people"},man_student:{keywords:["graduate","man","human"],"char":"👨‍🎓",fitzpatrick_scale:!0,category:"people"},woman_singer:{keywords:["rockstar","entertainer","woman","human"],"char":"👩‍🎤",fitzpatrick_scale:!0,category:"people"},man_singer:{keywords:["rockstar","entertainer","man","human"],"char":"👨‍🎤",fitzpatrick_scale:!0,category:"people"},woman_teacher:{keywords:["instructor","professor","woman","human"],"char":"👩‍🏫",fitzpatrick_scale:!0,category:"people"},man_teacher:{keywords:["instructor","professor","man","human"],"char":"👨‍🏫",fitzpatrick_scale:!0,category:"people"},woman_factory_worker:{keywords:["assembly","industrial","woman","human"],"char":"👩‍🏭",fitzpatrick_scale:!0,category:"people"},man_factory_worker:{keywords:["assembly","industrial","man","human"],"char":"👨‍🏭",fitzpatrick_scale:!0,category:"people"},woman_technologist:{keywords:["coder","developer","engineer","programmer","software","woman","human","laptop","computer"],"char":"👩‍💻",fitzpatrick_scale:!0,category:"people"},man_technologist:{keywords:["coder","developer","engineer","programmer","software","man","human","laptop","computer"],"char":"👨‍💻",fitzpatrick_scale:!0,category:"people"},woman_office_worker:{keywords:["business","manager","woman","human"],"char":"👩‍💼",fitzpatrick_scale:!0,category:"people"},man_office_worker:{keywords:["business","manager","man","human"],"char":"👨‍💼",fitzpatrick_scale:!0,category:"people"},woman_mechanic:{keywords:["plumber","woman","human","wrench"],"char":"👩‍🔧",fitzpatrick_scale:!0,category:"people"},man_mechanic:{keywords:["plumber","man","human","wrench"],"char":"👨‍🔧",fitzpatrick_scale:!0,category:"people"},woman_scientist:{keywords:["biologist","chemist","engineer","physicist","woman","human"],"char":"👩‍🔬",fitzpatrick_scale:!0,category:"people"},man_scientist:{keywords:["biologist","chemist","engineer","physicist","man","human"],"char":"👨‍🔬",fitzpatrick_scale:!0,category:"people"},woman_artist:{keywords:["painter","woman","human"],"char":"👩‍🎨",fitzpatrick_scale:!0,category:"people"},man_artist:{keywords:["painter","man","human"],"char":"👨‍🎨",fitzpatrick_scale:!0,category:"people"},woman_firefighter:{keywords:["fireman","woman","human"],"char":"👩‍🚒",fitzpatrick_scale:!0,category:"people"},man_firefighter:{keywords:["fireman","man","human"],"char":"👨‍🚒",fitzpatrick_scale:!0,category:"people"},woman_pilot:{keywords:["aviator","plane","woman","human"],"char":"👩‍✈️",fitzpatrick_scale:!0,category:"people"},man_pilot:{keywords:["aviator","plane","man","human"],"char":"👨‍✈️",fitzpatrick_scale:!0,category:"people"},woman_astronaut:{keywords:["space","rocket","woman","human"],"char":"👩‍🚀",fitzpatrick_scale:!0,category:"people"},man_astronaut:{keywords:["space","rocket","man","human"],"char":"👨‍🚀",fitzpatrick_scale:!0,category:"people"},woman_judge:{keywords:["justice","court","woman","human"],"char":"👩‍⚖️",fitzpatrick_scale:!0,category:"people"},man_judge:{keywords:["justice","court","man","human"],"char":"👨‍⚖️",fitzpatrick_scale:!0,category:"people"},mrs_claus:{keywords:["woman","female","xmas","mother christmas"],"char":"🤶",fitzpatrick_scale:!0,category:"people"},santa:{keywords:["festival","man","male","xmas","father christmas"],"char":"🎅",fitzpatrick_scale:!0,category:"people"},sorceress:{keywords:["woman","female","mage","witch"],"char":"🧙‍♀️",fitzpatrick_scale:!0,category:"people"},wizard:{keywords:["man","male","mage","sorcerer"],"char":"🧙‍♂️",fitzpatrick_scale:!0,category:"people"},woman_elf:{keywords:["woman","female"],"char":"🧝‍♀️",fitzpatrick_scale:!0,category:"people"},man_elf:{keywords:["man","male"],"char":"🧝‍♂️",fitzpatrick_scale:!0,category:"people"},woman_vampire:{keywords:["woman","female"],"char":"🧛‍♀️",fitzpatrick_scale:!0,category:"people"},man_vampire:{keywords:["man","male","dracula"],"char":"🧛‍♂️",fitzpatrick_scale:!0,category:"people"},woman_zombie:{keywords:["woman","female","undead","walking dead"],"char":"🧟‍♀️",fitzpatrick_scale:!1,category:"people"},man_zombie:{keywords:["man","male","dracula","undead","walking dead"],"char":"🧟‍♂️",fitzpatrick_scale:!1,category:"people"},woman_genie:{keywords:["woman","female"],"char":"🧞‍♀️",fitzpatrick_scale:!1,category:"people"},man_genie:{keywords:["man","male"],"char":"🧞‍♂️",fitzpatrick_scale:!1,category:"people"},mermaid:{keywords:["woman","female","merwoman","ariel"],"char":"🧜‍♀️",fitzpatrick_scale:!0,category:"people"},merman:{keywords:["man","male","triton"],"char":"🧜‍♂️",fitzpatrick_scale:!0,category:"people"},woman_fairy:{keywords:["woman","female"],"char":"🧚‍♀️",fitzpatrick_scale:!0,category:"people"},man_fairy:{keywords:["man","male"],"char":"🧚‍♂️",fitzpatrick_scale:!0,category:"people"},angel:{keywords:["heaven","wings","halo"],"char":"👼",fitzpatrick_scale:!0,category:"people"},pregnant_woman:{keywords:["baby"],"char":"🤰",fitzpatrick_scale:!0,category:"people"},breastfeeding:{keywords:["nursing","baby"],"char":"🤱",fitzpatrick_scale:!0,category:"people"},princess:{keywords:["girl","woman","female","blond","crown","royal","queen"],"char":"👸",fitzpatrick_scale:!0,category:"people"},prince:{keywords:["boy","man","male","crown","royal","king"],"char":"🤴",fitzpatrick_scale:!0,category:"people"},bride_with_veil:{keywords:["couple","marriage","wedding","woman","bride"],"char":"👰",fitzpatrick_scale:!0,category:"people"},man_in_tuxedo:{keywords:["couple","marriage","wedding","groom"],"char":"🤵",fitzpatrick_scale:!0,category:"people"},running_woman:{keywords:["woman","walking","exercise","race","running","female"],"char":"🏃‍♀️",fitzpatrick_scale:!0,category:"people"},running_man:{keywords:["man","walking","exercise","race","running"],"char":"🏃",fitzpatrick_scale:!0,category:"people"},walking_woman:{keywords:["human","feet","steps","woman","female"],"char":"🚶‍♀️",fitzpatrick_scale:!0,category:"people"},walking_man:{keywords:["human","feet","steps"],"char":"🚶",fitzpatrick_scale:!0,category:"people"},dancer:{keywords:["female","girl","woman","fun"],"char":"💃",fitzpatrick_scale:!0,category:"people"},man_dancing:{keywords:["male","boy","fun","dancer"],"char":"🕺",fitzpatrick_scale:!0,category:"people"},dancing_women:{keywords:["female","bunny","women","girls"],"char":"👯",fitzpatrick_scale:!1,category:"people"},dancing_men:{keywords:["male","bunny","men","boys"],"char":"👯‍♂️",fitzpatrick_scale:!1,category:"people"},couple:{keywords:["pair","people","human","love","date","dating","like","affection","valentines","marriage"],"char":"👫",fitzpatrick_scale:!1,category:"people"},two_men_holding_hands:{keywords:["pair","couple","love","like","bromance","friendship","people","human"],"char":"👬",fitzpatrick_scale:!1,category:"people"},two_women_holding_hands:{keywords:["pair","friendship","couple","love","like","female","people","human"],"char":"👭",fitzpatrick_scale:!1,category:"people"},bowing_woman:{keywords:["woman","female","girl"],"char":"🙇‍♀️",fitzpatrick_scale:!0,category:"people"},bowing_man:{keywords:["man","male","boy"],"char":"🙇",fitzpatrick_scale:!0,category:"people"},man_facepalming:{keywords:["man","male","boy","disbelief"],"char":"🤦",fitzpatrick_scale:!0,category:"people"},woman_facepalming:{keywords:["woman","female","girl","disbelief"],"char":"🤦‍♀️",fitzpatrick_scale:!0,category:"people"},woman_shrugging:{keywords:["woman","female","girl","confused","indifferent","doubt"],"char":"🤷",fitzpatrick_scale:!0,category:"people"},man_shrugging:{keywords:["man","male","boy","confused","indifferent","doubt"],"char":"🤷‍♂️",fitzpatrick_scale:!0,category:"people"},tipping_hand_woman:{keywords:["female","girl","woman","human","information"],"char":"💁",fitzpatrick_scale:!0,category:"people"},tipping_hand_man:{keywords:["male","boy","man","human","information"],"char":"💁‍♂️",fitzpatrick_scale:!0,category:"people"},no_good_woman:{keywords:["female","girl","woman","nope"],"char":"🙅",fitzpatrick_scale:!0,category:"people"},no_good_man:{keywords:["male","boy","man","nope"],"char":"🙅‍♂️",fitzpatrick_scale:!0,category:"people"},ok_woman:{keywords:["women","girl","female","pink","human","woman"],"char":"🙆",fitzpatrick_scale:!0,category:"people"},ok_man:{keywords:["men","boy","male","blue","human","man"],"char":"🙆‍♂️",fitzpatrick_scale:!0,category:"people"},raising_hand_woman:{keywords:["female","girl","woman"],"char":"🙋",fitzpatrick_scale:!0,category:"people"},raising_hand_man:{keywords:["male","boy","man"],"char":"🙋‍♂️",fitzpatrick_scale:!0,category:"people"},pouting_woman:{keywords:["female","girl","woman"],"char":"🙎",fitzpatrick_scale:!0,category:"people"},pouting_man:{keywords:["male","boy","man"],"char":"🙎‍♂️",fitzpatrick_scale:!0,category:"people"},frowning_woman:{keywords:["female","girl","woman","sad","depressed","discouraged","unhappy"],"char":"🙍",fitzpatrick_scale:!0,category:"people"},frowning_man:{keywords:["male","boy","man","sad","depressed","discouraged","unhappy"],"char":"🙍‍♂️",fitzpatrick_scale:!0,category:"people"},haircut_woman:{keywords:["female","girl","woman"],"char":"💇",fitzpatrick_scale:!0,category:"people"},haircut_man:{keywords:["male","boy","man"],"char":"💇‍♂️",fitzpatrick_scale:!0,category:"people"},massage_woman:{keywords:["female","girl","woman","head"],"char":"💆",fitzpatrick_scale:!0,category:"people"},massage_man:{keywords:["male","boy","man","head"],"char":"💆‍♂️",fitzpatrick_scale:!0,category:"people"},woman_in_steamy_room:{keywords:["female","woman","spa","steamroom","sauna"],"char":"🧖‍♀️",fitzpatrick_scale:!0,category:"people"},man_in_steamy_room:{keywords:["male","man","spa","steamroom","sauna"],"char":"🧖‍♂️",fitzpatrick_scale:!0,category:"people"},couple_with_heart_woman_man:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],"char":"💑",fitzpatrick_scale:!1,category:"people"},couple_with_heart_woman_woman:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],"char":"👩‍❤️‍👩",fitzpatrick_scale:!1,category:"people"},couple_with_heart_man_man:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],"char":"👨‍❤️‍👨",fitzpatrick_scale:!1,category:"people"},couplekiss_man_woman:{keywords:["pair","valentines","love","like","dating","marriage"],"char":"💏",fitzpatrick_scale:!1,category:"people"},couplekiss_woman_woman:{keywords:["pair","valentines","love","like","dating","marriage"],"char":"👩‍❤️‍💋‍👩",fitzpatrick_scale:!1,category:"people"},couplekiss_man_man:{keywords:["pair","valentines","love","like","dating","marriage"],"char":"👨‍❤️‍💋‍👨",fitzpatrick_scale:!1,category:"people"},family_man_woman_boy:{keywords:["home","parents","child","mom","dad","father","mother","people","human"],"char":"👪",fitzpatrick_scale:!1,category:"people"},family_man_woman_girl:{keywords:["home","parents","people","human","child"],"char":"👨‍👩‍👧",fitzpatrick_scale:!1,category:"people"},family_man_woman_girl_boy:{keywords:["home","parents","people","human","children"],"char":"👨‍👩‍👧‍👦",fitzpatrick_scale:!1,category:"people"},family_man_woman_boy_boy:{keywords:["home","parents","people","human","children"],"char":"👨‍👩‍👦‍👦",fitzpatrick_scale:!1,category:"people"},family_man_woman_girl_girl:{keywords:["home","parents","people","human","children"],"char":"👨‍👩‍👧‍👧",fitzpatrick_scale:!1,category:"people"},family_woman_woman_boy:{keywords:["home","parents","people","human","children"],"char":"👩‍👩‍👦",fitzpatrick_scale:!1,category:"people"},family_woman_woman_girl:{keywords:["home","parents","people","human","children"],"char":"👩‍👩‍👧",fitzpatrick_scale:!1,category:"people"},family_woman_woman_girl_boy:{keywords:["home","parents","people","human","children"],"char":"👩‍👩‍👧‍👦",fitzpatrick_scale:!1,category:"people"},family_woman_woman_boy_boy:{keywords:["home","parents","people","human","children"],"char":"👩‍👩‍👦‍👦",fitzpatrick_scale:!1,category:"people"},family_woman_woman_girl_girl:{keywords:["home","parents","people","human","children"],"char":"👩‍👩‍👧‍👧",fitzpatrick_scale:!1,category:"people"},family_man_man_boy:{keywords:["home","parents","people","human","children"],"char":"👨‍👨‍👦",fitzpatrick_scale:!1,category:"people"},family_man_man_girl:{keywords:["home","parents","people","human","children"],"char":"👨‍👨‍👧",fitzpatrick_scale:!1,category:"people"},family_man_man_girl_boy:{keywords:["home","parents","people","human","children"],"char":"👨‍👨‍👧‍👦",fitzpatrick_scale:!1,category:"people"},family_man_man_boy_boy:{keywords:["home","parents","people","human","children"],"char":"👨‍👨‍👦‍👦",fitzpatrick_scale:!1,category:"people"},family_man_man_girl_girl:{keywords:["home","parents","people","human","children"],"char":"👨‍👨‍👧‍👧",fitzpatrick_scale:!1,category:"people"},family_woman_boy:{keywords:["home","parent","people","human","child"],"char":"👩‍👦",fitzpatrick_scale:!1,category:"people"},family_woman_girl:{keywords:["home","parent","people","human","child"],"char":"👩‍👧",fitzpatrick_scale:!1,category:"people"},family_woman_girl_boy:{keywords:["home","parent","people","human","children"],"char":"👩‍👧‍👦",fitzpatrick_scale:!1,category:"people"},family_woman_boy_boy:{keywords:["home","parent","people","human","children"],"char":"👩‍👦‍👦",fitzpatrick_scale:!1,category:"people"},family_woman_girl_girl:{keywords:["home","parent","people","human","children"],"char":"👩‍👧‍👧",fitzpatrick_scale:!1,category:"people"},family_man_boy:{keywords:["home","parent","people","human","child"],"char":"👨‍👦",fitzpatrick_scale:!1,category:"people"},family_man_girl:{keywords:["home","parent","people","human","child"],"char":"👨‍👧",fitzpatrick_scale:!1,category:"people"},family_man_girl_boy:{keywords:["home","parent","people","human","children"],"char":"👨‍👧‍👦",fitzpatrick_scale:!1,category:"people"},family_man_boy_boy:{keywords:["home","parent","people","human","children"],"char":"👨‍👦‍👦",fitzpatrick_scale:!1,category:"people"},family_man_girl_girl:{keywords:["home","parent","people","human","children"],"char":"👨‍👧‍👧",fitzpatrick_scale:!1,category:"people"},coat:{keywords:["jacket"],"char":"🧥",fitzpatrick_scale:!1,category:"people"},womans_clothes:{keywords:["fashion","shopping_bags","female"],"char":"👚",fitzpatrick_scale:!1,category:"people"},tshirt:{keywords:["fashion","cloth","casual","shirt","tee"],"char":"👕",fitzpatrick_scale:!1,category:"people"},jeans:{keywords:["fashion","shopping"],"char":"👖",fitzpatrick_scale:!1,category:"people"},necktie:{keywords:["shirt","suitup","formal","fashion","cloth","business"],"char":"👔",fitzpatrick_scale:!1,category:"people"},dress:{keywords:["clothes","fashion","shopping"],"char":"👗",fitzpatrick_scale:!1,category:"people"},bikini:{keywords:["swimming","female","woman","girl","fashion","beach","summer"],"char":"👙",fitzpatrick_scale:!1,category:"people"},kimono:{keywords:["dress","fashion","women","female","japanese"],"char":"👘",fitzpatrick_scale:!1,category:"people"},lipstick:{keywords:["female","girl","fashion","woman"],"char":"💄",fitzpatrick_scale:!1,category:"people"},kiss:{keywords:["face","lips","love","like","affection","valentines"],"char":"💋",fitzpatrick_scale:!1,category:"people"},footprints:{keywords:["feet","tracking","walking","beach"],"char":"👣",fitzpatrick_scale:!1,category:"people"},high_heel:{keywords:["fashion","shoes","female","pumps","stiletto"],"char":"👠",fitzpatrick_scale:!1,category:"people"},sandal:{keywords:["shoes","fashion","flip flops"],"char":"👡",fitzpatrick_scale:!1,category:"people"},boot:{keywords:["shoes","fashion"],"char":"👢",fitzpatrick_scale:!1,category:"people"},mans_shoe:{keywords:["fashion","male"],"char":"👞",fitzpatrick_scale:!1,category:"people"},athletic_shoe:{keywords:["shoes","sports","sneakers"],"char":"👟",fitzpatrick_scale:!1,category:"people"},socks:{keywords:["stockings","clothes"],"char":"🧦",fitzpatrick_scale:!1,category:"people"},gloves:{keywords:["hands","winter","clothes"],"char":"🧤",fitzpatrick_scale:!1,category:"people"},scarf:{keywords:["neck","winter","clothes"],"char":"🧣",fitzpatrick_scale:!1,category:"people"},womans_hat:{keywords:["fashion","accessories","female","lady","spring"],"char":"👒",fitzpatrick_scale:!1,category:"people"},tophat:{keywords:["magic","gentleman","classy","circus"],"char":"🎩",fitzpatrick_scale:!1,category:"people"},billed_hat:{keywords:["cap","baseball"],"char":"🧢",fitzpatrick_scale:!1,category:"people"},rescue_worker_helmet:{keywords:["construction","build"],"char":"⛑",fitzpatrick_scale:!1,category:"people"},mortar_board:{keywords:["school","college","degree","university","graduation","cap","hat","legal","learn","education"],"char":"🎓",fitzpatrick_scale:!1,category:"people"},crown:{keywords:["king","kod","leader","royalty","lord"],"char":"👑",fitzpatrick_scale:!1,category:"people"},school_satchel:{keywords:["student","education","bag","backpack"],"char":"🎒",fitzpatrick_scale:!1,category:"people"},pouch:{keywords:["bag","accessories","shopping"],"char":"👝",fitzpatrick_scale:!1,category:"people"},purse:{keywords:["fashion","accessories","money","sales","shopping"],"char":"👛",fitzpatrick_scale:!1,category:"people"},handbag:{keywords:["fashion","accessory","accessories","shopping"],"char":"👜",fitzpatrick_scale:!1,category:"people"},briefcase:{keywords:["business","documents","work","law","legal","job","career"],"char":"💼",fitzpatrick_scale:!1,category:"people"},eyeglasses:{keywords:["fashion","accessories","eyesight","nerdy","dork","geek"],"char":"👓",fitzpatrick_scale:!1,category:"people"},dark_sunglasses:{keywords:["face","cool","accessories"],"char":"🕶",fitzpatrick_scale:!1,category:"people"},ring:{keywords:["wedding","propose","marriage","valentines","diamond","fashion","jewelry","gem","engagement"],"char":"💍",fitzpatrick_scale:!1,category:"people"},closed_umbrella:{keywords:["weather","rain","drizzle"],"char":"🌂",fitzpatrick_scale:!1,category:"people"},dog:{keywords:["animal","friend","nature","woof","puppy","pet","faithful"],"char":"🐶",fitzpatrick_scale:!1,category:"animals_and_nature"},cat:{keywords:["animal","meow","nature","pet","kitten"],"char":"🐱",fitzpatrick_scale:!1,category:"animals_and_nature"},mouse:{keywords:["animal","nature","cheese_wedge","rodent"],"char":"🐭",fitzpatrick_scale:!1,category:"animals_and_nature"},hamster:{keywords:["animal","nature"],"char":"🐹",fitzpatrick_scale:!1,category:"animals_and_nature"},rabbit:{keywords:["animal","nature","pet","spring","magic","bunny"],"char":"🐰",fitzpatrick_scale:!1,category:"animals_and_nature"},fox_face:{keywords:["animal","nature","face"],"char":"🦊",fitzpatrick_scale:!1,category:"animals_and_nature"},bear:{keywords:["animal","nature","wild"],"char":"🐻",fitzpatrick_scale:!1,category:"animals_and_nature"},panda_face:{keywords:["animal","nature","panda"],"char":"🐼",fitzpatrick_scale:!1,category:"animals_and_nature"},koala:{keywords:["animal","nature"],"char":"🐨",fitzpatrick_scale:!1,category:"animals_and_nature"},tiger:{keywords:["animal","cat","danger","wild","nature","roar"],"char":"🐯",fitzpatrick_scale:!1,category:"animals_and_nature"},lion:{keywords:["animal","nature"],"char":"🦁",fitzpatrick_scale:!1,category:"animals_and_nature"},cow:{keywords:["beef","ox","animal","nature","moo","milk"],"char":"🐮",fitzpatrick_scale:!1,category:"animals_and_nature"},pig:{keywords:["animal","oink","nature"],"char":"🐷",fitzpatrick_scale:!1,category:"animals_and_nature"},pig_nose:{keywords:["animal","oink"],"char":"🐽",fitzpatrick_scale:!1,category:"animals_and_nature"},frog:{keywords:["animal","nature","croak","toad"],"char":"🐸",fitzpatrick_scale:!1,category:"animals_and_nature"},squid:{keywords:["animal","nature","ocean","sea"],"char":"🦑",fitzpatrick_scale:!1,category:"animals_and_nature"},octopus:{keywords:["animal","creature","ocean","sea","nature","beach"],"char":"🐙",fitzpatrick_scale:!1,category:"animals_and_nature"},shrimp:{keywords:["animal","ocean","nature","seafood"],"char":"🦐",fitzpatrick_scale:!1,category:"animals_and_nature"},monkey_face:{keywords:["animal","nature","circus"],"char":"🐵",fitzpatrick_scale:!1,category:"animals_and_nature"},gorilla:{keywords:["animal","nature","circus"],"char":"🦍",fitzpatrick_scale:!1,category:"animals_and_nature"},see_no_evil:{keywords:["monkey","animal","nature","haha"],"char":"🙈",fitzpatrick_scale:!1,category:"animals_and_nature"},hear_no_evil:{keywords:["animal","monkey","nature"],"char":"🙉",fitzpatrick_scale:!1,category:"animals_and_nature"},speak_no_evil:{keywords:["monkey","animal","nature","omg"],"char":"🙊",fitzpatrick_scale:!1,category:"animals_and_nature"},monkey:{keywords:["animal","nature","banana","circus"],"char":"🐒",fitzpatrick_scale:!1,category:"animals_and_nature"},chicken:{keywords:["animal","cluck","nature","bird"],"char":"🐔",fitzpatrick_scale:!1,category:"animals_and_nature"},penguin:{keywords:["animal","nature"],"char":"🐧",fitzpatrick_scale:!1,category:"animals_and_nature"},bird:{keywords:["animal","nature","fly","tweet","spring"],"char":"🐦",fitzpatrick_scale:!1,category:"animals_and_nature"},baby_chick:{keywords:["animal","chicken","bird"],"char":"🐤",fitzpatrick_scale:!1,category:"animals_and_nature"},hatching_chick:{keywords:["animal","chicken","egg","born","baby","bird"],"char":"🐣",fitzpatrick_scale:!1,category:"animals_and_nature"},hatched_chick:{keywords:["animal","chicken","baby","bird"],"char":"🐥",fitzpatrick_scale:!1,category:"animals_and_nature"},duck:{keywords:["animal","nature","bird","mallard"],"char":"🦆",fitzpatrick_scale:!1,category:"animals_and_nature"},eagle:{keywords:["animal","nature","bird"],"char":"🦅",fitzpatrick_scale:!1,category:"animals_and_nature"},owl:{keywords:["animal","nature","bird","hoot"],"char":"🦉",fitzpatrick_scale:!1,category:"animals_and_nature"},bat:{keywords:["animal","nature","blind","vampire"],"char":"🦇",fitzpatrick_scale:!1,category:"animals_and_nature"},wolf:{keywords:["animal","nature","wild"],"char":"🐺",fitzpatrick_scale:!1,category:"animals_and_nature"},boar:{keywords:["animal","nature"],"char":"🐗",fitzpatrick_scale:!1,category:"animals_and_nature"},horse:{keywords:["animal","brown","nature"],"char":"🐴",fitzpatrick_scale:!1,category:"animals_and_nature"},unicorn:{keywords:["animal","nature","mystical"],"char":"🦄",fitzpatrick_scale:!1,category:"animals_and_nature"},honeybee:{keywords:["animal","insect","nature","bug","spring","honey"],"char":"🐝",fitzpatrick_scale:!1,category:"animals_and_nature"},bug:{keywords:["animal","insect","nature","worm"],"char":"🐛",fitzpatrick_scale:!1,category:"animals_and_nature"},butterfly:{keywords:["animal","insect","nature","caterpillar"],"char":"🦋",fitzpatrick_scale:!1,category:"animals_and_nature"},snail:{keywords:["slow","animal","shell"],"char":"🐌",fitzpatrick_scale:!1,category:"animals_and_nature"},beetle:{keywords:["animal","insect","nature","ladybug"],"char":"🐞",fitzpatrick_scale:!1,category:"animals_and_nature"},ant:{keywords:["animal","insect","nature","bug"],"char":"🐜",fitzpatrick_scale:!1,category:"animals_and_nature"},grasshopper:{keywords:["animal","cricket","chirp"],"char":"🦗",fitzpatrick_scale:!1,category:"animals_and_nature"},spider:{keywords:["animal","arachnid"],"char":"🕷",fitzpatrick_scale:!1,category:"animals_and_nature"},scorpion:{keywords:["animal","arachnid"],"char":"🦂",fitzpatrick_scale:!1,category:"animals_and_nature"},crab:{keywords:["animal","crustacean"],"char":"🦀",fitzpatrick_scale:!1,category:"animals_and_nature"},snake:{keywords:["animal","evil","nature","hiss","python"],"char":"🐍",fitzpatrick_scale:!1,category:"animals_and_nature"},lizard:{keywords:["animal","nature","reptile"],"char":"🦎",fitzpatrick_scale:!1,category:"animals_and_nature"},"t-rex":{keywords:["animal","nature","dinosaur","tyrannosaurus","extinct"],"char":"🦖",fitzpatrick_scale:!1,category:"animals_and_nature"},sauropod:{keywords:["animal","nature","dinosaur","brachiosaurus","brontosaurus","diplodocus","extinct"],"char":"🦕",fitzpatrick_scale:!1,category:"animals_and_nature"},turtle:{keywords:["animal","slow","nature","tortoise"],"char":"🐢",fitzpatrick_scale:!1,category:"animals_and_nature"},tropical_fish:{keywords:["animal","swim","ocean","beach","nemo"],"char":"🐠",fitzpatrick_scale:!1,category:"animals_and_nature"},fish:{keywords:["animal","food","nature"],"char":"🐟",fitzpatrick_scale:!1,category:"animals_and_nature"},blowfish:{keywords:["animal","nature","food","sea","ocean"],"char":"🐡",fitzpatrick_scale:!1,category:"animals_and_nature"},dolphin:{keywords:["animal","nature","fish","sea","ocean","flipper","fins","beach"],"char":"🐬",fitzpatrick_scale:!1,category:"animals_and_nature"},shark:{keywords:["animal","nature","fish","sea","ocean","jaws","fins","beach"],"char":"🦈",fitzpatrick_scale:!1,category:"animals_and_nature"},whale:{keywords:["animal","nature","sea","ocean"],"char":"🐳",fitzpatrick_scale:!1,category:"animals_and_nature"},whale2:{keywords:["animal","nature","sea","ocean"],"char":"🐋",fitzpatrick_scale:!1,category:"animals_and_nature"},crocodile:{keywords:["animal","nature","reptile","lizard","alligator"],"char":"🐊",fitzpatrick_scale:!1,category:"animals_and_nature"},leopard:{keywords:["animal","nature"],"char":"🐆",fitzpatrick_scale:!1,category:"animals_and_nature"},zebra:{keywords:["animal","nature","stripes","safari"],"char":"🦓",fitzpatrick_scale:!1,category:"animals_and_nature"},tiger2:{keywords:["animal","nature","roar"],"char":"🐅",fitzpatrick_scale:!1,category:"animals_and_nature"},water_buffalo:{keywords:["animal","nature","ox","cow"],"char":"🐃",fitzpatrick_scale:!1,category:"animals_and_nature"},ox:{keywords:["animal","cow","beef"],"char":"🐂",fitzpatrick_scale:!1,category:"animals_and_nature"},cow2:{keywords:["beef","ox","animal","nature","moo","milk"],"char":"🐄",fitzpatrick_scale:!1,category:"animals_and_nature"},deer:{keywords:["animal","nature","horns","venison"],"char":"🦌",fitzpatrick_scale:!1,category:"animals_and_nature"},dromedary_camel:{keywords:["animal","hot","desert","hump"],"char":"🐪",fitzpatrick_scale:!1,category:"animals_and_nature"},camel:{keywords:["animal","nature","hot","desert","hump"],"char":"🐫",fitzpatrick_scale:!1,category:"animals_and_nature"},giraffe:{keywords:["animal","nature","spots","safari"],"char":"🦒",fitzpatrick_scale:!1,category:"animals_and_nature"},elephant:{keywords:["animal","nature","nose","th","circus"],"char":"🐘",fitzpatrick_scale:!1,category:"animals_and_nature"},rhinoceros:{keywords:["animal","nature","horn"],"char":"🦏",fitzpatrick_scale:!1,category:"animals_and_nature"},goat:{keywords:["animal","nature"],"char":"🐐",fitzpatrick_scale:!1,category:"animals_and_nature"},ram:{keywords:["animal","sheep","nature"],"char":"🐏",fitzpatrick_scale:!1,category:"animals_and_nature"},sheep:{keywords:["animal","nature","wool","shipit"],"char":"🐑",fitzpatrick_scale:!1,category:"animals_and_nature"},racehorse:{keywords:["animal","gamble","luck"],"char":"🐎",fitzpatrick_scale:!1,category:"animals_and_nature"},pig2:{keywords:["animal","nature"],"char":"🐖",fitzpatrick_scale:!1,category:"animals_and_nature"},rat:{keywords:["animal","mouse","rodent"],"char":"🐀",fitzpatrick_scale:!1,category:"animals_and_nature"},mouse2:{keywords:["animal","nature","rodent"],"char":"🐁",fitzpatrick_scale:!1,category:"animals_and_nature"},rooster:{keywords:["animal","nature","chicken"],"char":"🐓",fitzpatrick_scale:!1,category:"animals_and_nature"},turkey:{keywords:["animal","bird"],"char":"🦃",fitzpatrick_scale:!1,category:"animals_and_nature"},dove:{keywords:["animal","bird"],"char":"🕊",fitzpatrick_scale:!1,category:"animals_and_nature"},dog2:{keywords:["animal","nature","friend","doge","pet","faithful"],"char":"🐕",fitzpatrick_scale:!1,category:"animals_and_nature"},poodle:{keywords:["dog","animal","101","nature","pet"],"char":"🐩",fitzpatrick_scale:!1,category:"animals_and_nature"},cat2:{keywords:["animal","meow","pet","cats"],"char":"🐈",fitzpatrick_scale:!1,category:"animals_and_nature"},rabbit2:{keywords:["animal","nature","pet","magic","spring"],"char":"🐇",fitzpatrick_scale:!1,category:"animals_and_nature"},chipmunk:{keywords:["animal","nature","rodent","squirrel"],"char":"🐿",fitzpatrick_scale:!1,category:"animals_and_nature"},hedgehog:{keywords:["animal","nature","spiny"],"char":"🦔",fitzpatrick_scale:!1,category:"animals_and_nature"},paw_prints:{keywords:["animal","tracking","footprints","dog","cat","pet","feet"],"char":"🐾",fitzpatrick_scale:!1,category:"animals_and_nature"},dragon:{keywords:["animal","myth","nature","chinese","green"],"char":"🐉",fitzpatrick_scale:!1,category:"animals_and_nature"},dragon_face:{keywords:["animal","myth","nature","chinese","green"],"char":"🐲",fitzpatrick_scale:!1,category:"animals_and_nature"},cactus:{keywords:["vegetable","plant","nature"],"char":"🌵",fitzpatrick_scale:!1,category:"animals_and_nature"},christmas_tree:{keywords:["festival","vacation","december","xmas","celebration"],"char":"🎄",fitzpatrick_scale:!1,category:"animals_and_nature"},evergreen_tree:{keywords:["plant","nature"],"char":"🌲",fitzpatrick_scale:!1,category:"animals_and_nature"},deciduous_tree:{keywords:["plant","nature"],"char":"🌳",fitzpatrick_scale:!1,category:"animals_and_nature"},palm_tree:{keywords:["plant","vegetable","nature","summer","beach","mojito","tropical"],"char":"🌴",fitzpatrick_scale:!1,category:"animals_and_nature"},seedling:{keywords:["plant","nature","grass","lawn","spring"],"char":"🌱",fitzpatrick_scale:!1,category:"animals_and_nature"},herb:{keywords:["vegetable","plant","medicine","weed","grass","lawn"],"char":"🌿",fitzpatrick_scale:!1,category:"animals_and_nature"},shamrock:{keywords:["vegetable","plant","nature","irish","clover"],"char":"☘",fitzpatrick_scale:!1,category:"animals_and_nature"},four_leaf_clover:{keywords:["vegetable","plant","nature","lucky","irish"],"char":"🍀",fitzpatrick_scale:!1,category:"animals_and_nature"},bamboo:{keywords:["plant","nature","vegetable","panda","pine_decoration"],"char":"🎍",fitzpatrick_scale:!1,category:"animals_and_nature"},tanabata_tree:{keywords:["plant","nature","branch","summer"],"char":"🎋",fitzpatrick_scale:!1,category:"animals_and_nature"},leaves:{keywords:["nature","plant","tree","vegetable","grass","lawn","spring"],"char":"🍃",fitzpatrick_scale:!1,category:"animals_and_nature"},fallen_leaf:{keywords:["nature","plant","vegetable","leaves"],"char":"🍂",fitzpatrick_scale:!1,category:"animals_and_nature"},maple_leaf:{keywords:["nature","plant","vegetable","ca","fall"],"char":"🍁",fitzpatrick_scale:!1,category:"animals_and_nature"},ear_of_rice:{keywords:["nature","plant"],"char":"🌾",fitzpatrick_scale:!1,category:"animals_and_nature"},hibiscus:{keywords:["plant","vegetable","flowers","beach"],"char":"🌺",fitzpatrick_scale:!1,category:"animals_and_nature"},sunflower:{keywords:["nature","plant","fall"],"char":"🌻",fitzpatrick_scale:!1,category:"animals_and_nature"},rose:{keywords:["flowers","valentines","love","spring"],"char":"🌹",fitzpatrick_scale:!1,category:"animals_and_nature"},wilted_flower:{keywords:["plant","nature","flower"],"char":"🥀",fitzpatrick_scale:!1,category:"animals_and_nature"},tulip:{keywords:["flowers","plant","nature","summer","spring"],"char":"🌷",fitzpatrick_scale:!1,category:"animals_and_nature"},blossom:{keywords:["nature","flowers","yellow"],"char":"🌼",fitzpatrick_scale:!1,category:"animals_and_nature"},cherry_blossom:{keywords:["nature","plant","spring","flower"],"char":"🌸",fitzpatrick_scale:!1,category:"animals_and_nature"},bouquet:{keywords:["flowers","nature","spring"],"char":"💐",fitzpatrick_scale:!1,category:"animals_and_nature"},mushroom:{keywords:["plant","vegetable"],"char":"🍄",fitzpatrick_scale:!1,category:"animals_and_nature"},chestnut:{keywords:["food","squirrel"],"char":"🌰",fitzpatrick_scale:!1,category:"animals_and_nature"},jack_o_lantern:{keywords:["halloween","light","pumpkin","creepy","fall"],"char":"🎃",fitzpatrick_scale:!1,category:"animals_and_nature"},shell:{keywords:["nature","sea","beach"],"char":"🐚",fitzpatrick_scale:!1,category:"animals_and_nature"},spider_web:{keywords:["animal","insect","arachnid","silk"],"char":"🕸",fitzpatrick_scale:!1,category:"animals_and_nature"},earth_americas:{keywords:["globe","world","USA","international"],"char":"🌎",fitzpatrick_scale:!1,category:"animals_and_nature"},earth_africa:{keywords:["globe","world","international"],"char":"🌍",fitzpatrick_scale:!1,category:"animals_and_nature"},earth_asia:{keywords:["globe","world","east","international"],"char":"🌏",fitzpatrick_scale:!1,category:"animals_and_nature"},full_moon:{keywords:["nature","yellow","twilight","planet","space","night","evening","sleep"],"char":"🌕",fitzpatrick_scale:!1,category:"animals_and_nature"},waning_gibbous_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep","waxing_gibbous_moon"],"char":"🌖",fitzpatrick_scale:!1,category:"animals_and_nature"},last_quarter_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],"char":"🌗",fitzpatrick_scale:!1,category:"animals_and_nature"},waning_crescent_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],"char":"🌘",fitzpatrick_scale:!1,category:"animals_and_nature"},new_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],"char":"🌑",fitzpatrick_scale:!1,category:"animals_and_nature"},waxing_crescent_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],"char":"🌒",fitzpatrick_scale:!1,category:"animals_and_nature"},first_quarter_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],"char":"🌓",fitzpatrick_scale:!1,category:"animals_and_nature"},waxing_gibbous_moon:{keywords:["nature","night","sky","gray","twilight","planet","space","evening","sleep"],"char":"🌔",fitzpatrick_scale:!1,category:"animals_and_nature"},new_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],"char":"🌚",fitzpatrick_scale:!1,category:"animals_and_nature"},full_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],"char":"🌝",fitzpatrick_scale:!1,category:"animals_and_nature"},first_quarter_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],"char":"🌛",fitzpatrick_scale:!1,category:"animals_and_nature"},last_quarter_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],"char":"🌜",fitzpatrick_scale:!1,category:"animals_and_nature"},sun_with_face:{keywords:["nature","morning","sky"],"char":"🌞",fitzpatrick_scale:!1,category:"animals_and_nature"},crescent_moon:{keywords:["night","sleep","sky","evening","magic"],"char":"🌙",fitzpatrick_scale:!1,category:"animals_and_nature"},star:{keywords:["night","yellow"],"char":"⭐",fitzpatrick_scale:!1,category:"animals_and_nature"},star2:{keywords:["night","sparkle","awesome","good","magic"],"char":"🌟",fitzpatrick_scale:!1,category:"animals_and_nature"},dizzy:{keywords:["star","sparkle","shoot","magic"],"char":"💫",fitzpatrick_scale:!1,category:"animals_and_nature"},sparkles:{keywords:["stars","shine","shiny","cool","awesome","good","magic"],"char":"✨",fitzpatrick_scale:!1,category:"animals_and_nature"},comet:{keywords:["space"],"char":"☄",fitzpatrick_scale:!1,category:"animals_and_nature"},sunny:{keywords:["weather","nature","brightness","summer","beach","spring"],"char":"☀️",fitzpatrick_scale:!1,category:"animals_and_nature"},sun_behind_small_cloud:{keywords:["weather"],"char":"🌤",fitzpatrick_scale:!1,category:"animals_and_nature"},partly_sunny:{keywords:["weather","nature","cloudy","morning","fall","spring"],"char":"⛅",fitzpatrick_scale:!1,category:"animals_and_nature"},sun_behind_large_cloud:{keywords:["weather"],"char":"🌥",fitzpatrick_scale:!1,category:"animals_and_nature"},sun_behind_rain_cloud:{keywords:["weather"],"char":"🌦",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud:{keywords:["weather","sky"],"char":"☁️",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_rain:{keywords:["weather"],"char":"🌧",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_lightning_and_rain:{keywords:["weather","lightning"],"char":"⛈",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_lightning:{keywords:["weather","thunder"],"char":"🌩",fitzpatrick_scale:!1,category:"animals_and_nature"},zap:{keywords:["thunder","weather","lightning bolt","fast"],"char":"⚡",fitzpatrick_scale:!1,category:"animals_and_nature"},fire:{keywords:["hot","cook","flame"],"char":"🔥",fitzpatrick_scale:!1,category:"animals_and_nature"},boom:{keywords:["bomb","explode","explosion","collision","blown"],"char":"💥",fitzpatrick_scale:!1,category:"animals_and_nature"},snowflake:{keywords:["winter","season","cold","weather","christmas","xmas"],"char":"❄️",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_snow:{keywords:["weather"],"char":"🌨",fitzpatrick_scale:!1,category:"animals_and_nature"},snowman:{keywords:["winter","season","cold","weather","christmas","xmas","frozen","without_snow"],"char":"⛄",fitzpatrick_scale:!1,category:"animals_and_nature"},snowman_with_snow:{keywords:["winter","season","cold","weather","christmas","xmas","frozen"],"char":"☃",fitzpatrick_scale:!1,category:"animals_and_nature"},wind_face:{keywords:["gust","air"],"char":"🌬",fitzpatrick_scale:!1,category:"animals_and_nature"},dash:{keywords:["wind","air","fast","shoo","fart","smoke","puff"],"char":"💨",fitzpatrick_scale:!1,category:"animals_and_nature"},tornado:{keywords:["weather","cyclone","twister"],"char":"🌪",fitzpatrick_scale:!1,category:"animals_and_nature"},fog:{keywords:["weather"],"char":"🌫",fitzpatrick_scale:!1,category:"animals_and_nature"},open_umbrella:{keywords:["weather","spring"],"char":"☂",fitzpatrick_scale:!1,category:"animals_and_nature"},umbrella:{keywords:["rainy","weather","spring"],"char":"☔",fitzpatrick_scale:!1,category:"animals_and_nature"},droplet:{keywords:["water","drip","faucet","spring"],"char":"💧",fitzpatrick_scale:!1,category:"animals_and_nature"},sweat_drops:{keywords:["water","drip","oops"],"char":"💦",fitzpatrick_scale:!1,category:"animals_and_nature"},ocean:{keywords:["sea","water","wave","nature","tsunami","disaster"],"char":"🌊",fitzpatrick_scale:!1,category:"animals_and_nature"},green_apple:{keywords:["fruit","nature"],"char":"🍏",fitzpatrick_scale:!1,category:"food_and_drink"},apple:{keywords:["fruit","mac","school"],"char":"🍎",fitzpatrick_scale:!1,category:"food_and_drink"},pear:{keywords:["fruit","nature","food"],"char":"🍐",fitzpatrick_scale:!1,category:"food_and_drink"},tangerine:{keywords:["food","fruit","nature","orange"],"char":"🍊",fitzpatrick_scale:!1,category:"food_and_drink"},lemon:{keywords:["fruit","nature"],"char":"🍋",fitzpatrick_scale:!1,category:"food_and_drink"},banana:{keywords:["fruit","food","monkey"],"char":"🍌",fitzpatrick_scale:!1,category:"food_and_drink"},watermelon:{keywords:["fruit","food","picnic","summer"],"char":"🍉",fitzpatrick_scale:!1,category:"food_and_drink"},grapes:{keywords:["fruit","food","wine"],"char":"🍇",fitzpatrick_scale:!1,category:"food_and_drink"},strawberry:{keywords:["fruit","food","nature"],"char":"🍓",fitzpatrick_scale:!1,category:"food_and_drink"},melon:{keywords:["fruit","nature","food"],"char":"🍈",fitzpatrick_scale:!1,category:"food_and_drink"},cherries:{keywords:["food","fruit"],"char":"🍒",fitzpatrick_scale:!1,category:"food_and_drink"},peach:{keywords:["fruit","nature","food"],"char":"🍑",fitzpatrick_scale:!1,category:"food_and_drink"},pineapple:{keywords:["fruit","nature","food"],"char":"🍍",fitzpatrick_scale:!1,category:"food_and_drink"},coconut:{keywords:["fruit","nature","food","palm"],"char":"🥥",fitzpatrick_scale:!1,category:"food_and_drink"},kiwi_fruit:{keywords:["fruit","food"],"char":"🥝",fitzpatrick_scale:!1,category:"food_and_drink"},avocado:{keywords:["fruit","food"],"char":"🥑",fitzpatrick_scale:!1,category:"food_and_drink"},broccoli:{keywords:["fruit","food","vegetable"],"char":"🥦",fitzpatrick_scale:!1,category:"food_and_drink"},tomato:{keywords:["fruit","vegetable","nature","food"],"char":"🍅",fitzpatrick_scale:!1,category:"food_and_drink"},eggplant:{keywords:["vegetable","nature","food","aubergine"],"char":"🍆",fitzpatrick_scale:!1,category:"food_and_drink"},cucumber:{keywords:["fruit","food","pickle"],"char":"🥒",fitzpatrick_scale:!1,category:"food_and_drink"},carrot:{keywords:["vegetable","food","orange"],"char":"🥕",fitzpatrick_scale:!1,category:"food_and_drink"},hot_pepper:{keywords:["food","spicy","chilli","chili"],"char":"🌶",fitzpatrick_scale:!1,category:"food_and_drink"},potato:{keywords:["food","tuber","vegatable","starch"],"char":"🥔",fitzpatrick_scale:!1,category:"food_and_drink"},corn:{keywords:["food","vegetable","plant"],"char":"🌽",fitzpatrick_scale:!1,category:"food_and_drink"},sweet_potato:{keywords:["food","nature"],"char":"🍠",fitzpatrick_scale:!1,category:"food_and_drink"},peanuts:{keywords:["food","nut"],"char":"🥜",fitzpatrick_scale:!1,category:"food_and_drink"},honey_pot:{keywords:["bees","sweet","kitchen"],"char":"🍯",fitzpatrick_scale:!1,category:"food_and_drink"},croissant:{keywords:["food","bread","french"],"char":"🥐",fitzpatrick_scale:!1,category:"food_and_drink"},bread:{keywords:["food","wheat","breakfast","toast"],"char":"🍞",fitzpatrick_scale:!1,category:"food_and_drink"},baguette_bread:{keywords:["food","bread","french"],"char":"🥖",fitzpatrick_scale:!1,category:"food_and_drink"},pretzel:{keywords:["food","bread","twisted"],"char":"🥨",fitzpatrick_scale:!1,category:"food_and_drink"},cheese:{keywords:["food","chadder"],"char":"🧀",fitzpatrick_scale:!1,category:"food_and_drink"},egg:{keywords:["food","chicken","breakfast"],"char":"🥚",fitzpatrick_scale:!1,category:"food_and_drink"},bacon:{keywords:["food","breakfast","pork","pig","meat"],"char":"🥓",fitzpatrick_scale:!1,category:"food_and_drink"},steak:{keywords:["food","cow","meat","cut","chop","lambchop","porkchop"],"char":"🥩",fitzpatrick_scale:!1,category:"food_and_drink"},pancakes:{keywords:["food","breakfast","flapjacks","hotcakes"],"char":"🥞",fitzpatrick_scale:!1,category:"food_and_drink"},poultry_leg:{keywords:["food","meat","drumstick","bird","chicken","turkey"],"char":"🍗",fitzpatrick_scale:!1,category:"food_and_drink"},meat_on_bone:{keywords:["good","food","drumstick"],"char":"🍖",fitzpatrick_scale:!1,category:"food_and_drink"},fried_shrimp:{keywords:["food","animal","appetizer","summer"],"char":"🍤",fitzpatrick_scale:!1,category:"food_and_drink"},fried_egg:{keywords:["food","breakfast","kitchen","egg"],"char":"🍳",fitzpatrick_scale:!1,category:"food_and_drink"},hamburger:{keywords:["meat","fast food","beef","cheeseburger","mcdonalds","burger king"],"char":"🍔",fitzpatrick_scale:!1,category:"food_and_drink"},fries:{keywords:["chips","snack","fast food"],"char":"🍟",fitzpatrick_scale:!1,category:"food_and_drink"},stuffed_flatbread:{keywords:["food","flatbread","stuffed","gyro"],"char":"🥙",fitzpatrick_scale:!1,category:"food_and_drink"},hotdog:{keywords:["food","frankfurter"],"char":"🌭",fitzpatrick_scale:!1,category:"food_and_drink"},pizza:{keywords:["food","party"],"char":"🍕",fitzpatrick_scale:!1,category:"food_and_drink"},sandwich:{keywords:["food","lunch","bread"],"char":"🥪",fitzpatrick_scale:!1,category:"food_and_drink"},canned_food:{keywords:["food","soup"],"char":"🥫",fitzpatrick_scale:!1,category:"food_and_drink"},spaghetti:{keywords:["food","italian","noodle"],"char":"🍝",fitzpatrick_scale:!1,category:"food_and_drink"},taco:{keywords:["food","mexican"],"char":"🌮",fitzpatrick_scale:!1,category:"food_and_drink"},burrito:{keywords:["food","mexican"],"char":"🌯",fitzpatrick_scale:!1,category:"food_and_drink"},green_salad:{keywords:["food","healthy","lettuce"],"char":"🥗",fitzpatrick_scale:!1,category:"food_and_drink"},shallow_pan_of_food:{keywords:["food","cooking","casserole","paella"],"char":"🥘",fitzpatrick_scale:!1,category:"food_and_drink"},ramen:{keywords:["food","japanese","noodle","chopsticks"],"char":"🍜",fitzpatrick_scale:!1,category:"food_and_drink"},stew:{keywords:["food","meat","soup"],"char":"🍲",fitzpatrick_scale:!1,category:"food_and_drink"},fish_cake:{keywords:["food","japan","sea","beach","narutomaki","pink","swirl","kamaboko","surimi","ramen"],"char":"🍥",fitzpatrick_scale:!1,category:"food_and_drink"},fortune_cookie:{keywords:["food","prophecy"],"char":"🥠",fitzpatrick_scale:!1,category:"food_and_drink"},sushi:{keywords:["food","fish","japanese","rice"],"char":"🍣",fitzpatrick_scale:!1,category:"food_and_drink"},bento:{keywords:["food","japanese","box"],"char":"🍱",fitzpatrick_scale:!1,category:"food_and_drink"},curry:{keywords:["food","spicy","hot","indian"],"char":"🍛",fitzpatrick_scale:!1,category:"food_and_drink"},rice_ball:{keywords:["food","japanese"],"char":"🍙",fitzpatrick_scale:!1,category:"food_and_drink"},rice:{keywords:["food","china","asian"],"char":"🍚",fitzpatrick_scale:!1,category:"food_and_drink"},rice_cracker:{keywords:["food","japanese"],"char":"🍘",fitzpatrick_scale:!1,category:"food_and_drink"},oden:{keywords:["food","japanese"],"char":"🍢",fitzpatrick_scale:!1,category:"food_and_drink"},dango:{keywords:["food","dessert","sweet","japanese","barbecue","meat"],"char":"🍡",fitzpatrick_scale:!1,category:"food_and_drink"},shaved_ice:{keywords:["hot","dessert","summer"],"char":"🍧",fitzpatrick_scale:!1,category:"food_and_drink"},ice_cream:{keywords:["food","hot","dessert"],"char":"🍨",fitzpatrick_scale:!1,category:"food_and_drink"},icecream:{keywords:["food","hot","dessert","summer"],"char":"🍦",fitzpatrick_scale:!1,category:"food_and_drink"},pie:{keywords:["food","dessert","pastry"],"char":"🥧",fitzpatrick_scale:!1,category:"food_and_drink"},cake:{keywords:["food","dessert"],"char":"🍰",fitzpatrick_scale:!1,category:"food_and_drink"},birthday:{keywords:["food","dessert","cake"],"char":"🎂",fitzpatrick_scale:!1,category:"food_and_drink"},custard:{keywords:["dessert","food"],"char":"🍮",fitzpatrick_scale:!1,category:"food_and_drink"},candy:{keywords:["snack","dessert","sweet","lolly"],"char":"🍬",fitzpatrick_scale:!1,category:"food_and_drink"},lollipop:{keywords:["food","snack","candy","sweet"],"char":"🍭",fitzpatrick_scale:!1,category:"food_and_drink"},chocolate_bar:{keywords:["food","snack","dessert","sweet"],"char":"🍫",fitzpatrick_scale:!1,category:"food_and_drink"},popcorn:{keywords:["food","movie theater","films","snack"],"char":"🍿",fitzpatrick_scale:!1,category:"food_and_drink"},dumpling:{keywords:["food","empanada","pierogi","potsticker"],"char":"🥟",fitzpatrick_scale:!1,category:"food_and_drink"},doughnut:{keywords:["food","dessert","snack","sweet","donut"],"char":"🍩",fitzpatrick_scale:!1,category:"food_and_drink"},cookie:{keywords:["food","snack","oreo","chocolate","sweet","dessert"],"char":"🍪",fitzpatrick_scale:!1,category:"food_and_drink"},milk_glass:{keywords:["beverage","drink","cow"],"char":"🥛",fitzpatrick_scale:!1,category:"food_and_drink"},beer:{keywords:["relax","beverage","drink","drunk","party","pub","summer","alcohol","booze"],"char":"🍺",fitzpatrick_scale:!1,category:"food_and_drink"},beers:{keywords:["relax","beverage","drink","drunk","party","pub","summer","alcohol","booze"],"char":"🍻",fitzpatrick_scale:!1,category:"food_and_drink"},clinking_glasses:{keywords:["beverage","drink","party","alcohol","celebrate","cheers","wine","champagne","toast"],"char":"🥂",fitzpatrick_scale:!1,category:"food_and_drink"},wine_glass:{keywords:["drink","beverage","drunk","alcohol","booze"],"char":"🍷",fitzpatrick_scale:!1,category:"food_and_drink"},tumbler_glass:{keywords:["drink","beverage","drunk","alcohol","liquor","booze","bourbon","scotch","whisky","glass","shot"],"char":"🥃",fitzpatrick_scale:!1,category:"food_and_drink"},cocktail:{keywords:["drink","drunk","alcohol","beverage","booze","mojito"],"char":"🍸",fitzpatrick_scale:!1,category:"food_and_drink"},tropical_drink:{keywords:["beverage","cocktail","summer","beach","alcohol","booze","mojito"],"char":"🍹",fitzpatrick_scale:!1,category:"food_and_drink"},champagne:{keywords:["drink","wine","bottle","celebration"],"char":"🍾",fitzpatrick_scale:!1,category:"food_and_drink"},sake:{keywords:["wine","drink","drunk","beverage","japanese","alcohol","booze"],"char":"🍶",fitzpatrick_scale:!1,category:"food_and_drink"},tea:{keywords:["drink","bowl","breakfast","green","british"],"char":"🍵",fitzpatrick_scale:!1,category:"food_and_drink"},cup_with_straw:{keywords:["drink","soda"],"char":"🥤",fitzpatrick_scale:!1,category:"food_and_drink"},coffee:{keywords:["beverage","caffeine","latte","espresso"],"char":"☕",fitzpatrick_scale:!1,category:"food_and_drink"},baby_bottle:{keywords:["food","container","milk"],"char":"🍼",fitzpatrick_scale:!1,category:"food_and_drink"},spoon:{keywords:["cutlery","kitchen","tableware"],"char":"🥄",fitzpatrick_scale:!1,category:"food_and_drink"},fork_and_knife:{keywords:["cutlery","kitchen"],"char":"🍴",fitzpatrick_scale:!1,category:"food_and_drink"},plate_with_cutlery:{keywords:["food","eat","meal","lunch","dinner","restaurant"],"char":"🍽",fitzpatrick_scale:!1,category:"food_and_drink"},bowl_with_spoon:{keywords:["food","breakfast","cereal","oatmeal","porridge"],"char":"🥣",fitzpatrick_scale:!1,category:"food_and_drink"},takeout_box:{keywords:["food","leftovers"],"char":"🥡",fitzpatrick_scale:!1,category:"food_and_drink"},chopsticks:{keywords:["food"],"char":"🥢",fitzpatrick_scale:!1,category:"food_and_drink"},soccer:{keywords:["sports","football"],"char":"⚽",fitzpatrick_scale:!1,category:"activity"},basketball:{keywords:["sports","balls","NBA"],"char":"🏀",fitzpatrick_scale:!1,category:"activity"},football:{keywords:["sports","balls","NFL"],"char":"🏈",fitzpatrick_scale:!1,category:"activity"},baseball:{keywords:["sports","balls"],"char":"⚾",fitzpatrick_scale:!1,category:"activity"},tennis:{keywords:["sports","balls","green"],"char":"🎾",fitzpatrick_scale:!1,category:"activity"},volleyball:{keywords:["sports","balls"],"char":"🏐",fitzpatrick_scale:!1,category:"activity"},rugby_football:{keywords:["sports","team"],"char":"🏉",fitzpatrick_scale:!1,category:"activity"},"8ball":{keywords:["pool","hobby","game","luck","magic"],"char":"🎱",fitzpatrick_scale:!1,category:"activity"},golf:{keywords:["sports","business","flag","hole","summer"],"char":"⛳",fitzpatrick_scale:!1,category:"activity"},golfing_woman:{keywords:["sports","business","woman","female"],"char":"🏌️‍♀️",fitzpatrick_scale:!1,category:"activity"},golfing_man:{keywords:["sports","business"],"char":"🏌",fitzpatrick_scale:!0,category:"activity"},ping_pong:{keywords:["sports","pingpong"],"char":"🏓",fitzpatrick_scale:!1,category:"activity"},badminton:{keywords:["sports"],"char":"🏸",fitzpatrick_scale:!1,category:"activity"},goal_net:{keywords:["sports"],"char":"🥅",fitzpatrick_scale:!1,category:"activity"},ice_hockey:{keywords:["sports"],"char":"🏒",fitzpatrick_scale:!1,category:"activity"},field_hockey:{keywords:["sports"],"char":"🏑",fitzpatrick_scale:!1,category:"activity"},cricket:{keywords:["sports"],"char":"🏏",fitzpatrick_scale:!1,category:"activity"},ski:{keywords:["sports","winter","cold","snow"],"char":"🎿",fitzpatrick_scale:!1,category:"activity"},skier:{keywords:["sports","winter","snow"],"char":"⛷",fitzpatrick_scale:!1,category:"activity"},snowboarder:{keywords:["sports","winter"],"char":"🏂",fitzpatrick_scale:!0,category:"activity"},person_fencing:{keywords:["sports","fencing","sword"],"char":"🤺",fitzpatrick_scale:!1,category:"activity"},women_wrestling:{keywords:["sports","wrestlers"],"char":"🤼‍♀️",fitzpatrick_scale:!1,category:"activity"},men_wrestling:{keywords:["sports","wrestlers"],"char":"🤼‍♂️",fitzpatrick_scale:!1,category:"activity"},woman_cartwheeling:{keywords:["gymnastics"],"char":"🤸‍♀️",fitzpatrick_scale:!0,category:"activity"},man_cartwheeling:{keywords:["gymnastics"],"char":"🤸‍♂️",fitzpatrick_scale:!0,category:"activity"},woman_playing_handball:{keywords:["sports"],"char":"🤾‍♀️",fitzpatrick_scale:!0,category:"activity"},man_playing_handball:{keywords:["sports"],"char":"🤾‍♂️",fitzpatrick_scale:!0,category:"activity"},ice_skate:{keywords:["sports"],"char":"⛸",fitzpatrick_scale:!1,category:"activity"},curling_stone:{keywords:["sports"],"char":"🥌",fitzpatrick_scale:!1,category:"activity"},sled:{keywords:["sleigh","luge","toboggan"],"char":"🛷",fitzpatrick_scale:!1,category:"activity"},bow_and_arrow:{keywords:["sports"],"char":"🏹",fitzpatrick_scale:!1,category:"activity"},fishing_pole_and_fish:{keywords:["food","hobby","summer"],"char":"🎣",fitzpatrick_scale:!1,category:"activity"},boxing_glove:{keywords:["sports","fighting"],"char":"🥊",fitzpatrick_scale:!1,category:"activity"},martial_arts_uniform:{keywords:["judo","karate","taekwondo"],"char":"🥋",fitzpatrick_scale:!1,category:"activity"},rowing_woman:{keywords:["sports","hobby","water","ship","woman","female"],"char":"🚣‍♀️",fitzpatrick_scale:!0,category:"activity"},rowing_man:{keywords:["sports","hobby","water","ship"],"char":"🚣",fitzpatrick_scale:!0,category:"activity"},climbing_woman:{keywords:["sports","hobby","woman","female","rock"],"char":"🧗‍♀️",fitzpatrick_scale:!0,category:"activity"},climbing_man:{keywords:["sports","hobby","man","male","rock"],"char":"🧗‍♂️",fitzpatrick_scale:!0,category:"activity"},swimming_woman:{keywords:["sports","exercise","human","athlete","water","summer","woman","female"],"char":"🏊‍♀️",fitzpatrick_scale:!0,category:"activity"},swimming_man:{keywords:["sports","exercise","human","athlete","water","summer"],"char":"🏊",fitzpatrick_scale:!0,category:"activity"},woman_playing_water_polo:{keywords:["sports","pool"],"char":"🤽‍♀️",fitzpatrick_scale:!0,category:"activity"},man_playing_water_polo:{keywords:["sports","pool"],"char":"🤽‍♂️",fitzpatrick_scale:!0,category:"activity"},woman_in_lotus_position:{keywords:["woman","female","meditation","yoga","serenity","zen","mindfulness"],"char":"🧘‍♀️",fitzpatrick_scale:!0,category:"activity"},man_in_lotus_position:{keywords:["man","male","meditation","yoga","serenity","zen","mindfulness"],"char":"🧘‍♂️",fitzpatrick_scale:!0,category:"activity"},surfing_woman:{keywords:["sports","ocean","sea","summer","beach","woman","female"],"char":"🏄‍♀️",fitzpatrick_scale:!0,category:"activity"},surfing_man:{keywords:["sports","ocean","sea","summer","beach"],"char":"🏄",fitzpatrick_scale:!0,category:"activity"},bath:{keywords:["clean","shower","bathroom"],"char":"🛀",fitzpatrick_scale:!0,category:"activity"},basketball_woman:{keywords:["sports","human","woman","female"],"char":"⛹️‍♀️",fitzpatrick_scale:!0,category:"activity"},basketball_man:{keywords:["sports","human"],"char":"⛹",fitzpatrick_scale:!0,category:"activity"},weight_lifting_woman:{keywords:["sports","training","exercise","woman","female"],"char":"🏋️‍♀️",fitzpatrick_scale:!0,category:"activity"},weight_lifting_man:{keywords:["sports","training","exercise"],"char":"🏋",fitzpatrick_scale:!0,category:"activity"},biking_woman:{keywords:["sports","bike","exercise","hipster","woman","female"],"char":"🚴‍♀️",fitzpatrick_scale:!0,category:"activity"},biking_man:{keywords:["sports","bike","exercise","hipster"],"char":"🚴",fitzpatrick_scale:!0,category:"activity"},mountain_biking_woman:{keywords:["transportation","sports","human","race","bike","woman","female"],"char":"🚵‍♀️",fitzpatrick_scale:!0,category:"activity"},mountain_biking_man:{keywords:["transportation","sports","human","race","bike"],"char":"🚵",fitzpatrick_scale:!0,category:"activity"},horse_racing:{keywords:["animal","betting","competition","gambling","luck"],"char":"🏇",fitzpatrick_scale:!0,category:"activity"},business_suit_levitating:{keywords:["suit","business","levitate","hover","jump"],"char":"🕴",fitzpatrick_scale:!0,category:"activity"},trophy:{keywords:["win","award","contest","place","ftw","ceremony"],"char":"🏆",fitzpatrick_scale:!1,category:"activity"},running_shirt_with_sash:{keywords:["play","pageant"],"char":"🎽",fitzpatrick_scale:!1,category:"activity"},medal_sports:{keywords:["award","winning"],"char":"🏅",fitzpatrick_scale:!1,category:"activity"},medal_military:{keywords:["award","winning","army"],"char":"🎖",fitzpatrick_scale:!1,category:"activity"},"1st_place_medal":{keywords:["award","winning","first"],"char":"🥇",fitzpatrick_scale:!1,category:"activity"},"2nd_place_medal":{keywords:["award","second"],"char":"🥈",fitzpatrick_scale:!1,category:"activity"},"3rd_place_medal":{keywords:["award","third"],"char":"🥉",fitzpatrick_scale:!1,category:"activity"},reminder_ribbon:{keywords:["sports","cause","support","awareness"],"char":"🎗",fitzpatrick_scale:!1,category:"activity"},rosette:{keywords:["flower","decoration","military"],"char":"🏵",fitzpatrick_scale:!1,category:"activity"},ticket:{keywords:["event","concert","pass"],"char":"🎫",fitzpatrick_scale:!1,category:"activity"},tickets:{keywords:["sports","concert","entrance"],"char":"🎟",fitzpatrick_scale:!1,category:"activity"},performing_arts:{keywords:["acting","theater","drama"],"char":"🎭",fitzpatrick_scale:!1,category:"activity"},art:{keywords:["design","paint","draw","colors"],"char":"🎨",fitzpatrick_scale:!1,category:"activity"},circus_tent:{keywords:["festival","carnival","party"],"char":"🎪",fitzpatrick_scale:!1,category:"activity"},woman_juggling:{keywords:["juggle","balance","skill","multitask"],"char":"🤹‍♀️",fitzpatrick_scale:!0,category:"activity"},man_juggling:{keywords:["juggle","balance","skill","multitask"],"char":"🤹‍♂️",fitzpatrick_scale:!0,category:"activity"},microphone:{keywords:["sound","music","PA","sing","talkshow"],"char":"🎤",fitzpatrick_scale:!1,category:"activity"},headphones:{keywords:["music","score","gadgets"],"char":"🎧",fitzpatrick_scale:!1,category:"activity"},musical_score:{keywords:["treble","clef","compose"],"char":"🎼",fitzpatrick_scale:!1,category:"activity"},musical_keyboard:{keywords:["piano","instrument","compose"],"char":"🎹",fitzpatrick_scale:!1,category:"activity"},drum:{keywords:["music","instrument","drumsticks","snare"],"char":"🥁",fitzpatrick_scale:!1,category:"activity"},saxophone:{keywords:["music","instrument","jazz","blues"],"char":"🎷",fitzpatrick_scale:!1,category:"activity"},trumpet:{keywords:["music","brass"],"char":"🎺",fitzpatrick_scale:!1,category:"activity"},guitar:{keywords:["music","instrument"],"char":"🎸",fitzpatrick_scale:!1,category:"activity"},violin:{keywords:["music","instrument","orchestra","symphony"],"char":"🎻",fitzpatrick_scale:!1,category:"activity"},clapper:{keywords:["movie","film","record"],"char":"🎬",fitzpatrick_scale:!1,category:"activity"},video_game:{keywords:["play","console","PS4","controller"],"char":"🎮",fitzpatrick_scale:!1,category:"activity"},space_invader:{keywords:["game","arcade","play"],"char":"👾",fitzpatrick_scale:!1,category:"activity"},dart:{keywords:["game","play","bar","target","bullseye"],"char":"🎯",fitzpatrick_scale:!1,category:"activity"},game_die:{keywords:["dice","random","tabletop","play","luck"],"char":"🎲",fitzpatrick_scale:!1,category:"activity"},slot_machine:{keywords:["bet","gamble","vegas","fruit machine","luck","casino"],"char":"🎰",fitzpatrick_scale:!1,category:"activity"},bowling:{keywords:["sports","fun","play"],"char":"🎳",fitzpatrick_scale:!1,category:"activity"},red_car:{keywords:["red","transportation","vehicle"],"char":"🚗",fitzpatrick_scale:!1,category:"travel_and_places"},taxi:{keywords:["uber","vehicle","cars","transportation"],"char":"🚕",fitzpatrick_scale:!1,category:"travel_and_places"},blue_car:{keywords:["transportation","vehicle"],"char":"🚙",fitzpatrick_scale:!1,category:"travel_and_places"},bus:{keywords:["car","vehicle","transportation"],"char":"🚌",fitzpatrick_scale:!1,category:"travel_and_places"},trolleybus:{keywords:["bart","transportation","vehicle"],"char":"🚎",fitzpatrick_scale:!1,category:"travel_and_places"},racing_car:{keywords:["sports","race","fast","formula","f1"],"char":"🏎",fitzpatrick_scale:!1,category:"travel_and_places"},police_car:{keywords:["vehicle","cars","transportation","law","legal","enforcement"],"char":"🚓",fitzpatrick_scale:!1,category:"travel_and_places"},ambulance:{keywords:["health","911","hospital"],"char":"🚑",fitzpatrick_scale:!1,category:"travel_and_places"},fire_engine:{keywords:["transportation","cars","vehicle"],"char":"🚒",fitzpatrick_scale:!1,category:"travel_and_places"},minibus:{keywords:["vehicle","car","transportation"],"char":"🚐",fitzpatrick_scale:!1,category:"travel_and_places"},truck:{keywords:["cars","transportation"],"char":"🚚",fitzpatrick_scale:!1,category:"travel_and_places"},articulated_lorry:{keywords:["vehicle","cars","transportation","express"],"char":"🚛",fitzpatrick_scale:!1,category:"travel_and_places"},tractor:{keywords:["vehicle","car","farming","agriculture"],"char":"🚜",fitzpatrick_scale:!1,category:"travel_and_places"},kick_scooter:{keywords:["vehicle","kick","razor"],"char":"🛴",fitzpatrick_scale:!1,category:"travel_and_places"},motorcycle:{keywords:["race","sports","fast"],"char":"🏍",fitzpatrick_scale:!1,category:"travel_and_places"},bike:{keywords:["sports","bicycle","exercise","hipster"],"char":"🚲",fitzpatrick_scale:!1,category:"travel_and_places"},motor_scooter:{keywords:["vehicle","vespa","sasha"],"char":"🛵",fitzpatrick_scale:!1,category:"travel_and_places"},rotating_light:{keywords:["police","ambulance","911","emergency","alert","error","pinged","law","legal"],"char":"🚨",fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_police_car:{keywords:["vehicle","law","legal","enforcement","911"],"char":"🚔",fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_bus:{keywords:["vehicle","transportation"],"char":"🚍",fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_automobile:{keywords:["car","vehicle","transportation"],"char":"🚘",fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_taxi:{keywords:["vehicle","cars","uber"],"char":"🚖",fitzpatrick_scale:!1,category:"travel_and_places"},aerial_tramway:{keywords:["transportation","vehicle","ski"],"char":"🚡",fitzpatrick_scale:!1,category:"travel_and_places"},mountain_cableway:{keywords:["transportation","vehicle","ski"],"char":"🚠",fitzpatrick_scale:!1,category:"travel_and_places"},suspension_railway:{keywords:["vehicle","transportation"],"char":"🚟",fitzpatrick_scale:!1,category:"travel_and_places"},railway_car:{keywords:["transportation","vehicle"],"char":"🚃",fitzpatrick_scale:!1,category:"travel_and_places"},train:{keywords:["transportation","vehicle","carriage","public","travel"],"char":"🚋",fitzpatrick_scale:!1,category:"travel_and_places"},monorail:{keywords:["transportation","vehicle"],"char":"🚝",fitzpatrick_scale:!1,category:"travel_and_places"},bullettrain_side:{keywords:["transportation","vehicle"],"char":"🚄",fitzpatrick_scale:!1,category:"travel_and_places"},bullettrain_front:{keywords:["transportation","vehicle","speed","fast","public","travel"],"char":"🚅",fitzpatrick_scale:!1,category:"travel_and_places"},light_rail:{keywords:["transportation","vehicle"],"char":"🚈",fitzpatrick_scale:!1,category:"travel_and_places"},mountain_railway:{keywords:["transportation","vehicle"],"char":"🚞",fitzpatrick_scale:!1,category:"travel_and_places"},steam_locomotive:{keywords:["transportation","vehicle","train"],"char":"🚂",fitzpatrick_scale:!1,category:"travel_and_places"},train2:{keywords:["transportation","vehicle"],"char":"🚆",fitzpatrick_scale:!1,category:"travel_and_places"},metro:{keywords:["transportation","blue-square","mrt","underground","tube"],"char":"🚇",fitzpatrick_scale:!1,category:"travel_and_places"},tram:{keywords:["transportation","vehicle"],"char":"🚊",fitzpatrick_scale:!1,category:"travel_and_places"},station:{keywords:["transportation","vehicle","public"],"char":"🚉",fitzpatrick_scale:!1,category:"travel_and_places"},flying_saucer:{keywords:["transportation","vehicle","ufo"],"char":"🛸",fitzpatrick_scale:!1,category:"travel_and_places"},helicopter:{keywords:["transportation","vehicle","fly"],"char":"🚁",fitzpatrick_scale:!1,category:"travel_and_places"},small_airplane:{keywords:["flight","transportation","fly","vehicle"],"char":"🛩",fitzpatrick_scale:!1,category:"travel_and_places"},airplane:{keywords:["vehicle","transportation","flight","fly"],"char":"✈️",fitzpatrick_scale:!1,category:"travel_and_places"},flight_departure:{keywords:["airport","flight","landing"],"char":"🛫",fitzpatrick_scale:!1,category:"travel_and_places"},flight_arrival:{keywords:["airport","flight","boarding"],"char":"🛬",fitzpatrick_scale:!1,category:"travel_and_places"},sailboat:{keywords:["ship","summer","transportation","water","sailing"],"char":"⛵",fitzpatrick_scale:!1,category:"travel_and_places"},motor_boat:{keywords:["ship"],"char":"🛥",fitzpatrick_scale:!1,category:"travel_and_places"},speedboat:{keywords:["ship","transportation","vehicle","summer"],"char":"🚤",fitzpatrick_scale:!1,category:"travel_and_places"},ferry:{keywords:["boat","ship","yacht"],"char":"⛴",fitzpatrick_scale:!1,category:"travel_and_places"},passenger_ship:{keywords:["yacht","cruise","ferry"],"char":"🛳",fitzpatrick_scale:!1,category:"travel_and_places"},rocket:{keywords:["launch","ship","staffmode","NASA","outer space","outer_space","fly"],"char":"🚀",fitzpatrick_scale:!1,category:"travel_and_places"},artificial_satellite:{keywords:["communication","gps","orbit","spaceflight","NASA","ISS"],"char":"🛰",fitzpatrick_scale:!1,category:"travel_and_places"},seat:{keywords:["sit","airplane","transport","bus","flight","fly"],"char":"💺",fitzpatrick_scale:!1,category:"travel_and_places"},canoe:{keywords:["boat","paddle","water","ship"],"char":"🛶",fitzpatrick_scale:!1,category:"travel_and_places"},anchor:{keywords:["ship","ferry","sea","boat"],"char":"⚓",fitzpatrick_scale:!1,category:"travel_and_places"},construction:{keywords:["wip","progress","caution","warning"],"char":"🚧",fitzpatrick_scale:!1,category:"travel_and_places"},fuelpump:{keywords:["gas station","petroleum"],"char":"⛽",fitzpatrick_scale:!1,category:"travel_and_places"},busstop:{keywords:["transportation","wait"],"char":"🚏",fitzpatrick_scale:!1,category:"travel_and_places"},vertical_traffic_light:{keywords:["transportation","driving"],"char":"🚦",fitzpatrick_scale:!1,category:"travel_and_places"},traffic_light:{keywords:["transportation","signal"],"char":"🚥",fitzpatrick_scale:!1,category:"travel_and_places"},checkered_flag:{keywords:["contest","finishline","race","gokart"],"char":"🏁",fitzpatrick_scale:!1,category:"travel_and_places"},ship:{keywords:["transportation","titanic","deploy"],"char":"🚢",fitzpatrick_scale:!1,category:"travel_and_places"},ferris_wheel:{keywords:["photo","carnival","londoneye"],"char":"🎡",fitzpatrick_scale:!1,category:"travel_and_places"},roller_coaster:{keywords:["carnival","playground","photo","fun"],"char":"🎢",fitzpatrick_scale:!1,category:"travel_and_places"},carousel_horse:{keywords:["photo","carnival"],"char":"🎠",fitzpatrick_scale:!1,category:"travel_and_places"},building_construction:{keywords:["wip","working","progress"],"char":"🏗",fitzpatrick_scale:!1,category:"travel_and_places"},foggy:{keywords:["photo","mountain"],"char":"🌁",fitzpatrick_scale:!1,category:"travel_and_places"},tokyo_tower:{keywords:["photo","japanese"],"char":"🗼",fitzpatrick_scale:!1,category:"travel_and_places"},factory:{keywords:["building","industry","pollution","smoke"],"char":"🏭",fitzpatrick_scale:!1,category:"travel_and_places"},fountain:{keywords:["photo","summer","water","fresh"],"char":"⛲",fitzpatrick_scale:!1,category:"travel_and_places"},rice_scene:{keywords:["photo","japan","asia","tsukimi"],"char":"🎑",fitzpatrick_scale:!1,category:"travel_and_places"},mountain:{keywords:["photo","nature","environment"],"char":"⛰",fitzpatrick_scale:!1,category:"travel_and_places"},mountain_snow:{keywords:["photo","nature","environment","winter","cold"],"char":"🏔",fitzpatrick_scale:!1,category:"travel_and_places"},mount_fuji:{keywords:["photo","mountain","nature","japanese"],"char":"🗻",fitzpatrick_scale:!1,category:"travel_and_places"},volcano:{keywords:["photo","nature","disaster"],"char":"🌋",fitzpatrick_scale:!1,category:"travel_and_places"},japan:{keywords:["nation","country","japanese","asia"],"char":"🗾",fitzpatrick_scale:!1,category:"travel_and_places"},camping:{keywords:["photo","outdoors","tent"],"char":"🏕",fitzpatrick_scale:!1,category:"travel_and_places"},tent:{keywords:["photo","camping","outdoors"],"char":"⛺",fitzpatrick_scale:!1,category:"travel_and_places"},national_park:{keywords:["photo","environment","nature"],"char":"🏞",fitzpatrick_scale:!1,category:"travel_and_places"},motorway:{keywords:["road","cupertino","interstate","highway"],"char":"🛣",fitzpatrick_scale:!1,category:"travel_and_places"},railway_track:{keywords:["train","transportation"],"char":"🛤",fitzpatrick_scale:!1,category:"travel_and_places"},sunrise:{keywords:["morning","view","vacation","photo"],"char":"🌅",fitzpatrick_scale:!1,category:"travel_and_places"},sunrise_over_mountains:{keywords:["view","vacation","photo"],"char":"🌄",fitzpatrick_scale:!1,category:"travel_and_places"},desert:{keywords:["photo","warm","saharah"],"char":"🏜",fitzpatrick_scale:!1,category:"travel_and_places"},beach_umbrella:{keywords:["weather","summer","sunny","sand","mojito"],"char":"🏖",fitzpatrick_scale:!1,category:"travel_and_places"},desert_island:{keywords:["photo","tropical","mojito"],"char":"🏝",fitzpatrick_scale:!1,category:"travel_and_places"},city_sunrise:{keywords:["photo","good morning","dawn"],"char":"🌇",fitzpatrick_scale:!1,category:"travel_and_places"},city_sunset:{keywords:["photo","evening","sky","buildings"],"char":"🌆",fitzpatrick_scale:!1,category:"travel_and_places"},cityscape:{keywords:["photo","night life","urban"],"char":"🏙",fitzpatrick_scale:!1,category:"travel_and_places"},night_with_stars:{keywords:["evening","city","downtown"],"char":"🌃",fitzpatrick_scale:!1,category:"travel_and_places"},bridge_at_night:{keywords:["photo","sanfrancisco"],"char":"🌉",fitzpatrick_scale:!1,category:"travel_and_places"},milky_way:{keywords:["photo","space","stars"],"char":"🌌",fitzpatrick_scale:!1,category:"travel_and_places"},stars:{keywords:["night","photo"],"char":"🌠",fitzpatrick_scale:!1,category:"travel_and_places"},sparkler:{keywords:["stars","night","shine"],"char":"🎇",fitzpatrick_scale:!1,category:"travel_and_places"},fireworks:{keywords:["photo","festival","carnival","congratulations"],"char":"🎆",fitzpatrick_scale:!1,category:"travel_and_places"},rainbow:{keywords:["nature","happy","unicorn_face","photo","sky","spring"],"char":"🌈",fitzpatrick_scale:!1,category:"travel_and_places"},houses:{keywords:["buildings","photo"],"char":"🏘",fitzpatrick_scale:!1,category:"travel_and_places"},european_castle:{keywords:["building","royalty","history"],"char":"🏰",fitzpatrick_scale:!1,category:"travel_and_places"},japanese_castle:{keywords:["photo","building"],"char":"🏯",fitzpatrick_scale:!1,category:"travel_and_places"},stadium:{keywords:["photo","place","sports","concert","venue"],"char":"🏟",fitzpatrick_scale:!1,category:"travel_and_places"},statue_of_liberty:{keywords:["american","newyork"],"char":"🗽",fitzpatrick_scale:!1,category:"travel_and_places"},house:{keywords:["building","home"],"char":"🏠",fitzpatrick_scale:!1,category:"travel_and_places"},house_with_garden:{keywords:["home","plant","nature"],"char":"🏡",fitzpatrick_scale:!1,category:"travel_and_places"},derelict_house:{keywords:["abandon","evict","broken","building"],"char":"🏚",fitzpatrick_scale:!1,category:"travel_and_places"},office:{keywords:["building","bureau","work"],"char":"🏢",fitzpatrick_scale:!1,category:"travel_and_places"},department_store:{keywords:["building","shopping","mall"],"char":"🏬",fitzpatrick_scale:!1,category:"travel_and_places"},post_office:{keywords:["building","envelope","communication"],"char":"🏣",fitzpatrick_scale:!1,category:"travel_and_places"},european_post_office:{keywords:["building","email"],"char":"🏤",fitzpatrick_scale:!1,category:"travel_and_places"},hospital:{keywords:["building","health","surgery","doctor"],"char":"🏥",fitzpatrick_scale:!1,category:"travel_and_places"},bank:{keywords:["building","money","sales","cash","business","enterprise"],"char":"🏦",fitzpatrick_scale:!1,category:"travel_and_places"},hotel:{keywords:["building","accomodation","checkin"],"char":"🏨",fitzpatrick_scale:!1,category:"travel_and_places"},convenience_store:{keywords:["building","shopping","groceries"],"char":"🏪",fitzpatrick_scale:!1,category:"travel_and_places"},school:{keywords:["building","student","education","learn","teach"],"char":"🏫",fitzpatrick_scale:!1,category:"travel_and_places"},love_hotel:{keywords:["like","affection","dating"],"char":"🏩",fitzpatrick_scale:!1,category:"travel_and_places"},wedding:{keywords:["love","like","affection","couple","marriage","bride","groom"],"char":"💒",fitzpatrick_scale:!1,category:"travel_and_places"},classical_building:{keywords:["art","culture","history"],"char":"🏛",fitzpatrick_scale:!1,category:"travel_and_places"},church:{keywords:["building","religion","christ"],"char":"⛪",fitzpatrick_scale:!1,category:"travel_and_places"},mosque:{keywords:["islam","worship","minaret"],"char":"🕌",fitzpatrick_scale:!1,category:"travel_and_places"},synagogue:{keywords:["judaism","worship","temple","jewish"],"char":"🕍",fitzpatrick_scale:!1,category:"travel_and_places"},kaaba:{keywords:["mecca","mosque","islam"],"char":"🕋",fitzpatrick_scale:!1,category:"travel_and_places"},shinto_shrine:{keywords:["temple","japan","kyoto"],"char":"⛩",fitzpatrick_scale:!1,category:"travel_and_places"},watch:{keywords:["time","accessories"],"char":"⌚",fitzpatrick_scale:!1,category:"objects"},iphone:{keywords:["technology","apple","gadgets","dial"],"char":"📱",fitzpatrick_scale:!1,category:"objects"},calling:{keywords:["iphone","incoming"],"char":"📲",fitzpatrick_scale:!1,category:"objects"},computer:{keywords:["technology","laptop","screen","display","monitor"],"char":"💻",fitzpatrick_scale:!1,category:"objects"},keyboard:{keywords:["technology","computer","type","input","text"],"char":"⌨",fitzpatrick_scale:!1,category:"objects"},desktop_computer:{keywords:["technology","computing","screen"],"char":"🖥",fitzpatrick_scale:!1,category:"objects"},printer:{keywords:["paper","ink"],"char":"🖨",fitzpatrick_scale:!1,category:"objects"},computer_mouse:{keywords:["click"],"char":"🖱",fitzpatrick_scale:!1,category:"objects"},trackball:{keywords:["technology","trackpad"],"char":"🖲",fitzpatrick_scale:!1,category:"objects"},joystick:{keywords:["game","play"],"char":"🕹",fitzpatrick_scale:!1,category:"objects"},clamp:{keywords:["tool"],"char":"🗜",fitzpatrick_scale:!1,category:"objects"},minidisc:{keywords:["technology","record","data","disk","90s"],"char":"💽",fitzpatrick_scale:!1,category:"objects"},floppy_disk:{keywords:["oldschool","technology","save","90s","80s"],"char":"💾",fitzpatrick_scale:!1,category:"objects"},cd:{keywords:["technology","dvd","disk","disc","90s"],"char":"💿",fitzpatrick_scale:!1,category:"objects"},dvd:{keywords:["cd","disk","disc"],"char":"📀",fitzpatrick_scale:!1,category:"objects"},vhs:{keywords:["record","video","oldschool","90s","80s"],"char":"📼",fitzpatrick_scale:!1,category:"objects"},camera:{keywords:["gadgets","photography"],"char":"📷",fitzpatrick_scale:!1,category:"objects"},camera_flash:{keywords:["photography","gadgets"],"char":"📸",fitzpatrick_scale:!1,category:"objects"},video_camera:{keywords:["film","record"],"char":"📹",fitzpatrick_scale:!1,category:"objects"},movie_camera:{keywords:["film","record"],"char":"🎥",fitzpatrick_scale:!1,category:"objects"},film_projector:{keywords:["video","tape","record","movie"],"char":"📽",fitzpatrick_scale:!1,category:"objects"},film_strip:{keywords:["movie"],"char":"🎞",fitzpatrick_scale:!1,category:"objects"},telephone_receiver:{keywords:["technology","communication","dial"],"char":"📞",fitzpatrick_scale:!1,category:"objects"},phone:{keywords:["technology","communication","dial","telephone"],"char":"☎️",fitzpatrick_scale:!1,category:"objects"},pager:{keywords:["bbcall","oldschool","90s"],"char":"📟",fitzpatrick_scale:!1,category:"objects"},fax:{keywords:["communication","technology"],"char":"📠",fitzpatrick_scale:!1,category:"objects"},tv:{keywords:["technology","program","oldschool","show","television"],"char":"📺",fitzpatrick_scale:!1,category:"objects"},radio:{keywords:["communication","music","podcast","program"],"char":"📻",fitzpatrick_scale:!1,category:"objects"},studio_microphone:{keywords:["sing","recording","artist","talkshow"],"char":"🎙",fitzpatrick_scale:!1,category:"objects"},level_slider:{keywords:["scale"],"char":"🎚",fitzpatrick_scale:!1,category:"objects"},control_knobs:{keywords:["dial"],"char":"🎛",fitzpatrick_scale:!1,category:"objects"},stopwatch:{keywords:["time","deadline"],"char":"⏱",fitzpatrick_scale:!1,category:"objects"},timer_clock:{keywords:["alarm"],"char":"⏲",fitzpatrick_scale:!1,category:"objects"},alarm_clock:{keywords:["time","wake"],"char":"⏰",fitzpatrick_scale:!1,category:"objects"},mantelpiece_clock:{keywords:["time"],"char":"🕰",fitzpatrick_scale:!1,category:"objects"},hourglass_flowing_sand:{keywords:["oldschool","time","countdown"],"char":"⏳",fitzpatrick_scale:!1,category:"objects"},hourglass:{keywords:["time","clock","oldschool","limit","exam","quiz","test"],"char":"⌛",fitzpatrick_scale:!1,category:"objects"},satellite:{keywords:["communication","future","radio","space"],"char":"📡",fitzpatrick_scale:!1,category:"objects"},battery:{keywords:["power","energy","sustain"],"char":"🔋",fitzpatrick_scale:!1,category:"objects"},electric_plug:{keywords:["charger","power"],"char":"🔌",fitzpatrick_scale:!1,category:"objects"},bulb:{keywords:["light","electricity","idea"],"char":"💡",fitzpatrick_scale:!1,category:"objects"},flashlight:{keywords:["dark","camping","sight","night"],"char":"🔦",fitzpatrick_scale:!1,category:"objects"},candle:{keywords:["fire","wax"],"char":"🕯",fitzpatrick_scale:!1,category:"objects"},wastebasket:{keywords:["bin","trash","rubbish","garbage","toss"],"char":"🗑",fitzpatrick_scale:!1,category:"objects"},oil_drum:{keywords:["barrell"],"char":"🛢",fitzpatrick_scale:!1,category:"objects"},money_with_wings:{keywords:["dollar","bills","payment","sale"],"char":"💸",fitzpatrick_scale:!1,category:"objects"},dollar:{keywords:["money","sales","bill","currency"],"char":"💵",fitzpatrick_scale:!1,category:"objects"},yen:{keywords:["money","sales","japanese","dollar","currency"],"char":"💴",fitzpatrick_scale:!1,category:"objects"},euro:{keywords:["money","sales","dollar","currency"],"char":"💶",fitzpatrick_scale:!1,category:"objects"},pound:{keywords:["british","sterling","money","sales","bills","uk","england","currency"],"char":"💷",fitzpatrick_scale:!1,category:"objects"},moneybag:{keywords:["dollar","payment","coins","sale"],"char":"💰",fitzpatrick_scale:!1,category:"objects"},credit_card:{keywords:["money","sales","dollar","bill","payment","shopping"],"char":"💳",fitzpatrick_scale:!1,category:"objects"},gem:{keywords:["blue","ruby","diamond","jewelry"],"char":"💎",fitzpatrick_scale:!1,category:"objects"},balance_scale:{keywords:["law","fairness","weight"],"char":"⚖",fitzpatrick_scale:!1,category:"objects"},wrench:{keywords:["tools","diy","ikea","fix","maintainer"],"char":"🔧",fitzpatrick_scale:!1,category:"objects"},hammer:{keywords:["tools","build","create"],"char":"🔨",fitzpatrick_scale:!1,category:"objects"},hammer_and_pick:{keywords:["tools","build","create"],"char":"⚒",fitzpatrick_scale:!1,category:"objects"},hammer_and_wrench:{keywords:["tools","build","create"],"char":"🛠",fitzpatrick_scale:!1,category:"objects"},pick:{keywords:["tools","dig"],"char":"⛏",fitzpatrick_scale:!1,category:"objects"},nut_and_bolt:{keywords:["handy","tools","fix"],"char":"🔩",fitzpatrick_scale:!1,category:"objects"},gear:{keywords:["cog"],"char":"⚙",fitzpatrick_scale:!1,category:"objects"},chains:{keywords:["lock","arrest"],"char":"⛓",fitzpatrick_scale:!1,category:"objects"},gun:{keywords:["violence","weapon","pistol","revolver"],"char":"🔫",fitzpatrick_scale:!1,category:"objects"},bomb:{keywords:["boom","explode","explosion","terrorism"],"char":"💣",fitzpatrick_scale:!1,category:"objects"},hocho:{keywords:["knife","blade","cutlery","kitchen","weapon"],"char":"🔪",fitzpatrick_scale:!1,category:"objects"},dagger:{keywords:["weapon"],"char":"🗡",fitzpatrick_scale:!1,category:"objects"},crossed_swords:{keywords:["weapon"],"char":"⚔",fitzpatrick_scale:!1,category:"objects"},shield:{keywords:["protection","security"],"char":"🛡",fitzpatrick_scale:!1,category:"objects"},smoking:{keywords:["kills","tobacco","cigarette","joint","smoke"],"char":"🚬",fitzpatrick_scale:!1,category:"objects"},skull_and_crossbones:{keywords:["poison","danger","deadly","scary","death","pirate","evil"],"char":"☠",fitzpatrick_scale:!1,category:"objects"},coffin:{keywords:["vampire","dead","die","death","rip","graveyard","cemetery","casket","funeral","box"],"char":"⚰",fitzpatrick_scale:!1,category:"objects"},funeral_urn:{keywords:["dead","die","death","rip","ashes"],"char":"⚱",fitzpatrick_scale:!1,category:"objects"},amphora:{keywords:["vase","jar"],"char":"🏺",fitzpatrick_scale:!1,category:"objects"},crystal_ball:{keywords:["disco","party","magic","circus","fortune_teller"],"char":"🔮",fitzpatrick_scale:!1,category:"objects"},prayer_beads:{keywords:["dhikr","religious"],"char":"📿",fitzpatrick_scale:!1,category:"objects"},barber:{keywords:["hair","salon","style"],"char":"💈",fitzpatrick_scale:!1,category:"objects"},alembic:{keywords:["distilling","science","experiment","chemistry"],"char":"⚗",fitzpatrick_scale:!1,category:"objects"},telescope:{keywords:["stars","space","zoom","science","astronomy"],"char":"🔭",fitzpatrick_scale:!1,category:"objects"},microscope:{keywords:["laboratory","experiment","zoomin","science","study"],"char":"🔬",fitzpatrick_scale:!1,category:"objects"},hole:{keywords:["embarrassing"],"char":"🕳",fitzpatrick_scale:!1,category:"objects"},pill:{keywords:["health","medicine","doctor","pharmacy","drug"],"char":"💊",fitzpatrick_scale:!1,category:"objects"},syringe:{keywords:["health","hospital","drugs","blood","medicine","needle","doctor","nurse"],"char":"💉",fitzpatrick_scale:!1,category:"objects"},thermometer:{keywords:["weather","temperature","hot","cold"],"char":"🌡",fitzpatrick_scale:!1,category:"objects"},label:{keywords:["sale","tag"],"char":"🏷",fitzpatrick_scale:!1,category:"objects"},bookmark:{keywords:["favorite","label","save"],"char":"🔖",fitzpatrick_scale:!1,category:"objects"},toilet:{keywords:["restroom","wc","washroom","bathroom","potty"],"char":"🚽",fitzpatrick_scale:!1,category:"objects"},shower:{keywords:["clean","water","bathroom"],"char":"🚿",fitzpatrick_scale:!1,category:"objects"},bathtub:{keywords:["clean","shower","bathroom"],"char":"🛁",fitzpatrick_scale:!1,category:"objects"},key:{keywords:["lock","door","password"],"char":"🔑",fitzpatrick_scale:!1,category:"objects"},old_key:{keywords:["lock","door","password"],"char":"🗝",fitzpatrick_scale:!1,category:"objects"},couch_and_lamp:{keywords:["read","chill"],"char":"🛋",fitzpatrick_scale:!1,category:"objects"},sleeping_bed:{keywords:["bed","rest"],"char":"🛌",fitzpatrick_scale:!0,category:"objects"},bed:{keywords:["sleep","rest"],"char":"🛏",fitzpatrick_scale:!1,category:"objects"},door:{keywords:["house","entry","exit"],"char":"🚪",fitzpatrick_scale:!1,category:"objects"},bellhop_bell:{keywords:["service"],"char":"🛎",fitzpatrick_scale:!1,category:"objects"},framed_picture:{keywords:["photography"],"char":"🖼",fitzpatrick_scale:!1,category:"objects"},world_map:{keywords:["location","direction"],"char":"🗺",fitzpatrick_scale:!1,category:"objects"},parasol_on_ground:{keywords:["weather","summer"],"char":"⛱",fitzpatrick_scale:!1,category:"objects"},moyai:{keywords:["rock","easter island","moai"],"char":"🗿",fitzpatrick_scale:!1,category:"objects"},shopping:{keywords:["mall","buy","purchase"],"char":"🛍",fitzpatrick_scale:!1,category:"objects"},shopping_cart:{keywords:["trolley"],"char":"🛒",fitzpatrick_scale:!1,category:"objects"},balloon:{keywords:["party","celebration","birthday","circus"],"char":"🎈",fitzpatrick_scale:!1,category:"objects"},flags:{keywords:["fish","japanese","koinobori","carp","banner"],"char":"🎏",fitzpatrick_scale:!1,category:"objects"},ribbon:{keywords:["decoration","pink","girl","bowtie"],"char":"🎀",fitzpatrick_scale:!1,category:"objects"},gift:{keywords:["present","birthday","christmas","xmas"],"char":"🎁",fitzpatrick_scale:!1,category:"objects"},confetti_ball:{keywords:["festival","party","birthday","circus"],"char":"🎊",fitzpatrick_scale:!1,category:"objects"},tada:{keywords:["party","congratulations","birthday","magic","circus","celebration"],"char":"🎉",fitzpatrick_scale:!1,category:"objects"},dolls:{keywords:["japanese","toy","kimono"],"char":"🎎",fitzpatrick_scale:!1,category:"objects"},wind_chime:{keywords:["nature","ding","spring","bell"],"char":"🎐",fitzpatrick_scale:!1,category:"objects"},crossed_flags:{keywords:["japanese","nation","country","border"],"char":"🎌",fitzpatrick_scale:!1,category:"objects"},izakaya_lantern:{keywords:["light","paper","halloween","spooky"],"char":"🏮",fitzpatrick_scale:!1,category:"objects"},email:{keywords:["letter","postal","inbox","communication"],"char":"✉️",fitzpatrick_scale:!1,category:"objects"},envelope_with_arrow:{keywords:["email","communication"],"char":"📩",fitzpatrick_scale:!1,category:"objects"},incoming_envelope:{keywords:["email","inbox"],"char":"📨",fitzpatrick_scale:!1,category:"objects"},"e-mail":{keywords:["communication","inbox"],"char":"📧",fitzpatrick_scale:!1,category:"objects"},love_letter:{keywords:["email","like","affection","envelope","valentines"],"char":"💌",fitzpatrick_scale:!1,category:"objects"},postbox:{keywords:["email","letter","envelope"],"char":"📮",fitzpatrick_scale:!1,category:"objects"},mailbox_closed:{keywords:["email","communication","inbox"],"char":"📪",fitzpatrick_scale:!1,category:"objects"},mailbox:{keywords:["email","inbox","communication"],"char":"📫",fitzpatrick_scale:!1,category:"objects"},mailbox_with_mail:{keywords:["email","inbox","communication"],"char":"📬",fitzpatrick_scale:!1,category:"objects"},mailbox_with_no_mail:{keywords:["email","inbox"],"char":"📭",fitzpatrick_scale:!1,category:"objects"},"package":{keywords:["mail","gift","cardboard","box","moving"],"char":"📦",fitzpatrick_scale:!1,category:"objects"},postal_horn:{keywords:["instrument","music"],"char":"📯",fitzpatrick_scale:!1,category:"objects"},inbox_tray:{keywords:["email","documents"],"char":"📥",fitzpatrick_scale:!1,category:"objects"},outbox_tray:{keywords:["inbox","email"],"char":"📤",fitzpatrick_scale:!1,category:"objects"},scroll:{keywords:["documents","ancient","history","paper"],"char":"📜",fitzpatrick_scale:!1,category:"objects"},page_with_curl:{keywords:["documents","office","paper"],"char":"📃",fitzpatrick_scale:!1,category:"objects"},bookmark_tabs:{keywords:["favorite","save","order","tidy"],"char":"📑",fitzpatrick_scale:!1,category:"objects"},bar_chart:{keywords:["graph","presentation","stats"],"char":"📊",fitzpatrick_scale:!1,category:"objects"},chart_with_upwards_trend:{keywords:["graph","presentation","stats","recovery","business","economics","money","sales","good","success"],"char":"📈",fitzpatrick_scale:!1,category:"objects"},chart_with_downwards_trend:{keywords:["graph","presentation","stats","recession","business","economics","money","sales","bad","failure"],"char":"📉",fitzpatrick_scale:!1,category:"objects"},page_facing_up:{keywords:["documents","office","paper","information"],"char":"📄",fitzpatrick_scale:!1,category:"objects"},date:{keywords:["calendar","schedule"],"char":"📅",fitzpatrick_scale:!1,category:"objects"},calendar:{keywords:["schedule","date","planning"],"char":"📆",fitzpatrick_scale:!1,category:"objects"},spiral_calendar:{keywords:["date","schedule","planning"],"char":"🗓",fitzpatrick_scale:!1,category:"objects"},card_index:{keywords:["business","stationery"],"char":"📇",fitzpatrick_scale:!1,category:"objects"},card_file_box:{keywords:["business","stationery"],"char":"🗃",fitzpatrick_scale:!1,category:"objects"},ballot_box:{keywords:["election","vote"],"char":"🗳",fitzpatrick_scale:!1,category:"objects"},file_cabinet:{keywords:["filing","organizing"],"char":"🗄",fitzpatrick_scale:!1,category:"objects"},clipboard:{keywords:["stationery","documents"],"char":"📋",fitzpatrick_scale:!1,category:"objects"},spiral_notepad:{keywords:["memo","stationery"],"char":"🗒",fitzpatrick_scale:!1,category:"objects"},file_folder:{keywords:["documents","business","office"],"char":"📁",fitzpatrick_scale:!1,category:"objects"},open_file_folder:{keywords:["documents","load"],"char":"📂",fitzpatrick_scale:!1,category:"objects"},card_index_dividers:{keywords:["organizing","business","stationery"],"char":"🗂",fitzpatrick_scale:!1,category:"objects"},newspaper_roll:{keywords:["press","headline"],"char":"🗞",fitzpatrick_scale:!1,category:"objects"},newspaper:{keywords:["press","headline"],"char":"📰",fitzpatrick_scale:!1,category:"objects"},notebook:{keywords:["stationery","record","notes","paper","study"],"char":"📓",fitzpatrick_scale:!1,category:"objects"},closed_book:{keywords:["read","library","knowledge","textbook","learn"],"char":"📕",fitzpatrick_scale:!1,category:"objects"},green_book:{keywords:["read","library","knowledge","study"],"char":"📗",fitzpatrick_scale:!1,category:"objects"},blue_book:{keywords:["read","library","knowledge","learn","study"],"char":"📘",fitzpatrick_scale:!1,category:"objects"},orange_book:{keywords:["read","library","knowledge","textbook","study"],"char":"📙",fitzpatrick_scale:!1,category:"objects"},notebook_with_decorative_cover:{keywords:["classroom","notes","record","paper","study"],"char":"📔",fitzpatrick_scale:!1,category:"objects"},ledger:{keywords:["notes","paper"],"char":"📒",fitzpatrick_scale:!1,category:"objects"},books:{keywords:["literature","library","study"],"char":"📚",fitzpatrick_scale:!1,category:"objects"},open_book:{keywords:["book","read","library","knowledge","literature","learn","study"],"char":"📖",fitzpatrick_scale:!1,category:"objects"},link:{keywords:["rings","url"],"char":"🔗",fitzpatrick_scale:!1,category:"objects"},paperclip:{keywords:["documents","stationery"],"char":"📎",fitzpatrick_scale:!1,category:"objects"},paperclips:{keywords:["documents","stationery"],"char":"🖇",fitzpatrick_scale:!1,category:"objects"},scissors:{keywords:["stationery","cut"],"char":"✂️",fitzpatrick_scale:!1,category:"objects"},triangular_ruler:{keywords:["stationery","math","architect","sketch"],"char":"📐",fitzpatrick_scale:!1,category:"objects"},straight_ruler:{keywords:["stationery","calculate","length","math","school","drawing","architect","sketch"],"char":"📏",fitzpatrick_scale:!1,category:"objects"},pushpin:{keywords:["stationery","mark","here"],"char":"📌",fitzpatrick_scale:!1,category:"objects"},round_pushpin:{keywords:["stationery","location","map","here"],"char":"📍",fitzpatrick_scale:!1,category:"objects"},triangular_flag_on_post:{keywords:["mark","milestone","place"],"char":"🚩",fitzpatrick_scale:!1,category:"objects"},white_flag:{keywords:["losing","loser","lost","surrender","give up","fail"],"char":"🏳",fitzpatrick_scale:!1,category:"objects"},black_flag:{keywords:["pirate"],"char":"🏴",fitzpatrick_scale:!1,category:"objects"},rainbow_flag:{keywords:["flag","rainbow","pride","gay","lgbt","glbt","queer","homosexual","lesbian","bisexual","transgender"],"char":"🏳️‍🌈",fitzpatrick_scale:!1,category:"objects"},closed_lock_with_key:{keywords:["security","privacy"],"char":"🔐",fitzpatrick_scale:!1,category:"objects"},lock:{keywords:["security","password","padlock"],"char":"🔒",fitzpatrick_scale:!1,category:"objects"},unlock:{keywords:["privacy","security"],"char":"🔓",fitzpatrick_scale:!1,category:"objects"},lock_with_ink_pen:{keywords:["security","secret"],"char":"🔏",fitzpatrick_scale:!1,category:"objects"},pen:{keywords:["stationery","writing","write"],"char":"🖊",fitzpatrick_scale:!1,category:"objects"},fountain_pen:{keywords:["stationery","writing","write"],"char":"🖋",fitzpatrick_scale:!1,category:"objects"},black_nib:{keywords:["pen","stationery","writing","write"],"char":"✒️",fitzpatrick_scale:!1,category:"objects"},memo:{keywords:["write","documents","stationery","pencil","paper","writing","legal","exam","quiz","test","study","compose"],"char":"📝",fitzpatrick_scale:!1,category:"objects"},pencil2:{keywords:["stationery","write","paper","writing","school","study"],"char":"✏️",fitzpatrick_scale:!1,category:"objects"},crayon:{keywords:["drawing","creativity"],"char":"🖍",fitzpatrick_scale:!1,category:"objects"},paintbrush:{keywords:["drawing","creativity","art"],"char":"🖌",fitzpatrick_scale:!1,category:"objects"},mag:{keywords:["search","zoom","find","detective"],"char":"🔍",fitzpatrick_scale:!1,category:"objects"},mag_right:{keywords:["search","zoom","find","detective"],"char":"🔎",fitzpatrick_scale:!1,category:"objects"},heart:{keywords:["love","like","valentines"],"char":"❤️",fitzpatrick_scale:!1,category:"symbols"},orange_heart:{keywords:["love","like","affection","valentines"],"char":"🧡",fitzpatrick_scale:!1,category:"symbols"},yellow_heart:{keywords:["love","like","affection","valentines"],"char":"💛",fitzpatrick_scale:!1,category:"symbols"},green_heart:{keywords:["love","like","affection","valentines"],"char":"💚",fitzpatrick_scale:!1,category:"symbols"},blue_heart:{keywords:["love","like","affection","valentines"],"char":"💙",fitzpatrick_scale:!1,category:"symbols"},purple_heart:{keywords:["love","like","affection","valentines"],"char":"💜",fitzpatrick_scale:!1,category:"symbols"},black_heart:{keywords:["evil"],"char":"🖤",fitzpatrick_scale:!1,category:"symbols"},broken_heart:{keywords:["sad","sorry","break","heart","heartbreak"],"char":"💔",fitzpatrick_scale:!1,category:"symbols"},heavy_heart_exclamation:{keywords:["decoration","love"],"char":"❣",fitzpatrick_scale:!1,category:"symbols"},two_hearts:{keywords:["love","like","affection","valentines","heart"],"char":"💕",fitzpatrick_scale:!1,category:"symbols"},revolving_hearts:{keywords:["love","like","affection","valentines"],"char":"💞",fitzpatrick_scale:!1,category:"symbols"},heartbeat:{keywords:["love","like","affection","valentines","pink","heart"],"char":"💓",fitzpatrick_scale:!1,category:"symbols"},heartpulse:{keywords:["like","love","affection","valentines","pink"],"char":"💗",fitzpatrick_scale:!1,category:"symbols"},sparkling_heart:{keywords:["love","like","affection","valentines"],"char":"💖",fitzpatrick_scale:!1,category:"symbols"},cupid:{keywords:["love","like","heart","affection","valentines"],"char":"💘",fitzpatrick_scale:!1,category:"symbols"},gift_heart:{keywords:["love","valentines"],"char":"💝",fitzpatrick_scale:!1,category:"symbols"},heart_decoration:{keywords:["purple-square","love","like"],"char":"💟",fitzpatrick_scale:!1,category:"symbols"},peace_symbol:{keywords:["hippie"],"char":"☮",fitzpatrick_scale:!1,category:"symbols"},latin_cross:{keywords:["christianity"],"char":"✝",fitzpatrick_scale:!1,category:"symbols"},star_and_crescent:{keywords:["islam"],"char":"☪",fitzpatrick_scale:!1,category:"symbols"},om:{keywords:["hinduism","buddhism","sikhism","jainism"],"char":"🕉",fitzpatrick_scale:!1,category:"symbols"},wheel_of_dharma:{keywords:["hinduism","buddhism","sikhism","jainism"],"char":"☸",fitzpatrick_scale:!1,category:"symbols"},star_of_david:{keywords:["judaism"],"char":"✡",fitzpatrick_scale:!1,category:"symbols"},six_pointed_star:{keywords:["purple-square","religion","jewish","hexagram"],"char":"🔯",fitzpatrick_scale:!1,category:"symbols"},menorah:{keywords:["hanukkah","candles","jewish"],"char":"🕎",fitzpatrick_scale:!1,category:"symbols"},yin_yang:{keywords:["balance"],"char":"☯",fitzpatrick_scale:!1,category:"symbols"},orthodox_cross:{keywords:["suppedaneum","religion"],"char":"☦",fitzpatrick_scale:!1,category:"symbols"},place_of_worship:{keywords:["religion","church","temple","prayer"],"char":"🛐",fitzpatrick_scale:!1,category:"symbols"},ophiuchus:{keywords:["sign","purple-square","constellation","astrology"],"char":"⛎",fitzpatrick_scale:!1,category:"symbols"},aries:{keywords:["sign","purple-square","zodiac","astrology"],"char":"♈",fitzpatrick_scale:!1,category:"symbols"},taurus:{keywords:["purple-square","sign","zodiac","astrology"],"char":"♉",fitzpatrick_scale:!1,category:"symbols"},gemini:{keywords:["sign","zodiac","purple-square","astrology"],"char":"♊",fitzpatrick_scale:!1,category:"symbols"},cancer:{keywords:["sign","zodiac","purple-square","astrology"],"char":"♋",fitzpatrick_scale:!1,category:"symbols"},leo:{keywords:["sign","purple-square","zodiac","astrology"],"char":"♌",fitzpatrick_scale:!1,category:"symbols"},virgo:{keywords:["sign","zodiac","purple-square","astrology"],"char":"♍",fitzpatrick_scale:!1,category:"symbols"},libra:{keywords:["sign","purple-square","zodiac","astrology"],"char":"♎",fitzpatrick_scale:!1,category:"symbols"},scorpius:{keywords:["sign","zodiac","purple-square","astrology","scorpio"],"char":"♏",fitzpatrick_scale:!1,category:"symbols"},sagittarius:{keywords:["sign","zodiac","purple-square","astrology"],"char":"♐",fitzpatrick_scale:!1,category:"symbols"},capricorn:{keywords:["sign","zodiac","purple-square","astrology"],"char":"♑",fitzpatrick_scale:!1,category:"symbols"},aquarius:{keywords:["sign","purple-square","zodiac","astrology"],"char":"♒",fitzpatrick_scale:!1,category:"symbols"},pisces:{keywords:["purple-square","sign","zodiac","astrology"],"char":"♓",fitzpatrick_scale:!1,category:"symbols"},id:{keywords:["purple-square","words"],"char":"🆔",fitzpatrick_scale:!1,category:"symbols"},atom_symbol:{keywords:["science","physics","chemistry"],"char":"⚛",fitzpatrick_scale:!1,category:"symbols"},u7a7a:{keywords:["kanji","japanese","chinese","empty","sky","blue-square"],"char":"🈳",fitzpatrick_scale:!1,category:"symbols"},u5272:{keywords:["cut","divide","chinese","kanji","pink-square"],"char":"🈹",fitzpatrick_scale:!1,category:"symbols"},radioactive:{keywords:["nuclear","danger"],"char":"☢",fitzpatrick_scale:!1,category:"symbols"},biohazard:{keywords:["danger"],"char":"☣",fitzpatrick_scale:!1,category:"symbols"},mobile_phone_off:{keywords:["mute","orange-square","silence","quiet"],"char":"📴",fitzpatrick_scale:!1,category:"symbols"},vibration_mode:{keywords:["orange-square","phone"],"char":"📳",fitzpatrick_scale:!1,category:"symbols"},u6709:{keywords:["orange-square","chinese","have","kanji"],"char":"🈶",fitzpatrick_scale:!1,category:"symbols"},u7121:{keywords:["nothing","chinese","kanji","japanese","orange-square"],"char":"🈚",fitzpatrick_scale:!1,category:"symbols"},u7533:{keywords:["chinese","japanese","kanji","orange-square"],"char":"🈸",fitzpatrick_scale:!1,category:"symbols"},u55b6:{keywords:["japanese","opening hours","orange-square"],"char":"🈺",fitzpatrick_scale:!1,category:"symbols"},u6708:{keywords:["chinese","month","moon","japanese","orange-square","kanji"],"char":"🈷️",fitzpatrick_scale:!1,category:"symbols"},eight_pointed_black_star:{keywords:["orange-square","shape","polygon"],"char":"✴️",fitzpatrick_scale:!1,category:"symbols"},vs:{keywords:["words","orange-square"],"char":"🆚",fitzpatrick_scale:!1,category:"symbols"},accept:{keywords:["ok","good","chinese","kanji","agree","yes","orange-circle"],"char":"🉑",fitzpatrick_scale:!1,category:"symbols"},white_flower:{keywords:["japanese","spring"],"char":"💮",fitzpatrick_scale:!1,category:"symbols"},ideograph_advantage:{keywords:["chinese","kanji","obtain","get","circle"],"char":"🉐",fitzpatrick_scale:!1,category:"symbols"},secret:{keywords:["privacy","chinese","sshh","kanji","red-circle"],"char":"㊙️",fitzpatrick_scale:!1,category:"symbols"},congratulations:{keywords:["chinese","kanji","japanese","red-circle"],"char":"㊗️",fitzpatrick_scale:!1,category:"symbols"},u5408:{keywords:["japanese","chinese","join","kanji","red-square"],"char":"🈴",fitzpatrick_scale:!1,category:"symbols"},u6e80:{keywords:["full","chinese","japanese","red-square","kanji"],"char":"🈵",fitzpatrick_scale:!1,category:"symbols"},u7981:{keywords:["kanji","japanese","chinese","forbidden","limit","restricted","red-square"],"char":"🈲",fitzpatrick_scale:!1,category:"symbols"},a:{keywords:["red-square","alphabet","letter"],"char":"🅰️",fitzpatrick_scale:!1,category:"symbols"},b:{keywords:["red-square","alphabet","letter"],"char":"🅱️",fitzpatrick_scale:!1,category:"symbols"},ab:{keywords:["red-square","alphabet"],"char":"🆎",fitzpatrick_scale:!1,category:"symbols"},cl:{keywords:["alphabet","words","red-square"],"char":"🆑",fitzpatrick_scale:!1,category:"symbols"},o2:{keywords:["alphabet","red-square","letter"],"char":"🅾️",fitzpatrick_scale:!1,category:"symbols"},sos:{keywords:["help","red-square","words","emergency","911"],"char":"🆘",fitzpatrick_scale:!1,category:"symbols"},no_entry:{keywords:["limit","security","privacy","bad","denied","stop","circle"],"char":"⛔",fitzpatrick_scale:!1,category:"symbols"},name_badge:{keywords:["fire","forbid"],"char":"📛",fitzpatrick_scale:!1,category:"symbols"},no_entry_sign:{keywords:["forbid","stop","limit","denied","disallow","circle"],"char":"🚫",fitzpatrick_scale:!1,category:"symbols"},x:{keywords:["no","delete","remove","cancel"],"char":"❌",fitzpatrick_scale:!1,category:"symbols"},o:{keywords:["circle","round"],"char":"⭕",fitzpatrick_scale:!1,category:"symbols"},stop_sign:{keywords:["stop"],"char":"🛑",fitzpatrick_scale:!1,category:"symbols"},anger:{keywords:["angry","mad"],"char":"💢",fitzpatrick_scale:!1,category:"symbols"},hotsprings:{keywords:["bath","warm","relax"],"char":"♨️",fitzpatrick_scale:!1,category:"symbols"},no_pedestrians:{keywords:["rules","crossing","walking","circle"],"char":"🚷",fitzpatrick_scale:!1,category:"symbols"},do_not_litter:{keywords:["trash","bin","garbage","circle"],"char":"🚯",fitzpatrick_scale:!1,category:"symbols"},no_bicycles:{keywords:["cyclist","prohibited","circle"],"char":"🚳",fitzpatrick_scale:!1,category:"symbols"},"non-potable_water":{keywords:["drink","faucet","tap","circle"],"char":"🚱",fitzpatrick_scale:!1,category:"symbols"},underage:{keywords:["18","drink","pub","night","minor","circle"],"char":"🔞",fitzpatrick_scale:!1,category:"symbols"},no_mobile_phones:{keywords:["iphone","mute","circle"],"char":"📵",fitzpatrick_scale:!1,category:"symbols"},exclamation:{keywords:["heavy_exclamation_mark","danger","surprise","punctuation","wow","warning"],"char":"❗",fitzpatrick_scale:!1,category:"symbols"},grey_exclamation:{keywords:["surprise","punctuation","gray","wow","warning"],"char":"❕",fitzpatrick_scale:!1,category:"symbols"},question:{keywords:["doubt","confused"],"char":"❓",fitzpatrick_scale:!1,category:"symbols"},grey_question:{keywords:["doubts","gray","huh","confused"],"char":"❔",fitzpatrick_scale:!1,category:"symbols"},bangbang:{keywords:["exclamation","surprise"],"char":"‼️",fitzpatrick_scale:!1,category:"symbols"},interrobang:{keywords:["wat","punctuation","surprise"],"char":"⁉️",fitzpatrick_scale:!1,category:"symbols"},100:{keywords:["score","perfect","numbers","century","exam","quiz","test","pass","hundred"],"char":"💯",fitzpatrick_scale:!1,category:"symbols"},low_brightness:{keywords:["sun","afternoon","warm","summer"],"char":"🔅",fitzpatrick_scale:!1,category:"symbols"},high_brightness:{keywords:["sun","light"],"char":"🔆",fitzpatrick_scale:!1,category:"symbols"},trident:{keywords:["weapon","spear"],"char":"🔱",fitzpatrick_scale:!1,category:"symbols"},fleur_de_lis:{keywords:["decorative","scout"],"char":"⚜",fitzpatrick_scale:!1,category:"symbols"},part_alternation_mark:{keywords:["graph","presentation","stats","business","economics","bad"],"char":"〽️",fitzpatrick_scale:!1,category:"symbols"},warning:{keywords:["exclamation","wip","alert","error","problem","issue"],"char":"⚠️",fitzpatrick_scale:!1,category:"symbols"},children_crossing:{keywords:["school","warning","danger","sign","driving","yellow-diamond"],"char":"🚸",fitzpatrick_scale:!1,category:"symbols"},beginner:{keywords:["badge","shield"],"char":"🔰",fitzpatrick_scale:!1,category:"symbols"},recycle:{keywords:["arrow","environment","garbage","trash"],"char":"♻️",fitzpatrick_scale:!1,category:"symbols"},u6307:{keywords:["chinese","point","green-square","kanji"],"char":"🈯",fitzpatrick_scale:!1,category:"symbols"},chart:{keywords:["green-square","graph","presentation","stats"],"char":"💹",fitzpatrick_scale:!1,category:"symbols"},sparkle:{keywords:["stars","green-square","awesome","good","fireworks"],"char":"❇️",fitzpatrick_scale:!1,category:"symbols"},eight_spoked_asterisk:{keywords:["star","sparkle","green-square"],"char":"✳️",fitzpatrick_scale:!1,category:"symbols"},negative_squared_cross_mark:{keywords:["x","green-square","no","deny"],"char":"❎",fitzpatrick_scale:!1,category:"symbols"},white_check_mark:{keywords:["green-square","ok","agree","vote","election","answer","tick"],"char":"✅",fitzpatrick_scale:!1,category:"symbols"},diamond_shape_with_a_dot_inside:{keywords:["jewel","blue","gem","crystal","fancy"],"char":"💠",fitzpatrick_scale:!1,category:"symbols"},cyclone:{keywords:["weather","swirl","blue","cloud","vortex","spiral","whirlpool","spin","tornado","hurricane","typhoon"],"char":"🌀",fitzpatrick_scale:!1,category:"symbols"},loop:{keywords:["tape","cassette"],"char":"➿",fitzpatrick_scale:!1,category:"symbols"},globe_with_meridians:{keywords:["earth","international","world","internet","interweb","i18n"],"char":"🌐",fitzpatrick_scale:!1,category:"symbols"},m:{keywords:["alphabet","blue-circle","letter"],"char":"Ⓜ️",fitzpatrick_scale:!1,category:"symbols"},atm:{keywords:["money","sales","cash","blue-square","payment","bank"],"char":"🏧",fitzpatrick_scale:!1,category:"symbols"},sa:{keywords:["japanese","blue-square","katakana"],"char":"🈂️",fitzpatrick_scale:!1,category:"symbols"},passport_control:{keywords:["custom","blue-square"],"char":"🛂",fitzpatrick_scale:!1,category:"symbols"},customs:{keywords:["passport","border","blue-square"],"char":"🛃",fitzpatrick_scale:!1,category:"symbols"},baggage_claim:{keywords:["blue-square","airport","transport"],"char":"🛄",fitzpatrick_scale:!1,category:"symbols"},left_luggage:{keywords:["blue-square","travel"],"char":"🛅",fitzpatrick_scale:!1,category:"symbols"},wheelchair:{keywords:["blue-square","disabled","a11y","accessibility"],"char":"♿",fitzpatrick_scale:!1,category:"symbols"},no_smoking:{keywords:["cigarette","blue-square","smell","smoke"],"char":"🚭",fitzpatrick_scale:!1,category:"symbols"},wc:{keywords:["toilet","restroom","blue-square"],"char":"🚾",fitzpatrick_scale:!1,category:"symbols"},parking:{keywords:["cars","blue-square","alphabet","letter"],"char":"🅿️",fitzpatrick_scale:!1,category:"symbols"},potable_water:{keywords:["blue-square","liquid","restroom","cleaning","faucet"],"char":"🚰",fitzpatrick_scale:!1,category:"symbols"},mens:{keywords:["toilet","restroom","wc","blue-square","gender","male"],"char":"🚹",fitzpatrick_scale:!1,category:"symbols"},womens:{keywords:["purple-square","woman","female","toilet","loo","restroom","gender"],"char":"🚺",fitzpatrick_scale:!1,category:"symbols"},baby_symbol:{keywords:["orange-square","child"],"char":"🚼",fitzpatrick_scale:!1,category:"symbols"},restroom:{keywords:["blue-square","toilet","refresh","wc","gender"],"char":"🚻",fitzpatrick_scale:!1,category:"symbols"},put_litter_in_its_place:{keywords:["blue-square","sign","human","info"],"char":"🚮",fitzpatrick_scale:!1,category:"symbols"},cinema:{keywords:["blue-square","record","film","movie","curtain","stage","theater"],"char":"🎦",fitzpatrick_scale:!1,category:"symbols"},signal_strength:{keywords:["blue-square","reception","phone","internet","connection","wifi","bluetooth","bars"],"char":"📶",fitzpatrick_scale:!1,category:"symbols"},koko:{keywords:["blue-square","here","katakana","japanese","destination"],"char":"🈁",fitzpatrick_scale:!1,category:"symbols"},ng:{keywords:["blue-square","words","shape","icon"],"char":"🆖",fitzpatrick_scale:!1,category:"symbols"},ok:{keywords:["good","agree","yes","blue-square"],"char":"🆗",fitzpatrick_scale:!1,category:"symbols"},up:{keywords:["blue-square","above","high"],"char":"🆙",fitzpatrick_scale:!1,category:"symbols"},cool:{keywords:["words","blue-square"],"char":"🆒",fitzpatrick_scale:!1,category:"symbols"},"new":{keywords:["blue-square","words","start"],"char":"🆕",fitzpatrick_scale:!1,category:"symbols"},free:{keywords:["blue-square","words"],"char":"🆓",fitzpatrick_scale:!1,category:"symbols"},zero:{keywords:["0","numbers","blue-square","null"],"char":"0⃣",fitzpatrick_scale:!1,category:"symbols"},one:{keywords:["blue-square","numbers","1"],"char":"1⃣",fitzpatrick_scale:!1,category:"symbols"},two:{keywords:["numbers","2","prime","blue-square"],"char":"2⃣",fitzpatrick_scale:!1,category:"symbols"},three:{keywords:["3","numbers","prime","blue-square"],"char":"3⃣",fitzpatrick_scale:!1,category:"symbols"},four:{keywords:["4","numbers","blue-square"],"char":"4⃣",fitzpatrick_scale:!1,category:"symbols"},five:{keywords:["5","numbers","blue-square","prime"],"char":"5⃣",fitzpatrick_scale:!1,category:"symbols"},six:{keywords:["6","numbers","blue-square"],"char":"6⃣",fitzpatrick_scale:!1,category:"symbols"},seven:{keywords:["7","numbers","blue-square","prime"],"char":"7⃣",fitzpatrick_scale:!1,category:"symbols"},eight:{keywords:["8","blue-square","numbers"],"char":"8⃣",fitzpatrick_scale:!1,category:"symbols"},nine:{keywords:["blue-square","numbers","9"],"char":"9⃣",fitzpatrick_scale:!1,category:"symbols"},keycap_ten:{keywords:["numbers","10","blue-square"],"char":"🔟",fitzpatrick_scale:!1,category:"symbols"},asterisk:{keywords:["star","keycap"],"char":"*⃣",fitzpatrick_scale:!1,category:"symbols"},1234:{keywords:["numbers","blue-square"],"char":"🔢",fitzpatrick_scale:!1,category:"symbols"},eject_button:{keywords:["blue-square"],"char":"⏏️",fitzpatrick_scale:!1,category:"symbols"},arrow_forward:{keywords:["blue-square","right","direction","play"],"char":"▶️",fitzpatrick_scale:!1,category:"symbols"},pause_button:{keywords:["pause","blue-square"],"char":"⏸",fitzpatrick_scale:!1,category:"symbols"},next_track_button:{keywords:["forward","next","blue-square"],"char":"⏭",fitzpatrick_scale:!1,category:"symbols"},stop_button:{keywords:["blue-square"],"char":"⏹",fitzpatrick_scale:!1,category:"symbols"},record_button:{keywords:["blue-square"],"char":"⏺",fitzpatrick_scale:!1,category:"symbols"},play_or_pause_button:{keywords:["blue-square","play","pause"],"char":"⏯",fitzpatrick_scale:!1,category:"symbols"},previous_track_button:{keywords:["backward"],"char":"⏮",fitzpatrick_scale:!1,category:"symbols"},fast_forward:{keywords:["blue-square","play","speed","continue"],"char":"⏩",fitzpatrick_scale:!1,category:"symbols"},rewind:{keywords:["play","blue-square"],"char":"⏪",fitzpatrick_scale:!1,category:"symbols"},twisted_rightwards_arrows:{keywords:["blue-square","shuffle","music","random"],"char":"🔀",fitzpatrick_scale:!1,category:"symbols"},repeat:{keywords:["loop","record"],"char":"🔁",fitzpatrick_scale:!1,category:"symbols"},repeat_one:{keywords:["blue-square","loop"],"char":"🔂",fitzpatrick_scale:!1,category:"symbols"},arrow_backward:{keywords:["blue-square","left","direction"],"char":"◀️",fitzpatrick_scale:!1,category:"symbols"},arrow_up_small:{keywords:["blue-square","triangle","direction","point","forward","top"],"char":"🔼",fitzpatrick_scale:!1,category:"symbols"},arrow_down_small:{keywords:["blue-square","direction","bottom"],"char":"🔽",fitzpatrick_scale:!1,category:"symbols"},arrow_double_up:{keywords:["blue-square","direction","top"],"char":"⏫",fitzpatrick_scale:!1,category:"symbols"},arrow_double_down:{keywords:["blue-square","direction","bottom"],"char":"⏬",fitzpatrick_scale:!1,category:"symbols"},arrow_right:{keywords:["blue-square","next"],"char":"➡️",fitzpatrick_scale:!1,category:"symbols"},arrow_left:{keywords:["blue-square","previous","back"],"char":"⬅️",fitzpatrick_scale:!1,category:"symbols"},arrow_up:{keywords:["blue-square","continue","top","direction"],"char":"⬆️",fitzpatrick_scale:!1,category:"symbols"},arrow_down:{keywords:["blue-square","direction","bottom"],"char":"⬇️",fitzpatrick_scale:!1,category:"symbols"},arrow_upper_right:{keywords:["blue-square","point","direction","diagonal","northeast"],"char":"↗️",fitzpatrick_scale:!1,category:"symbols"},arrow_lower_right:{keywords:["blue-square","direction","diagonal","southeast"],"char":"↘️",fitzpatrick_scale:!1,category:"symbols"},arrow_lower_left:{keywords:["blue-square","direction","diagonal","southwest"],"char":"↙️",fitzpatrick_scale:!1,category:"symbols"},arrow_upper_left:{keywords:["blue-square","point","direction","diagonal","northwest"],"char":"↖️",fitzpatrick_scale:!1,category:"symbols"},arrow_up_down:{keywords:["blue-square","direction","way","vertical"],"char":"↕️",fitzpatrick_scale:!1,category:"symbols"},left_right_arrow:{keywords:["shape","direction","horizontal","sideways"],"char":"↔️",fitzpatrick_scale:!1,category:"symbols"},arrows_counterclockwise:{keywords:["blue-square","sync","cycle"],"char":"🔄",fitzpatrick_scale:!1,category:"symbols"},arrow_right_hook:{keywords:["blue-square","return","rotate","direction"],"char":"↪️",fitzpatrick_scale:!1,category:"symbols"},leftwards_arrow_with_hook:{keywords:["back","return","blue-square","undo","enter"],"char":"↩️",fitzpatrick_scale:!1,category:"symbols"},arrow_heading_up:{keywords:["blue-square","direction","top"],"char":"⤴️",fitzpatrick_scale:!1,category:"symbols"},arrow_heading_down:{keywords:["blue-square","direction","bottom"],"char":"⤵️",fitzpatrick_scale:!1,category:"symbols"},hash:{keywords:["symbol","blue-square","twitter"],"char":"#️⃣",fitzpatrick_scale:!1,category:"symbols"},information_source:{keywords:["blue-square","alphabet","letter"],"char":"",fitzpatrick_scale:!1,category:"symbols"},abc:{keywords:["blue-square","alphabet"],"char":"🔤",fitzpatrick_scale:!1,category:"symbols"},abcd:{keywords:["blue-square","alphabet"],"char":"🔡",fitzpatrick_scale:!1,category:"symbols"},capital_abcd:{keywords:["alphabet","words","blue-square"],"char":"🔠",fitzpatrick_scale:!1,category:"symbols"},symbols:{keywords:["blue-square","music","note","ampersand","percent","glyphs","characters"],"char":"🔣",fitzpatrick_scale:!1,category:"symbols"},musical_note:{keywords:["score","tone","sound"],"char":"🎵",fitzpatrick_scale:!1,category:"symbols"},notes:{keywords:["music","score"],"char":"🎶",fitzpatrick_scale:!1,category:"symbols"},wavy_dash:{keywords:["draw","line","moustache","mustache","squiggle","scribble"],"char":"〰️",fitzpatrick_scale:!1,category:"symbols"},curly_loop:{keywords:["scribble","draw","shape","squiggle"],"char":"➰",fitzpatrick_scale:!1,category:"symbols"},heavy_check_mark:{keywords:["ok","nike","answer","yes","tick"],"char":"✔️",fitzpatrick_scale:!1,category:"symbols"},arrows_clockwise:{keywords:["sync","cycle","round","repeat"],"char":"🔃",fitzpatrick_scale:!1,category:"symbols"},heavy_plus_sign:{keywords:["math","calculation","addition","more","increase"],"char":"",fitzpatrick_scale:!1,category:"symbols"},heavy_minus_sign:{keywords:["math","calculation","subtract","less"],"char":"",fitzpatrick_scale:!1,category:"symbols"},heavy_division_sign:{keywords:["divide","math","calculation"],"char":"➗",fitzpatrick_scale:!1,category:"symbols"},heavy_multiplication_x:{keywords:["math","calculation"],"char":"✖️",fitzpatrick_scale:!1,category:"symbols"},heavy_dollar_sign:{keywords:["money","sales","payment","currency","buck"],"char":"💲",fitzpatrick_scale:!1,category:"symbols"},currency_exchange:{keywords:["money","sales","dollar","travel"],"char":"💱",fitzpatrick_scale:!1,category:"symbols"},copyright:{keywords:["ip","license","circle","law","legal"],"char":"©️",fitzpatrick_scale:!1,category:"symbols"},registered:{keywords:["alphabet","circle"],"char":"®️",fitzpatrick_scale:!1,category:"symbols"},tm:{keywords:["trademark","brand","law","legal"],"char":"™️",fitzpatrick_scale:!1,category:"symbols"},end:{keywords:["words","arrow"],"char":"🔚",fitzpatrick_scale:!1,category:"symbols"},back:{keywords:["arrow","words","return"],"char":"🔙",fitzpatrick_scale:!1,category:"symbols"},on:{keywords:["arrow","words"],"char":"🔛",fitzpatrick_scale:!1,category:"symbols"},top:{keywords:["words","blue-square"],"char":"🔝",fitzpatrick_scale:!1,category:"symbols"},soon:{keywords:["arrow","words"],"char":"🔜",fitzpatrick_scale:!1,category:"symbols"},ballot_box_with_check:{keywords:["ok","agree","confirm","black-square","vote","election","yes","tick"],"char":"☑️",fitzpatrick_scale:!1,category:"symbols"},radio_button:{keywords:["input","old","music","circle"],"char":"🔘",fitzpatrick_scale:!1,category:"symbols"},white_circle:{keywords:["shape","round"],"char":"⚪",fitzpatrick_scale:!1,category:"symbols"},black_circle:{keywords:["shape","button","round"],"char":"⚫",fitzpatrick_scale:!1,category:"symbols"},red_circle:{keywords:["shape","error","danger"],"char":"🔴",fitzpatrick_scale:!1,category:"symbols"},large_blue_circle:{keywords:["shape","icon","button"],"char":"🔵",fitzpatrick_scale:!1,category:"symbols"},small_orange_diamond:{keywords:["shape","jewel","gem"],"char":"🔸",fitzpatrick_scale:!1,category:"symbols"},small_blue_diamond:{keywords:["shape","jewel","gem"],"char":"🔹",fitzpatrick_scale:!1,category:"symbols"},large_orange_diamond:{keywords:["shape","jewel","gem"],"char":"🔶",fitzpatrick_scale:!1,category:"symbols"},large_blue_diamond:{keywords:["shape","jewel","gem"],"char":"🔷",fitzpatrick_scale:!1,category:"symbols"},small_red_triangle:{keywords:["shape","direction","up","top"],"char":"🔺",fitzpatrick_scale:!1,category:"symbols"},black_small_square:{keywords:["shape","icon"],"char":"▪️",fitzpatrick_scale:!1,category:"symbols"},white_small_square:{keywords:["shape","icon"],"char":"▫️",fitzpatrick_scale:!1,category:"symbols"},black_large_square:{keywords:["shape","icon","button"],"char":"⬛",fitzpatrick_scale:!1,category:"symbols"},white_large_square:{keywords:["shape","icon","stone","button"],"char":"⬜",fitzpatrick_scale:!1,category:"symbols"},small_red_triangle_down:{keywords:["shape","direction","bottom"],"char":"🔻",fitzpatrick_scale:!1,category:"symbols"},black_medium_square:{keywords:["shape","button","icon"],"char":"◼️",fitzpatrick_scale:!1,category:"symbols"},white_medium_square:{keywords:["shape","stone","icon"],"char":"◻️",fitzpatrick_scale:!1,category:"symbols"},black_medium_small_square:{keywords:["icon","shape","button"],"char":"◾",fitzpatrick_scale:!1,category:"symbols"},white_medium_small_square:{keywords:["shape","stone","icon","button"],"char":"◽",fitzpatrick_scale:!1,category:"symbols"},black_square_button:{keywords:["shape","input","frame"],"char":"🔲",fitzpatrick_scale:!1,category:"symbols"},white_square_button:{keywords:["shape","input"],"char":"🔳",fitzpatrick_scale:!1,category:"symbols"},speaker:{keywords:["sound","volume","silence","broadcast"],"char":"🔈",fitzpatrick_scale:!1,category:"symbols"},sound:{keywords:["volume","speaker","broadcast"],"char":"🔉",fitzpatrick_scale:!1,category:"symbols"},loud_sound:{keywords:["volume","noise","noisy","speaker","broadcast"],"char":"🔊",fitzpatrick_scale:!1,category:"symbols"},mute:{keywords:["sound","volume","silence","quiet"],"char":"🔇",fitzpatrick_scale:!1,category:"symbols"},mega:{keywords:["sound","speaker","volume"],"char":"📣",fitzpatrick_scale:!1,category:"symbols"},loudspeaker:{keywords:["volume","sound"],"char":"📢",fitzpatrick_scale:!1,category:"symbols"},bell:{keywords:["sound","notification","christmas","xmas","chime"],"char":"🔔",fitzpatrick_scale:!1,category:"symbols"},no_bell:{keywords:["sound","volume","mute","quiet","silent"],"char":"🔕",fitzpatrick_scale:!1,category:"symbols"},black_joker:{keywords:["poker","cards","game","play","magic"],"char":"🃏",fitzpatrick_scale:!1,category:"symbols"},mahjong:{keywords:["game","play","chinese","kanji"],"char":"🀄",fitzpatrick_scale:!1,category:"symbols"},spades:{keywords:["poker","cards","suits","magic"],"char":"♠️",fitzpatrick_scale:!1,category:"symbols"},clubs:{keywords:["poker","cards","magic","suits"],"char":"♣️",fitzpatrick_scale:!1,category:"symbols"},hearts:{keywords:["poker","cards","magic","suits"],"char":"♥️",fitzpatrick_scale:!1,category:"symbols"},diamonds:{keywords:["poker","cards","magic","suits"],"char":"♦️",fitzpatrick_scale:!1,category:"symbols"},flower_playing_cards:{keywords:["game","sunset","red"],"char":"🎴",fitzpatrick_scale:!1,category:"symbols"},thought_balloon:{keywords:["bubble","cloud","speech","thinking","dream"],"char":"💭",fitzpatrick_scale:!1,category:"symbols"},right_anger_bubble:{keywords:["caption","speech","thinking","mad"],"char":"🗯",fitzpatrick_scale:!1,category:"symbols"},speech_balloon:{keywords:["bubble","words","message","talk","chatting"],"char":"💬",fitzpatrick_scale:!1,category:"symbols"},left_speech_bubble:{keywords:["words","message","talk","chatting"],"char":"🗨",fitzpatrick_scale:!1,category:"symbols"},clock1:{keywords:["time","late","early","schedule"],"char":"🕐",fitzpatrick_scale:!1,category:"symbols"},clock2:{keywords:["time","late","early","schedule"],"char":"🕑",fitzpatrick_scale:!1,category:"symbols"},clock3:{keywords:["time","late","early","schedule"],"char":"🕒",fitzpatrick_scale:!1,category:"symbols"},clock4:{keywords:["time","late","early","schedule"],"char":"🕓",fitzpatrick_scale:!1,category:"symbols"},clock5:{keywords:["time","late","early","schedule"],"char":"🕔",fitzpatrick_scale:!1,category:"symbols"},clock6:{keywords:["time","late","early","schedule","dawn","dusk"],"char":"🕕",fitzpatrick_scale:!1,category:"symbols"},clock7:{keywords:["time","late","early","schedule"],"char":"🕖",fitzpatrick_scale:!1,category:"symbols"},clock8:{keywords:["time","late","early","schedule"],"char":"🕗",fitzpatrick_scale:!1,category:"symbols"},clock9:{keywords:["time","late","early","schedule"],"char":"🕘",fitzpatrick_scale:!1,category:"symbols"},clock10:{keywords:["time","late","early","schedule"],"char":"🕙",fitzpatrick_scale:!1,category:"symbols"},clock11:{keywords:["time","late","early","schedule"],"char":"🕚",fitzpatrick_scale:!1,category:"symbols"},clock12:{keywords:["time","noon","midnight","midday","late","early","schedule"],"char":"🕛",fitzpatrick_scale:!1,category:"symbols"},clock130:{keywords:["time","late","early","schedule"],"char":"🕜",fitzpatrick_scale:!1,category:"symbols"},clock230:{keywords:["time","late","early","schedule"],"char":"🕝",fitzpatrick_scale:!1,category:"symbols"},clock330:{keywords:["time","late","early","schedule"],"char":"🕞",fitzpatrick_scale:!1,category:"symbols"},clock430:{keywords:["time","late","early","schedule"],"char":"🕟",fitzpatrick_scale:!1,category:"symbols"},clock530:{keywords:["time","late","early","schedule"],"char":"🕠",fitzpatrick_scale:!1,category:"symbols"},clock630:{keywords:["time","late","early","schedule"],"char":"🕡",fitzpatrick_scale:!1,category:"symbols"},clock730:{keywords:["time","late","early","schedule"],"char":"🕢",fitzpatrick_scale:!1,category:"symbols"},clock830:{keywords:["time","late","early","schedule"],"char":"🕣",fitzpatrick_scale:!1,category:"symbols"},clock930:{keywords:["time","late","early","schedule"],"char":"🕤",fitzpatrick_scale:!1,category:"symbols"},clock1030:{keywords:["time","late","early","schedule"],"char":"🕥",fitzpatrick_scale:!1,category:"symbols"},clock1130:{keywords:["time","late","early","schedule"],"char":"🕦",fitzpatrick_scale:!1,category:"symbols"},clock1230:{keywords:["time","late","early","schedule"],"char":"🕧",fitzpatrick_scale:!1,category:"symbols"},afghanistan:{keywords:["af","flag","nation","country","banner"],"char":"🇦🇫",fitzpatrick_scale:!1,category:"flags"},aland_islands:{keywords:["Åland","islands","flag","nation","country","banner"],"char":"🇦🇽",fitzpatrick_scale:!1,category:"flags"},albania:{keywords:["al","flag","nation","country","banner"],"char":"🇦🇱",fitzpatrick_scale:!1,category:"flags"},algeria:{keywords:["dz","flag","nation","country","banner"],"char":"🇩🇿",fitzpatrick_scale:!1,category:"flags"},american_samoa:{keywords:["american","ws","flag","nation","country","banner"],"char":"🇦🇸",fitzpatrick_scale:!1,category:"flags"},andorra:{keywords:["ad","flag","nation","country","banner"],"char":"🇦🇩",fitzpatrick_scale:!1,category:"flags"},angola:{keywords:["ao","flag","nation","country","banner"],"char":"🇦🇴",fitzpatrick_scale:!1,category:"flags"},anguilla:{keywords:["ai","flag","nation","country","banner"],"char":"🇦🇮",fitzpatrick_scale:!1,category:"flags"},antarctica:{keywords:["aq","flag","nation","country","banner"],"char":"🇦🇶",fitzpatrick_scale:!1,category:"flags"},antigua_barbuda:{keywords:["antigua","barbuda","flag","nation","country","banner"],"char":"🇦🇬",fitzpatrick_scale:!1,category:"flags"},argentina:{keywords:["ar","flag","nation","country","banner"],"char":"🇦🇷",fitzpatrick_scale:!1,category:"flags"},armenia:{keywords:["am","flag","nation","country","banner"],"char":"🇦🇲",fitzpatrick_scale:!1,category:"flags"},aruba:{keywords:["aw","flag","nation","country","banner"],"char":"🇦🇼",fitzpatrick_scale:!1,category:"flags"},australia:{keywords:["au","flag","nation","country","banner"],"char":"🇦🇺",fitzpatrick_scale:!1,category:"flags"},austria:{keywords:["at","flag","nation","country","banner"],"char":"🇦🇹",fitzpatrick_scale:!1,category:"flags"},azerbaijan:{keywords:["az","flag","nation","country","banner"],"char":"🇦🇿",fitzpatrick_scale:!1,category:"flags"},bahamas:{keywords:["bs","flag","nation","country","banner"],"char":"🇧🇸",fitzpatrick_scale:!1,category:"flags"},bahrain:{keywords:["bh","flag","nation","country","banner"],"char":"🇧🇭",fitzpatrick_scale:!1,category:"flags"},bangladesh:{keywords:["bd","flag","nation","country","banner"],"char":"🇧🇩",fitzpatrick_scale:!1,category:"flags"},barbados:{keywords:["bb","flag","nation","country","banner"],"char":"🇧🇧",fitzpatrick_scale:!1,category:"flags"},belarus:{keywords:["by","flag","nation","country","banner"],"char":"🇧🇾",fitzpatrick_scale:!1,category:"flags"},belgium:{keywords:["be","flag","nation","country","banner"],"char":"🇧🇪",fitzpatrick_scale:!1,category:"flags"},belize:{keywords:["bz","flag","nation","country","banner"],"char":"🇧🇿",fitzpatrick_scale:!1,category:"flags"},benin:{keywords:["bj","flag","nation","country","banner"],"char":"🇧🇯",fitzpatrick_scale:!1,category:"flags"},bermuda:{keywords:["bm","flag","nation","country","banner"],"char":"🇧🇲",fitzpatrick_scale:!1,category:"flags"},bhutan:{keywords:["bt","flag","nation","country","banner"],"char":"🇧🇹",fitzpatrick_scale:!1,category:"flags"},bolivia:{keywords:["bo","flag","nation","country","banner"],"char":"🇧🇴",fitzpatrick_scale:!1,category:"flags"},caribbean_netherlands:{keywords:["bonaire","flag","nation","country","banner"],"char":"🇧🇶",fitzpatrick_scale:!1,category:"flags"},bosnia_herzegovina:{keywords:["bosnia","herzegovina","flag","nation","country","banner"],"char":"🇧🇦",fitzpatrick_scale:!1,category:"flags"},botswana:{keywords:["bw","flag","nation","country","banner"],"char":"🇧🇼",fitzpatrick_scale:!1,category:"flags"},brazil:{keywords:["br","flag","nation","country","banner"],"char":"🇧🇷",fitzpatrick_scale:!1,category:"flags"},british_indian_ocean_territory:{keywords:["british","indian","ocean","territory","flag","nation","country","banner"],"char":"🇮🇴",fitzpatrick_scale:!1,category:"flags"},british_virgin_islands:{keywords:["british","virgin","islands","bvi","flag","nation","country","banner"],"char":"🇻🇬",fitzpatrick_scale:!1,category:"flags"},brunei:{keywords:["bn","darussalam","flag","nation","country","banner"],"char":"🇧🇳",fitzpatrick_scale:!1,category:"flags"},bulgaria:{keywords:["bg","flag","nation","country","banner"],"char":"🇧🇬",fitzpatrick_scale:!1,category:"flags"},burkina_faso:{keywords:["burkina","faso","flag","nation","country","banner"],"char":"🇧🇫",fitzpatrick_scale:!1,category:"flags"},burundi:{keywords:["bi","flag","nation","country","banner"],"char":"🇧🇮",fitzpatrick_scale:!1,category:"flags"},cape_verde:{keywords:["cabo","verde","flag","nation","country","banner"],"char":"🇨🇻",fitzpatrick_scale:!1,category:"flags"},cambodia:{keywords:["kh","flag","nation","country","banner"],"char":"🇰🇭",fitzpatrick_scale:!1,category:"flags"},cameroon:{keywords:["cm","flag","nation","country","banner"],"char":"🇨🇲",fitzpatrick_scale:!1,category:"flags"},canada:{keywords:["ca","flag","nation","country","banner"],"char":"🇨🇦",fitzpatrick_scale:!1,category:"flags"},canary_islands:{keywords:["canary","islands","flag","nation","country","banner"],"char":"🇮🇨",fitzpatrick_scale:!1,category:"flags"},cayman_islands:{keywords:["cayman","islands","flag","nation","country","banner"],"char":"🇰🇾",fitzpatrick_scale:!1,category:"flags"},central_african_republic:{keywords:["central","african","republic","flag","nation","country","banner"],"char":"🇨🇫",fitzpatrick_scale:!1,category:"flags"},chad:{keywords:["td","flag","nation","country","banner"],"char":"🇹🇩",fitzpatrick_scale:!1,category:"flags"},chile:{keywords:["flag","nation","country","banner"],"char":"🇨🇱",fitzpatrick_scale:!1,category:"flags"},cn:{keywords:["china","chinese","prc","flag","country","nation","banner"],"char":"🇨🇳",fitzpatrick_scale:!1,category:"flags"},christmas_island:{keywords:["christmas","island","flag","nation","country","banner"],"char":"🇨🇽",fitzpatrick_scale:!1,category:"flags"},cocos_islands:{keywords:["cocos","keeling","islands","flag","nation","country","banner"],"char":"🇨🇨",fitzpatrick_scale:!1,category:"flags"},colombia:{keywords:["co","flag","nation","country","banner"],"char":"🇨🇴",fitzpatrick_scale:!1,category:"flags"},comoros:{keywords:["km","flag","nation","country","banner"],"char":"🇰🇲",fitzpatrick_scale:!1,category:"flags"},congo_brazzaville:{keywords:["congo","flag","nation","country","banner"],"char":"🇨🇬",fitzpatrick_scale:!1,category:"flags"},congo_kinshasa:{keywords:["congo","democratic","republic","flag","nation","country","banner"],"char":"🇨🇩",fitzpatrick_scale:!1,category:"flags"},cook_islands:{keywords:["cook","islands","flag","nation","country","banner"],"char":"🇨🇰",fitzpatrick_scale:!1,category:"flags"},costa_rica:{keywords:["costa","rica","flag","nation","country","banner"],"char":"🇨🇷",fitzpatrick_scale:!1,category:"flags"},croatia:{keywords:["hr","flag","nation","country","banner"],"char":"🇭🇷",fitzpatrick_scale:!1,category:"flags"},cuba:{keywords:["cu","flag","nation","country","banner"],"char":"🇨🇺",fitzpatrick_scale:!1,category:"flags"},curacao:{keywords:["curaçao","flag","nation","country","banner"],"char":"🇨🇼",fitzpatrick_scale:!1,category:"flags"},cyprus:{keywords:["cy","flag","nation","country","banner"],"char":"🇨🇾",fitzpatrick_scale:!1,category:"flags"},czech_republic:{keywords:["cz","flag","nation","country","banner"],"char":"🇨🇿",fitzpatrick_scale:!1,category:"flags"},denmark:{keywords:["dk","flag","nation","country","banner"],"char":"🇩🇰",fitzpatrick_scale:!1,category:"flags"},djibouti:{keywords:["dj","flag","nation","country","banner"],"char":"🇩🇯",fitzpatrick_scale:!1,category:"flags"},dominica:{keywords:["dm","flag","nation","country","banner"],"char":"🇩🇲",fitzpatrick_scale:!1,category:"flags"},dominican_republic:{keywords:["dominican","republic","flag","nation","country","banner"],"char":"🇩🇴",fitzpatrick_scale:!1,category:"flags"},ecuador:{keywords:["ec","flag","nation","country","banner"],"char":"🇪🇨",fitzpatrick_scale:!1,category:"flags"},egypt:{keywords:["eg","flag","nation","country","banner"],"char":"🇪🇬",fitzpatrick_scale:!1,category:"flags"},el_salvador:{keywords:["el","salvador","flag","nation","country","banner"],"char":"🇸🇻",fitzpatrick_scale:!1,category:"flags"},equatorial_guinea:{keywords:["equatorial","gn","flag","nation","country","banner"],"char":"🇬🇶",fitzpatrick_scale:!1,category:"flags"},eritrea:{keywords:["er","flag","nation","country","banner"],"char":"🇪🇷",fitzpatrick_scale:!1,category:"flags"},estonia:{keywords:["ee","flag","nation","country","banner"],"char":"🇪🇪",fitzpatrick_scale:!1,category:"flags"},ethiopia:{keywords:["et","flag","nation","country","banner"],"char":"🇪🇹",fitzpatrick_scale:!1,category:"flags"},eu:{keywords:["european","union","flag","banner"],"char":"🇪🇺",fitzpatrick_scale:!1,category:"flags"},falkland_islands:{keywords:["falkland","islands","malvinas","flag","nation","country","banner"],"char":"🇫🇰",fitzpatrick_scale:!1,category:"flags"},faroe_islands:{keywords:["faroe","islands","flag","nation","country","banner"],"char":"🇫🇴",fitzpatrick_scale:!1,category:"flags"},fiji:{keywords:["fj","flag","nation","country","banner"],"char":"🇫🇯",fitzpatrick_scale:!1,category:"flags"},finland:{keywords:["fi","flag","nation","country","banner"],"char":"🇫🇮",fitzpatrick_scale:!1,category:"flags"},fr:{keywords:["banner","flag","nation","france","french","country"],"char":"🇫🇷",fitzpatrick_scale:!1,category:"flags"},french_guiana:{keywords:["french","guiana","flag","nation","country","banner"],"char":"🇬🇫",fitzpatrick_scale:!1,category:"flags"},french_polynesia:{keywords:["french","polynesia","flag","nation","country","banner"],"char":"🇵🇫",fitzpatrick_scale:!1,category:"flags"},french_southern_territories:{keywords:["french","southern","territories","flag","nation","country","banner"],"char":"🇹🇫",fitzpatrick_scale:!1,category:"flags"},gabon:{keywords:["ga","flag","nation","country","banner"],"char":"🇬🇦",fitzpatrick_scale:!1,category:"flags"},gambia:{keywords:["gm","flag","nation","country","banner"],"char":"🇬🇲",fitzpatrick_scale:!1,category:"flags"},georgia:{keywords:["ge","flag","nation","country","banner"],"char":"🇬🇪",fitzpatrick_scale:!1,category:"flags"},de:{keywords:["german","nation","flag","country","banner"],"char":"🇩🇪",fitzpatrick_scale:!1,category:"flags"},ghana:{keywords:["gh","flag","nation","country","banner"],"char":"🇬🇭",fitzpatrick_scale:!1,category:"flags"},gibraltar:{keywords:["gi","flag","nation","country","banner"],"char":"🇬🇮",fitzpatrick_scale:!1,category:"flags"},greece:{keywords:["gr","flag","nation","country","banner"],"char":"🇬🇷",fitzpatrick_scale:!1,category:"flags"},greenland:{keywords:["gl","flag","nation","country","banner"],"char":"🇬🇱",fitzpatrick_scale:!1,category:"flags"},grenada:{keywords:["gd","flag","nation","country","banner"],"char":"🇬🇩",fitzpatrick_scale:!1,category:"flags"},guadeloupe:{keywords:["gp","flag","nation","country","banner"],"char":"🇬🇵",fitzpatrick_scale:!1,category:"flags"},guam:{keywords:["gu","flag","nation","country","banner"],"char":"🇬🇺",fitzpatrick_scale:!1,category:"flags"},guatemala:{keywords:["gt","flag","nation","country","banner"],"char":"🇬🇹",fitzpatrick_scale:!1,category:"flags"},guernsey:{keywords:["gg","flag","nation","country","banner"],"char":"🇬🇬",fitzpatrick_scale:!1,category:"flags"},guinea:{keywords:["gn","flag","nation","country","banner"],"char":"🇬🇳",fitzpatrick_scale:!1,category:"flags"},guinea_bissau:{keywords:["gw","bissau","flag","nation","country","banner"],"char":"🇬🇼",fitzpatrick_scale:!1,category:"flags"},guyana:{keywords:["gy","flag","nation","country","banner"],"char":"🇬🇾",fitzpatrick_scale:!1,category:"flags"},haiti:{keywords:["ht","flag","nation","country","banner"],"char":"🇭🇹",fitzpatrick_scale:!1,category:"flags"},honduras:{keywords:["hn","flag","nation","country","banner"],"char":"🇭🇳",fitzpatrick_scale:!1,category:"flags"},hong_kong:{keywords:["hong","kong","flag","nation","country","banner"],"char":"🇭🇰",fitzpatrick_scale:!1,category:"flags"},hungary:{keywords:["hu","flag","nation","country","banner"],"char":"🇭🇺",fitzpatrick_scale:!1,category:"flags"},iceland:{keywords:["is","flag","nation","country","banner"],"char":"🇮🇸",fitzpatrick_scale:!1,category:"flags"},india:{keywords:["in","flag","nation","country","banner"],"char":"🇮🇳",fitzpatrick_scale:!1,category:"flags"},indonesia:{keywords:["flag","nation","country","banner"],"char":"🇮🇩",fitzpatrick_scale:!1,category:"flags"},iran:{keywords:["iran,","islamic","republic","flag","nation","country","banner"],"char":"🇮🇷",fitzpatrick_scale:!1,category:"flags"},iraq:{keywords:["iq","flag","nation","country","banner"],"char":"🇮🇶",fitzpatrick_scale:!1,category:"flags"},ireland:{keywords:["ie","flag","nation","country","banner"],"char":"🇮🇪",fitzpatrick_scale:!1,category:"flags"},isle_of_man:{keywords:["isle","man","flag","nation","country","banner"],"char":"🇮🇲",fitzpatrick_scale:!1,category:"flags"},israel:{keywords:["il","flag","nation","country","banner"],"char":"🇮🇱",fitzpatrick_scale:!1,category:"flags"},it:{keywords:["italy","flag","nation","country","banner"],"char":"🇮🇹",fitzpatrick_scale:!1,category:"flags"},cote_divoire:{keywords:["ivory","coast","flag","nation","country","banner"],"char":"🇨🇮",fitzpatrick_scale:!1,category:"flags"},jamaica:{keywords:["jm","flag","nation","country","banner"],"char":"🇯🇲",fitzpatrick_scale:!1,category:"flags"},jp:{keywords:["japanese","nation","flag","country","banner"],"char":"🇯🇵",fitzpatrick_scale:!1,category:"flags"},jersey:{keywords:["je","flag","nation","country","banner"],"char":"🇯🇪",fitzpatrick_scale:!1,category:"flags"},jordan:{keywords:["jo","flag","nation","country","banner"],"char":"🇯🇴",fitzpatrick_scale:!1,category:"flags"},kazakhstan:{keywords:["kz","flag","nation","country","banner"],"char":"🇰🇿",fitzpatrick_scale:!1,category:"flags"},kenya:{keywords:["ke","flag","nation","country","banner"],"char":"🇰🇪",fitzpatrick_scale:!1,category:"flags"},kiribati:{keywords:["ki","flag","nation","country","banner"],"char":"🇰🇮",fitzpatrick_scale:!1,category:"flags"},kosovo:{keywords:["xk","flag","nation","country","banner"],"char":"🇽🇰",fitzpatrick_scale:!1,category:"flags"},kuwait:{keywords:["kw","flag","nation","country","banner"],"char":"🇰🇼",fitzpatrick_scale:!1,category:"flags"},kyrgyzstan:{keywords:["kg","flag","nation","country","banner"],"char":"🇰🇬",fitzpatrick_scale:!1,category:"flags"},laos:{keywords:["lao","democratic","republic","flag","nation","country","banner"],"char":"🇱🇦",fitzpatrick_scale:!1,category:"flags"},latvia:{keywords:["lv","flag","nation","country","banner"],"char":"🇱🇻",fitzpatrick_scale:!1,category:"flags"},lebanon:{keywords:["lb","flag","nation","country","banner"],"char":"🇱🇧",fitzpatrick_scale:!1,category:"flags"},lesotho:{keywords:["ls","flag","nation","country","banner"],"char":"🇱🇸",fitzpatrick_scale:!1,category:"flags"},liberia:{keywords:["lr","flag","nation","country","banner"],"char":"🇱🇷",fitzpatrick_scale:!1,category:"flags"},libya:{keywords:["ly","flag","nation","country","banner"],"char":"🇱🇾",fitzpatrick_scale:!1,category:"flags"},liechtenstein:{keywords:["li","flag","nation","country","banner"],"char":"🇱🇮",fitzpatrick_scale:!1,category:"flags"},lithuania:{keywords:["lt","flag","nation","country","banner"],"char":"🇱🇹",fitzpatrick_scale:!1,category:"flags"},luxembourg:{keywords:["lu","flag","nation","country","banner"],"char":"🇱🇺",fitzpatrick_scale:!1,category:"flags"},macau:{keywords:["macao","flag","nation","country","banner"],"char":"🇲🇴",fitzpatrick_scale:!1,category:"flags"},macedonia:{keywords:["macedonia,","flag","nation","country","banner"],"char":"🇲🇰",fitzpatrick_scale:!1,category:"flags"},madagascar:{keywords:["mg","flag","nation","country","banner"],"char":"🇲🇬",fitzpatrick_scale:!1,category:"flags"},malawi:{keywords:["mw","flag","nation","country","banner"],"char":"🇲🇼",fitzpatrick_scale:!1,category:"flags"},malaysia:{keywords:["my","flag","nation","country","banner"],"char":"🇲🇾",fitzpatrick_scale:!1,category:"flags"},maldives:{keywords:["mv","flag","nation","country","banner"],"char":"🇲🇻",fitzpatrick_scale:!1,category:"flags"},mali:{keywords:["ml","flag","nation","country","banner"],"char":"🇲🇱",fitzpatrick_scale:!1,category:"flags"},malta:{keywords:["mt","flag","nation","country","banner"],"char":"🇲🇹",fitzpatrick_scale:!1,category:"flags"},marshall_islands:{keywords:["marshall","islands","flag","nation","country","banner"],"char":"🇲🇭",fitzpatrick_scale:!1,category:"flags"},martinique:{keywords:["mq","flag","nation","country","banner"],"char":"🇲🇶",fitzpatrick_scale:!1,category:"flags"},mauritania:{keywords:["mr","flag","nation","country","banner"],"char":"🇲🇷",fitzpatrick_scale:!1,category:"flags"},mauritius:{keywords:["mu","flag","nation","country","banner"],"char":"🇲🇺",fitzpatrick_scale:!1,category:"flags"},mayotte:{keywords:["yt","flag","nation","country","banner"],"char":"🇾🇹",fitzpatrick_scale:!1,category:"flags"},mexico:{keywords:["mx","flag","nation","country","banner"],"char":"🇲🇽",fitzpatrick_scale:!1,category:"flags"},micronesia:{keywords:["micronesia,","federated","states","flag","nation","country","banner"],"char":"🇫🇲",fitzpatrick_scale:!1,category:"flags"},moldova:{keywords:["moldova,","republic","flag","nation","country","banner"],"char":"🇲🇩",fitzpatrick_scale:!1,category:"flags"},monaco:{keywords:["mc","flag","nation","country","banner"],"char":"🇲🇨",fitzpatrick_scale:!1,category:"flags"},mongolia:{keywords:["mn","flag","nation","country","banner"],"char":"🇲🇳",fitzpatrick_scale:!1,category:"flags"},montenegro:{keywords:["me","flag","nation","country","banner"],"char":"🇲🇪",fitzpatrick_scale:!1,category:"flags"},montserrat:{keywords:["ms","flag","nation","country","banner"],"char":"🇲🇸",fitzpatrick_scale:!1,category:"flags"},morocco:{keywords:["ma","flag","nation","country","banner"],"char":"🇲🇦",fitzpatrick_scale:!1,category:"flags"},mozambique:{keywords:["mz","flag","nation","country","banner"],"char":"🇲🇿",fitzpatrick_scale:!1,category:"flags"},myanmar:{keywords:["mm","flag","nation","country","banner"],"char":"🇲🇲",fitzpatrick_scale:!1,category:"flags"},namibia:{keywords:["na","flag","nation","country","banner"],"char":"🇳🇦",fitzpatrick_scale:!1,category:"flags"},nauru:{keywords:["nr","flag","nation","country","banner"],"char":"🇳🇷",fitzpatrick_scale:!1,category:"flags"},nepal:{keywords:["np","flag","nation","country","banner"],"char":"🇳🇵",fitzpatrick_scale:!1,category:"flags"},netherlands:{keywords:["nl","flag","nation","country","banner"],"char":"🇳🇱",fitzpatrick_scale:!1,category:"flags"},new_caledonia:{keywords:["new","caledonia","flag","nation","country","banner"],"char":"🇳🇨",fitzpatrick_scale:!1,category:"flags"},new_zealand:{keywords:["new","zealand","flag","nation","country","banner"],"char":"🇳🇿",fitzpatrick_scale:!1,category:"flags"},nicaragua:{keywords:["ni","flag","nation","country","banner"],"char":"🇳🇮",fitzpatrick_scale:!1,category:"flags"},niger:{keywords:["ne","flag","nation","country","banner"],"char":"🇳🇪",fitzpatrick_scale:!1,category:"flags"},nigeria:{keywords:["flag","nation","country","banner"],"char":"🇳🇬",fitzpatrick_scale:!1,category:"flags"},niue:{keywords:["nu","flag","nation","country","banner"],"char":"🇳🇺",fitzpatrick_scale:!1,category:"flags"},norfolk_island:{keywords:["norfolk","island","flag","nation","country","banner"],"char":"🇳🇫",fitzpatrick_scale:!1,category:"flags"},northern_mariana_islands:{keywords:["northern","mariana","islands","flag","nation","country","banner"],"char":"🇲🇵",fitzpatrick_scale:!1,category:"flags"},north_korea:{keywords:["north","korea","nation","flag","country","banner"],"char":"🇰🇵",fitzpatrick_scale:!1,category:"flags"},norway:{keywords:["no","flag","nation","country","banner"],"char":"🇳🇴",fitzpatrick_scale:!1,category:"flags"},oman:{keywords:["om_symbol","flag","nation","country","banner"],"char":"🇴🇲",fitzpatrick_scale:!1,category:"flags"},pakistan:{keywords:["pk","flag","nation","country","banner"],"char":"🇵🇰",fitzpatrick_scale:!1,category:"flags"},palau:{keywords:["pw","flag","nation","country","banner"],"char":"🇵🇼",fitzpatrick_scale:!1,category:"flags"},palestinian_territories:{keywords:["palestine","palestinian","territories","flag","nation","country","banner"],"char":"🇵🇸",fitzpatrick_scale:!1,category:"flags"},panama:{keywords:["pa","flag","nation","country","banner"],"char":"🇵🇦",fitzpatrick_scale:!1,category:"flags"},papua_new_guinea:{keywords:["papua","new","guinea","flag","nation","country","banner"],"char":"🇵🇬",fitzpatrick_scale:!1,category:"flags"},paraguay:{keywords:["py","flag","nation","country","banner"],"char":"🇵🇾",fitzpatrick_scale:!1,category:"flags"},peru:{keywords:["pe","flag","nation","country","banner"],"char":"🇵🇪",fitzpatrick_scale:!1,category:"flags"},philippines:{keywords:["ph","flag","nation","country","banner"],"char":"🇵🇭",fitzpatrick_scale:!1,category:"flags"},pitcairn_islands:{keywords:["pitcairn","flag","nation","country","banner"],"char":"🇵🇳",fitzpatrick_scale:!1,category:"flags"},poland:{keywords:["pl","flag","nation","country","banner"],"char":"🇵🇱",fitzpatrick_scale:!1,category:"flags"},portugal:{keywords:["pt","flag","nation","country","banner"],"char":"🇵🇹",fitzpatrick_scale:!1,category:"flags"},puerto_rico:{keywords:["puerto","rico","flag","nation","country","banner"],"char":"🇵🇷",fitzpatrick_scale:!1,category:"flags"},qatar:{keywords:["qa","flag","nation","country","banner"],"char":"🇶🇦",fitzpatrick_scale:!1,category:"flags"},reunion:{keywords:["réunion","flag","nation","country","banner"],"char":"🇷🇪",fitzpatrick_scale:!1,category:"flags"},romania:{keywords:["ro","flag","nation","country","banner"],"char":"🇷🇴",fitzpatrick_scale:!1,category:"flags"},ru:{keywords:["russian","federation","flag","nation","country","banner"],"char":"🇷🇺",fitzpatrick_scale:!1,category:"flags"},rwanda:{keywords:["rw","flag","nation","country","banner"],"char":"🇷🇼",fitzpatrick_scale:!1,category:"flags"},st_barthelemy:{keywords:["saint","barthélemy","flag","nation","country","banner"],"char":"🇧🇱",fitzpatrick_scale:!1,category:"flags"},st_helena:{keywords:["saint","helena","ascension","tristan","cunha","flag","nation","country","banner"],"char":"🇸🇭",fitzpatrick_scale:!1,category:"flags"},st_kitts_nevis:{keywords:["saint","kitts","nevis","flag","nation","country","banner"],"char":"🇰🇳",fitzpatrick_scale:!1,category:"flags"},st_lucia:{keywords:["saint","lucia","flag","nation","country","banner"],"char":"🇱🇨",fitzpatrick_scale:!1,category:"flags"},st_pierre_miquelon:{keywords:["saint","pierre","miquelon","flag","nation","country","banner"],"char":"🇵🇲",fitzpatrick_scale:!1,category:"flags"},st_vincent_grenadines:{keywords:["saint","vincent","grenadines","flag","nation","country","banner"],"char":"🇻🇨",fitzpatrick_scale:!1,category:"flags"},samoa:{keywords:["ws","flag","nation","country","banner"],"char":"🇼🇸",fitzpatrick_scale:!1,category:"flags"},san_marino:{keywords:["san","marino","flag","nation","country","banner"],"char":"🇸🇲",fitzpatrick_scale:!1,category:"flags"},sao_tome_principe:{keywords:["sao","tome","principe","flag","nation","country","banner"],"char":"🇸🇹",fitzpatrick_scale:!1,category:"flags"},saudi_arabia:{keywords:["flag","nation","country","banner"],"char":"🇸🇦",fitzpatrick_scale:!1,category:"flags"},senegal:{keywords:["sn","flag","nation","country","banner"],"char":"🇸🇳",fitzpatrick_scale:!1,category:"flags"},serbia:{keywords:["rs","flag","nation","country","banner"],"char":"🇷🇸",fitzpatrick_scale:!1,category:"flags"},seychelles:{keywords:["sc","flag","nation","country","banner"],"char":"🇸🇨",fitzpatrick_scale:!1,category:"flags"},sierra_leone:{keywords:["sierra","leone","flag","nation","country","banner"],"char":"🇸🇱",fitzpatrick_scale:!1,category:"flags"},singapore:{keywords:["sg","flag","nation","country","banner"],"char":"🇸🇬",fitzpatrick_scale:!1,category:"flags"},sint_maarten:{keywords:["sint","maarten","dutch","flag","nation","country","banner"],"char":"🇸🇽",fitzpatrick_scale:!1,category:"flags"},slovakia:{keywords:["sk","flag","nation","country","banner"],"char":"🇸🇰",fitzpatrick_scale:!1,category:"flags"},slovenia:{keywords:["si","flag","nation","country","banner"],"char":"🇸🇮",fitzpatrick_scale:!1,category:"flags"},solomon_islands:{keywords:["solomon","islands","flag","nation","country","banner"],"char":"🇸🇧",fitzpatrick_scale:!1,category:"flags"},somalia:{keywords:["so","flag","nation","country","banner"],"char":"🇸🇴",fitzpatrick_scale:!1,category:"flags"},south_africa:{keywords:["south","africa","flag","nation","country","banner"],"char":"🇿🇦",fitzpatrick_scale:!1,category:"flags"},south_georgia_south_sandwich_islands:{keywords:["south","georgia","sandwich","islands","flag","nation","country","banner"],"char":"🇬🇸",fitzpatrick_scale:!1,category:"flags"},kr:{keywords:["south","korea","nation","flag","country","banner"],"char":"🇰🇷",fitzpatrick_scale:!1,category:"flags"},south_sudan:{keywords:["south","sd","flag","nation","country","banner"],"char":"🇸🇸",fitzpatrick_scale:!1,category:"flags"},es:{keywords:["spain","flag","nation","country","banner"],"char":"🇪🇸",fitzpatrick_scale:!1,category:"flags"},sri_lanka:{keywords:["sri","lanka","flag","nation","country","banner"],"char":"🇱🇰",fitzpatrick_scale:!1,category:"flags"},sudan:{keywords:["sd","flag","nation","country","banner"],"char":"🇸🇩",fitzpatrick_scale:!1,category:"flags"},suriname:{keywords:["sr","flag","nation","country","banner"],"char":"🇸🇷",fitzpatrick_scale:!1,category:"flags"},swaziland:{keywords:["sz","flag","nation","country","banner"],"char":"🇸🇿",fitzpatrick_scale:!1,category:"flags"},sweden:{keywords:["se","flag","nation","country","banner"],"char":"🇸🇪",fitzpatrick_scale:!1,category:"flags"},switzerland:{keywords:["ch","flag","nation","country","banner"],"char":"🇨🇭",fitzpatrick_scale:!1,category:"flags"},syria:{keywords:["syrian","arab","republic","flag","nation","country","banner"],"char":"🇸🇾",fitzpatrick_scale:!1,category:"flags"},taiwan:{keywords:["tw","flag","nation","country","banner"],"char":"🇹🇼",fitzpatrick_scale:!1,category:"flags"},tajikistan:{keywords:["tj","flag","nation","country","banner"],"char":"🇹🇯",fitzpatrick_scale:!1,category:"flags"},tanzania:{keywords:["tanzania,","united","republic","flag","nation","country","banner"],"char":"🇹🇿",fitzpatrick_scale:!1,category:"flags"},thailand:{keywords:["th","flag","nation","country","banner"],"char":"🇹🇭",fitzpatrick_scale:!1,category:"flags"},timor_leste:{keywords:["timor","leste","flag","nation","country","banner"],"char":"🇹🇱",fitzpatrick_scale:!1,category:"flags"},togo:{keywords:["tg","flag","nation","country","banner"],"char":"🇹🇬",fitzpatrick_scale:!1,category:"flags"},tokelau:{keywords:["tk","flag","nation","country","banner"],"char":"🇹🇰",fitzpatrick_scale:!1,category:"flags"},tonga:{keywords:["to","flag","nation","country","banner"],"char":"🇹🇴",fitzpatrick_scale:!1,category:"flags"},trinidad_tobago:{keywords:["trinidad","tobago","flag","nation","country","banner"],"char":"🇹🇹",fitzpatrick_scale:!1,category:"flags"},tunisia:{keywords:["tn","flag","nation","country","banner"],"char":"🇹🇳",fitzpatrick_scale:!1,category:"flags"},tr:{keywords:["turkey","flag","nation","country","banner"],"char":"🇹🇷",fitzpatrick_scale:!1,category:"flags"},turkmenistan:{keywords:["flag","nation","country","banner"],"char":"🇹🇲",fitzpatrick_scale:!1,category:"flags"},turks_caicos_islands:{keywords:["turks","caicos","islands","flag","nation","country","banner"],"char":"🇹🇨",fitzpatrick_scale:!1,category:"flags"},tuvalu:{keywords:["flag","nation","country","banner"],"char":"🇹🇻",fitzpatrick_scale:!1,category:"flags"},uganda:{keywords:["ug","flag","nation","country","banner"],"char":"🇺🇬",fitzpatrick_scale:!1,category:"flags"},ukraine:{keywords:["ua","flag","nation","country","banner"],"char":"🇺🇦",fitzpatrick_scale:!1,category:"flags"},united_arab_emirates:{keywords:["united","arab","emirates","flag","nation","country","banner"],"char":"🇦🇪",fitzpatrick_scale:!1,category:"flags"},uk:{keywords:["united","kingdom","great","britain","northern","ireland","flag","nation","country","banner","british","UK","english","england","union jack"],"char":"🇬🇧",fitzpatrick_scale:!1,category:"flags"},england:{keywords:["flag","english"],"char":"🏴󠁧󠁢󠁥󠁮󠁧󠁿",fitzpatrick_scale:!1,category:"flags"},scotland:{keywords:["flag","scottish"],"char":"🏴󠁧󠁢󠁳󠁣󠁴󠁿",fitzpatrick_scale:!1,category:"flags"},wales:{keywords:["flag","welsh"],"char":"🏴󠁧󠁢󠁷󠁬󠁳󠁿",fitzpatrick_scale:!1,category:"flags"},us:{keywords:["united","states","america","flag","nation","country","banner"],"char":"🇺🇸",fitzpatrick_scale:!1,category:"flags"},us_virgin_islands:{keywords:["virgin","islands","us","flag","nation","country","banner"],"char":"🇻🇮",fitzpatrick_scale:!1,category:"flags"},uruguay:{keywords:["uy","flag","nation","country","banner"],"char":"🇺🇾",fitzpatrick_scale:!1,category:"flags"},uzbekistan:{keywords:["uz","flag","nation","country","banner"],"char":"🇺🇿",fitzpatrick_scale:!1,category:"flags"},vanuatu:{keywords:["vu","flag","nation","country","banner"],"char":"🇻🇺",fitzpatrick_scale:!1,category:"flags"},vatican_city:{keywords:["vatican","city","flag","nation","country","banner"],"char":"🇻🇦",fitzpatrick_scale:!1,category:"flags"},venezuela:{keywords:["ve","bolivarian","republic","flag","nation","country","banner"],"char":"🇻🇪",fitzpatrick_scale:!1,category:"flags"},vietnam:{keywords:["viet","nam","flag","nation","country","banner"],"char":"🇻🇳",fitzpatrick_scale:!1,category:"flags"},wallis_futuna:{keywords:["wallis","futuna","flag","nation","country","banner"],"char":"🇼🇫",fitzpatrick_scale:!1,category:"flags"},western_sahara:{keywords:["western","sahara","flag","nation","country","banner"],"char":"🇪🇭",fitzpatrick_scale:!1,category:"flags"},yemen:{keywords:["ye","flag","nation","country","banner"],"char":"🇾🇪",fitzpatrick_scale:!1,category:"flags"},zambia:{keywords:["zm","flag","nation","country","banner"],"char":"🇿🇲",fitzpatrick_scale:!1,category:"flags"},zimbabwe:{keywords:["zw","flag","nation","country","banner"],"char":"🇿🇼",fitzpatrick_scale:!1,category:"flags"}})
});
;/*!src/components/Tinymce.tsx*/
amis.define("82fac39",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=e("node_modules/tslib/tslib"),o=n.__importDefault(e("node_modules/react/index")),i=n.__importDefault(e("node_modules/tinymce/tinymce"));e("node_modules/tinymce/themes/silver/index"),e("node_modules/tinymce/plugins/advlist/index"),e("node_modules/tinymce/plugins/autolink/index"),e("node_modules/tinymce/plugins/lists/index"),e("node_modules/tinymce/plugins/link/index"),e("node_modules/tinymce/plugins/image/index"),e("node_modules/tinymce/plugins/charmap/index"),e("node_modules/tinymce/plugins/print/index"),e("node_modules/tinymce/plugins/preview/index"),e("node_modules/tinymce/plugins/anchor/index"),e("node_modules/tinymce/plugins/searchreplace/index"),e("node_modules/tinymce/plugins/visualblocks/index"),e("node_modules/tinymce/plugins/code/index"),e("node_modules/tinymce/plugins/fullscreen/index"),e("node_modules/tinymce/plugins/insertdatetime/index"),e("node_modules/tinymce/plugins/media/index"),e("node_modules/tinymce/plugins/table/index"),e("node_modules/tinymce/plugins/paste/index"),e("node_modules/tinymce/plugins/help/index"),e("node_modules/tinymce/plugins/wordcount/index"),e("node_modules/tinymce/plugins/hr/index"),e("node_modules/tinymce/plugins/pagebreak/index"),e("node_modules/tinymce/plugins/spellchecker/index"),e("node_modules/tinymce/plugins/visualchars/index"),e("node_modules/tinymce/plugins/template/index"),e("node_modules/tinymce/plugins/nonbreaking/index"),e("node_modules/tinymce/plugins/emoticons/index"),e("node_modules/tinymce/plugins/emoticons/js/emojis");var r=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elementRef=o.default.createRef(),t}return n.__extends(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props.locale;this.config=n.__assign(n.__assign({inline:!1,skin:!1,content_css:!1,height:400,language:t&&"zh-cn"!==t?"en":"zh_CN",plugins:["advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker","searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking","table emoticons template paste help"],toolbar:"undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media fullpage | forecolor backcolor emoticons | help",menu:{file:{title:"File",items:"newdocument restoredraft | preview | print "},edit:{title:"Edit",items:"undo redo | cut copy paste | selectall | searchreplace"},view:{title:"View",items:"code | visualaid visualchars visualblocks | spellchecker | preview fullscreen"},insert:{title:"Insert",items:"image link media 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 | code wordcount"},table:{title:"Table",items:"inserttable | cell row column | tableprops deletetable"},help:{title:"Help",items:"help"}},paste_data_images:!0},this.props.config),{target:this.elementRef.current,readOnly:this.props.disabled,setup:function(t){e.editor=t,t.on("init",function(n){e.initEditor(n,t)})}}),i.default.init(this.config)},t.prototype.componentDidUpdate=function(e){var t,n=this.props;n.model!==e.model&&n.model!==this.currentContent&&(null===(t=this.editor)||void 0===t?void 0:t.setContent(n.model||""))},t.prototype.componentWillUnmount=function(){i.default.remove(this.editor)},t.prototype.initEditor=function(e,t){var n=this,o=this.props,i=o.model,r=o.onModelChange,l=o.outputFormat,a=o.onFocus,s=o.onBlur,d=i||"";t.setContent(d),r&&t.on("change keyup setcontent",function(){var e=t.getContent({format:l});e!==n.currentContent&&(n.currentContent=e,r(e))}),a&&t.on("focus",a),s&&t.on("blur",s)},t.prototype.render=function(){return o.default.createElement("textarea",{ref:this.elementRef})},t.defaultProps={outputFormat:"html"},t}(o.default.Component);t.default=r,i.default.addI18n("zh_CN",{Redo:"重做",Undo:"撤销",Cut:"剪切",Copy:"复制",Paste:"粘贴","Select all":"全选","New document":"新文件",Ok:"确定",Cancel:"取消","Visual aids":"网格线",Bold:"粗体",Italic:"斜体",Underline:"下划线",Strikethrough:"删除线",Superscript:"上标",Subscript:"下标","Clear formatting":"清除格式","Align left":"左边对齐","Align center":"中间对齐","Align right":"右边对齐",Justify:"两端对齐","Bullet list":"项目符号","Numbered list":"编号列表","Decrease indent":"减少缩进","Increase indent":"增加缩进",Close:"关闭",Formats:"格式","Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.":"你的浏览器不支持打开剪贴板请使用Ctrl+X/C/V等快捷键。",Headers:"标题","Header 1":"标题1","Header 2":"标题2","Header 3":"标题3","Header 4":"标题4","Header 5":"标题5","Header 6":"标题6",Headings:"标题","Heading 1":"标题1","Heading 2":"标题2","Heading 3":"标题3","Heading 4":"标题4","Heading 5":"标题5","Heading 6":"标题6",Preformatted:"预先格式化的",Div:"Div",Pre:"Pre",Code:"代码",Paragraph:"段落",Blockquote:"引文区块",Inline:"文本",Blocks:"基块","Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.":"当前为纯文本粘贴模式,再次点击可以回到普通粘贴模式。",Fonts:"字体","Font Sizes":"字号",Class:"类型","Browse for an image":"浏览图像",OR:"或","Drop an image here":"拖放一张图像至此",Upload:"上传",Block:"块",Align:"对齐",Default:"默认",Circle:"空心圆",Disc:"实心圆",Square:"方块","Lower Alpha":"小写英文字母","Lower Greek":"小写希腊字母","Lower Roman":"小写罗马字母","Upper Alpha":"大写英文字母","Upper Roman":"大写罗马字母","Anchor...":"锚点...",Name:"名称",Id:"标识符","Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.":"标识符应该以字母开头,后跟字母、数字、破折号、点、冒号或下划线。","You have unsaved changes are you sure you want to navigate away?":"你还有文档尚未保存,确定要离开?","Restore last draft":"恢复上次的草稿","Special character...":"特殊字符...","Source code":"源代码","Insert/Edit code sample":"插入/编辑代码示例",Language:"语言","Code sample...":"示例代码...","Color Picker":"选色器",R:"R",G:"G",B:"B","Left to right":"从左到右","Right to left":"从右到左","Emoticons...":"表情符号...","Metadata and Document Properties":"元数据和文档属性",Title:"标题",Keywords:"关键词",Description:"描述",Robots:"机器人",Author:"作者",Encoding:"编码",Fullscreen:"全屏",Action:"操作",Shortcut:"快捷键",Help:"帮助",Address:"地址","Focus to menubar":"移动焦点到菜单栏","Focus to toolbar":"移动焦点到工具栏","Focus to element path":"移动焦点到元素路径","Focus to contextual toolbar":"移动焦点到上下文菜单","Insert link (if link plugin activated)":"插入链接 (如果链接插件已激活)","Save (if save plugin activated)":"保存(如果保存插件已激活)","Find (if searchreplace plugin activated)":"查找(如果查找替换插件已激活)","Plugins installed ({0}):":"已安装插件 ({0}):","Premium plugins:":"优秀插件:","Learn more...":"了解更多...","You are using {0}":"你正在使用 {0}",Plugins:"插件","Handy Shortcuts":"快捷键","Horizontal line":"水平分割线","Insert/edit image":"插入/编辑图片","Image description":"图片描述",Source:"地址",Dimensions:"大小","Constrain proportions":"保持纵横比",General:"普通",Advanced:"高级",Style:"样式","Vertical space":"垂直边距","Horizontal space":"水平边距",Border:"边框","Insert image":"插入图片","Image...":"图片...","Image list":"图片列表","Rotate counterclockwise":"逆时针旋转","Rotate clockwise":"顺时针旋转","Flip vertically":"垂直翻转","Flip horizontally":"水平翻转","Edit image":"编辑图片","Image options":"图片选项","Zoom in":"放大","Zoom out":"缩小",Crop:"裁剪",Resize:"调整大小",Orientation:"方向",Brightness:"亮度",Sharpen:"锐化",Contrast:"对比度","Color levels":"颜色层次",Gamma:"伽马值",Invert:"反转",Apply:"应用",Back:"后退","Insert date/time":"插入日期/时间","Date/time":"日期/时间","Insert/Edit Link":"插入/编辑链接","Insert/edit link":"插入/编辑链接","Text to display":"显示文字",Url:"地址","Open link in...":"链接打开位置...","Current window":"当前窗口",None:"无","New window":"在新窗口打开","Remove link":"删除链接",Anchors:"锚点","Link...":"链接...","Paste or type a link":"粘贴或输入链接","The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?":"你所填写的URL地址为邮件地址需要加上mailto:前缀吗?","The URL you entered seems to be an external link. Do you want to add the required http:// prefix?":"你所填写的URL地址属于外部链接需要加上http://:前缀吗?","Link list":"链接列表","Insert video":"插入视频","Insert/edit video":"插入/编辑视频","Insert/edit media":"插入/编辑媒体","Alternative source":"镜像","Alternative source URL":"替代来源网址","Media poster (Image URL)":"封面(图片地址)","Paste your embed code below:":"将内嵌代码粘贴在下面:",Embed:"内嵌","Media...":"多媒体...","Nonbreaking space":"不间断空格","Page break":"分页符","Paste as text":"粘贴为文本",Preview:"预览","Print...":"打印...",Save:"保存",Find:"查找","Replace with":"替换为",Replace:"替换","Replace all":"全部替换",Previous:"上一个",Next:"下一个","Find and replace...":"查找并替换...","Could not find the specified string.":"未找到搜索内容.","Match case":"区分大小写","Find whole words only":"全字匹配","Spell check":"拼写检查",Ignore:"忽略","Ignore all":"全部忽略",Finish:"完成","Add to Dictionary":"添加到字典","Insert table":"插入表格","Table properties":"表格属性","Delete table":"删除表格",Cell:"单元格",Row:"行",Column:"列","Cell properties":"单元格属性","Merge cells":"合并单元格","Split cell":"拆分单元格","Insert row before":"在上方插入","Insert row after":"在下方插入","Delete row":"删除行","Row properties":"行属性","Cut row":"剪切行","Copy row":"复制行","Paste row before":"粘贴到上方","Paste row after":"粘贴到下方","Insert column before":"在左侧插入","Insert column after":"在右侧插入","Delete column":"删除列",Cols:"列",Rows:"行",Width:"宽",Height:"高","Cell spacing":"单元格外间距","Cell padding":"单元格内边距","Show caption":"显示标题",Left:"左对齐",Center:"居中",Right:"右对齐","Cell type":"单元格类型",Scope:"范围",Alignment:"对齐方式","H Align":"水平对齐","V Align":"垂直对齐",Top:"顶部对齐",Middle:"垂直居中",Bottom:"底部对齐","Header cell":"表头单元格","Row group":"行组","Column group":"列组","Row type":"行类型",Header:"表头",Body:"表体",Footer:"表尾","Border color":"边框颜色","Insert template...":"插入模板...",Templates:"模板",Template:"模板","Text color":"文字颜色","Background color":"背景色","Custom...":"自定义...","Custom color":"自定义颜色","No color":"无","Remove color":"移除颜色","Table of Contents":"内容列表","Show blocks":"显示区块边框","Show invisible characters":"显示不可见字符","Word count":"字数",Count:"计数",Document:"文档",Selection:"选择",Words:"单词","Words: {0}":"字数:{0}","{0} words":"{0} 字",File:"文件",Edit:"编辑",Insert:"插入",View:"视图",Format:"格式",Table:"表格",Tools:"工具","Powered by {0}":"由{0}驱动","Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help":"在编辑区按ALT-F9打开菜单按ALT-F10打开工具栏按ALT-0查看帮助","Image title":"图片标题","Border width":"边框宽度","Border style":"边框样式",Error:"错误",Warn:"警告",Valid:"有效","To open the popup, press Shift+Enter":"按Shitf+Enter键打开对话框","Rich Text Area. Press ALT-0 for help.":"编辑区。按Alt+0键打开帮助。","System Font":"系统字体","Failed to upload image: {0}":"图片上传失败: {0}","Failed to load plugin: {0} from url {1}":"插件加载失败: {0} 来自链接 {1}","Failed to load plugin url: {0}":"插件加载失败 链接: {0}","Failed to initialize plugin: {0}":"插件初始化失败: {0}",example:"示例",Search:"搜索",All:"全部",Currency:"货币",Text:"文字",Quotations:"引用",Mathematical:"数学","Extended Latin":"拉丁语扩充",Symbols:"符号",Arrows:"箭头","User Defined":"自定义","dollar sign":"美元符号","currency sign":"货币符号","euro-currency sign":"欧元符号","colon sign":"冒号","cruzeiro sign":"克鲁赛罗币符号","french franc sign":"法郎符号","lira sign":"里拉符号","mill sign":"密尔符号","naira sign":"奈拉符号","peseta sign":"比塞塔符号","rupee sign":"卢比符号","won sign":"韩元符号","new sheqel sign":"新谢克尔符号","dong sign":"越南盾符号","kip sign":"老挝基普符号","tugrik sign":"图格里克符号","drachma sign":"德拉克马符号","german penny symbol":"德国便士符号","peso sign":"比索符号","guarani sign":"瓜拉尼符号","austral sign":"澳元符号","hryvnia sign":"格里夫尼亚符号","cedi sign":"塞地符号","livre tournois sign":"里弗弗尔符号","spesmilo sign":"spesmilo符号","tenge sign":"坚戈符号","indian rupee sign":"印度卢比","turkish lira sign":"土耳其里拉","nordic mark sign":"北欧马克","manat sign":"马纳特符号","ruble sign":"卢布符号","yen character":"日元字样","yuan character":"人民币元字样","yuan character, in hong kong and taiwan":"元字样(港台地区)","yen/yuan character variant one":"元字样(大写)","Loading emoticons...":"加载表情符号...","Could not load emoticons":"不能加载表情符号",People:"人类","Animals and Nature":"动物和自然","Food and Drink":"食物和饮品",Activity:"活动","Travel and Places":"旅游和地点",Objects:"物件",Flags:"旗帜",Characters:"字符","Characters (no spaces)":"字符(无空格)","{0} characters":"{0} 个字符","Error: Form submit field collision.":"错误: 表单提交字段冲突。","Error: No form element found.":"错误: 没有表单控件。",Update:"更新","Color swatch":"颜色样本",Turquoise:"青绿色",Green:"绿色",Blue:"蓝色",Purple:"紫色","Navy Blue":"海军蓝","Dark Turquoise":"深蓝绿色","Dark Green":"深绿色","Medium Blue":"中蓝色","Medium Purple":"中紫色","Midnight Blue":"深蓝色",Yellow:"黄色",Orange:"橙色",Red:"红色","Light Gray":"浅灰色",Gray:"灰色","Dark Yellow":"暗黄色","Dark Orange":"深橙色","Dark Red":"深红色","Medium Gray":"中灰色","Dark Gray":"深灰色","Light Green":"浅绿色","Light Yellow":"浅黄色","Light Red":"浅红色","Light Purple":"浅紫色","Light Blue":"浅蓝色","Dark Purple":"深紫色","Dark Blue":"深蓝色",Black:"黑色",White:"白色","Switch to or from fullscreen mode":"切换全屏模式","Open help dialog":"打开帮助对话框",history:"历史",styles:"样式",formatting:"格式化",alignment:"对齐",indentation:"缩进","permanent pen":"记号笔",comments:"备注","Format Painter":"格式刷","Insert/edit iframe":"插入/编辑框架",Capitalization:"大写",lowercase:"小写",UPPERCASE:"大写","Title Case":"首字母大写","Permanent Pen Properties":"永久笔属性","Permanent pen properties...":"永久笔属性...",Font:"字体",Size:"字号","More...":"更多...","Spellcheck Language":"拼写检查语言","Select...":"选择...",Preferences:"首选项",Yes:"是",No:"否","Keyboard Navigation":"键盘指引",Version:"版本",Anchor:"锚点","Special character":"特殊符号","Code sample":"代码示例",Color:"颜色",Emoticons:"表情","Document properties":"文档属性",Image:"图片","Insert link":"插入链接",Target:"打开方式",Link:"链接",Poster:"封面",Media:"媒体",Print:"打印",Prev:"上一个","Find and replace":"查找和替换","Whole words":"全字匹配",Spellcheck:"拼写检查",Caption:"标题","Insert template":"插入模板"})});