((e,o)=>{const n=e.plugins[o].getMetadata;if(l(n)){const e=n();return{name:e.name,html:t(e)}}return{name:o,html:o}})(e,o)),(e=>{const o="premium"===e.type?`${e.name}*`:e.name;return{name:o,html:t({name:o,url:`https://www.tiny.cloud/docs/tinymce/6/${e.slug}/`})}}));var n,r},n=e=>{const t=(e=>{const t=f(e.plugins),o=a(e);return i(o)?t:p(t,(e=>!(((e,t)=>m.call(e,t))(o,e)>-1)))})(e),n=h(g(t,(t=>o(e,t))),((e,t)=>e.name.localeCompare(t.name))),r=g(n,(e=>""+e.html+" ")),s=r.length,l=r.join("");return""+x.translate(["Plugins installed ({0}):",s])+"
"},r={type:"htmlpanel",presets:"document",html:[(e=>null==e?"":''+n(e)+"
")(e),(()=>{const e=p(C,(({type:e})=>"premium"===e)),t=h(g(e,(e=>e.name)),((e,t)=>e.localeCompare(t))),o=g(t,(e=>`${e} `)).join("");return''+x.translate("Premium plugins:")+"
"})()].join("")};return{name:"plugins",title:"Plugins",items:[r]}};var z=tinymce.util.Tools.resolve("tinymce.EditorManager");const O=(e,t)=>()=>{const{tabs:n,names:a}=((e,t)=>{const n=_(),a={name:"keyboardnav",title:"Keyboard Navigation",items:[{type:"htmlpanel",presets:"document",html:"Editor UI keyboard navigation \n\nActivating keyboard navigation \n\nThe sections of the outer UI of the editor - the menubar, toolbar, sidebar and footer - are all keyboard navigable. As such, there are multiple ways to activate keyboard navigation:
\n\n Focus the menubar: Alt + F9 (Windows) or ⌥F9 (MacOS) \n Focus the toolbar: Alt + F10 (Windows) or ⌥F10 (MacOS) \n Focus the footer: Alt + F11 (Windows) or ⌥F11 (MacOS) \n \n\nFocusing the menubar or toolbar will start keyboard navigation at the first item in the menubar or toolbar, which will be highlighted with a gray background. Focusing the footer will start keyboard navigation at the first item in the element path, which will be highlighted with an underline.
\n\nMoving between UI sections \n\nWhen keyboard navigation is active, pressing tab will move the focus to the next major section of the UI, where applicable. These sections are:
\n\n the menubar \n each group of the toolbar \n the sidebar \n the element path in the footer \n the wordcount toggle button in the footer \n the branding link in the footer \n the editor resize handle in the footer \n \n\nPressing shift + tab will move backwards through the same sections, except when moving from the footer to the toolbar. Focusing the element path then pressing shift + tab will move focus to the first toolbar group, not the last.
\n\nMoving within UI sections \n\nKeyboard navigation within UI sections can usually be achieved using the left and right arrow keys. This includes:
\n\n moving between menus in the menubar \n moving between buttons in a toolbar group \n moving between items in the element path \n \n\nIn all these UI sections, keyboard navigation will cycle within the section. For example, focusing the last button in a toolbar group then pressing right arrow will move focus to the first item in the same toolbar group.
\n\nExecuting buttons \n\nTo execute a button, navigate the selection to the desired button and hit space or enter.
\n\nOpening, navigating and closing menus \n\nWhen focusing a menubar button or a toolbar button with a menu, pressing space, enter or down arrow will open the menu. When the menu opens the first item will be selected. To move up or down the menu, press the up or down arrow key respectively. This is the same for submenus, which can also be opened and closed using the left and right arrow keys.
\n\nTo close any active menu, hit the escape key. When a menu is closed the selection will be restored to its previous selection. This also works for closing submenus.
\n\nContext toolbars and menus \n\nTo focus an open context toolbar such as the table context toolbar, press Ctrl + F9 (Windows) or ⌃F9 (MacOS).
\n\nContext toolbar navigation is the same as toolbar navigation, and context menu navigation is the same as standard menu navigation.
\n\nDialog navigation \n\nThere are two types of dialog UIs in TinyMCE: tabbed dialogs and non-tabbed dialogs.
\n\nWhen a non-tabbed dialog is opened, the first interactive component in the dialog will be focused. Users can navigate between interactive components by pressing tab. This includes any footer buttons. Navigation will cycle back to the first dialog component if tab is pressed while focusing the last component in the dialog. Pressing shift + tab will navigate backwards.
\n\nWhen a tabbed dialog is opened, the first button in the tab menu is focused. Pressing tab will navigate to the first interactive component in that tab, and will cycle through the tab’s components, the footer buttons, then back to the tab button. To switch to another tab, focus the tab button for the current tab, then use the arrow keys to cycle through the tab buttons.
"}]},i=S(e),l=(()=>{var e,t;const o='TinyMCE '+(e=z.majorVersion,t=z.minorVersion,(0===e.indexOf("@")?"X.X.X":e+"."+t)+" ");return{name:"versions",title:"Version",items:[{type:"htmlpanel",html:""+x.translate(["You are using {0}",o])+"
",presets:"document"}]}})(),c={[n.name]:n,[a.name]:a,[i.name]:i,[l.name]:l,...t.get()};return d.from(r(e)).fold((()=>(e=>{const t=f(e),o=t.indexOf("versions");return-1!==o&&(t.splice(o,1),t.push("versions")),{tabs:e,names:t}})(c)),(e=>((e,t)=>{const n={},r=g(e,(e=>{var r;if(s(e))return b(t,e)&&(n[e]=t[e]),e;{const t=null!==(r=e.name)&&void 0!==r?r:o("tab-name");return n[t]=e,t}}));return{tabs:n,names:r}})(e,c)))})(e,t),i={type:"tabpanel",tabs:(e=>{const t=[],o=e=>{t.push(e)};for(let t=0;t{return b(t=n,o=e)?d.from(t[o]):d.none();var t,o})))};e.windowManager.open({title:"Help",size:"normal",body:i,buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{}})};e.add("help",(e=>{const t=(e=>{let t={};return{get:()=>t,set:e=>{t=e}}})(),n=(e=>({addTab:t=>{var n;const r=null!==(n=t.name)&&void 0!==n?n:o("tab-name"),a=e.get();a[r]=t,e.set(a)}}))(t);(e=>{(0,e.options.register)("help_tabs",{processor:"array"})})(e);const r=O(e,t);return((e,t)=>{e.ui.registry.addButton("help",{icon:"help",tooltip:"Help",onAction:t}),e.ui.registry.addMenuItem("help",{text:"Help",icon:"help",shortcut:"Alt+0",onAction:t})})(e,r),((e,t)=>{e.addCommand("mceHelp",t)})(e,r),e.shortcuts.add("Alt+0","Open help dialog","mceHelp"),n}))}()},72170:function(e,t,o){o(53302)},53302:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=Object.getPrototypeOf,o=(e,t,o)=>{var n;return!!o(e,t.prototype)||(null===(n=e.constructor)||void 0===n?void 0:n.name)===t.name},n=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&o(e,String,((e,t)=>t.isPrototypeOf(e)))?"string":t})(t)===e,r=e=>t=>typeof t===e,a=n("string"),s=n("object"),i=e=>((e,n)=>s(e)&&o(e,n,((e,o)=>t(e)===o)))(e,Object),l=n("array"),c=(null,e=>null===e);const d=r("boolean"),u=e=>!(e=>null==e)(e),m=r("function"),g=r("number"),p=()=>{};class h{constructor(e,t){this.tag=e,this.value=t}static some(e){return new h(!0,e)}static none(){return h.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?h.some(e(this.value)):h.none()}bind(e){return this.tag?e(this.value):h.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:h.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return u(e)?h.some(e):h.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}h.singletonNone=new h(!1);const f=Object.keys,y=Object.hasOwnProperty,b=(e,t)=>y.call(e,t),v=Array.prototype.push,k=e=>{const t=[];for(let o=0,n=e.length;o{((e,t,o)=>{if(!(a(o)||d(o)||g(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")})(e.dom,t,o)},_=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},x=_;var C=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),S=tinymce.util.Tools.resolve("tinymce.util.URI");const z=e=>e.length>0,O=e=>t=>t.options.get(e),T=O("image_dimensions"),E=O("image_advtab"),A=O("image_uploadtab"),M=O("image_prepend_url"),N=O("image_class_list"),R=O("image_description"),D=O("image_title"),B=O("image_caption"),L=O("image_list"),I=O("a11y_advanced_options"),H=O("automatic_uploads"),P=(e,t)=>Math.max(parseInt(e,10),parseInt(t,10)),F=e=>(e&&(e=e.replace(/px$/,"")),e),j=e=>(e.length>0&&/^[0-9]+$/.test(e)&&(e+="px"),e),V=e=>"IMG"===e.nodeName&&(e.hasAttribute("data-mce-object")||e.hasAttribute("data-mce-placeholder")),Z=(e,t)=>{const o=e.options.get;return S.isDomSafe(t,"img",{allow_html_data_urls:o("allow_html_data_urls"),allow_script_urls:o("allow_script_urls"),allow_svg_data_urls:o("allow_svg_data_urls")})},U=C.DOM,q=e=>e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?F(e.style.marginLeft):"",W=e=>e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?F(e.style.marginTop):"",$=e=>e.style.borderWidth?F(e.style.borderWidth):"",G=(e,t)=>{var o;return e.hasAttribute(t)&&null!==(o=e.getAttribute(t))&&void 0!==o?o:""},K=e=>null!==e.parentNode&&"FIGURE"===e.parentNode.nodeName,Y=(e,t,o)=>{""===o||null===o?e.removeAttribute(t):e.setAttribute(t,o)},X=(e,t)=>{const o=e.getAttribute("style"),n=t(null!==o?o:"");n.length>0?(e.setAttribute("style",n),e.setAttribute("data-mce-style",n)):e.removeAttribute("style")},J=(e,t)=>(e,o,n)=>{const r=e.style;r[o]?(r[o]=j(n),X(e,t)):Y(e,o,n)},Q=(e,t)=>e.style[t]?F(e.style[t]):G(e,t),ee=(e,t)=>{const o=j(t);e.style.marginLeft=o,e.style.marginRight=o},te=(e,t)=>{const o=j(t);e.style.marginTop=o,e.style.marginBottom=o},oe=(e,t)=>{const o=j(t);e.style.borderWidth=o},ne=(e,t)=>{e.style.borderStyle=t},re=e=>{var t;return null!==(t=e.style.borderStyle)&&void 0!==t?t:""},ae=e=>u(e)&&"FIGURE"===e.nodeName,se=e=>0===U.getAttrib(e,"alt").length&&"presentation"===U.getAttrib(e,"role"),ie=e=>se(e)?"":G(e,"alt"),le=(e,t)=>{var o;const n=document.createElement("img");return Y(n,"style",t.style),(q(n)||""!==t.hspace)&&ee(n,t.hspace),(W(n)||""!==t.vspace)&&te(n,t.vspace),($(n)||""!==t.border)&&oe(n,t.border),(re(n)||""!==t.borderStyle)&&ne(n,t.borderStyle),e(null!==(o=n.getAttribute("style"))&&void 0!==o?o:"")},ce=(e,t)=>({src:G(t,"src"),alt:ie(t),title:G(t,"title"),width:Q(t,"width"),height:Q(t,"height"),class:G(t,"class"),style:e(G(t,"style")),caption:K(t),hspace:q(t),vspace:W(t),border:$(t),borderStyle:re(t),isDecorative:se(t)}),de=(e,t,o,n,r)=>{o[n]!==t[n]&&r(e,n,String(o[n]))},ue=(e,t,o)=>{if(o){U.setAttrib(e,"role","presentation");const t=x(e);w(t,"alt","")}else{if(c(t)){"alt",x(e).dom.removeAttribute("alt")}else{const o=x(e);w(o,"alt",t)}"presentation"===U.getAttrib(e,"role")&&U.setAttrib(e,"role","")}},me=(e,t)=>(o,n,r)=>{e(o,r),X(o,t)},ge=(e,t,o)=>{const n=ce(e,o);de(o,n,t,"caption",((e,t,o)=>(e=>{K(e)?(e=>{const t=e.parentNode;u(t)&&(U.insertAfter(e,t),U.remove(t))})(e):(e=>{const t=U.create("figure",{class:"image"});U.insertAfter(t,e),t.appendChild(e),t.appendChild(U.create("figcaption",{contentEditable:"true"},"Caption")),t.contentEditable="false"})(e)})(e))),de(o,n,t,"src",Y),de(o,n,t,"title",Y),de(o,n,t,"width",J(0,e)),de(o,n,t,"height",J(0,e)),de(o,n,t,"class",Y),de(o,n,t,"style",me(((e,t)=>Y(e,"style",t)),e)),de(o,n,t,"hspace",me(ee,e)),de(o,n,t,"vspace",me(te,e)),de(o,n,t,"border",me(oe,e)),de(o,n,t,"borderStyle",me(ne,e)),((e,t,o)=>{o.alt===t.alt&&o.isDecorative===t.isDecorative||ue(e,o.alt,o.isDecorative)})(o,n,t)},pe=(e,t)=>{const o=(e=>{if(e.margin){const t=String(e.margin).split(" ");switch(t.length){case 1:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[0],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[0];break;case 2:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[1];break;case 3:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[1];break;case 4:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[3]}delete e.margin}return e})(e.dom.styles.parse(t)),n=e.dom.styles.parse(e.dom.styles.serialize(o));return e.dom.styles.serialize(n)},he=e=>{const t=e.selection.getNode(),o=e.dom.getParent(t,"figure.image");return o?e.dom.select("img",o)[0]:t&&("IMG"!==t.nodeName||V(t))?null:t},fe=(e,t)=>{var o;const n=e.dom,r=((t,o)=>{const n={};var r;return((e,t,o,n)=>{((e,t)=>{const o=f(e);for(let n=0,r=o.length;n{(t(e,r)?o:n)(e,r)}))})(t,((t,o)=>!e.schema.isValidChild(o,"figure")),(r=n,(e,t)=>{r[t]=e}),p),n})(e.schema.getTextBlockElements()),a=n.getParent(t.parentNode,(e=>{return t=r,o=e.nodeName,b(t,o)&&void 0!==t[o]&&null!==t[o];var t,o}),e.getBody());return a&&null!==(o=n.split(a,t))&&void 0!==o?o:t},ye=(e,t)=>{const o=((t,o)=>{const n=document.createElement("img");if(ge((t=>pe(e,t)),{...o,caption:!1},n),ue(n,o.alt,o.isDecorative),o.caption){const e=U.create("figure",{class:"image"});return e.appendChild(n),e.appendChild(U.create("figcaption",{contentEditable:"true"},"Caption")),e.contentEditable="false",e}return n})(0,t);e.dom.setAttrib(o,"data-mce-id","__mcenew"),e.focus(),e.selection.setContent(o.outerHTML);const n=e.dom.select('*[data-mce-id="__mcenew"]')[0];if(e.dom.setAttrib(n,"data-mce-id",null),ae(n)){const t=fe(e,n);e.selection.select(t)}else e.selection.select(n)},be=(e,t)=>{const o=he(e);if(o){const n={...ce((t=>pe(e,t)),o),...t},r=((e,t)=>{const o=t.src;return{...t,src:Z(e,o)?o:""}})(e,n);n.src?((e,t)=>{const o=he(e);if(o)if(ge((t=>pe(e,t)),t,o),((e,t)=>{e.dom.setAttrib(t,"src",t.getAttribute("src"))})(e,o),ae(o.parentNode)){const t=o.parentNode;fe(e,t),e.selection.select(o.parentNode)}else e.selection.select(o),((e,t,o)=>{const n=()=>{o.onload=o.onerror=null,e.selection&&(e.selection.select(o),e.nodeChanged())};o.onload=()=>{t.width||t.height||!T(e)||e.dom.setAttribs(o,{width:String(o.clientWidth),height:String(o.clientHeight)}),n()},o.onerror=n})(e,t,o)})(e,r):((e,t)=>{if(t){const o=e.dom.is(t.parentNode,"figure.image")?t.parentNode:t;e.dom.remove(o),e.focus(),e.nodeChanged(),e.dom.isEmpty(e.getBody())&&(e.setContent(""),e.selection.setCursorLocation())}})(e,o)}else t.src&&ye(e,{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1,...t})},ve=(ke=(e,t)=>i(e)&&i(t)?ve(e,t):t,(...e)=>{if(0===e.length)throw new Error("Can't merge zero objects");const t={};for(let o=0;oa(e.value)?e.value:"",Ce=(e,t)=>{const o=[];return _e.each(e,(e=>{const n=(e=>a(e.text)?e.text:a(e.title)?e.title:"")(e);if(void 0!==e.menu){const r=Ce(e.menu,t);o.push({text:n,items:r})}else{const r=t(e);o.push({text:n,value:r})}})),o},Se=(e=xe)=>t=>t?h.from(t).map((t=>Ce(t,e))):h.none(),ze=(e,t)=>((e,o)=>{for(let o=0;ob(e,"items"))(n=e[o])?ze(n.items,t):n.value===t?h.some(n):h.none();if(r.isSome())return r}var n;return h.none()})(e),Oe=Se,Te=(e,t)=>e.bind((e=>ze(e,t))),Ee=e=>{const t=Oe((t=>e.convertURL(t.value||t.url||"","src"))),o=new Promise((o=>{((e,t)=>{const o=L(e);a(o)?fetch(o).then((e=>{e.ok&&e.json().then(t)})):m(o)?o(t):t(o)})(e,(e=>{o(t(e).map((e=>k([[{text:"None",value:""}],e]))))}))})),n=(w=N(e),Se(xe)(w)),r=E(e),s=A(e),i=(e=>z(e.options.get("images_upload_url")))(e),l=(e=>u(e.options.get("images_upload_handler")))(e),c=(e=>{const t=he(e);return t?ce((t=>pe(e,t)),t):{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}})(e),d=R(e),g=D(e),p=T(e),f=B(e),y=I(e),b=H(e),v=h.some(M(e)).filter((e=>a(e)&&e.length>0));var w;return o.then((e=>({image:c,imageList:e,classList:n,hasAdvTab:r,hasUploadTab:s,hasUploadUrl:i,hasUploadHandler:l,hasDescription:d,hasImageTitle:g,hasDimensions:p,hasImageCaption:f,prependURL:v,hasAccessibilityOptions:y,automaticUploads:b})))},Ae=e=>{const t=e.imageList.map((e=>({name:"images",type:"listbox",label:"Image list",items:e}))),o={name:"alt",type:"input",label:"Alternative description",enabled:!(e.hasAccessibilityOptions&&e.image.isDecorative)},n=e.classList.map((e=>({name:"classes",type:"listbox",label:"Class",items:e})));return k([[{name:"src",type:"urlinput",filetype:"image",label:"Source"}],t.toArray(),e.hasAccessibilityOptions&&e.hasDescription?[{type:"label",label:"Accessibility",items:[{name:"isDecorative",type:"checkbox",label:"Image is decorative"}]}]:[],e.hasDescription?[o]:[],e.hasImageTitle?[{name:"title",type:"input",label:"Image title"}]:[],e.hasDimensions?[{name:"dimensions",type:"sizeinput"}]:[],[{...(r=e.classList.isSome()&&e.hasImageCaption,r?{type:"grid",columns:2}:{type:"panel"}),items:k([n.toArray(),e.hasImageCaption?[{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[]])}]]);var r},Me=e=>({title:"General",name:"general",items:Ae(e)}),Ne=Ae,Re=e=>({src:{value:e.src,meta:{}},images:e.src,alt:e.alt,title:e.title,dimensions:{width:e.width,height:e.height},classes:e.class,caption:e.caption,style:e.style,vspace:e.vspace,border:e.border,hspace:e.hspace,borderstyle:e.borderStyle,fileinput:[],isDecorative:e.isDecorative}),De=(e,t)=>({src:e.src.value,alt:null!==e.alt&&0!==e.alt.length||!t?e.alt:null,title:e.title,width:e.dimensions.width,height:e.dimensions.height,class:e.classes,style:e.style,caption:e.caption,hspace:e.hspace,vspace:e.vspace,border:e.border,borderStyle:e.borderstyle,isDecorative:e.isDecorative}),Be=(e,t,o,n)=>{((e,t)=>{const o=t.getData();((e,t)=>/^(?:[a-zA-Z]+:)?\/\//.test(t)?h.none():e.prependURL.bind((e=>t.substring(0,e.length)!==e?h.some(e+t):h.none())))(e,o.src.value).each((e=>{t.setData({src:{value:e,meta:o.src.meta}})}))})(t,n),((e,t)=>{const o=t.getData(),n=o.src.meta;if(void 0!==n){const r=ve({},o);((e,t,o)=>{e.hasDescription&&a(o.alt)&&(t.alt=o.alt),e.hasAccessibilityOptions&&(t.isDecorative=o.isDecorative||t.isDecorative||!1),e.hasImageTitle&&a(o.title)&&(t.title=o.title),e.hasDimensions&&(a(o.width)&&(t.dimensions.width=o.width),a(o.height)&&(t.dimensions.height=o.height)),a(o.class)&&Te(e.classList,o.class).each((e=>{t.classes=e.value})),e.hasImageCaption&&d(o.caption)&&(t.caption=o.caption),e.hasAdvTab&&(a(o.style)&&(t.style=o.style),a(o.vspace)&&(t.vspace=o.vspace),a(o.border)&&(t.border=o.border),a(o.hspace)&&(t.hspace=o.hspace),a(o.borderstyle)&&(t.borderstyle=o.borderstyle))})(e,r,n),t.setData(r)}})(t,n),((e,t,o,n)=>{const r=n.getData(),a=r.src.value,s=r.src.meta||{};s.width||s.height||!t.hasDimensions||(z(a)?e.imageSize(a).then((e=>{o.open&&n.setData({dimensions:e})})).catch((e=>console.error(e))):n.setData({dimensions:{width:"",height:""}}))})(e,t,o,n),((e,t,o)=>{const n=o.getData(),r=Te(e.imageList,n.src.value);t.prevImage=r,o.setData({images:r.map((e=>e.value)).getOr("")})})(t,o,n)},Le=(e,t,o,n)=>{const r=n.getData();var a;n.block("Uploading image"),(a=r.fileinput,((e,t)=>0{n.unblock()}),(r=>{const a=URL.createObjectURL(r),s=()=>{n.unblock(),URL.revokeObjectURL(a)},i=r=>{n.setData({src:{value:r,meta:{}}}),n.showTab("general"),Be(e,t,o,n)};var l;(l=r,new Promise(((e,t)=>{const o=new FileReader;o.onload=()=>{e(o.result)},o.onerror=()=>{var e;t(null===(e=o.error)||void 0===e?void 0:e.message)},o.readAsDataURL(l)}))).then((o=>{const l=e.createBlobCache(r,a,o);t.automaticUploads?e.uploadImage(l).then((e=>{i(e.url),s()})).catch((t=>{s(),e.alertErr(t)})):(e.addToBlobCache(l),i(l.blobUri()),n.unblock())}))}))},Ie=(e,t,o)=>(n,r)=>{"src"===r.name?Be(e,t,o,n):"images"===r.name?((e,t,o,n)=>{const r=n.getData(),a=Te(t.imageList,r.images);a.each((e=>{const t=""===r.alt||o.prevImage.map((e=>e.text===r.alt)).getOr(!1);t?""===e.value?n.setData({src:e,alt:o.prevAlt}):n.setData({src:e,alt:e.text}):n.setData({src:e})})),o.prevImage=a,Be(e,t,o,n)})(e,t,o,n):"alt"===r.name?o.prevAlt=n.getData().alt:"fileinput"===r.name?Le(e,t,o,n):"isDecorative"===r.name&&n.setEnabled("alt",!n.getData().isDecorative)},He=e=>()=>{e.open=!1},Pe=e=>e.hasAdvTab||e.hasUploadUrl||e.hasUploadHandler?{type:"tabpanel",tabs:k([[Me(e)],e.hasAdvTab?[{title:"Advanced",name:"advanced",items:[{type:"grid",columns:2,items:[{type:"input",label:"Vertical space",name:"vspace",inputMode:"numeric"},{type:"input",label:"Horizontal space",name:"hspace",inputMode:"numeric"},{type:"input",label:"Border width",name:"border",inputMode:"numeric"},{type:"listbox",name:"borderstyle",label:"Border style",items:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]}]:[],e.hasUploadTab&&(e.hasUploadUrl||e.hasUploadHandler)?[{title:"Upload",name:"upload",items:[{type:"dropzone",name:"fileinput"}]}]:[]])}:{type:"panel",items:Ne(e)},Fe=(e,t,o)=>n=>{const r=ve(Re(t.image),n.getData()),a={...r,style:le(o.normalizeCss,De(r,!1))};e.execCommand("mceUpdateImage",!1,De(a,t.hasAccessibilityOptions)),e.editorUpload.uploadImagesAuto(),n.close()},je=e=>t=>Z(e,t)?(e=>new Promise((t=>{const o=document.createElement("img"),n=e=>{o.onload=o.onerror=null,o.parentNode&&o.parentNode.removeChild(o),t(e)};o.onload=()=>{const e={width:P(o.width,o.clientWidth),height:P(o.height,o.clientHeight)};n(Promise.resolve(e))},o.onerror=()=>{n(Promise.reject(`Failed to get image dimensions for: ${e}`))};const r=o.style;r.visibility="hidden",r.position="fixed",r.bottom=r.left="0px",r.width=r.height="auto",document.body.appendChild(o),o.src=e})))(e.documentBaseURI.toAbsolute(t)).then((e=>({width:String(e.width),height:String(e.height)}))):Promise.resolve({width:"",height:""}),Ve=e=>(t,o,n)=>{var r;return e.editorUpload.blobCache.create({blob:t,blobUri:o,name:null===(r=t.name)||void 0===r?void 0:r.replace(/\.[^\.]+$/,""),filename:t.name,base64:n.split(",")[1]})},Ze=e=>t=>{e.editorUpload.blobCache.add(t)},Ue=e=>t=>{e.windowManager.alert(t)},qe=e=>t=>pe(e,t),We=e=>t=>e.dom.parseStyle(t),$e=e=>(t,o)=>e.dom.serializeStyle(t,o),Ge=e=>t=>we(e).upload([t],!1).then((e=>{var t;return 0===e.length?Promise.reject("Failed to upload image"):!1===e[0].status?Promise.reject(null===(t=e[0].error)||void 0===t?void 0:t.message):e[0]})),Ke=e=>{const t={imageSize:je(e),addToBlobCache:Ze(e),createBlobCache:Ve(e),alertErr:Ue(e),normalizeCss:qe(e),parseStyle:We(e),serializeStyle:$e(e),uploadImage:Ge(e)};return{open:()=>{Ee(e).then((o=>{const n=(e=>({prevImage:Te(e.imageList,e.image.src),prevAlt:e.image.alt,open:!0}))(o);return{title:"Insert/Edit Image",size:"normal",body:Pe(o),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:Re(o.image),onSubmit:Fe(e,o,t),onChange:Ie(t,o,n),onClose:He(n)}})).then(e.windowManager.open)}}},Ye=e=>{const t=e.attr("class");return u(t)&&/\bimage\b/.test(t)},Xe=e=>t=>{let o=t.length;const n=t=>{t.attr("contenteditable",e?"true":null)};for(;o--;){const r=t[o];Ye(r)&&(r.attr("contenteditable",e?"false":null),_e.each(r.getAll("figcaption"),n))}};e.add("image",(e=>{(e=>{const t=e.options.register;t("image_dimensions",{processor:"boolean",default:!0}),t("image_advtab",{processor:"boolean",default:!1}),t("image_uploadtab",{processor:"boolean",default:!0}),t("image_prepend_url",{processor:"string",default:""}),t("image_class_list",{processor:"object[]"}),t("image_description",{processor:"boolean",default:!0}),t("image_title",{processor:"boolean",default:!1}),t("image_caption",{processor:"boolean",default:!1}),t("image_list",{processor:e=>{const t=!1===e||a(e)||((e,t)=>{if(l(e)){for(let o=0,n=e.length;o{e.on("PreInit",(()=>{e.parser.addNodeFilter("figure",Xe(!0)),e.serializer.addNodeFilter("figure",Xe(!1))}))})(e),(e=>{e.ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:Ke(e).open,onSetup:t=>(t.setActive(u(he(e))),e.selection.selectorChangedWithUnbind("img:not([data-mce-object]):not([data-mce-placeholder]),figure.image",t.setActive).unbind)}),e.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:Ke(e).open}),e.ui.registry.addContextMenu("image",{update:e=>ae(e)||"IMG"===e.nodeName&&!V(e)?["image"]:[]})})(e),(e=>{e.addCommand("mceImage",Ke(e).open),e.addCommand("mceUpdateImage",((t,o)=>{e.undoManager.transact((()=>be(e,o)))}))})(e)}))}()},73956:function(e,t,o){o(38006)},38006:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>t.options.get(e),o=t("insertdatetime_dateformat"),n=t("insertdatetime_timeformat"),r=t("insertdatetime_formats"),a=t("insertdatetime_element"),s="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),i="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),l="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),c="January February March April May June July August September October November December".split(" "),d=(e,t)=>{if((e=""+e).length(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+o.getFullYear())).replace("%y",""+o.getYear())).replace("%m",d(o.getMonth()+1,2))).replace("%d",d(o.getDate(),2))).replace("%H",""+d(o.getHours(),2))).replace("%M",""+d(o.getMinutes(),2))).replace("%S",""+d(o.getSeconds(),2))).replace("%I",""+((o.getHours()+11)%12+1))).replace("%p",o.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(c[o.getMonth()]))).replace("%b",""+e.translate(l[o.getMonth()]))).replace("%A",""+e.translate(i[o.getDay()]))).replace("%a",""+e.translate(s[o.getDay()]))).replace("%%","%"),m=(e,t)=>{if(a(e)){const o=u(e,t);let n;n=/%[HMSIp]/.test(t)?u(e,"%Y-%m-%dT%H:%M"):u(e,"%Y-%m-%d");const r=e.dom.getParent(e.selection.getStart(),"time");r?((e,t,o,n)=>{const r=e.dom.create("time",{datetime:o},n);e.dom.replace(r,t),e.selection.select(r,!0),e.selection.collapse(!1)})(e,r,n,o):e.insertContent(''+o+" ")}else e.insertContent(u(e,t))};var g=tinymce.util.Tools.resolve("tinymce.util.Tools");e.add("insertdatetime",(e=>{(e=>{const t=e.options.register;t("insertdatetime_dateformat",{processor:"string",default:e.translate("%Y-%m-%d")}),t("insertdatetime_timeformat",{processor:"string",default:e.translate("%H:%M:%S")}),t("insertdatetime_formats",{processor:"string[]",default:["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"]}),t("insertdatetime_element",{processor:"boolean",default:!1})})(e),(e=>{e.addCommand("mceInsertDate",((t,n)=>{m(e,null!=n?n:o(e))})),e.addCommand("mceInsertTime",((t,o)=>{m(e,null!=o?o:n(e))}))})(e),(e=>{const t=r(e),o=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})((e=>{const t=r(e);return t.length>0?t[0]:n(e)})(e)),a=t=>e.execCommand("mceInsertDate",!1,t);e.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:e=>e===o.get(),fetch:o=>{o(g.map(t,(t=>({type:"choiceitem",text:u(e,t),value:t}))))},onAction:e=>{a(o.get())},onItemAction:(e,t)=>{o.set(t),a(t)}});const s=e=>()=>{o.set(e),a(e)};e.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:()=>g.map(t,(t=>({type:"menuitem",text:u(e,t),onAction:s(t)})))})})(e)}))}()},72682:function(e,t,o){o(27384)},27384:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(a=n.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var o,n,r,a})(t)===e,o=e=>t=>typeof t===e,n=t("string"),r=t("object"),a=t("array"),s=(null,e=>null===e);const i=o("boolean"),l=e=>!(e=>null==e)(e),c=o("function"),d=(e,t)=>{if(a(e)){for(let o=0,n=e.length;o{},m=(e,t)=>e===t;class g{constructor(e,t){this.tag=e,this.value=t}static some(e){return new g(!0,e)}static none(){return g.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?g.some(e(this.value)):g.none()}bind(e){return this.tag?e(this.value):g.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:g.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return l(e)?g.some(e):g.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}g.singletonNone=new g(!1);const p=Array.prototype.indexOf,h=Array.prototype.push,f=e=>{const t=[];for(let o=0,n=e.length;o{for(let o=0;oe.exists((e=>o(e,t))),v=e=>{const t=[],o=e=>{t.push(e)};for(let t=0;te?g.some(t):g.none(),w=e=>t=>t.options.get(e),_=w("link_assume_external_targets"),x=w("link_context_toolbar"),C=w("link_list"),S=w("link_default_target"),z=w("link_default_protocol"),O=w("link_target_list"),T=w("link_rel_list"),E=w("link_class_list"),A=w("link_title"),M=w("allow_unsafe_link_target"),N=w("link_quicklink");var R=tinymce.util.Tools.resolve("tinymce.util.Tools");const D=e=>n(e.value)?e.value:"",B=(e,t)=>{const o=[];return R.each(e,(e=>{const r=(e=>n(e.text)?e.text:n(e.title)?e.title:"")(e);if(void 0!==e.menu){const n=B(e.menu,t);o.push({text:r,items:n})}else{const n=t(e);o.push({text:r,value:n})}})),o},L=(e=D)=>t=>g.from(t).map((t=>B(t,e))),I=e=>L(D)(e),H=L,P=(e,t)=>o=>({name:e,type:"listbox",label:t,items:o}),F=D,j=Object.keys,V=Object.hasOwnProperty,Z=(e,t)=>V.call(e,t);var U=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),q=tinymce.util.Tools.resolve("tinymce.util.URI");const W=e=>l(e)&&"a"===e.nodeName.toLowerCase(),$=e=>W(e)&&!!Y(e),G=(e,t)=>{if(e.collapsed)return[];{const o=e.cloneContents(),n=o.firstChild,r=new U(n,o),a=[];let s=n;do{t(s)&&a.push(s)}while(s=r.next());return a}},K=e=>/^\w+:/i.test(e),Y=e=>{var t,o;return null!==(o=null!==(t=e.getAttribute("data-mce-href"))&&void 0!==t?t:e.getAttribute("href"))&&void 0!==o?o:""},X=(e,t)=>{const o=["noopener"],n=e?e.split(/\s+/):[],r=e=>e.filter((e=>-1===R.inArray(o,e))),a=t?(e=>(e=r(e)).length>0?e.concat(o):o)(n):r(n);return a.length>0?(e=>R.trim(e.sort().join(" ")))(a):""},J=(e,t)=>(t=t||te(e.selection.getRng())[0]||e.selection.getNode(),ae(t)?g.from(e.dom.select("a[href]",t)[0]):g.from(e.dom.getParent(t,"a[href]"))),Q=(e,t)=>J(e,t).isSome(),ee=(e,t)=>t.fold((()=>e.getContent({format:"text"})),(e=>e.innerText||e.textContent||"")).replace(/\uFEFF/g,""),te=e=>G(e,$),oe=e=>R.grep(e,$),ne=e=>oe(e).length>0,re=e=>{const t=e.schema.getTextInlineElements();if(J(e).exists((e=>e.hasAttribute("data-mce-block"))))return!1;const o=e.selection.getRng();return!!o.collapsed||0===G(o,(e=>1===e.nodeType&&!W(e)&&!Z(t,e.nodeName.toLowerCase()))).length},ae=e=>l(e)&&"FIGURE"===e.nodeName&&/\bimage\b/i.test(e.className),se=(e,t,o)=>{const n=e.selection.getNode(),r=J(e,n),a=((e,t)=>{const o={...t};if(0===T(e).length&&!M(e)){const e=X(o.rel,"_blank"===o.target);o.rel=e||null}return g.from(o.target).isNone()&&!1===O(e)&&(o.target=S(e)),o.href=((e,t)=>"http"!==t&&"https"!==t||K(e)?e:t+"://"+e)(o.href,_(e)),o})(e,(e=>{return t=["title","rel","class","target"],o=(t,o)=>(e[o].each((e=>{t[o]=e.length>0?e:null})),t),n={href:e.href},((e,t)=>{for(let o=0,n=e.length;o{n=o(n,e)})),n;var t,o,n})(o));e.undoManager.transact((()=>{o.href===t.href&&t.attach(),r.fold((()=>{((e,t,o,n)=>{const r=e.dom;ae(t)?ue(r,t,n):o.fold((()=>{e.execCommand("mceInsertLink",!1,n)}),(t=>{e.insertContent(r.createHTML("a",n,r.encode(t)))}))})(e,n,o.text,a)}),(t=>{e.focus(),((e,t,o,n)=>{o.each((e=>{Z(t,"innerText")?t.innerText=e:t.textContent=e})),e.dom.setAttribs(t,n),e.selection.select(t)})(e,t,o.text,a)}))}))},ie=e=>{const{class:t,href:o,rel:n,target:r,text:a,title:i}=e;return((e,t)=>{const o={};var n;return((e,t,o,n)=>{((e,t)=>{const o=j(e);for(let n=0,r=o.length;n{(t(e,r)?o:n)(e,r)}))})(e,((e,t)=>!1===s(e)),(n=o,(e,t)=>{n[t]=e}),u),o})({class:t.getOrNull(),href:o,rel:n.getOrNull(),target:r.getOrNull(),text:a.getOrNull(),title:i.getOrNull()})},le=(e,t,o)=>{const n=((e,t)=>{const o=e.options.get,n={allow_html_data_urls:o("allow_html_data_urls"),allow_script_urls:o("allow_script_urls"),allow_svg_data_urls:o("allow_svg_data_urls")},r=t.href;return{...t,href:q.isDomSafe(r,"a",n)?r:""}})(e,o);e.hasPlugin("rtc",!0)?e.execCommand("createlink",!1,ie(n)):se(e,t,n)},ce=e=>{e.hasPlugin("rtc",!0)?e.execCommand("unlink"):(e=>{e.undoManager.transact((()=>{const t=e.selection.getNode();ae(t)?de(e,t):(e=>{const t=e.dom,o=e.selection,n=o.getBookmark(),r=o.getRng().cloneRange(),a=t.getParent(r.startContainer,"a[href]",e.getBody()),s=t.getParent(r.endContainer,"a[href]",e.getBody());a&&r.setStartBefore(a),s&&r.setEndAfter(s),o.setRng(r),e.execCommand("unlink"),o.moveToBookmark(n)})(e),e.focus()}))})(e)},de=(e,t)=>{var o;const n=e.dom.select("img",t)[0];if(n){const r=e.dom.getParents(n,"a[href]",t)[0];r&&(null===(o=r.parentNode)||void 0===o||o.insertBefore(n,r),e.dom.remove(r))}},ue=(e,t,o)=>{var n;const r=e.select("img",t)[0];if(r){const t=e.create("a",o);null===(n=r.parentNode)||void 0===n||n.insertBefore(t,r),t.appendChild(r)}},me=(e,t)=>y(t,(t=>(e=>{return Z(t=e,o="items")&&void 0!==t[o]&&null!==t[o];var t,o})(t)?me(e,t.items):k(t.value===e,t))),ge=(e,t)=>{const o={text:e.text,title:e.title},n=(e,n)=>{const r=(a=t,s=n,"link"===s?a.link:"anchor"===s?a.anchor:g.none()).getOr([]);var a,s;return((e,t,o,n)=>{const r=n[t],a=e.length>0;return void 0!==r?me(r,o).map((t=>({url:{value:t.value,meta:{text:a?e:t.text,attach:u}},text:a?e:t.text}))):g.none()})(o.text,n,r,e)};return{onChange:(e,t)=>{const r=t.name;return"url"===r?(e=>{const t=(n=e.url,k(o.text.length<=0,g.from(null===(r=n.meta)||void 0===r?void 0:r.text).getOr(n.value)));var n,r;const a=(e=>{var t;return k(o.title.length<=0,g.from(null===(t=e.meta)||void 0===t?void 0:t.title).getOr(""))})(e.url);return t.isSome()||a.isSome()?g.some({...t.map((e=>({text:e}))).getOr({}),...a.map((e=>({title:e}))).getOr({})}):g.none()})(e()):((e,t)=>p.call(e,t))(["anchor","link"],r)>-1?n(e(),r):"text"===r||"title"===r?(o[r]=e()[r],g.none()):g.none()}}};var pe=tinymce.util.Tools.resolve("tinymce.util.Delay");const he=e=>{const t=e.href;return t.indexOf("@")>0&&-1===t.indexOf("/")&&-1===t.indexOf("mailto:")?g.some({message:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",preprocess:e=>({...e,href:"mailto:"+t})}):g.none()},fe=(e,t)=>o=>{const n=o.href;return 1===e&&!K(n)||0===e&&/^\s*www(\.|\d\.)/i.test(n)?g.some({message:`The URL you entered seems to be an external link. Do you want to add the required ${t}:// prefix?`,preprocess:e=>({...e,href:t+"://"+n})}):g.none()},ye=e=>{const t=e.dom.select("a:not([href])"),o=f(((e,t)=>{const o=e.length,n=new Array(o);for(let r=0;r{const t=e.name||e.id;return t?[{text:t,value:"#"+t}]:[]})));return o.length>0?g.some([{text:"None",value:""}].concat(o)):g.none()},be=e=>{const t=E(e);return t.length>0?I(t):g.none()},ve=e=>{try{return g.some(JSON.parse(e))}catch(e){return g.none()}},ke=(e,t)=>{const o=T(e);if(o.length>0){const n=b(t,"_blank"),r=e=>X(F(e),n);return(!1===M(e)?H(r):I)(o)}return g.none()},we=[{text:"Current window",value:""},{text:"New window",value:"_blank"}],_e=e=>{const t=O(e);return a(t)?I(t).orThunk((()=>g.some(we))):!1===t?g.none():g.some(we)},xe=(e,t,o)=>{const n=e.getAttrib(t,o);return null!==n&&n.length>0?g.some(n):g.none()},Ce=(e,t)=>(e=>{const t=t=>e.convertURL(t.value||t.url||"","href"),o=C(e);return new Promise((e=>{n(o)?fetch(o).then((e=>e.ok?e.text().then(ve):Promise.reject())).then(e,(()=>e(g.none()))):c(o)?o((t=>e(g.some(t)))):e(g.from(o))})).then((e=>e.bind(H(t)).map((e=>e.length>0?[{text:"None",value:""}].concat(e):e))))})(e).then((o=>{const n=((e,t)=>{const o=e.dom,n=re(e)?g.some(ee(e.selection,t)):g.none(),r=t.bind((e=>g.from(o.getAttrib(e,"href")))),a=t.bind((e=>g.from(o.getAttrib(e,"target")))),s=t.bind((e=>xe(o,e,"rel"))),i=t.bind((e=>xe(o,e,"class")));return{url:r,text:n,title:t.bind((e=>xe(o,e,"title"))),target:a,rel:s,linkClass:i}})(e,t);return{anchor:n,catalogs:{targets:_e(e),rels:ke(e,n.target),classes:be(e),anchor:ye(e),link:o},optNode:t,flags:{titleEnabled:A(e)}}})),Se=e=>{const t=(e=>{const t=J(e);return Ce(e,t)})(e);t.then((t=>{const o=((e,t)=>o=>{const n=o.getData();if(!n.url.value)return ce(e),void o.close();const r=e=>g.from(n[e]).filter((o=>!b(t.anchor[e],o))),a={href:n.url.value,text:r("text"),target:r("target"),rel:r("rel"),class:r("linkClass"),title:r("title")},s={href:n.url.value,attach:void 0!==n.url.meta&&n.url.meta.attach?n.url.meta.attach:u};((e,t)=>y([he,fe(_(e),z(e))],(e=>e(t))).fold((()=>Promise.resolve(t)),(o=>new Promise((n=>{((e,t,o)=>{const n=e.selection.getRng();pe.setEditorTimeout(e,(()=>{e.windowManager.confirm(t,(t=>{e.selection.setRng(n),o(t)}))}))})(e,o.message,(e=>{n(e?o.preprocess(t):t)}))})))))(e,a).then((t=>{le(e,s,t)})),o.close()})(e,t);return((e,t,o)=>{const n=e.anchor.text.map((()=>({name:"text",type:"input",label:"Text to display"}))).toArray(),r=e.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[],a=((e,t)=>{const o=e.anchor,n=o.url.getOr("");return{url:{value:n,meta:{original:{value:n}}},text:o.text.getOr(""),title:o.title.getOr(""),anchor:n,link:n,rel:o.rel.getOr(""),target:o.target.or(t).getOr(""),linkClass:o.linkClass.getOr("")}})(e,g.from(S(o))),s=e.catalogs,i=ge(a,s);return{title:"Insert/Edit Link",size:"normal",body:{type:"panel",items:f([[{name:"url",type:"urlinput",filetype:"file",label:"URL"}],n,r,v([s.anchor.map(P("anchor","Anchors")),s.rels.map(P("rel","Rel")),s.targets.map(P("target","Open link in...")),s.link.map(P("link","Link list")),s.classes.map(P("linkClass","Class"))])])},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:a,onChange:(e,{name:t})=>{i.onChange(e.getData,{name:t}).each((t=>{e.setData(t)}))},onSubmit:t}})(t,o,e)})).then((t=>{e.windowManager.open(t)}))};var ze=tinymce.util.Tools.resolve("tinymce.util.VK");const Oe=(e,t)=>e.dom.getParent(t,"a[href]"),Te=e=>Oe(e,e.selection.getStart()),Ee=(e,t)=>{if(t){const o=Y(t);if(/^#/.test(o)){const t=e.dom.select(o);t.length&&e.selection.scrollIntoView(t[0],!0)}else(e=>{const t=document.createElement("a");t.target="_blank",t.href=e,t.rel="noreferrer noopener";const o=document.createEvent("MouseEvents");o.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),((e,t)=>{document.body.appendChild(e),e.dispatchEvent(t),document.body.removeChild(e)})(t,o)})(t.href)}},Ae=e=>()=>{e.execCommand("mceLink",!1,{dialog:!0})},Me=e=>()=>{Ee(e,Te(e))},Ne=(e,t)=>(e.on("NodeChange",t),()=>e.off("NodeChange",t)),Re=e=>t=>{const o=()=>t.setActive(!e.mode.isReadOnly()&&Q(e,e.selection.getNode()));return o(),Ne(e,o)},De=e=>t=>{const o=()=>t.setEnabled((e=>1===(e.selection.isCollapsed()?oe(e.dom.getParents(e.selection.getStart())):te(e.selection.getRng())).length)(e));return o(),Ne(e,o)},Be=e=>t=>{const o=t=>{return ne(t)||(o=e.selection.getRng(),te(o).length>0);var o},n=e.dom.getParents(e.selection.getStart());return t.setEnabled(o(n)),Ne(e,(e=>t.setEnabled(o(e.parents))))};e.add("link",(e=>{(e=>{const t=e.options.register;t("link_assume_external_targets",{processor:e=>{const t=n(e)||i(e);return t?!0===e?{value:1,valid:t}:"http"===e||"https"===e?{value:e,valid:t}:{value:0,valid:t}:{valid:!1,message:"Must be a string or a boolean."}},default:!1}),t("link_context_toolbar",{processor:"boolean",default:!1}),t("link_list",{processor:e=>n(e)||c(e)||d(e,r)}),t("link_default_target",{processor:"string"}),t("link_default_protocol",{processor:"string",default:"https"}),t("link_target_list",{processor:e=>i(e)||d(e,r),default:!0}),t("link_rel_list",{processor:"object[]",default:[]}),t("link_class_list",{processor:"object[]",default:[]}),t("link_title",{processor:"boolean",default:!0}),t("allow_unsafe_link_target",{processor:"boolean",default:!1}),t("link_quicklink",{processor:"boolean",default:!1})})(e),(e=>{e.ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",onAction:Ae(e),onSetup:Re(e)}),e.ui.registry.addButton("openlink",{icon:"new-tab",tooltip:"Open link",onAction:Me(e),onSetup:De(e)}),e.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:()=>ce(e),onSetup:Be(e)})})(e),(e=>{e.ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:Me(e),onSetup:De(e)}),e.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onAction:Ae(e)}),e.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:()=>ce(e),onSetup:Be(e)})})(e),(e=>{e.ui.registry.addContextMenu("link",{update:t=>e.dom.isEditable(t)?ne(e.dom.getParents(t,"a"))?"link unlink openlink":"link":""})})(e),(e=>{const t=t=>{const o=e.selection.getNode();return t.setEnabled(Q(e,o)),u};e.ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:Re(e)},label:"Link",predicate:t=>x(e)&&Q(e,t),initValue:()=>J(e).fold((()=>""),Y),commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:!0,onSetup:t=>{const o=e.selection.getNode();return t.setActive(Q(e,o)),Re(e)(t)},onAction:t=>{const o=t.getValue(),n=(t=>{const o=J(e),n=re(e);if(o.isNone()&&n){const n=ee(e.selection,o);return k(0===n.length,t)}return g.none()})(o);le(e,{href:o,attach:u},{href:o,text:n,title:g.none(),rel:g.none(),target:g.none(),class:g.none()}),(e=>{e.selection.collapse(!1)})(e),t.hide()}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:t,onAction:t=>{ce(e),t.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:t,onAction:t=>{Me(e)(),t.hide()}}]})})(e),(e=>{e.on("click",(t=>{const o=Oe(e,t.target);o&&ze.metaKeyPressed(t)&&(t.preventDefault(),Ee(e,o))})),e.on("keydown",(t=>{if(!t.isDefaultPrevented()&&13===t.keyCode&&(e=>!0===e.altKey&&!1===e.shiftKey&&!1===e.ctrlKey&&!1===e.metaKey)(t)){const o=Te(e);o&&(t.preventDefault(),Ee(e,o))}}))})(e),(e=>{e.addCommand("mceLink",((t,o)=>{!0!==(null==o?void 0:o.dialog)&&N(e)?e.dispatch("contexttoolbar-show",{toolbarKey:"quicklink"}):Se(e)}))})(e),(e=>{e.addShortcut("Meta+K","",(()=>{e.execCommand("mceLink")}))})(e)}))}()},1236:function(e,t,o){o(77585)},77585:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(a=n.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var o,n,r,a})(t)===e,o=e=>t=>typeof t===e,n=t("string"),r=t("object"),a=t("array"),s=o("boolean"),i=e=>!(e=>null==e)(e),l=o("function"),c=o("number"),d=()=>{},u=(e,t)=>e===t,m=e=>t=>!e(t),g=(!1,()=>false);class p{constructor(e,t){this.tag=e,this.value=t}static some(e){return new p(!0,e)}static none(){return p.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?p.some(e(this.value)):p.none()}bind(e){return this.tag?e(this.value):p.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:p.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return i(e)?p.some(e):p.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}p.singletonNone=new p(!1);const h=Array.prototype.slice,f=Array.prototype.indexOf,y=Array.prototype.push,b=(e,t)=>{return o=e,n=t,f.call(o,n)>-1;var o,n},v=(e,t)=>{for(let o=0,n=e.length;o{const o=e.length,n=new Array(o);for(let r=0;r{for(let o=0,n=e.length;o{const o=[];for(let n=0,r=e.length;n(w(e,((e,n)=>{o=t(o,e,n)})),o),C=(e,t,o)=>{for(let n=0,r=e.length;nC(e,t,g),z=(e,t)=>(e=>{const t=[];for(let o=0,n=e.length;o{const t=h.call(e,0);return t.reverse(),t},T=(e,t)=>t>=0&&tT(e,0),A=e=>T(e,e.length-1),M=(e,t)=>{const o=[],n=l(t)?e=>v(o,(o=>t(o,e))):e=>b(o,e);for(let t=0,r=e.length;te.exists((e=>o(e,t))),R=(e,t,o)=>e.isSome()&&t.isSome()?p.some(o(e.getOrDie(),t.getOrDie())):p.none(),D=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},B=(e,t)=>{const o=(t||document).createElement(e);return D(o)},L=D,I=(e,t)=>e.dom===t.dom;"undefined"!=typeof window?window:Function("return this;")();const H=e=>e.dom.nodeName.toLowerCase(),P=(1,e=>1===(e=>e.dom.nodeType)(e));const F=e=>t=>P(t)&&H(t)===e,j=e=>p.from(e.dom.parentNode).map(L),V=e=>k(e.dom.childNodes,L),Z=(e,t)=>{const o=e.dom.childNodes;return p.from(o[t]).map(L)},U=e=>Z(e,0),q=e=>Z(e,e.dom.childNodes.length-1),W=(e,t,o)=>{let n=e.dom;const r=l(o)?o:g;for(;n.parentNode;){n=n.parentNode;const e=L(n);if(t(e))return p.some(e);if(r(e))break}return p.none()},$=(e,t,o)=>((e,t,o,n,r)=>n(o)?p.some(o):l(r)&&r(o)?p.none():t(o,n,r))(0,W,e,t,o),G=(e,t)=>{j(e).each((o=>{o.dom.insertBefore(t.dom,e.dom)}))},K=(e,t)=>{e.dom.appendChild(t.dom)},Y=(e,t)=>{w(t,(t=>{K(e,t)}))},X=e=>{e.dom.textContent="",w(V(e),(e=>{J(e)}))},J=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)};var Q=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),ee=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),te=tinymce.util.Tools.resolve("tinymce.util.VK");const oe=e=>k(e,L),ne=Object.keys,re=(e,t)=>{const o=ne(e);for(let n=0,r=o.length;n{const o=e.dom;re(t,((e,t)=>{((e,t,o)=>{if(!(n(o)||s(o)||c(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")})(o,t,e)}))},se=e=>x(e.dom.attributes,((e,t)=>(e[t.name]=t.value,e)),{}),ie=e=>((e,t)=>L(e.dom.cloneNode(!0)))(e),le=(e,t)=>{const o=((e,t)=>{const o=B(t),n=se(e);return ae(o,n),o})(e,t);var n,r;r=o,(e=>p.from(e.dom.nextSibling).map(L))(n=e).fold((()=>{j(n).each((e=>{K(e,r)}))}),(e=>{G(e,r)}));const a=V(e);return Y(o,a),J(e),o};var ce=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),de=tinymce.util.Tools.resolve("tinymce.util.Tools");const ue=e=>t=>i(t)&&t.nodeName.toLowerCase()===e,me=e=>t=>i(t)&&e.test(t.nodeName),ge=e=>i(e)&&3===e.nodeType,pe=e=>i(e)&&1===e.nodeType,he=me(/^(OL|UL|DL)$/),fe=me(/^(OL|UL)$/),ye=ue("ol"),be=me(/^(LI|DT|DD)$/),ve=me(/^(DT|DD)$/),ke=me(/^(TH|TD)$/),we=ue("br"),_e=(e,t)=>i(t)&&t.nodeName in e.schema.getTextBlockElements(),xe=(e,t)=>i(e)&&e.nodeName in t,Ce=(e,t)=>i(t)&&t.nodeName in e.schema.getVoidElements(),Se=(e,t,o)=>{const n=e.isEmpty(t);return!(o&&e.select("span[data-mce-type=bookmark]",t).length>0)&&n},ze=(e,t)=>e.isChildOf(t,e.getRoot()),Oe=e=>t=>t.options.get(e),Te=Oe("lists_indent_on_tab"),Ee=Oe("forced_root_block"),Ae=Oe("forced_root_block_attrs"),Me=(e,t)=>{const o=e.dom,n=e.schema.getBlockElements(),r=o.createFragment(),a=Ee(e),s=Ae(e);let i,l,c=!1;for(l=o.create(a,s),xe(t.firstChild,n)||r.appendChild(l);i=t.firstChild;){const e=i.nodeName;c||"SPAN"===e&&"bookmark"===i.getAttribute("data-mce-type")||(c=!0),xe(i,n)?(r.appendChild(i),l=null):(l||(l=o.create(a,s),r.appendChild(l)),l.appendChild(i))}return!c&&l&&l.appendChild(o.create("br",{"data-mce-bogus":"1"})),r},Ne=ce.DOM,Re=F("dd"),De=F("dt"),Be=(e,t)=>{var o;Re(t)?le(t,"dt"):De(t)&&(o=t,p.from(o.dom.parentElement).map(L)).each((o=>((e,t,o)=>{const n=Ne.select('span[data-mce-type="bookmark"]',t),r=Me(e,o),a=Ne.createRng();a.setStartAfter(o),a.setEndAfter(t);const s=a.extractContents();for(let t=s.firstChild;t;t=t.firstChild)if("LI"===t.nodeName&&e.dom.isEmpty(t)){Ne.remove(t);break}e.dom.isEmpty(s)||Ne.insertAfter(s,t),Ne.insertAfter(r,t);const i=o.parentElement;i&&Se(e.dom,i)&&(e=>{const t=e.parentNode;t&&de.each(n,(e=>{t.insertBefore(e,o.parentNode)})),Ne.remove(e)})(i),Ne.remove(o),Se(e.dom,t)&&Ne.remove(t)})(e,o.dom,t.dom)))},Le=e=>{De(e)&&le(e,"dd")},Ie=(e,t)=>{if(ge(e))return{container:e,offset:t};const o=Q.getNode(e,t);return ge(o)?{container:o,offset:t>=e.childNodes.length?o.data.length:0}:o.previousSibling&&ge(o.previousSibling)?{container:o.previousSibling,offset:o.previousSibling.data.length}:o.nextSibling&&ge(o.nextSibling)?{container:o.nextSibling,offset:0}:{container:e,offset:t}},He=e=>{const t=e.cloneRange(),o=Ie(e.startContainer,e.startOffset);t.setStart(o.container,o.offset);const n=Ie(e.endContainer,e.endOffset);return t.setEnd(n.container,n.offset),t},Pe=["OL","UL","DL"],Fe=Pe.join(","),je=(e,t)=>{const o=t||e.selection.getStart(!0);return e.dom.getParent(o,Fe,Ue(e,o))},Ve=e=>{const t=e.selection.getSelectedBlocks();return _(((e,t)=>{const o=de.map(t,(t=>e.dom.getParent(t,"li,dd,dt",Ue(e,t))||t));return M(o)})(e,t),be)},Ze=(e,t)=>{const o=e.dom.getParents(t,"TD,TH");return o.length>0?o[0]:e.getBody()},Ue=(e,t)=>{const o=e.dom.getParents(t,e.dom.isBlock),n=S(o,(t=>{return o=e.schema,!he(n=t)&&!be(n)&&v(Pe,(e=>o.isValidChild(n.nodeName,e)));var o,n}));return n.getOr(e.getBody())},qe=(e,t)=>{const o=e.dom.getParents(t,"ol,ul",Ue(e,t));return A(o)},We=(e,t)=>{const o=k(t,(t=>qe(e,t).getOr(t)));return M(o)},$e=e=>/\btox\-/.test(e.className),Ge=(e,t)=>C(e,he,ke).exists((e=>e.nodeName===t&&!$e(e))),Ke=(e,t)=>null!==t&&!e.dom.isEditable(t),Ye=(e,t)=>{const o=e.dom.getParent(t,"ol,ul,dl");return Ke(e,o)},Xe=(e,t)=>{const o=e.selection.getNode();return t({parents:e.dom.getParents(o),element:o}),e.on("NodeChange",t),()=>e.off("NodeChange",t)},Je=(e,t,o)=>e.dispatch("ListMutation",{action:t,element:o}),Qe=(et=/^\s+|\s+$/g,e=>e.replace(et,""));var et;const tt=(e,t,o)=>{((e,t,o)=>{if(!n(o))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);(e=>void 0!==e.style&&l(e.style.getPropertyValue))(e)&&e.style.setProperty(t,o)})(e.dom,t,o)},ot=(e,t)=>{K(e.item,t.list)},nt=(e,t)=>{const o={list:B(t,e),item:B("li",e)};return K(o.list,o.item),o},rt=e=>((e,t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}})(e,"OL,UL"),at=e=>U(e).exists(rt),st=e=>e.depth>0,it=e=>e.isSelected,lt=e=>{const t=V(e),o=q(e).exists(rt)?t.slice(0,-1):t;return k(o,ie)},ct=e=>(w(e,((t,o)=>{((e,t)=>{const o=e[t].depth,n=e=>e.depth===o&&!e.dirty,r=e=>e.depthC(e.slice(t+1),n,r)))})(e,o).fold((()=>{t.dirty&&(e=>{e.listAttributes=((e,t)=>{const o={};var n;return((e,t,o,n)=>{re(e,((e,r)=>{(t(e,r)?o:n)(e,r)}))})(e,t,(n=o,(e,t)=>{n[t]=e}),d),o})(e.listAttributes,((e,t)=>"start"!==t))})(t)}),(e=>{return n=e,(o=t).listType=n.listType,void(o.listAttributes={...n.listAttributes});var o,n}))})),e),dt=(e,t,o,n)=>U(n).filter(rt).fold((()=>{t.each((e=>{I(e.start,n)&&o.set(!0)}));const r=((e,t,o)=>j(e).filter(P).map((n=>({depth:t,dirty:!1,isSelected:o,content:lt(e),itemAttributes:se(e),listAttributes:se(n),listType:H(n)}))))(n,e,o.get());t.each((e=>{I(e.end,n)&&o.set(!1)}));const a=q(n).filter(rt).map((n=>ut(e,t,o,n))).getOr([]);return r.toArray().concat(a)}),(n=>ut(e,t,o,n))),ut=(e,t,o,n)=>z(V(n),(n=>(rt(n)?ut:dt)(e+1,t,o,n))),mt=(e,t)=>{const o=ct(t);return((e,t)=>{const o=x(t,((t,o)=>o.depth>t.length?((e,t,o)=>{const n=((e,t,o)=>{const n=[];for(let r=0;r{for(let t=1;t{for(let t=0;t{ae(e.list,t.listAttributes),ae(e.item,t.itemAttributes),Y(e.item,t.content)}))})(n,o),r=n,R(A(t),E(r),ot),t.concat(n)})(e,t,o):((e,t,o)=>{const n=t.slice(0,o.depth);return A(n).each((t=>{const n=((e,t,o)=>{const n=B("li",e);return ae(n,t),Y(n,o),n})(e,o.itemAttributes,o.content);((e,t)=>{K(e.list,t),e.item=t})(t,n),((e,t)=>{H(e.list)!==t.listType&&(e.list=le(e.list,t.listType)),ae(e.list,t.listAttributes)})(t,o)})),n})(e,t,o)),[]);return E(o).map((e=>e.list))})(e.contentDocument,o).toArray()},gt=(e,t,o)=>{const n=((e,t)=>{const o=(e=>{let t=!1;return{get:()=>t,set:e=>{t=e}}})();return k(e,(e=>({sourceList:e,entries:ut(0,t,o,e)})))})(t,(e=>{const t=k(Ve(e),L);return R(S(t,m(at)),S(O(t),m(at)),((e,t)=>({start:e,end:t})))})(e));w(n,(t=>{((e,t)=>{w(_(e,it),(e=>((e,t)=>{switch(e){case"Indent":t.depth++;break;case"Outdent":t.depth--;break;case"Flatten":t.depth=0}t.dirty=!0})(t,e)))})(t.entries,o);const n=((e,t)=>z(((e,t)=>{if(0===e.length)return[];{let o=t(e[0]);const n=[];let r=[];for(let a=0,s=e.length;aE(t).exists(st)?mt(e,t):((e,t)=>{const o=ct(t);return k(o,(t=>{const o=((e,t)=>{const o=document.createDocumentFragment();return w(e,(e=>{o.appendChild(e.dom)})),L(o)})(t.content);return L(Me(e,o.dom))}))})(e,t))))(e,t.entries);var r;w(n,(t=>{Je(e,"Indent"===o?"IndentList":"OutdentList",t.dom)})),r=t.sourceList,w(n,(e=>{G(r,e)})),J(t.sourceList)}))},pt=(e,t)=>{const o=oe((e=>{const t=(e=>{const t=qe(e,e.selection.getStart()),o=_(e.selection.getSelectedBlocks(),fe);return t.toArray().concat(o)})(e);return We(e,t)})(e)),n=oe((e=>_(Ve(e),ve))(e));let r=!1;if(o.length||n.length){const a=e.selection.getBookmark();gt(e,o,t),((e,t,o)=>{w(o,"Indent"===t?Le:t=>Be(e,t))})(e,t,n),e.selection.moveToBookmark(a),e.selection.setRng(He(e.selection.getRng())),e.nodeChanged(),r=!0}return r},ht=(e,t)=>!(e=>{const t=je(e);return Ke(e,t)})(e)&&pt(e,t),ft=e=>ht(e,"Indent"),yt=e=>ht(e,"Outdent"),bt=e=>ht(e,"Flatten"),vt=e=>"\ufeff"===e;var kt=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager");const wt=ce.DOM,_t=e=>{const t={},o=o=>{let n=e[o?"startContainer":"endContainer"],r=e[o?"startOffset":"endOffset"];if(pe(n)){const e=wt.create("span",{"data-mce-type":"bookmark"});n.hasChildNodes()?(r=Math.min(r,n.childNodes.length-1),o?n.insertBefore(e,n.childNodes[r]):wt.insertAfter(e,n.childNodes[r])):n.appendChild(e),n=e,r=0}t[o?"startContainer":"endContainer"]=n,t[o?"startOffset":"endOffset"]=r};return o(!0),e.collapsed||o(),t},xt=e=>{const t=t=>{let o=e[t?"startContainer":"endContainer"],n=e[t?"startOffset":"endOffset"];if(o){if(pe(o)&&o.parentNode){const e=o;n=(e=>{var t;let o=null===(t=e.parentNode)||void 0===t?void 0:t.firstChild,n=0;for(;o;){if(o===e)return n;pe(o)&&"bookmark"===o.getAttribute("data-mce-type")||n++,o=o.nextSibling}return-1})(o),o=o.parentNode,wt.remove(e),!o.hasChildNodes()&&wt.isBlock(o)&&o.appendChild(wt.create("br"))}e[t?"startContainer":"endContainer"]=o,e[t?"startOffset":"endOffset"]=n}};t(!0),t();const o=wt.createRng();return o.setStart(e.startContainer,e.startOffset),e.endContainer&&o.setEnd(e.endContainer,e.endOffset),He(o)},Ct=e=>{switch(e){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}},St=(e,t)=>{de.each(t,((t,o)=>{e.setAttribute(o,t)}))},zt=(e,t,o)=>{((e,t,o)=>{const n=o["list-style-type"]?o["list-style-type"]:null;e.setStyle(t,"list-style-type",n)})(e,t,o),((e,t,o)=>{St(t,o["list-attributes"]),de.each(e.select("li",t),(e=>{St(e,o["list-item-attributes"])}))})(e,t,o)},Ot=(e,t)=>i(t)&&!xe(t,e.schema.getBlockElements()),Tt=(e,t,o,n)=>{let r=t[o?"startContainer":"endContainer"];const a=t[o?"startOffset":"endOffset"];pe(r)&&(r=r.childNodes[Math.min(a,r.childNodes.length-1)]||r),!o&&we(r.nextSibling)&&(r=r.nextSibling);const s=(t,o)=>{var r;const a=new ee(t,n),s=o?"next":"prev";let i;for(;i=a[s]();)if(!Ce(e,i)&&!vt(i.textContent)&&0!==(null===(r=i.textContent)||void 0===r?void 0:r.length))return p.some(i);return p.none()};if(o&&ge(r))if(vt(r.textContent))r=s(r,!1).getOr(r);else for(null!==r.parentNode&&Ot(e,r.parentNode)&&(r=r.parentNode);null!==r.previousSibling&&(Ot(e,r.previousSibling)||ge(r.previousSibling));)r=r.previousSibling;if(!o&&ge(r))if(vt(r.textContent))r=s(r,!0).getOr(r);else for(null!==r.parentNode&&Ot(e,r.parentNode)&&(r=r.parentNode);null!==r.nextSibling&&(Ot(e,r.nextSibling)||ge(r.nextSibling));)r=r.nextSibling;for(;r.parentNode!==n;){const t=r.parentNode;if(_e(e,r))return r;if(/^(TD|TH)$/.test(t.nodeName))return r;r=t}return r},Et=(e,t,o)=>{const n=e.selection.getRng();let r="LI";const a=Ue(e,e.selection.getStart(!0)),s=e.dom;if("false"===s.getContentEditable(e.selection.getNode()))return;"DL"===(t=t.toUpperCase())&&(r="DT");const i=_t(n),l=((e,t,o)=>{const n=[],r=e.dom,a=Tt(e,t,!0,o),s=Tt(e,t,!1,o);let i;const l=[];for(let e=a;e&&(l.push(e),e!==s);e=e.nextSibling);return de.each(l,(t=>{var a;if(_e(e,t))return n.push(t),void(i=null);if(r.isBlock(t)||we(t))return we(t)&&r.remove(t),void(i=null);const s=t.nextSibling;kt.isBookmarkNode(t)&&(he(s)||_e(e,s)||!s&&t.parentNode===o)?i=null:(i||(i=r.create("p"),null===(a=t.parentNode)||void 0===a||a.insertBefore(i,t),n.push(i)),i.appendChild(t))})),n})(e,n,a);de.each(l,(n=>{let a;const i=n.previousSibling,l=n.parentNode;be(l)||(i&&he(i)&&i.nodeName===t&&((e,t,o)=>{const n=e.getStyle(t,"list-style-type");let r=o?o["list-style-type"]:"";return r=null===r?"":r,n===r})(s,i,o)?(a=i,n=s.rename(n,r),i.appendChild(n)):(a=s.create(t),l.insertBefore(a,n),a.appendChild(n),n=s.rename(n,r)),((e,t,o)=>{de.each(["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"],(o=>e.setStyle(t,o,"")))})(s,n),zt(s,a,o),Mt(e.dom,a))})),e.selection.setRng(xt(i))},At=(e,t,o)=>{return((e,t)=>he(e)&&e.nodeName===(null==t?void 0:t.nodeName))(t,o)&&((e,t,o)=>e.getStyle(t,"list-style-type",!0)===e.getStyle(o,"list-style-type",!0))(e,t,o)&&(n=o,t.className===n.className);var n},Mt=(e,t)=>{let o,n=t.nextSibling;if(At(e,t,n)){const r=n;for(;o=r.firstChild;)t.appendChild(o);e.remove(r)}if(n=t.previousSibling,At(e,t,n)){const r=n;for(;o=r.lastChild;)t.insertBefore(o,t.firstChild);e.remove(r)}},Nt=e=>"list-style-type"in e,Rt=(e,t,o)=>{const n=je(e);if(Ye(e,n)||(e=>v(e.selection.getSelectedBlocks(),m(e.dom.isEditable)))(e))return;const a=(e=>{const t=je(e),o=e.selection.getSelectedBlocks();return((e,t)=>i(e)&&1===t.length&&t[0]===e)(t,o)?(e=>_(e.querySelectorAll(Fe),he))(t):_(o,(e=>he(e)&&t!==e))})(e),s=r(o)?o:{};a.length>0?((e,t,o,n,r)=>{const a=he(t);if(a&&t.nodeName===n&&!Nt(r))bt(e);else{Et(e,n,r);const s=_t(e.selection.getRng()),i=a?[t,...o]:o;de.each(i,(t=>{((e,t,o,n)=>{if(t.nodeName!==o){const r=e.dom.rename(t,o);zt(e.dom,r,n),Je(e,Ct(o),r)}else zt(e.dom,t,n),Je(e,Ct(o),t)})(e,t,n,r)})),e.selection.setRng(xt(s))}})(e,n,a,t,s):((e,t,o,n)=>{if(t!==e.getBody())if(t)if(t.nodeName!==o||Nt(n)||$e(t)){const r=_t(e.selection.getRng());zt(e.dom,t,n);const a=e.dom.rename(t,o);Mt(e.dom,a),e.selection.setRng(xt(r)),Et(e,o,n),Je(e,Ct(o),a)}else bt(e);else Et(e,o,n),Je(e,Ct(o),t)})(e,n,t,s)},Dt=ce.DOM,Bt=(e,t)=>{const o=de.grep(e.select("ol,ul",t));de.each(o,(t=>{((e,t)=>{const o=t.parentElement;if(o&&"LI"===o.nodeName&&o.firstChild===t){const n=o.previousSibling;n&&"LI"===n.nodeName?(n.appendChild(t),Se(e,o)&&Dt.remove(o)):Dt.setStyle(o,"listStyleType","none")}if(he(o)){const e=o.previousSibling;e&&"LI"===e.nodeName&&e.appendChild(t)}})(e,t)}))},Lt=(e,t,o,n)=>{let r=t.startContainer;const a=t.startOffset;if(ge(r)&&(o?a0))return r;const s=e.schema.getNonEmptyElements();pe(r)&&(r=Q.getNode(r,a));const i=new ee(r,n);o&&((e,t)=>!!we(t)&&e.isBlock(t.nextSibling)&&!we(t.previousSibling))(e.dom,r)&&i.next();const l=o?i.next.bind(i):i.prev2.bind(i);for(;r=l();){if("LI"===r.nodeName&&!r.hasChildNodes())return r;if(s[r.nodeName])return r;if(ge(r)&&r.data.length>0)return r}return null},It=(e,t)=>{const o=t.childNodes;return 1===o.length&&!he(o[0])&&e.isBlock(o[0])},Ht=(e,t,o)=>{let n;const r=t.parentNode;if(!ze(e,t)||!ze(e,o))return;he(o.lastChild)&&(n=o.lastChild),r===o.lastChild&&we(r.previousSibling)&&e.remove(r.previousSibling);const a=o.lastChild;a&&we(a)&&t.hasChildNodes()&&e.remove(a),Se(e,o,!0)&&X(L(o)),((e,t,o)=>{let n;const r=It(e,o)?o.firstChild:o;if(((e,t)=>{It(e,t)&&e.remove(t.firstChild,!0)})(e,t),!Se(e,t,!0))for(;n=t.firstChild;)r.appendChild(n)})(e,t,o),n&&o.appendChild(n);const s=((e,t)=>{const o=e.dom,n=t.dom;return o!==n&&o.contains(n)})(L(o),L(t))?e.getParents(t,he,o):[];e.remove(t),w(s,(t=>{Se(e,t)&&t!==e.getRoot()&&e.remove(t)}))},Pt=(e,t)=>{const o=e.dom,n=e.selection,r=n.getStart(),a=Ze(e,r),s=o.getParent(n.getStart(),"LI",a);if(s){const r=s.parentElement;if(r===e.getBody()&&Se(o,r))return!0;const i=He(n.getRng()),l=o.getParent(Lt(e,i,t,a),"LI",a);if(l&&l!==s)return e.undoManager.transact((()=>{var o,n;t?((e,t,o,n)=>{const r=e.dom;if(r.isEmpty(n))((e,t,o)=>{X(L(o)),Ht(e.dom,t,o),e.selection.setCursorLocation(o,0)})(e,o,n);else{const a=_t(t);Ht(r,o,n),e.selection.setRng(xt(a))}})(e,i,l,s):(null===(n=(o=s).parentNode)||void 0===n?void 0:n.firstChild)===o?yt(e):((e,t,o,n)=>{const r=_t(t);Ht(e.dom,o,n);const a=xt(r);e.selection.setRng(a)})(e,i,s,l)})),!0;if(!l&&!t&&0===i.startOffset&&0===i.endOffset)return e.undoManager.transact((()=>{bt(e)})),!0}return!1},Ft=e=>{const t=e.selection.getStart(),o=Ze(e,t);return e.dom.getParent(t,"LI,DT,DD",o)||Ve(e).length>0},jt=(e,t)=>{const o=e.selection;return!Ye(e,o.getNode())&&(o.isCollapsed()?((e,t)=>Pt(e,t)||((e,t)=>{const o=e.dom,n=e.selection.getStart(),r=Ze(e,n),a=o.getParent(n,o.isBlock,r);if(a&&o.isEmpty(a)){const n=He(e.selection.getRng()),s=o.getParent(Lt(e,n,t,r),"LI",r);if(s){const i=e=>b(["td","th","caption"],H(e)),l=e=>e.dom===r;return!!((e,t,o=u)=>R(e,t,o).getOr(e.isNone()&&t.isNone()))($(L(s),i,l),$(L(n.startContainer),i,l),I)&&(e.undoManager.transact((()=>{((e,t,o)=>{const n=e.getParent(t.parentNode,e.isBlock,o);e.remove(t),n&&e.isEmpty(n)&&e.remove(n)})(o,a,r),Mt(o,s.parentNode),e.selection.select(s,!0),e.selection.collapse(t)})),!0)}}return!1})(e,t))(e,t):(e=>!!Ft(e)&&(e.undoManager.transact((()=>{e.execCommand("Delete"),Bt(e.dom,e.getBody())})),!0))(e))},Vt=e=>{const t=O(Qe(e).split("")),o=k(t,((e,t)=>{const o=e.toUpperCase().charCodeAt(0)-"A".charCodeAt(0)+1;return Math.pow(26,t)*o}));return x(o,((e,t)=>e+t),0)},Zt=e=>{if(--e<0)return"";{const t=e%26,o=Math.floor(e/26);return Zt(o)+String.fromCharCode("A".charCodeAt(0)+t)}},Ut=e=>{const t=parseInt(e.start,10);return N(e.listStyleType,"upper-alpha")?Zt(t):N(e.listStyleType,"lower-alpha")?Zt(t).toLowerCase():e.start},qt=(e,t)=>()=>{const o=je(e);return i(o)&&o.nodeName===t},Wt=e=>{e.addCommand("mceListProps",(()=>{(e=>{const t=je(e);ye(t)&&!Ye(e,t)&&e.windowManager.open({title:"List Properties",body:{type:"panel",items:[{type:"input",name:"start",label:"Start list at number",inputMode:"numeric"}]},initialData:{start:Ut({start:e.dom.getAttrib(t,"start","1"),listStyleType:p.from(e.dom.getStyle(t,"list-style-type"))})},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:t=>{(e=>{switch((e=>/^[0-9]+$/.test(e)?2:/^[A-Z]+$/.test(e)?0:/^[a-z]+$/.test(e)?1:e.length>0?4:3)(e)){case 2:return p.some({listStyleType:p.none(),start:e});case 0:return p.some({listStyleType:p.some("upper-alpha"),start:Vt(e).toString()});case 1:return p.some({listStyleType:p.some("lower-alpha"),start:Vt(e).toString()});case 3:return p.some({listStyleType:p.none(),start:""});case 4:return p.none()}})(t.getData().start).each((t=>{e.execCommand("mceListUpdate",!1,{attrs:{start:"1"===t.start?"":t.start},styles:{"list-style-type":t.listStyleType.getOr("")}})})),t.close()}})})(e)}))};var $t=tinymce.util.Tools.resolve("tinymce.html.Node");const Gt=e=>3===e.type,Kt=e=>0===e.length,Yt=e=>{const t=(t,o)=>{const n=$t.create("li");w(t,(e=>n.append(e))),o?e.insert(n,o,!0):e.append(n)},o=x(e.children(),((e,o)=>Gt(o)?[...e,o]:Kt(e)||Gt(o)?e:(t(e,o),[])),[]);Kt(o)||t(o)},Xt=(e,t)=>o=>Xe(e,(n=>{o.setActive(Ge(n.parents,t)),o.setEnabled(!Ye(e,n.element))})),Jt=(e,t)=>o=>Xe(e,(n=>o.setEnabled(Ge(n.parents,t)&&!Ye(e,n.element))));e.add("lists",(e=>((e=>{(0,e.options.register)("lists_indent_on_tab",{processor:"boolean",default:!0})})(e),(e=>{e.on("PreInit",(()=>{const{parser:t}=e;t.addNodeFilter("ul,ol",(e=>w(e,Yt)))}))})(e),e.hasPlugin("rtc",!0)?Wt(e):((e=>{Te(e)&&(e=>{e.on("keydown",(t=>{t.keyCode!==te.TAB||te.metaKeyPressed(t)||e.undoManager.transact((()=>{(t.shiftKey?yt(e):ft(e))&&t.preventDefault()}))}))})(e),(e=>{e.on("ExecCommand",(t=>{const o=t.command.toLowerCase();"delete"!==o&&"forwarddelete"!==o||!Ft(e)||Bt(e.dom,e.getBody())})),e.on("keydown",(t=>{t.keyCode===te.BACKSPACE?jt(e,!1)&&t.preventDefault():t.keyCode===te.DELETE&&jt(e,!0)&&t.preventDefault()}))})(e)})(e),(e=>{e.on("BeforeExecCommand",(t=>{const o=t.command.toLowerCase();"indent"===o?ft(e):"outdent"===o&&yt(e)})),e.addCommand("InsertUnorderedList",((t,o)=>{Rt(e,"UL",o)})),e.addCommand("InsertOrderedList",((t,o)=>{Rt(e,"OL",o)})),e.addCommand("InsertDefinitionList",((t,o)=>{Rt(e,"DL",o)})),e.addCommand("RemoveList",(()=>{bt(e)})),Wt(e),e.addCommand("mceListUpdate",((t,o)=>{r(o)&&((e,t)=>{const o=je(e);null===o||Ye(e,o)||e.undoManager.transact((()=>{r(t.styles)&&e.dom.setStyles(o,t.styles),r(t.attrs)&&re(t.attrs,((t,n)=>e.dom.setAttrib(o,n,t)))}))})(e,o)})),e.addQueryStateHandler("InsertUnorderedList",qt(e,"UL")),e.addQueryStateHandler("InsertOrderedList",qt(e,"OL")),e.addQueryStateHandler("InsertDefinitionList",qt(e,"DL"))})(e)),(e=>{const t=t=>()=>e.execCommand(t);e.hasPlugin("advlist")||(e.ui.registry.addToggleButton("numlist",{icon:"ordered-list",active:!1,tooltip:"Numbered list",onAction:t("InsertOrderedList"),onSetup:Xt(e,"OL")}),e.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:!1,tooltip:"Bullet list",onAction:t("InsertUnorderedList"),onSetup:Xt(e,"UL")}))})(e),(e=>{const t={text:"List properties...",icon:"ordered-list",onAction:()=>e.execCommand("mceListProps"),onSetup:Jt(e,"OL")};e.ui.registry.addMenuItem("listprops",t),e.ui.registry.addContextMenu("lists",{update:t=>{const o=je(e,t);return ye(o)?["listprops"]:[]}})})(e),(e=>({backspaceDelete:t=>{jt(e,t)}}))(e))))}()},42540:function(e,t,o){o(33167)},33167:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(a=n.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var o,n,r,a})(t)===e,o=t("string"),n=t("object"),r=t("array"),a=e=>!(e=>null==e)(e);class s{constructor(e,t){this.tag=e,this.value=t}static some(e){return new s(!0,e)}static none(){return s.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?s.some(e(this.value)):s.none()}bind(e){return this.tag?e(this.value):s.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:s.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return a(e)?s.some(e):s.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}s.singletonNone=new s(!1);const i=Array.prototype.push,l=(e,t)=>{for(let o=0,n=e.length;o{const t=[];for(let o=0,n=e.length;og(e,t)?s.from(e[t]):s.none(),g=(e,t)=>u.call(e,t),p=e=>t=>t.options.get(e),h=p("audio_template_callback"),f=p("video_template_callback"),y=p("iframe_template_callback"),b=p("media_live_embeds"),v=p("media_filter_html"),k=p("media_url_resolver"),w=p("media_alt_source"),_=p("media_poster"),x=p("media_dimensions");var C=tinymce.util.Tools.resolve("tinymce.util.Tools"),S=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),z=tinymce.util.Tools.resolve("tinymce.html.DomParser");const O=S.DOM,T=e=>e.replace(/px$/,""),E=e=>{const t=e.attr("style"),o=t?O.parseStyle(t):{};return{type:"ephox-embed-iri",source:e.attr("data-ephox-embed-iri"),altsource:"",poster:"",width:m(o,"max-width").map(T).getOr(""),height:m(o,"max-height").map(T).getOr("")}},A=(e,t)=>{let o={};for(let n=z({validate:!1,forced_root_block:!1},t).parse(e);n;n=n.walk())if(1===n.type){const e=n.name;if(n.attr("data-ephox-embed-iri")){o=E(n);break}o.source||"param"!==e||(o.source=n.attr("movie")),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(o.type||(o.type=e),o=C.extend(n.attributes.map,o)),"script"===e&&(o={type:"script",source:n.attr("src")}),"source"===e&&(o.source?o.altsource||(o.altsource=n.attr("src")):o.source=n.attr("src")),"img"!==e||o.poster||(o.poster=n.attr("src"))}return o.source=o.source||o.src||"",o.altsource=o.altsource||"",o.poster=o.poster||"",o},M=e=>{var t;const o=null!==(t=e.toLowerCase().split(".").pop())&&void 0!==t?t:"";return m({mp3:"audio/mpeg",m4a:"audio/x-m4a",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"},o).getOr("")};var N=tinymce.util.Tools.resolve("tinymce.html.Node"),R=tinymce.util.Tools.resolve("tinymce.html.Serializer");const D=(e,t={})=>z({forced_root_block:!1,validate:!1,allow_conditional_comments:!0,...t},e),B=S.DOM,L=e=>/^[0-9.]+$/.test(e)?e+"px":e,I=(e,t)=>{const o=t.attr("style"),n=o?B.parseStyle(o):{};a(e.width)&&(n["max-width"]=L(e.width)),a(e.height)&&(n["max-height"]=L(e.height)),t.attr("style",B.serializeStyle(n))},H=["source","altsource"],P=(e,t,o,n)=>{let r=0,a=0;const s=D(n);s.addNodeFilter("source",(e=>r=e.length));const i=s.parse(e);for(let e=i;e;e=e.walk())if(1===e.type){const n=e.name;if(e.attr("data-ephox-embed-iri")){I(t,e);break}switch(n){case"video":case"object":case"embed":case"img":case"iframe":void 0!==t.height&&void 0!==t.width&&(e.attr("width",t.width),e.attr("height",t.height))}if(o)switch(n){case"video":e.attr("poster",t.poster),e.attr("src",null);for(let o=r;o<2;o++)if(t[H[o]]){const n=new N("source",1);n.attr("src",t[H[o]]),n.attr("type",t[H[o]+"mime"]||null),e.append(n)}break;case"iframe":e.attr("src",t.source);break;case"object":const o=e.getAll("img").length>0;if(t.poster&&!o){e.attr("src",t.poster);const o=new N("img",1);o.attr("src",t.poster),o.attr("width",t.width),o.attr("height",t.height),e.append(o)}break;case"source":if(a<2&&(e.attr("src",t[H[a]]),e.attr("type",t[H[a]+"mime"]||null),!t[H[a]])){e.remove();continue}a++;break;case"img":t.poster||e.remove()}}return R({},n).serialize(i)},F=[{regex:/youtu\.be\/([\w\-_\?&=.]+)/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$2?$4",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowFullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$2?title=0&byline=0",allowFullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"www.dailymotion.com/embed/video/$1",allowFullscreen:!0},{regex:/dai\.ly\/([^_]+)/,type:"iframe",w:480,h:270,url:"www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],j=(e,t)=>{const o=(e=>{const t=e.match(/^(https?:\/\/|www\.)(.+)$/i);return t&&t.length>1?"www."===t[1]?"https://":t[1]:"https://"})(t),n=e.regex.exec(t);let r=o+e.url;if(a(n))for(let e=0;en[e]?n[e]:""));return r.replace(/\?$/,"")},V=(e,t)=>{var o;const n=C.extend({},t);if(!n.source&&(C.extend(n,A(null!==(o=n.embed)&&void 0!==o?o:"",e.schema)),!n.source))return"";n.altsource||(n.altsource=""),n.poster||(n.poster=""),n.source=e.convertURL(n.source,"source"),n.altsource=e.convertURL(n.altsource,"source"),n.sourcemime=M(n.source),n.altsourcemime=M(n.altsource),n.poster=e.convertURL(n.poster,"poster");const r=(e=>{const t=F.filter((t=>t.regex.test(e)));return t.length>0?C.extend({},t[0],{url:j(t[0],e)}):null})(n.source);if(r&&(n.source=r.url,n.type=r.type,n.allowfullscreen=r.allowFullscreen,n.width=n.width||String(r.w),n.height=n.height||String(r.h)),n.embed)return P(n.embed,n,!0,e.schema);{const t=h(e),o=f(e),r=y(e);return n.width=n.width||"300",n.height=n.height||"150",C.each(n,((t,o)=>{n[o]=e.dom.encode(""+t)})),"iframe"===n.type?((e,t)=>{if(t)return t(e);{const t=e.allowfullscreen?' allowFullscreen="1"':"";return'"}})(n,r):"application/x-shockwave-flash"===n.sourcemime?(e=>{let t='';return e.poster&&(t+=' '),t+=" ",t})(n):-1!==n.sourcemime.indexOf("audio")?((e,t)=>t?t(e):''+(e.altsource?'\n \n":"")+" ")(n,t):"script"===n.type?(e=>'