CTL/web/sdk/tinymce.js
CSSC-WORK\murmur 2cf8bfaea2 init version
2024-06-21 17:05:50 +08:00

116 lines
1.4 MiB
Raw Blame History

This file contains invisible Unicode characters

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

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

;/*!node_modules/tinymce/tinymce.js*/
amis.define("f30dc49",(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),E=m("function"),_=m("number"),k=(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},S=()=>{},N=(e,t)=>(...n)=>e(t.apply(null,n)),R=(e,t)=>n=>e(t(n)),A=e=>()=>e,D=e=>e,T=(e,t)=>e===t;function O(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),q=(e,t)=>$(e,t)>-1,V=(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)}},Y=(e,t)=>{for(let n=e.length-1;n>=0;n--){t(e[n],n)}},G=(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)=>(Y(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=>!q(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=E(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),S),n},xe=(e,t)=>{const n=[];return he(e,((e,o)=>{n.push(t(e,o))})),n},Ee=e=>xe(e,D),_e=(e,t)=>ke(e,t)?U.from(e[t]):U.none(),ke=(e,t)=>pe.call(e,t),Se=(e,t)=>ke(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(ke(e,o)&&!1===t.call(n,e[o],o,e))return!1;return!0},Te=(e,t)=>{const n=[];return De(e,((o,r)=>{n.push(t(o,r,e))})),n},Oe=(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)=>qe(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)},qe=(e,t)=>je(e,t,0),Ve=(e,t)=>je(e,t,e.length-t.length),We=e=>t=>t.replace(e,""),Ke=We(/^\s+|\s+$/g),Ye=We(/^\s+/g),Ge=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 Et=()=>xt(),_t=navigator.userAgent,kt=Et(),St=kt.browser,Nt=kt.os,Rt=kt.deviceType,At=-1!==_t.indexOf("Windows Phone"),Dt={transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",documentMode:St.isIE()?document.documentMode||7:10,cacheSuffix:null,container:null,canHaveCSP:!St.isIE(),windowsPhone:At,browser:{current:St.current,version:St.version,isChromium:St.isChromium,isEdge:St.isEdge,isFirefox:St.isFirefox,isIE:St.isIE,isOpera:St.isOpera,isSafari:St.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}},Tt=/^\s*|\s*$/g,Ot=e=>w(e)?"":(""+e).replace(Tt,""),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:Ot,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:Te,grep:Oe,inArray:(e,t)=>{if(e)for(let n=0,o=e.length;n<o;n++)if(e[n]===t)return n;return-1},hasOwn:ke,extend:(e,...t)=>{for(let n=0;n<t.length;n++){const o=t[n];for(const t in o)if(ke(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?[]:Te(e.split(t||","),Ot),_addCacheSuffix:e=>{const t=Dt.cacheSuffix;return t&&(e+=(-1===e.indexOf("?")?"?":"&")+t),e}},Lt=(e,t,n=T)=>e.exists((e=>n(e,t))),Mt=(e,t,n=T)=>It(e,t,n).getOr(e.isNone()&&t.isNone()),It=(e,t,n)=>e.isSome()&&t.isSome()?U.some(n(e.getOrDie(),t.getOrDie())):U.none(),Ft=(e,t)=>e?U.some(t):U.none(),Ut="undefined"!=typeof window?window:Function("return this;")(),zt=(e,t)=>((e,t)=>{let n=null!=t?t:Ut;for(let t=0;t<e.length&&null!=n;++t)n=n[e[t]];return n})(e.split("."),t),jt=(e,t)=>{const n=((e,t)=>zt(e,t))(e,t);if(null==n)throw new Error(e+" not available on this browser");return n},Ht=Object.getPrototypeOf,$t=e=>{const t=zt("ownerDocument.defaultView",e);return p(e)&&((e=>jt("HTMLElement",e))(t).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(Ht(e).constructor.name))},qt=e=>e.dom.nodeName.toLowerCase(),Vt=e=>e.dom.nodeType,Wt=e=>t=>Vt(t)===e,Kt=e=>Yt(e)&&$t(e.dom),Yt=Wt(1),Gt=Wt(3),Xt=Wt(9),Qt=Wt(11),Jt=e=>t=>Yt(t)&&qt(t)===e,Zt=(e,t,n)=>{if(!(g(n)||y(n)||_(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+"")},en=(e,t,n)=>{Zt(e.dom,t,n)},tn=(e,t)=>{const n=e.dom;he(t,((e,t)=>{Zt(n,t,e)}))},nn=(e,t)=>{const n=e.dom.getAttribute(t);return null===n?void 0:n},on=(e,t)=>U.from(nn(e,t)),rn=(e,t)=>{const n=e.dom;return!(!n||!n.hasAttribute)&&n.hasAttribute(t)},sn=(e,t)=>{e.dom.removeAttribute(t)},an=e=>J(e.dom.attributes,((e,t)=>(e[t.name]=t.value,e)),{}),ln=(e,t)=>{const n=nn(e,t);return void 0===n||""===n?[]:n.split(" ")},dn=e=>void 0!==e.dom.classList,cn=e=>ln(e,"class"),mn=(e,t)=>((e,t,n)=>{const o=ln(e,t).concat([n]);return en(e,t,o.join(" ")),!0})(e,"class",t),un=(e,t)=>((e,t,n)=>{const o=X(ln(e,t),(e=>e!==n));return o.length>0?en(e,t,o.join(" ")):sn(e,t),!1})(e,"class",t),fn=(e,t)=>{dn(e)?e.dom.classList.add(t):mn(e,t)},gn=e=>{0===(dn(e)?e.dom.classList:cn(e)).length&&sn(e,"class")},pn=(e,t)=>{if(dn(e)){e.dom.classList.remove(t)}else un(e,t);gn(e)},hn=(e,t)=>{const n=dn(e)?e.dom.classList.toggle(t):((e,t)=>q(cn(e),t)?un(e,t):mn(e,t))(e,t);return gn(e),n},bn=(e,t)=>dn(e)&&e.dom.classList.contains(t),vn=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},yn={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 vn(n.childNodes[0])},fromTag:(e,t)=>{const n=(t||document).createElement(e);return vn(n)},fromText:(e,t)=>{const n=(t||document).createTextNode(e);return vn(n)},fromDom:vn,fromPoint:(e,t,n)=>U.from(e.dom.elementFromPoint(t,n)).map(vn)},Cn=(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},wn=(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")}},xn=e=>1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount,En=(e,t)=>e.dom===t.dom,_n=(e,t)=>{const n=e.dom,o=t.dom;return n!==o&&n.contains(o)},kn=e=>yn.fromDom(e.dom.ownerDocument),Sn=e=>Xt(e)?e:kn(e),Nn=e=>yn.fromDom(Sn(e).dom.defaultView),Rn=e=>U.from(e.dom.parentNode).map(yn.fromDom),An=e=>U.from(e.dom.parentElement).map(yn.fromDom),Dn=(e,t)=>{const n=E(t)?t:I;let o=e.dom;const r=[];for(;null!==o.parentNode&&void 0!==o.parentNode;){const e=o.parentNode,t=yn.fromDom(e);if(r.push(t),!0===n(t))break;o=e}return r},Tn=e=>U.from(e.dom.previousSibling).map(yn.fromDom),On=e=>U.from(e.dom.nextSibling).map(yn.fromDom),Bn=e=>se(Cn(e,Tn)),Pn=e=>Cn(e,On),Ln=e=>W(e.dom.childNodes,yn.fromDom),Mn=(e,t)=>{const n=e.dom.childNodes;return U.from(n[t]).map(yn.fromDom)},In=e=>Mn(e,0),Fn=e=>Mn(e,e.dom.childNodes.length-1),Un=e=>e.dom.childNodes.length,zn=e=>Qt(e)&&x(e.dom.host),jn=E(Element.prototype.attachShadow)&&E(Node.prototype.getRootNode),Hn=A(jn),$n=jn?e=>yn.fromDom(e.dom.getRootNode()):Sn,qn=e=>zn(e)?e:(e=>{const t=e.dom.head;if(null==t)throw new Error("Head is not available yet");return yn.fromDom(t)})(Sn(e)),Vn=e=>yn.fromDom(e.dom.host),Wn=e=>{if(Hn()&&x(e.target)){const t=yn.fromDom(e.target);if(Yt(t)&&Kn(t)&&e.composed&&e.composedPath){const t=e.composedPath();if(t)return ce(t)}}return U.from(e.target)},Kn=e=>x(e.dom.shadowRoot),Yn=e=>{const t=Gt(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const n=t.ownerDocument;return(e=>{const t=$n(e);return zn(t)?U.some(t):U.none()})(yn.fromDom(t)).fold((()=>n.body.contains(t)),R(Yn,Vn))};var Gn=(e,t,n,o,r)=>e(n,o)?U.some(n):E(r)&&r(n)?U.none():t(n,o,r);const Xn=(e,t,n)=>{let o=e.dom;const r=E(n)?n:I;for(;o.parentNode;){o=o.parentNode;const e=yn.fromDom(o);if(t(e))return U.some(e);if(r(e))break}return U.none()},Qn=(e,t,n)=>Gn(((e,t)=>t(e)),Xn,e,t,n),Jn=(e,t)=>ee(e.dom.childNodes,(e=>t(yn.fromDom(e)))).map(yn.fromDom),Zn=(e,t)=>{const n=e=>{for(let o=0;o<e.childNodes.length;o++){const r=yn.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)},eo=(e,t,n)=>Xn(e,(e=>wn(e,t)),n),to=(e,t)=>((e,t)=>{const n=void 0===t?document:t.dom;return xn(n)?U.none():U.from(n.querySelector(e)).map(yn.fromDom)})(t,e),no=(e,t,n)=>Gn(((e,t)=>wn(e,t)),eo,e,t,n),oo=(e,t=!1)=>{return Yn(e)?e.dom.isContentEditable:(n=e,no(n,"[contenteditable]")).fold(A(t),(e=>"true"===ro(e)));var n},ro=e=>e.dom.contentEditable,so=e=>void 0!==e.style&&E(e.style.getPropertyValue),ao=(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);so(e)&&e.style.setProperty(t,n)},io=(e,t,n)=>{const o=e.dom;ao(o,t,n)},lo=(e,t)=>{const n=e.dom;he(t,((e,t)=>{ao(n,t,e)}))},co=(e,t)=>{const n=e.dom,o=window.getComputedStyle(n).getPropertyValue(t);return""!==o||Yn(e)?o:mo(n,t)},mo=(e,t)=>so(e)?e.style.getPropertyValue(t):"",uo=(e,t)=>{const n=e.dom,o=mo(n,t);return U.from(o).filter((e=>e.length>0))},fo=e=>{const t={},n=e.dom;if(so(n))for(let e=0;e<n.style.length;e++){const o=n.style.item(e);t[o]=n.style[o]}return t},go=(e,t)=>{((e,t)=>{so(e)&&e.style.removeProperty(t)})(e.dom,t),Lt(on(e,"style").map(Ke),"")&&sn(e,"style")},po=(e,t)=>{Rn(e).each((n=>{n.dom.insertBefore(t.dom,e.dom)}))},ho=(e,t)=>{On(e).fold((()=>{Rn(e).each((e=>{vo(e,t)}))}),(e=>{po(e,t)}))},bo=(e,t)=>{In(e).fold((()=>{vo(e,t)}),(n=>{e.dom.insertBefore(t.dom,n.dom)}))},vo=(e,t)=>{e.dom.appendChild(t.dom)},yo=(e,t)=>{po(e,t),vo(t,e)},Co=(e,t)=>{K(t,(t=>{vo(e,t)}))},wo=e=>{e.dom.textContent="",K(Ln(e),(e=>{xo(e)}))},xo=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Eo=e=>{const t=Ln(e);var n,o;t.length>0&&(n=e,K(o=t,((e,t)=>{const r=0===t?n:o[t-1];ho(r,e)}))),xo(e)},_o=e=>W(e,yn.fromDom),ko=e=>e.dom.innerHTML,So=(e,t)=>{const n=kn(e).dom,o=yn.fromDom(n.createDocumentFragment()),r=((e,t)=>{const n=(t||document).createElement("div");return n.innerHTML=e,Ln(yn.fromDom(n))})(t,n);Co(o,r),wo(e),vo(e,o)},No=(e,t)=>n=>{e(n)&&t((e=>{const t=yn.fromDom(Wn(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))},Ro=(e,t,n,o)=>((e,t,n,o,r)=>{const s=No(n,o);return e.dom.addEventListener(t,s,r),{unbind:O(Ao,e,t,s,r)}})(e,t,n,o,!1),Ao=(e,t,n,o)=>{e.dom.removeEventListener(t,n,o)},Do=(e,t)=>({left:e,top:t,translate:(n,o)=>Do(e+n,t+o)}),To=Do,Oo=(e,t)=>void 0!==e?e:void 0!==t?t:0,Bo=e=>{const t=e.dom,n=t.ownerDocument.body;return n===t?To(n.offsetLeft,n.offsetTop):Yn(e)?(e=>{const t=e.getBoundingClientRect();return To(t.left,t.top)})(t):To(0,0)},Po=e=>{const t=void 0!==e?e.dom:document,n=t.body.scrollLeft||t.documentElement.scrollLeft,o=t.body.scrollTop||t.documentElement.scrollTop;return To(n,o)},Lo=(e,t,n)=>{const o=(void 0!==n?n.dom:document).defaultView;o&&o.scrollTo(e,t)},Mo=(e,t)=>{Et().browser.isSafari()&&E(e.dom.scrollIntoViewIfNeeded)?e.dom.scrollIntoViewIfNeeded(!1):e.dom.scrollIntoView(t)},Io=(e,t,n,o)=>({x:e,y:t,width:n,height:o,right:e+n,bottom:t+o}),Fo=e=>{const t=void 0===e?window:e,n=t.document,o=Po(yn.fromDom(n));return(e=>{const t=void 0===e?window:e;return Et().browser.isFirefox()?U.none():U.from(t.visualViewport)})(t).fold((()=>{const e=t.document.documentElement,n=e.clientWidth,r=e.clientHeight;return Io(o.left,o.top,n,r)}),(e=>Io(Math.max(e.pageLeft,o.left),Math.max(e.pageTop,o.top),e.width,e.height)))},Uo=(e,t)=>{let n=[];return K(Ln(e),(e=>{t(e)&&(n=n.concat([e])),n=n.concat(Uo(e,t))})),n},zo=(e,t)=>((e,t)=>{const n=void 0===t?document:t.dom;return xn(n)?[]:W(n.querySelectorAll(e),yn.fromDom)})(t,e),jo=(e,t,n)=>eo(e,t,n).isSome();class Ho{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 $o=e=>t=>!!t&&t.nodeType===e,qo=e=>!!e&&!Object.getPrototypeOf(e),Vo=$o(1),Wo=e=>Vo(e)&&Kt(yn.fromDom(e)),Ko=e=>{const t=e.toLowerCase();return e=>x(e)&&e.nodeName.toLowerCase()===t},Yo=e=>{const t=e.map((e=>e.toLowerCase()));return e=>{if(e&&e.nodeName){const n=e.nodeName.toLowerCase();return q(t,n)}return!1}},Go=(e,t)=>{const n=t.toLowerCase().split(" ");return t=>{if(Vo(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}},Xo=e=>t=>Vo(t)&&t.hasAttribute(e),Qo=e=>Vo(e)&&e.hasAttribute("data-mce-bogus"),Jo=e=>Vo(e)&&"TABLE"===e.tagName,Zo=e=>t=>{if(Wo(t)){if(t.contentEditable===e)return!0;if(t.getAttribute("data-mce-contenteditable")===e)return!0}return!1},er=Yo(["textarea","input"]),tr=$o(3),nr=$o(4),or=$o(7),rr=$o(8),sr=$o(9),ar=$o(11),ir=Ko("br"),lr=Ko("img"),dr=Zo("true"),cr=Zo("false"),mr=Yo(["td","th"]),ur=Yo(["td","th","caption"]),fr=Yo(["video","audio","object","embed"]),gr=Ko("li"),pr=Ko("details"),hr=Ko("summary"),br="\ufeff",vr=" ",yr=e=>e===br,Cr=((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}}})(Gt,"text"),wr=e=>Cr.get(e),xr=e=>Cr.getOption(e),Er=e=>{let t;return n=>(t=t||ie(e,F),ke(t,qt(n)))},_r=e=>Yt(e)&&"br"===qt(e),kr=Er(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),Sr=Er(["ul","ol","dl"]),Nr=Er(["li","dd","dt"]),Rr=Er(["thead","tbody","tfoot"]),Ar=Er(["td","th"]),Dr=Er(["pre","script","textarea","style"]),Tr=e=>{const t=zo(e,"br"),n=X((e=>{const t=[];let n=e.dom;for(;n;)t.push(yn.fromDom(n)),n=n.lastChild;return t})(e).slice(-1),_r);t.length===n.length&&K(n,xo)},Or=()=>{const e=yn.fromTag("br");return en(e,"data-mce-bogus","1"),e},Br=e=>{wo(e),vo(e,Or())},Pr=br,Lr=yr,Mr=e=>e.replace(/\uFEFF/g,""),Ir=Vo,Fr=tr,Ur=e=>(Fr(e)&&(e=e.parentNode),Ir(e)&&e.hasAttribute("data-mce-caret")),zr=e=>Fr(e)&&Lr(e.data),jr=e=>Ur(e)||zr(e),Hr=e=>e.firstChild!==e.lastChild||!ir(e.firstChild),$r=e=>{const t=e.container();return!!tr(t)&&(t.data.charAt(e.offset())===Pr||e.isAtStart()&&zr(t.previousSibling))},qr=e=>{const t=e.container();return!!tr(t)&&(t.data.charAt(e.offset()-1)===Pr||e.isAtEnd()&&zr(t.nextSibling))},Vr=e=>Fr(e)&&e.data[0]===Pr,Wr=e=>Fr(e)&&e.data[e.data.length-1]===Pr,Kr=e=>e&&e.hasAttribute("data-mce-caret")?((e=>{var t;const n=e.getElementsByTagName("br"),o=n[n.length-1];Qo(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,Yr=e=>Ur(e.startContainer),Gr=dr,Xr=cr,Qr=ir,Jr=tr,Zr=Yo(["script","style","textarea"]),es=Yo(["img","input","textarea","hr","iframe","video","audio","object","embed"]),ts=Yo(["table"]),ns=jr,os=e=>!ns(e)&&(Jr(e)?!Zr(e.parentNode):es(e)||Qr(e)||ts(e)||rs(e)),rs=e=>!(e=>Vo(e)&&"true"===e.getAttribute("unselectable"))(e)&&Xr(e),ss=(e,t)=>os(e)&&((e,t)=>{for(let n=e.parentNode;n&&n!==t;n=n.parentNode){if(rs(n))return!1;if(Gr(n))return!0}return!0})(e,t),as=/^[ \t\r\n]*$/,is=e=>as.test(e),ls=e=>{for(const t of e)if(!yr(t))return!1;return!0},ds=e=>"\n"===e||"\r"===e,cs=(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===vr?e.pcIsSpace||""===e.str&&n||e.str.length===s.length-1&&o||((e,t)=>t<e.length&&t>=0&&ds(e[t]))(s,e.str.length+1)?{pcIsSpace:!1,str:e.str+vr}:{pcIsSpace:!0,str:e.str+" "}:{pcIsSpace:ds(t),str:e.str+t}),{pcIsSpace:!1,str:""});return a.str},ms=(e,t)=>tr(e)&&is(e.data)&&!((e,t)=>{const n=yn.fromDom(t),o=yn.fromDom(e);return jo(o,"pre,code",O(En,n))})(e,t),us=(e,t)=>os(e)&&!ms(e,t)||(e=>Vo(e)&&"A"===e.nodeName&&!e.hasAttribute("href")&&(e.hasAttribute("name")||e.hasAttribute("id")))(e)||fs(e),fs=Xo("data-mce-bookmark"),gs=Xo("data-mce-bogus"),ps=(hs="data-mce-bogus",bs="all",e=>Vo(e)&&e.getAttribute(hs)===bs);var hs,bs;const vs=e=>An(yn.fromDom(e)).exists((e=>!oo(e))),ys=(e,t=!0)=>((e,t)=>{let n=0;if(us(e,e))return!1;{let o=e.firstChild;if(!o)return!0;const r=new Ho(o,e);do{if(t){if(ps(o)){o=r.next(!0);continue}if(gs(o)){o=r.next();continue}}if(dr(o)&&vs(o))return!1;if(ir(o))n++,o=r.next();else{if(us(o,e))return!1;o=r.next()}}while(o);return n<=1}})(e.dom,t),Cs=e=>"svg"===e.toLowerCase(),ws=e=>Cs(e.nodeName),xs=e=>"svg"===(null==e?void 0:e.nodeName)?"svg":"html",Es=["svg"],_s="data-mce-block",ks=e=>W((e=>X(ge(e),(e=>!/[A-Z]/.test(e))))(e),(e=>`${e}:`+W(Es,(t=>`not(${t} ${e})`)).join(":"))).join(","),Ss=(e,t)=>x(t.querySelector(e))?(t.setAttribute(_s,"true"),"inline-boundary"===t.getAttribute("data-mce-selected")&&t.removeAttribute("data-mce-selected"),!0):(t.removeAttribute(_s),!1),Ns=(e,t)=>{const n=ks(e.getTransparentElements()),o=ks(e.getBlockElements());return X(t.querySelectorAll(n),(e=>Ss(o,e)))},Rs=(e,t)=>{var n;const o=t?"lastChild":"firstChild";for(let t=e[o];t;t=t[o])if(ys(yn.fromDom(t)))return void(null===(n=t.parentNode)||void 0===n||n.removeChild(t))},As=(e,t,n)=>{const o=e.getBlockElements(),r=yn.fromDom(t),s=e=>qt(e)in o,a=e=>En(e,r);K(_o(n),(t=>{Xn(t,s,a).each((n=>{const o=((e,t)=>X(Ln(e),t))(t,(t=>s(t)&&!e.isValidChild(qt(n),qt(t))));if(o.length>0){const t=An(n);K(o,(e=>{Xn(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();Rs(r,!0),n.setStartAfter(t),n.setEndAfter(e);const s=n.extractContents();Rs(s,!1),ys(yn.fromDom(r))||o.insertBefore(r,e),ys(yn.fromDom(t))||o.insertBefore(t,e),ys(yn.fromDom(s))||o.insertBefore(s,e),o.removeChild(e)}})(t.dom,e.dom)}))})),t.each((t=>Ns(e,t.dom)))}}))}))},Ds=(e,t)=>{const n=Ns(e,t);As(e,t,n),((e,t,n)=>{K([...n,...Ls(e,t)?[t]:[]],(t=>K(zo(yn.fromDom(t),t.nodeName.toLowerCase()),(t=>{Ms(e,t.dom)&&Eo(t)}))))})(e,t,n)},Ts=(e,t)=>{if(Ps(e,t)){const n=ks(e.getBlockElements());Ss(n,t)}},Os=e=>e.hasAttribute(_s),Bs=(e,t)=>ke(e.getTransparentElements(),t),Ps=(e,t)=>Vo(t)&&Bs(e,t.nodeName),Ls=(e,t)=>Ps(e,t)&&Os(t),Ms=(e,t)=>Ps(e,t)&&!Os(t),Is=(e,t)=>1===t.type&&Bs(e,t.name)&&g(t.attr(_s)),Fs=Et().browser,Us=e=>ee(e,Yt),zs=(e,t)=>e.children&&q(e.children,t),js=(e,t,n)=>{let o=0,r=0;const s=e.ownerDocument;if(n=n||e,t){if(n===e&&t.getBoundingClientRect&&"static"===co(yn.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&&!zs(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&&!zs(a,n);)o-=a.scrollLeft||0,r-=a.scrollTop||0,a=a.parentNode;r+=(e=>Fs.isFirefox()&&"table"===qt(e)?Us(Ln(e)).filter((e=>"caption"===qt(e))).bind((e=>Us(Pn(e)).map((t=>{const n=t.dom.offsetTop,o=e.dom.offsetTop,r=e.dom.offsetHeight;return n<=o?-r:0})))).getOr(0):0)(yn.fromDom(t))}return{x:o,y:r}},Hs=(e,t={})=>{let n=0;const o={},r=yn.fromDom(e),s=Sn(r),a=e=>{vo(qn(r),e)},i=e=>{const t=qn(r);to(t,"#"+e).each(xo)},l=e=>_e(o,e).getOrThunk((()=>({id:"mce-u"+n++,passed:[],failed:[],count:0}))),d=e=>new Promise(((n,r)=>{let i;const d=Pt._addCacheSuffix(e),c=l(d);o[d]=c,c.count++;const m=(e,t)=>{K(e,M),c.status=t,c.passed=[],c.failed=[],i&&(i.onload=null,i.onerror=null,i=null)},u=()=>m(c.passed,2),f=()=>m(c.failed,3);if(n&&c.passed.push(n),r&&c.failed.push(r),1===c.status)return;if(2===c.status)return void u();if(3===c.status)return void f();c.status=1;const g=yn.fromTag("link",s.dom);tn(g,{rel:"stylesheet",type:"text/css",id:c.id}),t.contentCssCors&&en(g,"crossOrigin","anonymous"),t.referrerPolicy&&en(g,"referrerpolicy",t.referrerPolicy),i=g.dom,i.onload=u,i.onerror=f,a(g),en(g,"href",d)})),c=e=>{const t=Pt._addCacheSuffix(e);_e(o,t).each((e=>{0===--e.count&&(delete o[t],i(e.id))}))};return{load:d,loadRawCss:(e,t)=>{const n=l(e);o[e]=n,n.count++;const r=yn.fromTag("style",s.dom);tn(r,{rel:"stylesheet",type:"text/css",id:n.id}),r.dom.innerHTML=t,a(r)},loadAll:e=>Promise.allSettled(W(e,(e=>d(e).then(A(e))))).then((e=>{const t=G(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:c,unloadRawCss:e=>{_e(o,e).each((t=>{0===--t.count&&(delete o[e],i(t.id))}))},unloadAll:e=>{K(e,(e=>{c(e)}))},_setReferrerPolicy:e=>{t.referrerPolicy=e},_setContentCssCors:e=>{t.contentCssCors=e}}},$s=(()=>{const e=new WeakMap;return{forElement:(t,n)=>{const o=$n(t).dom;return U.from(e.get(o)).getOrThunk((()=>{const t=Hs(o,n);return e.set(o,t),t}))}}})(),qs=(e,t,n)=>x(e)&&(us(e,t)||n.isInline(e.nodeName.toLowerCase())),Vs=e=>(e=>"span"===e.nodeName.toLowerCase())(e)&&"bookmark"===e.getAttribute("data-mce-type"),Ws=(e,t,n)=>tr(e)&&e.data.length>0&&((e,t,n)=>{const o=new Ho(e,t).prev(!1),r=new Ho(e,t).next(!1),s=C(o)||qs(o,t,n),a=C(r)||qs(r,t,n);return s&&a})(e,t,n),Ks=(e,t,n,o)=>{var r;const s=o||t;if(Vo(t)&&Vs(t))return t;const a=t.childNodes;for(let t=a.length-1;t>=0;t--)Ks(e,a[t],n,s);if(Vo(t)){const e=t.childNodes;1===e.length&&Vs(e[0])&&(null===(r=t.parentNode)||void 0===r||r.insertBefore(e[0],t))}return(e=>ar(e)||sr(e))(t)||us(t,s)||(e=>!!Vo(e)&&e.childNodes.length>0)(t)||Ws(t,s,n)||e.remove(t),t},Ys=Pt.makeMap,Gs=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Xs=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Qs=/[<>&\"\']/g,Js=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,Zs={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:"Ÿ"},ea={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},ta={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},na=(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(!ea[r]){const t="&"+o[e+1]+";";n[r]=t,n[t]=r}}return n}},oa=na("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),ra=(e,t)=>e.replace(t?Gs:Xs,(e=>ea[e]||e)),sa=(e,t)=>e.replace(t?Gs:Xs,(e=>e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":ea[e]||"&#"+e.charCodeAt(0)+";")),aa=(e,t,n)=>{const o=n||oa;return e.replace(t?Gs:Xs,(e=>ea[e]||o[e]||e))},ia={encodeRaw:ra,encodeAllRaw:e=>(""+e).replace(Qs,(e=>ea[e]||e)),encodeNumeric:sa,encodeNamed:aa,getEncodeFunc:(e,t)=>{const n=na(t)||oa,o=(e,t)=>e.replace(t?Gs:Xs,(e=>void 0!==ea[e]?ea[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)=>aa(e,t,n),s=Ys(e.replace(/\+/g,","));return s.named&&s.numeric?o:s.named?t?r:aa:s.numeric?sa:ra},decode:e=>e.replace(Js,((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))):Zs[t]||String.fromCharCode(t):ta[e]||oa[e]||(e=>{const t=yn.fromTag("div").dom;return t.innerHTML=e,t.textContent||t.innerText||e})(e)))},la=(e,t)=>(e=Pt.trim(e))?e.split(t||" "):[],da=e=>new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$"),ca=(e,t)=>{const n=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)])?$/;return oe(la(t,","),(t=>{const o=n.exec(t);if(o){const t=o[1],n=o[2],r=o[3],s=o[4],a=o[5],i={attributes:{},attributesOrder:[]};if(e.each((e=>((e,t)=>{he(e.attributes,((e,n)=>{t.attributes[n]=e})),t.attributesOrder.push(...e.attributesOrder)})(e,i))),"#"===t?i.paddEmpty=!0:"-"===t&&(i.removeEmpty=!0),"!"===s&&(i.removeEmptyAttrs=!0),a&&((e,t)=>{const n=/^([!\-])?(\w+[\\:]:\w+|[^=~<]+)?(?:([=~<])(.*))?$/,o=/[*?+]/,{attributes:r,attributesOrder:s}=t;K(la(e,"|"),(e=>{const a=n.exec(e);if(a){const e={},n=a[1],i=a[2].replace(/[\\:]:/g,":"),l=a[3],d=a[4];if("!"===n&&(t.attributesRequired=t.attributesRequired||[],t.attributesRequired.push(i),e.required=!0),"-"===n)return delete r[i],void s.splice(Pt.inArray(s,i),1);if(l&&("="===l?(t.attributesDefault=t.attributesDefault||[],t.attributesDefault.push({name:i,value:d}),e.defaultValue=d):"~"===l?(t.attributesForced=t.attributesForced||[],t.attributesForced.push({name:i,value:d}),e.forcedValue=d):"<"===l&&(e.validValues=Pt.makeMap(d,"?"))),o.test(i)){const n=e;t.attributePatterns=t.attributePatterns||[],n.pattern=da(i),t.attributePatterns.push(n)}else r[i]||s.push(i),r[i]=e}}))})(a,i),r&&(i.outputName=n),"@"===n){if(!e.isNone())return[];e=U.some(i)}return[r?{name:n,element:i,aliasName:r}:{name:n,element:i}]}return[]}))},ma={},ua=Pt.makeMap,fa=Pt.each,ga=Pt.extend,pa=Pt.explode,ha=(e,t={})=>{const n=ua(e," ",ua(e.toUpperCase()," "));return ga(n,t)},ba=e=>ha("td th li dt dd figcaption caption details summary",e.getTextBlockElements()),va=(e,t)=>{if(e){const n={};return g(e)&&(e={"*":e}),fa(e,((e,o)=>{n[o]=n[o.toUpperCase()]="map"===t?ua(e,/[, ]/):pa(e,/[, ]/)})),n}},ya=(e={})=>{var t;const n={},o={};let r=[];const s={},a={},i=(t,n,o)=>{const r=e[t];if(r)return ua(r,/[, ]/,ua(r.toUpperCase(),/[, ]/));{let e=ma[t];return e||(e=ha(n,o),ma[t]=e),e}},l=null!==(t=e.schema)&&void 0!==t?t:"html5",d=(e=>{const{globalAttributes:t,phrasingContent:n,flowContent:o}=(e=>{let t,n,o;t="id accesskey class dir lang style tabindex title role",n="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",o="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment","html4"!==e&&(t+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",n+=" article aside details dialog figure main header footer hgroup section nav a ins del canvas map",o+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen svg"),"html5-strict"!==e&&(t+=" xml:lang",o=[o,"acronym applet basefont big font strike tt"].join(" "),n=[n,"center dir isindex noframes"].join(" "));const r=[n,o].join(" ");return{globalAttributes:t,blockContent:n,phrasingContent:o,flowContent:r}})(e),r={},s=(e,t,n)=>{r[e]={attributes:ie(t,A({})),attributesOrder:t,children:ie(n,A({}))}},a=(e,n="",o="")=>{const r=la(o),a=la(e);let i=a.length;const l=la([t,n].join(" "));for(;i--;)s(a[i],l.slice(),r)},i=(e,t)=>{const n=la(e),o=la(t);let s=n.length;for(;s--;){const e=r[n[s]];for(let t=0,n=o.length;t<n;t++)e.attributes[o[t]]={},e.attributesOrder.push(o[t])}};"html5-strict"!==e&&(K(la("acronym applet basefont big font strike tt"),(e=>{a(e,"",n)})),K(la("center dir isindex noframes"),(e=>{a(e,"",o)})));return 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",o),a("dd div","",o),a("address dt caption","","html4"===e?n:o),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","",n),a("blockquote","cite",o),a("ol","reversed start type","li"),a("ul","","li"),a("li","value",o),a("dl","","dt dd"),a("a","href target rel media hreflang type","html4"===e?n:o),a("q","cite",n),a("ins del","cite datetime",o),a("img","src sizes srcset alt usemap ismap width height"),a("iframe","src name width height",o),a("embed","src type width height"),a("object","data type typemustmatch name usemap form width height",[o,"param"].join(" ")),a("param","name value"),a("map","name",[o,"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",o),a("th","colspan rowspan headers scope abbr",o),a("form","accept-charset action autocomplete enctype method name novalidate target",o),a("fieldset","disabled form name",[o,"legend"].join(" ")),a("label","form for",n),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?o:n),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",[o,"li"].join(" ")),a("noscript","",o),"html4"!==e&&(a("wbr"),a("ruby","",[n,"rt rp"].join(" ")),a("figcaption","",o),a("mark rt rp bdi","",n),a("summary","",[n,"h1 h2 h3 h4 h5 h6"].join(" ")),a("canvas","width height",o),a("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[o,"track source"].join(" ")),a("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[o,"track source"].join(" ")),a("picture","","img source"),a("source","src srcset type media sizes"),a("track","kind src srclang label default"),a("datalist","",[n,"option"].join(" ")),a("article section nav aside main header footer","",o),a("hgroup","","h1 h2 h3 h4 h5 h6"),a("figure","",[o,"figcaption"].join(" ")),a("time","datetime",n),a("dialog","open",o),a("command","type label icon disabled checked radiogroup command"),a("output","for form name",n),a("progress","value max",n),a("meter","value min max low high optimum",n),a("details","open",[o,"summary"].join(" ")),a("keygen","autofocus challenge disabled form keytype name"),s("svg","id tabindex lang xml:space class style x y width height viewBox preserveAspectRatio zoomAndPan transform".split(" "),[])),"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([r.video,r.audio],(e=>{delete e.children.audio,delete e.children.video})),K(la("a form meter progress dfn"),(e=>{r[e]&&delete r[e].children[e]})),delete r.caption.children.table,delete r.script,r})(l);!1===e.verify_html&&(e.valid_elements="*[*]");const c=va(e.valid_styles),m=va(e.invalid_styles,"map"),u=va(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 svg",p),y=i("move_caret_before_on_enter_elements",b+" table",p),C="h1 h2 h3 h4 h5 h6",w=i("text_block_elements",C+" p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),x=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 html body multicol listing",w),E=i("text_inline_elements","span strong b em i font s strike u var cite dfn code mark q sup sub samp"),_=i("transparent_elements","a ins del canvas map"),k=i("wrap_block_elements","pre "+C);fa("script noscript iframe noframes noembed title style textarea xmp plaintext".split(" "),(e=>{a[e]=new RegExp("</"+e+"[^>]*>","gi")}));const S=e=>{const t=U.from(n["@"]),o=/[*?+]/;K(ca(t,null!=e?e:""),(({name:e,element:t,aliasName:s})=>{if(s&&(n[s]=t),o.test(e)){const n=t;n.pattern=da(e),r.push(n)}else n[e]=t}))},N=e=>{r=[],K(ge(n),(e=>{delete n[e]})),S(e)},R=e=>{delete ma.text_block_elements,delete ma.block_elements,K((e=>{const t=/^(~)?(.+)$/;return oe(la(e,","),(e=>{const n=t.exec(e);if(n){const e="~"===n[1];return[{inline:e,cloneName:e?"span":"div",name:n[2]}]}return[]}))})(null!=e?e:""),(({inline:e,name:t,cloneName:r})=>{if(o[t]=o[r],s[t]=r,v[t.toUpperCase()]={},v[t]={},e||(x[t.toUpperCase()]={},x[t]={}),!n[t]){let e=n[r];e=ga({},e),delete e.removeEmptyAttrs,delete e.removeEmpty,n[t]=e}he(o,((e,n)=>{e[r]&&(o[n]=e=ga({},o[n]),e[t]=e[r])}))}))},D=e=>{K((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]+)\[([^\]]+)]$/;return oe(la(e,","),(e=>{const n=t.exec(e);if(n){const e=n[1],t=e?(e=>"-"===e?"remove":"add")(e):"replace";return[{operation:t,name:n[2],validChildren:la(n[3],"|")}]}return[]}))})(null!=e?e:""),(({operation:e,name:t,validChildren:n})=>{const r="replace"===e?{"#comment":{}}:o[t];K(n,(t=>{"remove"===e?delete r[t]:r[t]={}})),o[t]=r}))},T=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?(N(e.valid_elements),fa(d,((e,t)=>{o[t]=e.children}))):(fa(d,((e,t)=>{n[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},o[t]=e.children})),fa(la("strong/b em/i"),(e=>{const t=la(e,"/");n[t[1]].outputName=t[0]})),fa(E,((t,o)=>{n[o]&&(e.padd_empty_block_inline_children&&(n[o].paddInEmptyBlock=!0),n[o].removeEmpty=!0)})),fa(la("ol ul blockquote a table tbody"),(e=>{n[e]&&(n[e].removeEmpty=!0)})),fa(la("p h1 h2 h3 h4 h5 h6 th td pre div address caption li summary"),(e=>{n[e]&&(n[e].paddEmpty=!0)})),fa(la("span"),(e=>{n[e].removeEmptyAttrs=!0}))),delete n.svg,R(e.custom_elements),D(e.valid_children),S(e.extended_valid_elements),D("+ol[ul|ol],+ul[ul|ol]"),fa({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=la(e))})),e.invalid_elements&&fa(pa(e.invalid_elements),(e=>{n[e]&&delete n[e]})),T("span")||S("span[!data-mce-type|*]");const O=A(c),B=A(m),P=A(u),L=A(h),M=A(x),I=A(w),F=A(E),z=A(Object.seal(p)),j=A(g),H=A(v),$=A(y),q=A(f),V=A(_),W=A(k),Y=A(Object.seal(a)),G=(e,t)=>{const n=T(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},X=e=>ke(M(),e),Q=e=>!qe(e,"#")&&G(e)&&!X(e),J=A(s);return{type:l,children:o,elements:n,getValidStyles:O,getValidClasses:P,getBlockElements:M,getInvalidStyles:B,getVoidElements:z,getTextBlockElements:I,getTextInlineElements:F,getBoolAttrs:L,getElementRule:T,getSelfClosingElements:j,getNonEmptyElements:H,getMoveCaretBeforeOnEnterElements:$,getWhitespaceElements:q,getTransparentElements:V,getSpecialElements:Y,isValidChild:(e,t)=>{const n=o[e.toLowerCase()];return!(!n||!n[t.toLowerCase()])},isValid:G,isBlock:X,isInline:Q,isWrapper:e=>ke(W(),e)||Q(e),getCustomElements:J,addValidElements:S,setValidElements:N,addCustomElements:R,addValidChildren:D}},Ca=e=>He(e,"#").toUpperCase(),wa=e=>{const t=e.toString(16);return(1===t.length?"0"+t:t).toUpperCase()},xa=e=>(e=>({value:Ca(e)}))(wa(e.red)+wa(e.green)+wa(e.blue)),Ea=/^\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)\s*$/i,_a=/^\s*rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?(?:\.\d+)?)\s*\)\s*$/i,ka=(e,t,n,o)=>({red:e,green:t,blue:n,alpha:o}),Sa=(e,t,n,o)=>{const r=parseInt(e,10),s=parseInt(t,10),a=parseInt(n,10),i=parseFloat(o);return ka(r,s,a,i)},Na=e=>{if("transparent"===e)return U.some(ka(0,0,0,0));const t=Ea.exec(e);if(null!==t)return U.some(Sa(t[1],t[2],t[3],"1"));const n=_a.exec(e);return null!==n?U.some(Sa(n[1],n[2],n[3],n[4])):U.none()},Ra=e=>`rgba(${e.red},${e.green},${e.blue},${e.alpha})`,Aa=e=>Na(e).map(xa).map((e=>"#"+e.value)).getOr(e),Da=(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=br;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.indexOf(",")>-1?[t]:t.split(" ");let o=n.length;for(;o--;)if(n[o]!==n[0])return!1;return a[e]=n[0],!0},p=e=>(i=!0,s[e]),h=(e,t)=>(i&&(e=e.replace(/\uFEFF[0-9]/g,(e=>s[e]))),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e),b=e=>String.fromCharCode(parseInt(e.slice(1),16)),v=e=>e.replace(/\\[0-9a-f]+/gi,b),y=(t,n,o,r,s,a)=>{if(s=s||a)return"'"+(s=h(s)).replace(/\'/g,"\\'")+"'";if(n=h(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,p).replace(/\"[^\"]+\"|\'[^\']+\'/g,(e=>e.replace(/[;:]/g,p)));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=v(t),d=v(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()),g(e.force_hex_color)&&"off"!==e.force_hex_color&&Na(d).each((t=>{"always"!==e.force_hex_color&&1!==t.alpha||(d=Aa(Ra(t)))})),d=d.replace(n,y),a[t]=i?h(d,!0):d}}u("border","",!0),u("border","-width"),u("border","-color"),u("border","-style"),u("padding",""),u("margin",""),C="border",x="border-style",E="border-color",f(w="border-width")&&f(x)&&f(E)&&(a[C]=a[w]+" "+a[x]+" "+a[E],delete a[w],delete a[x],delete a[E]),"medium none"===a.border&&delete a.border,"none"===a["border-image"]&&delete a["border-image"]}var C,w,x,E;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},Ta={keyLocation:!0,layerX:!0,layerY:!0,returnValue:!0,webkitMovementX:!0,webkitMovementY:!0,keyIdentifier:!0,mozPressure:!0},Oa=e=>w(e.preventDefault)||(e=>e instanceof Event||E(e.initEvent))(e),Ba=(e,t)=>{const n=null!=t?t:{};for(const t in e)ke(Ta,t)||(n[t]=e[t]);return x(e.composedPath)&&(n.composedPath=()=>e.composedPath()),x(e.getModifierState)&&(n.getModifierState=t=>e.getModifierState(t)),x(e.getTargetRanges)&&(n.getTargetRanges=()=>e.getTargetRanges()),n},Pa=(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),Oa(t)&&(s.preventDefault=()=>{s.defaultPrevented=!0,s.isDefaultPrevented=F,E(t.preventDefault)&&t.preventDefault()},s.stopPropagation=()=>{s.cancelBubble=!0,s.isPropagationStopped=F,E(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},La=/^(?:mouse|contextmenu)|click/,Ma=(e,t,n,o)=>{e.addEventListener(t,n,o||!1)},Ia=(e,t,n,o)=>{e.removeEventListener(t,n,o||!1)},Fa=(e,t)=>{const n=Pa(e.type,e,document,t);if((e=>x(e)&&La.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},Ua=(e,t,n)=>{const o=e.document,r={type:"ready"};if(n.domLoaded)return void t(r);const s=()=>{Ia(e,"DOMContentLoaded",s),Ia(e,"load",s),n.domLoaded||(n.domLoaded=!0,t(r)),e=null};"complete"===o.readyState||"interactive"===o.readyState&&o.body?s():Ma(e,"DOMContentLoaded",s),n.domLoaded||Ma(e,"load",s)};class za{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(Fa(e||a.event),l)};if(!e||tr(e)||rr(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,Fa({type:t})):(r.hasFocusIn||"focusin"!==t&&"focusout"!==t||(u=!0,f="focusin"===t?"focus":"blur",m=e=>{const t=Fa(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(Fa({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?Ua(e,m,r):Ma(e,f||t,m,u)))}return e=s=null,n}unbind(e,t,n){if(!e||tr(e)||rr(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],Ia(e,a.fakeName||t,a.nativeHandler,a.capture))}}}else he(r,((t,n)=>{Ia(e,t.fakeName||n,t.nativeHandler,t.capture)})),r={};for(const e in r)if(ke(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||tr(e)||rr(e))return this;const o=Fa({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||tr(e)||rr(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}}}za.Event=new za;const ja=Pt.each,Ha=Pt.grep,$a="data-mce-style",qa=Pt.makeMap("fill-opacity font-weight line-height opacity orphans widows z-index zoom"," "),Va=(e,t,n)=>{w(n)||""===n?sn(e,t):en(e,t,n)},Wa=e=>e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),Ka=(e,t)=>{let n=0;if(e)for(let o=e.nodeType,r=e.previousSibling;r;r=r.previousSibling){const e=r.nodeType;(!t||!tr(r)||e!==o&&r.data.length)&&(n++,o=e)}return n},Ya=(e,t)=>{const n=nn(t,"style"),o=e.serialize(e.parse(n),qt(t));Va(t,$a,o)},Ga=(e,t,n)=>{const o=Wa(t);w(n)||""===n?go(e,o):io(e,o,((e,t)=>_(e)?ke(qa,t)?e+"":e+"px":e)(n,o))},Xa=(e,t={})=>{const n={},o=window,r={};let s=0;const a=$s.forElement(yn.fromDom(e),{contentCssCors:t.contentCssCors,referrerPolicy:t.referrerPolicy}),i=[],l=t.schema?t.schema:ya({}),d=Da({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope,force_hex_color:t.force_hex_color},t.schema),c=t.ownEvents?new za:za.Event,m=l.getBlockElements(),u=t=>t&&e&&g(t)?e.getElementById(t):t,f=e=>{const t=u(e);return x(t)?yn.fromDom(t):null},p=(e,t,n="")=>{let o;const r=f(e);if(x(r)&&Yt(r)){const e=Y[t];o=e&&e.get?e.get(r.dom,t):nn(r,t)}return x(o)?o:n},h=e=>{const t=u(e);return w(t)?[]:t.attributes},v=(e,n,o)=>{T(e,(e=>{if(Vo(e)){const r=yn.fromDom(e),s=""===o?null:o,a=nn(r,n),i=Y[n];i&&i.set?i.set(r.dom,s,n):Va(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)=>js(e.body,u(t),n),_=(e,t,n)=>{const o=u(e);var r;if(!w(o)&&(Wo(o)||Vo(r=o)&&"http://www.w3.org/2000/svg"===r.namespaceURI))return n?co(yn.fromDom(o),Wa(t)):("float"===(t=t.replace(/-(\D)/g,((e,t)=>t.toUpperCase())))&&(t="cssFloat"),o.style?o.style[t]:void 0)},k=e=>{const t=u(e);if(!t)return{w:0,h:0};let n=_(t,"width"),o=_(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 V(n,(e=>wn(yn.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=Vo;else{const e=t;t=t=>N(t,e)}for(;s&&!(s===a||w(s.nodeType)||sr(s)||ar(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(E(o)&&o(t))return t}return null},T=function(e,t,n){const o=null!=n?n:this;if(b(e)){const n=[];return ja(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)}},O=(e,t)=>{T(e,(e=>{he(t,((t,n)=>{v(e,n,t)}))}))},B=(e,t)=>{T(e,(e=>{const n=yn.fromDom(e);So(n,t)}))},P=(t,n,o,r,s)=>T(t,(t=>{const a=g(n)?e.createElement(n):n;return x(o)&&O(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=ia.encodeAllRaw,I=(e,t)=>T(e,(e=>{const n=yn.fromDom(e);return t&&K(Ln(n),(e=>{Gt(e)&&0===e.dom.length?xo(e):po(n,e)})),xo(n),n.dom})),F=(e,t,n)=>{T(e,(e=>{if(Vo(e)){const o=yn.fromDom(e),r=t.split(" ");K(r,(e=>{if(x(n)){(n?fn:pn)(o,e)}else hn(o,e)}))}}))},U=(e,t,n)=>T(t,(o=>{var r;const s=b(t)?e.cloneNode(!0):e;return n&&ja(Ha(o.childNodes),(e=>{s.appendChild(e)})),null===(r=o.parentNode)||void 0===r||r.replaceChild(s,o),o})),z=e=>{if(Vo(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)},q=e=>{if(e&&Wo(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)?ke(m,e):Vo(e)&&(ke(m,e.nodeName)||Ls(l,e)),root:null,clone:(e,t)=>e.cloneNode(t),getRoot:y,getViewPort:e=>{const t=Fo(e);return{x:t.x,y:t.y,w:t.width,h:t.height}},getRect:e=>{const t=u(e),n=C(t),o=k(t);return{x:n.x,y:n.y,w:o.w,h:o.h}},getSize:k,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 E(a.querySelectorAll)?ue(a.querySelectorAll(n)):[]},is:N,add:P,create:L,createHTML:(e,t,n="")=>{let o="<"+e;for(const e in t)Se(t,e)&&(o+=" "+e+'="'+M(t[e])+'"');return Qe(n)&&ke(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)=>{T(e,(e=>{const r=yn.fromDom(e);Ga(r,n,o),t.update_styles&&Ya(d,r)}))},getStyle:_,setStyles:(e,n)=>{T(e,(e=>{const o=yn.fromDom(e);he(n,((e,t)=>{Ga(o,t,e)})),t.update_styles&&Ya(d,o)}))},removeAllAttribs:e=>T(e,(e=>{const t=e.attributes;for(let n=t.length-1;n>=0;n--)e.removeAttributeNode(t.item(n))})),setAttrib:v,setAttribs:O,getAttrib:p,getPos:C,parseStyle:e=>d.parse(e),serializeStyle:(e,t)=>d.serialize(e,t),addStyle:t=>{if(W!==Xa.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(S)}))},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=>bn(n,e)))},toggleClass:F,show:e=>{T(e,(e=>go(yn.fromDom(e),"display")))},hide:e=>{T(e,(e=>io(yn.fromDom(e),"display","none")))},isHidden:e=>{const t=f(e);return x(t)&&Lt(uo(t,"display"),"none")},uniqueId:e=>(e||"mce_")+s++,setHTML:B,getOuterHTML:e=>{const t=f(e);return x(t)?Vo(t.dom)?t.dom.outerHTML:(e=>{const t=yn.fromTag("div"),n=yn.fromDom(e.dom.cloneNode(!0));return vo(t,n),ko(t)})(t):""},setOuterHTML:(e,t)=>{T(e,(e=>{Vo(e)&&(e.outerHTML=t)}))},decode:ia.decode,encode:M,insertAfter:(e,t)=>{const n=u(t);return T(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 ja(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:T,getAttribs:h,isEmpty:(e,t,n)=>{let o=0;if(z(e))return!1;const r=e.firstChild;if(r){const s=new Ho(r,e),a=l?l.getWhitespaceElements():{},i=t||(l?l.getNonEmptyElements():null);let d=r;do{if(Vo(d)){const e=d.getAttribute("data-mce-bogus");if(e){d=s.next("all"===e);continue}const t=d.nodeName.toLowerCase();if(i&&i[t]){if("br"===t){o++,d=s.next();continue}return!1}if(z(d))return!1}if(rr(d))return!1;if(tr(d)&&!is(d.data)&&(!(null==n?void 0:n.includeZwsp)||!ls(d.data)))return!1;if(tr(d)&&d.parentNode&&a[d.parentNode.nodeName]&&is(d.data))return!1;d=s.next()}while(d)}return o<=1},createRng:j,nodeIndex:Ka,split:(e,t,n)=>{let o,r,s=j();if(e&&t&&e.parentNode&&t.parentNode){const a=e.parentNode;return s.setStart(a,Ka(e)),s.setEnd(t.parentNode,Ka(t)),o=s.extractContents(),s=j(),s.setStart(t.parentNode,Ka(t)+1),s.setEnd(a,Ka(e)+1),r=s.extractContents(),a.insertBefore(Ks(W,o,l),e),n?a.insertBefore(n,e):a.insertBefore(t,e),a.insertBefore(Ks(W,r,l),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:q,getContentEditableParent:e=>{const t=y();let n=null;for(let o=e;o&&o!==t&&(n=q(o),null===n);o=o.parentNode);return n},isEditable:e=>{if(x(e)){const t=Vo(e)?e:e.parentElement;return x(t)&&Wo(t)&&oo(yn.fromDom(t))}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},Y=((e,t,n)=>{const o=t.keep_values,r={set:(e,o,r)=>{const s=yn.fromDom(e);E(t.url_converter)&&x(o)&&(o=t.url_converter.call(t.url_converter_scope||n(),String(o),r,e)),Va(s,"data-mce-"+r,o),Va(s,r,o)},get:(e,t)=>{const n=yn.fromDom(e);return nn(n,"data-mce-"+t)||nn(n,t)}},s={style:{set:(t,n)=>{const r=yn.fromDom(t);o&&Va(r,$a,n),sn(r,"style"),g(n)&&lo(r,e.parse(n))},get:t=>{const n=yn.fromDom(t),o=nn(n,$a)||nn(n,"style");return e.serialize(e.parse(o),qt(n))}}};return o&&(s.href=s.src=r),s})(d,t,A(W));return W};Xa.DOM=Xa(document),Xa.nodeIndex=Ka;const Qa=Xa.DOM;class Ja{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=Qa;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)=>{_e(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)}}Ja.ScriptLoader=new Ja;const Za=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},ei={},ti=Za("en"),ni=()=>_e(ei,ti.get()),oi={getData:()=>be(ei,(e=>({...e}))),setCode:e=>{e&&ti.set(e)},getCode:()=>ti.get(),add:(e,t)=>{let n=ei[e];n||(ei[e]=n={});const o=W(ge(t),(e=>e.toLowerCase()));he(t,((e,r)=>{const s=r.toLowerCase();s!==r&&((e,t)=>{const n=e.indexOf(t);return-1!==n&&e.indexOf(t,n+1)>n})(o,s)?(ke(t,s)||(n[s]=e),n[r]=e):n[s]=e}))},translate:e=>{const t=ni().getOr({}),n=e=>E(e)?Object.prototype.toString.call(e):o(e)?"":""+e,o=e=>""===e||null==e,r=e=>{const o=n(e);return ke(t,o)?n(t[o]):_e(t,o.toLowerCase()).map(n).getOr(o)},s=e=>e.replace(/{context:\w+}$/,"");if(o(e))return"";if(p(a=e)&&ke(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)=>ke(t,o)?n(t[o]):e)))}return s(r(e))},isRtl:()=>ni().bind((e=>_e(e,"_dir"))).exists((e=>"rtl"===e)),hasCode:e=>ke(ei,e)},ri=()=>{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=>ke(t,e),a=(e,n)=>{const o=oi.getCode();!o||n&&-1===(","+(n||"")+",").indexOf(","+o+",")||Ja.ScriptLoader.add(t[e]+"/langs/"+o+".js")},i=(e,t="added")=>"added"===t&&(e=>ke(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!==ri.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=ri.baseURL+"/"+s),t[e]=s.substring(0,s.lastIndexOf("/"));const a=()=>(r(e,"loaded"),Promise.resolve());return n[e]?a():Ja.ScriptLoader.add(s).then(a)},waitFor:i}};ri.languageLoad=!0,ri.baseURL="",ri.PluginManager=ri(),ri.ThemeManager=ri(),ri.ModelManager=ri();const si=e=>{const t=Za(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)))}}},ai=()=>{const e=(e=>{const t=Za(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))}}})(S);return{...e,on:t=>e.get().each(t)}},ii=(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))}}},li=(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)}}},di=A("mce-annotation"),ci=A("data-mce-annotation"),mi=A("data-mce-annotation-uid"),ui=A("data-mce-annotation-active"),fi=A("data-mce-annotation-classes"),gi=A("data-mce-annotation-attrs"),pi=e=>t=>En(t,e),hi=(e,t)=>{const n=e.selection.getRng(),o=yn.fromDom(n.startContainer),r=yn.fromDom(e.getBody()),s=t.fold((()=>"."+di()),(e=>`[${ci()}="${e}"]`)),a=Mn(o,n.startOffset).getOr(o);return no(a,s,pi(r)).bind((t=>on(t,`${mi()}`).bind((n=>on(t,`${ci()}`).map((t=>{const o=vi(e,n);return{uid:n,name:t,elements:o}}))))))},bi=(e,t)=>rn(e,"data-mce-bogus")||jo(e,'[data-mce-bogus="all"]',pi(t)),vi=(e,t)=>{const n=yn.fromDom(e.getBody()),o=zo(n,`[${mi()}="${t}"]`);return X(o,(e=>!bi(e,n)))},yi=(e,t)=>{const n=yn.fromDom(e.getBody()),o=zo(n,`[${ci()}="${t}"]`),r={};return K(o,(e=>{if(!bi(e,n)){const t=nn(e,mi()),n=_e(r,t).getOr([]);r[t]=n.concat([e])}})),r},Ci=(e,t)=>{const n=Za({}),o=()=>({listeners:[],previous:ai()}),r=(e,t)=>{s(e,(e=>(t(e),e)))},s=(e,t)=>{const r=n.get(),s=t(_e(r,e).getOrThunk(o));r[e]=s,n.set(r)},a=(t,n)=>{K(vi(e,t),(e=>{n?en(e,ui(),"true"):sn(e,ui())}))},i=li((()=>{const n=le(t.getNames());K(n,(t=>{s(t,(n=>{const o=n.previous.get();return hi(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 wi=0;const xi=e=>{const t=(new Date).getTime(),n=Math.floor(1e9*Math.random());return wi++,e+"_"+n+wi+String(t)},Ei=(e,t)=>yn.fromDom(e.dom.cloneNode(t)),_i=e=>Ei(e,!1),ki=e=>Ei(e,!0),Si=(e,t)=>{const n=((e,t)=>{const n=yn.fromTag(t),o=an(e);return tn(n,o),n})(e,t);ho(e,n);const o=Ln(e);return Co(n,o),xo(e),n},Ni=(e,t,n=I)=>{const o=new Ho(e,t),r=e=>{let t;do{t=o[e]()}while(t&&!tr(t)&&!n(t));return U.from(t).filter(tr)};return{current:()=>U.from(o.current()).filter(tr),next:()=>r("next"),prev:()=>r("prev"),prev2:()=>r("prev2")}},Ri=(e,t)=>{const n=t||(t=>e.isBlock(t)||ir(t)||cr(t)),o=(e,t,n,r)=>{if(tr(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=Ni(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=Ni(t,null!=a?a:e.getRoot(),n);return o(t,r,(()=>i.next().map((e=>({container:e,offset:0})))),s).getOrNull()}}},Ai=Math.round,Di=e=>e?{left:Ai(e.left),top:Ai(e.top),bottom:Ai(e.bottom),right:Ai(e.right),width:Ai(e.width),height:Ai(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0},Ti=(e,t)=>(e=Di(e),t||(e.left=e.left+e.width),e.right=e.left,e.width=0,e),Oi=(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)&&Oi(t.top-e.bottom,e,t)},Pi=(e,t)=>e.top>t.bottom||!(e.bottom<t.top)&&Oi(t.bottom-e.top,e,t),Li=(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))},Mi=e=>{const t=e.startContainer,n=e.startOffset;return t===e.endContainer&&t.hasChildNodes()&&e.endOffset===n+1?t.childNodes[n]:null},Ii=(e,t)=>{if(Vo(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},Fi=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ंऺ़ु-ै्॑-ॗॢ-ॣঁ়াু-ৄ্ৗৢ-ৣਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼ુ-ૅે-ૈ્ૢ-ૣଁ଼ାିୁ-ୄ୍ୖୗୢ-ୣஂாீ்ௗఀా-ీె-ైొ-్ౕ-ౖౢ-ౣಁ಼ಿೂೆೌ-್ೕ-ೖೢ-ೣഁാു-ൄ്ൗൢ-ൣ්ාි-ුූෟัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹᷀-᷵᷼-᷿‌-‍⃐-⃜⃝-⃠⃡⃢-⃤⃥-⃰⳯-⵿⳱ⷠ-〪ⷿ-〭〮-゙〯-゚꙯꙰-꙲ꙴ-꙽ꚞ-ꚟ꛰-꛱ꠂ꠆ꠋꠥ-ꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-゙︯-゚]"),Ui=e=>g(e)&&e.charCodeAt(0)>=768&&Fi.test(e),zi=Vo,ji=os,Hi=Go("display","block table"),$i=Go("float","left right"),qi=((...e)=>t=>{for(let n=0;n<e.length;n++)if(!e[n](t))return!1;return!0})(zi,ji,B($i)),Vi=B(Go("white-space","pre pre-line pre-wrap")),Wi=tr,Ki=ir,Yi=Xa.nodeIndex,Gi=(e,t)=>t<0&&Vo(e)&&e.hasChildNodes()?void 0:Ii(e,t),Xi=e=>e?e.createRange():Xa.DOM.createRng(),Qi=e=>g(e)&&/[\r\n\t ]/.test(e),Ji=e=>!!e.setStart&&!!e.setEnd,Zi=e=>{const t=e.startContainer,n=e.startOffset;if(Qi(e.toString())&&Vi(t.parentNode)&&tr(t)){const e=t.data;if(Qi(e[n-1])||Qi(e[n+1]))return!0}return!1},el=e=>0===e.left&&0===e.right&&0===e.top&&0===e.bottom,tl=e=>{var t;let n;const o=e.getClientRects();return n=o.length>0?Di(o[0]):Di(e.getBoundingClientRect()),!Ji(e)&&Ki(e)&&el(n)?(e=>{const t=e.ownerDocument,n=Xi(t),o=t.createTextNode(vr),r=e.parentNode;r.insertBefore(o,e),n.setStart(o,0),n.setEnd(o,1);const s=Di(n.getBoundingClientRect());return r.removeChild(o),s})(e):el(n)&&Ji(e)&&null!==(t=(e=>{const t=e.startContainer,n=e.endContainer,o=e.startOffset,r=e.endOffset;if(t===n&&tr(n)&&0===o&&1===r){const t=e.cloneRange();return t.setEndAfter(n),tl(t)}return null})(e))&&void 0!==t?t:n},nl=(e,t)=>{const n=Ti(e,t);return n.width=1,n.right=n.left+1,n},ol=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=Xi(e.ownerDocument);if(t<e.data.length){if(Ui(e.data[t]))return;if(Ui(e.data[t-1])&&(o.setStart(e,t),o.setEnd(e,t+1),!Zi(o)))return void n(nl(tl(o),!1))}t>0&&(o.setStart(e,t-1),o.setEnd(e,t),Zi(o)||n(nl(tl(o),!1))),t<e.data.length&&(o.setStart(e,t),o.setEnd(e,t+1),Zi(o)||n(nl(tl(o),!0)))},r=e.container(),s=e.offset();if(Wi(r))return o(r,s),t;if(zi(r))if(e.isAtEnd()){const e=Gi(r,s);Wi(e)&&o(e,e.data.length),qi(e)&&!Ki(e)&&n(nl(tl(e),!1))}else{const a=Gi(r,s);if(Wi(a)&&o(a,0),qi(a)&&e.isAtEnd())return n(nl(tl(a),!1)),t;const i=Gi(e.container(),e.offset()-1);qi(i)&&!Ki(i)&&(Hi(i)||Hi(a)||!qi(a))&&n(nl(tl(i),!1)),qi(a)&&n(nl(tl(a),!0))}return t},rl=(e,t,n)=>{const o=()=>(n||(n=ol(rl(e,t))),n);return{container:A(e),offset:A(t),toRange:()=>{const n=Xi(e.ownerDocument);return n.setStart(e,t),n.setEnd(e,t),n},getClientRects:o,isVisible:()=>o().length>0,isAtStart:()=>(Wi(e),0===t),isAtEnd:()=>Wi(e)?t>=e.data.length:t>=e.childNodes.length,isEqual:n=>n&&e===n.container()&&t===n.offset(),getNode:n=>Gi(e,n?t-1:t)}};rl.fromRangeStart=e=>rl(e.startContainer,e.startOffset),rl.fromRangeEnd=e=>rl(e.endContainer,e.endOffset),rl.after=e=>rl(e.parentNode,Yi(e)+1),rl.before=e=>rl(e.parentNode,Yi(e)),rl.isAbove=(e,t)=>It(ce(t.getClientRects()),me(e.getClientRects()),Bi).getOr(!1),rl.isBelow=(e,t)=>It(me(t.getClientRects()),ce(e.getClientRects()),Pi).getOr(!1),rl.isAtStart=e=>!!e&&e.isAtStart(),rl.isAtEnd=e=>!!e&&e.isAtEnd(),rl.isTextPosition=e=>!!e&&tr(e.container()),rl.isElementPosition=e=>!rl.isTextPosition(e);const sl=(e,t)=>{tr(t)&&0===t.data.length&&e.remove(t)},al=(e,t,n)=>{ar(n)?((e,t,n)=>{const o=U.from(n.firstChild),r=U.from(n.lastChild);t.insertNode(n),o.each((t=>sl(e,t.previousSibling))),r.each((t=>sl(e,t.nextSibling)))})(e,t,n):((e,t,n)=>{t.insertNode(n),sl(e,n.previousSibling),sl(e,n.nextSibling)})(e,t,n)},il=tr,ll=Qo,dl=Xa.nodeIndex,cl=e=>{const t=e.parentNode;return ll(t)?cl(t):t},ml=e=>e?Be(e.childNodes,((e,t)=>(ll(t)&&"BR"!==t.nodeName?e=e.concat(ml(t)):e.push(t),e)),[]):[],ul=e=>t=>e===t,fl=e=>(il(e)?"text()":e.nodeName.toLowerCase())+"["+(e=>{let t,n;t=ml(cl(e)),n=Pe(t,ul(e),e),t=t.slice(0,n+1);const o=Be(t,((e,n,o)=>(il(n)&&il(t[o-1])&&e++,e)),0);return t=Oe(t,Yo([e.nodeName])),n=Pe(t,ul(e),e),n-o})(e)+"]",gl=(e,t)=>{let n,o=[],r=t.container(),s=t.offset();if(il(r))n=((e,t)=>{let n=e;for(;(n=n.previousSibling)&&il(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(fl(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=Oe(a,B(Qo)),o=o.concat(Te(a,(e=>fl(e)))),o.reverse().join("/")+","+n},pl=(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=ml(e);return o=Oe(o,((e,t)=>!il(e)||!il(o[t-1]))),o=Oe(o,Yo([t])),o[n]})(e,n[1],parseInt(n[2],10))):null}),e);if(!s)return null;if(!il(s)&&s.parentNode){let e;return e="after"===r?dl(s)+1:dl(s),rl(s.parentNode,e)}return((e,t)=>{let n=e,o=0;for(;il(n);){const r=n.data.length;if(t>=o&&t<=o+r){e=n,t-=o;break}if(!il(n.nextSibling)){e=n,t=r;break}o+=r,n=n.nextSibling}return il(e)&&t>e.data.length&&(t=e.data.length),rl(e,t)})(s,parseInt(r,10))},hl=cr,bl=(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(tr(s))i.push(n?((e,t,n)=>{let o=e(t.data.slice(0,n)).length;for(let n=t.previousSibling;n&&tr(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},vl=(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},yl=(e,t)=>{let n=t?e.startContainer:e.endContainer,o=t?e.startOffset:e.endOffset;if(Vo(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))}},Cl=e=>(yl(e,!0),yl(e,!1),e),wl=(e,t)=>{if(Vo(e)&&(e=Ii(e,t),hl(e)))return e;if(jr(e)){tr(e)&&Ur(e)&&(e=e.parentNode);let t=e.previousSibling;if(hl(t))return t;if(t=e.nextSibling,hl(t))return t}},xl=(e,t,n)=>{const o=n.getNode(),r=n.getRng();if("IMG"===o.nodeName||hl(o)){const e=o.nodeName;return{name:e,index:vl(n.dom,e,o)}}const s=(e=>wl(e.startContainer,e.startOffset)||wl(e.endContainer,e.endOffset))(r);if(s){const e=s.tagName;return{name:e,index:vl(n.dom,e,s)}}return((e,t,n,o)=>{const r=t.dom,s=bl(r,e,n,o,!0),a=t.isForward(),i=Yr(o)?{isFakeCaret:!0}:{};return t.isCollapsed()?{start:s,forward:a,...i}:{start:s,end:bl(r,e,n,o,!1),forward:a,...i}})(e,n,t,r)},El=(e,t,n)=>{const o={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"};return n?e.create("span",o,"&#xFEFF;"):e.create("span",o)},_l=(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:vl(n,i,a)};const d=Cl(o.cloneRange());if(!s){d.collapse(!1);const e=El(n,r+"_end",t);al(n,d,e)}o=Cl(o),o.collapse(!0);const c=El(n,r+"_start",t);return al(n,o,c),e.moveToBookmark({id:r,keep:!0,forward:l}),{id:r,forward:l}},kl=(e,t,n=!1)=>2===t?xl(Mr,n,e):3===t?(e=>{const t=e.getRng();return{start:gl(e.dom.getRoot(),rl.fromRangeStart(t)),end:gl(e.dom.getRoot(),rl.fromRangeEnd(t)),forward:e.isForward()}})(e):t?(e=>({rng:e.getRng(),forward:e.isForward()}))(e):_l(e,!1),Sl=O(xl,D,!0),Nl=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=>Al.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},Rl=e=>{const t=()=>n,n={tag:!1,inner:e,fold:(t,n)=>t(e),isValue:I,isError:F,map:t,mapError:t=>Al.error(t(e)),bind:t,exists:I,forall:F,getOr:D,or:D,getOrThunk:L,orThunk:L,getOrDie:P(String(e)),each:S,toOptional:U.none};return n},Al={value:Nl,error:Rl,fromOption:(e,t)=>e.fold((()=>Rl(t)),Nl)},Dl=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=>q(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};Dl([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);const Tl=e=>"inline-command"===e.type||"inline-format"===e.type,Ol=e=>"block-command"===e.type||"block-format"===e.type,Bl=e=>{const t=t=>Al.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 Al.value(o(r))}return void 0!==e.cmd?g(e.cmd)?Al.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"):Al.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})))},Pl=e=>X(e,Ol),Ll=e=>X(e,Tl),Ml=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},Il=Et().deviceType,Fl=Il.isTouch(),Ul=Xa.DOM,zl=e=>f(e,RegExp),jl=e=>t=>t.options.get(e),Hl=e=>g(e)||p(e),$l=(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:_e(r,e.id).getOr(t),valid:o}}return{value:n,valid:o}}return{valid:!1,message:"Must be a string."}},ql=jl("iframe_attrs"),Vl=jl("doctype"),Wl=jl("document_base_url"),Kl=jl("body_id"),Yl=jl("body_class"),Gl=jl("content_security_policy"),Xl=jl("br_in_pre"),Ql=jl("forced_root_block"),Jl=jl("forced_root_block_attrs"),Zl=jl("newline_behavior"),ed=jl("br_newline_selector"),td=jl("no_newline_selector"),nd=jl("keep_styles"),od=jl("end_container_on_empty_block"),rd=jl("automatic_uploads"),sd=jl("images_reuse_filename"),ad=jl("images_replace_blob_uris"),id=jl("icons"),ld=jl("icons_url"),dd=jl("images_upload_url"),cd=jl("images_upload_base_path"),md=jl("images_upload_credentials"),ud=jl("images_upload_handler"),fd=jl("content_css_cors"),gd=jl("referrer_policy"),pd=jl("language"),hd=jl("language_url"),bd=jl("indent_use_margin"),vd=jl("indentation"),yd=jl("content_css"),Cd=jl("content_style"),wd=jl("font_css"),xd=jl("directionality"),Ed=jl("inline_boundaries_selector"),_d=jl("object_resizing"),kd=jl("resize_img_proportional"),Sd=jl("placeholder"),Nd=jl("event_root"),Rd=jl("service_message"),Ad=jl("theme"),Dd=jl("theme_url"),Td=jl("model"),Od=jl("model_url"),Bd=jl("inline_boundaries"),Pd=jl("formats"),Ld=jl("preview_styles"),Md=jl("format_empty_lines"),Id=jl("format_noneditable_selector"),Fd=jl("custom_ui_selector"),Ud=jl("inline"),zd=jl("hidden_input"),jd=jl("submit_patch"),Hd=jl("add_form_submit_trigger"),$d=jl("add_unload_trigger"),qd=jl("custom_undo_redo_levels"),Vd=jl("disable_nodechange"),Wd=jl("readonly"),Kd=jl("editable_root"),Yd=jl("content_css_cors"),Gd=jl("plugins"),Xd=jl("external_plugins"),Qd=jl("block_unsupported_drop"),Jd=jl("visual"),Zd=jl("visual_table_class"),ec=jl("visual_anchor_class"),tc=jl("iframe_aria_text"),nc=jl("setup"),oc=jl("init_instance_callback"),rc=jl("urlconverter_callback"),sc=jl("auto_focus"),ac=jl("browser_spellcheck"),ic=jl("protect"),lc=jl("paste_block_drop"),dc=jl("paste_data_images"),cc=jl("paste_preprocess"),mc=jl("paste_postprocess"),uc=jl("newdocument_content"),fc=jl("paste_webkit_styles"),gc=jl("paste_remove_styles_if_webkit"),pc=jl("paste_merge_formats"),hc=jl("smart_paste"),bc=jl("paste_as_text"),vc=jl("paste_tab_spaces"),yc=jl("allow_html_data_urls"),Cc=jl("text_patterns"),wc=jl("text_patterns_lookup"),xc=jl("noneditable_class"),Ec=jl("editable_class"),_c=jl("noneditable_regexp"),kc=jl("preserve_cdata"),Sc=jl("highlight_on_focus"),Nc=jl("xss_sanitization"),Rc=jl("init_content_sync"),Ac=e=>Pt.explode(e.options.get("images_file_types")),Dc=jl("table_tab_navigation"),Tc=jl("details_initial_state"),Oc=jl("details_serialized_state"),Bc=jl("force_hex_color"),Pc=jl("sandbox_iframes"),Lc=Vo,Mc=tr,Ic=e=>{const t=e.parentNode;t&&t.removeChild(e)},Fc=e=>{const t=Mr(e);return{count:e.length-t.length,text:t}},Uc=e=>{let t;for(;-1!==(t=e.data.lastIndexOf(Pr));)e.deleteData(t,1)},zc=(e,t)=>(qc(e),t),jc=(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()?rl(n,t.offset()-1):t)).getOr(t);return qc(e),o},Hc=(e,t)=>Mc(e)&&t.container()===e?((e,t)=>{const n=Fc(e.data.substr(0,t.offset())),o=Fc(e.data.substr(t.offset()));return(n.text+o.text).length>0?(Uc(e),rl(e,t.offset()-n.count)):t})(e,t):zc(e,t),$c=(e,t)=>rl.isTextPosition(t)?Hc(e,t):((e,t)=>t.container()===e.parentNode?jc(e,t):zc(e,t))(e,t),qc=e=>{Lc(e)&&jr(e)&&(Hr(e)?e.removeAttribute("data-mce-caret"):Ic(e)),Mc(e)&&(Uc(e),0===e.data.length&&Ic(e))},Vc=cr,Wc=fr,Kc=mr,Yc=(e,t,n)=>{const o=Ti(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},Gc=(e,t,n,o)=>{const r=ai();let s,a;const i=Ql(e),l=e.dom,d=()=>{(e=>{var t,n;const o=zo(yn.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(Wr(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&&(qc(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(),Kc(o))return null;if(!n(o))return a=((e,t)=>{var n;const o=(null!==(n=e.ownerDocument)&&void 0!==n?n:document).createTextNode(Pr),r=e.parentNode;if(t){const t=e.previousSibling;if(Fr(t)){if(jr(t))return t;if(Wr(t))return t.splitText(t.data.length-1)}null==r||r.insertBefore(o,e)}else{const t=e.nextSibling;if(Fr(t)){if(jr(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(),Qc(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(Or().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=Yc(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=Yc(t,e.element,e.before);l.setStyles(e.caret,{...n})}))},destroy:()=>clearInterval(s)}},Xc=()=>Dt.browser.isFirefox(),Qc=e=>Vc(e)||Wc(e),Jc=e=>(Qc(e)||Jo(e)&&Xc())&&An(yn.fromDom(e)).exists(oo),Zc=dr,em=cr,tm=fr,nm=Go("display","block table table-cell table-caption list-item"),om=jr,rm=Ur,sm=Vo,am=tr,im=os,lm=e=>e>0,dm=e=>e<0,cm=(e,t)=>{let n;for(;n=e(t);)if(!rm(n))return n;return null},mm=(e,t,n,o,r)=>{const s=new Ho(e,o),a=em(e)||rm(e);let i;if(dm(t)){if(a&&(i=cm(s.prev.bind(s),!0),n(i)))return i;for(;i=cm(s.prev.bind(s),r);)if(n(i))return i}if(lm(t)){if(a&&(i=cm(s.next.bind(s),!0),n(i)))return i;for(;i=cm(s.next.bind(s),r);)if(n(i))return i}return null},um=(e,t)=>{for(;e&&e!==t;){if(nm(e))return e;e=e.parentNode}return null},fm=(e,t,n)=>um(e.container(),n)===um(t.container(),n),gm=(e,t)=>{if(!t)return U.none();const n=t.container(),o=t.offset();return sm(n)?U.from(n.childNodes[o+e]):U.none()},pm=(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},hm=(e,t,n)=>um(t,e)===um(n,e),bm=(e,t,n)=>{const o=e?"previousSibling":"nextSibling";let r=n;for(;r&&r!==t;){let e=r[o];if(e&&om(e)&&(e=e[o]),em(e)||tm(e)){if(hm(t,e,r))return e;break}if(im(e))break;r=r.parentNode}return null},vm=O(pm,!0),ym=O(pm,!1),Cm=(e,t,n)=>{let o;const r=O(bm,!0,t),s=O(bm,!1,t),a=n.startContainer,i=n.startOffset;if(Ur(a)){const e=am(a)?a.parentNode:a,t=e.getAttribute("data-mce-caret");if("before"===t&&(o=e.nextSibling,Jc(o)))return vm(o);if("after"===t&&(o=e.previousSibling,Jc(o)))return ym(o)}if(!n.collapsed)return n;if(tr(a)){if(om(a)){if(1===e){if(o=s(a),o)return vm(o);if(o=r(a),o)return ym(o)}if(-1===e){if(o=r(a),o)return ym(o);if(o=s(a),o)return vm(o)}return n}if(Wr(a)&&i>=a.data.length-1)return 1===e&&(o=s(a),o)?vm(o):n;if(Vr(a)&&i<=1)return-1===e&&(o=r(a),o)?ym(o):n;if(i===a.data.length)return o=s(a),o?vm(o):n;if(0===i)return o=r(a),o?ym(o):n}return n},wm=(e,t)=>gm(e?0:-1,t).filter(em),xm=(e,t,n)=>{const o=Cm(e,t,n);return-1===e?rl.fromRangeStart(o):rl.fromRangeEnd(o)},Em=e=>U.from(e.getNode()).map(yn.fromDom),_m=(e,t)=>{let n=t;for(;n=e(n);)if(n.isVisible())return n;return n},km=(e,t)=>{const n=fm(e,t);return!(n||!ir(e.getNode()))||n};var Sm;!function(e){e[e.Backwards=-1]="Backwards",e[e.Forwards=1]="Forwards"}(Sm||(Sm={}));const Nm=cr,Rm=tr,Am=Vo,Dm=ir,Tm=os,Om=e=>es(e)||(e=>!!rs(e)&&!J(ue(e.getElementsByTagName("*")),((e,t)=>e||Gr(t)),!1))(e),Bm=ss,Pm=(e,t)=>e.hasChildNodes()&&t<e.childNodes.length?e.childNodes[t]:null,Lm=(e,t)=>{if(lm(e)){if(Tm(t.previousSibling)&&!Rm(t.previousSibling))return rl.before(t);if(Rm(t))return rl(t,0)}if(dm(e)){if(Tm(t.nextSibling)&&!Rm(t.nextSibling))return rl.after(t);if(Rm(t))return rl(t,t.data.length)}return dm(e)?Dm(t)?rl.before(t):rl.after(t):rl.before(t)},Mm=(e,t,n)=>{let o,r,s,a;if(!Am(n)||!t)return null;if(t.isEqual(rl.after(n))&&n.lastChild){if(a=rl.after(n.lastChild),dm(e)&&Tm(n.lastChild)&&Am(n.lastChild))return Dm(n.lastChild)?rl.before(n.lastChild):a}else a=t;const i=a.container();let l=a.offset();if(Rm(i)){if(dm(e)&&l>0)return rl(i,--l);if(lm(e)&&l<i.length)return rl(i,++l);o=i}else{if(dm(e)&&l>0&&(r=Pm(i,l-1),Tm(r)))return!Om(r)&&(s=mm(r,e,Bm,r),s)?Rm(s)?rl(s,s.data.length):rl.after(s):Rm(r)?rl(r,r.data.length):rl.before(r);if(lm(e)&&l<i.childNodes.length&&(r=Pm(i,l),Tm(r)))return Dm(r)?((e,t)=>{const n=t.nextSibling;return n&&Tm(n)?Rm(n)?rl(n,0):rl.before(n):Mm(Sm.Forwards,rl.after(t),e)})(n,r):!Om(r)&&(s=mm(r,e,Bm,r),s)?Rm(s)?rl(s,0):rl.before(s):Rm(r)?rl(r,0):rl.after(r);o=r||a.getNode()}if(o&&(lm(e)&&a.isAtEnd()||dm(e)&&a.isAtStart())&&(o=mm(o,e,F,n,!0),Bm(o,n)))return Lm(e,o);r=o?mm(o,e,Bm,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),Nm));return!d||r&&d.contains(r)?r?Lm(e,r):null:(a=lm(e)?rl.after(d):rl.before(d),a)},Im=e=>({next:t=>Mm(Sm.Forwards,t,e),prev:t=>Mm(Sm.Backwards,t,e)}),Fm=e=>rl.isTextPosition(e)?0===e.offset():os(e.getNode()),Um=e=>{if(rl.isTextPosition(e)){const t=e.container();return e.offset()===t.data.length}return os(e.getNode(!0))},zm=(e,t)=>!rl.isTextPosition(e)&&!rl.isTextPosition(t)&&e.getNode()===t.getNode(!0),jm=(e,t,n)=>{return e?!zm(t,n)&&(o=t,!(!rl.isTextPosition(o)&&ir(o.getNode())))&&Um(t)&&Fm(n):!zm(n,t)&&Fm(t)&&Um(n);var o},Hm=(e,t,n)=>{const o=Im(t);return U.from(e?o.next(n):o.prev(n))},$m=(e,t,n)=>Hm(e,t,n).bind((o=>fm(n,o,t)&&jm(e,n,o)?Hm(e,t,o):U.some(o))),qm=(e,t,n,o)=>$m(e,t,n).bind((n=>o(n)?qm(e,t,n,o):U.some(n))),Vm=(e,t)=>{const n=e?t.firstChild:t.lastChild;return tr(n)?U.some(rl(n,e?0:n.data.length)):n?os(n)?U.some(e?rl.before(n):ir(o=n)?rl.before(o):rl.after(o)):((e,t,n)=>{const o=e?rl.before(n):rl.after(n);return Hm(e,t,o)})(e,t,n):U.none();var o},Wm=O(Hm,!0),Km=O(Hm,!1),Ym=O(Vm,!0),Gm=O(Vm,!1),Xm="_mce_caret",Qm=e=>Vo(e)&&e.id===Xm,Jm=(e,t)=>{let n=t;for(;n&&n!==e;){if(Qm(n))return n;n=n.parentNode}return null},Zm=e=>ke(e,"name"),eu=e=>Pt.isArray(e.start),tu=e=>!(!Zm(e)&&y(e.forward))||e.forward,nu=(e,t)=>(Vo(t)&&e.isBlock(t)&&!t.innerHTML&&(t.innerHTML='<br data-mce-bogus="1" />'),t),ou=(e,t)=>Gm(e).fold(I,(e=>(t.setStart(e.container(),e.offset()),t.setEnd(e.container(),e.offset()),!0))),ru=(e,t,n)=>!(!(e=>!e.hasChildNodes())(t)||!Jm(e,t))&&(((e,t)=>{var n;const o=(null!==(n=e.ownerDocument)&&void 0!==n?n:document).createTextNode(Pr);e.appendChild(o),t.setStart(o,0),t.setEnd(o,0)})(t,n),!0),su=(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(ru(s,e,o))return!0;if(r[t]>n.length-1)return!!ru(s,e,o)||ou(e,o);e=n[r[t]]}tr(e)&&(n=Math.min(r[0],e.data.length)),Vo(e)&&(n=Math.min(r[0],e.childNodes.length)),t?o.setStart(e,n):o.setEnd(e,n)}return!0},au=e=>tr(e)&&e.data.length>0,iu=(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):au(o.nextSibling)?(a=o.nextSibling,i=0):au(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):au(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=>{tr(e)&&(e.data=e.data.replace(/\uFEFF/g,""))}));l=e.get(n.id+"_"+t);)e.remove(l,!0);if(tr(s)&&tr(r)&&!Dt.browser.isOpera()){const t=r.data.length;r.appendData(s.data),e.remove(s),a=r,i=t}}return U.some(rl(a,i))}return U.none()},lu=(e,t)=>{const n=e.dom;if(t){if(eu(t))return((e,t)=>{const n=e.createRng();return su(e,!0,t,n)&&su(e,!1,t,n)?U.some({range:n,forward:tu(t)}):U.none()})(n,t);if((e=>g(e.start))(t))return((e,t)=>{const n=U.from(pl(e.getRoot(),t.start)),o=U.from(pl(e.getRoot(),t.end));return It(n,o,((n,o)=>{const r=e.createRng();return r.setStart(n.container(),n.offset()),r.setEnd(o.container(),o.offset()),{range:r,forward:tu(t)}}))})(n,t);if((e=>ke(e,"id"))(t))return((e,t)=>{const n=iu(e,"start",t),o=iu(e,"end",t);return It(n,o.or(n),((n,o)=>{const r=e.createRng();return r.setStart(nu(e,n.container()),n.offset()),r.setEnd(nu(e,o.container()),o.offset()),{range:r,forward:tu(t)}}))})(n,t);if(Zm(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=>ke(e,"rng"))(t))return U.some({range:t.rng,forward:tu(t)})}return U.none()},du=(e,t,n)=>kl(e,t,n),cu=(e,t)=>{lu(e,t).each((({range:t,forward:n})=>{e.setRng(t,n)}))},mu=e=>Vo(e)&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type"),uu=(fu=vr,e=>fu===e);var fu;const gu=e=>""!==e&&-1!==" \f\n\r\t\v".indexOf(e),pu=e=>!gu(e)&&!uu(e)&&!yr(e),hu=e=>{const t=[];if(e)for(let n=0;n<e.rangeCount;n++)t.push(e.getRangeAt(n));return t},bu=e=>X((e=>oe(e,(e=>{const t=Mi(e);return t?[yn.fromDom(t)]:[]})))(e),Ar),vu=(e,t)=>{const n=zo(t,"td[data-mce-selected],th[data-mce-selected]");return n.length>0?n:bu(e)},yu=e=>vu(hu(e.selection.getSel()),yn.fromDom(e.getBody())),Cu=(e,t)=>eo(e,"table",t),wu=e=>In(e).fold(A([e]),(t=>[e].concat(wu(t)))),xu=e=>Fn(e).fold(A([e]),(t=>"br"===qt(t)?Tn(t).map((t=>[e].concat(xu(t)))).getOr([]):[e].concat(xu(t)))),Eu=(e,t)=>It((e=>{const t=e.startContainer,n=e.startOffset;return tr(t)?0===n?U.some(yn.fromDom(t)):U.none():U.from(t.childNodes[n]).map(yn.fromDom)})(t),(e=>{const t=e.endContainer,n=e.endOffset;return tr(t)?n===t.data.length?U.some(yn.fromDom(t)):U.none():U.from(t.childNodes[n-1]).map(yn.fromDom)})(t),((t,n)=>{const o=ee(wu(e),O(En,t)),r=ee(xu(e),O(En,n));return o.isSome()&&r.isSome()})).getOr(!1),_u=(e,t,n,o)=>{const r=n,s=new Ho(n,r),a=we(e.schema.getMoveCaretBeforeOnEnterElements(),((e,t)=>!q(["td","th","table"],t.toLowerCase())));let i=n;do{if(tr(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))},ku=e=>{const t=e.selection.getSel();return x(t)&&t.rangeCount>0},Su=(e,t)=>{const n=yu(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)},Nu=(e,t,n)=>{const o=_l(e,t);n(o),e.moveToBookmark(o)},Ru=e=>_(null==e?void 0:e.nodeType),Au=e=>Vo(e)&&!mu(e)&&!Qm(e)&&!Qo(e),Du=(e,t,n)=>{const{selection:o,dom:r}=e,s=o.getNode(),a=cr(s);Nu(o,!0,(()=>{t()}));a&&cr(s)&&r.isChildOf(s,e.getBody())?e.selection.select(s):n(o.getStart())&&Tu(r,o)},Tu=(e,t)=>{var n,o;const r=t.getRng(),{startContainer:s,startOffset:a}=r;if(!((e,t)=>{if(Au(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())&&Vo(s)){const i=s.childNodes,l=e.getRoot();let d;if(a<i.length){const t=i[a];d=new Ho(t,null!==(n=e.getParent(t,e.isBlock))&&void 0!==n?n:l)}else{const t=i[i.length-1];d=new Ho(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(tr(n)&&!Lu(n))return r.setStart(n,0),void t.setRng(r)}}},Ou=(e,t,n)=>{if(e){const o=t?"nextSibling":"previousSibling";for(e=n?e:e[o];e;e=e[o])if(Vo(e)||!Lu(e))return e}},Bu=(e,t)=>!!e.getTextBlockElements()[t.nodeName.toLowerCase()]||Ls(e,t),Pu=(e,t,n)=>e.schema.isValidChild(t,n),Lu=(e,t=!1)=>{if(x(e)&&tr(e)){const n=t?e.data.replace(/ /g," "):e.data;return is(n)}return!1},Mu=(e,t)=>{const n=e.dom;return Au(t)&&"false"===n.getContentEditable(t)&&((e,t)=>{const n="[data-mce-cef-wrappable]",o=Id(e),r=Qe(o)?n:`${n},${o}`;return wn(yn.fromDom(t),r)})(e,t)&&0===n.select('[contenteditable="true"]',t).length},Iu=(e,t)=>E(e)?e(t):(x(t)&&(e=e.replace(/%(\w+)/g,((e,n)=>t[n]||e))),e),Fu=(e,t)=>(t=t||"",e=""+((e=e||"").nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()===t.toLowerCase()),Uu=(e,t)=>{if(w(e))return null;{let n=String(e);return"color"!==t&&"backgroundColor"!==t||(n=Aa(n)),"fontWeight"===t&&700===e&&(n="bold"),"fontFamily"===t&&(n=n.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),n}},zu=(e,t,n)=>{const o=e.getStyle(t,n);return Uu(o,n)},ju=(e,t)=>{let n;return e.getParent(t,(t=>!!Vo(t)&&(n=e.getStyle(t,"text-decoration"),!!n&&"none"!==n))),n},Hu=(e,t,n)=>e.getParents(t,n,e.getRoot()),$u=(e,t,n)=>{const o=e.formatter.get(t);return x(o)&&V(o,n)},qu=(e,t,n)=>{const o=["inline","block","selector","attributes","styles","classes"],r=e=>we(e,((e,t)=>V(o,(e=>e===t))));return $u(e,t,(t=>{const o=r(t);return $u(e,n,(e=>{const t=r(e);return((e,t,n=i)=>a(n).eq(e,t))(o,t)}))}))},Vu=e=>Se(e,"block"),Wu=e=>Se(e,"selector"),Ku=e=>Se(e,"inline"),Yu=e=>Wu(e)&&!1!==e.expand&&!Ku(e),Gu=e=>(e=>{const t=[];let n=e;for(;n;){if(tr(n)&&n.data!==Pr||n.childNodes.length>1)return[];Vo(n)&&t.push(n),n=n.firstChild}return t})(e).length>0,Xu=e=>Qm(e.dom)&&Gu(e.dom),Qu=mu,Ju=Hu,Zu=Lu,ef=Bu,tf=(e,t)=>{let n=t;for(;n;){if(Vo(n)&&e.getContentEditable(n))return"false"===e.getContentEditable(n)?n:t;n=n.parentNode}return t},nf=(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},of=(e,t,n)=>nf(e,t,n,(e=>uu(e)||gu(e))),rf=(e,t,n)=>nf(e,t,n,pu),sf=(e,t,n,o,r,s)=>{let a;const i=e.getParent(n,e.isBlock)||t,l=(t,n,o)=>{const s=Ri(e),l=r?s.backwards:s.forwards;return U.from(l(t,n,((e,t)=>Qu(e.parentNode)?-1:(a=e,o(r,e,t))),i))};return l(n,o,of).bind((e=>s?l(e.container,e.offset+(r?-1:0),rf):U.some(e))).orThunk((()=>a?U.some({container:a,offset:r?0:a.length}):U.none()))},af=(e,t,n,o,r)=>{const s=o[r];tr(o)&&Qe(o.data)&&s&&(o=s);const a=Ju(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)&&(Wu(s)&&e.is(a[o],s.selector)))return a[o]}return o},lf=(e,t,n,o)=>{var r;let s=n;const a=e.getRoot(),i=t[0];if(Vu(i)&&(s=i.wrapper?null:e.getParent(n,i.block,a)),!s){const t=null!==(r=e.getParent(n,"LI,TD,TH,SUMMARY"))&&void 0!==r?r:a;s=e.getParent(tr(n)?n.parentNode:n,(t=>t!==a&&ef(e.schema,t)),t)}if(s&&Vu(i)&&i.wrapper&&(s=Ju(e,s,"ul,ol").reverse()[0]||s),!s)for(s=n;s&&s[o]&&!e.isBlock(s[o])&&(s=s[o],!Fu(s,"br")););return s||n},df=(e,t,n,o)=>{const r=n.parentNode;return!x(n[o])&&(!(r!==t&&!w(r)&&!e.isBlock(r))||df(e,t,r,o))},cf=(e,t,n,o,r)=>{let s=n;const a=r?"previousSibling":"nextSibling",i=e.getRoot();if(tr(n)&&!Zu(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=tr(t)&&!df(e,i,t,a);if(!Qu(t)&&(!ir(l=t)||!l.getAttribute("data-mce-bogus")||l.nextSibling)&&!Zu(t,n))return s}if(s===i||s.parentNode===i){n=s;break}s=s.parentNode}var l;return n},mf=e=>Qu(e.parentNode)||Qu(e),uf=(e,t,n,o=!1)=>{let{startContainer:r,startOffset:s,endContainer:a,endOffset:i}=t;const l=n[0];if(Vo(r)&&r.hasChildNodes()&&(r=Ii(r,s),tr(r)&&(s=0)),Vo(a)&&a.hasChildNodes()&&(a=Ii(a,t.collapsed?i:i-1),tr(a)&&(i=a.data.length)),r=tf(e,r),a=tf(e,a),mf(r)&&(r=Qu(r)?r:r.parentNode,r=t.collapsed?r.previousSibling||r:r.nextSibling||r,tr(r)&&(s=t.collapsed?r.length:0)),mf(a)&&(a=Qu(a)?a:a.parentNode,a=t.collapsed?a.nextSibling||a:a.previousSibling||a,tr(a)&&(i=t.collapsed?0:a.length)),t.collapsed){sf(e,e.getRoot(),r,s,!0,o).each((({container:e,offset:t})=>{r=e,s=t}));sf(e,e.getRoot(),a,i,!1,o).each((({container:e,offset:t})=>{a=e,i=t}))}return(Ku(l)||l.block_expand)&&(Ku(l)&&tr(r)&&0!==s||(r=cf(e,n,r,s,!0)),Ku(l)&&tr(a)&&i!==a.data.length||(a=cf(e,n,a,i,!1))),Yu(l)&&(r=af(e,n,t,r,"previousSibling"),a=af(e,n,t,a,"nextSibling")),(Vu(l)||Wu(l))&&(r=lf(e,n,r,"previousSibling"),a=lf(e,n,a,"nextSibling"),Vu(l)&&(e.isBlock(r)||(r=cf(e,n,r,s,!0)),e.isBlock(a)||(a=cf(e,n,a,i,!1)))),Vo(r)&&r.parentNode&&(s=e.nodeIndex(r),r=r.parentNode),Vo(a)&&a.parentNode&&(i=e.nodeIndex(a)+1,a=a.parentNode),{startContainer:r,startOffset:s,endContainer:a,endOffset:i}},ff=(e,t,n)=>{var o;const r=t.startOffset,s=Ii(t.startContainer,r),a=t.endOffset,i=Ii(t.endContainer,a-1),l=e=>{const t=e[0];tr(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&&tr(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)},gf=['pre[class*=language-][contenteditable="false"]',"figure.image","div[data-ephox-embed-iri]","div.tiny-pageembed","div.mce-toc","div[data-mce-toc]"],pf=(e,t,n,o)=>Rn(t).fold((()=>"skipping"),(r=>"br"===o||(e=>Gt(e)&&wr(e)===Pr)(t)?"valid":(e=>Yt(e)&&bn(e,di()))(t)?"existing":Qm(t.dom)?"caret":V(gf,(e=>wn(t,e)))?"valid-block":Pu(e,n,o)&&Pu(e,qt(r),n)?"valid":"invalid-child")),hf=(e,t,n,o,r,s)=>{const{uid:a=t,...i}=n;fn(e,di()),en(e,`${mi()}`,a),en(e,`${ci()}`,o);const{attributes:l={},classes:d=[]}=r(a,i);if(tn(e,l),((e,t)=>{K(t,(t=>{fn(e,t)}))})(e,d),s){d.length>0&&en(e,`${fi()}`,d.join(","));const t=ge(l);t.length>0&&en(e,`${gi()}`,t.join(","))}},bf=e=>{pn(e,di()),sn(e,`${mi()}`),sn(e,`${ci()}`),sn(e,`${ui()}`);const t=on(e,`${gi()}`).map((e=>e.split(","))).getOr([]),n=on(e,`${fi()}`).map((e=>e.split(","))).getOr([]);var o;K(t,(t=>sn(e,t))),o=e,K(n,(e=>{pn(o,e)})),sn(e,`${fi()}`),sn(e,`${gi()}`)},vf=(e,t,n,o,r)=>{const s=yn.fromTag("span",e);return hf(s,t,n,o,r,!1),s},yf=(e,t,n,o,r,s)=>{const a=[],i=vf(e.getDoc(),n,s,o,r),l=ai(),d=()=>{l.clear()},c=e=>{K(e,m)},m=t=>{switch(pf(e,t,"span",qt(t))){case"invalid-child":{d();const e=Ln(t);c(e),d();break}case"valid-block":d(),hf(t,n,s,o,r,!0);break;case"valid":{const e=l.get().getOrThunk((()=>{const e=_i(i);return a.push(e),l.set(e),e}));yo(t,e);break}}};return ff(e.dom,t,(e=>{d(),(e=>{const t=W(e,yn.fromDom);c(t)})(e)})),a},Cf=(e,t,n,o)=>{e.undoManager.transact((()=>{const r=e.selection,s=r.getRng(),a=yu(e).length>0,i=xi("mce-annotation");if(s.collapsed&&!a&&((e,t)=>{const n=uf(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=vf(e.getDoc(),i,o,t,n.decorate);So(s,vr),r.getRng().insertNode(s.dom),r.select(s.dom)}else Nu(r,!1,(()=>{Su(e,(r=>{yf(e,r,i,t,n.decorate,o)}))}))}))},wf=e=>{const t=(()=>{const e={};return{register:(t,n)=>{e[t]={name:t,settings:n}},lookup:t=>_e(e,t).map((e=>e.settings)),getNames:()=>ge(e)}})();((e,t)=>{const n=ci(),o=e=>U.from(e.attr(n)).bind(t.lookup),r=e=>{var t,n;e.attr(mi(),null),e.attr(ci(),null),e.attr(ui(),null);const o=U.from(e.attr(gi())).map((e=>e.split(","))).getOr([]),r=U.from(e.attr(fi())).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,[di()].concat(r));e.attr("class",a.length>0?a.join(" "):null),e.attr(fi(),null),e.attr(gi(),null)};e.serializer.addTempAttr(ui()),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=Ci(e,t),o=Jt("span"),r=e=>{K(e,(e=>{o(e)?Eo(e):bf(e)}))};return{register:(e,n)=>{t.register(e,n)},annotate:(n,o)=>{t.lookup(n).each((t=>{Cf(e,n,t,o)}))},annotationChanged:(e,t)=>{n.addListener(e,t)},remove:t=>{hi(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(yi(e,t),((e,t)=>{r(e)})),e.selection.moveToBookmark(n)},getAll:t=>{const n=yi(e,t);return be(n,(e=>W(e,(e=>e.dom))))}}},xf=e=>({getBookmark:O(du,e),moveToBookmark:O(cu,e)});xf.isBookmarkNode=mu;const Ef=(e,t,n)=>!n.collapsed&&V(n.getClientRects(),(n=>((e,t,n)=>t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom)(n,e,t))),_f=(e,t,n)=>{e.dispatch(t,n)},kf=(e,t,n,o)=>{e.dispatch("FormatApply",{format:t,node:n,vars:o})},Sf=(e,t,n,o)=>{e.dispatch("FormatRemove",{format:t,node:n,vars:o})},Nf=(e,t)=>e.dispatch("SetContent",t),Rf=(e,t)=>e.dispatch("GetContent",t),Af=(e,t)=>e.dispatch("PastePlainTextToggle",{state:t}),Df={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||Df.metaKeyPressed(e),metaKeyPressed:e=>Dt.os.isMacOS()||Dt.os.isiOS()?e.metaKey:e.ctrlKey&&!e.altKey},Tf="data-mce-selected",Of=Math.abs,Bf=Math.round,Pf={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},Lf=(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)&&(lr(e)||n.is(e,"figure.image")),E=e=>fr(e)||n.hasClass(e,"mce-preview-object"),_=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)&&!Ef(n.clientX,n.clientY,t)}return w(e.target)&&!Ef(e.clientX,e.clientY,t)})(e,t.selection.getRng())&&!e.isDefaultPrevented()&&t.selection.select(n)},k=e=>n.hasClass(e,"mce-preview-object")&&x(e.firstElementChild)?[e,e.firstElementChild]:n.is(e,"figure.image")?[e.querySelector("img")]:[e],S=e=>{const o=_d(t);return!!o&&("false"!==e.getAttribute("data-mce-resize")&&(e!==t.getBody()&&(n.hasClass(e,"mce-preview-object")&&x(e.firstElementChild)?wn(yn.fromDom(e.firstElementChild),o):wn(yn.fromDom(e),o))))},N=(e,o,r)=>{if(x(r)){const s=k(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,_;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)||E(a))&&!1!==kd(t)?!Df.modifierPressed(e):Df.modifierPressed(e),c&&(Of(o)>Of(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,_=d.startPos.y+r,x=x>0?x:0,_=_>0?_:0,n.setStyles(l,{left:x,top:_,display:"block"}),l.innerHTML=b+" &times; "+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:_-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),T(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()},T=e=>{M();const h=n.getPos(e,s),w=h.x,x=h.y,_=e.getBoundingClientRect(),N=_.width||_.right-_.left,T=_.height||_.bottom-_.top;a!==e&&(B(),a=e,b=v=0);const O=t.dispatch("ObjectSelected",{target:e});S(e)&&!O.isDefaultPrevented()?he(Pf,((e,t)=>{const h=h=>{const b=k(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:T*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=E(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,T),i.removeAttribute(Tf),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+" &times; "+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:T*e[1]+x-b.offsetHeight/2})})):B(!1)},O=ii(T,0),B=(e=!0)=>{O.cancel(),M(),a&&e&&a.removeAttribute(Tf),he(Pf,((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=no(yn.fromDom(r),"table,img,figure.image,hr,video,span.mce-preview-object,details").map((e=>e.dom)).filter((e=>n.isEditable(e.parentElement)||"IMG"===e.nodeName&&n.isEditable(e))).getOrUndefined(),i=x(a)?n.getAttrib(a,Tf,"1"):"1";if(K(n.select("img[data-mce-selected],hr[data-mce-selected]"),(e=>{e.removeAttribute(Tf)})),x(a)&&P(a,s)&&t.hasFocus()){I();const t=e.getStart(!0);if(P(t,a)&&P(e.getEnd(!0),a))return n.setAttrib(a,Tf,i),void O.throttle(a)}B()},M=()=>{he(Pf,(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",_,!0)})),t.on("remove",M);return{isResizable:S,showResizeRect:T,hideResizeRect:B,updateResizeRect:L,destroy:()=>{O.cancel(),a=i=c=null}}},Mf=(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},If=(e,t,n,o,r)=>{const s=e.document.createRange();return s.setStart(t.dom,n),s.setEnd(o.dom,r),s},Ff=Dl([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Uf=(e,t,n)=>t(yn.fromDom(n.startContainer),n.startOffset,yn.fromDom(n.endContainer),n.endOffset),zf=(e,t)=>{const n=((e,t)=>t.match({domRange:e=>({ltr:A(e),rtl:U.none}),relative:(t,n)=>({ltr:Me((()=>Mf(e,t,n))),rtl:Me((()=>U.some(Mf(e,n,t))))}),exact:(t,n,o,r)=>({ltr:Me((()=>If(e,t,n,o,r))),rtl:Me((()=>U.some(If(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=>Ff.rtl(yn.fromDom(e.endContainer),e.endOffset,yn.fromDom(e.startContainer),e.startOffset))).getOrThunk((()=>Uf(0,Ff.ltr,n)));return Uf(0,Ff.ltr,n)})(0,n)};Ff.ltr,Ff.rtl;const jf=(e,t,n,o)=>({start:e,soffset:t,finish:n,foffset:o}),Hf=(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)}))},$f=(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))},qf=document.caretPositionFromPoint?Hf:document.caretRangeFromPoint?$f:U.none,Vf=Dl([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Wf={before:Vf.before,on:Vf.on,after:Vf.after,cata:(e,t,n,o)=>e.fold(t,n,o),getStart:e=>e.fold(D,D,D)},Kf=Dl([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Yf={domRange:Kf.domRange,relative:Kf.relative,exact:Kf.exact,exactFromRange:e=>Kf.exact(e.start,e.soffset,e.finish,e.foffset),getWin:e=>{const t=(e=>e.match({domRange:e=>yn.fromDom(e.startContainer),relative:(e,t)=>Wf.getStart(e),exact:(e,t,n,o)=>e}))(e);return Nn(t)},range:jf},Gf=(e,t)=>{const n=qt(e);return"input"===n?Wf.after(e):q(["br","img"],n)?0===t?Wf.before(e):Wf.after(e):Wf.on(e,t)},Xf=(e,t)=>{const n=e.fold(Wf.before,Gf,Wf.after),o=t.fold(Wf.before,Gf,Wf.after);return Yf.relative(n,o)},Qf=(e,t,n,o)=>{const r=Gf(e,t),s=Gf(n,o);return Yf.relative(r,s)},Jf=(e,t)=>{const n=(t||document).createDocumentFragment();return K(e,(e=>{n.appendChild(e.dom)})),yn.fromDom(n)},Zf=e=>{const t=Yf.getWin(e).dom,n=(e,n,o,r)=>If(t,e,n,o,r),o=(e=>e.match({domRange:e=>{const t=yn.fromDom(e.startContainer),n=yn.fromDom(e.endContainer);return Qf(t,e.startOffset,n,e.endOffset)},relative:Xf,exact:Qf}))(e);return zf(t,o).match({ltr:n,rtl:n})},eg=(e,t,n)=>((e,t,n)=>{const o=yn.fromDom(e.document);return qf(o,t,n).map((e=>jf(yn.fromDom(e.startContainer),e.startOffset,yn.fromDom(e.endContainer),e.endOffset)))})(e,t,n),tg=(e,t,n)=>{const o=Nn(yn.fromDom(n));return eg(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()},ng=(e,t)=>x(e)&&x(t)&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset,og=(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),rg=(e,t,n)=>og(e,t,(e=>e.nodeName===n)),sg=(e,t)=>jr(e)&&!og(e,t,Qm),ag=(e,t,n)=>{const o=t.parentNode;if(o){const r=new Ho(t,e.getParent(o,e.isBlock)||e.getRoot());let s;for(;s=r[n?"prev":"next"]();)if(ir(s))return!0}return!1},ig=(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&&ir(r)&&t&&e.isEmpty(c))return U.some(rl(i,e.nodeIndex(r)));const m=new Ho(r,c);for(;d=m[o?"prev":"next"]();){if("false"===e.getContentEditableParent(d)||sg(d,s))return U.none();if(tr(d)&&d.data.length>0)return rg(d,s,"A")?U.none():U.some(rl(d,o?d.data.length:0));if(e.isBlock(d)||a[d.nodeName.toLowerCase()])return U.none();l=d}return rr(l)?U.none():n&&l?U.some(rl(l,0)):U.none()},lg=(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=Vo(i)&&l===i.childNodes.length,c=e.schema.getNonEmptyElements();let m=n;if(jr(i))return U.none();if(Vo(i)&&l>i.childNodes.length-1&&(m=!1),sr(i)&&(i=r,l=0),i===r){if(m&&(s=i.childNodes[l>0?l-1:0],s)){if(jr(s))return U.none();if(c[s.nodeName]||Jo(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=tr(i)&&d?i.data.length:0,!t&&i===r.lastChild&&Jo(i))return U.none();if(((e,t)=>{let n=t;for(;n&&n!==e;){if(cr(n))return!0;n=n.parentNode}return!1})(r,i)||jr(i))return U.none();if(pr(i))return U.none();if(i.hasChildNodes()&&!Jo(i)){s=i;const t=new Ho(i,r);do{if(cr(s)||jr(s)){a=!1;break}if(tr(s)&&s.data.length>0){l=m?0:s.data.length,i=s,a=!0;break}if(c[s.nodeName.toLowerCase()]&&!ur(s)){l=e.nodeIndex(s),i=s.parentNode,m||l++,a=!0;break}}while(s=m?t.next():t.prev())}}}return t&&(tr(i)&&0===l&&ig(e,d,t,!0,i).each((e=>{i=e.container(),l=e.offset(),a=!0})),Vo(i)&&(s=i.childNodes[l],s||(s=i.childNodes[l-1]),!s||!ir(s)||((e,t)=>{var n;return(null===(n=e.previousSibling)||void 0===n?void 0:n.nodeName)===t})(s,"A")||ag(e,s,!1)||ag(e,s,!0)||ig(e,d,t,!0,s).each((e=>{i=e.container(),l=e.offset(),a=!0})))),m&&!t&&tr(i)&&l===i.data.length&&ig(e,d,t,!1,i).each((e=>{i=e.container(),l=e.offset(),a=!0})),a&&i?U.some(rl(i,l)):U.none()},dg=(e,t)=>{const n=t.collapsed,o=t.cloneRange(),r=rl.fromRangeStart(t);return lg(e,n,!0,o).each((e=>{n&&rl.isAbove(r,e)||o.setStart(e.container(),e.offset())})),n||lg(e,n,!1,o).each((e=>{o.setEnd(e.container(),e.offset())})),n&&o.collapse(!0),ng(t,o)?U.none():U.some(o)},cg=(e,t)=>e.splitText(t),mg=e=>{let t=e.startContainer,n=e.startOffset,o=e.endContainer,r=e.endOffset;if(t===o&&tr(t)){if(n>0&&n<t.data.length)if(o=cg(t,n),t=o.previousSibling,r>n){r-=n;const e=cg(o,r).previousSibling;t=o=e,r=e.data.length,n=0}else r=0}else if(tr(t)&&n>0&&n<t.data.length&&(t=cg(t,n),n=0),tr(o)&&r>0&&r<o.data.length){const e=cg(o,r).previousSibling;o=e,r=e.data.length}return{startContainer:t,startOffset:n,endContainer:o,endOffset:r}},ug=e=>({walk:(t,n)=>ff(e,t,n),split:mg,expand:(t,n={type:"word"})=>{if("word"===n.type){const n=uf(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=>dg(e,t).fold(I,(e=>(t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),!0)))});ug.compareRanges=ng,ug.getCaretRangeFromPoint=tg,ug.getSelectedNode=Mi,ug.getNode=Ii;const fg=((e,t)=>{const n=n=>{const o=t(n);if(o<=0||null===o){const t=co(n,e);return parseFloat(t)||0}return o},o=(e,t)=>J(t,((t,n)=>{const o=co(e,n),r=void 0===o?0:parseInt(o,10);return isNaN(r)?t:t+r}),0);return{set:(t,n)=>{if(!_(n)&&!n.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+n);const o=t.dom;so(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 Yn(e)?t.getBoundingClientRect().height:t.offsetHeight})),gg=()=>yn.fromDom(document),pg=(e,t)=>e.view(t).fold(A([]),(t=>{const n=e.owner(t),o=pg(e,n);return[t].concat(o)}));var hg=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(yn.fromDom)},owner:e=>Sn(e)});const bg=e=>{const t=gg(),n=Po(t),o=((e,t)=>{const n=t.owner(e);return pg(t,n)})(e,hg),r=Bo(e),s=Q(o,((e,t)=>{const n=Bo(t);return{left:e.left+n.left,top:e.top+n.top}}),{left:0,top:0});return To(s.left+r.left+n.left,s.top+r.top+n.top)},vg=e=>"textarea"===qt(e),yg=(e,t)=>{const n=(e=>{const t=e.dom.ownerDocument,n=t.body,o=t.defaultView,r=t.documentElement;if(n===e.dom)return To(n.offsetLeft,n.offsetTop);const s=Oo(null==o?void 0:o.pageYOffset,r.scrollTop),a=Oo(null==o?void 0:o.pageXOffset,r.scrollLeft),i=Oo(r.clientTop,n.clientTop),l=Oo(r.clientLeft,n.clientLeft);return Bo(e).translate(a-l,s-i)})(e),o=(e=>fg.get(e))(e);return{element:e,bottom:n.top+o,height:o,pos:n,cleanup:t}},Cg=(e,t)=>{const n=((e,t)=>{const n=Ln(e);if(0===n.length||vg(e))return{element:e,offset:t};if(t<n.length&&!vg(n[t]))return{element:n[t],offset:0};{const o=n[n.length-1];return vg(o)?{element:e,offset:t}:"img"===qt(o)?{element:o,offset:1}:Gt(o)?{element:o,offset:wr(o).length}:{element:o,offset:Ln(o).length}}})(e,t),o=yn.fromHtml('<span data-mce-bogus="all" style="display: inline-block;">\ufeff</span>');return po(n.element,o),yg(o,(()=>xo(o)))},wg=(e,t,n,o)=>{kg(e,((r,s)=>Eg(e,t,n,o)),n)},xg=(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(e,t,Po(t).top,o,r),((e,t)=>{e.dispatch("AfterScrollIntoView",t)})(e,s)},Eg=(e,t,n,o)=>{const r=yn.fromDom(e.getBody()),s=yn.fromDom(e.getDoc());r.dom.offsetWidth;const a=Cg(yn.fromDom(n.startContainer),n.startOffset);xg(e,s,t,a,o),a.cleanup()},_g=(e,t,n,o)=>{const r=yn.fromDom(e.getDoc());xg(e,r,n,(e=>yg(yn.fromDom(e),S))(t),o)},kg=(e,t,n)=>{const o=n.startContainer,r=n.startOffset,s=n.endContainer,a=n.endOffset;t(yn.fromDom(o),yn.fromDom(s));const i=e.dom.createRng();i.setStart(o,r),i.setEnd(s,a),e.selection.setRng(n)},Sg=(e,t,n,o,r)=>{const s=t.pos;if(o)Lo(s.left,s.top,r);else{const o=s.top-n+t.height;Lo(-e.getBody().getBoundingClientRect().left,o,r)}},Ng=(e,t,n,o,r,s)=>{const a=o+n,i=r.pos.top,l=r.bottom,d=l-i>=o;if(i<n)Sg(e,r,o,!1!==s,t);else if(i>a){Sg(e,r,o,d?!1!==s:!0===s,t)}else l>a&&!d&&Sg(e,r,o,!0===s,t)},Rg=(e,t,n,o,r)=>{const s=Nn(t).dom.innerHeight;Ng(e,t,n,s,o,r)},Ag=(e,t,n,o,r)=>{const s=Nn(t).dom.innerHeight;Ng(e,t,n,s,o,r);const a=bg(o.element),i=Fo(window);a.top<i.y?Mo(o.element,!1!==r):a.top>i.bottom&&Mo(o.element,!0===r)},Dg=(e,t,n)=>wg(e,Rg,t,n),Tg=(e,t,n)=>_g(e,t,Rg,n),Og=(e,t,n)=>wg(e,Ag,t,n),Bg=(e,t,n)=>_g(e,t,Ag,n),Pg=(e,t,n)=>{(e.inline?Dg:Og)(e,t,n)},Lg=(e,t=!1)=>e.dom.focus({preventScroll:t}),Mg=e=>{const t=$n(e).dom;return e.dom===t.activeElement},Ig=(e=gg())=>U.from(e.dom.activeElement).map(yn.fromDom),Fg=(e,t)=>{const n=Gt(t)?wr(t).length:Ln(t).length+1;return e>n?n:e<0?0:e},Ug=e=>Yf.range(e.start,Fg(e.soffset,e.start),e.finish,Fg(e.foffset,e.finish)),zg=(e,t)=>!qo(t.dom)&&(_n(e,t)||En(e,t)),jg=e=>t=>zg(e,t.start)&&zg(e,t.finish),Hg=e=>Yf.range(yn.fromDom(e.startContainer),e.startOffset,yn.fromDom(e.endContainer),e.endOffset),$g=e=>(e=>{const t=e.getSelection();return(t&&0!==t.rangeCount?U.from(t.getRangeAt(0)):U.none()).map(Hg)})(Nn(e).dom).filter(jg(e)),qg=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()}},Vg=e=>{const t=(e=>e.inline||Dt.browser.isFirefox())(e)?$g(yn.fromDom(e.getBody())):U.none();e.bookmark=t.isSome()?t:e.bookmark},Wg=e=>(e.bookmark?e.bookmark:U.none()).bind((t=>((e,t)=>U.from(t).filter(jg(e)).map(Ug))(yn.fromDom(e.getBody()),t))).bind(qg),Kg={isEditorUIElement:e=>{const t=e.className.toString();return-1!==t.indexOf("tox-")||-1!==t.indexOf("mce-")}},Yg={setEditorTimeout:(e,t,n)=>((e,t)=>(_(t)||(t=0),setTimeout(e,t)))((()=>{e.removed||t()}),n),setEditorInterval:(e,t,n)=>{const o=((e,t)=>(_(t)||(t=0),setInterval(e,t)))((()=>{e.removed?clearInterval(o):t()}),n);return o}},Gg=e=>{const t=ii((()=>{Vg(e)}),0);e.on("init",(()=>{e.inline&&((e,t)=>{const n=()=>{t.throttle()};Xa.DOM.bind(document,"mouseup",n),e.on("remove",(()=>{Xa.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)||Vg(e)}))})(e,t)})),e.on("remove",(()=>{t.cancel()}))};let Xg;const Qg=Xa.DOM,Jg=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"))},Zg=(e,t)=>{const n=Fd(e),o=Qg.getParent(t,(t=>(e=>Vo(e)&&Kg.isEditorUIElement(e))(t)||!!n&&e.dom.is(t,n)));return null!==o},ep=e=>{try{const t=$n(yn.fromDom(e.getElement()));return Ig(t).fold((()=>document.body),(e=>e.dom))}catch(e){return document.body}},tp=(e,t)=>{const n=t.editor;Gg(n);const o=(e,t)=>{if(Sc(e)&&!0!==e.inline){t(yn.fromDom(e.getContainer()),"tox-edit-focus")}};n.on("focusin",(()=>{const t=e.focusedEditor;Jg(ep(n))&&o(n,fn),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",(()=>{Yg.setEditorTimeout(n,(()=>{const t=e.focusedEditor;Jg(ep(n))&&t===n||o(n,pn),Zg(n,ep(n))||t!==n||(n.dispatch("blur",{focusedEditor:null}),e.focusedEditor=null)}))})),Xg||(Xg=t=>{const n=e.activeEditor;n&&Wn(t).each((t=>{const o=t;o.ownerDocument===document&&(o===document.body||Zg(n,o)||e.focusedEditor!==n||(n.dispatch("blur",{focusedEditor:null}),e.focusedEditor=null))}))},Qg.bind(document,"focusin",Xg))},np=(e,t)=>{e.focusedEditor===t.editor&&(e.focusedEditor=null),!e.activeEditor&&Xg&&(Qg.unbind(document,"focusin",Xg),Xg=null)},op=(e,t)=>(e=>e.collapsed?U.from(Ii(e.startContainer,e.startOffset)).map(yn.fromDom):U.none())(t).bind((t=>Rr(t)?U.some(t):_n(e,t)?U.none():U.some(e))),rp=(e,t)=>{op(yn.fromDom(e.getBody()),t).bind((e=>Ym(e.dom))).fold((()=>{e.selection.normalize()}),(t=>e.selection.setRng(t.toRange())))},sp=e=>{if(e.setActive)try{e.setActive()}catch(t){e.focus()}else e.focus()},ap=e=>{return Mg(e)||(t=e,Ig($n(t)).filter((e=>t.dom.contains(e.dom)))).isSome();var t},ip=e=>e.inline?(e=>{const t=e.getBody();return t&&ap(yn.fromDom(t))})(e):(e=>x(e.iframeElement)&&Mg(yn.fromDom(e.iframeElement)))(e),lp=e=>ip(e)||(e=>{const t=$n(yn.fromDom(e.getElement()));return Ig(t).filter((t=>!Jg(t.dom)&&Zg(e,t.dom))).isSome()})(e),dp=e=>e.editorManager.setActive(e),cp=(e,t)=>{e.removed||(t?dp(e):(e=>{const t=e.selection,n=e.getBody();let o=t.getRng();e.quirks.refreshContentEditable(),x(e.bookmark)&&!ip(e)&&Wg(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 sp(r),rp(e,o),void dp(e);e.inline||(Dt.browser.isOpera()||sp(n),e.getWin().focus()),(Dt.browser.isFirefox()||e.inline)&&(sp(n),rp(e,o)),dp(e)})(e))},mp=(e,t)=>t.collapsed?e.isEditable(t.startContainer):e.isEditable(t.startContainer)&&e.isEditable(t.endContainer),up=(e,t,n,o,r)=>{const s=n?t.startContainer:t.endContainer,a=n?t.startOffset:t.endOffset;return U.from(s).map(yn.fromDom).map((e=>o&&t.collapsed?e:Mn(e,r(e,a)).getOr(e))).bind((e=>Yt(e)?U.some(e):Rn(e).filter(Yt))).map((e=>e.dom)).getOr(e)},fp=(e,t,n=!1)=>up(e,t,!0,n,((e,t)=>Math.min(Un(e),t))),gp=(e,t,n=!1)=>up(e,t,!1,n,((e,t)=>t>0?t-1:t)),pp=(e,t)=>{const n=e;for(;e&&tr(e)&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n},hp=(e,t)=>W(t,(t=>{const n=e.dispatch("GetSelectionRange",{range:t});return n.range!==t?n.range:t})),bp=["img","br"],vp=e=>{const t=xr(e).filter((e=>0!==e.trim().length||e.indexOf(vr)>-1)).isSome();return t||q(bp,qt(e))||(e=>Kt(e)&&"false"===nn(e,"contenteditable"))(e)},yp=(e,t)=>{const n=e=>{const o=Ln(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)},Cp="[data-mce-autocompleter]",wp=(e,t)=>{if(xp(yn.fromDom(e.getBody())).isNone()){const o=yn.fromHtml('<span data-mce-autocompleter="1" data-mce-bogus="1"></span>',e.getDoc());vo(o,yn.fromDom(t.extractContents())),t.insertNode(o.dom),Rn(o).each((e=>e.dom.normalize())),(n=o,yp(n,vp)).map((t=>{e.selection.setCursorLocation(t.dom,(e=>"img"===qt(e)?1:xr(e).fold((()=>Ln(e).length),(e=>e.length)))(t))}))}var n},xp=e=>to(e,Cp),Ep={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},_p=(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}},kp=e=>{var t;const n=null!==(t=e.value)&&void 0!==t?t:"";if(!is(n))return!1;const o=e.parent;return!o||"span"===o.name&&!o.attr("style")||!/^[ ]+$/.test(n)},Sp=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 Np{static create(e,t){const n=new Np(e,Ep[e]||1);return t&&he(t,((e,t)=>{n.attr(t,e)})),n}constructor(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}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 Np(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=_p(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=_p(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(Sp(r))return!1;if(s)do{if(1===s.type){if(s.attr("data-mce-bogus"))continue;if(e[s.name])return!1;if(Sp(s))return!1}if(8===s.type)return!1;if(3===s.type&&!kp(s))return!1;if(3===s.type&&s.parent&&t[s.parent.name]&&is(null!==(o=s.value)&&void 0!==o?o:""))return!1;if(n&&n(s))return!1}while(s=_p(s,r));return!0}walk(e){return _p(this,null,e)}}const Rp=Pt.makeMap("NOSCRIPT STYLE SCRIPT XMP IFRAME NOEMBED NOFRAMES PLAINTEXT"," "),Ap=e=>g(e.nodeValue)&&e.nodeValue.includes(Pr),Dp=e=>(0===e.length?"":`${W(e,(e=>`[${e}]`)).join(",")},`)+'[data-mce-bogus="all"]',Tp=e=>document.createTreeWalker(e,NodeFilter.SHOW_COMMENT,(e=>Ap(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP)),Op=e=>document.createTreeWalker(e,NodeFilter.SHOW_TEXT,(e=>{if(Ap(e)){const t=e.parentNode;return t&&ke(Rp,t.nodeName)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}return NodeFilter.FILTER_SKIP})),Bp=e=>null!==Tp(e).nextNode(),Pp=e=>null!==Op(e).nextNode(),Lp=(e,t)=>null!==t.querySelector(Dp(e)),Mp=(e,t)=>{K(((e,t)=>t.querySelectorAll(Dp(e)))(e,t),(t=>{const n=yn.fromDom(t);"all"===nn(n,"data-mce-bogus")?xo(n):K(e,(e=>{rn(n,e)&&sn(n,e)}))}))},Ip=e=>{let t=e.nextNode();for(;null!==t;)t.nodeValue=null,t=e.nextNode()},Fp=N(Ip,Tp),Up=N(Ip,Op),zp=(e,t)=>{const n=[{condition:O(Lp,t),action:O(Mp,t)},{condition:Bp,action:Fp},{condition:Pp,action:Up}];let o=e,r=!1;return K(n,(({condition:t,action:n})=>{t(o)&&(r||(o=e.cloneNode(!0),r=!0),n(o))})),o},jp=e=>{const t=zo(e,"[data-mce-bogus]");K(t,(e=>{"all"===nn(e,"data-mce-bogus")?xo(e):_r(e)?(po(e,yn.fromText(br)),xo(e)):Eo(e)}))},Hp=e=>{const t=zo(e,"input");K(t,(e=>{sn(e,"name")}))},$p=(e,t)=>{const n=e.getDoc(),o=$n(yn.fromDom(e.getBody())),r=yn.fromTag("div",n);en(r,"data-mce-bogus","all"),lo(r,{position:"fixed",left:"-9999999px",top:"0"}),So(r,t.innerHTML),jp(r),Hp(r);const s=(e=>zn(e)?e:yn.fromDom(Sn(e).dom.body))(o);vo(s,r);const a=Mr(r.dom.innerText);return xo(r),a},qp=(e,t,n)=>{let o;o="raw"===t.format?Pt.trim(Mr(zp(n,e.serializer.getTempAttrs()).innerHTML)):"text"===t.format?$p(e,n):"tree"===t.format?e.serializer.serialize(n,t):((e,t)=>{const n=Ql(e),o=new RegExp(`^(<${n}[^>]*>(&nbsp;|&#160;|\\s| |<br \\/>|)<\\/${n}>[\r\n]*|<br \\/>[\r\n]*)$`);return t.replace(o,"")})(e,e.serializer.serialize(n,t));return"text"!==t.format&&!Dr(yn.fromDom(n))&&g(o)?Pt.trim(o):o},Vp=Pt.makeMap,Wp=e=>{const t=[],n=(e=e||{}).indent,o=Vp(e.indent_before||""),r=Vp(e.indent_after||""),s=ia.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=ya())=>{const n=Wp(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),Cs(s))g(e.value)&&n.text(e.value,!0),n.end(s);else if(!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()}}},Yp=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=>{Yp.add(e)}));const Gp=["font","text-decoration","text-emphasis"],Xp=(e,t)=>ge(e.parseStyle(e.getAttrib(t,"style"))),Qp=(e,t)=>re(Xp(e,t),(e=>!(e=>Yp.has(e))(e))),Jp=(e,t,n)=>{const o=Xp(e,t),r=Xp(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 V(o,(e=>{const t=t=>V(t,(t=>t===e));if(!t(r)&&t(Gp)){const e=X(r,(e=>V(Gp,(t=>qe(e,t)))));return V(e,s)}return s(e)}))},Zp=(e,t,n)=>U.from(n.container()).filter(tr).exists((o=>{const r=e?0:-1;return t(o.data.charAt(n.offset()+r))})),eh=O(Zp,!0,gu),th=O(Zp,!1,gu),nh=e=>{const t=e.container();return tr(t)&&(0===t.data.length||Lr(t.data)&&xf.isBookmarkNode(t.parentNode))},oh=(e,t)=>n=>gm(e?0:-1,n).filter(t).isSome(),rh=e=>lr(e)&&"block"===co(yn.fromDom(e),"display"),sh=e=>cr(e)&&!(e=>Vo(e)&&"all"===e.getAttribute("data-mce-bogus"))(e),ah=oh(!0,rh),ih=oh(!1,rh),lh=oh(!0,fr),dh=oh(!1,fr),ch=oh(!0,Jo),mh=oh(!1,Jo),uh=oh(!0,sh),fh=oh(!1,sh),gh=(e,t)=>((e,t,n)=>_n(t,e)?Dn(e,(e=>n(e)||En(e,t))).slice(0,-1):[])(e,t,I),ph=(e,t)=>[e].concat(gh(e,t)),hh=(e,t,n)=>qm(e,t,n,nh),bh=(e,t,n)=>ee(ph(yn.fromDom(t.container()),e),(e=>t=>e.isBlock(qt(t)))(n)),vh=(e,t,n,o)=>hh(e,t.dom,n).forall((e=>bh(t,n,o).fold((()=>!fm(e,n,t.dom)),(o=>!fm(e,n,t.dom)&&_n(o,yn.fromDom(e.container())))))),yh=(e,t,n,o)=>bh(t,n,o).fold((()=>hh(e,t.dom,n).forall((e=>!fm(e,n,t.dom)))),(t=>hh(e,t.dom,n).isNone())),Ch=O(yh,!1),wh=O(yh,!0),xh=O(vh,!1),Eh=O(vh,!0),_h=e=>Em(e).exists(_r),kh=(e,t,n,o)=>{const r=X(ph(yn.fromDom(n.container()),t),(e=>o.isBlock(qt(e)))),s=ce(r).getOr(t);return Hm(e,s.dom,n).filter(_h)},Sh=(e,t,n)=>Em(t).exists(_r)||kh(!0,e,t,n).isSome(),Nh=(e,t,n)=>(e=>U.from(e.getNode(!0)).map(yn.fromDom))(t).exists(_r)||kh(!1,e,t,n).isSome(),Rh=O(kh,!1),Ah=O(kh,!0),Dh=e=>rl.isTextPosition(e)&&!e.isAtStart()&&!e.isAtEnd(),Th=(e,t,n)=>{const o=X(ph(yn.fromDom(t.container()),e),(e=>n.isBlock(qt(e))));return ce(o).getOr(e)},Oh=(e,t,n)=>Dh(t)?th(t):th(t)||Km(Th(e,t,n).dom,t).exists(th),Bh=(e,t,n)=>Dh(t)?eh(t):eh(t)||Wm(Th(e,t,n).dom,t).exists(eh),Ph=e=>Em(e).bind((e=>Qn(e,Yt))).exists((e=>(e=>q(["pre","pre-wrap"],e))(co(e,"white-space")))),Lh=(e,t,n)=>((e,t)=>Km(e.dom,t).isNone())(e,t)||((e,t)=>Wm(e.dom,t).isNone())(e,t)||Ch(e,t,n)||wh(e,t,n)||Nh(e,t,n)||Sh(e,t,n),Mh=(e,t)=>n=>{return o=new Ho(n,e)[t](),x(o)&&cr(o)&&nm(o);var o},Ih=(e,t,n)=>!Ph(t)&&(Lh(e,t,n)||Oh(e,t,n)||Bh(e,t,n)),Fh=(e,t,n)=>!Ph(t)&&(Ch(e,t,n)||xh(e,t,n)||Nh(e,t,n)||Oh(e,t,n)||((e,t)=>{const n=Km(e.dom,t).getOr(t),o=Mh(e.dom,"prev");return t.isAtStart()&&(o(t.container())||o(n.container()))})(e,t)),Uh=(e,t,n)=>!Ph(t)&&(wh(e,t,n)||Eh(e,t,n)||Sh(e,t,n)||Bh(e,t,n)||((e,t)=>{const n=Wm(e.dom,t).getOr(t),o=Mh(e.dom,"next");return t.isAtEnd()&&(o(t.container())||o(n.container()))})(e,t)),zh=(e,t,n)=>Fh(e,t,n)||Uh(e,(e=>{const t=e.container(),n=e.offset();return tr(t)&&n<t.data.length?rl(t,n+1):e})(t),n),jh=(e,t)=>uu(e.charAt(t)),Hh=(e,t)=>gu(e.charAt(t)),$h=(e,t,n,o)=>{const r=t.data,s=rl(t,0);return n||!jh(r,0)||zh(e,s,o)?!!(n&&Hh(r,0)&&Fh(e,s,o))&&(t.data=vr+r.slice(1),!0):(t.data=" "+r.slice(1),!0)},qh=e=>{const t=e.data,n=(e=>{const t=e.split("");return W(t,((e,n)=>uu(e)&&n>0&&n<t.length-1&&pu(t[n-1])&&pu(t[n+1])?" ":e)).join("")})(t);return n!==t&&(e.data=n,!0)},Vh=(e,t,n,o)=>{const r=t.data,s=rl(t,r.length-1);return n||!jh(r,r.length-1)||zh(e,s,o)?!!(n&&Hh(r,r.length-1)&&Uh(e,s,o))&&(t.data=r.slice(0,-1)+vr,!0):(t.data=r.slice(0,-1)+" ",!0)},Wh=(e,t,n)=>{const o=t.container();if(!tr(o))return U.none();if((e=>{const t=e.container();return tr(t)&&$e(t.data,vr)})(t)){const r=$h(e,o,!1,n)||qh(o)||Vh(e,o,!1,n);return Ft(r,t)}if(zh(e,t,n)){const r=$h(e,o,!0,n)||Vh(e,o,!0,n);return Ft(r,t)}return U.none()},Kh=(e,t,n,o)=>{if(0===n)return;const r=yn.fromDom(e),s=Xn(r,(e=>o.isBlock(qt(e)))).getOr(r),a=e.data.slice(t,t+n),i=t+n>=e.data.length&&Uh(s,rl(e,e.data.length),o),l=0===t&&Fh(s,rl(e,0),o);e.replaceData(t,n,cs(a,4,l,i))},Yh=(e,t,n)=>{const o=e.data.slice(t),r=o.length-Ye(o).length;Kh(e,t,r,n)},Gh=(e,t,n)=>{const o=e.data.slice(0,t),r=o.length-Ge(o).length;Kh(e,t-r,r,n)},Xh=(e,t,n,o,r=!0)=>{const s=Ge(e.data).length,a=r?e:t,i=r?t:e;return r?a.appendData(i.data):a.insertData(0,i.data),xo(yn.fromDom(i)),o&&Yh(a,s,n),a},Qh=(e,t)=>((e,t)=>{const n=e.container(),o=e.offset();return!rl.isTextPosition(e)&&n===t.parentNode&&o>rl.before(t).offset()})(t,e)?rl(t.container(),t.offset()-1):t,Jh=e=>{return os(e.previousSibling)?U.some((t=e.previousSibling,tr(t)?rl(t,t.data.length):rl.after(t))):e.previousSibling?Gm(e.previousSibling):U.none();var t},Zh=e=>{return os(e.nextSibling)?U.some((t=e.nextSibling,tr(t)?rl(t,0):rl.before(t))):e.nextSibling?Ym(e.nextSibling):U.none();var t},eb=(e,t)=>Jh(t).orThunk((()=>Zh(t))).orThunk((()=>((e,t)=>U.from(t.previousSibling?t.previousSibling:t.parentNode).bind((t=>Km(e,rl.before(t)))).orThunk((()=>Wm(e,rl.after(t)))))(e,t))),tb=(e,t)=>Zh(t).orThunk((()=>Jh(t))).orThunk((()=>((e,t)=>Wm(e,rl.after(t)).orThunk((()=>Km(e,rl.before(t)))))(e,t))),nb=(e,t,n)=>((e,t,n)=>e?tb(t,n):eb(t,n))(e,t,n).map(O(Qh,n)),ob=(e,t,n)=>{n.fold((()=>{e.focus()}),(n=>{e.selection.setRng(n.toRange(),t)}))},rb=(e,t)=>t&&ke(e.schema.getBlockElements(),qt(t)),sb=(e,t,n,o)=>{const r=Tn(e).filter(Gt),s=On(e).filter(Gt);return xo(e),(a=r,i=s,l=t,d=(e,t,r)=>{const s=e.dom,a=t.dom,i=s.data.length;return Xh(s,a,n,o),r.container()===a?rl(s,i):r},a.isSome()&&i.isSome()&&l.isSome()?U.some(d(a.getOrDie(),i.getOrDie(),l.getOrDie())):U.none()).orThunk((()=>(o&&(r.each((e=>Gh(e.dom,e.dom.length,n))),s.each((e=>Yh(e.dom,0,n)))),t)));var a,i,l,d},ab=(e,t,n,o=!0,r=!1)=>{const s=nb(t,e.getBody(),n.dom),a=Xn(n,O(rb,e),(i=e.getBody(),e=>e.dom===i));var i;const l=sb(n,s,e.schema,((e,t)=>ke(e.schema.getTextInlineElements(),qt(t)))(e,n));e.dom.isEmpty(e.getBody())?(e.setContent(""),e.selection.setCursorLocation()):a.bind((e=>((e,t)=>{if(ys(e)){const n=yn.fromHtml('<br data-mce-bogus="1">');return t?K(Ln(e),(e=>{Xu(e)||xo(e)})):wo(e),vo(e,n),U.some(rl.before(n.dom))}return U.none()})(e,r))).fold((()=>{o&&ob(e,t,l)}),(n=>{o&&ob(e,t,U.some(n))}))},ib=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,lb=(e,t)=>wn(yn.fromDom(t),Ed(e))&&!Ls(e.schema,t)&&e.dom.isEditable(t),db=e=>{var t;return"rtl"===Xa.DOM.getStyle(e,"direction",!0)||(e=>ib.test(e))(null!==(t=e.textContent)&&void 0!==t?t:"")},cb=(e,t,n)=>{const o=((e,t,n)=>X(Xa.DOM.getParents(n.container(),"*",t),e))(e,t,n);return U.from(o[o.length-1])},mb=(e,t)=>{const n=t.container(),o=t.offset();return e?zr(n)?tr(n.nextSibling)?rl(n.nextSibling,0):rl.after(n):$r(t)?rl(n,o+1):t:zr(n)?tr(n.previousSibling)?rl(n.previousSibling,n.previousSibling.data.length):rl.before(n):qr(t)?rl(n,o-1):t},ub=O(mb,!0),fb=O(mb,!1),gb=(e,t)=>{const n=e=>e.stopImmediatePropagation();e.on("beforeinput input",n,!0),e.getDoc().execCommand(t),e.off("beforeinput input",n)},pb=e=>gb(e,"Delete"),hb=e=>kr(e)||Nr(e),bb=(e,t)=>_n(e,t)?Qn(t,hb,(e=>t=>Lt(Rn(t),e,En))(e)):U.none(),vb=(e,t=!0)=>{e.dom.isEmpty(e.getBody())&&e.setContent("",{no_selection:!t})},yb=(e,t,n)=>It(Ym(n),Gm(n),((o,r)=>{const s=mb(!0,o),a=mb(!1,r),i=mb(!1,t);return e?Wm(n,i).exists((e=>e.isEqual(a)&&t.isEqual(s))):Km(n,i).exists((e=>e.isEqual(s)&&t.isEqual(a)))})).getOr(!0),Cb=e=>{var t;return(8===Vt(t=e)||"#comment"===qt(t)?Tn(e):Fn(e)).bind(Cb).orThunk((()=>U.some(e)))},wb=(e,t,n,o=!0)=>{var r;t.deleteContents();const s=Cb(n).getOr(n),a=yn.fromDom(null!==(r=e.dom.getParent(s.dom,e.dom.isBlock))&&void 0!==r?r:n.dom);if(a.dom===e.getBody()?vb(e,o):ys(a)&&(Br(a),o&&e.selection.setCursorLocation(a.dom,0)),!En(n,a)){const e=Lt(Rn(a),n)?[]:Rn(i=a).map(Ln).map((e=>X(e,(e=>!En(i,e))))).getOr([]);K(e.concat(Ln(n)),(e=>{En(e,a)||_n(e,a)||!ys(e)||xo(e)}))}var i},xb=(e,t)=>((e,t)=>{const n=e.dom;return n.parentNode?Jn(yn.fromDom(n.parentNode),(n=>!En(e,n)&&t(n))):U.none()})(e,t).isSome(),Eb=(e,t)=>Zn(e,t).isSome(),_b=e=>zo(e,"td,th"),kb=(e,t)=>Cu(yn.fromDom(e),t),Sb=e=>(e=>It(e.startTable,e.endTable,((t,n)=>{const o=Eb(t,(e=>En(e,n))),r=Eb(n,(e=>En(e,t)));return o||r?{...e,startTable:o?U.none():e.startTable,endTable:r?U.none():e.endTable,isSameTable:!1,isMultiTable:!1}:e})).getOr(e))(e),Nb=(e,t)=>({start:e,end:t}),Rb=Dl([{singleCellTable:["rng","cell"]},{fullTable:["table"]},{partialTable:["cells","outsideDetails"]},{multiTable:["startTableCells","endTableCells","betweenRng"]}]),Ab=(e,t)=>no(yn.fromDom(e),"td,th",t),Db=e=>!En(e.start,e.end),Tb=(e,t)=>Cu(e.start,t).bind((n=>Cu(e.end,t).bind((e=>Ft(En(n,e),n))))),Ob=e=>t=>Tb(t,e).map((e=>((e,t,n)=>({rng:e,table:t,cells:n}))(t,e,_b(e)))),Bb=(e,t,n,o)=>{if(n.collapsed||!e.forall(Db))return U.none();if(t.isSameTable){const t=e.bind(Ob(o));return U.some({start:t,end:t})}{const e=Ab(n.startContainer,o),t=Ab(n.endContainer,o),r=e.bind((e=>t=>Cu(t,e).bind((e=>me(_b(e)).map((e=>Nb(t,e))))))(o)).bind(Ob(o)),s=t.bind((e=>t=>Cu(t,e).bind((e=>ce(_b(e)).map((e=>Nb(e,t))))))(o)).bind(Ob(o));return U.some({start:r,end:s})}},Pb=(e,t)=>te(e,(e=>En(e,t))),Lb=e=>It(Pb(e.cells,e.rng.start),Pb(e.cells,e.rng.end),((t,n)=>e.cells.slice(t,n+1))),Mb=(e,t,n)=>e.exists((e=>((e,t)=>!Db(e)&&Tb(e,t).exists((e=>{const t=e.dom.rows;return 1===t.length&&1===t[0].cells.length})))(e,n)&&Eu(e.start,t))),Ib=(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},Fb=(e,t)=>{const n=(e=>t=>En(e,t))(e),o=((e,t)=>{const n=Ab(e.startContainer,t),o=Ab(e.endContainer,t);return It(n,o,Nb)})(t,n),r=((e,t)=>{const n=kb(e.startContainer,t),o=kb(e.endContainer,t),r=n.isSome(),s=o.isSome(),a=It(n,o,En).getOr(!1);return Sb({startTable:n,endTable:o,isStartInTable:r,isEndInTable:s,isSameTable:a,isMultiTable:!a&&r&&s})})(t,n);return Mb(o,t,n)?o.map((e=>Rb.singleCellTable(t,e.start))):r.isMultiTable?((e,t,n,o)=>Bb(e,t,n,o).bind((({start:e,end:o})=>{const r=e.bind(Lb).getOr([]),s=o.bind(Lb).getOr([]);if(r.length>0&&s.length>0){const e=Ib(n,t);return U.some(Rb.multiTable(r,s,e))}return U.none()})))(o,r,t,n):((e,t,n,o)=>Bb(e,t,n,o).bind((({start:e,end:t})=>e.or(t))).bind((e=>{const{isSameTable:o}=t,r=Lb(e).getOr([]);if(o&&e.cells.length===r.length)return U.some(Rb.fullTable(e.table));if(r.length>0){if(o)return U.some(Rb.partialTable(r,U.none()));{const e=Ib(n,t);return U.some(Rb.partialTable(r,U.some({...t,rng:e})))}}return U.none()})))(o,r,t,n)},Ub=e=>K(e,(e=>{sn(e,"contenteditable"),Br(e)})),zb=(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)),qb(e,r,t,!1).each((e=>e()))},jb=e=>{const t=yu(e),n=yn.fromDom(e.selection.getNode());mr(n.dom)&&ys(n)?e.selection.setCursorLocation(n.dom,0):e.selection.collapse(!0),t.length>1&&V(t,(e=>En(e,n)))&&en(n,"data-mce-selected","1")},Hb=(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(yn.fromDom))(e,r?n.endContainer:n.startContainer);n.deleteContents(),((e,t,n)=>{n.each((n=>{t?xo(n):(Br(n),e.selection.setCursorLocation(n.dom,0))}))})(e,r,s.filter(ys));const a=r?t[0]:t[t.length-1];return zb(e,a,o,r),ys(a)?U.none():U.some(r?t.slice(1):t.slice(0,-1))})).getOr(t);Ub(r),jb(e)})),$b=(e,t,n,o)=>U.some((()=>{const r=e.selection.getRng(),s=t[0],a=n[n.length-1];zb(e,s,r,!0),zb(e,a,r,!1);const i=ys(s)?t:t.slice(1),l=ys(a)?n:n.slice(0,-1);Ub(i.concat(l)),o.deleteContents(),jb(e)})),qb=(e,t,n,o=!0)=>U.some((()=>{wb(e,t,n,o)})),Vb=(e,t)=>U.some((()=>ab(e,!1,t))),Wb=(e,t,n,o)=>Yb(t,o).fold((()=>((e,t,n)=>Fb(t,n).bind((t=>t.fold(O(qb,e),O(Vb,e),O(Hb,e),O($b,e)))))(e,t,n)),(t=>((e,t)=>Gb(e,t))(e,t))),Kb=(e,t)=>ee(ph(t,e),Ar),Yb=(e,t)=>ee(ph(t,e),Jt("caption")),Gb=(e,t)=>U.some((()=>{Br(t),e.selection.setCursorLocation(t.dom,0)})),Xb=(e,t,n,o,r)=>$m(n,e.getBody(),r).fold((()=>U.some(S)),(s=>((e,t,n,o)=>Ym(e.dom).bind((r=>Gm(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)=>Gb(e,t))(e,o):((e,t,n)=>Yb(e,yn.fromDom(n.getNode())).fold((()=>U.some(S)),(e=>Ft(!En(e,t),S))))(t,o,s))),Qb=(e,t,n,o)=>{const r=rl.fromRangeStart(e.selection.getRng());return Kb(n,o).bind((o=>ys(o)?Gb(e,o):((e,t,n,o,r)=>$m(n,e.getBody(),r).bind((e=>Kb(t,yn.fromDom(e.getNode())).bind((e=>En(e,o)?U.none():U.some(S))))))(e,n,t,o,r)))},Jb=(e,t)=>e?ch(t):mh(t),Zb=(e,t,n)=>{const o=yn.fromDom(e.getBody());return Yb(o,n).fold((()=>Qb(e,t,o,n).orThunk((()=>Ft(((e,t)=>{const n=rl.fromRangeStart(e.selection.getRng());return Jb(t,n)||Hm(t,e.getBody(),n).exists((e=>Jb(t,e)))})(e,t),S)))),(n=>((e,t,n,o)=>{const r=rl.fromRangeStart(e.selection.getRng());return ys(o)?Gb(e,o):Xb(e,n,t,o,r)})(e,t,o,n)))},ev=(e,t)=>{const n=yn.fromDom(e.selection.getStart(!0)),o=yu(e);return e.selection.isCollapsed()&&0===o.length?Zb(e,t,n):((e,t,n)=>{const o=yn.fromDom(e.getBody()),r=e.selection.getRng();return 0!==n.length?Hb(e,n,U.none()):Wb(e,o,r,t)})(e,n,o)},tv=(e,t)=>{let n=t;for(;n&&n!==e;){if(dr(n)||cr(n))return n;n=n.parentNode}return null},nv=["data-ephox-","data-mce-","data-alloy-","data-snooker-","_"],ov=Pt.each,rv=e=>{const t=e.dom,n=new Set(e.serializer.getTempAttrs()),o=e=>V(nv,(t=>qe(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 ov(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(ke(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(ke(t,e))return!1;return!0};if(Vo(e)&&Vo(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!mu(e)&&!mu(n)},isAttributeInternal:o}},sv=e=>["h1","h2","h3","h4","h5","h6"].includes(e.name),av=(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]}}}},iv=(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)},lv=(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=>{av(e,t,n,o)})),o})(e,t,n);iv(r,o)},dv=(e,t,n,o)=>{if((e.pad_empty_with_br||t.insert)&&n(o)){const e=new Np("br",1);t.insert&&e.attr("data-mce-bogus","1"),o.empty().append(e)}else o.empty().append(new Np("#text",3)).value=vr},cv=(e,t)=>{const n=null==e?void 0:e.firstChild;return x(n)&&n===e.lastChild&&n.name===t},mv=(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))),uv=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)},fv=(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)&&fv(e,t,n);e.unwrap()}},gv=(e,t,n,o=S)=>{const r=t.getTextBlockElements(),s=t.getNonEmptyElements(),a=t.getWhitespaceElements(),i=Pt.makeMap("tr,td,th,tbody,thead,tfoot,table,summary"),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(pv(t,i,c))fv(i,t);else{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}mv(t,s,a,m)?c.insert(i,f[0],!0):(c.insert(m,f[0],!0),c.insert(i,m)),c=f[0],(mv(t,s,a,c)||cv(c,"br"))&&c.empty().remove()}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 Np("ul",1);o(t),i.wrap(t);continue}if(t.isValidChild(i.parent.name,"div")&&t.isValidChild("div",i.name)){const e=new Np("div",1);o(e),i.wrap(e)}else fv(i,t)}}},pv=(e,t,n=t.parent)=>!!n&&(!(!e.children[t.name]||e.isValidChild(n.name,t.name))||(!("a"!==t.name||!((e,t)=>{let n=e;for(;n;){if(n.name===t)return!0;n=n.parent}return!1})(n,"a"))||!(!(e=>"summary"===e.name)(n)||!sv(t))&&!((null==n?void 0:n.firstChild)===t&&(null==n?void 0:n.lastChild)===t))),hv=e=>{const t=rl.fromRangeStart(e),n=rl.fromRangeEnd(e),o=e.commonAncestorContainer;return Hm(!1,o,n).map((r=>!fm(t,n,o)&&fm(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)},bv=e=>e.collapsed?e:hv(e),vv=(e,t)=>e.getBlockElements()[t.name]&&(e=>x(e.firstChild)&&e.firstChild===e.lastChild)(t)&&(e=>"br"===e.name||e.value===vr)(t.firstChild),yv=(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)||vv(e,t))})(e,o)&&(o=null==o?void 0:o.prev),!(!n||n!==o)&&("ul"===n.name||"ol"===n.name)},Cv=e=>x(null==e?void 0:e.firstChild)&&e.firstChild===e.lastChild&&(e=>e.data===vr||ir(e))(e.firstChild),wv=e=>{return e.length>0&&(!(t=e[e.length-1]).firstChild||Cv(t))?e.slice(0,-1):e;var t},xv=(e,t)=>{const n=e.getParent(t,e.isBlock);return n&&"LI"===n.nodeName?n:null},Ev=(e,t)=>{const n=rl.after(e),o=Im(t).prev(n);return o?o.toRange():null},_v=(e,t,n)=>{const o=e.parentNode;return o&&Pt.each(t,(t=>{o.insertBefore(t,e)})),((e,t)=>{const n=rl.before(e),o=Im(t).next(n);return o?o.toRange():null})(e,n)},kv=(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=xv(t,n.startContainer),a=wv((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=rl.fromRangeStart(n),r=Im(t.getRoot()),a=1===e?r.prev(o):r.next(o),i=null==a?void 0:a.getNode();return!i||xv(t,i)!==s};return s?c(1)?_v(s,a,d):c(2)?((e,t,n,o)=>(o.insertAfter(t.reverse(),e),Ev(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)),Ev(t[t.length-1],n)})(s,a,d,n):null},Sv=["pre"],Nv=mr,Rv=(e,t,n)=>{U.from(e.getParent(t,"td,th")).map(yn.fromDom).each((e=>((e,t)=>{Fn(e).each((n=>{Tn(n).each((o=>{t.isBlock(qt(e))&&_r(n)&&t.isBlock(qt(o))&&xo(n)}))}))})(e,n)))},Av=(e,t)=>{var n,o,r;let s;const a=e.dom,i=e.selection;if(!t)return;i.scrollIntoView(t);const l=tv(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(tr(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;tr(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);if(a.remove(t),m&&a.isEmpty(m)){const t=Nv(m);wo(yn.fromDom(m)),d.setStart(m,0),d.setEnd(m,0),t||(e=>!!e.getAttribute("data-mce-fragment"))(m)||!(s=(t=>{let n=rl.fromRangeStart(t);return n=Im(e.getBody()).next(n),null==n?void 0:n.toRange()})(d))?a.add(m,a.create("br",t?{}:{"data-mce-bogus":"1"})):(d=s,a.remove(m))}i.setRng(d)},Dv=e=>{const t=e.dom,n=bv(e.selection.getRng());e.selection.setRng(n);const o=t.getParent(n.startContainer,Nv);((e,t,n)=>{if(x(n))return n===e.getParent(t.endContainer,Nv)&&Eu(yn.fromDom(n),t);return!1})(t,n,o)?qb(e,n,yn.fromDom(o)):n.startContainer===n.endContainer&&n.endOffset-n.startOffset==1&&tr(n.startContainer.childNodes[n.startOffset])?n.deleteContents():e.getDoc().execCommand("Delete",!1)},Tv=(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">&#xFEFF;</span>';n.preserve_zwsp||(t=Mr(t)),-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()||Dv(e);const g=s.getNode(),p={context:g.nodeName.toLowerCase(),data:n.data,insert:!0},h=i.parse(t,p);if(!0===n.paste&&yv(e.schema,h)&&((e,t)=>!!xv(e,t))(a,g))return m=kv(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=q(Sv,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(tv(o,n)).forall(dr);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,t,n)=>{var o;return V(n.children(),sv)&&"SUMMARY"===(null===(o=e.getParent(t,e.isBlock))||void 0===o?void 0:o.nodeName)})(a,g,h)){e.selection.setContent(c);let n,o=s.getNode();const l=e.getBody();for(sr(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(uv).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=>pv(e.schema,t,p)));gv(b,e.schema,f),lv(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=rv(e);Pt.each(o.select("*[data-mce-fragment]"),(e=>{if(x(n[e.nodeName.toLowerCase()])&&Qp(o,e))for(let n=e.parentElement;x(n)&&n!==t&&!Jp(o,e,n);n=n.parentElement)if(r.compare(n,e)){o.remove(e,!0);break}}))}})(e,l),Av(e,a.get("mce_marker")),v=e.getBody(),Pt.each(v.getElementsByTagName("*"),(e=>{e.removeAttribute("data-mce-fragment")})),Rv(a,s.getStart(),e.schema),((e,t,n)=>{const o=Dn(yn.fromDom(n),(e=>En(e,yn.fromDom(t))));de(o,o.length-2).filter(Yt).fold((()=>Ds(e,t)),(t=>Ds(e,t.dom)))})(e.schema,e.getBody(),s.getStart()),t},Ov=e=>e instanceof Np,Bv=(e,t,n)=>{e.dom.setHTML(e.getBody(),t),!0!==n&&(e=>{ip(e)&&Ym(e.getBody()).each((t=>{const n=t.getNode(),o=Jo(n)?Ym(n).getOr(t):t;e.selection.setRng(o.toRange())}))})(e)},Pv=(e,t,n)=>U.from(e.getBody()).map((o=>Ov(t)?((e,t,n,o)=>{lv(e.parser.getNodeFilters(),e.parser.getAttributeFilters(),n);const r=Kp({validate:!1},e.schema).serialize(n),s=Mr(Dr(yn.fromDom(t))?r:Pt.trim(r));return Bv(e,s,o.no_selection),{content:n,html:s}})(e,o,t,n):((e,t,n,o)=>{if(0===(n=Mr(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=Ql(e);return e.schema.isValidChild(t.nodeName.toLowerCase(),s.toLowerCase())?(n=r,n=e.dom.createHTML(s,Jl(e),n)):n||(n=r),Bv(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=Dr(yn.fromDom(t))?n:Pt.trim(n);return Bv(e,r,o.no_selection),{content:r,html:r}}})(e,o,t,n))).getOr({content:t,html:Ov(n.content)?"":n.content}),Lv=e=>E(e)?e:I,Mv=(e,t,n)=>{const o=t(e),r=Lv(n);return o.orThunk((()=>r(e)?U.none():((e,t,n)=>{let o=e.dom;const r=Lv(n);for(;o.parentNode;){o=o.parentNode;const e=yn.fromDom(o),n=t(e);if(n.isSome())return n;if(r(e))break}return U.none()})(e,t,r)))},Iv=Fu,Fv=(e,t,n)=>{const o=e.formatter.get(n);if(o)for(let n=0;n<o.length;n++){const r=o[n];if(Wu(r)&&!1===r.inherit&&e.dom.is(t,r.selector))return!0}return!1},Uv=(e,t,n,o,r)=>{const s=e.dom.getRoot();if(t===s)return!1;const a=e.dom.getParent(t,(t=>!!Fv(e,t,n)||(t.parentNode===s||!!Hv(e,t,n,o,!0))));return!!Hv(e,a,n,o,r)},zv=(e,t,n)=>!(!Ku(n)||!Iv(t,n.inline))||(!(!Vu(n)||!Iv(t,n.block))||!!Wu(n)&&(Vo(t)&&e.is(t,n.selector))),jv=(e,t,n,o,r,s)=>{const a=n[o],i="attributes"===o;if(E(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]):zu(e,t,a[n]))return!0}else for(const o in a)if(ke(a,o)){const l=i?e.getAttrib(t,o):zu(e,t,o),d=Iu(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,Uu(d,o)))return!1}return!0},Hv=(e,t,n,o,r)=>{const s=e.formatter.get(n),a=e.dom;if(s&&Vo(t))for(let n=0;n<s.length;n++){const i=s[n];if(zv(e.dom,t,i)&&jv(a,t,i,"attributes",r,o)&&jv(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,Iu(n[r],o)))return;return i}}},$v=(e,t,n,o,r)=>{if(o)return Uv(e,o,t,n,r);if(o=e.selection.getNode(),Uv(e,o,t,n,r))return!0;const s=e.selection.getStart();return!(s===o||!Uv(e,s,t,n,r))},qv=(e,t)=>{const n=t=>En(t,yn.fromDom(e.getBody()));return U.from(e.selection.getStart(!0)).bind((o=>Mv(yn.fromDom(o),(n=>fe(t,(t=>((t,n)=>Hv(e,t.dom,n)?U.some(n):U.none())(n,t)))),n))).getOrNull()},Vv=(e,t,n)=>J(n,((n,o)=>{const r=((e,t)=>$u(e,t,(e=>{const t=e=>E(e)||e.length>1&&"%"===e.charAt(0);return V(["styles","attributes"],(n=>_e(e,n).exists((e=>{const n=b(e)?e:Ee(e);return V(n,t)}))))})))(e,o);return e.formatter.matchNode(t,o,{},r)?n.concat([o]):n}),[]),Wv=Pr,Kv=e=>{if(e){const t=new Ho(e,e);for(let e=t.current();e;e=t.next())if(tr(e))return e}return null},Yv=e=>{const t=yn.fromTag("span");return tn(t,{id:Xm,"data-mce-bogus":"1","data-mce-type":"format-caret"}),e&&vo(t,yn.fromText(Wv)),t},Gv=(e,t,n)=>{const o=e.dom,r=e.selection;if(Gu(t))ab(e,!1,yn.fromDom(t),n,!0);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=Kv(e);return t&&t.data.charAt(0)===Wv&&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)&&Br(yn.fromDom(n)),r.setRng(e)}},Xv=(e,t,n)=>{const o=e.dom,r=e.selection;if(t)Gv(e,t,n);else if(!(t=Jm(e.getBody(),r.getStart())))for(;t=o.get(Xm);)Gv(e,t,n)},Qv=(e,t)=>(e.appendChild(t),t),Jv=(e,t)=>{var n;const o=Q(e,((e,t)=>Qv(e,t.cloneNode(!1))),t),r=null!==(n=o.ownerDocument)&&void 0!==n?n:document;return Qv(o,r.createTextNode(Wv))},Zv=(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;tr(d)&&(c!==d.data.length&&(a=!0),m=m.parentNode);const u=[];let f;for(;m;){if(Hv(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=uf(r,l,i,!0);d=mg(d),e.formatter.remove(t,n,d,o),s.moveToBookmark(a)}else{const a=Jm(e.getBody(),f),i=x(a)?r.getParents(f.parentNode,F,a):[],l=Yv(!1).dom;((e,t,n)=>{var o,r;const s=e.dom,a=s.getParent(n,O(Bu,e.schema));a&&s.isEmpty(a)?null===(o=n.parentNode)||void 0===o||o.replaceChild(t,n):(Tr(yn.fromDom(n)),s.isEmpty(n)?null===(r=n.parentNode)||void 0===r||r.replaceChild(t,n):s.insertAfter(t,n))})(e,l,null!=a?a:f);const d=((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=Vv(e,n,l);if(X(d,(t=>!qu(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,l,f,t,n,o),c=Jv([...u,...d.toArray(),...i],l);a&&Gv(e,a,x(a)),s.setCursorLocation(c,1),r.isEmpty(f)&&r.remove(f)}},ey=e=>{e.on("mouseup keydown",(t=>{var n;((e,t,n)=>{const o=e.selection,r=e.getBody();Xv(e,null,n),8!==t&&46!==t||!o.isCollapsed()||o.getStart().innerHTML!==Wv||Xv(e,Jm(r,o.getStart()),!0),37!==t&&39!==t||Xv(e,Jm(r,o.getStart()),!0)})(e,t.keyCode,(n=e.selection.getRng().endContainer,tr(n)&&Ve(n.data,vr)))}))},ty=e=>{const t=Yv(!1),n=Jv(e,t.dom);return{caretContainer:t,caretPosition:rl(n,0)}},ny=(e,t)=>{const{caretContainer:n,caretPosition:o}=ty(t);return po(yn.fromDom(e),n),xo(yn.fromDom(e)),o},oy=(e,t)=>{if(Qm(t.dom))return!1;const n=e.schema.getTextInlineElements();return ke(n,qt(t))&&!Qm(t.dom)&&!Qo(t.dom)},ry={},sy=Yo(["pre"]);((e,t)=>{ry[e]||(ry[e]=[]),ry[e].push(t)})("pre",(e=>{const t=e.selection.getRng();if(!t.collapsed){const t=e.selection.getSelectedBlocks(),n=X(X(t,sy),(e=>t=>{const n=t.previousSibling;return sy(n)&&q(e,n)})(t));K(n,(e=>{((e,t)=>{const n=yn.fromDom(t),o=Sn(n).dom;xo(n),Co(yn.fromDom(e),[yn.fromTag("br",o),yn.fromTag("br",o),...Ln(n)])})(e.previousSibling,e)}))}}));const ay=["fontWeight","fontStyle","color","fontSize","fontFamily"],iy=e=>ee(e,(e=>Ku(e)&&"span"===e.inline&&(e=>p(e.styles)&&V(ge(e.styles),(e=>q(ay,e))))(e))),ly=(e,t)=>{const n=e.get(t);return b(n)?iy(n):U.none()},dy=(e,t)=>Km(t,rl.fromRangeStart(e)).isNone(),cy=(e,t)=>!1===Wm(t,rl.fromRangeEnd(e)).exists((e=>!ir(e.getNode())||Wm(t,e).isSome())),my=e=>t=>gr(t)&&e.isEditable(t),uy=e=>X((e=>{const t=e.getSelectedBlocks(),n=e.getRng();if(e.isCollapsed())return[];if(1===t.length)return dy(n,t[0])&&cy(n,t[0])?t:[];{const e=ce(t).filter((e=>dy(n,e))).toArray(),o=me(t).filter((e=>cy(n,e))).toArray(),r=t.slice(1,-1);return e.concat(r).concat(o)}})(e),my(e.dom)),fy=e=>X(e.getSelectedBlocks(),my(e.dom)),gy=Pt.each,py=e=>Vo(e)&&!mu(e)&&!Qm(e)&&!Qo(e),hy=(e,t)=>{for(let n=e;n;n=n[t]){if(tr(n)&&Xe(n.data))return e;if(Vo(n)&&!mu(n))return n}return e},by=(e,t,n)=>{const o=rv(e),r=Wo(t)&&e.dom.isEditable(t),s=Wo(n)&&e.dom.isEditable(n);if(r&&s){const r=hy(t,"previousSibling"),s=hy(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},vy=(e,t,n,o)=>{var r;if(o&&!1!==t.merge_siblings){const t=null!==(r=by(e,Ou(o),o))&&void 0!==r?r:o;by(e,t,Ou(t,!0))}},yy=(e,t,n)=>{gy(e.childNodes,(e=>{py(e)&&(t(e)&&n(e),e.hasChildNodes()&&yy(e,t,n))}))},Cy=(e,t)=>n=>!(!n||!zu(e,n,t)),wy=(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)},xy=Dl([{keep:[]},{rename:["name"]},{removed:[]}]),Ey=/^(src|href|style)$/,_y=Pt.each,ky=Fu,Sy=(e,t,n)=>e.isChildOf(t,n)&&t!==n&&!e.isBlock(n),Ny=(e,t,n)=>{let o=t[n?"startContainer":"endContainer"],r=t[n?"startOffset":"endOffset"];if(Vo(o)){const e=o.childNodes.length-1;!n&&r&&r--,o=o.childNodes[r>e?e:r]}return tr(o)&&n&&r>=o.data.length&&(o=new Ho(o,e.getBody()).next()||o),tr(o)&&!n&&0===r&&(o=new Ho(o,e.getBody()).prev()||o),o},Ry=(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},Ay=(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},Dy=(e,t,n,o,r)=>{const s=yn.fromDom(t),a=yn.fromDom(e.create(o,r)),i=n?Pn(s):Bn(s);return Co(a,i),n?(po(s,a),bo(a,s)):(ho(s,a),vo(a,s)),a.dom},Ty=(e,t,n)=>{const o=t.parentNode;let r;const s=e.dom,a=Ql(e);Vu(n)&&o===s.getRoot()&&(n.list_block&&ky(t,n.list_block)||K(ue(t.childNodes),(t=>{Pu(e,a,t.nodeName.toLowerCase())?r?r.appendChild(t):(r=Ay(s,t,a),s.setAttribs(r,Jl(e))):r=null}))),(e=>Wu(e)&&Ku(e)&&Lt(_e(e,"mixed"),!0))(n)&&!ky(n.inline,t)||s.remove(t,!0)},Oy=(e,t,n)=>_(e)?{name:t,value:null}:{name:e,value:Iu(t,n)},By=(e,t)=>{""===e.getAttrib(t,"style")&&(t.removeAttribute("style"),t.removeAttribute("data-mce-style"))},Py=(e,t,n,o,r)=>{let s=!1;_y(n.styles,((a,i)=>{const{name:l,value:d}=Oy(i,a,o),c=Uu(d,l);(n.remove_similar||v(d)||!Vo(r)||ky(zu(e,r,l),c))&&e.setStyle(t,l,""),s=!0})),s&&By(e,t)},Ly=(e,t,n,o,r)=>{const s=e.dom,a=rv(e),i=e.schema;if(Ku(t)&&Bs(i,t.inline)&&Ls(i,o)&&o.parentElement===e.getBody())return Ty(e,o,t),xy.removed();if(!t.ceFalseOverride&&o&&"false"===s.getContentEditableParent(o))return xy.keep();if(o&&!zv(s,o,t)&&!((e,t)=>t.links&&"A"===e.nodeName)(o,t))return xy.keep();const l=o,d=t.preserve_attributes;if(Ku(t)&&"all"===t.remove&&b(d)){const e=X(s.getAttribs(l),(e=>q(d,e.name.toLowerCase())));if(s.removeAllAttribs(l),K(e,(e=>s.setAttrib(l,e.name,e.value))),e.length>0)return xy.rename("span")}if("all"!==t.remove){Py(s,l,t,n,r),_y(t.attributes,((e,o)=>{const{name:a,value:i}=Oy(o,e,n);if(t.remove_similar||v(i)||!Vo(r)||ky(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(Ey.test(a)&&l.removeAttribute("data-mce-"+a),"style"===a&&Yo(["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)}})),_y(t.classes,(e=>{e=Iu(e,n),Vo(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 xy.keep()}}return"none"!==t.remove?(Ty(e,l,t),xy.removed()):xy.keep()},My=(e,t,n,o)=>Ly(e,t,n,o,o).fold(A(o),(t=>(e.dom.createFragment().appendChild(o),e.dom.rename(o,t))),A(null)),Iy=(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(Hu(e.dom,t.parentNode).reverse(),(t=>{if(!s&&Vo(t)&&"_start"!==t.id&&"_end"!==t.id){const a=Hv(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=My(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),Ku(a)&&vy(e,a,0,c))}return o})(e,s,i,o,o,!0,a,n)},c=t=>V(s,(o=>Uy(e,o,n,t,t))),m=t=>{const n=ue(t.childNodes),o=c(t)||V(s,(e=>zv(i,t,e))),r=t.parentNode;if(!o&&x(r)&&Yu(a)&&c(r),a.deep&&n.length)for(let e=0;e<n.length;e++)m(n[e]);K(["underline","line-through","overline"],(n=>{Vo(t)&&e.dom.getStyle(t,"text-decoration")===n&&t.parentNode&&ju(i,t.parentNode)===n&&Uy(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=>mu(e)&&Vo(e)&&("_start"===e.id||"_end"===e.id))(n)&&(n=n[e?"firstChild":"lastChild"]),tr(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=uf(i,t,s,t.collapsed);if(a.split){if(r=mg(r),n=Ny(e,r,!0),o=Ny(e,r),n!==o){if(n=Ry(n,!0),o=Ry(o,!1),Sy(i,n,o)){const e=U.from(n.firstChild).getOr(n);return d(Dy(i,e,!0,"span",{id:"_start","data-mce-type":"bookmark"})),void u(!0)}if(Sy(i,o,n)){const e=U.from(o.lastChild).getOr(o);return d(Dy(i,e,!1,"span",{id:"_end","data-mce-type":"bookmark"})),void u(!1)}n=Ay(i,n,"span",{id:"_start","data-mce-type":"bookmark"}),o=Ay(i,o,"span",{id:"_end","data-mce-type":"bookmark"});const e=i.createRng();e.setStartAfter(n),e.setEndBefore(o),ff(i,e,(e=>{K(e,(e=>{mu(e)||mu(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}ff(i,r,(e=>{K(e,m)}))};if(o){if(Ru(o)){const e=i.createRng();e.setStartBefore(o),e.setEndAfter(o),f(e)}else f(o);Sf(e,t,o,n)}else l.isCollapsed()&&Ku(a)&&!yu(e).length?Zv(e,t,n,r):(Du(e,(()=>Su(e,f)),(o=>Ku(a)&&$v(e,t,n,o))),e.nodeChanged()),((e,t,n)=>{"removeformat"===t?K(fy(e.selection),(t=>{K(ay,(n=>e.dom.setStyle(t,n,""))),By(e.dom,t)})):ly(e.formatter,t).each((t=>{K(fy(e.selection),(o=>Py(e.dom,o,t,n,null)))}))})(e,t,n),Sf(e,t,o,n)},Fy=(e,t,n,o,r)=>{(o||e.selection.isEditable())&&Iy(e,t,n,o,r)},Uy=(e,t,n,o,r)=>Ly(e,t,n,o,r).fold(I,(t=>(e.dom.rename(o,t),!0)),F),zy=Pt.each,jy=(e,t,n,o)=>{zy(t,(t=>{Ku(t)&&zy(e.dom.select(t.inline,o),(o=>{py(o)&&Uy(e,t,n,o,t.exact?o:null)})),((e,t,n)=>{if(t.clear_child_styles){const o=t.links?"*:not(a)":"*";gy(e.select(o,n),(n=>{py(n)&&e.isEditable(n)&&gy(t.styles,((t,o)=>{e.setStyle(n,o,"")}))}))}})(e.dom,t,o)}))},Hy=Pt.each,$y=(e,t,n,o)=>{if(Hy(n.styles,((n,r)=>{e.setStyle(t,r,Iu(n,o))})),n.styles){const n=e.getAttrib(t,"style");n&&e.setAttrib(t,"data-mce-style",n)}},qy=(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)=>{E(t.onformat)&&t.onformat(e,t,n,o),$y(i,e,t,n),Hy(t.attributes,((t,o)=>{i.setAttrib(e,o,Iu(t,n))})),Hy(t.classes,(t=>{const o=Iu(t,n);i.hasClass(e,o)||i.addClass(e,o)}))},c=(e,t)=>{let n=!1;return Hy(e,(e=>!!Wu(e)&&("false"===i.getContentEditable(t)&&!e.ceFalseOverride||(!(!x(e.collapsed)||e.collapsed===a)||(!(i.is(t,e.selector)&&!Qm(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=>Vu(e)&&!0===e.wrapper)(s)&&Hv(e,o,t,n),h=(t,n,o)=>{const r=(e=>Vu(e)&&!0!==e.wrapper)(s)&&Bu(e.schema,t)&&Pu(e,n,f);return o&&r};ff(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=Mu(e,t));const E=u&&!m;if(ir(t)&&!((e,t,n,o)=>{if(Md(e)&&Ku(t)&&n.parentNode){const t=ba(e.schema),r=xb(yn.fromDom(n),(e=>Qm(e.dom)));return Se(t,o)&&ys(yn.fromDom(n.parentNode),!1)&&!r}return!1})(e,s,t,C))return n=null,void(Vu(s)&&o.remove(t));if(p(t))n=null;else{if(h(t,C,E)){const e=o.rename(t,f);return d(e),l.push(e),void(n=null)}if(Wu(s)){let e=c(r,t);if(!e&&x(y)&&Yu(s)&&(e=c(r,y)),!Ku(s)||e)return void(n=null)}x(g)&&((t,n,r,a)=>{const l=t.nodeName.toLowerCase(),d=Pu(e,f,l)&&Pu(e,n,f),c=!i&&tr(t)&&Lr(t.data),m=Qm(t),u=!Ku(s)||!o.isBlock(t);return(r||a)&&d&&!c&&!m&&u})(t,C,E,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)&&tr(e)&&0===e.length)(e)||mu(e)||t++})),t})(a);!(l.length>1)&&o.isBlock(a)||0!==i?(Ku(s)||Vu(s)&&s.wrapper)&&(s.exact||1!==i||(a=(e=>{const t=ee(e.childNodes,Au).filter((e=>"false"!==o.getContentEditable(e)&&zv(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)),jy(e,r,n,a),((e,t,n,o,r)=>{const s=r.parentNode;Hv(e,s,n,o)&&Uy(e,t,o,r)||t.merge_with_parents&&s&&e.dom.getParent(s,(s=>!!Hv(e,s,n,o)&&(Uy(e,t,o,r),!0)))})(e,s,t,n,a),((e,t,n,o)=>{if(t.styles&&t.styles.backgroundColor){const r=Cy(e,"fontSize");yy(o,(t=>r(t)&&e.isEditable(t)),wy(e,"backgroundColor",Iu(t.styles.backgroundColor,n)))}})(o,s,n,a),((e,t,n,o)=>{const r=t=>{if(Wo(t)&&Vo(t.parentNode)&&e.isEditable(t)){const n=ju(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(Ku(t)&&("sub"===t.inline||"sup"===t.inline)){const n=Cy(e,"fontSize");yy(o,(t=>n(t)&&e.isEditable(t)),wy(e,"fontSize",""));const r=X(e.select("sup"===t.inline?"sub":"sup",o),e.isEditable);e.remove(r,!0)}})(o,s,0,a),vy(e,s,0,a)):o.remove(a,!0)}))},f=Ru(o)?o:l.getNode();if("false"===i.getContentEditable(f)&&!Mu(e,f))return c(r,o=f),void kf(e,t,o,n);if(s){if(o)if(Ru(o)){if(!c(r,o)){const e=i.createRng();e.setStartBefore(o),e.setEndAfter(o),u(i,uf(i,e,r),!0)}}else u(i,o,!0);else a&&Ku(s)&&!yu(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=Jm(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=uf(e.dom,a,s);i=mg(i),e.formatter.apply(t,n,i),r.moveToBookmark(o)}else{let s=o?Kv(o):null;o&&(null==s?void 0:s.data)===Wv||(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(bv(l.getRng())),Du(e,(()=>{Su(e,((e,t)=>{const n=t?e:uf(i,e,r);u(i,n,!1)}))}),F),e.nodeChanged()),ly(e.formatter,t).each((t=>{K(uy(e.selection),(e=>$y(i,e,t,n)))}));((e,t)=>{ke(ry,e)&&K(ry[e],(e=>{e(t)}))})(t,e)}kf(e,t,o,n)},Vy=(e,t,n,o)=>{(o||e.selection.isEditable())&&qy(e,t,n,o)},Wy=e=>ke(e,"vars"),Ky=e=>e.selection.getStart(),Yy=(e,t,n,o,r)=>Z(t,(t=>{const s=e.formatter.matchNode(t,n,null!=r?r:{},o);return!C(s)}),(t=>!!Fv(e,t,n)||!o&&x(e.formatter.matchNode(t,n,r,!0)))),Gy=(e,t)=>{const n=null!=t?t:Ky(e);return X(Hu(e.dom,n),(e=>Vo(e)&&!Qo(e)))},Xy=(e,t,n)=>{const o=Gy(e,t);he(n,((n,r)=>{const s=n=>{const s=Yy(e,o,r,n.similar,Wy(n)?n.vars:void 0),a=s.isSome();if(n.state.get()!==a){n.state.set(a);const e=s.getOr(t);Wy(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)}))},Qy=(e,t,n,o,r,s)=>(((e,t,n,o,r,s)=>{const a=t.get();K(n.split(","),(t=>{const n=_e(a,t).getOrThunk((()=>{const e={withSimilar:{state:Za(!1),similar:!0,callbacks:[]},withoutSimilar:{state:Za(!1),similar:!1,callbacks:[]},withVars:[]};return a[t]=e,e})),i=()=>{const n=Gy(e);return Yy(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:Za(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=>_e(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)}),Jy=Pt.explode,Zy=()=>{const e={};return{addFilter:(t,n)=>{K(Jy(t),(t=>{ke(e,t)||(e[t]={name:t,callbacks:[]}),e[t].callbacks.push(n)}))},getFilters:()=>Ee(e),removeFilter:(t,n)=>{K(Jy(t),(t=>{if(ke(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]}))}}},eC=(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"])}))}))},tC=(e,t,n)=>{var o;const r=Da();t.convert_fonts_to_spans&&eC(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)},nC=(e,t,n)=>{t.addNodeFilter("br",((t,o,r)=>{const s=Pt.extend({},n.getBlockElements()),a=n.getNonEmptyElements(),i=n.getWhitespaceElements();s.body=1;const l=e=>e.name in s||Is(n,e);for(let o=0,d=t.length;o<d;o++){let d=t[o],c=d.parent;if(c&&l(c)&&d===c.lastChild){let t=d.prev;for(;t;){const e=t.name;if("span"!==e||"bookmark"!==t.attr("data-mce-type")){"br"===e&&(d=null);break}t=t.prev}if(d&&(d.remove(),mv(n,a,i,c))){const t=n.getElementRule(c.name);t&&(t.removeEmpty?c.remove():t.paddEmpty&&dv(e,r,l,c))}}else{let e=d;for(;c&&c.firstChild===e&&c.lastChild===e&&(e=c,!s[c.name]);)c=c.parent;if(e===c){const e=new Np("#text",3);e.value=vr,d.replace(e)}}}}))},oC=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()},rC=(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}))},sC=e=>{return qe(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):qe(e,"data:")?(t=e,new Promise(((e,n)=>{oC(t).bind((({type:e,data:t,base64Encoded:n})=>rC(e,t,n))).fold((()=>n("Invalid data URI")),e)}))):Promise.reject("Unknown URI format");var t},aC=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 iC=0;const lC=(e,t,n)=>oC(e).bind((({data:e,type:o,base64Encoded:r})=>{if(t&&!r)return U.none();{const t=r?e:btoa(e);return n(t,o)}})),dC=(e,t,n)=>{const o=e.create((r||"blobid")+iC++,t,n);var r;return e.add(o),o},cC=(e,t,n=!1)=>lC(t,n,((t,n)=>U.from(e.getByData(t,n)).orThunk((()=>rC(n,t).map((n=>dC(e,n,t))))))),mC=(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)||cC(n,t,!0).each((t=>{e.attr("src",t.blobUri())}))};e.addAttributeFilter("src",(e=>K(e,t)))}},uC=(e,t)=>qe(e,`${t}/`),fC=(e,t)=>{const n=e.schema;t.remove_trailing_brs&&nC(t,e,n),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 Np("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)}})),mC(e,t),t.convert_unsafe_embeds&&e.addNodeFilter("object,embed",(e=>K(e,(e=>{e.replace(((e,t,n,o,r)=>{let s;s=C(e)?"iframe":uC(e,"image")?"img":uC(e,"video")?"video":uC(e,"audio")?"audio":"iframe";const a=new Np(s,1);return a.attr("audio"===s?{src:t}:{src:t,width:n,height:o}),"audio"!==s&&"video"!==s||a.attr("controls",""),"iframe"===s&&r&&a.attr("sandbox",""),a})(e.attr("type"),"object"===e.name?e.attr("data"):e.attr("src"),e.attr("width"),e.attr("height"),t.sandbox_iframes))})))),t.sandbox_iframes&&e.addNodeFilter("iframe",(e=>K(e,(e=>e.attr("sandbox","")))))},{entries:gC,setPrototypeOf:pC,isFrozen:hC,getPrototypeOf:bC,getOwnPropertyDescriptor:vC}=Object;let{freeze:yC,seal:CC,create:wC}=Object,{apply:xC,construct:EC}="undefined"!=typeof Reflect&&Reflect;xC||(xC=function(e,t,n){return e.apply(t,n)}),yC||(yC=function(e){return e}),CC||(CC=function(e){return e}),EC||(EC=function(e,t){return new e(...t)});const _C=MC(Array.prototype.forEach),kC=MC(Array.prototype.pop),SC=MC(Array.prototype.push),NC=MC(String.prototype.toLowerCase),RC=MC(String.prototype.toString),AC=MC(String.prototype.match),DC=MC(String.prototype.replace),TC=MC(String.prototype.indexOf),OC=MC(String.prototype.trim),BC=MC(RegExp.prototype.test),PC=(LC=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return EC(LC,t)});var LC;function MC(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 xC(e,t,o)}}function IC(e,t,n){var o;n=null!==(o=n)&&void 0!==o?o:NC,pC&&pC(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(hC(t)||(t[r]=e),o=e)}e[o]=!0}return e}function FC(e){const t=wC(null);for(const[n,o]of gC(e))t[n]=o;return t}function UC(e,t){for(;null!==e;){const n=vC(e,t);if(n){if(n.get)return MC(n.get);if("function"==typeof n.value)return MC(n.value)}e=bC(e)}return function(e){return console.warn("fallback value for",e),null}}const zC=yC(["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"]),jC=yC(["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"]),HC=yC(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),$C=yC(["animate","color-profile","cursor","discard","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"]),qC=yC(["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","mprescripts"]),VC=yC(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),WC=yC(["#text"]),KC=yC(["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"]),YC=yC(["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"]),GC=yC(["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"]),XC=yC(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),QC=CC(/\{\{[\w\W]*|[\w\W]*\}\}/gm),JC=CC(/<%[\w\W]*|[\w\W]*%>/gm),ZC=CC(/\${[\w\W]*}/gm),ew=CC(/^data-[\-\w.\u00B7-\uFFFF]/),tw=CC(/^aria-[\-\w]+$/),nw=CC(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ow=CC(/^(?:\w+script|data):/i),rw=CC(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),sw=CC(/^html$/i);var aw=Object.freeze({__proto__:null,MUSTACHE_EXPR:QC,ERB_EXPR:JC,TMPLIT_EXPR:ZC,DATA_ATTR:ew,ARIA_ATTR:tw,IS_ALLOWED_URI:nw,IS_SCRIPT_OR_DATA:ow,ATTR_WHITESPACE:rw,DOCTYPE_NAME:sw});const iw=()=>"undefined"==typeof window?null:window,lw=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};var dw=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:iw();const n=t=>e(t);if(n.version="3.0.5",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;const o=t.document,r=o.currentScript;let{document:s}=t;const{DocumentFragment:a,HTMLTemplateElement:i,Node:l,Element:d,NodeFilter:c,NamedNodeMap:m=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:g}=t,p=d.prototype,h=UC(p,"cloneNode"),b=UC(p,"nextSibling"),v=UC(p,"childNodes"),y=UC(p,"parentNode");if("function"==typeof i){const e=s.createElement("template");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let C,w="";const{implementation:x,createNodeIterator:E,createDocumentFragment:_,getElementsByTagName:k}=s,{importNode:S}=o;let N={};n.isSupported="function"==typeof gC&&"function"==typeof y&&x&&void 0!==x.createHTMLDocument;const{MUSTACHE_EXPR:R,ERB_EXPR:A,TMPLIT_EXPR:D,DATA_ATTR:T,ARIA_ATTR:O,IS_SCRIPT_OR_DATA:B,ATTR_WHITESPACE:P}=aw;let{IS_ALLOWED_URI:L}=aw,M=null;const I=IC({},[...zC,...jC,...HC,...qC,...WC]);let F=null;const U=IC({},[...KC,...YC,...GC,...XC]);let z=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}})),j=null,H=null,$=!0,q=!0,V=!1,W=!0,K=!1,Y=!1,G=!1,X=!1,Q=!1,J=!1,Z=!1,ee=!0,te=!1;const ne="user-content-";let oe=!0,re=!1,se={},ae=null;const ie=IC({},["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"]);let le=null;const de=IC({},["audio","video","img","source","image","track"]);let ce=null;const me=IC({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ue="http://www.w3.org/1998/Math/MathML",fe="http://www.w3.org/2000/svg",ge="http://www.w3.org/1999/xhtml";let pe=ge,he=!1,be=null;const ve=IC({},[ue,fe,ge],RC);let ye;const Ce=["application/xhtml+xml","text/html"],we="text/html";let xe,Ee=null;const _e=s.createElement("form"),ke=function(e){return e instanceof RegExp||e instanceof Function},Se=function(e){if(!Ee||Ee!==e){if(e&&"object"==typeof e||(e={}),e=FC(e),ye=ye=-1===Ce.indexOf(e.PARSER_MEDIA_TYPE)?we:e.PARSER_MEDIA_TYPE,xe="application/xhtml+xml"===ye?RC:NC,M="ALLOWED_TAGS"in e?IC({},e.ALLOWED_TAGS,xe):I,F="ALLOWED_ATTR"in e?IC({},e.ALLOWED_ATTR,xe):U,be="ALLOWED_NAMESPACES"in e?IC({},e.ALLOWED_NAMESPACES,RC):ve,ce="ADD_URI_SAFE_ATTR"in e?IC(FC(me),e.ADD_URI_SAFE_ATTR,xe):me,le="ADD_DATA_URI_TAGS"in e?IC(FC(de),e.ADD_DATA_URI_TAGS,xe):de,ae="FORBID_CONTENTS"in e?IC({},e.FORBID_CONTENTS,xe):ie,j="FORBID_TAGS"in e?IC({},e.FORBID_TAGS,xe):{},H="FORBID_ATTR"in e?IC({},e.FORBID_ATTR,xe):{},se="USE_PROFILES"in e&&e.USE_PROFILES,$=!1!==e.ALLOW_ARIA_ATTR,q=!1!==e.ALLOW_DATA_ATTR,V=e.ALLOW_UNKNOWN_PROTOCOLS||!1,W=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,K=e.SAFE_FOR_TEMPLATES||!1,Y=e.WHOLE_DOCUMENT||!1,Q=e.RETURN_DOM||!1,J=e.RETURN_DOM_FRAGMENT||!1,Z=e.RETURN_TRUSTED_TYPE||!1,X=e.FORCE_BODY||!1,ee=!1!==e.SANITIZE_DOM,te=e.SANITIZE_NAMED_PROPS||!1,oe=!1!==e.KEEP_CONTENT,re=e.IN_PLACE||!1,L=e.ALLOWED_URI_REGEXP||nw,pe=e.NAMESPACE||ge,z=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ke(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(z.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ke(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(z.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(z.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),K&&(q=!1),J&&(Q=!0),se&&(M=IC({},[...WC]),F=[],!0===se.html&&(IC(M,zC),IC(F,KC)),!0===se.svg&&(IC(M,jC),IC(F,YC),IC(F,XC)),!0===se.svgFilters&&(IC(M,HC),IC(F,YC),IC(F,XC)),!0===se.mathMl&&(IC(M,qC),IC(F,GC),IC(F,XC))),e.ADD_TAGS&&(M===I&&(M=FC(M)),IC(M,e.ADD_TAGS,xe)),e.ADD_ATTR&&(F===U&&(F=FC(F)),IC(F,e.ADD_ATTR,xe)),e.ADD_URI_SAFE_ATTR&&IC(ce,e.ADD_URI_SAFE_ATTR,xe),e.FORBID_CONTENTS&&(ae===ie&&(ae=FC(ae)),IC(ae,e.FORBID_CONTENTS,xe)),oe&&(M["#text"]=!0),Y&&IC(M,["html","head","body"]),M.table&&(IC(M,["tbody"]),delete j.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw PC('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw PC('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=e.TRUSTED_TYPES_POLICY,w=C.createHTML("")}else void 0===C&&(C=lw(g,r)),null!==C&&"string"==typeof w&&(w=C.createHTML(""));yC&&yC(e),Ee=e}},Ne=IC({},["mi","mo","mn","ms","mtext"]),Re=IC({},["foreignobject","desc","title","annotation-xml"]),Ae=IC({},["title","style","font","a","script"]),De=IC({},jC);IC(De,HC),IC(De,$C);const Te=IC({},qC);IC(Te,VC);const Oe=function(e){let t=y(e);t&&t.tagName||(t={namespaceURI:pe,tagName:"template"});const n=NC(e.tagName),o=NC(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===fe?t.namespaceURI===ge?"svg"===n:t.namespaceURI===ue?"svg"===n&&("annotation-xml"===o||Ne[o]):Boolean(De[n]):e.namespaceURI===ue?t.namespaceURI===ge?"math"===n:t.namespaceURI===fe?"math"===n&&Re[o]:Boolean(Te[n]):e.namespaceURI===ge?!(t.namespaceURI===fe&&!Re[o])&&(!(t.namespaceURI===ue&&!Ne[o])&&(!Te[n]&&(Ae[n]||!De[n]))):!("application/xhtml+xml"!==ye||!be[e.namespaceURI]))},Be=function(e){SC(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},Pe=function(e,t){try{SC(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){SC(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!F[e])if(Q||J)try{Be(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Le=function(e){let t,n;if(X)e="<remove></remove>"+e;else{const t=AC(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ye&&pe===ge&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=C?C.createHTML(e):e;if(pe===ge)try{t=(new f).parseFromString(o,ye)}catch(e){}if(!t||!t.documentElement){t=x.createDocument(pe,"template",null);try{t.documentElement.innerHTML=he?w:o}catch(e){}}const r=t.body||t.documentElement;return e&&n&&r.insertBefore(s.createTextNode(n),r.childNodes[0]||null),pe===ge?k.call(t,Y?"html":"body")[0]:Y?t.documentElement:r},Me=function(e){return E.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},Ie=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||"function"!=typeof e.hasChildNodes)},Fe=function(e){return"object"==typeof l?e instanceof l:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Ue=function(e,t,o){N[e]&&_C(N[e],(e=>{e.call(n,t,o,Ee)}))},ze=function(e){let t;if(Ue("beforeSanitizeElements",e,null),Ie(e))return Be(e),!0;const o=xe(e.nodeName);if(Ue("uponSanitizeElement",e,{tagName:o,allowedTags:M}),e.hasChildNodes()&&!Fe(e.firstElementChild)&&(!Fe(e.content)||!Fe(e.content.firstElementChild))&&BC(/<[/\w]/g,e.innerHTML)&&BC(/<[/\w]/g,e.textContent))return Be(e),!0;if(!M[o]||j[o]){if(!j[o]&&He(o)){if(z.tagNameCheck instanceof RegExp&&BC(z.tagNameCheck,o))return!1;if(z.tagNameCheck instanceof Function&&z.tagNameCheck(o))return!1}if(oe&&!ae[o]){const t=y(e)||e.parentNode,n=v(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o)t.insertBefore(h(n[o],!0),b(e))}}return Be(e),!0}return e instanceof d&&!Oe(e)?(Be(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!BC(/<\/no(script|embed|frames)/i,e.innerHTML)?(K&&3===e.nodeType&&(t=e.textContent,t=DC(t,R," "),t=DC(t,A," "),t=DC(t,D," "),e.textContent!==t&&(SC(n.removed,{element:e.cloneNode()}),e.textContent=t)),Ue("afterSanitizeElements",e,null),!1):(Be(e),!0)},je=function(e,t,n){if(ee&&("id"===t||"name"===t)&&(n in s||n in _e))return!1;if(q&&!H[t]&&BC(T,t));else if($&&BC(O,t));else if(!F[t]||H[t]){if(!(He(e)&&(z.tagNameCheck instanceof RegExp&&BC(z.tagNameCheck,e)||z.tagNameCheck instanceof Function&&z.tagNameCheck(e))&&(z.attributeNameCheck instanceof RegExp&&BC(z.attributeNameCheck,t)||z.attributeNameCheck instanceof Function&&z.attributeNameCheck(t))||"is"===t&&z.allowCustomizedBuiltInElements&&(z.tagNameCheck instanceof RegExp&&BC(z.tagNameCheck,n)||z.tagNameCheck instanceof Function&&z.tagNameCheck(n))))return!1}else if(ce[t]);else if(BC(L,DC(n,P,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==TC(n,"data:")||!le[e]){if(V&&!BC(B,DC(n,P,"")));else if(n)return!1}else;return!0},He=function(e){return e.indexOf("-")>0},$e=function(e){let t,n,o,r;Ue("beforeSanitizeAttributes",e,null);const{attributes:s}=e;if(!s)return;const a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F};for(r=s.length;r--;){t=s[r];const{name:i,namespaceURI:l}=t;n="value"===i?t.value:OC(t.value);const d=n;if(o=xe(i),a.attrName=o,a.attrValue=n,a.keepAttr=!0,a.forceKeepAttr=void 0,Ue("uponSanitizeAttribute",e,a),n=a.attrValue,a.forceKeepAttr)continue;if(!a.keepAttr){Pe(i,e);continue}if(!W&&BC(/\/>/i,n)){Pe(i,e);continue}K&&(n=DC(n,R," "),n=DC(n,A," "),n=DC(n,D," "));const c=xe(e.nodeName);if(je(c,o,n)){if(!te||"id"!==o&&"name"!==o||(Pe(i,e),n=ne+n),C&&"object"==typeof g&&"function"==typeof g.getAttributeType)if(l);else switch(g.getAttributeType(c,o)){case"TrustedHTML":n=C.createHTML(n);break;case"TrustedScriptURL":n=C.createScriptURL(n)}if(n!==d)try{l?e.setAttributeNS(l,i,n):e.setAttribute(i,n)}catch(t){Pe(i,e)}}else Pe(i,e)}Ue("afterSanitizeAttributes",e,null)},qe=function e(t){let n;const o=Me(t);for(Ue("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)Ue("uponSanitizeShadowNode",n,null),ze(n)||(n.content instanceof a&&e(n.content),$e(n));Ue("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){let t,r,s,i,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(he=!e,he&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Fe(e)){if("function"!=typeof e.toString)throw PC("toString is not a function");if("string"!=typeof(e=e.toString()))throw PC("dirty is not a string, aborting")}if(!n.isSupported)return e;if(G||Se(d),n.removed=[],"string"==typeof e&&(re=!1),re){if(e.nodeName){const t=xe(e.nodeName);if(!M[t]||j[t])throw PC("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)t=Le("\x3c!----\x3e"),r=t.ownerDocument.importNode(e,!0),1===r.nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?t=r:t.appendChild(r);else{if(!Q&&!K&&!Y&&-1===e.indexOf("<"))return C&&Z?C.createHTML(e):e;if(t=Le(e),!t)return Q?null:Z?w:""}t&&X&&Be(t.firstChild);const c=Me(re?e:t);for(;s=c.nextNode();)ze(s)||(s.content instanceof a&&qe(s.content),$e(s));if(re)return e;if(Q){if(J)for(i=_.call(t.ownerDocument);t.firstChild;)i.appendChild(t.firstChild);else i=t;return(F.shadowroot||F.shadowrootmode)&&(i=S.call(o,i,!0)),i}let m=Y?t.outerHTML:t.innerHTML;return Y&&M["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&BC(sw,t.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+t.ownerDocument.doctype.name+">\n"+m),K&&(m=DC(m,R," "),m=DC(m,A," "),m=DC(m,D," ")),C&&Z?C.createHTML(m):m},n.setConfig=function(e){Se(e),G=!0},n.clearConfig=function(){Ee=null,G=!1},n.isValidAttribute=function(e,t,n){Ee||Se({});const o=xe(e),r=xe(t);return je(o,r,n)},n.addHook=function(e,t){"function"==typeof t&&(N[e]=N[e]||[],SC(N[e],t))},n.removeHook=function(e){if(N[e])return kC(N[e])},n.removeHooks=function(e){N[e]&&(N[e]=[])},n.removeAllHooks=function(){N={}},n}();const cw=Pt.each,mw=Pt.trim,uw=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],fw={ftp:21,http:80,https:443,mailto:25},gw=["img","video"],pw=(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)||!q(gw,t))(e.allow_svg_data_urls,n)&&/^data:image\/svg\+xml/i.test(o):/^data:/i.test(o)))};class hw{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=ia.decode(e).replace(/[\s\u0000-\u001F]+/g,"");return!pw(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}constructor(e,t={}){this.path="",this.directory="",e=mw(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 hw(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&&cw(uw,((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="")}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 hw(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 hw(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?fw[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=[];cw(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 bw=Pt.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),vw="data-mce-type";let yw=0;const Cw=(e,t,n,o,r)=>{var s,a,i,l;const d=t.validate,c=n.getSpecialElements();8===e.nodeType&&!t.allow_conditional_comments&&/^\[if/i.test(null!==(s=e.nodeValue)&&void 0!==s?s:"")&&(e.nodeValue=" "+e.nodeValue);const m=null!==(a=null==r?void 0:r.tagName)&&void 0!==a?a:e.nodeName.toLowerCase();if("html"!==o&&n.isValid(o))return void(x(r)&&(r.allowedTags[m]=!0));if(1!==e.nodeType||"body"===m)return;const u=yn.fromDom(e),f=rn(u,vw),p=nn(u,"data-mce-bogus");if(!f&&g(p))return void("all"===p?xo(u):Eo(u));const h=n.getElementRule(m);if(!d||h){if(x(r)&&(r.allowedTags[m]=!0),d&&h&&!f){if(K(null!==(i=h.attributesForced)&&void 0!==i?i:[],(e=>{en(u,e.name,"{$uid}"===e.value?"mce_"+yw++:e.value)})),K(null!==(l=h.attributesDefault)&&void 0!==l?l:[],(e=>{rn(u,e.name)||en(u,e.name,"{$uid}"===e.value?"mce_"+yw++:e.value)})),h.attributesRequired&&!V(h.attributesRequired,(e=>rn(u,e))))return void Eo(u);if(h.removeEmptyAttrs&&(e=>{const t=e.dom.attributes;return null==t||0===t.length})(u))return void Eo(u);h.outputName&&h.outputName!==m&&Si(u,h.outputName)}}else ke(c,m)?xo(u):Eo(u)},ww=(e,t,n,o,r,s)=>"html"!==n&&!Cs(o)||!(r in bw&&pw(e,s,o))&&(!e.validate||t.isValid(o,r)||qe(r,"data-")||qe(r,"aria-")),xw=(e,t)=>e.hasAttribute(vw)&&("id"===t||"class"===t||"style"===t),Ew=(e,t)=>e in t.getBoolAttrs(),_w=(e,t,n,o)=>{const{attributes:r}=e;for(let s=r.length-1;s>=0;s--){const a=r[s],i=a.name,l=a.value;ww(t,n,o,e.tagName.toLowerCase(),i,l)||xw(e,i)?Ew(i,n)&&e.setAttribute(i,i):e.removeAttribute(i)}},kw=(e,t,n)=>{const o=dw();return o.addHook("uponSanitizeElement",((o,r)=>{Cw(o,e,t,n.track(o),r)})),o.addHook("uponSanitizeAttribute",((o,r)=>{((e,t,n,o,r)=>{const s=e.tagName.toLowerCase(),{attrName:a,attrValue:i}=r;r.keepAttr=ww(t,n,o,s,a,i),r.keepAttr?(r.allowedAttributes[a]=!0,Ew(a,n)&&(r.attrValue=a),t.allow_svg_data_urls&&qe(i,"data:image/svg+xml")&&(r.forceKeepAttr=!0)):xw(e,a)&&(r.forceKeepAttr=!0)})(o,e,t,n.current(),r)})),o},Sw=e=>{const t=["type","href","role","arcrole","title","show","actuate","label","from","to"].map((e=>`xlink:${e}`)),n={IN_PLACE:!0,USE_PROFILES:{html:!0,svg:!0,svgFilters:!0},ALLOWED_ATTR:t};return dw().sanitize(e,n),e.innerHTML},Nw=(e,t)=>{const n=(()=>{let e=[];const t=()=>e[e.length-1];return{track:n=>{ws(n)&&e.push(n);let o=t();return o&&!o.contains(n)&&(e.pop(),o=t()),xs(o)},current:()=>xs(t()),reset:()=>{e=[]}}})();if(e.sanitize){const o=kw(e,t,n),r=(t,r)=>{o.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,r)),o.removed=[],n.reset()};return{sanitizeHtmlElement:r,sanitizeNamespaceElement:Sw}}return{sanitizeHtmlElement:(o,r)=>{const s=document.createNodeIterator(o,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT|NodeFilter.SHOW_TEXT);let a;for(;a=s.nextNode();){const o=n.track(a);Cw(a,e,t,o),Vo(a)&&_w(a,e,t,o)}n.reset()},sanitizeNamespaceElement:S}},Rw=Pt.makeMap,Aw=Pt.extend,Dw=(e,t,n,o)=>{const r=e.name,s=r in n&&"title"!==r&&"textarea"!==r,a=t.childNodes;for(let t=0,r=a.length;t<r;t++){const r=a[t],i=new Np(r.nodeName.toLowerCase(),r.nodeType);if(Vo(r)){const e=r.attributes;for(let t=0,n=e.length;t<n;t++){const n=e[t];i.attr(n.name,n.value)}Cs(i.name)&&(o(r),i.value=r.innerHTML)}else tr(r)?(i.value=r.data,s&&(i.raw=!0)):(rr(r)||nr(r)||or(r))&&(i.value=r.data);Cs(i.name)||Dw(i,r,n,o),e.append(i)}},Tw=(e,t,n,o)=>{const r=n.validate,s=t.getNonEmptyElements(),a=t.getWhitespaceElements(),i=Aw(Rw("script,style,head,html,body,title,meta,param"),t.getBlockElements()),l=ba(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=n=>n.name in i||Is(t,n)||Cs(n.name)&&n.parent===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 i;if(1===e.type){const i=t.getElementRule(e.name);if(r&&i){const r=mv(t,s,a,e);i.paddInEmptyBlock&&r&&(e=>{let n=e;for(;x(n);){if(n.name in l)return mv(t,s,a,n);n=n.parent}return!1})(e)?dv(n,o,f,e):i.removeEmpty&&r?f(e)?e.remove():e.unwrap():i.paddEmpty&&(r||(e=>{var t;return cv(e,"#text")&&(null===(t=null==e?void 0:e.firstChild)||void 0===t?void 0:t.value)===vr})(e))&&dv(n,o,f,e)}}else if(3===e.type&&!u(e)){let t=null!==(i=e.value)&&void 0!==i?i:"";(e.next&&f(e.next)||g(e,!1))&&(t=t.replace(m,"")),0===t.length?e.remove():e.value=t}}]},Ow=(e={},t=ya())=>{const n=Zy(),o=Zy(),r={validate:!0,root_name:"body",sanitize:!0,...e},s=new DOMParser,a=Nw(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(vw)),r=1===n.type&&!ke(e,n.name)&&!Is(t,n)&&!Cs(n.name);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=ke(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.sanitizeHtmlElement(c,r),i?c.firstChild:c})(e,d,n.format);Ds(t,c);const u=new Np(d,11);Dw(u,c,t.getSpecialElements(),a.sanitizeNamespaceElement),c.innerHTML="";const[g,p]=Tw(u,t,r,n),h=[],b=i?e=>((e,n)=>{pv(t,e)&&n.push(e)})(e,h):S,v={nodes:{},attributes:{}},y=e=>av(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}=G(h,(e=>e.parent===u));gv(o,t,u,y),n.invalid=e.length>0}else gv(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=Aw(Rw("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 Np(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||iv(v,n),u}};return fC(p,r),((e,t,n)=>{t.inline_styles&&tC(e,t,n)})(p,r,t),p},Bw=(e,t,n)=>{const o=(e=>Ov(e)?Kp({validate:!1}).serialize(e):e)(e),r=t(o);if(r.isDefaultPrevented())return r;if(Ov(e)){if(r.content!==o){const t=Ow({validate:!1,forced_root_block:!1,...n}).parse(r.content,{context:e.name});return{...r,content:t}}return{...r,content:e}}return r},Pw=(e,t)=>{if(t.no_events)return Al.value(t);{const n=((e,t)=>e.dispatch("BeforeGetContent",t))(e,t);return n.isDefaultPrevented()?Al.error(Rf(e,{content:"",...n}).content):Al.value(n)}},Lw=(e,t,n)=>{if(n.no_events)return t;{const o=Bw(t,(t=>Rf(e,{...n,content:t})),{sanitize:Nc(e),sandbox_iframes:Pc(e)});return o.content}},Mw=(e,t)=>{if(t.no_events)return Al.value(t);{const n=Bw(t.content,(n=>((e,t)=>e.dispatch("BeforeSetContent",t))(e,{...t,content:n})),{sanitize:Nc(e),sandbox_iframes:Pc(e)});return n.isDefaultPrevented()?(Nf(e,n),Al.error(void 0)):Al.value(n)}},Iw=(e,t,n)=>{n.no_events||Nf(e,{...n,content:t})},Fw=(e,t,n)=>({element:e,width:t,rows:n}),Uw=(e,t)=>({element:e,cells:t}),zw=(e,t)=>({x:e,y:t}),jw=(e,t)=>on(e,t).bind(Je).getOr(1),Hw=(e,t,n)=>{const o=e.rows;return!!(o[n]?o[n].cells:[])[t]},$w=e=>J(e,((e,t)=>t.cells.length>e?t.cells.length:e),0),qw=(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(En(o[n],t))return U.some(zw(n,e))}return U.none()},Vw=(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(Uw(a[e].element,r))}return s},Ww=e=>{const t=Fw(_i(e),0,[]);return K(zo(e,"tr"),((e,n)=>{K(zo(e,"td,th"),((o,r)=>{((e,t,n,o,r)=>{const s=jw(r,"rowspan"),a=jw(r,"colspan"),i=e.rows;for(let e=n;e<n+s;e++){i[e]||(i[e]=Uw(ki(o),[]));for(let o=t;o<t+a;o++)i[e].cells[o]=e===n&&o===t?r:_i(r)}})(t,((e,t,n)=>{for(;Hw(e,t,n);)t++;return t})(t,r,n),n,e,o)}))})),Fw(t.element,$w(t.rows),t.rows)},Kw=e=>((e,t)=>{const n=_i(e.element),o=yn.fromTag("tbody");return Co(o,t),vo(n,o),n})(e,(e=>W(e.rows,(e=>{const t=W(e.cells,(e=>{const t=ki(e);return sn(t,"colspan"),sn(t,"rowspan"),t})),n=_i(e.element);return Co(n,t),n})))(e)),Yw=(e,t,n)=>qw(e,t).bind((t=>qw(e,n).map((n=>((e,t,n)=>{const o=t.x,r=t.y,s=n.x,a=n.y,i=r<a?Vw(e,o,r,s,a):Vw(e,o,a,s,r);return Fw(e.element,$w(i),i)})(e,t,n))))),Gw=(e,t)=>ee(e,(e=>"li"===qt(e)&&Eu(e,t))).fold(A([]),(t=>(e=>ee(e,(e=>"ul"===qt(e)||"ol"===qt(e))))(e).map((e=>{const t=yn.fromTag(qt(e)),n=we(fo(e),((e,t)=>qe(t,"list-style")));return lo(t,n),[yn.fromTag("li"),t]})).getOr([]))),Xw=(e,t,n)=>{const o=yn.fromDom(t.commonAncestorContainer),r=ph(o,e),s=X(r,(e=>n.isWrapper(qt(e)))),a=Gw(r,t),i=s.concat(a.length?a:(e=>Nr(e)?Rn(e).filter(Sr).fold(A([]),(t=>[e,t])):Sr(e)?[e]:[])(o));return W(i,_i)},Qw=()=>Jf([]),Jw=(e,t,n)=>((e,t)=>{const n=J(t,((e,t)=>(vo(t,e),t)),e);return t.length>0?Jf([n]):n})(yn.fromDom(t.cloneContents()),Xw(e,t,n)),Zw=(e,t)=>((e,t)=>eo(t,"table",O(En,e)))(e,t[0]).bind((e=>{const n=t[0],o=t[t.length-1],r=Ww(e);return Yw(r,n,o).map((e=>Jf([Kw(e)])))})).getOrThunk(Qw),ex=(e,t,n)=>{const o=vu(t,e);return o.length>0?Zw(e,o):((e,t,n)=>t.length>0&&t[0].collapsed?Qw():Jw(e,t[0],n))(e,t,n)},tx=(e,t)=>t>=0&&t<e.length&&gu(e.charAt(t)),nx=e=>Mr(e.innerText),ox=(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=yn.fromDom(t.cloneContents());jp(a),Hp(a);const i=e.dom.add(r,s,{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},a.dom),l=nx(i),d=Mr(null!==(n=i.textContent)&&void 0!==n?n:"");if(e.dom.remove(i),tx(d,0)||tx(d,d.length-1)){const e=o.getOr(r),t=nx(e),n=t.indexOf(l);return-1===n?l:(tx(t,n-1)?" ":"")+l+(tx(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=hp(e,hu(r)),a=t.contextual?ex(yn.fromDom(e.getBody()),s,e.schema).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}},rx=e=>Vo(e)?e.outerHTML:tr(e)?ia.encodeRaw(e.data,!1):rr(e)?"\x3c!--"+e.data+"--\x3e":"",sx=(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)},ax=(e,t)=>(((e,t)=>{let n=0;K(e,(e=>{0===e[0]?n++:1===e[0]?(sx(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),rx),e),t),t),ix=Me((()=>document.implementation.createHTMLDocument("undo"))),lx=e=>{const t=e.serializer.getTempAttrs(),n=zp(e.getBody(),t);return(e=>null!==e.querySelector("iframe"))(n)?(o=((e,t)=>X(W(ue(e.childNodes),t?N(Mr,rx):rx),(e=>e.length>0)))(n,!0),{type:"fragmented",fragments:o,content:"",bookmark:null,beforeBookmark:null}):{type:"complete",fragments:null,content:Mr(n.innerHTML),bookmark:null,beforeBookmark:null};var o},dx=(e,t,n)=>{const o=n?t.beforeBookmark:t.bookmark;"fragmented"===t.type?ax(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw",no_selection:!x(o)||!eu(o)||!o.isFakeCaret}),o&&(e.selection.moveToBookmark(o),e.selection.scrollIntoView())},cx=e=>"fragmented"===e.type?e.fragments.join(""):e.content,mx=e=>{const t=yn.fromTag("body",ix());return So(t,cx(e)),K(zo(t,"*[data-mce-bogus]"),Eo),ko(t)},ux=(e,t)=>!(!e||!t)&&(!!((e,t)=>cx(e)===cx(t))(e,t)||((e,t)=>mx(e)===mx(t))(e,t)),fx=e=>0===e.get(),gx=(e,t,n)=>{fx(n)&&(e.typing=t)},px=(e,t)=>{e.typing&&(gx(e,!1,t),e.add())},hx=e=>({init:{bindEvents:S},undoManager:{beforeChange:(t,n)=>((e,t,n)=>{fx(t)&&n.set(Sl(e.selection))})(e,t,n),add:(t,n,o,r,s,a)=>((e,t,n,o,r,s,a)=>{const i=lx(e),l=Pt.extend(s||{},i);if(!fx(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&&ux(d,l))return null;t.data[n.get()]&&r.get().each((e=>{t.data[n.get()].beforeBookmark=e}));const c=qd(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=Sl(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,gx(t,!1,n)),o.get()>0&&(o.set(o.get()-1),r=t.data[o.get()],dx(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()],dx(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]&&!ux(lx(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)=>(px(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];dx(e,s,!0),t.transact(r)&&(t.data[n.get()-1].beforeBookmark=o)}})(e,t,n,o,r)},formatter:{match:(t,n,o,r)=>$v(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]&&Hv(e,s,i,n)&&(r[i]=!0,o.push(i))}}),e.dom.getRoot()),o})(e,t,n),matchNode:(t,n,o,r)=>Hv(e,t,n,o,r),canApply:t=>((e,t)=>{const n=e.formatter.get(t),o=e.dom;if(n&&e.selection.isEditable()){const t=e.selection.getStart(),r=Hu(o,t);for(let e=n.length-1;e>=0;e--){const t=n[e];if(!Wu(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=>qv(e,t),apply:(t,n,o)=>Vy(e,t,n,o),remove:(t,n,o,r)=>Fy(e,t,n,o,r),toggle:(t,n,o)=>((e,t,n,o)=>{const r=e.formatter.get(t);r&&(!$v(e,t,n,o)||"toggle"in r[0]&&!r[0].toggle?Vy(e,t,n,o):Fy(e,t,n,o))})(e,t,n,o),formatChanged:(t,n,o,r,s)=>Qy(e,t,n,o,r,s)},editor:{getContent:t=>((e,t)=>U.from(e.getBody()).fold(A("tree"===t.format?new Np("body",11):""),(n=>qp(e,t,n))))(e,t),setContent:(t,n)=>Pv(e,t,n),insertContent:(t,n)=>Tv(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=Zd(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=ec(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 Pw(e,o).fold(D,(t=>{const n=ox(e,t);return Lw(e,n,t)}))})(e,t,n)},autocompleter:{addDecoration:t=>wp(e,t),removeDecoration:()=>((e,t)=>xp(t).each((t=>{const n=e.selection.getBookmark();Eo(t),e.selection.moveToBookmark(n)})))(e,yn.fromDom(e.getBody()))},raw:{getModel:()=>U.none()}}),bx=e=>ke(e.plugins,"rtc"),vx=e=>{const t=e;return(e=>_e(e.plugins,"rtc").bind((e=>U.from(e.setup))))(e).fold((()=>(t.rtcInstance=hx(e),U.none())),(e=>(t.rtcInstance=(()=>{const e=A(null),t=A("");return{init:{bindEvents:S},undoManager:{beforeChange:S,add:e,undo:e,redo:e,clear:S,reset:S,hasUndo:I,hasRedo:I,transact:e,ignore:S,extra:S},formatter:{match:I,matchAll:A([]),matchNode:A(void 0),canApply:I,closest:t,apply:S,remove:S,toggle:S,formatChanged:A({unbind:S})},editor:{getContent:t,setContent:A({content:"",html:""}),insertContent:A(""),addVisual:S},selection:{getContent:t},autocompleter:{addDecoration:S,removeDecoration:S},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))))))))},yx=e=>e.rtcInstance?e.rtcInstance:hx(e),Cx=e=>{const t=e.rtcInstance;if(t)return t;throw new Error("Failed to get RTC instance not yet initialized.")},wx=e=>Cx(e).init.bindEvents(),xx=(e,t={})=>((e,t,n)=>Cx(e).selection.getContent(t,n))(e,t.format?t.format:"html",t),Ex=e=>0===e.dom.length?(xo(e),U.none()):U.some(e),_x=(e,t,n,o,r)=>{e.bind((e=>((o?Gh:Yh)(e.dom,o?e.dom.length:0,r),t.filter(Gt).map((t=>((e,t,n,o,r)=>{const s=e.dom,a=t.dom,i=o?s.length:a.length;o?(Xh(s,a,r,!1,!o),n.setStart(a,i)):(Xh(a,s,r,!1,!o),n.setEnd(a,i))})(e,t,n,o,r)))))).orThunk((()=>{const e=((e,t)=>e.filter((e=>xf.isBookmarkNode(e.dom))).bind(t?On:Tn))(t,o).or(t).filter(Gt);return e.map((e=>((e,t,n)=>{Rn(e).each((o=>{const r=e.dom;t&&Fh(o,rl(r,0),n)?Yh(r,0,n):!t&&Uh(o,rl(r,r.length),n)&&Gh(r,r.length,n)}))})(e,o,r)))}))},kx=(e,t,n={})=>{const o=((e,t)=>({format:"html",...e,set:!0,selection:!0,content:t}))(n,t);Mw(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,n)=>{const o=U.from(t.firstChild).map(yn.fromDom),r=U.from(t.lastChild).map(yn.fromDom);e.deleteContents(),e.insertNode(t);const s=o.bind(Tn).filter(Gt).bind(Ex),a=r.bind(On).filter(Gt).bind(Ex);_x(s,o,e,!0,n),_x(a,r,e,!1,n),e.collapse(!1)})(o,o.createContextualFragment(n),e.schema),e.selection.setRng(o),Pg(e,o),Iw(e,n,t)}))},Sx=(e,t,n)=>{if(ke(e,t)){const o=X(e[t],(e=>e!==n));0===o.length?delete e[t]:e[t]=o}};var Nx=(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:()=>{Sx(n,e,a),Sx(o,e,a)}})}};const Rx=e=>!(!e||!e.ownerDocument)&&_n(yn.fromDom(e.ownerDocument),yn.fromDom(e)),Ax=(e,t,n,o)=>{let r,s;const{selectorChangedWithUnbind:a}=Nx(e,o),i=(e,t)=>kx(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)&&!ip(o)){const e=Wg(o);if(e.isSome())return e.map((e=>hp(o,[e])[0])).getOr(i.createRange())}try{const e=d();e&&!qo(e.anchorNode)&&(n=e.rangeCount>0?e.getRangeAt(0):i.createRange(),n=hp(o,[n])[0])}catch(e){}if(n||(n=i.createRange()),sr(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&&Rx(e.startContainer)&&Rx(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||qo(n)||qo(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(ug(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)):(_u(e,r,o.getBody(),!0),m(r))},getContent:e=>xx(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&&(_u(e,s,t,!0),_u(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))):mp(e,t)},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]),tr(n)&&tr(o)&&(n=n.length===r?pp(n.nextSibling,!0):n.parentNode,o=0===s?pp(o.previousSibling,!1):o.parentNode,n&&n===o&&(a=n)));const i=tr(a)?a.parentNode:a;return Wo(i)?i:e})(o.getBody(),c()),getSel:d,setRng:m,getRng:c,getStart:e=>fp(o.getBody(),c(),e),getEnd:e=>gp(o.getBody(),c(),e),getSelectedBlocks:(t,n)=>((e,t,n,o)=>{const r=[],s=e.getRoot(),a=e.getParent(n||fp(s,t,t.collapsed),e.isBlock),i=e.getParent(o||gp(s,t,t.collapsed),e.isBlock);if(a&&a!==s&&r.push(a),a&&i&&a!==i){let t;const n=new Ho(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(!(hu(n).length>1)&&ku(o)){const n=dg(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?Tg:Bg)(e,t,n)})(o,e,t):Pg(o,c(),t)},placeCaretAt:(e,t)=>m(tg(e,t,o.getDoc())),getBoundingClientRect:()=>{const e=c();return e.collapsed?rl.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:()=>{t=r=s=null,p.destroy()}},g=xf(f),p=Lf(f,o);return f.bookmarkManager=g,f.controlSelection=p,f},Dx=(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,Tx=(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))},Ox=(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)},Bx=(e,t)=>{const n=["data-mce-selected"],o={entity_encoding:"named",remove_trailing_brs:!0,pad_empty_with_br:!1,...e},r=t&&t.dom?t.dom:Xa.DOM,s=t&&t.schema?t.schema:ya(o),a=Ow(o,s);((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!Lr(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=ia.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)})),t.remove_trailing_brs&&nC(t,e,e.schema)})(a,o,r);return{schema:s,addNodeFilter:a.addNodeFilter,addAttributeFilter:a.addAttributeFilter,serialize:(e,n={})=>{const i={format:"html",...n},l=Dx(t,e,i),d=((e,t,n)=>{const o=Mr(n.getInner?t.innerHTML:e.getOuterHTML(t));return n.selection||Dr(yn.fromDom(t))?o:Pt.trim(o)})(r,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})(a,d,i);return"tree"===i.format?c:Ox(t,o,s,c,i)},addRules:s.addValidElements,setRules:s.setValidElements,addTempAttr:O(Tx,a,n),getTempAttrs:A(n),getNodeFilters:a.getNodeFilters,getAttributeFilters:a.getAttributeFilters,removeNodeFilter:a.removeNodeFilter,removeAttributeFilter:a.removeAttributeFilter}},Px=(e,t)=>{const n=Bx(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}},Lx=(e,t={})=>{const n=((e,t)=>({...e,format:t,get:!0,getInner:!0}))(t,t.format?t.format:"html");return Pw(e,n).fold(D,(t=>{const n=((e,t)=>yx(e).editor.getContent(t))(e,t);return Lw(e,n,t)}))},Mx=(e,t,n={})=>{const o=((e,t)=>({format:"html",...e,set:!0,content:t}))(n,t);return Mw(e,o).map((t=>{const n=((e,t,n)=>yx(e).editor.setContent(t,n))(e,t.content,t);return Iw(e,n.html,t),n.content})).getOr(t)},Ix="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(","),Fx="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(","),Ux="bbcode,colorpicker,contextmenu,fullpage,legacyoutput,spellchecker,textcolor".split(","),zx=[{name:"template",replacedWith:"Advanced Template"},{name:"rtc"}],jx=(e,t)=>{const n=X(t,(t=>ke(e,t)));return le(n)},Hx=e=>{const t=jx(e,Ix),n=e.forced_root_block;return!1!==n&&""!==n||t.push("forced_root_block (false only)"),le(t)},$x=e=>jx(e,Fx),qx=(e,t)=>{const n=Pt.makeMap(e.plugins," "),o=X(t,(e=>ke(n,e)));return le(o)},Vx=e=>qx(e,Ux),Wx=e=>qx(e,zx.map((e=>e.name))),Kx=e=>ee(zx,(t=>t.name===e)).fold((()=>e),(t=>t.replacedWith?`${e}, replaced by ${t.replacedWith}`:e)),Yx=(e,t)=>{((e,t)=>{const n=Hx(e),o=Vx(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=$x(e),o=Wx(t),r=o.length>0,s=n.length>0;if(r||s){const e="\n- ",t=r?`\n\nPlugins:${e}${o.map(Kx).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)},Gx=Xa.DOM,Xx=e=>U.from(e).each((e=>e.destroy())),Qx=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)&&Gx.remove(r.nextSibling),(e=>{e.dispatch("remove")})(e),e.editorManager.remove(e),!e.inline&&o&&(e=>{Gx.setStyle(e.id,"display",e.orgDisplay)})(e),(e=>{e.dispatch("detach")})(e),Gx.remove(e.getContainer()),Xx(t),Xx(n),e.destroy()}},Jx=(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(),Xx(n),Xx(o)),(e=>{const t=e.formElement;t&&(t._mceOldSubmit&&(t.submit=t._mceOldSubmit,delete t._mceOldSubmit),Gx.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())},Zx=(()=>{const e={};return{add:(t,n)=>{e[t]=n},get:t=>e[t]?e[t]:{icons:{}},has:t=>ke(e,t)}})(),eE=ri.ModelManager,tE=(e,t)=>t.dom[e],nE=(e,t)=>parseInt(co(t,e),10),oE=O(tE,"clientWidth"),rE=O(tE,"clientHeight"),sE=O(nE,"margin-top"),aE=O(nE,"margin-left"),iE=(e,t,n)=>{const o=yn.fromDom(e.getBody()),r=e.inline?o:(s=o,yn.fromDom(Sn(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+aE(t):0),y:o-(e?r.top+t.dom.clientTop+sE(t):0)}})(e.inline,r,t,n);return((e,t,n)=>{const o=oE(e),r=rE(e);return t>=0&&n>=0&&t<=o&&n<=r})(r,a.x,a.y)},lE=e=>{const t=e.inline?e.getBody():e.getContentAreaContainer();return(n=t,U.from(n).map(yn.fromDom)).map(Yn).getOr(!1);var n};const dE=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||!lE(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(),lp(e)&&o().fold((()=>e.focus()),(e=>Lg(yn.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=Rd(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}},cE=ri.PluginManager,mE=ri.ThemeManager;const uE=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),Vg(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)}))}}},fE=(e,t)=>{e.notificationManager.open({type:"error",text:t})},gE=(e,t)=>{e._skinLoaded?fE(e,t):e.on("SkinLoaded",(()=>{fE(e,t)}))},pE=(e,t,n)=>{_f(e,t,{message:n}),console.error(n)},hE=(e,t,n)=>n?`Failed to load ${e}: ${n} from url ${t}`:`Failed to load ${e} url: ${t}`,bE=(e,...t)=>{const n=window.console;n&&(n.error?n.error(e,...t):n.log(e,...t))},vE=e=>"content/"+e+"/content.css",yE=(e,t)=>{const n=e.editorManager.baseURL+"/skins/content",o=`content${e.editorManager.suffix}.css`;return W(t,(t=>(e=>tinymce.Resource.has(vE(e)))(t)?t:(e=>/^[a-z0-9\-]+$/i.test(e))(t)&&!e.inline?`${n}/${t}/${o}`:e.documentBaseURI.toAbsolute(t)))},CE=e=>{e.contentCSS=e.contentCSS.concat((e=>yE(e,yd(e)))(e),(e=>yE(e,wd(e)))(e))},wE=(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)&&(qe(n,"blob:")?!e.isUploaded(n)&&r(t):!!qe(n,"data:")&&r(t))))})),a=W(s,(e=>{const o=e.src;if(ke(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(qe(t,"blob:")){const o=e.getByUri(t);return x(o)?Promise.resolve(o):sC(t).then((t=>aC(t).then((o=>lC(o,!1,(n=>U.some(dC(e,t,n)))).getOrThunk(n)))))}return qe(t,"data:")?cC(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)}}},xE=()=>{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 EE=0;const _E=e=>e+EE+++(()=>{const e=()=>Math.round(4294967295*Math.random()).toString(36);return"s"+(new Date).getTime().toString(36)+e()+e()+e()})(),kE=(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=E(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=S)},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([])}))}},SE=e=>()=>e.notificationManager.open({text:e.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0}),NE=(e,t)=>kE(t,{url:dd(e),basePath:cd(e),credentials:md(e),handler:ud(e)}),RE=e=>t=>{((e,t)=>e.dom.isEmpty(t.dom)&&x(e.schema.getTextBlockElements()[qt(t)]))(e,t)&&vo(t,yn.fromHtml('<br data-mce-bogus="1" />'))},AE=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||_E("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=xE(),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=NE(e,r)),f().then(a((o=>{const r=W(o,(e=>e.blobInfo));return n.upload(r,SE(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&&ad(e)?(n.url&&!$e(l.src,n.url)&&(s=!0),t.removeByUri(l.src),bx(e)||((t,n)=>{const o=e.convertURL(n,"src");var r;d(t.src,n),tn(yn.fromDom(t),{src:sd(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)=>{gE(e,oi.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&&!bx(e)?e.undoManager.transact((()=>{K(_o(r),(n=>{const o=Rn(n);xo(n),o.each(RE(e)),t.removeByUri(n.dom.src)}))})):s&&e.undoManager.dispatchChange(),a})))})))),m=()=>rd(e)?c():Promise.resolve([]),u=e=>re(s,(t=>t(e))),f=()=>(o||(o=wE(r,t)),o.findAll(e.getBody(),u).then(a((t=>{const n=X(t,(t=>g(t)?(gE(e,t),!1):"blob"!==t.uriType));return bx(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",(()=>{rd(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}}},DE={remove_similar:!0,inherit:!1},TE={selector:"td,th",...DE},OE={tablecellbackgroundcolor:{styles:{backgroundColor:"%value"},...TE},tablecellverticalalign:{styles:{"vertical-align":"%value"},...TE},tablecellbordercolor:{styles:{borderColor:"%value"},...TE},tablecellclass:{classes:["%value"],...TE},tableclass:{selector:"table",classes:["%value"],...DE},tablecellborderstyle:{styles:{borderStyle:"%value"},...TE},tablecellborderwidth:{styles:{borderWidth:"%value"},...TE}},BE=A(OE),PE=e=>{const t={},n=(e,o)=>{e&&(g(e)?(b(o)||(o=[o]),K(o,(e=>{C(e.deep)&&(e.deep=!Wu(e)),C(e.split)&&(e.split=!Wu(e)||Ku(e)),C(e.remove)&&Wu(e)&&!Ku(e)&&(e.remove="none"),Wu(e)&&Ku(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)=>Vo(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(BE()),n(Pd(e)),{get:e=>x(e)?t[e]:t,has:e=>ke(t,e),register:n,unregister:e=>(e&&t[e]&&delete t[e],t)}},LE=Pt.each,ME=Xa.DOM,IE=e=>x(e)&&p(e),FE=(e,t)=>{const n=t&&t.schema||ya({}),o=e=>{const t=g(e)?{name:e,classes:[],attrs:{}}:e,n=ME.create(t.name);return((e,t)=>{t.classes.length>0&&ME.addClass(e,t.classes.join(" ")),ME.setAttribs(e,t.attrs)})(n,t),n},r=(e,t,s)=>{let a;const i=t[0],l=IE(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&&q(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):ME.create("div");c.appendChild(e),s&&Pt.each(s,(t=>{const n=o(t);c.insertBefore(n,e)}));const m=IE(a)?a.siblings:void 0;return r(c,t,m)},s=ME.create("div");if(e.length>0){const t=e[0],n=o(t),a=IE(t)?t.siblings:void 0;s.appendChild(r(n,e.slice(1),a))}return s},UE=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},zE=(e,t)=>{let n="",o=Ld(e);if(""===o)return"";const r=e=>g(e)?e.replace(/%(\w+)/g,""):"",s=(t,n)=>ME.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(/(?:~\+|~|\+)/),UE),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=FE(l,e)):a=FE([i],e);const c=ME.select(i,a)[0]||a.firstChild;LE(t.styles,((e,t)=>{const n=r(e);n&&ME.setStyle(c,t,n)})),LE(t.attributes,((e,t)=>{const n=r(e);n&&ME.setAttrib(c,t,n)})),LE(t.classes,(e=>{const t=r(e);ME.hasClass(c,t)||ME.addClass(c,t)})),e.dispatch("PreviewFormats"),ME.setStyles(a,{position:"absolute",left:-65535}),e.getBody().appendChild(a);const m=s("fontSize"),u=/px$/.test(m)?parseInt(m,10):0;return LE(o.split(" "),(e=>{let t=s(e,c);if(!("background-color"===e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)&&(t=s(e),"#ffffff"===Aa(t).toLowerCase())||"color"===e&&"#000000"===Aa(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"),ME.remove(a),n},jE=e=>{const t=PE(e),n=Za({});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),ey(e),bx(e)||((e,t)=>{e.set({}),t.on("NodeChange",(n=>{Xy(t,n.element,e.get())})),t.on("FormatApply FormatRemove",(n=>{const o=U.from(n.node).map((e=>Ru(e)?e:e.startContainer)).bind((e=>Vo(e)?U.some(e):U.from(e.parentElement))).getOrThunk((()=>Ky(t)));Xy(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)=>{Cx(e).formatter.apply(t,n,o)})(e,t,n,o)},remove:(t,n,o,r)=>{((e,t,n,o,r)=>{Cx(e).formatter.remove(t,n,o,r)})(e,t,n,o,r)},toggle:(t,n,o)=>{((e,t,n,o)=>{Cx(e).formatter.toggle(t,n,o)})(e,t,n,o)},match:(t,n,o,r)=>((e,t,n,o,r)=>Cx(e).formatter.match(t,n,o,r))(e,t,n,o,r),closest:t=>((e,t)=>Cx(e).formatter.closest(t))(e,t),matchAll:(t,n)=>((e,t,n)=>Cx(e).formatter.matchAll(t,n))(e,t,n),matchNode:(t,n,o,r)=>((e,t,n,o,r)=>Cx(e).formatter.matchNode(t,n,o,r))(e,t,n,o,r),canApply:t=>((e,t)=>Cx(e).formatter.canApply(t))(e,t),formatChanged:(t,o,r,s)=>((e,t,n,o,r,s)=>Cx(e).formatter.formatChanged(t,n,o,r,s))(e,n,t,o,r,s),getCssText:O(zE,e)}},HE=e=>{switch(e.toLowerCase()){case"undo":case"redo":case"mcefocus":return!0;default:return!1}},$E=e=>{const t=ai(),n=Za(0),o=Za(0),r={data:[],typing:!1,beforeChange:()=>{((e,t,n)=>{Cx(e).undoManager.beforeChange(t,n)})(e,n,t)},add:(s,a)=>((e,t,n,o,r,s,a)=>Cx(e).undoManager.add(t,n,o,r,s,a))(e,r,o,n,t,s,a),dispatchChange:()=>{e.setDirty(!0);const t=lx(e);t.bookmark=Sl(e.selection),e.dispatch("change",{level:t,lastLevel:de(r.data,o.get()).getOrUndefined()})},undo:()=>((e,t,n,o)=>Cx(e).undoManager.undo(t,n,o))(e,r,n,o),redo:()=>((e,t,n)=>Cx(e).undoManager.redo(t,n))(e,o,r.data),clear:()=>{((e,t,n)=>{Cx(e).undoManager.clear(t,n)})(e,r,o)},reset:()=>{((e,t)=>{Cx(e).undoManager.reset(t)})(e,r)},hasUndo:()=>((e,t,n)=>Cx(e).undoManager.hasUndo(t,n))(e,r,o),hasRedo:()=>((e,t,n)=>Cx(e).undoManager.hasRedo(t,n))(e,r,o),transact:t=>((e,t,n,o)=>Cx(e).undoManager.transact(t,n,o))(e,r,n,t),ignore:t=>{((e,t,n)=>{Cx(e).undoManager.ignore(t,n)})(e,n,t)},extra:(t,n)=>{((e,t,n,o,r)=>{Cx(e).undoManager.extra(t,n,o,r)})(e,r,o,t,n)}};return bx(e)||((e,t,n)=>{const o=Za(!1),r=e=>{gx(t,!1,n),t.add({},e)};e.on("init",(()=>{t.add()})),e.on("BeforeExecCommand",(e=>{const o=e.command;HE(o)||(px(t,n),t.beforeChange())})),e.on("ExecCommand",(e=>{const t=e.command;HE(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;if(n.isDefaultPrevented())return;const a=Dt.os.isMacOS()&&"Meta"===n.key;(s>=33&&s<=36||s>=37&&s<=40||45===s||n.ctrlKey||a)&&(r(),e.nodeChanged()),46!==s&&8!==s||e.nodeChanged(),o.get()&&t.typing&&!ux(lx(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;if((s<16||s>20)&&224!==s&&91!==s&&!t.typing&&!a)return t.beforeChange(),gx(t,!0,n),t.add({},e),void o.set(!0);(Dt.os.isMacOS()?e.metaKey:e.ctrlKey&&!e.altKey)&&t.beforeChange()})),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},qE=[9,27,Df.HOME,Df.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,Df.DOWN,Df.UP,Df.LEFT,Df.RIGHT].concat(Dt.browser.isFirefox()?[224]:[]),VE="data-mce-placeholder",WE=e=>"keydown"===e.type||"keyup"===e.type,KE=e=>{const t=e.keyCode;return t===Df.BACKSPACE||t===Df.DELETE},YE=e=>{var t;const n=e.dom,o=Ql(e),r=null!==(t=Sd(e))&&void 0!==t?t:"",s=(t,a)=>{if((e=>{if(WE(e)){const t=e.keyCode;return!KE(e)&&(Df.metaKeyPressed(e)||e.altKey||t>=112&&t<=123||q(qE,t))}return!1})(t))return;const i=e.getBody(),l=!(e=>WE(e)&&!(KE(e)||"keyup"===e.type&&229===e.keyCode))(t)&&((e,t,n)=>{if(ys(yn.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,VE)!==l||a)&&(n.setAttrib(i,VE,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=>Yg.setEditorTimeout(e,(()=>s(t)))))}))},GE=(e,t)=>({from:e,to:t}),XE=(e,t)=>{const n=yn.fromDom(e),o=yn.fromDom(t.container());return bb(n,o).map((e=>((e,t)=>({block:e,position:t}))(e,t)))},QE=(e,t)=>Qn(t,(e=>Ar(e)||dr(e.dom)),(t=>En(t,e))).filter(Yt).getOr(e),JE=(e,t,n)=>{const o=XE(e,rl.fromRangeStart(n)),r=o.bind((n=>Hm(t,e,n.position).bind((n=>XE(e,n).map((n=>((e,t,n)=>ir(n.position.getNode())&&!ys(n.block)?Vm(!1,n.block.dom).bind((o=>o.isEqual(n.position)?Hm(t,e,o).bind((t=>XE(e,t))):U.some(n))).getOr(n):n)(e,t,n)))))));return It(o,r,GE).filter((t=>(e=>!En(e.from.block,e.to.block))(t)&&((e,t)=>{const n=yn.fromDom(e);return En(QE(n,t.from.block),QE(n,t.to.block))})(e,t)&&(e=>!1===cr(e.from.block.dom)&&!1===cr(e.to.block.dom))(t)&&(e=>{const t=e=>kr(e)||Os(e.dom);return t(e.from.block)&&t(e.to.block)})(t)))},ZE=(e,t)=>{const n=((e,t)=>{const n=Ln(e);return te(n,(e=>t.isBlock(qt(e)))).fold(A(n),(e=>n.slice(0,e)))})(e,t);return K(n,xo),n},e_=(e,t)=>{const n=ph(t,e);return ee(n.reverse(),(e=>ys(e))).each(xo)},t_=(e,t,n,o,r)=>{if(ys(n))return Br(n),Ym(n.dom);0===X(Bn(r),(e=>!ys(e))).length&&ys(t)&&po(r,yn.fromTag("br"));const s=Km(n.dom,rl.before(r.dom));return K(ZE(t,o),(e=>{po(r,e)})),e_(e,t),s},n_=(e,t,n,o)=>{if(ys(n)){if(ys(t)){const e=e=>{const t=(e,n)=>In(e).fold((()=>n),(e=>((e,t)=>e.isInline(qt(t)))(o,e)?t(e,n.concat(_i(e))):n));return t(e,[])},r=Q(e(n),((e,t)=>(yo(e,t),t)),Or());wo(t),vo(t,r)}return xo(n),Ym(t.dom)}const r=Gm(n.dom);return K(ZE(t,o),(e=>{vo(n,e)})),e_(e,t),r},o_=(e,t)=>_n(t,e)?((e,t)=>{const n=ph(t,e);return U.from(n[n.length-1])})(t,e):U.none(),r_=(e,t)=>{Vm(e,t.dom).bind((e=>U.from(e.getNode()))).map(yn.fromDom).filter(_r).each(xo)},s_=(e,t,n,o)=>(r_(!0,t),r_(!1,n),o_(t,n).fold(O(n_,e,t,n,o),O(t_,e,t,n,o))),a_=(e,t,n,o,r)=>t?s_(e,o,n,r):s_(e,n,o,r),i_=(e,t)=>{const n=yn.fromDom(e.getBody()),o=((e,t,n)=>n.collapsed?JE(e,t,n):U.none())(n.dom,t,e.selection.getRng()).map((o=>()=>{a_(n,t,o.from.block,o.to.block,e.schema).each((t=>{e.selection.setRng(t.toRange())}))}));return o},l_=(e,t)=>{const n=yn.fromDom(t),o=O(En,e);return Xn(n,Ar,o).isSome()},d_=(e,t)=>{const n=Km(e.dom,rl.fromRangeStart(t)).isNone(),o=Wm(e.dom,rl.fromRangeEnd(t)).isNone();return!((e,t)=>l_(e,t.startContainer)||l_(e,t.endContainer))(e,t)&&n&&o},c_=e=>{const t=yn.fromDom(e.getBody()),n=e.selection.getRng();return d_(t,n)?(e=>U.some((()=>{e.setContent(""),e.selection.setCursorLocation()})))(e):((e,t,n)=>{const o=t.getRng();return It(bb(e,yn.fromDom(o.startContainer)),bb(e,yn.fromDom(o.endContainer)),((r,s)=>En(r,s)?U.none():U.some((()=>{o.deleteContents(),a_(e,!0,r,s,n).each((e=>{t.setRng(e.toRange())}))})))).getOr(U.none())})(t,e.selection,e.schema)},m_=(e,t)=>e.selection.isCollapsed()?U.none():c_(e),u_=(e,t,n,o,r)=>U.from(t._selectionOverrides.showCaret(e,n,o,r)),f_=(e,t)=>e.dispatch("BeforeObjectSelected",{target:t}).isDefaultPrevented()?U.none():U.some((e=>{const t=e.ownerDocument.createRange();return t.selectNode(e),t})(t)),g_=(e,t,n)=>t.collapsed?((e,t,n)=>{const o=Cm(1,e.getBody(),t),r=rl.fromRangeStart(o),s=r.getNode();if(Qc(s))return u_(1,e,s,!r.isAtEnd(),!1);const a=r.getNode(!0);if(Qc(a))return u_(1,e,a,!1,!1);const i=tv(e.dom.getRoot(),r.getNode());return Qc(i)?u_(1,e,i,!1,n):U.none()})(e,t,n).getOr(t):t,p_=e=>uh(e)||lh(e),h_=e=>fh(e)||dh(e),b_=(e,t,n,o,r,s)=>{u_(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)=>{tr(t)&&0===t.data.length&&e.remove(t)})(e.dom,n)},v_=(e,t)=>((e,t)=>{const n=e.selection.getRng();if(!tr(n.commonAncestorContainer))return U.none();const o=t?Sm.Forwards:Sm.Backwards,r=Im(e.getBody()),s=O(_m,t?r.next:r.prev),a=t?p_:h_,i=xm(o,e.getBody(),n),l=s(i),d=l?mb(t,l):l;if(!d||!km(i,d))return U.none();if(a(d))return U.some((()=>b_(e,n,i.getNode(),o,t,d)));const c=s(d);return c&&a(c)&&km(d,c)?U.some((()=>b_(e,n,i.getNode(),o,t,c))):U.none()})(e,t),y_=(e,t)=>{const n=e.getBody();return t?Ym(n).filter(uh):Gm(n).filter(fh)},C_=e=>{const t=e.selection.getRng();return!t.collapsed&&(y_(e,!0).exists((e=>e.isEqual(rl.fromRangeStart(t))))||y_(e,!1).exists((e=>e.isEqual(rl.fromRangeEnd(t)))))},w_=Dl([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),x_=(e,t,n,o)=>{const r=o.getNode(!t);return bb(yn.fromDom(e),yn.fromDom(n.getNode())).map((e=>ys(e)?w_.remove(e.dom):w_.moveToElement(r))).orThunk((()=>U.some(w_.moveToElement(r))))},E_=(e,t,n,o)=>Hm(t,e,n).bind((r=>{return s=r.getNode(),x(s)&&(Ar(yn.fromDom(s))||Nr(yn.fromDom(s)))||((e,t,n,o,r)=>{const s=t=>r.isInline(t.nodeName.toLowerCase())&&!fm(n,o,e);return wm(!t,n).fold((()=>wm(t,o).fold(I,s)),s)})(e,t,n,r,o)?U.none():t&&cr(r.getNode())||!t&&cr(r.getNode(!0))?x_(e,t,n,r):t&&fh(n)||!t&&uh(n)?U.some(w_.moveToPosition(r)):U.none();var s})),__=(e,t,n,o)=>((e,t)=>{const n=t.getNode(!e),o=e?"after":"before";return Vo(n)&&n.getAttribute("data-mce-caret")===o})(t,n)?((e,t)=>w(t)?U.none():e&&cr(t.nextSibling)?U.some(w_.moveToElement(t.nextSibling)):!e&&cr(t.previousSibling)?U.some(w_.moveToElement(t.previousSibling)):U.none())(t,n.getNode(!t)).orThunk((()=>E_(e,t,n,o))):E_(e,t,n,o).bind((t=>((e,t,n)=>n.fold((e=>U.some(w_.remove(e))),(e=>U.some(w_.moveToElement(e))),(n=>fm(t,n,e)?U.none():U.some(w_.moveToPosition(n)))))(e,n,t))),k_=(e,t)=>U.from(tv(e.getBody(),t)),S_=(e,t)=>{const n=e.selection.getNode();return k_(e,n).filter(cr).fold((()=>((e,t,n,o)=>{const r=Cm(t?1:-1,e,n),s=rl.fromRangeStart(r),a=yn.fromDom(e);return!t&&fh(s)?U.some(w_.remove(s.getNode(!0))):t&&uh(s)?U.some(w_.remove(s.getNode())):!t&&uh(s)&&Nh(a,s,o)?Rh(a,s,o).map((e=>w_.remove(e.getNode()))):t&&fh(s)&&Sh(a,s,o)?Ah(a,s,o).map((e=>w_.remove(e.getNode()))):__(e,t,s,o)})(e.getBody(),t,e.selection.getRng(),e.schema).map((n=>()=>n.fold(((e,t)=>n=>(e._selectionOverrides.hideFakeCaret(),ab(e,t,yn.fromDom(n)),!0))(e,t),((e,t)=>n=>{const o=t?rl.before(n):rl.after(n);return e.selection.setRng(o.toRange()),!0})(e,t),(e=>t=>(e.selection.setRng(t.toRange()),!0))(e))))),(()=>U.some(S)))},N_=(e,t)=>{const n=e.selection.getNode();if(cr(n)&&!mr(n)){return k_(e,n.parentNode).filter(cr).fold((()=>U.some((()=>{var n;n=yn.fromDom(e.getBody()),K(zo(n,".mce-offscreen-selection"),xo),ab(e,t,yn.fromDom(e.selection.getNode())),vb(e)}))),(()=>U.some(S)))}return C_(e)?U.some((()=>{wb(e,e.selection.getRng(),yn.fromDom(e.getBody()))})):U.none()},R_=e=>{const t=e.dom,n=e.selection,o=tv(e.getBody(),n.getNode());if(dr(o)&&t.isBlock(o)&&t.isEmpty(o)){const e=t.create("br",{"data-mce-bogus":"1"});t.setHTML(o,""),o.appendChild(e),n.setRng(rl.before(e).toRange())}return!0},A_=(e,t)=>e.selection.isCollapsed()?S_(e,t):N_(e,t),D_=(e,t)=>e.selection.isCollapsed()?((e,t)=>{const n=rl.fromRangeStart(e.selection.getRng());return Hm(t,e.getBody(),n).filter((e=>t?ah(e):ih(e))).bind((e=>gm(t?0:-1,e))).map((t=>()=>e.selection.select(t)))})(e,t):U.none(),T_=tr,O_=e=>T_(e)&&e.data[0]===Pr,B_=e=>T_(e)&&e.data[e.data.length-1]===Pr,P_=e=>{var t;return(null!==(t=e.ownerDocument)&&void 0!==t?t:document).createTextNode(Pr)},L_=(e,t)=>e?(e=>{var t;if(T_(e.previousSibling))return B_(e.previousSibling)||e.previousSibling.appendData(Pr),e.previousSibling;if(T_(e))return O_(e)||e.insertData(0,Pr),e;{const n=P_(e);return null===(t=e.parentNode)||void 0===t||t.insertBefore(n,e),n}})(t):(e=>{var t,n;if(T_(e.nextSibling))return O_(e.nextSibling)||e.nextSibling.insertData(0,Pr),e.nextSibling;if(T_(e))return B_(e)||e.appendData(Pr),e;{const o=P_(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),M_=O(L_,!0),I_=O(L_,!1),F_=(e,t)=>tr(e.container())?L_(t,e.container()):L_(t,e.getNode()),U_=(e,t)=>{const n=t.get();return n&&e.container()===n&&zr(n)},z_=(e,t)=>t.fold((t=>{qc(e.get());const n=M_(t);return e.set(n),U.some(rl(n,n.length-1))}),(t=>Ym(t).map((t=>{if(U_(t,e)){const t=e.get();return rl(t,1)}{qc(e.get());const n=F_(t,!0);return e.set(n),rl(n,1)}}))),(t=>Gm(t).map((t=>{if(U_(t,e)){const t=e.get();return rl(t,t.length-1)}{qc(e.get());const n=F_(t,!1);return e.set(n),rl(n,n.length-1)}}))),(t=>{qc(e.get());const n=I_(t);return e.set(n),U.some(rl(n,1))})),j_=(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()},H_=Dl([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),$_=(e,t)=>{const n=um(t,e);return n||e},q_=(e,t,n)=>{const o=ub(n),r=$_(t,o.container());return cb(e,r,o).fold((()=>Wm(r,o).bind(O(cb,e,r)).map((e=>H_.before(e)))),U.none)},V_=(e,t)=>null===Jm(e,t),W_=(e,t,n)=>cb(e,t,n).filter(O(V_,t)),K_=(e,t,n)=>{const o=fb(n);return W_(e,t,o).bind((e=>Km(e,o).isNone()?U.some(H_.start(e)):U.none()))},Y_=(e,t,n)=>{const o=ub(n);return W_(e,t,o).bind((e=>Wm(e,o).isNone()?U.some(H_.end(e)):U.none()))},G_=(e,t,n)=>{const o=fb(n),r=$_(t,o.container());return cb(e,r,o).fold((()=>Km(r,o).bind(O(cb,e,r)).map((e=>H_.after(e)))),U.none)},X_=e=>!db(J_(e)),Q_=(e,t,n)=>j_([q_,K_,Y_,G_],[e,t,n]).filter(X_),J_=e=>e.fold(D,D,D,D),Z_=e=>e.fold(A("before"),A("start"),A("end"),A("after")),ek=e=>e.fold(H_.before,H_.before,H_.after,H_.after),tk=e=>e.fold(H_.start,H_.start,H_.end,H_.end),nk=(e,t,n,o,r,s)=>It(cb(t,n,o),cb(t,n,r),((t,o)=>t!==o&&((e,t,n)=>{const o=um(t,e),r=um(n,e);return x(o)&&o===r})(n,t,o)?H_.after(e?t:o):s)).getOr(s),ok=(e,t)=>e.fold(F,(e=>{return o=t,!(Z_(n=e)===Z_(o)&&J_(n)===J_(o));var n,o})),rk=(e,t)=>e?t.fold(N(U.some,H_.start),U.none,N(U.some,H_.after),U.none):t.fold(U.none,N(U.some,H_.before),U.none,N(U.some,H_.end)),sk=(e,t,n,o)=>{const r=mb(e,o),s=Q_(t,n,r);return Q_(t,n,r).bind(O(rk,e)).orThunk((()=>((e,t,n,o,r)=>{const s=mb(e,r);return Hm(e,n,s).map(O(mb,e)).fold((()=>o.map(ek)),(r=>Q_(t,n,r).map(O(nk,e,t,n,s,r)).filter(O(ok,o)))).filter(X_)})(e,t,n,s,o)))},ak=(e,t,n)=>{const o=e?1:-1;return t.setRng(rl(n.container(),n.offset()+o).toRange()),t.getSel().modify("move",e?"forward":"backward","word"),!0},ik=(e,t)=>{const n=t.selection.getRng(),o=e?rl.fromRangeEnd(n):rl.fromRangeStart(n);return!!(e=>E(e.selection.getSel().modify))(t)&&(e&&$r(o)?ak(!0,t.selection,o):!(e||!qr(o))&&ak(!1,t.selection,o))};var lk;!function(e){e[e.Br=0]="Br",e[e.Block=1]="Block",e[e.Wrap=2]="Wrap",e[e.Eol=3]="Eol"}(lk||(lk={}));const dk=(e,t)=>e===Sm.Backwards?se(t):t,ck=(e,t,n)=>e===Sm.Forwards?t.next(n):t.prev(n),mk=(e,t,n,o)=>ir(o.getNode(t===Sm.Forwards))?lk.Br:!1===fm(n,o)?lk.Block:lk.Wrap,uk=(e,t,n,o)=>{const r=Im(n);let s=o;const a=[];for(;s;){const n=ck(t,r,s);if(!n)break;if(ir(n.getNode(!1)))return t===Sm.Forwards?{positions:dk(t,a).concat([n]),breakType:lk.Br,breakAt:U.some(n)}:{positions:dk(t,a),breakType:lk.Br,breakAt:U.some(n)};if(n.isVisible()){if(e(s,n)){const e=mk(0,t,s,n);return{positions:dk(t,a),breakType:e,breakAt:U.some(n)}}a.push(n),s=n}else s=n}return{positions:dk(t,a),breakType:lk.Eol,breakAt:U.none()}},fk=(e,t,n,o)=>t(n,o).breakAt.map((o=>{const r=t(n,o).positions;return e===Sm.Backwards?r.concat(o):[o].concat(r)})).getOr([]),gk=(e,t)=>J(e,((e,n)=>e.fold((()=>U.some(n)),(o=>It(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()),pk=(e,t)=>ce(t.getClientRects()).bind((t=>gk(e,t.left))),hk=O(uk,rl.isAbove,-1),bk=O(uk,rl.isBelow,1),vk=O(fk,-1,hk),yk=O(fk,1,bk),Ck=(e,t)=>hk(e,t).breakAt.isNone(),wk=(e,t)=>bk(e,t).breakAt.isNone(),xk=(e,t)=>pk(vk(e,t),t),Ek=(e,t)=>pk(yk(e,t),t),_k=cr,kk=(e,t)=>Math.abs(e.left-t),Sk=(e,t)=>Math.abs(e.right-t),Nk=(e,t)=>Be(e,((e,n)=>{const o=Math.min(kk(e,t),Sk(e,t)),r=Math.min(kk(n,t),Sk(n,t));return r===o&&Se(n,"node")&&_k(n.node)||r<o?n:e})),Rk=e=>{const t=t=>W(t,(t=>{const n=Di(t);return n.node=e,n}));if(Vo(e))return t(e.getClientRects());if(tr(e)){const n=e.ownerDocument.createRange();return n.setStart(e,0),n.setEnd(e,e.data.length),t(n.getClientRects())}return[]},Ak=e=>oe(e,Rk);var Dk;!function(e){e[e.Up=-1]="Up",e[e.Down=1]="Down"}(Dk||(Dk={}));const Tk=(e,t,n,o,r,s)=>{let a=0;const i=[],l=o=>{let s=Ak([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=mm(r,e,ss,t);)if(n(r))return})(e,o,l,c)),i},Ok=O(Tk,Dk.Up,Bi,Pi),Bk=O(Tk,Dk.Down,Pi,Bi),Pk=e=>Le(e.getClientRects()),Lk=e=>t=>((e,t)=>t.line>e)(e,t),Mk=e=>t=>((e,t)=>t.line===e)(e,t),Ik=(e,t)=>{e.selection.setRng(t),Pg(e,e.selection.getRng())},Fk=(e,t,n)=>U.some(g_(e,t,n)),Uk=(e,t,n,o,r,s)=>{const a=t===Sm.Forwards,i=Im(e.getBody()),l=O(_m,a?i.next:i.prev),d=a?o:r;if(!n.collapsed){const o=Mi(n);if(s(o))return u_(t,e,o,t===Sm.Backwards,!1);if(C_(e)){const e=n.cloneRange();return e.collapse(t===Sm.Backwards),U.from(e)}}const c=xm(t,e.getBody(),n);if(d(c))return f_(e,c.getNode(!a));let m=l(c);const u=Yr(n);if(!m)return u?U.some(n):U.none();if(m=mb(a,m),d(m))return u_(t,e,m.getNode(!a),a,!1);const f=l(m);return f&&d(f)&&km(m,f)?u_(t,e,f.getNode(!a),a,!1):u?Fk(e,m.toRange(),!1):U.none()},zk=(e,t,n,o,r,s)=>{const a=xm(t,e.getBody(),n),i=Le(a.getClientRects()),l=t===Dk.Down,d=e.getBody();if(!i)return U.none();if(C_(e)){const e=l?rl.fromRangeEnd(n):rl.fromRangeStart(n);return(l?Ek:xk)(d,e).orThunk((()=>U.from(e))).map((e=>e.toRange()))}const c=(l?Bk:Ok)(d,Lk(1),a),m=X(c,Mk(1)),u=i.left,f=Nk(m,u);if(f&&s(f.node)){const n=Math.abs(u-f.left),o=Math.abs(u-f.right);return u_(t,e,f.node,n<o,!1)}let g;if(g=o(a)?a.getNode():r(a)?a.getNode(!0):Mi(n),g){const n=((e,t,n,o)=>{const r=Im(t);let s,a,i,l;const d=[];let c=0;1===e?(s=r.next,a=Pi,i=Bi,l=rl.after(o)):(s=r.prev,a=Bi,i=Pi,l=rl.before(o));const m=Pk(l);do{if(!l.isVisible())continue;const e=Pk(l);if(i(e,m))continue;d.length>0&&a(e,Le(d))&&c++;const t=Di(e);if(t.position=l,t.line=c,n(t))return d;d.push(t)}while(l=s(l));return d})(t,d,Lk(1),g);let o=Nk(X(n,Mk(1)),u);if(o)return Fk(e,o.position.toRange(),!1);if(o=Le(X(n,Mk(0))),o)return Fk(e,o.position.toRange(),!1)}return 0===m.length?jk(e,l).filter(l?r:o).map((t=>g_(e,t.toRange(),!1))):U.none()},jk=(e,t)=>{const n=e.selection.getRng(),o=t?rl.fromRangeEnd(n):rl.fromRangeStart(n),r=(s=o.container(),a=e.getBody(),Xn(yn.fromDom(s),(e=>Zc(e.dom)),(e=>e.dom===a)).map((e=>e.dom)).getOr(a));var s,a;if(t){const e=bk(r,o);return me(e.positions)}{const e=hk(r,o);return ce(e.positions)}},Hk=(e,t,n)=>jk(e,t).filter(n).exists((t=>(e.selection.setRng(t.toRange()),!0))),$k=(e,t)=>{const n=e.dom.createRng();n.setStart(t.container(),t.offset()),n.setEnd(t.container(),t.offset()),e.selection.setRng(n)},qk=(e,t)=>{e?t.setAttribute("data-mce-selected","inline-boundary"):t.removeAttribute("data-mce-selected")},Vk=(e,t,n)=>z_(t,n).map((t=>($k(e,t),n))),Wk=(e,t,n)=>{const o=e.getBody(),r=((e,t,n)=>{const o=rl.fromRangeStart(e);if(e.collapsed)return o;{const r=rl.fromRangeEnd(e);return n?Km(t,r).getOr(r):Wm(t,o).getOr(o)}})(e.selection.getRng(),o,n),s=O(lb,e);return sk(n,s,o,r).bind((n=>Vk(e,t,n)))},Kk=(e,t)=>{const n=t.get();if(e.selection.isCollapsed()&&!e.composing&&n){const o=rl.fromRangeStart(e.selection.getRng());rl.isTextPosition(o)&&!(e=>$r(e)||qr(e))(o)&&($k(e,$c(n,o)),t.set(null))}},Yk=(e,t,n)=>!!Bd(e)&&Wk(e,t,n).isSome(),Gk=(e,t,n)=>!!Bd(t)&&ik(e,t),Xk=e=>{const t=Za(null),n=O(lb,e);return e.on("NodeChange",(o=>{Bd(e)&&(((e,t,n)=>{const o=W(zo(yn.fromDom(t.getRoot()),'*[data-mce-selected="inline-boundary"]'),(e=>e.dom)),r=X(o,e),s=X(n,e);K(ae(r,s),O(qk,!1)),K(ae(s,r),O(qk,!0))})(n,e.dom,o.parents),Kk(e,t),((e,t,n,o)=>{if(t.selection.isCollapsed()){const r=X(o,e);K(r,(o=>{const r=rl.fromRangeStart(t.selection.getRng());Q_(e,t.getBody(),r).bind((e=>Vk(t,n,e)))}))}})(n,e,t,o.parents))})),t},Qk=O(Gk,!0),Jk=O(Gk,!1),Zk=(e,t,n)=>{if(Bd(e)){const o=jk(e,t).getOrThunk((()=>{const n=e.selection.getRng();return t?rl.fromRangeEnd(n):rl.fromRangeStart(n)}));return Q_(O(lb,e),e.getBody(),o).exists((t=>{const o=ek(t);return z_(n,o).exists((t=>($k(e,t),!0)))}))}return!1},eS=(e,t)=>n=>z_(t,n).map((t=>()=>$k(e,t))),tS=(e,t,n,o)=>{const r=e.getBody(),s=O(lb,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)),pb(e),Q_(s,r,rl.fromRangeStart(e.selection.getRng())).map(tk).bind(eS(e,t)).each(M)})),e.nodeChanged()},nS=(e,t,n,o)=>{const r=((e,t)=>um(t,e)||e)(e.getBody(),o.container()),s=O(lb,e),a=Q_(s,r,o);return a.bind((e=>n?e.fold(A(U.some(tk(e))),U.none,A(U.some(ek(e))),U.none):e.fold(U.none,A(U.some(ek(e))),U.none,A(U.some(tk(e)))))).map(eS(e,t)).getOrThunk((()=>{const i=$m(n,r,o),l=i.bind((e=>Q_(s,r,e)));return It(a,l,(()=>cb(s,r,o).bind((t=>(e=>It(Ym(e),Gm(e),((t,n)=>{const o=mb(!0,t),r=mb(!1,n);return Wm(e,o).forall((e=>e.isEqual(r)))})).getOr(!0))(t)?U.some((()=>{ab(e,n,yn.fromDom(t))})):U.none())))).getOrThunk((()=>l.bind((()=>i.map((r=>()=>{n?tS(e,t,o,r):tS(e,t,r,o)}))))))}))},oS=(e,t,n)=>{if(e.selection.isCollapsed()&&Bd(e)){const o=rl.fromRangeStart(e.selection.getRng());return nS(e,t,n,o)}return U.none()},rS=(e,t)=>{const n=yn.fromDom(e.getBody()),o=yn.fromDom(e.selection.getStart()),r=ph(o,n);return te(r,t).fold(A(r),(e=>r.slice(0,e)))},sS=e=>1===Un(e),aS=e=>rS(e,(t=>e.schema.isBlock(qt(t))||(e=>Un(e)>1)(t))),iS=(e,t)=>{const n=O(oy,e);return oe(t,(e=>n(e)?[e.dom]:[]))},lS=e=>{const t=(e=>rS(e,(t=>e.schema.isBlock(qt(t)))))(e);return iS(e,t)},dS=(e,t)=>{const n=X(aS(e),sS);return me(n).bind((o=>{const r=rl.fromRangeStart(e.selection.getRng());return yb(t,r,o.dom)&&!Xu(o)?U.some((()=>((e,t,n,o)=>{const r=iS(t,o);if(0===r.length)ab(t,e,n);else{const e=ny(n.dom,r);t.selection.setRng(e.toRange())}})(t,e,o,n))):U.none()}))},cS=(e,t)=>{const n=e.selection.getStart(),o=((e,t)=>{const n=t.parentElement;return ir(t)&&!v(n)&&e.dom.isEmpty(n)})(e,n)||(r=n,Xu(yn.fromDom(r)))?ny(n,t):((e,t)=>{const{caretContainer:n,caretPosition:o}=ty(t);return e.insertNode(n.dom),o})(e.selection.getRng(),t);var r;e.selection.setRng(o.toRange())},mS=e=>tr(e.startContainer),uS=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===(tr(t)?t.length:t.childNodes.length)})(e),fS=e=>{const t=e.selection.getRng();return(e=>0===e.startOffset&&mS(e))(t)&&((e,t)=>{const n=t.startContainer.parentElement;return!v(n)&&oy(e,yn.fromDom(n))})(e,t)&&(e=>uS(e)||(e=>!e.endContainer.isEqualNode(e.commonAncestorContainer))(e))(t)},gS=e=>{if(fS(e)){const t=lS(e);return U.some((()=>{pb(e),((e,t)=>{const n=ae(t,lS(e));n.length>0&&cS(e,n)})(e,t)}))}return U.none()},pS=(e,t)=>e.selection.isCollapsed()?dS(e,t):gS(e),hS=(e,t)=>((e,t,n)=>Xn(e,t,n).isSome())(e,(e=>Qm(e.dom)),(e=>t.isBlock(qt(e)))),bS=e=>{const t=e.selection.getRng();return t.collapsed&&(mS(t)||e.dom.isEmpty(t.startContainer))&&!(e=>hS(yn.fromDom(e.selection.getStart()),e.schema))(e)},vS=e=>(bS(e)&&cS(e,[]),!0),yS=(e,t,n)=>x(n)?U.some((()=>{e._selectionOverrides.hideFakeCaret(),ab(e,t,yn.fromDom(n))})):U.none(),CS=(e,t)=>e.selection.isCollapsed()?((e,t)=>{const n=t?lh:dh,o=t?Sm.Forwards:Sm.Backwards,r=xm(o,e.getBody(),e.selection.getRng());return n(r)?yS(e,t,r.getNode(!t)):U.from(mb(t,r)).filter((e=>n(e)&&km(r,e))).bind((n=>yS(e,t,n.getNode(!t))))})(e,t):((e,t)=>{const n=e.selection.getNode();return fr(n)?yS(e,t,n):U.none()})(e,t),wS=e=>Je(null!=e?e:"").getOr(0),xS=(e,t)=>(e||"table"===qt(t)?"margin":"padding")+("rtl"===co(t,"direction")?"-right":"-left"),ES=e=>{const t=kS(e);return!e.mode.isReadOnly()&&(t.length>1||((e,t)=>re(t,(t=>{const n=xS(bd(e),t),o=uo(t,n).map(wS).getOr(0);return"false"!==e.dom.getContentEditable(t.dom)&&o>0})))(e,t))},_S=e=>Sr(e)||Nr(e),kS=e=>X(_o(e.selection.getSelectedBlocks()),(e=>!_S(e)&&!(e=>Rn(e).exists(_S))(e)&&Qn(e,(e=>dr(e.dom)||cr(e.dom))).exists((e=>dr(e.dom))))),SS=(e,t)=>{var n,o;const{dom:r}=e,s=vd(e),a=null!==(o=null===(n=/[a-z%]+$/i.exec(s))||void 0===n?void 0:n[0])&&void 0!==o?o:"px",i=wS(s),l=bd(e);K(kS(e),(e=>{((e,t,n,o,r,s)=>{const a=xS(n,yn.fromDom(s)),i=wS(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)}))},NS=e=>SS(e,"outdent"),RS=e=>{if(e.selection.isCollapsed()&&ES(e)){const t=e.dom,n=e.selection.getRng(),o=rl.fromRangeStart(n),r=t.getParent(n.startContainer,t.isBlock);if(null!==r&&Ch(yn.fromDom(r),o,e.schema))return U.some((()=>NS(e)))}return U.none()},AS=(e,t,n)=>fe([RS,A_,v_,(e,n)=>oS(e,t,n),i_,ev,D_,CS,m_,pS],(t=>t(e,n))).filter((t=>e.selection.isEditable())),DS=(e,t)=>{AS(e,t,!0).fold((()=>{e.selection.isEditable()&&(e=>{gb(e,"ForwardDelete")})(e)}),M)},TS=(e,t)=>{e.addCommand("delete",(()=>{((e,t)=>{AS(e,t,!1).fold((()=>{e.selection.isEditable()&&(pb(e),vb(e))}),M)})(e,t)})),e.addCommand("forwardDelete",(()=>{DS(e,t)}))},OS=e=>void 0===e.touches||1!==e.touches.length?U.none():U.some(e.touches[0]),BS=e=>{const t=ai(),n=Za(!1),o=li((t=>{e.dispatch("longpress",{...t,type:"longpress"}),n.set(!0)}),400);e.on("touchstart",(e=>{OS(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(),OS(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)},PS=(e,t)=>ke(e,t.nodeName),LS=(e,t)=>!!tr(t)||!!Vo(t)&&!(PS(e.getBlockElements(),t)||mu(t)||Ls(e,t)||ws(t)),MS=(e,t)=>{if(tr(t)){if(0===t.data.length)return!0;if(/^\s+$/.test(t.data))return!t.nextSibling||PS(e,t.nextSibling)||ws(t.nextSibling)}return!1},IS=e=>e.dom.create(Ql(e),Jl(e)),FS=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=Ql(e);if(!s||!Vo(s))return;const m=a.nodeName.toLowerCase();if(!o.isValidChild(m,c.toLowerCase())||((e,t,n)=>V(gh(yn.fromDom(n),yn.fromDom(t)),(t=>PS(e,t.dom))))(r,a,s))return;const u=n.getRng(),{startContainer:f,startOffset:g,endContainer:p,endOffset:h}=u,b=ip(e);let v=a.firstChild;for(;v;)if(Vo(v)&&Ts(o,v),LS(o,v)){if(MS(r,v)){l=v,v=v.nextSibling,t.remove(l);continue}i||(i=IS(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())},US=(e,t,n)=>{const o=yn.fromDom(IS(e)),r=Or();vo(o,r),n(t,o);const s=document.createRange();return s.setStartBefore(r.dom),s.setEndBefore(r.dom),s},zS=e=>t=>-1!==(" "+t.attr("class")+" ").indexOf(e),jS=(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>"},HS=e=>{const t="contenteditable",n=" "+Pt.trim(Ec(e))+" ",o=" "+Pt.trim(xc(e))+" ",r=zS(n),s=zS(o),a=_c(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],jS(e,r,xc(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))}}))},$S=(e,t)=>{t.hasAttribute("data-mce-caret")&&(Kr(t),e.selection.setRng(e.selection.getRng()),e.selection.scrollIntoView(t))},qS=(e,t)=>{const n=(e=>to(yn.fromDom(e.getBody()),"*[data-mce-caret]").map((e=>e.dom)).getOrNull())(e);if(n)return"compositionstart"===t.type?(t.preventDefault(),t.stopPropagation(),void $S(e,n)):void(Hr(n)&&($S(e,n),e.undoManager.add()))},VS=cr,WS=(e,t,n)=>{const o=Im(e.getBody()),r=O(_m,1===t?o.next:o.prev);if(n.collapsed){const o=e.dom.getParent(n.startContainer,"PRE");if(!o)return;if(!r(rl.fromRangeStart(n))){const n=yn.fromDom((e=>{const t=e.dom.create(Ql(e));return t.innerHTML='<br data-mce-bogus="1">',t})(e));1===t?ho(yn.fromDom(o),n):po(yn.fromDom(o),n),e.selection.select(n.dom,!0),e.selection.collapse()}}},KS=(e,t)=>{const n=t?Sm.Forwards:Sm.Backwards,o=e.selection.getRng();return((e,t,n)=>Uk(t,e,n,uh,fh,VS))(n,e,o).orThunk((()=>(WS(e,n,o),U.none())))},YS=(e,t)=>{const n=t?1:-1,o=e.selection.getRng();return((e,t,n)=>zk(t,e,n,(e=>uh(e)||ch(e)),(e=>fh(e)||mh(e)),VS))(n,e,o).orThunk((()=>(WS(e,n,o),U.none())))},GS=(e,t)=>KS(e,((e,t)=>{const n=t?e.getEnd(!0):e.getStart(!0);return db(n)?!t:t})(e.selection,t)).exists((t=>(Ik(e,t),!0))),XS=(e,t)=>YS(e,t).exists((t=>(Ik(e,t),!0))),QS=(e,t)=>Hk(e,t,t?fh:uh),JS=(e,t)=>y_(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=>(Ik(e,t),!0))),ZS=e=>q(["figcaption"],qt(e)),eN=(e,t)=>{const n=yn.fromDom(e.getBody()),o=rl.fromRangeStart(e.selection.getRng());return((e,t,n)=>{const o=O(En,t);return Qn(yn.fromDom(e.container()),(e=>n.isBlock(qt(e))),o).filter(ZS)})(o,n,e.schema).exists((()=>{if(((e,t,n)=>t?wk(e.dom,n):Ck(e.dom,n))(n,t,o)){const o=US(e,n,t?vo:bo);return e.selection.setRng(o),!0}return!1}))},tN=(e,t)=>!!e.selection.isCollapsed()&&eN(e,t),nN=(e,t)=>t?U.from(e.dom.getParent(e.selection.getNode(),"details")).map((t=>((e,t)=>{const n=e.selection.getRng(),o=rl.fromRangeStart(n);return!(e.getBody().lastChild!==t||!wk(t,o)||(e.execCommand("InsertNewBlockAfter"),0))})(e,t))).getOr(!1):U.from(e.dom.getParent(e.selection.getNode(),"summary")).bind((t=>U.from(e.dom.getParent(t,"details")).map((n=>((e,t,n)=>{const o=e.selection.getRng(),r=rl.fromRangeStart(o);return!(e.getBody().firstChild!==t||!Ck(n,r)||(e.execCommand("InsertNewBlockBefore"),0))})(e,n,t))))).getOr(!1),oN=(e,t)=>nN(e,t),rN={shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0},sN=(e,t)=>t.keyCode===e.keyCode&&t.shiftKey===e.shiftKey&&t.altKey===e.altKey&&t.ctrlKey===e.ctrlKey&&t.metaKey===e.metaKey,aN=(e,t)=>oe((e=>W(e,(e=>({...rN,...e}))))(e),(e=>sN(e,t)?[e]:[])),iN=(e,t)=>oe((e=>W(e,(e=>({...rN,...e}))))(e),(e=>sN(e,t)?[e]:[])),lN=(e,...t)=>()=>e.apply(null,t),dN=(e,t)=>ee(aN(e,t),(e=>e.action())),cN=(e,t)=>fe(iN(e,t),(e=>e.action())),mN=(e,t)=>{const n=t?Sm.Forwards:Sm.Backwards,o=e.selection.getRng();return Uk(e,n,o,lh,dh,fr).exists((t=>(Ik(e,t),!0)))},uN=(e,t)=>{const n=t?1:-1,o=e.selection.getRng();return zk(e,n,o,lh,dh,fr).exists((t=>(Ik(e,t),!0)))},fN=(e,t)=>Hk(e,t,t?dh:lh),gN=Dl([{none:["current"]},{first:["current"]},{middle:["current","target"]},{last:["current"]}]),pN={...gN,none:e=>gN.none(e)},hN=(e,t,n)=>oe(Ln(e),(e=>wn(e,t)?n(e)?[e]:[]:hN(e,t,n))),bN=(e,t)=>((e,t,n=I)=>n(t)?U.none():q(e,qt(t))?U.some(t):eo(t,e.join(","),(e=>wn(e,"table")||n(e))))(["td","th"],e,t),vN=e=>hN(e,"th,td",F),yN=(e,t)=>no(e,"table",t),CN=(e,t,n,o,r=F)=>{const s=1===o;if(!s&&n<=0)return pN.first(e[0]);if(s&&n>=e.length-1)return pN.last(e[e.length-1]);{const s=n+o,a=e[s];return r(a)?pN.middle(t,a):CN(e,t,s,o,r)}},wN=(e,t)=>yN(e,t).bind((t=>{const n=vN(t);return te(n,(t=>En(e,t))).map((e=>({index:e,all:n})))})),xN=(e,t,n,o,r)=>{const s=zo(yn.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}))(Di(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))},EN=O(xN,(e=>e.bottom),((e,t)=>e.y<t)),_N=O(xN,(e=>e.top),((e,t)=>e.y>t)),kN=(e,t)=>ce(t.getClientRects()).bind((t=>EN(e,t.left,t.top))).bind((e=>{return pk(Gm(n=e).map((e=>hk(n,e).positions.concat(e))).getOr([]),t);var n})),SN=(e,t)=>me(t.getClientRects()).bind((t=>_N(e,t.left,t.top))).bind((e=>{return pk(Ym(n=e).map((e=>[e].concat(bk(n,e).positions))).getOr([]),t);var n})),NN=(e,t,n)=>{const o=e(t,n);return(e=>e.breakType===lk.Wrap&&0===e.positions.length)(o)||!ir(n.getNode())&&(e=>e.breakType===lk.Br&&1===e.positions.length)(o)?!((e,t,n)=>n.breakAt.exists((n=>e(t,n).breakAt.isSome())))(e,t,o):o.breakAt.isNone()},RN=O(NN,hk),AN=O(NN,bk),DN=(e,t,n,o)=>{const r=e.selection.getRng(),s=t?1:-1;return!(!Xc()||!((e,t,n)=>{const o=rl.fromRangeStart(t);return Vm(!e,n).exists((e=>e.isEqual(o)))})(t,r,n))&&(u_(s,e,n,!t,!1).each((t=>{Ik(e,t)})),!0)},TN=(e,t)=>{const n=t.getNode(e);return Jo(n)?U.some(n):U.none()},ON=(e,t,n)=>{const o=TN(!!t,n),r=!1===t;o.fold((()=>Ik(e,n.toRange())),(o=>Vm(r,e.getBody()).filter((e=>e.isEqual(n))).fold((()=>Ik(e,n.toRange())),(n=>((e,t,n)=>{t.undoManager.transact((()=>{const o=e?ho:po,r=US(t,yn.fromDom(n),o);Ik(t,r)}))})(t,e,o)))))},BN=(e,t,n,o)=>{const r=e.selection.getRng(),s=rl.fromRangeStart(r),a=e.getBody();if(!t&&RN(o,s)){const o=((e,t,n)=>kN(t,n).orThunk((()=>ce(n.getClientRects()).bind((n=>gk(vk(e,rl.before(t)),n.left))))).getOr(rl.before(t)))(a,n,s);return ON(e,t,o),!0}if(t&&AN(o,s)){const o=((e,t,n)=>SN(t,n).orThunk((()=>ce(n.getClientRects()).bind((n=>gk(yk(e,rl.after(t)),n.left))))).getOr(rl.after(t)))(a,n,s);return ON(e,t,o),!0}return!1},PN=(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),LN=(e,t)=>PN(e,t,DN),MN=(e,t)=>PN(e,t,BN),IN=(e,t,n)=>n.fold(U.none,U.none,((e,t)=>{return(n=t,Zn(n,vp)).map((e=>(e=>{const t=Yf.exact(e,0,e,0);return Zf(t)})(e)));var n}),(n=>(e.execCommand("mceTableInsertRowAfter"),FN(e,t,n)))),FN=(e,t,n)=>IN(e,t,((e,t,n)=>wN(e,n).fold((()=>pN.none(e)),(n=>CN(n.all,e,n.index,1,t))))(n,oo)),UN=(e,t,n)=>IN(e,t,((e,t,n)=>wN(e,n).fold((()=>pN.none()),(n=>CN(n.all,e,n.index,-1,t))))(n,oo)),zN=(e,t)=>{const n=["table","li","dl"],o=yn.fromDom(e.getBody()),r=e=>{const t=qt(e);return En(e,o)||q(n,t)},s=e.selection.getRng(),a=yn.fromDom(t?s.endContainer:s.startContainer);return bN(a,r).map((n=>{yN(n,r).each((t=>{e.model.table.clearSelectedCells(t.dom)})),e.selection.collapse(!t);return(t?FN:UN)(e,r,n).each((t=>{e.selection.setRng(t)})),!0})).getOr(!1)},jN=(e,t)=>{e.on("keydown",(n=>{n.isDefaultPrevented()||((e,t,n)=>{const o=Dt.os.isMacOS()||Dt.os.isiOS();dN([{keyCode:Df.RIGHT,action:lN(GS,e,!0)},{keyCode:Df.LEFT,action:lN(GS,e,!1)},{keyCode:Df.UP,action:lN(XS,e,!1)},{keyCode:Df.DOWN,action:lN(XS,e,!0)},...o?[{keyCode:Df.UP,action:lN(JS,e,!1),metaKey:!0,shiftKey:!0},{keyCode:Df.DOWN,action:lN(JS,e,!0),metaKey:!0,shiftKey:!0}]:[],{keyCode:Df.RIGHT,action:lN(LN,e,!0)},{keyCode:Df.LEFT,action:lN(LN,e,!1)},{keyCode:Df.UP,action:lN(MN,e,!1)},{keyCode:Df.DOWN,action:lN(MN,e,!0)},{keyCode:Df.UP,action:lN(MN,e,!1)},{keyCode:Df.UP,action:lN(oN,e,!1)},{keyCode:Df.DOWN,action:lN(oN,e,!0)},{keyCode:Df.RIGHT,action:lN(mN,e,!0)},{keyCode:Df.LEFT,action:lN(mN,e,!1)},{keyCode:Df.UP,action:lN(uN,e,!1)},{keyCode:Df.DOWN,action:lN(uN,e,!0)},{keyCode:Df.RIGHT,action:lN(Yk,e,t,!0)},{keyCode:Df.LEFT,action:lN(Yk,e,t,!1)},{keyCode:Df.RIGHT,ctrlKey:!o,altKey:o,action:lN(Qk,e,t)},{keyCode:Df.LEFT,ctrlKey:!o,altKey:o,action:lN(Jk,e,t)},{keyCode:Df.UP,action:lN(tN,e,!1)},{keyCode:Df.DOWN,action:lN(tN,e,!0)}],n).each((e=>{n.preventDefault()}))})(e,t,n)}))},HN=(e,t)=>({container:e,offset:t}),$N=Xa.DOM,qN=e=>t=>e===t?-1:0,VN=(e,t,n)=>{if(tr(e)&&t>=0)return U.some(HN(e,t));{const o=Ri($N);return U.from(o.backwards(e,t,qN(e),n)).map((e=>HN(e.container,e.container.data.length)))}},WN=(e,t,n)=>{if(!tr(e))return U.none();const o=e.data;if(t>=0&&t<=o.length)return U.some(HN(e,t));{const o=Ri($N);return U.from(o.backwards(e,t,qN(e),n)).bind((e=>{const o=e.container.data;return WN(e.container,t+o.length,n)}))}},KN=(e,t,n)=>{if(!tr(e))return U.none();const o=e.data;if(t<=o.length)return U.some(HN(e,t));{const r=Ri($N);return U.from(r.forwards(e,t,qN(e),n)).bind((e=>KN(e.container,t-o.length,n)))}},YN=(e,t,n,o,r)=>{const s=Ri(e,(e=>t=>e.isBlock(t)||q(["BR","IMG","HR","INPUT"],t.nodeName)||"false"===e.getContentEditable(t))(e));return U.from(s.backwards(t,n,o,r))},GN=e=>Mr(e.toString().replace(/\u00A0/g," ")),XN=e=>""!==e&&-1!=="  \f\n\r\t\v".indexOf(e),QN=(e,t)=>e.substring(t.length),JN=(e,t,n,o=0)=>{if(!(r=t).collapsed||!tr(r.startContainer))return U.none();var r;const s={text:"",offset:0},a=e.getParent(t.startContainer,e.isBlock)||e.getRoot();return YN(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(XN(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=GN(r);return 0!==s.lastIndexOf(n)||QN(s,n).length<o?U.none():U.some({text:QN(s,n),range:r,trigger:n})}))},ZN=(e,t,n,o=0)=>{return(r=yn.fromDom(t.startContainer),no(r,Cp)).fold((()=>JN(e,t,n,o)),(t=>{const o=e.createRng();o.selectNode(t.dom);const r=GN(o);return U.some({range:o,text:QN(r,n),trigger:n})}));var r},eR=e=>{if((e=>3===e.nodeType)(e))return HN(e,e.data.length);{const t=e.childNodes;return t.length>0?eR(t[t.length-1]):HN(e,t.length)}},tR=(e,t)=>{const n=e.childNodes;return n.length>0&&t<n.length?tR(n[t],0):n.length>0&&(e=>1===e.nodeType)(e)&&n.length===t?eR(n[n.length-1]):HN(e,t)},nR=e=>t=>{const n=tR(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 YN(e,t.container,t.offset,((e,t)=>0===t?-1:t),o).filter((e=>{const t=e.container.data.charAt(e.offset-1);return!XN(t)})).isSome()})(e,n)},oR=(e,t)=>{const n=t(),o=e.selection.getRng();return((e,t,n)=>fe(n.triggers,(n=>ZN(e,t,n))))(e.dom,o,n).bind((n=>rR(e,t,n)))},rR=(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((()=>nR(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 sR;!function(e){e[e.Error=0]="Error",e[e.Value=1]="Value"}(sR||(sR={}));const aR=(e,t,n)=>e.stype===sR.Error?t(e.serror):n(e.svalue),iR=e=>({stype:sR.Value,svalue:e}),lR=e=>({stype:sR.Error,serror:e}),dR=e=>aR(e,Al.error,Al.value),cR=iR,mR=e=>{const t=[],n=[];return K(e,(e=>{aR(e,(e=>n.push(e)),(e=>t.push(e)))})),{values:t,errors:n}},uR=lR,fR=(e,t)=>e.stype===sR.Error?t(e.serror):e,gR=(e,t)=>e.stype===sR.Value?{stype:sR.Value,svalue:t(e.svalue)}:e,pR=(e,t)=>e.stype===sR.Error?{stype:sR.Error,serror:t(e.serror)}:e,hR=aR,bR=e=>p(e)&&ge(e).length>100?" removed due to size":JSON.stringify(e,null,2),vR=(e,t)=>uR([{path:e,getErrorInfo:t}]),yR=(e,t,n,o)=>_e(n,o).fold((()=>((e,t,n)=>vR(e,(()=>'The chosen schema: "'+n+'" did not exist in branches: '+bR(t))))(e,n,o)),(n=>n.extract(e.concat(["branch: "+o]),t))),CR=(e,t)=>({extract:(n,o)=>_e(o,e).fold((()=>((e,t)=>vR(e,(()=>'Choice schema did not contain choice key: "'+t+'"')))(n,e)),(e=>yR(n,o,t,e))),toString:()=>"chooseOn("+e+"). Possible values: "+ge(t)}),wR=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)ke(r,t)&&(n[t]=e(n[t],r[t]))}return n},xR=wR(((e,t)=>h(e)&&h(t)?xR(e,t):t)),ER=(wR(((e,t)=>t)),e=>({tag:"defaultedThunk",process:A(e)})),_R=e=>N(uR,ne)(e),kR=e=>{const t=mR(e);return t.errors.length>0?_R(t.errors):cR(t.values)},SR=(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)}},NR=e=>({extract:(t,n)=>fR(e(n),(e=>((e,t)=>vR(e,A(t)))(t,e))),toString:A("val")}),RR=NR(cR),AR=(e,t,n,o)=>_e(t,n).fold((()=>((e,t,n)=>vR(e,(()=>'Could not find valid *required* value for "'+t+'" in '+bR(n))))(e,n,t)),o),DR=(e,t,n,o)=>o(_e(e,t).getOrThunk((()=>n(e)))),TR=(e,t,n,o,r)=>{const s=e=>r.extract(t.concat([o]),e),a=e=>e.fold((()=>cR(U.none())),(e=>{const n=r.extract(t.concat([o]),e);return gR(n,U.some)}));switch(e.tag){case"required":return AR(t,n,o,s);case"defaultedThunk":return DR(n,o,e.process,s);case"option":return((e,t,n)=>n(_e(e,t)))(n,o,a);case"defaultedOptionThunk":return((e,t,n,o)=>o(_e(e,t).map((t=>!0===t?n(e):t))))(n,o,e.process,a);case"mergeWithThunk":return DR(n,o,A({}),(t=>{const o=xR(e.process(n),t);return s(o)}))}},OR=e=>({extract:(t,n)=>((e,t,n)=>{const o={},r=[];for(const s of n)SR(s,((n,s,a,i)=>{const l=TR(a,e,t,n,i);hR(l,(e=>{r.push(...e)}),(e=>{o[s]=e}))}),((e,n)=>{o[e]=n(t)}));return r.length>0?uR(r):cR(o)})(t,n,e),toString:()=>{const t=W(e,(e=>SR(e,((e,t,n,o)=>e+" -> "+o.toString()),((e,t)=>"state("+e+")"))));return"obj{\n"+t.join("\n")+"}"}}),BR=e=>({extract:(t,n)=>{const o=W(n,((n,o)=>e.extract(t.concat(["["+o+"]"]),n)));return kR(o)},toString:()=>"array("+e.toString()+")"}),PR=(e,t,n)=>dR(((e,t,n)=>{const o=t.extract([e],n);return pR(o,(e=>({input:n,errors:e})))})(e,t,n)),LR=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: "+bR(e.input),MR=(e,t)=>CR(e,be(t,OR)),IR=A(RR),FR=(e,t)=>NR((n=>{const o=typeof n;return e(n)?cR(n):uR(`Expected type: ${t} but got: ${o}`)})),UR=FR(_,"number"),zR=FR(g,"string"),jR=FR(y,"boolean"),HR=FR(E,"function"),$R=(e,t,n,o)=>({tag:"field",key:e,newKey:t,presence:n,prop:o}),qR=(e,t)=>({tag:"custom",newKey:e,instantiator:t}),VR=e=>{return t=t=>q(e,t)?Al.value(t):Al.error(`Unsupported value: "${t}", choose one of "${e.join(", ")}".`),NR((e=>t(e).fold(uR,cR)));var t},WR=(e,t)=>$R(e,e,{tag:"required",process:{}},t),KR=e=>WR(e,zR),YR=e=>WR(e,HR),GR=(e,t)=>$R(e,e,{tag:"option",process:{}},t),XR=e=>GR(e,zR),QR=(e,t,n)=>$R(e,e,ER(t),n),JR=(e,t)=>QR(e,t,UR),ZR=(e,t,n)=>QR(e,t,VR(n)),eA=(e,t)=>QR(e,t,jR),tA=(e,t)=>QR(e,t,HR),nA=KR("type"),oA=YR("fetch"),rA=YR("onAction"),sA=tA("onSetup",(()=>S)),aA=XR("text"),iA=XR("icon"),lA=XR("tooltip"),dA=XR("label"),cA=eA("active",!1),mA=eA("enabled",!0),uA=eA("primary",!1),fA=e=>((e,t)=>QR(e,t,zR))("type",e),gA=OR([nA,KR("trigger"),JR("minChars",1),(hA=1,((e,t)=>$R(e,e,ER(t),IR()))("columns",hA)),JR("maxResults",10),(pA="matches",GR(pA,HR)),oA,rA,((e,t,n)=>QR(e,t,BR(n)))("highlightOn",[],zR)]);var pA,hA;const bA=[mA,lA,iA,aA,sA],vA=[cA].concat(bA),yA=[tA("predicate",I),ZR("scope","node",["node","editor"]),ZR("position","selection",["node","selection","line"])],CA=bA.concat([fA("contextformbutton"),uA,rA,qR("original",D)]),wA=vA.concat([fA("contextformbutton"),uA,rA,qR("original",D)]),xA=bA.concat([fA("contextformbutton")]),EA=vA.concat([fA("contextformtogglebutton")]),_A=MR("type",{contextformbutton:CA,contextformtogglebutton:wA});OR([fA("contextform"),tA("initValue",A("")),dA,((e,t)=>$R(e,e,{tag:"required",process:{}},BR(t)))("commands",_A),GR("launch",MR("type",{contextformbutton:xA,contextformtogglebutton:EA}))].concat(yA));const kA=e=>{const t=e.ui.registry.getAll().popups,n=be(t,(e=>{return(t=e,PR("Autocompleter",gA,{trigger:t.ch,...t})).fold((e=>{throw new Error(LR(e))}),D);var t})),o=Ne(xe(n,(e=>e.trigger))),r=Ee(n);return{dataset:n,triggers:o,lookupByTrigger:e=>X(r,(t=>t.trigger===e))}},SA=e=>{const t=ai(),n=Za(!1),o=t.isSet,r=()=>{o()&&((e=>{Cx(e).autocompleter.removeDecoration()})(e),(e=>{e.dispatch("AutocompleterEnd")})(e),n.set(!1),t.clear())},s=n=>{o()||(((e,t)=>{Cx(e).autocompleter.addDecoration(t)})(e,n.range),t.set({trigger:n.trigger,matchLength:n.text.length}))},a=Me((()=>kA(e))),i=o=>{(n=>t.get().map((t=>ZN(e.dom,e.selection.getRng(),t.trigger).bind((t=>rR(e,a,t,n))))).getOrThunk((()=>oR(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=li(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})},NA=Et().browser.isSafari(),RA=e=>Br(yn.fromDom(e)),AA=(e,t)=>{var n;return 0===e.startOffset&&e.endOffset===(null===(n=t.textContent)||void 0===n?void 0:n.length)},DA=(e,t)=>U.from(e.getParent(t.container(),"details")),TA=(e,t)=>DA(e,t).isSome(),OA=(e,t)=>t.startSummary.exists((t=>((e,t)=>Ym(t).exists((t=>t.isEqual(e))))(e,t))),BA=(e,t)=>t.startSummary.exists((t=>((e,t)=>Gm(t).exists((n=>ir(n.getNode())&&Km(t,n).exists((t=>t.isEqual(e)))||n.isEqual(e))))(e,t))),PA=(e,t)=>{const n=t.getNode();C(n)||e.selection.setCursorLocation(n,t.offset())},LA=(e,t,n)=>{const o=e.dom.getParent(t.container(),"details");if(o&&!o.open){const t=e.dom.select("summary",o)[0];if(t){(n?Ym(t):Gm(t)).each((t=>PA(e,t)))}}else PA(e,t)},MA=(e,t,n)=>{const{dom:o,selection:r}=e,s=e.getBody();if("character"===n){const n=rl.fromRangeStart(r.getRng()),a=o.getParent(n.container(),o.isBlock),i=DA(o,n),l=a&&o.isEmpty(a),d=v(null==a?void 0:a.previousSibling),c=v(null==a?void 0:a.nextSibling);if(l){if(t?c:d){if($m(!t,s,n).exists((e=>TA(o,e)&&!Mt(i,DA(o,e)))))return!0}}return $m(t,s,n).fold(I,(n=>{const r=DA(o,n);if(TA(o,n)&&!Mt(i,r)){if(t||LA(e,n,!1),a&&l){if(t&&d)return!0;if(!t&&c)return!0;LA(e,n,t),e.dom.remove(a)}return!0}return!1}))}return!1},IA=(e,t,n,o)=>{const r=e.selection.getRng(),s=rl.fromRangeStart(r),a=e.getBody();return"selection"===o?((e,t)=>{const n=t.startSummary.exists((t=>t.contains(e.startContainer))),o=t.startSummary.exists((t=>t.contains(e.endContainer))),r=t.startDetails.forall((e=>t.endDetails.forall((t=>e!==t))));return(n||o)&&!(n&&o)||r})(r,t):n?BA(s,t)||((e,t,n)=>n.startDetails.exists((n=>Wm(e,t).forall((e=>!n.contains(e.container()))))))(a,s,t):OA(s,t)||((e,t)=>t.startDetails.exists((n=>Km(n,e).forall((n=>t.startSummary.exists((t=>!t.contains(e.container())&&t.contains(n.container()))))))))(s,t)},FA=(e,t,n)=>((e,t)=>{const n=U.from(e.getParent(t.startContainer,"details")),o=U.from(e.getParent(t.endContainer,"details"));if(n.isSome()||o.isSome()){const t=n.bind((t=>U.from(e.select("summary",t)[0])));return U.some({startSummary:t,startDetails:n,endDetails:o})}return U.none()})(e.dom,e.selection.getRng()).fold((()=>MA(e,t,n)),(o=>IA(e,o,t,n)||MA(e,t,n))),UA=(e,t,n)=>{const o=e.selection,r=o.getNode(),s=o.getRng(),a=rl.fromRangeStart(s);return!!hr(r)&&("selection"===n&&AA(s,r)||yb(t,a,r)?RA(r):e.undoManager.transact((()=>{const s=o.getSel();let{anchorNode:a,anchorOffset:i,focusNode:l,focusOffset:d}=null!=s?s:{};const c=()=>{x(a)&&x(i)&&x(l)&&x(d)&&(null==s||s.setBaseAndExtent(a,i,l,d))},m=(e,t)=>{K(e.childNodes,(e=>{Ru(e)&&t.appendChild(e)}))},u=e.dom.create("span",{"data-mce-bogus":"1"});m(r,u),r.appendChild(u),c(),"word"!==n&&"line"!==n||null==s||s.modify("extend",t?"right":"left",n),!o.isCollapsed()&&AA(o.getRng(),u)?RA(r):(e.execCommand(t?"ForwardDelete":"Delete"),a=null==s?void 0:s.anchorNode,i=null==s?void 0:s.anchorOffset,l=null==s?void 0:s.focusNode,d=null==s?void 0:s.focusOffset,m(u,r),c()),e.dom.remove(u)})),!0)},zA=(e,t,n)=>FA(e,t,n)||NA&&UA(e,t,n)?U.some(S):U.none(),jA=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:S,inputType:n},a=Ba(new InputEvent(e));return t.dispatch(e,{...a,...s,...o})},HA=jA("input"),$A=jA("beforeinput"),qA=Et(),VA=qA.os,WA=VA.isMacOS()||VA.isiOS(),KA=qA.browser.isFirefox(),YA=(e,t)=>{let n=!1;e.on("keydown",(o=>{n=o.keyCode===Df.BACKSPACE,o.isDefaultPrevented()||((e,t,n)=>{const o=n.keyCode===Df.BACKSPACE?"deleteContentBackward":"deleteContentForward",r=e.selection.isCollapsed(),s=r?"character":"selection",a=e=>r?e?"word":"line":"selection";cN([{keyCode:Df.BACKSPACE,action:lN(RS,e)},{keyCode:Df.BACKSPACE,action:lN(A_,e,!1)},{keyCode:Df.DELETE,action:lN(A_,e,!0)},{keyCode:Df.BACKSPACE,action:lN(v_,e,!1)},{keyCode:Df.DELETE,action:lN(v_,e,!0)},{keyCode:Df.BACKSPACE,action:lN(oS,e,t,!1)},{keyCode:Df.DELETE,action:lN(oS,e,t,!0)},{keyCode:Df.BACKSPACE,action:lN(ev,e,!1)},{keyCode:Df.DELETE,action:lN(ev,e,!0)},{keyCode:Df.BACKSPACE,action:lN(zA,e,!1,s)},{keyCode:Df.DELETE,action:lN(zA,e,!0,s)},...WA?[{keyCode:Df.BACKSPACE,altKey:!0,action:lN(zA,e,!1,a(!0))},{keyCode:Df.DELETE,altKey:!0,action:lN(zA,e,!0,a(!0))},{keyCode:Df.BACKSPACE,metaKey:!0,action:lN(zA,e,!1,a(!1))}]:[{keyCode:Df.BACKSPACE,ctrlKey:!0,action:lN(zA,e,!1,a(!0))},{keyCode:Df.DELETE,ctrlKey:!0,action:lN(zA,e,!0,a(!0))}],{keyCode:Df.BACKSPACE,action:lN(D_,e,!1)},{keyCode:Df.DELETE,action:lN(D_,e,!0)},{keyCode:Df.BACKSPACE,action:lN(CS,e,!1)},{keyCode:Df.DELETE,action:lN(CS,e,!0)},{keyCode:Df.BACKSPACE,action:lN(m_,e,!1)},{keyCode:Df.DELETE,action:lN(m_,e,!0)},{keyCode:Df.BACKSPACE,action:lN(i_,e,!1)},{keyCode:Df.DELETE,action:lN(i_,e,!0)},{keyCode:Df.BACKSPACE,action:lN(pS,e,!1)},{keyCode:Df.DELETE,action:lN(pS,e,!0)}],n).filter((t=>e.selection.isEditable())).each((t=>{n.preventDefault(),$A(e,o).isDefaultPrevented()||(t(),HA(e,o))}))})(e,t,o)})),e.on("keyup",(t=>{t.isDefaultPrevented()||((e,t,n)=>{dN([{keyCode:Df.BACKSPACE,action:lN(R_,e)},{keyCode:Df.DELETE,action:lN(R_,e)},...WA?[{keyCode:Df.BACKSPACE,altKey:!0,action:lN(vS,e)},{keyCode:Df.DELETE,altKey:!0,action:lN(vS,e)},...n?[{keyCode:KA?224:91,action:lN(vS,e)}]:[]]:[{keyCode:Df.BACKSPACE,ctrlKey:!0,action:lN(vS,e)},{keyCode:Df.DELETE,ctrlKey:!0,action:lN(vS,e)}]],t)})(e,t,n),n=!1}))},GA=(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(Vo(e)||tr(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(vr),t.firstChild)}const r=n.createRng();if(t.normalize(),t.hasChildNodes()){const e=new Ho(t,t);let n,s=t;for(;n=e.current();){if(tr(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 ir(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),Pg(e,r)},XA=(e,t)=>{const n=e.getRoot();let o,r=t;for(;r!==n&&r&&"false"!==e.getContentEditable(r);){if("true"===e.getContentEditable(r)){o=r;break}r=r.parentNode}return r!==n?o:n},QA=e=>U.from(e.dom.getParent(e.selection.getStart(!0),e.dom.isBlock)),JA=e=>{e.innerHTML='<br data-mce-bogus="1">'},ZA=(e,t)=>{if(Ql(e).toLowerCase()===t.tagName.toLowerCase()){((e,t,n)=>{const o=e.dom;U.from(n.style).map(o.parseStyle).each((e=>{const n={...fo(yn.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))));It(r,s,((e,n)=>{const r=X(n,(t=>!q(e,t))),s=[...e,...r];o.setAttrib(t,"class",s.join(" "))}));const a=["style","class"],i=we(n,((e,t)=>!q(a,t)));o.setAttribs(t,i)})(e,t,Jl(e))}},eD=(e,t,n,o,r=!0,s,a)=>{const i=e.dom,l=e.schema,d=Ql(e),c=n?n.nodeName.toUpperCase():"";let m=t;const u=l.getTextInlineElements();let f;f=s||"TABLE"===c||"HR"===c?i.create(s||d,a||{}):n.cloneNode(!1);let g=f;if(r){do{if(u[m.nodeName]){if(Qm(m)||mu(m))continue;const e=m.cloneNode(!1);i.setAttrib(e,"id",""),f.hasChildNodes()?(e.appendChild(f.firstChild),f.appendChild(e)):(g=e,f.appendChild(e))}}while((m=m.parentNode)&&m!==o)}else i.setAttrib(f,"style",null),i.setAttrib(f,"class",null);return ZA(e,f),JA(g),f},tD=(e,t,n)=>!t&&n.nodeName.toLowerCase()===Ql(e)&&e.dom.isEmpty(n)&&((e,t,n)=>{let o=t;for(;o&&o!==e&&v(o.nextSibling);){const e=o.parentElement;if(!e||!n(e))return pr(e);o=e}return!1})(e.getBody(),n,(t=>ke(e.schema.getTextBlockElements(),t.nodeName.toLowerCase()))),nD=(e,t,n)=>{var o,r,s;const a=t(Ql(e)),i=((e,t)=>e.dom.getParent(t,pr))(e,n);i&&(e.dom.insertAfter(a,i),GA(e,a),(null!==(s=null===(r=null===(o=n.parentElement)||void 0===o?void 0:o.childNodes)||void 0===r?void 0:r.length)&&void 0!==s?s:0)>1&&e.dom.remove(n))},oD=(e,t)=>{const n=null==e?void 0:e.parentNode;return x(n)&&n.nodeName===t},rD=e=>x(e)&&/^(OL|UL|LI)$/.test(e.nodeName),sD=e=>x(e)&&/^(LI|DT|DD)$/.test(e.nodeName),aD=e=>{const t=e.parentNode;return sD(t)?t:e},iD=(e,t,n)=>{let o=e[n?"firstChild":"lastChild"];for(;o&&!Vo(o);)o=o[n?"nextSibling":"previousSibling"];return o===t},lD=e=>J(xe(fo(yn.fromDom(e)),((e,t)=>`${t}: ${e};`)),((e,t)=>e+t),""),dD=(e,t,n,o,r)=>{const s=e.dom,a=e.selection.getRng(),i=n.parentNode;if(n===e.getBody()||!i)return;var l;rD(l=n)&&rD(l.parentNode)&&(r="LI");const d=sD(o)?lD(o):void 0;let c=sD(o)&&d?t(r,{style:lD(o)}):t(r);if(iD(n,o,!0)&&iD(n,o,!1))if(oD(n,"LI")){const e=aD(n);s.insertAfter(c,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(c,n);else if(iD(n,o,!0))oD(n,"LI")?(s.insertAfter(c,aD(n)),c.appendChild(s.doc.createTextNode(" ")),c.appendChild(n)):i.insertBefore(c,n),s.remove(o);else if(iD(n,o,!1))s.insertAfter(c,aD(n)),s.remove(o);else{n=aD(n);const e=a.cloneRange();e.setStartAfter(o),e.setEndAfter(n);const t=e.extractContents();if("LI"===r&&((e,t)=>e.firstChild&&e.firstChild.nodeName===t)(t,"LI")){const e=X(W(c.children,yn.fromDom),B(Jt("br")));c=t.firstChild,s.insertAfter(t,n),K(e,(e=>bo(yn.fromDom(c),e))),d&&c.setAttribute("style",d)}else s.insertAfter(t,n),s.insertAfter(c,n);s.remove(o)}GA(e,c)},cD=(e,t)=>t&&"A"===t.nodeName&&e.isEmpty(t),mD=(e,t)=>e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t,uD=(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),fD=(e,t,n)=>tr(t)?e?1===n&&t.data.charAt(n-1)===Pr?0:n:n===t.data.length-1&&t.data.charAt(n)===Pr?t.data.length:n:n,gD={insert:(e,t)=>{let n,o,r,s,a=!1;const i=e.dom,l=e.schema.getNonEmptyElements(),d=e.selection.getRng(),c=Ql(e),m=yn.fromDom(d.startContainer),u=Mn(m,d.startOffset),f=u.exists((e=>Kt(e)&&!oo(e))),p=d.collapsed&&f,h=(t,o)=>eD(e,n,_,E,nd(e),t,o),b=e=>{const t=fD(e,n,o);if(tr(n)&&(e?t>0:t<n.data.length))return!1;if(n.parentNode===_&&a&&!e)return!0;if(e&&Vo(n)&&n===_.firstChild)return!0;if(mD(n,"TABLE")||mD(n,"HR"))return a&&!e||!a&&e;const r=new Ho(n,_);let s;for(tr(n)&&(e&&0===t?r.prev():e||t!==n.data.length||r.next());s=r.current();){if(Vo(s)){if(!s.getAttribute("data-mce-bogus")){const e=s.nodeName.toLowerCase();if(l[e]&&"br"!==e)return!1}}else if(tr(s)&&!is(s.data))return!1;e?r.prev():r.next()}return!0},v=()=>{let t;return t=/^(H[1-6]|PRE|FIGURE)$/.test(r)&&"HGROUP"!==k?h(c):h(),((e,t)=>{const n=od(e);return!w(t)&&(g(n)?q(Pt.explode(n),t.nodeName.toLowerCase()):n)})(e,s)&&uD(i,s)&&i.isEmpty(_,void 0,{includeZwsp:!0})?t=i.split(s,_):i.insertAfter(t,_),GA(e,t),t};dg(i,d).each((e=>{d.setStart(e.startContainer,e.startOffset),d.setEnd(e.endContainer,e.endOffset)})),n=d.startContainer,o=d.startOffset;const y=!(!t||!t.shiftKey),C=!(!t||!t.ctrlKey);Vo(n)&&n.hasChildNodes()&&!p&&(a=o>n.childNodes.length-1,n=n.childNodes[Math.min(o,n.childNodes.length-1)]||n,o=a&&tr(n)?n.data.length:0);const E=XA(i,n);if(!E||((e,t)=>{const n=e.dom.getParent(t,"ol,ul,dl");return null!==n&&"false"===e.dom.getContentEditableParent(n)})(e,n))return;y||(n=((e,t,n,o,r)=>{var s,a;const i=e.dom,l=null!==(s=XA(i,o))&&void 0!==s?s:i.getRoot();let d=i.getParent(o,i.isBlock);if(!d||!uD(i,d)){if(d=d||l,!d.hasChildNodes()){const o=i.create(t);return ZA(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(ZA(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,c,d,n,o));let _=i.getParent(n,i.isBlock)||i.getRoot();s=x(null==_?void 0:_.parentNode)?i.getParent(_.parentNode,i.isBlock):null,r=_?_.nodeName.toUpperCase():"";const k=s?s.nodeName.toUpperCase():"";if("LI"===k&&!C){_=s,s=s.parentNode,r=k}if(Vo(s)&&tD(e,y,_))return nD(e,h,_);if(/^(LI|DT|DD)$/.test(r)&&Vo(s)&&i.isEmpty(_))return void dD(e,h,s,_,c);if(!(p||_!==e.getBody()&&uD(i,_)))return;const S=_.parentNode;let N;if(p)N=h(c),u.fold((()=>{vo(m,yn.fromDom(N))}),(e=>{po(e,yn.fromDom(N))})),e.selection.setCursorLocation(N,0);else if(Ur(_))N=Kr(_),i.isEmpty(_)&&JA(_),ZA(e,N),GA(e,N);else if(b(!1))N=v();else if(b(!0)&&S){N=S.insertBefore(h(),_);const t=yn.fromDom(d.startContainer).dom.hasChildNodes()&&d.collapsed;GA(e,mD(_,"HR")||t?N:_)}else{const t=(e=>{const t=e.cloneRange();return t.setStart(e.startContainer,fD(!0,e.startContainer,e.startOffset)),t.setEnd(e.endContainer,fD(!1,e.endContainer,e.endOffset)),t})(d).cloneRange();t.setEndAfter(_);const n=t.extractContents();(e=>{K(Uo(yn.fromDom(e),Gt),(e=>{const t=e.dom;t.nodeValue=Mr(t.data)}))})(n),(e=>{let t=e;do{tr(t)&&(t.data=t.data.replace(/^[\r\n]+/,"")),t=t.firstChild}while(t)})(n),N=n.firstChild,i.insertAfter(n,_),((e,t,n)=>{var o;const r=[];if(!n)return;let s=n;for(;s=s.firstChild;){if(e.isBlock(s))return;Vo(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)||cD(e,s))&&e.remove(s)})(i,l,N),((e,t)=>{t.normalize();const n=t.lastChild;(!n||Vo(n)&&/^(left|right)$/gi.test(e.getStyle(n,"float",!0)))&&e.add(t,"br")})(i,_),i.isEmpty(_)&&JA(_),N.normalize(),i.isEmpty(N)?(i.remove(N),v()):(ZA(e,N),GA(e,N))}i.setAttrib(N,"id",""),e.dispatch("NewBlock",{newBlock:N})},fakeEventName:"insertParagraph"},pD=(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),Pg(e,o)},hD=(e,t)=>{const n=e.selection,o=e.dom,r=n.getRng();let s,a=!1;dg(o,r).each((e=>{r.setStart(e.startContainer,e.startOffset),r.setEnd(e.endContainer,e.endOffset)}));let i=r.startOffset,l=r.startContainer;if(Vo(l)&&l.hasChildNodes()){const e=i>l.childNodes.length-1;l=l.childNodes[Math.min(i,l.childNodes.length-1)]||l,i=e&&tr(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),tr(l)&&i>=l.data.length&&(((e,t,n)=>{const o=new Ho(t,n);let r;const s=e.getNonEmptyElements();for(;r=o.next();)if(s[r.nodeName.toLowerCase()]||tr(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"),al(o,r,s),pD(e,s,a),e.undoManager.add()},bD=(e,t)=>{const n=yn.fromTag("br");po(yn.fromDom(t),n),e.undoManager.add()},vD=(e,t)=>{yD(e.getBody(),t)||ho(yn.fromDom(t),yn.fromTag("br"));const n=yn.fromTag("br");ho(yn.fromDom(t),n),pD(e,n.dom,!1),e.undoManager.add()},yD=(e,t)=>{return n=rl.after(t),!!ir(n.getNode())||Wm(e,rl.after(t)).map((e=>ir(e.getNode()))).getOr(!1);var n},CD=e=>e&&"A"===e.nodeName&&"href"in e,wD=e=>e.fold(I,CD,CD,I),xD=(e,t)=>{t.fold(S,O(bD,e),O(vD,e),S)},ED={insert:(e,t)=>{const n=(e=>{const t=O(lb,e),n=rl.fromRangeStart(e.selection.getRng());return Q_(t,e.getBody(),n).filter(wD)})(e);n.isSome()?n.each(O(xD,e)):hD(e,t)},fakeEventName:"insertLineBreak"},_D=(e,t)=>QA(e).filter((e=>t.length>0&&wn(yn.fromDom(e),t))).isSome(),kD=Dl([{br:[]},{block:[]},{none:[]}]),SD=(e,t)=>(e=>_D(e,td(e)))(e),ND=e=>(t,n)=>(e=>QA(e).filter((e=>Nr(yn.fromDom(e)))).isSome())(t)===e,RD=(e,t)=>(n,o)=>{const r=(e=>QA(e).fold(A(""),(e=>e.nodeName.toUpperCase())))(n)===e.toUpperCase();return r===t},AD=e=>{const t=XA(e.dom,e.selection.getStart());return w(t)},DD=e=>RD("pre",e),TD=e=>(t,n)=>Xl(t)===e,OD=(e,t)=>(e=>_D(e,ed(e)))(e),BD=(e,t)=>t,PD=e=>{const t=Ql(e),n=XA(e.dom,e.selection.getStart());return x(n)&&e.schema.isValidChild(n.nodeName,t)},LD=e=>{const t=e.selection.getRng(),n=yn.fromDom(t.startContainer),o=Mn(n,t.startOffset).map((e=>Kt(e)&&!oo(e)));return t.collapsed&&o.getOr(!0)},MD=(e,t)=>(n,o)=>J(e,((e,t)=>e&&t(n,o)),!0)?U.some(t):U.none(),ID=(e,t,n)=>{if(t.selection.isCollapsed()||(e=>{e.execCommand("delete")})(t),x(n)){if($A(t,e.fakeEventName).isDefaultPrevented())return}e.insert(t,n),x(n)&&HA(t,e.fakeEventName)},FD=(e,t)=>{const n=()=>ID(ED,e,t),o=()=>ID(gD,e,t),r=((e,t)=>j_([MD([SD],kD.none()),MD([DD(!0),AD],kD.none()),MD([RD("summary",!0)],kD.br()),MD([DD(!0),TD(!1),BD],kD.br()),MD([DD(!0),TD(!1)],kD.block()),MD([DD(!0),TD(!0),BD],kD.block()),MD([DD(!0),TD(!0)],kD.br()),MD([ND(!0),BD],kD.br()),MD([ND(!0)],kD.block()),MD([OD],kD.br()),MD([BD],kD.br()),MD([PD],kD.block()),MD([LD],kD.block())],[e,!(!t||!t.shiftKey)]).getOr(kD.none()))(e,t);switch(Zl(e)){case"linebreak":r.fold(n,n,S);break;case"block":r.fold(o,o,S);break;case"invert":r.fold(o,n,S);break;default:r.fold(n,o,S)}},UD=Et(),zD=UD.os.isiOS()&&UD.browser.isSafari(),jD=(e,t)=>{var n;t.isDefaultPrevented()||(t.preventDefault(),(n=e.undoManager).typing&&(n.typing=!1,n.add()),e.undoManager.transact((()=>{FD(e,t)})))},HD=e=>{let t=U.none();e.on("keydown",(n=>{n.keyCode===Df.ENTER&&(zD&&(e=>{if(!e.collapsed)return!1;const t=e.startContainer;if(tr(t)){const n=/^[\uAC00-\uD7AF\u1100-\u11FF\u3130-\u318F\uA960-\uA97F\uD7B0-\uD7FF]$/,o=t.data.charAt(e.startOffset-1);return n.test(o)}return!1})(e.selection.getRng())?(e=>{t=U.some(e.selection.getBookmark()),e.undoManager.add()})(e):jD(e,n))})),e.on("keyup",(n=>{n.keyCode===Df.ENTER&&t.each((()=>((e,n)=>{e.undoManager.undo(),t.fold(S,(t=>e.selection.moveToBookmark(t))),jD(e,n),t=U.none()})(e,n)))}))},$D=(e,t)=>{e.on("keydown",(n=>{n.isDefaultPrevented()||((e,t,n)=>{const o=Dt.os.isMacOS()||Dt.os.isiOS();dN([{keyCode:Df.END,action:lN(QS,e,!0)},{keyCode:Df.HOME,action:lN(QS,e,!1)},...o?[]:[{keyCode:Df.HOME,action:lN(JS,e,!1),ctrlKey:!0,shiftKey:!0},{keyCode:Df.END,action:lN(JS,e,!0),ctrlKey:!0,shiftKey:!0}],{keyCode:Df.END,action:lN(fN,e,!0)},{keyCode:Df.HOME,action:lN(fN,e,!1)},{keyCode:Df.END,action:lN(Zk,e,!0,t)},{keyCode:Df.HOME,action:lN(Zk,e,!1,t)}],n).each((e=>{n.preventDefault()}))})(e,t,n)}))},qD=e=>{e.on("input",(t=>{t.isComposing||(e=>{const t=yn.fromDom(e.getBody());e.selection.isCollapsed()&&Wh(t,rl.fromRangeStart(e.selection.getRng()),e.schema).each((t=>{e.selection.setRng(t.toRange())}))})(e)}))},VD=Et(),WD=e=>e.stopImmediatePropagation(),KD=e=>e.keyCode===Df.PAGE_UP||e.keyCode===Df.PAGE_DOWN,YD=(e,t,n)=>{n&&!e.get()?t.on("NodeChange",WD,!0):!n&&e.get()&&t.off("NodeChange",WD),e.set(n)},GD=(e,t)=>{if(VD.os.isMacOS())return;const n=Za(!1);e.on("keydown",(t=>{KD(t)&&YD(n,e,!0)})),e.on("keyup",(o=>{o.isDefaultPrevented()||((e,t,n)=>{dN([{keyCode:Df.PAGE_UP,action:lN(Zk,e,!1,t)},{keyCode:Df.PAGE_DOWN,action:lN(Zk,e,!0,t)}],n)})(e,t,o),KD(o)&&n.get()&&(YD(n,e,!1),e.nodeChanged())}))},XD=(e,t)=>{const n=t.container(),o=t.offset();return tr(n)?(n.insertData(o,e),U.some(rl(n,o+e.length))):Em(t).map((n=>{const o=yn.fromText(e);return t.isAtEnd()?ho(n,o):po(n,o),rl(o.dom,e.length)}))},QD=O(XD,vr),JD=O(XD," "),ZD=e=>t=>{e.selection.setRng(t.toRange()),e.nodeChanged()},eT=e=>{const t=rl.fromRangeStart(e.selection.getRng()),n=yn.fromDom(e.getBody());if(e.selection.isCollapsed()){const o=O(lb,e),r=rl.fromRangeStart(e.selection.getRng());return Q_(o,e.getBody(),r).bind((e=>t=>t.fold((t=>Km(e.dom,rl.before(t))),(e=>Ym(e)),(e=>Gm(e)),(t=>Wm(e.dom,rl.after(t)))))(n)).map((o=>()=>((e,t,n)=>o=>Ih(e,o,n)?QD(t):JD(t))(n,t,e.schema)(o).each(ZD(e))))}return U.none()},tT=e=>{return Ft(Dt.browser.isFirefox()&&e.selection.isEditable()&&(t=e.dom,n=e.selection.getRng().startContainer,t.isEditable(t.getParent(n,"summary"))),(()=>{const t=yn.fromDom(e.getBody());e.selection.isCollapsed()||e.getDoc().execCommand("Delete");((e,t,n)=>Ih(e,t,n)?QD(t):JD(t))(t,rl.fromRangeStart(e.selection.getRng()),e.schema).each(ZD(e))}));var t,n},nT=e=>{e.on("keydown",(t=>{t.isDefaultPrevented()||((e,t)=>{cN([{keyCode:Df.SPACEBAR,action:lN(eT,e)},{keyCode:Df.SPACEBAR,action:lN(tT,e)}],t).each((n=>{t.preventDefault(),$A(e,"insertText",{data:" "}).isDefaultPrevented()||(n(),HA(e,"insertText",{data:" "}))}))})(e,t)}))},oT=e=>Dc(e)?[{keyCode:Df.TAB,action:lN(zN,e,!0)},{keyCode:Df.TAB,shiftKey:!0,action:lN(zN,e,!1)}]:[],rT=e=>{e.on("keydown",(t=>{t.isDefaultPrevented()||((e,t)=>{dN([...oT(e)],t).each((e=>{t.preventDefault()}))})(e,t)}))},sT=e=>{if(e.addShortcut("Meta+P","","mcePrint"),SA(e),bx(e))return Za(null);{const t=Xk(e);return(e=>{e.on("beforeinput",(t=>{e.selection.isEditable()&&!V(t.getTargetRanges(),(t=>!mp(e.dom,t)))||t.preventDefault()}))})(e),(e=>{e.on("keyup compositionstart",O(qS,e))})(e),jN(e,t),YA(e,t),HD(e),nT(e),qD(e),rT(e),$D(e,t),GD(e,t),t}};class aT{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&&ng(r,t)||e.dispatch("SelectionChange"),t=r})),e.on("contextmenu",(()=>{e.dispatch("SelectionChange")})),e.on("SelectionChange",(()=>{const t=e.selection.getStart(!0);t&&ku(e)&&!n.isSameElementPath(t)&&e.dom.isChildOf(t,e.getBody())&&e.nodeChanged({selectionChange:!0})})),e.on("mouseup",(t=>{!t.isDefaultPrevented()&&ku(e)&&("IMG"===e.selection.getNode().nodeName?Yg.setEditorTimeout(e,(()=>{e.nodeChanged()})):e.nodeChanged())}))}nodeChanged(e={}){const t=this.editor.selection;let n;if(this.editor.initialized&&t&&!Vd(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 iT=xi("image"),lT=xi("event"),dT=e=>t=>{t[lT]=e},cT=dT(0),mT=dT(2),uT=dT(1),fT=(gT=0,e=>{const t=e;return U.from(t[lT]).exists((e=>e===gT))});var gT;const pT=xi("mode"),hT=e=>t=>{t[pT]=e},bT=(e,t)=>hT(t)(e),vT=hT(0),yT=hT(2),CT=hT(1),wT=e=>t=>{const n=t;return U.from(n[pT]).exists((t=>t===e))},xT=wT(0),ET=wT(1),_T=["none","copy","link","move"],kT=["none","copy","copyLink","copyMove","link","linkMove","move","all","uninitialized"],ST=()=>{const e=new window.DataTransfer;let t="move",n="all";const o={get dropEffect(){return t},set dropEffect(e){q(_T,e)&&(t=e)},get effectAllowed(){return n},set effectAllowed(e){fT(o)&&q(kT,e)&&(n=e)},get items(){return((e,t)=>({...t,get length(){return t.length},add:(n,o)=>{if(xT(e)){if(!g(n))return t.add(n);if(!C(o))return t.add(n,o)}return null},remove:n=>{xT(e)&&t.remove(n)},clear:()=>{xT(e)&&t.clear()}}))(o,e.items)},get files(){return ET(o)?Object.freeze({length:0,item:e=>null}):e.files},get types(){return e.types},setDragImage:(t,n,r)=>{var s;xT(o)&&(s={image:t,x:n,y:r},o[iT]=s,e.setDragImage(t,n,r))},getData:t=>ET(o)?"":e.getData(t),setData:(t,n)=>{xT(o)&&e.setData(t,n)},clearData:t=>{xT(o)&&e.clearData(t)}};return vT(o),o},NT=e=>{const t=ST(),n=(e=>{const t=e;return U.from(t[pT])})(e);return yT(e),cT(t),t.dropEffect=e.dropEffect,t.effectAllowed=e.effectAllowed,(e=>{const t=e;return U.from(t[iT])})(e).each((e=>t.setDragImage(e.image,e.x,e.y))),K(e.types,(n=>{"Files"!==n&&t.setData(n,e.getData(n))})),K(e.files,(e=>t.items.add(e))),(e=>{const t=e;return U.from(t[lT])})(e).each((e=>{((e,t)=>{dT(t)(e)})(t,e)})),n.each((n=>{bT(e,n),bT(t,n)})),t},RT=(e,t)=>e.setData("text/html",t),AT="x-tinymce/html",DT=A(AT),TT="\x3c!-- x-tinymce/html --\x3e",OT=e=>TT+e,BT=e=>-1!==e.indexOf(TT),PT=(e,t,n)=>{const o=e.split(/\n\n/),r=((e,t)=>{let n="<"+e;const o=xe(t,((e,t)=>t+'="'+ia.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("")},LT="%MCEPASTEBIN%",MT=e=>e.dom.get("mcepastebin"),IT=e=>x(e)&&"mcepastebin"===e.id,FT=e=>e===LT,UT=e=>{const t=Za(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"},LT);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(MT(e)){let o;const r=t.get();for(;o=MT(e);)n.remove(o),n.unbind(o);r&&e.selection.setRng(r)}t.set(null)})(e,t),getEl:()=>MT(e),getHtml:()=>(e=>{const t=e.dom,n=(e,n)=>{e.appendChild(n),t.remove(n,!0)},[o,...r]=X(e.getBody().childNodes,IT);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}},zT=(e,t)=>(Pt.each(t,(t=>{e=f(t,RegExp)?e.replace(t,""):e.replace(t[0],t[1])})),e),jT=e=>e=zT(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?vr:" "],/<br class="Apple-interchange-newline">/g,/<br>$/i]),HT=(e,t)=>({content:e,cancelled:t}),$T=(e,t,n)=>{const o=((e,t,n)=>e.dispatch("PastePreProcess",{content:t,internal:n}))(e,t,n),r=((e,t)=>{const n=Ow({sanitize:Nc(e),sandbox_iframes:Pc(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 HT(r.node.innerHTML,r.isDefaultPrevented())})(e,r,n):HT(r,o.isDefaultPrevented())},qT=(e,t)=>(e.insertContent(t,{merge:pc(e),paste:!0}),!0),VT=e=>/^https?:\/\/[\w\-\/+=.,!;:&%@^~(){}?#]+$/i.test(e),WT=(e,t,n)=>!(e.selection.isCollapsed()||!VT(t))&&((e,t,n)=>(e.undoManager.extra((()=>{n(e,t)}),(()=>{e.execCommand("mceInsertLink",!1,t)})),!0))(e,t,n),KT=(e,t,n)=>!!((e,t)=>VT(t)&&V(Ac(e),(e=>Ve(t.toLowerCase(),`.${e.toLowerCase()}`))))(e,t)&&((e,t,n)=>(e.undoManager.extra((()=>{n(e,t)}),(()=>{e.insertContent('<img src="'+t+'">')})),!0))(e,t,n),YT=(e,t,n)=>{n||!hc(e)?qT(e,t):((e,t)=>{Pt.each([WT,KT,qT],(n=>!n(e,t,qT)))})(e,t)},GT=(e=>{let t=0;return()=>e+t++})("mceclip"),XT=e=>{const t=ST();return RT(t,e),yT(t),t},QT=(e,t,n,o,r)=>{const s=((e,t,n)=>$T(e,t,n))(e,t,n);if(!s.cancelled){const t=s.content,n=()=>YT(e,t,o);if(r){$A(e,"insertFromPaste",{dataTransfer:XT(t)}).isDefaultPrevented()||(n(),HA(e,"insertFromPaste"))}else n()}},JT=(e,t,n,o)=>{const r=n||BT(t);QT(e,(e=>e.replace(TT,""))(t),r,!1,o)},ZT=(e,t,n)=>{const o=e.dom.encode(t).replace(/\r\n/g,"\n"),r=cs(o,vc(e)),s=PT(r,Ql(e),Jl(e));QT(e,s,!1,!0,n)},eO=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},tO=(e,t)=>t in e&&e[t].length>0,nO=e=>tO(e,"text/html")||tO(e,"text/plain"),oO=(e,t,n,o)=>{const r=GT(),s=sd(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},rO=e=>{const t=Ac(e);return e=>qe(e.type,"image/")&&V(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))},sO=(e,t,n)=>{const o="paste"===t.type?t.clipboardData:t.dataTransfer;var r;if(dc(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,rO(e))})(e,o);if(s.length>0)return t.preventDefault(),(r=s,Promise.all(W(r,(e=>aC(e).then((t=>({file:e,uri:t}))))))).then((t=>{n&&e.selection.setRng(n),K(t,(t=>{((e,t)=>{oC(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:oO(e,i,a,s);JT(e,`<img src="${d.blobUri()}">`,!1,!0)}))})(e,t)}))})),!0}return!1},aO=(e,t,n,o,r)=>{let s=jT(n);const a=tO(t,DT())||BT(n),i=!a&&(e=>!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(e))(s),l=VT(s);(FT(s)||!s.length||i&&!l)&&(o=!0),(o||l)&&(s=tO(t,"text/plain")&&i?t["text/plain"]:(e=>{const t=ya(),n=Ow({},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=zT(e,[/<!\[[^\]]+\]>/g]),i(n.parse(e)),o})(s)),FT(s)||(o?ZT(e,s,r):JT(e,s,a,r))},iO=(e,t,n)=>{let o;e.on("keydown",(e=>{(e=>Df.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=eO(r.clipboardData);!nO(a)&&sO(e,r,t.getLastRng()||e.selection.getRng())||(tO(a,"text/html")?(r.preventDefault(),aO(e,a,a["text/html"],s,!0)):tO(a,"text/plain")&&tO(a,"text/uri-list")?(r.preventDefault(),aO(e,a,a["text/plain"],s,!0)):(t.create(),Yg.setEditorTimeout(e,(()=>{const n=t.getHtml();t.remove(),aO(e,a,n,s,!1)}),0)))}))},lO=(e,t,n)=>{iO(e,t,n),(e=>{const t=e=>qe(e,"webkit-fake-url"),n=e=>qe(e,"data:");e.parser.addNodeFilter("img",((o,r,s)=>{if(!dc(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)||!yc(e)&&n(o))&&r.remove()}}))})(e)},dO=(e,t)=>{e.addCommand("mceTogglePlainTextPaste",(()=>{((e,t)=>{"text"===t.get()?(t.set("html"),Af(e,!1)):(t.set("text"),Af(e,!0)),e.focus()})(e,t)})),e.addCommand("mceInsertClipboardContent",((t,n)=>{n.html&&JT(e,n.html,n.internal,!1),n.text&&ZT(e,n.text,!1)}))},cO=(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(DT(),t),!0}catch(e){return!1}})(e.clipboardData,t.html,t.text)?(e.preventDefault(),o()):n(t.html,o)},mO=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),Yg.setEditorTimeout(e,(()=>{r.setRng(i),o.remove(s),n()}),0)},uO=e=>({html:OT(e.selection.getContent({contextual:!0})),text:e.selection.getContent({format:"text"})}),fO=e=>!e.selection.isCollapsed()||(e=>!!e.dom.getParent(e.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",e.getBody()))(e),gO=e=>{e.on("cut",(e=>t=>{!t.isDefaultPrevented()&&fO(e)&&e.selection.isEditable()&&cO(t,uO(e),mO(e),(()=>{if(Dt.browser.isChromium()||Dt.browser.isFirefox()){const t=e.selection.getRng();Yg.setEditorTimeout(e,(()=>{e.selection.setRng(t),e.execCommand("Delete")}),0)}else e.execCommand("Delete")}))})(e)),e.on("copy",(e=>t=>{!t.isDefaultPrevented()&&fO(e)&&cO(t,uO(e),mO(e),S)})(e))},pO=(e,t)=>{var n,o;return ug.getCaretRangeFromPoint(null!==(n=t.clientX)&&void 0!==n?n:0,null!==(o=t.clientY)&&void 0!==o?o:0,e.getDoc())},hO=(e,t)=>{e.focus(),t&&e.selection.setRng(t)},bO=(e,t)=>{lc(e)&&e.on("dragend dragover draggesture dragdrop drop drag",(e=>{e.preventDefault(),e.stopPropagation()})),dc(e)||e.on("drop",(e=>{const t=e.dataTransfer;t&&(e=>V(e.files,(e=>/^image\//.test(e.type))))(t)&&e.preventDefault()})),e.on("drop",(n=>{if(n.isDefaultPrevented())return;const o=pO(e,n);if(w(o))return;const r=eO(n.dataTransfer),s=tO(r,DT());if((!nO(r)||(e=>{const t=e["text/plain"];return!!t&&0===t.indexOf("file://")})(r))&&sO(e,n,o))return;const a=r[DT()],i=a||r["text/html"]||r["text/plain"],l=((e,t,n,o)=>{const r=e.getParent(n,(e=>Ls(t,e)));if(!v(e.getParent(n,"summary")))return!0;if(r&&ke(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),d=t.get();d&&!l||i&&(n.preventDefault(),Yg.setEditorTimeout(e,(()=>{e.undoManager.transact((()=>{(a||d&&l)&&e.execCommand("Delete"),hO(e,o);const t=jT(i);r["text/html"]?JT(e,t,s,!0):ZT(e,t,!0)}))})))})),e.on("dragstart",(e=>{t.set(!0)})),e.on("dragover dragend",(n=>{dc(e)&&!t.get()&&(n.preventDefault(),hO(e,pO(e,n))),"dragend"===n.type&&t.set(!1)})),(e=>{e.on("input",(t=>{const n=e=>v(e.querySelector("summary"));if("deleteByDrag"===t.inputType){const t=X(e.dom.select("details"),n);K(t,(t=>{ir(t.firstChild)&&t.firstChild.remove();const n=e.dom.create("summary");n.appendChild(Or().dom),t.prepend(n)}))}}))})(e)},vO=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,yO=e=>Pt.trim(e).replace(vO,Aa).toLowerCase(),CO=(e,t,n)=>{const o=fc(e);if(n||"all"===o||!gc(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=yO(s),a=yO(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},wO=e=>{const t=Za(!1),n=Za(bc(e)?"text":"html"),o=UT(e);(e=>{(Dt.browser.isChromium()||Dt.browser.isSafari())&&((e,t)=>{e.on("PastePreProcess",(n=>{n.content=t(e,n.content,n.internal)}))})(e,CO)})(e),dO(e,n),(e=>{const t=t=>n=>{t(e,n)},n=cc(e);E(n)&&e.on("PastePreProcess",t(n));const o=mc(e);E(o)&&e.on("PastePostProcess",t(o))})(e),e.on("PreInit",(()=>{gO(e),bO(e,t),lO(e,o,n)}))},xO=e=>{(e=>{e.on("click",(t=>{e.dom.getParent(t.target,"details")&&t.preventDefault()}))})(e),(e=>{e.parser.addNodeFilter("details",(t=>{const n=Tc(e);K(t,(e=>{"expanded"===n?e.attr("open","open"):"collapsed"===n&&e.attr("open",null)}))})),e.serializer.addNodeFilter("details",(t=>{const n=Oc(e);K(t,(e=>{"expanded"===n?e.attr("open","open"):"collapsed"===n&&e.attr("open",null)}))}))})(e)},EO=ir,_O=tr,kO=e=>cr(e.dom),SO=e=>t=>En(yn.fromDom(e),t),NO=(e,t,n)=>Qn(yn.fromDom(e),(e=>(e=>dr(e.dom))(e)||n.isBlock(qt(e))),SO(t)).getOr(yn.fromDom(t)).dom,RO=(e,t)=>Qn(yn.fromDom(e),kO,SO(t)),AO=(e,t,n)=>{const o=new Ho(e,t),r=n?o.next.bind(o):o.prev.bind(o);let s=e;for(let t=n?e:r();t&&!EO(t);t=r())os(t)&&(s=t);return s},DO=e=>{const t=((e,t,n)=>{const o=rl.fromRangeStart(e).getNode(),r=NO(o,t,n),s=AO(o,r,!1),a=AO(o,r,!0),i=document.createRange();return RO(s,r).fold((()=>{_O(s)?i.setStart(s,0):i.setStartBefore(s)}),(e=>i.setStartBefore(e.dom))),RO(a,r).fold((()=>{_O(a)?i.setEnd(a,a.data.length):i.setEndAfter(a)}),(e=>i.setEndAfter(e.dom))),i})(e.selection.getRng(),e.getBody(),e.schema);e.selection.setRng(bv(t))};var TO;!function(e){e.Before="before",e.After="after"}(TO||(TO={}));const OO=(e,t)=>Math.abs(e.left-t),BO=(e,t)=>Math.abs(e.right-t),PO=(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},LO=(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}=G(e,(e=>PO(e,t)));return[n,o]})),MO=(e,t,n)=>t>e.left&&t<e.right?0:Math.min(Math.abs(e.left-t),Math.abs(e.right-t)),IO=(e,t,n,o)=>{const r=e=>os(e.node)?U.some(e):Vo(e.node)?IO(ue(e.node.childNodes),t,n,!1):U.none(),s=(e,s)=>{const a=le(e,((e,o)=>s(e,t,n)-s(o,t,n)));return fe(a,r).map((e=>o&&!tr(e.node)&&a.length>1?((e,o,s)=>r(o).filter((o=>Math.abs(s(e,t,n)-s(o,t,n))<2&&tr(o.node))))(e,a[1],s).getOr(e):e))},[a,i]=LO(Ak(e),n),{pass:l,fail:d}=G(i,(e=>e.top<n));return s(a,MO).orThunk((()=>s(d,Li))).orThunk((()=>s(l,Li)))},FO=(e,t,n)=>{const o=yn.fromDom(e),r=Sn(o),s=yn.fromPoint(r,t,n).filter((e=>_n(o,e))).getOr(o);return((e,t,n,o)=>{const r=(t,s)=>{const a=X(t.dom.childNodes,B((e=>Vo(e)&&e.classList.contains("mce-drag-container"))));return s.fold((()=>IO(a,n,o,!0)),(e=>{const t=X(a,(t=>t!==e.dom));return IO(t,n,o,!0)})).orThunk((()=>(En(t,e)?U.none():An(t)).bind((e=>r(e,U.some(t))))))};return r(t,U.none())})(o,s,t,n)},UO=(e,t,n)=>FO(e,t,n).filter((e=>Jc(e.node))).map((e=>((e,t)=>({node:e.node,position:OO(e,t)<BO(e,t)?TO.Before:TO.After}))(e,t))),zO=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}},jO=(e,t)=>{return n=(e=>e.inline?zO(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=zO(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},HO=e=>({target:e,srcElement:e}),$O=(e,t,n,o)=>{const r=((e,t)=>{const n=NT(e);return"dragstart"===t?(cT(n),vT(n)):"drop"===t?(mT(n),yT(n)):(uT(n),CT(n)),n})(n,e);return C(o)?((e,t,n)=>{const o=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,timeStamp:0,type:e,composedPath:o,initEvent:o,preventDefault:S,stopImmediatePropagation:S,stopPropagation:S,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:o,initMouseEvent:o,getModifierState:o,dataTransfer:n,...HO(t)}})(e,t,r):((e,t,n,o)=>({...t,dataTransfer:o,type:e,...HO(n)}))(e,o,t,r)},qO=cr,VO=((...e)=>t=>{for(let n=0;n<e.length;n++)if(e[n](t))return!0;return!1})(qO,dr),WO=(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},KO=(e,t)=>n=>()=>{const o="left"===e?n.scrollX:n.scrollY;n.scroll({[e]:o+t,behavior:"smooth"})},YO=KO("left",-32),GO=KO("left",32),XO=KO("top",-32),QO=KO("top",32),JO=e=>{e&&e.parentNode&&e.parentNode.removeChild(e)},ZO=(e,t)=>n=>{if((e=>0===e.button)(n)){const o=ee(t.dom.getParents(n.target),VO).getOr(null);if(x(o)&&((e,t,n)=>qO(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,dataTransfer:ST(),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:WO(t,o,o.offsetWidth,o.offsetHeight),intervalId:si(100)})}}},eB=(e,t,n,o,r)=>{"dragstart"===t&&RT(o,e.dom.getOuterHTML(n));const s=$O(t,n,o,r);return e.dispatch(t,s)},tB=(e,t)=>{const n=ii(((e,n)=>((e,t,n)=>{e._selectionOverrides.hideFakeCaret(),UO(e.getBody(),t,n).fold((()=>e.selection.placeCaretAt(t,n)),(o=>{const r=e._selectionOverrides.showCaret(1,o.node,o.position===TO.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){const n=eB(t,"dragstart",e.element,e.dataTransfer,r);if(x(n.dataTransfer)&&(e.dataTransfer=n.dataTransfer),n.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,jO(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(QO(d)):a-8<=0?e.intervalId.set(XO(d)):i+8>=p?e.intervalId.set(GO(d)):i-8<=0?e.intervalId.set(YO(d)):h+16>=window.innerHeight?e.intervalId.set(QO(window)):h-16<=0?e.intervalId.set(XO(window)):b+16>=window.innerWidth?e.intervalId.set(GO(window)):b-16<=0&&e.intervalId.set(YO(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}))},nB=(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 tr(e)?e.parentNode:e}return null})(t.selection),e.element)){const r=null!==(o=t.getDoc().elementFromPoint(n.clientX,n.clientY))&&void 0!==o?o:t.getBody();eB(t,"drop",r,e.dataTransfer,n).isDefaultPrevented()||t.undoManager.transact((()=>{((e,t)=>{const n=e.getParent(t.parentNode,e.isBlock);JO(t),n&&n!==e.getRoot()&&e.isEmpty(n)&&Br(yn.fromDom(n))})(t.dom,e.element),(e=>{const t=e.getData("text/html");return""===t?U.none():U.some(t)})(e.dataTransfer).each((e=>t.insertContent(e))),t._selectionOverrides.hideFakeCaret()}))}eB(t,"dragend",t.getBody(),e.dataTransfer,n)}})),rB(e)},oB=(e,t,n)=>{e.on((e=>{e.intervalId.clear(),e.dragging&&n.fold((()=>eB(t,"dragend",e.element,e.dataTransfer)),(n=>eB(t,"dragend",e.element,e.dataTransfer,n)))})),rB(e)},rB=e=>{e.on((e=>{e.intervalId.clear(),JO(e.ghost)})),e.clear()},sB=e=>{const t=ai(),n=Xa.DOM,o=document,r=ZO(t,e),s=tB(t,e),a=nB(t,e),i=((e,t)=>n=>oB(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===Df.ESC&&oB(t,e,U.none())}))},aB=e=>{sB(e),Qd(e)&&(e=>{const t=t=>{if(!t.isDefaultPrevented()){const n=t.dataTransfer;n&&(q(n.types,"Files")||n.files.length>0)&&(t.preventDefault(),"drop"===t.type&&gE(e,"Dropped file type is not supported"))}},n=n=>{Zg(e,n.target)&&t(n)},o=()=>{const o=Xa.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",(()=>{Yg.setEditorTimeout(e,o,0)}))})(e)},iB=cr,lB=(e,t)=>tv(e.getBody(),t),dB=e=>{const t=e.selection,n=e.dom,o=e.getBody(),r=Gc(e,o,n.isBlock,(()=>ip(e))),s="sel-"+n.uniqueId(),a="data-mce-selected";let i;const l=e=>e!==o&&(iB(e)||fr(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=lB(e,n);iB(o)?(t.preventDefault(),f_(e,o).each(p)):l(n)&&f_(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(!iE(e,r.clientX,r.clientY))return;h(),b();const a=lB(e,s);iB(a)?(r.preventDefault(),f_(e,a).each(p)):UO(o,r.clientX,r.clientY).each((n=>{r.preventDefault();(e=>{e&&t.setRng(e)})(d(1,n.node,n.position===TO.Before,!1)),Wo(a)?a.focus():e.getBody().focus()}))})),e.on("keypress",(e=>{Df.modifierPressed(e)||iB(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)||Vo(r=o)&&"mcepastebin"===r.id||b(),(e=>x(e)&&n.hasClass(e,"mce-offscreen-selection"))(o)||h()})),aB(e),(e=>{const t=ii((()=>{if(!e.removed&&e.getBody().contains(document.activeElement)){const t=e.selection.getRng();if(t.collapsed){const n=g_(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(fr(n)){const t=tv(e.getBody(),n),o=cr(t)?t:n;e.selection.getNode()!==o&&f_(e,o).each((t=>e.selection.setRng(t)))}}))}))})(e)},m=e=>jr(e)||Vr(e)||Wr(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 ke(o,s.nodeName.toLowerCase())?0===a?r.setStartBefore(s):r.setStartAfter(s):r.setStart(s,a),ke(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=yn.fromDom(e.getBody()),i=e.getDoc(),l=to(a,"#"+s).getOrThunk((()=>{const e=yn.fromHtml('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>',i);return en(e,"id",s),vo(a,e),e})),d=n.createRng();wo(l),Co(l,[yn.fromText(vr,i),yn.fromDom(r),yn.fromText(vr,i)]),d.setStart(l.dom.firstChild,1),d.setEnd(l.dom.lastChild,0),lo(l,{top:n.getPos(o,e.getBody()).y+"px"}),Lg(l);const c=t.getSel();return c&&(c.removeAllRanges(),c.addRange(d)),d})(o,l.targetClone),c=yn.fromDom(o);return K(zo(yn.fromDom(e.getBody()),"*[data-mce-selected]"),(e=>{En(c,e)||sn(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=xm(r,o,e),a=s.getNode(!t);if(x(a)){if(Jc(a))return d(r,a,!!t&&!s.isAtEnd(),!1);if(zr(a)&&cr(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(Jc(i))return d(r,i,!t&&!s.isAtEnd(),!1);if(zr(i)&&cr(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(tr(r)&&0===s&&iB(r.parentNode)&&(r=r.parentNode,s=n.nodeIndex(r),r=r.parentNode),!Vo(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),to(yn.fromDom(e.getBody()),"#"+s).each(xo),i=null},b=()=>{r.hide()};return bx(e)||c(),{showCaret:d,showBlockCaretContainer:e=>{e.hasAttribute("data-mce-caret")&&(Kr(e),t.scrollIntoView(e))},hideFakeCaret:b,destroy:()=>{r.destroy(),i=null}}},cB=(e,t)=>{let n=t;for(let t=e.previousSibling;tr(t);t=t.previousSibling)n+=t.data.length;return n},mB=(e,t,n,o,r)=>{if(tr(n)&&(o<0||o>n.data.length))return[];const s=r&&tr(n)?[cB(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():[]},uB=(e,t,n,o,r,s,a=!1)=>({start:mB(e,t,n,o,a),end:mB(e,t,r,s,a)}),fB=(e,t)=>{const n=t.slice(),o=n.pop();if(_(o)){return J(n,((e,t)=>e.bind((e=>U.from(e.childNodes[t])))),U.some(e)).bind((e=>tr(e)&&(o<0||o>e.data.length)?U.none():U.some({node:e,offset:o})))}return U.none()},gB=(e,t)=>fB(e,t.start).bind((({node:n,offset:o})=>fB(e,t.end).map((({node:e,offset:t})=>{const r=document.createRange();return r.setStart(n,o),r.setEnd(e,t),r})))),pB=(e,t,n)=>{if(t&&e.isEmpty(t)&&!n(t)){const o=t.parentNode;e.remove(t,tr(t.firstChild)&&is(t.firstChild.data)),pB(e,o,n)}},hB=(e,t,n,o=!0)=>{const r=t.startContainer.parentNode,s=t.endContainer.parentNode;t.deleteContents(),o&&!n(t.startContainer)&&(tr(t.startContainer)&&0===t.startContainer.data.length&&e.remove(t.startContainer),tr(t.endContainer)&&0===t.endContainer.data.length&&e.remove(t.endContainer),pB(e,r,n),r!==s&&pB(e,s,n))},bB=(e,t)=>U.from(e.dom.getParent(t.startContainer,e.dom.isBlock)),vB=(e,t,n)=>{const o=e.dynamicPatternsLookup({text:n,block:t});return{...e,blockPatterns:Pl(o).concat(e.blockPatterns),inlinePatterns:Ll(o).concat(e.inlinePatterns)}},yB=(e,t,n,o)=>{const r=e.createRng();return r.setStart(t,0),r.setEnd(n,o),r.toString()},CB=(e,t,n)=>{const o=((e,t,n)=>{if(tr(e)&&t>=e.length)return U.some(HN(e,t));{const o=Ri($N);return U.from(o.forwards(e,t,qN(e),n)).map((e=>HN(e.container,0)))}})(t,0,t);o.each((o=>{const r=o.container;KN(r,n.start.length,t).each((n=>{const o=e.createRng();o.setStart(r,0),o.setEnd(n.container,n.offset),hB(e,o,(e=>e===t))}));const s=yn.fromDom(r),a=wr(s);/^\s[^\s]/.test(a)&&((e,t)=>{Cr.set(e,t)})(s,a.slice(1))}))},wB=(e,t)=>{const n=e.dom,o=t.pattern,r=gB(n.getRoot(),t.range).getOrDie("Unable to resolve path range");return bB(e,r).each((t=>{"block-format"===o.type?((e,t)=>{const n=t.get(e);return b(n)&&ce(n).exists((e=>ke(e,"block")))})(o.format,e.formatter)&&e.undoManager.transact((()=>{CB(e.dom,t,o),e.formatter.apply(o.format)})):"block-command"===o.type&&e.undoManager.transact((()=>{CB(e.dom,t,o),e.execCommand(o.cmd,!1,o.value)}))})),!0},xB=(e,t)=>{const n=(e=>le(e,((e,t)=>t.start.length-e.start.length)))(e),o=t.replace(vr," ");return ee(n,(e=>0===t.indexOf(e.start)||0===o.indexOf(e.start)))},EB=(e,t)=>e.create("span",{"data-mce-type":"bookmark",id:t}),_B=(e,t)=>{const n=e.createRng();return n.setStartAfter(t.start),n.setEndBefore(t.end),n},kB=(e,t,n)=>{const o=gB(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(EB(e,t+"-end"),a),start:l.insertBefore(EB(e,t+"-start"),i)}},SB=(e,t,n)=>{pB(e,e.get(t.prefix+"-end"),n),pB(e,e.get(t.prefix+"-start"),n)},NB=e=>0===e.start.length,RB=(e,t,n,o)=>{const r=t.start;var s;return YN(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 WN(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((()=>RB(e,t,n,HN(o.container,0))))}}))},AB=(e,t,n,o)=>{const r=e.dom,s=r.getRoot(),a=n.pattern,i=n.position.container,l=n.position.offset;return WN(i,l-n.pattern.end.length,t).bind((d=>{const c=uB(r,s,d.container,d.offset,i,l,o);if(NB(a))return U.some({matches:[{pattern:a,startRng:c,endRng:c}],position:d});{const i=DB(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 VN(n,o,r).bind((n=>RB(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)=>uB(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:HN(e.startContainer,e.startOffset)}}))}}))},DB=(e,t,n,o,r,s)=>{const a=e.dom;return VN(n,o,a.getRoot()).bind((i=>{const l=yB(a,r,n,o);for(let a=0;a<t.length;a++){const d=t[a];if(!Ve(l,d.end))continue;const c=t.slice();c.splice(a,1);const m=AB(e,r,{pattern:d,remainingPatterns:c,position:i},s);if(m.isNone()&&o>0)return DB(e,t,n,o-1,r,s);if(m.isSome())return m}return U.none()}))},TB=(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)},OB=(e,t,n,o,r,s)=>{var a;return((e,t)=>{const n=re(e,(e=>V(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})(DB(e,r.inlinePatterns,n,o,t,s).fold((()=>[]),(e=>e.matches)),DB(e,(a=r.inlinePatterns,le(a,((e,t)=>t.end.length-e.end.length))),n,o,t,s).fold((()=>[]),(e=>e.matches)))},BB=(e,t)=>{if(0===t.length)return;const n=e.dom,o=e.selection.getBookmark(),r=((e,t)=>{const n=xi("mce_textpattern"),o=Q(t,((t,o)=>{const r=kB(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=NB(r.pattern)?r.endMarker:kB(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;NB(t.pattern)?((e,t,n,o)=>{const r=_B(e.dom,n);hB(e.dom,r,o),TB(e,t,r)})(e,t.pattern,t.endMarker,r):((e,t,n,o,r)=>{const s=e.dom,a=_B(s,o),i=_B(s,n);hB(s,i,r),hB(s,a,r);const l={prefix:n.prefix,start:n.end,end:o.start},d=_B(s,l);TB(e,t,d)})(e,t.pattern,t.startMarker,t.endMarker,r),SB(n,t.endMarker,r),SB(n,t.startMarker,r)})),e.selection.moveToBookmark(o)},PB=(e,t)=>{const n=e.selection.getRng();return bB(e,n).map((o=>{var r;const s=Math.max(0,n.startOffset),a=vB(t,o,null!==(r=o.textContent)&&void 0!==r?r:""),i=OB(e,o,n.startContainer,s,a,!0),l=((e,t,n,o)=>{var r;const s=e.dom,a=Ql(e);if(!s.is(t,a))return[];const i=null!==(r=t.textContent)&&void 0!==r?r:"";return xB(n.blockPatterns,i).map((e=>Pt.trim(i).length===e.start.length?[]:[{pattern:e,range:uB(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=>{e.insertContent(Pr,{preserve_zwsp:!0})})(e),BB(e,i),((e,t)=>{if(0===t.length)return;const n=e.selection.getBookmark();K(t,(t=>wB(e,t))),e.selection.moveToBookmark(n)})(e,l);const t=e.selection.getRng(),n=VN(t.startContainer,t.startOffset,e.dom.getRoot());e.execCommand("mceInsertNewLine"),n.each((t=>{const n=t.container;n.data.charAt(t.offset-1)===br&&(n.deleteData(t.offset-1,1),pB(e.dom,n.parentNode,(t=>t===e.dom.getRoot())))}))})),!0)})).getOr(!1)},LB=(e,t,n)=>{for(let o=0;o<e.length;o++)if(n(e[o],t))return!0;return!1},MB=e=>{const t=[",",".",";",":","!","?"],n=[32],o=()=>{return t=Cc(e),n=wc(e),{inlinePatterns:Ll(t),blockPatterns:Pl(t),dynamicPatternsLookup:n};var t,n},r=()=>(e=>e.options.isSet("text_patterns_lookup"))(e);e.on("keydown",(t=>{if(13===t.keyCode&&!Df.modifierPressed(t)&&e.selection.isCollapsed()){const n=o();(n.inlinePatterns.length>0||n.blockPatterns.length>0||r())&&PB(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();bB(e,n).map((o=>{const r=Math.max(0,n.startOffset-1),s=yB(e.dom,o,n.startContainer,r),a=vB(t,o,s),i=OB(e,o,n.startContainer,r,a,!1);i.length>0&&e.undoManager.transact((()=>{BB(e,i)}))}))})(e,t)}};e.on("keyup",(e=>{LB(n,e,((e,t)=>e===t.keyCode&&!Df.modifierPressed(t)))&&s()})),e.on("keypress",(n=>{LB(t,n,((e,t)=>e.charCodeAt(0)===t.charCode))&&Yg.setEditorTimeout(e,s)}))},IB=e=>{const t=Pt.each,n=Df.BACKSPACE,o=Df.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(),p=()=>{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&&!ys(yn.fromDom(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()}}))},h=()=>{e.shortcuts.add("meta+a",null,"SelectAll")},b=()=>{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(jr(n.startContainer))return;s.placeCaretAt(t.clientX,t.clientY)}else s.setRng(n)}))},v=()=>{Range.prototype.getClientRects||e.on("mousedown",(t=>{if(!f(t)&&"HTML"===t.target.nodeName){const t=e.getBody();t.blur(),Yg.setEditorTimeout(e,(()=>{t.focus()}))}}))},y=()=>{const t=ec(e);e.on("click",(n=>{const o=n.target;/^(IMG|HR)$/.test(o.nodeName)&&r.isEditable(o)&&(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))}))},C=()=>{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}))},w=()=>{const t=()=>{u("StyleWithCSS",!1),u("enableInlineTableEditing",!1),_d(e)||u("enableObjectResizing",!1)};Wd(e)||e.on("BeforeExecCommand mousedown",t)},x=()=>{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})}}))}))},E=()=>{e.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")},_=()=>{e.inline||e.on("keydown",(()=>{document.activeElement===document.body&&e.getWin().focus()}))},k=()=>{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())})))},N=()=>{m&&e.on("keydown",(t=>{if(Df.metaKeyPressed(t)&&!t.shiftKey&&(37===t.keyCode||39===t.keyCode)){t.preventDefault();e.selection.getSel().modify("move",37===t.keyCode?"backward":"forward","lineboundary")}}))},R=()=>{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}")},A=()=>{e.on("init",(()=>{e.dom.bind(e.getBody(),"submit",(e=>{e.preventDefault()}))}))},D=S,T=()=>{e.on("keydown",(t=>{if(f(t)||t.keyCode!==Df.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))}})),p(),Dt.windowsPhone||e.on("keyup focusin mouseup",(t=>{Df.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&&(b(),y(),e.on("init",(()=>{u("DefaultParagraphSeparator",Ql(e))})),A(),C(),a.addNodeFilter("br",(e=>{let t=e.length;for(;t--;)"Apple-interchange-newline"===e[t].attr("class")&&e[t].remove()})),c?(_(),k(),R()):h()),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())}}})),v(),(()=>{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();Yg.setEditorTimeout(e,(()=>{t()}))}}))})(),w(),x(),E(),N(),C(),e.on("drop",(t=>{var n;const o=null===(n=t.dataTransfer)||void 0===n?void 0:n.getData("text/html");g(o)&&/^<img[^>]*>$/.test(o)&&e.dispatch("dragend",new window.DragEvent("dragend",t))})))};return bx(e)?(d&&(b(),y(),A(),h(),c&&(_(),k(),R())),l&&(v(),w(),E(),N())):T(),{refreshContentEditable:D,isHidden:()=>{if(!l||e.removed)return!1;const t=e.selection.getSel();return!t||!t.rangeCount||0===t.rangeCount}}},FB=Xa.DOM,UB=e=>e.inline?e.getElement().nodeName.toLowerCase():void 0,zB=e=>we(e,(e=>!1===C(e))),jB=e=>{const t=e.options.get,n=e.editorUpload.blobCache;return zB({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_unsafe_embeds:t("convert_unsafe_embeds"),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"),inline_styles:t("inline_styles"),root_name:UB(e),sandbox_iframes:t("sandbox_iframes"),sanitize:t("xss_sanitization"),validate:!0,blob_cache:n,document:e.getDoc()})},HB=e=>{const t=e.options.get;return zB({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")})},$B=e=>{e.bindPendingEventDelegates(),e.initialized=!0,(e=>{e.dispatch("Init")})(e),e.focus(!0),(e=>{const t=e.dom.getRoot();e.inline||ku(e)&&e.selection.getStart(!0)!==t||Ym(t).each((t=>{const n=t.getNode(),o=Jo(n)?Ym(n).getOr(t):t;e.selection.setRng(o.toRange())}))})(e),e.nodeChanged({initial:!0});const t=oc(e);E(t)&&t.call(e,e),(e=>{const t=sc(e);t&&Yg.setEditorTimeout(e,(()=>{let n;n=!0===t?e:e.editorManager.get(t),n&&!n.destroyed&&(n.focus(),n.selection.scrollIntoView())}),100)})(e)},qB=e=>e.inline?e.ui.styleSheetLoader:e.dom.styleSheetLoader,VB=e=>{const t=qB(e),n=wd(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{pass:o,fail:r}=G(t,(e=>tinymce.Resource.has(vE(e)))),s=o.map((t=>{const n=tinymce.Resource.get(vE(t));return g(n)?Promise.resolve(qB(e).loadRawCss(t,n)):Promise.resolve()})),a=[...s,qB(e).loadAll(r)];return e.inline?a:a.concat([e.ui.styleSheetLoader.loadAll(n)])})(e,o,n)).then(s).catch(s),i=Cd(e);return i&&((e,t)=>{const n=yn.fromDom(e.getBody()),o=qn($n(n)),r=yn.fromTag("style");en(r,"type","text/css"),vo(r,yn.fromText(t)),vo(o,r),e.on("remove",(()=>{xo(r)}))})(e,i),a},WB=e=>{!0!==e.removed&&((e=>{bx(e)||e.load({initial:!0,format:"html"}),e.startContent=e.getContent({format:"raw"})})(e),$B(e))},KB=e=>{const t=e.getElement();let n=e.getDoc();e.inline&&(FB.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=Wd(e),e._editableRoot=Kd(e),!e.readonly&&e.hasEditableRoot()&&(e.inline&&"static"===FB.getStyle(o,"position",!0)&&(o.style.position="relative"),o.contentEditable="true"),o.disabled=!1,e.editorUpload=AE(e),e.schema=ya(HB(e)),e.dom=Xa(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:fd(e),referrerPolicy:gd(e),onSetAttrib:t=>{e.dispatch("SetAttrib",t)},force_hex_color:Bc(e)}),e.parser=(e=>{const t=Ow(jB(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)}})),kc(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 Np("br",1))}})),t})(e),e.serializer=Px((e=>{const t=e.options.get;return{...jB(e),...HB(e),...zB({remove_trailing_brs:t("remove_trailing_brs"),pad_empty_with_br:t("pad_empty_with_br"),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=Ax(e.dom,e.getWin(),e.serializer,e),e.annotator=wf(e),e.formatter=jE(e),e.undoManager=$E(e),e._nodeChangeDispatcher=new aT(e),e._selectionOverrides=dB(e),BS(e),xO(e),HS(e),bx(e)||((e=>{e.on("mousedown",(t=>{t.detail>=3&&(t.preventDefault(),DO(e))}))})(e),(e=>{MB(e)})(e));const r=sT(e);TS(e,r),(e=>{e.on("NodeChange",O(FS,e))})(e),YE(e),wO(e);const s=vx(e);(e=>{const t=e.getDoc(),n=e.getBody();(e=>{e.dispatch("PreInit")})(e),ac(e)||(t.body.spellcheck=!1,FB.setAttrib(n,"spellcheck","false")),e.quirks=IB(e),(e=>{e.dispatch("PostRender")})(e);const o=xd(e);void 0!==o&&(n.dir=o);const r=ic(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((()=>{const t=(e=>{let t=!1;const n=setTimeout((()=>{t||e.setProgressState(!0)}),500);return()=>{clearTimeout(n),t=!0,e.setProgressState(!1)}})(e);VB(e).then((()=>{WB(e),t()}))}),(t=>{e.setProgressState(!0),VB(e).then((()=>{t().then((t=>{e.setProgressState(!1),WB(e),wx(e)}),(t=>{e.notificationManager.open({type:"error",text:String(t)}),WB(e),wx(e)}))}))}))},YB=F,GB=Xa.DOM,XB=(e,t)=>{const n=e.translate("Rich Text Area"),o=on(yn.fromDom(e.getElement()),"tabindex").bind(Je),r=((e,t,n,o)=>{const r=yn.fromTag("iframe");return o.each((e=>en(r,"tabindex",e))),tn(r,n),tn(r,{id:e+"_ifr",frameBorder:"0",allowTransparency:"true",title:t}),fn(r,"tox-edit-area__iframe"),r})(e.id,n,ql(e),o).dom;r.onload=()=>{r.onload=null,e.dispatch("load")},e.contentAreaContainer=t.iframeContainer,e.iframeElement=r,e.iframeHTML=(e=>{let t=Vl(e)+"<html><head>";Wl(e)!==e.documentBaseUrl&&(t+='<base href="'+e.documentBaseURI.getURI()+'" />'),t+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';const n=Kl(e),o=Yl(e),r=e.translate(tc(e));return Gl(e)&&(t+='<meta http-equiv="Content-Security-Policy" content="'+Gl(e)+'" />'),t+=`</head><body id="${n}" class="mce-content-body ${o}" data-id="${e.id}" aria-label="${r}"><br></body></html>`,t})(e),GB.add(t.iframeContainer,r)},QB=e=>{const t=e.iframeElement,n=()=>{e.contentDocument=t.contentDocument,KB(e)};if(Rc(e)||Dt.browser.isFirefox()){const t=e.getDoc();t.open(),t.write(e.iframeHTML),t.close(),n()}else{const r=(o=yn.fromDom(t),Ro(o,"load",YB,(()=>{r.unbind(),n()})));t.srcdoc=e.iframeHTML}var o},JB=Xa.DOM,ZB=(e,t,n)=>{const o=cE.get(n),r=cE.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,E(s.init)&&(s.init(e,r),t.push(n))}catch(t){((e,t,n)=>{const o=oi.translate(["Failed to initialize plugin: {0}",t]);_f(e,"PluginLoadError",{message:o}),bE(o,n),gE(e,o)})(e,n,t)}}},eP=(e,t)=>({editorContainer:e,iframeContainer:t,api:{}}),tP=e=>{const t=e.getElement();return e.inline?eP(null):(e=>{const t=JB.create("div");return JB.insertAfter(t,e),eP(t,t)})(t)},nP=e=>{const t=e.getElement();return e.orgDisplay=t.style.display,g(Ad(e))?(e=>{const t=e.theme.renderUI;return t?t():tP(e)})(e):E(Ad(e))?(e=>{const t=e.getElement(),n=Ad(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):tP(e)},oP=async e=>{e.dispatch("ScriptsLoaded"),(e=>{const t=Pt.trim(id(e)),n=e.ui.registry.getAll().icons,o={...Zx.get("default").icons,...Zx.get(t).icons};he(o,((t,o)=>{ke(n,o)||e.ui.registry.addIcon(o,t)}))})(e),(e=>{const t=Ad(e);if(g(t)){const n=mE.get(t);e.theme=n(e,mE.urls[t])||{},E(e.theme.init)&&e.theme.init(e,mE.urls[t]||e.documentBaseUrl.replace(/\/$/,""))}else e.theme={}})(e),(e=>{const t=Td(e),n=eE.get(t);e.model=n(e,eE.urls[t])})(e),(e=>{const t=[];K(Gd(e),(n=>{ZB(e,t,(e=>e.replace(/^\-/,""))(n))}))})(e);const t=await nP(e);((e,t)=>{const n={show:U.from(t.show).getOr(S),hide:U.from(t.hide).getOr(S),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,CE(e),e.inline?KB(e):((e,t)=>{XB(e,t),t.editorContainer&&(t.editorContainer.style.display=e.orgDisplay,e.hidden=GB.isHidden(t.editorContainer)),e.getElement().style.display="none",GB.setAttrib(e.id,"aria-hidden","true"),e.getElement().style.visibility=e.orgVisibility,QB(e)})(e,{editorContainer:t.editorContainer,iframeContainer:t.iframeContainer})},rP=Xa.DOM,sP=e=>"-"===e.charAt(0),aP=(e,t)=>{const n=pd(t),o=hd(t);if(!oi.hasCode(n)&&"en"!==n){const r=Xe(o)?o:`${t.editorManager.baseURL}/langs/${n}.js`;e.add(r).catch((()=>{((e,t,n)=>{pE(e,"LanguageLoadError",hE("language",t,n))})(t,r,n)}))}},iP=(e,t)=>{const n=Ad(e);if(g(n)&&!sP(n)&&!ke(mE.urls,n)){const o=Dd(e),r=o?e.documentBaseURI.toAbsolute(o):`themes/${n}/theme${t}.js`;mE.load(n,r).catch((()=>{((e,t,n)=>{pE(e,"ThemeLoadError",hE("theme",t,n))})(e,r,n)}))}},lP=(e,t)=>{const n=Td(e);if("plugin"!==n&&!ke(eE.urls,n)){const o=Od(e),r=g(o)?e.documentBaseURI.toAbsolute(o):`models/${n}/model${t}.js`;eE.load(n,r).catch((()=>{((e,t,n)=>{pE(e,"ModelLoadError",hE("model",t,n))})(e,r,n)}))}},dP=(e,t,n)=>U.from(t).filter((e=>Xe(e)&&!Zx.has(e))).map((t=>({url:`${e.editorManager.baseURL}/icons/${t}/icons${n}.js`,name:U.some(t)}))),cP=(e,t,n)=>{const o=dP(t,"default",n),r=(e=>U.from(ld(e)).filter(Xe).map((e=>({url:e,name:U.none()}))))(t).orThunk((()=>dP(t,id(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)=>{pE(e,"IconsLoadError",hE("icons",t,n))})(t,n.url,n.name.getOrUndefined())}))}))},mP=(e,t)=>{const n=(t,n)=>{cE.load(t,n).catch((()=>{((e,t,n)=>{pE(e,"PluginLoadError",hE("plugin",t,n))})(e,n,t)}))};he(Xd(e),((t,o)=>{n(o,t),e.options.set("plugins",Gd(e).concat(o))})),K(Gd(e),(e=>{!(e=Pt.trim(e))||cE.urls[e]||sP(e)||n(e,`plugins/${e}/plugin${t}.js`)}))},uP=(e,t)=>{const n=Ja.ScriptLoader,o=()=>{!e.removed&&(e=>{const t=Ad(e);return!g(t)||x(mE.get(t))})(e)&&(e=>{const t=Td(e);return x(eE.get(t))})(e)&&oP(e)};iP(e,t),lP(e,t),aP(n,e),cP(n,e,t),mP(e,t),n.loadQueue().then(o,o)},fP=e=>{const t=e.id;oi.setCode(pd(e));const n=()=>{rP.unbind(window,"ready",n),e.render()};if(!za.Event.domLoaded)return void rP.bind(window,"ready",n);if(!e.getElement())return;const o=yn.fromDom(e.getElement()),r=an(o);e.on("remove",(()=>{Y(o.dom.attributes,(e=>sn(o,e.name))),tn(o,r)})),e.ui.styleSheetLoader=((e,t)=>$s.forElement(e,{contentCssCors:Yd(t),referrerPolicy:gd(t)}))(o,e),Ud(e)?e.inline=!0:(e.orgVisibility=e.getElement().style.visibility,e.getElement().style.visibility="hidden");const s=e.getElement().form||rP.getParent(t,"form");s&&(e.formElement=s,zd(e)&&!er(e.getElement())&&(rP.insertAfter(rP.create("input",{type:"hidden",name:t}),t),e.hasHiddenInput=!0),e.formEventDelegate=t=>{e.dispatch(t.type,t)},rP.bind(s,"submit reset",e.formEventDelegate),e.on("reset",(()=>{e.resetContent()})),!jd(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=uE(e),e.notificationManager=dE(e),(e=>"xml"===e.options.get("encoding"))(e)&&e.on("GetContent",(e=>{e.save&&(e.content=rP.encode(e.content))})),Hd(e)&&e.on("submit",(()=>{e.initialized&&e.save()})),$d(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),uP(e,e.suffix)},gP=Et().deviceType,pP=gP.isPhone(),hP=gP.isTablet(),bP=e=>{if(w(e))return[];{const t=b(e)?e:e.split(/[ ,]/),n=W(t,Ke);return X(n,Xe)}},vP=(e,t)=>{const n=((e,t)=>{const n={},o={};return Ce(e,t,ye(n),ye(o)),{t:n,f:o}})(t,((t,n)=>q(e,n)));return o=n.t,r=n.f,{sections:A(o),options:A(r)};var o,r},yP=(e,t)=>ke(e.sections(),t),CP=(e,t)=>({...{table_grid:!1,object_resizing:!1,resize:!1,toolbar_mode:_e(e,"toolbar_mode").getOr("scrolling"),toolbar_sticky:!1},...t?{menubar:!1}:{}}),wP=(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},xP=(e,t,n,o)=>{const r=bP(n.forced_plugins),s=bP(o.plugins),a=((e,t)=>yP(e,t)?e.sections()[t]:{})(t,"mobile"),i=((e,t,n,o)=>e&&yP(t,"mobile")?o:n)(e,t,s,a.plugins?bP(a.plugins):s),l=((e,t)=>[...bP(e),...bP(t)])(r,i);return Pt.extend(o,{forced_plugins:r,plugins:l})},EP=(e,t,n,o,r)=>{var s;const a=e?{mobile:CP(null!==(s=r.mobile)&&void 0!==s?s:{},t)}:{},i=vP(["mobile"],xR(a,r)),l=Pt.extend(n,o,i.options(),((e,t)=>e&&yP(t,"mobile"))(e,i)?((e,t,n={})=>{const o=e.sections(),r=_e(o,t).getOr({});return Pt.extend({},n,r)})(i,"mobile"):{},{external_plugins:wP(o,i.options())});return xP(e,i,o,l)},_P=(e,t)=>((e,t)=>Cx(e).editor.addVisual(t))(e,t),kP=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")})},SP=e=>{kP(e),(e=>{const t=t=>()=>{const n=e.selection,o=n.isCollapsed()?[e.dom.getParent(n.getNode(),e.dom.isBlock)]:n.getSelectedBlocks();return V(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)},NP=(e,t)=>{const n=e.selection,o=e.dom;return/^ | $/.test(t)?((e,t,n,o)=>{const r=yn.fromDom(e.getRoot());return n=Fh(r,rl.fromRangeStart(t),o)?n.replace(/^ /,"&nbsp;"):n.replace(/^&nbsp;/," "),Uh(r,rl.fromRangeEnd(t),o)?n.replace(/(&nbsp;| )(<br( \/)>)?$/,"&nbsp;"):n.replace(/&nbsp;(<br( \/)?>)?$/," ")})(o,n.getRng(),t,e.schema):t},RP=(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);Mw(e,{...o,content:NP(e,n),format:"html",set:!1,selection:!0}).each((t=>{const n=((e,t,n)=>yx(e).editor.insertContent(t,n))(e,t.content,o);Iw(e,n,t),e.addVisual()}))}},AP={"font-size":"size","font-family":"face"},DP=Jt("font"),TP=(e,t,n)=>Mv(yn.fromDom(n),(t=>(t=>uo(t,e).orThunk((()=>DP(t)?_e(AP,e).bind((e=>on(t,e))):U.none())))(t)),(e=>En(yn.fromDom(t),e))),OP=e=>(t,n)=>U.from(n).map(yn.fromDom).filter(Yt).bind((n=>TP(e,t,n.dom).or(((e,t)=>U.from(Xa.DOM.getStyle(t,e,!0)))(e,n.dom)))).getOr(""),BP=OP("font-size"),PP=N((e=>e.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")),OP("font-family")),LP=e=>Ym(e.getBody()).bind((e=>{const t=e.container();return U.from(tr(t)?t.parentNode:t)})),MP=(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(O(LP,e)).map(yn.fromDom).filter(Yt).bind(t),IP=(e,t)=>MP(e,R(U.some,t)),FP=(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},UP=e=>{const t=e.split(/\s*,\s*/);return W(t,(e=>-1===e.indexOf(" ")||qe(e,'"')||qe(e,"'")?e:`'${e}'`)).join(",")},zP=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=FP(e,t);e.formatter.toggle("fontname",{value:UP(n)}),e.nodeChanged()})(e,o)},FontSize:(t,n,o)=>{((e,t)=>{e.formatter.toggle("fontsize",{value:FP(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)}})},jP=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=>IP(e,(t=>PP(e.getBody(),t.dom))).getOr(""))(e))),e.editorCommands.addQueryValueHandler("FontSize",(()=>(e=>IP(e,(t=>BP(e.getBody(),t.dom))).getOr(""))(e))),e.editorCommands.addQueryValueHandler("LineHeight",(()=>(e=>IP(e,(t=>{const n=yn.fromDom(e.getBody()),o=Mv(t,(e=>uo(e,"line-height")),O(En,n));return o.getOrThunk((()=>{const e=parseFloat(co(t,"line-height")),n=parseFloat(co(t,"font-size"));return String(e/n)}))})).getOr(""))(e)))},HP=e=>{e.editorCommands.addCommands({Indent:()=>{(e=>{SS(e,"indent")})(e)},Outdent:()=>{NS(e)}}),e.editorCommands.addCommands({Outdent:()=>ES(e)},"state")},$P=(e,t)=>{const n=e.dom,o=e.selection.getRng(),r=t?e.selection.getStart():e.selection.getEnd(),s=t?o.startContainer:o.endContainer,a=XA(n,s);if(!a||!a.isContentEditable)return;const i=t?po:ho,l=Ql(e);((e,t,n,o)=>{const r=e.dom,s=e=>r.isBlock(e)&&e.parentElement===n,a=s(t)?t:r.getParent(o,s,n);return U.from(a).map(yn.fromDom)})(e,r,a,s).each((t=>{const n=eD(e,s,t.dom,a,!1,l);i(t,yn.fromDom(n)),e.selection.setCursorLocation(n,0),e.dispatch("NewBlock",{newBlock:n}),HA(e,"insertParagraph")}))},qP=e=>{e.editorCommands.addCommands({InsertNewBlockBefore:()=>{(e=>{$P(e,!0)})(e)},InsertNewBlockAfter:()=>{(e=>{$P(e,!1)})(e)}})},VP=e=>{SP(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=>!Vo(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(),dr);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)=>{RP(e,e.dom.createHTML("img",{src:o}))},insertHorizontalRule:()=>{e.execCommand("mceInsertContent",!1,"<hr>")},insertText:(t,n,o)=>{RP(e,e.dom.encode(o))},insertHTML:(t,n,o)=>{RP(e,o)},mceInsertContent:(t,n,o)=>{RP(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(uc(e))}})})(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.isEditable()){if(e.selection.isCollapsed()){const t=e.dom.getParent(e.selection.getStart(),"a");return void(t&&e.dom.remove(t,!0))}e.formatter.remove("link")}},mceInsertLink:t,createLink:t})})(e),HP(e),qP(e),(e=>{e.editorCommands.addCommands({insertParagraph:()=>{ID(gD,e)},mceInsertNewLine:(t,n,o)=>{FD(e,o)},InsertLineBreak:(t,n,o)=>{ID(ED,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=>{zP(e),jP(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)=>{cp(e,!0===o)},mceToggleVisualAid:()=>{e.hasVisual=!e.hasVisual,e.addVisual()}})})(e)},WP=["toggleview"],KP=e=>q(WP,e.toLowerCase());class YP{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=>{Wg(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!!E(i)&&(i(s,t,n),r.dispatch("ExecCommand",{command:e,ui:t,value:n}),!0)}queryCommandState(e){if(!KP(e)&&this.editor.quirks.isHidden()||this.editor.removed)return!1;const t=e.toLowerCase(),n=this.commands.state[t];return!!E(n)&&n(t)}queryCommandValue(e){if(!KP(e)&&this.editor.quirks.isHidden()||this.editor.removed)return"";const t=e.toLowerCase(),n=this.commands.value[t];return E(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 GP="data-mce-contenteditable",XP=(e,t,n)=>{try{e.getDoc().execCommand(t,!1,String(n))}catch(e){}},QP=(e,t)=>{e.dom.contentEditable=t?"true":"false"},JP=(e,t)=>{const n=yn.fromDom(e.getBody());((e,t,n)=>{bn(e,t)&&!n?pn(e,t):n&&fn(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,QP(n,!1),K(zo(n,'*[contenteditable="true"]'),(e=>{en(e,GP,"true"),QP(e,!1)}))):(e.readonly=!1,e.hasEditableRoot()&&QP(n,!0),(e=>{K(zo(e,'*[data-mce-contenteditable="true"]'),(e=>{sn(e,GP),QP(e,!0)}))})(n),XP(e,"StyleWithCSS",!1),XP(e,"enableInlineTableEditing",!1),XP(e,"enableObjectResizing",!1),lp(e)&&e.focus(),(e=>{e.selection.setRng(e.selection.getRng())})(e),e.nodeChanged())},ZP=e=>e.readonly,eL=e=>{e.parser.addAttributeFilter("contenteditable",(t=>{ZP(e)&&K(t,(e=>{e.attr(GP,e.attr("contenteditable")),e.attr("contenteditable","false")}))})),e.serializer.addAttributeFilter(GP,(t=>{ZP(e)&&K(t,(e=>{e.attr("contenteditable",e.attr(GP))}))})),e.serializer.addTempAttr(GP)},tL=["copy"],nL=(e,t)=>{if((e=>"click"===e.type)(t)&&!Df.metaKeyPressed(t)){const n=yn.fromDom(t.target);((e,t)=>no(t,"a",(t=>En(t,yn.fromDom(e.getBody())))).bind((e=>on(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=>q(tL,e.type))(t)&&e.dispatch(t.type,t)},oL=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 rL{static isNative(e){return!!oL[e.toLowerCase()]}constructor(e){this.bindings={},this.settings=e||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||I}fire(e,t){return this.dispatch(e,t)}dispatch(e,t){const n=e.toLowerCase(),o=Pa(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=G(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 sL=e=>(e._eventDispatcher||(e._eventDispatcher=new rL({scope:e,toggleEvent:(t,n)=>{rL.isNative(t)&&e.toggleNativeEvent&&e.toggleNativeEvent(t,n)}})),e._eventDispatcher),aL={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 Pa(e.toLowerCase(),null!=t?t:{},o);const r=sL(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 sL(this).on(e,t,n)},off(e,t){return sL(this).off(e,t)},once(e,t){return sL(this).once(e,t)},hasEventListeners(e){return sL(this).has(e)}},iL=Xa.DOM;let lL;const dL=(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=Nd(e);return n?(e.eventRoot||(e.eventRoot=iL.select(n)[0]),e.eventRoot):e.getBody()},cL=(e,t,n)=>{(e=>!e.hidden&&!ZP(e))(e)?e.dispatch(t,n):ZP(e)&&nL(e,n)},mL=(e,t)=>{if(e.delegates||(e.delegates={}),e.delegates[t]||e.removed)return;const n=dL(e,t);if(Nd(e)){if(lL||(lL={},e.editorManager.on("removeEditor",(()=>{e.editorManager.activeEditor||lL&&(he(lL,((t,n)=>{e.dom.unbind(dL(e,n))})),lL=null)}))),lL[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||iL.isChildOf(o,e))&&cL(r[s],t,n)}};lL[t]=o,iL.bind(n,t,o)}else{const o=n=>{cL(e,t,n)};iL.bind(n,t,o),e.delegates[t]=o}},uL={...aL,bindPendingEventDelegates(){const e=this;Pt.each(e._pendingNativeEvents,(t=>{mL(e,t)}))},toggleNativeEvent(e,t){const n=this;"focus"!==e&&"blur"!==e&&(n.removed||(t?n.initialized?mL(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&n.delegates&&(n.dom.unbind(dL(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(dL(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()))}},fL=e=>g(e)?{value:e.split(/[ ,]/),valid:!0}:k(e,g)?{value:e,valid:!0}:{valid:!1,message:"The value must be a string[] or a comma/space separated string."},gL=(e,t)=>e+(Qe(t.message)?"":`. ${t.message}`),pL=e=>e.valid,hL=(e,t,n="")=>{const o=t(e);return y(o)?o?{value:e,valid:!0}:{valid:!1,message:n}:o},bL=(e,t)=>{const n={},o={},r=(e,t,n)=>{const r=hL(t,n);return pL(r)?(o[e]=r.value,!0):(console.warn(gL(`Invalid value passed for the ${e} option`,r)),!1)},s=e=>ke(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 E;case"number":return _;case"object":return p;case"string":return g;case"string[]":return fL;case"object[]":return e=>k(e,p);case"regexp":return e=>f(e,RegExp);default:return F}})();return n=>hL(n,t,`The value must be a ${e}.`)})(s.processor):s.processor,i=((e,t,n)=>{if(!C(t)){const o=hL(t,n);if(pL(o))return o.value;console.error(gL(`Invalid default value passed for the "${e}" option`,o))}})(e,s.default,a);n[e]={...s,default:i,processor:a};_e(o,e).orThunk((()=>_e(t,e))).each((t=>r(e,t,a)))},isRegistered:s,get:e=>_e(o,e).orThunk((()=>_e(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=>ke(o,e)}},vL=["design","readonly"],yL=(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&&JP(e,s.editorReadOnly),t.set(o),((e,t)=>{e.dispatch("SwitchMode",{mode:t})})(e,o)},CL=e=>{const t=Za("design"),n=Za({design:{activate:S,deactivate:S,editorReadOnly:!1},readonly:{activate:S,deactivate:S,editorReadOnly:!0}});return(e=>{e.serializer?eL(e):e.on("PreInit",(()=>{eL(e)}))})(e),(e=>{e.on("ShowCaret",(t=>{ZP(e)&&t.preventDefault()})),e.on("ObjectSelected",(t=>{ZP(e)&&t.preventDefault()}))})(e),{isReadOnly:()=>ZP(e),set:o=>((e,t,n,o)=>{if(o!==n.get()){if(!ke(t,o))throw new Error(`Editor mode '${o}' is invalid`);e.initialized?yL(e,n,t,o):e.on("init",(()=>yL(e,n,t,o)))}})(e,n.get(),t,o),get:()=>t.get(),register:(e,t)=>{n.set(((e,t,n)=>{if(q(vL,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))}}},wL=Pt.each,xL=Pt.explode,EL={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},_L=Pt.makeMap("alt,ctrl,shift,meta,access"),kL=e=>{const t={},n=Dt.os.isMacOS()||Dt.os.isiOS();wL(xL(e.toLowerCase(),"+"),(e=>{(e=>e in _L)(e)?t[e]=!0:/^[0-9]{2,}$/.test(e)?t.keyCode=parseInt(e,10):(t.charCode=e.charCodeAt(0),t.keyCode=EL[e]||e.toUpperCase().charCodeAt(0))}));const o=[t.keyCode];let r;for(r in _L)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 SL{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()||(wL(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 wL(xL(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(xL(e,">"),kL);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 NL=()=>{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}},RL=Xa.DOM,AL=Pt.extend,DL=Pt.each;class TL{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._editableRoot=!0,this.editorManager=n,this.documentBaseUrl=n.documentBaseURL,AL(this,uL);const o=this;this.id=e,this.hidden=!1;const r=((e,t)=>EP(pP||hP,pP,t,e,t))(n.defaultOptions,t);this.options=bL(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:$l(e,"tinymce"),default:"tinymce"}),t("body_class",{processor:$l(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=q(["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,details,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,details,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)||k(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:Ud(e)?[]:["default"]}),t("content_style",{processor:"string"}),t("content_css_cors",{processor:"boolean",default:!1}),t("font_css",{processor:e=>{const t=g(e)||k(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||Il.isiPhone()||Il.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:!Fl}),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)||E(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("editable_root",{processor:"boolean",default:!0}),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",default:!0}),t("pad_empty_with_br",{processor:"boolean",default:!1}),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:Hl}),t("valid_children",{processor:"string"}),t("valid_classes",{processor:Hl}),t("valid_elements",{processor:"string"}),t("valid_styles",{processor:Hl}),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=>k(e,p)||!1===e?{value:Ml(!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 E(e)?{value:(t=e,e=>{const n=t(e);return Ml(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=>k(e,zl)?{value:e,valid:!0}:zl(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}),t("details_initial_state",{processor:e=>{const t=q(["inherited","collapsed","expanded"],e);return t?{value:e,valid:t}:{valid:!1,message:"Must be one of: inherited, collapsed, or expanded."}},default:"inherited"}),t("details_serialized_state",{processor:e=>{const t=q(["inherited","collapsed","expanded"],e);return t?{value:e,valid:t}:{valid:!1,message:"Must be one of: inherited, collapsed, or expanded."}},default:"inherited"}),t("init_content_sync",{processor:"boolean",default:!1}),t("newdocument_content",{processor:"string",default:""}),t("force_hex_color",{processor:e=>{const t=["always","rgb_only","off"],n=q(t,e);return n?{value:e,valid:n}:{valid:!1,message:`Must be one of: ${t.join(", ")}.`}},default:"off"}),t("sandbox_iframes",{processor:"boolean",default:!1}),t("convert_unsafe_embeds",{processor:"boolean",default:!1}),e.on("ScriptsLoaded",(()=>{t("directionality",{processor:"string",default:oi.isRtl()?"rtl":void 0}),t("placeholder",{processor:"string",default:Ul.getAttrib(e.getElement(),"placeholder")})}))})(o);const s=this.options.get;s("deprecation_warnings")&&Yx(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=gd(o);l&&(Ja.ScriptLoader._setReferrerPolicy(l),Xa.DOM.styleSheetLoader._setReferrerPolicy(l));const d=Yd(o);x(d)&&Xa.DOM.styleSheetLoader._setContentCssCors(d),ri.languageLoad=s("language_load"),ri.baseURL=n.baseURL,this.setDirty(!1),this.documentBaseURI=new hw(Wl(o),{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=Ud(o),this.hasVisual=Jd(o),this.shortcuts=new SL(this),this.editorCommands=new YP(this),VP(this);const c=s("cache_suffix");c&&(Dt.cacheSuffix=c.replace(/^[\?\&]+/,"")),this.ui={registry:NL(),styleSheetLoader:void 0,show:S,hide:S,setEnabled:S,isEnabled:F},this.mode=CL(o),n.dispatch("SetupEditor",{editor:this});const m=nc(o);E(m)&&m.call(o,o)}render(){fP(this)}focus(e){this.execCommand("mceFocus",!1,e)}hasFocus(){return ip(this)}translate(e){return oi.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!!q(Gd(this),e)&&(!t||void 0!==cE.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":(RL.show(e.getContainer()),RL.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)):(RL.hide(e.getContainer()),RL.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=er(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,er(n))n.value=r;else{!e.is_removing&&t.inline||(n.innerHTML=r);const o=RL.getParent(t.id,"form");o&&DL(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 Mx(this,e,t)}getContent(e){return Lx(this,e)}insertContent(e,t){t&&(e=AL({content:e},t)),this.execCommand("mceInsertContent",!1,e)}resetContent(e){void 0===e?Mx(this,this.startContent,{format:"raw"}):Mx(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||RL.get(e.id+"_parent")),e.container}getContentAreaContainer(){return this.contentAreaContainer}getElement(){return this.targetElm||(this.targetElm=RL.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=rc(o);if(E(s))return s.call(o,e,n,!0,t);if(!r("convert_urls")||"link"===n||p(n)&&"LINK"===n.nodeName||0===e.indexOf("file:")||0===e.length)return e;const a=new hw(e);return"http"!==a.protocol&&"https"!==a.protocol&&""!==a.protocol?e:r("relative_urls")?o.documentBaseURI.toRelative(e):e=o.documentBaseURI.toAbsolute(e,r("remove_script_host"))}addVisual(e){_P(this,e)}setEditableRoot(e){((e,t)=>{e._editableRoot!==t&&(e._editableRoot=t,e.readonly||(e.getBody().contentEditable=String(e.hasEditableRoot()),e.nodeChanged()),((e,t)=>{e.dispatch("EditableRootStateChange",{state:t})})(e,t))})(this,e)}hasEditableRoot(){return this._editableRoot}remove(){Qx(this)}destroy(e){Jx(this,e)}uploadImages(){return this.editorUpload.uploadImages()}_scanForImages(){return this.editorUpload.scanForImages()}}const OL=Xa.DOM,BL=Pt.each;let PL,LL=!1,ML=[];const IL=e=>{const t=e.type;BL(jL.get(),(n=>{switch(t){case"scroll":n.dispatch("ScrollWindow",e);break;case"resize":n.dispatch("ResizeWindow",e)}}))},FL=e=>{if(e!==LL){const t=Xa.DOM;e?(t.bind(window,"resize",IL),t.bind(window,"scroll",IL)):(t.unbind(window,"resize",IL),t.unbind(window,"scroll",IL)),LL=e}},UL=e=>{const t=ML;return ML=X(ML,(t=>e!==t)),jL.activeEditor===e&&(jL.activeEditor=ML.length>0?ML[0]:null),jL.focusedEditor===e&&(jL.focusedEditor=null),t.length!==ML.length},zL="CSS1Compat"!==document.compatMode,jL={...aL,baseURI:null,baseURL:null,defaultOptions:{},documentBaseURL:null,suffix:null,majorVersion:"6",minorVersion:"8.2",releaseDate:"2023-12-11",i18n:oi,activeEditor:null,focusedEditor:null,setup(){const e=this;let t="",n="",o=hw.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 hw(o).toAbsolute(t),e.documentBaseURL=o,e.baseURI=new hw(e.baseURL),e.suffix=n,(s=e).on("AddEditor",O(tp,s)),s.on("RemoveEditor",O(np,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)=>{ri.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;OL.unbind(window,"ready",s),(n=>{const o=e[n];if(o)o.apply(t,[])})("onpageload"),i=((e,t)=>{const n=[],o=E(t)?e=>V(n,(n=>t(n,e))):e=>q(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()?(bE("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"),[]):zL?(bE("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[]):g(e.selector)?OL.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&&(UL(n),n.unbindAllNativeEvents(),n.destroy(!0),n.removed=!0)})),i=Pt.grep(i,(e=>!t.get(e.id))),0===i.length?r([]):BL(i,(s=>{((e,t)=>e.inline&&t.tagName.toLowerCase()in o)(e,s)?bE("Could not initialize inline editor on invalid inline target element",s):((e,o,s)=>{const l=new TL(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=_e(e,"name").filter((e=>!OL.get(e))).getOrThunk(OL.uniqueId),e.setAttribute("id",t)),t})(s),e,s)}))};return OL.bind(window,"ready",s),new Promise((e=>{n?e(n):r=t=>{e(t)}}))},get(e){return 0===arguments.length?ML.slice(0):g(e)?ee(ML,(t=>t.id===e)).getOr(null):_(e)&&ML[e]?ML[e]:null},add(e){const t=this,n=t.get(e.id);return n===e||(null===n&&ML.push(e),FL(!0),t.activeEditor=e,t.dispatch("AddEditor",{editor:e}),PL||(PL=e=>{const n=t.dispatch("BeforeUnload");if(n.returnValue)return e.preventDefault(),e.returnValue=n.returnValue,n.returnValue},window.addEventListener("beforeunload",PL))),e},createEditor(e,t){return this.add(new TL(e,t,this))},remove(e){const t=this;let n;if(e){if(!g(e))return n=e,v(t.get(n.id))?null:(UL(n)&&t.dispatch("RemoveEditor",{editor:n}),0===ML.length&&window.removeEventListener("beforeunload",PL),n.remove(),FL(ML.length>0),n);BL(OL.select(e),(e=>{n=t.get(e.id),n&&t.remove(n)}))}else for(let e=ML.length-1;e>=0;e--)t.remove(ML[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 TL(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:()=>{BL(ML,(e=>{e.save()}))},addI18n:(e,t)=>{oi.add(e,t)},translate:e=>oi.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 hw(this.documentBaseURL).toAbsolute(e.replace(/\/+$/,"")),this.baseURI=new hw(this.baseURL)}};jL.setup();const HL=(()=>{const e=ai();return{FakeClipboardItem:e=>({items:e,types:ge(e),getType:t=>_e(e,t).getOrUndefined()}),write:t=>{e.set(t)},read:()=>e.get().getOrUndefined(),clear:e.clear}})(),$L=Math.min,qL=Math.max,VL=Math.round,WL=(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+=VL(l/2)),"c"===d[1]&&(o+=VL(i/2)),"b"===d[3]&&(r-=a),"r"===d[4]&&(o-=s),"c"===d[3]&&(r-=VL(a/2)),"c"===d[4]&&(o-=VL(s/2)),KL(o,r,s,a)},KL=(e,t,n,o)=>({x:e,y:t,w:n,h:o}),YL={inflate:(e,t,n)=>KL(e.x-t,e.y-n,e.w+2*t,e.h+2*n),relativePosition:WL,findBestRelativePosition:(e,t,n,o)=>{for(let r=0;r<o.length;r++){const s=WL(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=qL(e.x,t.x),o=qL(e.y,t.y),r=$L(e.x+e.w,t.x+t.w),s=$L(e.y+e.h,t.y+t.h);return r-n<0||s-o<0?null:KL(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=qL(0,t.x-o),c=qL(0,t.y-r),m=qL(0,s-i),u=qL(0,a-l);return o+=d,r+=c,n&&(s+=d,a+=c,o-=m,r-=u),s-=m,a-=u,KL(o,r,s-o,a-r)},create:KL,fromClientRect:e=>KL(e.left,e.top,e.width,e.height)},GL=(()=>{const e={},t={},n={};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,Ja.ScriptLoader.loadScript(o).then((()=>i.start(s)),(()=>i.reject(r)))}));return e[n]=a,a}},add:(o,r)=>{void 0!==t[o]&&(t[o](r),delete t[o]),e[o]=Promise.resolve(r),n[o]=r},has:e=>e in n,get:e=>n[e],unload:t=>{delete e[t]}}})();let XL;try{const e="__storage_test__";XL=window.localStorage,XL.setItem(e,e),XL.removeItem(e)}catch(e){XL=(()=>{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 QL={geom:{Rect:YL},util:{Delay:Yg,Tools:Pt,VK:Df,URI:hw,EventDispatcher:rL,Observable:aL,I18n:oi,LocalStorage:XL,ImageUploader:e=>{const t=xE(),n=NE(e,t);return{upload:(t,o=!0)=>n.upload(t,o?SE(e):void 0)}}},dom:{EventUtils:za,TreeWalker:Ho,TextSeeker:Ri,DOMUtils:Xa,ScriptLoader:Ja,RangeUtils:ug,Serializer:Px,StyleSheetLoader:Hs,ControlSelection:Lf,BookmarkManager:xf,Selection:Ax,Event:za.Event},html:{Styles:Da,Entities:ia,Node:Np,Schema:ya,DomParser:Ow,Writer:Wp,Serializer:Kp},Env:Dt,AddOnManager:ri,Annotator:wf,Formatter:jE,UndoManager:$E,EditorCommands:YP,WindowManager:uE,NotificationManager:dE,EditorObservable:uL,Shortcuts:SL,Editor:TL,FocusManager:Kg,EditorManager:jL,DOM:Xa.DOM,ScriptLoader:Ja.ScriptLoader,PluginManager:cE,ThemeManager:mE,ModelManager:eE,IconManager:Zx,Resource:GL,FakeClipboard:HL,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},JL=Pt.extend(jL,QL);(e=>{window.tinymce=e,window.tinyMCE=e})(JL),(e=>{if("object"==typeof n)try{n.exports=e}catch(e){}})(JL)}()}));
;/*!node_modules/tinymce/icons/default/icons.js*/
amis.define("c20a990",(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>',"accordion-toggle":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 15c0-.6.4-1 1-1h6c.6 0 1 .4 1 1s-.4 1-1 1h-6a1 1 0 0 1-1-1Z"/><path opacity=".2" fill-rule="evenodd" clip-rule="evenodd" d="M4 15c0-.6.4-1 1-1h6c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1-1-1Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12 19c0-.6.4-1 1-1h6c.6 0 1 .4 1 1s-.4 1-1 1h-6a1 1 0 0 1-1-1Z"/><path opacity=".2" fill-rule="evenodd" clip-rule="evenodd" d="M4 19c0-.6.4-1 1-1h6c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1-1-1Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12.3 7.3a1 1 0 0 1 1.4 0L16 9.6l2.3-2.3a1 1 0 1 1 1.4 1.4L16 12.4l-3.7-3.7a1 1 0 0 1 0-1.4ZM4.3 11.7a1 1 0 0 1 0-1.4L6.6 8 4.3 5.7a1 1 0 0 1 1.4-1.4L9.4 8l-3.7 3.7a1 1 0 0 1-1.4 0Z"/></svg>',accordion:'<svg width="24" height="24"><rect x="12" y="7" width="10" height="2" rx="1"/><rect x="12" y="11" width="10" height="2" rx="1"/><rect x="12" y="15" width="6" height="2" rx="1"/><path fill-rule="evenodd" clip-rule="evenodd" d="M2.3 7.3a1 1 0 0 1 1.4 0L6 9.6l2.3-2.3a1 1 0 0 1 1.4 1.4L6 12.4 2.3 8.7a1 1 0 0 1 0-1.4Z"/></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>',"ai-prompt":'<svg width="24" height="24"><g clip-path="url(#a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M15 6.7a1 1 0 0 0-1.4 0l-9.9 10a1 1 0 0 0 0 1.3l2.1 2.1c.4.4 1 .4 1.4 0l10-9.9c.3-.3.3-1 0-1.4l-2.2-2Zm1.4 2.8-2-2-3 2.7 2.2 2.2 2.8-2.9Z"/><path d="m18.5 7.3-.7-1.5-1.5-.8 1.5-.7.7-1.5.7 1.5 1.5.7-1.5.8-.7 1.5ZM18.5 16.5l-.7-1.6-1.5-.7 1.5-.7.7-1.6.7 1.6 1.5.7-1.5.7-.7 1.6ZM9.7 7.3 9 5.8 7.5 5 9 4.3l.7-1.5.7 1.5L12 5l-1.5.8-.7 1.5Z"/></g><defs><clipPath id="a"><path d="M0 0h24v24H0z"/></clipPath></defs></svg>',ai:'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M5 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3H5Zm6.8 11.5.5 1.2a68.3 68.3 0 0 0 .7 1.1l.4.1c.3 0 .5 0 .7-.3.2-.1.3-.3.3-.6l-.3-1-2.6-6.2a20.4 20.4 0 0 0-.5-1.3l-.5-.4-.7-.2c-.2 0-.5 0-.6.2-.2 0-.4.2-.5.4l-.3.6-.3.7L5.7 15l-.2.6-.1.4c0 .3 0 .5.3.7l.6.2c.3 0 .5 0 .7-.2l.4-1 .5-1.2h3.9ZM9.8 9l1.5 4h-3l1.5-4Zm5.6-.9v7.6c0 .4 0 .7.2 1l.7.2c.3 0 .6 0 .8-.3l.2-.9V8.1c0-.4 0-.7-.2-.9a1 1 0 0 0-.8-.3c-.2 0-.5.1-.7.3l-.2 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 class="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>',send:'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="m13.3 22 7-18.3-18.3 7L9 15l4.3 7ZM18 6.8l-.7-.7L9.4 14l.7.7L18 6.8Z"/></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 class="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("c05921f",(function(c,f,i,n){c("c20a990")}));
;/*!node_modules/tinymce/themes/silver/theme.js*/
amis.define("545e3b6",(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,s=e=>t=>e===t,r=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=s(null),d=n("boolean"),u=s(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 C=e=>t=>!e(t),O=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,I=(e,t)=>M.call(e,t),F=(e,t)=>{const o=I(e,t);return-1===o?D.none():D.some(o)},R=(e,t)=>I(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 s=A.call(e,n,n+t);o.push(s)}return o},L=(e,t)=>{const o=e.length,n=new Array(o);for(let s=0;s<o;s++){const o=e[s];n[s]=t(o,s)}return n},H=(e,t)=>{for(let o=0,n=e.length;o<n;o++){t(e[o],o)}},P=(e,t)=>{const o=[],n=[];for(let s=0,r=e.length;s<r;s++){const r=e[s];(t(r,s)?o:n).push(r)}return{pass:o,fail:n}},U=(e,t)=>{const o=[];for(let n=0,s=e.length;n<s;n++){const s=e[n];t(s,n)&&o.push(s)}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)=>(H(e,((e,n)=>{o=t(o,e,n)})),o),G=(e,t)=>((e,t,o)=>{for(let n=0,s=e.length;n<s;n++){const s=e[n];if(t(s,n))return D.some(s);if(o(s,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},Y=(e,t)=>q(L(e,t)),X=(e,t)=>{for(let o=0,n=e.length;o<n;++o){if(!0!==t(e[o],o))return!1}return!0},K=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,s=e.length;n<s;n++){const s=e[n];o[String(s)]=t(s,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),se=p(Array.from)?Array.from:e=>A.call(e),re=(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,s=o.length;n<s;n++){const s=o[n];t(e[s],s)}},ce=(e,t)=>de(e,((e,o)=>({k:o,v:t(e,o)}))),de=(e,t)=>{const o={};return le(e,((e,n)=>{const s=t(e,n);o[s.k]=s.v})),o},ue=e=>(t,o)=>{e[o]=t},me=(e,t,o,n)=>{le(e,((e,s)=>{(t(e,s)?o:n)(e,s)}))},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,s=o.length;n<s;n++){const s=o[n],r=e[s];if(t(r,s,e))return D.some(r)}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(),Ce=(e,t)=>e?D.some(t):D.none(),Oe=(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 s=e.indexOf(t,o);return-1!==s&&(!!u(n)||s+t.length<=n)},Ee=(e,t)=>Oe(e,t,0),De=(e,t)=>Oe(e,t,e.length-t.length),Ae=(e=>t=>t.replace(e,""))(/^\s+|\s+$/g),Me=e=>e.length>0,Be=e=>!Me(e),Ie=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}},Re={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)},Ne="undefined"!=typeof window?window:Function("return this;")(),Ve=(e,t)=>((e,t)=>{let o=null!=t?t:Ne;for(let t=0;t<e.length&&null!=o;++t)o=o[e[t]];return o})(e.split("."),t),ze=(e,t)=>{const o=((e,t)=>Ve(e,t))(e,t);if(null==o)throw new Error(e+" not available on this browser");return o},Le=Object.getPrototypeOf,He=e=>{const t=Ve("ownerDocument.defaultView",e);return a(e)&&((e=>ze("HTMLElement",e))(t).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(Le(e).constructor.name))},Pe=e=>e.dom.nodeName.toLowerCase(),Ue=e=>t=>(e=>e.dom.nodeType)(t)===e,We=e=>je(e)&&He(e.dom),je=Ue(1),Ge=Ue(3),$e=Ue(9),qe=Ue(11),Ye=e=>t=>je(t)&&Pe(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,Je=(e,t)=>e.dom===t.dom,Ze=(e,t)=>{const o=e.dom,n=t.dom;return o!==n&&o.contains(n)},Qe=e=>Re.fromDom(e.dom.ownerDocument),et=e=>$e(e)?e:Qe(e),tt=e=>Re.fromDom(et(e).dom.documentElement),ot=e=>Re.fromDom(et(e).dom.defaultView),nt=e=>D.from(e.dom.parentNode).map(Re.fromDom),st=e=>D.from(e.dom.parentElement).map(Re.fromDom),rt=e=>D.from(e.dom.offsetParent).map(Re.fromDom),at=e=>L(e.dom.childNodes,Re.fromDom),it=(e,t)=>{const o=e.dom.childNodes;return D.from(o[t]).map(Re.fromDom)},lt=e=>it(e,0),ct=(e,t)=>({element:e,offset:t}),dt=(e,t)=>{const o=at(e);return o.length>0&&t<o.length?ct(o[t],0):ct(e,t)},ut=e=>qe(e)&&g(e.dom.host),mt=p(Element.prototype.attachShadow)&&p(Node.prototype.getRootNode),gt=x(mt),pt=mt?e=>Re.fromDom(e.dom.getRootNode()):et,ht=e=>ut(e)?e:Re.fromDom(et(e).dom.body),ft=e=>{const t=pt(e);return ut(t)?D.some(t):D.none()},bt=e=>Re.fromDom(e.dom.host),vt=e=>g(e.dom.shadowRoot),yt=e=>{const t=Ge(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const o=t.ownerDocument;return ft(Re.fromDom(t)).fold((()=>o.body.contains(t)),(n=yt,s=bt,e=>n(s(e))));var n,s},xt=()=>wt(Re.fromDom(document)),wt=e=>{const t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return Re.fromDom(t)},St=(e,t,o)=>{if(!(r(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+"")},kt=(e,t,o)=>{St(e.dom,t,o)},Ct=(e,t)=>{const o=e.dom;le(t,((e,t)=>{St(o,t,e)}))},Ot=(e,t)=>{const o=e.dom.getAttribute(t);return null===o?void 0:o},_t=(e,t)=>D.from(Ot(e,t)),Tt=(e,t)=>{const o=e.dom;return!(!o||!o.hasAttribute)&&o.hasAttribute(t)},Et=(e,t)=>{e.dom.removeAttribute(t)},Dt=(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);Ie(e)&&e.style.setProperty(t,o)},At=(e,t)=>{Ie(e)&&e.style.removeProperty(t)},Mt=(e,t,o)=>{const n=e.dom;Dt(n,t,o)},Bt=(e,t)=>{const o=e.dom;le(t,((e,t)=>{Dt(o,t,e)}))},It=(e,t)=>{const o=e.dom;le(t,((e,t)=>{e.fold((()=>{At(o,t)}),(e=>{Dt(o,t,e)}))}))},Ft=(e,t)=>{const o=e.dom,n=window.getComputedStyle(o).getPropertyValue(t);return""!==n||yt(e)?n:Rt(o,t)},Rt=(e,t)=>Ie(e)?e.style.getPropertyValue(t):"",Nt=(e,t)=>{const o=e.dom,n=Rt(o,t);return D.from(n).filter((e=>e.length>0))},Vt=e=>{const t={},o=e.dom;if(Ie(o))for(let e=0;e<o.style.length;e++){const n=o.style.item(e);t[n]=o.style[n]}return t},zt=(e,t,o)=>{const n=Re.fromTag(e);Mt(n,t,o);return Nt(n,t).isSome()},Lt=(e,t)=>{const o=e.dom;At(o,t),xe(_t(e,"style").map(Ae),"")&&Et(e,"style")},Ht=e=>e.dom.offsetWidth,Pt=(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),s=void 0===n?0:parseInt(n,10);return isNaN(s)?t:t+s}),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;Ie(n)&&(n.style[e]=o+"px")},get:o,getOuter:o,aggregate:n,max:(e,t,o)=>{const s=n(e,o);return t>s?t-s:0}}},Ut=Pt("height",(e=>{const t=e.dom;return yt(e)?t.getBoundingClientRect().height:t.offsetHeight})),Wt=e=>Ut.get(e),jt=e=>Ut.getOuter(e),Gt=(e,t)=>({left:e,top:t,translate:(o,n)=>Gt(e+o,t+n)}),$t=Gt,qt=(e,t)=>void 0!==e?e:void 0!==t?t:0,Yt=e=>{const t=e.dom.ownerDocument,o=t.body,n=t.defaultView,s=t.documentElement;if(o===e.dom)return $t(o.offsetLeft,o.offsetTop);const r=qt(null==n?void 0:n.pageYOffset,s.scrollTop),a=qt(null==n?void 0:n.pageXOffset,s.scrollLeft),i=qt(s.clientTop,o.clientTop),l=qt(s.clientLeft,o.clientLeft);return Xt(e).translate(a-l,r-i)},Xt=e=>{const t=e.dom,o=t.ownerDocument.body;return o===t?$t(o.offsetLeft,o.offsetTop):yt(e)?(e=>{const t=e.getBoundingClientRect();return $t(t.left,t.top)})(t):$t(0,0)},Kt=Pt("width",(e=>e.dom.offsetWidth)),Jt=e=>Kt.get(e),Zt=e=>Kt.getOuter(e),Qt=e=>{let t,o=!1;return(...n)=>(o||(o=!0,t=e.apply(null,n)),t)},eo=()=>to(0,0),to=(e,t)=>({major:e,minor:t}),oo={nu:to,detect:(e,t)=>{const o=String(t).toLowerCase();return 0===e.length?eo():((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 to(n(1),n(2))})(e,o)},unknown:eo},no=(e,t)=>{const o=String(t).toLowerCase();return G(e,(e=>e.search(o)))},so=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,ro=e=>t=>Te(t,e),ao=[{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]+).*/,so],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:[so,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:ro("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:ro("firefox")},{name:"Safari",versionRegexes:[so,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(Te(e,"safari")||Te(e,"mobile/"))&&Te(e,"applewebkit")}],io=[{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]+).*/]}],lo={browsers:x(ao),oses:x(io)},co="Edge",uo="Chromium",mo="Opera",go="Firefox",po="Safari",ho=e=>{const t=e.current,o=e.version,n=e=>()=>t===e;return{current:t,version:o,isEdge:n(co),isChromium:n(uo),isIE:n("IE"),isOpera:n(mo),isFirefox:n(go),isSafari:n(po)}},fo={unknown:()=>ho({current:void 0,version:oo.unknown()}),nu:ho,edge:x(co),chromium:x(uo),ie:x("IE"),opera:x(mo),firefox:x(go),safari:x(po)},bo="Windows",vo="Android",yo="Linux",xo="macOS",wo="Solaris",So="FreeBSD",ko="ChromeOS",Co=e=>{const t=e.current,o=e.version,n=e=>()=>t===e;return{current:t,version:o,isWindows:n(bo),isiOS:n("iOS"),isAndroid:n(vo),isMacOS:n(xo),isLinux:n(yo),isSolaris:n(wo),isFreeBSD:n(So),isChromeOS:n(ko)}},Oo={unknown:()=>Co({current:void 0,version:oo.unknown()}),nu:Co,windows:x(bo),ios:x("iOS"),android:x(vo),linux:x(yo),macos:x(xo),solaris:x(wo),freebsd:x(So),chromeos:x(ko)},_o=(e,t,o)=>{const n=lo.browsers(),s=lo.oses(),r=t.bind((e=>((e,t)=>re(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:oo.nu(parseInt(t.version,10),0)})))})))(n,e))).orThunk((()=>((e,t)=>no(e,t).map((e=>{const o=oo.detect(e.versionRegexes,t);return{current:e.name,version:o}})))(n,e))).fold(fo.unknown,fo.nu),a=((e,t)=>no(e,t).map((e=>{const o=oo.detect(e.versionRegexes,t);return{current:e.name,version:o}})))(s,e).fold(Oo.unknown,Oo.nu),i=((e,t,o,n)=>{const s=e.isiOS()&&!0===/ipad/i.test(o),r=e.isiOS()&&!s,a=e.isiOS()||e.isAndroid(),i=a||n("(pointer:coarse)"),l=s||!r&&a&&n("(min-device-width:768px)"),c=r||a&&!l,d=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(o),u=!c&&!l&&!d;return{isiPad:x(s),isiPhone:x(r),isTablet:x(l),isPhone:x(c),isTouch:x(i),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:x(d),isDesktop:x(u)}})(a,r,e,o);return{browser:r,os:a,deviceType:i}},To=e=>window.matchMedia(e).matches;let Eo=Qt((()=>_o(navigator.userAgent,D.from(navigator.userAgentData),To)));const Do=()=>Eo(),Ao=e=>{const t=Re.fromDom((e=>{if(gt()&&g(e.target)){const t=Re.fromDom(e.target);if(je(t)&&vt(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(),s=y(n,o);return((e,t,o,n,s,r,a)=>({target:e,x:t,y:o,stop:n,prevent:s,kill:r,raw:a}))(t,e.clientX,e.clientY,o,n,s,e)},Mo=(e,t,o,n,s)=>{const r=((e,t)=>o=>{e(o)&&t(Ao(o))})(o,n);return e.dom.addEventListener(t,r,s),{unbind:k(Bo,e,t,r,s)}},Bo=(e,t,o,n)=>{e.dom.removeEventListener(t,o,n)},Io=(e,t)=>{nt(e).each((o=>{o.dom.insertBefore(t.dom,e.dom)}))},Fo=(e,t)=>{const o=(e=>D.from(e.dom.nextSibling).map(Re.fromDom))(e);o.fold((()=>{nt(e).each((e=>{No(e,t)}))}),(e=>{Io(e,t)}))},Ro=(e,t)=>{lt(e).fold((()=>{No(e,t)}),(o=>{e.dom.insertBefore(t.dom,o.dom)}))},No=(e,t)=>{e.dom.appendChild(t.dom)},Vo=(e,t)=>{H(t,(t=>{No(e,t)}))},zo=e=>{e.dom.textContent="",H(at(e),(e=>{Lo(e)}))},Lo=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 $t(o,n)},Po=(e,t,o)=>{const n=(void 0!==o?o.dom:document).defaultView;n&&n.scrollTo(e,t)},Uo=(e,t,o,n)=>({x:e,y:t,width:o,height:n,right:e+o,bottom:t+n}),Wo=e=>{const t=void 0===e?window:e,o=t.document,n=Ho(Re.fromDom(o));return(e=>{const t=void 0===e?window:e;return Do().browser.isFirefox()?D.none():D.from(t.visualViewport)})(t).fold((()=>{const e=t.document.documentElement,o=e.clientWidth,s=e.clientHeight;return Uo(n.left,n.top,o,s)}),(e=>Uo(Math.max(e.pageLeft,n.left),Math.max(e.pageTop,n.top),e.width,e.height)))},jo=()=>Re.fromDom(document),Go=(e,t)=>e.view(t).fold(x([]),(t=>{const o=e.owner(t),n=Go(e,o);return[t].concat(n)}));var $o=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(Re.fromDom)},owner:e=>Qe(e)});const qo=e=>{const t=jo(),o=Ho(t),n=((e,t)=>{const o=t.owner(e),n=Go(t,o);return D.some(n)})(e,$o);return n.fold(k(Yt,e),(t=>{const n=Xt(e),s=W(t,((e,t)=>{const o=Xt(t);return{left:e.left+o.left,top:e.top+o.top}}),{left:0,top:0});return $t(s.left+n.left+o.left,s.top+n.top+o.top)}))},Yo=(e,t,o,n)=>({x:e,y:t,width:o,height:n,right:e+o,bottom:t+n}),Xo=e=>{const t=Yt(e),o=Zt(e),n=jt(e);return Yo(t.left,t.top,o,n)},Ko=e=>{const t=qo(e),o=Zt(e),n=jt(e);return Yo(t.left,t.top,o,n)},Jo=(e,t)=>{const o=Math.max(e.x,t.x),n=Math.max(e.y,t.y),s=Math.min(e.right,t.right),r=Math.min(e.bottom,t.bottom);return Yo(o,n,s-o,r-n)},Zo=()=>Wo(window);var Qo=tinymce.util.Tools.resolve("tinymce.ThemeManager");const en=e=>{const t=t=>t(e),o=x(e),n=()=>s,s={tag:!0,inner:e,fold:(t,o)=>o(e),isValue:E,isError:T,map:t=>on.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 s},tn=e=>{const t=()=>o,o={tag:!1,inner:e,fold:(t,o)=>t(e),isValue:T,isError:E,map:t,mapError:t=>on.error(t(e)),bind:t,exists:T,forall:E,getOr:w,or:w,getOrThunk:_,orThunk:_,getOrDie:O(String(e)),each:b,toOptional:D.none};return o},on={value:en,error:tn,fromOption:(e,t)=>e.fold((()=>tn(t)),en)};var nn;!function(e){e[e.Error=0]="Error",e[e.Value=1]="Value"}(nn||(nn={}));const sn=(e,t,o)=>e.stype===nn.Error?t(e.serror):o(e.svalue),rn=e=>({stype:nn.Value,svalue:e}),an=e=>({stype:nn.Error,serror:e}),ln=e=>e.fold(an,rn),cn=e=>sn(e,on.error,on.value),dn=rn,un=e=>{const t=[],o=[];return H(e,(e=>{sn(e,(e=>o.push(e)),(e=>t.push(e)))})),{values:t,errors:o}},mn=an,gn=(e,t)=>e.stype===nn.Value?t(e.svalue):e,pn=(e,t)=>e.stype===nn.Error?t(e.serror):e,hn=(e,t)=>e.stype===nn.Value?{stype:nn.Value,svalue:t(e.svalue)}:e,fn=(e,t)=>e.stype===nn.Error?{stype:nn.Error,serror:t(e.serror)}:e,bn=sn,vn=(e,t,o,n)=>({tag:"field",key:e,newKey:t,presence:o,prop:n}),yn=(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)}},xn=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 s=t[n];for(const t in s)ve(s,t)&&(o[t]=e(o[t],s[t]))}return o},wn=xn(((e,t)=>i(e)&&i(t)?wn(e,t):t)),Sn=xn(((e,t)=>t)),kn=e=>({tag:"defaultedThunk",process:e}),Cn=e=>kn(x(e)),On=e=>({tag:"mergeWithThunk",process:e}),_n=e=>y(mn,q)(e),Tn=e=>{const t=un(e);return t.errors.length>0?_n(t.errors):dn(t.values)},En=e=>a(e)&&ae(e).length>100?" removed due to size":JSON.stringify(e,null,2),Dn=(e,t)=>mn([{path:e,getErrorInfo:t}]),An=e=>({extract:(t,o)=>pn(e(o),(e=>((e,t)=>Dn(e,x(t)))(t,e))),toString:x("val")}),Mn=An(dn),Bn=(e,t,o,n)=>be(t,o).fold((()=>((e,t,o)=>Dn(e,(()=>'Could not find valid *required* value for "'+t+'" in '+En(o))))(e,o,t)),n),In=(e,t,o,n)=>n(be(e,t).getOrThunk((()=>o(e)))),Fn=(e,t,o,n,s)=>{const r=e=>s.extract(t.concat([n]),e),a=e=>e.fold((()=>dn(D.none())),(e=>{const o=s.extract(t.concat([n]),e);return hn(o,D.some)}));switch(e.tag){case"required":return Bn(t,o,n,r);case"defaultedThunk":return In(o,n,e.process,r);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 In(o,n,x({}),(t=>{const n=wn(e.process(o),t);return r(n)}))}},Rn=e=>({extract:(t,o)=>e().extract(t,o),toString:()=>e().toString()}),Nn=e=>ae(ge(e,g)),Vn=e=>{const t=zn(e),o=W(e,((e,t)=>yn(t,(t=>wn(e,{[t]:!0})),x(e))),{});return{extract:(e,n)=>{const s=d(n)?[]:Nn(n),r=U(s,(e=>!ye(o,e)));return 0===r.length?t.extract(e,n):((e,t)=>Dn(e,(()=>"There are unsupported fields: ["+t.join(", ")+"] specified")))(e,r)},toString:t.toString}},zn=e=>({extract:(t,o)=>((e,t,o)=>{const n={},s=[];for(const r of o)yn(r,((o,r,a,i)=>{const l=Fn(a,e,t,o,i);bn(l,(e=>{s.push(...e)}),(e=>{n[r]=e}))}),((e,o)=>{n[e]=o(t)}));return s.length>0?mn(s):dn(n)})(t,o,e),toString:()=>{const t=L(e,(e=>yn(e,((e,t,o,n)=>e+" -> "+n.toString()),((e,t)=>"state("+e+")"))));return"obj{\n"+t.join("\n")+"}"}}),Ln=e=>({extract:(t,o)=>{const n=L(o,((o,n)=>e.extract(t.concat(["["+n+"]"]),o)));return Tn(n)},toString:()=>"array("+e.toString()+")"}),Hn=(e,t)=>{const o=void 0!==t?t:w;return{extract:(t,n)=>{const s=[];for(const r of e){const e=r.extract(t,n);if(e.stype===nn.Value)return{stype:nn.Value,svalue:o(e.svalue)};s.push(e)}return Tn(s)},toString:()=>"oneOf("+L(e,(e=>e.toString())).join(", ")+")"}},Pn=(e,t)=>({extract:(o,n)=>{const s=ae(n),r=((t,o)=>Ln(An(e)).extract(t,o))(o,s);return gn(r,(e=>{const s=L(e,(e=>vn(e,e,{tag:"required",process:{}},t)));return zn(s).extract(o,n)}))},toString:()=>"setOf("+t.toString()+")"}),Un=y(Ln,zn),Wn=x(Mn),jn=(e,t)=>An((o=>{const n=typeof o;return e(o)?dn(o):mn(`Expected type: ${t} but got: ${n}`)})),Gn=jn(h,"number"),$n=jn(r,"string"),qn=jn(d,"boolean"),Yn=jn(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=An((e=>Xn(e)?dn(e):mn("Expected value to be acceptable for sending via postMessage"))),Jn=(e,t,o,n)=>be(o,n).fold((()=>((e,t,o)=>Dn(e,(()=>'The chosen schema: "'+o+'" did not exist in branches: '+En(t))))(e,o,n)),(o=>o.extract(e.concat(["branch: "+n]),t))),Zn=(e,t)=>({extract:(o,n)=>be(n,e).fold((()=>((e,t)=>Dn(e,(()=>'Choice schema did not contain choice key: "'+t+'"')))(o,e)),(e=>Jn(o,n,t,e))),toString:()=>"chooseOn("+e+"). Possible values: "+ae(t)}),Qn=e=>An((t=>e(t).fold(mn,dn))),es=(e,t)=>Pn((t=>ln(e(t))),t),ts=(e,t,o)=>cn(((e,t,o)=>{const n=t.extract([e],o);return fn(n,(e=>({input:o,errors:e})))})(e,t,o)),os=e=>e.fold((e=>{throw new Error(ss(e))}),w),ns=(e,t,o)=>os(ts(e,t,o)),ss=e=>"Errors: \n"+(e=>{const t=e.length>10?e.slice(0,10).concat([{path:[],getErrorInfo:x("... (only showing first ten failures)")}]):e;return L(t,(e=>"Failed path: ("+e.path.join(" > ")+")\n"+e.getErrorInfo()))})(e.errors).join("\n")+"\n\nInput object: "+En(e.input),rs=(e,t)=>Zn(e,ce(t,zn)),as=(e,t)=>((e,t)=>{const o=Qt(t);return{extract:(e,t)=>o().extract(e,t),toString:()=>o().toString()}})(0,t),is=vn,ls=(e,t)=>({tag:"custom",newKey:e,instantiator:t}),cs=e=>Qn((t=>R(e,t)?on.value(t):on.error(`Unsupported value: "${t}", choose one of "${e.join(", ")}".`))),ds=e=>is(e,e,{tag:"required",process:{}},Wn()),us=(e,t)=>is(e,e,{tag:"required",process:{}},t),ms=e=>us(e,Gn),gs=e=>us(e,$n),ps=(e,t)=>is(e,e,{tag:"required",process:{}},cs(t)),hs=e=>us(e,Yn),fs=(e,t)=>is(e,e,{tag:"required",process:{}},zn(t)),bs=(e,t)=>is(e,e,{tag:"required",process:{}},Un(t)),vs=(e,t)=>is(e,e,{tag:"required",process:{}},Ln(t)),ys=e=>is(e,e,{tag:"option",process:{}},Wn()),xs=(e,t)=>is(e,e,{tag:"option",process:{}},t),ws=e=>xs(e,Gn),Ss=e=>xs(e,$n),ks=(e,t)=>xs(e,cs(t)),Cs=e=>xs(e,Yn),Os=(e,t)=>xs(e,Ln(t)),_s=(e,t)=>xs(e,zn(t)),Ts=(e,t)=>is(e,e,Cn(t),Wn()),Es=(e,t,o)=>is(e,e,Cn(t),o),Ds=(e,t)=>Es(e,t,Gn),As=(e,t)=>Es(e,t,$n),Ms=(e,t,o)=>Es(e,t,cs(o)),Bs=(e,t)=>Es(e,t,qn),Is=(e,t)=>Es(e,t,Yn),Fs=(e,t,o)=>Es(e,t,Ln(o)),Rs=(e,t,o)=>Es(e,t,zn(o)),Ns=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},Vs=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 H(e,((n,s)=>{const r=ae(n);if(1!==r.length)throw new Error("one and only one name per case");const a=r[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[s].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(!X(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};Vs([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);const zs=(e,t)=>((e,t)=>{const o={};return le(e,((e,n)=>{R(t,n)||(o[n]=e)})),o})(e,t),Ls=(e,t)=>((e,t)=>({[e]:t}))(e,t),Hs=e=>(e=>{const t={};return H(e,(e=>{t[e.key]=e.value})),t})(e),Ps=(e,t)=>{const o=(e=>{const t=[],o=[];return H(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,on.error(q(n))):((e,t)=>0===e.length?on.value(t):on.value(wn(t,Sn.apply(void 0,e))))(o.values,t);var n},Us=e=>p(e)?e:T,Ws=(e,t,o)=>{let n=e.dom;const s=Us(o);for(;n.parentNode;){n=n.parentNode;const e=Re.fromDom(n),o=t(e);if(o.isSome())return o;if(s(e))break}return D.none()},js=(e,t,o)=>{const n=t(e),s=Us(o);return n.orThunk((()=>s(e)?D.none():Ws(e,t,s)))},Gs=(e,t)=>Je(e.element,t.event.target),$s={can:E,abort:T,run:b},qs=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{...$s,...e}},Ys=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)=>{H(e,(e=>{e.run.apply(void 0,t)}))}}},Xs=x,Ks=Xs("touchstart"),Js=Xs("touchmove"),Zs=Xs("touchend"),Qs=Xs("touchcancel"),er=Xs("mousedown"),tr=Xs("mousemove"),or=Xs("mouseout"),nr=Xs("mouseup"),sr=Xs("mouseover"),rr=Xs("focusin"),ar=Xs("focusout"),ir=Xs("keydown"),lr=Xs("keyup"),cr=Xs("input"),dr=Xs("change"),ur=Xs("click"),mr=Xs("transitioncancel"),gr=Xs("transitionend"),pr=Xs("transitionstart"),hr=Xs("selectstart"),fr=e=>x("alloy."+e),br={tap:fr("tap")},vr=fr("focus"),yr=fr("blur.post"),xr=fr("paste.post"),wr=fr("receive"),Sr=fr("execute"),kr=fr("focus.item"),Cr=br.tap,Or=fr("longpress"),_r=fr("sandbox.close"),Tr=fr("typeahead.cancel"),Er=fr("system.init"),Dr=fr("system.touchmove"),Ar=fr("system.touchend"),Mr=fr("system.scroll"),Br=fr("system.resize"),Ir=fr("system.attached"),Fr=fr("system.detached"),Rr=fr("system.dismissRequested"),Nr=fr("system.repositionRequested"),Vr=fr("focusmanager.shifted"),zr=fr("slotcontainer.visibility"),Lr=fr("system.external.element.scroll"),Hr=fr("change.tab"),Pr=fr("dismiss.tab"),Ur=fr("highlight"),Wr=fr("dehighlight"),jr=(e,t)=>{Yr(e,e.element,t,{})},Gr=(e,t,o)=>{Yr(e,e.element,t,o)},$r=e=>{jr(e,Sr())},qr=(e,t,o)=>{Yr(e,t,o,{})},Yr=(e,t,o,n)=>{const s={target:t,...n};e.getSystem().triggerEvent(o,t,s)},Xr=(e,t,o,n)=>{e.getSystem().triggerEvent(o,t,n.event)},Kr=e=>Hs(e),Jr=(e,t)=>({key:e,value:qs({abort:t})}),Zr=e=>({key:e,value:qs({run:(e,t)=>{t.event.prevent()}})}),Qr=(e,t)=>({key:e,value:qs({run:t})}),ea=(e,t,o)=>({key:e,value:qs({run:(e,n)=>{t.apply(void 0,[e,n].concat(o))}})}),ta=e=>t=>({key:e,value:qs({run:(e,o)=>{Gs(e,o)&&t(e,o)}})}),oa=(e,t,o)=>((e,t)=>Qr(e,((o,n)=>{o.getSystem().getByUid(t).each((t=>{Xr(t,t.element,e,n)}))})))(e,t.partUids[o]),na=(e,t)=>Qr(e,((e,o)=>{const n=o.event,s=e.getSystem().getByDom(n.target).getOrThunk((()=>js(n.target,(t=>e.getSystem().getByDom(t).toOptional()),T).getOr(e)));t(e,s,o)})),sa=e=>Qr(e,((e,t)=>{t.cut()})),ra=e=>Qr(e,((e,t)=>{t.stop()})),aa=(e,t)=>ta(e)(t),ia=ta(Ir()),la=ta(Fr()),ca=ta(Er()),da=(e=>t=>Qr(e,t))(Sr()),ua=e=>e.dom.innerHTML,ma=(e,t)=>{const o=Qe(e).dom,n=Re.fromDom(o.createDocumentFragment()),s=((e,t)=>{const o=(t||document).createElement("div");return o.innerHTML=e,at(Re.fromDom(o))})(t,o);Vo(n,s),zo(e),No(e,n)},ga=(e,t)=>Re.fromDom(e.dom.cloneNode(t)),pa=e=>{if(ut(e))return"#shadow-root";{const t=(e=>ga(e,!1))(e);return(e=>{const t=Re.fromTag("div"),o=Re.fromDom(e.dom.cloneNode(!0));return No(t,o),ua(t)})(t)}},ha=e=>pa(e),fa=Kr([((e,t)=>({key:e,value:qs({can:t})}))(vr(),((e,t)=>{const o=t.event,n=o.originator,s=o.target;return!((e,t,o)=>Je(t,e.element)&&!Je(t,o))(e,n,s)||(console.warn(vr()+" did not get interpreted by the desired target. \nOriginator: "+ha(n)+"\nTarget: "+ha(s)+"\nCheck the "+vr()+" event handlers"),!1)}))]);var ba=Object.freeze({__proto__:null,events:fa});let va=0;const ya=e=>{const t=(new Date).getTime(),o=Math.floor(1e9*Math.random());return va++,e+"_"+o+va+String(t)},xa=x("alloy-id-"),wa=x("data-alloy-id"),Sa=xa(),ka=wa(),Ca=(e,t)=>{Object.defineProperty(e.dom,ka,{value:t,writable:!0})},Oa=e=>{const t=je(e)?e.dom[ka]:null;return D.from(t)},_a=e=>ya(e),Ta=w,Ea=e=>{const t=t=>`The component must be in a context to execute: ${t}`+(e?"\n"+ha(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}},Da=Ea(),Aa=e=>L(e,(e=>De(e,"/*")?e.substring(0,e.length-"/*".length):e)),Ma=(e,t)=>{const o=e.toString(),n=o.indexOf(")")+1,s=o.indexOf("("),r=o.substring(s+1,n-1).split(/,\s*/);return e.toFunctionAnnotation=()=>({name:t,parameters:Aa(r)}),e},Ba=ya("alloy-premade"),Ia=e=>(Object.defineProperty(e.element.dom,Ba,{value:e.uid,writable:!0}),Ls(Ba,e)),Fa=e=>be(e,Ba),Ra=e=>((e,t)=>{const o=t.toString(),n=o.indexOf(")")+1,s=o.indexOf("("),r=o.substring(s+1,n-1).split(/,\s*/);return e.toFunctionAnnotation=()=>({name:"OVERRIDE",parameters:Aa(r.slice(1))}),e})(((t,...o)=>e(t.getApis(),t,...o)),e),Na={init:()=>Va({readState:x("No State required")})},Va=e=>e,za=(e,t)=>{const o={};return le(e,((e,n)=>{le(e,((e,s)=>{const r=be(o,s).getOr([]);o[s]=r.concat([t(n,e)])}))})),o},La=e=>({classes:u(e.classes)?[]:e.classes,attributes:u(e.attributes)?{}:e.attributes,styles:u(e.styles)?{}:e.styles}),Ha=e=>e.cHandler,Pa=(e,t)=>({name:e,handler:t}),Ua=(e,t)=>{const o={};return H(e,(e=>{o[e.name()]=e.handlers(t)})),o},Wa=(e,t,o,n)=>{const s=((e,t,o)=>{const n={...o,...Ua(t,e)};return za(n,Pa)})(e,o,n);return $a(s,t)},ja=e=>{const t=(e=>p(e)?{can:E,abort:T,run:e}:e)(e);return(e,o,...n)=>{const s=[e,o].concat(n);t.abort.apply(void 0,s)?o.stop():t.can.apply(void 0,s)&&t.run.apply(void 0,s)}},Ga=(e,t,o)=>{const n=t[o];return n?((e,t,o,n)=>{try{const s=ee(o,((o,s)=>{const r=o[t],a=s[t],i=n.indexOf(r),l=n.indexOf(a);if(-1===i)throw new Error("The ordering for "+e+" does not have an entry for "+r+".\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 on.value(s)}catch(e){return on.error([e])}})("Event: "+o,"name",e,n).map((e=>{const t=L(e,(e=>e.handler));return Ys(t)})):((e,t)=>on.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(L(t,(e=>e.name)),null,2)]))(o,e)},$a=(e,t)=>{const o=pe(e,((e,o)=>(1===e.length?on.value(e[0].handler):Ga(e,t,o)).map((n=>{const s=ja(n),r=e.length>1?U(t[o],(t=>N(e,(e=>e.name===t)))).join(" > "):e[0].name;return Ls(o,((e,t)=>({handler:e,purpose:t}))(s,r))}))));return Ps(o,{})},qa="alloy.base.behaviour",Ya=zn([is("dom","dom",{tag:"required",process:{}},zn([ds("tag"),Ts("styles",{}),Ts("classes",[]),Ts("attributes",{}),ys("value"),ys("innerHtml")])),ds("components"),ds("uid"),Ts("events",{}),Ts("apis",{}),is("eventOrder","eventOrder",(e=>On(x(e)))({[Sr()]:["disabling",qa,"toggling","typeaheadevents"],[vr()]:[qa,"focusing","keying"],[Er()]:[qa,"disabling","toggling","representing"],[cr()]:[qa,"representing","streaming","invalidating"],[Fr()]:[qa,"representing","item-events","tooltipping"],[er()]:["focusing",qa,"item-type-events"],[Ks()]:["focusing",qa,"item-type-events"],[sr()]:["item-type-events","tooltipping"],[wr()]:["receiving","reflecting","tooltipping"]}),Wn()),ys("domModification")]),Xa=e=>e.events,Ka=(e,t)=>{const o=Ot(e,t);return void 0===o||""===o?[]:o.split(" ")},Ja=e=>void 0!==e.dom.classList,Za=e=>Ka(e,"class"),Qa=(e,t)=>((e,t,o)=>{const n=Ka(e,t).concat([o]);return kt(e,t,n.join(" ")),!0})(e,"class",t),ei=(e,t)=>((e,t,o)=>{const n=U(Ka(e,t),(e=>e!==o));return n.length>0?kt(e,t,n.join(" ")):Et(e,t),!1})(e,"class",t),ti=(e,t)=>{Ja(e)?e.dom.classList.add(t):Qa(e,t)},oi=e=>{0===(Ja(e)?e.dom.classList:Za(e)).length&&Et(e,"class")},ni=(e,t)=>{if(Ja(e)){e.dom.classList.remove(t)}else ei(e,t);oi(e)},si=(e,t)=>{const o=Ja(e)?e.dom.classList.toggle(t):((e,t)=>R(Za(e),t)?ei(e,t):Qa(e,t))(e,t);return oi(e),o},ri=(e,t)=>Ja(e)&&e.dom.classList.contains(t),ai=(e,t)=>{H(t,(t=>{ti(e,t)}))},ii=(e,t)=>{H(t,(t=>{ni(e,t)}))},li=e=>Ja(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):Za(e),ci=e=>e.dom.value,di=(e,t)=>{if(void 0===t)throw new Error("Value.set was undefined");e.dom.value=t},ui=(e,t,o)=>{o.fold((()=>No(e,t)),(e=>{Je(e,t)||(Io(e,t),Lo(e))}))},mi=(e,t,o)=>{const n=L(t,o),s=at(e);return H(s.slice(n.length),Lo),n},gi=(e,t,o,n)=>{const s=it(e,t),r=n(o,s),a=((e,t,o)=>it(e,t).map((e=>{if(o.exists((t=>!Je(t,e)))){const t=o.map(Pe).getOr("span"),n=Re.fromTag(t);return Io(e,n),n}return e})))(e,t,s);return ui(e,r.element,a),r},pi=(e,t)=>{const o=ae(e),n=ae(t),s=J(n,o),r=((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:s,toSet:r}},hi=(e,t)=>{const{class:o,style:n,...s}=(e=>j(e.dom.attributes,((e,t)=>(e[t.name]=t.value,e)),{}))(t),{toSet:r,toRemove:a}=pi(e.attributes,s),i=Vt(t),{toSet:l,toRemove:c}=pi(e.styles,i),d=li(t),u=J(d,e.classes),m=J(e.classes,d);return H(a,(e=>Et(t,e))),Ct(t,r),ai(t,m),ii(t,u),H(c,(e=>Lt(t,e))),Bt(t,l),e.innerHtml.fold((()=>{const o=e.domChildren;((e,t)=>{mi(e,t,((t,o)=>{const n=it(e,o);return ui(e,t,n),t}))})(t,o)}),(e=>{ma(t,e)})),(()=>{const o=t,n=e.value.getOrUndefined();n!==ci(o)&&di(o,null!=n?n:"")})(),t},fi=(e,t)=>{const o=t.filter((t=>Pe(t)===e.tag&&!(e=>e.innerHtml.isSome()&&e.domChildren.length>0)(e)&&!(e=>ve(e.dom,Ba))(t))).bind((t=>((e,t)=>{try{const o=hi(e,t);return D.some(o)}catch(e){return D.none()}})(e,t))).getOrThunk((()=>(e=>{const t=Re.fromTag(e.tag);Ct(t,e.attributes),ai(t,e.classes),Bt(t,e.styles),e.innerHtml.each((e=>ma(t,e)));const o=e.domChildren;return Vo(t,o),e.value.each((e=>{di(t,e)})),t})(e)));return Ca(o,e.uid),o},bi=(e,t)=>((e,t)=>{const o=L(t,(e=>_s(e.name(),[ds("config"),Ts("state",Na)]))),n=ts("component.behaviours",zn(o),e.behaviours).fold((t=>{throw new Error(ss(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),vi=e=>{const t=(e=>{const t=be(e,"behaviours").getOr({});return Y(ae(t),(e=>{const o=t[e];return g(o)?[o.me]:[]}))})(e);return bi(e,t)},yi=(e,t,o)=>{const n={...(s=e).dom,uid:s.uid,domChildren:L(s.components,(e=>e.element))};var s;const r=(e=>e.domModification.fold((()=>La({})),La))(e),a={"alloy.base.modification":r},i=t.length>0?((e,t,o,n)=>{const s={...t};H(o,(t=>{s[t.name()]=t.exhibit(e,n)}));const r=za(s,((e,t)=>({name:e,modification:t}))),a=e=>W(e,((e,t)=>({...t.modification,...e})),{}),i=W(r.classes,((e,t)=>t.modification.concat(e)),[]),l=a(r.attributes),c=a(r.styles);return La({classes:i,attributes:l,styles:c})})(o,a,t,n):r;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},xi=(e,t)=>{const o=()=>m,n=Ns(Da),s=os((e=>ts("custom.definition",Ya,e))(e)),r=vi(e),a=(e=>e.list)(r),i=(e=>e.data)(r),l=yi(s,a,i),c=fi(l,t),d=((e,t,o)=>{const n={"alloy.base.behaviour":Xa(e)};return Wa(o,e.eventOrder,t,n).getOrDie()})(s,a,i),u=Ns(s.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:()=>s.apis,connect:e=>{n.set(e)},disconnect:()=>{n.set(Ea(o))},element:c,syncComponents:()=>{const e=at(c),t=Y(e,(e=>n.get().getByDom(e).fold((()=>[]),Q)));u.set(t)},components:u.get,events:d};return m},wi=(e,t)=>{const{events:o,...n}=Ta(e),s=((e,t)=>{const o=be(e,"components").getOr([]);return t.fold((()=>L(o,_i)),(e=>L(o,((t,o)=>Oi(t,it(e,o))))))})(n,t),r={...n,events:{...ba,...o},components:s};return on.value(xi(r,t))},Si=e=>{const t=Re.fromText(e);return ki({element:t})},ki=e=>{const t=ns("external.component",Vn([ds("element"),ys("uid")]),e),o=Ns(Ea()),n=t.uid.getOrThunk((()=>_a("external")));Ca(t.element,n);const s={uid:n,getSystem:o.get,config:D.none,hasConfigured:T,connect:e=>{o.set(e)},disconnect:()=>{o.set(Ea((()=>s)))},getApis:()=>({}),element:t.element,spec:e,readState:x("No state"),syncComponents:b,components:x([]),events:{}};return Ia(s)},Ci=_a,Oi=(e,t)=>Fa(e).getOrThunk((()=>{const o=(e=>ve(e,"uid"))(e)?e:{uid:Ci(""),...e};return wi(o,t).getOrDie()})),_i=e=>Oi(e,D.none()),Ti=Ia;var Ei=(e,t,o,n,s)=>e(o,n)?D.some(o):p(s)&&s(o)?D.none():t(o,n,s);const Di=(e,t,o)=>{let n=e.dom;const s=p(o)?o:T;for(;n.parentNode;){n=n.parentNode;const e=Re.fromDom(n);if(t(e))return D.some(e);if(s(e))break}return D.none()},Ai=(e,t,o)=>Ei(((e,t)=>t(e)),Di,e,t,o),Mi=(e,t,o)=>Ai(e,t,o).isSome(),Bi=(e,t,o)=>Di(e,(e=>Xe(e,t)),o),Ii=(e,t)=>((e,t)=>G(e.dom.childNodes,(e=>t(Re.fromDom(e)))).map(Re.fromDom))(e,(e=>Xe(e,t))),Fi=(e,t)=>((e,t)=>{const o=void 0===t?document:t.dom;return Ke(o)?D.none():D.from(o.querySelector(e)).map(Re.fromDom)})(t,e),Ri=(e,t,o)=>Ei(((e,t)=>Xe(e,t)),Bi,e,t,o),Ni="aria-controls",Vi=()=>{const e=ya(Ni);return{id:e,link:t=>{kt(t,Ni,e)},unlink:e=>{Et(e,Ni)}}},zi=(e,t)=>(e=>Ai(e,(e=>{if(!je(e))return!1;const t=Ot(e,"id");return void 0!==t&&t.indexOf(Ni)>-1})).bind((e=>{const t=Ot(e,"id"),o=pt(e);return Fi(o,`[${Ni}="${t}"]`)})))(t).exists((t=>Li(e,t))),Li=(e,t)=>Mi(t,(t=>Je(t,e.element)),T)||zi(e,t),Hi="unknown";var Pi;!function(e){e[e.STOP=0]="STOP",e[e.NORMAL=1]="NORMAL",e[e.LOGGING=2]="LOGGING"}(Pi||(Pi={}));const Ui=Ns({}),Wi=(e,t,o)=>{switch(be(Ui.get(),e).orThunk((()=>{const t=ae(Ui.get());return re(t,(t=>e.indexOf(t)>-1?D.some(Ui.get()[t]):D.none()))})).getOr(Pi.NORMAL)){case Pi.NORMAL:return o($i());case Pi.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 s=(new Date).getTime();R(["mousemove","mouseover","mouseout",Er()],e)||console.log(e,{event:e,time:s-n,target:t.dom,sequence:L(o,(e=>R(["cut","stopped","response"],e.outcome)?"{"+e.purpose+"} "+e.outcome+" at ("+ha(e.target)+")":e.outcome))})}}})(e,t),s=o(n);return n.write(),s}case Pi.STOP:return!0}},ji=["alloy/data/Fields","alloy/debugging/Debugging"],Gi=(e,t,o)=>Wi(e,t,o),$i=x({logEventCut:b,logEventStopped:b,logNoParent:b,logEventNoHandlers:b,logEventResponse:b,write:b}),qi=x([ds("menu"),ds("selectedMenu")]),Yi=x([ds("item"),ds("selectedItem")]);x(zn(Yi().concat(qi())));const Xi=x(zn(Yi())),Ki=fs("initSize",[ds("numColumns"),ds("numRows")]),Ji=()=>fs("markers",[ds("backgroundMenu")].concat(qi()).concat(Yi())),Zi=e=>fs("markers",L(e,ds)),Qi=(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(ji,(t=>e.indexOf(t)>-1)))).getOr(Hi)}})(),is(t,t,o,Qn((e=>on.value(((...t)=>e.apply(void 0,t))))))),el=e=>Qi(0,e,Cn(b)),tl=e=>Qi(0,e,Cn(D.none)),ol=e=>Qi(0,e,{tag:"required",process:{}}),nl=e=>Qi(0,e,{tag:"required",process:{}}),sl=(e,t)=>ls(e,x(t)),rl=e=>ls(e,w),al=x(Ki),il=(e,t,o,n,s,r,a,i=!1)=>({x:e,y:t,bubble:o,direction:n,placement:s,restriction:r,label:`${a}-${s}`,alwaysFit:i}),ll=Vs([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),cl=ll.southeast,dl=ll.southwest,ul=ll.northeast,ml=ll.northwest,gl=ll.south,pl=ll.north,hl=ll.east,fl=ll.west,bl=(e,t,o,n)=>{const s=e+t;return s>n?o:s<o?n:s},vl=(e,t,o)=>Math.min(Math.max(e,t),o),yl=(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))))),xl="layout",wl=e=>e.x,Sl=(e,t)=>e.x+e.width/2-t.width/2,kl=(e,t)=>e.x+e.width-t.width,Cl=(e,t)=>e.y-t.height,Ol=e=>e.y+e.height,_l=(e,t)=>e.y+e.height/2-t.height/2,Tl=(e,t,o)=>il(wl(e),Ol(e),o.southeast(),cl(),"southeast",yl(e,{left:1,top:3}),xl),El=(e,t,o)=>il(kl(e,t),Ol(e),o.southwest(),dl(),"southwest",yl(e,{right:0,top:3}),xl),Dl=(e,t,o)=>il(wl(e),Cl(e,t),o.northeast(),ul(),"northeast",yl(e,{left:1,bottom:2}),xl),Al=(e,t,o)=>il(kl(e,t),Cl(e,t),o.northwest(),ml(),"northwest",yl(e,{right:0,bottom:2}),xl),Ml=(e,t,o)=>il(Sl(e,t),Cl(e,t),o.north(),pl(),"north",yl(e,{bottom:2}),xl),Bl=(e,t,o)=>il(Sl(e,t),Ol(e),o.south(),gl(),"south",yl(e,{top:3}),xl),Il=(e,t,o)=>il((e=>e.x+e.width)(e),_l(e,t),o.east(),hl(),"east",yl(e,{left:0}),xl),Fl=(e,t,o)=>il(((e,t)=>e.x-t.width)(e,t),_l(e,t),o.west(),fl(),"west",yl(e,{right:1}),xl),Rl=()=>[Tl,El,Dl,Al,Bl,Ml,Il,Fl],Nl=()=>[El,Tl,Al,Dl,Bl,Ml,Il,Fl],Vl=()=>[Dl,Al,Tl,El,Ml,Bl],zl=()=>[Al,Dl,El,Tl,Ml,Bl],Ll=()=>[Tl,El,Dl,Al,Bl,Ml],Hl=()=>[El,Tl,Al,Dl,Bl,Ml];var Pl=Object.freeze({__proto__:null,events:e=>Kr([Qr(wr(),((t,o)=>{const n=e.channels,s=ae(n),r=o,a=((e,t)=>t.universal?e:U(e,(e=>R(t.channels,e))))(s,r);H(a,(e=>{const o=n[e],s=o.schema,a=ns("channel["+e+"] data\nReceiver: "+ha(t.element),s,r.data);o.onReceive(t,a)}))}))])}),Ul=[us("channels",es(on.value,Vn([ol("onReceive"),Ts("schema",Wn())])))];const Wl=(e,t,o)=>ca(((n,s)=>{o(n,e,t)})),jl=(e,t,o)=>((e,t,o)=>{const n=o.toString(),s=n.indexOf(")")+1,r=n.indexOf("("),a=n.substring(r+1,s-1).split(/,\s*/);return e.toFunctionAnnotation=()=>({name:t,parameters:Aa(a.slice(0,1).concat(a.slice(3)))}),e})(((n,...s)=>{const r=[n].concat(s);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(r,1);return t.apply(void 0,[n,e.config,e.state].concat(o))}))}),o,t),Gl=e=>({key:e,value:void 0}),$l=(e,t,o,n,s,r,a)=>{const i=e=>ye(e,o)?e[o]():D.none(),l=ce(s,((e,t)=>jl(o,e,t))),c={...ce(r,((e,t)=>Ma(e,t))),...l,revoke:k(Gl,o),config:t=>{const n=ns(o+"-config",e,t);return{key:o,value:{config:n,me:c,configAsRaw:Qt((()=>ns(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((()=>La({}))),name:x(o),handlers:e=>i(e).map((e=>be(n,"events").getOr((()=>({})))(e.config,e.state))).getOr({})};return c},ql=e=>Hs(e),Yl=Vn([ds("fields"),ds("name"),Ts("active",{}),Ts("apis",{}),Ts("state",Na),Ts("extra",{})]),Xl=e=>{const t=ns("Creating behaviour: "+e.name,Yl,e);return((e,t,o,n,s,r)=>{const a=Vn(e),i=_s(t,[(l="config",c=e,xs(l,Vn(c)))]);var l,c;return $l(a,i,t,o,n,s,r)})(t.fields,t.name,t.active,t.apis,t.extra,t.state)},Kl=Vn([ds("branchKey"),ds("branches"),ds("name"),Ts("active",{}),Ts("apis",{}),Ts("state",Na),Ts("extra",{})]),Jl=e=>{const t=ns("Creating behaviour: "+e.name,Kl,e);return((e,t,o,n,s,r)=>{const a=e,i=_s(t,[xs("config",e)]);return $l(a,i,t,o,n,s,r)})(rs(t.branchKey,t.branches),t.name,t.active,t.apis,t.extra,t.state)},Zl=x(void 0),Ql=Xl({fields:Ul,name:"receiving",active:Pl});var ec=Object.freeze({__proto__:null,exhibit:(e,t)=>La({classes:[],styles:t.useFixed()?{}:{position:"relative"}})});const tc=(e,t=!1)=>e.dom.focus({preventScroll:t}),oc=e=>e.dom.blur(),nc=e=>{const t=pt(e).dom;return e.dom===t.activeElement},sc=(e=jo())=>D.from(e.dom.activeElement).map(Re.fromDom),rc=e=>sc(pt(e)).filter((t=>e.dom.contains(t.dom))),ac=(e,t)=>{const o=pt(t),n=sc(o).bind((e=>{const o=t=>Je(e,t);return o(t)?D.some(t):((e,t)=>{const o=e=>{for(let n=0;n<e.childNodes.length;n++){const s=Re.fromDom(e.childNodes[n]);if(t(s))return D.some(s);const r=o(e.childNodes[n]);if(r.isSome())return r}return D.none()};return o(e.dom)})(t,o)})),s=e(t);return n.each((e=>{sc(o).filter((t=>Je(t,e))).fold((()=>{tc(e)}),b)})),s},ic=(e,t,o,n,s)=>{const r=e=>e+"px";return{position:e,left:t.map(r),top:o.map(r),right:n.map(r),bottom:s.map(r)}},lc=(e,t)=>{It(e,(e=>({...e,position:D.some(e.position)}))(t))},cc=Vs([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),dc=(e,t,o,n,s,r)=>{const a=t.rect,i=a.x-o,l=a.y-n,c=s-(i+a.width),d=r-(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,s,r,a,i,l)=>e.fold(t,o,n,s,r,a,i,l))(t.direction,(()=>ic(e,u,m,h,h)),(()=>ic(e,h,m,g,h)),(()=>ic(e,u,h,h,p)),(()=>ic(e,h,h,g,p)),(()=>ic(e,u,m,h,h)),(()=>ic(e,u,h,h,p)),(()=>ic(e,u,m,h,h)),(()=>ic(e,h,m,g,h)))},uc=(e,t)=>e.fold((()=>{const e=t.rect;return ic("absolute",D.some(e.x),D.some(e.y),D.none(),D.none())}),((e,o,n,s)=>dc("absolute",t,e,o,n,s)),((e,o,n,s)=>dc("fixed",t,e,o,n,s))),mc=(e,t)=>{const o=k(qo,t),n=e.fold(o,o,(()=>{const e=Ho();return qo(t).translate(-e.left,-e.top)})),s=Zt(t),r=jt(t);return Yo(n.left,n.top,s,r)},gc=(e,t)=>t.fold((()=>e.fold(Zo,Zo,Yo)),(t=>e.fold(x(t),x(t),(()=>{const o=pc(e,t.x,t.y);return Yo(o.left,o.top,t.width,t.height)})))),pc=(e,t,o)=>{const n=$t(t,o);return e.fold(x(n),x(n),(()=>{const e=Ho();return n.translate(-e.left,-e.top)}))};cc.none;const hc=cc.relative,fc=cc.fixed,bc=(e,t)=>((e,t)=>({anchorBox:e,origin:t}))(e,t),vc="data-alloy-placement",yc=e=>_t(e,vc),xc=Vs([{fit:["reposition"]},{nofit:["reposition","visibleW","visibleH","isVisible"]}]),wc=(e,t,o,n)=>{const s=e.bubble,r=s.offset,a=((e,t,o)=>{const n=(n,s)=>t[n].map((t=>{const r="top"===n||"bottom"===n,a=r?o.top:o.left,i=("left"===n||"top"===n?Math.max:Math.min)(t,s)+a;return r?vl(i,e.y,e.bottom):vl(i,e.x,e.right)})).getOr(s),s=n("left",e.x),r=n("top",e.y),a=n("right",e.right),i=n("bottom",e.bottom);return Yo(s,r,a-s,i-r)})(n,e.restriction,r),i=e.x+r.left,l=e.y+r.top,c=Yo(i,l,t,o),{originInBounds:d,sizeInBounds:u,visibleW:m,visibleH:g}=((e,t)=>{const{x:o,y:n,right:s,bottom:r}=t,{x:a,y:i,right:l,bottom:c,width:d,height:u}=e;return{originInBounds:a>=o&&a<=s&&i>=n&&i<=r,sizeInBounds:l<=s&&l>=o&&c<=r&&c>=n,visibleW:Math.min(d,a>=o?s-a:l-o),visibleH:Math.min(u,i>=n?r-i:c-n)}})(c,a),p=d&&u,h=p?c:((e,t)=>{const{x:o,y:n,right:s,bottom:r}=t,{x:a,y:i,width:l,height:c}=e,d=Math.max(o,s-l),u=Math.max(n,r-c),m=vl(a,o,d),g=vl(i,n,u),p=Math.min(m+l,s)-m,h=Math.min(g+c,r)-g;return Yo(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),s=x(o.bottom-t.y),r=((e,t,o,n)=>e.fold(t,t,n,n,t,n,o,o))(e,s,s,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:r}})(e.direction,h,n),y={rect:h,maxHeight:v,maxWidth:b,direction:e.direction,placement:e.placement,classes:{on:s.classesOn,off:s.classesOff},layout:e.label,testY:l};return p||e.alwaysFit?xc.fit(y):xc.nofit(y,m,g,f)},Sc=e=>{const t=Ns(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))}}},kc=()=>Sc((e=>e.unbind())),Cc=()=>{const e=Sc(b);return{...e,on:t=>e.get().each(t)}},Oc=E,_c=(e,t,o)=>((e,t,o,n)=>Mo(e,t,o,n,!1))(e,t,Oc,o),Tc=(e,t,o)=>((e,t,o,n)=>Mo(e,t,o,n,!0))(e,t,Oc,o),Ec=Ao,Dc=["top","bottom","right","left"],Ac="data-alloy-transition-timer",Mc=(e,t)=>((e,t)=>X(t,(t=>ri(e,t))))(e,t.classes),Bc=(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()},Ic=(e,t)=>{const o=kc(),n=kc();let s;const a=t=>{var o;const n=null!==(o=t.raw.pseudoElement)&&void 0!==o?o:"";return Je(t.target,e)&&Be(n)&&R(Dc,t.raw.propertyName)},i=r=>{if(m(r)||a(r)){o.clear(),n.clear();const a=null==r?void 0:r.raw.type;(m(a)||a===gr())&&(clearTimeout(s),Et(e,Ac),ii(e,t.classes))}},l=_c(e,pr(),(t=>{a(t)&&(l.unbind(),o.set(_c(e,gr(),i)),n.set(_c(e,mr(),i)))})),c=(e=>{const t=t=>{const o=Ft(e,t).split(/\s*,\s*/);return U(o,Me)},o=e=>{if(r(e)&&/^[\d.]+/.test(e)){const t=parseFloat(e);return De(e,"ms")?t:1e3*t}return 0},n=t("transition-delay"),s=t("transition-duration");return j(s,((e,t,s)=>{const r=o(n[s])+o(t);return Math.max(e,r)}),0)})(e);requestAnimationFrame((()=>{s=setTimeout(i,c+17),kt(e,Ac,s)}))},Fc=(e,t,o,n,s,r)=>{const a=((e,t,o)=>o.exists((o=>{const n=e.mode;return"all"===n||o[n]!==t[n]})))(n,s,r);if(a||Mc(e,n)){Mt(e,"position",o.position);const r=mc(t,e),i=uc(t,{...s,rect:r}),l=Z(Dc,(e=>i[e]));Bc(o,l)&&(It(e,l),a&&((e,t)=>{ai(e,t.classes),_t(e,Ac).each((t=>{clearTimeout(parseInt(t,10)),Et(e,Ac)})),Ic(e,t)})(e,n),Ht(e))}else ii(e,n.classes)},Rc=(e,t,o,n)=>{Lt(t,"max-height"),Lt(t,"max-width");const s={width:Zt(r=t),height:jt(r)};var r;return((e,t,o,n,s,r)=>{const a=n.width,i=n.height,l=(t,l,c,d,u)=>{const m=t(o,n,s,e,r),g=wc(m,a,i,r);return g.fold(x(g),((e,t,o,n)=>(u===n?o>d||t>c:!u&&n)?g:xc.nofit(l,c,d,u)))},c=j(t,((e,t)=>{const o=k(l,t);return e.fold(x(e),o)}),xc.nofit({rect:o,maxHeight:n.height,maxWidth:n.width,direction:cl(),placement:"southeast",classes:{on:[],off:[]},layout:"none",testY:o.y},-1,-1,!1));return c.fold(w,w)})(t,n.preference,e,s,o,n.bounds)},Nc=(e,t)=>{((e,t)=>{kt(e,vc,t)})(e,t.placement)},Vc=(e,t)=>{((e,t)=>{const o=Ut.max(e,t,["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"]);Mt(e,"max-height",o+"px")})(e,Math.floor(t))},zc=x(((e,t)=>{Vc(e,t),Bt(e,{"overflow-x":"hidden","overflow-y":"auto"})})),Lc=x(((e,t)=>{Vc(e,t)})),Hc=(e,t,o)=>void 0===e[t]?o:e[t],Pc=(e,t,o,n)=>{const s=Rc(e,t,o,n);return((e,t,o)=>{const n=uc(o.origin,t);o.transition.each((s=>{Fc(e,o.origin,n,s,t,o.lastPlacement)})),lc(e,n)})(t,s,n),Nc(t,s),((e,t)=>{const o=t.classes;ii(e,o.off),ai(e,o.on)})(t,s),((e,t,o)=>{(0,o.maxHeightFunction)(e,t.maxHeight)})(t,s,n),((e,t,o)=>{(0,o.maxWidthFunction)(e,t.maxWidth)})(t,s,n),{layout:s.layout,placement:s.placement}},Uc=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right","inset"],Wc=(e,t,o,n=1)=>{const s=e*n,r=t*n,a=e=>be(o,e).getOr([]),i=(e,t,o)=>{const n=J(Uc,o);return{offset:$t(e,t),classesOn:Y(o,a),classesOff:Y(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(s,r,["top","alignLeft","inset"]),insetNorthwest:()=>i(-s,r,["top","alignRight","inset"]),insetNorth:()=>i(-s/2,r,["top","alignCentre","inset"]),insetSoutheast:()=>i(s,-r,["bottom","alignLeft","inset"]),insetSouthwest:()=>i(-s,-r,["bottom","alignRight","inset"]),insetSouth:()=>i(-s/2,-r,["bottom","alignCentre","inset"]),insetEast:()=>i(-s,-r/2,["valignCentre","right","inset"]),insetWest:()=>i(s,-r/2,["valignCentre","left","inset"])}},jc=()=>Wc(0,0,{}),Gc=w,$c=(e,t)=>o=>"rtl"===qc(o)?t:e,qc=e=>"rtl"===Ft(e,"direction")?"rtl":"ltr";var Yc;!function(e){e.TopToBottom="toptobottom",e.BottomToTop="bottomtotop"}(Yc||(Yc={}));const Xc="data-alloy-vertical-dir",Kc=e=>Mi(e,(e=>je(e)&&Ot(e,"data-alloy-vertical-dir")===Yc.BottomToTop)),Jc=()=>_s("layouts",[ds("onLtr"),ds("onRtl"),ys("onBottomLtr"),ys("onBottomRtl")]),Zc=(e,t,o,n,s,r,a)=>{const i=a.map(Kc).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(s):l.getOr(o),u=i?t.layouts.bind((t=>t.onBottomRtl.map((t=>t(e))))).or(c).getOr(r):c.getOr(n);return $c(d,u)(e)};var Qc=[ds("hotspot"),ys("bubble"),Ts("overrides",{}),Jc(),sl("placement",((e,t,o)=>{const n=t.hotspot,s=mc(o,n.element),r=Zc(e.element,t,Ll(),Hl(),Vl(),zl(),D.some(t.hotspot.element));return D.some(Gc({anchorBox:s,bubble:t.bubble.getOr(jc()),overrides:t.overrides,layouts:r}))}))];var ed=[ds("x"),ds("y"),Ts("height",0),Ts("width",0),Ts("bubble",jc()),Ts("overrides",{}),Jc(),sl("placement",((e,t,o)=>{const n=pc(o,t.x,t.y),s=Yo(n.left,n.top,t.width,t.height),r=Zc(e.element,t,Rl(),Nl(),Rl(),Nl(),D.none());return D.some(Gc({anchorBox:s,bubble:t.bubble,overrides:t.overrides,layouts:r}))}))];const td=Vs([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),od=e=>e.fold(w,((e,t,o)=>e.translate(-t,-o))),nd=e=>e.fold(w,w),sd=e=>j(e,((e,t)=>e.translate(t.left,t.top)),$t(0,0)),rd=e=>{const t=L(e,nd);return sd(t)},ad=td.screen,id=td.absolute,ld=(e,t,o)=>{const n=Qe(e.element),s=Ho(n),r=((e,t,o)=>{const n=ot(o.root).dom;return D.from(n.frameElement).map(Re.fromDom).filter((t=>{const o=Qe(t),n=Qe(e.element);return Je(o,n)})).map(Yt)})(e,0,o).getOr(s);return id(r,s.left,s.top)},cd=(e,t,o,n)=>{const s=ad($t(e,t));return D.some(((e,t,o)=>({point:e,width:t,height:o}))(s,o,n))},dd=(e,t,o,n,s)=>e.map((e=>{const r=[t,e.point],a=(i=()=>rd(r),l=()=>rd(r),c=()=>(e=>{const t=L(e,od);return sd(t)})(r),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?Vl():Ll(),m=o.showAbove?zl():Hl(),g=Zc(s,o,u,m,u,m,D.none());return Gc({anchorBox:d,bubble:o.bubble.getOr(jc()),overrides:o.overrides,layouts:g})}));var ud=[ds("node"),ds("root"),ys("bubble"),Jc(),Ts("overrides",{}),Ts("showAbove",!1),sl("placement",((e,t,o)=>{const n=ld(e,0,t);return t.node.filter(yt).bind((s=>{const r=s.dom.getBoundingClientRect(),a=cd(r.left,r.top,r.width,r.height),i=t.node.getOr(e.element);return dd(a,n,t,o,i)}))}))];const md=(e,t,o,n)=>({start:e,soffset:t,finish:o,foffset:n}),gd=Vs([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),pd=(gd.before,gd.on,gd.after,e=>e.fold(w,w,w)),hd=Vs([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),fd={domRange:hd.domRange,relative:hd.relative,exact:hd.exact,exactFromRange:e=>hd.exact(e.start,e.soffset,e.finish,e.foffset),getWin:e=>{const t=(e=>e.match({domRange:e=>Re.fromDom(e.startContainer),relative:(e,t)=>pd(e),exact:(e,t,o,n)=>e}))(e);return ot(t)},range:md},bd=(e,t,o)=>{const n=e.document.createRange();var s;return s=n,t.fold((e=>{s.setStartBefore(e.dom)}),((e,t)=>{s.setStart(e.dom,t)}),(e=>{s.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},vd=(e,t,o,n,s)=>{const r=e.document.createRange();return r.setStart(t.dom,o),r.setEnd(n.dom,s),r},yd=e=>({left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}),xd=Vs([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),wd=(e,t,o)=>t(Re.fromDom(o.startContainer),o.startOffset,Re.fromDom(o.endContainer),o.endOffset),Sd=(e,t)=>{const o=((e,t)=>t.match({domRange:e=>({ltr:x(e),rtl:D.none}),relative:(t,o)=>({ltr:Qt((()=>bd(e,t,o))),rtl:Qt((()=>D.some(bd(e,o,t))))}),exact:(t,o,n,s)=>({ltr:Qt((()=>vd(e,t,o,n,s))),rtl:Qt((()=>D.some(vd(e,n,s,t,o))))})}))(e,t);return((e,t)=>{const o=t.ltr();if(o.collapsed)return t.rtl().filter((e=>!1===e.collapsed)).map((e=>xd.rtl(Re.fromDom(e.endContainer),e.endOffset,Re.fromDom(e.startContainer),e.startOffset))).getOrThunk((()=>wd(0,xd.ltr,o)));return wd(0,xd.ltr,o)})(0,o)},kd=(e,t)=>Sd(e,t).match({ltr:(t,o,n,s)=>{const r=e.document.createRange();return r.setStart(t.dom,o),r.setEnd(n.dom,s),r},rtl:(t,o,n,s)=>{const r=e.document.createRange();return r.setStart(n.dom,s),r.setEnd(t.dom,o),r}});xd.ltr,xd.rtl;const Cd=(e,t,o)=>U(((e,t)=>{const o=p(t)?t:T;let n=e.dom;const s=[];for(;null!==n.parentNode&&void 0!==n.parentNode;){const e=n.parentNode,t=Re.fromDom(e);if(s.push(t),!0===o(t))break;n=e}return s})(e,o),t),Od=(e,t)=>((e,t)=>{const o=void 0===t?document:t.dom;return Ke(o)?[]:L(o.querySelectorAll(e),Re.fromDom)})(t,e),_d=(e,t,o,n)=>{const s=((e,t,o,n)=>{const s=Qe(e).dom.createRange();return s.setStart(e.dom,t),s.setEnd(o.dom,n),s})(e,t,o,n),r=Je(e,o)&&t===n;return s.collapsed&&!r},Td=e=>{if(e.rangeCount>0){const t=e.getRangeAt(0),o=e.getRangeAt(e.rangeCount-1);return D.some(md(Re.fromDom(t.startContainer),t.startOffset,Re.fromDom(o.endContainer),o.endOffset))}return D.none()},Ed=e=>{if(null===e.anchorNode||null===e.focusNode)return Td(e);{const t=Re.fromDom(e.anchorNode),o=Re.fromDom(e.focusNode);return _d(t,e.anchorOffset,o,e.focusOffset)?D.some(md(t,e.anchorOffset,o,e.focusOffset)):Td(e)}},Dd=e=>(e=>D.from(e.getSelection()))(e).filter((e=>e.rangeCount>0)).bind(Ed),Ad=(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(yd):D.none()})(kd(e,t)),Md=(e,t)=>(e=>{const t=e.getBoundingClientRect();return t.width>0||t.height>0?D.some(t).map(yd):D.none()})(kd(e,t)),Bd=((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}}})(Ge,"text"),Id=(e,t)=>({element:e,offset:t}),Fd=(e,t)=>{const o=at(e);if(0===o.length)return Id(e,t);if(t<o.length)return Id(o[t],0);{const e=o[o.length-1],t=Ge(e)?(e=>Bd.get(e))(e).length:at(e).length;return Id(e,t)}},Rd=(e,t)=>Ge(e)?Id(e,t):Fd(e,t),Nd=e=>void 0!==e.foffset,Vd=(e,t)=>t.getSelection.getOrThunk((()=>()=>Dd(e)))().map((e=>{if(Nd(e)){const t=Rd(e.start,e.soffset),o=Rd(e.finish,e.foffset);return fd.range(t.element,t.offset,o.element,o.offset)}return e}));var zd=[ys("getSelection"),ds("root"),ys("bubble"),Jc(),Ts("overrides",{}),Ts("showAbove",!1),sl("placement",((e,t,o)=>{const n=ot(t.root).dom,s=ld(e,0,t),r=Vd(n,t).bind((e=>{if(Nd(e)){const t=Md(n,fd.exactFromRange(e)).orThunk((()=>{const t=Re.fromText("\ufeff");Io(e.start,t);const o=Ad(n,fd.exact(t,0,t,1));return Lo(t),o}));return t.bind((e=>cd(e.left,e.top,e.width,e.height)))}{const t=ce(e,(e=>e.dom.getBoundingClientRect())),o={left:Math.min(t.firstCell.left,t.lastCell.left),right:Math.max(t.firstCell.right,t.lastCell.right),top:Math.min(t.firstCell.top,t.lastCell.top),bottom:Math.max(t.firstCell.bottom,t.lastCell.bottom)};return cd(o.left,o.top,o.right-o.left,o.bottom-o.top)}})),a=Vd(n,t).bind((e=>Nd(e)?je(e.start)?D.some(e.start):st(e.start):D.some(e.firstCell))).getOr(e.element);return dd(r,s,t,o,a)}))];const Ld="link-layout",Hd=e=>e.x+e.width,Pd=(e,t)=>e.x-t.width,Ud=(e,t)=>e.y-t.height+e.height,Wd=e=>e.y,jd=(e,t,o)=>il(Hd(e),Wd(e),o.southeast(),cl(),"southeast",yl(e,{left:0,top:2}),Ld),Gd=(e,t,o)=>il(Pd(e,t),Wd(e),o.southwest(),dl(),"southwest",yl(e,{right:1,top:2}),Ld),$d=(e,t,o)=>il(Hd(e),Ud(e,t),o.northeast(),ul(),"northeast",yl(e,{left:0,bottom:3}),Ld),qd=(e,t,o)=>il(Pd(e,t),Ud(e,t),o.northwest(),ml(),"northwest",yl(e,{right:1,bottom:3}),Ld),Yd=()=>[jd,Gd,$d,qd],Xd=()=>[Gd,jd,qd,$d];var Kd=[ds("item"),Jc(),Ts("overrides",{}),sl("placement",((e,t,o)=>{const n=mc(o,t.item.element),s=Zc(e.element,t,Yd(),Xd(),Yd(),Xd(),D.none());return D.some(Gc({anchorBox:n,bubble:jc(),overrides:t.overrides,layouts:s}))}))],Jd=rs("type",{selection:zd,node:ud,hotspot:Qc,submenu:Kd,makeshift:ed});const Zd=[vs("classes",$n),Ms("mode","all",["all","layout","placement"])],Qd=[Ts("useFixed",T),ys("getBounds")],eu=[us("anchor",Jd),_s("transition",Zd)],tu=(e,t,o,n,s,r)=>((e,t,o,n,s,r,a,i)=>{const l=Hc(a,"maxHeightFunction",zc()),c=Hc(a,"maxWidthFunction",b),d=e.anchorBox,u=e.origin,m={bounds:gc(u,r),origin:u,preference:n,maxHeightFunction:l,maxWidthFunction:c,lastPlacement:s,transition:i};return Pc(d,t,o,m)})(bc(t.anchorBox,e),n.element,t.bubble,t.layouts,s,o,t.overrides,r),ou=(e,t,o,n,s,r)=>{const a=ns("placement.info",zn(eu),s),i=a.anchor,l=n.element,c=o.get(n.uid);ac((()=>{Mt(l,"position","fixed");const s=Nt(l,"visibility");Mt(l,"visibility","hidden");const d=t.useFixed()?(()=>{const e=document.documentElement;return fc(0,0,e.clientWidth,e.clientHeight)})():(e=>{const t=Yt(e.element),o=e.element.dom.getBoundingClientRect();return hc(t.left,t.top,o.width,o.height)})(e);i.placement(e,i,d).each((e=>{const s=r.orThunk((()=>t.getBounds.map(_))),i=tu(d,e,s,n,c,a.transition);o.set(n.uid,i)})),s.fold((()=>{Lt(l,"visibility")}),(e=>{Mt(l,"visibility",e)})),Nt(l,"left").isNone()&&Nt(l,"top").isNone()&&Nt(l,"right").isNone()&&Nt(l,"bottom").isNone()&&xe(Nt(l,"position"),"fixed")&&Lt(l,"position")}),l)};var nu=Object.freeze({__proto__:null,position:(e,t,o,n,s)=>{const r=D.none();ou(e,t,o,n,s,r)},positionWithinBounds:ou,getMode:(e,t,o)=>t.useFixed()?"fixed":"absolute",reset:(e,t,o,n)=>{const s=n.element;H(["position","left","right","top","bottom"],(e=>Lt(s,e))),(e=>{Et(e,vc)})(s),o.clear(n.uid)}});const su=Xl({fields:Qd,name:"positioning",active:ec,apis:nu,state:Object.freeze({__proto__:null,init:()=>{let e={};return Va({readState:()=>e,clear:t=>{g(t)?delete e[t]:e={}},set:(t,o)=>{e[t]=o},get:t=>be(e,t)})}})}),ru=e=>e.getSystem().isConnected(),au=e=>{jr(e,Fr());const t=e.components();H(t,au)},iu=e=>{const t=e.components();H(t,iu),jr(e,Ir())},lu=(e,t)=>{e.getSystem().addToWorld(t),yt(e.element)&&iu(t)},cu=e=>{au(e),e.getSystem().removeFromWorld(e)},du=(e,t)=>{No(e.element,t.element)},uu=(e,t,o)=>{const n=e.components();(e=>{H(e.components(),(e=>Lo(e.element))),zo(e.element),e.syncComponents()})(e);const s=o(t),r=J(n,s);H(r,(t=>{au(t),e.getSystem().removeFromWorld(t)})),H(s,(t=>{ru(t)?du(e,t):(e.getSystem().addToWorld(t),du(e,t),yt(e.element)&&iu(t))})),e.syncComponents()},mu=(e,t)=>{gu(e,t,No)},gu=(e,t,o)=>{e.getSystem().addToWorld(t),o(e.element,t.element),yt(e.element)&&iu(t),e.syncComponents()},pu=e=>{au(e),Lo(e.element),e.getSystem().removeFromWorld(e)},hu=e=>{const t=nt(e.element).bind((t=>e.getSystem().getByDom(t).toOptional()));pu(e),t.each((e=>{e.syncComponents()}))},fu=e=>{const t=e.components();H(t,pu),zo(e.element),e.syncComponents()},bu=(e,t)=>{yu(e,t,No)},vu=(e,t)=>{yu(e,t,Fo)},yu=(e,t,o)=>{o(e,t.element);const n=at(t.element);H(n,(e=>{t.getByDom(e).each(iu)}))},xu=e=>{const t=at(e.element);H(t,(t=>{e.getByDom(t).each(au)})),Lo(e.element)},wu=(e,t,o,n)=>{o.get().each((t=>{fu(e)}));const s=t.getAttachPoint(e);mu(s,e);const r=e.getSystem().build(n);return mu(e,r),o.set(r),r},Su=(e,t,o,n)=>{const s=wu(e,t,o,n);return t.onOpen(e,s),s},ku=(e,t,o)=>{o.get().each((n=>{fu(e),hu(e),t.onClose(e,n),o.clear()}))},Cu=(e,t,o)=>o.isOpen(),Ou=(e,t,o)=>{const n=t.getAttachPoint(e);Mt(e.element,"position",su.getMode(n)),((e,t,o,n)=>{Nt(e.element,t).fold((()=>{Et(e.element,o)}),(t=>{kt(e.element,o,t)})),Mt(e.element,t,n)})(e,"visibility",t.cloakVisibilityAttr,"hidden")},_u=(e,t,o)=>{(e=>N(["top","left","right","bottom"],(t=>Nt(e,t).isSome())))(e.element)||Lt(e.element,"position"),((e,t,o)=>{_t(e.element,o).fold((()=>Lt(e.element,t)),(o=>Mt(e.element,t,o)))})(e,"visibility",t.cloakVisibilityAttr)};var Tu=Object.freeze({__proto__:null,cloak:Ou,decloak:_u,open:Su,openWhileCloaked:(e,t,o,n,s)=>{Ou(e,t),Su(e,t,o,n),s(),_u(e,t)},close:ku,isOpen:Cu,isPartOf:(e,t,o,n)=>Cu(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((()=>wu(e,t,o,n)))});var Eu=Object.freeze({__proto__:null,events:(e,t)=>Kr([Qr(_r(),((o,n)=>{ku(o,e,t)}))])}),Du=[el("onOpen"),el("onClose"),ds("isPartOf"),ds("getAttachPoint"),Ts("cloakVisibilityAttr","data-precloak-visibility")];var Au=Object.freeze({__proto__:null,init:()=>{const e=Cc(),t=x("not-implemented");return Va({readState:t,isOpen:e.isSet,clear:e.clear,set:e.set,get:e.get})}});const Mu=Xl({fields:Du,name:"sandboxing",active:Eu,apis:Tu,state:Au}),Bu=x("dismiss.popups"),Iu=x("reposition.popups"),Fu=x("mouse.released"),Ru=Vn([Ts("isExtraPart",T),_s("fireEventInstead",[Ts("event",Rr())])]),Nu=e=>{const t=ns("Dismissal",Ru,e);return{[Bu()]:{schema:Vn([ds("target")]),onReceive:(e,o)=>{if(Mu.isOpen(e)){Mu.isPartOf(e,o.target)||t.isExtraPart(e,o.target)||t.fireEventInstead.fold((()=>Mu.close(e)),(t=>jr(e,t.event)))}}}}},Vu=Vn([_s("fireEventInstead",[Ts("event",Nr())]),hs("doReposition")]),zu=e=>{const t=ns("Reposition",Vu,e);return{[Iu()]:{onReceive:e=>{Mu.isOpen(e)&&t.fireEventInstead.fold((()=>t.doReposition(e)),(t=>jr(e,t.event)))}}}},Lu=(e,t,o)=>{t.store.manager.onLoad(e,t,o)},Hu=(e,t,o)=>{t.store.manager.onUnload(e,t,o)};var Pu=Object.freeze({__proto__:null,onLoad:Lu,onUnload:Hu,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 Uu=Object.freeze({__proto__:null,events:(e,t)=>{const o=e.resetOnDom?[ia(((o,n)=>{Lu(o,e,t)})),la(((o,n)=>{Hu(o,e,t)}))]:[Wl(e,t,Lu)];return Kr(o)}});const Wu=()=>{const e=Ns(null);return Va({set:e.set,get:e.get,isNotSet:()=>null===e.get(),clear:()=>{e.set(null)},readState:()=>({mode:"memory",value:e.get()})})},ju=()=>{const e=Ns({}),t=Ns({});return Va({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(),s=t.get(),r={},a={};H(o,(e=>{r[e.value]=e,be(e,"meta").each((t=>{be(t,"text").each((t=>{a[t]=e}))}))})),e.set({...n,...r}),t.set({...s,...a})},clear:()=>{e.set({}),t.set({})}})};var Gu=Object.freeze({__proto__:null,memory:Wu,dataset:ju,manual:()=>Va({readState:b}),init:e=>e.store.manager.state(e)});const $u=(e,t,o,n)=>{const s=t.store;o.update([n]),s.setValue(e,n),t.onSetValue(e,n)};var qu=[ys("initialValue"),ds("getFallbackEntry"),ds("getDataKey"),ds("setValue"),sl("manager",{setValue:$u,getValue:(e,t,o)=>{const n=t.store,s=n.getDataKey(e);return o.lookup(s).getOrThunk((()=>n.getFallbackEntry(s)))},onLoad:(e,t,o)=>{t.store.initialValue.each((n=>{$u(e,t,o,n)}))},onUnload:(e,t,o)=>{o.clear()},state:ju})];var Yu=[ds("getValue"),Ts("setValue",b),ys("initialValue"),sl("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:Na.init})];var Xu=[ys("initialValue"),sl("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:Wu})],Ku=[Es("store",{mode:"memory"},rs("mode",{memory:Xu,manual:Yu,dataset:qu})),el("onSetValue"),Ts("resetOnDom",!1)];const Ju=Xl({fields:Ku,name:"representing",active:Uu,apis:Pu,extra:{setValueFrom:(e,t)=>{const o=Ju.getValue(t);Ju.setValue(e,o)}},state:Gu}),Zu=(e,t)=>Rs(e,{},L(t,(t=>{return o=t.name(),n="Cannot configure "+t.name()+" for "+e,is(o,o,{tag:"option",process:{}},An((e=>mn("The field: "+o+" is forbidden. "+n))));var o,n})).concat([ls("dump",w)])),Qu=e=>e.dump,em=(e,t)=>({...ql(t),...e.dump}),tm=Zu,om=em,nm="placeholder",sm=Vs([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),rm=e=>ve(e,"uiType"),am=(e,t,o,n)=>rm(o)&&o.uiType===nm?((e,t,o,n)=>e.exists((e=>e!==o.owner))?sm.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):sm.single(!1,x(o)),im=(e,t,o,n)=>am(e,0,o,n).fold(((s,r)=>{const a=rm(o)?r(t,o.config,o.validated):r(t),i=be(a,"components").getOr([]),l=Y(i,(o=>im(e,t,o,n)));return[{...a,components:l}]}),((e,n)=>{if(rm(o)){const e=n(t,o.config,o.validated);return o.validated.preprocess.getOr(w)(e)}return n(t)})),lm=(e,t,o,n)=>{const s=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))),r=((e,t,o,n)=>Y(o,(o=>im(e,t,o,n))))(e,t,o,s);return le(s,(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))})),r},cm=sm.single,dm=sm.multiple,um=x(nm),mm=Vs([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),gm=Ts("factory",{sketch:w}),pm=Ts("schema",[]),hm=ds("name"),fm=is("pname","pname",kn((e=>"<alloy."+ya(e.name)+">")),Wn()),bm=ls("schema",(()=>[ys("preprocess")])),vm=Ts("defaults",x({})),ym=Ts("overrides",x({})),xm=zn([gm,pm,hm,fm,vm,ym]),wm=zn([gm,pm,hm,vm,ym]),Sm=zn([gm,pm,hm,fm,vm,ym]),km=zn([gm,bm,hm,ds("unit"),fm,vm,ym]),Cm=e=>e.fold(D.some,D.none,D.some,D.some),Om=e=>{const t=e=>e.name;return e.fold(t,t,t,t)},_m=(e,t)=>o=>{const n=ns("Converting part type",t,o);return e(n)},Tm=_m(mm.required,xm),Em=_m(mm.external,wm),Dm=_m(mm.optional,Sm),Am=_m(mm.group,km),Mm=x("entirety");var Bm=Object.freeze({__proto__:null,required:Tm,external:Em,optional:Dm,group:Am,asNamedPart:Cm,name:Om,asCommon:e=>e.fold(w,w,w,w),original:Mm});const Im=(e,t,o,n)=>wn(t.defaults(e,o,n),o,{uid:e.partUids[t.name]},t.overrides(e,o,n)),Fm=(e,t)=>{const o={};return H(t,(t=>{Cm(t).each((t=>{const n=Rm(e,t.pname);o[t.name]=o=>{const s=ns("Part: "+t.name+" in "+e,zn(t.schema),o);return{...n,config:o,validated:s}}}))})),o},Rm=(e,t)=>({uiType:um(),owner:e,name:t}),Nm=(e,t,o)=>({uiType:um(),owner:e,name:t,config:o,validated:{}}),Vm=e=>Y(e,(e=>e.fold(D.none,D.some,D.none,D.none).map((e=>fs(e.name,e.schema.concat([rl(Mm())])))).toArray())),zm=e=>L(e,Om),Lm=(e,t,o)=>((e,t,o)=>{const n={},s={};return H(o,(e=>{e.fold((e=>{n[e.pname]=cm(!0,((t,o,n)=>e.factory.sketch(Im(t,e,o,n))))}),(e=>{const o=t.parts[e.name];s[e.name]=x(e.factory.sketch(Im(t,e,o[Mm()]),o))}),(e=>{n[e.pname]=cm(!1,((t,o,n)=>e.factory.sketch(Im(t,e,o,n))))}),(e=>{n[e.pname]=dm(!0,((t,o,n)=>{const s=t[e.name];return L(s,(o=>e.factory.sketch(wn(e.defaults(t,o,n),o,e.overrides(t,o)))))}))}))})),{internals:x(n),externals:x(s)}})(0,t,o),Hm=(e,t,o)=>lm(D.some(e),t,t.components,o),Pm=(e,t,o)=>{const n=t.partUids[o];return e.getSystem().getByUid(n).toOptional()},Um=(e,t,o)=>Pm(e,t,o).getOrDie("Could not find part: "+o),Wm=(e,t,o)=>{const n={},s=t.partUids,r=e.getSystem();return H(o,(e=>{n[e]=x(r.getByUid(s[e]))})),n},jm=(e,t)=>{const o=e.getSystem();return ce(t.partUids,((e,t)=>x(o.getByUid(e))))},Gm=e=>ae(e.partUids),$m=(e,t,o)=>{const n={},s=t.partUids,r=e.getSystem();return H(o,(e=>{n[e]=x(r.getByUid(s[e]).getOrDie())})),n},qm=(e,t)=>{const o=zm(t);return Hs(L(o,(t=>({key:t,value:e+"-"+t}))))},Ym=e=>is("partUids","partUids",On((t=>qm(t.uid,e))),Wn());var Xm=Object.freeze({__proto__:null,generate:Fm,generateOne:Nm,schemas:Vm,names:zm,substitutes:Lm,components:Hm,defaultUids:qm,defaultUidsSchema:Ym,getAllParts:jm,getAllPartNames:Gm,getPart:Pm,getPartOrDie:Um,getParts:Wm,getPartsOrDie:$m});const Km=(e,t,o,n,s)=>{const r=((e,t)=>(e.length>0?[fs("parts",e)]:[]).concat([ds("uid"),Ts("dom",{}),Ts("components",[]),rl("originalSpec"),Ts("debug.sketcher",{})]).concat(t))(n,s);return ns(e+" [SpecSchema]",Vn(r.concat(t)),o)},Jm=(e,t,o,n,s)=>{const r=Zm(s),a=Vm(o),i=Ym(o),l=Km(e,t,r,a,[i]),c=Lm(0,l,o);return n(l,Hm(e,l,c.internals()),r,c.externals())},Zm=e=>(e=>ve(e,"uid"))(e)?e:{...e,uid:_a("uid")},Qm=Vn([ds("name"),ds("factory"),ds("configFields"),Ts("apis",{}),Ts("extraApis",{})]),eg=Vn([ds("name"),ds("factory"),ds("configFields"),ds("partFields"),Ts("apis",{}),Ts("extraApis",{})]),tg=e=>{const t=ns("Sketcher for "+e.name,Qm,e),o=ce(t.apis,Ra),n=ce(t.extraApis,((e,t)=>Ma(e,t)));return{name:t.name,configFields:t.configFields,sketch:e=>((e,t,o,n)=>{const s=Zm(n);return o(Km(e,t,s,[],[]),s)})(t.name,t.configFields,t.factory,e),...o,...n}},og=e=>{const t=ns("Sketcher for "+e.name,eg,e),o=Fm(t.name,t.partFields),n=ce(t.apis,Ra),s=ce(t.extraApis,((e,t)=>Ma(e,t)));return{name:t.name,partFields:t.partFields,configFields:t.configFields,sketch:e=>Jm(t.name,t.configFields,t.partFields,t.factory,e),parts:o,...n,...s}},ng=e=>Ye("input")(e)&&"radio"!==Ot(e,"type")||Ye("textarea")(e);var sg=Object.freeze({__proto__:null,getCurrent:(e,t,o)=>t.find(e)});const rg=[ds("find")],ag=Xl({fields:rg,name:"composing",apis:sg}),ig=["input","button","textarea","select"],lg=(e,t,o)=>{(t.disabled()?pg:hg)(e,t)},cg=(e,t)=>!0===t.useNative&&R(ig,Pe(e.element)),dg=e=>{kt(e.element,"disabled","disabled")},ug=e=>{Et(e.element,"disabled")},mg=e=>{kt(e.element,"aria-disabled","true")},gg=e=>{kt(e.element,"aria-disabled","false")},pg=(e,t,o)=>{t.disableClass.each((t=>{ti(e.element,t)}));(cg(e,t)?dg:mg)(e),t.onDisabled(e)},hg=(e,t,o)=>{t.disableClass.each((t=>{ni(e.element,t)}));(cg(e,t)?ug:gg)(e),t.onEnabled(e)},fg=(e,t)=>cg(e,t)?(e=>Tt(e.element,"disabled"))(e):(e=>"true"===Ot(e.element,"aria-disabled"))(e);var bg=Object.freeze({__proto__:null,enable:hg,disable:pg,isDisabled:fg,onLoad:lg,set:(e,t,o,n)=>{(n?pg:hg)(e,t)}});var vg=Object.freeze({__proto__:null,exhibit:(e,t)=>La({classes:t.disabled()?t.disableClass.toArray():[]}),events:(e,t)=>Kr([Jr(Sr(),((t,o)=>fg(t,e))),Wl(e,t,lg)])}),yg=[Is("disabled",T),Ts("useNative",!0),ys("disableClass"),el("onDisabled"),el("onEnabled")];const xg=Xl({fields:yg,name:"disabling",active:vg,apis:bg}),wg=(e,t,o,n)=>{const s=Od(e.element,"."+t.highlightClass);H(s,(o=>{N(n,(e=>Je(e.element,o)))||(ni(o,t.highlightClass),e.getSystem().getByDom(o).each((o=>{t.onDehighlight(e,o),jr(o,Wr())})))}))},Sg=(e,t,o,n)=>{wg(e,t,0,[n]),kg(e,t,o,n)||(ti(n.element,t.highlightClass),t.onHighlight(e,n),jr(n,Ur()))},kg=(e,t,o,n)=>ri(n.element,t.highlightClass),Cg=(e,t,o,n)=>{const s=Od(e.element,"."+t.itemClass);return D.from(s[n]).fold((()=>on.error(new Error("No element found with index "+n))),e.getSystem().getByDom)},Og=(e,t,o)=>Fi(e.element,"."+t.itemClass).bind((t=>e.getSystem().getByDom(t).toOptional())),_g=(e,t,o)=>{const n=Od(e.element,"."+t.itemClass);return(n.length>0?D.some(n[n.length-1]):D.none()).bind((t=>e.getSystem().getByDom(t).toOptional()))},Tg=(e,t,o,n)=>{const s=Od(e.element,"."+t.itemClass),r=$(s,(e=>ri(e,t.highlightClass)));return r.bind((t=>{const o=bl(t,n,0,s.length-1);return e.getSystem().getByDom(s[o]).toOptional()}))},Eg=(e,t,o)=>{const n=Od(e.element,"."+t.itemClass);return we(L(n,(t=>e.getSystem().getByDom(t).toOptional())))};var Dg=Object.freeze({__proto__:null,dehighlightAll:(e,t,o)=>wg(e,t,0,[]),dehighlight:(e,t,o,n)=>{kg(e,t,o,n)&&(ni(n.element,t.highlightClass),t.onDehighlight(e,n),jr(n,Wr()))},highlight:Sg,highlightFirst:(e,t,o)=>{Og(e,t).each((n=>{Sg(e,t,o,n)}))},highlightLast:(e,t,o)=>{_g(e,t).each((n=>{Sg(e,t,o,n)}))},highlightAt:(e,t,o,n)=>{Cg(e,t,o,n).fold((e=>{throw e}),(n=>{Sg(e,t,o,n)}))},highlightBy:(e,t,o,n)=>{const s=Eg(e,t);G(s,n).each((n=>{Sg(e,t,o,n)}))},isHighlighted:kg,getHighlighted:(e,t,o)=>Fi(e.element,"."+t.highlightClass).bind((t=>e.getSystem().getByDom(t).toOptional())),getFirst:Og,getLast:_g,getPrevious:(e,t,o)=>Tg(e,t,0,-1),getNext:(e,t,o)=>Tg(e,t,0,1),getCandidates:Eg}),Ag=[ds("highlightClass"),ds("itemClass"),el("onHighlight"),el("onDehighlight")];const Mg=Xl({fields:Ag,name:"highlighting",apis:Dg}),Bg=[8],Ig=[9],Fg=[13],Rg=[27],Ng=[32],Vg=[37],zg=[38],Lg=[39],Hg=[40],Pg=(e,t,o)=>{const n=K(e.slice(0,t)),s=K(e.slice(t+1));return G(n.concat(s),o)},Ug=(e,t,o)=>{const n=K(e.slice(0,t));return G(n,o)},Wg=(e,t,o)=>{const n=e.slice(0,t),s=e.slice(t+1);return G(s.concat(n),o)},jg=(e,t,o)=>{const n=e.slice(t+1);return G(n,o)},Gg=e=>t=>{const o=t.raw;return R(e,o.which)},$g=e=>t=>X(e,(e=>e(t))),qg=e=>!0===e.raw.shiftKey,Yg=e=>!0===e.raw.ctrlKey,Xg=C(qg),Kg=(e,t)=>({matches:e,classification:t}),Jg=(e,t,o)=>{t.exists((e=>o.exists((t=>Je(t,e)))))||Gr(e,Vr(),{prevFocus:t,newFocus:o})},Zg=()=>{const e=e=>rc(e.element);return{get:e,set:(t,o)=>{const n=e(t);t.getSystem().triggerFocus(o,t.element);const s=e(t);Jg(t,n,s)}}},Qg=()=>{const e=e=>Mg.getHighlighted(e).map((e=>e.element));return{get:e,set:(t,o)=>{const n=e(t);t.getSystem().getByDom(o).fold(b,(e=>{Mg.highlight(t,e)}));const s=e(t);Jg(t,n,s)}}};var ep;!function(e){e.OnFocusMode="onFocus",e.OnEnterOrSpaceMode="onEnterOrSpace",e.OnApiMode="onApi"}(ep||(ep={}));const tp=(e,t,o,n,s)=>{const r=(e,t,o,n,s)=>((e,t)=>{const o=G(e,(e=>e.matches(t)));return o.map((e=>e.classification))})(o(e,t,n,s),t.event).bind((o=>o(e,t,n,s))),a={schema:()=>e.concat([Ts("focusManager",Zg()),Es("focusInside","onFocus",Qn((e=>R(["onFocus","onEnterOrSpace","onApi"],e)?on.value(e):on.error("Invalid value for focusInside")))),sl("handler",a),sl("state",t),sl("sendFocusIn",s)]),processKey:r,toEvents:(e,t)=>{const a=e.focusInside!==ep.OnFocusMode?D.none():s(e).map((o=>Qr(vr(),((n,s)=>{o(n,e,t),s.stop()})))),i=[Qr(ir(),((n,a)=>{r(n,a,o,e,t).fold((()=>{((o,n)=>{const r=Gg(Ng.concat(Fg))(n.event);e.focusInside===ep.OnEnterOrSpaceMode&&r&&Gs(o,n)&&s(e).each((s=>{s(o,e,t),n.stop()}))})(n,a)}),(e=>{a.stop()}))})),Qr(lr(),((o,s)=>{r(o,s,n,e,t).each((e=>{s.stop()}))}))];return Kr(a.toArray().concat(i))}};return a},op=e=>{const t=[ys("onEscape"),ys("onEnter"),Ts("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),Ts("firstTabstop",0),Ts("useTabstopAt",E),ys("visibilitySelector")].concat([e]),o=(e,t)=>{const o=e.visibilitySelector.bind((e=>Ri(t,e))).getOr(t);return Wt(o)>0},n=(e,t)=>t.focusManager.get(e).bind((e=>Ri(e,t.selector))),s=(e,t,n)=>{((e,t)=>{const n=Od(e.element,t.selector),s=U(n,(e=>o(t,e)));return D.from(s[t.firstTabstop])})(e,t).each((o=>{t.focusManager.set(e,o)}))},r=(e,t,n,s,r)=>r(t,n,(e=>((e,t)=>o(e,t)&&e.useTabstopAt(t))(s,e))).fold((()=>s.cyclic?D.some(!0):D.none()),(t=>(s.focusManager.set(e,t),D.some(!0)))),a=(e,t,o,s)=>{const a=Od(e.element,o.selector);return n(e,o).bind((t=>$(a,k(Je,t)).bind((t=>r(e,a,t,o,s)))))},i=(e,t,o)=>{const n=o.cyclic?Pg:Ug;return a(e,0,o,n)},l=(e,t,o)=>{const n=o.cyclic?Wg:jg;return a(e,0,o,n)},c=e=>(e=>nt(e))(e).bind(lt).exists((t=>Je(t,e))),d=x([Kg($g([qg,Gg(Ig)]),i),Kg(Gg(Ig),l),Kg($g([Xg,Gg(Fg)]),((e,t,o)=>o.onEnter.bind((o=>o(e,t)))))]),u=x([Kg(Gg(Rg),((e,t,o)=>o.onEscape.bind((o=>o(e,t))))),Kg(Gg(Ig),((e,t,o)=>n(e,o).filter((e=>!o.useTabstopAt(e))).bind((n=>(c(n)?i:l)(e,t,o)))))]);return tp(t,Na.init,d,u,(()=>D.some(s)))};var np=op(ls("cyclic",T)),sp=op(ls("cyclic",E));const rp=(e,t,o)=>ng(o)&&Gg(Ng)(t.event)?D.none():((e,t,o)=>(qr(e,o,Sr()),D.some(!0)))(e,0,o),ap=(e,t)=>D.some(!0),ip=[Ts("execute",rp),Ts("useSpace",!1),Ts("useEnter",!0),Ts("useControlEnter",!1),Ts("useDown",!1)],lp=(e,t,o)=>o.execute(e,t,e.element);var cp=tp(ip,Na.init,((e,t,o,n)=>{const s=o.useSpace&&!ng(e.element)?Ng:[],r=o.useEnter?Fg:[],a=o.useDown?Hg:[],i=s.concat(r).concat(a);return[Kg(Gg(i),lp)].concat(o.useControlEnter?[Kg($g([Yg,Gg(Fg)]),lp)]:[])}),((e,t,o,n)=>o.useSpace&&!ng(e.element)?[Kg(Gg(Ng),ap)]:[]),(()=>D.none()));const dp=()=>{const e=Cc();return Va({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 up=Object.freeze({__proto__:null,flatgrid:dp,init:e=>e.state(e)});const mp=e=>(t,o,n,s)=>{const r=e(t.element);return fp(r,t,o,n,s)},gp=(e,t)=>{const o=$c(e,t);return mp(o)},pp=(e,t)=>{const o=$c(t,e);return mp(o)},hp=e=>(t,o,n,s)=>fp(e,t,o,n,s),fp=(e,t,o,n,s)=>n.focusManager.get(t).bind((o=>e(t.element,o,n,s))).map((e=>(n.focusManager.set(t,e),!0))),bp=hp,vp=hp,yp=hp,xp=e=>!(e=>e.offsetWidth<=0&&e.offsetHeight<=0)(e.dom),wp=(e,t,o)=>{const n=Od(e,o);return((e,t)=>$(e,t).map((t=>({index:t,candidates:e}))))(U(n,xp),(e=>Je(e,t)))},Sp=(e,t)=>$(e,(e=>Je(t,e))),kp=(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()})),Cp=(e,t,o,n,s)=>kp(e,t,n,((t,r)=>{const a=t===o-1?e.length-t*n:n,i=bl(r,s,0,a-1);return D.some({row:t,column:i})})),Op=(e,t,o,n,s)=>kp(e,t,n,((t,r)=>{const a=bl(t,s,0,o-1),i=a===o-1?e.length-a*n:n,l=vl(r,0,i-1);return D.some({row:a,column:l})})),_p=[ds("selector"),Ts("execute",rp),tl("onEscape"),Ts("captureTab",!1),al()],Tp=(e,t,o)=>{Fi(e.element,t.selector).each((o=>{t.focusManager.set(e,o)}))},Ep=e=>(t,o,n,s)=>wp(t,o,n.selector).bind((t=>e(t.candidates,t.index,s.getNumRows().getOr(n.initSize.numRows),s.getNumColumns().getOr(n.initSize.numColumns)))),Dp=(e,t,o)=>o.captureTab?D.some(!0):D.none(),Ap=Ep(((e,t,o,n)=>Cp(e,t,o,n,-1))),Mp=Ep(((e,t,o,n)=>Cp(e,t,o,n,1))),Bp=Ep(((e,t,o,n)=>Op(e,t,o,n,-1))),Ip=Ep(((e,t,o,n)=>Op(e,t,o,n,1))),Fp=x([Kg(Gg(Vg),gp(Ap,Mp)),Kg(Gg(Lg),pp(Ap,Mp)),Kg(Gg(zg),bp(Bp)),Kg(Gg(Hg),vp(Ip)),Kg($g([qg,Gg(Ig)]),Dp),Kg($g([Xg,Gg(Ig)]),Dp),Kg(Gg(Ng.concat(Fg)),((e,t,o,n)=>((e,t)=>t.focusManager.get(e).bind((e=>Ri(e,t.selector))))(e,o).bind((n=>o.execute(e,t,n)))))]),Rp=x([Kg(Gg(Rg),((e,t,o)=>o.onEscape(e,t))),Kg(Gg(Ng),ap)]);var Np=tp(_p,dp,Fp,Rp,(()=>D.some(Tp)));const Vp=(e,t,o,n,s)=>{const r=(e,t,o)=>s(e,t,n,0,o.length-1,o[t],(t=>{return n=o[t],"button"===Pe(n)&&"disabled"===Ot(n,"disabled")?r(e,t,o):D.from(o[t]);var n}));return wp(e,o,t).bind((e=>{const t=e.index,o=e.candidates;return r(t,t,o)}))},zp=(e,t,o,n)=>Vp(e,t,o,n,((e,t,o,n,s,r,a)=>{const i=vl(t+o,n,s);return i===e?D.from(r):a(i)})),Lp=(e,t,o,n)=>Vp(e,t,o,n,((e,t,o,n,s,r,a)=>{const i=bl(t,o,n,s);return i===e?D.none():a(i)})),Hp=[ds("selector"),Ts("getInitial",D.none),Ts("execute",rp),tl("onEscape"),Ts("executeOnMove",!1),Ts("allowVertical",!0),Ts("allowHorizontal",!0),Ts("cycles",!0)],Pp=(e,t,o)=>((e,t)=>t.focusManager.get(e).bind((e=>Ri(e,t.selector))))(e,o).bind((n=>o.execute(e,t,n))),Up=(e,t,o)=>{t.getInitial(e).orThunk((()=>Fi(e.element,t.selector))).each((o=>{t.focusManager.set(e,o)}))},Wp=(e,t,o)=>(o.cycles?Lp:zp)(e,o.selector,t,-1),jp=(e,t,o)=>(o.cycles?Lp:zp)(e,o.selector,t,1),Gp=e=>(t,o,n,s)=>e(t,o,n,s).bind((()=>n.executeOnMove?Pp(t,o,n):D.some(!0))),$p=x([Kg(Gg(Ng),ap),Kg(Gg(Rg),((e,t,o)=>o.onEscape(e,t)))]);var qp=tp(Hp,Na.init,((e,t,o,n)=>{const s=[...o.allowHorizontal?Vg:[]].concat(o.allowVertical?zg:[]),r=[...o.allowHorizontal?Lg:[]].concat(o.allowVertical?Hg:[]);return[Kg(Gg(s),Gp(gp(Wp,jp))),Kg(Gg(r),Gp(pp(Wp,jp))),Kg(Gg(Fg),Pp),Kg(Gg(Ng),Pp)]}),$p,(()=>D.some(Up)));const Yp=(e,t,o)=>D.from(e[t]).bind((e=>D.from(e[o]).map((e=>({rowIndex:t,columnIndex:o,cell:e}))))),Xp=(e,t,o,n)=>{const s=e[t].length,r=bl(o,n,0,s-1);return Yp(e,t,r)},Kp=(e,t,o,n)=>{const s=bl(o,n,0,e.length-1),r=e[s].length,a=vl(t,0,r-1);return Yp(e,s,a)},Jp=(e,t,o,n)=>{const s=e[t].length,r=vl(o+n,0,s-1);return Yp(e,t,r)},Zp=(e,t,o,n)=>{const s=vl(o+n,0,e.length-1),r=e[s].length,a=vl(t,0,r-1);return Yp(e,s,a)},Qp=[fs("selectors",[ds("row"),ds("cell")]),Ts("cycles",!0),Ts("previousSelector",D.none),Ts("execute",rp)],eh=(e,t,o)=>{t.previousSelector(e).orThunk((()=>{const o=t.selectors;return Fi(e.element,o.cell)})).each((o=>{t.focusManager.set(e,o)}))},th=(e,t)=>(o,n,s)=>{const r=s.cycles?e:t;return Ri(n,s.selectors.row).bind((e=>{const t=Od(e,s.selectors.cell);return Sp(t,n).bind((t=>{const n=Od(o,s.selectors.row);return Sp(n,e).bind((e=>{const o=((e,t)=>L(e,(e=>Od(e,t.selectors.cell))))(n,s);return r(o,e,t).map((e=>e.cell))}))}))}))},oh=th(((e,t,o)=>Xp(e,t,o,-1)),((e,t,o)=>Jp(e,t,o,-1))),nh=th(((e,t,o)=>Xp(e,t,o,1)),((e,t,o)=>Jp(e,t,o,1))),sh=th(((e,t,o)=>Kp(e,o,t,-1)),((e,t,o)=>Zp(e,o,t,-1))),rh=th(((e,t,o)=>Kp(e,o,t,1)),((e,t,o)=>Zp(e,o,t,1))),ah=x([Kg(Gg(Vg),gp(oh,nh)),Kg(Gg(Lg),pp(oh,nh)),Kg(Gg(zg),bp(sh)),Kg(Gg(Hg),vp(rh)),Kg(Gg(Ng.concat(Fg)),((e,t,o)=>rc(e.element).bind((n=>o.execute(e,t,n)))))]),ih=x([Kg(Gg(Ng),ap)]);var lh=tp(Qp,Na.init,ah,ih,(()=>D.some(eh)));const ch=[ds("selector"),Ts("execute",rp),Ts("moveOnTab",!1)],dh=(e,t,o)=>o.focusManager.get(e).bind((n=>o.execute(e,t,n))),uh=(e,t,o)=>{Fi(e.element,t.selector).each((o=>{t.focusManager.set(e,o)}))},mh=(e,t,o)=>Lp(e,o.selector,t,-1),gh=(e,t,o)=>Lp(e,o.selector,t,1),ph=x([Kg(Gg(zg),yp(mh)),Kg(Gg(Hg),yp(gh)),Kg($g([qg,Gg(Ig)]),((e,t,o,n)=>o.moveOnTab?yp(mh)(e,t,o,n):D.none())),Kg($g([Xg,Gg(Ig)]),((e,t,o,n)=>o.moveOnTab?yp(gh)(e,t,o,n):D.none())),Kg(Gg(Fg),dh),Kg(Gg(Ng),dh)]),hh=x([Kg(Gg(Ng),ap)]);var fh=tp(ch,Na.init,ph,hh,(()=>D.some(uh)));const bh=[tl("onSpace"),tl("onEnter"),tl("onShiftEnter"),tl("onLeft"),tl("onRight"),tl("onTab"),tl("onShiftTab"),tl("onUp"),tl("onDown"),tl("onEscape"),Ts("stopSpaceKeyup",!1),ys("focusIn")];var vh=tp(bh,Na.init,((e,t,o)=>[Kg(Gg(Ng),o.onSpace),Kg($g([Xg,Gg(Fg)]),o.onEnter),Kg($g([qg,Gg(Fg)]),o.onShiftEnter),Kg($g([qg,Gg(Ig)]),o.onShiftTab),Kg($g([Xg,Gg(Ig)]),o.onTab),Kg(Gg(zg),o.onUp),Kg(Gg(Hg),o.onDown),Kg(Gg(Vg),o.onLeft),Kg(Gg(Lg),o.onRight),Kg(Gg(Ng),o.onSpace)]),((e,t,o)=>[...o.stopSpaceKeyup?[Kg(Gg(Ng),ap)]:[],Kg(Gg(Rg),o.onEscape)]),(e=>e.focusIn));const yh=np.schema(),xh=sp.schema(),wh=qp.schema(),Sh=Np.schema(),kh=lh.schema(),Ch=cp.schema(),Oh=fh.schema(),_h=vh.schema();const Th=Jl({branchKey:"mode",branches:Object.freeze({__proto__:null,acyclic:yh,cyclic:xh,flow:wh,flatgrid:Sh,matrix:kh,execution:Ch,menu:Oh,special:_h}),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,s)=>{(e=>ye(e,"setGridSize"))(o)?o.setGridSize(n,s):console.error("Layout does not support setGridSize")}},state:up}),Eh=(e,t)=>{ac((()=>{uu(e,t,(()=>L(t,e.getSystem().build)))}),e.element)},Dh=(e,t)=>{ac((()=>{((e,t,o)=>{const n=e.components(),s=Y(t,(e=>Fa(e).toArray()));H(n,(e=>{R(s,e)||cu(e)}));const r=o(t),a=J(n,r);H(a,(e=>{ru(e)&&cu(e)})),H(r,(t=>{ru(t)||lu(e,t)})),e.syncComponents()})(e,t,(()=>((e,t,o)=>mi(e,t,((t,n)=>gi(e,n,t,o))))(e.element,t,e.getSystem().buildOrPatch)))}),e.element)},Ah=(e,t,o,n)=>{cu(t);const s=gi(e.element,o,n,e.getSystem().buildOrPatch);lu(e,s),e.syncComponents()},Mh=(e,t,o)=>{const n=e.getSystem().build(o);gu(e,n,t)},Bh=(e,t,o,n)=>{hu(t),Mh(e,((e,t)=>((e,t,o)=>{it(e,o).fold((()=>{No(e,t)}),(e=>{Io(e,t)}))})(e,t,o)),n)},Ih=(e,t)=>e.components(),Fh=(e,t,o,n,s)=>{const r=Ih(e);return D.from(r[n]).map((o=>(s.fold((()=>hu(o)),(s=>{(t.reuseDom?Ah:Bh)(e,o,n,s)})),o)))};var Rh=Object.freeze({__proto__:null,append:(e,t,o,n)=>{Mh(e,No,n)},prepend:(e,t,o,n)=>{Mh(e,Ro,n)},remove:(e,t,o,n)=>{const s=Ih(e),r=G(s,(e=>Je(n.element,e.element)));r.each(hu)},replaceAt:Fh,replaceBy:(e,t,o,n,s)=>{const r=Ih(e);return $(r,n).bind((o=>Fh(e,t,0,o,s)))},set:(e,t,o,n)=>(t.reuseDom?Dh:Eh)(e,n),contents:Ih});const Nh=Xl({fields:[Bs("reuseDom",!0)],name:"replacing",apis:Rh}),Vh=(e,t)=>{const o=((e,t)=>{const o=Kr(t);return Xl({fields:[ds("enabled")],name:e,active:{events:x(o)}})})(e,t);return{key:e,value:{config:{},me:o,configAsRaw:x({}),initialConfig:{},state:Na}}},zh=(e,t)=>{t.ignore||(tc(e.element),t.onFocus(e))};var Lh=Object.freeze({__proto__:null,focus:zh,blur:(e,t)=>{t.ignore||oc(e.element)},isFocused:e=>nc(e.element)});var Hh=Object.freeze({__proto__:null,exhibit:(e,t)=>{const o=t.ignore?{}:{attributes:{tabindex:"-1"}};return La(o)},events:e=>Kr([Qr(vr(),((t,o)=>{zh(t,e),o.stop()}))].concat(e.stopMousedown?[Qr(er(),((e,t)=>{t.event.prevent()}))]:[]))}),Ph=[el("onFocus"),Ts("stopMousedown",!1),Ts("ignore",!1)];const Uh=Xl({fields:Ph,name:"focusing",active:Hh,apis:Lh}),Wh=(e,t,o,n)=>{const s=o.get();o.set(n),((e,t,o)=>{t.toggleClass.each((t=>{o.get()?ti(e.element,t):ni(e.element,t)}))})(e,t,o),((e,t,o)=>{const n=t.aria;n.update(e,n,o.get())})(e,t,o),s!==n&&t.onToggled(e,n)},jh=(e,t,o)=>{Wh(e,t,o,!o.get())},Gh=(e,t,o)=>{Wh(e,t,o,t.selected)};var $h=Object.freeze({__proto__:null,onLoad:Gh,toggle:jh,isOn:(e,t,o)=>o.get(),on:(e,t,o)=>{Wh(e,t,o,!0)},off:(e,t,o)=>{Wh(e,t,o,!1)},set:Wh});var qh=Object.freeze({__proto__:null,exhibit:()=>La({}),events:(e,t)=>{const o=(n=e,s=t,r=jh,da((e=>{r(e,n,s)})));var n,s,r;const a=Wl(e,t,Gh);return Kr(q([e.toggleOnExecute?[o]:[],[a]]))}});const Yh=(e,t,o)=>{kt(e.element,"aria-expanded",o)};var Xh=[Ts("selected",!1),ys("toggleClass"),Ts("toggleOnExecute",!0),el("onToggled"),Es("aria",{mode:"none"},rs("mode",{pressed:[Ts("syncWithExpanded",!1),sl("update",((e,t,o)=>{kt(e.element,"aria-pressed",o),t.syncWithExpanded&&Yh(e,t,o)}))],checked:[sl("update",((e,t,o)=>{kt(e.element,"aria-checked",o)}))],expanded:[sl("update",Yh)],selected:[sl("update",((e,t,o)=>{kt(e.element,"aria-selected",o)}))],none:[sl("update",b)]}))];const Kh=Xl({fields:Xh,name:"toggling",active:qh,apis:$h,state:(Jh=!1,{init:()=>{const e=Ns(Jh);return{get:()=>e.get(),set:t=>e.set(t),clear:()=>e.set(Jh),readState:()=>e.get()}}})});var Jh;const Zh=()=>{const e=(e,t)=>{t.stop(),$r(e)};return[Qr(ur(),e),Qr(Cr(),e),sa(Ks()),sa(er())]},Qh=e=>Kr(q([e.map((e=>da(((t,o)=>{e(t),o.stop()})))).toArray(),Zh()])),ef="alloy.item-hover",tf="alloy.item-focus",of="alloy.item-toggled",nf=e=>{(rc(e.element).isNone()||Uh.isFocused(e))&&(Uh.isFocused(e)||Uh.focus(e),Gr(e,ef,{item:e}))},sf=e=>{Gr(e,tf,{item:e})},rf=x(ef),af=x(tf),lf=x(of),cf=e=>e.toggling.map((e=>e.exclusive?"menuitemradio":"menuitemcheckbox")).getOr("menuitem"),df=e=>({aria:{mode:"checked"},...ge(e,((e,t)=>"exclusive"!==t)),onToggled:(t,o)=>{p(e.onToggled)&&e.onToggled(t,o),((e,t)=>{Gr(e,of,{item:e,state:t})})(t,o)}}),uf=[ds("data"),ds("components"),ds("dom"),Ts("hasSubmenu",!1),ys("toggling"),tm("itemBehaviours",[Kh,Uh,Th,Ju]),Ts("ignoreFocus",!1),Ts("domModification",{}),sl("builder",(e=>({dom:e.dom,domModification:{...e.domModification,attributes:{role:cf(e),...e.domModification.attributes,"aria-haspopup":e.hasSubmenu,...e.hasSubmenu?{"aria-expanded":!1}:{}}},behaviours:om(e.itemBehaviours,[e.toggling.fold(Kh.revoke,(e=>Kh.config(df(e)))),Uh.config({ignore:e.ignoreFocus,stopMousedown:e.ignoreFocus,onFocus:e=>{sf(e)}}),Th.config({mode:"execution"}),Ju.config({store:{mode:"memory",initialValue:e.data}}),Vh("item-type-events",[...Zh(),Qr(sr(),nf),Qr(kr(),Uh.focus)])]),components:e.components,eventOrder:e.eventOrder}))),Ts("eventOrder",{})],mf=[ds("dom"),ds("components"),sl("builder",(e=>({dom:e.dom,components:e.components,events:Kr([ra(kr())])})))],gf=x("item-widget"),pf=x([Tm({name:"widget",overrides:e=>({behaviours:ql([Ju.config({store:{mode:"manual",getValue:t=>e.data,setValue:b}})])})})]),hf=[ds("uid"),ds("data"),ds("components"),ds("dom"),Ts("autofocus",!1),Ts("ignoreFocus",!1),tm("widgetBehaviours",[Ju,Uh,Th]),Ts("domModification",{}),Ym(pf()),sl("builder",(e=>{const t=Lm(gf(),e,pf()),o=Hm(gf(),e,t.internals()),n=t=>Pm(t,e,"widget").map((e=>(Th.focusIn(e),e))),s=(t,o)=>ng(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:Kr([da(((e,t)=>{n(e).each((e=>{t.stop()}))})),Qr(sr(),nf),Qr(kr(),((t,o)=>{e.autofocus?n(t):Uh.focus(t)}))]),behaviours:om(e.widgetBehaviours,[Ju.config({store:{mode:"memory",initialValue:e.data}}),Uh.config({ignore:e.ignoreFocus,onFocus:e=>{sf(e)}}),Th.config({mode:"special",focusIn:e.autofocus?e=>{n(e)}:Zl(),onLeft:s,onRight:s,onEscape:(t,o)=>Uh.isFocused(t)||e.autofocus?e.autofocus?(o.setSource(t.element),D.none()):D.none():(Uh.focus(t),D.some(!0))})])}}))],ff=rs("type",{widget:hf,item:uf,separator:mf}),bf=x([Am({factory:{sketch:e=>{const t=ns("menu.spec item",ff,e);return t.builder(t)}},name:"items",unit:"item",defaults:(e,t)=>ve(t,"uid")?t:{...t,uid:_a("item")},overrides:(e,t)=>({type:t.type,ignoreFocus:e.fakeFocus,domModification:{classes:[e.markers.item]}})})]),vf=x([ds("value"),ds("items"),ds("dom"),ds("components"),Ts("eventOrder",{}),Zu("menuBehaviours",[Mg,Ju,ag,Th]),Es("movement",{mode:"menu",moveOnTab:!0},rs("mode",{grid:[al(),sl("config",((e,t)=>({mode:"flatgrid",selector:"."+e.markers.item,initSize:{numColumns:t.initSize.numColumns,numRows:t.initSize.numRows},focusManager:e.focusManager})))],matrix:[sl("config",((e,t)=>({mode:"matrix",selectors:{row:t.rowSelector,cell:"."+e.markers.item},previousSelector:t.previousSelector,focusManager:e.focusManager}))),ds("rowSelector"),Ts("previousSelector",D.none)],menu:[Ts("moveOnTab",!0),sl("config",((e,t)=>({mode:"menu",selector:"."+e.markers.item,moveOnTab:t.moveOnTab,focusManager:e.focusManager})))]})),us("markers",Xi()),Ts("fakeFocus",!1),Ts("focusManager",Zg()),el("onHighlight"),el("onDehighlight")]),yf=x("alloy.menu-focus"),xf=og({name:"Menu",configFields:vf(),partFields:bf(),factory:(e,t,o,n)=>({uid:e.uid,dom:e.dom,markers:e.markers,behaviours:em(e.menuBehaviours,[Mg.config({highlightClass:e.markers.selectedItem,itemClass:e.markers.item,onHighlight:e.onHighlight,onDehighlight:e.onDehighlight}),Ju.config({store:{mode:"memory",initialValue:e.value}}),ag.config({find:D.some}),Th.config(e.movement.config(e,e.movement))]),events:Kr([Qr(af(),((e,t)=>{const o=t.event;e.getSystem().getByDom(o.target).each((o=>{Mg.highlight(e,o),t.stop(),Gr(e,yf(),{menu:e,item:o})}))})),Qr(rf(),((e,t)=>{const o=t.event.item;Mg.highlight(e,o)})),Qr(lf(),((e,t)=>{const{item:o,state:n}=t.event;n&&"menuitemradio"===Ot(o.element,"role")&&((e,t)=>{const o=Od(e.element,'[role="menuitemradio"][aria-checked="true"]');H(o,(o=>{Je(o,t.element)||e.getSystem().getByDom(o).each((e=>{Kh.off(e)}))}))})(e,o)}))]),components:t,eventOrder:e.eventOrder,domModification:{attributes:{role:"menu"}}})}),wf=(e,t,o,n)=>be(o,n).bind((n=>be(e,n).bind((n=>{const s=wf(e,t,o,n);return D.some([n].concat(s))})))).getOr([]),Sf=(e,t)=>{const o={};le(e,((e,t)=>{H(e,(e=>{o[e]=t}))}));const n=t,s=de(t,((e,t)=>({k:e,v:t})));const r=ce(s,((e,t)=>[t].concat(wf(o,n,s,t))));return ce(o,(e=>be(r,e).getOr([e])))},kf=e=>"prepared"===e.type?D.some(e.menu):D.none(),Cf={init:()=>{const e=Ns({}),t=Ns({}),o=Ns({}),n=Cc(),s=Ns({}),r=(t,o,n)=>a(t).bind((s=>(t=>he(e.get(),((e,o)=>e===t)))(t).bind((e=>o(e).map((e=>({triggeredMenu:s,triggeringItem:e,triggeringPath:n}))))))),a=e=>i(e).bind(kf),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:(r,a,i,l)=>{n.set(r),e.set(i),t.set(a),s.set(l);const c=Sf(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=s.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 s=U(l(e).toArray(),(e=>a(e).isSome()));return be(o.get(),e).bind((e=>{const o=K(s.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)})(Y(o,((e,s)=>r(e,t,o.slice(0,s+1)).fold((()=>xe(n.get(),e)?[]:[D.none()]),(e=>[D.some(e)])))))}))}}},extractPreparedMenu:kf},Of=ya("tiered-menu-item-highlight"),_f=ya("tiered-menu-item-dehighlight");var Tf;!function(e){e[e.HighlightMenuAndItem=0]="HighlightMenuAndItem",e[e.HighlightJustMenu=1]="HighlightJustMenu",e[e.HighlightNone=2]="HighlightNone"}(Tf||(Tf={}));const Ef=x("collapse-item"),Df=tg({name:"TieredMenu",configFields:[nl("onExecute"),nl("onEscape"),ol("onOpenMenu"),ol("onOpenSubmenu"),el("onRepositionMenu"),el("onCollapseMenu"),Ts("highlightOnOpen",Tf.HighlightMenuAndItem),fs("data",[ds("primary"),ds("menus"),ds("expansions")]),Ts("fakeFocus",!1),el("onHighlightItem"),el("onDehighlightItem"),el("onHover"),Ji(),ds("dom"),Ts("navigateOnHover",!0),Ts("stayInDom",!1),Zu("tmenuBehaviours",[Th,Mg,ag,Nh]),Ts("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=Cc(),n=Cf.init(),s=t=>{const o=((t,o,n)=>ce(n,((n,s)=>{const r=()=>xf.sketch({...n,value:s,markers:e.markers,fakeFocus:e.fakeFocus,onHighlight:(e,t)=>{Gr(e,Of,{menuComp:e,itemComp:t})},onDehighlight:(e,t)=>{Gr(e,_f,{menuComp:e,itemComp:t})},focusManager:e.fakeFocus?Qg():Zg()});return s===o?{type:"prepared",menu:t.getSystem().build(r())}:{type:"notbuilt",nbMenu:r}})))(t,e.data.primary,e.data.menus),s=a();return n.setContents(e.data.primary,o,e.data.expansions,s),n.getPrimary()},r=e=>Ju.getValue(e).value,a=t=>ce(e.data.menus,((e,t)=>Y(e.items,(e=>"separator"===e.type?[]:[e.data.value])))),i=Mg.highlight,l=(t,o)=>{i(t,o),Mg.getHighlighted(o).orThunk((()=>Mg.getFirst(o))).each((n=>{e.fakeFocus?Mg.highlight(o,n):qr(t,n.element,kr())}))},c=(e,t)=>we(L(t,(t=>e.lookupMenu(t).bind((e=>"prepared"===e.type?D.some(e.menu):D.none()))))),d=(t,o,n)=>{const s=c(o,o.otherMenus(n));H(s,(o=>{ii(o.element,[e.markers.backgroundMenu]),e.stayInDom||Nh.remove(t,o)}))},u=(t,n)=>{const s=(t=>o.get().getOrThunk((()=>{const n={},s=Od(t.element,`.${e.markers.item}`),a=U(s,(e=>"true"===Ot(e,"aria-haspopup")));return H(a,(e=>{t.getSystem().getByDom(e).each((e=>{const t=r(e);n[t]=e}))})),o.set(n),n})))(t);le(s,((e,t)=>{const o=R(n,t);kt(e.element,"aria-expanded",o)}))},m=(t,o,n)=>D.from(n[0]).bind((s=>o.lookupMenu(s).bind((s=>{if("notbuilt"===s.type)return D.none();{const r=s.menu,a=c(o,n.slice(1));return H(a,(t=>{ti(t.element,e.markers.backgroundMenu)})),yt(r.element)||Nh.append(t,Ti(r)),ii(r.element,[e.markers.backgroundMenu]),l(t,r),d(t,o,n),D.some(r)}}))));let g;!function(e){e[e.HighlightSubmenu=0]="HighlightSubmenu",e[e.HighlightParent=1]="HighlightParent"}(g||(g={}));const p=(t,o,s=g.HighlightSubmenu)=>{if(o.hasConfigured(xg)&&xg.isDisabled(o))return D.some(o);{const a=r(o);return n.expand(a).bind((r=>(u(t,r),D.from(r[0]).bind((a=>n.lookupMenu(a).bind((i=>{const l=((e,t,o)=>{if("notbuilt"===o.type){const s=e.getSystem().build(o.nbMenu());return n.setMenuBuilt(t,s),s}return o.menu})(t,a,i);return yt(l.element)||Nh.append(t,Ti(l)),e.onOpenSubmenu(t,o,l,K(r)),s===g.HighlightSubmenu?(Mg.highlightFirst(l),m(t,n,r)):(Mg.dehighlightAll(l),D.some(o))})))))))}},h=(t,o)=>{const s=r(o);return n.collapse(s).bind((s=>(u(t,s),m(t,n,s).map((n=>(e.onCollapseMenu(t,o,n),n))))))},f=t=>(o,n)=>Ri(n.getSource(),`.${e.markers.item}`).bind((e=>o.getSystem().getByDom(e).toOptional().bind((e=>t(o,e).map(E))))),v=Kr([Qr(yf(),((e,t)=>{const o=t.event.item;n.lookupItem(r(o)).each((()=>{const o=t.event.menu;Mg.highlight(e,o);const s=r(t.event.item);n.refresh(s).each((t=>d(e,n,t)))}))})),da(((t,o)=>{const n=o.event.target;t.getSystem().getByDom(n).each((o=>{0===r(o).indexOf("collapse-item")&&h(t,o),p(t,o,g.HighlightSubmenu).fold((()=>{e.onExecute(t,o)}),b)}))})),ia(((t,o)=>{s(t).each((o=>{Nh.append(t,Ti(o)),e.onOpenMenu(t,o),e.highlightOnOpen===Tf.HighlightMenuAndItem?l(t,o):e.highlightOnOpen===Tf.HighlightJustMenu&&i(t,o)}))})),Qr(Of,((t,o)=>{e.onHighlightItem(t,o.event.menuComp,o.event.itemComp)})),Qr(_f,((t,o)=>{e.onDehighlightItem(t,o.event.menuComp,o.event.itemComp)})),...e.navigateOnHover?[Qr(rf(),((t,o)=>{const s=o.event.item;((e,t)=>{const o=r(t);n.refresh(o).bind((t=>(u(e,t),m(e,n,t))))})(t,s),p(t,s,g.HighlightParent),e.onHover(t,s)}))]:[]]),y=e=>Mg.getHighlighted(e).bind(Mg.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=r(e),o=fe(n.getMenus()),s=we(L(o,Cf.extractPreparedMenu));return n.getTriggeringPath(t,(e=>((e,t,o)=>re(t,(e=>{if(!e.getSystem().isConnected())return D.none();const t=Mg.getCandidates(e);return G(t,(e=>r(e)===o))})))(0,s,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:em(e.tmenuBehaviours,[Th.config({mode:"special",onRight:f(((e,t)=>ng(t.element)?D.none():p(e,t,g.HighlightSubmenu))),onLeft:f(((e,t)=>ng(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=>{qr(e,t.element,kr())}))}}),Mg.config({highlightClass:e.markers.selectedMenu,itemClass:e.markers.menu}),ag.config({find:e=>Mg.getHighlighted(e)}),Nh.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:Ls(e,t),expansions:{}}),collapseItem:e=>({value:ya(Ef()),meta:{text:e}})}}),Af=tg({name:"InlineView",configFields:[ds("lazySink"),el("onShow"),el("onHide"),Cs("onEscape"),Zu("inlineBehaviours",[Mu,Ju,Ql]),_s("fireDismissalEventInstead",[Ts("event",Rr())]),_s("fireRepositionEventInstead",[Ts("event",Nr())]),Ts("getRelated",D.none),Ts("isExtraPart",T),Ts("eventOrder",D.none)],factory:(e,t)=>{const o=(t,o,n,s)=>{const r=e.lazySink(t).getOrDie();Mu.openWhileCloaked(t,o,(()=>su.positionWithinBounds(r,t,n,s()))),Ju.setValue(t,D.some({mode:"position",config:n,getBounds:s}))},n=(t,o,n,s)=>{const r=((e,t,o,n,s)=>{const r=()=>e.lazySink(t),a="horizontal"===n.type?{layouts:{onLtr:()=>Ll(),onRtl:()=>Hl()}}:{},i=e=>(e=>2===e.length)(e)?a:{};return Df.sketch({dom:{tag:"div"},data:n.data,markers:n.menu.markers,highlightOnOpen:n.menu.highlightOnOpen,fakeFocus:n.menu.fakeFocus,onEscape:()=>(Mu.close(t),e.onEscape.map((e=>e(t))),D.some(!0)),onExecute:()=>D.some(!0),onOpenMenu:(e,t)=>{su.positionWithinBounds(r().getOrDie(),t,o,s())},onOpenSubmenu:(e,t,o,n)=>{const s=r().getOrDie();su.position(s,o,{anchor:{type:"submenu",item:t,...i(n)}})},onRepositionMenu:(e,t,n)=>{const a=r().getOrDie();su.positionWithinBounds(a,t,o,s()),H(n,(e=>{const t=i(e.triggeringPath);su.position(a,e.triggeredMenu,{anchor:{type:"submenu",item:e.triggeringItem,...t}})}))}})})(e,t,o,n,s);Mu.open(t,r),Ju.setValue(t,D.some({mode:"menu",menu:r}))},s=t=>{Mu.isOpen(t)&&Ju.getValue(t).each((o=>{switch(o.mode){case"menu":Mu.getState(t).each(Df.repositionMenus);break;case"position":const n=e.lazySink(t).getOrDie();su.positionWithinBounds(n,t,o.config,o.getBounds())}}))},r={setContent:(e,t)=>{Mu.setContent(e,t)},showAt:(e,t,n)=>{const s=D.none;o(e,t,n,s)},showWithinBounds:o,showMenuAt:(e,t,o)=>{n(e,t,o,D.none)},showMenuWithinBounds:n,hide:e=>{Mu.isOpen(e)&&(Ju.setValue(e,D.none()),Mu.close(e))},getContent:e=>Mu.getState(e),reposition:s,isOpen:Mu.isOpen};return{uid:e.uid,dom:e.dom,behaviours:em(e.inlineBehaviours,[Mu.config({isPartOf:(t,o,n)=>Li(o,n)||((t,o)=>e.getRelated(t).exists((e=>Li(e,o))))(t,n),getAttachPoint:t=>e.lazySink(t).getOrDie(),onOpen:t=>{e.onShow(t)},onClose:t=>{e.onHide(t)}}),Ju.config({store:{mode:"memory",initialValue:D.none()}}),Ql.config({channels:{...Nu({isExtraPart:t.isExtraPart,...e.fireDismissalEventInstead.map((e=>({fireEventInstead:{event:e.event}}))).getOr({})}),...zu({...e.fireRepositionEventInstead.map((e=>({fireEventInstead:{event:e.event}}))).getOr({}),doReposition:s})}})]),eventOrder:e.eventOrder,apis:r}},apis:{showAt:(e,t,o,n)=>{e.showAt(t,o,n)},showWithinBounds:(e,t,o,n,s)=>{e.showWithinBounds(t,o,n,s)},showMenuAt:(e,t,o,n)=>{e.showMenuAt(t,o,n)},showMenuWithinBounds:(e,t,o,n,s)=>{e.showMenuWithinBounds(t,o,n,s)},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 Mf=tinymce.util.Tools.resolve("tinymce.util.Delay");const Bf=tg({name:"Button",factory:e=>{const t=Qh(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:om(e.buttonBehaviours,[Uh.config({}),Th.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:[Ts("uid",void 0),ds("dom"),Ts("components",[]),tm("buttonBehaviours",[Uh,Th]),ys("action"),ys("role"),Ts("eventOrder",{})]}),If=e=>{const t=Re.fromHtml(e),o=at(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),s=(e=>Array.prototype.slice.call(e.dom.classList,0))(t),r=0===o.length?{}:{innerHtml:ua(t)};return{tag:Pe(t),classes:s,attributes:n,...r}},Ff=e=>{const t=(e=>void 0!==e.uid)(e)&&ye(e,"uid")?e.uid:_a("memento");return{get:e=>e.getSystem().getByUid(t).getOrDie(),getOpt:e=>e.getSystem().getByUid(t).toOptional(),asSpec:()=>({...e,uid:t})}},{entries:Rf,setPrototypeOf:Nf,isFrozen:Vf,getPrototypeOf:zf,getOwnPropertyDescriptor:Lf}=Object;let{freeze:Hf,seal:Pf,create:Uf}=Object,{apply:Wf,construct:jf}="undefined"!=typeof Reflect&&Reflect;Wf||(Wf=function(e,t,o){return e.apply(t,o)}),Hf||(Hf=function(e){return e}),Pf||(Pf=function(e){return e}),jf||(jf=function(e,t){return new e(...t)});const Gf=nb(Array.prototype.forEach),$f=nb(Array.prototype.pop),qf=nb(Array.prototype.push),Yf=nb(String.prototype.toLowerCase),Xf=nb(String.prototype.toString),Kf=nb(String.prototype.match),Jf=nb(String.prototype.replace),Zf=nb(String.prototype.indexOf),Qf=nb(String.prototype.trim),eb=nb(RegExp.prototype.test),tb=(ob=TypeError,function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return jf(ob,t)});var ob;function nb(e){return function(t){for(var o=arguments.length,n=new Array(o>1?o-1:0),s=1;s<o;s++)n[s-1]=arguments[s];return Wf(e,t,n)}}function sb(e,t,o){var n;o=null!==(n=o)&&void 0!==n?n:Yf,Nf&&Nf(e,null);let s=t.length;for(;s--;){let n=t[s];if("string"==typeof n){const e=o(n);e!==n&&(Vf(t)||(t[s]=e),n=e)}e[n]=!0}return e}function rb(e){const t=Uf(null);for(const[o,n]of Rf(e))t[o]=n;return t}function ab(e,t){for(;null!==e;){const o=Lf(e,t);if(o){if(o.get)return nb(o.get);if("function"==typeof o.value)return nb(o.value)}e=zf(e)}return function(e){return console.warn("fallback value for",e),null}}const ib=Hf(["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"]),lb=Hf(["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"]),cb=Hf(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),db=Hf(["animate","color-profile","cursor","discard","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"]),ub=Hf(["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","mprescripts"]),mb=Hf(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),gb=Hf(["#text"]),pb=Hf(["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"]),hb=Hf(["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"]),fb=Hf(["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"]),bb=Hf(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),vb=Pf(/\{\{[\w\W]*|[\w\W]*\}\}/gm),yb=Pf(/<%[\w\W]*|[\w\W]*%>/gm),xb=Pf(/\${[\w\W]*}/gm),wb=Pf(/^data-[\-\w.\u00B7-\uFFFF]/),Sb=Pf(/^aria-[\-\w]+$/),kb=Pf(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Cb=Pf(/^(?:\w+script|data):/i),Ob=Pf(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),_b=Pf(/^html$/i);var Tb=Object.freeze({__proto__:null,MUSTACHE_EXPR:vb,ERB_EXPR:yb,TMPLIT_EXPR:xb,DATA_ATTR:wb,ARIA_ATTR:Sb,IS_ALLOWED_URI:kb,IS_SCRIPT_OR_DATA:Cb,ATTR_WHITESPACE:Ob,DOCTYPE_NAME:_b});const Eb=()=>"undefined"==typeof window?null:window,Db=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let o=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(o=t.getAttribute(n));const s="dompurify"+(o?"#"+o:"");try{return e.createPolicy(s,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+s+" could not be created."),null}};var Ab=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Eb();const o=t=>e(t);if(o.version="3.0.5",o.removed=[],!t||!t.document||9!==t.document.nodeType)return o.isSupported=!1,o;const n=t.document,s=n.currentScript;let{document:r}=t;const{DocumentFragment:a,HTMLTemplateElement:i,Node:l,Element:c,NodeFilter:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:m,DOMParser:g,trustedTypes:p}=t,h=c.prototype,f=ab(h,"cloneNode"),b=ab(h,"nextSibling"),v=ab(h,"childNodes"),y=ab(h,"parentNode");if("function"==typeof i){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let x,w="";const{implementation:S,createNodeIterator:k,createDocumentFragment:C,getElementsByTagName:O}=r,{importNode:_}=n;let T={};o.isSupported="function"==typeof Rf&&"function"==typeof y&&S&&void 0!==S.createHTMLDocument;const{MUSTACHE_EXPR:E,ERB_EXPR:D,TMPLIT_EXPR:A,DATA_ATTR:M,ARIA_ATTR:B,IS_SCRIPT_OR_DATA:I,ATTR_WHITESPACE:F}=Tb;let{IS_ALLOWED_URI:R}=Tb,N=null;const V=sb({},[...ib,...lb,...cb,...ub,...gb]);let z=null;const L=sb({},[...pb,...hb,...fb,...bb]);let H=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}})),P=null,U=null,W=!0,j=!0,G=!1,$=!0,q=!1,Y=!1,X=!1,K=!1,J=!1,Z=!1,Q=!1,ee=!0,te=!1;const oe="user-content-";let ne=!0,se=!1,re={},ae=null;const ie=sb({},["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"]);let le=null;const ce=sb({},["audio","video","img","source","image","track"]);let de=null;const ue=sb({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),me="http://www.w3.org/1998/Math/MathML",ge="http://www.w3.org/2000/svg",pe="http://www.w3.org/1999/xhtml";let he=pe,fe=!1,be=null;const ve=sb({},[me,ge,pe],Xf);let ye;const xe=["application/xhtml+xml","text/html"],we="text/html";let Se,ke=null;const Ce=r.createElement("form"),Oe=function(e){return e instanceof RegExp||e instanceof Function},_e=function(e){if(!ke||ke!==e){if(e&&"object"==typeof e||(e={}),e=rb(e),ye=ye=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?we:e.PARSER_MEDIA_TYPE,Se="application/xhtml+xml"===ye?Xf:Yf,N="ALLOWED_TAGS"in e?sb({},e.ALLOWED_TAGS,Se):V,z="ALLOWED_ATTR"in e?sb({},e.ALLOWED_ATTR,Se):L,be="ALLOWED_NAMESPACES"in e?sb({},e.ALLOWED_NAMESPACES,Xf):ve,de="ADD_URI_SAFE_ATTR"in e?sb(rb(ue),e.ADD_URI_SAFE_ATTR,Se):ue,le="ADD_DATA_URI_TAGS"in e?sb(rb(ce),e.ADD_DATA_URI_TAGS,Se):ce,ae="FORBID_CONTENTS"in e?sb({},e.FORBID_CONTENTS,Se):ie,P="FORBID_TAGS"in e?sb({},e.FORBID_TAGS,Se):{},U="FORBID_ATTR"in e?sb({},e.FORBID_ATTR,Se):{},re="USE_PROFILES"in e&&e.USE_PROFILES,W=!1!==e.ALLOW_ARIA_ATTR,j=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,$=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,q=e.SAFE_FOR_TEMPLATES||!1,Y=e.WHOLE_DOCUMENT||!1,J=e.RETURN_DOM||!1,Z=e.RETURN_DOM_FRAGMENT||!1,Q=e.RETURN_TRUSTED_TYPE||!1,K=e.FORCE_BODY||!1,ee=!1!==e.SANITIZE_DOM,te=e.SANITIZE_NAMED_PROPS||!1,ne=!1!==e.KEEP_CONTENT,se=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||kb,he=e.NAMESPACE||pe,H=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Oe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Oe(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(H.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(H.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),q&&(j=!1),Z&&(J=!0),re&&(N=sb({},[...gb]),z=[],!0===re.html&&(sb(N,ib),sb(z,pb)),!0===re.svg&&(sb(N,lb),sb(z,hb),sb(z,bb)),!0===re.svgFilters&&(sb(N,cb),sb(z,hb),sb(z,bb)),!0===re.mathMl&&(sb(N,ub),sb(z,fb),sb(z,bb))),e.ADD_TAGS&&(N===V&&(N=rb(N)),sb(N,e.ADD_TAGS,Se)),e.ADD_ATTR&&(z===L&&(z=rb(z)),sb(z,e.ADD_ATTR,Se)),e.ADD_URI_SAFE_ATTR&&sb(de,e.ADD_URI_SAFE_ATTR,Se),e.FORBID_CONTENTS&&(ae===ie&&(ae=rb(ae)),sb(ae,e.FORBID_CONTENTS,Se)),ne&&(N["#text"]=!0),Y&&sb(N,["html","head","body"]),N.table&&(sb(N,["tbody"]),delete P.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw tb('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw tb('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=e.TRUSTED_TYPES_POLICY,w=x.createHTML("")}else void 0===x&&(x=Db(p,s)),null!==x&&"string"==typeof w&&(w=x.createHTML(""));Hf&&Hf(e),ke=e}},Te=sb({},["mi","mo","mn","ms","mtext"]),Ee=sb({},["foreignobject","desc","title","annotation-xml"]),De=sb({},["title","style","font","a","script"]),Ae=sb({},lb);sb(Ae,cb),sb(Ae,db);const Me=sb({},ub);sb(Me,mb);const Be=function(e){let t=y(e);t&&t.tagName||(t={namespaceURI:he,tagName:"template"});const o=Yf(e.tagName),n=Yf(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===pe?"svg"===o:t.namespaceURI===me?"svg"===o&&("annotation-xml"===n||Te[n]):Boolean(Ae[o]):e.namespaceURI===me?t.namespaceURI===pe?"math"===o:t.namespaceURI===ge?"math"===o&&Ee[n]:Boolean(Me[o]):e.namespaceURI===pe?!(t.namespaceURI===ge&&!Ee[n])&&(!(t.namespaceURI===me&&!Te[n])&&(!Me[o]&&(De[o]||!Ae[o]))):!("application/xhtml+xml"!==ye||!be[e.namespaceURI]))},Ie=function(e){qf(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},Fe=function(e,t){try{qf(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){qf(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!z[e])if(J||Z)try{Ie(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Re=function(e){let t,o;if(K)e="<remove></remove>"+e;else{const t=Kf(e,/^[\r\n\t ]+/);o=t&&t[0]}"application/xhtml+xml"===ye&&he===pe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const n=x?x.createHTML(e):e;if(he===pe)try{t=(new g).parseFromString(n,ye)}catch(e){}if(!t||!t.documentElement){t=S.createDocument(he,"template",null);try{t.documentElement.innerHTML=fe?w:n}catch(e){}}const s=t.body||t.documentElement;return e&&o&&s.insertBefore(r.createTextNode(o),s.childNodes[0]||null),he===pe?O.call(t,Y?"html":"body")[0]:Y?t.documentElement:s},Ne=function(e){return k.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT,null,!1)},Ve=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||"function"!=typeof e.hasChildNodes)},ze=function(e){return"object"==typeof l?e instanceof l:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Le=function(e,t,n){T[e]&&Gf(T[e],(e=>{e.call(o,t,n,ke)}))},He=function(e){let t;if(Le("beforeSanitizeElements",e,null),Ve(e))return Ie(e),!0;const n=Se(e.nodeName);if(Le("uponSanitizeElement",e,{tagName:n,allowedTags:N}),e.hasChildNodes()&&!ze(e.firstElementChild)&&(!ze(e.content)||!ze(e.content.firstElementChild))&&eb(/<[/\w]/g,e.innerHTML)&&eb(/<[/\w]/g,e.textContent))return Ie(e),!0;if(!N[n]||P[n]){if(!P[n]&&Ue(n)){if(H.tagNameCheck instanceof RegExp&&eb(H.tagNameCheck,n))return!1;if(H.tagNameCheck instanceof Function&&H.tagNameCheck(n))return!1}if(ne&&!ae[n]){const t=y(e)||e.parentNode,o=v(e)||e.childNodes;if(o&&t){for(let n=o.length-1;n>=0;--n)t.insertBefore(f(o[n],!0),b(e))}}return Ie(e),!0}return e instanceof c&&!Be(e)?(Ie(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!eb(/<\/no(script|embed|frames)/i,e.innerHTML)?(q&&3===e.nodeType&&(t=e.textContent,t=Jf(t,E," "),t=Jf(t,D," "),t=Jf(t,A," "),e.textContent!==t&&(qf(o.removed,{element:e.cloneNode()}),e.textContent=t)),Le("afterSanitizeElements",e,null),!1):(Ie(e),!0)},Pe=function(e,t,o){if(ee&&("id"===t||"name"===t)&&(o in r||o in Ce))return!1;if(j&&!U[t]&&eb(M,t));else if(W&&eb(B,t));else if(!z[t]||U[t]){if(!(Ue(e)&&(H.tagNameCheck instanceof RegExp&&eb(H.tagNameCheck,e)||H.tagNameCheck instanceof Function&&H.tagNameCheck(e))&&(H.attributeNameCheck instanceof RegExp&&eb(H.attributeNameCheck,t)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(t))||"is"===t&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&eb(H.tagNameCheck,o)||H.tagNameCheck instanceof Function&&H.tagNameCheck(o))))return!1}else if(de[t]);else if(eb(R,Jf(o,F,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Zf(o,"data:")||!le[e]){if(G&&!eb(I,Jf(o,F,"")));else if(o)return!1}else;return!0},Ue=function(e){return e.indexOf("-")>0},We=function(e){let t,o,n,s;Le("beforeSanitizeAttributes",e,null);const{attributes:r}=e;if(!r)return;const a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z};for(s=r.length;s--;){t=r[s];const{name:i,namespaceURI:l}=t;o="value"===i?t.value:Qf(t.value);const c=o;if(n=Se(i),a.attrName=n,a.attrValue=o,a.keepAttr=!0,a.forceKeepAttr=void 0,Le("uponSanitizeAttribute",e,a),o=a.attrValue,a.forceKeepAttr)continue;if(!a.keepAttr){Fe(i,e);continue}if(!$&&eb(/\/>/i,o)){Fe(i,e);continue}q&&(o=Jf(o,E," "),o=Jf(o,D," "),o=Jf(o,A," "));const d=Se(e.nodeName);if(Pe(d,n,o)){if(!te||"id"!==n&&"name"!==n||(Fe(i,e),o=oe+o),x&&"object"==typeof p&&"function"==typeof p.getAttributeType)if(l);else switch(p.getAttributeType(d,n)){case"TrustedHTML":o=x.createHTML(o);break;case"TrustedScriptURL":o=x.createScriptURL(o)}if(o!==c)try{l?e.setAttributeNS(l,i,o):e.setAttribute(i,o)}catch(t){Fe(i,e)}}else Fe(i,e)}Le("afterSanitizeAttributes",e,null)},je=function e(t){let o;const n=Ne(t);for(Le("beforeSanitizeShadowDOM",t,null);o=n.nextNode();)Le("uponSanitizeShadowNode",o,null),He(o)||(o.content instanceof a&&e(o.content),We(o));Le("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t,s,r,i,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(fe=!e,fe&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ze(e)){if("function"!=typeof e.toString)throw tb("toString is not a function");if("string"!=typeof(e=e.toString()))throw tb("dirty is not a string, aborting")}if(!o.isSupported)return e;if(X||_e(c),o.removed=[],"string"==typeof e&&(se=!1),se){if(e.nodeName){const t=Se(e.nodeName);if(!N[t]||P[t])throw tb("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)t=Re("\x3c!----\x3e"),s=t.ownerDocument.importNode(e,!0),1===s.nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?t=s:t.appendChild(s);else{if(!J&&!q&&!Y&&-1===e.indexOf("<"))return x&&Q?x.createHTML(e):e;if(t=Re(e),!t)return J?null:Q?w:""}t&&K&&Ie(t.firstChild);const d=Ne(se?e:t);for(;r=d.nextNode();)He(r)||(r.content instanceof a&&je(r.content),We(r));if(se)return e;if(J){if(Z)for(i=C.call(t.ownerDocument);t.firstChild;)i.appendChild(t.firstChild);else i=t;return(z.shadowroot||z.shadowrootmode)&&(i=_.call(n,i,!0)),i}let u=Y?t.outerHTML:t.innerHTML;return Y&&N["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&eb(_b,t.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+t.ownerDocument.doctype.name+">\n"+u),q&&(u=Jf(u,E," "),u=Jf(u,D," "),u=Jf(u,A," ")),x&&Q?x.createHTML(u):u},o.setConfig=function(e){_e(e),X=!0},o.clearConfig=function(){ke=null,X=!1},o.isValidAttribute=function(e,t,o){ke||_e({});const n=Se(e),s=Se(t);return Pe(n,s,o)},o.addHook=function(e,t){"function"==typeof t&&(T[e]=T[e]||[],qf(T[e],t))},o.removeHook=function(e){if(T[e])return $f(T[e])},o.removeHooks=function(e){T[e]&&(T[e]=[])},o.removeAllHooks=function(){T={}},o}();const Mb=e=>Ab().sanitize(e);var Bb=tinymce.util.Tools.resolve("tinymce.util.I18n");const Ib={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},Fb="temporary-placeholder",Rb=e=>()=>be(e,Fb).getOr("!not found!"),Nb=(e,t)=>{const o=e.toLowerCase();if(Bb.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},Vb=(e,t)=>be(t,Nb(e,t)),zb=(e,t)=>{const o=t();return Vb(e,o).getOrThunk(Rb(o))},Lb=()=>Vh("add-focusable",[ia((e=>{Ii(e.element,"svg").each((e=>kt(e,"focusable","false")))}))]),Hb=(e,t,o,n)=>{var s,r;const a=(e=>!!Bb.isRtl()&&ve(Ib,e))(t)?["tox-icon--flip"]:[],i=be(o,Nb(t,o)).or(n).getOrThunk(Rb(o));return{dom:{tag:e.tag,attributes:null!==(s=e.attributes)&&void 0!==s?s:{},classes:e.classes.concat(a),innerHtml:i},behaviours:ql([...null!==(r=e.behaviours)&&void 0!==r?r:[],Lb()])}},Pb=(e,t,o,n=D.none())=>Hb(t,e,o(),n),Ub={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},Wb=tg({name:"Notification",factory:e=>{const t=Ff({dom:If(`<p>${Mb(e.translationProvider(e.text))}</p>`),behaviours:ql([Nh.config({})])}),o=e=>({dom:{tag:"div",classes:["tox-bar"],styles:{width:`${e}%`}}}),n=e=>({dom:{tag:"div",classes:["tox-text"],innerHtml:`${e}%`}}),s=Ff({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:ql([Nh.config({})])}),r={updateProgress:(e,t)=>{e.getSystem().isConnected()&&s.getOpt(e).each((e=>{Nh.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);Nh.set(n,[Si(o)])}}},a=q([e.icon.toArray(),e.level.toArray(),e.level.bind((e=>D.from(Ub[e]))).toArray()]),i=Ff(Bf.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"]},components:[Pb("close",{tag:"span",classes:["tox-icon"],attributes:{"aria-label":e.translationProvider("Close")}},e.iconProvider)],action:t=>{e.onAction(t)}})),l=((e,t,o)=>{const n=o(),s=G(e,(e=>ve(n,Nb(e,n))));return Hb(t,s.getOr(Fb),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:ql([Nh.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:ql([Uh.config({}),Vh("notification-events",[Qr(rr(),(e=>{i.getOpt(e).each(Uh.focus)}))])]),components:c.concat(e.progress?[s.asSpec()]:[]).concat(e.closeButton?[i.asSpec()]:[]),apis:r}},configFields:[ys("level"),ds("progress"),ys("icon"),ds("onAction"),ds("text"),ds("iconProvider"),ds("translationProvider"),Bs("closeButton",!0)],apis:{updateProgress:(e,t,o)=>{e.updateProgress(t,o)},updateText:(e,t,o)=>{e.updateText(t,o)}}});var jb,Gb,$b=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),qb=tinymce.util.Tools.resolve("tinymce.EditorManager"),Yb=tinymce.util.Tools.resolve("tinymce.Env");!function(e){e.default="wrap",e.floating="floating",e.sliding="sliding",e.scrolling="scrolling"}(jb||(jb={})),function(e){e.auto="auto",e.top="top",e.bottom="bottom"}(Gb||(Gb={}));const Xb=e=>t=>t.options.get(e),Kb=e=>t=>D.from(e(t)),Jb=e=>{const t=Yb.deviceType.isPhone(),o=Yb.deviceType.isTablet()||t,n=e.options.register,s=e=>r(e)||!1===e,a=e=>r(e)||h(e);n("skin",{processor:e=>r(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:$b.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=>r(e)||d(e),default:!t}),n("menu",{processor:"object",default:{}}),n("toolbar",{processor:e=>d(e)||r(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:Gb.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:s,default:"#top"}),n("anchor_bottom",{processor:s,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:!Yb.deviceType.isTouch()}),n("sidebar_show",{processor:"string"}),n("help_accessibility",{processor:"boolean",default:e.hasPlugin("help")}),n("default_font_stack",{processor:"string[]",default:[]})},Zb=Xb("readonly"),Qb=Xb("height"),ev=Xb("width"),tv=Kb(Xb("min_width")),ov=Kb(Xb("min_height")),nv=Kb(Xb("max_width")),sv=Kb(Xb("max_height")),rv=Kb(Xb("style_formats")),av=Xb("style_formats_merge"),iv=Xb("style_formats_autohide"),lv=Xb("content_langs"),cv=Xb("removed_menuitems"),dv=Xb("toolbar_mode"),uv=Xb("toolbar_groups"),mv=Xb("toolbar_location"),gv=Xb("fixed_toolbar_container"),pv=Xb("fixed_toolbar_container_target"),hv=Xb("toolbar_persist"),fv=Xb("toolbar_sticky_offset"),bv=Xb("menubar"),vv=Xb("toolbar"),yv=Xb("file_picker_callback"),xv=Xb("file_picker_validator_handler"),wv=Xb("font_size_input_default_unit"),Sv=Xb("file_picker_types"),kv=Xb("typeahead_urls"),Cv=Xb("anchor_top"),Ov=Xb("anchor_bottom"),_v=Xb("draggable_modal"),Tv=Xb("statusbar"),Ev=Xb("elementpath"),Dv=Xb("branding"),Av=Xb("resize"),Mv=Xb("paste_as_text"),Bv=Xb("sidebar_show"),Iv=Xb("promotion"),Fv=Xb("help_accessibility"),Rv=Xb("default_font_stack"),Nv=e=>!1===e.options.get("skin"),Vv=e=>!1!==e.options.get("menubar"),zv=e=>{const t=e.options.get("skin_url");if(Nv(e))return t;if(t)return e.documentBaseURI.toAbsolute(t);{const t=e.options.get("skin");return qb.baseURL+"/skins/ui/"+t}},Lv=e=>D.from(e.options.get("skin_url")),Hv=e=>e.options.get("line_height_formats").split(" "),Pv=e=>{const t=vv(e),o=r(t),n=l(t)&&t.length>0;return!Wv(e)&&(n||o||!0===t)},Uv=e=>{const t=V(9,(t=>e.options.get("toolbar"+(t+1)))),o=U(t,r);return Ce(o.length>0,o)},Wv=e=>Uv(e).fold((()=>{const t=vv(e);return f(t,r)&&t.length>0}),E),jv=e=>mv(e)===Gb.bottom,Gv=e=>{var t;if(!e.inline)return D.none();const o=null!==(t=gv(e))&&void 0!==t?t:"";if(o.length>0)return Fi(xt(),o);const n=pv(e);return g(n)?D.some(Re.fromDom(n)):D.none()},$v=e=>e.inline&&Gv(e).isSome(),qv=e=>Gv(e).getOrThunk((()=>ht(pt(Re.fromDom(e.getElement()))))),Yv=e=>e.inline&&!Vv(e)&&!Pv(e)&&!Wv(e),Xv=e=>(e.options.get("toolbar_sticky")||e.inline)&&!$v(e)&&!Yv(e),Kv=e=>!$v(e)&&"split"===e.options.get("ui_mode"),Jv=e=>{const t=e.options.get("menu");return ce(t,(e=>({...e,items:e.items})))};var Zv=Object.freeze({__proto__:null,get ToolbarMode(){return jb},get ToolbarLocation(){return Gb},register:Jb,getSkinUrl:zv,getSkinUrlOption:Lv,isReadOnly:Zb,isSkinDisabled:Nv,getHeightOption:Qb,getWidthOption:ev,getMinWidthOption:tv,getMinHeightOption:ov,getMaxWidthOption:nv,getMaxHeightOption:sv,getUserStyleFormats:rv,shouldMergeStyleFormats:av,shouldAutoHideStyleFormats:iv,getLineHeightFormats:Hv,getContentLanguages:lv,getRemovedMenuItems:cv,isMenubarEnabled:Vv,isMultipleToolbars:Wv,isToolbarEnabled:Pv,isToolbarPersist:hv,getMultipleToolbarsOption:Uv,getUiContainer:qv,useFixedContainer:$v,isSplitUiMode:Kv,getToolbarMode:dv,isDraggableModal:_v,isDistractionFree:Yv,isStickyToolbar:Xv,getStickyToolbarOffset:fv,getToolbarLocation:mv,isToolbarLocationBottom:jv,getToolbarGroups:uv,getMenus:Jv,getMenubar:bv,getToolbar:vv,getFilePickerCallback:yv,getFilePickerTypes:Sv,useTypeaheadUrls:kv,getAnchorTop:Cv,getAnchorBottom:Ov,getFilePickerValidatorHandler:xv,getFontSizeInputDefaultUnit:wv,useStatusBar:Tv,useElementPath:Ev,promotionEnabled:Iv,useBranding:Dv,getResize:Av,getPasteAsText:Mv,getSidebarShow:Bv,useHelpAccessibility:Fv,getDefaultFontStack:Rv});const Qv="[data-mce-autocompleter]",ey=e=>Ri(e,Qv),ty=(e,t)=>{const o=(e,t)=>{Gr(e,ir(),{raw:t})},n=()=>e.getMenu().bind(Mg.getHighlighted);t.on("keydown",(t=>{const s=t.which;e.isActive()&&(e.isMenuOpen()?13===s?(n().each($r),t.preventDefault()):40===s?(n().fold((()=>{e.getMenu().each(Mg.highlightFirst)}),(e=>{o(e,t)})),t.preventDefault(),t.stopImmediatePropagation()):37!==s&&38!==s&&39!==s||n().each((e=>{o(e,t),t.preventDefault(),t.stopImmediatePropagation()})):13!==s&&38!==s&&40!==s||e.cancelIfNecessary())})),t.on("NodeChange",(t=>{e.isActive()&&!e.isProcessingAction()&&ey(Re.fromDom(t.element)).isNone()&&e.cancelIfNecessary()}))};var oy;!function(e){e[e.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",e[e.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX"}(oy||(oy={}));var ny=oy;const sy="tox-menu-nav__js",ry="tox-collection__item",ay="tox-swatch",iy={normal:sy,color:ay},ly="tox-collection__item--enabled",cy="tox-collection__item-icon",dy="tox-collection__item-label",uy="tox-collection__item-caret",my="tox-collection__item--active",gy="tox-collection__item-container",py="tox-collection__item-container--row",hy=e=>be(iy,e).getOr(sy),fy=e=>"color"===e?"tox-swatches":"tox-menu",by=e=>({backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:fy(e),tieredMenu:"tox-tiered-menu"}),vy=e=>{const t=by(e);return{backgroundMenu:t.backgroundMenu,selectedMenu:t.selectedMenu,menu:t.menu,selectedItem:t.selectedItem,item:hy(e)}},yy=(e,t,o)=>{const n=by(o);return{tag:"div",classes:q([[n.menu,`tox-menu-${t}-column`],e?[n.hasIcons]:[]])}},xy=[xf.parts.items({})],wy=(e,t,o)=>{const n=by(o);return{dom:{tag:"div",classes:q([[n.tieredMenu]])},markers:vy(o)}},Sy=x([ys("data"),Ts("inputAttributes",{}),Ts("inputStyles",{}),Ts("tag","input"),Ts("inputClasses",[]),el("onSetValue"),Ts("styles",{}),Ts("eventOrder",{}),Zu("inputBehaviours",[Ju,Uh]),Ts("selectOnFocus",!0)]),ky=e=>ql([Uh.config({onFocus:e.selectOnFocus?e=>{const t=e.element,o=ci(t);t.dom.setSelectionRange(0,o.length)}:b})]),Cy=e=>({...ky(e),...em(e.inputBehaviours,[Ju.config({store:{mode:"manual",...e.data.map((e=>({initialValue:e}))).getOr({}),getValue:e=>ci(e.element),setValue:(e,t)=>{ci(e.element)!==t&&di(e.element,t)}},onSetValue:e.onSetValue})])}),Oy=e=>({tag:e.tag,attributes:{type:"text",...e.inputAttributes},styles:e.inputStyles,classes:e.inputClasses}),_y=tg({name:"Input",configFields:Sy(),factory:(e,t)=>({uid:e.uid,dom:Oy(e),components:[],behaviours:Cy(e),eventOrder:e.eventOrder})}),Ty=ya("refetch-trigger-event"),Ey=ya("redirect-menu-item-interaction"),Dy="tox-menu__searcher",Ay=e=>Fi(e.element,".tox-menu__searcher").bind((t=>e.getSystem().getByDom(t).toOptional())),My=Ay,By=e=>({fetchPattern:Ju.getValue(e),selectionStart:e.element.dom.selectionStart,selectionEnd:e.element.dom.selectionEnd}),Iy=e=>{const t=(e,t)=>(t.cut(),D.none()),o=(e,t)=>{const o={interactionEvent:t.event,eventType:t.event.raw.type};return Gr(e,Ey,o),D.some(!0)},n="searcher-events";return{dom:{tag:"div",classes:[ry]},components:[_y.sketch({inputClasses:[Dy,"tox-textfield"],inputAttributes:{...e.placeholder.map((t=>({placeholder:e.i18n(t)}))).getOr({}),type:"search","aria-autocomplete":"list"},inputBehaviours:ql([Vh(n,[Qr(cr(),(e=>{jr(e,Ty)})),Qr(ir(),((e,t)=>{"Escape"===t.event.raw.key&&t.stop()}))]),Th.config({mode:"special",onLeft:t,onRight:t,onSpace:t,onEnter:o,onEscape:o,onUp:o,onDown:o})]),eventOrder:{keydown:[n,Th.name()]}})]}},Fy="tox-collection--results__js",Ry=e=>{var t;return e.dom?{...e,dom:{...e.dom,attributes:{...null!==(t=e.dom.attributes)&&void 0!==t?t:{},id:ya("aria-item-search-result-id"),"aria-selected":"false"}}}:e},Ny=(e,t)=>o=>{const n=z(o,t);return L(n,(t=>({dom:e,components:t})))},Vy=(e,t)=>{const o=[];let n=[];return H(e,((e,s)=>{t(e,s)?(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),L(o,(e=>({dom:{tag:"div",classes:["tox-collection__group"]},components:e})))},zy=(e,t,o)=>xf.parts.items({preprocess:n=>{const s=L(n,o);return"auto"!==e&&e>1?Ny({tag:"div",classes:["tox-collection__group"]},e)(s):Vy(s,((e,o)=>"separator"===t[o].type))}}),Ly=(e,t,o=!0)=>({dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===e?["tox-collection--list"]:["tox-collection--grid"])},components:[zy(e,t,w)]}),Hy=e=>N(e,(e=>"icon"in e&&void 0!==e.icon)),Py=e=>(console.error(ss(e)),console.log(e),D.none()),Uy=(e,t,o,n,s)=>{const r=(a=o,{dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[xf.parts.items({preprocess:e=>Vy(e,((e,t)=>"separator"===a[t].type))})]});var a;return{value:e,dom:r.dom,components:r.components,items:o}},Wy=(e,t,o,n,s)=>{const r=()=>"searchable"!==s.menuType?Ly(n,o):"search-with-field"===s.searchMode.searchMode?((e,t,o)=>{const n=ya("aria-controls-search-results");return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===e?["tox-collection--list"]:["tox-collection--grid"])},components:[Iy({i18n:Bb.translate,placeholder:o.placeholder}),{dom:{tag:"div",classes:[...1===e?["tox-collection--list"]:["tox-collection--grid"],Fy],attributes:{id:n}},components:[zy(e,t,Ry)]}]}})(n,o,s.searchMode):((e,t,o=!0)=>{const n=ya("aria-controls-search-results");return{dom:{tag:"div",classes:["tox-menu","tox-collection",Fy].concat(1===e?["tox-collection--list"]:["tox-collection--grid"]),attributes:{id:n}},components:[zy(e,t,Ry)]}})(n,o);if("color"===s.menuType){const t=(e=>({dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[xf.parts.items({preprocess:"auto"!==e?Ny({tag:"div",classes:["tox-swatches__row"]},e):w})]}]}))(n);return{value:e,dom:t.dom,components:t.components,items:o}}if("normal"===s.menuType&&"auto"===n){const t=Ly(n,o);return{value:e,dom:t.dom,components:t.components,items:o}}if("normal"===s.menuType||"searchable"===s.menuType){const t=r();return{value:e,dom:t.dom,components:t.components,items:o}}if("listpreview"===s.menuType&&"auto"!==n){const t=(e=>({dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[xf.parts.items({preprocess:Ny({tag:"div",classes:["tox-collection__group"]},e)})]}))(n);return{value:e,dom:t.dom,components:t.components,items:o}}return{value:e,dom:yy(t,n,s.menuType),components:xy,items:o}},jy=gs("type"),Gy=gs("name"),$y=gs("label"),qy=gs("text"),Yy=gs("title"),Xy=gs("icon"),Ky=gs("value"),Jy=hs("fetch"),Zy=hs("getSubmenuItems"),Qy=hs("onAction"),ex=hs("onItemAction"),tx=Is("onSetup",(()=>b)),ox=Ss("name"),nx=Ss("text"),sx=Ss("icon"),rx=Ss("tooltip"),ax=Ss("label"),ix=Ss("shortcut"),lx=Cs("select"),cx=Bs("active",!1),dx=Bs("borderless",!1),ux=Bs("enabled",!0),mx=Bs("primary",!1),gx=e=>Ts("columns",e),px=Ts("meta",{}),hx=Is("onAction",b),fx=e=>As("type",e),bx=e=>is("name","name",kn((()=>ya(`${e}-name`))),$n),vx=zn([jy,nx]),yx=zn([fx("autocompleteitem"),cx,ux,px,Ky,nx,sx]),xx=[ux,rx,sx,nx,tx],wx=zn([jy,Qy].concat(xx)),Sx=e=>ts("toolbarbutton",wx,e),kx=[cx].concat(xx),Cx=zn(kx.concat([jy,Qy])),Ox=e=>ts("ToggleButton",Cx,e),_x=[Is("predicate",T),Ms("scope","node",["node","editor"]),Ms("position","selection",["node","selection","line"])],Tx=xx.concat([fx("contextformbutton"),mx,Qy,ls("original",w)]),Ex=kx.concat([fx("contextformbutton"),mx,Qy,ls("original",w)]),Dx=xx.concat([fx("contextformbutton")]),Ax=kx.concat([fx("contextformtogglebutton")]),Mx=rs("type",{contextformbutton:Tx,contextformtogglebutton:Ex}),Bx=zn([fx("contextform"),Is("initValue",x("")),ax,vs("commands",Mx),xs("launch",rs("type",{contextformbutton:Dx,contextformtogglebutton:Ax}))].concat(_x)),Ix=zn([fx("contexttoolbar"),gs("items")].concat(_x)),Fx=[jy,gs("src"),Ss("alt"),Fs("classes",[],$n)],Rx=zn(Fx),Nx=[jy,qy,ox,Fs("classes",["tox-collection__item-label"],$n)],Vx=zn(Nx),zx=Rn((()=>Zn("type",{cardimage:Rx,cardtext:Vx,cardcontainer:Lx}))),Lx=zn([jy,As("direction","horizontal"),As("align","left"),As("valign","middle"),vs("items",zx)]),Hx=[ux,nx,ix,(Px="menuitem",is("value","value",kn((()=>ya(`${Px}-value`))),Wn())),px];var Px;const Ux=zn([jy,ax,vs("items",zx),tx,hx].concat(Hx)),Wx=zn([jy,cx,sx].concat(Hx)),jx=[jy,gs("fancytype"),hx],Gx=[Ts("initData",{})].concat(jx),$x=[Cs("select"),Rs("initData",{},[Bs("allowCustomColors",!0),As("storageKey","default"),Os("colors",Wn())])].concat(jx),qx=rs("fancytype",{inserttable:Gx,colorswatch:$x}),Yx=zn([jy,tx,hx,sx].concat(Hx)),Xx=zn([jy,Zy,tx,sx].concat(Hx)),Kx=zn([jy,sx,cx,tx,Qy].concat(Hx)),Jx=(e,t,o)=>{const n=Od(e.element,"."+o);if(n.length>0){const e=$(n,(e=>{const o=e.dom.getBoundingClientRect().top,s=n[0].dom.getBoundingClientRect().top;return Math.abs(o-s)>t})).getOr(n.length);return D.some({numColumns:e,numRows:Math.ceil(n.length/e)})}return D.none()},Zx=(e,t)=>ql([Vh(e,t)]),Qx=e=>Zx(ya("unnamed-events"),e),ew=ya("tooltip.exclusive"),tw=ya("tooltip.show"),ow=ya("tooltip.hide"),nw=(e,t,o)=>{e.getSystem().broadcastOn([ew],{})};var sw=Object.freeze({__proto__:null,hideAllExclusive:nw,setComponents:(e,t,o,n)=>{o.getTooltip().each((e=>{e.getSystem().isConnected()&&Nh.set(e,n)}))}});var rw=Object.freeze({__proto__:null,events:(e,t)=>{const o=o=>{t.getTooltip().each((n=>{hu(n),e.onHide(o,n),t.clearTooltip()})),t.clearTimer()};return Kr(q([[Qr(tw,(o=>{t.resetTimer((()=>{(o=>{if(!t.isShowing()){nw(o);const n=e.lazySink(o).getOrDie(),s=o.getSystem().build({dom:e.tooltipDom,components:e.tooltipComponents,events:Kr("normal"===e.mode?[Qr(sr(),(e=>{jr(o,tw)})),Qr(or(),(e=>{jr(o,ow)}))]:[]),behaviours:ql([Nh.config({})])});t.setTooltip(s),mu(n,s),e.onShow(o,s),su.position(n,s,{anchor:e.anchor(o)})}})(o)}),e.delay)})),Qr(ow,(n=>{t.resetTimer((()=>{o(n)}),e.delay)})),Qr(wr(),((e,t)=>{const n=t;n.universal||R(n.channels,ew)&&o(e)})),la((e=>{o(e)}))],"normal"===e.mode?[Qr(rr(),(e=>{jr(e,tw)})),Qr(yr(),(e=>{jr(e,ow)})),Qr(sr(),(e=>{jr(e,tw)})),Qr(or(),(e=>{jr(e,ow)}))]:[Qr(Ur(),((e,t)=>{jr(e,tw)})),Qr(Wr(),(e=>{jr(e,ow)}))]]))}}),aw=[ds("lazySink"),ds("tooltipDom"),Ts("exclusive",!0),Ts("tooltipComponents",[]),Ts("delay",300),Ms("mode","normal",["normal","follow-highlight"]),Ts("anchor",(e=>({type:"hotspot",hotspot:e,layouts:{onLtr:x([Bl,Ml,Tl,Dl,El,Al]),onRtl:x([Bl,Ml,Tl,Dl,El,Al])}}))),el("onHide"),el("onShow")];var iw=Object.freeze({__proto__:null,init:()=>{const e=Cc(),t=Cc(),o=()=>{e.on(clearTimeout)},n=x("not-implemented");return Va({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 lw=Xl({fields:aw,name:"tooltipping",active:rw,state:iw,apis:sw}),cw="silver.readonly",dw=zn([(uw="readonly",us(uw,qn))]);var uw;const mw=(e,t)=>{const o=e.mainUi.outerContainer.element,n=[e.mainUi.mothership,...e.uiMotherships];t&&H(n,(e=>{e.broadcastOn([Bu()],{target:o})})),H(n,(e=>{e.broadcastOn([cw],{readonly:t})}))},gw=(e,t)=>{e.on("init",(()=>{e.mode.isReadOnly()&&mw(t,!0)})),e.on("SwitchMode",(()=>mw(t,e.mode.isReadOnly()))),Zb(e)&&e.mode.set("readonly")},pw=()=>Ql.config({channels:{[cw]:{schema:dw,onReceive:(e,t)=>{xg.set(e,t.readonly)}}}}),hw=e=>xg.config({disabled:e,disableClass:"tox-collection__item--state-disabled"}),fw=e=>xg.config({disabled:e}),bw=e=>xg.config({disabled:e,disableClass:"tox-tbtn--disabled"}),vw=e=>xg.config({disabled:e,disableClass:"tox-tbtn--disabled",useNative:!1}),yw=(e,t)=>{const o=e.getApi(t);return e=>{e(o)}},xw=(e,t)=>ia((o=>{yw(e,o)((o=>{const n=e.onSetup(o);p(n)&&t.set(n)}))})),ww=(e,t)=>la((o=>yw(e,o)(t.get()))),Sw=(e,t)=>da(((o,n)=>{yw(e,o)(e.onAction),e.triggersSubmenu||t!==ny.CLOSE_ON_EXECUTE||(o.getSystem().isConnected()&&jr(o,_r()),n.stop())})),kw={[Sr()]:["disabling","alloy.base.behaviour","toggling","item-events"]},Cw=we,Ow=(e,t,o,n)=>{const s=Ns(b);return{type:"item",dom:t.dom,components:Cw(t.optComponents),data:e.data,eventOrder:kw,hasSubmenu:e.triggersSubmenu,itemBehaviours:ql([Vh("item-events",[Sw(e,o),xw(e,s),ww(e,s)]),hw((()=>!e.enabled||n.isDisabled())),pw(),Nh.config({})].concat(e.itemBehaviours))}},_w=e=>({value:e.value,meta:{text:e.text.getOr(""),...e.meta}}),Tw=e=>{const t=Yb.os.isMacOS()||Yb.os.isiOS(),o=t?{alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"}:{meta:"Ctrl",access:"Shift+Alt"},n=e.split("+"),s=L(n,(e=>{const t=e.toLowerCase().trim();return ve(o,t)?o[t]:e}));return t?s.join(""):s.join("+")},Ew=(e,t,o=[cy])=>Pb(e,{tag:"div",classes:o},t),Dw=e=>({dom:{tag:"div",classes:[dy]},components:[Si(Bb.translate(e))]}),Aw=(e,t)=>({dom:{tag:"div",classes:t,innerHtml:e}}),Mw=(e,t)=>({dom:{tag:"div",classes:[dy]},components:[{dom:{tag:e.tag,styles:e.styles},components:[Si(Bb.translate(t))]}]}),Bw=e=>({dom:{tag:"div",classes:["tox-collection__item-accessory"]},components:[Si(Tw(e))]}),Iw=e=>Ew("checkmark",e,["tox-collection__item-checkmark"]),Fw=(e,t,o)=>{const n=e.ariaLabel,s=e.value,r=e.iconContent.map((e=>((e,t,o)=>{const n=t();return Vb(e,n).or(o).getOrThunk(Rb(n))})(e,t.icons,o)));return{dom:(()=>{const e=r.getOr(""),o=n.map((e=>({title:t.translate(e)}))).getOr({}),a={tag:"div",attributes:o,classes:["tox-swatch"]};return"custom"===s?{...a,tag:"button",classes:[...a.classes,"tox-swatches__picker-btn"],innerHtml:e}:"remove"===s?{...a,classes:[...a.classes,"tox-swatch--remove"],innerHtml:e}:g(s)?{...a,attributes:{...a.attributes,"data-mce-color":s},styles:{"background-color":s},innerHtml:e}:a})(),optComponents:[]}},Rw=e=>{const t=e.map((e=>({attributes:{title:Bb.translate(e),id:ya("menu-item")}}))).getOr({});return{tag:"div",classes:[sy,ry],...t}},Nw=(e,t,o,n=D.none())=>"color"===e.presets?Fw(e,t,n):((e,t,o,n)=>{const s={tag:"div",classes:[cy]},r=o?e.iconContent.map((e=>Pb(e,s,t.icons,n))).orThunk((()=>D.some({dom:s}))):D.none(),a=e.checkMark,i=D.from(e.meta).fold((()=>Dw),(e=>ve(e,"style")?k(Mw,e.style):Dw)),l=e.htmlContent.fold((()=>e.textContent.map(i)),(e=>D.some(Aw(e,[dy]))));return{dom:Rw(e.ariaLabel),optComponents:[r,l,e.shortcutContent.map(Bw),a,e.caret]}})(e,t,o,n),Vw=(e,t)=>be(e,"tooltipWorker").map((e=>[lw.config({lazySink:t.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:e=>({type:"submenu",item:e,overrides:{maxHeightFunction:Lc}}),mode:"follow-highlight",onShow:(t,o)=>{e((e=>{lw.setComponents(t,[ki({element:Re.fromDom(e)})])}))}})])).getOr([]),zw=(e,t)=>{const o=(e=>$b.DOM.encode(e))(Bb.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},Lw=(e,t)=>L(e,(e=>{switch(e.type){case"cardcontainer":return((e,t)=>{const o="vertical"===e.direction?"tox-collection__item-container--column":py,n="left"===e.align?"tox-collection__item-container--align-left":"tox-collection__item-container--align-right";return{dom:{tag:"div",classes:[gy,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,Lw(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 Aw(zw(e.text,n),e.classes)}})),Hw=Fm(gf(),pf()),Pw=e=>({value:Gw(e)}),Uw=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Ww=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,jw=e=>Uw.test(e)||Ww.test(e),Gw=e=>_e(e,"#").toUpperCase(),$w=e=>{const t=(e=>{const t=e.value.replace(Uw,((e,t,o,n)=>t+t+o+o+n+n));return{value:t}})(e),o=Ww.exec(t.value);return null===o?["FFFFFF","FF","FF","FF"]:o},qw=e=>{const t=e.toString(16);return(1===t.length?"0"+t:t).toUpperCase()},Yw=e=>{const t=qw(e.red)+qw(e.green)+qw(e.blue);return Pw(t)},Xw=Math.min,Kw=Math.max,Jw=Math.round,Zw=/^\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)\s*$/i,Qw=/^\s*rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?(?:\.\d+)?)\s*\)\s*$/i,eS=(e,t,o,n)=>({red:e,green:t,blue:o,alpha:n}),tS=e=>{const t=parseInt(e,10);return t.toString()===e&&t>=0&&t<=255},oS=e=>{let t,o,n;const s=(e.hue||0)%360;let r=e.saturation/100,a=e.value/100;if(r=Kw(0,Xw(r,1)),a=Kw(0,Xw(a,1)),0===r)return t=o=n=Jw(255*a),eS(t,o,n,1);const i=s/60,l=a*r,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=Jw(255*(t+d)),o=Jw(255*(o+d)),n=Jw(255*(n+d)),eS(t,o,n,1)},nS=e=>{const t=$w(e),o=parseInt(t[1],16),n=parseInt(t[2],16),s=parseInt(t[3],16);return eS(o,n,s,1)},sS=(e,t,o,n)=>{const s=parseInt(e,10),r=parseInt(t,10),a=parseInt(o,10),i=parseFloat(n);return eS(s,r,a,i)},rS=e=>{if("transparent"===e)return D.some(eS(0,0,0,0));const t=Zw.exec(e);if(null!==t)return D.some(sS(t[1],t[2],t[3],"1"));const o=Qw.exec(e);return null!==o?D.some(sS(o[1],o[2],o[3],o[4])):D.none()},aS=e=>`rgba(${e.red},${e.green},${e.blue},${e.alpha})`,iS=eS(255,0,0,1),lS=(e,t)=>{e.dispatch("ResizeContent",t)},cS=(e,t)=>{e.dispatch("TextColorChange",t)},dS=(e,t)=>e.dispatch("ResolveName",{name:t.nodeName.toLowerCase(),target:t}),uS=(e,t)=>()=>{e(),t()},mS=e=>pS(e,"NodeChange",(t=>{t.setEnabled(e.selection.isEditable())})),gS=(e,t)=>o=>{const n=mS(e)(o),s=((e,t)=>o=>{const n=kc(),s=()=>{o.setActive(e.formatter.match(t));const s=e.formatter.formatChanged(t,o.setActive);n.set(s)};return e.initialized?s():e.once("init",s),()=>{e.off("init",s),n.clear()}})(e,t)(o);return()=>{n(),s()}},pS=(e,t,o)=>n=>{const s=()=>o(n),r=()=>{o(n),e.on(t,s)};return e.initialized?r():e.once("init",r),()=>{e.off("init",r),e.off(t,s)}},hS=e=>t=>()=>{e.undoManager.transact((()=>{e.focus(),e.execCommand("mceToggleFormat",!1,t.format)}))},fS=(e,t)=>()=>e.execCommand(t);var bS=tinymce.util.Tools.resolve("tinymce.util.LocalStorage");const vS={},yS=e=>be(vS,e).getOrThunk((()=>{const t=`tinymce-custom-colors-${e}`,o=bS.getItem(t);if(m(o)){const e=bS.getItem("tinymce-custom-colors");bS.setItem(t,g(e)?e:"[]")}const n=((e,t=10)=>{const o=bS.getItem(e),n=r(o)?JSON.parse(o):[],s=t-(a=n).length<0?a.slice(0,t):a;var a;const i=e=>{s.splice(e,1)};return{add:o=>{F(s,o).each(i),s.unshift(o),s.length>t&&s.pop(),bS.setItem(e,JSON.stringify(s))},state:()=>s.slice(0)}})(t,10);return vS[e]=n,n})),xS=(e,t)=>{yS(e).add(t)},wS=(e,t,o)=>({hue:e,saturation:t,value:o}),SS=e=>{let t=0,o=0,n=0;const s=e.red/255,r=e.green/255,a=e.blue/255,i=Math.min(s,Math.min(r,a)),l=Math.max(s,Math.max(r,a));if(i===l)return n=i,wS(0,0,100*n);return t=s===i?3:a===i?1:5,t=60*(t-(s===i?r-a:a===i?s-r:a-s)/(l-i)),o=(l-i)/l,n=l,wS(Math.round(t),Math.round(100*o),Math.round(100*n))},kS=e=>Yw(oS(e)),CS=e=>{return(t=e,jw(t)?D.some({value:Gw(t)}):D.none()).orThunk((()=>rS(e).map(Yw))).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,s=n[0],r=n[1],a=n[2],i=n[3];return Yw(eS(s,r,a,i))}));var t},OS="forecolor",_S="hilitecolor",TS=e=>{const t=[];for(let o=0;o<e.length;o+=2)t.push({text:e[o+1],value:"#"+CS(e[o]).value,icon:"checkmark",type:"choiceitem"});return t},ES=e=>t=>t.options.get(e),DS="#000000",AS=(e,t)=>t===OS&&e.options.isSet("color_map_foreground")?ES("color_map_foreground")(e):t===_S&&e.options.isSet("color_map_background")?ES("color_map_background")(e):ES("color_map")(e),MS=(e,t="default")=>Math.max(5,Math.ceil(Math.sqrt(AS(e,t).length))),BS=(e,t)=>{const o=ES("color_cols")(e),n=MS(e,t);return o===MS(e)?n:o},IS=(e,t="default")=>Math.round(t===OS?ES("color_cols_foreground")(e):t===_S?ES("color_cols_background")(e):ES("color_cols")(e)),FS=ES("custom_colors"),RS=ES("color_default_foreground"),NS=ES("color_default_background"),VS=e=>js(e,(e=>{if(je(e)){const t=Ft(e,"background-color");return Ce((e=>rS(e).exists((e=>0!==e.alpha)))(t),t)}return D.none()})).getOr("rgba(0, 0, 0, 0)"),zS=(e,t)=>{const o=Re.fromDom(e.selection.getStart()),n="hilitecolor"===t?VS(o):Ft(o,"color");return rS(n).map((e=>"#"+Yw(e).value))},LS=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]},HS=(e,t,o,n)=>{if("custom"===o){XS(e)((o=>{o.each((o=>{xS(t,o),e.execCommand("mceApplyTextcolor",t,o),n(o)}))}),zS(e,t).getOr(DS))}else"remove"===o?(n(""),e.execCommand("mceRemoveTextcolor",t)):(n(o),e.execCommand("mceApplyTextcolor",t,o))},PS=(e,t,o)=>e.concat((e=>L(yS(e).state(),(e=>({type:"choiceitem",text:e,icon:"checkmark",value:e}))))(t).concat(LS(o))),US=(e,t,o)=>n=>{n(PS(e,t,o))},WS=(e,t,o)=>{const n="forecolor"===t?"tox-icon-text-color__color":"tox-icon-highlight-bg-color__color";e.setIconFill(n,o)},jS=(e,t)=>{e.setTooltip(t)},GS=(e,t)=>o=>{const n=zS(e,t);return xe(n,o.toUpperCase())},$S=(e,t,o)=>{if(Be(o))return"forecolor"===t?"Text color":"Background color";const n="forecolor"===t?"Text color {0}":"Background color {0}",s=PS(AS(e,t),t,!1),r=G(s,(e=>e.value===o)).getOr({text:""}).text;return e.translate([n,e.translate(r)])},qS=(e,t,o,n)=>{e.ui.registry.addSplitButton(t,{tooltip:$S(e,o,n.get()),presets:"color",icon:"forecolor"===t?"text-color":"highlight-bg-color",select:GS(e,o),columns:IS(e,o),fetch:US(AS(e,o),o,FS(e)),onAction:t=>{HS(e,o,n.get(),b)},onItemAction:(s,r)=>{HS(e,o,r,(o=>{n.set(o),cS(e,{name:t,color:o})}))},onSetup:s=>{WS(s,t,n.get());const r=n=>{n.name===t&&(WS(s,n.name,n.color),jS(s,$S(e,o,n.color)))};return e.on("TextColorChange",r),uS(mS(e)(s),(()=>{e.off("TextColorChange",r)}))}})},YS=(e,t,o,n,s)=>{e.ui.registry.addNestedMenuItem(t,{text:n,icon:"forecolor"===t?"text-color":"highlight-bg-color",onSetup:n=>(jS(n,$S(e,o,s.get())),WS(n,t,s.get()),mS(e)(n)),getSubmenuItems:()=>[{type:"fancymenuitem",fancytype:"colorswatch",select:GS(e,o),initData:{storageKey:o},onAction:n=>{HS(e,o,n.value,(o=>{s.set(o),cS(e,{name:t,color:o})}))}}]})},XS=e=>(t,o)=>{let n=!1;const s={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:s,onAction:(e,t)=>{"hex-valid"===t.name&&(n=t.value)},onSubmit:o=>{const s=o.getData().colorpicker;n?(t(D.from(s)),o.close()):e.windowManager.alert(e.translate(["Invalid hex color code: {0}",s]))},onClose:b,onCancel:()=>{t(D.none())}})},KS=(e,t,o,n,s,r,a,i)=>{const l=Hy(t),c=JS(t,o,n,"color"!==s?"normal":"color",r,a,i);return Wy(e,l,c,n,{menuType:s})},JS=(e,t,o,n,s,r,a)=>we(L(e,(i=>{return"choiceitem"===i.type?(l=i,ts("choicemenuitem",Wx,l)).fold(Py,(i=>D.some(((e,t,o,n,s,r,a,i=!0)=>{const l=Nw({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(Iw(a.icons)):D.none(),caret:D.none(),value:e.value},a,i);return wn(Ow({data:_w(e),enabled:e.enabled,getApi:e=>({setActive:t=>{Kh.set(e,t)},isActive:()=>Kh.isOn(e),isEnabled:()=>!xg.isDisabled(e),setEnabled:t=>xg.set(e,!t)}),onAction:t=>n(e.value),onSetup:e=>(e.setActive(s),b),triggersSubmenu:!1,itemBehaviours:[]},l,r,a),{toggling:{toggleClass:ly,toggleOnExecute:!1,selected:e.active,exclusive:!0}})})(i,1===o,n,t,r(i.value),s,a,Hy(e))))):D.none();var l}))),ZS=(e,t)=>{const o=vy(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?Fi(e.element,"[aria-checked=true]"):D.none()}},QS=(e,t)=>{const o=e.initData.allowCustomColors&&t.colorinput.hasCustomColors();return e.initData.colors.fold((()=>PS(t.colorinput.getColors(e.initData.storageKey),e.initData.storageKey,o)),(e=>e.concat(LS(o))))},ek=ya("cell-over"),tk=ya("cell-execute"),ok=(e,t,o)=>{const n=o=>Gr(o,tk,{row:e,col:t}),s=(e,t)=>{t.stop(),n(e)};return _i({dom:{tag:"div",attributes:{role:"button","aria-label":o}},behaviours:ql([Vh("insert-table-picker-cell",[Qr(sr(),Uh.focus),Qr(Sr(),n),Qr(ur(),s),Qr(Cr(),s)]),Kh.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),Uh.config({onFocus:o=>Gr(o,ek,{row:e,col:t})})])})},nk=e=>Y(e,(e=>L(e,Ti))),sk=(e,t)=>Si(`${t}x${e}`),rk={inserttable:(e,t)=>{const o=(e=>(t,o)=>e.shared.providers.translate(["{0} columns, {1} rows",o,t]))(t),n=((e,t,o)=>{const n=[];for(let s=0;s<t;s++){const t=[];for(let n=0;n<o;n++){const o=e(s+1,n+1);t.push(ok(s,n,o))}n.push(t)}return n})(o,10,10),s=sk(0,0),r=Ff({dom:{tag:"span",classes:["tox-insert-table-picker__label"]},components:[s],behaviours:ql([Nh.config({})])});return{type:"widget",data:{value:ya("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[Hw.widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:nk(n).concat(r.asSpec()),behaviours:ql([Vh("insert-table-picker",[ia((e=>{Nh.set(r.get(e),[s])})),na(ek,((e,t,o)=>{const{row:s,col:a}=o.event;((e,t,o,n,s)=>{for(let r=0;r<n;r++)for(let n=0;n<s;n++)Kh.set(e[r][n],r<=t&&n<=o)})(n,s,a,10,10),Nh.set(r.get(e),[sk(s+1,a+1)])})),na(tk,((t,o,n)=>{const{row:s,col:r}=n.event;e.onAction({numRows:s+1,numColumns:r+1}),jr(t,_r())}))]),Th.config({initSize:{numRows:10,numColumns:10},mode:"flatgrid",selector:'[role="button"]'})])})]}},colorswatch:(e,t)=>{const o=QS(e,t),n=t.colorinput.getColorCols(e.initData.storageKey),s="color",r=KS(ya("menu-value"),o,(t=>{e.onAction({value:t})}),n,s,ny.CLOSE_ON_EXECUTE,e.select.getOr(T),t.shared.providers),a={...r,markers:vy(s),movement:ZS(n,s)};return{type:"widget",data:{value:ya("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[Hw.widget(xf.sketch(a))]}}},ak=(e,t,o,n,s,r,a,i=!0)=>{const l=Nw({presets:n,textContent:D.none(),htmlContent:o?e.text.map((e=>zw(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 Ow({data:_w(e),enabled:e.enabled,getApi:x({}),onAction:t=>s(e.value,e.meta),onSetup:x(b),triggersSubmenu:!1,itemBehaviours:Vw(e.meta,a)},l,r,a.providers)},ik=e=>({type:"separator",dom:{tag:"div",classes:[ry,"tox-collection__group-heading"]},components:e.text.map(Si).toArray()}),lk=(e,t,o,n=!0)=>{const s=Nw({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 Ow({data:_w(e),getApi:e=>({isEnabled:()=>!xg.isDisabled(e),setEnabled:t=>xg.set(e,!t)}),enabled:e.enabled,onAction:e.onAction,onSetup:e.onSetup,triggersSubmenu:!1,itemBehaviours:[]},s,t,o)},ck=(e,t,o,n=!0,s=!1)=>{const r=s?(a=o.icons,Ew("chevron-down",a,[uy])):(e=>Ew("chevron-right",e,[uy]))(o.icons);var a;const i=Nw({presets:"normal",iconContent:e.icon,textContent:e.text,htmlContent:D.none(),ariaLabel:e.text,caret:D.some(r),checkMark:D.none(),shortcutContent:e.shortcut},o,n);return Ow({data:_w(e),getApi:e=>({isEnabled:()=>!xg.isDisabled(e),setEnabled:t=>xg.set(e,!t),setIconFill:(t,o)=>{Fi(e.element,`svg path[class="${t}"], rect[class="${t}"]`).each((e=>{kt(e,"fill",o)}))},setTooltip:t=>{const n=o.translate(t);Ct(e.element,{"aria-label":n,title:n})}}),enabled:e.enabled,onAction:b,onSetup:e.onSetup,triggersSubmenu:!0,itemBehaviours:[]},i,t,o)},dk=(e,t,o,n=!0)=>{const s=Nw({iconContent:e.icon,textContent:e.text,htmlContent:D.none(),ariaLabel:e.text,checkMark:D.some(Iw(o.icons)),caret:D.none(),shortcutContent:e.shortcut,presets:"normal",meta:e.meta},o,n);return wn(Ow({data:_w(e),enabled:e.enabled,getApi:e=>({setActive:t=>{Kh.set(e,t)},isActive:()=>Kh.isOn(e),isEnabled:()=>!xg.isDisabled(e),setEnabled:t=>xg.set(e,!t)}),onAction:e.onAction,onSetup:e.onSetup,triggersSubmenu:!1,itemBehaviours:[]},s,t,o),{toggling:{toggleClass:ly,toggleOnExecute:!1,selected:e.active}})},uk=(e,t)=>be(rk,e.fancytype).map((o=>o(e,t))),mk=(e,t,o,n)=>{const s={dom:Rw(e.label),optComponents:[D.some({dom:{tag:"div",classes:[gy,py]},components:Lw(e.items,n)})]};return Ow({data:_w({text:D.none(),...e}),enabled:e.enabled,getApi:e=>({isEnabled:()=>!xg.isDisabled(e),setEnabled:t=>{xg.set(e,!t),H(Od(e.element,"*"),(o=>{e.getSystem().getByDom(o).each((e=>{e.hasConfigured(xg)&&xg.set(e,!t)}))}))}}),onAction:e.onAction,onSetup:e.onSetup,triggersSubmenu:!1,itemBehaviours:D.from(n.itemBehaviours).getOr([])},s,t,o.providers)};var gk=Object.freeze({__proto__:null,getCoupled:(e,t,o,n)=>o.getOrCreate(e,t,n),getExistingCoupled:(e,t,o,n)=>o.getExisting(e,t,n)}),pk=[us("others",es(on.value,Wn()))];var hk=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 Va({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,s)=>t(n,s).getOrThunk((()=>{const t=be(n.others,s).getOrDie("No information found for coupled component: "+s)(o),r=o.getSystem().build(t);return e[s]=r,r}))})}});const fk=Xl({fields:pk,name:"coupling",apis:gk,state:hk}),bk=e=>{let t=D.none(),o=[];const n=e=>{s()?a(e):o.push(e)},s=()=>t.isSome(),r=e=>{H(e,a)},a=e=>{t.each((t=>{setTimeout((()=>{e(t)}),0)}))};return e((e=>{s()||(t=D.some(e),r(o),o=[])})),{get:n,map:e=>bk((t=>{n((o=>{t(e(o))}))})),isReady:s}},vk={nu:bk,pure:e=>bk((t=>{t(e)}))},yk=e=>{setTimeout((()=>{throw e}),0)},xk=e=>{const t=t=>{e().then(t,yk)};return{map:t=>xk((()=>e().then(t))),bind:t=>xk((()=>e().then((e=>t(e).toPromise())))),anonBind:t=>xk((()=>e().then((()=>t.toPromise())))),toLazy:()=>vk.nu(t),toCached:()=>{let t=null;return xk((()=>(null===t&&(t=e()),t)))},toPromise:e,get:t}},wk=e=>xk((()=>new Promise(e))),Sk=e=>xk((()=>Promise.resolve(e))),kk=x("sink"),Ck=x(Dm({name:kk(),overrides:x({dom:{tag:"div"},behaviours:ql([su.config({useFixed:E})]),events:Kr([sa(ir()),sa(er()),sa(ur())])})})),Ok=(e,t)=>{const o=e.getHotspot(t).getOr(t),n="hotspot",s=e.getAnchorOverrides();return e.layouts.fold((()=>({type:n,hotspot:o,overrides:s})),(e=>({type:n,hotspot:o,overrides:s,layouts:e})))},_k=(e,t,o,n,s,r,a)=>{const i=((e,t,o,n,s,r,a)=>{const i=((e,t,o)=>(0,e.fetch)(o).map(t))(e,t,n),l=Ak(n,e);return i.map((e=>e.bind((e=>D.from(Df.sketch({...r.menu(),uid:_a(""),data:e,highlightOnOpen:a,onOpenMenu:(e,t)=>{const n=l().getOrDie();su.position(n,t,{anchor:o}),Mu.decloak(s)},onOpenSubmenu:(e,t,o)=>{const n=l().getOrDie();su.position(n,o,{anchor:{type:"submenu",item:t}}),Mu.decloak(s)},onRepositionMenu:(e,t,n)=>{const s=l().getOrDie();su.position(s,t,{anchor:o}),H(n,(e=>{su.position(s,e.triggeredMenu,{anchor:{type:"submenu",item:e.triggeringItem}})}))},onEscape:()=>(Uh.focus(n),Mu.close(s),D.some(!0))}))))))})(e,t,Ok(e,o),o,n,s,a);return i.map((e=>(e.fold((()=>{Mu.isOpen(n)&&Mu.close(n)}),(e=>{Mu.cloak(n),Mu.open(n,e),r(n)})),n)))},Tk=(e,t,o,n,s,r,a)=>(Mu.close(n),Sk(n)),Ek=(e,t,o,n,s,r)=>{const a=fk.getCoupled(o,"sandbox");return(Mu.isOpen(a)?Tk:_k)(e,t,o,a,n,s,r)},Dk=(e,t,o)=>{const n=ag.getCurrent(t).getOr(t),s=Jt(e.element);o?Mt(n.element,"min-width",s+"px"):((e,t)=>{Kt.set(e,t)})(n.element,s)},Ak=(e,t)=>e.getSystem().getByUid(t.uid+"-"+kk()).map((e=>()=>on.value(e))).getOrThunk((()=>t.lazySink.fold((()=>()=>on.error(new Error("No internal sink is specified, nor could an external sink be found"))),(t=>()=>t(e))))),Mk=e=>{Mu.getState(e).each((e=>{Df.repositionMenus(e)}))},Bk=(e,t,o)=>{const n=Vi(),s=Ak(t,e);return{dom:{tag:"div",classes:e.sandboxClasses,attributes:{id:n.id,role:"listbox"}},behaviours:om(e.sandboxBehaviours,[Ju.config({store:{mode:"memory",initialValue:t}}),Mu.config({onOpen:(s,r)=>{const a=Ok(e,t);n.link(t.element),e.matchWidth&&Dk(a.hotspot,r,e.useMinWidth),e.onOpen(a,s,r),void 0!==o&&void 0!==o.onOpen&&o.onOpen(s,r)},onClose:(e,s)=>{n.unlink(t.element),void 0!==o&&void 0!==o.onClose&&o.onClose(e,s)},isPartOf:(e,o,n)=>Li(o,n)||Li(t,n),getAttachPoint:()=>s().getOrDie()}),ag.config({find:e=>Mu.getState(e).bind((e=>ag.getCurrent(e)))}),Ql.config({channels:{...Nu({isExtraPart:T}),...zu({doReposition:Mk})}})])}},Ik=e=>{const t=fk.getCoupled(e,"sandbox");Mk(t)},Fk=()=>[Ts("sandboxClasses",[]),tm("sandboxBehaviours",[ag,Ql,Mu,Ju])],Rk=x([ds("dom"),ds("fetch"),el("onOpen"),tl("onExecute"),Ts("getHotspot",D.some),Ts("getAnchorOverrides",x({})),Jc(),Zu("dropdownBehaviours",[Kh,fk,Th,Uh]),ds("toggleClass"),Ts("eventOrder",{}),ys("lazySink"),Ts("matchWidth",!1),Ts("useMinWidth",!1),ys("role")].concat(Fk())),Nk=x([Em({schema:[Ji(),Ts("fakeFocus",!1)],name:"menu",defaults:e=>({onExecute:e.onExecute})}),Ck()]),Vk=og({name:"Dropdown",configFields:Rk(),partFields:Nk(),factory:(e,t,o,n)=>{const s=e=>{Mu.getState(e).each((e=>{Df.highlightPrimary(e)}))},r=(t,o,s)=>Ek(e,w,t,n,o,s),a={expand:e=>{Kh.isOn(e)||r(e,b,Tf.HighlightNone).get(b)},open:e=>{Kh.isOn(e)||r(e,b,Tf.HighlightMenuAndItem).get(b)},refetch:t=>fk.getExistingCoupled(t,"sandbox").fold((()=>r(t,b,Tf.HighlightMenuAndItem).map(b)),(o=>_k(e,w,t,o,n,b,Tf.HighlightMenuAndItem).map(b))),isOpen:Kh.isOn,close:e=>{Kh.isOn(e)&&r(e,b,Tf.HighlightMenuAndItem).get(b)},repositionMenus:e=>{Kh.isOn(e)&&Ik(e)}},i=(e,t)=>($r(e),D.some(!0));return{uid:e.uid,dom:e.dom,components:t,behaviours:em(e.dropdownBehaviours,[Kh.config({toggleClass:e.toggleClass,aria:{mode:"expanded"}}),fk.config({others:{sandbox:t=>Bk(e,t,{onOpen:()=>Kh.on(t),onClose:()=>Kh.off(t)})}}),Th.config({mode:"special",onSpace:i,onEnter:i,onDown:(e,t)=>{if(Vk.isOpen(e)){const t=fk.getCoupled(e,"sandbox");s(t)}else Vk.open(e);return D.some(!0)},onEscape:(e,t)=>Vk.isOpen(e)?(Vk.close(e),D.some(!0)):D.none()}),Uh.config({})]),events:Qh(D.some((e=>{r(e,s,Tf.HighlightMenuAndItem).get(b)}))),eventOrder:{...e.eventOrder,[Sr()]:["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)}}),zk=e=>{const t=Ju.getValue(e),o=Ay(e).map(By);Vk.refetch(t).get((()=>{const e=fk.getCoupled(t,"sandbox");o.each((t=>Ay(e).each((e=>((e,t)=>{Ju.setValue(e,t.fetchPattern),e.element.dom.selectionStart=t.selectionStart,e.element.dom.selectionEnd=t.selectionEnd})(e,t)))))}))},Lk=e=>Mu.getState(e).bind(Mg.getHighlighted).bind(Mg.getHighlighted),Hk=(e,t,o)=>{My(e).each((e=>{((e,t)=>{_t(t.element,"id").each((t=>kt(e.element,"aria-activedescendant",t)))})(e,o);var n;(ri((n=t).element,Fy)?D.some(n.element):Fi(n.element,"."+Fy)).each((t=>{_t(t,"id").each((t=>kt(e.element,"aria-controls",t)))}))})),kt(o.element,"aria-selected","true")},Pk=(e,t,o)=>{kt(o.element,"aria-selected","false")},Uk=e=>fk.getExistingCoupled(e,"sandbox").bind(Ay).map(By).map((e=>e.fetchPattern)).getOr("");var Wk;!function(e){e[e.ContentFocus=0]="ContentFocus",e[e.UiFocus=1]="UiFocus"}(Wk||(Wk={}));const jk=(e,t,o,n,s)=>{const r=o.shared.providers,a=e=>s?{...e,shortcut:D.none(),icon:e.text.isSome()?D.none():e.icon}:e;switch(e.type){case"menuitem":return(i=e,ts("menuitem",Yx,i)).fold(Py,(e=>D.some(lk(a(e),t,r,n))));case"nestedmenuitem":return(e=>ts("nestedmenuitem",Xx,e))(e).fold(Py,(e=>D.some(ck(a(e),t,r,n,s))));case"togglemenuitem":return(e=>ts("togglemenuitem",Kx,e))(e).fold(Py,(e=>D.some(dk(a(e),t,r,n))));case"separator":return(e=>ts("separatormenuitem",vx,e))(e).fold(Py,(e=>D.some(ik(e))));case"fancymenuitem":return(e=>ts("fancymenuitem",qx,e))(e).fold(Py,(e=>uk(e,o)));default:return console.error("Unknown item in general menu",e),D.none()}var i},Gk=(e,t,o,n,s,r,a)=>{const i=1===n,l=!i||Hy(e);return we(L(e,(e=>{switch(e.type){case"separator":return(n=e,ts("Autocompleter.Separator",vx,n)).fold(Py,(e=>D.some(ik(e))));case"cardmenuitem":return(e=>ts("cardmenuitem",Ux,e))(e).fold(Py,(e=>D.some(mk({...e,onAction:t=>{e.onAction(t),o(e.value,e.meta)}},s,r,{itemBehaviours:Vw(e.meta,r),cardText:{matchText:t,highlightOn:a}}))));default:return(e=>ts("Autocompleter.Item",yx,e))(e).fold(Py,(e=>D.some(ak(e,t,i,"normal",o,s,r,l))))}var n})))},$k=(e,t,o,n,s,r)=>{const a=Hy(t),i=we(L(t,(e=>{const t=e=>jk(e,o,n,(e=>s?!ve(e,"text"):a)(e),s);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})(r);return(s?Uy:Wy)(e,a,i,1,l)},qk=e=>Df.singleData(e.value,e),Yk=(e,t)=>{const o=ya("autocompleter"),n=Ns(!1),s=Ns(!1),r=_i(Af.sketch({dom:{tag:"div",classes:["tox-autocompleter"],attributes:{id:o}},components:[],fireDismissalEventInstead:{},inlineBehaviours:ql([Vh("dismissAutocompleter",[Qr(Rr(),(()=>d())),Qr(Ur(),((t,o)=>{_t(o.event.target,"id").each((t=>kt(Re.fromDom(e.getBody()),"aria-activedescendant",t)))}))])]),lazySink:t.getSink})),a=()=>Af.isOpen(r),i=s.get,l=()=>{if(a()){Af.hide(r),e.dom.remove(o,!1);const t=Re.fromDom(e.getBody());_t(t,"aria-owns").filter((e=>e===o)).each((()=>{Et(t,"aria-owns"),Et(t,"aria-activedescendant")}))}},c=()=>Af.getContent(r).bind((e=>te(e.components(),0))),d=()=>e.execCommand("mceAutocompleterClose"),u=o=>{const s=re(o,(e=>D.from(e.columns))).getOr(1);return Y(o,(o=>{const r=o.items;return Gk(r,o.matchText,((t,s)=>{const r=e.selection.getRng();((e,t)=>ey(Re.fromDom(t.startContainer)).map((t=>{const o=e.createRng();return o.selectNode(t.dom),o})))(e.dom,r).each((r=>{const a={hide:()=>d(),reload:t=>{l(),e.execCommand("mceAutocompleterReload",!1,{fetchOptions:t})}};n.set(!0),o.onAction(a,r,t,s),n.set(!1)}))}),s,ny.BUBBLE_TO_SANDBOX,t,o.highlightOn)}))},m=(t,o)=>{var n;(n=Re.fromDom(e.getBody()),Fi(n,Qv)).each((n=>{const s=re(t,(e=>D.from(e.columns))).getOr(1);Af.showMenuAt(r,{anchor:{type:"node",root:Re.fromDom(e.getBody()),node:D.from(n)}},((e,t,o,n)=>{const s=ZS(t,n),r=vy(n);return{data:qk({...e,movement:s,menuBehaviours:Qx("auto"!==t?[]:[ia(((e,t)=>{Jx(e,4,r.item).each((({numColumns:t,numRows:o})=>{Th.setGridSize(e,o,t)}))}))])}),menu:{markers:vy(n),fakeFocus:o===Wk.ContentFocus}}})(Wy("autocompleter-value",!0,o,s,{menuType:"normal"}),s,Wk.ContentFocus,"normal"))})),c().each(Mg.highlightFirst)},g=t=>{const n=u(t);n.length>0?(m(t,n),kt(Re.fromDom(e.getBody()),"aria-owns",o),e.inline||p()):l()},p=()=>{e.dom.get(o)&&e.dom.remove(o,!1);const t=e.getDoc().documentElement,n=e.selection.getNode(),s=(e=>ga(e,!0))(r.element);Bt(s,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",top:`${n.offsetTop}px`,left:`${n.offsetLeft}px`}),e.dom.add(t,s.dom),Fi(s,'[role="menu"]').each((e=>{Lt(e,"position"),Lt(e,"max-height")}))};e.on("AutocompleterStart",(({lookupData:e})=>{s.set(!0),n.set(!1),g(e)})),e.on("AutocompleterUpdate",(({lookupData:e})=>g(e))),e.on("AutocompleterEnd",(()=>{l(),s.set(!1),n.set(!1)}));const h={cancelIfNecessary:d,isMenuOpen:a,isActive:i,isProcessingAction:n.get,getMenu:c};ty(h,e)},Xk=["visible","hidden","clip"],Kk=e=>Ae(e).length>0&&!R(Xk,e),Jk=e=>{if(We(e)){const t=Ft(e,"overflow-x"),o=Ft(e,"overflow-y");return Kk(t)||Kk(o)}return!1},Zk=(e,t)=>Kv(e)?(e=>{const t=Cd(e,Jk),o=0===t.length?ft(e).map(bt).map((e=>Cd(e,Jk))).getOr([]):t;return oe(o).map((e=>({element:e,others:o.slice(1)})))})(t):D.none(),Qk=e=>{const t=[...L(e.others,Xo),Zo()];return((e,t)=>j(t,((e,t)=>Jo(e,t)),e))(Xo(e.element),t)},eC=(e,t,o)=>Ri(e,t,o).isSome(),tC=(e,t)=>{let o=null;return{cancel:()=>{null!==o&&(clearTimeout(o),o=null)},schedule:(...n)=>{o=setTimeout((()=>{e.apply(null,n),o=null}),t)}}},oC=e=>{const t=e.raw;return void 0===t.touches||1!==t.touches.length?D.none():D.some(t.touches[0])},nC=e=>{const t=Cc(),o=Ns(!1),n=tC((t=>{e.triggerEvent(Or(),t),o.set(!0)}),400),s=Hs([{key:Ks(),value:e=>(oC(e).each((s=>{n.cancel();const r={x:s.clientX,y:s.clientY,target:e.target};n.schedule(e),o.set(!1),t.set(r)})),D.none())},{key:Js(),value:e=>(n.cancel(),oC(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:Zs(),value:s=>{n.cancel();return t.get().filter((e=>Je(e.target,s.target))).map((t=>o.get()?(s.prevent(),!1):e.triggerEvent(Cr(),s)))}}]);return{fireIfReady:(e,t)=>be(s,t).bind((t=>t(e)))}},sC=(e,t)=>{const o={stopBackspace:!0,...t},n=nC(o),s=L(["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=>_c(e,t,(e=>{n.fireIfReady(e,t).each((t=>{t&&e.kill()}));o.triggerEvent(t,e)&&e.kill()})))),r=Cc(),a=_c(e,"paste",(e=>{n.fireIfReady(e,"paste").each((t=>{t&&e.kill()}));o.triggerEvent("paste",e)&&e.kill(),r.set(setTimeout((()=>{o.triggerEvent(xr(),e)}),0))})),i=_c(e,"keydown",(e=>{o.triggerEvent("keydown",e)?e.kill():o.stopBackspace&&(e=>e.raw.which===Bg[0]&&!R(["input","textarea"],Pe(e.target))&&!eC(e.target,'[contenteditable="true"]'))(e)&&e.prevent()})),l=_c(e,"focusin",(e=>{o.triggerEvent("focusin",e)&&e.kill()})),c=Cc(),d=_c(e,"focusout",(e=>{o.triggerEvent("focusout",e)&&e.kill(),c.set(setTimeout((()=>{o.triggerEvent(yr(),e)}),0))}));return{unbind:()=>{H(s,(e=>{e.unbind()})),i.unbind(),l.unbind(),d.unbind(),a.unbind(),r.on(clearTimeout),c.on(clearTimeout)}}},rC=(e,t)=>{const o=be(e,"target").getOr(t);return Ns(o)},aC=Vs([{stopped:[]},{resume:["element"]},{complete:[]}]),iC=(e,t,o,n,s,r)=>{const a=e(t,n),i=((e,t)=>{const o=Ns(!1),n=Ns(!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,s);return a.fold((()=>(r.logEventNoHandlers(t,n),aC.complete())),(e=>{const o=e.descHandler;return Ha(o)(i),i.isStopped()?(r.logEventStopped(t,e.element,o.purpose),aC.stopped()):i.isCut()?(r.logEventCut(t,e.element,o.purpose),aC.complete()):nt(e.element).fold((()=>(r.logNoParent(t,e.element,o.purpose),aC.complete())),(n=>(r.logEventResponse(t,e.element,o.purpose),aC.resume(n))))}))},lC=(e,t,o,n,s,r)=>iC(e,t,o,n,s,r).fold(E,(n=>lC(e,t,o,n,s,r)),T),cC=(e,t,o)=>{const n=(e=>{const t=Ns(!1);return{stop:()=>{t.set(!0)},cut:b,isStopped:t.get,isCut:T,event:e,setSource:O("Cannot set source of a broadcasted event"),getSource:O("Cannot get source of a broadcasted event")}})(t);return H(e,(e=>{const t=e.descHandler;Ha(t)(n)})),n.isStopped()},dC=(e,t,o,n,s)=>{const r=rC(o,n);return lC(e,t,o,n,r,s)},uC=()=>{const e={};return{registerId:(t,o,n)=>{le(n,((n,s)=>{const r=void 0!==e[s]?e[s]:{};r[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[s]=r}))},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=>js(n,(t=>((e,t)=>Oa(t).bind((t=>be(e,t))).map((e=>((e,t)=>({element:e,descHandler:t}))(t,e))))(e,t)),t)))}},mC=()=>{const e=uC(),t={},o=e=>{const t=e.element;return Oa(t).getOrThunk((()=>((e,t)=>{const o=ya(Sa+e);return Ca(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:s=>{const r=o(s);ye(t,r)&&((e,o)=>{const s=t[o];if(s!==e)throw new Error('The tagId "'+o+'" is already used by: '+ha(s.element)+"\nCannot use it for: "+ha(e.element)+"\nThe conflicting element is"+(yt(s.element)?" ":" not ")+"already in the DOM");n(e)})(s,r);const a=[s];e.registerId(a,r,s.events),t[r]=s},unregister:n,getById:e=>be(t,e)}},gC=tg({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:Qu(e.containerBehaviours),events:e.events,domModification:e.domModification,eventOrder:e.eventOrder}},configFields:[Ts("components",[]),Zu("containerBehaviours",[]),Ts("events",{}),Ts("domModification",{}),Ts("eventOrder",{})]}),pC=e=>{const t=t=>nt(e.element).fold(E,(e=>Je(t,e))),o=mC(),n=(e,n)=>o.find(t,e,n),s=sC(e.element,{triggerEvent:(e,t)=>Gi(e,t.target,(o=>((e,t,o,n)=>dC(e,t,o,o.target,n))(n,e,t,o)))}),r={debugInfo:x("real"),triggerEvent:(e,t,o)=>{Gi(e,t,(s=>dC(n,e,o,t,s)))},triggerFocus:(e,t)=>{Oa(e).fold((()=>{tc(e)}),(o=>{Gi(vr(),e,(o=>(((e,t,o,n,s)=>{const r=rC(o,n);iC(e,t,o,n,r,s)})(n,vr(),{originator:t,kill:b,prevent:b,target:e},e,o),!1)))}))},triggerEscape:(e,t)=>{r.triggerEvent("keydown",e.element,t.event)},getByUid:e=>p(e),getByDom:e=>h(e),build:_i,buildOrPatch:Oi,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(r),Ge(e.element)||(o.register(e),H(e.components(),a),r.triggerEvent(Er(),e.element,{target:e.element}))},i=e=>{Ge(e.element)||(H(e.components(),i),o.unregister(e)),e.disconnect()},l=t=>{mu(e,t)},c=e=>{hu(e)},d=e=>{const t=o.filter(wr());H(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 cC(n,t)},p=e=>o.getById(e).fold((()=>on.error(new Error('Could not find component with uid: "'+e+'" in system.'))),on.value),h=e=>{const t=Oa(e).getOr("not found");return p(t)};return a(e),{root:e,element:e.element,destroy:()=>{s.unbind(),Lo(e.element)},add:l,remove:c,getByUid:p,getByDom:h,addToWorld:a,removeFromWorld:i,broadcast:u,broadcastOn:m,broadcastEvent:g}},hC=x([Ts("prefix","form-field"),Zu("fieldBehaviours",[ag,Ju])]),fC=x([Dm({schema:[ds("dom")],name:"label"}),Dm({factory:{sketch:e=>({uid:e.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:e.text}})},schema:[ds("text")],name:"aria-descriptor"}),Tm({factory:{sketch:e=>{const t=zs(e,["factory"]);return e.factory.sketch(t)}},schema:[ds("factory")],name:"field"})]),bC=og({name:"FormField",configFields:hC(),partFields:fC(),factory:(e,t,o,n)=>{const s=em(e.fieldBehaviours,[ag.config({find:t=>Pm(t,e,"field")}),Ju.config({store:{mode:"manual",getValue:e=>ag.getCurrent(e).bind(Ju.getValue),setValue:(e,t)=>{ag.getCurrent(e).each((e=>{Ju.setValue(e,t)}))}}})]),r=Kr([ia(((t,o)=>{const n=Wm(t,e,["label","field","aria-descriptor"]);n.field().each((t=>{const o=ya(e.prefix);n.label().each((e=>{kt(e.element,"for",o),kt(t.element,"id",o)})),n["aria-descriptor"]().each((o=>{const n=ya(e.prefix);kt(o.element,"id",n),kt(t.element,"aria-describedby",n)}))}))}))]),a={getField:t=>Pm(t,e,"field"),getLabel:t=>Pm(t,e,"label")};return{uid:e.uid,dom:e.dom,components:t,behaviours:s,events:r,apis:a}},apis:{getField:(e,t)=>e.getField(t),getLabel:(e,t)=>e.getLabel(t)}});var vC=Object.freeze({__proto__:null,exhibit:(e,t)=>La({attributes:Hs([{key:t.tabAttr,value:"true"}])})}),yC=[Ts("tabAttr","data-alloy-tabstop")];const xC=Xl({fields:yC,name:"tabstopping",active:vC});var wC=tinymce.util.Tools.resolve("tinymce.html.Entities");const SC=(e,t,o,n)=>{const s=kC(e,t,o,n);return bC.sketch(s)},kC=(e,t,o,n)=>({dom:CC(o),components:e.toArray().concat([t]),fieldBehaviours:ql(n)}),CC=e=>({tag:"div",classes:["tox-form__group"].concat(e)}),OC=(e,t)=>bC.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[Si(t.translate(e))]}),_C=ya("form-component-change"),TC=ya("form-close"),EC=ya("form-cancel"),DC=ya("form-action"),AC=ya("form-submit"),MC=ya("form-block"),BC=ya("form-unblock"),IC=ya("form-tabchange"),FC=ya("form-resize"),RC=(e,t,o)=>{const n=e.label.map((e=>OC(e,t))),s=t.icons(),r=e=>(t,o)=>{Ri(o.event.target,"[data-collection-item-value]").each((n=>{e(t,o,n,Ot(n,"data-collection-item-value"))}))},a=(o,n)=>{const r=L(n,(o=>{const n=Bb.translate(o.text),r=1===e.columns?`<div class="tox-collection__item-label">${n}</div>`:"",a=`<div class="tox-collection__item-icon">${(e=>{var t;return null!==(t=s[e])&&void 0!==t?t:e})(o.icon)}</div>`,i={_:" "," - ":" ","-":" "},l=n.replace(/\_| \- |\-/g,(e=>i[e]));return`<div class="tox-collection__item${t.isDisabled()?" tox-collection__item--state-disabled":""}" tabindex="-1" data-collection-item-value="${wC.encodeAllRaw(o.value)}" title="${l}" aria-label="${l}">${a}${r}</div>`})),a="auto"!==e.columns&&e.columns>1?z(r,e.columns):[r],i=L(a,(e=>`<div class="tox-collection__group">${e.join("")}</div>`));ma(o.element,i.join(""))},i=r(((o,n,s,r)=>{n.stop(),t.isDisabled()||Gr(o,DC,{name:e.name,value:r})})),l=[Qr(sr(),r(((e,t,o)=>{tc(o)}))),Qr(ur(),i),Qr(Cr(),i),Qr(rr(),r(((e,t,o)=>{Fi(e.element,"."+my).each((e=>{ni(e,my)})),ti(o,my)}))),Qr(ar(),r((e=>{Fi(e.element,"."+my).each((e=>{ni(e,my)}))}))),da(r(((t,o,n,s)=>{Gr(t,DC,{name:e.name,value:s})})))],c=(e,t)=>L(Od(e.element,".tox-collection__item"),t),d=bC.parts.field({dom:{tag:"div",classes:["tox-collection"].concat(1!==e.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:w},behaviours:ql([xg.config({disabled:t.isDisabled,onDisabled:e=>{c(e,(e=>{ti(e,"tox-collection__item--state-disabled"),kt(e,"aria-disabled",!0)}))},onEnabled:e=>{c(e,(e=>{ni(e,"tox-collection__item--state-disabled"),Et(e,"aria-disabled")}))}}),pw(),Nh.config({}),Ju.config({store:{mode:"memory",initialValue:o.getOr([])},onSetValue:(t,o)=>{a(t,o),"auto"===e.columns&&Jx(t,5,"tox-collection__item").each((({numRows:e,numColumns:o})=>{Th.setGridSize(t,e,o)})),jr(t,FC)}}),xC.config({}),Th.config((u=e.columns,m="normal",1===u?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===u?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:"color"===m?".tox-swatches__row":".tox-collection__group",cell:"color"===m?".tox-swatch":`.${ry}`}})),Vh("collection-events",l)]),eventOrder:{[Sr()]:["disabling","alloy.base.behaviour","collection-events"]}});var u,m;return SC(n,d,["tox-form__group--collection"],[])},NC=["input","textarea"],VC=e=>{const t=Pe(e);return R(NC,t)},zC=(e,t)=>{const o=t.getRoot(e).getOr(e.element);ni(o,t.invalidClass),t.notify.each((t=>{VC(e.element)&&kt(e.element,"aria-invalid",!1),t.getContainer(e).each((e=>{ma(e,t.validHtml)})),t.onValid(e)}))},LC=(e,t,o,n)=>{const s=t.getRoot(e).getOr(e.element);ti(s,t.invalidClass),t.notify.each((t=>{VC(e.element)&&kt(e.element,"aria-invalid",!0),t.getContainer(e).each((e=>{ma(e,n)})),t.onInvalid(e,n)}))},HC=(e,t,o)=>t.validator.fold((()=>Sk(on.value(!0))),(t=>t.validate(e))),PC=(e,t,o)=>(t.notify.each((t=>{t.onValidate(e)})),HC(e,t).map((o=>e.getSystem().isConnected()?o.fold((o=>(LC(e,t,0,o),on.error(o))),(o=>(zC(e,t),on.value(o)))):on.error("No longer in system"))));var UC=Object.freeze({__proto__:null,markValid:zC,markInvalid:LC,query:HC,run:PC,isInvalid:(e,t)=>{const o=t.getRoot(e).getOr(e.element);return ri(o,t.invalidClass)}});var WC=Object.freeze({__proto__:null,events:(e,t)=>e.validator.map((t=>Kr([Qr(t.onEvent,(t=>{PC(t,e).get(w)}))].concat(t.validateOnLoad?[ia((t=>{PC(t,e).get(b)}))]:[])))).getOr({})}),jC=[ds("invalidClass"),Ts("getRoot",D.none),_s("notify",[Ts("aria","alert"),Ts("getContainer",D.none),Ts("validHtml",""),el("onValid"),el("onInvalid"),el("onValidate")]),_s("validator",[ds("validate"),Ts("onEvent","input"),Ts("validateOnLoad",!0)])];const GC=Xl({fields:jC,name:"invalidating",active:WC,apis:UC,extra:{validation:e=>t=>{const o=Ju.getValue(t);return Sk(e(o))}}});const $C=Xl({fields:[],name:"unselecting",active:Object.freeze({__proto__:null,events:()=>Kr([Jr(hr(),E)]),exhibit:()=>La({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})})}),qC=ya("color-input-change"),YC=ya("color-swatch-change"),XC=ya("color-picker-cancel"),KC=(e,t,o,n)=>{const s=bC.parts.field({factory:_y,inputClasses:["tox-textfield"],data:n,onSetValue:e=>GC.run(e).get(b),inputBehaviours:ql([xg.config({disabled:t.providers.isDisabled}),pw(),xC.config({}),GC.config({invalidClass:"tox-textbox-field-invalid",getRoot:e=>st(e.element),notify:{onValid:e=>{const t=Ju.getValue(e);Gr(e,qC,{color:t})}},validator:{validateOnLoad:!1,validate:e=>{const t=Ju.getValue(e);if(0===t.length)return Sk(on.value(!0));{const e=Re.fromTag("span");Mt(e,"background-color",t);const o=Nt(e,"background-color").fold((()=>on.error("blah")),(e=>on.value(t)));return Sk(o)}}}})]),selectOnFocus:!1}),r=e.label.map((e=>OC(e,t.providers))),a=(e,t)=>{Gr(e,YC,{value:t})},i=Ff(((e,t)=>Vk.sketch({dom:e.dom,components:e.components,toggleClass:"mce-active",dropdownBehaviours:ql([fw(t.providers.isDisabled),pw(),$C.config({}),xC.config({})]),layouts:e.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:t.getSink,fetch:o=>wk((t=>e.fetch(t))).map((n=>D.from(qk(wn(KS(ya("menu-value"),n,(t=>{e.onItemAction(o,t)}),e.columns,e.presets,ny.CLOSE_ON_EXECUTE,T,t.providers),{movement:ZS(e.columns,e.presets)}))))),parts:{menu:wy(0,0,e.presets)}}))({dom:{tag:"span",attributes:{"aria-label":t.providers.translate("Color swatch")}},layouts:{onRtl:()=>[El,Tl,Bl],onLtr:()=>[Tl,El,Bl]},components:[],fetch:US(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((()=>jr(t,XC)),(o=>{a(t,o),xS(e.storageKey,o)}))}),"#ffffff"):a(t,"remove"===n?"":n)}))}},t));return bC.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:r.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[s,i.asSpec()]}]),fieldBehaviours:ql([Vh("form-field-events",[Qr(qC,((t,o)=>{i.getOpt(t).each((e=>{Mt(e.element,"background-color",o.event.color)})),Gr(t,_C,{name:e.name})})),Qr(YC,((e,t)=>{bC.getField(e).each((o=>{Ju.setValue(o,t.event.value),ag.getCurrent(e).each(Uh.focus)}))})),Qr(XC,((e,t)=>{bC.getField(e).each((t=>{ag.getCurrent(e).each(Uh.focus)}))}))])])})},JC=Dm({schema:[ds("dom")],name:"label"}),ZC=e=>Dm({name:e+"-edge",overrides:t=>t.model.manager.edgeActions[e].fold((()=>({})),(e=>({events:Kr([ea(Ks(),((t,o,n)=>e(t,n)),[t]),ea(er(),((t,o,n)=>e(t,n)),[t]),ea(tr(),((t,o,n)=>{n.mouseIsDown.get()&&e(t,n)}),[t])])})))}),QC=ZC("top-left"),eO=ZC("top"),tO=ZC("top-right"),oO=ZC("right"),nO=ZC("bottom-right"),sO=ZC("bottom"),rO=ZC("bottom-left"),aO=ZC("left"),iO=Tm({name:"thumb",defaults:x({dom:{styles:{position:"absolute"}}}),overrides:e=>({events:Kr([oa(Ks(),e,"spectrum"),oa(Js(),e,"spectrum"),oa(Zs(),e,"spectrum"),oa(er(),e,"spectrum"),oa(tr(),e,"spectrum"),oa(nr(),e,"spectrum")])})}),lO=e=>qg(e.event),cO=Tm({schema:[ls("mouseIsDown",(()=>Ns(!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:ql([Th.config({mode:"special",onLeft:(o,n)=>t.onLeft(o,e,lO(n)),onRight:(o,n)=>t.onRight(o,e,lO(n)),onUp:(o,n)=>t.onUp(o,e,lO(n)),onDown:(o,n)=>t.onDown(o,e,lO(n))}),xC.config({}),Uh.config({})]),events:Kr([Qr(Ks(),o),Qr(Js(),o),Qr(er(),o),Qr(tr(),((t,n)=>{e.mouseIsDown.get()&&o(t,n)}))])}}});var dO=[JC,aO,oO,eO,sO,QC,tO,rO,nO,iO,cO];const uO=x("slider.change.value"),mO=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=>$t(e.clientX,e.clientY))):D.none()}{const e=t;return void 0!==e.clientX?D.some(e).map((e=>$t(e.clientX,e.clientY))):D.none()}},gO=e=>e.model.minX,pO=e=>e.model.minY,hO=e=>e.model.minX-1,fO=e=>e.model.minY-1,bO=e=>e.model.maxX,vO=e=>e.model.maxY,yO=e=>e.model.maxX+1,xO=e=>e.model.maxY+1,wO=(e,t,o)=>t(e)-o(e),SO=e=>wO(e,bO,gO),kO=e=>wO(e,vO,pO),CO=e=>SO(e)/2,OO=e=>kO(e)/2,_O=(e,t)=>t?e.stepSize*e.speedMultiplier:e.stepSize,TO=e=>e.snapToGrid,EO=e=>e.snapStart,DO=e=>e.rounded,AO=(e,t)=>void 0!==e[t+"-edge"],MO=e=>AO(e,"left"),BO=e=>AO(e,"right"),IO=e=>AO(e,"top"),FO=e=>AO(e,"bottom"),RO=e=>e.model.value.get(),NO=(e,t)=>({x:e,y:t}),VO=(e,t)=>{Gr(e,uO(),{value:t})},zO=(e,t,o,n)=>e<t?e:e>o?o:e===t?t-1:Math.max(t,e-n),LO=(e,t,o,n)=>e>o?e:e<t?t:e===o?o+1:Math.min(o,e+n),HO=(e,t,o)=>Math.max(t,Math.min(o,e)),PO=e=>{const{min:t,max:o,range:n,value:s,step:r,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(s<u)return p;if(s>m)return h;{const e=((e,t,o)=>Math.min(o,Math.max(e,t))-t)(s,u,m),c=HO(e/g*n+t,p,h);return a&&c>=t&&c<=o?((e,t,o,n,s)=>s.fold((()=>{const s=e-t,r=Math.round(s/n)*n;return HO(t+r,t-1,o+1)}),(t=>{const s=(e-t)%n,r=Math.round(s/n),a=Math.floor((e-t)/n),i=Math.floor((o-t)/n),l=t+Math.min(i,a+r)*n;return Math.max(t,l)})))(c,t,o,r,i):l?Math.round(c):c}},UO=e=>{const{min:t,max:o,range:n,value:s,hasMinEdge:r,hasMaxEdge:a,maxBound:i,maxOffset:l,centerMinEdge:c,centerMaxEdge:d}=e;return s<t?r?0:c:s>o?a?i:d:(s-t)/n*l},WO="top",jO="right",GO="bottom",$O="left",qO=e=>e.element.dom.getBoundingClientRect(),YO=(e,t)=>e[t],XO=e=>{const t=qO(e);return YO(t,$O)},KO=e=>{const t=qO(e);return YO(t,jO)},JO=e=>{const t=qO(e);return YO(t,WO)},ZO=e=>{const t=qO(e);return YO(t,GO)},QO=e=>{const t=qO(e);return YO(t,"width")},e_=e=>{const t=qO(e);return YO(t,"height")},t_=(e,t,o)=>(e+t)/2-o,o_=(e,t)=>{const o=qO(e),n=qO(t),s=YO(o,$O),r=YO(o,jO),a=YO(n,$O);return t_(s,r,a)},n_=(e,t)=>{const o=qO(e),n=qO(t),s=YO(o,WO),r=YO(o,GO),a=YO(n,WO);return t_(s,r,a)},s_=(e,t)=>{Gr(e,uO(),{value:t})},r_=(e,t,o)=>{const n={min:gO(t),max:bO(t),range:SO(t),value:o,step:_O(t),snap:TO(t),snapStart:EO(t),rounded:DO(t),hasMinEdge:MO(t),hasMaxEdge:BO(t),minBound:XO(e),maxBound:KO(e),screenRange:QO(e)};return PO(n)},a_=e=>(t,o,n)=>((e,t,o,n)=>{const s=(e>0?LO:zO)(RO(o),gO(o),bO(o),_O(o,n));return s_(t,s),D.some(s)})(e,t,o,n).map(E),i_=(e,t,o,n,s,r)=>{const a=((e,t,o,n,s)=>{const r=QO(e),a=n.bind((t=>D.some(o_(t,e)))).getOr(0),i=s.bind((t=>D.some(o_(t,e)))).getOr(r),l={min:gO(t),max:bO(t),range:SO(t),value:o,hasMinEdge:MO(t),hasMaxEdge:BO(t),minBound:XO(e),minOffset:0,maxBound:KO(e),maxOffset:r,centerMinEdge:a,centerMaxEdge:i};return UO(l)})(t,r,o,n,s);return XO(t)-XO(e)+a},l_=a_(-1),c_=a_(1),d_=D.none,u_=D.none,m_={"top-left":D.none(),top:D.none(),"top-right":D.none(),right:D.some(((e,t)=>{VO(e,yO(t))})),"bottom-right":D.none(),bottom:D.none(),"bottom-left":D.none(),left:D.some(((e,t)=>{VO(e,hO(t))}))};var g_=Object.freeze({__proto__:null,setValueFrom:(e,t,o)=>{const n=r_(e,t,o);return s_(e,n),n},setToMin:(e,t)=>{const o=gO(t);s_(e,o)},setToMax:(e,t)=>{const o=bO(t);s_(e,o)},findValueOfOffset:r_,getValueFromEvent:e=>mO(e).map((e=>e.left)),findPositionOfValue:i_,setPositionFromValue:(e,t,o,n)=>{const s=RO(o),r=i_(e,n.getSpectrum(e),s,n.getLeftEdge(e),n.getRightEdge(e),o),a=Jt(t.element)/2;Mt(t.element,"left",r-a+"px")},onLeft:l_,onRight:c_,onUp:d_,onDown:u_,edgeActions:m_});const p_=(e,t)=>{Gr(e,uO(),{value:t})},h_=(e,t,o)=>{const n={min:pO(t),max:vO(t),range:kO(t),value:o,step:_O(t),snap:TO(t),snapStart:EO(t),rounded:DO(t),hasMinEdge:IO(t),hasMaxEdge:FO(t),minBound:JO(e),maxBound:ZO(e),screenRange:e_(e)};return PO(n)},f_=e=>(t,o,n)=>((e,t,o,n)=>{const s=(e>0?LO:zO)(RO(o),pO(o),vO(o),_O(o,n));return p_(t,s),D.some(s)})(e,t,o,n).map(E),b_=(e,t,o,n,s,r)=>{const a=((e,t,o,n,s)=>{const r=e_(e),a=n.bind((t=>D.some(n_(t,e)))).getOr(0),i=s.bind((t=>D.some(n_(t,e)))).getOr(r),l={min:pO(t),max:vO(t),range:kO(t),value:o,hasMinEdge:IO(t),hasMaxEdge:FO(t),minBound:JO(e),minOffset:0,maxBound:ZO(e),maxOffset:r,centerMinEdge:a,centerMaxEdge:i};return UO(l)})(t,r,o,n,s);return JO(t)-JO(e)+a},v_=D.none,y_=D.none,x_=f_(-1),w_=f_(1),S_={"top-left":D.none(),top:D.some(((e,t)=>{VO(e,fO(t))})),"top-right":D.none(),right:D.none(),"bottom-right":D.none(),bottom:D.some(((e,t)=>{VO(e,xO(t))})),"bottom-left":D.none(),left:D.none()};var k_=Object.freeze({__proto__:null,setValueFrom:(e,t,o)=>{const n=h_(e,t,o);return p_(e,n),n},setToMin:(e,t)=>{const o=pO(t);p_(e,o)},setToMax:(e,t)=>{const o=vO(t);p_(e,o)},findValueOfOffset:h_,getValueFromEvent:e=>mO(e).map((e=>e.top)),findPositionOfValue:b_,setPositionFromValue:(e,t,o,n)=>{const s=RO(o),r=b_(e,n.getSpectrum(e),s,n.getTopEdge(e),n.getBottomEdge(e),o),a=Wt(t.element)/2;Mt(t.element,"top",r-a+"px")},onLeft:v_,onRight:y_,onUp:x_,onDown:w_,edgeActions:S_});const C_=(e,t)=>{Gr(e,uO(),{value:t})},O_=(e,t)=>({x:e,y:t}),__=(e,t)=>(o,n,s)=>((e,t,o,n,s)=>{const r=e>0?LO:zO,a=t?RO(n).x:r(RO(n).x,gO(n),bO(n),_O(n,s)),i=t?r(RO(n).y,pO(n),vO(n),_O(n,s)):RO(n).y;return C_(o,O_(a,i)),D.some(a)})(e,t,o,n,s).map(E),T_=__(-1,!1),E_=__(1,!1),D_=__(-1,!0),A_=__(1,!0),M_={"top-left":D.some(((e,t)=>{VO(e,NO(hO(t),fO(t)))})),top:D.some(((e,t)=>{VO(e,NO(CO(t),fO(t)))})),"top-right":D.some(((e,t)=>{VO(e,NO(yO(t),fO(t)))})),right:D.some(((e,t)=>{VO(e,NO(yO(t),OO(t)))})),"bottom-right":D.some(((e,t)=>{VO(e,NO(yO(t),xO(t)))})),bottom:D.some(((e,t)=>{VO(e,NO(CO(t),xO(t)))})),"bottom-left":D.some(((e,t)=>{VO(e,NO(hO(t),xO(t)))})),left:D.some(((e,t)=>{VO(e,NO(hO(t),OO(t)))}))};var B_=Object.freeze({__proto__:null,setValueFrom:(e,t,o)=>{const n=r_(e,t,o.left),s=h_(e,t,o.top),r=O_(n,s);return C_(e,r),r},setToMin:(e,t)=>{const o=gO(t),n=pO(t);C_(e,O_(o,n))},setToMax:(e,t)=>{const o=bO(t),n=vO(t);C_(e,O_(o,n))},getValueFromEvent:e=>mO(e),setPositionFromValue:(e,t,o,n)=>{const s=RO(o),r=i_(e,n.getSpectrum(e),s.x,n.getLeftEdge(e),n.getRightEdge(e),o),a=b_(e,n.getSpectrum(e),s.y,n.getTopEdge(e),n.getBottomEdge(e),o),i=Jt(t.element)/2,l=Wt(t.element)/2;Mt(t.element,"left",r-i+"px"),Mt(t.element,"top",a-l+"px")},onLeft:T_,onRight:E_,onUp:D_,onDown:A_,edgeActions:M_});const I_=og({name:"Slider",configFields:[Ts("stepSize",1),Ts("speedMultiplier",10),Ts("onChange",b),Ts("onChoose",b),Ts("onInit",b),Ts("onDragStart",b),Ts("onDragEnd",b),Ts("snapToGrid",!1),Ts("rounded",!0),ys("snapStart"),us("model",rs("mode",{x:[Ts("minX",0),Ts("maxX",100),ls("value",(e=>Ns(e.mode.minX))),ds("getInitialValue"),sl("manager",g_)],y:[Ts("minY",0),Ts("maxY",100),ls("value",(e=>Ns(e.mode.minY))),ds("getInitialValue"),sl("manager",k_)],xy:[Ts("minX",0),Ts("maxX",100),Ts("minY",0),Ts("maxY",100),ls("value",(e=>Ns({x:e.mode.minX,y:e.mode.minY}))),ds("getInitialValue"),sl("manager",B_)]})),Zu("sliderBehaviours",[Th,Ju]),ls("mouseIsDown",(()=>Ns(!1)))],partFields:dO,factory:(e,t,o,n)=>{const s=t=>Um(t,e,"thumb"),r=t=>Um(t,e,"spectrum"),a=t=>Pm(t,e,"left-edge"),i=t=>Pm(t,e,"right-edge"),l=t=>Pm(t,e,"top-edge"),c=t=>Pm(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:r})},g=(e,t)=>{d.value.set(t);const o=s(e);m(e,o)},p=t=>{const o=e.mouseIsDown.get();e.mouseIsDown.set(!1),o&&Pm(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,s(t))},f=(t,o)=>{o.stop(),e.onDragEnd(t,s(t)),p(t)},b=t=>{Pm(t,e,"spectrum").map(Th.focusIn)};return{uid:e.uid,dom:e.dom,components:t,behaviours:em(e.sliderBehaviours,[Th.config({mode:"special",focusIn:b}),Ju.config({store:{mode:"manual",getValue:e=>d.value.get(),setValue:g}}),Ql.config({channels:{[Fu()]:{onReceive:p}}})]),events:Kr([Qr(uO(),((t,o)=>{((t,o)=>{g(t,o);const n=s(t);e.onChange(t,n,o),D.some(!0)})(t,o.event.value)})),ia(((t,o)=>{const n=d.getInitialValue();d.value.set(n);const a=s(t);m(t,a);const i=r(t);e.onInit(t,a,i,d.value.get())})),Qr(Ks(),h),Qr(Zs(),f),Qr(er(),((e,t)=>{b(e),h(e,t)})),Qr(nr(),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)}}}),F_=ya("rgb-hex-update"),R_=ya("slider-update"),N_=ya("palette-update"),V_="form",z_=[Zu("formBehaviours",[Ju])],L_=e=>"<alloy.field."+e+">",H_=(e,t)=>({uid:e.uid,dom:e.dom,components:t,behaviours:em(e.formBehaviours,[Ju.config({store:{mode:"manual",getValue:t=>{const o=jm(t,e);return ce(o,((e,t)=>e().bind((e=>{const o=ag.getCurrent(e);return n=o,s=new Error(`Cannot find a current component to extract the value from for form part '${t}': `+ha(e.element)),n.fold((()=>on.error(s)),on.value);var n,s})).map(Ju.getValue)))},setValue:(t,o)=>{le(o,((o,n)=>{Pm(t,e,n).each((e=>{ag.getCurrent(e).each((e=>{Ju.setValue(e,o)}))}))}))}}})]),apis:{getField:(t,o)=>Pm(t,e,o).bind(ag.getCurrent)}}),P_={getField:Ra(((e,t,o)=>e.getField(t,o))),sketch:e=>{const t=(()=>{const e=[];return{field:(t,o)=>(e.push(t),Nm(V_,L_(t),o)),record:x(e)}})(),o=e(t),n=t.record(),s=L(n,(e=>Tm({name:e,pname:L_(e)})));return Jm(V_,z_,s,H_,o)}},U_=ya("valid-input"),W_=ya("invalid-input"),j_=ya("validating-input"),G_="colorcustom.rgb.",$_=(e,t,o,n)=>{const s=(o,n)=>GC.config({invalidClass:t("invalid"),notify:{onValidate:e=>{Gr(e,j_,{type:o})},onValid:e=>{Gr(e,U_,{type:o,value:Ju.getValue(e)})},onInvalid:e=>{Gr(e,W_,{type:o,value:Ju.getValue(e)})}},validator:{validate:t=>{const o=Ju.getValue(t),s=n(o)?on.value(!0):on.error(e("aria.input.invalid"));return Sk(s)},validateOnLoad:!1}}),r=(o,n,r,a,i)=>{const l=e("colorcustom.rgb.range"),c=bC.parts.label({dom:{tag:"label",attributes:{"aria-label":a}},components:[Si(r)]}),d=bC.parts.field({data:i,factory:_y,inputAttributes:{type:"text",..."hex"===n?{"aria-live":"polite"}:{}},inputClasses:[t("textfield")],inputBehaviours:ql([s(n,o),xC.config({})]),onSetValue:e=>{if(GC.isInvalid(e)){GC.run(e).get(b)}}}),u=[c,d],m="hex"!==n?[bC.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,s=t.blue;Ju.setValue(e,{red:o,green:n,blue:s})},i=Ff({dom:{tag:"div",classes:[t("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),l=(e,t)=>{i.getOpt(e).each((e=>{Mt(e.element,"background-color","#"+t.value)}))},c=tg({factory:()=>{const s={red:Ns(D.some(255)),green:Ns(D.some(255)),blue:Ns(D.some(255)),hex:Ns(D.some("ffffff"))},c=e=>s[e].get(),d=(e,t)=>{s[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=>eS(e,t,o,1))))))).each((t=>{const o=((e,t)=>{const o=Yw(t);return P_.getField(e,"hex").each((t=>{Uh.isFocused(t)||Ju.setValue(e,{hex:o.value})})),o})(e,t);Gr(e,F_,{hex:o}),l(e,o)}))},p=(e,t)=>{const n=t.event;(e=>"hex"===e.type)(n)?((e,t)=>{o(e);const n=Pw(t);d("hex",D.some(n.value));const s=nS(n);a(e,s),u(s),Gr(e,F_,{hex:n}),l(e,n)})(e,n.value):g(e,n.type,n.value)},h=t=>({label:e(G_+t+".label"),description:e(G_+t+".description")}),f=h("red"),b=h("green"),v=h("blue"),y=h("hex");return wn(P_.sketch((o=>({dom:{tag:"form",classes:[t("rgb-form")],attributes:{"aria-label":e("aria.color.picker")}},components:[o.field("red",bC.sketch(r(tS,"red",f.label,f.description,255))),o.field("green",bC.sketch(r(tS,"green",b.label,b.description,255))),o.field("blue",bC.sketch(r(tS,"blue",v.label,v.description,255))),o.field("hex",bC.sketch(r(jw,"hex",y.label,y.description,"ffffff"))),i.asSpec()],formBehaviours:ql([GC.config({invalidClass:t("form-invalid")}),Vh("rgb-form-events",[Qr(U_,p),Qr(W_,m),Qr(j_,m)])])}))),{apis:{updateHex:(e,t)=>{Ju.setValue(e,{hex:t.value}),((e,t)=>{const o=nS(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},q_=(e,t)=>{const o=I_.parts.spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[t("sv-palette-spectrum")]}}),n=I_.parts.thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[t("sv-palette-thumb")],innerHtml:`<div class=${t("sv-palette-inner-thumb")} role="presentation"></div>`}}),s=(e,t)=>{const{width:o,height:n}=e,s=e.getContext("2d");if(null===s)return;s.fillStyle=t,s.fillRect(0,0,o,n);const r=s.createLinearGradient(0,0,o,0);r.addColorStop(0,"rgba(255,255,255,1)"),r.addColorStop(1,"rgba(255,255,255,0)"),s.fillStyle=r,s.fillRect(0,0,o,n);const a=s.createLinearGradient(0,0,0,n);a.addColorStop(0,"rgba(0,0,0,0)"),a.addColorStop(1,"rgba(0,0,0,1)"),s.fillStyle=a,s.fillRect(0,0,o,n)},r=tg({factory:r=>{const a=x({x:0,y:0}),i=ql([ag.config({find:D.some}),Uh.config({})]);return I_.sketch({dom:{tag:"div",attributes:{role:"slider","aria-valuetext":e(["Saturation {0}%, Brightness {1}%",0,0])},classes:[t("sv-palette")]},model:{mode:"xy",getInitialValue:a},rounded:!1,components:[o,n],onChange:(t,o,n)=>{h(n)||kt(t.element,"aria-valuetext",e(["Saturation {0}%, Brightness {1}%",Math.floor(n.x),Math.floor(100-n.y)])),Gr(t,N_,{value:n})},onInit:(e,t,o,n)=>{s(o.element.dom,aS(iS))},sliderBehaviours:i})},name:"SaturationBrightnessPalette",configFields:[],apis:{setHue:(e,t,o)=>{((e,t)=>{const o=e.components()[0].element.dom,n=wS(t,100,100),r=oS(n);s(o,aS(r))})(t,o)},setThumb:(t,o,n)=>{((t,o)=>{const n=SS(nS(o));I_.setValue(t,{x:n.saturation,y:100-n.value}),kt(t.element,"aria-valuetext",e(["Saturation {0}%, Brightness {1}%",n.saturation,n.value]))})(o,n)}},extraApis:{}});return r},Y_=(e,t)=>{const o=tg({name:"ColourPicker",configFields:[ds("dom"),Ts("onValidHex",b),Ts("onInvalidHex",b)],factory:o=>{const n=$_(e,t,o.onValidHex,o.onInvalidHex),s=q_(e,t),r={paletteRgba:Ns(iS),paletteHue:Ns(0)},a=Ff(((e,t)=>{const o=I_.parts.spectrum({dom:{tag:"div",classes:[t("hue-slider-spectrum")],attributes:{role:"presentation"}}}),n=I_.parts.thumb({dom:{tag:"div",classes:[t("hue-slider-thumb")],attributes:{role:"presentation"}}});return I_.sketch({dom:{tag:"div",classes:[t("hue-slider")],attributes:{role:"slider","aria-valuemin":0,"aria-valuemax":360,"aria-valuenow":120}},rounded:!1,model:{mode:"y",getInitialValue:x(0)},components:[o,n],sliderBehaviours:ql([Uh.config({})]),onChange:(e,t,o)=>{kt(e.element,"aria-valuenow",Math.floor(360-3.6*o)),Gr(e,R_,{value:o})}})})(0,t)),i=Ff(s.sketch({})),l=Ff(n.sketch({})),c=(e,t,o)=>{i.getOpt(e).each((e=>{s.setHue(e,o)}))},d=(e,t)=>{l.getOpt(e).each((e=>{n.updateHex(e,t)}))},u=(e,t,o)=>{a.getOpt(e).each((e=>{I_.setValue(e,(e=>100-e/360*100)(o))}))},m=(e,t)=>{i.getOpt(e).each((e=>{s.setThumb(e,t)}))},g=(e,t,o,n)=>{((e,t)=>{const o=nS(e);r.paletteRgba.set(o),r.paletteHue.set(t)})(t,o),H(n,(n=>{n(e,t,o)}))};return{uid:o.uid,dom:o.dom,components:[i.asSpec(),a.asSpec(),l.asSpec()],behaviours:ql([Vh("colour-picker-events",[Qr(F_,(()=>{const e=[c,u,m];return(t,o)=>{const n=o.event.hex,s=(e=>SS(nS(e)))(n);g(t,n,s.hue,e)}})()),Qr(N_,(()=>{const e=[d];return(t,o)=>{const n=o.event.value,s=r.paletteHue.get(),a=wS(s,n.x,100-n.y),i=kS(a);g(t,i,s,e)}})()),Qr(R_,(()=>{const e=[c,d];return(t,o)=>{const n=(e=>(100-e)/100*360)(o.event.value),s=r.paletteRgba.get(),a=SS(s),i=wS(n,a.saturation,a.value),l=kS(i);g(t,l,n,e)}})())]),ag.config({find:e=>l.getOpt(e)}),Th.config({mode:"acyclic"})])}}});return o},X_=()=>ag.config({find:D.some}),K_=e=>ag.config({find:e.getOpt}),J_=e=>ag.config({find:t=>it(t.element,e).bind((e=>t.getSystem().getByDom(e).toOptional()))}),Z_=zn([Ts("preprocess",w),Ts("postprocess",w)]),Q_=(e,t)=>{const o=ns("RepresentingConfigs.memento processors",Z_,t);return Ju.config({store:{mode:"manual",getValue:t=>{const n=e.get(t),s=Ju.getValue(n);return o.postprocess(s)},setValue:(t,n)=>{const s=o.preprocess(n),r=e.get(t);Ju.setValue(r,s)}}})},eT=(e,t,o)=>Ju.config({store:{mode:"manual",...e.map((e=>({initialValue:e}))).getOr({}),getValue:t,setValue:o}}),tT=(e,t,o)=>eT(e,(e=>t(e.element)),((e,t)=>o(e.element,t))),oT=e=>Ju.config({store:{mode:"memory",initialValue:e}}),nT={"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"},sT=(e,t,o)=>{const n=e=>"tox-"+e,s=Y_((e=>t=>r(t)?e.translate(nT[t]):e.translate(t))(t),n),a=Ff(s.sketch({dom:{tag:"div",classes:[n("color-picker-container")],attributes:{role:"presentation"}},onValidHex:e=>{Gr(e,DC,{name:"hex-valid",value:!0})},onInvalidHex:e=>{Gr(e,DC,{name:"hex-valid",value:!1})}}));return{dom:{tag:"div"},components:[a.asSpec()],behaviours:ql([eT(o,(e=>{const t=a.get(e);return ag.getCurrent(t).bind((e=>Ju.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=a.get(e);ag.getCurrent(n).fold((()=>{console.log("Can not find form")}),(e=>{Ju.setValue(e,{hex:o.getOr("")}),P_.getField(e,"hex").each((e=>{jr(e,cr())}))}))})),X_()])}};var rT=tinymce.util.Tools.resolve("tinymce.Resource");var aT=tinymce.util.Tools.resolve("tinymce.util.Tools");const iT=(e,t,o)=>{const n=(e,t)=>{t.stop()},s=e=>(t,o)=>{H(e,(e=>{e(t,o)}))},r=(e,t)=>{var o;if(!xg.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&&(Ju.setValue(o,((e,t)=>{const o=aT.explode(t.getOption("images_file_types"));return U(se(e),(e=>N(o,(t=>De(e.name.toLowerCase(),`.${t.toLowerCase()}`)))))})(n,t)),Gr(o,_C,{name:e.name}))},l=Ff({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:ql([Vh("input-file-events",[sa(ur()),sa(Cr())])])}),c=e.label.map((e=>OC(e,t))),d=bC.parts.field({factory:{sketch:e=>({uid:e.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:ql([oT(o.getOr([])),X_(),xg.config({}),Kh.config({toggleClass:"dragenter",toggleOnExecute:!1}),Vh("dropzone-events",[Qr("dragenter",s([n,Kh.toggle])),Qr("dragleave",s([n,Kh.toggle])),Qr("dragover",n),Qr("drop",s([n,r])),Qr(dr(),a)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p"},components:[Si(t.translate("Drop an image here"))]},Bf.sketch({dom:{tag:"button",styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[Si(t.translate("Browse for an image")),l.asSpec()],action:e=>{l.get(e).element.dom.click()},buttonBehaviours:ql([xC.config({}),fw(t.isDisabled),pw()])})]}]})}});return SC(c,d,["tox-form__group--stretched"],[])},lT=(e,t)=>{let o=null;const n=()=>{c(o)||(clearTimeout(o),o=null)};return{cancel:n,throttle:(...s)=>{n(),o=setTimeout((()=>{o=null,e.apply(null,s)}),t)}}},cT=ya("alloy-fake-before-tabstop"),dT=ya("alloy-fake-after-tabstop"),uT=e=>({dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:e},behaviours:ql([Uh.config({ignore:!0}),xC.config({})])}),mT=(e,t)=>({dom:{tag:"div",classes:["tox-navobj",...e.getOr([])]},components:[uT([cT]),t,uT([dT])],behaviours:ql([J_(1)])}),gT=(e,t)=>{Gr(e,ir(),{raw:{which:9,shiftKey:t}})},pT=(e,t)=>{const o=t.element;ri(o,cT)?gT(e,!0):ri(o,dT)&&gT(e,!1)},hT=e=>eC(e,["."+cT,"."+dT].join(","),T),fT=ya("update-dialog"),bT=ya("update-title"),vT=ya("update-body"),yT=ya("update-footer"),xT=ya("body-send-message"),wT=ya("dialog-focus-shifted"),ST=Do().browser,kT=ST.isSafari(),CT=ST.isFirefox(),OT=kT||CT,_T=ST.isChromium(),TT=({scrollTop:e,scrollHeight:t,clientHeight:o})=>Math.ceil(e)+o>=t,ET=(e,t)=>e.scrollTo(0,"bottom"===t?99999999:t),DT=(e,t,o)=>{const n=e.dom;D.from(n.contentDocument).fold(o,(e=>{let o=0;const s=((e,t)=>{const o=e.body;return D.from(!/^<!DOCTYPE (html|HTML)/.test(t)&&(!_T&&!kT||g(o)&&(0!==o.scrollTop||Math.abs(o.scrollHeight-o.clientHeight)>1))?o:e.documentElement)})(e,t).map((e=>(o=e.scrollTop,e))).forall(TT),r=()=>{const e=n.contentWindow;g(e)&&(s?ET(e,"bottom"):!s&&OT&&0!==o&&ET(e,o))};kT&&n.addEventListener("load",r,{once:!0}),e.open(),e.write(t),e.close(),kT||r()}))},AT=Ce(OT,kT?500:200).map((e=>((e,t)=>{let o=null,n=null;return{cancel:()=>{c(o)||(clearTimeout(o),o=null,n=null)},throttle:(...s)=>{n=s,c(o)&&(o=setTimeout((()=>{const t=n;o=null,n=null,e.apply(null,t)}),t))}}})(DT,e))),MT=(e,t,o)=>{const n="tox-dialog__iframe",s=e.transparent?[]:[`${n}--opaque`],r=e.border?["tox-navobj-bordered"]:[],a={...e.label.map((e=>({title:e}))).getOr({}),...o.map((e=>({srcdoc:e}))).getOr({}),...e.sandboxed?{sandbox:"allow-scripts allow-same-origin"}:{}},i=((e,t)=>{const o=Ns(e.getOr(""));return{getValue:e=>o.get(),setValue:(e,n)=>{if(o.get()!==n){const o=e.element,s=()=>kt(o,"srcdoc",n);t?AT.fold(x(DT),(e=>e.throttle))(o,n,s):s()}o.set(n)}}})(o,e.streamContent),l=e.label.map((e=>OC(e,t))),c=bC.parts.field({factory:{sketch:e=>mT(D.from(r),{uid:e.uid,dom:{tag:"iframe",attributes:a,classes:[n,...s]},behaviours:ql([xC.config({}),Uh.config({}),eT(o,i.getValue,i.setValue),Ql.config({channels:{[wT]:{onReceive:(e,t)=>{t.newFocus.each((t=>{st(e.element).each((o=>{(Je(e.element,t)?ti:ni)(o,"tox-navobj-bordered-focus")}))}))}}}})])})}});return SC(l,c,["tox-form__group--stretched"],[])},BT=(e,t)=>{const o=Ns(t.getOr({url:""})),n=Ff({dom:{tag:"img",classes:["tox-imagepreview__image"],attributes:t.map((e=>({src:e.url}))).getOr({})}}),s=Ff({dom:{tag:"div",classes:["tox-imagepreview__container"],attributes:{role:"presentation"}},components:[n.asSpec()]}),r={};e.height.each((e=>r.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:r,attributes:{role:"presentation"}},components:[s.asSpec()],behaviours:ql([X_(),eT(a,(()=>o.get()),((e,t)=>{const r={url:t.url};t.zoom.each((e=>r.zoom=e)),t.cachedWidth.each((e=>r.cachedWidth=e)),t.cachedHeight.each((e=>r.cachedHeight=e)),o.set(r);const a=()=>{const{cachedWidth:t,cachedHeight:o,zoom:n}=r;if(!u(t)&&!u(o)){if(u(n)){const n=((e,t,o)=>{const n=Jt(e),s=Wt(e);return Math.min(n/t,s/o,1)})(e.element,t,o);r.zoom=n}const a=((e,t,o,n,s)=>{const r=o*s,a=n*s,i=Math.max(0,e/2-r/2),l=Math.max(0,t/2-a/2);return{left:i.toString()+"px",top:l.toString()+"px",width:r.toString()+"px",height:a.toString()+"px"}})(Jt(e.element),Wt(e.element),t,o,r.zoom);s.getOpt(e).each((e=>{Bt(e.element,a)}))}};n.getOpt(e).each((o=>{const n=o.element;t.url!==Ot(n,"src")&&(kt(n,"src",t.url),ni(e.element,"tox-imagepreview__loaded")),a(),(e=>new Promise(((t,o)=>{const n=()=>{r(),t(e)},s=[_c(e,"load",n),_c(e,"error",(()=>{r(),o("Unable to load data from image: "+e.dom.src)}))],r=()=>H(s,(e=>e.unbind()));e.dom.complete&&n()})))(n).then((t=>{e.getSystem().isConnected()&&(ti(e.element,"tox-imagepreview__loaded"),r.cachedWidth=t.dom.naturalWidth,r.cachedHeight=t.dom.naturalHeight,a())}))}))}))])}},IT=ya("toolbar.button.execute"),FT=ya("common-button-display-events"),RT={[Sr()]:["disabling","alloy.base.behaviour","toggling","toolbar-button-events"],[Ir()]:["toolbar-button-events",FT],[er()]:["focusing","alloy.base.behaviour",FT]},NT=e=>Mt(e.element,"width",Ft(e.element,"width")),VT=(e,t,o)=>Pb(e,{tag:"span",classes:["tox-icon","tox-tbtn__icon-wrap"],behaviours:o},t),zT=(e,t)=>VT(e,t,[]),LT=(e,t)=>VT(e,t,[Nh.config({})]),HT=(e,t,o)=>({dom:{tag:"span",classes:[`${t}__select-label`]},components:[Si(o.translate(e))],behaviours:ql([Nh.config({})])}),PT=ya("update-menu-text"),UT=ya("update-menu-icon"),WT=(e,t,o)=>{const n=Ns(b),s=e.text.map((e=>Ff(HT(e,t,o.providers)))),r=e.icon.map((e=>Ff(LT(e,o.providers.icons)))),a=(e,t)=>{const o=Ju.getValue(e);return Uh.focus(o),Gr(o,"keydown",{raw:t.event.raw}),Vk.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=Pb("chevron-down",{tag:"div",classes:[`${t}__select-chevron`]},o.providers.icons),d=ya("common-button-display-events"),u=Ff(Vk.sketch({...e.uid?{uid:e.uid}:{},...i,dom:{tag:"button",classes:[t,`${t}--select`].concat(L(e.classes,(e=>`${t}--${e}`))),attributes:{...l}},components:Cw([r.map((e=>e.asSpec())),s.map((e=>e.asSpec())),D.some(c)]),matchWidth:!0,useMinWidth:!0,onOpen:(t,o,n)=>{e.searchable&&(e=>{My(e).each((e=>Uh.focus(e)))})(n)},dropdownBehaviours:ql([...e.dropdownBehaviours,fw((()=>e.disabled||o.providers.isDisabled())),pw(),$C.config({}),Nh.config({}),Vh("dropdown-events",[xw(e,n),ww(e,n)]),Vh(d,[ia(((e,t)=>NT(e)))]),Vh("menubutton-update-display-text",[Qr(PT,((e,t)=>{s.bind((t=>t.getOpt(e))).each((e=>{Nh.set(e,[Si(o.providers.translate(t.event.text))])}))})),Qr(UT,((e,t)=>{r.bind((t=>t.getOpt(e))).each((e=>{Nh.set(e,[LT(t.event.icon,o.providers.icons)])}))}))])]),eventOrder:wn(RT,{mousedown:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"],[Ir()]:["toolbar-button-events","dropdown-events",d]}),sandboxBehaviours:ql([Th.config({mode:"special",onLeft:a,onRight:a}),Vh("dropdown-sandbox-events",[Qr(Ty,((e,t)=>{zk(e),t.stop()})),Qr(Ey,((e,t)=>{((e,t)=>{Lk(e).each((o=>{((e,t,o,n)=>{const s={...n,target:t};e.getSystem().triggerEvent(o,t,s)})(e,o.element,t.event.eventType,t.event.interactionEvent)}))})(e,t),t.stop()}))])]),lazySink:o.getSink,toggleClass:`${t}--active`,parts:{menu:{...wy(0,e.columns,e.presets),fakeFocus:e.searchable,onHighlightItem:Hk,onCollapseMenu:(e,t,o)=>{Mg.getHighlighted(o).each((t=>{Hk(e,o,t)}))},onDehighlightItem:Pk}},getAnchorOverrides:()=>({maxHeightFunction:(e,t)=>{zc()(e,t-10)}}),fetch:t=>wk(k(e.fetch,t))}));return u.asSpec()},jT=e=>"separator"===e.type,GT={type:"separator"},$T=(e,t)=>{const o=j(e,((e,o)=>(e=>r(e))(o)?""===o?e:"|"===o?e.length>0&&!jT(e[e.length-1])?e.concat([GT]):e:ve(t,o.toLowerCase())?e.concat([t[o.toLowerCase()]]):e:e.concat([o])),[]);return o.length>0&&jT(o[o.length-1])&&o.pop(),o},qT=(e,t)=>{const o=$T(r(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((()=>ya("generated-menu-item")));return wn({value:t},e)})(o),s=((e,t)=>{const o=e.getSubmenuItems(),n=qT(o,t);return{item:e,menus:wn(n.menus,{[e.value]:n.items}),expansions:wn(n.expansions,{[e.value]:e.value})}})(n,t);return{menus:wn(e.menus,s.menus),items:[s.item,...e.items],expansions:wn(e.expansions,s.expansions)}}return{...e,items:[o,...e.items]}}),{menus:{},expansions:{},items:[]})},YT=(e,t,o,n)=>{const s=ya("primary-menu"),r=qT(e,o.shared.providers.menuItems());if(0===r.items.length)return D.none();const a=(e=>e.search.fold((()=>({searchMode:"no-search"})),(e=>({searchMode:"search-with-field",placeholder:e.placeholder}))))(n),i=$k(s,r.items,t,o,n.isHorizontalMenu,a),l=(e=>e.search.fold((()=>({searchMode:"no-search"})),(e=>({searchMode:"search-with-results"}))))(n),c=ce(r.menus,((e,n)=>$k(n,e,t,o,!1,l))),d=wn(c,Ls(s,i));return D.from(Df.tieredData(s,d,r.expansions))},XT=e=>!ve(e,"items"),KT="data-value",JT=(e,t,o,n)=>L(o,(o=>XT(o)?{type:"togglemenuitem",text:o.text,value:o.value,active:o.value===n,onAction:()=>{Ju.setValue(e,o.value),Gr(e,_C,{name:t}),Uh.focus(e)}}:{type:"nestedmenuitem",text:o.text,getSubmenuItems:()=>JT(e,t,o.items,n)})),ZT=(e,t)=>re(e,(e=>XT(e)?Ce(e.value===t,e):ZT(e.items,t))),QT=tg({name:"HtmlSelect",configFields:[ds("options"),Zu("selectBehaviours",[Uh,Ju]),Ts("selectClasses",[]),Ts("selectAttributes",{}),ys("data")],factory:(e,t)=>{const o=L(e.options,(e=>({dom:{tag:"option",value:e.value,innerHtml:e.text}}))),n=e.data.map((e=>Ls("initialValue",e))).getOr({});return{uid:e.uid,dom:{tag:"select",classes:e.selectClasses,attributes:e.selectAttributes},components:o,behaviours:em(e.selectBehaviours,[Uh.config({}),Ju.config({store:{mode:"manual",getValue:e=>ci(e.element),setValue:(t,o)=>{const n=oe(e.options);G(e.options,(e=>e.value===o)).isSome()?di(t.element,o):-1===t.element.dom.selectedIndex&&""===o&&n.each((e=>di(t.element,e.value)))},...n}})])}}}),eE=x([Ts("field1Name","field1"),Ts("field2Name","field2"),ol("onLockedChange"),Zi(["lockClass"]),Ts("locked",!1),tm("coupledFieldBehaviours",[ag,Ju])]),tE=(e,t)=>Tm({factory:bC,name:e,overrides:e=>({fieldBehaviours:ql([Vh("coupled-input-behaviour",[Qr(cr(),(o=>{((e,t,o)=>Pm(e,t,o).bind(ag.getCurrent))(o,e,t).each((t=>{Pm(o,e,"lock").each((n=>{Kh.isOn(n)&&e.onLockedChange(o,t,n)}))}))}))])])})}),oE=x([tE("field1","field2"),tE("field2","field1"),Tm({factory:Bf,schema:[ds("dom")],name:"lock",overrides:e=>({buttonBehaviours:ql([Kh.config({selected:e.locked,toggleClass:e.markers.lockClass,aria:{mode:"pressed"}})])})})]),nE=og({name:"FormCoupledInputs",configFields:eE(),partFields:oE(),factory:(e,t,o,n)=>({uid:e.uid,dom:e.dom,components:t,behaviours:om(e.coupledFieldBehaviours,[ag.config({find:D.some}),Ju.config({store:{mode:"manual",getValue:t=>{const o=$m(t,e,["field1","field2"]);return{[e.field1Name]:Ju.getValue(o.field1()),[e.field2Name]:Ju.getValue(o.field2())}},setValue:(t,o)=>{const n=$m(t,e,["field1","field2"]);ye(o,e.field1Name)&&Ju.setValue(n.field1(),o[e.field1Name]),ye(o,e.field2Name)&&Ju.setValue(n.field2(),o[e.field2Name])}}})]),apis:{getField1:t=>Pm(t,e,"field1"),getField2:t=>Pm(t,e,"field2"),getLock:t=>Pm(t,e,"lock")}}),apis:{getField1:(e,t)=>e.getField1(t),getField2:(e,t)=>e.getField2(t),getLock:(e,t)=>e.getLock(t)}}),sE=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 on.value({value:e,unit:o})}return on.error(e)},rE=(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()},aE=e=>D.none(),iE=(e,t)=>{const o=sE(e).toOptional(),n=sE(t).toOptional();return Se(o,n,((e,t)=>rE(e,t.unit).map((e=>t.value/e)).map((e=>{return o=e,n=t.unit,e=>rE(e,n).map((e=>({value:e*o,unit:n})));var o,n})).getOr(aE))).getOr(aE)},lE=(e,t)=>{const o=e.label.map((e=>OC(e,t))),n=[xg.config({disabled:()=>e.disabled||t.isDisabled()}),pw(),Th.config({mode:"execution",useEnter:!0!==e.multiline,useControlEnter:!0===e.multiline,execute:e=>(jr(e,AC),D.some(!0))}),Vh("textfield-change",[Qr(cr(),((t,o)=>{Gr(t,_C,{name:e.name})})),Qr(xr(),((t,o)=>{Gr(t,_C,{name:e.name})}))]),xC.config({})],s=e.validation.map((e=>GC.config({getRoot:e=>st(e.element),invalidClass:"tox-invalid",validator:{validate:t=>{const o=Ju.getValue(t),n=e.validator(o);return Sk(!0===n?on.value(o):on.error(n))},validateOnLoad:e.validateOnLoad}}))).toArray(),r={...e.placeholder.fold(x({}),(e=>({placeholder:t.translate(e)}))),...e.inputMode.fold(x({}),(e=>({inputmode:e})))},a=bC.parts.field({tag:!0===e.multiline?"textarea":"input",...e.data.map((e=>({data:e}))).getOr({}),inputAttributes:r,inputClasses:[e.classname],inputBehaviours:ql(q([n,s])),selectOnFocus:!1,factory:_y}),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=[xg.config({disabled:()=>e.disabled||t.isDisabled(),onDisabled:e=>{bC.getField(e).each(xg.disable)},onEnabled:e=>{bC.getField(e).each(xg.enable)}}),pw()];return SC(o,i,l,c)},cE=(e,t)=>t.getAnimationRoot.fold((()=>e.element),(t=>t(e))),dE=e=>e.dimension.property,uE=(e,t)=>e.dimension.getDimension(t),mE=(e,t)=>{const o=cE(e,t);ii(o,[t.shrinkingClass,t.growingClass])},gE=(e,t)=>{ni(e.element,t.openClass),ti(e.element,t.closedClass),Mt(e.element,dE(t),"0px"),Ht(e.element)},pE=(e,t)=>{ni(e.element,t.closedClass),ti(e.element,t.openClass),Lt(e.element,dE(t))},hE=(e,t,o,n)=>{o.setCollapsed(),Mt(e.element,dE(t),uE(t,e.element)),mE(e,t),gE(e,t),t.onStartShrink(e),t.onShrunk(e)},fE=(e,t,o,n)=>{const s=n.getOrThunk((()=>uE(t,e.element)));o.setCollapsed(),Mt(e.element,dE(t),s),Ht(e.element);const r=cE(e,t);ni(r,t.growingClass),ti(r,t.shrinkingClass),gE(e,t),t.onStartShrink(e)},bE=(e,t,o)=>{const n=uE(t,e.element);("0px"===n?hE:fE)(e,t,o,D.some(n))},vE=(e,t,o)=>{const n=cE(e,t),s=ri(n,t.shrinkingClass),r=uE(t,e.element);pE(e,t);const a=uE(t,e.element);(s?()=>{Mt(e.element,dE(t),r),Ht(e.element)}:()=>{gE(e,t)})(),ni(n,t.shrinkingClass),ti(n,t.growingClass),pE(e,t),Mt(e.element,dE(t),a),o.setExpanded(),t.onStartGrow(e)},yE=(e,t,o)=>{const n=cE(e,t);return!0===ri(n,t.growingClass)},xE=(e,t,o)=>{const n=cE(e,t);return!0===ri(n,t.shrinkingClass)};var wE=Object.freeze({__proto__:null,refresh:(e,t,o)=>{if(o.isExpanded()){Lt(e.element,dE(t));const o=uE(t,e.element);Mt(e.element,dE(t),o)}},grow:(e,t,o)=>{o.isExpanded()||vE(e,t,o)},shrink:(e,t,o)=>{o.isExpanded()&&bE(e,t,o)},immediateShrink:(e,t,o)=>{o.isExpanded()&&hE(e,t,o)},hasGrown:(e,t,o)=>o.isExpanded(),hasShrunk:(e,t,o)=>o.isCollapsed(),isGrowing:yE,isShrinking:xE,isTransitioning:(e,t,o)=>yE(e,t)||xE(e,t),toggleGrow:(e,t,o)=>{(o.isExpanded()?bE:vE)(e,t,o)},disableTransitions:mE,immediateGrow:(e,t,o)=>{o.isExpanded()||(pE(e,t),Mt(e.element,dE(t),uE(t,e.element)),mE(e,t),o.setExpanded(),t.onStartGrow(e),t.onGrown(e))}});var SE=Object.freeze({__proto__:null,exhibit:(e,t,o)=>{const n=t.expanded;return La(n?{classes:[t.openClass],styles:{}}:{classes:[t.closedClass],styles:Ls(t.dimension.property,"0px")})},events:(e,t)=>Kr([aa(gr(),((o,n)=>{if(n.event.raw.propertyName===e.dimension.property){mE(o,e),t.isExpanded()&&Lt(o.element,e.dimension.property);(t.isExpanded()?e.onGrown:e.onShrunk)(o)}}))])}),kE=[ds("closedClass"),ds("openClass"),ds("shrinkingClass"),ds("growingClass"),ys("getAnimationRoot"),el("onShrunk"),el("onStartShrink"),el("onGrown"),el("onStartGrow"),Ts("expanded",!1),us("dimension",rs("property",{width:[sl("property","width"),sl("getDimension",(e=>Jt(e)+"px"))],height:[sl("property","height"),sl("getDimension",(e=>Wt(e)+"px"))]}))];const CE=Xl({fields:kE,name:"sliding",active:SE,apis:wE,state:Object.freeze({__proto__:null,init:e=>{const t=Ns(e.expanded);return Va({isExpanded:()=>!0===t.get(),isCollapsed:()=>!1===t.get(),setCollapsed:k(t.set,!1),setExpanded:k(t.set,!0),readState:()=>"expanded: "+t.get()})}})}),OE=e=>({isEnabled:()=>!xg.isDisabled(e),setEnabled:t=>xg.set(e,!t),setActive:t=>{const o=e.element;t?(ti(o,"tox-tbtn--enabled"),kt(o,"aria-pressed",!0)):(ni(o,"tox-tbtn--enabled"),Et(o,"aria-pressed"))},isActive:()=>ri(e.element,"tox-tbtn--enabled"),setText:t=>{Gr(e,PT,{text:t})},setIcon:t=>Gr(e,UT,{icon:t})}),_E=(e,t,o,n,s=!0)=>WT({text:e.text,icon:e.icon,tooltip:e.tooltip,searchable:e.search.isSome(),role:n,fetch:(t,n)=>{const s={pattern:e.search.isSome()?Uk(t):""};e.fetch((t=>{n(YT(t,ny.CLOSE_ON_EXECUTE,o,{isHorizontalMenu:!1,search:e.search}))}),s,OE(t))},onSetup:e.onSetup,getApi:OE,columns:1,presets:"normal",classes:[],dropdownBehaviours:[...s?[xC.config({})]:[]]},t,o.shared),TE=(e,t,o)=>{const n=e=>n=>{const s=!n.isActive();n.setActive(s),e.storage.set(s),o.shared.getSink().each((o=>{t().getOpt(o).each((t=>{tc(t.element),Gr(t,DC,{name:e.name,value:e.storage.get()})}))}))},s=e=>t=>{t.setActive(e.storage.get())};return t=>{t(L(e,(e=>{const t=e.text.fold((()=>({})),(e=>({text:e})));return{type:e.type,active:!1,...t,onAction:n(e),onSetup:s(e)}})))}},EE=e=>({dom:{tag:"span",classes:["tox-tree__label"],attributes:{title:e,"aria-label":e}},components:[Si(e)]}),DE=ya("leaf-label-event-id"),AE=({leaf:e,onLeafAction:t,visible:o,treeId:n,selectedId:s,backstage:r})=>{const a=e.menu.map((e=>_E(e,"tox-mbtn",r,D.none(),o))),i=[EE(e.title)];return a.each((e=>i.push(e))),Bf.sketch({dom:{tag:"div",classes:["tox-tree--leaf__label","tox-trbtn"].concat(o?["tox-tree--leaf__label--visible"]:[])},components:i,role:"treeitem",action:o=>{t(e.id),o.getSystem().broadcastOn([`update-active-item-${n}`],{value:e.id})},eventOrder:{[ir()]:[DE,"keying"]},buttonBehaviours:ql([...o?[xC.config({})]:[],Kh.config({toggleClass:"tox-trbtn--enabled",toggleOnExecute:!1,aria:{mode:"selected"}}),Ql.config({channels:{[`update-active-item-${n}`]:{onReceive:(t,o)=>{(o.value===e.id?Kh.on:Kh.off)(t)}}}}),Vh(DE,[ia(((t,o)=>{s.each((o=>{(o===e.id?Kh.on:Kh.off)(t)}))})),Qr(ir(),((e,t)=>{const o="ArrowLeft"===t.event.raw.code,n="ArrowRight"===t.event.raw.code;o?(Bi(e.element,".tox-tree--directory").each((t=>{e.getSystem().getByDom(t).each((e=>{Ii(t,".tox-tree--directory__label").each((t=>{e.getSystem().getByDom(t).each(Uh.focus)}))}))})),t.stop()):n&&t.stop()}))])])})},ME=(e,t)=>((e,t,o)=>Pb(e,{tag:"span",classes:["tox-tree__icon-wrap","tox-icon"],behaviours:o},t))(e,t,[]),BE=ya("directory-label-event-id"),IE=({directory:e,visible:t,noChildren:o,backstage:n})=>{const s=e.menu.map((e=>_E(e,"tox-mbtn",n,D.none()))),r=[{dom:{tag:"div",classes:["tox-chevron"]},components:[ME("chevron-right",n.shared.providers.icons)]},EE(e.title)];s.each((e=>{r.push(e)}));const a=t=>{Bi(t.element,".tox-tree--directory").each((o=>{t.getSystem().getByDom(o).each((o=>{const n=!Kh.isOn(o);Kh.toggle(o),Gr(t,"expand-tree-node",{expanded:n,node:e.id})}))}))};return Bf.sketch({dom:{tag:"div",classes:["tox-tree--directory__label","tox-trbtn"].concat(t?["tox-tree--directory__label--visible"]:[])},components:r,action:a,eventOrder:{[ir()]:[BE,"keying"]},buttonBehaviours:ql([...t?[xC.config({})]:[],Vh(BE,[Qr(ir(),((e,t)=>{const n="ArrowRight"===t.event.raw.code,s="ArrowLeft"===t.event.raw.code;n&&o&&t.stop(),(n||s)&&Bi(e.element,".tox-tree--directory").each((o=>{e.getSystem().getByDom(o).each((o=>{!Kh.isOn(o)&&n||Kh.isOn(o)&&s?(a(e),t.stop()):s&&!Kh.isOn(o)&&(Bi(o.element,".tox-tree--directory").each((e=>{Ii(e,".tox-tree--directory__label").each((e=>{o.getSystem().getByDom(e).each(Uh.focus)}))})),t.stop())}))}))}))])])})},FE=({children:e,onLeafAction:t,visible:o,treeId:n,expandedIds:s,selectedId:r,backstage:a})=>({dom:{tag:"div",classes:["tox-tree--directory__children"]},components:e.map((e=>"leaf"===e.type?AE({leaf:e,selectedId:r,onLeafAction:t,visible:o,treeId:n,backstage:a}):NE({directory:e,expandedIds:s,selectedId:r,onLeafAction:t,labelTabstopping:o,treeId:n,backstage:a}))),behaviours:ql([CE.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",expanded:o}),Nh.config({})])}),RE=ya("directory-event-id"),NE=({directory:e,onLeafAction:t,labelTabstopping:o,treeId:n,backstage:s,expandedIds:r,selectedId:a})=>{const{children:i}=e,l=Ns(r),c=r.includes(e.id);return{dom:{tag:"div",classes:["tox-tree--directory"],attributes:{role:"treeitem"}},components:[IE({directory:e,visible:o,noChildren:0===e.children.length,backstage:s}),FE({children:i,expandedIds:r,selectedId:a,onLeafAction:t,visible:c,treeId:n,backstage:s})],behaviours:ql([Vh(RE,[ia(((e,t)=>{Kh.set(e,c)})),Qr("expand-tree-node",((e,t)=>{const{expanded:o,node:n}=t.event;l.set(o?[...l.get(),n]:l.get().filter((e=>e!==n)))}))]),Kh.config({...e.children.length>0?{aria:{mode:"expanded"}}:{},toggleClass:"tox-tree--directory--expanded",onToggled:(e,o)=>{const r=e.components()[1],c=(d=o,i.map((e=>"leaf"===e.type?AE({leaf:e,selectedId:a,onLeafAction:t,visible:d,treeId:n,backstage:s}):NE({directory:e,expandedIds:l.get(),selectedId:a,onLeafAction:t,labelTabstopping:d,treeId:n,backstage:s}))));var d;o?CE.grow(r):CE.shrink(r),Nh.set(r,c)}})])}},VE=ya("tree-event-id");var zE=Object.freeze({__proto__:null,events:(e,t)=>{const o=e.stream.streams.setup(e,t);return Kr([Qr(e.event,o),la((()=>t.cancel()))].concat(e.cancelEvent.map((e=>[Qr(e,(()=>t.cancel()))])).getOr([])))}});const LE=e=>{const t=Ns(null);return Va({readState:()=>({timer:null!==t.get()?"set":"unset"}),setTimer:e=>{t.set(e)},cancel:()=>{const e=t.get();null!==e&&e.cancel()}})};var HE=Object.freeze({__proto__:null,throttle:LE,init:e=>e.stream.streams.state(e)});var PE=[us("stream",rs("mode",{throttle:[ds("delay"),Ts("stopEvent",!0),sl("streams",{setup:(e,t)=>{const o=e.stream,n=lT(e.onStream,o.delay);return t.setTimer(n),(e,t)=>{n.throttle(e,t),o.stopEvent&&t.stop()}},state:LE})]})),Ts("event","input"),ys("cancelEvent"),ol("onStream")];const UE=Xl({fields:PE,name:"streaming",active:zE,state:HE}),WE=(e,t,o)=>{const n=Ju.getValue(o);Ju.setValue(t,n),GE(t)},jE=(e,t)=>{const o=e.element,n=ci(o),s=o.dom;"number"!==Ot(o,"type")&&t(s,n)},GE=e=>{jE(e,((e,t)=>e.setSelectionRange(t.length,t.length)))},$E=(e,t,o)=>{if(e.selectsOver){const n=Ju.getValue(t),s=e.getDisplayText(n),r=Ju.getValue(o);return 0===e.getDisplayText(r).indexOf(s)?D.some((()=>{WE(0,t,o),((e,t)=>{jE(e,((e,o)=>e.setSelectionRange(t,o.length)))})(t,s.length)})):D.none()}return D.none()},qE=x("alloy.typeahead.itemexecute"),YE=x([ys("lazySink"),ds("fetch"),Ts("minChars",5),Ts("responseTime",1e3),el("onOpen"),Ts("getHotspot",D.some),Ts("getAnchorOverrides",x({})),Ts("layouts",D.none()),Ts("eventOrder",{}),Rs("model",{},[Ts("getDisplayText",(e=>void 0!==e.meta&&void 0!==e.meta.text?e.meta.text:e.value)),Ts("selectsOver",!0),Ts("populateFromBrowse",!0)]),el("onSetValue"),tl("onExecute"),el("onItemExecute"),Ts("inputClasses",[]),Ts("inputAttributes",{}),Ts("inputStyles",{}),Ts("matchWidth",!0),Ts("useMinWidth",!1),Ts("dismissOnBlur",!0),Zi(["openClass"]),ys("initialData"),Zu("typeaheadBehaviours",[Uh,Ju,UE,Th,Kh,fk]),ls("lazyTypeaheadComp",(()=>Ns(D.none))),ls("previewing",(()=>Ns(!0)))].concat(Sy()).concat(Fk())),XE=x([Em({schema:[Ji()],name:"menu",overrides:e=>({fakeFocus:!0,onHighlightItem:(t,o,n)=>{e.previewing.get()?e.lazyTypeaheadComp.get().each((t=>{$E(e.model,t,n).fold((()=>{e.model.selectsOver?(Mg.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&&WE(e.model,t,n),_t(n.element,"id").each((e=>kt(t.element,"aria-activedescendant",e)))}))},onExecute:(t,o)=>e.lazyTypeaheadComp.get().map((e=>(Gr(e,qE(),{item:o}),!0))),onHover:(t,o)=>{e.previewing.set(!1),e.lazyTypeaheadComp.get().each((t=>{e.model.populateFromBrowse&&WE(e.model,t,o)}))}})})]),KE=og({name:"Typeahead",configFields:YE(),partFields:XE(),factory:(e,t,o,n)=>{const s=(t,o,s)=>{e.previewing.set(!1);const r=fk.getCoupled(t,"sandbox");if(Mu.isOpen(r))ag.getCurrent(r).each((e=>{Mg.getHighlighted(e).fold((()=>{s(e)}),(()=>{Xr(r,e.element,"keydown",o)}))}));else{const o=e=>{ag.getCurrent(e).each(s)};_k(e,a(t),t,r,n,o,Tf.HighlightMenuAndItem).get(b)}},r=ky(e),a=e=>t=>t.map((t=>{const o=fe(t.menus),n=Y(o,(e=>U(e.items,(e=>"item"===e.type))));return Ju.getState(e).update(L(n,(e=>e.data))),t})),i=e=>ag.getCurrent(e),l="typeaheadevents",c=[Uh.config({}),Ju.config({onSetValue:e.onSetValue,store:{mode:"dataset",getDataKey:e=>ci(e.element),getFallbackEntry:e=>({value:e,meta:{}}),setValue:(t,o)=>{di(t.element,e.model.getDisplayText(o))},...e.initialData.map((e=>Ls("initialValue",e))).getOr({})}}),UE.config({stream:{mode:"throttle",delay:e.responseTime,stopEvent:!1},onStream:(t,o)=>{const s=fk.getCoupled(t,"sandbox");if(Uh.isFocused(t)&&ci(t.element).length>=e.minChars){const o=i(s).bind((e=>Mg.getHighlighted(e).map(Ju.getValue)));e.previewing.set(!0);const r=t=>{i(s).each((t=>{o.fold((()=>{e.model.selectsOver&&Mg.highlightFirst(t)}),(e=>{Mg.highlightBy(t,(t=>Ju.getValue(t).value===e.value)),Mg.getHighlighted(t).orThunk((()=>(Mg.highlightFirst(t),D.none())))}))}))};_k(e,a(t),t,s,n,r,Tf.HighlightJustMenu).get(b)}},cancelEvent:Tr()}),Th.config({mode:"special",onDown:(e,t)=>(s(e,t,Mg.highlightFirst),D.some(!0)),onEscape:e=>{const t=fk.getCoupled(e,"sandbox");return Mu.isOpen(t)?(Mu.close(t),D.some(!0)):D.none()},onUp:(e,t)=>(s(e,t,Mg.highlightLast),D.some(!0)),onEnter:t=>{const o=fk.getCoupled(t,"sandbox"),n=Mu.isOpen(o);if(n&&!e.previewing.get())return i(o).bind((e=>Mg.getHighlighted(e))).map((e=>(Gr(t,qE(),{item:e}),!0)));{const s=Ju.getValue(t);return jr(t,Tr()),e.onExecute(o,t,s),n&&Mu.close(o),D.some(!0)}}}),Kh.config({toggleClass:e.markers.openClass,aria:{mode:"expanded"}}),fk.config({others:{sandbox:t=>Bk(e,t,{onOpen:()=>Kh.on(t),onClose:()=>{e.lazyTypeaheadComp.get().each((e=>Et(e.element,"aria-activedescendant"))),Kh.off(t)}})}}),Vh(l,[ia((t=>{e.lazyTypeaheadComp.set(D.some(t))})),la((t=>{e.lazyTypeaheadComp.set(D.none())})),da((t=>{const o=b;Ek(e,a(t),t,n,o,Tf.HighlightMenuAndItem).get(b)})),Qr(qE(),((t,o)=>{const n=fk.getCoupled(t,"sandbox");WE(e.model,t,o.event.item),jr(t,Tr()),e.onItemExecute(t,n,o.event.item,Ju.getValue(t)),Mu.close(n),GE(t)}))].concat(e.dismissOnBlur?[Qr(yr(),(e=>{const t=fk.getCoupled(e,"sandbox");rc(t.element).isNone()&&Mu.close(t)}))]:[]))],d={[Fr()]:[Ju.name(),UE.name(),l],...e.eventOrder};return{uid:e.uid,dom:Oy(wn(e,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:{...r,...em(e.typeaheadBehaviours,c)},eventOrder:d}}}),JE=e=>({...e,toCached:()=>JE(e.toCached()),bindFuture:t=>JE(e.bind((e=>e.fold((e=>Sk(on.error(e))),(e=>t(e)))))),bindResult:t=>JE(e.map((e=>e.bind(t)))),mapResult:t=>JE(e.map((e=>e.map(t)))),mapError:t=>JE(e.map((e=>e.mapError(t)))),foldResult:(t,o)=>e.map((e=>e.fold(t,o))),withTimeout:(t,o)=>JE(wk((n=>{let s=!1;const r=setTimeout((()=>{s=!0,n(on.error(o()))}),t);e.get((e=>{s||(clearTimeout(r),n(e))}))})))}),ZE=e=>JE(wk(e)),QE=ZE,eD=(e,t,o=[],n,s,r)=>{const a=t.fold((()=>({})),(e=>({action:e}))),i={buttonBehaviours:ql([fw((()=>!e.enabled||r.isDisabled())),pw(),xC.config({}),Vh("button press",[Zr("click"),Zr("mousedown")])].concat(o)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]},...a},l=wn(i,{dom:n});return wn(l,{components:s})},tD=(e,t,o,n=[])=>{const s={tag:"button",classes:["tox-tbtn"],attributes:e.tooltip.map((e=>({"aria-label":o.translate(e),title:o.translate(e)}))).getOr({})},r=e.icon.map((e=>zT(e,o.icons))),a=Cw([r]);return eD(e,t,n,s,a,o)},oD=e=>{switch(e){case"primary":return["tox-button"];case"toolbar":return["tox-tbtn"];default:return["tox-button","tox-button--secondary"]}},nD=(e,t,o,n=[],s=[])=>{const r=o.translate(e.text),a=e.icon.map((e=>zT(e,o.icons))),i=[a.getOrThunk((()=>Si(r)))],l=e.buttonType.getOr(e.primary||e.borderless?"primary":"secondary"),c=[...oD(l),...a.isSome()?["tox-button--icon"]:[],...e.borderless?["tox-button--naked"]:[],...s];return eD(e,t,n,{tag:"button",classes:c,attributes:{title:r}},i,o)},sD=(e,t,o,n=[],s=[])=>{const r=nD(e,D.some(t),o,n,s);return Bf.sketch(r)},rD=(e,t)=>o=>{"custom"===t?Gr(o,DC,{name:e,value:{}}):"submit"===t?jr(o,AC):"cancel"===t?jr(o,EC):console.error("Unknown button type: ",t)},aD=(e,t,o)=>{if(((e,t)=>"menu"===t)(0,t)){const t=()=>r,n=e,s={...e,type:"menubutton",search:D.none(),onSetup:t=>(t.setEnabled(e.enabled),b),fetch:TE(n.items,t,o)},r=Ff(_E(s,"tox-tbtn",o,D.none()));return r.asSpec()}if(((e,t)=>"custom"===t||"cancel"===t||"submit"===t)(0,t)){const n=rD(e.name,t),s={...e,borderless:!1};return sD(s,n,o.shared.providers,[])}if(((e,t)=>"togglebutton"===t)(0,t))return((e,t)=>{var o,n;const s=e.icon.map((e=>LT(e,t.icons))).map(Ff),r=e.buttonType.getOr(e.primary?"primary":"secondary"),a={...e,name:null!==(o=e.name)&&void 0!==o?o:"",primary:"primary"===r,tooltip:D.from(e.tooltip),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=oD(null!=r?r:"secondary"),c=e.icon.isSome()&&e.text.isSome(),d={tag:"button",classes:[...l.concat(e.icon.isSome()?["tox-button--icon"]:[]),...e.active?["tox-button--enabled"]:[],...c?["tox-button--icon-and-text"]:[]],attributes:i},u=t.translate(e.text.getOr("")),m=Si(u),g=[...Cw([s.map((e=>e.asSpec()))]),...e.text.isSome()?[m]:[]],p=eD(a,D.some((o=>{Gr(o,DC,{name:e.name,value:{setIcon:e=>{s.map((n=>n.getOpt(o).each((o=>{Nh.set(o,[LT(e,t.icons)])}))))}}})})),[],d,g,t);return Bf.sketch(p)})(e,o.shared.providers);throw console.error("Unknown footer button type: ",t),new Error("Unknown footer button type")},iD=(e,t)=>{const o=rD(e.name,"custom");return n=D.none(),s=bC.parts.field({factory:Bf,...nD(e,D.some(o),t,[oT(""),X_()])}),SC(n,s,[],[]);var n,s},lD={type:"separator"},cD=e=>({type:"menuitem",value:e.url,text:e.title,meta:{attach:e.attach},onAction:b}),dD=(e,t)=>({type:"menuitem",value:t,text:e,meta:{attach:void 0},onAction:b}),uD=(e,t)=>(e=>L(e,cD))(((e,t)=>U(t,(t=>t.type===e)))(e,t)),mD=e=>uD("header",e.targets),gD=e=>uD("anchor",e.targets),pD=e=>D.from(e.anchorTop).map((e=>dD("<top>",e))).toArray(),hD=e=>D.from(e.anchorBottom).map((e=>dD("<bottom>",e))).toArray(),fD=(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,s=null!==(t=e.value)&&void 0!==t?t:"";return Te(n.toLowerCase(),o)||Te(s.toLowerCase(),o)}))},bD=(e,t,o)=>{var n,s;const r=Ju.getValue(t),a=null!==(s=null===(n=null==r?void 0:r.meta)||void 0===n?void 0:n.text)&&void 0!==s?s:r.value;return o.getLinkInformation().fold((()=>[]),(t=>{const n=fD(a,(e=>L(e,(e=>dD(e,e))))(o.getHistory(e)));return"file"===e?(s=[n,fD(a,mD(t)),fD(a,q([pD(t),gD(t),hD(t)]))],j(s,((e,t)=>0===e.length||0===t.length?e.concat(t):e.concat(lD,t)),[])):n;var s}))},vD=ya("aria-invalid"),yD=(e,t)=>{e.dom.checked=t},xD=e=>e.dom.checked,wD=e=>(t,o,n,s)=>be(o,"name").fold((()=>e(o,s,D.none())),(r=>t.field(r,e(o,s,be(n,r))))),SD={bar:wD(((e,t)=>((e,t)=>({dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:L(e.items,t.interpreter)}))(e,t.shared))),collection:wD(((e,t,o)=>RC(e,t.shared.providers,o))),alertbanner:wD(((e,t)=>((e,t)=>{const o=zb(e.icon,t.icons);return gC.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"],innerHtml:e.url?void 0:o},components:e.url?[Bf.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:o,attributes:{title:t.translate(e.iconTooltip)}},action:t=>Gr(t,DC,{name:"alert-banner",value:e.url}),buttonBehaviours:ql([Lb()])})]:void 0},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:t.translate(e.text)}}]})})(e,t.shared.providers))),input:wD(((e,t,o)=>((e,t,o)=>lE({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:wD(((e,t,o)=>((e,t,o)=>lE({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:wD(((e,t)=>((e,t)=>{return{dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"label",classes:["tox-label",..."center"===e.align?["tox-label--center"]:[],..."end"===e.align?["tox-label--end"]:[]]},components:[Si(t.providers.translate(e.label))]},...L(e.items,t.interpreter)],behaviours:ql([X_(),Nh.config({}),(o=D.none(),tT(o,ua,ma)),Th.config({mode:"acyclic"})])};var o})(e,t.shared))),iframe:(e=>(t,o,n,s)=>{const r=wn(o,{source:"dynamic"});return wD(e)(t,r,n,s)})(((e,t,o)=>MT(e,t.shared.providers,o))),button:wD(((e,t)=>iD(e,t.shared.providers))),checkbox:wD(((e,t,o)=>((e,t,o)=>{const n=e=>(e.element.dom.click(),D.some(!0)),s=bC.parts.field({factory:{sketch:w},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:ql([X_(),xg.config({disabled:()=>!e.enabled||t.isDisabled(),onDisabled:e=>{st(e.element).each((e=>ti(e,"tox-checkbox--disabled")))},onEnabled:e=>{st(e.element).each((e=>ni(e,"tox-checkbox--disabled")))}}),xC.config({}),Uh.config({}),tT(o,xD,yD),Th.config({mode:"special",onEnter:n,onSpace:n,stopSpaceKeyup:!0}),Vh("checkbox-events",[Qr(dr(),((t,o)=>{Gr(t,_C,{name:e.name})}))])])}),r=bC.parts.label({dom:{tag:"span",classes:["tox-checkbox__label"]},components:[Si(t.translate(e.label))],behaviours:ql([$C.config({})])}),a=e=>Pb("checked"===e?"selected":"unselected",{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+e]},t.icons),i=Ff({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[a("checked"),a("unchecked")]});return bC.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[s,i.asSpec(),r],fieldBehaviours:ql([xg.config({disabled:()=>!e.enabled||t.isDisabled()}),pw()])})})(e,t.shared.providers,o))),colorinput:wD(((e,t,o)=>KC(e,t.shared,t.colorinput,o))),colorpicker:wD(((e,t,o)=>sT(0,t.shared.providers,o))),dropzone:wD(((e,t,o)=>iT(e,t.shared.providers,o))),grid:wD(((e,t)=>((e,t)=>({dom:{tag:"div",classes:["tox-form__grid",`tox-form__grid--${e.columns}col`]},components:L(e.items,t.interpreter)}))(e,t.shared))),listbox:wD(((e,t,o)=>((e,t,o)=>{const n=t.shared.providers,s=o.bind((t=>ZT(e.items,t))).orThunk((()=>oe(e.items).filter(XT))),r=e.label.map((e=>OC(e,n))),a=bC.parts.field({dom:{},factory:{sketch:o=>WT({uid:o.uid,text:s.map((e=>e.text)),icon:D.none(),tooltip:e.label,role:D.none(),fetch:(o,n)=>{const s=JT(o,e.name,e.items,Ju.getValue(o));n(YT(s,ny.CLOSE_ON_EXECUTE,t,{isHorizontalMenu:!1,search:D.none()}))},onSetup:x(b),getApi:x({}),columns:1,presets:"normal",classes:[],dropdownBehaviours:[xC.config({}),eT(s.map((e=>e.value)),(e=>Ot(e.element,KT)),((t,o)=>{ZT(e.items,o).each((e=>{kt(t.element,KT,e.value),Gr(t,PT,{text:e.text})}))}))]},"tox-listbox",t.shared)}}),i={dom:{tag:"div",classes:["tox-listboxfield"]},components:[a]};return bC.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:q([r.toArray(),[i]]),fieldBehaviours:ql([xg.config({disabled:x(!e.enabled),onDisabled:e=>{bC.getField(e).each(xg.disable)},onEnabled:e=>{bC.getField(e).each(xg.enable)}})])})})(e,t,o))),selectbox:wD(((e,t,o)=>((e,t,o)=>{const n=L(e.items,(e=>({text:t.translate(e.text),value:e.value}))),s=e.label.map((e=>OC(e,t))),r=bC.parts.field({dom:{},...o.map((e=>({data:e}))).getOr({}),selectAttributes:{size:e.size},options:n,factory:QT,selectBehaviours:ql([xg.config({disabled:()=>!e.enabled||t.isDisabled()}),xC.config({}),Vh("selectbox-change",[Qr(dr(),((t,o)=>{Gr(t,_C,{name:e.name})}))])])}),a=e.size>1?D.none():D.some(Pb("chevron-down",{tag:"div",classes:["tox-selectfield__icon-js"]},t.icons)),i={dom:{tag:"div",classes:["tox-selectfield"]},components:q([[r],a.toArray()])};return bC.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:q([s.toArray(),[i]]),fieldBehaviours:ql([xg.config({disabled:()=>!e.enabled||t.isDisabled(),onDisabled:e=>{bC.getField(e).each(xg.disable)},onEnabled:e=>{bC.getField(e).each(xg.enable)}}),pw()])})})(e,t.shared.providers,o))),sizeinput:wD(((e,t)=>((e,t)=>{let o=aE;const n=ya("ratio-event"),s=e=>Pb(e,{tag:"span",classes:["tox-icon","tox-lock-icon__"+e]},t.icons),r=nE.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:[s("lock"),s("unlock")],buttonBehaviours:ql([xg.config({disabled:()=>!e.enabled||t.isDisabled()}),pw(),xC.config({})])}),a=e=>({dom:{tag:"div",classes:["tox-form__group"]},components:e}),i=o=>bC.parts.field({factory:_y,inputClasses:["tox-textfield"],inputBehaviours:ql([xg.config({disabled:()=>!e.enabled||t.isDisabled()}),pw(),xC.config({}),Vh("size-input-events",[Qr(rr(),((e,t)=>{Gr(e,n,{isField1:o})})),Qr(dr(),((t,o)=>{Gr(t,_C,{name:e.name})}))])]),selectOnFocus:!1}),l=e=>({dom:{tag:"label",classes:["tox-label"]},components:[Si(t.translate(e))]}),c=nE.parts.field1(a([bC.parts.label(l("Width")),i(!0)])),d=nE.parts.field2(a([bC.parts.label(l("Height")),i(!1)]));return nE.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[c,d,a([l(" "),r])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:(e,t,n)=>{sE(Ju.getValue(e)).each((e=>{o(e).each((e=>{Ju.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:ql([xg.config({disabled:()=>!e.enabled||t.isDisabled(),onDisabled:e=>{nE.getField1(e).bind(bC.getField).each(xg.disable),nE.getField2(e).bind(bC.getField).each(xg.disable),nE.getLock(e).each(xg.disable)},onEnabled:e=>{nE.getField1(e).bind(bC.getField).each(xg.enable),nE.getField2(e).bind(bC.getField).each(xg.enable),nE.getLock(e).each(xg.enable)}}),pw(),Vh("size-input-events2",[Qr(n,((e,t)=>{const n=t.event.isField1,s=n?nE.getField1(e):nE.getField2(e),r=n?nE.getField2(e):nE.getField1(e),a=s.map(Ju.getValue).getOr(""),i=r.map(Ju.getValue).getOr("");o=iE(a,i)}))])])})})(e,t.shared.providers))),slider:wD(((e,t,o)=>((e,t,o)=>{const n=I_.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[Si(t.translate(e.label))]}),s=I_.parts.spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),r=I_.parts.thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return I_.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,s,r],sliderBehaviours:ql([X_(),Uh.config({})]),onChoose:(t,o,n)=>{Gr(t,_C,{name:e.name,value:n})}})})(e,t.shared.providers,o))),urlinput:wD(((e,t,o)=>((e,t,o,n)=>{const s=t.shared.providers,r=t=>{const n=Ju.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":vD,type:"url"},minChars:0,responseTime:0,fetch:n=>{const s=bD(e.filetype,n,o),r=YT(s,ny.BUBBLE_TO_SANDBOX,t,{isHorizontalMenu:!1,search:D.none()});return Sk(r)},getHotspot:e=>g.getOpt(e),onSetValue:(e,t)=>{e.hasConfigured(GC)&&GC.run(e).get(b)},typeaheadBehaviours:ql([...o.getValidationHandler().map((t=>GC.config({getRoot:e=>st(e.element),invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:(e,t)=>{c.getOpt(e).each((e=>{kt(e.element,"title",s.translate(t))}))}},validator:{validate:o=>{const n=Ju.getValue(o);return QE((o=>{t({type:e.filetype,url:n.value},(e=>{if("invalid"===e.status){const t=on.error(e.message);o(t)}else{const t=on.value(e.message);o(t)}}))}))},validateOnLoad:!1}}))).toArray(),xg.config({disabled:()=>!e.enabled||s.isDisabled()}),xC.config({}),Vh("urlinput-events",[Qr(cr(),(t=>{const o=ci(t.element),n=o.trim();n!==o&&di(t.element,n),"file"===e.filetype&&Gr(t,_C,{name:e.name})})),Qr(dr(),(t=>{Gr(t,_C,{name:e.name}),r(t)})),Qr(xr(),(t=>{Gr(t,_C,{name:e.name}),r(t)}))])]),eventOrder:{[cr()]:["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:wy(0,0,"normal")},onExecute:(e,t,o)=>{Gr(t,AC,{})},onItemExecute:(t,o,n,s)=>{r(t),Gr(t,_C,{name:e.name})}},i=bC.parts.field({...a,factory:KE}),l=e.label.map((e=>OC(e,s))),c=Ff(((e,t,o=e,n=e)=>Pb(o,{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+e],attributes:{title:s.translate(n),"aria-live":"polite",...t.fold((()=>({})),(e=>({id:e})))}},s.icons))("invalid",D.some(vD),"warning")),d=Ff({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[c.asSpec()]}),u=o.getUrlPicker(e.filetype),m=ya("browser.url.event"),g=Ff({dom:{tag:"div",classes:["tox-control-wrap"]},components:[i,d.asSpec()],behaviours:ql([xg.config({disabled:()=>!e.enabled||s.isDisabled()})])}),p=Ff(sD({name:e.name,icon:D.some("browse"),text:e.picker_text.or(e.label).getOr(""),enabled:e.enabled,primary:!1,buttonType:D.none(),borderless:!0},(e=>jr(e,m)),s,[],["tox-browse-url"]));return bC.sketch({dom:CC([]),components:l.toArray().concat([{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:q([[g.asSpec()],u.map((()=>p.asSpec())).toArray()])}]),fieldBehaviours:ql([xg.config({disabled:()=>!e.enabled||s.isDisabled(),onDisabled:e=>{bC.getField(e).each(xg.disable),p.getOpt(e).each(xg.disable)},onEnabled:e=>{bC.getField(e).each(xg.enable),p.getOpt(e).each(xg.enable)}}),pw(),Vh("url-input-events",[Qr(m,(t=>{ag.getCurrent(t).each((o=>{const n=Ju.getValue(o),s={fieldname:e.name,...n};u.each((n=>{n(s).get((n=>{Ju.setValue(o,n),Gr(t,_C,{name:e.name})}))}))}))}))])])})})(e,t,t.urlinput,o))),customeditor:wD((e=>{const t=Cc(),o=Ff({dom:{tag:e.tag}}),n=Cc();return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:ql([Vh("custom-editor-events",[ia((s=>{o.getOpt(s).each((o=>{((e=>ve(e,"init"))(e)?e.init(o.element.dom):rT.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)}))}))}))]),eT(D.none(),(()=>t.get().fold((()=>n.get().getOr("")),(e=>e.getValue()))),((e,o)=>{t.get().fold((()=>n.set(o)),(e=>e.setValue(o)))})),X_()]),components:[o.asSpec()]}})),htmlpanel:wD((e=>"presentation"===e.presets?gC.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:e.html}}):gC.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:e.html,attributes:{role:"document"}},containerBehaviours:ql([xC.config({}),Uh.config({})])}))),imagepreview:wD(((e,t,o)=>BT(e,o))),table:wD(((e,t)=>((e,t)=>{const o=e=>({dom:{tag:"th",innerHtml:t.translate(e)}}),n=e=>({dom:{tag:"td",innerHtml:t.translate(e)}}),s=e=>({dom:{tag:"tr"},components:L(e,n)});return{dom:{tag:"table",classes:["tox-dialog__table"]},components:[(a=e.header,{dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:L(a,o)}]}),(r=e.cells,{dom:{tag:"tbody"},components:L(r,s)})],behaviours:ql([xC.config({}),Uh.config({})])};var r,a})(e,t.shared.providers))),tree:wD(((e,t)=>((e,t)=>{const o=e.onLeafAction.getOr(b),n=e.onToggleExpand.getOr(b),s=e.defaultExpandedIds,r=Ns(s),a=Ns(e.defaultSelectedId),i=ya("tree-id"),l=(n,s)=>e.items.map((e=>"leaf"===e.type?AE({leaf:e,selectedId:n,onLeafAction:o,visible:!0,treeId:i,backstage:t}):NE({directory:e,selectedId:n,onLeafAction:o,expandedIds:s,labelTabstopping:!0,treeId:i,backstage:t})));return{dom:{tag:"div",classes:["tox-tree"],attributes:{role:"tree"}},components:l(a.get(),r.get()),behaviours:ql([Th.config({mode:"flow",selector:".tox-tree--leaf__label--visible, .tox-tree--directory__label--visible",cycles:!1}),Vh(VE,[Qr("expand-tree-node",((e,t)=>{const{expanded:o,node:s}=t.event;r.set(o?[...r.get(),s]:r.get().filter((e=>e!==s))),n(r.get(),{expanded:o,node:s})}))]),Ql.config({channels:{[`update-active-item-${i}`]:{onReceive:(e,t)=>{a.set(D.some(t.value)),Nh.set(e,l(D.some(t.value),r.get()))}}}}),Nh.config({})])}})(e,t))),panel:wD(((e,t)=>((e,t)=>({dom:{tag:"div",classes:e.classes},components:L(e.items,t.shared.interpreter)}))(e,t)))},kD={field:(e,t)=>t,record:x([])},CD=(e,t,o,n)=>{const s=wn(n,{shared:{interpreter:t=>OD(e,t,o,s)}});return OD(e,t,o,s)},OD=(e,t,o,n)=>be(SD,t.type).fold((()=>(console.error(`Unknown factory type "${t.type}", defaulting to container: `,t),t)),(s=>s(e,t,o,n))),_D=(e,t,o)=>OD(kD,e,t,o),TD="layout-inset",ED=e=>e.x,DD=(e,t)=>e.x+e.width/2-t.width/2,AD=(e,t)=>e.x+e.width-t.width,MD=e=>e.y,BD=(e,t)=>e.y+e.height-t.height,ID=(e,t)=>e.y+e.height/2-t.height/2,FD=(e,t,o)=>il(AD(e,t),BD(e,t),o.insetSouthwest(),ml(),"southwest",yl(e,{right:0,bottom:3}),TD),RD=(e,t,o)=>il(ED(e),BD(e,t),o.insetSoutheast(),ul(),"southeast",yl(e,{left:1,bottom:3}),TD),ND=(e,t,o)=>il(AD(e,t),MD(e),o.insetNorthwest(),dl(),"northwest",yl(e,{right:0,top:2}),TD),VD=(e,t,o)=>il(ED(e),MD(e),o.insetNortheast(),cl(),"northeast",yl(e,{left:1,top:2}),TD),zD=(e,t,o)=>il(DD(e,t),MD(e),o.insetNorth(),gl(),"north",yl(e,{top:2}),TD),LD=(e,t,o)=>il(DD(e,t),BD(e,t),o.insetSouth(),pl(),"south",yl(e,{bottom:3}),TD),HD=(e,t,o)=>il(AD(e,t),ID(e,t),o.insetEast(),fl(),"east",yl(e,{right:0}),TD),PD=(e,t,o)=>il(ED(e),ID(e,t),o.insetWest(),hl(),"west",yl(e,{left:1}),TD),UD=e=>{switch(e){case"north":return zD;case"northeast":return VD;case"northwest":return ND;case"south":return LD;case"southeast":return RD;case"southwest":return FD;case"east":return HD;case"west":return PD}},WD=(e,t,o,n,s)=>yc(n).map(UD).getOr(zD)(e,t,o,n,s),jD=e=>{switch(e){case"north":return LD;case"northeast":return RD;case"northwest":return FD;case"south":return zD;case"southeast":return VD;case"southwest":return ND;case"east":return PD;case"west":return HD}},GD=(e,t,o,n,s)=>yc(n).map(jD).getOr(zD)(e,t,o,n,s),$D={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},qD=(e,t,o)=>{const n={maxHeightFunction:Lc()};return()=>o()?{type:"node",root:ht(pt(e())),node:D.from(e()),bubble:Wc(12,12,$D),layouts:{onRtl:()=>[VD],onLtr:()=>[ND]},overrides:n}:{type:"hotspot",hotspot:t(),bubble:Wc(-12,12,$D),layouts:{onRtl:()=>[Tl,El,Bl],onLtr:()=>[El,Tl,Bl]},overrides:n}},YD=(e,t,o,n)=>{const s={maxHeightFunction:Lc()};return()=>n()?{type:"node",root:ht(pt(t())),node:D.from(t()),bubble:Wc(12,12,$D),layouts:{onRtl:()=>[zD],onLtr:()=>[zD]},overrides:s}:e?{type:"node",root:ht(pt(t())),node:D.from(t()),bubble:Wc(0,-jt(t()),$D),layouts:{onRtl:()=>[Ml],onLtr:()=>[Ml]},overrides:s}:{type:"hotspot",hotspot:o(),bubble:Wc(0,0,$D),layouts:{onRtl:()=>[Ml],onLtr:()=>[Ml]},overrides:s}},XD=(e,t,o)=>()=>o()?{type:"node",root:ht(pt(e())),node:D.from(e()),layouts:{onRtl:()=>[zD],onLtr:()=>[zD]}}:{type:"hotspot",hotspot:t(),layouts:{onRtl:()=>[Bl],onLtr:()=>[Bl]}},KD=(e,t)=>()=>({type:"selection",root:t(),getSelection:()=>{const t=e.selection.getRng(),o=e.model.table.getSelectedCells();if(o.length>1){const e=o[0],t=o[o.length-1],n={firstCell:Re.fromDom(e),lastCell:Re.fromDom(t)};return D.some(n)}return D.some(fd.range(Re.fromDom(t.startContainer),t.startOffset,Re.fromDom(t.endContainer),t.endOffset))}}),JD=e=>t=>({type:"node",root:e(),node:t}),ZD=(e,t,o,n)=>{const s=$v(e),r=()=>Re.fromDom(e.getBody()),a=()=>Re.fromDom(e.getContentAreaContainer()),i=()=>s||!n();return{inlineDialog:qD(a,t,i),inlineBottomDialog:YD(e.inline,a,o,i),banner:XD(a,t,i),cursor:KD(e,r),node:JD(r)}},QD=e=>(t,o)=>{XS(e)(t,o)},eA=e=>()=>FS(e),tA=e=>t=>AS(e,t),oA=e=>t=>IS(e,t),nA=e=>()=>_v(e),sA=e=>ye(e,"items"),rA=e=>ye(e,"format"),aA=[{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"}]}],iA=e=>j(e,((e,t)=>{if(ve(t,"items")){const o=iA(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-${r(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:[]}),lA=e=>rv(e).map((t=>{const o=((e,t)=>{const o=iA(t),n=t=>{H(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 av(e)?aA.concat(o):o})).getOr(aA),cA=(e,t,o)=>({...e,type:"formatter",isSelected:t(e.format),getStylePreview:o(e.format)}),dA=(e,t,o,n)=>{const s=t=>L(t,(t=>sA(t)?(e=>{const t=s(e.items);return{...e,type:"submenu",getStyleItems:x(t)}})(t):rA(t)?(e=>cA(e,o,n))(t):(e=>{const t=ae(e);return 1===t.length&&R(t,"title")})(t)?{...t,type:"separator"}:(t=>{const s=r(t.name)?t.name:ya(t.title),a=`custom-${s}`,i={...t,type:"formatter",format:a,isSelected:o(a),getStylePreview:n(a)};return e.formatter.register(s,i),i})(t)));return s(t)},uA=aT.trim,mA=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},gA=mA("true"),pA=mA("false"),hA=(e,t,o,n,s)=>({type:e,title:t,url:o,level:n,attach:s}),fA=e=>e.innerText||e.textContent,bA=e=>(e=>e&&"A"===e.nodeName&&void 0!==(e.id||e.name))(e)&&yA(e),vA=e=>e&&/^(H[1-6])$/.test(e.nodeName),yA=e=>(e=>{let t=e;for(;t=t.parentNode;){const e=t.contentEditable;if(e&&"inherit"!==e)return gA(t)}return!1})(e)&&!pA(e),xA=e=>vA(e)&&yA(e),wA=e=>{var t;const o=(e=>e.id?e.id:ya("h"))(e);return hA("header",null!==(t=fA(e))&&void 0!==t?t:"","#"+o,(e=>vA(e)?parseInt(e.nodeName.substr(1),10):0)(e),(()=>{e.id=o}))},SA=e=>{const t=e.id||e.name,o=fA(e);return hA("anchor",o||"#"+t,"#"+t,0,b)},kA=e=>{const t=(o="h1,h2,h3,h4,h5,h6,a:not([href])",n=e,L(Od(Re.fromDom(n),o),(e=>e.dom)));var o,n;return t},CA=e=>uA(e.title).length>0,OA=e=>{const t=kA(e);return U((e=>L(U(e,xA),wA))(t).concat((e=>L(U(e,bA),SA))(t)),CA)},_A="tinymce-url-history",TA=e=>r(e)&&/^https?/.test(e),EA=e=>a(e)&&he(e,(e=>{return!(l(t=e)&&t.length<=5&&X(t,TA));var t})).isNone(),DA=()=>{const e=bS.getItem(_A);if(null===e)return{};let t;try{t=JSON.parse(e)}catch(e){if(e instanceof SyntaxError)return console.log("Local storage "+_A+" was not valid JSON",e),{};throw e}return EA(t)?t:(console.log("Local storage "+_A+" was not valid format",t),{})},AA=e=>{const t=DA();return be(t,e).getOr([])},MA=(e,t)=>{if(!TA(e))return;const o=DA(),n=be(o,t).getOr([]),s=U(n,(t=>t!==e));o[t]=[e].concat(s).slice(0,5),(e=>{if(!EA(e))throw new Error("Bad format for history:\n"+JSON.stringify(e));bS.setItem(_A,JSON.stringify(e))})(o)},BA=e=>!!e,IA=e=>ce(aT.makeMap(e,/[, ]/),BA),FA=e=>D.from(yv(e)),RA=(e,t)=>{const o=(e=>{const t=D.from(Sv(e)).filter(BA).map(IA);return FA(e).fold(T,(e=>t.fold(E,(e=>ae(e).length>0&&e))))})(e);return d(o)?o?FA(e):D.none():o[t]?FA(e):D.none()},NA=e=>D.from(e).filter(r).getOrUndefined(),VA=e=>({getHistory:AA,addToHistory:MA,getLinkInformation:()=>(e=>kv(e)?D.some({targets:OA(e.getBody()),anchorTop:NA(Cv(e)),anchorBottom:NA(Ov(e))}):D.none())(e),getValidationHandler:()=>(e=>D.from(xv(e)))(e),getUrlPicker:t=>((e,t)=>RA(e,t).map((o=>n=>wk((s=>{const i={filetype:t,fieldname:n.fieldname,...D.from(n.meta).getOr({})};o.call(e,((e,t)=>{if(!r(e))throw new Error("Expected value to be string");if(void 0!==t&&!a(t))throw new Error("Expected meta to be a object");s({value:e,meta:t})}),n.value,i)})))))(e,t)}),zA=(e,t,o,n)=>{const s=Ns(!1),r=(e=>{const t=Ns(jv(e)?"bottom":"top");return{isPositionedAtTop:()=>"top"===t.get(),getDockingMode:t.get,setDockingMode:t.set}})(t),a={icons:()=>t.ui.registry.getAll().icons,menuItems:()=>t.ui.registry.getAll().menuItems,translate:Bb.translate,isDisabled:()=>t.mode.isReadOnly()||!t.ui.isEnabled(),getOption:t.options.get},i=VA(t),l=(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=Ns([]),s=Ns([]),r=Ns(!1);return e.on("PreInit",(s=>{const r=lA(e),a=dA(e,r,t,o);n.set(a)})),e.on("addStyleModifications",(n=>{const a=dA(e,n.items,t,o);s.set(a),r.set(n.replace)})),{getData:()=>{const e=r.get()?[]:n.get(),t=s.get();return e.concat(t)}}})(t),c=(e=>({colorPicker:QD(e),hasCustomColors:eA(e),getColors:tA(e),getColorCols:oA(e)}))(t),d=(e=>({isDraggableModal:nA(e)}))(t),u={shared:{providers:a,anchors:ZD(t,o,n,r.isPositionedAtTop),header:r},urlinput:i,styles:l,colorinput:c,dialog:d,isContextMenuOpen:()=>s.get(),setContextMenuState:e=>s.set(e)},m={...u,shared:{...u.shared,interpreter:e=>_D(e,{},m),getSink:e.popup}},g={...u,shared:{...u.shared,interpreter:e=>_D(e,{},g),getSink:e.dialog}};return{popup:m,dialog:g}},LA=Xm,HA=Bm,PA=x([Ts("shell",!1),ds("makeItem"),Ts("setupItem",b),tm("listBehaviours",[Nh])]),UA=Dm({name:"items",overrides:()=>({behaviours:ql([Nh.config({})])})}),WA=x([UA]),jA=og({name:x("CustomList")(),configFields:PA(),partFields:WA(),factory:(e,t,o,n)=>{const s=e.shell?{behaviours:[Nh.config({})],components:[]}:{behaviours:[],components:t},r=t=>e.shell?D.some(t):Pm(t,e,"items");return{uid:e.uid,dom:e.dom,components:s.components,behaviours:em(e.listBehaviours,s.behaviours),apis:{setItems:(t,o)=>{r(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 s=Nh.contents(n),r=o.length,a=r-s.length,i=a>0?V(a,(()=>e.makeItem())):[],l=s.slice(r);H(l,(e=>Nh.remove(n,e))),H(i,(e=>Nh.append(n,e)));const c=Nh.contents(n);H(c,((n,s)=>{e.setupItem(t,n,o[s],s)}))}))}}}},apis:{setItems:(e,t,o)=>{e.setItems(t,o)}}}),GA=x([ds("dom"),Ts("shell",!0),Zu("toolbarBehaviours",[Nh])]),$A=x([Dm({name:"groups",overrides:()=>({behaviours:ql([Nh.config({})])})})]),qA=og({name:"Toolbar",configFields:GA(),partFields:$A(),factory:(e,t,o,n)=>{const s=t=>e.shell?D.some(t):Pm(t,e,"groups"),r=e.shell?{behaviours:[Nh.config({})],components:[]}:{behaviours:[],components:t};return{uid:e.uid,dom:e.dom,components:r.components,behaviours:em(e.toolbarBehaviours,r.behaviours),apis:{setGroups:(e,t)=>{s(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=>{Nh.set(e,t)}))},refresh:b},domModification:{attributes:{role:"group"}}}},apis:{setGroups:(e,t,o)=>{e.setGroups(t,o)}}}),YA=b,XA=T,KA=x([]);var JA=Object.freeze({__proto__:null,setup:YA,isDocked:XA,getBehaviours:KA});const ZA=e=>(xe(Nt(e,"position"),"fixed")?D.none():rt(e)).orThunk((()=>{const t=Re.fromTag("span");return nt(e).bind((e=>{No(e,t);const o=rt(t);return Lo(t),o}))})),QA=e=>ZA(e).map(Yt).getOrThunk((()=>$t(0,0))),eM=(e,t)=>{const o=e.element;ti(o,t.transitionClass),ni(o,t.fadeOutClass),ti(o,t.fadeInClass),t.onShow(e)},tM=(e,t)=>{const o=e.element;ti(o,t.transitionClass),ni(o,t.fadeInClass),ti(o,t.fadeOutClass),t.onHide(e)},oM=(e,t)=>e.y>=t.y,nM=(e,t)=>e.bottom<=t.bottom,sM=(e,t,o)=>({location:"top",leftX:t,topY:o.bounds.y-e.y}),rM=(e,t,o)=>({location:"bottom",leftX:t,bottomY:e.bottom-o.bounds.bottom}),aM=e=>e.box.x-e.win.x,iM=(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 $t(e.bounds.x,o)})(o,t);return{box:Yo(n.left,n.top,Jt(e),Wt(e)),location:o.location}})),lM=(e,t,o,n,s)=>{const r=((e,t)=>{const o=t.optScrollEnv.fold(x(e.y),(t=>e.y+t.currentScrollTop-t.scrollElmTop));return $t(e.x,o)})(t,o),a=Yo(r.left,r.top,t.width,t.height);n.setInitialPos({style:Vt(e),position:Ft(e,"position")||"static",bounds:a,location:s.location})},cM=(e,t,o)=>o.getInitialPos().bind((n=>{var s;switch(o.clearInitialPos(),n.position){case"static":return D.some({morph:"static"});case"absolute":const o=ZA(e).getOr(xt()),r=Xo(o),a=null!==(s=o.dom.scrollTop)&&void 0!==s?s:0;return D.some({morph:"absolute",positionCss:ic("absolute",be(n.style,"left").map((e=>t.x-r.x)),be(n.style,"top").map((e=>t.y-r.y+a)),be(n.style,"right").map((e=>r.right-t.right)),be(n.style,"bottom").map((e=>r.bottom-t.bottom)))});default:return D.none()}})),dM=(e,t,o)=>iM(e,t,o).filter((({box:e})=>((e,t,o)=>X(e,(e=>{switch(e){case"bottom":return nM(t,o.bounds);case"top":return oM(t,o.bounds)}})))(o.getModes(),e,t))).bind((({box:t})=>cM(e,t,o))),uM=e=>{switch(e.location){case"top":return D.some({morph:"fixed",positionCss:ic("fixed",D.some(e.leftX),D.some(e.topY),D.none(),D.none())});case"bottom":return D.some({morph:"fixed",positionCss:ic("fixed",D.some(e.leftX),D.none(),D.none(),D.some(e.bottomY))});default:return D.none()}},mM=(e,t,o)=>{const n=Xo(e),s=Zo(),r=((e,t,o)=>{const n=t.win,s=t.box,r=aM(t);return re(e,(e=>{switch(e){case"bottom":return nM(s,o.bounds)?D.none():D.some(rM(n,r,o));case"top":return oM(s,o.bounds)?D.none():D.some(sM(n,r,o));default:return D.none()}})).getOr({location:"no-dock"})})(o.getModes(),{win:s,box:n},t);return"top"===r.location||"bottom"===r.location?(lM(e,n,t,o,r),uM(r)):D.none()},gM=(e,t,o)=>{const n=e.element;return xe(Nt(n,"position"),"fixed")?((e,t,o)=>dM(e,t,o).orThunk((()=>t.optScrollEnv.bind((n=>iM(e,t,o))).bind((({box:e,location:o})=>{const n=Zo(),s=aM({win:n,box:e}),r="top"===o?sM(n,s,t):rM(n,s,t);return uM(r)})))))(n,t,o):mM(n,t,o)},pM=(e,t,o,n)=>{const s=Xo(e),r=Zo(),a=n(r,aM({win:r,box:s}),t);return"bottom"===a.location||"top"===a.location?(((e,t,o,n,s)=>{n.getInitialPos().fold((()=>lM(e,t,o,n,s)),(()=>b))})(e,s,t,o,a),uM(a)):D.none()},hM=(e,t,o)=>{o.setDocked(!1),H(["left","right","top","bottom","position"],(t=>Lt(e.element,t))),t.onUndocked(e)},fM=(e,t,o,n)=>{const s="fixed"===n.position;o.setDocked(s),lc(e.element,n);(s?t.onDocked:t.onUndocked)(e)},bM=(e,t,o,n,s=!1)=>{t.contextual.each((t=>{t.lazyContext(e).each((r=>{const a=((e,t)=>e.y<t.bottom&&e.bottom>t.y)(r,n.bounds);if(a!==o.isVisible())if(o.setVisible(a),s&&!a)ai(e.element,[t.fadeOutClass]),t.onHide(e);else{(a?eM:tM)(e,t)}}))}))},vM=(e,t,o,n,s)=>{bM(e,t,o,n,!0),fM(e,t,o,s.positionCss)},yM=(e,t,o)=>{const n=t.lazyViewport(e);bM(e,t,o,n),gM(e,n,o).each((s=>{((e,t,o,n,s)=>{switch(s.morph){case"static":return hM(e,t,o);case"absolute":return fM(e,t,o,s.positionCss);case"fixed":vM(e,t,o,n,s)}})(e,t,o,n,s)}))},xM=(e,t,o)=>{const n=e.element;o.setDocked(!1);const s=t.lazyViewport(e);((e,t,o)=>{const n=e.element;return iM(n,t,o).bind((({box:e})=>cM(n,e,o)))})(e,s,o).each((n=>{switch(n.morph){case"static":hM(e,t,o);break;case"absolute":fM(e,t,o,n.positionCss)}})),o.setVisible(!0),t.contextual.each((t=>{ii(n,[t.fadeInClass,t.fadeOutClass,t.transitionClass]),t.onShow(e)})),wM(e,t,o)},wM=(e,t,o)=>{e.getSystem().isConnected()&&yM(e,t,o)},SM=(e,t,o)=>{o.isDocked()&&xM(e,t,o)},kM=e=>(t,o,n)=>{const s=o.lazyViewport(t);pM(t.element,s,n,e).each((e=>{vM(t,o,n,s,e)}))},CM=kM(sM),OM=kM(rM);var _M=Object.freeze({__proto__:null,refresh:wM,reset:SM,isDocked:(e,t,o)=>o.isDocked(),getModes:(e,t,o)=>o.getModes(),setModes:(e,t,o,n)=>o.setModes(n),forceDockToTop:CM,forceDockToBottom:OM});var TM=Object.freeze({__proto__:null,events:(e,t)=>Kr([aa(gr(),((o,n)=>{e.contextual.each((e=>{if(ri(o.element,e.transitionClass)){ii(o.element,[e.transitionClass,e.fadeInClass]);(t.isVisible()?e.onShown:e.onHidden)(o)}n.stop()}))})),Qr(Mr(),((o,n)=>{wM(o,e,t)})),Qr(Lr(),((o,n)=>{wM(o,e,t)})),Qr(Br(),((o,n)=>{SM(o,e,t)}))])}),EM=[_s("contextual",[gs("fadeInClass"),gs("fadeOutClass"),gs("transitionClass"),hs("lazyContext"),el("onShow"),el("onShown"),el("onHide"),el("onHidden")]),Is("lazyViewport",(()=>({bounds:Zo(),optScrollEnv:D.none()}))),Fs("modes",["top","bottom"],$n),el("onDocked"),el("onUndocked")];const DM=Xl({fields:EM,name:"docking",active:TM,apis:_M,state:Object.freeze({__proto__:null,init:e=>{const t=Ns(!1),o=Ns(!0),n=Cc(),s=Ns(e.modes);return Va({isDocked:t.get,setDocked:t.set,getInitialPos:n.get,setInitialPos:n.set,clearInitialPos:n.clear,isVisible:o.get,setVisible:o.set,getModes:s.get,setModes:s.set,readState:()=>`docked: ${t.get()}, visible: ${o.get()}, modes: ${s.get().join(",")}`})}})}),AM=x(ya("toolbar-height-change")),MM={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},BM="tox-tinymce--toolbar-sticky-on",IM="tox-tinymce--toolbar-sticky-off",FM=(e,t)=>R(DM.getModes(e),t),RM=e=>{const t=e.element;st(t).each((o=>{const n="padding-"+DM.getModes(e)[0];if(DM.isDocked(e)){const e=Jt(o);Mt(t,"width",e+"px"),Mt(o,n,(e=>jt(e)+(parseInt(Ft(e,"margin-top"),10)||0)+(parseInt(Ft(e,"margin-bottom"),10)||0))(t)+"px")}else Lt(t,"width"),Lt(o,n)}))},NM=(e,t)=>{t?(ni(e,MM.fadeOutClass),ai(e,[MM.transitionClass,MM.fadeInClass])):(ni(e,MM.fadeInClass),ai(e,[MM.fadeOutClass,MM.transitionClass]))},VM=(e,t)=>{const o=Re.fromDom(e.getContainer());t?(ti(o,BM),ni(o,IM)):(ti(o,IM),ni(o,BM))},zM=(e,t)=>{const o=Cc(),n=t.getSink,s=e=>{n().each((t=>e(t.element)))},r=t=>{e.inline||RM(t),VM(e,DM.isDocked(t)),t.getSystem().broadcastOn([Iu()],{}),n().each((e=>e.getSystem().broadcastOn([Iu()],{})))},a=e.inline?[]:[Ql.config({channels:{[AM()]:{onReceive:RM}}})];return[Uh.config({}),DM.config({contextual:{lazyContext:t=>{const o=jt(t.element),n=e.inline?e.getContentAreaContainer():e.getContainer();return D.from(n).map((n=>{const s=Xo(Re.fromDom(n));return Zk(e,t.element).fold((()=>{const e=s.height-o,n=s.y+(FM(t,"top")?0:o);return Yo(s.x,n,s.width,e)}),(e=>{const n=Jo(s,Qk(e)),r=FM(t,"top")?n.y:n.y+o;return Yo(n.x,r,n.width,n.height-o)}))}))},onShow:()=>{s((e=>NM(e,!0)))},onShown:e=>{s((e=>ii(e,[MM.transitionClass,MM.fadeInClass]))),o.get().each((t=>{((e,t)=>{const o=Qe(t);sc(o).filter((e=>!Je(t,e))).filter((t=>Je(t,Re.fromDom(o.dom.body))||Ze(e,t))).each((()=>tc(t)))})(e.element,t),o.clear()}))},onHide:e=>{((e,t)=>rc(e).orThunk((()=>t().toOptional().bind((e=>rc(e.element))))))(e.element,n).fold(o.clear,o.set),s((e=>NM(e,!1)))},onHidden:()=>{s((e=>ii(e,[MM.transitionClass])))},...MM},lazyViewport:t=>Zk(e,t.element).fold((()=>{const o=Zo(),n=fv(e),s=o.y+(FM(t,"top")?n:0),r=o.height-(FM(t,"bottom")?n:0);return{bounds:Yo(o.x,s,o.width,r),optScrollEnv:D.none()}}),(e=>({bounds:Qk(e),optScrollEnv:D.some({currentScrollTop:e.element.dom.scrollTop,scrollElmTop:Yt(e.element).top})}))),modes:[t.header.getDockingMode()],onDocked:r,onUndocked:r}),...a]};var LM=Object.freeze({__proto__:null,setup:(e,t,o)=>{e.inline||(t.header.isPositionedAtTop()||e.on("ResizeEditor",(()=>{o().each(DM.reset)})),e.on("ResizeWindow ResizeEditor",(()=>{o().each(RM)})),e.on("SkinLoaded",(()=>{o().each((e=>{DM.isDocked(e)?DM.reset(e):DM.refresh(e)}))})),e.on("FullscreenStateChanged",(()=>{o().each(DM.reset)}))),e.on("AfterScrollIntoView",(e=>{o().each((t=>{DM.refresh(t);const o=t.element;xp(o)&&((e,t)=>{const o=Qe(t),n=ot(t).dom.innerHeight,s=Ho(o),r=Re.fromDom(e.elm),a=Ko(r),i=Wt(r),l=a.y,c=l+i,d=Yt(t),u=Wt(t),m=d.top,g=m+u,p=Math.abs(m-s.top)<2,h=Math.abs(g-(s.top+n))<2;if(p&&l<g)Po(s.left,l-u,o);else if(h&&c>m){const e=l-n+i+u;Po(s.left,e,o)}})(e,o)}))})),e.on("PostRender",(()=>{VM(e,!1)}))},isDocked:e=>e().map(DM.isDocked).getOr(!1),getBehaviours:zM});const HM=zn([jy,us("items",Hn([Un([Gy,vs("items",$n)]),$n]))].concat(xx)),PM=[Ss("text"),Ss("tooltip"),Ss("icon"),Es("search",!1,Hn([qn,zn([Ss("placeholder")])],(e=>d(e)?e?D.some({placeholder:D.none()}):D.none():D.some(e)))),hs("fetch"),Is("onSetup",(()=>b))],UM=zn([jy,...PM]),WM=e=>ts("menubutton",UM,e),jM=zn([jy,rx,sx,nx,lx,Jy,tx,Ms("presets","normal",["normal","color","listpreview"]),gx(1),Qy,ex]);var GM=tg({factory:(e,t)=>{const o={focus:Th.focusIn,setMenus:(e,o)=>{const n=L(o,(e=>{const o={type:"menubutton",text:e.text,fetch:t=>{t(e.getItems())}},n=WM(o).mapError((e=>ss(e))).getOrDie();return _E(n,"tox-mbtn",t.backstage,D.some("menuitem"))}));Nh.set(e,n)}};return{uid:e.uid,dom:e.dom,components:[],behaviours:ql([Nh.config({}),Vh("menubar-events",[ia((t=>{e.onSetup(t)})),Qr(sr(),((e,t)=>{Fi(e.element,".tox-mbtn--active").each((o=>{Ri(t.event.target,".tox-mbtn").each((t=>{Je(o,t)||e.getSystem().getByDom(o).each((o=>{e.getSystem().getByDom(t).each((e=>{Vk.expand(e),Vk.close(o),Uh.focus(e)}))}))}))}))})),Qr(Vr(),((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=>{Vk.isOpen(o)&&(Vk.expand(e),Vk.close(o))}))}))}))]),Th.config({mode:"flow",selector:".tox-mbtn",onEscape:t=>(e.onEscape(t),D.some(!0))}),xC.config({})]),apis:o,domModification:{attributes:{role:"menubar"}}}},name:"silver.Menubar",configFields:[ds("dom"),ds("uid"),ds("onEscape"),ds("backstage"),Ts("onSetup",b)],apis:{focus:(e,t)=>{e.focus(t)},setMenus:(e,t,o)=>{e.setMenus(t,o)}}});const $M="container",qM=[Zu("slotBehaviours",[])],YM=e=>"<alloy.field."+e+">",XM=(e,t)=>{const o=t=>Gm(e),n=(t,o)=>(n,s)=>Pm(n,e,s).map((e=>t(e,s))).getOr(o),s=(e,t)=>"true"!==Ot(e.element,"aria-hidden"),r=n(s,!1),a=n(((e,t)=>{if(s(e)){const o=e.element;Mt(o,"display","none"),kt(o,"aria-hidden","true"),Gr(e,zr(),{name:t,visible:!1})}})),i=(e=>(t,o)=>{H(o,(o=>e(t,o)))})(a),l=n(((e,t)=>{if(!s(e)){const o=e.element;Lt(o,"display"),Et(o,"aria-hidden"),Gr(e,zr(),{name:t,visible:!0})}})),c={getSlotNames:o,getSlot:(t,o)=>Pm(t,e,o),isShowing:r,hideSlot:a,hideAllSlots:e=>i(e,o()),showSlot:l};return{uid:e.uid,dom:e.dom,components:t,behaviours:Qu(e.slotBehaviours),apis:c}},KM=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=>Ra(e))),JM={...KM,sketch:e=>{const t=(()=>{const e=[];return{slot:(t,o)=>(e.push(t),Nm($M,YM(t),o)),record:x(e)}})(),o=e(t),n=t.record(),s=L(n,(e=>Tm({name:e,pname:YM(e)})));return Jm($M,qM,s,XM,o)}},ZM=zn([sx,rx,Is("onShow",b),Is("onHide",b),tx]),QM=e=>({element:()=>e.element.dom}),eB=(e,t)=>{const o=L(ae(t),(e=>{const o=t[e],n=os((e=>ts("sidebar",ZM,e))(o));return{name:e,getApi:QM,onSetup:n.onSetup,onShow:n.onShow,onHide:n.onHide}}));return L(o,(t=>{const n=Ns(b);return e.slot(t.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:Qx([xw(t,n),ww(t,n),Qr(zr(),((e,t)=>{const n=t.event,s=G(o,(e=>e.name===n.name));s.each((t=>{(n.visible?t.onShow:t.onHide)(t.getApi(e))}))}))])})}))},tB=e=>JM.sketch((t=>({dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:eB(t,e),slotBehaviours:Qx([ia((e=>JM.hideAllSlots(e)))])}))),oB=(e,t)=>{kt(e,"role",t)},nB=e=>ag.getCurrent(e).bind((e=>{if(CE.isGrowing(e)||CE.hasGrown(e)){return ag.getCurrent(e).bind((e=>G(JM.getSlotNames(e),(t=>JM.isShowing(e,t)))))}return D.none()})),sB=ya("FixSizeEvent"),rB=ya("AutoSizeEvent");var aB=Object.freeze({__proto__:null,block:(e,t,o,n)=>{kt(e.element,"aria-busy",!0);const s=t.getRoot(e).getOr(e),r=ql([Th.config({mode:"special",onTab:()=>D.some(!0),onShiftTab:()=>D.some(!0)}),Uh.config({})]),a=n(s,r),i=s.getSystem().build(a);Nh.append(s,Ti(i)),i.hasConfigured(Th)&&t.focus&&Th.focusIn(i),o.isBlocked()||t.onBlock(e),o.blockWith((()=>Nh.remove(s,i)))},unblock:(e,t,o)=>{Et(e.element,"aria-busy"),o.isBlocked()&&t.onUnblock(e),o.clear()},isBlocked:(e,t,o)=>o.isBlocked()}),iB=[Is("getRoot",D.none),Bs("focus",!0),el("onBlock"),el("onUnblock")];const lB=Xl({fields:iB,name:"blocking",apis:aB,state:Object.freeze({__proto__:null,init:()=>{const e=Sc((e=>e.destroy()));return Va({readState:e.isSet,blockWith:t=>{e.set({destroy:t})},clear:e.clear,isBlocked:e.isSet})}})}),cB=e=>ag.getCurrent(e).each((e=>tc(e.element,!0))),dB=(e,t,o,n)=>{const s=t.element;if(((e,t)=>{const o="tabindex",n="data-mce-tabindex";D.from(e.iframeElement).map(Re.fromDom).each((e=>{t?(_t(e,o).each((t=>kt(e,n,t))),kt(e,o,-1)):(Et(e,o),_t(e,n).each((t=>{kt(e,o,t),Et(e,n)})))}))})(e,o),o)lB.block(t,(e=>(t,o)=>({dom:{tag:"div",attributes:{"aria-label":e.translate("Loading..."),tabindex:"0"},classes:["tox-throbber__busy-spinner"]},components:[{dom:If('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}))(n)),Lt(s,"display"),Et(s,"aria-hidden"),e.hasFocus()&&cB(t);else{const o=ag.getCurrent(t).exists((e=>nc(e.element)));lB.unblock(t),Mt(s,"display","none"),kt(s,"aria-hidden","true"),o&&e.focus()}},uB=(e,t,o)=>{const n=Ns(!1),s=Cc(),r=o=>{n.get()&&!(e=>{if((e=>"focusin"===e.type)(e))return(e.composed?oe(e.composedPath()):D.from(e.target)).map(Re.fromDom).filter(je).exists((e=>ri(e,"mce-pastebin")));return!1})(o)&&(o.preventDefault(),cB(t()),e.editorManager.setActive(e))};e.inline||e.on("PreInit",(()=>{e.dom.bind(e.getWin(),"focusin",r),e.on("BeforeExecCommand",(e=>{"mcefocus"===e.command.toLowerCase()&&!0!==e.value&&r(e)}))}));const a=s=>{s!==n.get()&&(n.set(s),dB(e,t(),s,o.providers),((e,t)=>{e.dispatch("AfterProgressState",{state:t})})(e,s))};e.on("ProgressState",(t=>{if(s.on(clearTimeout),h(t.time)){const o=Mf.setEditorTimeout(e,(()=>a(t.state)),t.time);s.set(o)}else a(t.state),s.clear()}))},mB=(e,t,o)=>({within:e,extra:t,withinWidth:o}),gB=(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})})),s=U(n,(e=>e.finish<=t)),r=W(s,((e,t)=>e+t.width),0);return{within:s,extra:n.slice(s.length),withinWidth:r}},pB=e=>L(e,(e=>e.element)),hB=(e,t,o,n)=>{const s=((e,t,o)=>{const n=gB(t,e,o);return 0===n.extra.length?D.some(n):D.none()})(e,t,o).getOrThunk((()=>gB(t,e-o(n),o))),r=s.within,a=s.extra,i=s.withinWidth;return 1===a.length&&a[0].width<=o(n)?((e,t,o)=>{const n=pB(e.concat(t));return mB(n,[],o)})(r,a,i):a.length>=1?((e,t,o,n)=>{const s=pB(e).concat([o]);return mB(s,pB(t),n)})(r,a,n,i):((e,t,o)=>mB(pB(e),[],o))(r,0,i)},fB=(e,t)=>{const o=L(t,(e=>Ti(e)));qA.setGroups(e,o)},bB=(e,t,o)=>{const n=t.builtGroups.get();if(0===n.length)return;const s=Um(e,t,"primary"),r=fk.getCoupled(e,"overflowGroup");Mt(s.element,"visibility","hidden");const a=n.concat([r]),i=re(a,(e=>rc(e.element).bind((t=>e.getSystem().getByDom(t).toOptional()))));o([]),fB(s,a);const l=Jt(s.element),c=hB(l,t.builtGroups.get(),(e=>Jt(e.element)),r);0===c.extra.length?(Nh.remove(s,r),o([])):(fB(s,c.within),o(c.extra)),Lt(s.element,"visibility"),Ht(s.element),i.each(Uh.focus)},vB=x([Zu("splitToolbarBehaviours",[fk]),ls("builtGroups",(()=>Ns([])))]),yB=x([Zi(["overflowToggledClass"]),Cs("getOverflowBounds"),ds("lazySink"),ls("overflowGroups",(()=>Ns([]))),el("onOpened"),el("onClosed")].concat(vB())),xB=x([Tm({factory:qA,schema:GA(),name:"primary"}),Em({schema:GA(),name:"overflow"}),Em({name:"overflow-button"}),Em({name:"overflow-group"})]),wB=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"]);Mt(e,"max-width",o+"px")})(e,Math.floor(t))})),SB=x([Zi(["toggledClass"]),ds("lazySink"),hs("fetch"),Cs("getBounds"),_s("fireDismissalEventInstead",[Ts("event",Rr())]),Jc(),el("onToggled")]),kB=x([Em({name:"button",overrides:e=>({dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:ql([Kh.config({toggleClass:e.markers.toggledClass,aria:{mode:"expanded"},toggleOnExecute:!1,onToggled:e.onToggled})])})}),Em({factory:qA,schema:GA(),name:"toolbar",overrides:e=>({toolbarBehaviours:ql([Th.config({mode:"cyclic",onEscape:t=>(Pm(t,e,"button").each(Uh.focus),D.none())})])})})]),CB=Cc(),OB=(e,t)=>{const o=fk.getCoupled(e,"toolbarSandbox");Mu.isOpen(o)?Mu.close(o):Mu.open(o,t.toolbar())},_B=(e,t,o,n)=>{const s=o.getBounds.map((e=>e())),r=o.lazySink(e).getOrDie();su.positionWithinBounds(r,t,{anchor:{type:"hotspot",hotspot:e,layouts:n,overrides:{maxWidthFunction:wB()}}},s)},TB=(e,t,o,n,s)=>{qA.setGroups(t,s),_B(e,t,o,n),Kh.on(e)},EB=og({name:"FloatingToolbarButton",factory:(e,t,o,n)=>({...Bf.sketch({...n.button(),action:e=>{OB(e,n)},buttonBehaviours:om({dump:n.button().buttonBehaviours},[fk.config({others:{toolbarSandbox:t=>((e,t,o)=>{const n=Vi();return{dom:{tag:"div",attributes:{id:n.id}},behaviours:ql([Th.config({mode:"special",onEscape:e=>(Mu.close(e),D.some(!0))}),Mu.config({onOpen:(s,r)=>{const a=CB.get().getOr(!1);o.fetch().get((s=>{TB(e,r,o,t.layouts,s),n.link(e.element),a||Th.focusIn(r)}))},onClose:()=>{Kh.off(e),CB.get().getOr(!1)||Uh.focus(e),n.unlink(e.element)},isPartOf:(t,o,n)=>Li(o,n)||Li(e,n),getAttachPoint:()=>o.lazySink(e).getOrDie()}),Ql.config({channels:{...Nu({isExtraPart:T,...o.fireDismissalEventInstead.map((e=>({fireEventInstead:{event:e.event}}))).getOr({})}),...zu({doReposition:()=>{Mu.getState(fk.getCoupled(e,"toolbarSandbox")).each((n=>{_B(e,n,o,t.layouts)}))}})}})])}})(t,o,e)}})])}),apis:{setGroups:(t,n)=>{Mu.getState(fk.getCoupled(t,"toolbarSandbox")).each((s=>{TB(t,s,e,o.layouts,n)}))},reposition:t=>{Mu.getState(fk.getCoupled(t,"toolbarSandbox")).each((n=>{_B(t,n,e,o.layouts)}))},toggle:e=>{OB(e,n)},toggleWithoutFocusing:e=>{((e,t)=>{CB.set(!0),OB(e,t),CB.clear()})(e,n)},getToolbar:e=>Mu.getState(fk.getCoupled(e,"toolbarSandbox")),isOpen:e=>Mu.isOpen(fk.getCoupled(e,"toolbarSandbox"))}}),configFields:SB(),partFields:kB(),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)}}),DB=x([ds("items"),Zi(["itemSelector"]),Zu("tgroupBehaviours",[Th])]),AB=x([Am({name:"items",unit:"item"})]),MB=og({name:"ToolbarGroup",configFields:DB(),partFields:AB(),factory:(e,t,o,n)=>({uid:e.uid,dom:e.dom,components:t,behaviours:em(e.tgroupBehaviours,[Th.config({mode:"flow",selector:e.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}})}),BB=e=>L(e,(e=>Ti(e))),IB=(e,t,o)=>{bB(e,o,(n=>{o.overflowGroups.set(n),t.getOpt(e).each((e=>{EB.setGroups(e,BB(n))}))}))},FB=og({name:"SplitFloatingToolbar",configFields:yB(),partFields:xB(),factory:(e,t,o,n)=>{const s=Ff(EB.sketch({fetch:()=>wk((t=>{t(BB(e.overflowGroups.get()))})),layouts:{onLtr:()=>[El,Tl],onRtl:()=>[Tl,El],onBottomLtr:()=>[Al,Dl],onBottomRtl:()=>[Dl,Al]},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:em(e.splitToolbarBehaviours,[fk.config({others:{overflowGroup:()=>MB.sketch({...n["overflow-group"](),items:[s.asSpec()]})}})]),apis:{setGroups:(t,o)=>{e.builtGroups.set(L(o,t.getSystem().build)),IB(t,s,e)},refresh:t=>IB(t,s,e),toggle:e=>{s.getOpt(e).each((e=>{EB.toggle(e)}))},toggleWithoutFocusing:e=>{s.getOpt(e).each(EB.toggleWithoutFocusing)},isOpen:e=>s.getOpt(e).map(EB.isOpen).getOr(!1),reposition:e=>{s.getOpt(e).each((e=>{EB.reposition(e)}))},getOverflow:e=>s.getOpt(e).bind(EB.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)}}),RB=x([Zi(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),el("onOpened"),el("onClosed")].concat(vB())),NB=x([Tm({factory:qA,schema:GA(),name:"primary"}),Tm({factory:qA,schema:GA(),name:"overflow",overrides:e=>({toolbarBehaviours:ql([CE.config({dimension:{property:"height"},closedClass:e.markers.closedClass,openClass:e.markers.openClass,shrinkingClass:e.markers.shrinkingClass,growingClass:e.markers.growingClass,onShrunk:t=>{Pm(t,e,"overflow-button").each((e=>{Kh.off(e),Uh.focus(e)})),e.onClosed(t)},onGrown:t=>{Th.focusIn(t),e.onOpened(t)},onStartGrow:t=>{Pm(t,e,"overflow-button").each(Kh.on)}}),Th.config({mode:"acyclic",onEscape:t=>(Pm(t,e,"overflow-button").each(Uh.focus),D.some(!0))})])})}),Em({name:"overflow-button",overrides:e=>({buttonBehaviours:ql([Kh.config({toggleClass:e.markers.overflowToggledClass,aria:{mode:"pressed"},toggleOnExecute:!1})])})}),Em({name:"overflow-group"})]),VB=(e,t)=>{Pm(e,t,"overflow-button").bind((()=>Pm(e,t,"overflow"))).each((o=>{zB(e,t),CE.toggleGrow(o)}))},zB=(e,t)=>{Pm(e,t,"overflow").each((o=>{bB(e,t,(e=>{const t=L(e,(e=>Ti(e)));qA.setGroups(o,t)})),Pm(e,t,"overflow-button").each((e=>{CE.hasGrown(o)&&Kh.on(e)})),CE.refresh(o)}))},LB=og({name:"SplitSlidingToolbar",configFields:RB(),partFields:NB(),factory:(e,t,o,n)=>{const s="alloy.toolbar.toggle";return{uid:e.uid,dom:e.dom,components:t,behaviours:em(e.splitToolbarBehaviours,[fk.config({others:{overflowGroup:e=>MB.sketch({...n["overflow-group"](),items:[Bf.sketch({...n["overflow-button"](),action:t=>{jr(e,s)}})]})}}),Vh("toolbar-toggle-events",[Qr(s,(t=>{VB(t,e)}))])]),apis:{setGroups:(t,o)=>{((t,o)=>{const n=L(o,t.getSystem().build);e.builtGroups.set(n)})(t,o),zB(t,e)},refresh:t=>zB(t,e),toggle:t=>VB(t,e),isOpen:t=>((e,t)=>Pm(e,t,"overflow").map(CE.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)}}),HB=e=>{const t=e.title.fold((()=>({})),(e=>({attributes:{title:e}})));return{dom:{tag:"div",classes:["tox-toolbar__group"],...t},components:[MB.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:ql([xC.config({}),Uh.config({})])}},PB=e=>MB.sketch(HB(e)),UB=(e,t)=>{const o=ia((t=>{const o=L(e.initGroups,PB);qA.setGroups(t,o)}));return ql([vw(e.providers.isDisabled),pw(),Th.config({mode:t,onEscape:e.onEscape,selector:".tox-toolbar__group"}),Vh("toolbar-events",[o])])},WB=e=>{const t=e.cyclicKeying?"cyclic":"acyclic";return{uid:e.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":HB({title:D.none(),items:[]}),"overflow-button":tD({name:"more",icon:D.some("more-drawer"),enabled:!0,tooltip:D.some("Reveal or hide additional toolbar items"),primary:!1,buttonType:D.none(),borderless:!1},D.none(),e.providers)},splitToolbarBehaviours:UB(e,t)}},jB=e=>{const t=WB(e),o=FB.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return FB.sketch({...t,lazySink:e.getSink,getOverflowBounds:()=>{const t=e.moreDrawerData.lazyHeader().element,o=Ko(t),n=tt(t),s=Ko(n),r=Math.max(n.dom.scrollHeight,s.height);return Yo(o.x+4,s.y,o.width-8,r)},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)})},GB=e=>{const t=LB.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),o=LB.parts.overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),n=WB(e);return LB.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([AM()],{type:"opened"}),e.onToggled(t,!0)},onClosed:t=>{t.getSystem().broadcastOn([AM()],{type:"closed"}),e.onToggled(t,!1)}})},$B=e=>{const t=e.cyclicKeying?"cyclic":"acyclic";return qA.sketch({uid:e.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(e.type===jb.scrolling?["tox-toolbar--scrolling"]:[])},components:[qA.parts.groups({})],toolbarBehaviours:UB(e,t)})},qB=[nx,sx,Ss("tooltip"),Ms("buttonType","secondary",["primary","secondary"]),Bs("borderless",!1),hs("onAction")],YB={button:[...qB,qy,ps("type",["button"])],togglebutton:[...qB,Bs("active",!1),ps("type",["togglebutton"])]},XB=[ps("type",["group"]),Fs("buttons",[],rs("type",YB))],KB=rs("type",{...YB,group:XB}),JB=zn([Fs("buttons",[],KB),hs("onShow"),hs("onHide")]),ZB=(e,t)=>((e,t)=>{var o,n;const s="togglebutton"===e.type,r=e.icon.map((e=>LT(e,t.icons))).map(Ff),a=o=>{const n=e=>{r.map((n=>n.getOpt(o).each((o=>{Nh.set(o,[LT(e,t.icons)])}))))},a=e=>{const t=o.element;e?(ti(t,"tox-button--enabled"),kt(t,"aria-pressed",!0)):(ni(t,"tox-button--enabled"),Et(t,"aria-pressed"))},i=()=>ri(o.element,"tox-button--enabled");return s?e.onAction({setIcon:n,setActive:a,isActive:i}):"button"===e.type?e.onAction({setIcon:n}):void 0},i={...e,name:s?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=oD(null!==(n=e.buttonType)&&void 0!==n?n:"secondary"),c=s?e.text.map(t.translate):D.some(t.translate(e.text)),d=c.map(Si),u=i.tooltip.or(c).map((e=>({"aria-label":t.translate(e),title:t.translate(e)}))).getOr({}),m=r.map((e=>e.asSpec())),g=Cw([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=eD(i,D.some(a),[],h,g,t);return Bf.sketch(f)})(e,t),QB=Do().deviceType,eI=QB.isPhone(),tI=QB.isTablet();var oI=og({name:"silver.View",configFields:[ds("viewConfig")],partFields:[Dm({factory:{sketch:e=>{let t=!1;const o=L(e.buttons,(o=>"group"===o.type?(t=!0,((e,t)=>({dom:{tag:"div",classes:["tox-view__toolbar__group"]},components:L(e.buttons,(e=>ZB(e,t)))}))(o,e.providers)):ZB(o,e.providers)));return{uid:e.uid,dom:{tag:"div",classes:[t?"tox-view__toolbar":"tox-view__header",...eI||tI?["tox-view--mobile","tox-view--scrolling"]:[]]},behaviours:ql([Uh.config({}),Th.config({mode:"flow",selector:"button, .tox-button",focusInside:ep.OnEnterOrSpaceMode})]),components:t?o:[gC.sketch({dom:{tag:"div",classes:["tox-view__header-start"]},components:[]}),gC.sketch({dom:{tag:"div",classes:["tox-view__header-end"]},components:o})]}}},schema:[ds("buttons"),ds("providers")],name:"header"}),Dm({factory:{sketch:e=>({uid:e.uid,dom:{tag:"div",classes:["tox-view__pane"]}})},schema:[],name:"pane"})],factory:(e,t,o,n)=>{const s={getPane:t=>LA.getPart(t,e,"pane"),getOnShow:t=>e.viewConfig.onShow,getOnHide:t=>e.viewConfig.onHide};return{uid:e.uid,dom:e.dom,components:t,apis:s}},apis:{getPane:(e,t)=>e.getPane(t),getOnShow:(e,t)=>e.getOnShow(t),getOnHide:(e,t)=>e.getOnHide(t)}});const nI=(e,t,o)=>pe(t,((t,n)=>{const s=os(ts("view",JB,t));return e.slot(n,oI.sketch({dom:{tag:"div",classes:["tox-view"]},viewConfig:s,components:[...s.buttons.length>0?[oI.parts.header({buttons:s.buttons,providers:o})]:[],oI.parts.pane({})]}))})),sI=(e,t)=>JM.sketch((o=>({dom:{tag:"div",classes:["tox-view-wrap__slot-container"]},components:nI(o,e,t),slotBehaviours:Qx([ia((e=>JM.hideAllSlots(e)))])}))),rI=e=>G(JM.getSlotNames(e),(t=>JM.isShowing(e,t))),aI=(e,t,o)=>{JM.getSlot(e,t).each((e=>{oI.getPane(e).each((t=>{var n;o(e)((n=t.element.dom,{getContainer:x(n)}))}))}))};var iI=tg({factory:(e,t)=>{const o={setViews:(e,o)=>{Nh.set(e,[sI(o,t.backstage.shared.providers)])},whichView:e=>ag.getCurrent(e).bind(rI),toggleView:(e,t,o,n)=>ag.getCurrent(e).exists((s=>{const r=rI(s),a=r.exists((e=>n===e)),i=JM.getSlot(s,n).isSome();return i&&(JM.hideAllSlots(s),a?((e=>{const t=e.element;Mt(t,"display","none"),kt(t,"aria-hidden","true")})(e),t()):(o(),(e=>{const t=e.element;Lt(t,"display"),Et(t,"aria-hidden")})(e),JM.showSlot(s,n),((e,t)=>{aI(e,t,oI.getOnShow)})(s,n)),r.each((e=>((e,t)=>aI(e,t,oI.getOnHide))(s,e)))),i}))};return{uid:e.uid,dom:{tag:"div",classes:["tox-view-wrap"],attributes:{"aria-hidden":"true"},styles:{display:"none"}},components:[],behaviours:ql([Nh.config({}),ag.config({find:e=>{const t=Nh.contents(e);return oe(t)}})]),apis:o}},name:"silver.ViewWrapper",configFields:[ds("backstage")],apis:{setViews:(e,t,o)=>e.setViews(t,o),toggleView:(e,t,o,n,s)=>e.toggleView(t,o,n,s),whichView:(e,t)=>e.whichView(t)}});const lI=HA.optional({factory:GM,name:"menubar",schema:[ds("backstage")]}),cI=HA.optional({factory:{sketch:e=>jA.sketch({uid:e.uid,dom:e.dom,listBehaviours:ql([Th.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:()=>$B({type:e.type,uid:ya("multiple-toolbar-item"),cyclicKeying:!1,initGroups:[],providers:e.providers,onEscape:()=>(e.onEscape(),D.some(!0))}),setupItem:(e,t,o,n)=>{qA.setGroups(t,o)},shell:!0})},name:"multiple-toolbar",schema:[ds("dom"),ds("onEscape")]}),dI=HA.optional({factory:{sketch:e=>{const t=(e=>e.type===jb.sliding?GB:e.type===jb.floating?jB:$B)(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:[ds("dom"),ds("onEscape"),ds("getSink")]}),uI=HA.optional({factory:{sketch:e=>{const t=e.editor,o=e.sticky?zM:KA;return{uid:e.uid,dom:e.dom,components:e.components,behaviours:ql(o(t,e.sharedBackstage))}}},name:"header",schema:[ds("dom")]}),mI=HA.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:[ds("dom")]}),gI=HA.optional({name:"socket",schema:[ds("dom")]}),pI=HA.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:ql([xC.config({}),Uh.config({}),CE.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=>{ag.getCurrent(e).each(JM.hideAllSlots),jr(e,rB)},onGrown:e=>{jr(e,rB)},onStartGrow:e=>{Gr(e,sB,{width:Nt(e.element,"width").getOr("")})},onStartShrink:e=>{Gr(e,sB,{width:Jt(e.element)+"px"})}}),Nh.config({}),ag.config({find:e=>{const t=Nh.contents(e);return oe(t)}})])}],behaviours:ql([J_(0),Vh("sidebar-sliding-events",[Qr(sB,((e,t)=>{Mt(e.element,"width",t.event.width)})),Qr(rB,((e,t)=>{Lt(e.element,"width")}))])])})},name:"sidebar",schema:[ds("dom")]}),hI=HA.optional({factory:{sketch:e=>({uid:e.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:ql([Nh.config({}),lB.config({focus:!1}),ag.config({find:e=>oe(e.components())})]),components:[]})},name:"throbber",schema:[ds("dom")]}),fI=HA.optional({factory:iI,name:"viewWrapper",schema:[ds("backstage")]}),bI=HA.optional({factory:{sketch:e=>({uid:e.uid,dom:{tag:"div",classes:["tox-editor-container"]},components:e.components})},name:"editorContainer",schema:[]});var vI=og({name:"OuterContainer",factory:(e,t,o)=>{let n=!1;const s={getSocket:t=>LA.getPart(t,e,"socket"),setSidebar:(t,o,n)=>{LA.getPart(t,e,"sidebar").each((e=>((e,t,o)=>{ag.getCurrent(e).each((n=>{Nh.set(n,[tB(t)]);const s=null==o?void 0:o.toLowerCase();r(s)&&ve(t,s)&&ag.getCurrent(n).each((t=>{JM.showSlot(t,s),CE.immediateGrow(n),Lt(n.element,"width"),oB(e.element,"region")}))}))})(e,o,n)))},toggleSidebar:(t,o)=>{LA.getPart(t,e,"sidebar").each((e=>((e,t)=>{ag.getCurrent(e).each((o=>{ag.getCurrent(o).each((n=>{CE.hasGrown(o)?JM.isShowing(n,t)?(CE.shrink(o),oB(e.element,"presentation")):(JM.hideAllSlots(n),JM.showSlot(n,t),oB(e.element,"region")):(JM.hideAllSlots(n),JM.showSlot(n,t),CE.grow(o),oB(e.element,"region"))}))}))})(e,o)))},whichSidebar:t=>LA.getPart(t,e,"sidebar").bind(nB).getOrNull(),getHeader:t=>LA.getPart(t,e,"header"),getToolbar:t=>LA.getPart(t,e,"toolbar"),setToolbar:(t,o)=>{LA.getPart(t,e,"toolbar").each((e=>{const t=L(o,PB);e.getApis().setGroups(e,t)}))},setToolbars:(t,o)=>{LA.getPart(t,e,"multiple-toolbar").each((e=>{const t=L(o,(e=>L(e,PB)));jA.setItems(e,t)}))},refreshToolbar:t=>{LA.getPart(t,e,"toolbar").each((e=>e.getApis().refresh(e)))},toggleToolbarDrawer:t=>{LA.getPart(t,e,"toolbar").each((e=>{ke(e.getApis().toggle,(t=>t(e)))}))},toggleToolbarDrawerWithoutFocusing:t=>{LA.getPart(t,e,"toolbar").each((e=>{ke(e.getApis().toggleWithoutFocusing,(t=>t(e)))}))},isToolbarDrawerToggled:t=>LA.getPart(t,e,"toolbar").bind((e=>D.from(e.getApis().isOpen).map((t=>t(e))))).getOr(!1),getThrobber:t=>LA.getPart(t,e,"throbber"),focusToolbar:t=>{LA.getPart(t,e,"toolbar").orThunk((()=>LA.getPart(t,e,"multiple-toolbar"))).each((e=>{Th.focusIn(e)}))},setMenubar:(t,o)=>{LA.getPart(t,e,"menubar").each((e=>{GM.setMenus(e,o)}))},focusMenubar:t=>{LA.getPart(t,e,"menubar").each((e=>{GM.focus(e)}))},setViews:(t,o)=>{LA.getPart(t,e,"viewWrapper").each((e=>{iI.setViews(e,o)}))},toggleView:(t,o)=>LA.getPart(t,e,"viewWrapper").exists((e=>iI.toggleView(e,(()=>s.showMainView(t)),(()=>s.hideMainView(t)),o))),whichView:t=>LA.getPart(t,e,"viewWrapper").bind(iI.whichView).getOrNull(),hideMainView:t=>{n=s.isToolbarDrawerToggled(t),n&&s.toggleToolbarDrawer(t),LA.getPart(t,e,"editorContainer").each((e=>{const t=e.element;Mt(t,"display","none"),kt(t,"aria-hidden","true")}))},showMainView:t=>{n&&s.toggleToolbarDrawer(t),LA.getPart(t,e,"editorContainer").each((e=>{const t=e.element;Lt(t,"display"),Et(t,"aria-hidden")}))}};return{uid:e.uid,dom:e.dom,components:t,apis:s,behaviours:e.behaviours}},configFields:[ds("dom"),ds("behaviours")],partFields:[uI,lI,dI,cI,gI,pI,mI,hI,fI,bI],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 yI={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 accordion | 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:"aidialog aishortcuts | 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"}},xI=e=>e.split(" "),wI=(e,t)=>{const o={...yI,...t.menus},n=ae(t.menus).length>0,s=void 0===t.menubar||!0===t.menubar?xI("file edit view insert format tools table help"):xI(!1===t.menubar?"":t.menubar),a=U(s,(e=>{const o=ve(yI,e);return n?o||be(t.menus,e).exists((e=>ve(e,"items"))):o})),i=L(a,(n=>{const s=o[n];return((e,t,o)=>{const n=cv(o).split(/[ ,]/);return{text:e.title,getItems:()=>Y(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:s.title,items:xI(s.items)},t,e)}));return U(i,(e=>e.getItems().length>0&&N(e.getItems(),(e=>r(e)||"separator"!==e.type))))},SI=(e,t,o)=>(e.on("remove",(()=>o.unload(t))),o.load(t)),kI=(e,t,o,n)=>(e.on("remove",(()=>n.unloadRawCss(t))),n.loadRawCss(t,o)),CI=async(e,t)=>{const o="ui/"+Lv(e).getOr("default")+"/skin.css",n=tinymce.Resource.get(o);if(r(n))return Promise.resolve(kI(e,o,n,e.ui.styleSheetLoader));return SI(e,t+"/skin.min.css",e.ui.styleSheetLoader)},OI=async(e,t)=>{var o;if(o=Re.fromDom(e.getElement()),ft(o).isSome()){const o=t+"/skin.shadowdom.css",n=tinymce.Resource.get(o);if(r(n))return kI(e,o,n,$b.DOM.styleSheetLoader),Promise.resolve();return SI(e,t+"/skin.shadowdom.min.css",$b.DOM.styleSheetLoader)}},_I=(e,t)=>(async(e,t)=>{Lv(t).fold((()=>{const o=zv(t);o&&t.contentCSS.push(o+(e?"/content.inline":"/content")+".min.css")}),(o=>{const n="ui/"+o+(e?"/content.inline":"/content")+".css",s=tinymce.Resource.get(n);if(r(s))kI(t,n,s,t.ui.styleSheetLoader);else{const o=zv(t);o&&t.contentCSS.push(o+(e?"/content.inline":"/content")+".min.css")}}));const o=zv(t);if(!Nv(t)&&r(o))return Promise.all([CI(t,o),OI(t,o)]).then()})(e,t).then((e=>{const t=()=>{e._skinLoaded=!0,(e=>{e.dispatch("SkinLoaded")})(e)};return()=>{e.initialized?t():e.on("init",t)}})(t),((e,t)=>()=>((e,t)=>{e.dispatch("SkinLoadError",t)})(e,{message:t}))(t,"Skin could not be loaded")),TI=k(_I,!1),EI=k(_I,!0),DI=(e,t,o)=>e.translate([t,e.translate(o)]),AI=(e,t,o)=>{const n=(e,n,r,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=Y(e.getStyleItems(),(e=>s(e,n,a)));return 0===n&&t.length<=0?D.none():D.some({type:"nestedmenuitem",text:i,enabled:t.length>0,getSubmenuItems:()=>Y(e.getStyleItems(),(e=>s(e,n,a)))})}return D.some({type:"togglemenuitem",text:i,icon:e.icon,active:e.isSelected(a),enabled:!r,onAction:o.onAction(e),...e.getStylePreview().fold((()=>({})),(e=>({meta:{style:e}})))})},s=(e,t,s)=>{const r="formatter"===e.type&&o.isInvalid(e);return 0===t?r?[]:n(e,t,!1,s).toArray():n(e,t,r,s).toArray()},r=e=>{const t=o.getCurrentValue(),n=o.shouldHide?0:1;return Y(e,(e=>s(e,n,t)))};return{validateItems:r,getFetch:(e,t)=>(o,n)=>{const s=t(),a=r(s);n(YT(a,ny.CLOSE_ON_EXECUTE,e,{isHorizontalMenu:!1,search:D.none()}))}}},MI=(e,t,o)=>{const n=o.dataset,s="basic"===n.type?()=>L(n.data,(e=>cA(e,o.isSelectedFor,o.getPreviewFor))):n.getData;return{items:AI(0,t,o),getStyleItems:s}},BI=(e,t,o,n,s)=>{const{items:r,getStyleItems:a}=MI(0,t,o);return WT({text:o.icon.isSome()?D.none():o.text,icon:o.icon,tooltip:D.from(o.tooltip),role:D.none(),fetch:r.getFetch(t,a),onSetup:t=>{const r=o=>t.setTooltip(DI(e,n,o.value));return e.on(s,r),uS(pS(e,"NodeChange",(t=>{const n=t.getComponent();o.updateText(n),xg.set(t.getComponent(),!e.selection.isEditable())}))(t),(()=>e.off(s,r)))},getApi:e=>({getComponent:x(e),setTooltip:o=>{const n=t.shared.providers.translate(o);Ct(e.element,{"aria-label":n,title:n})}}),columns:1,presets:"normal",classes:o.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[]},"tox-tbtn",t.shared)};var II;!function(e){e[e.SemiColon=0]="SemiColon",e[e.Space=1]="Space"}(II||(II={}));const FI=(e,t,o)=>{const n=(e=>L(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===II.SemiColon?e.replace(/;$/,"").split(";"):e.split(" "))(e.options.get(t),o));return{type:"basic",data:n}},RI="Alignment {0}",NI="left",VI=[{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"}],zI=e=>{const t={type:"basic",data:VI};return{tooltip:DI(e,RI,NI),text:D.none(),icon:D.some("align-left"),isSelectedFor:t=>()=>e.formatter.match(t),getCurrentValue:D.none,getPreviewFor:e=>D.none,onAction:t=>()=>G(VI,(e=>e.format===t.format)).each((t=>e.execCommand(t.command))),updateText:t=>{const o=G(VI,(t=>e.formatter.match(t.format))),n=o.fold(x(NI),(e=>e.title.toLowerCase()));Gr(t,UT,{icon:`align-${n}`}),((e,t)=>{e.dispatch("AlignTextUpdate",t)})(e,{value:n})},dataset:t,shouldHide:!1,isInvalid:t=>!e.formatter.canApply(t.format)}},LI=(e,t)=>{const o=t(),n=L(o,(e=>e.format));return D.from(e.formatter.closest(n)).bind((e=>G(o,(t=>t.format===e)))).orThunk((()=>Ce(e.formatter.match("p"),{title:"Paragraph",format:"p"})))},HI="Block {0}",PI="Paragraph",UI=e=>{const t=FI(e,"block_formats",II.SemiColon);return{tooltip:DI(e,HI,PI),text:D.some(PI),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:hS(e),updateText:o=>{const n=LI(e,(()=>t.data)).fold(x(PI),(e=>e.title));Gr(o,PT,{text:n}),((e,t)=>{e.dispatch("BlocksTextUpdate",t)})(e,{value:n})},dataset:t,shouldHide:!1,isInvalid:t=>!e.formatter.canApply(t.format)}},WI="Font {0}",jI="System Font",GI=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],$I=e=>{const t=e.split(/\s*,\s*/);return L(t,(e=>e.replace(/^['"]+|['"]+$/g,"")))},qI=(e,t)=>t.length>0&&X(t,(t=>e.indexOf(t.toLowerCase())>-1)),YI=e=>{const t=()=>{const t=e=>e?$I(e)[0]:"",n=e.queryCommandValue("FontName"),s=o.data,r=n?n.toLowerCase():"",a=Rv(e),i=G(s,(e=>{const o=e.format;return o.toLowerCase()===r||t(o).toLowerCase()===t(r).toLowerCase()})).orThunk((()=>Ce(((e,t)=>{if(0===e.indexOf("-apple-system")||t.length>0){const o=$I(e.toLowerCase());return qI(o,GI)||qI(o,t)}return!1})(r,a),{title:jI,format:r})));return{matchOpt:i,font:n}},o=FI(e,"font_family_formats",II.SemiColon);return{tooltip:DI(e,WI,jI),text:D.some(jI),icon:D.none(),isSelectedFor:e=>t=>t.exists((t=>t.format===e)),getCurrentValue:()=>{const{matchOpt:e}=t();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:o=>{const{matchOpt:n,font:s}=t(),r=n.fold(x(s),(e=>e.title));Gr(o,PT,{text:r}),((e,t)=>{e.dispatch("FontFamilyTextUpdate",t)})(e,{value:r})},dataset:o,shouldHide:!1,isInvalid:T}},XI={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:[""]},KI=(()=>{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})`})(.*)$`)})(),JI=(e,t)=>D.from(KI.exec(e)).bind((e=>{const o=Number(e[1]),n=e[2];return((e,t)=>N(t,(t=>N(XI[t],(t=>e===t)))))(n,t)?D.some({value:o,unit:n}):D.none()})),ZI={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)},QI=(e,t,o)=>{let n=D.none();const s=pS(e,"NodeChange SwitchMode",(t=>{const s=t.getComponent();n=D.some(s),o.updateInputValue(s),xg.set(s,!e.selection.isEditable())})),r=e=>({getComponent:x(e)}),a=Ns(b),i=ya("custom-number-input-events"),l=(e,t,s)=>{const r=n.map((e=>Ju.getValue(e))).getOr("");const a=o.getNewValue(r,e),i=r.length-`${a}`.length,l=n.map((e=>e.element.dom.selectionStart-i)),c=n.map((e=>e.element.dom.selectionEnd-i));o.onAction(a,s),n.each((e=>{Ju.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=>st(e.element).fold(D.none,(e=>(tc(e),D.some(!0)))),m=e=>nc(e.element)?(lt(e.element).each((e=>tc(e))),D.some(!0)):D.none(),g=(o,n,s,a)=>{const i=Ns(b),l=t.shared.providers.translate(s),c=ya("altExecuting"),d=pS(e,"NodeChange SwitchMode",(t=>{xg.set(t.getComponent(),!e.selection.isEditable())})),u=e=>{xg.isDisabled(e)||o(!0)};return Bf.sketch({dom:{tag:"button",attributes:{title:l,"aria-label":l},classes:a.concat(n)},components:[zT(n,t.shared.providers.icons)],buttonBehaviours:ql([xg.config({}),Vh(c,[xw({onSetup:d,getApi:r},i),ww({getApi:r},i),Qr(ir(),((e,t)=>{t.event.raw.keyCode!==ZI.space()&&t.event.raw.keyCode!==ZI.enter()||xg.isDisabled(e)||o(!1)})),Qr(ur(),u),Qr(Zs(),u)])]),eventOrder:{[ir()]:[c,"keying"],[ur()]:[c,"alloy.base.behaviour"],[Zs()]:[c,"alloy.base.behaviour"]}})},p=Ff(g((e=>c(!1,e)),"minus","Decrease font size",[])),h=Ff(g((e=>d(!1,e)),"plus","Increase font size",[])),f=Ff({dom:{tag:"div",classes:["tox-input-wrapper"]},components:[_y.sketch({inputBehaviours:ql([xg.config({}),Vh(i,[xw({onSetup:s,getApi:r},a),ww({getApi:r},a)]),Vh("input-update-display-text",[Qr(PT,((e,t)=>{Ju.setValue(e,t.event.text)})),Qr(ar(),(e=>{o.onAction(Ju.getValue(e))})),Qr(dr(),(e=>{o.onAction(Ju.getValue(e))}))]),Th.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:ql([Uh.config({}),Th.config({mode:"special",onEnter:m,onSpace:m,onEscape:u}),Vh("input-wrapper-events",[Qr(sr(),(e=>{H([p,h],(t=>{const o=Re.fromDom(t.get(e).element.dom);nc(o)&&oc(o)}))}))])])});return{dom:{tag:"div",classes:["tox-number-input"]},components:[p.asSpec(),f.asSpec(),h.asSpec()],behaviours:ql([Uh.config({}),Th.config({mode:"flow",focusInside:ep.OnEnterOrSpaceMode,cycles:!1,selector:"button, .tox-input-wrapper",onEscape:e=>nc(e.element)?D.none():(tc(e.element),D.some(!0))})])}},eF="Font size {0}",tF="12pt",oF={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},nF={"xx-small":"7pt","x-small":"8pt",small:"10pt",medium:"12pt",large:"14pt","x-large":"18pt","xx-large":"24pt"},sF=(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(nF,e).getOr(e),rF=e=>be(oF,e).getOr(""),aF=e=>{const t=()=>{let t=D.none();const o=n.data,s=e.queryCommandValue("FontSize");if(s)for(let e=3;t.isNone()&&e>=0;e--){const n=sF(s,e),r=rF(n);t=G(o,(e=>e.format===s||e.format===n||e.format===r))}return{matchOpt:t,size:s}},o=x(D.none),n=FI(e,"font_size_formats",II.Space);return{tooltip:DI(e,eF,tF),text:D.some(tF),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:o=>{const{matchOpt:n,size:s}=t(),r=n.fold(x(s),(e=>e.title));Gr(o,PT,{text:r}),((e,t)=>{e.dispatch("FontSizeTextUpdate",t)})(e,{value:r})},dataset:n,shouldHide:!1,isInvalid:T}},iF="Format {0}",lF=(e,t)=>{const o="Paragraph";return{tooltip:DI(e,iF,o),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:hS(e),updateText:t=>{const n=e=>sA(e)?Y(e.items,n):rA(e)?[{title:e.title,format:e.format}]:[],s=Y(lA(e),n),r=LI(e,x(s)).fold(x(o),(e=>e.title));Gr(t,PT,{text:r}),((e,t)=>{e.dispatch("StylesTextUpdate",t)})(e,{value:r})},shouldHide:iv(e),isInvalid:t=>!e.formatter.canApply(t.format),dataset:t}},cF=x([ds("toggleClass"),ds("fetch"),ol("onExecute"),Ts("getHotspot",D.some),Ts("getAnchorOverrides",x({})),Jc(),ol("onItemExecute"),ys("lazySink"),ds("dom"),el("onOpen"),Zu("splitDropdownBehaviours",[fk,Th,Uh]),Ts("matchWidth",!1),Ts("useMinWidth",!1),Ts("eventOrder",{}),ys("role")].concat(Fk())),dF=Tm({factory:Bf,schema:[ds("dom")],name:"arrow",defaults:()=>({buttonBehaviours:ql([Uh.revoke()])}),overrides:e=>({dom:{tag:"span",attributes:{role:"presentation"}},action:t=>{t.getSystem().getByUid(e.uid).each($r)},buttonBehaviours:ql([Kh.config({toggleOnExecute:!1,toggleClass:e.toggleClass})])})}),uF=Tm({factory:Bf,schema:[ds("dom")],name:"button",defaults:()=>({buttonBehaviours:ql([Uh.revoke()])}),overrides:e=>({dom:{tag:"span",attributes:{role:"presentation"}},action:t=>{t.getSystem().getByUid(e.uid).each((o=>{e.onExecute(o,t)}))}})}),mF=x([dF,uF,Dm({factory:{sketch:e=>({uid:e.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:e.text}})},schema:[ds("text")],name:"aria-descriptor"}),Em({schema:[Ji()],name:"menu",defaults:e=>({onExecute:(t,o)=>{t.getSystem().getByUid(e.uid).each((n=>{e.onItemExecute(n,t,o)}))}})}),Ck()]),gF=og({name:"SplitDropdown",configFields:cF(),partFields:mF(),factory:(e,t,o,n)=>{const s=e=>{ag.getCurrent(e).each((e=>{Mg.highlightFirst(e),Th.focusIn(e)}))},r=t=>{Ek(e,w,t,n,s,Tf.HighlightMenuAndItem).get(b)},a=t=>{const o=Um(t,e,"button");return $r(o),D.some(!0)},i={...Kr([ia(((t,o)=>{Pm(t,e,"aria-descriptor").each((e=>{const o=ya("aria");kt(e.element,"id",o),kt(t.element,"aria-describedby",o)}))}))]),...Qh(D.some(r))},l={repositionMenus:e=>{Kh.isOn(e)&&Ik(e)}};return{uid:e.uid,dom:e.dom,components:t,apis:l,eventOrder:{...e.eventOrder,[Sr()]:["disabling","toggling","alloy.base.behaviour"]},events:i,behaviours:em(e.splitDropdownBehaviours,[fk.config({others:{sandbox:t=>{const o=Um(t,e,"arrow");return Bk(e,t,{onOpen:()=>{Kh.on(o),Kh.on(t)},onClose:()=>{Kh.off(o),Kh.off(t)}})}}}),Th.config({mode:"special",onSpace:a,onEnter:a,onDown:e=>(r(e),D.some(!0))}),Uh.config({}),Kh.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:e.role.getOr("button"),"aria-haspopup":!0}}}},apis:{repositionMenus:(e,t)=>e.repositionMenus(t)}}),pF=e=>({isEnabled:()=>!xg.isDisabled(e),setEnabled:t=>xg.set(e,!t),setText:t=>Gr(e,PT,{text:t}),setIcon:t=>Gr(e,UT,{icon:t})}),hF=e=>({setActive:t=>{Kh.set(e,t)},isActive:()=>Kh.isOn(e),isEnabled:()=>!xg.isDisabled(e),setEnabled:t=>xg.set(e,!t),setText:t=>Gr(e,PT,{text:t}),setIcon:t=>Gr(e,UT,{icon:t})}),fF=(e,t)=>e.map((e=>({"aria-label":t.translate(e),title:t.translate(e)}))).getOr({}),bF=ya("focus-button"),vF=(e,t,o,n,s)=>{const r=t.map((e=>Ff(HT(e,"tox-tbtn",s)))),a=e.map((e=>Ff(LT(e,s.icons))));return{dom:{tag:"button",classes:["tox-tbtn"].concat(t.isSome()?["tox-tbtn--select"]:[]),attributes:fF(o,s)},components:Cw([a.map((e=>e.asSpec())),r.map((e=>e.asSpec()))]),eventOrder:{[er()]:["focusing","alloy.base.behaviour",FT],[Ir()]:[FT,"toolbar-group-button-events"]},buttonBehaviours:ql([vw(s.isDisabled),pw(),Vh(FT,[ia(((e,t)=>NT(e))),Qr(PT,((e,t)=>{r.bind((t=>t.getOpt(e))).each((e=>{Nh.set(e,[Si(s.translate(t.event.text))])}))})),Qr(UT,((e,t)=>{a.bind((t=>t.getOpt(e))).each((e=>{Nh.set(e,[LT(t.event.icon,s.icons)])}))})),Qr(er(),((e,t)=>{t.event.prevent(),jr(e,bF)}))])].concat(n.getOr([])))}},yF=(e,t,o)=>{var n;const s=Ns(b),r=vF(e.icon,e.text,e.tooltip,D.none(),o);return Bf.sketch({dom:r.dom,components:r.components,eventOrder:RT,buttonBehaviours:{...ql([Vh("toolbar-button-events",[(a={onAction:e.onAction,getApi:t.getApi},da(((e,t)=>{yw(a,e)((t=>{Gr(e,IT,{buttonApi:t}),a.onAction(t)}))}))),xw(t,s),ww(t,s)]),vw((()=>!e.enabled||o.isDisabled())),pw()].concat(t.toolbarButtonBehaviours)),[FT]:null===(n=r.buttonBehaviours)||void 0===n?void 0:n[FT]}});var a},xF=(e,t,o)=>yF(e,{toolbarButtonBehaviours:o.length>0?[Vh("toolbarButtonWith",o)]:[],getApi:pF,onSetup:e.onSetup},t),wF=(e,t,o)=>yF(e,{toolbarButtonBehaviours:[Nh.config({}),Kh.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(o.length>0?[Vh("toolbarToggleButtonWith",o)]:[]),getApi:hF,onSetup:e.onSetup},t),SF=(e,t,o)=>n=>wk((e=>t.fetch(e))).map((s=>D.from(qk(wn(KS(ya("menu-value"),s,(o=>{t.onItemAction(e(n),o)}),t.columns,t.presets,ny.CLOSE_ON_EXECUTE,t.select.getOr(T),o),{movement:ZS(t.columns,t.presets),menuBehaviours:Qx("auto"!==t.columns?[]:[ia(((e,o)=>{Jx(e,4,hy(t.presets)).each((({numRows:t,numColumns:o})=>{Th.setGridSize(e,t,o)}))}))])}))))),kF=[{name:"history",items:["undo","redo"]},{name:"ai",items:["aidialog","aishortcuts"]},{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"]}],CF=(e,t)=>(o,n,s)=>{const r=e(o).mapError((e=>ss(e))).getOrDie();return t(r,n,s)},OF={button:CF(Sx,((e,t)=>{return o=e,n=t.shared.providers,xF(o,n,[]);var o,n})),togglebutton:CF(Ox,((e,t)=>{return o=e,n=t.shared.providers,wF(o,n,[]);var o,n})),menubutton:CF(WM,((e,t)=>_E(e,"tox-tbtn",t,D.none(),!1))),splitbutton:CF((e=>ts("SplitButton",jM,e)),((e,t)=>((e,t)=>{const o=e=>({isEnabled:()=>!xg.isDisabled(e),setEnabled:t=>xg.set(e,!t),setIconFill:(t,o)=>{Fi(e.element,`svg path[class="${t}"], rect[class="${t}"]`).each((e=>{kt(e,"fill",o)}))},setActive:t=>{kt(e.element,"aria-pressed",t),Fi(e.element,"span").each((o=>{e.getSystem().getByDom(o).each((e=>Kh.set(e,t)))}))},isActive:()=>Fi(e.element,"span").exists((t=>e.getSystem().getByDom(t).exists(Kh.isOn))),setText:t=>Fi(e.element,"span").each((o=>e.getSystem().getByDom(o).each((e=>Gr(e,PT,{text:t}))))),setIcon:t=>Fi(e.element,"span").each((o=>e.getSystem().getByDom(o).each((e=>Gr(e,UT,{icon:t}))))),setTooltip:o=>{const n=t.providers.translate(o);Ct(e.element,{"aria-label":n,title:n})}}),n=Ns(b),s={getApi:o,onSetup:e.onSetup};return gF.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:{"aria-pressed":!1,...fF(e.tooltip,t.providers)}},onExecute:t=>{const n=o(t);n.isEnabled()&&e.onAction(n)},onItemExecute:(e,t,o)=>{},splitDropdownBehaviours:ql([bw(t.providers.isDisabled),pw(),Vh("split-dropdown-events",[ia(((e,t)=>NT(e))),Qr(bF,Uh.focus),xw(s,n),ww(s,n)]),$C.config({})]),eventOrder:{[Ir()]:["alloy.base.behaviour","split-dropdown-events"]},toggleClass:"tox-tbtn--enabled",lazySink:t.getSink,fetch:SF(o,e,t.providers),parts:{menu:wy(0,e.columns,e.presets)},components:[gF.parts.button(vF(e.icon,e.text,D.none(),D.some([Kh.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:!1})]),t.providers)),gF.parts.arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:zb("chevron-down",t.providers.icons)},buttonBehaviours:ql([bw(t.providers.isDisabled),pw(),Lb()])}),gF.parts["aria-descriptor"]({text:t.providers.translate("To open the popup, press Shift+Enter")})]})})(e,t.shared))),grouptoolbarbutton:CF((e=>ts("GroupToolbarButton",HM,e)),((e,t,o)=>{const n=o.ui.registry.getAll().buttons,s=e=>DF(o,{buttons:n,toolbar:e,allowToolbarGroups:!1},t,D.none()),r={[Xc]:t.shared.header.isPositionedAtTop()?Yc.TopToBottom:Yc.BottomToTop};if(dv(o)===jb.floating)return((e,t,o,n)=>{const s=t.shared,r=Ns(b),a={toolbarButtonBehaviours:[],getApi:pF,onSetup:e.onSetup},i=[Vh("toolbar-group-button-events",[xw(a,r),ww(a,r)])];return EB.sketch({lazySink:s.getSink,fetch:()=>wk((t=>{t(L(o(e.items),PB))})),markers:{toggledClass:"tox-tbtn--enabled"},parts:{button:vF(e.icon,e.text,e.tooltip,D.some(i),s.providers),toolbar:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:n}}}})})(e,t,s,r);throw new Error("Toolbar groups are only supported when using floating toolbar mode")}))},_F={styles:(e,t)=>{const o={type:"advanced",...t.styles};return BI(e,t,lF(e,o),iF,"StylesTextUpdate")},fontsize:(e,t)=>BI(e,t,aF(e),eF,"FontSizeTextUpdate"),fontsizeinput:(e,t)=>QI(e,t,(e=>{const t=()=>e.queryCommandValue("FontSize");return{updateInputValue:e=>Gr(e,PT,{text:t()}),onAction:(t,o)=>e.execCommand("FontSize",!1,t,{skip_focus:!o}),getNewValue:(o,n)=>{JI(o,["unsupportedLength","empty"]);const s=t(),r=JI(o,["unsupportedLength","empty"]).or(JI(s,["unsupportedLength","empty"])),a=r.map((e=>e.value)).getOr(16),i=wv(e),l=r.map((e=>e.unit)).filter((e=>""!==e)).getOr(i),c=n(a,(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}})(l).step),d=`${(e=>e>=0)(c)?c:a}${l}`;return d!==s&&((e,t)=>{e.dispatch("FontSizeInputTextUpdate",t)})(e,{value:d}),d}}})(e)),fontfamily:(e,t)=>BI(e,t,YI(e),WI,"FontFamilyTextUpdate"),blocks:(e,t)=>BI(e,t,UI(e),HI,"BlocksTextUpdate"),align:(e,t)=>BI(e,t,zI(e),RI,"AlignTextUpdate")},TF=e=>{const t=e.toolbar,o=e.buttons;return!1===t?[]:void 0===t||!0===t?(e=>{const t=L(kF,(t=>{const o=U(t.items,(t=>ve(e,t)||ve(_F,t)));return{name:t.name,items:o}}));return U(t,(e=>e.items.length>0))})(o):r(t)?(e=>{const t=e.split("|");return L(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[]"),[])},EF=(e,t,o,n,s,r)=>be(t,o.toLowerCase()).orThunk((()=>r.bind((e=>re(e,(e=>be(t,e+o.toLowerCase()))))))).fold((()=>be(_F,o.toLowerCase()).map((t=>t(e,s)))),(t=>"grouptoolbarbutton"!==t.type||n?((e,t,o)=>be(OF,e.type).fold((()=>(console.error("skipping button defined by",e),D.none())),(n=>D.some(n(e,t,o)))))(t,s,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()))),DF=(e,t,o,n)=>{const s=TF(t),r=L(s,(s=>{const r=Y(s.items,(s=>0===s.trim().length?[]:EF(e,t.buttons,s,t.allowToolbarGroups,o,n).toArray()));return{title:D.from(e.translate(s.name)),items:r}}));return U(r,(e=>e.items.length>0))},AF=(e,t,o,n)=>{const s=t.mainUi.outerContainer,a=o.toolbar,i=o.buttons;if(f(a,r)){const t=a.map((t=>{const s={toolbar:t,buttons:i,allowToolbarGroups:o.allowToolbarGroups};return DF(e,s,n,D.none())}));vI.setToolbars(s,t)}else vI.setToolbar(s,DF(e,o,n,D.none()))},MF=Do(),BF=MF.os.isiOS()&&MF.os.version.major<=12;var IF=Object.freeze({__proto__:null,render:(e,t,o,n,s)=>{const{mainUi:r,uiMotherships:a}=t,i=Ns(0),l=r.outerContainer;TI(e);const d=Re.fromDom(s.targetNode),u=ht(pt(d));vu(d,r.mothership),((e,t,o)=>{Kv(e)&&vu(o.mainUi.mothership.element,o.popupUi.mothership),bu(t,o.dialogUi.mothership)})(e,u,t),e.on("SkinLoaded",(()=>{vI.setSidebar(l,o.sidebar,Bv(e)),AF(e,t,o,n),i.set(e.getWin().innerWidth),vI.setMenubar(l,wI(e,o)),vI.setViews(l,o.views),((e,t)=>{const{uiMotherships:o}=t,n=e.dom;let s=e.getWin();const r=e.getDoc().documentElement,a=Ns($t(s.innerWidth,s.innerHeight)),i=Ns($t(r.offsetWidth,r.offsetHeight)),l=()=>{const t=a.get();t.left===s.innerWidth&&t.top===s.innerHeight||(a.set($t(s.innerWidth,s.innerHeight)),lS(e))},c=()=>{const t=e.getDoc().documentElement,o=i.get();o.left===t.offsetWidth&&o.top===t.offsetHeight||(i.set($t(t.offsetWidth,t.offsetHeight)),lS(e))},d=t=>{((e,t)=>{e.dispatch("ScrollContent",t)})(e,t)};n.bind(s,"resize",l),n.bind(s,"scroll",d);const u=Tc(Re.fromDom(e.getBody()),"load",c);e.on("hide",(()=>{H(o,(e=>{Mt(e.element,"display","none")}))})),e.on("show",(()=>{H(o,(e=>{Lt(e.element,"display")}))})),e.on("NodeChange",c),e.on("remove",(()=>{u.unbind(),n.unbind(s,"resize",l),n.unbind(s,"scroll",d),s=null}))})(e,t)}));const m=vI.getSocket(l).getOrDie("Could not find expected socket element");if(BF){Bt(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=_c(m.element,"scroll",t.throttle);e.on("remove",o.unbind)}gw(e,t),e.addCommand("ToggleSidebar",((t,o)=>{vI.toggleSidebar(l,o),e.dispatch("ToggleSidebar")})),e.addQueryValueHandler("ToggleSidebar",(()=>{var e;return null!==(e=vI.whichSidebar(l))&&void 0!==e?e:""})),e.addCommand("ToggleView",((t,o)=>{if(vI.toggleView(l,o)){const t=l.element;r.mothership.broadcastOn([Bu()],{target:t}),H(a,(e=>{e.broadcastOn([Bu()],{target:t})})),c(vI.whichView(l))&&(e.focus(),e.nodeChanged(),vI.refreshToolbar(l))}})),e.addQueryValueHandler("ToggleView",(()=>{var e;return null!==(e=vI.whichView(l))&&void 0!==e?e:""}));const g=dv(e);g!==jb.sliding&&g!==jb.floating||e.on("ResizeWindow ResizeEditor ResizeContent",(()=>{const o=e.getWin().innerWidth;o!==i.get()&&(vI.refreshToolbar(t.mainUi.outerContainer),i.set(o))}));const p={setEnabled:e=>{mw(t,!e)},isEnabled:()=>!xg.isDisabled(l)};return{iframeContainer:m.element.dom,editorContainer:l.element.dom,api:p}}});const FF=e=>/^[0-9\.]+(|px)$/i.test(""+e)?D.some(parseInt(""+e,10)):D.none(),RF=e=>h(e)?e+"px":e,NF=(e,t,o)=>{const n=t.filter((t=>e<t)),s=o.filter((t=>e>t));return n.or(s).getOr(e)},VF=e=>{const t=(e=>{const t=Qb(e),o=ov(e),n=sv(e);return FF(t).map((e=>NF(e,o,n)))})(e);return t.getOr(Qb(e))},zF=e=>{const t=ev(e),o=tv(e),n=nv(e);return FF(t).map((e=>NF(e,o,n)))},{ToolbarLocation:LF,ToolbarMode:HF}=Zv,PF=(e,t,o,n,s)=>{const{mainUi:r,uiMotherships:a}=o,i=$b.DOM,l=$v(e),c=Xv(e),d=nv(e).or(zF(e)),u=n.shared.header,m=u.isPositionedAtTop,g=dv(e),p=g===HF.sliding||g===HF.floating,h=Ns(!1),f=()=>h.get()&&!e.removed,b=e=>p?e.fold(x(0),(e=>e.components().length>1?Wt(e.components()[1].element):0)):0,v=(e,t)=>Kv(e)?ZA(t):D.none(),y=()=>{H(a,(e=>{e.broadcastOn([Iu()],{})}))},w=o=>{if(!f())return;l||s.on((e=>{const o=d.getOrThunk((()=>{const e=FF(Ft(xt(),"margin-left")).getOr(0);return Jt(xt())-Yt(t).left+e}));Mt(e.element,"max-width",o+"px")}));const n=l?D.none():(()=>{if(l)return D.none();if(Yt(r.outerContainer.element).left+Zt(r.outerContainer.element)>=window.innerWidth-40||Nt(r.outerContainer.element,"width").isSome()){Mt(r.outerContainer.element,"position","absolute"),Mt(r.outerContainer.element,"left","0px"),Lt(r.outerContainer.element,"width");const e=Zt(r.outerContainer.element);return D.some(e)}return D.none()})();p&&vI.refreshToolbar(r.outerContainer),l||(o=>{s.on((n=>{const s=vI.getToolbar(r.outerContainer),a=b(s),i=Xo(t),{top:l,left:c}=v(e,r.outerContainer.element).fold((()=>({top:m()?Math.max(i.y-Wt(n.element)+a,0):i.bottom,left:i.x})),(e=>{var t;const o=Xo(e),s=null!==(t=e.dom.scrollTop)&&void 0!==t?t:0,r=Je(e,xt()),l=r?Math.max(i.y-Wt(n.element)+a,0):i.y-o.y+s-Wt(n.element)+a;return{top:m()?l:i.bottom,left:r?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({});Bt(r.outerContainer.element,{...d,...u})}))})(n),c&&s.on(o),y()},S=()=>!(l||!c||!f())&&s.get().exists((o=>{const n=u.getDockingMode(),a=(o=>{switch(mv(e)){case LF.auto:const e=vI.getToolbar(r.outerContainer),n=b(e),s=Wt(o.element)-n,a=Xo(t);if(a.y>s)return"top";{const e=tt(t),o=Math.max(e.dom.scrollHeight,Wt(e));return a.bottom<o-s||Zo().bottom<a.bottom-s?"bottom":"top"}case LF.bottom:return"bottom";case LF.top:default:return"top"}})(o);return a!==n&&(i=a,s.on((e=>{DM.setModes(e,[i]),u.setDockingMode(i);const t=m()?Yc.TopToBottom:Yc.BottomToTop;kt(e.element,Xc,t)})),!0);var i}));return{isVisible:f,isPositionedAtTop:m,show:()=>{h.set(!0),Mt(r.outerContainer.element,"display","flex"),i.addClass(e.getBody(),"mce-edit-focus"),H(a,(e=>{Lt(e.element,"display")})),S(),Kv(e)?w((e=>DM.isDocked(e)?DM.reset(e):DM.refresh(e))):w(DM.refresh)},hide:()=>{h.set(!1),Mt(r.outerContainer.element,"display","none"),i.removeClass(e.getBody(),"mce-edit-focus"),H(a,(e=>{Mt(e.element,"display","none")}))},update:w,updateMode:()=>{S()&&w(DM.reset)},repositionPopups:y}},UF=(e,t)=>{const o=Xo(e);return{pos:t?o.y:o.bottom,bounds:o}};var WF=Object.freeze({__proto__:null,render:(e,t,o,n,s)=>{const{mainUi:r}=t,a=Cc(),i=Re.fromDom(s.targetNode),l=PF(e,i,t,n,a),c=hv(e);EI(e);const d=()=>{if(a.isSet())return void l.show();a.set(vI.getHeader(r.outerContainer).getOrDie());const s=qv(e);Kv(e)?(vu(i,r.mothership),vu(i,t.popupUi.mothership)):bu(s,r.mothership),bu(s,t.dialogUi.mothership),AF(e,t,o,n),vI.setMenubar(r.outerContainer,wI(e,o)),l.show(),((e,t,o,n)=>{const s=Ns(UF(t,o.isPositionedAtTop())),r=n=>{const{pos:r,bounds:a}=UF(t,o.isPositionedAtTop()),{pos:i,bounds:l}=s.get(),c=a.height!==l.height||a.width!==l.width;s.set({pos:r,bounds:a}),c&&lS(e,n),o.isVisible()&&(i!==r?o.update(DM.reset):c&&(o.updateMode(),o.repositionPopups()))};n||(e.on("activate",o.show),e.on("deactivate",o.hide)),e.on("SkinLoaded ResizeWindow",(()=>o.update(DM.reset))),e.on("NodeChange keydown",(e=>{requestAnimationFrame((()=>r(e)))}));let a=0;const i=lT((()=>o.update(DM.refresh)),33);e.on("ScrollWindow",(()=>{const e=Ho().left;e!==a&&(a=e,i.throttle()),o.updateMode()})),Kv(e)&&e.on("ElementScroll",(e=>{o.update(DM.refresh)}));const l=kc();l.set(Tc(Re.fromDom(e.getBody()),"load",(e=>r(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()})),gw(e,t);const u={show:d,hide:l.hide,setEnabled:e=>{mw(t,!e)},isEnabled:()=>!xg.isDisabled(r.outerContainer)};return{editorContainer:r.outerContainer.element.dom,api:u}}});const jF="contexttoolbar-hide",GF=(e,t)=>Qr(IT,((o,n)=>{const s=(e=>({hide:()=>jr(e,_r()),getValue:()=>Ju.getValue(e)}))(e.get(o));t.onAction(s,n.event.buttonApi)})),$F=(e,t,o)=>(e=>"contextformtogglebutton"===e.type)(t)?((e,t,o)=>{const{primary:n,...s}=t.original,r=os(Ox({...s,type:"togglebutton",onAction:b}));return wF(r,o,[GF(e,t)])})(e,t,o):((e,t,o)=>{const{primary:n,...s}=t.original,r=os(Sx({...s,type:"button",onAction:b}));return xF(r,o,[GF(e,t)])})(e,t,o),qF=(e,t)=>{const o=e.label.fold((()=>({})),(e=>({"aria-label":e}))),n=Ff(_y.sketch({inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-js"],data:e.initValue(),inputAttributes:o,selectOnFocus:!0,inputBehaviours:ql([Th.config({mode:"special",onEnter:e=>s.findPrimary(e).map((e=>($r(e),!0))),onLeft:(e,t)=>(t.cut(),D.none()),onRight:(e,t)=>(t.cut(),D.none())})])})),s=((e,t,o)=>{const n=L(t,(t=>Ff($F(e,t,o))));return{asSpecs:()=>L(n,(e=>e.asSpec())),findPrimary:e=>re(t,((t,o)=>t.primary?D.from(n[o]).bind((t=>t.getOpt(e))).filter(C(xg.isDisabled)):D.none()))}})(n,e.commands,t);return[{title:D.none(),items:[n.asSpec()]},{title:D.none(),items:s.asSpecs()}]},YF=qF,XF=(e,t,o)=>t.bottom-e.y>=o&&e.bottom-t.y>=o,KF=e=>{const t=(e=>{const t=e.getBoundingClientRect();if(t.height<=0&&t.width<=0){const o=dt(Re.fromDom(e.startContainer),e.startOffset).element;return(Ge(o)?nt(o):D.some(o)).filter(je).map((e=>e.dom.getBoundingClientRect())).getOr(t)}return t})(e.selection.getRng());if(e.inline){const e=Ho();return Yo(e.left+t.left,e.top+t.top,t.width,t.height)}{const o=Ko(Re.fromDom(e.getBody()));return Yo(o.x+t.left,o.y+t.top,t.width,t.height)}},JF=(e,t,o,n=0)=>{const s=Wo(window),r=Xo(Re.fromDom(e.getContentAreaContainer())),a=Vv(e)||Pv(e)||Wv(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}})(r,s,n);if(e.inline&&!a)return Yo(i,s.y,l,s.height);{const a=t.header.isPositionedAtTop(),{y:c,bottom:d}=((e,t,o,n,s,r)=>{const a=Re.fromDom(e.getContainer()),i=Fi(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+r,o.y),bottom:o.bottom};if(e.inline&&!d)return{y:o.y,bottom:Math.min(l.y-r,o.bottom)};const u="line"===s?Xo(a):t;return d?{y:Math.max(l.bottom+r,o.y),bottom:Math.min(u.bottom-r,o.bottom)}:{y:Math.max(u.y+r,o.y),bottom:Math.min(l.y-r,o.bottom)}})(e,r,s,a,o,n);return Yo(i,c,l,d-c)}},ZF={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"]},QF={maxHeightFunction:Lc(),maxWidthFunction:wB()},eR=e=>"node"===e,tR=(e,t,o,n,s)=>{const r=KF(e),a=n.lastElement().exists((e=>Je(o,e)));if(((e,t)=>{const o=e.selection.getRng(),n=dt(Re.fromDom(o.startContainer),o.startOffset);return o.startContainer===o.endContainer&&o.startOffset===o.endOffset-1&&Je(n.element,t)})(e,o))return a?WD:zD;if(a)return((e,t,o)=>{const n=Nt(e,"position");Mt(e,"position",t);const s=o(e);return n.each((t=>Mt(e,"position",t))),s})(t,n.getMode(),(()=>XF(r,Xo(t),-20)&&!n.isReposition()?GD:WD));return("fixed"===n.getMode()?s.y+Ho().top:s.y)+(Wt(t)+12)<=r.y?zD:LD},oR=(e,t,o,n)=>{const s=t=>(n,s,r,a,i)=>({...tR(e,a,t,o,i)({...n,y:i.y,height:i.height},s,r,a,i),alwaysFit:!0}),r=e=>eR(n)?[s(e)]:[];return t?{onLtr:e=>[Bl,Tl,El,Dl,Al,Ml].concat(r(e)),onRtl:e=>[Bl,El,Tl,Al,Dl,Ml].concat(r(e))}:{onLtr:e=>[Ml,Bl,Dl,Tl,Al,El].concat(r(e)),onRtl:e=>[Ml,Bl,Al,El,Dl,Tl].concat(r(e))}},nR=(e,t)=>{const o=U(t,(t=>t.predicate(e.dom))),{pass:n,fail:s}=P(o,(e=>"contexttoolbar"===e.type));return{contextToolbars:n,contextForms:s}},sR=(e,t,o)=>{const n=nR(e,t);if(n.contextForms.length>0)return D.some({elem:e,toolbars:[n.contextForms[0]]});{const t=nR(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"),s=t("node");if(n||s){if(s&&n){const e=o("node"),t=L(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()}},rR=(e,t,o)=>e(t)?D.none():Ws(t,(e=>{if(je(e)){const{contextToolbars:t,contextForms:n}=nR(e,o.inNodeScope),s=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 s.length>0?D.some({elem:e,toolbars:s}):D.none()}return D.none()}),e),aR=(e,t)=>{const o={},n=[],s=[],r={},a={},i=(e,i)=>{const l=os(ts("ContextForm",Bx,i));o[e]=l,l.launch.map((o=>{r["form:"+e]={...i.launch,type:"contextformtogglebutton"===o.type?"togglebutton":"button",onAction:()=>{t(l)}}})),"editor"===l.scope?s.push(l):n.push(l),a[e]=l},l=(e,t)=>{var o;(o=t,ts("ContextToolbar",Ix,o)).each((o=>{"editor"===t.scope?s.push(o):n.push(o),a[e]=o}))},c=ae(e);return H(c,(t=>{const o=e[t];"contextform"===o.type?i(t,o):"contexttoolbar"===o.type&&l(t,o)})),{forms:o,inNodeScope:n,inEditorScope:s,lookupTable:a,formNavigators:r}},iR=ya("forward-slide"),lR=ya("backward-slide"),cR=ya("change-slide-event"),dR="tox-pop--resizing",uR="tox-pop--transition",mR=(e,t,o,n)=>{const s=n.backstage,r=s.shared,a=Do().deviceType.isTouch,i=Cc(),l=Cc(),c=Cc(),d=_i((e=>{const t=Ns([]);return Af.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:e=>{t.set([]),Af.getContent(e).each((e=>{Lt(e.element,"visibility")})),ni(e.element,dR),Lt(e.element,"width")},inlineBehaviours:ql([Vh("context-toolbar-events",[aa(gr(),((e,t)=>{"width"===t.event.raw.propertyName&&(ni(e.element,dR),Lt(e.element,"width"))})),Qr(cR,((e,t)=>{const o=e.element;Lt(o,"width");const n=Jt(o);Af.setContent(e,t.event.contents),ti(o,dR);const s=Jt(o);Mt(o,"width",n+"px"),Af.getContent(e).each((e=>{t.event.focus.bind((e=>(tc(e),rc(o)))).orThunk((()=>(Th.focusIn(e),sc(pt(o)))))})),setTimeout((()=>{Mt(e.element,"width",s+"px")}),0)})),Qr(iR,((e,o)=>{Af.getContent(e).each((o=>{t.set(t.get().concat([{bar:o,focus:sc(pt(e.element))}]))})),Gr(e,cR,{contents:o.event.forwardContents,focus:D.none()})})),Qr(lR,((e,o)=>{ne(t.get()).each((o=>{t.set(t.get().slice(0,t.get().length-1)),Gr(e,cR,{contents:Ti(o.bar),focus:o.focus})}))}))]),Th.config({mode:"special",onEscape:o=>ne(t.get()).fold((()=>e.onEscape()),(e=>(jr(o,lR),D.some(!0))))})]),lazySink:()=>on.value(e.sink)})})({sink:o,onEscape:()=>(e.focus(),D.some(!0))})),u=()=>{const t=c.get().getOr("node"),o=eR(t)?1:0;return JF(e,r,t,o)},m=()=>!(e.removed||a()&&s.isContextMenuOpen()),g=()=>{if(m()){const t=u(),o=xe(c.get(),"node")?((e,t)=>t.filter((e=>yt(e)&&We(e))).map(Ko).getOrThunk((()=>KF(e))))(e,i.get()):KF(e);return t.height<=0||!XF(o,t,.01)}return!0},p=()=>{i.clear(),l.clear(),c.clear(),Af.hide(d)},h=()=>{if(Af.isOpen(d)){const e=d.element;Lt(e,"display"),g()?Mt(e,"display","none"):(l.set(0),Af.reposition(d))}},f=t=>({dom:{tag:"div",classes:["tox-pop__dialog"]},components:[t],behaviours:ql([Th.config({mode:"acyclic"}),Vh("pop-dialog-wrap-events",[ia((t=>{e.shortcuts.add("ctrl+F9","focus statusbar",(()=>Th.focusIn(t)))})),la((t=>{e.shortcuts.remove("ctrl+F9")}))])])}),v=Qt((()=>aR(t,(e=>{const t=y([e]);Gr(d,iR,{forwardContents:f(t)})})))),y=t=>{const{buttons:o}=e.ui.registry.getAll(),s={...o,...v().formNavigators},a=dv(e)===jb.scrolling?jb.scrolling:jb.default,i=q(L(t,(t=>"contexttoolbar"===t.type?((t,o)=>DF(e,{buttons:t,toolbar:o.items,allowToolbarGroups:!1},n.backstage,D.some(["form:"])))(s,t):((e,t)=>YF(e,t))(t,r.providers))));return $B({type:a,uid:ya("context-toolbar"),initGroups:i,onEscape:D.none,cyclicKeying:!0,providers:r.providers})},x=(t,n)=>{const s="node"===t?r.anchors.node(n):r.anchors.cursor(),c=((e,t,o,n)=>"line"===t?{bubble:Wc(12,0,ZF),layouts:{onLtr:()=>[Il],onRtl:()=>[Fl]},overrides:QF}:{bubble:Wc(0,12,ZF,1/12),layouts:oR(e,o,n,t),overrides:QF})(e,t,a(),{lastElement:i.get,isReposition:()=>xe(l.get(),0),getMode:()=>su.getMode(o)});return wn(s,c)},w=(e,t)=>{if(k.cancel(),!m())return;const n=y(e),s=e[0].position,r=x(s,t);c.set(s),l.set(1);const a=d.element;Lt(a,"display"),(e=>xe(Se(e,i.get(),Je),!0))(t)||(ni(a,uR),su.reset(o,d)),Af.showWithinBounds(d,f(n),{anchor:r,transition:{classes:[uR],mode:"placement"}},(()=>D.some(u()))),t.fold(i.clear,i.set),g()&&Mt(a,"display","none")};let S=!1;const k=lT((()=>{if(e.hasFocus()&&!e.removed&&!S)if(ri(d.element,uR))k.throttle();else{((e,t)=>{const o=Re.fromDom(t.getBody()),n=e=>Je(e,o),s=Re.fromDom(t.selection.getNode());return(e=>!n(e)&&!Ze(o,e))(s)?D.none():sR(s,e.inNodeScope,e.inEditorScope).orThunk((()=>rR(n,s,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(jF,p),e.on("contexttoolbar-show",(t=>{const o=v();be(o.lookupTable,t.toolbarKey).each((o=>{w([o],Ce(t.target!==e,t.target)),Af.getContent(d).each(Th.focusIn)}))})),e.on("focusout",(t=>{Mf.setEditorTimeout(e,(()=>{rc(o.element).isNone()&&rc(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=>{rc(d.element).fold(k.throttle,b)}))}))},gR=(e,t)=>{const o=()=>{const o=t.getOptions(e),n=t.getCurrent(e).map(t.hash),s=Cc();return L(o,(o=>({type:"togglemenuitem",text:t.display(o),onSetup:r=>{const a=e=>{e&&(s.on((e=>e.setActive(!1))),s.set(r)),r.setActive(e)};a(xe(n,t.hash(o)));const i=t.watcher(e,o,a);return()=>{s.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})},pR=e=>({name:"lineheight",text:"Line height",icon:"line-height",getOptions:Hv,hash:e=>((e,t)=>JI(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),onToolbarSetup:mS(e),onMenuSetup:mS(e)}),hR=e=>{gR(e,pR(e)),(e=>D.from(lv(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=Re.fromDom(e.selection.getNode());return js(t,(e=>D.some(e).filter(je).bind((e=>_t(e,"lang").map((t=>({code:t,customCode:_t(e,"data-mce-lang").getOrUndefined(),title:""})))))))},setCurrent:(e,t)=>e.execCommand("Lang",!1,t),onToolbarSetup:t=>{const o=kc();return t.setActive(e.formatter.match("lang",{},void 0,!0)),o.set(e.formatter.formatChanged("lang",t.setActive,!0)),uS(o.clear,mS(e)(t))},onMenuSetup:mS(e)}))))(e).each((t=>gR(e,t)))},fR=(e,t)=>{((e,t)=>{const o=MI(0,t,zI(e));e.ui.registry.addNestedMenuItem("align",{text:t.shared.providers.translate("Align"),onSetup:mS(e),getSubmenuItems:()=>o.items.validateItems(o.getStyleItems())})})(e,t),((e,t)=>{const o=MI(0,t,YI(e));e.ui.registry.addNestedMenuItem("fontfamily",{text:t.shared.providers.translate("Fonts"),onSetup:mS(e),getSubmenuItems:()=>o.items.validateItems(o.getStyleItems())})})(e,t),((e,t)=>{const o={type:"advanced",...t.styles},n=MI(0,t,lF(e,o));e.ui.registry.addNestedMenuItem("styles",{text:"Formats",onSetup:mS(e),getSubmenuItems:()=>n.items.validateItems(n.getStyleItems())})})(e,t),((e,t)=>{const o=MI(0,t,UI(e));e.ui.registry.addNestedMenuItem("blocks",{text:"Blocks",onSetup:mS(e),getSubmenuItems:()=>o.items.validateItems(o.getStyleItems())})})(e,t),((e,t)=>{const o=MI(0,t,aF(e));e.ui.registry.addNestedMenuItem("fontsize",{text:"Font sizes",onSetup:mS(e),getSubmenuItems:()=>o.items.validateItems(o.getStyleItems())})})(e,t)},bR=e=>pS(e,"NodeChange",(t=>{t.setEnabled(e.queryCommandState("outdent")&&e.selection.isEditable())})),vR=e=>{(e=>{e.ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:bR(e),onAction:fS(e,"outdent")}),e.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onSetup:mS(e),onAction:fS(e,"indent")})})(e)},yR=(e,t)=>o=>{o.setActive(t.get());const n=e=>{t.set(e.state),o.setActive(e.state)};return e.on("PastePlainTextToggle",n),uS((()=>e.off("PastePlainTextToggle",n)),mS(e)(o))},xR=(e,t)=>()=>{e.execCommand("mceToggleFormat",!1,t)},wR=e=>{(e=>{aT.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:gS(e,t.name),onAction:xR(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:gS(e,o),onAction:xR(e,o)})}})(e),(e=>{aT.each([{name:"copy",text:"Copy",action:"Copy",icon:"copy"},{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:"print",text:"Print",action:"mcePrint",icon:"print"}],(t=>{e.ui.registry.addButton(t.name,{tooltip:t.text,icon:t.icon,onAction:fS(e,t.action)})})),aT.each([{name:"cut",text:"Cut",action:"Cut",icon:"cut"},{name:"paste",text:"Paste",action:"Paste",icon:"paste"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"remove",text:"Remove",action:"Delete",icon:"remove"},{name:"hr",text:"Horizontal line",action:"InsertHorizontalRule",icon:"horizontal-rule"}],(t=>{e.ui.registry.addButton(t.name,{tooltip:t.text,icon:t.icon,onSetup:mS(e),onAction:fS(e,t.action)})}))})(e),(e=>{aT.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],(t=>{e.ui.registry.addToggleButton(t.name,{tooltip:t.text,icon:t.icon,onAction:fS(e,t.action),onSetup:gS(e,t.name)})}))})(e)},SR=e=>{wR(e),(e=>{aT.each([{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"copy",text:"Copy",action:"Copy",icon:"copy",shortcut:"Meta+C"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A"},{name:"print",text:"Print...",action:"mcePrint",icon:"print",shortcut:"Meta+P"}],(t=>{e.ui.registry.addMenuItem(t.name,{text:t.text,icon:t.icon,shortcut:t.shortcut,onAction:fS(e,t.action)})})),aT.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:"cut",text:"Cut",action:"Cut",icon:"cut",shortcut:"Meta+X"},{name:"paste",text:"Paste",action:"Paste",icon:"paste",shortcut:"Meta+V"},{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,onSetup:mS(e),onAction:fS(e,t.action)})})),e.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onSetup:mS(e),onAction:xR(e,"code")})})(e)},kR=(e,t)=>pS(e,"Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",(o=>{o.setEnabled(!e.mode.isReadOnly()&&e.undoManager[t]())})),CR=e=>{(e=>{e.ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:kR(e,"hasUndo"),onAction:fS(e,"undo")}),e.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:kR(e,"hasRedo"),onAction:fS(e,"redo")})})(e),(e=>{e.ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",enabled:!1,onSetup:kR(e,"hasUndo"),onAction:fS(e,"undo")}),e.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",enabled:!1,onSetup:kR(e,"hasRedo"),onAction:fS(e,"redo")})})(e)},OR=e=>pS(e,"VisualAid",(t=>{t.setActive(e.hasVisual)})),_R=e=>{(e=>{e.ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:fS(e,"mceToggleVisualAid")})})(e),(e=>{e.ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:OR(e),onAction:fS(e,"mceToggleVisualAid")})})(e)},TR=(e,t)=>{(e=>{H([{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:fS(e,t.cmd),onSetup:gS(e,t.name)})})),e.ui.registry.addButton("alignnone",{tooltip:"No alignment",icon:"align-none",onSetup:mS(e),onAction:fS(e,"JustifyNone")})})(e),SR(e),fR(e,t),CR(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=RS(e),o=NS(e),n=Ns(t),s=Ns(o);qS(e,"forecolor","forecolor",n),qS(e,"backcolor","hilitecolor",s),YS(e,"forecolor","forecolor","Text color",n),YS(e,"backcolor","hilitecolor","Background color",s)})(e),_R(e),vR(e),hR(e),(e=>{const t=Ns(Mv(e)),o=()=>e.execCommand("mceTogglePlainTextPaste");e.ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:o,onSetup:yR(e,t)}),e.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",icon:"paste-text",onAction:o,onSetup:yR(e,t)})})(e)},ER=e=>r(e)?e.split(/[ ,]/):e,DR=e=>t=>t.options.get(e),AR=DR("contextmenu_never_use_native"),MR=DR("contextmenu_avoid_overlap"),BR=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)))},IR=(e,t)=>({type:"makeshift",x:e,y:t}),FR=e=>"longpress"===e.type||0===e.type.indexOf("touch"),RR=(e,t)=>{const o=$b.DOM.getPos(e);return((e,t,o)=>IR(e.x+t,e.y+o))(t,o.x,o.y)},NR=(e,t)=>"contextmenu"===t.type||"longpress"===t.type?e.inline?(e=>{if(FR(e)){const t=e.touches[0];return IR(t.pageX,t.pageY)}return IR(e.pageX,e.pageY)})(t):RR(e.getContentAreaContainer(),(e=>{if(FR(e)){const t=e.touches[0];return IR(t.clientX,t.clientY)}return IR(e.clientX,e.clientY)})(t)):VR(e),VR=e=>({type:"selection",root:Re.fromDom(e.selection.getNode())}),zR=(e,t,o)=>{switch(o){case"node":return(e=>({type:"node",node:D.some(Re.fromDom(e.selection.getNode())),root:Re.fromDom(e.getBody())}))(e);case"point":return NR(e,t);case"selection":return VR(e)}},LR=(e,t,o,n,s,r)=>{const a=o(),i=zR(e,t,r);YT(a,ny.CLOSE_ON_EXECUTE,n,{isHorizontalMenu:!1,search:D.none()}).map((e=>{t.preventDefault(),Af.showMenuAt(s,{anchor:i},{menu:{markers:vy("normal")},data:e})}))},HR={onLtr:()=>[Bl,Tl,El,Dl,Al,Ml,zD,LD,VD,RD,ND,FD],onRtl:()=>[Bl,El,Tl,Al,Dl,Ml,zD,LD,ND,FD,VD,RD]},PR={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"]},UR=(e,t,o,n,s,r,a)=>{const i=((e,t,o)=>{const n=zR(e,t,o);return{bubble:Wc(0,"point"===o?12:0,PR),layouts:HR,overrides:{maxWidthFunction:wB(),maxHeightFunction:Lc()},...n}})(e,t,r);YT(o,ny.CLOSE_ON_EXECUTE,n,{isHorizontalMenu:!0,search:D.none()}).map((o=>{t.preventDefault();const l=a?Tf.HighlightMenuAndItem:Tf.HighlightNone;Af.showMenuWithinBounds(s,{anchor:i},{menu:{markers:vy("normal"),highlightOnOpen:l},data:o,type:"horizontal"},(()=>D.some(JF(e,n.shared,"node"===r?"node":"selection")))),e.dispatch(jF)}))},WR=(e,t,o,n,s,r)=>{const a=Do(),i=a.os.isiOS(),l=a.os.isMacOS(),c=a.os.isAndroid(),d=a.deviceType.isTouch(),u=()=>{const a=o();UR(e,t,a,n,s,r,!(c||i||l&&d))};if((l||i)&&"node"!==r){const o=()=>{(e=>{const t=e.selection.getRng(),o=()=>{Mf.setEditorTimeout(e,(()=>{e.selection.setRng(t)}),10),r()};e.once("touchend",o);const n=e=>{e.preventDefault(),e.stopImmediatePropagation()};e.on("mousedown",n,!0);const s=()=>r();e.once("longpresscancel",s);const r=()=>{e.off("touchend",o),e.off("longpresscancel",s),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],s=o.getRng();return Ad(e.getWin(),fd.domRange(s)).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()},jR=e=>r(e)?"|"===e:"separator"===e.type,GR={type:"separator"},$R=e=>{const t=e=>({text:e.text,icon:e.icon,enabled:e.enabled,shortcut:e.shortcut});if(r(e))return e;switch(e.type){case"separator":return GR;case"submenu":return{type:"nestedmenuitem",...t(e),getSubmenuItems:()=>{const t=e.getSubmenuItems();return r(t)?t:L(t,$R)}};default:const o=e;return{type:"menuitem",...t(o),onAction:v(o.onAction)}}},qR=(e,t)=>{if(0===t.length)return e;const o=ne(e).filter((e=>!jR(e))),n=o.fold((()=>[]),(e=>[GR]));return e.concat(n).concat(t).concat([GR])},YR=(e,t)=>!(e=>"longpress"===e.type||ve(e,"touches"))(t)&&(2!==t.button||t.target===e.getBody()&&""===t.pointerType),XR=(e,t)=>YR(e,t)?e.selection.getStart(!0):t.target,KR=(e,t,o)=>{const n=Do().deviceType.isTouch,s=_i(Af.sketch({dom:{tag:"div"},lazySink:t,onEscape:()=>e.focus(),onShow:()=>o.setContextMenuState(!0),onHide:()=>o.setContextMenuState(!1),fireDismissalEventInstead:{},inlineBehaviours:ql([Vh("dismissContextMenu",[Qr(Rr(),((t,o)=>{Mu.close(t),e.focus()}))])])})),a=()=>Af.hide(s),i=t=>{if(AR(e)&&t.preventDefault(),((e,t)=>t.ctrlKey&&!AR(e))(e,t)||(e=>0===BR(e).length)(e))return;const a=((e,t)=>{const o=MR(e),n=YR(e,t)?"selection":"point";if(Me(o)){const s=XR(e,t);return eC(Re.fromDom(s),o)?"node":n}return n})(e,t);(n()?WR:LR)(e,t,(()=>{const o=XR(e,t),n=e.ui.registry.getAll(),s=BR(e);return((e,t,o)=>{const n=j(t,((t,n)=>be(e,n.toLowerCase()).map((e=>{const n=e.update(o);if(r(n)&&Me(Ae(n)))return qR(t,n.split(" "));if(l(n)&&n.length>0){const e=L(n,$R);return qR(t,e)}return t})).getOrThunk((()=>t.concat([n])))),[]);return n.length>0&&jR(n[n.length-1])&&n.pop(),n})(n.contextMenus,s,o)}),o,s,a)};e.on("init",(()=>{const t="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(n()?"":" ResizeWindow");e.on(t,a),e.on("longpress contextmenu",i)}))},JR=Vs([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),ZR=e=>t=>t.translate(-e.left,-e.top),QR=e=>t=>t.translate(e.left,e.top),eN=e=>(t,o)=>j(e,((e,t)=>t(e)),$t(t,o)),tN=(e,t,o)=>e.fold(eN([QR(o),ZR(t)]),eN([ZR(t)]),eN([])),oN=(e,t,o)=>e.fold(eN([QR(o)]),eN([]),eN([QR(t)])),nN=(e,t,o)=>e.fold(eN([]),eN([ZR(o)]),eN([QR(t),ZR(o)])),sN=(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}},rN=(e,t,o,n)=>{const s=(e,s)=>(r,a)=>{const i=e(t,o,n);return s(r.getOr(i.left),a.getOr(i.top))};return e.fold(s(nN,aN),s(oN,iN),s(tN,lN))},aN=JR.offset,iN=JR.absolute,lN=JR.fixed,cN=(e,t)=>{const o=Ot(e,t);return u(o)?NaN:parseInt(o,10)},dN=(e,t,o,n)=>((e,t)=>{const o=e.element,n=cN(o,t.leftAttr),s=cN(o,t.topAttr);return isNaN(n)||isNaN(s)?D.none():D.some($t(n,s))})(e,t).fold((()=>o),(e=>lN(e.left+n.left,e.top+n.top))),uN=(e,t,o,n,s,r)=>{const a=dN(e,t,o,n),i=t.mustSnap?pN(e,t,a,s,r):hN(e,t,a,s,r),l=tN(a,s,r);return((e,t,o)=>{const n=e.element;kt(n,t.leftAttr,o.left+"px"),kt(n,t.topAttr,o.top+"px")})(e,t,l),i.fold((()=>({coord:lN(l.left,l.top),extra:D.none()})),(e=>({coord:e.output,extra:e.extra})))},mN=(e,t)=>{((e,t)=>{const o=e.element;Et(o,t.leftAttr),Et(o,t.topAttr)})(e,t)},gN=(e,t,o,n)=>re(e,(e=>{const s=e.sensor,r=((e,t,o,n,s,r)=>{const a=oN(e,s,r),i=oN(t,s,r);return Math.abs(a.left-i.left)<=o&&Math.abs(a.top-i.top)<=n})(t,s,e.range.left,e.range.top,o,n);return r?D.some({output:rN(e.output,t,o,n),extra:e.extra}):D.none()})),pN=(e,t,o,n,s)=>{const r=t.getSnapPoints(e);return gN(r,o,n,s).orThunk((()=>{const e=j(r,((e,t)=>{const r=t.sensor,a=((e,t,o,n,s,r)=>{const a=oN(e,s,r),i=oN(t,s,r),l=Math.abs(a.left-i.left),c=Math.abs(a.top-i.top);return $t(l,c)})(o,r,t.range.left,t.range.top,n,s);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:rN(e.output,o,n,s),extra:e.extra})))}))},hN=(e,t,o,n,s)=>{const r=t.getSnapPoints(e);return gN(r,o,n,s)};var fN=Object.freeze({__proto__:null,snapTo:(e,t,o,n)=>{const s=t.getTarget(e.element);if(t.repositionTarget){const t=Qe(e.element),o=Ho(t),r=QA(s),a=((e,t,o)=>({coord:rN(e.output,e.output,t,o),extra:e.extra}))(n,o,r),i=sN(a.coord,0,r);It(s,i)}}});const bN="data-initial-z-index",vN=(e,t)=>{e.getSystem().addToGui(t),(e=>{nt(e.element).filter(je).each((t=>{Nt(t,"z-index").each((e=>{kt(t,bN,e)})),Mt(t,"z-index",Ft(e.element,"z-index"))}))})(t)},yN=e=>{(e=>{nt(e.element).filter(je).each((e=>{_t(e,bN).fold((()=>Lt(e,"z-index")),(t=>Mt(e,"z-index",t))),Et(e,bN)}))})(e),e.getSystem().removeFromGui(e)},xN=(e,t,o)=>e.getSystem().build(gC.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[t]},events:o}));var wN=_s("snaps",[ds("getSnapPoints"),el("onSensor"),ds("leftAttr"),ds("topAttr"),Ts("lazyViewport",Zo),Ts("mustSnap",!1)]);const SN=[Ts("useFixed",T),ds("blockerClass"),Ts("getTarget",w),Ts("onDrag",b),Ts("repositionTarget",!0),Ts("onDrop",b),Is("getBounds",Zo),wN],kN=e=>((e,t,o,n)=>e.isSome()&&t.isSome()&&o.isSome()?D.some(n(e.getOrDie(),t.getOrDie(),o.getOrDie())):D.none())(Nt(e,"left"),Nt(e,"top"),Nt(e,"position"),((e,t,o)=>("fixed"===o?lN:aN)(parseInt(e,10),parseInt(t,10)))).getOrThunk((()=>{const t=Yt(e);return iN(t.left,t.top)})),CN=(e,t,o,n,s,r,a)=>((e,t,o,n,s)=>{const r=s.bounds,a=oN(t,o,n),i=vl(a.left,r.x,r.x+r.width-s.width),l=vl(a.top,r.y,r.y+r.height-s.height),c=iN(i,l);return t.fold((()=>{const e=nN(c,o,n);return aN(e.left,e.top)}),x(c),(()=>{const e=tN(c,o,n);return lN(e.left,e.top)}))})(0,t.fold((()=>{const e=(t=o,a=r.left,i=r.top,t.fold(((e,t)=>aN(e+a,t+i)),((e,t)=>iN(e+a,t+i)),((e,t)=>lN(e+a,t+i))));var t,a,i;const l=tN(e,n,s);return lN(l.left,l.top)}),(t=>{const a=uN(e,t,o,r,n,s);return a.extra.each((o=>{t.onSensor(e,o)})),a.coord})),n,s,a),ON=(e,t)=>({bounds:e.getBounds(),height:jt(t.element),width:Zt(t.element)}),_N=(e,t,o,n,s)=>{const r=o.update(n,s),a=o.getStartData().getOrThunk((()=>ON(t,e)));r.each((o=>{((e,t,o,n)=>{const s=t.getTarget(e.element);if(t.repositionTarget){const r=Qe(e.element),a=Ho(r),i=QA(s),l=kN(s),c=CN(e,t.snaps,l,a,i,n,o),d=sN(c,0,i);It(s,d)}t.onDrag(e,s,n)})(e,t,a,o)}))},TN=(e,t,o,n)=>{t.each(yN),o.snaps.each((t=>{mN(e,t)}));const s=o.getTarget(e.element);n.reset(),o.onDrop(e,s)},EN=e=>(t,o)=>{const n=e=>{o.setStartData(ON(t,e))};return Kr([Qr(Mr(),(e=>{o.getStartData().each((()=>n(e)))})),...e(t,o,n)])};var DN=Object.freeze({__proto__:null,getData:e=>D.from($t(e.x,e.y)),getDelta:(e,t)=>$t(t.left-e.left,t.top-e.top)});const AN=(e,t,o)=>[Qr(er(),((n,s)=>{if(0!==s.event.raw.button)return;s.stop();const r=()=>TN(n,D.some(l),e,t),a=tC(r,200),i={drop:r,delayDrop:a.schedule,forceDrop:r,move:o=>{a.cancel(),_N(n,e,t,DN,o)}},l=xN(n,e.blockerClass,(e=>Kr([Qr(er(),e.forceDrop),Qr(nr(),e.drop),Qr(tr(),((t,o)=>{e.move(o.event)})),Qr(or(),e.delayDrop)]))(i));o(n),vN(n,l)}))],MN=[...SN,sl("dragger",{handlers:EN(AN)})];var BN=Object.freeze({__proto__:null,getData:e=>{const t=e.raw.touches;return 1===t.length?(e=>{const t=e[0];return D.some($t(t.clientX,t.clientY))})(t):D.none()},getDelta:(e,t)=>$t(t.left-e.left,t.top-e.top)});const IN=(e,t,o)=>{const n=Cc(),s=o=>{TN(o,n.get(),e,t),n.clear()};return[Qr(Ks(),((r,a)=>{a.stop();const i=()=>s(r),l={drop:i,delayDrop:b,forceDrop:i,move:o=>{_N(r,e,t,BN,o)}},c=xN(r,e.blockerClass,(e=>Kr([Qr(Ks(),e.forceDrop),Qr(Zs(),e.drop),Qr(Qs(),e.drop),Qr(Js(),((t,o)=>{e.move(o.event)}))]))(l));n.set(c);o(r),vN(r,c)})),Qr(Js(),((o,n)=>{n.stop(),_N(o,e,t,BN,n.event)})),Qr(Zs(),((e,t)=>{t.stop(),s(e)})),Qr(Qs(),s)]},FN=MN,RN=[...SN,sl("dragger",{handlers:EN(IN)})],NN=[...SN,sl("dragger",{handlers:EN(((e,t,o)=>[...AN(e,t,o),...IN(e,t,o)]))})];var VN=Object.freeze({__proto__:null,mouse:FN,touch:RN,mouseOrTouch:NN});var zN=Object.freeze({__proto__:null,init:()=>{let e=D.none(),t=D.none();const o=x({});return Va({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 LN=Jl({branchKey:"mode",branches:VN,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:zN,apis:fN}),HN=(e,t,o,n,s,r)=>e.fold((()=>LN.snap({sensor:iN(o-20,n-20),range:$t(s,r),output:iN(D.some(o),D.some(n)),extra:{td:t}})),(e=>{const s=o-20,r=n-20,a=e.element.dom.getBoundingClientRect();return LN.snap({sensor:iN(s,r),range:$t(40,40),output:iN(D.some(o-a.width/2),D.some(n-a.height/2)),extra:{td:t}})})),PN=(e,t,o)=>({getSnapPoints:e,leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:(e,n)=>{const s=n.td;((e,t)=>e.exists((e=>Je(e,t))))(t.get(),s)||(t.set(s),o(s))},mustSnap:!0}),UN=e=>Ff(Bf.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:ql([LN.config({mode:"mouseOrTouch",blockerClass:"blocker",snaps:e}),$C.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}})),WN=(e,t)=>{const o=Ns([]),n=Ns([]),s=Ns(!1),r=Cc(),a=Cc(),i=e=>{const o=Ko(e);return HN(u.getOpt(t),e,o.x,o.y,o.width,o.height)},l=e=>{const o=Ko(e);return HN(m.getOpt(t),e,o.right,o.bottom,o.width,o.height)},c=PN((()=>L(o.get(),(e=>i(e)))),r,(t=>{a.get().each((o=>{e.dispatch("TableSelectorChange",{start:t,finish:o})}))})),d=PN((()=>L(n.get(),(e=>l(e)))),a,(t=>{r.get().each((o=>{e.dispatch("TableSelectorChange",{start:o,finish:t})}))})),u=UN(c),m=UN(d),g=_i(u.asSpec()),p=_i(m.asSpec()),h=(t,o,n,s)=>{const r=n(o);LN.snapTo(t,r);((t,o,n,s)=>{const r=o.dom.getBoundingClientRect();Lt(t.element,"display");const a=ot(Re.fromDom(e.getBody())).dom.innerHeight,i=n(r),l=s(r,a);(i||l)&&Mt(t.element,"display","none")})(t,o,(e=>e[s]<0),((e,t)=>e[s]>t))},f=e=>h(g,e,i,"top"),b=e=>h(p,e,l,"bottom");Do().deviceType.isTouch()&&(e.on("TableSelectionChange",(e=>{s.get()||(mu(t,g),mu(t,p),s.set(!0)),r.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",(()=>{r.get().each(f),a.get().each(b)})),e.on("TableSelectionClear",(()=>{s.get()&&(hu(g),hu(p),s.set(!1)),r.clear(),a.clear()})))};const jN=(e,t,o)=>{var n;const s=null!==(n=t.delimiter)&&void 0!==n?n:"",r=t=>j(t,((t,n,r)=>{const a=((t,n,s)=>Bf.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{"data-index":s,"aria-level":s+1}},components:[Si(t)],action:t=>{e.focus(),e.selection.select(n),e.nodeChanged()},buttonBehaviours:ql([fw(o.isDisabled),pw()])}))(n.name,n.element,r);return 0===r?t.concat([a]):t.concat([{dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0}},components:[Si(` ${s} `)]},a])}),[]);return{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:ql([Th.config({mode:"flow",selector:"div[role=button]"}),xg.config({disabled:o.isDisabled}),pw(),xC.config({}),Nh.config({}),Vh("elementPathEvents",[ia(((t,o)=>{e.shortcuts.add("alt+F11","focus statusbar elementpath",(()=>Th.focusIn(t))),e.on("NodeChange",(o=>{const n=(t=>{const o=[];let n=t.length;for(;n-- >0;){const r=t[n];if(1===r.nodeType&&"BR"!==(s=r).nodeName&&!s.getAttribute("data-mce-bogus")&&"bookmark"!==s.getAttribute("data-mce-type")){const t=dS(e,r);if(t.isDefaultPrevented()||o.push({name:t.name,element:r}),t.isPropagationStopped())break}}var s;return o})(o.parents),s=n.length>0?r(n):[];Nh.set(t,s)}))}))])]),components:[]}};var GN;!function(e){e[e.None=0]="None",e[e.Both=1]="Both",e[e.Vertical=2]="Vertical"}(GN||(GN={}));const $N=(e,t,o)=>{const n=Re.fromDom(e.getContainer()),s=((e,t,o,n,s)=>{const r={height:NF(n+t.top,ov(e),sv(e))};return o===GN.Both&&(r.width=NF(s+t.left,tv(e),nv(e))),r})(e,t,o,Wt(n),Jt(n));le(s,((e,t)=>{h(e)&&Mt(n,t,RF(e))})),(e=>{e.dispatch("ResizeEditor")})(e)},qN=(e,t,o,n)=>{const s=$t(20*o,20*n);return $N(e,s,t),D.some(!0)},YN=(e,t)=>{const o=(e=>{const t=Av(e);return!1===t?GN.None:"both"===t?GN.Both:GN.Vertical})(e);if(o===GN.None)return D.none();const n=o===GN.Both?"Press the arrow keys to resize the editor.":"Press the Up and Down arrow keys to resize the editor.";return D.some(Pb("resize-handle",{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{title:t.translate("Resize"),"aria-label":t.translate(n)},behaviours:[LN.config({mode:"mouse",repositionTarget:!1,onDrag:(t,n,s)=>$N(e,s,o),blockerClass:"tox-blocker"}),Th.config({mode:"special",onLeft:()=>qN(e,o,-1,0),onRight:()=>qN(e,o,1,0),onUp:()=>qN(e,o,0,-1),onDown:()=>qN(e,o,0,1)}),xC.config({}),Uh.config({})]},t.icons))},XN=(e,t)=>{const o=()=>{const o=[];return e.hasPlugin("wordcount")&&o.push(((e,t)=>{const o=(e,o,n)=>Nh.set(e,[Si(t.translate(["{0} "+n,o[n]]))]);return Bf.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:ql([fw(t.isDisabled),pw(),xC.config({}),Nh.config({}),Ju.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),Vh("wordcount-events",[da((e=>{const t=Ju.getValue(e),n="words"===t.mode?"characters":"words";Ju.setValue(e,{mode:n,count:t.count}),o(e,t.count,n)})),ia((t=>{e.on("wordCountUpdate",(e=>{const{mode:n}=Ju.getValue(t);Ju.setValue(t,{mode:n,count:e.wordCount}),o(t,e.wordCount,n)}))}))])]),eventOrder:{[Sr()]:["disabling","alloy.base.behaviour","wordcount-events"]}})})(e,t)),Dv(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":Bb.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:ql([Uh.config({})])}]}),{dom:{tag:"div",classes:["tox-statusbar__right-container"]},components:o}},n=()=>{const n=[],s=Fv(e),r=Ev(e),a=Dv(e)||e.hasPlugin("wordcount"),i=()=>{const e="tox-statusbar__text-container--flex-start",t="tox-statusbar__text-container--flex-end";if(s){const o="tox-statusbar__text-container-3-cols";return a||r?a&&!r?[o,t]:[o,e]:[o,"tox-statusbar__text-container--space-around"]}return[a&&!r?t:e]};return r&&n.push(jN(e,{},t)),s&&n.push((()=>{const e=Tw("Alt+0");return{dom:{tag:"div",classes:["tox-statusbar__help-text"]},components:[Si(Bb.translate(["Press {0} for help",e]))]}})()),a&&n.push(o()),n.length>0?[{dom:{tag:"div",classes:["tox-statusbar__text-container",...i()]},components:n}]:[]};return{dom:{tag:"div",classes:["tox-statusbar"]},components:(()=>{const o=n(),s=YN(e,t);return o.concat(s.toArray())})()}},KN=(e,t)=>t.get().getOrDie(`UI for ${e} has not been rendered`),JN=(e,t)=>{const o=e.inline,n=o?WF:IF,s=Xv(e)?LM:JA,r=(()=>{const e=Cc(),t=Cc(),o=Cc();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=>Je(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=Cc(),i=Cc(),l=Cc(),c=Do().deviceType.isTouch()?["tox-platform-touch"]:[],d=jv(e),u=dv(e),m=Ff({dom:{tag:"div",classes:["tox-anchorbar"]}}),g=Ff({dom:{tag:"div",classes:["tox-bottom-anchorbar"]}}),p=()=>r.mainUi.get().map((e=>e.outerContainer)).bind(vI.getHeader),h=r.lazyGetInOuterOrDie("anchor bar",m.getOpt),f=r.lazyGetInOuterOrDie("bottom anchor bar",g.getOpt),b=r.lazyGetInOuterOrDie("toolbar",vI.getToolbar),v=r.lazyGetInOuterOrDie("throbber",vI.getThrobber),y=zA({popup:()=>on.fromOption(r.popupUi.get().map((e=>e.sink)),"(popup) UI has not been rendered"),dialog:()=>on.fromOption(r.dialogUi.get().map((e=>e.sink)),"UI has not been rendered")},e,h,f),x=()=>vI.parts.promotion({dom:{tag:"div",classes:["tox-promotion"]}}),w=()=>{const t=(()=>{const t={attributes:{[Xc]:d?Yc.BottomToTop:Yc.TopToBottom}},o=vI.parts.menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:y.popup,onEscape:()=>{e.focus()}}),n=vI.parts.toolbar({dom:{tag:"div",classes:["tox-toolbar"]},getSink:y.popup.shared.getSink,providers:y.popup.shared.providers,onEscape:()=>{e.focus()},onToolbarToggled:t=>{((e,t)=>{e.dispatch("ToggleToolbarDrawer",{state:t})})(e,t)},type:u,lazyToolbar:b,lazyHeader:()=>p().getOrDie("Could not find header element"),...t}),s=vI.parts["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},providers:y.popup.shared.providers,onEscape:()=>{e.focus()},type:u}),r=Wv(e),a=Pv(e),i=Vv(e),l=Iv(e),c=x(),g=r||a||i,h=l?[c,o]:[o];return vI.parts.header({dom:{tag:"div",classes:["tox-editor-header"].concat(g?[]:["tox-editor-header--empty"]),...t},components:q([i?h:[],r?[s]:a?[n]:[],$v(e)?[]:[m.asSpec()]]),sticky:Xv(e),editor:e,sharedBackstage:y.popup.shared})})(),n={dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[vI.parts.socket({dom:{tag:"div",classes:["tox-edit-area"]}}),vI.parts.sidebar({dom:{tag:"div",classes:["tox-sidebar"]}})]},s=vI.parts.throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:y.popup}),r=vI.parts.viewWrapper({backstage:y.popup}),i=Tv(e)&&!o?D.some(XN(e,y.popup.shared.providers)):D.none(),l=q([d?[]:[t],o?[]:[n],d?[t]:[]]),h=vI.parts.editorContainer({components:q([l,o?[]:[g.asSpec(),...i.toArray()]])}),f=Yv(e),v={role:"application",...Bb.isRtl()?{dir:"rtl"}:{},...f?{"aria-hidden":"true"}:{}},w=_i(vI.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:v},components:[h,...o?[]:[r],s],behaviours:ql([pw(),xg.config({disableClass:"tox-tinymce--disabled"}),Th.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"})])})),S=pC(w);return a.set(S),{mothership:S,outerContainer:w}},S=t=>{const o=RF(VF(e)),n=RF((e=>zF(e).getOr(ev(e)))(e));return e.inline||(zt("div","width",n)&&Mt(t.element,"width",n),zt("div","height",o)?Mt(t.element,"height",o):Mt(t.element,"height","400px")),o},k=t=>{const{mainUi:o,popupUi:r,uiMotherships:a}=t;ce(uv(e),((t,o)=>{e.ui.registry.addGroupToolbarButton(o,t)}));const{buttons:i,menuItems:l,contextToolbars:c,sidebars:d,views:m}=e.ui.registry.getAll(),g=Uv(e),h={menuItems:l,menus:Jv(e),menubar:bv(e),toolbar:g.getOrThunk((()=>vv(e))),allowToolbarGroups:u===jb.floating,buttons:i,sidebar:d,views:m};var f;f=o.outerContainer,e.addShortcut("alt+F9","focus menubar",(()=>{vI.focusMenubar(f)})),e.addShortcut("alt+F10","focus toolbar",(()=>{vI.focusToolbar(f)})),e.addCommand("ToggleToolbarDrawer",((e,t)=>{(null==t?void 0:t.skipFocus)?vI.toggleToolbarDrawerWithoutFocusing(f):vI.toggleToolbarDrawer(f)})),e.addQueryStateHandler("ToggleToolbarDrawer",(()=>vI.isToolbarDrawerToggled(f))),((e,t,o)=>{const n=(e,n)=>{H([t,...o],(t=>{t.broadcastEvent(e,n)}))},s=(e,n)=>{H([t,...o],(t=>{t.broadcastOn([e],n)}))},r=e=>s(Bu(),{target:e.target}),a=jo(),i=_c(a,"touchstart",r),l=_c(a,"touchmove",(e=>n(Dr(),e))),c=_c(a,"touchend",(e=>n(Ar(),e))),d=_c(a,"mousedown",r),u=_c(a,"mouseup",(e=>{0===e.raw.button&&s(Fu(),{target:e.target})})),m=e=>s(Bu(),{target:Re.fromDom(e.target)}),g=e=>{0===e.button&&s(Fu(),{target:Re.fromDom(e.target)})},p=()=>{H(e.editorManager.get(),(t=>{e!==t&&t.dispatch("DismissPopups",{relatedTarget:e})}))},h=e=>n(Mr(),Ec(e)),f=e=>{s(Iu(),{}),n(Br(),Ec(e))},b=pt(Re.fromDom(e.getElement())),v=Tc(b,"scroll",(o=>{requestAnimationFrame((()=>{if(null!=e.getContainer()){const s=Zk(e,t.element).map((e=>[e.element,...e.others])).getOr([]);N(s,(e=>Je(e,o.target)))&&(e.dispatch("ElementScroll",{target:o.target.dom}),n(Lr(),o))}}))})),y=()=>s(Iu(),{}),x=t=>{t.state&&s(Bu(),{target:Re.fromDom(e.getContainer())})},w=e=>{s(Bu(),{target:Re.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",(()=>{H([t,...o],xu),H([t,...o],(e=>e.destroy()))}))})(e,o.mothership,a),s.setup(e,y.popup.shared,p),TR(e,y.popup),KR(e,y.popup.shared.getSink,y.popup),(e=>{const{sidebars:t}=e.ui.registry.getAll();H(ae(t),(o=>{const n=t[o],s=()=>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(s())},onSetup:t=>{t.setActive(s());const o=()=>t.setActive(s());return e.on("ToggleSidebar",o),()=>{e.off("ToggleSidebar",o)}}})}))})(e),uB(e,v,y.popup.shared),mR(e,c,r.sink,{backstage:y.popup}),WN(e,r.sink);const b={targetNode:e.getElement(),height:S(o.outerContainer)};return n.render(e,t,h,y.popup,b)};return{popups:{backstage:y.popup,getMothership:()=>KN("popups",l)},dialogs:{backstage:y.dialog,getMothership:()=>KN("dialogs",i)},renderUI:()=>{const o=w(),n=(()=>{const t=qv(e),o=Je(xt(),t)&&"grid"===Ft(t,"display"),n={dom:{tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(c),attributes:{...Bb.isRtl()?{dir:"rtl"}:{}}},behaviours:ql([su.config({useFixed:()=>s.isDocked(p)})])},r={dom:{styles:{width:document.body.clientWidth+"px"}},events:Kr([Qr(Br(),(e=>{Mt(e.element,"width",document.body.clientWidth+"px")}))])},a=_i(wn(n,o?r:{})),l=pC(a);return i.set(l),{sink:a,mothership:l}})(),a=Kv(e)?(()=>{const e={dom:{tag:"div",classes:["tox","tox-silver-sink","tox-silver-popup-sink","tox-tinymce-aux"].concat(c),attributes:{...Bb.isRtl()?{dir:"rtl"}:{}}},behaviours:ql([su.config({useFixed:()=>s.isDocked(p),getBounds:()=>t.getPopupSinkBounds()})])},o=_i(e),n=pC(o);return l.set(n),{sink:o,mothership:n}})():(e=>(l.set(e.mothership),e))(n);r.dialogUi.set(n),r.popupUi.set(a),r.mainUi.set(o);const d={popupUi:a,dialogUi:n,mainUi:o,uiMotherships:r.getUiMotherships()};return k(d)}}},ZN=x([ds("lazySink"),ys("dragBlockClass"),Is("getBounds",Zo),Ts("useTabstopAt",E),Ts("firstTabstop",0),Ts("eventOrder",{}),Zu("modalBehaviours",[Th]),tl("onExecute"),nl("onEscape")]),QN={sketch:w},eV=x([Dm({name:"draghandle",overrides:(e,t)=>({behaviours:ql([LN.config({mode:"mouse",getTarget:e=>Bi(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})])})}),Tm({schema:[ds("dom")],name:"title"}),Tm({factory:QN,schema:[ds("dom")],name:"close"}),Tm({factory:QN,schema:[ds("dom")],name:"body"}),Dm({factory:QN,schema:[ds("dom")],name:"footer"}),Em({factory:{sketch:(e,t)=>({...e,dom:t.dom,components:t.components})},schema:[Ts("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),Ts("components",[])],name:"blocker"})]),tV=og({name:"ModalDialog",configFields:ZN(),partFields:eV(),factory:(e,t,o,n)=>{const s=Cc(),r=ya("modal-events"),a={...e.eventOrder,[Ir()]:[r].concat(e.eventOrder["alloy.system.attached"]||[])};return{uid:e.uid,dom:e.dom,components:t,apis:{show:t=>{s.set(t);const o=e.lazySink(t).getOrDie(),r=n.blocker(),a=o.getSystem().build({...r,components:r.components.concat([Ti(t)]),behaviours:ql([Uh.config({}),Vh("dialog-blocker-events",[aa(rr(),(()=>{lB.isBlocked(t)||Th.focusIn(t)}))])])});mu(o,a),Th.focusIn(t)},hide:e=>{s.clear(),nt(e.element).each((t=>{e.getSystem().getByDom(t).each((e=>{hu(e)}))}))},getBody:t=>Um(t,e,"body"),getFooter:t=>Pm(t,e,"footer"),setIdle:e=>{lB.unblock(e)},setBusy:(e,t)=>{lB.block(e,t)}},eventOrder:a,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:em(e.modalBehaviours,[Nh.config({}),Th.config({mode:"cyclic",onEnter:e.onExecute,onEscape:e.onEscape,useTabstopAt:e.useTabstopAt,firstTabstop:e.firstTabstop}),lB.config({getRoot:s.get}),Vh(r,[ia((t=>{((e,t)=>{const o=_t(e,"id").fold((()=>{const e=ya("dialog-label");return kt(t,"id",e),e}),w);kt(e,"aria-labelledby",o)})(t.element,Um(t,e,"title").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)}}}),oV=zn([jy,Gy].concat(Hx)),nV=qn,sV=[bx("button"),sx,Ms("align","end",["start","end"]),mx,ux,ks("buttonType",["primary","secondary"])],rV=[...sV,qy],aV=[ps("type",["submit","cancel","custom"]),...rV],iV=[ps("type",["menu"]),nx,rx,sx,vs("items",oV),...sV],lV=[...sV,ps("type",["togglebutton"]),gs("tooltip"),sx,nx,Bs("active",!1)],cV=rs("type",{submit:aV,cancel:aV,custom:aV,menu:iV,togglebutton:lV}),dV=[jy,qy,ps("level",["info","warn","error","success"]),Xy,Ts("url","")],uV=zn(dV),mV=[jy,qy,ux,bx("button"),sx,dx,ks("buttonType",["primary","secondary","toolbar"]),mx],gV=zn(mV),pV=[jy,Gy],hV=pV.concat([ax]),fV=pV.concat([$y,ux]),bV=zn(fV),vV=qn,yV=hV.concat([gx("auto")]),xV=zn(yV),wV=Un([Ky,qy,Xy]),SV=hV.concat([As("storageKey","default")]),kV=zn(SV),CV=$n,OV=zn(hV),_V=$n,TV=pV.concat([As("tag","textarea"),gs("scriptId"),gs("scriptUrl"),((e,t)=>Es(e,t,Kn))("settings",void 0)]),EV=pV.concat([As("tag","textarea"),hs("init")]),DV=Qn((e=>ts("customeditor.old",Vn(EV),e).orThunk((()=>ts("customeditor.new",Vn(TV),e))))),AV=$n,MV=zn(hV),BV=Ln(Mn),IV=e=>[jy,ms("columns"),e],FV=[jy,gs("html"),Ms("presets","presentation",["presentation","document"])],RV=zn(FV),NV=hV.concat([Bs("border",!1),Bs("sandboxed",!0),Bs("streamContent",!1),Bs("transparent",!0)]),VV=zn(NV),zV=$n,LV=zn(pV.concat([Ss("height")])),HV=zn([gs("url"),ws("zoom"),ws("cachedWidth"),ws("cachedHeight")]),PV=hV.concat([Ss("inputMode"),Ss("placeholder"),Bs("maximized",!1),ux]),UV=zn(PV),WV=$n,jV=e=>[jy,$y,e,Ms("align","start",["start","center","end"])],GV=[qy,Ky],$V=[qy,vs("items",as(0,(()=>qV)))],qV=Hn([zn(GV),zn($V)]),YV=hV.concat([vs("items",qV),ux]),XV=zn(YV),KV=$n,JV=hV.concat([bs("items",[qy,Ky]),Ds("size",1),ux]),ZV=zn(JV),QV=$n,ez=hV.concat([Bs("constrain",!0),ux]),tz=zn(ez),oz=zn([gs("width"),gs("height")]),nz=pV.concat([$y,Ds("min",0),Ds("max",0)]),sz=zn(nz),rz=Gn,az=[jy,vs("header",$n),vs("cells",Ln($n))],iz=zn(az),lz=hV.concat([Ss("placeholder"),Bs("maximized",!1),ux]),cz=zn(lz),dz=$n,uz=[ps("type",["directory","leaf"]),Yy,gs("id"),xs("menu",UM)],mz=zn(uz),gz=uz.concat([vs("children",as(0,(()=>Zn("type",{directory:pz,leaf:mz}))))]),pz=zn(gz),hz=Zn("type",{directory:pz,leaf:mz}),fz=[jy,vs("items",hz),Cs("onLeafAction"),Cs("onToggleExpand"),Fs("defaultExpandedIds",[],$n),Ss("defaultSelectedId")],bz=zn(fz),vz=hV.concat([Ms("filetype","file",["image","media","file"]),ux,Ss("picker_text")]),yz=zn(vz),xz=zn([Ky,px]),wz=e=>is("items","items",{tag:"required",process:{}},Ln(Qn((t=>ts(`Checking item of ${e}`,Sz,t).fold((e=>on.error(ss(e))),(e=>on.value(e))))))),Sz=Rn((()=>{return Zn("type",{alertbanner:uV,bar:zn((e=wz("bar"),[jy,e])),button:gV,checkbox:bV,colorinput:kV,colorpicker:OV,dropzone:MV,grid:zn(IV(wz("grid"))),iframe:VV,input:UV,listbox:XV,selectbox:ZV,sizeinput:tz,slider:sz,textarea:cz,urlinput:yz,customeditor:DV,htmlpanel:RV,imagepreview:LV,collection:xV,label:zn(jV(wz("label"))),table:iz,tree:bz,panel:Cz});var e})),kz=[jy,Ts("classes",[]),vs("items",Sz)],Cz=zn(kz),Oz=[bx("tab"),Yy,vs("items",Sz)],_z=[jy,bs("tabs",Oz)],Tz=zn(_z),Ez=rV,Dz=cV,Az=zn([gs("title"),us("body",Zn("type",{panel:Cz,tabpanel:Tz})),As("size","normal"),Fs("buttons",[],Dz),Ts("initialData",{}),Is("onAction",b),Is("onChange",b),Is("onSubmit",b),Is("onClose",b),Is("onCancel",b),Is("onTabChange",b)]),Mz=zn([ps("type",["cancel","custom"]),...Ez]),Bz=zn([gs("title"),gs("url"),ws("height"),ws("width"),Os("buttons",Mz),Is("onAction",b),Is("onCancel",b),Is("onClose",b),Is("onMessage",b)]),Iz=e=>a(e)?[e].concat(Y(fe(e),Iz)):l(e)?Y(e,Iz):[],Fz=e=>r(e.type)&&r(e.name),Rz={checkbox:vV,colorinput:CV,colorpicker:_V,dropzone:BV,input:WV,iframe:zV,imagepreview:HV,selectbox:QV,sizeinput:oz,slider:rz,listbox:KV,size:oz,textarea:dz,urlinput:xz,customeditor:AV,collection:wV,togglemenuitem:nV},Nz=e=>{const t=(e=>U(Iz(e),Fz))(e),o=Y(t,(e=>(e=>D.from(Rz[e.type]))(e).fold((()=>[]),(t=>[us(e.name,t)]))));return zn(o)},Vz=e=>{var t;return{internalDialog:os(ts("dialog",Az,e)),dataValidator:Nz(e),initialData:null!==(t=e.initialData)&&void 0!==t?t:{}}},zz={open:(e,t)=>{const o=Vz(t);return e(o.internalDialog,o.initialData,o.dataValidator)},openUrl:(e,t)=>e(os(ts("dialog",Bz,t))),redial:e=>Vz(e)};var Lz=Object.freeze({__proto__:null,events:(e,t)=>{const o=(o,n)=>{e.updateState.each((e=>{const s=e(o,n);t.set(s)})),e.renderComponents.each((s=>{const r=s(n,t.get());(e.reuseDom?Dh:Eh)(o,r)}))};return Kr([Qr(wr(),((t,n)=>{const s=n;if(!s.universal){const n=e.channel;R(s.channels,n)&&o(t,s.data)}})),ia(((t,n)=>{e.initialData.each((e=>{o(t,e)}))}))])}});var Hz=Object.freeze({__proto__:null,getState:(e,t,o)=>o}),Pz=[ds("channel"),ys("renderComponents"),ys("updateState"),ys("initialData"),Bs("reuseDom",!0)];const Uz=Xl({fields:Pz,name:"reflecting",active:Lz,apis:Hz,state:Object.freeze({__proto__:null,init:()=>{const e=Ns(D.none());return{readState:()=>e.get().getOr("none"),get:e.get,set:e.set,clear:()=>e.set(D.none())}}})}),Wz=e=>{const t=[],o={};return le(e,((e,n)=>{e.fold((()=>{t.push(n)}),(e=>{o[n]=e}))})),t.length>0?on.error(t):on.value(o)},jz=(e,t,o)=>{const n=Ff(P_.sketch((n=>({dom:{tag:"div",classes:["tox-form"].concat(e.classes)},components:L(e.items,(e=>CD(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:ql([Th.config({mode:"acyclic",useTabstopAt:C(hT)}),K_(n),Q_(n,{postprocess:e=>Wz(e).fold((e=>(console.error(e),{})),w)}),Vh("dialog-body-panel",[Qr(rr(),((e,t)=>{e.getSystem().broadcastOn([wT],{newFocus:D.some(t.event.target)})}))])])}},Gz=tg({name:"TabButton",configFields:[Ts("uid",void 0),ds("value"),is("dom","dom",On((()=>({attributes:{role:"tab",id:ya("aria"),"aria-selected":"false"}}))),Wn()),ys("action"),Ts("domModification",{}),Zu("tabButtonBehaviours",[Uh,Th,Ju]),ds("view")],factory:(e,t)=>({uid:e.uid,dom:e.dom,components:e.components,events:Qh(e.action),behaviours:em(e.tabButtonBehaviours,[Uh.config({}),Th.config({mode:"execution",useSpace:!0,useEnter:!0}),Ju.config({store:{mode:"memory",initialValue:e.value}})]),domModification:e.domModification})}),$z=x([ds("tabs"),ds("dom"),Ts("clickToDismiss",!1),Zu("tabbarBehaviours",[Mg,Th]),Zi(["tabClass","selectedClass"])]),qz=Am({factory:Gz,name:"tabs",unit:"tab",overrides:e=>{const t=(e,t)=>{Mg.dehighlight(e,t),Gr(e,Pr(),{tabbar:e,button:t})},o=(e,t)=>{Mg.highlight(e,t),Gr(e,Hr(),{tabbar:e,button:t})};return{action:n=>{const s=n.getSystem().getByUid(e.uid).getOrDie(),r=Mg.isHighlighted(s,n);(r&&e.clickToDismiss?t:r?b:o)(s,n)},domModification:{classes:[e.markers.tabClass]}}}}),Yz=x([qz]),Xz=og({name:"Tabbar",configFields:$z(),partFields:Yz(),factory:(e,t,o,n)=>({uid:e.uid,dom:e.dom,components:t,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:em(e.tabbarBehaviours,[Mg.config({highlightClass:e.markers.selectedClass,itemClass:e.markers.tabClass,onHighlight:(e,t)=>{kt(t.element,"aria-selected","true")},onDehighlight:(e,t)=>{kt(t.element,"aria-selected","false")}}),Th.config({mode:"flow",getInitial:e=>Mg.getHighlighted(e).map((e=>e.element)),selector:"."+e.markers.tabClass,executeOnMove:!0})])})}),Kz=tg({name:"Tabview",configFields:[Zu("tabviewBehaviours",[Nh])],factory:(e,t)=>({uid:e.uid,dom:e.dom,behaviours:em(e.tabviewBehaviours,[Nh.config({})]),domModification:{attributes:{role:"tabpanel"}}})}),Jz=x([Ts("selectFirst",!0),el("onChangeTab"),el("onDismissTab"),Ts("tabs",[]),Zu("tabSectionBehaviours",[])]),Zz=Tm({factory:Xz,schema:[ds("dom"),fs("markers",[ds("tabClass"),ds("selectedClass")])],name:"tabbar",defaults:e=>({tabs:e.tabs})}),Qz=Tm({factory:Kz,name:"tabview"}),eL=x([Zz,Qz]),tL=og({name:"TabSection",configFields:Jz(),partFields:eL(),factory:(e,t,o,n)=>{const s=(t,o)=>{Pm(t,e,"tabbar").each((e=>{o(e).each($r)}))};return{uid:e.uid,dom:e.dom,components:t,behaviours:Qu(e.tabSectionBehaviours),events:Kr(q([e.selectFirst?[ia(((e,t)=>{s(e,Mg.getFirst)}))]:[],[Qr(Hr(),((t,o)=>{(t=>{const o=Ju.getValue(t);Pm(t,e,"tabview").each((n=>{const s=G(e.tabs,(e=>e.value===o));s.each((o=>{const s=o.view();_t(t.element,"id").each((e=>{kt(n.element,"aria-labelledby",e)})),Nh.set(n,s),e.onChangeTab(n,t,s)}))}))})(o.event.button)})),Qr(Pr(),((t,o)=>{const n=o.event.button;e.onDismissTab(t,n)}))]])),apis:{getViewItems:t=>Pm(t,e,"tabview").map((e=>Nh.contents(e))).getOr([]),showTab:(e,t)=>{s(e,(e=>{const o=Mg.getCandidates(e);return G(o,(e=>Ju.getValue(e)===t)).filter((t=>!Mg.isHighlighted(e,t)))}))}}}},apis:{getViewItems:(e,t)=>e.getViewItems(t),showTab:(e,t,o)=>{e.showTab(t,o)}}}),oL=(e,t)=>{Mt(e,"height",t+"px"),Mt(e,"flex-basis",t+"px")},nL=(e,t,o)=>{Bi(e,'[role="dialog"]').each((e=>{Fi(e,'[role="tablist"]').each((n=>{o.get().map((o=>(Mt(t,"height","0"),Mt(t,"flex-basis","0"),Math.min(o,((e,t,o)=>{const n=tt(e).dom,s=Bi(e,".tox-dialog-wrap").getOr(e);let r;r="fixed"===Ft(s,"position")?Math.max(n.clientHeight,window.innerHeight):Math.max(n.offsetHeight,n.scrollHeight);const a=Wt(t),i=t.dom.offsetLeft>=o.dom.offsetLeft+Jt(o)?Math.max(Wt(o),a):a,l=parseInt(Ft(e,"margin-top"),10)||0,c=parseInt(Ft(e,"margin-bottom"),10)||0;return r-(Wt(e)+l+c-i)})(e,t,n))))).each((e=>{oL(t,e)}))}))}))},sL=e=>Fi(e,'[role="tabpanel"]'),rL=e=>{const t=Cc(),o=[ia((o=>{const n=o.element;sL(n).each((s=>{Mt(s,"visibility","hidden"),o.getSystem().getByDom(s).toOptional().each((o=>{const n=((e,t,o)=>L(e,((n,s)=>{Nh.set(o,e[s].view());const r=t.dom.getBoundingClientRect();return Nh.set(o,[]),r.height})))(e,s,o),r=(e=>oe(ee(e,((e,t)=>e>t?-1:e<t?1:0))))(n);r.fold(t.clear,t.set)})),nL(n,s,t),Lt(s,"visibility"),((e,t)=>{oe(e).each((e=>tL.showTab(t,e.value)))})(e,o),requestAnimationFrame((()=>{nL(n,s,t)}))}))})),Qr(Br(),(e=>{const o=e.element;sL(o).each((e=>{nL(o,e,t)}))})),Qr(FC,((e,o)=>{const n=e.element;sL(n).each((e=>{const o=sc(pt(e));Mt(e,"visibility","hidden");const s=Nt(e,"height").map((e=>parseInt(e,10)));Lt(e,"height"),Lt(e,"flex-basis");const r=e.dom.getBoundingClientRect().height;s.forall((e=>r>e))?(t.set(r),nL(n,e,t)):s.each((t=>{oL(e,t)})),Lt(e,"visibility"),o.each(tc)}))}))];return{extraEvents:o,selectFirst:!1}},aL="send-data-to-section",iL="send-data-to-view",lL=(e,t,o)=>{const n=Ns({}),s=e=>{const t=Ju.getValue(e),o=Wz(t).getOr({}),s=n.get(),r=wn(s,o);n.set(r)},r=e=>{const t=n.get();Ju.setValue(e,t)},a=Ns(null),i=L(e.tabs,(e=>({value:e.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"]},components:[Si(o.shared.providers.translate(e.title))],view:()=>[P_.sketch((n=>({dom:{tag:"div",classes:["tox-form"]},components:L(e.items,(e=>CD(n,e,t,o))),formBehaviours:ql([Th.config({mode:"acyclic",useTabstopAt:C(hT)}),Vh("TabView.form.events",[ia(r),la(s)]),Ql.config({channels:Hs([{key:aL,value:{onReceive:s}},{key:iL,value:{onReceive:r}}])})])})))]}))),l=rL(i);return tL.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:(e,t,o)=>{const n=Ju.getValue(t);Gr(e,IC,{name:n,oldName:a.get()}),a.set(n)},tabs:i,components:[tL.parts.tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[Xz.parts.tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:ql([xC.config({})])}),tL.parts.tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:l.selectFirst,tabSectionBehaviours:ql([Vh("tabpanel",l.extraEvents),Th.config({mode:"acyclic"}),ag.config({find:e=>oe(tL.getViewItems(e))}),eT(D.none(),(e=>(e.getSystem().broadcastOn([aL],{}),n.get())),((e,t)=>{n.set(t),e.getSystem().broadcastOn([iL],{})}))])})},cL=(e,t,o,n,s)=>({dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:{...o.map((e=>({id:e}))).getOr({}),...s?{"aria-live":"polite"}:{}}},components:[],behaviours:ql([J_(0),Uz.config({channel:`${vT}-${t}`,updateState:(e,t)=>D.some({isTabPanel:()=>"tabpanel"===t.body.type}),renderComponents:e=>{const t=e.body;return"tabpanel"===t.type?[lL(t,e.initialData,n)]:[jz(t,e.initialData,n)]},initialData:e})])}),dL=Yb.deviceType.isTouch(),uL=(e,t)=>({dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[e,t]}),mL=(e,t)=>tV.parts.close(Bf.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close")}},action:e,buttonBehaviours:ql([xC.config({})])})),gL=()=>tV.parts.title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}}),pL=(e,t)=>tV.parts.body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:If(`<p>${Mb(t.translate(e))}</p>`)}]}]}),hL=e=>tV.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:e}),fL=(e,t)=>[gC.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:e}),gC.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:t})],bL=e=>{const t="tox-dialog",o=t+"-wrap",n=o+"__backdrop",s=t+"__disable-scroll";return tV.sketch({lazySink:e.lazySink,onEscape:t=>(e.onEscape(t),D.some(!0)),useTabstopAt:e=>!hT(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:If(`<div class="${o}"></div>`),components:[{dom:{tag:"div",classes:dL?[n,n+"--opaque"]:[n]}}]}},dragBlockClass:o,modalBehaviours:ql([Uh.config({}),Vh("dialog-events",e.dialogEvents.concat([aa(rr(),((e,t)=>{lB.isBlocked(e)||Th.focusIn(e)})),Qr(Vr(),((e,t)=>{e.getSystem().broadcastOn([wT],{newFocus:t.event.newFocus})}))])),Vh("scroll-lock",[ia((()=>{ti(xt(),s)})),la((()=>{ni(xt(),s)}))]),...e.extraBehaviours]),eventOrder:{[Sr()]:["dialog-events"],[Ir()]:["scroll-lock","dialog-events","alloy.base.behaviour"],[Fr()]:["alloy.base.behaviour","dialog-events","scroll-lock"],...e.eventOrder}})},vL=e=>Bf.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:ql([xC.config({})]),components:[Pb("close",{tag:"span",classes:["tox-icon"]},e.icons)],action:e=>{jr(e,EC)}}),yL=(e,t,o,n)=>({dom:{tag:"div",classes:["tox-dialog__title"],attributes:{...o.map((e=>({id:e}))).getOr({})}},components:[],behaviours:ql([Uz.config({channel:`${bT}-${t}`,initialData:e,renderComponents:e=>[Si(n.translate(e.title))]})])}),xL=()=>({dom:If('<div class="tox-dialog__draghandle"></div>')}),wL=(e,t,o)=>((e,t,o)=>{const n=tV.parts.title(yL(e,t,D.none(),o)),s=tV.parts.draghandle(xL()),r=tV.parts.close(vL(o)),a=[n].concat(e.draggable?[s]:[]).concat([r]);return gC.sketch({dom:If('<div class="tox-dialog__header"></div>'),components:a})})({title:o.shared.providers.translate(e),draggable:o.dialog.isDraggableModal()},t,o.shared.providers),SL=(e,t,o,n)=>({dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":o.translate(e)},styles:{left:"0px",right:"0px",bottom:"0px",top:`${n.getOr(0)}px`,position:"absolute"}},behaviours:t,components:[{dom:If('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}),kL=(e,t,o)=>({onClose:()=>o.closeWindow(),onBlock:o=>{const n=Fi(e().element,".tox-dialog__header").map((e=>Wt(e)));tV.setBusy(e(),((e,s)=>SL(o.message,s,t,n)))},onUnblock:()=>{tV.setIdle(e())}}),CL="tox-dialog--fullscreen",OL="tox-dialog--width-lg",_L="tox-dialog--width-md",TL=e=>{switch(e){case"large":return D.some(OL);case"medium":return D.some(_L);default:return D.none()}},EL=(e,t)=>{const o=Re.fromDom(t.element.dom);ri(o,CL)||(ii(o,[OL,_L]),TL(e).each((e=>ti(o,e))))},DL=(e,t)=>{const o=Re.fromDom(e.element.dom),n=li(o),s=G(n,(e=>e===OL||e===_L)).or(TL(t));((e,t)=>{H(t,(t=>{si(e,t)}))})(o,[CL,...s.toArray()])},AL=(e,t,o)=>_i(bL({...e,firstTabstop:1,lazySink:o.shared.getSink,extraBehaviours:[oT({}),...e.extraBehaviours],onEscape:e=>{jr(e,EC)},dialogEvents:t,eventOrder:{[wr()]:[Uz.name(),Ql.name()],[Ir()]:["scroll-lock",Uz.name(),"messages","dialog-events","alloy.base.behaviour"],[Fr()]:["alloy.base.behaviour","dialog-events","messages",Uz.name(),"scroll-lock"]}})),ML=(e,t={})=>L(e,(e=>"menu"===e.type?(e=>{const o=L(e.items,(e=>{const o=be(t,e.name).getOr(Ns(!1));return{...e,storage:o}}));return{...e,items:o}})(e):e)),BL=e=>j(e,((e,t)=>{if("menu"===t.type){return j(t.items,((e,t)=>(e[t.name]=t.storage,e)),e)}return e}),{}),IL=(e,t)=>[na(rr(),pT),e(TC,((e,o,n,s)=>{sc(pt(s.element)).fold(b,oc),t.onClose(),o.onClose()})),e(EC,((e,t,o,n)=>{t.onCancel(e),jr(n,TC)})),Qr(BC,((e,o)=>t.onUnblock())),Qr(MC,((e,o)=>t.onBlock(o.event)))],FL=(e,t,o)=>{const n=(t,o)=>Qr(t,((t,n)=>{s(t,((s,r)=>{o(e(),s,n.event,t)}))})),s=(e,t)=>{Uz.getState(e).get().each((o=>{t(o.internalDialog,e)}))};return[...IL(n,t),n(AC,((e,t)=>t.onSubmit(e))),n(_C,((e,t,o)=>{t.onChange(e,{name:o.name})})),n(DC,((e,t,n,s)=>{const r=()=>s.getSystem().isConnected()?Th.focusIn(s):void 0,a=e=>Tt(e,"disabled")||_t(e,"aria-disabled").exists((e=>"true"===e)),i=pt(s.element),l=sc(i);t.onAction(e,{name:n.name,value:n.value}),sc(i).fold(r,(e=>{a(e)||l.exists((t=>Ze(e,t)&&a(t)))?r():o().toOptional().filter((t=>!Ze(t.element,e))).each(r)}))})),n(IC,((e,t,o)=>{t.onTabChange(e,{newTabName:o.name,oldTabName:o.oldName})})),la((t=>{const o=e();Ju.setValue(t,o.getData())}))]},RL=(e,t)=>{const o=t.map((e=>e.footerButtons)).getOr([]),n=P(o,(e=>"start"===e.align)),s=(e,t)=>gC.sketch({dom:{tag:"div",classes:[`tox-dialog__footer-${e}`]},components:L(t,(e=>e.memento.asSpec()))});return[s("start",n.pass),s("end",n.fail)]},NL=(e,t,o)=>({dom:If('<div class="tox-dialog__footer"></div>'),components:[],behaviours:ql([Uz.config({channel:`${yT}-${t}`,initialData:e,updateState:(e,t)=>{const n=L(t.buttons,(e=>{const t=Ff(((e,t)=>aD(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:RL})])}),VL=(e,t,o)=>tV.parts.footer(NL(e,t,o)),zL=(e,t)=>{if(e.getRoot().getSystem().isConnected()){const o=ag.getCurrent(e.getFormWrapper()).getOr(e.getFormWrapper());return P_.getField(o,t).orThunk((()=>{const o=e.getFooter().bind((e=>Uz.getState(e).get()));return o.bind((e=>e.lookupByName(t)))}))}return D.none()},LL=(e,t,o)=>{const n=t=>{const o=e.getRoot();o.getSystem().isConnected()&&t(o)},s={getData:()=>{const t=e.getRoot(),n=t.getSystem().isConnected()?e.getFormWrapper():t;return{...Ju.getValue(n),...ce(o,(e=>e.get()))}},setData:t=>{n((n=>{const r=s.getData(),a=wn(r,t),i=((e,t)=>{const o=e.getRoot();return Uz.getState(o).get().map((e=>os(ts("data",e.dataValidator,t)))).getOr(t)})(e,a),l=e.getFormWrapper();Ju.setValue(l,i),le(o,((e,t)=>{ve(a,t)&&e.set(a[t])}))}))},setEnabled:(t,o)=>{zL(e,t).each(o?xg.enable:xg.disable)},focus:t=>{zL(e,t).each(Uh.focus)},block:e=>{if(!r(e))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");n((t=>{Gr(t,MC,{message:e})}))},unblock:()=>{n((e=>{jr(e,BC)}))},showTab:t=>{n((o=>{const n=e.getBody();Uz.getState(n).get().exists((e=>e.isTabPanel()))&&ag.getCurrent(n).each((e=>{tL.showTab(e,t)}))}))},redial:r=>{n((n=>{const a=e.getId(),i=t(r),l=ML(i.internalDialog.buttons,o);n.getSystem().broadcastOn([`${fT}-${a}`],i),n.getSystem().broadcastOn([`${bT}-${a}`],i.internalDialog),n.getSystem().broadcastOn([`${vT}-${a}`],i.internalDialog),n.getSystem().broadcastOn([`${yT}-${a}`],{...i.internalDialog,buttons:l}),s.setData(i.initialData)}))},close:()=>{n((e=>{jr(e,TC)}))},toggleFullscreen:e.toggleFullscreen};return s},HL=(e,t,o)=>{const n=ya("dialog"),s=e.internalDialog,r=wL(s.title,n,o),a=Ns(s.size),i=TL(a.get()).toArray(),l=((e,t,o)=>{const n=cL(e,t,D.none(),o,!1);return tV.parts.body(n)})({body:s.body,initialData:s.initialData},n,o),c=ML(s.buttons),d=BL(c),u=Ce(0!==c.length,VL({buttons:c},n,o)),m=FL((()=>f),kL((()=>p),o.shared.providers,t),o.shared.getSink),g={id:n,header:r,body:l,footer:u,extraClasses:i,extraBehaviours:[Uz.config({channel:`${fT}-${n}`,updateState:(e,t)=>(a.set(t.internalDialog.size),EL(t.internalDialog.size,e),D.some(t)),initialData:e})],extraStyles:{}},p=AL(g,m,o),h={getId:x(n),getRoot:x(p),getBody:()=>tV.getBody(p),getFooter:()=>tV.getFooter(p),getFormWrapper:()=>{const e=tV.getBody(p);return ag.getCurrent(e).getOr(e)},toggleFullscreen:()=>{DL(p,a.get())}},f=LL(h,t.redial,d);return{dialog:p,instanceApi:f}},PL=(e,t,o,n=!1,s)=>{const r=ya("dialog"),a=ya("dialog-label"),i=ya("dialog-content"),l=e.internalDialog,c=Ns(l.size),d=TL(c.get()).toArray(),u=Ff(((e,t,o,n)=>gC.sketch({dom:If('<div class="tox-dialog__header"></div>'),components:[yL(e,t,D.some(o),n),xL(),vL(n)],containerBehaviours:ql([LN.config({mode:"mouse",blockerClass:"blocker",getTarget:e=>Ri(e,'[role="dialog"]').getOrDie(),snaps:{getSnapPoints:()=>[],leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])}))({title:l.title,draggable:!0},r,a,o.shared.providers)),m=Ff(((e,t,o,n,s)=>cL(e,t,D.some(o),n,s))({body:l.body,initialData:l.initialData},r,i,o,n)),g=ML(l.buttons),p=BL(g),h=Ce(0!==g.length,Ff(((e,t,o)=>NL(e,t,o))({buttons:g},r,o))),f=FL((()=>v),{onBlock:e=>{lB.block(b,((t,n)=>{const s=u.getOpt(b).map((e=>Wt(e.element)));return SL(e.message,n,o.shared.providers,s)}))},onUnblock:()=>{lB.unblock(b)},onClose:()=>t.closeWindow()},o.shared.getSink),b=_i({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline",...d],attributes:{role:"dialog","aria-labelledby":a}},eventOrder:{[wr()]:[Uz.name(),Ql.name()],[Sr()]:["execute-on-form"],[Ir()]:["reflecting","execute-on-form"]},behaviours:ql([Th.config({mode:"cyclic",onEscape:e=>(jr(e,TC),D.some(!0)),useTabstopAt:e=>!hT(e)&&("button"!==Pe(e)||"disabled"!==Ot(e,"disabled")),firstTabstop:1}),Uz.config({channel:`${fT}-${r}`,updateState:(e,t)=>(c.set(t.internalDialog.size),EL(t.internalDialog.size,e),s(),D.some(t)),initialData:e}),Uh.config({}),Vh("execute-on-form",f.concat([aa(rr(),((e,t)=>{Th.focusIn(e)})),Qr(Vr(),((e,t)=>{e.getSystem().broadcastOn([wT],{newFocus:t.event.newFocus})}))])),lB.config({getRoot:()=>D.some(b)}),Nh.config({}),oT({})]),components:[u.asSpec(),m.asSpec(),...h.map((e=>e.asSpec())).toArray()]}),v=LL({getId:x(r),getRoot:x(b),getFooter:()=>h.map((e=>e.get(b))),getBody:()=>m.get(b),getFormWrapper:()=>{const e=m.get(b);return ag.getCurrent(e).getOr(e)},toggleFullscreen:()=>{DL(b,c.get())}},t.redial,p);return{dialog:b,instanceApi:v}};var UL=tinymce.util.Tools.resolve("tinymce.util.URI");const WL=["insertContent","setContent","execCommand","close","block","unblock"],jL=e=>a(e)&&-1!==WL.indexOf(e.mceAction),GL=(e,t,o,n)=>{const s=ya("dialog"),i=wL(e.title,s,n),l=(e=>{const t={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[mT(D.none(),{dom:{tag:"iframe",attributes:{src:e.url}},behaviours:ql([xC.config({}),Uh.config({})])})]}],behaviours:ql([Th.config({mode:"acyclic",useTabstopAt:C(hT)})])};return tV.parts.body(t)})(e),c=e.buttons.bind((e=>0===e.length?D.none():D.some(VL({buttons:e},s,n)))),u=((e,t)=>{const o=(t,o)=>Qr(t,((t,s)=>{n(t,((n,r)=>{o(e(),n,s.event,t)}))})),n=(e,t)=>{Uz.getState(e).get().each((o=>{t(o,e)}))};return[...IL(o,t),o(DC,((e,t,o)=>{t.onAction(e,{name:o.name})}))]})((()=>x),kL((()=>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 UL(e.url,{base_uri:new UL(window.location.href)}),f=`${h.protocol}://${h.host}${h.port?":"+h.port:""}`,b=kc(),v=[Uz.config({channel:`${fT}-${s}`,updateState:(e,t)=>D.some(t),initialData:e}),Vh("messages",[ia((()=>{const t=_c(Re.fromDom(window),"message",(t=>{if(h.isSameOrigin(new UL(t.raw.origin))){const n=t.raw.data;jL(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=>!jL(e)&&a(e)&&ve(e,"mceAction"))(n)&&e.onMessage(x,n)}}));b.set(t)})),la(b.clear)]),Ql.config({channels:{[xT]:{onReceive:(e,t)=>{Fi(e.element,"iframe").each((e=>{const o=e.dom.contentWindow;g(o)&&o.postMessage(t,f)}))}}}})],y=AL({id:s,header:i,body:l,footer:c,extraClasses:p,extraBehaviours:v,extraStyles:m},u,n),x=(e=>{const t=t=>{e.getSystem().isConnected()&&t(e)};return{block:e=>{if(!r(e))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");t((t=>{Gr(t,MC,{message:e})}))},unblock:()=>{t((e=>{jr(e,BC)}))},close:()=>{t((e=>{jr(e,TC)}))},sendMessage:e=>{t((t=>{t.getSystem().broadcastOn([xT],e)}))}}})(y);return{dialog:y,instanceApi:x}},$L=(e,t)=>os(ts("data",t,e)),qL=e=>eC(e,".tox-alert-dialog")||eC(e,".tox-confirm-dialog"),YL=(e,t,o)=>t&&o?[]:[DM.config({contextual:{lazyContext:()=>D.some(Xo(Re.fromDom(e.getContentAreaContainer()))),fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"],lazyViewport:t=>Zk(e,t.element).map((e=>({bounds:Qk(e),optScrollEnv:D.some({currentScrollTop:e.element.dom.scrollTop,scrollElmTop:Yt(e.element).top})}))).getOrThunk((()=>({bounds:Zo(),optScrollEnv:D.none()})))})],XL=e=>{const t=e.editor,o=Xv(t),n=(e=>{const t=e.shared;return{open:(o,n)=>{const s=()=>{tV.hide(l),n()},r=Ff(aD({name:"close-alert",text:"OK",primary:!0,buttonType:D.some("primary"),align:"end",enabled:!0,icon:D.none()},"cancel",e)),a=gL(),i=mL(s,t.providers),l=_i(bL({lazySink:()=>t.getSink(),header:uL(a,i),body:pL(o,t.providers),footer:D.some(hL(fL([],[r.asSpec()]))),onEscape:s,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Qr(EC,s)],eventOrder:{}}));tV.show(l);const c=r.get(l);Uh.focus(c)}}})(e.backstages.dialog),s=(e=>{const t=e.shared;return{open:(o,n)=>{const s=e=>{tV.hide(c),n(e)},r=Ff(aD({name:"yes",text:"Yes",primary:!0,buttonType:D.some("primary"),align:"end",enabled:!0,icon:D.none()},"submit",e)),a=aD({name:"no",text:"No",primary:!1,buttonType:D.some("secondary"),align:"end",enabled:!0,icon:D.none()},"cancel",e),i=gL(),l=mL((()=>s(!1)),t.providers),c=_i(bL({lazySink:()=>t.getSink(),header:uL(i,l),body:pL(o,t.providers),footer:D.some(hL(fL([],[a,r.asSpec()]))),onEscape:()=>s(!1),extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Qr(EC,(()=>s(!1))),Qr(AC,(()=>s(!0)))],eventOrder:{}}));tV.show(c);const d=r.get(c);Uh.focus(d)}}})(e.backstages.dialog),r=(o,n)=>zz.openUrl((o=>{const s=GL(o,{closeWindow:()=>{tV.hide(s.dialog),n(s.instanceApi)}},t,e.backstages.dialog);return tV.show(s.dialog),s.instanceApi}),o),a=(t,o)=>zz.open(((t,n,s)=>{const r=n,a=HL({dataValidator:s,initialData:r,internalDialog:t},{redial:zz.redial,closeWindow:()=>{tV.hide(a.dialog),o(a.instanceApi)}},e.backstages.dialog);return tV.show(a.dialog),a.instanceApi.setData(r),a.instanceApi}),t),i=(n,s,r,a)=>zz.open(((n,i,l)=>{const c=$L(i,l),d=Cc(),u=e.backstages.popup.shared.header.isPositionedAtTop(),m=()=>d.on((e=>{Af.reposition(e),o&&u||DM.refresh(e)})),g=PL({dataValidator:l,initialData:c,internalDialog:n},{redial:zz.redial,closeWindow:()=>{d.on(Af.hide),t.off("ResizeEditor",m),d.clear(),r(g.instanceApi)}},e.backstages.popup,a.ariaAttrs,m),p=_i(Af.sketch({lazySink:e.backstages.popup.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:a.persistent?{event:"doNotDismissYet"}:{},...u?{}:{fireRepositionEventInstead:{}},inlineBehaviours:ql([Vh("window-manager-inline-events",[Qr(Rr(),((e,t)=>{jr(g.dialog,EC)}))]),...YL(t,o,u)]),isExtraPart:(e,t)=>qL(t)}));d.set(p);return Af.showWithinBounds(p,Ti(g.dialog),{anchor:s},(()=>{const e=t.inline?xt():Re.fromDom(t.getContainer()),o=Xo(e);return D.some(o)})),o&&u||(DM.refresh(p),t.on("ResizeEditor",m)),g.instanceApi.setData(c),Th.focusIn(g.dialog),g.instanceApi}),n),l=(o,n,s,r)=>zz.open(((o,a,i)=>{const l=$L(a,i),c=Cc(),d=e.backstages.popup.shared.header.isPositionedAtTop(),u=()=>c.on((e=>{Af.reposition(e),DM.refresh(e)})),m=PL({dataValidator:i,initialData:l,internalDialog:o},{redial:zz.redial,closeWindow:()=>{c.on(Af.hide),t.off("ResizeEditor ScrollWindow ElementScroll",u),c.clear(),s(m.instanceApi)}},e.backstages.popup,r.ariaAttrs,u),g=_i(Af.sketch({lazySink:e.backstages.popup.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:r.persistent?{event:"doNotDismissYet"}:{},...d?{}:{fireRepositionEventInstead:{}},inlineBehaviours:ql([Vh("window-manager-inline-events",[Qr(Rr(),((e,t)=>{jr(m.dialog,EC)}))]),DM.config({contextual:{lazyContext:()=>D.some(Xo(Re.fromDom(t.getContentAreaContainer()))),fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top","bottom"],lazyViewport:e=>Zk(t,e.element).map((e=>({bounds:Qk(e),optScrollEnv:D.some({currentScrollTop:e.element.dom.scrollTop,scrollElmTop:Yt(e.element).top})}))).getOrThunk((()=>({bounds:Zo(),optScrollEnv:D.none()})))})]),isExtraPart:(e,t)=>qL(t)}));c.set(g);return Af.showWithinBounds(g,Ti(m.dialog),{anchor:n},(()=>e.backstages.popup.shared.getSink().toOptional().bind((e=>{const o=Zk(t,e.element).map((e=>Qk(e))).getOr(Zo()),n=Xo(Re.fromDom(t.getContentAreaContainer())),s=Jo(n,o);return D.some(Yo(s.x,s.y,s.width,s.height-15))})))),DM.refresh(g),t.on("ResizeEditor ScrollWindow ElementScroll ResizeWindow",u),m.instanceApi.setData(l),Th.focusIn(m.dialog),m.instanceApi}),o);return{open:(t,o,n)=>{if(!u(o)){if("toolbar"===o.inline)return i(t,e.backstages.popup.shared.anchors.inlineDialog(),n,o);if("bottom"===o.inline)return l(t,e.backstages.popup.shared.anchors.inlineBottomDialog(),n,o);if("cursor"===o.inline)return i(t,e.backstages.popup.shared.anchors.cursor(),n,o)}return a(t,n)},openUrl:(e,t)=>r(e,t),alert:(e,t)=>{n.open(e,t)},close:e=>{e.close()},confirm:(e,t)=>{s.open(e,t)}}},KL=e=>{Jb(e),(e=>{const t=e.options.register,o=e=>f(e,r)?{value:TS(e),valid:!0}:{valid:!1,message:"Must be an array of strings."},n=e=>h(e)&&e>0?{value:e,valid:!0}:{valid:!1,message:"Must be a positive number."};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:n,default:MS(e)}),t("color_cols_foreground",{processor:n,default:BS(e,OS)}),t("color_cols_background",{processor:n,default:BS(e,_S)}),t("custom_colors",{processor:"boolean",default:!0}),t("color_default_foreground",{processor:"string",default:DS}),t("color_default_background",{processor:"string",default:DS})})(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}:r(e)||f(e,r)?{value:ER(e),valid:!0}:{valid:!1,message:"Must be false or a string."},default:"link linkchecker image editimage table spellchecker configurepermanentpen"})})(e)};Qo.add("silver",(e=>{KL(e);let t=()=>Zo();const{dialogs:o,popups:n,renderUI:s}=JN(e,{getPopupSinkBounds:()=>t()});Yk(e,n.backstage.shared);const r=XL({editor:e,backstages:{popup:n.backstage,dialog:o.backstage}});return{renderUI:()=>{const o=s();return Zk(e,n.getMothership().element).each((e=>{t=()=>Qk(e)})),o},getWindowManagerImpl:x(r),getNotificationManagerImpl:()=>((e,t,o)=>{const n=t.backstage.shared,s=()=>{const t=Xo(Re.fromDom(e.getContentAreaContainer())),o=Zo(),n=vl(o.x,t.x,t.right),s=vl(o.y,t.y,t.bottom),r=Math.max(t.right,o.right),a=Math.max(t.bottom,o.bottom);return D.some(Yo(n,s,r-n,a-s))};return{open:(t,r)=>{const a=()=>{r(),Af.hide(l)},i=_i(Wb.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=_i(Af.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&&Mf.setEditorTimeout(e,(()=>{a()}),t.timeout);const c={close:a,reposition:()=>{const t=Ti(i),o={maxHeightFunction:Lc()},r=e.notificationManager.getNotifications();if(r[0]===c){const e={...n.anchors.banner(),overrides:o};Af.showWithinBounds(l,t,{anchor:e},s)}else F(r,c).each((e=>{const n=r[e-1].getEl(),a={type:"node",root:xt(),node:D.some(Re.fromDom(n)),overrides:o,layouts:{onRtl:()=>[Bl],onLtr:()=>[Bl]}};Af.showWithinBounds(l,t,{anchor:a},s)}))},text:e=>{Wb.updateText(i,e)},settings:t,getEl:()=>i.element.dom,progressBar:{value:e=>{Wb.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("77c1f1d",(function(e,f,i,n){e("545e3b6")}));
;/*!node_modules/tinymce/models/dom/model.js*/
amis.define("3bf8128",(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},_=(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)=>(N(e,((e,n)=>{o=t(o,e,n)})),o),z=(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),L=(e,t)=>{for(let o=0,n=e.length;o<n;o++){if(t(e[o],o))return x.some(o)}return x.none()},W=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},M=(e,t)=>W(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=>j(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),_e=e=>x.from(e.dom.parentElement).map(Te.fromDom),je=(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},ze=e=>x.from(e.dom.previousSibling).map(Te.fromDom),Le=e=>x.from(e.dom.nextSibling).map(Te.fromDom),We=e=>E(e.dom.childNodes,Te.fromDom),Me=(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)=>{Le(e).fold((()=>{Be(e).each((e=>{He(e,t)}))}),(e=>{Ie(e,t)}))},Fe=(e,t)=>{const o=(e=>Me(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(We(e),(e=>{Ge(e)}))},Ge=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Ke=e=>{const t=We(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(We(e),(e=>{t(e)&&(o=o.concat([e])),o=o.concat(ut(e,t))})),o},ft=(e,t,o)=>((e,t,o)=>B(je(e,o),t))(e,(e=>Se(e,t)),o),gt=(e,t)=>((e,t)=>B(We(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)=>z(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),_t=(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)},jt=(e,t,o)=>{const n=e.dom;_t(n,t,o)},zt=(e,t)=>{const o=e.dom;G(t,((e,t)=>{_t(o,t,e)}))},Lt=(e,t)=>{const o=e.dom,n=window.getComputedStyle(o).getPropertyValue(t);return""!==n||mt(e)?n:Wt(o,t)},Wt=(e,t)=>Bt(e)?e.style.getPropertyValue(t):"",Mt=(e,t)=>{const o=e.dom,n=Wt(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(Lt(e,t),10),qt=g(10),Ut=g(10),Gt=(e,t)=>Kt(e,t,C),Kt=(e,t,o)=>M(We(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"):M(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 z(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 z(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 _o=ro((()=>Ao(navigator.userAgent,x.from(navigator.userAgentData),Bo)));const jo=()=>_o(),zo=(e,t)=>{const o=o=>{const n=t(o);if(n<=0||null===n){const t=Lt(o,e);return parseFloat(t)||0}return n},n=(e,t)=>j(t,((t,o)=>{const n=Lt(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}}},Lo=(e,t)=>(e=>{const t=parseFloat(e);return isNaN(t)?x.none():x.some(t)})(e).getOr(t),Wo=(e,t,o)=>Lo(Lt(e,t),o),Mo=(e,t)=>{const o=e.dom,n=o.getBoundingClientRect().width||o.offsetWidth;return"border-box"===t?n:((e,t,o,n)=>t-Wo(e,`padding-${o}`,0)-Wo(e,`padding-${n}`,0)-Wo(e,`border-${o}-width`,0)-Wo(e,`border-${n}-width`,0))(e,n,"left","right")},Io=zo("width",(e=>e.dom.offsetWidth)),Po=e=>Io.get(e),Fo=e=>Io.getOuter(e),Ho=e=>Mo(e,"content-box"),$o=e=>Wo(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=j(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=M(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=>M(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((()=>M(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 z(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((()=>M(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"===Lt(e,"direction")?"rtl":"ltr",fn=zo("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=>Wo(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},_n=dn({delta:h,edge:Rn,positions:e=>An(Dn,On,e)},{delta:e=>-e,edge:Sn,positions:e=>An(On,Dn,e)}),jn={delta:(e,t)=>_n(t).delta(e,t),positions:(e,t)=>_n(t).positions(e,t),edge:e=>_n(e).edge(e)},zn={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:[""]},Ln=(()=>{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})`})(.*)$`)})(),Wn=(e,t)=>x.from(Ln.exec(e)).bind((e=>{const o=Number(e[1]),n=e[2];return((e,t)=>O(t,(t=>O(zn[t],(t=>e===t)))))(n,t)?x.some({value:o,unit:n}):x.none()})),Mn=/(\d+(\.\d+)?)%/,In=/(\d+(\.\d+)?)px|em/,Pn=ge("col"),Fn=(e,t,o)=>{const n=_e(e).getOrThunk((()=>dt(Ne(e))));return t(e)/o(n)*100},Hn=(e,t)=>{jt(e,"width",t+"px")},$n=(e,t)=>{jt(e,"width",t+"%")},Vn=(e,t)=>{jt(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)=>Mt(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)=>{jt(e,"width",t+o)},Zn=e=>Fn(e,Po,Ho)+"%",er=g(Mn),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(jn.edge(t))].concat(E(jn.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=jo().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(Mt(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=j(r,((e,t)=>e+t),0),l=j(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((()=>We(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=We(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),_r=(e,t,o)=>{const n=((e,t)=>{const o=Xe(e,t),n=We(Qe(e));return qe(o,n),o})(e,t);return G(o,((e,t)=>{null===e?ye(n,t):pe(n,t,e)})),n},jr=e=>e,zr=(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 _(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:_r,colGap:Nr(t),gap:Er(t)}},Lr=e=>({col:Nr(e),colgroup:Ar(e),row:Br(e),cell:Er(e),replace:jr,colGap:Nr(e),gap:Er(e)}),Wr=e=>t=>t.options.get(e),Mr="100%",Ir=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"},Pr=e=>x.from(e.options.get("table_clone_elements")),Fr=Wr("table_header_type"),Hr=Wr("table_column_resizing"),$r=e=>"preservetable"===Hr(e),Vr=e=>"resizetable"===Hr(e),qr=Wr("table_sizing_mode"),Ur=e=>"relative"===qr(e),Gr=e=>"fixed"===qr(e),Kr=e=>"responsive"===qr(e),Yr=Wr("table_resize_bars"),Jr=Wr("table_style_by_css"),Qr=Wr("table_merge_content_on_paste"),Xr=e=>{const t=e.options,o=t.get("table_default_attributes");return t.isSet("table_default_attributes")?o:((e,t)=>Kr(e)||Jr(e)?t:Gr(e)?{...t,width:Ir(e)}:{...t,width:Mr})(e,o)},Zr=e=>{const t=e.options,o=t.get("table_default_styles");return t.isSet("table_default_styles")?o:((e,t)=>Kr(e)||!Jr(e)?t:Gr(e)?{...t,width:Ir(e)}:{...t,width:Mr})(e,o)},es=Wr("table_use_colgroups"),ts=e=>xt(e,"[contenteditable]"),os=(e,t=!1)=>mt(e)?e.dom.isContentEditable:ts(e).fold(g(t),(e=>"true"===ns(e))),ns=e=>e.dom.contentEditable,rs=e=>Te.fromDom(e.getBody()),ss=e=>t=>Oe(t,rs(e)),ls=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)},as=e=>Te.fromDom(e.selection.getStart()),cs=e=>e.getBoundingClientRect().width,is=e=>e.getBoundingClientRect().height,ms=e=>wt(e,ge("table")).exists(os),ds=(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},us=(e,t)=>t.column>=e.startCol&&t.column+t.colspan-1<=e.finishCol&&t.row>=e.startRow&&t.row+t.rowspan-1<=e.finishRow,fs=(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}))))},gs=(e,t,o)=>fs(e,t,o).bind((t=>((e,t)=>{let o=!0;const n=b(us,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))),hs=(e,t,o)=>fs(e,t,o).map((t=>{const o=sn.filterItems(e,b(ds,t));return E(o,(e=>e.element))})),ps=(e,t)=>sn.findItem(e,t,((e,t)=>ke(t,e))).map((e=>e.element)),bs=(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))})))(ys(n),e,t,o))),ws=(e,t,o)=>{const n=ys(e);return hs(n,t,o)},vs=(e,t,o,n,r)=>{const s=ys(e),l=Oe(e,o)?x.some(t):ps(s,t),a=Oe(e,r)?x.some(n):ps(s,n);return l.bind((e=>a.bind((t=>hs(s,e,t)))))},ys=sn.fromTable;var Cs=["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"],xs=()=>({up:g({selector:vt,closest:xt,predicate:bt,all:je}),down:g({selector:ht,predicate:ut}),styles:g({get:Lt,getRaw:Mt,set:jt,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:ze,nextSibling:Le}),property:g({children:We,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(Cs,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 Ts=(e,t,o,n)=>{const r=t(e,o);return _(n,((o,n)=>{const r=t(e,n);return Ss(e,o,r)}),r)},Ss=(e,t,o)=>t.bind((t=>o.filter(b(e.eq,t)))),Rs=(e,t,o)=>o.length>0?((e,t,o,n)=>n(e,t,o[0],o.slice(1)))(e,t,o,Ts):x.none(),Ds=(e,t,o,n=y)=>{const r=[t].concat(e.up().all(t)),s=[o].concat(e.up().all(o)),l=e=>L(e,n).fold((()=>e),(t=>e.slice(0,t+1))),a=l(r),c=l(s),i=z(a,(t=>O(c,((e,t)=>b(e.eq,t))(e,t))));return{firstpath:a,secondpath:c,shared:i}},Os=xs(),ks=(e,t)=>Rs(Os,((t,o)=>e(o)),t),Es=e=>vt(e,"table"),Ns=(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}):Es(e).bind((r=>Es(t).bind((s=>{if(Oe(r,s))return x.some({boxes:ws(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:vs(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:vs(s,e,r,t,s),start:e,finish:l})}return((e,t,o)=>Ds(Os,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:vs(o,e,r,t,s),start:i,finish:a})}))))}))))},As=(e,t)=>{const o=ht(e,t);return o.length>0?x.some(o):x.none()},Bs=(e,t,o)=>Ct(e,t).bind((t=>Ct(e,o).bind((e=>ks(Es,[t,e]).map((o=>({first:t,last:e,table:o}))))))),_s=(e,t,o,n,r)=>((e,t)=>z(e,(e=>Se(e,t))))(e,r).bind((e=>bs(e,t,o).bind((e=>((e,t)=>vt(e,"table").bind((o=>Ct(o,t).bind((t=>Ns(t,e).bind((e=>e.boxes.map((t=>({boxes:t,start:e.start,finish:e.finish}))))))))))(e,n))))),js=(e,t)=>As(e,t),zs=(e,t,o)=>Bs(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=ys(e);return gs(n,t,o)})(t.table,t.first,t.last):x.none()))))})),Ls=h,Ws=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()},Ms=(e,t,o)=>t.length<=1?x.none():zs(e,o.firstSelectedSelector,o.lastSelectedSelector).map((e=>({bounds:e,cells:t}))),Is="data-mce-selected",Ps="data-mce-first-selected",Fs="data-mce-last-selected",Hs={selected:Is,selectedSelector:"td[data-mce-selected],th[data-mce-selected]",firstSelected:Ps,firstSelectedSelector:"td[data-mce-first-selected],th[data-mce-first-selected]",lastSelected:Fs,lastSelectedSelector:"td[data-mce-last-selected],th[data-mce-last-selected]"},$s=(e,t,o)=>({element:o,mergable:Ms(t,e,Hs),unmergable:Ws(e),selection:Ls(e)}),Vs=e=>(t,o)=>{const n=se(t),r="col"===n||"colgroup"===n?Xt(s=t).bind((e=>js(e,Hs.firstSelectedSelector))).fold(g(s),(e=>e[0])):t;var s;return xt(r,e,o)},qs=Vs("th,td,caption"),Us=Vs("th,td"),Gs=e=>{return t=e.model.table.getSelectedCells(),E(t,Te.fromDom);var t},Ks=(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 ls(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(Gs(e),(e=>Se(e,Hs.selectedSelector))))(e);t.length>=1&&o(t)}})),e.on("BeforeSetContent",(o=>{if(!0===o.selection&&!0===o.paste){const n=Gs(e);H(n).each((n=>{Xt(n).each((r=>{const s=B(((e,t)=>{const o=(t||document).createElement("div");return o.innerHTML=e,We(Te.fromDom(o))})(o.content),(e=>"meta"!==se(e))),l=ge("table");if(Qr(e)&&1===s.length&&l(s[0])){o.preventDefault();const l=Te.fromDom(e.getDoc()),a=Lr(l),c=((e,t,o)=>({element:e,clipboard:t,generators:o}))(n,s[0],a);t.pasteCells(r,c).each((()=>{e.focus()}))}}))}))}}))},Ys=(e,t)=>({element:e,offset:t}),Js=(e,t,o)=>e.property().isText(t)&&0===e.property().getText(t).trim().length||e.property().isComment(t)?o(t).bind((t=>Js(e,t,o).orThunk((()=>x.some(t))))):x.none(),Qs=(e,t)=>{if(e.property().isText(t))return e.property().getText(t).length;return e.property().children(t).length},Xs=(e,t)=>{const o=Js(e,t,e.query().prevSibling).getOr(t);if(e.property().isText(o))return Ys(o,Qs(e,o));const n=e.property().children(o);return n.length>0?Xs(e,n[n.length-1]):Ys(o,Qs(e,o))},Zs=Xs,el=xs(),tl=(e,t)=>{if(!Ht(e)){const o=(e=>Kn(e).bind((e=>Wn(e,["fixed","relative","empty"]))))(e);o.each((o=>{const n=o.value/2;Xn(e,n,o.unit),Xn(t,n,o.unit)}))}},ol=e=>E(e,g(0)),nl=(e,t,o,n,r)=>r(e.slice(0,t)).concat(n).concat(r(e.slice(o))),rl=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},sl=rl((e=>e<0)),ll=rl(C),al=()=>{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=sl(e,t,n,r);return nl(e,t,o+1,[s,0],ol)})(t,o,n,r,s);return{resizeTable:(e,t)=>e(t),clampTableDelta:sl,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=sl(t,n,r,s);return ol(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}}}},cl=()=>{const e=(e,t,o,n,r)=>{const s=ll(e,n>=0?o:t,n,r);return nl(e,t,o+1,[s,-s],ol)};return{resizeTable:(e,t,o)=>{o&&e(t)},clampTableDelta:(e,t,o,n,r)=>{if(r){if(o>=0)return o;{const t=j(e,((e,t)=>e+t-n),0);return Math.max(-t,o)}}return sl(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 ol(e);{const t=n/e.length;return E(e,g(t))}},calcRedestributedWidths:(e,t,o,n)=>({delta:0,newSizes:e})}},il=e=>sn.fromTable(e).grid,ml=ge("th"),dl=e=>I(e,(e=>ml(e.element))),ul=(e,t)=>e&&t?"sectionCells":e?"section":"cells",fl=e=>{const t="thead"===e.section,o=Tt(gl(e.cells),"th");return"tfoot"===e.section?{type:"footer"}:t||o?{type:"header",subType:ul(t,o)}:{type:"body"}},gl=e=>{const t=B(e,(e=>ml(e.element)));return 0===t.length?x.some("td"):t.length===e.length?x.some("th"):x.none()},hl=(e,t,o)=>ot(o(e.element,t),!0,e.isLocked),pl=(e,t)=>e.section!==t?nt(e.element,e.cells,t,e.isNew):e,bl=()=>({transformRow:pl,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=We(e);return qe(o,n),Ge(e),o})(n,"td"):n;return ot(r,e.isNew,e.isLocked)}}),wl=()=>({transformRow:pl,transformCell:hl}),vl=()=>({transformRow:(e,t)=>pl(e,"thead"===t?"tbody":t),transformCell:hl}),yl=(e,t)=>{const o=(e=>V(e.all,(e=>{const t=fl(e);return"header"===t.type?x.from(t.subType):x.none()})))(sn.fromTable(e)).getOr(t);switch(o){case"section":return bl();case"sectionCells":return wl();case"cells":return vl()}},Cl=bl,xl=wl,Tl=vl,Sl=()=>({transformRow:h,transformCell:hl}),Rl=(e,t,o,n)=>{o===n?ye(e,t):pe(e,t,o)},Dl=(e,t,o)=>{$(gt(e,t)).fold((()=>Fe(e,o)),(e=>Pe(e,o)))},Ol=(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),Rl(e.element,"colspan",e.colspan,1),Rl(e.element,"rowspan",e.rowspan,1),He(t,e.element)})),t})),s=e=>M(e,(e=>E(e.cells,(e=>(Rl(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?Dl(e,"caption,colgroup",o):"colgroup"===t?Dl(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}},kl=(e,t)=>{if(0===e.length)return 0;const o=e[0];return L(e,(e=>!t(o.element,e.element))).getOr(e.length)},El=(e,t,o,n)=>{const r=((e,t)=>e[t])(e,t),s="colgroup"===r.section,l=kl(r.cells.slice(o),n),a=s?1:kl(((e,t)=>E(e,(e=>Ko(e,t))))(e.slice(t),o),n);return{colspan:l,rowspan:a}},Nl=(e,t)=>{const o=E(e,(e=>E(e.cells,y)));return E(e,((n,r)=>{const s=M(n.cells,((n,s)=>{if(!1===o[r][s]){const m=El(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)}))},Al=(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},Bl=e=>Nl(e,Oe),_l=(e,t)=>V(e.all,(e=>z(e.cells,(e=>Oe(t,e.element))))),jl=(e,t,o)=>{const n=E(t.selection,(t=>Yt(t).bind((t=>_l(e,t))).filter(o))),r=St(n);return Rt(r.length>0,r)},zl=(e,t,o,n,r)=>(s,l,a,c)=>{const i=sn.fromTable(s),m=x.from(null==c?void 0:c.section).getOrThunk(Sl);return t(i,l).map((t=>{const o=((e,t)=>Al(e,t,!1))(i,a),n=e(o,t,Oe,r(a),m),s=tn(n.grid);return{info:t,grid:Bl(n.grid),cursor:n.cursor,lockedColumns:s}})).bind((e=>{const t=Ol(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(cl);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})}))},Ll=(e,t)=>jl(e,t,C).map((e=>({cells:e,generators:t.generators,clipboard:t.clipboard}))),Wl=(e,t)=>jl(e,t,C),Ml=(e,t)=>jl(e,t,(e=>!e.isLocked)),Il=(e,t)=>I(t,(t=>((e,t)=>_l(e,t).exists((e=>!e.isLocked)))(e,t))),Pl=(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},Fl=(e,t,o,n)=>{const r=Qo(e).rows;if(t>0&&t<r.length){const e=((e,t)=>j(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},Hl=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=>Vl.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},$l=e=>{const t=()=>o,o={tag:!1,inner:e,fold:(t,o)=>t(e),isValue:y,isError:C,map:t,mapError:t=>Vl.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},Vl={value:Hl,error:$l,fromOption:(e,t)=>e.fold((()=>$l(t)),Hl)},ql=(e,t)=>({rowDelta:0,colDelta:Jo(e[0])-Jo(t[0])}),Ul=(e,t)=>({rowDelta:e.length-t.length,colDelta:0}),Gl=(e,t,o,n)=>{const r="colgroup"===t.section?o.col:o.cell;return k(e,(e=>ot(r(),!0,n(e))))},Kl=(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=Gl(t.cells.length,t,o,(e=>Z(n,e.toString())));return Go(t,s)})))},Yl=(e,t,o,n)=>E(e,(e=>{const r=Gl(t,e,o,y);return Vo(e,n,r)})),Jl=(e,t,o)=>{const n=t.colDelta<0?Yl:h,r=t.rowDelta<0?Kl: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))},Ql=(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)))},Xl=(e,t,o)=>B(o,(o=>o>=e.column&&o<=Jo(t[0])+e.column)),Zl=(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=z(s,(e=>I(o,(t=>t!==e)))).getOr(n-1);return{row:r,column:l}})(e,t,s),a=Qo(o).rows,c=Xl(l,a,s),i=((e,t,o)=>{if(e.row>=t.length||e.column>Jo(t[0]))return Vl.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 Vl.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=Jl(t,o,n),i=tn(s),m=Xl(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}Ql(t,e,c,r)&&Pl(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)}))},ea=(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=Ul(o,t),l=Jl(o,s,n),a=Ul(t,l),c=Jl(t,a,n);return E(c,((t,o)=>Vo(t,e,l[o].cells)))},ta=(e,t,o,n,r)=>{Fl(t,e,r,n.cell);const s=tn(t),l=ql(t,o),a={...l,colDelta:l.colDelta-s.length},c=Jl(t,a,n),{cols:i,rows:m}=Qo(c),d=tn(c),u=ql(o,t),f={...u,colDelta:u.colDelta+d.length},g=((e,t,o)=>E(e,(e=>j(o,((o,n)=>{const r=Gl(1,e,t,C)[0];return qo(o,n,r)}),e))))(o,n,d),h=Jl(g,f,n);return[...i,...m.slice(0,e),...h,...m.slice(e,m.length)]},oa=(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]},na=(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)})),ra=(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),sa=(e,t,o,n)=>{const r=e=>(e=>"row"===e?$t(t):Ht(t))(e)?`${e}group`:e;if(e)return ml(t)?r(o):null;if(n&&ml(t)){return r("row"===o?"col":"row")}return null},la=(e,t,o)=>ot(o(e.element,t),!0,e.isLocked),aa=(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})))),ca=(e,t,o)=>M(e,((n,r)=>ra(e,r,t,o)?[]:[Ko(n,t)])),ia=(e,t,o,n,r)=>{const s=Qo(e).rows,l=M(t,(e=>ca(s,e,n))),a=E(s,(e=>dl(e.cells))),c=((e,t)=>I(t,h)&&dl(e)?C:(e,o,n)=>!("th"===se(e.element)&&t[o]))(l,a),i=((e,t)=>(o,n)=>x.some(sa(e,o.element,"row",t[n])))(o,a);return aa(e,l,n,r,la,i,c)},ma=(e,t,o,n,r,s,l)=>{const{cols:a,rows:c}=Qo(e),i=c[t[0]],m=M(t,(e=>((e,t,o)=>{const n=e[t];return M(n.cells,((n,r)=>ra(e,t,r,o)?[]:[n]))})(c,e,r))),d=E(i.cells,((e,t)=>dl(ca(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)&&dl(e.cells)?C:(e,o,n)=>!("th"===se(e.element)&&t[n]))(i,d),p=((e,t)=>(o,n,r)=>x.some(sa(e,o.element,"col",t[r])))(n,d);return aa(f,m,r,s,l.transformCell,p,g)},da=(e,t,o,n)=>{const r=Qo(e).rows,s=E(t,(e=>Ko(r[e.row],e.column)));return aa(e,s,o,n,la,x.none,C)},ua=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},fa={...ua([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}])},ga=(e,t,o,n,r)=>{const s=e.slice(0),l=((e,t)=>0===e.length?fa.none():1===e.length?fa.only(0):0===t?fa.left(0,1):t===e.length-1?fa.right(t-1,t):t>0&&t<e.length-1?fa.middle(t-1,t,t+1):fa.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)))},ha=(e,t,o)=>{let n=0;for(let r=e;r<t;r++)n+=void 0!==o[r]?o[r]:0;return n},pa=(e,t)=>{const o=sn.justCells(e);return E(o,(e=>{const o=ha(e.row,e.row+e.rowspan,t);return{element:e.element,height:o,rowspan:e.rowspan}}))},ba=(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=ha(e.column,e.column+e.colspan,t);return{element:e.element,width:o,colspan:e.colspan}}))})(e,t),wa=(e,t,o)=>{const n=ba(e,t);N(n,(e=>{o.setElementWidth(e.element,e.width)}))},va=(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=ga(a,o,i,r,n),d=E(m,((e,t)=>e+a[t]));wa(s,d,r),n.resizeTable(r.adjustTableWidth,i,c)},ya=(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=pa(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=_(l,((e,t)=>e+t),0);Vn(e,i)},Ca=e=>j(e,((e,t)=>O(e,(e=>e.column===t.column))?e:e.concat([t])),[]).sort(((e,t)=>e.column-t.column)),xa=ge("col"),Ta=ge("colgroup"),Sa=e=>"tr"===se(e)||Ta(e),Ra=e=>({element:e,colspan:Pt(e,"colspan",1),rowspan:Pt(e,"rowspan",1)}),Da=e=>ve(e,"scope").map((e=>e.substr(0,3))),Oa=(e,t=Ra)=>{const o=o=>{if(Sa(o))return Ta((r={element:o}).element)?e.colgroup(r):e.row(r);{const r=o,s=(t=>xa(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)))}},ka=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(Sa(e)||xa(e))return e;{const r=e;return((e,t)=>z(o,(o=>t(o.item,e))))(r,t).fold((()=>n(r)),(o=>t(e,o.item)?o.sub:n(r)))}}}},Ea=e=>({unmerge:t=>{const o=Da(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,Da));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]))}),Na=["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"],Aa=xs(),Ba=e=>((e,t)=>{const o=e.property().name(t);return D(Na,o)})(Aa,e),_a=e=>((e,t)=>{const o=e.property().name(t);return D(["ol","ul"],o)})(Aa,e),ja=e=>((e,t)=>D(["br","img","hr","input"],e.property().name(t)))(Aa,e),za=e=>{const t=ge("br"),o=e=>Dr(e).bind((o=>{const n=Le(o).map((e=>!!Ba(e)||!!ja(e)&&"img"!==se(e))).getOr(!1);return Be(o).map((r=>!0===n||(e=>"li"===se(e)||bt(e,_a).isSome())(r)||t(o)||Ba(r)&&!Oe(e,r)?[]:[Te.fromTag("br")]))})).getOr([]),n=(()=>{const n=M(e,(e=>{const n=We(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)},La=e=>os(e,!0),Wa=e=>{0===Jt(e).length&&Ge(e)},Ma=(e,t)=>({grid:e,cursor:t}),Ia=(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(La).orThunk((()=>(e=>V(e,(e=>V(e.cells,(e=>{const t=e.element;return Rt(La(t),t)})))))(s)))},Pa=(e,t,o)=>{const n=Ia(e,t,o);return Ma(e,n)},Fa=e=>j(e,((e,t)=>O(e,(e=>e.row===t.row))?e:e.concat([t])),[]).sort(((e,t)=>e.row-t.row)),Ha=(e,t)=>(o,n,r,s,l)=>{const a=Fa(n),c=E(a,(e=>e.row)),i=ma(o,c,e,t,r,s.replaceOrInit,l);return Pa(i,n[0].row,n[0].column)},$a=Ha("thead",!0),Va=Ha("tbody",!1),qa=Ha("tfoot",!1),Ua=(e,t,o)=>{const n=((e,t)=>to(e,(()=>t)))(e,o.section),r=sn.generate(n);return Al(r,t,!0)},Ga=(e,t,o,n)=>((e,t,o,n)=>{const r=sn.generate(t),s=n.getWidths(r,n);wa(r,s,n)})(0,t,0,n.sizing),Ka=(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);wa(s,c,n),n.adjustTableWidth(i)})(0,t,o,n.sizing,n.resize),Ya=(e,t)=>O(t,(e=>0===e.column&&e.isLocked)),Ja=(e,t)=>O(t,(t=>t.column+t.colspan>=e.grid.columns&&t.isLocked)),Qa=(e,t)=>{const o=ln(e),n=Ca(t);return j(n,((e,t)=>e+o[t.column].map(Fo).getOr(0)),0)},Xa=e=>(t,o)=>Wl(t,o).filter((o=>!(e?Ya:Ja)(t,o))).map((e=>({details:e,pixelDelta:Qa(t,e)}))),Za=e=>(t,o)=>Ll(t,o).filter((o=>!(e?Ya:Ja)(t,o.cells))),ec=ka("th"),tc=ka("td"),oc=zl(((e,t,o,n)=>{const r=t[0].row,s=Fa(t),l=_(s,((e,t)=>({grid:oa(e.grid,r,t.row+e.delta,o,n.getOrInit),delta:e.delta+1})),{grid:e,delta:0}).grid;return Pa(l,r,t[0].column)}),Wl,f,f,Oa),nc=zl(((e,t,o,n)=>{const r=Fa(t),s=r[r.length-1],l=s.row+s.rowspan,a=_(r,((e,t)=>oa(e,l,t.row,o,n.getOrInit)),e);return Pa(a,l,t[0].column)}),Wl,f,f,Oa),rc=zl(((e,t,o,n)=>{const r=t.details,s=Ca(r),l=s[0].column,a=_(s,((e,t)=>({grid:na(e.grid,l,t.column+e.delta,o,n.getOrInit),delta:e.delta+1})),{grid:e,delta:0}).grid;return Pa(a,r[0].row,l)}),Xa(!0),Ka,f,Oa),sc=zl(((e,t,o,n)=>{const r=t.details,s=r[r.length-1],l=s.column+s.colspan,a=Ca(r),c=_(a,((e,t)=>na(e,l,t.column,o,n.getOrInit)),e);return Pa(c,r[0].row,l)}),Xa(!1),Ka,f,Oa),lc=zl(((e,t,o,n)=>{const r=Ca(t.details),s=((e,t)=>M(e,(e=>{const o=e.cells,n=_(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 Pa(s,r[0].row,Math.min(r[0].column,l))}),((e,t)=>Ml(e,t).map((t=>({details:t,pixelDelta:-Qa(e,t)})))),Ka,Wa,Oa),ac=zl(((e,t,o,n)=>{const r=Fa(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 Pa(s,Math.min(t[0].row,l),t[0].column)}),Wl,f,Wa,Oa),cc=zl(((e,t,o,n)=>{const r=Ca(t),s=E(r,(e=>e.column)),l=ia(e,s,!0,o,n.replaceOrInit);return Pa(l,t[0].row,t[0].column)}),Ml,f,f,ec),ic=zl(((e,t,o,n)=>{const r=Ca(t),s=E(r,(e=>e.column)),l=ia(e,s,!1,o,n.replaceOrInit);return Pa(l,t[0].row,t[0].column)}),Ml,f,f,tc),mc=zl($a,Ml,f,f,ec),dc=zl(Va,Ml,f,f,tc),uc=zl(qa,Ml,f,f,tc),fc=zl(((e,t,o,n)=>{const r=da(e,t,o,n.replaceOrInit);return Pa(r,t[0].row,t[0].column)}),Ml,f,f,ec),gc=zl(((e,t,o,n)=>{const r=da(e,t,o,n.replaceOrInit);return Pa(r,t[0].row,t[0].column)}),Ml,f,f,tc),hc=zl(((e,t,o,n)=>{const r=t.cells;za(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 Ma(s,x.from(r[0]))}),((e,t)=>((e,t)=>t.mergable)(0,t).filter((t=>Il(e,t.cells)))),Ga,f,Ea),pc=zl(((e,t,o,n)=>{const r=_(t,((e,t)=>Pl(e,t,o,n.unmerge(t))),e);return Ma(r,x.from(t[0]))}),((e,t)=>((e,t)=>t.unmergable)(0,t).filter((t=>Il(e,t)))),Ga,f,Ea),bc=zl(((e,t,o,n)=>{const r=((e,t)=>{const o=sn.fromTable(e);return Al(o,t,!0)})(t.clipboard,t.generators),s=((e,t)=>({row:e,column:t}))(t.row,t.column);return Zl(s,e,r,t.generators,o).fold((()=>Ma(e,x.some(t.element))),(e=>Pa(e,t.row,t.column)))}),((e,t)=>Yt(t.element).bind((o=>_l(e,o).map((e=>({...e,generators:t.generators,clipboard:t.clipboard})))))),Ga,f,Oa),wc=zl(((e,t,o,n)=>{const r=Qo(e).rows,s=t.cells[0].column,l=r[t.cells[0].row],a=Ua(t.clipboard,t.generators,l),c=ea(s,e,a,t.generators,o);return Pa(c,t.cells[0].row,t.cells[0].column)}),Za(!0),f,f,Oa),vc=zl(((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=Ua(t.clipboard,t.generators,l),c=ea(s,e,a,t.generators,o);return Pa(c,t.cells[0].row,t.cells[0].column)}),Za(!1),f,f,Oa),yc=zl(((e,t,o,n)=>{const r=Qo(e).rows,s=t.cells[0].row,l=r[s],a=Ua(t.clipboard,t.generators,l),c=ta(s,e,a,t.generators,o);return Pa(c,t.cells[0].row,t.cells[0].column)}),Ll,f,f,Oa),Cc=zl(((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=Ua(t.clipboard,t.generators,l),c=ta(s,e,a,t.generators,o);return Pa(c,t.cells[0].row,t.cells[0].column)}),Ll,f,f,Oa),xc=(e,t)=>{const o=sn.fromTable(e);return Wl(o,t).bind((e=>{const t=e[e.length-1],n=e[0].column,r=t.column+t.colspan,s=W(E(o.all,(e=>B(e.cells,(e=>e.column>=n&&e.column<r)))));return gl(s)})).getOr("")},Tc=(e,t)=>{const o=sn.fromTable(e);return Wl(o,t).bind(gl).getOr("")},Sc=(e,t)=>{const o=sn.fromTable(e);return Wl(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=>fl(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("")},Rc=(e,t)=>e.dispatch("NewRow",{node:t}),Dc=(e,t)=>e.dispatch("NewCell",{node:t}),Oc=(e,t,o)=>{e.dispatch("TableModified",{...o,table:t})},kc={structure:!1,style:!0},Ec={structure:!0,style:!1},Nc={structure:!0,style:!0},Ac=(e,t)=>Ur(e)?hr(t):Gr(e)?gr(t):fr(t),Bc=(e,t,o)=>{const n=e=>"table"===se(rs(e)),r=Pr(e),s=Vr(e)?f:tl,l=t=>{switch(Fr(e)){case"section":return Cl();case"sectionCells":return xl();case"cells":return Tl();default:return yl(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=Zs(el,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)=>{ls(i);const u=Te.fromDom(e.getDoc()),f=zr(s,u,r),g={sizing:Ac(e,i),resize:Vr(e)?al():cl(),section:l(i)};return n(i)?o(i,m,f,g).bind((o=>{t.refresh(i.dom),N(o.newRows,(t=>{Rc(e,t.dom)})),N(o.newCells,(t=>{Dc(e,t.dom)}));const n=a(i,o);return mt(i)&&(ls(i),d||Oc(e,i.dom,c)),n.map((e=>({rng:e,effect:c})))})):x.none()},i=c(ac,(t=>!n(e)||il(t).rows>1),f,Ec),m=c(lc,(t=>!n(e)||il(t).columns>1),f,Ec);return{deleteRow:i,deleteColumn:m,insertRowsBefore:c(oc,C,f,Ec),insertRowsAfter:c(nc,C,f,Ec),insertColumnsBefore:c(rc,C,s,Ec),insertColumnsAfter:c(sc,C,s,Ec),mergeCells:c(hc,C,f,Ec),unmergeCells:c(pc,C,f,Ec),pasteColsBefore:c(wc,C,f,Ec),pasteColsAfter:c(vc,C,f,Ec),pasteRowsBefore:c(yc,C,f,Ec),pasteRowsAfter:c(Cc,C,f,Ec),pasteCells:c(bc,C,f,Nc),makeCellsHeader:c(fc,C,f,Ec),unmakeCellsHeader:c(gc,C,f,Ec),makeColumnsHeader:c(cc,C,f,Ec),unmakeColumnsHeader:c(ic,C,f,Ec),makeRowsHeader:c(mc,C,f,Ec),makeRowsBody:c(dc,C,f,Ec),makeRowsFooter:c(uc,C,f,Ec),getTableRowType:Sc,getTableCellType:Tc,getTableColType:xc}},_c=(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 Ml(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 _c(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 _c(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 Wl(n,t).bind((e=>{const t=Al(n,o,!1),r=Qo(t).rows.slice(e[0].row,e[e.length-1].row+e[e.length-1].rowspan),s=M(r,(e=>{const t=B(e.cells,(e=>!e.isLocked));return t.length>0?[{...e,cells:t}]:[]})),l=Bl(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);Rl(o,"colspan",e.colspan,1),Rl(o,"rowspan",e.rowspan,1),He(t,o)})),t})))(e)))},Wc=ua([{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)},Ic={...Wc,from:e=>Et(e,"%")?Mc("%",Wc.percent,e):Et(e,"px")?Mc("px",Wc.pixels,e):Wc.invalid(e)},Pc=(e,t,o)=>e.fold((()=>t),(e=>((e,t,o)=>{const n=o/t;return E(e,(e=>Ic.from(e).fold((()=>e),(e=>e*n+"px"),(e=>e/100*o+"px"))))})(t,o,e)),(e=>((e,t)=>E(e,(e=>Ic.from(e).fold((()=>e),(e=>e/t*100+"%"),(e=>e+"%")))))(t,o))),Fc=(e,t,o)=>{const n=Ic.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):Pc(n,e,t);return Vc(r)},Hc=(e,t)=>0===e.length?t:_(e,((e,t)=>Ic.from(t).fold(g(0),h,h)+e),0),$c=(e,t)=>Ic.from(e).fold(g(e),(e=>e+t+"px"),(e=>e+t+"%")),Vc=e=>{if(0===e.length)return e;const t=_(e,((e,t)=>{const o=Ic.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([$c(o[o.length-1],Math.round(t.remainder))])},qc=Ic.from,Uc=e=>qc(e).fold(g("px"),g("px"),g("%")),Gc=(e,t,o)=>{const n=sn.fromTable(e),r=n.all,s=sn.justCells(n),l=sn.justColumns(n);t.each((t=>{const o=Uc(t),r=Po(e),a=((e,t)=>sr(e,t,or,lr))(n,e),c=Fc(a,r,t);sn.hasColumns(n)?((e,t,o)=>{N(t,((t,n)=>{const r=Hc([e[n]],qt());jt(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=Hc(n,qt());jt(t.element,"width",r+o)}))})(c,s,o),jt(e,"width",t)})),o.each((t=>{const o=Uc(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=Hc(o,Ut());jt(t.element,"height",r+n)})),N(t,((t,o)=>{jt(t.element,"height",e[o])}))})(Fc(a,l,t),r,s,o),jt(e,"height",t)}))},Kc=e=>Kn(e).exists((e=>Mn.test(e))),Yc=e=>Kn(e).exists((e=>In.test(e))),Jc=e=>Kn(e).isNone(),Qc=e=>{ye(e,"width")},Xc=e=>{const t=Zn(e);Gc(e,x.some(t),x.none()),Qc(e)},Zc=e=>{const t=(e=>Po(e)+"px")(e);Gc(e,x.some(t),x.none()),Qc(e)},ei=e=>{It(e,"width");const t=Qt(e),o=t.length>0?t:Jt(e);N(o,(e=>{It(e,"width"),Qc(e)})),Qc(e)},ti={styles:{"border-collapse":"collapse",width:"100%"},attributes:{border:"1"},colGroups:!1},oi=e=>{const t=Te.fromTag("colgroup");return k(e,(()=>He(t,Te.fromTag("col")))),t},ni=(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))),ri=(e,t)=>{e.selection.select(t.dom,!0),e.selection.collapse(!0)},si=(e,t,o,n,s)=>{const l=Zr(e),a={styles:l,attributes:Xr(e),colGroups:es(e)};return e.undoManager.ignore((()=>{const r=((e,t,o,n,r,s=ti)=>{const l=Te.fromTag("table"),a="cells"!==r;zt(l,s.styles),be(l,s.attributes),s.colGroups&&He(l,oi(t));const c=Math.min(e,o);if(a&&o>0){const e=Te.fromTag("thead");He(l,e);const s=ni(o,t,"sectionCells"===r?c:0,n);qe(e,s)}const i=Te.fromTag("tbody");He(l,i);const m=ni(a?e-c:e,t,a?0:o,n);return qe(i,m),l})(o,t,s,n,Fr(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(rs(e),'table[data-mce-id="__mce"]').map((t=>(Gr(e)?Zc(t):Kr(e)?ei(t):(Ur(e)||(e=>r(e)&&-1!==e.indexOf("%"))(l.width))&&Xc(t),ls(t),ye(t,"data-mce-id"),((e,t)=>{N(ht(t,"tr"),(t=>{Rc(e,t.dom),N(ht(t,"th,td"),(t=>{Dc(e,t.dom)}))}))})(e,t),((e,t)=>{Ct(t,"td,th").each(b(ri,e))})(e,t),t.dom))).getOrNull()};var li=tinymce.util.Tools.resolve("tinymce.FakeClipboard");const ai="x-tinymce/dom-table-",ci=ai+"rows",ii=ai+"columns",mi=e=>{const t=li.FakeClipboardItem(e);li.write([t])},di=e=>{var t;const o=null!==(t=li.read())&&void 0!==t?t:[];return V(o,(t=>x.from(t.getType(e))))},ui=e=>{di(e).isSome()&&li.clear()},fi=e=>{e.fold(hi,(e=>mi({[ci]:e})))},gi=()=>di(ci),hi=()=>ui(ci),pi=e=>{e.fold(wi,(e=>mi({[ii]:e})))},bi=()=>di(ii),wi=()=>ui(ii),vi=e=>qs(as(e),ss(e)).filter(ms),yi=(e,t)=>{const o=ss(e),n=e=>Xt(e,o),l=t=>(e=>Us(as(e),ss(e)).filter(ms))(e).bind((e=>n(e).map((o=>t(o,e))))),a=t=>{e.focus()},c=(t,o=!1)=>l(((n,r)=>{const s=$s(Gs(e),n,r);t(n,s,o).each(a)})),i=()=>l(((t,o)=>{const n=$s(Gs(e),t,o),r=zr(f,Te.fromDom(e.getDoc()),x.none());return Lc(t,n,r)})),m=()=>l(((t,o)=>{const n=$s(Gs(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=Lr(Te.fromDom(e.getDoc())),l=((e,t,o,n)=>({selection:Ls(e),clipboard:o,generators:n}))(Gs(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=>{pi(e),c(t.deleteColumn)})),mceTableCutRow:()=>i().each((e=>{fi(e),c(t.deleteRow)})),mceTableCopyCol:()=>m().each((e=>pi(e))),mceTableCopyRow:()=>i().each((e=>fi(e))),mceTablePasteColBefore:()=>d(t.pasteColsBefore,bi),mceTablePasteColAfter:()=>d(t.pasteColsAfter,bi),mceTablePasteRowBefore:()=>d(t.pasteRowsBefore,gi),mceTablePasteRowAfter:()=>d(t.pasteRowsAfter,gi),mceTableDelete:()=>vi(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=Gs(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))),Oc(e,t.dom,kc)}))},mceTableToggleClass:(t,o)=>{l((t=>{e.formatter.toggle("tableclass",{value:o},t.dom),Oc(e,t.dom,kc)}))},mceTableToggleCaption:()=>{vi(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)=>{Me(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)})),Oc(e,o.dom,Ec)}))}))},mceTableSizingMode:(t,n)=>(t=>vi(e).each((n=>{Kr(e)||Gr(e)||Ur(e)||Xt(n,o).each((o=>{"relative"!==t||Kc(o)?"fixed"!==t||Yc(o)?"responsive"!==t||Jc(o)||ei(o):Zc(o):Xc(o),ls(o),Oc(e,o.dom,Ec)}))})))(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 si(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(Gs(e),ms);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=>Oc(e,t.dom,kc))))}))},Ci=ua([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),xi={before:Ci.before,on:Ci.on,after:Ci.after,cata:(e,t,o,n)=>e.fold(t,o,n),getStart:e=>e.fold(h,h,h)},Ti=(e,t)=>({selection:e,kill:t}),Si=(e,t)=>{const o=e.document.createRange();return o.selectNode(t.dom),o},Ri=(e,t)=>{const o=e.document.createRange();return Di(o,t),o},Di=(e,t)=>e.selectNodeContents(t.dom),Oi=(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},ki=(e,t,o,n,r)=>{const s=e.document.createRange();return s.setStart(t.dom,o),s.setEnd(n.dom,r),s},Ei=e=>({left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}),Ni=ua([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Ai=(e,t,o)=>t(Te.fromDom(o.startContainer),o.startOffset,Te.fromDom(o.endContainer),o.endOffset),Bi=(e,t)=>{const o=((e,t)=>t.match({domRange:e=>({ltr:g(e),rtl:x.none}),relative:(t,o)=>({ltr:ro((()=>Oi(e,t,o))),rtl:ro((()=>x.some(Oi(e,o,t))))}),exact:(t,o,n,r)=>({ltr:ro((()=>ki(e,t,o,n,r))),rtl:ro((()=>x.some(ki(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=>Ni.rtl(Te.fromDom(e.endContainer),e.endOffset,Te.fromDom(e.startContainer),e.startOffset))).getOrThunk((()=>Ai(0,Ni.ltr,o)));return Ai(0,Ni.ltr,o)})(0,o)},_i=(e,t)=>Bi(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}});Ni.ltr,Ni.rtl;const ji=(e,t,o,n)=>({start:e,soffset:t,finish:o,foffset:n}),zi=(e,t,o,n)=>({start:xi.on(e,t),finish:xi.on(o,n)}),Li=(e,t)=>{const o=_i(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():Ns(o,n,t).bind((t=>{const n=t.boxes.getOr([]);return n.length>1?(r(e,n,t.start,t.finish),x.some(Ti(x.some(Wi(o,0,o,xr(o))),!0))):x.none()})),Ii=(e,t)=>({item:e,mode:t}),Pi=(e,t,o,n=Fi)=>e.property().parent(t).map((e=>Ii(e,n))),Fi=(e,t,o,n=Hi)=>o.sibling(e,t).map((e=>Ii(e,n))),Hi=(e,t,o,n=Hi)=>{const r=e.property().children(t);return o.first(r).map((e=>Ii(e,n)))},$i=[{current:Pi,next:Fi,fallback:x.none()},{current:Fi,next:Hi,fallback:x.some(Pi)},{current:Hi,next:Hi,fallback:x.some(Fi)}],Vi=(e,t,o,n,r=$i)=>z(r,(e=>e.current===o)).bind((o=>o.current(e,t,n,o.next).orThunk((()=>o.fallback.bind((o=>Vi(e,t,o,n))))))),qi=()=>({sibling:(e,t)=>e.query().prevSibling(t),first:e=>e.length>0?x.some(e[e.length-1]):x.none()}),Ui=()=>({sibling:(e,t)=>e.query().nextSibling(t),first:e=>e.length>0?x.some(e[0]):x.none()}),Gi=(e,t,o,n,r,s)=>Vi(e,t,n,r).bind((t=>s(t.item)?x.none():o(t.item)?x.some(t.item):Gi(e,t.item,o,t.mode,r,s))),Ki=e=>t=>0===e.property().children(t).length,Yi=(e,t,o,n)=>Gi(e,t,o,Fi,qi(),n),Ji=(e,t,o,n)=>Gi(e,t,o,Fi,Ui(),n),Qi=xs(),Xi=(e,t)=>((e,t,o)=>Yi(e,t,Ki(e),o))(Qi,e,t),Zi=(e,t)=>((e,t,o)=>Ji(e,t,Ki(e),o))(Qi,e,t),em=ua([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}]),tm=e=>xt(e,"tr"),om={...em,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):em.none("in same cell"):ks(tm,[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)?em.success():s(t)),(e=>s(t))))))).getOr(em.none("default")),cata:(e,t,o,n,r)=>e.fold(t,o,n,r)},nm=(e,t)=>L(e,b(Oe,t)),rm=ge("br"),sm=(e,t,o)=>t(e,o).bind((e=>de(e)&&0===vr(e).trim().length?sm(e,t,o):x.some(e))),lm=(e,t,o,n)=>((e,t)=>Me(e,t).filter(rm).orThunk((()=>Me(e,t-1).filter(rm))))(t,o).bind((t=>n.traverse(t).fold((()=>sm(t,n.gather,e).map(n.relative)),(e=>(e=>Be(e).bind((t=>{const o=We(t);return nm(o,e).map((n=>((e,t,o,n)=>({parent:e,children:t,element:o,index:n}))(t,o,e,n)))})))(e).map((e=>xi.on(e.parent,e.index))))))),am=(e,t,o,n)=>{const r=rm(t)?((e,t,o)=>o.traverse(t).orThunk((()=>sm(t,o.gather,e))).map(o.relative))(e,t,n):lm(e,t,o,n);return r.map((e=>({start:e,finish:e})))},cm=(e,t)=>({left:e.left,top:e.top+t,right:e.right,bottom:e.bottom+t}),im=(e,t)=>({left:e.left,top:e.top-t,right:e.right,bottom:e.bottom-t}),mm=(e,t,o)=>({left:e.left+t,top:e.top+o,right:e.right+t,bottom:e.bottom+o}),dm=e=>({left:e.left,top:e.top,right:e.right,bottom:e.bottom}),um=(e,t)=>x.some(e.getRect(t)),fm=(e,t,o)=>me(t)?um(e,t).map(dm):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(dm):x.none(),gm=(e,t)=>me(t)?um(e,t).map(dm):de(t)?e.getRangedRect(t,0,t,xr(t)).map(dm):x.none(),hm=ua([{none:[]},{retry:["caret"]}]),pm=(e,t,o)=>wt(t,Ba).fold(y,(t=>gm(e,t).exists((e=>((e,t)=>e.left<t.left||Math.abs(t.right-e.left)<1||e.left>t.right)(o,e))))),bm={point:e=>e.bottom,adjuster:(e,t,o,n,r)=>{const s=cm(r,5);return Math.abs(o.bottom-n.bottom)<1||o.top>r.bottom?hm.retry(s):o.top===r.bottom?hm.retry(cm(r,1)):pm(e,t,r)?hm.retry(mm(s,5,0)):hm.none()},move:cm,gather:Zi},wm=(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)=>wm(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=>gm(e,s).bind((l=>t.adjuster(e,s,l,o,n).fold(x.none,(n=>wm(e,t,o,n,r-1))))).orThunk((()=>x.some(n)))),x.none))),vm=(e,t,o)=>{const n=e.move(o,5),r=wm(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))))},ym={tryUp:b(vm,{point:e=>e.top,adjuster:(e,t,o,n,r)=>{const s=im(r,5);return Math.abs(o.top-n.top)<1||o.bottom<r.top?hm.retry(s):o.bottom===r.top?hm.retry(im(r,1)):pm(e,t,r)?hm.retry(mm(s,5,0)):hm.none()},move:im,gather:Xi}),tryDown:b(vm,bm),getJumpSize:g(5)},Cm=(e,t,o)=>e.getSelection().bind((n=>am(t,n.finish,n.foffset,o).fold((()=>x.some(Ys(n.finish,n.foffset))),(r=>{const s=e.fromSitus(r);return(e=>om.cata(e,(e=>x.none()),(()=>x.none()),(e=>x.some(Ys(e,0))),(e=>x.some(Ys(e,xr(e))))))(om.verify(e,n.finish,n.foffset,s.finish,s.foffset,o.failure,t))})))),xm=(e,t,o,n,r,s)=>0===s?x.none():Rm(e,t,o,n,r).bind((l=>{const a=e.fromSitus(l),c=om.verify(e,o,n,a.finish,a.foffset,r.failure,t);return om.cata(c,(()=>x.none()),(()=>x.some(l)),(l=>Oe(o,l)&&0===n?Tm(e,o,n,im,r):xm(e,t,l,0,r,s-1)),(l=>Oe(o,l)&&n===xr(l)?Tm(e,o,n,cm,r):xm(e,t,l,xr(l),r,s-1)))})),Tm=(e,t,o,n,r)=>fm(e,t,o).bind((t=>Sm(e,r,n(t,ym.getJumpSize())))),Sm=(e,t,o)=>{const n=jo().browser;return n.isChromium()||n.isSafari()||n.isFirefox()?t.retry(e,o):x.none()},Rm=(e,t,o,n,r)=>fm(e,o,n).bind((t=>Sm(e,r,t))),Dm=(e,t)=>{return bt(e,(e=>Be(e).exists((e=>Oe(e,t)))),o).isSome();var o},Om=(e,t,o,n,r)=>xt(n,"td,th",t).bind((n=>xt(n,"table",t).bind((s=>Dm(r,s)?((e,t,o)=>Cm(e,t,o).bind((n=>xm(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())))),km=(e,t,o,n,r,s)=>s(n,t).orThunk((()=>Om(e,t,o,n,r).map((e=>{const t=e.range;return Ti(x.some(Wi(t.start,t.soffset,t.finish,t.foffset)),!0)})))),Em=(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)=>Yi(Qi,e,t,o))(o,(e=>Dr(e).isSome()),t).map((e=>{const t=xr(e);return Ti(x.some(Wi(e,t,e,t)),!0)})):x.none()})))),Nm=(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)=>Ji(Qi,e,t,o))(o,(e=>Rr(e).isSome()),t).map((e=>Ti(x.some(Wi(e,0,e,0)),!0))):x.none()})))),Am=(e,t,o,n,r,s,l)=>Om(e,o,n,r,s).bind((e=>Mi(t,o,e.start,e.finish,l))),Bm=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},_m=()=>{const e=(e=>{const t=Bm(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=>_e(e).exists(os),Lm={traverse:Le,gather:Zi,relative:xi.before,retry:ym.tryDown,failure:om.failedDown},Wm={traverse:ze,gather:Xi,relative:xi.before,retry:ym.tryUp,failure:om.failedUp},Mm=e=>t=>t===e,Im=Mm(38),Pm=Mm(40),Fm=e=>e>=37&&e<=40,Hm={isBackward:Mm(37),isForward:Mm(39)},$m={isBackward:Mm(39),isForward:Mm(37)},Vm=ua([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),qm={domRange:Vm.domRange,relative:Vm.relative,exact:Vm.exact,exactFromRange:e=>Vm.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)=>xi.getStart(e),exact:(e,t,o,n)=>e}))(e);return o=t,Te.fromDom(Ae(o).dom.defaultView);var o},range:ji},Um=(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)}))},Gm=(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))},Km=document.caretPositionFromPoint?Um:document.caretRangeFromPoint?Gm:x.none,Ym=(e,t)=>{const o=se(e);return"input"===o?xi.after(e):D(["br","img"],o)?0===t?xi.before(e):xi.after(e):xi.on(e,t)},Jm=(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},Qm=e=>x.from(e.getSelection()),Xm=(e,t)=>{Qm(e).each((e=>{e.removeAllRanges(),e.addRange(t)}))},Zm=(e,t,o,n,r)=>{const s=ki(e,t,o,n,r);Xm(e,s)},ed=(e,t)=>Bi(e,t).match({ltr:(t,o,n,r)=>{Zm(e,t,o,n,r)},rtl:(t,o,n,r)=>{Qm(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){Zm(e,n,r,t,o)}else Zm(e,n,r,t,o)}))}}),td=(e,t,o,n,r)=>{const s=((e,t,o,n)=>{const r=Ym(e,t),s=Ym(o,n);return qm.relative(r,s)})(t,o,n,r);ed(e,s)},od=(e,t,o)=>{const n=((e,t)=>{const o=e.fold(xi.before,Ym,xi.after),n=t.fold(xi.before,Ym,xi.after);return qm.relative(o,n)})(t,o);ed(e,n)},nd=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()},rd=e=>{if(null===e.anchorNode||null===e.focusNode)return nd(e);{const t=Te.fromDom(e.anchorNode),o=Te.fromDom(e.focusNode);return Jm(t,e.anchorOffset,o,e.focusOffset)?x.some(ji(t,e.anchorOffset,o,e.focusOffset)):nd(e)}},sd=(e,t,o=!0)=>{const n=(o?Ri:Si)(e,t);Xm(e,n)},ld=e=>(e=>Qm(e).filter((e=>e.rangeCount>0)).bind(rd))(e).map((e=>qm.exact(e.start,e.soffset,e.finish,e.foffset))),ad=(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(Ei):x.none()})(_i(e,t)),cd=(e,t,o)=>((e,t,o)=>{const n=Te.fromDom(e.document);return Km(n,t,o).map((e=>ji(Te.fromDom(e.startContainer),e.startOffset,Te.fromDom(e.endContainer),e.endOffset)))})(e,t,o),id=e=>({elementFromPoint:(t,o)=>Te.fromPoint(Te.fromDom(e.document),t,o),getRect:e=>e.dom.getBoundingClientRect(),getRangedRect:(t,o,n,r)=>{const s=qm.exact(t,o,n,r);return ad(e,s)},getSelection:()=>ld(e).map((t=>Li(e,t))),fromSitus:t=>{const o=qm.relative(t.start,t.finish);return Li(e,o)},situsFromPoint:(t,o)=>cd(e,t,o).map((e=>zi(e.start,e.soffset,e.finish,e.foffset))),clearSelection:()=>{(e=>{Qm(e).each((e=>e.removeAllRanges()))})(e)},collapseSelection:(t=!1)=>{ld(e).each((o=>o.fold((e=>e.collapse(t)),((o,n)=>{const r=t?o:n;od(e,r,r)}),((o,n,r,s)=>{const l=t?o:r,a=t?n:s;td(e,l,a,l,a)}))))},setSelection:t=>{td(e,t.start,t.soffset,t.finish,t.foffset)},setRelativeSelection:(t,o)=>{od(e,t,o)},selectNode:t=>{sd(e,t,!1)},selectContents:t=>{sd(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))}}),md=(e,t)=>({rows:e,cols:t}),dd=(e,t,o,n)=>{const r=((e,t,o,n)=>{const r=_m(),s=r.clear,l=s=>{r.on((r=>{n.clearBeforeUpdate(t),jm(s.target,o).each((l=>{Ns(r,l,o).each((o=>{const r=o.boxes.getOr([]);if(1===r.length){const o=r[0],l="false"===ns(o),a=Tt(ts(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()}}})(id(e),t,o,n);return{clearstate:r.clearstate,mousedown:r.mousedown,mouseover:r.mouseover,mouseup:r.mouseup}},ud=e=>wt(e,ie).exists(os),fd=(e,t)=>ud(e)||ud(t),gd=(e,t,o,n)=>{const r=id(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=As(t,n.selectedSelector).fold((()=>(Fm(u)&&!f&&n.clearBeforeUpdate(t),Fm(u)&&f&&!fd(l,c)?x.none:Pm(u)&&f?b(Am,r,t,o,Lm,c,l,n.selectRange):Im(u)&&f?b(Am,r,t,o,Wm,c,l,n.selectRange):Pm(u)?b(km,r,o,Lm,c,l,Nm):Im(u)?b(km,r,o,Wm,c,l,Em):x.none)),(e=>{const o=o=>()=>{const s=V(o,(o=>((e,t,o,n,r)=>_s(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((()=>Bs(t,n.firstSelectedSelector,n.lastSelectedSelector).map((e=>{const o=Pm(u)||m.isForward(u)?xi.after:xi.before;return r.setRelativeSelection(xi.on(e.first,0),o(e.table)),n.clear(t),Ti(x.none(),!0)}))),(e=>x.some(Ti(x.none(),!0))))};return Fm(u)&&f&&!fd(l,c)?x.none:Pm(u)&&f?o([md(1,0)]):Im(u)&&f?o([md(-1,0)]):m.isBackward(u)&&f?o([md(0,-1),md(-1,0)]):m.isForward(u)&&f?o([md(0,1),md(1,0)]):Fm(u)&&!f?s:x.none}));return g()},keyup:(e,r,s,l,a)=>As(t,n.selectedSelector).fold((()=>{const c=e.raw,i=c.which;return!0===c.shiftKey&&Fm(i)&&fd(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)}},hd=(e,t)=>{const o=we(e,t);return void 0===o||""===o?[]:o.split(" ")},pd=e=>void 0!==e.dom.classList,bd=(e,t)=>((e,t,o)=>{const n=hd(e,t).concat([o]);return pe(e,t,n.join(" ")),!0})(e,"class",t),wd=(e,t)=>{pd(e)?e.dom.classList.add(t):bd(e,t)},vd=(e,t)=>pd(e)&&e.dom.classList.contains(t),yd=(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}},Cd=()=>({tag:"none"}),xd=e=>({tag:"multiple",elements:e}),Td=e=>({tag:"single",element:e}),Sd=(e,t,o)=>{const n=sn.fromTable(e);return Wl(n,t).map((e=>{const t=Al(n,o,!1),{rows:r}=Qo(t),s=((e,t)=>{const o=e.slice(0,t[t.length-1].row+1),n=Bl(o);return M(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=Bl(o);return M(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}}))},Rd=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)},Dd=(e,t,o,n,r)=>{const s=((e,t)=>o=>{e(o)&&t(Rd(o))})(o,n);return e.dom.addEventListener(t,s,r),{unbind:b(Od,e,t,s,r)}},Od=(e,t,o,n)=>{e.dom.removeEventListener(t,o,n)},kd=C,Ed=(e,t,o)=>((e,t,o,n)=>Dd(e,t,o,n,!1))(e,t,kd,o),Nd=Rd,Ad=e=>!vd(Te.fromDom(e.target),"ephox-snooker-resizer-bar"),Bd=(e,t)=>{const o=((e,t,o)=>({get:()=>js(e(),o).fold((()=>t().fold(Cd,Td)),xd)}))((()=>Te.fromDom(e.getBody())),(()=>Us(as(e),ss(e))),Hs.selectedSelector),n=yd(Hs,((t,o,n)=>{Xt(o).each((r=>{const s=Pr(e),l=zr(f,Te.fromDom(e.getDoc()),s),a=Gs(e),c=Sd(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=rs(e),l=ss(e),a=dd(r,s,l,n),c=gd(r,s,l,n),i=((e,t,o,n)=>{const r=id(e);return(e,s)=>{n.clearBeforeUpdate(t),Ns(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=qm.relative(t.start,t.finish),n=_i(r,o);e.selection.setRng(n)})))},d=e=>0===e.button,u=(()=>{const e=Bm(Te.fromDom(s)),t=Bm(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)&&Ad(e)&&a.mousedown(Nd(e))})),e.on("mouseover",(e=>{var t;void 0!==(t=e).buttons&&0==(1&t.buttons)||!Ad(e)||a.mouseover(Nd(e))})),e.on("mouseup",(e=>{d(e)&&Ad(e)&&a.mouseup(Nd(e))})),e.on("touchend",u.touchEnd),e.on("keyup",(t=>{const o=Nd(t);if(o.raw.shiftKey&&Fm(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=Nd(o);t.hide();const r=e.selection.getRng(),s=Te.fromDom(r.startContainer),l=Te.fromDom(r.endContainer),a=dn(Hm,$m)(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());ks(Xt,[o,r]).fold((()=>n.clear(s)),f)}))})),e.on("PreInit",(()=>{e.serializer.addTempAttr(Hs.firstSelected),e.serializer.addTempAttr(Hs.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))}},_d=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);z(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),Id=Md(["compare","extract","mutate","sink"]),Pd=Md(["element","start","stop","destroy"]),Fd=Md(["forceDrop","drop","move","delayDrop"]),Hd=()=>{let e=x.none();const t=jd({move:_d(["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}},$d=()=>{const e=(()=>{const e=jd({move:_d(["info"])});return{onEvent:f,reset:f,events:e.registry}})(),t=Hd();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}},Vd=(e,t,o)=>{let n=!1;const r=jd({start:_d([]),stop:_d([])}),s=$d(),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(Fd({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}},qd=e=>{const t=e.replace(/\./g,"-");return{resolve:e=>t+"-"+e}},Ud=qd("ephox-dragster").resolve;var Gd=Id({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:Ud("blocker"),...e},o=Te.fromTag("div");return pe(o,"role","presentation"),zt(o,{position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%"}),wd(o,Ud("blocker")),wd(o,t.layerClass),{element:g(o),destroy:()=>{Ge(o)}}})(t),n=Ed(o.element(),"mousedown",e.forceDrop),r=Ed(o.element(),"mouseup",e.drop),s=Ed(o.element(),"mousemove",e.move),l=Ed(o.element(),"mouseout",e.delayDrop);return Pd({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 Kd=qd("ephox-snooker").resolve,Yd=()=>{const e=jd({drag:_d(["xDelta","yDelta","target"])});let t=x.none();const o=(()=>{const e=jd({drag:_d(["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}},Jd=Kd("resizer-bar"),Qd=Kd("resizer-rows"),Xd=Kd("resizer-cols"),Zd=e=>{const t=ht(e.parent(),"."+Jd);N(t,Ge)},eu=(e,t,o)=>{const n=e.origin();N(t,(t=>{t.each((t=>{const r=o(n,t);wd(r,Jd),He(e.parent(),r)}))}))},tu=(e,t,o,n)=>{eu(e,t,((e,t)=>{const r=((e,t,o,n,r)=>{const s=Te.fromTag("div");return zt(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 wd(r,Xd),r}))},ou=(e,t,o,n)=>{eu(e,t,((e,t)=>{const r=((e,t,o,n,r)=>{const s=Te.fromTag("div");return zt(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 wd(r,Qd),r}))},nu=(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)=>M(e.all,((e,o)=>t(e.element)?[o]:[])))(e,l):[],i=B(a,((e,t)=>O(c,(e=>t===e))));ou(t,i,s,Fo(o));const m=r.length>0?jn.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))));tu(t,u,s,hn(o))},ru=(e,t)=>{if(Zd(e),e.isResizable(t)){const o=sn.fromTable(t),n=cn(o),r=ln(o);nu(o,e,t,n,r)}},su=(e,t)=>{const o=ht(e.parent(),"."+Jd);N(o,t)},lu=e=>{su(e,(e=>{jt(e,"display","none")}))},au=e=>{su(e,(e=>{jt(e,"display","block")}))},cu=Kd("resizer-bar-dragging"),iu=e=>{const t=Yd(),o=((e,t={})=>{var o;const n=null!==(o=t.mode)&&void 0!==o?o:Gd;return Vd(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");jt(e.target,"top",o+e.yDelta+"px")})),r(e.target,"data-column").each((t=>{const o=Vt(e.target,"left");jt(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))})),ru(e,o)}))}))}));const l=(n,r)=>{m.trigger.startAdjust(),t.assign(n),pe(n,"data-initial-"+r,Vt(n,r)),wd(n,cu),jt(n,"opacity","0.2"),o.go(e.parent())},a=Ed(e.parent(),"mousedown",(e=>{var t;t=e.target,vd(t,Qd)&&l(e.target,"top"),(e=>vd(e,Xd))(e.target)&&l(e.target,"left")})),c=t=>Oe(t,e.view()),i=Ed(e.view(),"mouseover",(t=>{var r;(r=t.target,xt(r,"table",c).filter(os)).fold((()=>{mt(t.target)&&Zd(e)}),(t=>{o.isActive()&&(n=x.some(t),ru(e,t))}))})),m=jd({adjustHeight:_d(["table","delta","row"]),adjustWidth:_d(["table","delta","column"]),startAdjust:_d([])});return{destroy:()=>{a.unbind(),i.unbind(),o.destroy(),Zd(e)},refresh:t=>{ru(e,t)},on:o.on,off:o.off,hideBars:b(lu,e),showBars:b(au,e),events:m.registry}},mu=(e,t,o)=>{const n=Bn,r=jn,s=iu(e),l=jd({beforeResize:_d(["table","type"]),afterResize:_d(["table","type"]),startDrag:_d([])});return s.events.adjustHeight.bind((e=>{const t=e.table;l.trigger.beforeResize(t,"row");const o=n.delta(e.delta,t);ya(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);va(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}},du=(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}},uu=(e,t,o)=>({parent:g(t),view:g(e),origin:g(wn(0,0)),isResizable:o}),fu=()=>{const e=Te.fromTag("div");return zt(e,{position:"static",height:"0",width:"0",padding:"0",margin:"0",border:"0"}),He(dt(Te.fromDom(document)),e),e},gu=e=>m(e)&&"TABLE"===e.nodeName,hu="bar-",pu=e=>"false"!==we(e,"data-mce-resize"),bu=e=>{const t=_m(),o=_m(),n=_m();let r,s;const l=t=>Ac(e,t),a=()=>$r(e)?cl():al(),c=(t,o,n)=>{const c=Et(o,"e");if(""===s&&Xc(t),n!==r&&""!==s){jt(t,"width",s);const o=a(),i=l(t),m=$r(e)||c?(e=>il(e).columns)(t)-1:0;va(t,n-r,m,o,i)}else if((e=>/^(\d+(\.\d+)?)%$/.test(e))(s)){const e=parseFloat(s.replace("%",""));jt(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=Lt(e,"width");jt(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?uu(Te.fromDom(e.getBody()),fu(),t):du(Te.fromDom(e.getDoc()),t))(e,pu);if(n.set(r),(e=>{const t=e.options.get("object_resizing");return D(t.split(","),"table")})(e)&&Yr(e)){const n=a(),s=mu(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,cs(o),is(o),hu+t.type)})),s.events.afterResize.bind((o=>{const n=o.table,r=n.dom;ls(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,cs(r),is(r),hu+o.type),e.undoManager.add()})),o.set(s)}})),e.on("ObjectResizeStart",(t=>{const o=t.target;if(gu(o)){const n=Te.fromDom(o);N(e.dom.select(".mce-clonedresizable"),(t=>{e.dom.addClass(t,"mce-"+Hr(e)+"-columns")})),!Yc(n)&&Gr(e)?Zc(n):!Kc(n)&&Ur(e)&&Xc(n),Jc(n)&&kt(t.origin,hu)&&Xc(n),r=t.width,s=Kr(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(gu(o)){const n=Te.fromDom(o),r=t.origin;kt(r,"corner-")&&c(n,r,t.width),ls(n),Oc(e,n.dom,kc)}})),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()))}}},wu=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}),t("table_merge_content_on_paste",{processor:"boolean",default:!0})})(e);const t=bu(e),o=Bd(e,t),n=Bc(e,t,o);return yi(e,n),((e,t)=>{const o=ss(e),n=t=>Us(as(e)).bind((n=>Xt(n,o).map((o=>{const r=$s(Gs(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),Ks(e,n),{getSelectedCells:o.getSelectedCells,clearSelectedCells:o.clearSelectedCells}},vu=e=>({table:wu(e)});e.add("dom",vu)}()}));
;/*!node_modules/tinymce/plugins/advlist/plugin.js*/
amis.define("b7e4ae8",(function(t,e,s,n){!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=(t,e,s)=>{const n="UL"===e?"InsertUnorderedList":"InsertOrderedList";t.execCommand(n,!1,!1===s?null:{"list-style-type":s})},s=t=>e=>e.options.get(t),n=s("advlist_number_styles"),r=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)$/),c=u(/^(TH|TD)$/),g=(t,e,s)=>((t,e,s)=>{for(let n=0,r=t.length;n<r;n++){const r=t[n];if(e(r,n))return a.some(r);if(s(r,n))break}return a.none()})(e,(t=>d(t)&&!/\btox\-/.test(t.className)),c).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,(n=>((t,n)=>{const r=t.selection.getStart(!0);s.setActive(g(t,n,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.selection.isEditable()})(t,r)&&t.selection.isEditable())})(t,n.parents))),p=(t,s,n,r,i,l)=>{t.ui.registry.addSplitButton(s,{tooltip:n,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,n=h(t),r=(t=>t.replace(/\-/g," ").replace(/\b\w/g,(t=>t.toUpperCase())))(t);return{type:"choiceitem",value:n,icon:"list-"+e+"-"+s,text:r}})))},onAction:()=>t.execCommand(r),onItemAction:(s,n)=>{e(t,i,n)},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,n,r,i,l)=>{l.length>1?p(t,s,n,r,i,l):((t,s,n,r,i,l)=>{t.ui.registry.addToggleButton(s,{active:!1,tooltip:n,icon:"OL"===i?"ordered-list":"unordered-list",onSetup:m(t,i),onAction:()=>t.queryCommandState(r)||""===l?t.execCommand(r):e(t,i,l)})})(t,s,n,r,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",n(t)),v(t,"bullist","Bullet list","InsertUnorderedList","UL",r(t))})(t),(t=>{t.addCommand("ApplyUnorderedListStyle",((s,n)=>{e(t,"UL",n["list-style-type"])})),t.addCommand("ApplyOrderedListStyle",((s,n)=>{e(t,"OL",n["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("b704819",(function(e,i,n,a){e("b7e4ae8")}));
;/*!node_modules/tinymce/plugins/autolink/plugin.js*/
amis.define("bfe6f00",(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 b=f.backwards(v.container,v.offset,((e,t)=>{_=e;const n=p(e.data,t,k);return-1===n?n:n+1}),w),A=l.createRng();b?A.setStart(b.container,b.offset):A.setStart(_,0),A.setEnd(v.container,v.offset);const C=A.toString().replace(/\uFEFF/g,"").match(s);if(C){let t=C[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:A,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("dcdef9a",(function(f,e,d,i){f("bfe6f00")}));
;/*!node_modules/tinymce/plugins/autoresize/plugin.js*/
amis.define("91a6e5c",(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("4e1a306",(function(e,a,i,n){e("91a6e5c")}));
;/*!node_modules/tinymce/plugins/lists/plugin.js*/
amis.define("abf9d3f",(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=>()=>e,u=(e,t)=>e===t;const f=e=>t=>!e(t),p=m(!1);class g{constructor(e,t){this.tag=e,this.value=t}static some(e){return new g(!0,e)}static none(){return g.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?g.some(e(this.value)):g.none()}bind(e){return this.tag?e(this.value):g.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:g.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)?g.some(e):g.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()"}}g.singletonNone=new g(!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},N=(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},S=(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},D=(e,t,n)=>(S(e,((e,o)=>{n=t(n,e,o)})),n),T=(e,t,n)=>{for(let o=0,r=e.length;o<r;o++){const r=e[o];if(t(r,o))return g.some(r);if(n(r,o))break}return g.none()},O=(e,t)=>T(e,t,p),x=(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})(N(e,t)),A=e=>{const t=h.call(e,0);return t.reverse(),t},E=(e,t)=>t>=0&&t<e.length?g.some(e[t]):g.none(),w=e=>E(e,0),k=e=>E(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=u)=>e.exists((e=>n(e,t))),M=(e,t,n)=>e.isSome()&&t.isSome()?g.some(n(e.getOrDie(),t.getOrDie())):g.none(),I=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 I(n.childNodes[0])},fromTag:(e,t)=>{const n=(t||document).createElement(e);return I(n)},fromText:(e,t)=>{const n=(t||document).createTextNode(e);return I(n)},fromDom:I,fromPoint:(e,t,n)=>g.from(e.dom.elementFromPoint(t,n)).map(I)},U=(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")}},$=(e,t)=>e.dom===t.dom,H=U,_="undefined"!=typeof window?window:Function("return this;")(),F=(e,t)=>((e,t)=>{let n=null!=t?t:_;for(let t=0;t<e.length&&null!=n;++t)n=n[e[t]];return n})(e.split("."),t),V=(e,t)=>{const n=((e,t)=>F(e,t))(e,t);if(null==n)throw new Error(e+" not available on this browser");return n},j=Object.getPrototypeOf,K=e=>{const t=F("ownerDocument.defaultView",e);return r(e)&&((e=>V("HTMLElement",e))(t).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(j(e).constructor.name))},z=e=>e.dom.nodeName.toLowerCase(),Q=e=>e.dom.nodeType,W=e=>t=>Q(t)===e,q=e=>Z(e)&&K(e.dom),Z=W(1),G=W(3),J=W(9),X=W(11),Y=e=>t=>Z(t)&&z(t)===e,ee=e=>g.from(e.dom.parentNode).map(R.fromDom),te=e=>N(e.dom.childNodes,R.fromDom),ne=(e,t)=>{const n=e.dom.childNodes;return g.from(n[t]).map(R.fromDom)},oe=e=>ne(e,0),re=e=>ne(e,e.dom.childNodes.length-1),se=a(Element.prototype.attachShadow)&&a(Node.prototype.getRootNode)?e=>R.fromDom(e.dom.getRootNode()):e=>{return J(e)?e:(t=e,R.fromDom(t.dom.ownerDocument));var t},ie=e=>{const t=se(e);return X(n=t)&&l(n.dom.host)?g.some(t):g.none();var n},le=e=>R.fromDom(e.dom.host),ae=e=>{const t=G(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const n=t.ownerDocument;return ie(R.fromDom(t)).fold((()=>n.body.contains(t)),(o=ae,r=le,e=>o(r(e))));var o,r};var de=(e,t,n,o,r)=>e(n,o)?g.some(n):a(r)&&r(n)?g.none():t(n,o,r);const ce=(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 g.some(e);if(r(e))break}return g.none()},me=(e,t,n)=>de(((e,t)=>t(e)),ce,e,t,n),ue=(e,t,n)=>ce(e,(e=>U(e,t)),n),fe=e=>{return de(((e,t)=>U(e,t)),ue,e,"[contenteditable]",t);var t},pe=e=>e.dom.contentEditable,ge=(e,t)=>{ee(e).each((n=>{n.dom.insertBefore(t.dom,e.dom)}))},he=(e,t)=>{const n=(e=>g.from(e.dom.nextSibling).map(R.fromDom))(e);n.fold((()=>{ee(e).each((e=>{ye(e,t)}))}),(e=>{ge(e,t)}))},ye=(e,t)=>{e.dom.appendChild(t.dom)},ve=(e,t)=>{S(t,(t=>{ye(e,t)}))},Ce=e=>{e.dom.textContent="",S(te(e),(e=>{be(e)}))},be=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)};var Ne=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),Se=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),Le=tinymce.util.Tools.resolve("tinymce.util.VK");const De=e=>N(e,R.fromDom),Te=Object.keys,Oe=(e,t)=>{const n=Te(e);for(let o=0,r=n.length;o<r;o++){const r=n[o];t(e[r],r)}},xe=(e,t)=>{const n={};var o;return((e,t,n,o)=>{Oe(e,((e,r)=>{(t(e,r)?n:o)(e,r)}))})(e,t,(o=n,(e,t)=>{o[t]=e}),c),n},Ae=(e,t)=>{const n=e.dom;Oe(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)}))},Ee=e=>D(e.dom.attributes,((e,t)=>(e[t.name]=t.value,e)),{}),we=e=>((e,t)=>R.fromDom(e.dom.cloneNode(t)))(e,!0),ke=(e,t)=>{const n=((e,t)=>{const n=R.fromTag(t),o=Ee(e);return Ae(n,o),n})(e,t);he(e,n);const o=te(e);return ve(n,o),be(e),n};var Be=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Pe=tinymce.util.Tools.resolve("tinymce.util.Tools");const Me=e=>t=>l(t)&&t.nodeName.toLowerCase()===e,Ie=e=>t=>l(t)&&e.test(t.nodeName),Re=e=>l(e)&&3===e.nodeType,Ue=e=>l(e)&&1===e.nodeType,$e=Ie(/^(OL|UL|DL)$/),He=Ie(/^(OL|UL)$/),_e=Me("ol"),Fe=Ie(/^(LI|DT|DD)$/),Ve=Ie(/^(DT|DD)$/),je=Ie(/^(TH|TD)$/),Ke=Me("br"),ze=(e,t)=>l(t)&&t.nodeName in e.schema.getTextBlockElements(),Qe=(e,t)=>l(e)&&e.nodeName in t,We=(e,t)=>l(t)&&t.nodeName in e.schema.getVoidElements(),qe=(e,t,n)=>{const o=e.isEmpty(t);return!(n&&e.select("span[data-mce-type=bookmark]",t).length>0)&&o},Ze=(e,t)=>e.isChildOf(t,e.getRoot()),Ge=e=>t=>t.options.get(e),Je=Ge("lists_indent_on_tab"),Xe=Ge("forced_root_block"),Ye=Ge("forced_root_block_attrs"),et=(e,t)=>{const n=e.dom,o=e.schema.getBlockElements(),r=n.createFragment(),s=Xe(e),i=Ye(e);let l,a,d=!1;for(a=n.create(s,i),Qe(t.firstChild,o)||r.appendChild(a);l=t.firstChild;){const e=l.nodeName;d||"SPAN"===e&&"bookmark"===l.getAttribute("data-mce-type")||(d=!0),Qe(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},tt=Be.DOM,nt=(e,t,n)=>{const o=tt.select('span[data-mce-type="bookmark"]',t),r=et(e,n),s=tt.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)){tt.remove(t);break}e.dom.isEmpty(i)||tt.insertAfter(i,t),tt.insertAfter(r,t);const l=n.parentElement;l&&qe(e.dom,l)&&(e=>{const t=e.parentNode;t&&Pe.each(o,(e=>{t.insertBefore(e,n.parentNode)})),tt.remove(e)})(l),tt.remove(n),qe(e.dom,t)&&tt.remove(t)},ot=Y("dd"),rt=Y("dt"),st=(e,t)=>{var n;ot(t)?ke(t,"dt"):rt(t)&&(n=t,g.from(n.dom.parentElement).map(R.fromDom)).each((n=>nt(e,n.dom,t.dom)))},it=e=>{rt(e)&&ke(e,"dd")},lt=(e,t)=>{if(Re(e))return{container:e,offset:t};const n=Ne.getNode(e,t);return Re(n)?{container:n,offset:t>=e.childNodes.length?n.data.length:0}:n.previousSibling&&Re(n.previousSibling)?{container:n.previousSibling,offset:n.previousSibling.data.length}:n.nextSibling&&Re(n.nextSibling)?{container:n.nextSibling,offset:0}:{container:e,offset:t}},at=e=>{const t=e.cloneRange(),n=lt(e.startContainer,e.startOffset);t.setStart(n.container,n.offset);const o=lt(e.endContainer,e.endOffset);return t.setEnd(o.container,o.offset),t},dt=["OL","UL","DL"],ct=dt.join(","),mt=(e,t)=>{const n=t||e.selection.getStart(!0);return e.dom.getParent(n,ct,gt(e,n))},ut=e=>{const t=mt(e),n=e.selection.getSelectedBlocks();return((e,t)=>l(e)&&1===t.length&&t[0]===e)(t,n)?(e=>L(e.querySelectorAll(ct),$e))(t):L(n,(e=>$e(e)&&t!==e))},ft=e=>{const t=e.selection.getSelectedBlocks();return L(((e,t)=>{const n=Pe.map(t,(t=>e.dom.getParent(t,"li,dd,dt",gt(e,t))||t));return B(n)})(e,t),Fe)},pt=(e,t)=>{const n=e.dom.getParents(t,"TD,TH");return n.length>0?n[0]:e.getBody()},gt=(e,t)=>{const n=e.dom.getParents(t,e.dom.isBlock),o=O(n,(t=>{return n=e.schema,!$e(o=t)&&!Fe(o)&&b(dt,(e=>n.isValidChild(o.nodeName,e)));var n,o}));return o.getOr(e.getBody())},ht=(e,t)=>{const n=e.dom.getParents(t,"ol,ul",gt(e,t));return k(n)},yt=e=>{const t=(e=>{const t=ht(e,e.selection.getStart()),n=L(e.selection.getSelectedBlocks(),He);return t.toArray().concat(n)})(e),n=(e=>{const t=e.selection.getStart();return e.dom.getParents(t,"ol,ul",gt(e,t))})(e);return O(n,(e=>{return t=R.fromDom(e),ee(t).exists((e=>Fe(e.dom)&&oe(e).exists((e=>!$e(e.dom)))&&re(e).exists((e=>!$e(e.dom)))));var t})).fold((()=>vt(e,t)),(e=>[e]))},vt=(e,t)=>{const n=N(t,(t=>ht(e,t).getOr(t)));return B(n)},Ct=e=>/\btox\-/.test(e.className),bt=(e,t)=>T(e,$e,je).exists((e=>e.nodeName===t&&!Ct(e))),Nt=(e,t)=>null!==t&&!e.dom.isEditable(t),St=(e,t)=>{const n=e.dom.getParent(t,"ol,ul,dl");return Nt(e,n)},Lt=(e,t)=>{const n=e.selection.getNode();return t({parents:e.dom.getParents(n),element:n}),e.on("NodeChange",t),()=>e.off("NodeChange",t)},Dt=(e,t)=>{const n=(t||document).createDocumentFragment();return S(e,(e=>{n.appendChild(e.dom)})),R.fromDom(n)},Tt=(e,t,n)=>e.dispatch("ListMutation",{action:t,element:n}),Ot=(xt=/^\s+|\s+$/g,e=>e.replace(xt,""));var xt;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)},Et=(e,t,n)=>{const o=e.dom;At(o,t,n)},wt=e=>H(e,"OL,UL"),kt=e=>oe(e).exists(wt),Bt=e=>"listAttributes"in e,Pt=e=>"isComment"in e,Mt=e=>e.depth>0,It=e=>e.isSelected,Rt=e=>{const t=te(e),n=re(e).exists(wt)?t.slice(0,-1):t;return N(n,we)},Ut=(e,t)=>{ye(e.item,t.list)},$t=(e,t)=>{const n={list:R.fromTag(t,e),item:R.fromTag("li",e)};return ye(n.list,n.item),n},Ht=(e,t,n)=>{const o=t.slice(0,n.depth);return k(o).each((t=>{if(Bt(n)){const o=((e,t,n)=>{const o=R.fromTag("li",e);return Ae(o,t),ve(o,n),o})(e,n.itemAttributes,n.content);((e,t)=>{ye(e.list,t),e.item=t})(t,o),((e,t)=>{z(e.list)!==t.listType&&(e.list=ke(e.list,t.listType)),Ae(e.list,t.listAttributes)})(t,n)}else if((e=>"isFragment"in e)(n))ve(t.item,n.content);else{const e=R.fromHtml(`\x3c!--${n.content}--\x3e`);ye(t.list,e)}})),o},_t=(e,t,n)=>{const o=((e,t,n)=>{const o=[];for(let r=0;r<n;r++)o.push($t(e,Bt(t)?t.listType:t.parentListType));return o})(e,n,n.depth-t.length);var r;return(e=>{for(let t=1;t<e.length;t++)Ut(e[t-1],e[t])})(o),((e,t)=>{for(let t=0;t<e.length-1;t++)Et(e[t].item,"list-style-type","none");k(e).each((e=>{Bt(t)&&(Ae(e.list,t.listAttributes),Ae(e.item,t.itemAttributes)),ve(e.item,t.content)}))})(o,n),r=o,M(k(t),w(r),Ut),t.concat(o)},Ft=(e,t)=>{let n=g.none();const o=D(t,((t,o,r)=>Pt(o)?0===r?(n=g.some(o),t):Ht(e,t,o):o.depth>t.length?_t(e,t,o):Ht(e,t,o)),[]);return n.each((e=>{const t=R.fromHtml(`\x3c!--${e.content}--\x3e`);w(o).each((e=>{((e,t)=>{oe(e).fold((()=>{ye(e,t)}),(n=>{e.dom.insertBefore(t.dom,n.dom)}))})(e.list,t)}))})),w(o).map((e=>e.list))},Vt=e=>(S(e,((t,n)=>{((e,t)=>{const n=e[t].depth,o=e=>e.depth===n&&!e.dirty,r=e=>e.depth<n;return T(A(e.slice(0,t)),o,r).orThunk((()=>T(e.slice(t+1),o,r)))})(e,n).fold((()=>{t.dirty&&Bt(t)&&(e=>{e.listAttributes=xe(e.listAttributes,((e,t)=>"start"!==t))})(t)}),(e=>{return o=e,void(Bt(n=t)&&Bt(o)&&(n.listType=o.listType,n.listAttributes={...o.listAttributes}));var n,o}))})),e),jt=(e,t,n,o)=>{var r,s;if(8===Q(s=o)||"#comment"===z(s))return[{depth:e+1,content:null!==(r=o.dom.nodeValue)&&void 0!==r?r:"",dirty:!1,isSelected:!1,isComment:!0}];t.each((e=>{$(e.start,o)&&n.set(!0)}));const i=((e,t,n)=>ee(e).filter(Z).map((o=>({depth:t,dirty:!1,isSelected:n,content:Rt(e),itemAttributes:Ee(e),listAttributes:Ee(o),listType:z(o),isInPreviousLi:!1}))))(o,e,n.get());t.each((e=>{$(e.end,o)&&n.set(!1)}));const l=re(o).filter(wt).map((o=>zt(e,t,n,o))).getOr([]);return i.toArray().concat(l)},Kt=(e,t,n,o)=>oe(o).filter(wt).fold((()=>jt(e,t,n,o)),(r=>{const s=D(te(o),((o,s,i)=>{if(0===i)return o;if(H(s,"LI"))return o.concat(jt(e,t,n,s));{const t={isFragment:!0,depth:e,content:[s],isSelected:!1,dirty:!1,parentListType:z(r)};return o.concat(t)}}),[]);return zt(e,t,n,r).concat(s)})),zt=(e,t,n,o)=>x(te(o),(o=>(wt(o)?zt:Kt)(e+1,t,n,o))),Qt=(e,t)=>x(((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,Mt),(t=>w(t).exists(Mt)?((e,t)=>{const n=Vt(t);return Ft(e.contentDocument,n).toArray()})(e,t):((e,t)=>{const n=Vt(t);return N(n,(t=>{const n=Pt(t)?Dt([R.fromHtml(`\x3c!--${t.content}--\x3e`)]):Dt(t.content);return R.fromDom(et(e,n.dom))}))})(e,t))),Wt=(e,t,n)=>{const o=((e,t)=>{const n=(e=>{let t=!1;return{get:()=>t,set:e=>{t=e}}})();return N(e,(e=>({sourceList:e,entries:zt(0,t,n,e)})))})(t,(e=>{const t=N(ft(e),R.fromDom);return M(O(t,f(kt)),O(A(t),f(kt)),((e,t)=>({start:e,end:t})))})(e));S(o,(t=>{((e,t)=>{S(L(e,It),(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=Qt(e,t.entries);var r;S(o,(t=>{Tt(e,"Indent"===n?"IndentList":"OutdentList",t.dom)})),r=t.sourceList,S(o,(e=>{ge(r,e)})),be(t.sourceList)}))},qt=(e,t)=>{const n=De(yt(e)),o=De((e=>L(ft(e),Ve))(e));let r=!1;if(n.length||o.length){const s=e.selection.getBookmark();Wt(e,n,t),((e,t,n)=>{S(n,"Indent"===t?it:t=>st(e,t))})(e,t,o),e.selection.moveToBookmark(s),e.selection.setRng(at(e.selection.getRng())),e.nodeChanged(),r=!0}return r},Zt=(e,t)=>!(e=>{const t=mt(e);return Nt(e,t)})(e)&&qt(e,t),Gt=e=>Zt(e,"Indent"),Jt=e=>Zt(e,"Outdent"),Xt=e=>Zt(e,"Flatten"),Yt=e=>"\ufeff"===e,en=(e,t)=>{return n=e,o=function(e,...t){return(...n)=>{const o=t.concat(n);return e.apply(null,o)}}($,t),ce(n,o,r).isSome();var n,o,r};var tn=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager");const nn=Be.DOM,on=e=>{const t={},n=n=>{let o=e[n?"startContainer":"endContainer"],r=e[n?"startOffset":"endOffset"];if(Ue(o)){const e=nn.create("span",{"data-mce-type":"bookmark"});o.hasChildNodes()?(r=Math.min(r,o.childNodes.length-1),n?o.insertBefore(e,o.childNodes[r]):nn.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},rn=e=>{const t=t=>{let n=e[t?"startContainer":"endContainer"],o=e[t?"startOffset":"endOffset"];if(n){if(Ue(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;Ue(n)&&"bookmark"===n.getAttribute("data-mce-type")||o++,n=n.nextSibling}return-1})(n),n=n.parentNode,nn.remove(e),!n.hasChildNodes()&&nn.isBlock(n)&&n.appendChild(nn.create("br"))}e[t?"startContainer":"endContainer"]=n,e[t?"startOffset":"endOffset"]=o}};t(!0),t();const n=nn.createRng();return n.setStart(e.startContainer,e.startOffset),e.endContainer&&n.setEnd(e.endContainer,e.endOffset),at(n)},sn=e=>{switch(e){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}},ln=(e,t)=>{Pe.each(t,((t,n)=>{e.setAttribute(n,t)}))},an=(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)=>{ln(t,n["list-attributes"]),Pe.each(e.select("li",t),(e=>{ln(e,n["list-item-attributes"])}))})(e,t,n)},dn=(e,t)=>l(t)&&!Qe(t,e.schema.getBlockElements()),cn=(e,t,n,o)=>{let r=t[n?"startContainer":"endContainer"];const s=t[n?"startOffset":"endOffset"];Ue(r)&&(r=r.childNodes[Math.min(s,r.childNodes.length-1)]||r),!n&&Ke(r.nextSibling)&&(r=r.nextSibling);const i=(t,n)=>{var r;const s=new Se(t,(t=>{for(;!e.dom.isBlock(t)&&t.parentNode&&o!==t;)t=t.parentNode;return t})(t)),i=n?"next":"prev";let l;for(;l=s[i]();)if(!We(e,l)&&!Yt(l.textContent)&&0!==(null===(r=l.textContent)||void 0===r?void 0:r.length))return g.some(l);return g.none()};if(n&&Re(r))if(Yt(r.textContent))r=i(r,!1).getOr(r);else for(null!==r.parentNode&&dn(e,r.parentNode)&&(r=r.parentNode);null!==r.previousSibling&&(dn(e,r.previousSibling)||Re(r.previousSibling));)r=r.previousSibling;if(!n&&Re(r))if(Yt(r.textContent))r=i(r,!0).getOr(r);else for(null!==r.parentNode&&dn(e,r.parentNode)&&(r=r.parentNode);null!==r.nextSibling&&(dn(e,r.nextSibling)||Re(r.nextSibling));)r=r.nextSibling;for(;r.parentNode!==o;){const t=r.parentNode;if(ze(e,r))return r;if(/^(TD|TH)$/.test(t.nodeName))return r;r=t}return r},mn=(e,t,n)=>{const o=e.selection.getRng();let r="LI";const s=gt(e,((e,t)=>{const n=e.selection.getStart(!0),o=cn(e,t,!0,e.getBody());return en(R.fromDom(o),R.fromDom(t.commonAncestorContainer))?t.commonAncestorContainer:n})(e,o)),i=e.dom;if("false"===i.getContentEditable(e.selection.getNode()))return;"DL"===(t=t.toUpperCase())&&(r="DT");const l=on(o),a=L(((e,t,n)=>{const o=[],r=e.dom,s=cn(e,t,!0,n),i=cn(e,t,!1,n);let l;const a=[];for(let e=s;e&&(a.push(e),e!==i);e=e.nextSibling);return Pe.each(a,(t=>{var s;if(ze(e,t))return o.push(t),void(l=null);if(r.isBlock(t)||Ke(t))return Ke(t)&&r.remove(t),void(l=null);const i=t.nextSibling;tn.isBookmarkNode(t)&&($e(i)||ze(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),e.dom.isEditable);Pe.each(a,(o=>{let s;const l=o.previousSibling,a=o.parentNode;Fe(a)||(l&&$e(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)=>{Pe.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"]),an(i,s,n),fn(e.dom,s))})),e.selection.setRng(rn(l))},un=(e,t,n)=>{return((e,t)=>$e(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},fn=(e,t)=>{let n,o=t.nextSibling;if(un(e,t,o)){const r=o;for(;n=r.firstChild;)t.appendChild(n);e.remove(r)}if(o=t.previousSibling,un(e,t,o)){const r=o;for(;n=r.lastChild;)t.insertBefore(n,t.firstChild);e.remove(r)}},pn=(e,t,n,o)=>{if(t.nodeName!==n){const r=e.dom.rename(t,n);an(e.dom,r,o),Tt(e,sn(n),r)}else an(e.dom,t,o),Tt(e,sn(n),t)},gn=(e,t,n,o)=>{if(t.classList.forEach(((e,n,o)=>{e.startsWith("tox-")&&(o.remove(e),0===o.length&&t.removeAttribute("class"))})),t.nodeName!==n){const r=e.dom.rename(t,n);an(e.dom,r,o),Tt(e,sn(n),r)}else an(e.dom,t,o),Tt(e,sn(n),t)},hn=e=>"list-style-type"in e,yn=(e,t,n)=>{const o=mt(e);if(St(e,o))return;const s=ut(e),i=r(n)?n:{};s.length>0?((e,t,n,o,r)=>{const s=$e(t);if(!s||t.nodeName!==o||hn(r)||Ct(t)){mn(e,o,r);const i=on(e.selection.getRng()),l=s?[t,...n]:n,a=s&&Ct(t)?gn:pn;Pe.each(l,(t=>{a(e,t,o,r)})),e.selection.setRng(rn(i))}else Xt(e)})(e,o,s,t,i):((e,t,n,o)=>{if(t!==e.getBody())if(t)if(t.nodeName!==n||hn(o)||Ct(t)){const r=on(e.selection.getRng());Ct(t)&&t.classList.forEach(((e,n,o)=>{e.startsWith("tox-")&&(o.remove(e),0===o.length&&t.removeAttribute("class"))})),an(e.dom,t,o);const s=e.dom.rename(t,n);fn(e.dom,s),e.selection.setRng(rn(r)),mn(e,n,o),Tt(e,sn(n),s)}else Xt(e);else mn(e,n,o),Tt(e,sn(n),t)})(e,o,t,i)},vn=Be.DOM,Cn=(e,t)=>{const n=Pe.grep(e.select("ol,ul",t));Pe.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),qe(e,n)&&vn.remove(n)):vn.setStyle(n,"listStyleType","none")}if($e(n)){const e=n.previousSibling;e&&"LI"===e.nodeName&&e.appendChild(t)}})(e,t)}))},bn=(e,t,n,o)=>{let r=t.startContainer;const s=t.startOffset;if(Re(r)&&(n?s<r.data.length:s>0))return r;const i=e.schema.getNonEmptyElements();Ue(r)&&(r=Ne.getNode(r,s));const l=new Se(r,o);n&&((e,t)=>!!Ke(t)&&e.isBlock(t.nextSibling)&&!Ke(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(Re(r)&&r.data.length>0)return r}return null},Nn=(e,t)=>{const n=t.childNodes;return 1===n.length&&!$e(n[0])&&e.isBlock(n[0])},Sn=e=>g.from(e).map(R.fromDom).filter(q).exists((e=>((e,t=!1)=>ae(e)?e.dom.isContentEditable:fe(e).fold(m(t),(e=>"true"===pe(e))))(e)&&!C(["details"],z(e)))),Ln=(e,t,n)=>{let o;const r=Nn(e,n)?n.firstChild:n;if(((e,t)=>{Nn(e,t)&&Sn(t.firstChild)&&e.remove(t.firstChild,!0)})(e,t),!qe(e,t,!0))for(;o=t.firstChild;)r.appendChild(o)},Dn=(e,t,n)=>{let o;const r=t.parentNode;if(!Ze(e,t)||!Ze(e,n))return;$e(n.lastChild)&&(o=n.lastChild),r===n.lastChild&&Ke(r.previousSibling)&&e.remove(r.previousSibling);const s=n.lastChild;s&&Ke(s)&&t.hasChildNodes()&&e.remove(s),qe(e,n,!0)&&Ce(R.fromDom(n)),Ln(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,$e,n):[];e.remove(t),S(i,(t=>{qe(e,t)&&t!==e.getRoot()&&e.remove(t)}))},Tn=(e,t,n,o)=>{const r=e.dom;if(r.isEmpty(o))((e,t,n)=>{Ce(R.fromDom(n)),Dn(e.dom,t,n),e.selection.setCursorLocation(n,0)})(e,n,o);else{const s=on(t);Dn(r,n,o),e.selection.setRng(rn(s))}},On=(e,t)=>{const n=e.dom,o=e.selection,r=o.getStart(),s=pt(e,r),i=n.getParent(o.getStart(),"LI",s);if(i){const r=i.parentElement;if(r===e.getBody()&&qe(n,r))return!0;const l=at(o.getRng()),a=n.getParent(bn(e,l,t,s),"LI",s),d=a&&(t?n.isChildOf(i,a):n.isChildOf(a,i));if(a&&a!==i&&!d)return e.undoManager.transact((()=>{var n,o;t?Tn(e,l,a,i):(null===(o=(n=i).parentNode)||void 0===o?void 0:o.firstChild)===n?Jt(e):((e,t,n,o)=>{const r=on(t);Dn(e.dom,n,o);const s=rn(r);e.selection.setRng(s)})(e,l,i,a)})),!0;if(d&&!t&&a!==i)return e.undoManager.transact((()=>{if(l.commonAncestorContainer.parentElement){const t=on(l),o=l.commonAncestorContainer.parentElement;Ln(n,l.commonAncestorContainer.parentElement,a),o.remove();const r=rn(t);e.selection.setRng(r)}})),!0;if(!a&&!t&&0===l.startOffset&&0===l.endOffset)return e.undoManager.transact((()=>{Xt(e)})),!0}return!1},xn=(e,t)=>{const n=e.dom,o=e.selection.getStart(),r=pt(e,o),s=n.getParent(o,n.isBlock,r);if(s&&n.isEmpty(s)){const o=at(e.selection.getRng()),i=n.getParent(bn(e,o,t,r),"LI",r);if(i){const l=e=>C(["td","th","caption"],z(e)),a=e=>e.dom===r;return!!((e,t,n=u)=>M(e,t,n).getOr(e.isNone()&&t.isNone()))(me(R.fromDom(i),l,a),me(R.fromDom(o.startContainer),l,a),$)&&(e.undoManager.transact((()=>{const o=i.parentNode;((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),fn(n,o),e.selection.select(i,!0),e.selection.collapse(t)})),!0)}}return!1},An=e=>{const t=e.selection.getStart(),n=pt(e,t);return e.dom.getParent(t,"LI,DT,DD",n)||ft(e).length>0},En=(e,t)=>{const n=e.selection;return!St(e,n.getNode())&&(n.isCollapsed()?((e,t)=>On(e,t)||xn(e,t))(e,t):(e=>!!An(e)&&(e.undoManager.transact((()=>{e.execCommand("Delete"),Cn(e.dom,e.getBody())})),!0))(e))},wn=e=>{const t=A(Ot(e).split("")),n=N(t,((e,t)=>{const n=e.toUpperCase().charCodeAt(0)-"A".charCodeAt(0)+1;return Math.pow(26,t)*n}));return D(n,((e,t)=>e+t),0)},kn=e=>{if(--e<0)return"";{const t=e%26,n=Math.floor(e/26);return kn(n)+String.fromCharCode("A".charCodeAt(0)+t)}},Bn=e=>{const t=parseInt(e.start,10);return P(e.listStyleType,"upper-alpha")?kn(t):P(e.listStyleType,"lower-alpha")?kn(t).toLowerCase():e.start},Pn=e=>{const t=mt(e);_e(t)&&!St(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:Bn({start:e.dom.getAttrib(t,"start","1"),listStyleType:g.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 g.some({listStyleType:g.none(),start:e});case 0:return g.some({listStyleType:g.some("upper-alpha"),start:wn(e).toString()});case 1:return g.some({listStyleType:g.some("lower-alpha"),start:wn(e).toString()});case 3:return g.some({listStyleType:g.none(),start:""});case 4:return g.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()}})},Mn=(e,t)=>()=>{const n=mt(e);return l(n)&&n.nodeName===t},In=e=>{e.addCommand("mceListProps",(()=>{Pn(e)}))},Rn=e=>{e.on("BeforeExecCommand",(t=>{const n=t.command.toLowerCase();"indent"===n?Gt(e):"outdent"===n&&Jt(e)})),e.addCommand("InsertUnorderedList",((t,n)=>{yn(e,"UL",n)})),e.addCommand("InsertOrderedList",((t,n)=>{yn(e,"OL",n)})),e.addCommand("InsertDefinitionList",((t,n)=>{yn(e,"DL",n)})),e.addCommand("RemoveList",(()=>{Xt(e)})),In(e),e.addCommand("mceListUpdate",((t,n)=>{r(n)&&((e,t)=>{const n=mt(e);null===n||St(e,n)||e.undoManager.transact((()=>{r(t.styles)&&e.dom.setStyles(n,t.styles),r(t.attrs)&&Oe(t.attrs,((t,o)=>e.dom.setAttrib(n,o,t)))}))})(e,n)})),e.addQueryStateHandler("InsertUnorderedList",Mn(e,"UL")),e.addQueryStateHandler("InsertOrderedList",Mn(e,"OL")),e.addQueryStateHandler("InsertDefinitionList",Mn(e,"DL"))};var Un=tinymce.util.Tools.resolve("tinymce.html.Node");const $n=e=>3===e.type,Hn=e=>0===e.length,_n=e=>{const t=(t,n)=>{const o=Un.create("li");S(t,(e=>o.append(e))),n?e.insert(o,n,!0):e.append(o)},n=D(e.children(),((e,n)=>$n(n)?[...e,n]:Hn(e)||$n(n)?e:(t(e,n),[])),[]);Hn(n)||t(n)},Fn=e=>{Je(e)&&(e=>{e.on("keydown",(t=>{t.keyCode!==Le.TAB||Le.metaKeyPressed(t)||e.undoManager.transact((()=>{(t.shiftKey?Jt(e):Gt(e))&&t.preventDefault()}))}))})(e),(e=>{e.on("ExecCommand",(t=>{const n=t.command.toLowerCase();"delete"!==n&&"forwarddelete"!==n||!An(e)||Cn(e.dom,e.getBody())})),e.on("keydown",(t=>{t.keyCode===Le.BACKSPACE?En(e,!1)&&t.preventDefault():t.keyCode===Le.DELETE&&En(e,!0)&&t.preventDefault()}))})(e)},Vn=(e,t)=>n=>(n.setEnabled(e.selection.isEditable()),Lt(e,(o=>{n.setActive(bt(o.parents,t)),n.setEnabled(!St(e,o.element)&&e.selection.isEditable())}))),jn=(e,t)=>n=>Lt(e,(o=>n.setEnabled(bt(o.parents,t)&&!St(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=>S(e,_n)))}))})(e),e.hasPlugin("rtc",!0)?In(e):(Fn(e),Rn(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:Vn(e,"OL")}),e.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:!1,tooltip:"Bullet list",onAction:t("InsertUnorderedList"),onSetup:Vn(e,"UL")}))})(e),(e=>{const t={text:"List properties...",icon:"ordered-list",onAction:()=>e.execCommand("mceListProps"),onSetup:jn(e,"OL")};e.ui.registry.addMenuItem("listprops",t),e.ui.registry.addContextMenu("lists",{update:t=>{const n=mt(e,t);return _e(n)?["listprops"]:[]}})})(e),(e=>({backspaceDelete:t=>{En(e,t)}}))(e))))}()}));
;/*!node_modules/tinymce/plugins/lists/index.js*/
amis.define("e78b399",(function(f,e,i,n){f("abf9d3f")}));
;/*!node_modules/tinymce/plugins/link/plugin.js*/
amis.define("32b7ffb",(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},x=(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)),y=(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"),E=C("link_default_protocol"),T=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===T(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)=>y(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 xe=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()},ye=(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)=>y([xe,ye(O(e),E(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=x(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=T(e);return l(t)?K.sanitize(t).orThunk((()=>h.some(Ae))):!1===t?h.none():h.some(Ae)},Ee=(e,t,n)=>{const o=e.getAttrib(t,n);return null!==o&&o.length>0?h.some(o):h.none()},Te=(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=>Ee(n,e,"rel"))),a=t.bind((e=>Ee(n,e,"class")));return{url:r,text:o,title:t.bind((e=>Ee(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 Te(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",picker_text:"Browse links"}],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())),t.setEnabled(e.selection.isEditable())};return n(),je(e,n)},ze=e=>t=>{const n=()=>{t.setEnabled(e.selection.isEditable())};return n(),je(e,n)},qe=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)},Ve=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()),r=o=>{t.setEnabled(n(o)&&e.selection.isEditable())};return r(o),je(e,(e=>r(e.parents)))},Fe=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:qe(e)}),e.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:()=>ge(e),onSetup:Ve(e)})})(e),(e=>{e.ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:Ie(e),onSetup:qe(e)}),e.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onSetup:ze(e),onAction:Be(e)}),e.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:()=>ge(e),onSetup:Ve(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),Fe(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("13ef050",(function(f,e,i,n){f("32b7ffb")}));
;/*!node_modules/tinymce/plugins/image/plugin.js*/
amis.define("81aab0d",(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)},x=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},I={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 x(a.childNodes[0])},fromTag:(e,t)=>{const a=(t||document).createElement(e);return x(a)},fromText:(e,t)=>{const a=(t||document).createTextNode(e);return x(a)},fromDom:x,fromPoint:(e,t,a)=>b.from(e.dom.elementFromPoint(t,a)).map(x)};var U=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),E=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})},L=T("image_dimensions"),O=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=U.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=I.fromDom(e);C(t,"alt","")}else{if(c(t)){const t=I.fromDom(e);i="alt",t.dom.removeAttribute(i)}else{const a=I.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||!L(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})},xe=(Ie=(e,t)=>n(e)&&n(t)?xe(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]=Ie(t[e],i[e]))}return t});var Ie,Ue=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},Ee=(e=Ne)=>t=>t?b.from(t).map((t=>Te(t,e))):b.none(),Le=(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)?Le(e.items,t):e.value===t?b.some(e):b.none())),Oe=Ee,Me=e=>Ee(Ne)(e),je=(e,t)=>e.bind((e=>Le(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=Oe((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=O(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=L(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",picker_text:"Browse files"}],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=xe({},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=xe(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=>Ue(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))}},ct=e=>t=>{const a=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",a),a(),()=>{e.off("NodeChange",a)}};e.add("image",(e=>{E(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)));const a=e.selection.selectorChangedWithUnbind("img:not([data-mce-object]):not([data-mce-placeholder]),figure.image",t.setActive).unbind,i=ct(e)(t);return()=>{a(),i()}}}),e.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:st(e).open,onSetup:ct(e)}),e.ui.registry.addContextMenu("image",{update:t=>e.selection.isEditable()&&(me(t)||"IMG"===t.nodeName&&!V(t))?["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("d6accdd",(function(d,a,c,i){d("81aab0d")}));
;/*!node_modules/tinymce/plugins/charmap/plugin.js*/
amis.define("a9b13bd",(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"),b=f("charmap_append"),w=d.isArray,v="User Defined",k=e=>{return w(e)?(t=e,d.grep(t,(e=>w(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=b(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])})))},E="pattern",S=(e,r)=>{const a=()=>[{label:"Search",type:"input",name:E},{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===E&&o.throttle(e)}};e.windowManager.open(s).focus(E)},T=e=>t=>{const r=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",r),r(),()=>{e.off("NodeChange",r)}};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",(()=>{S(e,t)}))})(e,r),(e=>{const t=()=>e.execCommand("mceShowCharmap");e.ui.registry.addButton("charmap",{icon:"insert-character",tooltip:"Special character",onAction:t,onSetup:T(e)}),e.ui.registry.addMenuItem("charmap",{icon:"insert-character",text:"Special character...",onAction:t,onSetup:T(e)})})(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("a5f04fd",(function(f,a,d,i){f("a9b13bd")}));
;/*!node_modules/tinymce/plugins/preview/plugin.js*/
amis.define("246009f",(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("b8bc8bb",(function(b,f,i,n){b("246009f")}));
;/*!node_modules/tinymce/plugins/anchor/plugin.js*/
amis.define("191dca0",(function(e,t,n,o){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),n=tinymce.util.Tools.resolve("tinymce.util.Tools");const o=(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),d=e=>{const o=e.dom;t(o).walk(e.selection.getRng(),(e=>{n.each(e,(e=>{var t;s(t=e)&&!t.firstChild&&o.remove(e,!1)}))}))},c=e=>e.dom.getParent(e.selection.getStart(),r),m=(e,t)=>{const n=c(e);n?((e,t,n)=>{n.removeAttribute("name"),n.id=t,e.addVisual(),e.undoManager.add()})(e,t,n):((e,t)=>{e.undoManager.transact((()=>{o(e)||e.selection.collapse(!0),e.selection.isCollapsed()?e.insertContent(e.dom.createHTML("a",{id:t})):(d(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=c(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 n=0;n<t.length;n++){const o=t[n];h(o)&&o.attr("contenteditable",e)}},p=e=>t=>{const n=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",n),n(),()=>{e.off("NodeChange",n)}};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=>{const n=e.selection.selectorChangedWithUnbind("a:not([href])",t.setActive).unbind,o=p(e)(t);return()=>{n(),o()}}}),e.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:t,onSetup:p(e)})})(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,n)=>s(e)})})(e)}))}))}()}));
;/*!node_modules/tinymce/plugins/anchor/index.js*/
amis.define("027d555",(function(d,i,n,a){d("191dca0")}));
;/*!node_modules/tinymce/plugins/searchreplace/plugin.js*/
amis.define("7bf7b82",(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)),E=Object.hasOwnProperty,N=(e,t)=>E.call(e,t);"undefined"!=typeof window?window:Function("return this;")();const C=(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}},A={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)},D=(e,t)=>({element:e,offset:t}),S=(e,t)=>{const n=(e=>y(e.dom.childNodes,A.fromDom))(e);return n.length>0&&t<n.length?D(n[t],0):D(e,t)},B=(e,t)=>{const n=(e=>u.from(e.dom.parentNode).map(A.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}}})(C,"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),A.fromDom);var o})(t,e);var P=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker");const W=(e,t)=>e.isBlock(t)||N(e.schema.getVoidElements(),t.nodeName),$=(e,t)=>!e.isEditable(t),V=(e,t)=>!e.isBlock(t)&&N(e.schema.getWhitespaceElements(),t.nodeName),j=(e,t)=>S(A.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)}}},z=(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&&!e.isEditable(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(A.fromDom(e))}})},L=(e,t,n,o,r,s=!0)=>{const a=new P(n,t),l=[];let i={sOffset:0,fOffset:0,elements:[]};z(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(A.fromDom(e)),r&&r.text(e,i)}},o,s),o&&z(e,i,o,t,!0),c(),l},U=(e,t)=>{const n=j(t.startContainer,t.startOffset),o=n.element.dom,r=j(t.endContainer,t.endOffset),s=r.element.dom;return L(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(A.fromDom(t),"*[contenteditable=true]"),(t=>{const n=t.dom;return L(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)},_=(e,t)=>t.collapsed?[]:U(e,t),q=(e,t)=>{const n=e.createRng();return n.selectNode(t),_(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=A.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(A.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):_(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)=>{t.redial(h(e,t.getData()))},l=(e,t)=>{g.browser.isSafari()&&g.deviceType.isTouch()&&("find"===t||"replace"===t||"replaceall"===t)&&e.focus(t)},i=n=>{ie(e,t,!1),s(n,!0),r(n)},c=n=>{const o=n.getData(),l=t.get();if(o.findtext.length){if(l.text===o.findtext&&l.matchCase===o.matchcase&&l.wholeWord===o.wholewords)re(e,t);else{const r=oe(e,t,o.findtext,o.matchcase,o.wholewords,o.inselection);r<=0&&a(!0,n),s(n,0===r)}r(n)}else i(n)},d=t.get(),m={findtext:o,replacetext:"",wholewords:d.wholeWord,matchcase:d.matchCase,inselection:d.inSelection},u=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},h=(n,o)=>({title:"Find and Replace",size:"normal",body:{type:"panel",items:u(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&&a(!1,e),"findtext"===o.name&&t.get().count>0&&i(e)},onAction:(n,o)=>{const s=n.getData();switch(o.name){case"find":c(n);break;case"replace":le(e,t,s.replacetext)?r(n):i(n);break;case"replaceall":le(e,t,s.replacetext,!0,!0),i(n);break;case"prev":se(e,t),r(n);break;case"next":re(e,t),r(n);break;case"matchcase":case"wholewords":case"inselection":a(!1,n),(e=>{const n=e.getData(),o=t.get();t.set({...o,matchCase:n.matchcase,wholeWord:n.wholewords,inSelection:n.inselection})})(n),i(n)}l(n,o.name)},onSubmit:e=>{c(e),l(e,"find")},onClose:()=>{e.focus(),ie(e,t),e.undoManager.add()}});n.set(e.windowManager.open(h(!1,m),{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("44b56bb",(function(b,f,i,n){b("7bf7b82")}));
;/*!node_modules/tinymce/plugins/visualblocks/plugin.js*/
amis.define("9411b2c",(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("92d30fa",(function(f,i,n,a){f("9411b2c")}));
;/*!node_modules/tinymce/plugins/code/plugin.js*/
amis.define("46868e4",(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("951759f",(function(e,f,i,n){e("46868e4")}));
;/*!node_modules/tinymce/plugins/fullscreen/plugin.js*/
amis.define("08f0aa9",(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("40ef41b",(function(f,a,e,i){f("08f0aa9")}));
;/*!node_modules/tinymce/plugins/insertdatetime/plugin.js*/
amis.define("0d1cc06",(function(e,t,n,a){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>t.options.get(e),n=t("insertdatetime_dateformat"),a=t("insertdatetime_timeformat"),r=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 n=0;n<t-e.length;n++)e="0"+e;return e},d=(e,t,n=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",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",c(n.getMonth()+1,2))).replace("%d",c(n.getDate(),2))).replace("%H",""+c(n.getHours(),2))).replace("%M",""+c(n.getMinutes(),2))).replace("%S",""+c(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(m[n.getMonth()]))).replace("%b",""+e.translate(l[n.getMonth()]))).replace("%A",""+e.translate(o[n.getDay()]))).replace("%a",""+e.translate(i[n.getDay()]))).replace("%%","%"),u=(e,t)=>{if(s(e)){const n=d(e,t);let a;a=/%[HMSIp]/.test(t)?d(e,"%Y-%m-%dT%H:%M"):d(e,"%Y-%m-%d");const r=e.dom.getParent(e.selection.getStart(),"time");r?((e,t,n,a)=>{const r=e.dom.create("time",{datetime:n},a);e.dom.replace(r,t),e.selection.select(r,!0),e.selection.collapse(!1)})(e,r,a,n):e.insertContent('<time datetime="'+a+'">'+n+"</time>")}else e.insertContent(d(e,t))};var p=tinymce.util.Tools.resolve("tinymce.util.Tools");const g=e=>t=>{const n=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",n),n(),()=>{e.off("NodeChange",n)}},y=e=>{const t=r(e),n=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})((e=>{const t=r(e);return t.length>0?t[0]:a(e)})(e)),s=t=>e.execCommand("mceInsertDate",!1,t);e.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:e=>e===n.get(),fetch:n=>{n(p.map(t,(t=>({type:"choiceitem",text:d(e,t),value:t}))))},onAction:e=>{s(n.get())},onItemAction:(e,t)=>{n.set(t),s(t)},onSetup:g(e)});const i=e=>()=>{n.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)}))),onSetup:g(e)})};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,a)=>{u(e,null!=a?a:n(e))})),e.addCommand("mceInsertTime",((t,n)=>{u(e,null!=n?n:a(e))}))})(e),y(e)}))}()}));
;/*!node_modules/tinymce/plugins/insertdatetime/index.js*/
amis.define("d07a93d",(function(d,c,i,n){d("0d1cc06")}));
;/*!node_modules/tinymce/plugins/media/plugin.js*/
amis.define("7f1fa58",(function(e,t,r,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&&(r=a=e,o=(s=String).prototype,o.isPrototypeOf(r)||(null===(i=a.constructor)||void 0===i?void 0:i.name)===s.name)?"string":t;var r,o;var a,s,i})(t)===e,r=t("string"),o=t("object"),a=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,l=(e,t)=>{for(let r=0,o=e.length;r<o;r++){t(e[r],r)}},c=e=>{const t=[];for(let r=0,o=e.length;r<o;++r){if(!a(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"),k=p("media_dimensions");var j=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,$=e=>e.replace(/px$/,""),C=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($).getOr(""),height:d(r,"max-height").map($).getOr("")}},T=(e,t)=>{let r={};for(let o=A({validate:!1,forced_root_block:!1},t).parse(e);o;o=o.walk())if(1===o.type){const e=o.name;if(o.attr("data-ephox-embed-iri")){r=C(o);break}r.source||"param"!==e||(r.source=o.attr("movie")),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(r.type||(r.type=e),r=j.extend(o.attributes.map,r)),"source"===e&&(r.source?r.altsource||(r.altsource=o.attr("src")):r.source=o.attr("src")),"img"!==e||r.poster||(r.poster=o.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 D=tinymce.util.Tools.resolve("tinymce.html.Node"),F=tinymce.util.Tools.resolve("tinymce.html.Serializer");const M=(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,E=(e,t)=>{const r=t.attr("style"),o=r?N.parseStyle(r):{};s(e.width)&&(o["max-width"]=R(e.width)),s(e.height)&&(o["max-height"]=R(e.height)),t.attr("style",N.serializeStyle(o))},U=["source","altsource"],P=(e,t,r,o)=>{let a=0,s=0;const i=M(o);i.addNodeFilter("source",(e=>a=e.length));const n=i.parse(e);for(let e=n;e;e=e.walk())if(1===e.type){const o=e.name;if(e.attr("data-ephox-embed-iri")){E(t,e);break}switch(o){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(o){case"video":e.attr("poster",t.poster),e.attr("src",null);for(let r=a;r<2;r++)if(t[U[r]]){const o=new D("source",1);o.attr("src",t[U[r]]),o.attr("type",t[U[r]+"mime"]||null),e.append(o)}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 D("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[U[s]]),e.attr("type",t[U[s]+"mime"]||null),!t[U[s]])){e.remove();continue}s++;break;case"img":t.poster||e.remove()}}return F({},o).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]+)\?h=(\w+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$1?h=$2&title=0&byline=0&portrait=0&color=8dc7dc",allowFullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)\?h=(\w+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$2?h=$3&title=0&amp;byline=0",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowFullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$2?title=0&amp;byline=0",allowFullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"www.dailymotion.com/embed/video/$1",allowFullscreen:!0},{regex:/dai\.ly\/([^_]+)/,type:"iframe",w:480,h:270,url:"www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],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),o=e.regex.exec(t);let a=r+e.url;if(s(o))for(let e=0;e<o.length;e++)a=a.replace("$"+e,(()=>o[e]?o[e]:""));return a.replace(/\?$/,"")},B=e=>{const t=L.filter((t=>t.regex.test(e)));return t.length>0?j.extend({},t[0],{url:I(t[0],e)}):null},G=(e,t)=>{var r;const o=j.extend({},t);if(!o.source&&(j.extend(o,T(null!==(r=o.embed)&&void 0!==r?r:"",e.schema)),!o.source))return"";o.altsource||(o.altsource=""),o.poster||(o.poster=""),o.source=e.convertURL(o.source,"source"),o.altsource=e.convertURL(o.altsource,"source"),o.sourcemime=z(o.source),o.altsourcemime=z(o.altsource),o.poster=e.convertURL(o.poster,"poster");const a=B(o.source);if(a&&(o.source=a.url,o.type=a.type,o.allowfullscreen=a.allowFullscreen,o.width=o.width||String(a.w),o.height=o.height||String(a.h)),o.embed)return P(o.embed,o,!0,e.schema);{const t=g(e),r=b(e),a=w(e);return o.width=o.width||"300",o.height=o.height||"150",j.each(o,((t,r)=>{o[r]=e.dom.encode(""+t)})),"iframe"===o.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>"}})(o,a):"application/x-shockwave-flash"===o.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})(o):-1!==o.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>")(o,t):((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>")(o,r)}},W=e=>e.hasAttribute("data-mce-object")||e.hasAttribute("data-ephox-embed-iri"),q={},H=e=>t=>G(e,t),J=(e,t)=>{const r=y(e);return r?((e,t,r)=>new Promise(((o,a)=>{const s=r=>(r.html&&(q[e.source]=r),o({url:e.source,html:r.html?r.html:t(e)}));q[e.source]?s(q[e.source]):r({url:e.source},s,a)})))(t,H(e),r):((e,t)=>Promise.resolve({html:t(e),url:e.source}))(t,H(e))},K=(e,t)=>{const r={};return d(e,"dimensions").each((e=>{l(["width","height"],(o=>{d(t,o).orThunk((()=>d(e,o))).each((e=>r[o]=e))}))})),r},Q=(e,t)=>{const r=t&&"dimensions"!==t?((e,t)=>d(t,e).bind((e=>d(e,"meta"))))(t,e).getOr({}):{},a=((e,t,r)=>a=>{const s=()=>d(e,a),n=()=>d(t,a),l=e=>d(e,"value").bind((e=>e.length>0?i.some(e):i.none()));return{[a]:(a===r?s().bind((e=>o(e)?l(e).orThunk(n):n().orThunk((()=>i.from(e))))):n().orThunk((()=>s().bind((e=>o(e)?l(e):i.from(e)))))).getOr("")}})(e,r,t);return{...a("source"),...a("altsource"),...a("poster"),...a("embed"),...K(e,r)}},V=e=>{const t={...e,source:{value:d(e,"source").getOr("")},altsource:{value:d(e,"altsource").getOr("")},poster:{value:d(e,"poster").getOr("")}};return l(["width","height"],(r=>{d(e,r).each((e=>{const o=t.dimensions||{};o[r]=e,t.dimensions=o}))})),t},X=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})},Y=(e,t)=>o=>{if(r(o.url)&&o.url.trim().length>0){const r=o.html,a={...T(r,t.schema),source:o.url,embed:r};e.setData(V(a))}},Z=(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 o=r.length-1;o>=0;o--)t[e]===r[o]&&r.splice(o,1);e.selection.select(r[0])})(e,r),e.nodeChanged()},ee=(e,t)=>s(t)&&"ephox-embed-iri"===t&&s(B(e)),te=(e,t)=>((e,t)=>e.width!==t.width||e.height!==t.height)(e,t)&&ee(t.source,e.type),re=(e,t,r)=>{var o,a;t.embed=te(e,t)&&k(r)?G(r,{...t,embed:""}):P(null!==(o=t.embed)&&void 0!==o?o:"",t,!1,r.schema),t.embed&&(e.source===t.source||(a=t.source,h(q,a)))?Z(r,t.embed):J(r,t).then((e=>{Z(r,e.html)})).catch(X(r))},oe=e=>{const t=(e=>{const t=e.selection.getNode(),r=W(t)?e.serializer.serialize(t,{selection:!0}):"",o=T(r,e.schema),a=(()=>{if(ee(o.source,o.type)){const r=e.dom.getRect(t);return{width:r.w.toString().replace(/px$/,""),height:r.h.toString().replace(/px$/,"")}}return{}})();return{embed:r,...o,...a}})(e),r=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})(t),o=V(t),a=k(e)?[{type:"sizeinput",name:"dimensions",label:"Constrain proportions",constrain:!0}]:[],s={title:"General",name:"general",items:c([[{name:"source",type:"urlinput",filetype:"media",label:"Source",picker_text:"Browse files"}],a])},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 l={title:"Advanced",name:"advanced",items:n},m=[s,i];n.length>0&&m.push(l);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 o=Q(t.getData());re(r.get(),o,e),t.close()},onChange:(t,o)=>{switch(o.name){case"source":((t,r)=>{const o=Q(r.getData(),"source");t.source!==o.source&&(Y(d,e)({url:o.source,html:""}),J(e,o).then(Y(d,e)).catch(X(e)))})(r.get(),t);break;case"embed":(t=>{var r;const o=Q(t.getData()),a=T(null!==(r=o.embed)&&void 0!==r?r:"",e.schema);t.setData(V(a))})(t);break;case"dimensions":case"altsource":case"poster":((t,r,o)=>{const a=Q(t.getData(),r),s=te(o,a)&&k(e)?{...a,embed:""}:a,i=G(e,s);t.setData(V({...s,embed:i}))})(t,o.name,r.get())}r.set(Q(t.getData()))},initialData:o})};var ae=tinymce.util.Tools.resolve("tinymce.Env");const se=e=>{const t=e.name;return"iframe"===t||"video"===t||"audio"===t},ie=(e,t,r,o=null)=>{const a=e.attr(r);return s(a)?a:h(t,r)?null:o},ne=(e,t,r)=>{const o="img"===t.name||"video"===e.name,a=o?"300":null,s="audio"===e.name?"30":"150",i=o?s:null;t.attr({width:ie(e,r,"width",a),height:ie(e,r,"height",i)})},le=(e,t)=>{const r=t.name,o=new D("img",1);return me(e,t,o),ne(t,o,{}),o.attr({style:t.attr("style"),src:ae.transparentSrc,"data-mce-object":r,class:"mce-object mce-object-"+r}),o},ce=(e,t)=>{var r;const o=t.name,a=new D("span",1);a.attr({contentEditable:"false",style:t.attr("style"),"data-mce-object":o,class:"mce-preview-object mce-object-"+o}),me(e,t,a);const i=e.dom.parseStyle(null!==(r=t.attr("style"))&&void 0!==r?r:""),n=new D(o,1);if(ne(t,n,i),n.attr({src:t.attr("src"),style:t.attr("style"),class:t.attr("class")}),"iframe"===o)n.attr({allowfullscreen:t.attr("allowfullscreen"),frameborder:"0",sandbox:t.attr("sandbox")});else{l(["controls","crossorigin","currentTime","loop","muted","poster","preload"],(e=>{n.attr(e,t.attr(e))}));const r=a.attr("data-mce-html");s(r)&&((e,t,r,o)=>{const a=M(e.schema).parse(o,{context:t});for(;a.firstChild;)r.append(a.firstChild)})(e,o,n,unescape(r))}const c=new D("span",1);return c.attr("class","mce-shim"),a.append(n),a.append(c),a},me=(e,t,r)=>{var o;const a=null!==(o=t.attributes)&&void 0!==o?o:[];let s=a.length;for(;s--;){const t=a[s].name;let o=a[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||(o=e.convertURL(o,t)),r.attr("data-mce-p-"+t,o))}const i=F({inner:!0},e.schema),n=new D("div",1);l(t.children(),(e=>n.append(e)));const c=i.serialize(n);c&&(r.attr("data-mce-html",escape(c)),r.empty())},ue=e=>{const t=e.attr("class");return r(t)&&/\btiny-pageembed\b/.test(t)},de=e=>{let t=e;for(;t=t.parent;)if(t.attr("data-ephox-embed-iri")||ue(t))return!0;return!1},he=(e,t,r)=>{const o=(0,e.options.get)("xss_sanitization"),a=f(e);return M(e.schema,{sanitize:o,validate:a}).parse(r,{context:t})},pe=e=>{e.on("PreInit",(()=>{const{schema:t,serializer:r,parser:o}=e,a=t.getBoolAttrs();l("webkitallowfullscreen mozallowfullscreen".split(" "),(e=>{a[e]={}})),((e,t)=>{const r=m(e);for(let o=0,a=r.length;o<a;o++){const a=r[o];t(e[a],a)}})({embed:["wmode"]},((e,r)=>{const o=t.getElementRule(r);o&&l(e,(e=>{o.attributes[e]={},o.attributesOrder.push(e)}))})),o.addNodeFilter("iframe,video,audio,object,embed",(e=>t=>{let r,o=t.length;for(;o--;)r=t[o],r.parent&&(r.parent.attr("data-mce-object")||(se(r)&&v(e)?de(r)||r.replace(ce(e,r)):de(r)||r.replace(le(e,r))))})(e)),r.addAttributeFilter("data-mce-object",((t,r)=>{var o;let a=t.length;for(;a--;){const s=t[a];if(!s.parent)continue;const i=s.attr(r),n=new D(i,1);if("audio"!==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 c=null!==(o=s.attributes)&&void 0!==o?o:[];let m=c.length;for(;m--;){const e=c[m].name;0===e.indexOf("data-mce-p-")&&n.attr(e.substr(11),c[m].value)}const u=s.attr("data-mce-html");if(u){const t=he(e,i,unescape(u));l(t.children(),(e=>n.append(e)))}s.replace(n)}}))})),e.on("SetContent",(()=>{const t=e.dom;l(t.select("span.mce-preview-object"),(e=>{0===t.select("span.mce-shim",e).length&&t.add(e,"span",{class:"mce-shim"})}))}))},ge=e=>t=>{const r=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",r),r(),()=>{e.off("NodeChange",r)}};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",(()=>{oe(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;t.setActive(W(r.getNode()));const o=r.selectorChangedWithUnbind("img[data-mce-object],span[data-mce-object],div[data-ephox-embed-iri]",t.setActive).unbind,a=ge(e)(t);return()=>{o(),a()}}}),e.ui.registry.addMenuItem("media",{icon:"embed",text:"Media...",onAction:t,onSetup:ge(e)})})(e),(e=>{e.on("ResolveName",(e=>{let t;1===e.target.nodeType&&(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)}))})(e),pe(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("ObjectResized",(t=>{const r=t.target;if(r.getAttribute("data-mce-object")){let o=r.getAttribute("data-mce-html");o&&(o=unescape(o),r.setAttribute("data-mce-html",escape(P(o,{width:String(t.width),height:String(t.height)},!1,e.schema))))}}))})(e),(e=>({showDialog:()=>{oe(e)}}))(e))))}()}));
;/*!node_modules/tinymce/plugins/media/index.js*/
amis.define("7726b6e",(function(f,e,i,n){f("7f1fa58")}));
;/*!node_modules/tinymce/plugins/table/plugin.js*/
amis.define("541ff35",(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,N=Array.prototype.push,I=(e,t)=>((e,t)=>D.call(e,t))(e,t)>-1,M=(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},E=(e,t)=>{for(let o=0,l=e.length;o<l;o++){t(e[o],o)}},B=(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)=>(E(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);N.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}},W={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($)},z=(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=z;"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,W.fromDom(t.dom.ownerDocument));var t},re=e=>w.from(e.dom.parentNode).map(W.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=W.fromDom(e);if(n.push(t),!0===o(t))break;l=e}return n},se=e=>w.from(e.dom.previousSibling).map(W.fromDom),ce=e=>w.from(e.dom.nextSibling).map(W.fromDom),ie=e=>k(e.dom.childNodes,W.fromDom),me=e=>((e,t)=>{const o=e.dom.childNodes;return w.from(o[t]).map(W.fromDom)})(e,0),de=i(Element.prototype.attachShadow)&&i(Node.prototype.getRootNode)?e=>W.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=>W.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(W.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=W.fromDom(l);if(t(e))return w.some(e);if(n(e))break}return w.none()},fe=(e,t,o)=>he(e,(e=>z(e,t)),o),ye=(e,t)=>((e,t)=>q(e.dom.childNodes,(e=>t(W.fromDom(e)))).map(W.fromDom))(e,(e=>z(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(W.fromDom)})(t,e),Se=(e,t,o)=>ge(((e,t)=>z(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=>W.fromDom(e.getBody()))(e)),xe=e=>/^\d+(\.\d+)?$/.test(e)?e+"px":e,Ae=e=>W.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 E(ie(e),(e=>{t(e)&&(o=o.concat([e])),o=o.concat(Oe(e,t))})),o},_e=(e,t)=>((e,t)=>B(ie(e),t))(e,(e=>z(e,t))),De=(e,t)=>((e,t)=>{const o=void 0===t?document:t.dom;return U(o)?[]:k(o.querySelectorAll(e),W.fromDom)})(t,e),Ne=(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+"")},Ie=(e,t,o)=>{Ne(e.dom,t,o)},Me=(e,t)=>{const o=e.dom.getAttribute(t);return null===o?void 0:o},Pe=(e,t)=>w.from(Me(e,t)),ke=(e,t)=>{e.dom.removeAttribute(t)},Ee=(e,t,o=b)=>e.exists((e=>o(e,t))),Be=(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)},We=(e,t)=>{const o=e.dom,l=window.getComputedStyle(o).getPropertyValue(t);return""!==l||be(e)?l:ze(o,t)},ze=(e,t)=>Ve(e)?e.style.getPropertyValue(t):"",Ue=(e,t)=>{const o=e.dom,l=ze(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),Ee(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=>z(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():I(e,J(t))?w.some(t):fe(t,e.join(","),(e=>z(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=>z(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=>I(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 B(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));E(i,(e=>{const l=[];E(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 E(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(We(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(W.fromDom(l))+"px"},_t=e=>t=>t.options.get(e),Dt=_t("table_sizing_mode"),Nt=_t("table_border_widths"),It=_t("table_border_styles"),Mt=_t("table_cell_advtab"),Pt=_t("table_row_advtab"),kt=_t("table_advtab"),Et=_t("table_appearance_options"),Bt=_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"),Wt=e=>"fixed"===Dt(e),zt=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)=>zt(e)||!Ft(e)?t:Wt(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)=>zt(e)||Ft(e)?t:Wt(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)=>{E(t,((o,l)=>{const n=0===l?e:t[l-1];Zt(n,o)}))},no=(e,t)=>{E(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:We,getRaw:Ue,set:$e,remove:Ge}),attrs:u({get:Me,set:Ie,remove:ke,copyTo:(e,t)=>{((e,t)=>{const o=e.dom;v(t,((e,t)=>{Ne(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:W.fromTag,clone:e=>W.fromDom(e.dom.cloneNode(!1)),text:W.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 I(["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)||I(mo,J(e))),isEmptyTag:e=>!!Z(e)&&I(["br","img","hr","input"],J(e)),isNonEditable:e=>Z(e)&&"false"===Me(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,W.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 Be(o,l,((e,o)=>B(o,(o=>M(So(o.dom.cells),(o=>"1"===Me(o,t)||G(o,e))))))).getOr([])},No=[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}],Io=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Mo=/^#?([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=>Io.test(e)||Mo.test(e))(e)?w.some({value:Po(e)}):w.none(),Eo=e=>{const t=e.toString(16);return(1===t.length?"0"+t:t).toUpperCase()},Bo=e=>(e=>({value:Po(e)}))(Eo(e.red)+Eo(e.green)+Eo(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())),Wo=(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(!M(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},zo=e=>_(e,"menu"),Uo=e=>k(e,(e=>{const t=e.text||e.title||"";return zo(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 zo(t)?{type:"nestedmenuitem",text:n,getSubmenuItems:()=>Go(e,t.menu,o,l)}:{text:n,type:"togglemenuitem",onAction:()=>l(t.value),onSetup:Wo(e,o,t.value)}})),Ko=(e,t)=>o=>{e.execCommand("mceTableApplyCellStyle",!1,{[t]:o})},Jo=e=>L(e,(e=>zo(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(Bo))).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 Bo(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:No}],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(It(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=B(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=Ee(al(e.cells),"th");return"tfoot"===e.section?{type:"footer"}:t||o?{type:"header",subType:rl(t,o)}:{type:"body"}})(e).type)),o=I(t,"header"),l=I(t,"footer");if(o||l){const e=I(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 E(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=>I(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(Bo).map((e=>"#"+e.value)).getOr(t):e;var t},fl=e=>{const t=W.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 E(o,(e=>{E(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(W.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=B(l,(e=>M(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;E(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),Mt(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,Mt(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:Mt(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()),Nl=(e,t,o,l)=>{const n=1===t.length?y:l;E(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)}))},Il=(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&&Nl(e,t,l,g(O,n)),o&&((e,t)=>{e.execCommand("mceTableRowType",!1,{type:t.type,no_events:!0})})(e,l),tt(W.fromDom(t[0])).each((t=>yt(e,t.dom,{structure:o,style:r})))}})(e,t,o,n),e.focus()}))},Ml=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(Il,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=Et(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)},El=(e,t,o,l)=>{const n=e.dom,r={},s={},c=Ft(e),i=kt(e);if(a(o.class)||(r.class=o.class),s.height=xe(o.height),c?s.width=xe(o.width):n.getAttrib(t,"width")&&(r.width=(e=>e?e.replace(/px$/,""):"")(o.width)),c?(s["border-width"]=xe(o.border),s["border-spacing"]=xe(o.cellspacing)):(r.border=o.border,r.cellpadding=o.cellpadding,r.cellspacing=o.cellspacing),c&&t.children){const e={};if(l.border&&(e["border-width"]=xe(o.border)),l.cellpadding&&(e.padding=xe(o.cellpadding)),i&&l.bordercolor&&(e["border-color"]=o.bordercolor),!(e=>{for(const t in e)if(C.call(e,t))return!1;return!0})(e))for(let o=0;o<t.children.length;o++)kl(n,t.children[o],e)}if(i){const e=o;s["background-color"]=e.backgroundcolor,s["border-color"]=e.bordercolor,s["border-style"]=e.borderstyle}n.setStyles(t,{...Ut(e),...s}),n.setAttribs(t,{...Gt(e),...r})},Bl=(e,t,o,l)=>{const n=e.dom,r=l.getData(),a=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(a)>0){const o={border:O(a,"border"),bordercolor:O(a,"bordercolor"),cellpadding:O(a,"cellpadding")};El(e,t,r,o);const l=n.select("caption",t)[0];(l&&!r.caption||!l&&r.caption)&&e.execCommand("mceTableToggleCaption"),ft(e,t,r.align)}if(e.focus(),e.addVisual(),A(a)>0){const o=O(a,"caption"),l=!o||A(a)>1;yt(e,t,{structure:o,style:l})}}))},Fl=(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(W.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})},ql=e=>{v({mceTableProps:g(Fl,e,!1),mceTableRowProps:g(Ml,e),mceTableCellProps:g(Ol,e),mceInsertTableDialog:g(Fl,e,!0)},((t,o)=>e.addCommand(o,(()=>{return o=t,void(Re(Ae(e))&&o());var o}))))},Ll=p,Hl=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()},jl=(e,t,o)=>t.length<=1?w.none():wo(e,o.firstSelectedSelector,o.lastSelectedSelector).map((e=>({bounds:e,cells:t}))),Vl=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=>W.fromDom(e.selection.getEnd()))(e),Te(e)),s=()=>Ro(Ae(e),Te(e)).bind((t=>{return o=Be(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:jl(t,e,xo),unmergable:Hl(e),selection:Ll(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),E(o.get(),h)},m=e=>(e(),o.set(o.get().concat([e])),()=>{o.set(B(o.get(),(t=>t!==e)))}),d=(o,l)=>m((()=>t.get().fold((()=>{o.setEnabled(!1)}),(t=>{o.setEnabled(!l(t)&&e.selection.isEditable())})))),u=(o,l,n)=>m((()=>t.get().fold((()=>{o.setEnabled(!1),o.setActive(!1)}),(t=>{o.setEnabled(!l(t)&&e.selection.isEditable()),o.setActive(n(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 $l=tinymce.util.Tools.resolve("tinymce.FakeClipboard");const Wl=e=>{var t;const o=null!==(t=$l.read())&&void 0!==t?t:[];return V(o,(t=>w.from(t.getType(e))))},zl=()=>Wl("x-tinymce/dom-table-rows"),Ul=()=>Wl("x-tinymce/dom-table-columns"),Gl=e=>t=>{const o=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",o),o(),()=>{e.off("NodeChange",o)}},Kl=e=>t=>{const o=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",o),o(),()=>{e.off("NodeChange",o)}},Jl=e=>{const t=Vl(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),ql(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(Ul,"onFirst")}),l("tablepastecolumnafter",{text:"Paste column after",icon:"paste-column-after",command:"mceTablePasteColAfter",onSetup:t.onSetupPasteableColumn(Ul,"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})];Bt(e)?e.ui.registry.addNestedMenuItem("inserttable",{text:"Table",icon:"table",getSubmenuItems:()=>[{type:"fancymenuitem",fancytype:"inserttable",onAction:r}],onSetup:Kl(e)}):e.ui.registry.addMenuItem("inserttable",{text:"Table",icon:"table",onAction:o("mceInsertTableDialog"),onSetup:Kl(e)}),e.ui.registry.addMenuItem("inserttabledialog",{text:"Insert table",icon:"table",onAction:o("mceInsertTableDialog"),onSetup:Kl(e)}),l("tableprops",{text:"Table properties",onSetup:t.onSetupTable,command:"mceTableProps"}),l("deletetable",{text:"Delete table",icon:"table-delete-table",onSetup:t.onSetupTable,command:"mceTableDelete"}),I(a,!0)&&e.ui.registry.addNestedMenuItem("row",{type:"nestedmenuitem",text:"Row",getSubmenuItems:u("tableinsertrowbefore tableinsertrowafter tabledeleterow tablerowprops | tablecutrow tablecopyrow tablepasterowbefore tablepasterowafter")}),I(s,!0)&&e.ui.registry.addNestedMenuItem("column",{type:"nestedmenuitem",text:"Column",getSubmenuItems:u("tableinsertcolumnbefore tableinsertcolumnafter tabledeletecolumn | tablecutcolumn tablecopycolumn tablepastecolumnbefore tablepastecolumnafter")}),I(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,No,"tablecellverticalalign",Ko(e,"vertical-align")),onSetup:t.onSetupCellOrRow}),e.ui.registry.addNestedMenuItem("tablecellborderwidth",{icon:"border-width",text:"Border width",getSubmenuItems:()=>Go(e,Nt(e),"tablecellborderwidth",Ko(e,"border-width")),onSetup:t.onSetupCellOrRow}),e.ui.registry.addNestedMenuItem("tablecellborderstyle",{icon:"border-style",text:"Border style",getSubmenuItems:()=>Go(e,It(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",onSetup:Gl(e),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(Ul,"onFirst")}),l("tablepastecolafter",{tooltip:"Paste column after",command:"mceTablePasteColAfter",icon:"paste-column-after",onSetup:t.onSetupPasteableColumn(Ul,"onLast")}),l("tableinsertdialog",{tooltip:"Insert table",command:"mceInsertTableDialog",icon:"table",onSetup:Gl(e)});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,No,"tablecellverticalalign",Ko(e,"vertical-align")),onSetup:t.onSetupCellOrRow}),e.ui.registry.addMenuButton("tablecellborderwidth",{icon:"border-width",tooltip:"Border width",fetch:Qo(e,Nt(e),"tablecellborderwidth",Ko(e,"border-width")),onSetup:t.onSetupCellOrRow}),e.ui.registry.addMenuButton("tablecellborderstyle",{icon:"border-style",tooltip:"Border style",fetch:Qo(e,It(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)&&e.dom.isEditable(t.parentNode),o=jt(e);o.length>0&&e.ui.registry.addContextToolbar("table",{predicate:t,items:o,scope:"node",position:"node"})})(e)};e.add("table",Jl)}()}));
;/*!node_modules/tinymce/plugins/table/index.js*/
amis.define("ac23d6b",(function(f,i,n,a){f("541ff35")}));
;/*!node_modules/tinymce/plugins/help/plugin.js*/
amis.define("a48602c",(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),r=a("help_tabs"),o=a("forced_plugins"),i=(s="string",e=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=a=e,(r=String).prototype.isPrototypeOf(n)||(null===(o=a.constructor)||void 0===o?void 0:o.name)===r.name)?"string":t;var n,a,r,o})(e)===s);var s;const c=(l=void 0,e=>l===e);var l;const m=(e=>t=>typeof t===e)("function"),u=(p=!1,()=>p);var p;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(e=>null==e)(e)?y.none():y.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()"}}y.singletonNone=new y(!1);const h=Array.prototype.slice,d=Array.prototype.indexOf,g=(e,t)=>((e,t)=>d.call(e,t))(e,t)>-1,k=(e,t)=>{const n=e.length,a=new Array(n);for(let r=0;r<n;r++){const n=e[r];a[r]=t(n,r)}return a},v=(e,t)=>{const n=[];for(let a=0,r=e.length;a<r;a++){const r=e[a];t(r,a)&&n.push(r)}return n},b=(e,t)=>((e,t,n)=>{for(let a=0,r=e.length;a<r;a++){const r=e[a];if(t(r,a))return y.some(r);if(n(r,a))break}return y.none()})(e,t,u),f=(e,t)=>{const n=h.call(e,0);return n.sort(t),n},A=Object.keys,C=Object.hasOwnProperty,w=(e,t)=>C.call(e,t);var S=tinymce.util.Tools.resolve("tinymce.Resource"),M=tinymce.util.Tools.resolve("tinymce.util.I18n");const T=(e,t)=>S.load(`tinymce.html-i18n.help-keynav.${t}`,`${e}/js/i18n/keynav/${t}.js`),x=e=>T(e,M.getCode()).catch((()=>T(e,"en")));var _=tinymce.util.Tools.resolve("tinymce.Env");const O=e=>{const t=_.os.isMacOS()||_.os.isiOS(),n=t?{alt:"&#x2325;",ctrl:"&#x2303;",shift:"&#x21E7;",meta:"&#x2318;",access:"&#x2303;&#x2325;"}:{meta:"Ctrl ",access:"Shift + Alt "},a=e.split("+"),r=k(a,(e=>{const t=e.toLowerCase().trim();return w(n,t)?n[t]:e}));return t?r.join("").replace(/\s/,""):r.join("+")},P=[{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"}],E=()=>({name:"shortcuts",title:"Handy Shortcuts",items:[{type:"table",header:["Action","Shortcut"],cells:k(P,(e=>{const t=k(e.shortcuts,O).join(" or ");return[e.action,t]}))}]}),F=k([{key:"accordion",name:"Accordion"},{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:"ai",name:"AI Assistant",type:"premium"},{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}))),j=e=>{const t=e=>`<a data-alloy-tabstop="true" tabindex="-1" href="${e.url}" target="_blank" rel="noopener">${e.name}</a>`,n=(e,n)=>b(F,(e=>e.key===n)).fold((()=>((e,n)=>{const a=e.plugins[n].getMetadata;if(m(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=A(e.plugins),n=o(e);return c(n)?t:v(t,(e=>!g(n,e)))})(e),a=f(k(t,(t=>n(e,t))),((e,t)=>e.name.localeCompare(t.name))),r=k(a,(e=>"<li>"+e.html+"</li>")),i=r.length,s=r.join("");return"<p><b>"+M.translate(["Plugins installed ({0}):",i])+"</b></p><ul>"+s+"</ul>"},r={type:"htmlpanel",presets:"document",html:[(e=>null==e?"":"<div>"+a(e)+"</div>")(e),(()=>{const e=v(F,(({type:e})=>"premium"===e)),t=f(k(e,(e=>e.name)),((e,t)=>e.localeCompare(t))),n=k(t,(e=>`<li>${e}</li>`)).join("");return"<div><p><b>"+M.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" data-alloy-tabstop="true" tabindex="-1">'+M.translate("Learn more...")+"</a></li></ul></div>"})()].join("")};return{name:"plugins",title:"Plugins",items:[r]}};var H=tinymce.util.Tools.resolve("tinymce.EditorManager");const I=async(e,t,a)=>{const o=E(),s=await(async e=>({name:"keyboardnav",title:"Keyboard Navigation",items:[{type:"htmlpanel",presets:"document",html:await x(e)}]}))(a),c=j(e),l=(()=>{var e,t;const n='<a data-alloy-tabstop="true" tabindex="-1" 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=H.majorVersion,t=H.minorVersion,(0===e.indexOf("@")?"X.X.X":e+"."+t)+"</a>");return{name:"versions",title:"Version",items:[{type:"htmlpanel",html:"<p>"+M.translate(["You are using {0}",n])+"</p>",presets:"document"}]}})(),m={[o.name]:o,[s.name]:s,[c.name]:c,[l.name]:l,...t.get()};return y.from(r(e)).fold((()=>(e=>{const t=A(e),n=t.indexOf("versions");return-1!==n&&(t.splice(n,1),t.push("versions")),{tabs:e,names:t}})(m)),(e=>((e,t)=>{const a={},r=k(e,(e=>{var r;if(i(e))return w(t,e)&&(a[e]=t[e]),e;{const t=null!==(r=e.name)&&void 0!==r?r:n("tab-name");return a[t]=e,t}}));return{tabs:a,names:r}})(e,m)))},$=(e,t,n)=>()=>{I(e,t,n).then((({tabs:t,names:n})=>{const a={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})(k(n,(e=>{return w(n=t,a=e)?y.from(n[a]):y.none();var n,a})))};e.windowManager.open({title:"Help",size:"medium",body:a,buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{}})}))};e.add("help",((e,t)=>{const a=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})({}),r=(e=>({addTab:t=>{var a;const r=null!==(a=t.name)&&void 0!==a?a:n("tab-name"),o=e.get();o[r]=t,e.set(o)}}))(a);(e=>{(0,e.options.register)("help_tabs",{processor:"array"})})(e);const o=$(e,a,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"),((e,t)=>{e.on("init",(()=>{x(t)}))})(e,t),r}))}()}));
;/*!node_modules/tinymce/plugins/help/index.js*/
amis.define("a743c07",(function(a,c,i,n){a("a48602c")}));
;/*!node_modules/tinymce/plugins/wordcount/plugin.js*/
amis.define("3ec8da6",(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=(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},c={aletter:"[A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-׳ؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆༀཀ-ཇཉ-ཬྈ-ྌႠ-Ⴥა-ჺჼᄀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᯀ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ--ℝℤΩℨK--ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⒶ-ⓩⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⴀ-ⴥⴰ-ⵥⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〻〼ㄅ-ㄭㄱ-ㆎㆠ-ㆺꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐꞑꞠ-ꞩꟺ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA---하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]",midnumlet:"[-'\\.‘’․﹒'.]",midletter:"[:··״‧︓﹕:]",midnum:"[±+*/,;;։،؍٬߸⁄︐︔﹐﹔,;]",numeric:"[0-9٠-٩٫۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹]",cr:"\\r",lf:"\\n",newline:"[\v\f…\u2028\u2029]",extend:"[̀-ͯ҃-҉֑-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ऀ-ःऺ-़ा-ॏ॑-ॗॢॣঁ-ঃ়া-ৄেৈো-্ৗৢৣਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑੰੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣஂா-ூெ-ைொ-்ௗఁ-ఃా-ౄె-ైొ-్ౕౖౢౣಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣംഃാ-ൄെ-ൈൊ-്ൗൢൣංඃ්ා-ුූෘ-ෟෲෳัิ-ฺ็-๎ັິ-ູົຼ່-ໍ༹༘༙༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏႚ-ႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳា-៓៝᠋-᠍ᢩᤠ-ᤫᤰ-᤻ᦰ-ᧀᧈᧉᨗ-ᨛᩕ-ᩞ᩠-᩿᩼ᬀ-ᬄ᬴-᭄᭫-᭳ᮀ-ᮂᮡ-᯦᮪-᯳ᰤ-᰷᳐-᳔᳒-᳨᳭ᳲ᷀-ᷦ᷼-᷿‌‍⃐-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꙯-꙲꙼꙽꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣠-꣱ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀ꨩ-ꨶꩃꩌꩍꩻꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꯣ-ꯪ꯬꯭ﬞ︀-️︠-゙゚︦]",format:"[­؀-؃۝܏឴឵‎‏‪---\ufeff-]",katakana:"[〱-〵゛゜゠-ヺー-ヿㇰ-ㇿ㋐-㋾㌀-㍗ヲ-ン]",extendnumlet:"[=_‿⁀⁔︳︴-﹏_∀-<>]",punctuation:"[~№|!-*+-\\/:;?@\\[-`{}¡«·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰෴๏๚๛༄-༒༺-༽྅࿐-࿔࿙࿚၊-၏჻፡-፨᐀᙭᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰⸱、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!----]_{}⦅-・]"},u=0,a=1,s=2,i=3,l=4,d=5,g=6,p=7,h=8,m=9,C=10,w=11,y=12,f=13,x=[new RegExp(c.aletter),new RegExp(c.midnumlet),new RegExp(c.midletter),new RegExp(c.midnum),new RegExp(c.numeric),new RegExp(c.cr),new RegExp(c.lf),new RegExp(c.newline),new RegExp(c.extend),new RegExp(c.format),new RegExp(c.katakana),new RegExp(c.extendnumlet),new RegExp("@")],W=new RegExp("^"+c.punctuation+"$"),E=x,R=f,S=t=>{let e=R;const n=E.length;for(let o=0;o<n;++o){const n=E[o];if(n&&n.test(t)){e=o;break}}return e},b=(t,e)=>{const n=t[e],o=t[e+1];if(e<0||e>t.length-1&&0!==e)return!1;if(n===u&&o===u)return!1;const r=t[e+2];if(n===u&&(o===s||o===a||o===y)&&r===u)return!1;const c=t[e-1];return(n!==s&&n!==a&&o!==y||o!==u||c!==u)&&((n!==l&&n!==u||o!==l&&o!==u)&&((n!==i&&n!==a||o!==l||c!==l)&&((n!==l||o!==i&&o!==a||r!==l)&&((n!==h&&n!==m||o!==u&&o!==l&&o!==C&&o!==h&&o!==m)&&(o!==h&&(o!==m||r!==u&&r!==l&&r!==C&&r!==h&&r!==m)||n!==u&&n!==l&&n!==C&&n!==h&&n!==m)&&((n!==d||o!==g)&&(n===p||n===d||n===g||(o===p||o===d||o===g||(n!==C||o!==C)&&((o!==w||n!==u&&n!==l&&n!==C&&n!==w)&&((n!==w||o!==u&&o!==l&&o!==C)&&n!==y)))))))))},v=/^\s+$/,k=W,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(t,e);return((t,e,n,o)=>{const r=[],c=[];let u=[];for(let a=0;a<n.length;++a)if(u.push(t[a]),b(n,a)){const n=e[a];if((o.includeWhitespace||!v.test(n))&&(o.includePunctuation||!k.test(n))){const n=a-u.length+1,o=a+1,s=e.slice(n,o).join("");if(F(s)){const n=T(e,a),r=t.slice(o,n);Array.prototype.push.apply(u,r),a=n}r.push(u),c.push({start:n,end:o})}u=[]}return{words:r,indices:c}})(t,o,(t=>{const e=(t=>{const e={};return n=>{if(e[n])return e[n];{const o=t(n);return e[n]=o,o}}})(S);return r(t,e)})(o),n)},B=(t,e,n)=>A(t,e,n).words;var D=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker");const j=(t,e)=>{const n=e.getBlockElements(),o=e.getVoidElements(),r=t=>n[t.nodeName]||o[t.nodeName],c=[];let u="";const a=new D(t,t);let s;for(;s=a.next();)3===s.nodeType?u+=s.data.replace(/\uFEFF/g,""):r(s)&&u.length&&(c.push(u),u="");return u.length&&c.push(u),c},U=t=>t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length,M=(t,e)=>{const n=(t=>t.replace(/\u200B/g,""))(j(t,e).join("\n"));return B(n.split(""),o).length},P=(t,e)=>{const n=j(t,e).join("");return U(n)},N=(t,e)=>{const n=j(t,e).join("").replace(/\s/g,"");return U(n)},V=(t,e)=>()=>e(t.getBody(),t.schema),$=(t,e)=>()=>e(t.selection.getRng().cloneContents(),t.schema),_=t=>V(t,M),z=(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 I=tinymce.util.Tools.resolve("tinymce.util.Delay");const Z=(t,e)=>{((t,e)=>{t.dispatch("wordCountUpdate",{wordCount:{words:e.body.getWordCount(),characters:e.body.getCharacterCount(),charactersWithoutSpaces:e.body.getCharacterCountWithoutSpaces()}})})(t,e)},q=(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))}}})((()=>Z(t,n)),o);t.on("init",(()=>{Z(t,n),I.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:_(t),getCharacterCount:V(t,P),getCharacterCountWithoutSpaces:V(t,N)},selection:{getWordCount:$(t,M),getCharacterCount:$(t,P),getCharacterCountWithoutSpaces:$(t,N)},getCount:_(t)}))(t);return z(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),q(t,n,e),n}))})()}()}));
;/*!node_modules/tinymce/plugins/wordcount/index.js*/
amis.define("ce0e31d",(function(e,c,d,i){e("3ec8da6")}));
;/*!node_modules/tinymce/plugins/pagebreak/plugin.js*/
amis.define("bbbc36d",(function(e,a,t,n){!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),n=t("pagebreak_separator"),o=t("pagebreak_split_block"),r="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},c=e=>a=>{const t=()=>{a.setEnabled(e.selection.isEditable())};return e.on("NodeChange",t),t(),()=>{e.off("NodeChange",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(o(e)))}))})(e),(e=>{const a=()=>e.execCommand("mcePageBreak");e.ui.registry.addButton("pagebreak",{icon:"page-break",tooltip:"Page break",onAction:a,onSetup:c(e)}),e.ui.registry.addMenuItem("pagebreak",{text:"Page break",icon:"page-break",onAction:a,onSetup:c(e)})})(e),(e=>{const a=n(e),t=()=>o(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",(n=>{let o,s,c=n.length;for(;c--;)if(o=n[c],s=o.attr("class"),s&&-1!==s.indexOf(r)){const n=o.parent;if(n&&e.schema.getBlockElements()[n.name]&&t()){n.type=3,n.value=a,n.raw=!0,o.remove();continue}o.type=3,o.value=a,o.raw=!0}}))}))})(e),(e=>{e.on("ResolveName",(a=>{"IMG"===a.target.nodeName&&e.dom.hasClass(a.target,r)&&(a.name="pagebreak")}))})(e)}))}()}));
;/*!node_modules/tinymce/plugins/pagebreak/index.js*/
amis.define("fac9554",(function(b,c,f,i){b("bbbc36d")}));
;/*!node_modules/tinymce/plugins/visualchars/plugin.js*/
amis.define("b7066ff",(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),f=(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},v=Object.getPrototypeOf,p=t=>{const e=g("ownerDocument.defaultView",t);return r(t)&&((t=>f("HTMLElement",t))(e).prototype.isPrototypeOf(t)||/^HTML\w*Element$/.test(v(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("4a07459",(function(f,i,n,a){f("b7066ff")}));
;/*!node_modules/tinymce/plugins/template/plugin.js*/
amis.define("bb50d59",(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"),b=u("template_mdate_format"),_=u("content_style"),M=u("content_css_cors"),T=u("body_class"),S=(e,t)=>{if((e=""+e).length<t)for(let a=0;a<t-e.length;a++)e="0"+e;return e},x=(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",S(a.getMonth()+1,2))).replace("%d",S(a.getDate(),2))).replace("%H",""+S(a.getHours(),2))).replace("%M",""+S(a.getMinutes(),2))).replace("%S",""+S(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 C{constructor(e,t){this.tag=e,this.value=t}static some(e){return new C(!0,e)}static none(){return C.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?C.some(e(this.value)):C.none()}bind(e){return this.tag?e(this.value):C.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:C.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)?C.none():C.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()"}}C.singletonNone=new C(!1);const w=(e,t)=>((e,t,a)=>{for(let n=0,r=e.length;n<r;n++){const r=e[n];if(t(r,n))return C.some(r);if(a(r,n))break}return C.none()})(e,t,o),O=Object.hasOwnProperty,A=(e,t)=>O.call(e,t);var D=tinymce.util.Tools.resolve("tinymce.html.Serializer");const N={'"':"&quot;","<":"&lt;",">":"&gt;","&":"&amp;","'":"&#039;"},I=e=>e.replace(/["'<>&]/g,(e=>{return(t=N,a=e,A(t,a)?C.from(t[a]):C.none()).getOr(e);var t,a})),E=(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))),k=(e,t)=>D({validate:!0},e.schema).serialize(e.parser.parse(t,{insert:!0})),P=(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=P(a,v(e));let s=n.create("div",{},k(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=>{E(n,t,p(e))&&(t.innerHTML=x(e,y(e))),E(n,t,d(e))&&(t.innerHTML=x(e,b(e))),E(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)=>w(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"}),C.none()}return C.from(i.map(t,((e,t)=>{const a=e=>void 0!==e.url;return{selected:0===t,text:e.title,value:{url:a(e)?C.from(e.url):C.none(),content:a(e)?C.none():C.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;let n=k(e,t);if(-1===t.indexOf("<html>")){let t="";const r=null!==(a=_(e))&&void 0!==a?a:"",s=M(e)?' crossorigin="anonymous"':"";i.each(e.contentCSS,(a=>{t+='<link type="text/css" rel="stylesheet" href="'+e.documentBaseURI.toAbsolute(a)+'"'+s+">"})),r&&(t+='<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)+'"':"";n='<!DOCTYPE html><html><head><base href="'+o(e.documentBaseURI.getURI())+'">'+t+c+'</head><body class="'+o(l)+'"'+m+">"+n+"</body></html>"}return P(n,g(e))})(e,r),l=[{type:"listbox",name:"template",label:"Templates",items:n},{type:"htmlpanel",html:`<p aria-live="polite">${I(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)))},B=e=>t=>{const a=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",a),a(),()=>{e.off("NodeChange",a)}};e.add("template",(e=>{m(e),(e=>{const t=()=>e.execCommand("mceTemplate");e.ui.registry.addButton("template",{icon:"template",tooltip:"Insert template",onSetup:B(e),onAction:t}),e.ui.registry.addMenuItem("template",{icon:"template",text:"Insert template...",onSetup:B(e),onAction:t})})(e),J(e),(e=>{e.on("PreProcess",(t=>{const a=e.dom,n=b(e);i.each(a.select("div",t.node),(t=>{a.hasClass(t,"mceTmpl")&&(i.each(a.select("*",t),(t=>{E(a,t,d(e))&&(t.innerHTML=x(e,n))})),H(e,t))}))}))})(e)}))}()}));
;/*!node_modules/tinymce/plugins/template/index.js*/
amis.define("824ce92",(function(e,i,n,b){e("bb50d59")}));
;/*!node_modules/tinymce/plugins/nonbreaking/plugin.js*/
amis.define("f9e1b1b",(function(n,e,o,a){!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=n=>e=>typeof e===n,o=e("boolean"),a=e("number"),t=n=>e=>e.options.get(n),i=t("nonbreaking_force_tab"),s=t("nonbreaking_wrap"),r=(n,e)=>{let o="";for(let a=0;a<e;a++)o+=n;return o},c=(n,e)=>{const o=s(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">${r("&nbsp;",e)}</span>`:r("&nbsp;",e);n.undoManager.transact((()=>n.insertContent(o)))};var l=tinymce.util.Tools.resolve("tinymce.util.VK");const u=n=>e=>{const o=()=>{e.setEnabled(n.selection.isEditable())};return n.on("NodeChange",o),o(),()=>{n.off("NodeChange",o)}};n.add("nonbreaking",(n=>{(n=>{const e=n.options.register;e("nonbreaking_force_tab",{processor:n=>o(n)?{value:n?3:0,valid:!0}:a(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,onSetup:u(n)}),n.ui.registry.addMenuItem("nonbreaking",{icon:"non-breaking",text:"Nonbreaking space",onAction:e,onSetup:u(n)})})(n),(n=>{const e=i(n);e>0&&n.on("keydown",(o=>{if(o.keyCode===l.TAB&&!o.isDefaultPrevented()){if(o.shiftKey)return;o.preventDefault(),o.stopImmediatePropagation(),c(n,e)}}))})(n)}))}()}));
;/*!node_modules/tinymce/plugins/nonbreaking/index.js*/
amis.define("83238e9",(function(e,f,i,n){e("f9e1b1b")}));
;/*!node_modules/tinymce/plugins/emoticons/plugin.js*/
amis.define("e14ab41",(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"),C=b("emoticons_database_url"),_=b("emoticons_database_id"),j=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,E=t=>{const e=j(t);return o=t=>({keywords:[],category:"user",...t}),m(e,((t,e)=>({k:e,v:o(t,e)})));var o},S=(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=E(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([])}},L=(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))),N=(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&&!L(t[o],s)||(n.push({value:t[o].char,text:t[o].title,icon:t[o].char}),!a(n.length)));o++);return n},T="pattern",D=(t,e)=>{const n={pattern:"",results:N(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=N(r,o.pattern,n===A?a.some(300):a.none());t.setData({results:i})})(t)}),200),c={label:"Search",type:"input",name:T},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(T),e.hasLoaded()||(m.block("Loading emojis..."),e.waitForLoad().then((()=>{m.redial(g()),r.throttle(m),m.focus(T),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(T),m.unblock()})))},F=t=>e=>{const o=()=>{e.setEnabled(t.selection.isEditable())};return t.on("NodeChange",o),o(),()=>{t.off("NodeChange",o)}};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=C(t),n=_(t),s=S(t,o,n);((t,e)=>{t.addCommand("mceEmoticons",(()=>D(t,e)))})(t,s),(t=>{const e=()=>t.execCommand("mceEmoticons");t.ui.registry.addButton("emoticons",{tooltip:"Emojis",icon:"emoji",onAction:e,onSetup:F(t)}),t.ui.registry.addMenuItem("emoticons",{text:"Emojis...",icon:"emoji",onAction:e,onSetup:F(t)})})(t),((t,e)=>{t.ui.registry.addAutocompleter("emoticons",{trigger:":",columns:"auto",minChars:2,fetch:(t,o)=>e.waitForLoad().then((()=>{const n=e.listAll();return N(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("63fae8a",(function(a,e,f,i){a("e14ab41")}));
;/*!node_modules/tinymce/plugins/emoticons/js/emojis.js*/
amis.define("fb6a12e",(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("dda22ff",(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),E=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"})},q=e=>{const t=t=>e.dom.isEditable(t),o=e=>{const o="FIGURE"===e.nodeName&&/image/i.test(e.className),n="IMG"===e.nodeName||o,r=(i=y.fromDom(e),s="mce-pagebreak",(e=>void 0!==e.dom.classList)(i)&&i.dom.classList.contains(s));var i,s;return n&&t(e.parentElement)&&!r},n=c(e);n.length>0&&e.ui.registry.addContextToolbar("imageselection",{predicate:o,items:n,position:"node"});const r=a(e);r.length>0&&e.ui.registry.addContextToolbar("textselection",{predicate:n=>!o(n)&&!e.selection.isCollapsed()&&t(n),items:r,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),E(e),q(e)}))}()}));
;/*!node_modules/tinymce/plugins/help/js/i18n/keynav/zh_CN.js*/
amis.define("d09bec6",(function(n,t,o,s){tinymce.Resource.add("tinymce.html-i18n.help-keynav.zh_CN","<h1>开始键盘导航</h1>\n\n<dl>\n <dt>聚焦于菜单栏</dt>\n <dd>Windows 或 LinuxAlt+F9</dd>\n <dd>macOS&#x2325;F9</dd>\n <dt>聚焦于工具栏</dt>\n <dd>Windows 或 LinuxAlt+F10</dd>\n <dd>macOS&#x2325;F10</dd>\n <dt>聚焦于页脚</dt>\n <dd>Windows 或 LinuxAlt+F11</dd>\n <dd>macOS&#x2325;F11</dd>\n <dt>聚焦于上下文工具栏</dt>\n <dd>Windows、Linux 或 macOSCtrl+F9\n</dl>\n\n<p>导航将在第一个 UI 项上开始,其中突出显示该项,或者对于页脚元素路径中的第一项,将为其添加下划线。</p>\n\n<h1>在 UI 部分之间导航</h1>\n\n<p>要从一个 UI 部分移至下一个,请按 <strong>Tab</strong>。</p>\n\n<p>要从一个 UI 部分移至上一个,请按 <strong>Shift+Tab</strong>。</p>\n\n<p>这些 UI 部分的 <strong>Tab</strong> 顺序为:</p>\n\n<ol>\n <li>菜单栏</li>\n <li>每个工具栏组</li>\n <li>边栏</li>\n <li>页脚中的元素路径</li>\n <li>页脚中的字数切换按钮</li>\n <li>页脚中的品牌链接</li>\n <li>页脚中的编辑器调整大小图柄</li>\n</ol>\n\n<p>如果不存在某个 UI 部分,则跳过它。</p>\n\n<p>如果键盘导航焦点在页脚,并且没有可见的边栏,则按 <strong>Shift+Tab</strong> 将焦点移至第一个工具栏组而非最后一个。</p>\n\n<h1>在 UI 部分内导航</h1>\n\n<p>要从一个 UI 元素移至下一个,请按相应的<strong>箭头</strong>键。</p>\n\n<p><strong>左</strong>和<strong>右</strong>箭头键</p>\n\n<ul>\n <li>在菜单栏中的菜单之间移动。</li>\n <li>打开菜单中的子菜单。</li>\n <li>在工具栏组中的按钮之间移动。</li>\n <li>在页脚的元素路径中的各项之间移动。</li>\n</ul>\n\n<p><strong>下</strong>和<strong>上</strong>箭头键</p>\n\n<ul>\n <li>在菜单中的菜单项之间移动。</li>\n <li>在工具栏弹出菜单中的各项之间移动。</li>\n</ul>\n\n<p><strong>箭头</strong>键在具有焦点的 UI 部分内循环。</p>\n\n<p>要关闭打开的菜单、打开的子菜单或打开的弹出菜单,请按 <strong>Esc</strong> 键。</p>\n\n<p>如果当前的焦点在特定 UI 部分的“顶部”,则按 <strong>Esc</strong> 键还将完全退出键盘导航。</p>\n\n<h1>执行菜单项或工具栏按钮</h1>\n\n<p>当突出显示所需的菜单项或工具栏按钮时,按 <strong>Return</strong>、<strong>Enter</strong> 或<strong>空格</strong>以执行该项。</p>\n\n<h1>在非标签页式对话框中导航</h1>\n\n<p>在非标签页式对话框中,当对话框打开时,第一个交互组件获得焦点。</p>\n\n<p>通过按 <strong>Tab</strong> 或 <strong>Shift+Tab</strong>,在交互对话框组件之间导航。</p>\n\n<h1>在标签页式对话框中导航</h1>\n\n<p>在标签页式对话框中,当对话框打开时,标签页菜单中的第一个按钮获得焦点。</p>\n\n<p>通过按 <strong>Tab</strong> 或 <strong>Shift+Tab</strong>,在此对话框的交互组件之间导航。</p>\n\n<p>通过将焦点移至另一对话框标签页的菜单,然后按相应的<strong>箭头</strong>键以在可用的标签页间循环,从而切换到该对话框标签页。</p>\n")}));
;/*!node_modules/tinymce/plugins/help/js/i18n/keynav/en.js*/
amis.define("2b675f7",(function(n,e,t,o){tinymce.Resource.add("tinymce.html-i18n.help-keynav.en","<h1>Begin keyboard navigation</h1>\n\n<dl>\n <dt>Focus the Menu bar</dt>\n <dd>Windows or Linux: Alt+F9</dd>\n <dd>macOS: &#x2325;F9</dd>\n <dt>Focus the Toolbar</dt>\n <dd>Windows or Linux: Alt+F10</dd>\n <dd>macOS: &#x2325;F10</dd>\n <dt>Focus the footer</dt>\n <dd>Windows or Linux: Alt+F11</dd>\n <dd>macOS: &#x2325;F11</dd>\n <dt>Focus a contextual toolbar</dt>\n <dd>Windows, Linux or macOS: Ctrl+F9\n</dl>\n\n<p>Navigation will start at the first UI item, which will be highlighted, or underlined in the case of the first item in\n the Footer element path.</p>\n\n<h1>Navigate between UI sections</h1>\n\n<p>To move from one UI section to the next, press <strong>Tab</strong>.</p>\n\n<p>To move from one UI section to the previous, press <strong>Shift+Tab</strong>.</p>\n\n<p>The <strong>Tab</strong> order of these UI sections is:</p>\n\n<ol>\n <li>Menu bar</li>\n <li>Each toolbar group</li>\n <li>Sidebar</li>\n <li>Element path in the footer</li>\n <li>Word count toggle button in the footer</li>\n <li>Branding link in the footer</li>\n <li>Editor resize handle in the footer</li>\n</ol>\n\n<p>If a UI section is not present, it is skipped.</p>\n\n<p>If the footer has keyboard navigation focus, and there is no visible sidebar, pressing <strong>Shift+Tab</strong>\n moves focus to the first toolbar group, not the last.</p>\n\n<h1>Navigate within UI sections</h1>\n\n<p>To move from one UI element to the next, press the appropriate <strong>Arrow</strong> key.</p>\n\n<p>The <strong>Left</strong> and <strong>Right</strong> arrow keys</p>\n\n<ul>\n <li>move between menus in the menu bar.</li>\n <li>open a sub-menu in a menu.</li>\n <li>move between buttons in a toolbar group.</li>\n <li>move between items in the footers element path.</li>\n</ul>\n\n<p>The <strong>Down</strong> and <strong>Up</strong> arrow keys</p>\n\n<ul>\n <li>move between menu items in a menu.</li>\n <li>move between items in a toolbar pop-up menu.</li>\n</ul>\n\n<p><strong>Arrow</strong> keys cycle within the focused UI section.</p>\n\n<p>To close an open menu, an open sub-menu, or an open pop-up menu, press the <strong>Esc</strong> key.</p>\n\n<p>If the current focus is at the top of a particular UI section, pressing the <strong>Esc</strong> key also exits\n keyboard navigation entirely.</p>\n\n<h1>Execute a menu item or toolbar button</h1>\n\n<p>When the desired menu item or toolbar button is highlighted, press <strong>Return</strong>, <strong>Enter</strong>,\n or the <strong>Space bar</strong> to execute the item.</p>\n\n<h1>Navigate non-tabbed dialogs</h1>\n\n<p>In non-tabbed dialogs, the first interactive component takes focus when the dialog opens.</p>\n\n<p>Navigate between interactive dialog components by pressing <strong>Tab</strong> or <strong>Shift+Tab</strong>.</p>\n\n<h1>Navigate tabbed dialogs</h1>\n\n<p>In tabbed dialogs, the first button in the tab menu takes focus when the dialog opens.</p>\n\n<p>Navigate between interactive components of this dialog tab by pressing <strong>Tab</strong> or\n <strong>Shift+Tab</strong>.</p>\n\n<p>Switch to another dialog tab by giving the tab menu focus and then pressing the appropriate <strong>Arrow</strong>\n key to cycle through the available tabs.</p>\n")}));
;/*!node_modules/tinymce/plugins/help/js/i18n/keynav/de.js*/
amis.define("01dcfab",(function(e,n,i,t){tinymce.Resource.add("tinymce.html-i18n.help-keynav.de","<h1>Grundlagen der Tastaturnavigation</h1>\n\n<dl>\n <dt>Fokus auf Menüleiste</dt>\n <dd>Windows oder Linux: ALT+F9</dd>\n <dd>macOS: &#x2325;F9</dd>\n <dt>Fokus auf Symbolleiste</dt>\n <dd>Windows oder Linux: ALT+F10</dd>\n <dd>macOS: &#x2325;F10</dd>\n <dt>Fokus auf Fußzeile</dt>\n <dd>Windows oder Linux: ALT+F11</dd>\n <dd>macOS: &#x2325;F11</dd>\n <dt>Fokus auf kontextbezogene Symbolleiste</dt>\n <dd>Windows, Linux oder macOS: STRG+F9\n</dl>\n\n<p>Die Navigation beginnt beim ersten Benutzeroberflächenelement, welches hervorgehoben ist. Falls sich das erste Element im Pfad der Fußzeile befindet,\n ist es unterstrichen.</p>\n\n<h1>Zwischen Abschnitten der Benutzeroberfläche navigieren</h1>\n\n<p>Um von einem Abschnitt der Benutzeroberfläche zum nächsten zu wechseln, drücken Sie <strong>TAB</strong>.</p>\n\n<p>Um von einem Abschnitt der Benutzeroberfläche zum vorherigen zu wechseln, drücken Sie <strong>UMSCHALT+TAB</strong>.</p>\n\n<p>Die Abschnitte der Benutzeroberfläche haben folgende <strong>TAB</strong>-Reihenfolge:</p>\n\n<ol>\n <li>Menüleiste</li>\n <li>Einzelne Gruppen der Symbolleiste</li>\n <li>Randleiste</li>\n <li>Elementpfad in der Fußzeile</li>\n <li>Umschaltfläche „Wörter zählen“ in der Fußzeile</li>\n <li>Branding-Link in der Fußzeile</li>\n <li>Editor-Ziehpunkt zur Größenänderung in der Fußzeile</li>\n</ol>\n\n<p>Falls ein Abschnitt der Benutzeroberflächen nicht vorhanden ist, wird er übersprungen.</p>\n\n<p>Wenn in der Fußzeile die Tastaturnavigation fokussiert ist und keine Randleiste angezeigt wird, wechselt der Fokus durch Drücken von <strong>UMSCHALT+TAB</strong>\n zur ersten Gruppe der Symbolleiste, nicht zur letzten.</p>\n\n<h1>Innerhalb von Abschnitten der Benutzeroberfläche navigieren</h1>\n\n<p>Um von einem Element der Benutzeroberfläche zum nächsten zu wechseln, drücken Sie die entsprechende <strong>Pfeiltaste</strong>.</p>\n\n<p>Die Pfeiltasten <strong>Links</strong> und <strong>Rechts</strong></p>\n\n<ul>\n <li>wechseln zwischen Menüs in der Menüleiste.</li>\n <li>öffnen das Untermenü eines Menüs.</li>\n <li>wechseln zwischen Schaltflächen in einer Gruppe der Symbolleiste.</li>\n <li>wechseln zwischen Elementen im Elementpfad der Fußzeile.</li>\n</ul>\n\n<p>Die Pfeiltasten <strong>Abwärts</strong> und <strong>Aufwärts</strong></p>\n\n<ul>\n <li>wechseln zwischen Menüelementen in einem Menü.</li>\n <li>wechseln zwischen Elementen in einem Popupmenü der Symbolleiste.</li>\n</ul>\n\n<p>Die <strong>Pfeiltasten</strong> rotieren innerhalb des fokussierten Abschnitts der Benutzeroberfläche.</p>\n\n<p>Um ein geöffnetes Menü, ein geöffnetes Untermenü oder ein geöffnetes Popupmenü zu schließen, drücken Sie die <strong>ESC</strong>-Taste.</p>\n\n<p>Wenn sich der aktuelle Fokus ganz oben in einem bestimmten Abschnitt der Benutzeroberfläche befindet, wird durch Drücken der <strong>ESC</strong>-Taste auch\n die Tastaturnavigation beendet.</p>\n\n<h1>Ein Menüelement oder eine Symbolleistenschaltfläche ausführen</h1>\n\n<p>Wenn das gewünschte Menüelement oder die gewünschte Symbolleistenschaltfläche hervorgehoben ist, drücken Sie <strong>Zurück</strong>, <strong>Eingabe</strong>\n oder die <strong>Leertaste</strong>, um das Element auszuführen.</p>\n\n<h1>In Dialogfeldern ohne Registerkarten navigieren</h1>\n\n<p>In Dialogfeldern ohne Registerkarten ist beim Öffnen eines Dialogfelds die erste interaktive Komponente fokussiert.</p>\n\n<p>Navigieren Sie zwischen den interaktiven Komponenten eines Dialogfelds, indem Sie <strong>TAB</strong> oder <strong>UMSCHALT+TAB</strong> drücken.</p>\n\n<h1>In Dialogfeldern mit Registerkarten navigieren</h1>\n\n<p>In Dialogfeldern mit Registerkarten ist beim Öffnen eines Dialogfelds die erste Schaltfläche eines Registerkartenmenüs fokussiert.</p>\n\n<p>Navigieren Sie zwischen den interaktiven Komponenten auf dieser Registerkarte des Dialogfelds, indem Sie <strong>TAB</strong> oder\n <strong>UMSCHALT+TAB</strong> drücken.</p>\n\n<p>Wechseln Sie zu einer anderen Registerkarte des Dialogfelds, indem Sie den Fokus auf das Registerkartenmenü legen und dann die entsprechende <strong>Pfeiltaste</strong>\n drücken, um durch die verfügbaren Registerkarten zu rotieren.</p>\n")}));
;/*!node_modules/amis-ui/lib/components/Tinymce.js*/
amis.define("5e1072c",(function(e,t,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=e("9a586ef"),r=e("ce101d6"),a=e("f30dc49");e("c05921f"),e("77c1f1d"),e("3bf8128"),e("b704819"),e("dcdef9a"),e("4e1a306"),e("e78b399"),e("13ef050"),e("d6accdd"),e("a5f04fd"),e("b8bc8bb"),e("027d555"),e("44b56bb"),e("92d30fa"),e("951759f"),e("40ef41b"),e("d07a93d"),e("7726b6e"),e("ac23d6b"),e("a743c07"),e("ce0e31d"),e("fac9554"),e("4a07459"),e("824ce92"),e("83238e9"),e("63fae8a"),e("fb6a12e"),e("dda22ff"),e("d09bec6"),e("2b675f7"),e("01dcfab");var l=e("ab2f741"),s=e("6f9c7d0");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=d(r),u=d(a),p=d(s),m=e("ce101d6"),g=(m.default||m).createElement;(m.default||m).Fragment;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.unmounted=!1,t.editorInitialized=!1,t.elementRef=c.default.createRef(),t}return n.__extends(t,e),t.prototype.componentDidMount=function(){this.initTiny()},t.prototype.componentDidUpdate=function(e){var t,o=this.props;o.model!==e.model&&o.model!==this.currentContent&&this.editorInitialized&&(null===(t=this.editor)||void 0===t||t.setContent(this.currentContent=o.model||"")),p.default(this.props.config,e.config)||(u.default.remove(this.editor),this.initTiny())},t.prototype.componentWillUnmount=function(){u.default.remove(this.editor),this.unmounted=!0},t.prototype.initTiny=function(){return n.__awaiter(this,void 0,void 0,(function(){var e,t,o,i,r=this;return n.__generator(this,(function(a){switch(a.label){case 0:return e=this.props.locale,t=this.props.config||{},o=t.onLoaded,i=n.__rest(t,["onLoaded"]),this.config=n.__assign(n.__assign({inline:!1,skin:!1,content_css:!1,height:400,language:e&&"zh-CN"!==e?"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,content_style:"[data-mce-bogus] video {display:none;}"},i),{target:this.elementRef.current,readOnly:this.props.disabled,promotion:!1,setup:function(e){r.editor=e,e.on("init",(function(t){r.editorInitialized=!0,r.initEditor(t,e)}))}}),[4,null==o?void 0:o(u.default)];case 1:return a.sent(),this.unmounted||u.default.init(this.config),[2]}}))}))},t.prototype.initEditor=function(e,t){var o=this,i=this.props,n=i.model,r=i.onModelChange,a=i.outputFormat,l=i.onFocus,s=i.onBlur,d=n||"";t.setContent(this.currentContent=d),r&&t.on("change keyup setcontent",(function(e){var i=t.getContent({format:a});i!==o.currentContent&&(o.currentContent=i,r(i))})),l&&t.on("focus",l),s&&t.on("blur",s)},t.prototype.render=function(){return g("textarea",{ref:this.elementRef})},t.defaultProps={outputFormat:"html"},n.__decorate([l.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",Promise)],t.prototype,"initTiny",null),t}(c.default.Component);u.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=h}));