;/*!node_modules/tinymce/tinymce.js*/ amis.define("7e99a40",(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{var o;return!!n(e,t.prototype)||(null===(o=e.constructor)||void 0===o?void 0:o.name)===t.name},c=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&d(e,String,((e,t)=>t.isPrototypeOf(e)))?"string":t})(t)===e,m=e=>t=>typeof t===e,u=e=>t=>e===t,f=(e,t)=>p(e)&&d(e,t,((e,t)=>l(e)===t)),g=c("string"),p=c("object"),h=e=>f(e,Object),b=c("array"),v=u(null),y=m("boolean"),C=u(void 0),w=e=>null==e,x=e=>!w(e),k=m("function"),E=m("number"),S=(e,t)=>{if(b(e)){for(let n=0,o=e.length;n{},N=(e,t)=>(...n)=>e(t.apply(null,n)),R=(e,t)=>n=>e(t(n)),A=e=>()=>e,D=e=>e,O=(e,t)=>e===t;function T(e,...t){return(...n)=>{const o=t.concat(n);return e.apply(null,o)}}const B=e=>t=>!e(t),P=e=>()=>{throw new Error(e)},L=e=>e(),M=e=>{e()},I=A(!1),F=A(!0);class U{constructor(e,t){this.tag=e,this.value=t}static some(e){return new U(!0,e)}static none(){return U.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?U.some(e(this.value)):U.none()}bind(e){return this.tag?e(this.value):U.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:U.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return x(e)?U.some(e):U.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}U.singletonNone=new U(!1);const z=Array.prototype.slice,j=Array.prototype.indexOf,H=Array.prototype.push,$=(e,t)=>j.call(e,t),V=(e,t)=>$(e,t)>-1,q=(e,t)=>{for(let n=0,o=e.length;n{const n=e.length,o=new Array(n);for(let r=0;r{for(let n=0,o=e.length;n{for(let n=e.length-1;n>=0;n--){t(e[n],n)}},Y=(e,t)=>{const n=[],o=[];for(let r=0,s=e.length;r{const n=[];for(let o=0,r=e.length;o(G(e,((e,o)=>{n=t(n,e,o)})),n),J=(e,t,n)=>(K(e,((e,o)=>{n=t(n,e,o)})),n),Z=(e,t,n)=>{for(let o=0,r=e.length;oZ(e,t,I),te=(e,t)=>{for(let n=0,o=e.length;n{const t=[];for(let n=0,o=e.length;nne(W(e,t)),re=(e,t)=>{for(let n=0,o=e.length;n{const t=z.call(e,0);return t.reverse(),t},ae=(e,t)=>X(e,(e=>!V(t,e))),ie=(e,t)=>{const n={};for(let o=0,r=e.length;o{const n=z.call(e,0);return n.sort(t),n},de=(e,t)=>t>=0&&tde(e,0),me=e=>de(e,e.length-1),ue=k(Array.from)?Array.from:e=>z.call(e),fe=(e,t)=>{for(let n=0;n{const n=ge(e);for(let o=0,r=n.length;ove(e,((e,n)=>({k:n,v:t(e,n)}))),ve=(e,t)=>{const n={};return he(e,((e,o)=>{const r=t(e,o);n[r.k]=r.v})),n},ye=e=>(t,n)=>{e[n]=t},Ce=(e,t,n,o)=>{he(e,((e,r)=>{(t(e,r)?n:o)(e,r)}))},we=(e,t)=>{const n={};return Ce(e,t,ye(n),_),n},xe=(e,t)=>{const n=[];return he(e,((e,o)=>{n.push(t(e,o))})),n},ke=e=>xe(e,D),Ee=(e,t)=>Se(e,t)?U.from(e[t]):U.none(),Se=(e,t)=>pe.call(e,t),_e=(e,t)=>Se(e,t)&&void 0!==e[t]&&null!==e[t],Ne=e=>{const t={};return K(e,(e=>{t[e]={}})),ge(t)},Re=e=>void 0!==e.length,Ae=Array.isArray,De=(e,t,n)=>{if(!e)return!1;if(n=n||e,Re(e)){for(let o=0,r=e.length;o{const n=[];return De(e,((o,r)=>{n.push(t(o,r,e))})),n},Te=(e,t)=>{const n=[];return De(e,((o,r)=>{t&&!t(o,r,e)||n.push(o)})),n},Be=(e,t,n,o)=>{let r=C(n)?e[0]:n;for(let n=0;n{for(let o=0,r=e.length;oe[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;nNumber(t.replace(n,"$"+e));return Fe(o(1),o(2))})(e,n)},unknown:Ie},ze=(e,t)=>{const n=String(t).toLowerCase();return ee(e,(e=>e.search(n)))},je=(e,t,n)=>""===t||e.length>=t.length&&e.substr(n,n+t.length)===t,He=(e,t)=>Ve(e,t)?((e,t)=>e.substring(t))(e,t.length):e,$e=(e,t,n=0,o)=>{const r=e.indexOf(t,n);return-1!==r&&(!!C(o)||r+t.length<=o)},Ve=(e,t)=>je(e,t,0),qe=(e,t)=>je(e,t,e.length-t.length),We=e=>t=>t.replace(e,""),Ke=We(/^\s+|\s+$/g),Ge=We(/^\s+/g),Ye=We(/\s+$/g),Xe=e=>e.length>0,Qe=e=>!Xe(e),Je=(e,t=10)=>{const n=parseInt(e,t);return isNaN(n)?U.none():U.some(n)},Ze=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,et=e=>t=>$e(t,e),tt=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>$e(e,"edge/")&&$e(e,"chrome")&&$e(e,"safari")&&$e(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Ze],search:e=>$e(e,"chrome")&&!$e(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>$e(e,"msie")||$e(e,"trident")},{name:"Opera",versionRegexes:[Ze,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:et("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:et("firefox")},{name:"Safari",versionRegexes:[Ze,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>($e(e,"safari")||$e(e,"mobile/"))&&$e(e,"applewebkit")}],nt=[{name:"Windows",search:et("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>$e(e,"iphone")||$e(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:et("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:et("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:et("linux"),versionRegexes:[]},{name:"Solaris",search:et("sunos"),versionRegexes:[]},{name:"FreeBSD",search:et("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:et("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],ot={browsers:A(tt),oses:A(nt)},rt="Edge",st="Chromium",at="Opera",it="Firefox",lt="Safari",dt=e=>{const t=e.current,n=e.version,o=e=>()=>t===e;return{current:t,version:n,isEdge:o(rt),isChromium:o(st),isIE:o("IE"),isOpera:o(at),isFirefox:o(it),isSafari:o(lt)}},ct={unknown:()=>dt({current:void 0,version:Ue.unknown()}),nu:dt,edge:A(rt),chromium:A(st),ie:A("IE"),opera:A(at),firefox:A(it),safari:A(lt)},mt="Windows",ut="Android",ft="Linux",gt="macOS",pt="Solaris",ht="FreeBSD",bt="ChromeOS",vt=e=>{const t=e.current,n=e.version,o=e=>()=>t===e;return{current:t,version:n,isWindows:o(mt),isiOS:o("iOS"),isAndroid:o(ut),isMacOS:o(gt),isLinux:o(ft),isSolaris:o(pt),isFreeBSD:o(ht),isChromeOS:o(bt)}},yt={unknown:()=>vt({current:void 0,version:Ue.unknown()}),nu:vt,windows:A(mt),ios:A("iOS"),android:A(ut),linux:A(ft),macos:A(gt),solaris:A(pt),freebsd:A(ht),chromeos:A(bt)},Ct=(e,t,n)=>{const o=ot.browsers(),r=ot.oses(),s=t.bind((e=>((e,t)=>fe(t.brands,(t=>{const n=t.brand.toLowerCase();return ee(e,(e=>{var t;return n===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())})).map((e=>({current:e.name,version:Ue.nu(parseInt(t.version,10),0)})))})))(o,e))).orThunk((()=>((e,t)=>ze(e,t).map((e=>{const n=Ue.detect(e.versionRegexes,t);return{current:e.name,version:n}})))(o,e))).fold(ct.unknown,ct.nu),a=((e,t)=>ze(e,t).map((e=>{const n=Ue.detect(e.versionRegexes,t);return{current:e.name,version:n}})))(r,e).fold(yt.unknown,yt.nu),i=((e,t,n,o)=>{const r=e.isiOS()&&!0===/ipad/i.test(n),s=e.isiOS()&&!r,a=e.isiOS()||e.isAndroid(),i=a||o("(pointer:coarse)"),l=r||!s&&a&&o("(min-device-width:768px)"),d=s||a&&!l,c=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(n),m=!d&&!l&&!c;return{isiPad:A(r),isiPhone:A(s),isTablet:A(l),isPhone:A(d),isTouch:A(i),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:A(c),isDesktop:A(m)}})(a,s,e,n);return{browser:s,os:a,deviceType:i}},wt=e=>window.matchMedia(e).matches;let xt=Me((()=>Ct(navigator.userAgent,U.from(navigator.userAgentData),wt)));const kt=()=>xt(),Et=navigator.userAgent,St=kt(),_t=St.browser,Nt=St.os,Rt=St.deviceType,At=-1!==Et.indexOf("Windows Phone"),Dt={transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",documentMode:_t.isIE()?document.documentMode||7:10,cacheSuffix:null,container:null,canHaveCSP:!_t.isIE(),windowsPhone:At,browser:{current:_t.current,version:_t.version,isChromium:_t.isChromium,isEdge:_t.isEdge,isFirefox:_t.isFirefox,isIE:_t.isIE,isOpera:_t.isOpera,isSafari:_t.isSafari},os:{current:Nt.current,version:Nt.version,isAndroid:Nt.isAndroid,isChromeOS:Nt.isChromeOS,isFreeBSD:Nt.isFreeBSD,isiOS:Nt.isiOS,isLinux:Nt.isLinux,isMacOS:Nt.isMacOS,isSolaris:Nt.isSolaris,isWindows:Nt.isWindows},deviceType:{isDesktop:Rt.isDesktop,isiPad:Rt.isiPad,isiPhone:Rt.isiPhone,isPhone:Rt.isPhone,isTablet:Rt.isTablet,isTouch:Rt.isTouch,isWebView:Rt.isWebView}},Ot=/^\s*|\s*$/g,Tt=e=>w(e)?"":(""+e).replace(Ot,""),Bt=function(e,t,n,o){o=o||this,e&&(n&&(e=e[n]),De(e,((e,r)=>!1!==t.call(o,e,r,n)&&(Bt(e,t,n,o),!0))))},Pt={trim:Tt,isArray:Ae,is:(e,t)=>t?!("array"!==t||!Ae(e))||typeof e===t:void 0!==e,toArray:e=>{if(Ae(e))return e;{const t=[];for(let n=0,o=e.length;n{const o=g(e)?e.split(t||","):e||[];let r=o.length;for(;r--;)n[o[r]]={};return n},each:De,map:Oe,grep:Te,inArray:(e,t)=>{if(e)for(let n=0,o=e.length;n{for(let n=0;n{const n=e.split(".");for(let e=0,o=n.length;eb(e)?e:""===e?[]:Oe(e.split(t||","),Tt),_addCacheSuffix:e=>{const t=Dt.cacheSuffix;return t&&(e+=(-1===e.indexOf("?")?"?":"&")+t),e}},Lt=(e,t,n=O)=>e.exists((e=>n(e,t))),Mt=(e,t,n)=>e.isSome()&&t.isSome()?U.some(n(e.getOrDie(),t.getOrDie())):U.none(),It=(e,t)=>e?U.some(t):U.none(),Ft="undefined"!=typeof window?window:Function("return this;")(),Ut=(e,t)=>((e,t)=>{let n=null!=t?t:Ft;for(let t=0;t{const n=((e,t)=>Ut(e,t))(e,t);if(null==n)throw new Error(e+" not available on this browser");return n},jt=Object.getPrototypeOf,Ht=e=>{const t=Ut("ownerDocument.defaultView",e);return p(e)&&((e=>zt("HTMLElement",e))(t).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(jt(e).constructor.name))},$t=e=>e.dom.nodeName.toLowerCase(),Vt=e=>e.dom.nodeType,qt=e=>t=>Vt(t)===e,Wt=qt(1),Kt=qt(3),Gt=qt(9),Yt=qt(11),Xt=e=>t=>Wt(t)&&$t(t)===e,Qt=(e,t,n)=>{if(!(g(n)||y(n)||E(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")},Jt=(e,t,n)=>{Qt(e.dom,t,n)},Zt=(e,t)=>{const n=e.dom;he(t,((e,t)=>{Qt(n,t,e)}))},en=(e,t)=>{const n=e.dom.getAttribute(t);return null===n?void 0:n},tn=(e,t)=>U.from(en(e,t)),nn=(e,t)=>{const n=e.dom;return!(!n||!n.hasAttribute)&&n.hasAttribute(t)},on=(e,t)=>{e.dom.removeAttribute(t)},rn=e=>J(e.dom.attributes,((e,t)=>(e[t.name]=t.value,e)),{}),sn=(e,t)=>{const n=en(e,t);return void 0===n||""===n?[]:n.split(" ")},an=e=>void 0!==e.dom.classList,ln=e=>sn(e,"class"),dn=(e,t)=>((e,t,n)=>{const o=sn(e,t).concat([n]);return Jt(e,t,o.join(" ")),!0})(e,"class",t),cn=(e,t)=>((e,t,n)=>{const o=X(sn(e,t),(e=>e!==n));return o.length>0?Jt(e,t,o.join(" ")):on(e,t),!1})(e,"class",t),mn=(e,t)=>{an(e)?e.dom.classList.add(t):dn(e,t)},un=e=>{0===(an(e)?e.dom.classList:ln(e)).length&&on(e,"class")},fn=(e,t)=>{if(an(e)){e.dom.classList.remove(t)}else cn(e,t);un(e)},gn=(e,t)=>{const n=an(e)?e.dom.classList.toggle(t):((e,t)=>V(ln(e),t)?cn(e,t):dn(e,t))(e,t);return un(e),n},pn=(e,t)=>an(e)&&e.dom.classList.contains(t),hn=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},bn={fromHtml:(e,t)=>{const n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||n.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return hn(n.childNodes[0])},fromTag:(e,t)=>{const n=(t||document).createElement(e);return hn(n)},fromText:(e,t)=>{const n=(t||document).createTextNode(e);return hn(n)},fromDom:hn,fromPoint:(e,t,n)=>U.from(e.dom.elementFromPoint(t,n)).map(hn)},vn=(e,t)=>{const n=[],o=e=>(n.push(e),t(e));let r=t(e);do{r=r.bind(o)}while(r.isSome());return n},yn=(e,t)=>{const n=e.dom;if(1!==n.nodeType)return!1;{const e=n;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},Cn=e=>1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount,wn=(e,t)=>e.dom===t.dom,xn=(e,t)=>{const n=e.dom,o=t.dom;return n!==o&&n.contains(o)},kn=e=>bn.fromDom(e.dom.ownerDocument),En=e=>Gt(e)?e:kn(e),Sn=e=>bn.fromDom(En(e).dom.defaultView),_n=e=>U.from(e.dom.parentNode).map(bn.fromDom),Nn=e=>U.from(e.dom.parentElement).map(bn.fromDom),Rn=(e,t)=>{const n=k(t)?t:I;let o=e.dom;const r=[];for(;null!==o.parentNode&&void 0!==o.parentNode;){const e=o.parentNode,t=bn.fromDom(e);if(r.push(t),!0===n(t))break;o=e}return r},An=e=>U.from(e.dom.previousSibling).map(bn.fromDom),Dn=e=>U.from(e.dom.nextSibling).map(bn.fromDom),On=e=>se(vn(e,An)),Tn=e=>vn(e,Dn),Bn=e=>W(e.dom.childNodes,bn.fromDom),Pn=(e,t)=>{const n=e.dom.childNodes;return U.from(n[t]).map(bn.fromDom)},Ln=e=>Pn(e,0),Mn=e=>Pn(e,e.dom.childNodes.length-1),In=e=>e.dom.childNodes.length,Fn=e=>Yt(e)&&x(e.dom.host),Un=k(Element.prototype.attachShadow)&&k(Node.prototype.getRootNode),zn=A(Un),jn=Un?e=>bn.fromDom(e.dom.getRootNode()):En,Hn=e=>Fn(e)?e:(e=>{const t=e.dom.head;if(null==t)throw new Error("Head is not available yet");return bn.fromDom(t)})(En(e)),$n=e=>bn.fromDom(e.dom.host),Vn=e=>{if(zn()&&x(e.target)){const t=bn.fromDom(e.target);if(Wt(t)&&qn(t)&&e.composed&&e.composedPath){const t=e.composedPath();if(t)return ce(t)}}return U.from(e.target)},qn=e=>x(e.dom.shadowRoot),Wn=e=>{const t=Kt(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const n=t.ownerDocument;return(e=>{const t=jn(e);return Fn(t)?U.some(t):U.none()})(bn.fromDom(t)).fold((()=>n.body.contains(t)),R(Wn,$n))};var Kn=(e,t,n,o,r)=>e(n,o)?U.some(n):k(r)&&r(n)?U.none():t(n,o,r);const Gn=(e,t,n)=>{let o=e.dom;const r=k(n)?n:I;for(;o.parentNode;){o=o.parentNode;const e=bn.fromDom(o);if(t(e))return U.some(e);if(r(e))break}return U.none()},Yn=(e,t,n)=>Kn(((e,t)=>t(e)),Gn,e,t,n),Xn=(e,t)=>ee(e.dom.childNodes,(e=>t(bn.fromDom(e)))).map(bn.fromDom),Qn=(e,t,n)=>Gn(e,(e=>yn(e,t)),n),Jn=(e,t)=>((e,t)=>{const n=void 0===t?document:t.dom;return Cn(n)?U.none():U.from(n.querySelector(e)).map(bn.fromDom)})(t,e),Zn=(e,t,n)=>Kn(((e,t)=>yn(e,t)),Qn,e,t,n),eo=(e,t=!1)=>{return Wn(e)?e.dom.isContentEditable:(n=e,Zn(n,"[contenteditable]")).fold(A(t),(e=>"true"===to(e)));var n},to=e=>e.dom.contentEditable,no=e=>void 0!==e.style&&k(e.style.getPropertyValue),oo=(e,t,n)=>{if(!g(n))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);no(e)&&e.style.setProperty(t,n)},ro=(e,t,n)=>{const o=e.dom;oo(o,t,n)},so=(e,t)=>{const n=e.dom;he(t,((e,t)=>{oo(n,t,e)}))},ao=(e,t)=>{const n=e.dom,o=window.getComputedStyle(n).getPropertyValue(t);return""!==o||Wn(e)?o:io(n,t)},io=(e,t)=>no(e)?e.style.getPropertyValue(t):"",lo=(e,t)=>{const n=e.dom,o=io(n,t);return U.from(o).filter((e=>e.length>0))},co=e=>{const t={},n=e.dom;if(no(n))for(let e=0;e{((e,t)=>{no(e)&&e.style.removeProperty(t)})(e.dom,t),Lt(tn(e,"style").map(Ke),"")&&on(e,"style")},uo=(e,t)=>{_n(e).each((n=>{n.dom.insertBefore(t.dom,e.dom)}))},fo=(e,t)=>{Dn(e).fold((()=>{_n(e).each((e=>{po(e,t)}))}),(e=>{uo(e,t)}))},go=(e,t)=>{Ln(e).fold((()=>{po(e,t)}),(n=>{e.dom.insertBefore(t.dom,n.dom)}))},po=(e,t)=>{e.dom.appendChild(t.dom)},ho=(e,t)=>{uo(e,t),po(t,e)},bo=(e,t)=>{K(t,(t=>{po(e,t)}))},vo=e=>{e.dom.textContent="",K(Bn(e),(e=>{yo(e)}))},yo=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Co=e=>{const t=Bn(e);var n,o;t.length>0&&(n=e,K(o=t,((e,t)=>{const r=0===t?n:o[t-1];fo(r,e)}))),yo(e)},wo=e=>W(e,bn.fromDom),xo=e=>e.dom.innerHTML,ko=(e,t)=>{const n=kn(e).dom,o=bn.fromDom(n.createDocumentFragment()),r=((e,t)=>{const n=(t||document).createElement("div");return n.innerHTML=e,Bn(bn.fromDom(n))})(t,n);bo(o,r),vo(e),po(e,o)},Eo=(e,t)=>n=>{e(n)&&t((e=>{const t=bn.fromDom(Vn(e).getOr(e.target)),n=()=>e.stopPropagation(),o=()=>e.preventDefault(),r=N(o,n);return((e,t,n,o,r,s,a)=>({target:e,x:t,y:n,stop:o,prevent:r,kill:s,raw:a}))(t,e.clientX,e.clientY,n,o,r,e)})(n))},So=(e,t,n,o)=>((e,t,n,o,r)=>{const s=Eo(n,o);return e.dom.addEventListener(t,s,r),{unbind:T(_o,e,t,s,r)}})(e,t,n,o,!1),_o=(e,t,n,o)=>{e.dom.removeEventListener(t,n,o)},No=(e,t)=>({left:e,top:t,translate:(n,o)=>No(e+n,t+o)}),Ro=No,Ao=(e,t)=>void 0!==e?e:void 0!==t?t:0,Do=e=>{const t=e.dom,n=t.ownerDocument.body;return n===t?Ro(n.offsetLeft,n.offsetTop):Wn(e)?(e=>{const t=e.getBoundingClientRect();return Ro(t.left,t.top)})(t):Ro(0,0)},Oo=e=>{const t=void 0!==e?e.dom:document,n=t.body.scrollLeft||t.documentElement.scrollLeft,o=t.body.scrollTop||t.documentElement.scrollTop;return Ro(n,o)},To=(e,t,n)=>{const o=(void 0!==n?n.dom:document).defaultView;o&&o.scrollTo(e,t)},Bo=(e,t)=>{kt().browser.isSafari()&&k(e.dom.scrollIntoViewIfNeeded)?e.dom.scrollIntoViewIfNeeded(!1):e.dom.scrollIntoView(t)},Po=(e,t,n,o)=>({x:e,y:t,width:n,height:o,right:e+n,bottom:t+o}),Lo=e=>{const t=void 0===e?window:e,n=t.document,o=Oo(bn.fromDom(n));return(e=>{const t=void 0===e?window:e;return kt().browser.isFirefox()?U.none():U.from(t.visualViewport)})(t).fold((()=>{const e=t.document.documentElement,n=e.clientWidth,r=e.clientHeight;return Po(o.left,o.top,n,r)}),(e=>Po(Math.max(e.pageLeft,o.left),Math.max(e.pageTop,o.top),e.width,e.height)))},Mo=(e,t)=>{let n=[];return K(Bn(e),(e=>{t(e)&&(n=n.concat([e])),n=n.concat(Mo(e,t))})),n},Io=(e,t)=>((e,t)=>{const n=void 0===t?document:t.dom;return Cn(n)?[]:W(n.querySelectorAll(e),bn.fromDom)})(t,e),Fo=(e,t,n)=>Qn(e,t,n).isSome();class Uo{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 zo=e=>t=>!!t&&t.nodeType===e,jo=e=>!!e&&!Object.getPrototypeOf(e),Ho=zo(1),$o=e=>{const t=e.toLowerCase();return e=>x(e)&&e.nodeName.toLowerCase()===t},Vo=e=>{const t=e.map((e=>e.toLowerCase()));return e=>{if(e&&e.nodeName){const n=e.nodeName.toLowerCase();return V(t,n)}return!1}},qo=(e,t)=>{const n=t.toLowerCase().split(" ");return t=>{if(Ho(t)){const o=t.ownerDocument.defaultView;if(o)for(let r=0;rt=>Ho(t)&&t.hasAttribute(e),Ko=e=>Ho(e)&&e.hasAttribute("data-mce-bogus"),Go=e=>Ho(e)&&"TABLE"===e.tagName,Yo=e=>t=>{if(Ho(t)){if(t.contentEditable===e)return!0;if(t.getAttribute("data-mce-contenteditable")===e)return!0}return!1},Xo=Vo(["textarea","input"]),Qo=zo(3),Jo=zo(4),Zo=zo(7),er=zo(8),tr=zo(9),nr=zo(11),or=$o("br"),rr=$o("img"),sr=Yo("true"),ar=Yo("false"),ir=Vo(["td","th"]),lr=Vo(["td","th","caption"]),dr=Vo(["video","audio","object","embed"]),cr=$o("li"),mr="\ufeff",ur=" ",fr=e=>e===mr,gr=((e,t)=>{const n=t=>e(t)?U.from(t.dom.nodeValue):U.none();return{get:o=>{if(!e(o))throw new Error("Can only get "+t+" value of a "+t+" node");return n(o).getOr("")},getOption:n,set:(n,o)=>{if(!e(n))throw new Error("Can only set raw "+t+" value of a "+t+" node");n.dom.nodeValue=o}}})(Kt,"text"),pr=e=>gr.get(e),hr=e=>gr.getOption(e),br=["pre"].concat(["h1","h2","h3","h4","h5","h6"]),vr=e=>{let t;return n=>(t=t||ie(e,F),Se(t,$t(n)))},yr=vr(["article","aside","details","div","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","p","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"]),Cr=e=>Wt(e)&&!yr(e),wr=e=>Wt(e)&&"br"===$t(e),xr=vr(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),kr=vr(["ul","ol","dl"]),Er=vr(["li","dd","dt"]),Sr=vr(["thead","tbody","tfoot"]),_r=vr(["td","th"]),Nr=vr(["pre","script","textarea","style"]),Rr=vr(br),Ar=e=>Rr(e)||Cr(e),Dr=e=>{const t=Io(e,"br"),n=X((e=>{const t=[];let n=e.dom;for(;n;)t.push(bn.fromDom(n)),n=n.lastChild;return t})(e).slice(-1),wr);t.length===n.length&&K(n,yo)},Or=()=>{const e=bn.fromTag("br");return Jt(e,"data-mce-bogus","1"),e},Tr=e=>{vo(e),po(e,Or())},Br=e=>{Mn(e).each((t=>{An(t).each((n=>{yr(e)&&wr(t)&&yr(n)&&yo(t)}))}))},Pr=mr,Lr=fr,Mr=e=>e.replace(/\uFEFF/g,""),Ir=Ho,Fr=Qo,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||!or(e.firstChild),$r=e=>{const t=e.container();return!!Qo(t)&&(t.data.charAt(e.offset())===Pr||e.isAtStart()&&zr(t.previousSibling))},Vr=e=>{const t=e.container();return!!Qo(t)&&(t.data.charAt(e.offset()-1)===Pr||e.isAtEnd()&&zr(t.nextSibling))},qr=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];Ko(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,Gr=e=>Ur(e.startContainer),Yr=sr,Xr=ar,Qr=or,Jr=Qo,Zr=Vo(["script","style","textarea"]),es=Vo(["img","input","textarea","hr","iframe","video","audio","object","embed"]),ts=Vo(["table"]),ns=jr,os=e=>!ns(e)&&(Jr(e)?!Zr(e.parentNode):es(e)||Qr(e)||ts(e)||rs(e)),rs=e=>!(e=>Ho(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(Yr(n))return!0}return!0})(e,t),as=/^[ \t\r\n]*$/,is=e=>as.test(e),ls=e=>"\n"===e||"\r"===e,ds=(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===ur?e.pcIsSpace||""===e.str&&n||e.str.length===s.length-1&&o||((e,t)=>t=0&&ls(e[t]))(s,e.str.length+1)?{pcIsSpace:!1,str:e.str+ur}:{pcIsSpace:!0,str:e.str+" "}:{pcIsSpace:ls(t),str:e.str+t}),{pcIsSpace:!1,str:""});return a.str},cs=(e,t)=>Qo(e)&&is(e.data)&&!((e,t)=>{const n=bn.fromDom(t),o=bn.fromDom(e);return Fo(o,"pre,code",T(wn,n))})(e,t),ms=(e,t)=>os(e)&&!cs(e,t)||(e=>Ho(e)&&"A"===e.nodeName&&!e.hasAttribute("href")&&(e.hasAttribute("name")||e.hasAttribute("id")))(e)||us(e),us=Wo("data-mce-bookmark"),fs=Wo("data-mce-bogus"),gs=(ps="data-mce-bogus",hs="all",e=>Ho(e)&&e.getAttribute(ps)===hs);var ps,hs;const bs=(e,t=!0)=>((e,t)=>{let n=0;if(ms(e,e))return!1;{let o=e.firstChild;if(!o)return!0;const r=new Uo(o,e);do{if(t){if(gs(o)){o=r.next(!0);continue}if(fs(o)){o=r.next();continue}}if(or(o))n++,o=r.next();else{if(ms(o,e))return!1;o=r.next()}}while(o);return n<=1}})(e.dom,t),vs="data-mce-block",ys=e=>(e=>X(ge(e),(e=>!/[A-Z]/.test(e))))(e).join(","),Cs=(e,t)=>x(t.querySelector(e))?(t.setAttribute(vs,"true"),"inline-boundary"===t.getAttribute("data-mce-selected")&&t.removeAttribute("data-mce-selected"),!0):(t.removeAttribute(vs),!1),ws=(e,t)=>{const n=ys(e.getTransparentElements()),o=ys(e.getBlockElements());return X(t.querySelectorAll(n),(e=>Cs(o,e)))},xs=(e,t)=>{var n;const o=t?"lastChild":"firstChild";for(let t=e[o];t;t=t[o])if(bs(bn.fromDom(t)))return void(null===(n=t.parentNode)||void 0===n||n.removeChild(t))},ks=(e,t,n)=>{const o=e.getBlockElements(),r=bn.fromDom(t),s=e=>$t(e)in o,a=e=>wn(e,r);K(wo(n),(t=>{Gn(t,s,a).each((n=>{const o=((e,t)=>X(Bn(e),t))(t,(t=>s(t)&&!e.isValidChild($t(n),$t(t))));if(o.length>0){const t=Nn(n);K(o,(e=>{Gn(e,s,a).each((t=>{((e,t)=>{const n=document.createRange(),o=e.parentNode;if(o){n.setStartBefore(e),n.setEndBefore(t);const r=n.extractContents();xs(r,!0),n.setStartAfter(t),n.setEndAfter(e);const s=n.extractContents();xs(s,!1),bs(bn.fromDom(r))||o.insertBefore(r,e),bs(bn.fromDom(t))||o.insertBefore(t,e),bs(bn.fromDom(s))||o.insertBefore(s,e),o.removeChild(e)}})(t.dom,e.dom)}))})),t.each((t=>ws(e,t.dom)))}}))}))},Es=(e,t)=>{const n=ws(e,t);ks(e,t,n),((e,t,n)=>{K([...n,...As(e,t)?[t]:[]],(t=>K(Io(bn.fromDom(t),t.nodeName.toLowerCase()),(t=>{Ds(e,t.dom)&&Co(t)}))))})(e,t,n)},Ss=(e,t)=>{if(Rs(e,t)){const n=ys(e.getBlockElements());Cs(n,t)}},_s=e=>e.hasAttribute(vs),Ns=(e,t)=>Se(e.getTransparentElements(),t),Rs=(e,t)=>Ho(t)&&Ns(e,t.nodeName),As=(e,t)=>Rs(e,t)&&_s(t),Ds=(e,t)=>Rs(e,t)&&!_s(t),Os=(e,t)=>1===t.type&&Ns(e,t.name)&&C(t.attr(vs)),Ts=kt().browser,Bs=e=>ee(e,Wt),Ps=(e,t)=>e.children&&V(e.children,t),Ls=(e,t,n)=>{let o=0,r=0;const s=e.ownerDocument;if(n=n||e,t){if(n===e&&t.getBoundingClientRect&&"static"===ao(bn.fromDom(e),"position")){const n=t.getBoundingClientRect();return o=n.left+(s.documentElement.scrollLeft||e.scrollLeft)-s.documentElement.clientLeft,r=n.top+(s.documentElement.scrollTop||e.scrollTop)-s.documentElement.clientTop,{x:o,y:r}}let a=t;for(;a&&a!==n&&a.nodeType&&!Ps(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&&!Ps(a,n);)o-=a.scrollLeft||0,r-=a.scrollTop||0,a=a.parentNode;r+=(e=>Ts.isFirefox()&&"table"===$t(e)?Bs(Bn(e)).filter((e=>"caption"===$t(e))).bind((e=>Bs(Tn(e)).map((t=>{const n=t.dom.offsetTop,o=e.dom.offsetTop,r=e.dom.offsetHeight;return n<=o?-r:0})))).getOr(0):0)(bn.fromDom(t))}return{x:o,y:r}},Ms=(e,t={})=>{let n=0;const o={},r=bn.fromDom(e),s=En(r),a=e=>new Promise(((a,i)=>{let l;const d=Pt._addCacheSuffix(e),c=(e=>Ee(o,e).getOrThunk((()=>({id:"mce-u"+n++,passed:[],failed:[],count:0}))))(d);o[d]=c,c.count++;const m=(e,t)=>{K(e,M),c.status=t,c.passed=[],c.failed=[],l&&(l.onload=null,l.onerror=null,l=null)},u=()=>m(c.passed,2),f=()=>m(c.failed,3);if(a&&c.passed.push(a),i&&c.failed.push(i),1===c.status)return;if(2===c.status)return void u();if(3===c.status)return void f();c.status=1;const g=bn.fromTag("link",s.dom);var p;Zt(g,{rel:"stylesheet",type:"text/css",id:c.id}),t.contentCssCors&&Jt(g,"crossOrigin","anonymous"),t.referrerPolicy&&Jt(g,"referrerpolicy",t.referrerPolicy),l=g.dom,l.onload=u,l.onerror=f,p=g,po(Hn(r),p),Jt(g,"href",d)})),i=e=>{const t=Pt._addCacheSuffix(e);Ee(o,t).each((e=>{0===--e.count&&(delete o[t],(e=>{const t=Hn(r);Jn(t,"#"+e).each(yo)})(e.id))}))};return{load:a,loadAll:e=>Promise.allSettled(W(e,(e=>a(e).then(A(e))))).then((e=>{const t=Y(e,(e=>"fulfilled"===e.status));return t.fail.length>0?Promise.reject(W(t.fail,(e=>e.reason))):W(t.pass,(e=>e.value))})),unload:i,unloadAll:e=>{K(e,(e=>{i(e)}))},_setReferrerPolicy:e=>{t.referrerPolicy=e},_setContentCssCors:e=>{t.contentCssCors=e}}},Is=(()=>{const e=new WeakMap;return{forElement:(t,n)=>{const o=jn(t).dom;return U.from(e.get(o)).getOrThunk((()=>{const t=Ms(o,n);return e.set(o,t),t}))}}})(),Fs=(e,t)=>x(e)&&(ms(e,t)||Cr(bn.fromDom(e))),Us=e=>(e=>"span"===e.nodeName.toLowerCase())(e)&&"bookmark"===e.getAttribute("data-mce-type"),zs=(e,t)=>Qo(e)&&e.data.length>0&&((e,t)=>{const n=new Uo(e,t).prev(!1),o=new Uo(e,t).next(!1),r=C(n)||Fs(n,t),s=C(o)||Fs(o,t);return r&&s})(e,t),js=(e,t,n)=>{var o;const r=n||t;if(Ho(t)&&Us(t))return t;const s=t.childNodes;for(let t=s.length-1;t>=0;t--)js(e,s[t],r);if(Ho(t)){const e=t.childNodes;1===e.length&&Us(e[0])&&(null===(o=t.parentNode)||void 0===o||o.insertBefore(e[0],t))}return(e=>nr(e)||tr(e))(t)||ms(t,r)||(e=>!!Ho(e)&&e.childNodes.length>0)(t)||zs(t,r)||e.remove(t),t},Hs=Pt.makeMap,$s=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Vs=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,qs=/[<>&\"\']/g,Ws=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,Ks={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:"Ÿ"},Gs={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},Ys={"<":"<",">":">","&":"&",""":'"',"'":"'"},Xs=(e,t)=>{const n={};if(e){const o=e.split(",");t=t||10;for(let e=0;ee.replace(t?$s:Vs,(e=>Gs[e]||e)),Zs=(e,t)=>e.replace(t?$s:Vs,(e=>e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":Gs[e]||"&#"+e.charCodeAt(0)+";")),ea=(e,t,n)=>{const o=n||Qs;return e.replace(t?$s:Vs,(e=>Gs[e]||o[e]||e))},ta={encodeRaw:Js,encodeAllRaw:e=>(""+e).replace(qs,(e=>Gs[e]||e)),encodeNumeric:Zs,encodeNamed:ea,getEncodeFunc:(e,t)=>{const n=Xs(t)||Qs,o=(e,t)=>e.replace(t?$s:Vs,(e=>void 0!==Gs[e]?Gs[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)=>ea(e,t,n),s=Hs(e.replace(/\+/g,","));return s.named&&s.numeric?o:s.named?t?r:ea:s.numeric?Zs:Js},decode:e=>e.replace(Ws,((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))):Ks[t]||String.fromCharCode(t):Ys[e]||Qs[e]||(e=>{const t=bn.fromTag("div").dom;return t.innerHTML=e,t.textContent||t.innerText||e})(e)))},na={},oa={},ra={},sa=Pt.makeMap,aa=Pt.each,ia=Pt.extend,la=Pt.explode,da=Pt.inArray,ca=(e,t)=>(e=Pt.trim(e))?e.split(t||" "):[],ma=(e,t={})=>{const n=sa(e," ",sa(e.toUpperCase()," "));return ia(n,t)},ua=e=>ma("td th li dt dd figcaption caption details summary",e.getTextBlockElements()),fa=(e,t)=>{if(e){const n={};return g(e)&&(e={"*":e}),aa(e,((e,o)=>{n[o]=n[o.toUpperCase()]="map"===t?sa(e,/[, ]/):la(e,/[, ]/)})),n}},ga=(e={})=>{var t;const n={},o={};let r=[];const s={},a={},i=(t,n,o)=>{const r=e[t];if(r)return sa(r,/[, ]/,sa(r.toUpperCase(),/[, ]/));{let e=oa[t];return e||(e=ma(n,o),oa[t]=e),e}},l=null!==(t=e.schema)&&void 0!==t?t:"html5",d=(e=>{const t={};let n,o,r,s;const a=(e,o="",r="")=>{const s=ca(r),a=ca(e);let i=a.length;for(;i--;){const e=ca([n,o].join(" "));t[a[i]]={attributes:ie(e,(()=>({}))),attributesOrder:e,children:ie(s,A(ra))}}},i=(e,n)=>{const o=ca(e),r=ca(n);let s=o.length;for(;s--;){const e=t[o[s]];for(let t=0,n=r.length;t