')}),t=fk.map(a,function(n){var e;return bO(u,{document:o.ownerDocument,handle:u+"-"+n.name,start:function(){e=s},drag:function(t){c(n,e,t.deltaX,t.deltaY)}})}),d(s),gO(o).on("focusin focusout",function(t){gO(t.target).attr("aria-grabbed","focus"===t.type?"true":"false")}),gO(o).on("keydown",function(n){var i;fk.each(a,function(t){if(n.target.id===u+"-"+t.name)return i=t,!1});var t=function(t,n,e,o,r){t.stopPropagation(),t.preventDefault(),c(i,e,o,r)};switch(n.keyCode){case hO.LEFT:t(n,0,s,-10,0);break;case hO.RIGHT:t(n,0,s,10,0);break;case hO.UP:t(n,0,s,0,-10);break;case hO.DOWN:t(n,0,s,0,10);break;case hO.ENTER:case hO.SPACEBAR:n.preventDefault(),r()}});var p=fk.extend({toggleVisibility:function(t){var n=fk.map(a,function(t){return"#"+u+"-"+t.name}).concat(fk.map(i,function(t){return"#"+u+"-"+t})).join(",");t?gO(n,o).show():gO(n,o).hide()},setClampRect:function(t){l=t,d(s)},setRect:m,getInnerRect:function(){return f(l,s)},setInnerRect:g,setViewPortRect:function(t){e=t,d(s)},destroy:function(){fk.each(t,function(t){t.destroy()}),t=[]}},pO);return p},wO=function(n){var l=mp({dom:{tag:"div",classes:["tox-image-tools__image-bg"],attributes:{role:"presentation"}}}),f=fe(1),d=fe(ft.none()),m=fe({x:0,y:0,w:1,h:1}),c=fe({x:0,y:0,w:1,h:1}),s=function(t,s){g.getOpt(t).each(function(t){var e=f.get(),o=Ou(t.element),r=vu(t.element),i=s.dom.naturalWidth*e,u=s.dom.naturalHeight*e,a=Math.max(0,o/2-i/2),c=Math.max(0,r/2-u/2),n={left:a.toString()+"px",top:c.toString()+"px",width:i.toString()+"px",height:u.toString()+"px",position:"absolute"};qi(s,n),l.getOpt(t).each(function(t){qi(t.element,n)}),d.get().each(function(t){var n=m.get();t.setRect({x:n.x*e+a,y:n.y*e+c,w:n.w*e,h:n.h*e}),t.setClampRect({x:a,y:c,w:i,h:u}),t.setViewPortRect({x:0,y:0,w:o,h:r})})})},e=function(t,n){var e,a=me.fromTag("img");return Yr(a,"src",n),e=a.dom,new Mp(function(t){var n=function(){e.removeEventListener("load",n),t(e)};e.complete?t(e):e.addEventListener("load",n)}).then(function(){return g.getOpt(t).map(function(t){var n=fu({element:a});lg.replaceAt(t,1,ft.some(n));var e=c.get(),o={x:0,y:0,w:a.dom.naturalWidth,h:a.dom.naturalHeight};c.set(o);var r,u,i=mO.inflate(o,-20,-20);return m.set(i),e.w===o.w&&e.h===o.h||(r=t,u=a,g.getOpt(r).each(function(t){var n=Ou(t.element),e=vu(t.element),o=u.dom.naturalWidth,r=u.dom.naturalHeight,i=Math.min(n/o,e/r);1<=i?f.set(1):f.set(i)})),s(t,a),a})})},t=Ny.sketch({dom:{tag:"div",classes:["tox-image-tools__image"]},components:[l.asSpec(),{dom:{tag:"img",attributes:{src:n}}},{dom:{tag:"div"},behaviours:rc([fg("image-panel-crop-events",[sr(function(t){g.getOpt(t).each(function(t){var n=t.element.dom,e=xO({x:10,y:10,w:100,h:100},{x:0,y:0,w:200,h:200},{x:0,y:0,w:200,h:200},n,at);e.toggleVisibility(!1),e.on("updateRect",function(t){var n=t.rect,e=f.get(),o={x:Math.round(n.x/e),y:Math.round(n.y/e),w:Math.round(n.w/e),h:Math.round(n.h/e)};m.set(o)}),d.set(ft.some(e))})})])])}],containerBehaviours:rc([lg.config({}),fg("image-panel-events",[sr(function(t){e(t,n)})])])}),g=mp(t);return{memContainer:g,updateSrc:e,zoom:function(t,n){var e=f.get(),o=0
=r.minChars&&(e=Zf.getCurrent(o).bind(function(t){return ld.getHighlighted(t).map(Ll.getValue)}),r.previewing.set(!0),Xx(r,u(t),t,o,i,function(t){Zf.getCurrent(o).each(function(t){e.fold(function(){r.model.selectsOver&&ld.highlightFirst(t)},function(n){ld.highlightBy(t,function(t){return Ll.getValue(t).value===n.value}),ld.getHighlighted(t).orThunk(function(){return ld.highlightFirst(t),ft.none()})})})},px.HighlightFirst).get(at))},cancelEvent:Ao()}),ig.config({mode:"special",onDown:function(t,n){return e(t,n,ld.highlightFirst),ft.some(!0)},onEscape:function(t){var n=Vx.getCoupled(t,"sandbox");return wl.isOpen(n)?(wl.close(n),ft.some(!0)):ft.none()},onUp:function(t,n){return e(t,n,ld.highlightLast),ft.some(!0)},onEnter:function(n){var t=Vx.getCoupled(n,"sandbox"),e=wl.isOpen(t);if(e&&!r.previewing.get())return Zf.getCurrent(t).bind(function(t){return ld.getHighlighted(t)}).map(function(t){return qo(n,WO(),{item:t}),!0});var o=Ll.getValue(n);return Yo(n,Ao()),r.onExecute(t,n,o),e&&wl.close(t),ft.some(!0)}}),Eg.config({toggleClass:r.markers.openClass,aria:{mode:"expanded"}}),Vx.config({others:{sandbox:function(t){return Qx(r,t,{onOpen:function(){return Eg.on(t)},onClose:function(){return Eg.off(t)}})}}}),fg("typeaheadevents",[dr(function(t){var n=at;qx(r,u(t),t,i,n,px.HighlightFirst).get(at)}),er(WO(),function(t,n){var e=Vx.getCoupled(t,"sandbox");NO(r.model,t,n.event.item),Yo(t,Ao()),r.onItemExecute(t,e,n.event.item,Ll.getValue(t)),wl.close(e),jO(t)})].concat(r.dismissOnBlur?[er(ko(),function(t){var n=Vx.getCoupled(t,"sandbox");gc(n.element).isNone()&&wl.close(n)})]:[]))];return{uid:r.uid,dom:fx(zt(r,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:lt(lt({},o),Wl(r.typeaheadBehaviours,a)),eventOrder:r.eventOrder}}}),qO=function(i){return lt(lt({},i),{toCached:function(){return qO(i.toCached())},bindFuture:function(n){return qO(i.bind(function(t){return t.fold(function(t){return kx(pt.error(t))},function(t){return n(t)})}))},bindResult:function(n){return qO(i.map(function(t){return t.bind(n)}))},mapResult:function(n){return qO(i.map(function(t){return t.map(n)}))},mapError:function(n){return qO(i.map(function(t){return t.mapError(n)}))},foldResult:function(n,e){return i.map(function(t){return t.fold(n,e)})},withTimeout:function(t,r){return qO(Sx(function(n){var e=!1,o=setTimeout(function(){e=!0,n(pt.error(r()))},t);i.get(function(t){e||(clearTimeout(o),n(t))})}))}})},KO=function(t){return qO(Sx(t))},JO=KO,$O={type:"separator"},QO=function(t){return{type:"menuitem",value:t.url,text:t.title,meta:{attach:t.attach},onAction:at}},ZO=function(t,n){return{type:"menuitem",value:n,text:t,meta:{attach:undefined},onAction:at}},t_=function(t,n){return o=t,e=H(n,function(t){return t.type===o}),V(e,QO);var e,o},n_=function(t,n){var e=t.toLowerCase();return H(n,function(t){var n=t.meta!==undefined&&t.meta.text!==undefined?t.meta.text:t.text;return we(n.toLowerCase(),e)||we(t.value.toLowerCase(),e)})},e_=function(u,t,a){var n=Ll.getValue(t),c=n.meta.text!==undefined?n.meta.text:n.value;return a.getLinkInformation().fold(function(){return[]},function(t){var n,e,o,r,i=n_(c,(n=a.getHistory(u),V(n,function(t){return ZO(t,t)})));return"file"===u?(e=[i,n_(c,t_("header",t.targets)),n_(c,gt([(r=t,ft.from(r.anchorTop).map(function(t){return ZO("",t)}).toArray()),t_("anchor",t.targets),(o=t,ft.from(o.anchorBottom).map(function(t){return ZO("",t)}).toArray())]))],N(e,function(t,n){return 0===t.length||0===n.length?t.concat(n):t.concat($O,n)},[])):i})},o_=oi("aria-invalid"),r_=function(r,o,i){var t,n,e,u,a,c=o.shared.providers,s=function(t){var n=Ll.getValue(t);i.addToHistory(n.value,r.filetype)},l=Wy.parts.field({factory:YO,dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":o_,type:"url"},minChars:0,responseTime:0,fetch:function(t){var n=e_(r.filetype,t,i),e=NC(n,ih.BUBBLE_TO_SANDBOX,o,!1);return kx(e)},getHotspot:function(t){return h.getOpt(t)},onSetValue:function(t,n){t.hasConfigured(Fx)&&Fx.run(t).get(at)},typeaheadBehaviours:rc(gt([i.getValidationHandler().map(function(e){return Fx.config({getRoot:function(t){return kr(t.element)},invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:function(t,n){d.getOpt(t).each(function(t){Yr(t.element,"title",c.translate(n))})}},validator:{validate:function(t){var n=Ll.getValue(t);return JO(function(o){e({type:r.filetype,url:n.value},function(t){var n,e;"invalid"===t.status?(n=pt.error(t.message),o(n)):(e=pt.value(t.message),o(e))})})},validateOnLoad:!1}})}).toArray(),[mv.config({disabled:function(){return r.disabled||c.isDisabled()}}),Yy.config({}),fg("urlinput-events",gt(["file"===r.filetype?[er(po(),function(t){qo(t,Zy,{name:r.name})})]:[],[er(ho(),function(t){qo(t,Zy,{name:r.name}),s(t)}),er(Co(),function(t){qo(t,Zy,{name:r.name}),s(t)})]]))]])),eventOrder:((t={})[po()]=["streaming","urlinput-events","invalidating"],t),model:{getDisplayText:function(t){return t.value},selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:o.shared.getSink,parts:{menu:xh(0,0,"normal")},onExecute:function(t,n,e){qo(n,ox,{})},onItemExecute:function(t,n,e,o){s(t),qo(t,Zy,{name:r.name})}}),f=r.label.map(function(t){return Qy(t,c)}),d=mp((n="invalid",e=ft.some(o_),void 0===(u="warning")&&(u=n),void 0===a&&(a=n),{dom:{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+n],innerHtml:pp(u,c.icons),attributes:lt({title:c.translate(a),"aria-live":"polite"},e.fold(function(){return{}},function(t){return{id:t}}))}})),m=mp({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[d.asSpec()]}),g=i.getUrlPicker(r.filetype),p=oi("browser.url.event"),h=mp({dom:{tag:"div",classes:["tox-control-wrap"]},components:[l,m.asSpec()],behaviours:rc([mv.config({disabled:function(){return r.disabled||c.isDisabled()}})])}),v=mp(qC({name:r.name,icon:ft.some("browse"),text:r.label.getOr(""),disabled:r.disabled,primary:!1,borderless:!0},function(t){return Yo(t,p)},c,[],["tox-browse-url"]));return Wy.sketch({dom:$y([]),components:f.toArray().concat([{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:gt([[h.asSpec()],g.map(function(){return v.asSpec()}).toArray()])}]),fieldBehaviours:rc([mv.config({disabled:function(){return r.disabled||c.isDisabled()},onDisabled:function(t){Wy.getField(t).each(mv.disable),v.getOpt(t).each(mv.disable)},onEnabled:function(t){Wy.getField(t).each(mv.enable),v.getOpt(t).each(mv.enable)}}),Nv(),fg("url-input-events",[er(p,function(o){Zf.getCurrent(o).each(function(n){var t=Ll.getValue(n),e=lt({fieldname:r.name},t);g.each(function(t){t(e).get(function(t){Ll.setValue(n,t),qo(o,Zy,{name:r.name})})})})})])])})},i_=function(r){return function(n,e,o){return Ft(e,"name").fold(function(){return r(e,o)},function(t){return n.field(t,r(e,o))})}},u_={bar:i_(function(t,n){return e=t,o=n.shared,{dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:V(e.items,o.interpreter)};var e,o}),collection:i_(function(t,n){return cx(t,n.shared.providers)}),alertbanner:i_(function(t,n){return e=t,o=n.shared.providers,Ny.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in","tox-notification--"+e.level]},components:[{dom:{tag:"div",classes:["tox-notification__icon"]},components:[dp.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:pp(e.icon,o.icons),attributes:{title:o.translate(e.iconTooltip)}},action:function(t){qo(t,ex,{name:"alert-banner",value:e.url})}})]},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:o.translate(e.text)}}]});var e,o}),input:i_(function(t,n){return e=t,o=n.shared.providers,IO({name:e.name,multiline:!1,label:e.label,inputMode:e.inputMode,placeholder:e.placeholder,flex:!1,disabled:e.disabled,classname:"tox-textfield",validation:ft.none(),maximized:e.maximized},o);var e,o}),textarea:i_(function(t,n){return e=t,o=n.shared.providers,IO({name:e.name,multiline:!0,label:e.label,inputMode:ft.none(),placeholder:e.placeholder,flex:!0,disabled:e.disabled,classname:"tox-textarea",validation:ft.none(),maximized:e.maximized},o);var e,o}),label:i_(function(t,n){return e=t,o=n.shared,r={dom:{tag:"label",innerHtml:o.providers.translate(e.label),classes:["tox-label"]}},i=V(e.items,o.interpreter),{dom:{tag:"div",classes:["tox-form__group"]},components:[r].concat(i),behaviours:rc([ik(),lg.config({}),vk(ft.none()),ig.config({mode:"acyclic"})])};var e,o,r,i}),iframe:(CO=function(t,n){return Ek(t,n.shared.providers)},function(t,n,e){var o=zt(n,{source:"dynamic"});return i_(CO)(t,o,e)}),button:i_(function(t,n){return $C(t,n.shared.providers)}),checkbox:i_(function(t,n){return e=t,o=n.shared.providers,r=Ll.config({store:{mode:"manual",getValue:function(t){return t.element.dom.checked},setValue:function(t,n){t.element.dom.checked=n}}}),i=function(t){return t.element.dom.click(),ft.some(!0)},u=Wy.parts.field({factory:{sketch:st},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:rc([ik(),mv.config({disabled:function(){return e.disabled||o.isDisabled()}}),Yy.config({}),hg.config({}),r,ig.config({mode:"special",onEnter:i,onSpace:i,stopSpaceKeyup:!0}),fg("checkbox-events",[er(ho(),function(t,n){qo(t,Zy,{name:e.name})})])])}),a=Wy.parts.label({dom:{tag:"span",classes:["tox-checkbox__label"],innerHtml:o.translate(e.label)},behaviours:rc([rw.config({})])}),s=mp({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[(c=function(t){return{dom:{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+t],innerHtml:pp("checked"===t?"selected":"unselected",o.icons)}}})("checked"),c("unchecked")]}),Wy.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[u,s.asSpec(),a],fieldBehaviours:rc([mv.config({disabled:function(){return e.disabled||o.isDisabled()},disableClass:"tox-checkbox--disabled",onDisabled:function(t){Wy.getField(t).each(mv.disable)},onEnabled:function(t){Wy.getField(t).each(mv.enable)}}),Nv()])});var e,o,r,i,u,a,c,s}),colorinput:i_(function(t,n){return cw(t,n.shared,n.colorinput)}),colorpicker:i_(function(t){var n=function(t){return"tox-"+t},e=rk(sk,n),r=mp(e.sketch({dom:{tag:"div",classes:["tox-color-picker-container"],attributes:{role:"presentation"}},onValidHex:function(t){qo(t,ex,{name:"hex-valid",value:!0})},onInvalidHex:function(t){qo(t,ex,{name:"hex-valid",value:!1})}}));return{dom:{tag:"div"},components:[r.asSpec()],behaviours:rc([Ll.config({store:{mode:"manual",getValue:function(t){var n=r.get(t);return Zf.getCurrent(n).bind(function(t){return Ll.getValue(t).hex}).map(function(t){return"#"+t}).getOr("")},setValue:function(t,n){var e=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/.exec(n),o=r.get(t);Zf.getCurrent(o).fold(function(){console.log("Can not find form")},function(t){Ll.setValue(t,{hex:ft.from(e[1]).getOr("")}),$S.getField(t,"hex").each(function(t){Yo(t,po())})})}}}),ik()])}}),dropzone:i_(function(t,n){return yk(t,n.shared.providers)}),grid:i_(function(t,n){return e=t,o=n.shared,{dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--"+e.columns+"col"]},components:V(e.items,o.interpreter)};var e,o}),listbox:i_(function(t,n){return o=t,e=(r=n).shared.providers,i=K(o.items).filter(DO),u=o.label.map(function(t){return Qy(t,e)}),a={dom:{tag:"div",classes:["tox-listboxfield"]},components:[Wy.parts.field({dom:{},factory:{sketch:function(t){return IC({uid:t.uid,text:i.map(function(t){return t.text}),icon:ft.none(),tooltip:o.label,role:ft.none(),fetch:function(t,n){var e=AO(t,o.name,o.items,Ll.getValue(t));n(NC(e,ih.CLOSE_ON_EXECUTE,r,!1))},onSetup:ct(at),getApi:ct({}),columns:1,presets:"normal",classes:[],dropdownBehaviours:[Yy.config({}),Ll.config({store:{mode:"manual",initialValue:i.map(function(t){return t.value}).getOr(""),getValue:function(t){return qr(t.element,BO)},setValue:function(n,t){MO(o.items,t).each(function(t){Yr(n.element,BO,t.value),qo(n,MC,{text:t.text})})}}})]},"tox-listbox",r.shared)}}})]},Wy.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:gt([u.toArray(),[a]]),fieldBehaviours:rc([mv.config({disabled:ct(o.disabled),onDisabled:function(t){Wy.getField(t).each(mv.disable)},onEnabled:function(t){Wy.getField(t).each(mv.enable)}})])});var o,r,e,i,u,a}),selectbox:i_(function(t,n){return e=t,o=n.shared.providers,r=V(e.items,function(t){return{text:o.translate(t.text),value:t.value}}),i=e.label.map(function(t){return Qy(t,o)}),u=Wy.parts.field({dom:{},selectAttributes:{size:e.size},options:r,factory:FO,selectBehaviours:rc([mv.config({disabled:function(){return e.disabled||o.isDisabled()}}),Yy.config({}),fg("selectbox-change",[er(ho(),function(t,n){qo(t,Zy,{name:e.name})})])])}),a=1 .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-js:not([disabled])"},tgroupBehaviours:rc([Yy.config({}),hg.config({})])}},WT=function(t){return vT.sketch(UT(t))},GT=function(e,t){var n=sr(function(t){var n=V(e.initGroups,WT);Z_.setGroups(t,n)});return rc([Wv(e.providers.isDisabled),Nv(),ig.config({mode:t,onEscape:e.onEscape,selector:".tox-toolbar__group"}),fg("toolbar-events",[n])])},XT=function(t){var n=t.cyclicKeying?"cyclic":"acyclic";return{uid:t.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":UT({title:ft.none(),items:[]}),"overflow-button":GC({name:"more",icon:ft.some("more-drawer"),disabled:!1,tooltip:ft.some("More..."),primary:!1,borderless:!1},ft.none(),t.providers)},splitToolbarBehaviours:GT(t,n)}},YT=function(i){var t=XT(i),n=xT.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return xT.sketch(lt(lt({},t),{lazySink:i.getSink,getOverflowBounds:function(){var t=i.moreDrawerData.lazyHeader().element,n=zu(t),e=wr(t),o=zu(e),r=Math.max(e.dom.scrollHeight,o.height);return Pu(n.x+4,o.y,n.width-8,r)},parts:lt(lt({},t.parts),{overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:i.attributes}}}),components:[n],markers:{overflowToggledClass:"tox-tbtn--enabled"}}))},qT=function(t){var n=LT.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),e=LT.parts.overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),o=XT(t);return LT.sketch(lt(lt({},o),{components:[n,e],markers:{openClass:"tox-toolbar__overflow--open",closedClass:"tox-toolbar__overflow--closed",growingClass:"tox-toolbar__overflow--growing",shrinkingClass:"tox-toolbar__overflow--shrinking",overflowToggledClass:"tox-tbtn--enabled"},onOpened:function(t){t.getSystem().broadcastOn([jT()],{type:"opened"})},onClosed:function(t){t.getSystem().broadcastOn([jT()],{type:"closed"})}}))},KT=function(t){var n=t.cyclicKeying?"cyclic":"acyclic";return Z_.sketch({uid:t.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(t.type===oh.scrolling?["tox-toolbar--scrolling"]:[])},components:[Z_.parts.groups({})],toolbarBehaviours:GT(t,n)})},JT=fn([Un("type"),jn("items",mn([Sn([Un("name"),qn("items",Rn)]),Rn]))].concat(jp)),$T=[Qn("text"),Qn("tooltip"),Qn("icon"),Gn("fetch"),ae("onSetup",function(){return at})],QT=fn(k([Un("type")],$T)),ZT=function(t){return _n("menubutton",QT,t)},tE=fn([Un("type"),Qn("tooltip"),Qn("icon"),Qn("text"),Zn("select"),Gn("fetch"),ae("onSetup",function(){return at}),ie("presets","normal",["normal","color","listpreview"]),ne("columns",1),Gn("onAction"),Gn("onItemAction")]),nE=/* */Object.freeze({__proto__:null,events:function(i,u){var r=function(o,r){i.updateState.each(function(t){var n=t(o,r);u.set(n)}),i.renderComponents.each(function(t){var n=t(r,u.get()),e=V(n,o.getSystem().build);ol(o,e)})};return Zo([er(Oo(),function(t,n){var e,o=n;o.universal||(e=i.channel,M(o.channels,e)&&r(t,o.data))}),sr(function(n,t){i.initialData.each(function(t){r(n,t)})})])}}),eE=/* */Object.freeze({__proto__:null,getState:function(t,n,e){return e}}),oE=[Ln("channel"),Kn("renderComponents"),Kn("updateState"),Kn("initialData")],rE=uc({fields:oE,name:"reflecting",active:nE,apis:eE,state:/* */Object.freeze({__proto__:null,init:function(){var n=fe(ft.none());return{readState:function(){return n.get().fold(function(){return"none"},function(t){return t})},get:function(){return n.get()},set:function(t){return n.set(t)},clear:function(){return n.set(ft.none())}}}})}),iE=ct([Ln("toggleClass"),Ln("fetch"),pa("onExecute"),ne("getHotspot",ft.some),ne("getAnchorOverrides",ct({})),qc(),pa("onItemExecute"),Kn("lazySink"),Ln("dom"),ma("onOpen"),jl("splitDropdownBehaviours",[Vx,ig,hg]),ne("matchWidth",!1),ne("useMinWidth",!1),ne("eventOrder",{}),Kn("role")].concat(tw())),uE=bf({factory:dp,schema:[Ln("dom")],name:"arrow",defaults:function(){return{buttonBehaviours:rc([hg.revoke()])}},overrides:function(n){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(t){t.getSystem().getByUid(n.uid).each(Ko)},buttonBehaviours:rc([Eg.config({toggleOnExecute:!1,toggleClass:n.toggleClass})])}}}),aE=bf({factory:dp,schema:[Ln("dom")],name:"button",defaults:function(){return{buttonBehaviours:rc([hg.revoke()])}},overrides:function(e){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(n){n.getSystem().getByUid(e.uid).each(function(t){e.onExecute(t,n)})}}}}),cE=ct([uE,aE,xf({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}}}},schema:[Ln("text")],name:"aria-descriptor"}),yf({schema:[la()],name:"menu",defaults:function(o){return{onExecute:function(n,e){n.getSystem().getByUid(o.uid).each(function(t){o.onItemExecute(t,n,e)})}}}}),Hx()]),sE=Yf({name:"SplitDropdown",configFields:iE(),partFields:cE(),factory:function(o,t,n,e){var r,i=function(t){Zf.getCurrent(t).each(function(t){ld.highlightFirst(t),ig.focusIn(t)})},u=function(t){qx(o,function(t){return t},t,e,i,px.HighlightFirst).get(at)},a=function(t){var n=Ff(t,o,"button");return Ko(n),ft.some(!0)},c=lt(lt({},Zo([sr(function(e,t){Mf(e,o,"aria-descriptor").each(function(t){var n=oi("aria");Yr(t.element,"id",n),Yr(e.element,"aria-describedby",n)})})])),Bg(ft.some(u))),s={repositionMenus:function(t){Eg.isOn(t)&&Zx(t)}};return{uid:o.uid,dom:o.dom,components:t,apis:s,eventOrder:lt(lt({},o.eventOrder),((r={})[_o()]=["disabling","toggling","alloy.base.behaviour"],r)),events:c,behaviours:Wl(o.splitDropdownBehaviours,[Vx.config({others:{sandbox:function(t){var n=Ff(t,o,"arrow");return Qx(o,t,{onOpen:function(){Eg.on(n),Eg.on(t)},onClose:function(){Eg.off(n),Eg.off(t)}})}}}),ig.config({mode:"special",onSpace:a,onEnter:a,onDown:function(t){return u(t),ft.some(!0)}}),hg.config({}),Eg.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:o.role.getOr("button"),"aria-haspopup":!0}}}},apis:{repositionMenus:function(t,n){return t.repositionMenus(n)}}}),lE=function(n){return{isDisabled:function(){return mv.isDisabled(n)},setDisabled:function(t){return mv.set(n,t)}}},fE=function(n){return{setActive:function(t){Eg.set(n,t)},isActive:function(){return Eg.isOn(n)},isDisabled:function(){return mv.isDisabled(n)},setDisabled:function(t){return mv.set(n,t)}}},dE=function(t,n){return t.map(function(t){return{"aria-label":n.translate(t),title:n.translate(t)}}).getOr({})},mE=oi("focus-button"),gE=["checklist","ordered-list"],pE=["indent","outdent","table-insert-column-after","table-insert-column-before","unordered-list"],hE=function(n,e,t,o,r,i){var u,a=function(t){return Zh.isRtl()&&M(gE,t)?t+"-rtl":t},c=Zh.isRtl()&&n.exists(function(t){return M(pE,t)});return{dom:{tag:"button",classes:["tox-tbtn"].concat(e.isSome()?["tox-tbtn--select"]:[]).concat(c?["tox-tbtn__icon-rtl"]:[]),attributes:dE(t,i)},components:Kv([n.map(function(t){return TC(a(t),i.icons)}),e.map(function(t){return DC(t,"tox-tbtn",i)})]),eventOrder:((u={})[io()]=["focusing","alloy.base.behaviour","common-button-display-events"],u),buttonBehaviours:rc([Wv(i.isDisabled),Nv(),fg("common-button-display-events",[er(io(),function(t,n){n.event.prevent(),Yo(t,mE)})])].concat(o.map(function(t){return rE.config({channel:t,initialData:{icon:n,text:e},renderComponents:function(t,n){return Kv([t.icon.map(function(t){return TC(a(t),i.icons)}),t.text.map(function(t){return DC(t,"tox-tbtn",i)})])}})}).toArray()).concat(r.getOr([])))}},vE=function(t,n,e){var o,r=fe(at),i=hE(t.icon,t.text,t.tooltip,ft.none(),ft.none(),e);return dp.sketch({dom:i.dom,components:i.components,eventOrder:AC,buttonBehaviours:rc([fg("toolbar-button-events",[(o={onAction:t.onAction,getApi:n.getApi},dr(function(n,t){Gv(o,n)(function(t){qo(n,BC,{buttonApi:t}),o.onAction(t)})})),Xv(n,r),Yv(n,r)]),Wv(function(){return t.disabled||e.isDisabled()}),Nv()].concat(n.toolbarButtonBehaviours))})},bE=function(t,n,e){return vE(t,{toolbarButtonBehaviours:[].concat(0=n.bottom,c=o&&!a;if(t.inline&&c)return{y:Math.max(u.bottom,e.y),bottom:e.bottom};if(t.inline&&!c)return{y:e.y,bottom:Math.min(u.y,e.bottom)};var s=Hu(r);return c?{y:Math.max(u.bottom,e.y),bottom:Math.min(s.bottom,e.bottom)}:{y:Math.max(s.y,e.y),bottom:Math.min(u.y,e.bottom)}}(t,c,a,n.header.isPositionedAtTop()),g=m.y,p=m.bottom;return Pu(f,g,d,p-g)},_E=function(n,t){var e=H(t,function(t){return t.predicate(n.dom)}),o=P(e,function(t){return"contexttoolbar"===t.type});return{contextToolbars:o.pass,contextForms:o.fail}},TE=function(t,n,e){var o=_E(t,n);if(0=n.y}var n,e})},FD=function(n,t){return t.getInitialPosition().map(function(t){return Pu(t.bounds.x,t.bounds.y,Ou(n),vu(n))})},ID=function(t,n,e){e.setInitialPosition(ft.some({style:function(t){var n={},e=t.dom;if(Li(e))for(var o=0;oe.y);o!==u.isVisible()&&(u.setVisible(o),c&&!o?(zi(i.element,[r.fadeOutClass]),r.onHide(i)):(o?BD:AD)(i,r))})})},ND=function(n,e,t){var o,r,i=n.element;t.setDocked(!1),o=t,r=n.element,FD(r,o).bind(function(t){return RD(r,t,o)}).each(function(t){t.fold(function(){return PD(n,e)},function(t){return HD(n,e,t)},at)}),t.setVisible(!0),e.contextual.each(function(t){Ni(i,[t.fadeInClass,t.fadeOutClass,t.transitionClass]),t.onShow(n)}),LD(n,e,t)},LD=function(t,n,e){var o,r,i,u,a;t.getSystem().isConnected()&&(o=t,i=e,u=(r=n).lazyViewport(o),(a=i.isDocked())&&zD(o,r,i,u),VD(o,u,i).each(function(t){i.setDocked(!a),t.fold(function(){return PD(o,r)},function(t){return HD(o,r,t)},function(t){zD(o,r,i,u,!0),HD(o,r,t)})}))},jD=function(t,n,e){e.isDocked()&&ND(t,n,e)},UD=/* */Object.freeze({__proto__:null,refresh:LD,reset:jD,isDocked:function(t,n,e){return e.isDocked()},getModes:function(t,n,e){return e.getModes()},setModes:function(t,n,e,o){return e.setModes(o)}}),WD=/* */Object.freeze({__proto__:null,events:function(o,r){return Zo([cr(bo(),function(n,e){o.contextual.each(function(t){Hi(n.element,t.transitionClass)&&(Ni(n.element,[t.transitionClass,t.fadeInClass]),(r.isVisible()?t.onShown:t.onHidden)(n)),e.stop()})}),er(Ro(),function(t,n){LD(t,o,r)}),er(Vo(),function(t,n){jD(t,o,r)})])}}),GD=[te("contextual",[Un("fadeInClass"),Un("fadeOutClass"),Un("transitionClass"),Gn("lazyContext"),ma("onShow"),ma("onShown"),ma("onHide"),ma("onHidden")]),ae("lazyViewport",Nu),ce("modes",["top","bottom"],Rn),ma("onDocked"),ma("onUndocked")],XD=uc({fields:GD,name:"docking",active:WD,apis:UD,state:/* */Object.freeze({__proto__:null,init:function(t){var n=fe(!1),e=fe(!0),o=fe(ft.none()),r=fe(t.modes);return xi({isDocked:n.get,setDocked:n.set,getInitialPosition:o.get,setInitialPosition:o.set,isVisible:e.get,setVisible:e.set,getModes:r.get,setModes:r.set,readState:function(){return"docked: "+n.get()+", visible: "+e.get()+", modes: "+r.get().join(",")}})}})}),YD={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},qD="tox-tinymce--toolbar-sticky-on",KD="tox-tinymce--toolbar-sticky-off",JD=function(r){var i=r.element;kr(i).each(function(t){var n,e,o="padding-"+XD.getModes(r)[0];XD.isDocked(r)?(n=Ou(t),Yi(i,"width",n+"px"),Yi(t,o,bu(e=i)+(parseInt(Ji(e,"margin-top"),10)||0)+(parseInt(Ji(e,"margin-bottom"),10)||0)+"px")):(tu(i,"width"),tu(t,o))})},$D=function(t,n){n?(Pi(t,YD.fadeOutClass),zi(t,[YD.transitionClass,YD.fadeInClass])):(Pi(t,YD.fadeInClass),zi(t,[YD.fadeOutClass,YD.transitionClass]))},QD=function(t,n){var e=me.fromDom(t.getContainer());n?(Ri(e,qD),Pi(e,KD)):(Ri(e,KD),Pi(e,qD))},ZD=function(c,t){var n,i=fe(ft.none()),o=t.getSink,u=function(n){o().each(function(t){return n(t.element)})},e=function(t){c.inline||JD(t),QD(c,XD.isDocked(t)),t.getSystem().broadcastOn([kl()],{}),o().each(function(t){return t.getSystem().broadcastOn([kl()],{})})},r=c.inline?[]:[lc.config({channels:((n={})[jT()]={onReceive:JD},n)})];return k([hg.config({}),XD.config({contextual:lt({lazyContext:function(t){var n,e,o=bu(t.element),r=c.inline?c.getContentAreaContainer():c.getContainer(),i=Hu(me.fromDom(r)),u=i.height-o,a=i.y+(n=t,e="top",M(XD.getModes(n),e)?0:o);return ft.some(Pu(i.x,a,i.width,u))},onShow:function(){u(function(t){return $D(t,!0)})},onShown:function(r){u(function(t){return Ni(t,[YD.transitionClass,YD.fadeInClass])}),i.get().each(function(t){var n,e,o;n=r.element,o=yr(e=t),mc(o).filter(function(t){return!Ge(e,t)}).filter(function(t){return Ge(t,me.fromDom(o.dom.body))||Ye(n,t)}).each(function(){return dc(e)}),i.set(ft.none())})},onHide:function(t){var n,e;i.set((n=t.element,e=o,gc(n).orThunk(function(){return e().toOptional().bind(function(t){return gc(t.element)})}))),u(function(t){return $D(t,!1)})},onHidden:function(){u(function(t){return Ni(t,[YD.transitionClass])})}},YD),modes:[t.header.getDockingMode()],onDocked:e,onUndocked:e})],r)},tB=/* */Object.freeze({__proto__:null,setup:function(t,n,e){t.inline||(n.header.isPositionedAtTop()||t.on("ResizeEditor",function(){e().each(XD.reset)}),t.on("ResizeWindow ResizeEditor",function(){e().each(JD)}),t.on("SkinLoaded",function(){e().each(function(t){XD.isDocked(t)?XD.reset(t):XD.refresh(t)})}),t.on("FullscreenStateChanged",function(){e().each(XD.reset)})),t.on("AfterScrollIntoView",function(y){e().each(function(t){XD.refresh(t);var n,e,o,r,i,u,a,c,s,l,f,d,m,g,p,h,v,b=t.element;Zd(b)&&(n=y,r=yr(e=b),i=r.dom.defaultView.innerHeight,u=Bu(r),a=me.fromDom(n.elm),c=zu(a),s=vu(a),l=c.y,f=l+s,d=Su(e),m=vu(e),g=d.top,p=g+m,h=Math.abs(g-u.top)<2,v=Math.abs(p-(u.top+i))<2,h&&l"},iB=function(r,t){var e,n=function(t){return Vf(r)},o=function(e,o){return function(t,n){return Mf(t,r,n).map(function(t){return e(t,n)}).getOr(o)}},i=function(t,n){return"true"!==qr(t.element,"aria-hidden")},u=o(i,!1),a=o(function(t,n){var e;i(t)&&(e=t.element,Yi(e,"display","none"),Yr(e,"aria-hidden","true"),qo(t,jo(),{name:n,visible:!1}))}),c=function(n,t){mt(t,function(t){return e(n,t)})},s=o(function(t,n){var e;i(t)||(e=t.element,tu(e,"display"),$r(e,"aria-hidden"),qo(t,jo(),{name:n,visible:!0}))}),l={getSlotNames:n,getSlot:function(t,n){return Mf(t,r,n)},isShowing:u,hideSlot:e=a,hideAllSlots:function(t){return c(t,n())},showSlot:s};return{uid:r.uid,dom:r.dom,components:t,behaviours:Ul(r.slotBehaviours),apis:l}},uB=Tt({getSlotNames:function(t,n){return t.getSlotNames(n)},getSlot:function(t,n,e){return t.getSlot(n,e)},isShowing:function(t,n,e){return t.isShowing(n,e)},hideSlot:function(t,n,e){return t.hideSlot(n,e)},hideAllSlots:function(t,n){return t.hideAllSlots(n)},showSlot:function(t,n,e){return t.showSlot(n,e)}},bi),aB=lt(lt({},uB),{sketch:function(t){var e,n=(e=[],{slot:function(t,n){return e.push(t),Tf(eB,rB(t),n)},record:function(){return e}}),o=t(n),r=n.record(),i=V(r,function(t){return bf({name:t,pname:rB(t)})});return jf(eB,oB,i,iB,o)}}),cB=fn([Qn("icon"),Qn("tooltip"),ae("onShow",at),ae("onHide",at),ae("onSetup",function(){return at})]),sB=function(t){return{element:function(){return t.element.dom}}},lB=function(e,o){var r=V(Ct(o),function(t){var n=o[t],e=Tn(_n("sidebar",cB,n));return{name:t,getApi:sB,onSetup:e.onSetup,onShow:e.onShow,onHide:e.onHide}});return V(r,function(t){var n=fe(at);return e.slot(t.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:Uh([Xv(t,n),Yv(t,n),er(jo(),function(n,t){var e=t.event;L(r,function(t){return t.name===e.name}).each(function(t){(e.visible?t.onShow:t.onHide)(t.getApi(n))})})])})})},fB=function(t,e){Zf.getCurrent(t).each(function(t){return lg.set(t,[(n=e,aB.sketch(function(t){return{dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:lB(t,n),slotBehaviours:Uh([sr(function(t){return aB.hideAllSlots(t)})])}}))]);var n})},dB=function(t){return Zf.getCurrent(t).bind(function(t){return VT.isGrowing(t)||VT.hasGrown(t)?Zf.getCurrent(t).bind(function(n){return L(aB.getSlotNames(n),function(t){return aB.isShowing(n,t)})}):ft.none()})},mB=oi("FixSizeEvent"),gB=oi("AutoSizeEvent"),pB=function(t){var n,e,o,r=me.fromHtml(t),i=_r(r),u=(e=(n=r).dom.attributes!==undefined?n.dom.attributes:[],N(e,function(t,n){var e;return"class"===n.name?t:lt(lt({},t),((e={})[n.name]=n.value,e))},{})),a=(o=r,Array.prototype.slice.call(o.dom.classList,0)),c=0===i.length?{}:{innerHtml:Wr(r)};return lt({tag:mr(r),classes:a,attributes:u},c)},hB=function(t,n,e){var o=t.element;!0===n?(lg.set(t,[{dom:{tag:"div",attributes:{"aria-label":e.translate("Loading...")},classes:["tox-throbber__busy-spinner"]},components:[{dom:pB('
')}],behaviours:rc([ig.config({mode:"special",onTab:function(){return ft.some(!0)},onShiftTab:function(){return ft.some(!0)}}),hg.config({})])}]),tu(o,"display"),$r(o,"aria-hidden")):(lg.set(t,[]),Yi(o,"display","none"),Yr(o,"aria-hidden","true"))},vB=xD.optional({factory:nB,name:"menubar",schema:[Ln("backstage")]}),bB=xD.optional({factory:{sketch:function(t){return CD.sketch({uid:t.uid,dom:t.dom,listBehaviours:rc([ig.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:function(){return KT({type:t.type,uid:oi("multiple-toolbar-item"),cyclicKeying:!1,initGroups:[],providers:t.providers,onEscape:function(){return t.onEscape(),ft.some(!0)}})},setupItem:function(t,n,e,o){Z_.setGroups(n,e)},shell:!0})}},name:"multiple-toolbar",schema:[Ln("dom"),Ln("onEscape")]}),yB=xD.optional({factory:{sketch:function(t){var n;return((n=t).type===oh.sliding?qT:n.type===oh.floating?YT:KT)({type:t.type,uid:t.uid,onEscape:function(){return t.onEscape(),ft.some(!0)},cyclicKeying:!1,initGroups:[],getSink:t.getSink,providers:t.providers,moreDrawerData:{lazyToolbar:t.lazyToolbar,lazyMoreButton:t.lazyMoreButton,lazyHeader:t.lazyHeader},attributes:t.attributes})}},name:"toolbar",schema:[Ln("dom"),Ln("onEscape"),Ln("getSink")]}),xB=xD.optional({factory:{sketch:function(t){var n=t.editor,e=t.sticky?ZD:OD;return{uid:t.uid,dom:t.dom,components:t.components,behaviours:rc(e(n,t.sharedBackstage))}}},name:"header",schema:[Ln("dom")]}),wB=xD.optional({name:"socket",schema:[Ln("dom")]}),SB=xD.optional({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"complementary"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:rc([Yy.config({}),hg.config({}),VT.config({dimension:{property:"width"},closedClass:"tox-sidebar--sliding-closed",openClass:"tox-sidebar--sliding-open",shrinkingClass:"tox-sidebar--sliding-shrinking",growingClass:"tox-sidebar--sliding-growing",onShrunk:function(t){Zf.getCurrent(t).each(aB.hideAllSlots),Yo(t,gB)},onGrown:function(t){Yo(t,gB)},onStartGrow:function(t){qo(t,mB,{width:Qi(t.element,"width").getOr("")})},onStartShrink:function(t){qo(t,mB,{width:Ou(t.element)+"px"})}}),lg.config({}),Zf.config({find:function(t){var n=lg.contents(t);return K(n)}})])}],behaviours:rc([ak(0),fg("sidebar-sliding-events",[er(mB,function(t,n){Yi(t.element,"width",n.event.width)}),er(gB,function(t,n){tu(t.element,"width")})])])}}},name:"sidebar",schema:[Ln("dom")]}),kB=xD.optional({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:rc([lg.config({})]),components:[]}}},name:"throbber",schema:[Ln("dom")]}),CB=Yf({name:"OuterContainer",factory:function(e,t,n){var o={getSocket:function(t){return yD.getPart(t,e,"socket")},setSidebar:function(t,n){yD.getPart(t,e,"sidebar").each(function(t){return fB(t,n)})},toggleSidebar:function(t,o){yD.getPart(t,e,"sidebar").each(function(t){return n=t,e=o,void Zf.getCurrent(n).each(function(n){Zf.getCurrent(n).each(function(t){VT.hasGrown(n)?aB.isShowing(t,e)?VT.shrink(n):(aB.hideAllSlots(t),aB.showSlot(t,e)):(aB.hideAllSlots(t),aB.showSlot(t,e),VT.grow(n))})});var n,e})},whichSidebar:function(t){return yD.getPart(t,e,"sidebar").bind(dB).getOrNull()},getHeader:function(t){return yD.getPart(t,e,"header")},getToolbar:function(t){return yD.getPart(t,e,"toolbar")},setToolbar:function(t,n){yD.getPart(t,e,"toolbar").each(function(t){t.getApis().setGroups(t,n)})},setToolbars:function(t,n){yD.getPart(t,e,"multiple-toolbar").each(function(t){CD.setItems(t,n)})},refreshToolbar:function(t){yD.getPart(t,e,"toolbar").each(function(t){return t.getApis().refresh(t)})},toggleToolbarDrawer:function(t){yD.getPart(t,e,"toolbar").each(function(n){var t,e;t=n.getApis().toggle,e=function(t){return t(n)},t!==undefined&&null!==t?ft.some(e(t)):ft.none()})},isToolbarDrawerToggled:function(t){return yD.getPart(t,e,"toolbar").bind(function(n){return ft.from(n.getApis().isOpen).map(function(t){return t(n)})}).getOr(!1)},getThrobber:function(t){return yD.getPart(t,e,"throbber")},focusToolbar:function(t){yD.getPart(t,e,"toolbar").orThunk(function(){return yD.getPart(t,e,"multiple-toolbar")}).each(function(t){ig.focusIn(t)})},setMenubar:function(t,n){yD.getPart(t,e,"menubar").each(function(t){nB.setMenus(t,n)})},focusMenubar:function(t){yD.getPart(t,e,"menubar").each(function(t){nB.focus(t)})}};return{uid:e.uid,dom:e.dom,components:t,apis:o,behaviours:e.behaviours}},configFields:[Ln("dom"),Ln("behaviours")],partFields:[xB,vB,yB,bB,wB,SB,kB],apis:{getSocket:function(t,n){return t.getSocket(n)},setSidebar:function(t,n,e){t.setSidebar(n,e)},toggleSidebar:function(t,n,e){t.toggleSidebar(n,e)},whichSidebar:function(t,n){return t.whichSidebar(n)},getHeader:function(t,n){return t.getHeader(n)},getToolbar:function(t,n){return t.getToolbar(n)},setToolbar:function(t,n,e){var o=V(e,WT);t.setToolbar(n,o)},setToolbars:function(t,n,e){var o=V(e,function(t){return V(t,WT)});t.setToolbars(n,o)},refreshToolbar:function(t,n){return t.refreshToolbar(n)},toggleToolbarDrawer:function(t,n){t.toggleToolbarDrawer(n)},isToolbarDrawerToggled:function(t,n){return t.isToolbarDrawerToggled(n)},getThrobber:function(t,n){return t.getThrobber(n)},setMenubar:function(t,n,e){t.setMenubar(n,e)},focusMenubar:function(t,n){t.focusMenubar(n)},focusToolbar:function(t,n){t.focusToolbar(n)}}}),OB={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 codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor toc | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | formats blockformats fontformats fontsizes align lineheight | forecolor backcolor | removeformat"},tools:{title:"Tools",items:"spellchecker spellcheckerlanguage | a11ycheck code wordcount"},table:{title:"Table",items:"inserttable | cell row column | advtablesort | tableprops deletetable"},help:{title:"Help",items:"help"}},_B=function(t){return"string"==typeof t?t.split(" "):t},TB=function(i,u){var a=lt(lt({},OB),u.menus),n=0o)return"top";var i=wr(c),u=Math.max(i.dom.scrollHeight,vu(i));return r.bottom=o.clientX&&t.top<=o.clientY&&t.bottom>=o.clientY})}(n,e)?(n.once("selectionchange",t),n.once("touchend",function(){return n.off("selectionchange",t)})):t())},bA=function(t){return"string"==typeof t?t.split(/[ ,]/):t},yA=function(t){return t.getParam("contextmenu_never_use_native",!1,"boolean")},xA=function(t){return e="contextmenu",o="link linkchecker image imagetools table spellchecker configurepermanentpen",r=(n=t).ui.registry.getAll().contextMenus,ft.from(n.getParam(e)).map(bA).getOrThunk(function(){return H(bA(o),function(t){return It(r,t)})});var n,e,o,r},wA=function(t){return C(t)?"|"===t:"separator"===t.type},SA={type:"separator"},kA=function(n){var t,e=function(t){return{text:t.text,icon:t.icon,disabled:t.disabled,shortcut:t.shortcut}};if(C(n))return n;switch(n.type){case"separator":return SA;case"submenu":return lt(lt({type:"nestedmenuitem"},e(n)),{getSubmenuItems:function(){var t=n.getSubmenuItems();return C(t)?t:V(t,kA)}});default:return lt(lt({type:"menuitem"},e(n)),{onAction:(t=n.onAction,function(){return t()})})}},CA=function(t,n){if(0===n.length)return t;var e=J(t).filter(function(t){return!wA(t)}).fold(function(){return[]},function(t){return[SA]});return t.concat(e).concat(n).concat([SA])},OA=function(t,n){return"longpress"!==n.type&&(2!==n.button||n.target===t.getBody()&&""===n.pointerType)},_A=function(t,n){return OA(t,n)?t.selection.getStart(!0):n.target},TA=function(a,t,e){var o=je().deviceType.isTouch,r=mu(Zg.sketch({dom:{tag:"div"},lazySink:t,onEscape:function(){return a.focus()},onShow:function(){return e.setContextMenuState(!0)},onHide:function(){return e.setContextMenuState(!1)},fireDismissalEventInstead:{},inlineBehaviours:rc([fg("dismissContextMenu",[er(zo(),function(t,n){wl.close(t),a.focus()})])])})),n=function(t){return Zg.hide(r)},i=function(u){var t,n;yA(a)&&u.preventDefault(),t=a,u.ctrlKey&&!yA(t)||!1===a.getParam("contextmenu")||(n=function(t,n){var e=t.getParam("contextmenu_avoid_overlap","","string");if(OA(t,n))return!0;if(e){var o=_A(t,n);return Oy(me.fromDom(o),e)}return!1}(a,u),(o()?vA:mA)(a,u,function(){var n,r,t,e=_A(a,u),o=a.ui.registry.getAll(),i=xA(a);return n=o.contextMenus,r=e,0<(t=N(i,function(o,t){return Ft(n,t.toLowerCase()).map(function(t){var n=t.update(r);if(C(n))return CA(o,n.split(" "));if(0n})},h=function(t){return p(m,t,n,"top")},v=function(t){return p(g,t,a,"bottom")};je().deviceType.isTouch()&&(c.on("TableSelectionChange",function(n){t.get()||(rl(e,m),rl(e,g),t.set(!0)),i.set(ft.some(n.start)),u.set(ft.some(n.finish)),n.otherCells.each(function(t){o.set(t.upOrLeftCells),r.set(t.downOrRightCells),h(n.start),v(n.finish)})}),c.on("ResizeEditor ResizeWindow ScrollContent",function(){i.get().each(h),u.get().each(v)}),c.on("TableSelectionClear",function(){t.get()&&(al(m),al(g),t.set(!1)),i.set(ft.none()),u.set(ft.none())}))};(LE=NE=NE||{})[LE.None=0]="None",LE[LE.Both=1]="Both",LE[LE.Vertical=2]="Vertical";var bM,yM,xM,wM=function(t,n,e){var o,r,i,u,a,c,s=me.fromDom(t.getContainer()),l=(o=t,r=n,i=e,u=vu(s),a=Ou(s),(c={}).height=jB(u+r.top,bv(o),xv(o)),i===NE.Both&&(c.width=jB(a+r.left,vv(o),yv(o))),c);_t(l,function(t,n){return Yi(s,n,LB(t)),0}),t.fire("ResizeEditor")},SM=function(i,u,a){u.delimiter||(u.delimiter="\xbb");return{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:rc([ig.config({mode:"flow",selector:"div[role=button]"}),mv.config({disabled:a.isDisabled}),Nv(),Yy.config({}),lg.config({}),fg("elementPathEvents",[sr(function(r,t){i.shortcuts.add("alt+F11","focus statusbar elementpath",function(){return ig.focusIn(r)}),i.on("NodeChange",function(t){var n,o,e=function(t){for(var n=[],e=t.length;0'+e+""}}),0=o.dom.offsetLeft+Ou(o)?Math.max(vu(o),a):a,s=parseInt(Ji(n,"margin-top"),10)||0,l=parseInt(Ji(n,"margin-bottom"),10)||0,u-(vu(n)+s+l-c)));var n,e,o,r,i,u,a,c,s,l}).each(function(t){gI(m,t)})})})},hI=function(t){return qu(t,'[role="tabpanel"]')},vI=function(a){var c;return{smartTabHeight:(c=fe(ft.none()),{extraEvents:[sr(function(t){var e=t.element;hI(e).each(function(u){var n;Yi(u,"visibility","hidden"),t.getSystem().getByDom(u).toOptional().each(function(t){var o,r,i,n=(r=u,i=t,V(o=a,function(t,n){lg.set(i,o[n].view());var e=r.dom.getBoundingClientRect();return lg.set(i,[]),e.height})),e=K(Y(n,function(t,n){return n"+n.translate(t)+"")}]}]})},AI=function(t){return AM.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:t})},MI=function(t,n){return[Ny.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:t}),Ny.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:n})]},FI=function(n){var t,e="tox-dialog",o=e+"-wrap",r=o+"__backdrop",i=e+"__disable-scroll";return AM.sketch({lazySink:n.lazySink,onEscape:function(t){return n.onEscape(t),ft.some(!0)},useTabstopAt:function(t){return!_k(t)},dom:{tag:"div",classes:[e].concat(n.extraClasses),styles:lt({position:"relative"},n.extraStyles)},components:k([n.header,n.body],n.footer.toArray()),parts:{blocker:{dom:pB(''),components:[{dom:{tag:"div",classes:_I?[r,r+"--opaque"]:[r]}}]}},dragBlockClass:o,modalBehaviours:rc(k([hg.config({}),fg("dialog-events",n.dialogEvents.concat([cr(lo(),function(t,n){ig.focusIn(t)})])),fg("scroll-lock",[sr(function(){Ri(Ui(),i)}),lr(function(){Pi(Ui(),i)})])],n.extraBehaviours)),eventOrder:lt(((t={})[_o()]=["dialog-events"],t[Po()]=["scroll-lock","dialog-events","alloy.base.behaviour"],t[Ho()]=["alloy.base.behaviour","dialog-events","scroll-lock"],t),n.eventOrder)})},II=function(t){return dp.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close"),title:t.translate("Close")}},components:[{dom:{tag:"div",classes:["tox-icon"],innerHtml:pp("close",t.icons)}}],action:function(t){Yo(t,nx)}})},RI=function(t,n,e){var o=function(t){return[lu(e.translate(t.title))]};return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:lt({},n.map(function(t){return{id:t}}).getOr({}))},components:o(t),behaviours:rc([rE.config({channel:wI,renderComponents:o})])}},VI=function(){return{dom:pB('')}},PI=function(t,n){return e={title:n.shared.providers.translate(t),draggable:n.dialog.isDraggableModal()},o=n.shared.providers,r=AM.parts.title(RI(e,ft.none(),o)),i=AM.parts.draghandle(VI()),u=AM.parts.close(II(o)),a=[r].concat(e.draggable?[i]:[]).concat([u]),Ny.sketch({dom:pB(''),components:a});var e,o,r,i,u,a},HI=function(t,n,e){return{dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":e.translate(t)},styles:{left:"0px",right:"0px",bottom:"0px",top:"0px",position:"absolute"}},behaviours:n,components:[{dom:pB('')}]}},zI=function(t,o,n){return{onClose:function(){return n.closeWindow()},onBlock:function(e){AM.setBusy(t(),function(t,n){return HI(e.message,n,o)})},onUnblock:function(){AM.setIdle(t())}}},NI=function(t,n,e,o){var r;return mu(FI(lt(lt({},t),{lazySink:o.shared.getSink,extraBehaviours:k([rE.config({channel:xI,updateState:function(t,n){return ft.some(n)},initialData:n}),bk({})],t.extraBehaviours),onEscape:function(t){Yo(t,nx)},dialogEvents:e,eventOrder:((r={})[Oo()]=[rE.name(),lc.name()],r[Po()]=["scroll-lock",rE.name(),"messages","dialog-events","alloy.base.behaviour"],r[Ho()]=["alloy.base.behaviour","dialog-events","messages",rE.name(),"scroll-lock"],r)})))},LI=function(t){return V(t,function(t){return"menu"===t.type?(e=V((n=t).items,function(t){var n=fe(!1);return lt(lt({},t),{storage:n})}),lt(lt({},n),{items:e})):t;var n,e})},jI=function(t){return N(t,function(t,n){return"menu"!==n.type?t:N(n.items,function(t,n){return t[n.name]=n.storage,t},t)},{})},UI=function(t,e){return[ur(lo(),Ok),t(tx,function(t,n){e.onClose(),n.onClose()}),t(nx,function(t,n,e,o){n.onCancel(t),Yo(o,tx)}),er(ix,function(t,n){return e.onUnblock()}),er(rx,function(t,n){return e.onBlock(n.event)})]},WI=function(i,t){var n=function(t,r){return er(t,function(e,o){u(e,function(t,n){r(i(),t,o.event,e)})})},u=function(n,e){rE.getState(n).get().each(function(t){e(t,n)})};return k(UI(n,t),[n(ex,function(t,n,e){n.onAction(t,{name:e.name})})])},GI=function(i,t,c){var n=function(t,r){return er(t,function(e,o){u(e,function(t,n){r(i(),t,o.event,e)})})},u=function(n,e){rE.getState(n).get().each(function(t){e(t.internalDialog,n)})};return k(UI(n,t),[n(ox,function(t,n){return n.onSubmit(t)}),n(Zy,function(t,n,e){n.onChange(t,{name:e.name})}),n(ex,function(t,n,e,o){var r=function(){return ig.focusIn(o)},i=function(t){return Jr(t,"disabled")||Kr(t,"aria-disabled").exists(function(t){return"true"===t})},u=Ar(o.element),a=mc(u);n.onAction(t,{name:e.name,value:e.value}),mc(u).fold(r,function(n){i(n)||a.exists(function(t){return Ye(n,t)&&i(t)})?r():c().toOptional().filter(function(t){return!Ye(t.element,n)}).each(r)})}),n(ux,function(t,n,e){n.onTabChange(t,{newTabName:e.name,oldTabName:e.oldName})}),lr(function(t){var n=i();Ll.setValue(t,n.getData())})])},XI=function(t,n){var e=n.map(function(t){return t.footerButtons}).getOr([]),o=P(e,function(t){return"start"===t.align}),r=function(t,n){return Ny.sketch({dom:{tag:"div",classes:["tox-dialog__footer-"+t]},components:V(n,function(t){return t.memento.asSpec()})})};return[r("start",o.pass),r("end",o.fail)]},YI=function(t,i){return{dom:pB(''),components:[],behaviours:rc([rE.config({channel:kI,initialData:t,updateState:function(t,n){var r=V(n.buttons,function(t){var n,e,o=mp((e=i,JC(n=t,n.type,e)));return{name:t.name,align:t.align,memento:o}});return ft.some({lookupByName:function(t,n){return e=t,o=n,L(r,function(t){return t.name===o}).bind(function(t){return t.memento.getOpt(e)});var e,o},footerButtons:r})},renderComponents:XI})])}},qI=YI,KI=function(t,n){return AM.parts.footer(YI(t,n))},JI=function(n,e){if(n.getRoot().getSystem().isConnected()){var o=Zf.getCurrent(n.getFormWrapper()).getOr(n.getFormWrapper());return $S.getField(o,e).fold(function(){var t=n.getFooter();return rE.getState(t).get().bind(function(t){return t.lookupByName(o,e)})},function(t){return ft.some(t)})}return ft.none()},$I=function(c,o,s){var t=function(t){var n=c.getRoot();n.getSystem().isConnected()&&t(n)},l={getData:function(){var t=c.getRoot(),n=t.getSystem().isConnected()?c.getFormWrapper():t,e=Ll.getValue(n),o=Tt(s,function(t){return t.get()});return lt(lt({},e),o)},setData:function(a){t(function(t){var n,e,o=l.getData(),r=lt(lt({},o),a),i=(n=r,e=c.getRoot(),rE.getState(e).get().map(function(t){return Tn(_n("data",t.dataValidator,n))}).getOr(n)),u=c.getFormWrapper();Ll.setValue(u,i),_t(s,function(t,n){It(r,n)&&t.set(r[n])})})},disable:function(t){JI(c,t).each(mv.disable)},enable:function(t){JI(c,t).each(mv.enable)},focus:function(t){JI(c,t).each(hg.focus)},block:function(n){if(!C(n))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");t(function(t){qo(t,rx,{message:n})})},unblock:function(){t(function(t){Yo(t,ix)})},showTab:function(e){t(function(t){var n=c.getBody();rE.getState(n).get().exists(function(t){return t.isTabPanel()})&&Zf.getCurrent(n).each(function(t){mI.showTab(t,e)})})},redial:function(e){t(function(t){var n=o(e);t.getSystem().broadcastOn([xI],n),t.getSystem().broadcastOn([wI],n.internalDialog),t.getSystem().broadcastOn([SI],n.internalDialog),t.getSystem().broadcastOn([kI],n.internalDialog),l.setData(n.initialData)})},close:function(){t(function(t){Yo(t,tx)})}};return l},QI=function(t,n,e){var o,r,i,u=PI(t.internalDialog.title,e),a=(o={body:t.internalDialog.body},r=e,i=OI(o,ft.none(),r,!1),AM.parts.body(i)),c=LI(t.internalDialog.buttons),s=jI(c),l=KI({buttons:c},e),f=GI(function(){return p},zI(function(){return g},e.shared.providers,n),e.shared.getSink),d=function(t){switch(t){case"large":return["tox-dialog--width-lg"];case"medium":return["tox-dialog--width-md"];default:return[]}}(t.internalDialog.size),m={header:u,body:a,footer:ft.some(l),extraClasses:d,extraBehaviours:[],extraStyles:{}},g=NI(m,t,f,e),p=$I({getRoot:function(){return g},getBody:function(){return AM.getBody(g)},getFooter:function(){return AM.getFooter(g)},getFormWrapper:function(){var t=AM.getBody(g);return Zf.getCurrent(t).getOr(t)}},n.redial,s);return{dialog:g,instanceApi:p}},ZI=function(t,n,o,e){var r,i,u,a,c,s,l,f,d,m=oi("dialog-label"),g=oi("dialog-content"),p=mp((u={title:t.internalDialog.title,draggable:!0},a=m,c=o.shared.providers,Ny.sketch({dom:pB(''),components:[RI(u,ft.some(a),c),VI(),II(c)],containerBehaviours:rc([mM.config({mode:"mouse",blockerClass:"blocker",getTarget:function(t){return Ku(t,'[role="dialog"]').getOrDie()},snaps:{getSnapPoints:function(){return[]},leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])}))),h=mp((s={body:t.internalDialog.body},l=g,f=o,d=e,OI(s,ft.some(l),f,d))),v=LI(t.internalDialog.buttons),b=jI(v),y=mp(qI({buttons:v},o)),x=GI(function(){return S},{onBlock:function(e){BM.block(w,function(t,n){return HI(e.message,n,o.shared.providers)})},onUnblock:function(){BM.unblock(w)},onClose:function(){return n.closeWindow()}},o.shared.getSink),w=mu({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline"],attributes:((r={role:"dialog"})["aria-labelledby"]=m,r["aria-describedby"]=""+g,r)},eventOrder:((i={})[Oo()]=[rE.name(),lc.name()],i[_o()]=["execute-on-form"],i[Po()]=["reflecting","execute-on-form"],i),behaviours:rc([ig.config({mode:"cyclic",onEscape:function(t){return Yo(t,tx),ft.some(!0)},useTabstopAt:function(t){return!_k(t)&&("button"!==mr(t)||"disabled"!==qr(t,"disabled"))}}),rE.config({channel:xI,updateState:function(t,n){return ft.some(n)},initialData:t}),hg.config({}),fg("execute-on-form",x.concat([cr(lo(),function(t,n){ig.focusIn(t)})])),BM.config({getRoot:function(){return ft.some(w)}}),lg.config({}),bk({})]),components:[p.asSpec(),h.asSpec(),y.asSpec()]}),S=$I({getRoot:function(){return w},getFooter:function(){return y.get(w)},getBody:function(){return h.get(w)},getFormWrapper:function(){var t=h.get(w);return Zf.getCurrent(t).getOr(t)}},n.redial,b);return{dialog:w,instanceApi:S}},tR=tinymce.util.Tools.resolve("tinymce.util.URI"),nR=["insertContent","setContent","execCommand","close","block","unblock"],eR=function(t){return O(t)&&-1!==nR.indexOf(t.mceAction)},oR=function(o,t,r,n){var e,i,u,a,c=PI(o.title,n),s=(i={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[kk({dom:{tag:"iframe",attributes:{src:o.url}},behaviours:rc([Yy.config({}),hg.config({})])})]}],behaviours:rc([ig.config({mode:"acyclic",useTabstopAt:x(_k)})])},AM.parts.body(i)),l=o.buttons.bind(function(t){return 0===t.length?ft.none():ft.some(KI({buttons:t},n))}),f=WI(function(){return y},zI(function(){return b},n.shared.providers,t)),d=lt(lt({},o.height.fold(function(){return{}},function(t){return{height:t+"px","max-height":t+"px"}})),o.width.fold(function(){return{}},function(t){return{width:t+"px","max-width":t+"px"}})),m=o.width.isNone()&&o.height.isNone()?["tox-dialog--width-lg"]:[],g=new tR(o.url,{base_uri:new tR(window.location.href)}),p=g.protocol+"://"+g.host+(g.port?":"+g.port:""),h=fe(ft.none()),v=[fg("messages",[sr(function(){var t=Sy(me.fromDom(window),"message",function(t){var n,e;g.isSameOrigin(new tR(t.raw.origin))&&(n=t.raw.data,eR(n)?function(t,n,e){switch(e.mceAction){case"insertContent":t.insertContent(e.content);break;case"setContent":t.setContent(e.content);break;case"execCommand":var o=!!_(e.ui)&&e.ui;t.execCommand(e.cmd,o,e.value);break;case"close":n.close();break;case"block":n.block(e.message);break;case"unblock":n.unblock()}}(r,y,n):!eR(e=n)&&O(e)&&It(e,"mceAction")&&o.onMessage(y,n))});h.set(ft.some(t))}),lr(function(){h.get().each(function(t){return t.unbind()})})]),lc.config({channels:((e={})[CI]={onReceive:function(t,n){qu(t.element,"iframe").each(function(t){t.dom.contentWindow.postMessage(n,p)})}},e)})],b=NI({header:c,body:s,footer:l,extraClasses:m,extraBehaviours:v,extraStyles:d},o,f,n),y=(a=function(t){u.getSystem().isConnected()&&t(u)},{block:function(n){if(!C(n))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");a(function(t){qo(t,rx,{message:n})})},unblock:function(){a(function(t){Yo(t,ix)})},close:function(){a(function(t){Yo(t,tx)})},sendMessage:function(n){a(function(t){t.getSystem().broadcastOn([CI],n)})}});return{dialog:u=b,instanceApi:y}},rR=function(t){var c,s,l,f,p=t.backstage,h=t.editor,v=Rv(h),e=(s=(c=t).backstage.shared,{open:function(t,n){var e=function(){AM.hide(u),n()},o=mp(JC({name:"close-alert",text:"OK",primary:!0,align:"end",disabled:!1,icon:ft.none()},"cancel",c.backstage)),r=DI(),i=EI(e,s.providers),u=mu(FI({lazySink:function(){return s.getSink()},header:TI(r,i),body:BI(t,s.providers),footer:ft.some(AI(MI([],[o.asSpec()]))),onEscape:e,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[er(nx,e)],eventOrder:{}}));AM.show(u);var a=o.get(u);hg.focus(a)}}),o=(f=(l=t).backstage.shared,{open:function(t,n){var e=function(t){AM.hide(a),n(t)},o=mp(JC({name:"yes",text:"Yes",primary:!0,align:"end",disabled:!1,icon:ft.none()},"submit",l.backstage)),r=JC({name:"no",text:"No",primary:!1,align:"end",disabled:!1,icon:ft.none()},"cancel",l.backstage),i=DI(),u=EI(function(){return e(!1)},f.providers),a=mu(FI({lazySink:function(){return f.getSink()},header:TI(i,u),body:BI(t,f.providers),footer:ft.some(AI(MI([],[r,o.asSpec()]))),onEscape:function(){return e(!1)},extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[er(nx,function(){return e(!1)}),er(ox,function(){return e(!0)})],eventOrder:{}}));AM.show(a);var c=o.get(a);hg.focus(c)}}),r=function(t,e){return nI.openUrl(function(t){var n=oR(t,{closeWindow:function(){AM.hide(n.dialog),e(n.instanceApi)}},h,p);return AM.show(n.dialog),n.instanceApi},t)},i=function(t,i){return nI.open(function(t,n,e){var o=n,r=QI({dataValidator:e,initialData:o,internalDialog:t},{redial:nI.redial,closeWindow:function(){AM.hide(r.dialog),i(r.instanceApi)}},p);return AM.show(r.dialog),r.instanceApi.setData(o),r.instanceApi},t)},u=function(t,d,m,g){return nI.open(function(t,n,e){var o,r,i,u=Tn(_n("data",e,n)),a=(o=fe(ft.none()),{clear:function(){return o.set(ft.none())},set:function(t){return o.set(ft.some(t))},isSet:function(){return o.get().isSome()},on:function(t){return o.get().each(t)}}),c=p.shared.header.isPositionedAtTop(),s=function(){return a.on(function(t){Zg.reposition(t),XD.refresh(t)})},l=ZI({dataValidator:e,initialData:u,internalDialog:t},{redial:nI.redial,closeWindow:function(){a.on(Zg.hide),h.off("ResizeEditor",s),a.clear(),m(l.instanceApi)}},p,g),f=mu(Zg.sketch(lt(lt({lazySink:p.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{}},c?{}:{fireRepositionEventInstead:{}}),{inlineBehaviours:rc(k([fg("window-manager-inline-events",[er(zo(),function(t,n){Yo(l.dialog,nx)})])],(r=h,i=c,v&&i?[]:[XD.config({contextual:{lazyContext:function(){return ft.some(Hu(me.fromDom(r.getContentAreaContainer())))},fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"]})]))),isExtraPart:function(t,n){return Oy(e=n,".tox-alert-dialog")||Oy(e,".tox-confirm-dialog");var e}})));return a.set(f),Zg.showWithin(f,d,gu(l.dialog),ft.some(Ui())),v&&c||(XD.refresh(f),h.on("ResizeEditor",s)),l.instanceApi.setData(u),ig.focusIn(l.dialog),l.instanceApi},t)};return{open:function(t,n,e){return n!==undefined&&"toolbar"===n.inline?u(t,p.shared.anchors.inlineDialog(),e,n.ariaAttrs):n!==undefined&&"cursor"===n.inline?u(t,p.shared.anchors.cursor(),e,n.ariaAttrs):i(t,e)},openUrl:function(t,n){return r(t,n)},alert:function(t,n){e.open(t,function(){n()})},close:function(t){t.close()},confirm:function(t,n){o.open(t,function(t){n(t)})}}};t.add("silver",function(t){var n=CM(t),e=n.uiMothership,o=n.backstage,r=n.renderUI,i=n.getUi;xy(t,o.shared);var u=rR({editor:t,backstage:o});return{renderUI:r,getWindowManagerImpl:ct(u),getNotificationManagerImpl:function(){return bp(0,{backstage:o},e)},ui:i()}})}();
\ No newline at end of file
diff --git a/cps/static/js/libs/tinymce/tinymce.min.js b/cps/static/js/libs/tinymce/tinymce.min.js
index 9f630631..71351c4e 100644
--- a/cps/static/js/libs/tinymce/tinymce.min.js
+++ b/cps/static/js/libs/tinymce/tinymce.min.js
@@ -4,6 +4,6 @@
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
- * Version: 5.1.5 (2019-12-19)
+ * Version: 5.7.1 (2021-03-17)
*/
-!function(j){"use strict";function i(){}var q=function(n,r){return function(){for(var e=[],t=0;t=i.length&&n(r)}}(t))})})}var Ft,Ut,jt,qt=Lt.exports.boltExport,$t=function(e){var n=k.none(),t=[],r=function(e){o()?a(e):t.push(e)},o=function(){return n.isSome()},i=function(e){z(e,a)},a=function(t){n.each(function(e){j.setTimeout(function(){t(e)},0)})};return e(function(e){n=k.some(e),i(t),t=[]}),{get:r,map:function(n){return $t(function(t){r(function(e){t(n(e))})})},isReady:o}},Wt={nu:$t,pure:function(t){return $t(function(e){e(t)})}},Kt=function(n){function e(e){n().then(e,Vt)}return{map:function(e){return Kt(function(){return n().then(e)})},bind:function(t){return Kt(function(){return n().then(function(e){return t(e).toPromise()})})},anonBind:function(e){return Kt(function(){return n().then(function(){return e.toPromise()})})},toLazy:function(){return Wt.nu(e)},toCached:function(){var e=null;return Kt(function(){return null===e&&(e=n()),e})},toPromise:n,get:e}},Xt={nu:function(e){return Kt(function(){return new qt(e)})},pure:function(e){return Kt(function(){return qt.resolve(e)})}},Yt=function(e){return It(e,Xt.nu)},Gt=function(n){return{is:function(e){return n===e},isValue:a,isError:c,getOr:$(n),getOrThunk:$(n),getOrDie:$(n),or:function(e){return Gt(n)},orThunk:function(e){return Gt(n)},fold:function(e,t){return t(n)},map:function(e){return Gt(e(n))},mapError:function(e){return Gt(n)},each:function(e){e(n)},bind:function(e){return e(n)},exists:function(e){return e(n)},forall:function(e){return e(n)},toOption:function(){return k.some(n)}}},Jt=function(n){return{is:c,isValue:c,isError:a,getOr:W,getOrThunk:function(e){return e()},getOrDie:function(){return function(e){return function(){throw new Error(e)}}(String(n))()},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,t){return e(n)},map:function(e){return Jt(n)},mapError:function(e){return Jt(e(n))},each:i,bind:function(e){return Jt(n)},exists:c,forall:a,toOption:k.none}},Qt={value:Gt,error:Jt,fromOption:function(e,t){return e.fold(function(){return Jt(t)},Gt)}},Zt=window.Promise?window.Promise:(Ft=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Ut=tn.immediateFn||"function"==typeof j.setImmediate&&j.setImmediate||function(e){j.setTimeout(e,1)},tn.prototype["catch"]=function(e){return this.then(null,e)},tn.prototype.then=function(n,r){var o=this;return new tn(function(e,t){nn.call(o,new un(n,r,e,t))})},tn.all=function(){var s=Array.prototype.slice.call(1===arguments.length&&Ft(arguments[0])?arguments[0]:arguments);return new tn(function(o,i){if(0===s.length)return o([]);var a=s.length;function u(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){u(t,e)},i)}s[t]=e,0==--a&&o(s)}catch(r){i(r)}}for(var e=0;e\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Jn=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Qn=/[<>&\"\']/g,Zn=/([a-z0-9]+);?|&([a-z0-9]+);/gi,er={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};Hn={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},Pn={"<":"<",">":">","&":"&",""":'"',"'":"'"};function tr(e,t){var n,r,o,i={};if(e){for(e=e.split(","),t=t||10,n=0;n>10),56320+(1023&t))):er[t]||String.fromCharCode(t):Pn[e]||On[e]||function(e){var t;return(t=yt.fromTag("div").dom()).innerHTML=e,t.textContent||t.innerText||e}(e)})}},ar={},ur={},sr=Mn.makeMap,cr=Mn.each,lr=Mn.extend,fr=Mn.explode,dr=Mn.inArray,hr=function(e,t){return(e=Mn.trim(e))?e.split(t||" "):[]},mr=function(e){function t(e,t,n){function r(e,t){var n,r,o={};for(n=0,r=e.length;n]*>","gi")});function N(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")}function y(e){var t,n,r,o,i,a,u,s,c,l,f,d,h,m,g,p,v,y,b,C=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,w=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,x=/[*?+]/;if(e)for(e=hr(e,","),z["@"]&&(p=z["@"].attributes,v=z["@"].attributesOrder),t=0,n=e.length;t>10|55296,1023&r|56320)}var Mr,Rr,Dr,_r,Br,Or,Hr,Pr,Lr,Vr,Ir,Fr,Ur,jr,qr,$r,Wr,Kr,Xr="sizzle"+-new Date,Yr=j.window.document,Gr=0,Jr=0,Qr=Mo(),Zr=Mo(),eo=Mo(),to=function(e,t){return e===t&&(Ir=!0),0},no=typeof undefined,ro={}.hasOwnProperty,oo=[],io=oo.pop,ao=oo.push,uo=oo.push,so=oo.slice,co=oo.indexOf||function(e){for(var t=0,n=this.length;t+~]|"+lo+")"+lo+"*"),yo=new RegExp("="+lo+"*([^\\]'\"]*?)"+lo+"*\\]","g"),bo=new RegExp(mo),Co=new RegExp("^"+fo+"$"),wo={ID:new RegExp("^#("+fo+")"),CLASS:new RegExp("^\\.("+fo+")"),TAG:new RegExp("^("+fo+"|[*])"),ATTR:new RegExp("^"+ho),PSEUDO:new RegExp("^"+mo),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+lo+"*(even|odd|(([+-]|)(\\d*)n|)"+lo+"*(?:([+-]|)"+lo+"*(\\d+)|))"+lo+"*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^"+lo+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+lo+"*((?:-\\d)?\\d*)"+lo+"*\\)|)(?=[^-]|$)","i")},xo=/^(?:input|select|textarea|button)$/i,zo=/^h\d$/i,Eo=/^[^{]+\{\s*\[native \w/,No=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,So=/[+~]/,ko=/'|\\/g,To=new RegExp("\\\\([\\da-f]{1,6}"+lo+"?|("+lo+")|.)","ig");try{uo.apply(oo=so.call(Yr.childNodes),Yr.childNodes),oo[Yr.childNodes.length].nodeType}catch(yN){uo={apply:oo.length?function(e,t){ao.apply(e,so.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}var Ao=function(e,t,n,r){var o,i,a,u,s,c,l,f,d,h;if((t?t.ownerDocument||t:Yr)!==Ur&&Fr(t),n=n||[],!e||"string"!=typeof e)return n;if(1!==(u=(t=t||Ur).nodeType)&&9!==u)return[];if(qr&&!r){if(o=No.exec(e))if(a=o[1]){if(9===u){if(!(i=t.getElementById(a))||!i.parentNode)return n;if(i.id===a)return n.push(i),n}else if(t.ownerDocument&&(i=t.ownerDocument.getElementById(a))&&Kr(t,i)&&i.id===a)return n.push(i),n}else{if(o[2])return uo.apply(n,t.getElementsByTagName(e)),n;if((a=o[3])&&Rr.getElementsByClassName)return uo.apply(n,t.getElementsByClassName(a)),n}if(Rr.qsa&&(!$r||!$r.test(e))){if(f=l=Xr,d=t,h=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){for(c=Or(e),(l=t.getAttribute("id"))?f=l.replace(ko,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",s=c.length;s--;)c[s]=f+Lo(c[s]);d=So.test(e)&&Ho(t.parentNode)||t,h=c.join(",")}if(h)try{return uo.apply(n,d.querySelectorAll(h)),n}catch(m){}finally{l||t.removeAttribute("id")}}}return Pr(e.replace(go,"$1"),t,n,r)};function Mo(){var n=[];return function r(e,t){return n.push(e+" ")>Dr.cacheLength&&delete r[n.shift()],r[e+" "]=t}}function Ro(e){return e[Xr]=!0,e}function Do(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function _o(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function Bo(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function Oo(a){return Ro(function(i){return i=+i,Ro(function(e,t){for(var n,r=a([],e.length,i),o=r.length;o--;)e[n=r[o]]&&(e[n]=!(t[n]=e[n]))})})}function Ho(e){return e&&typeof e.getElementsByTagName!=no&&e}for(Mr in Rr=Ao.support={},Br=Ao.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},Fr=Ao.setDocument=function(e){var t,s=e?e.ownerDocument||e:Yr,n=s.defaultView;return s!==Ur&&9===s.nodeType&&s.documentElement?(jr=(Ur=s).documentElement,qr=!Br(s),n&&n!==function r(e){try{return e.top}catch(t){}return null}(n)&&(n.addEventListener?n.addEventListener("unload",function(){Fr()},!1):n.attachEvent&&n.attachEvent("onunload",function(){Fr()})),Rr.attributes=!0,Rr.getElementsByTagName=!0,Rr.getElementsByClassName=Eo.test(s.getElementsByClassName),Rr.getById=!0,Dr.find.ID=function(e,t){if(typeof t.getElementById!=no&&qr){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},Dr.filter.ID=function(e){var t=e.replace(To,Ar);return function(e){return e.getAttribute("id")===t}},Dr.find.TAG=Rr.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!=no)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"!==e)return i;for(;n=i[o++];)1===n.nodeType&&r.push(n);return r},Dr.find.CLASS=Rr.getElementsByClassName&&function(e,t){if(qr)return t.getElementsByClassName(e)},Wr=[],$r=[],Rr.disconnectedMatch=!0,$r=$r.length&&new RegExp($r.join("|")),Wr=Wr.length&&new RegExp(Wr.join("|")),t=Eo.test(jr.compareDocumentPosition),Kr=t||Eo.test(jr.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},to=t?function(e,t){if(e===t)return Ir=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!Rr.sortDetached&&t.compareDocumentPosition(e)===n?e===s||e.ownerDocument===Yr&&Kr(Yr,e)?-1:t===s||t.ownerDocument===Yr&&Kr(Yr,t)?1:Vr?co.call(Vr,e)-co.call(Vr,t):0:4&n?-1:1)}:function(e,t){if(e===t)return Ir=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,a=[e],u=[t];if(!o||!i)return e===s?-1:t===s?1:o?-1:i?1:Vr?co.call(Vr,e)-co.call(Vr,t):0;if(o===i)return Do(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?Do(a[r],u[r]):a[r]===Yr?-1:u[r]===Yr?1:0},s):Ur},Ao.matches=function(e,t){return Ao(e,null,null,t)},Ao.matchesSelector=function(e,t){if((e.ownerDocument||e)!==Ur&&Fr(e),t=t.replace(yo,"='$1']"),Rr.matchesSelector&&qr&&(!Wr||!Wr.test(t))&&(!$r||!$r.test(t)))try{var n=(void 0).call(e,t);if(n||Rr.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(yN){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(To,Ar),e[3]=(e[3]||e[4]||e[5]||"").replace(To,Ar),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||Ao.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&Ao.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return wo.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&bo.test(n)&&(t=Or(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(To,Ar).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=Qr[e+" "];return t||(t=new RegExp("(^|"+lo+")"+e+"("+lo+"|$)"))&&Qr(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!=no&&e.getAttribute("class")||"")})},ATTR:function(n,r,o){return function(e){var t=Ao.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===o:"!="===r?t!==o:"^="===r?o&&0===t.indexOf(o):"*="===r?o&&-1)[^>]*$|#([\w\-]*)$)/,ri=kr.Event,oi=Mn.makeMap("children,contents,next,prev"),ii=function(e,t,n,r){var o;if($o(t))t=Wo(t,hi(e[0]));else if(t.length&&!t.nodeType){if(t=vi.makeArray(t),r)for(o=t.length-1;0<=o;o--)ii(e,t[o],n,r);else for(o=0;o"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:ni.exec(e)))return vi(t).find(e);if(n[1])for(r=Wo(e,hi(t)).firstChild;r;)ei.call(o,r),r=r.nextSibling;else{if(!(r=hi(t).getElementById(n[2])))return o;if(r.id!==n[2])return o.find(e);o.length=1,o[0]=r}}else this.add(e,!1);return o},toArray:function(){return Mn.toArray(this)},add:function(e,t){var n,r;if($o(e))return this.add(vi(e));if(!1!==t)for(n=vi.unique(this.toArray().concat(vi.makeArray(e))),this.length=n.length,r=0;r"+r,t.removeChild(t.firstChild)}catch(n){vi("").html("
"+r).contents().slice(1).appendTo(t)}return r}}):t.html(r)}function w(e,n,r,o,i){return y(e,function(e){var t="string"==typeof n?a.createElement(n):n;return b(t,r),o&&("string"!=typeof o&&o.nodeType?t.appendChild(o):"string"==typeof o&&C(t,o)),i?t:e.appendChild(t)})}function x(e,t,n){return w(a.createElement(e),e,t,n,!0)}function z(e,t){var n=f(e);return t?n.each(function(){for(var e;e=this.firstChild;)3===e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}).remove():n.remove(),1"+n+""+e+">":o+" />"},createFragment:function(e){var t,n=a.createElement("div"),r=a.createDocumentFragment();for(e&&(n.innerHTML=e);t=n.firstChild;)r.appendChild(t);return r},remove:z,setStyle:function(e,t,n){var r=K(t)?f(e).css(t,n):f(e).css(t);u.update_styles&&$i(_,r)},getStyle:m,setStyles:function(e,t){var n=f(e).css(t);u.update_styles&&$i(_,n)},removeAllAttribs:function(e){return y(e,function(e){var t,n=e.attributes;for(t=n.length-1;0<=t;t--)e.removeAttributeNode(n.item(t))})},setAttrib:o,setAttribs:b,getAttrib:r,getPos:i,parseStyle:function(e){return _.parse(e)},serializeStyle:function(e,t){return _.serialize(e,t)},addStyle:function(e){var t,n;if(F!==Ki.DOM&&a===j.document){if(T[e])return;T[e]=!0}(n=a.getElementById("mceDefaultStyles"))||((n=a.createElement("style")).id="mceDefaultStyles",n.type="text/css",(t=a.getElementsByTagName("head")[0]).firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(a.createTextNode(e))},loadCSS:function(e){var n;F===Ki.DOM||a!==j.document?(e=e||"",n=a.getElementsByTagName("head")[0],Vi(e.split(","),function(e){var t;e=Mn._addCacheSuffix(e),M[e]||(M[e]=!0,t=x("link",G(G({rel:"stylesheet",type:"text/css",href:e},u.contentCssCors?{crossOrigin:"anonymous"}:{}),u.referrerPolicy?{referrerPolicy:u.referrerPolicy}:{})),n.appendChild(t))})):Ki.DOM.loadCSS(e)},addClass:function(e,t){f(e).addClass(t)},removeClass:function(e,t){E(e,t,!1)},hasClass:function(e,t){return f(e).hasClass(t)},toggleClass:E,show:function(e){f(e).show()},hide:function(e){f(e).hide()},isHidden:function(e){return"none"===f(e).css("display")},uniqueId:function(e){return(e||"mce_")+t++},setHTML:C,getOuterHTML:function(e){var t="string"==typeof e?l(e):e;return Ge.isElement(t)?t.outerHTML:vi("").append(vi(t).clone()).html()},setOuterHTML:function(e,t){f(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}z(vi(this).html(t),!0)})},decode:P,encode:L,insertAfter:function(e,t){var r=l(t);return y(e,function(e){var t,n;return t=r.parentNode,(n=r.nextSibling)?t.insertBefore(e,n):t.appendChild(e),e})},replace:N,rename:function(t,e){var n;return t.nodeName!==e.toUpperCase()&&(n=x(e),Vi(d(t),function(e){o(n,e.nodeName,r(t,e.nodeName))}),N(n,t,!0)),n||t},findCommonAncestor:function(e,t){for(var n,r=e;r;){for(n=t;n&&r!==n;)n=n.parentNode;if(r===n)break;r=r.parentNode}return!r&&e.ownerDocument?e.ownerDocument.documentElement:r},toHex:function(e){return _.toHex(Mn.trim(e))},run:y,getAttribs:d,isEmpty:function(e,t){var n,r,o,i,a=0;if(e=e.firstChild){var u=new yi(e,e.parentNode),s=D?D.getWhiteSpaceElements():{};t=t||(D?D.getNonEmptyElements():null);do{if(o=e.nodeType,Ge.isElement(e)){var c=e.getAttribute("data-mce-bogus");if(c){e=u.next("all"===c);continue}if(i=e.nodeName.toLowerCase(),t&&t[i]){if("br"!==i)return!1;a++,e=u.next();continue}for(n=(r=d(e)).length;n--;)if("name"===(i=r[n].nodeName)||"data-mce-bookmark"===i)return!1}if(8===o)return!1;if(3===o&&!ji.test(e.nodeValue))return!1;if(3===o&&e.parentNode&&s[e.parentNode.nodeName]&&ji.test(e.nodeValue))return!1;e=u.next()}while(e)}return a<=1},createRng:S,nodeIndex:Wi,split:function(e,t,n){var r,o,i,a=S();if(e&&t)return a.setStart(e.parentNode,Wi(e)),a.setEnd(t.parentNode,Wi(t)),r=a.extractContents(),(a=S()).setStart(t.parentNode,Wi(t)+1),a.setEnd(e.parentNode,Wi(e)+1),o=a.extractContents(),(i=e.parentNode).insertBefore(Xn.trimNode(F,r),e),n?i.insertBefore(n,e):i.insertBefore(t,e),i.insertBefore(Xn.trimNode(F,o),e),z(e),n||t},bind:V,unbind:I,fire:function(e,t,n){return B.fire(e,t,n)},getContentEditable:k,getContentEditableParent:function(e){for(var t=h(),n=null;e&&e!==t&&null===(n=k(e));e=e.parentNode);return n},destroy:function(){if(R)for(var e=R.length;e--;){var t=R[e];B.unbind(t[0],t[1],t[2])}Ao.setDocument&&Ao.setDocument()},isChildOf:function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset}};return s=qi(_,u,function(){return F}),F}(Ri=Ki=Ki||{}).DOM=Ri(j.document),Ri.nodeIndex=Wi;var Xi=Ki,Yi=Xi.DOM,Gi=Mn.each,Ji=Mn.grep,Qi=(Zi.prototype._setReferrerPolicy=function(e){this.settings.referrerPolicy=e},Zi.prototype.loadScript=function(e,t,n){var r,o,i=Yi;o=i.uniqueId(),(r=j.document.createElement("script")).id=o,r.type="text/javascript",r.src=Mn._addCacheSuffix(e),this.settings.referrerPolicy&&i.setAttrib(r,"referrerpolicy",this.settings.referrerPolicy),r.onload=function(){i.remove(o),r&&(r.onreadystatechange=r.onload=r=null),t()},r.onerror=function(){D(n)?n():"undefined"!=typeof j.console&&j.console.log&&j.console.log("Failed to load script: "+e)},(j.document.getElementsByTagName("head")[0]||j.document.body).appendChild(r)},Zi.prototype.isDone=function(e){return 2===this.states[e]},Zi.prototype.markDone=function(e){this.states[e]=2},Zi.prototype.add=function(e,t,n,r){this.states[e]===undefined&&(this.queue.push(e),this.states[e]=0),t&&(this.scriptLoadedCallbacks[e]||(this.scriptLoadedCallbacks[e]=[]),this.scriptLoadedCallbacks[e].push({success:t,failure:r,scope:n||this}))},Zi.prototype.load=function(e,t,n,r){return this.add(e,t,n,r)},Zi.prototype.remove=function(e){delete this.states[e],delete this.scriptLoadedCallbacks[e]},Zi.prototype.loadQueue=function(e,t,n){this.loadScripts(this.queue,e,t,n)},Zi.prototype.loadScripts=function(n,e,t,r){function o(t,e){Gi(a.scriptLoadedCallbacks[e],function(e){D(e[t])&&e[t].call(e.scope)}),a.scriptLoadedCallbacks[e]=undefined}var i,a=this,u=[];a.queueLoadedCallbacks.push({success:e,failure:r,scope:t||this}),(i=function(){var e=Ji(n);if(n.length=0,Gi(e,function(e){2!==a.states[e]?3!==a.states[e]?1!==a.states[e]&&(a.states[e]=1,a.loading++,a.loadScript(e,function(){a.states[e]=2,a.loading--,o("success",e),i()},function(){a.states[e]=3,a.loading--,u.push(e),o("failure",e),i()})):o("failure",e):o("success",e)}),!a.loading){var t=a.queueLoadedCallbacks.slice(0);a.queueLoadedCallbacks.length=0,Gi(t,function(e){0===u.length?D(e.success)&&e.success.call(e.scope):D(e.failure)&&e.failure.call(e.scope,u)})}})()},Zi.ScriptLoader=new Zi,Zi);function Zi(e){void 0===e&&(e={}),this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=0,this.settings=e}var ea,ta={},na=Je("en"),ra={getData:function(){return se(ta,function(e){return G({},e)})},setCode:function(e){e&&na.set(e)},getCode:function(){return na.get()},add:function(e,t){var n=ta[e];for(var r in n||(ta[e]=n={}),t)n[r.toLowerCase()]=t[r]},translate:function(e){function r(e){return D(e)?Object.prototype.toString.call(e):a(e)?"":""+e}function t(e){var t=r(e),n=t.toLowerCase();return kt(i,n)?r(i[n]):t}function n(e){return e.replace(/{context:\w+}$/,"")}function o(e){return e}var i=ta[na.get()]||{},a=function(e){return""===e||null===e||e===undefined};if(a(e))return o("");if(function(e){return T(e)&&kt(e,"raw")}(e))return o(r(e.raw));if(function(e){return A(e)&&1t.bottom)&&Ua(t.top-e.bottom,e,t)}function qa(e,t){return e.top>t.bottom||!(e.bottom=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom}function Wa(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset===n+1?t.childNodes[n]:null}function Ka(e,t){return 1===e.nodeType&&e.hasChildNodes()&&(t>=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e}function Xa(e){return"string"==typeof e&&768<=e.charCodeAt(0)&&Nu.test(e)}function Ya(e,t,n){return e.isSome()&&t.isSome()?k.some(n(e.getOrDie(),t.getOrDie())):k.none()}function Ga(e){return e&&/[\r\n\t ]/.test(e)}function Ja(e){return!!e.setStart&&!!e.setEnd}function Qa(e){var t,n=e.startContainer,r=e.startOffset;return!!(Ga(e.toString())&&Bu(n.parentNode)&&Ge.isText(n)&&(t=n.data,Ga(t[r-1])||Ga(t[r+1])))}function Za(e){return 0===e.left&&0===e.right&&0===e.top&&0===e.bottom}function eu(e,t){var n=Fa(e,t);return n.width=1,n.right=n.left+1,n}var tu,nu=$("mce-annotation"),ru=$("data-mce-annotation"),ou=$("data-mce-annotation-uid"),iu=function(e,t){var n=yt.fromDom(e.getBody());return ma(n,"["+ou()+'="'+t+'"]')},au=0,uu="\ufeff",su=function(e){return e===uu},cu=uu,lu=function(e){return e.replace(new RegExp(uu,"g"),"")},fu=Ge.isElement,du=Ge.isText,hu=function(e){return du(e)&&e.data[0]===cu},mu=function(e){return du(e)&&e.data[e.data.length-1]===cu},gu=Ge.isContentEditableTrue,pu=Ge.isContentEditableFalse,vu=Ge.isBr,yu=Ge.isText,bu=Ge.matchNodeNames(["script","style","textarea"]),Cu=Ge.matchNodeNames(["img","input","textarea","hr","iframe","video","audio","object"]),wu=Ge.matchNodeNames(["table"]),xu=Da,zu=function(e){return!1===function(e){return Ge.isElement(e)&&"true"===e.getAttribute("unselectable")}(e)&&pu(e)},Eu=Math.round,Nu=new RegExp("[\u0300-\u036f\u0483-\u0487\u0488-\u0489\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e3-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62-\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c00\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0c81\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc-\u0ccd\u0cd5-\u0cd6\u0ce2-\u0ce3\u0d01\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62-\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1ab0-\u1abd\u1abe\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab-\u1bad\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8-\u1cf9\u1dc0-\u1df5\u1dfc-\u1dff\u200c-\u200d\u20d0-\u20dc\u20dd-\u20e0\u20e1\u20e2-\u20e4\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u302e-\u302f\u3099-\u309a\ua66f\ua670-\ua672\ua674-\ua67d\ua69e-\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\ua9e5\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaa7c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\uff9e-\uff9f]"),Su=[].slice,ku=function(){for(var e=[],t=0;t=t.data.length:n>=t.childNodes.length},isEqual:function(e){return e&&t===e.container()&&n===e.offset()},getNode:function(e){return Lu(t,e?n-1:n)}}}(tu=Uu=Uu||{}).fromRangeStart=function(e){return tu(e.startContainer,e.startOffset)},tu.fromRangeEnd=function(e){return tu(e.endContainer,e.endOffset)},tu.after=function(e){return tu(e.parentNode,Pu(e)+1)},tu.before=function(e){return tu(e.parentNode,Pu(e))},tu.isAbove=function(e,t){return Ya(E(t.getClientRects()),N(e.getClientRects()),ja).getOr(!1)},tu.isBelow=function(e,t){return Ya(N(t.getClientRects()),E(e.getClientRects()),qa).getOr(!1)},tu.isAtStart=function(e){return!!e&&e.isAtStart()},tu.isAtEnd=function(e){return!!e&&e.isAtEnd()},tu.isTextPosition=function(e){return!!e&&Ge.isText(e.container())},tu.isElementPosition=function(e){return!1===tu.isTextPosition(e)};function ju(t){return function(e){return t===e}}function qu(e){return(_s(e)?"text()":e.nodeName.toLowerCase())+"["+function(e){var r,t,n;return r=Ps(Hs(e)),t=kn.findIndex(r,ju(e),e),r=r.slice(0,t+1),n=kn.reduce(r,function(e,t,n){return _s(t)&&_s(r[n-1])&&e++,e},0),r=kn.filter(r,Ge.matchNodeNames([e.nodeName])),(t=kn.findIndex(r,ju(e),e))-n}(e)+"]"}function $u(e,t){var n,r,o,i,a,u=[];return n=t.container(),r=t.offset(),_s(n)?o=function(e,t){for(;(e=e.previousSibling)&&_s(e);)t+=e.data.length;return t}(n,r):(r>=(i=n.childNodes).length?(o="after",r=i.length-1):o="before",n=i[r]),u.push(qu(n)),a=function(e,t,n){var r=[];for(t=t.parentNode;t!==e&&(!n||!n(t));t=t.parentNode)r.push(t);return r}(e,n),a=kn.filter(a,s(Ge.isBogus)),(u=u.concat(kn.map(a,function(e){return qu(e)}))).reverse().join("/")+","+o}function Wu(e,t){var n,r,o;return t?(t=(n=t.split(","))[0].split("/"),o=1e.data.length&&(t=e.data.length),Ds(e,t)}(r,parseInt(o,10)):(o="after"===o?Os(r)+1:Os(r),Ds(r.parentNode,o)):null):null}function Ku(e,t){Ge.isText(t)&&0===t.data.length&&e.remove(t)}function Xu(e,t,n){Ge.isDocumentFragment(n)?function(t,e,n){var r=k.from(n.firstChild),o=k.from(n.lastChild);e.insertNode(n),r.each(function(e){return Ku(t,e.previousSibling)}),o.each(function(e){return Ku(t,e.nextSibling)})}(e,t,n):function(e,t,n){t.insertNode(n),Ku(e,n.previousSibling),Ku(e,n.nextSibling)}(e,t,n)}function Yu(e,t,n,r,o){var i,a=r[o?"startContainer":"endContainer"],u=r[o?"startOffset":"endOffset"],s=[],c=0,l=e.getRoot();for(Ge.isText(a)?s.push(n?function(e,t,n){var r,o;for(o=e(t.data.slice(0,n)).length,r=t.previousSibling;r&&Ge.isText(r);r=r.previousSibling)o+=e(r.data).length;return o}(t,a,u):u):(u>=(i=a.childNodes).length&&i.length&&(c=1,u=Math.max(0,i.length-1)),s.push(e.nodeIndex(i[u],n)+c));a&&a!==l;a=a.parentNode)s.push(e.nodeIndex(a,n));return s}function Gu(e,t,n){var r=0;return Mn.each(e.select(t),function(e){if("all"!==e.getAttribute("data-mce-bogus"))return e!==n&&void r++}),r}function Ju(e,t){var n,r,o,i=t?"start":"end";n=e[i+"Container"],r=e[i+"Offset"],Ge.isElement(n)&&"TR"===n.nodeName&&(n=(o=n.childNodes)[Math.min(t?r:r-1,o.length-1)])&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r))}function Qu(e){return Ju(e,!0),Ju(e,!1),e}function Zu(e,t){var n;if(Ge.isElement(e)&&(e=Ka(e,t),Ls(e)))return e;if(Da(e)){if(Ge.isText(e)&&Ma(e)&&(e=e.parentNode),n=e.previousSibling,Ls(n))return n;if(n=e.nextSibling,Ls(n))return n}}function es(e,t,n){var r=n.getNode(),o=r?r.nodeName:null,i=n.getRng();if(Ls(r)||"IMG"===o)return{name:o,index:Gu(n.dom,o,r)};var a=function(e){return Zu(e.startContainer,e.startOffset)||Zu(e.endContainer,e.endOffset)}(i);return a?{name:o=a.tagName,index:Gu(n.dom,o,a)}:function(e,t,n,r){var o=t.dom,i={};return i.start=Yu(o,e,n,r,!0),t.isCollapsed()||(i.end=Yu(o,e,n,r,!1)),i}(e,n,t,i)}function ts(e,t,n){var r={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"};return n?e.create("span",r,""):e.create("span",r)}function ns(e,t){var n=e.dom,r=e.getRng(),o=n.uniqueId(),i=e.isCollapsed(),a=e.getNode(),u=a.nodeName;if("IMG"===u)return{name:u,index:Gu(n,u,a)};var s=Qu(r.cloneRange());if(!i){s.collapse(!1);var c=ts(n,o+"_end",t);Xu(n,s,c)}(r=Qu(r)).collapse(!0);var l=ts(n,o+"_start",t);return Xu(n,r,l),e.moveToBookmark({id:o,keep:1}),{id:o}}function rs(e){return Ge.isElement(e)&&e.id===Is}function os(e,t){for(;t&&t!==e;){if(t.id===Is)return t;t=t.parentNode}return null}function is(e){var t=e.parentNode;t&&t.removeChild(e)}function as(e,t){0===t.length?is(e):e.nodeValue=t}function us(e){var t=lu(e);return{count:e.length-t.length,text:t}}function ss(e,t){return js(e),t}function cs(e,t){var n=t.container(),r=function(e,t){var n=f(e,t);return-1===n?k.none():k.some(n)}(P(n.childNodes),e).map(function(e){return e').css(n).appendTo(i)[0];return s.set(k.some({caret:o,element:e,before:t})),s.get().each(function(e){t&&vi(e.caret).addClass("mce-visual-caret-before")}),l(),(r=e.ownerDocument.createRange()).setStart(u,0),r.setEnd(u,0),r},hide:c,getCss:function(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"},reposition:function(){s.get().each(function(e){var t=fs(i,e.element,e.before);vi(e.caret).css(G({},t))})},destroy:function(){return pn.clearInterval(t)}}}function hs(){return $s.isIE()||$s.isEdge()||$s.isFirefox()}function ms(e){return Ws(e)||Ge.isTable(e)&&hs()}function gs(e){return 0