')}),t=mk.map(a,function(n){var e;return wO(u,{document:o.ownerDocument,handle:u+"-"+n.name,start:function(){e=s},drag:function(t){c(n,e,t.deltaX,t.deltaY)}})}),d(s),vO(o).on("focusin focusout",function(t){vO(t.target).attr("aria-grabbed","focus"===t.type?"true":"false")}),vO(o).on("keydown",function(n){var i;mk.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 yO.LEFT:t(n,0,s,-10,0);break;case yO.RIGHT:t(n,0,s,10,0);break;case yO.UP:t(n,0,s,0,-10);break;case yO.DOWN:t(n,0,s,0,10);break;case yO.ENTER:case yO.SPACEBAR:n.preventDefault(),r()}});var p=mk.extend({toggleVisibility:function(t){var n=mk.map(a,function(t){return"#"+u+"-"+t.name}).concat(mk.map(i,function(t){return"#"+u+"-"+t})).join(",");t?vO(n,o).show():vO(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(){mk.each(t,function(t){t.destroy()}),t=[]}},bO);return p},CO=function(n){var l=mp({dom:{tag:"div",classes:["tox-image-tools__image-bg"],attributes:{role:"presentation"}}}),f=fe(1),d=fe(dt.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,dt.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=hO.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=kO({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,ct);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(dt.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),dt.none()})})})},px.HighlightFirst).get(ct))},cancelEvent:Ao()}),ig.config({mode:"special",onDown:function(t,n){return e(t,n,ld.highlightFirst),dt.some(!0)},onEscape:function(t){var n=Vx.getCoupled(t,"sandbox");return wl.isOpen(n)?(wl.close(n),dt.some(!0)):dt.none()},onUp:function(t,n){return e(t,n,ld.highlightLast),dt.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,YO(),{item:t}),!0});var o=Ll.getValue(n);return Yo(n,Ao()),r.onExecute(t,n,o),e&&wl.close(t),dt.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=ct;qx(r,u(t),t,i,n,px.HighlightFirst).get(ct)}),er(YO(),function(t,n){var e=Vx.getCoupled(t,"sandbox");UO(r.model,t,n.event.item),Yo(t,Ao()),r.onItemExecute(t,e,n.event.item,Ll.getValue(t)),wl.close(e),GO(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:ft(ft({},o),Wl(r.typeaheadBehaviours,a)),eventOrder:r.eventOrder}}}),$O=function(i){return ft(ft({},i),{toCached:function(){return $O(i.toCached())},bindFuture:function(n){return $O(i.bind(function(t){return t.fold(function(t){return kx(pt.error(t))},function(t){return n(t)})}))},bindResult:function(n){return $O(i.map(function(t){return t.bind(n)}))},mapResult:function(n){return $O(i.map(function(t){return t.map(n)}))},mapError:function(n){return $O(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 $O(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))})}))}})},QO=function(t){return $O(Sx(t))},ZO=QO,t_={type:"separator"},n_=function(t){return{type:"menuitem",value:t.url,text:t.title,meta:{attach:t.attach},onAction:ct}},e_=function(t,n){return{type:"menuitem",value:n,text:t,meta:{attach:undefined},onAction:ct}},o_=function(t,n){return o=t,e=H(n,function(t){return t.type===o}),V(e,n_);var e,o},r_=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)})},i_=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=r_(c,(n=a.getHistory(u),V(n,function(t){return e_(t,t)})));return"file"===u?(e=[i,r_(c,o_("header",t.targets)),r_(c,gt([(r=t,dt.from(r.anchorTop).map(function(t){return e_("",t)}).toArray()),o_("anchor",t.targets),(o=t,dt.from(o.anchorBottom).map(function(t){return e_("",t)}).toArray())]))],N(e,function(t,n){return 0===t.length||0===n.length?t.concat(n):t.concat(t_,n)},[])):i})},u_=oi("aria-invalid"),a_=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:JO,dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":u_,type:"url"},minChars:0,responseTime:0,fetch:function(t){var n=i_(r.filetype,t,i),e=UC(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(ct)},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 ZO(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=dt.some(u_),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:ft({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($C({name:r.name,icon:dt.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=ft({fieldname:r.name},t);g.each(function(t){t(e).get(function(t){Ll.setValue(n,t),qo(o,Zy,{name:r.name})})})})})])])})},c_=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))})}},s_={bar:c_(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:c_(function(t,n){return cx(t,n.shared.providers)}),alertbanner:c_(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:c_(function(t,n){return e=t,o=n.shared.providers,PO({name:e.name,multiline:!1,label:e.label,inputMode:e.inputMode,placeholder:e.placeholder,flex:!1,disabled:e.disabled,classname:"tox-textfield",validation:dt.none(),maximized:e.maximized},o);var e,o}),textarea:c_(function(t,n){return e=t,o=n.shared.providers,PO({name:e.name,multiline:!0,label:e.label,inputMode:dt.none(),placeholder:e.placeholder,flex:!0,disabled:e.disabled,classname:"tox-textarea",validation:dt.none(),maximized:e.maximized},o);var e,o}),label:c_(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([ak(),lg.config({}),yk(dt.none()),ig.config({mode:"acyclic"})])};var e,o,r,i}),iframe:(TO=function(t,n){return Bk(t,n.shared.providers)},function(t,n,e){var o=zt(n,{source:"dynamic"});return c_(TO)(t,o,e)}),button:c_(function(t,n){return tO(t,n.shared.providers)}),checkbox:c_(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(),dt.some(!0)},u=Wy.parts.field({factory:{sketch:lt},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:rc([ak(),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:c_(function(t,n){return cw(t,n.shared,n.colorinput)}),colorpicker:c_(function(t){var n=function(t){return"tox-"+t},e=uk(fk,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:dt.from(e[1]).getOr("")}),ZS.getField(t,"hex").each(function(t){Yo(t,po())})})}}}),ak()])}}),dropzone:c_(function(t,n){return wk(t,n.shared.providers)}),grid:c_(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:c_(function(t,n){return o=t,e=(r=n).shared.providers,i=K(o.items).filter(MO),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 PC({uid:t.uid,text:i.map(function(t){return t.text}),icon:dt.none(),tooltip:o.label,role:dt.none(),fetch:function(t,n){var e=IO(t,o.name,o.items,Ll.getValue(t));n(UC(e,ih.CLOSE_ON_EXECUTE,r,!1))},onSetup:st(ct),getApi:st({}),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,FO)},setValue:function(n,t){RO(o.items,t).each(function(t){Yr(n.element,FO,t.value),qo(n,RC,{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:st(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:c_(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:VO,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({})])}},YT=function(t){return xT.sketch(XT(t))},qT=function(e,t){var n=sr(function(t){var n=V(e.initGroups,YT);eT.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])])},KT=function(t){var n=t.cyclicKeying?"cyclic":"acyclic";return{uid:t.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":XT({title:dt.none(),items:[]}),"overflow-button":qC({name:"more",icon:dt.some("more-drawer"),disabled:!1,tooltip:dt.some("More..."),primary:!1,borderless:!1},dt.none(),t.providers)},splitToolbarBehaviours:qT(t,n)}},JT=function(i){var t=KT(i),n=kT.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return kT.sketch(ft(ft({},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:ft(ft({},t.parts),{overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:i.attributes}}}),components:[n],markers:{overflowToggledClass:"tox-tbtn--enabled"}}))},$T=function(t){var n=WT.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),e=WT.parts.overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),o=KT(t);return WT.sketch(ft(ft({},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([GT()],{type:"opened"})},onClosed:function(t){t.getSystem().broadcastOn([GT()],{type:"closed"})}}))},QT=function(t){var n=t.cyclicKeying?"cyclic":"acyclic";return eT.sketch({uid:t.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(t.type===oh.scrolling?["tox-toolbar--scrolling"]:[])},components:[eT.parts.groups({})],toolbarBehaviours:qT(t,n)})},ZT=fn([Un("type"),jn("items",mn([Sn([Un("name"),qn("items",Rn)]),Rn]))].concat(jp)),tE=[Qn("text"),Qn("tooltip"),Qn("icon"),Gn("fetch"),ae("onSetup",function(){return ct})],nE=fn(T([Un("type")],tE)),eE=function(t){return _n("menubutton",nE,t)},oE=fn([Un("type"),Qn("tooltip"),Qn("icon"),Qn("text"),Zn("select"),Gn("fetch"),ae("onSetup",function(){return ct}),ie("presets","normal",["normal","color","listpreview"]),ne("columns",1),Gn("onAction"),Gn("onItemAction")]),rE=/* */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)})})])}}),iE=/* */Object.freeze({__proto__:null,getState:function(t,n,e){return e}}),uE=[Ln("channel"),Kn("renderComponents"),Kn("updateState"),Kn("initialData")],aE=uc({fields:uE,name:"reflecting",active:rE,apis:iE,state:/* */Object.freeze({__proto__:null,init:function(){var n=fe(dt.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(dt.none())}}}})}),cE=st([Ln("toggleClass"),Ln("fetch"),pa("onExecute"),ne("getHotspot",dt.some),ne("getAnchorOverrides",st({})),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())),sE=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})])}}}),lE=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)})}}}}),fE=st([sE,lE,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()]),dE=Yf({name:"SplitDropdown",configFields:cE(),partFields:fE(),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(ct)},a=function(t){var n=Ff(t,o,"button");return Ko(n),dt.some(!0)},c=ft(ft({},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(dt.some(u))),s={repositionMenus:function(t){Eg.isOn(t)&&Zx(t)}};return{uid:o.uid,dom:o.dom,components:t,apis:s,eventOrder:ft(ft({},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),dt.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)}}}),mE=function(n){return{isDisabled:function(){return mv.isDisabled(n)},setDisabled:function(t){return mv.set(n,t)}}},gE=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)}}},pE=function(t,n){return t.map(function(t){return{"aria-label":n.translate(t),title:n.translate(t)}}).getOr({})},hE=oi("focus-button"),vE=["checklist","ordered-list"],bE=["indent","outdent","table-insert-column-after","table-insert-column-before","unordered-list"],yE=function(n,e,t,o,r,i){var u,a=function(t){return Zh.isRtl()&&M(vE,t)?t+"-rtl":t},c=Zh.isRtl()&&n.exists(function(t){return M(bE,t)});return{dom:{tag:"button",classes:["tox-tbtn"].concat(e.isSome()?["tox-tbtn--select"]:[]).concat(c?["tox-tbtn__icon-rtl"]:[]),attributes:pE(t,i)},components:Kv([n.map(function(t){return BC(a(t),i.icons)}),e.map(function(t){return MC(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,hE)})])].concat(o.map(function(t){return aE.config({channel:t,initialData:{icon:n,text:e},renderComponents:function(t,n){return Kv([t.icon.map(function(t){return BC(a(t),i.icons)}),t.text.map(function(t){return MC(t,"tox-tbtn",i)})])}})}).toArray()).concat(r.getOr([])))}},xE=function(t,n,e){var o,r=fe(ct),i=yE(t.icon,t.text,t.tooltip,dt.none(),dt.none(),e);return dp.sketch({dom:i.dom,components:i.components,eventOrder:IC,buttonBehaviours:rc([fg("toolbar-button-events",[(o={onAction:t.onAction,getApi:n.getApi},dr(function(n,t){Gv(o,n)(function(t){qo(n,FC,{buttonApi:t}),o.onAction(t)})})),Xv(n,r),Yv(n,r)]),Wv(function(){return t.disabled||e.isDisabled()}),Nv()].concat(n.toolbarButtonBehaviours))})},wE=function(t,n,e){return xE(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)},DE=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}},BE=function(t,n,e){var o=DE(t,n);if(0=n.y}var n,e})},VD=function(n,t){return t.getInitialPosition().map(function(t){return Pu(t.bounds.x,t.bounds.y,Ou(n),vu(n))})},PD=function(t,n,e){e.setInitialPosition(dt.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?FD:ID)(i,r))})})},UD=function(n,e,t){var o,r,i=n.element;t.setDocked(!1),o=t,r=n.element,VD(r,o).bind(function(t){return HD(r,t,o)}).each(function(t){t.fold(function(){return ND(n,e)},function(t){return LD(n,e,t)},ct)}),t.setVisible(!0),e.contextual.each(function(t){Ni(i,[t.fadeInClass,t.fadeOutClass,t.transitionClass]),t.onShow(n)}),WD(n,e,t)},WD=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())&&jD(o,r,i,u),zD(o,u,i).each(function(t){i.setDocked(!a),t.fold(function(){return ND(o,r)},function(t){return LD(o,r,t)},function(t){jD(o,r,i,u,!0),LD(o,r,t)})}))},GD=function(t,n,e){e.isDocked()&&UD(t,n,e)},XD=/* */Object.freeze({__proto__:null,refresh:WD,reset:GD,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)}}),YD=/* */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){WD(t,o,r)}),er(Vo(),function(t,n){GD(t,o,r)})])}}),qD=[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")],KD=uc({fields:qD,name:"docking",active:YD,apis:XD,state:/* */Object.freeze({__proto__:null,init:function(t){var n=fe(!1),e=fe(!0),o=fe(dt.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(",")}})}})}),JD={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},$D="tox-tinymce--toolbar-sticky-on",QD="tox-tinymce--toolbar-sticky-off",ZD=function(r){var i=r.element;kr(i).each(function(t){var n,e,o="padding-"+KD.getModes(r)[0];KD.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))})},tB=function(t,n){n?(Pi(t,JD.fadeOutClass),zi(t,[JD.transitionClass,JD.fadeInClass])):(Pi(t,JD.fadeInClass),zi(t,[JD.fadeOutClass,JD.transitionClass]))},nB=function(t,n){var e=me.fromDom(t.getContainer());n?(Ri(e,$D),Pi(e,QD)):(Ri(e,QD),Pi(e,$D))},eB=function(c,t){var n,i=fe(dt.none()),o=t.getSink,u=function(n){o().each(function(t){return n(t.element)})},e=function(t){c.inline||ZD(t),nB(c,KD.isDocked(t)),t.getSystem().broadcastOn([kl()],{}),o().each(function(t){return t.getSystem().broadcastOn([kl()],{})})},r=c.inline?[]:[lc.config({channels:((n={})[GT()]={onReceive:ZD},n)})];return T([hg.config({}),KD.config({contextual:ft({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(KD.getModes(n),e)?0:o);return dt.some(Pu(i.x,a,i.width,u))},onShow:function(){u(function(t){return tB(t,!0)})},onShown:function(r){u(function(t){return Ni(t,[JD.transitionClass,JD.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(dt.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 tB(t,!1)})},onHidden:function(){u(function(t){return Ni(t,[JD.transitionClass])})}},JD),modes:[t.header.getDockingMode()],onDocked:e,onUndocked:e})],r)},oB=/* */Object.freeze({__proto__:null,setup:function(t,n,e){t.inline||(n.header.isPositionedAtTop()||t.on("ResizeEditor",function(){e().each(KD.reset)}),t.on("ResizeWindow ResizeEditor",function(){e().each(ZD)}),t.on("SkinLoaded",function(){e().each(function(t){KD.isDocked(t)?KD.reset(t):KD.refresh(t)})}),t.on("FullscreenStateChanged",function(){e().each(KD.reset)})),t.on("AfterScrollIntoView",function(y){e().each(function(t){KD.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"},cB=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}},sB=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),lB=ft(ft({},sB),{sketch:function(t){var e,n=(e=[],{slot:function(t,n){return e.push(t),Tf(iB,aB(t),n)},record:function(){return e}}),o=t(n),r=n.record(),i=V(r,function(t){return bf({name:t,pname:aB(t)})});return jf(iB,uB,i,cB,o)}}),fB=fn([Qn("icon"),Qn("tooltip"),ae("onShow",ct),ae("onHide",ct),ae("onSetup",function(){return ct})]),dB=function(t){return{element:function(){return t.element.dom}}},mB=function(e,o){var r=V(Ct(o),function(t){var n=o[t],e=Tn(_n("sidebar",fB,n));return{name:t,getApi:dB,onSetup:e.onSetup,onShow:e.onShow,onHide:e.onHide}});return V(r,function(t){var n=fe(ct);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))})})])})})},gB=function(t,e){Zf.getCurrent(t).each(function(t){return lg.set(t,[(n=e,lB.sketch(function(t){return{dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:mB(t,n),slotBehaviours:Uh([sr(function(t){return lB.hideAllSlots(t)})])}}))]);var n})},pB=function(t){return Zf.getCurrent(t).bind(function(t){return zT.isGrowing(t)||zT.hasGrown(t)?Zf.getCurrent(t).bind(function(n){return L(lB.getSlotNames(n),function(t){return lB.isShowing(n,t)})}):dt.none()})},hB=oi("FixSizeEvent"),vB=oi("AutoSizeEvent"),bB=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:ft(ft({},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 ft({tag:mr(r),classes:a,attributes:u},c)},yB=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:bB('
')}],behaviours:rc([ig.config({mode:"special",onTab:function(){return dt.some(!0)},onShiftTab:function(){return dt.some(!0)}}),hg.config({})])}]),tu(o,"display"),$r(o,"aria-hidden")):(lg.set(t,[]),Yi(o,"display","none"),Yr(o,"aria-hidden","true"))},xB=kD.optional({factory:rB,name:"menubar",schema:[Ln("backstage")]}),wB=kD.optional({factory:{sketch:function(t){return TD.sketch({uid:t.uid,dom:t.dom,listBehaviours:rc([ig.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:function(){return QT({type:t.type,uid:oi("multiple-toolbar-item"),cyclicKeying:!1,initGroups:[],providers:t.providers,onEscape:function(){return t.onEscape(),dt.some(!0)}})},setupItem:function(t,n,e,o){eT.setGroups(n,e)},shell:!0})}},name:"multiple-toolbar",schema:[Ln("dom"),Ln("onEscape")]}),SB=kD.optional({factory:{sketch:function(t){var n;return((n=t).type===oh.sliding?$T:n.type===oh.floating?JT:QT)({type:t.type,uid:t.uid,onEscape:function(){return t.onEscape(),dt.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")]}),kB=kD.optional({factory:{sketch:function(t){var n=t.editor,e=t.sticky?eB:ED;return{uid:t.uid,dom:t.dom,components:t.components,behaviours:rc(e(n,t.sharedBackstage))}}},name:"header",schema:[Ln("dom")]}),CB=kD.optional({name:"socket",schema:[Ln("dom")]}),OB=kD.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({}),zT.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(lB.hideAllSlots),Yo(t,vB)},onGrown:function(t){Yo(t,vB)},onStartGrow:function(t){qo(t,hB,{width:Qi(t.element,"width").getOr("")})},onStartShrink:function(t){qo(t,hB,{width:Ou(t.element)+"px"})}}),lg.config({}),Zf.config({find:function(t){var n=lg.contents(t);return K(n)}})])}],behaviours:rc([sk(0),fg("sidebar-sliding-events",[er(hB,function(t,n){Yi(t.element,"width",n.event.width)}),er(vB,function(t,n){tu(t.element,"width")})])])}}},name:"sidebar",schema:[Ln("dom")]}),_B=kD.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")]}),TB=Yf({name:"OuterContainer",factory:function(e,t,n){var o={getSocket:function(t){return SD.getPart(t,e,"socket")},setSidebar:function(t,n){SD.getPart(t,e,"sidebar").each(function(t){return gB(t,n)})},toggleSidebar:function(t,o){SD.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){zT.hasGrown(n)?lB.isShowing(t,e)?zT.shrink(n):(lB.hideAllSlots(t),lB.showSlot(t,e)):(lB.hideAllSlots(t),lB.showSlot(t,e),zT.grow(n))})});var n,e})},whichSidebar:function(t){return SD.getPart(t,e,"sidebar").bind(pB).getOrNull()},getHeader:function(t){return SD.getPart(t,e,"header")},getToolbar:function(t){return SD.getPart(t,e,"toolbar")},setToolbar:function(t,n){SD.getPart(t,e,"toolbar").each(function(t){t.getApis().setGroups(t,n)})},setToolbars:function(t,n){SD.getPart(t,e,"multiple-toolbar").each(function(t){TD.setItems(t,n)})},refreshToolbar:function(t){SD.getPart(t,e,"toolbar").each(function(t){return t.getApis().refresh(t)})},toggleToolbarDrawer:function(t){SD.getPart(t,e,"toolbar").each(function(n){var t,e;t=n.getApis().toggle,e=function(t){return t(n)},t!==undefined&&null!==t?dt.some(e(t)):dt.none()})},isToolbarDrawerToggled:function(t){return SD.getPart(t,e,"toolbar").bind(function(n){return dt.from(n.getApis().isOpen).map(function(t){return t(n)})}).getOr(!1)},getThrobber:function(t){return SD.getPart(t,e,"throbber")},focusToolbar:function(t){SD.getPart(t,e,"toolbar").orThunk(function(){return SD.getPart(t,e,"multiple-toolbar")}).each(function(t){ig.focusIn(t)})},setMenubar:function(t,n){SD.getPart(t,e,"menubar").each(function(t){rB.setMenus(t,n)})},focusMenubar:function(t){SD.getPart(t,e,"menubar").each(function(t){rB.focus(t)})}};return{uid:e.uid,dom:e.dom,components:t,apis:o,behaviours:e.behaviours}},configFields:[Ln("dom"),Ln("behaviours")],partFields:[kB,xB,SB,wB,CB,OB,_B],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,YT);t.setToolbar(n,o)},setToolbars:function(t,n,e){var o=V(e,function(t){return V(t,YT)});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)}}}),EB={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"}},DB=function(t){return"string"==typeof t?t.split(" "):t},BB=function(i,u){var a=ft(ft({},EB),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())},wA=function(t){return"string"==typeof t?t.split(/[ ,]/):t},SA=function(t){return t.getParam("contextmenu_never_use_native",!1,"boolean")},kA=function(t){return e="contextmenu",o="link linkchecker image imagetools table spellchecker configurepermanentpen",r=(n=t).ui.registry.getAll().contextMenus,dt.from(n.getParam(e)).map(wA).getOrThunk(function(){return H(wA(o),function(t){return It(r,t)})});var n,e,o,r},CA=function(t){return x(t)?"|"===t:"separator"===t.type},OA={type:"separator"},_A=function(n){var t,e=function(t){return{text:t.text,icon:t.icon,disabled:t.disabled,shortcut:t.shortcut}};if(x(n))return n;switch(n.type){case"separator":return OA;case"submenu":return ft(ft({type:"nestedmenuitem"},e(n)),{getSubmenuItems:function(){var t=n.getSubmenuItems();return x(t)?t:V(t,_A)}});default:return ft(ft({type:"menuitem"},e(n)),{onAction:(t=n.onAction,function(){return t()})})}},TA=function(t,n){if(0===n.length)return t;var e=J(t).filter(function(t){return!CA(t)}).fold(function(){return[]},function(t){return[OA]});return t.concat(e).concat(n).concat([OA])},EA=function(t,n){return"longpress"!==n.type&&(2!==n.button||n.target===t.getBody()&&""===n.pointerType)},DA=function(t,n){return EA(t,n)?t.selection.getStart(!0):n.target},BA=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;SA(a)&&u.preventDefault(),t=a,u.ctrlKey&&!SA(t)||!1===a.getParam("contextmenu")||(n=function(t,n){var e=t.getParam("contextmenu_avoid_overlap","","string");if(EA(t,n))return!0;if(e){var o=DA(t,n);return Oy(me.fromDom(o),e)}return!1}(a,u),(o()?xA:hA)(a,u,function(){var n,r,t,e=DA(a,u),o=a.ui.registry.getAll(),i=kA(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(x(n))return TA(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(dt.some(n.start)),u.set(dt.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(dt.none()),u.set(dt.none())}))},wM=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){yI(m,t)})})})},wI=function(t){return qu(t,'[role="tabpanel"]')},SI=function(a){var c;return{smartTabHeight:(c=fe(dt.none()),{extraEvents:[sr(function(t){var e=t.element;wI(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)+"")}]}]})},VI=function(t){return VM.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:t})},PI=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})]},HI=function(n){var t,e="tox-dialog",o=e+"-wrap",r=o+"__backdrop",i=e+"__disable-scroll";return VM.sketch({lazySink:n.lazySink,onEscape:function(t){return n.onEscape(t),dt.some(!0)},useTabstopAt:function(t){return!Ek(t)},dom:{tag:"div",classes:[e].concat(n.extraClasses),styles:ft({position:"relative"},n.extraStyles)},components:T([n.header,n.body],n.footer.toArray()),parts:{blocker:{dom:bB(''),components:[{dom:{tag:"div",classes:AI?[r,r+"--opaque"]:[r]}}]}},dragBlockClass:o,modalBehaviours:rc(T([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:ft(((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)})},zI=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)}})},NI=function(t,n,e){var o=function(t){return[lu(e.translate(t.title))]};return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:ft({},n.map(function(t){return{id:t}}).getOr({}))},components:o(t),behaviours:rc([aE.config({channel:_I,renderComponents:o})])}},LI=function(){return{dom:bB('')}},jI=function(t,n){return e={title:n.shared.providers.translate(t),draggable:n.dialog.isDraggableModal()},o=n.shared.providers,r=VM.parts.title(NI(e,dt.none(),o)),i=VM.parts.draghandle(LI()),u=VM.parts.close(zI(o)),a=[r].concat(e.draggable?[i]:[]).concat([u]),Ny.sketch({dom:bB(''),components:a});var e,o,r,i,u,a},UI=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:bB('')}]}},WI=function(t,o,n){return{onClose:function(){return n.closeWindow()},onBlock:function(e){VM.setBusy(t(),function(t,n){return UI(e.message,n,o)})},onUnblock:function(){VM.setIdle(t())}}},GI=function(t,n,e,o){var r;return mu(HI(ft(ft({},t),{lazySink:o.shared.getSink,extraBehaviours:T([aE.config({channel:OI,updateState:function(t,n){return dt.some(n)},initialData:n}),xk({})],t.extraBehaviours),onEscape:function(t){Yo(t,nx)},dialogEvents:e,eventOrder:((r={})[Oo()]=[aE.name(),lc.name()],r[Po()]=["scroll-lock",aE.name(),"messages","dialog-events","alloy.base.behaviour"],r[Ho()]=["alloy.base.behaviour","dialog-events","messages",aE.name(),"scroll-lock"],r)})))},XI=function(t){return V(t,function(t){return"menu"===t.type?(e=V((n=t).items,function(t){var n=fe(!1);return ft(ft({},t),{storage:n})}),ft(ft({},n),{items:e})):t;var n,e})},YI=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)},{})},qI=function(t,e){return[ur(lo(),Tk),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)})]},KI=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){aE.getState(n).get().each(function(t){e(t,n)})};return T(qI(n,t),[n(ex,function(t,n,e){n.onAction(t,{name:e.name})})])},JI=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){aE.getState(n).get().each(function(t){e(t.internalDialog,n)})};return T(qI(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())})])},$I=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)]},QI=function(t,i){return{dom:bB(''),components:[],behaviours:rc([aE.config({channel:EI,initialData:t,updateState:function(t,n){var r=V(n.buttons,function(t){var n,e,o=mp((e=i,ZC(n=t,n.type,e)));return{name:t.name,align:t.align,memento:o}});return dt.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:$I})])}},ZI=QI,tR=function(t,n){return VM.parts.footer(QI(t,n))},nR=function(n,e){if(n.getRoot().getSystem().isConnected()){var o=Zf.getCurrent(n.getFormWrapper()).getOr(n.getFormWrapper());return ZS.getField(o,e).fold(function(){var t=n.getFooter();return aE.getState(t).get().bind(function(t){return t.lookupByName(o,e)})},function(t){return dt.some(t)})}return dt.none()},eR=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 ft(ft({},e),o)},setData:function(a){t(function(t){var n,e,o=l.getData(),r=ft(ft({},o),a),i=(n=r,e=c.getRoot(),aE.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){nR(c,t).each(mv.disable)},enable:function(t){nR(c,t).each(mv.enable)},focus:function(t){nR(c,t).each(hg.focus)},block:function(n){if(!x(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();aE.getState(n).get().exists(function(t){return t.isTabPanel()})&&Zf.getCurrent(n).each(function(t){bI.showTab(t,e)})})},redial:function(e){t(function(t){var n=o(e);t.getSystem().broadcastOn([OI],n),t.getSystem().broadcastOn([_I],n.internalDialog),t.getSystem().broadcastOn([TI],n.internalDialog),t.getSystem().broadcastOn([EI],n.internalDialog),l.setData(n.initialData)})},close:function(){t(function(t){Yo(t,tx)})}};return l},oR=function(t,n,e){var o,r,i,u=jI(t.internalDialog.title,e),a=(o={body:t.internalDialog.body},r=e,i=BI(o,dt.none(),r,!1),VM.parts.body(i)),c=XI(t.internalDialog.buttons),s=YI(c),l=tR({buttons:c},e),f=JI(function(){return p},WI(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:dt.some(l),extraClasses:d,extraBehaviours:[],extraStyles:{}},g=GI(m,t,f,e),p=eR({getRoot:function(){return g},getBody:function(){return VM.getBody(g)},getFooter:function(){return VM.getFooter(g)},getFormWrapper:function(){var t=VM.getBody(g);return Zf.getCurrent(t).getOr(t)}},n.redial,s);return{dialog:g,instanceApi:p}},rR=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:bB(''),components:[NI(u,dt.some(a),c),LI(),zI(c)],containerBehaviours:rc([hM.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,BI(s,dt.some(l),f,d))),v=XI(t.internalDialog.buttons),b=YI(v),y=mp(ZI({buttons:v},o)),x=JI(function(){return S},{onBlock:function(e){RM.block(w,function(t,n){return UI(e.message,n,o.shared.providers)})},onUnblock:function(){RM.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()]=[aE.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),dt.some(!0)},useTabstopAt:function(t){return!Ek(t)&&("button"!==mr(t)||"disabled"!==qr(t,"disabled"))}}),aE.config({channel:OI,updateState:function(t,n){return dt.some(n)},initialData:t}),hg.config({}),fg("execute-on-form",x.concat([cr(lo(),function(t,n){ig.focusIn(t)})])),RM.config({getRoot:function(){return dt.some(w)}}),lg.config({}),xk({})]),components:[p.asSpec(),h.asSpec(),y.asSpec()]}),S=eR({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}},iR=tinymce.util.Tools.resolve("tinymce.util.URI"),uR=["insertContent","setContent","execCommand","close","block","unblock"],aR=function(t){return w(t)&&-1!==uR.indexOf(t.mceAction)},cR=function(o,t,r,n){var e,i,u,a,c=jI(o.title,n),s=(i={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[Ok({dom:{tag:"iframe",attributes:{src:o.url}},behaviours:rc([Yy.config({}),hg.config({})])})]}],behaviours:rc([ig.config({mode:"acyclic",useTabstopAt:C(Ek)})])},VM.parts.body(i)),l=o.buttons.bind(function(t){return 0===t.length?dt.none():dt.some(tR({buttons:t},n))}),f=KI(function(){return y},WI(function(){return b},n.shared.providers,t)),d=ft(ft({},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 iR(o.url,{base_uri:new iR(window.location.href)}),p=g.protocol+"://"+g.host+(g.port?":"+g.port:""),h=fe(dt.none()),v=[fg("messages",[sr(function(){var t=Sy(me.fromDom(window),"message",function(t){var n,e;g.isSameOrigin(new iR(t.raw.origin))&&(n=t.raw.data,aR(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=!!S(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):!aR(e=n)&&w(e)&&It(e,"mceAction")&&o.onMessage(y,n))});h.set(dt.some(t))}),lr(function(){h.get().each(function(t){return t.unbind()})})]),lc.config({channels:((e={})[DI]={onReceive:function(t,n){qu(t.element,"iframe").each(function(t){t.dom.contentWindow.postMessage(n,p)})}},e)})],b=GI({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(!x(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([DI],n)})}});return{dialog:u=b,instanceApi:y}},sR=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(){VM.hide(u),n()},o=mp(ZC({name:"close-alert",text:"OK",primary:!0,align:"end",disabled:!1,icon:dt.none()},"cancel",c.backstage)),r=II(),i=FI(e,s.providers),u=mu(HI({lazySink:function(){return s.getSink()},header:MI(r,i),body:RI(t,s.providers),footer:dt.some(VI(PI([],[o.asSpec()]))),onEscape:e,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[er(nx,e)],eventOrder:{}}));VM.show(u);var a=o.get(u);hg.focus(a)}}),o=(f=(l=t).backstage.shared,{open:function(t,n){var e=function(t){VM.hide(a),n(t)},o=mp(ZC({name:"yes",text:"Yes",primary:!0,align:"end",disabled:!1,icon:dt.none()},"submit",l.backstage)),r=ZC({name:"no",text:"No",primary:!1,align:"end",disabled:!1,icon:dt.none()},"cancel",l.backstage),i=II(),u=FI(function(){return e(!1)},f.providers),a=mu(HI({lazySink:function(){return f.getSink()},header:MI(i,u),body:RI(t,f.providers),footer:dt.some(VI(PI([],[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:{}}));VM.show(a);var c=o.get(a);hg.focus(c)}}),r=function(t,e){return uI.openUrl(function(t){var n=cR(t,{closeWindow:function(){VM.hide(n.dialog),e(n.instanceApi)}},h,p);return VM.show(n.dialog),n.instanceApi},t)},i=function(t,i){return uI.open(function(t,n,e){var o=n,r=oR({dataValidator:e,initialData:o,internalDialog:t},{redial:uI.redial,closeWindow:function(){VM.hide(r.dialog),i(r.instanceApi)}},p);return VM.show(r.dialog),r.instanceApi.setData(o),r.instanceApi},t)},u=function(t,d,m,g){return uI.open(function(t,n,e){var o,r,i,u=Tn(_n("data",e,n)),a=(o=fe(dt.none()),{clear:function(){return o.set(dt.none())},set:function(t){return o.set(dt.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),KD.refresh(t)})},l=rR({dataValidator:e,initialData:u,internalDialog:t},{redial:uI.redial,closeWindow:function(){a.on(Zg.hide),h.off("ResizeEditor",s),a.clear(),m(l.instanceApi)}},p,g),f=mu(Zg.sketch(ft(ft({lazySink:p.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{}},c?{}:{fireRepositionEventInstead:{}}),{inlineBehaviours:rc(T([fg("window-manager-inline-events",[er(zo(),function(t,n){Yo(l.dialog,nx)})])],(r=h,i=c,v&&i?[]:[KD.config({contextual:{lazyContext:function(){return dt.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),dt.some(Ui())),v&&c||(KD.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)})}}};r.add("silver",function(t){var n=DM(t),e=n.uiMothership,o=n.backstage,r=n.renderUI,i=n.getUi;xy(t,o.shared);var u=sR({editor:t,backstage:o});return{renderUI:r,getWindowManagerImpl:st(u),getNotificationManagerImpl:function(){return bp(0,{backstage:o},e)},ui:i()}})}();