')}),Ow.each(d,function(t){uk("#"+c,o).append('
')}),t=Ow.map(d,function(n){var e;return sk(c,{document:o.ownerDocument,handle:c+"-"+n.name,start:function(){e=s},drag:function(t){u(n,e,t.deltaX,t.deltaY)}})}),n(s),uk(o).on("focusin focusout",function(t){uk(t.target).attr("aria-grabbed","focus"===t.type?"true":"false")}),uk(o).on("keydown",function(n){var i;function t(t,n,e,o,r){t.stopPropagation(),t.preventDefault(),u(i,e,o,r)}switch(Ow.each(d,function(t){if(n.target.id===c+"-"+t.name)return i=t,!1}),n.keyCode){case ck.LEFT:t(n,0,s,-10,0);break;case ck.RIGHT:t(n,0,s,10,0);break;case ck.UP:t(n,0,s,0,-10);break;case ck.DOWN:t(n,0,s,0,10);break;case ck.ENTER:case ck.SPACEBAR:n.preventDefault(),r()}});var p=Ow.extend({toggleVisibility:function(t){var n=Ow.map(d,function(t){return"#"+c+"-"+t.name}).concat(Ow.map(m,function(t){return"#"+c+"-"+t})).join(",");t?uk(n,o).show():uk(n,o).hide()},setClampRect:function(t){l=t,n(s)},setRect:i,getInnerRect:function(){return f(l,s)},setInnerRect:g,setViewPortRect:function(t){e=t,n(s)},destroy:function(){Ow.each(t,function(t){t.destroy()}),t=[]}},ak);return p};function gk(t){var e,o,n,r,i=wn(t),u=fc(),a=(o=-1,{data:e=[],add:function(t){var n=e.splice(++o);return e.push(t),{state:t,removed:n}},undo:function(){if(n())return e[--o]},redo:function(){if(r())return e[++o]},canUndo:n=function(){return 0
",t)}).toArray(),Ck("anchor",t.targets),ft.from(t.anchorBottom).map(function(t){return kk("",t)}).toArray()]))],function(t,n){return 0===t.length||0===n.length?t.concat(n):t.concat(E1,n)},[]):n})),yh.BUBBLE_TO_SANDBOX,a,!1);return Uy(i)},getHotspot:function(t){return p.getOpt(t)},onSetValue:function(t,n){t.hasConfigured(qy)&&qy.run(t).get(ct)},typeaheadBehaviours:Za(lt([c.getValidationHandler().map(function(e){return qy.config({getRoot:function(t){return ar(t.element)},invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:function(t,n){f.getOpt(t).each(function(t){Or(t.element,"title",i.translate(n))})}},validator:{validate:function(t){var n=_f.getValue(t);return T1(function(o){e({type:u.filetype,url:n.value},function(t){var n,e;"invalid"===t.status?(n=mt.error(t.message),o(n)):(e=mt.value(t.message),o(e))})})},validateOnLoad:!1}})}).toArray(),[fd.config({disabled:function(){return u.disabled||i.isDisabled()}}),gy.config({}),lm("urlinput-events",lt(["file"===u.filetype?[Xe(ho(),function(t){Ne(t,by,{name:u.name})})]:[],[Xe(vo(),function(t){Ne(t,by,{name:u.name}),r(t)}),Xe(_o(),function(t){Ne(t,by,{name:u.name}),r(t)})]]))]])),eventOrder:((t={})[ho()]=["streaming","urlinput-events","invalidating"],t),model:{getDisplayText:function(t){return t.value},selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:a.shared.getSink,parts:{menu:Jp(0,0,"normal")},onExecute:function(t,n,e){Ne(n,Sy,{})},onItemExecute:function(t,n,e,o){r(t),Ne(t,by,{name:u.name})}}),l=u.label.map(function(t){return Qb(t,i)}),f=Vm((n="invalid",e=ft.some(D1),Wm("warning",{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+n],attributes:st({title:i.translate(o=void 0===o?n:o),"aria-live":"polite"},e.fold(function(){return{}},function(t){return{id:t}}))},i.icons))),d=Vm({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[f.asSpec()]}),m=c.getUrlPicker(u.filetype),g=Ar("browser.url.event"),p=Vm({dom:{tag:"div",classes:["tox-control-wrap"]},components:[s,d.asSpec()],behaviours:Za([fd.config({disabled:function(){return u.disabled||i.isDisabled()}})])}),h=Vm(bS({name:u.name,icon:ft.some("browse"),text:u.label.getOr(""),disabled:u.disabled,primary:!1,borderless:!0},function(t){return ze(t,g)},i,[],["tox-browse-url"]));return dy.sketch({dom:vy([]),components:l.toArray().concat([{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:lt([[p.asSpec()],m.map(function(){return h.asSpec()}).toArray()])}]),fieldBehaviours:Za([fd.config({disabled:function(){return u.disabled||i.isDisabled()},onDisabled:function(t){dy.getField(t).each(fd.disable),h.getOpt(t).each(fd.disable)},onEnabled:function(t){dy.getField(t).each(fd.enable),h.getOpt(t).each(fd.enable)}}),dv(),lm("url-input-events",[Xe(g,function(o){id.getCurrent(o).each(function(n){var t=_f.getValue(n),e=st({fieldname:u.name},t);m.each(function(t){t(e).get(function(t){_f.setValue(n,t),Ne(o,by,{name:u.name})})})})})])])})}function Tk(r){return function(n,e,o){return kt(e,"name").fold(function(){return r(e,o)},function(t){return n.field(t,r(e,o))})}}function Ek(n,t,e){var o=Jn(e,{shared:{interpreter:function(t){return M1(n,t,o)}}});return M1(n,t,o)}function Dk(t,n,e){function o(){return de.fromDom(t.getContentAreaContainer())}function r(){return p||!e()}var i,u,a,c,s,l,f,d,m,g,p=uv(t);return{inlineDialog:(f=o,d=n,m=r,g={maxHeightFunction:Fc()},function(){return m()?{type:"node",root:gr(f()),node:ft.from(f()),bubble:yc(12,12,F1),layouts:{onRtl:function(){return[Dm]},onLtr:function(){return[Em]}},overrides:g}:{type:"hotspot",hotspot:d(),bubble:yc(-12,12,F1),layouts:{onRtl:function(){return[Ua]},onLtr:function(){return[Ga]}},overrides:g}}),banner:(c=o,s=n,l=r,function(){return l()?{type:"node",root:gr(c()),node:ft.from(c()),layouts:{onRtl:function(){return[ip]},onLtr:function(){return[ip]}}}:{type:"hotspot",hotspot:s(),layouts:{onRtl:function(){return[Ka]},onLtr:function(){return[Ka]}}}}),cursor:(u=t,function(){return{type:"selection",root:a(),getSelection:function(){var t=u.selection.getRng();return ft.some(ls.range(de.fromDom(t.startContainer),t.startOffset,de.fromDom(t.endContainer),t.endOffset))}}}),node:(i=a=function(){return de.fromDom(t.getBody())},function(t){return{type:"node",root:i(),node:t}})}}function Bk(i){return ft.from(i.getParam("style_formats")).filter(c).map(function(t){var n,e,o=(n=i,e=R1(t),n.formatter?r(e.customFormats):n.on("init",function(){r(e.customFormats)}),e.formats);function r(t){dt(t,function(t){n.formatter.has(t.name)||n.formatter.register(t.name,t.format)})}return i.getParam("style_formats_merge",!1,"boolean")?I1.concat(o):o}).getOr(I1)}function Ak(t,n,e){var o={type:"formatter",isSelected:n(t.format),getStylePreview:e(t.format)};return Jn(t,o)}function Mk(c,t,s,l){var f=function(t){return A(t,function(t){var n,e,o,r,i,u=Xn(t);if(Ct(t,"items")){var a=f(t.items);return Jn(Jn(t,{type:"submenu"}),{getStyleItems:tt(a)})}return Ct(t,"format")?Ak(t,s,l):1===u.length&&et(u,"title")?Jn(t,{type:"separator"}):(r={type:"formatter",format:o="custom-"+(e=y((n=t).name)?n.name:Ar(n.title)),isSelected:s(o),getStylePreview:l(o)},i=Jn(n,r),c.formatter.register(e,i),i)})};return f(t)}function Fk(e){return function(t){if(f(n=t)&&1===n.nodeType){if(t.contentEditable===e)return!0;if(t.getAttribute("data-mce-contenteditable")===e)return!0}var n;return!1}}function Ik(t,n,e,o,r){return{type:t,title:n,url:e,level:o,attach:r}}function Rk(t){return t.innerText||t.textContent}function Vk(t){return t&&"A"===t.nodeName&&void 0!==(t.id||t.name)&&c1(t)}function Pk(t){return t&&/^(H[1-6])$/.test(t.nodeName)}function Hk(t){return Pk(t)&&c1(t)}function zk(t){var n,e=t.id||Ar("h");return Ik("header",Rk(t),"#"+e,Pk(n=t)?parseInt(n.nodeName.substr(1),10):0,function(){t.id=e})}function Nk(t){var n=t.id||t.name;return Ik("anchor",Rk(t)||"#"+n,"#"+n,0,ct)}function Lk(t){return 0=e.y}})}function rC(n,t){return t.getInitialPos().map(function(t){return Bi(t.bounds.x,t.bounds.y,wi(n),vi(n))})}function iC(e,o,r){return r.getInitialPos().bind(function(t){switch(r.clearInitialPos(),t.position){case"static":return ft.some($1.static());case"absolute":var n=Zk(e).map(Ai).getOrThunk(function(){return Ai(mu())});return ft.some($1.absolute(Ta("absolute",kt(t.style,"left").map(function(t){return o.x-n.x}),kt(t.style,"top").map(function(t){return o.y-n.y}),kt(t.style,"right").map(function(t){return n.right-o.right}),kt(t.style,"bottom").map(function(t){return n.bottom-o.bottom}))));default:return ft.none()}})}function uC(t,n,e){var o,r,i,u=t.element;return Kr(ii(u,"position"),"fixed")?(r=n,rC(o=u,i=e).filter(function(t){return oC(i.getModes(),t,r)}).bind(function(t){return iC(o,t,i)})):function(t,n,e){var r,o,i=Ai(t);if(oC(e.getModes(),i,n))return ft.none();r=t,o=i,e.setInitialPos({style:function(){var t={},n=r.dom;if(Qr(n))for(var e=0;ei.y;n!==r.isVisible()&&(r.setVisible(n),u&&!n?(Yr(o.element,[e.fadeOutClass]),e.onHide(o)):(n?nC:eC)(o,e))})})}function lC(t,n,e){var o,r,i,u,a,c;e.isDocked()&&(r=n,i=e,c=(o=t).element,i.setDocked(!1),rC(a=o.element,u=i).bind(function(t){return iC(a,t,u)}).each(function(t){t.fold(function(){return aC(o,r)},function(t){return cC(o,r,t)},ct)}),i.setVisible(!0),r.contextual.each(function(t){qr(c,[t.fadeInClass,t.fadeOutClass,t.transitionClass]),t.onShow(o)}),Q1(o,r,i))}function fC(t,n){return et(nO.getModes(t),n)}function dC(r){var i=r.element;ar(i).each(function(t){var n,e,o="padding-"+nO.getModes(r)[0];nO.isDocked(r)?(n=wi(t),ni(i,"width",n+"px"),ni(t,o,bi(e=i)+(parseInt(ri(e,"margin-top"),10)||0)+(parseInt(ri(e,"margin-bottom"),10)||0)+"px")):(ai(i,"width"),ai(t,o))})}function mC(t,n){n?(Gr(t,oO.fadeOutClass),Yr(t,[oO.transitionClass,oO.fadeInClass])):(Gr(t,oO.fadeInClass),Yr(t,[oO.fadeOutClass,oO.transitionClass]))}function gC(t,n){var e=de.fromDom(t.getContainer());n?(Ur(e,rO),Gr(e,iO)):(Ur(e,iO),Gr(e,rO))}function pC(u,t){function o(n){r().each(function(t){return n(t.element)})}function n(t){u.inline||dC(t),gC(u,nO.isDocked(t)),t.getSystem().broadcastOn([vf()],{}),r().each(function(t){return t.getSystem().broadcastOn([vf()],{})})}var e,i=fc(),r=t.getSink,a=u.inline?[]:[oc.config({channels:((e={})[eO()]={onReceive:dC},e)})];return H([Rg.config({}),nO.config({contextual:st({lazyContext:function(t){var n=bi(t.element),e=u.inline?u.getContentAreaContainer():u.getContainer(),o=Ai(de.fromDom(e)),r=o.height-n,i=o.y+(fC(t,"top")?0:n);return ft.some(Bi(o.x,i,o.width,r))},onShow:function(){o(function(t){return mC(t,!0)})},onShown:function(r){o(function(t){return qr(t,[oO.transitionClass,oO.fadeInClass])}),i.get().each(function(t){var n,e=r.element,o=or(n=t);Ca(o).filter(function(t){return!Bn(n,t)}).filter(function(t){return Bn(t,de.fromDom(o.dom.body))||An(e,t)}).each(function(){return Sa(n)}),i.clear()})},onHide:function(t){var n=t.element,e=r;Oa(n).orThunk(function(){return e().toOptional().bind(function(t){return Oa(t.element)})}).fold(i.clear,i.set),o(function(t){return mC(t,!1)})},onHidden:function(){o(function(t){return qr(t,[oO.transitionClass])})}},oO),lazyViewport:function(t){var n=Fi(),e=u.getParam("toolbar_sticky_offset",0,"number"),o=n.y+(fC(t,"top")?e:0),r=n.height-(fC(t,"bottom")?e:0);return Bi(n.x,o,n.width,r)},modes:[t.header.getDockingMode()],onDocked:n,onUndocked:n})],a)}function hC(t){return Gt("menubutton",sO,t)}function vC(n,t){return t.getAnimationRoot.fold(function(){return n.element},function(t){return t(n)})}function bC(t){return t.dimension.property}function yC(t,n){return t.dimension.getDimension(n)}function xC(t,n){qr(vC(t,n),[n.shrinkingClass,n.growingClass])}function wC(t,n){Gr(t.element,n.openClass),Ur(t.element,n.closedClass),ni(t.element,bC(n),"0px"),ci(t.element)}function SC(t,n){Gr(t.element,n.closedClass),Ur(t.element,n.openClass),ai(t.element,bC(n))}function kC(t,n,e,o){e.setCollapsed(),ni(t.element,bC(n),yC(n,t.element)),ci(t.element),xC(t,n),wC(t,n),n.onStartShrink(t),n.onShrunk(t)}function CC(t,n,e){var o=yC(n,t.element);("0px"===o?kC:function(t,n,e,o){var r=o.getOrThunk(function(){return yC(n,t.element)});e.setCollapsed(),ni(t.element,bC(n),r),ci(t.element);var i=vC(t,n);Gr(i,n.growingClass),Ur(i,n.shrinkingClass),wC(t,n),n.onStartShrink(t)})(t,n,e,ft.some(o))}function OC(t,n,e){var o=vC(t,n),r=Xr(o,n.shrinkingClass),i=yC(n,t.element);SC(t,n);var u=yC(n,t.element);(r?function(){ni(t.element,bC(n),i),ci(t.element)}:function(){wC(t,n)})(),Gr(o,n.shrinkingClass),Ur(o,n.growingClass),SC(t,n),ni(t.element,bC(n),u),e.setExpanded(),n.onStartGrow(t)}function _C(t,n,e){return!0===Xr(vC(t,n),n.growingClass)}function TC(t,n,e){return!0===Xr(vC(t,n),n.shrinkingClass)}function EC(t){return""}function DC(t){return{element:function(){return t.element.dom}}}function BC(t,e){id.getCurrent(t).each(function(t){return Mg.set(t,[(n=e,bO.sketch(function(t){return{dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:(e=t,r=A(Xn(o=n),function(t){var n=o[t],e=Xt(Gt("sidebar",yO,n));return{name:t,getApi:DC,onSetup:e.onSetup,onShow:e.onShow,onHide:e.onHide}}),A(r,function(t){var n=wn(ct);return e.slot(t.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:Xh([gv(t,n),pv(t,n),Xe(Uo(),function(n,t){var e=t.event;V(r,function(t){return t.name===e.name}).each(function(t){(e.visible?t.onShow:t.onHide)(t.getApi(n))})})])})})),slotBehaviours:Xh([$o(function(t){return bO.hideAllSlots(t)})])};var e,o,r}))]);var n})}function AC(t){return id.getCurrent(t).bind(function(t){return gO.isGrowing(t)||gO.hasGrown(t)?id.getCurrent(t).bind(function(n){return V(bO.getSlotNames(n),function(t){return bO.isShowing(n,t)})}):ft.none()})}function MC(t){var n=de.fromHtml(t),e=sr(n),o=R(void 0!==n.dom.attributes?n.dom.attributes:[],function(t,n){var e;return"class"===n.name?t:st(st({},t),((e={})[n.name]=n.value,e))},{}),r=Array.prototype.slice.call(n.dom.classList,0),i=0===e.length?{}:{innerHtml:Sr(n)};return st({tag:nr(n),classes:r,attributes:o},i)}function FC(t){return id.getCurrent(t).each(function(t){return Sa(t.element)})}function IC(f,d,m){function n(t){var n;!g.get()||"focusin"===(n=t).type&&(n.composed?ot(n.composedPath()):ft.from(n.target)).map(de.fromDom).filter(Ri).exists(function(t){return Xr(t,"mce-pastebin")})||(t.preventDefault(),FC(d()),f.editorManager.setActive(f))}var g=wn(!1),e=fc();function o(t){var n,e,o,r,i,u,a,c,s,l;t!==g.get()&&(g.set(t),n=f,e=d(),o=t,r=m.providers,c=e.element,s=o,l="data-mce-"+(i="tabindex"),ft.from(n.iframeElement).map(de.fromDom).each(function(n){s?(Tr(n,i).each(function(t){return Or(n,l,t)}),Or(n,i,-1)):(Dr(n,i),Tr(n,l).each(function(t){Or(n,i,t),Dr(n,l)}))}),o?(kO.block(e,(a=r,function(t,n){return{dom:{tag:"div",attributes:{"aria-label":a.translate("Loading..."),tabindex:"0"},classes:["tox-throbber__busy-spinner"]},components:[{dom:MC('')}]}})),ai(c,"display"),Dr(c,"aria-hidden"),n.hasFocus()&&FC(e)):(u=id.getCurrent(e).exists(function(t){return ka(t.element)}),kO.unblock(e),ni(c,"display","none"),Or(c,"aria-hidden","true"),u&&n.focus()),f.fire("AfterProgressState",{state:t}))}f.inline||f.on("PreInit",function(){f.dom.bind(f.getWin(),"focusin",n),f.on("BeforeExecCommand",function(t){"mcefocus"===t.command.toLowerCase()&&!0!==t.value&&n(t)})}),f.on("ProgressState",function(t){var n;e.on(ap.clearTimeout),u(t.time)?(n=ap.setEditorTimeout(f,function(){return o(t.state)},t.time),e.set(n)):(o(t.state),e.clear())})}function RC(t,n,e){return{within:t,extra:n,withinWidth:e}}function VC(t,n,o){var e,r=(e=function(t,n){var e=o(t);return ft.some({element:t,start:n,finish:n+e,width:e})},R(t,function(n,t){return e(t,n.len).fold(tt(n),function(t){return{len:t.finish,list:n.list.concat([t])}})},{len:0,list:[]}).list),i=F(r,function(t){return t.finish<=n}),u=I(i,function(t,n){return t+n.width},0);return{within:i,extra:r.slice(i.length),withinWidth:u}}function PC(t){return A(t,function(t){return t.element})}function HC(t,n){var e=A(n,function(t){return yu(t)});q1.setGroups(t,e)}function zC(t,n,e){var o,r,i,u,a,c,s,l,f,d,m,g,p,h,v,b,y,x,w,S,k=n.builtGroups.get();0!==k.length&&(o=fl(t,n,"primary"),r=Jy.getCoupled(t,"overflowGroup"),ni(o.element,"visibility","hidden"),u=q(i=k.concat([r]),function(n){return Oa(n.element).bind(function(t){return n.getSystem().getByDom(t).toOptional()})}),e([]),HC(o,i),a=wi(o.element),0===(s=a,l=n.builtGroups.get(),d=r,y=(0===(m=VC(l,s,f=function(t){return wi(t.element)})).extra.length?ft.some(m):ft.none()).getOrThunk(function(){return VC(l,s-f(d),f)}),x=y.within,w=y.extra,S=y.withinWidth,(c=1===w.length&&w[0].width<=f(d)?(b=S,RC(PC(x.concat(w)),[],b)):1<=w.length?(p=w,h=d,v=S,RC(PC(x).concat([h]),PC(p),v)):(g=S,RC(PC(x),[],g))).extra.length)?(Mg.remove(o,r),e([])):(HC(o,c.within),e(c.extra)),ai(o.element,"visibility"),ci(o.element),u.each(Rg.focus))}function NC(t,n){var e=Jy.getCoupled(t,"toolbarSandbox");pf.isOpen(e)?pf.close(e):pf.open(e,n.toolbar())}function LC(t,n,e,o){var r=e.getBounds.map(function(t){return t()}),i=e.lazySink(t).getOrDie();cf.positionWithinBounds(i,n,{anchor:{type:"hotspot",hotspot:t,layouts:o,overrides:{maxWidthFunction:TO()}}},r)}function jC(t,n,e,o,r){q1.setGroups(n,r),LC(t,n,e,o),Hg.on(t)}function WC(t){return A(t,function(t){return yu(t)})}function UC(t,e,o){zC(t,o,function(n){o.overflowGroups.set(n),e.getOpt(t).each(function(t){BO.setGroups(t,WC(n))})})}function GC(n,e){ll(n,e,"overflow-button").bind(function(){return ll(n,e,"overflow")}).each(function(t){l1(n,e),gO.toggleGrow(t)})}function XC(t){var n=t.title.fold(function(){return{}},function(t){return{attributes:{title:t}}});return{dom:st({tag:"div",classes:["tox-toolbar__group"]},n),components:[FO.parts.items({})],items:t.items,markers:{itemSelector:"*:not(.tox-split-button) > .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-js:not([disabled])"},tgroupBehaviours:Za([gy.config({}),Rg.config({})])}}function YC(t){return FO.sketch(XC(t))}function qC(e,t){var n=$o(function(t){var n=A(e.initGroups,YC);q1.setGroups(t,n)});return Za([Kv(e.providers.isDisabled),dv(),Bg.config({mode:t,onEscape:e.onEscape,selector:".tox-toolbar__group"}),lm("toolbar-events",[n])])}function KC(t){var n=t.cyclicKeying?"cyclic":"acyclic";return{uid:t.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":XC({title:ft.none(),items:[]}),"overflow-button":pS({name:"more",icon:ft.some("more-drawer"),disabled:!1,tooltip:ft.some("More..."),primary:!1,borderless:!1},ft.none(),t.providers)},splitToolbarBehaviours:qC(t,n)}}function JC(t){var n=t.cyclicKeying?"cyclic":"acyclic";return q1.sketch({uid:t.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(t.type===ph.scrolling?["tox-toolbar--scrolling"]:[])},components:[q1.parts.groups({})],toolbarBehaviours:qC(t,n)})}function $C(t){return"string"==typeof t?t.split(" "):t}function QC(i,u){var a=st(st({},XO),u.menus),e=0=r.minChars&&(e=id.getCurrent(o).bind(function(t){return md.getHighlighted(t).map(_f.getValue)}),r.previewing.set(!0),tx(r,u(t),t,o,i,function(t){id.getCurrent(o).each(function(t){e.fold(function(){r.model.selectsOver&&md.highlightFirst(t)},function(n){md.highlightBy(t,function(t){return _f.getValue(t).value===n.value}),md.getHighlighted(t).orThunk(function(){return md.highlightFirst(t),ft.none()})})})},Py.HighlightFirst).get(ct))},cancelEvent:Fo()}),Bg.config({mode:"special",onDown:function(t,n){return e(t,n,md.highlightFirst),ft.some(!0)},onEscape:function(t){var n=Jy.getCoupled(t,"sandbox");return pf.isOpen(n)?(pf.close(n),ft.some(!0)):ft.none()},onUp:function(t,n){return e(t,n,md.highlightLast),ft.some(!0)},onEnter:function(n){var t=Jy.getCoupled(n,"sandbox"),e=pf.isOpen(t);if(e&&!r.previewing.get())return id.getCurrent(t).bind(function(t){return md.getHighlighted(t)}).map(function(t){return Ne(n,S1(),{item:t}),!0});var o=_f.getValue(n);return ze(n,Fo()),r.onExecute(t,n,o),e&&pf.close(t),ft.some(!0)}}),Hg.config({toggleClass:r.markers.openClass,aria:{mode:"expanded"}}),Jy.config({others:{sandbox:function(t){return ox(r,t,{onOpen:function(){return Hg.on(t)},onClose:function(){return Hg.off(t)}})}}}),lm("typeaheadevents",[tr(function(t){nx(r,u(t),t,i,ct,Py.HighlightFirst).get(ct)}),Xe(S1(),function(t,n){var e=Jy.getCoupled(t,"sandbox");xk(r.model,t,n.event.item),ze(t,Fo()),r.onItemExecute(t,e,n.event.item,_f.getValue(t)),pf.close(e),w1(t)})].concat(r.dismissOnBlur?[Xe(Oo(),function(t){var n=Jy.getCoupled(t,"sandbox");Oa(n.element).isNone()&&pf.close(n)})]:[]))];return{uid:r.uid,dom:ty(Jn(r,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:st(st({},o),Qs(r.typeaheadBehaviours,a)),eventOrder:r.eventOrder}}}),_1=function(i){return st(st({},i),{toCached:function(){return _1(i.toCached())},bindFuture:function(n){return _1(i.bind(function(t){return t.fold(function(t){return Uy(mt.error(t))},function(t){return n(t)})}))},bindResult:function(n){return _1(i.map(function(t){return t.bind(n)}))},mapResult:function(n){return _1(i.map(function(t){return t.map(n)}))},mapError:function(n){return _1(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 _1(Wy(function(n){var e=!1,o=setTimeout(function(){e=!0,n(mt.error(r()))},t);i.get(function(t){e||(clearTimeout(o),n(t))})}))}})},T1=function(t){return _1(Wy(t))},E1={type:"separator"},D1=Ar("aria-invalid"),B1={bar:Tk(function(t,n){return e=n.shared,{dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:A(t.items,e.interpreter)};var e}),collection:Tk(function(t,n){return u=t,a=n.shared.providers,c=u.label.map(function(t){return Qb(t,a)}),s=e(function(t,n,e,o){n.stop(),a.isDisabled()||Ne(t,wy,{name:u.name,value:o})}),l=[Xe(lo(),e(function(t,n,e){Sa(e)})),Xe(bo(),s),Xe(Bo(),s),Xe(fo(),e(function(t,n,e){Fu(t.element,"."+Eh).each(function(t){Gr(t,Eh)}),Ur(e,Eh)})),Xe(mo(),e(function(t){Fu(t.element,"."+Eh).each(function(t){Gr(t,Eh)})})),tr(e(function(t,n,e,o){Ne(t,wy,{name:u.name,value:o})}))],$b(c,dy.parts.field({dom:{tag:"div",classes:["tox-collection"].concat(1!==u.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:h},behaviours:Za([fd.config({disabled:a.isDisabled,onDisabled:function(t){o(t,function(t){Ur(t,"tox-collection__item--state-disabled"),Or(t,"aria-disabled",!0)})},onEnabled:function(t){o(t,function(t){Gr(t,"tox-collection__item--state-disabled"),Dr(t,"aria-disabled")})}}),dv(),Mg.config({}),_f.config({store:{mode:"memory",initialValue:[]},onSetValue:function(o,t){var n=o,e=A(t,function(t){var n=sp.translate(t.text),e=1===u.columns?''+n+"
":"",o=''+t.icon+"
",r={_:" "," - ":" ","-":" "},i=n.replace(/\_| \- |\-/g,function(t){return r[t]});return''+o+e+"
"}),r=A("auto"!==u.columns&&1'+t.join("")+""});kr(n.element,r.join("")),"auto"===u.columns&&rh(o,5,"tox-collection__item").each(function(t){var n=t.numRows,e=t.numColumns;Bg.setGridSize(o,n,e)}),ze(o,_y)}}),gy.config({}),Bg.config(1===(i=u.columns)?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===i?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:".tox-collection__group",cell:"."+wh}}),lm("collection-events",l)]),eventOrder:((r={})[Eo()]=["disabling","alloy.base.behaviour","collection-events"],r)}),["tox-form__group--collection"],[]);function e(o){return function(n,e){Iu(e.event.target,"[data-collection-item-value]").each(function(t){o(n,e,t,_r(t,"data-collection-item-value"))})}}function o(t,n){return A(gs(t.element,".tox-collection__item"),n)}var u,a,r,i,c,s,l}),alertbanner:Tk(function(t,n){return o=n.shared.providers,sy.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in","tox-notification--"+(e=t).level]},components:[{dom:{tag:"div",classes:["tox-notification__icon"]},components:[cp.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:Nm(e.icon,o.icons),attributes:{title:o.translate(e.iconTooltip)}},action:function(t){Ne(t,wy,{name:"alert-banner",value:e.url})},buttonBehaviours:Za([Lm()])})]},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:o.translate(e.text)}}]});var e,o}),input:Tk(function(t,n){return o=n.shared.providers,bk({name:(e=t).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:Tk(function(t,n){return o=n.shared.providers,bk({name:(e=t).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:Tk(function(t,n){return r={dom:{tag:"label",innerHtml:(o=n.shared).providers.translate((e=t).label),classes:["tox-label"]}},i=A(e.items,o.interpreter),{dom:{tag:"div",classes:["tox-form__group"]},components:[r].concat(i),behaviours:Za([x0(),Mg.config({}),w0(ft.none()),Bg.config({mode:"acyclic"})])};var e,o,r,i}),iframe:(f1=function(t,n){return e=t,o=n.shared.providers,u=Mw&&e.sandboxed,a=st(st({},e.label.map(function(t){return{title:t}}).getOr({})),u?{sandbox:"allow-scripts allow-same-origin"}:{}),r=u,i=wn(""),c={getValue:function(t){return i.get()},setValue:function(t,n){var e;r?Or(t.element,"srcdoc",n):(Or(t.element,"src","javascript:''"),(e=t.element.dom.contentWindow.document).open(),e.write(n),e.close()),i.set(n)}},$b(e.label.map(function(t){return Qb(t,o)}),dy.parts.field({factory:{sketch:function(t){return f0({uid:t.uid,dom:{tag:"iframe",attributes:a},behaviours:Za([gy.config({}),Rg.config({}),Ew(ft.none(),c.getValue,c.setValue)])})}}}),["tox-form__group--stretched"],[]);var e,o,r,i,u,a,c},function(t,n,e){var o=Jn(n,{source:"dynamic"});return Tk(f1)(t,o,e)}),button:Tk(function(t,n){return e=t,o=n.shared.providers,r=yS(e.name,"custom"),$b(ft.none(),dy.parts.field(st({factory:cp},vS(e,ft.some(r),o,[Dw(""),x0()]))),[],[]);var e,o,r}),checkbox:Tk(function(t,n){return r=t,i=n.shared.providers,u=_f.config({store:{mode:"manual",getValue:function(t){return t.element.dom.checked},setValue:function(t,n){t.element.dom.checked=n}}}),a=dy.parts.field({factory:{sketch:h},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:Za([x0(),fd.config({disabled:function(){return r.disabled||i.isDisabled()}}),gy.config({}),Rg.config({}),u,Bg.config({mode:"special",onEnter:e,onSpace:e,stopSpaceKeyup:!0}),lm("checkbox-events",[Xe(vo(),function(t,n){Ne(t,by,{name:r.name})})])])}),c=dy.parts.label({dom:{tag:"span",classes:["tox-checkbox__label"],innerHtml:i.translate(r.label)},behaviours:Za([A0.config({})])}),s=Vm({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[o("checked"),o("unchecked")]}),dy.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[a,s.asSpec(),c],fieldBehaviours:Za([fd.config({disabled:function(){return r.disabled||i.isDisabled()},disableClass:"tox-checkbox--disabled",onDisabled:function(t){dy.getField(t).each(fd.disable)},onEnabled:function(t){dy.getField(t).each(fd.enable)}}),dv()])});function e(t){return t.element.dom.click(),ft.some(!0)}function o(t){return Wm("checked"===t?"selected":"unselected",{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+t]},i.icons)}var r,i,u,a,c,s}),colorinput:Tk(function(t,n){return e=t,r=n.shared,i=n.colorinput,c=dy.parts.field({factory:Ey,inputClasses:["tox-textfield"],onSetValue:function(t){return qy.run(t).get(ct)},inputBehaviours:Za([fd.config({disabled:r.providers.isDisabled}),dv(),gy.config({}),qy.config({invalidClass:"tox-textbox-field-invalid",getRoot:function(t){return ar(t.element)},notify:{onValid:function(t){var n=_f.getValue(t);Ne(t,M0,{color:n})}},validator:{validateOnLoad:!1,validate:function(t){var n=_f.getValue(t);if(0===n.length)return Uy(mt.value(!0));var e=de.fromTag("span");ni(e,"background-color",n);var o=ii(e,"background-color").fold(function(){return mt.error("blah")},function(t){return mt.value(n)});return Uy(o)}}})]),selectOnFocus:!1}),s=e.label.map(function(t){return Qb(t,r.providers)}),l=Vm((u={dom:{tag:"span",attributes:{"aria-label":r.providers.translate("Color swatch")}},layouts:{onRtl:function(){return[Ga,Ua,Ka]},onLtr:function(){return[Ua,Ga,Ka]}},components:[],fetch:bb(i.getColors(),i.hasCustomColors()),columns:i.getColorCols(),presets:"color",onItemAction:function(t,e){l.getOpt(t).each(function(n){"custom"===e?i.colorPicker(function(t){t.fold(function(){return ze(n,I0)},function(t){o(n,t),mb(t)})},"#ffffff"):o(n,"remove"===e?"":e)})}},B0.sketch({dom:u.dom,components:u.components,toggleClass:"mce-active",dropdownBehaviours:Za([qv((a=r).providers.isDisabled),dv(),A0.config({}),gy.config({})]),layouts:u.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:a.getSink,fetch:function(n){return Wy(function(t){return u.fetch(t)}).map(function(t){return ft.from(Lb(Jn(Sb(Ar("menu-value"),t,function(t){u.onItemAction(n,t)},u.columns,u.presets,yh.CLOSE_ON_EXECUTE,O,a.providers),{movement:kb(u.columns,u.presets)})))})},parts:{menu:Jp(0,0,u.presets)}}))),dy.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:s.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[c,l.asSpec()]}]),fieldBehaviours:Za([lm("form-field-events",[Xe(M0,function(t,n){l.getOpt(t).each(function(t){ni(t.element,"background-color",n.event.color)}),Ne(t,by,{name:e.name})}),Xe(F0,function(n,e){dy.getField(n).each(function(t){_f.setValue(t,e.event.value),id.getCurrent(n).each(Rg.focus)})}),Xe(I0,function(n,t){dy.getField(n).each(function(t){id.getCurrent(n).each(Rg.focus)})})])])});function o(t,n){Ne(t,F0,{value:n})}var e,r,i,u,a,c,s,l}),colorpicker:Tk(function(t){var r=Vm(u0(a0,function(t){return"tox-"+t}).sketch({dom:{tag:"div",classes:["tox-color-picker-container"],attributes:{role:"presentation"}},onValidHex:function(t){Ne(t,wy,{name:"hex-valid",value:!0})},onInvalidHex:function(t){Ne(t,wy,{name:"hex-valid",value:!1})}}));return{dom:{tag:"div"},components:[r.asSpec()],behaviours:Za([_f.config({store:{mode:"manual",getValue:function(t){var n=r.get(t);return id.getCurrent(n).bind(function(t){return _f.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);id.getCurrent(o).fold(function(){console.log("Can not find form")},function(t){_f.setValue(t,{hex:ft.from(e[1]).getOr("")}),hw.getField(t,"hex").each(function(t){ze(t,ho())})})}}}),x0()])}}),dropzone:Tk(function(t,n){return s0(t,n.shared.providers)}),grid:Tk(function(t,n){return e=n.shared,{dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--"+t.columns+"col"]},components:A(t.items,e.interpreter)};var e}),listbox:Tk(function(t,n){return e=t,r=(o=n).shared.providers,i=ot(e.items).filter(hk),u=e.label.map(function(t){return Qb(t,r)}),a={dom:{tag:"div",classes:["tox-listboxfield"]},components:[dy.parts.field({dom:{},factory:{sketch:function(t){return sS({uid:t.uid,text:i.map(function(t){return t.text}),icon:ft.none(),tooltip:e.label,role:ft.none(),fetch:function(t,n){n(fS(p1(t,e.name,e.items,_f.getValue(t)),yh.CLOSE_ON_EXECUTE,o,!1))},onSetup:tt(ct),getApi:tt({}),columns:1,presets:"normal",classes:[],dropdownBehaviours:[gy.config({}),_f.config({store:{mode:"manual",initialValue:i.map(function(t){return t.value}).getOr(""),getValue:function(t){return _r(t.element,g1)},setValue:function(n,t){h1(e.items,t).each(function(t){Or(n.element,g1,t.value),Ne(n,YS,{text:t.text})})}}})]},"tox-listbox",o.shared)}}})]},dy.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:lt([u.toArray(),[a]]),fieldBehaviours:Za([fd.config({disabled:tt(e.disabled),onDisabled:function(t){dy.getField(t).each(fd.disable)},onEnabled:function(t){dy.getField(t).each(fd.enable)}})])});var e,o,r,i,u,a}),selectbox:Tk(function(t,n){return e=t,o=n.shared.providers,r=A(e.items,function(t){return{text:o.translate(t.text),value:t.value}}),i=e.label.map(function(t){return Qb(t,o)}),u={dom:{tag:"div",classes:["tox-selectfield"]},components:lt([[dy.parts.field({dom:{},selectAttributes:{size:e.size},options:r,factory:v1,selectBehaviours:Za([fd.config({disabled:function(){return e.disabled||o.isDisabled()}}),gy.config({}),lm("selectbox-change",[Xe(vo(),function(t,n){Ne(t,by,{name:e.name})})])])})],(1
e)return"top";var r=ir(a),i=Math.max(r.dom.scrollHeight,vi(r));return o.bottom=(e=void 0===e?.01:e)&&t.bottom-n.y>=e}function b_(t){var n=function(t){var n=t.getBoundingClientRect();if(n.height<=0&&n.width<=0){var e=dr(de.fromDom(t.startContainer),t.startOffset).element;return(Vi(e)?ar(e):ft.some(e)).filter(Ri).map(function(t){return t.dom.getBoundingClientRect()}).getOr(n)}return n}(t.selection.getRng());if(t.inline){var e=Oi();return Bi(e.left+n.left,e.top+n.top,n.width,n.height)}var o=Mi(de.fromDom(t.getBody()));return Bi(o.x+n.left,o.y+n.top,n.width,n.height)}function y_(t,n,e,o){void 0===o&&(o=0);var r,i,u,a,c=Ei(window),s=Ai(de.fromDom(t.getContentAreaContainer())),l=dh(t)||mh(t)||nv(t),f=(r=s,i=c,u=o,{x:a=Math.max(r.x+u,i.x),width:Math.min(r.right-u,i.right)-a}),d=f.x,m=f.width;if(t.inline&&!l)return Bi(d,c.y,m,c.height);var g=function(t,n,e,o,r,i){var u=de.fromDom(t.getContainer()),a=Ai(Fu(u,".tox-editor-header").getOr(u)),c=a.y>=n.bottom,s=o&&!c;if(t.inline&&s)return{y:Math.max(a.bottom+i,e.y),bottom:e.bottom};if(t.inline&&!s)return{y:e.y,bottom:Math.min(a.y-i,e.bottom)};var l="line"===r?Ai(u):n;return s?{y:Math.max(a.bottom+i,e.y),bottom:Math.min(l.bottom-i,e.bottom)}:{y:Math.max(l.y+i,e.y),bottom:Math.min(a.y-i,e.bottom)}}(t,s,c,n.header.isPositionedAtTop(),e,o),p=g.y;return Bi(d,p,m,g.bottom-p)}function x_(t){return"node"===t}function w_(t,r,n,i,e){var u=b_(t),o=i.lastElement().exists(function(t){return Bn(n,t)}),a=n,c=t.selection.getRng(),s=dr(de.fromDom(c.startContainer),c.startOffset);return c.startContainer===c.endContainer&&c.startOffset===c.endOffset-1&&Bn(s.element,a)?o?Fm:ip:o?function(n,t){var e=ii(n,"position");ni(n,"position",t);var o=v_(u,Ai(r))&&!i.isReposition()?Rm:Fm;return e.each(function(t){return ni(n,"position",t)}),o}(r,i.getMode()):("fixed"===i.getMode()?e.y+Oi().top:e.y)+(vi(r)+12)<=u.y?ip:up}function S_(n,t){var e=M(F(t,function(t){return t.predicate(n.dom)}),function(t){return"contexttoolbar"===t.type});return{contextToolbars:e.pass,contextForms:e.fail}}function k_(e,t){function o(t){return Bn(t,r)}var n,r=de.fromDom(t.getBody()),i=de.fromDom(t.selection.getNode());return o(n=i)||An(r,n)?function(t,n,e){var o=S_(t,n);if(0=o.clientX&&t.top<=o.clientY&&t.bottom>=o.clientY})}}(f,d)?n():(f.once("selectionchange",n),f.once("touchend",function(){return f.off("selectionchange",n)}))):t()}function yT(t){return"string"==typeof t?t.split(/[ ,]/):t}function xT(t){return t.getParam("contextmenu_never_use_native",!1,"boolean")}function wT(t){return y(t)?"|"===t:"separator"===t.type}function ST(t,n){if(0===n.length)return t;var e=Y(t).filter(function(t){return!wT(t)}).fold(function(){return[]},function(t){return[eE]});return t.concat(e).concat(n).concat([eE])}function kT(t,n){return"longpress"!==n.type&&(2!==n.button||n.target===t.getBody()&&""===n.pointerType)}function CT(t,n){return kT(t,n)?t.selection.getStart(!0):n.target}function OT(s,t,n){function e(t){return op.hide(i)}function o(c){var t;xT(s)&&c.preventDefault(),c.ctrlKey&&!xT(s)||!1===s.getParam("contextmenu")||(t=function(t,n){var e=t.getParam("contextmenu_avoid_overlap","","string"),o=kT(t,n)?"selection":"point";if(On(e)){var r=CT(t,n);return jb(de.fromDom(r),e)?"node":o}return o}(s,c),(r()?bT:function(t,n,e,o,r,i){var u=e(),a=vT(t,n,i);fS(u,yh.CLOSE_ON_EXECUTE,o,!1).map(function(t){n.preventDefault(),op.showMenuAt(r,{anchor:a},{menu:{markers:Kp("normal")},data:t})})})(s,c,function(){var t,n,e,o=CT(s,c),r=s.ui.registry.getAll(),i=(e=(n=s).ui.registry.getAll().contextMenus,ft.from(n.getParam("contextmenu")).map(yT).getOrThunk(function(){return F(yT("link linkchecker image imagetools table spellchecker configurepermanentpen"),function(t){return Kn(e,t)})})),u=r.contextMenus,a=o;return 0<(t=R(i,function(o,t){return kt(u,t.toLowerCase()).map(function(t){var n=t.update(a);if(y(n))return ST(o,n.split(" "));if(0e;(o||r)&&ni(t.element,"display","none")}(t)}function i(t){return r(h,t,n,"top")}function u(t){return r(v,t,o,"bottom")}var c=wn([]),s=wn([]),t=wn(!1),l=fc(),f=fc(),d=YT(function(){return A(c.get(),n)},l,function(n){f.get().each(function(t){a.fire("TableSelectorChange",{start:n,finish:t})})}),m=YT(function(){return A(s.get(),o)},f,function(n){l.get().each(function(t){a.fire("TableSelectorChange",{start:t,finish:n})})}),g=qT(d),p=qT(m),h=bu(g.asSpec()),v=bu(p.asSpec());Be().deviceType.isTouch()&&(a.on("TableSelectionChange",function(n){t.get()||(Fs(e,h),Fs(e,v),t.set(!0)),l.set(n.start),f.set(n.finish),n.otherCells.each(function(t){c.set(t.upOrLeftCells),s.set(t.downOrRightCells),i(n.start),u(n.finish)})}),a.on("ResizeEditor ResizeWindow ScrollContent",function(){l.get().each(i),f.get().each(u)}),a.on("TableSelectionClear",function(){t.get()&&(Rs(h),Rs(v),t.set(!1)),l.clear(),f.clear()}))}var JT,$T,QT={name:"lineheight",text:"Line height",icon:"line-height",getOptions:function(t){return t.getParam("lineheight_formats","1 1.1 1.2 1.3 1.4 1.5 2","string").split(" ")},hash:function(t){return r=["fixed","relative","empty"],ft.from(uT.exec(t)).bind(function(t){var n=Number(t[1]),e=t[2],o=e;return T(r,function(t){return T(iT[t],function(t){return o===t})})?ft.some({value:n,unit:e}):ft.none()}).map(function(t){return t.value+t.unit}).getOr(t);var r},display:h,watcher:function(t,n,e){return t.formatter.formatChanged("lineheight",e,!1,{value:n}).unbind},getCurrent:function(t){return ft.from(t.queryCommandValue("LineHeight"))},setCurrent:function(t,n){return t.execCommand("LineHeight",!1,n)}},ZT=function(t){return{type:"selection",root:de.fromDom(t.selection.getNode())}},tE={onLtr:function(){return[Ka,Ua,Ga,Xa,Ya,qa,ip,up,Dm,Tm,Em,_m]},onRtl:function(){return[Ka,Ga,Ua,Ya,Xa,qa,ip,up,Em,_m,Dm,Tm]}},nE={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"]},eE={type:"separator"},oE=function(n){function t(t){return{text:t.text,icon:t.icon,disabled:t.disabled,shortcut:t.shortcut}}var e;if(y(n))return n;switch(n.type){case"separator":return eE;case"submenu":return st(st({type:"nestedmenuitem"},t(n)),{getSubmenuItems:function(){var t=n.getSubmenuItems();return y(t)?t:A(t,oE)}});default:return st(st({type:"menuitem"},t(n)),{onAction:(e=n.onAction,function(){return e()})})}},rE=Vn([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),iE=rE.offset,uE=rE.absolute,aE=rE.fixed,cE=function(t,n,l,f,d){var e=n.getSnapPoints(t);return VT(e,l,f,d).orThunk(function(){return R(e,function(n,e){var t,o,r,i,u,a,c,s=(t=e.sensor,e.range.left,e.range.top,i=BT(l,o=f,r=d),u=BT(t,o,r),a=Math.abs(i.left-u.left),c=Math.abs(i.top-u.top),Su(a,c));return n.deltas.fold(function(){return{deltas:ft.some(s),snap:ft.some(e)}},function(t){return(s.left+s.top)/2<=(t.left+t.top)/2?{deltas:ft.some(s),snap:ft.some(e)}:n})},{deltas:ft.none(),snap:ft.none()}).snap.map(function(t){return{output:FT(t.output,l,f,d),extra:t.extra}})})},sE=function(t,n,e,o,r){return VT(n.getSnapPoints(t),e,o,r)},lE=Object.freeze({__proto__:null,snapTo:function(t,n,e,o){var r,i,u,a=n.getTarget(t.element);n.repositionTarget&&(r=Oi(or(t.element)),i=tC(a),oi(a,MT({coord:FT((u=o).output,u.output,r,i),extra:u.extra}.coord,0,i)))}}),fE="data-initial-z-index",dE=fn("snaps",[Jt("getSnapPoints"),Ku("onSensor"),Jt("leftAttr"),Jt("topAttr"),dn("lazyViewport",Fi),dn("mustSnap",!1)]),mE=[dn("useFixed",O),Jt("blockerClass"),dn("getTarget",h),dn("onDrag",ct),dn("repositionTarget",!0),dn("onDrop",ct),bn("getBounds",Fi),dE],gE=Object.freeze({__proto__:null,getData:function(t){return ft.from(Su(t.x,t.y))},getDelta:function(t,n){return Su(n.left-t.left,n.top-t.top)}}),pE=H(H([],mE),[Zu("dragger",{handlers:WT(UT)})]),hE=Object.freeze({__proto__:null,getData:function(t){var n,e=t.raw.touches;return 1===e.length?(n=e[0],ft.some(Su(n.clientX,n.clientY))):ft.none()},getDelta:function(t,n){return Su(n.left-t.left,n.top-t.top)}}),vE=H(H([],mE),[Zu("dragger",{handlers:WT(GT)})]),bE=H(H([],mE),[Zu("dragger",{handlers:WT(function(t,n,e){return H(H([],UT(t,n,e)),GT(t,n,e))})})]),yE=wa({branchKey:"mode",branches:Object.freeze({__proto__:null,mouse:pE,touch:vE,mouseOrTouch:bE}),name:"dragging",active:{events:function(t,n){return t.dragger.handlers(t,n)}},extra:{snap:function(t){return{sensor:t.sensor,range:t.range,output:t.output,extra:ft.from(t.extra)}}},state:Object.freeze({__proto__:null,init:function(){var i=ft.none(),n=ft.none(),t=tt({});return au({readState:t,reset:function(){i=ft.none(),n=ft.none()},update:function(r,t){return r.getData(t).bind(function(t){return n=r,e=t,o=i.map(function(t){return n.getDelta(t,e)}),i=ft.some(e),o;var n,e,o})},getStartData:function(){return n},setStartData:function(t){n=ft.some(t)}})}}),apis:lE});function xE(t,n,e){var o,r,i,u,a,c,s=de.fromDom(t.getContainer());bt((o=t,r=n,i=e,u=vi(s),a=wi(s),(c={}).height=d_(u+r.top,sh(o),fh(o)),i===JT.Both&&(c.width=d_(a+r.left,ch(o),lh(o))),c),function(t,n){return ni(s,n,f_(t)),0}),t.fire("ResizeEditor")}function wE(t,n,e,o){return xE(t,Su(20*e,20*o),n),ft.some(!0)}function SE(t,n){var e,o,r,i,u,a,c,s,l,f,d,m,g,p,h,v;return{dom:{tag:"div",classes:["tox-statusbar"]},components:(v=[],t.getParam("elementpath",!0,"boolean")&&v.push((g=t,h=n,(p={}).delimiter||(p.delimiter="\xbb"),{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:Za([Bg.config({mode:"flow",selector:"div[role=button]"}),fd.config({disabled:h.isDisabled}),dv(),gy.config({}),Mg.config({}),lm("elementPathEvents",[$o(function(r,t){g.shortcuts.add("alt+F11","focus statusbar elementpath",function(){return Bg.focusIn(r)}),g.on("NodeChange",function(t){var n,o,e=function(t){for(var n=[],e=t.length;0'+l+""}}),e=0=o.dom.offsetLeft+wi(o)?Math.max(vi(o),u):u,c=parseInt(ri(n,"margin-top"),10)||0,s=parseInt(ri(n,"margin-bottom"),10)||0,i-(vi(n)+c+s-a)));var n,e,o,r,i,u,a,c,s}).each(function(t){EE(d,t)})})})}function BE(t){return Fu(t,'[role="tabpanel"]')}function AE(t,e){function o(t){var n=TE(_f.getValue(t)).getOr({}),e=i.get(),o=Jn(e,n);i.set(o)}function r(t){var n=i.get();_f.setValue(t,n)}var u,a,i=wn({}),c=wn(null),n=A(t.tabs,function(t){return{value:t.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"],innerHtml:e.shared.providers.translate(t.title)},view:function(){return[hw.sketch(function(n){return{dom:{tag:"div",classes:["tox-form"]},components:A(t.items,function(t){return Ek(n,t,e)}),formBehaviours:Za([Bg.config({mode:"acyclic",useTabstopAt:k(g0)}),lm("TabView.form.events",[$o(r),Qo(o)]),oc.config({channels:Me([{key:RB,value:{onReceive:o}},{key:VB,value:{onReceive:r}}])})])}})]}}}),s=(u=n,a=fc(),{extraEvents:[$o(function(t){var o=t.element;BE(o).each(function(e){var n;ni(e,"visibility","hidden"),t.getSystem().getByDom(e).toOptional().each(function(t){var o,r,i,n=(r=e,i=t,A(o=u,function(t,n){Mg.set(i,o[n].view());var e=r.dom.getBoundingClientRect();return Mg.set(i,[]),e.height}));ot(G(n,function(t,n){return n"+n.translate(t)+"")}]}]})}function PE(t){return cD.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:t})}function HE(t,n){return[sy.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:t}),sy.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:n})]}function zE(n){var t,e="tox-dialog",o=e+"-wrap",r=o+"__backdrop",i=e+"__disable-scroll";return cD.sketch({lazySink:n.lazySink,onEscape:function(t){return n.onEscape(t),ft.some(!0)},useTabstopAt:function(t){return!g0(t)},dom:{tag:"div",classes:[e].concat(n.extraClasses),styles:st({position:"relative"},n.extraStyles)},components:H([n.header,n.body],n.footer.toArray()),parts:{blocker:{dom:MC(''),components:[{dom:{tag:"div",classes:jB?[r,r+"--opaque"]:[r]}}]}},dragBlockClass:o,modalBehaviours:Za(H([Rg.config({}),lm("dialog-events",n.dialogEvents.concat([Qe(fo(),function(t,n){Bg.focusIn(t)})])),lm("scroll-lock",[$o(function(){Ur(mu(),i)}),Qo(function(){Gr(mu(),i)})])],n.extraBehaviours)),eventOrder:st(((t={})[Eo()]=["dialog-events"],t[zo()]=["scroll-lock","dialog-events","alloy.base.behaviour"],t[No()]=["alloy.base.behaviour","dialog-events","scroll-lock"],t),n.eventOrder)})}function NE(t){return cp.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:[Wm("close",{tag:"div",classes:["tox-icon"]},t.icons)],action:function(t){ze(t,xy)}})}function LE(t,n,e){function o(t){return[pi(e.translate(t.title))]}return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:st({},n.map(function(t){return{id:t}}).getOr({}))},components:o(t),behaviours:Za([R_.config({channel:HB,renderComponents:o})])}}function jE(){return{dom:MC('')}}function WE(t,n){return e={title:n.shared.providers.translate(t),draggable:n.dialog.isDraggableModal()},o=n.shared.providers,r=cD.parts.title(LE(e,ft.none(),o)),i=cD.parts.draghandle(jE()),u=cD.parts.close(NE(o)),a=[r].concat(e.draggable?[i]:[]).concat([u]),sy.sketch({dom:MC(''),components:a});var e,o,r,i,u,a}function UE(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:MC('')}]}}function GE(t,o,n){return{onClose:function(){return n.closeWindow()},onBlock:function(e){cD.setBusy(t(),function(t,n){return UE(e.message,n,o)})},onUnblock:function(){cD.setIdle(t())}}}function XE(t,n,e,o){var r;return bu(zE(st(st({},t),{lazySink:o.shared.getSink,extraBehaviours:H([R_.config({channel:PB,updateState:function(t,n){return ft.some(n)},initialData:n}),Dw({})],t.extraBehaviours),onEscape:function(t){ze(t,xy)},dialogEvents:e,eventOrder:((r={})[To()]=[R_.name(),oc.name()],r[zo()]=["scroll-lock",R_.name(),"messages","dialog-events","alloy.base.behaviour"],r[No()]=["alloy.base.behaviour","dialog-events","messages",R_.name(),"scroll-lock"],r)})))}function YE(t){return A(t,function(t){return"menu"===t.type?(e=A((n=t).items,function(t){var n=wn(!1);return st(st({},t),{storage:n})}),st(st({},n),{items:e})):t;var n,e})}function qE(t){return R(t,function(t,n){return"menu"!==n.type?t:R(n.items,function(t,n){return t[n.name]=n.storage,t},t)},{})}function KE(t,e){return[Je(fo(),m0),t(yy,function(t,n){e.onClose(),n.onClose()}),t(xy,function(t,n,e,o){n.onCancel(t),ze(o,yy)}),Xe(Cy,function(t,n){return e.onUnblock()}),Xe(ky,function(t,n){return e.onBlock(n.event)})]}function JE(t,n){function e(t,n){return sy.sketch({dom:{tag:"div",classes:["tox-dialog__footer-"+t]},components:A(n,function(t){return t.memento.asSpec()})})}var o=M(n.map(function(t){return t.footerButtons}).getOr([]),function(t){return"start"===t.align});return[e("start",o.pass),e("end",o.fail)]}function $E(t,e){return{dom:MC(''),components:[],behaviours:Za([R_.config({channel:NB,initialData:t,updateState:function(t,n){var r=A(n.buttons,function(t){var n=Vm(xS(t,t.type,e));return{name:t.name,align:t.align,memento:n}});return ft.some({lookupByName:function(t,n){return e=t,o=n,V(r,function(t){return t.name===o}).bind(function(t){return t.memento.getOpt(e)});var e,o},footerButtons:r})},renderComponents:JE})])}}function QE(t,n){return cD.parts.footer($E(t,n))}function ZE(n,e){if(n.getRoot().getSystem().isConnected()){var o=id.getCurrent(n.getFormWrapper()).getOr(n.getFormWrapper());return hw.getField(o,e).fold(function(){var t=n.getFooter();return R_.getState(t).get().bind(function(t){return t.lookupByName(o,e)})},function(t){return ft.some(t)})}return ft.none()}function tD(c,o,s){function t(t){var n=c.getRoot();n.getSystem().isConnected()&&t(n)}var l={getData:function(){var t=c.getRoot(),n=t.getSystem().isConnected()?c.getFormWrapper():t,e=_f.getValue(n),o=yt(s,function(t){return t.get()});return st(st({},e),o)},setData:function(a){t(function(t){var n,e,o=l.getData(),r=st(st({},o),a),i=(n=r,e=c.getRoot(),R_.getState(e).get().map(function(t){return Xt(Gt("data",t.dataValidator,n))}).getOr(n)),u=c.getFormWrapper();_f.setValue(u,i),bt(s,function(t,n){Kn(r,n)&&t.set(r[n])})})},disable:function(t){ZE(c,t).each(fd.disable)},enable:function(t){ZE(c,t).each(fd.enable)},focus:function(t){ZE(c,t).each(Rg.focus)},block:function(n){if(!y(n))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");t(function(t){Ne(t,ky,{message:n})})},unblock:function(){t(function(t){ze(t,Cy)})},showTab:function(e){t(function(t){var n=c.getBody();R_.getState(n).get().exists(function(t){return t.isTabPanel()})&&id.getCurrent(n).each(function(t){IB.showTab(t,e)})})},redial:function(e){t(function(t){var n=o(e);t.getSystem().broadcastOn([PB],n),t.getSystem().broadcastOn([HB],n.internalDialog),t.getSystem().broadcastOn([zB],n.internalDialog),t.getSystem().broadcastOn([NB],n.internalDialog),l.setData(n.initialData)})},close:function(){t(function(t){ze(t,yy)})}};return l}function nD(t){return x(t)&&-1!==YB.indexOf(t.mceAction)}function eD(o,t,r,n){var e,i,u,a=WE(o.title,n),c=(i={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[f0({dom:{tag:"iframe",attributes:{src:o.url}},behaviours:Za([gy.config({}),Rg.config({})])})]}],behaviours:Za([Bg.config({mode:"acyclic",useTabstopAt:k(g0)})])},cD.parts.body(i)),s=o.buttons.bind(function(t){return 0===t.length?ft.none():ft.some(QE({buttons:t},n))}),l=WB(function(){return v},GE(function(){return h},n.shared.providers,t)),f=st(st({},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"}})),d=o.width.isNone()&&o.height.isNone()?["tox-dialog--width-lg"]:[],m=new XB(o.url,{base_uri:new XB(window.location.href)}),g=m.protocol+"://"+m.host+(m.port?":"+m.port:""),p=lc(),h=XE({header:a,body:c,footer:s,extraClasses:d,extraBehaviours:[lm("messages",[$o(function(){var t=dc(de.fromDom(window),"message",function(t){var n,e;m.isSameOrigin(new XB(t.raw.origin))&&(nD(n=t.raw.data)?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=!!w(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,v,n):!nD(e=n)&&x(e)&&Kn(e,"mceAction")&&o.onMessage(v,n))});p.set(t)}),Qo(p.clear)]),oc.config({channels:((e={})[LB]={onReceive:function(t,n){Fu(t.element,"iframe").each(function(t){t.dom.contentWindow.postMessage(n,g)})}},e)})],extraStyles:f},o,l,n),v={block:function(n){if(!y(n))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");b(function(t){Ne(t,ky,{message:n})})},unblock:function(){b(function(t){ze(t,Cy)})},close:function(){b(function(t){ze(t,yy)})},sendMessage:function(n){b(function(t){t.getSystem().broadcastOn([LB],n)})}};function b(t){u.getSystem().isConnected()&&t(u)}return{dialog:u=h,instanceApi:v}}function oD(t){function o(t,y){return _B.open(function(t,n,e){var o,r,i,u,a,c,s,l,f,d,m,g,p,h,v=n,b=(r={redial:_B.redial,closeWindow:function(){cD.hide(b.dialog),y(b.instanceApi)}},i=R,c=WE((o={dataValidator:e,initialData:v,internalDialog:t}).internalDialog.title,i),u=i,a=ME({body:o.internalDialog.body},ft.none(),u,!1),s=cD.parts.body(a),l=YE(o.internalDialog.buttons),f=qE(l),d=QE({buttons:l},i),m=UB(function(){return h},GE(function(){return p},i.shared.providers,r),i.shared.getSink),g=function(){switch(o.internalDialog.size){case"large":return["tox-dialog--width-lg"];case"medium":return["tox-dialog--width-md"];default:return[]}}(),p=XE({header:c,body:s,footer:ft.some(d),extraClasses:g,extraBehaviours:[],extraStyles:{}},o,m,i),h=tD({getRoot:tt(p),getBody:function(){return cD.getBody(p)},getFooter:function(){return cD.getFooter(p)},getFormWrapper:function(){var t=cD.getBody(p);return id.getCurrent(t).getOr(t)}},r.redial,f),{dialog:p,instanceApi:h});return cD.show(b.dialog),b.instanceApi.setData(v),b.instanceApi},t)}function r(t,M,F,I){return _B.open(function(t,n,e){function o(){return E.on(function(t){op.reposition(t),nO.refresh(t)})}var r,i,u,a,c,s,l,f,d,m,g,p,h,v,b,y,x,w,S,k,C,O,_,T=Xt(Gt("data",e,n)),E=fc(),D=R.shared.header.isPositionedAtTop(),B=(i={dataValidator:e,initialData:T,internalDialog:t},u={redial:_B.redial,closeWindow:function(){E.on(op.hide),V.off("ResizeEditor",o),E.clear(),F(B.instanceApi)}},a=R,c=I,v=Ar("dialog-label"),b=Ar("dialog-content"),y=Vm((f={title:i.internalDialog.title,draggable:!0},d=v,m=a.shared.providers,sy.sketch({dom:MC(''),components:[LE(f,ft.some(d),m),jE(),NE(m)],containerBehaviours:Za([yE.config({mode:"mouse",blockerClass:"blocker",getTarget:function(t){return Iu(t,'[role="dialog"]').getOrDie()},snaps:{getSnapPoints:function(){return[]},leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])}))),x=Vm((g={body:i.internalDialog.body},p=a,h=c,ME(g,ft.some(b),p,h))),w=YE(i.internalDialog.buttons),S=qE(w),k=Vm(GB({buttons:w},a)),C=UB(function(){return _},{onBlock:function(e){kO.block(O,function(t,n){return UE(e.message,n,a.shared.providers)})},onUnblock:function(){kO.unblock(O)},onClose:function(){return u.closeWindow()}},a.shared.getSink),O=bu({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline"],attributes:((s={role:"dialog"})["aria-labelledby"]=v,s["aria-describedby"]=b,s)},eventOrder:((l={})[To()]=[R_.name(),oc.name()],l[Eo()]=["execute-on-form"],l[zo()]=["reflecting","execute-on-form"],l),behaviours:Za([Bg.config({mode:"cyclic",onEscape:function(t){return ze(t,yy),ft.some(!0)},useTabstopAt:function(t){return!g0(t)&&("button"!==nr(t)||"disabled"!==_r(t,"disabled"))}}),R_.config({channel:PB,updateState:function(t,n){return ft.some(n)},initialData:i}),Rg.config({}),lm("execute-on-form",C.concat([Qe(fo(),function(t,n){Bg.focusIn(t)})])),kO.config({getRoot:function(){return ft.some(O)}}),Mg.config({}),Dw({})]),components:[y.asSpec(),x.asSpec(),k.asSpec()]}),_=tD({getRoot:tt(O),getFooter:function(){return k.get(O)},getBody:function(){return x.get(O)},getFormWrapper:function(){var t=x.get(O);return id.getCurrent(t).getOr(t)}},u.redial,S),{dialog:O,instanceApi:_}),A=bu(op.sketch(st(st({lazySink:R.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{}},D?{}:{fireRepositionEventInstead:{}}),{inlineBehaviours:Za(H([lm("window-manager-inline-events",[Xe(Lo(),function(t,n){ze(B.dialog,xy)})])],(r=V,P&&D?[]:[nO.config({contextual:{lazyContext:function(){return ft.some(Ai(de.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 jb(e=n,".tox-alert-dialog")||jb(e,".tox-confirm-dialog");var e}})));return E.set(A),op.showWithin(A,yu(B.dialog),{anchor:M},ft.some(mu())),P&&D||(nO.refresh(A),V.on("ResizeEditor",o)),B.instanceApi.setData(T),Bg.focusIn(B.dialog),B.instanceApi},t)}var c,s,l,f,R=t.backstage,V=t.editor,P=sv(V),e=(s=(c=t).backstage.shared,{open:function(t,n){function e(){cD.hide(u),n()}var o=Vm(xS({name:"close-alert",text:"OK",primary:!0,align:"end",disabled:!1,icon:ft.none()},"cancel",c.backstage)),r=RE(),i=IE(e,s.providers),u=bu(zE({lazySink:function(){return s.getSink()},header:FE(r,i),body:VE(t,s.providers),footer:ft.some(PE(HE([],[o.asSpec()]))),onEscape:e,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Xe(xy,e)],eventOrder:{}}));cD.show(u);var a=o.get(u);Rg.focus(a)}}),i=(f=(l=t).backstage.shared,{open:function(t,n){function e(t){cD.hide(a),n(t)}var o=Vm(xS({name:"yes",text:"Yes",primary:!0,align:"end",disabled:!1,icon:ft.none()},"submit",l.backstage)),r=xS({name:"no",text:"No",primary:!1,align:"end",disabled:!1,icon:ft.none()},"cancel",l.backstage),i=RE(),u=IE(function(){return e(!1)},f.providers),a=bu(zE({lazySink:function(){return f.getSink()},header:FE(i,u),body:VE(t,f.providers),footer:ft.some(PE(HE([],[r,o.asSpec()]))),onEscape:function(){return e(!1)},extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Xe(xy,function(){return e(!1)}),Xe(Sy,function(){return e(!0)})],eventOrder:{}}));cD.show(a);var c=o.get(a);Rg.focus(c)}});return{open:function(t,n,e){return void 0!==n&&"toolbar"===n.inline?r(t,R.shared.anchors.inlineDialog(),e,n.ariaAttrs):void 0!==n&&"cursor"===n.inline?r(t,R.shared.anchors.cursor(),e,n.ariaAttrs):o(t,e)},openUrl:function(t,n){return e=n,_B.openUrl(function(t){var n=eD(t,{closeWindow:function(){cD.hide(n.dialog),e(n.instanceApi)}},V,R);return cD.show(n.dialog),n.instanceApi},t);var e},alert:function(t,n){e.open(t,function(){n()})},close:function(t){t.close()},confirm:function(t,n){i.open(t,function(t){n(t)})}}}($T=JT=JT||{})[$T.None=0]="None",$T[$T.Both=1]="Both",$T[$T.Vertical=2]="Vertical";var rD,iD=tt([Jt("lazySink"),rn("dragBlockClass"),bn("getBounds",Fi),dn("useTabstopAt",_),dn("eventOrder",{}),Js("modalBehaviours",[Bg]),Ju("onExecute"),Qu("onEscape")]),uD={sketch:h},aD=tt([Kf({name:"draghandle",overrides:function(t,n){return{behaviours:Za([yE.config({mode:"mouse",getTarget:function(t){return Mu(t,'[role="dialog"]').getOr(t)},blockerClass:t.dragBlockClass.getOrDie(new Error("The drag blocker class was not specified for a dialog with a drag handle: \n"+JSON.stringify(n,null,2)).message),getBounds:t.getDragBounds})])}}}),Yf({schema:[Jt("dom")],name:"title"}),Yf({factory:uD,schema:[Jt("dom")],name:"close"}),Yf({factory:uD,schema:[Jt("dom")],name:"body"}),Kf({factory:uD,schema:[Jt("dom")],name:"footer"}),qf({factory:{sketch:function(t,n){return st(st({},t),{dom:n.dom,components:n.components})}},schema:[dn("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),dn("components",[])],name:"blocker"})]),cD=wl({name:"ModalDialog",configFields:iD(),partFields:aD(),factory:function(a,t,n,r){var e,i=fc(),o=Ar("modal-events"),u=st(st({},a.eventOrder),((e={})[zo()]=[o].concat(a.eventOrder["alloy.system.attached"]||[]),e));return{uid:a.uid,dom:a.dom,components:t,apis:{show:function(t){i.set(t);var n=a.lazySink(t).getOrDie(),e=r.blocker(),o=n.getSystem().build(st(st({},e),{components:e.components.concat([yu(t)]),behaviours:Za([Rg.config({}),lm("dialog-blocker-events",[Qe(fo(),function(){Bg.focusIn(t)})])])}));Fs(n,o),Bg.focusIn(t)},hide:function(n){i.clear(),ar(n.element).each(function(t){n.getSystem().getByDom(t).each(function(t){Rs(t)})})},getBody:function(t){return fl(t,a,"body")},getFooter:function(t){return fl(t,a,"footer")},setIdle:function(t){kO.unblock(t)},setBusy:function(t,n){kO.block(t,n)}},eventOrder:u,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:Qs(a.modalBehaviours,[Mg.config({}),Bg.config({mode:"cyclic",onEnter:a.onExecute,onEscape:a.onEscape,useTabstopAt:a.useTabstopAt}),kO.config({getRoot:i.get}),lm(o,[$o(function(t){var n,e,o,r=t.element,i=fl(t,a,"title").element,u=Tr(r,"id").fold(function(){var t=Ar("dialog-label");return Or(i,"id",t),t},h);Or(r,"aria-labelledby",u),n=t.element,e=fl(t,a,"body").element,o=ft.from(_r(n,"id")).fold(function(){var t=Ar("dialog-describe");return Or(e,"id",t),t},h),Or(n,"aria-describedby",o)})])])}},apis:{show:function(t,n){t.show(n)},hide:function(t,n){t.hide(n)},getBody:function(t,n){return t.getBody(n)},getFooter:function(t,n){return t.getFooter(n)},setBusy:function(t,n,e){t.setBusy(n,e)},setIdle:function(t,n){t.setIdle(n)}}}),sD=te([Qt("type"),Qt("name")].concat(Hh)),lD=ie,fD=[le("name","name",Et(function(){return Ar("button-name")}),re),cn("icon"),hn("align","end",["start","end"]),vn("primary",!1),vn("disabled",!1)],dD=H(H([],fD),[Qt("text")]),mD=H([Zt("type",["submit","cancel","custom"])],dD),gD=qt("type",{submit:mD,cancel:mD,custom:mD,menu:H([Zt("type",["menu"]),cn("text"),cn("tooltip"),cn("icon"),on("items",sD)],fD)}),pD=[Qt("type"),Qt("text"),Zt("level",["info","warn","error","success"]),Qt("icon"),dn("url","")],hD=te(pD),vD=[Qt("type"),Qt("text"),vn("disabled",!1),vn("primary",!1),le("name","name",Et(function(){return Ar("button-name")}),re),cn("icon"),vn("borderless",!1)],bD=te(vD),yD=[Qt("type"),Qt("name"),Qt("label"),vn("disabled",!1)],xD=te(yD),wD=ie,SD=[Qt("type"),Qt("name")],kD=SD.concat([cn("label")]),CD=kD.concat([dn("columns","auto")]),OD=te(CD),_D=ne([Qt("value"),Qt("text"),Qt("icon")]),TD=te(kD),ED=re,DD=te(kD),BD=re,AD=SD.concat([pn("tag","textarea"),Qt("scriptId"),Qt("scriptUrl"),mn("settings",void 0,ce)]),MD=SD.concat([pn("tag","textarea"),tn("init")]),FD=Wt(function(t){return Gt("customeditor.old",Ht(MD),t).orThunk(function(){return Gt("customeditor.new",Ht(AD),t)})}),ID=re,RD=te(kD),VD=zt(Zn),PD=[Qt("type"),Qt("html"),hn("presets","presentation",["presentation","document"])],HD=te(PD),zD=kD.concat([vn("sandboxed",!0)]),ND=te(zD),LD=re,jD=kD.concat([$t("currentState",te([Jt("blob"),Qt("url")]))]),WD=te(jD),UD=kD.concat([cn("inputMode"),cn("placeholder"),vn("maximized",!1),vn("disabled",!1)]),GD=te(UD),XD=re,YD=[Qt("text"),Qt("value")],qD=[Qt("text"),on("items",(rD=_t(function(){return KD}),{extract:function(t,n){return rD().extract(t,n)},toString:function(){return rD().toString()}}))],KD=Nt([te(YD),te(qD)]),JD=kD.concat([on("items",KD),vn("disabled",!1)]),$D=te(JD),QD=re,ZD=kD.concat([en("items",[Qt("text"),Qt("value")]),gn("size",1),vn("disabled",!1)]),tB=te(ZD),nB=re,eB=kD.concat([vn("constrain",!0),vn("disabled",!1)]),oB=te(eB),rB=te([Qt("width"),Qt("height")]),iB=[Qt("type"),on("header",re),on("cells",zt(re))],uB=te(iB),aB=kD.concat([cn("placeholder"),vn("maximized",!1),vn("disabled",!1)]),cB=te(aB),sB=re,lB=kD.concat([hn("filetype","file",["image","media","file"]),dn("disabled",!1)]),fB=te(lB),dB=te([Qt("value"),dn("meta",{})]),mB=Pt(function(){return jt("type",{alertbanner:hD,bar:te((e=CE("bar"),[Qt("type"),e])),button:bD,checkbox:xD,colorinput:TD,colorpicker:DD,dropzone:RD,grid:te((t=CE("grid"),[Qt("type"),$t("columns",oe),t])),iframe:ND,input:GD,listbox:$D,selectbox:tB,sizeinput:oB,textarea:cB,urlinput:fB,customeditor:FD,htmlpanel:HD,imagetools:WD,collection:OD,label:te((n=CE("label"),[Qt("type"),Qt("label"),n])),table:uB,panel:pB});var t,n,e}),gB=[Qt("type"),dn("classes",[]),on("items",mB)],pB=te(gB),hB=[le("name","name",Et(function(){return Ar("tab-name")}),re),Qt("title"),on("items",mB)],vB=[Qt("type"),en("tabs",hB)],bB=te(vB),yB=dD,xB=gD,wB=te([Qt("title"),$t("body",jt("type",{panel:pB,tabpanel:bB})),pn("size","normal"),on("buttons",xB),dn("initialData",{}),bn("onAction",ct),bn("onChange",ct),bn("onSubmit",ct),bn("onClose",ct),bn("onCancel",ct),dn("onTabChange",ct)]),SB=te(H([Zt("type",["cancel","custom"])],yB)),kB=te([Qt("title"),Qt("url"),an("height"),an("width"),ln("buttons",SB),bn("onAction",ct),bn("onCancel",ct),bn("onClose",ct),bn("onMessage",ct)]),CB=function(t){return x(t)?[t].concat(z(St(t),CB)):c(t)?z(t,CB):[]},OB={checkbox:wD,colorinput:ED,colorpicker:BD,dropzone:VD,input:XD,iframe:LD,sizeinput:rB,selectbox:nB,listbox:QD,size:rB,textarea:sB,urlinput:dB,customeditor:ID,collection:_D,togglemenuitem:lD},_B={open:function(t,n){var e=_E(n);return t(e.internalDialog,e.initialData,e.dataValidator)},openUrl:function(t,n){return t(Xt(Gt("dialog",kB,n)))},redial:_E},TB=xl({name:"TabButton",configFields:[dn("uid",void 0),Jt("value"),le("dom","dom",At(function(){return{attributes:{role:"tab",id:Ar("aria"),"aria-selected":"false"}}}),ee()),rn("action"),dn("domModification",{}),Js("tabButtonBehaviours",[Rg,Bg,_f]),Jt("view")],factory:function(t,n){return{uid:t.uid,dom:t.dom,components:t.components,events:ym(t.action),behaviours:Qs(t.tabButtonBehaviours,[Rg.config({}),Bg.config({mode:"execution",useSpace:!0,useEnter:!0}),_f.config({store:{mode:"memory",initialValue:t.value}})]),domModification:t.domModification}}}),EB=tt([Jt("tabs"),Jt("dom"),dn("clickToDismiss",!1),Js("tabbarBehaviours",[md,Bg]),Yu(["tabClass","selectedClass"])]),DB=tt([Jf({factory:TB,name:"tabs",unit:"tab",overrides:function(o){return{action:function(t){var n=t.getSystem().getByUid(o.uid).getOrDie(),e=md.isHighlighted(n,t);(e&&o.clickToDismiss?function(t,n){md.dehighlight(t,n),Ne(t,Xo(),{tabbar:t,button:n})}:e?ct:function(t,n){md.highlight(t,n),Ne(t,Go(),{tabbar:t,button:n})})(n,t)},domModification:{classes:[o.markers.tabClass]}}}})]),BB=wl({name:"Tabbar",configFields:EB(),partFields:DB(),factory:function(t,n,e,o){return{uid:t.uid,dom:t.dom,components:n,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:Qs(t.tabbarBehaviours,[md.config({highlightClass:t.markers.selectedClass,itemClass:t.markers.tabClass,onHighlight:function(t,n){Or(n.element,"aria-selected","true")},onDehighlight:function(t,n){Or(n.element,"aria-selected","false")}}),Bg.config({mode:"flow",getInitial:function(t){return md.getHighlighted(t).map(function(t){return t.element})},selector:"."+t.markers.tabClass,executeOnMove:!0})])}}}),AB=xl({name:"Tabview",configFields:[Js("tabviewBehaviours",[Mg])],factory:function(t,n){return{uid:t.uid,dom:t.dom,behaviours:Qs(t.tabviewBehaviours,[Mg.config({})]),domModification:{attributes:{role:"tabpanel"}}}}}),MB=tt([dn("selectFirst",!0),Ku("onChangeTab"),Ku("onDismissTab"),dn("tabs",[]),Js("tabSectionBehaviours",[])]),FB=tt([Yf({factory:BB,schema:[Jt("dom"),nn("markers",[Jt("tabClass"),Jt("selectedClass")])],name:"tabbar",defaults:function(t){return{tabs:t.tabs}}}),Yf({factory:AB,name:"tabview"})]),IB=wl({name:"TabSection",configFields:MB(),partFields:FB(),factory:function(i,t,n,e){function o(t,n){ll(t,i,"tabbar").each(function(t){n(t).each(Le)})}return{uid:i.uid,dom:i.dom,components:t,behaviours:$s(i.tabSectionBehaviours),events:Jo(lt([i.selectFirst?[$o(function(t,n){o(t,md.getFirst)})]:[],[Xe(Go(),function(t,n){var o=n.event.button,r=_f.getValue(o);ll(o,i,"tabview").each(function(e){V(i.tabs,function(t){return t.value===r}).each(function(t){var n=t.view();Tr(o.element,"id").each(function(t){Or(e.element,"aria-labelledby",t)}),Mg.set(e,n),i.onChangeTab(e,o,n)})})}),Xe(Xo(),function(t,n){var e=n.event.button;i.onDismissTab(t,e)})]])),apis:{getViewItems:function(t){return ll(t,i,"tabview").map(function(t){return Mg.contents(t)}).getOr([])},showTab:function(t,e){o(t,function(n){return V(md.getCandidates(n),function(t){return _f.getValue(t)===e}).filter(function(t){return!md.isHighlighted(n,t)})})}}}},apis:{getViewItems:function(t,n){return t.getViewItems(n)},showTab:function(t,n,e){t.showTab(n,e)}}}),RB="send-data-to-section",VB="send-data-to-view",PB=Ar("update-dialog"),HB=Ar("update-title"),zB=Ar("update-body"),NB=Ar("update-footer"),LB=Ar("body-send-message"),jB=Qv.deviceType.isTouch(),WB=function(u,t){function n(t,i){return Xe(t,function(e,o){var n,r;n=e,r=function(t,n){i(u(),t,o.event,e)},R_.getState(n).get().each(function(t){r(t,n)})})}return H(H([],KE(n,t)),[n(wy,function(t,n,e){n.onAction(t,{name:e.name})})])},UB=function(u,t,c){function n(t,i){return Xe(t,function(e,o){var n,r;n=e,r=function(t,n){i(u(),t,o.event,e)},R_.getState(n).get().each(function(t){r(t.internalDialog,n)})})}return H(H([],KE(n,t)),[n(Sy,function(t,n){return n.onSubmit(t)}),n(by,function(t,n,e){n.onChange(t,{name:e.name})}),n(wy,function(t,n,e,o){function r(){return Bg.focusIn(o)}function i(t){return Er(t,"disabled")||Tr(t,"aria-disabled").exists(function(t){return"true"===t})}var u=ji(o.element),a=Ca(u);n.onAction(t,{name:e.name,value:e.value}),Ca(u).fold(r,function(n){i(n)||a.exists(function(t){return An(n,t)&&i(t)})?r():c().toOptional().filter(function(t){return!An(t.element,n)}).each(r)})}),n(Oy,function(t,n,e){n.onTabChange(t,{newTabName:e.name,oldTabName:e.oldName})}),Qo(function(t){var n=u();_f.setValue(t,n.getData())})])},GB=$E,XB=tinymce.util.Tools.resolve("tinymce.util.URI"),YB=["insertContent","setContent","execCommand","close","block","unblock"];o.add("silver",function(t){var n=kE(t),e=n.uiMothership,o=n.backstage,r=n.renderUI,i=n.getUi;return ny(t,o.shared),{renderUI:r,getWindowManagerImpl:tt(oD({editor:t,backstage:o})),getNotificationManagerImpl:function(){return u=e,a={backstage:o}.backstage.shared,{open:function(t,n){function e(){n(),op.hide(i)}var o=!t.closeButton&&t.timeout&&(0=i.length&&n(r)}}(t))})})}var jt,qt,$t,Wt=It.exports.boltExport,Kt=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 Kt(function(t){r(function(e){t(n(e))})})},isReady:o}},Xt={nu:Kt,pure:function(t){return Kt(function(e){e(t)})}},Yt=function(n){function e(e){n().then(e,Ft)}return{map:function(e){return Yt(function(){return n().then(e)})},bind:function(t){return Yt(function(){return n().then(function(e){return t(e).toPromise()})})},anonBind:function(e){return Yt(function(){return n().then(function(){return e.toPromise()})})},toLazy:function(){return Xt.nu(e)},toCached:function(){var e=null;return Yt(function(){return null===e&&(e=n()),e})},toPromise:n,get:e}},Gt={nu:function(e){return Yt(function(){return new Wt(e)})},pure:function(e){return Yt(function(){return Wt.resolve(e)})}},Jt=function(e){return Ut(e,Gt.nu)},Qt=function(n){return{is:function(e){return n===e},isValue:a,isError:s,getOr:$(n),getOrThunk:$(n),getOrDie:$(n),or:function(e){return Qt(n)},orThunk:function(e){return Qt(n)},fold:function(e,t){return t(n)},map:function(e){return Qt(e(n))},mapError:function(e){return Qt(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)}}},Zt=function(n){return{is:s,isValue:s,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 Zt(n)},mapError:function(e){return Zt(e(n))},each:i,bind:function(e){return Zt(n)},exists:s,forall:a,toOption:k.none}},en={value:Qt,error:Zt,fromOption:function(e,t){return e.fold(function(){return Zt(t)},Qt)}},tn=window.Promise?window.Promise:(jt=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},qt=rn.immediateFn||"function"==typeof j.setImmediate&&j.setImmediate||function(e){j.setTimeout(e,1)},rn.prototype["catch"]=function(e){return this.then(null,e)},rn.prototype.then=function(n,r){var o=this;return new rn(function(e,t){on.call(o,new sn(n,r,e,t))})},rn.all=function(){var c=Array.prototype.slice.call(1===arguments.length&&jt(arguments[0])?arguments[0]:arguments);return new rn(function(o,i){if(0===c.length)return o([]);var a=c.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)}c[t]=e,0==--a&&o(c)}catch(r){i(r)}}for(var e=0;e\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ar=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ur=/[<>&\"\']/g,cr=/([a-z0-9]+);?|&([a-z0-9]+);/gi,sr={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"};$n={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},Wn={"<":"<",">":">","&":"&",""":'"',"'":"'"};function lr(e,t){var n,r,o,i={};if(e){for(e=e.split(","),t=t||10,n=0;n>10),56320+(1023&t))):sr[t]||String.fromCharCode(t):Wn[e]||qn[e]||function(e){var t;return(t=Ct.fromTag("div").dom()).innerHTML=e,t.textContent||t.innerText||e}(e)})}},gr={},pr={},vr=Vn.makeMap,yr=Vn.each,br=Vn.extend,Cr=Vn.explode,wr=Vn.inArray,xr=function(e,t){return(e=Vn.trim(e))?e.split(t||" "):[]},zr=function(e){function t(e,t,n){function r(e,t){var n,r,o={};for(n=0,r=e.length;n]*>","gi")});function E(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")}function y(e){var t,n,r,o,i,a,u,c,s,l,f,d,h,m,g,p,v,y,b,C=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,w=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,x=/[*?+]/;if(e)for(e=xr(e,","),z["@"]&&(p=z["@"].attributes,v=z["@"].attributesOrder),t=0,n=e.length;t>10|55296,1023&r|56320)}var Vr,Ir,Fr,Ur,jr,qr,$r,Wr,Kr,Xr,Yr,Gr,Jr,Qr,Zr,eo,to,no,ro="sizzle"+-new Date,oo=j.window.document,io=0,ao=0,uo=Vo(),co=Vo(),so=Vo(),lo=function(e,t){return e===t&&(Yr=!0),0},fo=typeof undefined,ho={}.hasOwnProperty,mo=[],go=mo.pop,po=mo.push,vo=mo.push,yo=mo.slice,bo=mo.indexOf||function(e){for(var t=0,n=this.length;t+~]|"+Co+")"+Co+"*"),ko=new RegExp("="+Co+"*([^\\]'\"]*?)"+Co+"*\\]","g"),To=new RegExp(zo),Ao=new RegExp("^"+wo+"$"),Mo={ID:new RegExp("^#("+wo+")"),CLASS:new RegExp("^\\.("+wo+")"),TAG:new RegExp("^("+wo+"|[*])"),ATTR:new RegExp("^"+xo),PSEUDO:new RegExp("^"+zo),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+Co+"*(even|odd|(([+-]|)(\\d*)n|)"+Co+"*(?:([+-]|)"+Co+"*(\\d+)|))"+Co+"*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^"+Co+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+Co+"*((?:-\\d)?\\d*)"+Co+"*\\)|)(?=[^-]|$)","i")},Ro=/^(?:input|select|textarea|button)$/i,Do=/^h\d$/i,_o=/^[^{]+\{\s*\[native \w/,Bo=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Oo=/[+~]/,Ho=/'|\\/g,Po=new RegExp("\\\\([\\da-f]{1,6}"+Co+"?|("+Co+")|.)","ig");try{vo.apply(mo=yo.call(oo.childNodes),oo.childNodes),mo[oo.childNodes.length].nodeType}catch(xE){vo={apply:mo.length?function(e,t){po.apply(e,yo.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}var Lo=function(e,t,n,r){var o,i,a,u,c,s,l,f,d,h;if((t?t.ownerDocument||t:oo)!==Jr&&Gr(t),n=n||[],!e||"string"!=typeof e)return n;if(1!==(u=(t=t||Jr).nodeType)&&9!==u)return[];if(Zr&&!r){if(o=Bo.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))&&no(t,i)&&i.id===a)return n.push(i),n}else{if(o[2])return vo.apply(n,t.getElementsByTagName(e)),n;if((a=o[3])&&Ir.getElementsByClassName)return vo.apply(n,t.getElementsByClassName(a)),n}if(Ir.qsa&&(!eo||!eo.test(e))){if(f=l=ro,d=t,h=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){for(s=qr(e),(l=t.getAttribute("id"))?f=l.replace(Ho,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",c=s.length;c--;)s[c]=f+Ko(s[c]);d=Oo.test(e)&&$o(t.parentNode)||t,h=s.join(",")}if(h)try{return vo.apply(n,d.querySelectorAll(h)),n}catch(m){}finally{l||t.removeAttribute("id")}}}return Wr(e.replace(No,"$1"),t,n,r)};function Vo(){var n=[];return function r(e,t){return n.push(e+" ")>Fr.cacheLength&&delete r[n.shift()],r[e+" "]=t}}function Io(e){return e[ro]=!0,e}function Fo(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 Uo(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function jo(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function qo(a){return Io(function(i){return i=+i,Io(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 $o(e){return e&&typeof e.getElementsByTagName!=fo&&e}for(Vr in Ir=Lo.support={},jr=Lo.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},Gr=Lo.setDocument=function(e){var t,c=e?e.ownerDocument||e:oo,n=c.defaultView;return c!==Jr&&9===c.nodeType&&c.documentElement?(Qr=(Jr=c).documentElement,Zr=!jr(c),n&&n!==function r(e){try{return e.top}catch(t){}return null}(n)&&(n.addEventListener?n.addEventListener("unload",function(){Gr()},!1):n.attachEvent&&n.attachEvent("onunload",function(){Gr()})),Ir.attributes=!0,Ir.getElementsByTagName=!0,Ir.getElementsByClassName=_o.test(c.getElementsByClassName),Ir.getById=!0,Fr.find.ID=function(e,t){if(typeof t.getElementById!=fo&&Zr){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},Fr.filter.ID=function(e){var t=e.replace(Po,Lr);return function(e){return e.getAttribute("id")===t}},Fr.find.TAG=Ir.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!=fo)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},Fr.find.CLASS=Ir.getElementsByClassName&&function(e,t){if(Zr)return t.getElementsByClassName(e)},to=[],eo=[],Ir.disconnectedMatch=!0,eo=eo.length&&new RegExp(eo.join("|")),to=to.length&&new RegExp(to.join("|")),t=_o.test(Qr.compareDocumentPosition),no=t||_o.test(Qr.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},lo=t?function(e,t){if(e===t)return Yr=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!Ir.sortDetached&&t.compareDocumentPosition(e)===n?e===c||e.ownerDocument===oo&&no(oo,e)?-1:t===c||t.ownerDocument===oo&&no(oo,t)?1:Xr?bo.call(Xr,e)-bo.call(Xr,t):0:4&n?-1:1)}:function(e,t){if(e===t)return Yr=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,a=[e],u=[t];if(!o||!i)return e===c?-1:t===c?1:o?-1:i?1:Xr?bo.call(Xr,e)-bo.call(Xr,t):0;if(o===i)return Fo(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?Fo(a[r],u[r]):a[r]===oo?-1:u[r]===oo?1:0},c):Jr},Lo.matches=function(e,t){return Lo(e,null,null,t)},Lo.matchesSelector=function(e,t){if((e.ownerDocument||e)!==Jr&&Gr(e),t=t.replace(ko,"='$1']"),Ir.matchesSelector&&Zr&&(!to||!to.test(t))&&(!eo||!eo.test(t)))try{var n=(void 0).call(e,t);if(n||Ir.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(xE){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Po,Lr),e[3]=(e[3]||e[4]||e[5]||"").replace(Po,Lr),"~="===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]||Lo.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]&&Lo.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Mo.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&To.test(n)&&(t=qr(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(Po,Lr).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=uo[e+" "];return t||(t=new RegExp("(^|"+Co+")"+e+"("+Co+"|$)"))&&uo(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!=fo&&e.getAttribute("class")||"")})},ATTR:function(n,r,o){return function(e){var t=Lo.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\-]*)$)/,di=Hr.Event,hi=Vn.makeMap("children,contents,next,prev"),mi=function(e,t,n,r){var o;if(ei(t))t=ti(t,xi(e[0]));else if(t.length&&!t.nodeType){if(t=ki.makeArray(t),r)for(o=t.length-1;0<=o;o--)mi(e,t[o],n,r);else for(o=0;o"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:fi.exec(e)))return ki(t).find(e);if(n[1])for(r=ti(e,xi(t)).firstChild;r;)si.call(o,r),r=r.nextSibling;else{if(!(r=xi(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 Vn.toArray(this)},add:function(e,t){var n,r;if(ei(e))return this.add(ki(e));if(!1!==t)for(n=ki.unique(this.toArray().concat(ki.makeArray(e))),this.length=n.length,r=0;r"+r,t.removeChild(t.firstChild)}catch(n){ki("").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&&Pi(_,r)},getStyle:m,setStyles:function(e,t){var n=f(e).css(t);u.update_styles&&Pi(_,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!==Vi.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===Vi.DOM||a!==j.document?(e=e||"",n=a.getElementsByTagName("head")[0],Ri(e.split(","),function(e){var t;e=Vn._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))})):Vi.DOM.loadCSS(e)},addClass:function(e,t){f(e).addClass(t)},removeClass:function(e,t){N(e,t,!1)},hasClass:function(e,t){return f(e).hasClass(t)},toggleClass:N,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 Qe.isElement(t)?t.outerHTML:ki("").append(ki(t).clone()).html()},setOuterHTML:function(e,t){f(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}z(ki(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:E,rename:function(t,e){var n;return t.nodeName!==e.toUpperCase()&&(n=x(e),Ri(d(t),function(e){o(n,e.nodeName,r(t,e.nodeName))}),E(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(Vn.trim(e))},run:y,getAttribs:d,isEmpty:function(e,t){var n,r,o,i,a=0;if(e=e.firstChild){var u=new Ti(e,e.parentNode),c=D?D.getWhiteSpaceElements():{};t=t||(D?D.getNonEmptyElements():null);do{if(o=e.nodeType,Qe.isElement(e)){var s=e.getAttribute("data-mce-bogus");if(s){e=u.next("all"===s);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&&!Oi.test(e.nodeValue))return!1;if(3===o&&e.parentNode&&c[e.parentNode.nodeName]&&Oi.test(e.nodeValue))return!1;e=u.next()}while(e)}return a<=1},createRng:S,nodeIndex:Li,split:function(e,t,n){var r,o,i,a=S();if(e&&t)return a.setStart(e.parentNode,Li(e)),a.setEnd(t.parentNode,Li(t)),r=a.extractContents(),(a=S()).setStart(t.parentNode,Li(t)+1),a.setEnd(e.parentNode,Li(e)+1),o=a.extractContents(),(i=e.parentNode).insertBefore(rr.trimNode(F,r),e),n?i.insertBefore(n,e):i.insertBefore(t,e),i.insertBefore(rr.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])}Lo.setDocument&&Lo.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 c=Hi(_,u,function(){return F}),F}(Mi=Vi=Vi||{}).DOM=Mi(j.document),Mi.nodeIndex=Li;var Ii=Vi,Fi=Ii.DOM,Ui=Vn.each,ji=Vn.grep,qi=($i.prototype._setReferrerPolicy=function(e){this.settings.referrerPolicy=e},$i.prototype.loadScript=function(e,t,n){var r,o,i=Fi;o=i.uniqueId(),(r=j.document.createElement("script")).id=o,r.type="text/javascript",r.src=Vn._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)},$i.prototype.isDone=function(e){return 2===this.states[e]},$i.prototype.markDone=function(e){this.states[e]=2},$i.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}))},$i.prototype.load=function(e,t,n,r){return this.add(e,t,n,r)},$i.prototype.remove=function(e){delete this.states[e],delete this.scriptLoadedCallbacks[e]},$i.prototype.loadQueue=function(e,t,n){this.loadScripts(this.queue,e,t,n)},$i.prototype.loadScripts=function(n,e,t,r){function o(t,e){Ui(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,Ui(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,Ui(t,function(e){0===u.length?D(e.success)&&e.success.call(e.scope):D(e.failure)&&e.failure.call(e.scope,u)})}})()},$i.ScriptLoader=new $i,$i);function $i(e){void 0===e&&(e={}),this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=0,this.settings=e}var Wi,Ki=function(e){function t(){return n}var n=e;return{get:t,set:function(e){n=e},clone:function(){return Ki(t())}}},Xi={},Yi=Ki("en"),Gi={getData:function(){return ue(Xi,function(e){return G({},e)})},setCode:function(e){e&&Yi.set(e)},getCode:function(){return Yi.get()},add:function(e,t){var n=Xi[e];for(var r in n||(Xi[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 At(i,n)?r(i[n]):t}function n(e){return e.replace(/{context:\w+}$/,"")}function o(e){return e}var i=Xi[Yi.get()]||{},a=function(e){return""===e||null===e||e===undefined};if(a(e))return o("");if(function(e){return T(e)&&At(e,"raw")}(e))return o(r(e.raw));if(function(e){return A(e)&&1t.bottom)&&ja(t.top-e.bottom,e,t)}function $a(e,t){return e.top>t.bottom||!(e.bottom=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom}function Ka(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset===n+1?t.childNodes[n]:null}function Xa(e,t){return 1===e.nodeType&&e.hasChildNodes()&&(t>=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e}function Ya(e){return"string"==typeof e&&768<=e.charCodeAt(0)&&Su.test(e)}function Ga(e,t,n){return e.isSome()&&t.isSome()?k.some(n(e.getOrDie(),t.getOrDie())):k.none()}function Ja(e){return e&&/[\r\n\t ]/.test(e)}function Qa(e){return!!e.setStart&&!!e.setEnd}function Za(e){var t,n=e.startContainer,r=e.startOffset;return!!(Ja(e.toString())&&Ou(n.parentNode)&&Qe.isText(n)&&(t=n.data,Ja(t[r-1])||Ja(t[r+1])))}function eu(e){return 0===e.left&&0===e.right&&0===e.top&&0===e.bottom}function tu(e,t){var n=Ua(e,t);return n.width=1,n.right=n.left+1,n}var nu,ru=$("mce-annotation"),ou=$("data-mce-annotation"),iu=$("data-mce-annotation-uid"),au=function(e,t){var n=Ct.fromDom(e.getBody());return ha(n,"["+iu()+'="'+t+'"]')},uu=0,cu="\ufeff",su=function(e){return e===cu},lu=cu,fu=function(e){return e.replace(new RegExp(cu,"g"),"")},du=Qe.isElement,hu=Qe.isText,mu=function(e){return hu(e)&&e.data[0]===lu},gu=function(e){return hu(e)&&e.data[e.data.length-1]===lu},pu=Qe.isContentEditableTrue,vu=Qe.isContentEditableFalse,yu=Qe.isBr,bu=Qe.isText,Cu=Qe.matchNodeNames(["script","style","textarea"]),wu=Qe.matchNodeNames(["img","input","textarea","hr","iframe","video","audio","object"]),xu=Qe.matchNodeNames(["table"]),zu=_a,Nu=function(e){return!1===function(e){return Qe.isElement(e)&&"true"===e.getAttribute("unselectable")}(e)&&vu(e)},Eu=Math.round,Su=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]"),ku=[].slice,Tu=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 Vu(t,e?n-1:n)}}}(nu=ju=ju||{}).fromRangeStart=function(e){return nu(e.startContainer,e.startOffset)},nu.fromRangeEnd=function(e){return nu(e.endContainer,e.endOffset)},nu.after=function(e){return nu(e.parentNode,Lu(e)+1)},nu.before=function(e){return nu(e.parentNode,Lu(e))},nu.isAbove=function(e,t){return Ga(N(t.getClientRects()),E(e.getClientRects()),qa).getOr(!1)},nu.isBelow=function(e,t){return Ga(E(t.getClientRects()),N(e.getClientRects()),$a).getOr(!1)},nu.isAtStart=function(e){return!!e&&e.isAtStart()},nu.isAtEnd=function(e){return!!e&&e.isAtEnd()},nu.isTextPosition=function(e){return!!e&&Qe.isText(e.container())},nu.isElementPosition=function(e){return!1===nu.isTextPosition(e)};function qu(t){return function(e){return t===e}}function $u(e){return(Bc(e)?"text()":e.nodeName.toLowerCase())+"["+function(e){var r,t,n;return r=Lc(Pc(e)),t=Hn.findIndex(r,qu(e),e),r=r.slice(0,t+1),n=Hn.reduce(r,function(e,t,n){return Bc(t)&&Bc(r[n-1])&&e++,e},0),r=Hn.filter(r,Qe.matchNodeNames([e.nodeName])),(t=Hn.findIndex(r,qu(e),e))-n}(e)+"]"}function Wu(e,t){var n,r,o,i,a,u=[];return n=t.container(),r=t.offset(),Bc(n)?o=function(e,t){for(;(e=e.previousSibling)&&Bc(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($u(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=Hn.filter(a,c(Qe.isBogus)),(u=u.concat(Hn.map(a,function(e){return $u(e)}))).reverse().join("/")+","+o}function Ku(e,t){var n,r,o;return t?(t=(n=t.split(","))[0].split("/"),o=1e.data.length&&(t=e.data.length),_c(e,t)}(r,parseInt(o,10)):(o="after"===o?Hc(r)+1:Hc(r),_c(r.parentNode,o)):null):null}function Xu(e,t){Qe.isText(t)&&0===t.data.length&&e.remove(t)}function Yu(e,t,n){Qe.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 Xu(t,e.previousSibling)}),o.each(function(e){return Xu(t,e.nextSibling)})}(e,t,n):function(e,t,n){t.insertNode(n),Xu(e,n.previousSibling),Xu(e,n.nextSibling)}(e,t,n)}function Gu(e,t,n,r,o){var i,a=r[o?"startContainer":"endContainer"],u=r[o?"startOffset":"endOffset"],c=[],s=0,l=e.getRoot();for(Qe.isText(a)?c.push(n?function(e,t,n){var r,o;for(o=e(t.data.slice(0,n)).length,r=t.previousSibling;r&&Qe.isText(r);r=r.previousSibling)o+=e(r.data).length;return o}(t,a,u):u):(u>=(i=a.childNodes).length&&i.length&&(s=1,u=Math.max(0,i.length-1)),c.push(e.nodeIndex(i[u],n)+s));a&&a!==l;a=a.parentNode)c.push(e.nodeIndex(a,n));return c}function Ju(e,t,n){var r=0;return Vn.each(e.select(t),function(e){if("all"!==e.getAttribute("data-mce-bogus"))return e!==n&&void r++}),r}function Qu(e,t){var n,r,o,i=t?"start":"end";n=e[i+"Container"],r=e[i+"Offset"],Qe.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 Zu(e){return Qu(e,!0),Qu(e,!1),e}function ec(e,t){var n;if(Qe.isElement(e)&&(e=Xa(e,t),Vc(e)))return e;if(_a(e)){if(Qe.isText(e)&&Ra(e)&&(e=e.parentNode),n=e.previousSibling,Vc(n))return n;if(n=e.nextSibling,Vc(n))return n}}function tc(e,t,n){var r=n.getNode(),o=r?r.nodeName:null,i=n.getRng();if(Vc(r)||"IMG"===o)return{name:o,index:Ju(n.dom,o,r)};var a=function(e){return ec(e.startContainer,e.startOffset)||ec(e.endContainer,e.endOffset)}(i);return a?{name:o=a.tagName,index:Ju(n.dom,o,a)}:function(e,t,n,r){var o=t.dom,i={};return i.start=Gu(o,e,n,r,!0),t.isCollapsed()||(i.end=Gu(o,e,n,r,!1)),i}(e,n,t,i)}function nc(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 rc(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:Ju(n,u,a)};var c=Zu(r.cloneRange());if(!i){c.collapse(!1);var s=nc(n,o+"_end",t);Yu(n,c,s)}(r=Zu(r)).collapse(!0);var l=nc(n,o+"_start",t);return Yu(n,r,l),e.moveToBookmark({id:o,keep:1}),{id:o}}function oc(e){return Qe.isElement(e)&&e.id===Fc}function ic(e,t){for(;t&&t!==e;){if(t.id===Fc)return t;t=t.parentNode}return null}function ac(e){var t=e.parentNode;t&&t.removeChild(e)}function uc(e,t){0===t.length?ac(e):e.nodeValue=t}function cc(e){var t=fu(e);return{count:e.length-t.length,text:t}}function sc(e,t){return qc(e),t}function lc(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 c.set(k.some({caret:o,element:e,before:t})),c.get().each(function(e){t&&ki(e.caret).addClass("mce-visual-caret-before")}),l(),(r=e.ownerDocument.createRange()).setStart(u,0),r.setEnd(u,0),r},hide:s,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(){c.get().each(function(e){var t=dc(i,e.element,e.before);ki(e.caret).css(G({},t))})},destroy:function(){return kn.clearInterval(t)}}}function mc(){return Wc.isIE()||Wc.isEdge()||Wc.isFirefox()}function gc(e){return Kc(e)||Qe.isTable(e)&&mc()}function pc(e){return 0