;/*!node_modules/tinymce/tinymce.js*/ amis.define("33f80ad",(function(e,t,n,o){!function(){"use strict";var e=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},t=function(e){return{eq:e}},o=t((function(e,t){return e===t})),r=function(e){return t((function(t,n){if(t.length!==n.length)return!1;for(var o=t.length,r=0;r<o;r++)if(!e.eq(t[r],n[r]))return!1;return!0}))},s=function(e,n){return function(e,n){return t((function(t,o){return e.eq(n(t),n(o))}))}(r(e),(function(e){return function(e,t){return Array.prototype.slice.call(e).sort(t)}(e,n)}))},a=function(e){return t((function(t,n){var r=Object.keys(t),a=Object.keys(n);if(!s(o).eq(r,a))return!1;for(var i=r.length,l=0;l<i;l++){var d=r[l];if(!e.eq(t[d],n[d]))return!1}return!0}))},i=t((function(t,n){if(t===n)return!0;var o=e(t);return o===e(n)&&(function(e){return-1!==["undefined","boolean","number","string","function","xml","null"].indexOf(e)}(o)?t===n:"array"===o?r(i).eq(t,n):"object"===o&&a(i).eq(t,n))}));const l=Object.getPrototypeOf,d=(e,t,n)=>{var o;return!!n(e,t.prototype)||(null===(o=e.constructor)||void 0===o?void 0:o.name)===t.name},c=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&d(e,String,((e,t)=>t.isPrototypeOf(e)))?"string":t})(t)===e,m=e=>t=>typeof t===e,u=e=>t=>e===t,f=(e,t)=>p(e)&&d(e,t,((e,t)=>l(e)===t)),g=c("string"),p=c("object"),h=e=>f(e,Object),b=c("array"),v=u(null),y=m("boolean"),C=u(void 0),w=e=>null==e,x=e=>!w(e),k=m("function"),E=m("number"),S=(e,t)=>{if(b(e)){for(let n=0,o=e.length;n<o;++n)if(!t(e[n]))return!1;return!0}return!1},_=()=>{},N=(e,t)=>(...n)=>e(t.apply(null,n)),R=(e,t)=>n=>e(t(n)),A=e=>()=>e,D=e=>e,O=(e,t)=>e===t;function T(e,...t){return(...n)=>{const o=t.concat(n);return e.apply(null,o)}}const B=e=>t=>!e(t),P=e=>()=>{throw new Error(e)},L=e=>e(),M=e=>{e()},I=A(!1),F=A(!0);class U{constructor(e,t){this.tag=e,this.value=t}static some(e){return new U(!0,e)}static none(){return U.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?U.some(e(this.value)):U.none()}bind(e){return this.tag?e(this.value):U.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:U.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return x(e)?U.some(e):U.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}U.singletonNone=new U(!1);const z=Array.prototype.slice,j=Array.prototype.indexOf,H=Array.prototype.push,$=(e,t)=>j.call(e,t),V=(e,t)=>$(e,t)>-1,q=(e,t)=>{for(let n=0,o=e.length;n<o;n++){if(t(e[n],n))return!0}return!1},W=(e,t)=>{const n=e.length,o=new Array(n);for(let r=0;r<n;r++){const n=e[r];o[r]=t(n,r)}return o},K=(e,t)=>{for(let n=0,o=e.length;n<o;n++){t(e[n],n)}},G=(e,t)=>{for(let n=e.length-1;n>=0;n--){t(e[n],n)}},Y=(e,t)=>{const n=[],o=[];for(let r=0,s=e.length;r<s;r++){const s=e[r];(t(s,r)?n:o).push(s)}return{pass:n,fail:o}},X=(e,t)=>{const n=[];for(let o=0,r=e.length;o<r;o++){const r=e[o];t(r,o)&&n.push(r)}return n},Q=(e,t,n)=>(G(e,((e,o)=>{n=t(n,e,o)})),n),J=(e,t,n)=>(K(e,((e,o)=>{n=t(n,e,o)})),n),Z=(e,t,n)=>{for(let o=0,r=e.length;o<r;o++){const r=e[o];if(t(r,o))return U.some(r);if(n(r,o))break}return U.none()},ee=(e,t)=>Z(e,t,I),te=(e,t)=>{for(let n=0,o=e.length;n<o;n++){if(t(e[n],n))return U.some(n)}return U.none()},ne=e=>{const t=[];for(let n=0,o=e.length;n<o;++n){if(!b(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);H.apply(t,e[n])}return t},oe=(e,t)=>ne(W(e,t)),re=(e,t)=>{for(let n=0,o=e.length;n<o;++n){if(!0!==t(e[n],n))return!1}return!0},se=e=>{const t=z.call(e,0);return t.reverse(),t},ae=(e,t)=>X(e,(e=>!V(t,e))),ie=(e,t)=>{const n={};for(let o=0,r=e.length;o<r;o++){const r=e[o];n[String(r)]=t(r,o)}return n},le=(e,t)=>{const n=z.call(e,0);return n.sort(t),n},de=(e,t)=>t>=0&&t<e.length?U.some(e[t]):U.none(),ce=e=>de(e,0),me=e=>de(e,e.length-1),ue=k(Array.from)?Array.from:e=>z.call(e),fe=(e,t)=>{for(let n=0;n<e.length;n++){const o=t(e[n],n);if(o.isSome())return o}return U.none()},ge=Object.keys,pe=Object.hasOwnProperty,he=(e,t)=>{const n=ge(e);for(let o=0,r=n.length;o<r;o++){const r=n[o];t(e[r],r)}},be=(e,t)=>ve(e,((e,n)=>({k:n,v:t(e,n)}))),ve=(e,t)=>{const n={};return he(e,((e,o)=>{const r=t(e,o);n[r.k]=r.v})),n},ye=e=>(t,n)=>{e[n]=t},Ce=(e,t,n,o)=>{he(e,((e,r)=>{(t(e,r)?n:o)(e,r)}))},we=(e,t)=>{const n={};return Ce(e,t,ye(n),_),n},xe=(e,t)=>{const n=[];return he(e,((e,o)=>{n.push(t(e,o))})),n},ke=e=>xe(e,D),Ee=(e,t)=>Se(e,t)?U.from(e[t]):U.none(),Se=(e,t)=>pe.call(e,t),_e=(e,t)=>Se(e,t)&&void 0!==e[t]&&null!==e[t],Ne=e=>{const t={};return K(e,(e=>{t[e]={}})),ge(t)},Re=e=>void 0!==e.length,Ae=Array.isArray,De=(e,t,n)=>{if(!e)return!1;if(n=n||e,Re(e)){for(let o=0,r=e.length;o<r;o++)if(!1===t.call(n,e[o],o,e))return!1}else for(const o in e)if(Se(e,o)&&!1===t.call(n,e[o],o,e))return!1;return!0},Oe=(e,t)=>{const n=[];return De(e,((o,r)=>{n.push(t(o,r,e))})),n},Te=(e,t)=>{const n=[];return De(e,((o,r)=>{t&&!t(o,r,e)||n.push(o)})),n},Be=(e,t,n,o)=>{let r=C(n)?e[0]:n;for(let n=0;n<e.length;n++)r=t.call(o,r,e[n],n);return r},Pe=(e,t,n)=>{for(let o=0,r=e.length;o<r;o++)if(t.call(n,e[o],o,e))return o;return-1},Le=e=>e[e.length-1],Me=e=>{let t,n=!1;return(...o)=>(n||(n=!0,t=e.apply(null,o)),t)},Ie=()=>Fe(0,0),Fe=(e,t)=>({major:e,minor:t}),Ue={nu:Fe,detect:(e,t)=>{const n=String(t).toLowerCase();return 0===e.length?Ie():((e,t)=>{const n=((e,t)=>{for(let n=0;n<e.length;n++){const o=e[n];if(o.test(t))return o}})(e,t);if(!n)return{major:0,minor:0};const o=e=>Number(t.replace(n,"$"+e));return Fe(o(1),o(2))})(e,n)},unknown:Ie},ze=(e,t)=>{const n=String(t).toLowerCase();return ee(e,(e=>e.search(n)))},je=(e,t,n)=>""===t||e.length>=t.length&&e.substr(n,n+t.length)===t,He=(e,t)=>Ve(e,t)?((e,t)=>e.substring(t))(e,t.length):e,$e=(e,t,n=0,o)=>{const r=e.indexOf(t,n);return-1!==r&&(!!C(o)||r+t.length<=o)},Ve=(e,t)=>je(e,t,0),qe=(e,t)=>je(e,t,e.length-t.length),We=e=>t=>t.replace(e,""),Ke=We(/^\s+|\s+$/g),Ge=We(/^\s+/g),Ye=We(/\s+$/g),Xe=e=>e.length>0,Qe=e=>!Xe(e),Je=(e,t=10)=>{const n=parseInt(e,t);return isNaN(n)?U.none():U.some(n)},Ze=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,et=e=>t=>$e(t,e),tt=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>$e(e,"edge/")&&$e(e,"chrome")&&$e(e,"safari")&&$e(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Ze],search:e=>$e(e,"chrome")&&!$e(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>$e(e,"msie")||$e(e,"trident")},{name:"Opera",versionRegexes:[Ze,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:et("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:et("firefox")},{name:"Safari",versionRegexes:[Ze,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>($e(e,"safari")||$e(e,"mobile/"))&&$e(e,"applewebkit")}],nt=[{name:"Windows",search:et("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>$e(e,"iphone")||$e(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:et("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:et("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:et("linux"),versionRegexes:[]},{name:"Solaris",search:et("sunos"),versionRegexes:[]},{name:"FreeBSD",search:et("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:et("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],ot={browsers:A(tt),oses:A(nt)},rt="Edge",st="Chromium",at="Opera",it="Firefox",lt="Safari",dt=e=>{const t=e.current,n=e.version,o=e=>()=>t===e;return{current:t,version:n,isEdge:o(rt),isChromium:o(st),isIE:o("IE"),isOpera:o(at),isFirefox:o(it),isSafari:o(lt)}},ct={unknown:()=>dt({current:void 0,version:Ue.unknown()}),nu:dt,edge:A(rt),chromium:A(st),ie:A("IE"),opera:A(at),firefox:A(it),safari:A(lt)},mt="Windows",ut="Android",ft="Linux",gt="macOS",pt="Solaris",ht="FreeBSD",bt="ChromeOS",vt=e=>{const t=e.current,n=e.version,o=e=>()=>t===e;return{current:t,version:n,isWindows:o(mt),isiOS:o("iOS"),isAndroid:o(ut),isMacOS:o(gt),isLinux:o(ft),isSolaris:o(pt),isFreeBSD:o(ht),isChromeOS:o(bt)}},yt={unknown:()=>vt({current:void 0,version:Ue.unknown()}),nu:vt,windows:A(mt),ios:A("iOS"),android:A(ut),linux:A(ft),macos:A(gt),solaris:A(pt),freebsd:A(ht),chromeos:A(bt)},Ct=(e,t,n)=>{const o=ot.browsers(),r=ot.oses(),s=t.bind((e=>((e,t)=>fe(t.brands,(t=>{const n=t.brand.toLowerCase();return ee(e,(e=>{var t;return n===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())})).map((e=>({current:e.name,version:Ue.nu(parseInt(t.version,10),0)})))})))(o,e))).orThunk((()=>((e,t)=>ze(e,t).map((e=>{const n=Ue.detect(e.versionRegexes,t);return{current:e.name,version:n}})))(o,e))).fold(ct.unknown,ct.nu),a=((e,t)=>ze(e,t).map((e=>{const n=Ue.detect(e.versionRegexes,t);return{current:e.name,version:n}})))(r,e).fold(yt.unknown,yt.nu),i=((e,t,n,o)=>{const r=e.isiOS()&&!0===/ipad/i.test(n),s=e.isiOS()&&!r,a=e.isiOS()||e.isAndroid(),i=a||o("(pointer:coarse)"),l=r||!s&&a&&o("(min-device-width:768px)"),d=s||a&&!l,c=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(n),m=!d&&!l&&!c;return{isiPad:A(r),isiPhone:A(s),isTablet:A(l),isPhone:A(d),isTouch:A(i),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:A(c),isDesktop:A(m)}})(a,s,e,n);return{browser:s,os:a,deviceType:i}},wt=e=>window.matchMedia(e).matches;let xt=Me((()=>Ct(navigator.userAgent,U.from(navigator.userAgentData),wt)));const kt=()=>xt(),Et=navigator.userAgent,St=kt(),_t=St.browser,Nt=St.os,Rt=St.deviceType,At=-1!==Et.indexOf("Windows Phone"),Dt={transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",documentMode:_t.isIE()?document.documentMode||7:10,cacheSuffix:null,container:null,canHaveCSP:!_t.isIE(),windowsPhone:At,browser:{current:_t.current,version:_t.version,isChromium:_t.isChromium,isEdge:_t.isEdge,isFirefox:_t.isFirefox,isIE:_t.isIE,isOpera:_t.isOpera,isSafari:_t.isSafari},os:{current:Nt.current,version:Nt.version,isAndroid:Nt.isAndroid,isChromeOS:Nt.isChromeOS,isFreeBSD:Nt.isFreeBSD,isiOS:Nt.isiOS,isLinux:Nt.isLinux,isMacOS:Nt.isMacOS,isSolaris:Nt.isSolaris,isWindows:Nt.isWindows},deviceType:{isDesktop:Rt.isDesktop,isiPad:Rt.isiPad,isiPhone:Rt.isiPhone,isPhone:Rt.isPhone,isTablet:Rt.isTablet,isTouch:Rt.isTouch,isWebView:Rt.isWebView}},Ot=/^\s*|\s*$/g,Tt=e=>w(e)?"":(""+e).replace(Ot,""),Bt=function(e,t,n,o){o=o||this,e&&(n&&(e=e[n]),De(e,((e,r)=>!1!==t.call(o,e,r,n)&&(Bt(e,t,n,o),!0))))},Pt={trim:Tt,isArray:Ae,is:(e,t)=>t?!("array"!==t||!Ae(e))||typeof e===t:void 0!==e,toArray:e=>{if(Ae(e))return e;{const t=[];for(let n=0,o=e.length;n<o;n++)t[n]=e[n];return t}},makeMap:(e,t,n={})=>{const o=g(e)?e.split(t||","):e||[];let r=o.length;for(;r--;)n[o[r]]={};return n},each:De,map:Oe,grep:Te,inArray:(e,t)=>{if(e)for(let n=0,o=e.length;n<o;n++)if(e[n]===t)return n;return-1},hasOwn:Se,extend:(e,...t)=>{for(let n=0;n<t.length;n++){const o=t[n];for(const t in o)if(Se(o,t)){const n=o[t];void 0!==n&&(e[t]=n)}}return e},walk:Bt,resolve:(e,t=window)=>{const n=e.split(".");for(let e=0,o=n.length;e<o&&(t=t[n[e]]);e++);return t},explode:(e,t)=>b(e)?e:""===e?[]:Oe(e.split(t||","),Tt),_addCacheSuffix:e=>{const t=Dt.cacheSuffix;return t&&(e+=(-1===e.indexOf("?")?"?":"&")+t),e}},Lt=(e,t,n=O)=>e.exists((e=>n(e,t))),Mt=(e,t,n)=>e.isSome()&&t.isSome()?U.some(n(e.getOrDie(),t.getOrDie())):U.none(),It=(e,t)=>e?U.some(t):U.none(),Ft="undefined"!=typeof window?window:Function("return this;")(),Ut=(e,t)=>((e,t)=>{let n=null!=t?t:Ft;for(let t=0;t<e.length&&null!=n;++t)n=n[e[t]];return n})(e.split("."),t),zt=(e,t)=>{const n=((e,t)=>Ut(e,t))(e,t);if(null==n)throw new Error(e+" not available on this browser");return n},jt=Object.getPrototypeOf,Ht=e=>{const t=Ut("ownerDocument.defaultView",e);return p(e)&&((e=>zt("HTMLElement",e))(t).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(jt(e).constructor.name))},$t=e=>e.dom.nodeName.toLowerCase(),Vt=e=>e.dom.nodeType,qt=e=>t=>Vt(t)===e,Wt=qt(1),Kt=qt(3),Gt=qt(9),Yt=qt(11),Xt=e=>t=>Wt(t)&&$t(t)===e,Qt=(e,t,n)=>{if(!(g(n)||y(n)||E(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")},Jt=(e,t,n)=>{Qt(e.dom,t,n)},Zt=(e,t)=>{const n=e.dom;he(t,((e,t)=>{Qt(n,t,e)}))},en=(e,t)=>{const n=e.dom.getAttribute(t);return null===n?void 0:n},tn=(e,t)=>U.from(en(e,t)),nn=(e,t)=>{const n=e.dom;return!(!n||!n.hasAttribute)&&n.hasAttribute(t)},on=(e,t)=>{e.dom.removeAttribute(t)},rn=e=>J(e.dom.attributes,((e,t)=>(e[t.name]=t.value,e)),{}),sn=(e,t)=>{const n=en(e,t);return void 0===n||""===n?[]:n.split(" ")},an=e=>void 0!==e.dom.classList,ln=e=>sn(e,"class"),dn=(e,t)=>((e,t,n)=>{const o=sn(e,t).concat([n]);return Jt(e,t,o.join(" ")),!0})(e,"class",t),cn=(e,t)=>((e,t,n)=>{const o=X(sn(e,t),(e=>e!==n));return o.length>0?Jt(e,t,o.join(" ")):on(e,t),!1})(e,"class",t),mn=(e,t)=>{an(e)?e.dom.classList.add(t):dn(e,t)},un=e=>{0===(an(e)?e.dom.classList:ln(e)).length&&on(e,"class")},fn=(e,t)=>{if(an(e)){e.dom.classList.remove(t)}else cn(e,t);un(e)},gn=(e,t)=>{const n=an(e)?e.dom.classList.toggle(t):((e,t)=>V(ln(e),t)?cn(e,t):dn(e,t))(e,t);return un(e),n},pn=(e,t)=>an(e)&&e.dom.classList.contains(t),hn=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},bn={fromHtml:(e,t)=>{const n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||n.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return hn(n.childNodes[0])},fromTag:(e,t)=>{const n=(t||document).createElement(e);return hn(n)},fromText:(e,t)=>{const n=(t||document).createTextNode(e);return hn(n)},fromDom:hn,fromPoint:(e,t,n)=>U.from(e.dom.elementFromPoint(t,n)).map(hn)},vn=(e,t)=>{const n=[],o=e=>(n.push(e),t(e));let r=t(e);do{r=r.bind(o)}while(r.isSome());return n},yn=(e,t)=>{const n=e.dom;if(1!==n.nodeType)return!1;{const e=n;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},Cn=e=>1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount,wn=(e,t)=>e.dom===t.dom,xn=(e,t)=>{const n=e.dom,o=t.dom;return n!==o&&n.contains(o)},kn=e=>bn.fromDom(e.dom.ownerDocument),En=e=>Gt(e)?e:kn(e),Sn=e=>bn.fromDom(En(e).dom.defaultView),_n=e=>U.from(e.dom.parentNode).map(bn.fromDom),Nn=e=>U.from(e.dom.parentElement).map(bn.fromDom),Rn=(e,t)=>{const n=k(t)?t:I;let o=e.dom;const r=[];for(;null!==o.parentNode&&void 0!==o.parentNode;){const e=o.parentNode,t=bn.fromDom(e);if(r.push(t),!0===n(t))break;o=e}return r},An=e=>U.from(e.dom.previousSibling).map(bn.fromDom),Dn=e=>U.from(e.dom.nextSibling).map(bn.fromDom),On=e=>se(vn(e,An)),Tn=e=>vn(e,Dn),Bn=e=>W(e.dom.childNodes,bn.fromDom),Pn=(e,t)=>{const n=e.dom.childNodes;return U.from(n[t]).map(bn.fromDom)},Ln=e=>Pn(e,0),Mn=e=>Pn(e,e.dom.childNodes.length-1),In=e=>e.dom.childNodes.length,Fn=e=>Yt(e)&&x(e.dom.host),Un=k(Element.prototype.attachShadow)&&k(Node.prototype.getRootNode),zn=A(Un),jn=Un?e=>bn.fromDom(e.dom.getRootNode()):En,Hn=e=>Fn(e)?e:(e=>{const t=e.dom.head;if(null==t)throw new Error("Head is not available yet");return bn.fromDom(t)})(En(e)),$n=e=>bn.fromDom(e.dom.host),Vn=e=>{if(zn()&&x(e.target)){const t=bn.fromDom(e.target);if(Wt(t)&&qn(t)&&e.composed&&e.composedPath){const t=e.composedPath();if(t)return ce(t)}}return U.from(e.target)},qn=e=>x(e.dom.shadowRoot),Wn=e=>{const t=Kt(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const n=t.ownerDocument;return(e=>{const t=jn(e);return Fn(t)?U.some(t):U.none()})(bn.fromDom(t)).fold((()=>n.body.contains(t)),R(Wn,$n))};var Kn=(e,t,n,o,r)=>e(n,o)?U.some(n):k(r)&&r(n)?U.none():t(n,o,r);const Gn=(e,t,n)=>{let o=e.dom;const r=k(n)?n:I;for(;o.parentNode;){o=o.parentNode;const e=bn.fromDom(o);if(t(e))return U.some(e);if(r(e))break}return U.none()},Yn=(e,t,n)=>Kn(((e,t)=>t(e)),Gn,e,t,n),Xn=(e,t)=>ee(e.dom.childNodes,(e=>t(bn.fromDom(e)))).map(bn.fromDom),Qn=(e,t,n)=>Gn(e,(e=>yn(e,t)),n),Jn=(e,t)=>((e,t)=>{const n=void 0===t?document:t.dom;return Cn(n)?U.none():U.from(n.querySelector(e)).map(bn.fromDom)})(t,e),Zn=(e,t,n)=>Kn(((e,t)=>yn(e,t)),Qn,e,t,n),eo=(e,t=!1)=>{return Wn(e)?e.dom.isContentEditable:(n=e,Zn(n,"[contenteditable]")).fold(A(t),(e=>"true"===to(e)));var n},to=e=>e.dom.contentEditable,no=e=>void 0!==e.style&&k(e.style.getPropertyValue),oo=(e,t,n)=>{if(!g(n))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);no(e)&&e.style.setProperty(t,n)},ro=(e,t,n)=>{const o=e.dom;oo(o,t,n)},so=(e,t)=>{const n=e.dom;he(t,((e,t)=>{oo(n,t,e)}))},ao=(e,t)=>{const n=e.dom,o=window.getComputedStyle(n).getPropertyValue(t);return""!==o||Wn(e)?o:io(n,t)},io=(e,t)=>no(e)?e.style.getPropertyValue(t):"",lo=(e,t)=>{const n=e.dom,o=io(n,t);return U.from(o).filter((e=>e.length>0))},co=e=>{const t={},n=e.dom;if(no(n))for(let e=0;e<n.style.length;e++){const o=n.style.item(e);t[o]=n.style[o]}return t},mo=(e,t)=>{((e,t)=>{no(e)&&e.style.removeProperty(t)})(e.dom,t),Lt(tn(e,"style").map(Ke),"")&&on(e,"style")},uo=(e,t)=>{_n(e).each((n=>{n.dom.insertBefore(t.dom,e.dom)}))},fo=(e,t)=>{Dn(e).fold((()=>{_n(e).each((e=>{po(e,t)}))}),(e=>{uo(e,t)}))},go=(e,t)=>{Ln(e).fold((()=>{po(e,t)}),(n=>{e.dom.insertBefore(t.dom,n.dom)}))},po=(e,t)=>{e.dom.appendChild(t.dom)},ho=(e,t)=>{uo(e,t),po(t,e)},bo=(e,t)=>{K(t,(t=>{po(e,t)}))},vo=e=>{e.dom.textContent="",K(Bn(e),(e=>{yo(e)}))},yo=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Co=e=>{const t=Bn(e);var n,o;t.length>0&&(n=e,K(o=t,((e,t)=>{const r=0===t?n:o[t-1];fo(r,e)}))),yo(e)},wo=e=>W(e,bn.fromDom),xo=e=>e.dom.innerHTML,ko=(e,t)=>{const n=kn(e).dom,o=bn.fromDom(n.createDocumentFragment()),r=((e,t)=>{const n=(t||document).createElement("div");return n.innerHTML=e,Bn(bn.fromDom(n))})(t,n);bo(o,r),vo(e),po(e,o)},Eo=(e,t)=>n=>{e(n)&&t((e=>{const t=bn.fromDom(Vn(e).getOr(e.target)),n=()=>e.stopPropagation(),o=()=>e.preventDefault(),r=N(o,n);return((e,t,n,o,r,s,a)=>({target:e,x:t,y:n,stop:o,prevent:r,kill:s,raw:a}))(t,e.clientX,e.clientY,n,o,r,e)})(n))},So=(e,t,n,o)=>((e,t,n,o,r)=>{const s=Eo(n,o);return e.dom.addEventListener(t,s,r),{unbind:T(_o,e,t,s,r)}})(e,t,n,o,!1),_o=(e,t,n,o)=>{e.dom.removeEventListener(t,n,o)},No=(e,t)=>({left:e,top:t,translate:(n,o)=>No(e+n,t+o)}),Ro=No,Ao=(e,t)=>void 0!==e?e:void 0!==t?t:0,Do=e=>{const t=e.dom,n=t.ownerDocument.body;return n===t?Ro(n.offsetLeft,n.offsetTop):Wn(e)?(e=>{const t=e.getBoundingClientRect();return Ro(t.left,t.top)})(t):Ro(0,0)},Oo=e=>{const t=void 0!==e?e.dom:document,n=t.body.scrollLeft||t.documentElement.scrollLeft,o=t.body.scrollTop||t.documentElement.scrollTop;return Ro(n,o)},To=(e,t)=>{kt().browser.isSafari()&&k(e.dom.scrollIntoViewIfNeeded)?e.dom.scrollIntoViewIfNeeded(!1):e.dom.scrollIntoView(t)},Bo=(e,t,n,o)=>({x:e,y:t,width:n,height:o,right:e+n,bottom:t+o}),Po=e=>{const t=void 0===e?window:e,n=t.document,o=Oo(bn.fromDom(n));return(e=>{const t=void 0===e?window:e;return kt().browser.isFirefox()?U.none():U.from(t.visualViewport)})(t).fold((()=>{const e=t.document.documentElement,n=e.clientWidth,r=e.clientHeight;return Bo(o.left,o.top,n,r)}),(e=>Bo(Math.max(e.pageLeft,o.left),Math.max(e.pageTop,o.top),e.width,e.height)))},Lo=(e,t)=>{let n=[];return K(Bn(e),(e=>{t(e)&&(n=n.concat([e])),n=n.concat(Lo(e,t))})),n},Mo=(e,t)=>((e,t)=>{const n=void 0===t?document:t.dom;return Cn(n)?[]:W(n.querySelectorAll(e),bn.fromDom)})(t,e),Io=(e,t,n)=>Qn(e,t,n).isSome();class Fo{constructor(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)}current(){return this.node}next(e){return this.node=this.findSibling(this.node,"firstChild","nextSibling",e),this.node}prev(e){return this.node=this.findSibling(this.node,"lastChild","previousSibling",e),this.node}prev2(e){return this.node=this.findPreviousNode(this.node,e),this.node}findSibling(e,t,n,o){if(e){if(!o&&e[t])return e[t];if(e!==this.rootNode){let t=e[n];if(t)return t;for(let o=e.parentNode;o&&o!==this.rootNode;o=o.parentNode)if(t=o[n],t)return t}}}findPreviousNode(e,t){if(e){const n=e.previousSibling;if(this.rootNode&&n===this.rootNode)return;if(n){if(!t)for(let e=n.lastChild;e;e=e.lastChild)if(!e.lastChild)return e;return n}const o=e.parentNode;if(o&&o!==this.rootNode)return o}}}const Uo=e=>t=>!!t&&t.nodeType===e,zo=e=>!!e&&!Object.getPrototypeOf(e),jo=Uo(1),Ho=e=>{const t=e.toLowerCase();return e=>x(e)&&e.nodeName.toLowerCase()===t},$o=e=>{const t=e.map((e=>e.toLowerCase()));return e=>{if(e&&e.nodeName){const n=e.nodeName.toLowerCase();return V(t,n)}return!1}},Vo=(e,t)=>{const n=t.toLowerCase().split(" ");return t=>{if(jo(t)){const o=t.ownerDocument.defaultView;if(o)for(let r=0;r<n.length;r++){const s=o.getComputedStyle(t,null);if((s?s.getPropertyValue(e):null)===n[r])return!0}}return!1}},qo=e=>t=>jo(t)&&t.hasAttribute(e),Wo=e=>jo(e)&&e.hasAttribute("data-mce-bogus"),Ko=e=>jo(e)&&"TABLE"===e.tagName,Go=e=>t=>{if(jo(t)){if(t.contentEditable===e)return!0;if(t.getAttribute("data-mce-contenteditable")===e)return!0}return!1},Yo=$o(["textarea","input"]),Xo=Uo(3),Qo=Uo(4),Jo=Uo(7),Zo=Uo(8),er=Uo(9),tr=Uo(11),nr=Ho("br"),or=Ho("img"),rr=Go("true"),sr=Go("false"),ar=$o(["td","th"]),ir=$o(["td","th","caption"]),lr=$o(["video","audio","object","embed"]),dr=Ho("li"),cr="\ufeff",mr=" ",ur=e=>e===cr,fr=((e,t)=>{const n=t=>e(t)?U.from(t.dom.nodeValue):U.none();return{get:o=>{if(!e(o))throw new Error("Can only get "+t+" value of a "+t+" node");return n(o).getOr("")},getOption:n,set:(n,o)=>{if(!e(n))throw new Error("Can only set raw "+t+" value of a "+t+" node");n.dom.nodeValue=o}}})(Kt,"text"),gr=e=>fr.get(e),pr=e=>fr.getOption(e),hr=["pre"].concat(["h1","h2","h3","h4","h5","h6"]),br=e=>{let t;return n=>(t=t||ie(e,F),Se(t,$t(n)))},vr=br(["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"]),yr=e=>Wt(e)&&!vr(e),Cr=e=>Wt(e)&&"br"===$t(e),wr=br(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),xr=br(["ul","ol","dl"]),kr=br(["li","dd","dt"]),Er=br(["thead","tbody","tfoot"]),Sr=br(["td","th"]),_r=br(["pre","script","textarea","style"]),Nr=br(hr),Rr=e=>Nr(e)||yr(e),Ar=e=>{const t=Mo(e,"br"),n=X((e=>{const t=[];let n=e.dom;for(;n;)t.push(bn.fromDom(n)),n=n.lastChild;return t})(e).slice(-1),Cr);t.length===n.length&&K(n,yo)},Dr=()=>{const e=bn.fromTag("br");return Jt(e,"data-mce-bogus","1"),e},Or=e=>{vo(e),po(e,Dr())},Tr=e=>{Mn(e).each((t=>{An(t).each((n=>{vr(e)&&Cr(t)&&vr(n)&&yo(t)}))}))},Br=cr,Pr=ur,Lr=e=>e.replace(/\uFEFF/g,""),Mr=jo,Ir=Xo,Fr=e=>(Ir(e)&&(e=e.parentNode),Mr(e)&&e.hasAttribute("data-mce-caret")),Ur=e=>Ir(e)&&Pr(e.data),zr=e=>Fr(e)||Ur(e),jr=e=>e.firstChild!==e.lastChild||!nr(e.firstChild),Hr=e=>{const t=e.container();return!!Xo(t)&&(t.data.charAt(e.offset())===Br||e.isAtStart()&&Ur(t.previousSibling))},$r=e=>{const t=e.container();return!!Xo(t)&&(t.data.charAt(e.offset()-1)===Br||e.isAtEnd()&&Ur(t.nextSibling))},Vr=e=>Ir(e)&&e.data[0]===Br,qr=e=>Ir(e)&&e.data[e.data.length-1]===Br,Wr=e=>e&&e.hasAttribute("data-mce-caret")?((e=>{var t;const n=e.getElementsByTagName("br"),o=n[n.length-1];Wo(o)&&(null===(t=o.parentNode)||void 0===t||t.removeChild(o))})(e),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("data-mce-style"),e.removeAttribute("_moz_abspos"),e):null,Kr=e=>Fr(e.startContainer),Gr=rr,Yr=sr,Xr=nr,Qr=Xo,Jr=$o(["script","style","textarea"]),Zr=$o(["img","input","textarea","hr","iframe","video","audio","object","embed"]),es=$o(["table"]),ts=zr,ns=e=>!ts(e)&&(Qr(e)?!Jr(e.parentNode):Zr(e)||Xr(e)||es(e)||os(e)),os=e=>!(e=>jo(e)&&"true"===e.getAttribute("unselectable"))(e)&&Yr(e),rs=(e,t)=>ns(e)&&((e,t)=>{for(let n=e.parentNode;n&&n!==t;n=n.parentNode){if(os(n))return!1;if(Gr(n))return!0}return!0})(e,t),ss=/^[ \t\r\n]*$/,as=e=>ss.test(e),is=e=>"\n"===e||"\r"===e,ls=(e,t=4,n=!0,o=!0)=>{const r=((e,t)=>t<=0?"":new Array(t+1).join(e))(" ",t),s=e.replace(/\t/g,r),a=J(s,((e,t)=>(e=>-1!==" \f\t\v".indexOf(e))(t)||t===mr?e.pcIsSpace||""===e.str&&n||e.str.length===s.length-1&&o||((e,t)=>t<e.length&&t>=0&&is(e[t]))(s,e.str.length+1)?{pcIsSpace:!1,str:e.str+mr}:{pcIsSpace:!0,str:e.str+" "}:{pcIsSpace:is(t),str:e.str+t}),{pcIsSpace:!1,str:""});return a.str},ds=(e,t)=>Xo(e)&&as(e.data)&&!((e,t)=>{const n=bn.fromDom(t),o=bn.fromDom(e);return Io(o,"pre,code",T(wn,n))})(e,t),cs=(e,t)=>ns(e)&&!ds(e,t)||(e=>jo(e)&&"A"===e.nodeName&&!e.hasAttribute("href")&&(e.hasAttribute("name")||e.hasAttribute("id")))(e)||ms(e),ms=qo("data-mce-bookmark"),us=qo("data-mce-bogus"),fs=(gs="data-mce-bogus",ps="all",e=>jo(e)&&e.getAttribute(gs)===ps);var gs,ps;const hs=(e,t=!0)=>((e,t)=>{let n=0;if(cs(e,e))return!1;{let o=e.firstChild;if(!o)return!0;const r=new Fo(o,e);do{if(t){if(fs(o)){o=r.next(!0);continue}if(us(o)){o=r.next();continue}}if(nr(o))n++,o=r.next();else{if(cs(o,e))return!1;o=r.next()}}while(o);return n<=1}})(e.dom,t),bs="data-mce-block",vs=e=>(e=>X(ge(e),(e=>!/[A-Z]/.test(e))))(e).join(","),ys=(e,t)=>x(t.querySelector(e))?(t.setAttribute(bs,"true"),"inline-boundary"===t.getAttribute("data-mce-selected")&&t.removeAttribute("data-mce-selected"),!0):(t.removeAttribute(bs),!1),Cs=(e,t)=>{const n=vs(e.getTransparentElements()),o=vs(e.getBlockElements());return X(t.querySelectorAll(n),(e=>ys(o,e)))},ws=(e,t)=>{var n;const o=t?"lastChild":"firstChild";for(let t=e[o];t;t=t[o])if(hs(bn.fromDom(t)))return void(null===(n=t.parentNode)||void 0===n||n.removeChild(t))},xs=(e,t,n)=>{const o=e.getBlockElements(),r=bn.fromDom(t),s=e=>$t(e)in o,a=e=>wn(e,r);K(wo(n),(t=>{Gn(t,s,a).each((n=>{const o=((e,t)=>X(Bn(e),t))(t,(t=>s(t)&&!e.isValidChild($t(n),$t(t))));if(o.length>0){const t=Nn(n);K(o,(e=>{Gn(e,s,a).each((t=>{((e,t)=>{const n=document.createRange(),o=e.parentNode;if(o){n.setStartBefore(e),n.setEndBefore(t);const r=n.extractContents();ws(r,!0),n.setStartAfter(t),n.setEndAfter(e);const s=n.extractContents();ws(s,!1),hs(bn.fromDom(r))||o.insertBefore(r,e),hs(bn.fromDom(t))||o.insertBefore(t,e),hs(bn.fromDom(s))||o.insertBefore(s,e),o.removeChild(e)}})(t.dom,e.dom)}))})),t.each((t=>Cs(e,t.dom)))}}))}))},ks=(e,t)=>{const n=Cs(e,t);xs(e,t,n),((e,t,n)=>{K([...n,...Rs(e,t)?[t]:[]],(t=>K(Mo(bn.fromDom(t),t.nodeName.toLowerCase()),(t=>{As(e,t.dom)&&Co(t)}))))})(e,t,n)},Es=(e,t)=>{if(Ns(e,t)){const n=vs(e.getBlockElements());ys(n,t)}},Ss=e=>e.hasAttribute(bs),_s=(e,t)=>Se(e.getTransparentElements(),t),Ns=(e,t)=>jo(t)&&_s(e,t.nodeName),Rs=(e,t)=>Ns(e,t)&&Ss(t),As=(e,t)=>Ns(e,t)&&!Ss(t),Ds=(e,t)=>1===t.type&&_s(e,t.name)&&C(t.attr(bs)),Os=kt().browser,Ts=e=>ee(e,Wt),Bs=(e,t)=>e.children&&V(e.children,t),Ps=(e,t,n)=>{let o=0,r=0;const s=e.ownerDocument;if(n=n||e,t){if(n===e&&t.getBoundingClientRect&&"static"===ao(bn.fromDom(e),"position")){const n=t.getBoundingClientRect();return o=n.left+(s.documentElement.scrollLeft||e.scrollLeft)-s.documentElement.clientLeft,r=n.top+(s.documentElement.scrollTop||e.scrollTop)-s.documentElement.clientTop,{x:o,y:r}}let a=t;for(;a&&a!==n&&a.nodeType&&!Bs(a,n);){const e=a;o+=e.offsetLeft||0,r+=e.offsetTop||0,a=e.offsetParent}for(a=t.parentNode;a&&a!==n&&a.nodeType&&!Bs(a,n);)o-=a.scrollLeft||0,r-=a.scrollTop||0,a=a.parentNode;r+=(e=>Os.isFirefox()&&"table"===$t(e)?Ts(Bn(e)).filter((e=>"caption"===$t(e))).bind((e=>Ts(Tn(e)).map((t=>{const n=t.dom.offsetTop,o=e.dom.offsetTop,r=e.dom.offsetHeight;return n<=o?-r:0})))).getOr(0):0)(bn.fromDom(t))}return{x:o,y:r}},Ls=(e,t={})=>{let n=0;const o={},r=bn.fromDom(e),s=En(r),a=e=>new Promise(((a,i)=>{let l;const d=Pt._addCacheSuffix(e),c=(e=>Ee(o,e).getOrThunk((()=>({id:"mce-u"+n++,passed:[],failed:[],count:0}))))(d);o[d]=c,c.count++;const m=(e,t)=>{K(e,M),c.status=t,c.passed=[],c.failed=[],l&&(l.onload=null,l.onerror=null,l=null)},u=()=>m(c.passed,2),f=()=>m(c.failed,3);if(a&&c.passed.push(a),i&&c.failed.push(i),1===c.status)return;if(2===c.status)return void u();if(3===c.status)return void f();c.status=1;const g=bn.fromTag("link",s.dom);var p;Zt(g,{rel:"stylesheet",type:"text/css",id:c.id}),t.contentCssCors&&Jt(g,"crossOrigin","anonymous"),t.referrerPolicy&&Jt(g,"referrerpolicy",t.referrerPolicy),l=g.dom,l.onload=u,l.onerror=f,p=g,po(Hn(r),p),Jt(g,"href",d)})),i=e=>{const t=Pt._addCacheSuffix(e);Ee(o,t).each((e=>{0===--e.count&&(delete o[t],(e=>{const t=Hn(r);Jn(t,"#"+e).each(yo)})(e.id))}))};return{load:a,loadAll:e=>Promise.allSettled(W(e,(e=>a(e).then(A(e))))).then((e=>{const t=Y(e,(e=>"fulfilled"===e.status));return t.fail.length>0?Promise.reject(W(t.fail,(e=>e.reason))):W(t.pass,(e=>e.value))})),unload:i,unloadAll:e=>{K(e,(e=>{i(e)}))},_setReferrerPolicy:e=>{t.referrerPolicy=e},_setContentCssCors:e=>{t.contentCssCors=e}}},Ms=(()=>{const e=new WeakMap;return{forElement:(t,n)=>{const o=jn(t).dom;return U.from(e.get(o)).getOrThunk((()=>{const t=Ls(o,n);return e.set(o,t),t}))}}})(),Is=(e,t)=>x(e)&&(cs(e,t)||yr(bn.fromDom(e))),Fs=e=>(e=>"span"===e.nodeName.toLowerCase())(e)&&"bookmark"===e.getAttribute("data-mce-type"),Us=(e,t)=>Xo(e)&&e.data.length>0&&((e,t)=>{const n=new Fo(e,t).prev(!1),o=new Fo(e,t).next(!1),r=C(n)||Is(n,t),s=C(o)||Is(o,t);return r&&s})(e,t),zs=(e,t,n)=>{var o;const r=n||t;if(jo(t)&&Fs(t))return t;const s=t.childNodes;for(let t=s.length-1;t>=0;t--)zs(e,s[t],r);if(jo(t)){const e=t.childNodes;1===e.length&&Fs(e[0])&&(null===(o=t.parentNode)||void 0===o||o.insertBefore(e[0],t))}return(e=>tr(e)||er(e))(t)||cs(t,r)||(e=>!!jo(e)&&e.childNodes.length>0)(t)||Us(t,r)||e.remove(t),t},js=Pt.makeMap,Hs=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,$s=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Vs=/[<>&\"\']/g,qs=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,Ws={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:"Ÿ"},Ks={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},Gs={"<":"<",">":">","&":"&",""":'"',"'":"'"},Ys=(e,t)=>{const n={};if(e){const o=e.split(",");t=t||10;for(let e=0;e<o.length;e+=2){const r=String.fromCharCode(parseInt(o[e],t));if(!Ks[r]){const t="&"+o[e+1]+";";n[r]=t,n[t]=r}}return n}},Xs=Ys("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),Qs=(e,t)=>e.replace(t?Hs:$s,(e=>Ks[e]||e)),Js=(e,t)=>e.replace(t?Hs:$s,(e=>e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":Ks[e]||"&#"+e.charCodeAt(0)+";")),Zs=(e,t,n)=>{const o=n||Xs;return e.replace(t?Hs:$s,(e=>Ks[e]||o[e]||e))},ea={encodeRaw:Qs,encodeAllRaw:e=>(""+e).replace(Vs,(e=>Ks[e]||e)),encodeNumeric:Js,encodeNamed:Zs,getEncodeFunc:(e,t)=>{const n=Ys(t)||Xs,o=(e,t)=>e.replace(t?Hs:$s,(e=>void 0!==Ks[e]?Ks[e]:void 0!==n[e]?n[e]:e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":"&#"+e.charCodeAt(0)+";")),r=(e,t)=>Zs(e,t,n),s=js(e.replace(/\+/g,","));return s.named&&s.numeric?o:s.named?t?r:Zs:s.numeric?Js:Qs},decode:e=>e.replace(qs,((e,t)=>t?(t="x"===t.charAt(0).toLowerCase()?parseInt(t.substr(1),16):parseInt(t,10))>65535?(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))):Ws[t]||String.fromCharCode(t):Gs[e]||Xs[e]||(e=>{const t=bn.fromTag("div").dom;return t.innerHTML=e,t.textContent||t.innerText||e})(e)))},ta={},na={},oa={},ra=Pt.makeMap,sa=Pt.each,aa=Pt.extend,ia=Pt.explode,la=Pt.inArray,da=(e,t)=>(e=Pt.trim(e))?e.split(t||" "):[],ca=(e,t={})=>{const n=ra(e," ",ra(e.toUpperCase()," "));return aa(n,t)},ma=e=>ca("td th li dt dd figcaption caption details summary",e.getTextBlockElements()),ua=(e,t)=>{if(e){const n={};return g(e)&&(e={"*":e}),sa(e,((e,o)=>{n[o]=n[o.toUpperCase()]="map"===t?ra(e,/[, ]/):ia(e,/[, ]/)})),n}},fa=(e={})=>{var t;const n={},o={};let r=[];const s={},a={},i=(t,n,o)=>{const r=e[t];if(r)return ra(r,/[, ]/,ra(r.toUpperCase(),/[, ]/));{let e=na[t];return e||(e=ca(n,o),na[t]=e),e}},l=null!==(t=e.schema)&&void 0!==t?t:"html5",d=(e=>{const t={};let n,o,r,s;const a=(e,o="",r="")=>{const s=da(r),a=da(e);let i=a.length;for(;i--;){const e=da([n,o].join(" "));t[a[i]]={attributes:ie(e,(()=>({}))),attributesOrder:e,children:ie(s,A(oa))}}},i=(e,n)=>{const o=da(e),r=da(n);let s=o.length;for(;s--;){const e=t[o[s]];for(let t=0,n=r.length;t<n;t++)e.attributes[r[t]]={},e.attributesOrder.push(r[t])}};if(ta[e])return ta[e];n="id accesskey class dir lang style tabindex title role",o="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",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&&(n+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",o+=" article aside details dialog figure main header footer hgroup section nav a ins del canvas map",r+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen");if("html5-strict"!==e){n+=" xml:lang";const e="acronym applet basefont big font strike tt";r=[r,e].join(" "),sa(da(e),(e=>{a(e,"",r)}));const t="center dir isindex noframes";o=[o,t].join(" "),s=[o,r].join(" "),sa(da(t),(e=>{a(e,"",s)}))}return s=s||[o,r].join(" "),a("html","manifest","head body"),a("head","","base command link meta noscript script style title"),a("title hr noscript br"),a("base","href target"),a("link","href rel media hreflang type sizes hreflang"),a("meta","name http-equiv content charset"),a("style","media type scoped"),a("script","src async defer type charset"),a("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",s),a("address dt dd div caption","",s),a("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),a("blockquote","cite",s),a("ol","reversed start type","li"),a("ul","","li"),a("li","value",s),a("dl","","dt dd"),a("a","href target rel media hreflang type",s),a("q","cite",r),a("ins del","cite datetime",s),a("img","src sizes srcset alt usemap ismap width height"),a("iframe","src name width height",s),a("embed","src type width height"),a("object","data type typemustmatch name usemap form width height",[s,"param"].join(" ")),a("param","name value"),a("map","name",[s,"area"].join(" ")),a("area","alt coords shape href target rel media hreflang type"),a("table","border","caption colgroup thead tfoot tbody tr"+("html4"===e?" col":"")),a("colgroup","span","col"),a("col","span"),a("tbody thead tfoot","","tr"),a("tr","","td th"),a("td","colspan rowspan headers",s),a("th","colspan rowspan headers scope abbr",s),a("form","accept-charset action autocomplete enctype method name novalidate target",s),a("fieldset","disabled form name",[s,"legend"].join(" ")),a("label","form for",r),a("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"),a("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===e?s:r),a("select","disabled form multiple name required size","option optgroup"),a("optgroup","disabled label","option"),a("option","disabled label selected value"),a("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),a("menu","type label",[s,"li"].join(" ")),a("noscript","",s),"html4"!==e&&(a("wbr"),a("ruby","",[r,"rt rp"].join(" ")),a("figcaption","",s),a("mark rt rp summary bdi","",r),a("canvas","width height",s),a("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[s,"track source"].join(" ")),a("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[s,"track source"].join(" ")),a("picture","","img source"),a("source","src srcset type media sizes"),a("track","kind src srclang label default"),a("datalist","",[r,"option"].join(" ")),a("article section nav aside main header footer","",s),a("hgroup","","h1 h2 h3 h4 h5 h6"),a("figure","",[s,"figcaption"].join(" ")),a("time","datetime",r),a("dialog","open",s),a("command","type label icon disabled checked radiogroup command"),a("output","for form name",r),a("progress","value max",r),a("meter","value min max low high optimum",r),a("details","open",[s,"summary"].join(" ")),a("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!==e&&(i("script","language xml:space"),i("style","xml:space"),i("object","declare classid code codebase codetype archive standby align border hspace vspace"),i("embed","align name hspace vspace"),i("param","valuetype type"),i("a","charset name rev shape coords"),i("br","clear"),i("applet","codebase archive code object alt name width height align hspace vspace"),i("img","name longdesc align border hspace vspace"),i("iframe","longdesc frameborder marginwidth marginheight scrolling align"),i("font basefont","size color face"),i("input","usemap align"),i("select"),i("textarea"),i("h1 h2 h3 h4 h5 h6 div p legend caption","align"),i("ul","type compact"),i("li","type"),i("ol dl menu dir","compact"),i("pre","width xml:space"),i("hr","align noshade size width"),i("isindex","prompt"),i("table","summary width frame rules cellspacing cellpadding align bgcolor"),i("col","width align char charoff valign"),i("colgroup","width align char charoff valign"),i("thead","align char charoff valign"),i("tr","align char charoff valign bgcolor"),i("th","axis align char charoff valign nowrap bgcolor width height"),i("form","accept"),i("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),i("tfoot","align char charoff valign"),i("tbody","align char charoff valign"),i("area","nohref"),i("body","background bgcolor text link vlink alink")),"html4"!==e&&(i("input button select textarea","autofocus"),i("input textarea","placeholder"),i("a","download"),i("link script img","crossorigin"),i("img","loading"),i("iframe","sandbox seamless allow allowfullscreen loading")),"html4"!==e&&K([t.video,t.audio],(e=>{delete e.children.audio,delete e.children.video})),sa(da("a form meter progress dfn"),(e=>{t[e]&&delete t[e].children[e]})),delete t.caption.children.table,delete t.script,ta[e]=t,t})(l);!1===e.verify_html&&(e.valid_elements="*[*]");const c=ua(e.valid_styles),m=ua(e.invalid_styles,"map"),u=ua(e.valid_classes,"map"),f=i("whitespace_elements","pre script noscript style textarea video audio iframe object code"),g=i("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),p=i("void_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),h=i("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls allowfullscreen"),b="td th iframe video audio object script code",v=i("non_empty_elements",b+" pre",p),y=i("move_caret_before_on_enter_elements",b+" table",p),C=i("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"),w=i("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",C),x=i("text_inline_elements","span strong b em i font s strike u var cite dfn code mark q sup sub samp"),k=i("transparent_elements","a ins del canvas map");sa("script noscript iframe noframes noembed title style textarea xmp plaintext".split(" "),(e=>{a[e]=new RegExp("</"+e+"[^>]*>","gi")}));const E=e=>new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$"),S=e=>{const t=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)])?$/,o=/^([!\-])?(\w+[\\:]:\w+|[^=~<]+)?(?:([=~<])(.*))?$/,s=/[*?+]/;if(e){const a=da(e,",");let i,l;n["@"]&&(i=n["@"].attributes,l=n["@"].attributesOrder);for(let e=0,d=a.length;e<d;e++){let d=t.exec(a[e]);if(d){const e=d[1],t=d[2],a=d[3],c=d[5],m={},u=[],f={attributes:m,attributesOrder:u};if("#"===e&&(f.paddEmpty=!0),"-"===e&&(f.removeEmpty=!0),"!"===d[4]&&(f.removeEmptyAttrs=!0),i&&(he(i,((e,t)=>{m[t]=e})),l&&u.push(...l)),c){const e=da(c,"|");for(let t=0,n=e.length;t<n;t++)if(d=o.exec(e[t]),d){const e={},t=d[1],n=d[2].replace(/[\\:]:/g,":"),o=d[3],r=d[4];if("!"===t&&(f.attributesRequired=f.attributesRequired||[],f.attributesRequired.push(n),e.required=!0),"-"===t){delete m[n],u.splice(la(u,n),1);continue}if(o&&("="===o&&(f.attributesDefault=f.attributesDefault||[],f.attributesDefault.push({name:n,value:r}),e.defaultValue=r),"~"===o&&(f.attributesForced=f.attributesForced||[],f.attributesForced.push({name:n,value:r}),e.forcedValue=r),"<"===o&&(e.validValues=ra(r,"?"))),s.test(n)){const t=e;f.attributePatterns=f.attributePatterns||[],t.pattern=E(n),f.attributePatterns.push(t)}else m[n]||u.push(n),m[n]=e}}if(i||"@"!==t||(i=m,l=u),a&&(f.outputName=t,n[a]=f),s.test(t)){const e=f;e.pattern=E(t),r.push(e)}else n[t]=f}}}},_=e=>{r=[],K(ge(n),(e=>{delete n[e]})),S(e),sa(d,((e,t)=>{o[t]=e.children}))},N=e=>{const t=/^(~)?(.+)$/;e&&(delete na.text_block_elements,delete na.block_elements,sa(da(e,","),(e=>{const r=t.exec(e);if(r){const e="~"===r[1],t=e?"span":"div",a=r[2];if(o[a]=o[t],s[a]=t,v[a.toUpperCase()]={},v[a]={},e||(w[a.toUpperCase()]={},w[a]={}),!n[a]){let e=n[t];e=aa({},e),delete e.removeEmptyAttrs,delete e.removeEmpty,n[a]=e}sa(o,((e,n)=>{e[t]&&(o[n]=e=aa({},o[n]),e[a]=e[t])}))}})))},R=e=>{const t=/^([+\-]?)([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]+)\[([^\]]+)]$/;delete ta[l],e&&sa(da(e,","),(e=>{const n=t.exec(e);if(n){const e=n[1];let t;t=e?o[n[2]]:o[n[2]]={"#comment":{}},t=o[n[2]],sa(da(n[3],"|"),(n=>{"-"===e?delete t[n]:t[n]={}}))}}))},D=e=>{const t=n[e];if(t)return t;let o=r.length;for(;o--;){const t=r[o];if(t.pattern.test(e))return t}};e.valid_elements?_(e.valid_elements):(sa(d,((e,t)=>{n[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},o[t]=e.children})),sa(da("strong/b em/i"),(e=>{const t=da(e,"/");n[t[1]].outputName=t[0]})),sa(x,((t,o)=>{n[o]&&(e.padd_empty_block_inline_children&&(n[o].paddInEmptyBlock=!0),n[o].removeEmpty=!0)})),sa(da("ol ul blockquote a table tbody"),(e=>{n[e]&&(n[e].removeEmpty=!0)})),sa(da("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"),(e=>{n[e].paddEmpty=!0})),sa(da("span"),(e=>{n[e].removeEmptyAttrs=!0}))),N(e.custom_elements),R(e.valid_children),S(e.extended_valid_elements),R("+ol[ul|ol],+ul[ul|ol]"),sa({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"},((e,t)=>{n[t]&&(n[t].parentsRequired=da(e))})),e.invalid_elements&&sa(ia(e.invalid_elements),(e=>{n[e]&&delete n[e]})),D("span")||S("span[!data-mce-type|*]");const O=A(c),T=A(m),B=A(u),P=A(h),L=A(w),M=A(C),I=A(x),F=A(Object.seal(p)),U=A(g),z=A(v),j=A(y),H=A(f),$=A(k),V=A(Object.seal(a)),q=A(s);return{type:l,children:o,elements:n,getValidStyles:O,getValidClasses:B,getBlockElements:L,getInvalidStyles:T,getVoidElements:F,getTextBlockElements:M,getTextInlineElements:I,getBoolAttrs:P,getElementRule:D,getSelfClosingElements:U,getNonEmptyElements:z,getMoveCaretBeforeOnEnterElements:j,getWhitespaceElements:H,getTransparentElements:$,getSpecialElements:V,isValidChild:(e,t)=>{const n=o[e.toLowerCase()];return!(!n||!n[t.toLowerCase()])},isValid:(e,t)=>{const n=D(e);if(n){if(!t)return!0;{if(n.attributes[t])return!0;const e=n.attributePatterns;if(e){let n=e.length;for(;n--;)if(e[n].pattern.test(t))return!0}}}return!1},getCustomElements:q,addValidElements:S,setValidElements:_,addCustomElements:N,addValidChildren:R}},ga=(e={},t)=>{const n=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,o=/\s*([^:]+):\s*([^;]+);?/g,r=/\s+$/,s={};let a,i;const l=cr;t&&(a=t.getValidStyles(),i=t.getInvalidStyles());const d="\\\" \\' \\; \\: ; : \ufeff".split(" ");for(let e=0;e<d.length;e++)s[d[e]]=l+e,s[l+e]=d[e];const c={parse:t=>{const a={};let i=!1;const d=e.url_converter,m=e.url_converter_scope||c,u=(e,t,n)=>{const o=a[e+"-top"+t];if(!o)return;const r=a[e+"-right"+t];if(!r)return;const s=a[e+"-bottom"+t];if(!s)return;const i=a[e+"-left"+t];if(!i)return;const l=[o,r,s,i];let d=l.length-1;for(;d--&&l[d]===l[d+1];);d>-1&&n||(a[e+t]=-1===d?l[0]:l.join(" "),delete a[e+"-top"+t],delete a[e+"-right"+t],delete a[e+"-bottom"+t],delete a[e+"-left"+t])},f=e=>{const t=a[e];if(!t)return;const n=t.split(" ");let o=n.length;for(;o--;)if(n[o]!==n[0])return!1;return a[e]=n[0],!0},g=e=>(i=!0,s[e]),p=(e,t)=>(i&&(e=e.replace(/\uFEFF[0-9]/g,(e=>s[e]))),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e),h=e=>String.fromCharCode(parseInt(e.slice(1),16)),b=e=>e.replace(/\\[0-9a-f]+/gi,h),v=(t,n,o,r,s,a)=>{if(s=s||a)return"'"+(s=p(s)).replace(/\'/g,"\\'")+"'";if(n=p(n||o||r||""),!e.allow_script_urls){const t=n.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(t))return"";if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(t))return""}return d&&(n=d.call(m,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"};if(t){let s;for(t=(t=t.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,g).replace(/\"[^\"]+\"|\'[^\']+\'/g,(e=>e.replace(/[;:]/g,g)));s=o.exec(t);){o.lastIndex=s.index+s[0].length;let t=s[1].replace(r,"").toLowerCase(),d=s[2].replace(r,"");if(t&&d){if(t=b(t),d=b(d),-1!==t.indexOf(l)||-1!==t.indexOf('"'))continue;if(!e.allow_script_urls&&("behavior"===t||/expression\s*\(|\/\*|\*\//.test(d)))continue;"font-weight"===t&&"700"===d?d="bold":"color"!==t&&"background-color"!==t||(d=d.toLowerCase()),d=d.replace(n,v),a[t]=i?p(d,!0):d}}u("border","",!0),u("border","-width"),u("border","-color"),u("border","-style"),u("padding",""),u("margin",""),y="border",w="border-style",x="border-color",f(C="border-width")&&f(w)&&f(x)&&(a[y]=a[C]+" "+a[w]+" "+a[x],delete a[C],delete a[w],delete a[x]),"medium none"===a.border&&delete a.border,"none"===a["border-image"]&&delete a["border-image"]}var y,C,w,x;return a},serialize:(e,t)=>{let n="";const o=(t,o)=>{const r=o[t];if(r)for(let t=0,o=r.length;t<o;t++){const o=r[t],s=e[o];s&&(n+=(n.length>0?" ":"")+o+": "+s+";")}};return t&&a?(o("*",a),o(t,a)):he(e,((e,o)=>{e&&((e,t)=>{if(!i||!t)return!0;let n=i["*"];return!(n&&n[e]||(n=i[t],n&&n[e]))})(o,t)&&(n+=(n.length>0?" ":"")+o+": "+e+";")})),n}};return c},pa={keyLocation:!0,layerX:!0,layerY:!0,returnValue:!0,webkitMovementX:!0,webkitMovementY:!0,keyIdentifier:!0,mozPressure:!0},ha=e=>w(e.preventDefault)||(e=>e instanceof Event||k(e.initEvent))(e),ba=(e,t)=>{const n=null!=t?t:{};for(const t in e)Se(pa,t)||(n[t]=e[t]);return x(e.composedPath)&&(n.composedPath=()=>e.composedPath()),n},va=(e,t,n,o)=>{var r;const s=ba(t,o);return s.type=e,w(s.target)&&(s.target=null!==(r=s.srcElement)&&void 0!==r?r:n),ha(t)&&(s.preventDefault=()=>{s.defaultPrevented=!0,s.isDefaultPrevented=F,k(t.preventDefault)&&t.preventDefault()},s.stopPropagation=()=>{s.cancelBubble=!0,s.isPropagationStopped=F,k(t.stopPropagation)&&t.stopPropagation()},s.stopImmediatePropagation=()=>{s.isImmediatePropagationStopped=F,s.stopPropagation()},(e=>e.isDefaultPrevented===F||e.isDefaultPrevented===I)(s)||(s.isDefaultPrevented=!0===s.defaultPrevented?F:I,s.isPropagationStopped=!0===s.cancelBubble?F:I,s.isImmediatePropagationStopped=I)),s},ya=/^(?:mouse|contextmenu)|click/,Ca=(e,t,n,o)=>{e.addEventListener(t,n,o||!1)},wa=(e,t,n,o)=>{e.removeEventListener(t,n,o||!1)},xa=(e,t)=>{const n=va(e.type,e,document,t);if((e=>x(e)&&ya.test(e.type))(e)&&C(e.pageX)&&!C(e.clientX)){const t=n.target.ownerDocument||document,o=t.documentElement,r=t.body,s=n;s.pageX=e.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),s.pageY=e.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)}return n},ka=(e,t,n)=>{const o=e.document,r={type:"ready"};if(n.domLoaded)return void t(r);const s=()=>{wa(e,"DOMContentLoaded",s),wa(e,"load",s),n.domLoaded||(n.domLoaded=!0,t(r)),e=null};"complete"===o.readyState||"interactive"===o.readyState&&o.body?s():Ca(e,"DOMContentLoaded",s),n.domLoaded||Ca(e,"load",s)};class Ea{constructor(){this.domLoaded=!1,this.events={},this.count=1,this.expando="mce-data-"+(+new Date).toString(32),this.hasFocusIn="onfocusin"in document.documentElement,this.count=1}bind(e,t,n,o){const r=this;let s;const a=window,i=e=>{r.executeHandlers(xa(e||a.event),l)};if(!e||Xo(e)||Zo(e))return n;let l;e[r.expando]?l=e[r.expando]:(l=r.count++,e[r.expando]=l,r.events[l]={}),o=o||e;const d=t.split(" ");let c=d.length;for(;c--;){let t=d[c],m=i,u=!1,f=!1;"DOMContentLoaded"===t&&(t="ready"),r.domLoaded&&"ready"===t&&"complete"===e.readyState?n.call(o,xa({type:t})):(r.hasFocusIn||"focusin"!==t&&"focusout"!==t||(u=!0,f="focusin"===t?"focus":"blur",m=e=>{const t=xa(e||a.event);t.type="focus"===t.type?"focusin":"focusout",r.executeHandlers(t,l)}),s=r.events[l][t],s?"ready"===t&&r.domLoaded?n(xa({type:t})):s.push({func:n,scope:o}):(r.events[l][t]=s=[{func:n,scope:o}],s.fakeName=f,s.capture=u,s.nativeHandler=m,"ready"===t?ka(e,m,r):Ca(e,f||t,m,u)))}return e=s=null,n}unbind(e,t,n){if(!e||Xo(e)||Zo(e))return this;const o=e[this.expando];if(o){let r=this.events[o];if(t){const o=t.split(" ");let s=o.length;for(;s--;){const t=o[s],a=r[t];if(a){if(n){let e=a.length;for(;e--;)if(a[e].func===n){const n=a.nativeHandler,o=a.fakeName,s=a.capture,i=a.slice(0,e).concat(a.slice(e+1));i.nativeHandler=n,i.fakeName=o,i.capture=s,r[t]=i}}n&&0!==a.length||(delete r[t],wa(e,a.fakeName||t,a.nativeHandler,a.capture))}}}else he(r,((t,n)=>{wa(e,t.fakeName||n,t.nativeHandler,t.capture)})),r={};for(const e in r)if(Se(r,e))return this;delete this.events[o];try{delete e[this.expando]}catch(t){e[this.expando]=null}}return this}fire(e,t,n){return this.dispatch(e,t,n)}dispatch(e,t,n){if(!e||Xo(e)||Zo(e))return this;const o=xa({type:t,target:e},n);do{const t=e[this.expando];t&&this.executeHandlers(o,t),e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow}while(e&&!o.isPropagationStopped());return this}clean(e){if(!e||Xo(e)||Zo(e))return this;if(e[this.expando]&&this.unbind(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName){this.unbind(e);const t=e.getElementsByTagName("*");let n=t.length;for(;n--;)e=t[n],e[this.expando]&&this.unbind(e)}return this}destroy(){this.events={}}cancel(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1}executeHandlers(e,t){const n=this.events[t],o=n&&n[e.type];if(o)for(let t=0,n=o.length;t<n;t++){const n=o[t];if(n&&!1===n.func.call(n.scope,e)&&e.preventDefault(),e.isImmediatePropagationStopped())return}}}Ea.Event=new Ea;const Sa=Pt.each,_a=Pt.grep,Na="data-mce-style",Ra=Pt.makeMap("fill-opacity font-weight line-height opacity orphans widows z-index zoom"," "),Aa=(e,t,n)=>{w(n)||""===n?on(e,t):Jt(e,t,n)},Da=e=>e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),Oa=(e,t)=>{let n=0;if(e)for(let o=e.nodeType,r=e.previousSibling;r;r=r.previousSibling){const e=r.nodeType;(!t||!Xo(r)||e!==o&&r.data.length)&&(n++,o=e)}return n},Ta=(e,t)=>{const n=en(t,"style"),o=e.serialize(e.parse(n),$t(t));Aa(t,Na,o)},Ba=(e,t,n)=>{const o=Da(t);w(n)||""===n?mo(e,o):ro(e,o,((e,t)=>E(e)?Se(Ra,t)?e+"":e+"px":e)(n,o))},Pa=(e,t={})=>{const n={},o=window,r={};let s=0;const a=Ms.forElement(bn.fromDom(e),{contentCssCors:t.contentCssCors,referrerPolicy:t.referrerPolicy}),i=[],l=t.schema?t.schema:fa({}),d=ga({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),c=t.ownEvents?new Ea:Ea.Event,m=l.getBlockElements(),u=t=>t&&e&&g(t)?e.getElementById(t):t,f=e=>{const t=u(e);return x(t)?bn.fromDom(t):null},p=(e,t,n="")=>{let o;const r=f(e);if(x(r)&&Wt(r)){const e=G[t];o=e&&e.get?e.get(r.dom,t):en(r,t)}return x(o)?o:n},h=e=>{const t=u(e);return w(t)?[]:t.attributes},v=(e,n,o)=>{O(e,(e=>{if(jo(e)){const r=bn.fromDom(e),s=""===o?null:o,a=en(r,n),i=G[n];i&&i.set?i.set(r.dom,s,n):Aa(r,n,s),a!==s&&t.onSetAttrib&&t.onSetAttrib({attrElm:r.dom,attrName:n,attrValue:s})}}))},y=()=>t.root_element||e.body,C=(t,n)=>Ps(e.body,u(t),n),E=(e,t,n)=>{const o=u(e);if(!w(o)&&jo(o))return n?ao(bn.fromDom(o),Da(t)):("float"===(t=t.replace(/-(\D)/g,((e,t)=>t.toUpperCase())))&&(t="cssFloat"),o.style?o.style[t]:void 0)},S=e=>{const t=u(e);if(!t)return{w:0,h:0};let n=E(t,"width"),o=E(t,"height");return n&&-1!==n.indexOf("px")||(n="0"),o&&-1!==o.indexOf("px")||(o="0"),{w:parseInt(n,10)||t.offsetWidth||t.clientWidth,h:parseInt(o,10)||t.offsetHeight||t.clientHeight}},N=(e,t)=>{if(!e)return!1;const n=b(e)?e:[e];return q(n,(e=>yn(bn.fromDom(e),t)))},R=(e,t,n,o)=>{const r=[];let s=u(e);o=void 0===o;const a=n||("BODY"!==y().nodeName?y().parentNode:null);if(g(t))if("*"===t)t=jo;else{const e=t;t=t=>N(t,e)}for(;s&&!(s===a||w(s.nodeType)||er(s)||tr(s));){if(!t||t(s)){if(!o)return[s];r.push(s)}s=s.parentNode}return o?r:null},D=(e,t,n)=>{let o=t;if(e){g(t)&&(o=e=>N(e,t));for(let t=e[n];t;t=t[n])if(k(o)&&o(t))return t}return null},O=function(e,t,n){const o=null!=n?n:this;if(b(e)){const n=[];return Sa(e,((e,r)=>{const s=u(e);s&&n.push(t.call(o,s,r))})),n}{const n=u(e);return!!n&&t.call(o,n)}},T=(e,t)=>{O(e,(e=>{he(t,((t,n)=>{v(e,n,t)}))}))},B=(e,t)=>{O(e,(e=>{const n=bn.fromDom(e);ko(n,t)}))},P=(t,n,o,r,s)=>O(t,(t=>{const a=g(n)?e.createElement(n):n;return x(o)&&T(a,o),r&&(!g(r)&&r.nodeType?a.appendChild(r):g(r)&&B(a,r)),s?a:t.appendChild(a)})),L=(t,n,o)=>P(e.createElement(t),t,n,o,!0),M=ea.encodeAllRaw,I=(e,t)=>O(e,(e=>{const n=bn.fromDom(e);return t&&K(Bn(n),(e=>{Kt(e)&&0===e.dom.length?yo(e):uo(n,e)})),yo(n),n.dom})),F=(e,t,n)=>{O(e,(e=>{if(jo(e)){const o=bn.fromDom(e),r=t.split(" ");K(r,(e=>{if(x(n)){(n?mn:fn)(o,e)}else gn(o,e)}))}}))},U=(e,t,n)=>O(t,(o=>{var r;const s=b(t)?e.cloneNode(!0):e;return n&&Sa(_a(o.childNodes),(e=>{s.appendChild(e)})),null===(r=o.parentNode)||void 0===r||r.replaceChild(s,o),o})),z=e=>{if(jo(e)){const t="a"===e.nodeName.toLowerCase()&&!p(e,"href")&&p(e,"id");if(p(e,"name")||p(e,"data-mce-bookmark")||t)return!0}return!1},j=()=>e.createRange(),H=(n,r,s,a)=>{if(b(n)){let e=n.length;const t=[];for(;e--;)t[e]=H(n[e],r,s,a);return t}return!t.collect||n!==e&&n!==o||i.push([n,r,s,a]),c.bind(n,r,s,a||W)},$=(t,n,r)=>{if(b(t)){let e=t.length;const o=[];for(;e--;)o[e]=$(t[e],n,r);return o}if(i.length>0&&(t===e||t===o)){let e=i.length;for(;e--;){const[o,s,a]=i[e];t!==o||n&&n!==s||r&&r!==a||c.unbind(o,s,a)}}return c.unbind(t,n,r)},V=e=>{if(e&&jo(e)){const t=e.getAttribute("data-mce-contenteditable");return t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null}return null},W={doc:e,settings:t,win:o,files:r,stdMode:!0,boxModel:!0,styleSheetLoader:a,boundEvents:i,styles:d,schema:l,events:c,isBlock:e=>g(e)?Se(m,e):jo(e)&&(Se(m,e.nodeName)||Rs(l,e)),root:null,clone:(e,t)=>e.cloneNode(t),getRoot:y,getViewPort:e=>{const t=Po(e);return{x:t.x,y:t.y,w:t.width,h:t.height}},getRect:e=>{const t=u(e),n=C(t),o=S(t);return{x:n.x,y:n.y,w:o.w,h:o.h}},getSize:S,getParent:(e,t,n)=>{const o=R(e,t,n,!1);return o&&o.length>0?o[0]:null},getParents:R,get:u,getNext:(e,t)=>D(e,t,"nextSibling"),getPrev:(e,t)=>D(e,t,"previousSibling"),select:(n,o)=>{var r,s;const a=null!==(s=null!==(r=u(o))&&void 0!==r?r:t.root_element)&&void 0!==s?s:e;return k(a.querySelectorAll)?ue(a.querySelectorAll(n)):[]},is:N,add:P,create:L,createHTML:(e,t,n="")=>{let o="<"+e;for(const e in t)_e(t,e)&&(o+=" "+e+'="'+M(t[e])+'"');return Qe(n)&&Se(l.getVoidElements(),e)?o+" />":o+">"+n+"</"+e+">"},createFragment:t=>{const n=e.createElement("div"),o=e.createDocumentFragment();let r;for(o.appendChild(n),t&&(n.innerHTML=t);r=n.firstChild;)o.appendChild(r);return o.removeChild(n),o},remove:I,setStyle:(e,n,o)=>{O(e,(e=>{const r=bn.fromDom(e);Ba(r,n,o),t.update_styles&&Ta(d,r)}))},getStyle:E,setStyles:(e,n)=>{O(e,(e=>{const o=bn.fromDom(e);he(n,((e,t)=>{Ba(o,t,e)})),t.update_styles&&Ta(d,o)}))},removeAllAttribs:e=>O(e,(e=>{const t=e.attributes;for(let n=t.length-1;n>=0;n--)e.removeAttributeNode(t.item(n))})),setAttrib:v,setAttribs:T,getAttrib:p,getPos:C,parseStyle:e=>d.parse(e),serializeStyle:(e,t)=>d.serialize(e,t),addStyle:t=>{if(W!==Pa.DOM&&e===document){if(n[t])return;n[t]=!0}let o=e.getElementById("mceDefaultStyles");if(!o){o=e.createElement("style"),o.id="mceDefaultStyles",o.type="text/css";const t=e.head;t.firstChild?t.insertBefore(o,t.firstChild):t.appendChild(o)}o.styleSheet?o.styleSheet.cssText+=t:o.appendChild(e.createTextNode(t))},loadCSS:e=>{e||(e=""),K(e.split(","),(e=>{r[e]=!0,a.load(e).catch(_)}))},addClass:(e,t)=>{F(e,t,!0)},removeClass:(e,t)=>{F(e,t,!1)},hasClass:(e,t)=>{const n=f(e),o=t.split(" ");return x(n)&&re(o,(e=>pn(n,e)))},toggleClass:F,show:e=>{O(e,(e=>mo(bn.fromDom(e),"display")))},hide:e=>{O(e,(e=>ro(bn.fromDom(e),"display","none")))},isHidden:e=>{const t=f(e);return x(t)&&Lt(lo(t,"display"),"none")},uniqueId:e=>(e||"mce_")+s++,setHTML:B,getOuterHTML:e=>{const t=f(e);return x(t)?jo(t.dom)?t.dom.outerHTML:(e=>{const t=bn.fromTag("div"),n=bn.fromDom(e.dom.cloneNode(!0));return po(t,n),xo(t)})(t):""},setOuterHTML:(e,t)=>{O(e,(e=>{jo(e)&&(e.outerHTML=t)}))},decode:ea.decode,encode:M,insertAfter:(e,t)=>{const n=u(t);return O(e,(e=>{const t=null==n?void 0:n.parentNode,o=null==n?void 0:n.nextSibling;return t&&(o?t.insertBefore(e,o):t.appendChild(e)),e}))},replace:U,rename:(e,t)=>{if(e.nodeName!==t.toUpperCase()){const n=L(t);return Sa(h(e),(t=>{v(n,t.nodeName,p(e,t.nodeName))})),U(n,e,!0),n}return e},findCommonAncestor:(e,t)=>{let n=e;for(;n;){let e=t;for(;e&&n!==e;)e=e.parentNode;if(n===e)break;n=n.parentNode}return!n&&e.ownerDocument?e.ownerDocument.documentElement:n},run:O,getAttribs:h,isEmpty:(e,t)=>{let n=0;if(z(e))return!1;const o=e.firstChild;if(o){const r=new Fo(o,e),s=l?l.getWhitespaceElements():{},a=t||(l?l.getNonEmptyElements():null);let i=o;do{if(jo(i)){const e=i.getAttribute("data-mce-bogus");if(e){i=r.next("all"===e);continue}const t=i.nodeName.toLowerCase();if(a&&a[t]){if("br"===t){n++,i=r.next();continue}return!1}if(z(i))return!1}if(Zo(i))return!1;if(Xo(i)&&!as(i.data))return!1;if(Xo(i)&&i.parentNode&&s[i.parentNode.nodeName]&&as(i.data))return!1;i=r.next()}while(i)}return n<=1},createRng:j,nodeIndex:Oa,split:(e,t,n)=>{let o,r,s=j();if(e&&t&&e.parentNode&&t.parentNode){const a=e.parentNode;return s.setStart(a,Oa(e)),s.setEnd(t.parentNode,Oa(t)),o=s.extractContents(),s=j(),s.setStart(t.parentNode,Oa(t)+1),s.setEnd(a,Oa(e)+1),r=s.extractContents(),a.insertBefore(zs(W,o),e),n?a.insertBefore(n,e):a.insertBefore(t,e),a.insertBefore(zs(W,r),e),I(e),n||t}},bind:H,unbind:$,fire:(e,t,n)=>c.dispatch(e,t,n),dispatch:(e,t,n)=>c.dispatch(e,t,n),getContentEditable:V,getContentEditableParent:e=>{const t=y();let n=null;for(let o=e;o&&o!==t&&(n=V(o),null===n);o=o.parentNode);return n},isEditable:e=>{if(x(e)){const t=jo(e)?e:e.parentElement,n="true"===V(y());return x(t)&&eo(bn.fromDom(t),n)}return!1},destroy:()=>{if(i.length>0){let e=i.length;for(;e--;){const[t,n,o]=i[e];c.unbind(t,n,o)}}he(r,((e,t)=>{a.unload(t),delete r[t]}))},isChildOf:(e,t)=>e===t||t.contains(e),dumpRng:e=>"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset},G=((e,t,n)=>{const o=t.keep_values,r={set:(e,o,r)=>{const s=bn.fromDom(e);k(t.url_converter)&&x(o)&&(o=t.url_converter.call(t.url_converter_scope||n(),String(o),r,e)),Aa(s,"data-mce-"+r,o),Aa(s,r,o)},get:(e,t)=>{const n=bn.fromDom(e);return en(n,"data-mce-"+t)||en(n,t)}},s={style:{set:(t,n)=>{const r=bn.fromDom(t);o&&Aa(r,Na,n),on(r,"style"),g(n)&&so(r,e.parse(n))},get:t=>{const n=bn.fromDom(t),o=en(n,Na)||en(n,"style");return e.serialize(e.parse(o),$t(n))}}};return o&&(s.href=s.src=r),s})(d,t,A(W));return W};Pa.DOM=Pa(document),Pa.nodeIndex=Oa;const La=Pa.DOM;class Ma{constructor(e={}){this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=!1,this.settings=e}_setReferrerPolicy(e){this.settings.referrerPolicy=e}loadScript(e){return new Promise(((t,n)=>{const o=La;let r;const s=()=>{o.remove(a),r&&(r.onerror=r.onload=r=null)},a=o.uniqueId();r=document.createElement("script"),r.id=a,r.type="text/javascript",r.src=Pt._addCacheSuffix(e),this.settings.referrerPolicy&&o.setAttrib(r,"referrerpolicy",this.settings.referrerPolicy),r.onload=()=>{s(),t()},r.onerror=()=>{s(),n("Failed to load script: "+e)},(document.getElementsByTagName("head")[0]||document.body).appendChild(r)}))}isDone(e){return 2===this.states[e]}markDone(e){this.states[e]=2}add(e){const t=this;t.queue.push(e);return void 0===t.states[e]&&(t.states[e]=0),new Promise(((n,o)=>{t.scriptLoadedCallbacks[e]||(t.scriptLoadedCallbacks[e]=[]),t.scriptLoadedCallbacks[e].push({resolve:n,reject:o})}))}load(e){return this.add(e)}remove(e){delete this.states[e],delete this.scriptLoadedCallbacks[e]}loadQueue(){const e=this.queue;return this.queue=[],this.loadScripts(e)}loadScripts(e){const t=this,n=(e,n)=>{Ee(t.scriptLoadedCallbacks,n).each((t=>{K(t,(t=>t[e](n)))})),delete t.scriptLoadedCallbacks[n]},o=e=>{const t=X(e,(e=>"rejected"===e.status));return t.length>0?Promise.reject(oe(t,(({reason:e})=>b(e)?e:[e]))):Promise.resolve()},r=e=>Promise.allSettled(W(e,(e=>2===t.states[e]?(n("resolve",e),Promise.resolve()):3===t.states[e]?(n("reject",e),Promise.reject(e)):(t.states[e]=1,t.loadScript(e).then((()=>{t.states[e]=2,n("resolve",e);const s=t.queue;return s.length>0?(t.queue=[],r(s).then(o)):Promise.resolve()}),(()=>(t.states[e]=3,n("reject",e),Promise.reject(e)))))))),s=e=>(t.loading=!0,r(e).then((e=>{t.loading=!1;const n=t.queueLoadedCallbacks.shift();return U.from(n).each(M),o(e)}))),a=Ne(e);return t.loading?new Promise(((e,n)=>{t.queueLoadedCallbacks.push((()=>s(a).then(e,n)))})):s(a)}}Ma.ScriptLoader=new Ma;const Ia=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},Fa={},Ua=Ia("en"),za=()=>Ee(Fa,Ua.get()),ja={getData:()=>be(Fa,(e=>({...e}))),setCode:e=>{e&&Ua.set(e)},getCode:()=>Ua.get(),add:(e,t)=>{let n=Fa[e];n||(Fa[e]=n={}),he(t,((e,t)=>{n[t.toLowerCase()]=e}))},translate:e=>{const t=za().getOr({}),n=e=>k(e)?Object.prototype.toString.call(e):o(e)?"":""+e,o=e=>""===e||null==e,r=e=>{const o=n(e);return Ee(t,o.toLowerCase()).map(n).getOr(o)},s=e=>e.replace(/{context:\w+}$/,"");if(o(e))return"";if(p(a=e)&&Se(a,"raw"))return n(e.raw);var a;if((e=>b(e)&&e.length>1)(e)){const t=e.slice(1);return s(r(e[0]).replace(/\{([0-9]+)\}/g,((e,o)=>Se(t,o)?n(t[o]):e)))}return s(r(e))},isRtl:()=>za().bind((e=>Ee(e,"_dir"))).exists((e=>"rtl"===e)),hasCode:e=>Se(Fa,e)},Ha=()=>{const e=[],t={},n={},o=[],r=(e,t)=>{const n=X(o,(n=>n.name===e&&n.state===t));K(n,(e=>e.resolve()))},s=e=>Se(t,e),a=(e,n)=>{const o=ja.getCode();!o||n&&-1===(","+(n||"")+",").indexOf(","+o+",")||Ma.ScriptLoader.add(t[e]+"/langs/"+o+".js")},i=(e,t="added")=>"added"===t&&(e=>Se(n,e))(e)||"loaded"===t&&s(e)?Promise.resolve():new Promise((n=>{o.push({name:e,state:t,resolve:n})}));return{items:e,urls:t,lookup:n,get:e=>{if(n[e])return n[e].instance},requireLangPack:(e,t)=>{!1!==Ha.languageLoad&&(s(e)?a(e,t):i(e,"loaded").then((()=>a(e,t))))},add:(t,o)=>(e.push(o),n[t]={instance:o},r(t,"added"),o),remove:e=>{delete t[e],delete n[e]},createUrl:(e,t)=>g(t)?g(e)?{prefix:"",resource:t,suffix:""}:{prefix:e.prefix,resource:t,suffix:e.suffix}:t,load:(e,o)=>{if(t[e])return Promise.resolve();let s=g(o)?o:o.prefix+o.resource+o.suffix;0!==s.indexOf("/")&&-1===s.indexOf("://")&&(s=Ha.baseURL+"/"+s),t[e]=s.substring(0,s.lastIndexOf("/"));const a=()=>(r(e,"loaded"),Promise.resolve());return n[e]?a():Ma.ScriptLoader.add(s).then(a)},waitFor:i}};Ha.languageLoad=!0,Ha.baseURL="",Ha.PluginManager=Ha(),Ha.ThemeManager=Ha(),Ha.ModelManager=Ha();const $a=e=>{const t=Ia(U.none()),n=()=>t.get().each((e=>clearInterval(e)));return{clear:()=>{n(),t.set(U.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:o=>{n(),t.set(U.some(setInterval(o,e)))}}},Va=()=>{const e=(e=>{const t=Ia(U.none()),n=()=>t.get().each(e);return{clear:()=>{n(),t.set(U.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{n(),t.set(U.some(e))}}})(_);return{...e,on:t=>e.get().each(t)}},qa=(e,t)=>{let n=null;return{cancel:()=>{v(n)||(clearTimeout(n),n=null)},throttle:(...o)=>{v(n)&&(n=setTimeout((()=>{n=null,e.apply(null,o)}),t))}}},Wa=(e,t)=>{let n=null;const o=()=>{v(n)||(clearTimeout(n),n=null)};return{cancel:o,throttle:(...r)=>{o(),n=setTimeout((()=>{n=null,e.apply(null,r)}),t)}}},Ka=A("mce-annotation"),Ga=A("data-mce-annotation"),Ya=A("data-mce-annotation-uid"),Xa=A("data-mce-annotation-active"),Qa=A("data-mce-annotation-classes"),Ja=A("data-mce-annotation-attrs"),Za=e=>t=>wn(t,e),ei=(e,t)=>{const n=e.selection.getRng(),o=bn.fromDom(n.startContainer),r=bn.fromDom(e.getBody()),s=t.fold((()=>"."+Ka()),(e=>`[${Ga()}="${e}"]`)),a=Pn(o,n.startOffset).getOr(o);return Zn(a,s,Za(r)).bind((t=>tn(t,`${Ya()}`).bind((n=>tn(t,`${Ga()}`).map((t=>{const o=ni(e,n);return{uid:n,name:t,elements:o}}))))))},ti=(e,t)=>nn(e,"data-mce-bogus")||Io(e,'[data-mce-bogus="all"]',Za(t)),ni=(e,t)=>{const n=bn.fromDom(e.getBody()),o=Mo(n,`[${Ya()}="${t}"]`);return X(o,(e=>!ti(e,n)))},oi=(e,t)=>{const n=bn.fromDom(e.getBody()),o=Mo(n,`[${Ga()}="${t}"]`),r={};return K(o,(e=>{if(!ti(e,n)){const t=en(e,Ya()),n=Ee(r,t).getOr([]);r[t]=n.concat([e])}})),r},ri=(e,t)=>{const n=Ia({}),o=()=>({listeners:[],previous:Va()}),r=(e,t)=>{s(e,(e=>(t(e),e)))},s=(e,t)=>{const r=n.get(),s=t(Ee(r,e).getOrThunk(o));r[e]=s,n.set(r)},a=(t,n)=>{K(ni(e,t),(e=>{n?Jt(e,Xa(),"true"):on(e,Xa())}))},i=Wa((()=>{const n=le(t.getNames());K(n,(t=>{s(t,(n=>{const o=n.previous.get();return ei(e,U.some(t)).fold((()=>{o.each((e=>{(e=>{r(e,(t=>{K(t.listeners,(t=>t(!1,e)))}))})(t),n.previous.clear(),a(e,!1)}))}),(({uid:e,name:t,elements:s})=>{Lt(o,e)||(o.each((e=>a(e,!1))),((e,t,n)=>{r(e,(o=>{K(o.listeners,(o=>o(!0,e,{uid:t,nodes:W(n,(e=>e.dom))})))}))})(t,e,s),n.previous.set(e),a(e,!0))})),{previous:n.previous,listeners:n.listeners}}))}))}),30);e.on("remove",(()=>{i.cancel()})),e.on("NodeChange",(()=>{i.throttle()}));return{addListener:(e,t)=>{s(e,(e=>({previous:e.previous,listeners:e.listeners.concat([t])})))}}};let si=0;const ai=e=>{const t=(new Date).getTime(),n=Math.floor(1e9*Math.random());return si++,e+"_"+n+si+String(t)},ii=(e,t)=>bn.fromDom(e.dom.cloneNode(t)),li=e=>ii(e,!1),di=e=>ii(e,!0),ci=(e,t)=>{const n=((e,t)=>{const n=bn.fromTag(t),o=rn(e);return Zt(n,o),n})(e,t);fo(e,n);const o=Bn(e);return bo(n,o),yo(e),n},mi=(e,t,n=I)=>{const o=new Fo(e,t),r=e=>{let t;do{t=o[e]()}while(t&&!Xo(t)&&!n(t));return U.from(t).filter(Xo)};return{current:()=>U.from(o.current()).filter(Xo),next:()=>r("next"),prev:()=>r("prev"),prev2:()=>r("prev2")}},ui=(e,t)=>{const n=t||(t=>e.isBlock(t)||nr(t)||sr(t)),o=(e,t,n,r)=>{if(Xo(e)){const n=r(e,t,e.data);if(-1!==n)return U.some({container:e,offset:n})}return n().bind((e=>o(e.container,e.offset,n,r)))};return{backwards:(t,r,s,a)=>{const i=mi(t,null!=a?a:e.getRoot(),n);return o(t,r,(()=>i.prev().map((e=>({container:e,offset:e.length})))),s).getOrNull()},forwards:(t,r,s,a)=>{const i=mi(t,null!=a?a:e.getRoot(),n);return o(t,r,(()=>i.next().map((e=>({container:e,offset:0})))),s).getOrNull()}}},fi=Math.round,gi=e=>e?{left:fi(e.left),top:fi(e.top),bottom:fi(e.bottom),right:fi(e.right),width:fi(e.width),height:fi(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0},pi=(e,t)=>(e=gi(e),t||(e.left=e.left+e.width),e.right=e.left,e.width=0,e),hi=(e,t,n)=>e>=0&&e<=Math.min(t.height,n.height)/2,bi=(e,t)=>{const n=Math.min(t.height/2,e.height/2);return e.bottom-n<t.top||!(e.top>t.bottom)&&hi(t.top-e.bottom,e,t)},vi=(e,t)=>e.top>t.bottom||!(e.bottom<t.top)&&hi(t.bottom-e.top,e,t),yi=(e,t,n)=>{const o=Math.max(Math.min(t,e.left+e.width),e.left),r=Math.max(Math.min(n,e.top+e.height),e.top);return Math.sqrt((t-o)*(t-o)+(n-r)*(n-r))},Ci=e=>{const t=e.startContainer,n=e.startOffset;return t===e.endContainer&&t.hasChildNodes()&&e.endOffset===n+1?t.childNodes[n]:null},wi=(e,t)=>{if(jo(e)&&e.hasChildNodes()){const n=e.childNodes,o=((e,t,n)=>Math.min(Math.max(e,t),n))(t,0,n.length-1);return n[o]}return e},xi=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ंऺ़ु-ै्॑-ॗॢ-ॣঁ়াু-ৄ্ৗৢ-ৣਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼ુ-ૅે-ૈ્ૢ-ૣଁ଼ାିୁ-ୄ୍ୖୗୢ-ୣஂாீ்ௗఀా-ీె-ైొ-్ౕ-ౖౢ-ౣಁ಼ಿೂೆೌ-್ೕ-ೖೢ-ೣഁാു-ൄ്ൗൢ-ൣ්ාි-ුූෟัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹᷀-᷵᷼-᷿-⃐-⃜⃝-⃠⃡⃢-⃤⃥-⃰⳯-⵿⳱ⷠ-〪ⷿ-〭〮-゙〯-゚꙯꙰-꙲ꙴ-꙽ꚞ-ꚟ꛰-꛱ꠂ꠆ꠋꠥ-ꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-゙︯-゚]"),ki=e=>g(e)&&e.charCodeAt(0)>=768&&xi.test(e),Ei=jo,Si=ns,_i=Vo("display","block table"),Ni=Vo("float","left right"),Ri=((...e)=>t=>{for(let n=0;n<e.length;n++)if(!e[n](t))return!1;return!0})(Ei,Si,B(Ni)),Ai=B(Vo("white-space","pre pre-line pre-wrap")),Di=Xo,Oi=nr,Ti=Pa.nodeIndex,Bi=(e,t)=>t<0&&jo(e)&&e.hasChildNodes()?void 0:wi(e,t),Pi=e=>e?e.createRange():Pa.DOM.createRng(),Li=e=>g(e)&&/[\r\n\t ]/.test(e),Mi=e=>!!e.setStart&&!!e.setEnd,Ii=e=>{const t=e.startContainer,n=e.startOffset;if(Li(e.toString())&&Ai(t.parentNode)&&Xo(t)){const e=t.data;if(Li(e[n-1])||Li(e[n+1]))return!0}return!1},Fi=e=>0===e.left&&0===e.right&&0===e.top&&0===e.bottom,Ui=e=>{var t;let n;const o=e.getClientRects();return n=o.length>0?gi(o[0]):gi(e.getBoundingClientRect()),!Mi(e)&&Oi(e)&&Fi(n)?(e=>{const t=e.ownerDocument,n=Pi(t),o=t.createTextNode(mr),r=e.parentNode;r.insertBefore(o,e),n.setStart(o,0),n.setEnd(o,1);const s=gi(n.getBoundingClientRect());return r.removeChild(o),s})(e):Fi(n)&&Mi(e)&&null!==(t=(e=>{const t=e.startContainer,n=e.endContainer,o=e.startOffset,r=e.endOffset;if(t===n&&Xo(n)&&0===o&&1===r){const t=e.cloneRange();return t.setEndAfter(n),Ui(t)}return null})(e))&&void 0!==t?t:n},zi=(e,t)=>{const n=pi(e,t);return n.width=1,n.right=n.left+1,n},ji=e=>{const t=[],n=e=>{var n,o;0!==e.height&&(t.length>0&&(n=e,o=t[t.length-1],n.left===o.left&&n.top===o.top&&n.bottom===o.bottom&&n.right===o.right)||t.push(e))},o=(e,t)=>{const o=Pi(e.ownerDocument);if(t<e.data.length){if(ki(e.data[t]))return;if(ki(e.data[t-1])&&(o.setStart(e,t),o.setEnd(e,t+1),!Ii(o)))return void n(zi(Ui(o),!1))}t>0&&(o.setStart(e,t-1),o.setEnd(e,t),Ii(o)||n(zi(Ui(o),!1))),t<e.data.length&&(o.setStart(e,t),o.setEnd(e,t+1),Ii(o)||n(zi(Ui(o),!0)))},r=e.container(),s=e.offset();if(Di(r))return o(r,s),t;if(Ei(r))if(e.isAtEnd()){const e=Bi(r,s);Di(e)&&o(e,e.data.length),Ri(e)&&!Oi(e)&&n(zi(Ui(e),!1))}else{const a=Bi(r,s);if(Di(a)&&o(a,0),Ri(a)&&e.isAtEnd())return n(zi(Ui(a),!1)),t;const i=Bi(e.container(),e.offset()-1);Ri(i)&&!Oi(i)&&(_i(i)||_i(a)||!Ri(a))&&n(zi(Ui(i),!1)),Ri(a)&&n(zi(Ui(a),!0))}return t},Hi=(e,t,n)=>{const o=()=>(n||(n=ji(Hi(e,t))),n);return{container:A(e),offset:A(t),toRange:()=>{const n=Pi(e.ownerDocument);return n.setStart(e,t),n.setEnd(e,t),n},getClientRects:o,isVisible:()=>o().length>0,isAtStart:()=>(Di(e),0===t),isAtEnd:()=>Di(e)?t>=e.data.length:t>=e.childNodes.length,isEqual:n=>n&&e===n.container()&&t===n.offset(),getNode:n=>Bi(e,n?t-1:t)}};Hi.fromRangeStart=e=>Hi(e.startContainer,e.startOffset),Hi.fromRangeEnd=e=>Hi(e.endContainer,e.endOffset),Hi.after=e=>Hi(e.parentNode,Ti(e)+1),Hi.before=e=>Hi(e.parentNode,Ti(e)),Hi.isAbove=(e,t)=>Mt(ce(t.getClientRects()),me(e.getClientRects()),bi).getOr(!1),Hi.isBelow=(e,t)=>Mt(me(t.getClientRects()),ce(e.getClientRects()),vi).getOr(!1),Hi.isAtStart=e=>!!e&&e.isAtStart(),Hi.isAtEnd=e=>!!e&&e.isAtEnd(),Hi.isTextPosition=e=>!!e&&Xo(e.container()),Hi.isElementPosition=e=>!Hi.isTextPosition(e);const $i=(e,t)=>{Xo(t)&&0===t.data.length&&e.remove(t)},Vi=(e,t,n)=>{tr(n)?((e,t,n)=>{const o=U.from(n.firstChild),r=U.from(n.lastChild);t.insertNode(n),o.each((t=>$i(e,t.previousSibling))),r.each((t=>$i(e,t.nextSibling)))})(e,t,n):((e,t,n)=>{t.insertNode(n),$i(e,n.previousSibling),$i(e,n.nextSibling)})(e,t,n)},qi=Xo,Wi=Wo,Ki=Pa.nodeIndex,Gi=e=>{const t=e.parentNode;return Wi(t)?Gi(t):t},Yi=e=>e?Be(e.childNodes,((e,t)=>(Wi(t)&&"BR"!==t.nodeName?e=e.concat(Yi(t)):e.push(t),e)),[]):[],Xi=e=>t=>e===t,Qi=e=>(qi(e)?"text()":e.nodeName.toLowerCase())+"["+(e=>{let t,n;t=Yi(Gi(e)),n=Pe(t,Xi(e),e),t=t.slice(0,n+1);const o=Be(t,((e,n,o)=>(qi(n)&&qi(t[o-1])&&e++,e)),0);return t=Te(t,$o([e.nodeName])),n=Pe(t,Xi(e),e),n-o})(e)+"]",Ji=(e,t)=>{let n,o=[],r=t.container(),s=t.offset();if(qi(r))n=((e,t)=>{let n=e;for(;(n=n.previousSibling)&&qi(n);)t+=n.data.length;return t})(r,s);else{const e=r.childNodes;s>=e.length?(n="after",s=e.length-1):n="before",r=e[s]}o.push(Qi(r));let a=((e,t,n)=>{const o=[];for(let r=t.parentNode;r&&r!==e&&(!n||!n(r));r=r.parentNode)o.push(r);return o})(e,r);return a=Te(a,B(Wo)),o=o.concat(Oe(a,(e=>Qi(e)))),o.reverse().join("/")+","+n},Zi=(e,t)=>{if(!t)return null;const n=t.split(","),o=n[0].split("/"),r=n.length>1?n[1]:"before",s=Be(o,((e,t)=>{const n=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t);return n?("text()"===n[1]&&(n[1]="#text"),((e,t,n)=>{let o=Yi(e);return o=Te(o,((e,t)=>!qi(e)||!qi(o[t-1]))),o=Te(o,$o([t])),o[n]})(e,n[1],parseInt(n[2],10))):null}),e);if(!s)return null;if(!qi(s)&&s.parentNode){let e;return e="after"===r?Ki(s)+1:Ki(s),Hi(s.parentNode,e)}return((e,t)=>{let n=e,o=0;for(;qi(n);){const r=n.data.length;if(t>=o&&t<=o+r){e=n,t-=o;break}if(!qi(n.nextSibling)){e=n,t=r;break}o+=r,n=n.nextSibling}return qi(e)&&t>e.data.length&&(t=e.data.length),Hi(e,t)})(s,parseInt(r,10))},el=sr,tl=(e,t,n,o,r)=>{const s=r?o.startContainer:o.endContainer;let a=r?o.startOffset:o.endOffset;const i=[],l=e.getRoot();if(Xo(s))i.push(n?((e,t,n)=>{let o=e(t.data.slice(0,n)).length;for(let n=t.previousSibling;n&&Xo(n);n=n.previousSibling)o+=e(n.data).length;return o})(t,s,a):a);else{let t=0;const o=s.childNodes;a>=o.length&&o.length&&(t=1,a=Math.max(0,o.length-1)),i.push(e.nodeIndex(o[a],n)+t)}for(let t=s;t&&t!==l;t=t.parentNode)i.push(e.nodeIndex(t,n));return i},nl=(e,t,n)=>{let o=0;return Pt.each(e.select(t),(e=>"all"===e.getAttribute("data-mce-bogus")?void 0:e!==n&&void o++)),o},ol=(e,t)=>{let n=t?e.startContainer:e.endContainer,o=t?e.startOffset:e.endOffset;if(jo(n)&&"TR"===n.nodeName){const r=n.childNodes;n=r[Math.min(t?o:o-1,r.length-1)],n&&(o=t?0:n.childNodes.length,t?e.setStart(n,o):e.setEnd(n,o))}},rl=e=>(ol(e,!0),ol(e,!1),e),sl=(e,t)=>{if(jo(e)&&(e=wi(e,t),el(e)))return e;if(zr(e)){Xo(e)&&Fr(e)&&(e=e.parentNode);let t=e.previousSibling;if(el(t))return t;if(t=e.nextSibling,el(t))return t}},al=(e,t,n)=>{const o=n.getNode(),r=n.getRng();if("IMG"===o.nodeName||el(o)){const e=o.nodeName;return{name:e,index:nl(n.dom,e,o)}}const s=(e=>sl(e.startContainer,e.startOffset)||sl(e.endContainer,e.endOffset))(r);if(s){const e=s.tagName;return{name:e,index:nl(n.dom,e,s)}}return((e,t,n,o)=>{const r=t.dom,s=tl(r,e,n,o,!0),a=t.isForward(),i=Kr(o)?{isFakeCaret:!0}:{};return t.isCollapsed()?{start:s,forward:a,...i}:{start:s,end:tl(r,e,n,o,!1),forward:a,...i}})(e,n,t,r)},il=(e,t,n)=>{const o={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"};return n?e.create("span",o,""):e.create("span",o)},ll=(e,t)=>{const n=e.dom;let o=e.getRng();const r=n.uniqueId(),s=e.isCollapsed(),a=e.getNode(),i=a.nodeName,l=e.isForward();if("IMG"===i)return{name:i,index:nl(n,i,a)};const d=rl(o.cloneRange());if(!s){d.collapse(!1);const e=il(n,r+"_end",t);Vi(n,d,e)}o=rl(o),o.collapse(!0);const c=il(n,r+"_start",t);return Vi(n,o,c),e.moveToBookmark({id:r,keep:!0,forward:l}),{id:r,forward:l}},dl=(e,t,n=!1)=>2===t?al(Lr,n,e):3===t?(e=>{const t=e.getRng();return{start:Ji(e.dom.getRoot(),Hi.fromRangeStart(t)),end:Ji(e.dom.getRoot(),Hi.fromRangeEnd(t)),forward:e.isForward()}})(e):t?(e=>({rng:e.getRng(),forward:e.isForward()}))(e):ll(e,!1),cl=T(al,D,!0),ml=e=>{const t=t=>t(e),n=A(e),o=()=>r,r={tag:!0,inner:e,fold:(t,n)=>n(e),isValue:F,isError:I,map:t=>fl.value(t(e)),mapError:o,bind:t,exists:t,forall:t,getOr:n,or:o,getOrThunk:n,orThunk:o,getOrDie:n,each:t=>{t(e)},toOptional:()=>U.some(e)};return r},ul=e=>{const t=()=>n,n={tag:!1,inner:e,fold:(t,n)=>t(e),isValue:I,isError:F,map:t,mapError:t=>fl.error(t(e)),bind:t,exists:I,forall:F,getOr:D,or:D,getOrThunk:L,orThunk:L,getOrDie:P(String(e)),each:_,toOptional:U.none};return n},fl={value:ml,error:ul,fromOption:(e,t)=>e.fold((()=>ul(t)),ml)},gl=e=>{if(!b(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");const t=[],n={};return K(e,((o,r)=>{const s=ge(o);if(1!==s.length)throw new Error("one and only one name per case");const a=s[0],i=o[a];if(void 0!==n[a])throw new Error("duplicate key detected:"+a);if("cata"===a)throw new Error("cannot have a case named cata (sorry)");if(!b(i))throw new Error("case arguments must be an array");t.push(a),n[a]=(...n)=>{const o=n.length;if(o!==i.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+i.length+" ("+i+"), got "+o);return{fold:(...t)=>{if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);return t[r].apply(null,n)},match:e=>{const o=ge(e);if(t.length!==o.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+o.join(","));if(!re(t,(e=>V(o,e))))throw new Error("Not all branches were specified when using match. Specified: "+o.join(", ")+"\nRequired: "+t.join(", "));return e[a].apply(null,n)},log:e=>{console.log(e,{constructors:t,constructor:a,params:n})}}}})),n};gl([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);const pl=e=>"inline-command"===e.type||"inline-format"===e.type,hl=e=>"block-command"===e.type||"block-format"===e.type,bl=e=>{const t=t=>fl.error({message:t,pattern:e}),n=(n,o,r)=>{if(void 0!==e.format){let r;if(b(e.format)){if(!re(e.format,g))return t(n+" pattern has non-string items in the `format` array");r=e.format}else{if(!g(e.format))return t(n+" pattern has non-string `format` parameter");r=[e.format]}return fl.value(o(r))}return void 0!==e.cmd?g(e.cmd)?fl.value(r(e.cmd,e.value)):t(n+" pattern has non-string `cmd` parameter"):t(n+" pattern is missing both `format` and `cmd` parameters")};if(!p(e))return t("Raw pattern is not an object");if(!g(e.start))return t("Raw pattern is missing `start` parameter");if(void 0!==e.end){if(!g(e.end))return t("Inline pattern has non-string `end` parameter");if(0===e.start.length&&0===e.end.length)return t("Inline pattern has empty `start` and `end` parameters");let o=e.start,r=e.end;return 0===r.length&&(r=o,o=""),n("Inline",(e=>({type:"inline-format",start:o,end:r,format:e})),((e,t)=>({type:"inline-command",start:o,end:r,cmd:e,value:t})))}return void 0!==e.replacement?g(e.replacement)?0===e.start.length?t("Replacement pattern has empty `start` parameter"):fl.value({type:"inline-command",start:"",end:e.start,cmd:"mceInsertContent",value:e.replacement}):t("Replacement pattern has non-string `replacement` parameter"):0===e.start.length?t("Block pattern has empty `start` parameter"):n("Block",(t=>({type:"block-format",start:e.start,format:t[0]})),((t,n)=>({type:"block-command",start:e.start,cmd:t,value:n})))},vl=e=>X(e,hl),yl=e=>X(e,pl),Cl=e=>{const t=(e=>{const t=[],n=[];return K(e,(e=>{e.fold((e=>{t.push(e)}),(e=>{n.push(e)}))})),{errors:t,values:n}})(W(e,bl));return K(t.errors,(e=>console.error(e.message,e.pattern))),t.values},wl=kt().deviceType,xl=wl.isTouch(),kl=Pa.DOM,El=e=>f(e,RegExp),Sl=e=>t=>t.options.get(e),_l=e=>g(e)||p(e),Nl=(e,t="")=>n=>{const o=g(n);if(o){if(-1!==n.indexOf("=")){const r=(e=>{const t=e.indexOf("=")>0?e.split(/[;,](?![^=;,]*(?:[;,]|$))/):e.split(",");return J(t,((e,t)=>{const n=t.split("="),o=n[0],r=n.length>1?n[1]:o;return e[Ke(o)]=Ke(r),e}),{})})(n);return{value:Ee(r,e.id).getOr(t),valid:o}}return{value:n,valid:o}}return{valid:!1,message:"Must be a string."}},Rl=Sl("iframe_attrs"),Al=Sl("doctype"),Dl=Sl("document_base_url"),Ol=Sl("body_id"),Tl=Sl("body_class"),Bl=Sl("content_security_policy"),Pl=Sl("br_in_pre"),Ll=Sl("forced_root_block"),Ml=Sl("forced_root_block_attrs"),Il=Sl("newline_behavior"),Fl=Sl("br_newline_selector"),Ul=Sl("no_newline_selector"),zl=Sl("keep_styles"),jl=Sl("end_container_on_empty_block"),Hl=Sl("automatic_uploads"),$l=Sl("images_reuse_filename"),Vl=Sl("images_replace_blob_uris"),ql=Sl("icons"),Wl=Sl("icons_url"),Kl=Sl("images_upload_url"),Gl=Sl("images_upload_base_path"),Yl=Sl("images_upload_credentials"),Xl=Sl("images_upload_handler"),Ql=Sl("content_css_cors"),Jl=Sl("referrer_policy"),Zl=Sl("language"),ed=Sl("language_url"),td=Sl("indent_use_margin"),nd=Sl("indentation"),od=Sl("content_css"),rd=Sl("content_style"),sd=Sl("font_css"),ad=Sl("directionality"),id=Sl("inline_boundaries_selector"),ld=Sl("object_resizing"),dd=Sl("resize_img_proportional"),cd=Sl("placeholder"),md=Sl("event_root"),ud=Sl("service_message"),fd=Sl("theme"),gd=Sl("theme_url"),pd=Sl("model"),hd=Sl("model_url"),bd=Sl("inline_boundaries"),vd=Sl("formats"),yd=Sl("preview_styles"),Cd=Sl("format_empty_lines"),wd=Sl("format_noneditable_selector"),xd=Sl("custom_ui_selector"),kd=Sl("inline"),Ed=Sl("hidden_input"),Sd=Sl("submit_patch"),_d=Sl("add_form_submit_trigger"),Nd=Sl("add_unload_trigger"),Rd=Sl("custom_undo_redo_levels"),Ad=Sl("disable_nodechange"),Dd=Sl("readonly"),Od=Sl("content_css_cors"),Td=Sl("plugins"),Bd=Sl("external_plugins"),Pd=Sl("block_unsupported_drop"),Ld=Sl("visual"),Md=Sl("visual_table_class"),Id=Sl("visual_anchor_class"),Fd=Sl("iframe_aria_text"),Ud=Sl("setup"),zd=Sl("init_instance_callback"),jd=Sl("urlconverter_callback"),Hd=Sl("auto_focus"),$d=Sl("browser_spellcheck"),Vd=Sl("protect"),qd=Sl("paste_block_drop"),Wd=Sl("paste_data_images"),Kd=Sl("paste_preprocess"),Gd=Sl("paste_postprocess"),Yd=Sl("paste_webkit_styles"),Xd=Sl("paste_remove_styles_if_webkit"),Qd=Sl("paste_merge_formats"),Jd=Sl("smart_paste"),Zd=Sl("paste_as_text"),ec=Sl("paste_tab_spaces"),tc=Sl("allow_html_data_urls"),nc=Sl("text_patterns"),oc=Sl("text_patterns_lookup"),rc=Sl("noneditable_class"),sc=Sl("editable_class"),ac=Sl("noneditable_regexp"),ic=Sl("preserve_cdata"),lc=Sl("highlight_on_focus"),dc=Sl("xss_sanitization"),cc=e=>Pt.explode(e.options.get("images_file_types")),mc=Sl("table_tab_navigation"),uc=jo,fc=Xo,gc=e=>{const t=e.parentNode;t&&t.removeChild(e)},pc=e=>{const t=Lr(e);return{count:e.length-t.length,text:t}},hc=e=>{let t;for(;-1!==(t=e.data.lastIndexOf(Br));)e.deleteData(t,1)},bc=(e,t)=>(wc(e),t),vc=(e,t)=>{const n=t.container(),o=((e,t)=>{const n=$(e,t);return-1===n?U.none():U.some(n)})(ue(n.childNodes),e).map((e=>e<t.offset()?Hi(n,t.offset()-1):t)).getOr(t);return wc(e),o},yc=(e,t)=>fc(e)&&t.container()===e?((e,t)=>{const n=pc(e.data.substr(0,t.offset())),o=pc(e.data.substr(t.offset()));return(n.text+o.text).length>0?(hc(e),Hi(e,t.offset()-n.count)):t})(e,t):bc(e,t),Cc=(e,t)=>Hi.isTextPosition(t)?yc(e,t):((e,t)=>t.container()===e.parentNode?vc(e,t):bc(e,t))(e,t),wc=e=>{uc(e)&&zr(e)&&(jr(e)?e.removeAttribute("data-mce-caret"):gc(e)),fc(e)&&(hc(e),0===e.data.length&&gc(e))},xc=sr,kc=lr,Ec=ar,Sc=(e,t,n)=>{const o=pi(t.getBoundingClientRect(),n);let r,s;if("BODY"===e.tagName){const t=e.ownerDocument.documentElement;r=e.scrollLeft||t.scrollLeft,s=e.scrollTop||t.scrollTop}else{const t=e.getBoundingClientRect();r=e.scrollLeft-t.left,s=e.scrollTop-t.top}o.left+=r,o.right+=r,o.top+=s,o.bottom+=s,o.width=1;let a=t.offsetWidth-t.clientWidth;return a>0&&(n&&(a*=-1),o.left+=a,o.right+=a),o},_c=(e,t,n,o)=>{const r=Va();let s,a;const i=Ll(e),l=e.dom,d=()=>{(e=>{var t,n;const o=Mo(bn.fromDom(e),"*[contentEditable=false],video,audio,embed,object");for(let e=0;e<o.length;e++){const r=o[e].dom;let s=r.previousSibling;if(qr(s)){const e=s.data;1===e.length?null===(t=s.parentNode)||void 0===t||t.removeChild(s):s.deleteData(e.length-1,1)}s=r.nextSibling,Vr(s)&&(1===s.data.length?null===(n=s.parentNode)||void 0===n||n.removeChild(s):s.deleteData(0,1))}})(t),a&&(wc(a),a=null),r.on((e=>{l.remove(e.caret),r.clear()})),s&&(clearInterval(s),s=void 0)},c=()=>{s=setInterval((()=>{r.on((e=>{o()?l.toggleClass(e.caret,"mce-visual-caret-hidden"):l.addClass(e.caret,"mce-visual-caret-hidden")}))}),500)};return{show:(e,o)=>{let s;if(d(),Ec(o))return null;if(!n(o))return a=((e,t)=>{var n;const o=(null!==(n=e.ownerDocument)&&void 0!==n?n:document).createTextNode(Br),r=e.parentNode;if(t){const t=e.previousSibling;if(Ir(t)){if(zr(t))return t;if(qr(t))return t.splitText(t.data.length-1)}null==r||r.insertBefore(o,e)}else{const t=e.nextSibling;if(Ir(t)){if(zr(t))return t;if(Vr(t))return t.splitText(1),t}e.nextSibling?null==r||r.insertBefore(o,e.nextSibling):null==r||r.appendChild(o)}return o})(o,e),s=o.ownerDocument.createRange(),Rc(a.nextSibling)?(s.setStart(a,0),s.setEnd(a,0)):(s.setStart(a,1),s.setEnd(a,1)),s;{const n=((e,t,n)=>{var o;const r=(null!==(o=t.ownerDocument)&&void 0!==o?o:document).createElement(e);r.setAttribute("data-mce-caret",n?"before":"after"),r.setAttribute("data-mce-bogus","all"),r.appendChild(Dr().dom);const s=t.parentNode;return n?null==s||s.insertBefore(r,t):t.nextSibling?null==s||s.insertBefore(r,t.nextSibling):null==s||s.appendChild(r),r})(i,o,e),d=Sc(t,o,e);l.setStyle(n,"top",d.top),a=n;const m=l.create("div",{class:"mce-visual-caret","data-mce-bogus":"all"});l.setStyles(m,{...d}),l.add(t,m),r.set({caret:m,element:o,before:e}),e&&l.addClass(m,"mce-visual-caret-before"),c(),s=o.ownerDocument.createRange(),s.setStart(n,0),s.setEnd(n,0)}return s},hide:d,getCss:()=>".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}",reposition:()=>{r.on((e=>{const n=Sc(t,e.element,e.before);l.setStyles(e.caret,{...n})}))},destroy:()=>clearInterval(s)}},Nc=()=>Dt.browser.isFirefox(),Rc=e=>xc(e)||kc(e),Ac=e=>(Rc(e)||Ko(e)&&Nc())&&Nn(bn.fromDom(e)).exists(eo),Dc=rr,Oc=sr,Tc=lr,Bc=Vo("display","block table table-cell table-caption list-item"),Pc=zr,Lc=Fr,Mc=jo,Ic=Xo,Fc=ns,Uc=e=>e>0,zc=e=>e<0,jc=(e,t)=>{let n;for(;n=e(t);)if(!Lc(n))return n;return null},Hc=(e,t,n,o,r)=>{const s=new Fo(e,o),a=Oc(e)||Lc(e);let i;if(zc(t)){if(a&&(i=jc(s.prev.bind(s),!0),n(i)))return i;for(;i=jc(s.prev.bind(s),r);)if(n(i))return i}if(Uc(t)){if(a&&(i=jc(s.next.bind(s),!0),n(i)))return i;for(;i=jc(s.next.bind(s),r);)if(n(i))return i}return null},$c=(e,t)=>{for(;e&&e!==t;){if(Bc(e))return e;e=e.parentNode}return null},Vc=(e,t,n)=>$c(e.container(),n)===$c(t.container(),n),qc=(e,t)=>{if(!t)return U.none();const n=t.container(),o=t.offset();return Mc(n)?U.from(n.childNodes[o+e]):U.none()},Wc=(e,t)=>{var n;const o=(null!==(n=t.ownerDocument)&&void 0!==n?n:document).createRange();return e?(o.setStartBefore(t),o.setEndBefore(t)):(o.setStartAfter(t),o.setEndAfter(t)),o},Kc=(e,t,n)=>$c(t,e)===$c(n,e),Gc=(e,t,n)=>{const o=e?"previousSibling":"nextSibling";let r=n;for(;r&&r!==t;){let e=r[o];if(e&&Pc(e)&&(e=e[o]),Oc(e)||Tc(e)){if(Kc(t,e,r))return e;break}if(Fc(e))break;r=r.parentNode}return null},Yc=T(Wc,!0),Xc=T(Wc,!1),Qc=(e,t,n)=>{let o;const r=T(Gc,!0,t),s=T(Gc,!1,t),a=n.startContainer,i=n.startOffset;if(Fr(a)){const e=Ic(a)?a.parentNode:a,t=e.getAttribute("data-mce-caret");if("before"===t&&(o=e.nextSibling,Ac(o)))return Yc(o);if("after"===t&&(o=e.previousSibling,Ac(o)))return Xc(o)}if(!n.collapsed)return n;if(Xo(a)){if(Pc(a)){if(1===e){if(o=s(a),o)return Yc(o);if(o=r(a),o)return Xc(o)}if(-1===e){if(o=r(a),o)return Xc(o);if(o=s(a),o)return Yc(o)}return n}if(qr(a)&&i>=a.data.length-1)return 1===e&&(o=s(a),o)?Yc(o):n;if(Vr(a)&&i<=1)return-1===e&&(o=r(a),o)?Xc(o):n;if(i===a.data.length)return o=s(a),o?Yc(o):n;if(0===i)return o=r(a),o?Xc(o):n}return n},Jc=(e,t)=>qc(e?0:-1,t).filter(Oc),Zc=(e,t,n)=>{const o=Qc(e,t,n);return-1===e?Hi.fromRangeStart(o):Hi.fromRangeEnd(o)},em=e=>U.from(e.getNode()).map(bn.fromDom),tm=(e,t)=>{let n=t;for(;n=e(n);)if(n.isVisible())return n;return n},nm=(e,t)=>{const n=Vc(e,t);return!(n||!nr(e.getNode()))||n};var om;!function(e){e[e.Backwards=-1]="Backwards",e[e.Forwards=1]="Forwards"}(om||(om={}));const rm=sr,sm=Xo,am=jo,im=nr,lm=ns,dm=e=>Zr(e)||(e=>!!os(e)&&!J(ue(e.getElementsByTagName("*")),((e,t)=>e||Gr(t)),!1))(e),cm=rs,mm=(e,t)=>e.hasChildNodes()&&t<e.childNodes.length?e.childNodes[t]:null,um=(e,t)=>{if(Uc(e)){if(lm(t.previousSibling)&&!sm(t.previousSibling))return Hi.before(t);if(sm(t))return Hi(t,0)}if(zc(e)){if(lm(t.nextSibling)&&!sm(t.nextSibling))return Hi.after(t);if(sm(t))return Hi(t,t.data.length)}return zc(e)?im(t)?Hi.before(t):Hi.after(t):Hi.before(t)},fm=(e,t,n)=>{let o,r,s,a;if(!am(n)||!t)return null;if(t.isEqual(Hi.after(n))&&n.lastChild){if(a=Hi.after(n.lastChild),zc(e)&&lm(n.lastChild)&&am(n.lastChild))return im(n.lastChild)?Hi.before(n.lastChild):a}else a=t;const i=a.container();let l=a.offset();if(sm(i)){if(zc(e)&&l>0)return Hi(i,--l);if(Uc(e)&&l<i.length)return Hi(i,++l);o=i}else{if(zc(e)&&l>0&&(r=mm(i,l-1),lm(r)))return!dm(r)&&(s=Hc(r,e,cm,r),s)?sm(s)?Hi(s,s.data.length):Hi.after(s):sm(r)?Hi(r,r.data.length):Hi.before(r);if(Uc(e)&&l<i.childNodes.length&&(r=mm(i,l),lm(r)))return im(r)?((e,t)=>{const n=t.nextSibling;return n&&lm(n)?sm(n)?Hi(n,0):Hi.before(n):fm(om.Forwards,Hi.after(t),e)})(n,r):!dm(r)&&(s=Hc(r,e,cm,r),s)?sm(s)?Hi(s,0):Hi.before(s):sm(r)?Hi(r,0):Hi.after(r);o=r||a.getNode()}if(o&&(Uc(e)&&a.isAtEnd()||zc(e)&&a.isAtStart())&&(o=Hc(o,e,F,n,!0),cm(o,n)))return um(e,o);r=o?Hc(o,e,cm,n):o;const d=Le(X(((e,t)=>{const n=[];let o=e;for(;o&&o!==t;)n.push(o),o=o.parentNode;return n})(i,n),rm));return!d||r&&d.contains(r)?r?um(e,r):null:(a=Uc(e)?Hi.after(d):Hi.before(d),a)},gm=e=>({next:t=>fm(om.Forwards,t,e),prev:t=>fm(om.Backwards,t,e)}),pm=e=>Hi.isTextPosition(e)?0===e.offset():ns(e.getNode()),hm=e=>{if(Hi.isTextPosition(e)){const t=e.container();return e.offset()===t.data.length}return ns(e.getNode(!0))},bm=(e,t)=>!Hi.isTextPosition(e)&&!Hi.isTextPosition(t)&&e.getNode()===t.getNode(!0),vm=(e,t,n)=>{return e?!bm(t,n)&&(o=t,!(!Hi.isTextPosition(o)&&nr(o.getNode())))&&hm(t)&&pm(n):!bm(n,t)&&pm(t)&&hm(n);var o},ym=(e,t,n)=>{const o=gm(t);return U.from(e?o.next(n):o.prev(n))},Cm=(e,t,n)=>ym(e,t,n).bind((o=>Vc(n,o,t)&&vm(e,n,o)?ym(e,t,o):U.some(o))),wm=(e,t,n,o)=>Cm(e,t,n).bind((n=>o(n)?wm(e,t,n,o):U.some(n))),xm=(e,t)=>{const n=e?t.firstChild:t.lastChild;return Xo(n)?U.some(Hi(n,e?0:n.data.length)):n?ns(n)?U.some(e?Hi.before(n):nr(o=n)?Hi.before(o):Hi.after(o)):((e,t,n)=>{const o=e?Hi.before(n):Hi.after(n);return ym(e,t,o)})(e,t,n):U.none();var o},km=T(ym,!0),Em=T(ym,!1),Sm=T(xm,!0),_m=T(xm,!1),Nm="_mce_caret",Rm=e=>jo(e)&&e.id===Nm,Am=(e,t)=>{let n=t;for(;n&&n!==e;){if(Rm(n))return n;n=n.parentNode}return null},Dm=e=>Se(e,"name"),Om=e=>Pt.isArray(e.start),Tm=e=>!(!Dm(e)&&y(e.forward))||e.forward,Bm=(e,t)=>(jo(t)&&e.isBlock(t)&&!t.innerHTML&&(t.innerHTML='<br data-mce-bogus="1" />'),t),Pm=(e,t)=>_m(e).fold(I,(e=>(t.setStart(e.container(),e.offset()),t.setEnd(e.container(),e.offset()),!0))),Lm=(e,t,n)=>!(!(e=>!e.hasChildNodes())(t)||!Am(e,t))&&(((e,t)=>{var n;const o=(null!==(n=e.ownerDocument)&&void 0!==n?n:document).createTextNode(Br);e.appendChild(o),t.setStart(o,0),t.setEnd(o,0)})(t,n),!0),Mm=(e,t,n,o)=>{const r=n[t?"start":"end"],s=e.getRoot();if(r){let e=s,n=r[0];for(let t=r.length-1;e&&t>=1;t--){const n=e.childNodes;if(Lm(s,e,o))return!0;if(r[t]>n.length-1)return!!Lm(s,e,o)||Pm(e,o);e=n[r[t]]}Xo(e)&&(n=Math.min(r[0],e.data.length)),jo(e)&&(n=Math.min(r[0],e.childNodes.length)),t?o.setStart(e,n):o.setEnd(e,n)}return!0},Im=e=>Xo(e)&&e.data.length>0,Fm=(e,t,n)=>{const o=e.get(n.id+"_"+t),r=null==o?void 0:o.parentNode,s=n.keep;if(o&&r){let a,i;if("start"===t?s?o.hasChildNodes()?(a=o.firstChild,i=1):Im(o.nextSibling)?(a=o.nextSibling,i=0):Im(o.previousSibling)?(a=o.previousSibling,i=o.previousSibling.data.length):(a=r,i=e.nodeIndex(o)+1):(a=r,i=e.nodeIndex(o)):s?o.hasChildNodes()?(a=o.firstChild,i=1):Im(o.previousSibling)?(a=o.previousSibling,i=o.previousSibling.data.length):(a=r,i=e.nodeIndex(o)):(a=r,i=e.nodeIndex(o)),!s){const r=o.previousSibling,s=o.nextSibling;let l;for(Pt.each(Pt.grep(o.childNodes),(e=>{Xo(e)&&(e.data=e.data.replace(/\uFEFF/g,""))}));l=e.get(n.id+"_"+t);)e.remove(l,!0);if(Xo(s)&&Xo(r)&&!Dt.browser.isOpera()){const t=r.data.length;r.appendData(s.data),e.remove(s),a=r,i=t}}return U.some(Hi(a,i))}return U.none()},Um=(e,t)=>{const n=e.dom;if(t){if(Om(t))return((e,t)=>{const n=e.createRng();return Mm(e,!0,t,n)&&Mm(e,!1,t,n)?U.some({range:n,forward:Tm(t)}):U.none()})(n,t);if((e=>g(e.start))(t))return((e,t)=>{const n=U.from(Zi(e.getRoot(),t.start)),o=U.from(Zi(e.getRoot(),t.end));return Mt(n,o,((n,o)=>{const r=e.createRng();return r.setStart(n.container(),n.offset()),r.setEnd(o.container(),o.offset()),{range:r,forward:Tm(t)}}))})(n,t);if((e=>Se(e,"id"))(t))return((e,t)=>{const n=Fm(e,"start",t),o=Fm(e,"end",t);return Mt(n,o.or(n),((n,o)=>{const r=e.createRng();return r.setStart(Bm(e,n.container()),n.offset()),r.setEnd(Bm(e,o.container()),o.offset()),{range:r,forward:Tm(t)}}))})(n,t);if(Dm(t))return((e,t)=>U.from(e.select(t.name)[t.index]).map((t=>{const n=e.createRng();return n.selectNode(t),{range:n,forward:!0}})))(n,t);if((e=>Se(e,"rng"))(t))return U.some({range:t.rng,forward:Tm(t)})}return U.none()},zm=(e,t,n)=>dl(e,t,n),jm=(e,t)=>{Um(e,t).each((({range:t,forward:n})=>{e.setRng(t,n)}))},Hm=e=>jo(e)&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type"),$m=(Vm=mr,e=>Vm===e);var Vm;const qm=e=>""!==e&&-1!==" \f\n\r\t\v".indexOf(e),Wm=e=>!qm(e)&&!$m(e)&&!ur(e),Km=e=>He(e,"#").toUpperCase(),Gm=e=>{const t=e.toString(16);return(1===t.length?"0"+t:t).toUpperCase()},Ym=e=>(e=>({value:Km(e)}))(Gm(e.red)+Gm(e.green)+Gm(e.blue)),Xm=/^\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)\s*$/i,Qm=/^\s*rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?(?:\.\d+)?)\s*\)\s*$/i,Jm=(e,t,n,o)=>({red:e,green:t,blue:n,alpha:o}),Zm=(e,t,n,o)=>{const r=parseInt(e,10),s=parseInt(t,10),a=parseInt(n,10),i=parseFloat(o);return Jm(r,s,a,i)},eu=e=>(e=>{if("transparent"===e)return U.some(Jm(0,0,0,0));const t=Xm.exec(e);if(null!==t)return U.some(Zm(t[1],t[2],t[3],"1"));const n=Qm.exec(e);return null!==n?U.some(Zm(n[1],n[2],n[3],n[4])):U.none()})(e).map(Ym).map((e=>"#"+e.value)).getOr(e),tu=e=>{const t=[];if(e)for(let n=0;n<e.rangeCount;n++)t.push(e.getRangeAt(n));return t},nu=e=>X((e=>oe(e,(e=>{const t=Ci(e);return t?[bn.fromDom(t)]:[]})))(e),Sr),ou=(e,t)=>{const n=Mo(t,"td[data-mce-selected],th[data-mce-selected]");return n.length>0?n:nu(e)},ru=e=>ou(tu(e.selection.getSel()),bn.fromDom(e.getBody())),su=(e,t)=>Qn(e,"table",t),au=e=>Ln(e).fold(A([e]),(t=>[e].concat(au(t)))),iu=e=>Mn(e).fold(A([e]),(t=>"br"===$t(t)?An(t).map((t=>[e].concat(iu(t)))).getOr([]):[e].concat(iu(t)))),lu=(e,t)=>Mt((e=>{const t=e.startContainer,n=e.startOffset;return Xo(t)?0===n?U.some(bn.fromDom(t)):U.none():U.from(t.childNodes[n]).map(bn.fromDom)})(t),(e=>{const t=e.endContainer,n=e.endOffset;return Xo(t)?n===t.data.length?U.some(bn.fromDom(t)):U.none():U.from(t.childNodes[n-1]).map(bn.fromDom)})(t),((t,n)=>{const o=ee(au(e),T(wn,t)),r=ee(iu(e),T(wn,n));return o.isSome()&&r.isSome()})).getOr(!1),du=(e,t,n,o)=>{const r=n,s=new Fo(n,r),a=we(e.schema.getMoveCaretBeforeOnEnterElements(),((e,t)=>!V(["td","th","table"],t.toLowerCase())));let i=n;do{if(Xo(i)&&0!==Pt.trim(i.data).length)return void(o?t.setStart(i,0):t.setEnd(i,i.data.length));if(a[i.nodeName])return void(o?t.setStartBefore(i):"BR"===i.nodeName?t.setEndBefore(i):t.setEndAfter(i))}while(i=o?s.next():s.prev());"BODY"===r.nodeName&&(o?t.setStart(r,0):t.setEnd(r,r.childNodes.length))},cu=e=>{const t=e.selection.getSel();return x(t)&&t.rangeCount>0},mu=(e,t)=>{const n=ru(e);n.length>0?K(n,(n=>{const o=n.dom,r=e.dom.createRng();r.setStartBefore(o),r.setEndAfter(o),t(r,!0)})):t(e.selection.getRng(),!1)},uu=(e,t,n)=>{const o=ll(e,t);n(o),e.moveToBookmark(o)},fu=e=>E(null==e?void 0:e.nodeType),gu=e=>jo(e)&&!Hm(e)&&!Rm(e)&&!Wo(e),pu=e=>!0===e.isContentEditable,hu=(e,t,n)=>{const{selection:o,dom:r}=e,s=o.getNode(),a=sr(s);uu(o,!0,(()=>{t()}));a&&sr(s)&&r.isChildOf(s,e.getBody())?e.selection.select(s):n(o.getStart())&&bu(r,o)},bu=(e,t)=>{var n,o;const r=t.getRng(),{startContainer:s,startOffset:a}=r;if(!((e,t)=>{if(gu(t)&&!/^(TD|TH)$/.test(t.nodeName)){const n=e.getAttrib(t,"data-mce-selected"),o=parseInt(n,10);return!isNaN(o)&&o>0}return!1})(e,t.getNode())&&jo(s)){const i=s.childNodes,l=e.getRoot();let d;if(a<i.length){const t=i[a];d=new Fo(t,null!==(n=e.getParent(t,e.isBlock))&&void 0!==n?n:l)}else{const t=i[i.length-1];d=new Fo(t,null!==(o=e.getParent(t,e.isBlock))&&void 0!==o?o:l),d.next(!0)}for(let n=d.current();n;n=d.next()){if("false"===e.getContentEditable(n))return;if(Xo(n)&&!wu(n))return r.setStart(n,0),void t.setRng(r)}}},vu=(e,t,n)=>{if(e){const o=t?"nextSibling":"previousSibling";for(e=n?e:e[o];e;e=e[o])if(jo(e)||!wu(e))return e}},yu=(e,t)=>!!e.getTextBlockElements()[t.nodeName.toLowerCase()]||Rs(e,t),Cu=(e,t,n)=>e.schema.isValidChild(t,n),wu=(e,t=!1)=>{if(x(e)&&Xo(e)){const n=t?e.data.replace(/ /g," "):e.data;return as(n)}return!1},xu=(e,t)=>{const n=e.dom;return gu(t)&&"false"===n.getContentEditable(t)&&((e,t)=>{const n="[data-mce-cef-wrappable]",o=wd(e),r=Qe(o)?n:`${n},${o}`;return yn(bn.fromDom(t),r)})(e,t)&&0===n.select('[contenteditable="true"]',t).length},ku=(e,t)=>k(e)?e(t):(x(t)&&(e=e.replace(/%(\w+)/g,((e,n)=>t[n]||e))),e),Eu=(e,t)=>(t=t||"",e=""+((e=e||"").nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()===t.toLowerCase()),Su=(e,t)=>{if(w(e))return null;{let n=String(e);return"color"!==t&&"backgroundColor"!==t||(n=eu(n)),"fontWeight"===t&&700===e&&(n="bold"),"fontFamily"===t&&(n=n.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),n}},_u=(e,t,n)=>{const o=e.getStyle(t,n);return Su(o,n)},Nu=(e,t)=>{let n;return e.getParent(t,(t=>!!jo(t)&&(n=e.getStyle(t,"text-decoration"),!!n&&"none"!==n))),n},Ru=(e,t,n)=>e.getParents(t,n,e.getRoot()),Au=(e,t,n)=>{const o=e.formatter.get(t);return x(o)&&q(o,n)},Du=(e,t,n)=>{const o=["inline","block","selector","attributes","styles","classes"],r=e=>we(e,((e,t)=>q(o,(e=>e===t))));return Au(e,t,(t=>{const o=r(t);return Au(e,n,(e=>{const t=r(e);return((e,t,n=i)=>a(n).eq(e,t))(o,t)}))}))},Ou=e=>_e(e,"block"),Tu=e=>_e(e,"selector"),Bu=e=>_e(e,"inline"),Pu=e=>Tu(e)&&!1!==e.expand&&!Bu(e),Lu=Hm,Mu=Ru,Iu=wu,Fu=yu,Uu=(e,t)=>{let n=t;for(;n;){if(jo(n)&&e.getContentEditable(n))return"false"===e.getContentEditable(n)?n:t;n=n.parentNode}return t},zu=(e,t,n,o)=>{const r=t.data;if(e){for(let e=n;e>0;e--)if(o(r.charAt(e-1)))return e}else for(let e=n;e<r.length;e++)if(o(r.charAt(e)))return e;return-1},ju=(e,t,n)=>zu(e,t,n,(e=>$m(e)||qm(e))),Hu=(e,t,n)=>zu(e,t,n,Wm),$u=(e,t,n,o,r,s)=>{let a;const i=e.getParent(n,e.isBlock)||t,l=(t,n,o)=>{const s=ui(e),l=r?s.backwards:s.forwards;return U.from(l(t,n,((e,t)=>Lu(e.parentNode)?-1:(a=e,o(r,e,t))),i))};return l(n,o,ju).bind((e=>s?l(e.container,e.offset+(r?-1:0),Hu):U.some(e))).orThunk((()=>a?U.some({container:a,offset:r?0:a.length}):U.none()))},Vu=(e,t,n,o,r)=>{const s=o[r];Xo(o)&&Qe(o.data)&&s&&(o=s);const a=Mu(e,o);for(let o=0;o<a.length;o++)for(let r=0;r<t.length;r++){const s=t[r];if((!x(s.collapsed)||s.collapsed===n.collapsed)&&(Tu(s)&&e.is(a[o],s.selector)))return a[o]}return o},qu=(e,t,n,o)=>{var r;let s=n;const a=e.getRoot(),i=t[0];if(Ou(i)&&(s=i.wrapper?null:e.getParent(n,i.block,a)),!s){const t=null!==(r=e.getParent(n,"LI,TD,TH"))&&void 0!==r?r:a;s=e.getParent(Xo(n)?n.parentNode:n,(t=>t!==a&&Fu(e.schema,t)),t)}if(s&&Ou(i)&&i.wrapper&&(s=Mu(e,s,"ul,ol").reverse()[0]||s),!s)for(s=n;s&&s[o]&&!e.isBlock(s[o])&&(s=s[o],!Eu(s,"br")););return s||n},Wu=(e,t,n,o)=>{const r=n.parentNode;return!x(n[o])&&(!(r!==t&&!w(r)&&!e.isBlock(r))||Wu(e,t,r,o))},Ku=(e,t,n,o,r)=>{let s=n;const a=r?"previousSibling":"nextSibling",i=e.getRoot();if(Xo(n)&&!Iu(n)&&(r?o>0:o<n.data.length))return n;for(;s;){if(!t[0].block_expand&&e.isBlock(s))return s;for(let t=s[a];t;t=t[a]){const n=Xo(t)&&!Wu(e,i,t,a);if(!Lu(t)&&(!nr(l=t)||!l.getAttribute("data-mce-bogus")||l.nextSibling)&&!Iu(t,n))return s}if(s===i||s.parentNode===i){n=s;break}s=s.parentNode}var l;return n},Gu=e=>Lu(e.parentNode)||Lu(e),Yu=(e,t,n,o=!1)=>{let{startContainer:r,startOffset:s,endContainer:a,endOffset:i}=t;const l=n[0];if(jo(r)&&r.hasChildNodes()&&(r=wi(r,s),Xo(r)&&(s=0)),jo(a)&&a.hasChildNodes()&&(a=wi(a,t.collapsed?i:i-1),Xo(a)&&(i=a.data.length)),r=Uu(e,r),a=Uu(e,a),Gu(r)&&(r=Lu(r)?r:r.parentNode,r=t.collapsed?r.previousSibling||r:r.nextSibling||r,Xo(r)&&(s=t.collapsed?r.length:0)),Gu(a)&&(a=Lu(a)?a:a.parentNode,a=t.collapsed?a.nextSibling||a:a.previousSibling||a,Xo(a)&&(i=t.collapsed?0:a.length)),t.collapsed){$u(e,e.getRoot(),r,s,!0,o).each((({container:e,offset:t})=>{r=e,s=t}));$u(e,e.getRoot(),a,i,!1,o).each((({container:e,offset:t})=>{a=e,i=t}))}return(Bu(l)||l.block_expand)&&(Bu(l)&&Xo(r)&&0!==s||(r=Ku(e,n,r,s,!0)),Bu(l)&&Xo(a)&&i!==a.data.length||(a=Ku(e,n,a,i,!1))),Pu(l)&&(r=Vu(e,n,t,r,"previousSibling"),a=Vu(e,n,t,a,"nextSibling")),(Ou(l)||Tu(l))&&(r=qu(e,n,r,"previousSibling"),a=qu(e,n,a,"nextSibling"),Ou(l)&&(e.isBlock(r)||(r=Ku(e,n,r,s,!0)),e.isBlock(a)||(a=Ku(e,n,a,i,!1)))),jo(r)&&r.parentNode&&(s=e.nodeIndex(r),r=r.parentNode),jo(a)&&a.parentNode&&(i=e.nodeIndex(a)+1,a=a.parentNode),{startContainer:r,startOffset:s,endContainer:a,endOffset:i}},Xu=(e,t,n)=>{var o;const r=t.startOffset,s=wi(t.startContainer,r),a=t.endOffset,i=wi(t.endContainer,a-1),l=e=>{const t=e[0];Xo(t)&&t===s&&r>=t.data.length&&e.splice(0,1);const n=e[e.length-1];return 0===a&&e.length>0&&n===i&&Xo(n)&&e.splice(e.length-1,1),e},d=(e,t,n)=>{const o=[];for(;e&&e!==n;e=e[t])o.push(e);return o},c=(t,n)=>e.getParent(t,(e=>e.parentNode===n),n),m=(e,t,o)=>{const r=o?"nextSibling":"previousSibling";for(let s=e,a=s.parentNode;s&&s!==t;s=a){a=s.parentNode;const t=d(s===e?s:s[r],r);t.length&&(o||t.reverse(),n(l(t)))}};if(s===i)return n(l([s]));const u=null!==(o=e.findCommonAncestor(s,i))&&void 0!==o?o:e.getRoot();if(e.isChildOf(s,i))return m(s,u,!0);if(e.isChildOf(i,s))return m(i,u);const f=c(s,u)||s,g=c(i,u)||i;m(s,f,!0);const p=d(f===s?f:f.nextSibling,"nextSibling",g===i?g.nextSibling:g);p.length&&n(l(p)),m(i,g)},Qu=['pre[class*=language-][contenteditable="false"]',"figure.image","div[data-ephox-embed-iri]","div.tiny-pageembed","div.mce-toc","div[data-mce-toc]"],Ju=(e,t,n,o)=>_n(t).fold((()=>"skipping"),(r=>"br"===o||(e=>Kt(e)&&gr(e)===Br)(t)?"valid":(e=>Wt(e)&&pn(e,Ka()))(t)?"existing":Rm(t.dom)?"caret":q(Qu,(e=>yn(t,e)))?"valid-block":Cu(e,n,o)&&Cu(e,$t(r),n)?"valid":"invalid-child")),Zu=(e,t,n,o,r,s)=>{const{uid:a=t,...i}=n;mn(e,Ka()),Jt(e,`${Ya()}`,a),Jt(e,`${Ga()}`,o);const{attributes:l={},classes:d=[]}=r(a,i);if(Zt(e,l),((e,t)=>{K(t,(t=>{mn(e,t)}))})(e,d),s){d.length>0&&Jt(e,`${Qa()}`,d.join(","));const t=ge(l);t.length>0&&Jt(e,`${Ja()}`,t.join(","))}},ef=e=>{fn(e,Ka()),on(e,`${Ya()}`),on(e,`${Ga()}`),on(e,`${Xa()}`);const t=tn(e,`${Ja()}`).map((e=>e.split(","))).getOr([]),n=tn(e,`${Qa()}`).map((e=>e.split(","))).getOr([]);var o;K(t,(t=>on(e,t))),o=e,K(n,(e=>{fn(o,e)})),on(e,`${Qa()}`),on(e,`${Ja()}`)},tf=(e,t,n,o,r)=>{const s=bn.fromTag("span",e);return Zu(s,t,n,o,r,!1),s},nf=(e,t,n,o,r,s)=>{const a=[],i=tf(e.getDoc(),n,s,o,r),l=Va(),d=()=>{l.clear()},c=e=>{K(e,m)},m=t=>{switch(Ju(e,t,"span",$t(t))){case"invalid-child":{d();const e=Bn(t);c(e),d();break}case"valid-block":d(),Zu(t,n,s,o,r,!0);break;case"valid":{const e=l.get().getOrThunk((()=>{const e=li(i);return a.push(e),l.set(e),e}));ho(t,e);break}}};return Xu(e.dom,t,(e=>{d(),(e=>{const t=W(e,bn.fromDom);c(t)})(e)})),a},of=(e,t,n,o)=>{e.undoManager.transact((()=>{const r=e.selection,s=r.getRng(),a=ru(e).length>0,i=ai("mce-annotation");if(s.collapsed&&!a&&((e,t)=>{const n=Yu(e.dom,t,[{inline:"span"}]);t.setStart(n.startContainer,n.startOffset),t.setEnd(n.endContainer,n.endOffset),e.selection.setRng(t)})(e,s),r.getRng().collapsed&&!a){const s=tf(e.getDoc(),i,o,t,n.decorate);ko(s,mr),r.getRng().insertNode(s.dom),r.select(s.dom)}else uu(r,!1,(()=>{mu(e,(r=>{nf(e,r,i,t,n.decorate,o)}))}))}))},rf=e=>{const t=(()=>{const e={};return{register:(t,n)=>{e[t]={name:t,settings:n}},lookup:t=>Ee(e,t).map((e=>e.settings)),getNames:()=>ge(e)}})();((e,t)=>{const n=Ga(),o=e=>U.from(e.attr(n)).bind(t.lookup),r=e=>{var t,n;e.attr(Ya(),null),e.attr(Ga(),null),e.attr(Xa(),null);const o=U.from(e.attr(Ja())).map((e=>e.split(","))).getOr([]),r=U.from(e.attr(Qa())).map((e=>e.split(","))).getOr([]);K(o,(t=>e.attr(t,null)));const s=null!==(n=null===(t=e.attr("class"))||void 0===t?void 0:t.split(" "))&&void 0!==n?n:[],a=ae(s,[Ka()].concat(r));e.attr("class",a.length>0?a.join(" "):null),e.attr(Qa(),null),e.attr(Ja(),null)};e.serializer.addTempAttr(Xa()),e.serializer.addAttributeFilter(n,(e=>{for(const t of e)o(t).each((e=>{!1===e.persistent&&("span"===t.name?t.unwrap():r(t))}))}))})(e,t);const n=ri(e,t),o=Xt("span"),r=e=>{K(e,(e=>{o(e)?Co(e):ef(e)}))};return{register:(e,n)=>{t.register(e,n)},annotate:(n,o)=>{t.lookup(n).each((t=>{of(e,n,t,o)}))},annotationChanged:(e,t)=>{n.addListener(e,t)},remove:t=>{ei(e,U.some(t)).each((({elements:t})=>{const n=e.selection.getBookmark();r(t),e.selection.moveToBookmark(n)}))},removeAll:t=>{const n=e.selection.getBookmark();he(oi(e,t),((e,t)=>{r(e)})),e.selection.moveToBookmark(n)},getAll:t=>{const n=oi(e,t);return be(n,(e=>W(e,(e=>e.dom))))}}},sf=e=>({getBookmark:T(zm,e),moveToBookmark:T(jm,e)});sf.isBookmarkNode=Hm;const af=(e,t,n)=>!n.collapsed&&q(n.getClientRects(),(n=>((e,t,n)=>t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom)(n,e,t))),lf=(e,t,n)=>{e.dispatch(t,n)},df=(e,t,n,o)=>{e.dispatch("FormatApply",{format:t,node:n,vars:o})},cf=(e,t,n,o)=>{e.dispatch("FormatRemove",{format:t,node:n,vars:o})},mf=(e,t)=>e.dispatch("SetContent",t),uf=(e,t)=>e.dispatch("GetContent",t),ff=(e,t)=>e.dispatch("PastePlainTextToggle",{state:t}),gf={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,ESC:27,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,modifierPressed:e=>e.shiftKey||e.ctrlKey||e.altKey||gf.metaKeyPressed(e),metaKeyPressed:e=>Dt.os.isMacOS()||Dt.os.isiOS()?e.metaKey:e.ctrlKey&&!e.altKey},pf="data-mce-selected",hf=Math.abs,bf=Math.round,vf={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},yf=(e,t)=>{const n=t.dom,o=t.getDoc(),r=document,s=t.getBody();let a,i,l,d,c,m,u,f,g,p,h,b,v,y,C;const w=e=>x(e)&&(or(e)||n.is(e,"figure.image")),k=e=>lr(e)||n.hasClass(e,"mce-preview-object"),E=e=>{const n=e.target;((e,t)=>{if((e=>"longpress"===e.type||0===e.type.indexOf("touch"))(e)){const n=e.touches[0];return w(e.target)&&!af(n.clientX,n.clientY,t)}return w(e.target)&&!af(e.clientX,e.clientY,t)})(e,t.selection.getRng())&&!e.isDefaultPrevented()&&t.selection.select(n)},S=e=>n.hasClass(e,"mce-preview-object")&&x(e.firstElementChild)?[e,e.firstElementChild]:n.is(e,"figure.image")?[e.querySelector("img")]:[e],_=e=>{const o=ld(t);return!!o&&("false"!==e.getAttribute("data-mce-resize")&&(e!==t.getBody()&&(n.hasClass(e,"mce-preview-object")&&x(e.firstElementChild)?yn(bn.fromDom(e.firstElementChild),o):yn(bn.fromDom(e),o))))},N=(e,o,r)=>{if(x(r)){const s=S(e);K(s,(e=>{e.style[o]||!t.schema.isValid(e.nodeName.toLowerCase(),o)?n.setStyle(e,o,r):n.setAttrib(e,o,""+r)}))}},R=(e,t,n)=>{N(e,"width",t),N(e,"height",n)},A=e=>{let o,r,c,x,E;o=e.screenX-m,r=e.screenY-u,b=o*d[2]+f,v=r*d[3]+g,b=b<5?5:b,v=v<5?5:v,c=(w(a)||k(a))&&!1!==dd(t)?!gf.modifierPressed(e):gf.modifierPressed(e),c&&(hf(o)>hf(r)?(v=bf(b*p),b=bf(v/p)):(b=bf(v/p),v=bf(b*p))),R(i,b,v),x=d.startPos.x+o,E=d.startPos.y+r,x=x>0?x:0,E=E>0?E:0,n.setStyles(l,{left:x,top:E,display:"block"}),l.innerHTML=b+" × "+v,d[2]<0&&i.clientWidth<=b&&n.setStyle(i,"left",undefined+(f-b)),d[3]<0&&i.clientHeight<=v&&n.setStyle(i,"top",undefined+(g-v)),o=s.scrollWidth-y,r=s.scrollHeight-C,o+r!==0&&n.setStyles(l,{left:x-o,top:E-r}),h||(((e,t,n,o,r)=>{e.dispatch("ObjectResizeStart",{target:t,width:n,height:o,origin:r})})(t,a,f,g,"corner-"+d.name),h=!0)},D=()=>{const e=h;h=!1,e&&(N(a,"width",b),N(a,"height",v)),n.unbind(o,"mousemove",A),n.unbind(o,"mouseup",D),r!==o&&(n.unbind(r,"mousemove",A),n.unbind(r,"mouseup",D)),n.remove(i),n.remove(l),n.remove(c),O(a),e&&(((e,t,n,o,r)=>{e.dispatch("ObjectResized",{target:t,width:n,height:o,origin:r})})(t,a,b,v,"corner-"+d.name),n.setAttrib(a,"style",n.getAttrib(a,"style"))),t.nodeChanged()},O=e=>{M();const h=n.getPos(e,s),w=h.x,x=h.y,E=e.getBoundingClientRect(),N=E.width||E.right-E.left,O=E.height||E.bottom-E.top;a!==e&&(B(),a=e,b=v=0);const T=t.dispatch("ObjectSelected",{target:e});_(e)&&!T.isDefaultPrevented()?he(vf,((e,t)=>{const h=h=>{const b=S(a)[0];var v;m=h.screenX,u=h.screenY,f=b.clientWidth,g=b.clientHeight,p=g/f,d=e,d.name=t,d.startPos={x:N*e[0]+w,y:O*e[1]+x},y=s.scrollWidth,C=s.scrollHeight,c=n.add(s,"div",{class:"mce-resize-backdrop","data-mce-bogus":"all"}),n.setStyles(c,{position:"fixed",left:"0",top:"0",width:"100%",height:"100%"}),i=k(v=a)?n.create("img",{src:Dt.transparentSrc}):v.cloneNode(!0),n.addClass(i,"mce-clonedresizable"),n.setAttrib(i,"data-mce-bogus","all"),i.contentEditable="false",n.setStyles(i,{left:w,top:x,margin:0}),R(i,N,O),i.removeAttribute(pf),s.appendChild(i),n.bind(o,"mousemove",A),n.bind(o,"mouseup",D),r!==o&&(n.bind(r,"mousemove",A),n.bind(r,"mouseup",D)),l=n.add(s,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},f+" × "+g)};let b=n.get("mceResizeHandle"+t);b&&n.remove(b),b=n.add(s,"div",{id:"mceResizeHandle"+t,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+t+"-resize; margin:0; padding:0"}),n.bind(b,"mousedown",(e=>{e.stopImmediatePropagation(),e.preventDefault(),h(e)})),e.elm=b,n.setStyles(b,{left:N*e[0]+w-b.offsetWidth/2,top:O*e[1]+x-b.offsetHeight/2})})):B(!1)},T=qa(O,0),B=(e=!0)=>{T.cancel(),M(),a&&e&&a.removeAttribute(pf),he(vf,((e,t)=>{const o=n.get("mceResizeHandle"+t);o&&(n.unbind(o),n.remove(o))}))},P=(e,t)=>n.isChildOf(e,t),L=o=>{if(h||t.removed||t.composing)return;const r="mousedown"===o.type?o.target:e.getNode(),a=Zn(bn.fromDom(r),"table,img,figure.image,hr,video,span.mce-preview-object").map((e=>e.dom)).filter((e=>n.isEditable(e.parentElement))).getOrUndefined(),i=x(a)?n.getAttrib(a,pf,"1"):"1";if(K(n.select("img[data-mce-selected],hr[data-mce-selected]"),(e=>{e.removeAttribute(pf)})),x(a)&&P(a,s)){I();const t=e.getStart(!0);if(P(t,a)&&P(e.getEnd(!0),a))return n.setAttrib(a,pf,i),void T.throttle(a)}B()},M=()=>{he(vf,(e=>{e.elm&&(n.unbind(e.elm),delete e.elm)}))},I=()=>{try{t.getDoc().execCommand("enableObjectResizing",!1,"false")}catch(e){}};t.on("init",(()=>{I(),t.on("NodeChange ResizeEditor ResizeWindow ResizeContent drop",L),t.on("keyup compositionend",(e=>{a&&"TABLE"===a.nodeName&&L(e)})),t.on("hide blur",B),t.on("contextmenu longpress",E,!0)})),t.on("remove",M);return{isResizable:_,showResizeRect:O,hideResizeRect:B,updateResizeRect:L,destroy:()=>{T.cancel(),a=i=c=null}}},Cf=(e,t,n)=>{const o=e.document.createRange();var r;return r=o,t.fold((e=>{r.setStartBefore(e.dom)}),((e,t)=>{r.setStart(e.dom,t)}),(e=>{r.setStartAfter(e.dom)})),((e,t)=>{t.fold((t=>{e.setEndBefore(t.dom)}),((t,n)=>{e.setEnd(t.dom,n)}),(t=>{e.setEndAfter(t.dom)}))})(o,n),o},wf=(e,t,n,o,r)=>{const s=e.document.createRange();return s.setStart(t.dom,n),s.setEnd(o.dom,r),s},xf=gl([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),kf=(e,t,n)=>t(bn.fromDom(n.startContainer),n.startOffset,bn.fromDom(n.endContainer),n.endOffset),Ef=(e,t)=>{const n=((e,t)=>t.match({domRange:e=>({ltr:A(e),rtl:U.none}),relative:(t,n)=>({ltr:Me((()=>Cf(e,t,n))),rtl:Me((()=>U.some(Cf(e,n,t))))}),exact:(t,n,o,r)=>({ltr:Me((()=>wf(e,t,n,o,r))),rtl:Me((()=>U.some(wf(e,o,r,t,n))))})}))(e,t);return((e,t)=>{const n=t.ltr();if(n.collapsed)return t.rtl().filter((e=>!1===e.collapsed)).map((e=>xf.rtl(bn.fromDom(e.endContainer),e.endOffset,bn.fromDom(e.startContainer),e.startOffset))).getOrThunk((()=>kf(0,xf.ltr,n)));return kf(0,xf.ltr,n)})(0,n)};xf.ltr,xf.rtl;const Sf=(e,t,n,o)=>({start:e,soffset:t,finish:n,foffset:o}),_f=(e,t,n)=>{var o,r;return U.from(null===(r=(o=e.dom).caretPositionFromPoint)||void 0===r?void 0:r.call(o,t,n)).bind((t=>{if(null===t.offsetNode)return U.none();const n=e.dom.createRange();return n.setStart(t.offsetNode,t.offset),n.collapse(),U.some(n)}))},Nf=(e,t,n)=>{var o,r;return U.from(null===(r=(o=e.dom).caretRangeFromPoint)||void 0===r?void 0:r.call(o,t,n))},Rf=document.caretPositionFromPoint?_f:document.caretRangeFromPoint?Nf:U.none,Af=gl([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Df={before:Af.before,on:Af.on,after:Af.after,cata:(e,t,n,o)=>e.fold(t,n,o),getStart:e=>e.fold(D,D,D)},Of=gl([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Tf={domRange:Of.domRange,relative:Of.relative,exact:Of.exact,exactFromRange:e=>Of.exact(e.start,e.soffset,e.finish,e.foffset),getWin:e=>{const t=(e=>e.match({domRange:e=>bn.fromDom(e.startContainer),relative:(e,t)=>Df.getStart(e),exact:(e,t,n,o)=>e}))(e);return Sn(t)},range:Sf},Bf=(e,t)=>{const n=$t(e);return"input"===n?Df.after(e):V(["br","img"],n)?0===t?Df.before(e):Df.after(e):Df.on(e,t)},Pf=(e,t)=>{const n=e.fold(Df.before,Bf,Df.after),o=t.fold(Df.before,Bf,Df.after);return Tf.relative(n,o)},Lf=(e,t,n,o)=>{const r=Bf(e,t),s=Bf(n,o);return Tf.relative(r,s)},Mf=(e,t)=>{const n=(t||document).createDocumentFragment();return K(e,(e=>{n.appendChild(e.dom)})),bn.fromDom(n)},If=e=>{const t=Tf.getWin(e).dom,n=(e,n,o,r)=>wf(t,e,n,o,r),o=(e=>e.match({domRange:e=>{const t=bn.fromDom(e.startContainer),n=bn.fromDom(e.endContainer);return Lf(t,e.startOffset,n,e.endOffset)},relative:Pf,exact:Lf}))(e);return Ef(t,o).match({ltr:n,rtl:n})},Ff=(e,t,n)=>((e,t,n)=>{const o=bn.fromDom(e.document);return Rf(o,t,n).map((e=>Sf(bn.fromDom(e.startContainer),e.startOffset,bn.fromDom(e.endContainer),e.endOffset)))})(e,t,n),Uf=(e,t,n)=>{const o=Sn(bn.fromDom(n));return Ff(o.dom,e,t).map((e=>{const t=n.createRange();return t.setStart(e.start.dom,e.soffset),t.setEnd(e.finish.dom,e.foffset),t})).getOrUndefined()},zf=(e,t)=>x(e)&&x(t)&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset,jf=(e,t,n)=>null!==((e,t,n)=>{let o=e;for(;o&&o!==t;){if(n(o))return o;o=o.parentNode}return null})(e,t,n),Hf=(e,t,n)=>jf(e,t,(e=>e.nodeName===n)),$f=(e,t)=>zr(e)&&!jf(e,t,Rm),Vf=(e,t,n)=>{const o=t.parentNode;if(o){const r=new Fo(t,e.getParent(o,e.isBlock)||e.getRoot());let s;for(;s=r[n?"prev":"next"]();)if(nr(s))return!0}return!1},qf=(e,t,n,o,r)=>{const s=e.getRoot(),a=e.schema.getNonEmptyElements(),i=r.parentNode;let l,d;if(!i)return U.none();const c=e.getParent(i,e.isBlock)||s;if(o&&nr(r)&&t&&e.isEmpty(c))return U.some(Hi(i,e.nodeIndex(r)));const m=new Fo(r,c);for(;d=m[o?"prev":"next"]();){if("false"===e.getContentEditableParent(d)||$f(d,s))return U.none();if(Xo(d)&&d.data.length>0)return Hf(d,s,"A")?U.none():U.some(Hi(d,o?d.data.length:0));if(e.isBlock(d)||a[d.nodeName.toLowerCase()])return U.none();l=d}return Zo(l)?U.none():n&&l?U.some(Hi(l,0)):U.none()},Wf=(e,t,n,o)=>{const r=e.getRoot();let s,a=!1,i=n?o.startContainer:o.endContainer,l=n?o.startOffset:o.endOffset;const d=jo(i)&&l===i.childNodes.length,c=e.schema.getNonEmptyElements();let m=n;if(zr(i))return U.none();if(jo(i)&&l>i.childNodes.length-1&&(m=!1),er(i)&&(i=r,l=0),i===r){if(m&&(s=i.childNodes[l>0?l-1:0],s)){if(zr(s))return U.none();if(c[s.nodeName]||Ko(s))return U.none()}if(i.hasChildNodes()){if(l=Math.min(!m&&l>0?l-1:l,i.childNodes.length-1),i=i.childNodes[l],l=Xo(i)&&d?i.data.length:0,!t&&i===r.lastChild&&Ko(i))return U.none();if(((e,t)=>{let n=t;for(;n&&n!==e;){if(sr(n))return!0;n=n.parentNode}return!1})(r,i)||zr(i))return U.none();if(i.hasChildNodes()&&!Ko(i)){s=i;const t=new Fo(i,r);do{if(sr(s)||zr(s)){a=!1;break}if(Xo(s)&&s.data.length>0){l=m?0:s.data.length,i=s,a=!0;break}if(c[s.nodeName.toLowerCase()]&&!ir(s)){l=e.nodeIndex(s),i=s.parentNode,m||l++,a=!0;break}}while(s=m?t.next():t.prev())}}}return t&&(Xo(i)&&0===l&&qf(e,d,t,!0,i).each((e=>{i=e.container(),l=e.offset(),a=!0})),jo(i)&&(s=i.childNodes[l],s||(s=i.childNodes[l-1]),!s||!nr(s)||((e,t)=>{var n;return(null===(n=e.previousSibling)||void 0===n?void 0:n.nodeName)===t})(s,"A")||Vf(e,s,!1)||Vf(e,s,!0)||qf(e,d,t,!0,s).each((e=>{i=e.container(),l=e.offset(),a=!0})))),m&&!t&&Xo(i)&&l===i.data.length&&qf(e,d,t,!1,i).each((e=>{i=e.container(),l=e.offset(),a=!0})),a&&i?U.some(Hi(i,l)):U.none()},Kf=(e,t)=>{const n=t.collapsed,o=t.cloneRange(),r=Hi.fromRangeStart(t);return Wf(e,n,!0,o).each((e=>{n&&Hi.isAbove(r,e)||o.setStart(e.container(),e.offset())})),n||Wf(e,n,!1,o).each((e=>{o.setEnd(e.container(),e.offset())})),n&&o.collapse(!0),zf(t,o)?U.none():U.some(o)},Gf=(e,t)=>e.splitText(t),Yf=e=>{let t=e.startContainer,n=e.startOffset,o=e.endContainer,r=e.endOffset;if(t===o&&Xo(t)){if(n>0&&n<t.data.length)if(o=Gf(t,n),t=o.previousSibling,r>n){r-=n;const e=Gf(o,r).previousSibling;t=o=e,r=e.data.length,n=0}else r=0}else if(Xo(t)&&n>0&&n<t.data.length&&(t=Gf(t,n),n=0),Xo(o)&&r>0&&r<o.data.length){const e=Gf(o,r).previousSibling;o=e,r=e.data.length}return{startContainer:t,startOffset:n,endContainer:o,endOffset:r}},Xf=e=>({walk:(t,n)=>Xu(e,t,n),split:Yf,expand:(t,n={type:"word"})=>{if("word"===n.type){const n=Yu(e,t,[{inline:"span"}]),o=e.createRng();return o.setStart(n.startContainer,n.startOffset),o.setEnd(n.endContainer,n.endOffset),o}return t},normalize:t=>Kf(e,t).fold(I,(e=>(t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),!0)))});Xf.compareRanges=zf,Xf.getCaretRangeFromPoint=Uf,Xf.getSelectedNode=Ci,Xf.getNode=wi;const Qf=((e,t)=>{const n=n=>{const o=t(n);if(o<=0||null===o){const t=ao(n,e);return parseFloat(t)||0}return o},o=(e,t)=>J(t,((t,n)=>{const o=ao(e,n),r=void 0===o?0:parseInt(o,10);return isNaN(r)?t:t+r}),0);return{set:(t,n)=>{if(!E(n)&&!n.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+n);const o=t.dom;no(o)&&(o.style[e]=n+"px")},get:n,getOuter:n,aggregate:o,max:(e,t,n)=>{const r=o(e,n);return t>r?t-r:0}}})("height",(e=>{const t=e.dom;return Wn(e)?t.getBoundingClientRect().height:t.offsetHeight})),Jf=()=>bn.fromDom(document),Zf=(e,t)=>e.view(t).fold(A([]),(t=>{const n=e.owner(t),o=Zf(e,n);return[t].concat(o)}));var eg=Object.freeze({__proto__:null,view:e=>{var t;return(e.dom===document?U.none():U.from(null===(t=e.dom.defaultView)||void 0===t?void 0:t.frameElement)).map(bn.fromDom)},owner:e=>En(e)});const tg=e=>{const t=Jf(),n=Oo(t),o=((e,t)=>{const n=t.owner(e);return Zf(t,n)})(e,eg),r=Do(e),s=Q(o,((e,t)=>{const n=Do(t);return{left:e.left+n.left,top:e.top+n.top}}),{left:0,top:0});return Ro(s.left+r.left+n.left,s.top+r.top+n.top)},ng=e=>"textarea"===$t(e),og=(e,t)=>{const n=(e=>{const t=e.dom.ownerDocument,n=t.body,o=t.defaultView,r=t.documentElement;if(n===e.dom)return Ro(n.offsetLeft,n.offsetTop);const s=Ao(null==o?void 0:o.pageYOffset,r.scrollTop),a=Ao(null==o?void 0:o.pageXOffset,r.scrollLeft),i=Ao(r.clientTop,n.clientTop),l=Ao(r.clientLeft,n.clientLeft);return Do(e).translate(a-l,s-i)})(e),o=(e=>Qf.get(e))(e);return{element:e,bottom:n.top+o,height:o,pos:n,cleanup:t}},rg=(e,t)=>{const n=((e,t)=>{const n=Bn(e);if(0===n.length||ng(e))return{element:e,offset:t};if(t<n.length&&!ng(n[t]))return{element:n[t],offset:0};{const o=n[n.length-1];return ng(o)?{element:e,offset:t}:"img"===$t(o)?{element:o,offset:1}:Kt(o)?{element:o,offset:gr(o).length}:{element:o,offset:Bn(o).length}}})(e,t),o=bn.fromHtml('<span data-mce-bogus="all" style="display: inline-block;">\ufeff</span>');return uo(n.element,o),og(o,(()=>yo(o)))},sg=(e,t,n,o)=>{dg(e,((r,s)=>ig(e,t,n,o)),n)},ag=(e,t,n,o,r)=>{const s={elm:o.element.dom,alignToTop:r};if(((e,t)=>e.dispatch("ScrollIntoView",t).isDefaultPrevented())(e,s))return;n(t,Oo(t).top,o,r),((e,t)=>{e.dispatch("AfterScrollIntoView",t)})(e,s)},ig=(e,t,n,o)=>{const r=bn.fromDom(e.getBody()),s=bn.fromDom(e.getDoc());r.dom.offsetWidth;const a=rg(bn.fromDom(n.startContainer),n.startOffset);ag(e,s,t,a,o),a.cleanup()},lg=(e,t,n,o)=>{const r=bn.fromDom(e.getDoc());ag(e,r,n,(e=>og(bn.fromDom(e),_))(t),o)},dg=(e,t,n)=>{const o=n.startContainer,r=n.startOffset,s=n.endContainer,a=n.endOffset;t(bn.fromDom(o),bn.fromDom(s));const i=e.dom.createRng();i.setStart(o,r),i.setEnd(s,a),e.selection.setRng(n)},cg=(e,t)=>e.element.dom.scrollIntoView({block:t?"start":"end"}),mg=(e,t,n,o)=>{const r=t+e,s=n.pos.top,a=n.bottom,i=a-s>=t;if(s<e)cg(n,!1!==o);else if(s>r){cg(n,i?!1!==o:!0===o)}else a>r&&!i&&cg(n,!0===o)},ug=(e,t,n,o)=>{const r=Sn(e).dom.innerHeight;mg(t,r,n,o)},fg=(e,t,n,o)=>{const r=Sn(e).dom.innerHeight;mg(t,r,n,o);const s=tg(n.element),a=Po(window);s.top<a.y?To(n.element,!1!==o):s.top>a.bottom&&To(n.element,!0===o)},gg=(e,t,n)=>sg(e,ug,t,n),pg=(e,t,n)=>lg(e,t,ug,n),hg=(e,t,n)=>sg(e,fg,t,n),bg=(e,t,n)=>lg(e,t,fg,n),vg=(e,t,n)=>{(e.inline?gg:hg)(e,t,n)},yg=e=>e.dom.focus(),Cg=e=>{const t=jn(e).dom;return e.dom===t.activeElement},wg=(e=Jf())=>U.from(e.dom.activeElement).map(bn.fromDom),xg=(e,t)=>{const n=Kt(t)?gr(t).length:Bn(t).length+1;return e>n?n:e<0?0:e},kg=e=>Tf.range(e.start,xg(e.soffset,e.start),e.finish,xg(e.foffset,e.finish)),Eg=(e,t)=>!zo(t.dom)&&(xn(e,t)||wn(e,t)),Sg=e=>t=>Eg(e,t.start)&&Eg(e,t.finish),_g=e=>Tf.range(bn.fromDom(e.startContainer),e.startOffset,bn.fromDom(e.endContainer),e.endOffset),Ng=e=>(e=>{const t=e.getSelection();return(t&&0!==t.rangeCount?U.from(t.getRangeAt(0)):U.none()).map(_g)})(Sn(e).dom).filter(Sg(e)),Rg=e=>{const t=document.createRange();try{return t.setStart(e.start.dom,e.soffset),t.setEnd(e.finish.dom,e.foffset),U.some(t)}catch(e){return U.none()}},Ag=e=>{const t=(e=>e.inline||Dt.browser.isFirefox())(e)?Ng(bn.fromDom(e.getBody())):U.none();e.bookmark=t.isSome()?t:e.bookmark},Dg=e=>(e.bookmark?e.bookmark:U.none()).bind((t=>((e,t)=>U.from(t).filter(Sg(e)).map(kg))(bn.fromDom(e.getBody()),t))).bind(Rg),Og={isEditorUIElement:e=>{const t=e.className.toString();return-1!==t.indexOf("tox-")||-1!==t.indexOf("mce-")}},Tg={setEditorTimeout:(e,t,n)=>((e,t)=>(E(t)||(t=0),setTimeout(e,t)))((()=>{e.removed||t()}),n),setEditorInterval:(e,t,n)=>{const o=((e,t)=>(E(t)||(t=0),setInterval(e,t)))((()=>{e.removed?clearInterval(o):t()}),n);return o}},Bg=e=>{const t=qa((()=>{Ag(e)}),0);e.on("init",(()=>{e.inline&&((e,t)=>{const n=()=>{t.throttle()};Pa.DOM.bind(document,"mouseup",n),e.on("remove",(()=>{Pa.DOM.unbind(document,"mouseup",n)}))})(e,t),((e,t)=>{((e,t)=>{e.on("mouseup touchend",(e=>{t.throttle()}))})(e,t),e.on("keyup NodeChange AfterSetSelectionRange",(t=>{(e=>"nodechange"===e.type&&e.selectionChange)(t)||Ag(e)}))})(e,t)})),e.on("remove",(()=>{t.cancel()}))};let Pg;const Lg=Pa.DOM,Mg=e=>{const t=e.classList;return void 0!==t&&(t.contains("tox-edit-area")||t.contains("tox-edit-area__iframe")||t.contains("mce-content-body"))},Ig=(e,t)=>{const n=xd(e),o=Lg.getParent(t,(t=>(e=>jo(e)&&Og.isEditorUIElement(e))(t)||!!n&&e.dom.is(t,n)));return null!==o},Fg=e=>{try{const t=jn(bn.fromDom(e.getElement()));return wg(t).fold((()=>document.body),(e=>e.dom))}catch(e){return document.body}},Ug=(e,t)=>{const n=t.editor;Bg(n);const o=(e,t)=>{if(lc(e)&&!0!==e.inline){t(bn.fromDom(e.getContainer()),"tox-edit-focus")}};n.on("focusin",(()=>{const t=e.focusedEditor;Mg(Fg(n))&&o(n,mn),t!==n&&(t&&t.dispatch("blur",{focusedEditor:n}),e.setActive(n),e.focusedEditor=n,n.dispatch("focus",{blurredEditor:t}),n.focus(!0))})),n.on("focusout",(()=>{Tg.setEditorTimeout(n,(()=>{const t=e.focusedEditor;Mg(Fg(n))&&t===n||o(n,fn),Ig(n,Fg(n))||t!==n||(n.dispatch("blur",{focusedEditor:null}),e.focusedEditor=null)}))})),Pg||(Pg=t=>{const n=e.activeEditor;n&&Vn(t).each((t=>{const o=t;o.ownerDocument===document&&(o===document.body||Ig(n,o)||e.focusedEditor!==n||(n.dispatch("blur",{focusedEditor:null}),e.focusedEditor=null))}))},Lg.bind(document,"focusin",Pg))},zg=(e,t)=>{e.focusedEditor===t.editor&&(e.focusedEditor=null),!e.activeEditor&&Pg&&(Lg.unbind(document,"focusin",Pg),Pg=null)},jg=(e,t)=>(e=>e.collapsed?U.from(wi(e.startContainer,e.startOffset)).map(bn.fromDom):U.none())(t).bind((t=>Er(t)?U.some(t):xn(e,t)?U.none():U.some(e))),Hg=(e,t)=>{jg(bn.fromDom(e.getBody()),t).bind((e=>Sm(e.dom))).fold((()=>{e.selection.normalize()}),(t=>e.selection.setRng(t.toRange())))},$g=e=>{if(e.setActive)try{e.setActive()}catch(t){e.focus()}else e.focus()},Vg=e=>{return Cg(e)||(t=e,wg(jn(t)).filter((e=>t.dom.contains(e.dom)))).isSome();var t},qg=e=>e.inline?(e=>{const t=e.getBody();return t&&Vg(bn.fromDom(t))})(e):(e=>x(e.iframeElement)&&Cg(bn.fromDom(e.iframeElement)))(e),Wg=e=>qg(e)||(e=>{const t=jn(bn.fromDom(e.getElement()));return wg(t).filter((t=>!Mg(t.dom)&&Ig(e,t.dom))).isSome()})(e),Kg=e=>e.editorManager.setActive(e),Gg=(e,t)=>{e.removed||(t?Kg(e):(e=>{const t=e.selection,n=e.getBody();let o=t.getRng();e.quirks.refreshContentEditable(),x(e.bookmark)&&!qg(e)&&Dg(e).each((t=>{e.selection.setRng(t),o=t}));const r=((e,t)=>e.dom.getParent(t,(t=>"true"===e.dom.getContentEditable(t))))(e,t.getNode());if(r&&e.dom.isChildOf(r,n))return $g(r),Hg(e,o),void Kg(e);e.inline||(Dt.browser.isOpera()||$g(n),e.getWin().focus()),(Dt.browser.isFirefox()||e.inline)&&($g(n),Hg(e,o)),Kg(e)})(e))},Yg=(e,t,n,o,r)=>{const s=n?t.startContainer:t.endContainer,a=n?t.startOffset:t.endOffset;return U.from(s).map(bn.fromDom).map((e=>o&&t.collapsed?e:Pn(e,r(e,a)).getOr(e))).bind((e=>Wt(e)?U.some(e):_n(e).filter(Wt))).map((e=>e.dom)).getOr(e)},Xg=(e,t,n=!1)=>Yg(e,t,!0,n,((e,t)=>Math.min(In(e),t))),Qg=(e,t,n=!1)=>Yg(e,t,!1,n,((e,t)=>t>0?t-1:t)),Jg=(e,t)=>{const n=e;for(;e&&Xo(e)&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n},Zg=(e,t)=>W(t,(t=>{const n=e.dispatch("GetSelectionRange",{range:t});return n.range!==t?n.range:t})),ep=e=>{return Wt(t=e)&&Ht(t.dom)&&"false"===en(e,"contenteditable");var t},tp=["img","br"],np=e=>{const t=pr(e).filter((e=>0!==e.trim().length||e.indexOf(mr)>-1)).isSome();return t||V(tp,$t(e))||ep(e)},op=e=>((e,t)=>{const n=e=>{for(let o=0;o<e.childNodes.length;o++){const r=bn.fromDom(e.childNodes[o]);if(t(r))return U.some(r);const s=n(e.childNodes[o]);if(s.isSome())return s}return U.none()};return n(e.dom)})(e,np),rp=(e,t)=>{const n=e=>{const o=Bn(e);for(let e=o.length-1;e>=0;e--){const r=o[e];if(t(r))return U.some(r);const s=n(r);if(s.isSome())return s}return U.none()};return n(e)},sp="[data-mce-autocompleter]",ap=(e,t)=>{if(ip(bn.fromDom(e.getBody())).isNone()){const o=bn.fromHtml('<span data-mce-autocompleter="1" data-mce-bogus="1"></span>',e.getDoc());po(o,bn.fromDom(t.extractContents())),t.insertNode(o.dom),_n(o).each((e=>e.dom.normalize())),(n=o,rp(n,np)).map((t=>{e.selection.setCursorLocation(t.dom,(e=>"img"===$t(e)?1:pr(e).fold((()=>Bn(e).length),(e=>e.length)))(t))}))}var n},ip=e=>Jn(e,sp),lp={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},dp=(e,t,n)=>{const o=n?"lastChild":"firstChild",r=n?"prev":"next";if(e[o])return e[o];if(e!==t){let n=e[r];if(n)return n;for(let o=e.parent;o&&o!==t;o=o.parent)if(n=o[r],n)return n}},cp=e=>{var t;const n=null!==(t=e.value)&&void 0!==t?t:"";if(!as(n))return!1;const o=e.parent;return!o||"span"===o.name&&!o.attr("style")||!/^[ ]+$/.test(n)},mp=e=>{const 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};class up{constructor(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}static create(e,t){const n=new up(e,lp[e]||1);return t&&he(t,((e,t)=>{n.attr(t,e)})),n}replace(e){const t=this;return e.parent&&e.remove(),t.insert(e,t),t.remove(),t}attr(e,t){const n=this;if(!g(e))return x(e)&&he(e,((e,t)=>{n.attr(t,e)})),n;const o=n.attributes;if(o){if(void 0!==t){if(null===t){if(e in o.map){delete o.map[e];let t=o.length;for(;t--;)if(o[t].name===e)return o.splice(t,1),n}return n}if(e in o.map){let n=o.length;for(;n--;)if(o[n].name===e){o[n].value=t;break}}else o.push({name:e,value:t});return o.map[e]=t,n}return o.map[e]}}clone(){const e=this,t=new up(e.name,e.type),n=e.attributes;if(n){const e=[];e.map={};for(let t=0,o=n.length;t<o;t++){const o=n[t];"id"!==o.name&&(e[e.length]={name:o.name,value:o.value},e.map[o.name]=o.value)}t.attributes=e}return t.value=e.value,t}wrap(e){const t=this;return t.parent&&(t.parent.insert(e,t),e.append(t)),t}unwrap(){const e=this;for(let t=e.firstChild;t;){const n=t.next;e.insert(t,e,!0),t=n}e.remove()}remove(){const e=this,t=e.parent,n=e.next,o=e.prev;return t&&(t.firstChild===e?(t.firstChild=n,n&&(n.prev=null)):o&&(o.next=n),t.lastChild===e?(t.lastChild=o,o&&(o.next=null)):n&&(n.prev=o),e.parent=e.next=e.prev=null),e}append(e){const t=this;e.parent&&e.remove();const n=t.lastChild;return n?(n.next=e,e.prev=n,t.lastChild=e):t.lastChild=t.firstChild=e,e.parent=t,e}insert(e,t,n){e.parent&&e.remove();const o=t.parent||this;return n?(t===o.firstChild?o.firstChild=e:t.prev&&(t.prev.next=e),e.prev=t.prev,e.next=t,t.prev=e):(t===o.lastChild?o.lastChild=e:t.next&&(t.next.prev=e),e.next=t.next,e.prev=t,t.next=e),e.parent=o,e}getAll(e){const t=this,n=[];for(let o=t.firstChild;o;o=dp(o,t))o.name===e&&n.push(o);return n}children(){const e=[];for(let t=this.firstChild;t;t=t.next)e.push(t);return e}empty(){const e=this;if(e.firstChild){const t=[];for(let n=e.firstChild;n;n=dp(n,e))t.push(n);let n=t.length;for(;n--;){const e=t[n];e.parent=e.firstChild=e.lastChild=e.next=e.prev=null}}return e.firstChild=e.lastChild=null,e}isEmpty(e,t={},n){var o;const r=this;let s=r.firstChild;if(mp(r))return!1;if(s)do{if(1===s.type){if(s.attr("data-mce-bogus"))continue;if(e[s.name])return!1;if(mp(s))return!1}if(8===s.type)return!1;if(3===s.type&&!cp(s))return!1;if(3===s.type&&s.parent&&t[s.parent.name]&&as(null!==(o=s.value)&&void 0!==o?o:""))return!1;if(n&&n(s))return!1}while(s=dp(s,r));return!0}walk(e){return dp(this,null,e)}}const fp=(e,t,n=0)=>{const o=e.toLowerCase();if(-1!==o.indexOf("[if ",n)&&((e,t)=>/^\s*\[if [\w\W]+\]>.*<!\[endif\](--!?)?>/.test(e.substr(t)))(o,n)){const e=o.indexOf("[endif]",n);return o.indexOf(">",e)}if(t){const e=o.indexOf(">",n);return-1!==e?e:o.length}{const t=/--!?>/g;t.lastIndex=n;const r=t.exec(e);return r?r.index+r[0].length:o.length}},gp=(e,t,n)=>{const o=/<([!?\/])?([A-Za-z0-9\-_:.]+)/g,r=/(?:\s(?:[^'">]+(?:"[^"]*"|'[^']*'))*[^"'>]*(?:"[^">]*|'[^'>]*)?|\s*|\/)>/g,s=e.getVoidElements();let a=1,i=n;for(;0!==a;)for(o.lastIndex=i;;){const e=o.exec(t);if(null===e)return i;if("!"===e[1]){i=Ve(e[2],"--")?fp(t,!1,e.index+"!--".length):fp(t,!0,e.index+1);break}{r.lastIndex=o.lastIndex;const n=r.exec(t);if(v(n)||n.index!==o.lastIndex)continue;"/"===e[1]?a-=1:Se(s,e[2])||(a+=1),i=o.lastIndex+n[0].length;break}}return i},pp=(e,t)=>{const n=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,o=e.schema;let r=((e,t)=>{const n=new RegExp(["\\s?("+e.join("|")+')="[^"]+"'].join("|"),"gi");return t.replace(n,"")})(e.getTempAttrs(),t);const s=o.getVoidElements();let a;for(;a=n.exec(r);){const e=n.lastIndex,t=a[0].length;let i;i=s[a[1]]?e:gp(o,r,e),r=r.substring(0,e-t)+r.substring(i),n.lastIndex=e-t}return Lr(r)},hp=pp,bp=e=>{const t=Mo(e,"[data-mce-bogus]");K(t,(e=>{"all"===en(e,"data-mce-bogus")?yo(e):Cr(e)?(uo(e,bn.fromText(cr)),yo(e)):Co(e)}))},vp=e=>{const t=Mo(e,"input");K(t,(e=>{on(e,"name")}))},yp=(e,t)=>{const n=e.getDoc(),o=jn(bn.fromDom(e.getBody())),r=bn.fromTag("div",n);Jt(r,"data-mce-bogus","all"),so(r,{position:"fixed",left:"-9999999px",top:"0"}),ko(r,t.innerHTML),bp(r),vp(r);const s=(e=>Fn(e)?e:bn.fromDom(En(e).dom.body))(o);po(s,r);const a=Lr(r.dom.innerText);return yo(r),a},Cp=(e,t,n)=>{let o;o="raw"===t.format?Pt.trim(hp(e.serializer,n.innerHTML)):"text"===t.format?yp(e,n):"tree"===t.format?e.serializer.serialize(n,t):((e,t)=>{const n=Ll(e),o=new RegExp(`^(<${n}[^>]*>( | |\\s| |<br \\/>|)<\\/${n}>[\r\n]*|<br \\/>[\r\n]*)$`);return t.replace(o,"")})(e,e.serializer.serialize(n,t));return"text"!==t.format&&!_r(bn.fromDom(n))&&g(o)?Pt.trim(o):o},wp=Pt.makeMap,xp=e=>{const t=[],n=(e=e||{}).indent,o=wp(e.indent_before||""),r=wp(e.indent_after||""),s=ea.getEncodeFunc(e.entity_encoding||"raw",e.entities),a="xhtml"!==e.element_format;return{start:(e,i,l)=>{if(n&&o[e]&&t.length>0){const e=t[t.length-1];e.length>0&&"\n"!==e&&t.push("\n")}if(t.push("<",e),i)for(let e=0,n=i.length;e<n;e++){const n=i[e];t.push(" ",n.name,'="',s(n.value,!0),'"')}if(t[t.length]=!l||a?">":" />",l&&n&&r[e]&&t.length>0){const e=t[t.length-1];e.length>0&&"\n"!==e&&t.push("\n")}},end:e=>{let o;t.push("</",e,">"),n&&r[e]&&t.length>0&&(o=t[t.length-1],o.length>0&&"\n"!==o&&t.push("\n"))},text:(e,n)=>{e.length>0&&(t[t.length]=n?e:s(e))},cdata:e=>{t.push("<![CDATA[",e,"]]>")},comment:e=>{t.push("\x3c!--",e,"--\x3e")},pi:(e,o)=>{o?t.push("<?",e," ",s(o),"?>"):t.push("<?",e,"?>"),n&&t.push("\n")},doctype:e=>{t.push("<!DOCTYPE",e,">",n?"\n":"")},reset:()=>{t.length=0},getContent:()=>t.join("").replace(/\n$/,"")}},kp=(e={},t=fa())=>{const n=xp(e);e.validate=!("validate"in e)||e.validate;return{serialize:o=>{const r=e.validate,s={3:e=>{var t;n.text(null!==(t=e.value)&&void 0!==t?t:"",e.raw)},8:e=>{var t;n.comment(null!==(t=e.value)&&void 0!==t?t:"")},7:e=>{n.pi(e.name,e.value)},10:e=>{var t;n.doctype(null!==(t=e.value)&&void 0!==t?t:"")},4:e=>{var t;n.cdata(null!==(t=e.value)&&void 0!==t?t:"")},11:e=>{let t=e;if(t=t.firstChild)do{a(t)}while(t=t.next)}};n.reset();const a=e=>{var o;const i=s[e.type];if(i)i(e);else{const s=e.name,i=s in t.getVoidElements();let l=e.attributes;if(r&&l&&l.length>1){const n=[];n.map={};const o=t.getElementRule(e.name);if(o){for(let e=0,t=o.attributesOrder.length;e<t;e++){const t=o.attributesOrder[e];if(t in l.map){const e=l.map[t];n.map[t]=e,n.push({name:t,value:e})}}for(let e=0,t=l.length;e<t;e++){const t=l[e].name;if(!(t in n.map)){const e=l.map[t];n.map[t]=e,n.push({name:t,value:e})}}l=n}}if(n.start(s,l,i),!i){let t=e.firstChild;if(t){"pre"!==s&&"textarea"!==s||3!==t.type||"\n"!==(null===(o=t.value)||void 0===o?void 0:o[0])||n.text("\n",!0);do{a(t)}while(t=t.next)}n.end(s)}}};return 1!==o.type||e.inner?3===o.type?s[3](o):s[11](o):a(o),n.getContent()}}},Ep=new Set;K(["margin","margin-left","margin-right","margin-top","margin-bottom","padding","padding-left","padding-right","padding-top","padding-bottom","border","border-width","border-style","border-color","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","float","position","left","right","top","bottom","z-index","display","transform","width","max-width","min-width","height","max-height","min-height","overflow","overflow-x","overflow-y","text-overflow","vertical-align","transition","transition-delay","transition-duration","transition-property","transition-timing-function"],(e=>{Ep.add(e)}));const Sp=["font","text-decoration","text-emphasis"],_p=(e,t)=>ge(e.parseStyle(e.getAttrib(t,"style"))),Np=(e,t)=>re(_p(e,t),(e=>!(e=>Ep.has(e))(e))),Rp=(e,t,n)=>{const o=_p(e,t),r=_p(e,n),s=o=>{var r,s;const a=null!==(r=e.getStyle(t,o))&&void 0!==r?r:"",i=null!==(s=e.getStyle(n,o))&&void 0!==s?s:"";return Xe(a)&&Xe(i)&&a!==i};return q(o,(e=>{const t=t=>q(t,(t=>t===e));if(!t(r)&&t(Sp)){const e=X(r,(e=>q(Sp,(t=>Ve(e,t)))));return q(e,s)}return s(e)}))},Ap=(e,t,n)=>U.from(n.container()).filter(Xo).exists((o=>{const r=e?0:-1;return t(o.data.charAt(n.offset()+r))})),Dp=T(Ap,!0,qm),Op=T(Ap,!1,qm),Tp=e=>{const t=e.container();return Xo(t)&&(0===t.data.length||Pr(t.data)&&sf.isBookmarkNode(t.parentNode))},Bp=(e,t)=>n=>qc(e?0:-1,n).filter(t).isSome(),Pp=e=>or(e)&&"block"===ao(bn.fromDom(e),"display"),Lp=e=>sr(e)&&!(e=>jo(e)&&"all"===e.getAttribute("data-mce-bogus"))(e),Mp=Bp(!0,Pp),Ip=Bp(!1,Pp),Fp=Bp(!0,lr),Up=Bp(!1,lr),zp=Bp(!0,Ko),jp=Bp(!1,Ko),Hp=Bp(!0,Lp),$p=Bp(!1,Lp),Vp=(e,t)=>((e,t,n)=>xn(t,e)?Rn(e,(e=>n(e)||wn(e,t))).slice(0,-1):[])(e,t,I),qp=(e,t)=>[e].concat(Vp(e,t)),Wp=(e,t,n)=>wm(e,t,n,Tp),Kp=(e,t)=>ee(qp(bn.fromDom(t.container()),e),vr),Gp=(e,t,n)=>Wp(e,t.dom,n).forall((e=>Kp(t,n).fold((()=>!Vc(e,n,t.dom)),(o=>!Vc(e,n,t.dom)&&xn(o,bn.fromDom(e.container())))))),Yp=(e,t,n)=>Kp(t,n).fold((()=>Wp(e,t.dom,n).forall((e=>!Vc(e,n,t.dom)))),(t=>Wp(e,t.dom,n).isNone())),Xp=T(Yp,!1),Qp=T(Yp,!0),Jp=T(Gp,!1),Zp=T(Gp,!0),eh=e=>em(e).exists(Cr),th=(e,t,n)=>{const o=X(qp(bn.fromDom(n.container()),t),vr),r=ce(o).getOr(t);return ym(e,r.dom,n).filter(eh)},nh=(e,t)=>em(t).exists(Cr)||th(!0,e,t).isSome(),oh=(e,t)=>(e=>U.from(e.getNode(!0)).map(bn.fromDom))(t).exists(Cr)||th(!1,e,t).isSome(),rh=T(th,!1),sh=T(th,!0),ah=e=>Hi.isTextPosition(e)&&!e.isAtStart()&&!e.isAtEnd(),ih=(e,t)=>{const n=X(qp(bn.fromDom(t.container()),e),vr);return ce(n).getOr(e)},lh=(e,t)=>ah(t)?Op(t):Op(t)||Em(ih(e,t).dom,t).exists(Op),dh=(e,t)=>ah(t)?Dp(t):Dp(t)||km(ih(e,t).dom,t).exists(Dp),ch=e=>em(e).bind((e=>Yn(e,Wt))).exists((e=>(e=>V(["pre","pre-wrap"],e))(ao(e,"white-space")))),mh=(e,t)=>((e,t)=>Em(e.dom,t).isNone())(e,t)||((e,t)=>km(e.dom,t).isNone())(e,t)||Xp(e,t)||Qp(e,t)||oh(e,t)||nh(e,t),uh=(e,t)=>n=>{return o=new Fo(n,e)[t](),x(o)&&sr(o)&&Bc(o);var o},fh=(e,t)=>!ch(t)&&(Xp(e,t)||Jp(e,t)||oh(e,t)||lh(e,t)||((e,t)=>{const n=Em(e.dom,t).getOr(t),o=uh(e.dom,"prev");return t.isAtStart()&&(o(t.container())||o(n.container()))})(e,t)),gh=(e,t)=>!ch(t)&&(Qp(e,t)||Zp(e,t)||nh(e,t)||dh(e,t)||((e,t)=>{const n=km(e.dom,t).getOr(t),o=uh(e.dom,"next");return t.isAtEnd()&&(o(t.container())||o(n.container()))})(e,t)),ph=(e,t)=>fh(e,t)||gh(e,(e=>{const t=e.container(),n=e.offset();return Xo(t)&&n<t.data.length?Hi(t,n+1):e})(t)),hh=(e,t)=>$m(e.charAt(t)),bh=(e,t)=>qm(e.charAt(t)),vh=(e,t,n)=>{const o=t.data,r=Hi(t,0);return n||!hh(o,0)||ph(e,r)?!!(n&&bh(o,0)&&fh(e,r))&&(t.data=mr+o.slice(1),!0):(t.data=" "+o.slice(1),!0)},yh=e=>{const t=e.data,n=(e=>{const t=e.split("");return W(t,((e,n)=>$m(e)&&n>0&&n<t.length-1&&Wm(t[n-1])&&Wm(t[n+1])?" ":e)).join("")})(t);return n!==t&&(e.data=n,!0)},Ch=(e,t,n)=>{const o=t.data,r=Hi(t,o.length-1);return n||!hh(o,o.length-1)||ph(e,r)?!!(n&&bh(o,o.length-1)&&gh(e,r))&&(t.data=o.slice(0,-1)+mr,!0):(t.data=o.slice(0,-1)+" ",!0)},wh=(e,t)=>{const n=t.container();if(!Xo(n))return U.none();if((e=>{const t=e.container();return Xo(t)&&$e(t.data,mr)})(t)){const o=vh(e,n,!1)||yh(n)||Ch(e,n,!1);return It(o,t)}if(ph(e,t)){const o=vh(e,n,!0)||Ch(e,n,!0);return It(o,t)}return U.none()},xh=(e,t,n)=>{if(0===n)return;const o=bn.fromDom(e),r=Gn(o,vr).getOr(o),s=e.data.slice(t,t+n),a=t+n>=e.data.length&&gh(r,Hi(e,e.data.length)),i=0===t&&fh(r,Hi(e,0));e.replaceData(t,n,ls(s,4,i,a))},kh=(e,t)=>{const n=e.data.slice(t),o=n.length-Ge(n).length;xh(e,t,o)},Eh=(e,t)=>{const n=e.data.slice(0,t),o=n.length-Ye(n).length;xh(e,t-o,o)},Sh=(e,t,n,o=!0)=>{const r=Ye(e.data).length,s=o?e:t,a=o?t:e;return o?s.appendData(a.data):s.insertData(0,a.data),yo(bn.fromDom(a)),n&&kh(s,r),s},_h=(e,t)=>((e,t)=>{const n=e.container(),o=e.offset();return!Hi.isTextPosition(e)&&n===t.parentNode&&o>Hi.before(t).offset()})(t,e)?Hi(t.container(),t.offset()-1):t,Nh=e=>{return ns(e.previousSibling)?U.some((t=e.previousSibling,Xo(t)?Hi(t,t.data.length):Hi.after(t))):e.previousSibling?_m(e.previousSibling):U.none();var t},Rh=e=>{return ns(e.nextSibling)?U.some((t=e.nextSibling,Xo(t)?Hi(t,0):Hi.before(t))):e.nextSibling?Sm(e.nextSibling):U.none();var t},Ah=(e,t)=>Nh(t).orThunk((()=>Rh(t))).orThunk((()=>((e,t)=>U.from(t.previousSibling?t.previousSibling:t.parentNode).bind((t=>Em(e,Hi.before(t)))).orThunk((()=>km(e,Hi.after(t)))))(e,t))),Dh=(e,t)=>Rh(t).orThunk((()=>Nh(t))).orThunk((()=>((e,t)=>km(e,Hi.after(t)).orThunk((()=>Em(e,Hi.before(t)))))(e,t))),Oh=(e,t,n)=>((e,t,n)=>e?Dh(t,n):Ah(t,n))(e,t,n).map(T(_h,n)),Th=(e,t,n)=>{n.fold((()=>{e.focus()}),(n=>{e.selection.setRng(n.toRange(),t)}))},Bh=(e,t)=>t&&Se(e.schema.getBlockElements(),$t(t)),Ph=e=>{if(hs(e)){const t=bn.fromHtml('<br data-mce-bogus="1">');return vo(e),po(e,t),U.some(Hi.before(t.dom))}return U.none()},Lh=(e,t,n)=>{const o=An(e).filter(Kt),r=Dn(e).filter(Kt);return yo(e),(s=o,a=r,i=t,l=(e,t,o)=>{const r=e.dom,s=t.dom,a=r.data.length;return Sh(r,s,n),o.container()===s?Hi(r,a):o},s.isSome()&&a.isSome()&&i.isSome()?U.some(l(s.getOrDie(),a.getOrDie(),i.getOrDie())):U.none()).orThunk((()=>(n&&(o.each((e=>Eh(e.dom,e.dom.length))),r.each((e=>kh(e.dom,0)))),t)));var s,a,i,l},Mh=(e,t,n,o=!0)=>{const r=Oh(t,e.getBody(),n.dom),s=Gn(n,T(Bh,e),(a=e.getBody(),e=>e.dom===a));var a;const i=Lh(n,r,((e,t)=>Se(e.schema.getTextInlineElements(),$t(t)))(e,n));e.dom.isEmpty(e.getBody())?(e.setContent(""),e.selection.setCursorLocation()):s.bind(Ph).fold((()=>{o&&Th(e,t,i)}),(n=>{o&&Th(e,t,U.some(n))}))},Ih=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,Fh=(e,t)=>yn(bn.fromDom(t),id(e))&&!Rs(e.schema,t)&&e.dom.isEditable(t),Uh=e=>{var t;return"rtl"===Pa.DOM.getStyle(e,"direction",!0)||(e=>Ih.test(e))(null!==(t=e.textContent)&&void 0!==t?t:"")},zh=(e,t,n)=>{const o=((e,t,n)=>X(Pa.DOM.getParents(n.container(),"*",t),e))(e,t,n);return U.from(o[o.length-1])},jh=(e,t)=>{const n=t.container(),o=t.offset();return e?Ur(n)?Xo(n.nextSibling)?Hi(n.nextSibling,0):Hi.after(n):Hr(t)?Hi(n,o+1):t:Ur(n)?Xo(n.previousSibling)?Hi(n.previousSibling,n.previousSibling.data.length):Hi.before(n):$r(t)?Hi(n,o-1):t},Hh=T(jh,!0),$h=T(jh,!1),Vh=(e,t)=>{const n=e=>e.stopImmediatePropagation();e.on("beforeinput input",n,!0),e.getDoc().execCommand(t),e.off("beforeinput input",n)},qh=e=>Vh(e,"Delete"),Wh=e=>wr(e)||kr(e),Kh=(e,t)=>xn(e,t)?Yn(t,Wh,(e=>t=>Lt(_n(t),e,wn))(e)):U.none(),Gh=(e,t=!0)=>{e.dom.isEmpty(e.getBody())&&e.setContent("",{no_selection:!t})},Yh=e=>{var t;return(8===Vt(t=e)||"#comment"===$t(t)?An(e):Mn(e)).bind(Yh).orThunk((()=>U.some(e)))},Xh=(e,t,n,o=!0)=>{var r;t.deleteContents();const s=Yh(n).getOr(n),a=bn.fromDom(null!==(r=e.dom.getParent(s.dom,e.dom.isBlock))&&void 0!==r?r:n.dom);if(a.dom===e.getBody()?Gh(e,o):hs(a)&&(Or(a),o&&e.selection.setCursorLocation(a.dom,0)),!wn(n,a)){const e=Lt(_n(a),n)?[]:_n(i=a).map(Bn).map((e=>X(e,(e=>!wn(i,e))))).getOr([]);K(e.concat(Bn(n)),(e=>{wn(e,a)||xn(e,a)||!hs(e)||yo(e)}))}var i},Qh=e=>Mo(e,"td,th"),Jh=(e,t)=>({start:e,end:t}),Zh=gl([{singleCellTable:["rng","cell"]},{fullTable:["table"]},{partialTable:["cells","outsideDetails"]},{multiTable:["startTableCells","endTableCells","betweenRng"]}]),eb=(e,t)=>Zn(bn.fromDom(e),"td,th",t),tb=e=>!wn(e.start,e.end),nb=(e,t)=>su(e.start,t).bind((n=>su(e.end,t).bind((e=>It(wn(n,e),n))))),ob=e=>t=>nb(t,e).map((e=>((e,t,n)=>({rng:e,table:t,cells:n}))(t,e,Qh(e)))),rb=(e,t,n,o)=>{if(n.collapsed||!e.forall(tb))return U.none();if(t.isSameTable){const t=e.bind(ob(o));return U.some({start:t,end:t})}{const e=eb(n.startContainer,o),t=eb(n.endContainer,o),r=e.bind((e=>t=>su(t,e).bind((e=>me(Qh(e)).map((e=>Jh(t,e))))))(o)).bind(ob(o)),s=t.bind((e=>t=>su(t,e).bind((e=>ce(Qh(e)).map((e=>Jh(e,t))))))(o)).bind(ob(o));return U.some({start:r,end:s})}},sb=(e,t)=>te(e,(e=>wn(e,t))),ab=e=>Mt(sb(e.cells,e.rng.start),sb(e.cells,e.rng.end),((t,n)=>e.cells.slice(t,n+1))),ib=(e,t,n)=>e.exists((e=>((e,t)=>!tb(e)&&nb(e,t).exists((e=>{const t=e.dom.rows;return 1===t.length&&1===t[0].cells.length})))(e,n)&&lu(e.start,t))),lb=(e,t)=>{const{startTable:n,endTable:o}=t,r=e.cloneRange();return n.each((e=>r.setStartAfter(e.dom))),o.each((e=>r.setEndBefore(e.dom))),r},db=(e,t)=>{const n=(e=>t=>wn(e,t))(e),o=((e,t)=>{const n=eb(e.startContainer,t),o=eb(e.endContainer,t);return Mt(n,o,Jh)})(t,n),r=((e,t)=>{const n=e=>su(bn.fromDom(e),t),o=n(e.startContainer),r=n(e.endContainer),s=o.isSome(),a=r.isSome(),i=Mt(o,r,wn).getOr(!1);return{startTable:o,endTable:r,isStartInTable:s,isEndInTable:a,isSameTable:i,isMultiTable:!i&&s&&a}})(t,n);return ib(o,t,n)?o.map((e=>Zh.singleCellTable(t,e.start))):r.isMultiTable?((e,t,n,o)=>rb(e,t,n,o).bind((({start:e,end:o})=>{const r=e.bind(ab).getOr([]),s=o.bind(ab).getOr([]);if(r.length>0&&s.length>0){const e=lb(n,t);return U.some(Zh.multiTable(r,s,e))}return U.none()})))(o,r,t,n):((e,t,n,o)=>rb(e,t,n,o).bind((({start:e,end:t})=>e.or(t))).bind((e=>{const{isSameTable:o}=t,r=ab(e).getOr([]);if(o&&e.cells.length===r.length)return U.some(Zh.fullTable(e.table));if(r.length>0){if(o)return U.some(Zh.partialTable(r,U.none()));{const e=lb(n,t);return U.some(Zh.partialTable(r,U.some({...t,rng:e})))}}return U.none()})))(o,r,t,n)},cb=e=>K(e,(e=>{on(e,"contenteditable"),Or(e)})),mb=(e,t,n,o)=>{const r=n.cloneRange();o?(r.setStart(n.startContainer,n.startOffset),r.setEndAfter(t.dom.lastChild)):(r.setStartBefore(t.dom.firstChild),r.setEnd(n.endContainer,n.endOffset)),pb(e,r,t,!1).each((e=>e()))},ub=e=>{const t=ru(e),n=bn.fromDom(e.selection.getNode());ar(n.dom)&&hs(n)?e.selection.setCursorLocation(n.dom,0):e.selection.collapse(!0),t.length>1&&q(t,(e=>wn(e,n)))&&Jt(n,"data-mce-selected","1")},fb=(e,t,n)=>U.some((()=>{const o=e.selection.getRng(),r=n.bind((({rng:n,isStartInTable:r})=>{const s=((e,t)=>U.from(e.dom.getParent(t,e.dom.isBlock)).map(bn.fromDom))(e,r?n.endContainer:n.startContainer);n.deleteContents(),((e,t,n)=>{n.each((n=>{t?yo(n):(Or(n),e.selection.setCursorLocation(n.dom,0))}))})(e,r,s.filter(hs));const a=r?t[0]:t[t.length-1];return mb(e,a,o,r),hs(a)?U.none():U.some(r?t.slice(1):t.slice(0,-1))})).getOr(t);cb(r),ub(e)})),gb=(e,t,n,o)=>U.some((()=>{const r=e.selection.getRng(),s=t[0],a=n[n.length-1];mb(e,s,r,!0),mb(e,a,r,!1);const i=hs(s)?t:t.slice(1),l=hs(a)?n:n.slice(0,-1);cb(i.concat(l)),o.deleteContents(),ub(e)})),pb=(e,t,n,o=!0)=>U.some((()=>{Xh(e,t,n,o)})),hb=(e,t)=>U.some((()=>Mh(e,!1,t))),bb=(e,t,n,o)=>yb(t,o).fold((()=>((e,t,n)=>db(t,n).bind((t=>t.fold(T(pb,e),T(hb,e),T(fb,e),T(gb,e)))))(e,t,n)),(t=>((e,t)=>Cb(e,t))(e,t))),vb=(e,t)=>ee(qp(t,e),Sr),yb=(e,t)=>ee(qp(t,e),Xt("caption")),Cb=(e,t)=>U.some((()=>{Or(t),e.selection.setCursorLocation(t.dom,0)})),wb=(e,t,n,o,r)=>Cm(n,e.getBody(),r).fold((()=>U.some(_)),(s=>((e,t,n,o)=>Sm(e.dom).bind((r=>_m(e.dom).map((e=>t?n.isEqual(r)&&o.isEqual(e):n.isEqual(e)&&o.isEqual(r))))).getOr(!0))(o,n,r,s)?((e,t)=>Cb(e,t))(e,o):((e,t,n)=>yb(e,bn.fromDom(n.getNode())).fold((()=>U.some(_)),(e=>It(!wn(e,t),_))))(t,o,s))),xb=(e,t,n,o)=>{const r=Hi.fromRangeStart(e.selection.getRng());return vb(n,o).bind((o=>hs(o)?Cb(e,o):((e,t,n,o,r)=>Cm(n,e.getBody(),r).bind((e=>vb(t,bn.fromDom(e.getNode())).bind((e=>wn(e,o)?U.none():U.some(_))))))(e,n,t,o,r)))},kb=(e,t)=>e?zp(t):jp(t),Eb=(e,t,n)=>{const o=bn.fromDom(e.getBody());return yb(o,n).fold((()=>xb(e,t,o,n).orThunk((()=>It(((e,t)=>{const n=Hi.fromRangeStart(e.selection.getRng());return kb(t,n)||ym(t,e.getBody(),n).exists((e=>kb(t,e)))})(e,t),_)))),(n=>((e,t,n,o)=>{const r=Hi.fromRangeStart(e.selection.getRng());return hs(o)?Cb(e,o):wb(e,n,t,o,r)})(e,t,o,n)))},Sb=(e,t)=>{const n=bn.fromDom(e.selection.getStart(!0)),o=ru(e);return e.selection.isCollapsed()&&0===o.length?Eb(e,t,n):((e,t,n)=>{const o=bn.fromDom(e.getBody()),r=e.selection.getRng();return 0!==n.length?fb(e,n,U.none()):bb(e,o,r,t)})(e,n,o)},_b=(e,t)=>{let n=t;for(;n&&n!==e;){if(rr(n)||sr(n))return n;n=n.parentNode}return null},Nb=["data-ephox-","data-mce-","data-alloy-","data-snooker-","_"],Rb=Pt.each,Ab=e=>{const t=e.dom,n=new Set(e.serializer.getTempAttrs()),o=e=>q(Nb,(t=>Ve(e,t)))||n.has(e);return{compare:(e,n)=>{if(e.nodeName!==n.nodeName||e.nodeType!==n.nodeType)return!1;const r=e=>{const n={};return Rb(t.getAttribs(e),(r=>{const s=r.nodeName.toLowerCase();"style"===s||o(s)||(n[s]=t.getAttrib(e,s))})),n},s=(e,t)=>{for(const n in e)if(Se(e,n)){const o=t[n];if(C(o))return!1;if(e[n]!==o)return!1;delete t[n]}for(const e in t)if(Se(t,e))return!1;return!0};if(jo(e)&&jo(n)){if(!s(r(e),r(n)))return!1;if(!s(t.parseStyle(t.getAttrib(e,"style")),t.parseStyle(t.getAttrib(n,"style"))))return!1}return!Hm(e)&&!Hm(n)},isAttributeInternal:o}},Db=(e,t,n,o)=>{const r=n.name;for(let t=0,s=e.length;t<s;t++){const s=e[t];if(s.name===r){const e=o.nodes[r];e?e.nodes.push(n):o.nodes[r]={filter:s,nodes:[n]}}}if(n.attributes)for(let e=0,r=t.length;e<r;e++){const r=t[e],s=r.name;if(s in n.attributes.map){const e=o.attributes[s];e?e.nodes.push(n):o.attributes[s]={filter:r,nodes:[n]}}}},Ob=(e,t)=>{const n=(e,n)=>{he(e,(e=>{const o=ue(e.nodes);K(e.filter.callbacks,(r=>{for(let t=o.length-1;t>=0;t--){const r=o[t];(n?void 0!==r.attr(e.filter.name):r.name===e.filter.name)&&!w(r.parent)||o.splice(t,1)}o.length>0&&r(o,e.filter.name,t)}))}))};n(e.nodes,!1),n(e.attributes,!0)},Tb=(e,t,n,o={})=>{const r=((e,t,n)=>{const o={nodes:{},attributes:{}};return n.firstChild&&((e,t)=>{let n=e;for(;n=n.walk();)t(n)})(n,(n=>{Db(e,t,n,o)})),o})(e,t,n);Ob(r,o)},Bb=(e,t,n)=>{if(e.insert&&t(n)){const e=new up("br",1);e.attr("data-mce-bogus","1"),n.empty().append(e)}else n.empty().append(new up("#text",3)).value=mr},Pb=(e,t)=>{const n=null==e?void 0:e.firstChild;return x(n)&&n===e.lastChild&&n.name===t},Lb=(e,t,n,o)=>o.isEmpty(t,n,(t=>((e,t)=>{const n=e.getElementRule(t.name);return!0===(null==n?void 0:n.paddEmpty)})(e,t))),Mb=e=>{let t;for(let n=e;n;n=n.parent){const e=n.attr("contenteditable");if("false"===e)break;"true"===e&&(t=n)}return U.from(t)},Ib=(e,t,n=e.parent)=>{if(t.getSpecialElements()[e.name])e.empty().remove();else{const o=e.children();for(const e of o)n&&!t.isValidChild(n.name,e.name)&&Ib(e,t,n);e.unwrap()}},Fb=(e,t,n,o=_)=>{const r=t.getTextBlockElements(),s=t.getNonEmptyElements(),a=t.getWhitespaceElements(),i=Pt.makeMap("tr,td,th,tbody,thead,tfoot,table"),l=new Set,d=e=>e!==n&&!i[e.name];for(let n=0;n<e.length;n++){const i=e[n];let c,m,u;if(!i.parent||l.has(i))continue;if(r[i.name]&&"li"===i.parent.name){let e=i.next;for(;e&&r[e.name];)e.name="li",l.add(e),i.parent.insert(e,i.parent),e=e.next;i.unwrap();continue}const f=[i];for(c=i.parent;c&&!t.isValidChild(c.name,i.name)&&d(c);c=c.parent)f.push(c);if(c&&f.length>1)if(t.isValidChild(c.name,i.name)){f.reverse(),m=f[0].clone(),o(m);let e=m;for(let n=0;n<f.length-1;n++){t.isValidChild(e.name,f[n].name)&&n>0?(u=f[n].clone(),o(u),e.append(u)):u=e;for(let e=f[n].firstChild;e&&e!==f[n+1];){const t=e.next;u.append(e),e=t}e=u}Lb(t,s,a,m)?c.insert(i,f[0],!0):(c.insert(m,f[0],!0),c.insert(i,m)),c=f[0],(Lb(t,s,a,c)||Pb(c,"br"))&&c.empty().remove()}else Ib(i,t);else if(i.parent){if("li"===i.name){let e=i.prev;if(e&&("ul"===e.name||"ol"===e.name)){e.append(i);continue}if(e=i.next,e&&("ul"===e.name||"ol"===e.name)&&e.firstChild){e.insert(i,e.firstChild,!0);continue}const t=new up("ul",1);o(t),i.wrap(t);continue}if(t.isValidChild(i.parent.name,"div")&&t.isValidChild("div",i.name)){const e=new up("div",1);o(e),i.wrap(e)}else Ib(i,t)}}},Ub=(e,t,n=t.parent)=>!(!n||!e.children[t.name]||e.isValidChild(n.name,t.name))||!(!n||"a"!==t.name||!((e,t)=>{let n=e;for(;n;){if(n.name===t)return!0;n=n.parent}return!1})(n,"a")),zb=e=>{const t=Hi.fromRangeStart(e),n=Hi.fromRangeEnd(e),o=e.commonAncestorContainer;return ym(!1,o,n).map((r=>!Vc(t,n,o)&&Vc(t,r,o)?((e,t,n,o)=>{const r=document.createRange();return r.setStart(e,t),r.setEnd(n,o),r})(t.container(),t.offset(),r.container(),r.offset()):e)).getOr(e)},jb=e=>e.collapsed?e:zb(e),Hb=(e,t)=>e.getBlockElements()[t.name]&&(e=>x(e.firstChild)&&e.firstChild===e.lastChild)(t)&&(e=>"br"===e.name||e.value===mr)(t.firstChild),$b=(e,t)=>{let n=t.firstChild,o=t.lastChild;return n&&"meta"===n.name&&(n=n.next),o&&"mce_marker"===o.attr("id")&&(o=o.prev),((e,t)=>{const n=e.getNonEmptyElements();return x(t)&&(t.isEmpty(n)||Hb(e,t))})(e,o)&&(o=null==o?void 0:o.prev),!(!n||n!==o)&&("ul"===n.name||"ol"===n.name)},Vb=e=>x(null==e?void 0:e.firstChild)&&e.firstChild===e.lastChild&&(e=>e.data===mr||nr(e))(e.firstChild),qb=e=>{return e.length>0&&(!(t=e[e.length-1]).firstChild||Vb(t))?e.slice(0,-1):e;var t},Wb=(e,t)=>{const n=e.getParent(t,e.isBlock);return n&&"LI"===n.nodeName?n:null},Kb=(e,t)=>{const n=Hi.after(e),o=gm(t).prev(n);return o?o.toRange():null},Gb=(e,t,n)=>{const o=e.parentNode;return o&&Pt.each(t,(t=>{o.insertBefore(t,e)})),((e,t)=>{const n=Hi.before(e),o=gm(t).next(n);return o?o.toRange():null})(e,n)},Yb=(e,t,n,o)=>{const r=((e,t,n)=>{const o=t.serialize(n);return(e=>{var t,n;const o=e.firstChild,r=e.lastChild;return o&&"META"===o.nodeName&&(null===(t=o.parentNode)||void 0===t||t.removeChild(o)),r&&"mce_marker"===r.id&&(null===(n=r.parentNode)||void 0===n||n.removeChild(r)),e})(e.createFragment(o))})(t,e,o),s=Wb(t,n.startContainer),a=qb((i=r.firstChild,X(null!==(l=null==i?void 0:i.childNodes)&&void 0!==l?l:[],(e=>"LI"===e.nodeName))));var i,l;const d=t.getRoot(),c=e=>{const o=Hi.fromRangeStart(n),r=gm(t.getRoot()),a=1===e?r.prev(o):r.next(o),i=null==a?void 0:a.getNode();return!i||Wb(t,i)!==s};return s?c(1)?Gb(s,a,d):c(2)?((e,t,n,o)=>(o.insertAfter(t.reverse(),e),Kb(t[0],n)))(s,a,d,t):((e,t,n,o)=>{const r=((e,t)=>{const n=t.cloneRange(),o=t.cloneRange();return n.setStartBefore(e),o.setEndAfter(e),[n.cloneContents(),o.cloneContents()]})(e,o),s=e.parentNode;return s&&(s.insertBefore(r[0],e),Pt.each(t,(t=>{s.insertBefore(t,e)})),s.insertBefore(r[1],e),s.removeChild(e)),Kb(t[t.length-1],n)})(s,a,d,n):null},Xb=["pre"],Qb=ar,Jb=(e,t)=>{var n,o,r;let s;const a=e.dom,i=e.selection;if(!t)return;i.scrollIntoView(t);const l=_b(e.getBody(),t);if(l&&"false"===a.getContentEditable(l))return a.remove(t),void i.select(l);let d=a.createRng();const c=t.previousSibling;if(Xo(c)){d.setStart(c,null!==(o=null===(n=c.nodeValue)||void 0===n?void 0:n.length)&&void 0!==o?o:0);const e=t.nextSibling;Xo(e)&&(c.appendData(e.data),null===(r=e.parentNode)||void 0===r||r.removeChild(e))}else d.setStartBefore(t),d.setEndBefore(t);const m=a.getParent(t,a.isBlock);a.remove(t),m&&a.isEmpty(m)&&(vo(bn.fromDom(m)),d.setStart(m,0),d.setEnd(m,0),Qb(m)||(e=>!!e.getAttribute("data-mce-fragment"))(m)||!(s=(t=>{let n=Hi.fromRangeStart(t);return n=gm(e.getBody()).next(n),null==n?void 0:n.toRange()})(d))?a.add(m,a.create("br",{"data-mce-bogus":"1"})):(d=s,a.remove(m))),i.setRng(d)},Zb=e=>{const t=e.dom,n=jb(e.selection.getRng());e.selection.setRng(n);const o=t.getParent(n.startContainer,Qb);((e,t,n)=>{if(x(n))return n===e.getParent(t.endContainer,Qb)&&lu(bn.fromDom(n),t);return!1})(t,n,o)?pb(e,n,bn.fromDom(o)):n.startContainer===n.endContainer&&n.endOffset-n.startOffset==1&&Xo(n.startContainer.childNodes[n.startOffset])?n.deleteContents():e.getDoc().execCommand("Delete",!1)},ev=(e,t,n)=>{var o,r;const s=e.selection,a=e.dom,i=e.parser,l=n.merge,d=kp({validate:!0},e.schema),c='<span id="mce_marker" data-mce-type="bookmark"></span>';-1===t.indexOf("{$caret}")&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,c);let m=s.getRng();const u=m.startContainer,f=e.getBody();u===f&&s.isCollapsed()&&a.isBlock(f.firstChild)&&((e,t)=>x(t)&&!e.schema.getVoidElements()[t.nodeName])(e,f.firstChild)&&a.isEmpty(f.firstChild)&&(m=a.createRng(),m.setStart(f.firstChild,0),m.setEnd(f.firstChild,0),s.setRng(m)),s.isCollapsed()||Zb(e);const g=s.getNode(),p={context:g.nodeName.toLowerCase(),data:n.data,insert:!0},h=i.parse(t,p);if(!0===n.paste&&$b(e.schema,h)&&((e,t)=>!!Wb(e,t))(a,g))return m=Yb(d,a,s.getRng(),h),m&&s.setRng(m),t;!0===n.paste&&((e,t,n,o)=>{var r;const s=t.firstChild,a=t.lastChild,i=s===("bookmark"===a.attr("data-mce-type")?a.prev:a),l=V(Xb,s.name);if(i&&l){const t="false"!==s.attr("contenteditable"),a=(null===(r=e.getParent(n,e.isBlock))||void 0===r?void 0:r.nodeName.toLowerCase())===s.name,i=U.from(_b(o,n)).forall(rr);return t&&a&&i}return!1})(a,h,g,e.getBody())&&(null===(o=h.firstChild)||void 0===o||o.unwrap()),(e=>{let t=e;for(;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")})(h);let b=h.lastChild;if(b&&"mce_marker"===b.attr("id")){const t=b;for(b=b.prev;b;b=b.walk(!0))if(3===b.type||!a.isBlock(b.name)){b.parent&&e.schema.isValidChild(b.parent.name,"span")&&b.parent.insert(t,b,"br"===b.name);break}}if(e._selectionOverrides.showBlockCaretContainer(g),p.invalid){e.selection.setContent(c);let n,o=s.getNode();const l=e.getBody();for(er(o)?o=n=l:n=o;n&&n!==l;)o=n,n=n.parentNode;t=o===l?l.innerHTML:a.getOuterHTML(o);const m=i.parse(t),u=(e=>{for(let t=e;t;t=t.walk())if("mce_marker"===t.attr("id"))return U.some(t);return U.none()})(m),f=u.bind(Mb).getOr(m);u.each((e=>e.replace(h)));const g=h.children(),p=null!==(r=h.parent)&&void 0!==r?r:m;h.unwrap();const b=X(g,(t=>Ub(e.schema,t,p)));Fb(b,e.schema,f),Tb(i.getNodeFilters(),i.getAttributeFilters(),m),t=d.serialize(m),o===l?a.setHTML(l,t):a.setOuterHTML(o,t)}else t=d.serialize(h),((e,t,n)=>{var o;if("all"===n.getAttribute("data-mce-bogus"))null===(o=n.parentNode)||void 0===o||o.insertBefore(e.dom.createFragment(t),n);else{const o=n.firstChild,r=n.lastChild;!o||o===r&&"BR"===o.nodeName?e.dom.setHTML(n,t):e.selection.setContent(t,{no_events:!0})}})(e,t,g);var v;return((e,t)=>{const n=e.schema.getTextInlineElements(),o=e.dom;if(t){const t=e.getBody(),r=Ab(e);Pt.each(o.select("*[data-mce-fragment]"),(e=>{if(x(n[e.nodeName.toLowerCase()])&&Np(o,e))for(let n=e.parentElement;x(n)&&n!==t&&!Rp(o,e,n);n=n.parentElement)if(r.compare(n,e)){o.remove(e,!0);break}}))}})(e,l),Jb(e,a.get("mce_marker")),v=e.getBody(),Pt.each(v.getElementsByTagName("*"),(e=>{e.removeAttribute("data-mce-fragment")})),((e,t)=>{U.from(e.getParent(t,"td,th")).map(bn.fromDom).each(Tr)})(a,s.getStart()),((e,t,n)=>{const o=Rn(bn.fromDom(n),(e=>wn(e,bn.fromDom(t))));de(o,o.length-2).filter(Wt).fold((()=>ks(e,t)),(t=>ks(e,t.dom)))})(e.schema,e.getBody(),s.getStart()),t},tv=e=>e instanceof up,nv=(e,t,n)=>{e.dom.setHTML(e.getBody(),t),!0!==n&&(e=>{qg(e)&&Sm(e.getBody()).each((t=>{const n=t.getNode(),o=Ko(n)?Sm(n).getOr(t):t;e.selection.setRng(o.toRange())}))})(e)},ov=(e,t,n)=>U.from(e.getBody()).map((o=>tv(t)?((e,t,n,o)=>{Tb(e.parser.getNodeFilters(),e.parser.getAttributeFilters(),n);const r=kp({validate:!1},e.schema).serialize(n),s=_r(bn.fromDom(t))?r:Pt.trim(r);return nv(e,s,o.no_selection),{content:n,html:s}})(e,o,t,n):((e,t,n,o)=>{if(0===n.length||/^\s+$/.test(n)){const r='<br data-mce-bogus="1">';"TABLE"===t.nodeName?n="<tr><td>"+r+"</td></tr>":/^(UL|OL)$/.test(t.nodeName)&&(n="<li>"+r+"</li>");const s=Ll(e);return e.schema.isValidChild(t.nodeName.toLowerCase(),s.toLowerCase())?(n=r,n=e.dom.createHTML(s,Ml(e),n)):n||(n=r),nv(e,n,o.no_selection),{content:n,html:n}}{"raw"!==o.format&&(n=kp({validate:!1},e.schema).serialize(e.parser.parse(n,{isRootContent:!0,insert:!0})));const r=_r(bn.fromDom(t))?n:Pt.trim(n);return nv(e,r,o.no_selection),{content:r,html:r}}})(e,o,t,n))).getOr({content:t,html:tv(n.content)?"":n.content}),rv=(e,t)=>((e,t)=>{const n=e.dom;return n.parentNode?Xn(bn.fromDom(n.parentNode),(n=>!wn(e,n)&&t(n))):U.none()})(e,t).isSome(),sv=e=>k(e)?e:I,av=(e,t,n)=>{const o=t(e),r=sv(n);return o.orThunk((()=>r(e)?U.none():((e,t,n)=>{let o=e.dom;const r=sv(n);for(;o.parentNode;){o=o.parentNode;const e=bn.fromDom(o),n=t(e);if(n.isSome())return n;if(r(e))break}return U.none()})(e,t,r)))},iv=Eu,lv=(e,t,n)=>{const o=e.formatter.get(n);if(o)for(let n=0;n<o.length;n++){const r=o[n];if(Tu(r)&&!1===r.inherit&&e.dom.is(t,r.selector))return!0}return!1},dv=(e,t,n,o,r)=>{const s=e.dom.getRoot();if(t===s)return!1;const a=e.dom.getParent(t,(t=>!!lv(e,t,n)||(t.parentNode===s||!!uv(e,t,n,o,!0))));return!!uv(e,a,n,o,r)},cv=(e,t,n)=>!(!Bu(n)||!iv(t,n.inline))||(!(!Ou(n)||!iv(t,n.block))||!!Tu(n)&&(jo(t)&&e.is(t,n.selector))),mv=(e,t,n,o,r,s)=>{const a=n[o],i="attributes"===o;if(k(n.onmatch))return n.onmatch(t,n,o);if(a)if(Re(a)){for(let n=0;n<a.length;n++)if(i?e.getAttrib(t,a[n]):_u(e,t,a[n]))return!0}else for(const o in a)if(Se(a,o)){const l=i?e.getAttrib(t,o):_u(e,t,o),d=ku(a[o],s),c=w(l)||Qe(l);if(c&&w(d))continue;if(r&&c&&!n.exact)return!1;if((!r||n.exact)&&!iv(l,Su(d,o)))return!1}return!0},uv=(e,t,n,o,r)=>{const s=e.formatter.get(n),a=e.dom;if(s&&jo(t))for(let n=0;n<s.length;n++){const i=s[n];if(cv(e.dom,t,i)&&mv(a,t,i,"attributes",r,o)&&mv(a,t,i,"styles",r,o)){const n=i.classes;if(n)for(let r=0;r<n.length;r++)if(!e.dom.hasClass(t,ku(n[r],o)))return;return i}}},fv=(e,t,n,o,r)=>{if(o)return dv(e,o,t,n,r);if(o=e.selection.getNode(),dv(e,o,t,n,r))return!0;const s=e.selection.getStart();return!(s===o||!dv(e,s,t,n,r))},gv=(e,t)=>{const n=t=>wn(t,bn.fromDom(e.getBody()));return U.from(e.selection.getStart(!0)).bind((o=>av(bn.fromDom(o),(n=>fe(t,(t=>((t,n)=>uv(e,t.dom,n)?U.some(n):U.none())(n,t)))),n))).getOrNull()},pv=(e,t,n)=>J(n,((n,o)=>{const r=((e,t)=>Au(e,t,(e=>{const t=e=>k(e)||e.length>1&&"%"===e.charAt(0);return q(["styles","attributes"],(n=>Ee(e,n).exists((e=>{const n=b(e)?e:ke(e);return q(n,t)}))))})))(e,o);return e.formatter.matchNode(t,o,{},r)?n.concat([o]):n}),[]),hv=Br,bv=e=>(e=>{const t=[];let n=e;for(;n;){if(Xo(n)&&n.data!==hv||n.childNodes.length>1)return[];jo(n)&&t.push(n),n=n.firstChild}return t})(e).length>0,vv=e=>{if(e){const t=new Fo(e,e);for(let e=t.current();e;e=t.next())if(Xo(e))return e}return null},yv=e=>{const t=bn.fromTag("span");return Zt(t,{id:Nm,"data-mce-bogus":"1","data-mce-type":"format-caret"}),e&&po(t,bn.fromText(hv)),t},Cv=(e,t,n=!0)=>{const o=e.dom,r=e.selection;if(bv(t))Mh(e,!1,bn.fromDom(t),n);else{const e=r.getRng(),n=o.getParent(t,o.isBlock),s=e.startContainer,a=e.startOffset,i=e.endContainer,l=e.endOffset,d=(e=>{const t=vv(e);return t&&t.data.charAt(0)===hv&&t.deleteData(0,1),t})(t);o.remove(t,!0),s===d&&a>0&&e.setStart(d,a-1),i===d&&l>0&&e.setEnd(d,l-1),n&&o.isEmpty(n)&&Or(bn.fromDom(n)),r.setRng(e)}},wv=(e,t,n=!0)=>{const o=e.dom,r=e.selection;if(t)Cv(e,t,n);else if(!(t=Am(e.getBody(),r.getStart())))for(;t=o.get(Nm);)Cv(e,t,!1)},xv=(e,t)=>(e.appendChild(t),t),kv=(e,t)=>{var n;const o=Q(e,((e,t)=>xv(e,t.cloneNode(!1))),t),r=null!==(n=o.ownerDocument)&&void 0!==n?n:document;return xv(o,r.createTextNode(hv))},Ev=(e,t,n,o)=>{const r=e.dom,s=e.selection;let a=!1;const i=e.formatter.get(t);if(!i)return;const l=s.getRng(),d=l.startContainer,c=l.startOffset;let m=d;Xo(d)&&(c!==d.data.length&&(a=!0),m=m.parentNode);const u=[];let f;for(;m;){if(uv(e,m,t,n,o)){f=m;break}m.nextSibling&&(a=!0),u.push(m),m=m.parentNode}if(f)if(a){const a=s.getBookmark();l.collapse(!0);let d=Yu(r,l,i,!0);d=Yf(d),e.formatter.remove(t,n,d,o),s.moveToBookmark(a)}else{const a=Am(e.getBody(),f),i=yv(!1).dom;((e,t,n)=>{var o,r;const s=e.dom,a=s.getParent(n,T(yu,e.schema));a&&s.isEmpty(a)?null===(o=n.parentNode)||void 0===o||o.replaceChild(t,n):(Ar(bn.fromDom(n)),s.isEmpty(n)?null===(r=n.parentNode)||void 0===r||r.replaceChild(t,n):s.insertAfter(t,n))})(e,i,null!=a?a:f);const l=((e,t,n,o,r,s)=>{const a=e.formatter,i=e.dom,l=X(ge(a.get()),(e=>e!==o&&!$e(e,"removeformat"))),d=pv(e,n,l);if(X(d,(t=>!Du(e,t,o))).length>0){const e=n.cloneNode(!1);return i.add(t,e),a.remove(o,r,e,s),i.remove(e),U.some(e)}return U.none()})(e,i,f,t,n,o),d=kv(u.concat(l.toArray()),i);a&&Cv(e,a,!1),s.setCursorLocation(d,1),r.isEmpty(f)&&r.remove(f)}},Sv=e=>{e.on("mouseup keydown",(t=>{((e,t)=>{const n=e.selection,o=e.getBody();wv(e,null,!1),8!==t&&46!==t||!n.isCollapsed()||n.getStart().innerHTML!==hv||wv(e,Am(o,n.getStart())),37!==t&&39!==t||wv(e,Am(o,n.getStart()))})(e,t.keyCode)}))},_v=e=>{const t=yv(!1),n=kv(e,t.dom);return{caretContainer:t,caretPosition:Hi(n,0)}},Nv=(e,t)=>{const{caretContainer:n,caretPosition:o}=_v(t);return uo(bn.fromDom(e),n),yo(bn.fromDom(e)),o},Rv=(e,t)=>{const n=e.schema.getTextInlineElements();return Se(n,$t(t))&&!Rm(t.dom)&&!Wo(t.dom)},Av=e=>Rm(e.dom)&&bv(e.dom),Dv={},Ov=$o(["pre"]);((e,t)=>{Dv[e]||(Dv[e]=[]),Dv[e].push(t)})("pre",(e=>{const t=e.selection.getRng();if(!t.collapsed){const t=e.selection.getSelectedBlocks(),n=X(X(t,Ov),(e=>t=>{const n=t.previousSibling;return Ov(n)&&V(e,n)})(t));K(n,(e=>{((e,t)=>{const n=bn.fromDom(t),o=En(n).dom;yo(n),bo(bn.fromDom(e),[bn.fromTag("br",o),bn.fromTag("br",o),...Bn(n)])})(e.previousSibling,e)}))}}));const Tv=["fontWeight","fontStyle","color","fontSize","fontFamily"],Bv=e=>ee(e,(e=>Bu(e)&&"span"===e.inline&&(e=>p(e.styles)&&q(ge(e.styles),(e=>V(Tv,e))))(e))),Pv=(e,t)=>{const n=e.get(t);return b(n)?Bv(n):U.none()},Lv=(e,t)=>Em(t,Hi.fromRangeStart(e)).isNone(),Mv=(e,t)=>!1===km(t,Hi.fromRangeEnd(e)).exists((e=>!nr(e.getNode())||km(t,e).isSome())),Iv=e=>t=>dr(t)&&e.isEditable(t),Fv=e=>X((e=>{const t=e.getSelectedBlocks(),n=e.getRng();if(e.isCollapsed())return[];if(1===t.length)return Lv(n,t[0])&&Mv(n,t[0])?t:[];{const e=ce(t).filter((e=>Lv(n,e))).toArray(),o=me(t).filter((e=>Mv(n,e))).toArray(),r=t.slice(1,-1);return e.concat(r).concat(o)}})(e),Iv(e.dom)),Uv=e=>X(e.getSelectedBlocks(),Iv(e.dom)),zv=Pt.each,jv=e=>jo(e)&&!Hm(e)&&!Rm(e)&&!Wo(e),Hv=(e,t)=>{for(let n=e;n;n=n[t]){if(Xo(n)&&Xe(n.data))return e;if(jo(n)&&!Hm(n))return n}return e},$v=(e,t,n)=>{const o=Ab(e),r=jo(t)&&pu(t),s=jo(n)&&pu(n);if(r&&s){const r=Hv(t,"previousSibling"),s=Hv(n,"nextSibling");if(o.compare(r,s)){for(let e=r.nextSibling;e&&e!==s;){const t=e;e=e.nextSibling,r.appendChild(t)}return e.dom.remove(s),Pt.each(Pt.grep(s.childNodes),(e=>{r.appendChild(e)})),r}}return n},Vv=(e,t,n,o)=>{var r;if(o&&!1!==t.merge_siblings){const t=null!==(r=$v(e,vu(o),o))&&void 0!==r?r:o;$v(e,t,vu(t,!0))}},qv=(e,t,n)=>{zv(e.childNodes,(e=>{jv(e)&&(t(e)&&n(e),e.hasChildNodes()&&qv(e,t,n))}))},Wv=(e,t)=>n=>!(!n||!_u(e,n,t)),Kv=(e,t,n)=>o=>{e.setStyle(o,t,n),""===o.getAttribute("style")&&o.removeAttribute("style"),((e,t)=>{"SPAN"===t.nodeName&&0===e.getAttribs(t).length&&e.remove(t,!0)})(e,o)},Gv=gl([{keep:[]},{rename:["name"]},{removed:[]}]),Yv=/^(src|href|style)$/,Xv=Pt.each,Qv=Eu,Jv=(e,t,n)=>e.isChildOf(t,n)&&t!==n&&!e.isBlock(n),Zv=(e,t,n)=>{let o=t[n?"startContainer":"endContainer"],r=t[n?"startOffset":"endOffset"];if(jo(o)){const e=o.childNodes.length-1;!n&&r&&r--,o=o.childNodes[r>e?e:r]}return Xo(o)&&n&&r>=o.data.length&&(o=new Fo(o,e.getBody()).next()||o),Xo(o)&&!n&&0===r&&(o=new Fo(o,e.getBody()).prev()||o),o},ey=(e,t)=>{const n=t?"firstChild":"lastChild",o=e[n];return(e=>/^(TR|TH|TD)$/.test(e.nodeName))(e)&&o?"TR"===e.nodeName&&o[n]||o:e},ty=(e,t,n,o)=>{var r;const s=e.create(n,o);return null===(r=t.parentNode)||void 0===r||r.insertBefore(s,t),s.appendChild(t),s},ny=(e,t,n,o,r)=>{const s=bn.fromDom(t),a=bn.fromDom(e.create(o,r)),i=n?Tn(s):On(s);return bo(a,i),n?(uo(s,a),go(a,s)):(fo(s,a),po(a,s)),a.dom},oy=(e,t,n)=>{const o=t.parentNode;let r;const s=e.dom,a=Ll(e);Ou(n)&&o===s.getRoot()&&(n.list_block&&Qv(t,n.list_block)||K(ue(t.childNodes),(t=>{Cu(e,a,t.nodeName.toLowerCase())?r?r.appendChild(t):(r=ty(s,t,a),s.setAttribs(r,Ml(e))):r=null}))),(e=>Tu(e)&&Bu(e)&&Lt(Ee(e,"mixed"),!0))(n)&&!Qv(n.inline,t)||s.remove(t,!0)},ry=(e,t,n)=>E(e)?{name:t,value:null}:{name:e,value:ku(t,n)},sy=(e,t)=>{""===e.getAttrib(t,"style")&&(t.removeAttribute("style"),t.removeAttribute("data-mce-style"))},ay=(e,t,n,o,r)=>{let s=!1;Xv(n.styles,((a,i)=>{const{name:l,value:d}=ry(i,a,o),c=Su(d,l);(n.remove_similar||v(d)||!jo(r)||Qv(_u(e,r,l),c))&&e.setStyle(t,l,""),s=!0})),s&&sy(e,t)},iy=(e,t,n,o,r)=>{const s=e.dom,a=Ab(e),i=e.schema;if(Bu(t)&&_s(i,t.inline)&&Rs(i,o)&&o.parentElement===e.getBody())return oy(e,o,t),Gv.removed();if(!t.ceFalseOverride&&o&&"false"===s.getContentEditableParent(o))return Gv.keep();if(o&&!cv(s,o,t)&&!((e,t)=>t.links&&"A"===e.nodeName)(o,t))return Gv.keep();const l=o,d=t.preserve_attributes;if(Bu(t)&&"all"===t.remove&&b(d)){const e=X(s.getAttribs(l),(e=>V(d,e.name.toLowerCase())));if(s.removeAllAttribs(l),K(e,(e=>s.setAttrib(l,e.name,e.value))),e.length>0)return Gv.rename("span")}if("all"!==t.remove){ay(s,l,t,n,r),Xv(t.attributes,((e,o)=>{const{name:a,value:i}=ry(o,e,n);if(t.remove_similar||v(i)||!jo(r)||Qv(s.getAttrib(r,a),i)){if("class"===a){const e=s.getAttrib(l,a);if(e){let t="";if(K(e.split(/\s+/),(e=>{/mce\-\w+/.test(e)&&(t+=(t?" ":"")+e)})),t)return void s.setAttrib(l,a,t)}}if(Yv.test(a)&&l.removeAttribute("data-mce-"+a),"style"===a&&$o(["li"])(l)&&"none"===s.getStyle(l,"list-style-type"))return l.removeAttribute(a),void s.setStyle(l,"list-style-type","none");"class"===a&&l.removeAttribute("className"),l.removeAttribute(a)}})),Xv(t.classes,(e=>{e=ku(e,n),jo(r)&&!s.hasClass(r,e)||s.removeClass(l,e)}));const e=s.getAttribs(l);for(let t=0;t<e.length;t++){const n=e[t].nodeName;if(!a.isAttributeInternal(n))return Gv.keep()}}return"none"!==t.remove?(oy(e,l,t),Gv.removed()):Gv.keep()},ly=(e,t,n,o,r)=>iy(e,t,n,o,r).fold(I,(t=>(e.dom.rename(o,t),!0)),F),dy=(e,t,n,o)=>iy(e,t,n,o,o).fold(A(o),(t=>(e.dom.createFragment().appendChild(o),e.dom.rename(o,t))),A(null)),cy=(e,t,n,o,r)=>{const s=e.formatter.get(t),a=s[0],i=e.dom,l=e.selection,d=o=>{const i=((e,t,n,o,r)=>{let s;return t.parentNode&&K(Ru(e.dom,t.parentNode).reverse(),(t=>{if(!s&&jo(t)&&"_start"!==t.id&&"_end"!==t.id){const a=uv(e,t,n,o,r);a&&!1!==a.split&&(s=t)}})),s})(e,o,t,n,r);return((e,t,n,o,r,s,a,i)=>{var l,d;let c,m;const u=e.dom;if(n){const f=n.parentNode;for(let n=o.parentNode;n&&n!==f;n=n.parentNode){let o=u.clone(n,!1);for(let n=0;n<t.length&&(o=dy(e,t[n],i,o),null!==o);n++);o&&(c&&o.appendChild(c),m||(m=o),c=o)}!s||a.mixed&&u.isBlock(n)||(o=null!==(l=u.split(n,o))&&void 0!==l?l:o),c&&m&&(null===(d=r.parentNode)||void 0===d||d.insertBefore(c,r),m.appendChild(r),Bu(a)&&Vv(e,a,0,c))}return o})(e,s,i,o,o,!0,a,n)},c=t=>q(s,(o=>ly(e,o,n,t,t))),m=t=>{const n=ue(t.childNodes),o=c(t)||q(s,(e=>cv(i,t,e))),r=t.parentNode;if(!o&&x(r)&&Pu(a)&&c(r),a.deep&&n.length)for(let e=0;e<n.length;e++)m(n[e]);K(["underline","line-through","overline"],(n=>{jo(t)&&e.dom.getStyle(t,"text-decoration")===n&&t.parentNode&&Nu(i,t.parentNode)===n&&ly(e,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:n}},void 0,t)}))},u=e=>{const t=i.get(e?"_start":"_end");if(t){let n=t[e?"firstChild":"lastChild"];return(e=>Hm(e)&&jo(e)&&("_start"===e.id||"_end"===e.id))(n)&&(n=n[e?"firstChild":"lastChild"]),Xo(n)&&0===n.data.length&&(n=e?t.previousSibling||t.nextSibling:t.nextSibling||t.previousSibling),i.remove(t,!0),n}return null},f=t=>{let n,o,r=Yu(i,t,s,t.collapsed);if(a.split){if(r=Yf(r),n=Zv(e,r,!0),o=Zv(e,r),n!==o){if(n=ey(n,!0),o=ey(o,!1),Jv(i,n,o)){const e=U.from(n.firstChild).getOr(n);return d(ny(i,e,!0,"span",{id:"_start","data-mce-type":"bookmark"})),void u(!0)}if(Jv(i,o,n)){const e=U.from(o.lastChild).getOr(o);return d(ny(i,e,!1,"span",{id:"_end","data-mce-type":"bookmark"})),void u(!1)}n=ty(i,n,"span",{id:"_start","data-mce-type":"bookmark"}),o=ty(i,o,"span",{id:"_end","data-mce-type":"bookmark"});const e=i.createRng();e.setStartAfter(n),e.setEndBefore(o),Xu(i,e,(e=>{K(e,(e=>{Hm(e)||Hm(e.parentNode)||d(e)}))})),d(n),d(o),n=u(!0),o=u()}else n=o=d(n);r.startContainer=n.parentNode?n.parentNode:n,r.startOffset=i.nodeIndex(n),r.endContainer=o.parentNode?o.parentNode:o,r.endOffset=i.nodeIndex(o)+1}Xu(i,r,(e=>{K(e,m)}))};if(o){if(fu(o)){const e=i.createRng();e.setStartBefore(o),e.setEndAfter(o),f(e)}else f(o);cf(e,t,o,n)}else l.isCollapsed()&&Bu(a)&&!ru(e).length?Ev(e,t,n,r):(hu(e,(()=>mu(e,f)),(o=>Bu(a)&&fv(e,t,n,o))),e.nodeChanged()),((e,t,n)=>{"removeformat"===t?K(Uv(e.selection),(t=>{K(Tv,(n=>e.dom.setStyle(t,n,""))),sy(e.dom,t)})):Pv(e.formatter,t).each((t=>{K(Uv(e.selection),(o=>ay(e.dom,o,t,n,null)))}))})(e,t,n),cf(e,t,o,n)},my=Pt.each,uy=(e,t,n,o)=>{my(t,(t=>{Bu(t)&&my(e.dom.select(t.inline,o),(o=>{jv(o)&&ly(e,t,n,o,t.exact?o:null)})),((e,t,n)=>{if(t.clear_child_styles){const o=t.links?"*:not(a)":"*";zv(e.select(o,n),(n=>{jv(n)&&pu(n)&&zv(t.styles,((t,o)=>{e.setStyle(n,o,"")}))}))}})(e.dom,t,o)}))},fy=Pt.each,gy=(e,t,n,o)=>{if(fy(n.styles,((n,r)=>{e.setStyle(t,r,ku(n,o))})),n.styles){const n=e.getAttrib(t,"style");n&&e.setAttrib(t,"data-mce-style",n)}},py=(e,t,n,o)=>{const r=e.formatter.get(t),s=r[0],a=!o&&e.selection.isCollapsed(),i=e.dom,l=e.selection,d=(e,t=s)=>{k(t.onformat)&&t.onformat(e,t,n,o),gy(i,e,t,n),fy(t.attributes,((t,o)=>{i.setAttrib(e,o,ku(t,n))})),fy(t.classes,(t=>{const o=ku(t,n);i.hasClass(e,o)||i.addClass(e,o)}))},c=(e,t)=>{let n=!1;return fy(e,(e=>!!Tu(e)&&("false"===i.getContentEditable(t)&&!e.ceFalseOverride||(!(!x(e.collapsed)||e.collapsed===a)||(!(i.is(t,e.selector)&&!Rm(t))||(d(t,e),n=!0,!1)))))),n},m=e=>{if(g(e)){const t=i.create(e);return d(t),t}return null},u=(o,a,i)=>{const l=[];let u=!0;const f=s.inline||s.block,g=m(f),p=o=>(e=>Ou(e)&&!0===e.wrapper)(s)&&uv(e,o,t,n),h=(t,n,o)=>{const r=(e=>Ou(e)&&!0!==e.wrapper)(s)&&yu(e.schema,t)&&Cu(e,n,f);return o&&r};Xu(o,a,(t=>{let n;const a=t=>{let m=!1,b=u,v=!1;const y=t.parentNode,C=y.nodeName.toLowerCase(),w=o.getContentEditable(t);x(w)&&(b=u,u="true"===w,m=!0,v=xu(e,t));const k=u&&!m;if(nr(t)&&!((e,t,n,o)=>{if(Cd(e)&&Bu(t)&&n.parentNode){const t=ma(e.schema),r=rv(bn.fromDom(n),(e=>Rm(e.dom)));return _e(t,o)&&hs(bn.fromDom(n.parentNode),!1)&&!r}return!1})(e,s,t,C))return n=null,void(Ou(s)&&o.remove(t));if(p(t))n=null;else{if(h(t,C,k)){const e=o.rename(t,f);return d(e),l.push(e),void(n=null)}if(Tu(s)){let e=c(r,t);if(!e&&x(y)&&Pu(s)&&(e=c(r,y)),!Bu(s)||e)return void(n=null)}x(g)&&((t,n,r,a)=>{const l=t.nodeName.toLowerCase(),d=Cu(e,f,l)&&Cu(e,n,f),c=!i&&Xo(t)&&Pr(t.data),m=Rm(t),u=!Bu(s)||!o.isBlock(t);return(r||a)&&d&&!c&&!m&&u})(t,C,k,v)?(n||(n=o.clone(g,!1),y.insertBefore(n,t),l.push(n)),v&&m&&(u=b),n.appendChild(t)):(n=null,K(ue(t.childNodes),a),m&&(u=b),n=null)}};K(t,a)})),!0===s.links&&K(l,(e=>{const t=e=>{"A"===e.nodeName&&d(e,s),K(ue(e.childNodes),t)};t(e)})),K(l,(a=>{const i=(e=>{let t=0;return K(e.childNodes,(e=>{(e=>x(e)&&Xo(e)&&0===e.length)(e)||Hm(e)||t++})),t})(a);!(l.length>1)&&o.isBlock(a)||0!==i?(Bu(s)||Ou(s)&&s.wrapper)&&(s.exact||1!==i||(a=(e=>{const t=ee(e.childNodes,gu).filter((e=>"false"!==o.getContentEditable(e)&&cv(o,e,s)));return t.map((t=>{const n=o.clone(t,!1);return d(n),o.replace(n,e,!0),o.remove(t,!0),n})).getOr(e)})(a)),uy(e,r,n,a),((e,t,n,o,r)=>{const s=r.parentNode;uv(e,s,n,o)&&ly(e,t,o,r)||t.merge_with_parents&&s&&e.dom.getParent(s,(s=>!!uv(e,s,n,o)&&(ly(e,t,o,r),!0)))})(e,s,t,n,a),((e,t,n,o)=>{if(t.styles&&t.styles.backgroundColor){const r=Wv(e,"fontSize");qv(o,(e=>r(e)&&pu(e)),Kv(e,"backgroundColor",ku(t.styles.backgroundColor,n)))}})(o,s,n,a),((e,t,n,o)=>{const r=t=>{if(jo(t)&&jo(t.parentNode)&&pu(t)){const n=Nu(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)&&(Pt.walk(o,r,"childNodes"),r(o))})(o,s,0,a),((e,t,n,o)=>{if(Bu(t)&&("sub"===t.inline||"sup"===t.inline)){const n=Wv(e,"fontSize");qv(o,(e=>n(e)&&pu(e)),Kv(e,"fontSize",""));const r=X(e.select("sup"===t.inline?"sub":"sup",o),pu);e.remove(r,!0)}})(o,s,0,a),Vv(e,s,0,a)):o.remove(a,!0)}))},f=fu(o)?o:l.getNode();if("false"===i.getContentEditable(f)&&!xu(e,f))return c(r,o=f),void df(e,t,o,n);if(s){if(o)if(fu(o)){if(!c(r,o)){const e=i.createRng();e.setStartBefore(o),e.setEndAfter(o),u(i,Yu(i,e,r),!0)}}else u(i,o,!0);else a&&Bu(s)&&!ru(e).length?((e,t,n)=>{let o;const r=e.selection,s=e.formatter.get(t);if(!s)return;const a=r.getRng();let i=a.startOffset;const l=a.startContainer.nodeValue;o=Am(e.getBody(),r.getStart());const d=/[^\s\u00a0\u00ad\u200b\ufeff]/;if(l&&i>0&&i<l.length&&d.test(l.charAt(i))&&d.test(l.charAt(i-1))){const o=r.getBookmark();a.collapse(!0);let i=Yu(e.dom,a,s);i=Yf(i),e.formatter.apply(t,n,i),r.moveToBookmark(o)}else{let s=o?vv(o):null;o&&(null==s?void 0:s.data)===hv||(c=e.getDoc(),m=yv(!0).dom,o=c.importNode(m,!0),s=o.firstChild,a.insertNode(o),i=1),e.formatter.apply(t,n,o),r.setCursorLocation(s,i)}var c,m})(e,t,n):(l.setRng(jb(l.getRng())),hu(e,(()=>{mu(e,((e,t)=>{const n=t?e:Yu(i,e,r);u(i,n,!1)}))}),F),e.nodeChanged()),Pv(e.formatter,t).each((t=>{K(Fv(e.selection),(e=>gy(i,e,t,n)))}));((e,t)=>{Se(Dv,e)&&K(Dv[e],(e=>{e(t)}))})(t,e)}df(e,t,o,n)},hy=e=>Se(e,"vars"),by=e=>e.selection.getStart(),vy=(e,t,n,o,r)=>Z(t,(t=>{const s=e.formatter.matchNode(t,n,null!=r?r:{},o);return!C(s)}),(t=>!!lv(e,t,n)||!o&&x(e.formatter.matchNode(t,n,r,!0)))),yy=(e,t)=>{const n=null!=t?t:by(e);return X(Ru(e.dom,n),(e=>jo(e)&&!Wo(e)))},Cy=(e,t,n)=>{const o=yy(e,t);he(n,((n,r)=>{const s=n=>{const s=vy(e,o,r,n.similar,hy(n)?n.vars:void 0),a=s.isSome();if(n.state.get()!==a){n.state.set(a);const e=s.getOr(t);hy(n)?n.callback(a,{node:e,format:r,parents:o}):K(n.callbacks,(t=>t(a,{node:e,format:r,parents:o})))}};K([n.withSimilar,n.withoutSimilar],s),K(n.withVars,s)}))},wy=(e,t,n,o,r,s)=>(((e,t,n,o,r,s)=>{const a=t.get();K(n.split(","),(t=>{const n=Ee(a,t).getOrThunk((()=>{const e={withSimilar:{state:Ia(!1),similar:!0,callbacks:[]},withoutSimilar:{state:Ia(!1),similar:!1,callbacks:[]},withVars:[]};return a[t]=e,e})),i=()=>{const n=yy(e);return vy(e,n,t,r,s).isSome()};if(C(s)){const e=r?n.withSimilar:n.withoutSimilar;e.callbacks.push(o),1===e.callbacks.length&&e.state.set(i())}else n.withVars.push({state:Ia(i()),similar:r,vars:s,callback:o})})),t.set(a)})(e,t,n,o,r,s),{unbind:()=>((e,t,n)=>{const o=e.get();K(t.split(","),(e=>Ee(o,e).each((t=>{o[e]={withSimilar:{...t.withSimilar,callbacks:X(t.withSimilar.callbacks,(e=>e!==n))},withoutSimilar:{...t.withoutSimilar,callbacks:X(t.withoutSimilar.callbacks,(e=>e!==n))},withVars:X(t.withVars,(e=>e.callback!==n))}})))),e.set(o)})(t,n,o)}),xy=Pt.explode,ky=()=>{const e={};return{addFilter:(t,n)=>{K(xy(t),(t=>{Se(e,t)||(e[t]={name:t,callbacks:[]}),e[t].callbacks.push(n)}))},getFilters:()=>ke(e),removeFilter:(t,n)=>{K(xy(t),(t=>{if(Se(e,t))if(x(n)){const o=e[t],r=X(o.callbacks,(e=>e!==n));r.length>0?o.callbacks=r:delete e[t]}else delete e[t]}))}}},Ey=(e,t,n)=>{e.addNodeFilter("font",(e=>{K(e,(e=>{const o=t.parse(e.attr("style")),r=e.attr("color"),s=e.attr("face"),a=e.attr("size");r&&(o.color=r),s&&(o["font-family"]=s),a&&Je(a).each((e=>{o["font-size"]=n[e-1]})),e.name="span",e.attr("style",t.serialize(o)),((e,t)=>{K(t,(t=>{e.attr(t,null)}))})(e,["color","face","size"])}))}))},Sy=(e,t,n)=>{var o;const r=ga();t.convert_fonts_to_spans&&Ey(e,r,Pt.explode(null!==(o=t.font_size_legacy_values)&&void 0!==o?o:"")),((e,t,n)=>{e.addNodeFilter("strike",(e=>{const o="html4"!==t.type;K(e,(e=>{if(o)e.name="s";else{const t=n.parse(e.attr("style"));t["text-decoration"]="line-through",e.name="span",e.attr("style",n.serialize(t))}}))}))})(e,n,r)},_y=e=>{const[t,...n]=e.split(","),o=n.join(","),r=/data:([^/]+\/[^;]+)(;.+)?/.exec(t);if(r){const e=";base64"===r[2],t=e?(e=>{const t=/([a-z0-9+\/=\s]+)/i.exec(e);return t?t[1]:""})(o):decodeURIComponent(o);return U.some({type:r[1],data:t,base64Encoded:e})}return U.none()},Ny=(e,t,n=!0)=>{let o=t;if(n)try{o=atob(t)}catch(e){return U.none()}const r=new Uint8Array(o.length);for(let e=0;e<r.length;e++)r[e]=o.charCodeAt(e);return U.some(new Blob([r],{type:e}))},Ry=e=>{return Ve(e,"blob:")?(e=>fetch(e).then((e=>e.ok?e.blob():Promise.reject())).catch((()=>Promise.reject({message:`Cannot convert ${e} to Blob. Resource might not exist or is inaccessible.`,uriType:"blob"}))))(e):Ve(e,"data:")?(t=e,new Promise(((e,n)=>{_y(t).bind((({type:e,data:t,base64Encoded:n})=>Ny(e,t,n))).fold((()=>n("Invalid data URI")),e)}))):Promise.reject("Unknown URI format");var t},Ay=e=>new Promise(((t,n)=>{const o=new FileReader;o.onloadend=()=>{t(o.result)},o.onerror=()=>{var e;n(null===(e=o.error)||void 0===e?void 0:e.message)},o.readAsDataURL(e)}));let Dy=0;const Oy=(e,t,n)=>_y(e).bind((({data:e,type:o,base64Encoded:r})=>{if(t&&!r)return U.none();{const t=r?e:btoa(e);return n(t,o)}})),Ty=(e,t,n)=>{const o=e.create((r||"blobid")+Dy++,t,n);var r;return e.add(o),o},By=(e,t,n=!1)=>Oy(t,n,((t,n)=>U.from(e.getByData(t,n)).orThunk((()=>Ny(n,t).map((n=>Ty(e,n,t))))))),Py=(e,t)=>{const{blob_cache:n}=t;if(n){const t=e=>{const t=e.attr("src");(e=>e.attr("src")===Dt.transparentSrc||x(e.attr("data-mce-placeholder")))(e)||(e=>x(e.attr("data-mce-bogus")))(e)||w(t)||By(n,t,!0).each((t=>{e.attr("src",t.blobUri())}))};e.addAttributeFilter("src",(e=>K(e,t)))}};function Ly(e){return Ly="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ly(e)}function My(e,t){return My=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},My(e,t)}function Iy(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Fy(e,t,n){return Fy=Iy()?Reflect.construct:function(e,t,n){var o=[null];o.push.apply(o,t);var r=new(Function.bind.apply(e,o));return n&&My(r,n.prototype),r},Fy.apply(null,arguments)}function Uy(e){return function(e){if(Array.isArray(e))return zy(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return zy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zy(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var jy=Object.hasOwnProperty,Hy=Object.setPrototypeOf,$y=Object.isFrozen,Vy=Object.getPrototypeOf,qy=Object.getOwnPropertyDescriptor,Wy=Object.freeze,Ky=Object.seal,Gy=Object.create,Yy="undefined"!=typeof Reflect&&Reflect,Xy=Yy.apply,Qy=Yy.construct;Xy||(Xy=function(e,t,n){return e.apply(t,n)}),Wy||(Wy=function(e){return e}),Ky||(Ky=function(e){return e}),Qy||(Qy=function(e,t){return Fy(e,Uy(t))});var Jy,Zy=dC(Array.prototype.forEach),eC=dC(Array.prototype.pop),tC=dC(Array.prototype.push),nC=dC(String.prototype.toLowerCase),oC=dC(String.prototype.match),rC=dC(String.prototype.replace),sC=dC(String.prototype.indexOf),aC=dC(String.prototype.trim),iC=dC(RegExp.prototype.test),lC=(Jy=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Qy(Jy,t)});function dC(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return Xy(e,t,o)}}function cC(e,t){Hy&&Hy(e,null);for(var n=t.length;n--;){var o=t[n];if("string"==typeof o){var r=nC(o);r!==o&&($y(t)||(t[n]=r),o=r)}e[o]=!0}return e}function mC(e){var t,n=Gy(null);for(t in e)Xy(jy,e,[t])&&(n[t]=e[t]);return n}function uC(e,t){for(;null!==e;){var n=qy(e,t);if(n){if(n.get)return dC(n.get);if("function"==typeof n.value)return dC(n.value)}e=Vy(e)}return function(e){return console.warn("fallback value for",e),null}}var fC=Wy(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),gC=Wy(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),pC=Wy(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),hC=Wy(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),bC=Wy(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),vC=Wy(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),yC=Wy(["#text"]),CC=Wy(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),wC=Wy(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),xC=Wy(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),kC=Wy(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),EC=Ky(/\{\{[\w\W]*|[\w\W]*\}\}/gm),SC=Ky(/<%[\w\W]*|[\w\W]*%>/gm),_C=Ky(/^data-[\-\w.\u00B7-\uFFFF]/),NC=Ky(/^aria-[\-\w]+$/),RC=Ky(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),AC=Ky(/^(?:\w+script|data):/i),DC=Ky(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),OC=Ky(/^html$/i),TC=function(){return"undefined"==typeof window?null:window},BC=function(e,t){if("object"!==Ly(e)||"function"!=typeof e.createPolicy)return null;var n=null,o="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(o)&&(n=t.currentScript.getAttribute(o));var r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};var PC=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:TC(),n=function(t){return e(t)};if(n.version="2.3.8",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var o=t.document,r=t.document,s=t.DocumentFragment,a=t.HTMLTemplateElement,i=t.Node,l=t.Element,d=t.NodeFilter,c=t.NamedNodeMap,m=void 0===c?t.NamedNodeMap||t.MozNamedAttrMap:c,u=t.HTMLFormElement,f=t.DOMParser,g=t.trustedTypes,p=l.prototype,h=uC(p,"cloneNode"),b=uC(p,"nextSibling"),v=uC(p,"childNodes"),y=uC(p,"parentNode");if("function"==typeof a){var C=r.createElement("template");C.content&&C.content.ownerDocument&&(r=C.content.ownerDocument)}var w=BC(g,o),x=w?w.createHTML(""):"",k=r,E=k.implementation,S=k.createNodeIterator,_=k.createDocumentFragment,N=k.getElementsByTagName,R=o.importNode,A={};try{A=mC(r).documentMode?r.documentMode:{}}catch(e){}var D={};n.isSupported="function"==typeof y&&E&&void 0!==E.createHTMLDocument&&9!==A;var O,T,B=EC,P=SC,L=_C,M=NC,I=AC,F=DC,U=RC,z=null,j=cC({},[].concat(Uy(fC),Uy(gC),Uy(pC),Uy(bC),Uy(yC))),H=null,$=cC({},[].concat(Uy(CC),Uy(wC),Uy(xC),Uy(kC))),V=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),q=null,W=null,K=!0,G=!0,Y=!1,X=!1,Q=!1,J=!1,Z=!1,ee=!1,te=!1,ne=!1,oe=!0,re=!0,se=!1,ae={},ie=null,le=cC({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),de=null,ce=cC({},["audio","video","img","source","image","track"]),me=null,ue=cC({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),fe="http://www.w3.org/1998/Math/MathML",ge="http://www.w3.org/2000/svg",pe="http://www.w3.org/1999/xhtml",he=pe,be=!1,ve=["application/xhtml+xml","text/html"],ye="text/html",Ce=null,we=r.createElement("form"),xe=function(e){return e instanceof RegExp||e instanceof Function},ke=function(e){Ce&&Ce===e||(e&&"object"===Ly(e)||(e={}),e=mC(e),z="ALLOWED_TAGS"in e?cC({},e.ALLOWED_TAGS):j,H="ALLOWED_ATTR"in e?cC({},e.ALLOWED_ATTR):$,me="ADD_URI_SAFE_ATTR"in e?cC(mC(ue),e.ADD_URI_SAFE_ATTR):ue,de="ADD_DATA_URI_TAGS"in e?cC(mC(ce),e.ADD_DATA_URI_TAGS):ce,ie="FORBID_CONTENTS"in e?cC({},e.FORBID_CONTENTS):le,q="FORBID_TAGS"in e?cC({},e.FORBID_TAGS):{},W="FORBID_ATTR"in e?cC({},e.FORBID_ATTR):{},ae="USE_PROFILES"in e&&e.USE_PROFILES,K=!1!==e.ALLOW_ARIA_ATTR,G=!1!==e.ALLOW_DATA_ATTR,Y=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=e.SAFE_FOR_TEMPLATES||!1,Q=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,oe=!1!==e.SANITIZE_DOM,re=!1!==e.KEEP_CONTENT,se=e.IN_PLACE||!1,U=e.ALLOWED_URI_REGEXP||U,he=e.NAMESPACE||pe,e.CUSTOM_ELEMENT_HANDLING&&xe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(V.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&xe(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(V.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(V.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),O=O=-1===ve.indexOf(e.PARSER_MEDIA_TYPE)?ye:e.PARSER_MEDIA_TYPE,T="application/xhtml+xml"===O?function(e){return e}:nC,X&&(G=!1),te&&(ee=!0),ae&&(z=cC({},Uy(yC)),H=[],!0===ae.html&&(cC(z,fC),cC(H,CC)),!0===ae.svg&&(cC(z,gC),cC(H,wC),cC(H,kC)),!0===ae.svgFilters&&(cC(z,pC),cC(H,wC),cC(H,kC)),!0===ae.mathMl&&(cC(z,bC),cC(H,xC),cC(H,kC))),e.ADD_TAGS&&(z===j&&(z=mC(z)),cC(z,e.ADD_TAGS)),e.ADD_ATTR&&(H===$&&(H=mC(H)),cC(H,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&cC(me,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(ie===le&&(ie=mC(ie)),cC(ie,e.FORBID_CONTENTS)),re&&(z["#text"]=!0),Q&&cC(z,["html","head","body"]),z.table&&(cC(z,["tbody"]),delete q.tbody),Wy&&Wy(e),Ce=e)},Ee=cC({},["mi","mo","mn","ms","mtext"]),Se=cC({},["foreignobject","desc","title","annotation-xml"]),_e=cC({},["title","style","font","a","script"]),Ne=cC({},gC);cC(Ne,pC),cC(Ne,hC);var Re=cC({},bC);cC(Re,vC);var Ae=function(e){var t=y(e);t&&t.tagName||(t={namespaceURI:pe,tagName:"template"});var n=nC(e.tagName),o=nC(t.tagName);return e.namespaceURI===ge?t.namespaceURI===pe?"svg"===n:t.namespaceURI===fe?"svg"===n&&("annotation-xml"===o||Ee[o]):Boolean(Ne[n]):e.namespaceURI===fe?t.namespaceURI===pe?"math"===n:t.namespaceURI===ge?"math"===n&&Se[o]:Boolean(Re[n]):e.namespaceURI===pe&&(!(t.namespaceURI===ge&&!Se[o])&&(!(t.namespaceURI===fe&&!Ee[o])&&(!Re[n]&&(_e[n]||!Ne[n]))))},De=function(e){tC(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=x}catch(t){e.remove()}}},Oe=function(e,t){try{tC(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){tC(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!H[e])if(ee||te)try{De(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Te=function(e){var t,n;if(Z)e="<remove></remove>"+e;else{var o=oC(e,/^[\r\n\t ]+/);n=o&&o[0]}"application/xhtml+xml"===O&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var s=w?w.createHTML(e):e;if(he===pe)try{t=(new f).parseFromString(s,O)}catch(e){}if(!t||!t.documentElement){t=E.createDocument(he,"template",null);try{t.documentElement.innerHTML=be?"":s}catch(e){}}var a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),he===pe?N.call(t,Q?"html":"body")[0]:Q?t.documentElement:a},Be=function(e){return S.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT,null,!1)},Pe=function(e){return e instanceof u&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof m)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore)},Le=function(e){return"object"===Ly(i)?e instanceof i:e&&"object"===Ly(e)&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Me=function(e,t,o){D[e]&&Zy(D[e],(function(e){e.call(n,t,o,Ce)}))},Ie=function(e){var t;if(Me("beforeSanitizeElements",e,null),Pe(e))return De(e),!0;if(iC(/[\u0080-\uFFFF]/,e.nodeName))return De(e),!0;var o=T(e.nodeName);if(Me("uponSanitizeElement",e,{tagName:o,allowedTags:z}),e.hasChildNodes()&&!Le(e.firstElementChild)&&(!Le(e.content)||!Le(e.content.firstElementChild))&&iC(/<[/\w]/g,e.innerHTML)&&iC(/<[/\w]/g,e.textContent))return De(e),!0;if("select"===o&&iC(/<template/i,e.innerHTML))return De(e),!0;if(!z[o]||q[o]){if(!q[o]&&Ue(o)){if(V.tagNameCheck instanceof RegExp&&iC(V.tagNameCheck,o))return!1;if(V.tagNameCheck instanceof Function&&V.tagNameCheck(o))return!1}if(re&&!ie[o]){var r=y(e)||e.parentNode,s=v(e)||e.childNodes;if(s&&r)for(var a=s.length-1;a>=0;--a)r.insertBefore(h(s[a],!0),b(e))}return De(e),!0}return e instanceof l&&!Ae(e)?(De(e),!0):"noscript"!==o&&"noembed"!==o||!iC(/<\/no(script|embed)/i,e.innerHTML)?(X&&3===e.nodeType&&(t=e.textContent,t=rC(t,B," "),t=rC(t,P," "),e.textContent!==t&&(tC(n.removed,{element:e.cloneNode()}),e.textContent=t)),Me("afterSanitizeElements",e,null),!1):(De(e),!0)},Fe=function(e,t,n){if(oe&&("id"===t||"name"===t)&&(n in r||n in we))return!1;if(G&&!W[t]&&iC(L,t));else if(K&&iC(M,t));else if(!H[t]||W[t]){if(!(Ue(e)&&(V.tagNameCheck instanceof RegExp&&iC(V.tagNameCheck,e)||V.tagNameCheck instanceof Function&&V.tagNameCheck(e))&&(V.attributeNameCheck instanceof RegExp&&iC(V.attributeNameCheck,t)||V.attributeNameCheck instanceof Function&&V.attributeNameCheck(t))||"is"===t&&V.allowCustomizedBuiltInElements&&(V.tagNameCheck instanceof RegExp&&iC(V.tagNameCheck,n)||V.tagNameCheck instanceof Function&&V.tagNameCheck(n))))return!1}else if(me[t]);else if(iC(U,rC(n,F,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==sC(n,"data:")||!de[e]){if(Y&&!iC(I,rC(n,F,"")));else if(n)return!1}else;return!0},Ue=function(e){return e.indexOf("-")>0},ze=function(e){var t,n,o,r;Me("beforeSanitizeAttributes",e,null);var s=e.attributes;if(s){var a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H};for(r=s.length;r--;){var i=t=s[r],l=i.name,d=i.namespaceURI;n="value"===l?t.value:aC(t.value),o=T(l);var c=n;if(a.attrName=o,a.attrValue=n,a.keepAttr=!0,a.forceKeepAttr=void 0,Me("uponSanitizeAttribute",e,a),n=a.attrValue,!a.forceKeepAttr)if(a.keepAttr)if(iC(/\/>/i,n))Oe(l,e);else{X&&(n=rC(n,B," "),n=rC(n,P," "));var m=T(e.nodeName);if(Fe(m,o,n)){if(n!==c)try{d?e.setAttributeNS(d,l,n):e.setAttribute(l,n)}catch(t){Oe(l,e)}}else Oe(l,e)}else Oe(l,e)}Me("afterSanitizeAttributes",e,null)}},je=function e(t){var n,o=Be(t);for(Me("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)Me("uponSanitizeShadowNode",n,null),Ie(n)||(n.content instanceof s&&e(n.content),ze(n));Me("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e,r){var a,l,d,c,m;if((be=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Le(e)){if("function"!=typeof e.toString)throw lC("toString is not a function");if("string"!=typeof(e=e.toString()))throw lC("dirty is not a string, aborting")}if(!n.isSupported){if("object"===Ly(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(Le(e))return t.toStaticHTML(e.outerHTML)}return e}if(J||ke(r),n.removed=[],"string"==typeof e&&(se=!1),se){if(e.nodeName){var u=T(e.nodeName);if(!z[u]||q[u])throw lC("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof i)1===(l=(a=Te("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===l.nodeName||"HTML"===l.nodeName?a=l:a.appendChild(l);else{if(!ee&&!X&&!Q&&-1===e.indexOf("<"))return w&&ne?w.createHTML(e):e;if(!(a=Te(e)))return ee?null:ne?x:""}a&&Z&&De(a.firstChild);for(var f=Be(se?e:a);d=f.nextNode();)3===d.nodeType&&d===c||Ie(d)||(d.content instanceof s&&je(d.content),ze(d),c=d);if(c=null,se)return e;if(ee){if(te)for(m=_.call(a.ownerDocument);a.firstChild;)m.appendChild(a.firstChild);else m=a;return H.shadowroot&&(m=R.call(o,m,!0)),m}var g=Q?a.outerHTML:a.innerHTML;return Q&&z["!doctype"]&&a.ownerDocument&&a.ownerDocument.doctype&&a.ownerDocument.doctype.name&&iC(OC,a.ownerDocument.doctype.name)&&(g="<!DOCTYPE "+a.ownerDocument.doctype.name+">\n"+g),X&&(g=rC(g,B," "),g=rC(g,P," ")),w&&ne?w.createHTML(g):g},n.setConfig=function(e){ke(e),J=!0},n.clearConfig=function(){Ce=null,J=!1},n.isValidAttribute=function(e,t,n){Ce||ke({});var o=T(e),r=T(t);return Fe(o,r,n)},n.addHook=function(e,t){"function"==typeof t&&(D[e]=D[e]||[],tC(D[e],t))},n.removeHook=function(e){if(D[e])return eC(D[e])},n.removeHooks=function(e){D[e]&&(D[e]=[])},n.removeAllHooks=function(){D={}},n}();const LC=Pt.each,MC=Pt.trim,IC=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],FC={ftp:21,http:80,https:443,mailto:25},UC=["img","video"],zC=(e,t,n)=>{const o=(e=>{try{return decodeURIComponent(e)}catch(t){return unescape(e)}})(t).replace(/\s/g,"");return!e.allow_script_urls&&(!!/((java|vb)script|mhtml):/i.test(o)||!e.allow_html_data_urls&&(/^data:image\//i.test(o)?((e,t)=>x(e)?!e:!x(t)||!V(UC,t))(e.allow_svg_data_urls,n)&&/^data:image\/svg\+xml/i.test(o):/^data:/i.test(o)))};class jC{constructor(e,t={}){this.path="",this.directory="",e=MC(e),this.settings=t;const n=t.base_uri,o=this;if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))return void(o.source=e);const r=0===e.indexOf("//");if(0!==e.indexOf("/")||r||(e=(n&&n.protocol||"http")+"://mce_host"+e),!/^[\w\-]*:?\/\//.test(e)){const t=n?n.path:new jC(document.location.href).directory;if(""===(null==n?void 0:n.protocol))e="//mce_host"+o.toAbsPath(t,e);else{const r=/([^#?]*)([#?]?.*)/.exec(e);r&&(e=(n&&n.protocol||"http")+"://mce_host"+o.toAbsPath(t,r[1])+r[2])}}e=e.replace(/@@/g,"(mce_at)");const s=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?(\[[a-zA-Z0-9:.%]+\]|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);s&&LC(IC,((e,t)=>{let n=s[t];n&&(n=n.replace(/\(mce_at\)/g,"@@")),o[e]=n})),n&&(o.protocol||(o.protocol=n.protocol),o.userInfo||(o.userInfo=n.userInfo),o.port||"mce_host"!==o.host||(o.port=n.port),o.host&&"mce_host"!==o.host||(o.host=n.host),o.source=""),r&&(o.protocol="")}static parseDataUri(e){let t;const n=decodeURIComponent(e).split(","),o=/data:([^;]+)/.exec(n[0]);return o&&(t=o[1]),{type:t,data:n[1]}}static isDomSafe(e,t,n={}){if(n.allow_script_urls)return!0;{const o=ea.decode(e).replace(/[\s\u0000-\u001F]+/g,"");return!zC(n,o,t)}}static getDocumentBaseUrl(e){var t;let n;return n=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?null!==(t=e.href)&&void 0!==t?t:"":e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(n)&&(n=n.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(n)||(n+="/")),n}setPath(e){const t=/^(.*?)\/?(\w+)?$/.exec(e);t&&(this.path=t[0],this.directory=t[1],this.file=t[2]),this.source="",this.getURI()}toRelative(e){if("./"===e)return e;const t=new jC(e,{base_uri:this});if("mce_host"!==t.host&&this.host!==t.host&&t.host||this.port!==t.port||this.protocol!==t.protocol&&""!==t.protocol)return t.getURI();const n=this.getURI(),o=t.getURI();if(n===o||"/"===n.charAt(n.length-1)&&n.substr(0,n.length-1)===o)return n;let r=this.toRelPath(this.path,t.path);return t.query&&(r+="?"+t.query),t.anchor&&(r+="#"+t.anchor),r}toAbsolute(e,t){const n=new jC(e,{base_uri:this});return n.getURI(t&&this.isSameOrigin(n))}isSameOrigin(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;const t=this.protocol?FC[this.protocol]:null;if(t&&(this.port||t)==(e.port||t))return!0}return!1}toRelPath(e,t){let n,o,r=0,s="";const a=e.substring(0,e.lastIndexOf("/")).split("/"),i=t.split("/");if(a.length>=i.length)for(n=0,o=a.length;n<o;n++)if(n>=i.length||a[n]!==i[n]){r=n+1;break}if(a.length<i.length)for(n=0,o=i.length;n<o;n++)if(n>=a.length||a[n]!==i[n]){r=n+1;break}if(1===r)return t;for(n=0,o=a.length-(r-1);n<o;n++)s+="../";for(n=r-1,o=i.length;n<o;n++)s+=n!==r-1?"/"+i[n]:i[n];return s}toAbsPath(e,t){let n=0;const o=/\/$/.test(t)?"/":"",r=e.split("/"),s=t.split("/"),a=[];LC(r,(e=>{e&&a.push(e)}));const i=[];for(let e=s.length-1;e>=0;e--)0!==s[e].length&&"."!==s[e]&&(".."!==s[e]?n>0?n--:i.push(s[e]):n++);const l=a.length-n;let d;return d=l<=0?se(i).join("/"):a.slice(0,l).join("/")+"/"+se(i).join("/"),0!==d.indexOf("/")&&(d="/"+d),o&&d.lastIndexOf("/")!==d.length-1&&(d+=o),d}getURI(e=!1){let t;return this.source&&!e||(t="",e||(this.protocol?t+=this.protocol+"://":t+="//",this.userInfo&&(t+=this.userInfo+"@"),this.host&&(t+=this.host),this.port&&(t+=":"+this.port)),this.path&&(t+=this.path),this.query&&(t+="?"+this.query),this.anchor&&(t+="#"+this.anchor),this.source=t),this.source}}const HC=Pt.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),$C="data-mce-type";let VC=0;const qC=(e,t,n,o)=>{var r,s,a,i;const l=t.validate,d=n.getSpecialElements();8===e.nodeType&&!t.allow_conditional_comments&&/^\[if/i.test(null!==(r=e.nodeValue)&&void 0!==r?r:"")&&(e.nodeValue=" "+e.nodeValue);const c=null!==(s=null==o?void 0:o.tagName)&&void 0!==s?s:e.nodeName.toLowerCase();if(1!==e.nodeType||"body"===c)return;const m=bn.fromDom(e),u=nn(m,$C),f=en(m,"data-mce-bogus");if(!u&&g(f))return void("all"===f?yo(m):Co(m));const p=n.getElementRule(c);if(!l||p){if(x(o)&&(o.allowedTags[c]=!0),l&&p&&!u){if(K(null!==(a=p.attributesForced)&&void 0!==a?a:[],(e=>{Jt(m,e.name,"{$uid}"===e.value?"mce_"+VC++:e.value)})),K(null!==(i=p.attributesDefault)&&void 0!==i?i:[],(e=>{nn(m,e.name)||Jt(m,e.name,"{$uid}"===e.value?"mce_"+VC++:e.value)})),p.attributesRequired&&!q(p.attributesRequired,(e=>nn(m,e))))return void Co(m);if(p.removeEmptyAttrs&&(e=>{const t=e.dom.attributes;return null==t||0===t.length})(m))return void Co(m);p.outputName&&p.outputName!==c&&ci(m,p.outputName)}}else Se(d,c)?yo(m):Co(m)},WC=(e,t,n,o,r)=>!(o in HC&&zC(e,r,n))&&(!e.validate||t.isValid(n,o)||Ve(o,"data-")||Ve(o,"aria-")),KC=(e,t)=>e.hasAttribute($C)&&("id"===t||"class"===t||"style"===t),GC=(e,t)=>e in t.getBoolAttrs(),YC=(e,t,n)=>{const{attributes:o}=e;for(let r=o.length-1;r>=0;r--){const s=o[r],a=s.name,i=s.value;WC(t,n,e.tagName.toLowerCase(),a,i)||KC(e,a)?GC(a,n)&&e.setAttribute(a,a):e.removeAttribute(a)}},XC=(e,t)=>{const n=PC();return n.addHook("uponSanitizeElement",((n,o)=>{qC(n,e,t,o)})),n.addHook("uponSanitizeAttribute",((n,o)=>{const r=n.tagName.toLowerCase(),{attrName:s,attrValue:a}=o;o.keepAttr=WC(e,t,r,s,a),o.keepAttr?(o.allowedAttributes[s]=!0,GC(s,t)&&(o.attrValue=s),e.allow_svg_data_urls&&Ve(a,"data:image/svg+xml")&&(o.forceKeepAttr=!0)):KC(n,s)&&(o.forceKeepAttr=!0)})),n},QC=Pt.makeMap,JC=Pt.extend,ZC=(e,t,n)=>{const o=e.name,r=o in n&&"title"!==o&&"textarea"!==o,s=t.childNodes;for(let t=0,o=s.length;t<o;t++){const o=s[t],a=new up(o.nodeName.toLowerCase(),o.nodeType);if(jo(o)){const e=o.attributes;for(let t=0,n=e.length;t<n;t++){const n=e[t];a.attr(n.name,n.value)}}else Xo(o)?(a.value=o.data,r&&(a.raw=!0)):(Zo(o)||Qo(o)||Jo(o))&&(a.value=o.data);ZC(a,o,n),e.append(a)}},ew=(e,t,n,o)=>{const r=n.validate,s=t.getNonEmptyElements(),a=t.getWhitespaceElements(),i=JC(QC("script,style,head,html,body,title,meta,param"),t.getBlockElements()),l=ma(t),d=/[ \t\r\n]+/g,c=/^[ \t\r\n]+/,m=/[ \t\r\n]+$/,u=e=>{let t=e.parent;for(;x(t);){if(t.name in a)return!0;t=t.parent}return!1},f=e=>e.name in i&&!Ds(t,e),g=(t,n)=>{const r=n?t.prev:t.next;return!x(r)&&!w(t.parent)&&(f(t.parent)&&(t.parent!==e||!0===o.isRootContent))};return[e=>{var t;if(3===e.type&&!u(e)){let n=null!==(t=e.value)&&void 0!==t?t:"";n=n.replace(d," "),(((e,t)=>x(e)&&(t(e)||"br"===e.name))(e.prev,f)||g(e,!0))&&(n=n.replace(c,"")),0===n.length?e.remove():e.value=n}},e=>{var n;if(1===e.type){const n=t.getElementRule(e.name);if(r&&n){const r=Lb(t,s,a,e);n.paddInEmptyBlock&&r&&(e=>{let n=e;for(;x(n);){if(n.name in l)return Lb(t,s,a,n);n=n.parent}return!1})(e)?Bb(o,f,e):n.removeEmpty&&r?f(e)?e.remove():e.unwrap():n.paddEmpty&&(r||(e=>{var t;return Pb(e,"#text")&&(null===(t=null==e?void 0:e.firstChild)||void 0===t?void 0:t.value)===mr})(e))&&Bb(o,f,e)}}else if(3===e.type&&!u(e)){let t=null!==(n=e.value)&&void 0!==n?n:"";(e.next&&f(e.next)||g(e,!1))&&(t=t.replace(m,"")),0===t.length?e.remove():e.value=t}}]},tw=(e={},t=fa())=>{const n=ky(),o=ky(),r={validate:!0,root_name:"body",sanitize:!0,...e},s=new DOMParser,a=((e,t)=>{if(e.sanitize){const n=XC(e,t);return(t,o)=>{n.sanitize(t,((e,t)=>{const n={IN_PLACE:!0,ALLOW_UNKNOWN_PROTOCOLS:!0,ALLOWED_TAGS:["#comment","#cdata-section","body"],ALLOWED_ATTR:[]};return n.PARSER_MEDIA_TYPE=t,e.allow_script_urls?n.ALLOWED_URI_REGEXP=/.*/:e.allow_html_data_urls&&(n.ALLOWED_URI_REGEXP=/^(?!(\w+script|mhtml):)/i),n})(e,o)),n.removed=[]}}return(n,o)=>{const r=document.createNodeIterator(n,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT|NodeFilter.SHOW_TEXT);let s;for(;s=r.nextNode();)qC(s,e,t),jo(s)&&YC(s,e,t)}})(r,t),i=n.addFilter,l=n.getFilters,d=n.removeFilter,c=o.addFilter,m=o.getFilters,u=o.removeFilter,f=(e,n)=>{const o=g(n.attr($C)),r=1===n.type&&!Se(e,n.name)&&!((e,t)=>1===t.type&&_s(e,t.name)&&g(t.attr(bs)))(t,n);return 3===n.type||r&&!o},p={schema:t,addAttributeFilter:c,getAttributeFilters:m,removeAttributeFilter:u,addNodeFilter:i,getNodeFilters:l,removeNodeFilter:d,parse:(e,n={})=>{var o;const i=r.validate,d=null!==(o=n.context)&&void 0!==o?o:r.root_name,c=((e,n,o="html")=>{const r="xhtml"===o?"application/xhtml+xml":"text/html",i=Se(t.getSpecialElements(),n.toLowerCase()),l=i?`<${n}>${e}</${n}>`:e,d="xhtml"===o?`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>${l}</body></html>`:`<body>${l}</body>`,c=s.parseFromString(d,r).body;return a(c,r),i?c.firstChild:c})(e,d,n.format);ks(t,c);const u=new up(d,11);ZC(u,c,t.getSpecialElements()),c.innerHTML="";const[g,p]=ew(u,t,r,n),h=[],b=i?e=>((e,n)=>{Ub(t,e)&&n.push(e)})(e,h):_,v={nodes:{},attributes:{}},y=e=>Db(l(),m(),e,v);if(((e,t,n)=>{const o=[];for(let n=e,r=n;n;r=n,n=n.walk()){const s=n;K(t,(e=>e(s))),w(s.parent)&&s!==e?n=r:o.push(s)}for(let e=o.length-1;e>=0;e--){const t=o[e];K(n,(e=>e(t)))}})(u,[g,y],[p,b]),h.reverse(),i&&h.length>0)if(n.context){const{pass:e,fail:o}=Y(h,(e=>e.parent===u));Fb(o,t,u,y),n.invalid=e.length>0}else Fb(h,t,u,y);const C=((e,t)=>{var n;const o=null!==(n=t.forced_root_block)&&void 0!==n?n:e.forced_root_block;return!1===o?"":!0===o?"p":o})(r,n);return C&&("body"===u.name||n.isRootContent)&&((e,n)=>{const o=JC(QC("script,style,head,html,body,title,meta,param"),t.getBlockElements()),s=/^[ \t\r\n]+/,a=/[ \t\r\n]+$/;let i=e.firstChild,l=null;const d=e=>{var t,n;e&&(i=e.firstChild,i&&3===i.type&&(i.value=null===(t=i.value)||void 0===t?void 0:t.replace(s,"")),i=e.lastChild,i&&3===i.type&&(i.value=null===(n=i.value)||void 0===n?void 0:n.replace(a,"")))};if(t.isValidChild(e.name,n.toLowerCase())){for(;i;){const t=i.next;f(o,i)?(l||(l=new up(n,1),l.attr(r.forced_root_block_attrs),e.insert(l,i)),l.append(i)):(d(l),l=null),i=t}d(l)}})(u,C),n.invalid||Ob(v,n),u}};return((e,t)=>{const n=e.schema;t.remove_trailing_brs&&e.addNodeFilter("br",((e,t,o)=>{const r=Pt.extend({},n.getBlockElements()),s=n.getNonEmptyElements(),a=n.getWhitespaceElements();r.body=1;const i=e=>e.name in r&&Ds(n,e);for(let t=0,l=e.length;t<l;t++){let l=e[t],d=l.parent;if(d&&r[d.name]&&l===d.lastChild){let e=l.prev;for(;e;){const t=e.name;if("span"!==t||"bookmark"!==e.attr("data-mce-type")){"br"===t&&(l=null);break}e=e.prev}if(l&&(l.remove(),Lb(n,s,a,d))){const e=n.getElementRule(d.name);e&&(e.removeEmpty?d.remove():e.paddEmpty&&Bb(o,i,d))}}else{let e=l;for(;d&&d.firstChild===e&&d.lastChild===e&&(e=d,!r[d.name]);)d=d.parent;if(e===d){const e=new up("#text",3);e.value=mr,l.replace(e)}}}})),e.addAttributeFilter("href",(e=>{let n=e.length;const o=e=>{const t=e?Pt.trim(e):"";return/\b(noopener)\b/g.test(t)?t:(e=>e.split(" ").filter((e=>e.length>0)).concat(["noopener"]).sort().join(" "))(t)};if(!t.allow_unsafe_link_target)for(;n--;){const t=e[n];"a"===t.name&&"_blank"===t.attr("target")&&t.attr("rel",o(t.attr("rel")))}})),t.allow_html_in_named_anchor||e.addAttributeFilter("id,name",(e=>{let t,n,o,r,s=e.length;for(;s--;)if(r=e[s],"a"===r.name&&r.firstChild&&!r.attr("href"))for(o=r.parent,t=r.lastChild;t&&o;)n=t.prev,o.insert(t,r),t=n})),t.fix_list_elements&&e.addNodeFilter("ul,ol",(e=>{let t,n,o=e.length;for(;o--;)if(t=e[o],n=t.parent,n&&("ul"===n.name||"ol"===n.name))if(t.prev&&"li"===t.prev.name)t.prev.append(t);else{const e=new up("li",1);e.attr("style","list-style-type: none"),t.wrap(e)}}));const o=n.getValidClasses();t.validate&&o&&e.addAttributeFilter("class",(e=>{var t;let n=e.length;for(;n--;){const r=e[n],s=null!==(t=r.attr("class"))&&void 0!==t?t:"",a=Pt.explode(s," ");let i="";for(let e=0;e<a.length;e++){const t=a[e];let n=!1,s=o["*"];s&&s[t]&&(n=!0),s=o[r.name],!n&&s&&s[t]&&(n=!0),n&&(i&&(i+=" "),i+=t)}i.length||(i=null),r.attr("class",i)}})),Py(e,t)})(p,r),((e,t,n)=>{t.inline_styles&&Sy(e,t,n)})(p,r,t),p},nw=(e,t,n)=>{const o=(e=>tv(e)?kp({validate:!1}).serialize(e):e)(e),r=t(o);if(r.isDefaultPrevented())return r;if(tv(e)){if(r.content!==o){const t=tw({validate:!1,forced_root_block:!1,sanitize:n}).parse(r.content,{context:e.name});return{...r,content:t}}return{...r,content:e}}return r},ow=(e,t)=>{if(t.no_events)return fl.value(t);{const n=((e,t)=>e.dispatch("BeforeGetContent",t))(e,t);return n.isDefaultPrevented()?fl.error(uf(e,{content:"",...n}).content):fl.value(n)}},rw=(e,t,n)=>{if(n.no_events)return t;{const o=nw(t,(t=>uf(e,{...n,content:t})),dc(e));return o.content}},sw=(e,t)=>{if(t.no_events)return fl.value(t);{const n=nw(t.content,(n=>((e,t)=>e.dispatch("BeforeSetContent",t))(e,{...t,content:n})),dc(e));return n.isDefaultPrevented()?(mf(e,n),fl.error(void 0)):fl.value(n)}},aw=(e,t,n)=>{n.no_events||mf(e,{...n,content:t})},iw=(e,t,n)=>({element:e,width:t,rows:n}),lw=(e,t)=>({element:e,cells:t}),dw=(e,t)=>({x:e,y:t}),cw=(e,t)=>tn(e,t).bind(Je).getOr(1),mw=(e,t,n)=>{const o=e.rows;return!!(o[n]?o[n].cells:[])[t]},uw=e=>J(e,((e,t)=>t.cells.length>e?t.cells.length:e),0),fw=(e,t)=>{const n=e.rows;for(let e=0;e<n.length;e++){const o=n[e].cells;for(let n=0;n<o.length;n++)if(wn(o[n],t))return U.some(dw(n,e))}return U.none()},gw=(e,t,n,o,r)=>{const s=[],a=e.rows;for(let e=n;e<=r;e++){const n=a[e].cells,r=t<o?n.slice(t,o+1):n.slice(o,t+1);s.push(lw(a[e].element,r))}return s},pw=e=>{const t=iw(li(e),0,[]);return K(Mo(e,"tr"),((e,n)=>{K(Mo(e,"td,th"),((o,r)=>{((e,t,n,o,r)=>{const s=cw(r,"rowspan"),a=cw(r,"colspan"),i=e.rows;for(let e=n;e<n+s;e++){i[e]||(i[e]=lw(di(o),[]));for(let o=t;o<t+a;o++)i[e].cells[o]=e===n&&o===t?r:li(r)}})(t,((e,t,n)=>{for(;mw(e,t,n);)t++;return t})(t,r,n),n,e,o)}))})),iw(t.element,uw(t.rows),t.rows)},hw=e=>((e,t)=>{const n=li(e.element),o=bn.fromTag("tbody");return bo(o,t),po(n,o),n})(e,(e=>W(e.rows,(e=>{const t=W(e.cells,(e=>{const t=di(e);return on(t,"colspan"),on(t,"rowspan"),t})),n=li(e.element);return bo(n,t),n})))(e)),bw=(e,t,n)=>fw(e,t).bind((t=>fw(e,n).map((n=>((e,t,n)=>{const o=t.x,r=t.y,s=n.x,a=n.y,i=r<a?gw(e,o,r,s,a):gw(e,o,a,s,r);return iw(e.element,uw(i),i)})(e,t,n))))),vw=(e,t)=>ee(e,(e=>"li"===$t(e)&&lu(e,t))).fold(A([]),(t=>(e=>ee(e,(e=>"ul"===$t(e)||"ol"===$t(e))))(e).map((e=>{const t=bn.fromTag($t(e)),n=we(co(e),((e,t)=>Ve(t,"list-style")));return so(t,n),[bn.fromTag("li"),t]})).getOr([]))),yw=(e,t)=>{const n=bn.fromDom(t.commonAncestorContainer),o=qp(n,e),r=X(o,Rr),s=vw(o,t),a=r.concat(s.length?s:(e=>kr(e)?_n(e).filter(xr).fold(A([]),(t=>[e,t])):xr(e)?[e]:[])(n));return W(a,li)},Cw=()=>Mf([]),ww=(e,t)=>((e,t)=>{const n=J(t,((e,t)=>(po(t,e),t)),e);return t.length>0?Mf([n]):n})(bn.fromDom(t.cloneContents()),yw(e,t)),xw=(e,t)=>((e,t)=>Qn(t,"table",T(wn,e)))(e,t[0]).bind((e=>{const n=t[0],o=t[t.length-1],r=pw(e);return bw(r,n,o).map((e=>Mf([hw(e)])))})).getOrThunk(Cw),kw=(e,t)=>{const n=ou(t,e);return n.length>0?xw(e,n):((e,t)=>t.length>0&&t[0].collapsed?Cw():ww(e,t[0]))(e,t)},Ew=(e,t)=>t>=0&&t<e.length&&qm(e.charAt(t)),Sw=e=>Lr(e.innerText),_w=(e,t)=>{if("text"===t.format)return(e=>U.from(e.selection.getRng()).map((t=>{var n;const o=U.from(e.dom.getParent(t.commonAncestorContainer,e.dom.isBlock)),r=e.getBody(),s=(e=>e.map((e=>e.nodeName)).getOr("div").toLowerCase())(o),a=bn.fromDom(t.cloneContents());bp(a),vp(a);const i=e.dom.add(r,s,{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},a.dom),l=Sw(i),d=Lr(null!==(n=i.textContent)&&void 0!==n?n:"");if(e.dom.remove(i),Ew(d,0)||Ew(d,d.length-1)){const e=o.getOr(r),t=Sw(e),n=t.indexOf(l);return-1===n?l:(Ew(t,n-1)?" ":"")+l+(Ew(t,n+l.length)?" ":"")}return l})).getOr(""))(e);{const n=((e,t)=>{const n=e.selection.getRng(),o=e.dom.create("body"),r=e.selection.getSel(),s=Zg(e,tu(r)),a=t.contextual?kw(bn.fromDom(e.getBody()),s).dom:n.cloneContents();return a&&o.appendChild(a),e.selection.serializer.serialize(o,t)})(e,t);return"tree"===t.format?n:e.selection.isCollapsed()?"":n}},Nw=e=>jo(e)?e.outerHTML:Xo(e)?ea.encodeRaw(e.data,!1):Zo(e)?"\x3c!--"+e.data+"--\x3e":"",Rw=(e,t,n)=>{const o=(e=>{let t;const n=document.createElement("div"),o=document.createDocumentFragment();for(e&&(n.innerHTML=e);t=n.firstChild;)o.appendChild(t);return o})(t);if(e.hasChildNodes()&&n<e.childNodes.length){const t=e.childNodes[n];e.insertBefore(o,t)}else e.appendChild(o)},Aw=(e,t)=>(((e,t)=>{let n=0;K(e,(e=>{0===e[0]?n++:1===e[0]?(Rw(t,e[1],n),n++):2===e[0]&&((e,t)=>{if(e.hasChildNodes()&&t<e.childNodes.length){const n=e.childNodes[t];e.removeChild(n)}})(t,n)}))})(((e,t)=>{const n=e.length+t.length+2,o=new Array(n),r=new Array(n),s=(n,o,r,a,l)=>{const d=i(n,o,r,a);if(null===d||d.start===o&&d.diag===o-a||d.end===n&&d.diag===n-r){let s=n,i=r;for(;s<o||i<a;)s<o&&i<a&&e[s]===t[i]?(l.push([0,e[s]]),++s,++i):o-n>a-r?(l.push([2,e[s]]),++s):(l.push([1,t[i]]),++i)}else{s(n,d.start,r,d.start-d.diag,l);for(let t=d.start;t<d.end;++t)l.push([0,e[t]]);s(d.end,o,d.end-d.diag,a,l)}},a=(n,o,r,s)=>{let a=n;for(;a-o<s&&a<r&&e[a]===t[a-o];)++a;return((e,t,n)=>({start:e,end:t,diag:n}))(n,a,o)},i=(n,s,i,l)=>{const d=s-n,c=l-i;if(0===d||0===c)return null;const m=d-c,u=c+d,f=(u%2==0?u:u+1)/2;let g,p,h,b,v;for(o[1+f]=n,r[1+f]=s+1,g=0;g<=f;++g){for(p=-g;p<=g;p+=2){for(h=p+f,p===-g||p!==g&&o[h-1]<o[h+1]?o[h]=o[h+1]:o[h]=o[h-1]+1,b=o[h],v=b-n+i-p;b<s&&v<l&&e[b]===t[v];)o[h]=++b,++v;if(m%2!=0&&m-g<=p&&p<=m+g&&r[h-m]<=o[h])return a(r[h-m],p+n-i,s,l)}for(p=m-g;p<=m+g;p+=2){for(h=p+f-m,p===m-g||p!==m+g&&r[h+1]<=r[h-1]?r[h]=r[h+1]-1:r[h]=r[h-1],b=r[h]-1,v=b-n+i-p;b>=n&&v>=i&&e[b]===t[v];)r[h]=b--,v--;if(m%2==0&&-g<=p&&p<=g&&r[h]<=o[h+m])return a(r[h],p+n-i,s,l)}}return null},l=[];return s(0,e.length,0,t.length,l),l})(W(ue(t.childNodes),Nw),e),t),t),Dw=Me((()=>document.implementation.createHTMLDocument("undo"))),Ow=e=>{const t=(n=e.getBody(),X(W(ue(n.childNodes),Nw),(e=>e.length>0)));var n;const o=oe(t,(t=>{const n=pp(e.serializer,t);return n.length>0?[n]:[]})),r=o.join("");return(e=>-1!==e.indexOf("</iframe>"))(r)?(e=>({type:"fragmented",fragments:e,content:"",bookmark:null,beforeBookmark:null}))(o):(e=>({type:"complete",fragments:null,content:e,bookmark:null,beforeBookmark:null}))(r)},Tw=(e,t,n)=>{const o=n?t.beforeBookmark:t.bookmark;"fragmented"===t.type?Aw(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw",no_selection:!x(o)||!Om(o)||!o.isFakeCaret}),o&&(e.selection.moveToBookmark(o),e.selection.scrollIntoView())},Bw=e=>"fragmented"===e.type?e.fragments.join(""):e.content,Pw=e=>{const t=bn.fromTag("body",Dw());return ko(t,Bw(e)),K(Mo(t,"*[data-mce-bogus]"),Co),xo(t)},Lw=(e,t)=>!(!e||!t)&&(!!((e,t)=>Bw(e)===Bw(t))(e,t)||((e,t)=>Pw(e)===Pw(t))(e,t)),Mw=e=>0===e.get(),Iw=(e,t,n)=>{Mw(n)&&(e.typing=t)},Fw=(e,t)=>{e.typing&&(Iw(e,!1,t),e.add())},Uw=e=>({init:{bindEvents:_},undoManager:{beforeChange:(t,n)=>((e,t,n)=>{Mw(t)&&n.set(cl(e.selection))})(e,t,n),add:(t,n,o,r,s,a)=>((e,t,n,o,r,s,a)=>{const i=Ow(e),l=Pt.extend(s||{},i);if(!Mw(o)||e.removed)return null;const d=t.data[n.get()];if(e.dispatch("BeforeAddUndo",{level:l,lastLevel:d,originalEvent:a}).isDefaultPrevented())return null;if(d&&Lw(d,l))return null;t.data[n.get()]&&r.get().each((e=>{t.data[n.get()].beforeBookmark=e}));const c=Rd(e);if(c&&t.data.length>c){for(let e=0;e<t.data.length-1;e++)t.data[e]=t.data[e+1];t.data.length--,n.set(t.data.length)}l.bookmark=cl(e.selection),n.get()<t.data.length-1&&(t.data.length=n.get()+1),t.data.push(l),n.set(t.data.length-1);const m={level:l,lastLevel:d,originalEvent:a};return n.get()>0?(e.setDirty(!0),e.dispatch("AddUndo",m),e.dispatch("change",m)):e.dispatch("AddUndo",m),l})(e,t,n,o,r,s,a),undo:(t,n,o)=>((e,t,n,o)=>{let r;return t.typing&&(t.add(),t.typing=!1,Iw(t,!1,n)),o.get()>0&&(o.set(o.get()-1),r=t.data[o.get()],Tw(e,r,!0),e.setDirty(!0),e.dispatch("Undo",{level:r})),r})(e,t,n,o),redo:(t,n)=>((e,t,n)=>{let o;return t.get()<n.length-1&&(t.set(t.get()+1),o=n[t.get()],Tw(e,o,!1),e.setDirty(!0),e.dispatch("Redo",{level:o})),o})(e,t,n),clear:(t,n)=>((e,t,n)=>{t.data=[],n.set(0),t.typing=!1,e.dispatch("ClearUndos")})(e,t,n),reset:e=>(e=>{e.clear(),e.add()})(e),hasUndo:(t,n)=>((e,t,n)=>n.get()>0||t.typing&&t.data[0]&&!Lw(Ow(e),t.data[0]))(e,t,n),hasRedo:(e,t)=>((e,t)=>t.get()<e.data.length-1&&!e.typing)(e,t),transact:(e,t,n)=>((e,t,n)=>(Fw(e,t),e.beforeChange(),e.ignore(n),e.add()))(e,t,n),ignore:(e,t)=>((e,t)=>{try{e.set(e.get()+1),t()}finally{e.set(e.get()-1)}})(e,t),extra:(t,n,o,r)=>((e,t,n,o,r)=>{if(t.transact(o)){const o=t.data[n.get()].bookmark,s=t.data[n.get()-1];Tw(e,s,!0),t.transact(r)&&(t.data[n.get()-1].beforeBookmark=o)}})(e,t,n,o,r)},formatter:{match:(t,n,o,r)=>fv(e,t,n,o,r),matchAll:(t,n)=>((e,t,n)=>{const o=[],r={},s=e.selection.getStart();return e.dom.getParent(s,(s=>{for(let a=0;a<t.length;a++){const i=t[a];!r[i]&&uv(e,s,i,n)&&(r[i]=!0,o.push(i))}}),e.dom.getRoot()),o})(e,t,n),matchNode:(t,n,o,r)=>uv(e,t,n,o,r),canApply:t=>((e,t)=>{const n=e.formatter.get(t),o=e.dom;if(n){const t=e.selection.getStart(),r=Ru(o,t);for(let e=n.length-1;e>=0;e--){const t=n[e];if(!Tu(t))return!0;for(let e=r.length-1;e>=0;e--)if(o.is(r[e],t.selector))return!0}}return!1})(e,t),closest:t=>gv(e,t),apply:(t,n,o)=>py(e,t,n,o),remove:(t,n,o,r)=>cy(e,t,n,o,r),toggle:(t,n,o)=>((e,t,n,o)=>{const r=e.formatter.get(t);r&&(!fv(e,t,n,o)||"toggle"in r[0]&&!r[0].toggle?py(e,t,n,o):cy(e,t,n,o))})(e,t,n,o),formatChanged:(t,n,o,r,s)=>wy(e,t,n,o,r,s)},editor:{getContent:t=>((e,t)=>U.from(e.getBody()).fold(A("tree"===t.format?new up("body",11):""),(n=>Cp(e,t,n))))(e,t),setContent:(t,n)=>ov(e,t,n),insertContent:(t,n)=>ev(e,t,n),addVisual:t=>((e,t)=>{const n=e.dom,o=x(t)?t:e.getBody();K(n.select("table,a",o),(t=>{switch(t.nodeName){case"TABLE":const o=Md(e),r=n.getAttrib(t,"border");r&&"0"!==r||!e.hasVisual?n.removeClass(t,o):n.addClass(t,o);break;case"A":if(!n.getAttrib(t,"href")){const o=n.getAttrib(t,"name")||t.id,r=Id(e);o&&e.hasVisual?n.addClass(t,r):n.removeClass(t,r)}}})),e.dispatch("VisualAid",{element:t,hasVisual:e.hasVisual})})(e,t)},selection:{getContent:(t,n)=>((e,t,n={})=>{const o=((e,t)=>({...e,format:t,get:!0,selection:!0,getInner:!0}))(n,t);return ow(e,o).fold(D,(t=>{const n=_w(e,t);return rw(e,n,t)}))})(e,t,n)},autocompleter:{addDecoration:t=>ap(e,t),removeDecoration:()=>((e,t)=>ip(t).each((t=>{const n=e.selection.getBookmark();Co(t),e.selection.moveToBookmark(n)})))(e,bn.fromDom(e.getBody()))},raw:{getModel:()=>U.none()}}),zw=e=>Se(e.plugins,"rtc"),jw=e=>{const t=e;return(e=>Ee(e.plugins,"rtc").bind((e=>U.from(e.setup))))(e).fold((()=>(t.rtcInstance=Uw(e),U.none())),(e=>(t.rtcInstance=(()=>{const e=A(null),t=A("");return{init:{bindEvents:_},undoManager:{beforeChange:_,add:e,undo:e,redo:e,clear:_,reset:_,hasUndo:I,hasRedo:I,transact:e,ignore:_,extra:_},formatter:{match:I,matchAll:A([]),matchNode:A(void 0),canApply:I,closest:t,apply:_,remove:_,toggle:_,formatChanged:A({unbind:_})},editor:{getContent:t,setContent:A({content:"",html:""}),insertContent:A(""),addVisual:_},selection:{getContent:t},autocompleter:{addDecoration:_,removeDecoration:_},raw:{getModel:A(U.none())}}})(),U.some((()=>e().then((e=>(t.rtcInstance=(e=>{const t=e=>p(e)?e:{},{init:n,undoManager:o,formatter:r,editor:s,selection:a,autocompleter:i,raw:l}=e;return{init:{bindEvents:n.bindEvents},undoManager:{beforeChange:o.beforeChange,add:o.add,undo:o.undo,redo:o.redo,clear:o.clear,reset:o.reset,hasUndo:o.hasUndo,hasRedo:o.hasRedo,transact:(e,t,n)=>o.transact(n),ignore:(e,t)=>o.ignore(t),extra:(e,t,n,r)=>o.extra(n,r)},formatter:{match:(e,n,o,s)=>r.match(e,t(n),s),matchAll:r.matchAll,matchNode:r.matchNode,canApply:e=>r.canApply(e),closest:e=>r.closest(e),apply:(e,n,o)=>r.apply(e,t(n)),remove:(e,n,o,s)=>r.remove(e,t(n)),toggle:(e,n,o)=>r.toggle(e,t(n)),formatChanged:(e,t,n,o,s)=>r.formatChanged(t,n,o,s)},editor:{getContent:e=>s.getContent(e),setContent:(e,t)=>({content:s.setContent(e,t),html:""}),insertContent:(e,t)=>(s.insertContent(e),""),addVisual:s.addVisual},selection:{getContent:(e,t)=>a.getContent(t)},autocompleter:{addDecoration:i.addDecoration,removeDecoration:i.removeDecoration},raw:{getModel:()=>U.some(l.getRawModel())}}})(e),e.rtc.isRemote))))))))},Hw=e=>e.rtcInstance?e.rtcInstance:Uw(e),$w=e=>{const t=e.rtcInstance;if(t)return t;throw new Error("Failed to get RTC instance not yet initialized.")},Vw=e=>$w(e).init.bindEvents(),qw=(e,t={})=>((e,t,n)=>$w(e).selection.getContent(t,n))(e,t.format?t.format:"html",t),Ww=e=>0===e.dom.length?(yo(e),U.none()):U.some(e),Kw=(e,t,n,o)=>{e.bind((e=>((o?Eh:kh)(e.dom,o?e.dom.length:0),t.filter(Kt).map((t=>((e,t,n,o)=>{const r=e.dom,s=t.dom,a=o?r.length:s.length;o?(Sh(r,s,!1,!o),n.setStart(s,a)):(Sh(s,r,!1,!o),n.setEnd(s,a))})(e,t,n,o)))))).orThunk((()=>{const e=((e,t)=>e.filter((e=>sf.isBookmarkNode(e.dom))).bind(t?Dn:An))(t,o).or(t).filter(Kt);return e.map((e=>((e,t)=>{_n(e).each((n=>{const o=e.dom;t&&fh(n,Hi(o,0))?kh(o,0):!t&&gh(n,Hi(o,o.length))&&Eh(o,o.length)}))})(e,o)))}))},Gw=(e,t,n={})=>{const o=((e,t)=>({format:"html",...e,set:!0,selection:!0,content:t}))(n,t);sw(e,o).each((t=>{const n=((e,t)=>{if("raw"!==t.format){const n=e.selection.getRng(),o=e.dom.getParent(n.commonAncestorContainer,e.dom.isBlock),r=o?{context:o.nodeName.toLowerCase()}:{},s=e.parser.parse(t.content,{forced_root_block:!1,...r,...t});return kp({validate:!1},e.schema).serialize(s)}return t.content})(e,t),o=e.selection.getRng();((e,t)=>{const n=U.from(t.firstChild).map(bn.fromDom),o=U.from(t.lastChild).map(bn.fromDom);e.deleteContents(),e.insertNode(t);const r=n.bind(An).filter(Kt).bind(Ww),s=o.bind(Dn).filter(Kt).bind(Ww);Kw(r,n,e,!0),Kw(s,o,e,!1),e.collapse(!1)})(o,o.createContextualFragment(n)),e.selection.setRng(o),vg(e,o),aw(e,n,t)}))},Yw=(e,t,n)=>{if(Se(e,t)){const o=X(e[t],(e=>e!==n));0===o.length?delete e[t]:e[t]=o}};var Xw=(e,t)=>{let n,o;const r=(t,n)=>ee(n,(n=>e.is(n,t))),s=t=>e.getParents(t,void 0,e.getRoot());return{selectorChangedWithUnbind:(e,a)=>(n||(n={},o={},t.on("NodeChange",(e=>{const t=e.element,a=s(t),i={};he(n,((e,t)=>{r(t,a).each((n=>{o[t]||(K(e,(e=>{e(!0,{node:n,selector:t,parents:a})})),o[t]=e),i[t]=e}))})),he(o,((e,n)=>{i[n]||(delete o[n],K(e,(e=>{e(!1,{node:t,selector:n,parents:a})})))}))}))),n[e]||(n[e]=[]),n[e].push(a),r(e,s(t.selection.getStart())).each((()=>{o[e]=n[e]})),{unbind:()=>{Yw(n,e,a),Yw(o,e,a)}})}};const Qw=e=>!(!e||!e.ownerDocument)&&xn(bn.fromDom(e.ownerDocument),bn.fromDom(e)),Jw=(e,t,n,o)=>{let r,s;const{selectorChangedWithUnbind:a}=Xw(e,o),i=(e,t)=>Gw(o,e,t),l=e=>{const t=c();t.collapse(!!e),m(t)},d=()=>t.getSelection?t.getSelection():t.document.selection,c=()=>{let n;const a=(e,t,n)=>{try{return t.compareBoundaryPoints(e,n)}catch(e){return-1}},i=t.document;if(x(o.bookmark)&&!qg(o)){const e=Dg(o);if(e.isSome())return e.map((e=>Zg(o,[e])[0])).getOr(i.createRange())}try{const e=d();e&&!zo(e.anchorNode)&&(n=e.rangeCount>0?e.getRangeAt(0):i.createRange(),n=Zg(o,[n])[0])}catch(e){}if(n||(n=i.createRange()),er(n.startContainer)&&n.collapsed){const t=e.getRoot();n.setStart(t,0),n.setEnd(t,0)}return r&&s&&(0===a(n.START_TO_START,n,r)&&0===a(n.END_TO_END,n,r)?n=s:(r=null,s=null)),n},m=(e,t)=>{if(!(e=>!!e&&Qw(e.startContainer)&&Qw(e.endContainer))(e))return;const n=d();if(e=o.dispatch("SetSelectionRange",{range:e,forward:t}).range,n){s=e;try{n.removeAllRanges(),n.addRange(e)}catch(e){}!1===t&&n.extend&&(n.collapse(e.endContainer,e.endOffset),n.extend(e.startContainer,e.startOffset)),r=n.rangeCount>0?n.getRangeAt(0):null}if(!e.collapsed&&e.startContainer===e.endContainer&&(null==n?void 0:n.setBaseAndExtent)&&e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()){const t=e.startContainer.childNodes[e.startOffset];t&&"IMG"===t.nodeName&&(n.setBaseAndExtent(e.startContainer,e.startOffset,e.endContainer,e.endOffset),n.anchorNode===e.startContainer&&n.focusNode===e.endContainer||n.setBaseAndExtent(t,0,t,1))}o.dispatch("AfterSetSelectionRange",{range:e,forward:t})},u=()=>{const t=d(),n=null==t?void 0:t.anchorNode,o=null==t?void 0:t.focusNode;if(!t||!n||!o||zo(n)||zo(o))return!0;const r=e.createRng(),s=e.createRng();try{r.setStart(n,t.anchorOffset),r.collapse(!0),s.setStart(o,t.focusOffset),s.collapse(!0)}catch(e){return!0}return r.compareBoundaryPoints(r.START_TO_START,s)<=0},f={dom:e,win:t,serializer:n,editor:o,expand:(t={type:"word"})=>m(Xf(e).expand(c(),t)),collapse:l,setCursorLocation:(t,n)=>{const r=e.createRng();x(t)&&x(n)?(r.setStart(t,n),r.setEnd(t,n),m(r),l(!1)):(du(e,r,o.getBody(),!0),m(r))},getContent:e=>qw(o,e),setContent:i,getBookmark:(e,t)=>g.getBookmark(e,t),moveToBookmark:e=>g.moveToBookmark(e),select:(t,n)=>(((e,t,n)=>U.from(t).bind((t=>U.from(t.parentNode).map((o=>{const r=e.nodeIndex(t),s=e.createRng();return s.setStart(o,r),s.setEnd(o,r+1),n&&(du(e,s,t,!0),du(e,s,t,!1)),s})))))(e,t,n).each(m),t),isCollapsed:()=>{const e=c(),t=d();return!(!e||e.item)&&(e.compareEndPoints?0===e.compareEndPoints("StartToEnd",e):!t||e.collapsed)},isEditable:()=>{const t=c(),n=o.getBody().querySelectorAll('[data-mce-selected="1"]');return n.length>0?re(n,(t=>e.isEditable(t.parentElement))):t.startContainer===t.endContainer?e.isEditable(t.startContainer):e.isEditable(t.startContainer)&&e.isEditable(t.endContainer)},isForward:u,setNode:t=>(i(e.getOuterHTML(t)),t),getNode:()=>((e,t)=>{if(!t)return e;let n=t.startContainer,o=t.endContainer;const r=t.startOffset,s=t.endOffset;let a=t.commonAncestorContainer;t.collapsed||(n===o&&s-r<2&&n.hasChildNodes()&&(a=n.childNodes[r]),Xo(n)&&Xo(o)&&(n=n.length===r?Jg(n.nextSibling,!0):n.parentNode,o=0===s?Jg(o.previousSibling,!1):o.parentNode,n&&n===o&&(a=n)));const i=Xo(a)?a.parentNode:a;return jo(i)?i:e})(o.getBody(),c()),getSel:d,setRng:m,getRng:c,getStart:e=>Xg(o.getBody(),c(),e),getEnd:e=>Qg(o.getBody(),c(),e),getSelectedBlocks:(t,n)=>((e,t,n,o)=>{const r=[],s=e.getRoot(),a=e.getParent(n||Xg(s,t,t.collapsed),e.isBlock),i=e.getParent(o||Qg(s,t,t.collapsed),e.isBlock);if(a&&a!==s&&r.push(a),a&&i&&a!==i){let t;const n=new Fo(a,s);for(;(t=n.next())&&t!==i;)e.isBlock(t)&&r.push(t)}return i&&a!==i&&i!==s&&r.push(i),r})(e,c(),t,n),normalize:()=>{const t=c(),n=d();if(!(tu(n).length>1)&&cu(o)){const n=Kf(e,t);return n.each((e=>{m(e,u())})),n.getOr(t)}return t},selectorChanged:(e,t)=>(a(e,t),f),selectorChangedWithUnbind:a,getScrollContainer:()=>{let t,n=e.getRoot();for(;n&&"BODY"!==n.nodeName;){if(n.scrollHeight>n.clientHeight){t=n;break}n=n.parentNode}return t},scrollIntoView:(e,t)=>{x(e)?((e,t,n)=>{(e.inline?pg:bg)(e,t,n)})(o,e,t):vg(o,c(),t)},placeCaretAt:(e,t)=>m(Uf(e,t,o.getDoc())),getBoundingClientRect:()=>{const e=c();return e.collapsed?Hi.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:()=>{t=r=s=null,p.destroy()}},g=sf(f),p=yf(f,o);return f.bookmarkManager=g,f.controlSelection=p,f},Zw=(e,t,n)=>((e,t)=>x(e)&&e.hasEventListeners("PreProcess")&&!t.no_events)(e,n)?((e,t,n)=>{let o;const r=e.dom;let s=t.cloneNode(!0);const a=document.implementation;if(a.createHTMLDocument){const e=a.createHTMLDocument("");Pt.each("BODY"===s.nodeName?s.childNodes:[s],(t=>{e.body.appendChild(e.importNode(t,!0))})),s="BODY"!==s.nodeName?e.body.firstChild:e.body,o=r.doc,r.doc=e}return((e,t)=>{e.dispatch("PreProcess",t)})(e,{...n,node:s}),o&&(r.doc=o),s})(e,t,n):t,ex=(e,t,n)=>{-1===Pt.inArray(t,n)&&(e.addAttributeFilter(n,((e,t)=>{let n=e.length;for(;n--;)e[n].attr(t,null)})),t.push(n))},tx=(e,t,n,o,r)=>{const s=((e,t,n)=>kp(e,t).serialize(n))(t,n,o);return((e,t,n)=>{if(!t.no_events&&e){const o=((e,t)=>e.dispatch("PostProcess",t))(e,{...t,content:n});return o.content}return n})(e,r,s)},nx=(e,t)=>{const n=["data-mce-selected"],o=t&&t.dom?t.dom:Pa.DOM,r=t&&t.schema?t.schema:fa(e);e.entity_encoding=e.entity_encoding||"named",e.remove_trailing_brs=!("remove_trailing_brs"in e)||e.remove_trailing_brs;const s=tw(e,r);((e,t,n)=>{e.addAttributeFilter("data-mce-tabindex",((e,t)=>{let n=e.length;for(;n--;){const o=e[n];o.attr("tabindex",o.attr("data-mce-tabindex")),o.attr(t,null)}})),e.addAttributeFilter("src,href,style",((e,o)=>{const r="data-mce-"+o,s=t.url_converter,a=t.url_converter_scope;let i=e.length;for(;i--;){const t=e[i];let l=t.attr(r);void 0!==l?(t.attr(o,l.length>0?l:null),t.attr(r,null)):(l=t.attr(o),"style"===o?l=n.serializeStyle(n.parseStyle(l),t.name):s&&(l=s.call(a,l,o,t.name)),t.attr(o,l.length>0?l:null))}})),e.addAttributeFilter("class",(e=>{let t=e.length;for(;t--;){const n=e[t];let o=n.attr("class");o&&(o=o.replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),n.attr("class",o.length>0?o:null))}})),e.addAttributeFilter("data-mce-type",((e,t,n)=>{let o=e.length;for(;o--;){const t=e[o];if("bookmark"===t.attr("data-mce-type")&&!n.cleanup){const e=U.from(t.firstChild).exists((e=>{var t;return!Pr(null!==(t=e.value)&&void 0!==t?t:"")}));e?t.unwrap():t.remove()}}})),e.addNodeFilter("noscript",(e=>{var t;let n=e.length;for(;n--;){const o=e[n].firstChild;o&&(o.value=ea.decode(null!==(t=o.value)&&void 0!==t?t:""))}})),e.addNodeFilter("script,style",((e,n)=>{var o;const r=e=>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,"");let s=e.length;for(;s--;){const a=e[s],i=a.firstChild,l=null!==(o=null==i?void 0:i.value)&&void 0!==o?o:"";if("script"===n){const e=a.attr("type");e&&a.attr("type","mce-no/type"===e?null:e.replace(/^mce\-/,"")),"xhtml"===t.element_format&&i&&l.length>0&&(i.value="// <![CDATA[\n"+r(l)+"\n// ]]>")}else"xhtml"===t.element_format&&i&&l.length>0&&(i.value="\x3c!--\n"+r(l)+"\n--\x3e")}})),e.addNodeFilter("#comment",(e=>{let o=e.length;for(;o--;){const r=e[o],s=r.value;t.preserve_cdata&&0===(null==s?void 0:s.indexOf("[CDATA["))?(r.name="#cdata",r.type=4,r.value=n.decode(s.replace(/^\[CDATA\[|\]\]$/g,""))):0===(null==s?void 0:s.indexOf("mce:protected "))&&(r.name="#text",r.type=3,r.raw=!0,r.value=unescape(s).substr(14))}})),e.addNodeFilter("xml:namespace,input",((e,t)=>{let n=e.length;for(;n--;){const o=e[n];7===o.type?o.remove():1===o.type&&("input"!==t||o.attr("type")||o.attr("type","text"))}})),e.addAttributeFilter("data-mce-type",(t=>{K(t,(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-block,data-mce-type,data-mce-resize,data-mce-placeholder",((e,t)=>{let n=e.length;for(;n--;)e[n].attr(t,null)}))})(s,e,o);return{schema:r,addNodeFilter:s.addNodeFilter,addAttributeFilter:s.addAttributeFilter,serialize:(n,a={})=>{const i={format:"html",...a},l=Zw(t,n,i),d=((e,t,n)=>{const o=Lr(n.getInner?t.innerHTML:e.getOuterHTML(t));return n.selection||_r(bn.fromDom(t))?o:Pt.trim(o)})(o,l,i),c=((e,t,n)=>{const o=n.selection?{forced_root_block:!1,...n}:n,r=e.parse(t,o);return(e=>{const t=e=>"br"===(null==e?void 0:e.name),n=e.lastChild;if(t(n)){const e=n.prev;t(e)&&(n.remove(),e.remove())}})(r),r})(s,d,i);return"tree"===i.format?c:tx(t,e,r,c,i)},addRules:r.addValidElements,setRules:r.setValidElements,addTempAttr:T(ex,s,n),getTempAttrs:A(n),getNodeFilters:s.getNodeFilters,getAttributeFilters:s.getAttributeFilters,removeNodeFilter:s.removeNodeFilter,removeAttributeFilter:s.removeAttributeFilter}},ox=(e,t)=>{const n=nx(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,removeNodeFilter:n.removeNodeFilter,removeAttributeFilter:n.removeAttributeFilter}},rx=(e,t={})=>{const n=((e,t)=>({...e,format:t,get:!0,getInner:!0}))(t,t.format?t.format:"html");return ow(e,n).fold(D,(t=>{const n=((e,t)=>Hw(e).editor.getContent(t))(e,t);return rw(e,n,t)}))},sx=(e,t,n={})=>{const o=((e,t)=>({format:"html",...e,set:!0,content:t}))(n,t);return sw(e,o).map((t=>{const n=((e,t,n)=>Hw(e).editor.setContent(t,n))(e,t.content,t);return aw(e,n.html,t),n.content})).getOr(t)},ax="autoresize_on_init,content_editable_state,padd_empty_with_br,block_elements,boolean_attributes,editor_deselector,editor_selector,elements,file_browser_callback_types,filepicker_validator_handler,force_hex_style_colors,force_p_newlines,gecko_spellcheck,images_dataimg_filter,media_scripts,mode,move_caret_before_on_enter_elements,non_empty_elements,self_closing_elements,short_ended_elements,special,spellchecker_select_languages,spellchecker_whitelist,tab_focus,tabfocus_elements,table_responsive_width,text_block_elements,text_inline_elements,toolbar_drawer,types,validate,whitespace_elements,paste_enable_default_filters,paste_filter_drop,paste_word_valid_elements,paste_retain_style_properties,paste_convert_word_fake_lists".split(","),ix="template_cdate_classes,template_mdate_classes,template_selected_content_classes,template_preview_replace_values,template_replace_values,templates,template_cdate_format,template_mdate_format".split(","),lx="bbcode,colorpicker,contextmenu,fullpage,legacyoutput,spellchecker,textcolor".split(","),dx=[{name:"template",replacedWith:"Advanced Template"}],cx=(e,t)=>{const n=X(t,(t=>Se(e,t)));return le(n)},mx=e=>{const t=cx(e,ax),n=e.forced_root_block;return!1!==n&&""!==n||t.push("forced_root_block (false only)"),le(t)},ux=e=>cx(e,ix),fx=(e,t)=>{const n=Pt.makeMap(e.plugins," "),o=X(t,(e=>Se(n,e)));return le(o)},gx=e=>fx(e,lx),px=e=>fx(e,dx.map((e=>e.name))),hx=e=>ee(dx,(t=>t.name===e)).fold((()=>e),(t=>`${e}, replaced by ${t.replacedWith}`)),bx=(e,t)=>{((e,t)=>{const n=mx(e),o=gx(t),r=o.length>0,s=n.length>0,a="mobile"===t.theme;if(r||s||a){const e="\n- ",t=a?`\n\nThemes:${e}mobile`:"",i=r?`\n\nPlugins:${e}${o.join(e)}`:"",l=s?`\n\nOptions:${e}${n.join(e)}`:"";console.warn("The following deprecated features are currently enabled and have been removed in TinyMCE 6.0. These features will no longer work and should be removed from the TinyMCE configuration. See https://www.tiny.cloud/docs/tinymce/6/migration-from-5x/ for more information."+t+i+l)}})(e,t),((e,t)=>{const n=ux(e),o=px(t),r=o.length>0,s=n.length>0;if(r||s){const e="\n- ",t=r?`\n\nPlugins:${e}${o.map(hx).join(e)}`:"",a=s?`\n\nOptions:${e}${n.join(e)}`:"";console.warn("The following deprecated features are currently enabled but will be removed soon."+t+a)}})(e,t)},vx=Pa.DOM,yx=e=>U.from(e).each((e=>e.destroy())),Cx=e=>{if(!e.removed){const{_selectionOverrides:t,editorUpload:n}=e,o=e.getBody(),r=e.getElement();o&&e.save({is_removing:!0}),e.removed=!0,e.unbindAllNativeEvents(),e.hasHiddenInput&&x(null==r?void 0:r.nextSibling)&&vx.remove(r.nextSibling),(e=>{e.dispatch("remove")})(e),e.editorManager.remove(e),!e.inline&&o&&(e=>{vx.setStyle(e.id,"display",e.orgDisplay)})(e),(e=>{e.dispatch("detach")})(e),vx.remove(e.getContainer()),yx(t),yx(n),e.destroy()}},wx=(e,t)=>{const{selection:n,dom:o}=e;e.destroyed||(t||e.removed?(t||(e.editorManager.off("beforeunload",e._beforeUnload),e.theme&&e.theme.destroy&&e.theme.destroy(),yx(n),yx(o)),(e=>{const t=e.formElement;t&&(t._mceOldSubmit&&(t.submit=t._mceOldSubmit,delete t._mceOldSubmit),vx.unbind(t,"submit reset",e.formEventDelegate))})(e),(e=>{const t=e;t.contentAreaContainer=t.formElement=t.container=t.editorContainer=null,t.bodyElement=t.contentDocument=t.contentWindow=null,t.iframeElement=t.targetElm=null;const n=e.selection;if(n){const e=n.dom;t.selection=n.win=n.dom=e.doc=null}})(e),e.destroyed=!0):e.remove())},xx=(()=>{const e={};return{add:(t,n)=>{e[t]=n},get:t=>e[t]?e[t]:{icons:{}},has:t=>Se(e,t)}})(),kx=Ha.ModelManager,Ex=(e,t)=>t.dom[e],Sx=(e,t)=>parseInt(ao(t,e),10),_x=T(Ex,"clientWidth"),Nx=T(Ex,"clientHeight"),Rx=T(Sx,"margin-top"),Ax=T(Sx,"margin-left"),Dx=(e,t,n)=>{const o=bn.fromDom(e.getBody()),r=e.inline?o:(s=o,bn.fromDom(En(s).dom.documentElement));var s;const a=((e,t,n,o)=>{const r=(e=>e.dom.getBoundingClientRect())(t);return{x:n-(e?r.left+t.dom.clientLeft+Ax(t):0),y:o-(e?r.top+t.dom.clientTop+Rx(t):0)}})(e.inline,r,t,n);return((e,t,n)=>{const o=_x(e),r=Nx(e);return t>=0&&n>=0&&t<=o&&n<=r})(r,a.x,a.y)},Ox=e=>{const t=e.inline?e.getBody():e.getContentAreaContainer();return(n=t,U.from(n).map(bn.fromDom)).map(Wn).getOr(!1);var n};const Tx=e=>{const t=[],n=()=>{const t=e.theme;return t&&t.getNotificationManagerImpl?t.getNotificationManagerImpl():(()=>{const e=()=>{throw new Error("Theme did not provide a NotificationManager implementation.")};return{open:e,close:e,getArgs:e}})()},o=()=>U.from(t[0]),r=()=>{K(t,(e=>{e.reposition()}))},s=e=>{te(t,(t=>t===e)).each((e=>{t.splice(e,1)}))},a=(a,i=!0)=>e.removed||!Ox(e)?{}:(i&&e.dispatch("BeforeOpenNotification",{notification:a}),ee(t,(e=>{return t=n().getArgs(e),o=a,!(t.type!==o.type||t.text!==o.text||t.progressBar||t.timeout||o.progressBar||o.timeout);var t,o})).getOrThunk((()=>{e.editorManager.setActive(e);const i=n().open(a,(()=>{s(i),r(),o().fold((()=>e.focus()),(e=>yg(bn.fromDom(e.getEl()))))}));return(e=>{t.push(e)})(i),r(),e.dispatch("OpenNotification",{notification:{...i}}),i}))),i=A(t);return(e=>{e.on("SkinLoaded",(()=>{const t=ud(e);t&&a({text:t,type:"warning",timeout:0},!1),r()})),e.on("show ResizeEditor ResizeWindow NodeChange",(()=>{requestAnimationFrame(r)})),e.on("remove",(()=>{K(t.slice(),(e=>{n().close(e)}))}))})(e),{open:a,close:()=>{o().each((e=>{n().close(e),s(e),r()}))},getNotifications:i}},Bx=Ha.PluginManager,Px=Ha.ThemeManager;const Lx=e=>{let t=[];const n=()=>{const t=e.theme;return t&&t.getWindowManagerImpl?t.getWindowManagerImpl():(()=>{const e=()=>{throw new Error("Theme did not provide a WindowManager implementation.")};return{open:e,openUrl:e,alert:e,confirm:e,close:e}})()},o=(e,t)=>(...n)=>t?t.apply(e,n):void 0,r=n=>{t.push(n),(t=>{e.dispatch("OpenWindow",{dialog:t})})(n)},s=n=>{(t=>{e.dispatch("CloseWindow",{dialog:t})})(n),t=X(t,(e=>e!==n)),0===t.length&&e.focus()},a=t=>{e.editorManager.setActive(e),Ag(e),e.ui.show();const n=t();return r(n),n};return e.on("remove",(()=>{K(t,(e=>{n().close(e)}))})),{open:(e,t)=>a((()=>n().open(e,t,s))),openUrl:e=>a((()=>n().openUrl(e,s))),alert:(e,t,r)=>{const s=n();s.alert(e,o(r||s,t))},confirm:(e,t,r)=>{const s=n();s.confirm(e,o(r||s,t))},close:()=>{U.from(t[t.length-1]).each((e=>{n().close(e),s(e)}))}}},Mx=(e,t)=>{e.notificationManager.open({type:"error",text:t})},Ix=(e,t)=>{e._skinLoaded?Mx(e,t):e.on("SkinLoaded",(()=>{Mx(e,t)}))},Fx=(e,t,n)=>{lf(e,t,{message:n}),console.error(n)},Ux=(e,t,n)=>n?`Failed to load ${e}: ${n} from url ${t}`:`Failed to load ${e} url: ${t}`,zx=(e,...t)=>{const n=window.console;n&&(n.error?n.error(e,...t):n.log(e,...t))},jx=(e,t)=>{const n=e.editorManager.baseURL+"/skins/content",o=`content${e.editorManager.suffix}.css`;return W(t,(t=>(e=>/^[a-z0-9\-]+$/i.test(e))(t)&&!e.inline?`${n}/${t}/${o}`:e.documentBaseURI.toAbsolute(t)))},Hx=e=>{e.contentCSS=e.contentCSS.concat((e=>jx(e,od(e)))(e),(e=>jx(e,sd(e)))(e))},$x=(e,t)=>{const n={};return{findAll:(o,r=F)=>{const s=X((e=>e?ue(e.getElementsByTagName("img")):[])(o),(t=>{const n=t.src;return!t.hasAttribute("data-mce-bogus")&&(!t.hasAttribute("data-mce-placeholder")&&(!(!n||n===Dt.transparentSrc)&&(Ve(n,"blob:")?!e.isUploaded(n)&&r(t):!!Ve(n,"data:")&&r(t))))})),a=W(s,(e=>{const o=e.src;if(Se(n,o))return n[o].then((t=>g(t)?t:{image:e,blobInfo:t.blobInfo}));{const r=((e,t)=>{const n=()=>Promise.reject("Invalid data URI");if(Ve(t,"blob:")){const o=e.getByUri(t);return x(o)?Promise.resolve(o):Ry(t).then((t=>Ay(t).then((o=>Oy(o,!1,(n=>U.some(Ty(e,t,n)))).getOrThunk(n)))))}return Ve(t,"data:")?By(e,t).fold(n,(e=>Promise.resolve(e))):Promise.reject("Unknown image data format")})(t,o).then((t=>(delete n[o],{image:e,blobInfo:t}))).catch((e=>(delete n[o],e)));return n[o]=r,r}}));return Promise.all(a)}}},Vx=()=>{let e={};const t=(e,t)=>({status:e,resultUri:t}),n=t=>t in e;return{hasBlobUri:n,getResultUri:t=>{const n=e[t];return n?n.resultUri:null},isPending:t=>!!n(t)&&1===e[t].status,isUploaded:t=>!!n(t)&&2===e[t].status,markPending:n=>{e[n]=t(1,null)},markUploaded:(n,o)=>{e[n]=t(2,o)},removeFailed:t=>{delete e[t]},destroy:()=>{e={}}}};let qx=0;const Wx=e=>e+qx+++(()=>{const e=()=>Math.round(4294967295*Math.random()).toString(36);return"s"+(new Date).getTime().toString(36)+e()+e()+e()})(),Kx=(e,t)=>{const n={},o=(e,n)=>new Promise(((o,r)=>{const s=new XMLHttpRequest;s.open("POST",t.url),s.withCredentials=t.credentials,s.upload.onprogress=e=>{n(e.loaded/e.total*100)},s.onerror=()=>{r("Image upload failed due to a XHR Transport error. Code: "+s.status)},s.onload=()=>{if(s.status<200||s.status>=300)return void r("HTTP Error: "+s.status);const e=JSON.parse(s.responseText);var n,a;e&&g(e.location)?o((n=t.basePath,a=e.location,n?n.replace(/\/$/,"")+"/"+a.replace(/^\//,""):a)):r("Invalid JSON: "+s.responseText)};const a=new FormData;a.append("file",e.blob(),e.filename()),s.send(a)})),r=k(t.handler)?t.handler:o,s=(e,t)=>({url:t,blobInfo:e,status:!0}),a=(e,t)=>({url:"",blobInfo:e,status:!1,error:t}),i=(e,t)=>{Pt.each(n[e],(e=>{e(t)})),delete n[e]},l=(t,o)=>(t=Pt.grep(t,(t=>!e.isUploaded(t.blobUri()))),Promise.all(Pt.map(t,(t=>e.isPending(t.blobUri())?(e=>{const t=e.blobUri();return new Promise((e=>{n[t]=n[t]||[],n[t].push(e)}))})(t):((t,n,o)=>(e.markPending(t.blobUri()),new Promise((r=>{let l,d;try{const c=()=>{l&&(l.close(),d=_)},m=n=>{c(),e.markUploaded(t.blobUri(),n),i(t.blobUri(),s(t,n)),r(s(t,n))},u=n=>{c(),e.removeFailed(t.blobUri()),i(t.blobUri(),a(t,n)),r(a(t,n))};d=e=>{e<0||e>100||U.from(l).orThunk((()=>U.from(o).map(L))).each((t=>{l=t,t.progressBar.value(e)}))},n(t,d).then(m,(e=>{u(g(e)?{message:e}:e)}))}catch(e){r(a(t,e))}}))))(t,r,o)))));return{upload:(e,n)=>t.url||r!==o?l(e,n):new Promise((e=>{e([])}))}},Gx=e=>()=>e.notificationManager.open({text:e.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0}),Yx=(e,t)=>Kx(t,{url:Kl(e),basePath:Gl(e),credentials:Yl(e),handler:Xl(e)}),Xx=e=>{const t=(()=>{let e=[];const t=e=>{if(!e.blob||!e.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");const t=e.id||Wx("blobid"),n=e.name||t,o=e.blob;return{id:A(t),name:A(n),filename:A(e.filename||n+"."+(r=o.type,{"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png","image/apng":"apng","image/avif":"avif","image/svg+xml":"svg","image/webp":"webp","image/bmp":"bmp","image/tiff":"tiff"}[r.toLowerCase()]||"dat")),blob:A(o),base64:A(e.base64),blobUri:A(e.blobUri||URL.createObjectURL(o)),uri:A(e.uri)};var r},n=t=>ee(e,t).getOrUndefined(),o=e=>n((t=>t.id()===e));return{create:(e,n,o,r,s)=>{if(g(e))return t({id:e,name:r,filename:s,blob:n,base64:o});if(p(e))return t(e);throw new Error("Unknown input type")},add:t=>{o(t.id())||e.push(t)},get:o,getByUri:e=>n((t=>t.blobUri()===e)),getByData:(e,t)=>n((n=>n.base64()===e&&n.blob().type===t)),findFirst:n,removeByUri:t=>{e=X(e,(e=>e.blobUri()!==t||(URL.revokeObjectURL(e.blobUri()),!1)))},destroy:()=>{K(e,(e=>{URL.revokeObjectURL(e.blobUri())})),e=[]}}})();let n,o;const r=Vx(),s=[],a=t=>n=>e.selection?t(n):[],i=(e,t,n)=>{let o=0;do{o=e.indexOf(t,o),-1!==o&&(e=e.substring(0,o)+n+e.substr(o+t.length),o+=n.length-t.length+1)}while(-1!==o);return e},l=(e,t,n)=>{const o=`src="${n}"${n===Dt.transparentSrc?' data-mce-placeholder="1"':""}`;return e=i(e,`src="${t}"`,o),e=i(e,'data-mce-src="'+t+'"','data-mce-src="'+n+'"')},d=(t,n)=>{K(e.undoManager.data,(e=>{"fragmented"===e.type?e.fragments=W(e.fragments,(e=>l(e,t,n))):e.content=l(e.content,t,n)}))},c=()=>(n||(n=Yx(e,r)),f().then(a((o=>{const r=W(o,(e=>e.blobInfo));return n.upload(r,Gx(e)).then(a((n=>{const r=[];let s=!1;const a=W(n,((n,a)=>{const{blobInfo:i,image:l}=o[a];let c=!1;return n.status&&Vl(e)?(n.url&&!$e(l.src,n.url)&&(s=!0),t.removeByUri(l.src),zw(e)||((t,n)=>{const o=e.convertURL(n,"src");var r;d(t.src,n),Zt(bn.fromDom(t),{src:$l(e)?(r=n,r+(-1===r.indexOf("?")?"?":"&")+(new Date).getTime()):n,"data-mce-src":o})})(l,n.url)):n.error&&(n.error.remove&&(d(l.src,Dt.transparentSrc),r.push(l),c=!0),((e,t)=>{Ix(e,ja.translate(["Failed to upload image: {0}",t]))})(e,n.error.message)),{element:l,status:n.status,uploadUri:n.url,blobInfo:i,removed:c}}));return r.length>0&&!zw(e)?e.undoManager.transact((()=>{K(r,(n=>{e.dom.remove(n),t.removeByUri(n.src)}))})):s&&e.undoManager.dispatchChange(),a})))})))),m=()=>Hl(e)?c():Promise.resolve([]),u=e=>re(s,(t=>t(e))),f=()=>(o||(o=$x(r,t)),o.findAll(e.getBody(),u).then(a((t=>{const n=X(t,(t=>g(t)?(Ix(e,t),!1):"blob"!==t.uriType));return zw(e)||K(n,(e=>{d(e.image.src,e.blobInfo.blobUri()),e.image.src=e.blobInfo.blobUri(),e.image.removeAttribute("data-mce-src")})),n})))),h=n=>n.replace(/src="(blob:[^"]+)"/g,((n,o)=>{const s=r.getResultUri(o);if(s)return'src="'+s+'"';let a=t.getByUri(o);if(a||(a=J(e.editorManager.get(),((e,t)=>e||t.editorUpload&&t.editorUpload.blobCache.getByUri(o)),void 0)),a){return'src="data:'+a.blob().type+";base64,"+a.base64()+'"'}return n}));return e.on("SetContent",(()=>{Hl(e)?m():f()})),e.on("RawSaveContent",(e=>{e.content=h(e.content)})),e.on("GetContent",(e=>{e.source_view||"raw"===e.format||"tree"===e.format||(e.content=h(e.content))})),e.on("PostRender",(()=>{e.parser.addNodeFilter("img",(e=>{K(e,(e=>{const n=e.attr("src");if(!n||t.getByUri(n))return;const o=r.getResultUri(n);o&&e.attr("src",o)}))}))})),{blobCache:t,addFilter:e=>{s.push(e)},uploadImages:c,uploadImagesAuto:m,scanForImages:f,destroy:()=>{t.destroy(),r.destroy(),o=n=null}}},Qx={remove_similar:!0,inherit:!1},Jx={selector:"td,th",...Qx},Zx={tablecellbackgroundcolor:{styles:{backgroundColor:"%value"},...Jx},tablecellverticalalign:{styles:{"vertical-align":"%value"},...Jx},tablecellbordercolor:{styles:{borderColor:"%value"},...Jx},tablecellclass:{classes:["%value"],...Jx},tableclass:{selector:"table",classes:["%value"],...Qx},tablecellborderstyle:{styles:{borderStyle:"%value"},...Jx},tablecellborderwidth:{styles:{borderWidth:"%value"},...Jx}},ek=A(Zx),tk=e=>{const t={},n=(e,o)=>{e&&(g(e)?(b(o)||(o=[o]),K(o,(e=>{C(e.deep)&&(e.deep=!Tu(e)),C(e.split)&&(e.split=!Tu(e)||Bu(e)),C(e.remove)&&Tu(e)&&!Bu(e)&&(e.remove="none"),Tu(e)&&Bu(e)&&(e.mixed=!0,e.block_expand=!0),g(e.classes)&&(e.classes=e.classes.split(/\s+/))})),t[e]=o):he(e,((e,t)=>{n(t,e)})))};return n((e=>{const t=e.dom,n=e.schema.type,o={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,pre",styles:{textAlign:"left"},inherit:!1,preview:!1},{selector:"img,audio,video",collapsed:!1,styles:{float:"left"},preview:"font-family font-size"},{selector:"table",collapsed:!1,styles:{marginLeft:"0px",marginRight:"auto"},onformat:e=>{t.setStyle(e,"float",null)},preview:"font-family font-size"},{selector:".mce-preview-object,[data-ephox-embed-iri]",ceFalseOverride:!0,styles:{float:"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre",styles:{textAlign:"center"},inherit:!1,preview:"font-family font-size"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"img,audio,video",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"},{selector:".mce-preview-object",ceFalseOverride:!0,styles:{display:"table",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"[data-ephox-embed-iri]",ceFalseOverride:!0,styles:{marginLeft:"auto",marginRight:"auto"},preview:!1}],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,pre",styles:{textAlign:"right"},inherit:!1,preview:"font-family font-size"},{selector:"img,audio,video",collapsed:!1,styles:{float:"right"},preview:"font-family font-size"},{selector:"table",collapsed:!1,styles:{marginRight:"0px",marginLeft:"auto"},onformat:e=>{t.setStyle(e,"float",null)},preview:"font-family font-size"},{selector:".mce-preview-object,[data-ephox-embed-iri]",ceFalseOverride:!0,styles:{float:"right"},preview:!1}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre",styles:{textAlign:"justify"},inherit:!1,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:(()=>{const e={inline:"span",styles:{textDecoration:"line-through"},exact:!0},t={inline:"strike",remove:"all",preserve_attributes:["class","style"]},o={inline:"s",remove:"all",preserve_attributes:["class","style"]};return"html4"!==n?[o,e,t]:[e,o,t]})(),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},lineheight:{selector:"h1,h2,h3,h4,h5,h6,p,li,td,th,div",styles:{lineHeight:"%value"}},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:(e,t,n)=>jo(e)&&e.hasAttribute("href"),onformat:(e,n,o)=>{Pt.each(o,((n,o)=>{t.setAttrib(e,o,n)}))}},lang:{inline:"span",clear_child_styles:!0,remove_similar:!0,attributes:{lang:"%value","data-mce-lang":e=>{var t;return null!==(t=null==e?void 0:e.customValue)&&void 0!==t?t:null}}},removeformat:[{selector:"b,strong,em,i,font,u,strike,s,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins,small",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 Pt.each("p h1 h2 h3 h4 h5 h6 div address pre dt dd samp".split(/\s/),(e=>{o[e]={block:e,remove:"all"}})),o})(e)),n(ek()),n(vd(e)),{get:e=>x(e)?t[e]:t,has:e=>Se(t,e),register:n,unregister:e=>(e&&t[e]&&delete t[e],t)}},nk=Pt.each,ok=Pa.DOM,rk=e=>x(e)&&p(e),sk=(e,t)=>{const n=t&&t.schema||fa({}),o=e=>{const t=g(e)?{name:e,classes:[],attrs:{}}:e,n=ok.create(t.name);return((e,t)=>{t.classes.length>0&&ok.addClass(e,t.classes.join(" ")),ok.setAttribs(e,t.attrs)})(n,t),n},r=(e,t,s)=>{let a;const i=t[0],l=rk(i)?i.name:void 0,d=((e,t)=>{const o=n.getElementRule(e.nodeName.toLowerCase()),r=null==o?void 0:o.parentsRequired;return!(!r||!r.length)&&(t&&V(r,t)?t:r[0])})(e,l);if(d)l===d?(a=i,t=t.slice(1)):a=d;else if(i)a=i,t=t.slice(1);else if(!s)return e;const c=a?o(a):ok.create("div");c.appendChild(e),s&&Pt.each(s,(t=>{const n=o(t);c.insertBefore(n,e)}));const m=rk(a)?a.siblings:void 0;return r(c,t,m)},s=ok.create("div");if(e.length>0){const t=e[0],n=o(t),a=rk(t)?t.siblings:void 0;s.appendChild(r(n,e.slice(1),a))}return s},ak=e=>{let t="div";const n={name:t,classes:[],attrs:{},selector:e=Pt.trim(e)};return"*"!==e&&(t=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,((e,t,o,r,s)=>{switch(t){case"#":n.attrs.id=o;break;case".":n.classes.push(o);break;case":":-1!==Pt.inArray("checked disabled enabled read-only required".split(" "),o)&&(n.attrs[o]=o)}if("["===r){const e=s.match(/([\w\-]+)(?:\=\"([^\"]+))?/);e&&(n.attrs[e[1]]=e[2])}return""}))),n.name=t||"div",n},ik=(e,t)=>{let n="",o=yd(e);if(""===o)return"";const r=e=>g(e)?e.replace(/%(\w+)/g,""):"",s=(t,n)=>ok.getStyle(null!=n?n:e.getBody(),t,!0);if(g(t)){const n=e.formatter.get(t);if(!n)return"";t=n[0]}if("preview"in t){const e=t.preview;if(!1===e)return"";o=e||o}let a,i=t.block||t.inline||"span";const l=(d=t.selector,g(d)?(d=(d=d.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),Pt.map(d.split(/(?:>|\s+(?![^\[\]]+\]))/),(e=>{const t=Pt.map(e.split(/(?:~\+|~|\+)/),ak),n=t.pop();return t.length&&(n.siblings=t),n})).reverse()):[]);var d;l.length>0?(l[0].name||(l[0].name=i),i=t.selector,a=sk(l,e)):a=sk([i],e);const c=ok.select(i,a)[0]||a.firstChild;nk(t.styles,((e,t)=>{const n=r(e);n&&ok.setStyle(c,t,n)})),nk(t.attributes,((e,t)=>{const n=r(e);n&&ok.setAttrib(c,t,n)})),nk(t.classes,(e=>{const t=r(e);ok.hasClass(c,t)||ok.addClass(c,t)})),e.dispatch("PreviewFormats"),ok.setStyles(a,{position:"absolute",left:-65535}),e.getBody().appendChild(a);const m=s("fontSize"),u=/px$/.test(m)?parseInt(m,10):0;return nk(o.split(" "),(e=>{let t=s(e,c);if(!("background-color"===e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)&&(t=s(e),"#ffffff"===eu(t).toLowerCase())||"color"===e&&"#000000"===eu(t).toLowerCase())){if("font-size"===e&&/em|%$/.test(t)){if(0===u)return;t=parseFloat(t)/(/%$/.test(t)?100:1)*u+"px"}"border"===e&&t&&(n+="padding:0 2px;"),n+=e+":"+t+";"}})),e.dispatch("AfterPreviewFormats"),ok.remove(a),n},lk=e=>{const t=tk(e),n=Ia({});return(e=>{e.addShortcut("meta+b","","Bold"),e.addShortcut("meta+i","","Italic"),e.addShortcut("meta+u","","Underline");for(let t=1;t<=6;t++)e.addShortcut("access+"+t,"",["FormatBlock",!1,"h"+t]);e.addShortcut("access+7","",["FormatBlock",!1,"p"]),e.addShortcut("access+8","",["FormatBlock",!1,"div"]),e.addShortcut("access+9","",["FormatBlock",!1,"address"])})(e),Sv(e),zw(e)||((e,t)=>{e.set({}),t.on("NodeChange",(n=>{Cy(t,n.element,e.get())})),t.on("FormatApply FormatRemove",(n=>{const o=U.from(n.node).map((e=>fu(e)?e:e.startContainer)).bind((e=>jo(e)?U.some(e):U.from(e.parentElement))).getOrThunk((()=>by(t)));Cy(t,o,e.get())}))})(n,e),{get:t.get,has:t.has,register:t.register,unregister:t.unregister,apply:(t,n,o)=>{((e,t,n,o)=>{$w(e).formatter.apply(t,n,o)})(e,t,n,o)},remove:(t,n,o,r)=>{((e,t,n,o,r)=>{$w(e).formatter.remove(t,n,o,r)})(e,t,n,o,r)},toggle:(t,n,o)=>{((e,t,n,o)=>{$w(e).formatter.toggle(t,n,o)})(e,t,n,o)},match:(t,n,o,r)=>((e,t,n,o,r)=>$w(e).formatter.match(t,n,o,r))(e,t,n,o,r),closest:t=>((e,t)=>$w(e).formatter.closest(t))(e,t),matchAll:(t,n)=>((e,t,n)=>$w(e).formatter.matchAll(t,n))(e,t,n),matchNode:(t,n,o,r)=>((e,t,n,o,r)=>$w(e).formatter.matchNode(t,n,o,r))(e,t,n,o,r),canApply:t=>((e,t)=>$w(e).formatter.canApply(t))(e,t),formatChanged:(t,o,r,s)=>((e,t,n,o,r,s)=>$w(e).formatter.formatChanged(t,n,o,r,s))(e,n,t,o,r,s),getCssText:T(ik,e)}},dk=e=>{switch(e.toLowerCase()){case"undo":case"redo":case"mcefocus":return!0;default:return!1}},ck=e=>{const t=Va(),n=Ia(0),o=Ia(0),r={data:[],typing:!1,beforeChange:()=>{((e,t,n)=>{$w(e).undoManager.beforeChange(t,n)})(e,n,t)},add:(s,a)=>((e,t,n,o,r,s,a)=>$w(e).undoManager.add(t,n,o,r,s,a))(e,r,o,n,t,s,a),dispatchChange:()=>{e.setDirty(!0);const t=Ow(e);t.bookmark=cl(e.selection),e.dispatch("change",{level:t,lastLevel:de(r.data,o.get()).getOrUndefined()})},undo:()=>((e,t,n,o)=>$w(e).undoManager.undo(t,n,o))(e,r,n,o),redo:()=>((e,t,n)=>$w(e).undoManager.redo(t,n))(e,o,r.data),clear:()=>{((e,t,n)=>{$w(e).undoManager.clear(t,n)})(e,r,o)},reset:()=>{((e,t)=>{$w(e).undoManager.reset(t)})(e,r)},hasUndo:()=>((e,t,n)=>$w(e).undoManager.hasUndo(t,n))(e,r,o),hasRedo:()=>((e,t,n)=>$w(e).undoManager.hasRedo(t,n))(e,r,o),transact:t=>((e,t,n,o)=>$w(e).undoManager.transact(t,n,o))(e,r,n,t),ignore:t=>{((e,t,n)=>{$w(e).undoManager.ignore(t,n)})(e,n,t)},extra:(t,n)=>{((e,t,n,o,r)=>{$w(e).undoManager.extra(t,n,o,r)})(e,r,o,t,n)}};return zw(e)||((e,t,n)=>{const o=Ia(!1),r=e=>{Iw(t,!1,n),t.add({},e)};e.on("init",(()=>{t.add()})),e.on("BeforeExecCommand",(e=>{const o=e.command;dk(o)||(Fw(t,n),t.beforeChange())})),e.on("ExecCommand",(e=>{const t=e.command;dk(t)||r(e)})),e.on("ObjectResizeStart cut",(()=>{t.beforeChange()})),e.on("SaveContent ObjectResized blur",r),e.on("dragend",r),e.on("keyup",(n=>{const s=n.keyCode;n.isDefaultPrevented()||((s>=33&&s<=36||s>=37&&s<=40||45===s||n.ctrlKey)&&(r(),e.nodeChanged()),46!==s&&8!==s||e.nodeChanged(),o.get()&&t.typing&&!Lw(Ow(e),t.data[0])&&(e.isDirty()||e.setDirty(!0),e.dispatch("TypingUndo"),o.set(!1),e.nodeChanged()))})),e.on("keydown",(e=>{const s=e.keyCode;if(e.isDefaultPrevented())return;if(s>=33&&s<=36||s>=37&&s<=40||45===s)return void(t.typing&&r(e));const a=e.ctrlKey&&!e.altKey||e.metaKey;!(s<16||s>20)||224===s||91===s||t.typing||a||(t.beforeChange(),Iw(t,!0,n),t.add({},e),o.set(!0))})),e.on("mousedown",(e=>{t.typing&&r(e)})),e.on("input",(e=>{var t;e.inputType&&("insertReplacementText"===e.inputType||"insertText"===(t=e).inputType&&null===t.data||(e=>"insertFromPaste"===e.inputType||"insertFromDrop"===e.inputType)(e))&&r(e)})),e.on("AddUndo Undo Redo ClearUndos",(t=>{t.isDefaultPrevented()||e.nodeChanged()}))})(e,r,n),(e=>{e.addShortcut("meta+z","","Undo"),e.addShortcut("meta+y,meta+shift+z","","Redo")})(e),r},mk=[9,27,gf.HOME,gf.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,gf.DOWN,gf.UP,gf.LEFT,gf.RIGHT].concat(Dt.browser.isFirefox()?[224]:[]),uk="data-mce-placeholder",fk=e=>"keydown"===e.type||"keyup"===e.type,gk=e=>{const t=e.keyCode;return t===gf.BACKSPACE||t===gf.DELETE},pk=e=>{var t;const n=e.dom,o=Ll(e),r=null!==(t=cd(e))&&void 0!==t?t:"",s=(t,a)=>{if((e=>{if(fk(e)){const t=e.keyCode;return!gk(e)&&(gf.metaKeyPressed(e)||e.altKey||t>=112&&t<=123||V(mk,t))}return!1})(t))return;const i=e.getBody(),l=!(e=>fk(e)&&!(gk(e)||"keyup"===e.type&&229===e.keyCode))(t)&&((e,t,n)=>{if(hs(bn.fromDom(t),!1)){const o=t.firstElementChild;return!o||!e.getStyle(t.firstElementChild,"padding-left")&&!e.getStyle(t.firstElementChild,"padding-right")&&n===o.nodeName.toLowerCase()}return!1})(n,i,o);(""!==n.getAttrib(i,uk)!==l||a)&&(n.setAttrib(i,uk,l?r:null),n.setAttrib(i,"aria-placeholder",l?r:null),((e,t)=>{e.dispatch("PlaceholderToggle",{state:t})})(e,l),e.on(l?"keydown":"keyup",s),e.off(l?"keyup":"keydown",s))};Xe(r)&&e.on("init",(t=>{s(t,!0),e.on("change SetContent ExecCommand",s),e.on("paste",(t=>Tg.setEditorTimeout(e,(()=>s(t)))))}))},hk=(e,t)=>({from:e,to:t}),bk=(e,t)=>{const n=bn.fromDom(e),o=bn.fromDom(t.container());return Kh(n,o).map((e=>((e,t)=>({block:e,position:t}))(e,t)))},vk=(e,t)=>Yn(t,(e=>Sr(e)||rr(e.dom)),(t=>wn(t,e))).filter(Wt).getOr(e),yk=(e,t,n)=>{const o=bk(e,Hi.fromRangeStart(n)),r=o.bind((n=>ym(t,e,n.position).bind((n=>bk(e,n).map((n=>((e,t,n)=>nr(n.position.getNode())&&!hs(n.block)?xm(!1,n.block.dom).bind((o=>o.isEqual(n.position)?ym(t,e,o).bind((t=>bk(e,t))):U.some(n))).getOr(n):n)(e,t,n)))))));return Mt(o,r,hk).filter((t=>(e=>!wn(e.from.block,e.to.block))(t)&&((e,t)=>{const n=bn.fromDom(e);return wn(vk(n,t.from.block),vk(n,t.to.block))})(e,t)&&(e=>!1===sr(e.from.block.dom)&&!1===sr(e.to.block.dom))(t)&&(e=>{const t=e=>wr(e)||Ss(e.dom);return t(e.from.block)&&t(e.to.block)})(t)))},Ck=e=>{const t=(e=>{const t=Bn(e);return te(t,vr).fold(A(t),(e=>t.slice(0,e)))})(e);return K(t,yo),t},wk=(e,t)=>{const n=qp(t,e);return ee(n.reverse(),(e=>hs(e))).each(yo)},xk=(e,t,n,o)=>{if(hs(n))return Or(n),Sm(n.dom);0===X(On(o),(e=>!hs(e))).length&&hs(t)&&uo(o,bn.fromTag("br"));const r=Em(n.dom,Hi.before(o.dom));return K(Ck(t),(e=>{uo(o,e)})),wk(e,t),r},kk=(e,t,n)=>{if(hs(n)){if(hs(t)){const e=e=>{const t=(e,n)=>Ln(e).fold((()=>n),(e=>yr(e)?t(e,n.concat(li(e))):n));return t(e,[])},o=Q(e(n),((e,t)=>(ho(e,t),t)),Dr());vo(t),po(t,o)}return yo(n),Sm(t.dom)}const o=_m(n.dom);return K(Ck(t),(e=>{po(n,e)})),wk(e,t),o},Ek=(e,t)=>xn(t,e)?((e,t)=>{const n=qp(t,e);return U.from(n[n.length-1])})(t,e):U.none(),Sk=(e,t)=>{xm(e,t.dom).bind((e=>U.from(e.getNode()))).map(bn.fromDom).filter(Cr).each(yo)},_k=(e,t,n)=>(Sk(!0,t),Sk(!1,n),Ek(t,n).fold(T(kk,e,t,n),T(xk,e,t,n))),Nk=(e,t,n,o)=>t?_k(e,o,n):_k(e,n,o),Rk=(e,t)=>{const n=bn.fromDom(e.getBody()),o=((e,t,n)=>n.collapsed?yk(e,t,n):U.none())(n.dom,t,e.selection.getRng()).map((o=>()=>{Nk(n,t,o.from.block,o.to.block).each((t=>{e.selection.setRng(t.toRange())}))}));return o},Ak=(e,t)=>{const n=bn.fromDom(t),o=T(wn,e);return Gn(n,Sr,o).isSome()},Dk=(e,t)=>{const n=Em(e.dom,Hi.fromRangeStart(t)).isNone(),o=km(e.dom,Hi.fromRangeEnd(t)).isNone();return!((e,t)=>Ak(e,t.startContainer)||Ak(e,t.endContainer))(e,t)&&n&&o},Ok=e=>{const t=bn.fromDom(e.getBody()),n=e.selection.getRng();return Dk(t,n)?(e=>U.some((()=>{e.setContent(""),e.selection.setCursorLocation()})))(e):((e,t)=>{const n=t.getRng();return Mt(Kh(e,bn.fromDom(n.startContainer)),Kh(e,bn.fromDom(n.endContainer)),((o,r)=>wn(o,r)?U.none():U.some((()=>{n.deleteContents(),Nk(e,!0,o,r).each((e=>{t.setRng(e.toRange())}))})))).getOr(U.none())})(t,e.selection)},Tk=(e,t)=>e.selection.isCollapsed()?U.none():Ok(e),Bk=(e,t,n,o,r)=>U.from(t._selectionOverrides.showCaret(e,n,o,r)),Pk=(e,t)=>e.dispatch("BeforeObjectSelected",{target:t}).isDefaultPrevented()?U.none():U.some((e=>{const t=e.ownerDocument.createRange();return t.selectNode(e),t})(t)),Lk=(e,t,n)=>t.collapsed?((e,t,n)=>{const o=Qc(1,e.getBody(),t),r=Hi.fromRangeStart(o),s=r.getNode();if(Rc(s))return Bk(1,e,s,!r.isAtEnd(),!1);const a=r.getNode(!0);if(Rc(a))return Bk(1,e,a,!1,!1);const i=_b(e.dom.getRoot(),r.getNode());return Rc(i)?Bk(1,e,i,!1,n):U.none()})(e,t,n).getOr(t):t,Mk=e=>Hp(e)||Fp(e),Ik=e=>$p(e)||Up(e),Fk=(e,t,n,o,r,s)=>{Bk(o,e,s.getNode(!r),r,!0).each((n=>{if(t.collapsed){const e=t.cloneRange();r?e.setEnd(n.startContainer,n.startOffset):e.setStart(n.endContainer,n.endOffset),e.deleteContents()}else t.deleteContents();e.selection.setRng(n)})),((e,t)=>{Xo(t)&&0===t.data.length&&e.remove(t)})(e.dom,n)},Uk=(e,t)=>((e,t)=>{const n=e.selection.getRng();if(!Xo(n.commonAncestorContainer))return U.none();const o=t?om.Forwards:om.Backwards,r=gm(e.getBody()),s=T(tm,t?r.next:r.prev),a=t?Mk:Ik,i=Zc(o,e.getBody(),n),l=s(i),d=l?jh(t,l):l;if(!d||!nm(i,d))return U.none();if(a(d))return U.some((()=>Fk(e,n,i.getNode(),o,t,d)));const c=s(d);return c&&a(c)&&nm(d,c)?U.some((()=>Fk(e,n,i.getNode(),o,t,c))):U.none()})(e,t),zk=(e,t)=>{const n=e.getBody();return t?Sm(n).filter(Hp):_m(n).filter($p)},jk=e=>{const t=e.selection.getRng();return!t.collapsed&&(zk(e,!0).exists((e=>e.isEqual(Hi.fromRangeStart(t))))||zk(e,!1).exists((e=>e.isEqual(Hi.fromRangeEnd(t)))))},Hk=gl([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),$k=(e,t,n,o)=>{const r=o.getNode(!t);return Kh(bn.fromDom(e),bn.fromDom(n.getNode())).map((e=>hs(e)?Hk.remove(e.dom):Hk.moveToElement(r))).orThunk((()=>U.some(Hk.moveToElement(r))))},Vk=(e,t,n)=>ym(t,e,n).bind((o=>{return r=o.getNode(),x(r)&&(Sr(bn.fromDom(r))||kr(bn.fromDom(r)))||((e,t,n,o)=>{const r=t=>yr(bn.fromDom(t))&&!Vc(n,o,e);return Jc(!t,n).fold((()=>Jc(t,o).fold(I,r)),r)})(e,t,n,o)?U.none():t&&sr(o.getNode())||!t&&sr(o.getNode(!0))?$k(e,t,n,o):t&&$p(n)||!t&&Hp(n)?U.some(Hk.moveToPosition(o)):U.none();var r})),qk=(e,t,n)=>((e,t)=>{const n=t.getNode(!e),o=e?"after":"before";return jo(n)&&n.getAttribute("data-mce-caret")===o})(t,n)?((e,t)=>w(t)?U.none():e&&sr(t.nextSibling)?U.some(Hk.moveToElement(t.nextSibling)):!e&&sr(t.previousSibling)?U.some(Hk.moveToElement(t.previousSibling)):U.none())(t,n.getNode(!t)).orThunk((()=>Vk(e,t,n))):Vk(e,t,n).bind((t=>((e,t,n)=>n.fold((e=>U.some(Hk.remove(e))),(e=>U.some(Hk.moveToElement(e))),(n=>Vc(t,n,e)?U.none():U.some(Hk.moveToPosition(n)))))(e,n,t))),Wk=(e,t)=>U.from(_b(e.getBody(),t)),Kk=(e,t)=>{const n=e.selection.getNode();return Wk(e,n).filter(sr).fold((()=>((e,t,n)=>{const o=Qc(t?1:-1,e,n),r=Hi.fromRangeStart(o),s=bn.fromDom(e);return!t&&$p(r)?U.some(Hk.remove(r.getNode(!0))):t&&Hp(r)?U.some(Hk.remove(r.getNode())):!t&&Hp(r)&&oh(s,r)?rh(s,r).map((e=>Hk.remove(e.getNode()))):t&&$p(r)&&nh(s,r)?sh(s,r).map((e=>Hk.remove(e.getNode()))):qk(e,t,r)})(e.getBody(),t,e.selection.getRng()).map((n=>()=>n.fold(((e,t)=>n=>(e._selectionOverrides.hideFakeCaret(),Mh(e,t,bn.fromDom(n)),!0))(e,t),((e,t)=>n=>{const o=t?Hi.before(n):Hi.after(n);return e.selection.setRng(o.toRange()),!0})(e,t),(e=>t=>(e.selection.setRng(t.toRange()),!0))(e))))),(()=>U.some(_)))},Gk=(e,t)=>{const n=e.selection.getNode();if(sr(n)&&!ar(n)){return Wk(e,n.parentNode).filter(sr).fold((()=>U.some((()=>{var n;n=bn.fromDom(e.getBody()),K(Mo(n,".mce-offscreen-selection"),yo),Mh(e,t,bn.fromDom(e.selection.getNode())),Gh(e)}))),(()=>U.some(_)))}return jk(e)?U.some((()=>{Xh(e,e.selection.getRng(),bn.fromDom(e.getBody()))})):U.none()},Yk=e=>{const t=e.dom,n=e.selection,o=_b(e.getBody(),n.getNode());if(rr(o)&&t.isBlock(o)&&t.isEmpty(o)){const e=t.create("br",{"data-mce-bogus":"1"});t.setHTML(o,""),o.appendChild(e),n.setRng(Hi.before(e).toRange())}return!0},Xk=(e,t)=>e.selection.isCollapsed()?Kk(e,t):Gk(e,t),Qk=(e,t)=>e.selection.isCollapsed()?((e,t)=>{const n=Hi.fromRangeStart(e.selection.getRng());return ym(t,e.getBody(),n).filter((e=>t?Mp(e):Ip(e))).bind((e=>qc(t?0:-1,e))).map((t=>()=>e.selection.select(t)))})(e,t):U.none(),Jk=Xo,Zk=e=>Jk(e)&&e.data[0]===Br,eE=e=>Jk(e)&&e.data[e.data.length-1]===Br,tE=e=>{var t;return(null!==(t=e.ownerDocument)&&void 0!==t?t:document).createTextNode(Br)},nE=(e,t)=>e?(e=>{var t;if(Jk(e.previousSibling))return eE(e.previousSibling)||e.previousSibling.appendData(Br),e.previousSibling;if(Jk(e))return Zk(e)||e.insertData(0,Br),e;{const n=tE(e);return null===(t=e.parentNode)||void 0===t||t.insertBefore(n,e),n}})(t):(e=>{var t,n;if(Jk(e.nextSibling))return Zk(e.nextSibling)||e.nextSibling.insertData(0,Br),e.nextSibling;if(Jk(e))return eE(e)||e.appendData(Br),e;{const o=tE(e);return e.nextSibling?null===(t=e.parentNode)||void 0===t||t.insertBefore(o,e.nextSibling):null===(n=e.parentNode)||void 0===n||n.appendChild(o),o}})(t),oE=T(nE,!0),rE=T(nE,!1),sE=(e,t)=>Xo(e.container())?nE(t,e.container()):nE(t,e.getNode()),aE=(e,t)=>{const n=t.get();return n&&e.container()===n&&Ur(n)},iE=(e,t)=>t.fold((t=>{wc(e.get());const n=oE(t);return e.set(n),U.some(Hi(n,n.length-1))}),(t=>Sm(t).map((t=>{if(aE(t,e)){const t=e.get();return Hi(t,1)}{wc(e.get());const n=sE(t,!0);return e.set(n),Hi(n,1)}}))),(t=>_m(t).map((t=>{if(aE(t,e)){const t=e.get();return Hi(t,t.length-1)}{wc(e.get());const n=sE(t,!1);return e.set(n),Hi(n,n.length-1)}}))),(t=>{wc(e.get());const n=rE(t);return e.set(n),U.some(Hi(n,1))})),lE=(e,t)=>{for(let n=0;n<e.length;n++){const o=e[n].apply(null,t);if(o.isSome())return o}return U.none()},dE=gl([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),cE=(e,t)=>{const n=$c(t,e);return n||e},mE=(e,t,n)=>{const o=Hh(n),r=cE(t,o.container());return zh(e,r,o).fold((()=>km(r,o).bind(T(zh,e,r)).map((e=>dE.before(e)))),U.none)},uE=(e,t)=>null===Am(e,t),fE=(e,t,n)=>zh(e,t,n).filter(T(uE,t)),gE=(e,t,n)=>{const o=$h(n);return fE(e,t,o).bind((e=>Em(e,o).isNone()?U.some(dE.start(e)):U.none()))},pE=(e,t,n)=>{const o=Hh(n);return fE(e,t,o).bind((e=>km(e,o).isNone()?U.some(dE.end(e)):U.none()))},hE=(e,t,n)=>{const o=$h(n),r=cE(t,o.container());return zh(e,r,o).fold((()=>Em(r,o).bind(T(zh,e,r)).map((e=>dE.after(e)))),U.none)},bE=e=>!Uh(yE(e)),vE=(e,t,n)=>lE([mE,gE,pE,hE],[e,t,n]).filter(bE),yE=e=>e.fold(D,D,D,D),CE=e=>e.fold(A("before"),A("start"),A("end"),A("after")),wE=e=>e.fold(dE.before,dE.before,dE.after,dE.after),xE=e=>e.fold(dE.start,dE.start,dE.end,dE.end),kE=(e,t,n,o,r,s)=>Mt(zh(t,n,o),zh(t,n,r),((t,o)=>t!==o&&((e,t,n)=>{const o=$c(t,e),r=$c(n,e);return x(o)&&o===r})(n,t,o)?dE.after(e?t:o):s)).getOr(s),EE=(e,t)=>e.fold(F,(e=>{return o=t,!(CE(n=e)===CE(o)&&yE(n)===yE(o));var n,o})),SE=(e,t)=>e?t.fold(N(U.some,dE.start),U.none,N(U.some,dE.after),U.none):t.fold(U.none,N(U.some,dE.before),U.none,N(U.some,dE.end)),_E=(e,t,n,o)=>{const r=jh(e,o),s=vE(t,n,r);return vE(t,n,r).bind(T(SE,e)).orThunk((()=>((e,t,n,o,r)=>{const s=jh(e,r);return ym(e,n,s).map(T(jh,e)).fold((()=>o.map(wE)),(r=>vE(t,n,r).map(T(kE,e,t,n,s,r)).filter(T(EE,o)))).filter(bE)})(e,t,n,s,o)))},NE=(e,t,n)=>{const o=e?1:-1;return t.setRng(Hi(n.container(),n.offset()+o).toRange()),t.getSel().modify("move",e?"forward":"backward","word"),!0},RE=(e,t)=>{const n=t.selection.getRng(),o=e?Hi.fromRangeEnd(n):Hi.fromRangeStart(n);return!!(e=>k(e.selection.getSel().modify))(t)&&(e&&Hr(o)?NE(!0,t.selection,o):!(e||!$r(o))&&NE(!1,t.selection,o))};var AE;!function(e){e[e.Br=0]="Br",e[e.Block=1]="Block",e[e.Wrap=2]="Wrap",e[e.Eol=3]="Eol"}(AE||(AE={}));const DE=(e,t)=>e===om.Backwards?se(t):t,OE=(e,t,n)=>e===om.Forwards?t.next(n):t.prev(n),TE=(e,t,n,o)=>nr(o.getNode(t===om.Forwards))?AE.Br:!1===Vc(n,o)?AE.Block:AE.Wrap,BE=(e,t,n,o)=>{const r=gm(n);let s=o;const a=[];for(;s;){const n=OE(t,r,s);if(!n)break;if(nr(n.getNode(!1)))return t===om.Forwards?{positions:DE(t,a).concat([n]),breakType:AE.Br,breakAt:U.some(n)}:{positions:DE(t,a),breakType:AE.Br,breakAt:U.some(n)};if(n.isVisible()){if(e(s,n)){const e=TE(0,t,s,n);return{positions:DE(t,a),breakType:e,breakAt:U.some(n)}}a.push(n),s=n}else s=n}return{positions:DE(t,a),breakType:AE.Eol,breakAt:U.none()}},PE=(e,t,n,o)=>t(n,o).breakAt.map((o=>{const r=t(n,o).positions;return e===om.Backwards?r.concat(o):[o].concat(r)})).getOr([]),LE=(e,t)=>J(e,((e,n)=>e.fold((()=>U.some(n)),(o=>Mt(ce(o.getClientRects()),ce(n.getClientRects()),((e,r)=>{const s=Math.abs(t-e.left);return Math.abs(t-r.left)<=s?n:o})).or(e)))),U.none()),ME=(e,t)=>ce(t.getClientRects()).bind((t=>LE(e,t.left))),IE=T(BE,Hi.isAbove,-1),FE=T(BE,Hi.isBelow,1),UE=T(PE,-1,IE),zE=T(PE,1,FE),jE=(e,t)=>ME(UE(e,t),t),HE=(e,t)=>ME(zE(e,t),t),$E=sr,VE=(e,t)=>Math.abs(e.left-t),qE=(e,t)=>Math.abs(e.right-t),WE=(e,t)=>Be(e,((e,n)=>{const o=Math.min(VE(e,t),qE(e,t)),r=Math.min(VE(n,t),qE(n,t));return r===o&&_e(n,"node")&&$E(n.node)||r<o?n:e})),KE=e=>{const t=t=>W(t,(t=>{const n=gi(t);return n.node=e,n}));if(jo(e))return t(e.getClientRects());if(Xo(e)){const n=e.ownerDocument.createRange();return n.setStart(e,0),n.setEnd(e,e.data.length),t(n.getClientRects())}return[]},GE=e=>oe(e,KE);var YE;!function(e){e[e.Up=-1]="Up",e[e.Down=1]="Down"}(YE||(YE={}));const XE=(e,t,n,o,r,s)=>{let a=0;const i=[],l=o=>{let s=GE([o]);-1===e&&(s=s.reverse());for(let e=0;e<s.length;e++){const o=s[e];if(!n(o,d)){if(i.length>0&&t(o,Le(i))&&a++,o.line=a,r(o))return!0;i.push(o)}}return!1},d=Le(s.getClientRects());if(!d)return i;const c=s.getNode();return c&&(l(c),((e,t,n,o)=>{let r=o;for(;r=Hc(r,e,rs,t);)if(n(r))return})(e,o,l,c)),i},QE=T(XE,YE.Up,bi,vi),JE=T(XE,YE.Down,vi,bi),ZE=e=>Le(e.getClientRects()),eS=e=>t=>((e,t)=>t.line>e)(e,t),tS=e=>t=>((e,t)=>t.line===e)(e,t),nS=(e,t)=>{e.selection.setRng(t),vg(e,e.selection.getRng())},oS=(e,t,n)=>U.some(Lk(e,t,n)),rS=(e,t,n,o,r,s)=>{const a=t===om.Forwards,i=gm(e.getBody()),l=T(tm,a?i.next:i.prev),d=a?o:r;if(!n.collapsed){const o=Ci(n);if(s(o))return Bk(t,e,o,t===om.Backwards,!1);if(jk(e)){const e=n.cloneRange();return e.collapse(t===om.Backwards),U.from(e)}}const c=Zc(t,e.getBody(),n);if(d(c))return Pk(e,c.getNode(!a));let m=l(c);const u=Kr(n);if(!m)return u?U.some(n):U.none();if(m=jh(a,m),d(m))return Bk(t,e,m.getNode(!a),a,!1);const f=l(m);return f&&d(f)&&nm(m,f)?Bk(t,e,f.getNode(!a),a,!1):u?oS(e,m.toRange(),!1):U.none()},sS=(e,t,n,o,r,s)=>{const a=Zc(t,e.getBody(),n),i=Le(a.getClientRects()),l=t===YE.Down,d=e.getBody();if(!i)return U.none();if(jk(e)){const e=l?Hi.fromRangeEnd(n):Hi.fromRangeStart(n);return(l?HE:jE)(d,e).orThunk((()=>U.from(e))).map((e=>e.toRange()))}const c=(l?JE:QE)(d,eS(1),a),m=X(c,tS(1)),u=i.left,f=WE(m,u);if(f&&s(f.node)){const n=Math.abs(u-f.left),o=Math.abs(u-f.right);return Bk(t,e,f.node,n<o,!1)}let g;if(g=o(a)?a.getNode():r(a)?a.getNode(!0):Ci(n),g){const n=((e,t,n,o)=>{const r=gm(t);let s,a,i,l;const d=[];let c=0;1===e?(s=r.next,a=vi,i=bi,l=Hi.after(o)):(s=r.prev,a=bi,i=vi,l=Hi.before(o));const m=ZE(l);do{if(!l.isVisible())continue;const e=ZE(l);if(i(e,m))continue;d.length>0&&a(e,Le(d))&&c++;const t=gi(e);if(t.position=l,t.line=c,n(t))return d;d.push(t)}while(l=s(l));return d})(t,d,eS(1),g);let o=WE(X(n,tS(1)),u);if(o)return oS(e,o.position.toRange(),!1);if(o=Le(X(n,tS(0))),o)return oS(e,o.position.toRange(),!1)}return 0===m.length?aS(e,l).filter(l?r:o).map((t=>Lk(e,t.toRange(),!1))):U.none()},aS=(e,t)=>{const n=e.selection.getRng(),o=t?Hi.fromRangeEnd(n):Hi.fromRangeStart(n),r=(s=o.container(),a=e.getBody(),Gn(bn.fromDom(s),(e=>Dc(e.dom)),(e=>e.dom===a)).map((e=>e.dom)).getOr(a));var s,a;if(t){const e=FE(r,o);return me(e.positions)}{const e=IE(r,o);return ce(e.positions)}},iS=(e,t,n)=>aS(e,t).filter(n).exists((t=>(e.selection.setRng(t.toRange()),!0))),lS=(e,t)=>{const n=e.dom.createRng();n.setStart(t.container(),t.offset()),n.setEnd(t.container(),t.offset()),e.selection.setRng(n)},dS=(e,t)=>{e?t.setAttribute("data-mce-selected","inline-boundary"):t.removeAttribute("data-mce-selected")},cS=(e,t,n)=>iE(t,n).map((t=>(lS(e,t),n))),mS=(e,t,n)=>{const o=e.getBody(),r=((e,t,n)=>{const o=Hi.fromRangeStart(e);if(e.collapsed)return o;{const r=Hi.fromRangeEnd(e);return n?Em(t,r).getOr(r):km(t,o).getOr(o)}})(e.selection.getRng(),o,n),s=T(Fh,e);return _E(n,s,o,r).bind((n=>cS(e,t,n)))},uS=(e,t)=>{const n=t.get();if(e.selection.isCollapsed()&&!e.composing&&n){const o=Hi.fromRangeStart(e.selection.getRng());Hi.isTextPosition(o)&&!(e=>Hr(e)||$r(e))(o)&&(lS(e,Cc(n,o)),t.set(null))}},fS=(e,t,n)=>!!bd(e)&&mS(e,t,n).isSome(),gS=(e,t,n)=>!!bd(t)&&RE(e,t),pS=e=>{const t=Ia(null),n=T(Fh,e);return e.on("NodeChange",(o=>{bd(e)&&(((e,t,n)=>{const o=W(Mo(bn.fromDom(t.getRoot()),'*[data-mce-selected="inline-boundary"]'),(e=>e.dom)),r=X(o,e),s=X(n,e);K(ae(r,s),T(dS,!1)),K(ae(s,r),T(dS,!0))})(n,e.dom,o.parents),uS(e,t),((e,t,n,o)=>{if(t.selection.isCollapsed()){const r=X(o,e);K(r,(o=>{const r=Hi.fromRangeStart(t.selection.getRng());vE(e,t.getBody(),r).bind((e=>cS(t,n,e)))}))}})(n,e,t,o.parents))})),t},hS=T(gS,!0),bS=T(gS,!1),vS=(e,t,n)=>{if(bd(e)){const o=aS(e,t).getOrThunk((()=>{const n=e.selection.getRng();return t?Hi.fromRangeEnd(n):Hi.fromRangeStart(n)}));return vE(T(Fh,e),e.getBody(),o).exists((t=>{const o=wE(t);return iE(n,o).exists((t=>(lS(e,t),!0)))}))}return!1},yS=(e,t)=>n=>iE(t,n).map((t=>()=>lS(e,t))),CS=(e,t,n,o)=>{const r=e.getBody(),s=T(Fh,e);e.undoManager.ignore((()=>{e.selection.setRng(((e,t)=>{const n=document.createRange();return n.setStart(e.container(),e.offset()),n.setEnd(t.container(),t.offset()),n})(n,o)),qh(e),vE(s,r,Hi.fromRangeStart(e.selection.getRng())).map(xE).bind(yS(e,t)).each(M)})),e.nodeChanged()},wS=(e,t,n,o)=>{const r=((e,t)=>$c(t,e)||e)(e.getBody(),o.container()),s=T(Fh,e),a=vE(s,r,o);return a.bind((e=>n?e.fold(A(U.some(xE(e))),U.none,A(U.some(wE(e))),U.none):e.fold(U.none,A(U.some(wE(e))),U.none,A(U.some(xE(e)))))).map(yS(e,t)).getOrThunk((()=>{const i=Cm(n,r,o),l=i.bind((e=>vE(s,r,e)));return Mt(a,l,(()=>zh(s,r,o).bind((t=>(e=>Mt(Sm(e),_m(e),((t,n)=>{const o=jh(!0,t),r=jh(!1,n);return km(e,o).forall((e=>e.isEqual(r)))})).getOr(!0))(t)?U.some((()=>{Mh(e,n,bn.fromDom(t))})):U.none())))).getOrThunk((()=>l.bind((()=>i.map((r=>()=>{n?CS(e,t,o,r):CS(e,t,r,o)}))))))}))},xS=(e,t,n)=>{if(e.selection.isCollapsed()&&bd(e)){const o=Hi.fromRangeStart(e.selection.getRng());return wS(e,t,n,o)}return U.none()},kS=(e,t)=>{const n=bn.fromDom(e.getBody()),o=bn.fromDom(e.selection.getStart()),r=qp(o,n);return te(r,t).fold(A(r),(e=>r.slice(0,e)))},ES=e=>kS(e,(e=>vr(e)||(e=>In(e)>1)(e))),SS=(e,t)=>{const n=T(Rv,e);return oe(t,(e=>n(e)?[e.dom]:[]))},_S=e=>{const t=(e=>kS(e,vr))(e);return SS(e,t)},NS=(e,t)=>{const n=ES(e);return me(n).bind((o=>{const r=Hi.fromRangeStart(e.selection.getRng());return((e,t,n)=>Mt(Sm(n),_m(n),((o,r)=>{const s=jh(!0,o),a=jh(!1,r),i=jh(!1,t);return e?km(n,i).exists((e=>e.isEqual(a)&&t.isEqual(s))):Em(n,i).exists((e=>e.isEqual(s)&&t.isEqual(a)))})).getOr(!0))(t,r,o.dom)&&!Av(o)?U.some((()=>((e,t,n,o)=>{const r=SS(t,o);if(0===r.length)Mh(t,e,n);else{const e=Nv(n.dom,r);t.selection.setRng(e.toRange())}})(t,e,o,n))):U.none()}))},RS=(e,t)=>{const n=e.selection.getStart(),o=((e,t)=>{const n=t.parentElement;return nr(t)&&!v(n)&&e.dom.isEmpty(n)})(e,n)||(r=n,Av(bn.fromDom(r)))?Nv(n,t):((e,t)=>{const{caretContainer:n,caretPosition:o}=_v(t);return e.selection.getRng().insertNode(n.dom),o})(e,t);var r;e.selection.setRng(o.toRange())},AS=e=>Xo(e.startContainer),DS=e=>(e=>{const t=e.startContainer.parentNode,n=e.endContainer.parentNode;return!v(t)&&!v(n)&&t.isEqualNode(n)})(e)&&(e=>{const t=e.endContainer;return e.endOffset===(Xo(t)?t.length:t.childNodes.length)})(e),OS=e=>{const t=e.selection.getRng();return(e=>0===e.startOffset&&AS(e))(t)&&((e,t)=>{const n=t.startContainer.parentElement;return!v(n)&&Rv(e,bn.fromDom(n))})(e,t)&&(e=>DS(e)||(e=>!e.endContainer.isEqualNode(e.commonAncestorContainer))(e))(t)},TS=e=>{if(OS(e)){const t=_S(e);return U.some((()=>{qh(e),((e,t)=>{const n=ae(t,_S(e));n.length>0&&RS(e,n)})(e,t)}))}return U.none()},BS=(e,t)=>e.selection.isCollapsed()?NS(e,t):TS(e),PS=e=>((e,t,n)=>Gn(e,t,n).isSome())(e,(e=>Rm(e.dom)),vr),LS=e=>{const t=e.selection.getRng();return t.collapsed&&(AS(t)||e.dom.isEmpty(t.startContainer))&&!(e=>PS(bn.fromDom(e.selection.getStart())))(e)},MS=e=>(LS(e)&&RS(e,[]),!0),IS=(e,t,n)=>x(n)?U.some((()=>{e._selectionOverrides.hideFakeCaret(),Mh(e,t,bn.fromDom(n))})):U.none(),FS=(e,t)=>e.selection.isCollapsed()?((e,t)=>{const n=t?Fp:Up,o=t?om.Forwards:om.Backwards,r=Zc(o,e.getBody(),e.selection.getRng());return n(r)?IS(e,t,r.getNode(!t)):U.from(jh(t,r)).filter((e=>n(e)&&nm(r,e))).bind((n=>IS(e,t,n.getNode(!t))))})(e,t):((e,t)=>{const n=e.selection.getNode();return lr(n)?IS(e,t,n):U.none()})(e,t),US=e=>Je(null!=e?e:"").getOr(0),zS=(e,t)=>(e||"table"===$t(t)?"margin":"padding")+("rtl"===ao(t,"direction")?"-right":"-left"),jS=e=>{const t=$S(e);return!e.mode.isReadOnly()&&(t.length>1||((e,t)=>re(t,(t=>{const n=zS(td(e),t),o=lo(t,n).map(US).getOr(0);return"false"!==e.dom.getContentEditable(t.dom)&&o>0})))(e,t))},HS=e=>xr(e)||kr(e),$S=e=>X(wo(e.selection.getSelectedBlocks()),(e=>!HS(e)&&!(e=>_n(e).exists(HS))(e)&&Yn(e,(e=>rr(e.dom)||sr(e.dom))).exists((e=>rr(e.dom))))),VS=(e,t)=>{var n,o;const{dom:r}=e,s=nd(e),a=null!==(o=null===(n=/[a-z%]+$/i.exec(s))||void 0===n?void 0:n[0])&&void 0!==o?o:"px",i=US(s),l=td(e);K($S(e),(e=>{((e,t,n,o,r,s)=>{const a=zS(n,bn.fromDom(s)),i=US(e.getStyle(s,a));if("outdent"===t){const t=Math.max(0,i-o);e.setStyle(s,a,t?t+r:"")}else{const t=i+o+r;e.setStyle(s,a,t)}})(r,t,l,i,a,e.dom)}))},qS=e=>VS(e,"outdent"),WS=e=>{if(e.selection.isCollapsed()&&jS(e)){const t=e.dom,n=e.selection.getRng(),o=Hi.fromRangeStart(n),r=t.getParent(n.startContainer,t.isBlock);if(null!==r&&Xp(bn.fromDom(r),o))return U.some((()=>qS(e)))}return U.none()},KS=(e,t,n)=>fe([WS,Xk,Uk,(e,n)=>xS(e,t,n),Rk,Sb,Qk,FS,Tk,BS],(t=>t(e,n))).filter((t=>e.selection.isEditable())),GS=(e,t)=>{KS(e,t,!0).fold((()=>(e=>Vh(e,"ForwardDelete"))(e)),M)},YS=(e,t)=>{e.addCommand("delete",(()=>{((e,t)=>{KS(e,t,!1).fold((()=>{qh(e),Gh(e)}),M)})(e,t)})),e.addCommand("forwardDelete",(()=>{GS(e,t)}))},XS=e=>void 0===e.touches||1!==e.touches.length?U.none():U.some(e.touches[0]),QS=e=>{const t=Va(),n=Ia(!1),o=Wa((t=>{e.dispatch("longpress",{...t,type:"longpress"}),n.set(!0)}),400);e.on("touchstart",(e=>{XS(e).each((r=>{o.cancel();const s={x:r.clientX,y:r.clientY,target:e.target};o.throttle(e),n.set(!1),t.set(s)}))}),!0),e.on("touchmove",(r=>{o.cancel(),XS(r).each((o=>{t.on((r=>{((e,t)=>{const n=Math.abs(e.clientX-t.x),o=Math.abs(e.clientY-t.y);return n>5||o>5})(o,r)&&(t.clear(),n.set(!1),e.dispatch("longpresscancel"))}))}))}),!0),e.on("touchend touchcancel",(r=>{o.cancel(),"touchcancel"!==r.type&&t.get().filter((e=>e.target.isEqualNode(r.target))).each((()=>{n.get()?r.preventDefault():e.dispatch("tap",{...r,type:"tap"})}))}),!0)},JS=(e,t)=>Se(e,t.nodeName),ZS=(e,t)=>!!Xo(t)||!!jo(t)&&(!JS(e.getBlockElements(),t)&&!Hm(t)&&!Rs(e,t)),e_=(e,t)=>{if(Xo(t)){if(0===t.data.length)return!0;if(/^\s+$/.test(t.data)&&(!t.nextSibling||JS(e,t.nextSibling)))return!0}return!1},t_=e=>e.dom.create(Ll(e),Ml(e)),n_=e=>{const t=e.dom,n=e.selection,o=e.schema,r=o.getBlockElements(),s=n.getStart(),a=e.getBody();let i,l,d=!1;const c=Ll(e);if(!s||!jo(s))return;const m=a.nodeName.toLowerCase();if(!o.isValidChild(m,c.toLowerCase())||((e,t,n)=>q(Vp(bn.fromDom(n),bn.fromDom(t)),(t=>JS(e,t.dom))))(r,a,s))return;const u=n.getRng(),{startContainer:f,startOffset:g,endContainer:p,endOffset:h}=u,b=qg(e);let v=a.firstChild;for(;v;)if(jo(v)&&Es(o,v),ZS(o,v)){if(e_(r,v)){l=v,v=v.nextSibling,t.remove(l);continue}i||(i=t_(e),a.insertBefore(i,v),d=!0),l=v,v=v.nextSibling,i.appendChild(l)}else i=null,v=v.nextSibling;d&&b&&(u.setStart(f,g),u.setEnd(p,h),n.setRng(u),e.nodeChanged())},o_=(e,t,n)=>{const o=bn.fromDom(t_(e)),r=Dr();po(o,r),n(t,o);const s=document.createRange();return s.setStartBefore(r.dom),s.setEndBefore(r.dom),s},r_=e=>t=>-1!==(" "+t.attr("class")+" ").indexOf(e),s_=(e,t,n)=>function(o){const r=arguments,s=r[r.length-2],a=s>0?t.charAt(s-1):"";if('"'===a)return o;if(">"===a){const e=t.lastIndexOf("<",s);if(-1!==e){if(-1!==t.substring(e,s).indexOf('contenteditable="false"'))return o}}return'<span class="'+n+'" data-mce-content="'+e.dom.encode(r[0])+'">'+e.dom.encode("string"==typeof r[1]?r[1]:r[0])+"</span>"},a_=e=>{const t="contenteditable",n=" "+Pt.trim(sc(e))+" ",o=" "+Pt.trim(rc(e))+" ",r=r_(n),s=r_(o),a=ac(e);a.length>0&&e.on("BeforeSetContent",(t=>{((e,t,n)=>{let o=t.length,r=n.content;if("raw"!==n.format){for(;o--;)r=r.replace(t[o],s_(e,r,rc(e)));n.content=r}})(e,a,t)})),e.parser.addAttributeFilter("class",(e=>{let n=e.length;for(;n--;){const o=e[n];r(o)?o.attr(t,"true"):s(o)&&o.attr(t,"false")}})),e.serializer.addAttributeFilter(t,(e=>{let n=e.length;for(;n--;){const o=e[n];(r(o)||s(o))&&(a.length>0&&o.attr("data-mce-content")?(o.name="#text",o.type=3,o.raw=!0,o.value=o.attr("data-mce-content")):o.attr(t,null))}}))},i_=(e,t)=>{t.hasAttribute("data-mce-caret")&&(Wr(t),e.selection.setRng(e.selection.getRng()),e.selection.scrollIntoView(t))},l_=(e,t)=>{const n=(e=>Jn(bn.fromDom(e.getBody()),"*[data-mce-caret]").map((e=>e.dom)).getOrNull())(e);if(n)return"compositionstart"===t.type?(t.preventDefault(),t.stopPropagation(),void i_(e,n)):void(jr(n)&&(i_(e,n),e.undoManager.add()))},d_=sr,c_=(e,t,n)=>{const o=gm(e.getBody()),r=T(tm,1===t?o.next:o.prev);if(n.collapsed){const o=e.dom.getParent(n.startContainer,"PRE");if(!o)return;if(!r(Hi.fromRangeStart(n))){const n=bn.fromDom((e=>{const t=e.dom.create(Ll(e));return t.innerHTML='<br data-mce-bogus="1">',t})(e));1===t?fo(bn.fromDom(o),n):uo(bn.fromDom(o),n),e.selection.select(n.dom,!0),e.selection.collapse()}}},m_=(e,t)=>{const n=t?om.Forwards:om.Backwards,o=e.selection.getRng();return((e,t,n)=>rS(t,e,n,Hp,$p,d_))(n,e,o).orThunk((()=>(c_(e,n,o),U.none())))},u_=(e,t)=>{const n=t?1:-1,o=e.selection.getRng();return((e,t,n)=>sS(t,e,n,(e=>Hp(e)||zp(e)),(e=>$p(e)||jp(e)),d_))(n,e,o).orThunk((()=>(c_(e,n,o),U.none())))},f_=(e,t)=>m_(e,t).exists((t=>(nS(e,t),!0))),g_=(e,t)=>u_(e,t).exists((t=>(nS(e,t),!0))),p_=(e,t)=>iS(e,t,t?$p:Hp),h_=(e,t)=>zk(e,!t).map((n=>{const o=n.toRange(),r=e.selection.getRng();return t?o.setStart(r.startContainer,r.startOffset):o.setEnd(r.endContainer,r.endOffset),o})).exists((t=>(nS(e,t),!0))),b_=e=>V(["figcaption"],$t(e)),v_=(e,t,n)=>t?((e,t)=>FE(e,t).breakAt.isNone())(e.dom,n):((e,t)=>IE(e,t).breakAt.isNone())(e.dom,n),y_=(e,t)=>{const n=bn.fromDom(e.getBody()),o=Hi.fromRangeStart(e.selection.getRng());return((e,t)=>{const n=T(wn,t);return Yn(bn.fromDom(e.container()),vr,n).filter(b_)})(o,n).exists((()=>{if(v_(n,t,o)){const o=o_(e,n,t?po:go);return e.selection.setRng(o),!0}return!1}))},C_=(e,t)=>!!e.selection.isCollapsed()&&y_(e,t),w_={shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0},x_=(e,t)=>t.keyCode===e.keyCode&&t.shiftKey===e.shiftKey&&t.altKey===e.altKey&&t.ctrlKey===e.ctrlKey&&t.metaKey===e.metaKey,k_=(e,t)=>oe((e=>W(e,(e=>({...w_,...e}))))(e),(e=>x_(e,t)?[e]:[])),E_=(e,t)=>oe((e=>W(e,(e=>({...w_,...e}))))(e),(e=>x_(e,t)?[e]:[])),S_=(e,...t)=>()=>e.apply(null,t),__=(e,t)=>ee(k_(e,t),(e=>e.action())),N_=(e,t)=>fe(E_(e,t),(e=>e.action())),R_=(e,t)=>{const n=t?om.Forwards:om.Backwards,o=e.selection.getRng();return rS(e,n,o,Fp,Up,lr).exists((t=>(nS(e,t),!0)))},A_=(e,t)=>{const n=t?1:-1,o=e.selection.getRng();return sS(e,n,o,Fp,Up,lr).exists((t=>(nS(e,t),!0)))},D_=(e,t)=>iS(e,t,t?Up:Fp),O_=gl([{none:["current"]},{first:["current"]},{middle:["current","target"]},{last:["current"]}]),T_={...O_,none:e=>O_.none(e)},B_=(e,t,n)=>oe(Bn(e),(e=>yn(e,t)?n(e)?[e]:[]:B_(e,t,n))),P_=(e,t)=>((e,t,n=I)=>n(t)?U.none():V(e,$t(t))?U.some(t):Qn(t,e.join(","),(e=>yn(e,"table")||n(e))))(["td","th"],e,t),L_=e=>B_(e,"th,td",F),M_=(e,t)=>Zn(e,"table",t),I_=(e,t,n,o,r=F)=>{const s=1===o;if(!s&&n<=0)return T_.first(e[0]);if(s&&n>=e.length-1)return T_.last(e[e.length-1]);{const s=n+o,a=e[s];return r(a)?T_.middle(t,a):I_(e,t,s,o,r)}},F_=(e,t)=>M_(e,t).bind((t=>{const n=L_(t);return te(n,(t=>wn(e,t))).map((e=>({index:e,all:n})))})),U_=(e,t,n,o,r)=>{const s=Mo(bn.fromDom(n),"td,th,caption").map((e=>e.dom)),a=X(((e,t)=>oe(t,(t=>{const n=((e,t)=>({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}))(gi(t.getBoundingClientRect()),-1);return[{x:n.left,y:e(n),cell:t},{x:n.right,y:e(n),cell:t}]})))(e,s),(e=>t(e,r)));return((e,t,n)=>J(e,((e,o)=>e.fold((()=>U.some(o)),(e=>{const r=Math.sqrt(Math.abs(e.x-t)+Math.abs(e.y-n)),s=Math.sqrt(Math.abs(o.x-t)+Math.abs(o.y-n));return U.some(s<r?o:e)}))),U.none()))(a,o,r).map((e=>e.cell))},z_=T(U_,(e=>e.bottom),((e,t)=>e.y<t)),j_=T(U_,(e=>e.top),((e,t)=>e.y>t)),H_=(e,t)=>ce(t.getClientRects()).bind((t=>z_(e,t.left,t.top))).bind((e=>{return ME(_m(n=e).map((e=>IE(n,e).positions.concat(e))).getOr([]),t);var n})),$_=(e,t)=>me(t.getClientRects()).bind((t=>j_(e,t.left,t.top))).bind((e=>{return ME(Sm(n=e).map((e=>[e].concat(FE(n,e).positions))).getOr([]),t);var n})),V_=(e,t,n)=>{const o=e(t,n);return(e=>e.breakType===AE.Wrap&&0===e.positions.length)(o)||!nr(n.getNode())&&(e=>e.breakType===AE.Br&&1===e.positions.length)(o)?!((e,t,n)=>n.breakAt.exists((n=>e(t,n).breakAt.isSome())))(e,t,o):o.breakAt.isNone()},q_=T(V_,IE),W_=T(V_,FE),K_=(e,t,n,o)=>{const r=e.selection.getRng(),s=t?1:-1;return!(!Nc()||!((e,t,n)=>{const o=Hi.fromRangeStart(t);return xm(!e,n).exists((e=>e.isEqual(o)))})(t,r,n))&&(Bk(s,e,n,!t,!1).each((t=>{nS(e,t)})),!0)},G_=(e,t)=>{const n=t.getNode(e);return Ko(n)?U.some(n):U.none()},Y_=(e,t,n)=>{const o=G_(!!t,n),r=!1===t;o.fold((()=>nS(e,n.toRange())),(o=>xm(r,e.getBody()).filter((e=>e.isEqual(n))).fold((()=>nS(e,n.toRange())),(n=>((e,t,n)=>{t.undoManager.transact((()=>{const o=e?fo:uo,r=o_(t,bn.fromDom(n),o);nS(t,r)}))})(t,e,o)))))},X_=(e,t,n,o)=>{const r=e.selection.getRng(),s=Hi.fromRangeStart(r),a=e.getBody();if(!t&&q_(o,s)){const o=((e,t,n)=>H_(t,n).orThunk((()=>ce(n.getClientRects()).bind((n=>LE(UE(e,Hi.before(t)),n.left))))).getOr(Hi.before(t)))(a,n,s);return Y_(e,t,o),!0}if(t&&W_(o,s)){const o=((e,t,n)=>$_(t,n).orThunk((()=>ce(n.getClientRects()).bind((n=>LE(zE(e,Hi.after(t)),n.left))))).getOr(Hi.after(t)))(a,n,s);return Y_(e,t,o),!0}return!1},Q_=(e,t,n)=>U.from(e.dom.getParent(e.selection.getNode(),"td,th")).bind((o=>U.from(e.dom.getParent(o,"table")).map((r=>n(e,t,r,o))))).getOr(!1),J_=(e,t)=>Q_(e,t,K_),Z_=(e,t)=>Q_(e,t,X_),eN=(e,t,n)=>n.fold(U.none,U.none,((e,t)=>op(t).map((e=>(e=>{const t=Tf.exact(e,0,e,0);return If(t)})(e)))),(n=>(e.execCommand("mceTableInsertRowAfter"),tN(e,t,n)))),tN=(e,t,n)=>eN(e,t,((e,t,n)=>F_(e,n).fold((()=>T_.none(e)),(n=>I_(n.all,e,n.index,1,t))))(n,eo)),nN=(e,t,n)=>eN(e,t,((e,t,n)=>F_(e,n).fold((()=>T_.none()),(n=>I_(n.all,e,n.index,-1,t))))(n,eo)),oN=(e,t)=>{const n=["table","li","dl"],o=bn.fromDom(e.getBody()),r=e=>{const t=$t(e);return wn(e,o)||V(n,t)},s=e.selection.getRng(),a=bn.fromDom(t?s.endContainer:s.startContainer);return P_(a,r).map((n=>{M_(n,r).each((t=>{e.model.table.clearSelectedCells(t.dom)})),e.selection.collapse(!t);return(t?tN:nN)(e,r,n).each((t=>{e.selection.setRng(t)})),!0})).getOr(!1)},rN=(e,t)=>{e.on("keydown",(n=>{n.isDefaultPrevented()||((e,t,n)=>{const o=Dt.os.isMacOS()||Dt.os.isiOS();__([{keyCode:gf.RIGHT,action:S_(f_,e,!0)},{keyCode:gf.LEFT,action:S_(f_,e,!1)},{keyCode:gf.UP,action:S_(g_,e,!1)},{keyCode:gf.DOWN,action:S_(g_,e,!0)},...o?[{keyCode:gf.UP,action:S_(h_,e,!1),metaKey:!0,shiftKey:!0},{keyCode:gf.DOWN,action:S_(h_,e,!0),metaKey:!0,shiftKey:!0}]:[],{keyCode:gf.RIGHT,action:S_(J_,e,!0)},{keyCode:gf.LEFT,action:S_(J_,e,!1)},{keyCode:gf.UP,action:S_(Z_,e,!1)},{keyCode:gf.DOWN,action:S_(Z_,e,!0)},{keyCode:gf.RIGHT,action:S_(R_,e,!0)},{keyCode:gf.LEFT,action:S_(R_,e,!1)},{keyCode:gf.UP,action:S_(A_,e,!1)},{keyCode:gf.DOWN,action:S_(A_,e,!0)},{keyCode:gf.RIGHT,action:S_(fS,e,t,!0)},{keyCode:gf.LEFT,action:S_(fS,e,t,!1)},{keyCode:gf.RIGHT,ctrlKey:!o,altKey:o,action:S_(hS,e,t)},{keyCode:gf.LEFT,ctrlKey:!o,altKey:o,action:S_(bS,e,t)},{keyCode:gf.UP,action:S_(C_,e,!1)},{keyCode:gf.DOWN,action:S_(C_,e,!0)}],n).each((e=>{n.preventDefault()}))})(e,t,n)}))},sN=(e,t)=>({container:e,offset:t}),aN=Pa.DOM,iN=e=>t=>e===t?-1:0,lN=(e,t,n)=>{if(Xo(e)&&t>=0)return U.some(sN(e,t));{const o=ui(aN);return U.from(o.backwards(e,t,iN(e),n)).map((e=>sN(e.container,e.container.data.length)))}},dN=(e,t,n)=>{if(!Xo(e))return U.none();const o=e.data;if(t>=0&&t<=o.length)return U.some(sN(e,t));{const o=ui(aN);return U.from(o.backwards(e,t,iN(e),n)).bind((e=>{const o=e.container.data;return dN(e.container,t+o.length,n)}))}},cN=(e,t,n)=>{if(!Xo(e))return U.none();const o=e.data;if(t<=o.length)return U.some(sN(e,t));{const r=ui(aN);return U.from(r.forwards(e,t,iN(e),n)).bind((e=>cN(e.container,t-o.length,n)))}},mN=(e,t,n,o,r)=>{const s=ui(e,(e=>t=>e.isBlock(t)||V(["BR","IMG","HR","INPUT"],t.nodeName)||"false"===e.getContentEditable(t))(e));return U.from(s.backwards(t,n,o,r))},uN=e=>Lr(e.toString().replace(/\u00A0/g," ")),fN=e=>""!==e&&-1!==" \f\n\r\t\v".indexOf(e),gN=(e,t)=>e.substring(t.length),pN=(e,t,n,o=0)=>{if(!(r=t).collapsed||!Xo(r.startContainer))return U.none();var r;const s={text:"",offset:0},a=e.getParent(t.startContainer,e.isBlock)||e.getRoot();return mN(e,t.startContainer,t.startOffset,((e,t,o)=>(s.text=o+s.text,s.offset+=t,((e,t,n)=>{let o;const r=n.charAt(0);for(o=t-1;o>=0;o--){const s=e.charAt(o);if(fN(s))return U.none();if(r===s&&$e(e,n,o,t))break}return U.some(o)})(s.text,s.offset,n).getOr(t))),a).bind((e=>{const r=t.cloneRange();if(r.setStart(e.container,e.offset),r.setEnd(t.endContainer,t.endOffset),r.collapsed)return U.none();const s=uN(r);return 0!==s.lastIndexOf(n)||gN(s,n).length<o?U.none():U.some({text:gN(s,n),range:r,trigger:n})}))},hN=(e,t,n,o=0)=>{return(r=bn.fromDom(t.startContainer),Zn(r,sp)).fold((()=>pN(e,t,n,o)),(t=>{const o=e.createRng();o.selectNode(t.dom);const r=uN(o);return U.some({range:o,text:gN(r,n),trigger:n})}));var r},bN=e=>{if((e=>3===e.nodeType)(e))return sN(e,e.data.length);{const t=e.childNodes;return t.length>0?bN(t[t.length-1]):sN(e,t.length)}},vN=(e,t)=>{const n=e.childNodes;return n.length>0&&t<n.length?vN(n[t],0):n.length>0&&(e=>1===e.nodeType)(e)&&n.length===t?bN(n[n.length-1]):sN(e,t)},yN=e=>t=>{const n=vN(t.startContainer,t.startOffset);return!((e,t)=>{var n;const o=null!==(n=e.getParent(t.container,e.isBlock))&&void 0!==n?n:e.getRoot();return mN(e,t.container,t.offset,((e,t)=>0===t?-1:t),o).filter((e=>{const t=e.container.data.charAt(e.offset-1);return!fN(t)})).isSome()})(e,n)},CN=(e,t)=>{const n=t(),o=e.selection.getRng();return((e,t,n)=>fe(n.triggers,(n=>hN(e,t,n))))(e.dom,o,n).bind((n=>wN(e,t,n)))},wN=(e,t,n,o={})=>{var r;const s=t(),a=null!==(r=e.selection.getRng().startContainer.nodeValue)&&void 0!==r?r:"",i=X(s.lookupByTrigger(n.trigger),(t=>n.text.length>=t.minChars&&t.matches.getOrThunk((()=>yN(e.dom)))(n.range,a,n.text)));if(0===i.length)return U.none();const l=Promise.all(W(i,(e=>e.fetch(n.text,e.maxResults,o).then((t=>({matchText:n.text,items:t,columns:e.columns,onAction:e.onAction,highlightOn:e.highlightOn}))))));return U.some({lookupData:l,context:n})};var xN;!function(e){e[e.Error=0]="Error",e[e.Value=1]="Value"}(xN||(xN={}));const kN=(e,t,n)=>e.stype===xN.Error?t(e.serror):n(e.svalue),EN=e=>({stype:xN.Value,svalue:e}),SN=e=>({stype:xN.Error,serror:e}),_N=e=>kN(e,fl.error,fl.value),NN=EN,RN=e=>{const t=[],n=[];return K(e,(e=>{kN(e,(e=>n.push(e)),(e=>t.push(e)))})),{values:t,errors:n}},AN=SN,DN=(e,t)=>e.stype===xN.Error?t(e.serror):e,ON=(e,t)=>e.stype===xN.Value?{stype:xN.Value,svalue:t(e.svalue)}:e,TN=(e,t)=>e.stype===xN.Error?{stype:xN.Error,serror:t(e.serror)}:e,BN=kN,PN=e=>p(e)&&ge(e).length>100?" removed due to size":JSON.stringify(e,null,2),LN=(e,t)=>AN([{path:e,getErrorInfo:t}]),MN=(e,t,n,o)=>Ee(n,o).fold((()=>((e,t,n)=>LN(e,(()=>'The chosen schema: "'+n+'" did not exist in branches: '+PN(t))))(e,n,o)),(n=>n.extract(e.concat(["branch: "+o]),t))),IN=(e,t)=>({extract:(n,o)=>Ee(o,e).fold((()=>((e,t)=>LN(e,(()=>'Choice schema did not contain choice key: "'+t+'"')))(n,e)),(e=>MN(n,o,t,e))),toString:()=>"chooseOn("+e+"). Possible values: "+ge(t)}),FN=e=>(...t)=>{if(0===t.length)throw new Error("Can't merge zero objects");const n={};for(let o=0;o<t.length;o++){const r=t[o];for(const t in r)Se(r,t)&&(n[t]=e(n[t],r[t]))}return n},UN=FN(((e,t)=>h(e)&&h(t)?UN(e,t):t)),zN=(FN(((e,t)=>t)),e=>({tag:"defaultedThunk",process:A(e)})),jN=e=>N(AN,ne)(e),HN=e=>{const t=RN(e);return t.errors.length>0?jN(t.errors):NN(t.values)},$N=(e,t,n)=>{switch(e.tag){case"field":return t(e.key,e.newKey,e.presence,e.prop);case"custom":return n(e.newKey,e.instantiator)}},VN=e=>({extract:(t,n)=>DN(e(n),(e=>((e,t)=>LN(e,A(t)))(t,e))),toString:A("val")}),qN=VN(NN),WN=(e,t,n,o)=>Ee(t,n).fold((()=>((e,t,n)=>LN(e,(()=>'Could not find valid *required* value for "'+t+'" in '+PN(n))))(e,n,t)),o),KN=(e,t,n,o)=>o(Ee(e,t).getOrThunk((()=>n(e)))),GN=(e,t,n,o,r)=>{const s=e=>r.extract(t.concat([o]),e),a=e=>e.fold((()=>NN(U.none())),(e=>{const n=r.extract(t.concat([o]),e);return ON(n,U.some)}));switch(e.tag){case"required":return WN(t,n,o,s);case"defaultedThunk":return KN(n,o,e.process,s);case"option":return((e,t,n)=>n(Ee(e,t)))(n,o,a);case"defaultedOptionThunk":return((e,t,n,o)=>o(Ee(e,t).map((t=>!0===t?n(e):t))))(n,o,e.process,a);case"mergeWithThunk":return KN(n,o,A({}),(t=>{const o=UN(e.process(n),t);return s(o)}))}},YN=e=>({extract:(t,n)=>((e,t,n)=>{const o={},r=[];for(const s of n)$N(s,((n,s,a,i)=>{const l=GN(a,e,t,n,i);BN(l,(e=>{r.push(...e)}),(e=>{o[s]=e}))}),((e,n)=>{o[e]=n(t)}));return r.length>0?AN(r):NN(o)})(t,n,e),toString:()=>{const t=W(e,(e=>$N(e,((e,t,n,o)=>e+" -> "+o.toString()),((e,t)=>"state("+e+")"))));return"obj{\n"+t.join("\n")+"}"}}),XN=e=>({extract:(t,n)=>{const o=W(n,((n,o)=>e.extract(t.concat(["["+o+"]"]),n)));return HN(o)},toString:()=>"array("+e.toString()+")"}),QN=(e,t,n)=>_N(((e,t,n)=>{const o=t.extract([e],n);return TN(o,(e=>({input:n,errors:e})))})(e,t,n)),JN=e=>"Errors: \n"+(e=>{const t=e.length>10?e.slice(0,10).concat([{path:[],getErrorInfo:A("... (only showing first ten failures)")}]):e;return W(t,(e=>"Failed path: ("+e.path.join(" > ")+")\n"+e.getErrorInfo()))})(e.errors).join("\n")+"\n\nInput object: "+PN(e.input),ZN=(e,t)=>IN(e,be(t,YN)),eR=A(qN),tR=(e,t)=>VN((n=>{const o=typeof n;return e(n)?NN(n):AN(`Expected type: ${t} but got: ${o}`)})),nR=tR(E,"number"),oR=tR(g,"string"),rR=tR(y,"boolean"),sR=tR(k,"function"),aR=(e,t,n,o)=>({tag:"field",key:e,newKey:t,presence:n,prop:o}),iR=(e,t)=>({tag:"custom",newKey:e,instantiator:t}),lR=e=>{return t=t=>V(e,t)?fl.value(t):fl.error(`Unsupported value: "${t}", choose one of "${e.join(", ")}".`),VN((e=>t(e).fold(AN,NN)));var t},dR=(e,t)=>aR(e,e,{tag:"required",process:{}},t),cR=e=>dR(e,oR),mR=e=>dR(e,sR),uR=(e,t)=>aR(e,e,{tag:"option",process:{}},t),fR=e=>uR(e,oR),gR=(e,t,n)=>aR(e,e,zN(t),n),pR=(e,t)=>gR(e,t,nR),hR=(e,t,n)=>gR(e,t,lR(n)),bR=(e,t)=>gR(e,t,rR),vR=(e,t)=>gR(e,t,sR),yR=cR("type"),CR=mR("fetch"),wR=mR("onAction"),xR=vR("onSetup",(()=>_)),kR=fR("text"),ER=fR("icon"),SR=fR("tooltip"),_R=fR("label"),NR=bR("active",!1),RR=bR("enabled",!0),AR=bR("primary",!1),DR=e=>((e,t)=>gR(e,t,oR))("type",e),OR=YN([yR,cR("trigger"),pR("minChars",1),(BR=1,((e,t)=>aR(e,e,zN(t),eR()))("columns",BR)),pR("maxResults",10),(TR="matches",uR(TR,sR)),CR,wR,((e,t,n)=>gR(e,t,XN(n)))("highlightOn",[],oR)]);var TR,BR;const PR=[RR,SR,ER,kR,xR],LR=[NR].concat(PR),MR=[vR("predicate",I),hR("scope","node",["node","editor"]),hR("position","selection",["node","selection","line"])],IR=PR.concat([DR("contextformbutton"),AR,wR,iR("original",D)]),FR=LR.concat([DR("contextformbutton"),AR,wR,iR("original",D)]),UR=PR.concat([DR("contextformbutton")]),zR=LR.concat([DR("contextformtogglebutton")]),jR=ZN("type",{contextformbutton:IR,contextformtogglebutton:FR});YN([DR("contextform"),vR("initValue",A("")),_R,((e,t)=>aR(e,e,{tag:"required",process:{}},XN(t)))("commands",jR),uR("launch",ZN("type",{contextformbutton:UR,contextformtogglebutton:zR}))].concat(MR));const HR=e=>{const t=e.ui.registry.getAll().popups,n=be(t,(e=>{return(t=e,QN("Autocompleter",OR,{trigger:t.ch,...t})).fold((e=>{throw new Error(JN(e))}),D);var t})),o=Ne(xe(n,(e=>e.trigger))),r=ke(n);return{dataset:n,triggers:o,lookupByTrigger:e=>X(r,(t=>t.trigger===e))}},$R=e=>{const t=Va(),n=Ia(!1),o=t.isSet,r=()=>{o()&&((e=>{$w(e).autocompleter.removeDecoration()})(e),(e=>{e.dispatch("AutocompleterEnd")})(e),n.set(!1),t.clear())},s=n=>{o()||(((e,t)=>{$w(e).autocompleter.addDecoration(t)})(e,n.range),t.set({trigger:n.trigger,matchLength:n.text.length}))},a=Me((()=>HR(e))),i=o=>{(n=>t.get().map((t=>hN(e.dom,e.selection.getRng(),t.trigger).bind((t=>wN(e,a,t,n))))).getOrThunk((()=>CN(e,a))))(o).fold(r,(o=>{s(o.context),o.lookupData.then((s=>{t.get().map((a=>{const i=o.context;a.trigger===i.trigger&&(i.text.length-a.matchLength>=10?r():(t.set({...a,matchLength:i.text.length}),n.get()?((e,t)=>{e.dispatch("AutocompleterUpdate",t)})(e,{lookupData:s}):(n.set(!0),((e,t)=>{e.dispatch("AutocompleterStart",t)})(e,{lookupData:s}))))}))}))}))};e.addCommand("mceAutocompleterReload",((e,t)=>{const n=p(t)?t.fetchOptions:{};i(n)})),e.addCommand("mceAutocompleterClose",r),((e,t)=>{const n=Wa(t.load,50);e.on("keypress compositionend",(e=>{27!==e.which&&n.throttle()})),e.on("keydown",(e=>{const o=e.which;8===o?n.throttle():27===o&&t.cancelIfNecessary()})),e.on("remove",n.cancel)})(e,{cancelIfNecessary:r,load:i})},VR=e=>(t,n,o={})=>{const r=t.getBody(),s={bubbles:!0,composed:!0,data:null,isComposing:!1,detail:0,view:null,target:r,currentTarget:r,eventPhase:Event.AT_TARGET,originalTarget:r,explicitOriginalTarget:r,isTrusted:!1,srcElement:r,cancelable:!1,preventDefault:_,inputType:n},a=ba(new InputEvent(e));return t.dispatch(e,{...a,...s,...o})},qR=VR("input"),WR=VR("beforeinput"),KR=(e,t)=>{let n=!1;e.on("keydown",(o=>{n=o.keyCode===gf.BACKSPACE,o.isDefaultPrevented()||((e,t,n)=>{const o=n.keyCode===gf.BACKSPACE?"deleteContentBackward":"deleteContentForward";N_([{keyCode:gf.BACKSPACE,action:S_(WS,e)},{keyCode:gf.BACKSPACE,action:S_(Xk,e,!1)},{keyCode:gf.DELETE,action:S_(Xk,e,!0)},{keyCode:gf.BACKSPACE,action:S_(Uk,e,!1)},{keyCode:gf.DELETE,action:S_(Uk,e,!0)},{keyCode:gf.BACKSPACE,action:S_(xS,e,t,!1)},{keyCode:gf.DELETE,action:S_(xS,e,t,!0)},{keyCode:gf.BACKSPACE,action:S_(Sb,e,!1)},{keyCode:gf.DELETE,action:S_(Sb,e,!0)},{keyCode:gf.BACKSPACE,action:S_(Qk,e,!1)},{keyCode:gf.DELETE,action:S_(Qk,e,!0)},{keyCode:gf.BACKSPACE,action:S_(FS,e,!1)},{keyCode:gf.DELETE,action:S_(FS,e,!0)},{keyCode:gf.BACKSPACE,action:S_(Tk,e,!1)},{keyCode:gf.DELETE,action:S_(Tk,e,!0)},{keyCode:gf.BACKSPACE,action:S_(Rk,e,!1)},{keyCode:gf.DELETE,action:S_(Rk,e,!0)},{keyCode:gf.BACKSPACE,action:S_(BS,e,!1)},{keyCode:gf.DELETE,action:S_(BS,e,!0)}],n).filter((t=>e.selection.isEditable())).each((t=>{n.preventDefault(),WR(e,o).isDefaultPrevented()||(t(),qR(e,o))}))})(e,t,o)})),e.on("keyup",(t=>{t.isDefaultPrevented()||((e,t,n)=>{const o=kt(),r=o.os,s=o.browser,a=r.isMacOS()?[{keyCode:gf.BACKSPACE,altKey:!0,action:S_(MS,e)},{keyCode:gf.DELETE,altKey:!0,action:S_(MS,e)}]:[{keyCode:gf.BACKSPACE,ctrlKey:!0,action:S_(MS,e)},{keyCode:gf.DELETE,ctrlKey:!0,action:S_(MS,e)}];r.isMacOS()&&n&&a.push({keyCode:s.isFirefox()?224:91,action:S_(MS,e)}),__([{keyCode:gf.BACKSPACE,action:S_(Yk,e)},{keyCode:gf.DELETE,action:S_(Yk,e)},...a],t)})(e,t,n),n=!1}))},GR=(e,t)=>{const n=e.dom,o=e.schema.getMoveCaretBeforeOnEnterElements();if(!t)return;if(/^(LI|DT|DD)$/.test(t.nodeName)){const e=(e=>{for(;e;){if(jo(e)||Xo(e)&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}return null})(t.firstChild);e&&/^(UL|OL|DL)$/.test(e.nodeName)&&t.insertBefore(n.doc.createTextNode(mr),t.firstChild)}const r=n.createRng();if(t.normalize(),t.hasChildNodes()){const e=new Fo(t,t);let n,s=t;for(;n=e.current();){if(Xo(n)){r.setStart(n,0),r.setEnd(n,0);break}if(o[n.nodeName.toLowerCase()]){r.setStartBefore(n),r.setEndBefore(n);break}s=n,n=e.next()}n||(r.setStart(s,0),r.setEnd(s,0))}else nr(t)?t.nextSibling&&n.isBlock(t.nextSibling)?(r.setStartBefore(t),r.setEndBefore(t)):(r.setStartAfter(t),r.setEndAfter(t)):(r.setStart(t,0),r.setEnd(t,0));e.selection.setRng(r),vg(e,r)},YR=(e,t)=>{const n=e.getRoot();let o,r=t;for(;r!==n&&r&&"false"!==e.getContentEditable(r);)"true"===e.getContentEditable(r)&&(o=r),r=r.parentNode;return r!==n?o:n},XR=e=>U.from(e.dom.getParent(e.selection.getStart(!0),e.dom.isBlock)),QR=(e,t)=>{const n=null==e?void 0:e.parentNode;return x(n)&&n.nodeName===t},JR=e=>x(e)&&/^(OL|UL|LI)$/.test(e.nodeName),ZR=e=>{const t=e.parentNode;return x(n=t)&&/^(LI|DT|DD)$/.test(n.nodeName)?t:e;var n},eA=(e,t,n)=>{let o=e[n?"firstChild":"lastChild"];for(;o&&!jo(o);)o=o[n?"nextSibling":"previousSibling"];return o===t},tA=(e,t,n,o,r)=>{const s=e.dom,a=e.selection.getRng(),i=n.parentNode;if(n===e.getBody()||!i)return;var l;JR(l=n)&&JR(l.parentNode)&&(r="LI");let d=t(r);if(eA(n,o,!0)&&eA(n,o,!1))if(QR(n,"LI")){const e=ZR(n);s.insertAfter(d,e),(e=>{var t;return(null===(t=e.parentNode)||void 0===t?void 0:t.firstChild)===e})(n)?s.remove(e):s.remove(n)}else s.replace(d,n);else if(eA(n,o,!0))QR(n,"LI")?(s.insertAfter(d,ZR(n)),d.appendChild(s.doc.createTextNode(" ")),d.appendChild(n)):i.insertBefore(d,n),s.remove(o);else if(eA(n,o,!1))s.insertAfter(d,ZR(n)),s.remove(o);else{n=ZR(n);const e=a.cloneRange();e.setStartAfter(o),e.setEndAfter(n);const t=e.extractContents();"LI"===r&&((e,t)=>e.firstChild&&e.firstChild.nodeName===t)(t,"LI")?(d=t.firstChild,s.insertAfter(t,n)):(s.insertAfter(t,n),s.insertAfter(d,n)),s.remove(o)}GR(e,d)},nA=(e,t)=>t&&"A"===t.nodeName&&e.isEmpty(t),oA=e=>{e.innerHTML='<br data-mce-bogus="1">'},rA=(e,t)=>e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t,sA=(e,t)=>x(t)&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&!/^(fixed|absolute)/i.test(t.style.position)&&e.isEditable(t.parentNode)&&"false"!==e.getContentEditable(t),aA=(e,t,n)=>Xo(t)?e?1===n&&t.data.charAt(n-1)===Br?0:n:n===t.data.length-1&&t.data.charAt(n)===Br?t.data.length:n:n,iA=(e,t)=>{if(Ll(e).toLowerCase()===t.tagName.toLowerCase()){((e,t,n)=>{const o=e.dom;U.from(n.style).map(o.parseStyle).each((e=>{const n={...co(bn.fromDom(t)),...e};o.setStyles(t,n)}));const r=U.from(n.class).map((e=>e.split(/\s+/))),s=U.from(t.className).map((e=>X(e.split(/\s+/),(e=>""!==e))));Mt(r,s,((e,n)=>{const r=X(n,(t=>!V(e,t))),s=[...e,...r];o.setAttrib(t,"class",s.join(" "))}));const a=["style","class"],i=we(n,((e,t)=>!V(a,t)));o.setAttribs(t,i)})(e,t,Ml(e))}},lA={insert:(e,t)=>{let n,o,r,s,a=!1;const i=e.dom,l=e.schema,d=l.getNonEmptyElements(),c=e.selection.getRng(),m=Ll(e),u=t=>{let o=n;const s=l.getTextInlineElements();let a;a=t||"TABLE"===r||"HR"===r?i.create(t||m):y.cloneNode(!1);let d=a;if(!1===zl(e))i.setAttrib(a,"style",null),i.setAttrib(a,"class",null);else do{if(s[o.nodeName]){if(Rm(o)||Hm(o))continue;const e=o.cloneNode(!1);i.setAttrib(e,"id",""),a.hasChildNodes()?(e.appendChild(a.firstChild),a.appendChild(e)):(d=e,a.appendChild(e))}}while((o=o.parentNode)&&o!==v);return iA(e,a),oA(d),a},f=e=>{const t=aA(e,n,o);if(Xo(n)&&(e?t>0:t<n.data.length))return!1;if(n.parentNode===y&&a&&!e)return!0;if(e&&jo(n)&&n===y.firstChild)return!0;if(rA(n,"TABLE")||rA(n,"HR"))return a&&!e||!a&&e;const r=new Fo(n,y);let s;for(Xo(n)&&(e&&0===t?r.prev():e||t!==n.data.length||r.next());s=r.current();){if(jo(s)){if(!s.getAttribute("data-mce-bogus")){const e=s.nodeName.toLowerCase();if(d[e]&&"br"!==e)return!1}}else if(Xo(s)&&!as(s.data))return!1;e?r.prev():r.next()}return!0},p=()=>{let t;return t=/^(H[1-6]|PRE|FIGURE)$/.test(r)&&"HGROUP"!==C?u(m):u(),((e,t)=>{const n=jl(e);return!w(t)&&(g(n)?V(Pt.explode(n),t.nodeName.toLowerCase()):n)})(e,s)&&sA(i,s)&&i.isEmpty(y)?t=i.split(s,y):i.insertAfter(t,y),GR(e,t),t};Kf(i,c).each((e=>{c.setStart(e.startContainer,e.startOffset),c.setEnd(e.endContainer,e.endOffset)})),n=c.startContainer,o=c.startOffset;const h=!(!t||!t.shiftKey),b=!(!t||!t.ctrlKey);jo(n)&&n.hasChildNodes()&&(a=o>n.childNodes.length-1,n=n.childNodes[Math.min(o,n.childNodes.length-1)]||n,o=a&&Xo(n)?n.data.length:0);const v=YR(i,n);if(!v||((e,t)=>{const n=e.dom.getParent(t,"ol,ul,dl");return null!==n&&"false"===e.dom.getContentEditableParent(n)})(e,n))return;h||(n=((e,t,n,o,r)=>{var s,a;const i=e.dom,l=null!==(s=YR(i,o))&&void 0!==s?s:i.getRoot();let d=i.getParent(o,i.isBlock);if(!d||!sA(i,d)){if(d=d||l,!d.hasChildNodes()){const o=i.create(t);return iA(e,o),d.appendChild(o),n.setStart(o,0),n.setEnd(o,0),o}let s,c=o;for(;c&&c.parentNode!==d;)c=c.parentNode;for(;c&&!i.isBlock(c);)s=c,c=c.previousSibling;const m=null===(a=null==s?void 0:s.parentElement)||void 0===a?void 0:a.nodeName;if(s&&m&&e.schema.isValidChild(m,t.toLowerCase())){const a=s.parentNode,l=i.create(t);for(iA(e,l),a.insertBefore(l,s),c=s;c&&!i.isBlock(c);){const e=c.nextSibling;l.appendChild(c),c=e}n.setStart(o,r),n.setEnd(o,r)}}return o})(e,m,c,n,o));let y=i.getParent(n,i.isBlock)||i.getRoot();s=x(null==y?void 0:y.parentNode)?i.getParent(y.parentNode,i.isBlock):null,r=y?y.nodeName.toUpperCase():"";const C=s?s.nodeName.toUpperCase():"";if("LI"===C&&!b){y=s,s=s.parentNode,r=C}if(/^(LI|DT|DD)$/.test(r)&&jo(s)&&i.isEmpty(y))return void tA(e,u,s,y,m);if(y===e.getBody()||!sA(i,y))return;const k=y.parentNode;let E;if(Fr(y))E=Wr(y),i.isEmpty(y)&&oA(y),iA(e,E),GR(e,E);else if(f(!1))E=p();else if(f(!0)&&k)E=k.insertBefore(u(),y),GR(e,rA(y,"HR")?E:y);else{const t=(e=>{const t=e.cloneRange();return t.setStart(e.startContainer,aA(!0,e.startContainer,e.startOffset)),t.setEnd(e.endContainer,aA(!1,e.endContainer,e.endOffset)),t})(c).cloneRange();t.setEndAfter(y);const n=t.extractContents();(e=>{K(Lo(bn.fromDom(e),Kt),(e=>{const t=e.dom;t.nodeValue=Lr(t.data)}))})(n),(e=>{let t=e;do{Xo(t)&&(t.data=t.data.replace(/^[\r\n]+/,"")),t=t.firstChild}while(t)})(n),E=n.firstChild,i.insertAfter(n,y),((e,t,n)=>{var o;const r=[];if(!n)return;let s=n;for(;s=s.firstChild;){if(e.isBlock(s))return;jo(s)&&!t[s.nodeName.toLowerCase()]&&r.push(s)}let a=r.length;for(;a--;)s=r[a],(!s.hasChildNodes()||s.firstChild===s.lastChild&&""===(null===(o=s.firstChild)||void 0===o?void 0:o.nodeValue)||nA(e,s))&&e.remove(s)})(i,d,E),((e,t)=>{t.normalize();const n=t.lastChild;(!n||jo(n)&&/^(left|right)$/gi.test(e.getStyle(n,"float",!0)))&&e.add(t,"br")})(i,y),i.isEmpty(y)&&oA(y),E.normalize(),i.isEmpty(E)?(i.remove(E),p()):(iA(e,E),GR(e,E))}i.setAttrib(E,"id",""),e.dispatch("NewBlock",{newBlock:E})},fakeEventName:"insertParagraph"},dA=(e,t,n)=>{const o=e.dom.createRng();n?(o.setStartBefore(t),o.setEndBefore(t)):(o.setStartAfter(t),o.setEndAfter(t)),e.selection.setRng(o),vg(e,o)},cA=(e,t)=>{const n=e.selection,o=e.dom,r=n.getRng();let s,a=!1;Kf(o,r).each((e=>{r.setStart(e.startContainer,e.startOffset),r.setEnd(e.endContainer,e.endOffset)}));let i=r.startOffset,l=r.startContainer;if(jo(l)&&l.hasChildNodes()){const e=i>l.childNodes.length-1;l=l.childNodes[Math.min(i,l.childNodes.length-1)]||l,i=e&&Xo(l)?l.data.length:0}let d=o.getParent(l,o.isBlock);const c=d&&d.parentNode?o.getParent(d.parentNode,o.isBlock):null,m=c?c.nodeName.toUpperCase():"",u=!(!t||!t.ctrlKey);"LI"!==m||u||(d=c),Xo(l)&&i>=l.data.length&&(((e,t,n)=>{const o=new Fo(t,n);let r;const s=e.getNonEmptyElements();for(;r=o.next();)if(s[r.nodeName.toLowerCase()]||Xo(r)&&r.length>0)return!0;return!1})(e.schema,l,d||o.getRoot())||(s=o.create("br"),r.insertNode(s),r.setStartAfter(s),r.setEndAfter(s),a=!0)),s=o.create("br"),Vi(o,r,s),dA(e,s,a),e.undoManager.add()},mA=(e,t)=>{const n=bn.fromTag("br");uo(bn.fromDom(t),n),e.undoManager.add()},uA=(e,t)=>{fA(e.getBody(),t)||fo(bn.fromDom(t),bn.fromTag("br"));const n=bn.fromTag("br");fo(bn.fromDom(t),n),dA(e,n.dom,!1),e.undoManager.add()},fA=(e,t)=>{return n=Hi.after(t),!!nr(n.getNode())||km(e,Hi.after(t)).map((e=>nr(e.getNode()))).getOr(!1);var n},gA=e=>e&&"A"===e.nodeName&&"href"in e,pA=e=>e.fold(I,gA,gA,I),hA=(e,t)=>{t.fold(_,T(mA,e),T(uA,e),_)},bA={insert:(e,t)=>{const n=(e=>{const t=T(Fh,e),n=Hi.fromRangeStart(e.selection.getRng());return vE(t,e.getBody(),n).filter(pA)})(e);n.isSome()?n.each(T(hA,e)):cA(e,t)},fakeEventName:"insertLineBreak"},vA=(e,t)=>XR(e).filter((e=>t.length>0&&yn(bn.fromDom(e),t))).isSome(),yA=gl([{br:[]},{block:[]},{none:[]}]),CA=(e,t)=>(e=>vA(e,Ul(e)))(e),wA=e=>(t,n)=>(e=>XR(e).filter((e=>kr(bn.fromDom(e)))).isSome())(t)===e,xA=(e,t)=>(n,o)=>{const r=(e=>XR(e).fold(A(""),(e=>e.nodeName.toUpperCase())))(n)===e.toUpperCase();return r===t},kA=e=>{const t=YR(e.dom,e.selection.getStart());return w(t)},EA=e=>xA("pre",e),SA=e=>(t,n)=>Pl(t)===e,_A=(e,t)=>(e=>vA(e,Fl(e)))(e),NA=(e,t)=>t,RA=e=>{const t=Ll(e),n=YR(e.dom,e.selection.getStart());return x(n)&&e.schema.isValidChild(n.nodeName,t)},AA=(e,t)=>(n,o)=>J(e,((e,t)=>e&&t(n,o)),!0)?U.some(t):U.none(),DA=(e,t,n)=>{if(t.selection.isCollapsed()||(e=>{e.execCommand("delete")})(t),x(n)){if(WR(t,e.fakeEventName).isDefaultPrevented())return}e.insert(t,n),x(n)&&qR(t,e.fakeEventName)},OA=(e,t)=>{const n=()=>DA(bA,e,t),o=()=>DA(lA,e,t),r=((e,t)=>lE([AA([CA],yA.none()),AA([EA(!0),kA],yA.none()),AA([xA("summary",!0)],yA.br()),AA([EA(!0),SA(!1),NA],yA.br()),AA([EA(!0),SA(!1)],yA.block()),AA([EA(!0),SA(!0),NA],yA.block()),AA([EA(!0),SA(!0)],yA.br()),AA([wA(!0),NA],yA.br()),AA([wA(!0)],yA.block()),AA([_A],yA.br()),AA([NA],yA.br()),AA([RA],yA.block())],[e,!(!t||!t.shiftKey)]).getOr(yA.none()))(e,t);switch(Il(e)){case"linebreak":r.fold(n,n,_);break;case"block":r.fold(o,o,_);break;case"invert":r.fold(o,n,_);break;default:r.fold(n,o,_)}},TA=e=>{e.on("keydown",(t=>{t.keyCode===gf.ENTER&&((e,t)=>{var n;t.isDefaultPrevented()||(t.preventDefault(),(n=e.undoManager).typing&&(n.typing=!1,n.add()),e.undoManager.transact((()=>{OA(e,t)})))})(e,t)}))},BA=(e,t)=>{e.on("keydown",(n=>{n.isDefaultPrevented()||((e,t,n)=>{const o=Dt.os.isMacOS()||Dt.os.isiOS();__([{keyCode:gf.END,action:S_(p_,e,!0)},{keyCode:gf.HOME,action:S_(p_,e,!1)},...o?[]:[{keyCode:gf.HOME,action:S_(h_,e,!1),ctrlKey:!0,shiftKey:!0},{keyCode:gf.END,action:S_(h_,e,!0),ctrlKey:!0,shiftKey:!0}],{keyCode:gf.END,action:S_(D_,e,!0)},{keyCode:gf.HOME,action:S_(D_,e,!1)},{keyCode:gf.END,action:S_(vS,e,!0,t)},{keyCode:gf.HOME,action:S_(vS,e,!1,t)}],n).each((e=>{n.preventDefault()}))})(e,t,n)}))},PA=e=>{e.on("input",(t=>{t.isComposing||(e=>{const t=bn.fromDom(e.getBody());e.selection.isCollapsed()&&wh(t,Hi.fromRangeStart(e.selection.getRng())).each((t=>{e.selection.setRng(t.toRange())}))})(e)}))},LA=kt(),MA=e=>e.stopImmediatePropagation(),IA=e=>e.keyCode===gf.PAGE_UP||e.keyCode===gf.PAGE_DOWN,FA=(e,t,n)=>{n&&!e.get()?t.on("NodeChange",MA,!0):!n&&e.get()&&t.off("NodeChange",MA),e.set(n)},UA=(e,t)=>{if(LA.os.isMacOS())return;const n=Ia(!1);e.on("keydown",(t=>{IA(t)&&FA(n,e,!0)})),e.on("keyup",(o=>{o.isDefaultPrevented()||((e,t,n)=>{__([{keyCode:gf.PAGE_UP,action:S_(vS,e,!1,t)},{keyCode:gf.PAGE_DOWN,action:S_(vS,e,!0,t)}],n)})(e,t,o),IA(o)&&n.get()&&(FA(n,e,!1),e.nodeChanged())}))},zA=(e,t)=>{const n=t.container(),o=t.offset();return Xo(n)?(n.insertData(o,e),U.some(Hi(n,o+e.length))):em(t).map((n=>{const o=bn.fromText(e);return t.isAtEnd()?fo(n,o):uo(n,o),Hi(o.dom,e.length)}))},jA=T(zA,mr),HA=T(zA," "),$A=(e,t)=>n=>((e,t)=>!ch(t)&&(mh(e,t)||lh(e,t)||dh(e,t)))(e,n)?jA(t):HA(t),VA=e=>{const t=Hi.fromRangeStart(e.selection.getRng()),n=bn.fromDom(e.getBody());if(e.selection.isCollapsed()){const o=T(Fh,e),r=Hi.fromRangeStart(e.selection.getRng());return vE(o,e.getBody(),r).bind((e=>t=>t.fold((t=>Em(e.dom,Hi.before(t))),(e=>Sm(e)),(e=>_m(e)),(t=>km(e.dom,Hi.after(t)))))(n)).map((o=>()=>$A(n,t)(o).each((e=>t=>(e.selection.setRng(t.toRange()),e.nodeChanged(),!0))(e))))}return U.none()},qA=e=>{e.on("keydown",(t=>{t.isDefaultPrevented()||((e,t)=>{N_([{keyCode:gf.SPACEBAR,action:S_(VA,e)}],t).each((n=>{t.preventDefault(),WR(e,"insertText",{data:" "}).isDefaultPrevented()||(n(),qR(e,"insertText",{data:" "}))}))})(e,t)}))},WA=e=>mc(e)?[{keyCode:gf.TAB,action:S_(oN,e,!0)},{keyCode:gf.TAB,shiftKey:!0,action:S_(oN,e,!1)}]:[],KA=e=>{e.on("keydown",(t=>{t.isDefaultPrevented()||((e,t)=>{__([...WA(e)],t).each((e=>{t.preventDefault()}))})(e,t)}))},GA=e=>{if(e.addShortcut("Meta+P","","mcePrint"),$R(e),zw(e))return Ia(null);{const t=pS(e);return(e=>{e.on("keyup compositionstart",T(l_,e))})(e),rN(e,t),KR(e,t),TA(e),qA(e),PA(e),KA(e),BA(e,t),UA(e,t),t}};class YA{constructor(e){let t;this.lastPath=[],this.editor=e;const n=this;"onselectionchange"in e.getDoc()||e.on("NodeChange click mouseup keyup focus",(n=>{const o=e.selection.getRng(),r={startContainer:o.startContainer,startOffset:o.startOffset,endContainer:o.endContainer,endOffset:o.endOffset};"nodechange"!==n.type&&zf(r,t)||e.dispatch("SelectionChange"),t=r})),e.on("contextmenu",(()=>{e.dispatch("SelectionChange")})),e.on("SelectionChange",(()=>{const t=e.selection.getStart(!0);t&&cu(e)&&!n.isSameElementPath(t)&&e.dom.isChildOf(t,e.getBody())&&e.nodeChanged({selectionChange:!0})})),e.on("mouseup",(t=>{!t.isDefaultPrevented()&&cu(e)&&("IMG"===e.selection.getNode().nodeName?Tg.setEditorTimeout(e,(()=>{e.nodeChanged()})):e.nodeChanged())}))}nodeChanged(e={}){const t=this.editor.selection;let n;if(this.editor.initialized&&t&&!Ad(this.editor)&&!this.editor.mode.isReadOnly()){const o=this.editor.getBody();n=t.getStart(!0)||o,n.ownerDocument===this.editor.getDoc()&&this.editor.dom.isChildOf(n,o)||(n=o);const r=[];this.editor.dom.getParent(n,(e=>e===o||(r.push(e),!1))),this.editor.dispatch("NodeChange",{...e,element:n,parents:r})}}isSameElementPath(e){let t;const n=this.editor,o=se(n.dom.getParents(e,F,n.getBody()));if(o.length===this.lastPath.length){for(t=o.length;t>=0&&o[t]===this.lastPath[t];t--);if(-1===t)return this.lastPath=o,!0}return this.lastPath=o,!1}}const XA="x-tinymce/html",QA=A(XA),JA="\x3c!-- x-tinymce/html --\x3e",ZA=e=>JA+e,eD=e=>-1!==e.indexOf(JA),tD=(e,t,n)=>{const o=e.split(/\n\n/),r=((e,t)=>{let n="<"+e;const o=xe(t,((e,t)=>t+'="'+ea.encodeAllRaw(e)+'"'));return o.length&&(n+=" "+o.join(" ")),n+">"})(t,n),s="</"+t+">",a=W(o,(e=>e.split(/\n/).join("<br />")));return 1===a.length?a[0]:W(a,(e=>r+e+s)).join("")},nD="%MCEPASTEBIN%",oD=e=>e.dom.get("mcepastebin"),rD=e=>x(e)&&"mcepastebin"===e.id,sD=e=>e===nD,aD=e=>{const t=Ia(null);return{create:()=>((e,t)=>{const{dom:n,selection:o}=e,r=e.getBody();t.set(o.getRng());const s=n.add(e.getBody(),"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"},nD);Dt.browser.isFirefox()&&n.setStyle(s,"left","rtl"===n.getStyle(r,"direction",!0)?65535:-65535),n.bind(s,"beforedeactivate focusin focusout",(e=>{e.stopPropagation()})),s.focus(),o.select(s,!0)})(e,t),remove:()=>((e,t)=>{const n=e.dom;if(oD(e)){let o;const r=t.get();for(;o=oD(e);)n.remove(o),n.unbind(o);r&&e.selection.setRng(r)}t.set(null)})(e,t),getEl:()=>oD(e),getHtml:()=>(e=>{const t=e.dom,n=(e,n)=>{e.appendChild(n),t.remove(n,!0)},[o,...r]=X(e.getBody().childNodes,rD);K(r,(e=>{n(o,e)}));const s=t.select("div[id=mcepastebin]",o);for(let e=s.length-1;e>=0;e--){const r=t.create("div");o.insertBefore(r,s[e]),n(r,s[e])}return o?o.innerHTML:""})(e),getLastRng:t.get}},iD=(e,t)=>(Pt.each(t,(t=>{e=f(t,RegExp)?e.replace(t,""):e.replace(t[0],t[1])})),e),lD=e=>e=iD(e,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,(e,t,n)=>t||n?mr:" "],/<br class="Apple-interchange-newline">/g,/<br>$/i]),dD=(e,t)=>({content:e,cancelled:t}),cD=(e,t,n)=>{const o=((e,t,n)=>e.dispatch("PastePreProcess",{content:t,internal:n}))(e,t,n),r=((e,t)=>{const n=tw({sanitize:dc(e)},e.schema);n.addNodeFilter("meta",(e=>{Pt.each(e,(e=>{e.remove()}))}));const o=n.parse(t,{forced_root_block:!1,isRootContent:!0});return kp({validate:!0},e.schema).serialize(o)})(e,o.content);return e.hasEventListeners("PastePostProcess")&&!o.isDefaultPrevented()?((e,t,n)=>{const o=e.dom.create("div",{style:"display:none"},t),r=((e,t,n)=>e.dispatch("PastePostProcess",{node:t,internal:n}))(e,o,n);return dD(r.node.innerHTML,r.isDefaultPrevented())})(e,r,n):dD(r,o.isDefaultPrevented())},mD=(e,t)=>(e.insertContent(t,{merge:Qd(e),paste:!0}),!0),uD=e=>/^https?:\/\/[\w\-\/+=.,!;:&%@^~(){}?#]+$/i.test(e),fD=(e,t,n)=>!(e.selection.isCollapsed()||!uD(t))&&((e,t,n)=>(e.undoManager.extra((()=>{n(e,t)}),(()=>{e.execCommand("mceInsertLink",!1,t)})),!0))(e,t,n),gD=(e,t,n)=>!!((e,t)=>uD(t)&&q(cc(e),(e=>qe(t.toLowerCase(),`.${e.toLowerCase()}`))))(e,t)&&((e,t,n)=>(e.undoManager.extra((()=>{n(e,t)}),(()=>{e.insertContent('<img src="'+t+'">')})),!0))(e,t,n),pD=(e,t,n)=>{n||!Jd(e)?mD(e,t):((e,t)=>{Pt.each([fD,gD,mD],(n=>!n(e,t,mD)))})(e,t)},hD=(e=>{let t=0;return()=>e+t++})("mceclip"),bD=(e,t,n,o)=>{const r=((e,t,n)=>cD(e,t,n))(e,t,n);r.cancelled||pD(e,r.content,o)},vD=(e,t,n)=>{const o=n||eD(t);bD(e,(e=>e.replace(JA,""))(t),o,!1)},yD=(e,t)=>{const n=e.dom.encode(t).replace(/\r\n/g,"\n"),o=ls(n,ec(e)),r=tD(o,Ll(e),Ml(e));bD(e,r,!1,!0)},CD=e=>{const t={};if(e&&e.types)for(let n=0;n<e.types.length;n++){const o=e.types[n];try{t[o]=e.getData(o)}catch(e){t[o]=""}}return t},wD=(e,t)=>t in e&&e[t].length>0,xD=e=>wD(e,"text/html")||wD(e,"text/plain"),kD=(e,t,n,o)=>{const r=hD(),s=$l(e)&&x(n.name),a=s?((e,t)=>{const n=t.match(/([\s\S]+?)(?:\.[a-z0-9.]+)$/i);return x(n)?e.dom.encode(n[1]):void 0})(e,n.name):r,i=s?n.name:void 0,l=t.create(r,n,o,a,i);return t.add(l),l},ED=e=>{const t=cc(e);return e=>Ve(e.type,"image/")&&q(t,(t=>(e=>{const t=e.toLowerCase(),n={jpg:"jpeg",jpe:"jpeg",jfi:"jpeg",jif:"jpeg",jfif:"jpeg",pjpeg:"jpeg",pjp:"jpeg",svg:"svg+xml"};return Pt.hasOwn(n,t)?"image/"+n[t]:"image/"+t})(t)===e.type))},SD=(e,t,n)=>{const o="paste"===t.type?t.clipboardData:t.dataTransfer;var r;if(Wd(e)&&o){const s=((e,t)=>{const n=t.items?oe(ue(t.items),(e=>"file"===e.kind?[e.getAsFile()]:[])):[],o=t.files?ue(t.files):[];return X(n.length>0?n:o,ED(e))})(e,o);if(s.length>0)return t.preventDefault(),(r=s,Promise.all(W(r,(e=>Ay(e).then((t=>({file:e,uri:t}))))))).then((t=>{n&&e.selection.setRng(n),K(t,(t=>{((e,t)=>{_y(t.uri).each((({data:n,type:o,base64Encoded:r})=>{const s=r?n:btoa(n),a=t.file,i=e.editorUpload.blobCache,l=i.getByData(s,o),d=null!=l?l:kD(e,i,a,s);vD(e,`<img src="${d.blobUri()}">`,!1)}))})(e,t)}))})),!0}return!1},_D=(e,t,n,o)=>{let r=lD(n);const s=wD(t,QA())||eD(n),a=!s&&(e=>!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(e))(r),i=uD(r);(sD(r)||!r.length||a&&!i)&&(o=!0),(o||i)&&(r=wD(t,"text/plain")&&a?t["text/plain"]:(e=>{const t=fa(),n=tw({},t);let o="";const r=t.getVoidElements(),s=Pt.makeMap("script noscript style textarea video audio iframe object"," "),a=t.getBlockElements(),i=e=>{const n=e.name,l=e;if("br"!==n){if("wbr"!==n)if(r[n]&&(o+=" "),s[n])o+=" ";else{if(3===e.type&&(o+=e.value),!(e.name in t.getVoidElements())){let t=e.firstChild;if(t)do{i(t)}while(t=t.next)}a[n]&&l.next&&(o+="\n","p"===n&&(o+="\n"))}}else o+="\n"};return e=iD(e,[/<!\[[^\]]+\]>/g]),i(n.parse(e)),o})(r)),sD(r)||(o?yD(e,r):vD(e,r,s))},ND=(e,t,n)=>{let o;e.on("keydown",(e=>{(e=>gf.metaKeyPressed(e)&&86===e.keyCode||e.shiftKey&&45===e.keyCode)(e)&&!e.isDefaultPrevented()&&(o=e.shiftKey&&86===e.keyCode)})),e.on("paste",(r=>{if(r.isDefaultPrevented()||(e=>{var t,n;return Dt.os.isAndroid()&&0===(null===(n=null===(t=e.clipboardData)||void 0===t?void 0:t.items)||void 0===n?void 0:n.length)})(r))return;const s="text"===n.get()||o;o=!1;const a=CD(r.clipboardData);!xD(a)&&SD(e,r,t.getLastRng()||e.selection.getRng())||(wD(a,"text/html")?(r.preventDefault(),_D(e,a,a["text/html"],s)):wD(a,"text/plain")&&wD(a,"text/uri-list")?(r.preventDefault(),_D(e,a,a["text/plain"],s)):(t.create(),Tg.setEditorTimeout(e,(()=>{const n=t.getHtml();t.remove(),_D(e,a,n,s)}),0)))}))},RD=(e,t,n)=>{ND(e,t,n),(e=>{const t=e=>Ve(e,"webkit-fake-url"),n=e=>Ve(e,"data:");e.parser.addNodeFilter("img",((o,r,s)=>{if(!Wd(e)&&(e=>{var t;return!0===(null===(t=e.data)||void 0===t?void 0:t.paste)})(s))for(const r of o){const o=r.attr("src");g(o)&&!r.attr("data-mce-object")&&o!==Dt.transparentSrc&&(t(o)||!tc(e)&&n(o))&&r.remove()}}))})(e)},AD=(e,t)=>{e.addCommand("mceTogglePlainTextPaste",(()=>{((e,t)=>{"text"===t.get()?(t.set("html"),ff(e,!1)):(t.set("text"),ff(e,!0)),e.focus()})(e,t)})),e.addCommand("mceInsertClipboardContent",((t,n)=>{n.html&&vD(e,n.html,n.internal),n.text&&yD(e,n.text)}))},DD=(e,t,n,o)=>{((e,t,n)=>{if(!e)return!1;try{return e.clearData(),e.setData("text/html",t),e.setData("text/plain",n),e.setData(QA(),t),!0}catch(e){return!1}})(e.clipboardData,t.html,t.text)?(e.preventDefault(),o()):n(t.html,o)},OD=e=>(t,n)=>{const{dom:o,selection:r}=e,s=o.create("div",{contenteditable:"false","data-mce-bogus":"all"}),a=o.create("div",{contenteditable:"true"},t);o.setStyles(s,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),s.appendChild(a),o.add(e.getBody(),s);const i=r.getRng();a.focus();const l=o.createRng();l.selectNodeContents(a),r.setRng(l),Tg.setEditorTimeout(e,(()=>{r.setRng(i),o.remove(s),n()}),0)},TD=e=>({html:ZA(e.selection.getContent({contextual:!0})),text:e.selection.getContent({format:"text"})}),BD=e=>!e.selection.isCollapsed()||(e=>!!e.dom.getParent(e.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",e.getBody()))(e),PD=e=>{e.on("cut",(e=>t=>{!t.isDefaultPrevented()&&BD(e)&&DD(t,TD(e),OD(e),(()=>{if(Dt.browser.isChromium()||Dt.browser.isFirefox()){const t=e.selection.getRng();Tg.setEditorTimeout(e,(()=>{e.selection.setRng(t),e.execCommand("Delete")}),0)}else e.execCommand("Delete")}))})(e)),e.on("copy",(e=>t=>{!t.isDefaultPrevented()&&BD(e)&&DD(t,TD(e),OD(e),_)})(e))},LD=(e,t)=>{var n,o;return Xf.getCaretRangeFromPoint(null!==(n=t.clientX)&&void 0!==n?n:0,null!==(o=t.clientY)&&void 0!==o?o:0,e.getDoc())},MD=(e,t)=>{e.focus(),t&&e.selection.setRng(t)},ID=(e,t)=>{qd(e)&&e.on("dragend dragover draggesture dragdrop drop drag",(e=>{e.preventDefault(),e.stopPropagation()})),Wd(e)||e.on("drop",(e=>{const t=e.dataTransfer;t&&(e=>q(e.files,(e=>/^image\//.test(e.type))))(t)&&e.preventDefault()})),e.on("drop",(n=>{if(n.isDefaultPrevented())return;const o=LD(e,n);if(w(o))return;const r=CD(n.dataTransfer),s=wD(r,QA());if((!xD(r)||(e=>{const t=e["text/plain"];return!!t&&0===t.indexOf("file://")})(r))&&SD(e,n,o))return;const a=r[QA()],i=a||r["text/html"]||r["text/plain"],l=((e,t,n,o)=>{const r=e.getParent(n,(e=>Rs(t,e)));if(r&&Se(o,"text/html")){const e=(new DOMParser).parseFromString(o["text/html"],"text/html").body;return!v(e.querySelector(r.nodeName.toLowerCase()))}return!1})(e.dom,e.schema,o.startContainer,r);t.get()&&!l||i&&(n.preventDefault(),Tg.setEditorTimeout(e,(()=>{e.undoManager.transact((()=>{a&&e.execCommand("Delete"),MD(e,o);const t=lD(i);r["text/html"]?vD(e,t,s):yD(e,t)}))})))})),e.on("dragstart",(e=>{t.set(!0)})),e.on("dragover dragend",(n=>{Wd(e)&&!t.get()&&(n.preventDefault(),MD(e,LD(e,n))),"dragend"===n.type&&t.set(!1)}))},FD=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,UD=e=>Pt.trim(e).replace(FD,eu).toLowerCase(),zD=(e,t,n)=>{const o=Yd(e);if(n||"all"===o||!Xd(e))return t;const r=o?o.split(/[, ]/):[];if(r&&"none"!==o){const n=e.dom,o=e.selection.getNode();t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,((e,t,s,a)=>{const i=n.parseStyle(n.decode(s)),l={};for(let e=0;e<r.length;e++){const t=i[r[e]];let s=t,a=n.getStyle(o,r[e],!0);/color/.test(r[e])&&(s=UD(s),a=UD(a)),a!==s&&(l[r[e]]=t)}const d=n.serializeStyle(l,"span");return d?t+' style="'+d+'"'+a:t+a}))}else t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return t=t.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,((e,t,n,o)=>t+' style="'+n+'"'+o)),t},jD=e=>{const t=Ia(!1),n=Ia(Zd(e)?"text":"html"),o=aD(e);(e=>{(Dt.browser.isChromium()||Dt.browser.isSafari())&&((e,t)=>{e.on("PastePreProcess",(n=>{n.content=t(e,n.content,n.internal)}))})(e,zD)})(e),AD(e,n),(e=>{const t=t=>n=>{t(e,n)},n=Kd(e);k(n)&&e.on("PastePreProcess",t(n));const o=Gd(e);k(o)&&e.on("PastePostProcess",t(o))})(e),e.on("PreInit",(()=>{PD(e),ID(e,t),RD(e,o,n)}))},HD=e=>{(e=>{e.on("click",(t=>{e.dom.getParent(t.target,"details")&&t.preventDefault()}))})(e),(e=>{e.parser.addNodeFilter("details",(e=>{K(e,(e=>{e.attr("data-mce-open",e.attr("open")),e.attr("open","open")}))})),e.serializer.addNodeFilter("details",(e=>{K(e,(e=>{const t=e.attr("data-mce-open");e.attr("open",g(t)?t:null),e.attr("data-mce-open",null)}))}))})(e)},$D=nr,VD=Xo,qD=e=>sr(e.dom),WD=e=>t=>wn(bn.fromDom(e),t),KD=(e,t)=>Yn(bn.fromDom(e),(e=>(e=>rr(e.dom))(e)||vr(e)),WD(t)).getOr(bn.fromDom(t)).dom,GD=(e,t)=>Yn(bn.fromDom(e),qD,WD(t)),YD=(e,t,n)=>{const o=new Fo(e,t),r=n?o.next.bind(o):o.prev.bind(o);let s=e;for(let t=n?e:r();t&&!$D(t);t=r())ns(t)&&(s=t);return s},XD=e=>{const t=((e,t)=>{const n=Hi.fromRangeStart(e).getNode(),o=KD(n,t),r=YD(n,o,!1),s=YD(n,o,!0),a=document.createRange();return GD(r,o).fold((()=>{VD(r)?a.setStart(r,0):a.setStartBefore(r)}),(e=>a.setStartBefore(e.dom))),GD(s,o).fold((()=>{VD(s)?a.setEnd(s,s.data.length):a.setEndAfter(s)}),(e=>a.setEndAfter(e.dom))),a})(e.selection.getRng(),e.getBody());e.selection.setRng(jb(t))};var QD;!function(e){e.Before="before",e.After="after"}(QD||(QD={}));const JD=(e,t)=>Math.abs(e.left-t),ZD=(e,t)=>Math.abs(e.right-t),eO=(e,t)=>{const n=((e,t)=>Math.max(0,Math.min(e.bottom,t.bottom)-Math.max(e.top,t.top)))(e,t)/Math.min(e.height,t.height);return((e,t)=>e.top<t.bottom&&e.bottom>t.top)(e,t)&&n>.5},tO=(e,t)=>(e=>J(e,((e,t)=>e.fold((()=>U.some(t)),(e=>{const n=Math.min(t.left,e.left),o=Math.min(t.top,e.top),r=Math.max(t.right,e.right),s=Math.max(t.bottom,e.bottom);return U.some({top:o,right:r,bottom:s,left:n,width:r-n,height:s-o})}))),U.none()))(X(e,(e=>{return(n=t)>=(o=e).top&&n<=o.bottom;var n,o}))).fold((()=>[[],e]),(t=>{const{pass:n,fail:o}=Y(e,(e=>eO(e,t)));return[n,o]})),nO=(e,t,n)=>t>e.left&&t<e.right?0:Math.min(Math.abs(e.left-t),Math.abs(e.right-t)),oO=(e,t,n)=>{const o=e=>ns(e.node)?U.some(e):jo(e.node)?oO(ue(e.node.childNodes),t,n):U.none(),r=(e,r)=>{const s=le(e,((e,o)=>r(e,t,n)-r(o,t,n)));return((e,r)=>{if(e.length>=2){const s=o(e[0]).getOr(e[0]),a=o(e[1]).getOr(e[1]);if(Math.abs(r(s,t,n)-r(a,t,n))<2){if(Xo(s.node))return U.some(s);if(Xo(a.node))return U.some(a)}}return U.none()})(s,r).orThunk((()=>fe(s,o)))},[s,a]=tO(GE(e),n),{pass:i,fail:l}=Y(a,(e=>e.top<n));return r(s,nO).orThunk((()=>r(l,yi))).orThunk((()=>r(i,yi)))},rO=(e,t,n)=>{const o=bn.fromDom(e),r=En(o),s=bn.fromPoint(r,t,n).filter((e=>xn(o,e))).getOr(o);return((e,t,n,o)=>{const r=(t,s)=>{const a=X(t.dom.childNodes,B((e=>jo(e)&&e.classList.contains("mce-drag-container"))));return s.fold((()=>oO(a,n,o)),(e=>{const t=X(a,(t=>t!==e.dom));return oO(t,n,o)})).orThunk((()=>(wn(t,e)?U.none():Nn(t)).bind((e=>r(e,U.some(t))))))};return r(t,U.none())})(o,s,t,n)},sO=(e,t,n)=>rO(e,t,n).filter((e=>Ac(e.node))).map((e=>((e,t)=>({node:e.node,position:JD(e,t)<ZD(e,t)?QD.Before:QD.After}))(e,t))),aO=e=>{var t,n;const o=e.getBoundingClientRect(),r=e.ownerDocument,s=r.documentElement,a=r.defaultView;return{top:o.top+(null!==(t=null==a?void 0:a.scrollY)&&void 0!==t?t:0)-s.clientTop,left:o.left+(null!==(n=null==a?void 0:a.scrollX)&&void 0!==n?n:0)-s.clientLeft}},iO=(e,t)=>{return n=(e=>e.inline?aO(e.getBody()):{left:0,top:0})(e),o=(e=>{const t=e.getBody();return e.inline?{left:t.scrollLeft,top:t.scrollTop}:{left:0,top:0}})(e),r=((e,t)=>{if(t.target.ownerDocument!==e.getDoc()){const n=aO(e.getContentAreaContainer()),o=(e=>{const t=e.getBody(),n=e.getDoc().documentElement,o={left:t.scrollLeft,top:t.scrollTop},r={left:t.scrollLeft||n.scrollLeft,top:t.scrollTop||n.scrollTop};return e.inline?o:r})(e);return{left:t.pageX-n.left+o.left,top:t.pageY-n.top+o.top}}return{left:t.pageX,top:t.pageY}})(e,t),{pageX:r.left-n.left+o.left,pageY:r.top-n.top+o.top};var n,o,r},lO=e=>({target:e,srcElement:e}),dO=e=>(t,n)=>((e,t,n)=>({...t,dataTransfer:null,type:e,...n}))(e,t,lO(n)),cO=dO("dragstart"),mO=dO("drop"),uO=(e=>t=>((e,t)=>{const n=P("Function not supported on simulated event.");return{bubbles:!0,cancelBubble:!1,cancelable:!0,composed:!1,currentTarget:null,defaultPrevented:!1,eventPhase:0,isTrusted:!0,returnValue:!1,srcElement:null,target:null,timeStamp:0,type:e,composedPath:n,initEvent:n,preventDefault:_,stopImmediatePropagation:_,stopPropagation:_,AT_TARGET:window.Event.AT_TARGET,BUBBLING_PHASE:window.Event.BUBBLING_PHASE,CAPTURING_PHASE:window.Event.CAPTURING_PHASE,NONE:window.Event.NONE,altKey:!1,button:0,buttons:0,clientX:0,clientY:0,ctrlKey:!1,metaKey:!1,movementX:0,movementY:0,offsetX:0,offsetY:0,pageX:0,pageY:0,relatedTarget:null,screenX:0,screenY:0,shiftKey:!1,x:0,y:0,detail:0,view:null,which:0,initUIEvent:n,initMouseEvent:n,getModifierState:n,dataTransfer:null,...t}})(e,lO(t)))("dragend"),fO=dO("dragend"),gO=sr,pO=((...e)=>t=>{for(let n=0;n<e.length;n++)if(e[n](t))return!0;return!1})(gO,rr),hO=(e,t,n,o)=>{const r=e.dom,s=t.cloneNode(!0);r.setStyles(s,{width:n,height:o}),r.setAttrib(s,"data-mce-selected",null);const a=r.create("div",{class:"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return r.setStyles(a,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:o}),r.setStyles(s,{margin:0,boxSizing:"border-box"}),a.appendChild(s),a},bO=(e,t)=>n=>()=>{const o="left"===e?n.scrollX:n.scrollY;n.scroll({[e]:o+t,behavior:"smooth"})},vO=bO("left",-32),yO=bO("left",32),CO=bO("top",-32),wO=bO("top",32),xO=e=>{e&&e.parentNode&&e.parentNode.removeChild(e)},kO=(e,t)=>n=>{if((e=>0===e.button)(n)){const o=ee(t.dom.getParents(n.target),pO).getOr(null);if(x(o)&&((e,t,n)=>gO(n)&&n!==t&&e.isEditable(n.parentElement))(t.dom,t.getBody(),o)){const r=t.dom.getPos(o),s=t.getBody(),a=t.getDoc().documentElement;e.set({element:o,dragging:!1,screenX:n.screenX,screenY:n.screenY,maxX:(t.inline?s.scrollWidth:a.offsetWidth)-2,maxY:(t.inline?s.scrollHeight:a.offsetHeight)-2,relX:n.pageX-r.x,relY:n.pageY-r.y,width:o.offsetWidth,height:o.offsetHeight,ghost:hO(t,o,o.offsetWidth,o.offsetHeight),intervalId:$a(100)})}}},EO=(e,t)=>{const n=qa(((e,n)=>((e,t,n)=>{e._selectionOverrides.hideFakeCaret(),sO(e.getBody(),t,n).fold((()=>e.selection.placeCaretAt(t,n)),(o=>{const r=e._selectionOverrides.showCaret(1,o.node,o.position===QD.Before,!1);r?e.selection.setRng(r):e.selection.placeCaretAt(t,n)}))})(t,e,n)),0);t.on("remove",n.cancel);const o=e;return r=>e.on((e=>{const s=Math.max(Math.abs(r.screenX-e.screenX),Math.abs(r.screenY-e.screenY));if(!e.dragging&&s>10){if(t.dispatch("dragstart",cO(r,e.element)).isDefaultPrevented())return;e.dragging=!0,t.focus()}if(e.dragging){const s=r.currentTarget===t.getDoc().documentElement,l=((e,t)=>({pageX:t.pageX-e.relX,pageY:t.pageY+5}))(e,iO(t,r));a=e.ghost,i=t.getBody(),a.parentNode!==i&&i.appendChild(a),((e,t,n,o,r,s,a,i,l,d,c,m)=>{let u=0,f=0;e.style.left=t.pageX+"px",e.style.top=t.pageY+"px",t.pageX+n>r&&(u=t.pageX+n-r),t.pageY+o>s&&(f=t.pageY+o-s),e.style.width=n-u+"px",e.style.height=o-f+"px";const g=l.clientHeight,p=l.clientWidth,h=a+l.getBoundingClientRect().top,b=i+l.getBoundingClientRect().left;c.on((e=>{e.intervalId.clear(),e.dragging&&m&&(a+8>=g?e.intervalId.set(wO(d)):a-8<=0?e.intervalId.set(CO(d)):i+8>=p?e.intervalId.set(yO(d)):i-8<=0?e.intervalId.set(vO(d)):h+16>=window.innerHeight?e.intervalId.set(wO(window)):h-16<=0?e.intervalId.set(CO(window)):b+16>=window.innerWidth?e.intervalId.set(yO(window)):b-16<=0&&e.intervalId.set(vO(window)))}))})(e.ghost,l,e.width,e.height,e.maxX,e.maxY,r.clientY,r.clientX,t.getContentAreaContainer(),t.getWin(),o,s),n.throttle(r.clientX,r.clientY)}var a,i}))},SO=(e,t)=>n=>{e.on((e=>{var o;if(e.intervalId.clear(),e.dragging){if(((e,t,n)=>!w(t)&&t!==n&&!e.dom.isChildOf(t,n)&&e.dom.isEditable(t))(t,(e=>{const t=e.getSel();if(x(t)){const e=t.getRangeAt(0).startContainer;return Xo(e)?e.parentNode:e}return null})(t.selection),e.element)){const r=(e=>{const t=e.cloneNode(!0);return t.removeAttribute("data-mce-selected"),t})(e.element),s=null!==(o=t.getDoc().elementFromPoint(n.clientX,n.clientY))&&void 0!==o?o:t.getBody();t.dispatch("drop",mO(n,s)).isDefaultPrevented()||t.undoManager.transact((()=>{((e,t)=>{const n=e.getParent(t.parentNode,e.isBlock);xO(t),n&&n!==e.getRoot()&&e.isEmpty(n)&&Or(bn.fromDom(n))})(t.dom,e.element),t.insertContent(t.dom.getOuterHTML(r)),t._selectionOverrides.hideFakeCaret()}))}t.dispatch("dragend",fO(n,t.getBody()))}})),NO(e)},_O=(e,t,n)=>{e.on((e=>{if(e.intervalId.clear(),e.dragging){const o=n.fold((()=>uO(e.element)),(t=>fO(t,e.element)));t.dispatch("dragend",o)}})),NO(e)},NO=e=>{e.on((e=>{e.intervalId.clear(),xO(e.ghost)})),e.clear()},RO=e=>{const t=Va(),n=Pa.DOM,o=document,r=kO(t,e),s=EO(t,e),a=SO(t,e),i=((e,t)=>n=>_O(e,t,U.some(n)))(t,e);e.on("mousedown",r),e.on("mousemove",s),e.on("mouseup",a),n.bind(o,"mousemove",s),n.bind(o,"mouseup",i),e.on("remove",(()=>{n.unbind(o,"mousemove",s),n.unbind(o,"mouseup",i)})),e.on("keydown",(n=>{n.keyCode===gf.ESC&&_O(t,e,U.none())}))},AO=e=>{RO(e),Pd(e)&&(e=>{const t=t=>{if(!t.isDefaultPrevented()){const n=t.dataTransfer;n&&(V(n.types,"Files")||n.files.length>0)&&(t.preventDefault(),"drop"===t.type&&Ix(e,"Dropped file type is not supported"))}},n=n=>{Ig(e,n.target)&&t(n)},o=()=>{const o=Pa.DOM,r=e.dom,s=document,a=e.inline?e.getBody():e.getDoc(),i=["drop","dragover"];K(i,(e=>{o.bind(s,e,n),r.bind(a,e,t)})),e.on("remove",(()=>{K(i,(e=>{o.unbind(s,e,n),r.unbind(a,e,t)}))}))};e.on("init",(()=>{Tg.setEditorTimeout(e,o,0)}))})(e)},DO=sr,OO=(e,t)=>_b(e.getBody(),t),TO=e=>{const t=e.selection,n=e.dom,o=e.getBody(),r=_c(e,o,n.isBlock,(()=>qg(e))),s="sel-"+n.uniqueId(),a="data-mce-selected";let i;const l=e=>e!==o&&(DO(e)||lr(e))&&n.isChildOf(e,o)&&n.isEditable(e.parentNode),d=(n,o,s,a=!0)=>e.dispatch("ShowCaret",{target:o,direction:n,before:s}).isDefaultPrevented()?null:(a&&t.scrollIntoView(o,-1===n),r.show(s,o)),c=()=>{e.on("click",(t=>{n.isEditable(t.target)||(t.preventDefault(),e.focus())})),e.on("blur NewBlock",h),e.on("ResizeWindow FullscreenStateChanged",r.reposition),e.on("tap",(t=>{const n=t.target,o=OO(e,n);DO(o)?(t.preventDefault(),Pk(e,o).each(p)):l(n)&&Pk(e,n).each(p)}),!0),e.on("mousedown",(r=>{const s=r.target;if(s!==o&&"HTML"!==s.nodeName&&!n.isChildOf(s,o))return;if(!Dx(e,r.clientX,r.clientY))return;h(),b();const a=OO(e,s);DO(a)?(r.preventDefault(),Pk(e,a).each(p)):sO(o,r.clientX,r.clientY).each((n=>{r.preventDefault();(e=>{e&&t.setRng(e)})(d(1,n.node,n.position===QD.Before,!1)),jo(a)?a.focus():e.getBody().focus()}))})),e.on("keypress",(e=>{gf.modifierPressed(e)||DO(t.getNode())&&e.preventDefault()})),e.on("GetSelectionRange",(e=>{let t=e.range;if(i){if(!i.parentNode)return void(i=null);t=t.cloneRange(),t.selectNode(i),e.range=t}})),e.on("SetSelectionRange",(e=>{e.range=f(e.range);const t=p(e.range,e.forward);t&&(e.range=t)}));e.on("AfterSetSelectionRange",(e=>{const t=e.range,o=t.startContainer.parentElement;var r;u(t)||jo(r=o)&&"mcepastebin"===r.id||b(),(e=>x(e)&&n.hasClass(e,"mce-offscreen-selection"))(o)||h()})),AO(e),(e=>{const t=qa((()=>{if(!e.removed&&e.getBody().contains(document.activeElement)){const t=e.selection.getRng();if(t.collapsed){const n=Lk(e,t,!1);e.selection.setRng(n)}}}),0);e.on("focus",(()=>{t.throttle()})),e.on("blur",(()=>{t.cancel()}))})(e),(e=>{e.on("init",(()=>{e.on("focusin",(t=>{const n=t.target;if(lr(n)){const t=_b(e.getBody(),n),o=sr(t)?t:n;e.selection.getNode()!==o&&Pk(e,o).each((t=>e.selection.setRng(t)))}}))}))})(e)},m=e=>zr(e)||Vr(e)||qr(e),u=e=>m(e.startContainer)||m(e.endContainer),f=t=>{const o=e.schema.getVoidElements(),r=n.createRng(),s=t.startContainer,a=t.startOffset,i=t.endContainer,l=t.endOffset;return Se(o,s.nodeName.toLowerCase())?0===a?r.setStartBefore(s):r.setStartAfter(s):r.setStart(s,a),Se(o,i.nodeName.toLowerCase())?0===l?r.setEndBefore(i):r.setEndAfter(i):r.setEnd(i,l),r},g=o=>{const r=o.cloneNode(!0),l=e.dispatch("ObjectSelected",{target:o,targetClone:r});if(l.isDefaultPrevented())return null;const d=((o,r)=>{const a=bn.fromDom(e.getBody()),i=e.getDoc(),l=Jn(a,"#"+s).getOrThunk((()=>{const e=bn.fromHtml('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>',i);return Jt(e,"id",s),po(a,e),e})),d=n.createRng();vo(l),bo(l,[bn.fromText(mr,i),bn.fromDom(r),bn.fromText(mr,i)]),d.setStart(l.dom.firstChild,1),d.setEnd(l.dom.lastChild,0),so(l,{top:n.getPos(o,e.getBody()).y+"px"}),yg(l);const c=t.getSel();return c&&(c.removeAllRanges(),c.addRange(d)),d})(o,l.targetClone),c=bn.fromDom(o);return K(Mo(bn.fromDom(e.getBody()),"*[data-mce-selected]"),(e=>{wn(c,e)||on(e,a)})),n.getAttrib(o,a)||o.setAttribute(a,"1"),i=o,b(),d},p=(e,t)=>{if(!e)return null;if(e.collapsed){if(!u(e)){const r=t?1:-1,s=Zc(r,o,e),a=s.getNode(!t);if(x(a)){if(Ac(a))return d(r,a,!!t&&!s.isAtEnd(),!1);if(Ur(a)&&sr(a.nextSibling)){const e=n.createRng();return e.setStart(a,0),e.setEnd(a,0),e}}const i=s.getNode(t);if(x(i)){if(Ac(i))return d(r,i,!t&&!s.isAtEnd(),!1);if(Ur(i)&&sr(i.previousSibling)){const e=n.createRng();return e.setStart(i,1),e.setEnd(i,1),e}}}return null}let r=e.startContainer,s=e.startOffset;const a=e.endOffset;if(Xo(r)&&0===s&&DO(r.parentNode)&&(r=r.parentNode,s=n.nodeIndex(r),r=r.parentNode),!jo(r))return null;if(a===s+1&&r===e.endContainer){const e=r.childNodes[s];if(l(e))return g(e)}return null},h=()=>{i&&i.removeAttribute(a),Jn(bn.fromDom(e.getBody()),"#"+s).each(yo),i=null},b=()=>{r.hide()};return zw(e)||c(),{showCaret:d,showBlockCaretContainer:e=>{e.hasAttribute("data-mce-caret")&&(Wr(e),t.scrollIntoView(e))},hideFakeCaret:b,destroy:()=>{r.destroy(),i=null}}},BO=(e,t)=>{let n=t;for(let t=e.previousSibling;Xo(t);t=t.previousSibling)n+=t.data.length;return n},PO=(e,t,n,o,r)=>{if(Xo(n)&&(o<0||o>n.data.length))return[];const s=r&&Xo(n)?[BO(n,o)]:[o];let a=n;for(;a!==t&&a.parentNode;)s.push(e.nodeIndex(a,r)),a=a.parentNode;return a===t?s.reverse():[]},LO=(e,t,n,o,r,s,a=!1)=>({start:PO(e,t,n,o,a),end:PO(e,t,r,s,a)}),MO=(e,t)=>{const n=t.slice(),o=n.pop();if(E(o)){return J(n,((e,t)=>e.bind((e=>U.from(e.childNodes[t])))),U.some(e)).bind((e=>Xo(e)&&(o<0||o>e.data.length)?U.none():U.some({node:e,offset:o})))}return U.none()},IO=(e,t)=>MO(e,t.start).bind((({node:n,offset:o})=>MO(e,t.end).map((({node:e,offset:t})=>{const r=document.createRange();return r.setStart(n,o),r.setEnd(e,t),r})))),FO=(e,t,n)=>{if(t&&e.isEmpty(t)&&!n(t)){const o=t.parentNode;e.remove(t),FO(e,o,n)}},UO=(e,t,n,o=!0)=>{const r=t.startContainer.parentNode,s=t.endContainer.parentNode;t.deleteContents(),o&&!n(t.startContainer)&&(Xo(t.startContainer)&&0===t.startContainer.data.length&&e.remove(t.startContainer),Xo(t.endContainer)&&0===t.endContainer.data.length&&e.remove(t.endContainer),FO(e,r,n),r!==s&&FO(e,s,n))},zO=(e,t)=>U.from(e.dom.getParent(t.startContainer,e.dom.isBlock)),jO=(e,t,n)=>{const o=e.dynamicPatternsLookup({text:n,block:t});return{...e,blockPatterns:vl(o).concat(e.blockPatterns),inlinePatterns:yl(o).concat(e.inlinePatterns)}},HO=(e,t,n,o)=>{const r=e.createRng();return r.setStart(t,0),r.setEnd(n,o),r.toString()},$O=(e,t,n)=>{const o=((e,t,n)=>{if(Xo(e)&&t>=e.length)return U.some(sN(e,t));{const o=ui(aN);return U.from(o.forwards(e,t,iN(e),n)).map((e=>sN(e.container,0)))}})(t,0,t);o.each((o=>{const r=o.container;cN(r,n.start.length,t).each((n=>{const o=e.createRng();o.setStart(r,0),o.setEnd(n.container,n.offset),UO(e,o,(e=>e===t))}));const s=bn.fromDom(r),a=gr(s);/^\s[^\s]/.test(a)&&((e,t)=>{fr.set(e,t)})(s,a.slice(1))}))},VO=(e,t)=>{const n=e.dom,o=t.pattern,r=IO(n.getRoot(),t.range).getOrDie("Unable to resolve path range");return zO(e,r).each((t=>{"block-format"===o.type?((e,t)=>{const n=t.get(e);return b(n)&&ce(n).exists((e=>Se(e,"block")))})(o.format,e.formatter)&&e.undoManager.transact((()=>{$O(e.dom,t,o),e.formatter.apply(o.format)})):"block-command"===o.type&&e.undoManager.transact((()=>{$O(e.dom,t,o),e.execCommand(o.cmd,!1,o.value)}))})),!0},qO=(e,t)=>{const n=(e=>le(e,((e,t)=>t.start.length-e.start.length)))(e),o=t.replace(mr," ");return ee(n,(e=>0===t.indexOf(e.start)||0===o.indexOf(e.start)))},WO=(e,t)=>e.create("span",{"data-mce-type":"bookmark",id:t}),KO=(e,t)=>{const n=e.createRng();return n.setStartAfter(t.start),n.setEndBefore(t.end),n},GO=(e,t,n)=>{const o=IO(e.getRoot(),n).getOrDie("Unable to resolve path range"),r=o.startContainer,s=o.endContainer,a=0===o.endOffset?s:s.splitText(o.endOffset),i=0===o.startOffset?r:r.splitText(o.startOffset),l=i.parentNode;return{prefix:t,end:a.parentNode.insertBefore(WO(e,t+"-end"),a),start:l.insertBefore(WO(e,t+"-start"),i)}},YO=(e,t,n)=>{FO(e,e.get(t.prefix+"-end"),n),FO(e,e.get(t.prefix+"-start"),n)},XO=e=>0===e.start.length,QO=(e,t,n,o)=>{const r=t.start;var s;return mN(e,o.container,o.offset,(s=r,(e,t)=>{const n=e.data.substring(0,t),o=n.lastIndexOf(s.charAt(s.length-1)),r=n.lastIndexOf(s);return-1!==r?r+s.length:-1!==o?o+1:-1}),n).bind((o=>{var s,a;const i=null!==(a=null===(s=n.textContent)||void 0===s?void 0:s.indexOf(r))&&void 0!==a?a:-1;if(-1!==i&&o.offset>=i+r.length){const t=e.createRng();return t.setStart(o.container,o.offset-r.length),t.setEnd(o.container,o.offset),U.some(t)}{const s=o.offset-r.length;return dN(o.container,s,n).map((t=>{const n=e.createRng();return n.setStart(t.container,t.offset),n.setEnd(o.container,o.offset),n})).filter((e=>e.toString()===r)).orThunk((()=>QO(e,t,n,sN(o.container,0))))}}))},JO=(e,t,n,o)=>{const r=e.dom,s=r.getRoot(),a=n.pattern,i=n.position.container,l=n.position.offset;return dN(i,l-n.pattern.end.length,t).bind((d=>{const c=LO(r,s,d.container,d.offset,i,l,o);if(XO(a))return U.some({matches:[{pattern:a,startRng:c,endRng:c}],position:d});{const i=ZO(e,n.remainingPatterns,d.container,d.offset,t,o),l=i.getOr({matches:[],position:d}),m=l.position,u=((e,t,n,o,r,s=!1)=>{if(0===t.start.length&&!s){const t=e.createRng();return t.setStart(n,o),t.setEnd(n,o),U.some(t)}return lN(n,o,r).bind((n=>QO(e,t,r,n).bind((e=>{var t;if(s){if(e.endContainer===n.container&&e.endOffset===n.offset)return U.none();if(0===n.offset&&(null===(t=e.endContainer.textContent)||void 0===t?void 0:t.length)===e.endOffset)return U.none()}return U.some(e)}))))})(r,a,m.container,m.offset,t,i.isNone());return u.map((e=>{const t=((e,t,n,o=!1)=>LO(e,t,n.startContainer,n.startOffset,n.endContainer,n.endOffset,o))(r,s,e,o);return{matches:l.matches.concat([{pattern:a,startRng:t,endRng:c}]),position:sN(e.startContainer,e.startOffset)}}))}}))},ZO=(e,t,n,o,r,s)=>{const a=e.dom;return lN(n,o,a.getRoot()).bind((i=>{const l=HO(a,r,n,o);for(let a=0;a<t.length;a++){const d=t[a];if(!qe(l,d.end))continue;const c=t.slice();c.splice(a,1);const m=JO(e,r,{pattern:d,remainingPatterns:c,position:i},s);if(m.isNone()&&o>0)return ZO(e,t,n,o-1,r,s);if(m.isSome())return m}return U.none()}))},eT=(e,t,n)=>{e.selection.setRng(n),"inline-format"===t.type?K(t.format,(t=>{e.formatter.apply(t)})):e.execCommand(t.cmd,!1,t.value)},tT=(e,t,n,o,r,s)=>{var a;return((e,t)=>{const n=re(e,(e=>q(t,(t=>e.pattern.start===t.pattern.start&&e.pattern.end===t.pattern.end))));return e.length===t.length?n?e:t:e.length>t.length?e:t})(ZO(e,r.inlinePatterns,n,o,t,s).fold((()=>[]),(e=>e.matches)),ZO(e,(a=r.inlinePatterns,le(a,((e,t)=>t.end.length-e.end.length))),n,o,t,s).fold((()=>[]),(e=>e.matches)))},nT=(e,t)=>{if(0===t.length)return;const n=e.dom,o=e.selection.getBookmark(),r=((e,t)=>{const n=ai("mce_textpattern"),o=Q(t,((t,o)=>{const r=GO(e,n+`_end${t.length}`,o.endRng);return t.concat([{...o,endMarker:r}])}),[]);return Q(o,((t,r)=>{const s=o.length-t.length-1,a=XO(r.pattern)?r.endMarker:GO(e,n+`_start${s}`,r.startRng);return t.concat([{...r,startMarker:a}])}),[])})(n,t);K(r,(t=>{const o=n.getParent(t.startMarker.start,n.isBlock),r=e=>e===o;XO(t.pattern)?((e,t,n,o)=>{const r=KO(e.dom,n);UO(e.dom,r,o),eT(e,t,r)})(e,t.pattern,t.endMarker,r):((e,t,n,o,r)=>{const s=e.dom,a=KO(s,o),i=KO(s,n);UO(s,i,r),UO(s,a,r);const l={prefix:n.prefix,start:n.end,end:o.start},d=KO(s,l);eT(e,t,d)})(e,t.pattern,t.startMarker,t.endMarker,r),YO(n,t.endMarker,r),YO(n,t.startMarker,r)})),e.selection.moveToBookmark(o)},oT=(e,t)=>{const n=e.selection.getRng();return zO(e,n).map((o=>{var r;const s=Math.max(0,n.startOffset),a=jO(t,o,null!==(r=o.textContent)&&void 0!==r?r:""),i=tT(e,o,n.startContainer,s,a,!0),l=((e,t,n,o)=>{var r;const s=e.dom,a=Ll(e);if(!s.is(t,a))return[];const i=null!==(r=t.textContent)&&void 0!==r?r:"";return qO(n.blockPatterns,i).map((e=>Pt.trim(i).length===e.start.length?[]:[{pattern:e,range:LO(s,s.getRoot(),t,0,t,0,o)}])).getOr([])})(e,o,a,!0);return(l.length>0||i.length>0)&&(e.undoManager.add(),e.undoManager.extra((()=>{e.execCommand("mceInsertNewLine")}),(()=>{e.insertContent(cr),nT(e,i),((e,t)=>{if(0===t.length)return;const n=e.selection.getBookmark();K(t,(t=>VO(e,t))),e.selection.moveToBookmark(n)})(e,l);const t=e.selection.getRng(),n=lN(t.startContainer,t.startOffset,e.dom.getRoot());e.execCommand("mceInsertNewLine"),n.each((t=>{const n=t.container;n.data.charAt(t.offset-1)===cr&&(n.deleteData(t.offset-1,1),FO(e.dom,n.parentNode,(t=>t===e.dom.getRoot())))}))})),!0)})).getOr(!1)},rT=(e,t,n)=>{for(let o=0;o<e.length;o++)if(n(e[o],t))return!0;return!1},sT=e=>{const t=[",",".",";",":","!","?"],n=[32],o=()=>{return t=nc(e),n=oc(e),{inlinePatterns:yl(t),blockPatterns:vl(t),dynamicPatternsLookup:n};var t,n},r=()=>(e=>e.options.isSet("text_patterns_lookup"))(e);e.on("keydown",(t=>{if(13===t.keyCode&&!gf.modifierPressed(t)&&e.selection.isCollapsed()){const n=o();(n.inlinePatterns.length>0||n.blockPatterns.length>0||r())&&oT(e,n)&&t.preventDefault()}}),!0);const s=()=>{if(e.selection.isCollapsed()){const t=o();(t.inlinePatterns.length>0||r())&&((e,t)=>{const n=e.selection.getRng();zO(e,n).map((o=>{const r=Math.max(0,n.startOffset-1),s=HO(e.dom,o,n.startContainer,r),a=jO(t,o,s),i=tT(e,o,n.startContainer,r,a,!1);i.length>0&&e.undoManager.transact((()=>{nT(e,i)}))}))})(e,t)}};e.on("keyup",(e=>{rT(n,e,((e,t)=>e===t.keyCode&&!gf.modifierPressed(t)))&&s()})),e.on("keypress",(n=>{rT(t,n,((e,t)=>e.charCodeAt(0)===t.charCode))&&Tg.setEditorTimeout(e,s)}))},aT=e=>{const t=Pt.each,n=gf.BACKSPACE,o=gf.DELETE,r=e.dom,s=e.selection,a=e.parser,i=Dt.browser,l=i.isFirefox(),d=i.isChromium()||i.isSafari(),c=Dt.deviceType.isiPhone()||Dt.deviceType.isiPad(),m=Dt.os.isMacOS()||Dt.os.isiOS(),u=(t,n)=>{try{e.getDoc().execCommand(t,!1,String(n))}catch(e){}},f=e=>e.isDefaultPrevented(),g=()=>{const t=e=>{const t=r.create("body"),n=e.cloneContents();return t.appendChild(n),s.serializer.serialize(t,{format:"html"})};e.on("keydown",(s=>{const a=s.keyCode;if(!f(s)&&(a===o||a===n)&&e.selection.isEditable()){const n=e.selection.isCollapsed(),o=e.getBody();if(n&&!r.isEmpty(o))return;if(!n&&!(n=>{const o=t(n),s=r.createRng();return s.selectNode(e.getBody()),o===t(s)})(e.selection.getRng()))return;s.preventDefault(),e.setContent(""),o.firstChild&&r.isBlock(o.firstChild)?e.selection.setCursorLocation(o.firstChild,0):e.selection.setCursorLocation(o,0),e.nodeChanged()}}))},p=()=>{e.shortcuts.add("meta+a",null,"SelectAll")},h=()=>{e.inline||r.bind(e.getDoc(),"mousedown mouseup",(t=>{let n;if(t.target===e.getDoc().documentElement)if(n=s.getRng(),e.getBody().focus(),"mousedown"===t.type){if(zr(n.startContainer))return;s.placeCaretAt(t.clientX,t.clientY)}else s.setRng(n)}))},b=()=>{Range.prototype.getClientRects||e.on("mousedown",(t=>{if(!f(t)&&"HTML"===t.target.nodeName){const t=e.getBody();t.blur(),Tg.setEditorTimeout(e,(()=>{t.focus()}))}}))},v=()=>{const t=Id(e);e.on("click",(n=>{const o=n.target;/^(IMG|HR)$/.test(o.nodeName)&&r.isEditable(o.parentNode)&&(n.preventDefault(),e.selection.select(o),e.nodeChanged()),"A"===o.nodeName&&r.hasClass(o,t)&&0===o.childNodes.length&&r.isEditable(o.parentNode)&&(n.preventDefault(),s.select(o))}))},y=()=>{e.on("keydown",(e=>{if(!f(e)&&e.keyCode===n&&s.isCollapsed()&&0===s.getRng().startOffset){const t=s.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}return!0}))},C=()=>{const t=()=>{u("StyleWithCSS",!1),u("enableInlineTableEditing",!1),ld(e)||u("enableObjectResizing",!1)};Dd(e)||e.on("BeforeExecCommand mousedown",t)},w=()=>{e.on("SetContent ExecCommand",(e=>{"setcontent"!==e.type&&"mceInsertLink"!==e.command||t(r.select("a:not([data-mce-block])"),(e=>{var t;let n=e.parentNode;const o=r.getRoot();if((null==n?void 0:n.lastChild)===e){for(;n&&!r.isBlock(n);){if((null===(t=n.parentNode)||void 0===t?void 0:t.lastChild)!==n||n===o)return;n=n.parentNode}r.add(n,"br",{"data-mce-bogus":1})}}))}))},x=()=>{e.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")},k=()=>{e.inline||e.on("keydown",(()=>{document.activeElement===document.body&&e.getWin().focus()}))},E=()=>{e.inline||(e.contentStyles.push("body {min-height: 150px}"),e.on("click",(t=>{let n;"HTML"===t.target.nodeName&&(n=e.selection.getRng(),e.getBody().focus(),e.selection.setRng(n),e.selection.normalize(),e.nodeChanged())})))},S=()=>{m&&e.on("keydown",(t=>{if(gf.metaKeyPressed(t)&&!t.shiftKey&&(37===t.keyCode||39===t.keyCode)){t.preventDefault();e.selection.getSel().modify("move",37===t.keyCode?"backward":"forward","lineboundary")}}))},N=()=>{e.on("click",(e=>{let t=e.target;do{if("A"===t.tagName)return void e.preventDefault()}while(t=t.parentNode)})),e.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")},R=()=>{e.on("init",(()=>{e.dom.bind(e.getBody(),"submit",(e=>{e.preventDefault()}))}))},A=_,D=()=>{e.on("keydown",(t=>{if(f(t)||t.keyCode!==gf.BACKSPACE)return;let n=s.getRng();const o=n.startContainer,a=n.startOffset,i=r.getRoot();let l=o;if(n.collapsed&&0===a){for(;l.parentNode&&l.parentNode.firstChild===l&&l.parentNode!==i;)l=l.parentNode;"BLOCKQUOTE"===l.nodeName&&(e.formatter.toggle("blockquote",void 0,l),n=r.createRng(),n.setStart(o,0),n.setEnd(o,0),s.setRng(n))}})),g(),Dt.windowsPhone||e.on("keyup focusin mouseup",(t=>{gf.modifierPressed(t)||(e=>{const t=e.getBody(),n=e.selection.getRng();return n.startContainer===n.endContainer&&n.startContainer===t&&0===n.startOffset&&n.endOffset===t.childNodes.length})(e)||s.normalize()}),!0),d&&(h(),v(),e.on("init",(()=>{u("DefaultParagraphSeparator",Ll(e))})),R(),y(),a.addNodeFilter("br",(e=>{let t=e.length;for(;t--;)"Apple-interchange-newline"===e[t].attr("class")&&e[t].remove()})),c?(k(),E(),N()):p()),l&&(e.on("keydown",(t=>{if(!f(t)&&t.keyCode===n){if(!e.getBody().getElementsByTagName("hr").length)return;if(s.isCollapsed()&&0===s.getRng().startOffset){const e=s.getNode(),n=e.previousSibling;if("HR"===e.nodeName)return r.remove(e),void t.preventDefault();n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(r.remove(n),t.preventDefault())}}})),b(),(()=>{const n=()=>{const n=r.getAttribs(s.getStart().cloneNode(!1));return()=>{const o=s.getStart();o!==e.getBody()&&(r.setAttrib(o,"style",null),t(n,(e=>{o.setAttributeNode(e.cloneNode(!0))})))}},o=()=>!s.isCollapsed()&&r.getParent(s.getStart(),r.isBlock)!==r.getParent(s.getEnd(),r.isBlock);e.on("keypress",(t=>{let r;return!(!(f(t)||8!==t.keyCode&&46!==t.keyCode)&&o()&&(r=n(),e.getDoc().execCommand("delete",!1),r(),t.preventDefault(),1))})),r.bind(e.getDoc(),"cut",(t=>{if(!f(t)&&o()){const t=n();Tg.setEditorTimeout(e,(()=>{t()}))}}))})(),C(),w(),x(),S(),y())};return zw(e)?(d&&(h(),v(),R(),p(),c&&(k(),E(),N())),l&&(b(),C(),x(),S())):D(),{refreshContentEditable:A,isHidden:()=>{if(!l||e.removed)return!1;const t=e.selection.getSel();return!t||!t.rangeCount||0===t.rangeCount}}},iT=Pa.DOM,lT=e=>e.inline?e.getElement().nodeName.toLowerCase():void 0,dT=e=>we(e,(e=>!1===C(e))),cT=e=>{const t=e.options.get,n=e.editorUpload.blobCache;return dT({allow_conditional_comments:t("allow_conditional_comments"),allow_html_data_urls:t("allow_html_data_urls"),allow_svg_data_urls:t("allow_svg_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"),preserve_cdata:t("preserve_cdata"),remove_trailing_brs:t("remove_trailing_brs"),inline_styles:t("inline_styles"),root_name:lT(e),sanitize:t("xss_sanitization"),validate:!0,blob_cache:n,document:e.getDoc()})},mT=e=>{const t=e.options.get;return dT({custom_elements:t("custom_elements"),extended_valid_elements:t("extended_valid_elements"),invalid_elements:t("invalid_elements"),invalid_styles:t("invalid_styles"),schema:t("schema"),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"),padd_empty_block_inline_children:t("format_empty_lines")})},uT=e=>{e.bindPendingEventDelegates(),e.initialized=!0,(e=>{e.dispatch("Init")})(e),e.focus(!0),(e=>{const t=e.dom.getRoot();e.inline||cu(e)&&e.selection.getStart(!0)!==t||Sm(t).each((t=>{const n=t.getNode(),o=Ko(n)?Sm(n).getOr(t):t;e.selection.setRng(o.toRange())}))})(e),e.nodeChanged({initial:!0});const t=zd(e);k(t)&&t.call(e,e),(e=>{const t=Hd(e);t&&Tg.setEditorTimeout(e,(()=>{let n;n=!0===t?e:e.editorManager.get(t),n&&!n.destroyed&&(n.focus(),n.selection.scrollIntoView())}),100)})(e)},fT=e=>e.inline?e.ui.styleSheetLoader:e.dom.styleSheetLoader,gT=e=>{const t=fT(e),n=sd(e),o=e.contentCSS,r=()=>{t.unloadAll(o),e.inline||e.ui.styleSheetLoader.unloadAll(n)},s=()=>{e.removed?r():e.on("remove",r)};if(e.contentStyles.length>0){let t="";Pt.each(e.contentStyles,(e=>{t+=e+"\r\n"})),e.dom.addStyle(t)}const a=Promise.all(((e,t,n)=>{const o=[fT(e).loadAll(t)];return e.inline?o:o.concat([e.ui.styleSheetLoader.loadAll(n)])})(e,o,n)).then(s).catch(s),i=rd(e);return i&&((e,t)=>{const n=bn.fromDom(e.getBody()),o=Hn(jn(n)),r=bn.fromTag("style");Jt(r,"type","text/css"),po(r,bn.fromText(t)),po(o,r),e.on("remove",(()=>{yo(r)}))})(e,i),a},pT=e=>{!0!==e.removed&&((e=>{zw(e)||e.load({initial:!0,format:"html"}),e.startContent=e.getContent({format:"raw"})})(e),uT(e))},hT=e=>{const t=e.getElement();let n=e.getDoc();e.inline&&(iT.addClass(t,"mce-content-body"),e.contentDocument=n=document,e.contentWindow=window,e.bodyElement=t,e.contentAreaContainer=t);const o=e.getBody();o.disabled=!0,e.readonly=Dd(e),e.readonly||(e.inline&&"static"===iT.getStyle(o,"position",!0)&&(o.style.position="relative"),o.contentEditable="true"),o.disabled=!1,e.editorUpload=Xx(e),e.schema=fa(mT(e)),e.dom=Pa(n,{keep_values:!0,url_converter:e.convertURL,url_converter_scope:e,update_styles:!0,root_element:e.inline?e.getBody():null,collect:e.inline,schema:e.schema,contentCssCors:Ql(e),referrerPolicy:Jl(e),onSetAttrib:t=>{e.dispatch("SetAttrib",t)}}),e.parser=(e=>{const t=tw(cT(e),e.schema);return t.addAttributeFilter("src,href,style,tabindex",((t,n)=>{const o=e.dom,r="data-mce-"+n;let s=t.length;for(;s--;){const a=t[s];let i=a.attr(n);if(i&&!a.attr(r)){if(0===i.indexOf("data:")||0===i.indexOf("blob:"))continue;"style"===n?(i=o.serializeStyle(o.parseStyle(i),a.name),i.length||(i=null),a.attr(r,i),a.attr(n,i)):"tabindex"===n?(a.attr(r,i),a.attr(n,null)):a.attr(r,e.convertURL(i,n,a.name))}}})),t.addNodeFilter("script",(e=>{let t=e.length;for(;t--;){const n=e[t],o=n.attr("type")||"no/type";0!==o.indexOf("mce-")&&n.attr("type","mce-"+o)}})),ic(e)&&t.addNodeFilter("#cdata",(t=>{var n;let o=t.length;for(;o--;){const r=t[o];r.type=8,r.name="#comment",r.value="[CDATA["+e.dom.encode(null!==(n=r.value)&&void 0!==n?n:"")+"]]"}})),t.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",(t=>{let n=t.length;const o=e.schema.getNonEmptyElements();for(;n--;){const e=t[n];e.isEmpty(o)&&0===e.getAll("br").length&&e.append(new up("br",1))}})),t})(e),e.serializer=ox((e=>{const t=e.options.get;return{...cT(e),...mT(e),...dT({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")})}})(e),e),e.selection=Jw(e.dom,e.getWin(),e.serializer,e),e.annotator=rf(e),e.formatter=lk(e),e.undoManager=ck(e),e._nodeChangeDispatcher=new YA(e),e._selectionOverrides=TO(e),QS(e),HD(e),a_(e),zw(e)||((e=>{e.on("mousedown",(t=>{t.detail>=3&&(t.preventDefault(),XD(e))}))})(e),(e=>{sT(e)})(e));const r=GA(e);YS(e,r),(e=>{e.on("NodeChange",T(n_,e))})(e),pk(e),jD(e);const s=jw(e);(e=>{const t=e.getDoc(),n=e.getBody();(e=>{e.dispatch("PreInit")})(e),$d(e)||(t.body.spellcheck=!1,iT.setAttrib(n,"spellcheck","false")),e.quirks=aT(e),(e=>{e.dispatch("PostRender")})(e);const o=ad(e);void 0!==o&&(n.dir=o);const r=Vd(e);r&&e.on("BeforeSetContent",(e=>{Pt.each(r,(t=>{e.content=e.content.replace(t,(e=>"\x3c!--mce:protected "+escape(e)+"--\x3e"))}))})),e.on("SetContent",(()=>{e.addVisual(e.getBody())})),e.on("compositionstart compositionend",(t=>{e.composing="compositionstart"===t.type}))})(e),s.fold((()=>{gT(e).then((()=>pT(e)))}),(t=>{e.setProgressState(!0),gT(e).then((()=>{t().then((t=>{e.setProgressState(!1),pT(e),Vw(e)}),(t=>{e.notificationManager.open({type:"error",text:String(t)}),pT(e),Vw(e)}))}))}))},bT=F,vT=Pa.DOM,yT=(e,t)=>{const n=e.translate("Rich Text Area"),o=tn(bn.fromDom(e.getElement()),"tabindex").bind(Je),r=((e,t,n,o)=>{const r=bn.fromTag("iframe");return o.each((e=>Jt(r,"tabindex",e))),Zt(r,n),Zt(r,{id:e+"_ifr",frameBorder:"0",allowTransparency:"true",title:t}),mn(r,"tox-edit-area__iframe"),r})(e.id,n,Rl(e),o).dom;r.onload=()=>{r.onload=null,e.dispatch("load")},e.contentAreaContainer=t.iframeContainer,e.iframeElement=r,e.iframeHTML=(e=>{let t=Al(e)+"<html><head>";Dl(e)!==e.documentBaseUrl&&(t+='<base href="'+e.documentBaseURI.getURI()+'" />'),t+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';const n=Ol(e),o=Tl(e),r=e.translate(Fd(e));return Bl(e)&&(t+='<meta http-equiv="Content-Security-Policy" content="'+Bl(e)+'" />'),t+=`</head><body id="${n}" class="mce-content-body ${o}" data-id="${e.id}" aria-label="${r}"><br></body></html>`,t})(e),vT.add(t.iframeContainer,r)},CT=e=>{const t=e.iframeElement,n=(o=bn.fromDom(t),So(o,"load",bT,(()=>{n.unbind(),e.contentDocument=t.contentDocument,hT(e)})));var o;if(Dt.browser.isFirefox()){const t=e.getDoc();t.open(),t.write(e.iframeHTML),t.close()}else t.srcdoc=e.iframeHTML},wT=Pa.DOM,xT=(e,t,n)=>{const o=Bx.get(n),r=Bx.urls[n]||e.documentBaseUrl.replace(/\/$/,"");if(n=Pt.trim(n),o&&-1===Pt.inArray(t,n)){if(e.plugins[n])return;try{const s=o(e,r)||{};e.plugins[n]=s,k(s.init)&&(s.init(e,r),t.push(n))}catch(t){((e,t,n)=>{const o=ja.translate(["Failed to initialize plugin: {0}",t]);lf(e,"PluginLoadError",{message:o}),zx(o,n),Ix(e,o)})(e,n,t)}}},kT=(e,t)=>({editorContainer:e,iframeContainer:t,api:{}}),ET=e=>{const t=e.getElement();return e.inline?kT(null):(e=>{const t=wT.create("div");return wT.insertAfter(t,e),kT(t,t)})(t)},ST=e=>{const t=e.getElement();return e.orgDisplay=t.style.display,g(fd(e))?(e=>{const t=e.theme.renderUI;return t?t():ET(e)})(e):k(fd(e))?(e=>{const t=e.getElement(),n=fd(e)(e,t);return n.editorContainer.nodeType&&(n.editorContainer.id=n.editorContainer.id||e.id+"_parent"),n.iframeContainer&&n.iframeContainer.nodeType&&(n.iframeContainer.id=n.iframeContainer.id||e.id+"_iframecontainer"),n.height=n.iframeHeight?n.iframeHeight:t.offsetHeight,n})(e):ET(e)},_T=async e=>{e.dispatch("ScriptsLoaded"),(e=>{const t=Pt.trim(ql(e)),n=e.ui.registry.getAll().icons,o={...xx.get("default").icons,...xx.get(t).icons};he(o,((t,o)=>{Se(n,o)||e.ui.registry.addIcon(o,t)}))})(e),(e=>{const t=fd(e);if(g(t)){const n=Px.get(t);e.theme=n(e,Px.urls[t])||{},k(e.theme.init)&&e.theme.init(e,Px.urls[t]||e.documentBaseUrl.replace(/\/$/,""))}else e.theme={}})(e),(e=>{const t=pd(e),n=kx.get(t);e.model=n(e,kx.urls[t])})(e),(e=>{const t=[];K(Td(e),(n=>{xT(e,t,(e=>e.replace(/^\-/,""))(n))}))})(e);const t=await ST(e);((e,t)=>{const n={show:U.from(t.show).getOr(_),hide:U.from(t.hide).getOr(_),isEnabled:U.from(t.isEnabled).getOr(F),setEnabled:n=>{e.mode.isReadOnly()||U.from(t.setEnabled).each((e=>e(n)))}};e.ui={...e.ui,...n}})(e,U.from(t.api).getOr({})),e.editorContainer=t.editorContainer,Hx(e),e.inline?hT(e):((e,t)=>{yT(e,t),t.editorContainer&&(t.editorContainer.style.display=e.orgDisplay,e.hidden=vT.isHidden(t.editorContainer)),e.getElement().style.display="none",vT.setAttrib(e.id,"aria-hidden","true"),e.getElement().style.visibility=e.orgVisibility,CT(e)})(e,{editorContainer:t.editorContainer,iframeContainer:t.iframeContainer})},NT=Pa.DOM,RT=e=>"-"===e.charAt(0),AT=(e,t)=>{const n=Zl(t),o=ed(t);if(!ja.hasCode(n)&&"en"!==n){const r=Xe(o)?o:`${t.editorManager.baseURL}/langs/${n}.js`;e.add(r).catch((()=>{((e,t,n)=>{Fx(e,"LanguageLoadError",Ux("language",t,n))})(t,r,n)}))}},DT=(e,t)=>{const n=fd(e);if(g(n)&&!RT(n)&&!Se(Px.urls,n)){const o=gd(e),r=o?e.documentBaseURI.toAbsolute(o):`themes/${n}/theme${t}.js`;Px.load(n,r).catch((()=>{((e,t,n)=>{Fx(e,"ThemeLoadError",Ux("theme",t,n))})(e,r,n)}))}},OT=(e,t)=>{const n=pd(e);if("plugin"!==n&&!Se(kx.urls,n)){const o=hd(e),r=g(o)?e.documentBaseURI.toAbsolute(o):`models/${n}/model${t}.js`;kx.load(n,r).catch((()=>{((e,t,n)=>{Fx(e,"ModelLoadError",Ux("model",t,n))})(e,r,n)}))}},TT=(e,t,n)=>U.from(t).filter((e=>Xe(e)&&!xx.has(e))).map((t=>({url:`${e.editorManager.baseURL}/icons/${t}/icons${n}.js`,name:U.some(t)}))),BT=(e,t,n)=>{const o=TT(t,"default",n),r=(e=>U.from(Wl(e)).filter(Xe).map((e=>({url:e,name:U.none()}))))(t).orThunk((()=>TT(t,ql(t),"")));K((e=>{const t=[],n=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(n);return t})([o,r]),(n=>{e.add(n.url).catch((()=>{((e,t,n)=>{Fx(e,"IconsLoadError",Ux("icons",t,n))})(t,n.url,n.name.getOrUndefined())}))}))},PT=(e,t)=>{const n=(t,n)=>{Bx.load(t,n).catch((()=>{((e,t,n)=>{Fx(e,"PluginLoadError",Ux("plugin",t,n))})(e,n,t)}))};he(Bd(e),((t,o)=>{n(o,t),e.options.set("plugins",Td(e).concat(o))})),K(Td(e),(e=>{!(e=Pt.trim(e))||Bx.urls[e]||RT(e)||n(e,`plugins/${e}/plugin${t}.js`)}))},LT=(e,t)=>{const n=Ma.ScriptLoader,o=()=>{!e.removed&&(e=>{const t=fd(e);return!g(t)||x(Px.get(t))})(e)&&(e=>{const t=pd(e);return x(kx.get(t))})(e)&&_T(e)};DT(e,t),OT(e,t),AT(n,e),BT(n,e,t),PT(e,t),n.loadQueue().then(o,o)},MT=e=>{const t=e.id;ja.setCode(Zl(e));const n=()=>{NT.unbind(window,"ready",n),e.render()};if(!Ea.Event.domLoaded)return void NT.bind(window,"ready",n);if(!e.getElement())return;const o=bn.fromDom(e.getElement()),r=rn(o);e.on("remove",(()=>{G(o.dom.attributes,(e=>on(o,e.name))),Zt(o,r)})),e.ui.styleSheetLoader=((e,t)=>Ms.forElement(e,{contentCssCors:Od(t),referrerPolicy:Jl(t)}))(o,e),kd(e)?e.inline=!0:(e.orgVisibility=e.getElement().style.visibility,e.getElement().style.visibility="hidden");const s=e.getElement().form||NT.getParent(t,"form");s&&(e.formElement=s,Ed(e)&&!Yo(e.getElement())&&(NT.insertAfter(NT.create("input",{type:"hidden",name:t}),t),e.hasHiddenInput=!0),e.formEventDelegate=t=>{e.dispatch(t.type,t)},NT.bind(s,"submit reset",e.formEventDelegate),e.on("reset",(()=>{e.resetContent()})),!Sd(e)||s.submit.nodeType||s.submit.length||s._mceOldSubmit||(s._mceOldSubmit=s.submit,s.submit=()=>(e.editorManager.triggerSave(),e.setDirty(!1),s._mceOldSubmit(s)))),e.windowManager=Lx(e),e.notificationManager=Tx(e),(e=>"xml"===e.options.get("encoding"))(e)&&e.on("GetContent",(e=>{e.save&&(e.content=NT.encode(e.content))})),_d(e)&&e.on("submit",(()=>{e.initialized&&e.save()})),Nd(e)&&(e._beforeUnload=()=>{!e.initialized||e.destroyed||e.isHidden()||e.save({format:"raw",no_events:!0,set_dirty:!1})},e.editorManager.on("BeforeUnload",e._beforeUnload)),e.editorManager.add(e),LT(e,e.suffix)},IT=kt().deviceType,FT=IT.isPhone(),UT=IT.isTablet(),zT=e=>{if(w(e))return[];{const t=b(e)?e:e.split(/[ ,]/),n=W(t,Ke);return X(n,Xe)}},jT=(e,t)=>{const n=((e,t)=>{const n={},o={};return Ce(e,t,ye(n),ye(o)),{t:n,f:o}})(t,((t,n)=>V(e,n)));return o=n.t,r=n.f,{sections:A(o),options:A(r)};var o,r},HT=(e,t)=>Se(e.sections(),t),$T=(e,t)=>({...{table_grid:!1,object_resizing:!1,resize:!1,toolbar_mode:Ee(e,"toolbar_mode").getOr("scrolling"),toolbar_sticky:!1},...t?{menubar:!1}:{}}),VT=(e,t)=>{var n;const o=null!==(n=t.external_plugins)&&void 0!==n?n:{};return e&&e.external_plugins?Pt.extend({},e.external_plugins,o):o},qT=(e,t,n,o)=>{const r=zT(n.forced_plugins),s=zT(o.plugins),a=((e,t)=>HT(e,t)?e.sections()[t]:{})(t,"mobile"),i=((e,t,n,o)=>e&&HT(t,"mobile")?o:n)(e,t,s,a.plugins?zT(a.plugins):s),l=((e,t)=>[...zT(e),...zT(t)])(r,i);return Pt.extend(o,{forced_plugins:r,plugins:l})},WT=(e,t,n,o,r)=>{var s;const a=e?{mobile:$T(null!==(s=r.mobile)&&void 0!==s?s:{},t)}:{},i=jT(["mobile"],UN(a,r)),l=Pt.extend(n,o,i.options(),((e,t)=>e&&HT(t,"mobile"))(e,i)?((e,t,n={})=>{const o=e.sections(),r=Ee(o,t).getOr({});return Pt.extend({},n,r)})(i,"mobile"):{},{external_plugins:VT(o,i.options())});return qT(e,i,o,l)},KT=(e,t)=>((e,t)=>$w(e).editor.addVisual(t))(e,t),GT=e=>{const t=t=>()=>{K("left,center,right,justify".split(","),(n=>{t!==n&&e.formatter.remove("align"+n)})),"none"!==t&&((t,n)=>{e.formatter.toggle(t,n),e.nodeChanged()})("align"+t)};e.editorCommands.addCommands({JustifyLeft:t("left"),JustifyCenter:t("center"),JustifyRight:t("right"),JustifyFull:t("justify"),JustifyNone:t("none")})},YT=e=>{GT(e),(e=>{const t=t=>()=>{const n=e.selection,o=n.isCollapsed()?[e.dom.getParent(n.getNode(),e.dom.isBlock)]:n.getSelectedBlocks();return q(o,(n=>x(e.formatter.matchNode(n,t))))};e.editorCommands.addCommands({JustifyLeft:t("alignleft"),JustifyCenter:t("aligncenter"),JustifyRight:t("alignright"),JustifyFull:t("alignjustify")},"state")})(e)},XT=(e,t)=>{const n=e.selection,o=e.dom;return/^ | $/.test(t)?((e,t,n)=>{const o=bn.fromDom(e.getRoot());return n=fh(o,Hi.fromRangeStart(t))?n.replace(/^ /," "):n.replace(/^ /," "),gh(o,Hi.fromRangeEnd(t))?n.replace(/( | )(<br( \/)>)?$/," "):n.replace(/ (<br( \/)?>)?$/," ")})(o,n.getRng(),t):t},QT=(e,t)=>{if(e.selection.isEditable()){const{content:n,details:o}=(e=>{if("string"!=typeof e){const t=Pt.extend({paste:e.paste,data:{paste:e.paste}},e);return{content:e.content,details:t}}return{content:e,details:{}}})(t);sw(e,{...o,content:XT(e,n),format:"html",set:!1,selection:!0}).each((t=>{const n=((e,t,n)=>Hw(e).editor.insertContent(t,n))(e,t.content,o);aw(e,n,t),e.addVisual()}))}},JT={"font-size":"size","font-family":"face"},ZT=Xt("font"),eB=(e,t,n)=>av(bn.fromDom(n),(t=>(t=>lo(t,e).orThunk((()=>ZT(t)?Ee(JT,e).bind((e=>tn(t,e))):U.none())))(t)),(e=>wn(bn.fromDom(t),e))),tB=e=>(t,n)=>U.from(n).map(bn.fromDom).filter(Wt).bind((n=>eB(e,t,n.dom).or(((e,t)=>U.from(Pa.DOM.getStyle(t,e,!0)))(e,n.dom)))).getOr(""),nB=tB("font-size"),oB=N((e=>e.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")),tB("font-family")),rB=e=>Sm(e.getBody()).bind((e=>{const t=e.container();return U.from(Xo(t)?t.parentNode:t)})),sB=(e,t)=>(e=>U.from(e.selection.getRng()).bind((t=>{const n=e.getBody();return t.startContainer===n&&0===t.startOffset?U.none():U.from(e.selection.getStart(!0))})))(e).orThunk(T(rB,e)).map(bn.fromDom).filter(Wt).bind(t),aB=(e,t)=>sB(e,R(U.some,t)),iB=(e,t)=>{if(/^[0-9.]+$/.test(t)){const n=parseInt(t,10);if(n>=1&&n<=7){const o=(e=>Pt.explode(e.options.get("font_size_style_values")))(e),r=(e=>Pt.explode(e.options.get("font_size_classes")))(e);return r.length>0?r[n-1]||t:o[n-1]||t}return t}return t},lB=e=>{const t=e.split(/\s*,\s*/);return W(t,(e=>-1===e.indexOf(" ")||Ve(e,'"')||Ve(e,"'")?e:`'${e}'`)).join(",")},dB=e=>{const t=(t,n)=>{e.formatter.toggle(t,n),e.nodeChanged()};e.editorCommands.addCommands({"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":e=>{t(e)},"ForeColor,HiliteColor":(e,n,o)=>{t(e,{value:o})},BackColor:(e,n,o)=>{t("hilitecolor",{value:o})},FontName:(t,n,o)=>{((e,t)=>{const n=iB(e,t);e.formatter.toggle("fontname",{value:lB(n)}),e.nodeChanged()})(e,o)},FontSize:(t,n,o)=>{((e,t)=>{e.formatter.toggle("fontsize",{value:iB(e,t)}),e.nodeChanged()})(e,o)},LineHeight:(t,n,o)=>{((e,t)=>{e.formatter.toggle("lineheight",{value:String(t)}),e.nodeChanged()})(e,o)},Lang:(e,n,o)=>{var r;t(e,{value:o.code,customValue:null!==(r=o.customCode)&&void 0!==r?r:null})},RemoveFormat:t=>{e.formatter.remove(t)},mceBlockQuote:()=>{t("blockquote")},FormatBlock:(e,n,o)=>{t(g(o)?o:"p")},mceToggleFormat:(e,n,o)=>{t(o)}})},cB=e=>{const t=t=>e.formatter.match(t);e.editorCommands.addCommands({"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":e=>t(e),mceBlockQuote:()=>t("blockquote")},"state"),e.editorCommands.addQueryValueHandler("FontName",(()=>(e=>aB(e,(t=>oB(e.getBody(),t.dom))).getOr(""))(e))),e.editorCommands.addQueryValueHandler("FontSize",(()=>(e=>aB(e,(t=>nB(e.getBody(),t.dom))).getOr(""))(e))),e.editorCommands.addQueryValueHandler("LineHeight",(()=>(e=>aB(e,(t=>{const n=bn.fromDom(e.getBody()),o=av(t,(e=>lo(e,"line-height")),T(wn,n));return o.getOrThunk((()=>{const e=parseFloat(ao(t,"line-height")),n=parseFloat(ao(t,"font-size"));return String(e/n)}))})).getOr(""))(e)))},mB=e=>{e.editorCommands.addCommands({Indent:()=>{(e=>{VS(e,"indent")})(e)},Outdent:()=>{qS(e)}}),e.editorCommands.addCommands({Outdent:()=>jS(e)},"state")},uB=e=>{YT(e),(e=>{e.editorCommands.addCommands({"Cut,Copy,Paste":t=>{const n=e.getDoc();let o;try{n.execCommand(t)}catch(e){o=!0}if("paste"!==t||n.queryCommandEnabled(t)||(o=!0),o||!n.queryCommandSupported(t)){let t=e.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");(Dt.os.isMacOS()||Dt.os.isiOS())&&(t=t.replace(/Ctrl\+/g,"⌘+")),e.notificationManager.open({text:t,type:"error"})}}})})(e),(e=>{e.editorCommands.addCommands({mceAddUndoLevel:()=>{e.undoManager.add()},mceEndUndoLevel:()=>{e.undoManager.add()},Undo:()=>{e.undoManager.undo()},Redo:()=>{e.undoManager.redo()}})})(e),(e=>{e.editorCommands.addCommands({mceSelectNodeDepth:(t,n,o)=>{let r=0;e.dom.getParent(e.selection.getNode(),(t=>!jo(t)||r++!==o||(e.selection.select(t),!1)),e.getBody())},mceSelectNode:(t,n,o)=>{e.selection.select(o)},selectAll:()=>{const t=e.dom.getParent(e.selection.getStart(),rr);if(t){const n=e.dom.createRng();n.selectNodeContents(t),e.selection.setRng(n)}}})})(e),(e=>{e.editorCommands.addCommands({mceCleanup:()=>{const t=e.selection.getBookmark();e.setContent(e.getContent()),e.selection.moveToBookmark(t)},insertImage:(t,n,o)=>{QT(e,e.dom.createHTML("img",{src:o}))},insertHorizontalRule:()=>{e.execCommand("mceInsertContent",!1,"<hr>")},insertText:(t,n,o)=>{QT(e,e.dom.encode(o))},insertHTML:(t,n,o)=>{QT(e,o)},mceInsertContent:(t,n,o)=>{QT(e,o)},mceSetContent:(t,n,o)=>{e.setContent(o)},mceReplaceContent:(t,n,o)=>{e.execCommand("mceInsertContent",!1,o.replace(/\{\$selection\}/g,e.selection.getContent({format:"text"})))},mceNewDocument:()=>{e.setContent("")}})})(e),(e=>{const t=(t,n,o)=>{const r=g(o)?{href:o}:o,s=e.dom.getParent(e.selection.getNode(),"a");p(r)&&g(r.href)&&(r.href=r.href.replace(/ /g,"%20"),s&&r.href||e.formatter.remove("link"),r.href&&e.formatter.apply("link",r,s))};e.editorCommands.addCommands({unlink:()=>{if(e.selection.isCollapsed()){const t=e.dom.getParent(e.selection.getStart(),"a");t&&e.dom.remove(t,!0)}else e.formatter.remove("link")},mceInsertLink:t,createLink:t})})(e),mB(e),(e=>{e.editorCommands.addCommands({insertParagraph:()=>{DA(lA,e)},mceInsertNewLine:(t,n,o)=>{OA(e,o)},InsertLineBreak:(t,n,o)=>{DA(bA,e)}})})(e),(e=>{(e=>{e.editorCommands.addCommands({"InsertUnorderedList,InsertOrderedList":t=>{e.getDoc().execCommand(t);const n=e.dom.getParent(e.selection.getNode(),"ol,ul");if(n){const t=n.parentNode;if(t&&/^(H[1-6]|P|ADDRESS|PRE)$/.test(t.nodeName)){const o=e.selection.getBookmark();e.dom.split(t,n),e.selection.moveToBookmark(o)}}}})})(e),(e=>{e.editorCommands.addCommands({"InsertUnorderedList,InsertOrderedList":t=>{const n=e.dom.getParent(e.selection.getNode(),"ul,ol");return n&&("insertunorderedlist"===t&&"UL"===n.tagName||"insertorderedlist"===t&&"OL"===n.tagName)}},"state")})(e)})(e),(e=>{dB(e),cB(e)})(e),(e=>{e.editorCommands.addCommands({mceRemoveNode:(t,n,o)=>{const r=null!=o?o:e.selection.getNode();if(r!==e.getBody()){const t=e.selection.getBookmark();e.dom.remove(r,!0),e.selection.moveToBookmark(t)}},mcePrint:()=>{e.getWin().print()},mceFocus:(t,n,o)=>{Gg(e,!0===o)},mceToggleVisualAid:()=>{e.hasVisual=!e.hasVisual,e.addVisual()}})})(e)},fB=["toggleview"],gB=e=>V(fB,e.toLowerCase());class pB{constructor(e){this.commands={state:{},exec:{},value:{}},this.editor=e}execCommand(e,t=!1,n,o){const r=this.editor,s=e.toLowerCase(),a=null==o?void 0:o.skip_focus;if(r.removed)return!1;"mcefocus"!==s&&(/^(mceAddUndoLevel|mceEndUndoLevel)$/i.test(s)||a?(e=>{Dg(e).each((t=>e.selection.setRng(t)))})(r):r.focus());if(r.dispatch("BeforeExecCommand",{command:e,ui:t,value:n}).isDefaultPrevented())return!1;const i=this.commands.exec[s];return!!k(i)&&(i(s,t,n),r.dispatch("ExecCommand",{command:e,ui:t,value:n}),!0)}queryCommandState(e){if(!gB(e)&&this.editor.quirks.isHidden()||this.editor.removed)return!1;const t=e.toLowerCase(),n=this.commands.state[t];return!!k(n)&&n(t)}queryCommandValue(e){if(!gB(e)&&this.editor.quirks.isHidden()||this.editor.removed)return"";const t=e.toLowerCase(),n=this.commands.value[t];return k(n)?n(t):""}addCommands(e,t="exec"){const n=this.commands;he(e,((e,o)=>{K(o.toLowerCase().split(","),(o=>{n[t][o]=e}))}))}addCommand(e,t,n){const o=e.toLowerCase();this.commands.exec[o]=(e,o,r)=>t.call(null!=n?n:this.editor,o,r)}queryCommandSupported(e){const t=e.toLowerCase();return!!this.commands.exec[t]}addQueryStateHandler(e,t,n){this.commands.state[e.toLowerCase()]=()=>t.call(null!=n?n:this.editor)}addQueryValueHandler(e,t,n){this.commands.value[e.toLowerCase()]=()=>t.call(null!=n?n:this.editor)}}const hB="data-mce-contenteditable",bB=(e,t,n)=>{try{e.getDoc().execCommand(t,!1,String(n))}catch(e){}},vB=(e,t)=>{e.dom.contentEditable=t?"true":"false"},yB=(e,t)=>{const n=bn.fromDom(e.getBody());((e,t,n)=>{pn(e,t)&&!n?fn(e,t):n&&mn(e,t)})(n,"mce-content-readonly",t),t?(e.selection.controlSelection.hideResizeRect(),e._selectionOverrides.hideFakeCaret(),(e=>{U.from(e.selection.getNode()).each((e=>{e.removeAttribute("data-mce-selected")}))})(e),e.readonly=!0,vB(n,!1),K(Mo(n,'*[contenteditable="true"]'),(e=>{Jt(e,hB,"true"),vB(e,!1)}))):(e.readonly=!1,vB(n,!0),(e=>{K(Mo(e,'*[data-mce-contenteditable="true"]'),(e=>{on(e,hB),vB(e,!0)}))})(n),bB(e,"StyleWithCSS",!1),bB(e,"enableInlineTableEditing",!1),bB(e,"enableObjectResizing",!1),Wg(e)&&e.focus(),(e=>{e.selection.setRng(e.selection.getRng())})(e),e.nodeChanged())},CB=e=>e.readonly,wB=e=>{e.parser.addAttributeFilter("contenteditable",(t=>{CB(e)&&K(t,(e=>{e.attr(hB,e.attr("contenteditable")),e.attr("contenteditable","false")}))})),e.serializer.addAttributeFilter(hB,(t=>{CB(e)&&K(t,(e=>{e.attr("contenteditable",e.attr(hB))}))})),e.serializer.addTempAttr(hB)},xB=["copy"],kB=(e,t)=>{if((e=>"click"===e.type)(t)&&!gf.metaKeyPressed(t)){const n=bn.fromDom(t.target);((e,t)=>Zn(t,"a",(t=>wn(t,bn.fromDom(e.getBody())))).bind((e=>tn(e,"href"))))(e,n).each((n=>{if(t.preventDefault(),/^#/.test(n)){const t=e.dom.select(`${n},[name="${He(n,"#")}"]`);t.length&&e.selection.scrollIntoView(t[0],!0)}else window.open(n,"_blank","rel=noopener noreferrer,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes")}))}else(e=>V(xB,e.type))(t)&&e.dispatch(t.type,t)},EB=Pt.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"," ");class SB{constructor(e){this.bindings={},this.settings=e||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||I}static isNative(e){return!!EB[e.toLowerCase()]}fire(e,t){return this.dispatch(e,t)}dispatch(e,t){const n=e.toLowerCase(),o=va(n,null!=t?t:{},this.scope);this.settings.beforeFire&&this.settings.beforeFire(o);const r=this.bindings[n];if(r)for(let e=0,t=r.length;e<t;e++){const t=r[e];if(!t.removed){if(t.once&&this.off(n,t.func),o.isImmediatePropagationStopped())return o;if(!1===t.func.call(this.scope,o))return o.preventDefault(),o}}return o}on(e,t,n,o){if(!1===t&&(t=I),t){const r={func:t,removed:!1};o&&Pt.extend(r,o);const s=e.toLowerCase().split(" ");let a=s.length;for(;a--;){const e=s[a];let t=this.bindings[e];t||(t=[],this.toggleEvent(e,!0)),t=n?[r,...t]:[...t,r],this.bindings[e]=t}}return this}off(e,t){if(e){const n=e.toLowerCase().split(" ");let o=n.length;for(;o--;){const r=n[o];let s=this.bindings[r];if(!r)return he(this.bindings,((e,t)=>{this.toggleEvent(t,!1),delete this.bindings[t]})),this;if(s){if(t){const e=Y(s,(e=>e.func===t));s=e.fail,this.bindings[r]=s,K(e.pass,(e=>{e.removed=!0}))}else s.length=0;s.length||(this.toggleEvent(e,!1),delete this.bindings[r])}}}else he(this.bindings,((e,t)=>{this.toggleEvent(t,!1)})),this.bindings={};return this}once(e,t,n){return this.on(e,t,n,{once:!0})}has(e){e=e.toLowerCase();const t=this.bindings[e];return!(!t||0===t.length)}}const _B=e=>(e._eventDispatcher||(e._eventDispatcher=new SB({scope:e,toggleEvent:(t,n)=>{SB.isNative(t)&&e.toggleNativeEvent&&e.toggleNativeEvent(t,n)}})),e._eventDispatcher),NB={fire(e,t,n){return this.dispatch(e,t,n)},dispatch(e,t,n){const o=this;if(o.removed&&"remove"!==e&&"detach"!==e)return va(e.toLowerCase(),null!=t?t:{},o);const r=_B(o).dispatch(e,t);if(!1!==n&&o.parent){let t=o.parent();for(;t&&!r.isPropagationStopped();)t.dispatch(e,r,!1),t=t.parent?t.parent():void 0}return r},on(e,t,n){return _B(this).on(e,t,n)},off(e,t){return _B(this).off(e,t)},once(e,t){return _B(this).once(e,t)},hasEventListeners(e){return _B(this).has(e)}},RB=Pa.DOM;let AB;const DB=(e,t)=>{if("selectionchange"===t)return e.getDoc();if(!e.inline&&/^(?:mouse|touch|click|contextmenu|drop|dragover|dragend)/.test(t))return e.getDoc().documentElement;const n=md(e);return n?(e.eventRoot||(e.eventRoot=RB.select(n)[0]),e.eventRoot):e.getBody()},OB=(e,t,n)=>{(e=>!e.hidden&&!CB(e))(e)?e.dispatch(t,n):CB(e)&&kB(e,n)},TB=(e,t)=>{if(e.delegates||(e.delegates={}),e.delegates[t]||e.removed)return;const n=DB(e,t);if(md(e)){if(AB||(AB={},e.editorManager.on("removeEditor",(()=>{e.editorManager.activeEditor||AB&&(he(AB,((t,n)=>{e.dom.unbind(DB(e,n))})),AB=null)}))),AB[t])return;const o=n=>{const o=n.target,r=e.editorManager.get();let s=r.length;for(;s--;){const e=r[s].getBody();(e===o||RB.isChildOf(o,e))&&OB(r[s],t,n)}};AB[t]=o,RB.bind(n,t,o)}else{const o=n=>{OB(e,t,n)};RB.bind(n,t,o),e.delegates[t]=o}},BB={...NB,bindPendingEventDelegates(){const e=this;Pt.each(e._pendingNativeEvents,(t=>{TB(e,t)}))},toggleNativeEvent(e,t){const n=this;"focus"!==e&&"blur"!==e&&(n.removed||(t?n.initialized?TB(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&n.delegates&&(n.dom.unbind(DB(n,e),e,n.delegates[e]),delete n.delegates[e])))},unbindAllNativeEvents(){const e=this,t=e.getBody(),n=e.dom;e.delegates&&(he(e.delegates,((t,n)=>{e.dom.unbind(DB(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()))}},PB=e=>g(e)?{value:e.split(/[ ,]/),valid:!0}:S(e,g)?{value:e,valid:!0}:{valid:!1,message:"The value must be a string[] or a comma/space separated string."},LB=(e,t)=>e+(Qe(t.message)?"":`. ${t.message}`),MB=e=>e.valid,IB=(e,t,n="")=>{const o=t(e);return y(o)?o?{value:e,valid:!0}:{valid:!1,message:n}:o},FB=(e,t)=>{const n={},o={},r=(e,t,n)=>{const r=IB(t,n);return MB(r)?(o[e]=r.value,!0):(console.warn(LB(`Invalid value passed for the ${e} option`,r)),!1)},s=e=>Se(n,e);return{register:(e,s)=>{const a=(e=>g(e.processor))(s)?(e=>{const t=(()=>{switch(e){case"array":return b;case"boolean":return y;case"function":return k;case"number":return E;case"object":return p;case"string":return g;case"string[]":return PB;case"object[]":return e=>S(e,p);case"regexp":return e=>f(e,RegExp);default:return F}})();return n=>IB(n,t,`The value must be a ${e}.`)})(s.processor):s.processor,i=((e,t,n)=>{if(!C(t)){const o=IB(t,n);if(MB(o))return o.value;console.error(LB(`Invalid default value passed for the "${e}" option`,o))}})(e,s.default,a);n[e]={...s,default:i,processor:a};Ee(o,e).orThunk((()=>Ee(t,e))).each((t=>r(e,t,a)))},isRegistered:s,get:e=>Ee(o,e).orThunk((()=>Ee(n,e).map((e=>e.default)))).getOrUndefined(),set:(e,t)=>{if(s(e)){const o=n[e];return o.immutable?(console.error(`"${e}" is an immutable option and cannot be updated`),!1):r(e,t,o.processor)}return console.warn(`"${e}" is not a registered option. Ensure the option has been registered before setting a value.`),!1},unset:e=>{const t=s(e);return t&&delete o[e],t},isSet:e=>Se(o,e)}},UB=["design","readonly"],zB=(e,t,n,o)=>{const r=n[t.get()],s=n[o];try{s.activate()}catch(e){return void console.error(`problem while activating editor mode ${o}:`,e)}r.deactivate(),r.editorReadOnly!==s.editorReadOnly&&yB(e,s.editorReadOnly),t.set(o),((e,t)=>{e.dispatch("SwitchMode",{mode:t})})(e,o)},jB=e=>{const t=Ia("design"),n=Ia({design:{activate:_,deactivate:_,editorReadOnly:!1},readonly:{activate:_,deactivate:_,editorReadOnly:!0}});return(e=>{e.serializer?wB(e):e.on("PreInit",(()=>{wB(e)}))})(e),(e=>{e.on("ShowCaret",(t=>{CB(e)&&t.preventDefault()})),e.on("ObjectSelected",(t=>{CB(e)&&t.preventDefault()}))})(e),{isReadOnly:()=>CB(e),set:o=>((e,t,n,o)=>{if(o!==n.get()){if(!Se(t,o))throw new Error(`Editor mode '${o}' is invalid`);e.initialized?zB(e,n,t,o):e.on("init",(()=>zB(e,n,t,o)))}})(e,n.get(),t,o),get:()=>t.get(),register:(e,t)=>{n.set(((e,t,n)=>{if(V(UB,t))throw new Error(`Cannot override default mode ${t}`);return{...e,[t]:{...n,deactivate:()=>{try{n.deactivate()}catch(e){console.error(`problem while deactivating editor mode ${t}:`,e)}}}}})(n.get(),e,t))}}},HB=Pt.each,$B=Pt.explode,VB={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},qB=Pt.makeMap("alt,ctrl,shift,meta,access"),WB=e=>{const t={},n=Dt.os.isMacOS()||Dt.os.isiOS();HB($B(e.toLowerCase(),"+"),(e=>{(e=>e in qB)(e)?t[e]=!0:/^[0-9]{2,}$/.test(e)?t.keyCode=parseInt(e,10):(t.charCode=e.charCodeAt(0),t.keyCode=VB[e]||e.toUpperCase().charCodeAt(0))}));const o=[t.keyCode];let r;for(r in qB)t[r]?o.push(r):t[r]=!1;return t.id=o.join(","),t.access&&(t.alt=!0,n?t.ctrl=!0:t.shift=!0),t.meta&&(n?t.meta=!0:(t.ctrl=!0,t.meta=!1)),t};class KB{constructor(e){this.shortcuts={},this.pendingPatterns=[],this.editor=e;const t=this;e.on("keyup keypress keydown",(e=>{!t.hasModifier(e)&&!t.isFunctionKey(e)||e.isDefaultPrevented()||(HB(t.shortcuts,(n=>{t.matchShortcut(e,n)&&(t.pendingPatterns=n.subpatterns.slice(0),"keydown"===e.type&&t.executeShortcutAction(n))})),t.matchShortcut(e,t.pendingPatterns[0])&&(1===t.pendingPatterns.length&&"keydown"===e.type&&t.executeShortcutAction(t.pendingPatterns[0]),t.pendingPatterns.shift()))}))}add(e,t,n,o){const r=this,s=r.normalizeCommandFunc(n);return HB($B(Pt.trim(e)),(e=>{const n=r.createShortcut(e,t,s,o);r.shortcuts[n.id]=n})),!0}remove(e){const t=this.createShortcut(e);return!!this.shortcuts[t.id]&&(delete this.shortcuts[t.id],!0)}normalizeCommandFunc(e){const t=this,n=e;return"string"==typeof n?()=>{t.editor.execCommand(n,!1,null)}:Pt.isArray(n)?()=>{t.editor.execCommand(n[0],n[1],n[2])}:n}createShortcut(e,t,n,o){const r=Pt.map($B(e,">"),WB);return r[r.length-1]=Pt.extend(r[r.length-1],{func:n,scope:o||this.editor}),Pt.extend(r[0],{desc:this.editor.translate(t),subpatterns:r.slice(1)})}hasModifier(e){return e.altKey||e.ctrlKey||e.metaKey}isFunctionKey(e){return"keydown"===e.type&&e.keyCode>=112&&e.keyCode<=123}matchShortcut(e,t){return!!t&&(t.ctrl===e.ctrlKey&&t.meta===e.metaKey&&(t.alt===e.altKey&&t.shift===e.shiftKey&&(!!(e.keyCode===t.keyCode||e.charCode&&e.charCode===t.charCode)&&(e.preventDefault(),!0))))}executeShortcutAction(e){return e.func?e.func.call(e.scope):null}}const GB=()=>{const e=(()=>{const e={},t={},n={},o={},r={},s={},a={},i={},l=(e,t)=>(n,o)=>{e[n.toLowerCase()]={...o,type:t}};return{addButton:l(e,"button"),addGroupToolbarButton:l(e,"grouptoolbarbutton"),addToggleButton:l(e,"togglebutton"),addMenuButton:l(e,"menubutton"),addSplitButton:l(e,"splitbutton"),addMenuItem:l(t,"menuitem"),addNestedMenuItem:l(t,"nestedmenuitem"),addToggleMenuItem:l(t,"togglemenuitem"),addAutocompleter:l(n,"autocompleter"),addContextMenu:l(r,"contextmenu"),addContextToolbar:l(s,"contexttoolbar"),addContextForm:l(s,"contextform"),addSidebar:l(a,"sidebar"),addView:l(i,"views"),addIcon:(e,t)=>o[e.toLowerCase()]=t,getAll:()=>({buttons:e,menuItems:t,icons:o,popups:n,contextMenus:r,contextToolbars:s,sidebars:a,views:i})}})();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,addView:e.addView,getAll:e.getAll}},YB=Pa.DOM,XB=Pt.extend,QB=Pt.each;class JB{constructor(e,t,n){this.plugins={},this.contentCSS=[],this.contentStyles=[],this.loadedCSS={},this.isNotDirty=!1,this.composing=!1,this.destroyed=!1,this.hasHiddenInput=!1,this.iframeElement=null,this.initialized=!1,this.readonly=!1,this.removed=!1,this.startContent="",this._pendingNativeEvents=[],this._skinLoaded=!1,this.editorManager=n,this.documentBaseUrl=n.documentBaseURL,XB(this,BB);const o=this;this.id=e,this.hidden=!1;const r=((e,t)=>WT(FT||UT,FT,t,e,t))(n.defaultOptions,t);this.options=FB(0,r),(e=>{const t=e.options.register;t("id",{processor:"string",default:e.id}),t("selector",{processor:"string"}),t("target",{processor:"object"}),t("suffix",{processor:"string"}),t("cache_suffix",{processor:"string"}),t("base_url",{processor:"string"}),t("referrer_policy",{processor:"string",default:""}),t("language_load",{processor:"boolean",default:!0}),t("inline",{processor:"boolean",default:!1}),t("iframe_attrs",{processor:"object",default:{}}),t("doctype",{processor:"string",default:"<!DOCTYPE html>"}),t("document_base_url",{processor:"string",default:e.documentBaseUrl}),t("body_id",{processor:Nl(e,"tinymce"),default:"tinymce"}),t("body_class",{processor:Nl(e),default:""}),t("content_security_policy",{processor:"string",default:""}),t("br_in_pre",{processor:"boolean",default:!0}),t("forced_root_block",{processor:e=>{const t=g(e)&&Xe(e);return t?{value:e,valid:t}:{valid:!1,message:"Must be a non-empty string."}},default:"p"}),t("forced_root_block_attrs",{processor:"object",default:{}}),t("newline_behavior",{processor:e=>{const t=V(["block","linebreak","invert","default"],e);return t?{value:e,valid:t}:{valid:!1,message:"Must be one of: block, linebreak, invert or default."}},default:"default"}),t("br_newline_selector",{processor:"string",default:".mce-toc h2,figcaption,caption"}),t("no_newline_selector",{processor:"string",default:""}),t("keep_styles",{processor:"boolean",default:!0}),t("end_container_on_empty_block",{processor:e=>y(e)||g(e)?{valid:!0,value:e}:{valid:!1,message:"Must be boolean or a string"},default:"blockquote"}),t("font_size_style_values",{processor:"string",default:"xx-small,x-small,small,medium,large,x-large,xx-large"}),t("font_size_legacy_values",{processor:"string",default:"xx-small,small,medium,large,x-large,xx-large,300%"}),t("font_size_classes",{processor:"string",default:""}),t("automatic_uploads",{processor:"boolean",default:!0}),t("images_reuse_filename",{processor:"boolean",default:!1}),t("images_replace_blob_uris",{processor:"boolean",default:!0}),t("icons",{processor:"string",default:""}),t("icons_url",{processor:"string",default:""}),t("images_upload_url",{processor:"string",default:""}),t("images_upload_base_path",{processor:"string",default:""}),t("images_upload_credentials",{processor:"boolean",default:!1}),t("images_upload_handler",{processor:"function"}),t("language",{processor:"string",default:"en"}),t("language_url",{processor:"string",default:""}),t("entity_encoding",{processor:"string",default:"named"}),t("indent",{processor:"boolean",default:!0}),t("indent_before",{processor:"string",default:"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"}),t("indent_after",{processor:"string",default:"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"}),t("indent_use_margin",{processor:"boolean",default:!1}),t("indentation",{processor:"string",default:"40px"}),t("content_css",{processor:e=>{const t=!1===e||g(e)||S(e,g);return t?g(e)?{value:W(e.split(","),Ke),valid:t}:b(e)?{value:e,valid:t}:!1===e?{value:[],valid:t}:{value:e,valid:t}:{valid:!1,message:"Must be false, a string or an array of strings."}},default:kd(e)?[]:["default"]}),t("content_style",{processor:"string"}),t("content_css_cors",{processor:"boolean",default:!1}),t("font_css",{processor:e=>{const t=g(e)||S(e,g);return t?{value:b(e)?e:W(e.split(","),Ke),valid:t}:{valid:!1,message:"Must be a string or an array of strings."}},default:[]}),t("inline_boundaries",{processor:"boolean",default:!0}),t("inline_boundaries_selector",{processor:"string",default:"a[href],code,span.mce-annotation"}),t("object_resizing",{processor:e=>{const t=y(e)||g(e);return t?!1===e||wl.isiPhone()||wl.isiPad()?{value:"",valid:t}:{value:!0===e?"table,img,figure.image,div,video,iframe":e,valid:t}:{valid:!1,message:"Must be boolean or a string"}},default:!xl}),t("resize_img_proportional",{processor:"boolean",default:!0}),t("event_root",{processor:"object"}),t("service_message",{processor:"string"}),t("theme",{processor:e=>!1===e||g(e)||k(e),default:"silver"}),t("theme_url",{processor:"string"}),t("formats",{processor:"object"}),t("format_empty_lines",{processor:"boolean",default:!1}),t("format_noneditable_selector",{processor:"string",default:""}),t("preview_styles",{processor:e=>{const t=!1===e||g(e);return t?{value:!1===e?"":e,valid:t}:{valid:!1,message:"Must be false or a string"}},default:"font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"}),t("custom_ui_selector",{processor:"string",default:""}),t("hidden_input",{processor:"boolean",default:!0}),t("submit_patch",{processor:"boolean",default:!0}),t("encoding",{processor:"string"}),t("add_form_submit_trigger",{processor:"boolean",default:!0}),t("add_unload_trigger",{processor:"boolean",default:!0}),t("custom_undo_redo_levels",{processor:"number",default:0}),t("disable_nodechange",{processor:"boolean",default:!1}),t("readonly",{processor:"boolean",default:!1}),t("plugins",{processor:"string[]",default:[]}),t("external_plugins",{processor:"object"}),t("forced_plugins",{processor:"string[]"}),t("model",{processor:"string",default:e.hasPlugin("rtc")?"plugin":"dom"}),t("model_url",{processor:"string"}),t("block_unsupported_drop",{processor:"boolean",default:!0}),t("visual",{processor:"boolean",default:!0}),t("visual_table_class",{processor:"string",default:"mce-item-table"}),t("visual_anchor_class",{processor:"string",default:"mce-item-anchor"}),t("iframe_aria_text",{processor:"string",default:"Rich Text Area. Press ALT-0 for help."}),t("setup",{processor:"function"}),t("init_instance_callback",{processor:"function"}),t("url_converter",{processor:"function",default:e.convertURL}),t("url_converter_scope",{processor:"object",default:e}),t("urlconverter_callback",{processor:"function"}),t("allow_conditional_comments",{processor:"boolean",default:!1}),t("allow_html_data_urls",{processor:"boolean",default:!1}),t("allow_svg_data_urls",{processor:"boolean"}),t("allow_html_in_named_anchor",{processor:"boolean",default:!1}),t("allow_script_urls",{processor:"boolean",default:!1}),t("allow_unsafe_link_target",{processor:"boolean",default:!1}),t("convert_fonts_to_spans",{processor:"boolean",default:!0,deprecated:!0}),t("fix_list_elements",{processor:"boolean",default:!1}),t("preserve_cdata",{processor:"boolean",default:!1}),t("remove_trailing_brs",{processor:"boolean"}),t("inline_styles",{processor:"boolean",default:!0,deprecated:!0}),t("element_format",{processor:"string",default:"html"}),t("entities",{processor:"string"}),t("schema",{processor:"string",default:"html5"}),t("convert_urls",{processor:"boolean",default:!0}),t("relative_urls",{processor:"boolean",default:!0}),t("remove_script_host",{processor:"boolean",default:!0}),t("custom_elements",{processor:"string"}),t("extended_valid_elements",{processor:"string"}),t("invalid_elements",{processor:"string"}),t("invalid_styles",{processor:_l}),t("valid_children",{processor:"string"}),t("valid_classes",{processor:_l}),t("valid_elements",{processor:"string"}),t("valid_styles",{processor:_l}),t("verify_html",{processor:"boolean",default:!0}),t("auto_focus",{processor:e=>g(e)||!0===e}),t("browser_spellcheck",{processor:"boolean",default:!1}),t("protect",{processor:"array"}),t("images_file_types",{processor:"string",default:"jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp"}),t("deprecation_warnings",{processor:"boolean",default:!0}),t("a11y_advanced_options",{processor:"boolean",default:!1}),t("api_key",{processor:"string"}),t("paste_block_drop",{processor:"boolean",default:!1}),t("paste_data_images",{processor:"boolean",default:!0}),t("paste_preprocess",{processor:"function"}),t("paste_postprocess",{processor:"function"}),t("paste_webkit_styles",{processor:"string",default:"none"}),t("paste_remove_styles_if_webkit",{processor:"boolean",default:!0}),t("paste_merge_formats",{processor:"boolean",default:!0}),t("smart_paste",{processor:"boolean",default:!0}),t("paste_as_text",{processor:"boolean",default:!1}),t("paste_tab_spaces",{processor:"number",default:4}),t("text_patterns",{processor:e=>S(e,p)||!1===e?{value:Cl(!1===e?[]:e),valid:!0}:{valid:!1,message:"Must be an array of objects or false."},default:[{start:"*",end:"*",format:"italic"},{start:"**",end:"**",format:"bold"},{start:"#",format:"h1"},{start:"##",format:"h2"},{start:"###",format:"h3"},{start:"####",format:"h4"},{start:"#####",format:"h5"},{start:"######",format:"h6"},{start:"1. ",cmd:"InsertOrderedList"},{start:"* ",cmd:"InsertUnorderedList"},{start:"- ",cmd:"InsertUnorderedList"}]}),t("text_patterns_lookup",{processor:e=>{return k(e)?{value:(t=e,e=>{const n=t(e);return Cl(n)}),valid:!0}:{valid:!1,message:"Must be a single function"};var t},default:e=>[]}),t("noneditable_class",{processor:"string",default:"mceNonEditable"}),t("editable_class",{processor:"string",default:"mceEditable"}),t("noneditable_regexp",{processor:e=>S(e,El)?{value:e,valid:!0}:El(e)?{value:[e],valid:!0}:{valid:!1,message:"Must be a RegExp or an array of RegExp."},default:[]}),t("table_tab_navigation",{processor:"boolean",default:!0}),t("highlight_on_focus",{processor:"boolean",default:!1}),t("xss_sanitization",{processor:"boolean",default:!0}),e.on("ScriptsLoaded",(()=>{t("directionality",{processor:"string",default:ja.isRtl()?"rtl":void 0}),t("placeholder",{processor:"string",default:kl.getAttrib(e.getElement(),"placeholder")})}))})(o);const s=this.options.get;s("deprecation_warnings")&&bx(t,r);const a=s("suffix");a&&(n.suffix=a),this.suffix=n.suffix;const i=s("base_url");i&&n._setBaseUrl(i),this.baseUri=n.baseURI;const l=Jl(o);l&&(Ma.ScriptLoader._setReferrerPolicy(l),Pa.DOM.styleSheetLoader._setReferrerPolicy(l));const d=Od(o);x(d)&&Pa.DOM.styleSheetLoader._setContentCssCors(d),Ha.languageLoad=s("language_load"),Ha.baseURL=n.baseURL,this.setDirty(!1),this.documentBaseURI=new jC(Dl(o),{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=kd(o),this.hasVisual=Ld(o),this.shortcuts=new KB(this),this.editorCommands=new pB(this),uB(this);const c=s("cache_suffix");c&&(Dt.cacheSuffix=c.replace(/^[\?\&]+/,"")),this.ui={registry:GB(),styleSheetLoader:void 0,show:_,hide:_,setEnabled:_,isEnabled:F},this.mode=jB(o),n.dispatch("SetupEditor",{editor:this});const m=Ud(o);k(m)&&m.call(o,o)}render(){MT(this)}focus(e){this.execCommand("mceFocus",!1,e)}hasFocus(){return qg(this)}translate(e){return ja.translate(e)}getParam(e,t,n){const o=this.options;return o.isRegistered(e)||(x(n)?o.register(e,{processor:n,default:t}):o.register(e,{processor:F,default:t})),o.isSet(e)||C(t)?o.get(e):t}hasPlugin(e,t){return!!V(Td(this),e)&&(!t||void 0!==Bx.get(e))}nodeChanged(e){this._nodeChangeDispatcher.nodeChanged(e)}addCommand(e,t,n){this.editorCommands.addCommand(e,t,n)}addQueryStateHandler(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)}addQueryValueHandler(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)}addShortcut(e,t,n,o){this.shortcuts.add(e,t,n,o)}execCommand(e,t,n,o){return this.editorCommands.execCommand(e,t,n,o)}queryCommandState(e){return this.editorCommands.queryCommandState(e)}queryCommandValue(e){return this.editorCommands.queryCommandValue(e)}queryCommandSupported(e){return this.editorCommands.queryCommandSupported(e)}show(){const e=this;e.hidden&&(e.hidden=!1,e.inline?e.getBody().contentEditable="true":(YB.show(e.getContainer()),YB.hide(e.id)),e.load(),e.dispatch("show"))}hide(){const e=this;e.hidden||(e.save(),e.inline?(e.getBody().contentEditable="false",e===e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(YB.hide(e.getContainer()),YB.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.dispatch("hide"))}isHidden(){return this.hidden}setProgressState(e,t){this.dispatch("ProgressState",{state:e,time:t})}load(e={}){const t=this,n=t.getElement();if(t.removed)return"";if(n){const o={...e,load:!0},r=Yo(n)?n.value:n.innerHTML,s=t.setContent(r,o);return o.no_events||t.dispatch("LoadContent",{...o,element:n}),s}return""}save(e={}){const t=this;let n=t.getElement();if(!n||!t.initialized||t.removed)return"";const o={...e,save:!0,element:n};let r=t.getContent(o);const s={...o,content:r};if(s.no_events||t.dispatch("SaveContent",s),"raw"===s.format&&t.dispatch("RawSaveContent",s),r=s.content,Yo(n))n.value=r;else{!e.is_removing&&t.inline||(n.innerHTML=r);const o=YB.getParent(t.id,"form");o&&QB(o.elements,(e=>e.name!==t.id||(e.value=r,!1)))}return s.element=o.element=n=null,!1!==s.set_dirty&&t.setDirty(!1),r}setContent(e,t){return sx(this,e,t)}getContent(e){return rx(this,e)}insertContent(e,t){t&&(e=XB({content:e},t)),this.execCommand("mceInsertContent",!1,e)}resetContent(e){void 0===e?sx(this,this.startContent,{format:"raw"}):sx(this,e),this.undoManager.reset(),this.setDirty(!1),this.nodeChanged()}isDirty(){return!this.isNotDirty}setDirty(e){const t=!this.isNotDirty;this.isNotDirty=!e,e&&e!==t&&this.dispatch("dirty")}getContainer(){const e=this;return e.container||(e.container=e.editorContainer||YB.get(e.id+"_parent")),e.container}getContentAreaContainer(){return this.contentAreaContainer}getElement(){return this.targetElm||(this.targetElm=YB.get(this.id)),this.targetElm}getWin(){const e=this;if(!e.contentWindow){const t=e.iframeElement;t&&(e.contentWindow=t.contentWindow)}return e.contentWindow}getDoc(){const e=this;if(!e.contentDocument){const t=e.getWin();t&&(e.contentDocument=t.document)}return e.contentDocument}getBody(){var e,t;const n=this.getDoc();return null!==(t=null!==(e=this.bodyElement)&&void 0!==e?e:null==n?void 0:n.body)&&void 0!==t?t:null}convertURL(e,t,n){const o=this,r=o.options.get,s=jd(o);return k(s)?s.call(o,e,n,!0,t):!r("convert_urls")||"link"===n||p(n)&&"LINK"===n.nodeName||0===e.indexOf("file:")||0===e.length?e:r("relative_urls")?o.documentBaseURI.toRelative(e):e=o.documentBaseURI.toAbsolute(e,r("remove_script_host"))}addVisual(e){KT(this,e)}remove(){Cx(this)}destroy(e){wx(this,e)}uploadImages(){return this.editorUpload.uploadImages()}_scanForImages(){return this.editorUpload.scanForImages()}}const ZB=Pa.DOM,eP=Pt.each;let tP,nP=!1,oP=[];const rP=e=>{const t=e.type;eP(lP.get(),(n=>{switch(t){case"scroll":n.dispatch("ScrollWindow",e);break;case"resize":n.dispatch("ResizeWindow",e)}}))},sP=e=>{if(e!==nP){const t=Pa.DOM;e?(t.bind(window,"resize",rP),t.bind(window,"scroll",rP)):(t.unbind(window,"resize",rP),t.unbind(window,"scroll",rP)),nP=e}},aP=e=>{const t=oP;return oP=X(oP,(t=>e!==t)),lP.activeEditor===e&&(lP.activeEditor=oP.length>0?oP[0]:null),lP.focusedEditor===e&&(lP.focusedEditor=null),t.length!==oP.length},iP="CSS1Compat"!==document.compatMode,lP={...NB,baseURI:null,baseURL:null,defaultOptions:{},documentBaseURL:null,suffix:null,majorVersion:"6",minorVersion:"4.2",releaseDate:"2023-04-26",i18n:ja,activeEditor:null,focusedEditor:null,setup(){const e=this;let t="",n="",o=jC.getDocumentBaseUrl(document.location);/^[^:]+:\/\/\/?[^\/]+\//.test(o)&&(o=o.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(o)||(o+="/"));const r=window.tinymce||window.tinyMCEPreInit;if(r)t=r.base||r.baseURL,n=r.suffix;else{const e=document.getElementsByTagName("script");for(let o=0;o<e.length;o++){const r=e[o].src||"";if(""===r)continue;const s=r.substring(r.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(r)){-1!==s.indexOf(".min")&&(n=".min"),t=r.substring(0,r.lastIndexOf("/"));break}}if(!t&&document.currentScript){const e=document.currentScript.src;-1!==e.indexOf(".min")&&(n=".min"),t=e.substring(0,e.lastIndexOf("/"))}}var s;e.baseURL=new jC(o).toAbsolute(t),e.documentBaseURL=o,e.baseURI=new jC(e.baseURL),e.suffix=n,(s=e).on("AddEditor",T(Ug,s)),s.on("RemoveEditor",T(zg,s))},overrideDefaults(e){const t=e.base_url;t&&this._setBaseUrl(t);const n=e.suffix;n&&(this.suffix=n),this.defaultOptions=e;const o=e.plugin_base_urls;void 0!==o&&he(o,((e,t)=>{Ha.PluginManager.urls[t]=e}))},init(e){const t=this;let n;const o=Pt.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"," ");let r=e=>{n=e};const s=()=>{let n=0;const a=[];let i;ZB.unbind(window,"ready",s),(n=>{const o=e[n];if(o)o.apply(t,[])})("onpageload"),i=((e,t)=>{const n=[],o=k(t)?e=>q(n,(n=>t(n,e))):e=>V(n,e);for(let t=0,r=e.length;t<r;t++){const r=e[t];o(r)||n.push(r)}return n})((e=>Dt.browser.isIE()||Dt.browser.isEdge()?(zx("TinyMCE does not support the browser you are using. For a list of supported browsers please see: https://www.tiny.cloud/docs/tinymce/6/support/#supportedwebbrowsers"),[]):iP?(zx("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[]):g(e.selector)?ZB.select(e.selector):x(e.target)?[e.target]:[])(e)),Pt.each(i,(e=>{var n;(n=t.get(e.id))&&n.initialized&&!(n.getContainer()||n.getBody()).parentNode&&(aP(n),n.unbindAllNativeEvents(),n.destroy(!0),n.removed=!0)})),i=Pt.grep(i,(e=>!t.get(e.id))),0===i.length?r([]):eP(i,(s=>{((e,t)=>e.inline&&t.tagName.toLowerCase()in o)(e,s)?zx("Could not initialize inline editor on invalid inline target element",s):((e,o,s)=>{const l=new JB(e,o,t);a.push(l),l.on("init",(()=>{++n===i.length&&r(a)})),l.targetElm=l.targetElm||s,l.render()})((e=>{let t=e.id;return t||(t=Ee(e,"name").filter((e=>!ZB.get(e))).getOrThunk(ZB.uniqueId),e.setAttribute("id",t)),t})(s),e,s)}))};return ZB.bind(window,"ready",s),new Promise((e=>{n?e(n):r=t=>{e(t)}}))},get(e){return 0===arguments.length?oP.slice(0):g(e)?ee(oP,(t=>t.id===e)).getOr(null):E(e)&&oP[e]?oP[e]:null},add(e){const t=this,n=t.get(e.id);return n===e||(null===n&&oP.push(e),sP(!0),t.activeEditor=e,t.dispatch("AddEditor",{editor:e}),tP||(tP=e=>{const n=t.dispatch("BeforeUnload");if(n.returnValue)return e.preventDefault(),e.returnValue=n.returnValue,n.returnValue},window.addEventListener("beforeunload",tP))),e},createEditor(e,t){return this.add(new JB(e,t,this))},remove(e){const t=this;let n;if(e){if(!g(e))return n=e,v(t.get(n.id))?null:(aP(n)&&t.dispatch("RemoveEditor",{editor:n}),0===oP.length&&window.removeEventListener("beforeunload",tP),n.remove(),sP(oP.length>0),n);eP(ZB.select(e),(e=>{n=t.get(e.id),n&&t.remove(n)}))}else for(let e=oP.length-1;e>=0;e--)t.remove(oP[e])},execCommand(e,t,n){var o;const r=this,s=p(n)?null!==(o=n.id)&&void 0!==o?o:n.index:n;switch(e){case"mceAddEditor":if(!r.get(s)){const e=n.options;new JB(s,e,r).render()}return!0;case"mceRemoveEditor":{const e=r.get(s);return e&&e.remove(),!0}case"mceToggleEditor":{const e=r.get(s);return e?(e.isHidden()?e.show():e.hide(),!0):(r.execCommand("mceAddEditor",!1,n),!0)}}return!!r.activeEditor&&r.activeEditor.execCommand(e,t,n)},triggerSave:()=>{eP(oP,(e=>{e.save()}))},addI18n:(e,t)=>{ja.add(e,t)},translate:e=>ja.translate(e),setActive(e){const t=this.activeEditor;this.activeEditor!==e&&(t&&t.dispatch("deactivate",{relatedTarget:e}),e.dispatch("activate",{relatedTarget:t})),this.activeEditor=e},_setBaseUrl(e){this.baseURL=new jC(this.documentBaseURL).toAbsolute(e.replace(/\/+$/,"")),this.baseURI=new jC(this.baseURL)}};lP.setup();const dP=(()=>{const e=Va();return{FakeClipboardItem:e=>({items:e,types:ge(e),getType:t=>Ee(e,t).getOrUndefined()}),write:t=>{e.set(t)},read:()=>e.get().getOrUndefined(),clear:e.clear}})(),cP=Math.min,mP=Math.max,uP=Math.round,fP=(e,t,n)=>{let o=t.x,r=t.y;const s=e.w,a=e.h,i=t.w,l=t.h,d=(n||"").split("");return"b"===d[0]&&(r+=l),"r"===d[1]&&(o+=i),"c"===d[0]&&(r+=uP(l/2)),"c"===d[1]&&(o+=uP(i/2)),"b"===d[3]&&(r-=a),"r"===d[4]&&(o-=s),"c"===d[3]&&(r-=uP(a/2)),"c"===d[4]&&(o-=uP(s/2)),gP(o,r,s,a)},gP=(e,t,n,o)=>({x:e,y:t,w:n,h:o}),pP={inflate:(e,t,n)=>gP(e.x-t,e.y-n,e.w+2*t,e.h+2*n),relativePosition:fP,findBestRelativePosition:(e,t,n,o)=>{for(let r=0;r<o.length;r++){const s=fP(e,t,o[r]);if(s.x>=n.x&&s.x+s.w<=n.w+n.x&&s.y>=n.y&&s.y+s.h<=n.h+n.y)return o[r]}return null},intersect:(e,t)=>{const n=mP(e.x,t.x),o=mP(e.y,t.y),r=cP(e.x+e.w,t.x+t.w),s=cP(e.y+e.h,t.y+t.h);return r-n<0||s-o<0?null:gP(n,o,r-n,s-o)},clamp:(e,t,n)=>{let o=e.x,r=e.y,s=e.x+e.w,a=e.y+e.h;const i=t.x+t.w,l=t.y+t.h,d=mP(0,t.x-o),c=mP(0,t.y-r),m=mP(0,s-i),u=mP(0,a-l);return o+=d,r+=c,n&&(s+=d,a+=c,o-=m,r-=u),s-=m,a-=u,gP(o,r,s-o,a-r)},create:gP,fromClientRect:e=>gP(e.left,e.top,e.width,e.height)},hP=(()=>{const e={},t={};return{load:(n,o)=>{const r=`Script at URL "${o}" failed to load`,s=`Script at URL "${o}" did not call \`tinymce.Resource.add('${n}', data)\` within 1 second`;if(void 0!==e[n])return e[n];{const a=new Promise(((e,a)=>{const i=((e,t,n=1e3)=>{let o=!1,r=null;const s=e=>(...t)=>{o||(o=!0,null!==r&&(clearTimeout(r),r=null),e.apply(null,t))},a=s(e),i=s(t);return{start:(...e)=>{o||null!==r||(r=setTimeout((()=>i.apply(null,e)),n))},resolve:a,reject:i}})(e,a);t[n]=i.resolve,Ma.ScriptLoader.loadScript(o).then((()=>i.start(s)),(()=>i.reject(r)))}));return e[n]=a,a}},add:(n,o)=>{void 0!==t[n]&&(t[n](o),delete t[n]),e[n]=Promise.resolve(o)},unload:t=>{delete e[t]}}})();let bP;try{const e="__storage_test__";bP=window.localStorage,bP.setItem(e,e),bP.removeItem(e)}catch(e){bP=(()=>{let e={},t=[];const n={getItem:t=>e[t]||null,setItem:(n,o)=>{t.push(n),e[n]=String(o)},key:e=>t[e],removeItem:n=>{t=t.filter((e=>e===n)),delete e[n]},clear:()=>{t=[],e={}},length:0};return Object.defineProperty(n,"length",{get:()=>t.length,configurable:!1,enumerable:!1}),n})()}const vP={geom:{Rect:pP},util:{Delay:Tg,Tools:Pt,VK:gf,URI:jC,EventDispatcher:SB,Observable:NB,I18n:ja,LocalStorage:bP,ImageUploader:e=>{const t=Vx(),n=Yx(e,t);return{upload:(t,o=!0)=>n.upload(t,o?Gx(e):void 0)}}},dom:{EventUtils:Ea,TreeWalker:Fo,TextSeeker:ui,DOMUtils:Pa,ScriptLoader:Ma,RangeUtils:Xf,Serializer:ox,StyleSheetLoader:Ls,ControlSelection:yf,BookmarkManager:sf,Selection:Jw,Event:Ea.Event},html:{Styles:ga,Entities:ea,Node:up,Schema:fa,DomParser:tw,Writer:xp,Serializer:kp},Env:Dt,AddOnManager:Ha,Annotator:rf,Formatter:lk,UndoManager:ck,EditorCommands:pB,WindowManager:Lx,NotificationManager:Tx,EditorObservable:BB,Shortcuts:KB,Editor:JB,FocusManager:Og,EditorManager:lP,DOM:Pa.DOM,ScriptLoader:Ma.ScriptLoader,PluginManager:Bx,ThemeManager:Px,ModelManager:kx,IconManager:xx,Resource:hP,FakeClipboard:dP,trim:Pt.trim,isArray:Pt.isArray,is:Pt.is,toArray:Pt.toArray,makeMap:Pt.makeMap,each:Pt.each,map:Pt.map,grep:Pt.grep,inArray:Pt.inArray,extend:Pt.extend,walk:Pt.walk,resolve:Pt.resolve,explode:Pt.explode,_addCacheSuffix:Pt._addCacheSuffix},yP=Pt.extend(lP,vP);(e=>{window.tinymce=e,window.tinyMCE=e})(yP),(e=>{if("object"==typeof n)try{n.exports=e}catch(e){}})(yP)}()})); ;/*!node_modules/tinymce/icons/default/icons.js*/ amis.define("7e76fc8",(function(h,v,l,a){tinymce.IconManager.add("default",{icons:{"accessibility-check":'<svg width="24" height="24"><path d="M12 2a2 2 0 0 1 2 2 2 2 0 0 1-2 2 2 2 0 0 1-2-2c0-1.1.9-2 2-2Zm8 7h-5v12c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-5c0-.6-.4-1-1-1a1 1 0 0 0-1 1v5c0 .6-.4 1-1 1a1 1 0 0 1-1-1V9H4a1 1 0 1 1 0-2h16c.6 0 1 .4 1 1s-.4 1-1 1Z" fill-rule="nonzero"/></svg>',"action-next":'<svg width="24" height="24"><path fill-rule="nonzero" d="M5.7 7.3a1 1 0 0 0-1.4 1.4l7.7 7.7 7.7-7.7a1 1 0 1 0-1.4-1.4L12 13.6 5.7 7.3Z"/></svg>',"action-prev":'<svg width="24" height="24"><path fill-rule="nonzero" d="M18.3 15.7a1 1 0 0 0 1.4-1.4L12 6.6l-7.7 7.7a1 1 0 0 0 1.4 1.4L12 9.4l6.3 6.3Z"/></svg>',addtag:'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M15 5a2 2 0 0 1 1.6.8L21 12l-4.4 6.2a2 2 0 0 1-1.6.8h-3v-2h3l3.5-5L15 7H5v3H3V7c0-1.1.9-2 2-2h10Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M6 12a1 1 0 0 0-1 1v2H3a1 1 0 1 0 0 2h2v2a1 1 0 1 0 2 0v-2h2a1 1 0 1 0 0-2H7v-2c0-.6-.4-1-1-1Z"/></svg>',"align-center":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm3 4h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 1 1 0-2Zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2Zm-3-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',"align-justify":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',"align-left":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 4h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Zm0-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',"align-none":'<svg width="24" height="24"><path d="M14.2 5 13 7H5a1 1 0 1 1 0-2h9.2Zm4 0h.8a1 1 0 0 1 0 2h-2l1.2-2Zm-6.4 4-1.2 2H5a1 1 0 0 1 0-2h6.8Zm4 0H19a1 1 0 0 1 0 2h-4.4l1.2-2Zm-6.4 4-1.2 2H5a1 1 0 0 1 0-2h4.4Zm4 0H19a1 1 0 0 1 0 2h-6.8l1.2-2ZM7 17l-1.2 2H5a1 1 0 0 1 0-2h2Zm4 0h8a1 1 0 0 1 0 2H9.8l1.2-2Zm5.2-13.5 1.3.7-9.7 16.3-1.3-.7 9.7-16.3Z" fill-rule="evenodd"/></svg>',"align-right":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm6 4h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm-6-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',"arrow-left":'<svg width="24" height="24"><path d="m5.6 13 12 6a1 1 0 0 0 1.4-1V6a1 1 0 0 0-1.4-.9l-12 6a1 1 0 0 0 0 1.8Z" fill-rule="evenodd"/></svg>',"arrow-right":'<svg width="24" height="24"><path d="m18.5 13-12 6A1 1 0 0 1 5 18V6a1 1 0 0 1 1.4-.9l12 6a1 1 0 0 1 0 1.8Z" fill-rule="evenodd"/></svg>',bold:'<svg width="24" height="24"><path d="M7.8 19c-.3 0-.5 0-.6-.2l-.2-.5V5.7c0-.2 0-.4.2-.5l.6-.2h5c1.5 0 2.7.3 3.5 1 .7.6 1.1 1.4 1.1 2.5a3 3 0 0 1-.6 1.9c-.4.6-1 1-1.6 1.2.4.1.9.3 1.3.6s.8.7 1 1.2c.4.4.5 1 .5 1.6 0 1.3-.4 2.3-1.3 3-.8.7-2.1 1-3.8 1H7.8Zm5-8.3c.6 0 1.2-.1 1.6-.5.4-.3.6-.7.6-1.3 0-1.1-.8-1.7-2.3-1.7H9.3v3.5h3.4Zm.5 6c.7 0 1.3-.1 1.7-.4.4-.4.6-.9.6-1.5s-.2-1-.7-1.4c-.4-.3-1-.4-2-.4H9.4v3.8h4Z" fill-rule="evenodd"/></svg>',bookmark:'<svg width="24" height="24"><path d="M6 4v17l6-4 6 4V4c0-.6-.4-1-1-1H7a1 1 0 0 0-1 1Z" fill-rule="nonzero"/></svg>',"border-style":'<svg width="24" height="24"><g fill-rule="evenodd"><rect width="18" height="2" x="3" y="6" rx="1"/><rect width="2.8" height="2" x="3" y="16" rx="1"/><rect width="2.8" height="2" x="6.8" y="16" rx="1"/><rect width="2.8" height="2" x="10.6" y="16" rx="1"/><rect width="2.8" height="2" x="14.4" y="16" rx="1"/><rect width="2.8" height="2" x="18.2" y="16" rx="1"/><rect width="8" height="2" x="3" y="11" rx="1"/><rect width="8" height="2" x="13" y="11" rx="1"/></g></svg>',"border-width":'<svg width="24" height="24"><g fill-rule="evenodd"><rect width="18" height="5" x="3" y="5" rx="1"/><rect width="18" height="3.5" x="3" y="11.5" rx="1"/><rect width="18" height="2" x="3" y="17" rx="1"/></g></svg>',brightness:'<svg width="24" height="24"><path d="M12 17c.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7v-1c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3Zm0-10a1 1 0 0 1-.7-.3A1 1 0 0 1 11 6V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3Zm7 4c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-1a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1ZM7 12c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3H5a1 1 0 0 1-.7-.3A1 1 0 0 1 4 12c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1c.3 0 .5.1.7.3.2.2.3.4.3.7Zm10 3.5.7.8c.2.1.3.4.3.6 0 .3-.1.6-.3.8a1 1 0 0 1-.8.3 1 1 0 0 1-.6-.3l-.8-.7a1 1 0 0 1-.3-.8c0-.2.1-.5.3-.7a1 1 0 0 1 1.4 0Zm-10-7-.7-.8a1 1 0 0 1-.3-.6c0-.3.1-.6.3-.8.2-.2.5-.3.8-.3.2 0 .5.1.7.3l.7.7c.2.2.3.5.3.8 0 .2-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.8-.3Zm10 0a1 1 0 0 1-.8.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.6.3-.8l.8-.7c.1-.2.4-.3.6-.3.3 0 .6.1.8.3.2.2.3.5.3.8 0 .2-.1.5-.3.7l-.7.7Zm-10 7c.2-.2.5-.3.8-.3.2 0 .5.1.7.3a1 1 0 0 1 0 1.4l-.8.8a1 1 0 0 1-.6.3 1 1 0 0 1-.8-.3 1 1 0 0 1-.3-.8c0-.2.1-.5.3-.6l.7-.8ZM12 8a4 4 0 0 1 3.7 2.4 4 4 0 0 1 0 3.2A4 4 0 0 1 12 16a4 4 0 0 1-3.7-2.4 4 4 0 0 1 0-3.2A4 4 0 0 1 12 8Zm0 6.5c.7 0 1.3-.2 1.8-.7.5-.5.7-1.1.7-1.8s-.2-1.3-.7-1.8c-.5-.5-1.1-.7-1.8-.7s-1.3.2-1.8.7c-.5.5-.7 1.1-.7 1.8s.2 1.3.7 1.8c.5.5 1.1.7 1.8.7Z" fill-rule="evenodd"/></svg>',browse:'<svg width="24" height="24"><path d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-4v-2h4V8H5v10h4v2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-8 9.4-2.3 2.3a1 1 0 1 1-1.4-1.4l4-4a1 1 0 0 1 1.4 0l4 4a1 1 0 0 1-1.4 1.4L13 13.4V20a1 1 0 0 1-2 0v-6.6Z" fill-rule="nonzero"/></svg>',cancel:'<svg width="24" height="24"><path d="M12 4.6a7.4 7.4 0 1 1 0 14.8 7.4 7.4 0 0 1 0-14.8ZM12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18Zm0 8L14.8 8l1 1.1-2.7 2.8 2.7 2.7-1.1 1.1-2.7-2.7-2.7 2.7-1-1.1 2.6-2.7-2.7-2.7 1-1.1 2.8 2.7Z" fill-rule="nonzero"/></svg>',"cell-background-color":'<svg width="24" height="24"><path d="m15.7 2 1.6 1.6-2.7 2.6 5.9 5.8c.7.7.7 1.7 0 2.4l-6.3 6.1a1.7 1.7 0 0 1-2.4 0l-6.3-6.1c-.7-.7-.7-1.7 0-2.4L15.7 2ZM18 12l-4.5-4L9 12h9ZM4 16s2 2.4 2 3.8C6 21 5.1 22 4 22s-2-1-2-2.2C2 18.4 4 16 4 16Z"/></svg>',"cell-border-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M5 13v5h2v2H5a2 2 0 0 1-2-2v-5h2zm8-7V4h6a2 2 0 0 1 2 2h-8z" opacity=".2"/><path fill-rule="nonzero" d="M13 4v2H5v7H3V6c0-1.1.9-2 2-2h8zm-2.6 14.1.1-.1.1.1.2.3.2.2.2.2c.4.6.8 1.2.8 1.7 0 .8-.7 1.5-1.5 1.5S9 21.3 9 20.5c0-.5.4-1.1.8-1.7l.2-.2.2-.2.2-.3z"/><path d="m13 11-2 2H5v-2h6V6h2z"/><path fill-rule="nonzero" d="m18.4 8 1 1-1.8 1.9 4 4c.5.4.5 1.1 0 1.6l-4.3 4.2a1.2 1.2 0 0 1-1.6 0l-4.4-4.2c-.4-.5-.4-1.2 0-1.7l7-6.8Zm1.6 7-3-3-3 3h6Z"/></g></svg>',"change-case":'<svg width="24" height="24"><path d="M18.4 18.2v-.6c-.5.8-1.3 1.2-2.4 1.2-2.2 0-3.3-1.6-3.3-4.8 0-3.1 1-4.7 3.3-4.7 1.1 0 1.8.3 2.4 1.1v-.6c0-.5.4-.8.8-.8s.8.3.8.8v8.4c0 .5-.4.8-.8.8a.8.8 0 0 1-.8-.8zm-2-7.4c-1.3 0-1.8.9-1.8 3.2 0 2.4.5 3.3 1.7 3.3 1.3 0 1.8-.9 1.8-3.2 0-2.4-.5-3.3-1.7-3.3zM10 15.7H5.5l-.8 2.6a1 1 0 0 1-1 .7h-.2a.7.7 0 0 1-.7-1l4-12a1 1 0 0 1 2 0l4 12a.7.7 0 0 1-.8 1h-.2a1 1 0 0 1-1-.7l-.8-2.6zm-.3-1.5-2-6.5-1.9 6.5h3.9z" fill-rule="evenodd"/></svg>',"character-count":'<svg width="24" height="24"><path d="M4 11.5h16v1H4v-1Zm4.8-6.8V10H7.7V5.8h-1v-1h2ZM11 8.3V9h2v1h-3V7.7l2-1v-.9h-2v-1h3v2.4l-2 1Zm6.3-3.4V10h-3.1V9h2.1V8h-2.1V6.8h2.1v-1h-2.1v-1h3.1ZM5.8 16.4c0-.5.2-.8.5-1 .2-.2.6-.3 1.2-.3l.8.1c.2 0 .4.2.5.3l.4.4v2.8l.2.3H8.2V18.7l-.6.3H7c-.4 0-.7 0-1-.2a1 1 0 0 1-.3-.9c0-.3 0-.6.3-.8.3-.2.7-.4 1.2-.4l.6-.2h.3v-.2l-.1-.2a.8.8 0 0 0-.5-.1 1 1 0 0 0-.4 0l-.3.4h-1Zm2.3.8h-.2l-.2.1-.4.1a1 1 0 0 0-.4.2l-.2.2.1.3.5.1h.4l.4-.4v-.6Zm2-3.4h1.2v1.7l.5-.3h.5c.5 0 .9.1 1.2.5.3.4.5.8.5 1.4 0 .6-.2 1.1-.5 1.5-.3.4-.7.6-1.3.6l-.6-.1-.4-.4v.4h-1.1v-5.4Zm1.1 3.3c0 .3 0 .6.2.8a.7.7 0 0 0 1.2 0l.2-.8c0-.4 0-.6-.2-.8a.7.7 0 0 0-.6-.3l-.6.3-.2.8Zm6.1-.5c0-.2 0-.3-.2-.4a.8.8 0 0 0-.5-.2c-.3 0-.5.1-.6.3l-.2.9c0 .3 0 .6.2.8.1.2.3.3.6.3.2 0 .4 0 .5-.2l.2-.4h1.1c0 .5-.3.8-.6 1.1a2 2 0 0 1-1.3.4c-.5 0-1-.2-1.3-.6a2 2 0 0 1-.5-1.4c0-.6.1-1.1.5-1.5.3-.4.8-.5 1.4-.5.5 0 1 0 1.2.3.4.3.5.7.5 1.2h-1v-.1Z" fill-rule="evenodd"/></svg>',"checklist-rtl":'<svg width="24" height="24"><path d="M5 17h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm14.2 11c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 8c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',checklist:'<svg width="24" height="24"><path d="M11 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0-6h8a1 1 0 0 1 0 2h-8a1 1 0 0 1 0-2ZM7.2 16c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8Zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8Zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 8c-.2.3-.7.4-1 0L3.8 6.9a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8Z" fill-rule="evenodd"/></svg>',checkmark:'<svg width="24" height="24"><path d="M18.2 5.4a1 1 0 0 1 1.6 1.2l-8 12a1 1 0 0 1-1.5.1l-5-5a1 1 0 1 1 1.4-1.4l4.1 4.1 7.4-11Z" fill-rule="nonzero"/></svg>',"chevron-down":'<svg width="10" height="10"><path d="M8.7 2.2c.3-.3.8-.3 1 0 .4.4.4.9 0 1.2L5.7 7.8c-.3.3-.9.3-1.2 0L.2 3.4a.8.8 0 0 1 0-1.2c.3-.3.8-.3 1.1 0L5 6l3.7-3.8Z" fill-rule="nonzero"/></svg>',"chevron-left":'<svg width="10" height="10"><path d="M7.8 1.3 4 5l3.8 3.7c.3.3.3.8 0 1-.4.4-.9.4-1.2 0L2.2 5.7a.8.8 0 0 1 0-1.2L6.6.2C7 0 7.4 0 7.8.2c.3.3.3.8 0 1.1Z" fill-rule="nonzero"/></svg>',"chevron-right":'<svg width="10" height="10"><path d="M2.2 1.3a.8.8 0 0 1 0-1c.4-.4.9-.4 1.2 0l4.4 4.1c.3.4.3.9 0 1.2L3.4 9.8c-.3.3-.8.3-1.2 0a.8.8 0 0 1 0-1.1L6 5 2.2 1.3Z" fill-rule="nonzero"/></svg>',"chevron-up":'<svg width="10" height="10"><path d="M8.7 7.8 5 4 1.3 7.8c-.3.3-.8.3-1 0a.8.8 0 0 1 0-1.2l4.1-4.4c.3-.3.9-.3 1.2 0l4.2 4.4c.3.3.3.9 0 1.2-.3.3-.8.3-1.1 0Z" fill-rule="nonzero"/></svg>',close:'<svg width="24" height="24"><path d="M17.3 8.2 13.4 12l3.9 3.8a1 1 0 0 1-1.5 1.5L12 13.4l-3.8 3.9a1 1 0 0 1-1.5-1.5l3.9-3.8-3.9-3.8a1 1 0 0 1 1.5-1.5l3.8 3.9 3.8-3.9a1 1 0 0 1 1.5 1.5Z" fill-rule="evenodd"/></svg>',"code-sample":'<svg width="24" height="26"><path d="M7.1 11a2.8 2.8 0 0 1-.8 2 2.8 2.8 0 0 1 .8 2v1.7c0 .3.1.6.4.8.2.3.5.4.8.4.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.7 0-1.4-.3-2-.8-.5-.6-.8-1.3-.8-2V15c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 0 1-.4-.4v-.8c0-.2.2-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V9.3c0-.7.3-1.4.8-2 .6-.5 1.3-.8 2-.8.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8V11Zm9.8 0V9.3c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 0 1-.4-.4V7c0-.2.1-.4.4-.4.7 0 1.4.3 2 .8.5.6.8 1.3.8 2V11c0 .3.1.6.4.8.2.3.5.4.8.4.2 0 .4.2.4.4v.8c0 .2-.2.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8v1.7c0 .7-.3 1.4-.8 2-.6.5-1.3.8-2 .8a.4.4 0 0 1-.4-.4v-.8c0-.2.1-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V15a2.8 2.8 0 0 1 .8-2 2.8 2.8 0 0 1-.8-2Zm-3.3-.4c0 .4-.1.8-.5 1.1-.3.3-.7.5-1.1.5-.4 0-.8-.2-1.1-.5-.4-.3-.5-.7-.5-1.1 0-.5.1-.9.5-1.2.3-.3.7-.4 1.1-.4.4 0 .8.1 1.1.4.4.3.5.7.5 1.2ZM12 13c.4 0 .8.1 1.1.5.4.3.5.7.5 1.1 0 1-.1 1.6-.5 2a3 3 0 0 1-1.1 1c-.4.3-.8.4-1.1.4a.5.5 0 0 1-.5-.5V17a3 3 0 0 0 1-.2l.6-.6c-.6 0-1-.2-1.3-.5-.2-.3-.3-.7-.3-1 0-.5.1-1 .5-1.2.3-.4.7-.5 1.1-.5Z" fill-rule="evenodd"/></svg>',"color-levels":'<svg width="24" height="24"><path d="M17.5 11.4A9 9 0 0 1 18 14c0 .5 0 1-.2 1.4 0 .4-.3.9-.5 1.3a6.2 6.2 0 0 1-3.7 3 5.7 5.7 0 0 1-3.2 0A5.9 5.9 0 0 1 7.6 18a6.2 6.2 0 0 1-1.4-2.6 6.7 6.7 0 0 1 0-2.8c0-.4.1-.9.3-1.3a13.6 13.6 0 0 1 2.3-4A20 20 0 0 1 12 4a26.4 26.4 0 0 1 3.2 3.4 18.2 18.2 0 0 1 2.3 4Zm-2 4.5c.4-.7.5-1.4.5-2a7.3 7.3 0 0 0-1-3.2c.2.6.2 1.2.2 1.9a4.5 4.5 0 0 1-1.3 3 5.3 5.3 0 0 1-2.3 1.5 4.9 4.9 0 0 1-2 .1 4.3 4.3 0 0 0 2.4.8 4 4 0 0 0 2-.6 4 4 0 0 0 1.5-1.5Z" fill-rule="evenodd"/></svg>',"color-picker":'<svg width="24" height="24"><path d="M12 3a9 9 0 0 0 0 18 1.5 1.5 0 0 0 1.1-2.5c-.2-.3-.4-.6-.4-1 0-.8.7-1.5 1.5-1.5H16a5 5 0 0 0 5-5c0-4.4-4-8-9-8Zm-5.5 9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Zm3-4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Zm3 4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Z" fill-rule="nonzero"/></svg>',"color-swatch-remove-color":'<svg width="24" height="24"><path stroke="#000" stroke-width="2" d="M21 3 3 21" fill-rule="evenodd"/></svg>',"color-swatch":'<svg width="24" height="24"><rect x="3" y="3" width="18" height="18" rx="1" fill-rule="evenodd"/></svg>',"comment-add":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="m9 19 3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 0 0-1 1v10c0 .6.4 1 1 1h4v2Zm-2 4v-4H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3h-6.4L7 23Z"/><path d="M13 10h2a1 1 0 0 1 0 2h-2v2a1 1 0 0 1-2 0v-2H9a1 1 0 0 1 0-2h2V8a1 1 0 0 1 2 0v2Z"/></g></svg>',comment:'<svg width="24" height="24"><path fill-rule="nonzero" d="m9 19 3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 0 0-1 1v10c0 .6.4 1 1 1h4v2Zm-2 4v-4H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3h-6.4L7 23Z"/></svg>',contrast:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4Zm-6 8a6 6 0 0 0 6 6V6a6 6 0 0 0-6 6Z" fill-rule="evenodd"/></svg>',copy:'<svg width="24" height="24"><path d="M16 3H6a2 2 0 0 0-2 2v11h2V5h10V3Zm1 4a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V9c0-1.2.9-2 2-2h7Zm0 12V9h-7v10h7Z" fill-rule="nonzero"/></svg>',crop:'<svg width="24" height="24"><path d="M17 8v7h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v2c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-2H7V9H5a1 1 0 1 1 0-2h2V5c0-.6.4-1 1-1s1 .4 1 1v2h7l3-3 1 1-3 3ZM9 9v5l5-5H9Zm1 6h5v-5l-5 5Z" fill-rule="evenodd"/></svg>',"cut-column":'<svg width="24" height="24"><path fill-rule="evenodd" d="M7.2 4.5c.9 0 1.6.4 2.2 1A3.7 3.7 0 0 1 10.5 8v.5l1 1 4-4 1-.5a3.3 3.3 0 0 1 2 0c.4 0 .7.3 1 .5L17 8h4v13h-6V10l-1.5 1.5.5.5v4l-2.5-2.5-1 1v.5c0 .4 0 .8-.3 1.2-.2.5-.4.9-.8 1.2-.6.7-1.3 1-2.2 1-.8.2-1.5 0-2-.6l-.5-.8-.2-1c0-.4 0-.8.3-1.2A3.9 3.9 0 0 1 7 12.7c.5-.2 1-.3 1.5-.2l1-1-1-1c-.5 0-1 0-1.5-.2-.5-.1-1-.4-1.4-.9-.4-.3-.6-.7-.8-1.2L4.5 7c0-.4 0-.7.2-1 0-.3.3-.6.5-.8.5-.5 1.2-.8 2-.7Zm12.3 5h-3v10h3v-10ZM8 13.8h-.3l-.4.2a2.8 2.8 0 0 0-.7.4v.1a2.8 2.8 0 0 0-.6.8l-.1.4v.7l.2.5.5.2h.7a2.6 2.6 0 0 0 .8-.3 2.4 2.4 0 0 0 .7-.7 2.5 2.5 0 0 0 .3-.8 1.5 1.5 0 0 0 0-.8 1 1 0 0 0-.2-.4 1 1 0 0 0-.5-.2H8Zm3.5-3.7c-.4 0-.7.1-1 .4-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4s.7-.1 1-.4c.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4ZM7 5.8h-.4a1 1 0 0 0-.5.3 1 1 0 0 0-.2.5v.7a2.5 2.5 0 0 0 .3.8l.2.3h.1l.4.4.4.2.4.1h.7L9 9l.2-.4a1.6 1.6 0 0 0 0-.8 2.6 2.6 0 0 0-.3-.8A2.5 2.5 0 0 0 7.7 6l-.4-.1H7Z"/></svg>',"cut-row":'<svg width="24" height="24"><path fill-rule="evenodd" d="M22 3v5H9l3 3 2-2h4l-4 4 1 1h.5c.4 0 .8 0 1.2.3.5.2.9.4 1.2.8.7.6 1 1.3 1 2.2.2.8 0 1.5-.6 2l-.8.5-1 .2c-.4 0-.8 0-1.2-.3a3.9 3.9 0 0 1-2.1-2.2c-.2-.5-.3-1-.2-1.5l-1-1-1 1c0 .5 0 1-.2 1.5-.1.5-.4 1-.9 1.4-.3.4-.7.6-1.2.8l-1.2.3c-.4 0-.7 0-1-.2-.3 0-.6-.3-.8-.5-.5-.5-.8-1.2-.7-2 0-.9.4-1.6 1-2.2A3.7 3.7 0 0 1 8.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 0 1 0-2c0-.4.3-.7.5-1l2 2V3h14ZM8.5 15.3h-.3a2.6 2.6 0 0 0-.8.4 2.5 2.5 0 0 0-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 0 0 .8-.3L9 18V18l.4-.4.2-.4.1-.4v-.7a1 1 0 0 0-.2-.5 1 1 0 0 0-.4-.2h-.5Zm7 0H15a1 1 0 0 0-.4.3 1 1 0 0 0-.2.5 1.5 1.5 0 0 0 0 .7v.4a2.8 2.8 0 0 0 .5.7h.1a2.8 2.8 0 0 0 .8.6l.4.1h.7l.5-.2.2-.5v-.7a2.6 2.6 0 0 0-.3-.8 2.4 2.4 0 0 0-.7-.7 2.5 2.5 0 0 0-.8-.3h-.3ZM12 11.6c-.4 0-.7.1-1 .4-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4s.7-.1 1-.4c.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4Zm8.5-7.1h-11v2h11v-2Z"/></svg>',cut:'<svg width="24" height="24"><path d="M18 15c.6.7 1 1.4 1 2.3 0 .8-.2 1.5-.7 2l-.8.5-1 .2c-.4 0-.8 0-1.2-.3a3.9 3.9 0 0 1-2.1-2.2c-.2-.5-.3-1-.2-1.5l-1-1-1 1c0 .5 0 1-.2 1.5-.1.5-.4 1-.9 1.4-.3.4-.7.6-1.2.8l-1.2.3c-.4 0-.7 0-1-.2-.3 0-.6-.3-.8-.5-.5-.5-.8-1.2-.7-2 0-.9.4-1.6 1-2.2A3.7 3.7 0 0 1 8.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 0 1 0-2c0-.4.3-.7.5-1l6 6 6-6 .5 1a3.3 3.3 0 0 1 0 2c0 .4-.3.7-.5 1l-4 4 1 1h.5c.4 0 .8 0 1.2.3.5.2.9.4 1.2.8Zm-8.5 2.2.1-.4v-.7a1 1 0 0 0-.2-.5 1 1 0 0 0-.4-.2 1.6 1.6 0 0 0-.8 0 2.6 2.6 0 0 0-.8.3 2.5 2.5 0 0 0-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 0 0 .8-.3 2.8 2.8 0 0 0 1-1Zm2.5-2.8c.4 0 .7-.1 1-.4.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4s-.7.1-1 .4c-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4Zm5.4 4 .2-.5v-.7a2.6 2.6 0 0 0-.3-.8 2.4 2.4 0 0 0-.7-.7 2.5 2.5 0 0 0-.8-.3 1.5 1.5 0 0 0-.8 0 1 1 0 0 0-.4.2 1 1 0 0 0-.2.5 1.5 1.5 0 0 0 0 .7v.4l.3.4.3.4a2.8 2.8 0 0 0 .8.5l.4.1h.7l.5-.2Z" fill-rule="evenodd"/></svg>',"document-properties":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h10a2 2 0 0 0 2-2V7.6L14.4 3ZM17 19H7V5h6v4h4v10Z" fill-rule="nonzero"/></svg>',drag:'<svg width="24" height="24"><path d="M13 5h2v2h-2V5Zm0 4h2v2h-2V9ZM9 9h2v2H9V9Zm4 4h2v2h-2v-2Zm-4 0h2v2H9v-2Zm0 4h2v2H9v-2Zm4 0h2v2h-2v-2ZM9 5h2v2H9V5Z" fill-rule="evenodd"/></svg>',"duplicate-column":'<svg width="24" height="24"><path d="M17 6v16h-7V6h7Zm-2 2h-3v12h3V8Zm-2-6v2H8v15H6V2h7Z"/></svg>',"duplicate-row":'<svg width="24" height="24"><path d="M22 11v7H6v-7h16Zm-2 2H8v3h12v-3Zm-1-6v2H4v5H2V7h17Z"/></svg>',duplicate:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M16 3v2H6v11H4V5c0-1.1.9-2 2-2h10Zm3 8h-2V9h-7v10h9a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V9c0-1.2.9-2 2-2h7a2 2 0 0 1 2 2v2Z"/><path d="M17 14h1a1 1 0 0 1 0 2h-1v1a1 1 0 0 1-2 0v-1h-1a1 1 0 0 1 0-2h1v-1a1 1 0 0 1 2 0v1Z"/></g></svg>',"edit-block":'<svg width="24" height="24"><path fill-rule="nonzero" d="m19.8 8.8-9.4 9.4c-.2.2-.5.4-.9.4l-5.4 1.2 1.2-5.4.5-.8 9.4-9.4c.7-.7 1.8-.7 2.5 0l2.1 2.1c.7.7.7 1.8 0 2.5Zm-2-.2 1-.9v-.3l-2.2-2.2a.3.3 0 0 0-.3 0l-1 1L18 8.5Zm-1 1-2.5-2.4-6 6 2.5 2.5 6-6Zm-7 7.1-2.6-2.4-.3.3-.1.2-.7 3 3.1-.6h.1l.4-.5Z"/></svg>',"edit-image":'<svg width="24" height="24"><path d="M18 16h2V7a2 2 0 0 0-2-2H7v2h11v9ZM6 17h15a1 1 0 0 1 0 2h-1v1a1 1 0 0 1-2 0v-1H6a2 2 0 0 1-2-2V7H3a1 1 0 1 1 0-2h1V4a1 1 0 1 1 2 0v13Zm3-5.3 1.3 2 3-4.7 3.7 6H7l2-3.3Z" fill-rule="nonzero"/></svg>',"embed-page":'<svg width="24" height="24"><path d="M19 6V5H5v14h2A13 13 0 0 1 19 6Zm0 1.4c-.8.8-1.6 2.4-2.2 4.6H19V7.4Zm0 5.6h-2.4c-.4 1.8-.6 3.8-.6 6h3v-6Zm-4 6c0-2.2.2-4.2.6-6H13c-.7 1.8-1.1 3.8-1.1 6h3Zm-4 0c0-2.2.4-4.2 1-6H9.6A12 12 0 0 0 8 19h3ZM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1Zm11.8 9c.4-1.9 1-3.4 1.8-4.5a9.2 9.2 0 0 0-4 4.5h2.2Zm-3.4 0a12 12 0 0 1 2.8-4 12 12 0 0 0-5 4h2.2Z" fill-rule="nonzero"/></svg>',embed:'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1Zm1 2v14h14V5H5Zm4.8 2.6 5.6 4a.5.5 0 0 1 0 .8l-5.6 4A.5.5 0 0 1 9 16V8a.5.5 0 0 1 .8-.4Z" fill-rule="nonzero"/></svg>',emoji:'<svg width="24" height="24"><path d="M9 11c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 0 0-1 1c0 .6.4 1 1 1Zm6 0c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 0 0-1 1c0 .6.4 1 1 1Zm-3 5.5c2.1 0 4-1.5 4.4-3.5H7.6c.5 2 2.3 3.5 4.4 3.5ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm0 14.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13Z" fill-rule="nonzero"/></svg>',export:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M14.4 3 18 7v1h-5V5H7v14h9a1 1 0 0 1 2 0c0 1-.8 2-1.9 2H7c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2h7.5Z"/><path d="M18.1 12c.5 0 .9.4.9 1 0 .5-.3 1-.8 1h-7.3c-.5 0-.9-.4-.9-1 0-.5.3-1 .8-1h7.3Z"/><path d="M16.4 9.2a1 1 0 0 1 1.4.2l2.4 3.6-2.4 3.6a1 1 0 0 1-1.7-1v-.2l1.7-2.4-1.6-2.4a1 1 0 0 1 .2-1.4Z"/></g></svg>',fill:'<svg width="24" height="26"><path d="m16.6 12-9-9-1.4 1.4 2.4 2.4-5.2 5.1c-.5.6-.5 1.6 0 2.2L9 19.6a1.5 1.5 0 0 0 2.2 0l5.5-5.5c.5-.6.5-1.6 0-2.2ZM5.2 13 10 8.2l4.8 4.8H5.2ZM19 14.5s-2 2.2-2 3.5c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.3-2-3.5-2-3.5Z" fill-rule="nonzero"/></svg>',"flip-horizontally":'<svg width="24" height="24"><path d="M14 19h2v-2h-2v2Zm4-8h2V9h-2v2ZM4 7v10c0 1.1.9 2 2 2h3v-2H6V7h3V5H6a2 2 0 0 0-2 2Zm14-2v2h2a2 2 0 0 0-2-2Zm-7 16h2V3h-2v18Zm7-6h2v-2h-2v2Zm-4-8h2V5h-2v2Zm4 12a2 2 0 0 0 2-2h-2v2Z" fill-rule="nonzero"/></svg>',"flip-vertically":'<svg width="24" height="24"><path d="M5 14v2h2v-2H5Zm8 4v2h2v-2h-2Zm4-14H7a2 2 0 0 0-2 2v3h2V6h10v3h2V6a2 2 0 0 0-2-2Zm2 14h-2v2a2 2 0 0 0 2-2ZM3 11v2h18v-2H3Zm6 7v2h2v-2H9Zm8-4v2h2v-2h-2ZM5 18c0 1.1.9 2 2 2v-2H5Z" fill-rule="nonzero"/></svg>',footnote:'<svg width="24" height="24"><path d="M19 13c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2h14Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M19 4v6h-1V5h-1.5V4h2.6Z"/><path d="M12 18c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2h7ZM14 8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2h9Z"/></svg>',"format-painter":'<svg width="24" height="24"><path d="M18 5V4c0-.5-.4-1-1-1H5a1 1 0 0 0-1 1v4c0 .6.5 1 1 1h12c.6 0 1-.4 1-1V7h1v4H9v9c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-7h8V5h-3Z" fill-rule="nonzero"/></svg>',format:'<svg width="24" height="24"><path fill-rule="evenodd" d="M17 5a1 1 0 0 1 0 2h-4v11a1 1 0 0 1-2 0V7H7a1 1 0 1 1 0-2h10Z"/></svg>',fullscreen:'<svg width="24" height="24"><path d="m15.3 10-1.2-1.3 2.9-3h-2.3a.9.9 0 1 1 0-1.7H19c.5 0 .9.4.9.9v4.4a.9.9 0 1 1-1.8 0V7l-2.9 3Zm0 4 3 3v-2.3a.9.9 0 1 1 1.7 0V19c0 .5-.4.9-.9.9h-4.4a.9.9 0 1 1 0-1.8H17l-3-2.9 1.3-1.2ZM10 15.4l-2.9 3h2.3a.9.9 0 1 1 0 1.7H5a.9.9 0 0 1-.9-.9v-4.4a.9.9 0 1 1 1.8 0V17l2.9-3 1.2 1.3ZM8.7 10 5.7 7v2.3a.9.9 0 0 1-1.7 0V5c0-.5.4-.9.9-.9h4.4a.9.9 0 0 1 0 1.8H7l3 2.9-1.3 1.2Z" fill-rule="nonzero"/></svg>',gallery:'<svg width="24" height="24"><path fill-rule="nonzero" d="m5 15.7 2.3-2.2c.3-.3.7-.3 1 0L11 16l5.1-5c.3-.4.8-.4 1 0l2 1.9V8H5v7.7ZM5 18V19h3l1.8-1.9-2-2L5 17.9Zm14-3-2.5-2.4-6.4 6.5H19v-4ZM4 6h16c.6 0 1 .4 1 1v13c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V7c0-.6.4-1 1-1Zm6 7a2 2 0 1 1 0-4 2 2 0 0 1 0 4ZM4.5 4h15a.5.5 0 1 1 0 1h-15a.5.5 0 0 1 0-1Zm2-2h11a.5.5 0 1 1 0 1h-11a.5.5 0 0 1 0-1Z"/></svg>',gamma:'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1Zm1 2v14h14V5H5Zm6.5 11.8V14L9.2 8.7a5.1 5.1 0 0 0-.4-.8l-.1-.2H8v-1l.3-.1.3-.1h.7a1 1 0 0 1 .6.5l.1.3a8.5 8.5 0 0 1 .3.6l1.9 4.6 2-5.2a1 1 0 0 1 1-.6.5.5 0 0 1 .5.6L13 14v2.8a.7.7 0 0 1-1.4 0Z" fill-rule="nonzero"/></svg>',help:'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M12 5.5a6.5 6.5 0 0 0-6 9 6.3 6.3 0 0 0 1.4 2l1 1a6.3 6.3 0 0 0 3.6 1 6.5 6.5 0 0 0 6-9 6.3 6.3 0 0 0-1.4-2l-1-1a6.3 6.3 0 0 0-3.6-1ZM12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4Z"/><path d="M9.6 9.7a.7.7 0 0 1-.7-.8c0-1.1 1.5-1.8 3.2-1.8 1.8 0 3.2.8 3.2 2.4 0 1.4-.4 2.1-1.5 2.8-.2 0-.3.1-.3.2a2 2 0 0 0-.8.8.8.8 0 0 1-1.4-.6c.3-.7.8-1 1.3-1.5l.4-.2c.7-.4.8-.6.8-1.5 0-.5-.6-.9-1.7-.9-.5 0-1 .1-1.4.3-.2 0-.3.1-.3.2v-.2c0 .4-.4.8-.8.8Z" fill-rule="nonzero"/><circle cx="12" cy="16" r="1"/></g></svg>',"highlight-bg-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-highlight-bg-color__color" d="M3 18h18v3H3z"/><path fill-rule="nonzero" d="M7.7 16.7H3l3.3-3.3-.7-.8L10.2 8l4 4.1-4 4.2c-.2.2-.6.2-.8 0l-.6-.7-1.1 1.1zm5-7.5L11 7.4l3-2.9a2 2 0 0 1 2.6 0L18 6c.7.7.7 2 0 2.7l-2.9 2.9-1.8-1.8-.5-.6"/></g></svg>',home:'<svg width="24" height="24"><path fill-rule="nonzero" d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>',"horizontal-rule":'<svg width="24" height="24"><path d="M4 11h16v2H4z" fill-rule="evenodd"/></svg>',"image-options":'<svg width="24" height="24"><path d="M6 10a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Zm12 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Zm-6 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Z" fill-rule="nonzero"/></svg>',image:'<svg width="24" height="24"><path d="m5 15.7 3.3-3.2c.3-.3.7-.3 1 0L12 15l4.1-4c.3-.4.8-.4 1 0l2 1.9V5H5v10.7ZM5 18V19h3l2.8-2.9-2-2L5 17.9Zm14-3-2.5-2.4-6.4 6.5H19v-4ZM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1Zm6 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z" fill-rule="nonzero"/></svg>',indent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 1 1 0-2Zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2Zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2Zm-5 4h12a1 1 0 0 1 0 2H7a1 1 0 0 1 0-2Zm-2.6-3.8L6.2 12l-1.8-1.2a1 1 0 0 1 1.2-1.6l3 2a1 1 0 0 1 0 1.6l-3 2a1 1 0 1 1-1.2-1.6Z" fill-rule="evenodd"/></svg>',info:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4Zm-1 3v2h2V7h-2Zm3 10v-1h-1v-5h-3v1h1v4h-1v1h4Z" fill-rule="evenodd"/></svg>',"insert-character":'<svg width="24" height="24"><path d="M15 18h4l1-2v4h-6v-3.3l1.4-1a6 6 0 0 0 1.8-2.9 6.3 6.3 0 0 0-.1-4.1 5.8 5.8 0 0 0-3-3.2c-.6-.3-1.3-.5-2.1-.5a5.1 5.1 0 0 0-3.9 1.8 6.3 6.3 0 0 0-1.3 6 6.2 6.2 0 0 0 1.8 3l1.4.9V20H4v-4l1 2h4v-.5l-2-1L5.4 15A6.5 6.5 0 0 1 4 11c0-1 .2-1.9.6-2.7A7 7 0 0 1 6.3 6C7.1 5.4 8 5 9 4.5c1-.3 2-.5 3.1-.5a8.8 8.8 0 0 1 5.7 2 7 7 0 0 1 1.7 2.3 6 6 0 0 1 .2 4.8c-.2.7-.6 1.3-1 1.9a7.6 7.6 0 0 1-3.6 2.5v.5Z" fill-rule="evenodd"/></svg>',"insert-time":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M12 19a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm0 2a9 9 0 1 1 0-18 9 9 0 0 1 0 18Z"/><path d="M16 12h-3V7c0-.6-.4-1-1-1a1 1 0 0 0-1 1v7h5c.6 0 1-.4 1-1s-.4-1-1-1Z"/></g></svg>',invert:'<svg width="24" height="24"><path d="M18 19.3 16.5 18a5.8 5.8 0 0 1-3.1 1.9 6.1 6.1 0 0 1-5.5-1.6A5.8 5.8 0 0 1 6 14v-.3l.1-1.2A13.9 13.9 0 0 1 7.7 9l-3-3 .7-.8 2.8 2.9 9 8.9 1.5 1.6-.7.6Zm0-5.5v.3l-.1 1.1-.4 1-1.2-1.2a4.3 4.3 0 0 0 .2-1v-.2c0-.4 0-.8-.2-1.3l-.5-1.4a14.8 14.8 0 0 0-3-4.2L12 6a26.1 26.1 0 0 0-2.2 2.5l-1-1a20.9 20.9 0 0 1 2.9-3.3L12 4l1 .8a22.2 22.2 0 0 1 4 5.4c.6 1.2 1 2.4 1 3.6Z" fill-rule="evenodd"/></svg>',italic:'<svg width="24" height="24"><path d="m16.7 4.7-.1.9h-.3c-.6 0-1 0-1.4.3-.3.3-.4.6-.5 1.1l-2.1 9.8v.6c0 .5.4.8 1.4.8h.2l-.2.8H8l.2-.8h.2c1.1 0 1.8-.5 2-1.5l2-9.8.1-.5c0-.6-.4-.8-1.4-.8h-.3l.2-.9h5.8Z" fill-rule="evenodd"/></svg>',language:'<svg width="24" height="24"><path d="M12 3a9 9 0 1 1 0 18 9 9 0 0 1 0-18Zm4.3 13.3c-.5 1-1.2 2-2 2.9a7.5 7.5 0 0 0 3.2-2.1l-.2-.2a6 6 0 0 0-1-.6Zm-8.6 0c-.5.2-.9.5-1.2.8.9 1 2 1.7 3.2 2a10 10 0 0 1-2-2.8Zm3.6-.8c-.8 0-1.6.1-2.2.3.5 1 1.2 1.9 2.1 2.7Zm1.5 0v3c.9-.8 1.6-1.7 2.1-2.7-.6-.2-1.4-.3-2.1-.3Zm-6-2.7H4.5c.2 1 .5 2.1 1 3h.3l1.3-1a10 10 0 0 1-.3-2Zm12.7 0h-2.3c0 .7-.1 1.4-.3 2l1.6 1.1c.5-1 .9-2 1-3.1Zm-3.8 0h-3V14c1 0 2 .1 2.7.4.2-.5.3-1 .3-1.6Zm-4.4 0h-3l.3 1.6c.8-.3 1.7-.4 2.7-.4v-1.3Zm-5.5-5c-.7 1-1.1 2.2-1.3 3.5h2.3c0-1 .2-1.8.5-2.6l-1.5-1Zm2.9 1.4v.1c-.2.6-.4 1.3-.4 2h3V9.4c-1 0-1.8-.1-2.6-.3Zm6.6 0h-.1l-2.4.3v1.8h3l-.5-2.1Zm3-1.4-.3.1-1.3.8c.3.8.5 1.6.5 2.6h2.3a7.5 7.5 0 0 0-1.3-3.5Zm-9 0 2 .2V5.5a9 9 0 0 0-2 2.2Zm3.5-2.3V8c.6 0 1.3 0 1.9-.2a9 9 0 0 0-2-2.3Zm-3-.7h-.1c-1.1.4-2.1 1-3 1.8l1.2.7a10 10 0 0 1 1.9-2.5Zm4.4 0 .1.1a10 10 0 0 1 1.8 2.4l1.1-.7a7.5 7.5 0 0 0-3-1.8Z"/></svg>',"line-height":'<svg width="24" height="24"><path d="M21 5a1 1 0 0 1 .1 2H13a1 1 0 0 1-.1-2H21zm0 4a1 1 0 0 1 .1 2H13a1 1 0 0 1-.1-2H21zm0 4a1 1 0 0 1 .1 2H13a1 1 0 0 1-.1-2H21zm0 4a1 1 0 0 1 .1 2H13a1 1 0 0 1-.1-2H21zM7 3.6l3.7 3.7a1 1 0 0 1-1.3 1.5h-.1L8 7.3v9.2l1.3-1.3a1 1 0 0 1 1.3 0h.1c.4.4.4 1 0 1.3v.1L7 20.4l-3.7-3.7a1 1 0 0 1 1.3-1.5h.1L6 16.7V7.4L4.7 8.7a1 1 0 0 1-1.3 0h-.1a1 1 0 0 1 0-1.3v-.1L7 3.6z"/></svg>',line:'<svg width="24" height="24"><path d="m15 9-8 8H4v-3l8-8 3 3Zm1-1-3-3 1-1h1c-.2 0 0 0 0 0l2 2s0 .2 0 0v1l-1 1ZM4 18h16v2H4v-2Z" fill-rule="evenodd"/></svg>',link:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 0 1 1.4 1.4l-2 2a2 2 0 1 0 2.6 2.8l4.8-4.8a1 1 0 0 0 0-1.4 1 1 0 1 1 1.4-1.3 2.9 2.9 0 0 1 0 4L9.6 20a3.9 3.9 0 0 1-5.5-5.5l2-2Zm11.6-.6a1 1 0 0 1-1.4-1.4l2-2a2 2 0 1 0-2.6-2.8L11 10.3a1 1 0 0 0 0 1.4A1 1 0 1 1 9.6 13a2.9 2.9 0 0 1 0-4L14.4 4a3.9 3.9 0 0 1 5.5 5.5l-2 2Z" fill-rule="nonzero"/></svg>',"list-bull-circle":'<svg width="48" height="48"><g fill-rule="evenodd"><path d="M11 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6ZM11 26a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6ZM11 36a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6Z" fill-rule="nonzero"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-bull-default":'<svg width="48" height="48"><g fill-rule="evenodd"><circle cx="11" cy="14" r="3"/><circle cx="11" cy="24" r="3"/><circle cx="11" cy="34" r="3"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-bull-square":'<svg width="48" height="48"><g fill-rule="evenodd"><path d="M8 11h6v6H8zM8 21h6v6H8zM8 31h6v6H8z"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-num-default-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 17v-4.8h-.1l-1.5 1v-1.1l1.6-1.1h1.2v6zM33.3 17.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm1.7 5.7c0-1.2 1-2 2.2-2 1.3 0 2.1.8 2.1 1.8 0 .7-.3 1.2-1.3 2.2l-1.2 1v.2h2.6v1h-4.3v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H35zm-1.7 4.3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm3.2 7.3v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H35c0-1.1 1-1.8 2.2-1.8 1.2 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.7.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .6 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm-3.3 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',"list-num-default":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10 17v-4.8l-1.5 1v-1.1l1.6-1h1.2V17h-1.2Zm3.6.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7Zm-5 5.7c0-1.2.8-2 2.1-2s2.1.8 2.1 1.8c0 .7-.3 1.2-1.4 2.2l-1.1 1v.2h2.6v1H8.6v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H8.5Zm6.3 4.3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7ZM10 34.4v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H8.6c0-1.1 1-1.8 2.2-1.8 1.3 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.8.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .7 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7Zm4.7 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7Z"/></g></svg>',"list-num-lower-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M36.5 16c-.9 0-1.5-.5-1.5-1.3s.6-1.3 1.8-1.4h1v-.4c0-.4-.2-.6-.7-.6-.4 0-.7.1-.8.4h-1.1c0-.8.8-1.4 2-1.4S39 12 39 13V16h-1.2v-.6c-.3.4-.8.7-1.4.7Zm.4-.8c.6 0 1-.4 1-.9V14h-1c-.5.1-.7.3-.7.6 0 .4.3.6.7.6ZM33.1 16.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7ZM37.7 26c-.7 0-1.2-.2-1.5-.7v.7H35v-6.3h1.2v2.5c.3-.5.8-.9 1.5-.9 1.1 0 1.8 1 1.8 2.4 0 1.5-.7 2.4-1.8 2.4Zm-.5-3.6c-.6 0-1 .5-1 1.3s.4 1.4 1 1.4c.7 0 1-.6 1-1.4 0-.8-.3-1.3-1-1.3ZM33.2 26.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm6 7h-1c-.1-.5-.4-.8-1-.8s-1 .5-1 1.4c0 1 .4 1.4 1 1.4.5 0 .9-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm-6.1 3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.3 15.2c.5 0 1-.4 1-.9V14h-1c-.5.1-.8.3-.8.6 0 .4.3.6.8.6Zm-.4.9c-1 0-1.5-.6-1.5-1.4 0-.8.6-1.3 1.7-1.4h1.1v-.4c0-.4-.2-.6-.7-.6-.5 0-.8.1-.9.4h-1c0-.8.8-1.4 2-1.4 1.1 0 1.8.6 1.8 1.6V16h-1.1v-.6h-.1c-.2.4-.7.7-1.3.7Zm4.6 0c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Zm-3.2 10c-.6 0-1.2-.3-1.4-.8v.7H8.5v-6.3H10v2.5c.3-.5.8-.9 1.4-.9 1.2 0 1.9 1 1.9 2.4 0 1.5-.7 2.4-1.9 2.4Zm-.4-3.7c-.7 0-1 .5-1 1.3s.3 1.4 1 1.4c.6 0 1-.6 1-1.4 0-.8-.4-1.3-1-1.3Zm4 3.7c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Zm-2.2 7h-1.2c0-.5-.4-.8-.9-.8-.6 0-1 .5-1 1.4 0 1 .4 1.4 1 1.4.5 0 .8-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7Zm1.8 3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Z"/></g></svg>',"list-num-lower-greek-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 16c-1.2 0-2-.8-2-2.3 0-1.5.8-2.4 2-2.4.6 0 1 .4 1.3 1v-.9H40v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1-.7h-.2c-.2.4-.7.8-1.3.8Zm.3-1c.6 0 1-.5 1-1.3s-.4-1.3-1-1.3-1 .5-1 1.3.4 1.4 1 1.4ZM33.3 16.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7ZM36 21.9c0-1.5.8-2.3 2.1-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.9 1.3.9.3 1.3.8 1.3 1.7 0 1.2-.7 1.9-1.8 1.9-.6 0-1.1-.3-1.4-.8v2.2H36V22Zm1.8 1.2v-1h.3c.5 0 .9-.2.9-.7 0-.5-.3-.8-.9-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1 1.3s1-.4 1-1-.4-1-1.2-1h-.3ZM33.3 26.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7ZM37.1 34.6 34.8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.2.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2Zm.7 1a2 2 0 0 0-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1ZM33.3 36.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Z"/></g></svg>',"list-num-lower-greek":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.5 15c.7 0 1-.5 1-1.3s-.3-1.3-1-1.3c-.5 0-.9.5-.9 1.3s.4 1.4 1 1.4Zm-.3 1c-1.1 0-1.8-.8-1.8-2.3 0-1.5.7-2.4 1.8-2.4.7 0 1.1.4 1.3 1h.1v-.9h1.2v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1.1-.7h-.1c-.2.4-.7.8-1.4.8Zm5 .1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7Zm-4.9 7v-1h.3c.6 0 1-.2 1-.7 0-.5-.4-.8-1-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1.1 1.3.6 0 1-.4 1-1s-.5-1-1.3-1h-.3ZM8.6 22c0-1.5.7-2.3 2-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.8 1.3.8.3 1.3.8 1.3 1.7 0 1.2-.8 1.9-1.9 1.9-.6 0-1.1-.3-1.3-.8v2.2H8.5V22Zm6.2 4.2c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7Zm-4.5 8.5L8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.1.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2Zm.7 1a2 2 0 0 0-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1Zm4.5.5c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Z"/></g></svg>',"list-num-lower-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M32.9 16v-1.2h-1.3V16H33Zm0 10v-1.2h-1.3V26H33Zm0 10v-1.2h-1.3V36H33Z"/><path fill-rule="nonzero" d="M36 21h-1.5v5H36zM36 31h-1.5v5H36zM39 21h-1.5v5H39zM39 31h-1.5v5H39zM42 31h-1.5v5H42zM36 11h-1.5v5H36zM36 19h-1.5v1H36zM36 29h-1.5v1H36zM39 19h-1.5v1H39zM39 29h-1.5v1H39zM42 29h-1.5v1H42zM36 9h-1.5v1H36z"/></g></svg>',"list-num-lower-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 16v-1.2h1.3V16H15Zm0 10v-1.2h1.3V26H15Zm0 10v-1.2h1.3V36H15Z"/><path fill-rule="nonzero" d="M12 21h1.5v5H12zM12 31h1.5v5H12zM9 21h1.5v5H9zM9 31h1.5v5H9zM6 31h1.5v5H6zM12 11h1.5v5H12zM12 19h1.5v1H12zM12 29h1.5v1H12zM9 19h1.5v1H9zM9 29h1.5v1H9zM6 29h1.5v1H6zM12 9h1.5v1H12z"/></g></svg>',"list-num-upper-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="m39.3 17-.5-1.4h-2l-.5 1.4H35l2-6h1.6l2 6h-1.3Zm-1.6-4.7-.7 2.3h1.6l-.8-2.3ZM33.4 17c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7Zm4.7 9.9h-2.7v-6H38c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7Zm-1.4-5v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1Zm0 4h1.1c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9h-1.1V26ZM33 27.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Zm4.9 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2Zm-4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Z"/></g></svg>',"list-num-upper-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="m12.6 17-.5-1.4h-2L9.5 17H8.3l2-6H12l2 6h-1.3ZM11 12.3l-.7 2.3h1.6l-.8-2.3Zm4.7 4.8c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7ZM11.4 27H8.7v-6h2.6c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7ZM10 22v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1Zm0 4H11c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9H10V26Zm5.4 1.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Zm-4.1 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2Zm4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Z"/></g></svg>',"list-num-upper-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M31.6 17v-1.2H33V17h-1.3Zm0 10v-1.2H33V27h-1.3Zm0 10v-1.2H33V37h-1.3Z"/><path fill-rule="nonzero" d="M34.5 20H36v7h-1.5zM34.5 30H36v7h-1.5zM37.5 20H39v7h-1.5zM37.5 30H39v7h-1.5zM40.5 30H42v7h-1.5zM34.5 10H36v7h-1.5z"/></g></svg>',"list-num-upper-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 17v-1.2h1.3V17H15Zm0 10v-1.2h1.3V27H15Zm0 10v-1.2h1.3V37H15Z"/><path fill-rule="nonzero" d="M12 20h1.5v7H12zM12 30h1.5v7H12zM9 20h1.5v7H9zM9 30h1.5v7H9zM6 30h1.5v7H6zM12 10h1.5v7H12z"/></g></svg>',lock:'<svg width="24" height="24"><path d="M16.3 11c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H8V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h.3ZM10 8v3h4V8a1 1 0 0 0-.3-.7A1 1 0 0 0 13 7h-2a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7Z" fill-rule="evenodd"/></svg>',ltr:'<svg width="24" height="24"><path d="M11 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 7.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L11 5ZM4.4 16.2 6.2 15l-1.8-1.2a1 1 0 0 1 1.2-1.6l3 2a1 1 0 0 1 0 1.6l-3 2a1 1 0 1 1-1.2-1.6Z" fill-rule="evenodd"/></svg>',minus:'<svg width="24" height="24"><path d="M19 11a1 1 0 0 1 .1 2H5a1 1 0 0 1-.1-2H19Z"/></svg>',"more-drawer":'<svg width="24" height="24"><path d="M6 10a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Zm12 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Zm-6 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Z" fill-rule="nonzero"/></svg>',"new-document":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h10a2 2 0 0 0 2-2V7.6L14.4 3ZM17 19H7V5h6v4h4v10Z" fill-rule="nonzero"/></svg>',"new-tab":'<svg width="24" height="24"><path d="m15 13 2-2v8H5V7h8l-2 2H7v8h8v-4Zm4-8v5.5l-2-2-5.6 5.5H10v-1.4L15.5 7l-2-2H19Z" fill-rule="evenodd"/></svg>',"non-breaking":'<svg width="24" height="24"><path d="M11 11H8a1 1 0 1 1 0-2h3V6c0-.6.4-1 1-1s1 .4 1 1v3h3c.6 0 1 .4 1 1s-.4 1-1 1h-3v3c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-3Zm10 4v5H3v-5c0-.6.4-1 1-1s1 .4 1 1v3h14v-3c0-.6.4-1 1-1s1 .4 1 1Z" fill-rule="evenodd"/></svg>',notice:'<svg width="24" height="24"><path d="M15.5 4 20 8.5v7L15.5 20h-7L4 15.5v-7L8.5 4h7ZM13 17v-2h-2v2h2Zm0-4V7h-2v6h2Z" fill-rule="evenodd" clip-rule="evenodd"/></svg>',"ordered-list-rtl":'<svg width="24" height="24"><path d="M6 17h8a1 1 0 0 1 0 2H6a1 1 0 0 1 0-2Zm0-6h8a1 1 0 0 1 0 2H6a1 1 0 0 1 0-2Zm0-6h8a1 1 0 0 1 0 2H6a1 1 0 1 1 0-2Zm13-1v3.5a.5.5 0 1 1-1 0V5h-.5a.5.5 0 1 1 0-1H19Zm-1 8.8.2.2h1.3a.5.5 0 1 1 0 1h-1.6a1 1 0 0 1-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 0 0-.2-.2h-1.3a.5.5 0 0 1-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3Zm2 4.2v2c0 .6-.4 1-1 1h-1.5a.5.5 0 0 1 0-1h1.2a.3.3 0 1 0 0-.6h-1.3a.4.4 0 1 1 0-.8h1.3a.3.3 0 0 0 0-.6h-1.2a.5.5 0 1 1 0-1H19c.6 0 1 .4 1 1Z" fill-rule="evenodd"/></svg>',"ordered-list":'<svg width="24" height="24"><path d="M10 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 1 1 0-2ZM6 4v3.5c0 .3-.2.5-.5.5a.5.5 0 0 1-.5-.5V5h-.5a.5.5 0 0 1 0-1H6Zm-1 8.8.2.2h1.3c.3 0 .5.2.5.5s-.2.5-.5.5H4.9a1 1 0 0 1-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 0 0-.2-.2H4.5a.5.5 0 0 1-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3ZM7 17v2c0 .6-.4 1-1 1H4.5a.5.5 0 0 1 0-1h1.2c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.4a.4.4 0 1 1 0-.8h1.3c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.5a.5.5 0 1 1 0-1H6c.6 0 1 .4 1 1Z" fill-rule="evenodd"/></svg>',orientation:'<svg width="24" height="24"><path d="M7.3 6.4 1 13l6.4 6.5 6.5-6.5-6.5-6.5ZM3.7 13l3.6-3.7L11 13l-3.7 3.7-3.6-3.7ZM12 6l2.8 2.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0L9.2 5.7a.8.8 0 0 1 0-1.2L13.6.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L12 4h1a9 9 0 1 1-4.3 16.9l1.5-1.5A7 7 0 1 0 13 6h-1Z" fill-rule="nonzero"/></svg>',outdent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 1 1 0-2Zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2Zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2Zm-5 4h12a1 1 0 0 1 0 2H7a1 1 0 0 1 0-2Zm1.6-3.8a1 1 0 0 1-1.2 1.6l-3-2a1 1 0 0 1 0-1.6l3-2a1 1 0 0 1 1.2 1.6L6.8 12l1.8 1.2Z" fill-rule="evenodd"/></svg>',"page-break":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M5 11c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2Zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2Zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2Zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1h-1a1 1 0 0 1 0-2Zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2ZM7 3v5h10V3c0-.6.4-1 1-1s1 .4 1 1v7H5V3c0-.6.4-1 1-1s1 .4 1 1ZM6 22a1 1 0 0 1-1-1v-7h14v7c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-5H7v5c0 .6-.4 1-1 1Z"/></g></svg>',paragraph:'<svg width="24" height="24"><path fill-rule="evenodd" d="M10 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 6.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L10 5Z"/></svg>',"paste-column-after":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 0 1 2.8 2H18c1 0 2 .8 2 1.9V7h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h7v2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0 1 12 1Zm8 7v12h-6V8h6Zm-1.5 1.5h-3v9h3v-9ZM12 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/></svg>',"paste-column-before":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 0 1 2.8 2H18c1 0 2 .8 2 1.9V18c0 1-.8 2-1.9 2H11v-2h7V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v2H4V5c0-1 .8-2 1.9-2H9.2A3 3 0 0 1 12 1Zm-2 7v12H4V8h6ZM8.5 9.5h-3v9h3v-9ZM12 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/></svg>',"paste-row-after":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 0 1 2.8 2H18c1 0 2 .8 2 1.9V11h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h14c0 1-.8 2-1.9 2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0 1 12 1Zm10 11v5H8v-5h14Zm-1.5 1.5h-11v2h11v-2ZM12 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/></svg>',"paste-row-before":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 0 1 2.8 2H18c1 0 2 .8 2 1.9V7h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h12v-4h2v4c0 1-.8 2-1.9 2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0 1 12 1Zm10 7v5H8V8h14Zm-1.5 1.5h-11v2h11v-2ZM12 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/></svg>',"paste-text":'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h3V9h9ZM9 20H6a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0 1 12 1a3 3 0 0 1 2.8 2H18a2 2 0 0 1 2 2v4h1v12H9v-1Zm1.5-9.5v9h9v-9h-9ZM12 3a1 1 0 0 0-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1Zm0 9h6v2h-.5l-.5-1h-1v4h.8v1h-3.6v-1h.8v-4h-1l-.5 1H12v-2Z" fill-rule="nonzero"/></svg>',paste:'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h3V9h9ZM9 20H6a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0 1 12 1a3 3 0 0 1 2.8 2H18a2 2 0 0 1 2 2v4h1v12H9v-1Zm1.5-9.5v9h9v-9h-9ZM12 3a1 1 0 0 0-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1Z" fill-rule="nonzero"/></svg>',"permanent-pen":'<svg width="24" height="24"><path d="M10.5 17.5 8 20H3v-3l3.5-3.5a2 2 0 0 1 0-3L14 3l1 1-7.3 7.3a1 1 0 0 0 0 1.4l3.6 3.6c.4.4 1 .4 1.4 0L20 9l1 1-7.6 7.6a2 2 0 0 1-2.8 0l-.1-.1Z" fill-rule="nonzero"/></svg>',plus:'<svg width="24" height="24"><path d="M12 4c.5 0 1 .4 1 .9V11h6a1 1 0 0 1 .1 2H13v6a1 1 0 0 1-2 .1V13H5a1 1 0 0 1-.1-2H11V5c0-.6.4-1 1-1Z"/></svg>',preferences:'<svg width="24" height="24"><path d="m20.1 13.5-1.9.2a5.8 5.8 0 0 1-.6 1.5l1.2 1.5c.4.4.3 1 0 1.4l-.7.7a1 1 0 0 1-1.4 0l-1.5-1.2a6.2 6.2 0 0 1-1.5.6l-.2 1.9c0 .5-.5.9-1 .9h-1a1 1 0 0 1-1-.9l-.2-1.9a5.8 5.8 0 0 1-1.5-.6l-1.5 1.2a1 1 0 0 1-1.4 0l-.7-.7a1 1 0 0 1 0-1.4l1.2-1.5a6.2 6.2 0 0 1-.6-1.5l-1.9-.2a1 1 0 0 1-.9-1v-1c0-.5.4-1 .9-1l1.9-.2a5.8 5.8 0 0 1 .6-1.5L5.2 7.3a1 1 0 0 1 0-1.4l.7-.7a1 1 0 0 1 1.4 0l1.5 1.2a6.2 6.2 0 0 1 1.5-.6l.2-1.9c0-.5.5-.9 1-.9h1c.5 0 1 .4 1 .9l.2 1.9a5.8 5.8 0 0 1 1.5.6l1.5-1.2a1 1 0 0 1 1.4 0l.7.7c.3.4.4 1 0 1.4l-1.2 1.5a6.2 6.2 0 0 1 .6 1.5l1.9.2c.5 0 .9.5.9 1v1c0 .5-.4 1-.9 1ZM12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z" fill-rule="evenodd"/></svg>',preview:'<svg width="24" height="24"><path d="M3.5 12.5c.5.8 1.1 1.6 1.8 2.3 2 2 4.2 3.2 6.7 3.2s4.7-1.2 6.7-3.2a16.2 16.2 0 0 0 2.1-2.8 15.7 15.7 0 0 0-2.1-2.8c-2-2-4.2-3.2-6.7-3.2a9.3 9.3 0 0 0-6.7 3.2A16.2 16.2 0 0 0 3.2 12c0 .2.2.3.3.5Zm-2.4-1 .7-1.2L4 7.8C6.2 5.4 8.9 4 12 4c3 0 5.8 1.4 8.1 3.8a18.2 18.2 0 0 1 2.8 3.7v1l-.7 1.2-2.1 2.5c-2.3 2.4-5 3.8-8.1 3.8-3 0-5.8-1.4-8.1-3.8a18.2 18.2 0 0 1-2.8-3.7 1 1 0 0 1 0-1Zm12-3.3a2 2 0 1 0 2.7 2.6 4 4 0 1 1-2.6-2.6Z" fill-rule="nonzero"/></svg>',print:'<svg width="24" height="24"><path d="M18 8H6a3 3 0 0 0-3 3v6h2v3h14v-3h2v-6a3 3 0 0 0-3-3Zm-1 10H7v-4h10v4Zm.5-5c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5Zm.5-8H6v2h12V5Z" fill-rule="nonzero"/></svg>',quote:'<svg width="24" height="24"><path d="M7.5 17h.9c.4 0 .7-.2.9-.6L11 13V8c0-.6-.4-1-1-1H6a1 1 0 0 0-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 0 0 .8 1.3Zm8 0h.9c.4 0 .7-.2.9-.6L19 13V8c0-.6-.4-1-1-1h-4a1 1 0 0 0-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 0 0 .8 1.3Z" fill-rule="nonzero"/></svg>',redo:'<svg width="24" height="24"><path d="M17.6 10H12c-2.8 0-4.4 1.4-4.9 3.5-.4 2 .3 4 1.4 4.6a1 1 0 1 1-1 1.8c-2-1.2-2.9-4.1-2.3-6.8.6-3 3-5.1 6.8-5.1h5.6l-3.3-3.3a1 1 0 1 1 1.4-1.4l5 5a1 1 0 0 1 0 1.4l-5 5a1 1 0 0 1-1.4-1.4l3.3-3.3Z" fill-rule="nonzero"/></svg>',reload:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="m5 22.1-1.2-4.7v-.2a1 1 0 0 1 1-1l5 .4a1 1 0 1 1-.2 2l-2.2-.2a7.8 7.8 0 0 0 8.4.2 7.5 7.5 0 0 0 3.5-6.4 1 1 0 1 1 2 0 9.5 9.5 0 0 1-4.5 8 9.9 9.9 0 0 1-10.2 0l.4 1.4a1 1 0 1 1-2 .5ZM13.6 7.4c0-.5.5-1 1-.9l2.8.2a8 8 0 0 0-9.5-1 7.5 7.5 0 0 0-3.6 7 1 1 0 0 1-2 0 9.5 9.5 0 0 1 4.5-8.6 10 10 0 0 1 10.9.3l-.3-1a1 1 0 0 1 2-.5l1.1 4.8a1 1 0 0 1-1 1.2l-5-.4a1 1 0 0 1-.9-1Z"/></g></svg>',"remove-formatting":'<svg width="24" height="24"><path d="M13.2 6a1 1 0 0 1 0 .2l-2.6 10a1 1 0 0 1-1 .8h-.2a.8.8 0 0 1-.8-1l2.6-10H8a1 1 0 1 1 0-2h9a1 1 0 0 1 0 2h-3.8ZM5 18h7a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2Zm13 1.5L16.5 18 15 19.5a.7.7 0 0 1-1-1l1.5-1.5-1.5-1.5a.7.7 0 0 1 1-1l1.5 1.5 1.5-1.5a.7.7 0 0 1 1 1L17.5 17l1.5 1.5a.7.7 0 0 1-1 1Z" fill-rule="evenodd"/></svg>',remove:'<svg width="24" height="24"><path d="M16 7h3a1 1 0 0 1 0 2h-1v9a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V9H5a1 1 0 1 1 0-2h3V6a3 3 0 0 1 3-3h2a3 3 0 0 1 3 3v1Zm-2 0V6c0-.6-.4-1-1-1h-2a1 1 0 0 0-1 1v1h4Zm2 2H8v9c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V9Zm-7 3a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0v-4Zm4 0a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0v-4Z" fill-rule="nonzero"/></svg>',"resize-handle":'<svg width="10" height="10"><g fill-rule="nonzero"><path d="M8.1 1.1A.5.5 0 1 1 9 2l-7 7A.5.5 0 1 1 1 8l7-7ZM8.1 5.1A.5.5 0 1 1 9 6l-3 3A.5.5 0 1 1 5 8l3-3Z"/></g></svg>',resize:'<svg width="24" height="24"><path d="M4 5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h6c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3H7.4L18 16.6V13c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v6c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-6a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3.6L6 7.4V11c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3A1 1 0 0 1 4 11V5Z" fill-rule="evenodd"/></svg>',"restore-draft":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M17 13c0 .6-.4 1-1 1h-4V8c0-.6.4-1 1-1s1 .4 1 1v4h2c.6 0 1 .4 1 1Z"/><path d="M4.7 10H9a1 1 0 0 1 0 2H3a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v3l2.5-2.4a9.2 9.2 0 0 1 10.8-1.5A9 9 0 0 1 13.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 1 1 1.3-1.5 7.2 7.2 0 0 0 11.6-3.7 7 7 0 0 0-3.5-7.7A7.2 7.2 0 0 0 8 7L4.7 10Z" fill-rule="nonzero"/></g></svg>',"rotate-left":'<svg width="24" height="24"><path d="M4.7 10H9a1 1 0 0 1 0 2H3a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v3l2.5-2.4a9.2 9.2 0 0 1 10.8-1.5A9 9 0 0 1 13.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 1 1 1.3-1.5 7.2 7.2 0 0 0 11.6-3.7 7 7 0 0 0-3.5-7.7A7.2 7.2 0 0 0 8 7L4.7 10Z" fill-rule="nonzero"/></svg>',"rotate-right":'<svg width="24" height="24"><path d="M20 8V5a1 1 0 0 1 2 0v6c0 .6-.4 1-1 1h-6a1 1 0 0 1 0-2h4.3L16 7A7.2 7.2 0 0 0 7.7 6a7 7 0 0 0 3 13.1c1.9.1 3.7-.5 5-1.7a1 1 0 0 1 1.4 1.5A9.2 9.2 0 0 1 2.2 14c-.9-3.9 1-8 4.5-9.9 3.5-1.9 8-1.3 10.8 1.5L20 8Z" fill-rule="nonzero"/></svg>',rtl:'<svg width="24" height="24"><path d="M8 5h8v2h-2v12h-2V7h-2v12H8v-7c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 4.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L8 5Zm12 11.2a1 1 0 1 1-1 1.6l-3-2a1 1 0 0 1 0-1.6l3-2a1 1 0 1 1 1 1.6L18.4 15l1.8 1.2Z" fill-rule="evenodd"/></svg>',save:'<svg width="24" height="24"><path d="M5 16h14a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2Zm0 2v2h14v-2H5Zm10 0h2v2h-2v-2Zm-4-6.4L8.7 9.3a1 1 0 1 0-1.4 1.4l4 4c.4.4 1 .4 1.4 0l4-4a1 1 0 1 0-1.4-1.4L13 11.6V4a1 1 0 0 0-2 0v7.6Z" fill-rule="nonzero"/></svg>',search:'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3Zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12Z" fill-rule="nonzero"/></svg>',"select-all":'<svg width="24" height="24"><path d="M3 5h2V3a2 2 0 0 0-2 2Zm0 8h2v-2H3v2Zm4 8h2v-2H7v2ZM3 9h2V7H3v2Zm10-6h-2v2h2V3Zm6 0v2h2a2 2 0 0 0-2-2ZM5 21v-2H3c0 1.1.9 2 2 2Zm-2-4h2v-2H3v2ZM9 3H7v2h2V3Zm2 18h2v-2h-2v2Zm8-8h2v-2h-2v2Zm0 8a2 2 0 0 0 2-2h-2v2Zm0-12h2V7h-2v2Zm0 8h2v-2h-2v2Zm-4 4h2v-2h-2v2Zm0-16h2V3h-2v2ZM7 17h10V7H7v10Zm2-8h6v6H9V9Z" fill-rule="nonzero"/></svg>',selected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2Zm3.6 10.9L7 12.3a.7.7 0 0 0-1 1L9.6 17 18 8.6a.7.7 0 0 0 0-1 .7.7 0 0 0-1 0l-7.4 7.3Z"/></svg>',settings:'<svg width="24" height="24"><path d="M11 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6V8H5a1 1 0 1 1 0-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.5V6ZM8 8h2V6H8v2Zm9 2.8v.2h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v.3c0 .2 0 .3-.2.5l-.6.2h-2.4c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6V13H5a1 1 0 0 1 0-2h8v-.3c0-.2 0-.3.2-.5l.6-.2h2.4c.3 0 .4 0 .6.2l.2.6ZM14 13h2v-2h-2v2Zm-3 2.8v.2h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6V18H5a1 1 0 0 1 0-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.6ZM8 18h2v-2H8v2Z" fill-rule="evenodd"/></svg>',sharpen:'<svg width="24" height="24"><path d="m16 6 4 4-8 9-8-9 4-4h8Zm-4 10.2 5.5-6.2-.1-.1H12v-.3h5.1l-.2-.2H12V9h4.6l-.2-.2H12v-.3h4.1l-.2-.2H12V8h3.6l-.2-.2H8.7L6.5 10l.1.1H12v.3H6.9l.2.2H12v.3H7.3l.2.2H12v.3H7.7l.3.2h4v.3H8.2l.2.2H12v.3H8.6l.3.2H12v.3H9l.3.2H12v.3H9.5l.2.2H12v.3h-2l.2.2H12v.3h-1.6l.2.2H12v.3h-1.1l.2.2h.9v.3h-.7l.2.2h.5v.3h-.3l.3.2Z" fill-rule="evenodd"/></svg>',sourcecode:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9.8 15.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0l-4.4-4.1a.8.8 0 0 1 0-1.2l4.4-4.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L6 12l3.8 3.7ZM14.2 15.7c-.3.3-.3.8 0 1 .4.4.9.4 1.2 0l4.4-4.1c.3-.3.3-.9 0-1.2l-4.4-4.2a.8.8 0 0 0-1.2 0c-.3.3-.3.8 0 1.1L18 12l-3.8 3.7Z"/></g></svg>',"spell-check":'<svg width="24" height="24"><path d="M6 8v3H5V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h2c.3 0 .5.1.7.3.2.2.3.4.3.7v6H8V8H6Zm0-3v2h2V5H6Zm13 0h-3v5h3v1h-3a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3v1Zm-5 1.5-.1.7c-.1.2-.3.3-.6.3.3 0 .5.1.6.3l.1.7V10c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-3V4h3c.3 0 .5.1.7.3.2.2.3.4.3.7v1.5ZM13 10V8h-2v2h2Zm0-3V5h-2v2h2Zm3 5 1 1-6.5 7L7 15.5l1.3-1 2.2 2.2L16 12Z" fill-rule="evenodd"/></svg>',"strike-through":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M15.6 8.5c-.5-.7-1-1.1-1.3-1.3-.6-.4-1.3-.6-2-.6-2.7 0-2.8 1.7-2.8 2.1 0 1.6 1.8 2 3.2 2.3 4.4.9 4.6 2.8 4.6 3.9 0 1.4-.7 4.1-5 4.1A6.2 6.2 0 0 1 7 16.4l1.5-1.1c.4.6 1.6 2 3.7 2 1.6 0 2.5-.4 3-1.2.4-.8.3-2-.8-2.6-.7-.4-1.6-.7-2.9-1-1-.2-3.9-.8-3.9-3.6C7.6 6 10.3 5 12.4 5c2.9 0 4.2 1.6 4.7 2.4l-1.5 1.1Z"/><path d="M5 11h14a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2Z" fill-rule="nonzero"/></g></svg>',subscript:'<svg width="24" height="24"><path d="m10.4 10 4.6 4.6-1.4 1.4L9 11.4 4.4 16 3 14.6 7.6 10 3 5.4 4.4 4 9 8.6 13.6 4 15 5.4 10.4 10ZM21 19h-5v-1l1-.8 1.7-1.6c.3-.4.5-.8.5-1.2 0-.3 0-.6-.2-.7-.2-.2-.5-.3-.9-.3a2 2 0 0 0-.8.2l-.7.3-.4-1.1 1-.6 1.2-.2c.8 0 1.4.3 1.8.7.4.4.6.9.6 1.5s-.2 1.1-.5 1.6a8 8 0 0 1-1.3 1.3l-.6.6h2.6V19Z" fill-rule="nonzero"/></svg>',superscript:'<svg width="24" height="24"><path d="M15 9.4 10.4 14l4.6 4.6-1.4 1.4L9 15.4 4.4 20 3 18.6 7.6 14 3 9.4 4.4 8 9 12.6 13.6 8 15 9.4Zm5.9 1.6h-5v-1l1-.8 1.7-1.6c.3-.5.5-.9.5-1.3 0-.3 0-.5-.2-.7-.2-.2-.5-.3-.9-.3l-.8.2-.7.4-.4-1.2c.2-.2.5-.4 1-.5.3-.2.8-.2 1.2-.2.8 0 1.4.2 1.8.6.4.4.6 1 .6 1.6 0 .5-.2 1-.5 1.5l-1.3 1.4-.6.5h2.6V11Z" fill-rule="nonzero"/></svg>',"table-caption":'<svg width="24" height="24"><g fill-rule="nonzero"><rect width="12" height="2" x="3" y="4" rx="1"/><path d="M19 8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-8c0-1.1.9-2 2-2h14ZM5 15v3h6v-3H5Zm14 0h-6v3h6v-3Zm0-5h-6v3h6v-3ZM5 13h6v-3H5v3Z"/></g></svg>',"table-cell-classes":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M13 4v9H3V6c0-1.1.9-2 2-2h8Zm-2 2H5v5h6V6Z"/><path fill-rule="nonzero" d="M13 4h6a2 2 0 0 1 2 2v7h-8v-2h6V6h-6V4Z" opacity=".2"/><path d="m18 20-2.6 1.6.7-3-2.4-2 3.1-.2 1.2-2.9 1.2 2.9 3.1.2-2.4 2 .7 3z"/><path fill-rule="nonzero" d="M3 13v5c0 1.1.9 2 2 2h8v-7h-2v5H5v-5H3Z" opacity=".2"/></g></svg>',"table-cell-properties":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-8 9H5v5h6v-5Zm8 0h-6v5h6v-5Zm-8-7H5v5h6V6Z"/></svg>',"table-cell-select-all":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm0 2H5v12h14V6Z"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2Z" opacity=".2"/></g></svg>',"table-cell-select-inner":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm0 2H5v12h14V6Z" opacity=".2"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2Z"/></g></svg>',"table-classes":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v7h-8v7H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-8 9H5v5h6v-5Zm8-7h-6v5h6V6Zm-8 0H5v5h6V6Z"/><path d="m18 20-2.6 1.6.7-3-2.4-2 3.1-.2 1.2-2.9 1.2 2.9 3.1.2-2.4 2 .7 3z"/></g></svg>',"table-delete-column":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-4 4h-2V6h-2v2H9V6H5v12h4v-2h2v2h2v-2h2v2h4V6h-4v2Zm.3.5 1 1.2-3 2.3 3 2.3-1 1.2L12 13l-3.3 2.6-1-1.2 3-2.3-3-2.3 1-1.2L12 11l3.3-2.5Z"/></svg>',"table-delete-row":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm0 2H5v3h2.5v2H5v2h2.5v2H5v3h14v-3h-2.5v-2H19v-2h-2.5V9H19V6Zm-4.7 1.8 1.2 1L13 12l2.6 3.3-1.2 1-2.3-3-2.3 3-1.2-1L11 12 8.5 8.7l1.2-1 2.3 3 2.3-3Z"/></svg>',"table-delete-table":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM5 6v12h14V6H5Z"/><path d="m14.4 8.6 1.1 1-2.4 2.4 2.4 2.4-1.1 1.1-2.4-2.4-2.4 2.4-1-1.1 2.3-2.4-2.3-2.4 1-1 2.4 2.3z"/></g></svg>',"table-insert-column-after":'<svg width="24" height="24"><path fill-rule="nonzero" d="M20 4c.6 0 1 .4 1 1v2a1 1 0 0 1-2 0V6h-8v12h8v-1a1 1 0 0 1 2 0v2c0 .5-.4 1-.9 1H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h15ZM9 13H5v5h4v-5Zm7-5c.5 0 1 .4 1 .9V11h2a1 1 0 0 1 .1 2H17v2a1 1 0 0 1-2 .1V13h-2a1 1 0 0 1-.1-2H15V9c0-.6.4-1 1-1ZM9 6H5v5h4V6Z"/></svg>',"table-insert-column-before":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a1 1 0 0 1-1-1v-2a1 1 0 0 1 2 0v1h8V6H5v1a1 1 0 1 1-2 0V5c0-.6.4-1 1-1h15Zm0 9h-4v5h4v-5ZM8 8c.5 0 1 .4 1 .9V11h2a1 1 0 0 1 .1 2H9v2a1 1 0 0 1-2 .1V13H5a1 1 0 0 1-.1-2H7V9c0-.6.4-1 1-1Zm11-2h-4v5h4V6Z"/></svg>',"table-insert-row-above":'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4a1 1 0 1 1 0 2H5v6h14V6h-1a1 1 0 0 1 0-2h2c.6 0 1 .4 1 1v13a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5c0-.6.4-1 1-1h2Zm5 10H5v4h6v-4Zm8 0h-6v4h6v-4ZM12 3c.5 0 1 .4 1 .9V6h2a1 1 0 0 1 0 2h-2v2a1 1 0 0 1-2 .1V8H9a1 1 0 0 1 0-2h2V4c0-.6.4-1 1-1Z"/></svg>',"table-insert-row-after":'<svg width="24" height="24"><path fill-rule="nonzero" d="M12 13c.5 0 1 .4 1 .9V16h2a1 1 0 0 1 .1 2H13v2a1 1 0 0 1-2 .1V18H9a1 1 0 0 1-.1-2H11v-2c0-.6.4-1 1-1Zm6 7a1 1 0 0 1 0-2h1v-6H5v6h1a1 1 0 0 1 0 2H4a1 1 0 0 1-1-1V6c0-1.1.9-2 2-2h14a2 2 0 0 1 2 2v13c0 .5-.4 1-.9 1H18ZM11 6H5v4h6V6Zm8 0h-6v4h6V6Z"/></svg>',"table-left-header":'<svg width="24" height="24"><path d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm0 9h-4v5h4v-5Zm-6 0H9v5h4v-5Zm0-7H9v5h4V6Zm6 0h-4v5h4V6Z"/></svg>',"table-merge-cells":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM5 15.5V18h3v-2.5H5Zm14-5h-9V18h9v-7.5ZM19 6h-4v2.5h4V6ZM8 6H5v2.5h3V6Zm5 0h-3v2.5h3V6Zm-8 7.5h3v-3H5v3Z"/></svg>',"table-row-numbering-rtl":'<svg width="24" height="24"><path d="M6 4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H6Zm0 12h8v3H6v-3Zm11 0c.6 0 1 .4 1 1v1a1 1 0 0 1-2 0v-1c0-.6.4-1 1-1ZM6 11h8v3H6v-3Zm11 0c.6 0 1 .4 1 1v1a1 1 0 0 1-2 0v-1c0-.6.4-1 1-1ZM6 6h8v3H6V6Zm11 0c.6 0 1 .4 1 1v1a1 1 0 1 1-2 0V7c0-.6.4-1 1-1Z"/></svg>',"table-row-numbering":'<svg width="24" height="24"><path d="M18 4a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h12Zm0 12h-8v3h8v-3ZM7 16a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-1c0-.6-.4-1-1-1Zm11-5h-8v3h8v-3ZM7 11a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-1c0-.6-.4-1-1-1Zm11-5h-8v3h8V6ZM7 6a1 1 0 0 0-1 1v1a1 1 0 1 0 2 0V7c0-.6-.4-1-1-1Z"/></svg>',"table-row-properties":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM5 15v3h6v-3H5Zm14 0h-6v3h6v-3Zm0-9h-6v3h6V6ZM5 9h6V6H5v3Z"/></svg>',"table-split-cells":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM8 15.5H5V18h3v-2.5Zm11-5h-9V18h9v-7.5Zm-2.5 1 1 1-2 2 2 2-1 1-2-2-2 2-1-1 2-2-2-2 1-1 2 2 2-2Zm-8.5-1H5v3h3v-3ZM19 6h-4v2.5h4V6ZM8 6H5v2.5h3V6Zm5 0h-3v2.5h3V6Z"/></svg>',"table-top-header":'<svg width="24" height="24"><path d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-8 11H5v3h6v-3Zm8 0h-6v3h6v-3Zm0-5h-6v3h6v-3ZM5 13h6v-3H5v3Z"/></svg>',table:'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM5 14v4h6v-4H5Zm14 0h-6v4h6v-4Zm0-6h-6v4h6V8ZM5 12h6V8H5v4Z"/></svg>',"template-add":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M9 12v4H5a2 2 0 0 0-2 2v3h9.3a6 6 0 0 1-.3-2H5v-1h7a6 6 0 0 1 .8-2H11v-5l-.8-.6a3 3 0 1 1 3.6 0l-.8.6v4.7a6 6 0 0 1 2-1.9V12a5 5 0 1 0-6 0Z"/><path d="M18 15c.5 0 1 .4 1 .9V18h2a1 1 0 0 1 .1 2H19v2a1 1 0 0 1-2 .1V20h-2a1 1 0 0 1-.1-2H17v-2c0-.6.4-1 1-1Z"/></svg>',template:'<svg width="24" height="24"><path d="M19 19v-1H5v1h14ZM9 16v-4a5 5 0 1 1 6 0v4h4a2 2 0 0 1 2 2v3H3v-3c0-1.1.9-2 2-2h4Zm4 0v-5l.8-.6a3 3 0 1 0-3.6 0l.8.6v5h2Z" fill-rule="nonzero"/></svg>',"temporary-placeholder":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M9 7.6V6h2.5V4.5a.5.5 0 1 1 1 0V6H15v1.6a8 8 0 1 1-6 0Zm-2.6 5.3a.5.5 0 0 0 .3.6c.3 0 .6 0 .6-.3l.1-.2a5 5 0 0 1 3.3-2.8c.3-.1.4-.4.4-.6-.1-.3-.4-.5-.6-.4a6 6 0 0 0-4.1 3.7Z"/><circle cx="14" cy="4" r="1"/><circle cx="12" cy="2" r="1"/><circle cx="10" cy="4" r="1"/></g></svg>',"text-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-text-color__color" d="M3 18h18v3H3z"/><path d="M8.7 16h-.8a.5.5 0 0 1-.5-.6l2.7-9c.1-.3.3-.4.5-.4h2.8c.2 0 .4.1.5.4l2.7 9a.5.5 0 0 1-.5.6h-.8a.5.5 0 0 1-.4-.4l-.7-2.2c0-.3-.3-.4-.5-.4h-3.4c-.2 0-.4.1-.5.4l-.7 2.2c0 .3-.2.4-.4.4Zm2.6-7.6-.6 2a.5.5 0 0 0 .5.6h1.6a.5.5 0 0 0 .5-.6l-.6-2c0-.3-.3-.4-.5-.4h-.4c-.2 0-.4.1-.5.4Z"/></g></svg>',"text-size-decrease":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M14 5a1 1 0 1 1 0 2h-4v11a1 1 0 1 1-2 0V7H4a1 1 0 0 1 0-2h10ZM14 12a1 1 0 1 0 0 2h6a1 1 0 1 0 0-2h-6Z"/></svg>',"text-size-increase":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M14 5a1 1 0 1 1 0 2h-4v11a1 1 0 1 1-2 0V7H4a1 1 0 0 1 0-2h10ZM17 9a1 1 0 0 0-1 1v2h-2a1 1 0 1 0 0 2h2v2a1 1 0 1 0 2 0v-2h2a1 1 0 1 0 0-2h-2v-2c0-.6-.4-1-1-1Z"/></svg>',toc:'<svg width="24" height="24"><path d="M5 5c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 1 1 0-2Zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 1 1 0-2Zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2Zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2Zm0-4c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 1 1 0-2Zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2Zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',translate:'<svg width="24" height="24"><path d="m12.7 14.3-.3.7-.4.7-2.2-2.2-3.1 3c-.3.4-.8.4-1 0a.7.7 0 0 1 0-1l3.1-3A12.4 12.4 0 0 1 6.7 9H8a10.1 10.1 0 0 0 1.7 2.4c.5-.5 1-1.1 1.4-1.8l.9-2H4.7a.7.7 0 1 1 0-1.5h4.4v-.7c0-.4.3-.8.7-.8.4 0 .7.4.7.8v.7H15c.4 0 .8.3.8.7 0 .4-.4.8-.8.8h-1.4a12.3 12.3 0 0 1-1 2.4 13.5 13.5 0 0 1-1.7 2.3l1.9 1.8Zm4.3-3 2.7 7.3a.5.5 0 0 1-.4.7 1 1 0 0 1-1-.7l-.6-1.5h-3.4l-.6 1.5a1 1 0 0 1-1 .7.5.5 0 0 1-.4-.7l2.7-7.4a1 1 0 0 1 2 0Zm-2.2 4.4h2.4L16 12.5l-1.2 3.2Z" fill-rule="evenodd"/></svg>',typography:'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M17 5a1 1 0 1 1 0 2h-4v11a1 1 0 1 1-2 0V7H7a1 1 0 0 1 0-2h10Z"/><path d="m17.5 14 .8-1.7 1.7-.8-1.7-.8-.8-1.7-.8 1.7-1.7.8 1.7.8.8 1.7ZM7 14l1 2 2 1-2 1-1 2-1-2-2-1 2-1 1-2Z"/></svg>',underline:'<svg width="24" height="24"><path d="M16 5c.6 0 1 .4 1 1v5.5a4 4 0 0 1-.4 1.8l-1 1.4a5.3 5.3 0 0 1-5.5 1 5 5 0 0 1-1.6-1c-.5-.4-.8-.9-1.1-1.4a4 4 0 0 1-.4-1.8V6c0-.6.4-1 1-1s1 .4 1 1v5.5c0 .3 0 .6.2 1l.6.7a3.3 3.3 0 0 0 2.2.8 3.4 3.4 0 0 0 2.2-.8c.3-.2.4-.5.6-.8l.2-.9V6c0-.6.4-1 1-1ZM8 17h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',undo:'<svg width="24" height="24"><path d="M6.4 8H12c3.7 0 6.2 2 6.8 5.1.6 2.7-.4 5.6-2.3 6.8a1 1 0 0 1-1-1.8c1.1-.6 1.8-2.7 1.4-4.6-.5-2.1-2.1-3.5-4.9-3.5H6.4l3.3 3.3a1 1 0 1 1-1.4 1.4l-5-5a1 1 0 0 1 0-1.4l5-5a1 1 0 0 1 1.4 1.4L6.4 8Z" fill-rule="nonzero"/></svg>',unlink:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 0 1 1.4 1.4l-2 2a2 2 0 1 0 2.6 2.8l4.8-4.8a1 1 0 0 0 0-1.4 1 1 0 1 1 1.4-1.3 2.9 2.9 0 0 1 0 4L9.6 20a3.9 3.9 0 0 1-5.5-5.5l2-2Zm11.6-.6a1 1 0 0 1-1.4-1.4l2.1-2a2 2 0 1 0-2.7-2.8L11 10.3a1 1 0 0 0 0 1.4A1 1 0 1 1 9.6 13a2.9 2.9 0 0 1 0-4L14.4 4a3.9 3.9 0 0 1 5.5 5.5l-2 2ZM7.6 6.3a.8.8 0 0 1-1 1.1L3.3 4.2a.7.7 0 1 1 1-1l3.2 3.1ZM5.1 8.6a.8.8 0 0 1 0 1.5H3a.8.8 0 0 1 0-1.5H5Zm5-3.5a.8.8 0 0 1-1.5 0V3a.8.8 0 0 1 1.5 0V5Zm6 11.8a.8.8 0 0 1 1-1l3.2 3.2a.8.8 0 0 1-1 1L16 17Zm-2.2 2a.8.8 0 0 1 1.5 0V21a.8.8 0 0 1-1.5 0V19Zm5-3.5a.7.7 0 1 1 0-1.5H21a.8.8 0 0 1 0 1.5H19Z" fill-rule="nonzero"/></svg>',unlock:'<svg width="24" height="24"><path d="M16 5c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h-2V8a1 1 0 0 0-.3-.7A1 1 0 0 0 16 7h-2a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7v3h.3c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H4.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H11V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2Z" fill-rule="evenodd"/></svg>',"unordered-list":'<svg width="24" height="24"><path d="M11 5h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2ZM4.5 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1Zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1Zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1Z" fill-rule="evenodd"/></svg>',unselected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2Zm0 1a1 1 0 0 0-1 1v12c0 .6.4 1 1 1h12c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H6Z"/></svg>',upload:'<svg width="24" height="24"><path d="M18 19v-2a1 1 0 0 1 2 0v3c0 .6-.4 1-1 1H5a1 1 0 0 1-1-1v-3a1 1 0 0 1 2 0v2h12ZM11 6.4 8.7 8.7a1 1 0 0 1-1.4-1.4l4-4a1 1 0 0 1 1.4 0l4 4a1 1 0 1 1-1.4 1.4L13 6.4V16a1 1 0 0 1-2 0V6.4Z" fill-rule="nonzero"/></svg>',user:'<svg width="24" height="24"><path d="M12 24a12 12 0 1 1 0-24 12 12 0 0 1 0 24Zm-8.7-5.3a11 11 0 0 0 17.4 0C19.4 16.3 14.6 15 12 15c-2.6 0-7.4 1.3-8.7 3.7ZM12 13c2.2 0 4-2 4-4.5S14.2 4 12 4 8 6 8 8.5 9.8 13 12 13Z" fill-rule="nonzero"/></svg>',"vertical-align":'<svg width="24" height="24"><g fill-rule="nonzero"><rect width="18" height="2" x="3" y="11" rx="1"/><path d="M12 2c.6 0 1 .4 1 1v4l2-1.3a1 1 0 0 1 1.2 1.5l-.1.1-4.1 3-4-3a1 1 0 0 1 1-1.7l2 1.5V3c0-.6.4-1 1-1zm0 11.8 4 2.9a1 1 0 0 1-1 1.7l-2-1.5V21c0 .5-.4 1-.9 1H12a1 1 0 0 1-1-1v-4l-2 1.3a1 1 0 0 1-1.2-.1l-.1-.1a1 1 0 0 1 .1-1.3l.1-.1 4.1-3z"/></g></svg>',visualblocks:'<svg width="24" height="24"><path d="M9 19v2H7v-2h2Zm-4 0v2a2 2 0 0 1-2-2h2Zm8 0v2h-2v-2h2Zm8 0a2 2 0 0 1-2 2v-2h2Zm-4 0v2h-2v-2h2ZM15 7a1 1 0 0 1 0 2v7a1 1 0 0 1-2 0V9h-1v7a1 1 0 0 1-2 0v-4a2.5 2.5 0 0 1-.2-5H15ZM5 15v2H3v-2h2Zm16 0v2h-2v-2h2ZM5 11v2H3v-2h2Zm16 0v2h-2v-2h2ZM5 7v2H3V7h2Zm16 0v2h-2V7h2ZM5 3v2H3c0-1.1.9-2 2-2Zm8 0v2h-2V3h2Zm6 0a2 2 0 0 1 2 2h-2V3ZM9 3v2H7V3h2Zm8 0v2h-2V3h2Z" fill-rule="evenodd"/></svg>',visualchars:'<svg width="24" height="24"><path d="M10 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 6.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L10 5Z" fill-rule="evenodd"/></svg>',warning:'<svg width="24" height="24"><path d="M19.8 18.3c.2.5.3.9 0 1.2-.1.3-.5.5-1 .5H5.2c-.5 0-.9-.2-1-.5-.3-.3-.2-.7 0-1.2L11 4.7l.5-.5.5-.2c.2 0 .3 0 .5.2.2 0 .3.3.5.5l6.8 13.6ZM12 18c.3 0 .5-.1.7-.3.2-.2.3-.4.3-.7a1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3 1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3Zm.7-3 .3-4a1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3 1 1 0 0 0-.3.7l.3 4h1.4Z" fill-rule="evenodd"/></svg>',"zoom-in":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3Zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12Zm-1-9a1 1 0 0 1 2 0v6a1 1 0 0 1-2 0V8Zm-2 4a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2H8Z" fill-rule="nonzero"/></svg>',"zoom-out":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3Zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12Zm-3-5a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2H8Z" fill-rule="nonzero"/></svg>'}})})); ;/*!node_modules/tinymce/icons/default/index.js*/ amis.define("da23461",(function(e,f,i,n){e("7e76fc8")})); ;/*!node_modules/tinymce/themes/silver/theme.js*/ amis.define("28a3fbb",(function(e,t,o,n){!function(){"use strict";const e=Object.getPrototypeOf,t=(e,t,o)=>{var n;return!!o(e,t.prototype)||(null===(n=e.constructor)||void 0===n?void 0:n.name)===t.name},o=e=>o=>(e=>{const o=typeof e;return null===e?"null":"object"===o&&Array.isArray(e)?"array":"object"===o&&t(e,String,((e,t)=>t.isPrototypeOf(e)))?"string":o})(o)===e,n=e=>t=>typeof t===e,r=e=>t=>e===t,s=o("string"),a=o("object"),i=o=>((o,n)=>a(o)&&t(o,n,((t,o)=>e(t)===o)))(o,Object),l=o("array"),c=r(null),d=n("boolean"),u=r(void 0),m=e=>null==e,g=e=>!m(e),p=n("function"),h=n("number"),f=(e,t)=>{if(l(e)){for(let o=0,n=e.length;o<n;++o)if(!t(e[o]))return!1;return!0}return!1},b=()=>{},v=e=>()=>e(),y=(e,t)=>(...o)=>e(t.apply(null,o)),x=e=>()=>e,w=e=>e,S=(e,t)=>e===t;function k(e,...t){return(...o)=>{const n=t.concat(o);return e.apply(null,n)}}const O=e=>t=>!e(t),C=e=>()=>{throw new Error(e)},_=e=>e(),T=x(!1),E=x(!0);class D{constructor(e,t){this.tag=e,this.value=t}static some(e){return new D(!0,e)}static none(){return D.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?D.some(e(this.value)):D.none()}bind(e){return this.tag?e(this.value):D.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:D.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return g(e)?D.some(e):D.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}D.singletonNone=new D(!1);const A=Array.prototype.slice,M=Array.prototype.indexOf,B=Array.prototype.push,F=(e,t)=>M.call(e,t),I=(e,t)=>{const o=F(e,t);return-1===o?D.none():D.some(o)},R=(e,t)=>F(e,t)>-1,N=(e,t)=>{for(let o=0,n=e.length;o<n;o++){if(t(e[o],o))return!0}return!1},V=(e,t)=>{const o=[];for(let n=0;n<e;n++)o.push(t(n));return o},z=(e,t)=>{const o=[];for(let n=0;n<e.length;n+=t){const r=A.call(e,n,n+t);o.push(r)}return o},H=(e,t)=>{const o=e.length,n=new Array(o);for(let r=0;r<o;r++){const o=e[r];n[r]=t(o,r)}return n},L=(e,t)=>{for(let o=0,n=e.length;o<n;o++){t(e[o],o)}},P=(e,t)=>{const o=[],n=[];for(let r=0,s=e.length;r<s;r++){const s=e[r];(t(s,r)?o:n).push(s)}return{pass:o,fail:n}},U=(e,t)=>{const o=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t(r,n)&&o.push(r)}return o},W=(e,t,o)=>(((e,t)=>{for(let o=e.length-1;o>=0;o--)t(e[o],o)})(e,((e,n)=>{o=t(o,e,n)})),o),j=(e,t,o)=>(L(e,((e,n)=>{o=t(o,e,n)})),o),G=(e,t)=>((e,t,o)=>{for(let n=0,r=e.length;n<r;n++){const r=e[n];if(t(r,n))return D.some(r);if(o(r,n))break}return D.none()})(e,t,T),$=(e,t)=>{for(let o=0,n=e.length;o<n;o++){if(t(e[o],o))return D.some(o)}return D.none()},q=e=>{const t=[];for(let o=0,n=e.length;o<n;++o){if(!l(e[o]))throw new Error("Arr.flatten item "+o+" was not an array, input: "+e);B.apply(t,e[o])}return t},X=(e,t)=>q(H(e,t)),K=(e,t)=>{for(let o=0,n=e.length;o<n;++o){if(!0!==t(e[o],o))return!1}return!0},Y=e=>{const t=A.call(e,0);return t.reverse(),t},J=(e,t)=>U(e,(e=>!R(t,e))),Z=(e,t)=>{const o={};for(let n=0,r=e.length;n<r;n++){const r=e[n];o[String(r)]=t(r,n)}return o},Q=e=>[e],ee=(e,t)=>{const o=A.call(e,0);return o.sort(t),o},te=(e,t)=>t>=0&&t<e.length?D.some(e[t]):D.none(),oe=e=>te(e,0),ne=e=>te(e,e.length-1),re=p(Array.from)?Array.from:e=>A.call(e),se=(e,t)=>{for(let o=0;o<e.length;o++){const n=t(e[o],o);if(n.isSome())return n}return D.none()},ae=Object.keys,ie=Object.hasOwnProperty,le=(e,t)=>{const o=ae(e);for(let n=0,r=o.length;n<r;n++){const r=o[n];t(e[r],r)}},ce=(e,t)=>de(e,((e,o)=>({k:o,v:t(e,o)}))),de=(e,t)=>{const o={};return le(e,((e,n)=>{const r=t(e,n);o[r.k]=r.v})),o},ue=e=>(t,o)=>{e[o]=t},me=(e,t,o,n)=>{le(e,((e,r)=>{(t(e,r)?o:n)(e,r)}))},ge=(e,t)=>{const o={};return me(e,t,ue(o),b),o},pe=(e,t)=>{const o=[];return le(e,((e,n)=>{o.push(t(e,n))})),o},he=(e,t)=>{const o=ae(e);for(let n=0,r=o.length;n<r;n++){const r=o[n],s=e[r];if(t(s,r,e))return D.some(s)}return D.none()},fe=e=>pe(e,w),be=(e,t)=>ve(e,t)?D.from(e[t]):D.none(),ve=(e,t)=>ie.call(e,t),ye=(e,t)=>ve(e,t)&&void 0!==e[t]&&null!==e[t],xe=(e,t,o=S)=>e.exists((e=>o(e,t))),we=e=>{const t=[],o=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(o);return t},Se=(e,t,o)=>e.isSome()&&t.isSome()?D.some(o(e.getOrDie(),t.getOrDie())):D.none(),ke=(e,t)=>null!=e?D.some(t(e)):D.none(),Oe=(e,t)=>e?D.some(t):D.none(),Ce=(e,t,o)=>""===t||e.length>=t.length&&e.substr(o,o+t.length)===t,_e=(e,t)=>Ee(e,t)?((e,t)=>e.substring(t))(e,t.length):e,Te=(e,t,o=0,n)=>{const r=e.indexOf(t,o);return-1!==r&&(!!u(n)||r+t.length<=n)},Ee=(e,t)=>Ce(e,t,0),De=(e,t)=>Ce(e,t,e.length-t.length),Ae=(e=>t=>t.replace(e,""))(/^\s+|\s+$/g),Me=e=>e.length>0,Be=e=>void 0!==e.style&&p(e.style.getPropertyValue),Fe=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},Ie={fromHtml:(e,t)=>{const o=(t||document).createElement("div");if(o.innerHTML=e,!o.hasChildNodes()||o.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return Fe(o.childNodes[0])},fromTag:(e,t)=>{const o=(t||document).createElement(e);return Fe(o)},fromText:(e,t)=>{const o=(t||document).createTextNode(e);return Fe(o)},fromDom:Fe,fromPoint:(e,t,o)=>D.from(e.dom.elementFromPoint(t,o)).map(Fe)},Re="undefined"!=typeof window?window:Function("return this;")(),Ne=(e,t)=>((e,t)=>{let o=null!=t?t:Re;for(let t=0;t<e.length&&null!=o;++t)o=o[e[t]];return o})(e.split("."),t),Ve=(e,t)=>{const o=((e,t)=>Ne(e,t))(e,t);if(null==o)throw new Error(e+" not available on this browser");return o},ze=Object.getPrototypeOf,He=e=>{const t=Ne("ownerDocument.defaultView",e);return a(e)&&((e=>Ve("HTMLElement",e))(t).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(ze(e).constructor.name))},Le=e=>e.dom.nodeName.toLowerCase(),Pe=e=>t=>(e=>e.dom.nodeType)(t)===e,Ue=e=>We(e)&&He(e.dom),We=Pe(1),je=Pe(3),Ge=Pe(9),$e=Pe(11),qe=e=>t=>We(t)&&Le(t)===e,Xe=(e,t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},Ke=e=>1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount,Ye=(e,t)=>e.dom===t.dom,Je=(e,t)=>{const o=e.dom,n=t.dom;return o!==n&&o.contains(n)},Ze=e=>Ie.fromDom(e.dom.ownerDocument),Qe=e=>Ge(e)?e:Ze(e),et=e=>Ie.fromDom(Qe(e).dom.documentElement),tt=e=>Ie.fromDom(Qe(e).dom.defaultView),ot=e=>D.from(e.dom.parentNode).map(Ie.fromDom),nt=e=>D.from(e.dom.parentElement).map(Ie.fromDom),rt=e=>D.from(e.dom.offsetParent).map(Ie.fromDom),st=e=>H(e.dom.childNodes,Ie.fromDom),at=(e,t)=>{const o=e.dom.childNodes;return D.from(o[t]).map(Ie.fromDom)},it=e=>at(e,0),lt=(e,t)=>({element:e,offset:t}),ct=(e,t)=>{const o=st(e);return o.length>0&&t<o.length?lt(o[t],0):lt(e,t)},dt=e=>$e(e)&&g(e.dom.host),ut=p(Element.prototype.attachShadow)&&p(Node.prototype.getRootNode),mt=x(ut),gt=ut?e=>Ie.fromDom(e.dom.getRootNode()):Qe,pt=e=>dt(e)?e:Ie.fromDom(Qe(e).dom.body),ht=e=>{const t=gt(e);return dt(t)?D.some(t):D.none()},ft=e=>Ie.fromDom(e.dom.host),bt=e=>g(e.dom.shadowRoot),vt=e=>{const t=je(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const o=t.ownerDocument;return ht(Ie.fromDom(t)).fold((()=>o.body.contains(t)),(n=vt,r=ft,e=>n(r(e))));var n,r},yt=()=>xt(Ie.fromDom(document)),xt=e=>{const t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return Ie.fromDom(t)},wt=(e,t,o)=>{if(!(s(o)||d(o)||h(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")},St=(e,t,o)=>{wt(e.dom,t,o)},kt=(e,t)=>{const o=e.dom;le(t,((e,t)=>{wt(o,t,e)}))},Ot=(e,t)=>{const o=e.dom.getAttribute(t);return null===o?void 0:o},Ct=(e,t)=>D.from(Ot(e,t)),_t=(e,t)=>{const o=e.dom;return!(!o||!o.hasAttribute)&&o.hasAttribute(t)},Tt=(e,t)=>{e.dom.removeAttribute(t)},Et=(e,t,o)=>{if(!s(o))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);Be(e)&&e.style.setProperty(t,o)},Dt=(e,t)=>{Be(e)&&e.style.removeProperty(t)},At=(e,t,o)=>{const n=e.dom;Et(n,t,o)},Mt=(e,t)=>{const o=e.dom;le(t,((e,t)=>{Et(o,t,e)}))},Bt=(e,t)=>{const o=e.dom;le(t,((e,t)=>{e.fold((()=>{Dt(o,t)}),(e=>{Et(o,t,e)}))}))},Ft=(e,t)=>{const o=e.dom,n=window.getComputedStyle(o).getPropertyValue(t);return""!==n||vt(e)?n:It(o,t)},It=(e,t)=>Be(e)?e.style.getPropertyValue(t):"",Rt=(e,t)=>{const o=e.dom,n=It(o,t);return D.from(n).filter((e=>e.length>0))},Nt=e=>{const t={},o=e.dom;if(Be(o))for(let e=0;e<o.style.length;e++){const n=o.style.item(e);t[n]=o.style[n]}return t},Vt=(e,t,o)=>{const n=Ie.fromTag(e);At(n,t,o);return Rt(n,t).isSome()},zt=(e,t)=>{const o=e.dom;Dt(o,t),xe(Ct(e,"style").map(Ae),"")&&Tt(e,"style")},Ht=e=>e.dom.offsetWidth,Lt=(e,t)=>{const o=o=>{const n=t(o);if(n<=0||null===n){const t=Ft(o,e);return parseFloat(t)||0}return n},n=(e,t)=>j(t,((t,o)=>{const n=Ft(e,o),r=void 0===n?0:parseInt(n,10);return isNaN(r)?t:t+r}),0);return{set:(t,o)=>{if(!h(o)&&!o.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+o);const n=t.dom;Be(n)&&(n.style[e]=o+"px")},get:o,getOuter:o,aggregate:n,max:(e,t,o)=>{const r=n(e,o);return t>r?t-r:0}}},Pt=Lt("height",(e=>{const t=e.dom;return vt(e)?t.getBoundingClientRect().height:t.offsetHeight})),Ut=e=>Pt.get(e),Wt=e=>Pt.getOuter(e),jt=(e,t)=>({left:e,top:t,translate:(o,n)=>jt(e+o,t+n)}),Gt=jt,$t=(e,t)=>void 0!==e?e:void 0!==t?t:0,qt=e=>{const t=e.dom.ownerDocument,o=t.body,n=t.defaultView,r=t.documentElement;if(o===e.dom)return Gt(o.offsetLeft,o.offsetTop);const s=$t(null==n?void 0:n.pageYOffset,r.scrollTop),a=$t(null==n?void 0:n.pageXOffset,r.scrollLeft),i=$t(r.clientTop,o.clientTop),l=$t(r.clientLeft,o.clientLeft);return Xt(e).translate(a-l,s-i)},Xt=e=>{const t=e.dom,o=t.ownerDocument.body;return o===t?Gt(o.offsetLeft,o.offsetTop):vt(e)?(e=>{const t=e.getBoundingClientRect();return Gt(t.left,t.top)})(t):Gt(0,0)},Kt=Lt("width",(e=>e.dom.offsetWidth)),Yt=e=>Kt.get(e),Jt=e=>Kt.getOuter(e),Zt=e=>{let t,o=!1;return(...n)=>(o||(o=!0,t=e.apply(null,n)),t)},Qt=()=>eo(0,0),eo=(e,t)=>({major:e,minor:t}),to={nu:eo,detect:(e,t)=>{const o=String(t).toLowerCase();return 0===e.length?Qt():((e,t)=>{const o=((e,t)=>{for(let o=0;o<e.length;o++){const n=e[o];if(n.test(t))return n}})(e,t);if(!o)return{major:0,minor:0};const n=e=>Number(t.replace(o,"$"+e));return eo(n(1),n(2))})(e,o)},unknown:Qt},oo=(e,t)=>{const o=String(t).toLowerCase();return G(e,(e=>e.search(o)))},no=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,ro=e=>t=>Te(t,e),so=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>Te(e,"edge/")&&Te(e,"chrome")&&Te(e,"safari")&&Te(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,no],search:e=>Te(e,"chrome")&&!Te(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>Te(e,"msie")||Te(e,"trident")},{name:"Opera",versionRegexes:[no,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:ro("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:ro("firefox")},{name:"Safari",versionRegexes:[no,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(Te(e,"safari")||Te(e,"mobile/"))&&Te(e,"applewebkit")}],ao=[{name:"Windows",search:ro("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>Te(e,"iphone")||Te(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:ro("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:ro("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:ro("linux"),versionRegexes:[]},{name:"Solaris",search:ro("sunos"),versionRegexes:[]},{name:"FreeBSD",search:ro("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:ro("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],io={browsers:x(so),oses:x(ao)},lo="Edge",co="Chromium",uo="Opera",mo="Firefox",go="Safari",po=e=>{const t=e.current,o=e.version,n=e=>()=>t===e;return{current:t,version:o,isEdge:n(lo),isChromium:n(co),isIE:n("IE"),isOpera:n(uo),isFirefox:n(mo),isSafari:n(go)}},ho={unknown:()=>po({current:void 0,version:to.unknown()}),nu:po,edge:x(lo),chromium:x(co),ie:x("IE"),opera:x(uo),firefox:x(mo),safari:x(go)},fo="Windows",bo="Android",vo="Linux",yo="macOS",xo="Solaris",wo="FreeBSD",So="ChromeOS",ko=e=>{const t=e.current,o=e.version,n=e=>()=>t===e;return{current:t,version:o,isWindows:n(fo),isiOS:n("iOS"),isAndroid:n(bo),isMacOS:n(yo),isLinux:n(vo),isSolaris:n(xo),isFreeBSD:n(wo),isChromeOS:n(So)}},Oo={unknown:()=>ko({current:void 0,version:to.unknown()}),nu:ko,windows:x(fo),ios:x("iOS"),android:x(bo),linux:x(vo),macos:x(yo),solaris:x(xo),freebsd:x(wo),chromeos:x(So)},Co=(e,t,o)=>{const n=io.browsers(),r=io.oses(),s=t.bind((e=>((e,t)=>se(t.brands,(t=>{const o=t.brand.toLowerCase();return G(e,(e=>{var t;return o===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())})).map((e=>({current:e.name,version:to.nu(parseInt(t.version,10),0)})))})))(n,e))).orThunk((()=>((e,t)=>oo(e,t).map((e=>{const o=to.detect(e.versionRegexes,t);return{current:e.name,version:o}})))(n,e))).fold(ho.unknown,ho.nu),a=((e,t)=>oo(e,t).map((e=>{const o=to.detect(e.versionRegexes,t);return{current:e.name,version:o}})))(r,e).fold(Oo.unknown,Oo.nu),i=((e,t,o,n)=>{const r=e.isiOS()&&!0===/ipad/i.test(o),s=e.isiOS()&&!r,a=e.isiOS()||e.isAndroid(),i=a||n("(pointer:coarse)"),l=r||!s&&a&&n("(min-device-width:768px)"),c=s||a&&!l,d=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(o),u=!c&&!l&&!d;return{isiPad:x(r),isiPhone:x(s),isTablet:x(l),isPhone:x(c),isTouch:x(i),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:x(d),isDesktop:x(u)}})(a,s,e,o);return{browser:s,os:a,deviceType:i}},_o=e=>window.matchMedia(e).matches;let To=Zt((()=>Co(navigator.userAgent,D.from(navigator.userAgentData),_o)));const Eo=()=>To(),Do=e=>{const t=Ie.fromDom((e=>{if(mt()&&g(e.target)){const t=Ie.fromDom(e.target);if(We(t)&&bt(t)&&e.composed&&e.composedPath){const t=e.composedPath();if(t)return oe(t)}}return D.from(e.target)})(e).getOr(e.target)),o=()=>e.stopPropagation(),n=()=>e.preventDefault(),r=y(n,o);return((e,t,o,n,r,s,a)=>({target:e,x:t,y:o,stop:n,prevent:r,kill:s,raw:a}))(t,e.clientX,e.clientY,o,n,r,e)},Ao=(e,t,o,n,r)=>{const s=((e,t)=>o=>{e(o)&&t(Do(o))})(o,n);return e.dom.addEventListener(t,s,r),{unbind:k(Mo,e,t,s,r)}},Mo=(e,t,o,n)=>{e.dom.removeEventListener(t,o,n)},Bo=(e,t)=>{ot(e).each((o=>{o.dom.insertBefore(t.dom,e.dom)}))},Fo=(e,t)=>{const o=(e=>D.from(e.dom.nextSibling).map(Ie.fromDom))(e);o.fold((()=>{ot(e).each((e=>{Ro(e,t)}))}),(e=>{Bo(e,t)}))},Io=(e,t)=>{it(e).fold((()=>{Ro(e,t)}),(o=>{e.dom.insertBefore(t.dom,o.dom)}))},Ro=(e,t)=>{e.dom.appendChild(t.dom)},No=(e,t)=>{L(t,(t=>{Ro(e,t)}))},Vo=e=>{e.dom.textContent="",L(st(e),(e=>{zo(e)}))},zo=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Ho=e=>{const t=void 0!==e?e.dom:document,o=t.body.scrollLeft||t.documentElement.scrollLeft,n=t.body.scrollTop||t.documentElement.scrollTop;return Gt(o,n)},Lo=(e,t,o)=>{const n=(void 0!==o?o.dom:document).defaultView;n&&n.scrollTo(e,t)},Po=(e,t,o,n)=>({x:e,y:t,width:o,height:n,right:e+o,bottom:t+n}),Uo=e=>{const t=void 0===e?window:e,o=t.document,n=Ho(Ie.fromDom(o));return(e=>{const t=void 0===e?window:e;return Eo().browser.isFirefox()?D.none():D.from(t.visualViewport)})(t).fold((()=>{const e=t.document.documentElement,o=e.clientWidth,r=e.clientHeight;return Po(n.left,n.top,o,r)}),(e=>Po(Math.max(e.pageLeft,n.left),Math.max(e.pageTop,n.top),e.width,e.height)))},Wo=()=>Ie.fromDom(document),jo=(e,t)=>e.view(t).fold(x([]),(t=>{const o=e.owner(t),n=jo(e,o);return[t].concat(n)}));var Go=Object.freeze({__proto__:null,view:e=>{var t;return(e.dom===document?D.none():D.from(null===(t=e.dom.defaultView)||void 0===t?void 0:t.frameElement)).map(Ie.fromDom)},owner:e=>Ze(e)});const $o=e=>{const t=Wo(),o=Ho(t),n=((e,t)=>{const o=t.owner(e),n=jo(t,o);return D.some(n)})(e,Go);return n.fold(k(qt,e),(t=>{const n=Xt(e),r=W(t,((e,t)=>{const o=Xt(t);return{left:e.left+o.left,top:e.top+o.top}}),{left:0,top:0});return Gt(r.left+n.left+o.left,r.top+n.top+o.top)}))},qo=(e,t,o,n)=>({x:e,y:t,width:o,height:n,right:e+o,bottom:t+n}),Xo=e=>{const t=qt(e),o=Jt(e),n=Wt(e);return qo(t.left,t.top,o,n)},Ko=e=>{const t=$o(e),o=Jt(e),n=Wt(e);return qo(t.left,t.top,o,n)},Yo=(e,t)=>{const o=Math.max(e.x,t.x),n=Math.max(e.y,t.y),r=Math.min(e.right,t.right),s=Math.min(e.bottom,t.bottom);return qo(o,n,r-o,s-n)},Jo=()=>Uo(window);var Zo=tinymce.util.Tools.resolve("tinymce.ThemeManager");const Qo=e=>{const t=t=>t(e),o=x(e),n=()=>r,r={tag:!0,inner:e,fold:(t,o)=>o(e),isValue:E,isError:T,map:t=>tn.value(t(e)),mapError:n,bind:t,exists:t,forall:t,getOr:o,or:n,getOrThunk:o,orThunk:n,getOrDie:o,each:t=>{t(e)},toOptional:()=>D.some(e)};return r},en=e=>{const t=()=>o,o={tag:!1,inner:e,fold:(t,o)=>t(e),isValue:T,isError:E,map:t,mapError:t=>tn.error(t(e)),bind:t,exists:T,forall:E,getOr:w,or:w,getOrThunk:_,orThunk:_,getOrDie:C(String(e)),each:b,toOptional:D.none};return o},tn={value:Qo,error:en,fromOption:(e,t)=>e.fold((()=>en(t)),Qo)};var on;!function(e){e[e.Error=0]="Error",e[e.Value=1]="Value"}(on||(on={}));const nn=(e,t,o)=>e.stype===on.Error?t(e.serror):o(e.svalue),rn=e=>({stype:on.Value,svalue:e}),sn=e=>({stype:on.Error,serror:e}),an=e=>e.fold(sn,rn),ln=e=>nn(e,tn.error,tn.value),cn=rn,dn=e=>{const t=[],o=[];return L(e,(e=>{nn(e,(e=>o.push(e)),(e=>t.push(e)))})),{values:t,errors:o}},un=sn,mn=(e,t)=>e.stype===on.Value?t(e.svalue):e,gn=(e,t)=>e.stype===on.Error?t(e.serror):e,pn=(e,t)=>e.stype===on.Value?{stype:on.Value,svalue:t(e.svalue)}:e,hn=(e,t)=>e.stype===on.Error?{stype:on.Error,serror:t(e.serror)}:e,fn=nn,bn=(e,t,o,n)=>({tag:"field",key:e,newKey:t,presence:o,prop:n}),vn=(e,t,o)=>{switch(e.tag){case"field":return t(e.key,e.newKey,e.presence,e.prop);case"custom":return o(e.newKey,e.instantiator)}},yn=e=>(...t)=>{if(0===t.length)throw new Error("Can't merge zero objects");const o={};for(let n=0;n<t.length;n++){const r=t[n];for(const t in r)ve(r,t)&&(o[t]=e(o[t],r[t]))}return o},xn=yn(((e,t)=>i(e)&&i(t)?xn(e,t):t)),wn=yn(((e,t)=>t)),Sn=e=>({tag:"defaultedThunk",process:e}),kn=e=>Sn(x(e)),On=e=>({tag:"mergeWithThunk",process:e}),Cn=e=>y(un,q)(e),_n=e=>{const t=dn(e);return t.errors.length>0?Cn(t.errors):cn(t.values)},Tn=e=>a(e)&&ae(e).length>100?" removed due to size":JSON.stringify(e,null,2),En=(e,t)=>un([{path:e,getErrorInfo:t}]),Dn=e=>({extract:(t,o)=>gn(e(o),(e=>((e,t)=>En(e,x(t)))(t,e))),toString:x("val")}),An=Dn(cn),Mn=(e,t,o,n)=>be(t,o).fold((()=>((e,t,o)=>En(e,(()=>'Could not find valid *required* value for "'+t+'" in '+Tn(o))))(e,o,t)),n),Bn=(e,t,o,n)=>n(be(e,t).getOrThunk((()=>o(e)))),Fn=(e,t,o,n,r)=>{const s=e=>r.extract(t.concat([n]),e),a=e=>e.fold((()=>cn(D.none())),(e=>{const o=r.extract(t.concat([n]),e);return pn(o,D.some)}));switch(e.tag){case"required":return Mn(t,o,n,s);case"defaultedThunk":return Bn(o,n,e.process,s);case"option":return((e,t,o)=>o(be(e,t)))(o,n,a);case"defaultedOptionThunk":return((e,t,o,n)=>n(be(e,t).map((t=>!0===t?o(e):t))))(o,n,e.process,a);case"mergeWithThunk":return Bn(o,n,x({}),(t=>{const n=xn(e.process(o),t);return s(n)}))}},In=e=>({extract:(t,o)=>e().extract(t,o),toString:()=>e().toString()}),Rn=e=>ae(ge(e,g)),Nn=e=>{const t=Vn(e),o=W(e,((e,t)=>vn(t,(t=>xn(e,{[t]:!0})),x(e))),{});return{extract:(e,n)=>{const r=d(n)?[]:Rn(n),s=U(r,(e=>!ye(o,e)));return 0===s.length?t.extract(e,n):((e,t)=>En(e,(()=>"There are unsupported fields: ["+t.join(", ")+"] specified")))(e,s)},toString:t.toString}},Vn=e=>({extract:(t,o)=>((e,t,o)=>{const n={},r=[];for(const s of o)vn(s,((o,s,a,i)=>{const l=Fn(a,e,t,o,i);fn(l,(e=>{r.push(...e)}),(e=>{n[s]=e}))}),((e,o)=>{n[e]=o(t)}));return r.length>0?un(r):cn(n)})(t,o,e),toString:()=>{const t=H(e,(e=>vn(e,((e,t,o,n)=>e+" -> "+n.toString()),((e,t)=>"state("+e+")"))));return"obj{\n"+t.join("\n")+"}"}}),zn=e=>({extract:(t,o)=>{const n=H(o,((o,n)=>e.extract(t.concat(["["+n+"]"]),o)));return _n(n)},toString:()=>"array("+e.toString()+")"}),Hn=(e,t)=>{const o=void 0!==t?t:w;return{extract:(t,n)=>{const r=[];for(const s of e){const e=s.extract(t,n);if(e.stype===on.Value)return{stype:on.Value,svalue:o(e.svalue)};r.push(e)}return _n(r)},toString:()=>"oneOf("+H(e,(e=>e.toString())).join(", ")+")"}},Ln=(e,t)=>({extract:(o,n)=>{const r=ae(n),s=((t,o)=>zn(Dn(e)).extract(t,o))(o,r);return mn(s,(e=>{const r=H(e,(e=>bn(e,e,{tag:"required",process:{}},t)));return Vn(r).extract(o,n)}))},toString:()=>"setOf("+t.toString()+")"}),Pn=y(zn,Vn),Un=x(An),Wn=(e,t)=>Dn((o=>{const n=typeof o;return e(o)?cn(o):un(`Expected type: ${t} but got: ${n}`)})),jn=Wn(h,"number"),Gn=Wn(s,"string"),$n=Wn(d,"boolean"),qn=Wn(p,"function"),Xn=e=>{if(Object(e)!==e)return!0;switch({}.toString.call(e).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(e).every((t=>Xn(e[t])));default:return!1}},Kn=Dn((e=>Xn(e)?cn(e):un("Expected value to be acceptable for sending via postMessage"))),Yn=(e,t,o,n)=>be(o,n).fold((()=>((e,t,o)=>En(e,(()=>'The chosen schema: "'+o+'" did not exist in branches: '+Tn(t))))(e,o,n)),(o=>o.extract(e.concat(["branch: "+n]),t))),Jn=(e,t)=>({extract:(o,n)=>be(n,e).fold((()=>((e,t)=>En(e,(()=>'Choice schema did not contain choice key: "'+t+'"')))(o,e)),(e=>Yn(o,n,t,e))),toString:()=>"chooseOn("+e+"). Possible values: "+ae(t)}),Zn=e=>Dn((t=>e(t).fold(un,cn))),Qn=(e,t)=>Ln((t=>an(e(t))),t),er=(e,t,o)=>ln(((e,t,o)=>{const n=t.extract([e],o);return hn(n,(e=>({input:o,errors:e})))})(e,t,o)),tr=e=>e.fold((e=>{throw new Error(nr(e))}),w),or=(e,t,o)=>tr(er(e,t,o)),nr=e=>"Errors: \n"+(e=>{const t=e.length>10?e.slice(0,10).concat([{path:[],getErrorInfo:x("... (only showing first ten failures)")}]):e;return H(t,(e=>"Failed path: ("+e.path.join(" > ")+")\n"+e.getErrorInfo()))})(e.errors).join("\n")+"\n\nInput object: "+Tn(e.input),rr=(e,t)=>Jn(e,ce(t,Vn)),sr=(e,t)=>((e,t)=>{const o=Zt(t);return{extract:(e,t)=>o().extract(e,t),toString:()=>o().toString()}})(0,t),ar=bn,ir=(e,t)=>({tag:"custom",newKey:e,instantiator:t}),lr=e=>Zn((t=>R(e,t)?tn.value(t):tn.error(`Unsupported value: "${t}", choose one of "${e.join(", ")}".`))),cr=e=>ar(e,e,{tag:"required",process:{}},Un()),dr=(e,t)=>ar(e,e,{tag:"required",process:{}},t),ur=e=>dr(e,jn),mr=e=>dr(e,Gn),gr=(e,t)=>ar(e,e,{tag:"required",process:{}},lr(t)),pr=e=>dr(e,qn),hr=(e,t)=>ar(e,e,{tag:"required",process:{}},Vn(t)),fr=(e,t)=>ar(e,e,{tag:"required",process:{}},Pn(t)),br=(e,t)=>ar(e,e,{tag:"required",process:{}},zn(t)),vr=e=>ar(e,e,{tag:"option",process:{}},Un()),yr=(e,t)=>ar(e,e,{tag:"option",process:{}},t),xr=e=>yr(e,jn),wr=e=>yr(e,Gn),Sr=(e,t)=>yr(e,lr(t)),kr=e=>yr(e,qn),Or=(e,t)=>yr(e,zn(t)),Cr=(e,t)=>yr(e,Vn(t)),_r=(e,t)=>ar(e,e,kn(t),Un()),Tr=(e,t,o)=>ar(e,e,kn(t),o),Er=(e,t)=>Tr(e,t,jn),Dr=(e,t)=>Tr(e,t,Gn),Ar=(e,t,o)=>Tr(e,t,lr(o)),Mr=(e,t)=>Tr(e,t,$n),Br=(e,t)=>Tr(e,t,qn),Fr=(e,t,o)=>Tr(e,t,zn(o)),Ir=(e,t,o)=>Tr(e,t,Vn(o)),Rr=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},Nr=e=>{if(!l(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");const t=[],o={};return L(e,((n,r)=>{const s=ae(n);if(1!==s.length)throw new Error("one and only one name per case");const a=s[0],i=n[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(!l(i))throw new Error("case arguments must be an array");t.push(a),o[a]=(...o)=>{const n=o.length;if(n!==i.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+i.length+" ("+i+"), got "+n);return{fold:(...t)=>{if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);return t[r].apply(null,o)},match:e=>{const n=ae(e);if(t.length!==n.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+n.join(","));if(!K(t,(e=>R(n,e))))throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+t.join(", "));return e[a].apply(null,o)},log:e=>{console.log(e,{constructors:t,constructor:a,params:o})}}}})),o};Nr([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);const Vr=(e,t)=>((e,t)=>{const o={};return le(e,((e,n)=>{R(t,n)||(o[n]=e)})),o})(e,t),zr=(e,t)=>((e,t)=>({[e]:t}))(e,t),Hr=e=>(e=>{const t={};return L(e,(e=>{t[e.key]=e.value})),t})(e),Lr=(e,t)=>{const o=(e=>{const t=[],o=[];return L(e,(e=>{e.fold((e=>{t.push(e)}),(e=>{o.push(e)}))})),{errors:t,values:o}})(e);return o.errors.length>0?(n=o.errors,tn.error(q(n))):((e,t)=>0===e.length?tn.value(t):tn.value(xn(t,wn.apply(void 0,e))))(o.values,t);var n},Pr=e=>p(e)?e:T,Ur=(e,t,o)=>{let n=e.dom;const r=Pr(o);for(;n.parentNode;){n=n.parentNode;const e=Ie.fromDom(n),o=t(e);if(o.isSome())return o;if(r(e))break}return D.none()},Wr=(e,t,o)=>{const n=t(e),r=Pr(o);return n.orThunk((()=>r(e)?D.none():Ur(e,t,r)))},jr=(e,t)=>Ye(e.element,t.event.target),Gr={can:E,abort:T,run:b},$r=e=>{if(!ye(e,"can")&&!ye(e,"abort")&&!ye(e,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(e,null,2)+" does not have can, abort, or run!");return{...Gr,...e}},qr=e=>{const t=((e,t)=>(...o)=>j(e,((e,n)=>e&&t(n).apply(void 0,o)),!0))(e,(e=>e.can)),o=((e,t)=>(...o)=>j(e,((e,n)=>e||t(n).apply(void 0,o)),!1))(e,(e=>e.abort));return{can:t,abort:o,run:(...t)=>{L(e,(e=>{e.run.apply(void 0,t)}))}}},Xr=x,Kr=Xr("touchstart"),Yr=Xr("touchmove"),Jr=Xr("touchend"),Zr=Xr("touchcancel"),Qr=Xr("mousedown"),es=Xr("mousemove"),ts=Xr("mouseout"),os=Xr("mouseup"),ns=Xr("mouseover"),rs=Xr("focusin"),ss=Xr("focusout"),as=Xr("keydown"),is=Xr("keyup"),ls=Xr("input"),cs=Xr("change"),ds=Xr("click"),us=Xr("transitioncancel"),ms=Xr("transitionend"),gs=Xr("transitionstart"),ps=Xr("selectstart"),hs=e=>x("alloy."+e),fs={tap:hs("tap")},bs=hs("focus"),vs=hs("blur.post"),ys=hs("paste.post"),xs=hs("receive"),ws=hs("execute"),Ss=hs("focus.item"),ks=fs.tap,Os=hs("longpress"),Cs=hs("sandbox.close"),_s=hs("typeahead.cancel"),Ts=hs("system.init"),Es=hs("system.touchmove"),Ds=hs("system.touchend"),As=hs("system.scroll"),Ms=hs("system.resize"),Bs=hs("system.attached"),Fs=hs("system.detached"),Is=hs("system.dismissRequested"),Rs=hs("system.repositionRequested"),Ns=hs("focusmanager.shifted"),Vs=hs("slotcontainer.visibility"),zs=hs("system.external.element.scroll"),Hs=hs("change.tab"),Ls=hs("dismiss.tab"),Ps=hs("highlight"),Us=hs("dehighlight"),Ws=(e,t)=>{qs(e,e.element,t,{})},js=(e,t,o)=>{qs(e,e.element,t,o)},Gs=e=>{Ws(e,ws())},$s=(e,t,o)=>{qs(e,t,o,{})},qs=(e,t,o,n)=>{const r={target:t,...n};e.getSystem().triggerEvent(o,t,r)},Xs=(e,t,o,n)=>{e.getSystem().triggerEvent(o,t,n.event)},Ks=e=>Hr(e),Ys=(e,t)=>({key:e,value:$r({abort:t})}),Js=e=>({key:e,value:$r({run:(e,t)=>{t.event.prevent()}})}),Zs=(e,t)=>({key:e,value:$r({run:t})}),Qs=(e,t,o)=>({key:e,value:$r({run:(e,n)=>{t.apply(void 0,[e,n].concat(o))}})}),ea=e=>t=>({key:e,value:$r({run:(e,o)=>{jr(e,o)&&t(e,o)}})}),ta=(e,t,o)=>((e,t)=>Zs(e,((o,n)=>{o.getSystem().getByUid(t).each((t=>{Xs(t,t.element,e,n)}))})))(e,t.partUids[o]),oa=(e,t)=>Zs(e,((e,o)=>{const n=o.event,r=e.getSystem().getByDom(n.target).getOrThunk((()=>Wr(n.target,(t=>e.getSystem().getByDom(t).toOptional()),T).getOr(e)));t(e,r,o)})),na=e=>Zs(e,((e,t)=>{t.cut()})),ra=e=>Zs(e,((e,t)=>{t.stop()})),sa=(e,t)=>ea(e)(t),aa=ea(Bs()),ia=ea(Fs()),la=ea(Ts()),ca=(e=>t=>Zs(e,t))(ws()),da=e=>e.dom.innerHTML,ua=(e,t)=>{const o=Ze(e).dom,n=Ie.fromDom(o.createDocumentFragment()),r=((e,t)=>{const o=(t||document).createElement("div");return o.innerHTML=e,st(Ie.fromDom(o))})(t,o);No(n,r),Vo(e),Ro(e,n)},ma=e=>((e,t)=>Ie.fromDom(e.dom.cloneNode(t)))(e,!1),ga=e=>{if(dt(e))return"#shadow-root";return(e=>{const t=Ie.fromTag("div"),o=Ie.fromDom(e.dom.cloneNode(!0));return Ro(t,o),da(t)})(ma(e))},pa=e=>ga(e),ha=Ks([((e,t)=>({key:e,value:$r({can:t})}))(bs(),((e,t)=>{const o=t.event,n=o.originator,r=o.target;return!((e,t,o)=>Ye(t,e.element)&&!Ye(t,o))(e,n,r)||(console.warn(bs()+" did not get interpreted by the desired target. \nOriginator: "+pa(n)+"\nTarget: "+pa(r)+"\nCheck the "+bs()+" event handlers"),!1)}))]);var fa=Object.freeze({__proto__:null,events:ha});let ba=0;const va=e=>{const t=(new Date).getTime(),o=Math.floor(1e9*Math.random());return ba++,e+"_"+o+ba+String(t)},ya=x("alloy-id-"),xa=x("data-alloy-id"),wa=ya(),Sa=xa(),ka=(e,t)=>{Object.defineProperty(e.dom,Sa,{value:t,writable:!0})},Oa=e=>{const t=We(e)?e.dom[Sa]:null;return D.from(t)},Ca=e=>va(e),_a=w,Ta=e=>{const t=t=>`The component must be in a context to execute: ${t}`+(e?"\n"+pa(e().element)+" is not in context.":""),o=e=>()=>{throw new Error(t(e))},n=e=>()=>{console.warn(t(e))};return{debugInfo:x("fake"),triggerEvent:n("triggerEvent"),triggerFocus:n("triggerFocus"),triggerEscape:n("triggerEscape"),broadcast:n("broadcast"),broadcastOn:n("broadcastOn"),broadcastEvent:n("broadcastEvent"),build:o("build"),buildOrPatch:o("buildOrPatch"),addToWorld:o("addToWorld"),removeFromWorld:o("removeFromWorld"),addToGui:o("addToGui"),removeFromGui:o("removeFromGui"),getByUid:o("getByUid"),getByDom:o("getByDom"),isConnected:T}},Ea=Ta(),Da=e=>H(e,(e=>De(e,"/*")?e.substring(0,e.length-"/*".length):e)),Aa=(e,t)=>{const o=e.toString(),n=o.indexOf(")")+1,r=o.indexOf("("),s=o.substring(r+1,n-1).split(/,\s*/);return e.toFunctionAnnotation=()=>({name:t,parameters:Da(s)}),e},Ma=va("alloy-premade"),Ba=e=>(Object.defineProperty(e.element.dom,Ma,{value:e.uid,writable:!0}),zr(Ma,e)),Fa=e=>be(e,Ma),Ia=e=>((e,t)=>{const o=t.toString(),n=o.indexOf(")")+1,r=o.indexOf("("),s=o.substring(r+1,n-1).split(/,\s*/);return e.toFunctionAnnotation=()=>({name:"OVERRIDE",parameters:Da(s.slice(1))}),e})(((t,...o)=>e(t.getApis(),t,...o)),e),Ra={init:()=>Na({readState:x("No State required")})},Na=e=>e,Va=(e,t)=>{const o={};return le(e,((e,n)=>{le(e,((e,r)=>{const s=be(o,r).getOr([]);o[r]=s.concat([t(n,e)])}))})),o},za=e=>({classes:u(e.classes)?[]:e.classes,attributes:u(e.attributes)?{}:e.attributes,styles:u(e.styles)?{}:e.styles}),Ha=e=>e.cHandler,La=(e,t)=>({name:e,handler:t}),Pa=(e,t)=>{const o={};return L(e,(e=>{o[e.name()]=e.handlers(t)})),o},Ua=(e,t,o,n)=>{const r=((e,t,o)=>{const n={...o,...Pa(t,e)};return Va(n,La)})(e,o,n);return Ga(r,t)},Wa=e=>{const t=(e=>p(e)?{can:E,abort:T,run:e}:e)(e);return(e,o,...n)=>{const r=[e,o].concat(n);t.abort.apply(void 0,r)?o.stop():t.can.apply(void 0,r)&&t.run.apply(void 0,r)}},ja=(e,t,o)=>{const n=t[o];return n?((e,t,o,n)=>{try{const r=ee(o,((o,r)=>{const s=o[t],a=r[t],i=n.indexOf(s),l=n.indexOf(a);if(-1===i)throw new Error("The ordering for "+e+" does not have an entry for "+s+".\nOrder specified: "+JSON.stringify(n,null,2));if(-1===l)throw new Error("The ordering for "+e+" does not have an entry for "+a+".\nOrder specified: "+JSON.stringify(n,null,2));return i<l?-1:l<i?1:0}));return tn.value(r)}catch(e){return tn.error([e])}})("Event: "+o,"name",e,n).map((e=>{const t=H(e,(e=>e.handler));return qr(t)})):((e,t)=>tn.error(["The event ("+e+') 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(H(t,(e=>e.name)),null,2)]))(o,e)},Ga=(e,t)=>{const o=pe(e,((e,o)=>(1===e.length?tn.value(e[0].handler):ja(e,t,o)).map((n=>{const r=Wa(n),s=e.length>1?U(t[o],(t=>N(e,(e=>e.name===t)))).join(" > "):e[0].name;return zr(o,((e,t)=>({handler:e,purpose:t}))(r,s))}))));return Lr(o,{})},$a="alloy.base.behaviour",qa=Vn([ar("dom","dom",{tag:"required",process:{}},Vn([cr("tag"),_r("styles",{}),_r("classes",[]),_r("attributes",{}),vr("value"),vr("innerHtml")])),cr("components"),cr("uid"),_r("events",{}),_r("apis",{}),ar("eventOrder","eventOrder",(e=>On(x(e)))({[ws()]:["disabling",$a,"toggling","typeaheadevents"],[bs()]:[$a,"focusing","keying"],[Ts()]:[$a,"disabling","toggling","representing"],[ls()]:[$a,"representing","streaming","invalidating"],[Fs()]:[$a,"representing","item-events","tooltipping"],[Qr()]:["focusing",$a,"item-type-events"],[Kr()]:["focusing",$a,"item-type-events"],[ns()]:["item-type-events","tooltipping"],[xs()]:["receiving","reflecting","tooltipping"]}),Un()),vr("domModification")]),Xa=e=>e.events,Ka=(e,t)=>{const o=Ot(e,t);return void 0===o||""===o?[]:o.split(" ")},Ya=e=>void 0!==e.dom.classList,Ja=e=>Ka(e,"class"),Za=(e,t)=>((e,t,o)=>{const n=Ka(e,t).concat([o]);return St(e,t,n.join(" ")),!0})(e,"class",t),Qa=(e,t)=>((e,t,o)=>{const n=U(Ka(e,t),(e=>e!==o));return n.length>0?St(e,t,n.join(" ")):Tt(e,t),!1})(e,"class",t),ei=(e,t)=>{Ya(e)?e.dom.classList.add(t):Za(e,t)},ti=(e,t)=>{if(Ya(e)){e.dom.classList.remove(t)}else Qa(e,t);(e=>{0===(Ya(e)?e.dom.classList:Ja(e)).length&&Tt(e,"class")})(e)},oi=(e,t)=>Ya(e)&&e.dom.classList.contains(t),ni=(e,t)=>{L(t,(t=>{ei(e,t)}))},ri=(e,t)=>{L(t,(t=>{ti(e,t)}))},si=(e,t)=>K(t,(t=>oi(e,t))),ai=e=>Ya(e)?(e=>{const t=e.dom.classList,o=new Array(t.length);for(let e=0;e<t.length;e++){const n=t.item(e);null!==n&&(o[e]=n)}return o})(e):Ja(e),ii=e=>e.dom.value,li=(e,t)=>{if(void 0===t)throw new Error("Value.set was undefined");e.dom.value=t},ci=(e,t,o)=>{o.fold((()=>Ro(e,t)),(e=>{Ye(e,t)||(Bo(e,t),zo(e))}))},di=(e,t,o)=>{const n=H(t,o),r=st(e);return L(r.slice(n.length),zo),n},ui=(e,t,o,n)=>{const r=at(e,t),s=n(o,r),a=((e,t,o)=>at(e,t).map((e=>{if(o.exists((t=>!Ye(t,e)))){const t=o.map(Le).getOr("span"),n=Ie.fromTag(t);return Bo(e,n),n}return e})))(e,t,r);return ci(e,s.element,a),s},mi=(e,t)=>{const o=ae(e),n=ae(t),r=J(n,o),s=((e,t)=>{const o={},n={};return me(e,t,ue(o),ue(n)),{t:o,f:n}})(e,((e,o)=>!ve(t,o)||e!==t[o])).t;return{toRemove:r,toSet:s}},gi=(e,t)=>{const{class:o,style:n,...r}=(e=>j(e.dom.attributes,((e,t)=>(e[t.name]=t.value,e)),{}))(t),{toSet:s,toRemove:a}=mi(e.attributes,r),i=Nt(t),{toSet:l,toRemove:c}=mi(e.styles,i),d=ai(t),u=J(d,e.classes),m=J(e.classes,d);return L(a,(e=>Tt(t,e))),kt(t,s),ni(t,m),ri(t,u),L(c,(e=>zt(t,e))),Mt(t,l),e.innerHtml.fold((()=>{const o=e.domChildren;((e,t)=>{di(e,t,((t,o)=>{const n=at(e,o);return ci(e,t,n),t}))})(t,o)}),(e=>{ua(t,e)})),(()=>{const o=t,n=e.value.getOrUndefined();n!==ii(o)&&li(o,null!=n?n:"")})(),t},pi=(e,t)=>{const o=t.filter((t=>Le(t)===e.tag&&!(e=>e.innerHtml.isSome()&&e.domChildren.length>0)(e)&&!(e=>ve(e.dom,Ma))(t))).bind((t=>((e,t)=>{try{const o=gi(e,t);return D.some(o)}catch(e){return D.none()}})(e,t))).getOrThunk((()=>(e=>{const t=Ie.fromTag(e.tag);kt(t,e.attributes),ni(t,e.classes),Mt(t,e.styles),e.innerHtml.each((e=>ua(t,e)));const o=e.domChildren;return No(t,o),e.value.each((e=>{li(t,e)})),t})(e)));return ka(o,e.uid),o},hi=(e,t)=>((e,t)=>{const o=H(t,(e=>Cr(e.name(),[cr("config"),_r("state",Ra)]))),n=er("component.behaviours",Vn(o),e.behaviours).fold((t=>{throw new Error(nr(t)+"\nComplete spec:\n"+JSON.stringify(e,null,2))}),w);return{list:t,data:ce(n,(e=>{const t=e.map((e=>({config:e.config,state:e.state.init(e.config)})));return x(t)}))}})(e,t),fi=e=>{const t=(e=>{const t=be(e,"behaviours").getOr({});return X(ae(t),(e=>{const o=t[e];return g(o)?[o.me]:[]}))})(e);return hi(e,t)},bi=(e,t,o)=>{const n={...(r=e).dom,uid:r.uid,domChildren:H(r.components,(e=>e.element))};var r;const s=(e=>e.domModification.fold((()=>za({})),za))(e),a={"alloy.base.modification":s},i=t.length>0?((e,t,o,n)=>{const r={...t};L(o,(t=>{r[t.name()]=t.exhibit(e,n)}));const s=Va(r,((e,t)=>({name:e,modification:t}))),a=e=>W(e,((e,t)=>({...t.modification,...e})),{}),i=W(s.classes,((e,t)=>t.modification.concat(e)),[]),l=a(s.attributes),c=a(s.styles);return za({classes:i,attributes:l,styles:c})})(o,a,t,n):s;return l=n,c=i,{...l,attributes:{...l.attributes,...c.attributes},styles:{...l.styles,...c.styles},classes:l.classes.concat(c.classes)};var l,c},vi=(e,t)=>{const o=()=>m,n=Rr(Ea),r=tr((e=>er("custom.definition",qa,e))(e)),s=fi(e),a=(e=>e.list)(s),i=(e=>e.data)(s),l=bi(r,a,i),c=pi(l,t),d=((e,t,o)=>{const n={"alloy.base.behaviour":Xa(e)};return Ua(o,e.eventOrder,t,n).getOrDie()})(r,a,i),u=Rr(r.components),m={uid:e.uid,getSystem:n.get,config:t=>{const o=i;return(p(o[t.name()])?o[t.name()]:()=>{throw new Error("Could not find "+t.name()+" in "+JSON.stringify(e,null,2))})()},hasConfigured:e=>p(i[e.name()]),spec:e,readState:e=>i[e]().map((e=>e.state.readState())).getOr("not enabled"),getApis:()=>r.apis,connect:e=>{n.set(e)},disconnect:()=>{n.set(Ta(o))},element:c,syncComponents:()=>{const e=st(c),t=X(e,(e=>n.get().getByDom(e).fold((()=>[]),Q)));u.set(t)},components:u.get,events:d};return m},yi=(e,t)=>{const{events:o,...n}=_a(e),r=((e,t)=>{const o=be(e,"components").getOr([]);return t.fold((()=>H(o,Oi)),(e=>H(o,((t,o)=>ki(t,at(e,o))))))})(n,t),s={...n,events:{...fa,...o},components:r};return tn.value(vi(s,t))},xi=e=>{const t=Ie.fromText(e);return wi({element:t})},wi=e=>{const t=or("external.component",Nn([cr("element"),vr("uid")]),e),o=Rr(Ta()),n=t.uid.getOrThunk((()=>Ca("external")));ka(t.element,n);const r={uid:n,getSystem:o.get,config:D.none,hasConfigured:T,connect:e=>{o.set(e)},disconnect:()=>{o.set(Ta((()=>r)))},getApis:()=>({}),element:t.element,spec:e,readState:x("No state"),syncComponents:b,components:x([]),events:{}};return Ba(r)},Si=Ca,ki=(e,t)=>Fa(e).getOrThunk((()=>{const o=(e=>ve(e,"uid"))(e)?e:{uid:Si(""),...e};return yi(o,t).getOrDie()})),Oi=e=>ki(e,D.none()),Ci=Ba;var _i=(e,t,o,n,r)=>e(o,n)?D.some(o):p(r)&&r(o)?D.none():t(o,n,r);const Ti=(e,t,o)=>{let n=e.dom;const r=p(o)?o:T;for(;n.parentNode;){n=n.parentNode;const e=Ie.fromDom(n);if(t(e))return D.some(e);if(r(e))break}return D.none()},Ei=(e,t,o)=>_i(((e,t)=>t(e)),Ti,e,t,o),Di=(e,t,o)=>Ei(e,t,o).isSome(),Ai=(e,t,o)=>Ti(e,(e=>Xe(e,t)),o),Mi=(e,t)=>((e,t)=>G(e.dom.childNodes,(e=>t(Ie.fromDom(e)))).map(Ie.fromDom))(e,(e=>Xe(e,t))),Bi=(e,t)=>((e,t)=>{const o=void 0===t?document:t.dom;return Ke(o)?D.none():D.from(o.querySelector(e)).map(Ie.fromDom)})(t,e),Fi=(e,t,o)=>_i(((e,t)=>Xe(e,t)),Ai,e,t,o),Ii="aria-controls",Ri=()=>{const e=va(Ii);return{id:e,link:t=>{St(t,Ii,e)},unlink:e=>{Tt(e,Ii)}}},Ni=(e,t)=>(e=>Ei(e,(e=>{if(!We(e))return!1;const t=Ot(e,"id");return void 0!==t&&t.indexOf(Ii)>-1})).bind((e=>{const t=Ot(e,"id"),o=gt(e);return Bi(o,`[${Ii}="${t}"]`)})))(t).exists((t=>Vi(e,t))),Vi=(e,t)=>Di(t,(t=>Ye(t,e.element)),T)||Ni(e,t),zi="unknown";var Hi;!function(e){e[e.STOP=0]="STOP",e[e.NORMAL=1]="NORMAL",e[e.LOGGING=2]="LOGGING"}(Hi||(Hi={}));const Li=Rr({}),Pi=(e,t,o)=>{switch(be(Li.get(),e).orThunk((()=>{const t=ae(Li.get());return se(t,(t=>e.indexOf(t)>-1?D.some(Li.get()[t]):D.none()))})).getOr(Hi.NORMAL)){case Hi.NORMAL:return o(ji());case Hi.LOGGING:{const n=((e,t)=>{const o=[],n=(new Date).getTime();return{logEventCut:(e,t,n)=>{o.push({outcome:"cut",target:t,purpose:n})},logEventStopped:(e,t,n)=>{o.push({outcome:"stopped",target:t,purpose:n})},logNoParent:(e,t,n)=>{o.push({outcome:"no-parent",target:t,purpose:n})},logEventNoHandlers:(e,t)=>{o.push({outcome:"no-handlers-left",target:t})},logEventResponse:(e,t,n)=>{o.push({outcome:"response",purpose:n,target:t})},write:()=>{const r=(new Date).getTime();R(["mousemove","mouseover","mouseout",Ts()],e)||console.log(e,{event:e,time:r-n,target:t.dom,sequence:H(o,(e=>R(["cut","stopped","response"],e.outcome)?"{"+e.purpose+"} "+e.outcome+" at ("+pa(e.target)+")":e.outcome))})}}})(e,t),r=o(n);return n.write(),r}case Hi.STOP:return!0}},Ui=["alloy/data/Fields","alloy/debugging/Debugging"],Wi=(e,t,o)=>Pi(e,t,o),ji=x({logEventCut:b,logEventStopped:b,logNoParent:b,logEventNoHandlers:b,logEventResponse:b,write:b}),Gi=x([cr("menu"),cr("selectedMenu")]),$i=x([cr("item"),cr("selectedItem")]);x(Vn($i().concat(Gi())));const qi=x(Vn($i())),Xi=hr("initSize",[cr("numColumns"),cr("numRows")]),Ki=()=>hr("markers",[cr("backgroundMenu")].concat(Gi()).concat($i())),Yi=e=>hr("markers",H(e,cr)),Ji=(e,t,o)=>((()=>{const e=new Error;if(void 0!==e.stack){const t=e.stack.split("\n");return G(t,(e=>e.indexOf("alloy")>0&&!N(Ui,(t=>e.indexOf(t)>-1)))).getOr(zi)}})(),ar(t,t,o,Zn((e=>tn.value(((...t)=>e.apply(void 0,t))))))),Zi=e=>Ji(0,e,kn(b)),Qi=e=>Ji(0,e,kn(D.none)),el=e=>Ji(0,e,{tag:"required",process:{}}),tl=e=>Ji(0,e,{tag:"required",process:{}}),ol=(e,t)=>ir(e,x(t)),nl=e=>ir(e,w),rl=x(Xi),sl=(e,t,o,n,r,s,a,i=!1)=>({x:e,y:t,bubble:o,direction:n,placement:r,restriction:s,label:`${a}-${r}`,alwaysFit:i}),al=Nr([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),il=al.southeast,ll=al.southwest,cl=al.northeast,dl=al.northwest,ul=al.south,ml=al.north,gl=al.east,pl=al.west,hl=(e,t,o,n)=>{const r=e+t;return r>n?o:r<o?n:r},fl=(e,t,o)=>Math.min(Math.max(e,t),o),bl=(e,t)=>Z(["left","right","top","bottom"],(o=>be(t,o).map((t=>((e,t)=>{switch(t){case 1:return e.x;case 0:return e.x+e.width;case 2:return e.y;case 3:return e.y+e.height}})(e,t))))),vl="layout",yl=e=>e.x,xl=(e,t)=>e.x+e.width/2-t.width/2,wl=(e,t)=>e.x+e.width-t.width,Sl=(e,t)=>e.y-t.height,kl=e=>e.y+e.height,Ol=(e,t)=>e.y+e.height/2-t.height/2,Cl=(e,t,o)=>sl(yl(e),kl(e),o.southeast(),il(),"southeast",bl(e,{left:1,top:3}),vl),_l=(e,t,o)=>sl(wl(e,t),kl(e),o.southwest(),ll(),"southwest",bl(e,{right:0,top:3}),vl),Tl=(e,t,o)=>sl(yl(e),Sl(e,t),o.northeast(),cl(),"northeast",bl(e,{left:1,bottom:2}),vl),El=(e,t,o)=>sl(wl(e,t),Sl(e,t),o.northwest(),dl(),"northwest",bl(e,{right:0,bottom:2}),vl),Dl=(e,t,o)=>sl(xl(e,t),Sl(e,t),o.north(),ml(),"north",bl(e,{bottom:2}),vl),Al=(e,t,o)=>sl(xl(e,t),kl(e),o.south(),ul(),"south",bl(e,{top:3}),vl),Ml=(e,t,o)=>sl((e=>e.x+e.width)(e),Ol(e,t),o.east(),gl(),"east",bl(e,{left:0}),vl),Bl=(e,t,o)=>sl(((e,t)=>e.x-t.width)(e,t),Ol(e,t),o.west(),pl(),"west",bl(e,{right:1}),vl),Fl=()=>[Cl,_l,Tl,El,Al,Dl,Ml,Bl],Il=()=>[_l,Cl,El,Tl,Al,Dl,Ml,Bl],Rl=()=>[Tl,El,Cl,_l,Dl,Al],Nl=()=>[El,Tl,_l,Cl,Dl,Al],Vl=()=>[Cl,_l,Tl,El,Al,Dl],zl=()=>[_l,Cl,El,Tl,Al,Dl];var Hl=Object.freeze({__proto__:null,events:e=>Ks([Zs(xs(),((t,o)=>{const n=e.channels,r=ae(n),s=o,a=((e,t)=>t.universal?e:U(e,(e=>R(t.channels,e))))(r,s);L(a,(e=>{const o=n[e],r=o.schema,a=or("channel["+e+"] data\nReceiver: "+pa(t.element),r,s.data);o.onReceive(t,a)}))}))])}),Ll=[dr("channels",Qn(tn.value,Nn([el("onReceive"),_r("schema",Un())])))];const Pl=(e,t,o)=>la(((n,r)=>{o(n,e,t)})),Ul=(e,t,o)=>((e,t,o)=>{const n=o.toString(),r=n.indexOf(")")+1,s=n.indexOf("("),a=n.substring(s+1,r-1).split(/,\s*/);return e.toFunctionAnnotation=()=>({name:t,parameters:Da(a.slice(0,1).concat(a.slice(3)))}),e})(((n,...r)=>{const s=[n].concat(r);return n.config({name:x(e)}).fold((()=>{throw new Error("We could not find any behaviour configuration for: "+e+". Using API: "+o)}),(e=>{const o=Array.prototype.slice.call(s,1);return t.apply(void 0,[n,e.config,e.state].concat(o))}))}),o,t),Wl=e=>({key:e,value:void 0}),jl=(e,t,o,n,r,s,a)=>{const i=e=>ye(e,o)?e[o]():D.none(),l=ce(r,((e,t)=>Ul(o,e,t))),c={...ce(s,((e,t)=>Aa(e,t))),...l,revoke:k(Wl,o),config:t=>{const n=or(o+"-config",e,t);return{key:o,value:{config:n,me:c,configAsRaw:Zt((()=>or(o+"-config",e,t))),initialConfig:t,state:a}}},schema:x(t),exhibit:(e,t)=>Se(i(e),be(n,"exhibit"),((e,o)=>o(t,e.config,e.state))).getOrThunk((()=>za({}))),name:x(o),handlers:e=>i(e).map((e=>be(n,"events").getOr((()=>({})))(e.config,e.state))).getOr({})};return c},Gl=e=>Hr(e),$l=Nn([cr("fields"),cr("name"),_r("active",{}),_r("apis",{}),_r("state",Ra),_r("extra",{})]),ql=e=>{const t=or("Creating behaviour: "+e.name,$l,e);return((e,t,o,n,r,s)=>{const a=Nn(e),i=Cr(t,[(l="config",c=e,yr(l,Nn(c)))]);var l,c;return jl(a,i,t,o,n,r,s)})(t.fields,t.name,t.active,t.apis,t.extra,t.state)},Xl=Nn([cr("branchKey"),cr("branches"),cr("name"),_r("active",{}),_r("apis",{}),_r("state",Ra),_r("extra",{})]),Kl=e=>{const t=or("Creating behaviour: "+e.name,Xl,e);return((e,t,o,n,r,s)=>{const a=e,i=Cr(t,[yr("config",e)]);return jl(a,i,t,o,n,r,s)})(rr(t.branchKey,t.branches),t.name,t.active,t.apis,t.extra,t.state)},Yl=x(void 0),Jl=ql({fields:Ll,name:"receiving",active:Hl});var Zl=Object.freeze({__proto__:null,exhibit:(e,t)=>za({classes:[],styles:t.useFixed()?{}:{position:"relative"}})});const Ql=e=>e.dom.focus(),ec=e=>e.dom.blur(),tc=e=>{const t=gt(e).dom;return e.dom===t.activeElement},oc=(e=Wo())=>D.from(e.dom.activeElement).map(Ie.fromDom),nc=e=>oc(gt(e)).filter((t=>e.dom.contains(t.dom))),rc=(e,t)=>{const o=gt(t),n=oc(o).bind((e=>{const o=t=>Ye(e,t);return o(t)?D.some(t):((e,t)=>{const o=e=>{for(let n=0;n<e.childNodes.length;n++){const r=Ie.fromDom(e.childNodes[n]);if(t(r))return D.some(r);const s=o(e.childNodes[n]);if(s.isSome())return s}return D.none()};return o(e.dom)})(t,o)})),r=e(t);return n.each((e=>{oc(o).filter((t=>Ye(t,e))).fold((()=>{Ql(e)}),b)})),r},sc=(e,t,o,n,r)=>{const s=e=>e+"px";return{position:e,left:t.map(s),top:o.map(s),right:n.map(s),bottom:r.map(s)}},ac=(e,t)=>{Bt(e,(e=>({...e,position:D.some(e.position)}))(t))},ic=Nr([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),lc=(e,t,o,n,r,s)=>{const a=t.rect,i=a.x-o,l=a.y-n,c=r-(i+a.width),d=s-(l+a.height),u=D.some(i),m=D.some(l),g=D.some(c),p=D.some(d),h=D.none();return((e,t,o,n,r,s,a,i,l)=>e.fold(t,o,n,r,s,a,i,l))(t.direction,(()=>sc(e,u,m,h,h)),(()=>sc(e,h,m,g,h)),(()=>sc(e,u,h,h,p)),(()=>sc(e,h,h,g,p)),(()=>sc(e,u,m,h,h)),(()=>sc(e,u,h,h,p)),(()=>sc(e,u,m,h,h)),(()=>sc(e,h,m,g,h)))},cc=(e,t)=>e.fold((()=>{const e=t.rect;return sc("absolute",D.some(e.x),D.some(e.y),D.none(),D.none())}),((e,o,n,r)=>lc("absolute",t,e,o,n,r)),((e,o,n,r)=>lc("fixed",t,e,o,n,r))),dc=(e,t)=>{const o=k($o,t),n=e.fold(o,o,(()=>{const e=Ho();return $o(t).translate(-e.left,-e.top)})),r=Jt(t),s=Wt(t);return qo(n.left,n.top,r,s)},uc=(e,t)=>t.fold((()=>e.fold(Jo,Jo,qo)),(t=>e.fold(x(t),x(t),(()=>{const o=mc(e,t.x,t.y);return qo(o.left,o.top,t.width,t.height)})))),mc=(e,t,o)=>{const n=Gt(t,o);return e.fold(x(n),x(n),(()=>{const e=Ho();return n.translate(-e.left,-e.top)}))};ic.none;const gc=ic.relative,pc=ic.fixed,hc=(e,t)=>((e,t)=>({anchorBox:e,origin:t}))(e,t),fc="data-alloy-placement",bc=e=>Ct(e,fc),vc=Nr([{fit:["reposition"]},{nofit:["reposition","visibleW","visibleH","isVisible"]}]),yc=(e,t,o,n)=>{const r=e.bubble,s=r.offset,a=((e,t,o)=>{const n=(n,r)=>t[n].map((t=>{const s="top"===n||"bottom"===n,a=s?o.top:o.left,i=("left"===n||"top"===n?Math.max:Math.min)(t,r)+a;return s?fl(i,e.y,e.bottom):fl(i,e.x,e.right)})).getOr(r),r=n("left",e.x),s=n("top",e.y),a=n("right",e.right),i=n("bottom",e.bottom);return qo(r,s,a-r,i-s)})(n,e.restriction,s),i=e.x+s.left,l=e.y+s.top,c=qo(i,l,t,o),{originInBounds:d,sizeInBounds:u,visibleW:m,visibleH:g}=((e,t)=>{const{x:o,y:n,right:r,bottom:s}=t,{x:a,y:i,right:l,bottom:c,width:d,height:u}=e;return{originInBounds:a>=o&&a<=r&&i>=n&&i<=s,sizeInBounds:l<=r&&l>=o&&c<=s&&c>=n,visibleW:Math.min(d,a>=o?r-a:l-o),visibleH:Math.min(u,i>=n?s-i:c-n)}})(c,a),p=d&&u,h=p?c:((e,t)=>{const{x:o,y:n,right:r,bottom:s}=t,{x:a,y:i,width:l,height:c}=e,d=Math.max(o,r-l),u=Math.max(n,s-c),m=fl(a,o,d),g=fl(i,n,u),p=Math.min(m+l,r)-m,h=Math.min(g+c,s)-g;return qo(m,g,p,h)})(c,a),f=h.width>0&&h.height>0,{maxWidth:b,maxHeight:v}=((e,t,o)=>{const n=x(t.bottom-o.y),r=x(o.bottom-t.y),s=((e,t,o,n)=>e.fold(t,t,n,n,t,n,o,o))(e,r,r,n),a=x(t.right-o.x),i=x(o.right-t.x),l=((e,t,o,n)=>e.fold(t,n,t,n,o,o,t,n))(e,i,i,a);return{maxWidth:l,maxHeight:s}})(e.direction,h,n),y={rect:h,maxHeight:v,maxWidth:b,direction:e.direction,placement:e.placement,classes:{on:r.classesOn,off:r.classesOff},layout:e.label,testY:l};return p||e.alwaysFit?vc.fit(y):vc.nofit(y,m,g,f)},xc=e=>{const t=Rr(D.none()),o=()=>t.get().each(e);return{clear:()=>{o(),t.set(D.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{o(),t.set(D.some(e))}}},wc=()=>xc((e=>e.unbind())),Sc=()=>{const e=xc(b);return{...e,on:t=>e.get().each(t)}},kc=E,Oc=(e,t,o)=>((e,t,o,n)=>Ao(e,t,o,n,!1))(e,t,kc,o),Cc=(e,t,o)=>((e,t,o,n)=>Ao(e,t,o,n,!0))(e,t,kc,o),_c=Do,Tc=["top","bottom","right","left"],Ec="data-alloy-transition-timer",Dc=(e,t)=>{const o=e=>parseFloat(e).toFixed(3);return he(t,((t,n)=>!((e,t,o=S)=>Se(e,t,o).getOr(e.isNone()&&t.isNone()))(e[n].map(o),t.map(o)))).isSome()},Ac=(e,t)=>{const o=wc(),n=wc();let r;const a=t=>{var o;const n=null!==(o=t.raw.pseudoElement)&&void 0!==o?o:"";return Ye(t.target,e)&&!Me(n)&&R(Tc,t.raw.propertyName)},i=s=>{if(m(s)||a(s)){o.clear(),n.clear();const a=null==s?void 0:s.raw.type;(m(a)||a===ms())&&(clearTimeout(r),Tt(e,Ec),ri(e,t.classes))}},l=Oc(e,gs(),(t=>{a(t)&&(l.unbind(),o.set(Oc(e,ms(),i)),n.set(Oc(e,us(),i)))})),c=(e=>{const t=t=>{const o=Ft(e,t).split(/\s*,\s*/);return U(o,Me)},o=e=>{if(s(e)&&/^[\d.]+/.test(e)){const t=parseFloat(e);return De(e,"ms")?t:1e3*t}return 0},n=t("transition-delay"),r=t("transition-duration");return j(r,((e,t,r)=>{const s=o(n[r])+o(t);return Math.max(e,s)}),0)})(e);requestAnimationFrame((()=>{r=setTimeout(i,c+17),St(e,Ec,r)}))},Mc=(e,t,o,n,r,s)=>{const a=((e,t,o)=>o.exists((o=>{const n=e.mode;return"all"===n||o[n]!==t[n]})))(n,r,s);if(a||((e,t)=>si(e,t.classes))(e,n)){At(e,"position",o.position);const s=dc(t,e),i=cc(t,{...r,rect:s}),l=Z(Tc,(e=>i[e]));Dc(o,l)&&(Bt(e,l),a&&((e,t)=>{ni(e,t.classes),Ct(e,Ec).each((t=>{clearTimeout(parseInt(t,10)),Tt(e,Ec)})),Ac(e,t)})(e,n),Ht(e))}else ri(e,n.classes)},Bc=(e,t,o,n)=>{zt(t,"max-height"),zt(t,"max-width");const r={width:Jt(s=t),height:Wt(s)};var s;return((e,t,o,n,r,s)=>{const a=n.width,i=n.height,l=(t,l,c,d,u)=>{const m=t(o,n,r,e,s),g=yc(m,a,i,s);return g.fold(x(g),((e,t,o,n)=>(u===n?o>d||t>c:!u&&n)?g:vc.nofit(l,c,d,u)))},c=j(t,((e,t)=>{const o=k(l,t);return e.fold(x(e),o)}),vc.nofit({rect:o,maxHeight:n.height,maxWidth:n.width,direction:il(),placement:"southeast",classes:{on:[],off:[]},layout:"none",testY:o.y},-1,-1,!1));return c.fold(w,w)})(t,n.preference,e,r,o,n.bounds)},Fc=(e,t)=>{((e,t)=>{St(e,fc,t)})(e,t.placement)},Ic=(e,t)=>{((e,t)=>{const o=Pt.max(e,t,["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"]);At(e,"max-height",o+"px")})(e,Math.floor(t))},Rc=x(((e,t)=>{Ic(e,t),Mt(e,{"overflow-x":"hidden","overflow-y":"auto"})})),Nc=x(((e,t)=>{Ic(e,t)})),Vc=(e,t,o)=>void 0===e[t]?o:e[t],zc=(e,t,o,n)=>{const r=Bc(e,t,o,n);return((e,t,o)=>{const n=cc(o.origin,t);o.transition.each((r=>{Mc(e,o.origin,n,r,t,o.lastPlacement)})),ac(e,n)})(t,r,n),Fc(t,r),((e,t)=>{const o=t.classes;ri(e,o.off),ni(e,o.on)})(t,r),((e,t,o)=>{(0,o.maxHeightFunction)(e,t.maxHeight)})(t,r,n),((e,t,o)=>{(0,o.maxWidthFunction)(e,t.maxWidth)})(t,r,n),{layout:r.layout,placement:r.placement}},Hc=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right","inset"],Lc=(e,t,o,n=1)=>{const r=e*n,s=t*n,a=e=>be(o,e).getOr([]),i=(e,t,o)=>{const n=J(Hc,o);return{offset:Gt(e,t),classesOn:X(o,a),classesOff:X(n,a)}};return{southeast:()=>i(-e,t,["top","alignLeft"]),southwest:()=>i(e,t,["top","alignRight"]),south:()=>i(-e/2,t,["top","alignCentre"]),northeast:()=>i(-e,-t,["bottom","alignLeft"]),northwest:()=>i(e,-t,["bottom","alignRight"]),north:()=>i(-e/2,-t,["bottom","alignCentre"]),east:()=>i(e,-t/2,["valignCentre","left"]),west:()=>i(-e,-t/2,["valignCentre","right"]),insetNortheast:()=>i(r,s,["top","alignLeft","inset"]),insetNorthwest:()=>i(-r,s,["top","alignRight","inset"]),insetNorth:()=>i(-r/2,s,["top","alignCentre","inset"]),insetSoutheast:()=>i(r,-s,["bottom","alignLeft","inset"]),insetSouthwest:()=>i(-r,-s,["bottom","alignRight","inset"]),insetSouth:()=>i(-r/2,-s,["bottom","alignCentre","inset"]),insetEast:()=>i(-r,-s/2,["valignCentre","right","inset"]),insetWest:()=>i(r,-s/2,["valignCentre","left","inset"])}},Pc=()=>Lc(0,0,{}),Uc=w,Wc=(e,t)=>o=>"rtl"===jc(o)?t:e,jc=e=>"rtl"===Ft(e,"direction")?"rtl":"ltr";var Gc;!function(e){e.TopToBottom="toptobottom",e.BottomToTop="bottomtotop"}(Gc||(Gc={}));const $c="data-alloy-vertical-dir",qc=e=>Di(e,(e=>We(e)&&Ot(e,"data-alloy-vertical-dir")===Gc.BottomToTop)),Xc=()=>Cr("layouts",[cr("onLtr"),cr("onRtl"),vr("onBottomLtr"),vr("onBottomRtl")]),Kc=(e,t,o,n,r,s,a)=>{const i=a.map(qc).getOr(!1),l=t.layouts.map((t=>t.onLtr(e))),c=t.layouts.map((t=>t.onRtl(e))),d=i?t.layouts.bind((t=>t.onBottomLtr.map((t=>t(e))))).or(l).getOr(r):l.getOr(o),u=i?t.layouts.bind((t=>t.onBottomRtl.map((t=>t(e))))).or(c).getOr(s):c.getOr(n);return Wc(d,u)(e)};var Yc=[cr("hotspot"),vr("bubble"),_r("overrides",{}),Xc(),ol("placement",((e,t,o)=>{const n=t.hotspot,r=dc(o,n.element),s=Kc(e.element,t,Vl(),zl(),Rl(),Nl(),D.some(t.hotspot.element));return D.some(Uc({anchorBox:r,bubble:t.bubble.getOr(Pc()),overrides:t.overrides,layouts:s}))}))];var Jc=[cr("x"),cr("y"),_r("height",0),_r("width",0),_r("bubble",Pc()),_r("overrides",{}),Xc(),ol("placement",((e,t,o)=>{const n=mc(o,t.x,t.y),r=qo(n.left,n.top,t.width,t.height),s=Kc(e.element,t,Fl(),Il(),Fl(),Il(),D.none());return D.some(Uc({anchorBox:r,bubble:t.bubble,overrides:t.overrides,layouts:s}))}))];const Zc=Nr([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),Qc=e=>e.fold(w,((e,t,o)=>e.translate(-t,-o))),ed=e=>e.fold(w,w),td=e=>j(e,((e,t)=>e.translate(t.left,t.top)),Gt(0,0)),od=e=>{const t=H(e,ed);return td(t)},nd=Zc.screen,rd=Zc.absolute,sd=(e,t,o)=>{const n=Ze(e.element),r=Ho(n),s=((e,t,o)=>{const n=tt(o.root).dom;return D.from(n.frameElement).map(Ie.fromDom).filter((t=>{const o=Ze(t),n=Ze(e.element);return Ye(o,n)})).map(qt)})(e,0,o).getOr(r);return rd(s,r.left,r.top)},ad=(e,t,o,n)=>{const r=nd(Gt(e,t));return D.some(((e,t,o)=>({point:e,width:t,height:o}))(r,o,n))},id=(e,t,o,n,r)=>e.map((e=>{const s=[t,e.point],a=(i=()=>od(s),l=()=>od(s),c=()=>(e=>{const t=H(e,Qc);return td(t)})(s),n.fold(i,l,c));var i,l,c;const d=((e,t,o,n)=>({x:e,y:t,width:o,height:n}))(a.left,a.top,e.width,e.height),u=o.showAbove?Rl():Vl(),m=o.showAbove?Nl():zl(),g=Kc(r,o,u,m,u,m,D.none());return Uc({anchorBox:d,bubble:o.bubble.getOr(Pc()),overrides:o.overrides,layouts:g})}));var ld=[cr("node"),cr("root"),vr("bubble"),Xc(),_r("overrides",{}),_r("showAbove",!1),ol("placement",((e,t,o)=>{const n=sd(e,0,t);return t.node.filter(vt).bind((r=>{const s=r.dom.getBoundingClientRect(),a=ad(s.left,s.top,s.width,s.height),i=t.node.getOr(e.element);return id(a,n,t,o,i)}))}))];const cd=(e,t,o,n)=>({start:e,soffset:t,finish:o,foffset:n}),dd=Nr([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),ud=(dd.before,dd.on,dd.after,e=>e.fold(w,w,w)),md=Nr([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),gd={domRange:md.domRange,relative:md.relative,exact:md.exact,exactFromRange:e=>md.exact(e.start,e.soffset,e.finish,e.foffset),getWin:e=>{const t=(e=>e.match({domRange:e=>Ie.fromDom(e.startContainer),relative:(e,t)=>ud(e),exact:(e,t,o,n)=>e}))(e);return tt(t)},range:cd},pd=(e,t,o)=>{const n=e.document.createRange();var r;return r=n,t.fold((e=>{r.setStartBefore(e.dom)}),((e,t)=>{r.setStart(e.dom,t)}),(e=>{r.setStartAfter(e.dom)})),((e,t)=>{t.fold((t=>{e.setEndBefore(t.dom)}),((t,o)=>{e.setEnd(t.dom,o)}),(t=>{e.setEndAfter(t.dom)}))})(n,o),n},hd=(e,t,o,n,r)=>{const s=e.document.createRange();return s.setStart(t.dom,o),s.setEnd(n.dom,r),s},fd=e=>({left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}),bd=Nr([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),vd=(e,t,o)=>t(Ie.fromDom(o.startContainer),o.startOffset,Ie.fromDom(o.endContainer),o.endOffset),yd=(e,t)=>{const o=((e,t)=>t.match({domRange:e=>({ltr:x(e),rtl:D.none}),relative:(t,o)=>({ltr:Zt((()=>pd(e,t,o))),rtl:Zt((()=>D.some(pd(e,o,t))))}),exact:(t,o,n,r)=>({ltr:Zt((()=>hd(e,t,o,n,r))),rtl:Zt((()=>D.some(hd(e,n,r,t,o))))})}))(e,t);return((e,t)=>{const o=t.ltr();if(o.collapsed)return t.rtl().filter((e=>!1===e.collapsed)).map((e=>bd.rtl(Ie.fromDom(e.endContainer),e.endOffset,Ie.fromDom(e.startContainer),e.startOffset))).getOrThunk((()=>vd(0,bd.ltr,o)));return vd(0,bd.ltr,o)})(0,o)},xd=(e,t)=>yd(e,t).match({ltr:(t,o,n,r)=>{const s=e.document.createRange();return s.setStart(t.dom,o),s.setEnd(n.dom,r),s},rtl:(t,o,n,r)=>{const s=e.document.createRange();return s.setStart(n.dom,r),s.setEnd(t.dom,o),s}});bd.ltr,bd.rtl;const wd=(e,t,o)=>U(((e,t)=>{const o=p(t)?t:T;let n=e.dom;const r=[];for(;null!==n.parentNode&&void 0!==n.parentNode;){const e=n.parentNode,t=Ie.fromDom(e);if(r.push(t),!0===o(t))break;n=e}return r})(e,o),t),Sd=(e,t)=>((e,t)=>{const o=void 0===t?document:t.dom;return Ke(o)?[]:H(o.querySelectorAll(e),Ie.fromDom)})(t,e),kd=(e,t,o,n)=>{const r=((e,t,o,n)=>{const r=Ze(e).dom.createRange();return r.setStart(e.dom,t),r.setEnd(o.dom,n),r})(e,t,o,n),s=Ye(e,o)&&t===n;return r.collapsed&&!s},Od=e=>{if(e.rangeCount>0){const t=e.getRangeAt(0),o=e.getRangeAt(e.rangeCount-1);return D.some(cd(Ie.fromDom(t.startContainer),t.startOffset,Ie.fromDom(o.endContainer),o.endOffset))}return D.none()},Cd=e=>{if(null===e.anchorNode||null===e.focusNode)return Od(e);{const t=Ie.fromDom(e.anchorNode),o=Ie.fromDom(e.focusNode);return kd(t,e.anchorOffset,o,e.focusOffset)?D.some(cd(t,e.anchorOffset,o,e.focusOffset)):Od(e)}},_d=e=>(e=>D.from(e.getSelection()))(e).filter((e=>e.rangeCount>0)).bind(Cd),Td=(e,t)=>(e=>{const t=e.getClientRects(),o=t.length>0?t[0]:e.getBoundingClientRect();return o.width>0||o.height>0?D.some(o).map(fd):D.none()})(xd(e,t)),Ed=(e,t)=>(e=>{const t=e.getBoundingClientRect();return t.width>0||t.height>0?D.some(t).map(fd):D.none()})(xd(e,t)),Dd=((e,t)=>{const o=t=>e(t)?D.from(t.dom.nodeValue):D.none();return{get:n=>{if(!e(n))throw new Error("Can only get "+t+" value of a "+t+" node");return o(n).getOr("")},getOption:o,set:(o,n)=>{if(!e(o))throw new Error("Can only set raw "+t+" value of a "+t+" node");o.dom.nodeValue=n}}})(je,"text"),Ad=(e,t)=>({element:e,offset:t}),Md=(e,t)=>{const o=st(e);if(0===o.length)return Ad(e,t);if(t<o.length)return Ad(o[t],0);{const e=o[o.length-1],t=je(e)?(e=>Dd.get(e))(e).length:st(e).length;return Ad(e,t)}},Bd=(e,t)=>je(e)?Ad(e,t):Md(e,t),Fd=(e,t)=>t.getSelection.getOrThunk((()=>()=>_d(e)))().map((e=>{const t=Bd(e.start,e.soffset),o=Bd(e.finish,e.foffset);return gd.range(t.element,t.offset,o.element,o.offset)}));var Id=[vr("getSelection"),cr("root"),vr("bubble"),Xc(),_r("overrides",{}),_r("showAbove",!1),ol("placement",((e,t,o)=>{const n=tt(t.root).dom,r=sd(e,0,t),s=Fd(n,t).bind((e=>{const t=Ed(n,gd.exactFromRange(e)).orThunk((()=>{const t=Ie.fromText("\ufeff");Bo(e.start,t);const o=Td(n,gd.exact(t,0,t,1));return zo(t),o}));return t.bind((e=>ad(e.left,e.top,e.width,e.height)))})),a=Fd(n,t).bind((e=>We(e.start)?D.some(e.start):nt(e.start))).getOr(e.element);return id(s,r,t,o,a)}))];const Rd="link-layout",Nd=e=>e.x+e.width,Vd=(e,t)=>e.x-t.width,zd=(e,t)=>e.y-t.height+e.height,Hd=e=>e.y,Ld=(e,t,o)=>sl(Nd(e),Hd(e),o.southeast(),il(),"southeast",bl(e,{left:0,top:2}),Rd),Pd=(e,t,o)=>sl(Vd(e,t),Hd(e),o.southwest(),ll(),"southwest",bl(e,{right:1,top:2}),Rd),Ud=(e,t,o)=>sl(Nd(e),zd(e,t),o.northeast(),cl(),"northeast",bl(e,{left:0,bottom:3}),Rd),Wd=(e,t,o)=>sl(Vd(e,t),zd(e,t),o.northwest(),dl(),"northwest",bl(e,{right:1,bottom:3}),Rd),jd=()=>[Ld,Pd,Ud,Wd],Gd=()=>[Pd,Ld,Wd,Ud];var $d=[cr("item"),Xc(),_r("overrides",{}),ol("placement",((e,t,o)=>{const n=dc(o,t.item.element),r=Kc(e.element,t,jd(),Gd(),jd(),Gd(),D.none());return D.some(Uc({anchorBox:n,bubble:Pc(),overrides:t.overrides,layouts:r}))}))],qd=rr("type",{selection:Id,node:ld,hotspot:Yc,submenu:$d,makeshift:Jc});const Xd=[br("classes",Gn),Ar("mode","all",["all","layout","placement"])],Kd=[_r("useFixed",T),vr("getBounds")],Yd=[dr("anchor",qd),Cr("transition",Xd)],Jd=(e,t,o,n,r,s)=>((e,t,o,n,r,s,a,i)=>{const l=Vc(a,"maxHeightFunction",Rc()),c=Vc(a,"maxWidthFunction",b),d=e.anchorBox,u=e.origin,m={bounds:uc(u,s),origin:u,preference:n,maxHeightFunction:l,maxWidthFunction:c,lastPlacement:r,transition:i};return zc(d,t,o,m)})(hc(t.anchorBox,e),n.element,t.bubble,t.layouts,r,o,t.overrides,s),Zd=(e,t,o,n,r,s)=>{const a=or("placement.info",Vn(Yd),r),i=a.anchor,l=n.element,c=o.get(n.uid);rc((()=>{At(l,"position","fixed");const r=Rt(l,"visibility");At(l,"visibility","hidden");const d=t.useFixed()?(()=>{const e=document.documentElement;return pc(0,0,e.clientWidth,e.clientHeight)})():(e=>{const t=qt(e.element),o=e.element.dom.getBoundingClientRect();return gc(t.left,t.top,o.width,o.height)})(e);i.placement(e,i,d).each((e=>{const r=s.orThunk((()=>t.getBounds.map(_))),i=Jd(d,e,r,n,c,a.transition);o.set(n.uid,i)})),r.fold((()=>{zt(l,"visibility")}),(e=>{At(l,"visibility",e)})),Rt(l,"left").isNone()&&Rt(l,"top").isNone()&&Rt(l,"right").isNone()&&Rt(l,"bottom").isNone()&&xe(Rt(l,"position"),"fixed")&&zt(l,"position")}),l)};var Qd=Object.freeze({__proto__:null,position:(e,t,o,n,r)=>{const s=D.none();Zd(e,t,o,n,r,s)},positionWithinBounds:Zd,getMode:(e,t,o)=>t.useFixed()?"fixed":"absolute",reset:(e,t,o,n)=>{const r=n.element;L(["position","left","right","top","bottom"],(e=>zt(r,e))),(e=>{Tt(e,fc)})(r),o.clear(n.uid)}});const eu=ql({fields:Kd,name:"positioning",active:Zl,apis:Qd,state:Object.freeze({__proto__:null,init:()=>{let e={};return Na({readState:()=>e,clear:t=>{g(t)?delete e[t]:e={}},set:(t,o)=>{e[t]=o},get:t=>be(e,t)})}})}),tu=e=>e.getSystem().isConnected(),ou=e=>{Ws(e,Fs());const t=e.components();L(t,ou)},nu=e=>{const t=e.components();L(t,nu),Ws(e,Bs())},ru=(e,t)=>{e.getSystem().addToWorld(t),vt(e.element)&&nu(t)},su=e=>{ou(e),e.getSystem().removeFromWorld(e)},au=(e,t)=>{Ro(e.element,t.element)},iu=(e,t,o)=>{const n=e.components();(e=>{L(e.components(),(e=>zo(e.element))),Vo(e.element),e.syncComponents()})(e);const r=o(t),s=J(n,r);L(s,(t=>{ou(t),e.getSystem().removeFromWorld(t)})),L(r,(t=>{tu(t)?au(e,t):(e.getSystem().addToWorld(t),au(e,t),vt(e.element)&&nu(t))})),e.syncComponents()},lu=(e,t)=>{cu(e,t,Ro)},cu=(e,t,o)=>{e.getSystem().addToWorld(t),o(e.element,t.element),vt(e.element)&&nu(t),e.syncComponents()},du=e=>{ou(e),zo(e.element),e.getSystem().removeFromWorld(e)},uu=e=>{const t=ot(e.element).bind((t=>e.getSystem().getByDom(t).toOptional()));du(e),t.each((e=>{e.syncComponents()}))},mu=e=>{const t=e.components();L(t,du),Vo(e.element),e.syncComponents()},gu=(e,t)=>{hu(e,t,Ro)},pu=(e,t)=>{hu(e,t,Fo)},hu=(e,t,o)=>{o(e,t.element);const n=st(t.element);L(n,(e=>{t.getByDom(e).each(nu)}))},fu=e=>{const t=st(e.element);L(t,(t=>{e.getByDom(t).each(ou)})),zo(e.element)},bu=(e,t,o,n)=>{o.get().each((t=>{mu(e)}));const r=t.getAttachPoint(e);lu(r,e);const s=e.getSystem().build(n);return lu(e,s),o.set(s),s},vu=(e,t,o,n)=>{const r=bu(e,t,o,n);return t.onOpen(e,r),r},yu=(e,t,o)=>{o.get().each((n=>{mu(e),uu(e),t.onClose(e,n),o.clear()}))},xu=(e,t,o)=>o.isOpen(),wu=(e,t,o)=>{const n=t.getAttachPoint(e);At(e.element,"position",eu.getMode(n)),((e,t,o,n)=>{Rt(e.element,t).fold((()=>{Tt(e.element,o)}),(t=>{St(e.element,o,t)})),At(e.element,t,n)})(e,"visibility",t.cloakVisibilityAttr,"hidden")},Su=(e,t,o)=>{(e=>N(["top","left","right","bottom"],(t=>Rt(e,t).isSome())))(e.element)||zt(e.element,"position"),((e,t,o)=>{Ct(e.element,o).fold((()=>zt(e.element,t)),(o=>At(e.element,t,o)))})(e,"visibility",t.cloakVisibilityAttr)};var ku=Object.freeze({__proto__:null,cloak:wu,decloak:Su,open:vu,openWhileCloaked:(e,t,o,n,r)=>{wu(e,t),vu(e,t,o,n),r(),Su(e,t)},close:yu,isOpen:xu,isPartOf:(e,t,o,n)=>xu(0,0,o)&&o.get().exists((o=>t.isPartOf(e,o,n))),getState:(e,t,o)=>o.get(),setContent:(e,t,o,n)=>o.get().map((()=>bu(e,t,o,n)))});var Ou=Object.freeze({__proto__:null,events:(e,t)=>Ks([Zs(Cs(),((o,n)=>{yu(o,e,t)}))])}),Cu=[Zi("onOpen"),Zi("onClose"),cr("isPartOf"),cr("getAttachPoint"),_r("cloakVisibilityAttr","data-precloak-visibility")];var _u=Object.freeze({__proto__:null,init:()=>{const e=Sc(),t=x("not-implemented");return Na({readState:t,isOpen:e.isSet,clear:e.clear,set:e.set,get:e.get})}});const Tu=ql({fields:Cu,name:"sandboxing",active:Ou,apis:ku,state:_u}),Eu=x("dismiss.popups"),Du=x("reposition.popups"),Au=x("mouse.released"),Mu=Nn([_r("isExtraPart",T),Cr("fireEventInstead",[_r("event",Is())])]),Bu=e=>{const t=or("Dismissal",Mu,e);return{[Eu()]:{schema:Nn([cr("target")]),onReceive:(e,o)=>{if(Tu.isOpen(e)){Tu.isPartOf(e,o.target)||t.isExtraPart(e,o.target)||t.fireEventInstead.fold((()=>Tu.close(e)),(t=>Ws(e,t.event)))}}}}},Fu=Nn([Cr("fireEventInstead",[_r("event",Rs())]),pr("doReposition")]),Iu=e=>{const t=or("Reposition",Fu,e);return{[Du()]:{onReceive:e=>{Tu.isOpen(e)&&t.fireEventInstead.fold((()=>t.doReposition(e)),(t=>Ws(e,t.event)))}}}},Ru=(e,t,o)=>{t.store.manager.onLoad(e,t,o)},Nu=(e,t,o)=>{t.store.manager.onUnload(e,t,o)};var Vu=Object.freeze({__proto__:null,onLoad:Ru,onUnload:Nu,setValue:(e,t,o,n)=>{t.store.manager.setValue(e,t,o,n)},getValue:(e,t,o)=>t.store.manager.getValue(e,t,o),getState:(e,t,o)=>o});var zu=Object.freeze({__proto__:null,events:(e,t)=>{const o=e.resetOnDom?[aa(((o,n)=>{Ru(o,e,t)})),ia(((o,n)=>{Nu(o,e,t)}))]:[Pl(e,t,Ru)];return Ks(o)}});const Hu=()=>{const e=Rr(null);return Na({set:e.set,get:e.get,isNotSet:()=>null===e.get(),clear:()=>{e.set(null)},readState:()=>({mode:"memory",value:e.get()})})},Lu=()=>{const e=Rr({}),t=Rr({});return Na({readState:()=>({mode:"dataset",dataByValue:e.get(),dataByText:t.get()}),lookup:o=>be(e.get(),o).orThunk((()=>be(t.get(),o))),update:o=>{const n=e.get(),r=t.get(),s={},a={};L(o,(e=>{s[e.value]=e,be(e,"meta").each((t=>{be(t,"text").each((t=>{a[t]=e}))}))})),e.set({...n,...s}),t.set({...r,...a})},clear:()=>{e.set({}),t.set({})}})};var Pu=Object.freeze({__proto__:null,memory:Hu,dataset:Lu,manual:()=>Na({readState:b}),init:e=>e.store.manager.state(e)});const Uu=(e,t,o,n)=>{const r=t.store;o.update([n]),r.setValue(e,n),t.onSetValue(e,n)};var Wu=[vr("initialValue"),cr("getFallbackEntry"),cr("getDataKey"),cr("setValue"),ol("manager",{setValue:Uu,getValue:(e,t,o)=>{const n=t.store,r=n.getDataKey(e);return o.lookup(r).getOrThunk((()=>n.getFallbackEntry(r)))},onLoad:(e,t,o)=>{t.store.initialValue.each((n=>{Uu(e,t,o,n)}))},onUnload:(e,t,o)=>{o.clear()},state:Lu})];var ju=[cr("getValue"),_r("setValue",b),vr("initialValue"),ol("manager",{setValue:(e,t,o,n)=>{t.store.setValue(e,n),t.onSetValue(e,n)},getValue:(e,t,o)=>t.store.getValue(e),onLoad:(e,t,o)=>{t.store.initialValue.each((o=>{t.store.setValue(e,o)}))},onUnload:b,state:Ra.init})];var Gu=[vr("initialValue"),ol("manager",{setValue:(e,t,o,n)=>{o.set(n),t.onSetValue(e,n)},getValue:(e,t,o)=>o.get(),onLoad:(e,t,o)=>{t.store.initialValue.each((e=>{o.isNotSet()&&o.set(e)}))},onUnload:(e,t,o)=>{o.clear()},state:Hu})],$u=[Tr("store",{mode:"memory"},rr("mode",{memory:Gu,manual:ju,dataset:Wu})),Zi("onSetValue"),_r("resetOnDom",!1)];const qu=ql({fields:$u,name:"representing",active:zu,apis:Vu,extra:{setValueFrom:(e,t)=>{const o=qu.getValue(t);qu.setValue(e,o)}},state:Pu}),Xu=(e,t)=>Ir(e,{},H(t,(t=>{return o=t.name(),n="Cannot configure "+t.name()+" for "+e,ar(o,o,{tag:"option",process:{}},Dn((e=>un("The field: "+o+" is forbidden. "+n))));var o,n})).concat([ir("dump",w)])),Ku=e=>e.dump,Yu=(e,t)=>({...Gl(t),...e.dump}),Ju=Xu,Zu=Yu,Qu="placeholder",em=Nr([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),tm=e=>ve(e,"uiType"),om=(e,t,o,n)=>tm(o)&&o.uiType===Qu?((e,t,o,n)=>e.exists((e=>e!==o.owner))?em.single(!0,x(o)):be(n,o.name).fold((()=>{throw new Error("Unknown placeholder component: "+o.name+"\nKnown: ["+ae(n)+"]\nNamespace: "+e.getOr("none")+"\nSpec: "+JSON.stringify(o,null,2))}),(e=>e.replace())))(e,0,o,n):em.single(!1,x(o)),nm=(e,t,o,n)=>om(e,0,o,n).fold(((r,s)=>{const a=tm(o)?s(t,o.config,o.validated):s(t),i=be(a,"components").getOr([]),l=X(i,(o=>nm(e,t,o,n)));return[{...a,components:l}]}),((e,n)=>{if(tm(o)){const e=n(t,o.config,o.validated);return o.validated.preprocess.getOr(w)(e)}return n(t)})),rm=(e,t,o,n)=>{const r=ce(n,((e,t)=>((e,t)=>{let o=!1;return{name:x(e),required:()=>t.fold(((e,t)=>e),((e,t)=>e)),used:()=>o,replace:()=>{if(o)throw new Error("Trying to use the same placeholder more than once: "+e);return o=!0,t}}})(t,e))),s=((e,t,o,n)=>X(o,(o=>nm(e,t,o,n))))(e,t,o,r);return le(r,(o=>{if(!1===o.used()&&o.required())throw new Error("Placeholder: "+o.name()+" was not found in components list\nNamespace: "+e.getOr("none")+"\nComponents: "+JSON.stringify(t.components,null,2))})),s},sm=em.single,am=em.multiple,im=x(Qu),lm=Nr([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),cm=_r("factory",{sketch:w}),dm=_r("schema",[]),um=cr("name"),mm=ar("pname","pname",Sn((e=>"<alloy."+va(e.name)+">")),Un()),gm=ir("schema",(()=>[vr("preprocess")])),pm=_r("defaults",x({})),hm=_r("overrides",x({})),fm=Vn([cm,dm,um,mm,pm,hm]),bm=Vn([cm,dm,um,pm,hm]),vm=Vn([cm,dm,um,mm,pm,hm]),ym=Vn([cm,gm,um,cr("unit"),mm,pm,hm]),xm=e=>e.fold(D.some,D.none,D.some,D.some),wm=e=>{const t=e=>e.name;return e.fold(t,t,t,t)},Sm=(e,t)=>o=>{const n=or("Converting part type",t,o);return e(n)},km=Sm(lm.required,fm),Om=Sm(lm.external,bm),Cm=Sm(lm.optional,vm),_m=Sm(lm.group,ym),Tm=x("entirety");var Em=Object.freeze({__proto__:null,required:km,external:Om,optional:Cm,group:_m,asNamedPart:xm,name:wm,asCommon:e=>e.fold(w,w,w,w),original:Tm});const Dm=(e,t,o,n)=>xn(t.defaults(e,o,n),o,{uid:e.partUids[t.name]},t.overrides(e,o,n)),Am=(e,t)=>{const o={};return L(t,(t=>{xm(t).each((t=>{const n=Mm(e,t.pname);o[t.name]=o=>{const r=or("Part: "+t.name+" in "+e,Vn(t.schema),o);return{...n,config:o,validated:r}}}))})),o},Mm=(e,t)=>({uiType:im(),owner:e,name:t}),Bm=(e,t,o)=>({uiType:im(),owner:e,name:t,config:o,validated:{}}),Fm=e=>X(e,(e=>e.fold(D.none,D.some,D.none,D.none).map((e=>hr(e.name,e.schema.concat([nl(Tm())])))).toArray())),Im=e=>H(e,wm),Rm=(e,t,o)=>((e,t,o)=>{const n={},r={};return L(o,(e=>{e.fold((e=>{n[e.pname]=sm(!0,((t,o,n)=>e.factory.sketch(Dm(t,e,o,n))))}),(e=>{const o=t.parts[e.name];r[e.name]=x(e.factory.sketch(Dm(t,e,o[Tm()]),o))}),(e=>{n[e.pname]=sm(!1,((t,o,n)=>e.factory.sketch(Dm(t,e,o,n))))}),(e=>{n[e.pname]=am(!0,((t,o,n)=>{const r=t[e.name];return H(r,(o=>e.factory.sketch(xn(e.defaults(t,o,n),o,e.overrides(t,o)))))}))}))})),{internals:x(n),externals:x(r)}})(0,t,o),Nm=(e,t,o)=>rm(D.some(e),t,t.components,o),Vm=(e,t,o)=>{const n=t.partUids[o];return e.getSystem().getByUid(n).toOptional()},zm=(e,t,o)=>Vm(e,t,o).getOrDie("Could not find part: "+o),Hm=(e,t,o)=>{const n={},r=t.partUids,s=e.getSystem();return L(o,(e=>{n[e]=x(s.getByUid(r[e]))})),n},Lm=(e,t)=>{const o=e.getSystem();return ce(t.partUids,((e,t)=>x(o.getByUid(e))))},Pm=e=>ae(e.partUids),Um=(e,t,o)=>{const n={},r=t.partUids,s=e.getSystem();return L(o,(e=>{n[e]=x(s.getByUid(r[e]).getOrDie())})),n},Wm=(e,t)=>{const o=Im(t);return Hr(H(o,(t=>({key:t,value:e+"-"+t}))))},jm=e=>ar("partUids","partUids",On((t=>Wm(t.uid,e))),Un());var Gm=Object.freeze({__proto__:null,generate:Am,generateOne:Bm,schemas:Fm,names:Im,substitutes:Rm,components:Nm,defaultUids:Wm,defaultUidsSchema:jm,getAllParts:Lm,getAllPartNames:Pm,getPart:Vm,getPartOrDie:zm,getParts:Hm,getPartsOrDie:Um});const $m=(e,t,o,n,r)=>{const s=((e,t)=>(e.length>0?[hr("parts",e)]:[]).concat([cr("uid"),_r("dom",{}),_r("components",[]),nl("originalSpec"),_r("debug.sketcher",{})]).concat(t))(n,r);return or(e+" [SpecSchema]",Nn(s.concat(t)),o)},qm=(e,t,o,n,r)=>{const s=Xm(r),a=Fm(o),i=jm(o),l=$m(e,t,s,a,[i]),c=Rm(0,l,o);return n(l,Nm(e,l,c.internals()),s,c.externals())},Xm=e=>(e=>ve(e,"uid"))(e)?e:{...e,uid:Ca("uid")},Km=Nn([cr("name"),cr("factory"),cr("configFields"),_r("apis",{}),_r("extraApis",{})]),Ym=Nn([cr("name"),cr("factory"),cr("configFields"),cr("partFields"),_r("apis",{}),_r("extraApis",{})]),Jm=e=>{const t=or("Sketcher for "+e.name,Km,e),o=ce(t.apis,Ia),n=ce(t.extraApis,((e,t)=>Aa(e,t)));return{name:t.name,configFields:t.configFields,sketch:e=>((e,t,o,n)=>{const r=Xm(n);return o($m(e,t,r,[],[]),r)})(t.name,t.configFields,t.factory,e),...o,...n}},Zm=e=>{const t=or("Sketcher for "+e.name,Ym,e),o=Am(t.name,t.partFields),n=ce(t.apis,Ia),r=ce(t.extraApis,((e,t)=>Aa(e,t)));return{name:t.name,partFields:t.partFields,configFields:t.configFields,sketch:e=>qm(t.name,t.configFields,t.partFields,t.factory,e),parts:o,...n,...r}},Qm=e=>qe("input")(e)&&"radio"!==Ot(e,"type")||qe("textarea")(e);var eg=Object.freeze({__proto__:null,getCurrent:(e,t,o)=>t.find(e)});const tg=[cr("find")],og=ql({fields:tg,name:"composing",apis:eg}),ng=["input","button","textarea","select"],rg=(e,t,o)=>{(t.disabled()?dg:ug)(e,t)},sg=(e,t)=>!0===t.useNative&&R(ng,Le(e.element)),ag=e=>{St(e.element,"disabled","disabled")},ig=e=>{Tt(e.element,"disabled")},lg=e=>{St(e.element,"aria-disabled","true")},cg=e=>{St(e.element,"aria-disabled","false")},dg=(e,t,o)=>{t.disableClass.each((t=>{ei(e.element,t)}));(sg(e,t)?ag:lg)(e),t.onDisabled(e)},ug=(e,t,o)=>{t.disableClass.each((t=>{ti(e.element,t)}));(sg(e,t)?ig:cg)(e),t.onEnabled(e)},mg=(e,t)=>sg(e,t)?(e=>_t(e.element,"disabled"))(e):(e=>"true"===Ot(e.element,"aria-disabled"))(e);var gg=Object.freeze({__proto__:null,enable:ug,disable:dg,isDisabled:mg,onLoad:rg,set:(e,t,o,n)=>{(n?dg:ug)(e,t)}});var pg=Object.freeze({__proto__:null,exhibit:(e,t)=>za({classes:t.disabled()?t.disableClass.toArray():[]}),events:(e,t)=>Ks([Ys(ws(),((t,o)=>mg(t,e))),Pl(e,t,rg)])}),hg=[Br("disabled",T),_r("useNative",!0),vr("disableClass"),Zi("onDisabled"),Zi("onEnabled")];const fg=ql({fields:hg,name:"disabling",active:pg,apis:gg}),bg=(e,t,o,n)=>{const r=Sd(e.element,"."+t.highlightClass);L(r,(o=>{N(n,(e=>Ye(e.element,o)))||(ti(o,t.highlightClass),e.getSystem().getByDom(o).each((o=>{t.onDehighlight(e,o),Ws(o,Us())})))}))},vg=(e,t,o,n)=>{bg(e,t,0,[n]),yg(e,t,o,n)||(ei(n.element,t.highlightClass),t.onHighlight(e,n),Ws(n,Ps()))},yg=(e,t,o,n)=>oi(n.element,t.highlightClass),xg=(e,t,o,n)=>{const r=Sd(e.element,"."+t.itemClass);return D.from(r[n]).fold((()=>tn.error(new Error("No element found with index "+n))),e.getSystem().getByDom)},wg=(e,t,o)=>Bi(e.element,"."+t.itemClass).bind((t=>e.getSystem().getByDom(t).toOptional())),Sg=(e,t,o)=>{const n=Sd(e.element,"."+t.itemClass);return(n.length>0?D.some(n[n.length-1]):D.none()).bind((t=>e.getSystem().getByDom(t).toOptional()))},kg=(e,t,o,n)=>{const r=Sd(e.element,"."+t.itemClass),s=$(r,(e=>oi(e,t.highlightClass)));return s.bind((t=>{const o=hl(t,n,0,r.length-1);return e.getSystem().getByDom(r[o]).toOptional()}))},Og=(e,t,o)=>{const n=Sd(e.element,"."+t.itemClass);return we(H(n,(t=>e.getSystem().getByDom(t).toOptional())))};var Cg=Object.freeze({__proto__:null,dehighlightAll:(e,t,o)=>bg(e,t,0,[]),dehighlight:(e,t,o,n)=>{yg(e,t,o,n)&&(ti(n.element,t.highlightClass),t.onDehighlight(e,n),Ws(n,Us()))},highlight:vg,highlightFirst:(e,t,o)=>{wg(e,t).each((n=>{vg(e,t,o,n)}))},highlightLast:(e,t,o)=>{Sg(e,t).each((n=>{vg(e,t,o,n)}))},highlightAt:(e,t,o,n)=>{xg(e,t,o,n).fold((e=>{throw e}),(n=>{vg(e,t,o,n)}))},highlightBy:(e,t,o,n)=>{const r=Og(e,t);G(r,n).each((n=>{vg(e,t,o,n)}))},isHighlighted:yg,getHighlighted:(e,t,o)=>Bi(e.element,"."+t.highlightClass).bind((t=>e.getSystem().getByDom(t).toOptional())),getFirst:wg,getLast:Sg,getPrevious:(e,t,o)=>kg(e,t,0,-1),getNext:(e,t,o)=>kg(e,t,0,1),getCandidates:Og}),_g=[cr("highlightClass"),cr("itemClass"),Zi("onHighlight"),Zi("onDehighlight")];const Tg=ql({fields:_g,name:"highlighting",apis:Cg}),Eg=[8],Dg=[9],Ag=[13],Mg=[27],Bg=[32],Fg=[37],Ig=[38],Rg=[39],Ng=[40],Vg=(e,t,o)=>{const n=Y(e.slice(0,t)),r=Y(e.slice(t+1));return G(n.concat(r),o)},zg=(e,t,o)=>{const n=Y(e.slice(0,t));return G(n,o)},Hg=(e,t,o)=>{const n=e.slice(0,t),r=e.slice(t+1);return G(r.concat(n),o)},Lg=(e,t,o)=>{const n=e.slice(t+1);return G(n,o)},Pg=e=>t=>{const o=t.raw;return R(e,o.which)},Ug=e=>t=>K(e,(e=>e(t))),Wg=e=>!0===e.raw.shiftKey,jg=e=>!0===e.raw.ctrlKey,Gg=O(Wg),$g=(e,t)=>({matches:e,classification:t}),qg=(e,t,o)=>{t.exists((e=>o.exists((t=>Ye(t,e)))))||js(e,Ns(),{prevFocus:t,newFocus:o})},Xg=()=>{const e=e=>nc(e.element);return{get:e,set:(t,o)=>{const n=e(t);t.getSystem().triggerFocus(o,t.element);const r=e(t);qg(t,n,r)}}},Kg=()=>{const e=e=>Tg.getHighlighted(e).map((e=>e.element));return{get:e,set:(t,o)=>{const n=e(t);t.getSystem().getByDom(o).fold(b,(e=>{Tg.highlight(t,e)}));const r=e(t);qg(t,n,r)}}};var Yg;!function(e){e.OnFocusMode="onFocus",e.OnEnterOrSpaceMode="onEnterOrSpace",e.OnApiMode="onApi"}(Yg||(Yg={}));const Jg=(e,t,o,n,r)=>{const s=(e,t,o,n,r)=>((e,t)=>{const o=G(e,(e=>e.matches(t)));return o.map((e=>e.classification))})(o(e,t,n,r),t.event).bind((o=>o(e,t,n,r))),a={schema:()=>e.concat([_r("focusManager",Xg()),Tr("focusInside","onFocus",Zn((e=>R(["onFocus","onEnterOrSpace","onApi"],e)?tn.value(e):tn.error("Invalid value for focusInside")))),ol("handler",a),ol("state",t),ol("sendFocusIn",r)]),processKey:s,toEvents:(e,t)=>{const a=e.focusInside!==Yg.OnFocusMode?D.none():r(e).map((o=>Zs(bs(),((n,r)=>{o(n,e,t),r.stop()})))),i=[Zs(as(),((n,a)=>{s(n,a,o,e,t).fold((()=>{((o,n)=>{const s=Pg(Bg.concat(Ag))(n.event);e.focusInside===Yg.OnEnterOrSpaceMode&&s&&jr(o,n)&&r(e).each((r=>{r(o,e,t),n.stop()}))})(n,a)}),(e=>{a.stop()}))})),Zs(is(),((o,r)=>{s(o,r,n,e,t).each((e=>{r.stop()}))}))];return Ks(a.toArray().concat(i))}};return a},Zg=e=>{const t=[vr("onEscape"),vr("onEnter"),_r("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),_r("firstTabstop",0),_r("useTabstopAt",E),vr("visibilitySelector")].concat([e]),o=(e,t)=>{const o=e.visibilitySelector.bind((e=>Fi(t,e))).getOr(t);return Ut(o)>0},n=(e,t,n)=>{((e,t)=>{const n=Sd(e.element,t.selector),r=U(n,(e=>o(t,e)));return D.from(r[t.firstTabstop])})(e,t).each((o=>{t.focusManager.set(e,o)}))},r=(e,t,n,r,s)=>s(t,n,(e=>((e,t)=>o(e,t)&&e.useTabstopAt(t))(r,e))).fold((()=>r.cyclic?D.some(!0):D.none()),(t=>(r.focusManager.set(e,t),D.some(!0)))),s=(e,t,o,n)=>{const s=Sd(e.element,o.selector);return((e,t)=>t.focusManager.get(e).bind((e=>Fi(e,t.selector))))(e,o).bind((t=>$(s,k(Ye,t)).bind((t=>r(e,s,t,o,n)))))},a=x([$g(Ug([Wg,Pg(Dg)]),((e,t,o)=>{const n=o.cyclic?Vg:zg;return s(e,0,o,n)})),$g(Pg(Dg),((e,t,o)=>{const n=o.cyclic?Hg:Lg;return s(e,0,o,n)})),$g(Ug([Gg,Pg(Ag)]),((e,t,o)=>o.onEnter.bind((o=>o(e,t)))))]),i=x([$g(Pg(Mg),((e,t,o)=>o.onEscape.bind((o=>o(e,t)))))]);return Jg(t,Ra.init,a,i,(()=>D.some(n)))};var Qg=Zg(ir("cyclic",T)),ep=Zg(ir("cyclic",E));const tp=(e,t,o)=>Qm(o)&&Pg(Bg)(t.event)?D.none():((e,t,o)=>($s(e,o,ws()),D.some(!0)))(e,0,o),op=(e,t)=>D.some(!0),np=[_r("execute",tp),_r("useSpace",!1),_r("useEnter",!0),_r("useControlEnter",!1),_r("useDown",!1)],rp=(e,t,o)=>o.execute(e,t,e.element);var sp=Jg(np,Ra.init,((e,t,o,n)=>{const r=o.useSpace&&!Qm(e.element)?Bg:[],s=o.useEnter?Ag:[],a=o.useDown?Ng:[],i=r.concat(s).concat(a);return[$g(Pg(i),rp)].concat(o.useControlEnter?[$g(Ug([jg,Pg(Ag)]),rp)]:[])}),((e,t,o,n)=>o.useSpace&&!Qm(e.element)?[$g(Pg(Bg),op)]:[]),(()=>D.none()));const ap=()=>{const e=Sc();return Na({readState:()=>e.get().map((e=>({numRows:String(e.numRows),numColumns:String(e.numColumns)}))).getOr({numRows:"?",numColumns:"?"}),setGridSize:(t,o)=>{e.set({numRows:t,numColumns:o})},getNumRows:()=>e.get().map((e=>e.numRows)),getNumColumns:()=>e.get().map((e=>e.numColumns))})};var ip=Object.freeze({__proto__:null,flatgrid:ap,init:e=>e.state(e)});const lp=e=>(t,o,n,r)=>{const s=e(t.element);return mp(s,t,o,n,r)},cp=(e,t)=>{const o=Wc(e,t);return lp(o)},dp=(e,t)=>{const o=Wc(t,e);return lp(o)},up=e=>(t,o,n,r)=>mp(e,t,o,n,r),mp=(e,t,o,n,r)=>n.focusManager.get(t).bind((o=>e(t.element,o,n,r))).map((e=>(n.focusManager.set(t,e),!0))),gp=up,pp=up,hp=up,fp=e=>!(e=>e.offsetWidth<=0&&e.offsetHeight<=0)(e.dom),bp=(e,t,o)=>{const n=Sd(e,o);return((e,t)=>$(e,t).map((t=>({index:t,candidates:e}))))(U(n,fp),(e=>Ye(e,t)))},vp=(e,t)=>$(e,(e=>Ye(t,e))),yp=(e,t,o,n)=>n(Math.floor(t/o),t%o).bind((t=>{const n=t.row*o+t.column;return n>=0&&n<e.length?D.some(e[n]):D.none()})),xp=(e,t,o,n,r)=>yp(e,t,n,((t,s)=>{const a=t===o-1?e.length-t*n:n,i=hl(s,r,0,a-1);return D.some({row:t,column:i})})),wp=(e,t,o,n,r)=>yp(e,t,n,((t,s)=>{const a=hl(t,r,0,o-1),i=a===o-1?e.length-a*n:n,l=fl(s,0,i-1);return D.some({row:a,column:l})})),Sp=[cr("selector"),_r("execute",tp),Qi("onEscape"),_r("captureTab",!1),rl()],kp=(e,t,o)=>{Bi(e.element,t.selector).each((o=>{t.focusManager.set(e,o)}))},Op=e=>(t,o,n,r)=>bp(t,o,n.selector).bind((t=>e(t.candidates,t.index,r.getNumRows().getOr(n.initSize.numRows),r.getNumColumns().getOr(n.initSize.numColumns)))),Cp=(e,t,o)=>o.captureTab?D.some(!0):D.none(),_p=Op(((e,t,o,n)=>xp(e,t,o,n,-1))),Tp=Op(((e,t,o,n)=>xp(e,t,o,n,1))),Ep=Op(((e,t,o,n)=>wp(e,t,o,n,-1))),Dp=Op(((e,t,o,n)=>wp(e,t,o,n,1))),Ap=x([$g(Pg(Fg),cp(_p,Tp)),$g(Pg(Rg),dp(_p,Tp)),$g(Pg(Ig),gp(Ep)),$g(Pg(Ng),pp(Dp)),$g(Ug([Wg,Pg(Dg)]),Cp),$g(Ug([Gg,Pg(Dg)]),Cp),$g(Pg(Bg.concat(Ag)),((e,t,o,n)=>((e,t)=>t.focusManager.get(e).bind((e=>Fi(e,t.selector))))(e,o).bind((n=>o.execute(e,t,n)))))]),Mp=x([$g(Pg(Mg),((e,t,o)=>o.onEscape(e,t))),$g(Pg(Bg),op)]);var Bp=Jg(Sp,ap,Ap,Mp,(()=>D.some(kp)));const Fp=(e,t,o,n,r)=>{const s=(e,t,o)=>r(e,t,n,0,o.length-1,o[t],(t=>{return n=o[t],"button"===Le(n)&&"disabled"===Ot(n,"disabled")?s(e,t,o):D.from(o[t]);var n}));return bp(e,o,t).bind((e=>{const t=e.index,o=e.candidates;return s(t,t,o)}))},Ip=(e,t,o,n)=>Fp(e,t,o,n,((e,t,o,n,r,s,a)=>{const i=fl(t+o,n,r);return i===e?D.from(s):a(i)})),Rp=(e,t,o,n)=>Fp(e,t,o,n,((e,t,o,n,r,s,a)=>{const i=hl(t,o,n,r);return i===e?D.none():a(i)})),Np=[cr("selector"),_r("getInitial",D.none),_r("execute",tp),Qi("onEscape"),_r("executeOnMove",!1),_r("allowVertical",!0),_r("allowHorizontal",!0),_r("cycles",!0)],Vp=(e,t,o)=>((e,t)=>t.focusManager.get(e).bind((e=>Fi(e,t.selector))))(e,o).bind((n=>o.execute(e,t,n))),zp=(e,t,o)=>{t.getInitial(e).orThunk((()=>Bi(e.element,t.selector))).each((o=>{t.focusManager.set(e,o)}))},Hp=(e,t,o)=>(o.cycles?Rp:Ip)(e,o.selector,t,-1),Lp=(e,t,o)=>(o.cycles?Rp:Ip)(e,o.selector,t,1),Pp=e=>(t,o,n,r)=>e(t,o,n,r).bind((()=>n.executeOnMove?Vp(t,o,n):D.some(!0))),Up=x([$g(Pg(Bg),op),$g(Pg(Mg),((e,t,o)=>o.onEscape(e,t)))]);var Wp=Jg(Np,Ra.init,((e,t,o,n)=>{const r=[...o.allowHorizontal?Fg:[]].concat(o.allowVertical?Ig:[]),s=[...o.allowHorizontal?Rg:[]].concat(o.allowVertical?Ng:[]);return[$g(Pg(r),Pp(cp(Hp,Lp))),$g(Pg(s),Pp(dp(Hp,Lp))),$g(Pg(Ag),Vp),$g(Pg(Bg),Vp)]}),Up,(()=>D.some(zp)));const jp=(e,t,o)=>D.from(e[t]).bind((e=>D.from(e[o]).map((e=>({rowIndex:t,columnIndex:o,cell:e}))))),Gp=(e,t,o,n)=>{const r=e[t].length,s=hl(o,n,0,r-1);return jp(e,t,s)},$p=(e,t,o,n)=>{const r=hl(o,n,0,e.length-1),s=e[r].length,a=fl(t,0,s-1);return jp(e,r,a)},qp=(e,t,o,n)=>{const r=e[t].length,s=fl(o+n,0,r-1);return jp(e,t,s)},Xp=(e,t,o,n)=>{const r=fl(o+n,0,e.length-1),s=e[r].length,a=fl(t,0,s-1);return jp(e,r,a)},Kp=[hr("selectors",[cr("row"),cr("cell")]),_r("cycles",!0),_r("previousSelector",D.none),_r("execute",tp)],Yp=(e,t,o)=>{t.previousSelector(e).orThunk((()=>{const o=t.selectors;return Bi(e.element,o.cell)})).each((o=>{t.focusManager.set(e,o)}))},Jp=(e,t)=>(o,n,r)=>{const s=r.cycles?e:t;return Fi(n,r.selectors.row).bind((e=>{const t=Sd(e,r.selectors.cell);return vp(t,n).bind((t=>{const n=Sd(o,r.selectors.row);return vp(n,e).bind((e=>{const o=((e,t)=>H(e,(e=>Sd(e,t.selectors.cell))))(n,r);return s(o,e,t).map((e=>e.cell))}))}))}))},Zp=Jp(((e,t,o)=>Gp(e,t,o,-1)),((e,t,o)=>qp(e,t,o,-1))),Qp=Jp(((e,t,o)=>Gp(e,t,o,1)),((e,t,o)=>qp(e,t,o,1))),eh=Jp(((e,t,o)=>$p(e,o,t,-1)),((e,t,o)=>Xp(e,o,t,-1))),th=Jp(((e,t,o)=>$p(e,o,t,1)),((e,t,o)=>Xp(e,o,t,1))),oh=x([$g(Pg(Fg),cp(Zp,Qp)),$g(Pg(Rg),dp(Zp,Qp)),$g(Pg(Ig),gp(eh)),$g(Pg(Ng),pp(th)),$g(Pg(Bg.concat(Ag)),((e,t,o)=>nc(e.element).bind((n=>o.execute(e,t,n)))))]),nh=x([$g(Pg(Bg),op)]);var rh=Jg(Kp,Ra.init,oh,nh,(()=>D.some(Yp)));const sh=[cr("selector"),_r("execute",tp),_r("moveOnTab",!1)],ah=(e,t,o)=>o.focusManager.get(e).bind((n=>o.execute(e,t,n))),ih=(e,t,o)=>{Bi(e.element,t.selector).each((o=>{t.focusManager.set(e,o)}))},lh=(e,t,o)=>Rp(e,o.selector,t,-1),ch=(e,t,o)=>Rp(e,o.selector,t,1),dh=x([$g(Pg(Ig),hp(lh)),$g(Pg(Ng),hp(ch)),$g(Ug([Wg,Pg(Dg)]),((e,t,o,n)=>o.moveOnTab?hp(lh)(e,t,o,n):D.none())),$g(Ug([Gg,Pg(Dg)]),((e,t,o,n)=>o.moveOnTab?hp(ch)(e,t,o,n):D.none())),$g(Pg(Ag),ah),$g(Pg(Bg),ah)]),uh=x([$g(Pg(Bg),op)]);var mh=Jg(sh,Ra.init,dh,uh,(()=>D.some(ih)));const gh=[Qi("onSpace"),Qi("onEnter"),Qi("onShiftEnter"),Qi("onLeft"),Qi("onRight"),Qi("onTab"),Qi("onShiftTab"),Qi("onUp"),Qi("onDown"),Qi("onEscape"),_r("stopSpaceKeyup",!1),vr("focusIn")];var ph=Jg(gh,Ra.init,((e,t,o)=>[$g(Pg(Bg),o.onSpace),$g(Ug([Gg,Pg(Ag)]),o.onEnter),$g(Ug([Wg,Pg(Ag)]),o.onShiftEnter),$g(Ug([Wg,Pg(Dg)]),o.onShiftTab),$g(Ug([Gg,Pg(Dg)]),o.onTab),$g(Pg(Ig),o.onUp),$g(Pg(Ng),o.onDown),$g(Pg(Fg),o.onLeft),$g(Pg(Rg),o.onRight),$g(Pg(Bg),o.onSpace)]),((e,t,o)=>[...o.stopSpaceKeyup?[$g(Pg(Bg),op)]:[],$g(Pg(Mg),o.onEscape)]),(e=>e.focusIn));const hh=Qg.schema(),fh=ep.schema(),bh=Wp.schema(),vh=Bp.schema(),yh=rh.schema(),xh=sp.schema(),wh=mh.schema(),Sh=ph.schema();const kh=Kl({branchKey:"mode",branches:Object.freeze({__proto__:null,acyclic:hh,cyclic:fh,flow:bh,flatgrid:vh,matrix:yh,execution:xh,menu:wh,special:Sh}),name:"keying",active:{events:(e,t)=>e.handler.toEvents(e,t)},apis:{focusIn:(e,t,o)=>{t.sendFocusIn(t).fold((()=>{e.getSystem().triggerFocus(e.element,e.element)}),(n=>{n(e,t,o)}))},setGridSize:(e,t,o,n,r)=>{(e=>ye(e,"setGridSize"))(o)?o.setGridSize(n,r):console.error("Layout does not support setGridSize")}},state:ip}),Oh=(e,t)=>{rc((()=>{iu(e,t,(()=>H(t,e.getSystem().build)))}),e.element)},Ch=(e,t)=>{rc((()=>{((e,t,o)=>{const n=e.components(),r=X(t,(e=>Fa(e).toArray()));L(n,(e=>{R(r,e)||su(e)}));const s=o(t),a=J(n,s);L(a,(e=>{tu(e)&&su(e)})),L(s,(t=>{tu(t)||ru(e,t)})),e.syncComponents()})(e,t,(()=>((e,t,o)=>di(e,t,((t,n)=>ui(e,n,t,o))))(e.element,t,e.getSystem().buildOrPatch)))}),e.element)},_h=(e,t,o,n)=>{su(t);const r=ui(e.element,o,n,e.getSystem().buildOrPatch);ru(e,r),e.syncComponents()},Th=(e,t,o)=>{const n=e.getSystem().build(o);cu(e,n,t)},Eh=(e,t,o,n)=>{uu(t),Th(e,((e,t)=>((e,t,o)=>{at(e,o).fold((()=>{Ro(e,t)}),(e=>{Bo(e,t)}))})(e,t,o)),n)},Dh=(e,t)=>e.components(),Ah=(e,t,o,n,r)=>{const s=Dh(e);return D.from(s[n]).map((o=>(r.fold((()=>uu(o)),(r=>{(t.reuseDom?_h:Eh)(e,o,n,r)})),o)))};var Mh=Object.freeze({__proto__:null,append:(e,t,o,n)=>{Th(e,Ro,n)},prepend:(e,t,o,n)=>{Th(e,Io,n)},remove:(e,t,o,n)=>{const r=Dh(e),s=G(r,(e=>Ye(n.element,e.element)));s.each(uu)},replaceAt:Ah,replaceBy:(e,t,o,n,r)=>{const s=Dh(e);return $(s,n).bind((o=>Ah(e,t,0,o,r)))},set:(e,t,o,n)=>(t.reuseDom?Ch:Oh)(e,n),contents:Dh});const Bh=ql({fields:[Mr("reuseDom",!0)],name:"replacing",apis:Mh}),Fh=(e,t)=>{const o=((e,t)=>{const o=Ks(t);return ql({fields:[cr("enabled")],name:e,active:{events:x(o)}})})(e,t);return{key:e,value:{config:{},me:o,configAsRaw:x({}),initialConfig:{},state:Ra}}},Ih=(e,t)=>{t.ignore||(Ql(e.element),t.onFocus(e))};var Rh=Object.freeze({__proto__:null,focus:Ih,blur:(e,t)=>{t.ignore||ec(e.element)},isFocused:e=>tc(e.element)});var Nh=Object.freeze({__proto__:null,exhibit:(e,t)=>{const o=t.ignore?{}:{attributes:{tabindex:"-1"}};return za(o)},events:e=>Ks([Zs(bs(),((t,o)=>{Ih(t,e),o.stop()}))].concat(e.stopMousedown?[Zs(Qr(),((e,t)=>{t.event.prevent()}))]:[]))}),Vh=[Zi("onFocus"),_r("stopMousedown",!1),_r("ignore",!1)];const zh=ql({fields:Vh,name:"focusing",active:Nh,apis:Rh}),Hh=(e,t,o,n)=>{const r=o.get();o.set(n),((e,t,o)=>{t.toggleClass.each((t=>{o.get()?ei(e.element,t):ti(e.element,t)}))})(e,t,o),((e,t,o)=>{const n=t.aria;n.update(e,n,o.get())})(e,t,o),r!==n&&t.onToggled(e,n)},Lh=(e,t,o)=>{Hh(e,t,o,!o.get())},Ph=(e,t,o)=>{Hh(e,t,o,t.selected)};var Uh=Object.freeze({__proto__:null,onLoad:Ph,toggle:Lh,isOn:(e,t,o)=>o.get(),on:(e,t,o)=>{Hh(e,t,o,!0)},off:(e,t,o)=>{Hh(e,t,o,!1)},set:Hh});var Wh=Object.freeze({__proto__:null,exhibit:()=>za({}),events:(e,t)=>{const o=(n=e,r=t,s=Lh,ca((e=>{s(e,n,r)})));var n,r,s;const a=Pl(e,t,Ph);return Ks(q([e.toggleOnExecute?[o]:[],[a]]))}});const jh=(e,t,o)=>{St(e.element,"aria-expanded",o)};var Gh=[_r("selected",!1),vr("toggleClass"),_r("toggleOnExecute",!0),Zi("onToggled"),Tr("aria",{mode:"none"},rr("mode",{pressed:[_r("syncWithExpanded",!1),ol("update",((e,t,o)=>{St(e.element,"aria-pressed",o),t.syncWithExpanded&&jh(e,t,o)}))],checked:[ol("update",((e,t,o)=>{St(e.element,"aria-checked",o)}))],expanded:[ol("update",jh)],selected:[ol("update",((e,t,o)=>{St(e.element,"aria-selected",o)}))],none:[ol("update",b)]}))];const $h=ql({fields:Gh,name:"toggling",active:Wh,apis:Uh,state:(qh=!1,{init:()=>{const e=Rr(qh);return{get:()=>e.get(),set:t=>e.set(t),clear:()=>e.set(qh),readState:()=>e.get()}}})});var qh;const Xh=()=>{const e=(e,t)=>{t.stop(),Gs(e)};return[Zs(ds(),e),Zs(ks(),e),na(Kr()),na(Qr())]},Kh=e=>Ks(q([e.map((e=>ca(((t,o)=>{e(t),o.stop()})))).toArray(),Xh()])),Yh="alloy.item-hover",Jh="alloy.item-focus",Zh="alloy.item-toggled",Qh=e=>{(nc(e.element).isNone()||zh.isFocused(e))&&(zh.isFocused(e)||zh.focus(e),js(e,Yh,{item:e}))},ef=e=>{js(e,Jh,{item:e})},tf=x(Yh),of=x(Jh),nf=x(Zh),rf=e=>e.toggling.map((e=>e.exclusive?"menuitemradio":"menuitemcheckbox")).getOr("menuitem"),sf=e=>({aria:{mode:"checked"},...ge(e,((e,t)=>"exclusive"!==t)),onToggled:(t,o)=>{p(e.onToggled)&&e.onToggled(t,o),((e,t)=>{js(e,Zh,{item:e,state:t})})(t,o)}}),af=[cr("data"),cr("components"),cr("dom"),_r("hasSubmenu",!1),vr("toggling"),Ju("itemBehaviours",[$h,zh,kh,qu]),_r("ignoreFocus",!1),_r("domModification",{}),ol("builder",(e=>({dom:e.dom,domModification:{...e.domModification,attributes:{role:rf(e),...e.domModification.attributes,"aria-haspopup":e.hasSubmenu,...e.hasSubmenu?{"aria-expanded":!1}:{}}},behaviours:Zu(e.itemBehaviours,[e.toggling.fold($h.revoke,(e=>$h.config(sf(e)))),zh.config({ignore:e.ignoreFocus,stopMousedown:e.ignoreFocus,onFocus:e=>{ef(e)}}),kh.config({mode:"execution"}),qu.config({store:{mode:"memory",initialValue:e.data}}),Fh("item-type-events",[...Xh(),Zs(ns(),Qh),Zs(Ss(),zh.focus)])]),components:e.components,eventOrder:e.eventOrder}))),_r("eventOrder",{})],lf=[cr("dom"),cr("components"),ol("builder",(e=>({dom:e.dom,components:e.components,events:Ks([ra(Ss())])})))],cf=x("item-widget"),df=x([km({name:"widget",overrides:e=>({behaviours:Gl([qu.config({store:{mode:"manual",getValue:t=>e.data,setValue:b}})])})})]),uf=[cr("uid"),cr("data"),cr("components"),cr("dom"),_r("autofocus",!1),_r("ignoreFocus",!1),Ju("widgetBehaviours",[qu,zh,kh]),_r("domModification",{}),jm(df()),ol("builder",(e=>{const t=Rm(cf(),e,df()),o=Nm(cf(),e,t.internals()),n=t=>Vm(t,e,"widget").map((e=>(kh.focusIn(e),e))),r=(t,o)=>Qm(o.event.target)?D.none():e.autofocus?(o.setSource(t.element),D.none()):D.none();return{dom:e.dom,components:o,domModification:e.domModification,events:Ks([ca(((e,t)=>{n(e).each((e=>{t.stop()}))})),Zs(ns(),Qh),Zs(Ss(),((t,o)=>{e.autofocus?n(t):zh.focus(t)}))]),behaviours:Zu(e.widgetBehaviours,[qu.config({store:{mode:"memory",initialValue:e.data}}),zh.config({ignore:e.ignoreFocus,onFocus:e=>{ef(e)}}),kh.config({mode:"special",focusIn:e.autofocus?e=>{n(e)}:Yl(),onLeft:r,onRight:r,onEscape:(t,o)=>zh.isFocused(t)||e.autofocus?e.autofocus?(o.setSource(t.element),D.none()):D.none():(zh.focus(t),D.some(!0))})])}}))],mf=rr("type",{widget:uf,item:af,separator:lf}),gf=x([_m({factory:{sketch:e=>{const t=or("menu.spec item",mf,e);return t.builder(t)}},name:"items",unit:"item",defaults:(e,t)=>ve(t,"uid")?t:{...t,uid:Ca("item")},overrides:(e,t)=>({type:t.type,ignoreFocus:e.fakeFocus,domModification:{classes:[e.markers.item]}})})]),pf=x([cr("value"),cr("items"),cr("dom"),cr("components"),_r("eventOrder",{}),Xu("menuBehaviours",[Tg,qu,og,kh]),Tr("movement",{mode:"menu",moveOnTab:!0},rr("mode",{grid:[rl(),ol("config",((e,t)=>({mode:"flatgrid",selector:"."+e.markers.item,initSize:{numColumns:t.initSize.numColumns,numRows:t.initSize.numRows},focusManager:e.focusManager})))],matrix:[ol("config",((e,t)=>({mode:"matrix",selectors:{row:t.rowSelector,cell:"."+e.markers.item},previousSelector:t.previousSelector,focusManager:e.focusManager}))),cr("rowSelector"),_r("previousSelector",D.none)],menu:[_r("moveOnTab",!0),ol("config",((e,t)=>({mode:"menu",selector:"."+e.markers.item,moveOnTab:t.moveOnTab,focusManager:e.focusManager})))]})),dr("markers",qi()),_r("fakeFocus",!1),_r("focusManager",Xg()),Zi("onHighlight"),Zi("onDehighlight")]),hf=x("alloy.menu-focus"),ff=Zm({name:"Menu",configFields:pf(),partFields:gf(),factory:(e,t,o,n)=>({uid:e.uid,dom:e.dom,markers:e.markers,behaviours:Yu(e.menuBehaviours,[Tg.config({highlightClass:e.markers.selectedItem,itemClass:e.markers.item,onHighlight:e.onHighlight,onDehighlight:e.onDehighlight}),qu.config({store:{mode:"memory",initialValue:e.value}}),og.config({find:D.some}),kh.config(e.movement.config(e,e.movement))]),events:Ks([Zs(of(),((e,t)=>{const o=t.event;e.getSystem().getByDom(o.target).each((o=>{Tg.highlight(e,o),t.stop(),js(e,hf(),{menu:e,item:o})}))})),Zs(tf(),((e,t)=>{const o=t.event.item;Tg.highlight(e,o)})),Zs(nf(),((e,t)=>{const{item:o,state:n}=t.event;n&&"menuitemradio"===Ot(o.element,"role")&&((e,t)=>{const o=Sd(e.element,'[role="menuitemradio"][aria-checked="true"]');L(o,(o=>{Ye(o,t.element)||e.getSystem().getByDom(o).each((e=>{$h.off(e)}))}))})(e,o)}))]),components:t,eventOrder:e.eventOrder,domModification:{attributes:{role:"menu"}}})}),bf=(e,t,o,n)=>be(o,n).bind((n=>be(e,n).bind((n=>{const r=bf(e,t,o,n);return D.some([n].concat(r))})))).getOr([]),vf=(e,t)=>{const o={};le(e,((e,t)=>{L(e,(e=>{o[e]=t}))}));const n=t,r=de(t,((e,t)=>({k:e,v:t})));const s=ce(r,((e,t)=>[t].concat(bf(o,n,r,t))));return ce(o,(e=>be(s,e).getOr([e])))},yf=e=>"prepared"===e.type?D.some(e.menu):D.none(),xf={init:()=>{const e=Rr({}),t=Rr({}),o=Rr({}),n=Sc(),r=Rr({}),s=(t,o,n)=>a(t).bind((r=>(t=>he(e.get(),((e,o)=>e===t)))(t).bind((e=>o(e).map((e=>({triggeredMenu:r,triggeringItem:e,triggeringPath:n}))))))),a=e=>i(e).bind(yf),i=e=>be(t.get(),e),l=t=>be(e.get(),t);return{setMenuBuilt:(e,o)=>{t.set({...t.get(),[e]:{type:"prepared",menu:o}})},setContents:(s,a,i,l)=>{n.set(s),e.set(i),t.set(a),r.set(l);const c=vf(l,i);o.set(c)},expand:t=>be(e.get(),t).map((e=>{const n=be(o.get(),t).getOr([]);return[e].concat(n)})),refresh:e=>be(o.get(),e),collapse:e=>be(o.get(),e).bind((e=>e.length>1?D.some(e.slice(1)):D.none())),lookupMenu:i,lookupItem:l,otherMenus:e=>{const t=r.get();return J(ae(t),e)},getPrimary:()=>n.get().bind(a),getMenus:()=>t.get(),clear:()=>{e.set({}),t.set({}),o.set({}),n.clear()},isClear:()=>n.get().isNone(),getTriggeringPath:(e,t)=>{const r=U(l(e).toArray(),(e=>a(e).isSome()));return be(o.get(),e).bind((e=>{const o=Y(r.concat(e));return(e=>{const t=[];for(let o=0;o<e.length;o++){const n=e[o];if(!n.isSome())return D.none();t.push(n.getOrDie())}return D.some(t)})(X(o,((e,r)=>s(e,t,o.slice(0,r+1)).fold((()=>xe(n.get(),e)?[]:[D.none()]),(e=>[D.some(e)])))))}))}}},extractPreparedMenu:yf},wf=va("tiered-menu-item-highlight"),Sf=va("tiered-menu-item-dehighlight");var kf;!function(e){e[e.HighlightMenuAndItem=0]="HighlightMenuAndItem",e[e.HighlightJustMenu=1]="HighlightJustMenu",e[e.HighlightNone=2]="HighlightNone"}(kf||(kf={}));const Of=x("collapse-item"),Cf=Jm({name:"TieredMenu",configFields:[tl("onExecute"),tl("onEscape"),el("onOpenMenu"),el("onOpenSubmenu"),Zi("onRepositionMenu"),Zi("onCollapseMenu"),_r("highlightOnOpen",kf.HighlightMenuAndItem),hr("data",[cr("primary"),cr("menus"),cr("expansions")]),_r("fakeFocus",!1),Zi("onHighlightItem"),Zi("onDehighlightItem"),Zi("onHover"),Ki(),cr("dom"),_r("navigateOnHover",!0),_r("stayInDom",!1),Xu("tmenuBehaviours",[kh,Tg,og,Bh]),_r("eventOrder",{})],apis:{collapseMenu:(e,t)=>{e.collapseMenu(t)},highlightPrimary:(e,t)=>{e.highlightPrimary(t)},repositionMenus:(e,t)=>{e.repositionMenus(t)}},factory:(e,t)=>{const o=Sc(),n=xf.init(),r=t=>{const o=((t,o,n)=>ce(n,((n,r)=>{const s=()=>ff.sketch({...n,value:r,markers:e.markers,fakeFocus:e.fakeFocus,onHighlight:(e,t)=>{js(e,wf,{menuComp:e,itemComp:t})},onDehighlight:(e,t)=>{js(e,Sf,{menuComp:e,itemComp:t})},focusManager:e.fakeFocus?Kg():Xg()});return r===o?{type:"prepared",menu:t.getSystem().build(s())}:{type:"notbuilt",nbMenu:s}})))(t,e.data.primary,e.data.menus),r=a();return n.setContents(e.data.primary,o,e.data.expansions,r),n.getPrimary()},s=e=>qu.getValue(e).value,a=t=>ce(e.data.menus,((e,t)=>X(e.items,(e=>"separator"===e.type?[]:[e.data.value])))),i=Tg.highlight,l=(t,o)=>{i(t,o),Tg.getHighlighted(o).orThunk((()=>Tg.getFirst(o))).each((n=>{e.fakeFocus?Tg.highlight(o,n):$s(t,n.element,Ss())}))},c=(e,t)=>we(H(t,(t=>e.lookupMenu(t).bind((e=>"prepared"===e.type?D.some(e.menu):D.none()))))),d=(t,o,n)=>{const r=c(o,o.otherMenus(n));L(r,(o=>{ri(o.element,[e.markers.backgroundMenu]),e.stayInDom||Bh.remove(t,o)}))},u=(t,n)=>{const r=(t=>o.get().getOrThunk((()=>{const n={},r=Sd(t.element,`.${e.markers.item}`),a=U(r,(e=>"true"===Ot(e,"aria-haspopup")));return L(a,(e=>{t.getSystem().getByDom(e).each((e=>{const t=s(e);n[t]=e}))})),o.set(n),n})))(t);le(r,((e,t)=>{const o=R(n,t);St(e.element,"aria-expanded",o)}))},m=(t,o,n)=>D.from(n[0]).bind((r=>o.lookupMenu(r).bind((r=>{if("notbuilt"===r.type)return D.none();{const s=r.menu,a=c(o,n.slice(1));return L(a,(t=>{ei(t.element,e.markers.backgroundMenu)})),vt(s.element)||Bh.append(t,Ci(s)),ri(s.element,[e.markers.backgroundMenu]),l(t,s),d(t,o,n),D.some(s)}}))));let g;!function(e){e[e.HighlightSubmenu=0]="HighlightSubmenu",e[e.HighlightParent=1]="HighlightParent"}(g||(g={}));const p=(t,o,r=g.HighlightSubmenu)=>{if(o.hasConfigured(fg)&&fg.isDisabled(o))return D.some(o);{const a=s(o);return n.expand(a).bind((s=>(u(t,s),D.from(s[0]).bind((a=>n.lookupMenu(a).bind((i=>{const l=((e,t,o)=>{if("notbuilt"===o.type){const r=e.getSystem().build(o.nbMenu());return n.setMenuBuilt(t,r),r}return o.menu})(t,a,i);return vt(l.element)||Bh.append(t,Ci(l)),e.onOpenSubmenu(t,o,l,Y(s)),r===g.HighlightSubmenu?(Tg.highlightFirst(l),m(t,n,s)):(Tg.dehighlightAll(l),D.some(o))})))))))}},h=(t,o)=>{const r=s(o);return n.collapse(r).bind((r=>(u(t,r),m(t,n,r).map((n=>(e.onCollapseMenu(t,o,n),n))))))},f=t=>(o,n)=>Fi(n.getSource(),`.${e.markers.item}`).bind((e=>o.getSystem().getByDom(e).toOptional().bind((e=>t(o,e).map(E))))),v=Ks([Zs(hf(),((e,t)=>{const o=t.event.item;n.lookupItem(s(o)).each((()=>{const o=t.event.menu;Tg.highlight(e,o);const r=s(t.event.item);n.refresh(r).each((t=>d(e,n,t)))}))})),ca(((t,o)=>{const n=o.event.target;t.getSystem().getByDom(n).each((o=>{0===s(o).indexOf("collapse-item")&&h(t,o),p(t,o,g.HighlightSubmenu).fold((()=>{e.onExecute(t,o)}),b)}))})),aa(((t,o)=>{r(t).each((o=>{Bh.append(t,Ci(o)),e.onOpenMenu(t,o),e.highlightOnOpen===kf.HighlightMenuAndItem?l(t,o):e.highlightOnOpen===kf.HighlightJustMenu&&i(t,o)}))})),Zs(wf,((t,o)=>{e.onHighlightItem(t,o.event.menuComp,o.event.itemComp)})),Zs(Sf,((t,o)=>{e.onDehighlightItem(t,o.event.menuComp,o.event.itemComp)})),...e.navigateOnHover?[Zs(tf(),((t,o)=>{const r=o.event.item;((e,t)=>{const o=s(t);n.refresh(o).bind((t=>(u(e,t),m(e,n,t))))})(t,r),p(t,r,g.HighlightParent),e.onHover(t,r)}))]:[]]),y=e=>Tg.getHighlighted(e).bind(Tg.getHighlighted),x={collapseMenu:e=>{y(e).each((t=>{h(e,t)}))},highlightPrimary:e=>{n.getPrimary().each((t=>{l(e,t)}))},repositionMenus:t=>{const o=n.getPrimary().bind((e=>y(t).bind((e=>{const t=s(e),o=fe(n.getMenus()),r=we(H(o,xf.extractPreparedMenu));return n.getTriggeringPath(t,(e=>((e,t,o)=>se(t,(e=>{if(!e.getSystem().isConnected())return D.none();const t=Tg.getCandidates(e);return G(t,(e=>s(e)===o))})))(0,r,e)))})).map((t=>({primary:e,triggeringPath:t})))));o.fold((()=>{(e=>D.from(e.components()[0]).filter((e=>"menu"===Ot(e.element,"role"))))(t).each((o=>{e.onRepositionMenu(t,o,[])}))}),(({primary:o,triggeringPath:n})=>{e.onRepositionMenu(t,o,n)}))}};return{uid:e.uid,dom:e.dom,markers:e.markers,behaviours:Yu(e.tmenuBehaviours,[kh.config({mode:"special",onRight:f(((e,t)=>Qm(t.element)?D.none():p(e,t,g.HighlightSubmenu))),onLeft:f(((e,t)=>Qm(t.element)?D.none():h(e,t))),onEscape:f(((t,o)=>h(t,o).orThunk((()=>e.onEscape(t,o).map((()=>t)))))),focusIn:(e,t)=>{n.getPrimary().each((t=>{$s(e,t.element,Ss())}))}}),Tg.config({highlightClass:e.markers.selectedMenu,itemClass:e.markers.menu}),og.config({find:e=>Tg.getHighlighted(e)}),Bh.config({})]),eventOrder:e.eventOrder,apis:x,events:v}},extraApis:{tieredData:(e,t,o)=>({primary:e,menus:t,expansions:o}),singleData:(e,t)=>({primary:e,menus:zr(e,t),expansions:{}}),collapseItem:e=>({value:va(Of()),meta:{text:e}})}}),_f=Jm({name:"InlineView",configFields:[cr("lazySink"),Zi("onShow"),Zi("onHide"),kr("onEscape"),Xu("inlineBehaviours",[Tu,qu,Jl]),Cr("fireDismissalEventInstead",[_r("event",Is())]),Cr("fireRepositionEventInstead",[_r("event",Rs())]),_r("getRelated",D.none),_r("isExtraPart",T),_r("eventOrder",D.none)],factory:(e,t)=>{const o=(t,o,n,r)=>{const s=e.lazySink(t).getOrDie();Tu.openWhileCloaked(t,o,(()=>eu.positionWithinBounds(s,t,n,r()))),qu.setValue(t,D.some({mode:"position",config:n,getBounds:r}))},n=(t,o,n,r)=>{const s=((e,t,o,n,r)=>{const s=()=>e.lazySink(t),a="horizontal"===n.type?{layouts:{onLtr:()=>Vl(),onRtl:()=>zl()}}:{},i=e=>(e=>2===e.length)(e)?a:{};return Cf.sketch({dom:{tag:"div"},data:n.data,markers:n.menu.markers,highlightOnOpen:n.menu.highlightOnOpen,fakeFocus:n.menu.fakeFocus,onEscape:()=>(Tu.close(t),e.onEscape.map((e=>e(t))),D.some(!0)),onExecute:()=>D.some(!0),onOpenMenu:(e,t)=>{eu.positionWithinBounds(s().getOrDie(),t,o,r())},onOpenSubmenu:(e,t,o,n)=>{const r=s().getOrDie();eu.position(r,o,{anchor:{type:"submenu",item:t,...i(n)}})},onRepositionMenu:(e,t,n)=>{const a=s().getOrDie();eu.positionWithinBounds(a,t,o,r()),L(n,(e=>{const t=i(e.triggeringPath);eu.position(a,e.triggeredMenu,{anchor:{type:"submenu",item:e.triggeringItem,...t}})}))}})})(e,t,o,n,r);Tu.open(t,s),qu.setValue(t,D.some({mode:"menu",menu:s}))},r=t=>{Tu.isOpen(t)&&qu.getValue(t).each((o=>{switch(o.mode){case"menu":Tu.getState(t).each(Cf.repositionMenus);break;case"position":const n=e.lazySink(t).getOrDie();eu.positionWithinBounds(n,t,o.config,o.getBounds())}}))},s={setContent:(e,t)=>{Tu.setContent(e,t)},showAt:(e,t,n)=>{const r=D.none;o(e,t,n,r)},showWithinBounds:o,showMenuAt:(e,t,o)=>{n(e,t,o,D.none)},showMenuWithinBounds:n,hide:e=>{Tu.isOpen(e)&&(qu.setValue(e,D.none()),Tu.close(e))},getContent:e=>Tu.getState(e),reposition:r,isOpen:Tu.isOpen};return{uid:e.uid,dom:e.dom,behaviours:Yu(e.inlineBehaviours,[Tu.config({isPartOf:(t,o,n)=>Vi(o,n)||((t,o)=>e.getRelated(t).exists((e=>Vi(e,o))))(t,n),getAttachPoint:t=>e.lazySink(t).getOrDie(),onOpen:t=>{e.onShow(t)},onClose:t=>{e.onHide(t)}}),qu.config({store:{mode:"memory",initialValue:D.none()}}),Jl.config({channels:{...Bu({isExtraPart:t.isExtraPart,...e.fireDismissalEventInstead.map((e=>({fireEventInstead:{event:e.event}}))).getOr({})}),...Iu({...e.fireRepositionEventInstead.map((e=>({fireEventInstead:{event:e.event}}))).getOr({}),doReposition:r})}})]),eventOrder:e.eventOrder,apis:s}},apis:{showAt:(e,t,o,n)=>{e.showAt(t,o,n)},showWithinBounds:(e,t,o,n,r)=>{e.showWithinBounds(t,o,n,r)},showMenuAt:(e,t,o,n)=>{e.showMenuAt(t,o,n)},showMenuWithinBounds:(e,t,o,n,r)=>{e.showMenuWithinBounds(t,o,n,r)},hide:(e,t)=>{e.hide(t)},isOpen:(e,t)=>e.isOpen(t),getContent:(e,t)=>e.getContent(t),setContent:(e,t,o)=>{e.setContent(t,o)},reposition:(e,t)=>{e.reposition(t)}}});var Tf=tinymce.util.Tools.resolve("tinymce.util.Delay");const Ef=Jm({name:"Button",factory:e=>{const t=Kh(e.action),o=e.dom.tag,n=t=>be(e.dom,"attributes").bind((e=>be(e,t)));return{uid:e.uid,dom:e.dom,components:e.components,events:t,behaviours:Zu(e.buttonBehaviours,[zh.config({}),kh.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:(()=>{if("button"===o){return{type:n("type").getOr("button"),...n("role").map((e=>({role:e}))).getOr({})}}return{role:e.role.getOr(n("role").getOr("button"))}})()},eventOrder:e.eventOrder}},configFields:[_r("uid",void 0),cr("dom"),_r("components",[]),Ju("buttonBehaviours",[zh,kh]),vr("action"),vr("role"),_r("eventOrder",{})]}),Df=e=>{const t=(e=>void 0!==e.uid)(e)&&ye(e,"uid")?e.uid:Ca("memento");return{get:e=>e.getSystem().getByUid(t).getOrDie(),getOpt:e=>e.getSystem().getByUid(t).toOptional(),asSpec:()=>({...e,uid:t})}};var Af=tinymce.util.Tools.resolve("tinymce.util.I18n");const Mf={indent:!0,outdent:!0,"table-insert-column-after":!0,"table-insert-column-before":!0,"paste-column-after":!0,"paste-column-before":!0,"unordered-list":!0,"list-bull-circle":!0,"list-bull-default":!0,"list-bull-square":!0},Bf="temporary-placeholder",Ff=e=>()=>be(e,Bf).getOr("!not found!"),If=(e,t)=>{const o=e.toLowerCase();if(Af.isRtl()){const e=((e,t)=>De(e,t)?e:((e,t)=>e+t)(e,t))(o,"-rtl");return ve(t,e)?e:o}return o},Rf=(e,t)=>be(t,If(e,t)),Nf=(e,t)=>{const o=t();return Rf(e,o).getOrThunk(Ff(o))},Vf=()=>Fh("add-focusable",[aa((e=>{Mi(e.element,"svg").each((e=>St(e,"focusable","false")))}))]),zf=(e,t,o,n)=>{var r,s;const a=(e=>!!Af.isRtl()&&ve(Mf,e))(t)?["tox-icon--flip"]:[],i=be(o,If(t,o)).or(n).getOrThunk(Ff(o));return{dom:{tag:e.tag,attributes:null!==(r=e.attributes)&&void 0!==r?r:{},classes:e.classes.concat(a),innerHtml:i},behaviours:Gl([...null!==(s=e.behaviours)&&void 0!==s?s:[],Vf()])}},Hf=(e,t,o,n=D.none())=>zf(t,e,o(),n),Lf={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},Pf=Jm({name:"Notification",factory:e=>{const t=Df({dom:{tag:"p",innerHtml:e.translationProvider(e.text)},behaviours:Gl([Bh.config({})])}),o=e=>({dom:{tag:"div",classes:["tox-bar"],styles:{width:`${e}%`}}}),n=e=>({dom:{tag:"div",classes:["tox-text"],innerHtml:`${e}%`}}),r=Df({dom:{tag:"div",classes:e.progress?["tox-progress-bar","tox-progress-indicator"]:["tox-progress-bar"]},components:[{dom:{tag:"div",classes:["tox-bar-container"]},components:[o(0)]},n(0)],behaviours:Gl([Bh.config({})])}),s={updateProgress:(e,t)=>{e.getSystem().isConnected()&&r.getOpt(e).each((e=>{Bh.set(e,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[o(t)]},n(t)])}))},updateText:(e,o)=>{if(e.getSystem().isConnected()){const n=t.get(e);Bh.set(n,[xi(o)])}}},a=q([e.icon.toArray(),e.level.toArray(),e.level.bind((e=>D.from(Lf[e]))).toArray()]),i=Df(Ef.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"]},components:[Hf("close",{tag:"div",classes:["tox-icon"],attributes:{"aria-label":e.translationProvider("Close")}},e.iconProvider)],action:t=>{e.onAction(t)}})),l=((e,t,o)=>{const n=o(),r=G(e,(e=>ve(n,If(e,n))));return zf(t,r.getOr(Bf),n,D.none())})(a,{tag:"div",classes:["tox-notification__icon"]},e.iconProvider),c=[l,{dom:{tag:"div",classes:["tox-notification__body"]},components:[t.asSpec()],behaviours:Gl([Bh.config({})])}];return{uid:e.uid,dom:{tag:"div",attributes:{role:"alert"},classes:e.level.map((e=>["tox-notification","tox-notification--in",`tox-notification--${e}`])).getOr(["tox-notification","tox-notification--in"])},behaviours:Gl([zh.config({}),Fh("notification-events",[Zs(rs(),(e=>{i.getOpt(e).each(zh.focus)}))])]),components:c.concat(e.progress?[r.asSpec()]:[]).concat(e.closeButton?[i.asSpec()]:[]),apis:s}},configFields:[vr("level"),cr("progress"),vr("icon"),cr("onAction"),cr("text"),cr("iconProvider"),cr("translationProvider"),Mr("closeButton",!0)],apis:{updateProgress:(e,t,o)=>{e.updateProgress(t,o)},updateText:(e,t,o)=>{e.updateText(t,o)}}});var Uf,Wf,jf=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Gf=tinymce.util.Tools.resolve("tinymce.EditorManager"),$f=tinymce.util.Tools.resolve("tinymce.Env");!function(e){e.default="wrap",e.floating="floating",e.sliding="sliding",e.scrolling="scrolling"}(Uf||(Uf={})),function(e){e.auto="auto",e.top="top",e.bottom="bottom"}(Wf||(Wf={}));const qf=e=>t=>t.options.get(e),Xf=e=>t=>D.from(e(t)),Kf=e=>{const t=$f.deviceType.isPhone(),o=$f.deviceType.isTablet()||t,n=e.options.register,r=e=>s(e)||!1===e,a=e=>s(e)||h(e);n("skin",{processor:e=>s(e)||!1===e,default:"oxide"}),n("skin_url",{processor:"string"}),n("height",{processor:a,default:Math.max(e.getElement().offsetHeight,400)}),n("width",{processor:a,default:jf.DOM.getStyle(e.getElement(),"width")}),n("min_height",{processor:"number",default:100}),n("min_width",{processor:"number"}),n("max_height",{processor:"number"}),n("max_width",{processor:"number"}),n("style_formats",{processor:"object[]"}),n("style_formats_merge",{processor:"boolean",default:!1}),n("style_formats_autohide",{processor:"boolean",default:!1}),n("line_height_formats",{processor:"string",default:"1 1.1 1.2 1.3 1.4 1.5 2"}),n("font_family_formats",{processor:"string",default:"Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats"}),n("font_size_formats",{processor:"string",default:"8pt 10pt 12pt 14pt 18pt 24pt 36pt"}),n("font_size_input_default_unit",{processor:"string",default:"pt"}),n("block_formats",{processor:"string",default:"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre"}),n("content_langs",{processor:"object[]"}),n("removed_menuitems",{processor:"string",default:""}),n("menubar",{processor:e=>s(e)||d(e),default:!t}),n("menu",{processor:"object",default:{}}),n("toolbar",{processor:e=>d(e)||s(e)||l(e)?{value:e,valid:!0}:{valid:!1,message:"Must be a boolean, string or array."},default:!0}),V(9,(e=>{n("toolbar"+(e+1),{processor:"string"})})),n("toolbar_mode",{processor:"string",default:o?"scrolling":"floating"}),n("toolbar_groups",{processor:"object",default:{}}),n("toolbar_location",{processor:"string",default:Wf.auto}),n("toolbar_persist",{processor:"boolean",default:!1}),n("toolbar_sticky",{processor:"boolean",default:e.inline}),n("toolbar_sticky_offset",{processor:"number",default:0}),n("fixed_toolbar_container",{processor:"string",default:""}),n("fixed_toolbar_container_target",{processor:"object"}),n("ui_mode",{processor:"string",default:"combined"}),n("file_picker_callback",{processor:"function"}),n("file_picker_validator_handler",{processor:"function"}),n("file_picker_types",{processor:"string"}),n("typeahead_urls",{processor:"boolean",default:!0}),n("anchor_top",{processor:r,default:"#top"}),n("anchor_bottom",{processor:r,default:"#bottom"}),n("draggable_modal",{processor:"boolean",default:!1}),n("statusbar",{processor:"boolean",default:!0}),n("elementpath",{processor:"boolean",default:!0}),n("branding",{processor:"boolean",default:!0}),n("promotion",{processor:"boolean",default:!0}),n("resize",{processor:e=>"both"===e||d(e),default:!$f.deviceType.isTouch()}),n("sidebar_show",{processor:"string"})},Yf=qf("readonly"),Jf=qf("height"),Zf=qf("width"),Qf=Xf(qf("min_width")),eb=Xf(qf("min_height")),tb=Xf(qf("max_width")),ob=Xf(qf("max_height")),nb=Xf(qf("style_formats")),rb=qf("style_formats_merge"),sb=qf("style_formats_autohide"),ab=qf("content_langs"),ib=qf("removed_menuitems"),lb=qf("toolbar_mode"),cb=qf("toolbar_groups"),db=qf("toolbar_location"),ub=qf("fixed_toolbar_container"),mb=qf("fixed_toolbar_container_target"),gb=qf("toolbar_persist"),pb=qf("toolbar_sticky_offset"),hb=qf("menubar"),fb=qf("toolbar"),bb=qf("file_picker_callback"),vb=qf("file_picker_validator_handler"),yb=qf("font_size_input_default_unit"),xb=qf("file_picker_types"),wb=qf("typeahead_urls"),Sb=qf("anchor_top"),kb=qf("anchor_bottom"),Ob=qf("draggable_modal"),Cb=qf("statusbar"),_b=qf("elementpath"),Tb=qf("branding"),Eb=qf("resize"),Db=qf("paste_as_text"),Ab=qf("sidebar_show"),Mb=qf("promotion"),Bb=e=>!1===e.options.get("skin"),Fb=e=>!1!==e.options.get("menubar"),Ib=e=>{const t=e.options.get("skin_url");if(Bb(e))return t;if(t)return e.documentBaseURI.toAbsolute(t);{const t=e.options.get("skin");return Gf.baseURL+"/skins/ui/"+t}},Rb=e=>e.options.get("line_height_formats").split(" "),Nb=e=>{const t=fb(e),o=s(t),n=l(t)&&t.length>0;return!zb(e)&&(n||o||!0===t)},Vb=e=>{const t=V(9,(t=>e.options.get("toolbar"+(t+1)))),o=U(t,s);return Oe(o.length>0,o)},zb=e=>Vb(e).fold((()=>{const t=fb(e);return f(t,s)&&t.length>0}),E),Hb=e=>db(e)===Wf.bottom,Lb=e=>{var t;if(!e.inline)return D.none();const o=null!==(t=ub(e))&&void 0!==t?t:"";if(o.length>0)return Bi(yt(),o);const n=mb(e);return g(n)?D.some(Ie.fromDom(n)):D.none()},Pb=e=>e.inline&&Lb(e).isSome(),Ub=e=>Lb(e).getOrThunk((()=>pt(gt(Ie.fromDom(e.getElement()))))),Wb=e=>e.inline&&!Fb(e)&&!Nb(e)&&!zb(e),jb=e=>(e.options.get("toolbar_sticky")||e.inline)&&!Pb(e)&&!Wb(e),Gb=e=>!Pb(e)&&"split"===e.options.get("ui_mode"),$b=e=>{const t=e.options.get("menu");return ce(t,(e=>({...e,items:e.items})))};var qb=Object.freeze({__proto__:null,get ToolbarMode(){return Uf},get ToolbarLocation(){return Wf},register:Kf,getSkinUrl:Ib,isReadOnly:Yf,isSkinDisabled:Bb,getHeightOption:Jf,getWidthOption:Zf,getMinWidthOption:Qf,getMinHeightOption:eb,getMaxWidthOption:tb,getMaxHeightOption:ob,getUserStyleFormats:nb,shouldMergeStyleFormats:rb,shouldAutoHideStyleFormats:sb,getLineHeightFormats:Rb,getContentLanguages:ab,getRemovedMenuItems:ib,isMenubarEnabled:Fb,isMultipleToolbars:zb,isToolbarEnabled:Nb,isToolbarPersist:gb,getMultipleToolbarsOption:Vb,getUiContainer:Ub,useFixedContainer:Pb,isSplitUiMode:Gb,getToolbarMode:lb,isDraggableModal:Ob,isDistractionFree:Wb,isStickyToolbar:jb,getStickyToolbarOffset:pb,getToolbarLocation:db,isToolbarLocationBottom:Hb,getToolbarGroups:cb,getMenus:$b,getMenubar:hb,getToolbar:fb,getFilePickerCallback:bb,getFilePickerTypes:xb,useTypeaheadUrls:wb,getAnchorTop:Sb,getAnchorBottom:kb,getFilePickerValidatorHandler:vb,getFontSizeInputDefaultUnit:yb,useStatusBar:Cb,useElementPath:_b,promotionEnabled:Mb,useBranding:Tb,getResize:Eb,getPasteAsText:Db,getSidebarShow:Ab});const Xb="[data-mce-autocompleter]",Kb=e=>Fi(e,Xb),Yb=(e,t)=>{const o=(e,t)=>{js(e,as(),{raw:t})},n=()=>e.getMenu().bind(Tg.getHighlighted);t.on("keydown",(t=>{const r=t.which;e.isActive()&&(e.isMenuOpen()?13===r?(n().each(Gs),t.preventDefault()):40===r?(n().fold((()=>{e.getMenu().each(Tg.highlightFirst)}),(e=>{o(e,t)})),t.preventDefault(),t.stopImmediatePropagation()):37!==r&&38!==r&&39!==r||n().each((e=>{o(e,t),t.preventDefault(),t.stopImmediatePropagation()})):13!==r&&38!==r&&40!==r||e.cancelIfNecessary())})),t.on("NodeChange",(t=>{e.isActive()&&!e.isProcessingAction()&&Kb(Ie.fromDom(t.element)).isNone()&&e.cancelIfNecessary()}))};var Jb;!function(e){e[e.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",e[e.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX"}(Jb||(Jb={}));var Zb=Jb;const Qb="tox-menu-nav__js",ev="tox-collection__item",tv="tox-swatch",ov={normal:Qb,color:tv},nv="tox-collection__item--enabled",rv="tox-collection__item-icon",sv="tox-collection__item-label",av="tox-collection__item-caret",iv="tox-collection__item--active",lv="tox-collection__item-container",cv="tox-collection__item-container--row",dv=e=>be(ov,e).getOr(Qb),uv=e=>"color"===e?"tox-swatches":"tox-menu",mv=e=>({backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:uv(e),tieredMenu:"tox-tiered-menu"}),gv=e=>{const t=mv(e);return{backgroundMenu:t.backgroundMenu,selectedMenu:t.selectedMenu,menu:t.menu,selectedItem:t.selectedItem,item:dv(e)}},pv=(e,t,o)=>{const n=mv(o);return{tag:"div",classes:q([[n.menu,`tox-menu-${t}-column`],e?[n.hasIcons]:[]])}},hv=[ff.parts.items({})],fv=(e,t,o)=>{const n=mv(o);return{dom:{tag:"div",classes:q([[n.tieredMenu]])},markers:gv(o)}},bv=x([vr("data"),_r("inputAttributes",{}),_r("inputStyles",{}),_r("tag","input"),_r("inputClasses",[]),Zi("onSetValue"),_r("styles",{}),_r("eventOrder",{}),Xu("inputBehaviours",[qu,zh]),_r("selectOnFocus",!0)]),vv=e=>Gl([zh.config({onFocus:e.selectOnFocus?e=>{const t=e.element,o=ii(t);t.dom.setSelectionRange(0,o.length)}:b})]),yv=e=>({...vv(e),...Yu(e.inputBehaviours,[qu.config({store:{mode:"manual",...e.data.map((e=>({initialValue:e}))).getOr({}),getValue:e=>ii(e.element),setValue:(e,t)=>{ii(e.element)!==t&&li(e.element,t)}},onSetValue:e.onSetValue})])}),xv=e=>({tag:e.tag,attributes:{type:"text",...e.inputAttributes},styles:e.inputStyles,classes:e.inputClasses}),wv=Jm({name:"Input",configFields:bv(),factory:(e,t)=>({uid:e.uid,dom:xv(e),components:[],behaviours:yv(e),eventOrder:e.eventOrder})}),Sv=va("refetch-trigger-event"),kv=va("redirect-menu-item-interaction"),Ov="tox-menu__searcher",Cv=e=>Bi(e.element,".tox-menu__searcher").bind((t=>e.getSystem().getByDom(t).toOptional())),_v=Cv,Tv=e=>({fetchPattern:qu.getValue(e),selectionStart:e.element.dom.selectionStart,selectionEnd:e.element.dom.selectionEnd}),Ev=e=>{const t=(e,t)=>(t.cut(),D.none()),o=(e,t)=>{const o={interactionEvent:t.event,eventType:t.event.raw.type};return js(e,kv,o),D.some(!0)},n="searcher-events";return{dom:{tag:"div",classes:[ev]},components:[wv.sketch({inputClasses:[Ov,"tox-textfield"],inputAttributes:{...e.placeholder.map((t=>({placeholder:e.i18n(t)}))).getOr({}),type:"search","aria-autocomplete":"list"},inputBehaviours:Gl([Fh(n,[Zs(ls(),(e=>{Ws(e,Sv)})),Zs(as(),((e,t)=>{"Escape"===t.event.raw.key&&t.stop()}))]),kh.config({mode:"special",onLeft:t,onRight:t,onSpace:t,onEnter:o,onEscape:o,onUp:o,onDown:o})]),eventOrder:{keydown:[n,kh.name()]}})]}},Dv="tox-collection--results__js",Av=e=>{var t;return e.dom?{...e,dom:{...e.dom,attributes:{...null!==(t=e.dom.attributes)&&void 0!==t?t:{},id:va("aria-item-search-result-id"),"aria-selected":"false"}}}:e},Mv=(e,t)=>o=>{const n=z(o,t);return H(n,(t=>({dom:e,components:t})))},Bv=(e,t)=>{const o=[];let n=[];return L(e,((e,r)=>{t(e,r)?(n.length>0&&o.push(n),n=[],(ve(e.dom,"innerHtml")||e.components&&e.components.length>0)&&n.push(e)):n.push(e)})),n.length>0&&o.push(n),H(o,(e=>({dom:{tag:"div",classes:["tox-collection__group"]},components:e})))},Fv=(e,t,o)=>ff.parts.items({preprocess:n=>{const r=H(n,o);return"auto"!==e&&e>1?Mv({tag:"div",classes:["tox-collection__group"]},e)(r):Bv(r,((e,o)=>"separator"===t[o].type))}}),Iv=(e,t,o=!0)=>({dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===e?["tox-collection--list"]:["tox-collection--grid"])},components:[Fv(e,t,w)]}),Rv=e=>N(e,(e=>"icon"in e&&void 0!==e.icon)),Nv=e=>(console.error(nr(e)),console.log(e),D.none()),Vv=(e,t,o,n,r)=>{const s=(a=o,{dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[ff.parts.items({preprocess:e=>Bv(e,((e,t)=>"separator"===a[t].type))})]});var a;return{value:e,dom:s.dom,components:s.components,items:o}},zv=(e,t,o,n,r)=>{const s=()=>"searchable"!==r.menuType?Iv(n,o):"search-with-field"===r.searchMode.searchMode?((e,t,o)=>{const n=va("aria-controls-search-results");return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===e?["tox-collection--list"]:["tox-collection--grid"])},components:[Ev({i18n:Af.translate,placeholder:o.placeholder}),{dom:{tag:"div",classes:[...1===e?["tox-collection--list"]:["tox-collection--grid"],Dv],attributes:{id:n}},components:[Fv(e,t,Av)]}]}})(n,o,r.searchMode):((e,t,o=!0)=>{const n=va("aria-controls-search-results");return{dom:{tag:"div",classes:["tox-menu","tox-collection",Dv].concat(1===e?["tox-collection--list"]:["tox-collection--grid"]),attributes:{id:n}},components:[Fv(e,t,Av)]}})(n,o);if("color"===r.menuType){const t=(e=>({dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[ff.parts.items({preprocess:"auto"!==e?Mv({tag:"div",classes:["tox-swatches__row"]},e):w})]}]}))(n);return{value:e,dom:t.dom,components:t.components,items:o}}if("normal"===r.menuType&&"auto"===n){const t=Iv(n,o);return{value:e,dom:t.dom,components:t.components,items:o}}if("normal"===r.menuType||"searchable"===r.menuType){const t=s();return{value:e,dom:t.dom,components:t.components,items:o}}if("listpreview"===r.menuType&&"auto"!==n){const t=(e=>({dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[ff.parts.items({preprocess:Mv({tag:"div",classes:["tox-collection__group"]},e)})]}))(n);return{value:e,dom:t.dom,components:t.components,items:o}}return{value:e,dom:pv(t,n,r.menuType),components:hv,items:o}},Hv=mr("type"),Lv=mr("name"),Pv=mr("label"),Uv=mr("text"),Wv=mr("title"),jv=mr("icon"),Gv=mr("value"),$v=pr("fetch"),qv=pr("getSubmenuItems"),Xv=pr("onAction"),Kv=pr("onItemAction"),Yv=Br("onSetup",(()=>b)),Jv=wr("name"),Zv=wr("text"),Qv=wr("icon"),ey=wr("tooltip"),ty=wr("label"),oy=wr("shortcut"),ny=kr("select"),ry=Mr("active",!1),sy=Mr("borderless",!1),ay=Mr("enabled",!0),iy=Mr("primary",!1),ly=e=>_r("columns",e),cy=_r("meta",{}),dy=Br("onAction",b),uy=e=>Dr("type",e),my=e=>ar("name","name",Sn((()=>va(`${e}-name`))),Gn),gy=Vn([Hv,Zv]),py=Vn([uy("autocompleteitem"),ry,ay,cy,Gv,Zv,Qv]),hy=[ay,ey,Qv,Zv,Yv],fy=Vn([Hv,Xv].concat(hy)),by=e=>er("toolbarbutton",fy,e),vy=[ry].concat(hy),yy=Vn(vy.concat([Hv,Xv])),xy=e=>er("ToggleButton",yy,e),wy=[Br("predicate",T),Ar("scope","node",["node","editor"]),Ar("position","selection",["node","selection","line"])],Sy=hy.concat([uy("contextformbutton"),iy,Xv,ir("original",w)]),ky=vy.concat([uy("contextformbutton"),iy,Xv,ir("original",w)]),Oy=hy.concat([uy("contextformbutton")]),Cy=vy.concat([uy("contextformtogglebutton")]),_y=rr("type",{contextformbutton:Sy,contextformtogglebutton:ky}),Ty=Vn([uy("contextform"),Br("initValue",x("")),ty,br("commands",_y),yr("launch",rr("type",{contextformbutton:Oy,contextformtogglebutton:Cy}))].concat(wy)),Ey=Vn([uy("contexttoolbar"),mr("items")].concat(wy)),Dy=[Hv,mr("src"),wr("alt"),Fr("classes",[],Gn)],Ay=Vn(Dy),My=[Hv,Uv,Jv,Fr("classes",["tox-collection__item-label"],Gn)],By=Vn(My),Fy=In((()=>Jn("type",{cardimage:Ay,cardtext:By,cardcontainer:Iy}))),Iy=Vn([Hv,Dr("direction","horizontal"),Dr("align","left"),Dr("valign","middle"),br("items",Fy)]),Ry=[ay,Zv,oy,(Ny="menuitem",ar("value","value",Sn((()=>va(`${Ny}-value`))),Un())),cy];var Ny;const Vy=Vn([Hv,ty,br("items",Fy),Yv,dy].concat(Ry)),zy=Vn([Hv,ry,Qv].concat(Ry)),Hy=[Hv,mr("fancytype"),dy],Ly=[_r("initData",{})].concat(Hy),Py=[kr("select"),Ir("initData",{},[Mr("allowCustomColors",!0),Dr("storageKey","default"),Or("colors",Un())])].concat(Hy),Uy=rr("fancytype",{inserttable:Ly,colorswatch:Py}),Wy=Vn([Hv,Yv,dy,Qv].concat(Ry)),jy=Vn([Hv,qv,Yv,Qv].concat(Ry)),Gy=Vn([Hv,Qv,ry,Yv,Xv].concat(Ry)),$y=(e,t,o)=>{const n=Sd(e.element,"."+o);if(n.length>0){const e=$(n,(e=>{const o=e.dom.getBoundingClientRect().top,r=n[0].dom.getBoundingClientRect().top;return Math.abs(o-r)>t})).getOr(n.length);return D.some({numColumns:e,numRows:Math.ceil(n.length/e)})}return D.none()},qy=(e,t)=>Gl([Fh(e,t)]),Xy=e=>qy(va("unnamed-events"),e),Ky=va("tooltip.exclusive"),Yy=va("tooltip.show"),Jy=va("tooltip.hide"),Zy=(e,t,o)=>{e.getSystem().broadcastOn([Ky],{})};var Qy=Object.freeze({__proto__:null,hideAllExclusive:Zy,setComponents:(e,t,o,n)=>{o.getTooltip().each((e=>{e.getSystem().isConnected()&&Bh.set(e,n)}))}});var ex=Object.freeze({__proto__:null,events:(e,t)=>{const o=o=>{t.getTooltip().each((n=>{uu(n),e.onHide(o,n),t.clearTooltip()})),t.clearTimer()};return Ks(q([[Zs(Yy,(o=>{t.resetTimer((()=>{(o=>{if(!t.isShowing()){Zy(o);const n=e.lazySink(o).getOrDie(),r=o.getSystem().build({dom:e.tooltipDom,components:e.tooltipComponents,events:Ks("normal"===e.mode?[Zs(ns(),(e=>{Ws(o,Yy)})),Zs(ts(),(e=>{Ws(o,Jy)}))]:[]),behaviours:Gl([Bh.config({})])});t.setTooltip(r),lu(n,r),e.onShow(o,r),eu.position(n,r,{anchor:e.anchor(o)})}})(o)}),e.delay)})),Zs(Jy,(n=>{t.resetTimer((()=>{o(n)}),e.delay)})),Zs(xs(),((e,t)=>{const n=t;n.universal||R(n.channels,Ky)&&o(e)})),ia((e=>{o(e)}))],"normal"===e.mode?[Zs(rs(),(e=>{Ws(e,Yy)})),Zs(vs(),(e=>{Ws(e,Jy)})),Zs(ns(),(e=>{Ws(e,Yy)})),Zs(ts(),(e=>{Ws(e,Jy)}))]:[Zs(Ps(),((e,t)=>{Ws(e,Yy)})),Zs(Us(),(e=>{Ws(e,Jy)}))]]))}}),tx=[cr("lazySink"),cr("tooltipDom"),_r("exclusive",!0),_r("tooltipComponents",[]),_r("delay",300),Ar("mode","normal",["normal","follow-highlight"]),_r("anchor",(e=>({type:"hotspot",hotspot:e,layouts:{onLtr:x([Al,Dl,Cl,Tl,_l,El]),onRtl:x([Al,Dl,Cl,Tl,_l,El])}}))),Zi("onHide"),Zi("onShow")];var ox=Object.freeze({__proto__:null,init:()=>{const e=Sc(),t=Sc(),o=()=>{e.on(clearTimeout)},n=x("not-implemented");return Na({getTooltip:t.get,isShowing:t.isSet,setTooltip:t.set,clearTooltip:t.clear,clearTimer:o,resetTimer:(t,n)=>{o(),e.set(setTimeout(t,n))},readState:n})}});const nx=ql({fields:tx,name:"tooltipping",active:ex,state:ox,apis:Qy}),rx="silver.readonly",sx=Vn([(ax="readonly",dr(ax,$n))]);var ax;const ix=(e,t)=>{const o=e.mainUi.outerContainer.element,n=[e.mainUi.mothership,...e.uiMotherships];t&&L(n,(e=>{e.broadcastOn([Eu()],{target:o})})),L(n,(e=>{e.broadcastOn([rx],{readonly:t})}))},lx=(e,t)=>{e.on("init",(()=>{e.mode.isReadOnly()&&ix(t,!0)})),e.on("SwitchMode",(()=>ix(t,e.mode.isReadOnly()))),Yf(e)&&e.mode.set("readonly")},cx=()=>Jl.config({channels:{[rx]:{schema:sx,onReceive:(e,t)=>{fg.set(e,t.readonly)}}}}),dx=e=>fg.config({disabled:e,disableClass:"tox-collection__item--state-disabled"}),ux=e=>fg.config({disabled:e}),mx=e=>fg.config({disabled:e,disableClass:"tox-tbtn--disabled"}),gx=e=>fg.config({disabled:e,disableClass:"tox-tbtn--disabled",useNative:!1}),px=(e,t)=>{const o=e.getApi(t);return e=>{e(o)}},hx=(e,t)=>aa((o=>{px(e,o)((o=>{const n=e.onSetup(o);p(n)&&t.set(n)}))})),fx=(e,t)=>ia((o=>px(e,o)(t.get()))),bx=(e,t)=>ca(((o,n)=>{px(e,o)(e.onAction),e.triggersSubmenu||t!==Zb.CLOSE_ON_EXECUTE||(o.getSystem().isConnected()&&Ws(o,Cs()),n.stop())})),vx={[ws()]:["disabling","alloy.base.behaviour","toggling","item-events"]},yx=we,xx=(e,t,o,n)=>{const r=Rr(b);return{type:"item",dom:t.dom,components:yx(t.optComponents),data:e.data,eventOrder:vx,hasSubmenu:e.triggersSubmenu,itemBehaviours:Gl([Fh("item-events",[bx(e,o),hx(e,r),fx(e,r)]),dx((()=>!e.enabled||n.isDisabled())),cx(),Bh.config({})].concat(e.itemBehaviours))}},wx=e=>({value:e.value,meta:{text:e.text.getOr(""),...e.meta}}),Sx=e=>{const t=$f.os.isMacOS()||$f.os.isiOS(),o=t?{alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"}:{meta:"Ctrl",access:"Shift+Alt"},n=e.split("+"),r=H(n,(e=>{const t=e.toLowerCase().trim();return ve(o,t)?o[t]:e}));return t?r.join(""):r.join("+")},kx=(e,t,o=[rv])=>Hf(e,{tag:"div",classes:o},t),Ox=e=>({dom:{tag:"div",classes:[sv]},components:[xi(Af.translate(e))]}),Cx=(e,t)=>({dom:{tag:"div",classes:t,innerHtml:e}}),_x=(e,t)=>({dom:{tag:"div",classes:[sv]},components:[{dom:{tag:e.tag,styles:e.styles},components:[xi(Af.translate(t))]}]}),Tx=e=>({dom:{tag:"div",classes:["tox-collection__item-accessory"]},components:[xi(Sx(e))]}),Ex=e=>kx("checkmark",e,["tox-collection__item-checkmark"]),Dx=(e,t,o)=>{const n=e.ariaLabel,r=e.value,s=e.iconContent.map((e=>((e,t,o)=>{const n=t();return Rf(e,n).or(o).getOrThunk(Ff(n))})(e,t.icons,o)));return{dom:(()=>{const e=s.getOr(""),o=n.map((e=>({title:t.translate(e)}))).getOr({}),a={tag:"div",attributes:o,classes:["tox-swatch"]};return"custom"===r?{...a,tag:"button",classes:[...a.classes,"tox-swatches__picker-btn"],innerHtml:e}:"remove"===r?{...a,classes:[...a.classes,"tox-swatch--remove"],innerHtml:e}:g(r)?{...a,attributes:{...a.attributes,"data-mce-color":r},styles:{"background-color":r},innerHtml:e}:a})(),optComponents:[]}},Ax=e=>{const t=e.map((e=>({attributes:{title:Af.translate(e)}}))).getOr({});return{tag:"div",classes:[Qb,ev],...t}},Mx=(e,t,o,n=D.none())=>"color"===e.presets?Dx(e,t,n):((e,t,o,n)=>{const r={tag:"div",classes:[rv]},s=o?e.iconContent.map((e=>Hf(e,r,t.icons,n))).orThunk((()=>D.some({dom:r}))):D.none(),a=e.checkMark,i=D.from(e.meta).fold((()=>Ox),(e=>ve(e,"style")?k(_x,e.style):Ox)),l=e.htmlContent.fold((()=>e.textContent.map(i)),(e=>D.some(Cx(e,[sv]))));return{dom:Ax(e.ariaLabel),optComponents:[s,l,e.shortcutContent.map(Tx),a,e.caret]}})(e,t,o,n),Bx=(e,t)=>be(e,"tooltipWorker").map((e=>[nx.config({lazySink:t.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:e=>({type:"submenu",item:e,overrides:{maxHeightFunction:Nc}}),mode:"follow-highlight",onShow:(t,o)=>{e((e=>{nx.setComponents(t,[wi({element:Ie.fromDom(e)})])}))}})])).getOr([]),Fx=(e,t)=>{const o=(e=>jf.DOM.encode(e))(Af.translate(e));if(t.length>0){const e=new RegExp((e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t),"gi");return o.replace(e,(e=>`<span class="tox-autocompleter-highlight">${e}</span>`))}return o},Ix=(e,t)=>H(e,(e=>{switch(e.type){case"cardcontainer":return((e,t)=>{const o="vertical"===e.direction?"tox-collection__item-container--column":cv,n="left"===e.align?"tox-collection__item-container--align-left":"tox-collection__item-container--align-right";return{dom:{tag:"div",classes:[lv,o,n,(()=>{switch(e.valign){case"top":return"tox-collection__item-container--valign-top";case"middle":return"tox-collection__item-container--valign-middle";case"bottom":return"tox-collection__item-container--valign-bottom"}})()]},components:t}})(e,Ix(e.items,t));case"cardimage":return((e,t,o)=>({dom:{tag:"img",classes:t,attributes:{src:e,alt:o.getOr("")}}}))(e.src,e.classes,e.alt);case"cardtext":const o=e.name.exists((e=>R(t.cardText.highlightOn,e))),n=o?D.from(t.cardText.matchText).getOr(""):"";return Cx(Fx(e.text,n),e.classes)}})),Rx=Am(cf(),df()),Nx=e=>({value:Lx(e)}),Vx=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,zx=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Hx=e=>Vx.test(e)||zx.test(e),Lx=e=>_e(e,"#").toUpperCase(),Px=e=>{const t=(e=>{const t=e.value.replace(Vx,((e,t,o,n)=>t+t+o+o+n+n));return{value:t}})(e),o=zx.exec(t.value);return null===o?["FFFFFF","FF","FF","FF"]:o},Ux=e=>{const t=e.toString(16);return(1===t.length?"0"+t:t).toUpperCase()},Wx=e=>{const t=Ux(e.red)+Ux(e.green)+Ux(e.blue);return Nx(t)},jx=Math.min,Gx=Math.max,$x=Math.round,qx=/^\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)\s*$/i,Xx=/^\s*rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?(?:\.\d+)?)\s*\)\s*$/i,Kx=(e,t,o,n)=>({red:e,green:t,blue:o,alpha:n}),Yx=e=>{const t=parseInt(e,10);return t.toString()===e&&t>=0&&t<=255},Jx=e=>{let t,o,n;const r=(e.hue||0)%360;let s=e.saturation/100,a=e.value/100;if(s=Gx(0,jx(s,1)),a=Gx(0,jx(a,1)),0===s)return t=o=n=$x(255*a),Kx(t,o,n,1);const i=r/60,l=a*s,c=l*(1-Math.abs(i%2-1)),d=a-l;switch(Math.floor(i)){case 0:t=l,o=c,n=0;break;case 1:t=c,o=l,n=0;break;case 2:t=0,o=l,n=c;break;case 3:t=0,o=c,n=l;break;case 4:t=c,o=0,n=l;break;case 5:t=l,o=0,n=c;break;default:t=o=n=0}return t=$x(255*(t+d)),o=$x(255*(o+d)),n=$x(255*(n+d)),Kx(t,o,n,1)},Zx=e=>{const t=Px(e),o=parseInt(t[1],16),n=parseInt(t[2],16),r=parseInt(t[3],16);return Kx(o,n,r,1)},Qx=(e,t,o,n)=>{const r=parseInt(e,10),s=parseInt(t,10),a=parseInt(o,10),i=parseFloat(n);return Kx(r,s,a,i)},ew=e=>{if("transparent"===e)return D.some(Kx(0,0,0,0));const t=qx.exec(e);if(null!==t)return D.some(Qx(t[1],t[2],t[3],"1"));const o=Xx.exec(e);return null!==o?D.some(Qx(o[1],o[2],o[3],o[4])):D.none()},tw=e=>`rgba(${e.red},${e.green},${e.blue},${e.alpha})`,ow=Kx(255,0,0,1),nw=(e,t)=>{e.dispatch("ResizeContent",t)},rw=(e,t)=>{e.dispatch("TextColorChange",t)},sw=(e,t)=>e.dispatch("ResolveName",{name:t.nodeName.toLowerCase(),target:t});var aw=tinymce.util.Tools.resolve("tinymce.util.LocalStorage");const iw={},lw=e=>be(iw,e).getOrThunk((()=>{const t=`tinymce-custom-colors-${e}`,o=aw.getItem(t);if(m(o)){const e=aw.getItem("tinymce-custom-colors");aw.setItem(t,g(e)?e:"[]")}const n=((e,t=10)=>{const o=aw.getItem(e),n=s(o)?JSON.parse(o):[],r=t-(a=n).length<0?a.slice(0,t):a;var a;const i=e=>{r.splice(e,1)};return{add:o=>{I(r,o).each(i),r.unshift(o),r.length>t&&r.pop(),aw.setItem(e,JSON.stringify(r))},state:()=>r.slice(0)}})(t,10);return iw[e]=n,n})),cw=(e,t)=>{lw(e).add(t)},dw=(e,t,o)=>({hue:e,saturation:t,value:o}),uw=e=>{let t=0,o=0,n=0;const r=e.red/255,s=e.green/255,a=e.blue/255,i=Math.min(r,Math.min(s,a)),l=Math.max(r,Math.max(s,a));if(i===l)return n=i,dw(0,0,100*n);return t=r===i?3:a===i?1:5,t=60*(t-(r===i?s-a:a===i?r-s:a-r)/(l-i)),o=(l-i)/l,n=l,dw(Math.round(t),Math.round(100*o),Math.round(100*n))},mw=e=>Wx(Jx(e)),gw=e=>{return(t=e,Hx(t)?D.some({value:Lx(t)}):D.none()).orThunk((()=>ew(e).map(Wx))).getOrThunk((()=>{const t=document.createElement("canvas");t.height=1,t.width=1;const o=t.getContext("2d");o.clearRect(0,0,t.width,t.height),o.fillStyle="#FFFFFF",o.fillStyle=e,o.fillRect(0,0,1,1);const n=o.getImageData(0,0,1,1).data,r=n[0],s=n[1],a=n[2],i=n[3];return Wx(Kx(r,s,a,i))}));var t},pw="forecolor",hw="hilitecolor",fw=e=>Math.max(5,Math.ceil(Math.sqrt(e))),bw=(e,t)=>{const o=fw(t),n=yw("color_cols")(e);return 5===o?n:o},vw=e=>{const t=[];for(let o=0;o<e.length;o+=2)t.push({text:e[o+1],value:"#"+gw(e[o]).value,icon:"checkmark",type:"choiceitem"});return t},yw=e=>t=>t.options.get(e),xw="#000000",ww=(e,t)=>{const o=((e,t)=>t===pw?yw("color_cols_foreground")(e):t===hw?yw("color_cols_background")(e):yw("color_cols")(e))(e,t);return o>0?o:5},Sw=yw("custom_colors"),kw=(e,t)=>t===pw&&e.options.isSet("color_map_foreground")?yw("color_map_foreground")(e):t===hw&&e.options.isSet("color_map_background")?yw("color_map_background")(e):yw("color_map")(e),Ow=yw("color_default_foreground"),Cw=yw("color_default_background"),_w=e=>Wr(e,(e=>{if(We(e)){const t=Ft(e,"background-color");return Oe((e=>ew(e).exists((e=>0!==e.alpha)))(t),t)}return D.none()})).getOr("rgba(0, 0, 0, 0)"),Tw=(e,t)=>{const o=Ie.fromDom(e.selection.getStart()),n="hilitecolor"===t?_w(o):Ft(o,"color");return ew(n).map((e=>"#"+Wx(e).value))},Ew=e=>{const t="choiceitem",o={type:t,text:"Remove color",icon:"color-swatch-remove-color",value:"remove"};return e?[o,{type:t,text:"Custom color",icon:"color-picker",value:"custom"}]:[o]},Dw=(e,t,o,n)=>{if("custom"===o){Nw(e)((o=>{o.each((o=>{cw(t,o),e.execCommand("mceApplyTextcolor",t,o),n(o)}))}),Tw(e,t).getOr(xw))}else"remove"===o?(n(""),e.execCommand("mceRemoveTextcolor",t)):(n(o),e.execCommand("mceApplyTextcolor",t,o))},Aw=(e,t,o)=>e.concat((e=>H(lw(e).state(),(e=>({type:"choiceitem",text:e,icon:"checkmark",value:e}))))(t).concat(Ew(o))),Mw=(e,t,o)=>n=>{n(Aw(e,t,o))},Bw=(e,t,o)=>{const n="forecolor"===t?"tox-icon-text-color__color":"tox-icon-highlight-bg-color__color";e.setIconFill(n,o)},Fw=(e,t)=>o=>{const n=Tw(e,t);return xe(n,o.toUpperCase())},Iw=(e,t,o,n,r)=>{e.ui.registry.addSplitButton(t,{tooltip:n,presets:"color",icon:"forecolor"===t?"text-color":"highlight-bg-color",select:Fw(e,o),columns:ww(e,o),fetch:Mw(kw(e,o),o,Sw(e)),onAction:t=>{Dw(e,o,r.get(),b)},onItemAction:(n,s)=>{Dw(e,o,s,(o=>{r.set(o),rw(e,{name:t,color:o})}))},onSetup:o=>{Bw(o,t,r.get());const n=e=>{e.name===t&&Bw(o,e.name,e.color)};return e.on("TextColorChange",n),()=>{e.off("TextColorChange",n)}}})},Rw=(e,t,o,n,r)=>{e.ui.registry.addNestedMenuItem(t,{text:n,icon:"forecolor"===t?"text-color":"highlight-bg-color",onSetup:e=>(Bw(e,t,r.get()),b),getSubmenuItems:()=>[{type:"fancymenuitem",fancytype:"colorswatch",select:Fw(e,o),initData:{storageKey:o},onAction:n=>{Dw(e,o,n.value,(o=>{r.set(o),rw(e,{name:t,color:o})}))}}]})},Nw=e=>(t,o)=>{let n=!1;const r={colorpicker:o};e.windowManager.open({title:"Color Picker",size:"normal",body:{type:"panel",items:[{type:"colorpicker",name:"colorpicker",label:"Color"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:r,onAction:(e,t)=>{"hex-valid"===t.name&&(n=t.value)},onSubmit:o=>{const r=o.getData().colorpicker;n?(t(D.from(r)),o.close()):e.windowManager.alert(e.translate(["Invalid hex color code: {0}",r]))},onClose:b,onCancel:()=>{t(D.none())}})},Vw=(e,t,o,n,r,s,a,i)=>{const l=Rv(t),c=zw(t,o,n,"color"!==r?"normal":"color",s,a,i);return zv(e,l,c,n,{menuType:r})},zw=(e,t,o,n,r,s,a)=>we(H(e,(i=>{return"choiceitem"===i.type?(l=i,er("choicemenuitem",zy,l)).fold(Nv,(i=>D.some(((e,t,o,n,r,s,a,i=!0)=>{const l=Mx({presets:o,textContent:t?e.text:D.none(),htmlContent:D.none(),ariaLabel:e.text,iconContent:e.icon,shortcutContent:t?e.shortcut:D.none(),checkMark:t?D.some(Ex(a.icons)):D.none(),caret:D.none(),value:e.value},a,i);return xn(xx({data:wx(e),enabled:e.enabled,getApi:e=>({setActive:t=>{$h.set(e,t)},isActive:()=>$h.isOn(e),isEnabled:()=>!fg.isDisabled(e),setEnabled:t=>fg.set(e,!t)}),onAction:t=>n(e.value),onSetup:e=>(e.setActive(r),b),triggersSubmenu:!1,itemBehaviours:[]},l,s,a),{toggling:{toggleClass:nv,toggleOnExecute:!1,selected:e.active,exclusive:!0}})})(i,1===o,n,t,s(i.value),r,a,Rv(e))))):D.none();var l}))),Hw=(e,t)=>{const o=gv(t);if(1===e)return{mode:"menu",moveOnTab:!0};if("auto"===e)return{mode:"grid",selector:"."+o.item,initSize:{numColumns:1,numRows:1}};return{mode:"matrix",rowSelector:"."+("color"===t?"tox-swatches__row":"tox-collection__group"),previousSelector:e=>"color"===t?Bi(e.element,"[aria-checked=true]"):D.none()}},Lw=(e,t)=>{const o=e.initData.allowCustomColors&&t.colorinput.hasCustomColors();return e.initData.colors.fold((()=>Aw(t.colorinput.getColors(e.initData.storageKey),e.initData.storageKey,o)),(e=>e.concat(Ew(o))))},Pw=va("cell-over"),Uw=va("cell-execute"),Ww=(e,t,o)=>{const n=o=>js(o,Uw,{row:e,col:t}),r=(e,t)=>{t.stop(),n(e)};return Oi({dom:{tag:"div",attributes:{role:"button","aria-labelledby":o}},behaviours:Gl([Fh("insert-table-picker-cell",[Zs(ns(),zh.focus),Zs(ws(),n),Zs(ds(),r),Zs(ks(),r)]),$h.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),zh.config({onFocus:o=>js(o,Pw,{row:e,col:t})})])})},jw=e=>X(e,(e=>H(e,Ci))),Gw=(e,t)=>xi(`${t}x${e}`),$w={inserttable:e=>{const t=va("size-label"),o=((e,t,o)=>{const n=[];for(let r=0;r<t;r++){const t=[];for(let n=0;n<o;n++)t.push(Ww(r,n,e));n.push(t)}return n})(t,10,10),n=Gw(0,0),r=Df({dom:{tag:"span",classes:["tox-insert-table-picker__label"],attributes:{id:t}},components:[n],behaviours:Gl([Bh.config({})])});return{type:"widget",data:{value:va("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[Rx.widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:jw(o).concat(r.asSpec()),behaviours:Gl([Fh("insert-table-picker",[aa((e=>{Bh.set(r.get(e),[n])})),oa(Pw,((e,t,n)=>{const{row:s,col:a}=n.event;((e,t,o,n,r)=>{for(let s=0;s<n;s++)for(let n=0;n<r;n++)$h.set(e[s][n],s<=t&&n<=o)})(o,s,a,10,10),Bh.set(r.get(e),[Gw(s+1,a+1)])})),oa(Uw,((t,o,n)=>{const{row:r,col:s}=n.event;e.onAction({numRows:r+1,numColumns:s+1}),Ws(t,Cs())}))]),kh.config({initSize:{numRows:10,numColumns:10},mode:"flatgrid",selector:'[role="button"]'})])})]}},colorswatch:(e,t)=>{const o=Lw(e,t),n=t.colorinput.getColorCols(e.initData.storageKey),r="color",s=Vw(va("menu-value"),o,(t=>{e.onAction({value:t})}),n,r,Zb.CLOSE_ON_EXECUTE,e.select.getOr(T),t.shared.providers),a={...s,markers:gv(r),movement:Hw(n,r)};return{type:"widget",data:{value:va("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[Rx.widget(ff.sketch(a))]}}},qw=(e,t,o,n,r,s,a,i=!0)=>{const l=Mx({presets:n,textContent:D.none(),htmlContent:o?e.text.map((e=>Fx(e,t))):D.none(),ariaLabel:e.text,iconContent:e.icon,shortcutContent:D.none(),checkMark:D.none(),caret:D.none(),value:e.value},a.providers,i,e.icon);return xx({data:wx(e),enabled:e.enabled,getApi:x({}),onAction:t=>r(e.value,e.meta),onSetup:x(b),triggersSubmenu:!1,itemBehaviours:Bx(e.meta,a)},l,s,a.providers)},Xw=e=>({type:"separator",dom:{tag:"div",classes:[ev,"tox-collection__group-heading"]},components:e.text.map(xi).toArray()}),Kw=(e,t,o,n=!0)=>{const r=Mx({presets:"normal",iconContent:e.icon,textContent:e.text,htmlContent:D.none(),ariaLabel:e.text,caret:D.none(),checkMark:D.none(),shortcutContent:e.shortcut},o,n);return xx({data:wx(e),getApi:e=>({isEnabled:()=>!fg.isDisabled(e),setEnabled:t=>fg.set(e,!t)}),enabled:e.enabled,onAction:e.onAction,onSetup:e.onSetup,triggersSubmenu:!1,itemBehaviours:[]},r,t,o)},Yw=(e,t,o,n=!0,r=!1)=>{const s=r?(a=o.icons,kx("chevron-down",a,[av])):(e=>kx("chevron-right",e,[av]))(o.icons);var a;const i=Mx({presets:"normal",iconContent:e.icon,textContent:e.text,htmlContent:D.none(),ariaLabel:e.text,caret:D.some(s),checkMark:D.none(),shortcutContent:e.shortcut},o,n);return xx({data:wx(e),getApi:e=>({isEnabled:()=>!fg.isDisabled(e),setEnabled:t=>fg.set(e,!t),setIconFill:(t,o)=>{Bi(e.element,`svg path[id="${t}"], rect[id="${t}"]`).each((e=>{St(e,"fill",o)}))}}),enabled:e.enabled,onAction:b,onSetup:e.onSetup,triggersSubmenu:!0,itemBehaviours:[]},i,t,o)},Jw=(e,t,o,n=!0)=>{const r=Mx({iconContent:e.icon,textContent:e.text,htmlContent:D.none(),ariaLabel:e.text,checkMark:D.some(Ex(o.icons)),caret:D.none(),shortcutContent:e.shortcut,presets:"normal",meta:e.meta},o,n);return xn(xx({data:wx(e),enabled:e.enabled,getApi:e=>({setActive:t=>{$h.set(e,t)},isActive:()=>$h.isOn(e),isEnabled:()=>!fg.isDisabled(e),setEnabled:t=>fg.set(e,!t)}),onAction:e.onAction,onSetup:e.onSetup,triggersSubmenu:!1,itemBehaviours:[]},r,t,o),{toggling:{toggleClass:nv,toggleOnExecute:!1,selected:e.active}})},Zw=(e,t)=>be($w,e.fancytype).map((o=>o(e,t))),Qw=(e,t,o,n)=>{const r={dom:Ax(e.label),optComponents:[D.some({dom:{tag:"div",classes:[lv,cv]},components:Ix(e.items,n)})]};return xx({data:wx({text:D.none(),...e}),enabled:e.enabled,getApi:e=>({isEnabled:()=>!fg.isDisabled(e),setEnabled:t=>{fg.set(e,!t),L(Sd(e.element,"*"),(o=>{e.getSystem().getByDom(o).each((e=>{e.hasConfigured(fg)&&fg.set(e,!t)}))}))}}),onAction:e.onAction,onSetup:e.onSetup,triggersSubmenu:!1,itemBehaviours:D.from(n.itemBehaviours).getOr([])},r,t,o.providers)};var eS=Object.freeze({__proto__:null,getCoupled:(e,t,o,n)=>o.getOrCreate(e,t,n),getExistingCoupled:(e,t,o,n)=>o.getExisting(e,t,n)}),tS=[dr("others",Qn(tn.value,Un()))];var oS=Object.freeze({__proto__:null,init:()=>{const e={},t=(t,o)=>{if(0===ae(t.others).length)throw new Error("Cannot find any known coupled components");return be(e,o)},o=x({});return Na({readState:o,getExisting:(e,o,n)=>t(o,n).orThunk((()=>(be(o.others,n).getOrDie("No information found for coupled component: "+n),D.none()))),getOrCreate:(o,n,r)=>t(n,r).getOrThunk((()=>{const t=be(n.others,r).getOrDie("No information found for coupled component: "+r)(o),s=o.getSystem().build(t);return e[r]=s,s}))})}});const nS=ql({fields:tS,name:"coupling",apis:eS,state:oS}),rS=e=>{let t=D.none(),o=[];const n=e=>{r()?a(e):o.push(e)},r=()=>t.isSome(),s=e=>{L(e,a)},a=e=>{t.each((t=>{setTimeout((()=>{e(t)}),0)}))};return e((e=>{r()||(t=D.some(e),s(o),o=[])})),{get:n,map:e=>rS((t=>{n((o=>{t(e(o))}))})),isReady:r}},sS={nu:rS,pure:e=>rS((t=>{t(e)}))},aS=e=>{setTimeout((()=>{throw e}),0)},iS=e=>{const t=t=>{e().then(t,aS)};return{map:t=>iS((()=>e().then(t))),bind:t=>iS((()=>e().then((e=>t(e).toPromise())))),anonBind:t=>iS((()=>e().then((()=>t.toPromise())))),toLazy:()=>sS.nu(t),toCached:()=>{let t=null;return iS((()=>(null===t&&(t=e()),t)))},toPromise:e,get:t}},lS=e=>iS((()=>new Promise(e))),cS=e=>iS((()=>Promise.resolve(e))),dS=x("sink"),uS=x(Cm({name:dS(),overrides:x({dom:{tag:"div"},behaviours:Gl([eu.config({useFixed:E})]),events:Ks([na(as()),na(Qr()),na(ds())])})})),mS=(e,t)=>{const o=e.getHotspot(t).getOr(t),n="hotspot",r=e.getAnchorOverrides();return e.layouts.fold((()=>({type:n,hotspot:o,overrides:r})),(e=>({type:n,hotspot:o,overrides:r,layouts:e})))},gS=(e,t,o,n,r,s,a)=>{const i=((e,t,o,n,r,s,a)=>{const i=((e,t,o)=>(0,e.fetch)(o).map(t))(e,t,n),l=bS(n,e);return i.map((e=>e.bind((e=>D.from(Cf.sketch({...s.menu(),uid:Ca(""),data:e,highlightOnOpen:a,onOpenMenu:(e,t)=>{const n=l().getOrDie();eu.position(n,t,{anchor:o}),Tu.decloak(r)},onOpenSubmenu:(e,t,o)=>{const n=l().getOrDie();eu.position(n,o,{anchor:{type:"submenu",item:t}}),Tu.decloak(r)},onRepositionMenu:(e,t,n)=>{const r=l().getOrDie();eu.position(r,t,{anchor:o}),L(n,(e=>{eu.position(r,e.triggeredMenu,{anchor:{type:"submenu",item:e.triggeringItem}})}))},onEscape:()=>(zh.focus(n),Tu.close(r),D.some(!0))}))))))})(e,t,mS(e,o),o,n,r,a);return i.map((e=>(e.fold((()=>{Tu.isOpen(n)&&Tu.close(n)}),(e=>{Tu.cloak(n),Tu.open(n,e),s(n)})),n)))},pS=(e,t,o,n,r,s,a)=>(Tu.close(n),cS(n)),hS=(e,t,o,n,r,s)=>{const a=nS.getCoupled(o,"sandbox");return(Tu.isOpen(a)?pS:gS)(e,t,o,a,n,r,s)},fS=(e,t,o)=>{const n=og.getCurrent(t).getOr(t),r=Yt(e.element);o?At(n.element,"min-width",r+"px"):((e,t)=>{Kt.set(e,t)})(n.element,r)},bS=(e,t)=>e.getSystem().getByUid(t.uid+"-"+dS()).map((e=>()=>tn.value(e))).getOrThunk((()=>t.lazySink.fold((()=>()=>tn.error(new Error("No internal sink is specified, nor could an external sink be found"))),(t=>()=>t(e))))),vS=e=>{Tu.getState(e).each((e=>{Cf.repositionMenus(e)}))},yS=(e,t,o)=>{const n=Ri(),r=bS(t,e);return{dom:{tag:"div",classes:e.sandboxClasses,attributes:{id:n.id,role:"listbox"}},behaviours:Zu(e.sandboxBehaviours,[qu.config({store:{mode:"memory",initialValue:t}}),Tu.config({onOpen:(r,s)=>{const a=mS(e,t);n.link(t.element),e.matchWidth&&fS(a.hotspot,s,e.useMinWidth),e.onOpen(a,r,s),void 0!==o&&void 0!==o.onOpen&&o.onOpen(r,s)},onClose:(e,r)=>{n.unlink(t.element),void 0!==o&&void 0!==o.onClose&&o.onClose(e,r)},isPartOf:(e,o,n)=>Vi(o,n)||Vi(t,n),getAttachPoint:()=>r().getOrDie()}),og.config({find:e=>Tu.getState(e).bind((e=>og.getCurrent(e)))}),Jl.config({channels:{...Bu({isExtraPart:T}),...Iu({doReposition:vS})}})])}},xS=e=>{const t=nS.getCoupled(e,"sandbox");vS(t)},wS=()=>[_r("sandboxClasses",[]),Ju("sandboxBehaviours",[og,Jl,Tu,qu])],SS=x([cr("dom"),cr("fetch"),Zi("onOpen"),Qi("onExecute"),_r("getHotspot",D.some),_r("getAnchorOverrides",x({})),Xc(),Xu("dropdownBehaviours",[$h,nS,kh,zh]),cr("toggleClass"),_r("eventOrder",{}),vr("lazySink"),_r("matchWidth",!1),_r("useMinWidth",!1),vr("role")].concat(wS())),kS=x([Om({schema:[Ki(),_r("fakeFocus",!1)],name:"menu",defaults:e=>({onExecute:e.onExecute})}),uS()]),OS=Zm({name:"Dropdown",configFields:SS(),partFields:kS(),factory:(e,t,o,n)=>{const r=e=>{Tu.getState(e).each((e=>{Cf.highlightPrimary(e)}))},s=(t,o,r)=>hS(e,w,t,n,o,r),a={expand:e=>{$h.isOn(e)||s(e,b,kf.HighlightNone).get(b)},open:e=>{$h.isOn(e)||s(e,b,kf.HighlightMenuAndItem).get(b)},refetch:t=>nS.getExistingCoupled(t,"sandbox").fold((()=>s(t,b,kf.HighlightMenuAndItem).map(b)),(o=>gS(e,w,t,o,n,b,kf.HighlightMenuAndItem).map(b))),isOpen:$h.isOn,close:e=>{$h.isOn(e)&&s(e,b,kf.HighlightMenuAndItem).get(b)},repositionMenus:e=>{$h.isOn(e)&&xS(e)}},i=(e,t)=>(Gs(e),D.some(!0));return{uid:e.uid,dom:e.dom,components:t,behaviours:Yu(e.dropdownBehaviours,[$h.config({toggleClass:e.toggleClass,aria:{mode:"expanded"}}),nS.config({others:{sandbox:t=>yS(e,t,{onOpen:()=>$h.on(t),onClose:()=>$h.off(t)})}}),kh.config({mode:"special",onSpace:i,onEnter:i,onDown:(e,t)=>{if(OS.isOpen(e)){const t=nS.getCoupled(e,"sandbox");r(t)}else OS.open(e);return D.some(!0)},onEscape:(e,t)=>OS.isOpen(e)?(OS.close(e),D.some(!0)):D.none()}),zh.config({})]),events:Kh(D.some((e=>{s(e,r,kf.HighlightMenuAndItem).get(b)}))),eventOrder:{...e.eventOrder,[ws()]:["disabling","toggling","alloy.base.behaviour"]},apis:a,domModification:{attributes:{"aria-haspopup":"true",...e.role.fold((()=>({})),(e=>({role:e}))),..."button"===e.dom.tag?{type:(l="type",be(e.dom,"attributes").bind((e=>be(e,l)))).getOr("button")}:{}}}};var l},apis:{open:(e,t)=>e.open(t),refetch:(e,t)=>e.refetch(t),expand:(e,t)=>e.expand(t),close:(e,t)=>e.close(t),isOpen:(e,t)=>e.isOpen(t),repositionMenus:(e,t)=>e.repositionMenus(t)}}),CS=e=>{const t=qu.getValue(e),o=Cv(e).map(Tv);OS.refetch(t).get((()=>{const e=nS.getCoupled(t,"sandbox");o.each((t=>Cv(e).each((e=>((e,t)=>{qu.setValue(e,t.fetchPattern),e.element.dom.selectionStart=t.selectionStart,e.element.dom.selectionEnd=t.selectionEnd})(e,t)))))}))},_S=e=>Tu.getState(e).bind(Tg.getHighlighted).bind(Tg.getHighlighted),TS=(e,t,o)=>{_v(e).each((e=>{((e,t)=>{Ct(t.element,"id").each((t=>St(e.element,"aria-activedescendant",t)))})(e,o);var n;(oi((n=t).element,Dv)?D.some(n.element):Bi(n.element,"."+Dv)).each((t=>{Ct(t,"id").each((t=>St(e.element,"aria-controls",t)))}))})),St(o.element,"aria-selected","true")},ES=(e,t,o)=>{St(o.element,"aria-selected","false")},DS=e=>nS.getExistingCoupled(e,"sandbox").bind(Cv).map(Tv).map((e=>e.fetchPattern)).getOr("");var AS;!function(e){e[e.ContentFocus=0]="ContentFocus",e[e.UiFocus=1]="UiFocus"}(AS||(AS={}));const MS=(e,t,o,n,r)=>{const s=o.shared.providers,a=e=>r?{...e,shortcut:D.none(),icon:e.text.isSome()?D.none():e.icon}:e;switch(e.type){case"menuitem":return(i=e,er("menuitem",Wy,i)).fold(Nv,(e=>D.some(Kw(a(e),t,s,n))));case"nestedmenuitem":return(e=>er("nestedmenuitem",jy,e))(e).fold(Nv,(e=>D.some(Yw(a(e),t,s,n,r))));case"togglemenuitem":return(e=>er("togglemenuitem",Gy,e))(e).fold(Nv,(e=>D.some(Jw(a(e),t,s,n))));case"separator":return(e=>er("separatormenuitem",gy,e))(e).fold(Nv,(e=>D.some(Xw(e))));case"fancymenuitem":return(e=>er("fancymenuitem",Uy,e))(e).fold(Nv,(e=>Zw(e,o)));default:return console.error("Unknown item in general menu",e),D.none()}var i},BS=(e,t,o,n,r,s,a)=>{const i=1===n,l=!i||Rv(e);return we(H(e,(e=>{switch(e.type){case"separator":return(n=e,er("Autocompleter.Separator",gy,n)).fold(Nv,(e=>D.some(Xw(e))));case"cardmenuitem":return(e=>er("cardmenuitem",Vy,e))(e).fold(Nv,(e=>D.some(Qw({...e,onAction:t=>{e.onAction(t),o(e.value,e.meta)}},r,s,{itemBehaviours:Bx(e.meta,s),cardText:{matchText:t,highlightOn:a}}))));default:return(e=>er("Autocompleter.Item",py,e))(e).fold(Nv,(e=>D.some(qw(e,t,i,"normal",o,r,s,l))))}var n})))},FS=(e,t,o,n,r,s)=>{const a=Rv(t),i=we(H(t,(e=>{const t=e=>MS(e,o,n,(e=>r?!ve(e,"text"):a)(e),r);return"nestedmenuitem"===e.type&&e.getSubmenuItems().length<=0?t({...e,enabled:!1}):t(e)}))),l=(e=>"no-search"===e.searchMode?{menuType:"normal"}:{menuType:"searchable",searchMode:e})(s);return(r?Vv:zv)(e,a,i,1,l)},IS=e=>Cf.singleData(e.value,e),RS=(e,t)=>{const o=Rr(!1),n=Rr(!1),r=Oi(_f.sketch({dom:{tag:"div",classes:["tox-autocompleter"]},components:[],fireDismissalEventInstead:{},inlineBehaviours:Gl([Fh("dismissAutocompleter",[Zs(Is(),(()=>c()))])]),lazySink:t.getSink})),s=()=>_f.isOpen(r),a=n.get,i=()=>{s()&&_f.hide(r)},l=()=>_f.getContent(r).bind((e=>te(e.components(),0))),c=()=>e.execCommand("mceAutocompleterClose"),d=n=>{const r=se(n,(e=>D.from(e.columns))).getOr(1);return X(n,(n=>{const s=n.items;return BS(s,n.matchText,((t,r)=>{const s=e.selection.getRng();((e,t)=>Kb(Ie.fromDom(t.startContainer)).map((t=>{const o=e.createRng();return o.selectNode(t.dom),o})))(e.dom,s).each((s=>{const a={hide:()=>c(),reload:t=>{i(),e.execCommand("mceAutocompleterReload",!1,{fetchOptions:t})}};o.set(!0),n.onAction(a,s,t,r),o.set(!1)}))}),r,Zb.BUBBLE_TO_SANDBOX,t,n.highlightOn)}))},u=(t,o)=>{var n;(n=Ie.fromDom(e.getBody()),Bi(n,Xb)).each((n=>{const s=se(t,(e=>D.from(e.columns))).getOr(1);_f.showMenuAt(r,{anchor:{type:"node",root:Ie.fromDom(e.getBody()),node:D.from(n)}},((e,t,o,n)=>{const r=Hw(t,n),s=gv(n);return{data:IS({...e,movement:r,menuBehaviours:Xy("auto"!==t?[]:[aa(((e,t)=>{$y(e,4,s.item).each((({numColumns:t,numRows:o})=>{kh.setGridSize(e,o,t)}))}))])}),menu:{markers:gv(n),fakeFocus:o===AS.ContentFocus}}})(zv("autocompleter-value",!0,o,s,{menuType:"normal"}),s,AS.ContentFocus,"normal"))})),l().each(Tg.highlightFirst)},m=e=>{const t=d(e);t.length>0?u(e,t):i()};e.on("AutocompleterStart",(({lookupData:e})=>{n.set(!0),o.set(!1),m(e)})),e.on("AutocompleterUpdate",(({lookupData:e})=>m(e))),e.on("AutocompleterEnd",(()=>{i(),n.set(!1),o.set(!1)}));const g={cancelIfNecessary:c,isMenuOpen:s,isActive:a,isProcessingAction:o.get,getMenu:l};Yb(g,e)},NS=["visible","hidden"],VS=e=>{if(Ue(e)){const t=Ft(e,"overflow");return Ae(t).length>0&&!R(NS,t)}return!1},zS=(e,t)=>Gb(e)?(e=>{const t=wd(e,VS);return oe(t).map((e=>({element:e,others:t.slice(1)})))})(t):D.none(),HS=e=>{const t=[...H(e.others,Xo),Jo()];return((e,t)=>j(t,((e,t)=>Yo(e,t)),e))(Xo(e.element),t)},LS=(e,t,o)=>Fi(e,t,o).isSome(),PS=(e,t)=>{let o=null;return{cancel:()=>{null!==o&&(clearTimeout(o),o=null)},schedule:(...n)=>{o=setTimeout((()=>{e.apply(null,n),o=null}),t)}}},US=e=>{const t=e.raw;return void 0===t.touches||1!==t.touches.length?D.none():D.some(t.touches[0])},WS=e=>{const t=Sc(),o=Rr(!1),n=PS((t=>{e.triggerEvent(Os(),t),o.set(!0)}),400),r=Hr([{key:Kr(),value:e=>(US(e).each((r=>{n.cancel();const s={x:r.clientX,y:r.clientY,target:e.target};n.schedule(e),o.set(!1),t.set(s)})),D.none())},{key:Yr(),value:e=>(n.cancel(),US(e).each((e=>{t.on((o=>{((e,t)=>{const o=Math.abs(e.clientX-t.x),n=Math.abs(e.clientY-t.y);return o>5||n>5})(e,o)&&t.clear()}))})),D.none())},{key:Jr(),value:r=>{n.cancel();return t.get().filter((e=>Ye(e.target,r.target))).map((t=>o.get()?(r.prevent(),!1):e.triggerEvent(ks(),r)))}}]);return{fireIfReady:(e,t)=>be(r,t).bind((t=>t(e)))}},jS=(e,t)=>{const o={stopBackspace:!0,...t},n=WS(o),r=H(["touchstart","touchmove","touchend","touchcancel","gesturestart","mousedown","mouseup","mouseover","mousemove","mouseout","click"].concat(["selectstart","input","contextmenu","change","transitionend","transitioncancel","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),(t=>Oc(e,t,(e=>{n.fireIfReady(e,t).each((t=>{t&&e.kill()}));o.triggerEvent(t,e)&&e.kill()})))),s=Sc(),a=Oc(e,"paste",(e=>{n.fireIfReady(e,"paste").each((t=>{t&&e.kill()}));o.triggerEvent("paste",e)&&e.kill(),s.set(setTimeout((()=>{o.triggerEvent(ys(),e)}),0))})),i=Oc(e,"keydown",(e=>{o.triggerEvent("keydown",e)?e.kill():o.stopBackspace&&(e=>e.raw.which===Eg[0]&&!R(["input","textarea"],Le(e.target))&&!LS(e.target,'[contenteditable="true"]'))(e)&&e.prevent()})),l=Oc(e,"focusin",(e=>{o.triggerEvent("focusin",e)&&e.kill()})),c=Sc(),d=Oc(e,"focusout",(e=>{o.triggerEvent("focusout",e)&&e.kill(),c.set(setTimeout((()=>{o.triggerEvent(vs(),e)}),0))}));return{unbind:()=>{L(r,(e=>{e.unbind()})),i.unbind(),l.unbind(),d.unbind(),a.unbind(),s.on(clearTimeout),c.on(clearTimeout)}}},GS=(e,t)=>{const o=be(e,"target").getOr(t);return Rr(o)},$S=Nr([{stopped:[]},{resume:["element"]},{complete:[]}]),qS=(e,t,o,n,r,s)=>{const a=e(t,n),i=((e,t)=>{const o=Rr(!1),n=Rr(!1);return{stop:()=>{o.set(!0)},cut:()=>{n.set(!0)},isStopped:o.get,isCut:n.get,event:e,setSource:t.set,getSource:t.get}})(o,r);return a.fold((()=>(s.logEventNoHandlers(t,n),$S.complete())),(e=>{const o=e.descHandler;return Ha(o)(i),i.isStopped()?(s.logEventStopped(t,e.element,o.purpose),$S.stopped()):i.isCut()?(s.logEventCut(t,e.element,o.purpose),$S.complete()):ot(e.element).fold((()=>(s.logNoParent(t,e.element,o.purpose),$S.complete())),(n=>(s.logEventResponse(t,e.element,o.purpose),$S.resume(n))))}))},XS=(e,t,o,n,r,s)=>qS(e,t,o,n,r,s).fold(E,(n=>XS(e,t,o,n,r,s)),T),KS=(e,t,o)=>{const n=(e=>{const t=Rr(!1);return{stop:()=>{t.set(!0)},cut:b,isStopped:t.get,isCut:T,event:e,setSource:C("Cannot set source of a broadcasted event"),getSource:C("Cannot get source of a broadcasted event")}})(t);return L(e,(e=>{const t=e.descHandler;Ha(t)(n)})),n.isStopped()},YS=(e,t,o,n,r)=>{const s=GS(o,n);return XS(e,t,o,n,s,r)},JS=()=>{const e={};return{registerId:(t,o,n)=>{le(n,((n,r)=>{const s=void 0!==e[r]?e[r]:{};s[o]=((e,t)=>{return o=k.apply(void 0,[e.handler].concat(t)),n=e.purpose,{cHandler:o,purpose:n};var o,n})(n,t),e[r]=s}))},unregisterId:t=>{le(e,((e,o)=>{ve(e,t)&&delete e[t]}))},filterByType:t=>be(e,t).map((e=>pe(e,((e,t)=>((e,t)=>({id:e,descHandler:t}))(t,e))))).getOr([]),find:(t,o,n)=>be(e,o).bind((e=>Wr(n,(t=>((e,t)=>Oa(t).bind((t=>be(e,t))).map((e=>((e,t)=>({element:e,descHandler:t}))(t,e))))(e,t)),t)))}},ZS=()=>{const e=JS(),t={},o=e=>{const t=e.element;return Oa(t).getOrThunk((()=>((e,t)=>{const o=va(wa+e);return ka(t,o),o})("uid-",e.element)))},n=o=>{Oa(o.element).each((o=>{delete t[o],e.unregisterId(o)}))};return{find:(t,o,n)=>e.find(t,o,n),filter:t=>e.filterByType(t),register:r=>{const s=o(r);ye(t,s)&&((e,o)=>{const r=t[o];if(r!==e)throw new Error('The tagId "'+o+'" is already used by: '+pa(r.element)+"\nCannot use it for: "+pa(e.element)+"\nThe conflicting element is"+(vt(r.element)?" ":" not ")+"already in the DOM");n(e)})(r,s);const a=[r];e.registerId(a,s,r.events),t[s]=r},unregister:n,getById:e=>be(t,e)}},QS=Jm({name:"Container",factory:e=>{const{attributes:t,...o}=e.dom;return{uid:e.uid,dom:{tag:"div",attributes:{role:"presentation",...t},...o},components:e.components,behaviours:Ku(e.containerBehaviours),events:e.events,domModification:e.domModification,eventOrder:e.eventOrder}},configFields:[_r("components",[]),Xu("containerBehaviours",[]),_r("events",{}),_r("domModification",{}),_r("eventOrder",{})]}),ek=e=>{const t=t=>ot(e.element).fold(E,(e=>Ye(t,e))),o=ZS(),n=(e,n)=>o.find(t,e,n),r=jS(e.element,{triggerEvent:(e,t)=>Wi(e,t.target,(o=>((e,t,o,n)=>YS(e,t,o,o.target,n))(n,e,t,o)))}),s={debugInfo:x("real"),triggerEvent:(e,t,o)=>{Wi(e,t,(r=>YS(n,e,o,t,r)))},triggerFocus:(e,t)=>{Oa(e).fold((()=>{Ql(e)}),(o=>{Wi(bs(),e,(o=>(((e,t,o,n,r)=>{const s=GS(o,n);qS(e,t,o,n,s,r)})(n,bs(),{originator:t,kill:b,prevent:b,target:e},e,o),!1)))}))},triggerEscape:(e,t)=>{s.triggerEvent("keydown",e.element,t.event)},getByUid:e=>p(e),getByDom:e=>h(e),build:Oi,buildOrPatch:ki,addToGui:e=>{l(e)},removeFromGui:e=>{c(e)},addToWorld:e=>{a(e)},removeFromWorld:e=>{i(e)},broadcast:e=>{u(e)},broadcastOn:(e,t)=>{m(e,t)},broadcastEvent:(e,t)=>{g(e,t)},isConnected:E},a=e=>{e.connect(s),je(e.element)||(o.register(e),L(e.components(),a),s.triggerEvent(Ts(),e.element,{target:e.element}))},i=e=>{je(e.element)||(L(e.components(),i),o.unregister(e)),e.disconnect()},l=t=>{lu(e,t)},c=e=>{uu(e)},d=e=>{const t=o.filter(xs());L(t,(t=>{const o=t.descHandler;Ha(o)(e)}))},u=e=>{d({universal:!0,data:e})},m=(e,t)=>{d({universal:!1,channels:e,data:t})},g=(e,t)=>{const n=o.filter(e);return KS(n,t)},p=e=>o.getById(e).fold((()=>tn.error(new Error('Could not find component with uid: "'+e+'" in system.'))),tn.value),h=e=>{const t=Oa(e).getOr("not found");return p(t)};return a(e),{root:e,element:e.element,destroy:()=>{r.unbind(),zo(e.element)},add:l,remove:c,getByUid:p,getByDom:h,addToWorld:a,removeFromWorld:i,broadcast:u,broadcastOn:m,broadcastEvent:g}},tk=x([_r("prefix","form-field"),Xu("fieldBehaviours",[og,qu])]),ok=x([Cm({schema:[cr("dom")],name:"label"}),Cm({factory:{sketch:e=>({uid:e.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:e.text}})},schema:[cr("text")],name:"aria-descriptor"}),km({factory:{sketch:e=>{const t=Vr(e,["factory"]);return e.factory.sketch(t)}},schema:[cr("factory")],name:"field"})]),nk=Zm({name:"FormField",configFields:tk(),partFields:ok(),factory:(e,t,o,n)=>{const r=Yu(e.fieldBehaviours,[og.config({find:t=>Vm(t,e,"field")}),qu.config({store:{mode:"manual",getValue:e=>og.getCurrent(e).bind(qu.getValue),setValue:(e,t)=>{og.getCurrent(e).each((e=>{qu.setValue(e,t)}))}}})]),s=Ks([aa(((t,o)=>{const n=Hm(t,e,["label","field","aria-descriptor"]);n.field().each((t=>{const o=va(e.prefix);n.label().each((e=>{St(e.element,"for",o),St(t.element,"id",o)})),n["aria-descriptor"]().each((o=>{const n=va(e.prefix);St(o.element,"id",n),St(t.element,"aria-describedby",n)}))}))}))]),a={getField:t=>Vm(t,e,"field"),getLabel:t=>Vm(t,e,"label")};return{uid:e.uid,dom:e.dom,components:t,behaviours:r,events:s,apis:a}},apis:{getField:(e,t)=>e.getField(t),getLabel:(e,t)=>e.getLabel(t)}});var rk=Object.freeze({__proto__:null,exhibit:(e,t)=>za({attributes:Hr([{key:t.tabAttr,value:"true"}])})}),sk=[_r("tabAttr","data-alloy-tabstop")];const ak=ql({fields:sk,name:"tabstopping",active:rk});var ik=tinymce.util.Tools.resolve("tinymce.html.Entities");const lk=(e,t,o,n)=>{const r=ck(e,t,o,n);return nk.sketch(r)},ck=(e,t,o,n)=>({dom:dk(o),components:e.toArray().concat([t]),fieldBehaviours:Gl(n)}),dk=e=>({tag:"div",classes:["tox-form__group"].concat(e)}),uk=(e,t)=>nk.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[xi(t.translate(e))]}),mk=va("form-component-change"),gk=va("form-close"),pk=va("form-cancel"),hk=va("form-action"),fk=va("form-submit"),bk=va("form-block"),vk=va("form-unblock"),yk=va("form-tabchange"),xk=va("form-resize"),wk=(e,t,o)=>{const n=e.label.map((e=>uk(e,t))),r=e=>(t,o)=>{Fi(o.event.target,"[data-collection-item-value]").each((n=>{e(t,o,n,Ot(n,"data-collection-item-value"))}))},s=r(((o,n,r,s)=>{n.stop(),t.isDisabled()||js(o,hk,{name:e.name,value:s})})),a=[Zs(ns(),r(((e,t,o)=>{Ql(o)}))),Zs(ds(),s),Zs(ks(),s),Zs(rs(),r(((e,t,o)=>{Bi(e.element,"."+iv).each((e=>{ti(e,iv)})),ei(o,iv)}))),Zs(ss(),r((e=>{Bi(e.element,"."+iv).each((e=>{ti(e,iv)}))}))),ca(r(((t,o,n,r)=>{js(t,hk,{name:e.name,value:r})})))],i=(e,t)=>H(Sd(e.element,".tox-collection__item"),t),l=nk.parts.field({dom:{tag:"div",classes:["tox-collection"].concat(1!==e.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:w},behaviours:Gl([fg.config({disabled:t.isDisabled,onDisabled:e=>{i(e,(e=>{ei(e,"tox-collection__item--state-disabled"),St(e,"aria-disabled",!0)}))},onEnabled:e=>{i(e,(e=>{ti(e,"tox-collection__item--state-disabled"),Tt(e,"aria-disabled")}))}}),cx(),Bh.config({}),qu.config({store:{mode:"memory",initialValue:o.getOr([])},onSetValue:(o,n)=>{((o,n)=>{const r=H(n,(o=>{const n=Af.translate(o.text),r=1===e.columns?`<div class="tox-collection__item-label">${n}</div>`:"",s=`<div class="tox-collection__item-icon">${o.icon}</div>`,a={_:" "," - ":" ","-":" "},i=n.replace(/\_| \- |\-/g,(e=>a[e]));return`<div class="tox-collection__item${t.isDisabled()?" tox-collection__item--state-disabled":""}" tabindex="-1" data-collection-item-value="${ik.encodeAllRaw(o.value)}" title="${i}" aria-label="${i}">${s}${r}</div>`})),s="auto"!==e.columns&&e.columns>1?z(r,e.columns):[r],a=H(s,(e=>`<div class="tox-collection__group">${e.join("")}</div>`));ua(o.element,a.join(""))})(o,n),"auto"===e.columns&&$y(o,5,"tox-collection__item").each((({numRows:e,numColumns:t})=>{kh.setGridSize(o,e,t)})),Ws(o,xk)}}),ak.config({}),kh.config((c=e.columns,d="normal",1===c?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===c?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:"color"===d?".tox-swatches__row":".tox-collection__group",cell:"color"===d?".tox-swatch":`.${ev}`}})),Fh("collection-events",a)]),eventOrder:{[ws()]:["disabling","alloy.base.behaviour","collection-events"]}});var c,d;return lk(n,l,["tox-form__group--collection"],[])},Sk=["input","textarea"],kk=e=>{const t=Le(e);return R(Sk,t)},Ok=(e,t)=>{const o=t.getRoot(e).getOr(e.element);ti(o,t.invalidClass),t.notify.each((t=>{kk(e.element)&&St(e.element,"aria-invalid",!1),t.getContainer(e).each((e=>{ua(e,t.validHtml)})),t.onValid(e)}))},Ck=(e,t,o,n)=>{const r=t.getRoot(e).getOr(e.element);ei(r,t.invalidClass),t.notify.each((t=>{kk(e.element)&&St(e.element,"aria-invalid",!0),t.getContainer(e).each((e=>{ua(e,n)})),t.onInvalid(e,n)}))},_k=(e,t,o)=>t.validator.fold((()=>cS(tn.value(!0))),(t=>t.validate(e))),Tk=(e,t,o)=>(t.notify.each((t=>{t.onValidate(e)})),_k(e,t).map((o=>e.getSystem().isConnected()?o.fold((o=>(Ck(e,t,0,o),tn.error(o))),(o=>(Ok(e,t),tn.value(o)))):tn.error("No longer in system"))));var Ek=Object.freeze({__proto__:null,markValid:Ok,markInvalid:Ck,query:_k,run:Tk,isInvalid:(e,t)=>{const o=t.getRoot(e).getOr(e.element);return oi(o,t.invalidClass)}});var Dk=Object.freeze({__proto__:null,events:(e,t)=>e.validator.map((t=>Ks([Zs(t.onEvent,(t=>{Tk(t,e).get(w)}))].concat(t.validateOnLoad?[aa((t=>{Tk(t,e).get(b)}))]:[])))).getOr({})}),Ak=[cr("invalidClass"),_r("getRoot",D.none),Cr("notify",[_r("aria","alert"),_r("getContainer",D.none),_r("validHtml",""),Zi("onValid"),Zi("onInvalid"),Zi("onValidate")]),Cr("validator",[cr("validate"),_r("onEvent","input"),_r("validateOnLoad",!0)])];const Mk=ql({fields:Ak,name:"invalidating",active:Dk,apis:Ek,extra:{validation:e=>t=>{const o=qu.getValue(t);return cS(e(o))}}});const Bk=ql({fields:[],name:"unselecting",active:Object.freeze({__proto__:null,events:()=>Ks([Ys(ps(),E)]),exhibit:()=>za({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})})}),Fk=va("color-input-change"),Ik=va("color-swatch-change"),Rk=va("color-picker-cancel"),Nk=(e,t,o,n)=>{const r=nk.parts.field({factory:wv,inputClasses:["tox-textfield"],data:n,onSetValue:e=>Mk.run(e).get(b),inputBehaviours:Gl([fg.config({disabled:t.providers.isDisabled}),cx(),ak.config({}),Mk.config({invalidClass:"tox-textbox-field-invalid",getRoot:e=>nt(e.element),notify:{onValid:e=>{const t=qu.getValue(e);js(e,Fk,{color:t})}},validator:{validateOnLoad:!1,validate:e=>{const t=qu.getValue(e);if(0===t.length)return cS(tn.value(!0));{const e=Ie.fromTag("span");At(e,"background-color",t);const o=Rt(e,"background-color").fold((()=>tn.error("blah")),(e=>tn.value(t)));return cS(o)}}}})]),selectOnFocus:!1}),s=e.label.map((e=>uk(e,t.providers))),a=(e,t)=>{js(e,Ik,{value:t})},i=Df(((e,t)=>OS.sketch({dom:e.dom,components:e.components,toggleClass:"mce-active",dropdownBehaviours:Gl([ux(t.providers.isDisabled),cx(),Bk.config({}),ak.config({})]),layouts:e.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:t.getSink,fetch:o=>lS((t=>e.fetch(t))).map((n=>D.from(IS(xn(Vw(va("menu-value"),n,(t=>{e.onItemAction(o,t)}),e.columns,e.presets,Zb.CLOSE_ON_EXECUTE,T,t.providers),{movement:Hw(e.columns,e.presets)}))))),parts:{menu:fv(0,0,e.presets)}}))({dom:{tag:"span",attributes:{"aria-label":t.providers.translate("Color swatch")}},layouts:{onRtl:()=>[_l,Cl,Al],onLtr:()=>[Cl,_l,Al]},components:[],fetch:Mw(o.getColors(e.storageKey),e.storageKey,o.hasCustomColors()),columns:o.getColorCols(e.storageKey),presets:"color",onItemAction:(t,n)=>{i.getOpt(t).each((t=>{"custom"===n?o.colorPicker((o=>{o.fold((()=>Ws(t,Rk)),(o=>{a(t,o),cw(e.storageKey,o)}))}),"#ffffff"):a(t,"remove"===n?"":n)}))}},t));return nk.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:s.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[r,i.asSpec()]}]),fieldBehaviours:Gl([Fh("form-field-events",[Zs(Fk,((t,o)=>{i.getOpt(t).each((e=>{At(e.element,"background-color",o.event.color)})),js(t,mk,{name:e.name})})),Zs(Ik,((e,t)=>{nk.getField(e).each((o=>{qu.setValue(o,t.event.value),og.getCurrent(e).each(zh.focus)}))})),Zs(Rk,((e,t)=>{nk.getField(e).each((t=>{og.getCurrent(e).each(zh.focus)}))}))])])})},Vk=Cm({schema:[cr("dom")],name:"label"}),zk=e=>Cm({name:e+"-edge",overrides:t=>t.model.manager.edgeActions[e].fold((()=>({})),(e=>({events:Ks([Qs(Kr(),((t,o,n)=>e(t,n)),[t]),Qs(Qr(),((t,o,n)=>e(t,n)),[t]),Qs(es(),((t,o,n)=>{n.mouseIsDown.get()&&e(t,n)}),[t])])})))}),Hk=zk("top-left"),Lk=zk("top"),Pk=zk("top-right"),Uk=zk("right"),Wk=zk("bottom-right"),jk=zk("bottom"),Gk=zk("bottom-left"),$k=zk("left"),qk=km({name:"thumb",defaults:x({dom:{styles:{position:"absolute"}}}),overrides:e=>({events:Ks([ta(Kr(),e,"spectrum"),ta(Yr(),e,"spectrum"),ta(Jr(),e,"spectrum"),ta(Qr(),e,"spectrum"),ta(es(),e,"spectrum"),ta(os(),e,"spectrum")])})}),Xk=km({schema:[ir("mouseIsDown",(()=>Rr(!1)))],name:"spectrum",overrides:e=>{const t=e.model.manager,o=(o,n)=>t.getValueFromEvent(n).map((n=>t.setValueFrom(o,e,n)));return{behaviours:Gl([kh.config({mode:"special",onLeft:o=>t.onLeft(o,e),onRight:o=>t.onRight(o,e),onUp:o=>t.onUp(o,e),onDown:o=>t.onDown(o,e)}),zh.config({})]),events:Ks([Zs(Kr(),o),Zs(Yr(),o),Zs(Qr(),o),Zs(es(),((t,n)=>{e.mouseIsDown.get()&&o(t,n)}))])}}});var Kk=[Vk,$k,Uk,Lk,jk,Hk,Pk,Gk,Wk,qk,Xk];const Yk=x("slider.change.value"),Jk=e=>{const t=e.event.raw;if((e=>-1!==e.type.indexOf("touch"))(t)){const e=t;return void 0!==e.touches&&1===e.touches.length?D.some(e.touches[0]).map((e=>Gt(e.clientX,e.clientY))):D.none()}{const e=t;return void 0!==e.clientX?D.some(e).map((e=>Gt(e.clientX,e.clientY))):D.none()}},Zk=e=>e.model.minX,Qk=e=>e.model.minY,eO=e=>e.model.minX-1,tO=e=>e.model.minY-1,oO=e=>e.model.maxX,nO=e=>e.model.maxY,rO=e=>e.model.maxX+1,sO=e=>e.model.maxY+1,aO=(e,t,o)=>t(e)-o(e),iO=e=>aO(e,oO,Zk),lO=e=>aO(e,nO,Qk),cO=e=>iO(e)/2,dO=e=>lO(e)/2,uO=e=>e.stepSize,mO=e=>e.snapToGrid,gO=e=>e.snapStart,pO=e=>e.rounded,hO=(e,t)=>void 0!==e[t+"-edge"],fO=e=>hO(e,"left"),bO=e=>hO(e,"right"),vO=e=>hO(e,"top"),yO=e=>hO(e,"bottom"),xO=e=>e.model.value.get(),wO=(e,t)=>({x:e,y:t}),SO=(e,t)=>{js(e,Yk(),{value:t})},kO=(e,t,o,n)=>e<t?e:e>o?o:e===t?t-1:Math.max(t,e-n),OO=(e,t,o,n)=>e>o?e:e<t?t:e===o?o+1:Math.min(o,e+n),CO=(e,t,o)=>Math.max(t,Math.min(o,e)),_O=e=>{const{min:t,max:o,range:n,value:r,step:s,snap:a,snapStart:i,rounded:l,hasMinEdge:c,hasMaxEdge:d,minBound:u,maxBound:m,screenRange:g}=e,p=c?t-1:t,h=d?o+1:o;if(r<u)return p;if(r>m)return h;{const e=((e,t,o)=>Math.min(o,Math.max(e,t))-t)(r,u,m),c=CO(e/g*n+t,p,h);return a&&c>=t&&c<=o?((e,t,o,n,r)=>r.fold((()=>{const r=e-t,s=Math.round(r/n)*n;return CO(t+s,t-1,o+1)}),(t=>{const r=(e-t)%n,s=Math.round(r/n),a=Math.floor((e-t)/n),i=Math.floor((o-t)/n),l=t+Math.min(i,a+s)*n;return Math.max(t,l)})))(c,t,o,s,i):l?Math.round(c):c}},TO=e=>{const{min:t,max:o,range:n,value:r,hasMinEdge:s,hasMaxEdge:a,maxBound:i,maxOffset:l,centerMinEdge:c,centerMaxEdge:d}=e;return r<t?s?0:c:r>o?a?i:d:(r-t)/n*l},EO="top",DO="right",AO="bottom",MO="left",BO=e=>e.element.dom.getBoundingClientRect(),FO=(e,t)=>e[t],IO=e=>{const t=BO(e);return FO(t,MO)},RO=e=>{const t=BO(e);return FO(t,DO)},NO=e=>{const t=BO(e);return FO(t,EO)},VO=e=>{const t=BO(e);return FO(t,AO)},zO=e=>{const t=BO(e);return FO(t,"width")},HO=e=>{const t=BO(e);return FO(t,"height")},LO=(e,t,o)=>(e+t)/2-o,PO=(e,t)=>{const o=BO(e),n=BO(t),r=FO(o,MO),s=FO(o,DO),a=FO(n,MO);return LO(r,s,a)},UO=(e,t)=>{const o=BO(e),n=BO(t),r=FO(o,EO),s=FO(o,AO),a=FO(n,EO);return LO(r,s,a)},WO=(e,t)=>{js(e,Yk(),{value:t})},jO=(e,t,o)=>{const n={min:Zk(t),max:oO(t),range:iO(t),value:o,step:uO(t),snap:mO(t),snapStart:gO(t),rounded:pO(t),hasMinEdge:fO(t),hasMaxEdge:bO(t),minBound:IO(e),maxBound:RO(e),screenRange:zO(e)};return _O(n)},GO=e=>(t,o)=>((e,t,o)=>{const n=(e>0?OO:kO)(xO(o),Zk(o),oO(o),uO(o));return WO(t,n),D.some(n)})(e,t,o).map(E),$O=(e,t,o,n,r,s)=>{const a=((e,t,o,n,r)=>{const s=zO(e),a=n.bind((t=>D.some(PO(t,e)))).getOr(0),i=r.bind((t=>D.some(PO(t,e)))).getOr(s),l={min:Zk(t),max:oO(t),range:iO(t),value:o,hasMinEdge:fO(t),hasMaxEdge:bO(t),minBound:IO(e),minOffset:0,maxBound:RO(e),maxOffset:s,centerMinEdge:a,centerMaxEdge:i};return TO(l)})(t,s,o,n,r);return IO(t)-IO(e)+a},qO=GO(-1),XO=GO(1),KO=D.none,YO=D.none,JO={"top-left":D.none(),top:D.none(),"top-right":D.none(),right:D.some(((e,t)=>{SO(e,rO(t))})),"bottom-right":D.none(),bottom:D.none(),"bottom-left":D.none(),left:D.some(((e,t)=>{SO(e,eO(t))}))};var ZO=Object.freeze({__proto__:null,setValueFrom:(e,t,o)=>{const n=jO(e,t,o);return WO(e,n),n},setToMin:(e,t)=>{const o=Zk(t);WO(e,o)},setToMax:(e,t)=>{const o=oO(t);WO(e,o)},findValueOfOffset:jO,getValueFromEvent:e=>Jk(e).map((e=>e.left)),findPositionOfValue:$O,setPositionFromValue:(e,t,o,n)=>{const r=xO(o),s=$O(e,n.getSpectrum(e),r,n.getLeftEdge(e),n.getRightEdge(e),o),a=Yt(t.element)/2;At(t.element,"left",s-a+"px")},onLeft:qO,onRight:XO,onUp:KO,onDown:YO,edgeActions:JO});const QO=(e,t)=>{js(e,Yk(),{value:t})},eC=(e,t,o)=>{const n={min:Qk(t),max:nO(t),range:lO(t),value:o,step:uO(t),snap:mO(t),snapStart:gO(t),rounded:pO(t),hasMinEdge:vO(t),hasMaxEdge:yO(t),minBound:NO(e),maxBound:VO(e),screenRange:HO(e)};return _O(n)},tC=e=>(t,o)=>((e,t,o)=>{const n=(e>0?OO:kO)(xO(o),Qk(o),nO(o),uO(o));return QO(t,n),D.some(n)})(e,t,o).map(E),oC=(e,t,o,n,r,s)=>{const a=((e,t,o,n,r)=>{const s=HO(e),a=n.bind((t=>D.some(UO(t,e)))).getOr(0),i=r.bind((t=>D.some(UO(t,e)))).getOr(s),l={min:Qk(t),max:nO(t),range:lO(t),value:o,hasMinEdge:vO(t),hasMaxEdge:yO(t),minBound:NO(e),minOffset:0,maxBound:VO(e),maxOffset:s,centerMinEdge:a,centerMaxEdge:i};return TO(l)})(t,s,o,n,r);return NO(t)-NO(e)+a},nC=D.none,rC=D.none,sC=tC(-1),aC=tC(1),iC={"top-left":D.none(),top:D.some(((e,t)=>{SO(e,tO(t))})),"top-right":D.none(),right:D.none(),"bottom-right":D.none(),bottom:D.some(((e,t)=>{SO(e,sO(t))})),"bottom-left":D.none(),left:D.none()};var lC=Object.freeze({__proto__:null,setValueFrom:(e,t,o)=>{const n=eC(e,t,o);return QO(e,n),n},setToMin:(e,t)=>{const o=Qk(t);QO(e,o)},setToMax:(e,t)=>{const o=nO(t);QO(e,o)},findValueOfOffset:eC,getValueFromEvent:e=>Jk(e).map((e=>e.top)),findPositionOfValue:oC,setPositionFromValue:(e,t,o,n)=>{const r=xO(o),s=oC(e,n.getSpectrum(e),r,n.getTopEdge(e),n.getBottomEdge(e),o),a=Ut(t.element)/2;At(t.element,"top",s-a+"px")},onLeft:nC,onRight:rC,onUp:sC,onDown:aC,edgeActions:iC});const cC=(e,t)=>{js(e,Yk(),{value:t})},dC=(e,t)=>({x:e,y:t}),uC=(e,t)=>(o,n)=>((e,t,o,n)=>{const r=e>0?OO:kO,s=t?xO(n).x:r(xO(n).x,Zk(n),oO(n),uO(n)),a=t?r(xO(n).y,Qk(n),nO(n),uO(n)):xO(n).y;return cC(o,dC(s,a)),D.some(s)})(e,t,o,n).map(E),mC=uC(-1,!1),gC=uC(1,!1),pC=uC(-1,!0),hC=uC(1,!0),fC={"top-left":D.some(((e,t)=>{SO(e,wO(eO(t),tO(t)))})),top:D.some(((e,t)=>{SO(e,wO(cO(t),tO(t)))})),"top-right":D.some(((e,t)=>{SO(e,wO(rO(t),tO(t)))})),right:D.some(((e,t)=>{SO(e,wO(rO(t),dO(t)))})),"bottom-right":D.some(((e,t)=>{SO(e,wO(rO(t),sO(t)))})),bottom:D.some(((e,t)=>{SO(e,wO(cO(t),sO(t)))})),"bottom-left":D.some(((e,t)=>{SO(e,wO(eO(t),sO(t)))})),left:D.some(((e,t)=>{SO(e,wO(eO(t),dO(t)))}))};var bC=Object.freeze({__proto__:null,setValueFrom:(e,t,o)=>{const n=jO(e,t,o.left),r=eC(e,t,o.top),s=dC(n,r);return cC(e,s),s},setToMin:(e,t)=>{const o=Zk(t),n=Qk(t);cC(e,dC(o,n))},setToMax:(e,t)=>{const o=oO(t),n=nO(t);cC(e,dC(o,n))},getValueFromEvent:e=>Jk(e),setPositionFromValue:(e,t,o,n)=>{const r=xO(o),s=$O(e,n.getSpectrum(e),r.x,n.getLeftEdge(e),n.getRightEdge(e),o),a=oC(e,n.getSpectrum(e),r.y,n.getTopEdge(e),n.getBottomEdge(e),o),i=Yt(t.element)/2,l=Ut(t.element)/2;At(t.element,"left",s-i+"px"),At(t.element,"top",a-l+"px")},onLeft:mC,onRight:gC,onUp:pC,onDown:hC,edgeActions:fC});const vC=Zm({name:"Slider",configFields:[_r("stepSize",1),_r("onChange",b),_r("onChoose",b),_r("onInit",b),_r("onDragStart",b),_r("onDragEnd",b),_r("snapToGrid",!1),_r("rounded",!0),vr("snapStart"),dr("model",rr("mode",{x:[_r("minX",0),_r("maxX",100),ir("value",(e=>Rr(e.mode.minX))),cr("getInitialValue"),ol("manager",ZO)],y:[_r("minY",0),_r("maxY",100),ir("value",(e=>Rr(e.mode.minY))),cr("getInitialValue"),ol("manager",lC)],xy:[_r("minX",0),_r("maxX",100),_r("minY",0),_r("maxY",100),ir("value",(e=>Rr({x:e.mode.minX,y:e.mode.minY}))),cr("getInitialValue"),ol("manager",bC)]})),Xu("sliderBehaviours",[kh,qu]),ir("mouseIsDown",(()=>Rr(!1)))],partFields:Kk,factory:(e,t,o,n)=>{const r=t=>zm(t,e,"thumb"),s=t=>zm(t,e,"spectrum"),a=t=>Vm(t,e,"left-edge"),i=t=>Vm(t,e,"right-edge"),l=t=>Vm(t,e,"top-edge"),c=t=>Vm(t,e,"bottom-edge"),d=e.model,u=d.manager,m=(t,o)=>{u.setPositionFromValue(t,o,e,{getLeftEdge:a,getRightEdge:i,getTopEdge:l,getBottomEdge:c,getSpectrum:s})},g=(e,t)=>{d.value.set(t);const o=r(e);m(e,o)},p=t=>{const o=e.mouseIsDown.get();e.mouseIsDown.set(!1),o&&Vm(t,e,"thumb").each((o=>{const n=d.value.get();e.onChoose(t,o,n)}))},h=(t,o)=>{o.stop(),e.mouseIsDown.set(!0),e.onDragStart(t,r(t))},f=(t,o)=>{o.stop(),e.onDragEnd(t,r(t)),p(t)};return{uid:e.uid,dom:e.dom,components:t,behaviours:Yu(e.sliderBehaviours,[kh.config({mode:"special",focusIn:t=>Vm(t,e,"spectrum").map(kh.focusIn).map(E)}),qu.config({store:{mode:"manual",getValue:e=>d.value.get(),setValue:g}}),Jl.config({channels:{[Au()]:{onReceive:p}}})]),events:Ks([Zs(Yk(),((t,o)=>{((t,o)=>{g(t,o);const n=r(t);e.onChange(t,n,o),D.some(!0)})(t,o.event.value)})),aa(((t,o)=>{const n=d.getInitialValue();d.value.set(n);const a=r(t);m(t,a);const i=s(t);e.onInit(t,a,i,d.value.get())})),Zs(Kr(),h),Zs(Jr(),f),Zs(Qr(),h),Zs(os(),f)]),apis:{resetToMin:t=>{u.setToMin(t,e)},resetToMax:t=>{u.setToMax(t,e)},setValue:g,refresh:m},domModification:{styles:{position:"relative"}}}},apis:{setValue:(e,t,o)=>{e.setValue(t,o)},resetToMin:(e,t)=>{e.resetToMin(t)},resetToMax:(e,t)=>{e.resetToMax(t)},refresh:(e,t)=>{e.refresh(t)}}}),yC=va("rgb-hex-update"),xC=va("slider-update"),wC=va("palette-update"),SC="form",kC=[Xu("formBehaviours",[qu])],OC=e=>"<alloy.field."+e+">",CC=(e,t)=>({uid:e.uid,dom:e.dom,components:t,behaviours:Yu(e.formBehaviours,[qu.config({store:{mode:"manual",getValue:t=>{const o=Lm(t,e);return ce(o,((e,t)=>e().bind((e=>{const o=og.getCurrent(e);return n=o,r=new Error(`Cannot find a current component to extract the value from for form part '${t}': `+pa(e.element)),n.fold((()=>tn.error(r)),tn.value);var n,r})).map(qu.getValue)))},setValue:(t,o)=>{le(o,((o,n)=>{Vm(t,e,n).each((e=>{og.getCurrent(e).each((e=>{qu.setValue(e,o)}))}))}))}}})]),apis:{getField:(t,o)=>Vm(t,e,o).bind(og.getCurrent)}}),_C={getField:Ia(((e,t,o)=>e.getField(t,o))),sketch:e=>{const t=(()=>{const e=[];return{field:(t,o)=>(e.push(t),Bm(SC,OC(t),o)),record:x(e)}})(),o=e(t),n=t.record(),r=H(n,(e=>km({name:e,pname:OC(e)})));return qm(SC,kC,r,CC,o)}},TC=va("valid-input"),EC=va("invalid-input"),DC=va("validating-input"),AC="colorcustom.rgb.",MC=(e,t,o,n)=>{const r=(o,n)=>Mk.config({invalidClass:t("invalid"),notify:{onValidate:e=>{js(e,DC,{type:o})},onValid:e=>{js(e,TC,{type:o,value:qu.getValue(e)})},onInvalid:e=>{js(e,EC,{type:o,value:qu.getValue(e)})}},validator:{validate:t=>{const o=qu.getValue(t),r=n(o)?tn.value(!0):tn.error(e("aria.input.invalid"));return cS(r)},validateOnLoad:!1}}),s=(o,n,s,a,i)=>{const l=e("colorcustom.rgb.range"),c=nk.parts.label({dom:{tag:"label",attributes:{"aria-label":a}},components:[xi(s)]}),d=nk.parts.field({data:i,factory:wv,inputAttributes:{type:"text",..."hex"===n?{"aria-live":"polite"}:{}},inputClasses:[t("textfield")],inputBehaviours:Gl([r(n,o),ak.config({})]),onSetValue:e=>{if(Mk.isInvalid(e)){Mk.run(e).get(b)}}}),u=[c,d],m="hex"!==n?[nk.parts["aria-descriptor"]({text:l})]:[];return{dom:{tag:"div",attributes:{role:"presentation"}},components:u.concat(m)}},a=(e,t)=>{const o=t.red,n=t.green,r=t.blue;qu.setValue(e,{red:o,green:n,blue:r})},i=Df({dom:{tag:"div",classes:[t("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),l=(e,t)=>{i.getOpt(e).each((e=>{At(e.element,"background-color","#"+t.value)}))},c=Jm({factory:()=>{const r={red:Rr(D.some(255)),green:Rr(D.some(255)),blue:Rr(D.some(255)),hex:Rr(D.some("ffffff"))},c=e=>r[e].get(),d=(e,t)=>{r[e].set(t)},u=e=>{const t=e.red,o=e.green,n=e.blue;d("red",D.some(t)),d("green",D.some(o)),d("blue",D.some(n))},m=(e,t)=>{const o=t.event;"hex"!==o.type?d(o.type,D.none()):n(e)},g=(e,t,o)=>{const n=parseInt(o,10);d(t,D.some(n)),c("red").bind((e=>c("green").bind((t=>c("blue").map((o=>Kx(e,t,o,1))))))).each((t=>{const o=((e,t)=>{const o=Wx(t);return _C.getField(e,"hex").each((t=>{zh.isFocused(t)||qu.setValue(e,{hex:o.value})})),o})(e,t);js(e,yC,{hex:o}),l(e,o)}))},p=(e,t)=>{const n=t.event;(e=>"hex"===e.type)(n)?((e,t)=>{o(e);const n=Nx(t);d("hex",D.some(n.value));const r=Zx(n);a(e,r),u(r),js(e,yC,{hex:n}),l(e,n)})(e,n.value):g(e,n.type,n.value)},h=t=>({label:e(AC+t+".label"),description:e(AC+t+".description")}),f=h("red"),b=h("green"),v=h("blue"),y=h("hex");return xn(_C.sketch((o=>({dom:{tag:"form",classes:[t("rgb-form")],attributes:{"aria-label":e("aria.color.picker")}},components:[o.field("red",nk.sketch(s(Yx,"red",f.label,f.description,255))),o.field("green",nk.sketch(s(Yx,"green",b.label,b.description,255))),o.field("blue",nk.sketch(s(Yx,"blue",v.label,v.description,255))),o.field("hex",nk.sketch(s(Hx,"hex",y.label,y.description,"ffffff"))),i.asSpec()],formBehaviours:Gl([Mk.config({invalidClass:t("form-invalid")}),Fh("rgb-form-events",[Zs(TC,p),Zs(EC,m),Zs(DC,m)])])}))),{apis:{updateHex:(e,t)=>{qu.setValue(e,{hex:t.value}),((e,t)=>{const o=Zx(t);a(e,o),u(o)})(e,t),l(e,t)}}})},name:"RgbForm",configFields:[],apis:{updateHex:(e,t,o)=>{e.updateHex(t,o)}},extraApis:{}});return c},BC=(e,t)=>{const o=vC.parts.spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[t("sv-palette-spectrum")]}}),n=vC.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=(e,t)=>{const{width:o,height:n}=e,r=e.getContext("2d");if(null===r)return;r.fillStyle=t,r.fillRect(0,0,o,n);const s=r.createLinearGradient(0,0,o,0);s.addColorStop(0,"rgba(255,255,255,1)"),s.addColorStop(1,"rgba(255,255,255,0)"),r.fillStyle=s,r.fillRect(0,0,o,n);const a=r.createLinearGradient(0,0,0,n);a.addColorStop(0,"rgba(0,0,0,0)"),a.addColorStop(1,"rgba(0,0,0,1)"),r.fillStyle=a,r.fillRect(0,0,o,n)},s=Jm({factory:e=>{const s=x({x:0,y:0}),a=Gl([og.config({find:D.some}),zh.config({})]);return vC.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[t("sv-palette")]},model:{mode:"xy",getInitialValue:s},rounded:!1,components:[o,n],onChange:(e,t,o)=>{js(e,wC,{value:o})},onInit:(e,t,o,n)=>{r(o.element.dom,tw(ow))},sliderBehaviours:a})},name:"SaturationBrightnessPalette",configFields:[],apis:{setHue:(e,t,o)=>{((e,t)=>{const o=e.components()[0].element.dom,n=dw(t,100,100),s=Jx(n);r(o,tw(s))})(t,o)},setThumb:(e,t,o)=>{((e,t)=>{const o=uw(Zx(t));vC.setValue(e,{x:o.saturation,y:100-o.value})})(t,o)}},extraApis:{}});return s},FC=(e,t)=>{const o=Jm({name:"ColourPicker",configFields:[cr("dom"),_r("onValidHex",b),_r("onInvalidHex",b)],factory:o=>{const n=MC(e,t,o.onValidHex,o.onInvalidHex),r=BC(0,t),s={paletteRgba:Rr(ow),paletteHue:Rr(0)},a=Df(((e,t)=>{const o=vC.parts.spectrum({dom:{tag:"div",classes:[t("hue-slider-spectrum")],attributes:{role:"presentation"}}}),n=vC.parts.thumb({dom:{tag:"div",classes:[t("hue-slider-thumb")],attributes:{role:"presentation"}}});return vC.sketch({dom:{tag:"div",classes:[t("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:x(0)},components:[o,n],sliderBehaviours:Gl([zh.config({})]),onChange:(e,t,o)=>{js(e,xC,{value:o})}})})(0,t)),i=Df(r.sketch({})),l=Df(n.sketch({})),c=(e,t,o)=>{i.getOpt(e).each((e=>{r.setHue(e,o)}))},d=(e,t)=>{l.getOpt(e).each((e=>{n.updateHex(e,t)}))},u=(e,t,o)=>{a.getOpt(e).each((e=>{vC.setValue(e,(e=>100-e/360*100)(o))}))},m=(e,t)=>{i.getOpt(e).each((e=>{r.setThumb(e,t)}))},g=(e,t,o,n)=>{((e,t)=>{const o=Zx(e);s.paletteRgba.set(o),s.paletteHue.set(t)})(t,o),L(n,(n=>{n(e,t,o)}))};return{uid:o.uid,dom:o.dom,components:[i.asSpec(),a.asSpec(),l.asSpec()],behaviours:Gl([Fh("colour-picker-events",[Zs(yC,(()=>{const e=[c,u,m];return(t,o)=>{const n=o.event.hex,r=(e=>uw(Zx(e)))(n);g(t,n,r.hue,e)}})()),Zs(wC,(()=>{const e=[d];return(t,o)=>{const n=o.event.value,r=s.paletteHue.get(),a=dw(r,n.x,100-n.y),i=mw(a);g(t,i,r,e)}})()),Zs(xC,(()=>{const e=[c,d];return(t,o)=>{const n=(e=>(100-e)/100*360)(o.event.value),r=s.paletteRgba.get(),a=uw(r),i=dw(n,a.saturation,a.value),l=mw(i);g(t,l,n,e)}})())]),og.config({find:e=>l.getOpt(e)}),kh.config({mode:"acyclic"})])}}});return o},IC=()=>og.config({find:D.some}),RC=e=>og.config({find:e.getOpt}),NC=e=>og.config({find:t=>at(t.element,e).bind((e=>t.getSystem().getByDom(e).toOptional()))}),VC=Vn([_r("preprocess",w),_r("postprocess",w)]),zC=(e,t,o)=>qu.config({store:{mode:"manual",...e.map((e=>({initialValue:e}))).getOr({}),getValue:t,setValue:o}}),HC=(e,t,o)=>zC(e,(e=>t(e.element)),((e,t)=>o(e.element,t))),LC=(e,t)=>{const o=or("RepresentingConfigs.memento processors",VC,t);return qu.config({store:{mode:"manual",getValue:t=>{const n=e.get(t),r=qu.getValue(n);return o.postprocess(r)},setValue:(t,n)=>{const r=o.preprocess(n),s=e.get(t);qu.setValue(s,r)}}})},PC=HC,UC=zC,WC=e=>HC(e,da,ua),jC=e=>qu.config({store:{mode:"memory",initialValue:e}}),GC={"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","aria.color.picker":"Color Picker","aria.input.invalid":"Invalid input"},$C=(e,t,o)=>{const n=e=>"tox-"+e,r=FC((e=>t=>e.translate(GC[t]))(t),n),s=Df(r.sketch({dom:{tag:"div",classes:[n("color-picker-container")],attributes:{role:"presentation"}},onValidHex:e=>{js(e,hk,{name:"hex-valid",value:!0})},onInvalidHex:e=>{js(e,hk,{name:"hex-valid",value:!1})}}));return{dom:{tag:"div"},components:[s.asSpec()],behaviours:Gl([UC(o,(e=>{const t=s.get(e);return og.getCurrent(t).bind((e=>qu.getValue(e).hex)).map((e=>"#"+_e(e,"#"))).getOr("")}),((e,t)=>{const o=D.from(/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/.exec(t)).bind((e=>te(e,1))),n=s.get(e);og.getCurrent(n).fold((()=>{console.log("Can not find form")}),(e=>{qu.setValue(e,{hex:o.getOr("")}),_C.getField(e,"hex").each((e=>{Ws(e,ls())}))}))})),IC()])}};var qC=tinymce.util.Tools.resolve("tinymce.Resource");var XC=tinymce.util.Tools.resolve("tinymce.util.Tools");const KC=(e,t,o)=>{const n=(e,t)=>{t.stop()},r=e=>(t,o)=>{L(e,(e=>{e(t,o)}))},s=(e,t)=>{var o;if(!fg.isDisabled(e)){const n=t.event.raw;i(e,null===(o=n.dataTransfer)||void 0===o?void 0:o.files)}},a=(e,t)=>{const o=t.event.raw.target;i(e,o.files)},i=(o,n)=>{n&&(qu.setValue(o,((e,t)=>{const o=XC.explode(t.getOption("images_file_types"));return U(re(e),(e=>N(o,(t=>De(e.name.toLowerCase(),`.${t.toLowerCase()}`)))))})(n,t)),js(o,mk,{name:e.name}))},l=Df({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:Gl([Fh("input-file-events",[na(ds()),na(ks())])])}),c=e.label.map((e=>uk(e,t))),d=nk.parts.field({factory:{sketch:e=>({uid:e.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:Gl([jC(o.getOr([])),IC(),fg.config({}),$h.config({toggleClass:"dragenter",toggleOnExecute:!1}),Fh("dropzone-events",[Zs("dragenter",r([n,$h.toggle])),Zs("dragleave",r([n,$h.toggle])),Zs("dragover",n),Zs("drop",r([n,s])),Zs(cs(),a)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p"},components:[xi(t.translate("Drop an image here"))]},Ef.sketch({dom:{tag:"button",styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[xi(t.translate("Browse for an image")),l.asSpec()],action:e=>{l.get(e).element.dom.click()},buttonBehaviours:Gl([ak.config({}),ux(t.isDisabled),cx()])})]}]})}});return lk(c,d,["tox-form__group--stretched"],[])},YC=va("alloy-fake-before-tabstop"),JC=va("alloy-fake-after-tabstop"),ZC=e=>({dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:e},behaviours:Gl([zh.config({ignore:!0}),ak.config({})])}),QC=e=>({dom:{tag:"div",classes:["tox-navobj"]},components:[ZC([YC]),e,ZC([JC])],behaviours:Gl([NC(1)])}),e_=(e,t)=>{js(e,as(),{raw:{which:9,shiftKey:t}})},t_=(e,t)=>{const o=t.element;oi(o,YC)?e_(e,!0):oi(o,JC)&&e_(e,!1)},o_=e=>LS(e,["."+YC,"."+JC].join(","),T),n_=(e,t,o)=>{const n=e.sandboxed,r=e.transparent,s="tox-dialog__iframe",a={...e.label.map((e=>({title:e}))).getOr({}),...o.map((e=>({srcdoc:e}))).getOr({}),...n?{sandbox:"allow-scripts allow-same-origin"}:{}},i=(e=>{const t=Rr(e.getOr(""));return{getValue:e=>t.get(),setValue:(e,o)=>{t.get()!==o&&St(e.element,"srcdoc",o),t.set(o)}}})(o),l=e.label.map((e=>uk(e,t))),c=nk.parts.field({factory:{sketch:e=>QC({uid:e.uid,dom:{tag:"iframe",attributes:a,classes:r?[s]:[s,`${s}--opaque`]},behaviours:Gl([ak.config({}),zh.config({}),UC(o,i.getValue,i.setValue)])})}});return lk(l,c,["tox-form__group--stretched"],[])},r_=(e,t)=>{const o=Rr(t.getOr({url:""})),n=Df({dom:{tag:"img",classes:["tox-imagepreview__image"],attributes:t.map((e=>({src:e.url}))).getOr({})}}),r=Df({dom:{tag:"div",classes:["tox-imagepreview__container"],attributes:{role:"presentation"}},components:[n.asSpec()]}),s={};e.height.each((e=>s.height=e));const a=t.map((e=>({url:e.url,zoom:D.from(e.zoom),cachedWidth:D.from(e.cachedWidth),cachedHeight:D.from(e.cachedHeight)})));return{dom:{tag:"div",classes:["tox-imagepreview"],styles:s,attributes:{role:"presentation"}},components:[r.asSpec()],behaviours:Gl([IC(),UC(a,(()=>o.get()),((e,t)=>{const s={url:t.url};t.zoom.each((e=>s.zoom=e)),t.cachedWidth.each((e=>s.cachedWidth=e)),t.cachedHeight.each((e=>s.cachedHeight=e)),o.set(s);const a=()=>{const{cachedWidth:t,cachedHeight:o,zoom:n}=s;if(!u(t)&&!u(o)){if(u(n)){const n=((e,t,o)=>{const n=Yt(e),r=Ut(e);return Math.min(n/t,r/o,1)})(e.element,t,o);s.zoom=n}const a=((e,t,o,n,r)=>{const s=o*r,a=n*r,i=Math.max(0,e/2-s/2),l=Math.max(0,t/2-a/2);return{left:i.toString()+"px",top:l.toString()+"px",width:s.toString()+"px",height:a.toString()+"px"}})(Yt(e.element),Ut(e.element),t,o,s.zoom);r.getOpt(e).each((e=>{Mt(e.element,a)}))}};n.getOpt(e).each((o=>{const n=o.element;t.url!==Ot(n,"src")&&(St(n,"src",t.url),ti(e.element,"tox-imagepreview__loaded")),a(),(e=>new Promise(((t,o)=>{const n=()=>{s(),t(e)},r=[Oc(e,"load",n),Oc(e,"error",(()=>{s(),o("Unable to load data from image: "+e.dom.src)}))],s=()=>L(r,(e=>e.unbind()));e.dom.complete&&n()})))(n).then((t=>{e.getSystem().isConnected()&&(ei(e.element,"tox-imagepreview__loaded"),s.cachedWidth=t.dom.naturalWidth,s.cachedHeight=t.dom.naturalHeight,a())}))}))}))])}},s_=va("toolbar.button.execute"),a_=va("common-button-display-events"),i_={[ws()]:["disabling","alloy.base.behaviour","toggling","toolbar-button-events"],[Bs()]:["toolbar-button-events",a_],[Qr()]:["focusing","alloy.base.behaviour",a_]},l_=e=>At(e.element,"width",Ft(e.element,"width")),c_=(e,t,o)=>Hf(e,{tag:"span",classes:["tox-icon","tox-tbtn__icon-wrap"],behaviours:o},t),d_=(e,t)=>c_(e,t,[]),u_=(e,t)=>c_(e,t,[Bh.config({})]),m_=(e,t,o)=>({dom:{tag:"span",classes:[`${t}__select-label`]},components:[xi(o.translate(e))],behaviours:Gl([Bh.config({})])}),g_=va("update-menu-text"),p_=va("update-menu-icon"),h_=(e,t,o)=>{const n=Rr(b),r=e.text.map((e=>Df(m_(e,t,o.providers)))),s=e.icon.map((e=>Df(u_(e,o.providers.icons)))),a=(e,t)=>{const o=qu.getValue(e);return zh.focus(o),js(o,"keydown",{raw:t.event.raw}),OS.close(o),D.some(!0)},i=e.role.fold((()=>({})),(e=>({role:e}))),l=e.tooltip.fold((()=>({})),(e=>{const t=o.providers.translate(e);return{title:t,"aria-label":t}})),c=Hf("chevron-down",{tag:"div",classes:[`${t}__select-chevron`]},o.providers.icons),d=va("common-button-display-events"),u=Df(OS.sketch({...e.uid?{uid:e.uid}:{},...i,dom:{tag:"button",classes:[t,`${t}--select`].concat(H(e.classes,(e=>`${t}--${e}`))),attributes:{...l}},components:yx([s.map((e=>e.asSpec())),r.map((e=>e.asSpec())),D.some(c)]),matchWidth:!0,useMinWidth:!0,onOpen:(t,o,n)=>{e.searchable&&(e=>{_v(e).each((e=>zh.focus(e)))})(n)},dropdownBehaviours:Gl([...e.dropdownBehaviours,ux((()=>e.disabled||o.providers.isDisabled())),cx(),Bk.config({}),Bh.config({}),Fh("dropdown-events",[hx(e,n),fx(e,n)]),Fh(d,[aa(((e,t)=>l_(e)))]),Fh("menubutton-update-display-text",[Zs(g_,((e,t)=>{r.bind((t=>t.getOpt(e))).each((e=>{Bh.set(e,[xi(o.providers.translate(t.event.text))])}))})),Zs(p_,((e,t)=>{s.bind((t=>t.getOpt(e))).each((e=>{Bh.set(e,[u_(t.event.icon,o.providers.icons)])}))}))])]),eventOrder:xn(i_,{mousedown:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"],[Bs()]:["toolbar-button-events","dropdown-events",d]}),sandboxBehaviours:Gl([kh.config({mode:"special",onLeft:a,onRight:a}),Fh("dropdown-sandbox-events",[Zs(Sv,((e,t)=>{CS(e),t.stop()})),Zs(kv,((e,t)=>{((e,t)=>{_S(e).each((o=>{((e,t,o,n)=>{const r={...n,target:t};e.getSystem().triggerEvent(o,t,r)})(e,o.element,t.event.eventType,t.event.interactionEvent)}))})(e,t),t.stop()}))])]),lazySink:o.getSink,toggleClass:`${t}--active`,parts:{menu:{...fv(0,e.columns,e.presets),fakeFocus:e.searchable,onHighlightItem:TS,onCollapseMenu:(e,t,o)=>{Tg.getHighlighted(o).each((t=>{TS(e,o,t)}))},onDehighlightItem:ES}},fetch:t=>lS(k(e.fetch,t))}));return u.asSpec()},f_=e=>"separator"===e.type,b_={type:"separator"},v_=(e,t)=>{const o=j(e,((e,o)=>(e=>s(e))(o)?""===o?e:"|"===o?e.length>0&&!f_(e[e.length-1])?e.concat([b_]):e:ve(t,o.toLowerCase())?e.concat([t[o.toLowerCase()]]):e:e.concat([o])),[]);return o.length>0&&f_(o[o.length-1])&&o.pop(),o},y_=(e,t)=>{const o=v_(s(e)?e.split(" "):e,t);return W(o,((e,o)=>{if((e=>ve(e,"getSubmenuItems"))(o)){const n=(e=>{const t=be(e,"value").getOrThunk((()=>va("generated-menu-item")));return xn({value:t},e)})(o),r=((e,t)=>{const o=e.getSubmenuItems(),n=y_(o,t);return{item:e,menus:xn(n.menus,{[e.value]:n.items}),expansions:xn(n.expansions,{[e.value]:e.value})}})(n,t);return{menus:xn(e.menus,r.menus),items:[r.item,...e.items],expansions:xn(e.expansions,r.expansions)}}return{...e,items:[o,...e.items]}}),{menus:{},expansions:{},items:[]})},x_=(e,t,o,n)=>{const r=va("primary-menu"),s=y_(e,o.shared.providers.menuItems());if(0===s.items.length)return D.none();const a=(e=>e.search.fold((()=>({searchMode:"no-search"})),(e=>({searchMode:"search-with-field",placeholder:e.placeholder}))))(n),i=FS(r,s.items,t,o,n.isHorizontalMenu,a),l=(e=>e.search.fold((()=>({searchMode:"no-search"})),(e=>({searchMode:"search-with-results"}))))(n),c=ce(s.menus,((e,n)=>FS(n,e,t,o,!1,l))),d=xn(c,zr(r,i));return D.from(Cf.tieredData(r,d,s.expansions))},w_=e=>!ve(e,"items"),S_="data-value",k_=(e,t,o,n)=>H(o,(o=>w_(o)?{type:"togglemenuitem",text:o.text,value:o.value,active:o.value===n,onAction:()=>{qu.setValue(e,o.value),js(e,mk,{name:t}),zh.focus(e)}}:{type:"nestedmenuitem",text:o.text,getSubmenuItems:()=>k_(e,t,o.items,n)})),O_=(e,t)=>se(e,(e=>w_(e)?Oe(e.value===t,e):O_(e.items,t))),C_=Jm({name:"HtmlSelect",configFields:[cr("options"),Xu("selectBehaviours",[zh,qu]),_r("selectClasses",[]),_r("selectAttributes",{}),vr("data")],factory:(e,t)=>{const o=H(e.options,(e=>({dom:{tag:"option",value:e.value,innerHtml:e.text}}))),n=e.data.map((e=>zr("initialValue",e))).getOr({});return{uid:e.uid,dom:{tag:"select",classes:e.selectClasses,attributes:e.selectAttributes},components:o,behaviours:Yu(e.selectBehaviours,[zh.config({}),qu.config({store:{mode:"manual",getValue:e=>ii(e.element),setValue:(t,o)=>{const n=oe(e.options);G(e.options,(e=>e.value===o)).isSome()?li(t.element,o):-1===t.element.dom.selectedIndex&&""===o&&n.each((e=>li(t.element,e.value)))},...n}})])}}}),__=x([_r("field1Name","field1"),_r("field2Name","field2"),el("onLockedChange"),Yi(["lockClass"]),_r("locked",!1),Ju("coupledFieldBehaviours",[og,qu])]),T_=(e,t)=>km({factory:nk,name:e,overrides:e=>({fieldBehaviours:Gl([Fh("coupled-input-behaviour",[Zs(ls(),(o=>{((e,t,o)=>Vm(e,t,o).bind(og.getCurrent))(o,e,t).each((t=>{Vm(o,e,"lock").each((n=>{$h.isOn(n)&&e.onLockedChange(o,t,n)}))}))}))])])})}),E_=x([T_("field1","field2"),T_("field2","field1"),km({factory:Ef,schema:[cr("dom")],name:"lock",overrides:e=>({buttonBehaviours:Gl([$h.config({selected:e.locked,toggleClass:e.markers.lockClass,aria:{mode:"pressed"}})])})})]),D_=Zm({name:"FormCoupledInputs",configFields:__(),partFields:E_(),factory:(e,t,o,n)=>({uid:e.uid,dom:e.dom,components:t,behaviours:Zu(e.coupledFieldBehaviours,[og.config({find:D.some}),qu.config({store:{mode:"manual",getValue:t=>{const o=Um(t,e,["field1","field2"]);return{[e.field1Name]:qu.getValue(o.field1()),[e.field2Name]:qu.getValue(o.field2())}},setValue:(t,o)=>{const n=Um(t,e,["field1","field2"]);ye(o,e.field1Name)&&qu.setValue(n.field1(),o[e.field1Name]),ye(o,e.field2Name)&&qu.setValue(n.field2(),o[e.field2Name])}}})]),apis:{getField1:t=>Vm(t,e,"field1"),getField2:t=>Vm(t,e,"field2"),getLock:t=>Vm(t,e,"lock")}}),apis:{getField1:(e,t)=>e.getField1(t),getField2:(e,t)=>e.getField2(t),getLock:(e,t)=>e.getLock(t)}}),A_=e=>{const t=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/.exec(e);if(null!==t){const e=parseFloat(t[1]),o=t[2];return tn.value({value:e,unit:o})}return tn.error(e)},M_=(e,t)=>{const o={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,in:1},n=e=>ve(o,e);return e.unit===t?D.some(e.value):n(e.unit)&&n(t)?o[e.unit]===o[t]?D.some(e.value):D.some(e.value/o[e.unit]*o[t]):D.none()},B_=e=>D.none(),F_=(e,t)=>{const o=A_(e).toOptional(),n=A_(t).toOptional();return Se(o,n,((e,t)=>M_(e,t.unit).map((e=>t.value/e)).map((e=>{return o=e,n=t.unit,e=>M_(e,n).map((e=>({value:e*o,unit:n})));var o,n})).getOr(B_))).getOr(B_)},I_=(e,t)=>{const o=e.label.map((e=>uk(e,t))),n=[fg.config({disabled:()=>e.disabled||t.isDisabled()}),cx(),kh.config({mode:"execution",useEnter:!0!==e.multiline,useControlEnter:!0===e.multiline,execute:e=>(Ws(e,fk),D.some(!0))}),Fh("textfield-change",[Zs(ls(),((t,o)=>{js(t,mk,{name:e.name})})),Zs(ys(),((t,o)=>{js(t,mk,{name:e.name})}))]),ak.config({})],r=e.validation.map((e=>Mk.config({getRoot:e=>nt(e.element),invalidClass:"tox-invalid",validator:{validate:t=>{const o=qu.getValue(t),n=e.validator(o);return cS(!0===n?tn.value(o):tn.error(n))},validateOnLoad:e.validateOnLoad}}))).toArray(),s={...e.placeholder.fold(x({}),(e=>({placeholder:t.translate(e)}))),...e.inputMode.fold(x({}),(e=>({inputmode:e})))},a=nk.parts.field({tag:!0===e.multiline?"textarea":"input",...e.data.map((e=>({data:e}))).getOr({}),inputAttributes:s,inputClasses:[e.classname],inputBehaviours:Gl(q([n,r])),selectOnFocus:!1,factory:wv}),i=e.multiline?{dom:{tag:"div",classes:["tox-textarea-wrap"]},components:[a]}:a,l=(e.flex?["tox-form__group--stretched"]:[]).concat(e.maximized?["tox-form-group--maximize"]:[]),c=[fg.config({disabled:()=>e.disabled||t.isDisabled(),onDisabled:e=>{nk.getField(e).each(fg.disable)},onEnabled:e=>{nk.getField(e).each(fg.enable)}}),cx()];return lk(o,i,l,c)},R_=(e,t)=>t.getAnimationRoot.fold((()=>e.element),(t=>t(e))),N_=e=>e.dimension.property,V_=(e,t)=>e.dimension.getDimension(t),z_=(e,t)=>{const o=R_(e,t);ri(o,[t.shrinkingClass,t.growingClass])},H_=(e,t)=>{ti(e.element,t.openClass),ei(e.element,t.closedClass),At(e.element,N_(t),"0px"),Ht(e.element)},L_=(e,t)=>{ti(e.element,t.closedClass),ei(e.element,t.openClass),zt(e.element,N_(t))},P_=(e,t,o,n)=>{o.setCollapsed(),At(e.element,N_(t),V_(t,e.element)),z_(e,t),H_(e,t),t.onStartShrink(e),t.onShrunk(e)},U_=(e,t,o,n)=>{const r=n.getOrThunk((()=>V_(t,e.element)));o.setCollapsed(),At(e.element,N_(t),r),Ht(e.element);const s=R_(e,t);ti(s,t.growingClass),ei(s,t.shrinkingClass),H_(e,t),t.onStartShrink(e)},W_=(e,t,o)=>{const n=V_(t,e.element);("0px"===n?P_:U_)(e,t,o,D.some(n))},j_=(e,t,o)=>{const n=R_(e,t),r=oi(n,t.shrinkingClass),s=V_(t,e.element);L_(e,t);const a=V_(t,e.element);(r?()=>{At(e.element,N_(t),s),Ht(e.element)}:()=>{H_(e,t)})(),ti(n,t.shrinkingClass),ei(n,t.growingClass),L_(e,t),At(e.element,N_(t),a),o.setExpanded(),t.onStartGrow(e)},G_=(e,t,o)=>{const n=R_(e,t);return!0===oi(n,t.growingClass)},$_=(e,t,o)=>{const n=R_(e,t);return!0===oi(n,t.shrinkingClass)};var q_=Object.freeze({__proto__:null,refresh:(e,t,o)=>{if(o.isExpanded()){zt(e.element,N_(t));const o=V_(t,e.element);At(e.element,N_(t),o)}},grow:(e,t,o)=>{o.isExpanded()||j_(e,t,o)},shrink:(e,t,o)=>{o.isExpanded()&&W_(e,t,o)},immediateShrink:(e,t,o)=>{o.isExpanded()&&P_(e,t,o)},hasGrown:(e,t,o)=>o.isExpanded(),hasShrunk:(e,t,o)=>o.isCollapsed(),isGrowing:G_,isShrinking:$_,isTransitioning:(e,t,o)=>G_(e,t)||$_(e,t),toggleGrow:(e,t,o)=>{(o.isExpanded()?W_:j_)(e,t,o)},disableTransitions:z_,immediateGrow:(e,t,o)=>{o.isExpanded()||(L_(e,t),At(e.element,N_(t),V_(t,e.element)),z_(e,t),o.setExpanded(),t.onStartGrow(e),t.onGrown(e))}});var X_=Object.freeze({__proto__:null,exhibit:(e,t,o)=>{const n=t.expanded;return za(n?{classes:[t.openClass],styles:{}}:{classes:[t.closedClass],styles:zr(t.dimension.property,"0px")})},events:(e,t)=>Ks([sa(ms(),((o,n)=>{if(n.event.raw.propertyName===e.dimension.property){z_(o,e),t.isExpanded()&&zt(o.element,e.dimension.property);(t.isExpanded()?e.onGrown:e.onShrunk)(o)}}))])}),K_=[cr("closedClass"),cr("openClass"),cr("shrinkingClass"),cr("growingClass"),vr("getAnimationRoot"),Zi("onShrunk"),Zi("onStartShrink"),Zi("onGrown"),Zi("onStartGrow"),_r("expanded",!1),dr("dimension",rr("property",{width:[ol("property","width"),ol("getDimension",(e=>Yt(e)+"px"))],height:[ol("property","height"),ol("getDimension",(e=>Ut(e)+"px"))]}))];const Y_=ql({fields:K_,name:"sliding",active:X_,apis:q_,state:Object.freeze({__proto__:null,init:e=>{const t=Rr(e.expanded);return Na({isExpanded:()=>!0===t.get(),isCollapsed:()=>!1===t.get(),setCollapsed:k(t.set,!1),setExpanded:k(t.set,!0),readState:()=>"expanded: "+t.get()})}})}),J_=e=>({isEnabled:()=>!fg.isDisabled(e),setEnabled:t=>fg.set(e,!t),setActive:t=>{const o=e.element;t?(ei(o,"tox-tbtn--enabled"),St(o,"aria-pressed",!0)):(ti(o,"tox-tbtn--enabled"),Tt(o,"aria-pressed"))},isActive:()=>oi(e.element,"tox-tbtn--enabled"),setText:t=>{js(e,g_,{text:t})},setIcon:t=>js(e,p_,{icon:t})}),Z_=(e,t,o,n,r=!0)=>h_({text:e.text,icon:e.icon,tooltip:e.tooltip,searchable:e.search.isSome(),role:n,fetch:(t,n)=>{const r={pattern:e.search.isSome()?DS(t):""};e.fetch((t=>{n(x_(t,Zb.CLOSE_ON_EXECUTE,o,{isHorizontalMenu:!1,search:e.search}))}),r,J_(t))},onSetup:e.onSetup,getApi:J_,columns:1,presets:"normal",classes:[],dropdownBehaviours:[...r?[ak.config({})]:[]]},t,o.shared),Q_=(e,t,o)=>{const n=e=>n=>{const r=!n.isActive();n.setActive(r),e.storage.set(r),o.shared.getSink().each((o=>{t().getOpt(o).each((t=>{Ql(t.element),js(t,hk,{name:e.name,value:e.storage.get()})}))}))},r=e=>t=>{t.setActive(e.storage.get())};return t=>{t(H(e,(e=>{const t=e.text.fold((()=>({})),(e=>({text:e})));return{type:e.type,active:!1,...t,onAction:n(e),onSetup:r(e)}})))}},eT=e=>({dom:{tag:"span",classes:["tox-tree__label"],attributes:{title:e,"aria-label":e}},components:[xi(e)]}),tT=va("leaf-label-event-id"),oT=({leaf:e,onLeafAction:t,visible:o,treeId:n,backstage:r})=>{const s=e.menu.map((e=>Z_(e,"tox-mbtn",r,D.none(),o))),a=[eT(e.title)];return s.each((e=>a.push(e))),Ef.sketch({dom:{tag:"div",classes:["tox-tree--leaf__label","tox-trbtn"].concat(o?["tox-tree--leaf__label--visible"]:[])},components:a,role:"treeitem",action:o=>{t(e.id),o.getSystem().broadcastOn([`update-active-item-${n}`],{value:e.id})},eventOrder:{[as()]:[tT,"keying"]},buttonBehaviours:Gl([...o?[ak.config({})]:[],$h.config({toggleClass:"tox-trbtn--enabled",toggleOnExecute:!1,aria:{mode:"selected"}}),Jl.config({channels:{[`update-active-item-${n}`]:{onReceive:(t,o)=>{(o.value===e.id?$h.on:$h.off)(t)}}}}),Fh(tT,[Zs(as(),((e,t)=>{const o="ArrowLeft"===t.event.raw.code,n="ArrowRight"===t.event.raw.code;o?(Ai(e.element,".tox-tree--directory").each((t=>{e.getSystem().getByDom(t).each((e=>{Mi(t,".tox-tree--directory__label").each((t=>{e.getSystem().getByDom(t).each(zh.focus)}))}))})),t.stop()):n&&t.stop()}))])])})},nT=(e,t)=>((e,t,o)=>Hf(e,{tag:"span",classes:["tox-tree__icon-wrap","tox-icon"],behaviours:o},t))(e,t,[]),rT=va("directory-label-event-id"),sT=({directory:e,visible:t,noChildren:o,backstage:n})=>{const r=e.menu.map((e=>Z_(e,"tox-mbtn",n,D.none()))),s=[{dom:{tag:"div",classes:["tox-chevron"]},components:[nT("chevron-right",n.shared.providers.icons)]},eT(e.title)];r.each((e=>{s.push(e)}));const a=e=>{Ai(e.element,".tox-tree--directory").each((t=>{e.getSystem().getByDom(t).each((e=>$h.toggle(e)))}))};return Ef.sketch({dom:{tag:"div",classes:["tox-tree--directory__label","tox-trbtn"].concat(t?["tox-tree--directory__label--visible"]:[])},components:s,action:a,eventOrder:{[as()]:[rT,"keying"]},buttonBehaviours:Gl([...t?[ak.config({})]:[],Fh(rT,[Zs(as(),((e,t)=>{const n="ArrowRight"===t.event.raw.code,r="ArrowLeft"===t.event.raw.code;n&&o&&t.stop(),(n||r)&&Ai(e.element,".tox-tree--directory").each((o=>{e.getSystem().getByDom(o).each((o=>{!$h.isOn(o)&&n||$h.isOn(o)&&r?(a(e),t.stop()):r&&!$h.isOn(o)&&(Ai(o.element,".tox-tree--directory").each((e=>{Mi(e,".tox-tree--directory__label").each((e=>{o.getSystem().getByDom(e).each(zh.focus)}))})),t.stop())}))}))}))])])})},aT=({children:e,onLeafAction:t,visible:o,treeId:n,backstage:r})=>({dom:{tag:"div",classes:["tox-tree--directory__children"]},components:e.map((e=>"leaf"===e.type?oT({leaf:e,onLeafAction:t,visible:o,treeId:n,backstage:r}):iT({directory:e,onLeafAction:t,labelTabstopping:o,treeId:n,backstage:r}))),behaviours:Gl([Y_.config({dimension:{property:"height"},closedClass:"tox-tree--directory__children--closed",openClass:"tox-tree--directory__children--open",growingClass:"tox-tree--directory__children--growing",shrinkingClass:"tox-tree--directory__children--shrinking"}),Bh.config({})])}),iT=({directory:e,onLeafAction:t,labelTabstopping:o,treeId:n,backstage:r})=>{const{children:s}=e;return{dom:{tag:"div",classes:["tox-tree--directory"],attributes:{role:"treeitem"}},components:[sT({directory:e,visible:o,noChildren:0===e.children.length,backstage:r}),aT({children:s,onLeafAction:t,visible:!1,treeId:n,backstage:r})],behaviours:Gl([$h.config({...e.children.length>0?{aria:{mode:"expanded"}}:{},toggleClass:"tox-tree--directory--expanded",onToggled:(e,o)=>{const a=e.components()[1],i=(l=o,s.map((e=>"leaf"===e.type?oT({leaf:e,onLeafAction:t,visible:l,treeId:n,backstage:r}):iT({directory:e,onLeafAction:t,labelTabstopping:l,treeId:n,backstage:r}))));var l;o?Y_.grow(a):Y_.shrink(a),Bh.set(a,i)}})])}};var lT=Object.freeze({__proto__:null,events:(e,t)=>{const o=e.stream.streams.setup(e,t);return Ks([Zs(e.event,o),ia((()=>t.cancel()))].concat(e.cancelEvent.map((e=>[Zs(e,(()=>t.cancel()))])).getOr([])))}});const cT=(e,t)=>{let o=null;const n=()=>{c(o)||(clearTimeout(o),o=null)};return{cancel:n,throttle:(...r)=>{n(),o=setTimeout((()=>{o=null,e.apply(null,r)}),t)}}},dT=e=>{const t=Rr(null);return Na({readState:()=>({timer:null!==t.get()?"set":"unset"}),setTimer:e=>{t.set(e)},cancel:()=>{const e=t.get();null!==e&&e.cancel()}})};var uT=Object.freeze({__proto__:null,throttle:dT,init:e=>e.stream.streams.state(e)});var mT=[dr("stream",rr("mode",{throttle:[cr("delay"),_r("stopEvent",!0),ol("streams",{setup:(e,t)=>{const o=e.stream,n=cT(e.onStream,o.delay);return t.setTimer(n),(e,t)=>{n.throttle(e,t),o.stopEvent&&t.stop()}},state:dT})]})),_r("event","input"),vr("cancelEvent"),el("onStream")];const gT=ql({fields:mT,name:"streaming",active:lT,state:uT}),pT=(e,t,o)=>{const n=qu.getValue(o);qu.setValue(t,n),fT(t)},hT=(e,t)=>{const o=e.element,n=ii(o),r=o.dom;"number"!==Ot(o,"type")&&t(r,n)},fT=e=>{hT(e,((e,t)=>e.setSelectionRange(t.length,t.length)))},bT=(e,t,o)=>{if(e.selectsOver){const n=qu.getValue(t),r=e.getDisplayText(n),s=qu.getValue(o);return 0===e.getDisplayText(s).indexOf(r)?D.some((()=>{pT(0,t,o),((e,t)=>{hT(e,((e,o)=>e.setSelectionRange(t,o.length)))})(t,r.length)})):D.none()}return D.none()},vT=x("alloy.typeahead.itemexecute"),yT=x([vr("lazySink"),cr("fetch"),_r("minChars",5),_r("responseTime",1e3),Zi("onOpen"),_r("getHotspot",D.some),_r("getAnchorOverrides",x({})),_r("layouts",D.none()),_r("eventOrder",{}),Ir("model",{},[_r("getDisplayText",(e=>void 0!==e.meta&&void 0!==e.meta.text?e.meta.text:e.value)),_r("selectsOver",!0),_r("populateFromBrowse",!0)]),Zi("onSetValue"),Qi("onExecute"),Zi("onItemExecute"),_r("inputClasses",[]),_r("inputAttributes",{}),_r("inputStyles",{}),_r("matchWidth",!0),_r("useMinWidth",!1),_r("dismissOnBlur",!0),Yi(["openClass"]),vr("initialData"),Xu("typeaheadBehaviours",[zh,qu,gT,kh,$h,nS]),ir("lazyTypeaheadComp",(()=>Rr(D.none))),ir("previewing",(()=>Rr(!0)))].concat(bv()).concat(wS())),xT=x([Om({schema:[Ki()],name:"menu",overrides:e=>({fakeFocus:!0,onHighlightItem:(t,o,n)=>{e.previewing.get()?e.lazyTypeaheadComp.get().each((t=>{bT(e.model,t,n).fold((()=>{e.model.selectsOver?(Tg.dehighlight(o,n),e.previewing.set(!0)):e.previewing.set(!1)}),(t=>{t(),e.previewing.set(!1)}))})):e.lazyTypeaheadComp.get().each((t=>{e.model.populateFromBrowse&&pT(e.model,t,n)}))},onExecute:(t,o)=>e.lazyTypeaheadComp.get().map((e=>(js(e,vT(),{item:o}),!0))),onHover:(t,o)=>{e.previewing.set(!1),e.lazyTypeaheadComp.get().each((t=>{e.model.populateFromBrowse&&pT(e.model,t,o)}))}})})]),wT=Zm({name:"Typeahead",configFields:yT(),partFields:xT(),factory:(e,t,o,n)=>{const r=(t,o,r)=>{e.previewing.set(!1);const s=nS.getCoupled(t,"sandbox");if(Tu.isOpen(s))og.getCurrent(s).each((e=>{Tg.getHighlighted(e).fold((()=>{r(e)}),(()=>{Xs(s,e.element,"keydown",o)}))}));else{const o=e=>{og.getCurrent(e).each(r)};gS(e,a(t),t,s,n,o,kf.HighlightMenuAndItem).get(b)}},s=vv(e),a=e=>t=>t.map((t=>{const o=fe(t.menus),n=X(o,(e=>U(e.items,(e=>"item"===e.type))));return qu.getState(e).update(H(n,(e=>e.data))),t})),i=e=>og.getCurrent(e),l="typeaheadevents",c=[zh.config({}),qu.config({onSetValue:e.onSetValue,store:{mode:"dataset",getDataKey:e=>ii(e.element),getFallbackEntry:e=>({value:e,meta:{}}),setValue:(t,o)=>{li(t.element,e.model.getDisplayText(o))},...e.initialData.map((e=>zr("initialValue",e))).getOr({})}}),gT.config({stream:{mode:"throttle",delay:e.responseTime,stopEvent:!1},onStream:(t,o)=>{const r=nS.getCoupled(t,"sandbox");if(zh.isFocused(t)&&ii(t.element).length>=e.minChars){const o=i(r).bind((e=>Tg.getHighlighted(e).map(qu.getValue)));e.previewing.set(!0);const s=t=>{i(r).each((t=>{o.fold((()=>{e.model.selectsOver&&Tg.highlightFirst(t)}),(e=>{Tg.highlightBy(t,(t=>qu.getValue(t).value===e.value)),Tg.getHighlighted(t).orThunk((()=>(Tg.highlightFirst(t),D.none())))}))}))};gS(e,a(t),t,r,n,s,kf.HighlightJustMenu).get(b)}},cancelEvent:_s()}),kh.config({mode:"special",onDown:(e,t)=>(r(e,t,Tg.highlightFirst),D.some(!0)),onEscape:e=>{const t=nS.getCoupled(e,"sandbox");return Tu.isOpen(t)?(Tu.close(t),D.some(!0)):D.none()},onUp:(e,t)=>(r(e,t,Tg.highlightLast),D.some(!0)),onEnter:t=>{const o=nS.getCoupled(t,"sandbox"),n=Tu.isOpen(o);if(n&&!e.previewing.get())return i(o).bind((e=>Tg.getHighlighted(e))).map((e=>(js(t,vT(),{item:e}),!0)));{const r=qu.getValue(t);return Ws(t,_s()),e.onExecute(o,t,r),n&&Tu.close(o),D.some(!0)}}}),$h.config({toggleClass:e.markers.openClass,aria:{mode:"expanded"}}),nS.config({others:{sandbox:t=>yS(e,t,{onOpen:()=>$h.on(t),onClose:()=>$h.off(t)})}}),Fh(l,[aa((t=>{e.lazyTypeaheadComp.set(D.some(t))})),ia((t=>{e.lazyTypeaheadComp.set(D.none())})),ca((t=>{const o=b;hS(e,a(t),t,n,o,kf.HighlightMenuAndItem).get(b)})),Zs(vT(),((t,o)=>{const n=nS.getCoupled(t,"sandbox");pT(e.model,t,o.event.item),Ws(t,_s()),e.onItemExecute(t,n,o.event.item,qu.getValue(t)),Tu.close(n),fT(t)}))].concat(e.dismissOnBlur?[Zs(vs(),(e=>{const t=nS.getCoupled(e,"sandbox");nc(t.element).isNone()&&Tu.close(t)}))]:[]))],d={[Fs()]:[qu.name(),gT.name(),l],...e.eventOrder};return{uid:e.uid,dom:xv(xn(e,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:{...s,...Yu(e.typeaheadBehaviours,c)},eventOrder:d}}}),ST=e=>({...e,toCached:()=>ST(e.toCached()),bindFuture:t=>ST(e.bind((e=>e.fold((e=>cS(tn.error(e))),(e=>t(e)))))),bindResult:t=>ST(e.map((e=>e.bind(t)))),mapResult:t=>ST(e.map((e=>e.map(t)))),mapError:t=>ST(e.map((e=>e.mapError(t)))),foldResult:(t,o)=>e.map((e=>e.fold(t,o))),withTimeout:(t,o)=>ST(lS((n=>{let r=!1;const s=setTimeout((()=>{r=!0,n(tn.error(o()))}),t);e.get((e=>{r||(clearTimeout(s),n(e))}))})))}),kT=e=>ST(lS(e)),OT=kT,CT=(e,t,o=[],n,r,s)=>{const a=t.fold((()=>({})),(e=>({action:e}))),i={buttonBehaviours:Gl([ux((()=>!e.enabled||s.isDisabled())),cx(),ak.config({}),Fh("button press",[Js("click"),Js("mousedown")])].concat(o)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]},...a},l=xn(i,{dom:n});return xn(l,{components:r})},_T=(e,t,o,n=[])=>{const r={tag:"button",classes:["tox-tbtn"],attributes:e.tooltip.map((e=>({"aria-label":o.translate(e),title:o.translate(e)}))).getOr({})},s=e.icon.map((e=>d_(e,o.icons))),a=yx([s]);return CT(e,t,n,r,a,o)},TT=e=>{switch(e){case"primary":return["tox-button"];case"toolbar":return["tox-tbtn"];default:return["tox-button","tox-button--secondary"]}},ET=(e,t,o,n=[],r=[])=>{const s=o.translate(e.text),a=e.icon.map((e=>d_(e,o.icons))),i=[a.getOrThunk((()=>xi(s)))],l=e.buttonType.getOr(e.primary||e.borderless?"primary":"secondary"),c=[...TT(l),...a.isSome()?["tox-button--icon"]:[],...e.borderless?["tox-button--naked"]:[],...r];return CT(e,t,n,{tag:"button",classes:c,attributes:{title:s}},i,o)},DT=(e,t,o,n=[],r=[])=>{const s=ET(e,D.some(t),o,n,r);return Ef.sketch(s)},AT=(e,t)=>o=>{"custom"===t?js(o,hk,{name:e,value:{}}):"submit"===t?Ws(o,fk):"cancel"===t?Ws(o,pk):console.error("Unknown button type: ",t)},MT=(e,t,o)=>{if(((e,t)=>"menu"===t)(0,t)){const t=()=>s,n=e,r={...e,type:"menubutton",search:D.none(),onSetup:t=>(t.setEnabled(e.enabled),b),fetch:Q_(n.items,t,o)},s=Df(Z_(r,"tox-tbtn",o,D.none()));return s.asSpec()}if(((e,t)=>"custom"===t||"cancel"===t||"submit"===t)(0,t)){const n=AT(e.name,t),r={...e,borderless:!1};return DT(r,n,o.shared.providers,[])}if(((e,t)=>"togglebutton"===t)(0,t)){return((e,t)=>{var o,n,r;const s=D.from(e.icon).map((e=>u_(e,t.icons))).map(Df),a={...e,name:null!==(o=e.name)&&void 0!==o?o:"",primary:"primary"===e.buttonType,buttonType:D.from(e.buttonType),tooltip:D.from(e.tooltip),icon:D.from(e.name),enabled:null!==(n=e.enabled)&&void 0!==n&&n,borderless:!1},i=a.tooltip.map((e=>({"aria-label":t.translate(e),title:t.translate(e)}))).getOr({}),l=TT(null!==(r=e.buttonType)&&void 0!==r?r:"secondary"),c=!!e.icon&&!!e.text,d={tag:"button",classes:[...l.concat(["tox-button--icon"]),...e.active?["tox-button--enabled"]:[],...c?["tox-button--icon-and-text"]:[]],attributes:i},u=t.translate(e.text),m=xi(u),g=[...yx([s.map((e=>e.asSpec()))]),...c?[m]:[]],p=CT(a,D.some((o=>{js(o,hk,{name:e.name,value:{setIcon:e=>{s.map((n=>n.getOpt(o).each((o=>{Bh.set(o,[u_(e,t.icons)])}))))}}})})),[],d,g,t);return Ef.sketch(p)})({...e,tooltip:e.tooltip,text:e.text.getOrUndefined(),buttonType:e.buttonType.getOrUndefined()},o.shared.providers)}throw console.error("Unknown footer button type: ",t),new Error("Unknown footer button type")},BT=(e,t)=>{const o=AT(e.name,"custom");return n=D.none(),r=nk.parts.field({factory:Ef,...ET(e,D.some(o),t,[jC(""),IC()])}),lk(n,r,[],[]);var n,r},FT={type:"separator"},IT=e=>({type:"menuitem",value:e.url,text:e.title,meta:{attach:e.attach},onAction:b}),RT=(e,t)=>({type:"menuitem",value:t,text:e,meta:{attach:void 0},onAction:b}),NT=(e,t)=>(e=>H(e,IT))(((e,t)=>U(t,(t=>t.type===e)))(e,t)),VT=e=>NT("header",e.targets),zT=e=>NT("anchor",e.targets),HT=e=>D.from(e.anchorTop).map((e=>RT("<top>",e))).toArray(),LT=e=>D.from(e.anchorBottom).map((e=>RT("<bottom>",e))).toArray(),PT=(e,t)=>{const o=e.toLowerCase();return U(t,(e=>{var t;const n=void 0!==e.meta&&void 0!==e.meta.text?e.meta.text:e.text,r=null!==(t=e.value)&&void 0!==t?t:"";return Te(n.toLowerCase(),o)||Te(r.toLowerCase(),o)}))},UT=(e,t,o)=>{var n,r;const s=qu.getValue(t),a=null!==(r=null===(n=null==s?void 0:s.meta)||void 0===n?void 0:n.text)&&void 0!==r?r:s.value;return o.getLinkInformation().fold((()=>[]),(t=>{const n=PT(a,(e=>H(e,(e=>RT(e,e))))(o.getHistory(e)));return"file"===e?(r=[n,PT(a,VT(t)),PT(a,q([HT(t),zT(t),LT(t)]))],j(r,((e,t)=>0===e.length||0===t.length?e.concat(t):e.concat(FT,t)),[])):n;var r}))},WT=va("aria-invalid"),jT=(e,t)=>{e.dom.checked=t},GT=e=>e.dom.checked,$T=e=>(t,o,n,r)=>be(o,"name").fold((()=>e(o,r,D.none())),(s=>t.field(s,e(o,r,be(n,s))))),qT={bar:$T(((e,t)=>((e,t)=>({dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:H(e.items,t.interpreter)}))(e,t.shared))),collection:$T(((e,t,o)=>wk(e,t.shared.providers,o))),alertbanner:$T(((e,t)=>((e,t)=>QS.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in",`tox-notification--${e.level}`]},components:[{dom:{tag:"div",classes:["tox-notification__icon"]},components:[Ef.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:Nf(e.icon,t.icons),attributes:{title:t.translate(e.iconTooltip)}},action:t=>{js(t,hk,{name:"alert-banner",value:e.url})},buttonBehaviours:Gl([Vf()])})]},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:t.translate(e.text)}}]}))(e,t.shared.providers))),input:$T(((e,t,o)=>((e,t,o)=>I_({name:e.name,multiline:!1,label:e.label,inputMode:e.inputMode,placeholder:e.placeholder,flex:!1,disabled:!e.enabled,classname:"tox-textfield",validation:D.none(),maximized:e.maximized,data:o},t))(e,t.shared.providers,o))),textarea:$T(((e,t,o)=>((e,t,o)=>I_({name:e.name,multiline:!0,label:e.label,inputMode:D.none(),placeholder:e.placeholder,flex:!0,disabled:!e.enabled,classname:"tox-textarea",validation:D.none(),maximized:e.maximized,data:o},t))(e,t.shared.providers,o))),label:$T(((e,t)=>((e,t)=>({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"label",classes:["tox-label"]},components:[xi(t.providers.translate(e.label))]},...H(e.items,t.interpreter)],behaviours:Gl([IC(),Bh.config({}),WC(D.none()),kh.config({mode:"acyclic"})])}))(e,t.shared))),iframe:(e=>(t,o,n,r)=>{const s=xn(o,{source:"dynamic"});return $T(e)(t,s,n,r)})(((e,t,o)=>n_(e,t.shared.providers,o))),button:$T(((e,t)=>BT(e,t.shared.providers))),checkbox:$T(((e,t,o)=>((e,t,o)=>{const n=e=>(e.element.dom.click(),D.some(!0)),r=nk.parts.field({factory:{sketch:w},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:Gl([IC(),fg.config({disabled:()=>!e.enabled||t.isDisabled()}),ak.config({}),zh.config({}),PC(o,GT,jT),kh.config({mode:"special",onEnter:n,onSpace:n,stopSpaceKeyup:!0}),Fh("checkbox-events",[Zs(cs(),((t,o)=>{js(t,mk,{name:e.name})}))])])}),s=nk.parts.label({dom:{tag:"span",classes:["tox-checkbox__label"]},components:[xi(t.translate(e.label))],behaviours:Gl([Bk.config({})])}),a=e=>Hf("checked"===e?"selected":"unselected",{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+e]},t.icons),i=Df({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[a("checked"),a("unchecked")]});return nk.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[r,i.asSpec(),s],fieldBehaviours:Gl([fg.config({disabled:()=>!e.enabled||t.isDisabled(),disableClass:"tox-checkbox--disabled",onDisabled:e=>{nk.getField(e).each(fg.disable)},onEnabled:e=>{nk.getField(e).each(fg.enable)}}),cx()])})})(e,t.shared.providers,o))),colorinput:$T(((e,t,o)=>Nk(e,t.shared,t.colorinput,o))),colorpicker:$T(((e,t,o)=>$C(0,t.shared.providers,o))),dropzone:$T(((e,t,o)=>KC(e,t.shared.providers,o))),grid:$T(((e,t)=>((e,t)=>({dom:{tag:"div",classes:["tox-form__grid",`tox-form__grid--${e.columns}col`]},components:H(e.items,t.interpreter)}))(e,t.shared))),listbox:$T(((e,t,o)=>((e,t,o)=>{const n=t.shared.providers,r=o.bind((t=>O_(e.items,t))).orThunk((()=>oe(e.items).filter(w_))),s=e.label.map((e=>uk(e,n))),a=nk.parts.field({dom:{},factory:{sketch:o=>h_({uid:o.uid,text:r.map((e=>e.text)),icon:D.none(),tooltip:e.label,role:D.none(),fetch:(o,n)=>{const r=k_(o,e.name,e.items,qu.getValue(o));n(x_(r,Zb.CLOSE_ON_EXECUTE,t,{isHorizontalMenu:!1,search:D.none()}))},onSetup:x(b),getApi:x({}),columns:1,presets:"normal",classes:[],dropdownBehaviours:[ak.config({}),UC(r.map((e=>e.value)),(e=>Ot(e.element,S_)),((t,o)=>{O_(e.items,o).each((e=>{St(t.element,S_,e.value),js(t,g_,{text:e.text})}))}))]},"tox-listbox",t.shared)}}),i={dom:{tag:"div",classes:["tox-listboxfield"]},components:[a]};return nk.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:q([s.toArray(),[i]]),fieldBehaviours:Gl([fg.config({disabled:x(!e.enabled),onDisabled:e=>{nk.getField(e).each(fg.disable)},onEnabled:e=>{nk.getField(e).each(fg.enable)}})])})})(e,t,o))),selectbox:$T(((e,t,o)=>((e,t,o)=>{const n=H(e.items,(e=>({text:t.translate(e.text),value:e.value}))),r=e.label.map((e=>uk(e,t))),s=nk.parts.field({dom:{},...o.map((e=>({data:e}))).getOr({}),selectAttributes:{size:e.size},options:n,factory:C_,selectBehaviours:Gl([fg.config({disabled:()=>!e.enabled||t.isDisabled()}),ak.config({}),Fh("selectbox-change",[Zs(cs(),((t,o)=>{js(t,mk,{name:e.name})}))])])}),a=e.size>1?D.none():D.some(Hf("chevron-down",{tag:"div",classes:["tox-selectfield__icon-js"]},t.icons)),i={dom:{tag:"div",classes:["tox-selectfield"]},components:q([[s],a.toArray()])};return nk.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:q([r.toArray(),[i]]),fieldBehaviours:Gl([fg.config({disabled:()=>!e.enabled||t.isDisabled(),onDisabled:e=>{nk.getField(e).each(fg.disable)},onEnabled:e=>{nk.getField(e).each(fg.enable)}}),cx()])})})(e,t.shared.providers,o))),sizeinput:$T(((e,t)=>((e,t)=>{let o=B_;const n=va("ratio-event"),r=e=>Hf(e,{tag:"span",classes:["tox-icon","tox-lock-icon__"+e]},t.icons),s=D_.parts.lock({dom:{tag:"button",classes:["tox-lock","tox-button","tox-button--naked","tox-button--icon"],attributes:{title:t.translate(e.label.getOr("Constrain proportions"))}},components:[r("lock"),r("unlock")],buttonBehaviours:Gl([fg.config({disabled:()=>!e.enabled||t.isDisabled()}),cx(),ak.config({})])}),a=e=>({dom:{tag:"div",classes:["tox-form__group"]},components:e}),i=o=>nk.parts.field({factory:wv,inputClasses:["tox-textfield"],inputBehaviours:Gl([fg.config({disabled:()=>!e.enabled||t.isDisabled()}),cx(),ak.config({}),Fh("size-input-events",[Zs(rs(),((e,t)=>{js(e,n,{isField1:o})})),Zs(cs(),((t,o)=>{js(t,mk,{name:e.name})}))])]),selectOnFocus:!1}),l=e=>({dom:{tag:"label",classes:["tox-label"]},components:[xi(t.translate(e))]}),c=D_.parts.field1(a([nk.parts.label(l("Width")),i(!0)])),d=D_.parts.field2(a([nk.parts.label(l("Height")),i(!1)]));return D_.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[c,d,a([l(" "),s])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:(e,t,n)=>{A_(qu.getValue(e)).each((e=>{o(e).each((e=>{qu.setValue(t,(e=>{const t={"":0,px:0,pt:1,mm:1,pc:2,ex:2,em:2,ch:2,rem:2,cm:3,in:4,"%":4};let o=e.value.toFixed((n=e.unit)in t?t[n]:1);var n;return-1!==o.indexOf(".")&&(o=o.replace(/\.?0*$/,"")),o+e.unit})(e))}))}))},coupledFieldBehaviours:Gl([fg.config({disabled:()=>!e.enabled||t.isDisabled(),onDisabled:e=>{D_.getField1(e).bind(nk.getField).each(fg.disable),D_.getField2(e).bind(nk.getField).each(fg.disable),D_.getLock(e).each(fg.disable)},onEnabled:e=>{D_.getField1(e).bind(nk.getField).each(fg.enable),D_.getField2(e).bind(nk.getField).each(fg.enable),D_.getLock(e).each(fg.enable)}}),cx(),Fh("size-input-events2",[Zs(n,((e,t)=>{const n=t.event.isField1,r=n?D_.getField1(e):D_.getField2(e),s=n?D_.getField2(e):D_.getField1(e),a=r.map(qu.getValue).getOr(""),i=s.map(qu.getValue).getOr("");o=F_(a,i)}))])])})})(e,t.shared.providers))),slider:$T(((e,t,o)=>((e,t,o)=>{const n=vC.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[xi(t.translate(e.label))]}),r=vC.parts.spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),s=vC.parts.thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return vC.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:e.min,maxX:e.max,getInitialValue:x(o.getOrThunk((()=>(Math.abs(e.max)-Math.abs(e.min))/2)))},components:[n,r,s],sliderBehaviours:Gl([IC(),zh.config({})]),onChoose:(t,o,n)=>{js(t,mk,{name:e.name,value:n})}})})(e,t.shared.providers,o))),urlinput:$T(((e,t,o)=>((e,t,o,n)=>{const r=t.shared.providers,s=t=>{const n=qu.getValue(t);o.addToHistory(n.value,e.filetype)},a={...n.map((e=>({initialData:e}))).getOr({}),dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":WT,type:"url"},minChars:0,responseTime:0,fetch:n=>{const r=UT(e.filetype,n,o),s=x_(r,Zb.BUBBLE_TO_SANDBOX,t,{isHorizontalMenu:!1,search:D.none()});return cS(s)},getHotspot:e=>g.getOpt(e),onSetValue:(e,t)=>{e.hasConfigured(Mk)&&Mk.run(e).get(b)},typeaheadBehaviours:Gl([...o.getValidationHandler().map((t=>Mk.config({getRoot:e=>nt(e.element),invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:(e,t)=>{c.getOpt(e).each((e=>{St(e.element,"title",r.translate(t))}))}},validator:{validate:o=>{const n=qu.getValue(o);return OT((o=>{t({type:e.filetype,url:n.value},(e=>{if("invalid"===e.status){const t=tn.error(e.message);o(t)}else{const t=tn.value(e.message);o(t)}}))}))},validateOnLoad:!1}}))).toArray(),fg.config({disabled:()=>!e.enabled||r.isDisabled()}),ak.config({}),Fh("urlinput-events",[Zs(ls(),(t=>{const o=ii(t.element),n=o.trim();n!==o&&li(t.element,n),"file"===e.filetype&&js(t,mk,{name:e.name})})),Zs(cs(),(t=>{js(t,mk,{name:e.name}),s(t)})),Zs(ys(),(t=>{js(t,mk,{name:e.name}),s(t)}))])]),eventOrder:{[ls()]:["streaming","urlinput-events","invalidating"]},model:{getDisplayText:e=>e.value,selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:t.shared.getSink,parts:{menu:fv(0,0,"normal")},onExecute:(e,t,o)=>{js(t,fk,{})},onItemExecute:(t,o,n,r)=>{s(t),js(t,mk,{name:e.name})}},i=nk.parts.field({...a,factory:wT}),l=e.label.map((e=>uk(e,r))),c=Df(((e,t,o=e,n=e)=>Hf(o,{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+e],attributes:{title:r.translate(n),"aria-live":"polite",...t.fold((()=>({})),(e=>({id:e})))}},r.icons))("invalid",D.some(WT),"warning")),d=Df({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[c.asSpec()]}),u=o.getUrlPicker(e.filetype),m=va("browser.url.event"),g=Df({dom:{tag:"div",classes:["tox-control-wrap"]},components:[i,d.asSpec()],behaviours:Gl([fg.config({disabled:()=>!e.enabled||r.isDisabled()})])}),p=Df(DT({name:e.name,icon:D.some("browse"),text:e.label.getOr(""),enabled:e.enabled,primary:!1,buttonType:D.none(),borderless:!0},(e=>Ws(e,m)),r,[],["tox-browse-url"]));return nk.sketch({dom:dk([]),components:l.toArray().concat([{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:q([[g.asSpec()],u.map((()=>p.asSpec())).toArray()])}]),fieldBehaviours:Gl([fg.config({disabled:()=>!e.enabled||r.isDisabled(),onDisabled:e=>{nk.getField(e).each(fg.disable),p.getOpt(e).each(fg.disable)},onEnabled:e=>{nk.getField(e).each(fg.enable),p.getOpt(e).each(fg.enable)}}),cx(),Fh("url-input-events",[Zs(m,(t=>{og.getCurrent(t).each((o=>{const n=qu.getValue(o),r={fieldname:e.name,...n};u.each((n=>{n(r).get((n=>{qu.setValue(o,n),js(t,mk,{name:e.name})}))}))}))}))])])})})(e,t,t.urlinput,o))),customeditor:$T((e=>{const t=Sc(),o=Df({dom:{tag:e.tag}}),n=Sc();return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:Gl([Fh("custom-editor-events",[aa((r=>{o.getOpt(r).each((o=>{((e=>ve(e,"init"))(e)?e.init(o.element.dom):qC.load(e.scriptId,e.scriptUrl).then((t=>t(o.element.dom,e.settings)))).then((e=>{n.on((t=>{e.setValue(t)})),n.clear(),t.set(e)}))}))}))]),UC(D.none(),(()=>t.get().fold((()=>n.get().getOr("")),(e=>e.getValue()))),((e,o)=>{t.get().fold((()=>n.set(o)),(e=>e.setValue(o)))})),IC()]),components:[o.asSpec()]}})),htmlpanel:$T((e=>"presentation"===e.presets?QS.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:e.html}}):QS.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:e.html,attributes:{role:"document"}},containerBehaviours:Gl([ak.config({}),zh.config({})])}))),imagepreview:$T(((e,t,o)=>r_(e,o))),table:$T(((e,t)=>((e,t)=>{const o=e=>({dom:{tag:"th",innerHtml:t.translate(e)}}),n=e=>({dom:{tag:"td",innerHtml:t.translate(e)}}),r=e=>({dom:{tag:"tr"},components:H(e,n)});return{dom:{tag:"table",classes:["tox-dialog__table"]},components:[(a=e.header,{dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:H(a,o)}]}),(s=e.cells,{dom:{tag:"tbody"},components:H(s,r)})],behaviours:Gl([ak.config({}),zh.config({})])};var s,a})(e,t.shared.providers))),tree:$T(((e,t)=>((e,t)=>{const o=e.onLeafAction.getOr(b),n=va("tree-id"),r=e.items.map((e=>"leaf"===e.type?oT({leaf:e,onLeafAction:o,visible:!0,treeId:n,backstage:t}):iT({directory:e,onLeafAction:o,labelTabstopping:!0,treeId:n,backstage:t})));return{dom:{tag:"div",classes:["tox-tree"],attributes:{role:"tree"}},components:r,behaviours:Gl([kh.config({mode:"flow",selector:".tox-tree--leaf__label--visible, .tox-tree--directory__label--visible",cycles:!1})])}})(e,t))),panel:$T(((e,t)=>((e,t)=>({dom:{tag:"div",classes:e.classes},components:H(e.items,t.shared.interpreter)}))(e,t)))},XT={field:(e,t)=>t,record:x([])},KT=(e,t,o,n)=>{const r=xn(n,{shared:{interpreter:t=>YT(e,t,o,r)}});return YT(e,t,o,r)},YT=(e,t,o,n)=>be(qT,t.type).fold((()=>(console.error(`Unknown factory type "${t.type}", defaulting to container: `,t),t)),(r=>r(e,t,o,n))),JT=(e,t,o)=>YT(XT,e,t,o),ZT="layout-inset",QT=e=>e.x,eE=(e,t)=>e.x+e.width/2-t.width/2,tE=(e,t)=>e.x+e.width-t.width,oE=e=>e.y,nE=(e,t)=>e.y+e.height-t.height,rE=(e,t)=>e.y+e.height/2-t.height/2,sE=(e,t,o)=>sl(tE(e,t),nE(e,t),o.insetSouthwest(),dl(),"southwest",bl(e,{right:0,bottom:3}),ZT),aE=(e,t,o)=>sl(QT(e),nE(e,t),o.insetSoutheast(),cl(),"southeast",bl(e,{left:1,bottom:3}),ZT),iE=(e,t,o)=>sl(tE(e,t),oE(e),o.insetNorthwest(),ll(),"northwest",bl(e,{right:0,top:2}),ZT),lE=(e,t,o)=>sl(QT(e),oE(e),o.insetNortheast(),il(),"northeast",bl(e,{left:1,top:2}),ZT),cE=(e,t,o)=>sl(eE(e,t),oE(e),o.insetNorth(),ul(),"north",bl(e,{top:2}),ZT),dE=(e,t,o)=>sl(eE(e,t),nE(e,t),o.insetSouth(),ml(),"south",bl(e,{bottom:3}),ZT),uE=(e,t,o)=>sl(tE(e,t),rE(e,t),o.insetEast(),pl(),"east",bl(e,{right:0}),ZT),mE=(e,t,o)=>sl(QT(e),rE(e,t),o.insetWest(),gl(),"west",bl(e,{left:1}),ZT),gE=e=>{switch(e){case"north":return cE;case"northeast":return lE;case"northwest":return iE;case"south":return dE;case"southeast":return aE;case"southwest":return sE;case"east":return uE;case"west":return mE}},pE=(e,t,o,n,r)=>bc(n).map(gE).getOr(cE)(e,t,o,n,r),hE=e=>{switch(e){case"north":return dE;case"northeast":return aE;case"northwest":return sE;case"south":return cE;case"southeast":return lE;case"southwest":return iE;case"east":return mE;case"west":return uE}},fE=(e,t,o,n,r)=>bc(n).map(hE).getOr(cE)(e,t,o,n,r),bE={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},vE=(e,t,o)=>{const n={maxHeightFunction:Nc()};return()=>o()?{type:"node",root:pt(gt(e())),node:D.from(e()),bubble:Lc(12,12,bE),layouts:{onRtl:()=>[lE],onLtr:()=>[iE]},overrides:n}:{type:"hotspot",hotspot:t(),bubble:Lc(-12,12,bE),layouts:{onRtl:()=>[Cl,_l,Al],onLtr:()=>[_l,Cl,Al]},overrides:n}},yE=(e,t,o)=>()=>o()?{type:"node",root:pt(gt(e())),node:D.from(e()),layouts:{onRtl:()=>[cE],onLtr:()=>[cE]}}:{type:"hotspot",hotspot:t(),layouts:{onRtl:()=>[Al],onLtr:()=>[Al]}},xE=(e,t)=>()=>({type:"selection",root:t(),getSelection:()=>{const t=e.selection.getRng();return D.some(gd.range(Ie.fromDom(t.startContainer),t.startOffset,Ie.fromDom(t.endContainer),t.endOffset))}}),wE=e=>t=>({type:"node",root:e(),node:t}),SE=(e,t,o)=>{const n=Pb(e),r=()=>Ie.fromDom(e.getBody()),s=()=>Ie.fromDom(e.getContentAreaContainer()),a=()=>n||!o();return{inlineDialog:vE(s,t,a),banner:yE(s,t,a),cursor:xE(e,r),node:wE(r)}},kE=e=>(t,o)=>{Nw(e)(t,o)},OE=e=>()=>Sw(e),CE=e=>t=>kw(e,t),_E=e=>t=>ww(e,t),TE=e=>()=>Ob(e),EE=e=>ye(e,"items"),DE=e=>ye(e,"format"),AE=[{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"}]}],ME=e=>j(e,((e,t)=>{if(ve(t,"items")){const o=ME(t.items);return{customFormats:e.customFormats.concat(o.customFormats),formats:e.formats.concat([{title:t.title,items:o.formats}])}}if((e=>ve(e,"inline"))(t)||(e=>ve(e,"block"))(t)||(e=>ve(e,"selector"))(t)){const o=`custom-${s(t.name)?t.name:t.title.toLowerCase()}`;return{customFormats:e.customFormats.concat([{name:o,format:t}]),formats:e.formats.concat([{title:t.title,format:o,icon:t.icon}])}}return{...e,formats:e.formats.concat(t)}}),{customFormats:[],formats:[]}),BE=e=>nb(e).map((t=>{const o=((e,t)=>{const o=ME(t),n=t=>{L(t,(t=>{e.formatter.has(t.name)||e.formatter.register(t.name,t.format)}))};return e.formatter?n(o.customFormats):e.on("init",(()=>{n(o.customFormats)})),o.formats})(e,t);return rb(e)?AE.concat(o):o})).getOr(AE),FE=(e,t,o)=>({...e,type:"formatter",isSelected:t(e.format),getStylePreview:o(e.format)}),IE=(e,t,o,n)=>{const r=t=>H(t,(t=>EE(t)?(e=>{const t=r(e.items);return{...e,type:"submenu",getStyleItems:x(t)}})(t):DE(t)?(e=>FE(e,o,n))(t):(e=>{const t=ae(e);return 1===t.length&&R(t,"title")})(t)?{...t,type:"separator"}:(t=>{const r=s(t.name)?t.name:va(t.title),a=`custom-${r}`,i={...t,type:"formatter",format:a,isSelected:o(a),getStylePreview:n(a)};return e.formatter.register(r,i),i})(t)));return r(t)},RE=XC.trim,NE=e=>t=>{if((e=>g(e)&&1===e.nodeType)(t)){if(t.contentEditable===e)return!0;if(t.getAttribute("data-mce-contenteditable")===e)return!0}return!1},VE=NE("true"),zE=NE("false"),HE=(e,t,o,n,r)=>({type:e,title:t,url:o,level:n,attach:r}),LE=e=>e.innerText||e.textContent,PE=e=>(e=>e&&"A"===e.nodeName&&void 0!==(e.id||e.name))(e)&&WE(e),UE=e=>e&&/^(H[1-6])$/.test(e.nodeName),WE=e=>(e=>{let t=e;for(;t=t.parentNode;){const e=t.contentEditable;if(e&&"inherit"!==e)return VE(t)}return!1})(e)&&!zE(e),jE=e=>UE(e)&&WE(e),GE=e=>{var t;const o=(e=>e.id?e.id:va("h"))(e);return HE("header",null!==(t=LE(e))&&void 0!==t?t:"","#"+o,(e=>UE(e)?parseInt(e.nodeName.substr(1),10):0)(e),(()=>{e.id=o}))},$E=e=>{const t=e.id||e.name,o=LE(e);return HE("anchor",o||"#"+t,"#"+t,0,b)},qE=e=>{const t=(o="h1,h2,h3,h4,h5,h6,a:not([href])",n=e,H(Sd(Ie.fromDom(n),o),(e=>e.dom)));var o,n;return t},XE=e=>RE(e.title).length>0,KE=e=>{const t=qE(e);return U((e=>H(U(e,jE),GE))(t).concat((e=>H(U(e,PE),$E))(t)),XE)},YE="tinymce-url-history",JE=e=>s(e)&&/^https?/.test(e),ZE=e=>a(e)&&he(e,(e=>{return!(l(t=e)&&t.length<=5&&K(t,JE));var t})).isNone(),QE=()=>{const e=aw.getItem(YE);if(null===e)return{};let t;try{t=JSON.parse(e)}catch(e){if(e instanceof SyntaxError)return console.log("Local storage "+YE+" was not valid JSON",e),{};throw e}return ZE(t)?t:(console.log("Local storage "+YE+" was not valid format",t),{})},eD=e=>{const t=QE();return be(t,e).getOr([])},tD=(e,t)=>{if(!JE(e))return;const o=QE(),n=be(o,t).getOr([]),r=U(n,(t=>t!==e));o[t]=[e].concat(r).slice(0,5),(e=>{if(!ZE(e))throw new Error("Bad format for history:\n"+JSON.stringify(e));aw.setItem(YE,JSON.stringify(e))})(o)},oD=e=>!!e,nD=e=>ce(XC.makeMap(e,/[, ]/),oD),rD=e=>D.from(bb(e)),sD=(e,t)=>{const o=(e=>{const t=D.from(xb(e)).filter(oD).map(nD);return rD(e).fold(T,(e=>t.fold(E,(e=>ae(e).length>0&&e))))})(e);return d(o)?o?rD(e):D.none():o[t]?rD(e):D.none()},aD=e=>D.from(e).filter(s).getOrUndefined(),iD=e=>({getHistory:eD,addToHistory:tD,getLinkInformation:()=>(e=>wb(e)?D.some({targets:KE(e.getBody()),anchorTop:aD(Sb(e)),anchorBottom:aD(kb(e))}):D.none())(e),getValidationHandler:()=>(e=>D.from(vb(e)))(e),getUrlPicker:t=>((e,t)=>sD(e,t).map((o=>n=>lS((r=>{const i={filetype:t,fieldname:n.fieldname,...D.from(n.meta).getOr({})};o.call(e,((e,t)=>{if(!s(e))throw new Error("Expected value to be string");if(void 0!==t&&!a(t))throw new Error("Expected meta to be a object");r({value:e,meta:t})}),n.value,i)})))))(e,t)}),lD=(e,t,o)=>{const n=Rr(!1),r=(e=>{const t=Rr(Hb(e)?"bottom":"top");return{isPositionedAtTop:()=>"top"===t.get(),getDockingMode:t.get,setDockingMode:t.set}})(t),s={icons:()=>t.ui.registry.getAll().icons,menuItems:()=>t.ui.registry.getAll().menuItems,translate:Af.translate,isDisabled:()=>t.mode.isReadOnly()||!t.ui.isEnabled(),getOption:t.options.get},a=iD(t),i=(e=>{const t=t=>()=>e.formatter.match(t),o=t=>()=>{const o=e.formatter.get(t);return void 0!==o?D.some({tag:o.length>0&&(o[0].inline||o[0].block)||"div",styles:e.dom.parseStyle(e.formatter.getCssText(t))}):D.none()},n=Rr([]),r=Rr([]),s=Rr(!1);return e.on("PreInit",(r=>{const s=BE(e),a=IE(e,s,t,o);n.set(a)})),e.on("addStyleModifications",(n=>{const a=IE(e,n.items,t,o);r.set(a),s.set(n.replace)})),{getData:()=>{const e=s.get()?[]:n.get(),t=r.get();return e.concat(t)}}})(t),l=(e=>({colorPicker:kE(e),hasCustomColors:OE(e),getColors:CE(e),getColorCols:_E(e)}))(t),c=(e=>({isDraggableModal:TE(e)}))(t),d={shared:{providers:s,anchors:SE(t,o,r.isPositionedAtTop),header:r},urlinput:a,styles:i,colorinput:l,dialog:c,isContextMenuOpen:()=>n.get(),setContextMenuState:e=>n.set(e)},u={...d,shared:{...d.shared,interpreter:e=>JT(e,{},u),getSink:e.popup}},m={...d,shared:{...d.shared,interpreter:e=>JT(e,{},m),getSink:e.dialog}};return{popup:u,dialog:m}},cD=Gm,dD=Em,uD=x([_r("shell",!1),cr("makeItem"),_r("setupItem",b),Ju("listBehaviours",[Bh])]),mD=Cm({name:"items",overrides:()=>({behaviours:Gl([Bh.config({})])})}),gD=x([mD]),pD=Zm({name:x("CustomList")(),configFields:uD(),partFields:gD(),factory:(e,t,o,n)=>{const r=e.shell?{behaviours:[Bh.config({})],components:[]}:{behaviours:[],components:t},s=t=>e.shell?D.some(t):Vm(t,e,"items");return{uid:e.uid,dom:e.dom,components:r.components,behaviours:Yu(e.listBehaviours,r.behaviours),apis:{setItems:(t,o)=>{s(t).fold((()=>{throw 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")}),(n=>{const r=Bh.contents(n),s=o.length,a=s-r.length,i=a>0?V(a,(()=>e.makeItem())):[],l=r.slice(s);L(l,(e=>Bh.remove(n,e))),L(i,(e=>Bh.append(n,e)));const c=Bh.contents(n);L(c,((n,r)=>{e.setupItem(t,n,o[r],r)}))}))}}}},apis:{setItems:(e,t,o)=>{e.setItems(t,o)}}}),hD=x([cr("dom"),_r("shell",!0),Xu("toolbarBehaviours",[Bh])]),fD=x([Cm({name:"groups",overrides:()=>({behaviours:Gl([Bh.config({})])})})]),bD=Zm({name:"Toolbar",configFields:hD(),partFields:fD(),factory:(e,t,o,n)=>{const r=t=>e.shell?D.some(t):Vm(t,e,"groups"),s=e.shell?{behaviours:[Bh.config({})],components:[]}:{behaviours:[],components:t};return{uid:e.uid,dom:e.dom,components:s.components,behaviours:Yu(e.toolbarBehaviours,s.behaviours),apis:{setGroups:(e,t)=>{r(e).fold((()=>{throw 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")}),(e=>{Bh.set(e,t)}))}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:(e,t,o)=>{e.setGroups(t,o)}}}),vD=b,yD=T,xD=x([]);var wD=Object.freeze({__proto__:null,setup:vD,isDocked:yD,getBehaviours:xD});const SD=e=>(xe(Rt(e,"position"),"fixed")?D.none():rt(e)).orThunk((()=>{const t=Ie.fromTag("span");return ot(e).bind((e=>{Ro(e,t);const o=rt(t);return zo(t),o}))})),kD=e=>SD(e).map(qt).getOrThunk((()=>Gt(0,0))),OD=(e,t)=>{const o=e.element;ei(o,t.transitionClass),ti(o,t.fadeOutClass),ei(o,t.fadeInClass),t.onShow(e)},CD=(e,t)=>{const o=e.element;ei(o,t.transitionClass),ti(o,t.fadeInClass),ei(o,t.fadeOutClass),t.onHide(e)},_D=(e,t)=>e.y>=t.y,TD=(e,t)=>e.bottom<=t.bottom,ED=(e,t,o)=>({location:"top",leftX:t,topY:o.bounds.y-e.y}),DD=(e,t,o)=>({location:"bottom",leftX:t,bottomY:e.bottom-o.bounds.bottom}),AD=e=>e.box.x-e.win.x,MD=(e,t,o)=>o.getInitialPos().map((o=>{const n=((e,t)=>{const o=t.optScrollEnv.fold(x(e.bounds.y),(t=>t.scrollElmTop+(e.bounds.y-t.currentScrollTop)));return Gt(e.bounds.x,o)})(o,t);return{box:qo(n.left,n.top,Yt(e),Ut(e)),location:o.location}})),BD=(e,t,o,n,r)=>{const s=((e,t)=>{const o=t.optScrollEnv.fold(x(e.y),(t=>e.y+t.currentScrollTop-t.scrollElmTop));return Gt(e.x,o)})(t,o),a=qo(s.left,s.top,t.width,t.height);n.setInitialPos({style:Nt(e),position:Ft(e,"position")||"static",bounds:a,location:r.location})},FD=(e,t,o)=>o.getInitialPos().bind((n=>{var r;switch(o.clearInitialPos(),n.position){case"static":return D.some({morph:"static"});case"absolute":const o=SD(e).getOr(yt()),s=Xo(o),a=null!==(r=o.dom.scrollTop)&&void 0!==r?r:0;return D.some({morph:"absolute",positionCss:sc("absolute",be(n.style,"left").map((e=>t.x-s.x)),be(n.style,"top").map((e=>t.y-s.y+a)),be(n.style,"right").map((e=>s.right-t.right)),be(n.style,"bottom").map((e=>s.bottom-t.bottom)))});default:return D.none()}})),ID=(e,t,o)=>MD(e,t,o).filter((({box:e})=>((e,t,o)=>K(e,(e=>{switch(e){case"bottom":return TD(t,o.bounds);case"top":return _D(t,o.bounds)}})))(o.getModes(),e,t))).bind((({box:t})=>FD(e,t,o))),RD=e=>{switch(e.location){case"top":return D.some({morph:"fixed",positionCss:sc("fixed",D.some(e.leftX),D.some(e.topY),D.none(),D.none())});case"bottom":return D.some({morph:"fixed",positionCss:sc("fixed",D.some(e.leftX),D.none(),D.none(),D.some(e.bottomY))});default:return D.none()}},ND=(e,t,o)=>{const n=Xo(e),r=Jo(),s=((e,t,o)=>{const n=t.win,r=t.box,s=AD(t);return se(e,(e=>{switch(e){case"bottom":return TD(r,o.bounds)?D.none():D.some(DD(n,s,o));case"top":return _D(r,o.bounds)?D.none():D.some(ED(n,s,o));default:return D.none()}})).getOr({location:"no-dock"})})(o.getModes(),{win:r,box:n},t);return"top"===s.location||"bottom"===s.location?(BD(e,n,t,o,s),RD(s)):D.none()},VD=(e,t,o)=>{const n=e.element;return xe(Rt(n,"position"),"fixed")?((e,t,o)=>ID(e,t,o).orThunk((()=>t.optScrollEnv.bind((n=>MD(e,t,o))).bind((({box:e,location:o})=>{const n=Jo(),r=AD({win:n,box:e}),s="top"===o?ED(n,r,t):DD(n,r,t);return RD(s)})))))(n,t,o):ND(n,t,o)},zD=(e,t,o,n)=>{const r=Xo(e),s=Jo(),a=n(s,AD({win:s,box:r}),t);return"bottom"===a.location||"top"===a.location?(((e,t,o,n,r)=>{n.getInitialPos().fold((()=>BD(e,t,o,n,r)),(()=>b))})(e,r,t,o,a),RD(a)):D.none()},HD=(e,t,o)=>{o.setDocked(!1),L(["left","right","top","bottom","position"],(t=>zt(e.element,t))),t.onUndocked(e)},LD=(e,t,o,n)=>{const r="fixed"===n.position;o.setDocked(r),ac(e.element,n);(r?t.onDocked:t.onUndocked)(e)},PD=(e,t,o,n,r=!1)=>{t.contextual.each((t=>{t.lazyContext(e).each((s=>{const a=((e,t)=>e.y<t.bottom&&e.bottom>t.y)(s,n.bounds);if(a!==o.isVisible())if(o.setVisible(a),r&&!a)ni(e.element,[t.fadeOutClass]),t.onHide(e);else{(a?OD:CD)(e,t)}}))}))},UD=(e,t,o,n,r)=>{PD(e,t,o,n,!0),LD(e,t,o,r.positionCss)},WD=(e,t,o)=>{const n=t.lazyViewport(e);PD(e,t,o,n),VD(e,n,o).each((r=>{((e,t,o,n,r)=>{switch(r.morph){case"static":return HD(e,t,o);case"absolute":return LD(e,t,o,r.positionCss);case"fixed":UD(e,t,o,n,r)}})(e,t,o,n,r)}))},jD=(e,t,o)=>{const n=e.element;o.setDocked(!1);const r=t.lazyViewport(e);((e,t,o)=>{const n=e.element;return MD(n,t,o).bind((({box:e})=>FD(n,e,o)))})(e,r,o).each((n=>{switch(n.morph){case"static":HD(e,t,o);break;case"absolute":LD(e,t,o,n.positionCss)}})),o.setVisible(!0),t.contextual.each((t=>{ri(n,[t.fadeInClass,t.fadeOutClass,t.transitionClass]),t.onShow(e)})),GD(e,t,o)},GD=(e,t,o)=>{e.getSystem().isConnected()&&WD(e,t,o)},$D=(e,t,o)=>{o.isDocked()&&jD(e,t,o)},qD=e=>(t,o,n)=>{const r=o.lazyViewport(t);zD(t.element,r,n,e).each((e=>{UD(t,o,n,r,e)}))},XD=qD(ED),KD=qD(DD);var YD=Object.freeze({__proto__:null,refresh:GD,reset:$D,isDocked:(e,t,o)=>o.isDocked(),getModes:(e,t,o)=>o.getModes(),setModes:(e,t,o,n)=>o.setModes(n),forceDockToTop:XD,forceDockToBottom:KD});var JD=Object.freeze({__proto__:null,events:(e,t)=>Ks([sa(ms(),((o,n)=>{e.contextual.each((e=>{if(oi(o.element,e.transitionClass)){ri(o.element,[e.transitionClass,e.fadeInClass]);(t.isVisible()?e.onShown:e.onHidden)(o)}n.stop()}))})),Zs(As(),((o,n)=>{GD(o,e,t)})),Zs(zs(),((o,n)=>{GD(o,e,t)})),Zs(Ms(),((o,n)=>{$D(o,e,t)}))])}),ZD=[Cr("contextual",[mr("fadeInClass"),mr("fadeOutClass"),mr("transitionClass"),pr("lazyContext"),Zi("onShow"),Zi("onShown"),Zi("onHide"),Zi("onHidden")]),Br("lazyViewport",(()=>({bounds:Jo(),optScrollEnv:D.none()}))),Fr("modes",["top","bottom"],Gn),Zi("onDocked"),Zi("onUndocked")];const QD=ql({fields:ZD,name:"docking",active:JD,apis:YD,state:Object.freeze({__proto__:null,init:e=>{const t=Rr(!1),o=Rr(!0),n=Sc(),r=Rr(e.modes);return Na({isDocked:t.get,setDocked:t.set,getInitialPos:n.get,setInitialPos:n.set,clearInitialPos:n.clear,isVisible:o.get,setVisible:o.set,getModes:r.get,setModes:r.set,readState:()=>`docked: ${t.get()}, visible: ${o.get()}, modes: ${r.get().join(",")}`})}})}),eA=x(va("toolbar-height-change")),tA={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},oA="tox-tinymce--toolbar-sticky-on",nA="tox-tinymce--toolbar-sticky-off",rA=(e,t)=>R(QD.getModes(e),t),sA=e=>{const t=e.element;nt(t).each((o=>{const n="padding-"+QD.getModes(e)[0];if(QD.isDocked(e)){const e=Yt(o);At(t,"width",e+"px"),At(o,n,(e=>Wt(e)+(parseInt(Ft(e,"margin-top"),10)||0)+(parseInt(Ft(e,"margin-bottom"),10)||0))(t)+"px")}else zt(t,"width"),zt(o,n)}))},aA=(e,t)=>{t?(ti(e,tA.fadeOutClass),ni(e,[tA.transitionClass,tA.fadeInClass])):(ti(e,tA.fadeInClass),ni(e,[tA.fadeOutClass,tA.transitionClass]))},iA=(e,t)=>{const o=Ie.fromDom(e.getContainer());t?(ei(o,oA),ti(o,nA)):(ei(o,nA),ti(o,oA))},lA=(e,t)=>{const o=Sc(),n=t.getSink,r=e=>{n().each((t=>e(t.element)))},s=t=>{e.inline||sA(t),iA(e,QD.isDocked(t)),t.getSystem().broadcastOn([Du()],{}),n().each((e=>e.getSystem().broadcastOn([Du()],{})))},a=e.inline?[]:[Jl.config({channels:{[eA()]:{onReceive:sA}}})];return[zh.config({}),QD.config({contextual:{lazyContext:t=>{const o=Wt(t.element),n=e.inline?e.getContentAreaContainer():e.getContainer();return D.from(n).map((n=>{const r=Xo(Ie.fromDom(n));return zS(e,t.element).fold((()=>{const e=r.height-o,n=r.y+(rA(t,"top")?0:o);return qo(r.x,n,r.width,e)}),(e=>{const t=Yo(r,HS(e));return qo(t.x,t.y,t.width,t.height-o)}))}))},onShow:()=>{r((e=>aA(e,!0)))},onShown:e=>{r((e=>ri(e,[tA.transitionClass,tA.fadeInClass]))),o.get().each((t=>{((e,t)=>{const o=Ze(t);oc(o).filter((e=>!Ye(t,e))).filter((t=>Ye(t,Ie.fromDom(o.dom.body))||Je(e,t))).each((()=>Ql(t)))})(e.element,t),o.clear()}))},onHide:e=>{((e,t)=>nc(e).orThunk((()=>t().toOptional().bind((e=>nc(e.element))))))(e.element,n).fold(o.clear,o.set),r((e=>aA(e,!1)))},onHidden:()=>{r((e=>ri(e,[tA.transitionClass])))},...tA},lazyViewport:t=>zS(e,t.element).fold((()=>{const o=Jo(),n=pb(e),r=o.y+(rA(t,"top")?n:0),s=o.height-(rA(t,"bottom")?n:0);return{bounds:qo(o.x,r,o.width,s),optScrollEnv:D.none()}}),(e=>({bounds:HS(e),optScrollEnv:D.some({currentScrollTop:e.element.dom.scrollTop,scrollElmTop:qt(e.element).top})}))),modes:[t.header.getDockingMode()],onDocked:s,onUndocked:s}),...a]};var cA=Object.freeze({__proto__:null,setup:(e,t,o)=>{e.inline||(t.header.isPositionedAtTop()||e.on("ResizeEditor",(()=>{o().each(QD.reset)})),e.on("ResizeWindow ResizeEditor",(()=>{o().each(sA)})),e.on("SkinLoaded",(()=>{o().each((e=>{QD.isDocked(e)?QD.reset(e):QD.refresh(e)}))})),e.on("FullscreenStateChanged",(()=>{o().each(QD.reset)}))),e.on("AfterScrollIntoView",(e=>{o().each((t=>{QD.refresh(t);const o=t.element;fp(o)&&((e,t)=>{const o=Ze(t),n=tt(t).dom.innerHeight,r=Ho(o),s=Ie.fromDom(e.elm),a=Ko(s),i=Ut(s),l=a.y,c=l+i,d=qt(t),u=Ut(t),m=d.top,g=m+u,p=Math.abs(m-r.top)<2,h=Math.abs(g-(r.top+n))<2;if(p&&l<g)Lo(r.left,l-u,o);else if(h&&c>m){const e=l-n+i+u;Lo(r.left,e,o)}})(e,o)}))})),e.on("PostRender",(()=>{iA(e,!1)}))},isDocked:e=>e().map(QD.isDocked).getOr(!1),getBehaviours:lA});const dA=Vn([Hv,dr("items",Hn([Pn([Lv,br("items",Gn)]),Gn]))].concat(hy)),uA=[wr("text"),wr("tooltip"),wr("icon"),Tr("search",!1,Hn([$n,Vn([wr("placeholder")])],(e=>d(e)?e?D.some({placeholder:D.none()}):D.none():D.some(e)))),pr("fetch"),Br("onSetup",(()=>b))],mA=Vn([Hv,...uA]),gA=e=>er("menubutton",mA,e),pA=Vn([Hv,ey,Qv,Zv,ny,$v,Yv,Ar("presets","normal",["normal","color","listpreview"]),ly(1),Xv,Kv]);var hA=Jm({factory:(e,t)=>{const o={focus:kh.focusIn,setMenus:(e,o)=>{const n=H(o,(e=>{const o={type:"menubutton",text:e.text,fetch:t=>{t(e.getItems())}},n=gA(o).mapError((e=>nr(e))).getOrDie();return Z_(n,"tox-mbtn",t.backstage,D.some("menuitem"))}));Bh.set(e,n)}};return{uid:e.uid,dom:e.dom,components:[],behaviours:Gl([Bh.config({}),Fh("menubar-events",[aa((t=>{e.onSetup(t)})),Zs(ns(),((e,t)=>{Bi(e.element,".tox-mbtn--active").each((o=>{Fi(t.event.target,".tox-mbtn").each((t=>{Ye(o,t)||e.getSystem().getByDom(o).each((o=>{e.getSystem().getByDom(t).each((e=>{OS.expand(e),OS.close(o),zh.focus(e)}))}))}))}))})),Zs(Ns(),((e,t)=>{t.event.prevFocus.bind((t=>e.getSystem().getByDom(t).toOptional())).each((o=>{t.event.newFocus.bind((t=>e.getSystem().getByDom(t).toOptional())).each((e=>{OS.isOpen(o)&&(OS.expand(e),OS.close(o))}))}))}))]),kh.config({mode:"flow",selector:".tox-mbtn",onEscape:t=>(e.onEscape(t),D.some(!0))}),ak.config({})]),apis:o,domModification:{attributes:{role:"menubar"}}}},name:"silver.Menubar",configFields:[cr("dom"),cr("uid"),cr("onEscape"),cr("backstage"),_r("onSetup",b)],apis:{focus:(e,t)=>{e.focus(t)},setMenus:(e,t,o)=>{e.setMenus(t,o)}}});const fA="container",bA=[Xu("slotBehaviours",[])],vA=e=>"<alloy.field."+e+">",yA=(e,t)=>{const o=t=>Pm(e),n=(t,o)=>(n,r)=>Vm(n,e,r).map((e=>t(e,r))).getOr(o),r=(e,t)=>"true"!==Ot(e.element,"aria-hidden"),s=n(r,!1),a=n(((e,t)=>{if(r(e)){const o=e.element;At(o,"display","none"),St(o,"aria-hidden","true"),js(e,Vs(),{name:t,visible:!1})}})),i=(e=>(t,o)=>{L(o,(o=>e(t,o)))})(a),l=n(((e,t)=>{if(!r(e)){const o=e.element;zt(o,"display"),Tt(o,"aria-hidden"),js(e,Vs(),{name:t,visible:!0})}})),c={getSlotNames:o,getSlot:(t,o)=>Vm(t,e,o),isShowing:s,hideSlot:a,hideAllSlots:e=>i(e,o()),showSlot:l};return{uid:e.uid,dom:e.dom,components:t,behaviours:Ku(e.slotBehaviours),apis:c}},xA=ce({getSlotNames:(e,t)=>e.getSlotNames(t),getSlot:(e,t,o)=>e.getSlot(t,o),isShowing:(e,t,o)=>e.isShowing(t,o),hideSlot:(e,t,o)=>e.hideSlot(t,o),hideAllSlots:(e,t)=>e.hideAllSlots(t),showSlot:(e,t,o)=>e.showSlot(t,o)},(e=>Ia(e))),wA={...xA,sketch:e=>{const t=(()=>{const e=[];return{slot:(t,o)=>(e.push(t),Bm(fA,vA(t),o)),record:x(e)}})(),o=e(t),n=t.record(),r=H(n,(e=>km({name:e,pname:vA(e)})));return qm(fA,bA,r,yA,o)}},SA=Vn([Qv,ey,Br("onShow",b),Br("onHide",b),Yv]),kA=e=>({element:()=>e.element.dom}),OA=(e,t)=>{const o=H(ae(t),(e=>{const o=t[e],n=tr((e=>er("sidebar",SA,e))(o));return{name:e,getApi:kA,onSetup:n.onSetup,onShow:n.onShow,onHide:n.onHide}}));return H(o,(t=>{const n=Rr(b);return e.slot(t.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:Xy([hx(t,n),fx(t,n),Zs(Vs(),((e,t)=>{const n=t.event,r=G(o,(e=>e.name===n.name));r.each((t=>{(n.visible?t.onShow:t.onHide)(t.getApi(e))}))}))])})}))},CA=e=>wA.sketch((t=>({dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:OA(t,e),slotBehaviours:Xy([aa((e=>wA.hideAllSlots(e)))])}))),_A=(e,t)=>{St(e,"role",t)},TA=e=>og.getCurrent(e).bind((e=>{if(Y_.isGrowing(e)||Y_.hasGrown(e)){return og.getCurrent(e).bind((e=>G(wA.getSlotNames(e),(t=>wA.isShowing(e,t)))))}return D.none()})),EA=va("FixSizeEvent"),DA=va("AutoSizeEvent");var AA=Object.freeze({__proto__:null,block:(e,t,o,n)=>{St(e.element,"aria-busy",!0);const r=t.getRoot(e).getOr(e),s=Gl([kh.config({mode:"special",onTab:()=>D.some(!0),onShiftTab:()=>D.some(!0)}),zh.config({})]),a=n(r,s),i=r.getSystem().build(a);Bh.append(r,Ci(i)),i.hasConfigured(kh)&&t.focus&&kh.focusIn(i),o.isBlocked()||t.onBlock(e),o.blockWith((()=>Bh.remove(r,i)))},unblock:(e,t,o)=>{Tt(e.element,"aria-busy"),o.isBlocked()&&t.onUnblock(e),o.clear()}}),MA=[Br("getRoot",D.none),Mr("focus",!0),Zi("onBlock"),Zi("onUnblock")];const BA=ql({fields:MA,name:"blocking",apis:AA,state:Object.freeze({__proto__:null,init:()=>{const e=xc((e=>e.destroy()));return Na({readState:e.isSet,blockWith:t=>{e.set({destroy:t})},clear:e.clear,isBlocked:e.isSet})}})}),FA=e=>{const t=Ie.fromHtml(e),o=st(t),n=(e=>{const t=void 0!==e.dom.attributes?e.dom.attributes:[];return j(t,((e,t)=>"class"===t.name?e:{...e,[t.name]:t.value}),{})})(t),r=(e=>Array.prototype.slice.call(e.dom.classList,0))(t),s=0===o.length?{}:{innerHtml:da(t)};return{tag:Le(t),classes:r,attributes:n,...s}},IA=e=>og.getCurrent(e).each((e=>Ql(e.element))),RA=(e,t,o,n)=>{const r=t.element;if(((e,t)=>{const o="tabindex",n="data-mce-tabindex";D.from(e.iframeElement).map(Ie.fromDom).each((e=>{t?(Ct(e,o).each((t=>St(e,n,t))),St(e,o,-1)):(Tt(e,o),Ct(e,n).each((t=>{St(e,o,t),Tt(e,n)})))}))})(e,o),o)BA.block(t,(e=>(t,o)=>({dom:{tag:"div",attributes:{"aria-label":e.translate("Loading..."),tabindex:"0"},classes:["tox-throbber__busy-spinner"]},components:[{dom:FA('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}))(n)),zt(r,"display"),Tt(r,"aria-hidden"),e.hasFocus()&&IA(t);else{const o=og.getCurrent(t).exists((e=>tc(e.element)));BA.unblock(t),At(r,"display","none"),St(r,"aria-hidden","true"),o&&e.focus()}},NA=(e,t,o)=>{const n=Rr(!1),r=Sc(),s=o=>{n.get()&&!(e=>{if((e=>"focusin"===e.type)(e))return(e.composed?oe(e.composedPath()):D.from(e.target)).map(Ie.fromDom).filter(We).exists((e=>oi(e,"mce-pastebin")));return!1})(o)&&(o.preventDefault(),IA(t()),e.editorManager.setActive(e))};e.inline||e.on("PreInit",(()=>{e.dom.bind(e.getWin(),"focusin",s),e.on("BeforeExecCommand",(e=>{"mcefocus"===e.command.toLowerCase()&&!0!==e.value&&s(e)}))}));const a=r=>{r!==n.get()&&(n.set(r),RA(e,t(),r,o.providers),((e,t)=>{e.dispatch("AfterProgressState",{state:t})})(e,r))};e.on("ProgressState",(t=>{if(r.on(clearTimeout),h(t.time)){const o=Tf.setEditorTimeout(e,(()=>a(t.state)),t.time);r.set(o)}else a(t.state),r.clear()}))},VA=(e,t,o)=>({within:e,extra:t,withinWidth:o}),zA=(e,t,o)=>{const n=((e,t)=>{const o=j(e,((e,o)=>t(o,e.len).fold(x(e),(t=>({len:t.finish,list:e.list.concat([t])})))),{len:0,list:[]});return o.list})(e,((e,t)=>{const n=o(e);return D.some({element:e,start:t,finish:t+n,width:n})})),r=U(n,(e=>e.finish<=t)),s=W(r,((e,t)=>e+t.width),0);return{within:r,extra:n.slice(r.length),withinWidth:s}},HA=e=>H(e,(e=>e.element)),LA=(e,t,o,n)=>{const r=((e,t,o)=>{const n=zA(t,e,o);return 0===n.extra.length?D.some(n):D.none()})(e,t,o).getOrThunk((()=>zA(t,e-o(n),o))),s=r.within,a=r.extra,i=r.withinWidth;return 1===a.length&&a[0].width<=o(n)?((e,t,o)=>{const n=HA(e.concat(t));return VA(n,[],o)})(s,a,i):a.length>=1?((e,t,o,n)=>{const r=HA(e).concat([o]);return VA(r,HA(t),n)})(s,a,n,i):((e,t,o)=>VA(HA(e),[],o))(s,0,i)},PA=(e,t)=>{const o=H(t,(e=>Ci(e)));bD.setGroups(e,o)},UA=(e,t,o)=>{const n=t.builtGroups.get();if(0===n.length)return;const r=zm(e,t,"primary"),s=nS.getCoupled(e,"overflowGroup");At(r.element,"visibility","hidden");const a=n.concat([s]),i=se(a,(e=>nc(e.element).bind((t=>e.getSystem().getByDom(t).toOptional()))));o([]),PA(r,a);const l=Yt(r.element),c=LA(l,t.builtGroups.get(),(e=>Yt(e.element)),s);0===c.extra.length?(Bh.remove(r,s),o([])):(PA(r,c.within),o(c.extra)),zt(r.element,"visibility"),Ht(r.element),i.each(zh.focus)},WA=x([Xu("splitToolbarBehaviours",[nS]),ir("builtGroups",(()=>Rr([])))]),jA=x([Yi(["overflowToggledClass"]),kr("getOverflowBounds"),cr("lazySink"),ir("overflowGroups",(()=>Rr([]))),Zi("onOpened"),Zi("onClosed")].concat(WA())),GA=x([km({factory:bD,schema:hD(),name:"primary"}),Om({schema:hD(),name:"overflow"}),Om({name:"overflow-button"}),Om({name:"overflow-group"})]),$A=x(((e,t)=>{((e,t)=>{const o=Kt.max(e,t,["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"]);At(e,"max-width",o+"px")})(e,Math.floor(t))})),qA=x([Yi(["toggledClass"]),cr("lazySink"),pr("fetch"),kr("getBounds"),Cr("fireDismissalEventInstead",[_r("event",Is())]),Xc(),Zi("onToggled")]),XA=x([Om({name:"button",overrides:e=>({dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:Gl([$h.config({toggleClass:e.markers.toggledClass,aria:{mode:"expanded"},toggleOnExecute:!1,onToggled:e.onToggled})])})}),Om({factory:bD,schema:hD(),name:"toolbar",overrides:e=>({toolbarBehaviours:Gl([kh.config({mode:"cyclic",onEscape:t=>(Vm(t,e,"button").each(zh.focus),D.none())})])})})]),KA=Sc(),YA=(e,t)=>{const o=nS.getCoupled(e,"toolbarSandbox");Tu.isOpen(o)?Tu.close(o):Tu.open(o,t.toolbar())},JA=(e,t,o,n)=>{const r=o.getBounds.map((e=>e())),s=o.lazySink(e).getOrDie();eu.positionWithinBounds(s,t,{anchor:{type:"hotspot",hotspot:e,layouts:n,overrides:{maxWidthFunction:$A()}}},r)},ZA=(e,t,o,n,r)=>{bD.setGroups(t,r),JA(e,t,o,n),$h.on(e)},QA=Zm({name:"FloatingToolbarButton",factory:(e,t,o,n)=>({...Ef.sketch({...n.button(),action:e=>{YA(e,n)},buttonBehaviours:Zu({dump:n.button().buttonBehaviours},[nS.config({others:{toolbarSandbox:t=>((e,t,o)=>{const n=Ri();return{dom:{tag:"div",attributes:{id:n.id}},behaviours:Gl([kh.config({mode:"special",onEscape:e=>(Tu.close(e),D.some(!0))}),Tu.config({onOpen:(r,s)=>{const a=KA.get().getOr(!1);o.fetch().get((r=>{ZA(e,s,o,t.layouts,r),n.link(e.element),a||kh.focusIn(s)}))},onClose:()=>{$h.off(e),KA.get().getOr(!1)||zh.focus(e),n.unlink(e.element)},isPartOf:(t,o,n)=>Vi(o,n)||Vi(e,n),getAttachPoint:()=>o.lazySink(e).getOrDie()}),Jl.config({channels:{...Bu({isExtraPart:T,...o.fireDismissalEventInstead.map((e=>({fireEventInstead:{event:e.event}}))).getOr({})}),...Iu({doReposition:()=>{Tu.getState(nS.getCoupled(e,"toolbarSandbox")).each((n=>{JA(e,n,o,t.layouts)}))}})}})])}})(t,o,e)}})])}),apis:{setGroups:(t,n)=>{Tu.getState(nS.getCoupled(t,"toolbarSandbox")).each((r=>{ZA(t,r,e,o.layouts,n)}))},reposition:t=>{Tu.getState(nS.getCoupled(t,"toolbarSandbox")).each((n=>{JA(t,n,e,o.layouts)}))},toggle:e=>{YA(e,n)},toggleWithoutFocusing:e=>{((e,t)=>{KA.set(!0),YA(e,t),KA.clear()})(e,n)},getToolbar:e=>Tu.getState(nS.getCoupled(e,"toolbarSandbox")),isOpen:e=>Tu.isOpen(nS.getCoupled(e,"toolbarSandbox"))}}),configFields:qA(),partFields:XA(),apis:{setGroups:(e,t,o)=>{e.setGroups(t,o)},reposition:(e,t)=>{e.reposition(t)},toggle:(e,t)=>{e.toggle(t)},toggleWithoutFocusing:(e,t)=>{e.toggleWithoutFocusing(t)},getToolbar:(e,t)=>e.getToolbar(t),isOpen:(e,t)=>e.isOpen(t)}}),eM=x([cr("items"),Yi(["itemSelector"]),Xu("tgroupBehaviours",[kh])]),tM=x([_m({name:"items",unit:"item"})]),oM=Zm({name:"ToolbarGroup",configFields:eM(),partFields:tM(),factory:(e,t,o,n)=>({uid:e.uid,dom:e.dom,components:t,behaviours:Yu(e.tgroupBehaviours,[kh.config({mode:"flow",selector:e.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}})}),nM=e=>H(e,(e=>Ci(e))),rM=(e,t,o)=>{UA(e,o,(n=>{o.overflowGroups.set(n),t.getOpt(e).each((e=>{QA.setGroups(e,nM(n))}))}))},sM=Zm({name:"SplitFloatingToolbar",configFields:jA(),partFields:GA(),factory:(e,t,o,n)=>{const r=Df(QA.sketch({fetch:()=>lS((t=>{t(nM(e.overflowGroups.get()))})),layouts:{onLtr:()=>[_l,Cl],onRtl:()=>[Cl,_l],onBottomLtr:()=>[El,Tl],onBottomRtl:()=>[Tl,El]},getBounds:o.getOverflowBounds,lazySink:e.lazySink,fireDismissalEventInstead:{},markers:{toggledClass:e.markers.overflowToggledClass},parts:{button:n["overflow-button"](),toolbar:n.overflow()},onToggled:(t,o)=>e[o?"onOpened":"onClosed"](t)}));return{uid:e.uid,dom:e.dom,components:t,behaviours:Yu(e.splitToolbarBehaviours,[nS.config({others:{overflowGroup:()=>oM.sketch({...n["overflow-group"](),items:[r.asSpec()]})}})]),apis:{setGroups:(t,o)=>{e.builtGroups.set(H(o,t.getSystem().build)),rM(t,r,e)},refresh:t=>rM(t,r,e),toggle:e=>{r.getOpt(e).each((e=>{QA.toggle(e)}))},toggleWithoutFocusing:e=>{r.getOpt(e).each(QA.toggleWithoutFocusing)},isOpen:e=>r.getOpt(e).map(QA.isOpen).getOr(!1),reposition:e=>{r.getOpt(e).each((e=>{QA.reposition(e)}))},getOverflow:e=>r.getOpt(e).bind(QA.getToolbar)},domModification:{attributes:{role:"group"}}}},apis:{setGroups:(e,t,o)=>{e.setGroups(t,o)},refresh:(e,t)=>{e.refresh(t)},reposition:(e,t)=>{e.reposition(t)},toggle:(e,t)=>{e.toggle(t)},toggleWithoutFocusing:(e,t)=>{e.toggle(t)},isOpen:(e,t)=>e.isOpen(t),getOverflow:(e,t)=>e.getOverflow(t)}}),aM=x([Yi(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),Zi("onOpened"),Zi("onClosed")].concat(WA())),iM=x([km({factory:bD,schema:hD(),name:"primary"}),km({factory:bD,schema:hD(),name:"overflow",overrides:e=>({toolbarBehaviours:Gl([Y_.config({dimension:{property:"height"},closedClass:e.markers.closedClass,openClass:e.markers.openClass,shrinkingClass:e.markers.shrinkingClass,growingClass:e.markers.growingClass,onShrunk:t=>{Vm(t,e,"overflow-button").each((e=>{$h.off(e),zh.focus(e)})),e.onClosed(t)},onGrown:t=>{kh.focusIn(t),e.onOpened(t)},onStartGrow:t=>{Vm(t,e,"overflow-button").each($h.on)}}),kh.config({mode:"acyclic",onEscape:t=>(Vm(t,e,"overflow-button").each(zh.focus),D.some(!0))})])})}),Om({name:"overflow-button",overrides:e=>({buttonBehaviours:Gl([$h.config({toggleClass:e.markers.overflowToggledClass,aria:{mode:"pressed"},toggleOnExecute:!1})])})}),Om({name:"overflow-group"})]),lM=(e,t)=>{Vm(e,t,"overflow-button").bind((()=>Vm(e,t,"overflow"))).each((o=>{cM(e,t),Y_.toggleGrow(o)}))},cM=(e,t)=>{Vm(e,t,"overflow").each((o=>{UA(e,t,(e=>{const t=H(e,(e=>Ci(e)));bD.setGroups(o,t)})),Vm(e,t,"overflow-button").each((e=>{Y_.hasGrown(o)&&$h.on(e)})),Y_.refresh(o)}))},dM=Zm({name:"SplitSlidingToolbar",configFields:aM(),partFields:iM(),factory:(e,t,o,n)=>{const r="alloy.toolbar.toggle";return{uid:e.uid,dom:e.dom,components:t,behaviours:Yu(e.splitToolbarBehaviours,[nS.config({others:{overflowGroup:e=>oM.sketch({...n["overflow-group"](),items:[Ef.sketch({...n["overflow-button"](),action:t=>{Ws(e,r)}})]})}}),Fh("toolbar-toggle-events",[Zs(r,(t=>{lM(t,e)}))])]),apis:{setGroups:(t,o)=>{((t,o)=>{const n=H(o,t.getSystem().build);e.builtGroups.set(n)})(t,o),cM(t,e)},refresh:t=>cM(t,e),toggle:t=>lM(t,e),isOpen:t=>((e,t)=>Vm(e,t,"overflow").map(Y_.hasGrown).getOr(!1))(t,e)},domModification:{attributes:{role:"group"}}}},apis:{setGroups:(e,t,o)=>{e.setGroups(t,o)},refresh:(e,t)=>{e.refresh(t)},toggle:(e,t)=>{e.toggle(t)},isOpen:(e,t)=>e.isOpen(t)}}),uM=e=>{const t=e.title.fold((()=>({})),(e=>({attributes:{title:e}})));return{dom:{tag:"div",classes:["tox-toolbar__group"],...t},components:[oM.parts.items({})],items:e.items,markers:{itemSelector:"*:not(.tox-split-button) > .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-js:not([disabled]), .tox-number-input:not([disabled])"},tgroupBehaviours:Gl([ak.config({}),zh.config({})])}},mM=e=>oM.sketch(uM(e)),gM=(e,t)=>{const o=aa((t=>{const o=H(e.initGroups,mM);bD.setGroups(t,o)}));return Gl([gx(e.providers.isDisabled),cx(),kh.config({mode:t,onEscape:e.onEscape,selector:".tox-toolbar__group"}),Fh("toolbar-events",[o])])},pM=e=>{const t=e.cyclicKeying?"cyclic":"acyclic";return{uid:e.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":uM({title:D.none(),items:[]}),"overflow-button":_T({name:"more",icon:D.some("more-drawer"),enabled:!0,tooltip:D.some("More..."),primary:!1,buttonType:D.none(),borderless:!1},D.none(),e.providers)},splitToolbarBehaviours:gM(e,t)}},hM=e=>{const t=pM(e),o=sM.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return sM.sketch({...t,lazySink:e.getSink,getOverflowBounds:()=>{const t=e.moreDrawerData.lazyHeader().element,o=Ko(t),n=et(t),r=Ko(n),s=Math.max(n.dom.scrollHeight,r.height);return qo(o.x+4,r.y,o.width-8,s)},parts:{...t.parts,overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:e.attributes}}},components:[o],markers:{overflowToggledClass:"tox-tbtn--enabled"},onOpened:t=>e.onToggled(t,!0),onClosed:t=>e.onToggled(t,!1)})},fM=e=>{const t=dM.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),o=dM.parts.overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),n=pM(e);return dM.sketch({...n,components:[t,o],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:t=>{t.getSystem().broadcastOn([eA()],{type:"opened"}),e.onToggled(t,!0)},onClosed:t=>{t.getSystem().broadcastOn([eA()],{type:"closed"}),e.onToggled(t,!1)}})},bM=e=>{const t=e.cyclicKeying?"cyclic":"acyclic";return bD.sketch({uid:e.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(e.type===Uf.scrolling?["tox-toolbar--scrolling"]:[])},components:[bD.parts.groups({})],toolbarBehaviours:gM(e,t)})},vM=[Zv,Qv,wr("tooltip"),Ar("buttonType","secondary",["primary","secondary"]),Mr("borderless",!1),pr("onAction")],yM={button:[...vM,Uv,gr("type",["button"])],togglebutton:[...vM,Mr("active",!1),gr("type",["togglebutton"])]},xM=[gr("type",["group"]),Fr("buttons",[],rr("type",yM))],wM=rr("type",{...yM,group:xM}),SM=Vn([Fr("buttons",[],wM),pr("onShow"),pr("onHide")]),kM=(e,t)=>((e,t)=>{var o,n;const r="togglebutton"===e.type,s=e.icon.map((e=>u_(e,t.icons))).map(Df),a=o=>{const n=e=>{s.map((n=>n.getOpt(o).each((o=>{Bh.set(o,[u_(e,t.icons)])}))))},a=e=>{const t=o.element;e?(ei(t,"tox-button--enabled"),St(t,"aria-pressed",!0)):(ti(t,"tox-button--enabled"),Tt(t,"aria-pressed"))},i=()=>oi(o.element,"tox-button--enabled");return r?e.onAction({setIcon:n,setActive:a,isActive:i}):"button"===e.type?e.onAction({setIcon:n}):void 0},i={...e,name:r?e.text.getOr(e.icon.getOr("")):null!==(o=e.text)&&void 0!==o?o:e.icon.getOr(""),primary:"primary"===e.buttonType,buttonType:D.from(e.buttonType),tooltip:e.tooltip,icon:e.icon,enabled:!0,borderless:e.borderless},l=TT(null!==(n=e.buttonType)&&void 0!==n?n:"secondary"),c=r?e.text.map(t.translate):D.some(t.translate(e.text)),d=c.map(xi),u=i.tooltip.or(c).map((e=>({"aria-label":t.translate(e),title:t.translate(e)}))).getOr({}),m=s.map((e=>e.asSpec())),g=yx([m,d]),p=e.icon.isSome()&&d.isSome(),h={tag:"button",classes:l.concat(...e.icon.isSome()&&!p?["tox-button--icon"]:[]).concat(...p?["tox-button--icon-and-text"]:[]).concat(...e.borderless?["tox-button--naked"]:[]).concat(..."togglebutton"===e.type&&e.active?["tox-button--enabled"]:[]),attributes:u},f=CT(i,D.some(a),[],h,g,t);return Ef.sketch(f)})(e,t),OM=Eo().deviceType,CM=OM.isPhone(),_M=OM.isTablet();var TM=Zm({name:"silver.View",configFields:[cr("viewConfig")],partFields:[Cm({factory:{sketch:e=>{let t=!1;const o=H(e.buttons,(o=>"group"===o.type?(t=!0,((e,t)=>({dom:{tag:"div",classes:["tox-view__toolbar__group"]},components:H(e.buttons,(e=>kM(e,t)))}))(o,e.providers)):kM(o,e.providers)));return{uid:e.uid,dom:{tag:"div",classes:[t?"tox-view__toolbar":"tox-view__header",...CM||_M?["tox-view--mobile","tox-view--scrolling"]:[]]},behaviours:Gl([zh.config({}),kh.config({mode:"flow",selector:"button, .tox-button",focusInside:Yg.OnEnterOrSpaceMode})]),components:t?o:[QS.sketch({dom:{tag:"div",classes:["tox-view__header-start"]},components:[]}),QS.sketch({dom:{tag:"div",classes:["tox-view__header-end"]},components:o})]}}},schema:[cr("buttons"),cr("providers")],name:"header"}),Cm({factory:{sketch:e=>({uid:e.uid,dom:{tag:"div",classes:["tox-view__pane"]}})},schema:[],name:"pane"})],factory:(e,t,o,n)=>{const r={getPane:t=>cD.getPart(t,e,"pane"),getOnShow:t=>e.viewConfig.onShow,getOnHide:t=>e.viewConfig.onHide};return{uid:e.uid,dom:e.dom,components:t,apis:r}},apis:{getPane:(e,t)=>e.getPane(t),getOnShow:(e,t)=>e.getOnShow(t),getOnHide:(e,t)=>e.getOnHide(t)}});const EM=(e,t,o)=>pe(t,((t,n)=>{const r=tr(er("view",SM,t));return e.slot(n,TM.sketch({dom:{tag:"div",classes:["tox-view"]},viewConfig:r,components:[...r.buttons.length>0?[TM.parts.header({buttons:r.buttons,providers:o})]:[],TM.parts.pane({})]}))})),DM=(e,t)=>wA.sketch((o=>({dom:{tag:"div",classes:["tox-view-wrap__slot-container"]},components:EM(o,e,t),slotBehaviours:Xy([aa((e=>wA.hideAllSlots(e)))])}))),AM=e=>G(wA.getSlotNames(e),(t=>wA.isShowing(e,t))),MM=(e,t,o)=>{wA.getSlot(e,t).each((e=>{TM.getPane(e).each((t=>{var n;o(e)((n=t.element.dom,{getContainer:x(n)}))}))}))};var BM=Jm({factory:(e,t)=>{const o={setViews:(e,o)=>{Bh.set(e,[DM(o,t.backstage.shared.providers)])},whichView:e=>og.getCurrent(e).bind(AM),toggleView:(e,t,o,n)=>og.getCurrent(e).exists((r=>{const s=AM(r),a=s.exists((e=>n===e)),i=wA.getSlot(r,n).isSome();return i&&(wA.hideAllSlots(r),a?((e=>{const t=e.element;At(t,"display","none"),St(t,"aria-hidden","true")})(e),t()):(o(),(e=>{const t=e.element;zt(t,"display"),Tt(t,"aria-hidden")})(e),wA.showSlot(r,n),((e,t)=>{MM(e,t,TM.getOnShow)})(r,n)),s.each((e=>((e,t)=>MM(e,t,TM.getOnHide))(r,e)))),i}))};return{uid:e.uid,dom:{tag:"div",classes:["tox-view-wrap"],attributes:{"aria-hidden":"true"},styles:{display:"none"}},components:[],behaviours:Gl([Bh.config({}),og.config({find:e=>{const t=Bh.contents(e);return oe(t)}})]),apis:o}},name:"silver.ViewWrapper",configFields:[cr("backstage")],apis:{setViews:(e,t,o)=>e.setViews(t,o),toggleView:(e,t,o,n,r)=>e.toggleView(t,o,n,r),whichView:(e,t)=>e.whichView(t)}});const FM=dD.optional({factory:hA,name:"menubar",schema:[cr("backstage")]}),IM=dD.optional({factory:{sketch:e=>pD.sketch({uid:e.uid,dom:e.dom,listBehaviours:Gl([kh.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:()=>bM({type:e.type,uid:va("multiple-toolbar-item"),cyclicKeying:!1,initGroups:[],providers:e.providers,onEscape:()=>(e.onEscape(),D.some(!0))}),setupItem:(e,t,o,n)=>{bD.setGroups(t,o)},shell:!0})},name:"multiple-toolbar",schema:[cr("dom"),cr("onEscape")]}),RM=dD.optional({factory:{sketch:e=>{const t=(e=>e.type===Uf.sliding?fM:e.type===Uf.floating?hM:bM)(e);return t({type:e.type,uid:e.uid,onEscape:()=>(e.onEscape(),D.some(!0)),onToggled:(t,o)=>e.onToolbarToggled(o),cyclicKeying:!1,initGroups:[],getSink:e.getSink,providers:e.providers,moreDrawerData:{lazyToolbar:e.lazyToolbar,lazyMoreButton:e.lazyMoreButton,lazyHeader:e.lazyHeader},attributes:e.attributes})}},name:"toolbar",schema:[cr("dom"),cr("onEscape"),cr("getSink")]}),NM=dD.optional({factory:{sketch:e=>{const t=e.editor,o=e.sticky?lA:xD;return{uid:e.uid,dom:e.dom,components:e.components,behaviours:Gl(o(t,e.sharedBackstage))}}},name:"header",schema:[cr("dom")]}),VM=dD.optional({factory:{sketch:e=>({uid:e.uid,dom:e.dom,components:[{dom:{tag:"a",attributes:{href:"https://www.tiny.cloud/tinymce-self-hosted-premium-features/?utm_source=TinyMCE&utm_medium=SPAP&utm_campaign=SPAP&utm_id=editorreferral",rel:"noopener",target:"_blank","aria-hidden":"true"},classes:["tox-promotion-link"],innerHtml:"⚡️Upgrade"}}]})},name:"promotion",schema:[cr("dom")]}),zM=dD.optional({name:"socket",schema:[cr("dom")]}),HM=dD.optional({factory:{sketch:e=>({uid:e.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"presentation"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:Gl([ak.config({}),zh.config({}),Y_.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:e=>{og.getCurrent(e).each(wA.hideAllSlots),Ws(e,DA)},onGrown:e=>{Ws(e,DA)},onStartGrow:e=>{js(e,EA,{width:Rt(e.element,"width").getOr("")})},onStartShrink:e=>{js(e,EA,{width:Yt(e.element)+"px"})}}),Bh.config({}),og.config({find:e=>{const t=Bh.contents(e);return oe(t)}})])}],behaviours:Gl([NC(0),Fh("sidebar-sliding-events",[Zs(EA,((e,t)=>{At(e.element,"width",t.event.width)})),Zs(DA,((e,t)=>{zt(e.element,"width")}))])])})},name:"sidebar",schema:[cr("dom")]}),LM=dD.optional({factory:{sketch:e=>({uid:e.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:Gl([Bh.config({}),BA.config({focus:!1}),og.config({find:e=>oe(e.components())})]),components:[]})},name:"throbber",schema:[cr("dom")]}),PM=dD.optional({factory:BM,name:"viewWrapper",schema:[cr("backstage")]}),UM=dD.optional({factory:{sketch:e=>({uid:e.uid,dom:{tag:"div",classes:["tox-editor-container"]},components:e.components})},name:"editorContainer",schema:[]});var WM=Zm({name:"OuterContainer",factory:(e,t,o)=>{let n=!1;const r={getSocket:t=>cD.getPart(t,e,"socket"),setSidebar:(t,o,n)=>{cD.getPart(t,e,"sidebar").each((e=>((e,t,o)=>{og.getCurrent(e).each((n=>{Bh.set(n,[CA(t)]);const r=null==o?void 0:o.toLowerCase();s(r)&&ve(t,r)&&og.getCurrent(n).each((t=>{wA.showSlot(t,r),Y_.immediateGrow(n),zt(n.element,"width"),_A(e.element,"region")}))}))})(e,o,n)))},toggleSidebar:(t,o)=>{cD.getPart(t,e,"sidebar").each((e=>((e,t)=>{og.getCurrent(e).each((o=>{og.getCurrent(o).each((n=>{Y_.hasGrown(o)?wA.isShowing(n,t)?(Y_.shrink(o),_A(e.element,"presentation")):(wA.hideAllSlots(n),wA.showSlot(n,t),_A(e.element,"region")):(wA.hideAllSlots(n),wA.showSlot(n,t),Y_.grow(o),_A(e.element,"region"))}))}))})(e,o)))},whichSidebar:t=>cD.getPart(t,e,"sidebar").bind(TA).getOrNull(),getHeader:t=>cD.getPart(t,e,"header"),getToolbar:t=>cD.getPart(t,e,"toolbar"),setToolbar:(t,o)=>{cD.getPart(t,e,"toolbar").each((e=>{const t=H(o,mM);e.getApis().setGroups(e,t)}))},setToolbars:(t,o)=>{cD.getPart(t,e,"multiple-toolbar").each((e=>{const t=H(o,(e=>H(e,mM)));pD.setItems(e,t)}))},refreshToolbar:t=>{cD.getPart(t,e,"toolbar").each((e=>e.getApis().refresh(e)))},toggleToolbarDrawer:t=>{cD.getPart(t,e,"toolbar").each((e=>{ke(e.getApis().toggle,(t=>t(e)))}))},toggleToolbarDrawerWithoutFocusing:t=>{cD.getPart(t,e,"toolbar").each((e=>{ke(e.getApis().toggleWithoutFocusing,(t=>t(e)))}))},isToolbarDrawerToggled:t=>cD.getPart(t,e,"toolbar").bind((e=>D.from(e.getApis().isOpen).map((t=>t(e))))).getOr(!1),getThrobber:t=>cD.getPart(t,e,"throbber"),focusToolbar:t=>{cD.getPart(t,e,"toolbar").orThunk((()=>cD.getPart(t,e,"multiple-toolbar"))).each((e=>{kh.focusIn(e)}))},setMenubar:(t,o)=>{cD.getPart(t,e,"menubar").each((e=>{hA.setMenus(e,o)}))},focusMenubar:t=>{cD.getPart(t,e,"menubar").each((e=>{hA.focus(e)}))},setViews:(t,o)=>{cD.getPart(t,e,"viewWrapper").each((e=>{BM.setViews(e,o)}))},toggleView:(t,o)=>cD.getPart(t,e,"viewWrapper").exists((e=>BM.toggleView(e,(()=>r.showMainView(t)),(()=>r.hideMainView(t)),o))),whichView:t=>cD.getPart(t,e,"viewWrapper").bind(BM.whichView).getOrNull(),hideMainView:t=>{n=r.isToolbarDrawerToggled(t),n&&r.toggleToolbarDrawer(t),cD.getPart(t,e,"editorContainer").each((e=>{const t=e.element;At(t,"display","none"),St(t,"aria-hidden","true")}))},showMainView:t=>{n&&r.toggleToolbarDrawer(t),cD.getPart(t,e,"editorContainer").each((e=>{const t=e.element;zt(t,"display"),Tt(t,"aria-hidden")})),r.refreshToolbar(t)}};return{uid:e.uid,dom:e.dom,components:t,apis:r,behaviours:e.behaviours}},configFields:[cr("dom"),cr("behaviours")],partFields:[NM,FM,RM,IM,zM,HM,VM,LM,PM,UM],apis:{getSocket:(e,t)=>e.getSocket(t),setSidebar:(e,t,o,n)=>{e.setSidebar(t,o,n)},toggleSidebar:(e,t,o)=>{e.toggleSidebar(t,o)},whichSidebar:(e,t)=>e.whichSidebar(t),getHeader:(e,t)=>e.getHeader(t),getToolbar:(e,t)=>e.getToolbar(t),setToolbar:(e,t,o)=>{e.setToolbar(t,o)},setToolbars:(e,t,o)=>{e.setToolbars(t,o)},refreshToolbar:(e,t)=>e.refreshToolbar(t),toggleToolbarDrawer:(e,t)=>{e.toggleToolbarDrawer(t)},toggleToolbarDrawerWithoutFocusing:(e,t)=>{e.toggleToolbarDrawerWithoutFocusing(t)},isToolbarDrawerToggled:(e,t)=>e.isToolbarDrawerToggled(t),getThrobber:(e,t)=>e.getThrobber(t),setMenubar:(e,t,o)=>{e.setMenubar(t,o)},focusMenubar:(e,t)=>{e.focusMenubar(t)},focusToolbar:(e,t)=>{e.focusToolbar(t)},setViews:(e,t,o)=>{e.setViews(t,o)},toggleView:(e,t,o)=>e.toggleView(t,o),whichView:(e,t)=>e.whichView(t)}});const jM={file:{title:"File",items:"newdocument restoredraft | preview | export 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 inserttemplate codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor tableofcontents footnotes | mergetags | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | styles blocks fontfamily fontsize align lineheight | forecolor backcolor | language | removeformat"},tools:{title:"Tools",items:"spellchecker spellcheckerlanguage | autocorrect capitalization | a11ycheck code typography wordcount addtemplate"},table:{title:"Table",items:"inserttable | cell row column | advtablesort | tableprops deletetable"},help:{title:"Help",items:"help"}},GM=e=>e.split(" "),$M=(e,t)=>{const o={...jM,...t.menus},n=ae(t.menus).length>0,r=void 0===t.menubar||!0===t.menubar?GM("file edit view insert format tools table help"):GM(!1===t.menubar?"":t.menubar),a=U(r,(e=>{const o=ve(jM,e);return n?o||be(t.menus,e).exists((e=>ve(e,"items"))):o})),i=H(a,(n=>{const r=o[n];return((e,t,o)=>{const n=ib(o).split(/[ ,]/);return{text:e.title,getItems:()=>X(e.items,(e=>{const o=e.toLowerCase();return 0===o.trim().length||N(n,(e=>e===o))?[]:"separator"===o||"|"===o?[{type:"separator"}]:t.menuItems[o]?[t.menuItems[o]]:[]}))}})({title:r.title,items:GM(r.items)},t,e)}));return U(i,(e=>e.getItems().length>0&&N(e.getItems(),(e=>s(e)||"separator"!==e.type))))},qM=e=>{const t=()=>{e._skinLoaded=!0,(e=>{e.dispatch("SkinLoaded")})(e)};return()=>{e.initialized?t():e.on("init",t)}},XM=(e,t,o)=>(e.on("remove",(()=>o.unload(t))),o.load(t)),KM=(e,t)=>XM(e,t+"/skin.min.css",e.ui.styleSheetLoader),YM=(e,t)=>{var o;if(o=Ie.fromDom(e.getElement()),ht(o).isSome()){return XM(e,t+"/skin.shadowdom.min.css",jf.DOM.styleSheetLoader)}return Promise.resolve()},JM=(e,t)=>{const o=Ib(t);return o&&t.contentCSS.push(o+(e?"/content.inline":"/content")+".min.css"),!Bb(t)&&s(o)?Promise.all([KM(t,o),YM(t,o)]).then(qM(t),((e,t)=>()=>((e,t)=>{e.dispatch("SkinLoadError",t)})(e,{message:t}))(t,"Skin could not be loaded")):Promise.resolve(qM(t)())},ZM=k(JM,!1),QM=k(JM,!0),eB=(e,t)=>o=>{const n=wc(),r=()=>{o.setActive(e.formatter.match(t));const r=e.formatter.formatChanged(t,o.setActive);n.set(r)};return e.initialized?r():e.once("init",r),()=>{e.off("init",r),n.clear()}},tB=(e,t,o)=>n=>{const r=()=>o(n),s=()=>{o(n),e.on(t,r)};return e.initialized?s():e.once("init",s),()=>{e.off("init",s),e.off(t,r)}},oB=e=>t=>()=>{e.undoManager.transact((()=>{e.focus(),e.execCommand("mceToggleFormat",!1,t.format)}))},nB=(e,t)=>()=>e.execCommand(t),rB=(e,t,o)=>{const n=(e,n,s,a)=>{const i=t.shared.providers.translate(e.title);if("separator"===e.type)return D.some({type:"separator",text:i});if("submenu"===e.type){const t=X(e.getStyleItems(),(e=>r(e,n,a)));return 0===n&&t.length<=0?D.none():D.some({type:"nestedmenuitem",text:i,enabled:t.length>0,getSubmenuItems:()=>X(e.getStyleItems(),(e=>r(e,n,a)))})}return D.some({type:"togglemenuitem",text:i,icon:e.icon,active:e.isSelected(a),enabled:!s,onAction:o.onAction(e),...e.getStylePreview().fold((()=>({})),(e=>({meta:{style:e}})))})},r=(e,t,r)=>{const s="formatter"===e.type&&o.isInvalid(e);return 0===t?s?[]:n(e,t,!1,r).toArray():n(e,t,s,r).toArray()},s=e=>{const t=o.getCurrentValue(),n=o.shouldHide?0:1;return X(e,(e=>r(e,n,t)))};return{validateItems:s,getFetch:(e,t)=>(o,n)=>{const r=t(),a=s(r);n(x_(a,Zb.CLOSE_ON_EXECUTE,e,{isHorizontalMenu:!1,search:D.none()}))}}},sB=(e,t,o)=>{const n=o.dataset,r="basic"===n.type?()=>H(n.data,(e=>FE(e,o.isSelectedFor,o.getPreviewFor))):n.getData;return{items:rB(0,t,o),getStyleItems:r}},aB=(e,t,o)=>{const{items:n,getStyleItems:r}=sB(0,t,o),s=tB(e,"NodeChange",(e=>{const t=e.getComponent();o.updateText(t)}));return h_({text:o.icon.isSome()?D.none():o.text,icon:o.icon,tooltip:D.from(o.tooltip),role:D.none(),fetch:n.getFetch(t,r),onSetup:s,getApi:e=>({getComponent:x(e)}),columns:1,presets:"normal",classes:o.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[]},"tox-tbtn",t.shared)};var iB;!function(e){e[e.SemiColon=0]="SemiColon",e[e.Space=1]="Space"}(iB||(iB={}));const lB=(e,t,o)=>{const n=(e=>H(e,(e=>{let t=e,o=e;const n=e.split("=");return n.length>1&&(t=n[0],o=n[1]),{title:t,format:o}})))(((e,t)=>t===iB.SemiColon?e.replace(/;$/,"").split(";"):e.split(" "))(e.options.get(t),o));return{type:"basic",data:n}},cB=[{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"}],dB=e=>{const t={type:"basic",data:cB};return{tooltip:"Align",text:D.none(),icon:D.some("align-left"),isSelectedFor:t=>()=>e.formatter.match(t),getCurrentValue:D.none,getPreviewFor:e=>D.none,onAction:t=>()=>G(cB,(e=>e.format===t.format)).each((t=>e.execCommand(t.command))),updateText:t=>{const o=G(cB,(t=>e.formatter.match(t.format))),n=o.fold(x("left"),(e=>e.title.toLowerCase()));js(t,p_,{icon:`align-${n}`})},dataset:t,shouldHide:!1,isInvalid:t=>!e.formatter.canApply(t.format)}},uB=(e,t)=>{const o=t(),n=H(o,(e=>e.format));return D.from(e.formatter.closest(n)).bind((e=>G(o,(t=>t.format===e)))).orThunk((()=>Oe(e.formatter.match("p"),{title:"Paragraph",format:"p"})))},mB=e=>{const t="Paragraph",o=lB(e,"block_formats",iB.SemiColon);return{tooltip:"Blocks",text:D.some(t),icon:D.none(),isSelectedFor:t=>()=>e.formatter.match(t),getCurrentValue:D.none,getPreviewFor:t=>()=>{const o=e.formatter.get(t);return o?D.some({tag:o.length>0&&(o[0].inline||o[0].block)||"div",styles:e.dom.parseStyle(e.formatter.getCssText(t))}):D.none()},onAction:oB(e),updateText:n=>{const r=uB(e,(()=>o.data)).fold(x(t),(e=>e.title));js(n,g_,{text:r})},dataset:o,shouldHide:!1,isInvalid:t=>!e.formatter.canApply(t.format)}},gB=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],pB=e=>{const t=e.split(/\s*,\s*/);return H(t,(e=>e.replace(/^['"]+|['"]+$/g,"")))},hB=e=>{const t="System Font",o=()=>{const o=e=>e?pB(e)[0]:"",r=e.queryCommandValue("FontName"),s=n.data,a=r?r.toLowerCase():"",i=G(s,(e=>{const t=e.format;return t.toLowerCase()===a||o(t).toLowerCase()===o(a).toLowerCase()})).orThunk((()=>Oe((e=>0===e.indexOf("-apple-system")&&(()=>{const t=pB(e.toLowerCase());return K(gB,(e=>t.indexOf(e.toLowerCase())>-1))})())(a),{title:t,format:a})));return{matchOpt:i,font:r}},n=lB(e,"font_family_formats",iB.SemiColon);return{tooltip:"Fonts",text:D.some(t),icon:D.none(),isSelectedFor:e=>t=>t.exists((t=>t.format===e)),getCurrentValue:()=>{const{matchOpt:e}=o();return e},getPreviewFor:e=>()=>D.some({tag:"div",styles:-1===e.indexOf("dings")?{"font-family":e}:{}}),onAction:t=>()=>{e.undoManager.transact((()=>{e.focus(),e.execCommand("FontName",!1,t.format)}))},updateText:e=>{const{matchOpt:t,font:n}=o(),r=t.fold(x(n),(e=>e.title));js(e,g_,{text:r})},dataset:n,shouldHide:!1,isInvalid:T}},fB={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},bB=(()=>{const e="[0-9]+",t="[eE][+-]?[0-9]+",o=e=>`(?:${e})?`,n=["Infinity","[0-9]+\\."+o(e)+o(t),"\\.[0-9]+"+o(t),e+o(t)].join("|");return new RegExp(`^(${`[+-]?(?:${n})`})(.*)$`)})(),vB=(e,t)=>D.from(bB.exec(e)).bind((e=>{const o=Number(e[1]),n=e[2];return((e,t)=>N(t,(t=>N(fB[t],(t=>e===t)))))(n,t)?D.some({value:o,unit:n}):D.none()})),yB={tab:x(9),escape:x(27),enter:x(13),backspace:x(8),delete:x(46),left:x(37),up:x(38),right:x(39),down:x(40),space:x(32),home:x(36),end:x(35),pageUp:x(33),pageDown:x(34)},xB=(e,t,o)=>{let n=D.none();const r=tB(e,"NodeChange",(e=>{const t=e.getComponent();n=D.some(t),o.updateInputValue(t)})),s=e=>({getComponent:x(e)}),a=Rr(b),i=va("custom-number-input-events"),l=(e,t,r)=>{const s=n.map((e=>qu.getValue(e))).getOr("");const a=o.getNewValue(s,e),i=s.length-`${a}`.length,l=n.map((e=>e.element.dom.selectionStart-i)),c=n.map((e=>e.element.dom.selectionEnd-i));o.onAction(a,r),n.each((e=>{qu.setValue(e,a),t&&(l.each((t=>e.element.dom.selectionStart=t)),c.each((t=>e.element.dom.selectionEnd=t)))}))},c=(e,t)=>l(((e,t)=>e-t),e,t),d=(e,t)=>l(((e,t)=>e+t),e,t),u=e=>nt(e.element).fold(D.none,(e=>(Ql(e),D.some(!0)))),m=e=>tc(e.element)?(it(e.element).each((e=>Ql(e))),D.some(!0)):D.none(),g=(e,o,n,r)=>{const s=t.shared.providers.translate(n),a=va("altExecuting"),i=()=>e(!0);return Ef.sketch({dom:{tag:"button",attributes:{title:s,"aria-label":s},classes:r.concat(o)},components:[d_(o,t.shared.providers.icons)],buttonBehaviours:Gl([Fh(a,[Zs(as(),((t,o)=>{o.event.raw.keyCode!==yB.space()&&o.event.raw.keyCode!==yB.enter()||e(!1)})),Zs(ds(),i),Zs(Jr(),i)])]),eventOrder:{[as()]:[a,"keying"],[ds()]:[a,"alloy.base.behaviour"],[Jr()]:[a,"alloy.base.behaviour"]}})},p=Df(g((e=>c(!1,e)),"minus","Decrease font size",["highlight-on-focus"])),h=Df(g((e=>d(!1,e)),"plus","Increase font size",["highlight-on-focus"])),f=Df({dom:{tag:"div",classes:["tox-input-wrapper","highlight-on-focus"]},components:[wv.sketch({inputBehaviours:Gl([Fh(i,[hx({onSetup:r,getApi:s},a),fx({getApi:s},a)]),Fh("input-update-display-text",[Zs(g_,((e,t)=>{qu.setValue(e,t.event.text)})),Zs(ss(),(e=>{o.onAction(qu.getValue(e))})),Zs(cs(),(e=>{o.onAction(qu.getValue(e))}))]),kh.config({mode:"special",onEnter:e=>(l(w,!0,!0),D.some(!0)),onEscape:u,onUp:e=>(d(!0,!1),D.some(!0)),onDown:e=>(c(!0,!1),D.some(!0)),onLeft:(e,t)=>(t.cut(),D.none()),onRight:(e,t)=>(t.cut(),D.none())})])})],behaviours:Gl([zh.config({}),kh.config({mode:"special",onEnter:m,onSpace:m,onEscape:u}),Fh("input-wrapper-events",[Zs(ns(),(e=>{L([p,h],(t=>{const o=Ie.fromDom(t.get(e).element.dom);tc(o)&&ec(o)}))}))])])});return{dom:{tag:"div",classes:["tox-number-input"]},components:[p.asSpec(),f.asSpec(),h.asSpec()],behaviours:Gl([zh.config({}),kh.config({mode:"flow",focusInside:Yg.OnEnterOrSpaceMode,cycles:!1,selector:"button, .tox-input-wrapper",onEscape:e=>tc(e.element)?D.none():(Ql(e.element),D.some(!0))})])}},wB={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},SB={"xx-small":"7pt","x-small":"8pt",small:"10pt",medium:"12pt",large:"14pt","x-large":"18pt","xx-large":"24pt"},kB=(e,t)=>/[0-9.]+px$/.test(e)?((e,t)=>{const o=Math.pow(10,t);return Math.round(e*o)/o})(72*parseInt(e,10)/96,t||0)+"pt":be(SB,e).getOr(e),OB=e=>be(wB,e).getOr(""),CB=e=>{const t=()=>{let t=D.none();const o=n.data,r=e.queryCommandValue("FontSize");if(r)for(let e=3;t.isNone()&&e>=0;e--){const n=kB(r,e),s=OB(n);t=G(o,(e=>e.format===r||e.format===n||e.format===s))}return{matchOpt:t,size:r}},o=x(D.none),n=lB(e,"font_size_formats",iB.Space);return{tooltip:"Font sizes",text:D.some("12pt"),icon:D.none(),isSelectedFor:e=>t=>t.exists((t=>t.format===e)),getPreviewFor:o,getCurrentValue:()=>{const{matchOpt:e}=t();return e},onAction:t=>()=>{e.undoManager.transact((()=>{e.focus(),e.execCommand("FontSize",!1,t.format)}))},updateText:e=>{const{matchOpt:o,size:n}=t(),r=o.fold(x(n),(e=>e.title));js(e,g_,{text:r})},dataset:n,shouldHide:!1,isInvalid:T}},_B=(e,t)=>{const o="Paragraph";return{tooltip:"Formats",text:D.some(o),icon:D.none(),isSelectedFor:t=>()=>e.formatter.match(t),getCurrentValue:D.none,getPreviewFor:t=>()=>{const o=e.formatter.get(t);return void 0!==o?D.some({tag:o.length>0&&(o[0].inline||o[0].block)||"div",styles:e.dom.parseStyle(e.formatter.getCssText(t))}):D.none()},onAction:oB(e),updateText:t=>{const n=e=>EE(e)?X(e.items,n):DE(e)?[{title:e.title,format:e.format}]:[],r=X(BE(e),n),s=uB(e,x(r)).fold(x(o),(e=>e.title));js(t,g_,{text:s})},shouldHide:sb(e),isInvalid:t=>!e.formatter.canApply(t.format),dataset:t}},TB=x([cr("toggleClass"),cr("fetch"),el("onExecute"),_r("getHotspot",D.some),_r("getAnchorOverrides",x({})),Xc(),el("onItemExecute"),vr("lazySink"),cr("dom"),Zi("onOpen"),Xu("splitDropdownBehaviours",[nS,kh,zh]),_r("matchWidth",!1),_r("useMinWidth",!1),_r("eventOrder",{}),vr("role")].concat(wS())),EB=km({factory:Ef,schema:[cr("dom")],name:"arrow",defaults:()=>({buttonBehaviours:Gl([zh.revoke()])}),overrides:e=>({dom:{tag:"span",attributes:{role:"presentation"}},action:t=>{t.getSystem().getByUid(e.uid).each(Gs)},buttonBehaviours:Gl([$h.config({toggleOnExecute:!1,toggleClass:e.toggleClass})])})}),DB=km({factory:Ef,schema:[cr("dom")],name:"button",defaults:()=>({buttonBehaviours:Gl([zh.revoke()])}),overrides:e=>({dom:{tag:"span",attributes:{role:"presentation"}},action:t=>{t.getSystem().getByUid(e.uid).each((o=>{e.onExecute(o,t)}))}})}),AB=x([EB,DB,Cm({factory:{sketch:e=>({uid:e.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:e.text}})},schema:[cr("text")],name:"aria-descriptor"}),Om({schema:[Ki()],name:"menu",defaults:e=>({onExecute:(t,o)=>{t.getSystem().getByUid(e.uid).each((n=>{e.onItemExecute(n,t,o)}))}})}),uS()]),MB=Zm({name:"SplitDropdown",configFields:TB(),partFields:AB(),factory:(e,t,o,n)=>{const r=e=>{og.getCurrent(e).each((e=>{Tg.highlightFirst(e),kh.focusIn(e)}))},s=t=>{hS(e,w,t,n,r,kf.HighlightMenuAndItem).get(b)},a=t=>{const o=zm(t,e,"button");return Gs(o),D.some(!0)},i={...Ks([aa(((t,o)=>{Vm(t,e,"aria-descriptor").each((e=>{const o=va("aria");St(e.element,"id",o),St(t.element,"aria-describedby",o)}))}))]),...Kh(D.some(s))},l={repositionMenus:e=>{$h.isOn(e)&&xS(e)}};return{uid:e.uid,dom:e.dom,components:t,apis:l,eventOrder:{...e.eventOrder,[ws()]:["disabling","toggling","alloy.base.behaviour"]},events:i,behaviours:Yu(e.splitDropdownBehaviours,[nS.config({others:{sandbox:t=>{const o=zm(t,e,"arrow");return yS(e,t,{onOpen:()=>{$h.on(o),$h.on(t)},onClose:()=>{$h.off(o),$h.off(t)}})}}}),kh.config({mode:"special",onSpace:a,onEnter:a,onDown:e=>(s(e),D.some(!0))}),zh.config({}),$h.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:e.role.getOr("button"),"aria-haspopup":!0}}}},apis:{repositionMenus:(e,t)=>e.repositionMenus(t)}}),BB=e=>({isEnabled:()=>!fg.isDisabled(e),setEnabled:t=>fg.set(e,!t),setText:t=>js(e,g_,{text:t}),setIcon:t=>js(e,p_,{icon:t})}),FB=e=>({setActive:t=>{$h.set(e,t)},isActive:()=>$h.isOn(e),isEnabled:()=>!fg.isDisabled(e),setEnabled:t=>fg.set(e,!t),setText:t=>js(e,g_,{text:t}),setIcon:t=>js(e,p_,{icon:t})}),IB=(e,t)=>e.map((e=>({"aria-label":t.translate(e),title:t.translate(e)}))).getOr({}),RB=va("focus-button"),NB=(e,t,o,n,r)=>{const s=t.map((e=>Df(m_(e,"tox-tbtn",r)))),a=e.map((e=>Df(u_(e,r.icons))));return{dom:{tag:"button",classes:["tox-tbtn"].concat(t.isSome()?["tox-tbtn--select"]:[]),attributes:IB(o,r)},components:yx([a.map((e=>e.asSpec())),s.map((e=>e.asSpec()))]),eventOrder:{[Qr()]:["focusing","alloy.base.behaviour",a_],[Bs()]:[a_,"toolbar-group-button-events"]},buttonBehaviours:Gl([gx(r.isDisabled),cx(),Fh(a_,[aa(((e,t)=>l_(e))),Zs(g_,((e,t)=>{s.bind((t=>t.getOpt(e))).each((e=>{Bh.set(e,[xi(r.translate(t.event.text))])}))})),Zs(p_,((e,t)=>{a.bind((t=>t.getOpt(e))).each((e=>{Bh.set(e,[u_(t.event.icon,r.icons)])}))})),Zs(Qr(),((e,t)=>{t.event.prevent(),Ws(e,RB)}))])].concat(n.getOr([])))}},VB=(e,t,o)=>{var n;const r=Rr(b),s=NB(e.icon,e.text,e.tooltip,D.none(),o);return Ef.sketch({dom:s.dom,components:s.components,eventOrder:i_,buttonBehaviours:{...Gl([Fh("toolbar-button-events",[(a={onAction:e.onAction,getApi:t.getApi},ca(((e,t)=>{px(a,e)((t=>{js(e,s_,{buttonApi:t}),a.onAction(t)}))}))),hx(t,r),fx(t,r)]),gx((()=>!e.enabled||o.isDisabled())),cx()].concat(t.toolbarButtonBehaviours)),[a_]:null===(n=s.buttonBehaviours)||void 0===n?void 0:n[a_]}});var a},zB=(e,t,o)=>VB(e,{toolbarButtonBehaviours:o.length>0?[Fh("toolbarButtonWith",o)]:[],getApi:BB,onSetup:e.onSetup},t),HB=(e,t,o)=>VB(e,{toolbarButtonBehaviours:[Bh.config({}),$h.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(o.length>0?[Fh("toolbarToggleButtonWith",o)]:[]),getApi:FB,onSetup:e.onSetup},t),LB=(e,t,o)=>n=>lS((e=>t.fetch(e))).map((r=>D.from(IS(xn(Vw(va("menu-value"),r,(o=>{t.onItemAction(e(n),o)}),t.columns,t.presets,Zb.CLOSE_ON_EXECUTE,t.select.getOr(T),o),{movement:Hw(t.columns,t.presets),menuBehaviours:Xy("auto"!==t.columns?[]:[aa(((e,o)=>{$y(e,4,dv(t.presets)).each((({numRows:t,numColumns:o})=>{kh.setGridSize(e,t,o)}))}))])}))))),PB=[{name:"history",items:["undo","redo"]},{name:"styles",items:["styles"]},{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"]}],UB=(e,t)=>(o,n,r)=>{const s=e(o).mapError((e=>nr(e))).getOrDie();return t(s,n,r)},WB={button:UB(by,((e,t)=>{return o=e,n=t.shared.providers,zB(o,n,[]);var o,n})),togglebutton:UB(xy,((e,t)=>{return o=e,n=t.shared.providers,HB(o,n,[]);var o,n})),menubutton:UB(gA,((e,t)=>Z_(e,"tox-tbtn",t,D.none(),!1))),splitbutton:UB((e=>er("SplitButton",pA,e)),((e,t)=>((e,t)=>{const o=e=>({isEnabled:()=>!fg.isDisabled(e),setEnabled:t=>fg.set(e,!t),setIconFill:(t,o)=>{Bi(e.element,`svg path[id="${t}"], rect[id="${t}"]`).each((e=>{St(e,"fill",o)}))},setActive:t=>{St(e.element,"aria-pressed",t),Bi(e.element,"span").each((o=>{e.getSystem().getByDom(o).each((e=>$h.set(e,t)))}))},isActive:()=>Bi(e.element,"span").exists((t=>e.getSystem().getByDom(t).exists($h.isOn))),setText:t=>Bi(e.element,"span").each((o=>e.getSystem().getByDom(o).each((e=>js(e,g_,{text:t}))))),setIcon:t=>Bi(e.element,"span").each((o=>e.getSystem().getByDom(o).each((e=>js(e,p_,{icon:t})))))}),n=Rr(b),r={getApi:o,onSetup:e.onSetup};return MB.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:{"aria-pressed":!1,...IB(e.tooltip,t.providers)}},onExecute:t=>{const n=o(t);n.isEnabled()&&e.onAction(n)},onItemExecute:(e,t,o)=>{},splitDropdownBehaviours:Gl([mx(t.providers.isDisabled),cx(),Fh("split-dropdown-events",[aa(((e,t)=>l_(e))),Zs(RB,zh.focus),hx(r,n),fx(r,n)]),Bk.config({})]),eventOrder:{[Bs()]:["alloy.base.behaviour","split-dropdown-events"]},toggleClass:"tox-tbtn--enabled",lazySink:t.getSink,fetch:LB(o,e,t.providers),parts:{menu:fv(0,e.columns,e.presets)},components:[MB.parts.button(NB(e.icon,e.text,D.none(),D.some([$h.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:!1})]),t.providers)),MB.parts.arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:Nf("chevron-down",t.providers.icons)},buttonBehaviours:Gl([mx(t.providers.isDisabled),cx(),Vf()])}),MB.parts["aria-descriptor"]({text:t.providers.translate("To open the popup, press Shift+Enter")})]})})(e,t.shared))),grouptoolbarbutton:UB((e=>er("GroupToolbarButton",dA,e)),((e,t,o)=>{const n=o.ui.registry.getAll().buttons,r=e=>qB(o,{buttons:n,toolbar:e,allowToolbarGroups:!1},t,D.none()),s={[$c]:t.shared.header.isPositionedAtTop()?Gc.TopToBottom:Gc.BottomToTop};if(lb(o)===Uf.floating)return((e,t,o,n)=>{const r=t.shared,s=Rr(b),a={toolbarButtonBehaviours:[],getApi:BB,onSetup:e.onSetup},i=[Fh("toolbar-group-button-events",[hx(a,s),fx(a,s)])];return QA.sketch({lazySink:r.getSink,fetch:()=>lS((t=>{t(H(o(e.items),mM))})),markers:{toggledClass:"tox-tbtn--enabled"},parts:{button:NB(e.icon,e.text,e.tooltip,D.some(i),r.providers),toolbar:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:n}}}})})(e,t,r,s);throw new Error("Toolbar groups are only supported when using floating toolbar mode")}))},jB={styles:(e,t)=>{const o={type:"advanced",...t.styles};return aB(e,t,_B(e,o))},fontsize:(e,t)=>aB(e,t,CB(e)),fontsizeinput:(e,t)=>xB(e,t,(e=>{const t=()=>e.queryCommandValue("FontSize");return{updateInputValue:e=>js(e,g_,{text:t()}),onAction:(t,o)=>e.execCommand("FontSize",!1,t,{skip_focus:!o}),getNewValue:(o,n)=>{vB(o,["unsupportedLength","empty"]);const r=vB(o,["unsupportedLength","empty"]).or(vB(t(),["unsupportedLength","empty"])),s=r.map((e=>e.value)).getOr(16),a=yb(e),i=r.map((e=>e.unit)).filter((e=>""!==e)).getOr(a),l=n(s,(e=>{var t;return null!==(t={em:{step:.1},cm:{step:.1},in:{step:.1},pc:{step:.1},ch:{step:.1},rem:{step:.1}}[e])&&void 0!==t?t:{step:1}})(i).step);return`${(e=>e>=0)(l)?l:s}${i}`}}})(e)),fontfamily:(e,t)=>aB(e,t,hB(e)),blocks:(e,t)=>aB(e,t,mB(e)),align:(e,t)=>aB(e,t,dB(e))},GB=e=>{const t=e.toolbar,o=e.buttons;return!1===t?[]:void 0===t||!0===t?(e=>{const t=H(PB,(t=>{const o=U(t.items,(t=>ve(e,t)||ve(jB,t)));return{name:t.name,items:o}}));return U(t,(e=>e.items.length>0))})(o):s(t)?(e=>{const t=e.split("|");return H(t,(e=>({items:e.trim().split(" ")})))})(t):(e=>f(e,(e=>ve(e,"name")&&ve(e,"items"))))(t)?t:(console.error("Toolbar type should be string, string[], boolean or ToolbarGroup[]"),[])},$B=(e,t,o,n,r,s)=>be(t,o.toLowerCase()).orThunk((()=>s.bind((e=>se(e,(e=>be(t,e+o.toLowerCase()))))))).fold((()=>be(jB,o.toLowerCase()).map((t=>t(e,r)))),(t=>"grouptoolbarbutton"!==t.type||n?((e,t,o)=>be(WB,e.type).fold((()=>(console.error("skipping button defined by",e),D.none())),(n=>D.some(n(e,t,o)))))(t,r,e):(console.warn(`Ignoring the '${o}' toolbar button. Group toolbar buttons are only supported when using floating toolbar mode and cannot be nested.`),D.none()))),qB=(e,t,o,n)=>{const r=GB(t),s=H(r,(r=>{const s=X(r.items,(r=>0===r.trim().length?[]:$B(e,t.buttons,r,t.allowToolbarGroups,o,n).toArray()));return{title:D.from(e.translate(r.name)),items:s}}));return U(s,(e=>e.items.length>0))},XB=(e,t,o,n)=>{const r=t.mainUi.outerContainer,a=o.toolbar,i=o.buttons;if(f(a,s)){const t=a.map((t=>{const r={toolbar:t,buttons:i,allowToolbarGroups:o.allowToolbarGroups};return qB(e,r,n,D.none())}));WM.setToolbars(r,t)}else WM.setToolbar(r,qB(e,o,n,D.none()))},KB=Eo(),YB=KB.os.isiOS()&&KB.os.version.major<=12;var JB=Object.freeze({__proto__:null,render:async(e,t,o,n,r)=>{const{mainUi:s,uiMotherships:a}=t,i=Rr(0),l=s.outerContainer;await ZM(e);const d=Ie.fromDom(r.targetNode),u=pt(gt(d));pu(d,s.mothership),((e,t,o)=>{Gb(e)&&pu(o.mainUi.mothership.element,o.popupUi.mothership),gu(t,o.dialogUi.mothership)})(e,u,t),e.on("PostRender",(()=>{WM.setSidebar(l,o.sidebar,Ab(e)),XB(e,t,o,n),i.set(e.getWin().innerWidth),WM.setMenubar(l,$M(e,o)),WM.setViews(l,o.views),((e,t)=>{const{uiMotherships:o}=t,n=e.dom;let r=e.getWin();const s=e.getDoc().documentElement,a=Rr(Gt(r.innerWidth,r.innerHeight)),i=Rr(Gt(s.offsetWidth,s.offsetHeight)),l=()=>{const t=a.get();t.left===r.innerWidth&&t.top===r.innerHeight||(a.set(Gt(r.innerWidth,r.innerHeight)),nw(e))},c=()=>{const t=e.getDoc().documentElement,o=i.get();o.left===t.offsetWidth&&o.top===t.offsetHeight||(i.set(Gt(t.offsetWidth,t.offsetHeight)),nw(e))},d=t=>{((e,t)=>{e.dispatch("ScrollContent",t)})(e,t)};n.bind(r,"resize",l),n.bind(r,"scroll",d);const u=Cc(Ie.fromDom(e.getBody()),"load",c);e.on("hide",(()=>{L(o,(e=>{At(e.element,"display","none")}))})),e.on("show",(()=>{L(o,(e=>{zt(e.element,"display")}))})),e.on("NodeChange",c),e.on("remove",(()=>{u.unbind(),n.unbind(r,"resize",l),n.unbind(r,"scroll",d),r=null}))})(e,t)}));const m=WM.getSocket(l).getOrDie("Could not find expected socket element");if(YB){Mt(m.element,{overflow:"scroll","-webkit-overflow-scrolling":"touch"});const t=((e,t)=>{let o=null;return{cancel:()=>{c(o)||(clearTimeout(o),o=null)},throttle:(...n)=>{c(o)&&(o=setTimeout((()=>{o=null,e.apply(null,n)}),t))}}})((()=>{e.dispatch("ScrollContent")}),20),o=Oc(m.element,"scroll",t.throttle);e.on("remove",o.unbind)}lx(e,t),e.addCommand("ToggleSidebar",((t,o)=>{WM.toggleSidebar(l,o),e.dispatch("ToggleSidebar")})),e.addQueryValueHandler("ToggleSidebar",(()=>{var e;return null!==(e=WM.whichSidebar(l))&&void 0!==e?e:""})),e.addCommand("ToggleView",((t,o)=>{if(WM.toggleView(l,o)){const t=l.element;s.mothership.broadcastOn([Eu()],{target:t}),L(a,(e=>{e.broadcastOn([Eu()],{target:t})})),c(WM.whichView(l))&&(e.focus(),e.nodeChanged())}})),e.addQueryValueHandler("ToggleView",(()=>{var e;return null!==(e=WM.whichView(l))&&void 0!==e?e:""}));const g=lb(e);g!==Uf.sliding&&g!==Uf.floating||e.on("ResizeWindow ResizeEditor ResizeContent",(()=>{const o=e.getWin().innerWidth;o!==i.get()&&(WM.refreshToolbar(t.mainUi.outerContainer),i.set(o))}));const p={setEnabled:e=>{ix(t,!e)},isEnabled:()=>!fg.isDisabled(l)};return{iframeContainer:m.element.dom,editorContainer:l.element.dom,api:p}}});const ZB=e=>/^[0-9\.]+(|px)$/i.test(""+e)?D.some(parseInt(""+e,10)):D.none(),QB=e=>h(e)?e+"px":e,eF=(e,t,o)=>{const n=t.filter((t=>e<t)),r=o.filter((t=>e>t));return n.or(r).getOr(e)},tF=e=>{const t=(e=>{const t=Jf(e),o=eb(e),n=ob(e);return ZB(t).map((e=>eF(e,o,n)))})(e);return t.getOr(Jf(e))},oF=e=>{const t=Zf(e),o=Qf(e),n=tb(e);return ZB(t).map((e=>eF(e,o,n)))},{ToolbarLocation:nF,ToolbarMode:rF}=qb,sF=(e,t,o,n,r)=>{const{mainUi:s,uiMotherships:a}=o,i=jf.DOM,l=Pb(e),c=jb(e),d=tb(e).or(oF(e)),u=n.shared.header,m=u.isPositionedAtTop,g=lb(e),p=g===rF.sliding||g===rF.floating,h=Rr(!1),f=()=>h.get()&&!e.removed,b=e=>p?e.fold(x(0),(e=>e.components().length>1?Ut(e.components()[1].element):0)):0,v=(e,t)=>Gb(e)?SD(t):D.none(),y=()=>{L(a,(e=>{e.broadcastOn([Du()],{})}))},w=o=>{if(!f())return;l||r.on((e=>{const o=d.getOrThunk((()=>{const e=ZB(Ft(yt(),"margin-left")).getOr(0);return Yt(yt())-qt(t).left+e}));At(e.element,"max-width",o+"px")}));const n=l?D.none():(()=>{if(l)return D.none();if(qt(s.outerContainer.element).left+Jt(s.outerContainer.element)>=window.innerWidth-40||Rt(s.outerContainer.element,"width").isSome()){At(s.outerContainer.element,"position","absolute"),At(s.outerContainer.element,"left","0px"),zt(s.outerContainer.element,"width");const e=Jt(s.outerContainer.element);return D.some(e)}return D.none()})();p&&WM.refreshToolbar(s.outerContainer),l||(o=>{r.on((n=>{const r=WM.getToolbar(s.outerContainer),a=b(r),i=Xo(t),{top:l,left:c}=v(e,s.outerContainer.element).fold((()=>({top:m()?Math.max(i.y-Ut(n.element)+a,0):i.bottom,left:i.x})),(e=>{var t;const o=Xo(e),r=null!==(t=e.dom.scrollTop)&&void 0!==t?t:0,s=Ye(e,yt()),l=s?Math.max(i.y-Ut(n.element)+a,0):i.y-o.y+r-Ut(n.element)+a;return{top:m()?l:i.bottom,left:s?i.x:i.x-o.x}})),d={position:"absolute",left:Math.round(c)+"px",top:Math.round(l)+"px"},u=o.map((e=>{const t=Ho(),o=window.innerWidth-(c-t.left);return{width:Math.max(Math.min(e,o),150)+"px"}})).getOr({});Mt(s.outerContainer.element,{...d,...u})}))})(n),c&&r.on(o),y()},S=()=>!(l||!c||!f())&&r.get().exists((o=>{const n=u.getDockingMode(),a=(o=>{switch(db(e)){case nF.auto:const e=WM.getToolbar(s.outerContainer),n=b(e),r=Ut(o.element)-n,a=Xo(t);if(a.y>r)return"top";{const e=et(t),o=Math.max(e.dom.scrollHeight,Ut(e));return a.bottom<o-r||Jo().bottom<a.bottom-r?"bottom":"top"}case nF.bottom:return"bottom";case nF.top:default:return"top"}})(o);return a!==n&&(i=a,r.on((e=>{QD.setModes(e,[i]),u.setDockingMode(i);const t=m()?Gc.TopToBottom:Gc.BottomToTop;St(e.element,$c,t)})),!0);var i}));return{isVisible:f,isPositionedAtTop:m,show:()=>{h.set(!0),At(s.outerContainer.element,"display","flex"),i.addClass(e.getBody(),"mce-edit-focus"),L(a,(e=>{zt(e.element,"display")})),S(),Gb(e)?w((e=>QD.isDocked(e)?QD.reset(e):QD.refresh(e))):w(QD.refresh)},hide:()=>{h.set(!1),At(s.outerContainer.element,"display","none"),i.removeClass(e.getBody(),"mce-edit-focus"),L(a,(e=>{At(e.element,"display","none")}))},update:w,updateMode:()=>{S()&&w(QD.reset)},repositionPopups:y}},aF=(e,t)=>{const o=Xo(e);return{pos:t?o.y:o.bottom,bounds:o}};var iF=Object.freeze({__proto__:null,render:async(e,t,o,n,r)=>{const{mainUi:s}=t,a=Sc(),i=Ie.fromDom(r.targetNode),l=sF(e,i,t,n,a),c=gb(e);await QM(e);const d=()=>{if(a.isSet())return void l.show();a.set(WM.getHeader(s.outerContainer).getOrDie());const r=Ub(e);Gb(e)?(pu(i,s.mothership),pu(i,t.popupUi.mothership)):gu(r,s.mothership),gu(r,t.dialogUi.mothership),XB(e,t,o,n),WM.setMenubar(s.outerContainer,$M(e,o)),l.show(),((e,t,o,n)=>{const r=Rr(aF(t,o.isPositionedAtTop())),s=n=>{const{pos:s,bounds:a}=aF(t,o.isPositionedAtTop()),{pos:i,bounds:l}=r.get(),c=a.height!==l.height||a.width!==l.width;r.set({pos:s,bounds:a}),c&&nw(e,n),o.isVisible()&&(i!==s?o.update(QD.reset):c&&(o.updateMode(),o.repositionPopups()))};n||(e.on("activate",o.show),e.on("deactivate",o.hide)),e.on("SkinLoaded ResizeWindow",(()=>o.update(QD.reset))),e.on("NodeChange keydown",(e=>{requestAnimationFrame((()=>s(e)))}));let a=0;const i=cT((()=>o.update(QD.refresh)),33);e.on("ScrollWindow",(()=>{const e=Ho().left;e!==a&&(a=e,i.throttle()),o.updateMode()})),Gb(e)&&e.on("ElementScroll",(e=>{o.update(QD.refresh)}));const l=wc();l.set(Cc(Ie.fromDom(e.getBody()),"load",(e=>s(e.raw)))),e.on("remove",(()=>{l.clear()}))})(e,i,l,c),e.nodeChanged()};e.on("show",d),e.on("hide",l.hide),c||(e.on("focus",d),e.on("blur",l.hide)),e.on("init",(()=>{(e.hasFocus()||c)&&d()})),lx(e,t);const u={show:d,hide:l.hide,setEnabled:e=>{ix(t,!e)},isEnabled:()=>!fg.isDisabled(s.outerContainer)};return{editorContainer:s.outerContainer.element.dom,api:u}}});const lF="contexttoolbar-hide",cF=(e,t)=>Zs(s_,((o,n)=>{const r=(e=>({hide:()=>Ws(e,Cs()),getValue:()=>qu.getValue(e)}))(e.get(o));t.onAction(r,n.event.buttonApi)})),dF=(e,t,o)=>(e=>"contextformtogglebutton"===e.type)(t)?((e,t,o)=>{const{primary:n,...r}=t.original,s=tr(xy({...r,type:"togglebutton",onAction:b}));return HB(s,o,[cF(e,t)])})(e,t,o):((e,t,o)=>{const{primary:n,...r}=t.original,s=tr(by({...r,type:"button",onAction:b}));return zB(s,o,[cF(e,t)])})(e,t,o),uF=(e,t)=>{const o=e.label.fold((()=>({})),(e=>({"aria-label":e}))),n=Df(wv.sketch({inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-js"],data:e.initValue(),inputAttributes:o,selectOnFocus:!0,inputBehaviours:Gl([kh.config({mode:"special",onEnter:e=>r.findPrimary(e).map((e=>(Gs(e),!0))),onLeft:(e,t)=>(t.cut(),D.none()),onRight:(e,t)=>(t.cut(),D.none())})])})),r=((e,t,o)=>{const n=H(t,(t=>Df(dF(e,t,o))));return{asSpecs:()=>H(n,(e=>e.asSpec())),findPrimary:e=>se(t,((t,o)=>t.primary?D.from(n[o]).bind((t=>t.getOpt(e))).filter(O(fg.isDisabled)):D.none()))}})(n,e.commands,t);return[{title:D.none(),items:[n.asSpec()]},{title:D.none(),items:r.asSpecs()}]},mF=uF,gF=(e,t,o)=>t.bottom-e.y>=o&&e.bottom-t.y>=o,pF=e=>{const t=(e=>{const t=e.getBoundingClientRect();if(t.height<=0&&t.width<=0){const o=ct(Ie.fromDom(e.startContainer),e.startOffset).element;return(je(o)?ot(o):D.some(o)).filter(We).map((e=>e.dom.getBoundingClientRect())).getOr(t)}return t})(e.selection.getRng());if(e.inline){const e=Ho();return qo(e.left+t.left,e.top+t.top,t.width,t.height)}{const o=Ko(Ie.fromDom(e.getBody()));return qo(o.x+t.left,o.y+t.top,t.width,t.height)}},hF=(e,t,o,n=0)=>{const r=Uo(window),s=Xo(Ie.fromDom(e.getContentAreaContainer())),a=Fb(e)||Nb(e)||zb(e),{x:i,width:l}=((e,t,o)=>{const n=Math.max(e.x+o,t.x);return{x:n,width:Math.min(e.right-o,t.right)-n}})(s,r,n);if(e.inline&&!a)return qo(i,r.y,l,r.height);{const a=t.header.isPositionedAtTop(),{y:c,bottom:d}=((e,t,o,n,r,s)=>{const a=Ie.fromDom(e.getContainer()),i=Bi(a,".tox-editor-header").getOr(a),l=Xo(i),c=l.y>=t.bottom,d=n&&!c;if(e.inline&&d)return{y:Math.max(l.bottom+s,o.y),bottom:o.bottom};if(e.inline&&!d)return{y:o.y,bottom:Math.min(l.y-s,o.bottom)};const u="line"===r?Xo(a):t;return d?{y:Math.max(l.bottom+s,o.y),bottom:Math.min(u.bottom-s,o.bottom)}:{y:Math.max(u.y+s,o.y),bottom:Math.min(l.y-s,o.bottom)}})(e,s,r,a,o,n);return qo(i,c,l,d-c)}},fF={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"],inset:["tox-pop--inset"]},bF={maxHeightFunction:Nc(),maxWidthFunction:$A()},vF=e=>"node"===e,yF=(e,t,o,n,r)=>{const s=pF(e),a=n.lastElement().exists((e=>Ye(o,e)));if(((e,t)=>{const o=e.selection.getRng(),n=ct(Ie.fromDom(o.startContainer),o.startOffset);return o.startContainer===o.endContainer&&o.startOffset===o.endOffset-1&&Ye(n.element,t)})(e,o))return a?pE:cE;if(a)return((e,t,o)=>{const n=Rt(e,"position");At(e,"position",t);const r=o(e);return n.each((t=>At(e,"position",t))),r})(t,n.getMode(),(()=>gF(s,Xo(t),-20)&&!n.isReposition()?fE:pE));return("fixed"===n.getMode()?r.y+Ho().top:r.y)+(Ut(t)+12)<=s.y?cE:dE},xF=(e,t,o,n)=>{const r=t=>(n,r,s,a,i)=>({...yF(e,a,t,o,i)({...n,y:i.y,height:i.height},r,s,a,i),alwaysFit:!0}),s=e=>vF(n)?[r(e)]:[];return t?{onLtr:e=>[Al,Cl,_l,Tl,El,Dl].concat(s(e)),onRtl:e=>[Al,_l,Cl,El,Tl,Dl].concat(s(e))}:{onLtr:e=>[Dl,Al,Tl,Cl,El,_l].concat(s(e)),onRtl:e=>[Dl,Al,El,_l,Tl,Cl].concat(s(e))}},wF=(e,t)=>{const o=U(t,(t=>t.predicate(e.dom))),{pass:n,fail:r}=P(o,(e=>"contexttoolbar"===e.type));return{contextToolbars:n,contextForms:r}},SF=(e,t,o)=>{const n=wF(e,t);if(n.contextForms.length>0)return D.some({elem:e,toolbars:[n.contextForms[0]]});{const t=wF(e,o);if(t.contextForms.length>0)return D.some({elem:e,toolbars:[t.contextForms[0]]});if(n.contextToolbars.length>0||t.contextToolbars.length>0){const o=(e=>{if(e.length<=1)return e;{const t=t=>N(e,(e=>e.position===t)),o=t=>U(e,(e=>e.position===t)),n=t("selection"),r=t("node");if(n||r){if(r&&n){const e=o("node"),t=H(o("selection"),(e=>({...e,position:"node"})));return e.concat(t)}return o(n?"selection":"node")}return o("line")}})(n.contextToolbars.concat(t.contextToolbars));return D.some({elem:e,toolbars:o})}return D.none()}},kF=(e,t,o)=>e(t)?D.none():Ur(t,(e=>{if(We(e)){const{contextToolbars:t,contextForms:n}=wF(e,o.inNodeScope),r=n.length>0?n:(e=>{if(e.length<=1)return e;{const t=t=>G(e,(e=>e.position===t)),o=t("selection").orThunk((()=>t("node"))).orThunk((()=>t("line"))).map((e=>e.position));return o.fold((()=>[]),(t=>U(e,(e=>e.position===t))))}})(t);return r.length>0?D.some({elem:e,toolbars:r}):D.none()}return D.none()}),e),OF=(e,t)=>{const o={},n=[],r=[],s={},a={},i=(e,i)=>{const l=tr(er("ContextForm",Ty,i));o[e]=l,l.launch.map((o=>{s["form:"+e]={...i.launch,type:"contextformtogglebutton"===o.type?"togglebutton":"button",onAction:()=>{t(l)}}})),"editor"===l.scope?r.push(l):n.push(l),a[e]=l},l=(e,t)=>{var o;(o=t,er("ContextToolbar",Ey,o)).each((o=>{"editor"===t.scope?r.push(o):n.push(o),a[e]=o}))},c=ae(e);return L(c,(t=>{const o=e[t];"contextform"===o.type?i(t,o):"contexttoolbar"===o.type&&l(t,o)})),{forms:o,inNodeScope:n,inEditorScope:r,lookupTable:a,formNavigators:s}},CF=va("forward-slide"),_F=va("backward-slide"),TF=va("change-slide-event"),EF="tox-pop--resizing",DF="tox-pop--transition",AF=(e,t,o,n)=>{const r=n.backstage,s=r.shared,a=Eo().deviceType.isTouch,i=Sc(),l=Sc(),c=Sc(),d=Oi((e=>{const t=Rr([]);return _f.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:e=>{t.set([]),_f.getContent(e).each((e=>{zt(e.element,"visibility")})),ti(e.element,EF),zt(e.element,"width")},inlineBehaviours:Gl([Fh("context-toolbar-events",[sa(ms(),((e,t)=>{"width"===t.event.raw.propertyName&&(ti(e.element,EF),zt(e.element,"width"))})),Zs(TF,((e,t)=>{const o=e.element;zt(o,"width");const n=Yt(o);_f.setContent(e,t.event.contents),ei(o,EF);const r=Yt(o);At(o,"width",n+"px"),_f.getContent(e).each((e=>{t.event.focus.bind((e=>(Ql(e),nc(o)))).orThunk((()=>(kh.focusIn(e),oc(gt(o)))))})),setTimeout((()=>{At(e.element,"width",r+"px")}),0)})),Zs(CF,((e,o)=>{_f.getContent(e).each((o=>{t.set(t.get().concat([{bar:o,focus:oc(gt(e.element))}]))})),js(e,TF,{contents:o.event.forwardContents,focus:D.none()})})),Zs(_F,((e,o)=>{ne(t.get()).each((o=>{t.set(t.get().slice(0,t.get().length-1)),js(e,TF,{contents:Ci(o.bar),focus:o.focus})}))}))]),kh.config({mode:"special",onEscape:o=>ne(t.get()).fold((()=>e.onEscape()),(e=>(Ws(o,_F),D.some(!0))))})]),lazySink:()=>tn.value(e.sink)})})({sink:o,onEscape:()=>(e.focus(),D.some(!0))})),u=()=>{const t=c.get().getOr("node"),o=vF(t)?1:0;return hF(e,s,t,o)},m=()=>!(e.removed||a()&&r.isContextMenuOpen()),g=()=>{if(m()){const t=u(),o=xe(c.get(),"node")?((e,t)=>t.filter((e=>vt(e)&&Ue(e))).map(Ko).getOrThunk((()=>pF(e))))(e,i.get()):pF(e);return t.height<=0||!gF(o,t,.01)}return!0},p=()=>{i.clear(),l.clear(),c.clear(),_f.hide(d)},h=()=>{if(_f.isOpen(d)){const e=d.element;zt(e,"display"),g()?At(e,"display","none"):(l.set(0),_f.reposition(d))}},f=t=>({dom:{tag:"div",classes:["tox-pop__dialog"]},components:[t],behaviours:Gl([kh.config({mode:"acyclic"}),Fh("pop-dialog-wrap-events",[aa((t=>{e.shortcuts.add("ctrl+F9","focus statusbar",(()=>kh.focusIn(t)))})),ia((t=>{e.shortcuts.remove("ctrl+F9")}))])])}),v=Zt((()=>OF(t,(e=>{const t=y([e]);js(d,CF,{forwardContents:f(t)})})))),y=t=>{const{buttons:o}=e.ui.registry.getAll(),r={...o,...v().formNavigators},a=lb(e)===Uf.scrolling?Uf.scrolling:Uf.default,i=q(H(t,(t=>"contexttoolbar"===t.type?((t,o)=>qB(e,{buttons:t,toolbar:o.items,allowToolbarGroups:!1},n.backstage,D.some(["form:"])))(r,t):((e,t)=>mF(e,t))(t,s.providers))));return bM({type:a,uid:va("context-toolbar"),initGroups:i,onEscape:D.none,cyclicKeying:!0,providers:s.providers})},x=(t,n)=>{const r="node"===t?s.anchors.node(n):s.anchors.cursor(),c=((e,t,o,n)=>"line"===t?{bubble:Lc(12,0,fF),layouts:{onLtr:()=>[Ml],onRtl:()=>[Bl]},overrides:bF}:{bubble:Lc(0,12,fF,1/12),layouts:xF(e,o,n,t),overrides:bF})(e,t,a(),{lastElement:i.get,isReposition:()=>xe(l.get(),0),getMode:()=>eu.getMode(o)});return xn(r,c)},w=(e,t)=>{if(k.cancel(),!m())return;const n=y(e),r=e[0].position,s=x(r,t);c.set(r),l.set(1);const a=d.element;zt(a,"display"),(e=>xe(Se(e,i.get(),Ye),!0))(t)||(ti(a,DF),eu.reset(o,d)),_f.showWithinBounds(d,f(n),{anchor:s,transition:{classes:[DF],mode:"placement"}},(()=>D.some(u()))),t.fold(i.clear,i.set),g()&&At(a,"display","none")};let S=!1;const k=cT((()=>{if(e.hasFocus()&&!e.removed&&!S)if(oi(d.element,DF))k.throttle();else{((e,t)=>{const o=Ie.fromDom(t.getBody()),n=e=>Ye(e,o),r=Ie.fromDom(t.selection.getNode());return(e=>!n(e)&&!Je(o,e))(r)?D.none():SF(r,e.inNodeScope,e.inEditorScope).orThunk((()=>kF(n,r,e)))})(v(),e).fold(p,(e=>{w(e.toolbars,D.some(e.elem))}))}}),17);e.on("init",(()=>{e.on("remove",p),e.on("ScrollContent ScrollWindow ObjectResized ResizeEditor longpress",h),e.on("click keyup focus SetContent",k.throttle),e.on(lF,p),e.on("contexttoolbar-show",(t=>{const o=v();be(o.lookupTable,t.toolbarKey).each((o=>{w([o],Oe(t.target!==e,t.target)),_f.getContent(d).each(kh.focusIn)}))})),e.on("focusout",(t=>{Tf.setEditorTimeout(e,(()=>{nc(o.element).isNone()&&nc(d.element).isNone()&&p()}),0)})),e.on("SwitchMode",(()=>{e.mode.isReadOnly()&&p()})),e.on("AfterProgressState",(t=>{t.state?p():e.hasFocus()&&k.throttle()})),e.on("dragstart",(()=>{S=!0})),e.on("dragend drop",(()=>{S=!1})),e.on("NodeChange",(e=>{nc(d.element).fold(k.throttle,b)}))}))},MF=(e,t)=>{const o=()=>{const o=t.getOptions(e),n=t.getCurrent(e).map(t.hash),r=Sc();return H(o,(o=>({type:"togglemenuitem",text:t.display(o),onSetup:s=>{const a=e=>{e&&(r.on((e=>e.setActive(!1))),r.set(s)),s.setActive(e)};a(xe(n,t.hash(o)));const i=t.watcher(e,o,a);return()=>{r.clear(),i()}},onAction:()=>t.setCurrent(e,o)})))};e.ui.registry.addMenuButton(t.name,{tooltip:t.text,icon:t.icon,fetch:e=>e(o()),onSetup:t.onToolbarSetup}),e.ui.registry.addNestedMenuItem(t.name,{type:"nestedmenuitem",text:t.text,getSubmenuItems:o,onSetup:t.onMenuSetup})},BF={name:"lineheight",text:"Line height",icon:"line-height",getOptions:Rb,hash:e=>((e,t)=>vB(e,t).map((({value:e,unit:t})=>e+t)))(e,["fixed","relative","empty"]).getOr(e),display:w,watcher:(e,t,o)=>e.formatter.formatChanged("lineheight",o,!1,{value:t}).unbind,getCurrent:e=>D.from(e.queryCommandValue("LineHeight")),setCurrent:(e,t)=>e.execCommand("LineHeight",!1,t)},FF=e=>{MF(e,BF),(e=>D.from(ab(e)).map((t=>({name:"language",text:"Language",icon:"language",getOptions:x(t),hash:e=>u(e.customCode)?e.code:`${e.code}/${e.customCode}`,display:e=>e.title,watcher:(e,t,o)=>{var n;return e.formatter.formatChanged("lang",o,!1,{value:t.code,customValue:null!==(n=t.customCode)&&void 0!==n?n:null}).unbind},getCurrent:e=>{const t=Ie.fromDom(e.selection.getNode());return Wr(t,(e=>D.some(e).filter(We).bind((e=>Ct(e,"lang").map((t=>({code:t,customCode:Ct(e,"data-mce-lang").getOrUndefined(),title:""})))))))},setCurrent:(e,t)=>e.execCommand("Lang",!1,t),onToolbarSetup:t=>{const o=wc();return t.setActive(e.formatter.match("lang",{},void 0,!0)),o.set(e.formatter.formatChanged("lang",t.setActive,!0)),o.clear}}))))(e).each((t=>MF(e,t)))},IF=(e,t)=>{((e,t)=>{const o=sB(0,t,dB(e));e.ui.registry.addNestedMenuItem("align",{text:t.shared.providers.translate("Align"),getSubmenuItems:()=>o.items.validateItems(o.getStyleItems())})})(e,t),((e,t)=>{const o=sB(0,t,hB(e));e.ui.registry.addNestedMenuItem("fontfamily",{text:t.shared.providers.translate("Fonts"),getSubmenuItems:()=>o.items.validateItems(o.getStyleItems())})})(e,t),((e,t)=>{const o={type:"advanced",...t.styles},n=sB(0,t,_B(e,o));e.ui.registry.addNestedMenuItem("styles",{text:"Formats",getSubmenuItems:()=>n.items.validateItems(n.getStyleItems())})})(e,t),((e,t)=>{const o=sB(0,t,mB(e));e.ui.registry.addNestedMenuItem("blocks",{text:"Blocks",getSubmenuItems:()=>o.items.validateItems(o.getStyleItems())})})(e,t),((e,t)=>{const o=sB(0,t,CB(e));e.ui.registry.addNestedMenuItem("fontsize",{text:"Font sizes",getSubmenuItems:()=>o.items.validateItems(o.getStyleItems())})})(e,t)},RF=e=>tB(e,"NodeChange",(t=>{t.setEnabled(e.queryCommandState("outdent"))})),NF=e=>{(e=>{e.ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:RF(e),onAction:nB(e,"outdent")}),e.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onAction:nB(e,"indent")})})(e)},VF=(e,t)=>o=>{o.setActive(t.get());const n=e=>{t.set(e.state),o.setActive(e.state)};return e.on("PastePlainTextToggle",n),()=>e.off("PastePlainTextToggle",n)},zF=(e,t)=>()=>{e.execCommand("mceToggleFormat",!1,t)},HF=e=>{(e=>{XC.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"}],((t,o)=>{e.ui.registry.addToggleButton(t.name,{tooltip:t.text,icon:t.icon,onSetup:eB(e,t.name),onAction:zF(e,t.name)})}));for(let t=1;t<=6;t++){const o="h"+t;e.ui.registry.addToggleButton(o,{text:o.toUpperCase(),tooltip:"Heading "+t,onSetup:eB(e,o),onAction:zF(e,o)})}})(e),(e=>{XC.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"},{name:"print",text:"Print",action:"mcePrint",icon:"print"},{name:"hr",text:"Horizontal line",action:"InsertHorizontalRule",icon:"horizontal-rule"}],(t=>{e.ui.registry.addButton(t.name,{tooltip:t.text,icon:t.icon,onAction:nB(e,t.action)})}))})(e),(e=>{XC.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],(t=>{e.ui.registry.addToggleButton(t.name,{tooltip:t.text,icon:t.icon,onAction:nB(e,t.action),onSetup:eB(e,t.name)})}))})(e)},LF=e=>{HF(e),(e=>{XC.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"},{name:"subscript",text:"Subscript",action:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",action:"Superscript",icon:"superscript"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{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"},{name:"print",text:"Print...",action:"mcePrint",icon:"print",shortcut:"Meta+P"},{name:"hr",text:"Horizontal line",action:"InsertHorizontalRule",icon:"horizontal-rule"}],(t=>{e.ui.registry.addMenuItem(t.name,{text:t.text,icon:t.icon,shortcut:t.shortcut,onAction:nB(e,t.action)})})),e.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onAction:zF(e,"code")})})(e)},PF=(e,t)=>tB(e,"Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",(o=>{o.setEnabled(!e.mode.isReadOnly()&&e.undoManager[t]())})),UF=e=>{(e=>{e.ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:PF(e,"hasUndo"),onAction:nB(e,"undo")}),e.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:PF(e,"hasRedo"),onAction:nB(e,"redo")})})(e),(e=>{e.ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",enabled:!1,onSetup:PF(e,"hasUndo"),onAction:nB(e,"undo")}),e.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",enabled:!1,onSetup:PF(e,"hasRedo"),onAction:nB(e,"redo")})})(e)},WF=e=>tB(e,"VisualAid",(t=>{t.setActive(e.hasVisual)})),jF=e=>{(e=>{e.ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:nB(e,"mceToggleVisualAid")})})(e),(e=>{e.ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:WF(e),onAction:nB(e,"mceToggleVisualAid")})})(e)},GF=(e,t)=>{(e=>{L([{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"}],(t=>{e.ui.registry.addToggleButton(t.name,{tooltip:t.text,icon:t.icon,onAction:nB(e,t.cmd),onSetup:eB(e,t.name)})})),e.ui.registry.addButton("alignnone",{tooltip:"No alignment",icon:"align-none",onAction:nB(e,"JustifyNone")})})(e),LF(e),IF(e,t),UF(e),(e=>{(e=>{e.addCommand("mceApplyTextcolor",((t,o)=>{((e,t,o)=>{e.undoManager.transact((()=>{e.focus(),e.formatter.apply(t,{value:o}),e.nodeChanged()}))})(e,t,o)})),e.addCommand("mceRemoveTextcolor",(t=>{((e,t)=>{e.undoManager.transact((()=>{e.focus(),e.formatter.remove(t,{value:null},void 0,!0),e.nodeChanged()}))})(e,t)}))})(e);const t=Ow(e),o=Cw(e),n=Rr(t),r=Rr(o);Iw(e,"forecolor","forecolor","Text color",n),Iw(e,"backcolor","hilitecolor","Background color",r),Rw(e,"forecolor","forecolor","Text color",n),Rw(e,"backcolor","hilitecolor","Background color",r)})(e),jF(e),NF(e),FF(e),(e=>{const t=Rr(Db(e)),o=()=>e.execCommand("mceTogglePlainTextPaste");e.ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:o,onSetup:VF(e,t)}),e.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",icon:"paste-text",onAction:o,onSetup:VF(e,t)})})(e)},$F=e=>s(e)?e.split(/[ ,]/):e,qF=e=>t=>t.options.get(e),XF=qF("contextmenu_never_use_native"),KF=qF("contextmenu_avoid_overlap"),YF=e=>{const t=e.ui.registry.getAll().contextMenus,o=e.options.get("contextmenu");return e.options.isSet("contextmenu")?o:U(o,(e=>ve(t,e)))},JF=(e,t)=>({type:"makeshift",x:e,y:t}),ZF=e=>"longpress"===e.type||0===e.type.indexOf("touch"),QF=(e,t)=>{const o=jf.DOM.getPos(e);return((e,t,o)=>JF(e.x+t,e.y+o))(t,o.x,o.y)},eI=(e,t)=>"contextmenu"===t.type||"longpress"===t.type?e.inline?(e=>{if(ZF(e)){const t=e.touches[0];return JF(t.pageX,t.pageY)}return JF(e.pageX,e.pageY)})(t):QF(e.getContentAreaContainer(),(e=>{if(ZF(e)){const t=e.touches[0];return JF(t.clientX,t.clientY)}return JF(e.clientX,e.clientY)})(t)):tI(e),tI=e=>({type:"selection",root:Ie.fromDom(e.selection.getNode())}),oI=(e,t,o)=>{switch(o){case"node":return(e=>({type:"node",node:D.some(Ie.fromDom(e.selection.getNode())),root:Ie.fromDom(e.getBody())}))(e);case"point":return eI(e,t);case"selection":return tI(e)}},nI=(e,t,o,n,r,s)=>{const a=o(),i=oI(e,t,s);x_(a,Zb.CLOSE_ON_EXECUTE,n,{isHorizontalMenu:!1,search:D.none()}).map((e=>{t.preventDefault(),_f.showMenuAt(r,{anchor:i},{menu:{markers:gv("normal")},data:e})}))},rI={onLtr:()=>[Al,Cl,_l,Tl,El,Dl,cE,dE,lE,aE,iE,sE],onRtl:()=>[Al,_l,Cl,El,Tl,Dl,cE,dE,iE,sE,lE,aE]},sI={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"]},aI=(e,t,o,n,r,s,a)=>{const i=((e,t,o)=>{const n=oI(e,t,o);return{bubble:Lc(0,"point"===o?12:0,sI),layouts:rI,overrides:{maxWidthFunction:$A(),maxHeightFunction:Nc()},...n}})(e,t,s);x_(o,Zb.CLOSE_ON_EXECUTE,n,{isHorizontalMenu:!0,search:D.none()}).map((o=>{t.preventDefault();const l=a?kf.HighlightMenuAndItem:kf.HighlightNone;_f.showMenuWithinBounds(r,{anchor:i},{menu:{markers:gv("normal"),highlightOnOpen:l},data:o,type:"horizontal"},(()=>D.some(hF(e,n.shared,"node"===s?"node":"selection")))),e.dispatch(lF)}))},iI=(e,t,o,n,r,s)=>{const a=Eo(),i=a.os.isiOS(),l=a.os.isMacOS(),c=a.os.isAndroid(),d=a.deviceType.isTouch(),u=()=>{const a=o();aI(e,t,a,n,r,s,!(c||i||l&&d))};if((l||i)&&"node"!==s){const o=()=>{(e=>{const t=e.selection.getRng(),o=()=>{Tf.setEditorTimeout(e,(()=>{e.selection.setRng(t)}),10),s()};e.once("touchend",o);const n=e=>{e.preventDefault(),e.stopImmediatePropagation()};e.on("mousedown",n,!0);const r=()=>s();e.once("longpresscancel",r);const s=()=>{e.off("touchend",o),e.off("longpresscancel",r),e.off("mousedown",n)}})(e),u()};((e,t)=>{const o=e.selection;if(o.isCollapsed()||t.touches.length<1)return!1;{const n=t.touches[0],r=o.getRng();return Td(e.getWin(),gd.domRange(r)).exists((e=>e.left<=n.clientX&&e.right>=n.clientX&&e.top<=n.clientY&&e.bottom>=n.clientY))}})(e,t)?o():(e.once("selectionchange",o),e.once("touchend",(()=>e.off("selectionchange",o))))}else u()},lI=e=>s(e)?"|"===e:"separator"===e.type,cI={type:"separator"},dI=e=>{const t=e=>({text:e.text,icon:e.icon,enabled:e.enabled,shortcut:e.shortcut});if(s(e))return e;switch(e.type){case"separator":return cI;case"submenu":return{type:"nestedmenuitem",...t(e),getSubmenuItems:()=>{const t=e.getSubmenuItems();return s(t)?t:H(t,dI)}};default:const o=e;return{type:"menuitem",...t(o),onAction:v(o.onAction)}}},uI=(e,t)=>{if(0===t.length)return e;const o=ne(e).filter((e=>!lI(e))),n=o.fold((()=>[]),(e=>[cI]));return e.concat(n).concat(t).concat([cI])},mI=(e,t)=>!(e=>"longpress"===e.type||ve(e,"touches"))(t)&&(2!==t.button||t.target===e.getBody()&&""===t.pointerType),gI=(e,t)=>mI(e,t)?e.selection.getStart(!0):t.target,pI=(e,t,o)=>{const n=Eo().deviceType.isTouch,r=Oi(_f.sketch({dom:{tag:"div"},lazySink:t,onEscape:()=>e.focus(),onShow:()=>o.setContextMenuState(!0),onHide:()=>o.setContextMenuState(!1),fireDismissalEventInstead:{},inlineBehaviours:Gl([Fh("dismissContextMenu",[Zs(Is(),((t,o)=>{Tu.close(t),e.focus()}))])])})),a=()=>_f.hide(r),i=t=>{if(XF(e)&&t.preventDefault(),((e,t)=>t.ctrlKey&&!XF(e))(e,t)||(e=>0===YF(e).length)(e))return;const a=((e,t)=>{const o=KF(e),n=mI(e,t)?"selection":"point";if(Me(o)){const r=gI(e,t);return LS(Ie.fromDom(r),o)?"node":n}return n})(e,t);(n()?iI:nI)(e,t,(()=>{const o=gI(e,t),n=e.ui.registry.getAll(),r=YF(e);return((e,t,o)=>{const n=j(t,((t,n)=>be(e,n.toLowerCase()).map((e=>{const n=e.update(o);if(s(n))return uI(t,n.split(" "));if(n.length>0){const e=H(n,dI);return uI(t,e)}return t})).getOrThunk((()=>t.concat([n])))),[]);return n.length>0&&lI(n[n.length-1])&&n.pop(),n})(n.contextMenus,r,o)}),o,r,a)};e.on("init",(()=>{const t="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(n()?"":" ResizeWindow");e.on(t,a),e.on("longpress contextmenu",i)}))},hI=Nr([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),fI=e=>t=>t.translate(-e.left,-e.top),bI=e=>t=>t.translate(e.left,e.top),vI=e=>(t,o)=>j(e,((e,t)=>t(e)),Gt(t,o)),yI=(e,t,o)=>e.fold(vI([bI(o),fI(t)]),vI([fI(t)]),vI([])),xI=(e,t,o)=>e.fold(vI([bI(o)]),vI([]),vI([bI(t)])),wI=(e,t,o)=>e.fold(vI([]),vI([fI(o)]),vI([bI(t),fI(o)])),SI=(e,t,o)=>{const n=e.fold(((e,t)=>({position:D.some("absolute"),left:D.some(e+"px"),top:D.some(t+"px")})),((e,t)=>({position:D.some("absolute"),left:D.some(e-o.left+"px"),top:D.some(t-o.top+"px")})),((e,t)=>({position:D.some("fixed"),left:D.some(e+"px"),top:D.some(t+"px")})));return{right:D.none(),bottom:D.none(),...n}},kI=(e,t,o,n)=>{const r=(e,r)=>(s,a)=>{const i=e(t,o,n);return r(s.getOr(i.left),a.getOr(i.top))};return e.fold(r(wI,OI),r(xI,CI),r(yI,_I))},OI=hI.offset,CI=hI.absolute,_I=hI.fixed,TI=(e,t)=>{const o=Ot(e,t);return u(o)?NaN:parseInt(o,10)},EI=(e,t,o,n)=>((e,t)=>{const o=e.element,n=TI(o,t.leftAttr),r=TI(o,t.topAttr);return isNaN(n)||isNaN(r)?D.none():D.some(Gt(n,r))})(e,t).fold((()=>o),(e=>_I(e.left+n.left,e.top+n.top))),DI=(e,t,o,n,r,s)=>{const a=EI(e,t,o,n),i=t.mustSnap?BI(e,t,a,r,s):FI(e,t,a,r,s),l=yI(a,r,s);return((e,t,o)=>{const n=e.element;St(n,t.leftAttr,o.left+"px"),St(n,t.topAttr,o.top+"px")})(e,t,l),i.fold((()=>({coord:_I(l.left,l.top),extra:D.none()})),(e=>({coord:e.output,extra:e.extra})))},AI=(e,t)=>{((e,t)=>{const o=e.element;Tt(o,t.leftAttr),Tt(o,t.topAttr)})(e,t)},MI=(e,t,o,n)=>se(e,(e=>{const r=e.sensor,s=((e,t,o,n,r,s)=>{const a=xI(e,r,s),i=xI(t,r,s);return Math.abs(a.left-i.left)<=o&&Math.abs(a.top-i.top)<=n})(t,r,e.range.left,e.range.top,o,n);return s?D.some({output:kI(e.output,t,o,n),extra:e.extra}):D.none()})),BI=(e,t,o,n,r)=>{const s=t.getSnapPoints(e);return MI(s,o,n,r).orThunk((()=>{const e=j(s,((e,t)=>{const s=t.sensor,a=((e,t,o,n,r,s)=>{const a=xI(e,r,s),i=xI(t,r,s),l=Math.abs(a.left-i.left),c=Math.abs(a.top-i.top);return Gt(l,c)})(o,s,t.range.left,t.range.top,n,r);return e.deltas.fold((()=>({deltas:D.some(a),snap:D.some(t)})),(o=>(a.left+a.top)/2<=(o.left+o.top)/2?{deltas:D.some(a),snap:D.some(t)}:e))}),{deltas:D.none(),snap:D.none()});return e.snap.map((e=>({output:kI(e.output,o,n,r),extra:e.extra})))}))},FI=(e,t,o,n,r)=>{const s=t.getSnapPoints(e);return MI(s,o,n,r)};var II=Object.freeze({__proto__:null,snapTo:(e,t,o,n)=>{const r=t.getTarget(e.element);if(t.repositionTarget){const t=Ze(e.element),o=Ho(t),s=kD(r),a=((e,t,o)=>({coord:kI(e.output,e.output,t,o),extra:e.extra}))(n,o,s),i=SI(a.coord,0,s);Bt(r,i)}}});const RI="data-initial-z-index",NI=(e,t)=>{e.getSystem().addToGui(t),(e=>{ot(e.element).filter(We).each((t=>{Rt(t,"z-index").each((e=>{St(t,RI,e)})),At(t,"z-index",Ft(e.element,"z-index"))}))})(t)},VI=e=>{(e=>{ot(e.element).filter(We).each((e=>{Ct(e,RI).fold((()=>zt(e,"z-index")),(t=>At(e,"z-index",t))),Tt(e,RI)}))})(e),e.getSystem().removeFromGui(e)},zI=(e,t,o)=>e.getSystem().build(QS.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[t]},events:o}));var HI=Cr("snaps",[cr("getSnapPoints"),Zi("onSensor"),cr("leftAttr"),cr("topAttr"),_r("lazyViewport",Jo),_r("mustSnap",!1)]);const LI=[_r("useFixed",T),cr("blockerClass"),_r("getTarget",w),_r("onDrag",b),_r("repositionTarget",!0),_r("onDrop",b),Br("getBounds",Jo),HI],PI=e=>((e,t,o,n)=>e.isSome()&&t.isSome()&&o.isSome()?D.some(n(e.getOrDie(),t.getOrDie(),o.getOrDie())):D.none())(Rt(e,"left"),Rt(e,"top"),Rt(e,"position"),((e,t,o)=>("fixed"===o?_I:OI)(parseInt(e,10),parseInt(t,10)))).getOrThunk((()=>{const t=qt(e);return CI(t.left,t.top)})),UI=(e,t,o,n,r,s,a)=>((e,t,o,n,r)=>{const s=r.bounds,a=xI(t,o,n),i=fl(a.left,s.x,s.x+s.width-r.width),l=fl(a.top,s.y,s.y+s.height-r.height),c=CI(i,l);return t.fold((()=>{const e=wI(c,o,n);return OI(e.left,e.top)}),x(c),(()=>{const e=yI(c,o,n);return _I(e.left,e.top)}))})(0,t.fold((()=>{const e=(t=o,a=s.left,i=s.top,t.fold(((e,t)=>OI(e+a,t+i)),((e,t)=>CI(e+a,t+i)),((e,t)=>_I(e+a,t+i))));var t,a,i;const l=yI(e,n,r);return _I(l.left,l.top)}),(t=>{const a=DI(e,t,o,s,n,r);return a.extra.each((o=>{t.onSensor(e,o)})),a.coord})),n,r,a),WI=(e,t)=>({bounds:e.getBounds(),height:Wt(t.element),width:Jt(t.element)}),jI=(e,t,o,n,r)=>{const s=o.update(n,r),a=o.getStartData().getOrThunk((()=>WI(t,e)));s.each((o=>{((e,t,o,n)=>{const r=t.getTarget(e.element);if(t.repositionTarget){const s=Ze(e.element),a=Ho(s),i=kD(r),l=PI(r),c=UI(e,t.snaps,l,a,i,n,o),d=SI(c,0,i);Bt(r,d)}t.onDrag(e,r,n)})(e,t,a,o)}))},GI=(e,t,o,n)=>{t.each(VI),o.snaps.each((t=>{AI(e,t)}));const r=o.getTarget(e.element);n.reset(),o.onDrop(e,r)},$I=e=>(t,o)=>{const n=e=>{o.setStartData(WI(t,e))};return Ks([Zs(As(),(e=>{o.getStartData().each((()=>n(e)))})),...e(t,o,n)])};var qI=Object.freeze({__proto__:null,getData:e=>D.from(Gt(e.x,e.y)),getDelta:(e,t)=>Gt(t.left-e.left,t.top-e.top)});const XI=(e,t,o)=>[Zs(Qr(),((n,r)=>{if(0!==r.event.raw.button)return;r.stop();const s=()=>GI(n,D.some(l),e,t),a=PS(s,200),i={drop:s,delayDrop:a.schedule,forceDrop:s,move:o=>{a.cancel(),jI(n,e,t,qI,o)}},l=zI(n,e.blockerClass,(e=>Ks([Zs(Qr(),e.forceDrop),Zs(os(),e.drop),Zs(es(),((t,o)=>{e.move(o.event)})),Zs(ts(),e.delayDrop)]))(i));o(n),NI(n,l)}))],KI=[...LI,ol("dragger",{handlers:$I(XI)})];var YI=Object.freeze({__proto__:null,getData:e=>{const t=e.raw.touches;return 1===t.length?(e=>{const t=e[0];return D.some(Gt(t.clientX,t.clientY))})(t):D.none()},getDelta:(e,t)=>Gt(t.left-e.left,t.top-e.top)});const JI=(e,t,o)=>{const n=Sc(),r=o=>{GI(o,n.get(),e,t),n.clear()};return[Zs(Kr(),((s,a)=>{a.stop();const i=()=>r(s),l={drop:i,delayDrop:b,forceDrop:i,move:o=>{jI(s,e,t,YI,o)}},c=zI(s,e.blockerClass,(e=>Ks([Zs(Kr(),e.forceDrop),Zs(Jr(),e.drop),Zs(Zr(),e.drop),Zs(Yr(),((t,o)=>{e.move(o.event)}))]))(l));n.set(c);o(s),NI(s,c)})),Zs(Yr(),((o,n)=>{n.stop(),jI(o,e,t,YI,n.event)})),Zs(Jr(),((e,t)=>{t.stop(),r(e)})),Zs(Zr(),r)]},ZI=KI,QI=[...LI,ol("dragger",{handlers:$I(JI)})],eR=[...LI,ol("dragger",{handlers:$I(((e,t,o)=>[...XI(e,t,o),...JI(e,t,o)]))})];var tR=Object.freeze({__proto__:null,mouse:ZI,touch:QI,mouseOrTouch:eR});var oR=Object.freeze({__proto__:null,init:()=>{let e=D.none(),t=D.none();const o=x({});return Na({readState:o,reset:()=>{e=D.none(),t=D.none()},update:(t,o)=>t.getData(o).bind((o=>((t,o)=>{const n=e.map((e=>t.getDelta(e,o)));return e=D.some(o),n})(t,o))),getStartData:()=>t,setStartData:e=>{t=D.some(e)}})}});const nR=Kl({branchKey:"mode",branches:tR,name:"dragging",active:{events:(e,t)=>e.dragger.handlers(e,t)},extra:{snap:e=>({sensor:e.sensor,range:e.range,output:e.output,extra:D.from(e.extra)})},state:oR,apis:II}),rR=(e,t,o,n,r,s)=>e.fold((()=>nR.snap({sensor:CI(o-20,n-20),range:Gt(r,s),output:CI(D.some(o),D.some(n)),extra:{td:t}})),(e=>{const r=o-20,s=n-20,a=e.element.dom.getBoundingClientRect();return nR.snap({sensor:CI(r,s),range:Gt(40,40),output:CI(D.some(o-a.width/2),D.some(n-a.height/2)),extra:{td:t}})})),sR=(e,t,o)=>({getSnapPoints:e,leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:(e,n)=>{const r=n.td;((e,t)=>e.exists((e=>Ye(e,t))))(t.get(),r)||(t.set(r),o(r))},mustSnap:!0}),aR=e=>Df(Ef.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:Gl([nR.config({mode:"mouseOrTouch",blockerClass:"blocker",snaps:e}),Bk.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}})),iR=(e,t)=>{const o=Rr([]),n=Rr([]),r=Rr(!1),s=Sc(),a=Sc(),i=e=>{const o=Ko(e);return rR(u.getOpt(t),e,o.x,o.y,o.width,o.height)},l=e=>{const o=Ko(e);return rR(m.getOpt(t),e,o.right,o.bottom,o.width,o.height)},c=sR((()=>H(o.get(),(e=>i(e)))),s,(t=>{a.get().each((o=>{e.dispatch("TableSelectorChange",{start:t,finish:o})}))})),d=sR((()=>H(n.get(),(e=>l(e)))),a,(t=>{s.get().each((o=>{e.dispatch("TableSelectorChange",{start:o,finish:t})}))})),u=aR(c),m=aR(d),g=Oi(u.asSpec()),p=Oi(m.asSpec()),h=(t,o,n,r)=>{const s=n(o);nR.snapTo(t,s);((t,o,n,r)=>{const s=o.dom.getBoundingClientRect();zt(t.element,"display");const a=tt(Ie.fromDom(e.getBody())).dom.innerHeight,i=n(s),l=r(s,a);(i||l)&&At(t.element,"display","none")})(t,o,(e=>e[r]<0),((e,t)=>e[r]>t))},f=e=>h(g,e,i,"top"),b=e=>h(p,e,l,"bottom");Eo().deviceType.isTouch()&&(e.on("TableSelectionChange",(e=>{r.get()||(lu(t,g),lu(t,p),r.set(!0)),s.set(e.start),a.set(e.finish),e.otherCells.each((t=>{o.set(t.upOrLeftCells),n.set(t.downOrRightCells),f(e.start),b(e.finish)}))})),e.on("ResizeEditor ResizeWindow ScrollContent",(()=>{s.get().each(f),a.get().each(b)})),e.on("TableSelectionClear",(()=>{r.get()&&(uu(g),uu(p),r.set(!1)),s.clear(),a.clear()})))};const lR=(e,t,o)=>{var n;const r=null!==(n=t.delimiter)&&void 0!==n?n:"›",s=t=>j(t,((t,n,s)=>{const a=((t,n,r)=>Ef.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{"data-index":r,"aria-level":r+1}},components:[xi(t)],action:t=>{e.focus(),e.selection.select(n),e.nodeChanged()},buttonBehaviours:Gl([ux(o.isDisabled),cx()])}))(n.name,n.element,s);return 0===s?t.concat([a]):t.concat([{dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0}},components:[xi(` ${r} `)]},a])}),[]);return{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:Gl([kh.config({mode:"flow",selector:"div[role=button]"}),fg.config({disabled:o.isDisabled}),cx(),ak.config({}),Bh.config({}),Fh("elementPathEvents",[aa(((t,o)=>{e.shortcuts.add("alt+F11","focus statusbar elementpath",(()=>kh.focusIn(t))),e.on("NodeChange",(o=>{const n=(t=>{const o=[];let n=t.length;for(;n-- >0;){const s=t[n];if(1===s.nodeType&&"BR"!==(r=s).nodeName&&!r.getAttribute("data-mce-bogus")&&"bookmark"!==r.getAttribute("data-mce-type")){const t=sw(e,s);if(t.isDefaultPrevented()||o.push({name:t.name,element:s}),t.isPropagationStopped())break}}var r;return o})(o.parents),r=n.length>0?s(n):[];Bh.set(t,r)}))}))])]),components:[]}};var cR;!function(e){e[e.None=0]="None",e[e.Both=1]="Both",e[e.Vertical=2]="Vertical"}(cR||(cR={}));const dR=(e,t,o)=>{const n=Ie.fromDom(e.getContainer()),r=((e,t,o,n,r)=>{const s={height:eF(n+t.top,eb(e),ob(e))};return o===cR.Both&&(s.width=eF(r+t.left,Qf(e),tb(e))),s})(e,t,o,Ut(n),Yt(n));le(r,((e,t)=>{h(e)&&At(n,t,QB(e))})),(e=>{e.dispatch("ResizeEditor")})(e)},uR=(e,t,o,n)=>{const r=Gt(20*o,20*n);return dR(e,r,t),D.some(!0)},mR=(e,t)=>{const o=(e=>{const t=Eb(e);return!1===t?cR.None:"both"===t?cR.Both:cR.Vertical})(e);return o===cR.None?D.none():D.some(Hf("resize-handle",{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{title:t.translate("Resize")},behaviours:[nR.config({mode:"mouse",repositionTarget:!1,onDrag:(t,n,r)=>dR(e,r,o),blockerClass:"tox-blocker"}),kh.config({mode:"special",onLeft:()=>uR(e,o,-1,0),onRight:()=>uR(e,o,1,0),onUp:()=>uR(e,o,0,-1),onDown:()=>uR(e,o,0,1)}),ak.config({}),zh.config({})]},t.icons))},gR=(e,t)=>{const o=()=>{const o=[];return _b(e)&&o.push(lR(e,{},t)),e.hasPlugin("wordcount")&&o.push(((e,t)=>{const o=(e,o,n)=>Bh.set(e,[xi(t.translate(["{0} "+n,o[n]]))]);return Ef.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:Gl([ux(t.isDisabled),cx(),ak.config({}),Bh.config({}),qu.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),Fh("wordcount-events",[ca((e=>{const t=qu.getValue(e),n="words"===t.mode?"characters":"words";qu.setValue(e,{mode:n,count:t.count}),o(e,t.count,n)})),aa((t=>{e.on("wordCountUpdate",(e=>{const{mode:n}=qu.getValue(t);qu.setValue(t,{mode:n,count:e.wordCount}),o(t,e.wordCount,n)}))}))])]),eventOrder:{[ws()]:["disabling","alloy.base.behaviour","wordcount-events"]}})})(e,t)),Tb(e)&&o.push({dom:{tag:"span",classes:["tox-statusbar__branding"]},components:[{dom:{tag:"a",attributes:{href:"https://www.tiny.cloud/powered-by-tiny?utm_campaign=editor_referral&utm_medium=poweredby&utm_source=tinymce&utm_content=v6",rel:"noopener",target:"_blank","aria-label":Af.translate(["Powered by {0}","Tiny"])},innerHtml:'<svg width="50px" height="16px" viewBox="0 0 50 16" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M10.143 0c2.608.015 5.186 2.178 5.186 5.331 0 0 .077 3.812-.084 4.87-.361 2.41-2.164 4.074-4.65 4.496-1.453.284-2.523.49-3.212.623-.373.071-.634.122-.785.152-.184.038-.997.145-1.35.145-2.732 0-5.21-2.04-5.248-5.33 0 0 0-3.514.03-4.442.093-2.4 1.758-4.342 4.926-4.963 0 0 3.875-.752 4.036-.782.368-.07.775-.1 1.15-.1Zm1.826 2.8L5.83 3.989v2.393l-2.455.475v5.968l6.137-1.189V9.243l2.456-.476V2.8ZM5.83 6.382l3.682-.713v3.574l-3.682.713V6.382Zm27.173-1.64-.084-1.066h-2.226v9.132h2.456V7.743c-.008-1.151.998-2.064 2.149-2.072 1.15-.008 1.987.92 1.995 2.072v5.065h2.455V7.359c-.015-2.18-1.657-3.929-3.837-3.913a3.993 3.993 0 0 0-2.908 1.296Zm-6.3-4.266L29.16 0v2.387l-2.456.475V.476Zm0 3.2v9.132h2.456V3.676h-2.456Zm18.179 11.787L49.11 3.676H46.58l-1.612 4.527-.46 1.382-.384-1.382-1.611-4.527H39.98l3.3 9.132L42.15 16l2.732-.537ZM22.867 9.738c0 .752.568 1.075.921 1.075.353 0 .668-.047.998-.154l.537 1.765c-.23.154-.92.537-2.225.537-1.305 0-2.655-.997-2.686-2.686a136.877 136.877 0 0 1 0-4.374H18.8V3.676h1.612v-1.98l2.455-.476v2.456h2.302V5.9h-2.302v3.837Z"/>\n</svg>\n'.trim()},behaviours:Gl([zh.config({})])}]}),o.length>0?[{dom:{tag:"div",classes:["tox-statusbar__text-container"]},components:o}]:[]};return{dom:{tag:"div",classes:["tox-statusbar"]},components:(()=>{const n=o(),r=mR(e,t);return n.concat(r.toArray())})()}},pR=(e,t)=>t.get().getOrDie(`UI for ${e} has not been rendered`),hR=(e,t)=>{const o=e.inline,n=o?iF:JB,r=jb(e)?cA:wD,s=(()=>{const e=Sc(),t=Sc(),o=Sc();return{dialogUi:e,popupUi:t,mainUi:o,getUiMotherships:()=>{const o=e.get().map((e=>e.mothership)),n=t.get().map((e=>e.mothership));return o.fold((()=>n.toArray()),(e=>n.fold((()=>[e]),(t=>Ye(e.element,t.element)?[e]:[e,t]))))},lazyGetInOuterOrDie:(e,t)=>()=>o.get().bind((e=>t(e.outerContainer))).getOrDie(`Could not find ${e} element in OuterContainer`)}})(),a=Sc(),i=Sc(),l=Sc(),c=Eo().deviceType.isTouch()?["tox-platform-touch"]:[],d=Hb(e),u=lb(e),m=Df({dom:{tag:"div",classes:["tox-anchorbar"]}}),g=()=>s.mainUi.get().map((e=>e.outerContainer)).bind(WM.getHeader),p=s.lazyGetInOuterOrDie("anchor bar",m.getOpt),h=s.lazyGetInOuterOrDie("toolbar",WM.getToolbar),f=s.lazyGetInOuterOrDie("throbber",WM.getThrobber),b=lD({popup:()=>tn.fromOption(s.popupUi.get().map((e=>e.sink)),"(popup) UI has not been rendered"),dialog:()=>tn.fromOption(s.dialogUi.get().map((e=>e.sink)),"UI has not been rendered")},e,p),v=()=>WM.parts.promotion({dom:{tag:"div",classes:["tox-promotion"]}}),y=()=>{const t=(()=>{const t={attributes:{[$c]:d?Gc.BottomToTop:Gc.TopToBottom}},o=WM.parts.menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:b.popup,onEscape:()=>{e.focus()}}),n=WM.parts.toolbar({dom:{tag:"div",classes:["tox-toolbar"]},getSink:b.popup.shared.getSink,providers:b.popup.shared.providers,onEscape:()=>{e.focus()},onToolbarToggled:t=>{((e,t)=>{e.dispatch("ToggleToolbarDrawer",{state:t})})(e,t)},type:u,lazyToolbar:h,lazyHeader:()=>g().getOrDie("Could not find header element"),...t}),r=WM.parts["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},providers:b.popup.shared.providers,onEscape:()=>{e.focus()},type:u}),s=zb(e),a=Nb(e),i=Fb(e),l=Mb(e),c=v(),p=s||a||i,f=l?[c,o]:[o];return WM.parts.header({dom:{tag:"div",classes:["tox-editor-header"].concat(p?[]:["tox-editor-header--empty"]),...t},components:q([i?f:[],s?[r]:a?[n]:[],Pb(e)?[]:[m.asSpec()]]),sticky:jb(e),editor:e,sharedBackstage:b.popup.shared})})(),n={dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[WM.parts.socket({dom:{tag:"div",classes:["tox-edit-area"]}}),WM.parts.sidebar({dom:{tag:"div",classes:["tox-sidebar"]}})]},r=WM.parts.throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:b.popup}),s=WM.parts.viewWrapper({backstage:b.popup}),i=Cb(e)&&!o?D.some(gR(e,b.popup.shared.providers)):D.none(),l=q([d?[]:[t],o?[]:[n],d?[t]:[]]),p=WM.parts.editorContainer({components:q([l,o?[]:i.toArray()])}),f=Wb(e),y={role:"application",...Af.isRtl()?{dir:"rtl"}:{},...f?{"aria-hidden":"true"}:{}},x=Oi(WM.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(o?["tox-tinymce-inline"]:[]).concat(d?["tox-tinymce--toolbar-bottom"]:[]).concat(c),styles:{visibility:"hidden",...f?{opacity:"0",border:"0"}:{}},attributes:y},components:[p,...o?[]:[s],r],behaviours:Gl([cx(),fg.config({disableClass:"tox-tinymce--disabled"}),kh.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, .tox-statusbar__resize-handle"})])})),w=ek(x);return a.set(w),{mothership:w,outerContainer:x}},x=t=>{const o=QB(tF(e)),n=QB((e=>oF(e).getOr(Zf(e)))(e));return e.inline||(Vt("div","width",n)&&At(t.element,"width",n),Vt("div","height",o)?At(t.element,"height",o):At(t.element,"height","400px")),o},w=t=>{const{mainUi:o,popupUi:s,uiMotherships:a}=t;ce(cb(e),((t,o)=>{e.ui.registry.addGroupToolbarButton(o,t)}));const{buttons:i,menuItems:l,contextToolbars:c,sidebars:d,views:m}=e.ui.registry.getAll(),p=Vb(e),h={menuItems:l,menus:$b(e),menubar:hb(e),toolbar:p.getOrThunk((()=>fb(e))),allowToolbarGroups:u===Uf.floating,buttons:i,sidebar:d,views:m};var v;v=o.outerContainer,e.addShortcut("alt+F9","focus menubar",(()=>{WM.focusMenubar(v)})),e.addShortcut("alt+F10","focus toolbar",(()=>{WM.focusToolbar(v)})),e.addCommand("ToggleToolbarDrawer",((e,t)=>{(null==t?void 0:t.skipFocus)?WM.toggleToolbarDrawerWithoutFocusing(v):WM.toggleToolbarDrawer(v)})),e.addQueryStateHandler("ToggleToolbarDrawer",(()=>WM.isToolbarDrawerToggled(v))),((e,t,o)=>{const n=(e,n)=>{L([t,...o],(t=>{t.broadcastEvent(e,n)}))},r=(e,n)=>{L([t,...o],(t=>{t.broadcastOn([e],n)}))},s=e=>r(Eu(),{target:e.target}),a=Wo(),i=Oc(a,"touchstart",s),l=Oc(a,"touchmove",(e=>n(Es(),e))),c=Oc(a,"touchend",(e=>n(Ds(),e))),d=Oc(a,"mousedown",s),u=Oc(a,"mouseup",(e=>{0===e.raw.button&&r(Au(),{target:e.target})})),m=e=>r(Eu(),{target:Ie.fromDom(e.target)}),g=e=>{0===e.button&&r(Au(),{target:Ie.fromDom(e.target)})},p=()=>{L(e.editorManager.get(),(t=>{e!==t&&t.dispatch("DismissPopups",{relatedTarget:e})}))},h=e=>n(As(),_c(e)),f=e=>{r(Du(),{}),n(Ms(),_c(e))},b=gt(Ie.fromDom(e.getElement())),v=Cc(b,"scroll",(o=>{requestAnimationFrame((()=>{if(null!=e.getContainer()){const r=zS(e,t.element).map((e=>[e.element,...e.others])).getOr([]);N(r,(e=>Ye(e,o.target)))&&(e.dispatch("ElementScroll",{target:o.target.dom}),n(zs(),o))}}))})),y=()=>r(Du(),{}),x=t=>{t.state&&r(Eu(),{target:Ie.fromDom(e.getContainer())})},w=e=>{r(Eu(),{target:Ie.fromDom(e.relatedTarget.getContainer())})};e.on("PostRender",(()=>{e.on("click",m),e.on("tap",m),e.on("mouseup",g),e.on("mousedown",p),e.on("ScrollWindow",h),e.on("ResizeWindow",f),e.on("ResizeEditor",y),e.on("AfterProgressState",x),e.on("DismissPopups",w)})),e.on("remove",(()=>{e.off("click",m),e.off("tap",m),e.off("mouseup",g),e.off("mousedown",p),e.off("ScrollWindow",h),e.off("ResizeWindow",f),e.off("ResizeEditor",y),e.off("AfterProgressState",x),e.off("DismissPopups",w),d.unbind(),i.unbind(),l.unbind(),c.unbind(),u.unbind(),v.unbind()})),e.on("detach",(()=>{L([t,...o],fu),L([t,...o],(e=>e.destroy()))}))})(e,o.mothership,a),r.setup(e,b.popup.shared,g),GF(e,b.popup),pI(e,b.popup.shared.getSink,b.popup),(e=>{const{sidebars:t}=e.ui.registry.getAll();L(ae(t),(o=>{const n=t[o],r=()=>xe(D.from(e.queryCommandValue("ToggleSidebar")),o);e.ui.registry.addToggleButton(o,{icon:n.icon,tooltip:n.tooltip,onAction:t=>{e.execCommand("ToggleSidebar",!1,o),t.setActive(r())},onSetup:t=>{t.setActive(r());const o=()=>t.setActive(r());return e.on("ToggleSidebar",o),()=>{e.off("ToggleSidebar",o)}}})}))})(e),NA(e,f,b.popup.shared),AF(e,c,s.sink,{backstage:b.popup}),iR(e,s.sink);const y={targetNode:e.getElement(),height:x(o.outerContainer)};return n.render(e,t,h,b.popup,y)};return{popups:{backstage:b.popup,getMothership:()=>pR("popups",l)},dialogs:{backstage:b.dialog,getMothership:()=>pR("dialogs",i)},renderUI:()=>{const o=y(),n=(()=>{const t=Ub(e),o=Ye(yt(),t)&&"grid"===Ft(t,"display"),n={dom:{tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(c),attributes:{...Af.isRtl()?{dir:"rtl"}:{}}},behaviours:Gl([eu.config({useFixed:()=>r.isDocked(g)})])},s={dom:{styles:{width:document.body.clientWidth+"px"}},events:Ks([Zs(Ms(),(e=>{At(e.element,"width",document.body.clientWidth+"px")}))])},a=Oi(xn(n,o?s:{})),l=ek(a);return i.set(l),{sink:a,mothership:l}})(),a=Gb(e)?(()=>{const e={dom:{tag:"div",classes:["tox","tox-silver-sink","tox-silver-popup-sink","tox-tinymce-aux"].concat(c),attributes:{...Af.isRtl()?{dir:"rtl"}:{}}},behaviours:Gl([eu.config({useFixed:()=>r.isDocked(g),getBounds:()=>t.getPopupSinkBounds()})])},o=Oi(e),n=ek(o);return l.set(n),{sink:o,mothership:n}})():(e=>(l.set(e.mothership),e))(n);s.dialogUi.set(n),s.popupUi.set(a),s.mainUi.set(o);const d={popupUi:a,dialogUi:n,mainUi:o,uiMotherships:s.getUiMotherships()};return w(d)}}},fR=x([cr("lazySink"),vr("dragBlockClass"),Br("getBounds",Jo),_r("useTabstopAt",E),_r("firstTabstop",0),_r("eventOrder",{}),Xu("modalBehaviours",[kh]),Qi("onExecute"),tl("onEscape")]),bR={sketch:w},vR=x([Cm({name:"draghandle",overrides:(e,t)=>({behaviours:Gl([nR.config({mode:"mouse",getTarget:e=>Ai(e,'[role="dialog"]').getOr(e),blockerClass:e.dragBlockClass.getOrDie(new Error("The drag blocker class was not specified for a dialog with a drag handle: \n"+JSON.stringify(t,null,2)).message),getBounds:e.getDragBounds})])})}),km({schema:[cr("dom")],name:"title"}),km({factory:bR,schema:[cr("dom")],name:"close"}),km({factory:bR,schema:[cr("dom")],name:"body"}),Cm({factory:bR,schema:[cr("dom")],name:"footer"}),Om({factory:{sketch:(e,t)=>({...e,dom:t.dom,components:t.components})},schema:[_r("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),_r("components",[])],name:"blocker"})]),yR=Zm({name:"ModalDialog",configFields:fR(),partFields:vR(),factory:(e,t,o,n)=>{const r=Sc(),s=va("modal-events"),a={...e.eventOrder,[Bs()]:[s].concat(e.eventOrder["alloy.system.attached"]||[])};return{uid:e.uid,dom:e.dom,components:t,apis:{show:t=>{r.set(t);const o=e.lazySink(t).getOrDie(),s=n.blocker(),a=o.getSystem().build({...s,components:s.components.concat([Ci(t)]),behaviours:Gl([zh.config({}),Fh("dialog-blocker-events",[sa(rs(),(()=>{kh.focusIn(t)}))])])});lu(o,a),kh.focusIn(t)},hide:e=>{r.clear(),ot(e.element).each((t=>{e.getSystem().getByDom(t).each((e=>{uu(e)}))}))},getBody:t=>zm(t,e,"body"),getFooter:t=>zm(t,e,"footer"),setIdle:e=>{BA.unblock(e)},setBusy:(e,t)=>{BA.block(e,t)}},eventOrder:a,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:Yu(e.modalBehaviours,[Bh.config({}),kh.config({mode:"cyclic",onEnter:e.onExecute,onEscape:e.onEscape,useTabstopAt:e.useTabstopAt,firstTabstop:e.firstTabstop}),BA.config({getRoot:r.get}),Fh(s,[aa((t=>{((e,t)=>{const o=Ct(e,"id").fold((()=>{const e=va("dialog-label");return St(t,"id",e),e}),w);St(e,"aria-labelledby",o)})(t.element,zm(t,e,"title").element),((e,t)=>{const o=D.from(Ot(e,"id")).fold((()=>{const e=va("dialog-describe");return St(t,"id",e),e}),w);St(e,"aria-describedby",o)})(t.element,zm(t,e,"body").element)}))])])}},apis:{show:(e,t)=>{e.show(t)},hide:(e,t)=>{e.hide(t)},getBody:(e,t)=>e.getBody(t),getFooter:(e,t)=>e.getFooter(t),setBusy:(e,t,o)=>{e.setBusy(t,o)},setIdle:(e,t)=>{e.setIdle(t)}}}),xR=Vn([Hv,Lv].concat(Ry)),wR=$n,SR=[my("button"),Qv,Ar("align","end",["start","end"]),iy,ay,Sr("buttonType",["primary","secondary"])],kR=[...SR,Uv],OR=[gr("type",["submit","cancel","custom"]),...kR],CR=[gr("type",["menu"]),Zv,ey,Qv,br("items",xR),...SR],_R=[...SR,gr("type",["togglebutton"]),mr("tooltip"),jv,Zv,Mr("active",!1)],TR=rr("type",{submit:OR,cancel:OR,custom:OR,menu:CR,togglebutton:_R}),ER=[Hv,Uv,gr("level",["info","warn","error","success"]),jv,_r("url","")],DR=Vn(ER),AR=[Hv,Uv,ay,my("button"),Qv,sy,Sr("buttonType",["primary","secondary","toolbar"]),iy],MR=Vn(AR),BR=[Hv,Lv],FR=BR.concat([ty]),IR=BR.concat([Pv,ay]),RR=Vn(IR),NR=$n,VR=FR.concat([ly("auto")]),zR=Vn(VR),HR=Pn([Gv,Uv,jv]),LR=FR.concat([Dr("storageKey","default")]),PR=Vn(LR),UR=Gn,WR=Vn(FR),jR=Gn,GR=BR.concat([Dr("tag","textarea"),mr("scriptId"),mr("scriptUrl"),((e,t)=>Tr(e,t,Kn))("settings",void 0)]),$R=BR.concat([Dr("tag","textarea"),pr("init")]),qR=Zn((e=>er("customeditor.old",Nn($R),e).orThunk((()=>er("customeditor.new",Nn(GR),e))))),XR=Gn,KR=Vn(FR),YR=zn(An),JR=e=>[Hv,ur("columns"),e],ZR=[Hv,mr("html"),Ar("presets","presentation",["presentation","document"])],QR=Vn(ZR),eN=FR.concat([Mr("sandboxed",!0),Mr("transparent",!0)]),tN=Vn(eN),oN=Gn,nN=Vn(BR.concat([wr("height")])),rN=Vn([mr("url"),xr("zoom"),xr("cachedWidth"),xr("cachedHeight")]),sN=FR.concat([wr("inputMode"),wr("placeholder"),Mr("maximized",!1),ay]),aN=Vn(sN),iN=Gn,lN=e=>[Hv,Pv,e],cN=[Uv,Gv],dN=[Uv,br("items",sr(0,(()=>uN)))],uN=Hn([Vn(cN),Vn(dN)]),mN=FR.concat([br("items",uN),ay]),gN=Vn(mN),pN=Gn,hN=FR.concat([fr("items",[Uv,Gv]),Er("size",1),ay]),fN=Vn(hN),bN=Gn,vN=FR.concat([Mr("constrain",!0),ay]),yN=Vn(vN),xN=Vn([mr("width"),mr("height")]),wN=BR.concat([Pv,Er("min",0),Er("max",0)]),SN=Vn(wN),kN=jn,ON=[Hv,br("header",Gn),br("cells",zn(Gn))],CN=Vn(ON),_N=FR.concat([wr("placeholder"),Mr("maximized",!1),ay]),TN=Vn(_N),EN=Gn,DN=[gr("type",["directory","leaf"]),Wv,mr("id"),yr("menu",mA)],AN=Vn(DN),MN=DN.concat([br("children",sr(0,(()=>Jn("type",{directory:BN,leaf:AN}))))]),BN=Vn(MN),FN=Jn("type",{directory:BN,leaf:AN}),IN=[Hv,br("items",FN),kr("onLeafAction")],RN=Vn(IN),NN=FR.concat([Ar("filetype","file",["image","media","file"]),ay]),VN=Vn(NN),zN=Vn([Gv,cy]),HN=e=>ar("items","items",{tag:"required",process:{}},zn(Zn((t=>er(`Checking item of ${e}`,LN,t).fold((e=>tn.error(nr(e))),(e=>tn.value(e))))))),LN=In((()=>{return Jn("type",{alertbanner:DR,bar:Vn((e=HN("bar"),[Hv,e])),button:MR,checkbox:RR,colorinput:PR,colorpicker:WR,dropzone:KR,grid:Vn(JR(HN("grid"))),iframe:tN,input:aN,listbox:gN,selectbox:fN,sizeinput:yN,slider:SN,textarea:TN,urlinput:VN,customeditor:qR,htmlpanel:QR,imagepreview:nN,collection:zR,label:Vn(lN(HN("label"))),table:CN,tree:RN,panel:UN});var e})),PN=[Hv,_r("classes",[]),br("items",LN)],UN=Vn(PN),WN=[my("tab"),Wv,br("items",LN)],jN=[Hv,fr("tabs",WN)],GN=Vn(jN),$N=kR,qN=TR,XN=Vn([mr("title"),dr("body",Jn("type",{panel:UN,tabpanel:GN})),Dr("size","normal"),br("buttons",qN),_r("initialData",{}),Br("onAction",b),Br("onChange",b),Br("onSubmit",b),Br("onClose",b),Br("onCancel",b),Br("onTabChange",b)]),KN=Vn([gr("type",["cancel","custom"]),...$N]),YN=Vn([mr("title"),mr("url"),xr("height"),xr("width"),Or("buttons",KN),Br("onAction",b),Br("onCancel",b),Br("onClose",b),Br("onMessage",b)]),JN=e=>a(e)?[e].concat(X(fe(e),JN)):l(e)?X(e,JN):[],ZN=e=>s(e.type)&&s(e.name),QN={checkbox:NR,colorinput:UR,colorpicker:jR,dropzone:YR,input:iN,iframe:oN,imagepreview:rN,selectbox:bN,sizeinput:xN,slider:kN,listbox:pN,size:xN,textarea:EN,urlinput:zN,customeditor:XR,collection:HR,togglemenuitem:wR},eV=e=>{const t=(e=>U(JN(e),ZN))(e),o=X(t,(e=>(e=>D.from(QN[e.type]))(e).fold((()=>[]),(t=>[dr(e.name,t)]))));return Vn(o)},tV=e=>{var t;return{internalDialog:tr(er("dialog",XN,e)),dataValidator:eV(e),initialData:null!==(t=e.initialData)&&void 0!==t?t:{}}},oV={open:(e,t)=>{const o=tV(t);return e(o.internalDialog,o.initialData,o.dataValidator)},openUrl:(e,t)=>e(tr(er("dialog",YN,t))),redial:e=>tV(e)};var nV=Object.freeze({__proto__:null,events:(e,t)=>{const o=(o,n)=>{e.updateState.each((e=>{const r=e(o,n);t.set(r)})),e.renderComponents.each((r=>{const s=r(n,t.get());(e.reuseDom?Ch:Oh)(o,s)}))};return Ks([Zs(xs(),((t,n)=>{const r=n;if(!r.universal){const n=e.channel;R(r.channels,n)&&o(t,r.data)}})),aa(((t,n)=>{e.initialData.each((e=>{o(t,e)}))}))])}});var rV=Object.freeze({__proto__:null,getState:(e,t,o)=>o}),sV=[cr("channel"),vr("renderComponents"),vr("updateState"),vr("initialData"),Mr("reuseDom",!0)];const aV=ql({fields:sV,name:"reflecting",active:nV,apis:rV,state:Object.freeze({__proto__:null,init:()=>{const e=Rr(D.none());return{readState:()=>e.get().getOr("none"),get:e.get,set:e.set,clear:()=>e.set(D.none())}}})}),iV=e=>{const t=[],o={};return le(e,((e,n)=>{e.fold((()=>{t.push(n)}),(e=>{o[n]=e}))})),t.length>0?tn.error(t):tn.value(o)},lV=(e,t,o)=>{const n=Df(_C.sketch((n=>({dom:{tag:"div",classes:["tox-form"].concat(e.classes)},components:H(e.items,(e=>KT(n,e,t,o)))}))));return{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[n.asSpec()]}],behaviours:Gl([kh.config({mode:"acyclic",useTabstopAt:O(o_)}),RC(n),LC(n,{postprocess:e=>iV(e).fold((e=>(console.error(e),{})),w)})])}},cV=Jm({name:"TabButton",configFields:[_r("uid",void 0),cr("value"),ar("dom","dom",On((()=>({attributes:{role:"tab",id:va("aria"),"aria-selected":"false"}}))),Un()),vr("action"),_r("domModification",{}),Xu("tabButtonBehaviours",[zh,kh,qu]),cr("view")],factory:(e,t)=>({uid:e.uid,dom:e.dom,components:e.components,events:Kh(e.action),behaviours:Yu(e.tabButtonBehaviours,[zh.config({}),kh.config({mode:"execution",useSpace:!0,useEnter:!0}),qu.config({store:{mode:"memory",initialValue:e.value}})]),domModification:e.domModification})}),dV=x([cr("tabs"),cr("dom"),_r("clickToDismiss",!1),Xu("tabbarBehaviours",[Tg,kh]),Yi(["tabClass","selectedClass"])]),uV=_m({factory:cV,name:"tabs",unit:"tab",overrides:e=>{const t=(e,t)=>{Tg.dehighlight(e,t),js(e,Ls(),{tabbar:e,button:t})},o=(e,t)=>{Tg.highlight(e,t),js(e,Hs(),{tabbar:e,button:t})};return{action:n=>{const r=n.getSystem().getByUid(e.uid).getOrDie(),s=Tg.isHighlighted(r,n);(s&&e.clickToDismiss?t:s?b:o)(r,n)},domModification:{classes:[e.markers.tabClass]}}}}),mV=x([uV]),gV=Zm({name:"Tabbar",configFields:dV(),partFields:mV(),factory:(e,t,o,n)=>({uid:e.uid,dom:e.dom,components:t,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:Yu(e.tabbarBehaviours,[Tg.config({highlightClass:e.markers.selectedClass,itemClass:e.markers.tabClass,onHighlight:(e,t)=>{St(t.element,"aria-selected","true")},onDehighlight:(e,t)=>{St(t.element,"aria-selected","false")}}),kh.config({mode:"flow",getInitial:e=>Tg.getHighlighted(e).map((e=>e.element)),selector:"."+e.markers.tabClass,executeOnMove:!0})])})}),pV=Jm({name:"Tabview",configFields:[Xu("tabviewBehaviours",[Bh])],factory:(e,t)=>({uid:e.uid,dom:e.dom,behaviours:Yu(e.tabviewBehaviours,[Bh.config({})]),domModification:{attributes:{role:"tabpanel"}}})}),hV=x([_r("selectFirst",!0),Zi("onChangeTab"),Zi("onDismissTab"),_r("tabs",[]),Xu("tabSectionBehaviours",[])]),fV=km({factory:gV,schema:[cr("dom"),hr("markers",[cr("tabClass"),cr("selectedClass")])],name:"tabbar",defaults:e=>({tabs:e.tabs})}),bV=km({factory:pV,name:"tabview"}),vV=x([fV,bV]),yV=Zm({name:"TabSection",configFields:hV(),partFields:vV(),factory:(e,t,o,n)=>{const r=(t,o)=>{Vm(t,e,"tabbar").each((e=>{o(e).each(Gs)}))};return{uid:e.uid,dom:e.dom,components:t,behaviours:Ku(e.tabSectionBehaviours),events:Ks(q([e.selectFirst?[aa(((e,t)=>{r(e,Tg.getFirst)}))]:[],[Zs(Hs(),((t,o)=>{(t=>{const o=qu.getValue(t);Vm(t,e,"tabview").each((n=>{const r=G(e.tabs,(e=>e.value===o));r.each((o=>{const r=o.view();Ct(t.element,"id").each((e=>{St(n.element,"aria-labelledby",e)})),Bh.set(n,r),e.onChangeTab(n,t,r)}))}))})(o.event.button)})),Zs(Ls(),((t,o)=>{const n=o.event.button;e.onDismissTab(t,n)}))]])),apis:{getViewItems:t=>Vm(t,e,"tabview").map((e=>Bh.contents(e))).getOr([]),showTab:(e,t)=>{r(e,(e=>{const o=Tg.getCandidates(e);return G(o,(e=>qu.getValue(e)===t)).filter((t=>!Tg.isHighlighted(e,t)))}))}}}},apis:{getViewItems:(e,t)=>e.getViewItems(t),showTab:(e,t,o)=>{e.showTab(t,o)}}}),xV=(e,t)=>{At(e,"height",t+"px"),At(e,"flex-basis",t+"px")},wV=(e,t,o)=>{Ai(e,'[role="dialog"]').each((e=>{Bi(e,'[role="tablist"]').each((n=>{o.get().map((o=>(At(t,"height","0"),At(t,"flex-basis","0"),Math.min(o,((e,t,o)=>{const n=et(e).dom,r=Ai(e,".tox-dialog-wrap").getOr(e);let s;s="fixed"===Ft(r,"position")?Math.max(n.clientHeight,window.innerHeight):Math.max(n.offsetHeight,n.scrollHeight);const a=Ut(t),i=t.dom.offsetLeft>=o.dom.offsetLeft+Yt(o)?Math.max(Ut(o),a):a,l=parseInt(Ft(e,"margin-top"),10)||0,c=parseInt(Ft(e,"margin-bottom"),10)||0;return s-(Ut(e)+l+c-i)})(e,t,n))))).each((e=>{xV(t,e)}))}))}))},SV=e=>Bi(e,'[role="tabpanel"]'),kV=e=>{const t=Sc(),o=[aa((o=>{const n=o.element;SV(n).each((r=>{At(r,"visibility","hidden"),o.getSystem().getByDom(r).toOptional().each((o=>{const n=((e,t,o)=>H(e,((n,r)=>{Bh.set(o,e[r].view());const s=t.dom.getBoundingClientRect();return Bh.set(o,[]),s.height})))(e,r,o),s=(e=>oe(ee(e,((e,t)=>e>t?-1:e<t?1:0))))(n);s.fold(t.clear,t.set)})),wV(n,r,t),zt(r,"visibility"),((e,t)=>{oe(e).each((e=>yV.showTab(t,e.value)))})(e,o),requestAnimationFrame((()=>{wV(n,r,t)}))}))})),Zs(Ms(),(e=>{const o=e.element;SV(o).each((e=>{wV(o,e,t)}))})),Zs(xk,((e,o)=>{const n=e.element;SV(n).each((e=>{const o=oc(gt(e));At(e,"visibility","hidden");const r=Rt(e,"height").map((e=>parseInt(e,10)));zt(e,"height"),zt(e,"flex-basis");const s=e.dom.getBoundingClientRect().height;r.forall((e=>s>e))?(t.set(s),wV(n,e,t)):r.each((t=>{xV(e,t)})),zt(e,"visibility"),o.each(Ql)}))}))];return{extraEvents:o,selectFirst:!1}},OV="send-data-to-section",CV="send-data-to-view",_V=(e,t,o)=>{const n=Rr({}),r=e=>{const t=qu.getValue(e),o=iV(t).getOr({}),r=n.get(),s=xn(r,o);n.set(s)},s=e=>{const t=n.get();qu.setValue(e,t)},a=Rr(null),i=H(e.tabs,(e=>({value:e.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"]},components:[xi(o.shared.providers.translate(e.title))],view:()=>[_C.sketch((n=>({dom:{tag:"div",classes:["tox-form"]},components:H(e.items,(e=>KT(n,e,t,o))),formBehaviours:Gl([kh.config({mode:"acyclic",useTabstopAt:O(o_)}),Fh("TabView.form.events",[aa(s),ia(r)]),Jl.config({channels:Hr([{key:OV,value:{onReceive:r}},{key:CV,value:{onReceive:s}}])})])})))]}))),l=kV(i);return yV.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:(e,t,o)=>{const n=qu.getValue(t);js(e,yk,{name:n,oldName:a.get()}),a.set(n)},tabs:i,components:[yV.parts.tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[gV.parts.tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:Gl([ak.config({})])}),yV.parts.tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:l.selectFirst,tabSectionBehaviours:Gl([Fh("tabpanel",l.extraEvents),kh.config({mode:"acyclic"}),og.config({find:e=>oe(yV.getViewItems(e))}),UC(D.none(),(e=>(e.getSystem().broadcastOn([OV],{}),n.get())),((e,t)=>{n.set(t),e.getSystem().broadcastOn([CV],{})}))])})},TV=va("update-dialog"),EV=va("update-title"),DV=va("update-body"),AV=va("update-footer"),MV=va("body-send-message"),BV=(e,t,o,n,r)=>({dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:{...o.map((e=>({id:e}))).getOr({}),...r?{"aria-live":"polite"}:{}}},components:[],behaviours:Gl([NC(0),aV.config({channel:`${DV}-${t}`,updateState:(e,t)=>D.some({isTabPanel:()=>"tabpanel"===t.body.type}),renderComponents:e=>{const t=e.body;return"tabpanel"===t.type?[_V(t,e.initialData,n)]:[lV(t,e.initialData,n)]},initialData:e})])});function FV(e){return FV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},FV(e)}function IV(e,t){return IV=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},IV(e,t)}function RV(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function NV(e,t,o){return NV=RV()?Reflect.construct:function(e,t,o){var n=[null];n.push.apply(n,t);var r=new(Function.bind.apply(e,n));return o&&IV(r,o.prototype),r},NV.apply(null,arguments)}function VV(e){return function(e){if(Array.isArray(e))return zV(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return zV(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return zV(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zV(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}var HV=Object.hasOwnProperty,LV=Object.setPrototypeOf,PV=Object.isFrozen,UV=Object.getPrototypeOf,WV=Object.getOwnPropertyDescriptor,jV=Object.freeze,GV=Object.seal,$V=Object.create,qV="undefined"!=typeof Reflect&&Reflect,XV=qV.apply,KV=qV.construct;XV||(XV=function(e,t,o){return e.apply(t,o)}),jV||(jV=function(e){return e}),GV||(GV=function(e){return e}),KV||(KV=function(e,t){return NV(e,VV(t))});var YV,JV=iz(Array.prototype.forEach),ZV=iz(Array.prototype.pop),QV=iz(Array.prototype.push),ez=iz(String.prototype.toLowerCase),tz=iz(String.prototype.match),oz=iz(String.prototype.replace),nz=iz(String.prototype.indexOf),rz=iz(String.prototype.trim),sz=iz(RegExp.prototype.test),az=(YV=TypeError,function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return KV(YV,t)});function iz(e){return function(t){for(var o=arguments.length,n=new Array(o>1?o-1:0),r=1;r<o;r++)n[r-1]=arguments[r];return XV(e,t,n)}}function lz(e,t){LV&&LV(e,null);for(var o=t.length;o--;){var n=t[o];if("string"==typeof n){var r=ez(n);r!==n&&(PV(t)||(t[o]=r),n=r)}e[n]=!0}return e}function cz(e){var t,o=$V(null);for(t in e)XV(HV,e,[t])&&(o[t]=e[t]);return o}function dz(e,t){for(;null!==e;){var o=WV(e,t);if(o){if(o.get)return iz(o.get);if("function"==typeof o.value)return iz(o.value)}e=UV(e)}return function(e){return console.warn("fallback value for",e),null}}var uz=jV(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),mz=jV(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),gz=jV(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),pz=jV(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),hz=jV(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),fz=jV(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),bz=jV(["#text"]),vz=jV(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),yz=jV(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),xz=jV(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),wz=jV(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Sz=GV(/\{\{[\w\W]*|[\w\W]*\}\}/gm),kz=GV(/<%[\w\W]*|[\w\W]*%>/gm),Oz=GV(/^data-[\-\w.\u00B7-\uFFFF]/),Cz=GV(/^aria-[\-\w]+$/),_z=GV(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Tz=GV(/^(?:\w+script|data):/i),Ez=GV(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Dz=GV(/^html$/i),Az=function(){return"undefined"==typeof window?null:window},Mz=function(e,t){if("object"!==FV(e)||"function"!=typeof e.createPolicy)return null;var o=null,n="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(n)&&(o=t.currentScript.getAttribute(n));var r="dompurify"+(o?"#"+o:"");try{return e.createPolicy(r,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};var Bz=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Az(),o=function(t){return e(t)};if(o.version="2.3.8",o.removed=[],!t||!t.document||9!==t.document.nodeType)return o.isSupported=!1,o;var n=t.document,r=t.document,s=t.DocumentFragment,a=t.HTMLTemplateElement,i=t.Node,l=t.Element,c=t.NodeFilter,d=t.NamedNodeMap,u=void 0===d?t.NamedNodeMap||t.MozNamedAttrMap:d,m=t.HTMLFormElement,g=t.DOMParser,p=t.trustedTypes,h=l.prototype,f=dz(h,"cloneNode"),b=dz(h,"nextSibling"),v=dz(h,"childNodes"),y=dz(h,"parentNode");if("function"==typeof a){var x=r.createElement("template");x.content&&x.content.ownerDocument&&(r=x.content.ownerDocument)}var w=Mz(p,n),S=w?w.createHTML(""):"",k=r,O=k.implementation,C=k.createNodeIterator,_=k.createDocumentFragment,T=k.getElementsByTagName,E=n.importNode,D={};try{D=cz(r).documentMode?r.documentMode:{}}catch(e){}var A={};o.isSupported="function"==typeof y&&O&&void 0!==O.createHTMLDocument&&9!==D;var M,B,F=Sz,I=kz,R=Oz,N=Cz,V=Tz,z=Ez,H=_z,L=null,P=lz({},[].concat(VV(uz),VV(mz),VV(gz),VV(hz),VV(bz))),U=null,W=lz({},[].concat(VV(vz),VV(yz),VV(xz),VV(wz))),j=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),G=null,$=null,q=!0,X=!0,K=!1,Y=!1,J=!1,Z=!1,Q=!1,ee=!1,te=!1,oe=!1,ne=!0,re=!0,se=!1,ae={},ie=null,le=lz({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ce=null,de=lz({},["audio","video","img","source","image","track"]),ue=null,me=lz({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ge="http://www.w3.org/1998/Math/MathML",pe="http://www.w3.org/2000/svg",he="http://www.w3.org/1999/xhtml",fe=he,be=!1,ve=["application/xhtml+xml","text/html"],ye="text/html",xe=null,we=r.createElement("form"),Se=function(e){return e instanceof RegExp||e instanceof Function},ke=function(e){xe&&xe===e||(e&&"object"===FV(e)||(e={}),e=cz(e),L="ALLOWED_TAGS"in e?lz({},e.ALLOWED_TAGS):P,U="ALLOWED_ATTR"in e?lz({},e.ALLOWED_ATTR):W,ue="ADD_URI_SAFE_ATTR"in e?lz(cz(me),e.ADD_URI_SAFE_ATTR):me,ce="ADD_DATA_URI_TAGS"in e?lz(cz(de),e.ADD_DATA_URI_TAGS):de,ie="FORBID_CONTENTS"in e?lz({},e.FORBID_CONTENTS):le,G="FORBID_TAGS"in e?lz({},e.FORBID_TAGS):{},$="FORBID_ATTR"in e?lz({},e.FORBID_ATTR):{},ae="USE_PROFILES"in e&&e.USE_PROFILES,q=!1!==e.ALLOW_ARIA_ATTR,X=!1!==e.ALLOW_DATA_ATTR,K=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Y=e.SAFE_FOR_TEMPLATES||!1,J=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,oe=e.RETURN_TRUSTED_TYPE||!1,Q=e.FORCE_BODY||!1,ne=!1!==e.SANITIZE_DOM,re=!1!==e.KEEP_CONTENT,se=e.IN_PLACE||!1,H=e.ALLOWED_URI_REGEXP||H,fe=e.NAMESPACE||he,e.CUSTOM_ELEMENT_HANDLING&&Se(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(j.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Se(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(j.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(j.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),M=M=-1===ve.indexOf(e.PARSER_MEDIA_TYPE)?ye:e.PARSER_MEDIA_TYPE,B="application/xhtml+xml"===M?function(e){return e}:ez,Y&&(X=!1),te&&(ee=!0),ae&&(L=lz({},VV(bz)),U=[],!0===ae.html&&(lz(L,uz),lz(U,vz)),!0===ae.svg&&(lz(L,mz),lz(U,yz),lz(U,wz)),!0===ae.svgFilters&&(lz(L,gz),lz(U,yz),lz(U,wz)),!0===ae.mathMl&&(lz(L,hz),lz(U,xz),lz(U,wz))),e.ADD_TAGS&&(L===P&&(L=cz(L)),lz(L,e.ADD_TAGS)),e.ADD_ATTR&&(U===W&&(U=cz(U)),lz(U,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&lz(ue,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(ie===le&&(ie=cz(ie)),lz(ie,e.FORBID_CONTENTS)),re&&(L["#text"]=!0),J&&lz(L,["html","head","body"]),L.table&&(lz(L,["tbody"]),delete G.tbody),jV&&jV(e),xe=e)},Oe=lz({},["mi","mo","mn","ms","mtext"]),Ce=lz({},["foreignobject","desc","title","annotation-xml"]),_e=lz({},["title","style","font","a","script"]),Te=lz({},mz);lz(Te,gz),lz(Te,pz);var Ee=lz({},hz);lz(Ee,fz);var De=function(e){var t=y(e);t&&t.tagName||(t={namespaceURI:he,tagName:"template"});var o=ez(e.tagName),n=ez(t.tagName);return e.namespaceURI===pe?t.namespaceURI===he?"svg"===o:t.namespaceURI===ge?"svg"===o&&("annotation-xml"===n||Oe[n]):Boolean(Te[o]):e.namespaceURI===ge?t.namespaceURI===he?"math"===o:t.namespaceURI===pe?"math"===o&&Ce[n]:Boolean(Ee[o]):e.namespaceURI===he&&(!(t.namespaceURI===pe&&!Ce[n])&&(!(t.namespaceURI===ge&&!Oe[n])&&(!Ee[o]&&(_e[o]||!Te[o]))))},Ae=function(e){QV(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=S}catch(t){e.remove()}}},Me=function(e,t){try{QV(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){QV(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!U[e])if(ee||te)try{Ae(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Be=function(e){var t,o;if(Q)e="<remove></remove>"+e;else{var n=tz(e,/^[\r\n\t ]+/);o=n&&n[0]}"application/xhtml+xml"===M&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var s=w?w.createHTML(e):e;if(fe===he)try{t=(new g).parseFromString(s,M)}catch(e){}if(!t||!t.documentElement){t=O.createDocument(fe,"template",null);try{t.documentElement.innerHTML=be?"":s}catch(e){}}var a=t.body||t.documentElement;return e&&o&&a.insertBefore(r.createTextNode(o),a.childNodes[0]||null),fe===he?T.call(t,J?"html":"body")[0]:J?t.documentElement:a},Fe=function(e){return C.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},Ie=function(e){return e instanceof m&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof u)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore)},Re=function(e){return"object"===FV(i)?e instanceof i:e&&"object"===FV(e)&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Ne=function(e,t,n){A[e]&&JV(A[e],(function(e){e.call(o,t,n,xe)}))},Ve=function(e){var t;if(Ne("beforeSanitizeElements",e,null),Ie(e))return Ae(e),!0;if(sz(/[\u0080-\uFFFF]/,e.nodeName))return Ae(e),!0;var n=B(e.nodeName);if(Ne("uponSanitizeElement",e,{tagName:n,allowedTags:L}),e.hasChildNodes()&&!Re(e.firstElementChild)&&(!Re(e.content)||!Re(e.content.firstElementChild))&&sz(/<[/\w]/g,e.innerHTML)&&sz(/<[/\w]/g,e.textContent))return Ae(e),!0;if("select"===n&&sz(/<template/i,e.innerHTML))return Ae(e),!0;if(!L[n]||G[n]){if(!G[n]&&He(n)){if(j.tagNameCheck instanceof RegExp&&sz(j.tagNameCheck,n))return!1;if(j.tagNameCheck instanceof Function&&j.tagNameCheck(n))return!1}if(re&&!ie[n]){var r=y(e)||e.parentNode,s=v(e)||e.childNodes;if(s&&r)for(var a=s.length-1;a>=0;--a)r.insertBefore(f(s[a],!0),b(e))}return Ae(e),!0}return e instanceof l&&!De(e)?(Ae(e),!0):"noscript"!==n&&"noembed"!==n||!sz(/<\/no(script|embed)/i,e.innerHTML)?(Y&&3===e.nodeType&&(t=e.textContent,t=oz(t,F," "),t=oz(t,I," "),e.textContent!==t&&(QV(o.removed,{element:e.cloneNode()}),e.textContent=t)),Ne("afterSanitizeElements",e,null),!1):(Ae(e),!0)},ze=function(e,t,o){if(ne&&("id"===t||"name"===t)&&(o in r||o in we))return!1;if(X&&!$[t]&&sz(R,t));else if(q&&sz(N,t));else if(!U[t]||$[t]){if(!(He(e)&&(j.tagNameCheck instanceof RegExp&&sz(j.tagNameCheck,e)||j.tagNameCheck instanceof Function&&j.tagNameCheck(e))&&(j.attributeNameCheck instanceof RegExp&&sz(j.attributeNameCheck,t)||j.attributeNameCheck instanceof Function&&j.attributeNameCheck(t))||"is"===t&&j.allowCustomizedBuiltInElements&&(j.tagNameCheck instanceof RegExp&&sz(j.tagNameCheck,o)||j.tagNameCheck instanceof Function&&j.tagNameCheck(o))))return!1}else if(ue[t]);else if(sz(H,oz(o,z,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==nz(o,"data:")||!ce[e]){if(K&&!sz(V,oz(o,z,"")));else if(o)return!1}else;return!0},He=function(e){return e.indexOf("-")>0},Le=function(e){var t,o,n,r;Ne("beforeSanitizeAttributes",e,null);var s=e.attributes;if(s){var a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:U};for(r=s.length;r--;){var i=t=s[r],l=i.name,c=i.namespaceURI;o="value"===l?t.value:rz(t.value),n=B(l);var d=o;if(a.attrName=n,a.attrValue=o,a.keepAttr=!0,a.forceKeepAttr=void 0,Ne("uponSanitizeAttribute",e,a),o=a.attrValue,!a.forceKeepAttr)if(a.keepAttr)if(sz(/\/>/i,o))Me(l,e);else{Y&&(o=oz(o,F," "),o=oz(o,I," "));var u=B(e.nodeName);if(ze(u,n,o)){if(o!==d)try{c?e.setAttributeNS(c,l,o):e.setAttribute(l,o)}catch(t){Me(l,e)}}else Me(l,e)}else Me(l,e)}Ne("afterSanitizeAttributes",e,null)}},Pe=function e(t){var o,n=Fe(t);for(Ne("beforeSanitizeShadowDOM",t,null);o=n.nextNode();)Ne("uponSanitizeShadowNode",o,null),Ve(o)||(o.content instanceof s&&e(o.content),Le(o));Ne("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e,r){var a,l,c,d,u;if((be=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Re(e)){if("function"!=typeof e.toString)throw az("toString is not a function");if("string"!=typeof(e=e.toString()))throw az("dirty is not a string, aborting")}if(!o.isSupported){if("object"===FV(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(Re(e))return t.toStaticHTML(e.outerHTML)}return e}if(Z||ke(r),o.removed=[],"string"==typeof e&&(se=!1),se){if(e.nodeName){var m=B(e.nodeName);if(!L[m]||G[m])throw az("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof i)1===(l=(a=Be("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===l.nodeName||"HTML"===l.nodeName?a=l:a.appendChild(l);else{if(!ee&&!Y&&!J&&-1===e.indexOf("<"))return w&&oe?w.createHTML(e):e;if(!(a=Be(e)))return ee?null:oe?S:""}a&&Q&&Ae(a.firstChild);for(var g=Fe(se?e:a);c=g.nextNode();)3===c.nodeType&&c===d||Ve(c)||(c.content instanceof s&&Pe(c.content),Le(c),d=c);if(d=null,se)return e;if(ee){if(te)for(u=_.call(a.ownerDocument);a.firstChild;)u.appendChild(a.firstChild);else u=a;return U.shadowroot&&(u=E.call(n,u,!0)),u}var p=J?a.outerHTML:a.innerHTML;return J&&L["!doctype"]&&a.ownerDocument&&a.ownerDocument.doctype&&a.ownerDocument.doctype.name&&sz(Dz,a.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+a.ownerDocument.doctype.name+">\n"+p),Y&&(p=oz(p,F," "),p=oz(p,I," ")),w&&oe?w.createHTML(p):p},o.setConfig=function(e){ke(e),Z=!0},o.clearConfig=function(){xe=null,Z=!1},o.isValidAttribute=function(e,t,o){xe||ke({});var n=B(e),r=B(t);return ze(n,r,o)},o.addHook=function(e,t){"function"==typeof t&&(A[e]=A[e]||[],QV(A[e],t))},o.removeHook=function(e){if(A[e])return ZV(A[e])},o.removeHooks=function(e){A[e]&&(A[e]=[])},o.removeAllHooks=function(){A={}},o}();const Fz=e=>Bz().sanitize(e),Iz=$f.deviceType.isTouch(),Rz=(e,t)=>({dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[e,t]}),Nz=(e,t)=>yR.parts.close(Ef.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close")}},action:e,buttonBehaviours:Gl([ak.config({})])})),Vz=()=>yR.parts.title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}}),zz=(e,t)=>yR.parts.body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:FA(`<p>${Fz(t.translate(e))}</p>`)}]}]}),Hz=e=>yR.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:e}),Lz=(e,t)=>[QS.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:e}),QS.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:t})],Pz=e=>{const t="tox-dialog",o=t+"-wrap",n=o+"__backdrop",r=t+"__disable-scroll";return yR.sketch({lazySink:e.lazySink,onEscape:t=>(e.onEscape(t),D.some(!0)),useTabstopAt:e=>!o_(e),firstTabstop:e.firstTabstop,dom:{tag:"div",classes:[t].concat(e.extraClasses),styles:{position:"relative",...e.extraStyles}},components:[e.header,e.body,...e.footer.toArray()],parts:{blocker:{dom:FA(`<div class="${o}"></div>`),components:[{dom:{tag:"div",classes:Iz?[n,n+"--opaque"]:[n]}}]}},dragBlockClass:o,modalBehaviours:Gl([zh.config({}),Fh("dialog-events",e.dialogEvents.concat([sa(rs(),((e,t)=>{kh.focusIn(e)}))])),Fh("scroll-lock",[aa((()=>{ei(yt(),r)})),ia((()=>{ti(yt(),r)}))]),...e.extraBehaviours]),eventOrder:{[ws()]:["dialog-events"],[Bs()]:["scroll-lock","dialog-events","alloy.base.behaviour"],[Fs()]:["alloy.base.behaviour","dialog-events","scroll-lock"],...e.eventOrder}})},Uz=e=>Ef.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":e.translate("Close"),title:e.translate("Close")}},buttonBehaviours:Gl([ak.config({})]),components:[Hf("close",{tag:"div",classes:["tox-icon"]},e.icons)],action:e=>{Ws(e,pk)}}),Wz=(e,t,o,n)=>({dom:{tag:"div",classes:["tox-dialog__title"],attributes:{...o.map((e=>({id:e}))).getOr({})}},components:[],behaviours:Gl([aV.config({channel:`${EV}-${t}`,initialData:e,renderComponents:e=>[xi(n.translate(e.title))]})])}),jz=()=>({dom:FA('<div class="tox-dialog__draghandle"></div>')}),Gz=(e,t,o)=>((e,t,o)=>{const n=yR.parts.title(Wz(e,t,D.none(),o)),r=yR.parts.draghandle(jz()),s=yR.parts.close(Uz(o)),a=[n].concat(e.draggable?[r]:[]).concat([s]);return QS.sketch({dom:FA('<div class="tox-dialog__header"></div>'),components:a})})({title:o.shared.providers.translate(e),draggable:o.dialog.isDraggableModal()},t,o.shared.providers),$z=(e,t,o)=>({dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":o.translate(e)},styles:{left:"0px",right:"0px",bottom:"0px",top:"0px",position:"absolute"}},behaviours:t,components:[{dom:FA('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}),qz=(e,t,o)=>({onClose:()=>o.closeWindow(),onBlock:o=>{yR.setBusy(e(),((e,n)=>$z(o.message,n,t)))},onUnblock:()=>{yR.setIdle(e())}}),Xz=(e,t,o,n)=>Oi(Pz({...e,firstTabstop:1,lazySink:n.shared.getSink,extraBehaviours:[aV.config({channel:`${TV}-${e.id}`,updateState:(e,t)=>D.some(t),initialData:t}),jC({}),...e.extraBehaviours],onEscape:e=>{Ws(e,pk)},dialogEvents:o,eventOrder:{[xs()]:[aV.name(),Jl.name()],[Bs()]:["scroll-lock",aV.name(),"messages","dialog-events","alloy.base.behaviour"],[Fs()]:["alloy.base.behaviour","dialog-events","messages",aV.name(),"scroll-lock"]}})),Kz=(e,t={})=>H(e,(e=>"menu"===e.type?(e=>{const o=H(e.items,(e=>{const o=be(t,e.name).getOr(Rr(!1));return{...e,storage:o}}));return{...e,items:o}})(e):e)),Yz=e=>j(e,((e,t)=>{if("menu"===t.type){return j(t.items,((e,t)=>(e[t.name]=t.storage,e)),e)}return e}),{}),Jz=(e,t)=>[oa(rs(),t_),e(gk,((e,o,n,r)=>{oc(gt(r.element)).fold(b,ec),t.onClose(),o.onClose()})),e(pk,((e,t,o,n)=>{t.onCancel(e),Ws(n,gk)})),Zs(vk,((e,o)=>t.onUnblock())),Zs(bk,((e,o)=>t.onBlock(o.event)))],Zz=(e,t)=>{const o=(t,o)=>Zs(t,((t,r)=>{n(t,((n,s)=>{o(e(),n,r.event,t)}))})),n=(e,t)=>{aV.getState(e).get().each((o=>{t(o,e)}))};return[...Jz(o,t),o(hk,((e,t,o)=>{t.onAction(e,{name:o.name})}))]},Qz=(e,t,o)=>{const n=(t,o)=>Zs(t,((t,n)=>{r(t,((r,s)=>{o(e(),r,n.event,t)}))})),r=(e,t)=>{aV.getState(e).get().each((o=>{t(o.internalDialog,e)}))};return[...Jz(n,t),n(fk,((e,t)=>t.onSubmit(e))),n(mk,((e,t,o)=>{t.onChange(e,{name:o.name})})),n(hk,((e,t,n,r)=>{const s=()=>kh.focusIn(r),a=e=>_t(e,"disabled")||Ct(e,"aria-disabled").exists((e=>"true"===e)),i=gt(r.element),l=oc(i);t.onAction(e,{name:n.name,value:n.value}),oc(i).fold(s,(e=>{a(e)||l.exists((t=>Je(e,t)&&a(t)))?s():o().toOptional().filter((t=>!Je(t.element,e))).each(s)}))})),n(yk,((e,t,o)=>{t.onTabChange(e,{newTabName:o.name,oldTabName:o.oldName})})),ia((t=>{const o=e();qu.setValue(t,o.getData())}))]},eH=(e,t)=>{const o=t.map((e=>e.footerButtons)).getOr([]),n=P(o,(e=>"start"===e.align)),r=(e,t)=>QS.sketch({dom:{tag:"div",classes:[`tox-dialog__footer-${e}`]},components:H(t,(e=>e.memento.asSpec()))});return[r("start",n.pass),r("end",n.fail)]},tH=(e,t,o)=>({dom:FA('<div class="tox-dialog__footer"></div>'),components:[],behaviours:Gl([aV.config({channel:`${AV}-${t}`,initialData:e,updateState:(e,t)=>{const n=H(t.buttons,(e=>{const t=Df(((e,t)=>MT(e,e.type,t))(e,o));return{name:e.name,align:e.align,memento:t}}));return D.some({lookupByName:t=>((e,t,o)=>G(t,(e=>e.name===o)).bind((t=>t.memento.getOpt(e))))(e,n,t),footerButtons:n})},renderComponents:eH})])}),oH=(e,t,o)=>yR.parts.footer(tH(e,t,o)),nH=(e,t)=>{if(e.getRoot().getSystem().isConnected()){const o=og.getCurrent(e.getFormWrapper()).getOr(e.getFormWrapper());return _C.getField(o,t).orThunk((()=>{const o=e.getFooter();return aV.getState(o).get().bind((e=>e.lookupByName(t)))}))}return D.none()},rH=(e,t,o)=>{const n=t=>{const o=e.getRoot();o.getSystem().isConnected()&&t(o)},r={getData:()=>{const t=e.getRoot(),n=t.getSystem().isConnected()?e.getFormWrapper():t;return{...qu.getValue(n),...ce(o,(e=>e.get()))}},setData:t=>{n((n=>{const s=r.getData(),a=xn(s,t),i=((e,t)=>{const o=e.getRoot();return aV.getState(o).get().map((e=>tr(er("data",e.dataValidator,t)))).getOr(t)})(e,a),l=e.getFormWrapper();qu.setValue(l,i),le(o,((e,t)=>{ve(a,t)&&e.set(a[t])}))}))},setEnabled:(t,o)=>{nH(e,t).each(o?fg.enable:fg.disable)},focus:t=>{nH(e,t).each(zh.focus)},block:e=>{if(!s(e))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");n((t=>{js(t,bk,{message:e})}))},unblock:()=>{n((e=>{Ws(e,vk)}))},showTab:t=>{n((o=>{const n=e.getBody();aV.getState(n).get().exists((e=>e.isTabPanel()))&&og.getCurrent(n).each((e=>{yV.showTab(e,t)}))}))},redial:s=>{n((n=>{const a=e.getId(),i=t(s),l=Kz(i.internalDialog.buttons,o);n.getSystem().broadcastOn([`${TV}-${a}`],i),n.getSystem().broadcastOn([`${EV}-${a}`],i.internalDialog),n.getSystem().broadcastOn([`${DV}-${a}`],i.internalDialog),n.getSystem().broadcastOn([`${AV}-${a}`],{...i.internalDialog,buttons:l}),r.setData(i.initialData)}))},close:()=>{n((e=>{Ws(e,gk)}))},toggleFullscreen:e.toggleFullscreen};return r},sH=(e,t,o)=>{const n=va("dialog"),r=e.internalDialog,s=Gz(r.title,n,o),a=((e,t,o)=>{const n=BV(e,t,D.none(),o,!1);return yR.parts.body(n)})({body:r.body,initialData:r.initialData},n,o),i=Kz(r.buttons),l=Yz(i),c=oH({buttons:i},n,o),d=Qz((()=>h),qz((()=>g),o.shared.providers,t),o.shared.getSink),u=(e=>{switch(e){case"large":return["tox-dialog--width-lg"];case"medium":return["tox-dialog--width-md"];default:return[]}})(r.size),m={id:n,header:s,body:a,footer:D.some(c),extraClasses:u,extraBehaviours:[],extraStyles:{}},g=Xz(m,e,d,o),p={getId:x(n),getRoot:x(g),getBody:()=>yR.getBody(g),getFooter:()=>yR.getFooter(g),getFormWrapper:()=>{const e=yR.getBody(g);return og.getCurrent(e).getOr(e)},toggleFullscreen:()=>{const e="tox-dialog--fullscreen",t=Ie.fromDom(g.element.dom);oi(t,e)?(ti(t,e),ni(t,u)):(ri(t,u),ei(t,e))}},h=rH(p,t.redial,l);return{dialog:g,instanceApi:h}},aH=(e,t,o,n)=>{const r=va("dialog"),s=va("dialog-label"),a=va("dialog-content"),i=e.internalDialog,l=Df(((e,t,o,n)=>QS.sketch({dom:FA('<div class="tox-dialog__header"></div>'),components:[Wz(e,t,D.some(o),n),jz(),Uz(n)],containerBehaviours:Gl([nR.config({mode:"mouse",blockerClass:"blocker",getTarget:e=>Fi(e,'[role="dialog"]').getOrDie(),snaps:{getSnapPoints:()=>[],leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])}))({title:i.title,draggable:!0},r,s,o.shared.providers)),c=Df(((e,t,o,n,r)=>BV(e,t,D.some(o),n,r))({body:i.body,initialData:i.initialData},r,a,o,n)),d=Kz(i.buttons),u=Yz(d),m=Df(((e,t,o)=>tH(e,t,o))({buttons:d},r,o)),g=Qz((()=>f),{onBlock:e=>{BA.block(h,((t,n)=>$z(e.message,n,o.shared.providers)))},onUnblock:()=>{BA.unblock(h)},onClose:()=>t.closeWindow()},o.shared.getSink),p="tox-dialog-inline",h=Oi({dom:{tag:"div",classes:["tox-dialog",p],attributes:{role:"dialog","aria-labelledby":s,"aria-describedby":a}},eventOrder:{[xs()]:[aV.name(),Jl.name()],[ws()]:["execute-on-form"],[Bs()]:["reflecting","execute-on-form"]},behaviours:Gl([kh.config({mode:"cyclic",onEscape:e=>(Ws(e,gk),D.some(!0)),useTabstopAt:e=>!o_(e)&&("button"!==Le(e)||"disabled"!==Ot(e,"disabled")),firstTabstop:1}),aV.config({channel:`${TV}-${r}`,updateState:(e,t)=>D.some(t),initialData:e}),zh.config({}),Fh("execute-on-form",g.concat([sa(rs(),((e,t)=>{kh.focusIn(e)}))])),BA.config({getRoot:()=>D.some(h)}),Bh.config({}),jC({})]),components:[l.asSpec(),c.asSpec(),m.asSpec()]}),f=rH({getId:x(r),getRoot:x(h),getFooter:()=>m.get(h),getBody:()=>c.get(h),getFormWrapper:()=>{const e=c.get(h);return og.getCurrent(e).getOr(e)},toggleFullscreen:()=>{const e="tox-dialog--fullscreen",t=Ie.fromDom(h.element.dom);si(t,[e])?(ri(t,[e]),ni(t,[p])):(ri(t,[p]),ni(t,[e]))}},t.redial,u);return{dialog:h,instanceApi:f}};var iH=tinymce.util.Tools.resolve("tinymce.util.URI");const lH=["insertContent","setContent","execCommand","close","block","unblock"],cH=e=>a(e)&&-1!==lH.indexOf(e.mceAction),dH=(e,t,o,n)=>{const r=va("dialog"),i=Gz(e.title,r,n),l=(e=>{const t={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[QC({dom:{tag:"iframe",attributes:{src:e.url}},behaviours:Gl([ak.config({}),zh.config({})])})]}],behaviours:Gl([kh.config({mode:"acyclic",useTabstopAt:O(o_)})])};return yR.parts.body(t)})(e),c=e.buttons.bind((e=>0===e.length?D.none():D.some(oH({buttons:e},r,n)))),u=Zz((()=>x),qz((()=>y),n.shared.providers,t)),m={...e.height.fold((()=>({})),(e=>({height:e+"px","max-height":e+"px"}))),...e.width.fold((()=>({})),(e=>({width:e+"px","max-width":e+"px"})))},p=e.width.isNone()&&e.height.isNone()?["tox-dialog--width-lg"]:[],h=new iH(e.url,{base_uri:new iH(window.location.href)}),f=`${h.protocol}://${h.host}${h.port?":"+h.port:""}`,b=wc(),v=[Fh("messages",[aa((()=>{const t=Oc(Ie.fromDom(window),"message",(t=>{if(h.isSameOrigin(new iH(t.raw.origin))){const n=t.raw.data;cH(n)?((e,t,o)=>{switch(o.mceAction){case"insertContent":e.insertContent(o.content);break;case"setContent":e.setContent(o.content);break;case"execCommand":const n=!!d(o.ui)&&o.ui;e.execCommand(o.cmd,n,o.value);break;case"close":t.close();break;case"block":t.block(o.message);break;case"unblock":t.unblock()}})(o,x,n):(e=>!cH(e)&&a(e)&&ve(e,"mceAction"))(n)&&e.onMessage(x,n)}}));b.set(t)})),ia(b.clear)]),Jl.config({channels:{[MV]:{onReceive:(e,t)=>{Bi(e.element,"iframe").each((e=>{const o=e.dom.contentWindow;g(o)&&o.postMessage(t,f)}))}}}})],y=Xz({id:r,header:i,body:l,footer:c,extraClasses:p,extraBehaviours:v,extraStyles:m},e,u,n),x=(e=>{const t=t=>{e.getSystem().isConnected()&&t(e)};return{block:e=>{if(!s(e))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");t((t=>{js(t,bk,{message:e})}))},unblock:()=>{t((e=>{Ws(e,vk)}))},close:()=>{t((e=>{Ws(e,gk)}))},sendMessage:e=>{t((t=>{t.getSystem().broadcastOn([MV],e)}))}}})(y);return{dialog:y,instanceApi:x}},uH=(e,t,o)=>t&&o?[]:[QD.config({contextual:{lazyContext:()=>D.some(Xo(Ie.fromDom(e.getContentAreaContainer()))),fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"],lazyViewport:t=>zS(e,t.element).map((e=>({bounds:HS(e),optScrollEnv:D.some({currentScrollTop:e.element.dom.scrollTop,scrollElmTop:qt(e.element).top})}))).getOrThunk((()=>({bounds:Jo(),optScrollEnv:D.none()})))})],mH=e=>{const t=e.editor,o=jb(t),n=(e=>{const t=e.shared;return{open:(o,n)=>{const r=()=>{yR.hide(l),n()},s=Df(MT({name:"close-alert",text:"OK",primary:!0,buttonType:D.some("primary"),align:"end",enabled:!0,icon:D.none()},"cancel",e)),a=Vz(),i=Nz(r,t.providers),l=Oi(Pz({lazySink:()=>t.getSink(),header:Rz(a,i),body:zz(o,t.providers),footer:D.some(Hz(Lz([],[s.asSpec()]))),onEscape:r,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Zs(pk,r)],eventOrder:{}}));yR.show(l);const c=s.get(l);zh.focus(c)}}})(e.backstages.dialog),r=(e=>{const t=e.shared;return{open:(o,n)=>{const r=e=>{yR.hide(c),n(e)},s=Df(MT({name:"yes",text:"Yes",primary:!0,buttonType:D.some("primary"),align:"end",enabled:!0,icon:D.none()},"submit",e)),a=MT({name:"no",text:"No",primary:!1,buttonType:D.some("secondary"),align:"end",enabled:!0,icon:D.none()},"cancel",e),i=Vz(),l=Nz((()=>r(!1)),t.providers),c=Oi(Pz({lazySink:()=>t.getSink(),header:Rz(i,l),body:zz(o,t.providers),footer:D.some(Hz(Lz([],[a,s.asSpec()]))),onEscape:()=>r(!1),extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Zs(pk,(()=>r(!1))),Zs(fk,(()=>r(!0)))],eventOrder:{}}));yR.show(c);const d=s.get(c);zh.focus(d)}}})(e.backstages.dialog),s=(o,n)=>oV.openUrl((o=>{const r=dH(o,{closeWindow:()=>{yR.hide(r.dialog),n(r.instanceApi)}},t,e.backstages.dialog);return yR.show(r.dialog),r.instanceApi}),o),a=(t,o)=>oV.open(((t,n,r)=>{const s=n,a=sH({dataValidator:r,initialData:s,internalDialog:t},{redial:oV.redial,closeWindow:()=>{yR.hide(a.dialog),o(a.instanceApi)}},e.backstages.dialog);return yR.show(a.dialog),a.instanceApi.setData(s),a.instanceApi}),t),i=(n,r,s,a=!1)=>oV.open(((n,i,l)=>{const c=tr(er("data",l,i));const d=Sc(),u=e.backstages.popup.shared.header.isPositionedAtTop(),m=()=>d.on((e=>{_f.reposition(e),QD.refresh(e)})),g=aH({dataValidator:l,initialData:c,internalDialog:n},{redial:oV.redial,closeWindow:()=>{d.on(_f.hide),t.off("ResizeEditor",m),d.clear(),s(g.instanceApi)}},e.backstages.popup,a),p=Oi(_f.sketch({lazySink:e.backstages.popup.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{},...u?{}:{fireRepositionEventInstead:{}},inlineBehaviours:Gl([Fh("window-manager-inline-events",[Zs(Is(),((e,t)=>{Ws(g.dialog,pk)}))]),...uH(t,o,u)]),isExtraPart:(e,t)=>(e=>LS(e,".tox-alert-dialog")||LS(e,".tox-confirm-dialog"))(t)}));d.set(p);return _f.showWithinBounds(p,Ci(g.dialog),{anchor:r},(()=>{const e=t.inline?yt():Ie.fromDom(t.getContainer()),o=Xo(e);return D.some(o)})),o&&u||(QD.refresh(p),t.on("ResizeEditor",m)),g.instanceApi.setData(c),kh.focusIn(g.dialog),g.instanceApi}),n);return{open:(t,o,n)=>void 0!==o&&"toolbar"===o.inline?i(t,e.backstages.popup.shared.anchors.inlineDialog(),n,o.ariaAttrs):void 0!==o&&"cursor"===o.inline?i(t,e.backstages.popup.shared.anchors.cursor(),n,o.ariaAttrs):a(t,n),openUrl:(e,t)=>s(e,t),alert:(e,t)=>{n.open(e,t)},close:e=>{e.close()},confirm:(e,t)=>{r.open(e,t)}}},gH=e=>{Kf(e),(e=>{const t=e.options.register,o=e=>f(e,s)?{value:vw(e),valid:!0}:{valid:!1,message:"Must be an array of strings."};t("color_map",{processor:o,default:["#BFEDD2","Light Green","#FBEEB8","Light Yellow","#F8CAC6","Light Red","#ECCAFA","Light Purple","#C2E0F4","Light Blue","#2DC26B","Green","#F1C40F","Yellow","#E03E2D","Red","#B96AD9","Purple","#3598DB","Blue","#169179","Dark Turquoise","#E67E23","Orange","#BA372A","Dark Red","#843FA1","Dark Purple","#236FA1","Dark Blue","#ECF0F1","Light Gray","#CED4D9","Medium Gray","#95A5A6","Gray","#7E8C8D","Dark Gray","#34495E","Navy Blue","#000000","Black","#ffffff","White"]}),t("color_map_background",{processor:o}),t("color_map_foreground",{processor:o}),t("color_cols",{processor:"number",default:fw(kw(e,"default").length)}),t("color_cols_foreground",{processor:"number",default:bw(e,kw(e,pw).length)}),t("color_cols_background",{processor:"number",default:bw(e,kw(e,hw).length)}),t("custom_colors",{processor:"boolean",default:!0}),t("color_default_foreground",{processor:"string",default:xw}),t("color_default_background",{processor:"string",default:xw})})(e),(e=>{const t=e.options.register;t("contextmenu_avoid_overlap",{processor:"string",default:""}),t("contextmenu_never_use_native",{processor:"boolean",default:!1}),t("contextmenu",{processor:e=>!1===e?{value:[],valid:!0}:s(e)||f(e,s)?{value:$F(e),valid:!0}:{valid:!1,message:"Must be false or a string."},default:"link linkchecker image editimage table spellchecker configurepermanentpen"})})(e)};Zo.add("silver",(e=>{gH(e);let t=()=>Jo();const{dialogs:o,popups:n,renderUI:r}=hR(e,{getPopupSinkBounds:()=>t()});RS(e,n.backstage.shared);const s=mH({editor:e,backstages:{popup:n.backstage,dialog:o.backstage}});return{renderUI:async()=>{const o=await r();return zS(e,n.getMothership().element).each((e=>{t=()=>HS(e)})),o},getWindowManagerImpl:x(s),getNotificationManagerImpl:()=>((e,t,o)=>{const n=t.backstage.shared,r=()=>{const t=Xo(Ie.fromDom(e.getContentAreaContainer())),o=Jo(),n=fl(o.x,t.x,t.right),r=fl(o.y,t.y,t.bottom),s=Math.max(t.right,o.right),a=Math.max(t.bottom,o.bottom);return D.some(qo(n,r,s-n,a-r))};return{open:(t,s)=>{const a=()=>{s(),_f.hide(l)},i=Oi(Pf.sketch({text:t.text,level:R(["success","error","warning","warn","info"],t.type)?t.type:void 0,progress:!0===t.progressBar,icon:t.icon,closeButton:t.closeButton,onAction:a,iconProvider:n.providers.icons,translationProvider:n.providers.translate})),l=Oi(_f.sketch({dom:{tag:"div",classes:["tox-notifications-container"]},lazySink:n.getSink,fireDismissalEventInstead:{},...n.header.isPositionedAtTop()?{}:{fireRepositionEventInstead:{}}}));o.add(l),h(t.timeout)&&t.timeout>0&&Tf.setEditorTimeout(e,(()=>{a()}),t.timeout);const c={close:a,reposition:()=>{const t=Ci(i),o={maxHeightFunction:Nc()},s=e.notificationManager.getNotifications();if(s[0]===c){const e={...n.anchors.banner(),overrides:o};_f.showWithinBounds(l,t,{anchor:e},r)}else I(s,c).each((e=>{const n=s[e-1].getEl(),a={type:"node",root:yt(),node:D.some(Ie.fromDom(n)),overrides:o,layouts:{onRtl:()=>[Al],onLtr:()=>[Al]}};_f.showWithinBounds(l,t,{anchor:a},r)}))},text:e=>{Pf.updateText(i,e)},settings:t,getEl:()=>i.element.dom,progressBar:{value:e=>{Pf.updateProgress(i,e)}}};return c},close:e=>{e.close()},getArgs:e=>e.settings}})(e,{backstage:n.backstage},n.getMothership())}}))}()})); ;/*!node_modules/tinymce/themes/silver/index.js*/ amis.define("937ccb0",(function(b,c,f,i){b("28a3fbb")})); ;/*!node_modules/tinymce/models/dom/model.js*/ amis.define("58387fd",(function(e,t,o,n){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.ModelManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=r=e,n=(s=String).prototype,n.isPrototypeOf(o)||(null===(l=r.constructor)||void 0===l?void 0:l.name)===s.name)?"string":t;var o,n;var r,s,l})(t)===e,o=e=>t=>typeof t===e,n=e=>t=>e===t,r=t("string"),s=t("object"),l=t("array"),a=n(null),c=o("boolean"),i=n(void 0),m=e=>!(e=>null==e)(e),d=o("function"),u=o("number"),f=()=>{},g=e=>()=>e,h=e=>e,p=(e,t)=>e===t;function b(e,...t){return(...o)=>{const n=t.concat(o);return e.apply(null,n)}}const w=e=>t=>!e(t),v=e=>e(),y=g(!1),C=g(!0);class x{constructor(e,t){this.tag=e,this.value=t}static some(e){return new x(!0,e)}static none(){return x.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?x.some(e(this.value)):x.none()}bind(e){return this.tag?e(this.value):x.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:x.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return m(e)?x.some(e):x.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}x.singletonNone=new x(!1);const T=Array.prototype.slice,S=Array.prototype.indexOf,R=Array.prototype.push,D=(e,t)=>{return o=e,n=t,S.call(o,n)>-1;var o,n},O=(e,t)=>{for(let o=0,n=e.length;o<n;o++){if(t(e[o],o))return!0}return!1},k=(e,t)=>{const o=[];for(let n=0;n<e;n++)o.push(t(n));return o},E=(e,t)=>{const o=e.length,n=new Array(o);for(let r=0;r<o;r++){const o=e[r];n[r]=t(o,r)}return n},N=(e,t)=>{for(let o=0,n=e.length;o<n;o++){t(e[o],o)}},A=(e,t)=>{const o=[],n=[];for(let r=0,s=e.length;r<s;r++){const s=e[r];(t(s,r)?o:n).push(s)}return{pass:o,fail:n}},B=(e,t)=>{const o=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t(r,n)&&o.push(r)}return o},j=(e,t,o)=>(((e,t)=>{for(let o=e.length-1;o>=0;o--)t(e[o],o)})(e,((e,n)=>{o=t(o,e,n)})),o),z=(e,t,o)=>(N(e,((e,n)=>{o=t(o,e,n)})),o),L=(e,t)=>((e,t,o)=>{for(let n=0,r=e.length;n<r;n++){const r=e[n];if(t(r,n))return x.some(r);if(o(r,n))break}return x.none()})(e,t,y),W=(e,t)=>{for(let o=0,n=e.length;o<n;o++){if(t(e[o],o))return x.some(o)}return x.none()},M=e=>{const t=[];for(let o=0,n=e.length;o<n;++o){if(!l(e[o]))throw new Error("Arr.flatten item "+o+" was not an array, input: "+e);R.apply(t,e[o])}return t},_=(e,t)=>M(E(e,t)),I=(e,t)=>{for(let o=0,n=e.length;o<n;++o){if(!0!==t(e[o],o))return!1}return!0},P=(e,t)=>{const o={};for(let n=0,r=e.length;n<r;n++){const r=e[n];o[String(r)]=t(r,n)}return o},F=(e,t)=>t>=0&&t<e.length?x.some(e[t]):x.none(),H=e=>F(e,0),$=e=>F(e,e.length-1),V=(e,t)=>{for(let o=0;o<e.length;o++){const n=t(e[o],o);if(n.isSome())return n}return x.none()},q=Object.keys,U=Object.hasOwnProperty,G=(e,t)=>{const o=q(e);for(let n=0,r=o.length;n<r;n++){const r=o[n];t(e[r],r)}},K=(e,t)=>Y(e,((e,o)=>({k:o,v:t(e,o)}))),Y=(e,t)=>{const o={};return G(e,((e,n)=>{const r=t(e,n);o[r.k]=r.v})),o},J=(e,t)=>{const o={};return((e,t,o,n)=>{G(e,((e,r)=>{(t(e,r)?o:n)(e,r)}))})(e,t,(e=>(t,o)=>{e[o]=t})(o),f),o},Q=(e,t)=>{const o=[];return G(e,((e,n)=>{o.push(t(e,n))})),o},X=e=>Q(e,h),Z=(e,t)=>U.call(e,t),ee="undefined"!=typeof window?window:Function("return this;")(),te=(e,t)=>((e,t)=>{let o=null!=t?t:ee;for(let t=0;t<e.length&&null!=o;++t)o=o[e[t]];return o})(e.split("."),t),oe=(e,t)=>{const o=((e,t)=>te(e,t))(e,t);if(null==o)throw new Error(e+" not available on this browser");return o},ne=Object.getPrototypeOf,re=e=>{const t=te("ownerDocument.defaultView",e);return s(e)&&((e=>oe("HTMLElement",e))(t).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(ne(e).constructor.name))},se=e=>e.dom.nodeName.toLowerCase(),le=e=>e.dom.nodeType,ae=e=>t=>le(t)===e,ce=e=>8===le(e)||"#comment"===se(e),ie=e=>me(e)&&re(e.dom),me=ae(1),de=ae(3),ue=ae(9),fe=ae(11),ge=e=>t=>me(t)&&se(t)===e,he=(e,t,o)=>{if(!(r(o)||c(o)||u(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")},pe=(e,t,o)=>{he(e.dom,t,o)},be=(e,t)=>{const o=e.dom;G(t,((e,t)=>{he(o,t,e)}))},we=(e,t)=>{const o=e.dom.getAttribute(t);return null===o?void 0:o},ve=(e,t)=>x.from(we(e,t)),ye=(e,t)=>{e.dom.removeAttribute(t)},Ce=e=>z(e.dom.attributes,((e,t)=>(e[t.name]=t.value,e)),{}),xe=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},Te={fromHtml:(e,t)=>{const o=(t||document).createElement("div");if(o.innerHTML=e,!o.hasChildNodes()||o.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return xe(o.childNodes[0])},fromTag:(e,t)=>{const o=(t||document).createElement(e);return xe(o)},fromText:(e,t)=>{const o=(t||document).createTextNode(e);return xe(o)},fromDom:xe,fromPoint:(e,t,o)=>x.from(e.dom.elementFromPoint(t,o)).map(xe)},Se=(e,t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},Re=e=>1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount,De=(e,t)=>{const o=void 0===t?document:t.dom;return Re(o)?x.none():x.from(o.querySelector(e)).map(Te.fromDom)},Oe=(e,t)=>e.dom===t.dom,ke=(e,t)=>{const o=e.dom,n=t.dom;return o!==n&&o.contains(n)},Ee=Se,Ne=e=>Te.fromDom(e.dom.ownerDocument),Ae=e=>ue(e)?e:Ne(e),Be=e=>x.from(e.dom.parentNode).map(Te.fromDom),je=e=>x.from(e.dom.parentElement).map(Te.fromDom),ze=(e,t)=>{const o=d(t)?t:y;let n=e.dom;const r=[];for(;null!==n.parentNode&&void 0!==n.parentNode;){const e=n.parentNode,t=Te.fromDom(e);if(r.push(t),!0===o(t))break;n=e}return r},Le=e=>x.from(e.dom.previousSibling).map(Te.fromDom),We=e=>x.from(e.dom.nextSibling).map(Te.fromDom),Me=e=>E(e.dom.childNodes,Te.fromDom),_e=(e,t)=>{const o=e.dom.childNodes;return x.from(o[t]).map(Te.fromDom)},Ie=(e,t)=>{Be(e).each((o=>{o.dom.insertBefore(t.dom,e.dom)}))},Pe=(e,t)=>{We(e).fold((()=>{Be(e).each((e=>{He(e,t)}))}),(e=>{Ie(e,t)}))},Fe=(e,t)=>{const o=(e=>_e(e,0))(e);o.fold((()=>{He(e,t)}),(o=>{e.dom.insertBefore(t.dom,o.dom)}))},He=(e,t)=>{e.dom.appendChild(t.dom)},$e=(e,t)=>{Ie(e,t),He(t,e)},Ve=(e,t)=>{N(t,((o,n)=>{const r=0===n?e:t[n-1];Pe(r,o)}))},qe=(e,t)=>{N(t,(t=>{He(e,t)}))},Ue=e=>{e.dom.textContent="",N(Me(e),(e=>{Ge(e)}))},Ge=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Ke=e=>{const t=Me(e);t.length>0&&Ve(e,t),Ge(e)},Ye=(e,t)=>Te.fromDom(e.dom.cloneNode(t)),Je=e=>Ye(e,!1),Qe=e=>Ye(e,!0),Xe=(e,t)=>{const o=Te.fromTag(t),n=Ce(e);return be(o,n),o},Ze=["tfoot","thead","tbody","colgroup"],et=(e,t,o)=>({element:e,rowspan:t,colspan:o}),tt=(e,t,o)=>({element:e,cells:t,section:o}),ot=(e,t,o)=>({element:e,isNew:t,isLocked:o}),nt=(e,t,o,n)=>({element:e,cells:t,section:o,isNew:n}),rt=d(Element.prototype.attachShadow)&&d(Node.prototype.getRootNode),st=g(rt),lt=rt?e=>Te.fromDom(e.dom.getRootNode()):Ae,at=e=>{const t=lt(e);return fe(o=t)&&m(o.dom.host)?x.some(t):x.none();var o},ct=e=>Te.fromDom(e.dom.host),it=e=>m(e.dom.shadowRoot),mt=e=>{const t=de(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const o=t.ownerDocument;return at(Te.fromDom(t)).fold((()=>o.body.contains(t)),(n=mt,r=ct,e=>n(r(e))));var n,r},dt=e=>{const t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return Te.fromDom(t)},ut=(e,t)=>{let o=[];return N(Me(e),(e=>{t(e)&&(o=o.concat([e])),o=o.concat(ut(e,t))})),o},ft=(e,t,o)=>((e,t,o)=>B(ze(e,o),t))(e,(e=>Se(e,t)),o),gt=(e,t)=>((e,t)=>B(Me(e),t))(e,(e=>Se(e,t))),ht=(e,t)=>((e,t)=>{const o=void 0===t?document:t.dom;return Re(o)?[]:E(o.querySelectorAll(e),Te.fromDom)})(t,e);var pt=(e,t,o,n,r)=>e(o,n)?x.some(o):d(r)&&r(o)?x.none():t(o,n,r);const bt=(e,t,o)=>{let n=e.dom;const r=d(o)?o:y;for(;n.parentNode;){n=n.parentNode;const e=Te.fromDom(n);if(t(e))return x.some(e);if(r(e))break}return x.none()},wt=(e,t,o)=>pt(((e,t)=>t(e)),bt,e,t,o),vt=(e,t,o)=>bt(e,(e=>Se(e,t)),o),yt=(e,t)=>((e,t)=>L(e.dom.childNodes,(e=>t(Te.fromDom(e)))).map(Te.fromDom))(e,(e=>Se(e,t))),Ct=(e,t)=>De(t,e),xt=(e,t,o)=>pt(((e,t)=>Se(e,t)),vt,e,t,o),Tt=(e,t,o=p)=>e.exists((e=>o(e,t))),St=e=>{const t=[],o=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(o);return t},Rt=(e,t)=>e?x.some(t):x.none(),Dt=(e,t,o)=>""===t||e.length>=t.length&&e.substr(o,o+t.length)===t,Ot=(e,t,o=0,n)=>{const r=e.indexOf(t,o);return-1!==r&&(!!i(n)||r+t.length<=n)},kt=(e,t)=>Dt(e,t,0),Et=(e,t)=>Dt(e,t,e.length-t.length),Nt=(e=>t=>t.replace(e,""))(/^\s+|\s+$/g),At=e=>e.length>0,Bt=e=>void 0!==e.style&&d(e.style.getPropertyValue),jt=(e,t,o)=>{if(!r(o))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);Bt(e)&&e.style.setProperty(t,o)},zt=(e,t,o)=>{const n=e.dom;jt(n,t,o)},Lt=(e,t)=>{const o=e.dom;G(t,((e,t)=>{jt(o,t,e)}))},Wt=(e,t)=>{const o=e.dom,n=window.getComputedStyle(o).getPropertyValue(t);return""!==n||mt(e)?n:Mt(o,t)},Mt=(e,t)=>Bt(e)?e.style.getPropertyValue(t):"",_t=(e,t)=>{const o=e.dom,n=Mt(o,t);return x.from(n).filter((e=>e.length>0))},It=(e,t)=>{((e,t)=>{Bt(e)&&e.style.removeProperty(t)})(e.dom,t),Tt(ve(e,"style").map(Nt),"")&&ye(e,"style")},Pt=(e,t,o=0)=>ve(e,t).map((e=>parseInt(e,10))).getOr(o),Ft=(e,t)=>Pt(e,t,1),Ht=e=>ge("col")(e)?Pt(e,"span",1)>1:Ft(e,"colspan")>1,$t=e=>Ft(e,"rowspan")>1,Vt=(e,t)=>parseInt(Wt(e,t),10),qt=g(10),Ut=g(10),Gt=(e,t)=>Kt(e,t,C),Kt=(e,t,o)=>_(Me(e),(e=>Se(e,t)?o(e)?[e]:[]:Kt(e,t,o))),Yt=(e,t)=>((e,t,o=y)=>o(t)?x.none():D(e,se(t))?x.some(t):vt(t,e.join(","),(e=>Se(e,"table")||o(e))))(["td","th"],e,t),Jt=e=>Gt(e,"th,td"),Qt=e=>Se(e,"colgroup")?gt(e,"col"):_(eo(e),(e=>gt(e,"col"))),Xt=(e,t)=>xt(e,"table",t),Zt=e=>Gt(e,"tr"),eo=e=>Xt(e).fold(g([]),(e=>gt(e,"colgroup"))),to=(e,t)=>E(e,(e=>{if("colgroup"===se(e)){const t=E(Qt(e),(e=>{const t=Pt(e,"span",1);return et(e,1,t)}));return tt(e,t,"colgroup")}{const o=E(Jt(e),(e=>{const t=Pt(e,"rowspan",1),o=Pt(e,"colspan",1);return et(e,t,o)}));return tt(e,o,t(e))}})),oo=e=>Be(e).map((e=>{const t=se(e);return(e=>D(Ze,e))(t)?t:"tbody"})).getOr("tbody"),no=e=>{const t=Zt(e),o=[...eo(e),...t];return to(o,oo)},ro=e=>{let t,o=!1;return(...n)=>(o||(o=!0,t=e.apply(null,n)),t)},so=()=>lo(0,0),lo=(e,t)=>({major:e,minor:t}),ao={nu:lo,detect:(e,t)=>{const o=String(t).toLowerCase();return 0===e.length?so():((e,t)=>{const o=((e,t)=>{for(let o=0;o<e.length;o++){const n=e[o];if(n.test(t))return n}})(e,t);if(!o)return{major:0,minor:0};const n=e=>Number(t.replace(o,"$"+e));return lo(n(1),n(2))})(e,o)},unknown:so},co=(e,t)=>{const o=String(t).toLowerCase();return L(e,(e=>e.search(o)))},io=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,mo=e=>t=>Ot(t,e),uo=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>Ot(e,"edge/")&&Ot(e,"chrome")&&Ot(e,"safari")&&Ot(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,io],search:e=>Ot(e,"chrome")&&!Ot(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>Ot(e,"msie")||Ot(e,"trident")},{name:"Opera",versionRegexes:[io,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:mo("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:mo("firefox")},{name:"Safari",versionRegexes:[io,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(Ot(e,"safari")||Ot(e,"mobile/"))&&Ot(e,"applewebkit")}],fo=[{name:"Windows",search:mo("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>Ot(e,"iphone")||Ot(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:mo("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:mo("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:mo("linux"),versionRegexes:[]},{name:"Solaris",search:mo("sunos"),versionRegexes:[]},{name:"FreeBSD",search:mo("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:mo("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],go={browsers:g(uo),oses:g(fo)},ho="Edge",po="Chromium",bo="Opera",wo="Firefox",vo="Safari",yo=e=>{const t=e.current,o=e.version,n=e=>()=>t===e;return{current:t,version:o,isEdge:n(ho),isChromium:n(po),isIE:n("IE"),isOpera:n(bo),isFirefox:n(wo),isSafari:n(vo)}},Co={unknown:()=>yo({current:void 0,version:ao.unknown()}),nu:yo,edge:g(ho),chromium:g(po),ie:g("IE"),opera:g(bo),firefox:g(wo),safari:g(vo)},xo="Windows",To="Android",So="Linux",Ro="macOS",Do="Solaris",Oo="FreeBSD",ko="ChromeOS",Eo=e=>{const t=e.current,o=e.version,n=e=>()=>t===e;return{current:t,version:o,isWindows:n(xo),isiOS:n("iOS"),isAndroid:n(To),isMacOS:n(Ro),isLinux:n(So),isSolaris:n(Do),isFreeBSD:n(Oo),isChromeOS:n(ko)}},No={unknown:()=>Eo({current:void 0,version:ao.unknown()}),nu:Eo,windows:g(xo),ios:g("iOS"),android:g(To),linux:g(So),macos:g(Ro),solaris:g(Do),freebsd:g(Oo),chromeos:g(ko)},Ao=(e,t,o)=>{const n=go.browsers(),r=go.oses(),s=t.bind((e=>((e,t)=>V(t.brands,(t=>{const o=t.brand.toLowerCase();return L(e,(e=>{var t;return o===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())})).map((e=>({current:e.name,version:ao.nu(parseInt(t.version,10),0)})))})))(n,e))).orThunk((()=>((e,t)=>co(e,t).map((e=>{const o=ao.detect(e.versionRegexes,t);return{current:e.name,version:o}})))(n,e))).fold(Co.unknown,Co.nu),l=((e,t)=>co(e,t).map((e=>{const o=ao.detect(e.versionRegexes,t);return{current:e.name,version:o}})))(r,e).fold(No.unknown,No.nu),a=((e,t,o,n)=>{const r=e.isiOS()&&!0===/ipad/i.test(o),s=e.isiOS()&&!r,l=e.isiOS()||e.isAndroid(),a=l||n("(pointer:coarse)"),c=r||!s&&l&&n("(min-device-width:768px)"),i=s||l&&!c,m=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(o),d=!i&&!c&&!m;return{isiPad:g(r),isiPhone:g(s),isTablet:g(c),isPhone:g(i),isTouch:g(a),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:g(m),isDesktop:g(d)}})(l,s,e,o);return{browser:s,os:l,deviceType:a}},Bo=e=>window.matchMedia(e).matches;let jo=ro((()=>Ao(navigator.userAgent,x.from(navigator.userAgentData),Bo)));const zo=()=>jo(),Lo=(e,t)=>{const o=o=>{const n=t(o);if(n<=0||null===n){const t=Wt(o,e);return parseFloat(t)||0}return n},n=(e,t)=>z(t,((t,o)=>{const n=Wt(e,o),r=void 0===n?0:parseInt(n,10);return isNaN(r)?t:t+r}),0);return{set:(t,o)=>{if(!u(o)&&!o.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+o);const n=t.dom;Bt(n)&&(n.style[e]=o+"px")},get:o,getOuter:o,aggregate:n,max:(e,t,o)=>{const r=n(e,o);return t>r?t-r:0}}},Wo=(e,t)=>(e=>{const t=parseFloat(e);return isNaN(t)?x.none():x.some(t)})(e).getOr(t),Mo=(e,t,o)=>Wo(Wt(e,t),o),_o=(e,t)=>{const o=e.dom,n=o.getBoundingClientRect().width||o.offsetWidth;return"border-box"===t?n:((e,t,o,n)=>t-Mo(e,`padding-${o}`,0)-Mo(e,`padding-${n}`,0)-Mo(e,`border-${o}-width`,0)-Mo(e,`border-${n}-width`,0))(e,n,"left","right")},Io=Lo("width",(e=>e.dom.offsetWidth)),Po=e=>Io.get(e),Fo=e=>Io.getOuter(e),Ho=e=>_o(e,"content-box"),$o=e=>Mo(e,"width",e.dom.offsetWidth),Vo=(e,t,o)=>{const n=e.cells,r=n.slice(0,t),s=n.slice(t),l=r.concat(o).concat(s);return Go(e,l)},qo=(e,t,o)=>Vo(e,t,[o]),Uo=(e,t,o)=>{e.cells[t]=o},Go=(e,t)=>nt(e.element,t,e.section,e.isNew),Ko=(e,t)=>e.cells[t],Yo=(e,t)=>Ko(e,t).element,Jo=e=>e.cells.length,Qo=e=>{const t=A(e,(e=>"colgroup"===e.section));return{rows:t.fail,cols:t.pass}},Xo=(e,t,o)=>{const n=E(e.cells,o);return nt(t(e.element),n,e.section,!0)},Zo="data-snooker-locked-cols",en=e=>ve(e,Zo).bind((e=>x.from(e.match(/\d+/g)))).map((e=>P(e,C))),tn=e=>{const t=z(Qo(e).rows,((e,t)=>(N(t.cells,((t,o)=>{t.isLocked&&(e[o]=!0)})),e)),{}),o=Q(t,((e,t)=>parseInt(t,10)));return((e,t)=>{const o=T.call(e,0);return o.sort(t),o})(o)},on=(e,t)=>e+","+t,nn=(e,t)=>{const o=_(e.all,(e=>e.cells));return B(o,t)},rn=e=>{const t={},o=[],n=H(e).map((e=>e.element)).bind(Xt).bind(en).getOr({});let r=0,s=0,l=0;const{pass:a,fail:c}=A(e,(e=>"colgroup"===e.section));N(c,(e=>{const a=[];N(e.cells,(e=>{let o=0;for(;void 0!==t[on(l,o)];)o++;const r=((e,t)=>Z(e,t)&&void 0!==e[t]&&null!==e[t])(n,o.toString()),c=((e,t,o,n,r,s)=>({element:e,rowspan:t,colspan:o,row:n,column:r,isLocked:s}))(e.element,e.rowspan,e.colspan,l,o,r);for(let n=0;n<e.colspan;n++)for(let r=0;r<e.rowspan;r++){const e=o+n,a=on(l+r,e);t[a]=c,s=Math.max(s,e+1)}a.push(c)})),r++,o.push(tt(e.element,a,e.section)),l++}));const{columns:i,colgroups:m}=$(a).map((e=>{const t=(e=>{const t={};let o=0;return N(e.cells,(e=>{const n=e.colspan;k(n,(r=>{const s=o+r;t[s]=((e,t,o)=>({element:e,colspan:t,column:o}))(e.element,n,s)})),o+=n})),t})(e),o=((e,t)=>({element:e,columns:t}))(e.element,X(t));return{colgroups:[o],columns:t}})).getOrThunk((()=>({colgroups:[],columns:{}}))),d=((e,t)=>({rows:e,columns:t}))(r,s);return{grid:d,access:t,all:o,columns:i,colgroups:m}},sn={fromTable:e=>{const t=no(e);return rn(t)},generate:rn,getAt:(e,t,o)=>x.from(e.access[on(t,o)]),findItem:(e,t,o)=>{const n=nn(e,(e=>o(t,e.element)));return n.length>0?x.some(n[0]):x.none()},filterItems:nn,justCells:e=>_(e.all,(e=>e.cells)),justColumns:e=>X(e.columns),hasColumns:e=>q(e.columns).length>0,getColumnAt:(e,t)=>x.from(e.columns[t])},ln=(e,t=C)=>{const o=e.grid,n=k(o.columns,h),r=k(o.rows,h);return E(n,(o=>an((()=>_(r,(t=>sn.getAt(e,t,o).filter((e=>e.column===o)).toArray()))),(e=>1===e.colspan&&t(e.element)),(()=>sn.getAt(e,0,o)))))},an=(e,t,o)=>{const n=e();return L(n,t).orThunk((()=>x.from(n[0]).orThunk(o))).map((e=>e.element))},cn=e=>{const t=e.grid,o=k(t.rows,h),n=k(t.columns,h);return E(o,(t=>an((()=>_(n,(o=>sn.getAt(e,t,o).filter((e=>e.row===t)).fold(g([]),(e=>[e]))))),(e=>1===e.rowspan),(()=>sn.getAt(e,t,0)))))},mn=(e,t)=>{if(t<0||t>=e.length-1)return x.none();const o=e[t].fold((()=>{const o=(e=>{const t=T.call(e,0);return t.reverse(),t})(e.slice(0,t));return V(o,((e,t)=>e.map((e=>({value:e,delta:t+1})))))}),(e=>x.some({value:e,delta:0}))),n=e[t+1].fold((()=>{const o=e.slice(t+1);return V(o,((e,t)=>e.map((e=>({value:e,delta:t+1})))))}),(e=>x.some({value:e,delta:1})));return o.bind((e=>n.map((t=>{const o=t.delta+e.delta;return Math.abs(t.value-e.value)/o}))))},dn=(e,t)=>o=>"rtl"===un(o)?t:e,un=e=>"rtl"===Wt(e,"direction")?"rtl":"ltr",fn=Lo("height",(e=>{const t=e.dom;return mt(e)?t.getBoundingClientRect().height:t.offsetHeight})),gn=e=>fn.get(e),hn=e=>fn.getOuter(e),pn=e=>Mo(e,"height",e.dom.offsetHeight),bn=(e,t)=>({left:e,top:t,translate:(o,n)=>bn(e+o,t+n)}),wn=bn,vn=(e,t)=>void 0!==e?e:void 0!==t?t:0,yn=e=>{const t=e.dom.ownerDocument,o=t.body,n=t.defaultView,r=t.documentElement;if(o===e.dom)return wn(o.offsetLeft,o.offsetTop);const s=vn(null==n?void 0:n.pageYOffset,r.scrollTop),l=vn(null==n?void 0:n.pageXOffset,r.scrollLeft),a=vn(r.clientTop,o.clientTop),c=vn(r.clientLeft,o.clientLeft);return Cn(e).translate(l-c,s-a)},Cn=e=>{const t=e.dom,o=t.ownerDocument.body;return o===t?wn(o.offsetLeft,o.offsetTop):mt(e)?(e=>{const t=e.getBoundingClientRect();return wn(t.left,t.top)})(t):wn(0,0)},xn=(e,t)=>({row:e,y:t}),Tn=(e,t)=>({col:e,x:t}),Sn=e=>yn(e).left+Fo(e),Rn=e=>yn(e).left,Dn=(e,t)=>Tn(e,Rn(t)),On=(e,t)=>Tn(e,Sn(t)),kn=e=>yn(e).top,En=(e,t)=>xn(e,kn(t)),Nn=(e,t)=>xn(e,kn(t)+hn(t)),An=(e,t,o)=>{if(0===o.length)return[];const n=E(o.slice(1),((t,o)=>t.map((t=>e(o,t))))),r=o[o.length-1].map((e=>t(o.length-1,e)));return n.concat([r])},Bn={delta:h,positions:e=>An(En,Nn,e),edge:kn},jn=dn({delta:h,edge:Rn,positions:e=>An(Dn,On,e)},{delta:e=>-e,edge:Sn,positions:e=>An(On,Dn,e)}),zn={delta:(e,t)=>jn(t).delta(e,t),positions:(e,t)=>jn(t).positions(e,t),edge:e=>jn(e).edge(e)},Ln={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},Wn=(()=>{const e="[0-9]+",t="[eE][+-]?[0-9]+",o=e=>`(?:${e})?`,n=["Infinity","[0-9]+\\."+o(e)+o(t),"\\.[0-9]+"+o(t),e+o(t)].join("|");return new RegExp(`^(${`[+-]?(?:${n})`})(.*)$`)})(),Mn=(e,t)=>x.from(Wn.exec(e)).bind((e=>{const o=Number(e[1]),n=e[2];return((e,t)=>O(t,(t=>O(Ln[t],(t=>e===t)))))(n,t)?x.some({value:o,unit:n}):x.none()})),_n=/(\d+(\.\d+)?)%/,In=/(\d+(\.\d+)?)px|em/,Pn=ge("col"),Fn=(e,t,o)=>{const n=je(e).getOrThunk((()=>dt(Ne(e))));return t(e)/o(n)*100},Hn=(e,t)=>{zt(e,"width",t+"px")},$n=(e,t)=>{zt(e,"width",t+"%")},Vn=(e,t)=>{zt(e,"height",t+"px")},qn=(e,t,o,n)=>{const r=parseFloat(e);return Et(e,"%")&&"table"!==se(t)?((e,t,o,n)=>{const r=Xt(e).map((e=>{const n=o(e);return Math.floor(t/100*n)})).getOr(t);return n(e,r),r})(t,r,o,n):r},Un=e=>{const t=(e=>pn(e)+"px")(e);return t?qn(t,e,gn,Vn):gn(e)},Gn=(e,t)=>_t(e,t).orThunk((()=>ve(e,t).map((e=>e+"px")))),Kn=e=>Gn(e,"width"),Yn=e=>Fn(e,Po,Ho),Jn=e=>Pn(e)?Po(e):$o(e),Qn=e=>((e,t,o)=>o(e)/Ft(e,t))(e,"rowspan",Un),Xn=(e,t,o)=>{zt(e,"width",t+o)},Zn=e=>Fn(e,Po,Ho)+"%",er=g(_n),tr=ge("col"),or=e=>Kn(e).getOrThunk((()=>Jn(e)+"px")),nr=e=>{return(t=e,Gn(t,"height")).getOrThunk((()=>Qn(e)+"px"));var t},rr=(e,t,o,n,r,s)=>e.filter(n).fold((()=>s(mn(o,t))),(e=>r(e))),sr=(e,t,o,n)=>{const r=ln(e),s=sn.hasColumns(e)?(e=>E(sn.justColumns(e),(e=>x.from(e.element))))(e):r,l=[x.some(zn.edge(t))].concat(E(zn.positions(r,t),(e=>e.map((e=>e.x))))),a=w(Ht);return E(s,((e,t)=>rr(e,t,l,a,(e=>{if((e=>{const t=zo().browser,o=t.isChromium()||t.isFirefox();return!tr(e)||o})(e))return o(e);{const e=(s=r[t],c=h,null!=s?c(s):x.none());return rr(e,t,l,a,(e=>n(x.some(Po(e)))),n)}var s,c}),n)))},lr=e=>e.map((e=>e+"px")).getOr(""),ar=(e,t,o)=>sr(e,t,Jn,(e=>e.getOrThunk(o.minCellWidth))),cr=(e,t,o,n,r)=>{const s=cn(e),l=[x.some(o.edge(t))].concat(E(o.positions(s,t),(e=>e.map((e=>e.y)))));return E(s,((e,t)=>rr(e,t,l,w($t),n,r)))},ir=(e,t)=>()=>mt(e)?t(e):parseFloat(_t(e,"width").getOr("0")),mr=e=>{const t=ir(e,Po),o=g(0);return{width:t,pixelWidth:t,getWidths:(t,o)=>ar(t,e,o),getCellDelta:o,singleColumnWidth:g([0]),minCellWidth:o,setElementWidth:f,adjustTableWidth:f,isRelative:!0,label:"none"}},dr=e=>{const t=ir(e,(e=>parseFloat(Zn(e)))),o=ir(e,Po);return{width:t,pixelWidth:o,getWidths:(t,o)=>((e,t,o)=>sr(e,t,Yn,(e=>e.fold((()=>o.minCellWidth()),(e=>e/o.pixelWidth()*100)))))(t,e,o),getCellDelta:e=>e/o()*100,singleColumnWidth:(e,t)=>[100-e],minCellWidth:()=>qt()/o()*100,setElementWidth:$n,adjustTableWidth:o=>{const n=t();$n(e,n+o/100*n)},isRelative:!0,label:"percent"}},ur=e=>{const t=ir(e,Po);return{width:t,pixelWidth:t,getWidths:(t,o)=>ar(t,e,o),getCellDelta:h,singleColumnWidth:(e,t)=>[Math.max(qt(),e+t)-e],minCellWidth:qt,setElementWidth:Hn,adjustTableWidth:o=>{const n=t()+o;Hn(e,n)},isRelative:!1,label:"pixel"}},fr=e=>Kn(e).fold((()=>mr(e)),(t=>((e,t)=>null!==er().exec(t)?dr(e):ur(e))(e,t))),gr=ur,hr=dr,pr=(e,t,o)=>{const n=e[o].element,r=Te.fromTag("td");He(r,Te.fromTag("br"));(t?He:Fe)(n,r)},br=(e,t)=>{const o=e=>Se(e.element,t),n=Qe(e),r=no(n),s=fr(e),l=sn.generate(r),a=((e,t)=>{const o=e.grid.columns;let n=e.grid.rows,r=o,s=0,l=0;const a=[],c=[];return G(e.access,(e=>{if(a.push(e),t(e)){c.push(e);const t=e.row,o=t+e.rowspan-1,a=e.column,i=a+e.colspan-1;t<n?n=t:o>s&&(s=o),a<r?r=a:i>l&&(l=i)}})),((e,t,o,n,r,s)=>({minRow:e,minCol:t,maxRow:o,maxCol:n,allCells:r,selectedCells:s}))(n,r,s,l,a,c)})(l,o),c="th:not("+t+"),td:not("+t+")",i=Kt(n,"th,td",(e=>Se(e,c)));N(i,Ge),((e,t,o,n)=>{const r=B(e,(e=>"colgroup"!==e.section)),s=t.grid.columns,l=t.grid.rows;for(let e=0;e<l;e++){let l=!1;for(let a=0;a<s;a++)e<o.minRow||e>o.maxRow||a<o.minCol||a>o.maxCol||(sn.getAt(t,e,a).filter(n).isNone()?pr(r,l,e):l=!0)}})(r,l,a,o);const m=((e,t,o,n)=>{if(0===n.minCol&&t.grid.columns===n.maxCol+1)return 0;const r=ar(t,e,o),s=z(r,((e,t)=>e+t),0),l=z(r.slice(n.minCol,n.maxCol+1),((e,t)=>e+t),0),a=l/s*o.pixelWidth()-o.pixelWidth();return o.getCellDelta(a)})(e,sn.fromTable(e),s,a);return((e,t,o,n)=>{G(o.columns,(e=>{(e.column<t.minCol||e.column>t.maxCol)&&Ge(e.element)}));const r=B(Gt(e,"tr"),(e=>0===e.dom.childElementCount));N(r,Ge),t.minCol!==t.maxCol&&t.minRow!==t.maxRow||N(Gt(e,"th,td"),(e=>{ye(e,"rowspan"),ye(e,"colspan")})),ye(e,Zo),ye(e,"data-snooker-col-series"),fr(e).adjustTableWidth(n)})(n,a,l,m),n},wr=((e,t)=>{const o=t=>e(t)?x.from(t.dom.nodeValue):x.none();return{get:n=>{if(!e(n))throw new Error("Can only get "+t+" value of a "+t+" node");return o(n).getOr("")},getOption:o,set:(o,n)=>{if(!e(o))throw new Error("Can only set raw "+t+" value of a "+t+" node");o.dom.nodeValue=n}}})(de,"text"),vr=e=>wr.get(e),yr=e=>wr.getOption(e),Cr=(e,t)=>wr.set(e,t),xr=e=>"img"===se(e)?1:yr(e).fold((()=>Me(e).length),(e=>e.length)),Tr=["img","br"],Sr=e=>yr(e).filter((e=>0!==e.trim().length||e.indexOf(" ")>-1)).isSome()||D(Tr,se(e))||(e=>ie(e)&&"false"===we(e,"contenteditable"))(e),Rr=e=>((e,t)=>{const o=e=>{for(let n=0;n<e.childNodes.length;n++){const r=Te.fromDom(e.childNodes[n]);if(t(r))return x.some(r);const s=o(e.childNodes[n]);if(s.isSome())return s}return x.none()};return o(e.dom)})(e,Sr),Dr=e=>Or(e,Sr),Or=(e,t)=>{const o=e=>{const n=Me(e);for(let e=n.length-1;e>=0;e--){const r=n[e];if(t(r))return x.some(r);const s=o(r);if(s.isSome())return s}return x.none()};return o(e)},kr={scope:["row","col"]},Er=e=>()=>{const t=Te.fromTag("td",e.dom);return He(t,Te.fromTag("br",e.dom)),t},Nr=e=>()=>Te.fromTag("col",e.dom),Ar=e=>()=>Te.fromTag("colgroup",e.dom),Br=e=>()=>Te.fromTag("tr",e.dom),jr=(e,t,o)=>{const n=((e,t)=>{const o=Xe(e,t),n=Me(Qe(e));return qe(o,n),o})(e,t);return G(o,((e,t)=>{null===e?ye(n,t):pe(n,t,e)})),n},zr=e=>e,Lr=(e,t,o)=>{const n=(e,t)=>{((e,t)=>{const o=e.dom,n=t.dom;Bt(o)&&Bt(n)&&(n.style.cssText=o.style.cssText)})(e.element,t),It(t,"height"),1!==e.colspan&&It(t,"width")};return{col:o=>{const r=Te.fromTag(se(o.element),t.dom);return n(o,r),e(o.element,r),r},colgroup:Ar(t),row:Br(t),cell:r=>{const s=Te.fromTag(se(r.element),t.dom),l=o.getOr(["strong","em","b","i","span","font","h1","h2","h3","h4","h5","h6","p","div"]),a=l.length>0?((e,t,o)=>Rr(e).map((n=>{const r=o.join(","),s=ft(n,r,(t=>Oe(t,e)));return j(s,((e,t)=>{const o=Je(t);return He(e,o),o}),t)})).getOr(t))(r.element,s,l):s;return He(a,Te.fromTag("br")),n(r,s),((e,t)=>{G(kr,((o,n)=>ve(e,n).filter((e=>D(o,e))).each((e=>pe(t,n,e)))))})(r.element,s),e(r.element,s),s},replace:jr,colGap:Nr(t),gap:Er(t)}},Wr=e=>({col:Nr(e),colgroup:Ar(e),row:Br(e),cell:Er(e),replace:zr,colGap:Nr(e),gap:Er(e)}),Mr=e=>xt(e,"[contenteditable]"),_r=(e,t=!1)=>mt(e)?e.dom.isContentEditable:Mr(e).fold(g(t),(e=>"true"===Ir(e))),Ir=e=>e.dom.contentEditable,Pr=e=>Te.fromDom(e.getBody()),Fr=e=>t=>Oe(t,Pr(e)),Hr=e=>{ye(e,"data-mce-style");const t=e=>ye(e,"data-mce-style");N(Jt(e),t),N(Qt(e),t),N(Zt(e),t)},$r=e=>Te.fromDom(e.selection.getStart()),Vr=e=>e.getBoundingClientRect().width,qr=e=>e.getBoundingClientRect().height,Ur=e=>wt(e,ge("table")).exists(_r),Gr=(e,t)=>{const o=t.column,n=t.column+t.colspan-1,r=t.row,s=t.row+t.rowspan-1;return o<=e.finishCol&&n>=e.startCol&&r<=e.finishRow&&s>=e.startRow},Kr=(e,t)=>t.column>=e.startCol&&t.column+t.colspan-1<=e.finishCol&&t.row>=e.startRow&&t.row+t.rowspan-1<=e.finishRow,Yr=(e,t,o)=>{const n=sn.findItem(e,t,Oe),r=sn.findItem(e,o,Oe);return n.bind((e=>r.map((t=>{return o=e,n=t,r=Math.min(o.row,n.row),s=Math.min(o.column,n.column),l=Math.max(o.row+o.rowspan-1,n.row+n.rowspan-1),a=Math.max(o.column+o.colspan-1,n.column+n.colspan-1),{startRow:r,startCol:s,finishRow:l,finishCol:a};var o,n,r,s,l,a}))))},Jr=(e,t,o)=>Yr(e,t,o).bind((t=>((e,t)=>{let o=!0;const n=b(Kr,t);for(let r=t.startRow;r<=t.finishRow;r++)for(let s=t.startCol;s<=t.finishCol;s++)o=o&&sn.getAt(e,r,s).exists(n);return o?x.some(t):x.none()})(e,t))),Qr=(e,t,o)=>Yr(e,t,o).map((t=>{const o=sn.filterItems(e,b(Gr,t));return E(o,(e=>e.element))})),Xr=(e,t)=>sn.findItem(e,t,((e,t)=>ke(t,e))).map((e=>e.element)),Zr=(e,t,o)=>Xt(e).bind((n=>((e,t,o,n)=>sn.findItem(e,t,Oe).bind((t=>{const r=o>0?t.row+t.rowspan-1:t.row,s=n>0?t.column+t.colspan-1:t.column;return sn.getAt(e,r+o,s+n).map((e=>e.element))})))(os(n),e,t,o))),es=(e,t,o)=>{const n=os(e);return Qr(n,t,o)},ts=(e,t,o,n,r)=>{const s=os(e),l=Oe(e,o)?x.some(t):Xr(s,t),a=Oe(e,r)?x.some(n):Xr(s,n);return l.bind((e=>a.bind((t=>Qr(s,e,t)))))},os=sn.fromTable;var ns=["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"],rs=()=>({up:g({selector:vt,closest:xt,predicate:bt,all:ze}),down:g({selector:ht,predicate:ut}),styles:g({get:Wt,getRaw:_t,set:zt,remove:It}),attrs:g({get:we,set:pe,remove:ye,copyTo:(e,t)=>{const o=Ce(e);be(t,o)}}),insert:g({before:Ie,after:Pe,afterAll:Ve,append:He,appendAll:qe,prepend:Fe,wrap:$e}),remove:g({unwrap:Ke,remove:Ge}),create:g({nu:Te.fromTag,clone:e=>Te.fromDom(e.dom.cloneNode(!1)),text:Te.fromText}),query:g({comparePosition:(e,t)=>e.dom.compareDocumentPosition(t.dom),prevSibling:Le,nextSibling:We}),property:g({children:Me,name:se,parent:Be,document:e=>Ae(e).dom,isText:de,isComment:ce,isElement:me,isSpecial:e=>{const t=se(e);return D(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],t)},getLanguage:e=>me(e)?ve(e,"lang"):x.none(),getText:vr,setText:Cr,isBoundary:e=>!!me(e)&&("body"===se(e)||D(ns,se(e))),isEmptyTag:e=>!!me(e)&&D(["br","img","hr","input"],se(e)),isNonEditable:e=>me(e)&&"false"===we(e,"contenteditable")}),eq:Oe,is:Ee});const ss=(e,t,o,n)=>{const r=t(e,o);return j(n,((o,n)=>{const r=t(e,n);return ls(e,o,r)}),r)},ls=(e,t,o)=>t.bind((t=>o.filter(b(e.eq,t)))),as=(e,t,o)=>o.length>0?((e,t,o,n)=>n(e,t,o[0],o.slice(1)))(e,t,o,ss):x.none(),cs=(e,t,o,n=y)=>{const r=[t].concat(e.up().all(t)),s=[o].concat(e.up().all(o)),l=e=>W(e,n).fold((()=>e),(t=>e.slice(0,t+1))),a=l(r),c=l(s),i=L(a,(t=>O(c,((e,t)=>b(e.eq,t))(e,t))));return{firstpath:a,secondpath:c,shared:i}},is=rs(),ms=(e,t)=>as(is,((t,o)=>e(o)),t),ds=e=>vt(e,"table"),us=(e,t,o)=>{const n=e=>t=>void 0!==o&&o(t)||Oe(t,e);return Oe(e,t)?x.some({boxes:x.some([e]),start:e,finish:t}):ds(e).bind((r=>ds(t).bind((s=>{if(Oe(r,s))return x.some({boxes:es(r,e,t),start:e,finish:t});if(ke(r,s)){const o=ft(t,"td,th",n(r)),l=o.length>0?o[o.length-1]:t;return x.some({boxes:ts(r,e,r,t,s),start:e,finish:l})}if(ke(s,r)){const o=ft(e,"td,th",n(s)),l=o.length>0?o[o.length-1]:e;return x.some({boxes:ts(s,e,r,t,s),start:e,finish:l})}return((e,t,o)=>cs(is,e,t,o))(e,t).shared.bind((l=>xt(l,"table",o).bind((o=>{const l=ft(t,"td,th",n(o)),a=l.length>0?l[l.length-1]:t,c=ft(e,"td,th",n(o)),i=c.length>0?c[c.length-1]:e;return x.some({boxes:ts(o,e,r,t,s),start:i,finish:a})}))))}))))},fs=(e,t)=>{const o=ht(e,t);return o.length>0?x.some(o):x.none()},gs=(e,t,o)=>Ct(e,t).bind((t=>Ct(e,o).bind((e=>ms(ds,[t,e]).map((o=>({first:t,last:e,table:o}))))))),hs=(e,t,o,n,r)=>((e,t)=>L(e,(e=>Se(e,t))))(e,r).bind((e=>Zr(e,t,o).bind((e=>((e,t)=>vt(e,"table").bind((o=>Ct(o,t).bind((t=>us(t,e).bind((e=>e.boxes.map((t=>({boxes:t,start:e.start,finish:e.finish}))))))))))(e,n))))),ps=(e,t)=>fs(e,t),bs=(e,t,o)=>gs(e,t,o).bind((t=>{const o=t=>Oe(e,t),n="thead,tfoot,tbody,table",r=vt(t.first,n,o),s=vt(t.last,n,o);return r.bind((e=>s.bind((o=>Oe(e,o)?((e,t,o)=>{const n=os(e);return Jr(n,t,o)})(t.table,t.first,t.last):x.none()))))})),ws=h,vs=e=>{const t=(e,t)=>ve(e,t).exists((e=>parseInt(e,10)>1));return e.length>0&&I(e,(e=>t(e,"rowspan")||t(e,"colspan")))?x.some(e):x.none()},ys=(e,t,o)=>t.length<=1?x.none():bs(e,o.firstSelectedSelector,o.lastSelectedSelector).map((e=>({bounds:e,cells:t}))),Cs="data-mce-selected",xs="data-mce-first-selected",Ts="data-mce-last-selected",Ss={selected:Cs,selectedSelector:"td[data-mce-selected],th[data-mce-selected]",firstSelected:xs,firstSelectedSelector:"td[data-mce-first-selected],th[data-mce-first-selected]",lastSelected:Ts,lastSelectedSelector:"td[data-mce-last-selected],th[data-mce-last-selected]"},Rs=(e,t,o)=>({element:o,mergable:ys(t,e,Ss),unmergable:vs(e),selection:ws(e)}),Ds=e=>(t,o)=>{const n=se(t),r="col"===n||"colgroup"===n?Xt(s=t).bind((e=>ps(e,Ss.firstSelectedSelector))).fold(g(s),(e=>e[0])):t;var s;return xt(r,e,o)},Os=Ds("th,td,caption"),ks=Ds("th,td"),Es=e=>{return t=e.model.table.getSelectedCells(),E(t,Te.fromDom);var t},Ns=(e,t)=>{e.on("BeforeGetContent",(t=>{const o=o=>{t.preventDefault(),(e=>Xt(e[0]).map((e=>{const t=br(e,"[data-mce-selected]");return Hr(t),[t]})))(o).each((o=>{t.content="text"===t.format?(e=>E(e,(e=>e.dom.innerText)).join(""))(o):((e,t)=>E(t,(t=>e.selection.serializer.serialize(t.dom,{}))).join(""))(e,o)}))};if(!0===t.selection){const t=(e=>B(Es(e),(e=>Se(e,Ss.selectedSelector))))(e);t.length>=1&&o(t)}})),e.on("BeforeSetContent",(o=>{if(!0===o.selection&&!0===o.paste){const n=Es(e);H(n).each((n=>{Xt(n).each((r=>{const s=B(((e,t)=>{const o=(t||document).createElement("div");return o.innerHTML=e,Me(Te.fromDom(o))})(o.content),(e=>"meta"!==se(e))),l=ge("table");if(1===s.length&&l(s[0])){o.preventDefault();const l=Te.fromDom(e.getDoc()),a=Wr(l),c=((e,t,o)=>({element:e,clipboard:t,generators:o}))(n,s[0],a);t.pasteCells(r,c).each((()=>{e.focus()}))}}))}))}}))},As=(e,t)=>({element:e,offset:t}),Bs=(e,t,o)=>e.property().isText(t)&&0===e.property().getText(t).trim().length||e.property().isComment(t)?o(t).bind((t=>Bs(e,t,o).orThunk((()=>x.some(t))))):x.none(),js=(e,t)=>{if(e.property().isText(t))return e.property().getText(t).length;return e.property().children(t).length},zs=(e,t)=>{const o=Bs(e,t,e.query().prevSibling).getOr(t);if(e.property().isText(o))return As(o,js(e,o));const n=e.property().children(o);return n.length>0?zs(e,n[n.length-1]):As(o,js(e,o))},Ls=zs,Ws=rs(),Ms=(e,t)=>{if(!Ht(e)){const o=(e=>Kn(e).bind((e=>Mn(e,["fixed","relative","empty"]))))(e);o.each((o=>{const n=o.value/2;Xn(e,n,o.unit),Xn(t,n,o.unit)}))}},_s=e=>E(e,g(0)),Is=(e,t,o,n,r)=>r(e.slice(0,t)).concat(n).concat(r(e.slice(o))),Ps=e=>(t,o,n,r)=>{if(e(n)){const e=Math.max(r,t[o]-Math.abs(n)),s=Math.abs(e-t[o]);return n>=0?s:-s}return n},Fs=Ps((e=>e<0)),Hs=Ps(C),$s=()=>{const e=(e,t,o,n)=>{const r=(100+o)/100,s=Math.max(n,(e[t]+o)/r);return E(e,((e,o)=>(o===t?s:e/r)-e))},t=(t,o,n,r,s,l)=>l?e(t,o,r,s):((e,t,o,n,r)=>{const s=Fs(e,t,n,r);return Is(e,t,o+1,[s,0],_s)})(t,o,n,r,s);return{resizeTable:(e,t)=>e(t),clampTableDelta:Fs,calcLeftEdgeDeltas:t,calcMiddleDeltas:(e,o,n,r,s,l,a)=>t(e,n,r,s,l,a),calcRightEdgeDeltas:(t,o,n,r,s,l)=>{if(l)return e(t,n,r,s);{const e=Fs(t,n,r,s);return _s(t.slice(0,n)).concat([e])}},calcRedestributedWidths:(e,t,o,n)=>{if(n){const n=(t+o)/t,r=E(e,(e=>e/n));return{delta:100*n-100,newSizes:r}}return{delta:o,newSizes:e}}}},Vs=()=>{const e=(e,t,o,n,r)=>{const s=Hs(e,n>=0?o:t,n,r);return Is(e,t,o+1,[s,-s],_s)};return{resizeTable:(e,t,o)=>{o&&e(t)},clampTableDelta:(e,t,o,n,r)=>{if(r){if(o>=0)return o;{const t=z(e,((e,t)=>e+t-n),0);return Math.max(-t,o)}}return Fs(e,t,o,n)},calcLeftEdgeDeltas:e,calcMiddleDeltas:(t,o,n,r,s,l)=>e(t,n,r,s,l),calcRightEdgeDeltas:(e,t,o,n,r,s)=>{if(s)return _s(e);{const t=n/e.length;return E(e,g(t))}},calcRedestributedWidths:(e,t,o,n)=>({delta:0,newSizes:e})}},qs=e=>sn.fromTable(e).grid,Us=ge("th"),Gs=e=>I(e,(e=>Us(e.element))),Ks=(e,t)=>e&&t?"sectionCells":e?"section":"cells",Ys=e=>{const t="thead"===e.section,o=Tt(Js(e.cells),"th");return"tfoot"===e.section?{type:"footer"}:t||o?{type:"header",subType:Ks(t,o)}:{type:"body"}},Js=e=>{const t=B(e,(e=>Us(e.element)));return 0===t.length?x.some("td"):t.length===e.length?x.some("th"):x.none()},Qs=(e,t,o)=>ot(o(e.element,t),!0,e.isLocked),Xs=(e,t)=>e.section!==t?nt(e.element,e.cells,t,e.isNew):e,Zs=()=>({transformRow:Xs,transformCell:(e,t,o)=>{const n=o(e.element,t),r="td"!==se(n)?((e,t)=>{const o=Xe(e,t);Pe(e,o);const n=Me(e);return qe(o,n),Ge(e),o})(n,"td"):n;return ot(r,e.isNew,e.isLocked)}}),el=()=>({transformRow:Xs,transformCell:Qs}),tl=()=>({transformRow:(e,t)=>Xs(e,"thead"===t?"tbody":t),transformCell:Qs}),ol=(e,t)=>{const o=(e=>V(e.all,(e=>{const t=Ys(e);return"header"===t.type?x.from(t.subType):x.none()})))(sn.fromTable(e)).getOr(t);switch(o){case"section":return Zs();case"sectionCells":return el();case"cells":return tl()}},nl=Zs,rl=el,sl=tl,ll=()=>({transformRow:h,transformCell:Qs}),al=(e,t,o,n)=>{o===n?ye(e,t):pe(e,t,o)},cl=(e,t,o)=>{$(gt(e,t)).fold((()=>Fe(e,o)),(e=>Pe(e,o)))},il=(e,t)=>{const o=[],n=[],r=e=>E(e,(e=>{e.isNew&&o.push(e.element);const t=e.element;return Ue(t),N(e.cells,(e=>{e.isNew&&n.push(e.element),al(e.element,"colspan",e.colspan,1),al(e.element,"rowspan",e.rowspan,1),He(t,e.element)})),t})),s=e=>_(e,(e=>E(e.cells,(e=>(al(e.element,"span",e.colspan,1),e.element))))),l=(t,o)=>{const n=((e,t)=>{const o=yt(e,t).getOrThunk((()=>{const o=Te.fromTag(t,Ne(e).dom);return"thead"===t?cl(e,"caption,colgroup",o):"colgroup"===t?cl(e,"caption",o):He(e,o),o}));return Ue(o),o})(e,o),l=("colgroup"===o?s:r)(t);qe(n,l)},a=(t,o)=>{t.length>0?l(t,o):(t=>{yt(e,t).each(Ge)})(o)},c=[],i=[],m=[],d=[];return N(t,(e=>{switch(e.section){case"thead":c.push(e);break;case"tbody":i.push(e);break;case"tfoot":m.push(e);break;case"colgroup":d.push(e)}})),a(d,"colgroup"),a(c,"thead"),a(i,"tbody"),a(m,"tfoot"),{newRows:o,newCells:n}},ml=(e,t)=>{if(0===e.length)return 0;const o=e[0];return W(e,(e=>!t(o.element,e.element))).getOr(e.length)},dl=(e,t,o,n)=>{const r=((e,t)=>e[t])(e,t),s="colgroup"===r.section,l=ml(r.cells.slice(o),n),a=s?1:ml(((e,t)=>E(e,(e=>Ko(e,t))))(e.slice(t),o),n);return{colspan:l,rowspan:a}},ul=(e,t)=>{const o=E(e,(e=>E(e.cells,y)));return E(e,((n,r)=>{const s=_(n.cells,((n,s)=>{if(!1===o[r][s]){const m=dl(e,r,s,t);return((e,t,n,r)=>{for(let s=e;s<e+n;s++)for(let e=t;e<t+r;e++)o[s][e]=!0})(r,s,m.rowspan,m.colspan),[(l=n.element,a=m.rowspan,c=m.colspan,i=n.isNew,{element:l,rowspan:a,colspan:c,isNew:i})]}return[];var l,a,c,i}));return((e,t,o,n)=>({element:e,cells:t,section:o,isNew:n}))(n.element,s,n.section,n.isNew)}))},fl=(e,t,o)=>{const n=[];N(e.colgroups,(r=>{const s=[];for(let n=0;n<e.grid.columns;n++){const r=sn.getColumnAt(e,n).map((e=>ot(e.element,o,!1))).getOrThunk((()=>ot(t.colGap(),!0,!1)));s.push(r)}n.push(nt(r.element,s,"colgroup",o))}));for(let r=0;r<e.grid.rows;r++){const s=[];for(let n=0;n<e.grid.columns;n++){const l=sn.getAt(e,r,n).map((e=>ot(e.element,o,e.isLocked))).getOrThunk((()=>ot(t.gap(),!0,!1)));s.push(l)}const l=e.all[r],a=nt(l.element,s,l.section,o);n.push(a)}return n},gl=e=>ul(e,Oe),hl=(e,t)=>V(e.all,(e=>L(e.cells,(e=>Oe(t,e.element))))),pl=(e,t,o)=>{const n=E(t.selection,(t=>Yt(t).bind((t=>hl(e,t))).filter(o))),r=St(n);return Rt(r.length>0,r)},bl=(e,t,o,n,r)=>(s,l,a,c)=>{const i=sn.fromTable(s),m=x.from(null==c?void 0:c.section).getOrThunk(ll);return t(i,l).map((t=>{const o=((e,t)=>fl(e,t,!1))(i,a),n=e(o,t,Oe,r(a),m),s=tn(n.grid);return{info:t,grid:gl(n.grid),cursor:n.cursor,lockedColumns:s}})).bind((e=>{const t=il(s,e.grid),r=x.from(null==c?void 0:c.sizing).getOrThunk((()=>fr(s))),l=x.from(null==c?void 0:c.resize).getOrThunk(Vs);return o(s,e.grid,e.info,{sizing:r,resize:l,section:m}),n(s),ye(s,Zo),e.lockedColumns.length>0&&pe(s,Zo,e.lockedColumns.join(",")),x.some({cursor:e.cursor,newRows:t.newRows,newCells:t.newCells})}))},wl=(e,t)=>pl(e,t,C).map((e=>({cells:e,generators:t.generators,clipboard:t.clipboard}))),vl=(e,t)=>pl(e,t,C),yl=(e,t)=>pl(e,t,(e=>!e.isLocked)),Cl=(e,t)=>I(t,(t=>((e,t)=>hl(e,t).exists((e=>!e.isLocked)))(e,t))),xl=(e,t,o,n)=>{const r=Qo(e).rows;let s=!0;for(let e=0;e<r.length;e++)for(let l=0;l<Jo(r[0]);l++){const a=r[e],c=Ko(a,l),i=o(c.element,t);i&&!s?Uo(a,l,ot(n(),!0,c.isLocked)):i&&(s=!1)}return e},Tl=(e,t,o,n)=>{const r=Qo(e).rows;if(t>0&&t<r.length){const e=((e,t)=>z(e,((e,o)=>O(e,(e=>t(e.element,o.element)))?e:e.concat([o])),[]))(r[t-1].cells,o);N(e,(e=>{let s=x.none();for(let l=t;l<r.length;l++)for(let t=0;t<Jo(r[0]);t++){const a=r[l],c=Ko(a,t);o(c.element,e.element)&&(s.isNone()&&(s=x.some(n())),s.each((e=>{Uo(a,t,ot(e,!0,c.isLocked))})))}}))}return e},Sl=e=>{const t=t=>t(e),o=g(e),n=()=>r,r={tag:!0,inner:e,fold:(t,o)=>o(e),isValue:C,isError:y,map:t=>Dl.value(t(e)),mapError:n,bind:t,exists:t,forall:t,getOr:o,or:n,getOrThunk:o,orThunk:n,getOrDie:o,each:t=>{t(e)},toOptional:()=>x.some(e)};return r},Rl=e=>{const t=()=>o,o={tag:!1,inner:e,fold:(t,o)=>t(e),isValue:y,isError:C,map:t,mapError:t=>Dl.error(t(e)),bind:t,exists:y,forall:C,getOr:h,or:h,getOrThunk:v,orThunk:v,getOrDie:(n=String(e),()=>{throw new Error(n)}),each:f,toOptional:x.none};var n;return o},Dl={value:Sl,error:Rl,fromOption:(e,t)=>e.fold((()=>Rl(t)),Sl)},Ol=(e,t)=>({rowDelta:0,colDelta:Jo(e[0])-Jo(t[0])}),kl=(e,t)=>({rowDelta:e.length-t.length,colDelta:0}),El=(e,t,o,n)=>{const r="colgroup"===t.section?o.col:o.cell;return k(e,(e=>ot(r(),!0,n(e))))},Nl=(e,t,o,n)=>{const r=e[e.length-1];return e.concat(k(t,(()=>{const e="colgroup"===r.section?o.colgroup:o.row,t=Xo(r,e,h),s=El(t.cells.length,t,o,(e=>Z(n,e.toString())));return Go(t,s)})))},Al=(e,t,o,n)=>E(e,(e=>{const r=El(t,e,o,y);return Vo(e,n,r)})),Bl=(e,t,o)=>{const n=t.colDelta<0?Al:h,r=t.rowDelta<0?Nl:h,s=tn(e),l=Jo(e[0]),a=O(s,(e=>e===l-1)),c=n(e,Math.abs(t.colDelta),o,a?l-1:l),i=tn(c);return r(c,Math.abs(t.rowDelta),o,P(i,C))},jl=(e,t,o,n)=>{const r=b(n,Ko(e[t],o).element),s=e[t];return e.length>1&&Jo(s)>1&&(o>0&&r(Yo(s,o-1))||o<s.cells.length-1&&r(Yo(s,o+1))||t>0&&r(Yo(e[t-1],o))||t<e.length-1&&r(Yo(e[t+1],o)))},zl=(e,t,o)=>B(o,(o=>o>=e.column&&o<=Jo(t[0])+e.column)),Ll=(e,t,o,n,r)=>{const s=tn(t),l=((e,t,o)=>{const n=Jo(t[0]),r=Qo(t).cols.length+e.row,s=k(n-e.column,(t=>t+e.column)),l=L(s,(e=>I(o,(t=>t!==e)))).getOr(n-1);return{row:r,column:l}})(e,t,s),a=Qo(o).rows,c=zl(l,a,s),i=((e,t,o)=>{if(e.row>=t.length||e.column>Jo(t[0]))return Dl.error("invalid start address out of table bounds, row: "+e.row+", column: "+e.column);const n=t.slice(e.row),r=n[0].cells.slice(e.column),s=Jo(o[0]),l=o.length;return Dl.value({rowDelta:n.length-l,colDelta:r.length-s})})(l,t,a);return i.map((e=>{const o={...e,colDelta:e.colDelta-c.length},s=Bl(t,o,n),i=tn(s),m=zl(l,a,i);return((e,t,o,n,r,s)=>{const l=e.row,a=e.column,c=l+o.length,i=a+Jo(o[0])+s.length,m=P(s,C);for(let e=l;e<c;e++){let s=0;for(let c=a;c<i;c++){if(m[c]){s++;continue}jl(t,e,c,r)&&xl(t,Yo(t[e],c),r,n.cell);const i=c-a-s,d=Ko(o[e-l],i),u=d.element,f=n.replace(u);Uo(t[e],c,ot(f,!0,d.isLocked))}}return t})(l,s,a,n,r,m)}))},Wl=(e,t,o,n,r)=>{((e,t,o,n)=>{t>0&&t<e[0].cells.length&&N(e,(e=>{const r=e.cells[t-1];let s=0;const l=n();for(;e.cells.length>t+s&&o(r.element,e.cells[t+s].element);)Uo(e,t+s,ot(l,!0,e.cells[t+s].isLocked)),s++}))})(t,e,r,n.cell);const s=kl(o,t),l=Bl(o,s,n),a=kl(t,l),c=Bl(t,a,n);return E(c,((t,o)=>Vo(t,e,l[o].cells)))},Ml=(e,t,o,n,r)=>{Tl(t,e,r,n.cell);const s=tn(t),l=Ol(t,o),a={...l,colDelta:l.colDelta-s.length},c=Bl(t,a,n),{cols:i,rows:m}=Qo(c),d=tn(c),u=Ol(o,t),f={...u,colDelta:u.colDelta+d.length},g=((e,t,o)=>E(e,(e=>z(o,((o,n)=>{const r=El(1,e,t,C)[0];return qo(o,n,r)}),e))))(o,n,d),h=Bl(g,f,n);return[...i,...m.slice(0,e),...h,...m.slice(e,m.length)]},_l=(e,t,o,n,r)=>{const{rows:s,cols:l}=Qo(e),a=s.slice(0,t),c=s.slice(t),i=((e,t,o,n)=>Xo(e,(e=>n(e,o)),t))(s[o],((e,o)=>t>0&&t<s.length&&n(Yo(s[t-1],o),Yo(s[t],o))?Ko(s[t],o):ot(r(e.element,n),!0,e.isLocked)),n,r);return[...l,...a,i,...c]},Il=(e,t,o,n,r)=>E(e,(e=>{const s=t>0&&t<Jo(e)&&n(Yo(e,t-1),Yo(e,t)),l=((e,t,o,n,r,s,l)=>{if("colgroup"!==o&&n)return Ko(e,t);{const t=Ko(e,r);return ot(l(t.element,s),!0,!1)}})(e,t,e.section,s,o,n,r);return qo(e,t,l)})),Pl=(e,t,o,n)=>((e,t,o,n)=>void 0!==Yo(e[t],o)&&t>0&&n(Yo(e[t-1],o),Yo(e[t],o)))(e,t,o,n)||((e,t,o)=>t>0&&o(Yo(e,t-1),Yo(e,t)))(e[t],o,n),Fl=(e,t,o,n)=>{const r=e=>(e=>"row"===e?$t(t):Ht(t))(e)?`${e}group`:e;if(e)return Us(t)?r(o):null;if(n&&Us(t)){return r("row"===o?"col":"row")}return null},Hl=(e,t,o)=>ot(o(e.element,t),!0,e.isLocked),$l=(e,t,o,n,r,s,l)=>E(e,((e,a)=>((e,t)=>{const o=e.cells,n=E(o,t);return nt(e.element,n,e.section,e.isNew)})(e,((e,c)=>{if((e=>O(t,(t=>o(e.element,t.element))))(e)){const t=l(e,a,c)?r(e,o,n):e;return s(t,a,c).each((e=>{var o,n;o=t.element,n={scope:x.from(e)},G(n,((e,t)=>{e.fold((()=>{ye(o,t)}),(e=>{he(o.dom,t,e)}))}))})),t}return e})))),Vl=(e,t,o)=>_(e,((n,r)=>Pl(e,r,t,o)?[]:[Ko(n,t)])),ql=(e,t,o,n,r)=>{const s=Qo(e).rows,l=_(t,(e=>Vl(s,e,n))),a=E(s,(e=>Gs(e.cells))),c=((e,t)=>I(t,h)&&Gs(e)?C:(e,o,n)=>!("th"===se(e.element)&&t[o]))(l,a),i=((e,t)=>(o,n)=>x.some(Fl(e,o.element,"row",t[n])))(o,a);return $l(e,l,n,r,Hl,i,c)},Ul=(e,t,o,n,r,s,l)=>{const{cols:a,rows:c}=Qo(e),i=c[t[0]],m=_(t,(e=>((e,t,o)=>{const n=e[t];return _(n.cells,((n,r)=>Pl(e,t,r,o)?[]:[n]))})(c,e,r))),d=E(i.cells,((e,t)=>Gs(Vl(c,t,r)))),u=[...c];N(t,(e=>{u[e]=l.transformRow(c[e],o)}));const f=[...a,...u],g=((e,t)=>I(t,h)&&Gs(e.cells)?C:(e,o,n)=>!("th"===se(e.element)&&t[n]))(i,d),p=((e,t)=>(o,n,r)=>x.some(Fl(e,o.element,"col",t[r])))(n,d);return $l(f,m,r,s,l.transformCell,p,g)},Gl=(e,t,o,n)=>{const r=Qo(e).rows,s=E(t,(e=>Ko(r[e.row],e.column)));return $l(e,s,o,n,Hl,x.none,C)},Kl=e=>{if(!l(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");const t=[],o={};return N(e,((n,r)=>{const s=q(n);if(1!==s.length)throw new Error("one and only one name per case");const a=s[0],c=n[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(!l(c))throw new Error("case arguments must be an array");t.push(a),o[a]=(...o)=>{const n=o.length;if(n!==c.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+c.length+" ("+c+"), got "+n);return{fold:(...t)=>{if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);return t[r].apply(null,o)},match:e=>{const n=q(e);if(t.length!==n.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+n.join(","));if(!I(t,(e=>D(n,e))))throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+t.join(", "));return e[a].apply(null,o)},log:e=>{console.log(e,{constructors:t,constructor:a,params:o})}}}})),o},Yl={...Kl([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}])},Jl=(e,t,o,n,r)=>{const s=e.slice(0),l=((e,t)=>0===e.length?Yl.none():1===e.length?Yl.only(0):0===t?Yl.left(0,1):t===e.length-1?Yl.right(t-1,t):t>0&&t<e.length-1?Yl.middle(t-1,t,t+1):Yl.none())(e,t),a=g(E(s,g(0)));return l.fold(a,(e=>n.singleColumnWidth(s[e],o)),((e,t)=>r.calcLeftEdgeDeltas(s,e,t,o,n.minCellWidth(),n.isRelative)),((e,t,l)=>r.calcMiddleDeltas(s,e,t,l,o,n.minCellWidth(),n.isRelative)),((e,t)=>r.calcRightEdgeDeltas(s,e,t,o,n.minCellWidth(),n.isRelative)))},Ql=(e,t,o)=>{let n=0;for(let r=e;r<t;r++)n+=void 0!==o[r]?o[r]:0;return n},Xl=(e,t)=>{const o=sn.justCells(e);return E(o,(e=>{const o=Ql(e.row,e.row+e.rowspan,t);return{element:e.element,height:o,rowspan:e.rowspan}}))},Zl=(e,t)=>sn.hasColumns(e)?((e,t)=>{const o=sn.justColumns(e);return E(o,((e,o)=>({element:e.element,width:t[o],colspan:e.colspan})))})(e,t):((e,t)=>{const o=sn.justCells(e);return E(o,(e=>{const o=Ql(e.column,e.column+e.colspan,t);return{element:e.element,width:o,colspan:e.colspan}}))})(e,t),ea=(e,t,o)=>{const n=Zl(e,t);N(n,(e=>{o.setElementWidth(e.element,e.width)}))},ta=(e,t,o,n,r)=>{const s=sn.fromTable(e),l=r.getCellDelta(t),a=r.getWidths(s,r),c=o===s.grid.columns-1,i=n.clampTableDelta(a,o,l,r.minCellWidth(),c),m=Jl(a,o,i,r,n),d=E(m,((e,t)=>e+a[t]));ea(s,d,r),n.resizeTable(r.adjustTableWidth,i,c)},oa=(e,t,o,n)=>{const r=sn.fromTable(e),s=((e,t,o)=>cr(e,t,o,Qn,(e=>e.getOrThunk(Ut))))(r,e,n),l=E(s,((e,n)=>o===n?Math.max(t+e,Ut()):e)),a=Xl(r,l),c=((e,t)=>E(e.all,((e,o)=>({element:e.element,height:t[o]}))))(r,l);N(c,(e=>{Vn(e.element,e.height)})),N(a,(e=>{Vn(e.element,e.height)}));const i=j(l,((e,t)=>e+t),0);Vn(e,i)},na=e=>z(e,((e,t)=>O(e,(e=>e.column===t.column))?e:e.concat([t])),[]).sort(((e,t)=>e.column-t.column)),ra=ge("col"),sa=ge("colgroup"),la=e=>"tr"===se(e)||sa(e),aa=e=>({element:e,colspan:Pt(e,"colspan",1),rowspan:Pt(e,"rowspan",1)}),ca=e=>ve(e,"scope").map((e=>e.substr(0,3))),ia=(e,t=aa)=>{const o=o=>{if(la(o))return sa((r={element:o}).element)?e.colgroup(r):e.row(r);{const r=o,s=(t=>ra(t.element)?e.col(t):e.cell(t))(t(r));return n=x.some({item:r,replacement:s}),s}var r};let n=x.none();return{getOrInit:(e,t)=>n.fold((()=>o(e)),(n=>t(e,n.item)?n.replacement:o(e)))}},ma=e=>t=>{const o=[],n=n=>{const r="td"===e?{scope:null}:{},s=t.replace(n,e,r);return o.push({item:n,sub:s}),s};return{replaceOrInit:(e,t)=>{if(la(e)||ra(e))return e;{const r=e;return((e,t)=>L(o,(o=>t(o.item,e))))(r,t).fold((()=>n(r)),(o=>t(e,o.item)?o.sub:n(r)))}}}},da=e=>({unmerge:t=>{const o=ca(t);return o.each((e=>pe(t,"scope",e))),()=>{const n=e.cell({element:t,colspan:1,rowspan:1});return It(n,"width"),It(t,"width"),o.each((e=>pe(n,"scope",e))),n}},merge:e=>(It(e[0],"width"),(()=>{const t=St(E(e,ca));if(0===t.length)return x.none();{const e=t[0],o=["row","col"];return O(t,(t=>t!==e&&D(o,t)))?x.none():x.from(e)}})().fold((()=>ye(e[0],"scope")),(t=>pe(e[0],"scope",t+"group"))),g(e[0]))}),ua=["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"],fa=rs(),ga=e=>((e,t)=>{const o=e.property().name(t);return D(ua,o)})(fa,e),ha=e=>((e,t)=>{const o=e.property().name(t);return D(["ol","ul"],o)})(fa,e),pa=e=>((e,t)=>D(["br","img","hr","input"],e.property().name(t)))(fa,e),ba=e=>{const t=ge("br"),o=e=>Dr(e).bind((o=>{const n=We(o).map((e=>!!ga(e)||!!pa(e)&&"img"!==se(e))).getOr(!1);return Be(o).map((r=>!0===n||(e=>"li"===se(e)||bt(e,ha).isSome())(r)||t(o)||ga(r)&&!Oe(e,r)?[]:[Te.fromTag("br")]))})).getOr([]),n=(()=>{const n=_(e,(e=>{const n=Me(e);return(e=>I(e,(e=>t(e)||de(e)&&0===vr(e).trim().length)))(n)?[]:n.concat(o(e))}));return 0===n.length?[Te.fromTag("br")]:n})();Ue(e[0]),qe(e[0],n)},wa=e=>_r(e,!0),va=e=>{0===Jt(e).length&&Ge(e)},ya=(e,t)=>({grid:e,cursor:t}),Ca=(e,t,o)=>{var n,r;const s=Qo(e).rows;return x.from(null===(r=null===(n=s[t])||void 0===n?void 0:n.cells[o])||void 0===r?void 0:r.element).filter(wa).orThunk((()=>(e=>V(e,(e=>V(e.cells,(e=>{const t=e.element;return Rt(wa(t),t)})))))(s)))},xa=(e,t,o)=>{const n=Ca(e,t,o);return ya(e,n)},Ta=e=>z(e,((e,t)=>O(e,(e=>e.row===t.row))?e:e.concat([t])),[]).sort(((e,t)=>e.row-t.row)),Sa=(e,t)=>(o,n,r,s,l)=>{const a=Ta(n),c=E(a,(e=>e.row)),i=Ul(o,c,e,t,r,s.replaceOrInit,l);return xa(i,n[0].row,n[0].column)},Ra=Sa("thead",!0),Da=Sa("tbody",!1),Oa=Sa("tfoot",!1),ka=(e,t,o)=>{const n=((e,t)=>to(e,(()=>t)))(e,o.section),r=sn.generate(n);return fl(r,t,!0)},Ea=(e,t,o,n)=>((e,t,o,n)=>{const r=sn.generate(t),s=n.getWidths(r,n);ea(r,s,n)})(0,t,0,n.sizing),Na=(e,t,o,n)=>((e,t,o,n,r)=>{const s=sn.generate(t),l=n.getWidths(s,n),a=n.pixelWidth(),{newSizes:c,delta:i}=r.calcRedestributedWidths(l,a,o.pixelDelta,n.isRelative);ea(s,c,n),n.adjustTableWidth(i)})(0,t,o,n.sizing,n.resize),Aa=(e,t)=>O(t,(e=>0===e.column&&e.isLocked)),Ba=(e,t)=>O(t,(t=>t.column+t.colspan>=e.grid.columns&&t.isLocked)),ja=(e,t)=>{const o=ln(e),n=na(t);return z(n,((e,t)=>e+o[t.column].map(Fo).getOr(0)),0)},za=e=>(t,o)=>vl(t,o).filter((o=>!(e?Aa:Ba)(t,o))).map((e=>({details:e,pixelDelta:ja(t,e)}))),La=e=>(t,o)=>wl(t,o).filter((o=>!(e?Aa:Ba)(t,o.cells))),Wa=ma("th"),Ma=ma("td"),_a=bl(((e,t,o,n)=>{const r=t[0].row,s=Ta(t),l=j(s,((e,t)=>({grid:_l(e.grid,r,t.row+e.delta,o,n.getOrInit),delta:e.delta+1})),{grid:e,delta:0}).grid;return xa(l,r,t[0].column)}),vl,f,f,ia),Ia=bl(((e,t,o,n)=>{const r=Ta(t),s=r[r.length-1],l=s.row+s.rowspan,a=j(r,((e,t)=>_l(e,l,t.row,o,n.getOrInit)),e);return xa(a,l,t[0].column)}),vl,f,f,ia),Pa=bl(((e,t,o,n)=>{const r=t.details,s=na(r),l=s[0].column,a=j(s,((e,t)=>({grid:Il(e.grid,l,t.column+e.delta,o,n.getOrInit),delta:e.delta+1})),{grid:e,delta:0}).grid;return xa(a,r[0].row,l)}),za(!0),Na,f,ia),Fa=bl(((e,t,o,n)=>{const r=t.details,s=r[r.length-1],l=s.column+s.colspan,a=na(r),c=j(a,((e,t)=>Il(e,l,t.column,o,n.getOrInit)),e);return xa(c,r[0].row,l)}),za(!1),Na,f,ia),Ha=bl(((e,t,o,n)=>{const r=na(t.details),s=((e,t)=>_(e,(e=>{const o=e.cells,n=j(t,((e,t)=>t>=0&&t<e.length?e.slice(0,t).concat(e.slice(t+1)):e),o);return n.length>0?[nt(e.element,n,e.section,e.isNew)]:[]})))(e,E(r,(e=>e.column))),l=s.length>0?s[0].cells.length-1:0;return xa(s,r[0].row,Math.min(r[0].column,l))}),((e,t)=>yl(e,t).map((t=>({details:t,pixelDelta:-ja(e,t)})))),Na,va,ia),$a=bl(((e,t,o,n)=>{const r=Ta(t),s=((e,t,o)=>{const{rows:n,cols:r}=Qo(e);return[...r,...n.slice(0,t),...n.slice(o+1)]})(e,r[0].row,r[r.length-1].row),l=s.length>0?s.length-1:0;return xa(s,Math.min(t[0].row,l),t[0].column)}),vl,f,va,ia),Va=bl(((e,t,o,n)=>{const r=na(t),s=E(r,(e=>e.column)),l=ql(e,s,!0,o,n.replaceOrInit);return xa(l,t[0].row,t[0].column)}),yl,f,f,Wa),qa=bl(((e,t,o,n)=>{const r=na(t),s=E(r,(e=>e.column)),l=ql(e,s,!1,o,n.replaceOrInit);return xa(l,t[0].row,t[0].column)}),yl,f,f,Ma),Ua=bl(Ra,yl,f,f,Wa),Ga=bl(Da,yl,f,f,Ma),Ka=bl(Oa,yl,f,f,Ma),Ya=bl(((e,t,o,n)=>{const r=Gl(e,t,o,n.replaceOrInit);return xa(r,t[0].row,t[0].column)}),yl,f,f,Wa),Ja=bl(((e,t,o,n)=>{const r=Gl(e,t,o,n.replaceOrInit);return xa(r,t[0].row,t[0].column)}),yl,f,f,Ma),Qa=bl(((e,t,o,n)=>{const r=t.cells;ba(r);const s=((e,t,o,n)=>{const r=Qo(e).rows;if(0===r.length)return e;for(let e=t.startRow;e<=t.finishRow;e++)for(let o=t.startCol;o<=t.finishCol;o++){const t=r[e],s=Ko(t,o).isLocked;Uo(t,o,ot(n(),!1,s))}return e})(e,t.bounds,0,n.merge(r));return ya(s,x.from(r[0]))}),((e,t)=>((e,t)=>t.mergable)(0,t).filter((t=>Cl(e,t.cells)))),Ea,f,da),Xa=bl(((e,t,o,n)=>{const r=j(t,((e,t)=>xl(e,t,o,n.unmerge(t))),e);return ya(r,x.from(t[0]))}),((e,t)=>((e,t)=>t.unmergable)(0,t).filter((t=>Cl(e,t)))),Ea,f,da),Za=bl(((e,t,o,n)=>{const r=((e,t)=>{const o=sn.fromTable(e);return fl(o,t,!0)})(t.clipboard,t.generators),s=((e,t)=>({row:e,column:t}))(t.row,t.column);return Ll(s,e,r,t.generators,o).fold((()=>ya(e,x.some(t.element))),(e=>xa(e,t.row,t.column)))}),((e,t)=>Yt(t.element).bind((o=>hl(e,o).map((e=>({...e,generators:t.generators,clipboard:t.clipboard})))))),Ea,f,ia),ec=bl(((e,t,o,n)=>{const r=Qo(e).rows,s=t.cells[0].column,l=r[t.cells[0].row],a=ka(t.clipboard,t.generators,l),c=Wl(s,e,a,t.generators,o);return xa(c,t.cells[0].row,t.cells[0].column)}),La(!0),f,f,ia),tc=bl(((e,t,o,n)=>{const r=Qo(e).rows,s=t.cells[t.cells.length-1].column+t.cells[t.cells.length-1].colspan,l=r[t.cells[0].row],a=ka(t.clipboard,t.generators,l),c=Wl(s,e,a,t.generators,o);return xa(c,t.cells[0].row,t.cells[0].column)}),La(!1),f,f,ia),oc=bl(((e,t,o,n)=>{const r=Qo(e).rows,s=t.cells[0].row,l=r[s],a=ka(t.clipboard,t.generators,l),c=Ml(s,e,a,t.generators,o);return xa(c,t.cells[0].row,t.cells[0].column)}),wl,f,f,ia),nc=bl(((e,t,o,n)=>{const r=Qo(e).rows,s=t.cells[t.cells.length-1].row+t.cells[t.cells.length-1].rowspan,l=r[t.cells[0].row],a=ka(t.clipboard,t.generators,l),c=Ml(s,e,a,t.generators,o);return xa(c,t.cells[0].row,t.cells[0].column)}),wl,f,f,ia),rc=(e,t)=>{const o=sn.fromTable(e);return vl(o,t).bind((e=>{const t=e[e.length-1],n=e[0].column,r=t.column+t.colspan,s=M(E(o.all,(e=>B(e.cells,(e=>e.column>=n&&e.column<r)))));return Js(s)})).getOr("")},sc=(e,t)=>{const o=sn.fromTable(e);return vl(o,t).bind(Js).getOr("")},lc=(e,t)=>{const o=sn.fromTable(e);return vl(o,t).bind((e=>{const t=e[e.length-1],n=e[0].row,r=t.row+t.rowspan;return(e=>{const t=E(e,(e=>Ys(e).type)),o=D(t,"header"),n=D(t,"footer");if(o||n){const e=D(t,"body");return!o||e||n?o||e||!n?x.none():x.some("footer"):x.some("header")}return x.some("body")})(o.all.slice(n,r))})).getOr("")},ac=(e,t)=>e.dispatch("NewRow",{node:t}),cc=(e,t)=>e.dispatch("NewCell",{node:t}),ic=(e,t,o)=>{e.dispatch("TableModified",{...o,table:t})},mc={structure:!1,style:!0},dc={structure:!0,style:!1},uc={structure:!0,style:!0},fc=e=>t=>t.options.get(e),gc="100%",hc=e=>{var t;const o=e.dom,n=null!==(t=o.getParent(e.selection.getStart(),o.isBlock))&&void 0!==t?t:e.getBody();return Ho(Te.fromDom(n))+"px"},pc=e=>x.from(e.options.get("table_clone_elements")),bc=fc("table_header_type"),wc=fc("table_column_resizing"),vc=e=>"preservetable"===wc(e),yc=e=>"resizetable"===wc(e),Cc=fc("table_sizing_mode"),xc=e=>"relative"===Cc(e),Tc=e=>"fixed"===Cc(e),Sc=e=>"responsive"===Cc(e),Rc=fc("table_resize_bars"),Dc=fc("table_style_by_css"),Oc=e=>{const t=e.options,o=t.get("table_default_attributes");return t.isSet("table_default_attributes")?o:((e,t)=>Sc(e)||Dc(e)?t:Tc(e)?{...t,width:hc(e)}:{...t,width:gc})(e,o)},kc=e=>{const t=e.options,o=t.get("table_default_styles");return t.isSet("table_default_styles")?o:((e,t)=>Sc(e)||!Dc(e)?t:Tc(e)?{...t,width:hc(e)}:{...t,width:gc})(e,o)},Ec=fc("table_use_colgroups"),Nc=(e,t)=>xc(e)?hr(t):Tc(e)?gr(t):fr(t),Ac=(e,t,o)=>{const n=e=>"table"===se(Pr(e)),r=pc(e),s=yc(e)?f:Ms,l=t=>{switch(bc(e)){case"section":return nl();case"sectionCells":return rl();case"cells":return sl();default:return ol(t,"section")}},a=(t,n)=>n.cursor.fold((()=>{const n=Jt(t);return H(n).filter(mt).map((n=>{o.clearSelectedCells(t.dom);const r=e.dom.createRng();return r.selectNode(n.dom),e.selection.setRng(r),pe(n,"data-mce-selected","1"),r}))}),(n=>{const r=Ls(Ws,n);const s=e.dom.createRng();return s.setStart(r.element.dom,r.offset),s.setEnd(r.element.dom,r.offset),e.selection.setRng(s),o.clearSelectedCells(t.dom),x.some(s)})),c=(o,n,s,c)=>(i,m,d=!1)=>{Hr(i);const u=Te.fromDom(e.getDoc()),f=Lr(s,u,r),g={sizing:Nc(e,i),resize:yc(e)?$s():Vs(),section:l(i)};return n(i)?o(i,m,f,g).bind((o=>{t.refresh(i.dom),N(o.newRows,(t=>{ac(e,t.dom)})),N(o.newCells,(t=>{cc(e,t.dom)}));const n=a(i,o);return mt(i)&&(Hr(i),d||ic(e,i.dom,c)),n.map((e=>({rng:e,effect:c})))})):x.none()},i=c($a,(t=>!n(e)||qs(t).rows>1),f,dc),m=c(Ha,(t=>!n(e)||qs(t).columns>1),f,dc);return{deleteRow:i,deleteColumn:m,insertRowsBefore:c(_a,C,f,dc),insertRowsAfter:c(Ia,C,f,dc),insertColumnsBefore:c(Pa,C,s,dc),insertColumnsAfter:c(Fa,C,s,dc),mergeCells:c(Qa,C,f,dc),unmergeCells:c(Xa,C,f,dc),pasteColsBefore:c(ec,C,f,dc),pasteColsAfter:c(tc,C,f,dc),pasteRowsBefore:c(oc,C,f,dc),pasteRowsAfter:c(nc,C,f,dc),pasteCells:c(Za,C,f,uc),makeCellsHeader:c(Ya,C,f,dc),unmakeCellsHeader:c(Ja,C,f,dc),makeColumnsHeader:c(Va,C,f,dc),unmakeColumnsHeader:c(qa,C,f,dc),makeRowsHeader:c(Ua,C,f,dc),makeRowsBody:c(Ga,C,f,dc),makeRowsFooter:c(Ka,C,f,dc),getTableRowType:lc,getTableCellType:sc,getTableColType:rc}},Bc=(e,t,o)=>{const n=Pt(e,t,1);1===o||n<=1?ye(e,t):pe(e,t,Math.min(o,n))},jc=(e,t)=>o=>{const n=o.column+o.colspan-1,r=o.column;return n>=e&&r<t},zc=(e,t)=>{const o=sn.fromTable(e);return yl(o,t).map((e=>{const t=e[e.length-1],n=e[0].column,r=t.column+t.colspan,s=((e,t,o)=>{if(sn.hasColumns(e)){const n=B(sn.justColumns(e),jc(t,o)),r=E(n,(e=>{const n=Qe(e.element);return Bc(n,"span",o-t),n})),s=Te.fromTag("colgroup");return qe(s,r),[s]}return[]})(o,n,r),l=((e,t,o)=>E(e.all,(e=>{const n=B(e.cells,jc(t,o)),r=E(n,(e=>{const n=Qe(e.element);return Bc(n,"colspan",o-t),n})),s=Te.fromTag("tr");return qe(s,r),s})))(o,n,r);return[...s,...l]}))},Lc=(e,t,o)=>{const n=sn.fromTable(e);return vl(n,t).bind((e=>{const t=fl(n,o,!1),r=Qo(t).rows.slice(e[0].row,e[e.length-1].row+e[e.length-1].rowspan),s=_(r,(e=>{const t=B(e.cells,(e=>!e.isLocked));return t.length>0?[{...e,cells:t}]:[]})),l=gl(s);return Rt(l.length>0,l)})).map((e=>(e=>E(e,(e=>{const t=Je(e.element);return N(e.cells,(e=>{const o=Qe(e.element);al(o,"colspan",e.colspan,1),al(o,"rowspan",e.rowspan,1),He(t,o)})),t})))(e)))},Wc=Kl([{invalid:["raw"]},{pixels:["value"]},{percent:["value"]}]),Mc=(e,t,o)=>{const n=o.substring(0,o.length-e.length),r=parseFloat(n);return n===r.toString()?t(r):Wc.invalid(o)},_c={...Wc,from:e=>Et(e,"%")?Mc("%",Wc.percent,e):Et(e,"px")?Mc("px",Wc.pixels,e):Wc.invalid(e)},Ic=(e,t,o)=>e.fold((()=>t),(e=>((e,t,o)=>{const n=o/t;return E(e,(e=>_c.from(e).fold((()=>e),(e=>e*n+"px"),(e=>e/100*o+"px"))))})(t,o,e)),(e=>((e,t)=>E(e,(e=>_c.from(e).fold((()=>e),(e=>e/t*100+"%"),(e=>e+"%")))))(t,o))),Pc=(e,t,o)=>{const n=_c.from(o),r=I(e,(e=>"0px"===e))?((e,t)=>{const o=e.fold((()=>g("")),(e=>g(e/t+"px")),(()=>g(100/t+"%")));return k(t,o)})(n,e.length):Ic(n,e,t);return $c(r)},Fc=(e,t)=>0===e.length?t:j(e,((e,t)=>_c.from(t).fold(g(0),h,h)+e),0),Hc=(e,t)=>_c.from(e).fold(g(e),(e=>e+t+"px"),(e=>e+t+"%")),$c=e=>{if(0===e.length)return e;const t=j(e,((e,t)=>{const o=_c.from(t).fold((()=>({value:t,remainder:0})),(e=>((e,t)=>{const o=Math.floor(e);return{value:o+t,remainder:e-o}})(e,"px")),(e=>({value:e+"%",remainder:0})));return{output:[o.value].concat(e.output),remainder:e.remainder+o.remainder}}),{output:[],remainder:0}),o=t.output;return o.slice(0,o.length-1).concat([Hc(o[o.length-1],Math.round(t.remainder))])},Vc=_c.from,qc=e=>Vc(e).fold(g("px"),g("px"),g("%")),Uc=(e,t,o)=>{const n=sn.fromTable(e),r=n.all,s=sn.justCells(n),l=sn.justColumns(n);t.each((t=>{const o=qc(t),r=Po(e),a=((e,t)=>sr(e,t,or,lr))(n,e),c=Pc(a,r,t);sn.hasColumns(n)?((e,t,o)=>{N(t,((t,n)=>{const r=Fc([e[n]],qt());zt(t.element,"width",r+o)}))})(c,l,o):((e,t,o)=>{N(t,(t=>{const n=e.slice(t.column,t.colspan+t.column),r=Fc(n,qt());zt(t.element,"width",r+o)}))})(c,s,o),zt(e,"width",t)})),o.each((t=>{const o=qc(t),l=gn(e),a=((e,t,o)=>cr(e,t,o,nr,lr))(n,e,Bn);((e,t,o,n)=>{N(o,(t=>{const o=e.slice(t.row,t.rowspan+t.row),r=Fc(o,Ut());zt(t.element,"height",r+n)})),N(t,((t,o)=>{zt(t.element,"height",e[o])}))})(Pc(a,l,t),r,s,o),zt(e,"height",t)}))},Gc=e=>Kn(e).exists((e=>_n.test(e))),Kc=e=>Kn(e).exists((e=>In.test(e))),Yc=e=>Kn(e).isNone(),Jc=e=>{ye(e,"width")},Qc=e=>{const t=Zn(e);Uc(e,x.some(t),x.none()),Jc(e)},Xc=e=>{const t=(e=>Po(e)+"px")(e);Uc(e,x.some(t),x.none()),Jc(e)},Zc=e=>{It(e,"width");const t=Qt(e),o=t.length>0?t:Jt(e);N(o,(e=>{It(e,"width"),Jc(e)})),Jc(e)},ei={styles:{"border-collapse":"collapse",width:"100%"},attributes:{border:"1"},colGroups:!1},ti=e=>{const t=Te.fromTag("colgroup");return k(e,(()=>He(t,Te.fromTag("col")))),t},oi=(e,t,o,n)=>k(e,(e=>((e,t,o,n)=>{const r=Te.fromTag("tr");for(let s=0;s<e;s++){const e=n<t||s<o?Te.fromTag("th"):Te.fromTag("td");s<o&&pe(e,"scope","row"),n<t&&pe(e,"scope","col"),He(e,Te.fromTag("br")),He(r,e)}return r})(t,o,n,e))),ni=(e,t)=>{e.selection.select(t.dom,!0),e.selection.collapse(!0)},ri=(e,t,o,n,s)=>{const l=kc(e),a={styles:l,attributes:Oc(e),colGroups:Ec(e)};return e.undoManager.ignore((()=>{const r=((e,t,o,n,r,s=ei)=>{const l=Te.fromTag("table"),a="cells"!==r;Lt(l,s.styles),be(l,s.attributes),s.colGroups&&He(l,ti(t));const c=Math.min(e,o);if(a&&o>0){const e=Te.fromTag("thead");He(l,e);const s=oi(o,t,"sectionCells"===r?c:0,n);qe(e,s)}const i=Te.fromTag("tbody");He(l,i);const m=oi(a?e-c:e,t,a?0:o,n);return qe(i,m),l})(o,t,s,n,bc(e),a);pe(r,"data-mce-id","__mce");const l=(e=>{const t=Te.fromTag("div"),o=Te.fromDom(e.dom.cloneNode(!0));return He(t,o),(e=>e.dom.innerHTML)(t)})(r);e.insertContent(l),e.addVisual()})),Ct(Pr(e),'table[data-mce-id="__mce"]').map((t=>(Tc(e)?Xc(t):Sc(e)?Zc(t):(xc(e)||(e=>r(e)&&-1!==e.indexOf("%"))(l.width))&&Qc(t),Hr(t),ye(t,"data-mce-id"),((e,t)=>{N(ht(t,"tr"),(t=>{ac(e,t.dom),N(ht(t,"th,td"),(t=>{cc(e,t.dom)}))}))})(e,t),((e,t)=>{Ct(t,"td,th").each(b(ni,e))})(e,t),t.dom))).getOrNull()};var si=tinymce.util.Tools.resolve("tinymce.FakeClipboard");const li="x-tinymce/dom-table-",ai=li+"rows",ci=li+"columns",ii=e=>{const t=si.FakeClipboardItem(e);si.write([t])},mi=e=>{var t;const o=null!==(t=si.read())&&void 0!==t?t:[];return V(o,(t=>x.from(t.getType(e))))},di=e=>{mi(e).isSome()&&si.clear()},ui=e=>{e.fold(gi,(e=>ii({[ai]:e})))},fi=()=>mi(ai),gi=()=>di(ai),hi=e=>{e.fold(bi,(e=>ii({[ci]:e})))},pi=()=>mi(ci),bi=()=>di(ci),wi=e=>Os($r(e),Fr(e)).filter(Ur),vi=(e,t)=>{const o=Fr(e),n=e=>Xt(e,o),l=t=>(e=>ks($r(e),Fr(e)).filter(Ur))(e).bind((e=>n(e).map((o=>t(o,e))))),a=t=>{e.focus()},c=(t,o=!1)=>l(((n,r)=>{const s=Rs(Es(e),n,r);t(n,s,o).each(a)})),i=()=>l(((t,o)=>{const n=Rs(Es(e),t,o),r=Lr(f,Te.fromDom(e.getDoc()),x.none());return Lc(t,n,r)})),m=()=>l(((t,o)=>{const n=Rs(Es(e),t,o);return zc(t,n)})),d=(t,o)=>o().each((o=>{const n=E(o,(e=>Qe(e)));l(((o,r)=>{const s=Wr(Te.fromDom(e.getDoc())),l=((e,t,o,n)=>({selection:ws(e),clipboard:o,generators:n}))(Es(e),0,n,s);t(o,l).each(a)}))})),g=e=>(t,o)=>((e,t)=>Z(e,t)?x.from(e[t]):x.none())(o,"type").each((t=>{c(e(t),o.no_events)}));G({mceTableSplitCells:()=>c(t.unmergeCells),mceTableMergeCells:()=>c(t.mergeCells),mceTableInsertRowBefore:()=>c(t.insertRowsBefore),mceTableInsertRowAfter:()=>c(t.insertRowsAfter),mceTableInsertColBefore:()=>c(t.insertColumnsBefore),mceTableInsertColAfter:()=>c(t.insertColumnsAfter),mceTableDeleteCol:()=>c(t.deleteColumn),mceTableDeleteRow:()=>c(t.deleteRow),mceTableCutCol:()=>m().each((e=>{hi(e),c(t.deleteColumn)})),mceTableCutRow:()=>i().each((e=>{ui(e),c(t.deleteRow)})),mceTableCopyCol:()=>m().each((e=>hi(e))),mceTableCopyRow:()=>i().each((e=>ui(e))),mceTablePasteColBefore:()=>d(t.pasteColsBefore,pi),mceTablePasteColAfter:()=>d(t.pasteColsAfter,pi),mceTablePasteRowBefore:()=>d(t.pasteRowsBefore,fi),mceTablePasteRowAfter:()=>d(t.pasteRowsAfter,fi),mceTableDelete:()=>wi(e).each((t=>{Xt(t,o).filter(w(o)).each((t=>{const o=Te.fromText("");if(Pe(t,o),Ge(t),e.dom.isEmpty(e.getBody()))e.setContent(""),e.selection.setCursorLocation();else{const t=e.dom.createRng();t.setStart(o.dom,0),t.setEnd(o.dom,0),e.selection.setRng(t),e.nodeChanged()}}))})),mceTableCellToggleClass:(t,o)=>{l((t=>{const n=Es(e),r=I(n,(t=>e.formatter.match("tablecellclass",{value:o},t.dom))),s=r?e.formatter.remove:e.formatter.apply;N(n,(e=>s("tablecellclass",{value:o},e.dom))),ic(e,t.dom,mc)}))},mceTableToggleClass:(t,o)=>{l((t=>{e.formatter.toggle("tableclass",{value:o},t.dom),ic(e,t.dom,mc)}))},mceTableToggleCaption:()=>{wi(e).each((t=>{Xt(t,o).each((o=>{yt(o,"caption").fold((()=>{const t=Te.fromTag("caption");He(t,Te.fromText("Caption")),((e,t,o)=>{_e(e,o).fold((()=>{He(e,t)}),(e=>{Ie(e,t)}))})(o,t,0),e.selection.setCursorLocation(t.dom,0)}),(n=>{ge("caption")(t)&&De("td",o).each((t=>e.selection.setCursorLocation(t.dom,0))),Ge(n)})),ic(e,o.dom,dc)}))}))},mceTableSizingMode:(t,n)=>(t=>wi(e).each((n=>{Sc(e)||Tc(e)||xc(e)||Xt(n,o).each((o=>{"relative"!==t||Gc(o)?"fixed"!==t||Kc(o)?"responsive"!==t||Yc(o)||Zc(o):Xc(o):Qc(o),Hr(o),ic(e,o.dom,dc)}))})))(n),mceTableCellType:g((e=>"th"===e?t.makeCellsHeader:t.unmakeCellsHeader)),mceTableColType:g((e=>"th"===e?t.makeColumnsHeader:t.unmakeColumnsHeader)),mceTableRowType:g((e=>{switch(e){case"header":return t.makeRowsHeader;case"footer":return t.makeRowsFooter;default:return t.makeRowsBody}}))},((t,o)=>e.addCommand(o,t))),e.addCommand("mceInsertTable",((t,o)=>{((e,t,o,n={})=>{const r=e=>u(e)&&e>0;if(r(t)&&r(o)){const r=n.headerRows||0,s=n.headerColumns||0;return ri(e,o,t,s,r)}console.error("Invalid values for mceInsertTable - rows and columns values are required to insert a table.")})(e,o.rows,o.columns,o.options)})),e.addCommand("mceTableApplyCellStyle",((t,o)=>{const l=e=>"tablecell"+e.toLowerCase().replace("-","");if(!s(o))return;const a=B(Es(e),Ur);if(0===a.length)return;const c=J(o,((t,o)=>e.formatter.has(l(o))&&r(t)));(e=>{for(const t in e)if(U.call(e,t))return!1;return!0})(c)||(G(c,((t,o)=>{const n=l(o);N(a,(o=>{""===t?e.formatter.remove(n,{value:null},o.dom,!0):e.formatter.apply(n,{value:t},o.dom)}))})),n(a[0]).each((t=>ic(e,t.dom,mc))))}))},yi=Kl([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Ci={before:yi.before,on:yi.on,after:yi.after,cata:(e,t,o,n)=>e.fold(t,o,n),getStart:e=>e.fold(h,h,h)},xi=(e,t)=>({selection:e,kill:t}),Ti=(e,t)=>{const o=e.document.createRange();return o.selectNode(t.dom),o},Si=(e,t)=>{const o=e.document.createRange();return Ri(o,t),o},Ri=(e,t)=>e.selectNodeContents(t.dom),Di=(e,t,o)=>{const n=e.document.createRange();var r;return r=n,t.fold((e=>{r.setStartBefore(e.dom)}),((e,t)=>{r.setStart(e.dom,t)}),(e=>{r.setStartAfter(e.dom)})),((e,t)=>{t.fold((t=>{e.setEndBefore(t.dom)}),((t,o)=>{e.setEnd(t.dom,o)}),(t=>{e.setEndAfter(t.dom)}))})(n,o),n},Oi=(e,t,o,n,r)=>{const s=e.document.createRange();return s.setStart(t.dom,o),s.setEnd(n.dom,r),s},ki=e=>({left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}),Ei=Kl([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Ni=(e,t,o)=>t(Te.fromDom(o.startContainer),o.startOffset,Te.fromDom(o.endContainer),o.endOffset),Ai=(e,t)=>{const o=((e,t)=>t.match({domRange:e=>({ltr:g(e),rtl:x.none}),relative:(t,o)=>({ltr:ro((()=>Di(e,t,o))),rtl:ro((()=>x.some(Di(e,o,t))))}),exact:(t,o,n,r)=>({ltr:ro((()=>Oi(e,t,o,n,r))),rtl:ro((()=>x.some(Oi(e,n,r,t,o))))})}))(e,t);return((e,t)=>{const o=t.ltr();if(o.collapsed)return t.rtl().filter((e=>!1===e.collapsed)).map((e=>Ei.rtl(Te.fromDom(e.endContainer),e.endOffset,Te.fromDom(e.startContainer),e.startOffset))).getOrThunk((()=>Ni(0,Ei.ltr,o)));return Ni(0,Ei.ltr,o)})(0,o)},Bi=(e,t)=>Ai(e,t).match({ltr:(t,o,n,r)=>{const s=e.document.createRange();return s.setStart(t.dom,o),s.setEnd(n.dom,r),s},rtl:(t,o,n,r)=>{const s=e.document.createRange();return s.setStart(n.dom,r),s.setEnd(t.dom,o),s}});Ei.ltr,Ei.rtl;const ji=(e,t,o,n)=>({start:e,soffset:t,finish:o,foffset:n}),zi=(e,t,o,n)=>({start:Ci.on(e,t),finish:Ci.on(o,n)}),Li=(e,t)=>{const o=Bi(e,t);return ji(Te.fromDom(o.startContainer),o.startOffset,Te.fromDom(o.endContainer),o.endOffset)},Wi=zi,Mi=(e,t,o,n,r)=>Oe(o,n)?x.none():us(o,n,t).bind((t=>{const n=t.boxes.getOr([]);return n.length>1?(r(e,n,t.start,t.finish),x.some(xi(x.some(Wi(o,0,o,xr(o))),!0))):x.none()})),_i=(e,t)=>({item:e,mode:t}),Ii=(e,t,o,n=Pi)=>e.property().parent(t).map((e=>_i(e,n))),Pi=(e,t,o,n=Fi)=>o.sibling(e,t).map((e=>_i(e,n))),Fi=(e,t,o,n=Fi)=>{const r=e.property().children(t);return o.first(r).map((e=>_i(e,n)))},Hi=[{current:Ii,next:Pi,fallback:x.none()},{current:Pi,next:Fi,fallback:x.some(Ii)},{current:Fi,next:Fi,fallback:x.some(Pi)}],$i=(e,t,o,n,r=Hi)=>L(r,(e=>e.current===o)).bind((o=>o.current(e,t,n,o.next).orThunk((()=>o.fallback.bind((o=>$i(e,t,o,n))))))),Vi=()=>({sibling:(e,t)=>e.query().prevSibling(t),first:e=>e.length>0?x.some(e[e.length-1]):x.none()}),qi=()=>({sibling:(e,t)=>e.query().nextSibling(t),first:e=>e.length>0?x.some(e[0]):x.none()}),Ui=(e,t,o,n,r,s)=>$i(e,t,n,r).bind((t=>s(t.item)?x.none():o(t.item)?x.some(t.item):Ui(e,t.item,o,t.mode,r,s))),Gi=e=>t=>0===e.property().children(t).length,Ki=(e,t,o,n)=>Ui(e,t,o,Pi,Vi(),n),Yi=(e,t,o,n)=>Ui(e,t,o,Pi,qi(),n),Ji=rs(),Qi=(e,t)=>((e,t,o)=>Ki(e,t,Gi(e),o))(Ji,e,t),Xi=(e,t)=>((e,t,o)=>Yi(e,t,Gi(e),o))(Ji,e,t),Zi=Kl([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}]),em=e=>xt(e,"tr"),tm={...Zi,verify:(e,t,o,n,r,s,l)=>xt(n,"td,th",l).bind((o=>xt(t,"td,th",l).map((t=>Oe(o,t)?Oe(n,o)&&xr(o)===r?s(t):Zi.none("in same cell"):ms(em,[o,t]).fold((()=>((e,t,o)=>{const n=e.getRect(t),r=e.getRect(o);return r.right>n.left&&r.left<n.right})(e,t,o)?Zi.success():s(t)),(e=>s(t))))))).getOr(Zi.none("default")),cata:(e,t,o,n,r)=>e.fold(t,o,n,r)},om=(e,t)=>W(e,b(Oe,t)),nm=ge("br"),rm=(e,t,o)=>t(e,o).bind((e=>de(e)&&0===vr(e).trim().length?rm(e,t,o):x.some(e))),sm=(e,t,o,n)=>((e,t)=>_e(e,t).filter(nm).orThunk((()=>_e(e,t-1).filter(nm))))(t,o).bind((t=>n.traverse(t).fold((()=>rm(t,n.gather,e).map(n.relative)),(e=>(e=>Be(e).bind((t=>{const o=Me(t);return om(o,e).map((n=>((e,t,o,n)=>({parent:e,children:t,element:o,index:n}))(t,o,e,n)))})))(e).map((e=>Ci.on(e.parent,e.index))))))),lm=(e,t,o,n)=>{const r=nm(t)?((e,t,o)=>o.traverse(t).orThunk((()=>rm(t,o.gather,e))).map(o.relative))(e,t,n):sm(e,t,o,n);return r.map((e=>({start:e,finish:e})))},am=(e,t)=>({left:e.left,top:e.top+t,right:e.right,bottom:e.bottom+t}),cm=(e,t)=>({left:e.left,top:e.top-t,right:e.right,bottom:e.bottom-t}),im=(e,t,o)=>({left:e.left+t,top:e.top+o,right:e.right+t,bottom:e.bottom+o}),mm=e=>({left:e.left,top:e.top,right:e.right,bottom:e.bottom}),dm=(e,t)=>x.some(e.getRect(t)),um=(e,t,o)=>me(t)?dm(e,t).map(mm):de(t)?((e,t,o)=>o>=0&&o<xr(t)?e.getRangedRect(t,o,t,o+1):o>0?e.getRangedRect(t,o-1,t,o):x.none())(e,t,o).map(mm):x.none(),fm=(e,t)=>me(t)?dm(e,t).map(mm):de(t)?e.getRangedRect(t,0,t,xr(t)).map(mm):x.none(),gm=Kl([{none:[]},{retry:["caret"]}]),hm=(e,t,o)=>wt(t,ga).fold(y,(t=>fm(e,t).exists((e=>((e,t)=>e.left<t.left||Math.abs(t.right-e.left)<1||e.left>t.right)(o,e))))),pm={point:e=>e.bottom,adjuster:(e,t,o,n,r)=>{const s=am(r,5);return Math.abs(o.bottom-n.bottom)<1||o.top>r.bottom?gm.retry(s):o.top===r.bottom?gm.retry(am(r,1)):hm(e,t,r)?gm.retry(im(s,5,0)):gm.none()},move:am,gather:Xi},bm=(e,t,o,n,r)=>0===r?x.some(n):((e,t,o)=>e.elementFromPoint(t,o).filter((e=>"table"===se(e))).isSome())(e,n.left,t.point(n))?((e,t,o,n,r)=>bm(e,t,o,t.move(n,5),r))(e,t,o,n,r-1):e.situsFromPoint(n.left,t.point(n)).bind((s=>s.start.fold(x.none,(s=>fm(e,s).bind((l=>t.adjuster(e,s,l,o,n).fold(x.none,(n=>bm(e,t,o,n,r-1))))).orThunk((()=>x.some(n)))),x.none))),wm=(e,t,o)=>{const n=e.move(o,5),r=bm(t,e,o,n,100).getOr(n);return((e,t,o)=>e.point(t)>o.getInnerHeight()?x.some(e.point(t)-o.getInnerHeight()):e.point(t)<0?x.some(-e.point(t)):x.none())(e,r,t).fold((()=>t.situsFromPoint(r.left,e.point(r))),(o=>(t.scrollBy(0,o),t.situsFromPoint(r.left,e.point(r)-o))))},vm={tryUp:b(wm,{point:e=>e.top,adjuster:(e,t,o,n,r)=>{const s=cm(r,5);return Math.abs(o.top-n.top)<1||o.bottom<r.top?gm.retry(s):o.bottom===r.top?gm.retry(cm(r,1)):hm(e,t,r)?gm.retry(im(s,5,0)):gm.none()},move:cm,gather:Qi}),tryDown:b(wm,pm),getJumpSize:g(5)},ym=(e,t,o)=>e.getSelection().bind((n=>lm(t,n.finish,n.foffset,o).fold((()=>x.some(As(n.finish,n.foffset))),(r=>{const s=e.fromSitus(r);return(e=>tm.cata(e,(e=>x.none()),(()=>x.none()),(e=>x.some(As(e,0))),(e=>x.some(As(e,xr(e))))))(tm.verify(e,n.finish,n.foffset,s.finish,s.foffset,o.failure,t))})))),Cm=(e,t,o,n,r,s)=>0===s?x.none():Sm(e,t,o,n,r).bind((l=>{const a=e.fromSitus(l),c=tm.verify(e,o,n,a.finish,a.foffset,r.failure,t);return tm.cata(c,(()=>x.none()),(()=>x.some(l)),(l=>Oe(o,l)&&0===n?xm(e,o,n,cm,r):Cm(e,t,l,0,r,s-1)),(l=>Oe(o,l)&&n===xr(l)?xm(e,o,n,am,r):Cm(e,t,l,xr(l),r,s-1)))})),xm=(e,t,o,n,r)=>um(e,t,o).bind((t=>Tm(e,r,n(t,vm.getJumpSize())))),Tm=(e,t,o)=>{const n=zo().browser;return n.isChromium()||n.isSafari()||n.isFirefox()?t.retry(e,o):x.none()},Sm=(e,t,o,n,r)=>um(e,o,n).bind((t=>Tm(e,r,t))),Rm=(e,t)=>{return bt(e,(e=>Be(e).exists((e=>Oe(e,t)))),o).isSome();var o},Dm=(e,t,o,n,r)=>xt(n,"td,th",t).bind((n=>xt(n,"table",t).bind((s=>Rm(r,s)?((e,t,o)=>ym(e,t,o).bind((n=>Cm(e,t,n.element,n.offset,o,20).map(e.fromSitus))))(e,t,o).bind((e=>xt(e.finish,"td,th",t).map((t=>({start:n,finish:t,range:e}))))):x.none())))),Om=(e,t,o,n,r,s)=>s(n,t).orThunk((()=>Dm(e,t,o,n,r).map((e=>{const t=e.range;return xi(x.some(Wi(t.start,t.soffset,t.finish,t.foffset)),!0)})))),km=(e,t)=>xt(e,"tr",t).bind((e=>xt(e,"table",t).bind((o=>{const n=ht(o,"tr");return Oe(e,n[0])?((e,t,o)=>Ki(Ji,e,t,o))(o,(e=>Dr(e).isSome()),t).map((e=>{const t=xr(e);return xi(x.some(Wi(e,t,e,t)),!0)})):x.none()})))),Em=(e,t)=>xt(e,"tr",t).bind((e=>xt(e,"table",t).bind((o=>{const n=ht(o,"tr");return Oe(e,n[n.length-1])?((e,t,o)=>Yi(Ji,e,t,o))(o,(e=>Rr(e).isSome()),t).map((e=>xi(x.some(Wi(e,0,e,0)),!0))):x.none()})))),Nm=(e,t,o,n,r,s,l)=>Dm(e,o,n,r,s).bind((e=>Mi(t,o,e.start,e.finish,l))),Am=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},Bm=()=>{const e=(e=>{const t=Am(x.none()),o=()=>t.get().each(e);return{clear:()=>{o(),t.set(x.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{o(),t.set(x.some(e))}}})(f);return{...e,on:t=>e.get().each(t)}},jm=(e,t)=>xt(e,"td,th",t),zm=e=>je(e).exists(_r),Lm={traverse:We,gather:Xi,relative:Ci.before,retry:vm.tryDown,failure:tm.failedDown},Wm={traverse:Le,gather:Qi,relative:Ci.before,retry:vm.tryUp,failure:tm.failedUp},Mm=e=>t=>t===e,_m=Mm(38),Im=Mm(40),Pm=e=>e>=37&&e<=40,Fm={isBackward:Mm(37),isForward:Mm(39)},Hm={isBackward:Mm(39),isForward:Mm(37)},$m=Kl([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Vm={domRange:$m.domRange,relative:$m.relative,exact:$m.exact,exactFromRange:e=>$m.exact(e.start,e.soffset,e.finish,e.foffset),getWin:e=>{const t=(e=>e.match({domRange:e=>Te.fromDom(e.startContainer),relative:(e,t)=>Ci.getStart(e),exact:(e,t,o,n)=>e}))(e);return o=t,Te.fromDom(Ae(o).dom.defaultView);var o},range:ji},qm=(e,t,o)=>{var n,r;return x.from(null===(r=(n=e.dom).caretPositionFromPoint)||void 0===r?void 0:r.call(n,t,o)).bind((t=>{if(null===t.offsetNode)return x.none();const o=e.dom.createRange();return o.setStart(t.offsetNode,t.offset),o.collapse(),x.some(o)}))},Um=(e,t,o)=>{var n,r;return x.from(null===(r=(n=e.dom).caretRangeFromPoint)||void 0===r?void 0:r.call(n,t,o))},Gm=document.caretPositionFromPoint?qm:document.caretRangeFromPoint?Um:x.none,Km=(e,t)=>{const o=se(e);return"input"===o?Ci.after(e):D(["br","img"],o)?0===t?Ci.before(e):Ci.after(e):Ci.on(e,t)},Ym=(e,t,o,n)=>{const r=((e,t,o,n)=>{const r=Ne(e).dom.createRange();return r.setStart(e.dom,t),r.setEnd(o.dom,n),r})(e,t,o,n),s=Oe(e,o)&&t===n;return r.collapsed&&!s},Jm=e=>x.from(e.getSelection()),Qm=(e,t)=>{Jm(e).each((e=>{e.removeAllRanges(),e.addRange(t)}))},Xm=(e,t,o,n,r)=>{const s=Oi(e,t,o,n,r);Qm(e,s)},Zm=(e,t)=>Ai(e,t).match({ltr:(t,o,n,r)=>{Xm(e,t,o,n,r)},rtl:(t,o,n,r)=>{Jm(e).each((s=>{if(s.setBaseAndExtent)s.setBaseAndExtent(t.dom,o,n.dom,r);else if(s.extend)try{((e,t,o,n,r,s)=>{t.collapse(o.dom,n),t.extend(r.dom,s)})(0,s,t,o,n,r)}catch(s){Xm(e,n,r,t,o)}else Xm(e,n,r,t,o)}))}}),ed=(e,t,o,n,r)=>{const s=((e,t,o,n)=>{const r=Km(e,t),s=Km(o,n);return Vm.relative(r,s)})(t,o,n,r);Zm(e,s)},td=(e,t,o)=>{const n=((e,t)=>{const o=e.fold(Ci.before,Km,Ci.after),n=t.fold(Ci.before,Km,Ci.after);return Vm.relative(o,n)})(t,o);Zm(e,n)},od=e=>{if(e.rangeCount>0){const t=e.getRangeAt(0),o=e.getRangeAt(e.rangeCount-1);return x.some(ji(Te.fromDom(t.startContainer),t.startOffset,Te.fromDom(o.endContainer),o.endOffset))}return x.none()},nd=e=>{if(null===e.anchorNode||null===e.focusNode)return od(e);{const t=Te.fromDom(e.anchorNode),o=Te.fromDom(e.focusNode);return Ym(t,e.anchorOffset,o,e.focusOffset)?x.some(ji(t,e.anchorOffset,o,e.focusOffset)):od(e)}},rd=(e,t,o=!0)=>{const n=(o?Si:Ti)(e,t);Qm(e,n)},sd=e=>(e=>Jm(e).filter((e=>e.rangeCount>0)).bind(nd))(e).map((e=>Vm.exact(e.start,e.soffset,e.finish,e.foffset))),ld=(e,t)=>(e=>{const t=e.getClientRects(),o=t.length>0?t[0]:e.getBoundingClientRect();return o.width>0||o.height>0?x.some(o).map(ki):x.none()})(Bi(e,t)),ad=(e,t,o)=>((e,t,o)=>{const n=Te.fromDom(e.document);return Gm(n,t,o).map((e=>ji(Te.fromDom(e.startContainer),e.startOffset,Te.fromDom(e.endContainer),e.endOffset)))})(e,t,o),cd=e=>({elementFromPoint:(t,o)=>Te.fromPoint(Te.fromDom(e.document),t,o),getRect:e=>e.dom.getBoundingClientRect(),getRangedRect:(t,o,n,r)=>{const s=Vm.exact(t,o,n,r);return ld(e,s)},getSelection:()=>sd(e).map((t=>Li(e,t))),fromSitus:t=>{const o=Vm.relative(t.start,t.finish);return Li(e,o)},situsFromPoint:(t,o)=>ad(e,t,o).map((e=>zi(e.start,e.soffset,e.finish,e.foffset))),clearSelection:()=>{(e=>{Jm(e).each((e=>e.removeAllRanges()))})(e)},collapseSelection:(t=!1)=>{sd(e).each((o=>o.fold((e=>e.collapse(t)),((o,n)=>{const r=t?o:n;td(e,r,r)}),((o,n,r,s)=>{const l=t?o:r,a=t?n:s;ed(e,l,a,l,a)}))))},setSelection:t=>{ed(e,t.start,t.soffset,t.finish,t.foffset)},setRelativeSelection:(t,o)=>{td(e,t,o)},selectNode:t=>{rd(e,t,!1)},selectContents:t=>{rd(e,t)},getInnerHeight:()=>e.innerHeight,getScrollY:()=>(e=>{const t=void 0!==e?e.dom:document,o=t.body.scrollLeft||t.documentElement.scrollLeft,n=t.body.scrollTop||t.documentElement.scrollTop;return wn(o,n)})(Te.fromDom(e.document)).top,scrollBy:(t,o)=>{((e,t,o)=>{const n=(void 0!==o?o.dom:document).defaultView;n&&n.scrollBy(e,t)})(t,o,Te.fromDom(e.document))}}),id=(e,t)=>({rows:e,cols:t}),md=(e,t,o,n)=>{const r=((e,t,o,n)=>{const r=Bm(),s=r.clear,l=s=>{r.on((r=>{n.clearBeforeUpdate(t),jm(s.target,o).each((l=>{us(r,l,o).each((o=>{const r=o.boxes.getOr([]);if(1===r.length){const o=r[0],l="false"===Ir(o),a=Tt(Mr(s.target),o,Oe);l&&a&&(n.selectRange(t,r,o,o),e.selectContents(o))}else r.length>1&&(n.selectRange(t,r,o.start,o.finish),e.selectContents(l))}))}))}))};return{clearstate:s,mousedown:e=>{n.clear(t),jm(e.target,o).filter(zm).each(r.set)},mouseover:e=>{l(e)},mouseup:e=>{l(e),s()}}})(cd(e),t,o,n);return{clearstate:r.clearstate,mousedown:r.mousedown,mouseover:r.mouseover,mouseup:r.mouseup}},dd=e=>wt(e,ie).exists(_r),ud=(e,t)=>dd(e)||dd(t),fd=(e,t,o,n)=>{const r=cd(e),s=()=>(n.clear(t),x.none());return{keydown:(e,l,a,c,i,m)=>{const d=e.raw,u=d.which,f=!0===d.shiftKey,g=fs(t,n.selectedSelector).fold((()=>(Pm(u)&&!f&&n.clearBeforeUpdate(t),Pm(u)&&f&&!ud(l,c)?x.none:Im(u)&&f?b(Nm,r,t,o,Lm,c,l,n.selectRange):_m(u)&&f?b(Nm,r,t,o,Wm,c,l,n.selectRange):Im(u)?b(Om,r,o,Lm,c,l,Em):_m(u)?b(Om,r,o,Wm,c,l,km):x.none)),(e=>{const o=o=>()=>{const s=V(o,(o=>((e,t,o,n,r)=>hs(n,e,t,r.firstSelectedSelector,r.lastSelectedSelector).map((e=>(r.clearBeforeUpdate(o),r.selectRange(o,e.boxes,e.start,e.finish),e.boxes))))(o.rows,o.cols,t,e,n)));return s.fold((()=>gs(t,n.firstSelectedSelector,n.lastSelectedSelector).map((e=>{const o=Im(u)||m.isForward(u)?Ci.after:Ci.before;return r.setRelativeSelection(Ci.on(e.first,0),o(e.table)),n.clear(t),xi(x.none(),!0)}))),(e=>x.some(xi(x.none(),!0))))};return Pm(u)&&f&&!ud(l,c)?x.none:Im(u)&&f?o([id(1,0)]):_m(u)&&f?o([id(-1,0)]):m.isBackward(u)&&f?o([id(0,-1),id(-1,0)]):m.isForward(u)&&f?o([id(0,1),id(1,0)]):Pm(u)&&!f?s:x.none}));return g()},keyup:(e,r,s,l,a)=>fs(t,n.selectedSelector).fold((()=>{const c=e.raw,i=c.which;return!0===c.shiftKey&&Pm(i)&&ud(r,l)?((e,t,o,n,r,s,l)=>Oe(o,r)&&n===s?x.none():xt(o,"td,th",t).bind((o=>xt(r,"td,th",t).bind((n=>Mi(e,t,o,n,l))))))(t,o,r,s,l,a,n.selectRange):x.none()}),x.none)}},gd=(e,t)=>{const o=we(e,t);return void 0===o||""===o?[]:o.split(" ")},hd=e=>void 0!==e.dom.classList,pd=(e,t)=>((e,t,o)=>{const n=gd(e,t).concat([o]);return pe(e,t,n.join(" ")),!0})(e,"class",t),bd=(e,t)=>{hd(e)?e.dom.classList.add(t):pd(e,t)},wd=(e,t)=>hd(e)&&e.dom.classList.contains(t),vd=(e,t,o)=>{const n=t=>{ye(t,e.selected),ye(t,e.firstSelected),ye(t,e.lastSelected)},r=t=>{pe(t,e.selected,"1")},s=e=>{l(e),o()},l=t=>{const o=ht(t,`${e.selectedSelector},${e.firstSelectedSelector},${e.lastSelectedSelector}`);N(o,n)};return{clearBeforeUpdate:l,clear:s,selectRange:(o,n,l,a)=>{s(o),N(n,r),pe(l,e.firstSelected,"1"),pe(a,e.lastSelected,"1"),t(n,l,a)},selectedSelector:e.selectedSelector,firstSelectedSelector:e.firstSelectedSelector,lastSelectedSelector:e.lastSelectedSelector}},yd=()=>({tag:"none"}),Cd=e=>({tag:"multiple",elements:e}),xd=e=>({tag:"single",element:e}),Td=(e,t,o)=>{const n=sn.fromTable(e);return vl(n,t).map((e=>{const t=fl(n,o,!1),{rows:r}=Qo(t),s=((e,t)=>{const o=e.slice(0,t[t.length-1].row+1),n=gl(o);return _(n,(e=>{const o=e.cells.slice(0,t[t.length-1].column+1);return E(o,(e=>e.element))}))})(r,e),l=((e,t)=>{const o=e.slice(t[0].row+t[0].rowspan-1,e.length),n=gl(o);return _(n,(e=>{const o=e.cells.slice(t[0].column+t[0].colspan-1,e.cells.length);return E(o,(e=>e.element))}))})(r,e);return{upOrLeftCells:s,downOrRightCells:l}}))},Sd=e=>{const t=Te.fromDom((e=>{if(st()&&m(e.target)){const t=Te.fromDom(e.target);if(me(t)&&it(t)&&e.composed&&e.composedPath){const t=e.composedPath();if(t)return H(t)}}return x.from(e.target)})(e).getOr(e.target)),o=()=>e.stopPropagation(),n=()=>e.preventDefault(),r=(s=n,l=o,(...e)=>s(l.apply(null,e)));var s,l;return((e,t,o,n,r,s,l)=>({target:e,x:t,y:o,stop:n,prevent:r,kill:s,raw:l}))(t,e.clientX,e.clientY,o,n,r,e)},Rd=(e,t,o,n,r)=>{const s=((e,t)=>o=>{e(o)&&t(Sd(o))})(o,n);return e.dom.addEventListener(t,s,r),{unbind:b(Dd,e,t,s,r)}},Dd=(e,t,o,n)=>{e.dom.removeEventListener(t,o,n)},Od=C,kd=(e,t,o)=>((e,t,o,n)=>Rd(e,t,o,n,!1))(e,t,Od,o),Ed=Sd,Nd=e=>!wd(Te.fromDom(e.target),"ephox-snooker-resizer-bar"),Ad=(e,t)=>{const o=((e,t,o)=>({get:()=>ps(e(),o).fold((()=>t().fold(yd,xd)),Cd)}))((()=>Te.fromDom(e.getBody())),(()=>ks($r(e),Fr(e))),Ss.selectedSelector),n=vd(Ss,((t,o,n)=>{Xt(o).each((r=>{const s=pc(e),l=Lr(f,Te.fromDom(e.getDoc()),s),a=Es(e),c=Td(r,{selection:a},l);((e,t,o,n,r)=>{e.dispatch("TableSelectionChange",{cells:t,start:o,finish:n,otherCells:r})})(e,t,o,n,c)}))}),(()=>(e=>{e.dispatch("TableSelectionClear")})(e)));e.on("init",(o=>{const r=e.getWin(),s=Pr(e),l=Fr(e),a=md(r,s,l,n),c=fd(r,s,l,n),i=((e,t,o,n)=>{const r=cd(e);return(e,s)=>{n.clearBeforeUpdate(t),us(e,s,o).each((e=>{const o=e.boxes.getOr([]);n.selectRange(t,o,e.start,e.finish),r.selectContents(s),r.collapseSelection()}))}})(r,s,l,n);e.on("TableSelectorChange",(e=>i(e.start,e.finish)));const m=(t,o)=>{(e=>!0===e.raw.shiftKey)(t)&&(o.kill&&t.kill(),o.selection.each((t=>{const o=Vm.relative(t.start,t.finish),n=Bi(r,o);e.selection.setRng(n)})))},d=e=>0===e.button,u=(()=>{const e=Am(Te.fromDom(s)),t=Am(0);return{touchEnd:o=>{const n=Te.fromDom(o.target);if(ge("td")(n)||ge("th")(n)){const r=e.get(),s=t.get();Oe(r,n)&&o.timeStamp-s<300&&(o.preventDefault(),i(n,n))}e.set(n),t.set(o.timeStamp)}}})();e.on("dragstart",(e=>{a.clearstate()})),e.on("mousedown",(e=>{d(e)&&Nd(e)&&a.mousedown(Ed(e))})),e.on("mouseover",(e=>{var t;void 0!==(t=e).buttons&&0==(1&t.buttons)||!Nd(e)||a.mouseover(Ed(e))})),e.on("mouseup",(e=>{d(e)&&Nd(e)&&a.mouseup(Ed(e))})),e.on("touchend",u.touchEnd),e.on("keyup",(t=>{const o=Ed(t);if(o.raw.shiftKey&&Pm(o.raw.which)){const t=e.selection.getRng(),n=Te.fromDom(t.startContainer),r=Te.fromDom(t.endContainer);c.keyup(o,n,t.startOffset,r,t.endOffset).each((e=>{m(o,e)}))}})),e.on("keydown",(o=>{const n=Ed(o);t.hide();const r=e.selection.getRng(),s=Te.fromDom(r.startContainer),l=Te.fromDom(r.endContainer),a=dn(Fm,Hm)(Te.fromDom(e.selection.getStart()));c.keydown(n,s,r.startOffset,l,r.endOffset,a).each((e=>{m(n,e)})),t.show()})),e.on("NodeChange",(()=>{const t=e.selection,o=Te.fromDom(t.getStart()),r=Te.fromDom(t.getEnd());ms(Xt,[o,r]).fold((()=>n.clear(s)),f)}))})),e.on("PreInit",(()=>{e.serializer.addTempAttr(Ss.firstSelected),e.serializer.addTempAttr(Ss.lastSelected)}));return{getSelectedCells:()=>((e,t,o,n)=>{switch(e.tag){case"none":return t();case"single":return n(e.element);case"multiple":return o(e.elements)}})(o.get(),g([]),(e=>E(e,(e=>e.dom))),(e=>[e.dom])),clearSelectedCells:e=>n.clear(Te.fromDom(e))}},Bd=e=>{let t=[];return{bind:e=>{if(void 0===e)throw new Error("Event bind error: undefined handler");t.push(e)},unbind:e=>{t=B(t,(t=>t!==e))},trigger:(...o)=>{const n={};N(e,((e,t)=>{n[e]=o[t]})),N(t,(e=>{e(n)}))}}},jd=e=>({registry:K(e,(e=>({bind:e.bind,unbind:e.unbind}))),trigger:K(e,(e=>e.trigger))}),zd=e=>e.slice(0).sort(),Ld=(e,t,o)=>{if(0===t.length)throw new Error("You must specify at least one required field.");return((e,t)=>{if(!l(t))throw new Error("The "+e+" fields must be an array. Was: "+t+".");N(t,(t=>{if(!r(t))throw new Error("The value "+t+" in the "+e+" fields was not a string.")}))})("required",t),(e=>{const t=zd(e);L(t,((e,o)=>o<t.length-1&&e===t[o+1])).each((e=>{throw new Error("The field: "+e+" occurs more than once in the combined fields: ["+t.join(", ")+"].")}))})(t),n=>{const r=q(n);I(t,(e=>D(r,e)))||((e,t)=>{throw new Error("All required keys ("+zd(e).join(", ")+") were not specified. Specified keys were: "+zd(t).join(", ")+".")})(t,r),e(t,r);const s=B(t,(e=>!o.validate(n[e],e)));return s.length>0&&((e,t)=>{throw new Error("All values need to be of type: "+t+". Keys ("+zd(e).join(", ")+") were not.")})(s,o.label),n}},Wd=(e,t)=>{const o=B(t,(t=>!D(e,t)));o.length>0&&(e=>{throw new Error("Unsupported keys for object: "+zd(e).join(", "))})(o)},Md=e=>((e,t)=>Ld(e,t,{validate:d,label:"function"}))(Wd,e),_d=Md(["compare","extract","mutate","sink"]),Id=Md(["element","start","stop","destroy"]),Pd=Md(["forceDrop","drop","move","delayDrop"]),Fd=()=>{let e=x.none();const t=jd({move:Bd(["info"])});return{onEvent:(o,n)=>{n.extract(o).each((o=>{const r=((t,o)=>{const n=e.map((e=>t.compare(e,o)));return e=x.some(o),n})(n,o);r.each((e=>{t.trigger.move(e)}))}))},reset:()=>{e=x.none()},events:t.registry}},Hd=()=>{const e=(()=>{const e=jd({move:Bd(["info"])});return{onEvent:f,reset:f,events:e.registry}})(),t=Fd();let o=e;return{on:()=>{o.reset(),o=t},off:()=>{o.reset(),o=e},isOn:()=>o===t,onEvent:(e,t)=>{o.onEvent(e,t)},events:t.events}},$d=(e,t,o)=>{let n=!1;const r=jd({start:Bd([]),stop:Bd([])}),s=Hd(),l=()=>{m.stop(),s.isOn()&&(s.off(),r.trigger.stop())},c=((e,t)=>{let o=null;const n=()=>{a(o)||(clearTimeout(o),o=null)};return{cancel:n,throttle:(...r)=>{n(),o=setTimeout((()=>{o=null,e.apply(null,r)}),t)}}})(l,200);s.events.move.bind((o=>{t.mutate(e,o.info)}));const i=e=>(...t)=>{n&&e.apply(null,t)},m=t.sink(Pd({forceDrop:l,drop:i(l),move:i((e=>{c.cancel(),s.onEvent(e,t)})),delayDrop:i(c.throttle)}),o);return{element:m.element,go:e=>{m.start(e),s.on(),r.trigger.start()},on:()=>{n=!0},off:()=>{n=!1},isActive:()=>n,destroy:()=>{m.destroy()},events:r.registry}},Vd=e=>{const t=e.replace(/\./g,"-");return{resolve:e=>t+"-"+e}},qd=Vd("ephox-dragster").resolve;var Ud=_d({compare:(e,t)=>wn(t.left-e.left,t.top-e.top),extract:e=>x.some(wn(e.x,e.y)),sink:(e,t)=>{const o=(e=>{const t={layerClass:qd("blocker"),...e},o=Te.fromTag("div");return pe(o,"role","presentation"),Lt(o,{position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%"}),bd(o,qd("blocker")),bd(o,t.layerClass),{element:g(o),destroy:()=>{Ge(o)}}})(t),n=kd(o.element(),"mousedown",e.forceDrop),r=kd(o.element(),"mouseup",e.drop),s=kd(o.element(),"mousemove",e.move),l=kd(o.element(),"mouseout",e.delayDrop);return Id({element:o.element,start:e=>{He(e,o.element())},stop:()=>{Ge(o.element())},destroy:()=>{o.destroy(),r.unbind(),s.unbind(),l.unbind(),n.unbind()}})},mutate:(e,t)=>{e.mutate(t.left,t.top)}});const Gd=Vd("ephox-snooker").resolve,Kd=()=>{const e=jd({drag:Bd(["xDelta","yDelta","target"])});let t=x.none();const o=(()=>{const e=jd({drag:Bd(["xDelta","yDelta"])});return{mutate:(t,o)=>{e.trigger.drag(t,o)},events:e.registry}})();o.events.drag.bind((o=>{t.each((t=>{e.trigger.drag(o.xDelta,o.yDelta,t)}))}));return{assign:e=>{t=x.some(e)},get:()=>t,mutate:o.mutate,events:e.registry}},Yd=Gd("resizer-bar"),Jd=Gd("resizer-rows"),Qd=Gd("resizer-cols"),Xd=e=>{const t=ht(e.parent(),"."+Yd);N(t,Ge)},Zd=(e,t,o)=>{const n=e.origin();N(t,(t=>{t.each((t=>{const r=o(n,t);bd(r,Yd),He(e.parent(),r)}))}))},eu=(e,t,o,n)=>{Zd(e,t,((e,t)=>{const r=((e,t,o,n,r)=>{const s=Te.fromTag("div");return Lt(s,{position:"absolute",left:t-n/2+"px",top:o+"px",height:r+"px",width:n+"px"}),be(s,{"data-column":e,role:"presentation"}),s})(t.col,t.x-e.left,o.top-e.top,7,n);return bd(r,Qd),r}))},tu=(e,t,o,n)=>{Zd(e,t,((e,t)=>{const r=((e,t,o,n,r)=>{const s=Te.fromTag("div");return Lt(s,{position:"absolute",left:t+"px",top:o-r/2+"px",height:r+"px",width:n+"px"}),be(s,{"data-row":e,role:"presentation"}),s})(t.row,o.left-e.left,t.y-e.top,n,7);return bd(r,Jd),r}))},ou=(e,t,o,n,r)=>{const s=yn(o),l=t.isResizable,a=n.length>0?Bn.positions(n,o):[],c=a.length>0?((e,t)=>_(e.all,((e,o)=>t(e.element)?[o]:[])))(e,l):[],i=B(a,((e,t)=>O(c,(e=>t===e))));tu(t,i,s,Fo(o));const m=r.length>0?zn.positions(r,o):[],d=m.length>0?((e,t)=>{const o=[];return k(e.grid.columns,(n=>{const r=sn.getColumnAt(e,n).map((e=>e.element));r.forall(t)&&o.push(n)})),B(o,(o=>{const n=sn.filterItems(e,(e=>e.column===o));return I(n,(e=>t(e.element)))}))})(e,l):[],u=B(m,((e,t)=>O(d,(e=>t===e))));eu(t,u,s,hn(o))},nu=(e,t)=>{if(Xd(e),e.isResizable(t)){const o=sn.fromTable(t),n=cn(o),r=ln(o);ou(o,e,t,n,r)}},ru=(e,t)=>{const o=ht(e.parent(),"."+Yd);N(o,t)},su=e=>{ru(e,(e=>{zt(e,"display","none")}))},lu=e=>{ru(e,(e=>{zt(e,"display","block")}))},au=Gd("resizer-bar-dragging"),cu=e=>{const t=Kd(),o=((e,t={})=>{var o;const n=null!==(o=t.mode)&&void 0!==o?o:Ud;return $d(e,n,t)})(t,{});let n=x.none();const r=(e,t)=>x.from(we(e,t));t.events.drag.bind((e=>{r(e.target,"data-row").each((t=>{const o=Vt(e.target,"top");zt(e.target,"top",o+e.yDelta+"px")})),r(e.target,"data-column").each((t=>{const o=Vt(e.target,"left");zt(e.target,"left",o+e.xDelta+"px")}))}));const s=(e,t)=>Vt(e,t)-Pt(e,"data-initial-"+t,0);o.events.stop.bind((()=>{t.get().each((t=>{n.each((o=>{r(t,"data-row").each((e=>{const n=s(t,"top");ye(t,"data-initial-top"),m.trigger.adjustHeight(o,n,parseInt(e,10))})),r(t,"data-column").each((e=>{const n=s(t,"left");ye(t,"data-initial-left"),m.trigger.adjustWidth(o,n,parseInt(e,10))})),nu(e,o)}))}))}));const l=(n,r)=>{m.trigger.startAdjust(),t.assign(n),pe(n,"data-initial-"+r,Vt(n,r)),bd(n,au),zt(n,"opacity","0.2"),o.go(e.parent())},a=kd(e.parent(),"mousedown",(e=>{var t;t=e.target,wd(t,Jd)&&l(e.target,"top"),(e=>wd(e,Qd))(e.target)&&l(e.target,"left")})),c=t=>Oe(t,e.view()),i=kd(e.view(),"mouseover",(t=>{var r;(r=t.target,xt(r,"table",c).filter(_r)).fold((()=>{mt(t.target)&&Xd(e)}),(t=>{o.isActive()&&(n=x.some(t),nu(e,t))}))})),m=jd({adjustHeight:Bd(["table","delta","row"]),adjustWidth:Bd(["table","delta","column"]),startAdjust:Bd([])});return{destroy:()=>{a.unbind(),i.unbind(),o.destroy(),Xd(e)},refresh:t=>{nu(e,t)},on:o.on,off:o.off,hideBars:b(su,e),showBars:b(lu,e),events:m.registry}},iu=(e,t,o)=>{const n=Bn,r=zn,s=cu(e),l=jd({beforeResize:Bd(["table","type"]),afterResize:Bd(["table","type"]),startDrag:Bd([])});return s.events.adjustHeight.bind((e=>{const t=e.table;l.trigger.beforeResize(t,"row");const o=n.delta(e.delta,t);oa(t,o,e.row,n),l.trigger.afterResize(t,"row")})),s.events.startAdjust.bind((e=>{l.trigger.startDrag()})),s.events.adjustWidth.bind((e=>{const n=e.table;l.trigger.beforeResize(n,"col");const s=r.delta(e.delta,n),a=o(n);ta(n,s,e.column,t,a),l.trigger.afterResize(n,"col")})),{on:s.on,off:s.off,refreshBars:s.refresh,hideBars:s.hideBars,showBars:s.showBars,destroy:s.destroy,events:l.registry}},mu=(e,t)=>{const o=ue(e)?(e=>Te.fromDom(Ae(e).dom.documentElement))(e):e;return{parent:g(o),view:g(e),origin:g(wn(0,0)),isResizable:t}},du=(e,t,o)=>({parent:g(t),view:g(e),origin:g(wn(0,0)),isResizable:o}),uu=()=>{const e=Te.fromTag("div");return Lt(e,{position:"static",height:"0",width:"0",padding:"0",margin:"0",border:"0"}),He(dt(Te.fromDom(document)),e),e},fu=e=>m(e)&&"TABLE"===e.nodeName,gu="bar-",hu=e=>"false"!==we(e,"data-mce-resize"),pu=e=>{const t=Bm(),o=Bm(),n=Bm();let r,s;const l=t=>Nc(e,t),a=()=>vc(e)?Vs():$s(),c=(t,o,n)=>{const c=Et(o,"e");if(""===s&&Qc(t),n!==r&&""!==s){zt(t,"width",s);const o=a(),i=l(t),m=vc(e)||c?(e=>qs(e).columns)(t)-1:0;ta(t,n-r,m,o,i)}else if((e=>/^(\d+(\.\d+)?)%$/.test(e))(s)){const e=parseFloat(s.replace("%",""));zt(t,"width",n*e/r+"%")}(e=>/^(\d+(\.\d+)?)px$/.test(e))(s)&&(e=>{const t=sn.fromTable(e);sn.hasColumns(t)||N(Jt(e),(e=>{const t=Wt(e,"width");zt(e,"width",t),ye(e,"width")}))})(t)},i=()=>{o.on((e=>{e.destroy()})),n.on((t=>{((e,t)=>{e.inline&&Ge(t.parent())})(e,t)}))};e.on("init",(()=>{const r=((e,t)=>e.inline?du(Te.fromDom(e.getBody()),uu(),t):mu(Te.fromDom(e.getDoc()),t))(e,hu);if(n.set(r),(e=>{const t=e.options.get("object_resizing");return D(t.split(","),"table")})(e)&&Rc(e)){const n=a(),s=iu(r,n,l);s.on(),s.events.startDrag.bind((o=>{t.set(e.selection.getRng())})),s.events.beforeResize.bind((t=>{const o=t.table.dom;((e,t,o,n,r)=>{e.dispatch("ObjectResizeStart",{target:t,width:o,height:n,origin:r})})(e,o,Vr(o),qr(o),gu+t.type)})),s.events.afterResize.bind((o=>{const n=o.table,r=n.dom;Hr(n),t.on((t=>{e.selection.setRng(t),e.focus()})),((e,t,o,n,r)=>{e.dispatch("ObjectResized",{target:t,width:o,height:n,origin:r})})(e,r,Vr(r),qr(r),gu+o.type),e.undoManager.add()})),o.set(s)}})),e.on("ObjectResizeStart",(t=>{const o=t.target;if(fu(o)){const n=Te.fromDom(o);N(e.dom.select(".mce-clonedresizable"),(t=>{e.dom.addClass(t,"mce-"+wc(e)+"-columns")})),!Kc(n)&&Tc(e)?Xc(n):!Gc(n)&&xc(e)&&Qc(n),Yc(n)&&kt(t.origin,gu)&&Qc(n),r=t.width,s=Sc(e)?"":((e,t)=>{const o=e.dom.getStyle(t,"width")||e.dom.getAttrib(t,"width");return x.from(o).filter(At)})(e,o).getOr("")}})),e.on("ObjectResized",(t=>{const o=t.target;if(fu(o)){const n=Te.fromDom(o),r=t.origin;kt(r,"corner-")&&c(n,r,t.width),Hr(n),ic(e,n.dom,mc)}})),e.on("SwitchMode",(()=>{o.on((t=>{e.mode.isReadOnly()?t.hideBars():t.showBars()}))})),e.on("dragstart dragend",(e=>{o.on((t=>{"dragstart"===e.type?(t.hideBars(),t.off()):(t.on(),t.showBars())}))})),e.on("remove",(()=>{i()}));return{refresh:e=>{o.on((t=>t.refreshBars(Te.fromDom(e))))},hide:()=>{o.on((e=>e.hideBars()))},show:()=>{o.on((e=>e.showBars()))}}},bu=e=>{(e=>{const t=e.options.register;t("table_clone_elements",{processor:"string[]"}),t("table_use_colgroups",{processor:"boolean",default:!0}),t("table_header_type",{processor:e=>{const t=D(["section","cells","sectionCells","auto"],e);return t?{value:e,valid:t}:{valid:!1,message:"Must be one of: section, cells, sectionCells or auto."}},default:"section"}),t("table_sizing_mode",{processor:"string",default:"auto"}),t("table_default_attributes",{processor:"object",default:{border:"1"}}),t("table_default_styles",{processor:"object",default:{"border-collapse":"collapse"}}),t("table_column_resizing",{processor:e=>{const t=D(["preservetable","resizetable"],e);return t?{value:e,valid:t}:{valid:!1,message:"Must be preservetable, or resizetable."}},default:"preservetable"}),t("table_resize_bars",{processor:"boolean",default:!0}),t("table_style_by_css",{processor:"boolean",default:!0})})(e);const t=pu(e),o=Ad(e,t),n=Ac(e,t,o);return vi(e,n),((e,t)=>{const o=Fr(e),n=t=>ks($r(e)).bind((n=>Xt(n,o).map((o=>{const r=Rs(Es(e),o,n);return t(o,r)})))).getOr("");G({mceTableRowType:()=>n(t.getTableRowType),mceTableCellType:()=>n(t.getTableCellType),mceTableColType:()=>n(t.getTableColType)},((t,o)=>e.addQueryValueHandler(o,t)))})(e,n),Ns(e,n),{getSelectedCells:o.getSelectedCells,clearSelectedCells:o.clearSelectedCells}},wu=e=>({table:bu(e)});e.add("dom",wu)}()})); ;/*!node_modules/tinymce/plugins/advlist/plugin.js*/ amis.define("d759f52",(function(t,e,s,r){!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=(t,e,s)=>{const r="UL"===e?"InsertUnorderedList":"InsertOrderedList";t.execCommand(r,!1,!1===s?null:{"list-style-type":s})},s=t=>e=>e.options.get(t),r=s("advlist_number_styles"),n=s("advlist_bullet_styles"),i=t=>null==t,l=t=>!i(t);var o=tinymce.util.Tools.resolve("tinymce.util.Tools");class a{constructor(t,e){this.tag=t,this.value=e}static some(t){return new a(!0,t)}static none(){return a.singletonNone}fold(t,e){return this.tag?e(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?a.some(t(this.value)):a.none()}bind(t){return this.tag?t(this.value):a.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:a.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(null!=t?t:"Called getOrDie on None")}static from(t){return l(t)?a.some(t):a.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}a.singletonNone=new a(!1);const u=t=>e=>l(e)&&t.test(e.nodeName),d=u(/^(OL|UL|DL)$/),g=u(/^(TH|TD)$/),c=(t,e,s)=>((t,e,s)=>{for(let r=0,n=t.length;r<n;r++){const n=t[r];if(e(n,r))return a.some(n);if(s(n,r))break}return a.none()})(e,(t=>d(t)&&!/\btox\-/.test(t.className)),g).exists((e=>e.nodeName===s&&((t,e)=>t.dom.isChildOf(e,t.getBody()))(t,e))),h=t=>i(t)||"default"===t?"":t,m=(t,e)=>s=>((t,e)=>{const s=t.selection.getNode();return e({parents:t.dom.getParents(s),element:s}),t.on("NodeChange",e),()=>t.off("NodeChange",e)})(t,(r=>((t,r)=>{const n=t.selection.getStart(!0);s.setActive(c(t,r,e)),s.setEnabled(!((t,e)=>{const s=t.dom.getParent(e,"ol,ul,dl");return((t,e)=>null!==e&&!t.dom.isEditable(e))(t,s)})(t,n))})(t,r.parents))),p=(t,s,r,n,i,l)=>{t.ui.registry.addSplitButton(s,{tooltip:r,icon:"OL"===i?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:t=>{t(o.map(l,(t=>{const e="OL"===i?"num":"bull",s="disc"===t||"decimal"===t?"default":t,r=h(t),n=(t=>t.replace(/\-/g," ").replace(/\b\w/g,(t=>t.toUpperCase())))(t);return{type:"choiceitem",value:r,icon:"list-"+e+"-"+s,text:n}})))},onAction:()=>t.execCommand(n),onItemAction:(s,r)=>{e(t,i,r)},select:e=>{const s=(t=>{const e=t.dom.getParent(t.selection.getNode(),"ol,ul"),s=t.dom.getStyle(e,"listStyleType");return a.from(s)})(t);return s.map((t=>e===t)).getOr(!1)},onSetup:m(t,i)})},v=(t,s,r,n,i,l)=>{l.length>1?p(t,s,r,n,i,l):((t,s,r,n,i,l)=>{t.ui.registry.addToggleButton(s,{active:!1,tooltip:r,icon:"OL"===i?"ordered-list":"unordered-list",onSetup:m(t,i),onAction:()=>t.queryCommandState(n)||""===l?t.execCommand(n):e(t,i,l)})})(t,s,r,n,i,h(l[0]))};t.add("advlist",(t=>{t.hasPlugin("lists")?((t=>{const e=t.options.register;e("advlist_number_styles",{processor:"string[]",default:"default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman".split(",")}),e("advlist_bullet_styles",{processor:"string[]",default:"default,circle,square".split(",")})})(t),(t=>{v(t,"numlist","Numbered list","InsertOrderedList","OL",r(t)),v(t,"bullist","Bullet list","InsertUnorderedList","UL",n(t))})(t),(t=>{t.addCommand("ApplyUnorderedListStyle",((s,r)=>{e(t,"UL",r["list-style-type"])})),t.addCommand("ApplyOrderedListStyle",((s,r)=>{e(t,"OL",r["list-style-type"])}))})(t)):console.error("Please use the Lists plugin together with the Advanced List plugin.")}))}()})); ;/*!node_modules/tinymce/plugins/advlist/index.js*/ amis.define("a7dac06",(function(a,d,f,i){a("d759f52")})); ;/*!node_modules/tinymce/plugins/autolink/plugin.js*/ amis.define("d91ff4c",(function(e,t,n,o){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>t.options.get(e),n=t("autolink_pattern"),o=t("link_default_target"),r=t("link_default_protocol"),a=t("allow_unsafe_link_target"),s=(l="string",e=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=o=e,(r=String).prototype.isPrototypeOf(n)||(null===(a=o.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var n,o,r,a})(e)===l);var l;const i=(c=void 0,e=>c===e);var c;const d=e=>!(e=>null==e)(e),u=Object.hasOwnProperty,f=e=>"\ufeff"===e;var g=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker");const m=e=>3===e.nodeType,k=e=>/^[(\[{ \u00a0]$/.test(e),p=(e,t,n)=>{for(let o=t-1;o>=0;o--){const t=e.charAt(o);if(!f(t)&&n(t))return o}return-1},y=(e,t)=>{var o;const a=e.schema.getVoidElements(),s=n(e),{dom:l,selection:c}=e;if(null!==l.getParent(c.getNode(),"a[href]"))return null;const d=c.getRng(),f=g(l,(e=>{return l.isBlock(e)||(t=a,n=e.nodeName.toLowerCase(),u.call(t,n))||"false"===l.getContentEditable(e);var t,n})),{container:y,offset:h}=((e,t)=>{let n=e,o=t;for(;1===n.nodeType&&n.childNodes[o];)n=n.childNodes[o],o=m(n)?n.data.length:n.childNodes.length;return{container:n,offset:o}})(d.endContainer,d.endOffset),w=null!==(o=l.getParent(y,l.isBlock))&&void 0!==o?o:l.getRoot(),v=f.backwards(y,h+t,((e,t)=>{const n=e.data,o=p(n,t,(r=k,e=>!r(e)));var r,a;return-1===o||(a=n[o],/[?!,.;:]/.test(a))?o:o+1}),w);if(!v)return null;let _=v.container;const A=f.backwards(v.container,v.offset,((e,t)=>{_=e;const n=p(e.data,t,k);return-1===n?n:n+1}),w),C=l.createRng();A?C.setStart(A.container,A.offset):C.setStart(_,0),C.setEnd(v.container,v.offset);const b=C.toString().replace(/\uFEFF/g,"").match(s);if(b){let t=b[0];if(((e,t,n)=>""===t||e.length>=t.length&&e.substr(n,n+t.length)===t)(t,"www.",0)){t=r(e)+"://"+t}else((e,t,n=0,o)=>{const r=e.indexOf(t,n);return-1!==r&&(!!i(o)||r+t.length<=o)})(t,"@")&&!(e=>/^([A-Za-z][A-Za-z\d.+-]*:\/\/)|mailto:/.test(e))(t)&&(t="mailto:"+t);return{rng:C,url:t}}return null},h=(e,t)=>{const{dom:n,selection:r}=e,{rng:l,url:i}=t,c=r.getBookmark();r.setRng(l);const d="createlink",u={command:d,ui:!1,value:i};if(!e.dispatch("BeforeExecCommand",u).isDefaultPrevented()){e.getDoc().execCommand(d,!1,i),e.dispatch("ExecCommand",u);const t=o(e);if(s(t)){const o=r.getNode();n.setAttrib(o,"target",t),"_blank"!==t||a(e)||n.setAttrib(o,"rel","noopener")}}r.moveToBookmark(c),e.nodeChanged()},w=e=>{const t=y(e,-1);d(t)&&h(e,t)},v=w,_=e=>{e.on("keydown",(t=>{13!==t.keyCode||t.isDefaultPrevented()||(e=>{const t=y(e,0);d(t)&&h(e,t)})(e)})),e.on("keyup",(t=>{32===t.keyCode?w(e):(48===t.keyCode&&t.shiftKey||221===t.keyCode)&&v(e)}))};e.add("autolink",(e=>{(e=>{const t=e.options.register;t("autolink_pattern",{processor:"regexp",default:new RegExp("^"+/(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g.source+"$","i")}),t("link_default_target",{processor:"string"}),t("link_default_protocol",{processor:"string",default:"https"})})(e),_(e)}))}()})); ;/*!node_modules/tinymce/plugins/autolink/index.js*/ amis.define("792395d",(function(f,d,i,n){f("d91ff4c")})); ;/*!node_modules/tinymce/plugins/autoresize/plugin.js*/ amis.define("78051df",(function(e,t,o,i){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");var t=tinymce.util.Tools.resolve("tinymce.Env");const o=e=>t=>t.options.get(e),i=o("min_height"),n=o("max_height"),s=o("autoresize_overflow_padding"),r=o("autoresize_bottom_margin"),l=(e,t)=>{const o=e.getBody();o&&(o.style.overflowY=t?"":"hidden",t||(o.scrollTop=0))},g=(e,t,o,i)=>{var n;const s=parseInt(null!==(n=e.getStyle(t,o,i))&&void 0!==n?n:"",10);return isNaN(s)?0:s},a=(e,o,r,c)=>{var d;const f=e.dom,u=e.getDoc();if(!u)return;if((e=>e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen())(e))return void l(e,!0);const m=u.documentElement,h=c?c():s(e),p=null!==(d=i(e))&&void 0!==d?d:e.getElement().offsetHeight;let y=p;const v=g(f,m,"margin-top",!0),S=g(f,m,"margin-bottom",!0);let C=m.offsetHeight+v+S+h;C<0&&(C=0);const b=e.getContainer().offsetHeight-e.getContentAreaContainer().offsetHeight;C+b>p&&(y=C+b);const w=n(e);if(w&&y>w?(y=w,l(e,!0)):l(e,!1),y!==o.get()){const i=y-o.get();if(f.setStyle(e.getContainer(),"height",y+"px"),o.set(y),(e=>{e.dispatch("ResizeEditor")})(e),t.browser.isSafari()&&(t.os.isMacOS()||t.os.isiOS())){const t=e.getWin();t.scrollTo(t.pageXOffset,t.pageYOffset)}e.hasFocus()&&(e=>{if("setcontent"===(null==e?void 0:e.type.toLowerCase())){const t=e;return!0===t.selection||!0===t.paste}return!1})(r)&&e.selection.scrollIntoView(),(t.browser.isSafari()||t.browser.isChromium())&&i<0&&a(e,o,r,c)}};e.add("autoresize",(e=>{if((e=>{const t=e.options.register;t("autoresize_overflow_padding",{processor:"number",default:1}),t("autoresize_bottom_margin",{processor:"number",default:50})})(e),e.options.isSet("resize")||e.options.set("resize",!1),!e.inline){const o=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})(0);((e,t)=>{e.addCommand("mceAutoResize",(()=>{a(e,t)}))})(e,o),((e,o)=>{let i,n,l=()=>r(e);e.on("init",(n=>{i=0;const r=s(e),g=e.dom;g.setStyles(e.getDoc().documentElement,{height:"auto"}),t.browser.isEdge()||t.browser.isIE()?g.setStyles(e.getBody(),{paddingLeft:r,paddingRight:r,"min-height":0}):g.setStyles(e.getBody(),{paddingLeft:r,paddingRight:r}),a(e,o,n,l),i+=1})),e.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",(t=>{if(1===i)n=e.getContainer().offsetHeight,a(e,o,t,l),i+=1;else if(2===i){const t=n<e.getContainer().offsetHeight;if(t){const t=e.dom,o=e.getDoc();t.setStyles(o.documentElement,{"min-height":0}),t.setStyles(e.getBody(),{"min-height":"inherit"})}l=t?(s=0,()=>s):l,i+=1}else a(e,o,t,l);var s}))})(e,o)}}))}()})); ;/*!node_modules/tinymce/plugins/autoresize/index.js*/ amis.define("a59041d",(function(d,f,i,n){d("78051df")})); ;/*!node_modules/tinymce/plugins/lists/plugin.js*/ amis.define("d7b3e8c",(function(e,t,n,o){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=r=e,o=(s=String).prototype,o.isPrototypeOf(n)||(null===(i=r.constructor)||void 0===i?void 0:i.name)===s.name)?"string":t;var n,o;var r,s,i})(t)===e,n=e=>t=>typeof t===e,o=t("string"),r=t("object"),s=t("array"),i=n("boolean"),l=e=>!(e=>null==e)(e),a=n("function"),d=n("number"),c=()=>{},m=(e,t)=>e===t,u=e=>t=>!e(t),p=(g=!1,()=>g);var g;class f{constructor(e,t){this.tag=e,this.value=t}static some(e){return new f(!0,e)}static none(){return f.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?f.some(e(this.value)):f.none()}bind(e){return this.tag?e(this.value):f.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:f.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return l(e)?f.some(e):f.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}f.singletonNone=new f(!1);const h=Array.prototype.slice,y=Array.prototype.indexOf,v=Array.prototype.push,C=(e,t)=>{return n=e,o=t,y.call(n,o)>-1;var n,o},b=(e,t)=>{for(let n=0,o=e.length;n<o;n++){if(t(e[n],n))return!0}return!1},S=(e,t)=>{const n=e.length,o=new Array(n);for(let r=0;r<n;r++){const n=e[r];o[r]=t(n,r)}return o},N=(e,t)=>{for(let n=0,o=e.length;n<o;n++){t(e[n],n)}},L=(e,t)=>{const n=[];for(let o=0,r=e.length;o<r;o++){const r=e[o];t(r,o)&&n.push(r)}return n},T=(e,t,n)=>(N(e,((e,o)=>{n=t(n,e,o)})),n),D=(e,t,n)=>{for(let o=0,r=e.length;o<r;o++){const r=e[o];if(t(r,o))return f.some(r);if(n(r,o))break}return f.none()},O=(e,t)=>D(e,t,p),k=(e,t)=>(e=>{const t=[];for(let n=0,o=e.length;n<o;++n){if(!s(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);v.apply(t,e[n])}return t})(S(e,t)),A=e=>{const t=h.call(e,0);return t.reverse(),t},x=(e,t)=>t>=0&&t<e.length?f.some(e[t]):f.none(),w=e=>x(e,0),E=e=>x(e,e.length-1),B=(e,t)=>{const n=[],o=a(t)?e=>b(n,(n=>t(n,e))):e=>C(n,e);for(let t=0,r=e.length;t<r;t++){const r=e[t];o(r)||n.push(r)}return n},P=(e,t,n=m)=>e.exists((e=>n(e,t))),I=(e,t,n)=>e.isSome()&&t.isSome()?f.some(n(e.getOrDie(),t.getOrDie())):f.none(),M=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},R={fromHtml:(e,t)=>{const n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||n.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return M(n.childNodes[0])},fromTag:(e,t)=>{const n=(t||document).createElement(e);return M(n)},fromText:(e,t)=>{const n=(t||document).createTextNode(e);return M(n)},fromDom:M,fromPoint:(e,t,n)=>f.from(e.dom.elementFromPoint(t,n)).map(M)},U=(e,t)=>e.dom===t.dom,$=(e,t)=>{const n=e.dom;if(1!==n.nodeType)return!1;{const e=n;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}};"undefined"!=typeof window?window:Function("return this;")();const _=e=>e.dom.nodeName.toLowerCase(),H=(F=1,e=>(e=>e.dom.nodeType)(e)===F);var F;const V=e=>t=>H(t)&&_(t)===e,j=e=>f.from(e.dom.parentNode).map(R.fromDom),K=e=>S(e.dom.childNodes,R.fromDom),z=(e,t)=>{const n=e.dom.childNodes;return f.from(n[t]).map(R.fromDom)},Q=e=>z(e,0),q=e=>z(e,e.dom.childNodes.length-1),W=(e,t,n)=>{let o=e.dom;const r=a(n)?n:p;for(;o.parentNode;){o=o.parentNode;const e=R.fromDom(o);if(t(e))return f.some(e);if(r(e))break}return f.none()},Z=(e,t,n)=>((e,t,n,o,r)=>e(n,o)?f.some(n):a(r)&&r(n)?f.none():t(n,o,r))(((e,t)=>t(e)),W,e,t,n),G=(e,t)=>{j(e).each((n=>{n.dom.insertBefore(t.dom,e.dom)}))},J=(e,t)=>{const n=(e=>f.from(e.dom.nextSibling).map(R.fromDom))(e);n.fold((()=>{j(e).each((e=>{X(e,t)}))}),(e=>{G(e,t)}))},X=(e,t)=>{e.dom.appendChild(t.dom)},Y=(e,t)=>{N(t,(t=>{X(e,t)}))},ee=e=>{e.dom.textContent="",N(K(e),(e=>{te(e)}))},te=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)};var ne=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),oe=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),re=tinymce.util.Tools.resolve("tinymce.util.VK");const se=e=>S(e,R.fromDom),ie=Object.keys,le=(e,t)=>{const n=ie(e);for(let o=0,r=n.length;o<r;o++){const r=n[o];t(e[r],r)}},ae=(e,t)=>{const n={};var o;return((e,t,n,o)=>{le(e,((e,r)=>{(t(e,r)?n:o)(e,r)}))})(e,t,(o=n,(e,t)=>{o[t]=e}),c),n},de=(e,t)=>{const n=e.dom;le(t,((e,t)=>{((e,t,n)=>{if(!(o(n)||i(n)||d(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")})(n,t,e)}))},ce=e=>T(e.dom.attributes,((e,t)=>(e[t.name]=t.value,e)),{}),me=e=>((e,t)=>R.fromDom(e.dom.cloneNode(t)))(e,!0),ue=(e,t)=>{const n=((e,t)=>{const n=R.fromTag(t),o=ce(e);return de(n,o),n})(e,t);J(e,n);const o=K(e);return Y(n,o),te(e),n};var pe=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),ge=tinymce.util.Tools.resolve("tinymce.util.Tools");const fe=e=>t=>l(t)&&t.nodeName.toLowerCase()===e,he=e=>t=>l(t)&&e.test(t.nodeName),ye=e=>l(e)&&3===e.nodeType,ve=e=>l(e)&&1===e.nodeType,Ce=he(/^(OL|UL|DL)$/),be=he(/^(OL|UL)$/),Se=fe("ol"),Ne=he(/^(LI|DT|DD)$/),Le=he(/^(DT|DD)$/),Te=he(/^(TH|TD)$/),De=fe("br"),Oe=(e,t)=>l(t)&&t.nodeName in e.schema.getTextBlockElements(),ke=(e,t)=>l(e)&&e.nodeName in t,Ae=(e,t)=>l(t)&&t.nodeName in e.schema.getVoidElements(),xe=(e,t,n)=>{const o=e.isEmpty(t);return!(n&&e.select("span[data-mce-type=bookmark]",t).length>0)&&o},we=(e,t)=>e.isChildOf(t,e.getRoot()),Ee=e=>t=>t.options.get(e),Be=Ee("lists_indent_on_tab"),Pe=Ee("forced_root_block"),Ie=Ee("forced_root_block_attrs"),Me=(e,t)=>{const n=e.dom,o=e.schema.getBlockElements(),r=n.createFragment(),s=Pe(e),i=Ie(e);let l,a,d=!1;for(a=n.create(s,i),ke(t.firstChild,o)||r.appendChild(a);l=t.firstChild;){const e=l.nodeName;d||"SPAN"===e&&"bookmark"===l.getAttribute("data-mce-type")||(d=!0),ke(l,o)?(r.appendChild(l),a=null):(a||(a=n.create(s,i),r.appendChild(a)),a.appendChild(l))}return!d&&a&&a.appendChild(n.create("br",{"data-mce-bogus":"1"})),r},Re=pe.DOM,Ue=(e,t,n)=>{const o=Re.select('span[data-mce-type="bookmark"]',t),r=Me(e,n),s=Re.createRng();s.setStartAfter(n),s.setEndAfter(t);const i=s.extractContents();for(let t=i.firstChild;t;t=t.firstChild)if("LI"===t.nodeName&&e.dom.isEmpty(t)){Re.remove(t);break}e.dom.isEmpty(i)||Re.insertAfter(i,t),Re.insertAfter(r,t);const l=n.parentElement;l&&xe(e.dom,l)&&(e=>{const t=e.parentNode;t&&ge.each(o,(e=>{t.insertBefore(e,n.parentNode)})),Re.remove(e)})(l),Re.remove(n),xe(e.dom,t)&&Re.remove(t)},$e=V("dd"),_e=V("dt"),He=(e,t)=>{var n;$e(t)?ue(t,"dt"):_e(t)&&(n=t,f.from(n.dom.parentElement).map(R.fromDom)).each((n=>Ue(e,n.dom,t.dom)))},Fe=e=>{_e(e)&&ue(e,"dd")},Ve=(e,t)=>{if(ye(e))return{container:e,offset:t};const n=ne.getNode(e,t);return ye(n)?{container:n,offset:t>=e.childNodes.length?n.data.length:0}:n.previousSibling&&ye(n.previousSibling)?{container:n.previousSibling,offset:n.previousSibling.data.length}:n.nextSibling&&ye(n.nextSibling)?{container:n.nextSibling,offset:0}:{container:e,offset:t}},je=e=>{const t=e.cloneRange(),n=Ve(e.startContainer,e.startOffset);t.setStart(n.container,n.offset);const o=Ve(e.endContainer,e.endOffset);return t.setEnd(o.container,o.offset),t},Ke=["OL","UL","DL"],ze=Ke.join(","),Qe=(e,t)=>{const n=t||e.selection.getStart(!0);return e.dom.getParent(n,ze,Ge(e,n))},qe=e=>{const t=Qe(e),n=e.selection.getSelectedBlocks();return((e,t)=>l(e)&&1===t.length&&t[0]===e)(t,n)?(e=>L(e.querySelectorAll(ze),Ce))(t):L(n,(e=>Ce(e)&&t!==e))},We=e=>{const t=e.selection.getSelectedBlocks();return L(((e,t)=>{const n=ge.map(t,(t=>e.dom.getParent(t,"li,dd,dt",Ge(e,t))||t));return B(n)})(e,t),Ne)},Ze=(e,t)=>{const n=e.dom.getParents(t,"TD,TH");return n.length>0?n[0]:e.getBody()},Ge=(e,t)=>{const n=e.dom.getParents(t,e.dom.isBlock),o=O(n,(t=>{return n=e.schema,!Ce(o=t)&&!Ne(o)&&b(Ke,(e=>n.isValidChild(o.nodeName,e)));var n,o}));return o.getOr(e.getBody())},Je=(e,t)=>{const n=e.dom.getParents(t,"ol,ul",Ge(e,t));return E(n)},Xe=e=>{const t=(e=>{const t=Je(e,e.selection.getStart()),n=L(e.selection.getSelectedBlocks(),be);return t.toArray().concat(n)})(e);return Ye(e,t)},Ye=(e,t)=>{const n=S(t,(t=>Je(e,t).getOr(t)));return B(n)},et=e=>/\btox\-/.test(e.className),tt=(e,t)=>D(e,Ce,Te).exists((e=>e.nodeName===t&&!et(e))),nt=(e,t)=>null!==t&&!e.dom.isEditable(t),ot=(e,t)=>{const n=e.dom.getParent(t,"ol,ul,dl");return nt(e,n)},rt=(e,t)=>{const n=e.selection.getNode();return t({parents:e.dom.getParents(n),element:n}),e.on("NodeChange",t),()=>e.off("NodeChange",t)},st=(e,t,n)=>e.dispatch("ListMutation",{action:t,element:n}),it=(lt=/^\s+|\s+$/g,e=>e.replace(lt,""));var lt;const at=(e,t,n)=>{if(!o(n))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);(e=>void 0!==e.style&&a(e.style.getPropertyValue))(e)&&e.style.setProperty(t,n)},dt=(e,t,n)=>{const o=e.dom;at(o,t,n)},ct=(e,t)=>{X(e.item,t.list)},mt=(e,t)=>{const n={list:R.fromTag(t,e),item:R.fromTag("li",e)};return X(n.list,n.item),n},ut=(e,t,n)=>{const o=t.slice(0,n.depth);return E(o).each((t=>{const o=((e,t,n)=>{const o=R.fromTag("li",e);return de(o,t),Y(o,n),o})(e,n.itemAttributes,n.content);((e,t)=>{X(e.list,t),e.item=t})(t,o),((e,t)=>{_(e.list)!==t.listType&&(e.list=ue(e.list,t.listType)),de(e.list,t.listAttributes)})(t,n)})),o},pt=(e,t,n)=>{const o=((e,t,n)=>{const o=[];for(let r=0;r<n;r++)o.push(mt(e,t.listType));return o})(e,n,n.depth-t.length);var r;return(e=>{for(let t=1;t<e.length;t++)ct(e[t-1],e[t])})(o),((e,t)=>{for(let t=0;t<e.length-1;t++)dt(e[t].item,"list-style-type","none");E(e).each((e=>{de(e.list,t.listAttributes),de(e.item,t.itemAttributes),Y(e.item,t.content)}))})(o,n),r=o,I(E(t),w(r),ct),t.concat(o)},gt=e=>$(e,"OL,UL"),ft=e=>Q(e).exists(gt),ht=e=>e.depth>0,yt=e=>e.isSelected,vt=e=>{const t=K(e),n=q(e).exists(gt)?t.slice(0,-1):t;return S(n,me)},Ct=e=>(N(e,((t,n)=>{((e,t)=>{const n=e[t].depth,o=e=>e.depth===n&&!e.dirty,r=e=>e.depth<n;return D(A(e.slice(0,t)),o,r).orThunk((()=>D(e.slice(t+1),o,r)))})(e,n).fold((()=>{t.dirty&&(e=>{e.listAttributes=ae(e.listAttributes,((e,t)=>"start"!==t))})(t)}),(e=>{return o=e,(n=t).listType=o.listType,void(n.listAttributes={...o.listAttributes});var n,o}))})),e),bt=(e,t,n,o)=>Q(o).filter(gt).fold((()=>{t.each((e=>{U(e.start,o)&&n.set(!0)}));const r=((e,t,n)=>j(e).filter(H).map((o=>({depth:t,dirty:!1,isSelected:n,content:vt(e),itemAttributes:ce(e),listAttributes:ce(o),listType:_(o)}))))(o,e,n.get());t.each((e=>{U(e.end,o)&&n.set(!1)}));const s=q(o).filter(gt).map((o=>St(e,t,n,o))).getOr([]);return r.toArray().concat(s)}),(o=>St(e,t,n,o))),St=(e,t,n,o)=>k(K(o),(o=>(gt(o)?St:bt)(e+1,t,n,o))),Nt=(e,t)=>{const n=Ct(t);return S(n,(t=>{const n=((e,t)=>{const n=(t||document).createDocumentFragment();return N(e,(e=>{n.appendChild(e.dom)})),R.fromDom(n)})(t.content);return R.fromDom(Me(e,n.dom))}))},Lt=(e,t)=>{const n=Ct(t);return((e,t)=>{const n=T(t,((t,n)=>n.depth>t.length?pt(e,t,n):ut(e,t,n)),[]);return w(n).map((e=>e.list))})(e.contentDocument,n).toArray()},Tt=(e,t,n)=>{const o=((e,t)=>{const n=(e=>{let t=!1;return{get:()=>t,set:e=>{t=e}}})();return S(e,(e=>({sourceList:e,entries:St(0,t,n,e)})))})(t,(e=>{const t=S(We(e),R.fromDom);return I(O(t,u(ft)),O(A(t),u(ft)),((e,t)=>({start:e,end:t})))})(e));N(o,(t=>{((e,t)=>{N(L(e,yt),(e=>((e,t)=>{switch(e){case"Indent":t.depth++;break;case"Outdent":t.depth--;break;case"Flatten":t.depth=0}t.dirty=!0})(t,e)))})(t.entries,n);const o=((e,t)=>k(((e,t)=>{if(0===e.length)return[];{let n=t(e[0]);const o=[];let r=[];for(let s=0,i=e.length;s<i;s++){const i=e[s],l=t(i);l!==n&&(o.push(r),r=[]),n=l,r.push(i)}return 0!==r.length&&o.push(r),o}})(t,ht),(t=>w(t).exists(ht)?Lt(e,t):Nt(e,t))))(e,t.entries);var r;N(o,(t=>{st(e,"Indent"===n?"IndentList":"OutdentList",t.dom)})),r=t.sourceList,N(o,(e=>{G(r,e)})),te(t.sourceList)}))},Dt=(e,t)=>{const n=se(Xe(e)),o=se((e=>L(We(e),Le))(e));let r=!1;if(n.length||o.length){const s=e.selection.getBookmark();Tt(e,n,t),((e,t,n)=>{N(n,"Indent"===t?Fe:t=>He(e,t))})(e,t,o),e.selection.moveToBookmark(s),e.selection.setRng(je(e.selection.getRng())),e.nodeChanged(),r=!0}return r},Ot=(e,t)=>!(e=>{const t=Qe(e);return nt(e,t)})(e)&&Dt(e,t),kt=e=>Ot(e,"Indent"),At=e=>Ot(e,"Outdent"),xt=e=>Ot(e,"Flatten"),wt=e=>"\ufeff"===e;var Et=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager");const Bt=pe.DOM,Pt=e=>{const t={},n=n=>{let o=e[n?"startContainer":"endContainer"],r=e[n?"startOffset":"endOffset"];if(ve(o)){const e=Bt.create("span",{"data-mce-type":"bookmark"});o.hasChildNodes()?(r=Math.min(r,o.childNodes.length-1),n?o.insertBefore(e,o.childNodes[r]):Bt.insertAfter(e,o.childNodes[r])):o.appendChild(e),o=e,r=0}t[n?"startContainer":"endContainer"]=o,t[n?"startOffset":"endOffset"]=r};return n(!0),e.collapsed||n(),t},It=e=>{const t=t=>{let n=e[t?"startContainer":"endContainer"],o=e[t?"startOffset":"endOffset"];if(n){if(ve(n)&&n.parentNode){const e=n;o=(e=>{var t;let n=null===(t=e.parentNode)||void 0===t?void 0:t.firstChild,o=0;for(;n;){if(n===e)return o;ve(n)&&"bookmark"===n.getAttribute("data-mce-type")||o++,n=n.nextSibling}return-1})(n),n=n.parentNode,Bt.remove(e),!n.hasChildNodes()&&Bt.isBlock(n)&&n.appendChild(Bt.create("br"))}e[t?"startContainer":"endContainer"]=n,e[t?"startOffset":"endOffset"]=o}};t(!0),t();const n=Bt.createRng();return n.setStart(e.startContainer,e.startOffset),e.endContainer&&n.setEnd(e.endContainer,e.endOffset),je(n)},Mt=e=>{switch(e){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}},Rt=(e,t)=>{ge.each(t,((t,n)=>{e.setAttribute(n,t)}))},Ut=(e,t,n)=>{((e,t,n)=>{const o=n["list-style-type"]?n["list-style-type"]:null;e.setStyle(t,"list-style-type",o)})(e,t,n),((e,t,n)=>{Rt(t,n["list-attributes"]),ge.each(e.select("li",t),(e=>{Rt(e,n["list-item-attributes"])}))})(e,t,n)},$t=(e,t)=>l(t)&&!ke(t,e.schema.getBlockElements()),_t=(e,t,n,o)=>{let r=t[n?"startContainer":"endContainer"];const s=t[n?"startOffset":"endOffset"];ve(r)&&(r=r.childNodes[Math.min(s,r.childNodes.length-1)]||r),!n&&De(r.nextSibling)&&(r=r.nextSibling);const i=(t,n)=>{var r;const s=new oe(t,o),i=n?"next":"prev";let l;for(;l=s[i]();)if(!Ae(e,l)&&!wt(l.textContent)&&0!==(null===(r=l.textContent)||void 0===r?void 0:r.length))return f.some(l);return f.none()};if(n&&ye(r))if(wt(r.textContent))r=i(r,!1).getOr(r);else for(null!==r.parentNode&&$t(e,r.parentNode)&&(r=r.parentNode);null!==r.previousSibling&&($t(e,r.previousSibling)||ye(r.previousSibling));)r=r.previousSibling;if(!n&&ye(r))if(wt(r.textContent))r=i(r,!0).getOr(r);else for(null!==r.parentNode&&$t(e,r.parentNode)&&(r=r.parentNode);null!==r.nextSibling&&($t(e,r.nextSibling)||ye(r.nextSibling));)r=r.nextSibling;for(;r.parentNode!==o;){const t=r.parentNode;if(Oe(e,r))return r;if(/^(TD|TH)$/.test(t.nodeName))return r;r=t}return r},Ht=(e,t,n)=>{const o=e.selection.getRng();let r="LI";const s=Ge(e,e.selection.getStart(!0)),i=e.dom;if("false"===i.getContentEditable(e.selection.getNode()))return;"DL"===(t=t.toUpperCase())&&(r="DT");const l=Pt(o),a=((e,t,n)=>{const o=[],r=e.dom,s=_t(e,t,!0,n),i=_t(e,t,!1,n);let l;const a=[];for(let e=s;e&&(a.push(e),e!==i);e=e.nextSibling);return ge.each(a,(t=>{var s;if(Oe(e,t))return o.push(t),void(l=null);if(r.isBlock(t)||De(t))return De(t)&&r.remove(t),void(l=null);const i=t.nextSibling;Et.isBookmarkNode(t)&&(Ce(i)||Oe(e,i)||!i&&t.parentNode===n)?l=null:(l||(l=r.create("p"),null===(s=t.parentNode)||void 0===s||s.insertBefore(l,t),o.push(l)),l.appendChild(t))})),o})(e,o,s);ge.each(a,(o=>{let s;const l=o.previousSibling,a=o.parentNode;Ne(a)||(l&&Ce(l)&&l.nodeName===t&&((e,t,n)=>{const o=e.getStyle(t,"list-style-type");let r=n?n["list-style-type"]:"";return r=null===r?"":r,o===r})(i,l,n)?(s=l,o=i.rename(o,r),l.appendChild(o)):(s=i.create(t),a.insertBefore(s,o),s.appendChild(o),o=i.rename(o,r)),((e,t,n)=>{ge.each(n,(n=>e.setStyle(t,n,"")))})(i,o,["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"]),Ut(i,s,n),Vt(e.dom,s))})),e.selection.setRng(It(l))},Ft=(e,t,n)=>{return((e,t)=>Ce(e)&&e.nodeName===(null==t?void 0:t.nodeName))(t,n)&&((e,t,n)=>e.getStyle(t,"list-style-type",!0)===e.getStyle(n,"list-style-type",!0))(e,t,n)&&(o=n,t.className===o.className);var o},Vt=(e,t)=>{let n,o=t.nextSibling;if(Ft(e,t,o)){const r=o;for(;n=r.firstChild;)t.appendChild(n);e.remove(r)}if(o=t.previousSibling,Ft(e,t,o)){const r=o;for(;n=r.lastChild;)t.insertBefore(n,t.firstChild);e.remove(r)}},jt=(e,t,n,o,r)=>{const s=Ce(t);if(s&&t.nodeName===o&&!Kt(r))xt(e);else{Ht(e,o,r);const i=Pt(e.selection.getRng()),l=s?[t,...n]:n;ge.each(l,(t=>{((e,t,n,o)=>{if(t.nodeName!==n){const r=e.dom.rename(t,n);Ut(e.dom,r,o),st(e,Mt(n),r)}else Ut(e.dom,t,o),st(e,Mt(n),t)})(e,t,o,r)})),e.selection.setRng(It(i))}},Kt=e=>"list-style-type"in e,zt=(e,t,n)=>{const o=Qe(e);if(ot(e,o)||(e=>b(e.selection.getSelectedBlocks(),u(e.dom.isEditable)))(e))return;const s=qe(e),i=r(n)?n:{};s.length>0?jt(e,o,s,t,i):((e,t,n,o)=>{if(t!==e.getBody())if(t)if(t.nodeName!==n||Kt(o)||et(t)){const r=Pt(e.selection.getRng());Ut(e.dom,t,o);const s=e.dom.rename(t,n);Vt(e.dom,s),e.selection.setRng(It(r)),Ht(e,n,o),st(e,Mt(n),s)}else xt(e);else Ht(e,n,o),st(e,Mt(n),t)})(e,o,t,i)},Qt=pe.DOM,qt=(e,t)=>{const n=ge.grep(e.select("ol,ul",t));ge.each(n,(t=>{((e,t)=>{const n=t.parentElement;if(n&&"LI"===n.nodeName&&n.firstChild===t){const o=n.previousSibling;o&&"LI"===o.nodeName?(o.appendChild(t),xe(e,n)&&Qt.remove(n)):Qt.setStyle(n,"listStyleType","none")}if(Ce(n)){const e=n.previousSibling;e&&"LI"===e.nodeName&&e.appendChild(t)}})(e,t)}))},Wt=(e,t,n,o)=>{let r=t.startContainer;const s=t.startOffset;if(ye(r)&&(n?s<r.data.length:s>0))return r;const i=e.schema.getNonEmptyElements();ve(r)&&(r=ne.getNode(r,s));const l=new oe(r,o);n&&((e,t)=>!!De(t)&&e.isBlock(t.nextSibling)&&!De(t.previousSibling))(e.dom,r)&&l.next();const a=n?l.next.bind(l):l.prev2.bind(l);for(;r=a();){if("LI"===r.nodeName&&!r.hasChildNodes())return r;if(i[r.nodeName])return r;if(ye(r)&&r.data.length>0)return r}return null},Zt=(e,t)=>{const n=t.childNodes;return 1===n.length&&!Ce(n[0])&&e.isBlock(n[0])},Gt=(e,t,n)=>{let o;const r=Zt(e,n)?n.firstChild:n;if(((e,t)=>{Zt(e,t)&&e.remove(t.firstChild,!0)})(e,t),!xe(e,t,!0))for(;o=t.firstChild;)r.appendChild(o)},Jt=(e,t,n)=>{let o;const r=t.parentNode;if(!we(e,t)||!we(e,n))return;Ce(n.lastChild)&&(o=n.lastChild),r===n.lastChild&&De(r.previousSibling)&&e.remove(r.previousSibling);const s=n.lastChild;s&&De(s)&&t.hasChildNodes()&&e.remove(s),xe(e,n,!0)&&ee(R.fromDom(n)),Gt(e,t,n),o&&n.appendChild(o);const i=((e,t)=>{const n=e.dom,o=t.dom;return n!==o&&n.contains(o)})(R.fromDom(n),R.fromDom(t))?e.getParents(t,Ce,n):[];e.remove(t),N(i,(t=>{xe(e,t)&&t!==e.getRoot()&&e.remove(t)}))},Xt=(e,t,n,o)=>{const r=e.dom;if(r.isEmpty(o))((e,t,n)=>{ee(R.fromDom(n)),Jt(e.dom,t,n),e.selection.setCursorLocation(n,0)})(e,n,o);else{const s=Pt(t);Jt(r,n,o),e.selection.setRng(It(s))}},Yt=(e,t)=>{const n=e.dom,o=e.selection,r=o.getStart(),s=Ze(e,r),i=n.getParent(o.getStart(),"LI",s);if(i){const r=i.parentElement;if(r===e.getBody()&&xe(n,r))return!0;const l=je(o.getRng()),a=n.getParent(Wt(e,l,t,s),"LI",s);if(a&&a!==i)return e.undoManager.transact((()=>{var n,o;t?Xt(e,l,a,i):(null===(o=(n=i).parentNode)||void 0===o?void 0:o.firstChild)===n?At(e):((e,t,n,o)=>{const r=Pt(t);Jt(e.dom,n,o);const s=It(r);e.selection.setRng(s)})(e,l,i,a)})),!0;if(!a&&!t&&0===l.startOffset&&0===l.endOffset)return e.undoManager.transact((()=>{xt(e)})),!0}return!1},en=(e,t)=>{const n=e.dom,o=e.selection.getStart(),r=Ze(e,o),s=n.getParent(o,n.isBlock,r);if(s&&n.isEmpty(s)){const o=je(e.selection.getRng()),i=n.getParent(Wt(e,o,t,r),"LI",r);if(i){const l=e=>C(["td","th","caption"],_(e)),a=e=>e.dom===r;return!!((e,t,n=m)=>I(e,t,n).getOr(e.isNone()&&t.isNone()))(Z(R.fromDom(i),l,a),Z(R.fromDom(o.startContainer),l,a),U)&&(e.undoManager.transact((()=>{((e,t,n)=>{const o=e.getParent(t.parentNode,e.isBlock,n);e.remove(t),o&&e.isEmpty(o)&&e.remove(o)})(n,s,r),Vt(n,i.parentNode),e.selection.select(i,!0),e.selection.collapse(t)})),!0)}}return!1},tn=e=>{const t=e.selection.getStart(),n=Ze(e,t);return e.dom.getParent(t,"LI,DT,DD",n)||We(e).length>0},nn=(e,t)=>{const n=e.selection;return!ot(e,n.getNode())&&(n.isCollapsed()?((e,t)=>Yt(e,t)||en(e,t))(e,t):(e=>!!tn(e)&&(e.undoManager.transact((()=>{e.execCommand("Delete"),qt(e.dom,e.getBody())})),!0))(e))},on=e=>{const t=A(it(e).split("")),n=S(t,((e,t)=>{const n=e.toUpperCase().charCodeAt(0)-"A".charCodeAt(0)+1;return Math.pow(26,t)*n}));return T(n,((e,t)=>e+t),0)},rn=e=>{if(--e<0)return"";{const t=e%26,n=Math.floor(e/26);return rn(n)+String.fromCharCode("A".charCodeAt(0)+t)}},sn=e=>{const t=parseInt(e.start,10);return P(e.listStyleType,"upper-alpha")?rn(t):P(e.listStyleType,"lower-alpha")?rn(t).toLowerCase():e.start},ln=e=>{const t=Qe(e);Se(t)&&!ot(e,t)&&e.windowManager.open({title:"List Properties",body:{type:"panel",items:[{type:"input",name:"start",label:"Start list at number",inputMode:"numeric"}]},initialData:{start:sn({start:e.dom.getAttrib(t,"start","1"),listStyleType:f.from(e.dom.getStyle(t,"list-style-type"))})},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:t=>{(e=>{switch((e=>/^[0-9]+$/.test(e)?2:/^[A-Z]+$/.test(e)?0:(e=>/^[a-z]+$/.test(e))(e)?1:e.length>0?4:3)(e)){case 2:return f.some({listStyleType:f.none(),start:e});case 0:return f.some({listStyleType:f.some("upper-alpha"),start:on(e).toString()});case 1:return f.some({listStyleType:f.some("lower-alpha"),start:on(e).toString()});case 3:return f.some({listStyleType:f.none(),start:""});case 4:return f.none()}})(t.getData().start).each((t=>{e.execCommand("mceListUpdate",!1,{attrs:{start:"1"===t.start?"":t.start},styles:{"list-style-type":t.listStyleType.getOr("")}})})),t.close()}})},an=(e,t)=>()=>{const n=Qe(e);return l(n)&&n.nodeName===t},dn=e=>{e.addCommand("mceListProps",(()=>{ln(e)}))},cn=e=>{e.on("BeforeExecCommand",(t=>{const n=t.command.toLowerCase();"indent"===n?kt(e):"outdent"===n&&At(e)})),e.addCommand("InsertUnorderedList",((t,n)=>{zt(e,"UL",n)})),e.addCommand("InsertOrderedList",((t,n)=>{zt(e,"OL",n)})),e.addCommand("InsertDefinitionList",((t,n)=>{zt(e,"DL",n)})),e.addCommand("RemoveList",(()=>{xt(e)})),dn(e),e.addCommand("mceListUpdate",((t,n)=>{r(n)&&((e,t)=>{const n=Qe(e);null===n||ot(e,n)||e.undoManager.transact((()=>{r(t.styles)&&e.dom.setStyles(n,t.styles),r(t.attrs)&&le(t.attrs,((t,o)=>e.dom.setAttrib(n,o,t)))}))})(e,n)})),e.addQueryStateHandler("InsertUnorderedList",an(e,"UL")),e.addQueryStateHandler("InsertOrderedList",an(e,"OL")),e.addQueryStateHandler("InsertDefinitionList",an(e,"DL"))};var mn=tinymce.util.Tools.resolve("tinymce.html.Node");const un=e=>3===e.type,pn=e=>0===e.length,gn=e=>{const t=(t,n)=>{const o=mn.create("li");N(t,(e=>o.append(e))),n?e.insert(o,n,!0):e.append(o)},n=T(e.children(),((e,n)=>un(n)?[...e,n]:pn(e)||un(n)?e:(t(e,n),[])),[]);pn(n)||t(n)},fn=e=>{Be(e)&&(e=>{e.on("keydown",(t=>{t.keyCode!==re.TAB||re.metaKeyPressed(t)||e.undoManager.transact((()=>{(t.shiftKey?At(e):kt(e))&&t.preventDefault()}))}))})(e),(e=>{e.on("ExecCommand",(t=>{const n=t.command.toLowerCase();"delete"!==n&&"forwarddelete"!==n||!tn(e)||qt(e.dom,e.getBody())})),e.on("keydown",(t=>{t.keyCode===re.BACKSPACE?nn(e,!1)&&t.preventDefault():t.keyCode===re.DELETE&&nn(e,!0)&&t.preventDefault()}))})(e)},hn=(e,t)=>n=>rt(e,(o=>{n.setActive(tt(o.parents,t)),n.setEnabled(!ot(e,o.element))})),yn=(e,t)=>n=>rt(e,(o=>n.setEnabled(tt(o.parents,t)&&!ot(e,o.element))));e.add("lists",(e=>((e=>{(0,e.options.register)("lists_indent_on_tab",{processor:"boolean",default:!0})})(e),(e=>{e.on("PreInit",(()=>{const{parser:t}=e;t.addNodeFilter("ul,ol",(e=>N(e,gn)))}))})(e),e.hasPlugin("rtc",!0)?dn(e):(fn(e),cn(e)),(e=>{const t=t=>()=>e.execCommand(t);e.hasPlugin("advlist")||(e.ui.registry.addToggleButton("numlist",{icon:"ordered-list",active:!1,tooltip:"Numbered list",onAction:t("InsertOrderedList"),onSetup:hn(e,"OL")}),e.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:!1,tooltip:"Bullet list",onAction:t("InsertUnorderedList"),onSetup:hn(e,"UL")}))})(e),(e=>{const t={text:"List properties...",icon:"ordered-list",onAction:()=>e.execCommand("mceListProps"),onSetup:yn(e,"OL")};e.ui.registry.addMenuItem("listprops",t),e.ui.registry.addContextMenu("lists",{update:t=>{const n=Qe(e,t);return Se(n)?["listprops"]:[]}})})(e),(e=>({backspaceDelete:t=>{nn(e,t)}}))(e))))}()})); ;/*!node_modules/tinymce/plugins/lists/index.js*/ amis.define("ee387e1",(function(e,i,n,c){e("d7b3e8c")})); ;/*!node_modules/tinymce/plugins/link/plugin.js*/ amis.define("f160a17",(function(e,t,n,o){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=r=e,o=(l=String).prototype,o.isPrototypeOf(n)||(null===(i=r.constructor)||void 0===i?void 0:i.name)===l.name)?"string":t;var n,o;var r,l,i})(t)===e,n=e=>t=>typeof t===e,o=t("string"),r=t("object"),l=t("array"),i=(a=null,e=>a===e);var a;const s=n("boolean"),c=e=>!(e=>null==e)(e),u=n("function"),g=(e,t)=>{if(l(e)){for(let n=0,o=e.length;n<o;++n)if(!t(e[n]))return!1;return!0}return!1},d=()=>{},m=(e,t)=>e===t;class h{constructor(e,t){this.tag=e,this.value=t}static some(e){return new h(!0,e)}static none(){return h.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?h.some(e(this.value)):h.none()}bind(e){return this.tag?e(this.value):h.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:h.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return c(e)?h.some(e):h.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}h.singletonNone=new h(!1);const f=Array.prototype.indexOf,p=Array.prototype.push,k=(e,t)=>((e,t)=>f.call(e,t))(e,t)>-1,v=e=>{const t=[];for(let n=0,o=e.length;n<o;++n){if(!l(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);p.apply(t,e[n])}return t},y=(e,t)=>v(((e,t)=>{const n=e.length,o=new Array(n);for(let r=0;r<n;r++){const n=e[r];o[r]=t(n,r)}return o})(e,t)),x=(e,t)=>{for(let n=0;n<e.length;n++){const o=t(e[n],n);if(o.isSome())return o}return h.none()},b=(e,t,n=m)=>e.exists((e=>n(e,t))),_=e=>{const t=[],n=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(n);return t},w=(e,t)=>e?h.some(t):h.none(),C=e=>t=>t.options.get(e),O=C("link_assume_external_targets"),N=C("link_context_toolbar"),A=C("link_list"),S=C("link_default_target"),T=C("link_default_protocol"),E=C("link_target_list"),R=C("link_rel_list"),P=C("link_class_list"),L=C("link_title"),M=C("allow_unsafe_link_target"),D=C("link_quicklink");var U=tinymce.util.Tools.resolve("tinymce.util.Tools");const B=e=>o(e.value)?e.value:"",I=(e,t)=>{const n=[];return U.each(e,(e=>{const r=(e=>o(e.text)?e.text:o(e.title)?e.title:"")(e);if(void 0!==e.menu){const o=I(e.menu,t);n.push({text:r,items:o})}else{const o=t(e);n.push({text:r,value:o})}})),n},j=(e=B)=>t=>h.from(t).map((t=>I(t,e))),K={sanitize:e=>j(B)(e),sanitizeWith:j,createUi:(e,t)=>n=>({name:e,type:"listbox",label:t,items:n}),getValue:B},z=Object.keys,q=Object.hasOwnProperty,V=(e,t,n,o)=>{((e,t)=>{const n=z(e);for(let o=0,r=n.length;o<r;o++){const r=n[o];t(e[r],r)}})(e,((e,r)=>{(t(e,r)?n:o)(e,r)}))},F=(e,t)=>q.call(e,t);var W=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),$=tinymce.util.Tools.resolve("tinymce.util.URI");const G=e=>c(e)&&"a"===e.nodeName.toLowerCase(),H=e=>G(e)&&!!X(e),J=(e,t)=>{if(e.collapsed)return[];{const n=e.cloneContents(),o=n.firstChild,r=new W(o,n),l=[];let i=o;do{t(i)&&l.push(i)}while(i=r.next());return l}},Q=e=>/^\w+:/i.test(e),X=e=>{var t,n;return null!==(n=null!==(t=e.getAttribute("data-mce-href"))&&void 0!==t?t:e.getAttribute("href"))&&void 0!==n?n:""},Y=(e,t)=>{const n=["noopener"],o=e?e.split(/\s+/):[],r=e=>e.filter((e=>-1===U.inArray(n,e))),l=t?(e=>(e=r(e)).length>0?e.concat(n):n)(o):r(o);return l.length>0?(e=>U.trim(e.sort().join(" ")))(l):""},Z=(e,t)=>(t=t||ne(e.selection.getRng())[0]||e.selection.getNode(),ie(t)?h.from(e.dom.select("a[href]",t)[0]):h.from(e.dom.getParent(t,"a[href]"))),ee=(e,t)=>Z(e,t).isSome(),te=(e,t)=>(e=>e.replace(/\uFEFF/g,""))(t.fold((()=>e.getContent({format:"text"})),(e=>e.innerText||e.textContent||""))),ne=e=>J(e,H),oe=e=>U.grep(e,H),re=e=>oe(e).length>0,le=e=>{const t=e.schema.getTextInlineElements(),n=e=>1===e.nodeType&&!G(e)&&!F(t,e.nodeName.toLowerCase());if(Z(e).exists((e=>e.hasAttribute("data-mce-block"))))return!1;const o=e.selection.getRng();if(o.collapsed)return!0;return 0===J(o,n).length},ie=e=>c(e)&&"FIGURE"===e.nodeName&&/\bimage\b/i.test(e.className),ae=(e,t)=>{const n={...t};if(0===R(e).length&&!M(e)){const e=Y(n.rel,"_blank"===n.target);n.rel=e||null}return h.from(n.target).isNone()&&!1===E(e)&&(n.target=S(e)),n.href=((e,t)=>"http"!==t&&"https"!==t||Q(e)?e:t+"://"+e)(n.href,O(e)),n},se=(e,t,n)=>{const o=e.selection.getNode(),r=Z(e,o),l=ae(e,(e=>{return t=["title","rel","class","target"],n=(t,n)=>(e[n].each((e=>{t[n]=e.length>0?e:null})),t),o={href:e.href},((e,t)=>{for(let n=0,o=e.length;n<o;n++)t(e[n],n)})(t,((e,t)=>{o=n(o,e,t)})),o;var t,n,o})(n));e.undoManager.transact((()=>{n.href===t.href&&t.attach(),r.fold((()=>{((e,t,n,o)=>{const r=e.dom;ie(t)?me(r,t,o):n.fold((()=>{e.execCommand("mceInsertLink",!1,o)}),(t=>{e.insertContent(r.createHTML("a",o,r.encode(t)))}))})(e,o,n.text,l)}),(t=>{e.focus(),((e,t,n,o)=>{n.each((e=>{F(t,"innerText")?t.innerText=e:t.textContent=e})),e.dom.setAttribs(t,o),e.selection.select(t)})(e,t,n.text,l)}))}))},ce=e=>{const{class:t,href:n,rel:o,target:r,text:l,title:a}=e;return((e,t)=>{const n={};var o;return V(e,t,(o=n,(e,t)=>{o[t]=e}),d),n})({class:t.getOrNull(),href:n,rel:o.getOrNull(),target:r.getOrNull(),text:l.getOrNull(),title:a.getOrNull()},((e,t)=>!1===i(e)))},ue=(e,t,n)=>{const o=((e,t)=>{const n=e.options.get,o={allow_html_data_urls:n("allow_html_data_urls"),allow_script_urls:n("allow_script_urls"),allow_svg_data_urls:n("allow_svg_data_urls")},r=t.href;return{...t,href:$.isDomSafe(r,"a",o)?r:""}})(e,n);e.hasPlugin("rtc",!0)?e.execCommand("createlink",!1,ce(o)):se(e,t,o)},ge=e=>{e.hasPlugin("rtc",!0)?e.execCommand("unlink"):(e=>{e.undoManager.transact((()=>{const t=e.selection.getNode();ie(t)?de(e,t):(e=>{const t=e.dom,n=e.selection,o=n.getBookmark(),r=n.getRng().cloneRange(),l=t.getParent(r.startContainer,"a[href]",e.getBody()),i=t.getParent(r.endContainer,"a[href]",e.getBody());l&&r.setStartBefore(l),i&&r.setEndAfter(i),n.setRng(r),e.execCommand("unlink"),n.moveToBookmark(o)})(e),e.focus()}))})(e)},de=(e,t)=>{var n;const o=e.dom.select("img",t)[0];if(o){const r=e.dom.getParents(o,"a[href]",t)[0];r&&(null===(n=r.parentNode)||void 0===n||n.insertBefore(o,r),e.dom.remove(r))}},me=(e,t,n)=>{var o;const r=e.select("img",t)[0];if(r){const t=e.create("a",n);null===(o=r.parentNode)||void 0===o||o.insertBefore(t,r),t.appendChild(r)}},he=e=>{return F(t=e,n="items")&&void 0!==t[n]&&null!==t[n];var t,n},fe=(e,t)=>x(t,(t=>he(t)?fe(e,t.items):w(t.value===e,t))),pe=(e,t,n,o)=>{const r=o[t],l=e.length>0;return void 0!==r?fe(r,n).map((t=>({url:{value:t.value,meta:{text:l?e:t.text,attach:d}},text:l?e:t.text}))):h.none()},ke=(e,t)=>{const n={text:e.text,title:e.title},o=e=>{const t=(o=e.url,w(n.text.length<=0,h.from(null===(r=o.meta)||void 0===r?void 0:r.text).getOr(o.value)));var o,r;const l=(e=>{var t;return w(n.title.length<=0,h.from(null===(t=e.meta)||void 0===t?void 0:t.title).getOr(""))})(e.url);return t.isSome()||l.isSome()?h.some({...t.map((e=>({text:e}))).getOr({}),...l.map((e=>({title:e}))).getOr({})}):h.none()},r=(e,o)=>{const r=(l=t,i=o,"link"===i?l.link:"anchor"===i?l.anchor:h.none()).getOr([]);var l,i;return pe(n.text,o,r,e)};return{onChange:(e,t)=>{const l=t.name;return"url"===l?o(e()):k(["anchor","link"],l)?r(e(),l):"text"===l||"title"===l?(n[l]=e()[l],h.none()):h.none()}}};var ve=tinymce.util.Tools.resolve("tinymce.util.Delay");const ye=e=>{const t=e.href;return t.indexOf("@")>0&&-1===t.indexOf("/")&&-1===t.indexOf("mailto:")?h.some({message:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",preprocess:e=>({...e,href:"mailto:"+t})}):h.none()},xe=(e,t)=>n=>{const o=n.href;return 1===e&&!Q(o)||0===e&&/^\s*www(\.|\d\.)/i.test(o)?h.some({message:`The URL you entered seems to be an external link. Do you want to add the required ${t}:// prefix?`,preprocess:e=>({...e,href:t+"://"+o})}):h.none()},be=(e,t)=>x([ye,xe(O(e),T(e))],(e=>e(t))).fold((()=>Promise.resolve(t)),(n=>new Promise((o=>{((e,t,n)=>{const o=e.selection.getRng();ve.setEditorTimeout(e,(()=>{e.windowManager.confirm(t,(t=>{e.selection.setRng(o),n(t)}))}))})(e,n.message,(e=>{o(e?n.preprocess(t):t)}))})))),_e=e=>{const t=e.dom.select("a:not([href])"),n=y(t,(e=>{const t=e.name||e.id;return t?[{text:t,value:"#"+t}]:[]}));return n.length>0?h.some([{text:"None",value:""}].concat(n)):h.none()},we=e=>{const t=P(e);return t.length>0?K.sanitize(t):h.none()},Ce=e=>{try{return h.some(JSON.parse(e))}catch(e){return h.none()}},Oe=e=>{const t=t=>e.convertURL(t.value||t.url||"","href"),n=A(e);return new Promise((e=>{o(n)?fetch(n).then((e=>e.ok?e.text().then(Ce):Promise.reject())).then(e,(()=>e(h.none()))):u(n)?n((t=>e(h.some(t)))):e(h.from(n))})).then((e=>e.bind(K.sanitizeWith(t)).map((e=>{if(e.length>0){return[{text:"None",value:""}].concat(e)}return e}))))},Ne=(e,t)=>{const n=R(e);if(n.length>0){const o=b(t,"_blank"),r=e=>Y(K.getValue(e),o);return(!1===M(e)?K.sanitizeWith(r):K.sanitize)(n)}return h.none()},Ae=[{text:"Current window",value:""},{text:"New window",value:"_blank"}],Se=e=>{const t=E(e);return l(t)?K.sanitize(t).orThunk((()=>h.some(Ae))):!1===t?h.none():h.some(Ae)},Te=(e,t,n)=>{const o=e.getAttrib(t,n);return null!==o&&o.length>0?h.some(o):h.none()},Ee=(e,t)=>Oe(e).then((n=>{const o=((e,t)=>{const n=e.dom,o=le(e)?h.some(te(e.selection,t)):h.none(),r=t.bind((e=>h.from(n.getAttrib(e,"href")))),l=t.bind((e=>h.from(n.getAttrib(e,"target")))),i=t.bind((e=>Te(n,e,"rel"))),a=t.bind((e=>Te(n,e,"class")));return{url:r,text:o,title:t.bind((e=>Te(n,e,"title"))),target:l,rel:i,linkClass:a}})(e,t);return{anchor:o,catalogs:{targets:Se(e),rels:Ne(e,o.target),classes:we(e),anchor:_e(e),link:n},optNode:t,flags:{titleEnabled:L(e)}}})),Re=e=>{const t=(e=>{const t=Z(e);return Ee(e,t)})(e);t.then((t=>{const n=((e,t)=>n=>{const o=n.getData();if(!o.url.value)return ge(e),void n.close();const r=e=>h.from(o[e]).filter((n=>!b(t.anchor[e],n))),l={href:o.url.value,text:r("text"),target:r("target"),rel:r("rel"),class:r("linkClass"),title:r("title")},i={href:o.url.value,attach:void 0!==o.url.meta&&o.url.meta.attach?o.url.meta.attach:d};be(e,l).then((t=>{ue(e,i,t)})),n.close()})(e,t);return((e,t,n)=>{const o=e.anchor.text.map((()=>({name:"text",type:"input",label:"Text to display"}))).toArray(),r=e.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[],l=((e,t)=>{const n=e.anchor,o=n.url.getOr("");return{url:{value:o,meta:{original:{value:o}}},text:n.text.getOr(""),title:n.title.getOr(""),anchor:o,link:o,rel:n.rel.getOr(""),target:n.target.or(t).getOr(""),linkClass:n.linkClass.getOr("")}})(e,h.from(S(n))),i=e.catalogs,a=ke(l,i);return{title:"Insert/Edit Link",size:"normal",body:{type:"panel",items:v([[{name:"url",type:"urlinput",filetype:"file",label:"URL"}],o,r,_([i.anchor.map(K.createUi("anchor","Anchors")),i.rels.map(K.createUi("rel","Rel")),i.targets.map(K.createUi("target","Open link in...")),i.link.map(K.createUi("link","Link list")),i.classes.map(K.createUi("linkClass","Class"))])])},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:l,onChange:(e,{name:t})=>{a.onChange(e.getData,{name:t}).each((t=>{e.setData(t)}))},onSubmit:t}})(t,n,e)})).then((t=>{e.windowManager.open(t)}))};var Pe=tinymce.util.Tools.resolve("tinymce.util.VK");const Le=e=>{const t=document.createElement("a");t.target="_blank",t.href=e,t.rel="noreferrer noopener";const n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),((e,t)=>{document.body.appendChild(e),e.dispatchEvent(t),document.body.removeChild(e)})(t,n)},Me=(e,t)=>e.dom.getParent(t,"a[href]"),De=e=>Me(e,e.selection.getStart()),Ue=(e,t)=>{if(t){const n=X(t);if(/^#/.test(n)){const t=e.dom.select(n);t.length&&e.selection.scrollIntoView(t[0],!0)}else Le(t.href)}},Be=e=>()=>{e.execCommand("mceLink",!1,{dialog:!0})},Ie=e=>()=>{Ue(e,De(e))},je=(e,t)=>(e.on("NodeChange",t),()=>e.off("NodeChange",t)),Ke=e=>t=>{const n=()=>t.setActive(!e.mode.isReadOnly()&&ee(e,e.selection.getNode()));return n(),je(e,n)},ze=e=>t=>{const n=()=>t.setEnabled((e=>1===(e.selection.isCollapsed()?oe(e.dom.getParents(e.selection.getStart())):ne(e.selection.getRng())).length)(e));return n(),je(e,n)},qe=e=>t=>{const n=t=>{return re(t)||(n=e.selection.getRng(),ne(n).length>0);var n},o=e.dom.getParents(e.selection.getStart());return t.setEnabled(n(o)),je(e,(e=>t.setEnabled(n(e.parents))))},Ve=e=>{const t=t=>{const n=e.selection.getNode();return t.setEnabled(ee(e,n)),d};e.ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:Ke(e)},label:"Link",predicate:t=>N(e)&&ee(e,t),initValue:()=>{return Z(e).fold((t="",()=>t),X);var t},commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:!0,onSetup:t=>{const n=e.selection.getNode();return t.setActive(ee(e,n)),Ke(e)(t)},onAction:t=>{const n=t.getValue(),o=(t=>{const n=Z(e),o=le(e);if(n.isNone()&&o){const o=te(e.selection,n);return w(0===o.length,t)}return h.none()})(n);ue(e,{href:n,attach:d},{href:n,text:o,title:h.none(),rel:h.none(),target:h.none(),class:h.none()}),(e=>{e.selection.collapse(!1)})(e),t.hide()}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:t,onAction:t=>{ge(e),t.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:t,onAction:t=>{Ie(e)(),t.hide()}}]})};e.add("link",(e=>{(e=>{const t=e.options.register;t("link_assume_external_targets",{processor:e=>{const t=o(e)||s(e);return t?!0===e?{value:1,valid:t}:"http"===e||"https"===e?{value:e,valid:t}:{value:0,valid:t}:{valid:!1,message:"Must be a string or a boolean."}},default:!1}),t("link_context_toolbar",{processor:"boolean",default:!1}),t("link_list",{processor:e=>o(e)||u(e)||g(e,r)}),t("link_default_target",{processor:"string"}),t("link_default_protocol",{processor:"string",default:"https"}),t("link_target_list",{processor:e=>s(e)||g(e,r),default:!0}),t("link_rel_list",{processor:"object[]",default:[]}),t("link_class_list",{processor:"object[]",default:[]}),t("link_title",{processor:"boolean",default:!0}),t("allow_unsafe_link_target",{processor:"boolean",default:!1}),t("link_quicklink",{processor:"boolean",default:!1})})(e),(e=>{e.ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",onAction:Be(e),onSetup:Ke(e)}),e.ui.registry.addButton("openlink",{icon:"new-tab",tooltip:"Open link",onAction:Ie(e),onSetup:ze(e)}),e.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:()=>ge(e),onSetup:qe(e)})})(e),(e=>{e.ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:Ie(e),onSetup:ze(e)}),e.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onAction:Be(e)}),e.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:()=>ge(e),onSetup:qe(e)})})(e),(e=>{e.ui.registry.addContextMenu("link",{update:t=>e.dom.isEditable(t)?re(e.dom.getParents(t,"a"))?"link unlink openlink":"link":""})})(e),Ve(e),(e=>{e.on("click",(t=>{const n=Me(e,t.target);n&&Pe.metaKeyPressed(t)&&(t.preventDefault(),Ue(e,n))})),e.on("keydown",(t=>{if(!t.isDefaultPrevented()&&13===t.keyCode&&(e=>!0===e.altKey&&!1===e.shiftKey&&!1===e.ctrlKey&&!1===e.metaKey)(t)){const n=De(e);n&&(t.preventDefault(),Ue(e,n))}}))})(e),(e=>{e.addCommand("mceLink",((t,n)=>{!0!==(null==n?void 0:n.dialog)&&D(e)?e.dispatch("contexttoolbar-show",{toolbarKey:"quicklink"}):Re(e)}))})(e),(e=>{e.addShortcut("Meta+K","",(()=>{e.execCommand("mceLink")}))})(e)}))}()})); ;/*!node_modules/tinymce/plugins/link/index.js*/ amis.define("fa782d0",(function(f,a,i,n){f("f160a17")})); ;/*!node_modules/tinymce/plugins/image/plugin.js*/ amis.define("89a7094",(function(e,t,a,i){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=Object.getPrototypeOf,a=(e,t,a)=>{var i;return!!a(e,t.prototype)||(null===(i=e.constructor)||void 0===i?void 0:i.name)===t.name},i=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&a(e,String,((e,t)=>t.isPrototypeOf(e)))?"string":t})(t)===e,o=e=>t=>typeof t===e,r=i("string"),s=i("object"),n=e=>((e,i)=>s(e)&&a(e,i,((e,a)=>t(e)===a)))(e,Object),l=i("array"),c=(m=null,e=>m===e);var m;const d=o("boolean"),g=e=>!(e=>null==e)(e),u=o("function"),p=o("number"),h=()=>{};class b{constructor(e,t){this.tag=e,this.value=t}static some(e){return new b(!0,e)}static none(){return b.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?b.some(e(this.value)):b.none()}bind(e){return this.tag?e(this.value):b.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:b.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return g(e)?b.some(e):b.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}b.singletonNone=new b(!1);const v=Object.keys,y=Object.hasOwnProperty,f=(e,t,a,i)=>{((e,t)=>{const a=v(e);for(let i=0,o=a.length;i<o;i++){const o=a[i];t(e[o],o)}})(e,((e,o)=>{(t(e,o)?a:i)(e,o)}))},w=(e,t)=>y.call(e,t),A=Array.prototype.push,D=e=>{const t=[];for(let a=0,i=e.length;a<i;++a){if(!l(e[a]))throw new Error("Arr.flatten item "+a+" was not an array, input: "+e);A.apply(t,e[a])}return t},_=e=>((e,t)=>t>=0&&t<e.length?b.some(e[t]):b.none())(e,0);"undefined"!=typeof window?window:Function("return this;")();const C=(e,t,a)=>{((e,t,a)=>{if(!(r(a)||d(a)||p(a)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",a,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,a+"")})(e.dom,t,a)},I=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},U={fromHtml:(e,t)=>{const a=(t||document).createElement("div");if(a.innerHTML=e,!a.hasChildNodes()||a.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return I(a.childNodes[0])},fromTag:(e,t)=>{const a=(t||document).createElement(e);return I(a)},fromText:(e,t)=>{const a=(t||document).createTextNode(e);return I(a)},fromDom:I,fromPoint:(e,t,a)=>b.from(e.dom.elementFromPoint(t,a)).map(I)};var x=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),S=tinymce.util.Tools.resolve("tinymce.util.URI");const N=e=>e.length>0,T=e=>t=>t.options.get(e),L=e=>{const t=e.options.register;t("image_dimensions",{processor:"boolean",default:!0}),t("image_advtab",{processor:"boolean",default:!1}),t("image_uploadtab",{processor:"boolean",default:!0}),t("image_prepend_url",{processor:"string",default:""}),t("image_class_list",{processor:"object[]"}),t("image_description",{processor:"boolean",default:!0}),t("image_title",{processor:"boolean",default:!1}),t("image_caption",{processor:"boolean",default:!1}),t("image_list",{processor:e=>{const t=!1===e||r(e)||((e,t)=>{if(l(e)){for(let a=0,i=e.length;a<i;++a)if(!t(e[a]))return!1;return!0}return!1})(e,s)||u(e);return t?{value:e,valid:t}:{valid:!1,message:"Must be false, a string, an array or a function."}},default:!1})},O=T("image_dimensions"),E=T("image_advtab"),M=T("image_uploadtab"),j=T("image_prepend_url"),P=T("image_class_list"),R=T("image_description"),k=T("image_title"),z=T("image_caption"),B=T("image_list"),H=T("a11y_advanced_options"),F=T("automatic_uploads"),G=(e,t)=>Math.max(parseInt(e,10),parseInt(t,10)),W=e=>(e&&(e=e.replace(/px$/,"")),e),$=e=>(e.length>0&&/^[0-9]+$/.test(e)&&(e+="px"),e),V=e=>"IMG"===e.nodeName&&(e.hasAttribute("data-mce-object")||e.hasAttribute("data-mce-placeholder")),K=(e,t)=>{const a=e.options.get;return S.isDomSafe(t,"img",{allow_html_data_urls:a("allow_html_data_urls"),allow_script_urls:a("allow_script_urls"),allow_svg_data_urls:a("allow_svg_data_urls")})},Z=x.DOM,q=e=>e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?W(e.style.marginLeft):"",J=e=>e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?W(e.style.marginTop):"",Q=e=>e.style.borderWidth?W(e.style.borderWidth):"",X=(e,t)=>{var a;return e.hasAttribute(t)&&null!==(a=e.getAttribute(t))&&void 0!==a?a:""},Y=e=>null!==e.parentNode&&"FIGURE"===e.parentNode.nodeName,ee=(e,t,a)=>{""===a||null===a?e.removeAttribute(t):e.setAttribute(t,a)},te=e=>{Y(e)?(e=>{const t=e.parentNode;g(t)&&(Z.insertAfter(e,t),Z.remove(t))})(e):(e=>{const t=Z.create("figure",{class:"image"});Z.insertAfter(t,e),t.appendChild(e),t.appendChild(Z.create("figcaption",{contentEditable:"true"},"Caption")),t.contentEditable="false"})(e)},ae=(e,t)=>{const a=e.getAttribute("style"),i=t(null!==a?a:"");i.length>0?(e.setAttribute("style",i),e.setAttribute("data-mce-style",i)):e.removeAttribute("style")},ie=(e,t)=>(e,a,i)=>{const o=e.style;o[a]?(o[a]=$(i),ae(e,t)):ee(e,a,i)},oe=(e,t)=>e.style[t]?W(e.style[t]):X(e,t),re=(e,t)=>{const a=$(t);e.style.marginLeft=a,e.style.marginRight=a},se=(e,t)=>{const a=$(t);e.style.marginTop=a,e.style.marginBottom=a},ne=(e,t)=>{const a=$(t);e.style.borderWidth=a},le=(e,t)=>{e.style.borderStyle=t},ce=e=>{var t;return null!==(t=e.style.borderStyle)&&void 0!==t?t:""},me=e=>g(e)&&"FIGURE"===e.nodeName,de=e=>0===Z.getAttrib(e,"alt").length&&"presentation"===Z.getAttrib(e,"role"),ge=e=>de(e)?"":X(e,"alt"),ue=(e,t)=>{var a;const i=document.createElement("img");return ee(i,"style",t.style),(q(i)||""!==t.hspace)&&re(i,t.hspace),(J(i)||""!==t.vspace)&&se(i,t.vspace),(Q(i)||""!==t.border)&&ne(i,t.border),(ce(i)||""!==t.borderStyle)&&le(i,t.borderStyle),e(null!==(a=i.getAttribute("style"))&&void 0!==a?a:"")},pe=(e,t)=>({src:X(t,"src"),alt:ge(t),title:X(t,"title"),width:oe(t,"width"),height:oe(t,"height"),class:X(t,"class"),style:e(X(t,"style")),caption:Y(t),hspace:q(t),vspace:J(t),border:Q(t),borderStyle:ce(t),isDecorative:de(t)}),he=(e,t,a,i,o)=>{a[i]!==t[i]&&o(e,i,String(a[i]))},be=(e,t,a)=>{if(a){Z.setAttrib(e,"role","presentation");const t=U.fromDom(e);C(t,"alt","")}else{if(c(t)){const t=U.fromDom(e);i="alt",t.dom.removeAttribute(i)}else{const a=U.fromDom(e);C(a,"alt",t)}"presentation"===Z.getAttrib(e,"role")&&Z.setAttrib(e,"role","")}var i},ve=(e,t)=>(a,i,o)=>{e(a,o),ae(a,t)},ye=(e,t,a)=>{const i=pe(e,a);he(a,i,t,"caption",((e,t,a)=>te(e))),he(a,i,t,"src",ee),he(a,i,t,"title",ee),he(a,i,t,"width",ie(0,e)),he(a,i,t,"height",ie(0,e)),he(a,i,t,"class",ee),he(a,i,t,"style",ve(((e,t)=>ee(e,"style",t)),e)),he(a,i,t,"hspace",ve(re,e)),he(a,i,t,"vspace",ve(se,e)),he(a,i,t,"border",ve(ne,e)),he(a,i,t,"borderStyle",ve(le,e)),((e,t,a)=>{a.alt===t.alt&&a.isDecorative===t.isDecorative||be(e,a.alt,a.isDecorative)})(a,i,t)},fe=(e,t)=>{const a=(e=>{if(e.margin){const 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})(e.dom.styles.parse(t)),i=e.dom.styles.parse(e.dom.styles.serialize(a));return e.dom.styles.serialize(i)},we=e=>{const t=e.selection.getNode(),a=e.dom.getParent(t,"figure.image");return a?e.dom.select("img",a)[0]:t&&("IMG"!==t.nodeName||V(t))?null:t},Ae=(e,t)=>{var a;const i=e.dom,o=((e,t)=>{const a={};var i;return f(e,t,(i=a,(e,t)=>{i[t]=e}),h),a})(e.schema.getTextBlockElements(),((t,a)=>!e.schema.isValidChild(a,"figure"))),r=i.getParent(t.parentNode,(e=>{return t=o,a=e.nodeName,w(t,a)&&void 0!==t[a]&&null!==t[a];var t,a}),e.getBody());return r&&null!==(a=i.split(r,t))&&void 0!==a?a:t},De=(e,t)=>{const a=((e,t)=>{const a=document.createElement("img");if(ye(e,{...t,caption:!1},a),be(a,t.alt,t.isDecorative),t.caption){const e=Z.create("figure",{class:"image"});return e.appendChild(a),e.appendChild(Z.create("figcaption",{contentEditable:"true"},"Caption")),e.contentEditable="false",e}return a})((t=>fe(e,t)),t);e.dom.setAttrib(a,"data-mce-id","__mcenew"),e.focus(),e.selection.setContent(a.outerHTML);const i=e.dom.select('*[data-mce-id="__mcenew"]')[0];if(e.dom.setAttrib(i,"data-mce-id",null),me(i)){const t=Ae(e,i);e.selection.select(t)}else e.selection.select(i)},_e=(e,t)=>{const a=we(e);if(a)if(ye((t=>fe(e,t)),t,a),((e,t)=>{e.dom.setAttrib(t,"src",t.getAttribute("src"))})(e,a),me(a.parentNode)){const t=a.parentNode;Ae(e,t),e.selection.select(a.parentNode)}else e.selection.select(a),((e,t,a)=>{const i=()=>{a.onload=a.onerror=null,e.selection&&(e.selection.select(a),e.nodeChanged())};a.onload=()=>{t.width||t.height||!O(e)||e.dom.setAttribs(a,{width:String(a.clientWidth),height:String(a.clientHeight)}),i()},a.onerror=i})(e,t,a)},Ce=(e,t)=>{const a=we(e);if(a){const i={...pe((t=>fe(e,t)),a),...t},o=((e,t)=>{const a=t.src;return{...t,src:K(e,a)?a:""}})(e,i);i.src?_e(e,o):((e,t)=>{if(t){const a=e.dom.is(t.parentNode,"figure.image")?t.parentNode:t;e.dom.remove(a),e.focus(),e.nodeChanged(),e.dom.isEmpty(e.getBody())&&(e.setContent(""),e.selection.setCursorLocation())}})(e,a)}else t.src&&De(e,{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1,...t})},Ie=(Ue=(e,t)=>n(e)&&n(t)?Ie(e,t):t,(...e)=>{if(0===e.length)throw new Error("Can't merge zero objects");const t={};for(let a=0;a<e.length;a++){const i=e[a];for(const e in i)w(i,e)&&(t[e]=Ue(t[e],i[e]))}return t});var Ue,xe=tinymce.util.Tools.resolve("tinymce.util.ImageUploader"),Se=tinymce.util.Tools.resolve("tinymce.util.Tools");const Ne=e=>r(e.value)?e.value:"",Te=(e,t)=>{const a=[];return Se.each(e,(e=>{const i=(e=>r(e.text)?e.text:r(e.title)?e.title:"")(e);if(void 0!==e.menu){const o=Te(e.menu,t);a.push({text:i,items:o})}else{const o=t(e);a.push({text:i,value:o})}})),a},Le=(e=Ne)=>t=>t?b.from(t).map((t=>Te(t,e))):b.none(),Oe=(e,t)=>((e,t)=>{for(let a=0;a<e.length;a++){const i=t(e[a],a);if(i.isSome())return i}return b.none()})(e,(e=>(e=>w(e,"items"))(e)?Oe(e.items,t):e.value===t?b.some(e):b.none())),Ee=Le,Me=e=>Le(Ne)(e),je=(e,t)=>e.bind((e=>Oe(e,t))),Pe=e=>({title:"Advanced",name:"advanced",items:[{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:"listbox",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"}]}]}]}),Re=e=>{const t=Ee((t=>e.convertURL(t.value||t.url||"","src"))),a=new Promise((a=>{((e,t)=>{const a=B(e);r(a)?fetch(a).then((e=>{e.ok&&e.json().then(t)})):u(a)?a(t):t(a)})(e,(e=>{a(t(e).map((e=>D([[{text:"None",value:""}],e]))))}))})),i=Me(P(e)),o=E(e),s=M(e),n=(e=>N(e.options.get("images_upload_url")))(e),l=(e=>g(e.options.get("images_upload_handler")))(e),c=(e=>{const t=we(e);return t?pe((t=>fe(e,t)),t):{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}})(e),m=R(e),d=k(e),p=O(e),h=z(e),v=H(e),y=F(e),f=b.some(j(e)).filter((e=>r(e)&&e.length>0));return a.then((e=>({image:c,imageList:e,classList:i,hasAdvTab:o,hasUploadTab:s,hasUploadUrl:n,hasUploadHandler:l,hasDescription:m,hasImageTitle:d,hasDimensions:p,hasImageCaption:h,prependURL:f,hasAccessibilityOptions:v,automaticUploads:y})))},ke=e=>{const t=e.imageList.map((e=>({name:"images",type:"listbox",label:"Image list",items:e}))),a={name:"alt",type:"input",label:"Alternative description",enabled:!(e.hasAccessibilityOptions&&e.image.isDecorative)},i=e.classList.map((e=>({name:"classes",type:"listbox",label:"Class",items:e})));return D([[{name:"src",type:"urlinput",filetype:"image",label:"Source"}],t.toArray(),e.hasAccessibilityOptions&&e.hasDescription?[{type:"label",label:"Accessibility",items:[{name:"isDecorative",type:"checkbox",label:"Image is decorative"}]}]:[],e.hasDescription?[a]:[],e.hasImageTitle?[{name:"title",type:"input",label:"Image title"}]:[],e.hasDimensions?[{name:"dimensions",type:"sizeinput"}]:[],[{...(o=e.classList.isSome()&&e.hasImageCaption,o?{type:"grid",columns:2}:{type:"panel"}),items:D([i.toArray(),e.hasImageCaption?[{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[]])}]]);var o},ze=e=>({title:"General",name:"general",items:ke(e)}),Be=ke,He=e=>({title:"Upload",name:"upload",items:[{type:"dropzone",name:"fileinput"}]}),Fe=e=>({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}),Ge=(e,t)=>({src:e.src.value,alt:null!==e.alt&&0!==e.alt.length||!t?e.alt:null,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}),We=(e,t)=>{const a=t.getData();((e,t)=>/^(?:[a-zA-Z]+:)?\/\//.test(t)?b.none():e.prependURL.bind((e=>t.substring(0,e.length)!==e?b.some(e+t):b.none())))(e,a.src.value).each((e=>{t.setData({src:{value:e,meta:a.src.meta}})}))},$e=(e,t)=>{const a=t.getData(),i=a.src.meta;if(void 0!==i){const o=Ie({},a);((e,t,a)=>{e.hasDescription&&r(a.alt)&&(t.alt=a.alt),e.hasAccessibilityOptions&&(t.isDecorative=a.isDecorative||t.isDecorative||!1),e.hasImageTitle&&r(a.title)&&(t.title=a.title),e.hasDimensions&&(r(a.width)&&(t.dimensions.width=a.width),r(a.height)&&(t.dimensions.height=a.height)),r(a.class)&&je(e.classList,a.class).each((e=>{t.classes=e.value})),e.hasImageCaption&&d(a.caption)&&(t.caption=a.caption),e.hasAdvTab&&(r(a.style)&&(t.style=a.style),r(a.vspace)&&(t.vspace=a.vspace),r(a.border)&&(t.border=a.border),r(a.hspace)&&(t.hspace=a.hspace),r(a.borderstyle)&&(t.borderstyle=a.borderstyle))})(e,o,i),t.setData(o)}},Ve=(e,t,a,i)=>{We(t,i),$e(t,i),((e,t,a,i)=>{const o=i.getData(),r=o.src.value,s=o.src.meta||{};s.width||s.height||!t.hasDimensions||(N(r)?e.imageSize(r).then((e=>{a.open&&i.setData({dimensions:e})})).catch((e=>console.error(e))):i.setData({dimensions:{width:"",height:""}}))})(e,t,a,i),((e,t,a)=>{const i=a.getData(),o=je(e.imageList,i.src.value);t.prevImage=o,a.setData({images:o.map((e=>e.value)).getOr("")})})(t,a,i)},Ke=(e,t,a,i)=>{const o=i.getData();i.block("Uploading image"),_(o.fileinput).fold((()=>{i.unblock()}),(o=>{const r=URL.createObjectURL(o),s=()=>{i.unblock(),URL.revokeObjectURL(r)},n=o=>{i.setData({src:{value:o,meta:{}}}),i.showTab("general"),Ve(e,t,a,i)};var l;(l=o,new Promise(((e,t)=>{const a=new FileReader;a.onload=()=>{e(a.result)},a.onerror=()=>{var e;t(null===(e=a.error)||void 0===e?void 0:e.message)},a.readAsDataURL(l)}))).then((a=>{const l=e.createBlobCache(o,r,a);t.automaticUploads?e.uploadImage(l).then((e=>{n(e.url),s()})).catch((t=>{s(),e.alertErr(t)})):(e.addToBlobCache(l),n(l.blobUri()),i.unblock())}))}))},Ze=(e,t,a)=>(i,o)=>{"src"===o.name?Ve(e,t,a,i):"images"===o.name?((e,t,a,i)=>{const o=i.getData(),r=je(t.imageList,o.images);r.each((e=>{const t=""===o.alt||a.prevImage.map((e=>e.text===o.alt)).getOr(!1);t?""===e.value?i.setData({src:e,alt:a.prevAlt}):i.setData({src:e,alt:e.text}):i.setData({src:e})})),a.prevImage=r,Ve(e,t,a,i)})(e,t,a,i):"alt"===o.name?a.prevAlt=i.getData().alt:"fileinput"===o.name?Ke(e,t,a,i):"isDecorative"===o.name&&i.setEnabled("alt",!i.getData().isDecorative)},qe=e=>()=>{e.open=!1},Je=e=>{if(e.hasAdvTab||e.hasUploadUrl||e.hasUploadHandler){return{type:"tabpanel",tabs:D([[ze(e)],e.hasAdvTab?[Pe(e)]:[],e.hasUploadTab&&(e.hasUploadUrl||e.hasUploadHandler)?[He(e)]:[]])}}return{type:"panel",items:Be(e)}},Qe=(e,t,a)=>i=>{const o=Ie(Fe(t.image),i.getData()),r={...o,style:ue(a.normalizeCss,Ge(o,!1))};e.execCommand("mceUpdateImage",!1,Ge(r,t.hasAccessibilityOptions)),e.editorUpload.uploadImagesAuto(),i.close()},Xe=e=>t=>K(e,t)?(e=>new Promise((t=>{const a=document.createElement("img"),i=e=>{a.onload=a.onerror=null,a.parentNode&&a.parentNode.removeChild(a),t(e)};a.onload=()=>{const e={width:G(a.width,a.clientWidth),height:G(a.height,a.clientHeight)};i(Promise.resolve(e))},a.onerror=()=>{i(Promise.reject(`Failed to get image dimensions for: ${e}`))};const o=a.style;o.visibility="hidden",o.position="fixed",o.bottom=o.left="0px",o.width=o.height="auto",document.body.appendChild(a),a.src=e})))(e.documentBaseURI.toAbsolute(t)).then((e=>({width:String(e.width),height:String(e.height)}))):Promise.resolve({width:"",height:""}),Ye=e=>(t,a,i)=>{var o;return e.editorUpload.blobCache.create({blob:t,blobUri:a,name:null===(o=t.name)||void 0===o?void 0:o.replace(/\.[^\.]+$/,""),filename:t.name,base64:i.split(",")[1]})},et=e=>t=>{e.editorUpload.blobCache.add(t)},tt=e=>t=>{e.windowManager.alert(t)},at=e=>t=>fe(e,t),it=e=>t=>e.dom.parseStyle(t),ot=e=>(t,a)=>e.dom.serializeStyle(t,a),rt=e=>t=>xe(e).upload([t],!1).then((e=>{var t;return 0===e.length?Promise.reject("Failed to upload image"):!1===e[0].status?Promise.reject(null===(t=e[0].error)||void 0===t?void 0:t.message):e[0]})),st=e=>{const t={imageSize:Xe(e),addToBlobCache:et(e),createBlobCache:Ye(e),alertErr:tt(e),normalizeCss:at(e),parseStyle:it(e),serializeStyle:ot(e),uploadImage:rt(e)};return{open:()=>{Re(e).then((a=>{const i=(e=>({prevImage:je(e.imageList,e.image.src),prevAlt:e.image.alt,open:!0}))(a);return{title:"Insert/Edit Image",size:"normal",body:Je(a),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:Fe(a.image),onSubmit:Qe(e,a,t),onChange:Ze(t,a,i),onClose:qe(i)}})).then(e.windowManager.open)}}},nt=e=>{const t=e.attr("class");return g(t)&&/\bimage\b/.test(t)},lt=e=>t=>{let a=t.length;const i=t=>{t.attr("contenteditable",e?"true":null)};for(;a--;){const o=t[a];nt(o)&&(o.attr("contenteditable",e?"false":null),Se.each(o.getAll("figcaption"),i))}};e.add("image",(e=>{L(e),(e=>{e.on("PreInit",(()=>{e.parser.addNodeFilter("figure",lt(!0)),e.serializer.addNodeFilter("figure",lt(!1))}))})(e),(e=>{e.ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:st(e).open,onSetup:t=>(t.setActive(g(we(e))),e.selection.selectorChangedWithUnbind("img:not([data-mce-object]):not([data-mce-placeholder]),figure.image",t.setActive).unbind)}),e.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:st(e).open}),e.ui.registry.addContextMenu("image",{update:e=>me(e)||"IMG"===e.nodeName&&!V(e)?["image"]:[]})})(e),(e=>{e.addCommand("mceImage",st(e).open),e.addCommand("mceUpdateImage",((t,a)=>{e.undoManager.transact((()=>Ce(e,a)))}))})(e)}))}()})); ;/*!node_modules/tinymce/plugins/image/index.js*/ amis.define("6250ee1",(function(e,i,n,a){e("89a7094")})); ;/*!node_modules/tinymce/plugins/charmap/plugin.js*/ amis.define("6e0f7f8",(function(e,t,r,a){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=(e,t)=>{const r=((e,t)=>e.dispatch("insertCustomChar",{chr:t}))(e,t).chr;e.execCommand("mceInsertContent",!1,r)},r=e=>t=>e===t,a=(n="array",e=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(r=a=e,(n=String).prototype.isPrototypeOf(r)||(null===(i=a.constructor)||void 0===i?void 0:i.name)===n.name)?"string":t;var r,a,n,i})(e)===n);var n;const i=r(null),o=r(void 0),s=(e=>t=>typeof t===e)("function"),l=(c=!1,()=>c);var c;class u{constructor(e,t){this.tag=e,this.value=t}static some(e){return new u(!0,e)}static none(){return u.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?u.some(e(this.value)):u.none()}bind(e){return this.tag?e(this.value):u.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:u.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return(e=>null==e)(e)?u.none():u.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}u.singletonNone=new u(!1);const g=Array.prototype.push,h=(e,t)=>{const r=e.length,a=new Array(r);for(let n=0;n<r;n++){const r=e[n];a[n]=t(r,n)}return a},m=(e,t)=>((e,t,r)=>{for(let a=0,n=e.length;a<n;a++){const n=e[a];if(t(n,a))return u.some(n);if(r(n,a))break}return u.none()})(e,t,l),p=(e,t)=>(e=>{const t=[];for(let r=0,n=e.length;r<n;++r){if(!a(e[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+e);g.apply(t,e[r])}return t})(h(e,t));var d=tinymce.util.Tools.resolve("tinymce.util.Tools");const f=e=>t=>t.options.get(e),y=f("charmap"),w=f("charmap_append"),b=d.isArray,v="User Defined",k=e=>{return b(e)?(t=e,d.grep(t,(e=>b(e)&&2===e.length))):"function"==typeof e?e():[];var t},C=e=>{const t=((e,t)=>{const r=y(e);r&&(t=[{name:v,characters:k(r)}]);const a=w(e);if(a){const e=d.grep(t,(e=>e.name===v));return e.length?(e[0].characters=[...e[0].characters,...k(a)],t):t.concat({name:v,characters:k(a)})}return t})(e,[{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"]]}]);return t.length>1?[{name:"All",characters:p(t,(e=>e.characters))}].concat(t):t},x=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},A=(e,t,r=0,a)=>{const n=e.indexOf(t,r);return-1!==n&&(!!o(a)||n+t.length<=a)},q=String.fromCodePoint,O=(e,t)=>{const r=[],a=t.toLowerCase();return((e,t)=>{for(let r=0,a=e.length;r<a;r++)t(e[r],r)})(e.characters,(e=>{((e,t,r)=>!!A(q(e).toLowerCase(),r)||A(t.toLowerCase(),r)||A(t.toLowerCase().replace(/\s+/g,""),r))(e[0],e[1],a)&&r.push(e)})),h(r,(e=>({text:e[1],value:q(e[0]),icon:q(e[0])})))},T="pattern",E=(e,r)=>{const a=()=>[{label:"Search",type:"input",name:T},{type:"collection",name:"results"}],n=1===r.length?x(v):x("All"),o=((e,t)=>{let r=null;const a=()=>{i(r)||(clearTimeout(r),r=null)};return{cancel:a,throttle:(...n)=>{a(),r=setTimeout((()=>{r=null,e.apply(null,n)}),t)}}})((e=>{const t=e.getData().pattern;((e,t)=>{m(r,(e=>e.name===n.get())).each((r=>{const a=O(r,t);e.setData({results:a})}))})(e,t)}),40),s={title:"Special Character",size:"normal",body:1===r.length?{type:"panel",items:a()}:{type:"tabpanel",tabs:h(r,(e=>({title:e.name,name:e.name,items:a()})))},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{pattern:"",results:O(r[0],"")},onAction:(r,a)=>{"results"===a.name&&(t(e,a.value),r.close())},onTabChange:(e,t)=>{n.set(t.newTabName),o.throttle(e)},onChange:(e,t)=>{t.name===T&&o.throttle(e)}};e.windowManager.open(s).focus(T)};e.add("charmap",(e=>{(e=>{const t=e.options.register,r=e=>s(e)||a(e);t("charmap",{processor:r}),t("charmap_append",{processor:r})})(e);const r=C(e);return((e,t)=>{e.addCommand("mceShowCharmap",(()=>{E(e,t)}))})(e,r),(e=>{const t=()=>e.execCommand("mceShowCharmap");e.ui.registry.addButton("charmap",{icon:"insert-character",tooltip:"Special character",onAction:t}),e.ui.registry.addMenuItem("charmap",{icon:"insert-character",text:"Special character...",onAction:t})})(e),((e,t)=>{e.ui.registry.addAutocompleter("charmap",{trigger:":",columns:"auto",minChars:2,fetch:(e,r)=>new Promise(((r,a)=>{r(O(t,e))})),onAction:(t,r,a)=>{e.selection.setRng(r),e.insertContent(a),t.hide()}})})(e,r[0]),(e=>({getCharMap:()=>C(e),insertChar:r=>{t(e,r)}}))(e)}))}()})); ;/*!node_modules/tinymce/plugins/charmap/index.js*/ amis.define("54d81b8",(function(f,e,i,n){f("6e0f7f8")})); ;/*!node_modules/tinymce/plugins/preview/plugin.js*/ amis.define("cc315a8",(function(e,t,n,o){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env"),n=tinymce.util.Tools.resolve("tinymce.util.Tools");const o=e=>t=>t.options.get(e),i=o("content_style"),s=o("content_css_cors"),c=o("body_class"),r=o("body_id"),a=e=>{const o=(e=>{var o;let a="";const l=e.dom.encode,d=null!==(o=i(e))&&void 0!==o?o:"";a+='<base href="'+l(e.documentBaseURI.getURI())+'">';const m=s(e)?' crossorigin="anonymous"':"";n.each(e.contentCSS,(t=>{a+='<link type="text/css" rel="stylesheet" href="'+l(e.documentBaseURI.toAbsolute(t))+'"'+m+">"})),d&&(a+='<style type="text/css">'+d+"</style>");const y=r(e),u=c(e),v='<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A" && !('+(t.os.isMacOS()||t.os.isiOS()?"e.metaKey":"e.ctrlKey && !e.altKey")+")) {e.preventDefault();}}}, false);<\/script> ",p=e.getBody().dir,w=p?' dir="'+l(p)+'"':"";return"<!DOCTYPE html><html><head>"+a+'</head><body id="'+l(y)+'" class="mce-content-body '+l(u)+'"'+w+">"+e.getContent()+v+"</body></html>"})(e);e.windowManager.open({title:"Preview",size:"large",body:{type:"panel",items:[{name:"preview",type:"iframe",sandboxed:!0,transparent:!1}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{preview:o}}).focus("close")};e.add("preview",(e=>{(e=>{e.addCommand("mcePreview",(()=>{a(e)}))})(e),(e=>{const t=()=>e.execCommand("mcePreview");e.ui.registry.addButton("preview",{icon:"preview",tooltip:"Preview",onAction:t}),e.ui.registry.addMenuItem("preview",{icon:"preview",text:"Preview",onAction:t})})(e)}))}()})); ;/*!node_modules/tinymce/plugins/preview/index.js*/ amis.define("3ab9d0e",(function(a,c,e,i){a("cc315a8")})); ;/*!node_modules/tinymce/plugins/anchor/plugin.js*/ amis.define("6ec12ea",(function(e,t,o,n){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),o=tinymce.util.Tools.resolve("tinymce.util.Tools");const n=(a="allow_html_in_named_anchor",e=>e.options.get(a));var a;const r="a:not([href])",i=e=>!e,l=e=>e.getAttribute("id")||e.getAttribute("name")||"",s=e=>(e=>"a"===e.nodeName.toLowerCase())(e)&&!e.getAttribute("href")&&""!==l(e),c=e=>{const n=e.dom;t(n).walk(e.selection.getRng(),(e=>{o.each(e,(e=>{var t;s(t=e)&&!t.firstChild&&n.remove(e,!1)}))}))},d=e=>e.dom.getParent(e.selection.getStart(),r),m=(e,t)=>{const o=d(e);o?((e,t,o)=>{o.removeAttribute("name"),o.id=t,e.addVisual(),e.undoManager.add()})(e,t,o):((e,t)=>{e.undoManager.transact((()=>{n(e)||e.selection.collapse(!0),e.selection.isCollapsed()?e.insertContent(e.dom.createHTML("a",{id:t})):(c(e),e.formatter.remove("namedAnchor",void 0,void 0,!0),e.formatter.apply("namedAnchor",{value:t}),e.addVisual())}))})(e,t),e.focus()},u=e=>{const t=(e=>{const t=d(e);return t?l(t):""})(e);e.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:t},onSubmit:t=>{((e,t)=>/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)?(m(e,t),!0):(e.windowManager.alert("ID should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),!1))(e,t.getData().id)&&t.close()}})},h=e=>(e=>i(e.attr("href"))&&!i(e.attr("id")||e.attr("name")))(e)&&!e.firstChild,g=e=>t=>{for(let o=0;o<t.length;o++){const n=t[o];h(n)&&n.attr("contenteditable",e)}};e.add("anchor",(e=>{(e=>{(0,e.options.register)("allow_html_in_named_anchor",{processor:"boolean",default:!1})})(e),(e=>{e.on("PreInit",(()=>{e.parser.addNodeFilter("a",g("false")),e.serializer.addNodeFilter("a",g(null))}))})(e),(e=>{e.addCommand("mceAnchor",(()=>{u(e)}))})(e),(e=>{const t=()=>e.execCommand("mceAnchor");e.ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:t,onSetup:t=>e.selection.selectorChangedWithUnbind("a:not([href])",t.setActive).unbind}),e.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:t})})(e),e.on("PreInit",(()=>{(e=>{e.formatter.register("namedAnchor",{inline:"a",selector:r,remove:"all",split:!0,deep:!0,attributes:{id:"%value"},onmatch:(e,t,o)=>s(e)})})(e)}))}))}()})); ;/*!node_modules/tinymce/plugins/anchor/index.js*/ amis.define("6416a32",(function(e,a,i,n){e("6ec12ea")})); ;/*!node_modules/tinymce/plugins/searchreplace/plugin.js*/ amis.define("055d66c",(function(e,t,n,o){!function(){"use strict";const e=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}};var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const n=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=r=e,o=(s=String).prototype,o.isPrototypeOf(n)||(null===(a=r.constructor)||void 0===a?void 0:a.name)===s.name)?"string":t;var n,o;var r,s,a})(t)===e,o=e=>t=>typeof t===e,r=n("string"),s=n("array"),a=o("boolean"),l=o("number"),i=()=>{},c=e=>()=>e,d=c(!0),m=c("[!-#%-*,-\\/:;?@\\[-\\]_{}¡«·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰෴๏๚๛༄-༒༺-༽྅࿐-࿔࿙࿚၊-၏჻፡-፨᐀᙭᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰⸱、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!-#%-*,-/:;?@[-]_{}⦅-・]");class u{constructor(e,t){this.tag=e,this.value=t}static some(e){return new u(!0,e)}static none(){return u.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?u.some(e(this.value)):u.none()}bind(e){return this.tag?e(this.value):u.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:u.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return(e=>null==e)(e)?u.none():u.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}u.singletonNone=new u(!1);const h=m;var g=tinymce.util.Tools.resolve("tinymce.Env"),f=tinymce.util.Tools.resolve("tinymce.util.Tools");const p=Array.prototype.slice,x=Array.prototype.push,y=(e,t)=>{const n=e.length,o=new Array(n);for(let r=0;r<n;r++){const n=e[r];o[r]=t(n,r)}return o},v=(e,t)=>{for(let n=0,o=e.length;n<o;n++){t(e[n],n)}},w=(e,t)=>{for(let n=e.length-1;n>=0;n--){t(e[n],n)}},b=(e,t)=>(e=>{const t=[];for(let n=0,o=e.length;n<o;++n){if(!s(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);x.apply(t,e[n])}return t})(y(e,t)),C=Object.hasOwnProperty,E=(e,t)=>C.call(e,t);"undefined"!=typeof window?window:Function("return this;")();const N=(T=3,e=>(e=>e.dom.nodeType)(e)===T);var T;const O=(e,t,n)=>{((e,t,n)=>{if(!(r(n)||a(n)||l(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")})(e.dom,t,n)},k=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},D={fromHtml:(e,t)=>{const n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||n.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return k(n.childNodes[0])},fromTag:(e,t)=>{const n=(t||document).createElement(e);return k(n)},fromText:(e,t)=>{const n=(t||document).createTextNode(e);return k(n)},fromDom:k,fromPoint:(e,t,n)=>u.from(e.dom.elementFromPoint(t,n)).map(k)},A=(e,t)=>({element:e,offset:t}),S=(e,t)=>{const n=(e=>y(e.dom.childNodes,D.fromDom))(e);return n.length>0&&t<n.length?A(n[t],0):A(e,t)},B=(e,t)=>{const n=(e=>u.from(e.dom.parentNode).map(D.fromDom))(e);n.each((n=>{n.dom.insertBefore(t.dom,e.dom)}))},F=(e,t)=>{B(e,t),((e,t)=>{e.dom.appendChild(t.dom)})(t,e)},M=((e,t)=>{const n=t=>e(t)?u.from(t.dom.nodeValue):u.none();return{get:o=>{if(!e(o))throw new Error("Can only get "+t+" value of a "+t+" node");return n(o).getOr("")},getOption:n,set:(n,o)=>{if(!e(n))throw new Error("Can only set raw "+t+" value of a "+t+" node");n.dom.nodeValue=o}}})(N,"text"),I=e=>M.get(e),R=(e,t)=>((e,t)=>{const n=void 0===t?document:t.dom;return 1!==(o=n).nodeType&&9!==o.nodeType&&11!==o.nodeType||0===o.childElementCount?[]:y(n.querySelectorAll(e),D.fromDom);var o})(t,e);var P=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker");const W=(e,t)=>e.isBlock(t)||E(e.schema.getVoidElements(),t.nodeName),$=(e,t)=>"false"===e.getContentEditable(t),V=(e,t)=>!e.isBlock(t)&&E(e.schema.getWhitespaceElements(),t.nodeName),j=(e,t)=>S(D.fromDom(e),t),H=(e,t,n,o,r,s=!0)=>{let a=s?t(!1):n;for(;a;){const n=$(e,a);if(n||V(e,a)){if(n?o.cef(a):o.boundary(a))break;a=t(!0)}else{if(W(e,a)){if(o.boundary(a))break}else 3===a.nodeType&&o.text(a);if(a===r)break;a=t(!1)}}},_=(e,t,n,o,r)=>{var s;if(((e,t)=>W(e,t)||$(e,t)||V(e,t)||((e,t)=>"true"===e.getContentEditable(t)&&t.parentNode&&"false"===e.getContentEditableParent(t.parentNode))(e,t))(e,n))return;const a=null!==(s=e.getParent(o,e.isBlock))&&void 0!==s?s:e.getRoot(),l=new P(n,a),i=r?l.next.bind(l):l.prev.bind(l);H(e,i,n,{boundary:d,cef:d,text:e=>{r?t.fOffset+=e.length:t.sOffset+=e.length,t.elements.push(D.fromDom(e))}})},z=(e,t,n,o,r,s=!0)=>{const a=new P(n,t),l=[];let i={sOffset:0,fOffset:0,elements:[]};_(e,i,n,t,!1);const c=()=>(i.elements.length>0&&(l.push(i),i={sOffset:0,fOffset:0,elements:[]}),!1);return H(e,a.next.bind(a),n,{boundary:c,cef:e=>(c(),r&&l.push(...r.cef(e)),!1),text:e=>{i.elements.push(D.fromDom(e)),r&&r.text(e,i)}},o,s),o&&_(e,i,o,t,!0),c(),l},L=(e,t)=>{const n=j(t.startContainer,t.startOffset),o=n.element.dom,r=j(t.endContainer,t.endOffset),s=r.element.dom;return z(e,t.commonAncestorContainer,o,s,{text:(e,t)=>{e===s?t.fOffset+=e.length-r.offset:e===o&&(t.sOffset+=n.offset)},cef:t=>((e,t)=>{const n=p.call(e,0);return n.sort(t),n})(b(R(D.fromDom(t),"*[contenteditable=true]"),(t=>{const n=t.dom;return z(e,n,n)})),((e,t)=>((e,t)=>((e,t,n)=>0!=(e.compareDocumentPosition(t)&n))(e,t,Node.DOCUMENT_POSITION_PRECEDING))(e.elements[0].dom,t.elements[0].dom)?1:-1))},!1)},U=(e,t)=>t.collapsed?[]:L(e,t),q=(e,t)=>{const n=e.createRng();return n.selectNode(t),U(e,n)},G=(e,t)=>{const n=(o=e,r=(e,n)=>{const o=I(n),r=e.last,s=r+o.length,a=b(t,((e,t)=>e.start<s&&e.finish>r?[{element:n,start:Math.max(r,e.start)-r,finish:Math.min(s,e.finish)-r,matchId:t}]:[]));return{results:e.results.concat(a),last:s}},s={results:[],last:0},v(o,((e,t)=>{s=r(s,e,t)})),s).results;var o,r,s;return((e,t)=>{if(0===e.length)return[];{let n=t(e[0]);const o=[];let r=[];for(let s=0,a=e.length;s<a;s++){const a=e[s],l=t(a);l!==n&&(o.push(r),r=[]),n=l,r.push(a)}return 0!==r.length&&o.push(r),o}})(n,(e=>e.matchId))},K=(e,t)=>b(t,(t=>{const n=t.elements,o=y(n,I).join(""),r=((e,t,n=0,o=e.length)=>{const r=t.regex;r.lastIndex=n;const s=[];let a;for(;a=r.exec(e);){const e=a[t.matchIndex],n=a.index+a[0].indexOf(e),l=n+e.length;if(l>o)break;s.push({start:n,finish:l}),r.lastIndex=l}return s})(o,e,t.sOffset,o.length-t.fOffset);return G(n,r)})),J=(e,t)=>{w(e,((e,n)=>{w(e,(e=>{const o=D.fromDom(t.cloneNode(!1));O(o,"data-mce-index",n);const r=e.element.dom;if(r.length===e.finish&&0===e.start)F(e.element,o);else{r.length!==e.finish&&r.splitText(e.finish);const t=r.splitText(e.start);F(D.fromDom(t),o)}}))}))},Q=(e,t,n,o)=>{const r=n.getBookmark(),s=e.select("td[data-mce-selected],th[data-mce-selected]"),a=s.length>0?((e,t)=>b(t,(t=>q(e,t))))(e,s):U(e,n.getRng()),l=K(t,a);return J(l,o),n.moveToBookmark(r),l.length},X=e=>e.getAttribute("data-mce-index"),Y=(e,t,n,o)=>{const r=e.dom.create("span",{"data-mce-bogus":1});r.className="mce-match-marker";const s=e.getBody();return ie(e,t,!1),o?Q(e.dom,n,e.selection,r):((e,t,n,o)=>{const r=q(e,n),s=K(t,r);return J(s,o),s.length})(e.dom,n,s,r)},Z=e=>{var t;const n=e.parentNode;e.firstChild&&n.insertBefore(e.firstChild,e),null===(t=e.parentNode)||void 0===t||t.removeChild(e)},ee=(e,t)=>{const n=[],o=f.toArray(e.getBody().getElementsByTagName("span"));if(o.length)for(let e=0;e<o.length;e++){const r=X(o[e]);null!==r&&r.length&&(r===t.toString()&&n.push(o[e]))}return n},te=(e,t,n)=>{const o=t.get();let r=o.index;const s=e.dom;n?r+1===o.count?r=0:r++:r-1==-1?r=o.count-1:r--,s.removeClass(ee(e,o.index),"mce-match-marker-selected");const a=ee(e,r);return a.length?(s.addClass(ee(e,r),"mce-match-marker-selected"),e.selection.scrollIntoView(a[0]),r):-1},ne=(e,t)=>{const n=t.parentNode;e.remove(t),n&&e.isEmpty(n)&&e.remove(n)},oe=(e,t,n,o,r,s)=>{const a=e.selection,l=((e,t)=>{const n="("+e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&").replace(/\s/g,"[^\\S\\r\\n\\uFEFF]")+")";return t?`(?:^|\\s|${h()})`+n+`(?=$|\\s|${h()})`:n})(n,r),i=a.isForward(),c={regex:new RegExp(l,o?"g":"gi"),matchIndex:1},d=Y(e,t,c,s);if(g.browser.isSafari()&&a.setRng(a.getRng(),i),d){const a=te(e,t,!0);t.set({index:a,count:d,text:n,matchCase:o,wholeWord:r,inSelection:s})}return d},re=(e,t)=>{const n=te(e,t,!0);t.set({...t.get(),index:n})},se=(e,t)=>{const n=te(e,t,!1);t.set({...t.get(),index:n})},ae=e=>{const t=X(e);return null!==t&&t.length>0},le=(e,t,n,o,r)=>{const s=t.get(),a=s.index;let l,i=a;o=!1!==o;const c=e.getBody(),d=f.grep(f.toArray(c.getElementsByTagName("span")),ae);for(let t=0;t<d.length;t++){const c=X(d[t]);let m=l=parseInt(c,10);if(r||m===s.index){for(n.length?(d[t].innerText=n,Z(d[t])):ne(e.dom,d[t]);d[++t];){if(m=parseInt(X(d[t]),10),m!==l){t--;break}ne(e.dom,d[t])}o&&i--}else l>a&&d[t].setAttribute("data-mce-index",String(l-1))}return t.set({...s,count:r?0:s.count-1,index:i}),o?re(e,t):se(e,t),!r&&t.get().count>0},ie=(e,t,n)=>{let o,r;const s=t.get(),a=f.toArray(e.getBody().getElementsByTagName("span"));for(let e=0;e<a.length;e++){const t=X(a[e]);null!==t&&t.length&&(t===s.index.toString()&&(o||(o=a[e].firstChild),r=a[e].firstChild),Z(a[e]))}if(t.set({...s,index:-1,count:0,text:""}),o&&r){const t=e.dom.createRng();return t.setStart(o,0),t.setEnd(r,r.data.length),!1!==n&&e.selection.setRng(t),t}},ce=()=>{const t=(t=>{const n=e(u.none()),o=()=>n.get().each(t);return{clear:()=>{o(),n.set(u.none())},isSet:()=>n.get().isSome(),get:()=>n.get(),set:e=>{o(),n.set(u.some(e))}}})(i);return{...t,on:e=>t.get().each(e)}},de=(e,t)=>{const n=ce();e.undoManager.add();const o=f.trim(e.selection.getContent({format:"text"})),r=e=>{e.setEnabled("next",((e,t)=>t.get().count>1)(0,t)),e.setEnabled("prev",((e,t)=>t.get().count>1)(0,t))},s=(e,t)=>{v(["replace","replaceall","prev","next"],(n=>e.setEnabled(n,!t)))},a=(e,t)=>{g.browser.isSafari()&&g.deviceType.isTouch()&&("find"===t||"replace"===t||"replaceall"===t)&&e.focus(t)},l=n=>{ie(e,t,!1),s(n,!0),r(n)},i=n=>{const o=n.getData(),a=t.get();if(o.findtext.length){if(a.text===o.findtext&&a.matchCase===o.matchcase&&a.wholeWord===o.wholewords)re(e,t);else{const r=oe(e,t,o.findtext,o.matchcase,o.wholewords,o.inselection);r<=0&&(e=>{e.redial(u(!0,e.getData()))})(n),s(n,0===r)}r(n)}else l(n)},c=t.get(),d={findtext:o,replacetext:"",wholewords:c.wholeWord,matchcase:c.matchCase,inselection:c.inSelection},m=e=>{const t=[{type:"bar",items:[{type:"input",name:"findtext",placeholder:"Find",maximized:!0,inputMode:"search"},{type:"button",name:"prev",text:"Previous",icon:"action-prev",enabled:!1,borderless:!0},{type:"button",name:"next",text:"Next",icon:"action-next",enabled:!1,borderless:!0}]},{type:"input",name:"replacetext",placeholder:"Replace with",inputMode:"search"}];return e&&t.push({type:"alertbanner",level:"error",text:"Could not find the specified string.",icon:"warning"}),t},u=(n,o)=>({title:"Find and Replace",size:"normal",body:{type:"panel",items:m(n)},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",enabled:!1},{type:"custom",name:"replaceall",text:"Replace all",enabled:!1}],initialData:o,onChange:(e,o)=>{n&&e.redial(u(!1,e.getData())),"findtext"===o.name&&t.get().count>0&&l(e)},onAction:(n,o)=>{const s=n.getData();switch(o.name){case"find":i(n);break;case"replace":le(e,t,s.replacetext)?r(n):l(n);break;case"replaceall":le(e,t,s.replacetext,!0,!0),l(n);break;case"prev":se(e,t),r(n);break;case"next":re(e,t),r(n);break;case"matchcase":case"wholewords":case"inselection":(e=>{const n=e.getData(),o=t.get();t.set({...o,matchCase:n.matchcase,wholeWord:n.wholewords,inSelection:n.inselection})})(n),l(n)}a(n,o.name)},onSubmit:e=>{i(e),a(e,"find")},onClose:()=>{e.focus(),ie(e,t),e.undoManager.add()}});n.set(e.windowManager.open(u(!1,d),{inline:"toolbar"}))},me=(e,t)=>()=>{de(e,t)};t.add("searchreplace",(t=>{const n=e({index:-1,count:0,text:"",matchCase:!1,wholeWord:!1,inSelection:!1});return((e,t)=>{e.addCommand("SearchReplace",(()=>{de(e,t)}))})(t,n),((e,t)=>{e.ui.registry.addMenuItem("searchreplace",{text:"Find and replace...",shortcut:"Meta+F",onAction:me(e,t),icon:"search"}),e.ui.registry.addButton("searchreplace",{tooltip:"Find and replace",onAction:me(e,t),icon:"search"}),e.shortcuts.add("Meta+F","",me(e,t))})(t,n),((e,t)=>({done:n=>ie(e,t,n),find:(n,o,r,s=!1)=>oe(e,t,n,o,r,s),next:()=>re(e,t),prev:()=>se(e,t),replace:(n,o,r)=>le(e,t,n,o,r)}))(t,n)}))}()})); ;/*!node_modules/tinymce/plugins/searchreplace/index.js*/ amis.define("1408562",(function(i,n,c,d){i("055d66c")})); ;/*!node_modules/tinymce/plugins/visualblocks/plugin.js*/ amis.define("f0312bc",(function(t,o,s,e){!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const o=(t,o,s)=>{t.dom.toggleClass(t.getBody(),"mce-visualblocks"),s.set(!s.get()),((t,o)=>{t.dispatch("VisualBlocks",{state:o})})(t,s.get())},s=(e="visualblocks_default_state",t=>t.options.get(e));var e;const l=(t,o)=>s=>{s.setActive(o.get());const e=t=>s.setActive(t.state);return t.on("VisualBlocks",e),()=>t.off("VisualBlocks",e)};t.add("visualblocks",((t,e)=>{(t=>{(0,t.options.register)("visualblocks_default_state",{processor:"boolean",default:!1})})(t);const i=(t=>{let o=t;return{get:()=>o,set:t=>{o=t}}})(!1);((t,s,e)=>{t.addCommand("mceVisualBlocks",(()=>{o(t,0,e)}))})(t,0,i),((t,o)=>{const s=()=>t.execCommand("mceVisualBlocks");t.ui.registry.addToggleButton("visualblocks",{icon:"visualblocks",tooltip:"Show blocks",onAction:s,onSetup:l(t,o)}),t.ui.registry.addToggleMenuItem("visualblocks",{text:"Show blocks",icon:"visualblocks",onAction:s,onSetup:l(t,o)})})(t,i),((t,e,l)=>{t.on("PreviewFormats AfterPreviewFormats",(o=>{l.get()&&t.dom.toggleClass(t.getBody(),"mce-visualblocks","afterpreviewformats"===o.type)})),t.on("init",(()=>{s(t)&&o(t,0,l)}))})(t,0,i)}))}()})); ;/*!node_modules/tinymce/plugins/visualblocks/index.js*/ amis.define("262d7e2",(function(e,f,i,n){e("f0312bc")})); ;/*!node_modules/tinymce/plugins/code/plugin.js*/ amis.define("0651ab4",(function(e,o,t,n){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");e.add("code",(e=>((e=>{e.addCommand("mceCodeEditor",(()=>{(e=>{const o=(e=>e.getContent({source_view:!0}))(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:o},onSubmit:o=>{((e,o)=>{e.focus(),e.undoManager.transact((()=>{e.setContent(o)})),e.selection.setCursorLocation(),e.nodeChanged()})(e,o.getData().code),o.close()}})})(e)}))})(e),(e=>{const o=()=>e.execCommand("mceCodeEditor");e.ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:o}),e.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:o})})(e),{})))}()})); ;/*!node_modules/tinymce/plugins/code/index.js*/ amis.define("db6eae7",(function(e,a,i,n){e("0651ab4")})); ;/*!node_modules/tinymce/plugins/fullscreen/plugin.js*/ amis.define("370d30f",(function(e,t,n,o){!function(){"use strict";const e=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}};var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const n=e=>({isFullscreen:()=>null!==e.get()}),o=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=r=e,o=(s=String).prototype,o.isPrototypeOf(n)||(null===(i=r.constructor)||void 0===i?void 0:i.name)===s.name)?"string":t;var n,o;var r,s,i})(t)===e,r=e=>t=>typeof t===e,s=e=>t=>e===t,i=o("string"),l=o("array"),a=s(null),c=r("boolean"),u=s(void 0),m=e=>!(e=>null==e)(e),d=r("function"),h=r("number"),f=()=>{},g=e=>()=>e;function p(e,...t){return(...n)=>{const o=t.concat(n);return e.apply(null,o)}}const v=g(!1),w=g(!0);class y{constructor(e,t){this.tag=e,this.value=t}static some(e){return new y(!0,e)}static none(){return y.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?y.some(e(this.value)):y.none()}bind(e){return this.tag?e(this.value):y.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:y.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return m(e)?y.some(e):y.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}y.singletonNone=new y(!1);const b=t=>{const n=e(y.none()),o=()=>n.get().each(t);return{clear:()=>{o(),n.set(y.none())},isSet:()=>n.get().isSome(),get:()=>n.get(),set:e=>{o(),n.set(y.some(e))}}},S=()=>b((e=>e.unbind())),x=Array.prototype.push,E=(e,t)=>{const n=e.length,o=new Array(n);for(let r=0;r<n;r++){const n=e[r];o[r]=t(n,r)}return o},F=(e,t)=>{for(let n=0,o=e.length;n<o;n++){t(e[n],n)}},T=(e,t)=>{const n=[];for(let o=0,r=e.length;o<r;o++){const r=e[o];t(r,o)&&n.push(r)}return n},k=(e,t)=>((e,t,n)=>{for(let o=0,r=e.length;o<r;o++){const r=e[o];if(t(r,o))return y.some(r);if(n(r,o))break}return y.none()})(e,t,v),O=(e,t)=>(e=>{const t=[];for(let n=0,o=e.length;n<o;++n){if(!l(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);x.apply(t,e[n])}return t})(E(e,t)),C=e=>((e,t)=>t>=0&&t<e.length?y.some(e[t]):y.none())(e,0),D=Object.keys,A=(e,t,n=0,o)=>{const r=e.indexOf(t,n);return-1!==r&&(!!u(o)||r+t.length<=o)},R=e=>void 0!==e.style&&d(e.style.getPropertyValue),N=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},L={fromHtml:(e,t)=>{const n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||n.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return N(n.childNodes[0])},fromTag:(e,t)=>{const n=(t||document).createElement(e);return N(n)},fromText:(e,t)=>{const n=(t||document).createTextNode(e);return N(n)},fromDom:N,fromPoint:(e,t,n)=>y.from(e.dom.elementFromPoint(t,n)).map(N)};"undefined"!=typeof window?window:Function("return this;")();const M=e=>t=>(e=>e.dom.nodeType)(t)===e,P=M(1),H=M(3),W=M(9),q=M(11),I=(e,t)=>{const n=e.dom;if(1!==n.nodeType)return!1;{const e=n;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},B=e=>L.fromDom(e.dom.ownerDocument),V=e=>(e=>y.from(e.dom.parentNode).map(L.fromDom))(e).map(_).map((t=>T(t,(t=>{return n=t,!(e.dom===n.dom);var n})))).getOr([]),_=e=>E(e.dom.childNodes,L.fromDom),j=d(Element.prototype.attachShadow)&&d(Node.prototype.getRootNode),z=g(j),$=j?e=>L.fromDom(e.dom.getRootNode()):e=>W(e)?e:B(e),U=e=>{const t=$(e);return q(n=t)&&m(n.dom.host)?y.some(t):y.none();var n},K=e=>L.fromDom(e.dom.host),X=e=>m(e.dom.shadowRoot),Y=e=>{const t=H(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const n=t.ownerDocument;return U(L.fromDom(t)).fold((()=>n.body.contains(t)),(o=Y,r=K,e=>o(r(e))));var o,r},G=(e,t,n)=>{((e,t,n)=>{if(!(i(n)||c(n)||h(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")})(e.dom,t,n)},J=(e,t)=>{const n=e.dom.getAttribute(t);return null===n?void 0:n},Q=(e,t)=>{e.dom.removeAttribute(t)},Z=(e,t)=>{const n=e.dom;((e,t)=>{const n=D(e);for(let o=0,r=n.length;o<r;o++){const r=n[o];t(e[r],r)}})(t,((e,t)=>{((e,t,n)=>{if(!i(n))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);R(e)&&e.style.setProperty(t,n)})(n,t,e)}))},ee=(e,t)=>R(e)?e.style.getPropertyValue(t):"",te=e=>{const t=L.fromDom((e=>{if(z()&&m(e.target)){const t=L.fromDom(e.target);if(P(t)&&X(t)&&e.composed&&e.composedPath){const t=e.composedPath();if(t)return C(t)}}return y.from(e.target)})(e).getOr(e.target)),n=()=>e.stopPropagation(),o=()=>e.preventDefault(),r=(s=o,i=n,(...e)=>s(i.apply(null,e)));var s,i;return((e,t,n,o,r,s,i)=>({target:e,x:t,y:n,stop:o,prevent:r,kill:s,raw:i}))(t,e.clientX,e.clientY,n,o,r,e)},ne=(e,t,n,o,r)=>{const s=((e,t)=>n=>{e(n)&&t(te(n))})(n,o);return e.dom.addEventListener(t,s,r),{unbind:p(oe,e,t,s,r)}},oe=(e,t,n,o)=>{e.dom.removeEventListener(t,n,o)},re=w,se=(e,t,n)=>((e,t,n,o)=>ne(e,t,n,o,!1))(e,t,re,n),ie=()=>le(0,0),le=(e,t)=>({major:e,minor:t}),ae={nu:le,detect:(e,t)=>{const n=String(t).toLowerCase();return 0===e.length?ie():((e,t)=>{const n=((e,t)=>{for(let n=0;n<e.length;n++){const o=e[n];if(o.test(t))return o}})(e,t);if(!n)return{major:0,minor:0};const o=e=>Number(t.replace(n,"$"+e));return le(o(1),o(2))})(e,n)},unknown:ie},ce=(e,t)=>((e,t)=>{for(let n=0;n<e.length;n++){const o=t(e[n],n);if(o.isSome())return o}return y.none()})(t.brands,(t=>{const n=t.brand.toLowerCase();return k(e,(e=>{var t;return n===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())})).map((e=>({current:e.name,version:ae.nu(parseInt(t.version,10),0)})))})),ue=(e,t)=>{const n=String(t).toLowerCase();return k(e,(e=>e.search(n)))},me=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,de=e=>t=>A(t,e),he=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>A(e,"edge/")&&A(e,"chrome")&&A(e,"safari")&&A(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,me],search:e=>A(e,"chrome")&&!A(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>A(e,"msie")||A(e,"trident")},{name:"Opera",versionRegexes:[me,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:de("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:de("firefox")},{name:"Safari",versionRegexes:[me,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(A(e,"safari")||A(e,"mobile/"))&&A(e,"applewebkit")}],fe=[{name:"Windows",search:de("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>A(e,"iphone")||A(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:de("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:de("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:de("linux"),versionRegexes:[]},{name:"Solaris",search:de("sunos"),versionRegexes:[]},{name:"FreeBSD",search:de("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:de("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],ge={browsers:g(he),oses:g(fe)},pe="Edge",ve="Chromium",we="Opera",ye="Firefox",be="Safari",Se=e=>{const t=e.current,n=e.version,o=e=>()=>t===e;return{current:t,version:n,isEdge:o(pe),isChromium:o(ve),isIE:o("IE"),isOpera:o(we),isFirefox:o(ye),isSafari:o(be)}},xe={unknown:()=>Se({current:void 0,version:ae.unknown()}),nu:Se,edge:g(pe),chromium:g(ve),ie:g("IE"),opera:g(we),firefox:g(ye),safari:g(be)},Ee="Windows",Fe="Android",Te="Linux",ke="macOS",Oe="Solaris",Ce="FreeBSD",De="ChromeOS",Ae=e=>{const t=e.current,n=e.version,o=e=>()=>t===e;return{current:t,version:n,isWindows:o(Ee),isiOS:o("iOS"),isAndroid:o(Fe),isMacOS:o(ke),isLinux:o(Te),isSolaris:o(Oe),isFreeBSD:o(Ce),isChromeOS:o(De)}},Re={unknown:()=>Ae({current:void 0,version:ae.unknown()}),nu:Ae,windows:g(Ee),ios:g("iOS"),android:g(Fe),linux:g(Te),macos:g(ke),solaris:g(Oe),freebsd:g(Ce),chromeos:g(De)},Ne=(e,t,n)=>{const o=ge.browsers(),r=ge.oses(),s=t.bind((e=>ce(o,e))).orThunk((()=>((e,t)=>ue(e,t).map((e=>{const n=ae.detect(e.versionRegexes,t);return{current:e.name,version:n}})))(o,e))).fold(xe.unknown,xe.nu),i=((e,t)=>ue(e,t).map((e=>{const n=ae.detect(e.versionRegexes,t);return{current:e.name,version:n}})))(r,e).fold(Re.unknown,Re.nu),l=((e,t,n,o)=>{const r=e.isiOS()&&!0===/ipad/i.test(n),s=e.isiOS()&&!r,i=e.isiOS()||e.isAndroid(),l=i||o("(pointer:coarse)"),a=r||!s&&i&&o("(min-device-width:768px)"),c=s||i&&!a,u=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(n),m=!c&&!a&&!u;return{isiPad:g(r),isiPhone:g(s),isTablet:g(a),isPhone:g(c),isTouch:g(l),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:g(u),isDesktop:g(m)}})(i,s,e,n);return{browser:s,os:i,deviceType:l}},Le=e=>window.matchMedia(e).matches;let Me=(e=>{let t,n=!1;return(...o)=>(n||(n=!0,t=e.apply(null,o)),t)})((()=>Ne(navigator.userAgent,y.from(navigator.userAgentData),Le)));const Pe=(e,t)=>({left:e,top:t,translate:(n,o)=>Pe(e+n,t+o)}),He=Pe,We=e=>{const t=void 0===e?window:e;return Me().browser.isFirefox()?y.none():y.from(t.visualViewport)},qe=(e,t,n,o)=>({x:e,y:t,width:n,height:o,right:e+n,bottom:t+o}),Ie=e=>{const t=void 0===e?window:e,n=t.document,o=(e=>{const t=void 0!==e?e.dom:document,n=t.body.scrollLeft||t.documentElement.scrollLeft,o=t.body.scrollTop||t.documentElement.scrollTop;return He(n,o)})(L.fromDom(n));return We(t).fold((()=>{const e=t.document.documentElement,n=e.clientWidth,r=e.clientHeight;return qe(o.left,o.top,n,r)}),(e=>qe(Math.max(e.pageLeft,o.left),Math.max(e.pageTop,o.top),e.width,e.height)))},Be=(e,t,n)=>We(n).map((n=>{const o=e=>t(te(e));return n.addEventListener(e,o),{unbind:()=>n.removeEventListener(e,o)}})).getOrThunk((()=>({unbind:f})));var Ve=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),_e=tinymce.util.Tools.resolve("tinymce.Env");const je=(e,t)=>{e.dispatch("FullscreenStateChanged",{state:t}),e.dispatch("ResizeEditor")},ze=($e="fullscreen_native",e=>e.options.get($e));var $e;const Ue=e=>{const t=L.fromDom(e.getElement());return U(t).map(K).getOrThunk((()=>(e=>{const t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return L.fromDom(t)})(B(t))))},Ke=e=>{return e.dom===(void 0!==(t=B(e).dom).fullscreenElement?t.fullscreenElement:void 0!==t.msFullscreenElement?t.msFullscreenElement:void 0!==t.webkitFullscreenElement?t.webkitFullscreenElement:null);var t},Xe=(e,t,n)=>T(((e,t)=>{const n=d(t)?t:v;let o=e.dom;const r=[];for(;null!==o.parentNode&&void 0!==o.parentNode;){const e=o.parentNode,t=L.fromDom(e);if(r.push(t),!0===n(t))break;o=e}return r})(e,n),t),Ye=e=>((e,t)=>{const n=void 0===t?document:t.dom;return 1!==(o=n).nodeType&&9!==o.nodeType&&11!==o.nodeType||0===o.childElementCount?[]:E(n.querySelectorAll(e),L.fromDom);var o})(e),Ge=(e,t,n)=>Xe(e,(e=>I(e,t)),n),Je=(e,t)=>((e,t)=>T(V(e),t))(e,(e=>I(e,t))),Qe="data-ephox-mobile-fullscreen-style",Ze="position:absolute!important;",et="top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;",tt=_e.os.isAndroid(),nt=e=>{const t=((e,t)=>{const n=e.dom,o=window.getComputedStyle(n).getPropertyValue(t);return""!==o||Y(e)?o:ee(n,t)})(e,"background-color");return void 0!==t&&""!==t?"background-color:"+t+"!important":"background-color:rgb(255,255,255)!important;"},ot=Ve.DOM,rt=We().fold((()=>({bind:f,unbind:f})),(e=>{const t=(()=>{const e=b(f);return{...e,on:t=>e.get().each(t)}})(),n=S(),o=S(),r=((e,t)=>{let n=null;return{cancel:()=>{a(n)||(clearTimeout(n),n=null)},throttle:(...o)=>{a(n)&&(n=setTimeout((()=>{n=null,e.apply(null,o)}),t))}}})((()=>{document.body.scrollTop=0,document.documentElement.scrollTop=0,window.requestAnimationFrame((()=>{t.on((t=>Z(t,{top:e.offsetTop+"px",left:e.offsetLeft+"px",height:e.height+"px",width:e.width+"px"})))}))}),50);return{bind:e=>{t.set(e),r.throttle(),n.set(Be("resize",r.throttle)),o.set(Be("scroll",r.throttle))},unbind:()=>{t.on((()=>{n.clear(),o.clear()})),t.clear()}}})),st=(e,t)=>{const n=document.body,o=document.documentElement,r=e.getContainer(),s=L.fromDom(r),i=Ue(e),l=t.get(),a=L.fromDom(e.getBody()),c=_e.deviceType.isTouch(),u=r.style,m=e.iframeElement,d=null==m?void 0:m.style,h=e=>{e(n,"tox-fullscreen"),e(o,"tox-fullscreen"),e(r,"tox-fullscreen"),U(s).map((e=>K(e).dom)).each((t=>{e(t,"tox-fullscreen"),e(t,"tox-shadowhost")}))},f=()=>{c&&(e=>{const t=Ye("["+Qe+"]");F(t,(t=>{const n=J(t,Qe);n&&"no-styles"!==n?Z(t,e.parseStyle(n)):Q(t,"style"),Q(t,Qe)}))})(e.dom),h(ot.removeClass),rt.unbind(),y.from(t.get()).each((e=>e.fullscreenChangeHandler.unbind()))};if(l)l.fullscreenChangeHandler.unbind(),ze(e)&&Ke(i)&&(e=>{const t=e.dom;t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitCancelFullScreen&&t.webkitCancelFullScreen()})(B(i)),d.width=l.iframeWidth,d.height=l.iframeHeight,u.width=l.containerWidth,u.height=l.containerHeight,u.top=l.containerTop,u.left=l.containerLeft,f(),g=l.scrollPos,window.scrollTo(g.x,g.y),t.set(null),je(e,!1),e.off("remove",f);else{const n=se(B(i),void 0!==document.fullscreenElement?"fullscreenchange":void 0!==document.msFullscreenElement?"MSFullscreenChange":void 0!==document.webkitFullscreenElement?"webkitfullscreenchange":"fullscreenchange",(n=>{ze(e)&&(Ke(i)||null===t.get()||st(e,t))})),o={scrollPos:Ie(window),containerWidth:u.width,containerHeight:u.height,containerTop:u.top,containerLeft:u.left,iframeWidth:d.width,iframeHeight:d.height,fullscreenChangeHandler:n};c&&((e,t,n)=>{const o=t=>n=>{const o=J(n,"style"),r=void 0===o?"no-styles":o.trim();r!==t&&(G(n,Qe,r),Z(n,e.parseStyle(t)))},r=Ge(t,"*"),s=O(r,(e=>Je(e,"*:not(.tox-silver-sink)"))),i=nt(n);F(s,o("display:none!important;")),F(r,o(Ze+et+i)),o((!0===tt?"":Ze)+et+i)(t)})(e.dom,s,a),d.width=d.height="100%",u.width=u.height="",h(ot.addClass),rt.bind(s),e.on("remove",f),t.set(o),ze(e)&&(e=>{const t=e.dom;t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()})(i),je(e,!0)}var g},it=(e,t)=>n=>{n.setActive(null!==t.get());const o=e=>n.setActive(e.state);return e.on("FullscreenStateChanged",o),()=>e.off("FullscreenStateChanged",o)};t.add("fullscreen",(t=>{const o=e(null);return t.inline||((e=>{(0,e.options.register)("fullscreen_native",{processor:"boolean",default:!1})})(t),((e,t)=>{e.addCommand("mceFullScreen",(()=>{st(e,t)}))})(t,o),((e,t)=>{const n=()=>e.execCommand("mceFullScreen");e.ui.registry.addToggleMenuItem("fullscreen",{text:"Fullscreen",icon:"fullscreen",shortcut:"Meta+Shift+F",onAction:n,onSetup:it(e,t)}),e.ui.registry.addToggleButton("fullscreen",{tooltip:"Fullscreen",icon:"fullscreen",onAction:n,onSetup:it(e,t)})})(t,o),t.addShortcut("Meta+Shift+F","","mceFullScreen")),n(o)}))}()})); ;/*!node_modules/tinymce/plugins/fullscreen/index.js*/ amis.define("4a51612",(function(f,i,n,a){f("370d30f")})); ;/*!node_modules/tinymce/plugins/insertdatetime/plugin.js*/ amis.define("101356e",(function(e,t,a,r){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>t.options.get(e),a=t("insertdatetime_dateformat"),r=t("insertdatetime_timeformat"),n=t("insertdatetime_formats"),s=t("insertdatetime_element"),i="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),o="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),l="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),m="January February March April May June July August September October November December".split(" "),c=(e,t)=>{if((e=""+e).length<t)for(let a=0;a<t-e.length;a++)e="0"+e;return e},d=(e,t,a=new Date)=>t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+a.getFullYear())).replace("%y",""+a.getYear())).replace("%m",c(a.getMonth()+1,2))).replace("%d",c(a.getDate(),2))).replace("%H",""+c(a.getHours(),2))).replace("%M",""+c(a.getMinutes(),2))).replace("%S",""+c(a.getSeconds(),2))).replace("%I",""+((a.getHours()+11)%12+1))).replace("%p",a.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(m[a.getMonth()]))).replace("%b",""+e.translate(l[a.getMonth()]))).replace("%A",""+e.translate(o[a.getDay()]))).replace("%a",""+e.translate(i[a.getDay()]))).replace("%%","%"),u=(e,t)=>{if(s(e)){const a=d(e,t);let r;r=/%[HMSIp]/.test(t)?d(e,"%Y-%m-%dT%H:%M"):d(e,"%Y-%m-%d");const n=e.dom.getParent(e.selection.getStart(),"time");n?((e,t,a,r)=>{const n=e.dom.create("time",{datetime:a},r);e.dom.replace(n,t),e.selection.select(n,!0),e.selection.collapse(!1)})(e,n,r,a):e.insertContent('<time datetime="'+r+'">'+a+"</time>")}else e.insertContent(d(e,t))};var p=tinymce.util.Tools.resolve("tinymce.util.Tools");const g=e=>{const t=n(e),a=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})((e=>{const t=n(e);return t.length>0?t[0]:r(e)})(e)),s=t=>e.execCommand("mceInsertDate",!1,t);e.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:e=>e===a.get(),fetch:a=>{a(p.map(t,(t=>({type:"choiceitem",text:d(e,t),value:t}))))},onAction:e=>{s(a.get())},onItemAction:(e,t)=>{a.set(t),s(t)}});const i=e=>()=>{a.set(e),s(e)};e.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:()=>p.map(t,(t=>({type:"menuitem",text:d(e,t),onAction:i(t)})))})};e.add("insertdatetime",(e=>{(e=>{const t=e.options.register;t("insertdatetime_dateformat",{processor:"string",default:e.translate("%Y-%m-%d")}),t("insertdatetime_timeformat",{processor:"string",default:e.translate("%H:%M:%S")}),t("insertdatetime_formats",{processor:"string[]",default:["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"]}),t("insertdatetime_element",{processor:"boolean",default:!1})})(e),(e=>{e.addCommand("mceInsertDate",((t,r)=>{u(e,null!=r?r:a(e))})),e.addCommand("mceInsertTime",((t,a)=>{u(e,null!=a?a:r(e))}))})(e),g(e)}))}()})); ;/*!node_modules/tinymce/plugins/insertdatetime/index.js*/ amis.define("5a63d98",(function(e,i,n,a){e("101356e")})); ;/*!node_modules/tinymce/plugins/media/plugin.js*/ amis.define("2fd457f",(function(e,t,r,a){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(r=o=e,a=(s=String).prototype,a.isPrototypeOf(r)||(null===(i=o.constructor)||void 0===i?void 0:i.name)===s.name)?"string":t;var r,a;var o,s,i})(t)===e,r=t("string"),a=t("object"),o=t("array"),s=e=>!(e=>null==e)(e);class i{constructor(e,t){this.tag=e,this.value=t}static some(e){return new i(!0,e)}static none(){return i.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?i.some(e(this.value)):i.none()}bind(e){return this.tag?e(this.value):i.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:i.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return s(e)?i.some(e):i.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}i.singletonNone=new i(!1);const n=Array.prototype.push,c=(e,t)=>{for(let r=0,a=e.length;r<a;r++){t(e[r],r)}},l=e=>{const t=[];for(let r=0,a=e.length;r<a;++r){if(!o(e[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+e);n.apply(t,e[r])}return t},m=Object.keys,u=Object.hasOwnProperty,d=(e,t)=>h(e,t)?i.from(e[t]):i.none(),h=(e,t)=>u.call(e,t),p=e=>t=>t.options.get(e),g=p("audio_template_callback"),b=p("video_template_callback"),w=p("iframe_template_callback"),v=p("media_live_embeds"),f=p("media_filter_html"),y=p("media_url_resolver"),x=p("media_alt_source"),_=p("media_poster"),j=p("media_dimensions");var k=tinymce.util.Tools.resolve("tinymce.util.Tools"),O=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),A=tinymce.util.Tools.resolve("tinymce.html.DomParser");const S=O.DOM,C=e=>e.replace(/px$/,""),D=e=>{const t=e.attr("style"),r=t?S.parseStyle(t):{};return{type:"ephox-embed-iri",source:e.attr("data-ephox-embed-iri"),altsource:"",poster:"",width:d(r,"max-width").map(C).getOr(""),height:d(r,"max-height").map(C).getOr("")}},T=(e,t)=>{let r={};for(let a=A({validate:!1,forced_root_block:!1},t).parse(e);a;a=a.walk())if(1===a.type){const e=a.name;if(a.attr("data-ephox-embed-iri")){r=D(a);break}r.source||"param"!==e||(r.source=a.attr("movie")),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(r.type||(r.type=e),r=k.extend(a.attributes.map,r)),"script"===e&&(r={type:"script",source:a.attr("src")}),"source"===e&&(r.source?r.altsource||(r.altsource=a.attr("src")):r.source=a.attr("src")),"img"!==e||r.poster||(r.poster=a.attr("src"))}return r.source=r.source||r.src||"",r.altsource=r.altsource||"",r.poster=r.poster||"",r},z=e=>{var t;const r=null!==(t=e.toLowerCase().split(".").pop())&&void 0!==t?t:"";return d({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).getOr("")};var $=tinymce.util.Tools.resolve("tinymce.html.Node"),M=tinymce.util.Tools.resolve("tinymce.html.Serializer");const F=(e,t={})=>A({forced_root_block:!1,validate:!1,allow_conditional_comments:!0,...t},e),N=O.DOM,R=e=>/^[0-9.]+$/.test(e)?e+"px":e,U=(e,t)=>{const r=t.attr("style"),a=r?N.parseStyle(r):{};s(e.width)&&(a["max-width"]=R(e.width)),s(e.height)&&(a["max-height"]=R(e.height)),t.attr("style",N.serializeStyle(a))},P=["source","altsource"],E=(e,t,r,a)=>{let o=0,s=0;const i=F(a);i.addNodeFilter("source",(e=>o=e.length));const n=i.parse(e);for(let e=n;e;e=e.walk())if(1===e.type){const a=e.name;if(e.attr("data-ephox-embed-iri")){U(t,e);break}switch(a){case"video":case"object":case"embed":case"img":case"iframe":void 0!==t.height&&void 0!==t.width&&(e.attr("width",t.width),e.attr("height",t.height))}if(r)switch(a){case"video":e.attr("poster",t.poster),e.attr("src",null);for(let r=o;r<2;r++)if(t[P[r]]){const a=new $("source",1);a.attr("src",t[P[r]]),a.attr("type",t[P[r]+"mime"]||null),e.append(a)}break;case"iframe":e.attr("src",t.source);break;case"object":const r=e.getAll("img").length>0;if(t.poster&&!r){e.attr("src",t.poster);const r=new $("img",1);r.attr("src",t.poster),r.attr("width",t.width),r.attr("height",t.height),e.append(r)}break;case"source":if(s<2&&(e.attr("src",t[P[s]]),e.attr("type",t[P[s]+"mime"]||null),!t[P[s]])){e.remove();continue}s++;break;case"img":t.poster||e.remove()}}return M({},a).serialize(n)},L=[{regex:/youtu\.be\/([\w\-_\?&=.]+)/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$2?$4",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowFullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$2?title=0&byline=0",allowFullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"www.dailymotion.com/embed/video/$1",allowFullscreen:!0},{regex:/dai\.ly\/([^_]+)/,type:"iframe",w:480,h:270,url:"www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],I=(e,t)=>{const r=(e=>{const t=e.match(/^(https?:\/\/|www\.)(.+)$/i);return t&&t.length>1?"www."===t[1]?"https://":t[1]:"https://"})(t),a=e.regex.exec(t);let o=r+e.url;if(s(a))for(let e=0;e<a.length;e++)o=o.replace("$"+e,(()=>a[e]?a[e]:""));return o.replace(/\?$/,"")},B=(e,t)=>{var r;const a=k.extend({},t);if(!a.source&&(k.extend(a,T(null!==(r=a.embed)&&void 0!==r?r:"",e.schema)),!a.source))return"";a.altsource||(a.altsource=""),a.poster||(a.poster=""),a.source=e.convertURL(a.source,"source"),a.altsource=e.convertURL(a.altsource,"source"),a.sourcemime=z(a.source),a.altsourcemime=z(a.altsource),a.poster=e.convertURL(a.poster,"poster");const o=(e=>{const t=L.filter((t=>t.regex.test(e)));return t.length>0?k.extend({},t[0],{url:I(t[0],e)}):null})(a.source);if(o&&(a.source=o.url,a.type=o.type,a.allowfullscreen=o.allowFullscreen,a.width=a.width||String(o.w),a.height=a.height||String(o.h)),a.embed)return E(a.embed,a,!0,e.schema);{const t=g(e),r=b(e),o=w(e);return a.width=a.width||"300",a.height=a.height||"150",k.each(a,((t,r)=>{a[r]=e.dom.encode(""+t)})),"iframe"===a.type?((e,t)=>{if(t)return t(e);{const t=e.allowfullscreen?' allowFullscreen="1"':"";return'<iframe src="'+e.source+'" width="'+e.width+'" height="'+e.height+'"'+t+"></iframe>"}})(a,o):"application/x-shockwave-flash"===a.sourcemime?(e=>{let 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>",t})(a):-1!==a.sourcemime.indexOf("audio")?((e,t)=>t?t(e):'<audio controls="controls" src="'+e.source+'">'+(e.altsource?'\n<source src="'+e.altsource+'"'+(e.altsourcemime?' type="'+e.altsourcemime+'"':"")+" />\n":"")+"</audio>")(a,t):"script"===a.type?(e=>'<script src="'+e.source+'"><\/script>')(a):((e,t)=>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>")(a,r)}},G=e=>e.hasAttribute("data-mce-object")||e.hasAttribute("data-ephox-embed-iri"),W={},q=e=>t=>B(e,t),H=(e,t)=>{const r=y(e);return r?((e,t,r)=>new Promise(((a,o)=>{const s=r=>(r.html&&(W[e.source]=r),a({url:e.source,html:r.html?r.html:t(e)}));W[e.source]?s(W[e.source]):r({url:e.source},s,o)})))(t,q(e),r):((e,t)=>Promise.resolve({html:t(e),url:e.source}))(t,q(e))},J=(e,t)=>{const r={};return d(e,"dimensions").each((e=>{c(["width","height"],(a=>{d(t,a).orThunk((()=>d(e,a))).each((e=>r[a]=e))}))})),r},K=(e,t)=>{const r=t&&"dimensions"!==t?((e,t)=>d(t,e).bind((e=>d(e,"meta"))))(t,e).getOr({}):{},o=((e,t,r)=>o=>{const s=()=>d(e,o),n=()=>d(t,o),c=e=>d(e,"value").bind((e=>e.length>0?i.some(e):i.none()));return{[o]:(o===r?s().bind((e=>a(e)?c(e).orThunk(n):n().orThunk((()=>i.from(e))))):n().orThunk((()=>s().bind((e=>a(e)?c(e):i.from(e)))))).getOr("")}})(e,r,t);return{...o("source"),...o("altsource"),...o("poster"),...o("embed"),...J(e,r)}},Q=e=>{const t={...e,source:{value:d(e,"source").getOr("")},altsource:{value:d(e,"altsource").getOr("")},poster:{value:d(e,"poster").getOr("")}};return c(["width","height"],(r=>{d(e,r).each((e=>{const a=t.dimensions||{};a[r]=e,t.dimensions=a}))})),t},V=e=>t=>{const r=t&&t.msg?"Media embed handler error: "+t.msg:"Media embed handler threw unknown error.";e.notificationManager.open({type:"error",text:r})},X=(e,t)=>a=>{if(r(a.url)&&a.url.trim().length>0){const r=a.html,o={...T(r,t.schema),source:a.url,embed:r};e.setData(Q(o))}},Y=(e,t)=>{const r=e.dom.select("*[data-mce-object]");e.insertContent(t),((e,t)=>{const r=e.dom.select("*[data-mce-object]");for(let e=0;e<t.length;e++)for(let a=r.length-1;a>=0;a--)t[e]===r[a]&&r.splice(a,1);e.selection.select(r[0])})(e,r),e.nodeChanged()},Z=(e,t,r)=>{var a,o;t.embed=E(null!==(a=t.embed)&&void 0!==a?a:"",t,!1,r.schema),t.embed&&(e.source===t.source||(o=t.source,h(W,o)))?Y(r,t.embed):H(r,t).then((e=>{Y(r,e.html)})).catch(V(r))},ee=e=>{const t=(e=>{const t=e.selection.getNode(),r=G(t)?e.serializer.serialize(t,{selection:!0}):"";return{embed:r,...T(r,e.schema)}})(e),r=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})(t),a=Q(t),o=j(e)?[{type:"sizeinput",name:"dimensions",label:"Constrain proportions",constrain:!0}]:[],s={title:"General",name:"general",items:l([[{name:"source",type:"urlinput",filetype:"media",label:"Source"}],o])},i={title:"Embed",items:[{type:"textarea",name:"embed",label:"Paste your embed code below:"}]},n=[];x(e)&&n.push({name:"altsource",type:"urlinput",filetype:"media",label:"Alternative source URL"}),_(e)&&n.push({name:"poster",type:"urlinput",filetype:"image",label:"Media poster (Image URL)"});const c={title:"Advanced",name:"advanced",items:n},m=[s,i];n.length>0&&m.push(c);const u={type:"tabpanel",tabs:m},d=e.windowManager.open({title:"Insert/Edit Media",size:"normal",body:u,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:t=>{const a=K(t.getData());Z(r.get(),a,e),t.close()},onChange:(t,a)=>{switch(a.name){case"source":((t,r)=>{const a=K(r.getData(),"source");t.source!==a.source&&(X(d,e)({url:a.source,html:""}),H(e,a).then(X(d,e)).catch(V(e)))})(r.get(),t);break;case"embed":(t=>{var r;const a=K(t.getData()),o=T(null!==(r=a.embed)&&void 0!==r?r:"",e.schema);t.setData(Q(o))})(t);break;case"dimensions":case"altsource":case"poster":((t,r)=>{const a=K(t.getData(),r),o=B(e,a);t.setData(Q({...a,embed:o}))})(t,a.name)}r.set(K(t.getData()))},initialData:a})};var te=tinymce.util.Tools.resolve("tinymce.Env");const re=e=>{const t=e.name;return"iframe"===t||"video"===t||"audio"===t},ae=(e,t,r,a=null)=>{const o=e.attr(r);return s(o)?o:h(t,r)?null:a},oe=(e,t,r)=>{const a="img"===t.name||"video"===e.name,o=a?"300":null,s="audio"===e.name?"30":"150",i=a?s:null;t.attr({width:ae(e,r,"width",o),height:ae(e,r,"height",i)})},se=(e,t)=>{const r=t.name,a=new $("img",1);return ne(e,t,a),oe(t,a,{}),a.attr({style:t.attr("style"),src:te.transparentSrc,"data-mce-object":r,class:"mce-object mce-object-"+r}),a},ie=(e,t)=>{var r;const a=t.name,o=new $("span",1);o.attr({contentEditable:"false",style:t.attr("style"),"data-mce-object":a,class:"mce-preview-object mce-object-"+a}),ne(e,t,o);const i=e.dom.parseStyle(null!==(r=t.attr("style"))&&void 0!==r?r:""),n=new $(a,1);if(oe(t,n,i),n.attr({src:t.attr("src"),style:t.attr("style"),class:t.attr("class")}),"iframe"===a)n.attr({allowfullscreen:t.attr("allowfullscreen"),frameborder:"0"});else{c(["controls","crossorigin","currentTime","loop","muted","poster","preload"],(e=>{n.attr(e,t.attr(e))}));const r=o.attr("data-mce-html");s(r)&&((e,t,r,a)=>{const o=F(e.schema).parse(a,{context:t});for(;o.firstChild;)r.append(o.firstChild)})(e,a,n,unescape(r))}const l=new $("span",1);return l.attr("class","mce-shim"),o.append(n),o.append(l),o},ne=(e,t,r)=>{var a;const o=null!==(a=t.attributes)&&void 0!==a?a:[];let s=o.length;for(;s--;){const t=o[s].name;let a=o[s].value;"width"===t||"height"===t||"style"===t||((e,t,r)=>""===t||e.length>=t.length&&e.substr(r,r+t.length)===t)(t,"data-mce-",0)||("data"!==t&&"src"!==t||(a=e.convertURL(a,t)),r.attr("data-mce-p-"+t,a))}const i=M({inner:!0},e.schema),n=new $("div",1);c(t.children(),(e=>n.append(e)));const l=i.serialize(n);l&&(r.attr("data-mce-html",escape(l)),r.empty())},ce=e=>{const t=e.attr("class");return r(t)&&/\btiny-pageembed\b/.test(t)},le=e=>{let t=e;for(;t=t.parent;)if(t.attr("data-ephox-embed-iri")||ce(t))return!0;return!1},me=(e,t,r)=>{const a=(0,e.options.get)("xss_sanitization"),o=f(e);return F(e.schema,{sanitize:a,validate:o}).parse(r,{context:t})},ue=e=>{e.on("PreInit",(()=>{const{schema:t,serializer:r,parser:a}=e,o=t.getBoolAttrs();c("webkitallowfullscreen mozallowfullscreen".split(" "),(e=>{o[e]={}})),((e,t)=>{const r=m(e);for(let a=0,o=r.length;a<o;a++){const o=r[a];t(e[o],o)}})({embed:["wmode"]},((e,r)=>{const a=t.getElementRule(r);a&&c(e,(e=>{a.attributes[e]={},a.attributesOrder.push(e)}))})),a.addNodeFilter("iframe,video,audio,object,embed,script",(e=>t=>{let r,a=t.length;for(;a--;)r=t[a],r.parent&&(r.parent.attr("data-mce-object")||(re(r)&&v(e)?le(r)||r.replace(ie(e,r)):le(r)||r.replace(se(e,r))))})(e)),r.addAttributeFilter("data-mce-object",((t,r)=>{var a;let o=t.length;for(;o--;){const s=t[o];if(!s.parent)continue;const i=s.attr(r),n=new $(i,1);if("audio"!==i&&"script"!==i){const e=s.attr("class");e&&-1!==e.indexOf("mce-preview-object")&&s.firstChild?n.attr({width:s.firstChild.attr("width"),height:s.firstChild.attr("height")}):n.attr({width:s.attr("width"),height:s.attr("height")})}n.attr({style:s.attr("style")});const l=null!==(a=s.attributes)&&void 0!==a?a:[];let m=l.length;for(;m--;){const e=l[m].name;0===e.indexOf("data-mce-p-")&&n.attr(e.substr(11),l[m].value)}"script"===i&&n.attr("type","text/javascript");const u=s.attr("data-mce-html");if(u){const t=me(e,i,unescape(u));c(t.children(),(e=>n.append(e)))}s.replace(n)}}))})),e.on("SetContent",(()=>{const t=e.dom;c(t.select("span.mce-preview-object"),(e=>{0===t.select("span.mce-shim",e).length&&t.add(e,"span",{class:"mce-shim"})}))}))};e.add("media",(e=>((e=>{const t=e.options.register;t("audio_template_callback",{processor:"function"}),t("video_template_callback",{processor:"function"}),t("iframe_template_callback",{processor:"function"}),t("media_live_embeds",{processor:"boolean",default:!0}),t("media_filter_html",{processor:"boolean",default:!0}),t("media_url_resolver",{processor:"function"}),t("media_alt_source",{processor:"boolean",default:!0}),t("media_poster",{processor:"boolean",default:!0}),t("media_dimensions",{processor:"boolean",default:!0})})(e),(e=>{e.addCommand("mceMedia",(()=>{ee(e)}))})(e),(e=>{const t=()=>e.execCommand("mceMedia");e.ui.registry.addToggleButton("media",{tooltip:"Insert/edit media",icon:"embed",onAction:t,onSetup:t=>{const r=e.selection;return t.setActive(G(r.getNode())),r.selectorChangedWithUnbind("img[data-mce-object],span[data-mce-object],div[data-ephox-embed-iri]",t.setActive).unbind}}),e.ui.registry.addMenuItem("media",{icon:"embed",text:"Media...",onAction:t})})(e),(e=>{e.on("ResolveName",(e=>{let t;1===e.target.nodeType&&(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)}))})(e),ue(e),(e=>{e.on("click keyup touchend",(()=>{const 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",(e=>{"script"===e.target.getAttribute("data-mce-object")&&e.preventDefault()})),e.on("ObjectResized",(t=>{const r=t.target;if(r.getAttribute("data-mce-object")){let a=r.getAttribute("data-mce-html");a&&(a=unescape(a),r.setAttribute("data-mce-html",escape(E(a,{width:String(t.width),height:String(t.height)},!1,e.schema))))}}))})(e),(e=>({showDialog:()=>{ee(e)}}))(e))))}()})); ;/*!node_modules/tinymce/plugins/media/index.js*/ amis.define("e40a158",(function(f,e,i,n){f("2fd457f")})); ;/*!node_modules/tinymce/plugins/table/plugin.js*/ amis.define("8a702d6",(function(e,t,o,l){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,l=(r=String).prototype,l.isPrototypeOf(o)||(null===(a=n.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var o,l;var n,r,a})(t)===e,o=e=>t=>typeof t===e,l=t("string"),n=t("array"),r=o("boolean"),a=(s=void 0,e=>s===e);var s;const c=e=>!(e=>null==e)(e),i=o("function"),m=o("number"),d=()=>{},u=e=>()=>e,p=e=>e,b=(e,t)=>e===t;function g(e,...t){return(...o)=>{const l=t.concat(o);return e.apply(null,l)}}const h=e=>{e()},f=u(!1),y=u(!0);class w{constructor(e,t){this.tag=e,this.value=t}static some(e){return new w(!0,e)}static none(){return w.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?w.some(e(this.value)):w.none()}bind(e){return this.tag?e(this.value):w.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:w.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return c(e)?w.some(e):w.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}w.singletonNone=new w(!1);const S=Object.keys,C=Object.hasOwnProperty,v=(e,t)=>{const o=S(e);for(let l=0,n=o.length;l<n;l++){const n=o[l];t(e[n],n)}},T=(e,t)=>{const o={};var l;return((e,t,o,l)=>{v(e,((e,n)=>{(t(e,n)?o:l)(e,n)}))})(e,t,(l=o,(e,t)=>{l[t]=e}),d),o},x=e=>((e,t)=>{const o=[];return v(e,((e,l)=>{o.push(t(e,l))})),o})(e,p),A=e=>S(e).length,R=(e,t)=>O(e,t)?w.from(e[t]):w.none(),O=(e,t)=>C.call(e,t),_=(e,t)=>O(e,t)&&void 0!==e[t]&&null!==e[t],D=Array.prototype.indexOf,I=Array.prototype.push,M=(e,t)=>((e,t)=>D.call(e,t))(e,t)>-1,N=(e,t)=>{for(let o=0,l=e.length;o<l;o++){if(t(e[o],o))return!0}return!1},P=(e,t)=>{const o=[];for(let l=0;l<e;l++)o.push(t(l));return o},k=(e,t)=>{const o=e.length,l=new Array(o);for(let n=0;n<o;n++){const o=e[n];l[n]=t(o,n)}return l},B=(e,t)=>{for(let o=0,l=e.length;o<l;o++){t(e[o],o)}},E=(e,t)=>{const o=[];for(let l=0,n=e.length;l<n;l++){const n=e[l];t(n,l)&&o.push(n)}return o},F=(e,t,o)=>(B(e,((e,l)=>{o=t(o,e,l)})),o),q=(e,t)=>((e,t,o)=>{for(let l=0,n=e.length;l<n;l++){const n=e[l];if(t(n,l))return w.some(n);if(o(n,l))break}return w.none()})(e,t,f),L=(e,t)=>(e=>{const t=[];for(let o=0,l=e.length;o<l;++o){if(!n(e[o]))throw new Error("Arr.flatten item "+o+" was not an array, input: "+e);I.apply(t,e[o])}return t})(k(e,t)),H=(e,t)=>{for(let o=0,l=e.length;o<l;++o){if(!0!==t(e[o],o))return!1}return!0},j=(e,t)=>t>=0&&t<e.length?w.some(e[t]):w.none(),V=(e,t)=>{for(let o=0;o<e.length;o++){const l=t(e[o],o);if(l.isSome())return l}return w.none()},$=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},z={fromHtml:(e,t)=>{const o=(t||document).createElement("div");if(o.innerHTML=e,!o.hasChildNodes()||o.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return $(o.childNodes[0])},fromTag:(e,t)=>{const o=(t||document).createElement(e);return $(o)},fromText:(e,t)=>{const o=(t||document).createTextNode(e);return $(o)},fromDom:$,fromPoint:(e,t,o)=>w.from(e.dom.elementFromPoint(t,o)).map($)},W=(e,t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},U=e=>1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount,G=(e,t)=>e.dom===t.dom,K=W;"undefined"!=typeof window?window:Function("return this;")();const J=e=>e.dom.nodeName.toLowerCase(),Q=e=>e.dom.nodeType,X=e=>t=>Q(t)===e,Y=e=>8===Q(e)||"#comment"===J(e),Z=X(1),ee=X(3),te=X(9),oe=X(11),le=e=>t=>Z(t)&&J(t)===e,ne=e=>{return te(e)?e:(t=e,z.fromDom(t.dom.ownerDocument));var t},re=e=>w.from(e.dom.parentNode).map(z.fromDom),ae=(e,t)=>{const o=i(t)?t:f;let l=e.dom;const n=[];for(;null!==l.parentNode&&void 0!==l.parentNode;){const e=l.parentNode,t=z.fromDom(e);if(n.push(t),!0===o(t))break;l=e}return n},se=e=>w.from(e.dom.previousSibling).map(z.fromDom),ce=e=>w.from(e.dom.nextSibling).map(z.fromDom),ie=e=>k(e.dom.childNodes,z.fromDom),me=e=>((e,t)=>{const o=e.dom.childNodes;return w.from(o[t]).map(z.fromDom)})(e,0),de=i(Element.prototype.attachShadow)&&i(Node.prototype.getRootNode)?e=>z.fromDom(e.dom.getRootNode()):ne,ue=e=>{const t=de(e);return oe(o=t)&&c(o.dom.host)?w.some(t):w.none();var o},pe=e=>z.fromDom(e.dom.host),be=e=>{const t=ee(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const o=t.ownerDocument;return ue(z.fromDom(t)).fold((()=>o.body.contains(t)),(l=be,n=pe,e=>l(n(e))));var l,n};var ge=(e,t,o,l,n)=>e(o,l)?w.some(o):i(n)&&n(o)?w.none():t(o,l,n);const he=(e,t,o)=>{let l=e.dom;const n=i(o)?o:f;for(;l.parentNode;){l=l.parentNode;const e=z.fromDom(l);if(t(e))return w.some(e);if(n(e))break}return w.none()},fe=(e,t,o)=>he(e,(e=>W(e,t)),o),ye=(e,t)=>((e,t)=>q(e.dom.childNodes,(e=>t(z.fromDom(e)))).map(z.fromDom))(e,(e=>W(e,t))),we=(e,t)=>((e,t)=>{const o=void 0===t?document:t.dom;return U(o)?w.none():w.from(o.querySelector(e)).map(z.fromDom)})(t,e),Se=(e,t,o)=>ge(((e,t)=>W(e,t)),fe,e,t,o),Ce=(e,t=!1)=>{return be(e)?e.dom.isContentEditable:(o=e,Se(o,"[contenteditable]")).fold(u(t),(e=>"true"===ve(e)));var o},ve=e=>e.dom.contentEditable,Te=e=>t=>G(t,(e=>z.fromDom(e.getBody()))(e)),xe=e=>/^\d+(\.\d+)?$/.test(e)?e+"px":e,Ae=e=>z.fromDom(e.selection.getStart()),Re=e=>{return(t=e,o=le("table"),ge(((e,t)=>t(e)),he,t,o,l)).forall(Ce);var t,o,l},Oe=(e,t)=>{let o=[];return B(ie(e),(e=>{t(e)&&(o=o.concat([e])),o=o.concat(Oe(e,t))})),o},_e=(e,t)=>((e,t)=>E(ie(e),t))(e,(e=>W(e,t))),De=(e,t)=>((e,t)=>{const o=void 0===t?document:t.dom;return U(o)?[]:k(o.querySelectorAll(e),z.fromDom)})(t,e),Ie=(e,t,o)=>{if(!(l(o)||r(o)||m(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")},Me=(e,t,o)=>{Ie(e.dom,t,o)},Ne=(e,t)=>{const o=e.dom.getAttribute(t);return null===o?void 0:o},Pe=(e,t)=>w.from(Ne(e,t)),ke=(e,t)=>{e.dom.removeAttribute(t)},Be=(e,t,o=b)=>e.exists((e=>o(e,t))),Ee=(e,t,o)=>e.isSome()&&t.isSome()?w.some(o(e.getOrDie(),t.getOrDie())):w.none(),Fe=(e,t)=>((e,t,o)=>""===t||e.length>=t.length&&e.substr(o,o+t.length)===t)(e,t,0),qe=(Le=/^\s+|\s+$/g,e=>e.replace(Le,""));var Le;const He=e=>e.length>0,je=(e,t=10)=>{const o=parseInt(e,t);return isNaN(o)?w.none():w.some(o)},Ve=e=>void 0!==e.style&&i(e.style.getPropertyValue),$e=(e,t,o)=>{((e,t,o)=>{if(!l(o))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);Ve(e)&&e.style.setProperty(t,o)})(e.dom,t,o)},ze=(e,t)=>{const o=e.dom,l=window.getComputedStyle(o).getPropertyValue(t);return""!==l||be(e)?l:We(o,t)},We=(e,t)=>Ve(e)?e.style.getPropertyValue(t):"",Ue=(e,t)=>{const o=e.dom,l=We(o,t);return w.from(l).filter((e=>e.length>0))},Ge=(e,t)=>{((e,t)=>{Ve(e)&&e.style.removeProperty(t)})(e.dom,t),Be(Pe(e,"style").map(qe),"")&&ke(e,"style")},Ke=(e,t,o=0)=>Pe(e,t).map((e=>parseInt(e,10))).getOr(o),Je=(e,t)=>Qe(e,t,y),Qe=(e,t,o)=>L(ie(e),(e=>W(e,t)?o(e)?[e]:[]:Qe(e,t,o))),Xe=["tfoot","thead","tbody","colgroup"],Ye=(e,t,o)=>({element:e,rowspan:t,colspan:o}),Ze=(e,t,o)=>({element:e,cells:t,section:o}),et=(e,t)=>((e,t,o=f)=>o(t)?w.none():M(e,J(t))?w.some(t):fe(t,e.join(","),(e=>W(e,"table")||o(e))))(["td","th"],e,t),tt=(e,t)=>Se(e,"table",t),ot=e=>Je(e,"tr"),lt=e=>tt(e).fold(u([]),(e=>_e(e,"colgroup"))),nt=(e,t)=>k(e,(e=>{if("colgroup"===J(e)){const t=k((e=>W(e,"colgroup")?_e(e,"col"):L(lt(e),(e=>_e(e,"col"))))(e),(e=>{const t=Ke(e,"span",1);return Ye(e,1,t)}));return Ze(e,t,"colgroup")}{const o=k((e=>Je(e,"th,td"))(e),(e=>{const t=Ke(e,"rowspan",1),o=Ke(e,"colspan",1);return Ye(e,t,o)}));return Ze(e,o,t(e))}})),rt=e=>re(e).map((e=>{const t=J(e);return(e=>M(Xe,e))(t)?t:"tbody"})).getOr("tbody"),at=e=>Pe(e,"data-snooker-locked-cols").bind((e=>w.from(e.match(/\d+/g)))).map((e=>((e,t)=>{const o={};for(let l=0,n=e.length;l<n;l++){const n=e[l];o[String(n)]=t(n,l)}return o})(e,y))),st=(e,t)=>e+","+t,ct=(e,t)=>{const o=L(e.all,(e=>e.cells));return E(o,t)},it=e=>{const t={},o=[];var l;const n=(l=e,j(l,0)).map((e=>e.element)).bind(tt).bind(at).getOr({});let r=0,a=0,s=0;const{pass:c,fail:i}=((e,t)=>{const o=[],l=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];(t(r,n)?o:l).push(r)}return{pass:o,fail:l}})(e,(e=>"colgroup"===e.section));B(i,(e=>{const l=[];B(e.cells,(e=>{let o=0;for(;void 0!==t[st(s,o)];)o++;const r=_(n,o.toString()),c=((e,t,o,l,n,r)=>({element:e,rowspan:t,colspan:o,row:l,column:n,isLocked:r}))(e.element,e.rowspan,e.colspan,s,o,r);for(let l=0;l<e.colspan;l++)for(let n=0;n<e.rowspan;n++){const e=o+l,r=st(s+n,e);t[r]=c,a=Math.max(a,e+1)}l.push(c)})),r++,o.push(Ze(e.element,l,e.section)),s++}));const{columns:m,colgroups:d}=(e=>j(e,e.length-1))(c).map((e=>{const t=(e=>{const t={};let o=0;return B(e.cells,(e=>{const l=e.colspan;P(l,(n=>{const r=o+n;t[r]=((e,t,o)=>({element:e,colspan:t,column:o}))(e.element,l,r)})),o+=l})),t})(e),o=((e,t)=>({element:e,columns:t}))(e.element,x(t));return{colgroups:[o],columns:t}})).getOrThunk((()=>({colgroups:[],columns:{}}))),u=((e,t)=>({rows:e,columns:t}))(r,a);return{grid:u,access:t,all:o,columns:m,colgroups:d}},mt=e=>{const t=(e=>{const t=ot(e),o=[...lt(e),...t];return nt(o,rt)})(e);return it(t)},dt=(e,t,o)=>w.from(e.access[st(t,o)]),ut=(e,t,o)=>{const l=ct(e,(e=>o(t,e.element)));return l.length>0?w.some(l[0]):w.none()},pt=e=>L(e.all,(e=>e.cells)),bt=(e,t)=>w.from(e.columns[t]);var gt=tinymce.util.Tools.resolve("tinymce.util.Tools");const ht=(e,t,o)=>{const l=e.select("td,th",t);let n;for(let t=0;t<l.length;t++){const r=e.getStyle(l[t],o);if(a(n)&&(n=r),n!==r)return""}return n},ft=(e,t,o)=>{gt.each("left center right".split(" "),(l=>{l!==o&&e.formatter.remove("align"+l,{},t)})),o&&e.formatter.apply("align"+o,{},t)},yt=(e,t,o)=>{e.dispatch("TableModified",{...o,table:t})},wt=(e,t)=>(e=>{const t=parseFloat(e);return isNaN(t)?w.none():w.some(t)})(e).getOr(t),St=(e,t,o)=>wt(ze(e,t),o),Ct=(e,t)=>{const o=e.dom,l=o.getBoundingClientRect().width||o.offsetWidth;return"border-box"===t?l:((e,t,o,l)=>t-St(e,`padding-${o}`,0)-St(e,`padding-${l}`,0)-St(e,`border-${o}-width`,0)-St(e,`border-${l}-width`,0))(e,l,"left","right")},vt=e=>Ct(e,"content-box");var Tt=tinymce.util.Tools.resolve("tinymce.Env");const xt=P(5,(e=>{const t=`${e+1}px`;return{title:t,value:t}})),At=k(["Solid","Dotted","Dashed","Double","Groove","Ridge","Inset","Outset","None","Hidden"],(e=>({title:e,value:e.toLowerCase()}))),Rt="100%",Ot=e=>{var t;const o=e.dom,l=null!==(t=o.getParent(e.selection.getStart(),o.isBlock))&&void 0!==t?t:e.getBody();return vt(z.fromDom(l))+"px"},_t=e=>t=>t.options.get(e),Dt=_t("table_sizing_mode"),It=_t("table_border_widths"),Mt=_t("table_border_styles"),Nt=_t("table_cell_advtab"),Pt=_t("table_row_advtab"),kt=_t("table_advtab"),Bt=_t("table_appearance_options"),Et=_t("table_grid"),Ft=_t("table_style_by_css"),qt=_t("table_cell_class_list"),Lt=_t("table_row_class_list"),Ht=_t("table_class_list"),jt=_t("table_toolbar"),Vt=_t("table_background_color_map"),$t=_t("table_border_color_map"),zt=e=>"fixed"===Dt(e),Wt=e=>"responsive"===Dt(e),Ut=e=>{const t=e.options,o=t.get("table_default_styles");return t.isSet("table_default_styles")?o:((e,t)=>Wt(e)||!Ft(e)?t:zt(e)?{...t,width:Ot(e)}:{...t,width:Rt})(e,o)},Gt=e=>{const t=e.options,o=t.get("table_default_attributes");return t.isSet("table_default_attributes")?o:((e,t)=>Wt(e)||Ft(e)?t:zt(e)?{...t,width:Ot(e)}:{...t,width:Rt})(e,o)},Kt=(e,t)=>t.column>=e.startCol&&t.column+t.colspan-1<=e.finishCol&&t.row>=e.startRow&&t.row+t.rowspan-1<=e.finishRow,Jt=(e,t,o)=>{const l=ut(e,t,G),n=ut(e,o,G);return l.bind((e=>n.map((t=>{return o=e,l=t,n=Math.min(o.row,l.row),r=Math.min(o.column,l.column),a=Math.max(o.row+o.rowspan-1,l.row+l.rowspan-1),s=Math.max(o.column+o.colspan-1,l.column+l.colspan-1),{startRow:n,startCol:r,finishRow:a,finishCol:s};var o,l,n,r,a,s}))))},Qt=(e,t,o)=>Jt(e,t,o).bind((t=>((e,t)=>{let o=!0;const l=g(Kt,t);for(let n=t.startRow;n<=t.finishRow;n++)for(let r=t.startCol;r<=t.finishCol;r++)o=o&&dt(e,n,r).exists(l);return o?w.some(t):w.none()})(e,t))),Xt=mt,Yt=(e,t)=>{re(e).each((o=>{o.dom.insertBefore(t.dom,e.dom)}))},Zt=(e,t)=>{ce(e).fold((()=>{re(e).each((e=>{to(e,t)}))}),(e=>{Yt(e,t)}))},eo=(e,t)=>{me(e).fold((()=>{to(e,t)}),(o=>{e.dom.insertBefore(t.dom,o.dom)}))},to=(e,t)=>{e.dom.appendChild(t.dom)},oo=(e,t)=>{Yt(e,t),to(t,e)},lo=(e,t)=>{B(t,((o,l)=>{const n=0===l?e:t[l-1];Zt(n,o)}))},no=(e,t)=>{B(t,(t=>{to(e,t)}))},ro=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},ao=e=>{const t=ie(e);t.length>0&&lo(e,t),ro(e)},so=((e,t)=>{const o=t=>e(t)?w.from(t.dom.nodeValue):w.none();return{get:l=>{if(!e(l))throw new Error("Can only get "+t+" value of a "+t+" node");return o(l).getOr("")},getOption:o,set:(o,l)=>{if(!e(o))throw new Error("Can only set raw "+t+" value of a "+t+" node");o.dom.nodeValue=l}}})(ee,"text"),co=e=>so.get(e),io=(e,t)=>so.set(e,t);var mo=["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"];const uo=(e,t,o,l)=>{const n=t(e,o);return r=(o,l)=>{const n=t(e,l);return po(e,o,n)},a=n,((e,t)=>{for(let o=e.length-1;o>=0;o--)t(e[o],o)})(l,((e,t)=>{a=r(a,e,t)})),a;var r,a},po=(e,t,o)=>t.bind((t=>o.filter(g(e.eq,t)))),bo=(e,t,o)=>o.length>0?((e,t,o,l)=>l(e,t,o[0],o.slice(1)))(e,t,o,uo):w.none(),go={up:u({selector:fe,closest:Se,predicate:he,all:ae}),down:u({selector:De,predicate:Oe}),styles:u({get:ze,getRaw:Ue,set:$e,remove:Ge}),attrs:u({get:Ne,set:Me,remove:ke,copyTo:(e,t)=>{((e,t)=>{const o=e.dom;v(t,((e,t)=>{Ie(o,t,e)}))})(t,F(e.dom.attributes,((e,t)=>(e[t.name]=t.value,e)),{}))}}),insert:u({before:Yt,after:Zt,afterAll:lo,append:to,appendAll:no,prepend:eo,wrap:oo}),remove:u({unwrap:ao,remove:ro}),create:u({nu:z.fromTag,clone:e=>z.fromDom(e.dom.cloneNode(!1)),text:z.fromText}),query:u({comparePosition:(e,t)=>e.dom.compareDocumentPosition(t.dom),prevSibling:se,nextSibling:ce}),property:u({children:ie,name:J,parent:re,document:e=>ne(e).dom,isText:ee,isComment:Y,isElement:Z,isSpecial:e=>{const t=J(e);return M(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],t)},getLanguage:e=>Z(e)?Pe(e,"lang"):w.none(),getText:co,setText:io,isBoundary:e=>!!Z(e)&&("body"===J(e)||M(mo,J(e))),isEmptyTag:e=>!!Z(e)&&M(["br","img","hr","input"],J(e)),isNonEditable:e=>Z(e)&&"false"===Ne(e,"contenteditable")}),eq:G,is:K},ho=e=>fe(e,"table"),fo=(e,t,o)=>we(e,t).bind((t=>we(e,o).bind((e=>{return(o=ho,l=[t,e],bo(go,((e,t)=>o(t)),l)).map((o=>({first:t,last:e,table:o})));var o,l})))),yo=(e,t)=>((e,t)=>{const o=De(e,t);return o.length>0?w.some(o):w.none()})(e,t),wo=(e,t,o)=>fo(e,t,o).bind((t=>{const o=t=>G(e,t),l="thead,tfoot,tbody,table",n=fe(t.first,l,o),r=fe(t.last,l,o);return n.bind((e=>r.bind((o=>G(e,o)?((e,t,o)=>{const l=Xt(e);return Qt(l,t,o)})(t.table,t.first,t.last):w.none()))))})),So=e=>k(e,z.fromDom),Co="data-mce-selected",vo="data-mce-first-selected",To="data-mce-last-selected",xo={selected:Co,selectedSelector:"td[data-mce-selected],th[data-mce-selected]",firstSelected:vo,firstSelectedSelector:"td[data-mce-first-selected],th[data-mce-first-selected]",lastSelected:To,lastSelectedSelector:"td[data-mce-last-selected],th[data-mce-last-selected]"},Ao=e=>(t,o)=>{const l=J(t),n="col"===l||"colgroup"===l?tt(r=t).bind((e=>yo(e,xo.firstSelectedSelector))).fold(u(r),(e=>e[0])):t;var r;return Se(n,e,o)},Ro=Ao("th,td,caption"),Oo=Ao("th,td"),_o=e=>So(e.model.table.getSelectedCells()),Do=(e,t)=>{const o=Oo(e),l=o.bind((e=>tt(e))).map((e=>ot(e)));return Ee(o,l,((e,o)=>E(o,(o=>N(So(o.dom.cells),(o=>"1"===Ne(o,t)||G(o,e))))))).getOr([])},Io=[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}],Mo=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,No=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Po=e=>{return(t=e,o="#",Fe(t,o)?((e,t)=>e.substring(t))(t,o.length):t).toUpperCase();var t,o},ko=e=>(e=>Mo.test(e)||No.test(e))(e)?w.some({value:Po(e)}):w.none(),Bo=e=>{const t=e.toString(16);return(1===t.length?"0"+t:t).toUpperCase()},Eo=e=>(e=>({value:Po(e)}))(Bo(e.red)+Bo(e.green)+Bo(e.blue)),Fo=/^\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)\s*$/i,qo=/^\s*rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?(?:\.\d+)?)\s*\)\s*$/i,Lo=(e,t,o,l)=>({red:e,green:t,blue:o,alpha:l}),Ho=(e,t,o,l)=>{const n=parseInt(e,10),r=parseInt(t,10),a=parseInt(o,10),s=parseFloat(l);return Lo(n,r,a,s)},jo=e=>{if("transparent"===e)return w.some(Lo(0,0,0,0));const t=Fo.exec(e);if(null!==t)return w.some(Ho(t[1],t[2],t[3],"1"));const o=qo.exec(e);return null!==o?w.some(Ho(o[1],o[2],o[3],o[4])):w.none()},Vo=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},$o=()=>(e=>{const t=Vo(w.none()),o=()=>t.get().each(e);return{clear:()=>{o(),t.set(w.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{o(),t.set(w.some(e))}}})((e=>e.unbind())),zo=(e,t,o)=>l=>{const n=$o(),r=!He(o);const a=()=>{const a=_o(e),s=l=>e.formatter.match(t,{value:o},l.dom,r);r?(l.setActive(!N(a,s)),n.set(e.formatter.formatChanged(t,(e=>l.setActive(!e)),!0))):(l.setActive(H(a,s)),n.set(e.formatter.formatChanged(t,l.setActive,!1,{value:o})))};return e.initialized?a():e.on("init",a),n.clear},Wo=e=>_(e,"menu"),Uo=e=>k(e,(e=>{const t=e.text||e.title||"";return Wo(e)?{text:t,items:Uo(e.menu)}:{text:t,value:e.value}})),Go=(e,t,o,l)=>k(t,(t=>{const n=t.text||t.title;return Wo(t)?{type:"nestedmenuitem",text:n,getSubmenuItems:()=>Go(e,t.menu,o,l)}:{text:n,type:"togglemenuitem",onAction:()=>l(t.value),onSetup:zo(e,o,t.value)}})),Ko=(e,t)=>o=>{e.execCommand("mceTableApplyCellStyle",!1,{[t]:o})},Jo=e=>L(e,(e=>Wo(e)?[{...e,menu:Jo(e.menu)}]:He(e.value)?[e]:[])),Qo=(e,t,o,l)=>n=>n(Go(e,t,o,l)),Xo=(e,t,o)=>{const l=k(t,(e=>{return{text:e.title,value:"#"+(t=e.value,ko(t).orThunk((()=>jo(t).map(Eo))).getOrThunk((()=>{const e=document.createElement("canvas");e.height=1,e.width=1;const o=e.getContext("2d");o.clearRect(0,0,e.width,e.height),o.fillStyle="#FFFFFF",o.fillStyle=t,o.fillRect(0,0,1,1);const l=o.getImageData(0,0,1,1).data,n=l[0],r=l[1],a=l[2],s=l[3];return Eo(Lo(n,r,a,s))}))).value,type:"choiceitem"};var t}));return[{type:"fancymenuitem",fancytype:"colorswatch",initData:{colors:l.length>0?l:void 0,allowCustomColors:!1},onAction:t=>{const l="remove"===t.value?"":t.value;e.execCommand("mceTableApplyCellStyle",!1,{[o]:l})}}]},Yo=e=>()=>{const t="header"===e.queryCommandValue("mceTableRowType")?"body":"header";e.execCommand("mceTableRowType",!1,{type:t})},Zo=e=>()=>{const t="th"===e.queryCommandValue("mceTableColType")?"td":"th";e.execCommand("mceTableColType",!1,{type:t})},el=[{name:"width",type:"input",label:"Width"},{name:"height",type:"input",label:"Height"},{name:"celltype",type:"listbox",label:"Cell type",items:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{name:"scope",type:"listbox",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:"listbox",label:"Horizontal align",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{name:"valign",type:"listbox",label:"Vertical align",items:Io}],tl=e=>el.concat((e=>{const t=Uo(qt(e));return t.length>0?w.some({name:"class",type:"listbox",label:"Class",items:t}):w.none()})(e).toArray()),ol=(e,t)=>{const o=[{name:"borderstyle",type:"listbox",label:"Border style",items:[{text:"Select...",value:""}].concat(Uo(Mt(e)))},{name:"bordercolor",type:"colorinput",label:"Border color"},{name:"backgroundcolor",type:"colorinput",label:"Background color"}];return{title:"Advanced",name:"advanced",items:"cell"===t?[{name:"borderwidth",type:"input",label:"Border width"}].concat(o):o}},ll=(e,t)=>{const o=e.dom;return{setAttrib:(e,l)=>{o.setAttrib(t,e,l)},setStyle:(e,l)=>{o.setStyle(t,e,l)},setFormat:(o,l)=>{""===l?e.formatter.remove(o,{value:null},t,!0):e.formatter.apply(o,{value:l},t)}}},nl=le("th"),rl=(e,t)=>e&&t?"sectionCells":e?"section":"cells",al=e=>{const t=E(e,(e=>nl(e.element)));return 0===t.length?w.some("td"):t.length===e.length?w.some("th"):w.none()},sl=e=>{const t=k(e,(e=>(e=>{const t="thead"===e.section,o=Be(al(e.cells),"th");return"tfoot"===e.section?{type:"footer"}:t||o?{type:"header",subType:rl(t,o)}:{type:"body"}})(e).type)),o=M(t,"header"),l=M(t,"footer");if(o||l){const e=M(t,"body");return!o||e||l?o||e||!l?w.none():w.some("footer"):w.some("header")}return w.some("body")},cl=(e,t)=>V(e.all,(e=>q(e.cells,(e=>G(t,e.element))))),il=(e,t,o)=>{const l=(e=>{const t=[],o=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(o);return t})(k(t.selection,(t=>et(t).bind((t=>cl(e,t))).filter(o))));return n=l.length>0,r=l,n?w.some(r):w.none();var n,r},ml=(e,t)=>il(e,t,y),dl=(e,t)=>H(t,(t=>((e,t)=>cl(e,t).exists((e=>!e.isLocked)))(e,t))),ul=(e,t)=>((e,t)=>t.mergable)(0,t).filter((t=>dl(e,t.cells))),pl=(e,t)=>((e,t)=>t.unmergable)(0,t).filter((t=>dl(e,t))),bl=e=>{if(!n(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");const t=[],o={};return B(e,((l,r)=>{const a=S(l);if(1!==a.length)throw new Error("one and only one name per case");const s=a[0],c=l[s];if(void 0!==o[s])throw new Error("duplicate key detected:"+s);if("cata"===s)throw new Error("cannot have a case named cata (sorry)");if(!n(c))throw new Error("case arguments must be an array");t.push(s),o[s]=(...o)=>{const l=o.length;if(l!==c.length)throw new Error("Wrong number of arguments to case "+s+". Expected "+c.length+" ("+c+"), got "+l);return{fold:(...t)=>{if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);return t[r].apply(null,o)},match:e=>{const l=S(e);if(t.length!==l.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+l.join(","));if(!H(t,(e=>M(l,e))))throw new Error("Not all branches were specified when using match. Specified: "+l.join(", ")+"\nRequired: "+t.join(", "));return e[s].apply(null,o)},log:e=>{console.log(e,{constructors:t,constructor:s,params:o})}}}})),o},gl=(bl([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}]),(e,t)=>{const o=mt(e);return ml(o,t).bind((e=>{const t=e[e.length-1],l=e[0].row,n=t.row+t.rowspan,r=o.all.slice(l,n);return sl(r)})).getOr("")}),hl=e=>{return Fe(e,"rgb")?jo(t=e).map(Eo).map((e=>"#"+e.value)).getOr(t):e;var t},fl=e=>{const t=z.fromDom(e);return{borderwidth:Ue(t,"border-width").getOr(""),borderstyle:Ue(t,"border-style").getOr(""),bordercolor:Ue(t,"border-color").map(hl).getOr(""),backgroundcolor:Ue(t,"background-color").map(hl).getOr("")}},yl=e=>{const t=e[0],o=e.slice(1);return B(o,(e=>{B(S(t),(o=>{v(e,((e,l)=>{const n=t[o];""!==n&&o===l&&n!==e&&(t[o]="")}))}))})),t},wl=(e,t,o,l)=>q(e,(e=>!a(o.formatter.matchNode(l,t+e)))).getOr(""),Sl=g(wl,["left","center","right"],"align"),Cl=g(wl,["top","middle","bottom"],"valign"),vl=e=>tt(z.fromDom(e)).map((t=>{const o={selection:So(e.cells)};return gl(t,o)})).getOr(""),Tl=(e,t)=>{const o=mt(e),l=pt(o),n=E(l,(e=>N(t,(t=>G(e.element,t)))));return k(n,(e=>({element:e.element.dom,column:bt(o,e.column).map((e=>e.element.dom))})))},xl=(e,t,o,l)=>{const n=1===t.length;B(t,(t=>{const r=t.element,a=n?y:l,s=ll(e,r);((e,t,o,l)=>{l("scope")&&e.setAttrib("scope",o.scope),l("class")&&e.setAttrib("class",o.class),l("height")&&e.setStyle("height",xe(o.height)),l("width")&&t.setStyle("width",xe(o.width))})(s,t.column.map((t=>ll(e,t))).getOr(s),o,a),Nt(e)&&((e,t,o)=>{o("backgroundcolor")&&e.setFormat("tablecellbackgroundcolor",t.backgroundcolor),o("bordercolor")&&e.setFormat("tablecellbordercolor",t.bordercolor),o("borderstyle")&&e.setFormat("tablecellborderstyle",t.borderstyle),o("borderwidth")&&e.setFormat("tablecellborderwidth",xe(t.borderwidth))})(s,o,a),l("halign")&&ft(e,r,o.halign),l("valign")&&((e,t,o)=>{gt.each("top middle bottom".split(" "),(l=>{l!==o&&e.formatter.remove("valign"+l,{},t)})),o&&e.formatter.apply("valign"+o,{},t)})(e,r,o.valign)}))},Al=(e,t,o,l)=>{const n=l.getData();l.close(),e.undoManager.transact((()=>{((e,t,o,l)=>{const n=T(l,((e,t)=>o[t]!==e));A(n)>0&&t.length>=1&&tt(t[0]).each((o=>{const r=Tl(o,t),a=A(T(n,((e,t)=>"scope"!==t&&"celltype"!==t)))>0,s=O(n,"celltype");(a||O(n,"scope"))&&xl(e,r,l,g(O,n)),s&&((e,t)=>{e.execCommand("mceTableCellType",!1,{type:t.celltype,no_events:!0})})(e,l),yt(e,o.dom,{structure:s,style:a})}))})(e,t,o,n),e.focus()}))},Rl=(e,t)=>{const o=tt(t[0]).map((o=>k(Tl(o,t),(t=>((e,t,o,l)=>{const n=e.dom,r=(e,t)=>n.getStyle(e,t)||n.getAttrib(e,t);return{width:r(l.getOr(t),"width"),height:r(t,"height"),scope:n.getAttrib(t,"scope"),celltype:(a=t,a.nodeName.toLowerCase()),class:n.getAttrib(t,"class",""),halign:Sl(e,t),valign:Cl(e,t),...o?fl(t):{}};var a})(e,t.element,Nt(e),t.column)))));return yl(o.getOrDie())},Ol=e=>{const t=_o(e);if(0===t.length)return;const o=Rl(e,t),l={type:"tabpanel",tabs:[{title:"General",name:"general",items:tl(e)},ol(e,"cell")]},n={type:"panel",items:[{type:"grid",columns:2,items:tl(e)}]};e.windowManager.open({title:"Cell Properties",size:"normal",body:Nt(e)?l:n,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:o,onSubmit:g(Al,e,t,o)})},_l=[{type:"listbox",name:"type",label:"Row type",items:[{text:"Header",value:"header"},{text:"Body",value:"body"},{text:"Footer",value:"footer"}]},{type:"listbox",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"}],Dl=e=>_l.concat((e=>{const t=Uo(Lt(e));return t.length>0?w.some({name:"class",type:"listbox",label:"Class",items:t}):w.none()})(e).toArray()),Il=(e,t,o,l)=>{const n=1===t.length?y:l;B(t,(t=>{const r=ll(e,t);((e,t,o)=>{o("class")&&e.setAttrib("class",t.class),o("height")&&e.setStyle("height",xe(t.height))})(r,o,n),Pt(e)&&((e,t,o)=>{o("backgroundcolor")&&e.setStyle("background-color",t.backgroundcolor),o("bordercolor")&&e.setStyle("border-color",t.bordercolor),o("borderstyle")&&e.setStyle("border-style",t.borderstyle)})(r,o,n),l("align")&&ft(e,t,o.align)}))},Ml=(e,t,o,l)=>{const n=l.getData();l.close(),e.undoManager.transact((()=>{((e,t,o,l)=>{const n=T(l,((e,t)=>o[t]!==e));if(A(n)>0){const o=O(n,"type"),r=!o||A(n)>1;r&&Il(e,t,l,g(O,n)),o&&((e,t)=>{e.execCommand("mceTableRowType",!1,{type:t.type,no_events:!0})})(e,l),tt(z.fromDom(t[0])).each((t=>yt(e,t.dom,{structure:o,style:r})))}})(e,t,o,n),e.focus()}))},Nl=e=>{const t=Do(Ae(e),xo.selected);if(0===t.length)return;const o=k(t,(t=>((e,t,o)=>{const l=e.dom;return{height:l.getStyle(t,"height")||l.getAttrib(t,"height"),class:l.getAttrib(t,"class",""),type:vl(t),align:Sl(e,t),...o?fl(t):{}}})(e,t.dom,Pt(e)))),l=yl(o),n={type:"tabpanel",tabs:[{title:"General",name:"general",items:Dl(e)},ol(e,"row")]},r={type:"panel",items:[{type:"grid",columns:2,items:Dl(e)}]};e.windowManager.open({title:"Row Properties",size:"normal",body:Pt(e)?n:r,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:l,onSubmit:g(Ml,e,k(t,(e=>e.dom)),l)})},Pl=(e,t,o)=>{const l=o?[{type:"input",name:"cols",label:"Cols",inputMode:"numeric"},{type:"input",name:"rows",label:"Rows",inputMode:"numeric"}]:[],n=Bt(e)?[{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"}]}]:[],r=t.length>0?[{type:"listbox",name:"class",label:"Class",items:t}]:[];return l.concat([{type:"input",name:"width",label:"Width"},{type:"input",name:"height",label:"Height"}]).concat(n).concat([{type:"listbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]}]).concat(r)},kl=(e,t,o,n)=>{if("TD"===t.tagName||"TH"===t.tagName)l(o)&&c(n)?e.setStyle(t,o,n):e.setStyles(t,o);else if(t.children)for(let l=0;l<t.children.length;l++)kl(e,t.children[l],o,n)},Bl=(e,t,o,l)=>{const n=e.dom,r=l.getData(),s=T(r,((e,t)=>o[t]!==e));l.close(),""===r.class&&delete r.class,e.undoManager.transact((()=>{if(!t){const o=je(r.cols).getOr(1),l=je(r.rows).getOr(1);e.execCommand("mceInsertTable",!1,{rows:l,columns:o}),t=Oo(Ae(e),Te(e)).bind((t=>tt(t,Te(e)))).map((e=>e.dom)).getOrDie()}if(A(s)>0){((e,t,o)=>{const l=e.dom,n={},r={};if(a(o.class)||(n.class=o.class),r.height=xe(o.height),Ft(e)?r.width=xe(o.width):l.getAttrib(t,"width")&&(n.width=(e=>e?e.replace(/px$/,""):"")(o.width)),Ft(e)?(r["border-width"]=xe(o.border),r["border-spacing"]=xe(o.cellspacing)):(n.border=o.border,n.cellpadding=o.cellpadding,n.cellspacing=o.cellspacing),Ft(e)&&t.children)for(let n=0;n<t.children.length;n++)kl(l,t.children[n],{"border-width":xe(o.border),padding:xe(o.cellpadding)}),kt(e)&&kl(l,t.children[n],{"border-color":o.bordercolor});if(kt(e)){const e=o;r["background-color"]=e.backgroundcolor,r["border-color"]=e.bordercolor,r["border-style"]=e.borderstyle}n.style=l.serializeStyle({...Ut(e),...r}),l.setAttribs(t,{...Gt(e),...n})})(e,t,r);const o=n.select("caption",t)[0];(o&&!r.caption||!o&&r.caption)&&e.execCommand("mceTableToggleCaption"),ft(e,t,r.align)}if(e.focus(),e.addVisual(),A(s)>0){const o=O(s,"caption"),l=!o||A(s)>1;yt(e,t,{structure:o,style:l})}}))},El=(e,t)=>{const o=e.dom;let l,n=((e,t)=>{const o=Ut(e),l=Gt(e),n=t?{borderstyle:R(o,"border-style").getOr(""),bordercolor:hl(R(o,"border-color").getOr("")),backgroundcolor:hl(R(o,"background-color").getOr(""))}:{};return{height:"",width:"100%",cellspacing:"",cellpadding:"",caption:!1,class:"",align:"",border:"",...o,...l,...n,...(()=>{const t=o["border-width"];return Ft(e)&&t?{border:t}:R(l,"border").fold((()=>({})),(e=>({border:e})))})(),...{...R(o,"border-spacing").or(R(l,"cellspacing")).fold((()=>({})),(e=>({cellspacing:e}))),...R(o,"border-padding").or(R(l,"cellpadding")).fold((()=>({})),(e=>({cellpadding:e})))}}})(e,kt(e));t?(n.cols="1",n.rows="1",kt(e)&&(n.borderstyle="",n.bordercolor="",n.backgroundcolor="")):(l=o.getParent(e.selection.getStart(),"table",e.getBody()),l?n=((e,t,o)=>{const l=e.dom,n=Ft(e)?l.getStyle(t,"border-spacing")||l.getAttrib(t,"cellspacing"):l.getAttrib(t,"cellspacing")||l.getStyle(t,"border-spacing"),r=Ft(e)?ht(l,t,"padding")||l.getAttrib(t,"cellpadding"):l.getAttrib(t,"cellpadding")||ht(l,t,"padding");return{width:l.getStyle(t,"width")||l.getAttrib(t,"width"),height:l.getStyle(t,"height")||l.getAttrib(t,"height"),cellspacing:null!=n?n:"",cellpadding:null!=r?r:"",border:((t,o)=>{const l=Ue(z.fromDom(o),"border-width");return Ft(e)&&l.isSome()?l.getOr(""):t.getAttrib(o,"border")||ht(e.dom,o,"border-width")||ht(e.dom,o,"border")||""})(l,t),caption:!!l.select("caption",t)[0],class:l.getAttrib(t,"class",""),align:Sl(e,t),...o?fl(t):{}}})(e,l,kt(e)):kt(e)&&(n.borderstyle="",n.bordercolor="",n.backgroundcolor=""));const r=Uo(Ht(e));r.length>0&&n.class&&(n.class=n.class.replace(/\s*mce\-item\-table\s*/g,""));const a={type:"grid",columns:2,items:Pl(e,r,t)},s=kt(e)?{type:"tabpanel",tabs:[{title:"General",name:"general",items:[a]},ol(e,"table")]}:{type:"panel",items:[a]};e.windowManager.open({title:"Table Properties",size:"normal",body:s,onSubmit:g(Bl,e,l,n),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:n})},Fl=e=>{v({mceTableProps:g(El,e,!1),mceTableRowProps:g(Nl,e),mceTableCellProps:g(Ol,e),mceInsertTableDialog:g(El,e,!0)},((t,o)=>e.addCommand(o,(()=>{return o=t,void(Re(Ae(e))&&o());var o}))))},ql=p,Ll=e=>{const t=(e,t)=>Pe(e,t).exists((e=>parseInt(e,10)>1));return e.length>0&&H(e,(e=>t(e,"rowspan")||t(e,"colspan")))?w.some(e):w.none()},Hl=(e,t,o)=>t.length<=1?w.none():wo(e,o.firstSelectedSelector,o.lastSelectedSelector).map((e=>({bounds:e,cells:t}))),jl=e=>{const t=Vo(w.none()),o=Vo([]);let l=w.none();const n=le("caption"),r=e=>l.forall((t=>!t[e])),a=()=>Ro((e=>z.fromDom(e.selection.getEnd()))(e),Te(e)),s=()=>Ro(Ae(e),Te(e)).bind((t=>{return o=Ee(tt(t),a().bind(tt),((o,l)=>G(o,l)?n(t)?w.some((e=>({element:e,mergable:w.none(),unmergable:w.none(),selection:[e]}))(t)):w.some(((e,t,o)=>({element:o,mergable:Hl(t,e,xo),unmergable:Ll(e),selection:ql(e)}))(_o(e),o,t)):w.none())),o.bind(p);var o})),c=e=>tt(e.element).map((t=>{const o=mt(t),l=ml(o,e).getOr([]),n=F(l,((e,t)=>(t.isLocked&&(e.onAny=!0,0===t.column?e.onFirst=!0:t.column+t.colspan>=o.grid.columns&&(e.onLast=!0)),e)),{onAny:!1,onFirst:!1,onLast:!1});return{mergeable:ul(o,e).isSome(),unmergeable:pl(o,e).isSome(),locked:n}})),i=()=>{t.set((e=>{let t,o=!1;return(...l)=>(o||(o=!0,t=e.apply(null,l)),t)})(s)()),l=t.get().bind(c),B(o.get(),h)},m=e=>(e(),o.set(o.get().concat([e])),()=>{o.set(E(o.get(),(t=>t!==e)))}),d=(e,o)=>m((()=>t.get().fold((()=>{e.setEnabled(!1)}),(t=>{e.setEnabled(!o(t))})))),u=(e,o,l)=>m((()=>t.get().fold((()=>{e.setEnabled(!1),e.setActive(!1)}),(t=>{e.setEnabled(!o(t)),e.setActive(l(t))})))),b=e=>l.exists((t=>t.locked[e])),g=(t,o)=>l=>u(l,(e=>n(e.element)),(()=>e.queryCommandValue(t)===o)),y=g("mceTableRowType","header"),S=g("mceTableColType","th");return e.on("NodeChange ExecCommand TableSelectorChange",i),{onSetupTable:e=>d(e,(e=>!1)),onSetupCellOrRow:e=>d(e,(e=>n(e.element))),onSetupColumn:e=>t=>d(t,(t=>n(t.element)||b(e))),onSetupPasteable:e=>t=>d(t,(t=>n(t.element)||e().isNone())),onSetupPasteableColumn:(e,t)=>o=>d(o,(o=>n(o.element)||e().isNone()||b(t))),onSetupMergeable:e=>d(e,(e=>r("mergeable"))),onSetupUnmergeable:e=>d(e,(e=>r("unmergeable"))),resetTargets:i,onSetupTableWithCaption:t=>u(t,f,(t=>tt(t.element,Te(e)).exists((e=>ye(e,"caption").isSome())))),onSetupTableRowHeaders:y,onSetupTableColumnHeaders:S,targets:t.get}};var Vl=tinymce.util.Tools.resolve("tinymce.FakeClipboard");const $l=e=>{var t;const o=null!==(t=Vl.read())&&void 0!==t?t:[];return V(o,(t=>w.from(t.getType(e))))},zl=()=>$l("x-tinymce/dom-table-rows"),Wl=()=>$l("x-tinymce/dom-table-columns"),Ul=e=>{const t=jl(e);(e=>{const t=e.options.register;t("table_border_widths",{processor:"object[]",default:xt}),t("table_border_styles",{processor:"object[]",default:At}),t("table_cell_advtab",{processor:"boolean",default:!0}),t("table_row_advtab",{processor:"boolean",default:!0}),t("table_advtab",{processor:"boolean",default:!0}),t("table_appearance_options",{processor:"boolean",default:!0}),t("table_grid",{processor:"boolean",default:!Tt.deviceType.isTouch()}),t("table_cell_class_list",{processor:"object[]",default:[]}),t("table_row_class_list",{processor:"object[]",default:[]}),t("table_class_list",{processor:"object[]",default:[]}),t("table_toolbar",{processor:"string",default:"tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol"}),t("table_background_color_map",{processor:"object[]",default:[]}),t("table_border_color_map",{processor:"object[]",default:[]})})(e),Fl(e),((e,t)=>{const o=t=>()=>e.execCommand(t),l=(t,l)=>!!e.queryCommandSupported(l.command)&&(e.ui.registry.addMenuItem(t,{...l,onAction:i(l.onAction)?l.onAction:o(l.command)}),!0),n=(t,l)=>{e.queryCommandSupported(l.command)&&e.ui.registry.addToggleMenuItem(t,{...l,onAction:i(l.onAction)?l.onAction:o(l.command)})},r=t=>{e.execCommand("mceInsertTable",!1,{rows:t.numRows,columns:t.numColumns})},a=[l("tableinsertrowbefore",{text:"Insert row before",icon:"table-insert-row-above",command:"mceTableInsertRowBefore",onSetup:t.onSetupCellOrRow}),l("tableinsertrowafter",{text:"Insert row after",icon:"table-insert-row-after",command:"mceTableInsertRowAfter",onSetup:t.onSetupCellOrRow}),l("tabledeleterow",{text:"Delete row",icon:"table-delete-row",command:"mceTableDeleteRow",onSetup:t.onSetupCellOrRow}),l("tablerowprops",{text:"Row properties",icon:"table-row-properties",command:"mceTableRowProps",onSetup:t.onSetupCellOrRow}),l("tablecutrow",{text:"Cut row",icon:"cut-row",command:"mceTableCutRow",onSetup:t.onSetupCellOrRow}),l("tablecopyrow",{text:"Copy row",icon:"duplicate-row",command:"mceTableCopyRow",onSetup:t.onSetupCellOrRow}),l("tablepasterowbefore",{text:"Paste row before",icon:"paste-row-before",command:"mceTablePasteRowBefore",onSetup:t.onSetupPasteable(zl)}),l("tablepasterowafter",{text:"Paste row after",icon:"paste-row-after",command:"mceTablePasteRowAfter",onSetup:t.onSetupPasteable(zl)})],s=[l("tableinsertcolumnbefore",{text:"Insert column before",icon:"table-insert-column-before",command:"mceTableInsertColBefore",onSetup:t.onSetupColumn("onFirst")}),l("tableinsertcolumnafter",{text:"Insert column after",icon:"table-insert-column-after",command:"mceTableInsertColAfter",onSetup:t.onSetupColumn("onLast")}),l("tabledeletecolumn",{text:"Delete column",icon:"table-delete-column",command:"mceTableDeleteCol",onSetup:t.onSetupColumn("onAny")}),l("tablecutcolumn",{text:"Cut column",icon:"cut-column",command:"mceTableCutCol",onSetup:t.onSetupColumn("onAny")}),l("tablecopycolumn",{text:"Copy column",icon:"duplicate-column",command:"mceTableCopyCol",onSetup:t.onSetupColumn("onAny")}),l("tablepastecolumnbefore",{text:"Paste column before",icon:"paste-column-before",command:"mceTablePasteColBefore",onSetup:t.onSetupPasteableColumn(Wl,"onFirst")}),l("tablepastecolumnafter",{text:"Paste column after",icon:"paste-column-after",command:"mceTablePasteColAfter",onSetup:t.onSetupPasteableColumn(Wl,"onLast")})],c=[l("tablecellprops",{text:"Cell properties",icon:"table-cell-properties",command:"mceTableCellProps",onSetup:t.onSetupCellOrRow}),l("tablemergecells",{text:"Merge cells",icon:"table-merge-cells",command:"mceTableMergeCells",onSetup:t.onSetupMergeable}),l("tablesplitcells",{text:"Split cell",icon:"table-split-cells",command:"mceTableSplitCells",onSetup:t.onSetupUnmergeable})];Et(e)?e.ui.registry.addNestedMenuItem("inserttable",{text:"Table",icon:"table",getSubmenuItems:()=>[{type:"fancymenuitem",fancytype:"inserttable",onAction:r}]}):e.ui.registry.addMenuItem("inserttable",{text:"Table",icon:"table",onAction:o("mceInsertTableDialog")}),e.ui.registry.addMenuItem("inserttabledialog",{text:"Insert table",icon:"table",onAction:o("mceInsertTableDialog")}),l("tableprops",{text:"Table properties",onSetup:t.onSetupTable,command:"mceTableProps"}),l("deletetable",{text:"Delete table",icon:"table-delete-table",onSetup:t.onSetupTable,command:"mceTableDelete"}),M(a,!0)&&e.ui.registry.addNestedMenuItem("row",{type:"nestedmenuitem",text:"Row",getSubmenuItems:u("tableinsertrowbefore tableinsertrowafter tabledeleterow tablerowprops | tablecutrow tablecopyrow tablepasterowbefore tablepasterowafter")}),M(s,!0)&&e.ui.registry.addNestedMenuItem("column",{type:"nestedmenuitem",text:"Column",getSubmenuItems:u("tableinsertcolumnbefore tableinsertcolumnafter tabledeletecolumn | tablecutcolumn tablecopycolumn tablepastecolumnbefore tablepastecolumnafter")}),M(c,!0)&&e.ui.registry.addNestedMenuItem("cell",{type:"nestedmenuitem",text:"Cell",getSubmenuItems:u("tablecellprops tablemergecells tablesplitcells")}),e.ui.registry.addContextMenu("table",{update:()=>(t.resetTargets(),t.targets().fold(u(""),(e=>"caption"===J(e.element)?"tableprops deletetable":"cell row column | advtablesort | tableprops deletetable")))});const m=Jo(Ht(e));0!==m.length&&e.queryCommandSupported("mceTableToggleClass")&&e.ui.registry.addNestedMenuItem("tableclass",{icon:"table-classes",text:"Table styles",getSubmenuItems:()=>Go(e,m,"tableclass",(t=>e.execCommand("mceTableToggleClass",!1,t))),onSetup:t.onSetupTable});const d=Jo(qt(e));0!==d.length&&e.queryCommandSupported("mceTableCellToggleClass")&&e.ui.registry.addNestedMenuItem("tablecellclass",{icon:"table-cell-classes",text:"Cell styles",getSubmenuItems:()=>Go(e,d,"tablecellclass",(t=>e.execCommand("mceTableCellToggleClass",!1,t))),onSetup:t.onSetupCellOrRow}),e.queryCommandSupported("mceTableApplyCellStyle")&&(e.ui.registry.addNestedMenuItem("tablecellvalign",{icon:"vertical-align",text:"Vertical align",getSubmenuItems:()=>Go(e,Io,"tablecellverticalalign",Ko(e,"vertical-align")),onSetup:t.onSetupCellOrRow}),e.ui.registry.addNestedMenuItem("tablecellborderwidth",{icon:"border-width",text:"Border width",getSubmenuItems:()=>Go(e,It(e),"tablecellborderwidth",Ko(e,"border-width")),onSetup:t.onSetupCellOrRow}),e.ui.registry.addNestedMenuItem("tablecellborderstyle",{icon:"border-style",text:"Border style",getSubmenuItems:()=>Go(e,Mt(e),"tablecellborderstyle",Ko(e,"border-style")),onSetup:t.onSetupCellOrRow}),e.ui.registry.addNestedMenuItem("tablecellbackgroundcolor",{icon:"cell-background-color",text:"Background color",getSubmenuItems:()=>Xo(e,Vt(e),"background-color"),onSetup:t.onSetupCellOrRow}),e.ui.registry.addNestedMenuItem("tablecellbordercolor",{icon:"cell-border-color",text:"Border color",getSubmenuItems:()=>Xo(e,$t(e),"border-color"),onSetup:t.onSetupCellOrRow})),n("tablecaption",{icon:"table-caption",text:"Table caption",command:"mceTableToggleCaption",onSetup:t.onSetupTableWithCaption}),n("tablerowheader",{text:"Row header",icon:"table-top-header",command:"mceTableRowType",onAction:Yo(e),onSetup:t.onSetupTableRowHeaders}),n("tablecolheader",{text:"Column header",icon:"table-left-header",command:"mceTableColType",onAction:Zo(e),onSetup:t.onSetupTableRowHeaders})})(e,t),((e,t)=>{e.ui.registry.addMenuButton("table",{tooltip:"Table",icon:"table",fetch:e=>e("inserttable | cell row column | advtablesort | tableprops deletetable")});const o=t=>()=>e.execCommand(t),l=(t,l)=>{e.queryCommandSupported(l.command)&&e.ui.registry.addButton(t,{...l,onAction:i(l.onAction)?l.onAction:o(l.command)})},n=(t,l)=>{e.queryCommandSupported(l.command)&&e.ui.registry.addToggleButton(t,{...l,onAction:i(l.onAction)?l.onAction:o(l.command)})};l("tableprops",{tooltip:"Table properties",command:"mceTableProps",icon:"table",onSetup:t.onSetupTable}),l("tabledelete",{tooltip:"Delete table",command:"mceTableDelete",icon:"table-delete-table",onSetup:t.onSetupTable}),l("tablecellprops",{tooltip:"Cell properties",command:"mceTableCellProps",icon:"table-cell-properties",onSetup:t.onSetupCellOrRow}),l("tablemergecells",{tooltip:"Merge cells",command:"mceTableMergeCells",icon:"table-merge-cells",onSetup:t.onSetupMergeable}),l("tablesplitcells",{tooltip:"Split cell",command:"mceTableSplitCells",icon:"table-split-cells",onSetup:t.onSetupUnmergeable}),l("tableinsertrowbefore",{tooltip:"Insert row before",command:"mceTableInsertRowBefore",icon:"table-insert-row-above",onSetup:t.onSetupCellOrRow}),l("tableinsertrowafter",{tooltip:"Insert row after",command:"mceTableInsertRowAfter",icon:"table-insert-row-after",onSetup:t.onSetupCellOrRow}),l("tabledeleterow",{tooltip:"Delete row",command:"mceTableDeleteRow",icon:"table-delete-row",onSetup:t.onSetupCellOrRow}),l("tablerowprops",{tooltip:"Row properties",command:"mceTableRowProps",icon:"table-row-properties",onSetup:t.onSetupCellOrRow}),l("tableinsertcolbefore",{tooltip:"Insert column before",command:"mceTableInsertColBefore",icon:"table-insert-column-before",onSetup:t.onSetupColumn("onFirst")}),l("tableinsertcolafter",{tooltip:"Insert column after",command:"mceTableInsertColAfter",icon:"table-insert-column-after",onSetup:t.onSetupColumn("onLast")}),l("tabledeletecol",{tooltip:"Delete column",command:"mceTableDeleteCol",icon:"table-delete-column",onSetup:t.onSetupColumn("onAny")}),l("tablecutrow",{tooltip:"Cut row",command:"mceTableCutRow",icon:"cut-row",onSetup:t.onSetupCellOrRow}),l("tablecopyrow",{tooltip:"Copy row",command:"mceTableCopyRow",icon:"duplicate-row",onSetup:t.onSetupCellOrRow}),l("tablepasterowbefore",{tooltip:"Paste row before",command:"mceTablePasteRowBefore",icon:"paste-row-before",onSetup:t.onSetupPasteable(zl)}),l("tablepasterowafter",{tooltip:"Paste row after",command:"mceTablePasteRowAfter",icon:"paste-row-after",onSetup:t.onSetupPasteable(zl)}),l("tablecutcol",{tooltip:"Cut column",command:"mceTableCutCol",icon:"cut-column",onSetup:t.onSetupColumn("onAny")}),l("tablecopycol",{tooltip:"Copy column",command:"mceTableCopyCol",icon:"duplicate-column",onSetup:t.onSetupColumn("onAny")}),l("tablepastecolbefore",{tooltip:"Paste column before",command:"mceTablePasteColBefore",icon:"paste-column-before",onSetup:t.onSetupPasteableColumn(Wl,"onFirst")}),l("tablepastecolafter",{tooltip:"Paste column after",command:"mceTablePasteColAfter",icon:"paste-column-after",onSetup:t.onSetupPasteableColumn(Wl,"onLast")}),l("tableinsertdialog",{tooltip:"Insert table",command:"mceInsertTableDialog",icon:"table"});const r=Jo(Ht(e));0!==r.length&&e.queryCommandSupported("mceTableToggleClass")&&e.ui.registry.addMenuButton("tableclass",{icon:"table-classes",tooltip:"Table styles",fetch:Qo(e,r,"tableclass",(t=>e.execCommand("mceTableToggleClass",!1,t))),onSetup:t.onSetupTable});const a=Jo(qt(e));0!==a.length&&e.queryCommandSupported("mceTableCellToggleClass")&&e.ui.registry.addMenuButton("tablecellclass",{icon:"table-cell-classes",tooltip:"Cell styles",fetch:Qo(e,a,"tablecellclass",(t=>e.execCommand("mceTableCellToggleClass",!1,t))),onSetup:t.onSetupCellOrRow}),e.queryCommandSupported("mceTableApplyCellStyle")&&(e.ui.registry.addMenuButton("tablecellvalign",{icon:"vertical-align",tooltip:"Vertical align",fetch:Qo(e,Io,"tablecellverticalalign",Ko(e,"vertical-align")),onSetup:t.onSetupCellOrRow}),e.ui.registry.addMenuButton("tablecellborderwidth",{icon:"border-width",tooltip:"Border width",fetch:Qo(e,It(e),"tablecellborderwidth",Ko(e,"border-width")),onSetup:t.onSetupCellOrRow}),e.ui.registry.addMenuButton("tablecellborderstyle",{icon:"border-style",tooltip:"Border style",fetch:Qo(e,Mt(e),"tablecellborderstyle",Ko(e,"border-style")),onSetup:t.onSetupCellOrRow}),e.ui.registry.addMenuButton("tablecellbackgroundcolor",{icon:"cell-background-color",tooltip:"Background color",fetch:t=>t(Xo(e,Vt(e),"background-color")),onSetup:t.onSetupCellOrRow}),e.ui.registry.addMenuButton("tablecellbordercolor",{icon:"cell-border-color",tooltip:"Border color",fetch:t=>t(Xo(e,$t(e),"border-color")),onSetup:t.onSetupCellOrRow})),n("tablecaption",{tooltip:"Table caption",icon:"table-caption",command:"mceTableToggleCaption",onSetup:t.onSetupTableWithCaption}),n("tablerowheader",{tooltip:"Row header",icon:"table-top-header",command:"mceTableRowType",onAction:Yo(e),onSetup:t.onSetupTableRowHeaders}),n("tablecolheader",{tooltip:"Column header",icon:"table-left-header",command:"mceTableColType",onAction:Zo(e),onSetup:t.onSetupTableColumnHeaders})})(e,t),(e=>{const t=t=>e.dom.is(t,"table")&&e.getBody().contains(t),o=jt(e);o.length>0&&e.ui.registry.addContextToolbar("table",{predicate:t,items:o,scope:"node",position:"node"})})(e)};e.add("table",Ul)}()})); ;/*!node_modules/tinymce/plugins/table/index.js*/ amis.define("95a0193",(function(a,i,n,d){a("8a702d6")})); ;/*!node_modules/tinymce/plugins/help/plugin.js*/ amis.define("9a4dd85",(function(e,t,n,a){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");let t=0;const n=e=>{const n=(new Date).getTime(),a=Math.floor(1e9*Math.random());return t++,e+"_"+a+t+String(n)},a=e=>t=>t.options.get(e),o=a("help_tabs"),i=a("forced_plugins"),r=(s="string",e=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=a=e,(o=String).prototype.isPrototypeOf(n)||(null===(i=a.constructor)||void 0===i?void 0:i.name)===o.name)?"string":t;var n,a,o,i})(e)===s);var s;const l=(c=void 0,e=>c===e);var c;const u=(e=>t=>typeof t===e)("function"),m=(h=!1,()=>h);var h;class p{constructor(e,t){this.tag=e,this.value=t}static some(e){return new p(!0,e)}static none(){return p.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?p.some(e(this.value)):p.none()}bind(e){return this.tag?e(this.value):p.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:p.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return(e=>null==e)(e)?p.none():p.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}p.singletonNone=new p(!1);const d=Array.prototype.slice,g=Array.prototype.indexOf,y=(e,t)=>((e,t)=>g.call(e,t))(e,t)>-1,b=(e,t)=>{const n=e.length,a=new Array(n);for(let o=0;o<n;o++){const n=e[o];a[o]=t(n,o)}return a},v=(e,t)=>{const n=[];for(let a=0,o=e.length;a<o;a++){const o=e[a];t(o,a)&&n.push(o)}return n},k=(e,t)=>((e,t,n)=>{for(let a=0,o=e.length;a<o;a++){const o=e[a];if(t(o,a))return p.some(o);if(n(o,a))break}return p.none()})(e,t,m),f=(e,t)=>{const n=d.call(e,0);return n.sort(t),n},w=Object.keys,A=Object.hasOwnProperty,T=(e,t)=>A.call(e,t);var x=tinymce.util.Tools.resolve("tinymce.Env");const C=e=>{const t=x.os.isMacOS()||x.os.isiOS(),n=t?{alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"}:{meta:"Ctrl ",access:"Shift + Alt "},a=e.split("+"),o=b(a,(e=>{const t=e.toLowerCase().trim();return T(n,t)?n[t]:e}));return t?o.join("").replace(/\s/,""):o.join("+")},M=[{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:"Heading 1"},{shortcuts:["Access + 2"],action:"Heading 2"},{shortcuts:["Access + 3"],action:"Heading 3"},{shortcuts:["Access + 4"],action:"Heading 4"},{shortcuts:["Access + 5"],action:"Heading 5"},{shortcuts:["Access + 6"],action:"Heading 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"}],S=()=>({name:"shortcuts",title:"Handy Shortcuts",items:[{type:"table",header:["Action","Shortcut"],cells:b(M,(e=>{const t=b(e.shortcuts,C).join(" or ");return[e.action,t]}))}]});var F=tinymce.util.Tools.resolve("tinymce.util.I18n");const O=b([{key:"advlist",name:"Advanced List"},{key:"anchor",name:"Anchor"},{key:"autolink",name:"Autolink"},{key:"autoresize",name:"Autoresize"},{key:"autosave",name:"Autosave"},{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:"fullscreen",name:"Full Screen"},{key:"help",name:"Help"},{key:"image",name:"Image"},{key:"importcss",name:"Import CSS"},{key:"insertdatetime",name:"Insert Date/Time"},{key:"link",name:"Link"},{key:"lists",name:"Lists"},{key:"media",name:"Media"},{key:"nonbreaking",name:"Nonbreaking"},{key:"pagebreak",name:"Page Break"},{key:"preview",name:"Preview"},{key:"quickbars",name:"Quick Toolbars"},{key:"save",name:"Save"},{key:"searchreplace",name:"Search and Replace"},{key:"table",name:"Table"},{key:"template",name:"Template"},{key:"textcolor",name:"Text Color"},{key:"visualblocks",name:"Visual Blocks"},{key:"visualchars",name:"Visual Characters"},{key:"wordcount",name:"Word Count"},{key:"a11ychecker",name:"Accessibility Checker",type:"premium"},{key:"advcode",name:"Advanced Code Editor",type:"premium"},{key:"advtable",name:"Advanced Tables",type:"premium"},{key:"advtemplate",name:"Advanced Templates",type:"premium",slug:"advanced-templates"},{key:"casechange",name:"Case Change",type:"premium"},{key:"checklist",name:"Checklist",type:"premium"},{key:"editimage",name:"Enhanced Image Editing",type:"premium"},{key:"footnotes",name:"Footnotes",type:"premium"},{key:"typography",name:"Advanced Typography",type:"premium",slug:"advanced-typography"},{key:"mediaembed",name:"Enhanced Media Embed",type:"premium",slug:"introduction-to-mediaembed"},{key:"export",name:"Export",type:"premium"},{key:"formatpainter",name:"Format Painter",type:"premium"},{key:"inlinecss",name:"Inline CSS",type:"premium",slug:"inline-css"},{key:"linkchecker",name:"Link Checker",type:"premium"},{key:"mentions",name:"Mentions",type:"premium"},{key:"mergetags",name:"Merge Tags",type:"premium"},{key:"pageembed",name:"Page Embed",type:"premium"},{key:"permanentpen",name:"Permanent Pen",type:"premium"},{key:"powerpaste",name:"PowerPaste",type:"premium",slug:"introduction-to-powerpaste"},{key:"rtc",name:"Real-Time Collaboration",type:"premium",slug:"rtc-introduction"},{key:"tinymcespellchecker",name:"Spell Checker Pro",type:"premium",slug:"introduction-to-tiny-spellchecker"},{key:"autocorrect",name:"Spelling Autocorrect",type:"premium"},{key:"tableofcontents",name:"Table of Contents",type:"premium"},{key:"tinycomments",name:"Tiny Comments",type:"premium",slug:"introduction-to-tiny-comments"},{key:"tinydrive",name:"Tiny Drive",type:"premium",slug:"tinydrive-introduction"}],(e=>({...e,type:e.type||"opensource",slug:e.slug||e.key}))),P=e=>{const t=e=>`<a href="${e.url}" target="_blank" rel="noopener">${e.name}</a>`,n=(e,n)=>k(O,(e=>e.key===n)).fold((()=>((e,n)=>{const a=e.plugins[n].getMetadata;if(u(a)){const e=a();return{name:e.name,html:t(e)}}return{name:n,html:n}})(e,n)),(e=>{const n="premium"===e.type?`${e.name}*`:e.name;return{name:n,html:t({name:n,url:`https://www.tiny.cloud/docs/tinymce/6/${e.slug}/`})}})),a=e=>{const t=(e=>{const t=w(e.plugins),n=i(e);return l(n)?t:v(t,(e=>!y(n,e)))})(e),a=f(b(t,(t=>n(e,t))),((e,t)=>e.name.localeCompare(t.name))),o=b(a,(e=>"<li>"+e.html+"</li>")),r=o.length,s=o.join("");return"<p><b>"+F.translate(["Plugins installed ({0}):",r])+"</b></p><ul>"+s+"</ul>"},o={type:"htmlpanel",presets:"document",html:[(e=>null==e?"":'<div data-mce-tabstop="1" tabindex="-1">'+a(e)+"</div>")(e),(()=>{const e=v(O,(({type:e})=>"premium"===e)),t=f(b(e,(e=>e.name)),((e,t)=>e.localeCompare(t))),n=b(t,(e=>`<li>${e}</li>`)).join("");return'<div data-mce-tabstop="1" tabindex="-1"><p><b>'+F.translate("Premium plugins:")+"</b></p><ul>"+n+'<li class="tox-help__more-link" "><a href="https://www.tiny.cloud/pricing/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" rel="noopener" target="_blank">'+F.translate("Learn more...")+"</a></li></ul></div>"})()].join("")};return{name:"plugins",title:"Plugins",items:[o]}};var I=tinymce.util.Tools.resolve("tinymce.EditorManager");const _=(e,t)=>{const a=S(),i={name:"keyboardnav",title:"Keyboard Navigation",items:[{type:"htmlpanel",presets:"document",html:"<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 ⌥F9 (MacOS)</li>\n <li>Focus the toolbar: Alt + F10 (Windows) or ⌥F10 (MacOS)</li>\n <li>Focus the footer: Alt + F11 (Windows) or ⌥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 <li>the editor resize handle 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 ⌃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 tab’s 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>"}]},s=P(e),l=(()=>{var e,t;const n='<a href="https://www.tiny.cloud/docs/tinymce/6/changelog/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" rel="noopener" target="_blank">TinyMCE '+(e=I.majorVersion,t=I.minorVersion,(0===e.indexOf("@")?"X.X.X":e+"."+t)+"</a>");return{name:"versions",title:"Version",items:[{type:"htmlpanel",html:"<p>"+F.translate(["You are using {0}",n])+"</p>",presets:"document"}]}})(),c={[a.name]:a,[i.name]:i,[s.name]:s,[l.name]:l,...t.get()};return p.from(o(e)).fold((()=>(e=>{const t=w(e),n=t.indexOf("versions");return-1!==n&&(t.splice(n,1),t.push("versions")),{tabs:e,names:t}})(c)),(e=>((e,t)=>{const a={},o=b(e,(e=>{var o;if(r(e))return T(t,e)&&(a[e]=t[e]),e;{const t=null!==(o=e.name)&&void 0!==o?o:n("tab-name");return a[t]=e,t}}));return{tabs:a,names:o}})(e,c)))},E=(e,t)=>()=>{const{tabs:n,names:a}=_(e,t),o={type:"tabpanel",tabs:(e=>{const t=[],n=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(n);return t})(b(a,(e=>{return T(t=n,a=e)?p.from(t[a]):p.none();var t,a})))};e.windowManager.open({title:"Help",size:"normal",body:o,buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{}})};e.add("help",(e=>{const t=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})({}),a=(e=>({addTab:t=>{var a;const o=null!==(a=t.name)&&void 0!==a?a:n("tab-name"),i=e.get();i[o]=t,e.set(i)}}))(t);(e=>{(0,e.options.register)("help_tabs",{processor:"array"})})(e);const o=E(e,t);return((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})})(e,o),((e,t)=>{e.addCommand("mceHelp",t)})(e,o),e.shortcuts.add("Alt+0","Open help dialog","mceHelp"),a}))}()})); ;/*!node_modules/tinymce/plugins/help/index.js*/ amis.define("6109de0",(function(d,e,i,n){d("9a4dd85")})); ;/*!node_modules/tinymce/plugins/wordcount/plugin.js*/ amis.define("8df0887",(function(t,e,n,o){!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=(n=null,t=>n===t);var n;const o=t=>t,r={aletter:"[A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-׳ؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆༀཀ-ཇཉ-ཬྈ-ྌႠ-Ⴥა-ჺჼᄀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᯀ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⒶ-ⓩⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⴀ-ⴥⴰ-ⵥⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〻〼ㄅ-ㄭㄱ-ㆎㆠ-ㆺꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐꞑꞠ-ꞩꟺ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]",midnumlet:"[-'\\.‘’․﹒'.]",midletter:"[:··״‧︓﹕:]",midnum:"[±+*/,;;։،؍٬߸⁄︐︔﹐﹔,;]",numeric:"[0-9٠-٩٫۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹]",cr:"\\r",lf:"\\n",newline:"[\v\f \u2028\u2029]",extend:"[̀-ͯ҃-҉֑-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ऀ-ःऺ-़ा-ॏ॑-ॗॢॣঁ-ঃ়া-ৄেৈো-্ৗৢৣਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑੰੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣஂா-ூெ-ைொ-்ௗఁ-ఃా-ౄె-ైొ-్ౕౖౢౣಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣംഃാ-ൄെ-ൈൊ-്ൗൢൣංඃ්ා-ුූෘ-ෟෲෳัิ-ฺ็-๎ັິ-ູົຼ່-ໍ༹༘༙༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏႚ-ႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳា-៓៝᠋-᠍ᢩᤠ-ᤫᤰ-᤻ᦰ-ᧀᧈᧉᨗ-ᨛᩕ-ᩞ᩠-᩿᩼ᬀ-ᬄ᬴-᭄᭫-᭳ᮀ-ᮂᮡ-᯦᮪-᯳ᰤ-᰷᳐-᳔᳒-᳨᳭ᳲ᷀-ᷦ᷼-᷿⃐-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꙯-꙲꙼꙽꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣠-꣱ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀ꨩ-ꨶꩃꩌꩍꩻꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꯣ-ꯪ꯬꯭ﬞ︀-️︠-゙゚︦]",format:"[-឴឵---\ufeff-]",katakana:"[〱-〵゛゜゠-ヺー-ヿㇰ-ㇿ㋐-㋾㌀-㍗ヲ-ン]",extendnumlet:"[=_‿⁀⁔︳︴﹍-﹏_∀-⋿<>]",punctuation:"[!-#%-*,-\\/:;?@\\[-\\]_{}¡«·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰෴๏๚๛༄-༒༺-༽྅࿐-࿔࿙࿚၊-၏჻፡-፨᐀᙭᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰⸱、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!-#%-*,-/:;?@[-]_{}⦅-・]"},c=0,u=1,a=2,l=3,i=4,s=5,d=6,g=7,p=8,h=9,m=10,C=11,f=12,y=13,w=[new RegExp(r.aletter),new RegExp(r.midnumlet),new RegExp(r.midletter),new RegExp(r.midnum),new RegExp(r.numeric),new RegExp(r.cr),new RegExp(r.lf),new RegExp(r.newline),new RegExp(r.extend),new RegExp(r.format),new RegExp(r.katakana),new RegExp(r.extendnumlet),new RegExp("@")],x=new RegExp("^"+r.punctuation+"$"),W=w,E=y,R=t=>{let e=E;const n=W.length;for(let o=0;o<n;++o){const n=W[o];if(n&&n.test(t)){e=o;break}}return e},S=t=>((t,e)=>{const n=t.length,o=new Array(n);for(let r=0;r<n;r++){const n=t[r];o[r]=e(n,r)}return o})(t,(t=>{const e={};return n=>{if(e[n])return e[n];{const o=t(n);return e[n]=o,o}}})(R)),b=(t,e)=>{const n=t[e],o=t[e+1];if(e<0||e>t.length-1&&0!==e)return!1;if(n===c&&o===c)return!1;const r=t[e+2];if(n===c&&(o===a||o===u||o===f)&&r===c)return!1;const y=t[e-1];return(n!==a&&n!==u&&o!==f||o!==c||y!==c)&&((n!==i&&n!==c||o!==i&&o!==c)&&((n!==l&&n!==u||o!==i||y!==i)&&((n!==i||o!==l&&o!==u||r!==i)&&(n!==p&&n!==h&&y!==p&&y!==h&&o!==p&&o!==h&&((n!==s||o!==d)&&(n===g||n===s||n===d||(o===g||o===s||o===d||(n!==m||o!==m)&&((o!==C||n!==c&&n!==i&&n!==m&&n!==C)&&((n!==C||o!==c&&o!==i&&o!==m)&&n!==f)))))))))},v=/^\s+$/,k=x,F=t=>"http"===t||"https"===t,T=(t,e)=>{const n=((t,e)=>{let n;for(n=e;n<t.length&&!v.test(t[n]);n++);return n})(t,e+1);return"://"===t.slice(e+1,n).join("").substr(0,3)?n:e},A=(t,e,n)=>{n={includeWhitespace:!1,includePunctuation:!1,...n};const o=[],r=[];for(let n=0;n<t.length;n++){const c=e(t[n]);"\ufeff"!==c&&(o.push(t[n]),r.push(c))}return((t,e,n,o)=>{const r=[];let c=[];for(let u=0;u<n.length;++u)if(c.push(t[u]),b(n,u)){const n=e[u];if((o.includeWhitespace||!v.test(n))&&(o.includePunctuation||!k.test(n))){const n=u-c.length+1,o=u+1,a=e.slice(n,o).join("");if(F(a)){const n=T(e,u),r=t.slice(o,n);Array.prototype.push.apply(c,r),u=n}r.push(c)}c=[]}return r})(o,r,S(r),n)};var B=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker");const D=(t,e)=>{const n=e.getBlockElements(),o=e.getVoidElements(),r=t=>n[t.nodeName]||o[t.nodeName],c=[];let u="";const a=new B(t,t);let l;for(;l=a.next();)3===l.nodeType?u+=l.data.replace(/\uFEFF/g,""):r(l)&&u.length&&(c.push(u),u="");return u.length&&c.push(u),c},j=t=>t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length,U=(t,e)=>{const n=(t=>t.replace(/\u200B/g,""))(D(t,e).join("\n"));return A(n.split(""),o).length},M=(t,e)=>{const n=D(t,e).join("");return j(n)},P=(t,e)=>{const n=D(t,e).join("").replace(/\s/g,"");return j(n)},_=(t,e)=>()=>e(t.getBody(),t.schema),N=(t,e)=>()=>e(t.selection.getRng().cloneContents(),t.schema),V=t=>_(t,U),$=(t,e)=>{t.addCommand("mceWordCount",(()=>((t,e)=>{t.windowManager.open({title:"Word Count",body:{type:"panel",items:[{type:"table",header:["Count","Document","Selection"],cells:[["Words",String(e.body.getWordCount()),String(e.selection.getWordCount())],["Characters (no spaces)",String(e.body.getCharacterCountWithoutSpaces()),String(e.selection.getCharacterCountWithoutSpaces())],["Characters",String(e.body.getCharacterCount()),String(e.selection.getCharacterCount())]]}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}]})})(t,e)))};var z=tinymce.util.Tools.resolve("tinymce.util.Delay");const I=(t,e)=>{((t,e)=>{t.dispatch("wordCountUpdate",{wordCount:{words:e.body.getWordCount(),characters:e.body.getCharacterCount(),charactersWithoutSpaces:e.body.getCharacterCountWithoutSpaces()}})})(t,e)},Z=(t,n,o)=>{const r=((t,n)=>{let o=null;return{cancel:()=>{e(o)||(clearTimeout(o),o=null)},throttle:(...r)=>{e(o)&&(o=setTimeout((()=>{o=null,t.apply(null,r)}),n))}}})((()=>I(t,n)),o);t.on("init",(()=>{I(t,n),z.setEditorTimeout(t,(()=>{t.on("SetContent BeforeAddUndo Undo Redo ViewUpdate keyup",r.throttle)}),0),t.on("remove",r.cancel)}))};((e=300)=>{t.add("wordcount",(t=>{const n=(t=>({body:{getWordCount:V(t),getCharacterCount:_(t,M),getCharacterCountWithoutSpaces:_(t,P)},selection:{getWordCount:N(t,U),getCharacterCount:N(t,M),getCharacterCountWithoutSpaces:N(t,P)},getCount:V(t)}))(t);return $(t,n),(t=>{const e=()=>t.execCommand("mceWordCount");t.ui.registry.addButton("wordcount",{tooltip:"Word count",icon:"character-count",onAction:e}),t.ui.registry.addMenuItem("wordcount",{text:"Word count",icon:"character-count",onAction:e})})(t),Z(t,n,e),n}))})()}()})); ;/*!node_modules/tinymce/plugins/wordcount/index.js*/ amis.define("80ffbcc",(function(f,c,i,n){f("8df0887")})); ;/*!node_modules/tinymce/plugins/pagebreak/plugin.js*/ amis.define("275203d",(function(e,a,t,r){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.Env");const t=e=>a=>a.options.get(e),r=t("pagebreak_separator"),n=t("pagebreak_split_block"),o="mce-pagebreak",s=e=>{const t=`<img src="${a.transparentSrc}" class="mce-pagebreak" data-mce-resize="false" data-mce-placeholder />`;return e?`<p>${t}</p>`:t};e.add("pagebreak",(e=>{(e=>{const a=e.options.register;a("pagebreak_separator",{processor:"string",default:"\x3c!-- pagebreak --\x3e"}),a("pagebreak_split_block",{processor:"boolean",default:!1})})(e),(e=>{e.addCommand("mcePageBreak",(()=>{e.insertContent(s(n(e)))}))})(e),(e=>{const a=()=>e.execCommand("mcePageBreak");e.ui.registry.addButton("pagebreak",{icon:"page-break",tooltip:"Page break",onAction:a}),e.ui.registry.addMenuItem("pagebreak",{text:"Page break",icon:"page-break",onAction:a})})(e),(e=>{const a=r(e),t=()=>n(e),c=new RegExp(a.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,(e=>"\\"+e)),"gi");e.on("BeforeSetContent",(e=>{e.content=e.content.replace(c,s(t()))})),e.on("PreInit",(()=>{e.serializer.addNodeFilter("img",(r=>{let n,s,c=r.length;for(;c--;)if(n=r[c],s=n.attr("class"),s&&-1!==s.indexOf(o)){const r=n.parent;if(r&&e.schema.getBlockElements()[r.name]&&t()){r.type=3,r.value=a,r.raw=!0,n.remove();continue}n.type=3,n.value=a,n.raw=!0}}))}))})(e),(e=>{e.on("ResolveName",(a=>{"IMG"===a.target.nodeName&&e.dom.hasClass(a.target,o)&&(a.name="pagebreak")}))})(e)}))}()})); ;/*!node_modules/tinymce/plugins/pagebreak/index.js*/ amis.define("67f6576",(function(f,i,n,d){f("275203d")})); ;/*!node_modules/tinymce/plugins/visualchars/plugin.js*/ amis.define("66163ee",(function(t,e,o,n){!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=t=>e=>(t=>{const e=typeof t;return null===t?"null":"object"===e&&Array.isArray(t)?"array":"object"===e&&(o=r=t,n=(s=String).prototype,n.isPrototypeOf(o)||(null===(a=r.constructor)||void 0===a?void 0:a.name)===s.name)?"string":e;var o,n;var r,s,a})(e)===t,o=t=>e=>typeof e===t,n=e("string"),r=e("object"),s=(a=null,t=>a===t);var a;const i=o("boolean"),l=o("number");class u{constructor(t,e){this.tag=t,this.value=e}static some(t){return new u(!0,t)}static none(){return u.singletonNone}fold(t,e){return this.tag?e(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?u.some(t(this.value)):u.none()}bind(t){return this.tag?t(this.value):u.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:u.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(null!=t?t:"Called getOrDie on None")}static from(t){return(t=>null==t)(t)?u.none():u.some(t)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}u.singletonNone=new u(!1);const c=(t,e)=>{for(let o=0,n=t.length;o<n;o++){e(t[o],o)}},d=Object.keys,m=(t,e)=>{const o=d(t);for(let n=0,r=o.length;n<r;n++){const r=o[n];e(t[r],r)}},h="undefined"!=typeof window?window:Function("return this;")(),g=(t,e)=>((t,e)=>{let o=null!=e?e:h;for(let e=0;e<t.length&&null!=o;++e)o=o[t[e]];return o})(t.split("."),e),v=(t,e)=>{const o=((t,e)=>g(t,e))(t,e);if(null==o)throw new Error(t+" not available on this browser");return o},f=Object.getPrototypeOf,p=t=>{const e=g("ownerDocument.defaultView",t);return r(t)&&((t=>v("HTMLElement",t))(e).prototype.isPrototypeOf(t)||/^HTML\w*Element$/.test(f(t).constructor.name))},w=t=>t.dom.nodeValue,b=t=>e=>(t=>t.dom.nodeType)(e)===t,y=t=>N(t)&&p(t.dom),N=b(1),T=b(3),A=(t,e,o)=>{((t,e,o)=>{if(!(n(o)||i(o)||l(o)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",o,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,o+"")})(t.dom,e,o)},E=(t,e)=>{t.dom.removeAttribute(e)},k=(t,e)=>{const o=((t,e)=>{const o=t.dom.getAttribute(e);return null===o?void 0:o})(t,e);return void 0===o||""===o?[]:o.split(" ")},C=t=>void 0!==t.dom.classList,O=(t,e)=>((t,e,o)=>{const n=k(t,e).concat([o]);return A(t,e,n.join(" ")),!0})(t,"class",e),L=(t,e)=>((t,e,o)=>{const n=((t,e)=>{const o=[];for(let n=0,r=t.length;n<r;n++){const r=t[n];e(r,n)&&o.push(r)}return o})(k(t,e),(t=>t!==o));return n.length>0?A(t,e,n.join(" ")):E(t,e),!1})(t,"class",e),D=t=>{const e=C(t)?t.dom.classList:(t=>k(t,"class"))(t);0===e.length&&E(t,"class")},V=t=>{if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}},j={fromHtml:(t,e)=>{const o=(e||document).createElement("div");if(o.innerHTML=t,!o.hasChildNodes()||o.childNodes.length>1){const e="HTML does not have a single root node";throw console.error(e,t),new Error(e)}return V(o.childNodes[0])},fromTag:(t,e)=>{const o=(e||document).createElement(t);return V(o)},fromText:(t,e)=>{const o=(e||document).createTextNode(t);return V(o)},fromDom:V,fromPoint:(t,e,o)=>u.from(t.dom.elementFromPoint(e,o)).map(V)},B={" ":"nbsp","":"shy"},S=(t,e)=>{let o="";return m(t,((t,e)=>{o+=e})),new RegExp("["+o+"]",e?"g":"")},x=S(B),M=S(B,!0),P=(t=>{let e="";return m(t,(t=>{e&&(e+=","),e+="span.mce-"+t})),e})(B),H="mce-nbsp",_=t=>t.dom.contentEditable,F=t=>'<span data-mce-bogus="1" class="mce-'+B[t]+'">'+t+"</span>",I=t=>"span"===t.nodeName.toLowerCase()&&t.classList.contains("mce-nbsp-wrap"),$=t=>{const e=w(t);return T(t)&&n(e)&&x.test(e)},K=(t,e,o)=>{let n=[];const r=((t,e)=>{const o=t.length,n=new Array(o);for(let r=0;r<o;r++){const o=t[r];n[r]=e(o,r)}return n})(t.dom.childNodes,j.fromDom),s=t=>I(t.dom)||!(t=>y(t)&&"false"===_(t))(t);return c(r,(t=>{o&&s(t)&&e(t)&&(n=n.concat([t])),n=n.concat(K(t,e,((t,e)=>{if(y(t)&&!I(t.dom)){const e=_(t);if("true"===e)return!0;if("false"===e)return!1}return e})(t,o)))})),n},R=(t,e)=>{const o=t.dom,n=K(j.fromDom(e),$,t.dom.isEditable(e));c(n,(e=>{var n;const r=e.dom.parentNode;if(I(r))s=j.fromDom(r),a=H,C(s)?s.dom.classList.add(a):O(s,a);else{const r=o.encode(null!==(n=w(e))&&void 0!==n?n:"").replace(M,F),s=o.create("div",{},r);let a;for(;a=s.lastChild;)o.insertAfter(a,e.dom);t.dom.remove(e.dom)}var s,a}))},U=(t,e)=>{const o=t.dom.select(P,e);c(o,(e=>{I(e)?((t,e)=>{C(t)?t.dom.classList.remove(e):L(t,e);D(t)})(j.fromDom(e),H):t.dom.remove(e,!0)}))},q=t=>{const e=t.getBody(),o=t.selection.getBookmark();let n=((t,e)=>{for(;t.parentNode;){if(t.parentNode===e)return e;t=t.parentNode}})(t.selection.getNode(),e);n=void 0!==n?n:e,U(t,n),R(t,n),t.selection.moveToBookmark(o)},z=(t,e)=>{((t,e)=>{t.dispatch("VisualChars",{state:e})})(t,e.get());const o=t.getBody();!0===e.get()?R(t,o):U(t,o)},G=(t,e)=>{t.addCommand("mceVisualChars",(()=>{((t,e)=>{e.set(!e.get());const o=t.selection.getBookmark();z(t,e),t.selection.moveToBookmark(o)})(t,e)}))},J=(Q="visualchars_default_state",t=>t.options.get(Q));var Q;const W=(t,e)=>{const o=((t,e)=>{let o=null;return{cancel:()=>{s(o)||(clearTimeout(o),o=null)},throttle:(...n)=>{s(o)&&(o=setTimeout((()=>{o=null,t.apply(null,n)}),e))}}})((()=>{q(t)}),300);t.on("keydown",(n=>{!0===e.get()&&(13===n.keyCode?q(t):o.throttle())})),t.on("remove",o.cancel)},X=(t,e)=>o=>{o.setActive(e.get());const n=t=>o.setActive(t.state);return t.on("VisualChars",n),()=>t.off("VisualChars",n)};t.add("visualchars",(t=>{(t=>{(0,t.options.register)("visualchars_default_state",{processor:"boolean",default:!1})})(t);const e=(t=>{let e=t;return{get:()=>e,set:t=>{e=t}}})(J(t));return G(t,e),((t,e)=>{const o=()=>t.execCommand("mceVisualChars");t.ui.registry.addToggleButton("visualchars",{tooltip:"Show invisible characters",icon:"visualchars",onAction:o,onSetup:X(t,e)}),t.ui.registry.addToggleMenuItem("visualchars",{text:"Show invisible characters",icon:"visualchars",onAction:o,onSetup:X(t,e)})})(t,e),W(t,e),((t,e)=>{t.on("init",(()=>{z(t,e)}))})(t,e),(t=>({isEnabled:()=>t.get()}))(e)}))}()})); ;/*!node_modules/tinymce/plugins/visualchars/index.js*/ amis.define("079c96e",(function(e,i,n,c){e("66163ee")})); ;/*!node_modules/tinymce/plugins/template/plugin.js*/ amis.define("c8b7f99",(function(e,t,a,n){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(a=r=e,n=(s=String).prototype,n.isPrototypeOf(a)||(null===(l=r.constructor)||void 0===l?void 0:l.name)===s.name)?"string":t;var a,n;var r,s,l})(t)===e,a=t("string"),n=t("object"),r=t("array"),s=(l="function",e=>typeof e===l);var l;const o=(c=!1,()=>c);var c;var i=tinymce.util.Tools.resolve("tinymce.util.Tools");const u=e=>t=>t.options.get(e),m=e=>{const t=e.options.register;t("template_cdate_classes",{processor:"string",default:"cdate"}),t("template_mdate_classes",{processor:"string",default:"mdate"}),t("template_selected_content_classes",{processor:"string",default:"selcontent"}),t("template_preview_replace_values",{processor:"object"}),t("template_replace_values",{processor:"object"}),t("templates",{processor:e=>a(e)||((e,t)=>{if(r(e)){for(let a=0,n=e.length;a<n;++a)if(!t(e[a]))return!1;return!0}return!1})(e,n)||s(e),default:[]}),t("template_cdate_format",{processor:"string",default:e.translate("%Y-%m-%d")}),t("template_mdate_format",{processor:"string",default:e.translate("%Y-%m-%d")})},p=u("template_cdate_classes"),d=u("template_mdate_classes"),h=u("template_selected_content_classes"),g=u("template_preview_replace_values"),v=u("template_replace_values"),f=u("templates"),y=u("template_cdate_format"),_=u("template_mdate_format"),b=u("content_style"),M=u("content_css_cors"),T=u("body_class"),x=(e,t)=>{if((e=""+e).length<t)for(let a=0;a<t-e.length;a++)e="0"+e;return e},S=(e,t,a=new Date)=>{const n="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),r="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),s="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),l="January February March April May June July August September October November December".split(" ");return t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+a.getFullYear())).replace("%y",""+a.getYear())).replace("%m",x(a.getMonth()+1,2))).replace("%d",x(a.getDate(),2))).replace("%H",""+x(a.getHours(),2))).replace("%M",""+x(a.getMinutes(),2))).replace("%S",""+x(a.getSeconds(),2))).replace("%I",""+((a.getHours()+11)%12+1))).replace("%p",a.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(l[a.getMonth()]))).replace("%b",""+e.translate(s[a.getMonth()]))).replace("%A",""+e.translate(r[a.getDay()]))).replace("%a",""+e.translate(n[a.getDay()]))).replace("%%","%")};class w{constructor(e,t){this.tag=e,this.value=t}static some(e){return new w(!0,e)}static none(){return w.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?w.some(e(this.value)):w.none()}bind(e){return this.tag?e(this.value):w.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:w.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return(e=>null==e)(e)?w.none():w.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}w.singletonNone=new w(!1);const C=(e,t)=>((e,t,a)=>{for(let n=0,r=e.length;n<r;n++){const r=e[n];if(t(r,n))return w.some(r);if(a(r,n))break}return w.none()})(e,t,o),O=Object.hasOwnProperty,A=(e,t)=>O.call(e,t);var D=tinymce.util.Tools.resolve("tinymce.html.Serializer");const I={'"':""","<":"<",">":">","&":"&","'":"'"},N=e=>e.replace(/["'<>&]/g,(e=>{return(t=I,a=e,A(t,a)?w.from(t[a]):w.none()).getOr(e);var t,a})),k=(e,t,a)=>((e,t)=>{for(let a=0,n=e.length;a<n;a++)if(t(e[a],a))return!0;return!1})(a.split(/\s+/),(a=>e.hasClass(t,a))),P=(e,t)=>D({validate:!0},e.schema).serialize(e.parser.parse(t,{insert:!0})),E=(e,t)=>(i.each(t,((t,a)=>{s(t)&&(t=t(a)),e=e.replace(new RegExp("\\{\\$"+(a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\}"),"g"),t)})),e),H=(e,t)=>{const a=e.dom,n=v(e);i.each(a.select("*",t),(e=>{i.each(n,((t,n)=>{a.hasClass(e,n)&&s(t)&&t(e)}))}))},L=(e,t,a)=>{const n=e.dom,r=e.selection.getContent();a=E(a,v(e));let s=n.create("div",{},P(e,a));const l=n.select(".mceTmpl",s);l&&l.length>0&&(s=n.create("div"),s.appendChild(l[0].cloneNode(!0))),i.each(n.select("*",s),(t=>{k(n,t,p(e))&&(t.innerHTML=S(e,y(e))),k(n,t,d(e))&&(t.innerHTML=S(e,_(e))),k(n,t,h(e))&&(t.innerHTML=r)})),H(e,s),e.execCommand("mceInsertContent",!1,s.innerHTML),e.addVisual()};var j=tinymce.util.Tools.resolve("tinymce.Env");const Y=(e,t)=>{const a=e=>((e,t)=>{const a=e.length,n=new Array(a);for(let r=0;r<a;r++){const a=e[r];n[r]=t(a,r)}return n})(e,(e=>({text:e.text,value:e.text}))),n=(e,t)=>C(e,(e=>e.text===t)),r=t=>{e.windowManager.alert("Could not load the specified template.",(()=>t.focus("template")))},s=e=>e.value.url.fold((()=>Promise.resolve(e.value.content.getOr(""))),(e=>fetch(e).then((e=>e.ok?e.text():Promise.reject())))),l=(e,t)=>(a,l)=>{if("template"===l.name){const l=a.getData().template;n(e,l).each((e=>{a.block("Loading..."),s(e).then((n=>{t(a,e,n)})).catch((()=>{t(a,e,""),a.setEnabled("save",!1),r(a)}))}))}},o=t=>a=>{const l=a.getData();n(t,l.template).each((t=>{s(t).then((t=>{e.execCommand("mceInsertTemplate",!1,t),a.close()})).catch((()=>{a.setEnabled("save",!1),r(a)}))}))};(()=>{if(!t||0===t.length){const t=e.translate("No templates defined.");return e.notificationManager.open({text:t,type:"info"}),w.none()}return w.from(i.map(t,((e,t)=>{const a=e=>void 0!==e.url;return{selected:0===t,text:e.title,value:{url:a(e)?w.from(e.url):w.none(),content:a(e)?w.none():w.from(e.content),description:e.description}}})))})().each((t=>{const n=a(t),c=(e,a)=>({title:"Insert Template",size:"large",body:{type:"panel",items:e},initialData:a,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:o(t),onChange:l(t,u)}),u=(t,a,r)=>{const s=((e,t)=>{var a;if(-1===t.indexOf("<html>")){let n="";const r=null!==(a=b(e))&&void 0!==a?a:"",s=M(e)?' crossorigin="anonymous"':"";i.each(e.contentCSS,(t=>{n+='<link type="text/css" rel="stylesheet" href="'+e.documentBaseURI.toAbsolute(t)+'"'+s+">"})),r&&(n+='<style type="text/css">'+r+"</style>");const l=T(e),o=e.dom.encode,c='<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A" && !('+(j.os.isMacOS()||j.os.isiOS()?"e.metaKey":"e.ctrlKey && !e.altKey")+")) {e.preventDefault();}}}, false);<\/script> ",u=e.getBody().dir,m=u?' dir="'+o(u)+'"':"";t='<!DOCTYPE html><html><head><base href="'+o(e.documentBaseURI.getURI())+'">'+n+c+'</head><body class="'+o(l)+'"'+m+">"+P(e,t)+"</body></html>"}return E(t,g(e))})(e,r),l=[{type:"selectbox",name:"template",label:"Templates",items:n},{type:"htmlpanel",html:`<p aria-live="polite">${N(a.value.description)}</p>`},{label:"Preview",type:"iframe",name:"preview",sandboxed:!1,transparent:!1}],o={template:a.text,preview:s};t.unblock(),t.redial(c(l,o)),t.focus("template")},m=e.windowManager.open(c([],{template:"",preview:""}));m.block("Loading..."),s(t[0]).then((e=>{u(m,t[0],e)})).catch((()=>{u(m,t[0],""),m.setEnabled("save",!1),r(m)}))}))},J=e=>{e.addCommand("mceInsertTemplate",function(e,...t){return(...a)=>{const n=t.concat(a);return e.apply(null,n)}}(L,e)),e.addCommand("mceTemplate",((e,t)=>()=>{const n=f(e);s(n)?n(t):a(n)?fetch(n).then((e=>{e.ok&&e.json().then(t)})):t(n)})(e,(e=>t=>{Y(e,t)})(e)))};e.add("template",(e=>{m(e),(e=>{const t=()=>e.execCommand("mceTemplate");e.ui.registry.addButton("template",{icon:"template",tooltip:"Insert template",onAction:t}),e.ui.registry.addMenuItem("template",{icon:"template",text:"Insert template...",onAction:t})})(e),J(e),(e=>{e.on("PreProcess",(t=>{const a=e.dom,n=_(e);i.each(a.select("div",t.node),(t=>{a.hasClass(t,"mceTmpl")&&(i.each(a.select("*",t),(t=>{k(a,t,d(e))&&(t.innerHTML=S(e,n))})),H(e,t))}))}))})(e)}))}()})); ;/*!node_modules/tinymce/plugins/template/index.js*/ amis.define("77e45a1",(function(e,f,i,n){e("c8b7f99")})); ;/*!node_modules/tinymce/plugins/nonbreaking/plugin.js*/ amis.define("faa6ce8",(function(n,e,a,o){!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=n=>e=>typeof e===n,a=e("boolean"),o=e("number"),t=n=>e=>e.options.get(n),i=t("nonbreaking_force_tab"),r=t("nonbreaking_wrap"),s=(n,e)=>{let a="";for(let o=0;o<e;o++)a+=n;return a},c=(n,e)=>{const a=r(n)||n.plugins.visualchars?`<span class="${(n=>!!n.plugins.visualchars&&n.plugins.visualchars.isEnabled())(n)?"mce-nbsp-wrap mce-nbsp":"mce-nbsp-wrap"}" contenteditable="false">${s(" ",e)}</span>`:s(" ",e);n.undoManager.transact((()=>n.insertContent(a)))};var l=tinymce.util.Tools.resolve("tinymce.util.VK");n.add("nonbreaking",(n=>{(n=>{const e=n.options.register;e("nonbreaking_force_tab",{processor:n=>a(n)?{value:n?3:0,valid:!0}:o(n)?{value:n,valid:!0}:{valid:!1,message:"Must be a boolean or number."},default:!1}),e("nonbreaking_wrap",{processor:"boolean",default:!0})})(n),(n=>{n.addCommand("mceNonBreaking",(()=>{c(n,1)}))})(n),(n=>{const e=()=>n.execCommand("mceNonBreaking");n.ui.registry.addButton("nonbreaking",{icon:"non-breaking",tooltip:"Nonbreaking space",onAction:e}),n.ui.registry.addMenuItem("nonbreaking",{icon:"non-breaking",text:"Nonbreaking space",onAction:e})})(n),(n=>{const e=i(n);e>0&&n.on("keydown",(a=>{if(a.keyCode===l.TAB&&!a.isDefaultPrevented()){if(a.shiftKey)return;a.preventDefault(),a.stopImmediatePropagation(),c(n,e)}}))})(n)}))}()})); ;/*!node_modules/tinymce/plugins/nonbreaking/index.js*/ amis.define("34a3cb8",(function(a,c,e,f){a("faa6ce8")})); ;/*!node_modules/tinymce/plugins/emoticons/plugin.js*/ amis.define("6324434",(function(t,e,o,n){!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=t=>e=>t===e,o=e(null),n=e(void 0),s=()=>{},r=(t=>()=>t)(!1);class a{constructor(t,e){this.tag=t,this.value=e}static some(t){return new a(!0,t)}static none(){return a.singletonNone}fold(t,e){return this.tag?e(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?a.some(t(this.value)):a.none()}bind(t){return this.tag?t(this.value):a.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:a.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(null!=t?t:"Called getOrDie on None")}static from(t){return(t=>null==t)(t)?a.none():a.some(t)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}a.singletonNone=new a(!1);const i=(t,e)=>{const o=t.length,n=new Array(o);for(let s=0;s<o;s++){const o=t[s];n[s]=e(o,s)}return n},l=t=>{let e=t;return{get:()=>e,set:t=>{e=t}}},c=Object.keys,u=Object.hasOwnProperty,g=(t,e)=>{const o=c(t);for(let n=0,s=o.length;n<s;n++){const s=o[n];e(t[s],s)}},m=(t,e)=>{const o={};return g(t,((t,n)=>{const s=e(t,n);o[s.k]=s.v})),o},h=(t,e)=>u.call(t,e),d=(p=(t,e)=>e,(...t)=>{if(0===t.length)throw new Error("Can't merge zero objects");const e={};for(let o=0;o<t.length;o++){const n=t[o];for(const t in n)h(n,t)&&(e[t]=p(e[t],n[t]))}return e});var p;const y=()=>{const t=(t=>{const e=l(a.none()),o=()=>e.get().each(t);return{clear:()=>{o(),e.set(a.none())},isSet:()=>e.get().isSome(),get:()=>e.get(),set:t=>{o(),e.set(a.some(t))}}})(s);return{...t,on:e=>t.get().each(e)}},f=(t,e,o=0,s)=>{const r=t.indexOf(e,o);return-1!==r&&(!!n(s)||r+e.length<=s)};var v=tinymce.util.Tools.resolve("tinymce.Resource");const b=t=>e=>e.options.get(t),w=b("emoticons_database"),_=b("emoticons_database_url"),j=b("emoticons_database_id"),C=b("emoticons_append"),k=b("emoticons_images_url"),A="All",O={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"},x=(t,e)=>h(t,e)?t[e]:e,L=t=>{const e=C(t);return o=t=>({keywords:[],category:"user",...t}),m(e,((t,e)=>({k:e,v:o(t,e)})));var o},T=(t,e,o)=>{const n=y(),s=y(),r=k(t),i=t=>((t,e,o)=>""===e||t.length>=e.length&&t.substr(o,o+e.length)===e)(t.char,"<img",0)?t.char.replace(/src="([^"]+)"/,((t,e)=>`src="${r}${e}"`)):t.char;t.on("init",(()=>{v.load(o,e).then((e=>{const o=L(t);(t=>{const e={},o=[];g(t,((t,n)=>{const s={title:n,keywords:t.keywords,char:i(t),category:x(O,t.category)},r=void 0!==e[s.category]?e[s.category]:[];e[s.category]=r.concat([s]),o.push(s)})),n.set(e),s.set(o)})(d(e,o))}),(t=>{console.log(`Failed to load emojis: ${t}`),n.set({}),s.set([])}))}));const l=()=>s.get().getOr([]),u=()=>n.isSet()&&s.isSet();return{listCategories:()=>[A].concat(c(n.get().getOr({}))),hasLoaded:u,waitForLoad:()=>u()?Promise.resolve(!0):new Promise(((t,o)=>{let n=15;const s=setInterval((()=>{u()?(clearInterval(s),t(!0)):(n--,n<0&&(console.log("Could not load emojis from url: "+e),clearInterval(s),o(!1)))}),100)})),listAll:l,listCategory:t=>t===A?l():n.get().bind((e=>a.from(e[t]))).getOr([])}},D=(t,e)=>f(t.title.toLowerCase(),e)||((t,e)=>{for(let o=0,n=t.length;o<n;o++)if(e(t[o],o))return!0;return!1})(t.keywords,(t=>f(t.toLowerCase(),e))),E=(t,e,o)=>{const n=[],s=e.toLowerCase(),a=o.fold((()=>r),(t=>e=>e>=t));for(let o=0;o<t.length&&(0!==e.length&&!D(t[o],s)||(n.push({value:t[o].char,text:t[o].title,icon:t[o].char}),!a(n.length)));o++);return n},S="pattern",F=(t,e)=>{const n={pattern:"",results:E(e.listAll(),"",a.some(300))},s=l(A),r=((t,e)=>{let n=null;const s=()=>{o(n)||(clearTimeout(n),n=null)};return{cancel:s,throttle:(...o)=>{s(),n=setTimeout((()=>{n=null,t.apply(null,o)}),e)}}})((t=>{(t=>{const o=t.getData(),n=s.get(),r=e.listCategory(n),i=E(r,o.pattern,n===A?a.some(300):a.none());t.setData({results:i})})(t)}),200),c={label:"Search",type:"input",name:S},u={type:"collection",name:"results"},g=()=>({title:"Emojis",size:"normal",body:{type:"tabpanel",tabs:i(e.listCategories(),(t=>({title:t,name:t,items:[c,u]})))},initialData:n,onTabChange:(t,e)=>{s.set(e.newTabName),r.throttle(t)},onChange:r.throttle,onAction:(e,o)=>{"results"===o.name&&(((t,e)=>{t.insertContent(e)})(t,o.value),e.close())},buttons:[{type:"cancel",text:"Close",primary:!0}]}),m=t.windowManager.open(g());m.focus(S),e.hasLoaded()||(m.block("Loading emojis..."),e.waitForLoad().then((()=>{m.redial(g()),r.throttle(m),m.focus(S),m.unblock()})).catch((t=>{m.redial({title:"Emojis",body:{type:"panel",items:[{type:"alertbanner",level:"error",icon:"warning",text:"Could not load emojis"}]},buttons:[{type:"cancel",text:"Close",primary:!0}],initialData:{pattern:"",results:[]}}),m.focus(S),m.unblock()})))};t.add("emoticons",((t,e)=>{((t,e)=>{const o=t.options.register;o("emoticons_database",{processor:"string",default:"emojis"}),o("emoticons_database_url",{processor:"string",default:`${e}/js/${w(t)}${t.suffix}.js`}),o("emoticons_database_id",{processor:"string",default:"tinymce.plugins.emoticons"}),o("emoticons_append",{processor:"object",default:{}}),o("emoticons_images_url",{processor:"string",default:"https://twemoji.maxcdn.com/v/13.0.1/72x72/"})})(t,e);const o=_(t),n=j(t),s=T(t,o,n);((t,e)=>{t.addCommand("mceEmoticons",(()=>F(t,e)))})(t,s),(t=>{const e=()=>t.execCommand("mceEmoticons");t.ui.registry.addButton("emoticons",{tooltip:"Emojis",icon:"emoji",onAction:e}),t.ui.registry.addMenuItem("emoticons",{text:"Emojis...",icon:"emoji",onAction:e})})(t),((t,e)=>{t.ui.registry.addAutocompleter("emoticons",{trigger:":",columns:"auto",minChars:2,fetch:(t,o)=>e.waitForLoad().then((()=>{const n=e.listAll();return E(n,t,a.some(o))})),onAction:(e,o,n)=>{t.selection.setRng(o),t.insertContent(n),e.hide()}})})(t,s),(t=>{t.on("PreInit",(()=>{t.parser.addAttributeFilter("data-emoticon",(t=>{((t,e)=>{for(let o=0,n=t.length;o<n;o++)e(t[o],o)})(t,(t=>{t.attr("data-mce-resize","false"),t.attr("data-mce-placeholder","1")}))}))}))})(t)}))}()})); ;/*!node_modules/tinymce/plugins/emoticons/index.js*/ amis.define("c7b32e6",(function(e,i,n,c){e("6324434")})); ;/*!node_modules/tinymce/plugins/emoticons/js/emojis.js*/ amis.define("6d29b36",(function(a,e,r,c){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"},partying:{keywords:["face","celebration","woohoo"],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"},smiling_face_with_three_hearts:{keywords:["face","love","like","affection","valentines","infatuation","crush","hearts","adore"],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"},pleading:{keywords:["face","begging","mercy"],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"},hot:{keywords:["face","feverish","heat","red","sweating"],char:"🥵",fitzpatrick_scale:!1,category:"people"},cold:{keywords:["face","blue","freezing","frozen","frostbite","icicles"],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"},woozy:{keywords:["face","dizzy","intoxicated","tipsy","wavy"],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"},foot:{keywords:["kick","stomp"],char:"🦶",fitzpatrick_scale:!0,category:"people"},leg:{keywords:["kick","limb"],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"},tooth:{keywords:["teeth","dentist"],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"},woman_superhero:{keywords:["woman","female","good","heroine","superpowers"],char:"🦸♀️",fitzpatrick_scale:!0,category:"people"},man_superhero:{keywords:["man","male","good","hero","superpowers"],char:"🦸♂️",fitzpatrick_scale:!0,category:"people"},woman_supervillain:{keywords:["woman","female","evil","bad","criminal","heroine","superpowers"],char:"🦹♀️",fitzpatrick_scale:!0,category:"people"},man_supervillain:{keywords:["man","male","evil","bad","criminal","hero","superpowers"],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"},yarn:{keywords:["ball","crochet","knit"],char:"🧶",fitzpatrick_scale:!1,category:"people"},thread:{keywords:["needle","sewing","spool","string"],char:"🧵",fitzpatrick_scale:!1,category:"people"},coat:{keywords:["jacket"],char:"🧥",fitzpatrick_scale:!1,category:"people"},labcoat:{keywords:["doctor","experiment","scientist","chemist"],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"},flat_shoe:{keywords:["ballet","slip-on","slipper"],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"},hiking_boot:{keywords:["backpacking","camping","hiking"],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"},luggage:{keywords:["packing","travel"],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"},goggles:{keywords:["eyes","protection","safety"],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"},raccoon:{keywords:["animal","nature"],char:"🦝",fitzpatrick_scale:!1,category:"animals_and_nature"},llama:{keywords:["animal","nature","alpaca"],char:"🦙",fitzpatrick_scale:!1,category:"animals_and_nature"},hippopotamus:{keywords:["animal","nature"],char:"🦛",fitzpatrick_scale:!1,category:"animals_and_nature"},kangaroo:{keywords:["animal","nature","australia","joey","hop","marsupial"],char:"🦘",fitzpatrick_scale:!1,category:"animals_and_nature"},badger:{keywords:["animal","nature","honey"],char:"🦡",fitzpatrick_scale:!1,category:"animals_and_nature"},swan:{keywords:["animal","nature","bird"],char:"🦢",fitzpatrick_scale:!1,category:"animals_and_nature"},peacock:{keywords:["animal","nature","peahen","bird"],char:"🦚",fitzpatrick_scale:!1,category:"animals_and_nature"},parrot:{keywords:["animal","nature","bird","pirate","talk"],char:"🦜",fitzpatrick_scale:!1,category:"animals_and_nature"},lobster:{keywords:["animal","nature","bisque","claws","seafood"],char:"🦞",fitzpatrick_scale:!1,category:"animals_and_nature"},mosquito:{keywords:["animal","nature","insect","malaria"],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"},mango:{keywords:["fruit","food","tropical"],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"},leafy_greens:{keywords:["food","vegetable","plant","bok choy","cabbage","kale","lettuce"],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"},bagel:{keywords:["food","bread","bakery","schmear"],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"},bone:{keywords:["skeleton"],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"},cupcake:{keywords:["food","dessert","bakery","sweet"],char:"🧁",fitzpatrick_scale:!1,category:"food_and_drink"},moon_cake:{keywords:["food","autumn"],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"},salt:{keywords:["condiment","shaker"],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"},softball:{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"},flying_disc:{keywords:["sports","frisbee","ultimate"],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"},lacrosse:{keywords:["sports","ball","stick"],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"},skateboard:{keywords:["board"],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"},chess_pawn:{keywords:["expendable"],char:"♟",fitzpatrick_scale:!1,category:"activity"},slot_machine:{keywords:["bet","gamble","vegas","fruit machine","luck","casino"],char:"🎰",fitzpatrick_scale:!1,category:"activity"},jigsaw:{keywords:["interlocking","puzzle","piece"],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"},compass:{keywords:["magnetic","navigation","orienteering"],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"},fire_extinguisher:{keywords:["quench"],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"},toolbox:{keywords:["tools","diy","fix","maintainer","mechanic"],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"},brick:{keywords:["bricks"],char:"🧱",fitzpatrick_scale:!1,category:"objects"},chains:{keywords:["lock","arrest"],char:"⛓",fitzpatrick_scale:!1,category:"objects"},magnet:{keywords:["attraction","magnetic"],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"},firecracker:{keywords:["dynamite","boom","explode","explosion","explosive"],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"},nazar_amulet:{keywords:["bead","charm"],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"},dna:{keywords:["biologist","genetics","life"],char:"🧬",fitzpatrick_scale:!1,category:"objects"},microbe:{keywords:["amoeba","bacteria","germs"],char:"🦠",fitzpatrick_scale:!1,category:"objects"},petri_dish:{keywords:["bacteria","biology","culture","lab"],char:"🧫",fitzpatrick_scale:!1,category:"objects"},test_tube:{keywords:["chemistry","experiment","lab","science"],char:"🧪",fitzpatrick_scale:!1,category:"objects"},thermometer:{keywords:["weather","temperature","hot","cold"],char:"🌡",fitzpatrick_scale:!1,category:"objects"},broom:{keywords:["cleaning","sweeping","witch"],char:"🧹",fitzpatrick_scale:!1,category:"objects"},basket:{keywords:["laundry"],char:"🧺",fitzpatrick_scale:!1,category:"objects"},toilet_paper:{keywords:["roll"],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"},soap:{keywords:["bar","bathing","cleaning","lather"],char:"🧼",fitzpatrick_scale:!1,category:"objects"},sponge:{keywords:["absorbing","cleaning","porous"],char:"🧽",fitzpatrick_scale:!1,category:"objects"},lotion_bottle:{keywords:["moisturizer","sunscreen"],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"},teddy_bear:{keywords:["plush","stuffed"],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"},red_envelope:{keywords:["gift"],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"},receipt:{keywords:["accounting","expenses"],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"},safety_pin:{keywords:["diaper"],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"},abacus:{keywords:["calculation"],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","red"],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"},infinity:{keywords:["forever"],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"},united_nations:{keywords:["un","flag","banner"],char:"🇺🇳",fitzpatrick_scale:!1,category:"flags"},pirate_flag:{keywords:["skull","crossbones","flag","banner"],char:"🏴☠️",fitzpatrick_scale:!1,category:"flags"}})})); ;/*!node_modules/tinymce/plugins/quickbars/plugin.js*/ amis.define("2e43290",(function(e,t,o,n){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>typeof t===e,o=(n="string",e=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(i=n.constructor)||void 0===i?void 0:i.name)===r.name)?"string":t;var o,n,r,i})(e)===n);var n;const r=t("boolean"),i=t("function"),s=e=>t=>t.options.get(e),a=s("quickbars_selection_toolbar"),l=s("quickbars_insert_toolbar"),c=s("quickbars_image_toolbar");let u=0;const d=(e,t,o)=>{const n=e.editorUpload.blobCache,r=n.create((e=>{const t=(new Date).getTime(),o=Math.floor(1e9*Math.random());return u++,e+"_"+o+u+String(t)})("mceu"),o,t);n.add(r),e.insertContent(e.dom.createHTML("img",{src:r.blobUri()}))};var m=tinymce.util.Tools.resolve("tinymce.util.Delay");const h=e=>{e.ui.registry.addButton("quickimage",{icon:"image",tooltip:"Insert image",onAction:()=>{(e=>new Promise((t=>{let o=!1;const n=document.createElement("input");n.type="file",n.accept="image/*",n.style.position="fixed",n.style.left="0",n.style.top="0",n.style.opacity="0.001",document.body.appendChild(n);const r=e=>{var r;o||(null===(r=n.parentNode)||void 0===r||r.removeChild(n),o=!0,t(e))},i=e=>{r(Array.prototype.slice.call(e.target.files))};n.addEventListener("input",i),n.addEventListener("change",i);const s=t=>{const n=()=>{r([])};o||("focusin"===t.type?m.setEditorTimeout(e,n,1e3):n()),e.off("focusin remove",s)};e.on("focusin remove",s),n.click()})))(e).then((t=>{if(t.length>0){const o=t[0];(e=>new Promise((t=>{const o=new FileReader;o.onloadend=()=>{t(o.result.split(",")[1])},o.readAsDataURL(e)})))(o).then((t=>{d(e,t,o)}))}}))}}),e.ui.registry.addButton("quicktable",{icon:"table",tooltip:"Insert table",onAction:()=>{((e,t,o)=>{e.execCommand("mceInsertTable",!1,{rows:o,columns:t})})(e,2,2)}})},g=(f=!1,()=>f);var f;class b{constructor(e,t){this.tag=e,this.value=t}static some(e){return new b(!0,e)}static none(){return b.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?b.some(e(this.value)):b.none()}bind(e){return this.tag?e(this.value):b.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:b.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return(e=>null==e)(e)?b.none():b.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}b.singletonNone=new b(!1),"undefined"!=typeof window?window:Function("return this;")();var v=(e,t,o,n,r)=>e(o,n)?b.some(o):i(r)&&r(o)?b.none():t(o,n,r);const p=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},y={fromHtml:(e,t)=>{const o=(t||document).createElement("div");if(o.innerHTML=e,!o.hasChildNodes()||o.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return p(o.childNodes[0])},fromTag:(e,t)=>{const o=(t||document).createElement(e);return p(o)},fromText:(e,t)=>{const o=(t||document).createTextNode(e);return p(o)},fromDom:p,fromPoint:(e,t,o)=>b.from(e.dom.elementFromPoint(t,o)).map(p)},k=(e,t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},w=(e,t,o)=>{let n=e.dom;const r=i(o)?o:g;for(;n.parentNode;){n=n.parentNode;const e=y.fromDom(n);if(t(e))return b.some(e);if(r(e))break}return b.none()},T=(e,t,o)=>((e,t,o)=>v(((e,t)=>t(e)),w,e,t,o))(e,t,o).isSome(),N=(e,t,o)=>w(e,(e=>k(e,t)),o),q=e=>{const t=l(e);t.length>0&&e.ui.registry.addContextToolbar("quickblock",{predicate:t=>{const o=y.fromDom(t),n=e.schema.getTextBlockElements(),r=t=>t.dom===e.getBody();return!((e,t)=>{const o=e.dom;return!(!o||!o.hasAttribute)&&o.hasAttribute(t)})(o,"data-mce-bogus")&&((e,t,o)=>v(((e,t)=>k(e,t)),N,e,t,o))(o,'table,[data-mce-bogus="all"]',r).fold((()=>T(o,(t=>t.dom.nodeName.toLowerCase()in n&&e.dom.isEmpty(t.dom)),r)),g)},items:t,position:"line",scope:"editor"})},E=e=>{const t=e=>"IMG"===e.nodeName||"FIGURE"===e.nodeName&&/image/i.test(e.className),o=c(e);o.length>0&&e.ui.registry.addContextToolbar("imageselection",{predicate:t,items:o,position:"node"});const n=a(e);n.length>0&&e.ui.registry.addContextToolbar("textselection",{predicate:o=>!t(o)&&!e.selection.isCollapsed()&&(t=>"false"!==e.dom.getContentEditableParent(t))(o),items:n,position:"selection",scope:"editor"})};e.add("quickbars",(e=>{(e=>{const t=e.options.register,n=e=>t=>{const n=r(t)||o(t);return n?r(t)?{value:t?e:"",valid:n}:{value:t.trim(),valid:n}:{valid:!1,message:"Must be a boolean or string."}},i="bold italic | quicklink h2 h3 blockquote";t("quickbars_selection_toolbar",{processor:n(i),default:i});const s="quickimage quicktable";t("quickbars_insert_toolbar",{processor:n(s),default:s});const a="alignleft aligncenter alignright";t("quickbars_image_toolbar",{processor:n(a),default:a})})(e),h(e),q(e),E(e)}))}()})); ;/*!node_modules/amis-ui/lib/components/Tinymce.js*/ amis.define("65812c6",(function(e,t,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=e("b22ff87"),n=e("e36371f"),a=e("33f80ad");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}e("da23461"),e("937ccb0"),e("58387fd"),e("a7dac06"),e("792395d"),e("a59041d"),e("ee387e1"),e("fa782d0"),e("6250ee1"),e("54d81b8"),e("3ab9d0e"),e("6416a32"),e("1408562"),e("262d7e2"),e("db6eae7"),e("4a51612"),e("5a63d98"),e("e40a158"),e("95a0193"),e("6109de0"),e("80ffbcc"),e("67f6576"),e("079c96e"),e("77e45a1"),e("34a3cb8"),e("c7b32e6"),e("6d29b36"),e("2e43290");var s=l(n),c=l(a),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elementRef=s.default.createRef(),t}return i.__extends(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props.locale;this.config=i.__assign(i.__assign({inline:!1,skin:!1,content_css:!1,height:400,language:t&&"zh-CN"!==t?"en":"zh_CN",branding:!1,plugins:["advlist","autolink","autoresize","link","image","lists","charmap","preview","anchor","pagebreak","searchreplace","wordcount","visualblocks","visualchars","code","fullscreen","insertdatetime","media","nonbreaking","table","emoticons","template","help","quickbars"],toolbar:"undo redo | blocks | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | preview media | fontfamily fontsize forecolor backcolor emoticons | print help",quickbars_selection_toolbar:"bold italic | link h2 h3 blockquote",quickbars_insert_toolbar:"quickimage quicktable",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 | 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 | styles blocks fontsize align | forecolor backcolor | removeformat"},tools:{title:"Tools",items:"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,promotion:!1,setup:function(t){e.editor=t,t.on("init",(function(o){e.initEditor(o,t)}))}}),c.default.init(this.config)},t.prototype.componentDidUpdate=function(e){var t,o=this.props;o.model!==e.model&&o.model!==this.currentContent&&(null===(t=this.editor)||void 0===t||t.setContent(o.model||""))},t.prototype.componentWillUnmount=function(){c.default.remove(this.editor)},t.prototype.initEditor=function(e,t){var o=this,r=this.props,i=r.model,n=r.onModelChange,a=r.outputFormat,l=r.onFocus,s=r.onBlur,c=i||"";t.setContent(c),n&&t.on("change keyup setcontent",(function(e){var r=t.getContent({format:a});r!==o.currentContent&&(o.currentContent=r,n(r))})),l&&t.on("focus",l),s&&t.on("blur",s)},t.prototype.render=function(){return s.default.createElement("textarea",{ref:this.elementRef})},t.defaultProps={outputFormat:"html"},t}(s.default.Component);c.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":"插入模板"}),t.default=d}));