1WRMCB=function(e){var c=console;if(c&&c.log&&c.error){c.log('Error running batched script.');c.error(e);}} 2; 3try { 4/* module-key = 'com.atlassian.confluence.plugins.confluence-editor-plugin:split_core', location = 'core.js' */ 5/*! For license information please see core.js.LICENSE.txt */ 6(globalThis.webpackChunk_atlassian_dc_product_confluence_content_plugins_confluence_editor=globalThis.webpackChunk_atlassian_dc_product_confluence_content_plugins_confluence_editor||[]).push([["core"],{192:()=>{function e(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(){"use strict";const t=e=>t=>((e,t)=>{const n=typeof e;return null===e?"null":"object"===n&&Array.isArray(e)?"array":"object"===n&&(o=r=e,(a=String).prototype.isPrototypeOf(o)||(null===(t=r.constructor)||void 0===t?void 0:t.name)===a.name)?"string":n;var o,r,a})(t)===e,n=e=>t=>typeof t===e,o=e=>t=>e===t,r=t("string"),a=t("object"),i=t("array"),s=o(null),l=n("boolean"),c=o(void 0),d=e=>null==e,u=e=>!d(e),g=n("function"),m=n("number"),p=()=>{},f=e=>()=>e,h=e=>e,b=(e,t)=>e===t;function y(e,...t){return(...n)=>{const o=t.concat(n);return e.apply(null,o)}}const w=f(!1),v=f(!0);class C{constructor(t,n){e(this,"tag",void 0),e(this,"value",void 0),this.tag=t,this.value=n}static some(e){return new C(!0,e)}static none(){return C.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?C.some(e(this.value)):C.none()}bind(e){return this.tag?e(this.value):C.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:C.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)?C.some(e):C.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()"}}e(C,"singletonNone",new C(!1));const A=Array.prototype.slice,x=Array.prototype.indexOf,k=Array.prototype.push,M=(e,t)=>{return n=e,o=t,x.call(n,o)>-1;var n,o},E=(e,t)=>{for(let n=0,o=e.length;n<o;n++)if(t(e[n],n))return!0;return!1},T=(e,t)=>{const n=[];for(let o=0;o<e;o++)n.push(t(o));return n},I=(e,t)=>{const n=e.length,o=new Array(n);for(let r=0;r<n;r++){const n=e[r];o[r]=t(n,r)}return o},D=(e,t)=>{for(let n=0,o=e.length;n<o;n++)t(e[n],n)},S=(e,t)=>{const n=[],o=[];for(let r=0,a=e.length;r<a;r++){const a=e[r];(t(a,r)?n:o).push(a)}return{pass:n,fail:o}},N=(e,t)=>{const n=[];for(let o=0,r=e.length;o<r;o++){const r=e[o];t(r,o)&&n.push(r)}return n},L=(e,t)=>{if(0===e.length)return[];{let n=t(e[0]);const o=[];let r=[];for(let a=0,i=e.length;a<i;a++){const i=e[a],s=t(i);s!==n&&(o.push(r),r=[]),n=s,r.push(i)}return 0!==r.length&&o.push(r),o}},B=(e,t,n)=>(((e,t)=>{for(let n=e.length-1;n>=0;n--)t(e[n],n)})(e,(e,o)=>{n=t(n,e,o)}),n),R=(e,t,n)=>(D(e,(e,o)=>{n=t(n,e,o)}),n),O=(e,t)=>((e,t,n)=>{for(let o=0,r=e.length;o<r;o++){const r=e[o];if(t(r,o))return C.some(r);if(n(r,o))break}return C.none()})(e,t,w),P=(e,t)=>(e=>{const t=[];for(let n=0,o=e.length;n<o;++n){if(!i(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);k.apply(t,e[n])}return t})(I(e,t)),j=(e,t)=>{for(let n=0,o=e.length;n<o;++n)if(!0!==t(e[n],n))return!1;return!0},$=(e,t)=>{const n=A.call(e,0);return n.sort(t),n},F=(e,t)=>t>=0&&t<e.length?C.some(e[t]):C.none(),_=e=>F(e,0),z=e=>F(e,e.length-1),U=(e,t)=>{for(let n=0;n<e.length;n++){const o=t(e[n],n);if(o.isSome())return o}return C.none()},H=Object.keys,W=Object.hasOwnProperty,V=(e,t)=>{const n=H(e);for(let o=0,r=n.length;o<r;o++){const r=n[o];t(e[r],r)}},Q=(e,t)=>Y(e,(e,n)=>({k:n,v:t(e,n)})),Y=(e,t)=>
6{const n={};return V(e,(e,o)=>{const r=t(e,o);n[r.k]=r.v}),n},Z=(e,t)=>{const n=[];return V(e,(e,o)=>{n.push(t(e,o))}),n},K=e=>Z(e,h),G=e=>H(e).length,q=(e,t)=>J(e,t)?C.from(e[t]):C.none(),J=(e,t)=>W.call(e,t),X=e=>{for(const t in e)if(W.call(e,t))return!1;return!0},ee=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},te="undefined"!=typeof window?window:Function("return this;")(),ne=(e,t,n=b)=>e.exists(e=>n(e,t)),oe=(e,t,n)=>e.isSome()&&t.isSome()?C.some(n(e.getOrDie(),t.getOrDie())):C.none(),re=e=>e.bind(h),ae=(e,t)=>e?C.some(t):C.none(),ie=(e,t)=>((e,t)=>{let n=null!=t?t:te;for(let t=0;t<e.length&&null!=n;++t)n=n[e[t]];return n})(e.split("."),t),se=(e,t,n=0,o)=>{const r=e.indexOf(t,n);return-1!==r&&(!!c(o)||r+t.length<=o)},le=(e=>t=>t.replace(e,""))(/^\s+|\s+$/g),ce=e=>!(e=>e.length>0)(e),de=e=>{let t,n=!1;return(...o)=>(n||(n=!0,t=e.apply(null,o)),t)},ue=(e,t)=>{const{type:n,message:o}=t;e.notificationManager.open({type:n,text:o})},ge=(e,t)=>{const{protect:n,allowList:o=[],blockList:r=[]}=null!=e?e:{};let a;return a=u(n)?n:o.length>0||r.length>0||t,{protect:a,allowList:o,blockList:r}},me=e=>{const{protect:t,allowList:n,blockList:o}=null!=e?e:{};return e=>{const r=e.toLowerCase();return n.length>0?!E(n,e=>e.toLowerCase()===r):o.length>0?E(o,e=>e.toLowerCase()===r):t}},pe=e=>{const t=me(e);return(e,n)=>{const o=((e,t)=>`${e}:${t}`)(n,e.toLowerCase());return t(o)}},fe=(e,t,n,o)=>{const r=Reflect.get(e,"on"),a={protectedEventHandlers:[],cleanupScheduled:!1},i=(e,t)=>{o&&console.log(`[EventsProxy] ${e}`,t||"")},s=t=>{"invalid"===t&&a.protectedEventHandlers.length>0&&(i("Removing event handlers",a.protectedEventHandlers),D(a.protectedEventHandlers,t=>{e.off(t.name,t.callback)}),a.protectedEventHandlers=[])},l=t.onStatusChange(s);return e.on("remove",l),(o,l,c)=>{i(`Adding event listener: ${o}`,{shouldProtect:n(o)});const d=((e,o)=>{const r=n(e),i=t.getStatus(),s=r&&"invalid"===i?p:o;return r&&a.protectedEventHandlers.push({name:e,callback:s}),s})(o,l);return a.cleanupScheduled||(a.cleanupScheduled=!0,window.setTimeout(()=>{s(t.getStatus()),a.cleanupScheduled=!1},0)),Reflect.apply(r,e,[o,d,c])}},he=(e,t,n)=>o=>{const r="invalid"!==t.getStatus()&&u(n)?n(o):p,a=((e,t,n)=>{const o=e=>{"invalid"===e&&n.setEnabled(!1)},r=()=>o(t.getStatus());o(t.getStatus()),e.on("NodeChange",r);const a=t.onStatusChange(o);return()=>{e.off("NodeChange",r),a()}})(e,t,o);return e=>{null==r||r(e),a()}},be=(e,t,n)=>(...o)=>{var r;return"invalid"===e.getStatus()?n:null!==(r=null==t?void 0:t(...o))&&void 0!==r?r:n},ye=(e,t)=>be(e,t,Promise.resolve([])),we=(e,t)=>be(e,t,[]),ve=(e,t)=>be(e,t,!1),Ce=(e,t,n,o)=>{const a=t=>{const{command:a,value:i}=t,s=C.from(i).filter(r).map(e=>e.toLowerCase()),l=a.toLowerCase()===o.toLowerCase(),c=s.exists(e=>n.has(e)),d=s.exists(t=>t===e.queryCommandValue(o));l&&c&&!d&&t.preventDefault()},i=t.onStatusChange(t=>{if("invalid"===t){e.on("BeforeExecCommand",a);const t=()=>{const t=e.queryCommandValue(o);n.has(t.toLowerCase())&&e.execCommand(o,!1,t)};e.initialized?t():e.on("init",t)}});e.on("remove",()=>{i(),e.off("BeforeExecCommand",a)})},Ae=(e,t,n,o,a,i=!1)=>{const s=new Set,l=new Set,c=(e,t)=>{i&&console.log(`[UiProxy] ${e}`,t||"")};
6((e,t,n)=>{Ce(e,t,n,"ToggleView")})(e,n,s),((e,t,n)=>{Ce(e,t,n,"ToggleSidebar")})(e,n,l);const d=(t,r,i,s)=>{const l=a(t,i);return c(`${s}: ${t}`,{spec:r,context:o,shouldProtect:l}),l?{...r,onSetup:he(e,n,r.onSetup)}:r};return new Proxy(t,{get:(e,t,i)=>{const u=Reflect.get(e,t,i);if(!r(t))return u;switch(t){case"addButton":case"addGroupToolbarButton":case"addToggleButton":case"addMenuButton":case"addSplitButton":return(...n)=>{const[o,r,...a]=n,i=d(o,r,"button",String(t));return Reflect.apply(u,e,[o,i,...a])};case"addMenuItem":case"addToggleMenuItem":case"addNestedMenuItem":return(...n)=>{const[o,r,...a]=n,i=d(o,r,"menuitem",String(t));return Reflect.apply(u,e,[o,i,...a])};case"addAutocompleter":return(...r)=>{const[i,s,...l]=r,d=a(i,"autocompleter");if(c(`${String(t)}: ${i}`,{spec:s,context:o,shouldProtect:d}),d){const t={...s,fetch:ye(n,s.fetch)};return Reflect.apply(u,e,[i,t,...l])}return Reflect.apply(u,e,[i,s,...l])};case"addSidebar":return(...n)=>{const[r,i,...s]=n,d=a(r,"sidebar");if(c(`${String(t)}: ${r}`,{spec:i,context:o,shouldProtect:d}),d){l.add(r.toLowerCase());const t={...i};return Reflect.apply(u,e,[r,t,...s])}return Reflect.apply(u,e,[r,i,...s])};case"addView":return(...n)=>{const[r,i,...l]=n,d=a(r,"view");if(c(`${String(t)}: ${r}`,{spec:i,context:o,shouldProtect:d}),d){s.add(r.toLowerCase());const t={...i};return Reflect.apply(u,e,[r,t,...l])}return Reflect.apply(u,e,[r,i,...l])};case"addContextMenu":return(...r)=>{const[i,s,...l]=r,d=a(i,"contextmenu");if(c(`${String(t)}: ${i}`,{spec:s,context:o,shouldProtect:d}),d){const t={...s,update:we(n,s.update)};return Reflect.apply(u,e,[i,t,...l])}return Reflect.apply(u,e,[i,s,...l])};case"addContextToolbar":case"addContextForm":return(...r)=>{const[i,s,...l]=r,d=a(i,"contexttoolbar");if(c(`${String(t)}: ${i}`,{spec:s,context:o,shouldProtect:d}),d){const t={...s,predicate:ve(n,s.predicate)};return Reflect.apply(u,e,[i,t,...l])}return Reflect.apply(u,e,[i,s,...l])};case"addIcon":case"getAll":case"addContext":return u}}})},xe=new Set(["addCommand","addCommands","addQueryStateHandler","addQueryValueHandler"]),ke=e=>(t,n)=>{e&&console.log(`[EditorProxy] ${t}`,n||"")},Me=(e,t)=>{const{statusProvider:n,uiContext:o,protection:r,debug:a=!1}=t,{events:i,commands:s,ui:l}=r;ke(a)("Creating enhanced editor with options:",{hasStatusProvider:!!n,uiContext:o,debug:a,protection:r});const{editorUiProxy:c,editorCommandsProxy:d,editorEventListenerProxy:u}=((e,t,n,o,r,a,i)=>{const s=a.protect?{...e.ui,registry:Ae(e,e.ui.registry,t,n,pe(a),i)}:e.ui,l=o.protect?((e,t,n,o,r)=>{const a={protectedCommands:[],cleanupScheduled:!1},i=(e,t)=>{r&&console.log(`[CommandsProxy] ${e}`,t||"")},s=(e,t)=>{const r=o(e),i=n.getStatus();return r&&a.protectedCommands.push(e),r&&"invalid"===i?p:t},l=t=>{"invalid"===t&&a.protectedCommands.length>0&&(i("Removing commands",a.protectedCommands),D(a.protectedCommands,t=>{e.editorCommands.removeCommand(t)}),a.protectedCommands=[])},c=()=>{a.cleanupScheduled||(a.cleanupScheduled=!0,window.setTimeout(()=>{l(n.getStatus()),a.cleanupScheduled=!1},0))},d=n.onStatusChange(l);return e.on("remove",d),new Proxy(t,{get:(e,n,r)=>{if(i(`Accessing property: ${String(n)}`),"addCommand"===n){const a=Reflect.get(e,n,r);return(e,n,...r)=>{i(`Adding command: ${e}`,{shouldProtect:o(e)});const l=s(e,n);return c(),Reflect.apply(a,t,[e,l,...r])}}if("addCommands"===n){const o=Reflect.get(e,n,r);return(e,n="exec")=>{i(`Adding commands (${n})`,{commandCount:Object.keys(e).length,willApplyEnforcement:"exec"===n});const r="exec"!==n?e:Q(e,(e,t)=>s(t,e));return c(),Reflect.apply(o,t,[r,n])}}return Reflect.get(e,n,r)}})})(e,e.editorCommands,t,me(o),i):e.editorCommands;return{editorUiProxy:s,editorCommandsProxy:l,editorEventListenerProxy:r.protect?fe(e,t,me(r),i):e.on.bind(e)}})(e,n,o||"",s,i,l,a),m=((e,t,n,o)=>(r,a,i)=>{const s=String(a);if("on"===a)return ke(o)("on intercepted"),n;if(xe.has(s))return ke(o)(`${s} intercepted`),t[s].bind(t);if("editorCommands"===a)return ke(o)("editorCommands accessed"),t;if("ui"===a)return ke(o)("ui accessed"),e;const l=Reflect.get(r,a,i);return g(l)?l.bind(r):l})(c,d,u,a);return new Proxy(e,{get:m,set:(e,t,n,o)=>Reflect.set(e,t,n,o),has:(e,t)=>Reflect.has(e,t),ownKeys:e=>Reflect.ownKeys(e),getOwnPropertyDescriptor:(e,t)=>
6Reflect.getOwnPropertyDescriptor(e,t),defineProperty:(e,t,n)=>Reflect.defineProperty(e,t,n),deleteProperty:(e,t)=>Reflect.deleteProperty(e,t),isExtensible:e=>Reflect.isExtensible(e),preventExtensions:e=>Reflect.preventExtensions(e),getPrototypeOf:e=>Reflect.getPrototypeOf(e),setPrototypeOf:(e,t)=>Reflect.setPrototypeOf(e,t)})},Ee=e=>parseInt(e,10),Te=(e,t)=>{const n=e-t;return 0===n?0:n>0?1:-1},Ie=(e,t,n)=>({major:e,minor:t,patch:n}),De=e=>{const t=/([0-9]+)\.([0-9]+)\.([0-9]+)(?:(\-.+)?)/.exec(e);return t?Ie(Ee(t[1]),Ee(t[2]),Ee(t[3])):Ie(0,0,0)},Se=(e,t)=>!!e&&-1===((e,t)=>{const n=Te(e.major,t.major);if(0!==n)return n;const o=Te(e.minor,t.minor);if(0!==o)return o;const r=Te(e.patch,t.patch);return 0!==r?r:0})((e=>De((e=>[e.majorVersion,e.minorVersion].join(".").split(".").slice(0,3).join("."))(e)))(e),De(t)),Ne=De("8.3.1"),Le=`${Ne.major}.${Ne.minor}.0`,Be=`${Ne.major+1}.0.0`,Re=["tfoot","thead","tbody","colgroup"],Oe=(e,t,n)=>({element:e,rowspan:t,colspan:n}),Pe=(e,t,n)=>({element:e,cells:t,section:n}),je=(e,t,n)=>({element:e,isNew:t,isLocked:n}),$e=(e,t,n,o)=>({element:e,cells:t,section:n,isNew:o}),Fe=(e,t)=>e.cells[t],_e=(e,t)=>Fe(e,t).element,ze=e=>{const t=S(e,e=>"colgroup"===e.section);return{rows:t.fail,cols:t.pass}},Ue=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},He={fromHtml:(e,t)=>
vendor: 4,123 bytes, line 6
6{const n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||n.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return Ue(n.childNodes[0])},fromTag:(e,t)=>{const n=(t||document).createElement(e);return Ue(n)},fromText:(e,t)=>{const n=(t||document).createTextNode(e);return Ue(n)},fromDom:Ue,fromPoint:(e,t,n)=>C.from(e.dom.elementFromPoint(t,n)).map(Ue)},We=(e,t)=>{const n=e.dom;if(1!==n.nodeType)return!1;{const e=n;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},Ve=e=>1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount,Qe=(e,t)=>e.dom===t.dom,Ye=We,Ze=()=>Ke(0,0),Ke=(e,t)=>({major:e,minor:t}),Ge={nu:Ke,detect:(e,t)=>{const n=String(t).toLowerCase();return 0===e.length?Ze():((e,t)=>{const n=((e,t)=>{for(let n=0;n<e.length;n++){const o=e[n];if(o.test(t))return o}})(e,t);if(!n)return{major:0,minor:0};const o=e=>Number(t.replace(n,"$"+e));return Ke(o(1),o(2))})(e,n)},unknown:Ze},qe=(e,t)=>{const n=String(t).toLowerCase();return O(e,e=>e.search(n))},Je=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Xe=e=>t=>se(t,e),et=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>se(e,"edge/")&&se(e,"chrome")&&se(e,"safari")&&se(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Je],search:e=>se(e,"chrome")&&!se(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>se(e,"msie")||se(e,"trident")},{name:"Opera",versionRegexes:[Je,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Xe("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Xe("firefox")},{name:"Safari",versionRegexes:[Je,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(se(e,"safari")||se(e,"mobile/"))&&se(e,"applewebkit")}],tt=[{name:"Windows",search:Xe("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>se(e,"iphone")||se(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Xe("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:Xe("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Xe("linux"),versionRegexes:[]},{name:"Solaris",search:Xe("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Xe("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Xe("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],nt={browsers:f(et),oses:f(tt)},ot=e=>{const t=e.current,n=e.version,o=e=>()=>t===e;return{current:t,version:n,isEdge:o("Edge"),isChromium:o("Chromium"),isIE:o("IE"),isOpera:o("Opera"),isFirefox:o("Firefox"),isSafari:o("Safari")}},rt=()=>ot({current:void 0,version:Ge.unknown()}),at=ot,it=e=>{const t=e.current,n=e.version,o=e=>()=>t===e;return{current:t,version:n,isWindows:o("Windows"),isiOS:o("iOS"),isAndroid:o("Android"),isMacOS:o("macOS"),isLinux:o("Linux"),isSolaris:o("Solaris"),isFreeBSD:o("FreeBSD"),isChromeOS:o("ChromeOS")}},st=()=>it({current:void 0,version:Ge.unknown()}),lt=it,ct=e=>window.matchMedia(e).matches;let dt=de(()=>((e,t,n)=>{const o=nt.browsers(),r=nt.oses(),a=t.bind(e=>((e,t)=>U(t.brands,t=>{const n=t.brand.toLowerCase();return O(e,e=>{var t;return n===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())}).map(e=>({current:e.name,version:Ge.nu(parseInt(t.version,10),0)}))}))(o,e)).orThunk(()=>((e,t)=>qe(e,t).map(e=>{const n=Ge.detect(e.versionRegexes,t);return{current:e.name,version:n}}))(o,e)).fold(rt,at),i=((e,t)=>qe(e,t).map(e=>{const n=Ge.detect(e.versionRegexes,t);return{current:e.name,version:n}}))(r,e).fold(st,lt),s=((e,t,n,o)=>{const r=e.isiOS()&&!0===/ipad/i.test(n),a=e.isiOS()&&!r,i=e.isiOS()||e.isAndroid(),s=i||o("(pointer:coarse)"),l=r||!a&&i&&o("(min-device-width:768px)"),c=a||i&&
6!l,d=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(n),u=!c&&!l&&!d;return{isiPad:f(r),isiPhone:f(a),isTablet:f(l),isPhone:f(c),isTouch:f(s),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:f(d),isDesktop:f(u)}})(i,a,e,n);return{browser:a,os:i,deviceType:s}})(window.navigator.userAgent,C.from(window.navigator.userAgentData),ct));const ut=Object.getPrototypeOf,gt=e=>e.dom.nodeName.toLowerCase(),mt=e=>e.dom.nodeType,pt=e=>t=>mt(t)===e,ft=e=>8===mt(e)||"#comment"===gt(e),ht=pt(1),bt=pt(3),yt=pt(9),wt=pt(11),vt=e=>t=>ht(t)&>(t)===e,Ct=e=>He.fromDom(e.dom.ownerDocument),At=e=>C.from(e.dom.parentNode).map(He.fromDom),xt=(e,t)=>{const n=g(t)?t:w;let o=e.dom;const r=[];for(;null!==o.parentNode&&void 0!==o.parentNode;){const e=o.parentNode,t=He.fromDom(e);if(r.push(t),!0===n(t))break;o=e}return r},kt=e=>C.from(e.dom.previousSibling).map(He.fromDom),Mt=e=>C.from(e.dom.nextSibling).map(He.fromDom),Et=e=>I(e.dom.childNodes,He.fromDom),Tt=e=>He.fromDom(e.dom.host),It=(e,t)=>{At(e).each(n=>{n.dom.insertBefore(t.dom,e.dom)})},Dt=(e,t)=>{Mt(e).fold(()=>{At(e).each(e=>{Nt(e,t)})},e=>{It(e,t)})},St=(e,t)=>{(e=>(e=>{const t=e.dom.childNodes;return C.from(t[0]).map(He.fromDom)})(e))(e).fold(()=>{Nt(e,t)},n=>{e.dom.insertBefore(t.dom,n.dom)})},Nt=(e,t)=>{e.dom.appendChild(t.dom)},Lt=(e,t)=>{It(e,t),Nt(t,e)},Bt=(e,t)=>{D(t,(n,o)=>{const r=0===o?e:t[o-1];Dt(r,n)})},Rt=(e,t)=>{D(t,t=>{Nt(e,t)})},Ot=(e,t,n)=>{if(!(r(n)||l(n)||m(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")},Pt=(e,t,n)=>{Ot(e.dom,t,n)},jt=(e,t)=>{const n=e.dom;V(t,(e,t)=>{Ot(n,t,e)})},$t=(e,t)=>{const n=e.dom.getAttribute(t);return null===n?void 0:n},Ft=(e,t)=>C.from($t(e,t)),_t=(e,t)=>{e.dom.removeAttribute(t)},zt=e=>R(e.dom.attributes,(e,t)=>(e[t.name]=t.value,e),{}),Ut=e=>{e.dom.textContent="",D(Et(e),e=>{Ht(e)})},Ht=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Wt=e=>{const t=Et(e);t.length>0&&Bt(e,t),Ht(e)},Vt=(e,t)=>He.fromDom(e.dom.cloneNode(t)),Qt=e=>void 0!==e.style&&g(e.style.getPropertyValue),Yt=e=>{const t=bt(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const n=t.ownerDocument;return(e=>{const t=(e=>He.fromDom(e.dom.getRootNode()))(e);return wt(n=t)&&u(n.dom.host)?C.some(t):C.none();var n})(He.fromDom(t)).fold(()=>n.body.contains(t),(o=Yt,r=Tt,e=>o(r(e))));var o,r},Zt=(e,t,n)=>{((e,t,n)=>{if(!r(n))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);Qt(e)&&e.style.setProperty(t,n)})(e.dom,t,n)},Kt=(e,t)=>{const n=e.dom,o=window.getComputedStyle(n).getPropertyValue(t);return""!==o||Yt(e)?o:Gt(n,t)},Gt=(e,t)=>Qt(e)?e.style.getPropertyValue(t):"",qt=(e,t)=>{const n=e.dom,o=Gt(n,t);return C.from(o).filter(e=>e.length>0)},Jt=(e,t)=>{((e,t)=>{Qt(e)&&e.style.removeProperty(t)})(e.dom,t),ne(Ft(e,"style").map(le),"")&&_t(e,"style")},Xt=(e,t,n)=>((e,t)=>(e=>{const t=parseFloat(e);return isNaN(t)?C.none():C.some(t)})(e).getOr(t))(Kt(e,t),n),en=(e=>{const t=t=>{const n=(e=>{const t=e.dom;return Yt(e)?t.getBoundingClientRect().width:t.offsetWidth})(t);if(n<=0||null===n){const n=Kt(t,e);return parseFloat(n)||0}return n},n=(e,t)=>R(t,(t,n)=>{const o=Kt(e,n),r=void 0===o?0:parseInt(o,10);return isNaN(r)?t:t+r},0);return{set:(t,n)=>{if(!m(n)&&!n.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+n);const o=t.dom;Qt(o)&&(o.style[e]=n+"px")},get:t,getOuter:t,aggregate:n,max:(e,t,o)=>{const r=n(e,o);return t>r?t-r:0}}})("width"),tn=e=>en.get(e),nn=e=>en.getOuter(e),on=e=>(e=>{const t=e.dom;return((e,t,n,o)=>t-Xt(e,`padding-${n}`,0)-Xt(e,`padding-${o}`,0)-Xt(e,`border-${n}-width`,0)-Xt(e,`border-${o}-width`,0))(e,t.getBoundingClientRect().width||t.offsetWidth,"left","right")})(e),rn=(e,t)=>({left:e,top:t,translate:(n,o)=>rn(e+n,t+o)}),an=rn,sn=(e,t)=>void 0!==e?e:void 0!==t?t:0,ln=e=>{const t=e.dom.ownerDocument,n=t.body,o=t.defaultView,r=t.documentElement;if(n===e.dom)return an(n.offsetLeft,n.offsetTop);const a=sn(null==o?void 0:o.pageYOffset,r.scrollTop),i=sn(null==o?void 0:o.pageXOffset,r.scrollLeft),s=sn(r.clientTop,n.clientTop),l=sn(r.clientLeft,n.clientLeft);return cn(e).translate(i-l,a-s)},cn=e=>{const t=e.dom,n=t.ownerDocument.body;return n===t?an(n.offsetLeft,n.offsetTop):Yt(e)?(e=>{const t=e.getBoundingClientRect();return an(t.left,t.top)})(t):an(0,0)},dn=(e=>{const t=t=>e(t)?C.from(t.dom.nodeValue):C.none();return{get:n=>{if(!e(n))throw new Error("Can only get text value of a text node");return t(n).getOr("")},getOption:t,set:(t,n)=>{if(!e(t))throw new Error("Can only set raw text value of a text node");t.dom.nodeValue=n}}})(bt),un=e=>dn.get(e),gn=(e,t)=>dn.set(e,t),mn=(e,t)=>{const n=$t(e,t);return void 0===n||""===n?[]:n.split(" ")},pn=(e,t,n)=>{let o=e.dom;const r=g(n)?n:w;for(;o.parentNode;){o=o.parentNode;const e=He.fromDom(o);if(t(e))return C.some(e);
6if(r(e))break}return C.none()},fn=(e,t,n)=>pn(e,e=>We(e,t),n),hn=(e,t)=>(e=>O(e.dom.childNodes,e=>{return n=He.fromDom(e),We(n,t);var n}).map(He.fromDom))(e),bn=(e,t)=>((e,t)=>{const n=void 0===t?document:t.dom;return Ve(n)?C.none():C.from(n.querySelector(e)).map(He.fromDom)})(t,e),yn=(e,t,n)=>((e,t,n,o,r)=>((e,t)=>We(e,t))(n,o)?C.some(n):g(r)&&r(n)?C.none():t(n,o,r))(0,fn,e,t,n),wn=e=>void 0!==e.dom.classList,vn=(e,t=!1)=>{return Yt(e)?e.dom.isContentEditable:(n=e,yn(n,"[contenteditable]")).fold(f(t),e=>"true"===Cn(e));var n},Cn=e=>e.dom.contentEditable,An=e=>e.dom.textContent,xn=(e,t)=>{let n=[];return D(Et(e),e=>{t(e)&&(n=n.concat([e])),n=n.concat(xn(e,t))}),n},kn=(e,t)=>(e=>N(Et(e),e=>We(e,t)))(e),Mn=(e,t)=>((e,t)=>{const n=void 0===t?document:t.dom;return Ve(n)?[]:I(n.querySelectorAll(e),He.fromDom)})(t,e),En=["img","br"],Tn=e=>{return(t=e,dn.getOption(t)).filter(e=>0!==e.trim().length||e.indexOf("Â ")>-1).isSome()||M(En,gt(e))||(e=>{return ht(t=e)&&(e=>{const t=ie("ownerDocument.defaultView",e);return a(e)&&((e=>((e,t)=>{const n=((e,t)=>ie(e,t))(e,t);if(null==n)throw new Error(e+" not available on this browser");return n})("HTMLElement",e))(t).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(ut(e).constructor.name))})(t.dom)&&"false"===$t(e,"contenteditable");var t})(e);var t},In={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},Dn=(()=>{const e="[0-9]+",t="[eE][+-]?"+e,n=e=>`(?:${e})?`,o=["Infinity",e+"\\."+n(e)+n(t),"\\."+e+n(t),e+n(t)].join("|");return new RegExp(`^([+-]?(?:${o}))(.*)$`)})(),Sn=(e,t)=>C.from(Dn.exec(e)).bind(e=>{const n=Number(e[1]),o=e[2];return((e,t)=>E(t,t=>E(In[t],t=>e===t)))(o,t)?C.some({value:n,unit:o}):C.none()}),Nn=e=>I(e,f(0)),Ln=e=>(t,n,o,r)=>{if(e(o)){const e=Math.max(r,t[n]-Math.abs(o)),a=Math.abs(e-t[n]);return o>=0?a:-a}return o},Bn=Ln(e=>e<0),Rn=Ln(v),On=()=>{const e=(e,t,n,o,r)=>{const a=Rn(e,o>=0?n:t,o,r);return((e,t,n,o,r)=>r(e.slice(0,t)).concat(o).concat(r(e.slice(n))))(e,t,n+1,[a,-a],Nn)};return{resizeTable:(e,t,n)=>{n&&e(t)},clampTableDelta:(e,t,n,o,r)=>{if(r){if(n>=0)return n;{const t=R(e,(e,t)=>e+t-o,0);return Math.max(-t,n)}}return Bn(e,t,n,o)},calcLeftEdgeDeltas:e,calcMiddleDeltas:(t,n,o,r,a,i)=>e(t,o,r,a,i),calcRightEdgeDeltas:(e,t,n,o,r,a)=>{if(a)return Nn(e);{const t=o/e.length;return I(e,f(t))}},calcRedestributedWidths:(e,t,n,o)=>({delta:0,newSizes:e})}},Pn=(e,t,n=0)=>Ft(e,t).map(e=>parseInt(e,10)).getOr(n),jn=e=>vt("col")(e)?Pn(e,"span",1)>1:(e=>Pn(e,"colspan",1))(e)>1,$n=f(10),Fn=(e,t)=>_n(e,t,v),_n=(e,t,n)=>P(Et(e),e=>We(e,t)?n(e)?[e]:[]:_n(e,t,n)),zn=(e,t)=>((e,t,n=w)=>n(t)?C.none():M(e,gt(t))?C.some(t):fn(t,e.join(","),e=>We(e,"table")||n(e)))(["td","th"],e,t),Un=e=>Fn(e,"th,td"),Hn=e=>We(e,"colgroup")?kn(e,"col"):P(Qn(e),e=>kn(e,"col")),Wn=(e,t)=>yn(e,"table",t),Vn=e=>Fn(e,"tr"),Qn=e=>Wn(e).fold(f([]),e=>kn(e,"colgroup")),Yn=e=>At(e).map(e=>{const t=gt(e);return(e=>M(Re,e))(t)?t:"tbody"}).getOr("tbody"),Zn="data-snooker-locked-cols",Kn=e=>Ft(e,Zn).bind(e=>C.from(e.match(/\d+/g))).map(e=>((e,t)=>{const n={};for(let o=0,r=e.length;o<r;o++){const r=e[o];n[String(r)]=t(r,o)}return n})(e,v)),Gn=(e,t)=>e+","+t,qn=e=>{const t={},n=[],o=_(e).map(e=>e.element).bind(Wn).bind(Kn).getOr({});let r=0,a=0,i=0;const{pass:s,fail:l}=S(e,e=>"colgroup"===e.section);D(l,e=>{const s=[];D(e.cells,e=>{let n=0;for(;void 0!==t[Gn(i,n)];)n++;const r=((e,t)=>J(e,t)&&void 0!==e[t]&&null!==e[t])(o,n.toString()),l=((e,t,n,o,r,a)=>({element:e,rowspan:t,colspan:n,row:o,column:r,isLocked:a}))(e.element,e.rowspan,e.colspan,i,n,r);for(let o=0;o<e.colspan;o++)for(let r=0;r<e.rowspan;r++){const e=n+o,s=Gn(i+r,e);t[s]=l,a=Math.max(a,e+1)}s.push(l)}),r++,n.push(Pe(e.element,s,e.section)),i++});const{columns:c,colgroups:d}=z(s).map(e=>{const t=(e=>{const t={};let n=0;return D(e.cells,e=>{const o=e.colspan;T(o,r=>{const a=n+r;t[a]=((e,t,n)=>({element:e,colspan:t,column:n}))(e.element,o,a)}),n+=o}),t})(e),n=((e,t)=>({element:e,columns:t}))(e.element,K(t));return{colgroups:[n],columns:t}}).getOrThunk(()=>({colgroups:[],columns:{}})),u=((e,t)=>({rows:e,columns:t}))(r,a);
6return{grid:u,access:t,all:n,columns:c,colgroups:d}},Jn=e=>{const t=(e=>{const t=Vn(e);return n=[...Qn(e),...t],o=Yn,I(n,e=>{if("colgroup"===gt(e)){const t=I(Hn(e),e=>{const t=Pn(e,"span",1);return Oe(e,1,t)});return Pe(e,t,"colgroup")}{const t=I(Un(e),e=>{const t=Pn(e,"rowspan",1),n=Pn(e,"colspan",1);return Oe(e,t,n)});return Pe(e,t,o(e))}});var n,o})(e);return qn(t)},Xn=qn,eo=(e,t,n)=>C.from(e.access[Gn(t,n)]),to=(e,t,n)=>{const o=((e,t)=>{const n=P(e.all,e=>e.cells);return N(n,t)})(e,e=>n(t,e.element));return o.length>0?C.some(o[0]):C.none()},no=e=>K(e.columns),oo=e=>H(e.columns).length>0,ro=(e,t)=>C.from(e.columns[t]),ao=(e,t,n)=>je(n(e.element,t),!0,e.isLocked),io=()=>({transformRow:h,transformCell:ao}),so=(e,t=v)=>{const n=e.grid,o=T(n.columns,h),r=T(n.rows,h);return I(o,n=>lo(()=>P(r,t=>eo(e,t,n).filter(e=>e.column===n).toArray()),e=>1===e.colspan&&t(e.element),()=>eo(e,0,n)))},lo=(e,t,n)=>{const o=e();return O(o,t).orThunk(()=>C.from(o[0]).orThunk(n)).map(e=>e.element)},co=(e,t)=>({col:e,x:t}),uo=e=>ln(e).left+nn(e),go=e=>ln(e).left,mo=(e,t)=>co(e,go(t)),po=(e,t)=>co(e,uo(t)),fo=(e,t,n)=>{if(0===n.length)return[];const o=I(n.slice(1),(t,n)=>t.map(t=>e(n,t))),r=n[n.length-1].map(e=>t(n.length-1,e));return o.concat([r])},ho=(bo={delta:h,edge:go,positions:e=>fo(mo,po,e)},yo={delta:e=>-e,edge:uo,positions:e=>fo(po,mo,e)},e=>"rtl"===(e=>"rtl"===Kt(e,"direction")?"rtl":"ltr")(e)?yo:bo);var bo,yo;const wo=e=>ho(e).edge(e),vo=vt("col"),Co=(e,t,n)=>{const o=(r=e,C.from(r.dom.parentElement).map(He.fromDom)).getOrThunk(()=>(e=>{const t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return He.fromDom(t)})(Ct(e)));var r;return t(e)/n(o)*100},Ao=(e,t)=>{Zt(e,"width",t+"px")},xo=(e,t)=>{Zt(e,"width",t+"%")},ko=e=>((e,t)=>qt(e,t).orThunk(()=>Ft(e,t).map(e=>e+"px")))(e,"width"),Mo=e=>Co(e,tn,on),Eo=e=>{return vo(e)?Math.round(tn(e)):Xt(t=e,"width",t.dom.offsetWidth);var t},To=(e,t,n)=>{Zt(e,"width",t+n)},Io=f(/(\d+(\.\d+)?)%/),Do=vt("col"),So=(e,t,n,o,r,a)=>e.filter(o).fold(()=>a(((e,t)=>{if(t<0||t>=e.length-1)return C.none();const n=e[t].fold(()=>{const n=(e=>{const t=A.call(e,0);return t.reverse(),t})(e.slice(0,t));return U(n,(e,t)=>e.map(e=>({value:e,delta:t+1})))},e=>C.some({value:e,delta:0})),o=e[t+1].fold(()=>{const n=e.slice(t+1);return U(n,(e,t)=>e.map(e=>({value:e,delta:t+1})))},e=>C.some({value:e,delta:1}));return n.bind(e=>o.map(t=>{const n=t.delta+e.delta;return Math.abs(t.value-e.value)/n}))})(n,t)),e=>r(e)),No=(e,t,n,o)=>{const r=so(e),a=oo(e)?(e=>I(no(e),e=>C.from(e.element)))(e):r,i=[C.some(wo(t))].concat(I(((e,t)=>ho(t).positions(e,t))(r,t),e=>e.map(e=>e.x))),s=(l=jn,e=>!l(e));var l;return I(a,(e,t)=>So(e,t,i,s,e=>{if((e=>{const t=dt().browser,n=t.isChromium()||t.isFirefox();return!Do(e)||n})(e))return n(e);{const e=((e,t)=>null!=e?t(e):C.none())(r[t],h);return So(e,t,i,s,e=>o(C.some(Math.round(tn(e)))),o)}},o))},Lo=(e,t,n)=>No(e,t,Eo,e=>e.getOrThunk(n.minCellWidth)),Bo=(e,t)=>()=>Yt(e)?t(e):parseFloat(qt(e,"width").getOr("0")),Ro=e=>ko(e).fold(()=>(e=>{const t=Bo(e,tn),n=f(0);return{width:t,pixelWidth:t,getWidths:(t,n)=>Lo(t,e,n),getCellDelta:n,singleColumnWidth:f([0]),minCellWidth:n,setElementWidth:p,adjustTableWidth:p,isRelative:!0,label:"none"}})(e),t=>{return n=e,o=t,null!==Io().exec(o)?(e=>{const t=Bo(e,e=>parseFloat((e=>Co(e,tn,on)+"%")(e))),n=Bo(e,tn);return{width:t,pixelWidth:n,getWidths:(t,n)=>((e,t,n)=>No(e,t,Mo,e=>e.fold(()=>n.minCellWidth(),e=>e/n.pixelWidth()*100)))(t,e,n),getCellDelta:e=>e/n()*100,singleColumnWidth:(e,t)=>[100-e],minCellWidth:()=>$n()/n()*100,setElementWidth:xo,adjustTableWidth:n=>{const o=t();xo(e,o+n/100*o)},isRelative:!0,label:"percent"}})(n):(e=>{const t=Bo(e,tn);return{width:t,pixelWidth:t,getWidths:(t,n)=>Lo(t,e,n),getCellDelta:h,singleColumnWidth:(e,t)=>[Math.max($n(),e+t)-e],minCellWidth:$n,setElementWidth:Ao,adjustTableWidth:n=>{const o=t()+n;Ao(e,o)},isRelative:!1,label:"pixel"}})(n);var n,o}),Oo=(e,t,n,o)=>{n===o?_t(e,t):Pt(e,t,n)},Po=(e,t,n)=>{z(kn(e,t)).fold(()=>St(e,n),e=>Dt(e,n))},jo=(e,t)=>{const n=[],o=[],r=e=>I(e,e=>{e.isNew&&n.push(e.element);const t=e.element;return Ut(t),D(e.cells,e=>{e.isNew&&o.push(e.element),Oo(e.element,"colspan",e.colspan,1),Oo(e.element,"rowspan",e.rowspan,1),Nt(t,e.element)}),t}),a=e=>P(e,e=>I(e.cells,e=>(Oo(e.element,"span",e.colspan,1),e.element))),i=(t,n)=>{const o=((e,t)=>{const n=hn(e,t).getOrThunk(()=>{const n=He.fromTag(t,Ct(e).dom);return"thead"===t?Po(e,"caption,colgroup",n):"colgroup"===t?Po(e,"caption",n):Nt(e,n),n});return Ut(n),n})(e,n),i=("colgroup"===n?a:r)(t);Rt(o,i)},s=(t,n)=>{t.length>0?i(t,n):(t=>{hn(e,t).each(Ht)})(n)},l=[],c=[],d=[],u=[];return D(t,e=>
6{switch(e.section){case"thead":l.push(e);break;case"tbody":c.push(e);break;case"tfoot":d.push(e);break;case"colgroup":u.push(e)}}),s(u,"colgroup"),s(l,"thead"),s(c,"tbody"),s(d,"tfoot"),{newRows:n,newCells:o}},$o=(e,t)=>{if(0===e.length)return 0;const n=e[0],o=(e=>{for(let r=0,a=e.length;r<a;r++)if(o=e[r],!t(n.element,o.element))return C.some(r);var o;return C.none()})(e);return o.getOr(e.length)},Fo=(e,t)=>{const n=I(e,e=>I(e.cells,w));return I(e,(o,r)=>{const a=P(o.cells,(o,a)=>{if(!1===n[r][a]){const d=((e,t,n,o)=>{const r=((e,t)=>e[t])(e,t),a="colgroup"===r.section,i=$o(r.cells.slice(n),o),s=a?1:$o(((e,t)=>I(e,e=>Fe(e,t)))(e.slice(t),n),o);return{colspan:i,rowspan:s}})(e,r,a,t);return((e,t,o,r)=>{for(let a=e;a<e+o;a++)for(let e=t;e<t+r;e++)n[a][e]=!0})(r,a,d.rowspan,d.colspan),[(i=o.element,s=d.rowspan,l=d.colspan,c=o.isNew,{element:i,rowspan:s,colspan:l,isNew:c})]}return[];var i,s,l,c});return((e,t,n,o)=>({element:e,cells:t,section:n,isNew:o}))(o.element,a,o.section,o.isNew)})},_o=(e,t)=>U(e.all,e=>O(e.cells,e=>Qe(t,e.element))),zo=(e,t,n)=>{const o=(e=>{const t=[],n=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(n);return t})(I(t.selection,t=>zn(t).bind(t=>_o(e,t)).filter(n)));return ae(o.length>0,o)},Uo=(e,t,n,o,r,a,i,s,l)=>{const c=Jn(a),d=C.from(null==l?void 0:l.section).getOrThunk(io),u=t(c,i).map(t=>{const n=((e,t)=>((e,t,n)=>{const o=[];D(e.colgroups,r=>{const a=[];for(let o=0;o<e.grid.columns;o++){const r=ro(e,o).map(e=>je(e.element,n,!1)).getOrThunk(()=>je(t.colGap(),!0,!1));a.push(r)}o.push($e(r.element,a,"colgroup",n))});for(let r=0;r<e.grid.rows;r++){const a=[];for(let o=0;o<e.grid.columns;o++){const i=eo(e,r,o).map(e=>je(e.element,n,e.isLocked)).getOrThunk(()=>je(t.gap(),!0,!1));a.push(i)}const i=e.all[r],s=$e(i.element,a,i.section,n);o.push(s)}return o})(e,t,!1))(c,s),o=e(n,t,Qe,r(s),d),a=(e=>{const t=R(ze(e).rows,(e,t)=>(D(t.cells,(t,n)=>{t.isLocked&&(e[n]=!0)}),e),{}),n=Z(t,(e,t)=>parseInt(t,10));return $(n)})(o.grid);return{info:t,grid:(i=o.grid,Fo(i,Qe)),cursor:o.cursor,lockedColumns:a};var i});return u.bind(e=>{const t=jo(a,e.grid),r=C.from(null==l?void 0:l.sizing).getOrThunk(()=>Ro(a)),i=C.from(null==l?void 0:l.resize).getOrThunk(On);return n(a,e.grid,e.info,{sizing:r,resize:i,section:d}),o(a),_t(a,Zn),e.lockedColumns.length>0&&Pt(a,Zn,e.lockedColumns.join(",")),C.some({cursor:e.cursor,newRows:t.newRows,newCells:t.newCells})})},Ho=(e,t)=>zn(t.element).bind(t=>_o(e,t)),Wo=(e,t)=>zo(e,t,v),Vo=(e,t)=>j(t,t=>((e,t)=>_o(e,t).exists(e=>!e.isLocked))(e,t)),Qo=(e,t)=>((e,t)=>t.mergable)(0,t).filter(t=>Vo(e,t.cells)),Yo=(e,t)=>((e,t)=>t.unmergable)(0,t).filter(t=>Vo(e,t)),Zo={...(e=>{if(!i(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");const t=[],n={};return D(e,(o,r)=>{const a=H(o);if(1!==a.length)throw new Error("one and only one name per case");const s=a[0],l=o[s];if(void 0!==n[s])throw new Error("duplicate key detected:"+s);if("cata"===s)throw new Error("cannot have a case named cata (sorry)");if(!i(l))throw new Error("case arguments must be an array");t.push(s),n[s]=(...n)=>{const o=n.length;if(o!==l.length)throw new Error("Wrong number of arguments to case "+s+". Expected "+l.length+" ("+l+"), got "+o);return{fold:(...t)=>{if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);return t[r].apply(null,n)},match:e=>{const o=H(e);if(t.length!==o.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+o.join(","));if(!j(t,e=>M(o,e)))throw new Error("Not all branches were specified when using match. Specified: "+o.join(", ")+"\nRequired: "+t.join(", "));return e[s].apply(null,n)},log:e=>{console.log(e,{constructors:t,constructor:s,params:n})}}}}),n})([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}])},Ko=(e,t,n)=>{const o=((e,t)=>oo(e)?((e,t)=>{const n=no(e);return I(n,(e,n)=>({element:e.element,width:t[n],colspan:e.colspan}))})(e,t):((e,t)=>{const n=(e=>P(e.all,e=>e.cells))(e);return I(n,e=>{const n=((e,t,n)=>{let o=0;for(let r=e;r<t;r++)o+=void 0!==n[r]?n[r]:0;return o}
6)(e.column,e.column+e.colspan,t);return{element:e.element,width:n,colspan:e.colspan}})})(e,t))(e,t);D(o,e=>{n.setElementWidth(e.element,e.width)})},Go=(e,t)=>{if(!jn(e)){const n=(e=>ko(e).bind(e=>Sn(e,["fixed","relative","empty"])))(e);n.each(n=>{const o=n.value/2;To(e,o,n.unit),To(t,o,n.unit)})}},qo=vt("col"),Jo=vt("colgroup"),Xo=e=>({element:e,colspan:Pn(e,"colspan",1),rowspan:Pn(e,"rowspan",1)}),er=(e,t=Xo)=>{const n=n=>{if((e=>"tr"===gt(e)||Jo(e))(n))return Jo((r={element:n}).element)?e.colgroup(r):e.row(r);{const r=n,a=(t=>qo(t.element)?e.col(t):e.cell(t))(t(r));return o=C.some({item:r,replacement:a}),a}var r};let o=C.none();return{getOrInit:(e,t)=>o.fold(()=>n(e),o=>t(e,o.item)?o.replacement:n(e))}};var tr=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"],nr=()=>({up:f({selector:fn,closest:yn,predicate:pn,all:xt}),down:f({selector:Mn,predicate:xn}),styles:f({get:Kt,getRaw:qt,set:Zt,remove:Jt}),attrs:f({get:$t,set:Pt,remove:_t,copyTo:(e,t)=>{const n=zt(e);jt(t,n)}}),insert:f({before:It,after:Dt,afterAll:Bt,append:Nt,appendAll:Rt,prepend:St,wrap:Lt}),remove:f({unwrap:Wt,remove:Ht}),create:f({nu:He.fromTag,clone:e=>He.fromDom(e.dom.cloneNode(!1)),text:He.fromText}),query:f({comparePosition:(e,t)=>e.dom.compareDocumentPosition(t.dom),prevSibling:kt,nextSibling:Mt}),property:f({children:Et,name:gt,parent:At,document:e=>{return(t=e,yt(t)?t:Ct(t)).dom;var t},isText:bt,isComment:ft,isElement:ht,isSpecial:e=>{const t=gt(e);return M(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],t)},getLanguage:e=>ht(e)?Ft(e,"lang"):C.none(),getText:un,setText:gn,isBoundary:e=>!!ht(e)&&("body"===gt(e)||M(tr,gt(e))),isEmptyTag:e=>!!ht(e)&&M(["br","img","hr","input"],gt(e)),isNonEditable:e=>ht(e)&&"false"===$t(e,"contenteditable")}),eq:Qe,is:Ye});const or=(e,t)=>({element:e,offset:t}),rr=(e,t,n)=>e.property().isText(t)&&0===e.property().getText(t).trim().length||e.property().isComment(t)?n(t).bind(t=>rr(e,t,n).orThunk(()=>C.some(t))):C.none(),ar=(e,t)=>e.property().isText(t)?e.property().getText(t).length:e.property().children(t).length,ir=(e,t)=>{const n=rr(e,t,e.query().prevSibling).getOr(t);if(e.property().isText(n))return or(n,ar(e,n));const o=e.property().children(n);return o.length>0?ir(e,o[o.length-1]):or(n,ar(e,n))},sr=ir,lr=nr(),cr=(e,t,n,o)=>{const r=t(e,n);return B(o,(n,o)=>{const r=t(e,o);return dr(e,n,r)},r)},dr=(e,t,n)=>t.bind(t=>n.filter(y(e.eq,t))),ur=nr(),gr={scope:["row","col"]},mr=e=>()=>{const t=He.fromTag("td",e.dom);return Nt(t,He.fromTag("br",e.dom)),t},pr=e=>()=>He.fromTag("col",e.dom),fr=e=>()=>He.fromTag("colgroup",e.dom),hr=e=>()=>He.fromTag("tr",e.dom),br=(e,t,n)=>{const o=((e,t)=>{const n=((e,t)=>{const n=He.fromTag(t),o=zt(e);return jt(n,o),n})(e,t),o=Et((e=>Vt(e,!0))(e));return Rt(n,o),n})(e,t);return V(n,(e,t)=>{null===e?_t(o,t):Pt(o,t,e)}),o},yr=(e,t,n)=>{const o=(e,t)=>{((e,t)=>{const n=e.dom,o=t.dom;Qt(n)&&Qt(o)&&(o.style.cssText=n.style.cssText)})(e.element,t),Jt(t,"height"),1!==e.colspan&&Jt(t,"width")};return{col:n=>{const r=He.fromTag(gt(n.element),t.dom);return o(n,r),e(n.element,r),r},colgroup:fr(t),row:hr(t),cell:r=>{const a=He.fromTag(gt(r.element),t.dom),i=n.getOr(["strong","em","b","i","span","font","h1","h2","h3","h4","h5","h6","p","div"]),s=i.length>0?((e,t,n)=>{return(o=e,((e,t)=>{const n=e=>{for(let o=0;o<e.childNodes.length;o++){const r=He.fromDom(e.childNodes[o]);if(t(r))return C.some(r);const a=n(e.childNodes[o]);if(a.isSome())return a}return C.none()};return n(e.dom)})(o,Tn)).map(o=>{const r=((e,t,n)=>((e,n,o)=>N(xt(e,o),e=>We(e,t)))(e,0,n))(o,n.join(","),t=>Qe(t,e));return B(r,(e,t)=>{const n=Vt(t,!1);return Nt(e,n),n},t)}).getOr(t);var o})(r.element,a,i):a;return Nt(s,He.fromTag("br")),o(r,a),((e,t)=>{V(gr,(n,o)=>Ft(e,o).filter(e=>M(n,e)).each(e=>Pt(t,o,e)))})(r.element,a),e(r.element,a),a},replace:br,colGap:pr(t),gap:mr(t)}},wr=e=>Jn(e).grid,vr=e=>R(e,(e,t)=>E(e,e=>e.column===t.column)?e:e.concat([t]),[]).sort((e,t)=>
6e.column-t.column),Cr=e=>vn(e,!0),Ar=e=>{0===Un(e).length&&Ht(e)},xr=(e,t,n)=>((e,t)=>({grid:e,cursor:t}))(e,((e,t,n,o)=>{const r=ze(e).rows;return C.from(null===(o=r[t])||void 0===o||null===(o=o.cells[n])||void 0===o?void 0:o.element).filter(Cr).orThunk(()=>(e=>U(e,e=>U(e.cells,e=>{const t=e.element;return ae(Cr(t),t)})))(r))})(e,t,n)),kr=(e,t,n,o)=>{const r=t.detail,a=r.column,i=r.column,s=((e,t,n,o,r)=>I(e,e=>{const a=t>0&&t<e.cells.length&&o(_e(e,t-1),_e(e,t)),i=((e,t,n,o,r,a,i)=>{if("colgroup"!==n&&o)return Fe(e,t);{const t=Fe(e,r);return je(i(t.element,a),!0,!1)}})(e,t,e.section,a,n,o,r);return((e,t,n)=>((e,t,n)=>{const o=e.cells,r=o.slice(0,t),a=o.slice(t);return((e,t)=>$e(e.element,t,e.section,e.isNew))(e,r.concat(n).concat(a))})(e,t,[n]))(e,t,i)}))(e,i,a,n,o.getOrInit);return xr(s,r.row,i)},Mr=(e,t,n,o)=>{const r=vr(t.details),a=((e,t)=>P(e,e=>{const n=e.cells,o=B(t,(e,t)=>t>=0&&t<e.length?e.slice(0,t).concat(e.slice(t+1)):e,n);return o.length>0?[$e(e.element,o,e.section,e.isNew)]:[]}))(e,I(r,e=>e.column)),i=a.length>0?a[0].cells.length-1:0;return xr(a,r[0].row,Math.min(r[0].column,i))},Er=(e,t,n,o)=>((e,t,n,o,r)=>{const a=Xn(t),i=o.getWidths(a,o),s=o.pixelWidth(),{newSizes:l,delta:c}=r.calcRedestributedWidths(i,s,n.pixelDelta,o.isRelative);Ko(a,l,o),o.adjustTableWidth(c)})(0,t,n,o.sizing,o.resize),Tr=(e,t)=>{const n=so(e),o=vr(t);return R(o,(e,t)=>e+n[t.column].map(nn).getOr(0),0)},Ir=(e,t)=>((e,t)=>zo(e,t,e=>!e.isLocked))(e,t).map(t=>({details:t,pixelDelta:-Tr(e,t)})),Dr=(e,t,n,o)=>Uo(kr,(e,t)=>Ho(e,t).filter(e=>!E([e],e=>0===e.column&&e.isLocked)).map(t=>({detail:t,pixelDelta:Tr(e,[t])})),Er,p,er,e,t,n,o),Sr=(e,t,n,o)=>Uo(Mr,Ir,Er,Ar,er,e,t,n,o),Nr=(e,t)=>t.column>=e.startCol&&t.column+t.colspan-1<=e.finishCol&&t.row>=e.startRow&&t.row+t.rowspan-1<=e.finishRow,Lr=(e,t,n)=>((e,t,n)=>((e,t,n)=>{const o=to(e,t,Qe),r=to(e,n,Qe);return o.bind(e=>r.map(t=>{return n=e,o=t,{startRow:Math.min(n.row,o.row),startCol:Math.min(n.column,o.column),finishRow:Math.max(n.row+n.rowspan-1,o.row+o.rowspan-1),finishCol:Math.max(n.column+n.colspan-1,o.column+o.colspan-1)};var n,o}))})(e,t,n).bind(t=>((e,t)=>{let n=!0;const o=y(Nr,t);for(let r=t.startRow;r<=t.finishRow;r++)for(let a=t.startCol;a<=t.finishCol;a++)n=n&&eo(e,r,a).exists(o);return n?C.some(t):C.none()})(e,t)))(Br(e),t,n),Br=Jn,Rr=e=>He.fromDom(e.getBody()),Or=e=>t=>Qe(t,Rr(e)),Pr=e=>He.fromDom(e.selection.getStart()),jr=e=>fn(e,"table"),$r=h,Fr=e=>{const t=(e,t)=>Ft(e,t).exists(e=>parseInt(e,10)>1);return e.length>0&&j(e,e=>t(e,"rowspan")||t(e,"colspan"))?C.some(e):C.none()},_r=(e,t,n)=>{return t.length<=1?C.none():(o=e,r=n.firstSelectedSelector,a=n.lastSelectedSelector,((e,t,n)=>bn(e,t).bind(t=>bn(e,n).bind(e=>{return(n=jr,o=[t,e],((e,t,n)=>n.length>0?((e,t,n,o)=>o(e,t,n[0],n.slice(1)))(e,t,n,cr):C.none())(ur,(e,t)=>n(t),o)).map(n=>({first:t,last:e,table:n}));var n,o})))(o,r,a).bind(e=>{const t=e=>Qe(o,e),n="thead,tfoot,tbody,table",r=fn(e.first,n,t),a=fn(e.last,n,t);return r.bind(t=>a.bind(n=>Qe(t,n)?Lr(e.table,e.first,e.last):C.none()))})).map(e=>({bounds:e,cells:t}));var o,r,a},zr="data-mce-first-selected",Ur="data-mce-last-selected",Hr={firstSelectedSelector:"td["+zr+"],th["+zr+"]",lastSelectedSelector:"td["+Ur+"],th["+Ur+"]"},Wr=e=>({element:e,mergable:C.none(),unmergable:C.none(),selection:[e]}),Vr=(e,t,n)=>({element:n,mergable:_r(t,e,Hr),unmergable:Fr(e),selection:$r(e)}),Qr=e=>(t,n)=>{const o=gt(t),r="col"===o||"colgroup"===o?Wn(a=t).bind(e=>((e,t)=>((e,t)=>{const n=Mn(e,t);return n.length>0?C.some(n):C.none()})(e,t))(e,Hr.firstSelectedSelector)).fold(f(a),e=>e[0]):t;var a;return yn(r,e,n)},Yr=Qr("th,td,caption"),Zr=Qr("th,td"),Kr=e=>{return t=e.model.table.getSelectedCells(),I(t,He.fromDom);var t},Gr=vt("th"),qr=(e,t)=>e&&t?"sectionCells":e?"section":"cells",Jr=e=>{const t=N(e,e=>Gr(e.element));return 0===t.length?C.some("td"):t.length===e.length?C.some("th"):C.none()},Xr=e=>{const t=I(e,e=>(e=>{const t="thead"===e.section,n=ne(Jr(e.cells),"th");return"tfoot"===e.section?{type:"footer"}:t||n?{type:"header",subType:qr(t,n)}:{type:"body"}})(e).type),n=M(t,"header"),o=M(t,"footer");if(n||o){const e=M(t,"body");return!n||e||o?n||e||!o?C.none():C.some("footer"):C.some("header")}return C.some("body")},ea={structure:!1,style:!0},ta={structure:!0,style:!1},na=(e,t,n)=>({value:t+1}),oa=(e,t,n)=>{const o="A".charCodeAt(0),r=[];let a=t;for(;a>=0;)r.push(String.fromCharCode(o+a%26)),a=Math.floor(a/26)-1;return{value:r.reverse().join("")}},ra=e=>e.options.get("advtable_value_series"),aa=e=>{const t=parseFloat(e);return ae(!(isNaN(t)||isNaN(e)),t)},ia=(e,t)=>e<t?-1:e>t?1:0,sa=(e,t)=>oe(aa(e),aa(t),ia).getOrThunk(()=>((e,t)=>e.localeCompare(t))(e,t)),la=e=>{const t=(e=>C.from(e.options.get("table_clone_elements")))(e),n=(n,r,a,i)=>(s,l,c,d,u=!1)=>{const g=He.fromDom(e.getDoc()),m=yr(a,g,t);return r(s)?n(s,l,m).bind(t=>{D(t.newRows,t=>{((e,t)=>
6{e.dispatch("NewRow",{node:t})})(e,t.dom)}),D(t.newCells,t=>{((e,t)=>{e.dispatch("NewCell",{node:t})})(e,t.dom)});const n=((t,n,r,a)=>{const i=r.filter(e=>Yt(e)&&o(e)).or(n.cursor);return i.fold(()=>{const n=Un(t);return _(n).filter(Yt).map(n=>{const o=e.dom.createRng();return o.selectNode(n.dom),a&&(e.model.table.clearSelectedCells(t.dom),e.selection.setRng(o),Pt(n,"data-mce-selected","1")),o})},n=>{const o=e.dom.createRng(),r=sr(lr,n);return o.setStart(r.element.dom,r.offset),o.setEnd(r.element.dom,r.offset),a&&(e.model.table.clearSelectedCells(t.dom),e.selection.setRng(o)),C.some(o)})})(s,t,c,d);return Yt(s)&&((e=>{_t(e,"data-mce-style");const t=e=>_t(e,"data-mce-style");D(Un(e),t),D(Hn(e),t),D(Vn(e),t)})(s),u||((e,t,n)=>{e.dispatch("TableModified",{...n,table:t})})(e,s.dom,i)),n.map(e=>({rng:e,effect:i}))}):C.none()},o=e=>vn(e,!0),l=(e,t,n)=>((e,t)=>({grid:e,cursor:t}))(e,((e,t,n)=>{var r,a;const i=ze(e).rows;return C.from(null===(a=null===(r=i[t])||void 0===r?void 0:r.cells[n])||void 0===a?void 0:a.element).filter(o).orThunk(()=>(e=>U(e,e=>U(e.cells,e=>{const t=e.element;return ae(o(t),t)})))(i))})(e,t,n)),c=(e,t,n,o)=>{const{cols:r,rows:a}=ze(e),i=L(a,e=>e.section),s=I(i,e=>L(e,e=>{const n=Fe(e,t).element;return gt(n)})),l=P(s,e=>P(e,e=>{const r=Fe(e[0],t).element;return"th"===gt(r)?e:(e=>{const r=I(e,e=>{const n=Fe(e,t).element;return{row:e,text:C.from(An(n)).getOr("")}}),a=$(r,(e,t)=>{const r=n(e.text,t.text);return o?r:-1*r});return I(a,e=>e.row)})(e)}));return[...r,...l]},d=(e,t,n,o)=>{const{cols:r,rows:a}=ze(e),i=a[t].cells,s=I(i,e=>{const t=e.element;return C.from(An(t)).getOr("")}),l=vt("th"),c=I(a,e=>{const t=I(e.cells,(e,t)=>({cell:e,column:t,reference:i[t],referenceText:s[t]}));return{...e,zippedCells:t}}),d=I(c,e=>{const t=L(e.zippedCells,e=>{const t=e.reference.element;return gt(t)}),r=P(t,e=>{const t=e[0].reference.element;if(l(t))return I(e,e=>e.cell);{const{pass:t,fail:r}=S(e,e=>e.cell.isLocked),a=$(r,(e,t)=>{const r=n(e.referenceText,t.referenceText);return o?r:-1*r}),i=R(t,(e,t)=>{const n=t.column,o=e.slice(0,n),r=e.slice(n);return o.concat([t]).concat(r)},a);return I(i,e=>e.cell)}});return $e(e.element,r,e.section,e.isNew)});return[...r,...d]},u=c,g=d,b=(e,t,n,o,r)=>{const{cols:a,rows:i}=ze(e),s=i.slice(0,t),l=[...a,...i.slice(t,n+1)];return{beforeRows:s,afterRows:i.slice(n+1,e.length),selectionGridBefore:l.map(e=>({...e,cells:e.cells.slice(0,o)})),selectionGrid:l.map(e=>({...e,cells:e.cells.slice(o,r+1)})),selectionGridAfter:l.map(e=>({...e,cells:e.cells.slice(r+1,e.cells.length)}))}},y=(e,t)=>{const n=I(t,(t,n)=>{const o=e.selectionGridBefore[n].cells,r=e.selectionGridAfter[n].cells;return{...t,cells:o.concat(t.cells).concat(r)}}),{cols:o,rows:r}=ze(n);return[...o,...e.beforeRows,...r,...e.afterRows]},w=(e,t,n,o,r,a,i,s)=>{const l=b(e,n,o,r,a),d=c(l.selectionGrid,t-r,i,s);return y(l,d)},A=(e,t,n,o,r,a,i,s)=>{const l=b(e,n,o,r,a),c=d(l.selectionGrid,t-n,i,s);return y(l,c)},x=e=>R(e,(e,t)=>E(e,e=>e.row===t.row)?e:e.concat([t]),[]).sort((e,t)=>e.row-t.row),k=e=>R(e,(e,t)=>E(e,e=>e.column===t.column)?e:e.concat([t]),[]).sort((e,t)=>e.column-t.column),M=e=>R(e,(e,t)=>E(e,e=>Qe(e.element,t.element))?e:e.concat([t]),[]),T=e=>{const t=a(e.attributes)?Z(e.attributes,(e,t)=>s(e)?e=>_t(e,t):n=>Pt(n,t,e)):[];return[...t,...((e,t)=>{if(i(e)){for(let n=0,o=e.length;n<o;++n)if(!t(e[n]))return!1;return!0}return!1})(e.classes,r)?I(e.classes,e=>t=>((e,t)=>{wn(e)?e.dom.classList.add(t):((e,t)=>{((e,t,n)=>{const o=mn(e,t).concat([n]);Pt(e,t,o.join(" "))})(e,"class",t)})(e,t)})(t,e)):[],t=>{const n=An(t)||"",o=(a=e.value,m(a)?String(a):r(a)?a:void 0);var a;const i=r(o)?o:n;ce(i)?(e=>{const t=Ct(e).dom,n=He.fromDom(t.createDocumentFragment()),o=((e,t)=>{const n=(t||document).createElement("div");return n.innerHTML="<br>",Et(He.fromDom(n))})(0,t);Rt(n,o),Ut(e),Nt(e,n)})(t):((e,t)=>{e.dom.textContent=t})(t,i)}]},N=(e,t,n,o,r,a,i,s)=>{let l;D(t,(t,c)=>{const d=t.element,u={sectionType:a(c),cellType:gt(d),getRowType:i(c),getColType:s(c),classes:(p=d,wn(p)?(e=>{const t=e.dom.classList,n=new Array(t.length);for(let e=0;e<t.length;e++){const o=t.item(e);null!==o&&(n[e]=o)}return n})(p):(e=>mn(e,"class"))(p)),prev:null==l?void 0:l.raw,direction:n},g=e(u,o(c),r(c)),m=T(g);var p;D(m,e=>e(d)),l=g})},B=(e,t,n,o,r)=>{const a=w(e,r,0,e.length,r,r,n,o);return l(a,t[0].row,t[0].column)},O=(e,t,n,o,r)=>{const a=x(t),i=k(t),s=w(e,r,a[0].row,a[a.length-1].row,i[0].column,i[i.length-1].column,n,o);return l(s,t[0].row,t[0].column)},j=(e,t,n,o,r)=>{const a=u(e,r,n,o);return l(a,t.row,t.column)},F=(e,t,n,o,r)=>{const a=A(e,r,r,r,0,e[t[0].row].cells.length,n,o);return l(a,t[0].row,t[0].column)},z=(e,t,n,o,r)=>{const a=x(t),i=k(t),s=A(e,r,a[0].row,a[a.length-1].row,i[0].column,i[i.length-1].column,n,o);return l(s,t[0].row,t[0].column)},H=(e,t,n,o,r)=>{const a=g(e,r,n,o);return l(a,t.row,t.column)},W=(e,t,n,o)=>{const r=ze(e).rows,a=I(r,e=>Fe(e,o)),i=M(a),s=de(()=>Jr(i).getOr(""));return N(n,i,"column",h,f(o),e=>r[e].section,e=>de(()=>{const t=r[e];return Xr([{cells:t.cells,section:t.section}]).getOr("")}),e=>s),l(e,t.row,t.column)},V=(e,t,n,o)=>{const r=ze(e).rows,a=r[o],i=M(a.cells),s=de(()=>Xr([{cells:a.cells,section:a.section}]).getOr(""));return N(n,i,"row",f(o),h,e=>a.section,e=>s,e=>de(()=>{const t=I(r,t=>Fe(t,e));return Jr(t).getOr("")})),l(e,t.row,t.column)},Q=(e,t,n,o,r)=>(a,i,s)=>Uo((r,a)=>e(r,a,t,n,o),r,p,p,er,a,i,s),Y=(e,t,n,o)=>(r,a,i)=>Uo((o,r)=>
6e(o,r,t,n),o,p,p,er,r,a,i),K=n(Dr,v,Go,ta),G=n(Sr,t=>0==("table"===gt(Rr(e)))||wr(t).columns>1,p,ta);return{sortColumnRowsAsc:e=>n(Q(B,sa,!0,e,Wo),v,p,ta),sortColumnRowsDesc:e=>n(Q(B,sa,!1,e,Wo),v,p,ta),sortSelectionRowsAsc:e=>n(Q(O,sa,!0,e,Wo),v,p,ta),sortSelectionRowsDesc:e=>n(Q(O,sa,!1,e,Wo),v,p,ta),sortTableRowsAsc:e=>n(Q(j,sa,!0,e,Ho),v,p,ta),sortTableRowsDesc:e=>n(Q(j,sa,!1,e,Ho),v,p,ta),sortRowColumnsAsc:e=>n(Q(F,sa,!0,e,Wo),v,p,ta),sortRowColumnsDesc:e=>n(Q(F,sa,!1,e,Wo),v,p,ta),sortSelectionColumnsAsc:e=>n(Q(z,sa,!0,e,Wo),v,p,ta),sortSelectionColumnsDesc:e=>n(Q(z,sa,!1,e,Wo),v,p,ta),sortTableColumnsAsc:e=>n(Q(H,sa,!0,e,Ho),v,p,ta),sortTableColumnsDesc:e=>n(Q(H,sa,!1,e,Ho),v,p,ta),insertColumnBefore:K,deleteColumn:G,populateColumn:(e,t)=>n(Y(W,t,e,Ho),v,p,ea),populateRow:(e,t)=>n(Y(V,t,e,Ho),v,p,ea)}},ca="data-snooker-locked-cols",da=e=>Ft(e,ca).map(e=>P(e.split(","),e=>{const t=parseInt(e,10);return isNaN(t)?[]:[t]})).getOr([]),ua=(e,t)=>Pt(e,ca,$(t).join(",")),ga=(e,t)=>{const n=da(e);M(n,t)||ua(e,n.concat([t]))},ma=(e,t)=>{const n=da(e);ua(e,N(n,e=>t!==e))},pa="data-snooker-col-series",fa=e=>Ft(e,pa),ha=(e,t)=>ne(fa(e).map(e=>e.toLowerCase()),t.toLowerCase()),ba=e=>((e,t)=>{const n=e.dom;return!(!n||!n.hasAttribute)&&n.hasAttribute(t)})(e,pa),ya=(e,t,n,o,r)=>{((e,t)=>{const n=E(da(e),e=>0===e);n&&ma(e,0),t(),n&&ga(e,1)})(e,()=>{n.column(0,t.insertColumnBefore,!0,!0),(e=>{const t=Ro(e),n=Jn(e),o=eo(n,0,0).bind(e=>{const t=e.element;return Sn(Kt(t,"width"),["fixed"])}).map(e=>28-e.value).getOr(0);((e,t,n,o,r)=>{const a=Jn(e),i=r.getCellDelta(t),s=r.getWidths(a,r),l=0==a.grid.columns-1,c=o.clampTableDelta(s,0,i,r.minCellWidth(),l),d=((e,t,n,o,r)=>{const a=e.slice(0),i=(e=>0===e.length?Zo.none():1===e.length?Zo.only(0):Zo.left(0,1))(e),s=f(I(a,f(0)));return i.fold(s,e=>o.singleColumnWidth(a[e],n),(e,t)=>r.calcLeftEdgeDeltas(a,e,t,n,o.minCellWidth(),o.isRelative),(e,t,i)=>r.calcMiddleDeltas(a,e,t,i,n,o.minCellWidth(),o.isRelative),(e,t)=>r.calcRightEdgeDeltas(a,e,t,n,o.minCellWidth(),o.isRelative))})(s,0,c,r,o),u=I(d,(e,t)=>e+s[t]);Ko(a,u,r),o.resizeTable(r.adjustTableWidth,c,l)})(e,o,0,On(),t)})(e),wa(e,t,n,o,r)})},wa=(e,t,n,o,r)=>{n.table(e,0,0,t.populateColumn(0,(e,t,n)=>{const o=r.generator(e,t,n);return{raw:o,value:o.value,classes:o.classes,attributes:{contenteditable:"false",...o.attributes,"data-mce-resize":!1===r.resizable?"false":null}}}),!0,!0),((e,t)=>{Pt(e,pa,t)})(e,o),ga(e,0)},va=e=>Wn(Pr(e),Or(e)),Ca=(e,t)=>{e.execCommand("mceTableToggleSeries",!1,t)},Aa=(e,t,n)=>t.onSetupCellOrRowToggle(()=>((e,t)=>va(e).exists(e=>ce(t)?!ba(e):ha(e,t)))(e,n)),xa=(e,t)=>({type:"togglemenuitem",text:"None",onAction:()=>{(e=>va(e).bind(fa))(e).each(t=>{Ca(e,{name:t})})},onSetup:Aa(e,t,"")}),ka=(e,t,n,o,r)=>({type:"togglemenuitem",text:n,value:o,icon:r,onAction:()=>Ca(e,{name:o}),onSetup:Aa(e,t,o)}),Ma=(e,t,n)=>Z(n,(n,o)=>{const r=C.from(n.title).getOrThunk(()=>{return""===(e=o)?"":e.charAt(0).toUpperCase()+e.substring(1);var e});return ka(e,t,r,o)}),Ea=e=>t=>{const n=t.getData();t.close(),e.undoManager.transact(()=>{e.execCommand("mceSortTableAdvanced",!1,n),e.focus(),e.addVisual()})},Ta=e=>{const t={type:"listbox",name:"sortby",label:"Sort by",items:[{text:"Column",value:"column"},{text:"Row",value:"row"}]},n=ee(C.none()),o=t=>({type:"listbox",name:"roworcol",label:"column"===t?"Column":"Row",items:"column"===t?(()=>{const t=n.get().getOrDie("state must be present"),o=t.limit?t.finishCol+1-t.startCol:t.columns;return T(o,n=>{const o=t.limit?t.startCol:0,r=(e=>{let t=e,n="";for(;Math.floor(t)>0;)--t,n+=String.fromCharCode("A".charCodeAt(0)+t%26),t/=26;return n.split("").reverse().join("")})(n+o+1);return{text:e.translate(["Column {0}",r]),value:`${n+o}`}})})():(()=>{const t=n.get().getOrDie("state must be present"),o=t.limit?t.finishRow+1-t.startRow:t.rows;return T(o,n=>{const o=t.limit?t.startRow:0,r=(n+o+1).toString();return{text:e.translate(["Row {0}",r]),value:`${n+o}`}})})()}),r=e=>({type:"listbox",name:"sort",label:"Sort",items:["column"===e?{text:"Column",value:"column"}:{text:"Row",value:"row"},{text:"Selection",value:"selection"},{text:"Table",value:"table"}]}),a={type:"listbox",name:"order",label:"Order",items:[{text:"Ascending",value:"ascending"},{text:"Descending",value:"descending"}]},i=e=>({type:"panel",items:[{type:"grid",columns:2,items:[t,o(e),r(e),a]}]}),s=e=>({title:"Advanced Sort",size:"normal",body:i(e),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"sort",text:"Sort",primary:!0}]}),l=()=>{n.set(C.none())},c=(t,o)=>{if("sortby"===o.name){const o=t.getData(),i=(r=o,a=n.get().getOrDie("state must be present"),"column"===r.sortby?{sortby:"column",roworcol:`${a.startCol}`,sort:"row"===r.sort?"column":r.sort,order:r.order}:{sortby:"row",roworcol:`${a.startRow}
6`,sort:"column"===r.sort?"row":r.sort,order:r.order}),d={...s(o.sortby),onChange:c,onClose:l,onSubmit:Ea(e),initialData:i};t.redial(d),t.focus("sortby")}var r,a};Zr(Pr(e)).each(t=>{Wn(t,Or(e)).each(o=>{const r=Vr(Kr(e),o,t),a=t=>{n.set(C.some(t));const o={sortby:"column",roworcol:`${t.startCol}`,sort:"column",order:"ascending"},r={...s("column"),onChange:c,onClose:l,onSubmit:Ea(e),initialData:o};e.windowManager.open(r)},i=wr(o);r.mergable.fold(()=>{Lr(o,t,t).each(e=>{const t={...e,...i,limit:!1};a(t)})},e=>{const t={...e.bounds,...i,limit:!0};a(t)})})})},Ia=(e,t,n,o)=>{const a=e=>"selection"===e,i=e=>"ascending"===e,s=t=>Wn(t,Or(e)),l=()=>Zr(Pr(e),Or(e)).bind(e=>s(e).bind(t=>Lr(t,e,e))),c=()=>l().map(e=>e.startCol),d=()=>l().map(e=>e.startRow),u=t=>(...n)=>{e.mode.isReadOnly()||t(...n)};e.addCommand("mceSortTableByColumnAsc",u(()=>{c().each(e=>{n.selection(t.sortTableRowsAsc(e))})})),e.addCommand("mceSortTableByColumnDesc",u(()=>{c().each(e=>{n.selection(t.sortTableRowsDesc(e))})})),e.addCommand("mceSortTableByRowAsc",u(()=>{d().each(e=>{n.selection(t.sortTableColumnsAsc(e))})})),e.addCommand("mceSortTableByRowDesc",u(()=>{d().each(e=>{n.selection(t.sortTableColumnsDesc(e))})})),e.addCommand("mceSortTableAdvanced",u((e,o)=>(e=>{const o=parseInt(e.roworcol,10);"column"===e.sortby?((e,o)=>{(e=>"column"===e)(e.sort)?i(e.order)?n.selection(t.sortColumnRowsAsc(o)):n.selection(t.sortColumnRowsDesc(o)):a(e.sort)?i(e.order)?n.selection(t.sortSelectionRowsAsc(o)):n.selection(t.sortSelectionRowsDesc(o)):i(e.order)?n.selection(t.sortTableRowsAsc(o)):n.selection(t.sortTableRowsDesc(o))})(e,o):((e,o)=>{(e=>"row"===e)(e.sort)?i(e.order)?n.selection(t.sortRowColumnsAsc(o)):n.selection(t.sortRowColumnsDesc(o)):a(e.sort)?i(e.order)?n.selection(t.sortSelectionColumnsAsc(o)):n.selection(t.sortSelectionColumnsDesc(o)):i(e.order)?n.selection(t.sortTableColumnsAsc(o)):n.selection(t.sortTableColumnsDesc(o))})(e,o)})(o))),e.addCommand("mceAdvancedTableSort",()=>Ta(e)),e.addCommand("mceTableToggleSeries",u((a,i)=>{const l=C.from(i.name).filter(r),c=s(Pr(e));oe(l,c,(e,r)=>{ha(r,e)?((e,t,n)=>{ma(e,0),(e=>{_t(e,pa)})(e),n.column(0,t.deleteColumn,!0,!0)})(r,t,n):q(o,e).each(o=>{(ba(r)?wa:ya)(r,t,n,e,o)})})}))};((e,t)=>{const{i18n:n=!0}=t;n&&tinymce.PluginManager.requireLangPack(e,"ar,bg-BG,ca,cs,da,de,el,es,eu,fa,fi,fr-FR,he-IL,hi,hr,hu-HU,id,it,ja,kk,ko-KR,ms,nb-NO,nl,pl,pt-BR,pt-PT,ro,ru,sk,sl-SI,sv-SE,th-TH,tr,uk,vi,zh-CN,zh-TW"),tinymce.PluginManager.add(e,((e,t)=>{const{setup:n,protection:o}=t;return(r,a)=>{if(!((e,t)=>Se(e,Le)?(console.error(`The "${t}" plugin requires at least version ${Le} of TinyMCE.`),!1):!!Se(e,Be)||(console.error(`The "${t}" plugin requires at least version ${Le} of TinyMCE but less than ${Be}.`),!1))(tinymce,e)||((e,t)=>!!(e=>{var t;const n=null===(t=e.options.get("license_key"))||void 0===t?void 0:t.toLowerCase(),o=e.options.get("online_license_key");return d(o)&&"gpl"===n})(e)&&(((e,t)=>{const{console:n,editor:o}=t;u(o)&&(e._skinLoaded?ue(e,o):e.on("SkinLoaded",()=>{ue(e,o)})),u(n)&&(e=>{const t=(e=>{switch(e){case"error":return console.error;case"info":return console.info;case"warn":return console.warn;default:return console.log}})(e.type);t(e.message)})(n)})(e,{console:{type:"error",message:[`The "${t}" plugin requires a valid TinyMCE license key.`,"Read more: https://www.tiny.cloud/docs/tinymce/latest/license-key/"].join(" ")}}),!0))(r,e))return{};const i=(e=>{const{protect:t=!0,events:n,commands:o,ui:r,api:a}=null!=e?e:{};return{protect:t,events:ge(n,!1),commands:ge(o,!0),ui:ge(r,!0),api:ge(a,!0)}})(o),s=((e="pre-validation")=>{const t=ee(e),n=new Set;let o=!1;const{enableLogging:r=!1}={},a=(e,...t)=>{r&&console.log(`[StatusProvider] ${e}`,...t)};return{setStatus:e=>{const o=t.get();if(o===e)return a("Status unchanged:",e),!1;t.set(e),a("Status changed:",o,"->",e);const r={currentStatus:e,previousStatus:o},i=Array.from(n);return D(i,e=>{e(r.currentStatus,r.previousStatus)}),!0},onStatusChange:e=>(n.add(e),a("Callback registered, total listeners:",n.size),()=>{n.delete(e)&&a("Callback unregistered, remaining listeners:",n.size)}),getStatus:t.get,hasListeners:()=>n.size>0,destroy:()=>
6{o||(a("Destroying StatusProvider, clearing",n.size,"listeners"),n.clear(),o=!0)}}})(),l=((e,t,n)=>{const o=`commercial-license-${t}`;return e.ui.registry.addContext(o,()=>"invalid"!==n.getStatus()&&!e.mode.isReadOnly()),e.licenseKeyManager.validate({plugin:t}).then(e=>{n.setStatus(e?"valid":"invalid")},e=>{console.error(e),console.error(`An unknown error occurred when trying to validate "${t}" plugin.`),n.setStatus("invalid")}),{ui:{context:o}}})(r,e,s),c=i.protect?Me(r,{statusProvider:s,uiContext:l.ui.context,debug:t.debug||!1,protection:i}):r,m=((e,t)=>({pluginCode:e,enforcer:{isInvalid:()=>"invalid"===t.getStatus(),onInvalid:e=>t.onStatusChange((t,n)=>{"invalid"===t&&e(t,n)})}}))(e,s);return((e,t,n,o)=>{if(t.protect&&t.api.protect&&u(e)){const a=me(t.api);return(r=e=>"invalid"===n.getStatus()&&a(e),(e,t)=>Q(e,(e,n)=>g(e)?(...o)=>{if(r(n.toLowerCase())){const e=`Method "${u(t)?`${t}.`:""}${n}" is not available due to license key restrictions.`,o=new Error(e);throw console.error(e),o}return e(...o)}:e))(e,o)}var r;return e})(n(c,a,m),i,s,e)}})(e,t))})("advtable",{setup:e=>{(e=>{(0,e.options.register)("advtable_value_series",{processor:"object",default:{numeric:{title:"Numeric",update:!0,resizable:!1,generator:na},alpha:{title:"Alpha",update:!0,resizable:!1,generator:oa}}})})(e);const t=la(e),n=(e=>{const t=ee(C.none()),n=ee([]);let o=C.none();const r=vt("caption"),a=()=>Yr(Pr(e),Or(e)).bind(t=>re(oe(Wn(t),Yr((e=>He.fromDom(e.selection.getEnd()))(e),Or(e)).bind(Wn),(n,o)=>Qe(n,o)?r(t)?C.some(Wr(t)):C.some(Vr(Kr(e),n,t)):C.none()))),i=e=>Wn(e.element).map(t=>{const n=Jn(t),o=Wo(n,e).getOr([]),r=R(o,(e,t)=>(t.isLocked&&(e.onAny=!0,0===t.column?e.onFirst=!0:t.column+t.colspan>=n.grid.columns&&(e.onLast=!0)),e),{onAny:!1,onFirst:!1,onLast:!1});return{mergeable:Qo(n,e).isSome(),unmergeable:Yo(n,e).isSome(),locked:r}}),s=()=>{t.set(de(a)()),o=t.get().bind(i),D(n.get(),e=>e())},l=e=>(e(),n.set(n.get().concat([e])),()=>{n.set(N(n.get(),t=>t!==e))}),c=(n,o)=>l(()=>t.get().fold(()=>{n.setEnabled(!1)},t=>{n.setEnabled(!o(t)&&!e.mode.isReadOnly())}));return e.on("NodeChange ExecCommand TableSelectorChange",s),{onSetupTable:e=>c(e,e=>!1),onSetupCellOrRow:e=>c(e,e=>r(e.element)),onSetupColumn:e=>t=>c(t,t=>r(t.element)||(e=>o.exists(t=>t.locked[e]))(e)),onSetupCellOrRowToggle:n=>o=>((n,o,a)=>l(()=>t.get().fold(()=>{n.setEnabled(!1),n.setActive(!1)},t=>{n.setEnabled(!(e=>r(e.element))(t)&&!e.mode.isReadOnly()),n.setActive(a(t))})))(o,0,n),resetTargets:s,targets:()=>t.get()}})(e),o=(e=>{const t=t=>{e.focus()},n=t=>Wn(t,Or(e)),o=(o,r,a,i,s)=>{Zr(Pr(e)).each(e=>{n(e).each(n=>{const l=Jn(n),c=(e,t)=>to(l,e,Qe).map(e=>e[t]),d=o.orThunk(()=>c(e,"row")),u=r.orThunk(()=>c(e,"column")),g=re(oe(d,u,(e,t)=>eo(l,e,t).map(e=>e.element)));g.bind(t=>{const o=Wr(t);return a(n,o,ae(i,e),!0,s)}).each(t)})})};return{selection:(o,r)=>{Zr(Pr(e)).each(a=>{n(a).each(n=>{const i=Vr(Kr(e),n,a);o(n,i,C.none(),!0,r).each(t)})})},row:(e,t,n,r)=>o(C.some(e),C.none(),t,n,r),column:(e,t,n,r)=>o(C.none(),C.some(e),t,n,r),table:(n,o,r,a,i,s)=>{const l=Jn(n),c=eo(l,o,r).map(e=>e.element),d=Zr(Pr(e)),u=d.bind(e=>to(l,e,Qe)).isSome(),g=c.bind(e=>{const t=Wr(e),o=u&&i?d:C.none();return a(n,t,o,u,s)});g.each(t)}}})(e),r=ra(e);return Ia(e,t,o,r),((e,t,n,o)=>{const r=()=>Wn(Pr(e),Or(e)),a=(a,i=v)=>{const s=fa(a),l=s.bind(e=>q(o,e));oe(s,l,(o,s)=>{1===Jn(a).grid.columns?r().exists(e=>Qe(a,e))?e.execCommand("mceTableDelete"):e.undoManager.transact(()=>{Ht(a)}):!0===s.update&&i()&&wa(a,t,n,o,s)})};e.on("TableModified",e=>{const t=He.fromDom(e.table);a(t,()=>!1!==e.structure)}),e.on("PreInit",()=>{((e,t)=>{const n=e=>{const t=[];return d(e)?t:((e=>"thead"===e.name||"tbody"===e.name||"tfoot"===e.name)(e)?t.push(...n(e.firstChild)):"tr"===e.name&&t.push(e),t.concat(n(e.next)))},o=e=>n(e.firstChild);e.parser.addAttributeFilter(pa,e=>{var n;for(const r of e)if("table"===r.name){const e=r.attr(pa);if(!1===(null===(n=t[e])||void 0===n?void 0:n.resizable)){const e=o(r);for(const t of e)u(t.firstChild)&&t.firstChild.attr("data-mce-resize","false")}}})})(e,o)}),e.on("init",()=>{const t=()=>{const t=Zr(Pr(e),Or(e));return e.selection.isCollapsed()&&t.exists(t=>e.dom.isEmpty(t.dom))};e.on("ExecCommand",e=>{const n=e.command.toLowerCase();"delete"!==n&&"forwarddelete"!==n||!t()||r().each(a)},!0),e.on("keyup",e=>{const n=e.keyCode;8!==n&&46!==n||!t()||r().each(a)})})})(e,t,o,r),e.hasPlugin("table")&&(((e,t)=>{const n=(t,n)=>()=>e.execCommand(t,!1,n),o=t.onSetupCellOrRow,r=[{type:"menuitem",text:"Sort table by column ascending",onAction:n("mceSortTableByColumnAsc"),onSetup:o}
6,{type:"menuitem",text:"Sort table by column descending",onAction:n("mceSortTableByColumnDesc"),onSetup:o},{type:"separator"},{type:"menuitem",text:"Advanced sort...",onAction:()=>Ta(e),onSetup:o}];e.ui.registry.addNestedMenuItem("advtablesort",{type:"nestedmenuitem",text:"Sort",getSubmenuItems:f(r)});const a=ra(e);if(1===G(a)){const n=H(a)[0];e.ui.registry.addToggleMenuItem("advtablerownumbering",ka(e,t,"Row numbering",n,"table-row-numbering"))}else X(a)||e.ui.registry.addNestedMenuItem("advtablerownumbering",{type:"nestedmenuitem",text:"Row numbering",icon:"table-row-numbering",getSubmenuItems:()=>{const n=xa(e,t),o=Ma(e,t,a);return[n].concat(o)}})})(e,n),((e,t)=>{const n=ra(e);if(1===G(n)){const o=H(n)[0];e.ui.registry.addToggleButton("advtablerownumbering",{type:"togglebutton",tooltip:"Row numbering",icon:"table-row-numbering",onAction:()=>Ca(e,{name:o}),onSetup:Aa(e,t,o)})}else X(n)||e.ui.registry.addMenuButton("advtablerownumbering",{type:"menubutton",icon:"table-row-numbering",tooltip:"Row numbering",fetch:o=>{const r=xa(e,t),a=Ma(e,t,n);return o([r].concat(a))},onSetup:t.onSetupCellOrRow})})(e,n)),{}}})}()},284:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var o=n(1601),r=n.n(o),a=n(6314),i=n.n(a)()(r());i.push([e.id,".editor-inline-macro[data-macro-name=status]{background:transparent;border:0;min-height:16px;margin:0;vertical-align:-4px;color:red}",""]);const s=i},531:(e,t,n)=>{"use strict";n(2367);var o=n(6114),r=n.n(o),a=n(5199),i=n.n(a),s=(n(7726),n(5775),n(1694),n(5150)),l=n.n(s);function c(){return i().Env.browser.isSafari()||i().Env.browser.isChromium()}function d(){return r().Rte}var u=n(5642),g=n(2265);function m(e){return(e=e&&e.jquery?e[0]:e)?("BR"!==e.tagName&&3!==e.nodeType||(e=e.parentNode),e&&9===e.nodeType&&(e=null),e):null}const p={};p.Rte={HIDDEN_CHAR:"\ufeff",ZERO_WIDTH_WHITESPACE:"​",editorId:"wysiwygTextarea",isQuickEdit:!1,getCurrentBaseUrl(){if(!this.currentBaseUrl){const e=document.location;this.currentBaseUrl=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}return this.currentBaseUrl},getEditor:function(){return g.A.debug("AJS.Rte.getEditor is deprecated. Inject editor instance or use tinymce.activeEditor instead."),i().activeEditor},showSelection:e=>{d().showElement(i().activeEditor.selection.getStart(),e)},isAnyPartShown:e=>{const t=m(e);if(!t)return g.A.error("AJS.Rte.isAnyPartShown: no element to find"),!1;const n=l()(t),o=n.offset().top,r=o+n.outerHeight(),a=l()(i().activeEditor.getDoc()).scrollTop(),s=a+l()(d().getEditorFrame()).height();return r>a&&o<s},showElement:(e,t)=>{const n=m(e);if(!n)return void g.A.debug("AJS.Rte.showElement: no element to show - skipping");const o=l()(n),r=i().activeEditor,a=l()(r.getDoc()),s=o.offset().top,c=s+o.outerHeight(),u=a.scrollTop(),p=u+l()(d().getEditorFrame()).height(),f=()=>{d().bindScroll("AJS.Rte.showElement",()=>{d().unbindScroll("AJS.Rte.showElement"),setTimeout(t,1)})};s<u?(d().scrollTo(s),t&&f()):c>p?(d().scrollTo(Math.min(s,u+c-p)),t&&f()):t&&t()},scrollTo:e=>{const t=i().activeEditor;e=Math.ceil(e),l()(t.getDoc()).scrollTop(e)},bindScroll:(e,t)=>{const n=i().activeEditor;l()(document).add(n.getDoc()).add(n.getWin()).on(`scroll.${e}`,t)},unbindScroll:e=>{const t=i().activeEditor;t?l()(document).add(t.getDoc()).add(t.getWin()).off(`scroll.${e}`):l()(document).off(`scroll.${e}`)},getEditorContainer:()=>document.getElementById("wysiwyg"),getEditorFrame:()=>document.getElementById(`${i().activeEditor.id}_ifr`),webResourcePath:"/download/resources/com.atlassian.confluence.tinymceplugin%3Atinymceeditor/",getResourceUrlPrefix(){return this.resourceUrlPrefix||(this.resourceUrlPrefix=this.getCurrentBaseUrl()+u.A.get("editor-plugin-resource-prefix")),this.resourceUrlPrefix},getTinyMceBaseUrl(){return this.absoluteUrl||(this.absoluteUrl=`${this.getResourceUrlPrefix()+this.webResourcePath}tinymcesource/`),this.absoluteUrl},getMinEditorHeight:()=>+u.A.get("min-editor-height"),getTinyMceEditorMinHeight:e=>{e=e||0;const t=d().getMinEditorHeight();let n=0;return t||(Array.prototype.forEach.call(document.querySelectorAll("#editor-precursor,#header-precursor,#header"),e=>{n+=l()(e).outerHeight(!0)}),l()(window).height()-n-e)},editorFocus:e=>{if(!e||e.destroyed)return;const t=function(){let t=e.dom.getRoot();return c()&&!l()(t).parents("body").length&&(t=l()(e.getBody()).find("p:first-child")[0]),t}();t?(e.selection.select(t,!0),e.selection.collapse(!0),t.focus()):g.A.error("editorFocus was called with an invali
6d node"),e.getBody().focus(),e.getWin().focus()}},p.KEYS={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,META:91};const f=p;var h=n(3587);const b={offset(e){const t=l()(e).offset(),n=h.tinymce.activeEditor.iframeElement,o=l()(n).offset(),r=n.contentWindow.document,a=l()(h.tinymce.activeEditor.getBody()),i=r.documentElement.scrollTop||a.scrollTop(),s=r.documentElement.scrollLeft||a.scrollLeft();return{top:t.top-i+o.top,left:t.left-s+o.left}},getSelectedText(){const e=h.tinymce.activeEditor.selection;return e.getRng().text||e.getSel()&&e.getSel().toString&&e.getSel().toString()||""},setHtml(e){e&&h.tinymce.activeEditor.setContent(e)},getHtml:()=>`${h.tinymce.activeEditor.getContent()}`,isEmpty(){const e=h.tinymce.activeEditor.getContent().replace(" ","").replace("<br />","");return"<p></p>"===e.trim()||0===e.length},editorHasContentChanged:()=>h.tinymce.activeEditor.isDirty(),editorResetContentChanged(){h.tinymce.activeEditor.setDirty(!1)},getChildIndex(e,t){const n=e.childNodes;for(let e=0,o=n.length;e<o;e++)if(n[e]==t)return e;return-1}};var y=n(2579),w=n(8702),v=n.n(w),C=n(9225);function A(){return l()("#table-highlight-group").attr("data-highlight-colour")||""}const x={areCellsHeadings(e){const t=e.filter("th").length;return e.length===t},areCellsHighlighted(e){const t=e.filter("td[data-highlight-colour],th[data-highlight-colour]"),n=t.length;return e.length===n&&function(e){const t=A();let n,o,r;for(n=0,o=e.length;n<o;n++)if(r=e.eq(n).attr("data-highlight-colour")||"",r!==t)return!1;return!0}(t)},getSelectedHighlightColour:A},k=e=>{function t(e){let t,n,o;for(t=0,n=e.length;t<n;t++)o=e.eq(t),o.attr("data-highlight-colour")&&o.removeAttr("data-highlight-colour"),o.attr("title")&&o.removeAttr("title"),o[0].className=o[0].className.replace(/( |^)highlight-[#\w]+/g,"")}e.on("init",function(){const n=function(e){return l()(e.selection.getNode()).closest("th.confluenceTh,td.confluenceTd")},o=function(e){const t=l()(e.getBody()).find("th.confluenceTh[data-mce-selected],td.confluenceTd[data-mce-selected]");return t.length?t:n(e)};e.addCommand("confTableRowToggleHeading",function(){const t=function(e){let t=l()(e.getBody()).find("td[data-mce-selected],th[data-mce-selected]");t.length||(t=l()(e.selection.getNode()));let n=t.closest("tr"),o=n.parent(),r=o.is("tbody")?n.parent().parent():o;for(;0!==n.length&&!r.is(".confluenceTable");)n=r.closest("tr"),o=n.parent(),r=o.is("tbody")?n.parent().parent():o;return n}(this),n=t.children("td,th");return x.areCellsHeadings(n)?e.execCommand("mceTableRowType",!1,{type:"body"}):e.execCommand("mceTableRowType",!1,{type:"header"}),!1}),e.addCommand("confTableColumnToggleHeading",function(){const t=function(e){let t=l()([]);return e.each(function(){const e=l()(this),n=e.index()+1,o=e.closest("table.confluenceTable").children("tbody").children("tr");t=t.add(o.children().nthCol(n))}),t}(o(this));return x.areCellsHeadings(t)?e.execCommand("mceTableColType",!1,{type:"td"}):e.execCommand("mceTableColType",!1,{type:"th"}),!1}),e.addCommand("confTableSelectionToggleHighlight",function(e,n){const r=n&&n.alwaysHighlight,a=o(this);return x.areCellsHighlighted(a)&&!r||l()("#table-highlight-group").attr("data-remove-highlight")?t(a):function(e){let n;t(e),x.getSelectedHighlightColour()&&(n=x.getSelectedHighlightColour(),e.attr("data-highlight-colour",n),e.children().attr("title",""),e.addClass(`highlight-${n}`))}(a),!1}),e.on("KeyDown",t=>{!function(t){if(!t.altKey||38!==t.keyCode&&40!==t.keyCode)return;const n=e.selection.getRng(),o=l()(n.startContainer).closest("td.confluenceTd, th.confluenceTh",".mceContent");if(0===o.length)return;e.execCommand(38===t.keyCode?"mceTableInsertRowBefore":"mceTableInsertRowAfter");let r=o.parent()[38===t.keyCode?"prev":"next"]().find("td:first-child")[0];const a=l()(r);a.hasClass("numberingColumn")&&(r=a.next()[0]),n&&(n.setStart(r,0),n.setEnd(r,0),e.selection.setRng(n)),t.preventDefault()}(t)}),e.on("Click",function(){const t=n(this);t.hasClass("numberingColumn")&&!t.hasClass("confluenceTh")&&e.execCommand("mceTableMoveCaretToNextCell")}),e.on("KeyDown",function(t){if((38===t.keyCode||40===t.keyCode)&&(o=e.selection.getNode(),l()(o).parents("table").is(".confluenceTable"))&&n(this).hasClass("numberingColumn"))return e.execCommand("mceTableMoveCaretToNextCell"),t.preventDefault(),!1;var o},!0)}),e.on("init",function(){l()(e.getBody()).find(".confluenceTd.numberingColumn").attr("contenteditable","false")})},M=function(){const e=h.tinymce.activeEditor;if(this.parent().closest("table.confluenceTable").length)return l()("#table-mode-picker .dropdown-text").text(e.translate("table.responsive")),void l()("#table-mode-picker .aui-dd-parent").addClass("disabled");var t;
6l()("#table-mode-picker .aui-dd-parent").removeClass("disabled"),(t=this).hasClass("fixed-table")||t.hasClass("fixed-width")?l()("#table-mode-picker .dropdown-text").text(e.translate("table.fixed_width")):l()("#table-mode-picker .dropdown-text").text(e.translate("table.responsive"))},E=e=>{e.on("ObjectResizeStart",t=>{const n=t.target;"bar-col"===t.origin&&e.dom.is(n,"table")&&(n.style.width||(n.classList.contains("fixed-table")?(n.classList.remove("fixed-table"),n.classList.add("fixed-width")):n.classList.contains("fixed-width")||n.classList.add("relative-table")),function(e){let t=0;e.find(">tbody >tr").each(function(){let e=0;l()(this).find(">th,>td").each(function(){const t=l()(this);t.attr("colspan")?e+=parseInt(t.attr("colspan")):e++}),e>t&&(t=e)});let n=e.find(">colgroup");const o=n.find("col"),r=o.length;if(r===t)return;const a=n.length>0;if(a||(n=l()("<colgroup>")),t>r)for(let e=0;e<t-r;e++){const e=l()("<col>");n.append(e)}else for(let e=0;e<r-t;e++)o.last().remove();a||e.prepend(n)}(l()(n)))},!0)};const T=function(e){(e=>{e.addCommand("JustifyTop",()=>e.execCommand("mceTableApplyCellStyle",!1,{"vertical-align":"top"})),e.addCommand("JustifyMiddle",()=>e.execCommand("mceTableApplyCellStyle",!1,{"vertical-align":"middle"})),e.addCommand("JustifyBottom",()=>e.execCommand("mceTableApplyCellStyle",!1,{"vertical-align":"bottom"}))})(e)},I=()=>!!u.A.get("collaborative-content")&&D(),D=()=>{const e=u.A.get("content-type");return"page"===e||"blogpost"===e},S=()=>{const e=u.A.get("use-inline-tasks");return"true"===e||!0===e};function N(e){Array.from(e.getBody().querySelectorAll(".confluenceTable.fixed-table >tbody >tr >td, .confluenceTable.fixed-table >tbody >tr >th")).forEach(e=>{e.style.width=""})}function L(){return(0,C.A)(l()),{init(e){e.on("copy",()=>{!0===e.selection.isCollapsed()&&e.getBody().querySelectorAll("th[data-mce-selected],td[data-mce-selected]").length>1&&e.selection.select(e.selection.getNode())},!0),e.on("newcell",function(e){const t=e.node;"TD"===t.nodeName?(t.classList.add("confluenceTd"),t.classList.remove("confluenceTh")):"TH"===t.nodeName&&(t.classList.add("confluenceTh"),t.classList.remove("confluenceTd")),function(e){const t=e.closest("tr");t&&t.firstElementChild!==e&&(e.removeAttribute("contenteditable"),e.removeAttribute("data-mce-resize"),e.classList.contains(F)&&e.classList.remove(F))}(t)}),e.on("BeforeExecCommand",function(t){if(t.command.startsWith("mceTable")){const n=e.selection.getNode().closest("table");if(n&&n.classList.contains("wysiwyg-macro")){const o=n.closest("th.confluenceTh, td.confluenceTd");o?e.selection.setCursorLocation(o):t.preventDefault()}}}),function(e){E(e),l().fn.updateTableModeInToolbar=M,(e=>{const t=(t,n)=>{const o=e.dom.getParent(e.selection.getNode(),"table.confluenceTable");e.undoManager.transact(()=>{o&&o.classList.contains("fixed-table")&&""===e.dom.getStyle(o,"width")&&e.dom.setStyle(o,"width",`${o.offsetWidth}px`),e.execCommand("mceTableSizingMode",!1,t),o&&(o.classList[n]("fixed-width"),o.classList.remove("relative-table"),o.classList.remove("fixed-table"))}),l()("#table-mode-picker .dropdown-text").text(e.translate("table."+("responsive"===t?"responsive":"fixed_width")))};e.addCommand("mceAutoWidth",()=>{t("responsive","remove")}),e.addCommand("mceFixedWidth",()=>{t("fixed","add")})})(e)}(e),(e=>{e.on("BeforeExecCommand",t=>{if("mceInsertTable"===t.command&&!t.value){const n={columns:3,rows:4,options:{headerRows:1}};e.execCommand("mceInsertTable",!1,n),t.preventDefault()}})})(e),k(e),v().get("is-dc-license")&&T(e),I()?l()(window).one("rte-collab-ready",()=>{N(e)}):l()(window).one("rte-ready",()=>{N(e)})}}}var B=n(2069);const R={},O=e=>{if(!R.hasOwnProperty(e)){const t=window.document.querySelector("meta[name=ajs-enabled-dark-features]");if(t){const n=t.content.split(",");R[e]=n.indexOf(e)>-1&&-1===n.indexOf(`${e}.disable`)}}return R[e]};let P;n(192);const j="numbers",F="numberingColumn",_="data-snooker-col-series",z="data-snooker-locked-cols";function U(){const e={table_default_attributes:{class:"confluenceTable"},table_default_styles:{},table_header_type:"cells",table_resize_bars:!0,table_use_colgroups:!0,table_column_resizing:"resizetable",advtable_value_series:{numbers:{update:!0,resizable:!1,generator:function(e){const t=e.prev?e.prev.count:0;
6if("tbody"===e.sectionType&&"td"===e.cellType){const e=t+1;return{value:e,count:e,classes:[F]}}return{count:t,classes:[F]}}}}};return O("editor.table.clone.elements")&&(e.table_clone_elements="strong em b i font h1 h2 h3 h4 h5 h6 p div"),e}function H(e){return"thead"===e.name||"tbody"===e.name||"tfoot"===e.name}function W(e){return function(e){const t=[],n=[e];for(;n.length>0;){const e=n.pop();e&&(H(e)?(n.push(e.next),n.push(e.firstChild)):"tr"===e.name?(t.push(e),n.push(e.next)):n.push(e.next))}return t}(e.firstChild)}function V(e){const t=[];let n=e.firstChild;for(;n;)"td"!==n.name&&"th"!==n.name||t.push(n),n=n.next;return t}function Q(e,t,n){return n.indexOf(e)===t}function Y(e,t,n){const o=(e.attr("class")||"").split(" ").some(function(e){return e.toLowerCase()===F.toLowerCase()});0===n?o&&(t.isSeriesTable=!0,e.attr("contenteditable","false"),t.isResizable||e.attr("data-mce-resize","false"),t.lockedColumns.push(n)):(e.attr("contenteditable",null),e.attr("data-mce-resize",null))}function Z(e){const t=P.options.get("advtable_value_series"),n=t?t[j]:void 0,o=!n||!1!==n.resizable;for(let t=0;t<e.length;t++){const n=e[t];if("wysiwyg-macro"===n.attr("class"))void 0===n.attr("data-mce-resize")&&n.attr("data-mce-resize","false");else if(!n.attr(_)){const e={isResizable:o,isSeriesTable:!1,lockedColumns:[]},t=W(n);for(let n=0;n<t.length;n++){let o=0;const r=V(t[n]);for(let t=0;t<r.length;t++){const n=r[t];Y(n,e,o),o+=parseInt(n.attr("colspan"),10)||1}}if(e.isSeriesTable&&n.attr(_,j),e.lockedColumns.length>0){const t=(n.attr(z)||"").split(",").map(function(e){return parseInt(e,10)}).concat(e.lockedColumns).filter(Q).sort();n.attr(z,t.join(","))}}}}function K(e){return()=>{const t=P.getDoc().querySelectorAll(e);t.length>0&&Array.prototype.forEach.call(t,e=>{e.setAttribute("data-mce-resize","false")})}}function G(e){e.removeAttribute("contenteditable"),e.removeAttribute("data-mce-resize"),e.classList.remove(F)}function q(e){const t=e.textContent?e.textContent.trim():"";return""===t||Number.isInteger(Number(t))&&Number(t)>0}function J(e){const{containValidNumberingColumn:t,hasCssClassNumberingColumn:n}=function(e){let t=!0,n=!1,o=0;const r=e.rows;for(;t&&o<r.length;){const e=r[o].cells[0];q(e)||(t=!1),e.classList.contains(F)&&(n=!0),o++}return{containValidNumberingColumn:t,hasCssClassNumberingColumn:n}}(e);!function(e,t,n){return t&&(e.hasAttribute(z)||e.hasAttribute(_)||n)}(e,t,n)?function(e){const t=e.rows;for(const e of t)for(const t of e.cells)G(t);e.removeAttribute(z),e.removeAttribute(_)}(e):function(e){const t=e.rows;for(const e of t){const t=e.cells[0];t.setAttribute("contenteditable","false"),t.setAttribute("data-mce-resize","false"),t.classList.add(F);for(let t=1;t<e.cells.length;t++)G(e.cells[t])}e.setAttribute(z,"0"),e.setAttribute(_,j)}(e)}function X(e){e.querySelectorAll("table:not(.wysiwyg-macro)").forEach(J)}class ee{constructor(e){var t,n,o;t=this,o=void 0,(n=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(n="userAgent"))in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,this.userAgent=e||window.navigator.userAgent}isFirefox(){return-1!==this.userAgent.indexOf("Firefox/")}notFirefox(){return!this.isFirefox()}isMSEdge(){return-1!==this.userAgent.indexOf("Edge/")}notMSEdge(){return!this.isMSEdge()}isIE(){return-1!==this.userAgent.indexOf("MSIE")||-1!==this.userAgent.indexOf("Trident/")||this.isMSEdge()}notIE(){return!this.isIE()}isChrome(){return-1!==this.userAgent.indexOf("Chrome/")}notChrome(){return!this.isChrome()}isSafari(){return-1!==this.userAgent.indexOf("Safari/")&&-1===this.userAgent.indexOf("Chrome/")}notSafari(){return!this.isSafari()}isPhantom(){return-1!==this.userAgent.indexOf("PhantomJS")}notPhantom(){return!this.isPhantom()}version(){if(this.isIE()){const e=this.userAgent.match(/MSIE\s([\d.]+)/)||this.userAgent.match(/rv:([\d.]+)/)||this.userAgent.match(/Edge\/([\d.]+)/);return parseInt(e[1])}return this.isChrome()?parseInt(this.userAgent.match(/Chrome\/([\d.]+)/)[1]):this.isSafari()?parseInt(this.userAgent.match(/Version\/([\d.]+)/)[1]):this.isFirefox()?parseInt(this.userAgent.match(/Firefox\/([\d.]+)/)[1]):0}friendlyName(){return this.isMSEdge()?"MSEdge":this.isIE()?"IE":this.isChrome()?"Chrome":this.isSafari()?"Safari":this.isFirefox()?"Firefox":void 0}}const te=`${window.location.protocol}//${window.location.host}`,ne=["toolbarfocusmanager","atlassiantheme","auiwindowmanager","table","emotions","confluence","macroplaceholder","customtoolbar","insertwikimarkup","propertypanel","keyboardshortcuts","confmonospace","confcharmap","lists","conflist","tasklist","aePaste","aeTable","tablePasteFilter","pagelayoutplugin","iosediting","autoconvert","deletecommand","draggable","confluencesortabletablesplugin","textplaceholders","linkbrowser","insertfiles","tableAnalytics","aetextpattern","persist_scroll_position","confindentation","preserve-paragraph-formatting-on-delete","tableContentWrapper","statusmacro","macroNavigation","advtable","confluenceresizeimageplugin","dark-theme","confluencewordcount","colorTransformer","duplication-tags-removal","cleanup"];function oe(){const e=new ee;return e.isChrome()&&96==e.version()}let re=!1,ae={},ie={};const se=window.performance,le=e=>`${e}.start`;function ce(e){(e=>{if(!se||!se.mark||!ae[e])return;re||(re=!0);const t=le(e);se.mark(t)})(e),g.A.time(e)}function de(e){(e=>{if(!se||!se.mark||!ae[e])return;const t=le(e);
6if(0===se.getEntriesByName(t,"mark").length)return void g.A.error(`Calling debugTimeEnd for ${e} before debugTime`);const n=(e=>`${e}.end`)(e);se.mark(n),se.measure(e,t,n),ie[e]&&(()=>{if(!re)return;const e=(()=>{const e={},t={name:"",data:e},n=se.getEntriesByType("measure");for(let t=0;t<n.length;t++){const o=n[t],r=o.name;ae[r]&&(e[`${r}.startTime`]=o.startTime,e[`${r}.duration`]=o.duration)}return t})();(0,B.hZ)("analytics",e),re=!1})()})(e),g.A.timeEnd(e)}const ue=function(){return{plugins:["searchreplace","confluenceimagedialog","autocompletemacro","confluencemacrobrowser","confluenceleavecomment","confluencewatch","autoresize"]}},ge=function(e){const t=["searchreplace","confluencedrafts","confluenceimagedialog","autocompletemacro","confluencemacrobrowser","flextofullsize","referrer"];return e&&e.versionComment&&t.push("confluenceversioncomment"),e&&e.notifyWatchers&&t.push("confluencenotifywatchers"),{plugins:t}},me=function(){return{plugins:["searchreplace","confluenceimagedialog","autocompletemacro","confluencemacrobrowser","confluenceleavetemplate","flextofullsize","templateeditor"]}};function pe(){return{renderUI:()=>({iframeContainer:h.tinymce.DOM.get("rte"),editorContainer:document.getElementById("wysiwyg")})}}var fe=n(4266),he=n.n(fe);const be={Formatting:".rte-toolbar-group-formatting",Style:".rte-toolbar-group-style",Indentation:".rte-toolbar-group-indentation",Lists:".rte-toolbar-group-lists",Tasks:".rte-toolbar-group-task-lists",Justification:".rte-toolbar-group-justification",Links:".rte-toolbar-group-link",Table:".rte-toolbar-group-table",Insert:".rte-toolbar-group-insert",Undo:".rte-toolbar-group-undo",PageLayouts:"#page-layout-2-group",SearchReplace:".rte-toolbar-group-searchreplace",Help:".rte-toolbar-group-help"},ye=(e,t,n)=>{!1===t&&((e,t)=>{var n;Array.prototype.forEach.call(null===(n=document.getElementById(e))||void 0===n?void 0:n.querySelectorAll(t),e=>{e.style.display="none"})})(e,n)};var we=n(5289);function ve(){let e=u.A.get("content-id");return+e||(e=u.A.get("page-id")),+e||(e="0"),e}function Ce(){return window.crypto.randomUUID()}let Ae=0;const xe="data-uuid",ke={updateNode(e,t){const n=h.tinymce.activeEditor,o=l()(e,n.getDoc()),r="confluence.update-node-"+Ae++;(0,B.hZ)("synchrony.stop",{id:r});const a=ke.prepareNodeForUpdate(o);return ke.replaceNode(o,t).fail(a).always(()=>{(0,B.hZ)("synchrony.start",{id:r})}).promise()},storeNodeState(e,t){const n={};let o;for(let r=0,a=t.length;r<a;r++)o=t[r],n[o]=e.attr(o);return()=>{for(const t in n)e.attr(t,n[t])}},prepareNodeForUpdate(e){let t;return e.is("img")&&(t=ke.storeNodeState(e,["width","height","src","class"]),e.addClass("image-hotswap").attr({src:`${y.Y}/images/border/spacer.gif`,width:e.attr("width"),height:e.attr("height")})),t},setLIAttributes(e){e.setAttribute(xe,Ce()),null!==e.closest(".inline-task-list")&&e.setAttribute("data-inline-task-id","")},handleInsertion(e){if("LI"===e.nodeName&&null===e.getAttribute(xe))this.setLIAttributes(e);else if(e.children.length>0){const t=Array.from(e.children);for(const e of t)this.handleInsertion(e)}},replaceNode(e,t){const n=ke.getDoc(),o=l()(t,n),r=l()(e,n),a="confluence.replace-node-"+Ae++;return(0,B.hZ)("synchrony.stop",{id:a}),l().Deferred(function(){const e=this;o.is("img")?(o[0].onload=function(){g.A.debug("replaceNode: new node's src has been loaded by the browser."),this.onload=null,e.resolve(this)},h.tinymce.Env.browser.isOpera()&&(o[0].src=o.attr("src")),n.createDocumentFragment().appendChild(o[0])):(o.is("table.wysiwyg-macro")&&o.attr("data-mce-resize","false"),e.resolve(o[0]))}).always(()=>{(0,B.hZ)("synchrony.start",{id:a})}).done(e=>{r.replaceWith(e)}).promise()},replaceSelection(e){const t=h.tinymce.activeEditor,n=t.selection.getRng(),o=t.getDoc().createRange(),r=l()(e).clone(!0,!1)[0];n.deleteContents(),3===n.startContainer.nodeType&&""===n.startContainer.nodeValue&&(n.startContainer.nodeValue=d().HIDDEN_CHAR),n.insertNode(r);const a=t.getDoc().createTextNode(d().HIDDEN_CHAR);t.dom.insertAfter(a,r);const i=a;return o.setStartBefore(i),o.setEndAfter(i),o.collapse(!1),t.selection.setRng(o),r},normalize(e){const t=h.tinymce.activeEditor,n=t.selection.getRng();let o,r,a=null,i=[];if(e&&e.childNodes){if(c()?a=n:h.tinymce.Env.browser.isFirefox()&&n&&(a=n.
6cloneRange(),o={startIndex:Array.from(e.childNodes).indexOf(n.startContainer),startOffset:a.startOffset,endIndex:Array.from(e.childNodes).indexOf(n.endContainer),endOffset:a.endOffset},(o.startIndex>-1||o.endIndex>-1)&&(i=function(e){const t=[];let n=0;return Array.prototype.forEach.call(e.childNodes,(e,o)=>{const r={},a=t[o-1]||{};r.isTextNode=3===e.nodeType,r.textNodesBefore=(r.isTextNode&&a.isTextNode?1:0)+~~a.textNodesBefore,r.precedingTextLength=n,n=r.isTextNode&&e.nodeValue?n+e.nodeValue.length:0,t.push(r)}),t}(e))),e.normalize(),h.tinymce.Env.browser.isFirefox()&&a){if(r=i[o.startIndex]){const t=o.startIndex-r.textNodesBefore,n=o.startOffset+r.precedingTextLength;a.setStart(e.childNodes[t],n)}if(r=i[o.endIndex]){const t=o.endIndex-r.textNodesBefore,n=o.endOffset+r.precedingTextLength;a.setEnd(e.childNodes[t],n)}}a&&t.selection.setRng(a)}},getDoc:()=>h.tinymce.Env.browser.isFirefox()||h.tinymce.Env.browser.isOpera()?document:h.tinymce.activeEditor.getDoc(),isolateSelectedRange(){const e=h.tinymce.activeEditor,t=ke.getDoc(),n=e.selection,o=n.getRng();if(!o)return;const r=o.startContainer,a=o.startOffset,i=o.endContainer;let s,c=o.endOffset;if(o.collapsed)return o;function d(n,o,r){let a,i=e.dom.getParent(n,e.dom.isBlock);i||(i=e.getBody());const s=function(e,n,o,r){let a,i,s=null,c=null;const d=r?"nextSibling":"previousSibling";if(a=0===n,!a&&r&&(a=3===e.nodeType?n===e.length:n===e.childNodes.length),a)for(s=e[d],c=e;null===s;){if(c===o)return;if(c.parentNode===o)break;c=c.parentNode,s=c[d]}else 3===e.nodeType?(i=e.data,e.data=i.slice(n),s=t.createTextNode(i.slice(0,n)),c=e,l()(s).insertBefore(c),r&&(i=c,c=s,s=i)):(c=e.childNodes[n-(r?1:0)],s=c[d]);return[c,s]}(n,o,i,r);return a=s?s[1]?function(e,t,n,o){let r,a,i,s;for(;t!==n&&t.parentNode!==n;){if(a=t.parentNode,r=a.cloneNode(!1),o)for(l()(r).insertAfter(a),i=e;i;)s=i.nextSibling,r.appendChild(i),i=s;else for(l()(r).insertBefore(a),i=a.firstChild;i!==t;)s=i.nextSibling,r.appendChild(i),i=s;e=r,t=a}return t}(s[1],s[0],i,r):s[0]:void 0,a}r===i&&(s=c-a);const u=d(r,a);u&&o.setStartBefore(u),r!==o.startContainer&&(c=s||c);const g=d(i,c,!0);return g&&o.setEndAfter(g),n.setRng(o),o}},Me=ke,Ee=()=>{void 0===window.AJS&&(window.AJS={}),void 0===window.AJS.Rte&&(window.AJS.Rte={...f.Rte}),void 0===window.AJS.Rte.getEditor&&(window.AJS.Rte={...window.AJS.Rte,...f.Rte})};let Te,Ie=!1;const De={_tinyMceHasInit:!1,_beforeInitCallbacks:[],_tinymcePluginInits:[],_settings:null,isInitComplete:()=>De._tinyMceHasInit,isEditorActive:()=>!!(De.isInitComplete()&&i()&&i().activeEditor),onInit:()=>{De._tinyMceHasInit=!0;const e=i().activeEditor;if(e.getBody().classList.add("notranslate"),(0,B.hZ)("init.rte",{editor:e}),!1!==u.A.get("editor-auto-focus")){const t=document.getElementById("content-title");t&&""===t.value?t.focus():r().Rte.editorFocus(e)}else g.A.debug("Bootstrap: editor-auto-focus=false. Do not focus the editor automatically.")},addOnInitCallback:e=>{if("function"!=typeof e)throw new Error(`Attempt made to register an oninit callback that is not a function. Received: ${e}`);De._tinyMceHasInit?e():(0,B.oI)("init.rte",e)},addBeforeInitCallback:e=>{De._beforeInitCallbacks.push(e)},addTinyMcePluginInit:e=>{De._tinymcePluginInits.push(e)},preInitialise:e=>{De._settings=e,Ie&&(Ie=!1,De.initialise(Te))},initialise:e=>{if(ce("confluence.editor.tinymce"),!De._settings)return g.A.error("Bootstrap:initialise: No settings found. Has preInitialise been called?"),Ie=!0,void(Te=e);e={...e};const t={...De._settings};r().Rte.isQuickEdit=e.isQuickEdit||!1,g.A.info(`Bootstrap:initialise: Initialising TinyMce version ${i().majorVersion}.${i().minorVersion}`),De._beforeInitCallbacks.forEach(e=>{e(t)}),(0,B.hZ)("rte-pre-resolveplugins");for(let e=0,n=De._tinymcePluginInits.length;e<n;e++)"function"==typeof De._tinymcePluginInits[e]&&De._tinymcePluginInits[e](t);!function(e){void 0===he()&&g.A.error("ERROR: could not find the TinyMCE language pack");const t=new RegExp(`${he().ctrl_key}\\+`,"g"),n=new RegExp(`${he().shift_key}\\+`,"g"),o=e=>e.replace(t,"â").replace(n,"â§");for(const t in he()){const n=he()[t];if("object"==typeof n)for(const e in n)i().Env.os.isMacOS()&&(n[e]=o(n[e]));i().EditorManager.addI18n(`${e}.${t}`,he()[t])}i().ScriptLoader.markDone(`${i().baseURL}
6/langs/${e}.js`),i().Env.os.isMacOS()&&Array.prototype.forEach.call(document.querySelectorAll("#rte-toolbar .toolbar-item, #rte-toolbar .dropdown-item, #rte-savebar .aui-button"),e=>{const t=e.getAttribute("title"),n=e.dataset.tooltip;t&&e.setAttribute("title",o(t)),n&&(e.dataset.tooltip=o(n))})}(t.locale),((e,t)=>{if(!1===t){const t=document.getElementById(e);return void(t&&(t.style.display="none"))}let n;for(n in t=t||{})t.hasOwnProperty(n)&&be[n]&&ye(e,t[n],be[n])})("toolbar",e.toolbar),t.plugins=function(e,t,n){if(void 0===e)return e;let o;return o="string"==typeof e?e.split(","):e,t.forEach(e=>{o.indexOf(e)<0&&o.push(e)}),o=o.filter(e=>n.indexOf(e)<0),o.join(",")}(t.plugins,"string"==typeof e.plugins?e.plugins.split(","):e.plugins||[],e.excludePlugins||[]),t.setup=function(t){t.on("ListMutation",()=>{const e=t.selection.getNode();Me.handleInsertion(e)}),t.on("NewBlock",e=>{"LI"===e.newBlock.nodeName&&(Me.setLIAttributes(e.newBlock),e.newBlock.classList.remove("checked"))}),t.on("PreInit",()=>{t.dom.loadCSS=function(){};const e=t.getElement();var n;e.value=e.value.replace(/<ul\s+[^>]*\/(\s*)>/gi,""),P=n=t,n.parser.addNodeFilter("table",Z),n.serializer.removeAttributeFilter("data-mce-resize"),n.on("SetContent",K("table.confluenceTable table.confluenceTable:not([data-mce-resize])")),n.on("PastePostProcess",e=>{X(e.node)}),I()&&((0,B.oI)("rte-collab-ready editor-shared-drafts-published editor-shared-drafts-discarded",K("table.wysiwyg-macro:not([data-mce-resize])")),(0,B.oI)("rte-collab-ready",K("table.confluenceTable table.confluenceTable:not([data-mce-resize])")),(0,B.oI)("rte-collab-ready",()=>X(n.getBody())))}),t.on("GetContent",e=>{"html"===e.format&&"<p><br></p>"===e.content&&(e.content="")}),e&&"function"==typeof e.onInitialise&&e.onInitialise(t),Object.defineProperty(t,"settings",{get(){return console.warn("DEPRECATED - tinymce.activeEditor.settings is deprecated, use tinymce.activeEditor.options instead"),this.options}})},t.init_instance_callback=function(e){const n=I();Ee(),i().FocusManager.isEditorUIElement=function(e){let t=e,n=!1;for(;t;){if("rte-toolbar"===t.id){n=!0;break}t=t.parentElement}return n};try{const n=t.contentCssTags,o=e.getDoc().querySelectorAll("head");if(void 0===o[0])throw"No editor <head>";o[0].innerHTML=n+o[0].innerHTML}catch(e){}r().Rte.BootstrapManager.onInit(e),b.editorResetContentChanged();const o=e.iframeElement;o&&(o.setAttribute("tabindex","0"),o.setAttribute("title",(0,we.A)("editor.rich.text.area.title"))),n&&e.on("AddUndo",t=>{const n={level:null,lastLevel:null,originalEvent:t};return e.dispatch("change",n)}),de("confluence.editor.tinymce"),e.on("mousedown",t=>{const n=e.getDoc();if(n.caretPositionFromPoint&&t.target===n.documentElement){const o="confluence.editor.mousedown.outsidecontent";(0,B.hZ)("synchrony.stop",{id:o}),t.preventDefault(),t.stopImmediatePropagation();const{x:r,y:a}=t,i=function(e){const t=window.innerHeight,n=[];let o=!1;for(const r of Array.from(e)){const e=r.getBoundingClientRect();if(0!==e.height)if(e.bottom>0&&e.top<=t)o=!0,n.push(r);else if(o&&e.top>t)break}return n}(e.getBody().children).flatMap(e=>{const t=new Range;return t.selectNodeContents(e),Array.from(t.getClientRects())}),s=i.find(e=>a>=e.top&&a<=e.bottom),l=s?Math.min(r,s.right):r,c=n.caretPositionFromPoint(l,a);c&&(e.focus(),e.selection.setCursorLocation(c.offsetNode,c.offset)),(0,B.hZ)("synchrony.start",{id:o})}},!0),(0,B.hZ)("rte-ready"),n&&(0,B.hZ)("rte-begin-collab-editing"),D()&&e.getBody().classList.add("page-edit")},i().IconManager.add("default",{icons:{}}),i().init(t)}},Se=De,Ne=()=>{void 0!==window.AJS.Rte?void 0===window.AJS.Rte.Content&&(window.AJS.Rte.Content=b):g.A.error("AJS.Rte is supposed to be defined")};function Le(e){const t=e.split(".");let n=window[t.shift()];for(;void 0!==n&&t.length;)n=n[t.shift()];return n}const Be=(e,t,n)=>{var o;if(!n.raw)return!1;if(!(e=>{if(null===e)return!1;const t=["ftp:","file:","http:","https:","ws:","wss:"];try{const n=new URL(e);return!!n&&t.includes(n.protocol)}catch(e){return!1}})(n.raw()))return!1;
6if(null===(o=t.cloneContents)||void 0===o||!o.call(t).textContent)return!1;let r=!0;const a=t.cloneContents();return Array.from(a.querySelectorAll("b,strong,em,i,u,del,s,br")).forEach(e=>e.remove()),Array.from(a.childNodes).forEach(e=>{if(e.nodeType!==Node.TEXT_NODE){if(e.nodeType==Node.ELEMENT_NODE&&e.style.color)return;if(e.nodeType==Node.ELEMENT_NODE&&e.classList.contains("inline-comment-marker"))return;r=!1}}),r},Re=function(e,t){return"<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?l()(e,t||document):l()(`<div>${e}</div>`,t||document).contents()},Oe=function(e,t){e.is("ul.inline-task-list")?t.each(function(){const e=l()(this);e.attr("data-inline-task-id")||e.attr("data-inline-task-id","")}):t.removeAttr("data-inline-task-id").removeAttr("data-pasted-task")},Pe=function(e){const t=3===e.startContainer.nodeType?e.startContainer.parentNode:e.startContainer;return"LI"===t.nodeName&&1===t.childNodes.length&&"BR"===t.firstChild.nodeName},je=function(e,t){if(!t.collapsed||0!=t.startOffset)return!1;const n=l()(t.startContainer).closest("ol, ul",e.getBody());if(0===n.length)return!1;const o=new h.tinymce.dom.TreeWalker(t.startContainer,n[0]).prev(!0);return void 0===o||l()(o).is("li")},$e=function(e){const t=e.filter("ol,ul").length;return e.length===t},Fe=[{shouldInsert(e,t,n){let o=Pe(t);return o=o&&$e(n),o&&n.children("li").length>0},insert(e,t,n){const o=l()(3===t.startContainer.nodeType?t.startContainer.parentNode:t.startContainer),r=n.children();e.undoManager.beforeChange(),e.undoManager.add(),Oe(o.parent(),r),o.replaceWith(r),e.selection.select(r.last()[0],!0),e.selection.collapse(),e.undoManager.add()}},{shouldInsert(e,t,n){let o=je(e,t);return o=o&&$e(n),o&&n.children("li").length>0},insert(e,t,n){const o=l()(t.startContainer).closest("li",e.getBody()),r=n.children();e.undoManager.beforeChange(),e.undoManager.add(),Oe(o.parent(),r),o.before(r),e.selection.select(o[0],!0),e.selection.collapse(!0),e.undoManager.add()}},{shouldInsert:(e,t,n)=>function(e,t){if(!t.collapsed)return!1;if(3===t.startContainer.nodeType&&t.startOffset!=t.startContainer.nodeValue.length)return!1;if(1===t.startContainer.nodeType&&t.startOffset!=t.startContainer.childNodes.length)return!1;const n=l()(t.startContainer).closest("ol, ul",e.getBody());if(0===n.length)return!1;const o=new h.tinymce.dom.TreeWalker(t.startContainer,n[0]).next(!0);return void 0===o||l()(o).is("li")}(e,t)&&n.length===n.filter("ol,ul").length&&n.children("li").length>0,insert(e,t,n){const o=l()(t.startContainer).closest("li",e.getBody()),r=n.children();e.undoManager.beforeChange(),e.undoManager.add(),Oe(o.parent(),r),o.after(r),e.selection.select(r.last()[0],!0),e.selection.collapse(!1),e.undoManager.add()}},{shouldInsert(e,t,n){let o=n.length>1;return o=o&&!Pe(t),o=o&&je(e,t),o=o&&function(e){const t=e.filter("ol,ul"),n=e[e.length-1];return 1===t.length&&t[0]===n}(n),o},insert(e,t,n){const o=l()(t.startContainer).closest("li",e.getBody());e.undoManager.beforeChange(),e.undoManager.add(),Oe(o.parent(),n.children("li"));const r=l()("<li></li>").append(n);o.before(r),e.undoManager.add()}},{shouldInsert:(e,t,n)=>!t.collapsed&&!!l()(t.commonAncestorContainer).is("table.confluenceTable > tbody, table.confluenceTable > tbody > tr")&&n.is("table:not(.wysiwyg-macro)"),insert(e,t,n){const o=n.children("tbody").length>0?n.children("tbody").children("tr"):n.children("tr"),r=o.children("td, th"),a=l()(".mceSelected",e.getDoc()),i=a.parent();function s(e,t){for(let n=e.shift(),o=t.shift();n&&o;n=e.shift(),o=t.shift())l()(o).html(l()(n).html())}if(e.undoManager.beforeChange(),e.undoManager.add(),1===i.length)s(l().makeArray(r),l().makeArray(a));else{const e=l().makeArray(o),t=l().makeArray(i);for(let n=e.shift(),o=t.shift();n&&o;n=e.shift(),o=t.shift())s(l().makeArray(l()(n).children()),l().makeArray(l()(o).children()))}e.selection.setRng(t),e.undoManager.add()}},{shouldInsert:(e,t,n)=>Be(0,t,n),insert(e,t,n){((e,t,n)=>{if(n.raw){const o="confluence.editor.aePaste.inserter";(0,B.hZ)("synchrony.stop",{id:o});const r=e.getDoc().createElement("a");r.setAttribute("href",n.raw()),r.appendChild(t.extractContents()),t.insertN
6ode(r),e.undoManager.add(),(0,B.hZ)("analytics",{name:"confluence.editor.hyperlink.shortcut",data:{pageId:u.A.get("page-id")}}),(0,B.hZ)("synchrony.start",{id:o})}})(e,t,n)}},{shouldInsert:(e,t)=>l()(t.startContainer).closest("[data-macro-body-type='PLAIN_TEXT']").length>0,insert(e,t,n){n.raw&&e.selection.setContent(n.raw())}},{shouldInsert(e,t,n){const o=l()(t.startContainer).closest("table").length>0,r=1===n.length&&n.is("table.wysiwyg-macro");return o&&r},insert(e,t,n){e.execCommand("mceInsertContent",!1,n[0].outerHTML)}},{shouldInsert(e,t,n){const o=l()(t.startContainer).closest("table").is("table.wysiwyg-macro"),r=1===n.length&&n.is("table.confluenceTable");return o&&r},insert(e,t,n){e.execCommand("mceInsertContent",!1,n[0].outerHTML)}}],_e={insert:function(e,t,n){const o=e.selection.getRng();if(!o)return;const r=function(e,t){const n={content:t,format:"html",selection:!0,set:!0};return e.dispatch("BeforeSetContent",n),n.content}(e,t.content),a=Re(r,e.getDoc());a.raw=!!n&&function(){return n};const i=function(e,t,n){let o=null;return Fe.forEach(r=>{if(r.shouldInsert(e,t,n))return o=r,!1}),o}(e,o,a);i?(i.insert(e,o,a),e.dispatch("SetContent",{content:r,format:"html",selection:!0,set:!0}),e.addVisual()):(e.selection.isCollapsed()||e.undoManager.ignore(()=>{e.execCommand("mceDelete",!1,null)}),t.wasProcessed=!0,e.execCommand("mceInsertContent",!1,t))},parse:Re};var ze=n(8536),Ue=n.n(ze);const He=[{light:"#333333",dark:"#b6c2cf",useWithUnknownBackground:!0,token:"--ds-text"},{light:"#707070",dark:"#b6c2cf",useWithUnknownBackground:!0,token:"--ds-text"},{light:"#000000",dark:"#ffffff",useWithUnknownBackground:!0,token:"--ds-text"},{light:"#ffffff",dark:"#000000",useWithUnknownBackground:!1,token:"--ds-text-inverse"},{light:"#172B4D",dark:"#b6c2cf",useWithUnknownBackground:!0,token:"--ds-text"},{light:"#5D1F1A",dark:"#ffd5d2",useWithUnknownBackground:!0,token:"--ds-text-accent-red-bolder"},{light:"#702E00",dark:"#fedec8",useWithUnknownBackground:!0,token:"--ds-text-accent-orange-bolder"},{light:"#533F04",dark:"#f8e6a0",useWithUnknownBackground:!0,token:"--ds-text-accent-yellow-bolder"},{light:"#37471F",dark:"#d3f1a7",useWithUnknownBackground:!0,token:"--ds-text-accent-lime-bolder"},{light:"#164B35",dark:"#baf3db",useWithUnknownBackground:!0,token:"--ds-text-accent-green-bolder"},{light:"#164555",dark:"#c6edfb",useWithUnknownBackground:!0,token:"--ds-text-accent-teal-bolder"},{light:"#09326C",dark:"#cce0ff",useWithUnknownBackground:!0,token:"--ds-text-accent-blue-bolder"},{light:"#50253F",dark:"#fdd0ec",useWithUnknownBackground:!0,token:"--ds-text-accent-magenta-bolder"},{light:"#352C63",dark:"#dfd8fd",useWithUnknownBackground:!0,token:"--ds-text-accent-purple-bolder"},{light:"#44546F",dark:"#9fadbc",useWithUnknownBackground:!0,token:"--ds-text-accent-gray"},{light:"#AE2E24",dark:"#fd9891",useWithUnknownBackground:!0,token:"--ds-text-accent-red"},{light:"#A54800",dark:"#fec195",useWithUnknownBackground:!0,token:"--ds-text-accent-orange"},{light:"#946F00",dark:"#e2b203",useWithUnknownBackground:!0,token:"--ds-chart-yellow-bold-hovered"},{light:"#4C6B1F",dark:"#b3df72",useWithUnknownBackground:!0,token:"--ds-text-accent-lime"},{light:"#216E4E",dark:"#7ee2b8",useWithUnknownBackground:!0,token:"--ds-text-accent-green"},{light:"#206A83",dark:"#9dd9ee",useWithUnknownBackground:!0,token:"--ds-text-accent-teal"},{light:"#0055CC",dark:"#85b8ff",useWithUnknownBackground:!0,token:"--ds-text-accent-blue"},{light:"#943D73",dark:"#f797d2",useWithUnknownBackground:!0,token:"--ds-text-accent-magenta"},{light:"#5E4DB2",dark:"#b8acf6",useWithUnknownBackground:!0,token:"--ds-text-accent-purple"},{light:"#626F86",dark:"#8c9bab",useWithUnknownBackground:!0,token:"--ds-background-accent-gray-bolder"},{light:"#C9372C",dark:"#f87168",useWithUnknownBackground:!0,token:"--ds-background-accent-red-bolder"},{light:"#C25100",dark:"#fea362",useWithUnknownBackground:!0,token:"--ds-background-accent-orange-bolder"},{light:"#CF9F02",dark:"#cf9f02",useWithUnknownBackground:!0,token:"--ds-background-warning-bold-pressed"}
6,{light:"#5B7F24",dark:"#94c748",useWithUnknownBackground:!0,token:"--ds-background-accent-lime-bolder"},{light:"#1F845A",dark:"#4bce97",useWithUnknownBackground:!0,token:"--ds-background-accent-green-bolder"},{light:"#227D9B",dark:"#6cc3e0",useWithUnknownBackground:!0,token:"--ds-background-accent-teal-bolder"},{light:"#0C66E4",dark:"#579dff",useWithUnknownBackground:!0,token:"--ds-background-accent-blue-bolder"},{light:"#AE4787",dark:"#e774bb",useWithUnknownBackground:!0,token:"--ds-background-accent-magenta-bolder"},{light:"#6E5DC6",dark:"#9f8fef",useWithUnknownBackground:!0,token:"--ds-background-accent-purple-bolder"},{light:"#8590A2",dark:"#738496",useWithUnknownBackground:!0,token:"--ds-chart-gray-bold"},{light:"#f87168",dark:"#ae2e24",useWithUnknownBackground:!0,token:"--ds-background-accent-red-subtle"},{light:"#FEA362",dark:"#c25100",useWithUnknownBackground:!0,token:"--ds-background-accent-orange-subtler-pressed"},{light:"#F5CD47",dark:"#f5dc47",useWithUnknownBackground:!0,token:"--ds-background-warning-bold"},{light:"#6A9A23",dark:"#82b536",useWithUnknownBackground:!0,token:"--ds-icon-accent-lime"},{light:"#22A06B",dark:"#2abb7f",useWithUnknownBackground:!0,token:"--ds-icon-success"},{light:"#2898BD",dark:"#42b2d7",useWithUnknownBackground:!0,token:"--ds-icon-accent-teal"},{light:"#1D7AFC",dark:"#388bff",useWithUnknownBackground:!0,token:"--ds-icon-accent-blue"},{light:"#CD519D",dark:"#da62ac",useWithUnknownBackground:!0,token:"--ds-icon-accent-magenta"},{light:"#8270DB",dark:"#8f7ee7",useWithUnknownBackground:!0,token:"--ds-icon-accent-purple"},{light:"#FFFFFF",dark:"#1d2125",useWithUnknownBackground:!1,token:"--ds-text-inverse"},{light:"#FFD5D2",dark:"#42221f",useWithUnknownBackground:!1,token:"--ds-background-accent-red-subtle-pressed"},{light:"#FEDEC8",dark:"#38291e",useWithUnknownBackground:!1,token:"--ds-background-accent-orange-subtle-pressed"},{light:"#F8E6A0",dark:"#533f04",useWithUnknownBackground:!1,token:"--ds-background-accent-yellow-subtlest-hovered"},{light:"#D3F1A7",dark:"#28311b",useWithUnknownBackground:!1,token:"--ds-background-accent-lime-subtle-pressed"},{light:"#BAF3DB",dark:"#1c3329",useWithUnknownBackground:!1,token:"--ds-background-accent-green-subtle-pressed"},{light:"#C6EDFB",dark:"#1e3137",useWithUnknownBackground:!1,token:"--ds-background-accent-teal-subtle-pressed"}
6,{light:"#CCE0FF",dark:"#1c2b41",useWithUnknownBackground:!1,token:"--ds-background-accent-blue-subtle-pressed"},{light:"#FDD0EC",dark:"#3d2232",useWithUnknownBackground:!1,token:"--ds-background-accent-magenta-subtle-pressed"},{light:"#DFD8FD",dark:"#2b273f",useWithUnknownBackground:!1,token:"--ds-background-accent-purple-subtle-pressed"}],We={aqua:"#00FFFF",black:"#000000",blue:"#0000FF",fuchsia:"#FF00FF",gray:"#808080",grey:"#808080",green:"#00FF00",lime:"#32CD32",maroon:"#800000",navy:"#000080",olive:"#808000",orange:"#FFA500",purple:"#800080",red:"#FF0000",silver:"#C0C0C0",teal:"#008080",white:"#FFFFFF",yellow:"#FFFF00"};function Ve(e){e=e.toLowerCase(),/^#?([a-f\d]{1})([a-f\d]{1})([a-f\d]{1})([a-f\d]{1})?$/i.test(e)&&(e=e.split("").map(e=>"#"==e?e:e+e).join(""));const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;/(aqua|black|blue|fuchsia|gray|grey|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)/.test(e)&&(e=We[e]);const n=/[rgb|rgba]\((?<red>\d{1,3}), ?(?<green>\d{1,3}), ?(?<blue>\d{1,3})(, ?[0-9]*[.]?[0-9]+)?\)/i.exec(e);let o;if(n)o={r:parseInt(n[1],10),g:parseInt(n[2],10),b:parseInt(n[3],10)};else{const n=t.exec(e);o=n?{r:parseInt(n[1],16),g:parseInt(n[2],16),b:parseInt(n[3],16)}:null}return o}const Qe={"#000000":"var(--ds-text,#172b4d)","#993300":"var(--ds-text-accent-orange-bolder,#702e00)","#333300":"var(--ds-text-accent-lime-bolder,#37471f)","#003300":"var(--ds-text-accent-green-bolder,#164b35)","#003366":"var(--ds-text-accent-teal-bolder,#164555)","#000080":"var(--ds-text-accent-blue-bolder,#09326c)","#333399":"var(--ds-text-accent-purple-bolder,#352c63)","#333333":"var(--ds-text,#172b4d)","#800000":"var(--ds-text-accent-red-bolder,#5d1f1a)","#ff6600":"var(--ds-background-accent-orange-bolder,#c25100)","#808000":"var(--ds-text-accent-lime,#4c6b1f)","#008000":"var(--ds-text-accent-green,#216e4e)","#008080":"var(--ds-text-accent-teal,#206a83)","#0000ff":"var(--ds-text-accent-blue,#0055cc)","#666699":"var(--ds-text-accent-purple,#5e4db2)","#7a869a":"var(--ds-text-accent-gray,#44546f)","#ff0000":"var(--ds-background-accent-red-bolder,#c9372c)","#ff9900":"var(--ds-background-accent-orange-subtler-pressed,#fea362)","#99cc00":"var(--ds-background-accent-lime-bolder,#5b7f24)","#339966":"var(--ds-background-accent-green-bolder,#1f845a)","#33cccc":"var(--ds-background-accent-teal-bolder,#227d9b)","#3366ff":"var(--ds-background-accent-blue-bolder,#0c66e4)","#800080":"var(--ds-icon-accent-magenta,#cd519d)","#a5adba":"var(--ds-background-accent-gray-bolder,#626f86)","#ff00ff":"var(--ds-icon-accent-magenta,#cd519d)","#ffcc00":"var(--ds-background-warning-bold,#f5cd47)","#ffff00":"var(--ds-background-warning-bold,#f5cd47)","#00ff00":"var(--ds-icon-success,#22a06b)","#00ffff":"var(--ds-icon-accent-teal,#2898bd)","#00ccff":"var(--ds-icon-accent-blue,#1d7afc)","#993366":"var(--ds-background-accent-magenta-bolder,#ae4787)","#c1c7d0":"var(--ds-chart-gray-bold,#8590a2)","#ff99cc":"var(--ds-background-accent-magenta-subtle-pressed,#fdd0ec)","#ffcc99":"var(--ds-background-accent-orange-subtle-pressed,#fedec8)","#ffff99":"var(--ds-background-accent-yellow-subtlest-hovered,#f8e6a0)","#ccffcc":"var(--ds-background-accent-green-subtle-pressed,#baf3db)","#ccffff":"var(--ds-background-accent-teal-subtle-pressed,#c6edfb)","#99ccff":"var(--ds-background-accent-blue-subtle-pressed,#cce0ff)","#cc99ff":"var(--ds-background-accent-purple-subtle-pressed,#dfd8fd)","#ffffff":"var(--ds-text-inverse,#ffffff)"},Ye={};function Ze(e,t){const n=e.style.color;if(n&&!/^(var\(--ds-[\w-]+, ?#[a-fA-F\d]{6}\))/.test(n)){let o=e.style.backgroundColor;o=""!==o?o:t;const r=function(e,t){if(Ye[e])return Ye[e];const n=Ve(e),o=t?Ve(t):null;let r="";if(null===n)return He[0].token;var a,i,s;o&&(a=o.r,i=o.g,s=o.b,r=Math.sqrt(a*a*.299+i*i*.587+s*s*.114)>127.5?"light":"dark");let l,c=He[0];return He.forEach((e,t)=>{let o="dark"===r?e.dark:e.light;o=r||e.useWithUnknownBackground?o:null;const a=o?Ve(o):null;
6if(null!==a){const e=(n.r-a.r)*(n.r-a.r)+(n.g-a.g)*(n.g-a.g)+(n.b-a.b)*(n.b-a.b);(null==l||e<l)&&(c=He[t],l=e)}}),"var("+c.token+", "+c.light+")"}(n,o);if(r){e.style.color=r;let t=e.getAttribute("data-mce-style");t&&(t=t.replace(/color ?:[^";]*/,"color: "+r),e.setAttribute("data-mce-style",t))}}}function Ke(e,t){e.hasAttribute("style")&&Ze(e,t),e.querySelectorAll("[style]").forEach(n=>{let o=e.style.backgroundColor;o=""!==o?o:t,Ze(n,o)})}Object.keys(Qe).forEach(e=>{const t=Ve(e);if(t){const n=Qe[e],o=`rgb(${t.r}, ${t.g}, ${t.b})`;Ye[o]=n}});var Ge=n(6726),qe=n.n(Ge);function Je(e){return l()(e).hasClass("wysiwyg-macro")}function Xe(e,t,n=!0){let o;if(e.macro&&e.contentId)o={type:"POST",url:`${y.Y}/rest/tinymce/1/macro/placeholder`,contentType:"application/json; charset=utf-8",data:JSON.stringify(e),dataType:"text"};else{if(!e.url||!e.type)throw new Error(`illegal argument received: ${e}`);o=e}const r=l().Deferred(),a=h.tinymce.activeEditor;let i,s=!1;if(!t){s=!0;const e=`macro-${(new Date).getTime()}`;i=a.dom.create("span",{id:e});const n=et();if(n){n.after(i);const e=a.selection.getRng();e.setStartAfter(i),e.collapse(!0),a.selection.setRng(e)}else a.selection.setNode(i);t=i=a.dom.select(`#${e}`)[0],r.fail(()=>{l()(i).remove()})}return o.data=function(e,t){let n="";try{const o=JSON.parse(e);if(o.macro)n=o.macro.name;else if(o.wiki&&"string"==typeof o.wiki){const e=/{(\w+)(?=[:}])/,t=o.wiki.match(e);t&&(n=t[1])}if(n){const e=qe().getFunction(n,"manipulateMacroInfoBeforeAutocomplete");if(e){const n=e(o,t);return JSON.stringify(n)}}return e}catch(t){return g.A.error("Failed to parse data",t),e}}(o.data,s),tt(o,t,r,n)}const et=()=>{const e=h.tinymce.activeEditor,t=e.selection.getNode();let n=null;return e.dom.getParent(t,t=>(n=t.hasAttribute("data-mce-bogus")?t:n,t===e.getBody())),n};function tt(e,t,n,o){return l().extend(e,{timeout:ot.DEFAULT_INSERT_MACRO_TIMEOUT}),g.A.debug(`Insert macro timeout = ${e.timeout}`),r().Editor.UI.setButtonsState(!1),l().ajax(e).done(function(e){t?function(e,t,n){let o=e;var r;"<"!==o[0]&&(o=document.createTextNode(o)),(r=t)&&r.parentNode?Me.updateNode(t,o).done(e=>{n.resolve(e,o)}).fail(n.reject):(g.A.error("The node to be replaced has been already deleted from the document"),n.rejectWith(this,Array.from(arguments)))}(e,t,n):g.A.error("There is no node to be replaced!")}).fail(function(e,t,o){!function(e,t,n,o){g.A.error(`Macro placeholder request failed ${t} : '${n}'`),o.rejectWith(this,Array.from(arguments))}(this,t,o,n)}),n.done((e,t)=>{!function(e,t,n){const o=h.tinymce.activeEditor;r().Editor.UI.setButtonsState(!0),Je(e)&&/^(P|H\d|STRONG|EM|B|I|U|SPAN|A|CODE|KBD|SAMP|VAR|SUB|SUP)$/.test(e.parentNode.nodeName)&&o.dom.split(e.parentNode,e),function(e){const t=h.tinymce.activeEditor,n=t.getDoc(),o=t.selection.getRng();if(Je(e)){l()("p, pre",e).each((e,t)=>{0===t.childNodes.length&&t.appendChild(n.createElement("br"))});const r=t.dom.select(".wysiwyg-macro-body",e)[0].firstChild;r?(o.setStart(r,0),o.setEnd(r,0)):g.A.debug("focusMacroNode: couldn't find anything to focus, cap'n!")}else o.setStartAfter(e),o.setEndAfter(e);t.selection.setRng(o)}(e),o.nodeChanged(),d().showElement(e),n?(nt(t),h.tinymce.activeEditor.undoManager.add()):o.undoManager.ignore(()=>{nt(t)}),(0,B.hZ)("macro-browser.macro-inserted")}(e,t,o)}).fail(()=>{r().Editor.UI.setButtonsState(!0)}),n.promise()}function nt(e){h.tinymce.activeEditor.dispatch("SetContent",{content:e,format:"html",selection:!0,set:!0})}const ot={DEFAULT_INSERT_MACRO_TIMEOUT:v().get("macro-placeholder-timeout"),insertMacro:Xe,insertMacroFromExistingContent:function(e,t){let n;if(!(e.macroId&&e.contentId&&e.hostId&&t))throw new Error(`illegal argument received: ${e}`);return n={type:"POST",url:`${y.Y}/rest/tinymce/1/macro/placeholder/storedmacro`,contentType:"application/json; charset=utf-8",data:JSON.stringify(e),dataType:"text"},tt(n,t,l().Deferred(),!1)},isInMacro:e=>l()(e).closest(".wysiwyg-macro").length>0,updateMacro:(e,t,n,o)=>Xe({contentId:ve(),macro:{name:n,params:e,body:t||""}},o)},rt=ot,at=function(e){e.parentNode.removeChild(e)},it=function(e){return function(t){t.classList.remove(...e),""===t.className&&t.removeAttribute("class")}},st=function(e,t,n){h.tinymce.util.Tools.each(e.querySelectorAll(t),n)},lt=function(e){st(e,"li[data-uuid]",e=>{e.removeAttribute("data-uuid"),e.removeAttribute("style")})},ct=function(e){!function(e){var t;st(e,"img:not([data-emoticon-name]):not([data-emoji-id]):not([data-hipchat-emoticon]):not(.editor-inline-macro):not(.confluence-embedded-image):not(.template-constiable)",(t=["confluence-embedded-image","confluence-external-resource"],function(e){const n=e.classList;n.add.apply(n,t)}))}(e),function(e){st(e,"span.Apple-style-span",it(["Apple-style-span"]))}(e),function(e){st(e,"br.Apple-interchange-newline",at)}(e),function(e){st(e,"meta",at)}(e),function(e){st(e,".mceSelected",it(["mceSelected"])),st(e,"[data-mce-selected]",function(e){e.removeAttribute("data-mce-selected")})}(e),function(e){const t=u.A.get("base-url");st(e,`a:not([data-base-url='${t}'])[data-base-url]`,e=>{const n=e.attributes.href?e.attributes.href.value:t;for(;e.attributes.length>0;)e.removeAttribute(e.attributes[0].name);e.setAttribute("href",n)})}(e),lt(e),function(e){st(e,"button",at)}(e),Me.handleInsertion(e),Ue().isEnabled("confluence.dark.theme.text.colors")&&function(e){Ke(e)}(e),function(e){const t=[];
6e.querySelectorAll("[data-macro-name]").forEach(e=>{if(!e.parentElement||null===e.parentElement.closest("[data-hasbody=true]")){const n=e.getAttribute("data-content-id"),o=e.getAttribute("data-macro-id"),r=e.getAttribute("data-host-id"),a=e.getAttribute("data-content-version");if(n&&o&&r&&a){const n=function(e){const t=`phid-${Ce()}`;return e.setAttribute("data-macro-placeholder-id",t),t}(e);t.push(`[data-macro-placeholder-id=${n}]`)}}}),t.length>0&&function(e,t=1){const n=h.tinymce.activeEditor.dom.doc;return n?new Promise(o=>{if(n.querySelectorAll(e).length==t)return o(n.querySelectorAll(e));const r=new MutationObserver(()=>{n.querySelectorAll(e).length==t&&(r.disconnect(),o(n.querySelectorAll(e)))});r.observe(n.body,{childList:!0,subtree:!0})}):Promise.reject("Editor iframe not found")}(t.join(", "),t.length).then(e=>{e.forEach(e=>{const t=e.getAttribute("data-content-id"),n=e.getAttribute("data-macro-id"),o=e.getAttribute("data-host-id"),r=e.getAttribute("data-content-version");if(t&&n&&o&&r){const a={contentId:t,macroId:n,hostId:o,versionId:r};rt.insertMacroFromExistingContent(a,e)}else e.removeAttribute("data-macro-placeholder-id")})})}(e)},dt=function(e){return l()("<br>").add(e.contents())},ut=function(e){let t=!1;return e.parent().contents().each(function(n,o){if(((r=o).nodeType===Node.ELEMENT_NODE||r.nodeType===Node.TEXT_NODE)&&null!==(a=r.textContent)&&void 0!==a&&a.trim())return this===e[0]&&(t=!0,!1);var r,a}),t},gt=function(e){const t=e.attr("style"),n=l()("<p></p>").append(e.contents());t&&n.attr("style",t),l().each(e[0].attributes,function(e,t){n.attr(t.nodeName,t.nodeValue)}),e.replaceWith(n)},mt=gt,pt=[function(e){e.find("span:empty").remove()},function(e){e.find("p + br").remove()},function(e){let t=!1;e.find("div:not(.content-wrapper)").each(function(){const e=l()(this);e.closest("[data-hasbody]").length||(e.find("[data-macro-name]").length?e.find("iframe[data-macro-name]").each(function(){mt(l()(this))}):function(e){return!e.text()&&!e.find("img").length&&!e.find("[data-macro-name]").length}(e)?(e.remove(),t=!0):e.find("div, p, pre").length?e.replaceWith(e.contents()):(t?mt(e):function(e){const t=e.prev("p");t.length?(t.append(dt(e)),e.remove()):ut(e)?gt(e):e.replaceWith(dt(e))}(e),t=!1))})}],ft=function(e){const t=l()("<div></div>").html(e);return pt.forEach(e=>{e(t)}),t.html()},ht=[{repair(e){const t=/(<td.*<\/td>)<br class="Apple-interchange-newline">/.exec(e);return t?`<table class="confluenceTable"><tbody><tr>${t[1]}</tr></tbody></table>`:e}},{repair(e){const t=/(<tr.*<\/tr>)<br class="Apple-interchange-newline">/.exec(e);return t?`<table class="confluenceTable"><tbody>${t[1]}</tbody></table>`:e}}],bt=function(e){return e?(ht.forEach(t=>{e=t.repair(e)}),e):e},yt={apply:function(e){return e=i().activeEditor.parser.parse(e,{forced_root_block:!1}),e=i().html.Serializer().serialize(e),function(e){return ft(e)}(e=bt(e))},repair:bt},wt=e=>{let t=!1;return e=e.replace(/^[\u00a0 ]+/,""),i().util.Tools.each([/^[IVXLMCD]+\.[ \u00a0]/,/^[ivxlmcd]+\.[ \u00a0]/,/^[a-z]{1,2}[.)][ \u00a0]/,/^[A-Z]{1,2}[.)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],n=>{if(n.test(e))return t=!0,!1}),t},vt=e=>/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(e),Ct=(e,t,n,o)=>{const r={},a=e.dom.parseStyle(o);i().util.Tools.each(a,(e,a)=>{switch(a){case"mso-list":const t=/\w+ \w+([0-9]+)/i.exec(o);t&&(n._listLevel=parseInt(t[1],10)),/Ignore/i.test(e)&&n.firstChild&&(n._listIgnore=!0,n.firstChild._listIgnore=!0);break;case"horiz-align":a="text-align";break;case"vert-align":a="vertical-align";break;case"font-color":case"mso-foreground":a="color";break;case"mso-background":case"mso-highlight":a="background";break;case"font-weight":case"font-style":return void("normal"!==e&&(r[a]=e));case"text-decoration":return void("none"!==e&&(r[a]=e));case"mso-element":if(/^(comment|comment-list)$/i.test(e))return void n.remove()}0!==a.indexOf("mso-comment")?0!==a.indexOf("mso-")&&t&&t[a]&&(r[a]=e):n.remove()}),/(bold)/i.test(r["font-weight"])&&(delete r["font-weight"],n.wrap(new(i().html.Node)("b",1))),/(italic)/i.test(r["font-style"])&&(delete r["font-style"],n.wrap(new(i().html.Node)("i",1))),/(underline)/i.test(r["text-decoration"])&&n.wrap(new(i().html.Node)("u",1)),/(line-through)/i.test(r["text-decoration"])&&n.wrap(new(i().html.Node)("s",1)),r["text-decoration"]&&delete r["text-decoration"];return e.dom.serializeStyle(r,n.name)||null},At=(e,t)=>{let n;t=((e,t)=>(i().util.Tools.each(t,t=>{e=t.constructor===RegExp?e.replace(t,""):e.replace(t[0],t[1])}),e))(t,[/<br class="?Apple-interchange-newline"?>/gi,/<b[^>]+id="?docs-internal-[^>]*>/gi,/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s/>]))[^>]*>/gi,[/<(\/?)strike>/gi,"<$1s>"],[/ /gi,"Â "],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,(e,t)=>t.length>0?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join("Â "):""]]);const o=i().html.Schema({valid_elements:"-strong/b,-em/i,-u,-s,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody",valid_children:"-li[p]"});i().util.Tools.each(o.elements,e=>{e.attributes.class||(e.attributes.class={},e.attributesOrder.push("class")),e.attributes.style||(e.attributes.style={},e.attributesOrder.push("style"))});const r=i().html.DomParser({},o);r.addAttributeFilter("style",t=>{let o,r=t.length;for(;r--;){var a;o=t[r],o.attr("style",Ct(e,n,o,o.attr("style"))),"span"!==o.name||!o.parent||null!==(a=o.attributes)&&void 0!==a&&a.length||o.unwrap()}}),r.addAttributeFilter("class",e=>{let t,n,o=e.length;for(;o--;)t=e[o],n=t.attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&t.remove(),t.attr("class",null)}),r.addNodeFilter("del",e=>{let t=e.length;for(;t--;)e[t].remove()}),r.addNodeFilter("a",e=>{let t,n,o,r=e.length;for(;r--;)if(t=e[r],n=t.attr("href"),o=t.attr("name"),n&&-1!==n.indexOf("#_msocom_"))t.remove();else if(n&&0===n.indexOf("file://")&&(n=n.split("#")[1],n&&(n="#"+n)),n||o){if(o&&!/^_?(?:toc|edn|ftn)/i.test(o)){t.unwrap();continue}t.attr({href:n,name:o})}else t.unwrap()});const a=r.parse(t);return(e=>{let t,n,o=1;const r=e=>{let t="";if(3===e.type)return e.value;if(e=e.firstChild)do{t+=r(e)}while(e=e.next);return t},a=(e,t)=>{if(3===e.type&&t.test(e.value))return e.value=e.value.replace(t,""),!1;if(e=e.firstChild)do{if(!a(e,t))return!1}while(e=e.next);return!0},s=e=>{if(e._listIgnore)e.remove();else if(e=e.firstChild)do{s(e)}while(e=e.next)},l=(e,r,l)=>{const c=e._listLevel||o;var d,u,g;c!==o&&(c<o?t&&(t=null===(d=t.parent)||void 0===d?void 0:d.parent):(n=t,t=null)),t&&t.name===r?t.append(e):(n=n||t,t=new(i().html.Node)(r,1),l>1&&(null===(g=t)||void 0===g||g.attr("start",""+l)),e.wrap(t)),e.name="li",c>o&&n&&(null===(u=n.lastChild)||void 0===u||u.append(t)),o=c,s(e),a(e,/^\u00a0+/),a(e,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),a(e,/^\u00a0+/)},c=[];let d=e.firstChild;for(;null!=d;)if(c.push(d),d=d.walk(),null!==d)for(;void 0!==d&&(null===(u=d)||void 0===u?void 0:u.parent)!==e;){var u,g;d=null===(g=d)||void 0===g?void 0:g.walk()}for(let o=0;o<c.length;o++)if("p"===(e=c[o]).name&&e.firstChild){const n=r(e);
6if(vt(n)){l(e,"ul");continue}if(wt(n)){const t=/([0-9]+)\./.exec(n);let o=1;t&&(o=parseInt(t[1],10)),l(e,"ol",o);continue}if(e._listLevel){l(e,"ul",1);continue}t=null}else n=t,t=null})(a),i().html.Serializer({validate:!1},o).serialize(a)};function xt(e,t,n,o){return"function"==typeof o?l()(e).on(t,n,o):l()(e).on(t,n)}function kt(e,t,n){return l()(e).off(t,n)}function Mt(e,t,n){return l()(e).trigger(t,n)}function Et(e){const t={repair:yt.repair,parse:_e.parse};let n=null;e.on("PastePreProcess",n=>{n.content=((e,t)=>{const n=(e=>/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument/i.test(e)||/class="OutlineElement/.test(e)||/id="?docs-internal-guid-/.test(e))(t)?((e,t)=>At(e,t))(e,t):t;return n})(e,n.content),n.content=yt.apply(n.content),Mt(document,"prePaste",[t,n])}),e.on("PastePostProcess",e=>{ct(e.node),Mt(document,"postPaste",[t,e])}),e.on("BeforeExecCommand",t=>{const o=t.command,r=t.value;"mceInsertContent"===o&&r&&!0===r.paste&&!r.wasProcessed&&(t.preventDefault(),_e.insert(e,r,n))}),e.on("paste",e=>{n=null;const t=(e.clipboardData.getData("text/plain")||"").replace(/</g,"<").replace(/>/g,">").replace(/(?:\r\n|\r|\n)/g,"<br />");n=t},!0)}let Tt;const It=()=>{const e=h.tinymce.activeEditor,t=St();let n;e.focus(!1);const o=e.selection.getRng();n=o&&o.cloneRange&&"function"==typeof o.cloneRange?o.cloneRange():o.duplicate&&o.duplicate()||o,Tt={scrollX:t.scrollX,scrollY:t.scrollY,range:n}},Dt=()=>{const e=h.tinymce.activeEditor.selection,t=h.tinymce.activeEditor.getWin();Tt&&(Nt(Tt),t.focus(),e.setRng(Tt.range)),Tt=null},St=()=>{const e=h.tinymce.DOM.getViewPort(h.tinymce.activeEditor.getWin());return{scrollX:e.x,scrollY:e.y}},Nt=e=>{e&&h.tinymce.activeEditor.getWin().scrollTo(e.scrollX,e.scrollY)},Lt={storeBookmark:It,restoreBookmark:Dt,getScroll:St,restoreScroll:Nt},Bt=function(e){return e.replace(/[&"'<>`]/g,e=>{const t={"<":"<",">":">","&":"&","'":"'","`":"`"};return"string"==typeof t[e]?t[e]:"""})};function Rt(){return{component:function(e){const t=new(r().Dialog)(e);return e=e||{},e=l().extend({},{keypressListener:n=>{27===n.keyCode?(g.A.debug("dialog.js: escape keydown caught"),l()(".aui-dropdown",t.popup.element).is(":visible")||("function"==typeof e.onCancel?e.onCancel():t.hide())):13!==n.keyCode||(g.A.debug("dialog.js: enter keydown caught"),l()(".aui-dropdown",t.popup.element).is(":visible"))||"textarea"!=(n.target.nodeName&&n.target.nodeName.toLowerCase())&&"function"==typeof e.onSubmit&&setTimeout(e.onSubmit)},width:865,height:530},e),document.addEventListener("hideLayer",(n,o,r)=>{"popup"==o&&r==t&&"function"==typeof e.onCancel&&e.onCancel()}),t},initialiser:function(e){(0,B.oI)("show.dialog",(e,t)=>{const n=u.A.get("page-id"),o=u.A.get("space-key"),a=u.A.get("editor-mode"),i=u.A.get("new-page");r().EventQueue=r().EventQueue||[],r().EventQueue.push({name:t.dialog.id,properties:(()=>{const e={};return n&&(e.pageid=n),o&&(e.spacekey=o),a&&(e.editormode=a),i&&(e.newpage=i),e})()})}),document.addEventListener("showLayer",(t,n,o)=>{h.Confluence.runBinderComponents(),"popup"==n&&o&&(t=>{const n=e(t);let o;if(n.attr("data-lasttab-override"))return;n.attr("data-tab-default")&&(o=n.attr("data-tab-default"));const r=h.Confluence.storageManager(n.attr("id")),a=r.getItem("last-tab"),i=null!=a?a:o;i&&e(`.page-menu-item:visible:eq(${i}) button`,n).click(),n.attr("data-lasttab-bound")||(e(".page-menu-item",n).each((t,n)=>{e(n).click(()=>{r.setItem("last-tab",t)})}),n.attr("data-lasttab-bound","true"))})(o.element)}),r().Dialog.prototype.overrideLastTab=()=>{e(this.popup.element).attr("data-lasttab-override","true")},r().Dialog.prototype.addHelpText=t=>{if(!t)return;
6const n=Bt(String(t)),o=this.page[this.curpage];o.buttonpanel||o.addButtonPanel();const r=e("<div class='dialog-tip'></div>").html(n);o.buttonpanel.append(r),e("a",r).click(()=>{const e=window.open(this.href,"_blank");return e&&e.focus(),e&&e.opener&&(e.opener=null),!1})},r().Dialog.prototype.getTitle=()=>e(`#${this.id}.dialog-components:visible h2`).text(),r().Dialog.prototype.isVisible=()=>e(`#${this.id}`).is(":visible")}}}function Ot(){return{init:e=>{e.on("init",()=>{e.windowManager=Pt(e)})},getInfo:()=>({longname:"AUIWindowManager",author:"Atlassian",authorurl:"http://www.atlassian.com",version:`${h.tinymce.majorVersion}.${h.tinymce.minorVersion}`})}}function Pt(e){const t=[],n={};let o=0;const r=e.windowManager,a=(a,l)=>{if(a.title===e.translate("Accessibility Checker"))return r.open(a,l);i(a=a||{}),(l=p(l=l||{})).mce_width=a.width,l.mce_height=a.height,l.mce_auto_focus=a.auto_focus;let g=a.height;a.name&&(g+=56),(l.cancelLink||l.buttons)&&(g+=51),g+=40,a.popup&&(g+=8);const m=a.id||h.tinymce.DOM.uniqueId(),f=(new Rt).component({width:a.width,height:g,id:m,onCancel:()=>{f.hide().remove()}});a.name&&f.addHeader(e.translate(a.name)),s(f,l,m),a.file=a.file||a.url,a.file&&(a.file=a.file),c(f,a,l,m),l.helpLink&&u(f,l.helpLink,l.helpName||"",m),l.hintText&&d(f,l.hintText,m);const b={id:m,settings:a,params:l,dialog:f};return t.push(b),n[m]=b,o++,It(),f.show(),null!=f.takeFocus&&f.takeFocus(),m},i=e=>{e.width=parseInt((e.width||400).toString(),10),e.height=parseInt((e.height||250).toString(),10),e.resizable=!1,null==e.popup&&(e.popup=!0),e.popup&&null!=e.content&&(e.popup=!1),e.scrollbars?e.scrollbars="yes":e.scrollbars="no"},s=(t,n,o)=>{if(n.buttons)for(let o=0;o<n.buttons.length;o++){const r=n.buttons[o];t.addButton(e.translate(`${r.label}`),r.action)}n.cancelLink&&t.addCancel(e.translate("auiwindowmanager.cancel"),()=>h.tinymce.activeEditor.windowManager.close(o))},c=(e,t,n,o)=>{const r=f(o),a=`panel_${r}`;t.popup?(e.addPanel(a,l()(`<iframe id="${r}" width="100%" height="${t.height}px" frameborder="0" name="auidialogiframe" src="${t.file}" scrolling="${t.scrollbars}"></iframe>`),n.cssClass),e.takeFocus=()=>{l()(`#${r}`).trigger("focus")}):(null==t.content?(e.addPanel(a,l()(`<div id="${r}"/>`),n.cssClass),l()(`#${r}`).load(t.file)):e.addPanel(a,l()(`<div id="${r}">${t.content}</div>`),n.cssClass),e.takeFocus=()=>{const e=l()(`#${r}:input`);if(e.length)l()(e[0]).trigger("focus");else{const e=l()(`#${r} .button-panel button`);e.length&&l()(e[0]).trigger("focus")}}),e.gotoPanel(0,0)},d=(e,t,n)=>{const o=l()("<div></div>").addClass("dialog-tip");o.text(h.tinymce.activeEditor.translate(`${t}`)),l()(`#${n} .dialog-button-panel`).append(o)},u=(e,t,n,o)=>{const r=l()("<div></div>").addClass("dialog-help-link"),a=`${y.Y}/plugins/tinymce/helplink.action`,i=new URL(a,window.location.href),s=new URLSearchParams;s.append("linkUrlKey",t),s.append("linkNameKey",n),i.search=s.toString(),r.load(i.toString()),l()(`#${o} .dialog-components .dialog-title`).prepend(r)},m=(e,n)=>{for(let o=0;o<t.length;o++){const r=t[o];r.id!=e&&l()(`${r.id} .dialog-button-panel`).toggle(n)}},p=e=>(e.inline=void 0,e.cssClass||(e.cssClass="tinymce-auidialog"),0!=e.cancelLink&&(e.cancelLink=!0),e),f=e=>`content_${e}`,b=e=>`content_busy_${e}`;return{alert:(e,t,n)=>{if("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."===e)return;const o=a({content:`<p>${e}</p>`,width:500,height:160,popup:!1,title:"",buttons:[],body:{type:"panel",items:[]}},{buttons:[{label:"auiwindowmanager.ok",action:function(){h.tinymce.activeEditor.windowManager.toggleOtherDialogs(o,!0),h.tinymce.activeEditor.windowManager.close(o),t&&t.call(n||window)}}],cancelLink:!1,cssClass:"tinymce-auidialog-alert"});m(o,!1)},close:(e,r)=>{let a,i="";var s;"string"==typeof e?i=e:r?i=r:(a=t.pop(),a&&(i=a.id)),n[i]?(o--,a=n[i],null===(s=a)||void 0===s||s.dialog.remove(),n[i]=null,g.A.debug(`Dialog closed, now ${o} dialogs open`),h.tinymce.activeEditor.focus(),Dt()):g.A.error(`Couldn't find id ${i} in dialogs array so dialog is not closed.`)},confirm:(t,n,o,r)=>{r=r||window,null==n||n.call(o||window,r.confirm(this._decode(e.translate(t))))},createBusyContentId:b,createContentId:f,createDialogButtons:s,createDialogContent:c,createHelpLink:u,createHintText:d,createInstance:(e,t,n,o,r,a)=>new(h.tinymce.resolve(e))(t,n,o,r,a),initialiseSettings:i,logMCESelection:e=>{const t=h.tinymce.activeEditor.selection;g.A.debug("******************************"),g.A.debug(`Logging TinyMCE selection title: ${e}`),g.A.debug("Bookmark:"),g.A.debug(t.getBookmark());const n=l()(t.getRng().startContainer).text()||l()(t.getRng().startContainer.parentNode).text();g.A.debug(`Range: ${n}`),g.A.debug(t.getRng())},open:a,openUrl:()=>{const e=()=>{};return{block:e,unblock:e,close:e,sendMessage:e}},resizeBy:()=>{},setBusy:(e,t)=>{const o=n[e],r=`#${b(e)}`,a=`#${f(e)}`,i=l()(a),s=l()(r);if(o)if(t){const t=l()(a);t.hide();const n=t.parent();let o=l()(r,n);o.length||(n.append(l()(`<div id="${r}" class="spinner"></div>`)),o=l()(r,n),h.Raphael.spinner(o[0],50,"#666")),l()(".button-panel button",l()(`#${e}`)).each((e,t)=>{l()(t).prop("disabled",!0)}),l()(o[0]).show()}else s.length&&s.hide(),l()(".button-panel button",l()(`#${e}`)).each((e,t)=>{l()(t).prop("disabled",!1)}),i.show()},toggleOtherDialogs:m}}const jt="autocomplete-container",$t="autocomplete-trigger",Ft="autocomplete-search-text",_t="/",zt="ï¼",Ut={},Ht=e=>(t,n,o)=>{const r=null!=o&&"object"!=typeof o,a=null!=o?r?` = ${o}`:" >":"";g.A.debug(`${e} - ${t} : ${n||null}${a}`),o&&!r&&g.A.debug(o)}
6,Wt=function(e,t){const n=Ht("Autocompleter.Control"),o={},a=e.selection;let i=a.getRng();if(!i)return null;let s=i.startOffset,c=i.startContainer,d=c.nodeValue;const u=t.leadingChar,g=e.getDoc(),m=t.backWords||0,p=t.insertedFromMenu||!1,f=Ut[u||"["]||t.settings,b=f&&void 0!==f.preventStartNodes?f.preventStartNodes:"div.code, a[href], img, pre";if(l()(`#${jt}`,g).length)return n("init","Autocomplete already exists, returning null."),null;o.backWords=m,o.maxResults=t.maxResults||10,null==d&&i.collapsed&&s&&c.childNodes[s-1]&&(c=c.childNodes[s-1],d=c.nodeValue,s=d&&d.length||0);let y="";if(null!=d){y=`${d}`.substring(0,s);let e=c.previousSibling;for(;e&&3===e.nodeType;)y=e.nodeValue+y,e=e.previousSibling}const w=[/([("'<(\u201c\u2018]\[|[\ufeff\u200b\u2014\s\xa0].)$/,/(\([^!])$/];if(f.ch!==_t&&f.ch!==zt&&w.push(/(\/\/)$/),!m&&y&&!function(e,t){for(let n=0,o=t.length;n<o;n++)if(t[n].test(e))return!0;return!1}(y+u,w))return n("init","Cursor is in wrong word location to start autocomplete, returning null."),null;if(l()(c).closest(b).length)return n("init","Cursor is in wrong node to start autocomplete, returning null."),null;if(h.Confluence.PropertyPanel&&h.Confluence.PropertyPanel.current&&(h.Confluence.PropertyPanel.shouldCreate=!1,h.Confluence.PropertyPanel.destroy()),u||null!=d||(n("init","No text available for suggestion, range is",i),d=""),o.getContainer=function(){return l()(`#${jt}`,g)},i.collapsed&&m&&d){const e=function(e,t,n){let o,r;function a(e,t,n){!t.global&&(t=new RegExp(t.source,`g${t.ignoreCase?"i":""}${t.multiline?"m":""}`)),null==n?n=e.length:n<0&&(n=0);const o=e.substring(0,n+1);let r,a=-1,i=0;for(;null!=(r=t.exec(o));)a=r.index,t.lastIndex=++i;return a}for(let i=0;i<n;i++)for(o=e.nodeValue.substring(0,t),t=a(o,/\s+/,t);-1==t;){if(r=e.previousSibling,!r||3!==r.nodeType){i=n;break}e=r,o=r.nodeValue,o&&(t=a(o,/\s+/,o.length))}return{node:e,offset:t+1}}(c,s,m),t=a.getRng();t&&(t.setStart(e.node,e.offset),t.setEnd(c,s),a.setRng(t))}let v;v=a&&a.getNode()&&a.getNode().classList.contains("placeholder-inline-tasks")?"":a.getContent({format:"text"}).replace("\n",""),n("init","suggestionHtml",v);const C=(e,t,n)=>{const o=document.createElement(e);return t&&o.setAttribute("id",t),n&&o.appendChild(document.createTextNode(n)),o},A=C("span",jt);t.classNames&&("string"==typeof t.classNames?A.classList.add(...t.classNames.split(" ")):Array.isArray(t.classNames)&&A.classList.add(...t.classNames)),u&&A.appendChild(C("span",$t,u));const x=C("span",Ft,r().Rte.HIDDEN_CHAR);A.appendChild(x),a.setNode(l()(A)[0]);const k=o.getContainer();o.previousSearchText="",o.settings=f,!1===f.cache||f.cacheManager?!1!==f.cache||f.cacheManager||(f.cacheManager={get:l().noop,put:l().noop}):f.cacheManager=new(r().Confluence.localStorageCacheManager)(f.ch);const M=l()(`#${Ft}`,o.getContainer()),E=l()(g.createElement("span")).text(v||r().Rte.HIDDEN_CHAR);M.empty().append(E),a.select(E[0],!0),a.collapse();const T=function(e){if(o.onBeforeKey&&!o.onBeforeKey(e,o.text()))return h.tinymce.dom.Event.cancel(e),n("before",`blocked by onBeforeKey: ${e.keyCode}`),!1},I=function(e){const t=a.getRng();if(!t)return;const r=o.getContainer(),i=t.startContainer;let s=i.parentNode;3===i.nodeType&&s&&(s=s.parentNode);const l=s?s.parentNode:null,c=l?l.parentNode:null,d=s!==r[0]&&l!==r[0]&&c!==r[0];if(27===e.keyCode||d)n("after","dying because of: "+(d?"outside search span":"escape pressed")),o.die();else if(o.onAfterKey&&!o.onAfterKey(e,o.text()))return h.tinymce.dom.Event.cancel(e),n("after",`blocked by onAfterKey: ${e.keyCode}`),!1},D=function(e){if(o.onKeyPress&&!o.onKeyPress(e,o.text()))return h.tinymce.dom.Event.cancel(e),n("press",`blocked by onKeyPress: ${e.keyCode}`),!1},S=function(e){o.getContainer()[0]!=e.target.parentNode&&(n("click","Clicked outside of autocomplete, closing."),o.die()
6)};e.on("KeyDown",T,!0),e.on("KeyUp",I,!0),e.on("KeyPress",D,!0),e.on("Click",S,!0),o.word="",t.keepAlias?n("init","No suggestion based on previous or selected text"):o.word=v,r().Rte.showElement(k[0]),function(){const e=h.tinymce.DOM.getPos(k[0]),t=k.height();o.left=e.x,o.top=e.y+t}(),o.text=function(e){const t=l()(`#${Ft}`,o.getContainer());return null!=e?(t.text(e),this):(e=r().escapeEntities(t.text())).replace(r().Rte.HIDDEN_CHAR,"")},o.plainText=function(e){const t=l()(`#${Ft}`,o.getContainer());return null!=e?(t.text(e),this):(e=t.text()).replace(r().Rte.HIDDEN_CHAR,"")};const N=function(e,t){const n=o.getContainer();return Wt.replaceWithTextAndGetRange(n,e,t)};return o.replaceWithSelectedSearchText=function(){const e=o.text();return n("replaceWithSelectedSearchText",e),N(e,!1),e},o.die=function(a){if(o.dying)n("die","Already dying, returning.");else{if(o.dying=!0,h.Confluence.PropertyPanel&&(h.Confluence.PropertyPanel.shouldCreate=!0),o.getContainer().length){n("die","Tearing down autocomplete, cleaning up autocompleter");const e=(a||t.backWords||p?"":o.settings.ch)+o.text();i=N(e,!0)}setTimeout(()=>{n("die","Removing autocomplete-control keyboard listeners."),e.off("KeyDown",T),e.off("KeyUp",I),e.off("Click",S),e.off("KeyPress",D)},1),r().Rte.unbindScroll("autocomplete"),l()(document).off("click.autocomplete-outside"),this.onDeath&&this.onDeath()}},r().Rte.bindScroll("autocomplete",()=>{n("scrolling:"),r().Rte.isAnyPartShown(k)?o.onScroll():o.die()}),l()(document).on("click.autocomplete-outside",e=>{const t=e.target&&"rte-insert-date"===e.target.id;l()(e.target).closest("#autocomplete-dropdown, .aui-datepicker-dialog, .ui-datepicker-header").length||t||o.die()}),h.tinymce.activeEditor.on("BeforeExecCommand",e=>{"mceConfSavePage"==e.command&&o.die()}),o.update=function(e){It(),N("",!0),this.settings.update(this,e)},o.removeSpan=function(){o.getContainer().remove()},o};Wt.removeOrphanedControl=function(){const e=l()(h.tinymce.activeEditor.getDoc()),t=e.find(`#${jt}`);if(!t.length)return null;const n=e.find(`#${$t}`).text(),o=e.find(`#${Ft}`).text();return Wt.replaceWithTextAndGetRange(t,o,!1),{leadingChar:n,content:o}},Wt.replaceWithTextAndGetRange=function(e,t,n){if(!e.length)return void g.A.error("replaceWithTextAndGetRange Error: attempting to replace a non-existent element");t=t||"",n=n||!t;const o=h.tinymce.activeEditor;if(!o)return;const a=e[0].parentNode,i=r().Rte.Content.getChildIndex(a,e[0]),s=n?1:0,l=o.selection.getRng();return l.setStart(a,i+s),l.setEnd(a,i+1),e.before(t||r().Rte.HIDDEN_CHAR).remove(),o.selection.setRng(l),l};var Vt=n(9170),Qt=n.n(Vt);const Yt="editor-autocomplete-dropdown-container";let Zt=null,Kt=null,Gt=null,qt=null;const Jt=e=>{if(!Gt)return;const t=".ak-emoji-typeahead-list",n=".ak-emoji-typeahead-item";if(!Gt.find(t).length)return;e.some(e=>"childList"===e.type)&&(tn(Gt,t,n),en(),Xt(Yt,Gt,n,n),Kt=null);const o=Gt.find(".emoji-typeahead-selected");o.length&&nn(o)},Xt=(e,t,n="li",o="li > a")=>{const a=i().activeEditor;if(!a)return;const s=l()('<ul class="assistive" role="listbox"></ul>').attr("id",e);s.css("list-style","none");const c=t.find(n);if(t.find(o).length)c.each((t,n)=>{const o=n.textContent||"",a=l()('<li role="option"></li>').attr("id",`${e}-item-${t}`).text(o);if(0===t){const e=r().I18n.getText("tinymce.autocomplete.resultsAutocomplete",c.length,o);a.attr("aria-label",e)}s.append(a)});else{const n=`${e}-item-not-found`,o=l()('<li role="option"></li>').attr("id",n).text(t.text());s.append(o),l()(a.getBody()).attr("aria-activedescendant",n)}Zt=a.dom.add(a.getDoc().documentElement,s[0]),l()(a.getBody()).attr("aria-owns",e)},en=()=>{var e;null===(e=Zt)||void 0===e||e.remove(),Zt=null},tn=(e,t="ol:not(.top-menu-item)",n="li")=>{const o=e.find(t),r=o.find(n);e.attr("id",Yt),o.attr("role","listbox"),r.attr("role","option"),r.find("a").attr("tabindex","-1"),r.each((e,t)=>{l()(t).attr("id",`${Yt}-item-${e}`)})},nn=e=>{const t=i().activeEditor;if(!Zt||!t)return;const n=()=>{t.getBody().setAttribute("aria-activedescendant",e.attr("id"))};var o;Kt?(null===(o=Zt.querySelector("li"))||void 0===o||o.removeAttribute("aria-label"),n()):setTimeout(n,0),Kt=e},on={onShow:e=>{if(e){if(Gt=e,tn(e),""===e.text()&&e.find("ol").length<=1){const t=e[0];return qt=null!=qt?qt:new MutationObserver(Jt),void qt.observe(t,{attributes:!0,attributeFilter:["class"],childList:!0,subtree:!0})}""!==e.text()&&e.find("ol").length&&Xt(Yt,e)}},moveHandler:nn,hideHandler:()=>{var e;const t=i().activeEditor;if(!Zt||!t)return;const n=t.getBody();n.removeAttribute("aria-activedescendant"),n.removeAttribute("aria-owns"),Kt=null,null===(e=qt)||void 0===e||e.disconnect(),en(),t.dom.remove(t.dom.select(`#${Yt}`))}},rn=(e,t="<strong>{highlight}</strong>")=>{let n,o;
6if(e&&e.length&&e[0]){const r=[];for(let t=0,n=e.length;t<n;t++){const n=e[t];n&&r.push(n.replace(/[.*+?|()[\]{}\\]/g,"\\$"))}n=new RegExp(`(${r.join("|")})`,"gi"),o=String(t).replace(/\{highlight}/g,"$1")}return{safeHighlight(e){if(!e)return e;let t,r;if(n&&o){const a=o.split("$1");t=a[0],r=a[1],e=e.replace(n,"@@@hl@@@$1@@@endhl@@@")}return Bt(e).replace(/@@@hl@@@/gi,t).replace(/@@@endhl@@@/gi,r)}}},an=function(e){if(!(this instanceof an))return new an(e);this.cache={},this.cacheStack=[],this.cacheSize=e||30};an.prototype.get=function(e){const t=this.cache[e];if(!t)return;const n=this.cacheStack[this.cacheStack.length-1][0]+1;return t.weight=n,this.cacheStack.push([n,e]),t.value},an.prototype.put=function(e,t){const n=this.cacheStack.length?this.cacheStack[this.cacheStack.length-1][0]+1:0;let o,r,a;for(this.cache[e]={weight:n,value:t},this.cacheStack.push([n,e]);this.cacheStack.length>this.cacheSize;)o=this.cacheStack.shift(),r=o[0],a=o[1],r===this.cache[a].weight&&delete this.cache[a]},an.prototype.clear=function(){this.cache={},this.cacheStack=[]};const sn=an,ln=function(e,t){const n=e.options;n.ajsDropDownOptions=n.ajsDropDownOptions||{};const o=(n.ajsDropDownOptions.Highlighter||rn)(t.queryTokens||[t.query]);n.ajsDropDownOptions.alignment||(n.ajsDropDownOptions.alignment="left"),n.ajsDropDownOptions.selectionHandler=n.ajsDropDownOptions.selectionHandler||cn,function(e){const t=e.dd;t&&(t.hide(),t.$.remove())}(e);const r=e.dd=Qt()(t.matrix,n.ajsDropDownOptions)[0];if(n.ajsDropDownOptions.className&&r.$.addClass(n.ajsDropDownOptions.className),r.$.find("li a:not(.dropdown-prevent-highlight) span").each(function(){const e=l()(this);e.html(o.safeHighlight(e.text()))}),r.$.hasClass("fabric")){const e=r.$.find(".insert-mentions-dropdown-option");e.length===t.matrix[0].length&&t.matrix[0].forEach((t,n)=>{let r=o.safeHighlight(t.username);if(!r)return;t.lozenge&&(r+=` · ${t.lozenge}`);const a=l()("<span>").addClass("dropdown-lozenge").html(`\n${r}`);e.eq(n).append(a)})}return n.dropdownPlacement?n.dropdownPlacement(r.$):(g.A.debug("No dropdownPlacement function specified. Appending dropdown to the body."),l()("body").append(r.$)),function(e){let t=e.$.closest(".aui-dd-parent").width();t||(e.$.width("25em"),t=e.$.width()),l()("a span:not(.icon)",e.$).each(function(){const e=l()(this),n=document.createElement("var");n.innerHTML="…";const o=l()(n),r=o.width();let a=!1;e.wrapInner(l()("<em>")),l()("em",e).each(function(){const e=l()(this);if(e.show(),this.offsetLeft+this.offsetWidth+r>t-20){const n=this.childNodes;let o=!1;for(let e=n.length-1;e>=0;e--){const a=n[e];let i=1;const s=3===a.nodeType?"nodeValue":"innerHTML",l=a[s];do{if(!(i<=l.length))break;a[s]=l.substr(0,l.length-i++)}while(this.offsetLeft+this.offsetWidth+r>t-20);if(i<=l.length){o=!0;break}}o?a=!0:e.hide()}}),a&&(e.append(o),this.elpss=o)})}(r),function(e){l()("a span:not(.icon)",e.$).each(function(){const e=l()(this);let t;try{const n=e.data("properties");t=n?n.spaceName:null}catch(e){g.A.error("Problem getting space name: ",e.message)}let n=e.text();t&&(n+=` (${l()("<i></i>").html(t).text()})`),e.attr("title",n)})}(r),n.dropdownPostprocess&&n.dropdownPostprocess(r.$),r.show(e._effect),"function"==typeof n.onShow&&n.onShow.call(r,r.$),r},cn=function(e,t){if("click"==e.type)return;const n=l()("a",t).first(),o=n.attr("href");if("keydown"===e.type&&(e.metaKey||e.ctrlKey)&&13===e.which){const e=window.open(o,"_blank");e&&e.opener&&(e.opener=null)}else n.trigger("click"),document.location=o;e.preventDefault()};function dn(e,t){this._effect="appear",this._timer=null,this.id=e,this.options=t,this.inactive=!1,this.busy=!1,this.cacheManager=sn()}let un,gn;dn.prototype.clearCache=function(){this.cacheManager.clear()},dn.prototype.change=function(e,t,n){const o=this;if(e!=o._value){o._value=e,o.busy=!1,window.clearTimeout(o._timer);const r=o.options.minLengthForGetData||2,a=new RegExp(`\\S{${r},}`);if(t||a.test(e)){const t=o.cacheManager.get(e);if(t)ln(o,t);else{o.busy=!0;const t=function(){o.options.getDataAndRunCallback.call(o,e,function(){o.show.apply(this,arguments),n&&n(e)})};0===o.options.dropDownDelay?t():o._timer=window.setTimeout(()=>{t()},o.options.dropDownDelay||200)}}else o.dd&&o.dd.hide(),n&&n(e)}},dn.prototype.hide=function(){this.dd&&this.dd.hide()},dn.prototype.remove=function(){const e=this.dd;e&&(this.hide(),e.$.remove()),this.inactive=!0,this.options.onDeath&&this.options.onDeath()},dn.prototype.show=function(e,t,n){if(this.inactive)return void g.A.error("Quick search abandoned before server response received, ignoring. ",this);const o={matrix:e,query:t,queryTokens:n};this.cacheManager.put(t,o),ln(this,o),this.busy=!1},Ht("Autocompleter.Manager");const mn=function(e){const t="confluence.autocomplete-plugin",n=Ut[e.leadingChar];if(e=l().extend({minLengthForGetData:n.minLengthForGetData,displayHandler:n.displayHandler,Highlighter:n.Highlighter,classNames:n.autocompleteClassNames},e),un=Wt(h.tinymce.activeEditor,e),!un)return!1;let o=e.insertedFromMenu?(new Date).getTime():null;function a(e){return l().data(e,"properties")}(0,B.hZ)("synchrony.stop",{id:t});const i=l()(window).width();let s;const c=function(e){let t=l()("#autocomplete-dropdown");const n=un.getContainer();let o,a;t.length||(t=l()("<div></div>").addClass("aui-dd-parent quick-nav-drop-down").attr("id","autocomplete-dropdown").appendTo("body"));const c=r().Position.spaceAboveBelow(r().Rte.getEditorFrame(),n);e.find("ol:empty").hide(),t.append(e);
6const d=r().Rte.Content.offset(n),u=Math.max(t.width()+d.left-i+10,0),g=d.left-u-0,m=e.outerHeight(!0),p=m+10;s&&(function(e,t){return 1==s?e.above>=t:e.below>=t}(c,p)||(s=null)),s||(s=function(e,t){return e.below>=t?2:e.above>=t?1:e.below>e.above?2:1}(c,p)),a=t.find(".autocomplete-dropdown-arrow"),a.length||(a=l()("<div>").addClass("autocomplete-dropdown-arrow").addClass(un.settings.autocompleteClassNames)),1===s?(a.addClass("autocomplete-dropdown-bottom-arrow").css({top:m-1}),o=d.top-m-10):(a.removeClass("autocomplete-dropdown-bottom-arrow").css("top",""),o=d.top+n.height()+10),a.css({left:u}).appendTo(t),t.css({position:"absolute",top:o,left:g})};gn=(e=>new dn("inputdriven-dropdown",e))({onShow(e){on.onShow(e),(0,B.hZ)("rte-autocomplete-on-show",{triggerChar:un.settings.ch});const t=r().Rte.getEditorFrame();t&&t.shim&&t.shim.hide(),this.reset(),un.settings.selectFirstItem&&e.find("a").length&&Qt().current.moveDown(),un.headingText&&e.prepend(`<h2 id='titleForSR' class='top-menu-item top-menu-title'>${un.headingText}</h2>`),un.settings.onShow&&un.settings.onShow()},dropdownPlacement:c,onDeath(){l()("#autocomplete-dropdown").remove(),un.settings.onDeath&&un.settings.onDeath()},ajsDropDownOptions:{selectionHandler:function(e,t){e.preventDefault();const n=a(t[0]);n&&"function"==typeof n.callback?n.callback(un):un.update(n),un.die()},moveHandler:function(e){on.moveHandler(e)},hideHandler:on.hideHandler,className:`autocomplete ${un.settings.dropDownClassName}`,displayHandler:e.displayHandler,Highlighter:e.Highlighter},getDataAndRunCallback(e){un&&un.settings.getDataAndRunCallback&&un.settings.getDataAndRunCallback(un,e,(t,n,o,r)=>{un.settings.getHeaderText&&(un.headingText=un.settings.getHeaderText(un,e)),t.push(un.settings.getAdditionalLinks(un,e,o)),gn&&gn.show(t,n,r||[n])})},dropDownDelay:un.settings.dropDownDelay,minLengthForGetData:un.settings.minLengthForGetData}),un.onBeforeKey=function(e,t){return 40===e.keyCode||38===e.keyCode||13===e.keyCode?(h.tinymce.dom.Event.cancel(e),!1):8===e.keyCode&&1===(null==t?void 0:t.length)?(e.preventDefault(),null===(n=un)||void 0===n||n.text(""),fn(),!1):!(27===e.keyCode||9===e.keyCode||8===e.keyCode&&!t)||(this.die(8===e.keyCode),!1);var n},un.onKeyPress=function(e,t){const n=String.fromCharCode(e.which);return 13===e.keyCode?(h.tinymce.dom.Event.cancel(e),!1):(32===e.keyCode&&0===(null==t?void 0:t.length)&&(null===(o=un)||void 0===o||o.die()
6),this.settings.endChars.includes(n)&&(null===(r=un)||void 0===r||r.die()),!0);var o,r};const d=e.minLengthForGetData||2,u=new RegExp(`\\S{${d},}`);un.onAfterKey=function(e,t){if(40===e.keyCode||38===e.keyCode||13===e.keyCode){const t=Qt().current;return!(!t||(-1==t.getFocusIndex()&&13===e.keyCode?(pn(),0):(e.which||(e.which=e.keyCode),o&&"Enter"===e.code&&"keyup"===e.type&&e.timeStamp-o<500?(o=null,1):(t.moveFocus(e),1))))}const n=8===e.keyCode&&!t||g(t);return(n||u.test(t))&&gn&&gn.change(t,n),!0};const g=function(e){return/[\u4E00-\u9FFF]/gi.test(e)};return un.onDeath=function(){gn&&(gn.remove(),gn.closing=!0),(0,B.hZ)("synchrony.start",{id:t})},un.onScroll=function(){gn&&gn.dd&&c(gn.dd.$)},un.getCurrentItem=function(){if(!gn||!gn.dd)return null;const e=gn.dd,t=e.getFocusIndex();return t<0?null:a(e.links[t])},gn&&gn.change(un.text(),!0),!0},pn=function(){var e;null===(e=un)||void 0===e||e.die(),un=null},fn=function(){const e=Wt.removeOrphanedControl();e&&hn.shortcutFired(e.leadingChar)},hn={getInputDrivenDropdown:()=>gn,triggerListener(e){if(e.metaKey)return;gn&&gn.closing&&(gn=null);const t=String.fromCharCode(e.which);!gn&&t in Ut&&mn({leadingChar:t})&&h.tinymce.dom.Event.cancel(e)},shortcutFired(e,t,n){let o=t?0:1;return gn&&gn.closing&&(gn=null),gn&&(o=t?0:un.backWords+1,pn()),mn({leadingChar:e,backWords:o,insertedFromMenu:n})},reattach:fn,die:()=>{var e,t;null===(e=un)||void 0===e||e.text(""),null===(t=un)||void 0===t||t.removeSpan(),pn()},getAutocompletePlaceholder:()=>{const e=h.tinymce.activeEditor;return e?e.dom.get(jt):null},repositionDropdown:()=>{var e;null===(e=un)||void 0===e||e.onScroll()}};var bn=n(2659),yn=n(2994),wn=n.n(yn);const vn=(e,t)=>{Ut[e]=t},Cn=(e,t,n)=>`<a href="#" class="${t||""}"><span class="icon ${n||""}"></span><span>${e}</span></a>`,An=function(e,t,n,o,r){let a;if(e.statusMessage)a=[[{html:e.statusMessage,className:"error"}]];else{const n=t?wn().REST.makeRestMatrixFromSearchData(e):wn().REST.makeRestMatrixFromData(e,o);a=wn().REST.convertFromRest(n)}n(a,t,function(e,t){r&&"function"==typeof r&&r(a,e,t)})},xn=(e,t,n,o,r,a,i)=>{const s=t(o),c=e.settings.cacheManager,d=c.get(o);let u;s?(u=l().ajax({type:"GET",url:s,data:n(e,o),dataType:"json",global:!1,timeout:5e3}),u.done(e=>{c.put(o,e)}),d?An(d,o,r,a,i):(u.done(e=>{An(e,o,r,a,i)}),u.fail((e,t)=>{"timeout"==t&&An({statusMessage:"Timeout",query:o},o,r,a)}))):r([],o)};var kn=n(5072),Mn=n.n(kn),En=n(7825),Tn=n.n(En),In=n(7659),Dn=n.n(In),Sn=n(5056),Nn=n.n(Sn),Ln=n(540),Bn=n.n(Ln),Rn=n(1113),On=n.n(Rn),Pn=n(9002),jn={};function $n(e){e.on("PostRender",()=>{g.A.info("Autocomplete enabled, adding keyPress listener"),e.on("keypress",hn.triggerListener,!0),(0,B.hZ)("ready-editor-autocomplete")}
6),e.on("Undo",hn.reattach),e.on("Redo",hn.reattach)}jn.styleTagTransform=On(),jn.setAttributes=Nn(),jn.insert=Dn().bind(null,"head"),jn.domAPI=Tn(),jn.insertStyleElement=Bn(),Mn()(Pn.A,jn),Pn.A&&Pn.A.locals&&Pn.A.locals,"object"!=typeof window.Confluence&&(g.A.error("Confluence is supposed to be defined"),window.Confluence={}),void 0===window.Confluence.Editor&&(g.A.error("Confluence.Editor is supposed to be defined"),window.Confluence.Editor={}),window.Confluence.Editor.Autocompleter={Settings:Ut,log:Ht,Util:{dropdownLink:Cn,getRestData:xn},Control:Wt,Manager:hn},(0,bn.A)("confluence-editor/tinymce3/plugins/autocomplete/autocomplete-manager",()=>hn),(0,bn.A)("confluence-editor/tinymce3/plugins/autocomplete/autocomplete-settings",()=>({Settings:Ut,log:Ht}));var Fn=n(6990);const _n=e=>e?`${y.Y}/rest/prototype/1/search.json`:u.A.get("remote-user")?`${y.Y}/rest/prototype/1/session/history.json`:null,zn=(e,t)=>{const n={"max-results":e.maxResults};return t&&(n.query=(0,Fn.unescapeEntities)(t),n.search="name",n.preferredSpaceKey=u.A.get("space-key")),n};function Un(e){e.addCommand("mceConfAutocompleteLink",()=>(hn.shortcutFired("["),!1)),e.addShortcut("meta+shift+k",e.translate("AutoCompleteLink"),"mceConfAutocompleteLink"),vn("[",{ch:"[",cache:!1,endChars:["]"],dropDownClassName:"autocomplete-links",selectFirstItem:!0,getHeaderText:()=>(0,we.A)("editor.autocomplete.links.header.text"),getAdditionalLinks(e,t,n){let o;if(t){const e=(0,we.A)("editor.autocomplete.links.dialog.search");o=r().format(e,t)}else o=(0,we.A)("editor.autocomplete.links.dialog.search.no.text");const a=h.Confluence.Editor.LinkBrowser,i=[{className:"search-for",name:o,href:"#",callback(e){e.replaceWithSelectedSearchText();const t=a.open({panelKey:a.SEARCH_PANEL});t.doSearch(t.getLocationPresenter().getRawLinkText())}},{className:"dropdown-insert-link",html:Cn((0,we.A)("editor.autocomplete.links.web.link"),"dropdown-prevent-highlight","editor-icon"),callback(e){e.replaceWithSelectedSearchText(),a.open({panelKey:a.WEBLINK_PANEL})}}];return n&&n(t,i),i},getDataAndRunCallback(e,t,n){xn(e,_n,zn,t,n,"content",function(e,t,n){t&&(e.length<2||!function(){const n=e[1][0].restObj;return"page"===n.type&&n.space.key==u.A.get("space-key")&&n.title.toLowerCase()===t.toLowerCase()}())&&n.push({className:"insert-create-page-link",html:Cn((0,we.A)("editor.autocomplete.links.create.link"),"dropdown-prevent-highlight","editor-icon"),callback(e){const n=(0,Fn.unescapeEntities)(t),o=h.Confluence.Link.createLinkToNewPage(n,u.A.get("space-key"));e.update(o)}})})},update(e,t){(0,B.hZ)("rte-autocomplete-on-insert",{triggerChar:"["}),t.restObj&&(t=h.Confluence.Link.fromREST(t.restObj)),t&&t.insert()}})}var Hn=n(802),Wn=n.n(Hn);const Vn={storedRange:null,bookmark:null,editedMacroDiv:null,editedMacro:null,getCurrentNode:()=>l()(h.tinymce.activeEditor.selection.getNode()),isMacroDiv:e=>l()(e).hasClass("wysiwyg-macro"),isMacroTag(e){const t=l()(e);return t.hasClass("wysiwyg-macro")||t.hasClass("editor-inline-macro")},isBodylessMacro:e=>l()(e).hasClass("editor-inline-macro"),isMacroWithBody:e=>l()(e).hasClass("wysiwyg-macro"),isMacroStartTag:e=>l()(e).hasClass("wysiwyg-macro-starttag"),isMacroEndTag:e=>l()(e).hasClass("wysiwyg-macro-endtag"),isMacroBody:e=>l()(e).hasClass("wysiwyg-macro-body"),hasMacroBody:e=>"true"==l()(e).attr("macrohasbody"),getNestingMacros(e){const t=l()(e||Vn.getCurrentNode()),n=[];return t.parents(".wysiwyg-macro").each((e,t)=>{n.push(l()(t).attr("data-macro-name"))}),n},logMCESelection(e){const t=h.tinymce.activeEditor.selection;g.A.debug("******************************"),g.A.debug(`Logging TinyMCE selection title: ${e}`),g.A.debug("Bookmark:"),g.A.debug(t.getBookmark());const n=l()(t.getRng().startContainer).text()||l()(t.getRng().startContainer.parentNode).text();g.A.debug(`Range: ${n}`),g.A.debug(t.getRng())},getSelectedMacro(){const e=Vn.getCurrentNode();return g.A.debug(`getSelectedMacro: $selectionNode=${e[0]}`),Vn.isMacroDiv(e)?e:rt.isInMacro(e)},openMacro(e){r().MacroBrowser.open({selectedMacro:e,onComplete:Vn.macroBrowserComplete,onCancel:Vn.macroBrowserCancel})},editMacro(e){const t=l()(e);Vn.editedMacroDiv=t[0];const n=h.tinymce.activeEditor.serializer.serialize(t.clone()[0],{forced_root_block:!1});h.tinymce.activeEditor.selection.select(t[0]),It(),l().ajax({type:"POST",contentType:"application/json; charset=utf-8",url:`${y.Y}/rest/tinymce/1/macro/definition`,data:JSON.stringify({contentId:ve(),macroHtml:n}),dataType:"text",success(e){Vn.openMacro(JSON.parse(e))}})},macroBrowserToolbarButtonClicked(e){const t=h.tinymce.activeEditor,n=Vn.getCurrentNode();It();const o=l().extend({presetMacroName:null,nestingMacros:Vn.getNestingMacros(n),onComplete:Vn.macroBrowserComplete,onCancel:Vn.macroBrowserCancel,mode:"insert",selectedHtml:"",selectedText:""},e);if((!e||e&&!e.ignoreEditorSelection)&&(o.selectedHtml=t.selection.getContent(),o.selectedText=t.selection.getContent({format:"text"})),"function"!=typeof r().MacroBrowser.Model.addMacro)return r().MacroBrowser.open(o);const a=o.presetMacroMetadata&&o.presetMacroMetadata.macroName||o.presetMacroName,i=r().MacroBrowser.getMacroMetadata(a);i?(o.presetMacroMetadata=o.presetMacroMetadata||i,r().MacroBrowser.open(o)):r().MacroBrowser.Rest.fetchMacroMetadataDetail
6s({id:o.presetMacroName,successCallback:e=>{e&&e.details?(r().MacroBrowser.Model.addMacro(e.details),o.presetMacroMetadata=r().MacroBrowser.getMacroMetadata(o.presetMacroName),(0,B.oI)("reset.complete",function e(){r().MacroBrowser.open(o),(0,B.Nw)("reset.complete",e)}),(0,B.hZ)("reset.rte")):r().MacroBrowser.open(o)},errorCallback:e=>{g.A.error("AJS.MacroBrowser.Rest.fetchMacroMetadataDetails ERROR",e)}})},macroBrowserComplete(e){const t={contentId:u.A.get("content-id")||"0",macro:{name:e.name,params:e.params,defaultParameterValue:e.defaultParameterValue,body:e.bodyHtml}};Dt(),Vn.editedMacroDiv?(rt.insertMacro(t,Vn.editedMacroDiv),delete Vn.editedMacroDiv):rt.insertMacro(t)},macroBrowserCancel(){Dt(),Vn.editedMacroDiv=null,Vn.editedMacro=null}},Qn=Vn;function Yn(){function e(e){l()("#autocomplete-dropdown .top-menu-item").spin(e)}function t(e,t){const n=t.presetMacroMetadata;e.replaceWithSelectedSearchText(),n?Wn().hasRequiredParameters(n)||n.alwaysShowConfig?Qn.macroBrowserToolbarButtonClicked(t):(It(),rt.insertMacro({contentId:u.A.get("content-id")||"0",macro:{name:n.macroName,body:""}}),(0,B.hZ)("rte-autocomplete-on-insert",{triggerChar:e.settings.ch})):Qn.macroBrowserToolbarButtonClicked(t)}function n(e){if(e.hidden&&!Wn().isHiddenMacroShown(e))return null;const n={className:`autocomplete-macro-${e.macroName}`,callback(n){t(n,{ignoreEditorSelection:!0,presetMacroMetadata:e})}};return e.title&&(n.name=e.title),e.icon?(n.href="#",n.icon=(e.icon.relative?u.A.get("static-resource-url-prefix"):"")+e.icon.location):n.html=Cn(e.title),n}function o(o,a){vn(o,{ch:o,cache:!1,endChars:a,dropDownClassName:"autocomplete-macros",dropDownDelay:0,selectFirstItem:!0,getHeaderText:()=>(0,we.A)("editor.autocomplete.macros.header.text"),getAdditionalLinks:()=>[{className:"dropdown-insert-macro",html:Cn((0,we.A)("editor.autocomplete.macros.dialog.browse"),"dropdown-prevent-highlight","editor-icon"),callback(e){const n=e.text();t(e,{searchText:n})}}],getDataAndRunCallback(t,o,a){const i=Wn().getMetadataPromise(),s=this,c=arguments;function d(e){console.log("RETRY LOADING"),e.preventDefault(),e.stopPropagation(),(0,B.hZ)("analytics",{name:"autocomplete.macrobrowser.brace.load.retry"}),Wn().reset(),Wn().preLoadMacro(),s.getDataAndRunCallback.apply(s,c)}s.alreadyBinded||(s.alreadyBinded=!0,i.always(()=>{(function(){let r;r=o?function(e){const o=[],r=[],a=Wn().searchSummaries(e,{keywordsField:"keywordsNoDesc"});for(let t=0,o=a.length;t<o;t++){const o=n(a[t]);if(o){const n=a[t].title.toLowerCase(),i=n.indexOf(e.toLowerCase());r.push({item:o,isExactMatch:n===e.toLowerCase(),searchTermIndex:-1===i?100:i,titleLength:n.length})}}r.sort((e,t)=>e.searchTermIndex<t.searchTermIndex?-1:e.searchTermIndex>t.searchTermIndex?1:e.titleLength<t.titleLength?-1:e.titleLength>t.titleLength?1:0);for(let e=0,n=r.length;e<n&&o.push(r[e].item)!=t.maxResults;e++);return o}(o):function(e){const t=[];return l()("#macro-insert-list").first().find("aui-item-link").each((o,r)=>{const a=l()(r),i=e.find(e=>e.macroName===a.attr("data-macro-name"));if(i){const e=n(i);e&&t.push(e)}}),t}(Wn().metadataList),e(!1),a([r],o)})(),s.alreadyBinded=!1}),i.fail(()=>{(0,B.hZ)("analytics",{name:"autocomplete-macrobrowser.fail-to-load"}),r().messages.warning("#autocomplete-dropdown ol:nth(1)",{title:(0,we.A)("editor.autocomplete.macros.error.load.header"),body:`<p><a id="macro-retry-link" href="#">${(0,we.A)("editor.autocomplete.macros.error.load.retrylink")}</a></p>`}),l()("#macro-retry-link").on("click",d),l()("#autocomplete-dropdown ol").eq(1).show()})),"pending"===i.state()&&(a([],o),e(!0))},update(){throw new Error("All items in the Macro Autocomplete dropdown must have a callback function")}})}o("{",["}",":","{"]),o(_t,[_t,")"]),o(zt,[zt])}function Zn(){return{init(){Yn()},getInfo:()=>({longname:"Auto Complete Macro",author:"Atlassian",authorurl:"http://www.atlassian.com",version:`${h.tinymce.majorVersion}.${h.tinymce.minorVersion}`})}}const Kn=(e,t)=>{const n={pageId:u.A.get("page-id"),type:e,shortcut:t};(0,B.hZ)("analytics",{name:"confluence.editor.autocomplete.insert",data:n})};var Gn=n(6764),qn=n.n(Gn);const Jn=e=>{const t=u.A.get("content-id");return e?`${y.Y}/rest/prototype/1/search.json`:+t?`${y.Y}/rest/prototype/1/content/${t}/attachments.json`:null},Xn=(e,t)=>{const n=r().MacroBrowser.getMacroMetadata("view-file")?[]:["image","word","excel","pdf","powerpoint","multimedia"];return t?{type:"attachment",attachmentType:n,search:"name","max-results":e.maxResults,query:t}:{attachmentType:n,"max-results":e.maxResults}},eo=()=>vn("!",{ch:"!",cache:!1,endChars:["!"],dropDownClassName:"autocomplete-media",selectFirstItem:!0,getHeaderText:()=>r().MacroBrowser.getMacroMetadata("view-file")?(0,we.A)("editor.autocomplete.file.header.text"):(0,we.A)("editor.autocomplete.media.header.text"),getAdditionalLinks(){const e=(0,we.A)("editor.autocomplete.media.files.dialog.browse");return[{className:"dropdown-insert-image",html:Cn(e,"dropdown-prevent-highlight","editor-icon"),callback(e){e.replaceWithSelectedSearchText(),h.Confluence.Editor.defaultInsertImageDialog()}},{className:"dropdown-insert-macro",html:Cn((0,we.A)("editor.autocomplete.media.macros.dialog.browse"),"dropdown-prevent-highlight","editor-icon"),callback(e){e.replaceWithSelectedSearchText(),h.tinymce.confluence.macrobrowser.macroBrowserToolbarButtonClicked({selectedCategory:"media"})}}]},getDataAndRunCallback(e,t,n){xn(e,Jn,Xn,t,n,"attachment")},update(e,t){(0,B.hZ)("rte-autocomplete-on-insert",{triggerChar:"!",selectedFile:t});const n=t.restObj,o=r().REST.wikiLink(n),a=n&&n.title||t.name;if("Image"==n.niceType){const e={filename:a,contentId:t.ownerId||n.ownerId,...o.params};h.tinymce.confluence.ImageUtils.insertFromProperties(e)}else{const e=!!r().MacroBrowser.getMacroMetadata("view-file"),i=n.contentType,s="VANILLA"!==u.A.get("confluence-flavour");if(e&&(s&&(!i||"application/x-shockwave-flash"!==i)||i&&("audio/mp3"===i||"video/mp4"===i)||"Multimedia"!==n.niceType)){const e={name:a,page:n.parentTitle,space
6:n.space?n.space.key:"",date:n.datePath,ownerId:n.ownerId};qn().insertFilePlaceholder(e)}else this._insertFile(a,t,o)}},_insertFile(e,t,n){let o;switch(t.restObj.niceType){case"PDF Document":o="viewpdf";break;case"Word Document":o="viewdoc";break;case"Excel Spreadsheet":o="viewxls";break;case"PowerPoint Presentation":o="viewppt";break;case"Multimedia":o="multimedia"}const r={page:n.destination.substring(0,n.destination.indexOf("^")),name:e};qe().get("viewdoc").beforeParamsRetrieved(r),r.page||delete r.page;const a={contentId:u.A.get("content-id")||"0",macro:{name:o,params:r,body:""}};h.tinymce.confluence.MacroUtils.insertMacro(a)}});function to(e){e.addCommand("mceConfAutocompleteImage",()=>(hn.shortcutFired("!"),!1)),e.addShortcut("meta+shift+m",e.translate("AutoCompleteImage"),"mceConfAutocompleteImage"),eo(),(0,B.oI)("init.rte",()=>{(0,B.oI)("rte-autocomplete-on-show",(e,t)=>{let n;"!"===t.triggerChar?n="media":"["===t.triggerChar?n="link":"{"!==t.triggerChar&&t.triggerChar!==_t&&t.triggerChar!==zt||(n="macro"),n&&(0,B.hZ)("analytics",{name:"confluence.editor.autocomplete.trigger",data:{pageId:u.A.get("page-id"),type:n,shortcut:t.triggerChar}})}),(0,B.oI)("rte-autocomplete-on-insert",(e,t)=>{"!"===t.triggerChar?(e=>{if(e&&e.name){const t={pageId:u.A.get("page-id"),extension:e.name.split(".").pop(),type:"media",shortcut:"!"};(0,B.hZ)("analytics",{name:"confluence.editor.autocomplete.insert",data:t})}})(t.selectedFile):"["===t.triggerChar?Kn("link",t.triggerChar):"{"!==t.triggerChar&&t.triggerChar!==_t&&t.triggerChar!==zt||Kn("macro",t.triggerChar)})}),(0,B.oI)("rte-destroyed",()=>{(0,B.Nw)("rte-autocomplete-on-insert"),(0,B.Nw)("rte-autocomplete-on-show")})}function no(e,t,n){"cl.ly"==e.host?l().get(`${y.Y}/rest/autoconvert/1.0/cloudappembed?resource=${e.path.substr(1)}`,e=>{if(e){let o;switch(e.item_type){case"image":o=Bt(e.content_url),n(l()(`<img class="confluence-embedded-image confluence-external-resource" src="${o}" data-image-src="${o}"/>`)[0]);break;case"bookmark":t.text(e.name),t.attr("href",Bt(e.redirect_url)),n(t)}}else n()}):n()}function oo(){const e=this,t=function(t,o,r){if(!n(t))return void r();const a=function(e){return y.Y?e.path.substring(y.Y.length+1):e.path.substring(1)}(t),i=decodeURIComponent(a).split("/");let s="";t.queryKey=t.queryKey||{},t.queryKey.focusedCommentId?(s=`$${t.queryKey.focusedCommentId}`,s=ro(s,t)):t.queryKey.pageId?(s=`$${t.queryKey.pageId}`,s=ro(s,t)):"display"===i[0]?s=function(e,t,n){return 2===n.length&&0===n[1].indexOf("~")?t=n[1]:3===n.length?(t=`${n[1]}:${n[2].replace(/\+/g," ")}`,t=ro(t,e)):4===n.length&&"status"===n[1]?t=`$${n[3]}`:6===n.length&&(t=`${n[1]}:/${n[2]}/${n[3]}/${n[4]}/${n[5].replace(/\+/g," ")}`,t=ro(t,e)),t}(t,s,i):"spaces"===i[0]?(s=e.spaViewPageLinkHandler(i),s=s||e.spaBlogPostLinkHandler(i),s=s?ro(s,t):function(e,t,n){return 2!==n.length&&3!==n.length||-1!==n[1].indexOf(".action")||(t=`${n[1]}:`,t=ro(t,e)),t}(t,s,i)):"users"===i[0]?s=function(e,t,n){return 2===n.length&&"viewuserprofile.action"==n[1]?t=`~${e.queryKey.username}`:2===n.length&&"viewmyprofile.action"==n[1]&&(t=`~${u.A.get("remote-user")}`),t}(t,s,i):"pages"===i[0]&&"viewpage.action"===i[1]&&t.queryKey&&t.queryKey.spaceKey&&t.queryKey.title&&(s=`${t.queryKey.spaceKey}:${t.queryKey.title.replace(/\+/g," ")}`),s?(s=`[${s}]`,h.tinymce.plugins.Autoconvert.getHtmlFromWikiMarkup(s,e=>{r(l()(e).children()[0])},()=>{r()})):r()},n=function(e){let t=!0;return t=t&&e.authority===document.location.host,t=t&&(!y.Y||0===e.path.indexOf(y.Y)),t};this.init=function(){h.tinymce.plugins.Autoconvert.autoConvert.addHandler(t)}}const ro=function(e,t){if(!t.anchor||0===t.anchor.indexOf("comment-"))return e;let n=t.anchor;return n.startsWith("id-")&&(n=t.anchor.substring(t.anchor.indexOf("-")+1)),`${e}#${n.substring(n.indexOf("-")+1)}`};function ao(){h.tinymce.plugins.Autoconvert.autoConvert.addHandler(function(e,t,n){if(e.host.match(/google.*/)&&"/url"===e.path&&e.queryKey&&e.queryKey.url){const o=decodeURIComponent(e.queryKey.url);(t=l()(t)).attr("href",o),t.attr("data-mce-href",o),t.text(o),n(t)}else n()})}oo.prototype.spaViewPageLinkHandler=function(e){const t="spaces"===e[0]&&"pages"===e[2],n="edit"===e[3]?e[4]:e[3];
6if(t&&n)return`$${n}`},oo.prototype.spaBlogPostLinkHandler=function(e){const t="spaces"===e[0]&&"blog"===e[2],n=e[1],o=e[3],r=e[4],a=e[5],i=e[6],s=e[7];if(t&&n&&o&&r&&a&&i&&s)return`${n}:/${o}/${r}/${a}/${i}/${s.replace(/\+/g," ")}`};const io={issueKeyOnlyRegEx:/\/(i#)?browse\/([\x00-\x19\x21-\x22\x24\x27-\x3E\x40-\x7F]+-[0-9]+$)/,singleTicketXMLEx:/\/jira\.issueviews:issue-xml\/([\x00-\x19\x21-\x22\x24\x27-\x3E\x40-\x7F]+-[0-9]+)\//,issueKeyWithinRegex:/\/(i#)?browse\/([\x00-\x19\x21-\x22\x24\x27-\x3E\x40-\x7F]+-[0-9]+)(?:\?|#)/,jqlRegEx:/jqlQuery=([^&]+)/,jqlRegExAlternateFormat:/jql=([^&]+)/,_getMatchedServerFromLink(e,t){let n=null;for(const o in t)if(t.hasOwnProperty(o)){const r=t[o];let a=r.url;if("/"!==r.url[r.url.length-1]&&(a+="/"),0===e.indexOf(a)){n=r;break}}return n},pasteHandler(e,t,n){const o=r().Editor.JiraConnector.servers;if(!o)return n(),null;const a=r().Editor.JiraAnalytics,i={},s=io._getMatchedServerFromLink(e.source,o);let l=null;if(s){let t="";const n=io.jqlRegEx.exec(e.source)||io.jqlRegExAlternateFormat.exec(e.source),o=r().JQLHelper.isFilterUrl(e.source);let c=io.issueKeyOnlyRegEx.exec(e.source)||io.issueKeyWithinRegex.exec(e.source);if(c?(t=c[2],a&&(i.type=a.linkTypes.jql)):(c=io.singleTicketXMLEx.exec(e.source),c&&(t=c[1],a&&(i.type=a.linkTypes.xml))),n)i.is_single_issue=!1,i.type=r().JQLHelper.checkQueryType(e.source),l={name:"jira",params:{server:s.name,serverId:s.id,jqlQuery:decodeURIComponent(n[1].replace(/\+/g,"%20"))}};else if(o){const t=e.source;i.is_single_issue=!1,i.type=r().JQLHelper.checkQueryType(t),l={name:"jira",params:{server:s.name,serverId:s.id,jqlQuery:r().JQLHelper.getFilterFromFilterUrl(t)}}}else t&&(i.is_single_issue=!0,l={name:"jira",params:{server:s.name,serverId:s.id,key:t}})}l?(h.tinymce.plugins.Autoconvert.convertMacroToDom(l,n,n),a&&a.triggerPasteEvent(i)):n()}},so=function(){let e=[];const t=function(e){return e.indexOf("%s")>=0?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&").replace("%s","(.*)"):`${e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}(.*)`};h.tinymce.plugins.Autoconvert.autoConvert.addHandler(function(t,n,o){if(t.source===n.text()){for(let r=0;r<e.length;r++){const a=e[r],i=t.source.match(a.regex);if(i){const e=i[1];if(a.defaultAlias){const t=a.defaultAlias.replace(/%s/,e);return void o(l()(n).text(t))}return void o(l()(n).text(e))}}o()}else o()}),setTimeout(()=>{l().ajax({url:`${y.Y}/rest/autoconvert/latest/shortcutlinkconfigurations`,type:"GET",dataType:"json",success(n){e=n.configurations;for(let n=0;n<e.length;n++){const o=e[n];try{o.regex=new RegExp(t(o.expandedValue))}catch(e){g.A.error(`Failed to generated regex for ${o}`)}}},error(e){g.A.error(`Failed to load shortcut link configurations ${e.statusText}`)}})},0)},lo={pasteHandler(e,t,n){"www.skitch.com"===e.host||"skitch.com"===e.host?l().get(`${y.Y}/rest/autoconvert/1.0/skitchembed?url=${e.source}`,e=>{e&&e.url?n(l()(`<img class="confluence-embedded-image confluence-external-resource" src="${e.url}" data-image-src="${e.url}"/>`)[0]):n()}):n()}},co=/^\/(.*?)\/status\/([^/]+\/?$)/,uo=/^\/(.*?)\/statuses\/([^/]+\/?$)/,go=(e,t,n)=>{let o,r,a;e.host.match(/^(twitter|x).com/)?((o=decodeURI(e.path).match(co))?r=`${e.protocol}://x.com/${o[1]}/status/${o[2]}`:(o=decodeURI(e.path).match(uo))&&(r=`${e.protocol}://x.com/${o[1]}/statuses/${o[2]}`),r?(a={name:"widget",params:{url:r}},h.tinymce.plugins.Autoconvert.convertMacroToDom(a,n,n)):n()):n()};function mo(){const e=[/loom.com\/(embed|share)\/([a-zA-Z0-9-]+)/,/youtube-nocookie.com\/embed\/?/,/youtube.com\/watch\?/,/youtu.be\/?/,/vimeo.com\/[0-9]+/,/[^.]\.wufoo\.com\/(?:forms|reports)/];h.tinymce.plugins.Autoconvert.autoConvert.addHandler(function(t,n,o){const r=decodeURI(t.source);for(let t=0;t<e.length;t++)if(r.match(e[t])){const e={name:"widget",params:{url:r}};return void h.tinymce.plugins.Autoconvert.convertMacroToDom(e,o,o)}o()})}function po(){h.tinymce.plugins.Autoconvert.autoConvert.addHandler((e,t,n)=>{if(e.host.match(".*youtu.be.*")){const o=`http://youtube.com/watch?v=${e.path.substr(1)}`;n(l()(t).attr("href",o).text(o))}else n()})}const fo='img[src^="data:image"]:not(.editor-inline-macro)',ho='img[src^="blob:"]:not(.editor-inline-macro)';let bo,yo,wo=!1;const vo=()=>{r()&&r().Rte&&r().Rte.BootstrapManager?r().Rte.BootstrapManager.addOnInitCallback(()=>{const e=h.tinymce.activeEditor;e?(e=>{e.on("Paste",e=>{Ao(e),h.tinymce.dom.Event.cancel(e)})})(e):g.A.error("Could not getEditor from adapter")}):g.A.error("Could not initialize pasteHandler on Confluence.Editor")},Co=()=>{wo&&(h.Confluence.Uploader.getEditorHtmlNode().removeEventListener(h.Confluence.Uploader.dndCustomEvents.FILE_ATTACHED,Eo),h.Confluence.Uploader.getEditorHtmlNode().removeEventListener(h.Confluence.Uploader.dndCustomEvents.ALL_FILES_ATTACHED,To),wo=!1)},Ao=e=>{if(!e.clipboardData||!e.clipboardData.items.length)return;wo||(h.Confluence.Uploader.getEditorHtmlNode().addEventListener(h.Confluence.Uploader.dndCustomEvents.FILE_ATTACHED,Eo),h.Confluence.Uploader.getEditorHtmlNode().addEventListener(h.Confluence.Uploader.dndCustomEvents.ALL_FILES_ATTACHED,To),wo=!0),bo=[],yo=0;const t=Array.from(e.clipboardData.types);g.A.debug("clipboardData types: ",t),g.A.debug("clipboardData files: ",e.clipboardData.files),g.A.debug("clipboardData text/plain: ",e.clipboardData.getData("text/plain")),g.A.debug("clipboardData text/html: ",e.clipboardData.getData("text/html")),g.A.debug("clipboardData text/rtf: ",e.clipboardData.getData("text/rtf")),g.A.debug("clipboardData image/svg+xml: ",e.clipboardData.getData("image/svg+xml"));const n=["Files","application/x-moz-file"],o="Files"===t.toString()||t.sort().toString()===["image/svg+xml","Files"].sort().toString()||t.sort().toString()===n.sort().toString(),r=t.sort().toString()===n.sort().toString()||t.sort().toString()===["text/html","text/plain","Files"].sort().toString();
6Array.from(e.clipboardData.items).forEach((t,n)=>{if(g.A.debug("clipboardData.items item.kind",t.kind),g.A.debug("clipboardData.items item.type",t.type),g.A.debug("clipboardData.items item",t),o&&"file"===t.kind){const e=t.getAsFile();e&&xo(e,n)}else if(!o&&"string"===t.kind&&"text/html"===t.type){const t=e.clipboardData.getData("text/html");(new DOMParser).parseFromString(t,"text/html").querySelectorAll(fo).forEach((e,t)=>{ko(e,t)})}}),r&&setTimeout(()=>{e.currentTarget&&e.currentTarget.querySelectorAll(fo).forEach((e,t)=>{ko(e,t)})})},xo=(e,t)=>{const n=Mo(e,e.size,t);h.Confluence.Uploader.upload([n])},ko=(e,t)=>{try{const n=e.getAttribute("src"),o=decodeURI(n).split(",")[1].split(" ").join("").replace(/\r?\n|\r/g,""),r=atob(o).length;h.Confluence.Uploader.upload([Mo(o,r,t,"base64")])}catch(t){h.Confluence.EditorNotification.notify("warning",h.tinymce.activeEditor.translate("base64image.warning")),e.remove(),g.A.error("Fail to decode: ",e.getAttribute("src")),g.A.error(t)}},Mo=(e,t,n,o)=>{const r=new Date,a=r.getMonth()+1,i=n?`-${n}`:"",s=`image-${r.getFullYear()}-${a}-${r.getDate()}_${r.getHours()}-${r.getMinutes()}-${r.getSeconds()}${i}.png`;return{fileName:s,fileSize:t,name:s,size:t,slice:(t,n)=>e.slice(t,t+n),getAsBinary:()=>e,getData:()=>e,encoding:o}},Eo=e=>{try{const t=e.detail;t&&t.response&&(bo.length||(bo=h.tinymce.activeEditor.getDoc().querySelectorAll(ho)),bo.length&&(bo[yo].outerHTML=JSON.parse(t.response).htmlForEditor,yo++))}catch(e){g.A.error("Clipboard-access fileUploadedHandler error: "+e.message)}},To=()=>{h.tinymce.activeEditor.getDoc().querySelectorAll(ho).forEach(e=>e.remove())};function Io(e,t,n,o=!1){var r,a;const i=e.getDoc().getElementById(n);if(!i)return;const s=o?"th":"td",l=null===(r=i.querySelector(s))||void 0===r?void 0:r.childNodes[0];l&&(e.selection.select(l),t||e.selection.collapse(!1)),i.removeAttribute("id"),null===(a=i.closest('[contenteditable="true"]'))||void 0===a||a.focus()}function Do(e){return[/(^\u200b?\|\|\s*(?:[^|]*\s?\|\|\s?)+$)/,t=>{const n=Ce();let o=`<table class="confluenceTable" id="${n}"><tr>`,r="",a=!0;const s=t[1].slice(2,-2).split("||").map(function(e){const t=i().util.Tools.trim(e);return a=a&&""===t,t});a&&(s[0]=(0,we.A)("editor.autoformat.sampletext.firstcell"));for(let e=0,t=s.length;e<t;e++)o+=`<th class="confluenceTh">${s[e]}</th>`,r+='<td class="confluenceTd"><br></td>';o+=`</tr><tr>${r}</tr></table>`,e.execCommand("mceInsertContent",!1,o),Io(e,a,n,!0)},!0]}function So(e){return[/(^\u200b?\|\s?(?:[^|]*\s?\|\s?)+$)/,t=>{const n=Ce();let o=`<table class="confluenceTable" id="${n}"><tr>`,r=!0;const a=t[1].slice(1,-1).split("|").map(function(e){const t=i().util.Tools.trim(e);return r=r&&""==t,t});r&&(a[0]=(0,we.A)("editor.autoformat.sampletext.firstcell"));for(let e=0,t=a.length;e<t;e++)o+=`<td class="confluenceTd">${a[e]}</td>`;o+="</tr></table>",e.execCommand("mceInsertContent",!1,o),Io(e,r,n)},!0]}let No;function Lo(e){return l()("<div>").append(e.cloneNode(!0)).html()}function Bo(e){let t,n;if(!e||!e.collapsed)throw new Error("range is null or not collapsed");if(t=e.startContainer,n=e.startOffset,1===t.nodeType&&n>0){if(t=t.childNodes[e.startOffset-1],3!==t.nodeType)return"";n=t.nodeValue.length}else if(3!==t.nodeType)return"";let o=t.nodeValue.substring(0,n);for(let e=t.previousSibling;e&&3===e.nodeType;e=e.previousSibling)o=e.nodeValue+o;return o}function Ro(e,t,n,o,r){return{handles(t){let n=!1;const r=t.selection.getRng();if(!r||!r.collapsed)return!1;const a=r.commonAncestorContainer||{};return!l()(a).closest("pre,.text-placeholder").length&&(!o||!l()(a).closest(o).length)&&(n=e.test(Bo(r)),n)},execute(o,a,i){let s,c=1;const u=Oo(a);if(32===u?o.execCommand("mceInsertContent",!1," "):o.execCommand("mceInsertContent",!1,String.fromCharCode(u)),o.undoManager.transact(()=>{const n=o.selection.getRng();if(!n)return;s=Bo(n),"|"==s[s.length-1]&&(s+=" ",c=0);const a=e.exec(s.substring(0,s.length-1));if(r&&!r(a))return;const i=function(e,t,n){let o,r;if(t){3!==t.nodeType&&(n=(t=t.childNodes[n-1]).length);for(let a=t,i=n;a&&3===a.nodeType;a=a.previousSibling){if(-1==i&&(i=a.nodeValue.length),i>e)return{container:a,offset:i-e};if(i==e){for(r=0,o=a.parentNode;a=a.previousSibling;)r++;return{container:o,offset:r}}
6e-=i,i=-1}return null}}(a[1].length+c,n.commonAncestorContainer,n.startOffset);n.setStart(i.container,i.offset);const d=l()(n.commonAncestorContainer);o.selection.setRng(n),d.closest(".wysiwyg-macro-body").length&&n.toString()==d.text()?(d[0].innerHTML="<br>",o.selection.select(d[0].childNodes[0]),o.selection.collapse(!0)):o.execCommand("delete",!1,{}),t(a,o.selection.getRng()),No=o.selection.getRng()}),n)return i.preventDefault(),i.stopPropagation(),h.tinymce.dom.Event.cancel(a),No&&d().showElement(No.startContainer),!1}}}function Oo(e){return e.which}function Po(){this.handlers={}}Po.prototype={registerHandler(e,t){this.handlers[e]||(this.handlers[e]=[]),this.handlers[e].push(t)},executeHandlers(e,t,n,o){let r=!0;return l().each(this.handlers[e]||[],(e,a)=>{if(a.handles(t))return r=a.execute(t,n,o),!1}),r}};const jo=new Po,$o=function(e,t){if(u.A.get("remote-user")&&u.A.get("confluence.prefs.editor.disable.autoformat"))return;const n=t.editor;function o(e,t){const o=n.formatter.get(e)[0],r=n.dom.create(o.inline,{style:o.styles,class:o.classes});r.appendChild(document.createTextNode(t)),n.execCommand("mceInsertContent",!1,`${Lo(r)} `)}l().each({"*":"bold",_:"italic","~":"subscript","^":"superscript","+":"underline","-":"strikethrough","`":"monospace"},(e,t)=>{const n=new RegExp(`(?:[\\s\\xA0\\u200b\\uFEFF]+|^)(\\${e}(?=[^\\s${e}])([^${e}]*?[^\\s]))$`);jo.registerHandler(e.charCodeAt(0),Ro(n,e=>{o(t,e[2])},!0))}),n.formatter.register("code",{inline:"code"}),jo.registerHandler("}".charCodeAt(0),Ro(/(?:[\s\xA0\u200b]+|^)({{(?=[^\s])([^}]*?[^\s])})$/,e=>{o("code",e[2])},!0));const r=Ue().isEnabled("editor.heading.hash.symbol.disable"),a=e=>r?`^\\u200b?(h${e}\\.)$`:`^\\u200b?(h${e}\\.|${"#".repeat(e)})$`;for(let e=1;e<=6;e++)(e=>{jo.registerHandler(" ".charCodeAt(0),Ro(new RegExp(a(e)),()=>{n.execCommand("formatBlock",!1,`h${e}`)},!0))})(e);r&&jo.registerHandler(" ".charCodeAt(0),Ro(/^\u200b?(#)$/,()=>{n.execCommand("InsertOrderedList")},!0)),jo.registerHandler(" ".charCodeAt(0),Ro(/^\u200b?(bq\.|>)$/,()=>{n.execCommand("formatBlock",!1,"blockquote")},!0));const i=Ro(/^\u200b?(-{3,})$/,()=>{n.execCommand("mceInsertContent",!1,"<hr />")},!0);jo.registerHandler(" ".charCodeAt(0),i),jo.registerHandler(13,i);const s=Ue().isEnabled("editor.list.dash.symbol.square.disable");jo.registerHandler(" ".charCodeAt(0),Ro(s?/^\u200b?(\*)$/:/^\u200b?([*-])$/,()=>{n.execCommand("InsertUnorderedList")},!0)),s&&jo.registerHandler(" ".charCodeAt(0),Ro(/^\u200b?(-)$/,()=>{const e=n.dom;n.execCommand("InsertUnorderedList");const t=e.getParent(n.selection.getNode(),"OL,UL");t&&(e.setStyles(t,{listStyleType:"square"}),t.removeAttribute("data-mce-style"))},!0)),jo.registerHandler(" ".charCodeAt(0),Ro(/^\u200b?(1\.)$/,()=>{n.execCommand("InsertOrderedList")},!0)),(0,B.hZ)("confluence.editor.registerHandlers",{handlerManager:jo,createHandler:Ro,ed:n});const c=Ro(/((<--?>)([^\s-]*))$/,e=>{n.execCommand("mceInsertContent",!1,"â"+e[3])},!1);jo.registerHandler(" ".charCodeAt(0),c),jo.registerHandler(13,c);const d=Ro(/((--?>)([^\s-]*))$/,e=>{n.execCommand("mceInsertContent",!1,"â"+e[3])},!1);jo.registerHandler(" ".charCodeAt(0),d),jo.registerHandler(13,d);const g=Ro(/((<--?)([^\s-]*))$/,e=>{n.execCommand("mceInsertContent",!1,"â"+e[3])},!1);jo.registerHandler(" ".charCodeAt(0),g),jo.registerHandler(13,g),jo.registerHandler(" ".charCodeAt(0),Ro(/[^-]*[\s](---?)$/,e=>{const t=2===e[1].length?"â":"â";n.execCommand("mceInsertContent",!1,t)},!1));const m=Ro(/(([^\s-]+)(---?)([^\s-]+))$/,e=>{const t=2===e[3].length?"â":"â";n.execCommand("mceInsertContent",!1,e[2]+t+e[4])},!1);jo.registerHandler(" ".charCodeAt(0),m),jo.registerHandler(13,m),function(e){return[{triggerCharCode:13,handler:Do(e)},{triggerCharCode:13,handler:So(e)}]}(n).forEach(e=>{jo.registerHandler(e.triggerCharCode,Ro(...e.handler))});const p=Ro(/\b(((https?|ftp):\/\/|(www\.))[\w.$\-_+!*'(),/?:@=&%#~;[\]]+)$/,e=>{const t=e[3]?e[1]:`http://${e[1]}`,o=n.dom.create("a",{href:t});o.appendChild(document.createTextNode(e[1])),n.execCommand("mceInsertContent",!1,Lo(o)),n.getDoc().execCommand("unlink",!1,{})},!1,"a");jo.registerHandler(" ".charCodeAt(0),p),jo.registerHandler(13,p);const f=Ro(/\b((([a-z]|\d|[!#$%&'*+\-/=?^_`{|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#$%&'*+\-/=?^_`{|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)$/i,e=>{const t=n.dom.create("a",{href:`mailto:${e[1]}`});t.appendChild(document.createTextNode(e[1])),n.execCommand("mceInsertContent",!1,Lo(t)),n.getDoc().execCommand("unlink",!1,{})},!1,"a");jo.registerHandler(" ".charCodeAt(0),f),jo.registerHandler(13,f);const b=function(e,t){const o=Ro(e,()=>{n.execCommand("mceInsertContent",!1,t)},!1);
6jo.registerHandler(" ".charCodeAt(0),o),jo.registerHandler(13,o)};b(/(?:\b|^)(jira|JIRA)$/,"Jira"),b(/(?:\b|^)(bitbucket)$/,"Bitbucket"),b(/(?:\b|^)(atlassian)$/,"Atlassian"),b(/(?:\b|^)(hipchat)$/,"Hipchat"),b(/(?:\b|^)(statuspage)$/,"Statuspage"),b(/(?:\b|^)(sourcetree)$/,"Sourcetree"),b(/(?:\b|^)(trello)$/,"Trello");const y={"]":$o.regularExpressions._REGEXES.WIKI_LINK,"}":$o.regularExpressions._REGEXES.WIKI_MACRO,"!":$o.regularExpressions._REGEXES.WIKI_EMBED};return l().each(y,(e,t)=>{jo.registerHandler(e.charCodeAt(0),Ro(t,t=>{const o=t[1]+e,r={type:"POST",contentType:"application/json; charset=utf-8",url:`${u.A.get("context-path")}/rest/tinymce/1/wikixhtmlconverter`,data:JSON.stringify({wiki:o,entityId:u.A.get("content-id"),spaceKey:u.A.get("space-key"),contextType:u.A.get("content-type"),suppressFirstParagraph:!0}),dataType:"text",timeout:5e3};"}"==e?h.tinymce.confluence.MacroUtils.insertMacro(r):"!"==e?l().ajax(r).done(e=>{!o===e?h.tinymce.confluence.ImageUtils.insertImagePlaceholder(e):n.execCommand("mceInsertContent",!1,e)}):l().ajax(r).done(e=>{n.execCommand("mceInsertContent",!1,e)})},!0))}),jo.registerHandler("`".charCodeAt(0),Ro(/(``)$/,()=>{const e={contentId:u.A.get("content-id"),macro:{name:"code",body:""}};h.tinymce.confluence.MacroUtils.insertMacro(e)},!0)),n.on("KeyPress",t=>jo.executeHandlers(Oo(t),n,t,e)),n.on("KeyDown",t=>{if(13===Oo(t))return jo.executeHandlers(13,n,t,e)}
6,!0),n.on("Remove",()=>{jo.handlers={}}),{getHandlerCount:()=>Object.keys(jo.handlers).length}};function Fo(){return{init(e){e.on("Init",()=>{e.getBody().classList.add("resizable")});let t=0;if(e.options.get("fullscreen_is_enabled"))return;const n=parseInt(e.options.get("autoresize_min_height")||`${e.getElement().offsetHeight}`),o=parseInt(e.options.get("autoresize_max_height")||"0");function r(a){const i=e.getDoc(),s=i.body,d=i.documentElement,u=h.tinymce.DOM;let g=n;const m=a===Object(a)&&a.forceExec||!1,p=l()(i).height();if(p>n&&(g=p),o&&p>o?(g=o,s.style.overflowY="auto",d.style.overflowY="auto"):(s.style.overflowY="hidden",d.style.overflowY="hidden",s.scrollTop=0),m||g!==t){const n=g-t;u.setStyle(document.querySelectorAll("div.tox-tinymce")[0],"height",`${g}px`),u.setStyle(u.get(`${e.id}_ifr`),"height",`${g}px`),t=g,c()&&n<0&&r()}return!0}e.on("Change SetContent Paste KeyUp Init",r),e.addCommand("mceAutoResize",r)},getInfo:()=>({longname:"Auto Resize",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize",version:`${h.tinymce.majorVersion}.${h.tinymce.minorVersion}`})}}function _o(){let e;function t(){const t=l()("#breadcrumbs");t.detach(),!t.find(".edited-page-title").length&&e.length&&t.append(e),l()("#editor-precursor .cell").prepend(t)}if("comment"!==u.A.get("content-type")){const n=l()("#quickedit-breadcrumbs");n.length>0&&(l()("#breadcrumbs").detach(),n.attr("id","breadcrumbs"),l()("#breadcrumb-section").append(n)),e=l()(".edited-page-title").parent().detach(),t(),xt(document,"mode-changed",(n,o)=>{"preview"===o?function(){const t=l()("#breadcrumbs").detach();e.detach(),l()("#breadcrumb-section").append(t)}():"richtext"===o&&t()})}}function zo(){h.tinymce.activeEditor.getBody().style.height="auto"}function Uo(e){["copy-heading-link-container","confluence-embedded-file-wrapper","confluence-embedded-manual-size","plugin_pagetree_children_list","plugin_pagetree_children_span"].forEach(t=>{st(e,`.${t}`,it([t]))})}function Ho(e){e.on("BeforeGetContent",()=>{Uo(e.getBody())}),e.on("PastePostProcess",e=>{Uo(e.node)})}function Wo(){return{init(e){const t=()=>{e.undoManager.ignore(()=>{this.convertHardCodedColorsToTokens(e.getDoc().body,"#ffffff")})},n=I()?"rte-collab-ready":"rte-ready";Ue().isEnabled("confluence.dark.theme.text.colors")&&((0,B.oI)(n,t),e.on("remove",()=>{(0,B.Nw)(n,t)}))},convertHardCodedColorsToTokens(e,t){Ke(e,t)}}}function Vo(){return{init(e){e.on("beforeExecCommand",t=>{if("Indent"===t.command||"Outdent"===t.command){const t=e.selection.getNode(),n=t.nodeName.toLowerCase();if("li"!==n&&"body"!==n){const n=parseInt(e.dom.getStyle(t,"margin-left",!1)||"0",10)+parseInt(e.dom.getStyle(t,"padding-left",!1)||"0",10);if(0!==n){const o=e.options.get("indentation"),r=/[a-z%]+/i.exec(o);e.dom.setStyle(t,"padding-left",""),e.dom.setStyle(t,"margin-left",n+r[0])}}}})},getInfo:()=>({longname:"Confluence Indentation",author:"Atlassian",authorurl:"http://www.atlassian.com",version:`${h.tinymce.majorVersion}.${h.tinymce.minorVersion}`})}}$o.regularExpressions={_REGEXES:{WIKI_MACRO:/(?:\s|^)(\{[^{^}]+)$/,WIKI_LINK:/(?:\s|^)(\[[^[^\]]+)$/,WIKI_EMBED:/(?:\s|^)(![^!]{5,})$/}};var Qo=n(5064);function Yo(e){return e.addCommand("confCharmap",()=>(Promise.all([n.e("vendors-node_modules_atlaskit_button_dist_esm_new-button_variants_default_button_js-node_modu-66c22c"),n.e("charmap-open-dialog")]).then(n.bind(n,796)).then(({default:t})=>{t(e),(()=>{const e=new CustomEvent(Qo.m.DIALOG_CONTROL,{detail:{isOpen:!0}});window.dispatchEvent(e)})()}),!1)),t={name:"Confluence Charmap Plugin"},()=>({getMetadata:()=>({name:"Confluence Editor Plugin",url:"http://www.atlassian.com",...t})});var t}const Zo=e=>or.from(e.firstChild),Ko=e=>or.from(e.lastChild),Go=e=>e.nodeName.toLowerCase(),qo=(e,t)=>{const n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||n.childNodes.length>1)throw new Error("HTML does not have a single root node");return n.childNodes[0]},Jo=(e,t)=>(t||document).createElement(e),Xo=(e,t)=>e.nodeType===Node.ELEMENT_NODE&&e.matches(t),er=e=>Xo(e,"ol,ul"),tr=e=>e.nodeType===Node.ELEMENT_NODE;function nr(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class or{constructor(e,t){nr(this,"tag",void 0),nr(this,"value",void 0),this.tag=e,this.value=t}static some(e){return new or(!0,e)}static none(){return or.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?or.some(e(this.value)):or.none()}bind(e){return this.tag?e(this.value):or.none()}exists(e){return this.tag&&e(this.value)}filter(e){return!this.tag||e(this.value)?this:or.none()}getOr(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 null==e?or.none():or.some(e)}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}}nr(or,"singletonNone",new or(!1));const rr=(e,t,n)=>{for(let o=0,r=e.length;o<r;o++){const r=e[o];if(t(r,o))return or.some(r);if(n(r,o))break}return or.none()},ar=(e,t)=>
6t>=0&&t<e.length?or.some(e[t]):or.none(),ir=e=>ar(e,0),sr=e=>ar(e,e.length-1),lr=(e,t)=>Array.from(e).map(t).flat(),cr=(e,t)=>{Object.entries(t).forEach(([t,n])=>{((e,t,n)=>{if("string"!=typeof n&&"boolean"!=typeof n&&"number"!=typeof n)throw new Error("Attribute value was not simple");e.setAttribute(t,n+"")})(e,t,n)})},dr=e=>Array.from(e.attributes).reduce((e,t)=>(e[t.name]=t.value,e),{}),ur=e=>"listAttributes"in e,gr=e=>e.depth>0,mr=e=>{const t=Array.from(e.childNodes);return(Ko(e).exists(er)?t.slice(0,-1):t).map(e=>e.cloneNode(!0))},pr=(e,t)=>{e.appendChild(t)},fr=(e,t)=>{t.forEach(t=>{pr(e,t)})},hr=(e,t)=>{pr(e.item,t.list)},br=(e,t)=>{const n={list:Jo(t,e),item:Jo("li",e)};return pr(n.list,n.item),n},yr=(e,t,n)=>{const o=t.slice(0,n.depth);return sr(o).each(t=>{if(ur(n)){const o=((e,t,n)=>{const o=Jo("li",e);return cr(o,t),fr(o,n),o})(e,n.itemAttributes,n.content);((e,t)=>{pr(e.list,t),e.item=t})(t,o),((e,t)=>{Go(e.list)!==t.listType&&(e.list=((e,t)=>{const n=Jo(t),o=dr(e);return cr(n,o),fr(n,e.childNodes),e.replaceWith(n),n})(e.list,t.listType)),cr(e.list,t.listAttributes)})(t,n)}else if((e=>"isFragment"in e)(n))fr(t.item,n.content);else{const e=qo(`\x3c!--${n.content}--\x3e`);pr(t.list,e)}}),o},wr=(e,t)=>{let n=or.none();const o=t.reduce((t,o,r)=>(e=>"isComment"in e)(o)?0===r?(n=or.some(o),t):yr(e,t,o):o.depth>t.length?((e,t,n)=>{const o=((e,t,n)=>{const o=[];for(let r=0;r<n;r++)o.push(br(e,ur(t)?t.listType:t.parentListType));return o}
6)(e,n,n.depth-t.length);return(e=>{for(let t=1;t<e.length;t++)hr(e[t-1],e[t])})(o),((e,t)=>{for(let t=0;t<e.length-1;t++)e[t].item.style.setProperty("list-style-type","none");sr(e).each(e=>{ur(t)&&(cr(e.list,t.listAttributes),cr(e.item,t.itemAttributes)),fr(e.item,t.content)})})(o,n),((e,t)=>{const n=sr(e),o=ir(t);n.isSome()&&o.isSome()&&hr(n.getOrDie(),o.getOrDie())})(t,o),t.concat(o)})(e,t,o):yr(e,t,o),[]);return n.each(e=>{const t=qo(`\x3c!--${e.content}--\x3e`);ir(o).each(e=>{var n,o;n=e.list,o=t,Zo(n).fold(()=>{pr(n,o)},e=>{n.insertBefore(o,e)})})}),ir(o).map(e=>e.list)},vr=(e,t)=>{var n,o;if((o=t).nodeType===Node.COMMENT_NODE||"#comment"===Go(o))return[{depth:e+1,content:null!==(n=t.nodeValue)&&void 0!==n?n:"",dirty:!1,isSelected:!1,isComment:!0}];const r=((e,t,n)=>{return(o=e,or.from(o.parentNode)).filter(tr).map(o=>({depth:t,dirty:!1,isSelected:n,content:mr(e),itemAttributes:dr(e),listAttributes:dr(o),listType:Go(o),isInPreviousLi:!1}));var o})(t,e,!1),a=Ko(t).filter(er).map(t=>Ar(e,t)).getOr([]);return r.toArray().concat(a)},Cr=(e,t)=>Zo(t).filter(er).fold(()=>vr(e,t),n=>{const o=Array.from(t.childNodes).reduce((t,o,r)=>{if(0===r)return t;if(Xo(o,"li"))return t.concat(vr(e,o));{const r={isFragment:!0,depth:e,content:[o],isSelected:!1,dirty:!1,parentListType:Go(n)};return t.concat(r)}},[]);return Ar(e,n).concat(o)}),Ar=(e,t)=>lr(t.childNodes,t=>(er(t)?Ar:Cr)(e+1,t)),xr=(e,t)=>lr(((e,t)=>{if(0===e.length)return[];{let n=t(e[0]);const o=[];let r=[];for(let a=0,i=e.length;a<i;a++){const i=e[a],s=t(i);s!==n&&(o.push(r),r=[]),n=s,r.push(i)}return 0!==r.length&&o.push(r),o}})(t,gr),t=>((e,t)=>{const n=(e=>(e.forEach((t,n)=>{((e,t)=>{const n=e[t].depth,o=e=>e.depth===n&&!e.dirty,r=e=>e.depth<n;return rr(e.slice(0,t).reverse(),o,r).orThunk(()=>rr(e.slice(t+1),o,r))})(e,n).fold(()=>{t.dirty&&ur(t)&&(e=>{Object.prototype.hasOwnProperty.call(e.listAttributes,"start")&&delete e.listAttributes.start})(t)},e=>{return o=e,void(ur(n=t)&&ur(o)&&(n.listType=o.listType,n.listAttributes={...o.listAttributes}));var n,o})}),e))(t);return wr(e.contentDocument,n).toArray()})(e,t));function kr(){return{init:e=>{e.editorCommands.addCommands({outdent:function(){const t=e.selection,n=e.dom;function o(t){const o=n.getParent(t,n.isBlock);return o&&parseInt(e.dom.getStyle(o,"margin-left",!1)||"0",10)+parseInt(e.dom.getStyle(o,"padding-left",!1)||"0",10)>0}return o(t.getStart())||o(t.getEnd())||e.queryCommandState("InsertOrderedList")||e.queryCommandState("InsertUnorderedList")||e.queryCommandState("InsertInlineTaskList")}},"state"),Ue().isEnabled("confluence.editor.lists.indentation.unlimited")||e.on("ListMutation",t=>{["OutdentList","IndentList"].includes(t.action)&&t.element&&((e,t)=>{(e=>e.map(e=>({sourceList:e,entries:Ar(0,e)})))(t).forEach(n=>{n.entries.forEach(e=>{e.depth>10&&(e.depth=10,e.dirty=!0)});const o=xr(e,n.entries);o[0]&&(t[0].textContent="",fr(t[0],Array.from(o[0].childNodes)))})})(e,[t.element])})}}}function Mr(){return{init(e){e.addCommand("mceConfUnlink",(t,n)=>{const o=e.selection;let r=n||o.getNode(),a=l()(r);if("A"!==r.nodeName){const e=a.closest("a");if(!e.length)return!1;r=e[0],a=e}let i=a.attr("href");if(i||(i="#",a.attr("href",i)),!a.attr("data-linked-resource-id")&&h.Confluence.Link.isExternalLink(i)&&a.text()==function(e){const t=/(.*)[/]$/.exec(e);return null!=t?t[1]:e}(i)){const t=e.dom.create("span",{class:"nolink"},i);e.dom.replace(t,r,!1)}else o.select(r),a.removeClass("createlink unresolved"),e.execCommand("UnLink");return!1}),e.ui.registry.addButton("confimage",{text:"confluence.confimage_desc",onAction:function(){e.execCommand("mceConfimage")}}),e.ui.registry.addButton("conf_macro_browser",{text:"confluence.conf_macro_browser_desc",onAction:function(){e.execCommand("mceConfMacroBrowser")}})},getInfo:()=>({longname:"Confluence TinyMCE Plugin",author:"Atlassian",authorurl:"http://www.atlassian.com",version:`${h.tinymce.majorVersion}.${h.tinymce.minorVersion}`})}}function Er(e){if(!O("confluence.edit.wordcount"))return;const t=v().get("content-type"),o=()=>{Promise.all([n.e("vendors-node_modules_lodash_throttle_index_js-node_modules_tinymce_plugins_wordcount_index_js"),n.e("confluencewordcount")]).then(n.bind(n,6753)).then(({default:t})=>{t(e)})};("comment"===t&&O("confluence.edit.wordcount.comments")||"blogpost"===t||"page"===t)&&((0,B.oI)("rte-ready",o),e.on("remove",()=>{(0,B.Nw)("rte-ready",o)}))}function Tr(){return{init:e=>{const t=h.Confluence.Editor.Drafts,n=h.Confluence.Editor;let o;function a(){if(!u.A.get("has-collaborated")&&r().Rte.Content.editorHasContentChanged()){u.A.set("has-collaborated",!0);const e=u.A.get("remote-user-key"),t=u.A.get("content-id");l().ajax({type:"PUT",url:`${y.Y}/rest/experimental/relation/user/${e}/collaborator/toContent/${t}?targetStatus=draft`,error(){u.A.set("has-collaborated",!1),g.A.error("Unable to store current user as a collaborator")}}),l().ajax({type:"DELETE",url:`${y.Y}/rest/experimental/relation/touched/from/user/current/to/content/${t}?targetStatus=current`}),l().ajax({type:"PUT",url:`${y.Y}/rest/experimental/relation/user/${e}/touched/toContent/${t}?targetStatus=draft`,error(){u.A.set("has-collaborated",!1),g.A.error("Unable to store touch relation for current user")}})}}e.on("Init",()=>{(0,B.oI)("editor.local.change",a)}),e.on("Remove",()=>{(0,B.Nw)("editor.local.change",a)}),(0,B.oI)("rte-ready",()=>{var e,r;g.A.debug("confluence drafts plugin initialisation"),l()("#draft
6-status").show(),t.bindUnloadMessage(),n.UI.cancelButton.click(()=>{u.A.getBoolean("shared-drafts")||t.save({skipErrorHandler:!0})}),u.A.getBoolean("shared-drafts")&&(e=u.A.get("draft-id"),r=u.A.get("draft-share-id"),0!==parseInt(e)&&window.history&&window.history.replaceState&&window.history.replaceState(null,"",`${y.Y}/pages/resumedraft.action?draftId=${e}&draftShareId=${r}&${function(){let e=window.location.search;return void 0===e?"":("?"===e.charAt(0)&&(e=e.substr(1)),e.split("&").filter(e=>0===e.indexOf("username=")||0===e.indexOf("userFullName=")||0===e.indexOf("accessType=")||0===e.indexOf("grantAccess=")||0===e.indexOf("qunit-test=")||0===e.indexOf("src.")).join("&"))}()}`),n.UI.cancelButton.attr("data-tooltip",(0,we.A)("editor.shared.draft.done.desc")),n.UI.cancelButton.on("click",()=>{(0,B.hZ)("analytics",{name:"confluence.editor.done.button.clicked"}),(0,B.hZ)("analytics",{name:"confluence.editor.close",data:{source:"closeButton",contentId:u.A.get("content-id"),currentVersion:u.A.get("page-version")||"null"}})})),o=window.setInterval(t.save,+u.A.get("draft-save-interval")||3e4)}),(0,B.oI)("rte-destroyed",()=>{g.A.info("confluence drafts plugin tear down"),clearInterval(o)})},getInfo:()=>({longname:"Confluence Drafts",author:"Atlassian",authorurl:"http://www.atlassian.com",version:`${h.tinymce.majorVersion}.${h.tinymce.minorVersion}`})}}function Ir(){return{init:e=>{e.addCommand("confMonospace",()=>(e.formatter.toggle("monospace",void 0),!1)),e.on("Init",()=>{e.formatter.register({monospace:{inline:"code"}}),e.editorCommands.addCommands({confMonospace:function(){return e.formatter.match("monospace")}},"state")}),e.ui.registry.addButton("monospace",{cmd:"confMonospace",text:"monospace",onAction:function(){e.execCommand("confMonospace")}})},getInfo:()=>({longname:"Monospace Formatting",author:"Atlassian",authorurl:"http://www.atlassian.com",version:`${h.tinymce.majorVersion}.${h.tinymce.minorVersion}`})}}const Dr=!0;function Sr(e){return e&&3===e.nodeType&&0===e.nodeValue.length}const Nr={isCursorAtStartOf(e,t){return t.collapsed&&this.isRangeAtStartOf(e,t)},isRangeAtStartOf(e,t){if(!t||!t.startContainer)throw new Error(`range is invalid. received: ${t}`);if(!e||!e.nodeType)throw new Error(`context is invalid. received: ${e}`);const n=t.startContainer;let o;if(3===n.nodeType){if(0!==t.startOffset)return!1;o=n}else if(o=n.childNodes[t.startOffset],void 0===o&&n.childNodes.length>0)return!1;const r=new h.tinymce.dom.TreeWalker(o,e);let a;do{a=r.prev(Dr)}while(Sr(a));return void 0===a},isCursorAtEndOf(e,t){return t.collapsed&&this.isRangeAtEndOf(e,t)},isRangeAtEndOf(e,t){if(!t||!t.endContainer)throw new Error(`range is invalid. received: ${t}`);if(!e||!e.nodeType)throw new Error(`container is invalid. received: ${e}`);const n=t.endContainer;let o;if(3===n.nodeType){if(t.endOffset!=n.nodeValue.length)return!1;o=n}else o=n.childNodes[0===t.endOffset?t.endOffset:t.endOffset-1];const r=new h.tinymce.dom.TreeWalker(o,e);let a;do{a=r.next(Dr)}while(Sr(a));return void 0===a||"BR"===a.nodeName&&void 0===r.next(Dr)},setCursorAtStartOfContents(e){if(!e)throw new Error("element is required.");if(1!==e.nodeType&&3!==e.nodeType)throw new Error(`invalid argument: expected a DOM element or text node, got: ${e}`);const t=h.tinymce.activeEditor,n=t.dom.createRng();["br","img"].includes(e.nodeName.toLowerCase())?(n.setStartBefore(e),n.setEndBefore(e),t.selection.setRng(n)):(t.selection.select(e,!0),t.selection.collapse(!0))},isCursorAtEnd(e,t){const n=e.selection.getSel();if(!n||!n.isCollapsed)return!1;const o=t.endContainer;if(3==o.nodeType)return o.wholeText.length==t.endOffset;const r=o.childNodes[t.endOffset];return l()(r).is(":last-child")}},Lr=Nr;function Br(e,t){const n=e.selection.getSel();if(!n||!n.isCollapsed)return!1;const o=t.startContainer;return 3==o.nodeType?!o.previousSibling&&0===t.startOffset&&function(e){if(0==l()(e).closest("td").length)return!0;let t=e.parentNode;for(;t&&"td"!=t.nodeName.toLowerCase();){if(l()(t).prevAll().contents().filter(function(){return 3==this.nodeType}).length)return!1;t=t.parentNode}return!0}(o):l()(o).is("p:first-child")?0===t.startOffset:l()(o).is(".wysiwyg-macro-body")?1==t.startOffset&&3==(r=t.startContainer.childNodes[0]).nodeType&&"\n"==r.no
6deValue:void 0;var r}function Rr(e,t,n){const o=e.dom.create("p",{},'<br data-mce-bogus="1" />');n?t.after(o):t.before(o),e.selection.select(o,!0),e.selection.collapse()}function Or(){const e=h.tinymce.activeEditor;h.tinymce.Env.browser.isFirefox()&&e.on("KeyPress",t=>{if(t.charCode==h.tinymce.util.VK.SPACE){const t=e.selection.getNode(),n=l()(t).closest("a"),o=e.selection.getRng();n.length&&Lr.isCursorAtEnd(e,e.selection.getRng())&&(o.setStartAfter(n[0]),o.setEndAfter(n[0]),e.selection.setRng(o),e.selection.collapse())}}),e.on("KeyPress",t=>{if(13==t.keyCode&&!t.shiftKey){const n=e.selection.getNode(),o=l()(n).closest("pre");if(o.length&&!h.tinymce.confluence.MacroUtils.isInMacro(o)&&Lr.isCursorAtEnd(e,e.selection.getRng()))return Rr(e,o,!0),h.tinymce.dom.Event.cancel(t);const a=l()(n).closest("blockquote");if(a.length){const o=l()(n).closest("p");if(o.is(":first-child")&&Br(e,e.selection.getRng()))return Rr(e,a,!1),h.tinymce.dom.Event.cancel(t);if(o.is(":last-child")&&function(e){const t=e.contents();if(!t.length)return!0;if(1==t.length){if(t.is("br"))return!0;if(" "==t.html()||160==t.text().charCodeAt(0))return!0;if(3==t[0].nodeType&&t[0].nodeValue==r().Rte.HIDDEN_CHAR)return!0}return!1}(o))return e.dom.remove(o[0],!1),Rr(e,a,!0),h.tinymce.dom.Event.cancel(t)}}return!0},!0)}function Pr(){l()("#property-panel [data-tooltip]").tooltip("hide")}function jr(){l()("#property-panel [data-tooltip]").tooltip(_r)}function $r(){const e=/\+/g;setTimeout(()=>{l()("#rte-savebar .aui-button[title]").each(function(){const t=l()(this);let n=t.attr("title");if(t.removeAttr("title"),i().Env.os.isMacOS()){const t=n.indexOf("(");t>=0&&(n=n.substring(0,t)+n.substring(t).replace(e,""))}t.attr("data-tooltip",n)})},0)}function Fr(e,t,n){if("dropdown"===t)if(0!=l()(".tipsy").length){if(l()(".tipsy").remove(),n&&n.trigger&&n.trigger.jquery){const e=n.trigger.data("tipsy");e&&(e.hoverState="out")}}else n&&n.trigger&&(n.trigger.tooltip("disable"),setTimeout(()=>{n.trigger.tooltip("enable")},1e3))}const _r={live:!0,gravity:"n",title:function(){return l()(this).attr("data-tooltip")||""}};function zr(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let Ur,Hr,Wr,Vr,Qr,Yr,Zr,Kr,Gr,qr,Jr,Xr;const ea=25,ta=17;let na,oa,ra,aa,ia,sa=!1;let la=function(){Yr.css({top:l()("#insert-table-dropdown").outerHeight(!0)}),la=function(){}};function ca(){Yr.hasClass("hidden")||(function(){const e=l()(h.tinymce.activeEditor.getDoc());Ur.off(".atlassian-table-picker"),e.off(".atlassian-table-picker")}(),Yr.addClass("hidden"),Hr.addClass("hidden"),Qr.removeClass("active"))}function da(e,t){g.A.debug(`setSize(${[e,t]})`),e==ra&&t==aa||(e=Math.max(1,Math.min(15,e)),t=Math.max(1,Math.min(20,t)),na=Math.max(4,e),oa=Math.max(4,t),ra=e,aa=t,Zr.width(na*ea+1),Zr.height(oa*ta+20),ga(Kr,na,oa),ga(qr,ra,aa),ga(Gr,na,1),ga(Jr,ra,1),ua(),Xr.text(`${ra} x ${aa}`))}function ua(){Gr.toggleClass("hidden",!ia),Jr.toggleClass("hidden",!ia)}function ga(e,t,n){e.width(ea*t+1),e.height(ta*n+1)}function ma(e){const t=Kr.offset(),n=t.top-Ur.scrollTop(),o=t.left-Ur.scrollLeft(),r=n+Kr.outerHeight(!0)+0,a=r-ta-0,i=o+Kr.outerWidth(!0)+0,s=i-ea-0,l=e.clientY,c=e.clientX;let d,u,m=na,p=oa;g.A.debug(`[mouseX,spLeft,spRightShrink,spRightGrow][mouseY,spTop,spBottomShrink,spBottomGrow] = ${[c,o,s,i]}/${[l,n,a,r]}`),c>i?(d=c-i,u=~~(d/ea+1),m+=u,g.A.debug(`grow: xdelta = ${u}`)):c<s&&(d=c-s,u=~~(d/ea-1),m+=u,g.A.debug(`shrink: xdelta = ${u}`)),l>r?(d=l-r,u=~~(d/ta+1),p+=u,g.A.debug(`grow: ydelta = ${u}`)):l<a&&(d=l-a,u=~~(d/ta-1),p+=u,g.A.debug(`shrink: ydelta = ${u}`)),da(m,p)}function pa(e){const t=function(e){const t=~~(e.offsetX||e.originalEvent.layerX),n=~~(e.offsetY||e.originalEvent.layerY),o=1+~~(t/ea),r=1+~~(n/ta);return o<1||o>15||r<1||r>20?null:{width:o,height:r}}(e);e.preventDefault(),fa(t)}function fa(e){if(g.A.debug(`insertTable: size = ${e&&[e.width,e.height]}`),e){ca();const t={columns:e.width,rows:e.height,options:{headerRows:ia?1:0}};h.tinymce.activeEditor.execCommand("mceInsertTable",!1,t)}}function ha(e){var t;g.A.debug(`key: ${e.charCode}/${e.keyCode}/${e.shiftKey}`),0===e.charCode&&(t=!e.shiftKey,g.A.debug(`enableHeading(${t}
6)`),t!=ia&&(ia=t,ua())),27===e.keyCode&&ca()}function ba(e){g.A.debug(`key: ${e.charCode}/${e.key}/${e.shiftKey}`),"ArrowLeft"===e.key&&(e.preventDefault(),e.stopPropagation(),da(ra-1,aa)),"ArrowUp"===e.key&&(e.preventDefault(),e.stopPropagation(),da(ra,aa-1)),"ArrowRight"===e.key&&(e.preventDefault(),e.stopPropagation(),da(ra+1,aa)),"ArrowDown"===e.key&&(e.preventDefault(),e.stopPropagation(),da(ra,aa+1)),"Enter"===e.key&&(e.preventDefault(),e.stopPropagation(),fa({width:ra,height:aa}))}function ya(){const e=l()(h.tinymce.activeEditor.getDoc());Ur.on("keydown.atlassian-table-picker",ba),e.on("keydown.atlassian-table-picker",ba)}function wa(){const e=l()(h.tinymce.activeEditor.getDoc());Ur.off(".atlassian-table-picker",ba),e.off(".atlassian-table-picker",ba)}function va(){ca()}class Ca{constructor(){zr(this,"onPickerClick",pa),zr(this,"removePopup",ca)}}(0,bn.A)("confluence-editor/table-picker",()=>new Ca);var Aa=n(4774),xa=n(287);const ka="editor-preview-iframe",Ma=""===u.A.get("remote-user"),Ea=[],Ta=[],Ia=[];let Da,Sa=!1,Na=1,La=!1,Ba=null;const Ra=e=>{h.Confluence.Editor.UI.setButtonState(e,h.Confluence.Editor.UI.saveButton),h.Confluence.Editor.UI.setButtonState(e,h.Confluence.Editor.UI.previewButton),h.Confluence.Editor.UI.setButtonState(e,h.Confluence.Editor.UI.cancelButton),l()("#rte-show-changes").length>0&&h.Confluence.Editor.UI.setButtonState(e,l()("#rte-show-changes")),l()("#rte-show-revert").length>0&&h.Confluence.Editor.UI.setButtonState(e,l()("#rte-show-revert"))},Oa=e=>{const t=(e=e||{}).messageKey||"editor-error-message",n=e.message||(0,we.A)("editor.generic.refresh"),o={title:e.title,type:"error",message:n};e.close&&l().extend(o,{close:e.close}),xa.A.handleMessage(t,o,()=>{e.disablePublish&&Ra(!1)})},Pa=()=>"limited"===u.A.get("edit-mode"),ja=e=>{let t=!0;xa.A.closeMessages(["offline-before-save-error"]);for(let n=0;n<Ta.length&&(!1===Ta[n](e)&&(t=!1),!e.isImmediatePropagationStopped());n++);if(e.isPropagationStopped())return!1;t&&!e.isDefaultPrevented()?(e.preventDefault(),Fa(e).done(za).fail($a)):e.preventDefault()},$a=e=>{const t=e||{};Oa({messageKey:t.messageKey||"offline-before-save-error",message:t.disablePublish?(0,we.A)("editor.generic.refresh"):(0,we.A)("editor.offline.before.save.error"),disablePublish:t.disablePublish}),e&&(0,B.hZ)("analytics",{name:"editor.save.error."+e.origin+"."+e.cause}),h.Confluence.Editor.UI.toggleSavebarBusy(!1),h.Confluence.Editor.Drafts.bindUnloadMessage()};let Fa=e=>{const t=l().Deferred();return t.resolve(e),t.promise()};const _a=()=>{const e=()=>{La=!0,l()(h.Confluence.Editor.getCurrentForm()).trigger("submit"),(0,B.hZ)("analytics",{name:"confluence.editor.close",data:{source:"publishButton"}})},t=h.Confluence.Editor.Drafts.getDraftSavingPromise();t?t.always(e):e()};let za=_a;const Ua=function(){for(let e=0;e<Ea.length;e++)h.Confluence.Editor.UI.cancelButton.click(Ea[e]);const e=l()(h.Confluence.Editor.getCurrentForm());for(let t=0;t<Ia.length;t++)e.on("submit",Ia[t]);(0,B.Nw)("init.rte",this)},Ha=(e,t,n,o)=>{o.push(n),r().Rte&&r().Rte.BootstrapManager&&r().Rte.BootstrapManager.isInitComplete()?e.on(t,n):Sa||(Sa=!0,l().bind("init.rte",Ua))},Wa=(e,t,n)=>{var o;let a=null,i=n.pop();for(null!==r()&&void 0!==r()&&null!==(o=r().Rte)&&void 0!==o&&null!==(o=o.BootstrapManager)&&void 0!==o&&o.isInitComplete()&&(a=(e,t,n)=>{e.off(t,n)});i;){var s;null===(s=a)||void 0===s||s(e,t,i),i=n.pop()}},Va=()=>{const e=u.A.getBoolean("shared-drafts"),t=["page","blogpost"].includes(u.A.get("content-type")),n="0"!==r().params.pageId;return t&&(n||e)},Qa=e=>{l()("#editpageform").find("input[name='atl_token']").val(e),u.A.set("atl-token",e),u.A.set("atlassian-token",e),l()("#atlassian-token").attr("content",e)},Ya=()=>{var e,t;return null==h.tinymce.activeEditor?(g.A.debug("Confluence.Editor: editorHasContentChanged - No active editor present. Returning false."),!1):null===r()||void 0===r()||null===(e=r().Rte)||void 0===e||null===(e=e.Content)||void 0===e||null===(t=e.editorHasContentChanged)||void 0===t?void 0:t.call(e)},Za=(()=>{let e;const t=t=>{e!==t&&(e&&e.clear(),t.start(h.Confluence.Editor.heartbeat),e=t)},n=u.A.getNumber("heartbeat-interval")||3e4,o=(()=>{let e;return{start:t=>{g.A.debug("Changing heartbeat to the normal scheduler"),e=setInterval(t,n)},clear:()=>{clearInterval(e)}}})(),r=(()=>{const e=Math.max(n/5,5e3);let t,o;return{start:n=>{g.A.debug("Changing heartbeat to the recovery scheduler"),o=0;const r=()=>{n();const a=e*Math.pow(2,o);t=setTimeout(r,Math.min(a,3e5)),o++};t=setTimeout(r,e)},clear:()=>{clearTimeout(t)}}})();return{normal:()=>t(o),recovery:()=>t(r),reset:()=>{var t;null===(t=e)||void 0===t||t.clear(),e=o,e.start(h.Confluence.Editor.heartbeat)},cleanup:()=>{var t,n;e&&(e.clear(),e=null),null===(t=Da)||void 0===t||null===(n=t.abort)||void 0===n||n.call(t)}}})(),Ka=e=>{(0,Aa.setVisible)("#wysiwyg",e),l()(".toolbar-group-preview").toggleClass("hidden",!e),l()(".toolbar-group-edit").toggleClass("hidden",e),l()("#main").toggleClass("active-richtext",e)},Ga=e=>{if("comment"!==u.A.get("content-type")){const e=l()("#content-title");e.hasClass("placeholded")?(l()("#preview-title-text").text(""),l()("#title-text").text("")):(l()("#preview-title-text").text(e.val()),l()("#title-text").text(e.val()))}(0,Aa.setVisible)("#preview",e),l()(".toolbar-group-preview").toggleClass("hidden",e),l()(".toolbar-group-edit").toggleClass("hidden",!e),l()("#main").toggleClass("active-preview",e),l()("#full-height-container").length&&l()("#full-height-container").toggleClass("active-preview",e)},qa=e=>{g.A.debug("Set mode: "+e),e===h.Confluence.Editor.MODE_RICHTEXT?(Ka(!0),Ga(!1)):e===h.Confluence.Editor.MODE_PREVIEW&&(Ga(!0),Ka(!1),h.Confluence.Editor.UI.spinner.removeClass("aui-icon-wait"),h.Confluence.Editor.UI.spinner.spinStop()),setTimeout(()=>{const e=l()(".toolbar-group-preview");e.height(0),e.height(),e.height("auto")},1),Ba=e,l()(document).trigger("mode-changed",[e])},Ja=(e,t={})=>
6{if(g.A.debug("Change mode: "+e),ei()&&!r().Rte.BootstrapManager.isInitComplete())return!1;if(Ba===e)return!1;const n=Ba;if((0,B.hZ)("rte-changeMode",e),e===h.Confluence.Editor.MODE_PREVIEW){const o=h.tinymce.activeEditor;h.tinymce.Env.browser.isFirefox()&&n===h.Confluence.Editor.MODE_RICHTEXT&&!h.Confluence.Editor.bookmark&&(h.Confluence.Editor.bookmark=h.tinymce.activeEditor.selection.getBookmark()),Ba=e;const a={contentId:h.Confluence.getContentId(),contentType:u.A.get("content-type"),spaceKey:u.A.get("space-key"),xHtml:o.getContent(),outputType:h.Confluence.Editor.PREVIEW_OUTPUT_TYPE};r().safe.ajax({type:"POST",url:y.Y+"/pages/rendercontent.action",data:a,success:Xa,timeout:2e4,error:()=>{var e;(0,B.hZ)("rte-preview-action-selected"),(0,B.hZ)("rte.preview.error",{status:0}),xa.A.closeMessages(["server-offline"]),Oa({messageKey:"server-offline",message:(0,we.A)("editor.offline.preview.error"),disablePublish:!1}),h.Confluence.Editor.currentEditMode=n,null===(e=t.errorCallback)||void 0===e||e.call(t)}}).always(()=>{u.A.getBoolean("shared-drafts")&&["page","blogpost"].includes(u.A.get("content-type"))&&h.Confluence.Editor.Drafts.save({skipErrorHandler:!0})})}else qa(e);if(e===h.Confluence.Editor.MODE_RICHTEXT&&l()(document).trigger("resize.resizeplugin"),n===h.Confluence.Editor.MODE_PREVIEW){const e=document.getElementById(ka);if(e){var o;const t=e.contentDocument||(null===(o=e.contentWindow)||void 0===o?void 0:o.document);null==t||t.removeChild(t.documentElement),l()(e).remove()}}return!1},Xa=e=>{var t;(0,B.hZ)("rte-preview-action-selected"),l()("#preview-error").remove(),h.tinymce.activeEditor.setProgressState(!0);const n=l()("#previewArea"),o=l()(`<iframe id="${ka}" src="about:blank" scrolling="yes" frameborder="0"></iframe>`);n.html(o);const r=o[0].contentDocument||(null===(t=o[0].contentWindow)||void 0===t?void 0:t.document);null==r||r.open(),null==r||r.write(e),null==r||r.close()},ei=()=>Ba===h.Confluence.Editor.MODE_RICHTEXT,ti=()=>{const e=h.tinymce.activeEditor.getBody();switch(u.A.get("content-type")){case"template":e.setAttribute("aria-label",(0,we.A)("template.content.ariaLabel"));break;case"page":e.setAttribute("aria-label",(0,we.A)("page.content.ariaLabel"));break;case"blogpost":e.setAttribute("aria-label",(0,we.A)("blogpost.content.ariaLabel"));break;case"comment":e.setAttribute("aria-label",(0,we.A)("quick.comment.label.message"));break;default:e.setAttribute("aria-label",(0,we.A)("content.ariaLabel"))}g.A.debug("Set aria-label to editor")},ni={bookmark:"",MODE_RICHTEXT:"richtext",MODE_PREVIEW:"preview",PREVIEW_OUTPUT_TYPE:"PREVIEW",currentEditMode:Ba,contentHasChangedSinceLastSave:!1,sourceInitialValue:!1,isPublishing:e=>(void 0!==e&&(La=e),La),isLimitedModeEnabled:Pa,overrideBeforeSave:e=>{Fa=e},overrideSave:e=>{za=e},restoreDefaultSave:()=>{za=_a},getNumConcurrentEditors:()=>Na,addCancelHandler:e=>Ha(h.Confluence.Editor.UI.cancelButton,"click",e,Ea),addSaveHandler:e=>Ta.push(e),addSubmitHandler:e=>Ha(l()(h.Confluence.Editor.getCurrentForm()),"submit",e,Ia),removeAllCancelHandlers:()=>Wa(h.Confluence.Editor.UI.cancelButton,"click",Ea),removeAllSaveHandlers:()=>Wa(h.Confluence.Editor.UI.saveButton,"click",Ta),removeAllSubmitHandlers:()=>Wa(l()(h.Confluence.Editor.getCurrentForm()),"submit",Ia),hasContentChanged:()=>!!ei()&&Ya(),isEmpty:()=>!l()(h.tinymce.activeEditor.getContent()).text().trim(),getCurrentTitle:()=>{var e;return null===(e=l()("#content-title"))||void 0===e?void 0:e.val()},contentFormSubmit:()=>(!Pa()&&h.Confluence.Editor.Drafts.isSharedDraftsEnabled()||h.Confluence.Editor.Drafts.unBindUnloadMessage(),l()(".editable-title #content-title").prop("disabled",!0),!0),metadataSyncRequired:Va,heartbeat:()=>{const e={dataType:"json",contentId:u.A.get("content-id"),draftType:u.A.get("content-type"),spaceKey:r().params.spaceKey,contributorsHash:u.A.get("contributors-hash")};Da=r().safe.post(y.Y+"/json/startheartbeatactivity.action",e,e=>{if(!Va()&&e)return Qa(e.atlToken),u.A.set("shared-drafts","legacy"!==e.editMode),void(0,B.hZ)("rte.heartbeat",e);if(!(null!=e&&e.atlToken&&e.activityResponses instanceof Array))return(0,B.hZ)("rte.heartbeat-error","Invalid server response"),g.A.error("Unexpected server response for heartbeat:"),void g.A.error(e);u.A.set("contributors-hash",e.contributorsHash),u.A.set("shared-drafts","legacy"!==e.editMode);const t=e.activityResponses;if(Qa(e.atlToken),h.Confluence.Editor.heartbeatType.normal(),(0,B.hZ)("rte.heartbeat",t),Na=(t.length||0)+1,Na>1){const e=Ma?l()("#other-users-span"):0===l()("#reliable-other-users-span").length?l()("<span id='reliable-other-users-span'></span>"):l()("#reliable-other-users-span");e.empty();for(let n=0;n<Na-1;++n){n>0&&e.append(", ");const o=t[n];e.append(l()("<a></a>").attr("href",y.Y+"/display/~"+encodeURIComponent(o.userName)).text(o.fullName)),null!=o.lastEditMessage&&e.append(" ").append(l()("<sp
6an></span>").addClass("smalltext").text(o.lastEditMessage))}Ma||xa.A.isDisplayed(["heartBeat"])||""===e.html().trim()||xa.A.handleMessage("heartBeat",{type:"info",message:(0,we.A)("heartbeat.page.edited.info","<span id='reliable-other-users-span'>"+e.html()+"</span>")}),l()("#heartbeat-div").hasClass("hidden")&&r().Confluence.Analytics.publish("rte.notification.concurrent-editing",{numEditors:Na,pageId:r().params.pageId,draftType:r().params.draftType})}!Ma&&Na<=1&&xa.A.closeMessages(["heartBeat"]),(0,Aa.setVisible)("#heartbeat-div",Na>1),l()(document).trigger("resize.resizeplugin"),(0,B.hZ)("editor-heartbeat",e),(e=>{let t;if(e!==u.A.get("edit-mode")){if("collaborative"===e&&"limited"!==u.A.get("edit-mode"))return;u.A.set("edit-mode",e),t="collaborative"===e?(0,we.A)("editor.collaborative.mode.enabled"):(0,we.A)("editor.collaborative.mode.disabled"),Oa({messageKey:"edit-mode-transition",message:t,disablePublish:!0})}})(e.editMode)},"json").fail((e,t,n)=>{(e.status>=500||0===e.status)&&h.Confluence.Editor.heartbeatType.recovery(),403===e.status||401===e.status?g.A.error("Heartbeat error: Unauthorized"):405===e.status?g.A.error("Heartbeat error: Method not allowed"):(g.A.error("Server error on heartbeat request:"),g.A.error(n)),(0,B.hZ)("rte.heartbeat-error",e)})},heartbeatType:Za,disableFrame:e=>{l()("form",e).each(function(){l()(this).off(),this.onsubmit=()=>!1}),l()("a",e).each(function(){const e=l()(this),t=e.attr("href");e.off(),t&&"#"!==t.charAt(0)&&(e.attr("target","_top"),e.on("click",t=>{t.preventDefault(),e.trigger("blur")}))}),l()("input, img",e).each(function(){l()(this).off()})},previewFrameOnload:(e,t)=>{h.Confluence.Editor.setMode(h.Confluence.Editor.MODE_PREVIEW),h.tinymce.activeEditor.setProgressState(!1),h.Confluence.Editor.disableFrame(e),l()(".tipsy").remove();const n=l()("#main",e)[0];if("comment"!==u.A.get("content-type")&&0===l()(n).find("#main-header").length){const e=l()("#title-heading"),t=e.attr("class");l()(n).prepend(`<div id="preview-header"><div id="title-heading" class="${t||""}">${(null==e?void 0:e.html())||""}</div></div>`)}if(l()(h.tinymce.activeEditor.getBody()).hasClass("resizable")){const e=l()(t||"#previewArea iframe");let o,r=0,a=0;const i=e.height();n&&function t(){if(!l()("#editor-preview-iframe").length)return;const s=l()(n).outerHeight(!0);r!==s?(s!==e.height()&&e.height(0).height(Math.max(s,i)),r=s,a=0):a++,a<500&&(o=setTimeout(t,500))}(),l()(document).one("mode-changed.resize-editor",function(e,t){t!==h.Confluence.Editor.MODE_PREVIEW&&o&&clearTimeout(o)})}},showPreview:Ga,setMode:qa,getContentId:()=>h.Confluence.getContentId(),addErrorMessage:(e,t,n)=>{let o=l()("#"+e);const a=n?"#any-messages":"#editor-messages";o.length?o.empty():o=l()("<div></div>").attr("id",e).appendTo(a),r().messages.error(o,{closeable:!0,body:t})},inRichTextMode:ei,isNewPage:()=>l()("#createpageform, #createpagetemplate").length>0,onInit:()=>{h.Confluence.Editor.setMode(h.Confluence.Editor.MODE_RICHTEXT),h.tinymce.activeEditor.on("click",()=>{const e=h.Confluence.Editor.UI.postingDatePicker;null==e||e.hide()})},getCurrentForm:()=>h.tinymce.activeEditor.formElement,setToolBarInactive:e=>l()("#rte-toolbar").toggleClass("disabled",e),isVisible:()=>l()("#wysiwyg:visible").length>0||l()("#preview:visible").length>0,setAriaLabelByContentType:ti};function oi(){const e=h.Confluence.Editor,t="disabled";let n=!1;function o(e){const t=l()(e),n=()=>{e.hideAll(!1)};t.on("aui-dropdown2-show",()=>{const e=h.tinymce.activeEditor;e.on("Click",n),e.on("KeyUp",n)}),t.on("aui-dropdown2-hide",()=>{const e=h.tinymce.activeEditor;e.off("Click",n),e.off("KeyUp",n)})}function r(e,o){if(!n){const e=c(o);l()(`#${e}`).removeClass(t).find("a, button, input").removeAttr("aria-disabled")}}function a(e,n){const o=c(n);l()(`#${o}`).addClass(t).find("a, button, input").attr("aria-disabled","true")}function i(e,o){o?e.closest(".aui-button").prop(t,!0).attr("aria-disabled","true").toggleClass(t,o):n||e.closest(".aui-button").prop(t,!1).removeAttr("aria-disabled").toggleClass(t,o)}function s(e,o,r,a){const i=!!n||e,s=!!n||o,c=!!n||r,d=l()("#toolbar"),u=d.find(".toolbar-item"),g=d.find(".toolbar-item:not(.toolbar-contextual *)"),m=l()("#insert-menu, #more-menu"),p=l()("#insert-menu, #color-picker-control"),f=l()("#format-dropdown"),h=a||function(){return!0};u.toggleClass(t,i),m.toggleClass(t,i),p.toggleClass(t,i),i?g.find("a, button, input").attr("aria-disabled","true"):g.find("a, button, input").removeAttr("aria-disabled"),f.toggleClass(t,!!s),f.find(".aui-dropdown2-trigger").attr("aria-disabled",s?"true":null),i?(sa=!0,Wr.addClass("disabled")):(sa=!1,Wr.removeClass("disabled"),Vr.attr("data-tooltip",(0,we.A)("tinymce.tablepicker.insert_table_title"))),void 0!==c&&d.find("button, input").filter(h).toggleClass(t,c).prop(t,c)}function c(e){let t="default";return e&&e.id&&(t=e.id),`rte-toolbar-row-${t}`}function d(e){return l()(`#${e}`).length>0}let u;function m(e,t){let n=t.animate;null==n&&(n=!0);const o=function(){l()(this).remove(),Mt(document,"resize.resizeplugin"),t.onHide&&t.onHide()};clearTimeout(u),u=window.setTimeout(()=>{const e=c(t),r=l()(`#${e}`);n?r.slideUp(400,o):(r.hide(),o.call(r))},100)}function p(e,t){if(n)return;const o=c(t);let r=t.animate;if(null==r&&(r=!0),d(o))return void l()(`#${o}:hidden`).slideDown(400,()=>{g.A.debug("Prevented toolbar deferred display race condition")});const a=l()("<div></div>").addClass("toolbar-split toolbar-split-row toolbar-contextual");a.attr("id",o),t.editorAdjacent&&a.addClass("editor-adjacent");const i=t.topToolbar?l()("#rte-toolbar:visible"):l()("#rte-savebar:visible");for(let e=0,n=t.buttons.length;e<n;e++){const n=t.buttons[e];a.append(n.render())}if(a.css({display:"none"}),t.editorAdjacent)i.append(a);else{const e=l()(".editor-adjacent",i).filter(":first");e.length?e.before(a):i.append(a)}a[0].querySelectorAll(".toolbar-dropdown aui-dropdown-menu").forEach(e
6=>{f(e)});const s=()=>{Mt(document,"resize.resizeplugin"),Mt(document,"shown.contextToolbar"),t.onVisible&&t.onVisible()};clearTimeout(u),u=window.setTimeout(()=>{r?a.slideDown(400,s):(a.show(),s())},100)}function f(e){const t=e instanceof Element?e:document.querySelector(e);t&&(t.querySelectorAll("aui-item-link").forEach(e=>{e.addEventListener("click",e=>{(e=>{t.hide(),h.tinymce.activeEditor.focus(),window.dispatchEvent(new CustomEvent("editor-custombar-on-click",{detail:{originEvent:e}})),setTimeout(()=>{e.defaultPrevented?window.dispatchEvent(new CustomEvent("editor-custombar-on-click-default-prevented",{detail:{originEvent:e}})):(window.dispatchEvent(new CustomEvent("editor-custombar-on-click-exec-default",{detail:{originEvent:e}})),function(e){if(!n){var t;"AUI-ITEM-LINK"===(null===(t=e)||void 0===t||null===(t=t.parentElement)||void 0===t?void 0:t.tagName)&&(e=e.parentElement);const n=e.getAttribute("data-macro-name"),o=e.getAttribute("data-command"),r=e.getAttribute("data-format"),a=e.getAttribute("data-control-id"),i=h.tinymce.activeEditor;n&&Qn.macroBrowserToolbarButtonClicked({presetMacroName:n}),o&&i.execCommand(o,!1),r&&i.plugins.atlassiantheme.controlHandlers.formatselect.click.dispatch(r),a&&i.plugins.atlassiantheme.controlHandlers.buttons.click.dispatch(a.toLowerCase())}}(e.target))})})(e)}),e.addEventListener("keydown",t=>{"Enter"===t.key&&(t.preventDefault(),t.stopPropagation(),e.click())})}),o(t))}return{init(n){f("#format-dropdown aui-dropdown-menu"),f("#more-menu .aui-dd-parent aui-dropdown-menu"),f("#insert-menu .aui-dd-parent aui-dropdown-menu"),l()("#pagelayout-menu aui-dropdown-menu").length&&f("#pagelayout-menu .aui-dd-parent aui-dropdown-menu"),l()("#template-menu aui-dropdown-menu").length&&f("#template-menu .aui-dd-parent aui-dropdown-menu"),function(){const e=l()("#color-picker-control"),t=1==e.length&&e[0].querySelector("#color-picker-control aui-dropdown-menu");if(!t)return;const n=l()("#rte-button-color"),r=n.find(".selected-color"),a=n.attr("data-color");Ue().isEnabled("confluence.dark.theme.text.colors")?r.css("background-color",a):r.css("background-color",`#${a}`),e.on("click keydown","aui-item-link[data-color], #rte-button-color[data-color]",function(e){if("keydown"===e.type&&"Enter"!==e.key)return;const t=this.getAttribute("data-color");e.preventDefault(),this.closest(".disabled")||(Ue().isEnabled("confluence.dark.theme.text.colors")?(h.tinymce.execCommand("ForeColor",!1,`${t}`),r.css("background-color",`${t}`)):(h.tinymce.execCommand("ForeColor",!1,`#${t}`),r.css("background-color",`#${t}`)),n.attr("data-color",t))}),o(t)}(),Ur=l()(document),Wr=l()("#insert-table-dropdown"),Vr=l()("#rte-button-insert-table"),Qr=Wr.find(".aui-dd-parent"),Yr=l()("#table-picker-container"),Zr=Yr.find(".table-picker-box").attr("tabindex",0).attr("role","application"),Zr.on("focusin",ya),Zr.on("focusout",wa),Kr=Yr.find(".picker-cell"),Gr=Yr.find(".picker-heading"),qr=Yr.find(".picker-selected-cell"),Jr=Yr.find(".picker-selected-heading"),Xr=Zr.find(".desc"),Hr=l()("<div></div>").attr("id","table-picker-backdrop").addClass("hidden").appendTo(Wr),Vr.on("click",e=>{e.preventDefault(),sa||(It(),la(),ia=!0,da(1,1),function(){const e=l()(h.tinymce.activeEditor.getDoc());Ur.on("mousemove.atlassian-table-picker",ma),Ur.on("keydown.atlassian-table-picker",ha),Ur.on("keyup.atlassian-table-picker",ha),e.on("keydown.atlassian-table-picker",ha),e.on("keyup.atlassian-table-picker",ha)}(),Hr.removeClass("hidden"),Yr.removeClass("hidden"),Qr.addClass("active"),Vr.trigger("focus"))}),Hr.on("click",va),qr.on("click",pa),Jr.on("click",pa),function(){const t=l()("#rte-button-source-mode");t.on("click",()=>{t.hasClass("active")?Ja(e.MODE_RICHTEXT):Ja(e.MODE_SOURCE)})}(),function(e){Mt(document,"initContextToolbars.Toolbar",e),xt(document,"createContextToolbarRow.Toolbar",p),xt(document,"removeContextToolbarRow.Toolbar",m),xt(document,"enableContextToolbarRow.Toolbar",r),xt(document,"disableContextToolbarRow.Toolbar",a)}(n);const i=l()("#format-dropdown"),c=i.find("#format-dropdown-display");n.on("BeforeExecCommand",e=>{const t=e.command,o=e.value;if(l().each(["pre","blockquote"],function(){"FormatBlock"==t&&o==this&&(n.formatter.remove("alignleft"),n.formatter.remove("aligncenter"),n.formatter.remove("alignright"))}),l()(n.selection.getNode()).closest("pre,.text-placeholder").length){const n=["Bold","Italic","Underline","Strikethrough","InsertUnorderedList","InsertOrderedList","InsertInlineTaskList","InsertInlineTaskListNoToggle","superscript","subscript","mceConfMacroBrowser","mceConfimage","mceConfAttachments","mceEmotion","InsertWikiMarkup","mceConflink","mceInsertTable","mceConfAutocompleteLink"],o=n.length;for(let r=0;r<o;r++)t==n[r]&&e.preventDefault()}if("FormatBlock"==t&&"pre"==o&&(n.undoManager.add(),n.execCommand("removeFormat")),"FormatBlock"==t&&"p"==o){const e=i.find(".dropdown-item[data-format='blockquote']").text();c.text()==e&&n.execCommand("FormatBlock",!1,"blockquote")}}),n.on("ExecCommand",e=>{const t=e.command,n=e.value;if("FormatBlock"==t){let e=i.find(`.dropdown-item[data-format='${n}']`);e.length||(e=i.find(".dropdown-item[data-format='p']")),c.text(e.text())}}),n.on("NodeChange",e=>{const n=e.element,o=(e=>{const t=l()(e).closest("PRE,BLOCKQUOTE,.text-placeholder");return e=>t.is(e)})(n),r=o("BLOCKQUOTE"),a=o("PRE"),i=o(".text-placeholder");let c;a?(c=l()(n).parents("table").is("[data-macro-body-type='PLAIN_TEXT']"),s(!0,c)):i?s(!0):r?(s(!1),l()("#rte-button-justifyleft, #rte-button-justifycenter, #rte-button-justifyright").toggleClass(t,!0)):s(!1)}),n.on("init",()=>{g.A.debug("customtoolbar: ed.onInit function");const e={};l()(".aui-toolbar-confluence").find("[data-control-id]").each((t,o)=>{let r;const a=l()(o),s=a.attr("data-control-id");s&&("formatselect"==s?(r=n.plugins.atlassiantheme.controlHandlers[s],r.state.add(e=>{if("p"==e){const t=n.selection.getNode();l()(t).closest("p").parent().is("blockquote")&&(e="blockquote")}const t=i.find(`.dropdown-item[data-format='${e}']`).text();t&&c.text(t)})):e[s.toLowerCase()]=a)});const t=n.plugins.atlassiantheme.controlHandlers.buttons;t.state.add((t,n,o)=>{const r=e[t];if(!r)return;
6const a=r.find(".icon-check"),i=r.closest(".toolbar-item");a.length?a.toggleClass("hidden",!o):i.toggleClass(n,o)}),l()(".aui-toolbar-confluence").on("click",".toolbar-item",function(e){const n=l()(this);if(n.hasClass("disabled"))e.preventDefault();else{const o=n.children(".toolbar-trigger[data-control-id]").attr("data-control-id");o&&(t.click.dispatch(o.toLowerCase()),e.preventDefault())}}),g.A.debug("customtoolbar: finished ed.onInit function"),function(){const e={..._r,gravity:"n"},t={..._r,gravity:"w"},n={..._r,gravity:"s"};l()(document).tooltip({...n,live:"#rte-savebar [data-tooltip]"}),l()(document).tooltip({...e,live:"#rte-toolbar [data-tooltip]:not(.dropdown-item)"}),l()(document).tooltip({...t,live:"#rte-toolbar .dropdown-item[data-tooltip]"}),l()("#editor-precursor [data-tooltip]").tooltip(e),l()("#property-panel [data-tooltip]").tooltip(e),xt(document,"showLayer",Fr),xt(document,"hideLayer",Fr),(0,B.oI)("created.property-panel",jr),(0,B.oI)("destroyed.property-panel",Pr),(0,B.oI)("register-contexts.keyboardshortcuts",$r)}()}),n.on("Remove",()=>{kt(document,"showLayer",Fr),kt(document,"hideLayer",Fr),(0,B.Nw)("created.property-panel",jr),(0,B.Nw)("destroyed.property-panel",Pr),(0,B.Nw)("register-contexts.keyboardshortcuts",$r)})},toggleToolbarButton:i,disableToolbarButton:function(e){i(l()(`.${e.replace(".","")}`),!0)},enableToolbarButton:function(e){n||i(l()(`.${e.replace(".","")}`),!1)},focusToolbarButton:function(e){n||l()(`.${e.replace(".","")}`).closest(".aui-button").trigger("focus")},isToolbarRowEnabled:function(e){const n=c({id:e});return d(n)&&!l()(`#${n}`).hasClass(t)},getToolbarRow:function(e){const t=c({id:e}),n=l()(`#${t}`);return n.length?n[0]:null},isToolbarButtonEnabled:function(e){return!l()(`.${e.replace(".","")}`).closest(".aui-button").prop(t)},bindDropdownMenu:f,toggleToolbarButtons:s,disableToolbar:function(e){n=!!e},getInfo:()=>({longname:"customtoolbar",author:"Atlassian",authorurl:"http://www.atlassian.com",infourl:"http://www.atlassian.com/",version:"1.0"})}}function ri(){const e={Button:function(e){const t=e.text,n=e.tooltip,o=e.triggerText,r=e.iconClass,a=e.click,i=!!e.disabled,s=e.id,c=e.iconSVG;this.render=()=>{const e=l()('<button type="button"></button>').addClass("aui-button aui-button-subtle").attr("data-tooltip",n||t);if(s&&e.attr("id",s),i&&e.prop("disabled",!0).attr("aria-disabled","true"),e.on("click",t=>{e.prop("disabled")||a(t)}),r||c){const n=l()("<span />");n.addClass("icon"),r?(n.addClass(r),n.text(t)):c&&(n.addClass("icon-svg"),n.html(c)),e.append(n)}if(o){const t=l()("<span />");t.addClass("trigger-text"),t.text(o),e.append(t)}return e[0]}},DropDownButton:function(e){const t=e.id,n=e.tooltip,o=e.text||"",r=e.iconClass,a=!!e.disabled,i=e.dropDownContent,s=e.dropdownId;this.render=function(){const e=l()("<div></div>").addClass("toolbar-item").addClass("toolbar-dropdown").attr("data-tooltip",n);e.attr("id",t);const c=l()("<div/>").addClass("aui-dd-parent"),d=l()("<button class='aui-button aui-button-subtle aui-dropdown2-trigger'></button>");if(d.attr("aria-controls",s),o&&d.append(`<span class="dropdown-text">${o}</span>`),a&&(e.addClass("disabled"),d.addClass("disabled")),r){const e=l()("<span />");e.addClass(`icon ${r}`),e.text(o),d.append(e)}return c.append(d),c.append(i),e.append(c),e[0]}},TextButton:function(e){const t=e.text,n=e.textClass,o=e.click,r=!!e.disabled,a=e.tooltip;this.render=()=>{const e=l()('<button type="button"></button>').addClass("aui-button aui-button-subtle").addClass(n).text(t);return a&&e.attr("data-tooltip",a),r&&e.prop("disabled",!0).attr("aria-disabled","true"),e.on("click",t=>{e.prop("disabled")||o(t)}),e[0]}},TextBox:function(e){const t=e.id,n=e.text,o=e.name,r=e.keydown,a=e.cssClass;this.render=function(){const e=l()("<div></div>").addClass("toolbar-item");e.append(l()(`<label for="${t}">${n}</label>`));const i=l()(`<input id="${t}" type="text" name="${o}" class="${a} text" autocomplete="off">`);return i.on("keydown",e=>{r(e)}),e.append(i),e[0]}},Group:function(e,t){const n=e;this.render=function(){const e=l()("<div></div>");e.addClass("aui-buttons"),t&&(t.id&&e.attr("id",t.id),t.groupClass&&e.addClass(t.groupClass));for(let t=0,o=n.length;t<o;t++)e.append(n[t].render());return e[0]}},SplitGroup:function(e,t){const n=e,o=t&&t.dropDownOptions||{};this.render=function(){const e=l()("<div></div>");e.addClass("aui-buttons"),t&&(t.id&&e.attr("id",t.id),t.groupClass&&e.addClass(t.groupClass));for(let t=0,o=n.length;t<o;t++)e.append(n[t].render());return e.append(function(){const e=o.id,t=o.dropdownId,n=o.disabled,r=o.dropDownContent,a=o.title,i=o.alignment,s=l()("<div></div>").addClass("toolbar-item").addClass("toolbar-dropdown").addClass("toolbar-splitbutton");e&&s.attr("id",e),a&&s.attr({"data-tooltip":a}),i&&s.data("dropdown-alignment",i);const c=l()("<div/>").addClass("aui-dd-parent"),d=l()("<button class='aui-button aui-button-subtle aui-dropdown2-trigger'></button>");return d.attr("aria-controls",t),n&&(s.addClass("disabled"),d.addClass("disabled")),c.append(d),c.append(r),s.append(c),s[0]}()),t&&t.postProcess&&t.postProcess(e),e[0]}}};return window.Confluence.Editor.Toolbar={},window.Confluence.Editor.Toolbar.Components=e,e}const ai=[];var ii=n(3038),si=n.n(ii);const li={top:"table-align-top",middle:"table-align-middle",bottom:"table-align-bottom"},ci=li.top,di=(e,t)=>{const n=Object.values(li).map(e=>document.querySelector(`#${e}`));let o=!1;
6return null==n||n.forEach(n=>{if(n)return n.id===(null==t?void 0:t.id)?n.classList.contains("active")?(n.classList.remove("active"),e.execCommand("JustifyTop")):(o=!0,void(n.id!==ci&&n.classList.add("active"))):n.classList.remove("active")}),o};var ui=n(8917),gi={};gi.styleTagTransform=On(),gi.setAttributes=Nn(),gi.insert=Dn().bind(null,"head"),gi.domAPI=Tn(),gi.insertStyleElement=Bn(),Mn()(ui.A,gi),ui.A&&ui.A.locals&&ui.A.locals;var mi=n(6323);const pi=["data-theme","data-color-mode"];function fi(e){try{const t=document.documentElement,n=e.contentDocument.documentElement;for(const e of pi){let o=t.getAttribute(e);o&&("data-theme"===e&&(o=hi(o)),n.setAttribute(e,o))}}catch(e){g.A.error("Failed to add theme attributes to editor document",e)}}function hi(e){return e.match(/light:[^ ]+/)?e:`${e.replace(/light:[^ ]+/,"").trim()} light:original`}function bi(e){const t=new mi.A(()=>{fi(e)});e.on("init",()=>{fi(e),t.observe()}),e.on("remove",()=>{t.disconnect()})}function yi(){return{init(e){e.addCommand("mceDelete",(t,n)=>(function(){if(c()){const t=e.selection.getRng();if(!t||t.collapsed)return!1;const n=l()(t.startContainer).closest(".wysiwyg-macro-body",e.getBody())[0];if(n&&Lr.isRangeAtStartOf(n,t)&&Lr.isRangeAtEndOf(n,t)){const t=l()(n.firstChild).is("pre")?"pre":"p",o=l()(`<${t}><br data-mce-bogus="1"></${t}>`)[0];return l()(n).html(o),e.selection.select(o,!0),!0}}return!1}()||e.getDoc().execCommand("Delete",t),!1))},getInfo:()=>({longname:"Delete Command Plugin",author:"Atlassian",authorurl:"http://www.atlassian.com",version:`${h.tinymce.majorVersion}.${h.tinymce.minorVersion}`})}}var wi=n(7602),vi={};vi.styleTagTransform=On(),vi.setAttributes=Nn(),vi.insert=Dn().bind(null,"head"),vi.domAPI=Tn(),vi.insertStyleElement=Bn(),Mn()(wi.A,vi),wi.A&&wi.A.locals&&wi.A.locals;const Ci=function(){const e=h.Confluence.PropertyPanel;let t,n,o,r,a,i,s,u,m,p,f,b,y;const w=[800,800,400,400,400,300,300,300,300,300,300,300,300,300,300,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100],v="confluence.draggable-plugin",C="p,h1,h2,h3,h4,h5,h6,blockquote,li,td,th,img",A="li,td,th";function x(e){if(1!==e.which)return;if(e.target!==e.currentTarget)return;if(m)return void T(e);m=l()(e.target),t.selection.select(e.target),e.preventDefault(),o.on({"mousemove.moveable-zone":E,"mouseup.moveable-zone":T,"keydown.moveable-zone":k,"mouseover.moveable-zone":M});const n=m.offset();var r;s=e.pageX,u=e.pageY,a=n.top-u,i=n.left-s,f=!0,p=(r=m).attr("style")||"",m=r}function k(e){27===e.keyCode&&(b.cancelScrolling(),o.off(".moveable-zone"),t.undoManager.undo(),t.selection.select(m[0]),t.selection.collapse(!1),m=null)}function M(){o.find(".mceSelected").removeClass("mceSelected")}function E(c){if(f){if(function(e){const t=Math.abs(s-e.pageX),n=Math.abs(u-e.pageY);return t<10&&n<10}(c))return;It(),t.undoManager.beforeChange(),t.undoManager.typing=!0,t.undoManager.add(),(0,B.hZ)("synchrony.stop",{id:v}),function(){const e=t.selection.getSel();e&&e.removeAllRanges&&e.removeAllRanges()}(),m.css({position:"absolute",width:m.css("width"),"max-width":"50%"}),e.current&&e.destroy(),m.detach(),r.append(m),y=function(e){const n=!!r.children(".contentLayout,.contentLayout2").length;function a(){return o.find("#move-indicator")}function i(e){return"move-indicator"===e.attr("id")}function s(e){return n?e.is("div.innerCell,div.cell"):e.is("body")}function c(e,t,n){if(e.is("img")){const n=function(e,t){const n=e.offset();return t+o.scrollLeft()-n.left}(e,t);return n<e.width()/2}return u(e,n)<e.height()/2}function u(e,t){const n=e.offset();return t+o.scrollTop()-n.top}return{positionNear:function(t,n){const d=function(t,n){let d=l()(o[0].elementFromPoint(t,n)),g=!0;if(function(t){return!(!t.is(C)||i(t)||t.is("td.wysiwyg-macro-body")&&"PLAIN_TEXT"===t.closest("table").attr("data-macro-body-type")||t.is("img")&&!e.is("img"))}(d))return{target:d,before:c(d,t,n)};if(s(d)){if(d=function(e){return e.is("div.cell")?e.children("div.innerCell").first():e}(d),function(e,t){return u(e.children().first(),t)<0}(d,n))d=d.children().first();else if(function(e,t){return function(e,t){return u(e,t)-e.height()}
6(e.children().last(),t)>0}(d,n))d=d.children().last(),g=!1;else{if(m=d,a().length>0&&a().parent(m).length>0)return null;d=function(t){let n=e.parent(C);return n.length||(n=t.find(C).last()),n.length||(n=r.find(C).last()),n}(d),g=!1}return{target:d,before:g}}var m;return null}(t,n);d&&function(e,t){if(i(e))return;let n=a();e.is(A)&&e.find(n).length||(n.length?n.detach():n=l()('<span id="move-indicator">|</span>'),(e=function(e){if(e.is(A)){const t=e.children().first();t.is("p,h1,h2,h3,h4,h5,h6,blockquote")&&(e=t)}return e}(e)).is("img")?e.is("li,td,th")?t?e.prepend(n):e.append(n):t?e.before(n):e.after(n):e.prepend(n))}(d.target,d.before)},replaceWith:function(e){const n=a();n.length?(e.is("img")&&s(n.parent())&&(e=l()("<p></p>").append(e)),n.replaceWith(e),t.dom.isBlock(e[0])&&e.parent().is("p")&&e.unwrap(),d().showElement(e),t.selection.select(e[0]),t.selection.collapse(!0)):(g.A.debug("No cursor - abort drop"),t.undoManager.undo())},destroy:function(){const e=a();e.length&&e.remove()}}}(m),f=!1}c.preventDefault(),m.hide(),function(e,t){const o=w.length;if((t=Math.max(t,0))<o)return void b.scrollUp(w[t]);const r=n.height(),a=Math.max(0,r-t);a<o?b.scrollDown(w[a]):b.cancelScrolling()}(c.clientX,c.clientY),y.positionNear(c.clientX,c.clientY);const p=Math.min(c.pageY+a,b.scrollHeight()-m.outerHeight()),h=c.pageX+i;m.css({top:p,left:h,opacity:.5}),m.show()}function T(e){o.off(".moveable-zone"),b.cancelScrolling(),f?m=null:(e.preventDefault(),m.detach(),m.attr("style",p),y.replaceWith(m),y.destroy(),m=null,y=null,M(),t.undoManager.add(),(0,B.hZ)("synchrony.start",{id:v}))}return{init(e){t=e,e.on("Init",()=>{let t;n=l()(e.getWin()),o=l()(e.getDoc()),r=l()(e.getBody()),t=c()?r:o.find("html"),b=function(e){let t=0;return{scrollUp(n){if(t===-n)return;t=-n;const o=e.scrollTop()/n*1e3;e.stop(!1,!1),e.animate({scrollTop:0},{duration:o})},scrollDown(n){if(t===n)return;const o=e[0].scrollHeight,r=(o-e.scrollTop())/n*1e3;e.stop(!1,!1),e.animate({scrollTop:o},{duration:r})},cancelScrolling(){e.stop(!0,!1)},scrollHeight:()=>e[0].scrollHeight}}(t),o.on("mousedown","img.confluence-embedded-image,img.editor-inline-macro,table.wysiwyg-macro",x)})},getInfo:()=>({longname:"Draggable objects (images, tables, placeholders) around the document via drag and drop",author:"Atlassian",authorurl:"http://www.atlassian.com",version:"1.0"})}},Ai=["margin","margin-left","margin-right","margin-top","margin-bottom","padding","padding-left","padding-right","padding-top","padding-bottom","border","border-width","border-style","border-color","background","background-attachment","background-clip","background-image","background-origin","background-position","background-repeat","background-size","float","position","left","right","top","bottom","z-index","display","transform","width","max-width","min-width","height","max-height","min-height","overflow","overflow-x","overflow-y","text-overflow","vertical-align","transition","transition-delay","transition-duration","transition-property","transition-timing-function"],xi=({name:e,type:t,value:n})=>"#text"!==e||3!==t||""!==(null==n?void 0:n.trim()),ki=(e,t)=>e&&t.includes(e.name)&&1===e.children().filter(xi).length;function Mi(e){const t=()=>{const t=Array.from(new Set(["span",...Object.keys(e.schema.getTextInlineElements()).map(e=>e.toLowerCase())]));if(!t.some(t=>e.getBody().querySelector(((e,t=5)=>e+` > ${e}`.repeat(t-1))(t,5))))return;const n=e.getContent(),o=e.parser.parse(n),r=t.flatMap(e=>o.getAll(e)),a=t=>{var n;return e.dom.parseStyle(null!==(n=t.attr("style"))&&void 0!==n?n:"")};r.forEach(e=>(e=>{const n=(o,r)=>{const s=Object.keys(r),l=a(o),c=Object.keys(l).filter(e=>!s.includes(e)),d=o.parent;((e,t)=>{const n=[...e.attributes||[],...t.attributes||[]];return e.name.toLowerCase()===t.name.toLowerCase()&&(null==n?void 0:n.every(n=>n.name.startsWith("data-mce")||"style"===n.name||e.attr(n.name)===t.attr(n.name)))})(o,e)&&((e=>!!(Ai.every(t=>!e[t])&&e.color&&e["text-decoration"]&&"none"!==e["text-decoration"]))(l)?ki(d,t)&&n(d,r):(c.forEach(e=>r[e]=l[e]),ki(d,t)?(o.unwrap(),n(d,r)):o.attr("style",i().html.Styles().serialize(r))))},o=a(e);ki(e.parent,t)&&n(e.parent,o)})(e)),e.setContent(o),console.debug("Duplication tags removal plugin has finished processing")};e.on("PreInit",()=>{I()?(0,B.oI)("rte-collab-ready",()=>{setTimeout(()=>{1===document.querySelectorAll("#avatar-list .avatar-item.active").length&&t()},1e3)}):((0,B.oI)("rte-ready",t),e.on("Remove",()=>{(0,B.Nw)("rte-ready",t)}))})}function Ei(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ti{constructor(e){Ei(this,"value",void 0),Ei(this,"toJSON",void 0),this.value=e,this.valueOf=this.toString=this.toJSON=()=>this.value}}const Ii=e=>new Ti(e);let Di,Si={},Ni=0;const Li=e=>{Ni=e.isCollapsed()?0:e.getContent().length},Bi=function(e,t){if(e&&(Si[e]?Si[e]++:Si[e]=1,t)){const n=`${e}Size`;Si[n]?Si[n]+=t:Si[n]=t}},Ri=function(){Si.pageID=u.A.get("page-id"),Si.editorVersion=Ii("20.2.39"),(0,B.hZ)("analytics",{name:"confluence.editor.action",data:Si}),Si={},(0,h.clearTimeout)(Di),Di=(0,h.setTimeout)(Ri,6e4)},Oi={Bold:"bold",confCharmap:"insert.symbol",confMonospace:"monospace",confTableRowToggleHeading:"table.row.toggle.heading",confTableColumnToggleHeading:"table.column.toggle.heading",confTableSelectionToggleHighlight:"table.selection.toggle.highlight",ForeColor:"foreground.color",FormatBlock:"format.block",Indent:"indent",InsertHorizontalRule:"insert.horizontal.rule",InsertOrderedList:"insert.ordered.list",InsertUnorderedList:"insert.unordered.list",InsertWikiMarkup:"insert.wiki.markup",Italic:"italic",JustifyBottom:"justify.bottom",JustifyCenter:"justify.center",JustifyLeft:"justify.left",JustifyMiddle:"justify.middle",JustifyRight:"justify.right",JustifyTop:"justify.top",mceConfimage:"insert.files.images",mceConflink:"insert.link",mceConfMacroBrowser:"open.other.macros.browser",mceEmotion:"insert.emoticon",mceTableCopyRow:"table.copy.row",mceTableCutRow:"table.cut.row",mceTableDelete:"table.delete",mceTableDeleteCol:"table.delete.column",mceTableDeleteRow:"table.delete.row",mceTableInsertColAfter:"table.insert.column.after",mceTableInsertColBefore:"table.insert.column.before",mceTableInsertRowAfter:"table.insert.row.after",mceTableInsertRowBefore:"table.insert.row.before",mceTableMergeCells:"table.merge.cells",mceTablePasteRowBefore:"table.paste.row.before",mceTableSplitCells:"table.split.cells",mcePageLayoutsToolbar:"page.layouts.toolbar.toggle",mcePageLayoutAddSection:"page.layouts.toolbar.add.section",mcePageLayoutRemoveSection:"page.layouts.toolbar.remove.section",mcePageLayoutMoveSectionDown:"page.layouts.toolbar.movedown.section",mcePageLayoutMoveSectionUp:"page.layouts.toolbar.moveup.section",mcePageLayoutChangeSection:"page.layouts.toolbar.change.section",mceConfShortcutDialog:"open.help.dialog",mceSearchReplaceToolbar:"search.replace.toolbar.toggle",mceConfSearchClose:"search.replace.toolbar.close",mceConfSearch:"search",m
6ceConfReplace:"replace",mceConfReplaceAll:"replace.all",Outdent:"outdent",Redo:"redo",sortColumn:"sort.column",Strikethrough:"strikethrough",subscript:"subscript",superscript:"superscript",Underline:"underline",Undo:"undo",InsertInlineTaskList:"insert.inline.tasklist",InsertInlineTaskListNoToggle:"insert.inline.tasklist.no.toggle"};function Pi(){return{init(e){e.on("Click",t=>{const n=t.target;let o;if("IMG"===n.nodeName&&n.classList.contains("emoticon"))return o=e.selection.getRng(),o&&((t.offsetX||t.layerX-n.x)<n.width/2?(o.setStartBefore(n),o.setEndBefore(n)):(o.setStartAfter(n),o.setEndAfter(n)),e.selection.setRng(o)),e.selection.collapse(),h.tinymce.dom.Event.cancel(t)})},getInfo:()=>({longname:"Emotions",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions",version:`${h.tinymce.majorVersion}.${h.tinymce.minorVersion}`})}}function ji(){return{init(e){e.on("Init",()=>{l()(e.getBody()).addClass("fullsize")})},getInfo:()=>({longname:"flex editor to full size plugin",description:"adjusts height of editor so it always occupies the right space in between the toolbars",author:"Atlassian",authorurl:"http://www.atlassian.com",version:"1.0"})}}var $i=n(9586),Fi=n.n($i);const _i=[],zi=[],Ui=(e,t)=>{const n=new h.Confluence.Editor.FileDialog.FileDialogView({submitCallback:e,cancelCallback:t,beforeShowListeners:_i,panelComponents:zi});return n.render(),n},Hi=e=>{const t=h.Confluence.Link.fromREST(e.attributes);t.attrs["data-linked-resource-container-id"]=e.get("ownerId"),t.attrs.href=e.get("downloadUrl"),t.insert()},Wi=e=>{var t;qn().insertFilePlaceholder({name:e.get("fileName"),page:e.get("parentTitle"),space:(null===(t=e.get("space"))||void 0===t?void 0:t.key)||"",date:e.get("datePath"),ownerId:e.get("ownerId")})},Vi={beforeShowListeners:_i,panelComponent:zi,sizeToFit:function(){return null==this||this.each(function(){const e=this,t=l()(this).parent();let n=t.height();t.children().each(function(){this!==e&&l()(this).is(":visible")&&(n-=l()(this).outerHeight())});const o=l()(this).outerHeight()-l()(this).height();l()(this).css("height",Math.max(0,n-o)+"px")}),this},defaultInsertImageDialog:()=>{It(),Ui((e={})=>{const{url:t,contentId:n,selectItems:o}=e;if(Dt(),t)h.tinymce.confluence.ImageUtils.insertFromProperties({url:t,filename:t,contentId:n});else{let e=!0;const t=(null==o?void 0:o.length)>1;null==o||o.forEach(n=>{n.isImage()?h.tinymce.confluence.ImageUtils.insertFromProperties({filename:n.getFileName(),contentId:n.get("ownerId")},t):(e=!1,r().MacroBrowser.getMacroMetadata("view-file")?Wi(n):Hi(n))}),null===Fi()||void 0===Fi()||Fi().triggerEvent("confluence.insert-files-dialog.insert",o,e)}},()=>Dt())},findPanelComponentById:e=>{const t=h.Confluence.Editor.ImageDialog.panelComponent;for(let n=0;n<t.length;n++)if(t[n].id===e)return t[n]},insertImageDialog:Ui,_insertLinkToEditor:Hi,_insertFilePlaceholderToEditor:Wi};function Qi(e){return e.on("init",function(){e.addCommand("mceConfimage",Vi.defaultInsertImageDialog)}),{getMetadata:function(){return{name:"Confluence Image Dialog"}}}}function Yi(e,t,n){n&&n.node&&l()(".inline-comment-marker",n.node).contents().unwrap()}var Zi=n(4426),Ki={};function Gi(){return{init(e){e.ui.registry.addButton("confluence-insert-files",{text:(0,we.A)("tinymce.confluence.files"),tooltip:`${(0,we.A)("tinymce.confluence.conf_file_desc")} (${e.translate("toolbar.insert_files_shortcut_tooltip")})`,className:"insert-files",icon:"aui-icon aui-icon-small aui-iconfont-image",locationGroup:"rte-toolbar-group-files",weight:0,onAction:function(){e.execCommand("mceConfimage")}})},getInfo:()=>({longname:"Insert Files",author:"Atlassian",authorurl:"http://www.atlassian.com",infourl:"http://www.atlassian.com/",version:"1.0"})}}Ki.styleTagTransform=On(),Ki.setAttributes=Nn(),Ki.insert=Dn().bind(null,"head"),Ki.domAPI=Tn(),Ki.insertStyleElement=Bn(),Mn()(Zi.A,Ki),Zi.A&&Zi.A.locals&&Zi.A.locals;const qi=e=>`\n <!DOCTYPE html>\n <html class="insert-wiki-markup-dialog"${null!=e&&e.dataTheme?' data-theme="'+(null==e?void 0:e.dataTheme)+'"':""}${null!=e&&e.dataColorModeAuto?" data-color-mode-auto":null!=e&&e.dataColorMode?' data-color-mode="'+(null==e?void 0:e.dataColorMode)+'"':""}>\n <head>\n </head>\n <body class="wiki-content previewWiki">\n </body>\n </html>\n`;var Ji=n(7186);function Xi(e){return this.message=e.message,this.statusCode=e["status-code"],this.stack=(new Error).stack,this}Xi.prototype=new Error;const es=Xi,ts=(e,t)=>e.replace(/:([a-zA-Z]+)\?*/g,(e,n)=>{const o=t[n];return"string"==typeof o&&-1===o.indexOf("=")?encodeURIComponent(decodeURIComponent(o)):o.toString()});function ns(e,t,n={}){return o=>{if(o instanceof es){if(401===o.statusCode)return e.onUnauthorized&&e.onUnauthorized(),t(o);const r=n[o.statusCode];return r?r(o,t):t(o)}if(o instanceof TypeError)return t(o);throw o}}function os(e,{body:t,callback:n,headers:o,method:r,extraConfig:a,responseTransformer:i},s){let l=t;const c=o["Content-Type"];return c||delete o["Content-Type"],c&&-1!==c.indexOf("application/x-www-form-urlencoded")?l=Ji.stringify(t):"application/json"===c&&(l=JSON.stringify(t)),fetch(e,{headers:o,credentials:"include",method:r,body:l}).then(e=>{if(!e.ok){const t=e.status;return e.text().then(e=>{throw new es({message:e,"status-code":t})})}return a&&a.ignoreResponseJson?null:204!==e.status?e.json():e}).then(o=>{if(o&&o["status-code"])throw new es(o);return n(null,i?i(o,e,s.contextPath,t):o)}).catch(ns(s,n))}const rs=function(){let e={endpoint:null,contextPath:null,onUnauthorized:null,extraHeaders:{}};return{configure(t={}){e={...e,...t}},getConfig:()=>e,getFullPath(t,n){const o=e.contextPath+t;return n?ts(o,n):o},getExternalServicePath(e,t){if("function"!=typeof e)throw"getExternalServicePath expects path to be a function so it can be lazy evaluated";const n=e();return ts(n,t)},get:(t,{callback:n,headers:o,responseTransformer:r})=>os(t,{callback:n,headers:{Accept:"application/json","Content-Type":"application/json",...e.extraHeaders,...o},method:"GET",responseTransformer:r},e),post:(t,{body:n,callback:o,headers:r,extraConfig:a,responseTransformer:i})=>os(t,{body:n,callback:o,headers:{"Content-Type":"application/x-www-form-urlencoded",...e.extraHeaders,...r},method:"POST",extraConfig:a,responseTransformer:i},e),put:(t,{body:n,callback:o,headers:r,responseTransformer:a})=>os(t,{body:n,callback:o,headers:{Accept:"application/json","Content-Type":"application/json",...e.extraHeaders,...r},method:"PUT",responseTransformer:a},e),delete:(t,{callback:n,headers:o,extraConfig:r,responseTransformer:a})=>os(t,{callback:n,headers:{Accept:"application/json","Content-Type":"application/json",...e.extraHeaders,...o},method:"DELETE",extraConfig:r,responseTransformer:a},e),postLegacyResource:(t,{body:n,callback:o,headers:r,responseTransformer:a})=>fetch(t,{headers:{"Content-Type":"application/x-www-form-urlencoded",...e.extraHeaders,...r},credentials:"include",method:"POST",body:"string"==typeof n?n:Ji.stringify(n)}).then(e=>{if(!e.ok)return new Error(`Request failed with ${e.status}`);const t=e.headers.get("content-type");return t&&-1===t.indexOf("text/html")&&-1===t.indexOf("text/plain")?e.json():e.text()}).then(r=>r instanceof Error?o(r):o(null,a?a(r,t,e.contextPath,n):r)).catch(ns(e,o)),fetch:(e,t)=>fetch(e,t)}}(),as={configure(e){rs.configure(e)},getWikiConfluenceToXhtml(e,t){const n=rs.getFullPath("/rest/tinymce/1/wikixhtmlconverter");rs.postLegacyResource(n,{body:e,callback:t,headers:{Accept:"text/plain, */*","Content-Type":"application/json; charset=utf-8"}})},getWikiMarkdownToXhtml(e,t){const n=rs.getFullPath("/rest/tinymce/1/markdownxhtmlconverter");rs.postLegacyResource(n,{body:e,callback:t,headers:{Accept:"text/plain, */*","Content-Type":"application/json; charset=utf-8"}})}};as.configure({endpoint:`${window.location.protocol}//${window.location.host}`+y.Y,contextPath:y.Y,onUnauthorized:function(){window.location.href=`${y.Y}/login.action?os_destination=${window.location.pathname.replace(y.Y,"")}`}});const is=as,ss="object"==typeof window?window.localStorage:{},ls=function(){const e=`confluence.${u.A.get("remote-user")||""}.userSettings`;let t=!1;
6const n=/\d+#/,o=function(o){if(!t)return null;let r,a=ss.getItem(`${e}.${o}`);return a&&(r=n.exec(a))&&(a=a.replace(r[0],""),+new Date>Number(r[0].replace("#","")))?(ss.removeItem(`${e}.${o}`),null):a};try{t=Object.keys(ss).length}catch(e){g.A.error("Browser does not support localStorage, Confluence.storageManager will not work.")}return{getItem:o,getAllItems:function(){if(!t)return null;const n={};for(const t in ss)if(ss.hasOwnProperty(t)&&t.indexOf(`${e}.`)>-1){const r=t.split(`${e}.`)[1];n[r]=o(r)}return n},doesContain:e=>!!o(e),getItemAsBoolean(e){const t=o(e);return"false"!==t&&("true"===t||!!t)},setItem(n,o,r){t&&(o=function(e){const t=1e3*(e||0);return t?+new Date+t+"#":""}(r)+o,ss.setItem(`${e}.${n}`,o))},setItemQuietly(e,t,n){try{this.setItem(e,t,n)}catch(n){g.A.error(`Unable to write to localStorage. key: ${e}, value: ${t}, cause: ${n}`)}},removeItem(n){t&&ss.removeItem(`${e}.${n}`)}}}();function cs(e,t){return t?`${e}.${t.replace(/\./g,"-")}`:e}const ds=function(e,t,n){const o=cs(e,t),r=ls.getItem(o);let a;return a=null!==r?JSON.parse(r):void 0!==n?n:null,a},us=function(e,t,n,o){const r=cs(e,t);if(o===n)ls.removeItem(r);else{const e=2592e3;ls.setItem(r,JSON.stringify(o),e)}};var gs=n(8248),ms={};ms.styleTagTransform=On(),ms.setAttributes=Nn(),ms.insert=Dn().bind(null,"head"),ms.domAPI=Tn(),ms.insertStyleElement=Bn(),Mn()(gs.A,ms),gs.A&&gs.A.locals&&gs.A.locals;const ps="insert-wiki-markup-dialog.parser",fs="global",hs="CONFLUENCE",bs={HELP_REST_API:`${y.Y}/plugins/tinymce/helplink.action`,WIKI:{CONFLUENCE:{api:is.getWikiConfluenceToXhtml,val:"CONFLUENCE",label:"confluence.conf_wikimarkup_confluence_label",helpLink:"help.insert.wiki.markup",restApi:"/rest/tinymce/1/wikixhtmlconverter"},MARKDOWN:{api:is.getWikiMarkdownToXhtml,val:"MARKDOWN",label:"confluence.conf_wikimarkup_markdown_label",helpLink:"help.insert.wiki.markup.markdown",restApi:"/rest/tinymce/1/markdownxhtmlconverter"}}},ys={dialog:{id:"insert-wiki-markup-dialog",content:"",width:980,height:500,popup:!1,name:"confluence.conf_wikimarkup_desc"},markupEditId:"insert-wiki-textarea",previewAreaId:"insert-wiki-textarea-preview",selectionMenuId:"wiki-parser-selection-tool",serverRequestTimer:300,entityId:"",spaceKey:""};let ws=null;const vs=()=>{const e=ds(ps,fs,hs);return bs.WIKI[e]},Cs=()=>{const e=l()(`#${ys.selectionMenuId}`);return e.length?e.val():vs().val},As=e=>{const t={wiki:(e=e||{}).textToConvert,entityId:ys.entityId,spaceKey:ys.spaceKey};e.api(JSON.stringify(t),(t,n)=>{if(t)return g.A.error("Error when fetching XHTML",t),void e.errorCallback(t);e.successCallback(n)})},xs=()=>{const e=l()(`#${ys.markupEditId}`).val();String.prototype.trim.call(e)?As({api:bs.WIKI[Cs()].api,textToConvert:e,successCallback:e=>{ws.html(e)},errorCallback:()=>{ws.html(Ms(e))}}):ws.html(e)},ks=()=>{const e=Cs();us(ps,fs,hs,e),(e=>{const t=l()(`#${ys.dialog.id}`).find(".dialog-help-link"),n=new URL(bs.HELP_REST_API,window.location.href),o=new URLSearchParams;o.append("linkUrlKey",bs.WIKI[e].helpLink),n.search=o.toString(),t.load(n.toString())})(e),xs()};function Ms(e){if("string"!=typeof e)return"";const t={"<":"<",">":">","&":"&","'":"'","`":"`"};return e.replace(/[&"'<>`]/g,e=>"string"==typeof t[e]?t[e]:""")}function Es(){return{init:(e,t)=>{var n;(0,B.oI)("rte-ready",()=>{ys.entityId=u.A.get("content-id"),ys.spaceKey=u.A.get("space-key")}),ys.dialog.content=`\n <p id="insert-wiki-info-title">${(n=e=>(0,we.A)(e))("tinymce.confluence.conf_wikimarkup_info_title")}</p>\n <form action="#" method="post" id="insert-wiki-markup-form" class="aui">\n <h3 class="wiki-title">\n <span id="insert-wiki-insert-title">${n("tinymce.confluence.conf_wikimarkup.insert.label")}</span>\n <span id="insert-wiki-preview-title">${n("tinymce.confluence.conf_wikimarkup_preview_label")}</span>\n </h3>\n <textarea class="monospaceInput textarea" id="insert-wiki-textarea" name="wikitext"></textarea>\x3c!--\n --\x3e<div class="example-container" id="insert-wiki-textarea-preview"></div>\n </form>\n`;const o=t=>{const n=ys.dialog.id,o=Cs();e.windowManager.setBusy(n,!1),h.tinymce.EditorManager.activeEditor.windowManager.close(n),(0,B.hZ)("analytics",{name:`insert-wiki-markup-dialog.${o}`}),"MARKDOWN"===o&&(t=(e=>{const t=l()(e);return t.find("img").addClass("confluence-embedded-image"),l()("<div>").append(t.clone()).html()})(t)),e.execCommand("mceInsertContent",!1,t),(e=>{h.tinymce.each(e.dom.select("p > p"),t=>{try{t.parentNode&&e.dom.split(t.parentNode,t)}catch(e){g.A.error("insertwikimarkup - splitParas()",e)}})})(e)},r=(t,n,o)=>{e.windowManager.setBusy(ys.dialog.id,!1);const r=(a=e.translate("confluence.conf_wikimarkup_conversion_errors"),i="timeout"===n?e.translate("confluence.conf_wikimarkup_timeout"):`${Ms(n||t.message)} : ${Ms(o)}`,`\n <p class="warning">\n ${a}\n </p>\n <p class="exception-report">
6\n <span class="exceptionMessage">\n ${i}\n </span>\n </p>\n`);var a,i;h.tinymce.EditorManager.activeEditor.windowManager.alert(r)};e.addCommand("InsertWikiMarkup",()=>{const n=vs();let a;return e.windowManager.open(ys.dialog,{buttons:[{label:"confluence.conf_insert_button_title",action:()=>{e.windowManager.setBusy(ys.dialog.id,!0),As({api:bs.WIKI[Cs()].api,successCallback:o,errorCallback:r,textToConvert:l()(`#${ys.markupEditId}`).val(),setBusy:!0})}}],plugin_url:t,helpLink:n.helpLink,hintText:"confluence.conf_wikimarkup_hint",cssClass:"insert-wiki-markup-panel"}),(e=>{const t=l()("#wysiwygTextarea_ifr").contents().find("head").html(),n=l()("<iframe tabindex='-1' id='insert-wiki-markup-preview' />");l()(`#${e}`).append(n);const o=n.contents(),r=o[0];r.open();const a=document.getElementsByTagName("html")[0];r.write(O("theme.switcher")?qi({dataTheme:a.getAttribute("data-theme"),dataColorMode:a.getAttribute("data-color-mode"),dataColorModeAuto:a.hasAttribute("data-color-mode-auto")}):qi()),r.close(),o.find("head").html(t),ws=o.find("body")})(ys.previewAreaId),((e,t)=>{const n=l()(((e,t,n)=>`\n <span class="wiki-parser-selector">\n <form action="#" method="post" id="d" class="aui">\n <select class="select medium-field" id="wiki-parser-selection-tool" name="wiki-parser-selection-tool" title="wiki parser selector">\n <option value="${t.val}">${e(t.label)}</option>\n ${Object.keys(n).filter(e=>n[e].val!==t.val).map(t=>`<option value="${n[t].val}">${e(n[t].label)}</option>`)}\n </select>\n </form>\n </span>\n`)(e,t,bs.WIKI));return l()("#insert-wiki-insert-title").append(n),l()(`#${ys.selectionMenuId}`)})(t=>e.translate(t),n).on("change",ks),l()(`#${ys.markupEditId}`).on("keydown",function(){clearTimeout(a),a=window.setTimeout(xs,ys.serverRequestTimer)}),!1}),e.ui.registry.addButton("insertwikimarkup",{text:"confluence.conf_wikimarkup_desc",onAction:function(){e.execCommand("InsertWikiMarkup")}})},getInfo:()=>({longname:"InsertWikiMarkip",author:"Atlassian",authorurl:"http://www.atlassian.com",infourl:"http://www.atlassian.com/",version:"1.1"})}}var Ts=n(4442),Is={};function Ds(){return{init(e){h.tinymce.Env.os.isiOS()&&setTimeout(()=>{l()(e.getBody()).addClass("ios")},0)},getInfo:()=>({longname:"iOS Comments Plugin",author:"Atlassian",authorurl:"http://www.atlassian.com",version:`${h.tinymce.majorVersion}.${h.tinymce.minorVersion}`})}}function Ss(){return{init(e){const t=h.Confluence.Editor;function n(){if(t.UI.isFormEnabled()&&e.isDirty()&&!t.isEmpty())return e.translate("unsaved.comment.lost")}e.on("Init",()=>{(0,B.oI)("beforeunload",n)}),e.on("Remove",()=>{(0,B.Nw)("beforeunload",n)})},getInfo:()=>({longname:"Confluence Leave Comment",author:"Atlassian",authorurl:"http://www.atlassian.com",version:`${h.tinymce.majorVersion}.${h.tinymce.minorVersion}`})}}function Ns(){return{init(e){const t=h.Confluence.Editor;function n(){if(t.UI.isFormEnabled()&&e.isDirty()&&!t.isEmpty())return e.translate("unsaved.template.lost")}e.on("Init",()=>{(0,B.oI)("beforeunload",n)}),e.on("Remove",()=>{(0,B.Nw)("beforeunload",n)})},getInfo:()=>({longname:"Confluence Leave Template",author:"Atlassian",authorurl:"http://www.atlassian.com",version:`${h.tinymce.majorVersion}.${h.tinymce.minorVersion}`})}}function Ls(){const e=h.Confluence.Editor.LinkBrowser;return{init:t=>{t.ui.registry.addButton("linkbrowserbutton",{text:"confluence.conflink_desc",className:"mce_conflink",onAction:function(){t.execCommand("mceConflink")}}),t.addCommand("mceConflink",()=>(e.open({bookmarkManager:Lt}),!1)),t.addCommand("mceConfAttachments",()=>(e.open({panelKey:e.ATTACHMENTS_PANEL,bookmarkManager:Lt}),!1))},getInfo:()=>({longname:"Confluence Link Browser",author:"Atlassian",authorurl:"http://www.atlassian.com",version:`${h.tinymce.majorVersion}.${h.tinymce.minorVersion}`})}}function Bs(){return{init(e){const t=e.options.get("atl_macro_class")||"wysiwyg-macro",n="td.wysiwyg-macro-body",o=function(e){return 3===e.nodeType},r=function(t,n){return e.dom.getParent(t,n)},a=function(e){return o(e)?e.length:e.childNodes.length},i=function(e){return r(e,"table."+t)},s=function(e){return null!==i(e)},l=function(e,t){return e.bottom<=t.top&&e.top<t.bottom},c=function(e,t){return e.top>=t.bottom&&e.bottom>t.top},d=function(e,t){const n=e.childNodes;if(0===n.length)return{node:e,offset:t};if(t<n.length)return{node:n[t],offset:0};{const t=n[n.length-1];return"img"===e.nodeName.toLowerCase()?{node:t,offset:1}:{node:t,offset:a(t)}}},u=function(t){if(function(e){return 1===e.nodeType}(t))return h.tinymce.toArray(t.getClientRects());if(o(t)){const n=e.dom.createRng();return n.selectNode(t),h.tinymce.toArray(n.getClientRects())}return[]};
6e.on("init",function(){e.on("keydown",function(t){const r=e.selection.getRng(),g=function(e){return(e.keyCode===h.tinymce.util.VK.LEFT||e.keyCode===h.tinymce.util.VK.RIGHT)&&e.shiftKey}(t),m=function(e){return(e.keyCode===h.tinymce.util.VK.UP||e.keyCode===h.tinymce.util.VK.DOWN)&&e.shiftKey}(t);if((g||m)&&r&&function(e){return s(e.startContainer)&&s(e.endContainer)}(r)){const n=function(t){const n=i(t);return e.dom.select("th,td",n)[0]}(r.startContainer),s=t.keyCode===h.tinymce.util.VK.UP||t.keyCode===h.tinymce.util.VK.LEFT?1:-1,p=m&&function(t,n){return function(t,n){const r=e.selection.getRng();if(r){const a=d(1===t?r.startContainer:r.endContainer,1===t?r.startOffset:r.endOffset),i=a.node;if(o(i)&&a.offset>0){const o=i.splitText(a.offset),r=n(1===t?i:o);return 0===o.length&&e.dom.remove(o),r}return n(i)}}(n,function(e){const o=function(e,t,n,o){const r=new h.tinymce.dom.TreeWalker(e,t),a=1===n?r.prev:r.next,i=1===n?l:c;let s,d=e,g=0;const m=[];do{const e=u(d).filter(function(e){return 0!==e.height&&0!==e.width});if(0!==e.length&&(1===n&&e.reverse(),e.forEach(function(e){if(0===e.height||0===e.width)return;s&&i(e,s)&&g++;const t=m[g];m[g]=t?t.concat([e]):[e],s=e}),o(m)))return m}while(d=a());return m}(e,t,n,function(e){return e.length>1});return o.length<=1})}(n,s),f=g&&function(t,n){const o=e.selection.getRng();if(o){const e=1===n?o.startContainer:o.endContainer,r=1===n?o.startOffset:o.endOffset;return(1===n&&r<=0||-1===n&&r>=a(e))&&function(e,t,n){const o=d(n?t.startContainer:t.endContainer,n?t.startOffset:t.endOffset);let r,i={node:e,offset:n?0:a(e)};for(;!r||i.node!==r.node;){if(o.node===i.node&&o.offset===i.offset)return!0;r=i,i=d(i.node,i.offset)}return!1}(t,o,1===n)}}(n,s);(p||f)&&(function(t,n){const o=e.selection.getRng();if(o){const r=o.cloneRange(),i=d(t,n?0:a(t));n?r.setStart(i.node,i.offset):r.setEnd(i.node,i.offset),e.selection.setRng(r,!n)}}(n,1===s),t.preventDefault(),t.stopImmediatePropagation())}if(t.keyCode===h.tinymce.util.VK.ENTER||t.keyCode===h.tinymce.util.VK.BACKSPACE||t.keyCode===h.tinymce.util.VK.DELETE){if(!r||r.collapsed)return;e.getDoc().querySelectorAll(`${n}[data-mce-selected]`).forEach(e=>{e.removeAttribute("data-mce-selected")})}},!0),e.on("mouseup",function(t){if(3===t.detail){const t=e.selection.getRng();if(t){const o=r(t.startContainer,n),a=r(t.endContainer,n);if(o===a)return;if(null!==o&&!o.contains(t.endContainer)&&o.lastChild){const n=e.dom.createRng();n.setStart(t.startContainer,t.startOffset),n.setEndAfter(o.lastChild),e.selection.setRng(n,!0)}if(null!==a&&!a.contains(t.startContainer)&&a.firstChild){const n=e.dom.createRng();n.setStartBefore(a.firstChild),n.setEnd(t.endContainer,t.endOffset),e.selection.setRng(n,!0)}}}})})},getInfo:()=>({longname:"Macro Navigation",author:"Atlassian",authorurl:"http://www.atlassian.com",version:`${h.tinymce.majorVersion}.${h.tinymce.minorVersion}`})}}function Rs(){return{init(e){e.on("Init",()=>{e.addCommand("mceConfMacroBrowser",h.tinymce.confluence.macrobrowser.macroBrowserToolbarButtonClicked)})},getInfo:()=>({longname:"Confluence Macro Browser",author:"Atlassian",authorurl:"http://www.atlassian.com",version:`${h.tinymce.majorVersion}.${h.tinymce.minorVersion}`})}}function Os(){const e=h.tinymce.util.VK;return{init(t){const n=this;function o(e){t.on("KeyDown",e),h.tinymce.Env.browser.isFirefox()&&(t.on("KeyPress",e),t.on("KeyUp",e))}function r(e,t){return e&&1===e.childNodes.length&&l()(e).is(t)&&l()(e.firstChild).is("br")}function a(e){if(!e.collapsed)return!1;let t=3===e.startContainer.nodeType?e.startContainer.parentNode:e.startContainer;if(!t||!t.parentNode)return!1;for(;t&&!l()(t).is(".wysiwyg-macro-body");){if(t.previousSibling||t.nextSibling)return!1;t=t.parentNode}return!0}t.on("Init",()=>{t.on("SetContent",e=>{e.selection&&h.tinymce.each(t.dom.select("p > .wysiwyg-macro"),e=>{const n=t.dom.getParent(e.parentNode,"p");try{t.dom.split(n,e)}catch(e){}})})}),t.on("SetContent",()=>{h.tinymce.each(t.dom.select('.wysiwyg-macro[data-macro-body-type="PLAIN_TEXT"] .wysiwyg-macro-body'),e=>{t.dom.select("pre",e).length||t.dom.setHTML(e,"<pre><br /></pre>")})}),t.on("KeyDown",n=>{const o=t.selection,r=[e.BACKSPACE,e.DELETE,e.ENTER,e.ESCAPE];if(-1!=l().inArray(n.keyCode,r)||function(t){let n=!1;return 0===t.charCode&&(n=-1!=l().inArray(t.keyCode,[e.SHIFT,e.CTRL,e.ALT,e.META])),n}(n)||o.isCollapsed())return;if(n.ctrlKey||n.metaKey||!h.tinymce.Env.os.isMacOS()&&n.altKey)return;const a=o.getNode();if(Qn.isMacroWithBody(a)){const e=l()(".wysiwyg-macro-body",a);e.length>0&&(g.A.debug("MacroPlaceholderPlugin: Adjusting text selection to only include macro's body."),o.select(e[0],!0))}}),t.on("DblClick",e=>{const t=l()(e.target),n=t.closest("[data-macro-name]");
6if(n.length){if(g.A.debug("Double-click triggered inside a macro."),n.attr("data-macro-body-type")&&t.closest(".wysiwyg-macro-body").length)return void g.A.debug("Double-click was inside bodied macro content. Skipping.");Qn.editMacro(n),h.Confluence.PropertyPanel&&h.Confluence.PropertyPanel.current&&h.Confluence.PropertyPanel.destroy()}}),t.addCommand("mceConfRemoveMacro",e=>{l()(e).remove()}),n._isCursorInMostNestedElement=a,function(){function e(e){if(!e.collapsed)return!1;const t=3===e.startContainer.nodeType?e.startContainer.parentNode:e.startContainer;return t&&t.previousSibling&&!t.nextSibling&&r(t,"p, pre")}(c()||h.tinymce.Env.browser.isFirefox())&&o(n=>{const o=t.selection.getRng();if(46===n.keyCode&&o&&e(o))return h.tinymce.dom.Event.cancel(n)}),n._isCursorInLastParagraphOrPre=e}(),c()&&o(e=>{if(8!==e.keyCode&&46!==e.keyCode)return!0;const n=t.selection.getRng();if(!n)return!0;const o=3===n.startContainer.nodeType?n.startContainer.parentNode:n.startContainer;return!(function(e){if(!e.collapsed)return!1;const t=3===e.startContainer.nodeType?e.startContainer.parentNode:e.startContainer;return a(e)&&t&&1===t.childNodes.length&&l()(t.firstChild).is("br")}(n)&&(8!==e.keyCode||!l()(o).is("li")))||h.tinymce.dom.Event.cancel(e)}),function(){function e(e){if(!e.collapsed)return!1;const t=3===e.startContainer.nodeType?e.startContainer.parentNode:e.startContainer;return t&&0===e.startOffset&&l()(t).is(".wysiwyg-macro-body > ul > li")&&1===t.childNodes.length&&l()(t.firstChild).is("br")}c()&&o(n=>{const o=t.selection.getRng();return 8!==n.keyCode||!o||!e(o)||(t.execCommand("Outdent"),h.tinymce.dom.Event.cancel(n))}),n._isCursorInsideMacroPlacholderInsideListItemContainingSoloBr=e}(),function(){function e(e){const t=3===e.startContainer.nodeType?e.startContainer.parentNode:e.startContainer,n=l()(t);return 0===e.startOffset&&r(t,"p, pre")&&n.parent().is("td.wysiwyg-macro-body")&&t&&!t.previousSibling&&t.nextSibling&&r(t.nextSibling,"p, pre")}c()&&o(n=>{const o=t.selection.getRng();if(46!==n.keyCode||!o)return!0;const r=3===o.startContainer.nodeType?o.startContainer.parentNode:o.startContainer,a=l()(r);if(e(o)){const e=r.nextSibling;return a.remove(),t.selection.select(e,!0),h.tinymce.dom.Event.cancel(n)}}),n._isCursorInFirstParagraphWhenThereAreTwoEmptyParagraphs=e}(),function(){function e(e){const t=3===e.startContainer.nodeType?e.startContainer.parentNode:e.startContainer,n=l()(t);return 0===e.startOffset&&r(t,"p, pre")&&n.parent().is("td.wysiwyg-macro-body")&&t&&!t.nextSibling&&t.previousSibling&&!t.previousSibling.previousSibling&&r(t.previousSibling,"p, pre")}c()&&o(n=>{const o=t.selection.getRng();if(8!==n.keyCode||!o)return!0;const r=3===o.startContainer.nodeType?o.startContainer.parentNode:o.startContainer,a=l()(r);if(e(o)){const e=r.previousSibling;return a.remove(),t.selection.select(e,!0),h.tinymce.dom.Event.cancel(n)}}),n._isCursorInSecondParagraphWhenThereAreTwoEmptyParagraphs=e}(),function(){function e(e){if(!e||!e.collapsed)return!1;const t=3===e.startContainer.nodeType?e.startContainer.parentNode:e.startContainer,n=l()(t);return!(!t||e.startOffset>0)&&(Me.normalize(t),t&&0===e.startOffset&&r(t,"p, pre")&&n.parent().is("td.wysiwyg-macro-body")&&!t.previousSibling&&!t.nextSibling)}(c()||h.tinymce.Env.browser.isFirefox())&&o(n=>8!==n.keyCode&&46!==n.keyCode||(e(t.selection.getRng())?h.tinymce.dom.Event.cancel(n):void 0)),n._isCursorInSoloParagraphOrPreInsidePlaceholder=e}(),function(){function e(e){return e&&e.parentNode&&"BR"===e.nodeName&&e===e.parentNode.lastChild}function r(t){if(!t.collapsed)return!1;const n=t.startContainer;return n&&0===t.startOffset&&3===n.nodeType&&a(t)&&1===n.nodeValue.length&&!n.previousSibling&&(!n.nextSibling||e(n.nextSibling))}function i(t){if(!t.collapsed)return!1;const n=t.startContainer;return n&&1===t.startOffset&&3===n.nodeType&&a(t)&&1===n.nodeValue.length&&!n.previousSibling&&(!n.nextSibling||e(n.nextSibling))}function s(e){if(!e.collapsed)return!1;const t=e.startContainer;return t&&0===e.startOffset&&1===t.nodeType&&1===t.childNodes.length&&a(e)&&!t.previousSibling&&!t.nextSibling}function d(e){if(!e.collapsed)return!1;const t=e.startContainer;return t&&1===e.startOffset&&1===t.nodeType&&1===t.childNodes.length&&a(e)&&!t.previousSibling&&!t.nextSibling}(c()||h.tinymce.Env.browser.isFirefox())&&o(e=>
6{if(8!==e.keyCode&&46!==e.keyCode)return!0;const n=t.selection.getRng();if(!n)return!0;const o=3===n.startContainer.nodeType?n.startContainer.parentNode:n.startContainer;return!l()(o).closest(".wysiwyg-macro-body").size()||(Me.normalize(o),!(46===e.keyCode&&(r(n)||s(n))||8===e.keyCode&&(i(n)||d(n)))||(o.lastChild&&!l()(o.lastChild).is("br")&&l()(o).append("<br/>"),l()(o.firstChild).remove(),t.selection.select(o,!0),h.tinymce.dom.Event.cancel(e)))}),n._isCursorBehindOnlyCharacterInNestedElement=r,n._isCursorAfterOnlyCharacterInNestedElement=i,n._isCursorBehindOnlyChildInNestedElement=s,n._isCursorAfterOnlyChildInNestedElement=d}(),function(){function e(e){return!e.collapsed&&(0===e.startOffset&&r(e.startContainer,function(e){return!e.previousSibling})&&(t=e.endContainer,n=e.endOffset,!!t&&(3===t.nodeType?n===t.nodeValue.length:1===t.nodeType&&(1===t.childNodes.length&&l()(t.firstChild).is("br")?0===n:n===t.childNodes.length)))&&r(e.endContainer,function(e){return!e.nextSibling}));var t,n}function r(e,t){if(!e)return!1;if(l()(e).is(".wysiwyg-macro-body"))return!0;do{if(!t(e))return!1;e=e.parentNode}while(e&&!l()(e).is(".wysiwyg-macro-body"));return!0}c()&&o(n=>{if(8!==n.keyCode&&46!==n.keyCode)return!0;const o=t.selection.getRng();if(o&&e(o)){const e=l()(o.startContainer).closest(".wysiwyg-macro-body");if(e.length>0){const o=l()(e[0].firstChild).is("pre");let r;return t.undoManager.add(),e.empty(),r=o?l()("<pre><br/></pre>").appendTo(e):l()("<p><br/></p>").appendTo(e),t.selection.select(r[0],!0),h.tinymce.dom.Event.cancel(n)}}return!0}),n._isMacroBodySelected=e}(),function(){function e(e){if(!e||!e.collapsed)return!1;const t=3===e.startContainer.nodeType?e.startContainer.parentNode:e.startContainer,n=l()(t);return 0===e.startOffset&&r(t,"p")&&n.next().is("table")}c()&&o(n=>{if(46===n.keyCode&&e(t.selection.getRng()))return h.tinymce.dom.Event.cancel(n)}),n._isCursorInEmptyParagraphPrecedingPlaceholder=e}(),function(){function r(e){return!e||l()(e.parentNode).is(".wysiwyg-macro td")?null:l()(e.parentNode).is("p")?e.parentNode:r(e.parentNode)}function a(e){return e?3===e.nodeType?e:a(e.firstChild)||a(e.nextSibling):null}function i(e){return e&&"PRE"!==e.nodeName&&"TD"!==e.nodeName?"BR"===e.nodeName?e:i(e.previousSibling)||i(e.parentNode):null}function s(e){let t,n;return l()(e.commonAncestorContainer).closest(".wysiwyg-macro td").length>0&&(i(e.startContainer)||(t=a(r(e.startContainer)))),(n=l()(e.commonAncestorContainer).closest(".wysiwyg-macro td > pre")).length>0&&(i(e.startContainer)||(t=a(n[0]))),t&&(e=e.cloneRange()).setStart(t,0),e}c()&&h.tinymce.Env.os.isMacOS()&&o(n=>{const o=t.selection.getRng();if(o&&(n.metaKey||n.ctrlKey)&&n.shiftKey&&n.keyCode===e.LEFT){const e=s(o);if(e!==o)return t.selection.setRng(e),h.tinymce.dom.Event.cancel(n)}}),n._selectTillStart=s}(),t.on("KeyDown",e=>{if(e.keyCode!==h.tinymce.util.VK.TAB)return;const n=t.selection.getRng();if(n){const o=3===n.startContainer.nodeType?n.startContainer.parentNode:n.startContainer;if(l()(o).is(".wysiwyg-macro-body >
6 pre")){t.undoManager.beforeChange(),t.undoManager.add();const o=t.getDoc().createTextNode("\t");return n.insertNode(o),t.selection.setCursorLocation(o,1),t.undoManager.add(),h.tinymce.dom.Event.cancel(e)}}},!0)},getInfo:()=>({longname:"Macro Place Holder plugin",author:"Atlassian",authorurl:"http://www.atlassian.com",version:"1.0"})}}function Ps(){return{init:e=>{e.on("init",()=>{const e={contentId:u.A.get("content-id")},t=l()("#rte-savebar-tinymce-plugin-point");t.append(`\n <span class="minor-edit toolbar-item">\n <input id="notifyWatchers" name="notifyWatchers" value="true" type="checkbox" checked>\n <label for="notifyWatchers">\n <span>${(0,we.A)("editor.minor.edit")}</span>\n </label>\n </span>\n`);const n=t[0].querySelector('input[id="notifyWatchers"]'),o=ds("notifyWatchers",e.contentId,!0);null!==o&&(n.checked=o),xt(n,"change",()=>{us("notifyWatchers",e.contentId,!0,n.checked)})})},getInfo:()=>({longname:"Confluence Notify Watchers",author:"Atlassian",authorurl:"http://www.atlassian.com",version:`${h.tinymce.majorVersion}.${h.tinymce.minorVersion}`})}}Is.styleTagTransform=On(),Is.setAttributes=Nn(),Is.insert=Dn().bind(null,"head"),Is.domAPI=Tn(),Is.insertStyleElement=Bn(),Mn()(Ts.A,Is),Ts.A&&Ts.A.locals&&Ts.A.locals,n(7098),n(2413),n(6524);var js=n(5713),$s=n.n(js),Fs=n(5314),_s={};Fs.A&&Fs.A.locals&&(_s.locals=Fs.A.locals);var zs,Us=0,Hs={};Hs.styleTagTransform=On(),Hs.setAttributes=Nn(),Hs.insert=$s(),Hs.domAPI=Tn(),Hs.insertStyleElement=Bn(),_s.use=function(e){return Hs.options=e||{},Us++||(zs=Mn()(Fs.A,Hs)),_s},_s.unuse=function(){Us>0&&! --Us&&(zs(),zs=null)};const Ws=_s,Vs=(e,t,n,o)=>{const r=l()("#rte-button-restrictions"),a=r.find(".icon"),i="aui-iconfont-locked aui-iconfont-unlocked icon-red";let s="",c="";if(e||t){const t=e?"aui-iconfont-locked icon-red":"aui-iconfont-unlocked icon-red";a.removeClass(i).addClass(t),s=(0,we.A)("page.restrictions.apply"),c=(0,we.A)("editor.restrictions.icon.editor-restricted")}else a.removeClass(i).addClass("aui-iconfont-unlocked"),n?(s=(0,we.A)("page.restrictions.apply"),c=(0,we.A)("editor.restrictions.icon.editor-restricted")):(s=(0,we.A)("page.restrictions.none"),c=(0,we.A)("editor.restrictions.icon.editor-unrestricted"));r.attr("data-tooltip",s),r.attr("aria-label",c),r.data("explicit-restrictions",e),r.data("inherited-restrictions",t),r.data("restrictionsHash",o)},Qs=(e,t)=>{if(void 0===t.restrictionsHash)return;const n=l()("#rte-button-restrictions");if(n.data("restrictionsHash")!==t.restrictionsHash)if(l()("#update-page-restrictions-dialog").is(":visible")&&r().PagePermissions.updateRestrictionsDialog)r().PagePermissions.updateRestrictionsDialog(),n.data("restrictionsHash",t.restrictionsHash);else{const e=""!==t.restrictionsHash,o=t.hasViewRestrictions,r=!!n.data("inherited-restrictions");Vs(o,r,e,t.restrictionsHash)}},Ys=()=>{(0,B.oI)("editor-heartbeat",Qs),(0,B.oI)("edit-page-restrictions-updated",(e,t)=>{Vs(t.hasExplicitRestrictions,t.hasInheritedRestrictions,t.hasAnyExplicitRestrictions,t.restrictionsHash)})};var Zs=n(9158),Ks=n.n(Zs),Gs=n(730),qs=n(8059),Js=n(4082),Xs=n(589),el={};el.styleTagTransform=On(),el.setAttributes=Nn(),el.insert=Dn().bind(null,"head"),el.domAPI=Tn(),el.insertStyleElement=Bn(),Mn()(Xs.A,el),Xs.A&&Xs.A.locals&&Xs.A.locals;const tl=()=>{const e=()=>u.A.get("new-page"),t={spinner:l()("#rte-spinner").css("background","none"),saveButton:(n="#rte-button-publish",o=(0,qs.saveButton)({contentType:u.A.get("content-type"),sharedDraftsEnabled:u.A.getBoolean("shared-drafts"),isNewPage:e()}),l()(n).replaceWith(o),l()(n)),overwriteButton:l()("#rte-button-overwrite"),editButton:l()("#rte-button-edit"),previewButton:l()("#rte-button-preview"),cancelButton:l()("#rte-button-cancel"),versionCommentInput:l()("#versionComment"),watchPageCheckbox:l()("#watchPage"),watchPageToolbarGroup:l()(".toolbar-group-watch-page")};var n,o;t.buttons=[t.saveButton,t.overwriteButton,t.editButton,t.previewButton,t.cancelButton];let a=!1;const s=(e,n)=>{if(n=n||t.buttons)for(let t=0;t<n.length;t++)c(e,n[t])},c=(e,t)=>{t&&(e?(t.removeAttr("aria-disabled"),t.removeClass("disabled"),t.is("button")&&t.prop("disabled",!1)):(t.attr("aria-disabled","true"),t.addClass("disabled"),t.is("button")&&t.prop("disabled",!0)))},d=e=>e.length&&"true"!==e.attr("aria-disabled"),g=()=>e()?"":(0,we.A)("edit.name")+" - ";return(0,B.oI)("editor-shared-drafts-published",()=>{var n;const o=null===(n=/\(.+\)/g.exec(t.saveButton.data("tooltip")))||void 0===n?void 0:n[0];t.saveButton.text((0,qs.saveButtonText)({contentType:u.A.get("content-type"),sharedDraftsEnabled:u.A.getBoolean("shared-drafts"),isNewPage:e()})).attr("title",(0,qs.saveButtonTitle)({contentType:u.A.get("content-type"),sharedDraftsEnabled:u.A.getBoolean("shared-drafts"),isNewPage:e()})+o).tooltip({gravity:"s"})}),(0,B.oI)("synchrony.history.evicted",()=>{a=!0,c(!1,t.versionCommentInput),(()=>{try{i().activeEditor.plugins.customtoolbar.disableToolbar(!0),i().activeEditor.plugins.customtoolbar.toggleToolbarButtons(!0,!0,
6!0)}catch(e){}try{i().activeEditor.mode.set("readonly")}catch(e){}try{i().activeEditor.plugins.pagelayoutplugin.disableContent()}catch(e){}try{l()("input#content-title").prop("disabled",!0)}catch(e){}})()}),t.setButtonsState=s,t.setButtonState=c,t.isButtonEnabled=d,t.registerFormButton=(e,n)=>{var o;t[e]=n,null===(o=t.buttons)||void 0===o||o.push(n)},t.postingDatePicker=null,t.isFormEnabled=()=>{if(t.buttons)for(let n=0;n<t.buttons.length;n++){var e;if(d(null===(e=t.buttons)||void 0===e?void 0:e[n]))return!0}return!1},t.toggleSavebarBusy=e=>{if(!0!==a)if(e){var n;if(null==t||null===(n=t.isFormEnabled)||void 0===n||!n.call(t))return!1;t.spinner.addClass("aui-icon-wait"),h.Confluence.Editor.UI.spinner.spin(),s(!1)}else t.spinner.removeClass("aui-icon-wait"),h.Confluence.Editor.UI.spinner.spinStop(),s(!0);return!0},t.init=function(){Gs.A.init(),h.Confluence.Editor.addSaveHandler(e=>{var n,o;null!=t&&null!==(n=t.isButtonEnabled)&&void 0!==n&&n.call(t,t.saveButton)?(null==t||null===(o=t.toggleSavebarBusy)||void 0===o||o.call(t,!0),(0,B.hZ)("confluence.editor.on.save")):(e.stopImmediatePropagation(),e.preventDefault())}),(0,B.hZ)("rte.init.ui"),h.Confluence.Editor.isNewPage()&&l()("#content-title").trigger("focus").trigger("select"),h.Confluence.Editor.addCancelHandler(e=>{var n,o;h.Confluence.Editor.getNumConcurrentEditors()>1&&r().Confluence.Analytics.publish("rte.notification.concurrent-editing.cancel",{numEditors:h.Confluence.Editor.getNumConcurrentEditors(),pageId:r().params.pageId,draftType:r().params.draftType}),u.A.getBoolean("shared-drafts")&&["page","blogpost"].includes(u.A.get("content-type"))&&(null!=t&&null!==(n=t.isButtonEnabled)&&void 0!==n&&n.call(t,t.cancelButton)?null==t||null===(o=t.toggleSavebarBusy)||void 0===o||o.call(t,!0):(e.stopImmediatePropagation(),e.preventDefault())),Gs.A.process(e)}),"comment"===u.A.get("content-type")&&h.Confluence.Editor.addSaveHandler(()=>{var e;if(r().Rte.Content.isEmpty())return(0,Js.notify)("warning",(0,we.A)("content.empty")),null==t||null===(e=t.toggleSavebarBusy)||void 0===e||e.call(t,!1),!1}),["comment","template"].includes(u.A.get("content-type"))&&h.Confluence.Editor.addCancelHandler(e=>{var n;if(null!=t&&null!==(n=t.isFormEnabled)&&void 0!==n&&n.call(t)&&h.Confluence.Editor.hasContentChanged()&&!h.Confluence.Editor.isEmpty()){const t="comment"===u.A.get("content-type")?(0,we.A)("unsaved.comment.lost"):(0,we.A)("unsaved.template.lost");if(!window.confirm(t))return e.stopImmediatePropagation(),!1}}),t.versionCommentInput.on("keypress",e=>{"Enter"===e.key&&Gs.A.process(e)}),h.Confluence.Editor.addSaveHandler(()=>{h.Confluence.Editor.getNumConcurrentEditors()>1&&r().Confluence.Analytics.publish("rte.notification.concurrent-editing.save",{numEditors:h.Confluence.Editor.getNumConcurrentEditors(),pageId:r().params.pageId,draftType:r().params.draftType})}),h.Confluence.Editor.addSubmitHandler(e=>h.Confluence.Editor.contentFormSubmit(e)),h.Confluence.Editor.currentEditMode=h.Confluence.Editor.MODE_RICHTEXT,t.editButton.on("click",e=>{var n;null!=t&&null!==(n=t.isFormEnabled)&&void 0!==n&&n.call(t)&&(Ja(h.Confluence.Editor.MODE_RICHTEXT),setTimeout(()=>{i().activeEditor.focus(),i().Env.browser.isFirefox()&&h.Confluence.Editor.bookmark&&i().activeEditor.selection.moveToBookmark(h.Confluence.Editor.bookmark)},0),a||Ks().enableElement(t.cancelButton)),e.preventDefault()});const e=()=>{l()("#rte-ellipsis-menu").is(":visible")&&l()("#rte-button-ellipsis").trigger("aui-button-invoke")};t.previewButton.on("click",n=>{var o;n.preventDefault(),a||null!=t&&null!==(o=t.isFormEnabled)&&void 0!==o&&o.call(t)&&h.Confluence.Editor.currentEditMode!==h.Confluence.Editor.MODE_PREVIEW&&(e(),s(!1),t.spinner.addClass("aui-icon-wait"),t.spinner.spin(),i().Env.browser.isFirefox()&&!h.Confluence.Editor.bookmark&&(h.Confluence.Editor.bookmark=i().activeEditor.selection.getBookmark()),Ja(h.Confluence.Editor.MODE_PREVIEW,{errorCallback:()=>{s(!0),t.spinner.removeClass("aui-icon-wait"),t.spinner.spinStop()}}),["comment","template"].includes(u.A.get("content-type"))?Ks().disableElement(t.cancelButton):Ks().enableElement(t.cancelButton))}),l()("#rte-button-labels").on("updateLabel",()=>{const e=+u.A.get("num-labels")||0;let t=(0,we.A)("editor.labels.zero");1===e?t=(0,we.A)("editor.labels.singular",e):e>1&&(t=(0,we.A)("editor.labels.plural",e)),l()("#rte-button-labels").attr("data-tooltip",t)}
6),l()("#draft-status-lozenge").length&&l()(document).tooltip({live:"#draft-status-lozenge"});const n=l()("#PostingDate");if(n.length){var o,d;const e=new Date;n.attr("max",`${e.getFullYear()}-${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}`),t.postingDatePicker=n.datePicker({overrideBrowserDefault:!0}),null==t||null===(o=t.postingDatePicker)||void 0===o||null===(d=o.hide)||void 0===d||d.call(o)}l()("#wysiwygTextarea_parent .mceProgress, #wysiwygTextarea_parent .mceBlocker").on("click",()=>{i().activeEditor.focus()}),l()(window).on("render-content-loaded",(e,n)=>{const o=l()("#previewArea iframe");o.contents().find("body")[0]==n&&(h.Confluence.Editor.previewFrameOnload(n,o),[t.saveButton,t.overwriteButton,t.editButton,t.previewButton].forEach(e=>{c(!0,e)}),o.trigger("focus"),window.focus(),l()(document).trigger("iframeAppended",o))}),u.A.get("heartbeat")&&(h.Confluence.Editor.heartbeat(),h.Confluence.Editor.heartbeatType.normal(),(0,B.oI)("rte-destroyed",h.Confluence.Editor.heartbeatType.cleanup)),(0,B.oI)("watchpage.pageoperation",()=>{var e;null==t||null===(e=t.toggleWatchPage)||void 0===e||e.call(t,!1)}),(0,B.oI)("unwatchpage.pageoperation",()=>{var e;null==t||null===(e=t.toggleWatchPage)||void 0===e||e.call(t,!0)}),u.A.get("new-page")&&"inlinecommentform"===u.A.get("form-name")&&(document.title=(0,we.A)("edit.name")+document.title);const m=document.title;u.A.get("new-page")&&l()("input#content-title").val().trim()&&(document.title=g()+l()("input#content-title").val()+" - "+u.A.get("space-name")+" - "+u.A.get("site-title")),l()("input#content-title").on("change input",function(){if("template"===u.A.get("content-type"))return;const e=g();this.value.trim()?document.title=e+this.value+" - "+u.A.get("space-name")+" - "+u.A.get("site-title"):document.title=m}),l()("body",l()("#wysiwygTextarea_ifr").contents()).on("click",e),(0,B.hZ)("init.rte-control")},t.toggleWatchPage=e=>{e&&"comment"===u.A.get("content-type")?(t.watchPageToolbarGroup.show(),t.watchPageCheckbox.length&&(t.watchPageCheckbox[0].checked=!1)):t.watchPageToolbarGroup.hide()},t};var nl=n(69);const ol=()=>{var e;if(null===h.Confluence||void 0===h.Confluence||null===(e=h.Confluence.Editor)||void 0===e||null===(e=e.ImageDialog)||void 0===e||!e.panelComponent)return;const{eventListener:t,ExternalPanelView:n,SearchPanelView:o,AttachmentsPanelView:r}=h.Confluence.Editor.FileDialog||{},{panelComponent:a}=h.Confluence.Editor.ImageDialog||{};if("template"!==u.A.get("content-type")){const e=new r({eventListener:t});a.push(e)}a.push(new n),a.push(new o)};var rl=n(7864),al={};al.styleTagTransform=On(),al.setAttributes=Nn(),al.insert=Dn().bind(null,"head"),al.domAPI=Tn(),al.insertStyleElement=Bn(),Mn()(rl.A,al),rl.A&&rl.A.locals&&rl.A.locals;var il=n(4670),sl={};sl.styleTagTransform=On(),sl.setAttributes=Nn(),sl.insert=Dn().bind(null,"head"),sl.domAPI=Tn(),sl.insertStyleElement=Bn(),Mn()(il.A,sl),il.A&&il.A.locals&&il.A.locals;var ll=n(5526),cl={};ll.A&&ll.A.locals&&(cl.locals=ll.A.locals);var dl,ul=0,gl={};gl.styleTagTransform=On(),gl.setAttributes=Nn(),gl.insert=$s(),gl.domAPI=Tn(),gl.insertStyleElement=Bn(),cl.use=function(e){return gl.options=e||{},ul++||(dl=Mn()(ll.A,gl)),cl},cl.unuse=function(){ul>0&&! --ul&&(dl(),dl=null)};const ml=cl,pl=({type:e})=>`<div class="cell ${e}" data-type="${e}"><div class="innerCell"></div></div>`,fl={name:"pagelayout-none",columns:0},hl=e=>{const t=l()(e.getBody()),n=(e,t)=>{t.attr("contenteditable","false"),l()(".innerCell",e).each(function(){const e=l()(this);e.attr("contenteditable","true"),e.children().length||e.append("<p><br /></p>")})},o=e=>{const t=l()(".cell, .header, .footer",e);for(let e=0;e<t.length;e++){const n=l()(t[e]),o=n.html();l()(".innerCell",n).length||(n.removeAttr("contenteditable"),n.html('<div class="innerCell">'+o+"</div>"))}},r=()=>{const r=l()(".contentLayout",t);r.length?(o(r),n(r,t),e.undoManager.add()):t.attr("contenteditable","true")};r();const a=e=>{const t=(e.jquery?e:l()(e)).attr("data-atlassian-layout");return t?JSON.parse(t):fl},i=e=>!(e.header||e.footer||e.columns),s=e=>{const t=e.jquery?e:l()(e);if(t.length){const e=t[0].childNodes;for(let n=0;n<e.length;n++){const o=e[n];if("P"!==o.nodeName||1!==o.childNodes.length||"BR"!==o.firstChild.nodeName)return t.html()}}return""},c=e=>l()(".columnLayout > .cell:first-child .innerCell",e),d=e=>l()(".columnLayout > .cell:last-child .innerCell",e),u=e=>l()(".columnLayout",e).append('<div class="cell"><div class="innerCell"></div></div>'),g=e=>{let t="";l()(".columnLayout > .cell",e).each(function(){t+=s(l()(".innerCell",this))}),l()(".columnLayout",e).replaceWith(t)},m=(e,t)=>
6{const n=s(e);t.append(n),e.parent().remove()},p=(e,t)=>{const n=t.dom.create("div");return n.innerHTML=e,l()(n).children()};return{setup:r,getLayout:()=>{const e=l()(".contentLayout",t);return e.length&&e.attr("data-atlassian-layout")?JSON.parse(e.attr("data-atlassian-layout")):fl},body:t,needsContentEditableBody:i,getLayoutOptions:a,setLayout:r=>{let f,h=l()(".contentLayout",t);a(h).name!==r.name&&((0,B.hZ)("analyticsEvent",{name:"PageLayoutEvent.pageLayoutChanged",data:{name:r.name}}),f=1===h.length?h.clone():((e,t)=>p('<div class="contentLayout"></div>',e).html(t.html()))(e,t),o(f),((e,t)=>{let n=(e=>l()(".columnLayout > .cell",e).length)(t);const o=e.name,r=e.columns;let a;if(0===n)for(a=t.html(),t.html('<div class="columnLayout"></div>');n!==r.length;)u(t),n++;let i=o.substring(o.indexOf("-")+1);if(i=i.substring(0,Math.max(0,i.indexOf("-"))||void 0),l()(".columnLayout",t).attr("class","columnLayout "+i+"Columns"),r)for(l()(".columnLayout > .cell",t).each(function(e,t){void 0!==r[e]&&l()(t).attr("class","cell "+r[e])});n!==r.length;)n<r.length?(u(t),n++):(m(l()(".columnLayout .cell:nth-child("+n+") .innerCell",t),l()(".columnLayout > .cell:nth-child("+(n-1)+") .innerCell",t)),n--);else g(t);a&&c(t).html(a)})(r,f),r.header?(e=>{l()(".header",e).length||e.prepend('<div class="header"><div class="innerCell"></div></div>')})(f):(e=>{const t=l()(".header",e),n=c(e),o=s(l()(".innerCell",t));n.length?(n.prepend(o),t.remove()):t.replaceWith(o)})(f),r.footer?(e=>{l()(".footer",e).length||e.append('<div class="footer"><div class="innerCell"></div></div>')})(f):(e=>{const t=l()(".footer",e),n=d(e),o=s(l()(".innerCell",t));n.length?(n.append(o),t.remove()):t.replaceWith(o)})(f),i(r)?(f=f.contents().unwrap(),t.attr("contenteditable","true"),h=""):(n(f,t),f.attr("data-atlassian-layout",JSON.stringify(r)),h=f),((e,t)=>{e.empty().append(t)})(t,f),(e=>{const t=e.selection,n=t.getRng(),o=l()('[contenteditable="true"]',e.getBody());if(o.length){e.focus(),o[0].focus();const r=o.children()[0];n.setStart(r,0),n.setEnd(r,0),t.setRng(n)}else e.focus()})(e))},DEFAULT_LAYOUT:fl}};var bl=function(e){return e.normal="normal",e.aside="aside",e.sidebars="sidebars",e}(bl||{});const yl=[{id:"single",icon:"1col",name:(0,we.A)("page-layout-2.layout.single"),cells:[{type:bl.normal}]},{id:"two-equal",icon:"2col",name:(0,we.A)("page-layout-2.layout.two-equal"),cells:[{type:bl.normal},{type:bl.normal}]},{id:"two-left-sidebar",icon:"2col-right",name:(0,we.A)("page-layout-2.layout.two-left-sidebar"),cells:[{type:bl.aside},{type:bl.normal}]},{id:"two-right-sidebar",icon:"2col-left",name:(0,we.A)("page-layout-2.layout.two-right-sidebar"),cells:[{type:bl.normal},{type:bl.aside}]},{id:"three-equal",icon:"3col",name:(0,we.A)("page-layout-2.layout.three-equal"),cells:[{type:bl.normal},{type:bl.normal},{type:bl.normal}]},{id:"three-with-sidebars",icon:"3col-center",name:(0,we.A)("page-layout-2.layout.three-with-sidebars"),cells:[{type:bl.sidebars},{type:bl.normal},{type:bl.sidebars}]}],wl=e=>yl.find(({id:t})=>t===e),vl="editor.page-layout.",Cl=e=>{const t=l()(e.getBody()),n=(e,t)=>{t.attr("contenteditable","false"),l()(".innerCell",e).each(function(){const e=l()(this);e.attr("contenteditable","true"),e.children().length||e.append("<p><br /></p>")})},o=e=>{e.find("> p").each(function(){""===this.id.trim()&&0===this.classList.length&&l()(this).remove()})},a=e=>{e.find(".contentLayout2 .cell").filter(function(){return l()(this).find(".innerCell").length>1}).each(function(e,t){const n=l()(t).find(".innerCell"),o=n[0];for(let e=1;e<n.length;e++){const t=l()(n[e]);l()(o).append(t.children()),t.remove()}})},s=()=>{const r=t.find(".contentLayout2");r.length?(n(r,t),o(t),a(t),e.undoManager.add()):t.attr("contenteditable","true")};s();const c=(e,t,o)=>{const r=e.find(".cell"),a=r.length;let i=l()();const s=t.cells.length,c=[];let d=[];e.attr("class","columnLayout"),e.addClass(t.id),e.attr("data-layout",t.id);for(let e=0;e<a;e++){const t=r.eq(e).detach();c.push(g(t.children(".innerCell")))}for(let e=0;e<s;e++)i=i.add(pl({type:t.cells[e].type||""}));if(a<=s)d=c;else{d=c.slice(0,s);for(let e=s;e<a;e++)d[s-1]+=c[e]}e.prepend(i);for(let e=0;e<s;e++)i.eq(e).find(".innerCell").html(d[e]);n(e,o)},d=()=>
6{if(!u()){const o=l()(`<div class="contentLayout2"><div class="columnLayout single" data-layout="single">${pl({type:"normal"})}</div></div>`),r=o.find(".innerCell"),a=t.children().detach();r.append(a),t.append(o),n(o,t),p(e)}},u=()=>!!l()(i().activeEditor.getBody()).find("div.contentLayout2").length,g=e=>{const t=l()(e);if(t.length){const e=t[0].childNodes;for(let n=0;n<e.length;n++){const o=e[n];if("P"!==o.nodeName||1!==o.childNodes.length||!o.firstChild||"BR"!==o.firstChild.nodeName)return t.html()}}return""},m=(e,t,n)=>{let o=l()(t.selection.getRng().startContainer).closest(".columnLayout");return!o.length&&n&&(o=e.find(".columnLayout").last()),o},p=e=>{const t=e.selection,n=t.getRng(),o=l()('[contenteditable="true"]',e.getBody());if(o.length){e.focus(),o[0].focus();const r=o.children()[0];n.setStart(r,0),n.setEnd(r,0),t.setRng(n)}else e.focus()},f=(e,t)=>{const n=e.selection,o=n.getRng(),a=t.find('[contenteditable="true"]').first(),i=a.children();if(i.length){e.focus(),a[0].focus();const t=i[0];o.setStart(t,0),o.setEnd(t,0),n.setRng(o),r().Rte.showElement(t)}else e.focus()};return{setup:s,body:t,editor:e,Layouts:yl,getLayout:wl,needsContentEditableBody:()=>!u(),findNearestLayoutSection:e=>{const t=i().activeEditor,n=l()(t.getBody());return m(n,t,e)},createInitialLayoutIfNone:d,addSection:n=>{const o=l()(`<div class="columnLayout single" data-layout="single">${pl({type:"normal"})}</div>`),r=n||m(t,e,!0);if(!r.length)return void d();const a=wl(r.attr("data-layout"));e.undoManager.ignore(()=>{c(o,a,t),r.after(o)}),f(e,o),(0,B.hZ)(vl+"add-section",{section:o})},removeSection:n=>{if(!u())return;const o=n||m(t,e,!0),r=o.next(),a=o.prev();let i;if(r.length)i=r,o.remove();else if(a.length)i=a,o.remove();else{o.closest(".contentLayout2").remove();const n=t.find(".contentLayout2").find(".columnLayout").first();n.length?i=n:(e.getBody().setAttribute("contenteditable","true"),e.setContent("<p></p>"),p(e),(()=>{const e=l()("#rte-button-pagelayout-2");e.hasClass("active")&&e.trigger("click")})())}i&&i.length&&f(e,i),(0,B.hZ)(vl+"remove-section",{})},changeSection:(n,o)=>{u()||d();const r=o||m(t,e,!1);if(!r.length)return;const a=wl(r.attr("data-layout"));e.undoManager.ignore(()=>{c(r,n,t)}),f(e,r),(0,B.hZ)(vl+"change-layout",{section:r,originalLayout:a,currentLayout:n})},moveSectionDown:n=>{if(!u())return;const o=n||m(t,e,!0),r=o.next();r.length&&(o.detach(),r.after(o),f(e,o)),(0,B.hZ)(vl+"move-section-down",{section:o})},moveSectionUp:n=>{if(!u())return;const o=n||m(t,e,!0),r=o.prev();r.length&&(o.detach(),r.before(o),f(e,o)),(0,B.hZ)(vl+"move-section-up",{section:o})}}};function Al(e){let t;const n=hl(e),o=Cl(e);if("comment"===u.A.get("content-type"))return;const a=e=>{const t=l()("#pagelayout-menu"),n=l()(".icon-check",t),o=n.not(".hidden"),r=n.siblings("."+e.name).siblings();o.addClass("hidden"),r.removeClass("hidden")},i=e=>{const t=l()(e.getBody());return!t.children(".contentLayout").length&&(t.children(".contentLayout2").length,!0)},s=()=>{h.tinymce.Env.browser.isFirefox()&&setTimeout(()=>{e.focus(),e.dom.getRoot().focus()},1)},d=r=>{const c=l()("#pagelayout-menu").parent(),d=l()("#page-layout-2-group");r&&r.selection||(i(e)?(c.addClass("hidden"),d.removeClass("hidden"),t=Cl(e),o&&o.needsContentEditableBody()&&l()(e.getBody()).attr("contenteditable","true")):(c.removeClass("hidden"),d.addClass("hidden"),t=hl(e),n.needsContentEditableBody(t.getLayout())?t.body.attr("contenteditable","true"):s(),a(t.getLayout())))};return e.on("init",()=>{e.undoManager.clear(),e.undoManager.add(),d(),(0,B.oI)("editor.remote.change editor.local.change",()=>{e.undoManager.ignore(()=>{t.setup()})}),(0,B.oI)("rte-ready",()=>{const t=l()('[contenteditable="true"]',e.getBody()),n=!1!==u.A.get("editor-auto-focus");t.attr("contenteditable","false"),t.attr("contenteditable","true"),n&&r().Rte.editorFocus(e)}),i(e)&&e.on("Undo",()=>{o.needsContentEditableBody()&&t.body.attr("contenteditable","true"),s()}),ml.use()}),l()("#pagelayout-menu").on("click","li.dropdown-item a",function(){e.execCommand("mcePageLayout",!1,n.getLayoutOptions(this))}),e.on("Remove",()=>{ml.unuse()}),e.on("SetContent",d),e.on("click",t=>{const n=l()(t.target);if(n.is("div.cell")&&n.children(".innerCell").trigger("focus"),c()&&(t.target===e.getBody()||t.target===e.getBody().parentNode)&&n.find(".innerCell").length){e.execCommand("selectAll");const n=t.target!==e.getBody();e.selection.collapse(n)}}),e.on("keyup",t=>{const n=t.keyCode;if(8!==n&&46!==n)return!0;const o=e.selection.getRng().startContainer;if(l()(o).closest(".contentLayout,.contentLayout2",e.getBody()).length){const n=l()(o).closest(".innerCell");if(n&&n.length&&e.dom.isEmpty(n.clone()[0])){n.html('<p><br data-mce-bogus="1"></p>'),t.preventDefault();const o=n[0].firstElementChild&&n[0].firstElementChild.firstChild;o&&e.selection.select(o,!0),e.selection.collapse(!0)}}}),e.addCommand("mcePageLayoutInitialize",()=>{e.undoManager.add(),t.createInitialLayoutIfNone()}),e.addCommand("mcePageLayout",(n,o)=>{e.undoManager.add(),t.setLayout(o),a(t.getLayout())}),e.addCommand("mcePageLayoutAddSection",(n,o)=>{e.undoManager.add(),t.addSection&&t.addSection(o&&o.section)}),e.addCommand("mcePageLayoutChangeSection",(n,o)=>{e.undoManager.add(),t.changeSection&&t.changeSection(o&&o.layout,o&&o.section)}),e.addCommand("mcePageLayoutRemoveSection",(n,o)=>{e.undoManager.add(),t.removeSection&&t.removeSection(o&&o.section)}),e.addCommand("mcePageLayoutMoveSectionUp",(n,o)=>{e.undoManager.add(),t.moveSectionUp&&t.moveSectionUp(o&&o.section)}),e.addCommand("mcePageLayoutMoveSectionDown",(n,o)=>{e.undoManager.add(),t.moveSectionDown&&t.moveSectionDown(o&&o.section)}),{Layouts:o&&o.Layouts,getLayout:o&&o.getLayout,execCommand:t=>{if("selectAll"===t){const t=e.getBody();if("true"==e.dom.getAttrib(t,"contenteditable"))return!1;const n=e.dom.select(".innerCell",t),o=n[0],r=n[n.length-1],a=e.dom.createRng();return a.setStart(o,0),a.setEnd(r,r.childNodes.length),e.selection.setRng(a),!0}return!1},disableContent:()=>{e.dom.setAttribs(e.dom.select("div.innerCell"),{contenteditable:!1}),e.dom.setStyle(e.dom.select(".wiki-content .contentLayout2"),"user-select","auto")},getInfo:()=>({longname:"Page Layout Plugin",author:"Atlassian",authorurl:"http://www.atlassian.com",infourl:"http://www.atlassian.com",version:"1.0"})}}var xl=n(7515),kl={};function Ml(e){let t=e.offsetTop;for(;e.offsetParent;)t+=(e=e.offsetParent).offsetTop;return t}function El(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}kl.styleTagTransform=On(),kl.setAttributes=Nn(),kl.insert=Dn().bind(null,"head"),kl.domAPI=Tn(),kl.insertStyleElement=Bn(),Mn()(xl.A,kl),xl.A&&xl.A.locals&&xl.A.locals;const Tl=new class{constructor(e,t){El(this,"_namespace",void 0),El(this,"_sessionStorageSupported",void 0);const n=u.A.get("remote-user")||"";this._namespace=`${e}.${n}.${t}`,this._sessionStorageSupported=!!h.sessionStorage}getItem(e){return this._sessionStorageSupported?h.sessionStorage.getItem(`${this._namespace}.${e}`):(g.A.warn("Browser does not support sessionStorage, Confluence.storageManager will not work."),null)}doesContain(e){return!!this.getItem(e)}setItem(e,t){if(this._sessionStorageSupported)try{h.sessionStorage.setItem(`${this._namespace}.${e}`,t)}catch(n){g.A.error(`Unable to write to sessionStorage. key: ${e}, value: ${t}, cause: ${n}`)}else g.A.warn("Browser does not support sessionStorage, Confluence.storageManager will not work.")}removeItem(e){this._sessionStorageSupported?h.sessionStorage.removeItem(`${this._namespace}.${e}`):g.A.warn("Browser does not support sessionStorage, Confluence.storageManager will not work.")}}("atlassian","frontend"),Il="editor-persit-scroll-position",Dl="main-content",Sl=e=>{const t=(e=>{const t=[];return Array.from(e).forEach((e,n)=>{(function(e){const t=document.documentElement;if(!e||!t)return;const n=e.getBoundingClientRect(),{top:o,bottom:r}=n,a=t.offsetHeight;return 0<=o&&o<a||0<=r&&r<=a||o<=0&&0<=r&&r>=a})(e)&&t.push({targetElementIndex:n,visibleBlockEl:e})}),t})(e);let n=null;return t.some(e=>!!function(e){const t=document.documentElement;if(!e||!t)return;const n=e.getBoundingClientRect(),{top:o}=n,r=t.offsetHeight;return 0<=o&&o<r}(e.visibleBlockEl)&&(n=e,!0)),!n&&t.length>0?t[0]:n||{targetElementIndex:-1,visibleBlockEl:null}};function Nl(e){e.getDoc()&&e.getWin()&&(e=>{const{contentId:t,isInViewPage:n,docObject:o=document,winObject:r=window}=e;let a;a=n?o.getElementById(Dl):o.body;const i=function(e,t){if(!e||0===t)return null;const n={targetElementIndex:-1,offsetBetweenTargetAndCurrentScroll:0,columnLayoutPosition:{columnIndex:-1,rowIndex:-1}};if((e=>{if(!e)return!1;const t=e.children[0];return t&&t.classList.contains("contentLayout2")})(e)){const o=e.children[0].children,{targetElementIndex:r,visibleBlockEl:a}=Sl(o);if(a){const e=a.getElementsByClassName("innerCell"),{columnIndex:o,targetElementIndexInColumn:i,visibleBlockEl:s}=(e=>{const t={targetElementIndexInColumn:-1,columnIndex:-1,visibleBlockEl:null};return Array.from(e).some((e,n)=>{const{visibleBlockEl:o,targetElementIndex:r}=Sl(e.children);return!!o&&(t.columnIndex=n,t.targetElementIndexInColumn=r,t.visibleBlockEl=o,!0)}),t})(e);s&&(n.targetElementIndex=i,n.offsetBetweenTargetAndCurrentScroll=t-Ml(s),n.columnLayoutPosition={rowIndex:r,columnIndex:o})}}else{const{targetElementIndex:o,visibleBlockEl:r}=Sl(e.children);r&&(n.targetElementIndex=o,n.offsetBetweenTargetAndCurrentScroll=t-Ml(r),delete n.columnLayoutPosition)}return-1!==n.targetElementIndex?n:null}(a,r.pageYOffset);i&&(i.contentId=t,i.isInViewPage=n,Tl.setItem(Il,JSON.stringify(i)))})({contentId:ve(),isInViewPage:!1,docObject:e.getDoc(),winObject:e.getWin()})}function Ll(){return{init:e=>{const t=u.A.get("content-type");"page"!==t&&"blogpost"!==t||((0,B.oI)("rte-collab-ready",()=>{!function(e){e.getDoc()&&e.getWin()&&(e=>{const{contentId:t,isInViewPage:n,docObject:o=document,winObject:r=window}=e;let a,i=Tl.getItem(Il);try{i=JSON.parse(i)}catch(e){g.A.error("Can not parse JSON string of `savedViewPoistionData`: ",i)}finally{Tl.removeItem(Il)}if(!i||i.contentId!==t||i.isInViewPage===n)return;a=n?o.getElementById(Dl):o.body;const{columnLayoutPosition:s}=i;let l;if(s){var c;const e=null===(c=a)||void 0===c?void 0:c.children[0],t=null==e?void 0:e.children[s.rowIndex],n=null==t?void 0:t.getElementsByClassName("innerCell"),o=n&&n[s.columnIndex];l=o&&o.children[i.targetElementIndex]}else{var d;l=null===(d=a)||void 0===d?void 0:d.children[i.targetElementIndex]}if(l){const e=Ml(l)+i.offsetBetweenTargetAndCurrentScroll;setTimeout(()=>r.scrollTo(0,e),1)}})({contentId:ve(),isInViewPage:!1,docObject:e.getDoc(),winObject:e.getWin()})}(e)}),(0,B.oI)("rte-ready",()=>{h.Confluence.Editor.UI.cancelButton.click(()=>Nl(e)),h.Confluence.Editor.UI.saveButton.click(()=>Nl(e))}))},getInfo:()=>({longname:"Persist scroll position for transition between view page and edit page",author:"Atlassian",authorurl:"http://www.atlassian.com",version:`${h.tinymce.majorVersion}.${h.tinymce.minorVersion}`})}}const Bl=[],Rl={};let Ol;function Pl(e){const t=`<span class="text-placeholder">${Ol}</span>`,n=l()("<div></div>").append(t);e&&n.find(".text-placeholder").html(e),h.tinymce.activeEditor.execCommand("mceInsertContent",!1,{content:n.html(),preserve_zwsp:!0})}function jl(e){const t=h.tinymce.activeEditor,n=l()(t.getBody()),o=e&&e.parentElement,r=t.dom.create("span",{id:"placeholder-cursor"}," ");o&&e&&o.replaceChild(r,e);const a=n.find("#placeholder-cursor")[0];t.selection.select(a.firstChild),t.dom.replace(document.createElement("br"),a)}function $l(){return Bl}function Fl(e){return Rl[e]}Ol=c()?"\ufeff{$caret}<br>":"\ufeff{$caret}";const _l={insertTextPlaceHolder:Pl,removePlaceholder:jl,addPlaceholderType:function(e){e&&e.type?(Bl.push(e),Rl[e.type]=e):g.A.error("PlaceHolderRegister : unable to register new place holder type !")},getPlaceholderTypes:$l,getPlaceholderType:Fl};function zl(){const e={click:!1,keypress:!0},t=h.tinymce.VK,n=h.tinymce.dom.Event,o="template"===u.A.get("content-type");function r(e){l()("#rte-button-insert-placeholder").on("click",e=>{e.preventDefault(),Pl()}),e.on("KeyDown",t=>{if(13===t.keyCode&&!t.shiftKey){const n=e.selection.getNode(),o=l()(n).closest(".text-placeholder"),r=e.selection.getRng();if(o.length&&r&&Lr.isCursorAtEnd(e,r))return Rr(e,o,!0),h.tinymce.dom.Event.cancel(t)}},!0)}const a={UL:!0,OL:!0,LI:!0,TABLE:!0,TBODY:!0};function i(e){return!a[e.nodeName]}function s(o){function r(){const e=d();e&&o.selection.select(e)}function a(e){e.off("KeyDown",s),e.off("KeyPress",c),e.off("Click",c)}function s(e){const r=d();return e.keyCode===t.LEFT||e.keyCode===t.UP?(function(e,t){let n,o=t&&t.previousSibling;for(;t&&!o;)o=(t=t.parentNode).previousSibling;if(o){for(n=o;!i(n)&&n.lastChild;)n=n.lastChild;e.selection.select(n.lastChild||n),e.selection.collapse(!1),e.selection.normalize()}}(o,r),n.cancel(e)):e.keyCode===t.RIGHT||e.keyCode===t.DOWN?(function(e,t){let n,o=t&&t.nextSibling;for(;t&&!o;)o=(t=t.parentNode).nextSibling;if(o){for(n=o;!i(n)&&n.firstChild;)n=n.firstChild;e.selection.select(n.firstChild||n),e.selection.collapse(!0),e.selection.normalize()}}(o,r),n.cancel(e)):e.keyCode===t.BACKSPACE||e.keyCode===t.DELETE?(jl(r),n.cancel(e)):void 0}function c(t){if(h.tinymce.Env.browser.isFirefox()&&!t.isChar&&"keypress"===t.type)return;const n=d();if(n){const o=n.getAttribute("data-placeholder-type");(function(t,n){const o=t&&Fl(t);return!!l().extend({},e,o&&o.activation)[n]})(o,t.type)&&(jl(n),(0,B.hZ)("editor.text-placeholder.activated",{placeholderType:o||"",triggerEvent:t}))}}function d(){const e=l()(o.getBody()).find(".text-placeholder.selected");return e.length?e[0]:(a(o),null)}o.on("NodeChange",function(e){const t=e.element,n=l()(t).closest(".text-placeholder");l()(o.getBody()).find(".text-placeholder.selected").not(n).removeClass("selected"),n.length?(n.hasClass("selected")||(n.addClass("selected"),function(e){e.on("KeyDown",s,!0),e.on("KeyPress",c,!0),e.on("Click",c,!0)}
6(o)),setTimeout(r,0)):a(o)},!0)}return{init(e){e.on("init",()=>{(o?r:s)(e),function(e){l()(e.getDoc()).find("head").append('<style type="text/css">.wiki-content .text-placeholder { display: inline-block; }</style>')}(e)})},getInfo:()=>({longname:"Text Placeholder Plugin",author:"Atlassian",authorurl:"http://www.atlassian.com",infourl:"http://www.atlassian.com",version:"1.0"})}}function Ul(e){return e.parentNode&&e.parentNode.childNodes||[]}function Hl(e){const t=Ul(e);return function(e){let t=!0;const n=/TABLE|TH|TD/;return t=!n.test(e.nodeName),t=t&&e.previousSibling?!n.test(e.previousSibling.nodeName):t,t=t&&e.nextSibling?!n.test(e.nextSibling.nodeName):t,t}(e)&&(function(e){const t=function(e){return e&&e.innerHTML&&(e.innerHTML.replace(/\uFEFF|\u200B/g,"")||" ")}(e);return/^ $/.test(t)}(e)||t.length>1&&"BR"==t[0].nodeName)}function Wl(e,t){e.dom.remove(t)}function Vl(e){return e.on("KeyDown",t=>{!function(e,t){const n=h.tinymce.VK,o=n.BACKSPACE,r=n.DELETE,a=e.selection.getNode(),i=a.nextSibling;if(e.selection.isCollapsed()&&a!=e.dom.getRoot())if(t.keyCode===o){if(function(e){const t=e.getRng();return t&&0===t.startOffset}(e.selection)){const n=a.previousSibling;n&&Hl(n)&&(Wl(e,n),h.tinymce.dom.Event.cancel(t))}}else if(t.keyCode==r){if(Ul(a).length<=1||a.childNodes.length>1)return;i&&Hl(a)&&(Wl(e,a),h.tinymce.dom.Event.cancel(t),function(e,t){const n=e.selection,o=n.getRng();e.focus(!1),t.focus(),o&&(o.setStart(t,0),o.setEnd(t,0),n.setRng(o))}(e,i))}}(e,t)}),{getMetadata:()=>({name:"Preserve paragraph formatting when deleting empty line",author:"Atlassian",url:"http://www.atlassian.com"})}}var Ql=n(9743),Yl={};function Zl(){const e=h.Confluence.PropertyPanel,t=[];return(0,B.oI)("add-handler.property-panel",(e,n)=>{n&&t.push(n)}),{init:n=>{const o=()=>!!e.current,r=(r,a)=>{const i={focusedEl:a,focusedNodeName:a.nodeName&&a.nodeName.toLowerCase(),ed:n,e:l().extend({},r)},s=(e=>{if(e.is("img"))return e[0];const t=e.closest("a,table,.wysiwyg-macro,.editor-inline-macro,.text-placeholder");return t.length?t[0]:""})(l()(a)),c=!!l()(a).closest("table:not(.wysiwyg-macro,.editor-inline-macro)").length,d=!!l()(".toolbar-contextual").length;if(i.containerEl=s,(0,B.hZ)("user-blurred-rte-element",i),s&&!(e=>"click"==e.type&&(e.which?3===e.which:e.button?2==e.button:void 0))(r)&&!o()&&e.shouldCreate)for(let e=0,n=t.length;e<n;e++){var u,g;if(null!==(u=(g=t[e]).canHandleElement)&&void 0!==u&&u.call(g,l()(s))){var m,p;if(d||!c)return null===(m=(p=t[e]).handle)||void 0===m?void 0:m.call(p,i);(e=>{xt(document,"shown.contextToolbar",()=>{var t;null===(t=e.handle)||void 0===t||t.call(e,i)})})(t[e])}}};function a(e,t){r(e,t.elem)}function i(t,n){o()&&(!n.containerEl||e.current.hasAnchorChanged(n.containerEl)?e.destroy():(0,B.hZ)("same-anchor.property-panel"))}function s(){setTimeout(()=>{d().bindScroll("property-panel",()=>{e.destroy()})},0),l()(n.getDoc()).on("keydown.property-panel.escape",t=>{27===t.keyCode&&o()&&e.destroy()})}function c(){d().unbindScroll("property-panel"),l()(n.getDoc()).off("keydown.property-panel.escape")}n.on("Click",e=>{r(e,e.target)}),n.on("KeyDown",t=>{if(27!==t.keyCode){if(t.target.classList.contains("editor-inline-macro")){if(13===t.keyCode)return t.target.click(),void t.preventDefault();if(37===t.keyCode||38===t.keyCode||39===t.keyCode||40===t.keyCode)return t.target.blur(),void t.preventDefault()}if(o()&&"Tab"===t.key&&((a=n.selection.getNode())&&(a.classList.contains("editor-inline-macro")||a.children.length&&n.selection.getNode().querySelector(".editor-inline-macro"))))return e.current.panel.find(".aui-button:first-child").focus(),void t.preventDefault();r(t,n.selection.getNode())}var a},!0),n.on("ContextMenu",()=>{e.destroy()}),(0,B.oI)("trigger.property-panel",a),(0,B.oI)("user-blurred-rte-element",i),(0,B.oI)("created.property-panel",s),(0,B.oI)("destroyed.property-panel",c),n.on("Remove",()=>{(0,B.Nw)("trigger.property-panel",a),(0,B.Nw)("user-blurred-rte-element",i),(0,B.Nw)("created.property-panel",s),(0,B.Nw)("destroyed.property-panel",c)})},getInfo:()=>({longname:"Image, Link and Macro Property Panels",author:"Atlassian",authorurl:"http://www.atlassian.com",version:`${h.tinymce.majorVersion}.${h.tinymce.minorVersion}`})}}function Kl(){return{init(e){e.on("Init",()=>{const e=l()("#createpageform"),t=e.find("#originalReferrer");e.length&&!t.val()&&document.referrer&&t.val(document.referrer)})},getInfo:()=>({longname:"Confluence Cancel Return Url",author:"Atlassian",authorurl:"http://www.atlassian.com",version:`${h.tinymce.majorVersion}.${h.tinymce.minorVersion}`})}}Yl.styleTagTransform=On(),Yl.setAttributes=Nn(),Yl.insert=Dn().bind(null,"head"),Yl.domAPI=Tn(),Yl.insertStyleElement=Bn(),Mn()(Ql.A,Yl),Ql.A&&Ql.A.locals&&Ql.A.locals;var Gl=n(4741),ql={};Gl.A&&Gl.A.locals&&(ql.locals=Gl.A.locals);var Jl,Xl=0,ec={};ec.styleTagTransform=On(),ec.setAttributes=Nn(),ec.insert=$s(),ec.domAPI=Tn(),ec.insertStyleElement=Bn(),ql.use=function(e){return ec.options=e||{},Xl++||(Jl=Mn()(Gl.A,ec)),ql},ql.unuse=function(){Xl>0&&! --Xl&&(Jl(),Jl=null)};const tc=ql;function nc(){return{init:e=>{O("editor.resize.image.on.drag.disabled")||($(window).one("rte-ready",()=>{tc.use(),n.e("resize-image").then(n.bind(n,7648)).then(({default:t})=>{t(e,e.getDoc())})}),e.on("Remove",()=>{tc.unuse()}))},getInfo:()=>({longname:"ConfluenceResizeImagePlugin",author:"Atlassian",authorurl:"http://www.atlassian.com",infourl:"http://www.atlassian.com",version:"1.0"})}}function oc(){function e(t){const n=[];
6if(t.nodeType===Node.TEXT_NODE)n.push(t);else{const o=t.childNodes;for(let t=0,r=o.length;t<r;++t)n.push.apply(n,e(o[t]))}return n}function t(e){return e.nodeValue.toLowerCase()}return{search(n,o,r,a,i){const s=n.getSel(),l=e(a);o=o.replace(/\s/g,"").toLowerCase();const c=l.map(t).join("");r=function(e,t,n){const o=e.getRng();if(o&&o.endContainer.nodeValue){const e=n.indexOf(o.endContainer.nodeValue.toLowerCase(),t)+o.endOffset;t=t!==e&&-1!==t?e:t}return t}(n,r,c);const d=function(e,t,n,o){let r=o?e.lastIndexOf(t,n-1):e.indexOf(t,n);return r<0&&!o?r=e.indexOf(t):0===r&&0===n&&o&&(r=e.lastIndexOf(t)),r}(c,o,r,i);if(d<0)return[!1,d];const u=function(e,t,n){let o,r,a,i,s=0;for(let l=0;l<t.length;l++){if(t[l].nodeType===Node.TEXT_NODE){const c=e+n.length;!r&&t[l].length+s>=c&&(r=t[l],i=c-s),!o&&t[l].length+s>e&&(o=t[l],a=e-s),s+=t[l].length}if(o&&r)return{startNode:o,startIndex:a,endNode:r,endIndex:i}}}(d,l,o),g=document.createRange();return g.setStart(u.startNode,u.startIndex),g.setEnd(u.endNode,u.endIndex),s&&s.removeAllRanges(),s&&s.addRange(g),g.startContainer.parentNode&&g.startContainer.parentNode.scrollIntoView(),[!0,d]}}}const rc="searchreplace",ac=function(){const e=oc(),t=i().Env.browser.isEdge,n=function(e){const t=e;let o=null,r=null,a=null,i=null,s=null;return{initialised:!1,find:function(e,t,n){const r=o.getFindInput().val(),i=a.findText(r,!0,e);i&&t?t():!i&&n&&n()},replace:function(e,t){const n=o.getFindInput(),r=o.getReplaceInput();let i="";r&&(i=r.val());const s=a.replaceText(n.val(),i,!0);s&&e?e():!s&&t&&t()},replaceAll:function(e,t){const n=o.getFindInput(),r=o.getReplaceInput();let i="";r&&(i=r.val());const s=a.replaceAll(n.val(),i);s&&e?e():!s&&t&&t()},focus:function(){o.focusFindTextBox()},isVisible:function(){return null!=o},init:function(){o=n.UI(t,i,s),r=new n.MarkManager,r.addListener(o),a=null,a=new n.impl(o,r),o.getFindInput().trigger("focus")},onVisible:function(e){if(null!=e&&e.length>0){const t=o.getFindInput(),n=t.val();t.val(n+e)}o.onVisible()},onHide:function(){i=o.getFindInput().val(),s=o.getReplaceInput().val(),a.destroy(),a=null,o.destroy(),o=null,r.destroy(),r=null},_clearSavedValues:function(){i=null,s=null}}};return n.utils={moveCursorToEnd(e){if(i().Env.browser.isFirefox()){const t=l()(e).val().length;e.setSelectionRange(t,t)}},createTextRange:(e,t)=>e.selection?e.selection.createRange():t.getBody().createTextRange()},n.impl=function(n,o){let r=i().html.Writer(),a=o,s=-1;const l=function(n,o,r){if(!n)return!1;const c=i().activeEditor;let d=c.selection;const u=c.getWin();function g(){return c.undoManager.ignore(()=>{a.markCurrentlySelectedRange()}),!0}function m(){return c.undoManager.ignore(()=>{a.removeCurrentMark(!0),c.selection.isCollapsed()||c.selection.collapse()}),!1}if(a.isCursorAtCurrentMark()&&c.undoManager.ignore(()=>{d=a.selectCurrentMark()}),d.isCollapsed()||d.collapse(r),i().Env.browser.isFirefox())return u.find(n,!1,r)?g():o?(d.select(c.getBody(),!1),d.collapse(!r),l(n,!1,r)):m();if(!t())return u.find(n,!1,r,!0,!1,!1,!1)?g():m();{const t=e.search(d,n,s,c.getBody(),r);if(s=t[1],t[0])return g()}},c=function(e){const t=i().activeEditor;r.text(e,!1),t.selection.setContent(r.getContent(),{format:"raw"}),r.reset(),t.selection.collapse(!0)},d={};return d.findText=l,d.replaceText=function(e,t,n){const o=i().activeEditor;return a.hasCurrentMark()?(o.undoManager.transact(()=>{const e=a.replaceCurrentMark(t);e&&o.selection.select(e)}),l(e,n)):l(e,n)},d.replaceAll=function(n,o){const r=i().activeEditor;let s=0;return r.undoManager.transact(()=>{const i=r.selection,l=r.getWin();if(a.removeCurrentMark(!1),r.execCommand("selectAll"),r.selection.collapse(!0),t()){let t=-1;for(;;){const a=e.search(i,n,t,r.getBody(),!1);if(!a[0])break;t=a[1],c(o),s++}}else for(;l.find(n,!1,!1,!1,!1,!1,!1);)c(o),s++;if(0===s)Js.notify("info",r.translate("searchreplace_dlg.notfound"));else if(1===s)Js.notify("success",r.translate("searchreplace_dlg.allreplacedsingular"));else if(s>1){const e=r.translate("searchreplace_dlg.allreplacedplural");Js.notify("success",e.replace("{0}",`${s}`))}}),s},d.destroy=function(){a=null,r=null},d},n.UI=function(e,t,o){let r=null;const a=n.utils.moveCursorToEnd;i().activeEditor&&i().activeEditor.plugins&&i().activeEditor.plugins.customtoolbar&&(r=i().activeEditor.plugins.customtoolbar.getToolbarRow(e));const s=function(){return l()(".toolbar-find-input",r)},c=function(){return l()(".toolbar-replace-input",r)},d=function(e){if("input"===e.type||"propertychange"===e.type){const e=s(),t="string"==typeof e.val()&&e.val().length>0;g(t),m(t)}
6},u=function(){const e=s();h(e&&e.val())},g=function(e){const t=i().activeEditor;e?(t.plugins.customtoolbar.enableToolbarButton("search-toolbar-find-next-button"),t.plugins.customtoolbar.enableToolbarButton("search-toolbar-find-previous-button")):(t.plugins.customtoolbar.disableToolbarButton("search-toolbar-find-next-button"),t.plugins.customtoolbar.disableToolbarButton("search-toolbar-find-previous-button"))},m=function(e){const t=s();p().toggleClass("default-action",e&&t.val().length>0)},p=function(){return l()(".search-toolbar-find-next-button",r).closest(".aui-button")},f=function(e){const t=i().activeEditor.plugins.customtoolbar,n="search-toolbar-replace-button";e?t.enableToolbarButton(n):t.disableToolbarButton(n)},h=function(e){const t=i().activeEditor.plugins.customtoolbar,n="search-toolbar-replaceall-button";e?t.enableToolbarButton(n):t.disableToolbarButton(n)},b={};return b.getFindInput=s,b.getReplaceInput=c,b.focusFindTextBox=function(){top.focus(),s().trigger("focus")},b.onVisible=function(){const e=s();e.trigger("focus"),e.val().length>0&&(a(e[0]),g(!0),h(!0))},b.destroy=function(){},b.marked=function(){f(!0)},b.markRemoved=function(){f(!1)},function(e,t){const n=s();let o=!1;e&&e.length&&(n.val(e),o=!0),t&&t.length&&c().val(t),function(){function e(e,t){e&&e.on("input",t)}const t=s();e(t,d),e(t,u),l()(r).on("focusin",()=>{m(!0)}).on("focusout",()=>{m(!1)}),t.on("focus",()=>{m(!0)})}(),g(o),h(o),f(!1)}(t,o),b},n.MarkManager=function(){let e=null;const t=i().html.Writer();let n=null;const o=[],r=function(){c()},a=function(){if(!e)return null;const t=i().activeEditor;return t.selection.select(e[0]),t.selection},s=function(t){f(),(d(e,t)||n&&i().activeEditor.selection.getRng().toString()==n)&&(e=null,n=null,l().each(o,(e,t)=>{t.markRemoved()}))},c=function(){f(),l()("mark",i().activeEditor.getDoc()).each((e,t)=>{d(l()(t),!1)}),e=null,n=null,l().each(o,(e,t)=>{t.markRemoved()})},d=function(e,t){const n=i().activeEditor,o=n.selection.getRng();if(!e)return!1;const r=function(e,t){if(e.intersectsNode)return e.intersectsNode(t);{const o=n.getDoc().createRange();return o.selectNodeContents(t),!(e.compareBoundaryPoints(Range.START_TO_END,o)<=0||e.compareBoundaryPoints(Range.END_TO_START,o)>=0)}}(o,e[0]);let a=null,s=null;if(e.contents().each((t,n)=>{e.before(n),a||(a=n),s=n}),r||t){const e=n.selection.getRng();e.setStartBefore(a),e.setEndAfter(s),t||e.collapse(!1),n.selection.setRng(e)}return e.remove(),!0},u=function(){return!!e||(n?i().activeEditor.selection.getRng().toString()==n:void 0)},g=function(){c()},m=function(){f(),l().each(o,(e,t)=>{t.markRemoved()})},p=function(e){const t=i().activeEditor;t.on("Change",r),t.on("BeforeSetContent",r),e&&(t.on("Click",m),t.on("DblClick",m))},f=function(){const e=i().activeEditor;e.off("Change",r),e.off("BeforeSetContent",r),e.off("Click",m),e.off("DblClick",m)},h={markCurrentlySelectedRange:function(){const t=i().activeEditor;if(e){const e=t.selection.getBookmark();s(!1),t.selection.moveToBookmark(e)}n=null;const r=t.selection.getRng();if(e=l()('<mark data-searching class="find-current"></mark>',t.getDoc()),r)try{r.surroundContents(e[0]),p(!1)}catch(t){1==t.code&&(n=r.toString(),e=null,p(!0))}if(l().each(o,(e,t)=>{t.marked()}),!n){const e=a();e&&e.collapse()}}};return h.removeCurrentMark=s,h.removeAllMarks=c,h.selectCurrentMark=a,h.isCursorAtCurrentMark=function(){if(!e)return!1;const t=i().activeEditor.selection;t.isCollapsed()||t.collapse();const n=t.getRng();if(n){if(3===n.startContainer.nodeType)return n.startContainer.parentNode&&n.startContainer.parentNode.normalize(),n.startContainer.nextSibling===e[0]||n.startContainer.previousSibling===e[0];if(1===n.startContainer.nodeType){const t=n.startContainer.childNodes,o=n.startOffset;return o>0&&t[o-1]===e[0]||o+1<t.length&&t[o+1]===e[0]}}},h.hasCurrentMark=u,h.replaceCurrentMark=function(n){if(function(n){if(e||!u())return!1;const o=i().activeEditor;return o.undoManager.transact(()=>{t.text(n,!1),o.selection.setContent(t.getContent(),{format:"raw"}),t.reset()}),o.undoManager.ignore(()=>{s(!1)}),!0}(n))return null;if(!e)return null;const o=i().activeEditor,r=[];let a;return o.undoManager.ignore(()=>{e.contents().each((e,t)=>{r.push(t)}),s(!1)}),o.undoManager.transact(()=>{a=l()(r[0]).before(o.getDoc().createTextNode(n))[0].previousSibling;for(let e=r.length-1;e>=0;e--)l()(r[e]).remove()}),a},h.addListener=function(e){o.push(e)},h.destroy=function(){s(!0),i().activeEditor.off("BeforeGetContent",g)},i().activeEditor.on("BeforeGetContent",g),h},n(rc)}();function ic(e){const t=h.Confluence.Editor;let n=null,o=!1;const r=function(e){e.preventDefault(),e.stopPropagation()},a=function(e){r(e);let t=e.which;t||(t=e.charCode?e.charCode:e.keyCode),t<48||n.push(t)},s=function(e){return e>65535?(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e))):String.fromCharCode(e)},c=function(e){const t=l()("#rte-button-searchreplace a");t.length&&(e?t.off("click",!1):t.on("click",!1))},d=function(){if(o)return;o=!0;const d=l()("#rte-button-searchreplace"),u=!d.hasClass("active"),g=l()("body"),m=!g.hasClass("no-tools")||g.hasClass("no-tools-toolbars-visible");u?(d.addClass("active"),l()(document).trigger("createContextToolbarRow.Toolbar",{id:rc,buttons:t.searchToolbar.Buttons,topToolbar:!0,editorAdjacent:!0,animate:m,onVisible(){const t=function(){e.off("KeyDown",a),e.off("KeyPress",r),e.off("KeyUp",r);let t="";const o=n||[];for(let e=0;e<o.length;e++)t+=s(o[e]);return n=null,t.toLowerCase()}();ac.onVisible(t),c(!0),o=!1,ac.initialised=!0}}).trigger("enableContextToolbarRow.Toolbar"),n=[],e.on("KeyDown",a),e.on("KeyPress",r),e.on("KeyUp",r),ac.init(),c(!1)):(d.removeClass("active"),ac.onHide(),l()(document).trigger("removeContextToolbarRow.Toolbar",{id:rc,animate:m,onHide(){l()(document).trigger("contextToolbarRowRemoved.Toolbar"),c(!0),o=!1,ac.initialised=!1}}),c(!1),i().Env.browser.isFirefox()||frames.wysiwygTextarea_ifr.focus(),e.focus())};return{init(e){e.addCommand("mceSearchReplaceToolbar",()=>
6(e.undoManager.ignore(()=>{d()}),!1)),e.addCommand("mceConfSearch",(t,n)=>!(!ac||((n=n||{}).backwards&&!e.plugins.customtoolbar.isToolbarButtonEnabled("search-toolbar-find-previous-button")?(ac.focus(),1):n.backwards||e.plugins.customtoolbar.isToolbarButtonEnabled("search-toolbar-find-next-button")?(ac.find(n.backwards,n.onFound,n.onNotFound),1):(ac.focus(),1)))),e.addCommand("mceConfReplaceAll",(t,n)=>!!ac&&(n=n||{},!!e.plugins.customtoolbar.isToolbarButtonEnabled("search-toolbar-replaceall-button")&&(ac.replaceAll(n.onReplaced,n.onNotReplaced),!1))),e.addCommand("mceConfSearchClose",()=>!!ac&&(e.undoManager.ignore(()=>{e.execCommand("mceSearchReplaceToolbar",!1,null)}),!1)),e.ui.registry.addButton("searchreplace",{text:"searchreplace.search_desc",onAction:function(){e.execCommand("mceSearchReplaceToolbar")}}),e.shortcuts.add("meta+f","searchreplace.search_desc",()=>{ac&&ac.isVisible()?ac.focus():e.undoManager.ignore(()=>{e.execCommand("mceSearchReplaceToolbar",!1,!1)})})},getInfo:()=>({longname:"Search/Replace",author:"Atlassian",authorurl:"http://www.atlassian.com",infourl:"http://www.atlassian.com",version:`${i().majorVersion}.${i().minorVersion}`})}}function sc(){return{init:e=>{O("editor.sort.table.by.column.disabled")||l()(window).one("rte-ready",()=>{n.e("sort-handler").then(n.bind(n,4365)).then(({default:e})=>{e()})});const t=e=>{l()(".tablesorter",e.node).each((e,t)=>{let n,o,r=l()(t).find("thead");1===r.length&&(r=r[0],"THEAD"===r.nodeName&&1===r.childNodes.length&&(o=r.removeChild(r.childNodes[0]),n=l()(t).find("tbody")[0],t.removeChild(r),n.insertBefore(o,n.childNodes[0])))})};e.on("PastePostProcess",t),e.on("remove",()=>{e.off("PastePostProcess",t)})},getInfo:()=>({longname:"ConfluenceSortableTablesPlugin",author:"Atlassian",authorurl:"http://www.atlassian.com",infourl:"http://www.atlassian.com",version:"1.0"})}}(0,bn.A)("confluence-editor/search-manager",()=>ac);var lc=n(284),cc={};lc.A&&lc.A.locals&&(cc.locals=lc.A.locals);var dc,uc=0,gc={};gc.styleTagTransform=On(),gc.setAttributes=Nn(),gc.insert=$s(),gc.domAPI=Tn(),gc.insertStyleElement=Bn(),cc.use=function(e){return gc.options=e||{},uc++||(dc=Mn()(lc.A,gc)),cc},cc.unuse=function(){uc>0&&! --uc&&(dc(),dc=null)};const mc=cc;var pc=n(2652),fc={};fc.styleTagTransform=On(),fc.setAttributes=Nn(),fc.insert=Dn().bind(null,"head"),fc.domAPI=Tn(),fc.insertStyleElement=Bn(),Mn()(pc.A,fc),pc.A&&pc.A.locals&&pc.A.locals;const hc="status-macro-title first last editable",bc="status",yc=["Grey","Red","Yellow","Green","Blue"],wc=yc[0];let vc,Cc,Ac,xc,kc;function Mc(){Ec();const e=h.Confluence.MacroParameterSerializer.deserialize(l()(Cc).attr("data-macro-parameters"));let t=!1,n=!1;return e&&Ac&&(t=e.title!==Ac.title,n=e.colour!==Ac.colour),t||n}function Ec(){if(xc){const e=Tc(Ac)==xc.val(),t=""===xc.val();e||t?delete Ac.title:Ac.title=xc.val()}}function Tc(e){return e.colour||e.color||wc}function Ic(){return xc=null,!0}function Dc(e){xc=function(){const e=l()("<input/>");return e.attr("class",hc),e.on("keyup",e=>13!==e.keyCode||(h.Confluence.PropertyPanel.destroy(),!1)),e.on("keydown",e=>27!==e.keyCode||Ic()),e}(),xc.val(e.find("span.panel-button-text").text()),e.replaceWith(xc),xc.trigger("select").trigger("focus")}function Sc(e){e.on("init",()=>{mc.use()}),e.on("Remove",()=>{mc.unuse()})}function Nc(e){function t(e){const t={id:!0,class:!0,style:!0,rowspan:!0,colspan:!0,"data-mce-style":!0,"data-mce-bogus":!0,"data-macro-name":!0,"data-macro-parameters":!0,"data-macro-body-type":!0,"data-highlight-colour":!0,"data-highlight-class":!0,"data-mce-resize":!0,"data-snooker-col-series":!0,"data-snooker-locked-cols":!0,
6contenteditable:!0},r=["highlight","nohighlight","relative-table","fixed-table","fixed-width","numberingColumn"];let a,i=0;const s=[];let l,c;const d=$(e);if(!e||o(e))return e;if(function(e){let t;return e&&e.getAttribute&&(t=e.getAttribute("class")),t&&t.indexOf("table-wrap")>=0}(e)){const t=$("table",e);if(!t.length)return null;$(t).unwrap(),e=t[0]}if(function(e){return!!e.tagName&&("TABLE"===e.tagName||"TR"===e.tagName||"TH"===e.tagName||"TD"===e.tagName||"TBODY"===e.tagName||"THEAD"===e.tagName||"TFOOT"===e.tagName||"COL"===e.tagName||"COLGROUP"===e.tagName||"CAPTION"===e.tagName)}(e)&&e.attributes){for(;i<=e.attributes.length;)a=e.attributes[i],a&&!0===a.specified&&!t[a.name]?e.removeAttribute(a.name):i++;n(e)&&s.push(n(e));for(let e=0,t=r.length;e<t;e++)d.hasClass(r[e])&&s.push(r[e]);l=d.attr("data-highlight-class"),l&&s.push(l),c=d.attr("data-highlight-colour"),c&&s.push("highlight-"+c),d.attr("class",s.join(" "))}return e}function n(e){return e.tagName?"TABLE"===e.tagName?"confluenceTable":"TH"===e.tagName?"confluenceTh":"TD"===e.tagName?"confluenceTd":"":""}function o(e){let t;return e&&e.getAttribute&&(t=e.getAttribute("class")),!!e.tagName&&"TABLE"===e.tagName&&!!t&&-1!==t.indexOf("wysiwyg-macro")}function r(e,t){return t&&t.parentNode===e}function a(e,n,a){a.node=function(e,t){let n,a=e;for(;a&&("function"==typeof t&&(a=t(a)),a);)!a.firstChild||r(a,n)||o(a)?a.nextSibling?(n=a,a=a.nextSibling):(n=a,a=a.parentNode):(n=a,a=a.firstChild);return e}(a.node,t)}e.on("Init",function(){xt(document,"postPaste",a)}),e.on("Remove",function(){kt(document,"postPaste",a)})}function Lc(e,t){const n=l().parseHTML(e),o=[Node.ELEMENT_NODE,Node.DOCUMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE];let r=!1;return n.forEach(function(e){(kc.dom.is(e,t)||o.includes(e.nodeType)&&e.querySelector(t))&&(r=!0)}),r}function Bc(){(0,B.hZ)("analytics",{name:"confluence.table.image.insert",data:{pageId:u.A.get("page-id"),tableMode:Oc()}})}function Rc(){return!!l()(kc.selection.getNode()).closest("table.confluenceTable").length}function Oc(){const e=l()(kc.selection.getNode()).closest("table.confluenceTable");return e.hasClass("fixed-table")||e.hasClass("fixed-width")?"fixed":e.hasClass("relative-table")?"relative":"fluid"}function Pc(){const e=l()(kc.getBody()).find("table.confluenceTable");(0,B.hZ)("analytics",{name:"confluence.table.quality.in.page",data:{pageId:u.A.get("page-id"),total:e.length,fixed:e.filter(".fixed-table,.fixed-width").length,fluid:e.filter(":not(.fixed-table,.relative-table,.fixed-width)").length,relative:e.filter(".relative-table").length,nested:e.find("table.confluenceTable").length}})}function jc(){return{init(e){function t(e,t){Rc()&&function(e){e&&e.name&&e.name.indexOf("confluence.editor.image.resize")>=0&&(0,B.hZ)("analytics",{name:"confluence.table.img.resize",data:{pageId:u.A.get("page-id"),tableMode:Oc(),isImgBiggerCell:function(){const e=l()(kc.selection.getNode()),t=e.closest("th, td");return e.width()>t.width()}()}})}(t)}kc=e,e.on("ExecCommand",e=>{switch(e.command){case"mceAutoWidth":case"mceRelativeWidth":case"mceFixedWidth":(0,B.hZ)("analytics",{name:`confluence.table.mode.to.${Oc()}`,data:{pageId:u.A.get("page-id")}});break;case"mceTableCopyRow":(0,B.hZ)("analytics",{name:"confluence.table.row.copy",data:{pageId:u.A.get("page-id")}});break;case"mceTablePasteRowBefore":case"mceTablePasteRowAfter":(0,B.hZ)("analytics",{name:"confluence.table.row.paste",data:{pageId:u.A.get("page-id")}});break;case"mceTableCopyCol":(0,B.hZ)("analytics",{name:"confluence.table.col.copy",data:{pageId:u.A.get("page-id")}});break;case"mceTablePasteColBefore":case"mceTablePasteColAfter":(0,B.hZ)("analytics",{name:"confluence.table.col.paste",data:{pageId:u.A.get("page-id")}});break;case"mceInsertContent":Lc(t=e.value,"img")&&Rc()&&Bc(),Lc(t,"table.confluenceTable")&&(0,B.hZ)("analytics",{name:"confluence.table.paste",data:{pageId:u.A.get("page-id")}});break;case"confTableSelectionToggleHighlight":(0,B.hZ)("analytics",{name:"confluence.editor.table.selection.toggle.highlight",data:{color:l()("#table-highlight-group").attr("data-highlight-colour")}})}var t}),e.on("Init",()=>{e.on("SetContent",e=>{Rc()&&e&&function(e){Lc(e.content,".confluence-embedded-image")&&Bc()}(e)})}),(0,B.oI)("analyticsEvent",t),(0,B.oI)("rte.safe-save.success",Pc),e.on("Remove",()=>{(0,B.Nw)("analyticsEvent",t),(0,B.Nw)("rte.safe-save.success",Pc)})},getInfo:()=>({longname:"Table Analytics Plugin",author:"Atlassian",authorurl:"http://www.atlassian.com",version:`${h.tinymce.majorVersion}.${h.tinymce.minorVersion}`})}}function $c(){const e="> h1, > h2, > h3, > h4, > h5, > h6",t=["img:not(.editor-inline-macro, .emoticon)"].concat(["time.non-editable",".editor-inline-macro","a.confluence-link[data-linked-resource-type='userinfo']"]).concat([".wysiwyg-macro"]).join(","),n="<div class='content-wrapper'>";return{init(o){function r(){const e="wrapped";l()(o.dom.select(`table.confluenceTable:not(.${e})`)).each((o,r)=>
6{l()(r).addClass(e).find("> tbody > tr > th, > tbody > tr > td, > thead > tr > th").each((e,o)=>{const r=l()(o);!r.find("> .content-wrapper").length&&r.find(t).length&&r.wrapInner(n)})})}(0,B.oI)("rte-ready",r),o.on("Remove",()=>{(0,B.Nw)("rte-ready",r)}),o.on("Change",()=>{const r=o.selection;function a(){return r.getBookmark()}function i(e){r.moveToBookmark(e),It()}const s=r.getNode(),c=l()(s);if(s&&c.closest("table.confluenceTable").not("table.confluenceTable table.confluenceTable").length){!function(e){const t=r.getRng();if(e.is("tr")&&t&&l()(t.startContainer).is("tr")&&t.collapsed){const n=e.find(">td, >th").first(),o=n.find(":first-child:not(.content-wrapper)")[0]||n[0].firstChild;t.setStart(o,0),t.setEnd(o,0),r.setRng(t)}}(c);const o=c.closest("table.confluenceTable > tbody > tr > th, table.confluenceTable > tbody > tr > td, table.confluenceTable > thead > tr > th");let s;if(o.find(t).length){const t=o.find("> .content-wrapper");t.length?(s=a(),function(t){for(let n=0;n<t.length;n++)t.eq(n).find(`> p, > table, > ul, > ol, ${e}`).length||t.eq(n).wrapInner("<p/>"),n>0&&(t.eq(0).append(t.eq(n).children()),t.eq(n).remove())}(t),i(s)):o.find(`> p, ${e}`).length?(s=a(),o.wrapInner(n),i(s)):(s=a(),o.wrapInner("<p/>").wrapInner(n),i(s))}}l()(o.getWin().document).find(".content-wrapper:empty").remove()})},getInfo:()=>({longname:"Table Content Wrapper Plugin",author:"Atlassian",authorurl:"http://www.atlassian.com",version:"1.0"})}}const Fc=/^\u200b?(\[)$/;function _c(e){return e.dom.getParent(e.selection.getStart(),"UL,OL")}function zc(e){return!(!e||"ul"!==e.nodeName.toLowerCase()||!e.classList.contains("inline-task-list"))}function Uc(e){return e&&"ul"===e.nodeName.toLowerCase()&&!zc(e)}function Hc(e){e&&e.classList.contains("inline-task-list")&&(e.classList.remove("inline-task-list"),0===e.classList.length&&e.removeAttribute("class"),e.removeAttribute("data-inline-tasks-content-id"),Array.prototype.slice.call(e.children).forEach(e=>{e.removeAttribute("data-inline-task-id"),e.classList.remove("checked"),e.style.backgroundImage=""}))}function Wc(){return!S()&&"page"!==u.A.get("content-type")&&"blogpost"!==u.A.get("content-type")&&"template"!==u.A.get("content-type")}function Vc(e){const t=()=>{const t=_c(e);t&&(t=>{const n=e.dom.getParent(t.parentElement,"UL");return t&&"UL"===t.tagName&&n&&n.classList.contains("inline-task-list")&&t!=n})(t)&&(e=>Array.from(e.childNodes).every(e=>e.hasAttribute("data-inline-task-id")))(t)&&e.undoManager.ignore(()=>{t.classList.add("inline-task-list")})},n=()=>("page"!==u.A.get("content-type")&&"blogpost"!==u.A.get("content-type")&&"template"!==u.A.get("content-type")||e.undoManager.transact(()=>{Uc(_c(e))&&(e.execCommand("InsertOrderedList"),Hc(_c(e))),function(e){const t=_c(e);t&&zc(t)||function(e,t){const n=`a11y-notification-${e.dom.uniqueId()}`;e.getBody().insertAdjacentHTML("afterend",`<div class="assistive" aria-live="assertive" role="Alert" id="${n}"></div>`);const o=e.getDoc().getElementById(n);if(o){o.insertAdjacentHTML("afterbegin",`<span>${t}</span>`);const e=setTimeout(()=>{o.remove(),clearTimeout(e)},3e3)}}(e,r().I18n.getText("task-list.a11yNotifications.task-list-created"));const n=e.dom.uniqueId();e.execCommand("InsertUnorderedList",!1,{"list-attributes":{"data-task-list-id":n,class:"inline-task-list"},"list-item-attributes":{"data-inline-task-id":""}}),e.dom.select(`[data-task-list-id="${n}"]`).forEach(t=>{const n=t.querySelectorAll("li")[0];n&&e.dom.isEmpty(t)&&(n.innerHTML=`<span class="placeholder-inline-tasks">${(0,we.A)("tinymce.confluence.placeholder.inline.tasks")}</span>`,e.selection.select(n.firstChild,!0)),t.removeAttribute("data-task-list-id"),t.querySelectorAll("li").forEach(e=>{null===e.getAttribute(xe)&&e.setAttribute(xe,Ce())})})}(e)}),!1);function o(t,n){if(Wc())return;const o=n.handlerManager,r=n.createHandler;o.registerHandler("]".charCodeAt(0),r(Fc,()=>{e.execCommand("InsertInlineTaskList")},!0))}function a(){e.addQueryStateHandler("InsertInlineTaskList",()=>zc(_c(e))),e.addQueryStateHandler("InsertUnorderedList",()=>Uc(_c(e)))}function i(t,n,o){if(Wc()){const t=e.dom.createFragment("");t.appendChild(o.node),Array.prototype.slice.call(t.querySelectorAll("ul.inline-task-list, ol.inline-task-list")).forEac
6h(e=>Hc(e))}}e.addCommand("InsertInlineTaskListNoToggle",()=>(zc(_c(e))||n(),!1)),e.addCommand("InsertInlineTaskList",n),e.on("BeforeExecCommand",t=>{"InsertUnorderedList"===t.command&&zc(_c(e))&&!t.value?e.undoManager.ignore(()=>{e.execCommand("InsertOrderedList"),Hc(_c(e))}):"InsertOrderedList"!==t.command||t.value||e.undoManager.ignore(()=>{Hc(_c(e))})}),e.on("execCommand",e=>{"Indent"===e.command&&t()}),e.on("Click",function(t){const n=t.target;if("LI"!==n.tagName)return;const o=e.dom.getParent(n,"ul,ol");"UL"===o.tagName&&e.dom.hasClass(o,"inline-task-list")&&function(t,n){let o,r;if(h.tinymce.Env.browser.isFirefox()){const a=n.getBoundingClientRect();o=t.pageX-(a.left+h.tinymce.DOM.getViewPort(e.getWin()).x),r=t.pageY-(a.top+h.tinymce.DOM.getViewPort(e.getWin()).y)}else o=t.offsetX,r=t.offsetY;return o>=3&&o<=14&&r>=3&&r<=14}(t,n)&&(e.dom.hasClass(n,"checked")?e.dom.removeClass(n,"checked"):e.dom.addClass(n,"checked"))}),e.on("KeyDown",e=>{e.shiftKey||e.keyCode!==h.tinymce.util.VK.TAB||h.tinymce.util.VK.metaKeyPressed(e)||t()}),(0,B.oI)("confluence.editor.registerHandlers",o),(0,B.oI)("rte-ready",a),xt(document,"postPaste",i
6),e.on("Remove",()=>{(0,B.Nw)("confluence.editor.registerHandlers",o),(0,B.Nw)("rte-ready",a),kt(document,"postPaste",i)})}function Qc(){return{init(e){e.on("init",()=>{e.getBody().classList.add("template-editor")})}}}function Yc(){return{init(e){e.on("KeyDown",t=>{h.tinymce.VK.modifierPressed(t)||32!==t.keyCode||function(e){const t=e.selection.getNode(),n=l()(t).closest("a"),o=e.selection.getRng();n.length&&o&&Lr.isCursorAtEnd(e,o)&&(o.setStartAfter(n[0]),o.setEndAfter(n[0]),e.selection.setRng(o),e.selection.collapse())}(e),h.tinymce.VK.modifierPressed(t)||8!==t.keyCode&&37!==t.keyCode||function(e){if(e.selection.isCollapsed()&&!function(e){return!!e.dom.getParents(e.selection.getNode(),"#autocomplete-search-text").length}(e)){const t=function(e){if(!e)return null;const t=e.endOffset;return 3===e.endContainer.nodeType?e.endContainer:e.endContainer.childNodes[t-1]}(e.selection.getRng());t&&t.nodeValue&&65279===t.nodeValue.charCodeAt(0)&&function(e,t){return 1==t.nodeValue.length&&1==e.selection.getNode().childNodes.length}(e,t)&&e.undoManager.ignore(()=>{(function(e,t){if(t&&t.previousSibling&&t.previousSibling.hasChildNodes()){const n=t.previousSibling,o=n.childNodes.length,r=n.childNodes[o-1],a=r.length,i=e.dom.createRng();i.setStart(r,a),i.setEnd(r,a),e.selection.setRng(i)}})(e,t),t.parentNode&&t.parentNode.removeChild(t)})}}(e)})}}}var Zc=n(1339),Kc={};Zc.A&&Zc.A.locals&&(Kc.locals=Zc.A.locals);var Gc,qc=0,Jc={};Jc.styleTagTransform=On(),Jc.setAttributes=Nn(),Jc.insert=$s(),Jc.domAPI=Tn(),Jc.insertStyleElement=Bn(),Kc.use=function(e){return Jc.options=e||{},qc++||(Gc=Mn()(Zc.A,Jc)),Kc},Kc.unuse=function(){qc>0&&! --qc&&(Gc(),Gc=null)};const Xc=Kc;function ed(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const td=(e,t)=>{if("number"==typeof e)return e;if("string"==typeof e&&/^\d+/.test(e))try{return parseInt(e)}catch(e){return t}return t};class nd{constructor(e){ed(this,"scope",void 0),ed(this,"listeners",void 0),ed(this,"inDispatch",void 0),this.inDispatch=!1,this.scope=e||this,this.listeners=[]}add(e,t){return this.listeners.push({cb:e,scope:t||this.scope}),e}addToTop(e,t){const n=this,o={cb:e,scope:t||n.scope};return n.inDispatch?n.listeners=[o].concat(n.listeners):n.listeners.unshift(o),e}remove(e){const t=this.listeners;let n=null;return h.tinymce.each(t,(o,r)=>{if(e==o.cb)return n=o,t.splice(r,1),!1}),n}dispatch(){const e=this,t=arguments,n=e.listeners;let o,r,a;for(e.inDispatch=!0,r=0;r<n.length&&(o=n[r],a=o.cb.apply(o.scope,t.length>0?t:[o.scope]),!1!==a);r++);return e.inDispatch=!1,a}}function od(e){return"object"==typeof e&&e.name}function rd(e,t){return"string"==typeof t?e.queryCommandState(t):!!od(t)&&e.queryCommandState(t.name)}function ad(e){this.init=this.init(e)}function id(e){const t={},n={bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",justifyleft:"JustifyLeft",justifycenter:"JustifyCenter",justifyright:"JustifyRight",bullist:"InsertUnorderedList",numlist:"InsertOrderedList",tasklist:"InsertInlineTaskList",outdent:"Outdent",indent:"Indent",cut:"Cut",copy:"Copy",paste:"Paste",undo:"Undo",redo:"Redo",removeformat:"RemoveFormat",sub:"subscript",sup:"superscript",forecolor:"ForeColor",forecolorpicker:"mceForeColor",backcolor:"HiliteColor",backcolorpicker:"mceBackColor",charmap:"mceCharMap",visualaid:"mceToggleVisualAid",anchor:"mceInsertAnchor",newdocument:"mceNewDocument",blockquote:"mceBlockQuote",help:"mceConfShortcutDialog"},o=["bold","italic","underline","bullist","numlist","tasklist","justifyleft","justifycenter","justifyright","strikethrough,sub,sup,monospace"];function r(e){const n=e.undoManager;t.buttons.state.dispatch("undo","disabled",!n.hasUndo()&&!n.typing),t.buttons.state.dispatch("redo","disabled",!n.hasRedo())}function a(t){const o=e.ui.registry.getAll().buttons[t];if(!o)return!1;o.cmd?n[t]=o.cmd:n[t]={func:o.onAction,name:t}}const i=ad.shouldInit();return i&&ad.suppressIncompatiblePlugins(),e.on("Init",()=>{h.tinymce.each(h.tinymce.explode("formatselect,confimage,conf_macro_browser,code,customtoolbar,monospace,searchreplace,linkbrowserbutton"),n=>{a(n)||"formatselect"!==n||function(){const n=l()("#toolbar");t.formatselect={},t.formatselect.state=new nd,t.formatselect.click=new nd,t.formatselect.click.add(t=>{const o=e.plugins.toolbarfocusmanager.shouldRestoreVisualFocus();e.execCommand("FormatBlock",!1,t),o||(["p","h1","h2","h3","h4","h5","h6","pre","blockquote"].includes(t)?n.find("a#format-dropdown-display").trigger("focus"):"removeformat"===t&&n.find("a#rte-button-more").trigger("focus"),e.plugins.toolbarfocusmanager.setHasVisualFocus(!1))})}()}),function(){const o=l()("#toolbar");t.buttons={},t.buttons.state=new nd,t.buttons.click=new nd,t.buttons.click.add(t=>{const r=n[t];if("string"==typeof r){const n=e.plugins.toolbarfocusmanager.shouldRestoreVisualFocus();if(e.execCommand(r),n)return;["strikethrough","sub","sup"].includes(t)?o.find("a#rte-button-more").trigger("focus"):o.find(`a[data-control-id="${t}"]`).trigger("focus"),e.plugins.toolbarfocusmanager.setHasVisualFocus(!1)}else if(od(r)&&"string"!=typeof r){const t=e.plugins.toolbarfocusmanager.shouldRestoreVisualFocus();r.func(),t||"monospace"!==r.name||(o.find("a#rte-button-more").trigger("focus"),e.plugins.toolbarfocusmanager.setHasVisualFocus(!1))}})}(),function(){const t={toolbar:"toolbar-primary",title:"",tooltip:"",cmd:"",className:"",locationGroup:null,weight:1/0,onclick:null},n=e.ui.registry.getAll().buttons;let o=[];for(const e in n)o.push({...t,...n[e],id:e,weight:td(n[e].weight,1/0)});o=o.filter(e=>
6!!e.locationGroup),["toolbar-primary"].forEach(e=>{const t=l()(`.${e}`);o.filter(t=>t.toolbar===e).sort((e,t)=>e.weight-t.weight).forEach(e=>{a(e.id);const n=t.find(`.${e.locationGroup}`),o=l()(`<li id="${(r=e).id}" class="toolbar-item ${r.className}" data-tooltip="${r.tooltip}" data-weight="${r.weight}">\n <a class="toolbar-trigger aui-button aui-button-subtle" role="button" aria-label="${r.tooltip}" href="#" data-control-id="${r.id}">\n <span class="icon ${r.icon}"></span>\n <span class="trigger-text">${r.title}</span>\n </a>\n </li>`);var r;n.append(o).removeClass("hidden")})})}(),e.mode.isReadOnly()||(e.on("NodeChange",a=>{!function(e,a){h.tinymce.each(o,o=>{let r,a=!1;if(o.indexOf(",")>0){const t=o.split(",");r=t[0],a=t.some(t=>!!rd(e,n[t]))}else r=o,a=!!rd(e,n[r]);t.buttons.state.dispatch(r,"active",a)}),r(e),t.buttons.state.dispatch("outdent","disabled",!rd(e,"Outdent"));const i=function(e){const t=a.parents;for(let n=0;n<t.length;n++)if(e(t[n]))return t[n]}(e.dom.isBlock);i&&t.formatselect.state.dispatch(i.nodeName.toLowerCase())}(e,{parents:a.parents})}),e.on("keyup",()=>{r(e)}),e.on("MouseUp",()=>{r(e)}),e.dom.bind(e.dom.getRoot(),"dragend",()=>{r(e)}),i&&new ad(e)),Xc.use()}),e.on("Remove",()=>{Xc.unuse()}),{controlHandlers:t}}function sd(){let e=!1;return{init:t=>{t.on("focus",()=>{e=!0}),t.on("click",()=>{e=!0}),t.on("blur",()=>{e=!1})},getHasVisualFocus:()=>e,setHasVisualFocus:t=>{e=t},shouldRestoreVisualFocus:()=>e||document.activeElement===document.body}}ad.INCOMPATIBLE_PLUGINS=["dfe"],ad.shouldInit=()=>{const e=l()("body");return e.hasClass("edit")||e.hasClass("create")||e.hasClass("copy-page")},ad.suppressIncompatiblePlugins=()=>{const e=()=>{};for(let t=0,n=ad.INCOMPATIBLE_PLUGINS.length;t<n;t++)h.tinymce.PluginManager.lookup[ad.INCOMPATIBLE_PLUGINS[t]]=e},ad.prototype.init=e=>{const t=h.tinymce.util.VK,n=l()("#content-title"),o=l()("form.editor"),r=l()(e.getBody()),a=l()(e.getDoc()),i=l()("#editor-precursor"),s=l()(e.getWin()),c=l()("#toolbar"),d=a.scrollTop(),u=parseInt(r.css("padding-top"),10)+parseInt(r.css("margin-top"),10),g=parseInt(i.css("padding-top"),10),m=window.requestAnimationFrame;function p(t){e.plugins.customtoolbar.toggleToolbarButtons(t,t,t,()=>!l()(this).parent().hasClass("close"))}function f(e){return e.getBoundingClientRect().top+document.body.scrollTop}function b(){const e=d-a.scrollTop(),t=f(c[0])-f(o[0]),n=i.outerHeight(),s=c.outerHeight();i.css("top",`${t+s+e+g}px`),r.css("padding-top",`${n+u}px`)}return n.on("keydown",n=>{const o=n.keyCode||n.which;o!==t.ENTER&&o!==t.DOWN||(n.preventDefault(),n.stopPropagation(),e.focus(!1))}).on("focus click",()=>{p(!0)}).on("focusout",e=>{e.relatedTarget&&!c.find(e.relatedTarget).length&&p(!1)}),s.on("focus",()=>{p(!1),e.nodeChanged()}),function(e){!function t(){e(t),b()}(),r.on("scroll mousewheel",()=>{setTimeout(b,0)})}(m),!0};const ld=(e,t)=>{Object.keys(t).forEach(e=>{t[e]=Ii(t[e])}),(0,B.hZ)("analytics",{name:`confluence.spa.editor.plugins.${e}`,data:t})},cd=["imagetext","src","align","border","width","height"],dd=/\/download\/(thumbn
6ails|attachments)\/([0-9]+)\//,ud=function(e,t,n,o,r){o?(e.width=t>=r?r:t,e.style.maxWidth=""):(e.height=n>=r?r:n,e.style.maxHeight="")},gd=function(e){if((t=e)&&"IMG"===t.nodeName&&l()(t).hasClass("confluence-embedded-image")){const t=l()(e);return e={title:t.attr("data-element-title"),destination:t.attr("src"),url:t.attr("src"),border:t.attr("class")&&-1!==t.attr("class").indexOf("confluence-content-image-border")?1:0,width:t.prop("width"),height:t.prop("height"),originalSelected:!t.attr("width")&&!t.attr("height")},md.isRemoteImg(e.destination)||l()(t).hasClass("confluence-external-resource")||(e.pageId=function(e){const t=l()(e).attr("src"),n=t.match(dd);return n&&3===n.length?n[2]:(g.A.error("ERROR: could not parse page id from image url "+t),"0")}(t)),l().extend({},e)}var t;return e.destination?(e.imageFileName=e.imageFileName||e.destination,l().extend({},e)):null},md={isScaledByWidth:function(){return!1},updateImageElement:function(e,t){const n=l()(e);t.src=function(e){const t=e.destination;if(md.isRemoteImg(t))return t;const n="/thumbnails/",o="/attachments/";return e.thumbnail?t.replace(o,n):t.replace(n,o)}(t),n.toggleClass("confluence-content-image-border",!!t.border),n.toggleClass("confluence-thumbnail",!!t.thumbnail);for(let e=0,o=cd.length;e<o;e++){const o=cd[e],r=t[o];!1!==r&&null!=r?n.attr(o,r):n.removeAttr(o)}h.tinymce.activeEditor.undoManager.add()},insertFromProperties:function(e,t){l().ajax({type:"POST",contentType:"application/json; charset=utf-8",url:y.Y+"/rest/tinymce/1/embed/placeholder/image",data:l().toJSON(e),dataType:"text",success:function(e){md.insertImagePlaceholder(e,t)}})},insertImagePlaceholder:function(e,t){let n;const o=md.isScaledByWidth(),a=l()(e);n=o?r().Confluence.PropertyPanel.Image.getPresetImageSize("large"):"comment"===u.A.get("content-type")?r().Confluence.PropertyPanel.Image.getPresetImageSize("small"):r().Confluence.PropertyPanel.Image.getPresetImageSize("medium");const i=o?"max-width":"max-height";a.css(i,n+"px");const s=h.tinymce.activeEditor,c="_"+ +new Date,d=l()("<div></div>").append(a.attr("id",c));s.selection.setContent(d.html());const g=s.dom.get(c);if(s.dom.setAttrib(g,"id",""),!a.hasClass("confluence-external-resource")){let e=a.attr("data-image-width"),t=a.attr("data-image-height");void 0===e&&void 0===t&&(e=a.attr("width"),t=a.attr("height")),ud(g,e,t,o,n),this.updateThumbnailAttribute(g)}l()(g).one("load",function(){a.hasClass("confluence-external-resource")&&ud(this,this.width,this.height,o,n),r().Rte.showSelection(function(){t||r().trigger("trigger.property-panel",{elem:g}),s.undoManager.add()}),s.dispatch("Change")})},updateThumbnailAttribute:function(e){const t=e.width,n=e.height;if(t||n){const o=l()(e),r=o.attr("data-image-width"),a=o.attr("data-image-height"),i=u.A.get("max-thumb-width"),s=u.A.get("max-thumb-height"),c=!this.isRemoteImg(e.src)&&this.isThumbnailUsable(t,n,r,a,i,s);o.attr("thumbnail",c),o.toggleClass("confluence-thumbnail",c)}},isRemoteImg:function(e){const t=r().Rte.getCurrentBaseUrl();return e.match("(https?://)")&&-1===e.indexOf(t)},isThumbnailUsable:function(e,t,n,o,r,a){let i;if(e){if(i=e,i>r)return!1;if(void 0===n&&void 0===o)return!0;const t=n/o;return t>=1||t*a>=i}if(i=t,i>a)return!1;if(void 0===n&&void 0===o)return!0;const s=o/n;return s>=1||s*r>=i}};function pd(){return{init(e){e.on("Init",()=>{const e=u.A.get("version-comment");l()("#rte-savebar-tinymce-plugin-point").append(((e,t)=>`\n<span class="rte-toolbar-comment toolbar-item">\n <input id="versionComment" name="versionComment" ${t?`value="${t}"`:""}\n placeholder="${e("editor.change.comment")}"\n class="text" type="text" size="35">\n <label for="versionComment" class="assistive">${e("editor.change.comment")}</label>\n</span>\n`)(e=>(0,we.A)(e),e))})},getInfo:()=>({longname:"Confluence Version Comment",author:"Atlassian",authorurl:"http://www.atlassian.com",version:`${h.tinymce.majorVersion}.${h.tinymce.minorVersion}`})}}function fd(){return{init:e=>{e.on("init",()=>{if(u.A.get("use-watch")){const t={userWatchingOwnContent:u.A.get("user-watching-own-content")};
6l()("#rte-savebar-tinymce-plugin-point").append((e=e=>(0,we.A)(e),`\n <ul class="toolbar-group toolbar-group-watch-page" id="toolbar-group-watch-page-after-comment">\n <li class="toolbar-item">\n <input id="watchPage" name="watchPageAfterComment" value="true" type="checkbox" ${t.userWatchingOwnContent?'checked="checked"':""}/>\n <label for="watchPage">${e("comment.notification.enable")}</label>\n </li>\n </ul>\n`))}var e})},getInfo:()=>({longname:"Confluence Watch",author:"Atlassian",authorurl:"http://www.atlassian.com",version:`${h.tinymce.majorVersion}.${h.tinymce.minorVersion}`})}}const hd=[()=>{h.tinymce.PluginManager.add("toolbarfocusmanager",sd)},function(){h.tinymce.addI18n=function(e,t){const n=h.tinymce.util.I18n,o=h.tinymce.each;if("string"!=typeof e||-1!==e.indexOf("."))if(n.data=n.data||{},h.tinymce.is(e,"string"))if(h.tinymce.is(t,"string")){const o=e.split("."),r=o.shift(),a={};a[o.join()]=t,n.add(r,a)}else o(t,(t,o)=>{n.data[`${e}.${o}`]=t;const r=e.split("."),a=r.shift();r.push(o);const i={};i[r.join(".")]=t,n.add(a,i)});else o(e,(e,t)=>{o(e,(e,r)=>{o(e,(e,o)=>{const a={};"common"===r?(n.data[`${t}.${o}`]=e,a[o]=e):(n.data[`${t}.${r}.${o}`]=e,a[`${r}.${o}`]=e),n.add(t,a)})})});else n.add(e,t)}},function(){h.tinymce.PluginManager.add("atlassiantheme",id)},function(){(0,B.oI)("init.rte",Or)},function(){h.tinymce.PluginManager.add("aePaste",Et)},()=>{h.tinymce.PluginManager.add("tablePasteFilter",Nc)},()=>{h.tinymce.PluginManager.add("conflist",kr)},function(){h.tinymce.PluginManager.add("tasklist",Vc)},()=>{(0,bn.A)("confluence-editor/autoformat",()=>({handlerManager:jo,createHandler:Ro})),(0,B.oI)("init.rte",$o)},()=>{h.tinymce.PluginManager.add("deletecommand",yi)},function(){},()=>{h.tinymce.AUIWindowManager=Pt,h.tinymce.PluginManager.add("auiwindowmanager",Ot)},()=>{!function(){const e={name:"textplaceholder",canHandleElement:e=>e.hasClass("text-placeholder"),handle(e){if("click"!==e.e.type&&"mouseup"!==e.e.type)return;const t=$l(),n=e.containerEl,o=n.getAttribute("data-placeholder-type"),r=[];function a(e,t,r){return{className:`text-placeholder-property-panel-type-item text-placeholder-property-panel-type-${e}`,text:t,tooltip:r,selected:o===e,click(){!function(e){"default"===e?n.removeAttribute("data-placeholder-type"):n.setAttribute("data-placeholder-type",e);const t=l()(`.text-placeholder-property-panel-type-${e}`);t.parent().find(".text-placeholder-property-panel-type-item").removeClass("selected"),t.addClass("selected")}(e)}}}const i=a("default",(0,we.A)("property.panel.textplaceholder.display.default"),(0,we.A)("property.panel.textplaceholder.display.default.tooltip"));let s;i.selected=!o,r.push(i);for(let e=0,n=t.length;e<n;e++)s=t[e],r.push(a(s.type,s.label,s.tooltip));r.push(null),r.push({className:"text-placeholder-property-panel-remove-button",text:(0,we.A)("property.panel.textplaceholder.remove"),click(){h.Confluence.PropertyPanel.destroy(),jl(n)}}),h.Confluence.PropertyPanel.createFromButtonModel("textplaceholder",n,r,{anchorIframe:d().getEditorFrame()})}};h.Confluence.PropertyPanel.TextPlaceholder=e,(0,B.oI)("init.rte",()=>{"template"===u.A.get("content-type")&&(0,B.hZ)("add-handler.property-panel",e)})}(),h.tinymce.PluginManager.add("textplaceholders",zl)},()=>{h.tinymce.PluginManager.add("emotions",Pi)},()=>{h.tinymce.PluginManager.add("confluence",Mr)},()=>{h.tinymce.PluginManager.add("macroplaceholder",Os)},()=>{xt(document,"initContextToolbars.Toolbar",()=>{(function(){if(!i().activeEditor)return;const e=i().activeEditor,t=ri(),n="aui-icon aui-icon-small aui-iconfont-",o=r().storageManager("atlassian.editor","tables"),a=t=>{let n=e.translate(t);const o=`${t}_shortcut`,r=e.translate(o);return r&&r!==o&&(n+=` (${r})`),n},s={Buttons:[new t.Group([new t.Button({text:a("table.row_before_desc"),iconClass:`${n}insert-row-before`,click(){i().execCommand("mceTableInsertRowBefore",!1,"")}}),new t.Button({text:a("table.row_after_desc"),iconClass:`${n}insert-row-after`,click(){i().execCommand("mceTableInsertRowAfter",!1,"")}}),new t.Button({text:a("table.delete_row_desc"),iconClass:`${n}remove-row`,click(){i().execCommand("mceTableDeleteRow",!1,"")}})]),new t.Group([new t.Button({text:a("table.cut_row_desc"),iconClass:`${n}cut-table-row`,click(){i().execCommand("mceTableCutRow",!1,""),e.plugins.customtoolbar.enableToolbarButton("aui-iconfont-paste-table-row")}}),new t.Button({text:a("table.copy_row_desc"),iconClass:`${n}copy-table-row`,click(){i().execCommand("mceTableCopyRow",!1,""),e.plugins.customtoolbar.enableToolbarButton("aui-iconfont-paste-table-row")}}),new t.Button({text:a("table.paste_row_before_desc"),iconClass:`${n}paste-table-row`,click(){i().execCommand("mceTablePasteRowBefore",!1,"")},disabled:!o.doesContain("copied")})]),new t.Group([new t.Button({text:a("table.col_before_desc"),iconClass:`${n}insert-column-before`,click(){i().execCommand("mceTableInsertColBefore",!1,"")}}),new t.Button({text:a("table.col_after_desc"),iconClass:`${n}insert-column-after`,click(){i().execCommand("mceTableInsertColAfter",!1,"")}}),new t.Button({text:a("table.delete_col_desc"),iconClass:`${n}remove-column`,click(){i().execCommand("mceTableDeleteCol",!1,"")}})]),new t.Group([new t.Button({text:a("table.merge_cells_desc"),iconClass:`${n}merge-table-cells`,click(){i().execCommand("mceTableMergeCells",!1,"")}}),new t.Button({text:a("table.split_cells_desc"),iconClass:`${n}split-merged-table-cells`,click(){i().execCommand("mceTableSplitCells",!1,"")}})]),new t.Group([new t.Button({text:a("table.row_highlight"),iconClass:`${n}heading-row`,click(){i().execCommand("confTableRowToggleHeading",!1,null),i().execCommand("mceTableUpdateNumberingCol",!1,null)}}),new t.Button({text:a("table.col_highlight"),iconClass:`${n}heading-column`,click(){i().execCommand("confTableColumnToggleHeading",!1,null)}}),new t.Button({text:a("table.numbering_column_desc"),iconClass:"aui-icon aui-icon-small aui-iconfont-insert-numbered-column",id:"insert-numbering-column",click(){e.execCommand("mceTableToggleSeries",!1,{name:"numbers"})}})]),new t.SplitGroup([new t.Button({text:a("table.selection_highlight"),iconClass:`${n}paint-bucket`,click(){i().execCommand("confTableSelectionToggleHighlight",!1,null)}})],{id:"table-highlight-group",dropDownOptions:{id:"table-highlight-colour",dropdownId:"table-highlight-picker-menu",dropDownContent:function(){const e=l()('\n <div class="color-picker-container">\n <div class="color-picker">\n <aui-dropdown-menu id="table-highlight-picker-menu"/>\n </div>\n </div>\n '),t=l()(e[0].firstElementChild.firstElementChild);return l().each(si().colorValues,(e,n)=>{const o=l()("<aui-item-link >"),r=si().colorNames[n];"clear"===n?o.addClass("remove-highlight").attr("data-remove-highlight","true"):o.addClass(`highlight-#${n}`).attr("data-highlight-colour",`#${n}`),o.attr("title",r),o.attr("aria-label",r),t.append(o)}),e}(),alignment:"left"},postProcess(e){e.attr("data-highlight-colour","grey"),e.addClass("highlight-grey");
6const t=l()("<span> </span>");t.addClass("highlight-indicator"),e.find(".icon.aui-iconfont-paint-bucket").after(t)}}),new t.Group([new t.Button({text:a("table.del"),iconClass:`${n}remove-table`,click(){i().execCommand("mceTableDelete",!1,"")}})])],Events:ai};let c;v().get("is-dc-license")&&((e,t,n)=>{const o=(t,n)=>{di(e,t.currentTarget)&&(null==n||n())},r=new n.Group([new n.Button({id:li.top,text:(0,we.A)("aetable.align.top"),iconSVG:'<svg width="14" height="16" viewBox="0 0 14 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">\n<line x1="1" y1="1" x2="13" y2="1" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M6.37835 3.293L3.08535 6.585C2.89806 6.77283 2.79289 7.02725 2.79289 7.2925C2.79289 7.55775 2.89806 7.81217 3.08535 8C3.17814 8.09295 3.28834 8.16668 3.40966 8.21699C3.53097 8.26731 3.66102 8.2932 3.79235 8.2932C3.92369 8.2932 4.05373 8.26731 4.17505 8.21699C4.29636 8.16668 4.40656 8.09295 4.49935 8L6.08535 6.414V15C6.08535 15.2652 6.19071 15.5196 6.37824 15.7071C6.56578 15.8946 6.82013 16 7.08535 16C7.35057 16 7.60492 15.8946 7.79246 15.7071C7.97999 15.5196 8.08535 15.2652 8.08535 15V6.414L9.67185 8.0005C9.76476 8.09334 9.87504 8.16698 9.99641 8.2172C10.1178 8.26742 10.2479 8.29325 10.3792 8.2932C10.5105 8.29316 10.6406 8.26724 10.7619 8.21693C10.8833 8.16662 10.9935 8.09291 11.0863 8C11.1792 7.90709 11.2528 7.7968 11.303 7.67543C11.3533 7.55407 11.3791 7.42399 11.379 7.29265C11.379 7.1613 11.3531 7.03124 11.3028 6.90991C11.2525 6.78858 11.1788 6.67834 11.0858 6.5855L7.79235 3.293C7.69974 3.19983 7.58957 3.12595 7.46821 3.07566C7.34685 3.02536 7.21672 2.99965 7.08535 3C6.95398 2.99965 6.82385 3.02536 6.70249 3.07566C6.58113 3.12595 6.47096 3.19983 6.37835 3.293Z" fill="currentColor"/>\n</svg>\n',click(t){o(t,()=>e.execCommand("JustifyTop"))}}),new n.Button({id:li.middle,text:(0,we.A)("aetable.align.middle"),iconSVG:'<svg width="14" height="16" viewBox="0 0 14 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">\n<line x1="6.9" y1="0.833333" x2="6.9" y2="5.56667" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M7.44745 6.39662C7.12663 6.72661 6.60647 6.72661 6.28565 6.39662L4.14762 4.1975C3.8268 3.86751 3.8268 3.33249 4.14762 3.00251C4.46844 2.67252 4.98859 2.67252 5.30942 3.00251L6.86655 4.60413L8.42369 3.00251C8.74451 2.67252 9.26466 2.67252 9.58548 3.00251C9.90631 3.33249 9.90631 3.86751 9.58548 4.1975L7.44745 6.39662Z" fill="currentColor"/>\n<line x1="0.833333" y1="-0.833333" x2="5.56667" y2="-0.833333" transform="matrix(0 -1 -1 0 6.06667 16)" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M7.44745 9.6034C7.12663 9.27341 6.60648 9.27341 6.28566 9.6034L4.14762 11.8025C3.8268 12.1325 3.8268 12.6675 4.14762 12.9975C4.46844 13.3275 4.9886 13.3275 5.30942 12.9975L6.86655 11.3959L8.42369 12.9975C8.74451 13.3275 9.26467 13.3275 9.58549 12.9975C9.90631 12.6675 9.90631 12.1325 9.58549 11.8025L7.44745 9.6034Z" fill="currentColor"/>\n<line x1="0.833333" y1="7.96667" x2="13.1667" y2="7.96667" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round"/>\n<line x1="0.833333" y1="-0.833333" x2="13.1667" y2="-0.833333" transform="matrix(1 0 0 -1 0 7.2)" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round"/>\n</svg>\n',click(t){o(t,()=>e.execCommand("JustifyMiddle"))}}),new n.Button({id:li.bottom,text:(0,we.A)("aetable.align.bottom"),iconSVG:'<svg width="14" height="16" viewBox="0 0 14 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">\n<line x1="1" y1="-1" x2="13" y2="-1" transform="matrix(1 0 0 -1 0 14)" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M6.37835 12.707L3.08535 9.415C2.89806 9.22717 2.79289 8.97275 2.79289 8.7075C2.79289 8.44225 2.89806 8.18783 3.08535 8C3.17814 7.90705 3.28834 7.83332 3.40966 7.78301C3.53097 7.73269 3.66102 7.7068 3.79235 7.7068C3.92369 7.7068 4.05373 7.73269 4.17505 7.78301C4.29636 7.83332 4.40656 7.90705 4.49935 8L6.08535 9.586V1C6.08535 0.734784 6.19071 0.480429 6.37824 0.292892C6.56578 0.105356 6.82013 0 7.08535 0C7.35057 0 7.60492 0.105356 7.79246 0.292892C7.97999 0.480429 8.08535 0.734784 8.08535 1V9.586L9.67185 7.9995C9.76476 7.90666 9.87504 7.83302 9.99641 7.7828C10.1178 7.73258 10.2479 7.70675 10.3792 7.7068C10.5105 7.70684 10.6406 7.73276 10.7619 7.78307C10.8833 7.83338 10.9935 7.90709 11.0863 8C11.1792 8.09291 11.2528 8.2032 11.303 8.32457C11.3533 8.44593 11.3791 8.57601 11.379 8.70735C11.379 8.8387 11.3531 8.96876 11.3028 9.09009C11.2525 9.21142 11.1788 9.32166 11.0858 9.4145L7.79235 12.707C7.69974 12.8002 7.58957 12.874 7.46821 12.9243C7.34685 12.9746 7.21672 13.0004 7.08535 13C6.95398 13.0004 6.82385 12.9746 6.70249 12.9243C6.58113 12.874 6.47096 12.8002 6.37835 12.707Z" fill="currentColor"/>\n</svg>\n',click(t){o(t,()=>e.execCommand("JustifyBottom"))}})]);t.Buttons.splice(4,0,r)})(e,s,t);const d=e=>{function t(e,t){return parseInt(e.attr(t),10)}return e.filter(function(){const e=l()(this);return t(e,"rowspan")>1||t(e,"colspan")>1}).length>=1};function u(t){if("keydown"===t.type&&"Enter"!==t.key)return;const n=l()(this.parentElement),o=l()("#table-highlight-group"),r=o.attr("data-highlight-colour"),a=o.attr("data-remove-highlight");r&&(o.removeClass(`highlight-${r}`),o.removeAttr("data-highlight-colour")),o.removeClass("remove-highlight"),a&&o.removeAttr("data-remove-highlight");const i=n.attr("data-highlight-colour");i&&(o.addClass(`highlight-${i}`),o.attr("data-highlight-colour",i)),n.attr("data-remove-highlight")&&(o.addClass("remove-highlight"),o.attr("data-remove-highlight","true")),e.focus(!1),e.execCommand("confTableSelectionToggleHighlight",!1,{alwaysHighlight:!0}),t.preventDefault()}e.on("NodeChange",t=>{const n=t.element,o=l()("body"),r=!o.hasClass("no-tools")||o.hasClass("no-tools-toolbars-visible");var a;c||null==n.parentNode||"BODY"===n.nodeName||(c=!0,a=n,l()(a).closest("table:not(.wysiwyg-macro)").length?(Mt(document,"createContextToolbarRow.Toolbar",{buttons:s.Buttons,topToolbar:!0,animate:r}),Mt(document,"enableContextToolbarRow.Toolbar",{id:"default"}),(e=>{l().fn.updateTableModeInToolbar&&l()(e).closest("table").updateTableModeInToolbar()})(n),(t=>{const n=l()(t).closest("td,th"),o=l()(".mceSelected",n.closest("table"));d(n.add(o))?e.plugins.customtoolbar.enableToolbarButton("aui-iconfont-table-split"):e.plugins.customtoolbar.disableToolbarButton("aui-iconfont-table-split")})(n),(e=>{l()(e).closest("table").find(".numberingColumn").length>0?l()("#insert-numbering-column").addClass("active"):l()("#insert-numbering-column").removeClass("active")})(n),v().get("is-dc-license")&&((e,t)=>{di(t,null);const n=e.closest("td,th"),o=null==n?void 0:n.style.verticalAlign;var r;"top"!==o&&(null===(r=document.querySelector(`#${li[o]}`))||void 0===r||r.classList.add("active"))})(n,e)):Mt(document,"disableContextToolbarRow.Toolbar",{animate:r}),c=!1)}),e.on("Undo",()=>{e.nodeChanged()}),e.initialized?l()(document).on("click keydown","#table-highlight-colour aui-dropdown-menu aui-item-link a",u):e.on("init",()=>{l()(document).on("click keydown","#table-highlight-colour aui-dropdown-menu aui-item-link a",u)}),e.on("Remove",()=>
6{l()(document).off("click keydown","#table-highlight-colour aui-dropdown-menu aui-item-link a",u)}),s.Buttons.splice(0,0,new t.Group([new t.DropDownButton({id:"table-mode-picker",dropdownId:"table-mode-list-menu",text:a("table.responsive"),dropDownContent:function(){const e=l()(' <aui-dropdown-menu id="table-mode-list-menu"/>').addClass("table-mode-list"),t=[{name:a("table.responsive"),mceCmd:"mceAutoWidth",tooltip:a("table.responsive_tooltip")},{name:a("table.fixed_width"),mceCmd:"mceFixedWidth",tooltip:a("table.fixed_width_tooltip")}];return l().each(t,(t,n)=>{const o=l()(`<aui-item-link>${n.name}</aui-item-link>`).attr("data-tooltip",n.tooltip);o.on("click keydown",e=>{"keydown"===e.type&&"Enter"!==e.key||i().execCommand(n.mceCmd,!1,"")}),e.append(o)}),e}()})])),s.Buttons.splice(3,0,new t.Group([new t.Button({text:a("table.col_cut_desc"),iconClass:`${n}cut-table-column`,click(){i().execCommand("mceTableCutCol",!1,""),e.plugins.customtoolbar.enableToolbarButton("aui-iconfont-paste-table-column")}}),new t.Button({text:a("table.col_copy_desc"),iconClass:`${n}copy-table-column`,click(){i().execCommand("mceTableCopyCol",!1,""),e.plugins.customtoolbar.enableToolbarButton("aui-iconfont-paste-table-column")}}),new t.Button({text:a("table.col_paste_desc"),iconClass:`${n}paste-table-column`,click(){i().execCommand("mceTablePasteColBefore",!1,"")},disabled:!o.doesContain("copied")})]))})(),function(){const e=function(e){const t={},n={},o=function(e,n){let o,r;for(r in t)if(t.hasOwnProperty(r)&&t[r].isEnabled)for(let a=0,i=t[r].events.length;a<i;a++)o=t[r].events[a],o.type.toLowerCase().indexOf(n.type)>-1&&(o.shouldTrigger(e,n)?o.callback.apply(this,[n.target]):o.missed&&o.missed())};return{addEventsForComponent(r,a){r in t||(t[r]={},t[r].events=[],t[r].isEnabled=!0);for(let i=0,s=a.length;i<s;i++)!(a[i].type in n)&&function(){n[a[i].type]=!0,e[a[i].type].add(o)}(),"function"!=typeof a[i].shouldTrigger&&function(e){a[i].shouldTrigger=function(t,n){return n.target.tagName.toLowerCase()==e}}(a[i].shouldTrigger),t[r].events.push(a[i])},disableEventsForComponent(e){for(let n=0,o=t.length;n<o;n++)if(e in t)return t[e].isEnabled=!1,!0;return!1},enableEventsForComponent(e){for(let n=0,o=t.length;n<o;n++)if(e in t)return t[e].isEnabled=!0,!0;return!1}}}(h.tinymce);e.addEventsForComponent("TableToolbar",ai)}()})},()=>{ri(),h.tinymce.PluginManager.add("customtoolbar",oi)},()=>{h.tinymce.PluginManager.add("insertwikimarkup",Es)},()=>{h.tinymce.PluginManager.add("propertypanel",Zl)},function(){},()=>{h.tinymce.PluginManager.add("confmonospace",Ir)},function(){i().PluginManager.add("confcharmap",Yo)},()=>{h.tinymce.PluginManager.add("iosediting",Ds)},()=>{h.tinymce.PluginManager.add("aeTable",L)},()=>{const e=function(){const e=function(e){const t=this;e.on("Undo",()=>{t.cleanLinks(e)}),this.editor=e,this.weightedHandlers=[],this.handlers=[]};function t(e){const n=t.options,o=n.parser[n.strictMode?"strict":"loose"].exec(e),r={};let a=14;for(;a--;)r[n.key[a]]=o[a]||"";return r[n.q.name]={},r[n.key[12]].replace(n.q.parser,(e,t,o)=>(t&&(r[n.q.name][t]=o),"")),r}e.prototype={addHandler(e,t){this.weightedHandlers.push({handler:e,weight:t||0}),this.weightedHandlers.sort((e,t)=>e.weight-t.weight),this.handlers=[];const n=this.weightedHandlers.length;for(let e=0;e<n;e++)this.handlers.push(this.weightedHandlers[e].handler)},cleanLinks:e=>(l()("a.atlassian-autoconvert",e.getDoc()).removeClass("atlassian-autoconvert"),!0),callHandlers(e){let o=0;const r=this,a=l()(e);let i=l()(e).clone();const s=i.attr("href");let c=t(n(s));function d(e){if(e&&(1!==e.length||!e.attr("href")))return m(e);if(e)i=e,o=0,c=t(i.attr("href")),u(r.handlers[o],c,i);else{if(o++,!(o<r.handlers.length))return m(i);u(r.handlers[o],c,i)}}function u(e,t,n){let a=d;const i=window.setTimeout(()=>{g.A.error(`Autoconvert: Callback #${o} failed to call continuation in time. If there is no subsequent log, the handler is improperly implemented and should be uninstalled.`),a=function(){g.A.error(`Autoconvert: Callback #${o} did eventualy return. Probably a slow async call.`)},d()},h.tinymce.plugins.Autoconvert.callbackTimeout);e(t,n,function(){const e=o;clearTimeout(i),a.apply(r,arguments),a=function(){g.A.error(`Autoconvert: Callback #${e} called the continuation multiple times.`)}})}function m(e){r.editor.undoManager.beforeChange();const t=r.editor.selection,n=r.editor.selection.getBookmark();a.replaceWith(e),t.moveToBookmark(n),r.editor.undoManager.add()}0!==this.handlers.length&&u(this.handlers[0],c,i)}},e.callbackTimeout=5e3,e.convertMacroToDom=function(e,t,n){const o={macro:e,contentId:u.A.get("content-id")};l().ajax({type:"POST",contentType:"application/json; charset=utf-8",url:`${y.Y}/rest/tinymce/1/macro/placeholder`,data:JSON.stringify(o),dataType:"text",success:t,error:n,timeout:45e3})},e.convertMacroToDomViaWikiText=function(t,n,o){const r=["{",t.name];let a=!0;t.defaultParameterValue&&(r.push(":",t.defaultParameterValue),a=!1);for(const e in t.params)a?(r.push(":"),a=!1):r.push("|"),r.push(e,"=",t.params[e]);r.push("}"),e.getHtmlFromWikiMarkup(r.join(""),e=>{n(l()(e)[0])},()=>{o()})},e.getHtmlFromWikiMarkup=function(e,t,n){const o={wiki:e,entityId:u.A.get("content-id"),contextType:u.A.get("content-type"),spaceKey:u.A.get("space-key")};l().ajax({type:"POST",contentType:"application/json; charset=utf-8",url:`${y.Y}/rest/tinymce/1/wikixhtmlconverter`,data:JSON.stringify(o),dataType:"text",success:t,error:n,timeout:45e3})},t.options={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:/?#]*)(?::(\d*))?))?((((?:[^?#/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@/]*@)([^:/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#/]*\.[^?#/.]+(?:[?#]|$)))*\/?)?([^?#/]*))(?:\?([^#]*))?(?:#(.*))?)/}};const n=function(e=""){return e.replace(/^(.*?\/\/[^/]*?\/.*?)(@)/,"$1%40")};return{autoConverter:e,plugin:function(){return{init(t){const n=new e(t);function o(e,o,r){const a=l()(r.node).children("a");1===a.length&&"A"===a[0].tagName&&a.text()===a.attr("href")&&(a.attr("class","atlassian-autoconvert"),setTimeout(()=>{const e=l()("a.atlassian-autoconvert",l()(t.selection.getNode().ownerDocument)).removeClass("atlassian-autoconvert");n.callHandlers(e)},0))}h.tinymce.plugins.Autoconvert.autoConvert=n,t.on("init",()=>{l()(document).on("postPaste",o),t.addCommand("addAutoconverter",(e,t)=>(n.addHandler(t),!1))}),t.on("remove",()=>{l()(document).off("postPaste",o)})},getInfo:()=>({longname:"Atlassian Autoconvert",author:"Atlassian",authorurl:"http://www.atlassian.com",infourl:"http://www.atlassian.com",version:"1.0"})}}}}();!function(e){"object"==typeof h.tinymce?(void 0===h.tinymce.plugins&&(h.tinymce.plugins={}),h.tinymce.plugins.Autoconvert=e.autoConverter):g.A.error("Autoconvert global export failed because window.tinymce is not an object")}(e),h.tinymce.PluginManager.add("autoconvert",e.plugin),(0,B.oI)("init.rte",()=>{h.tinymce.plugins.Autoconvert.autoConvert.addHandler(no)}),function(){const e=new oo;(0,B.oI)("init.rte",e.init)}(),(0,B.oI)("init.rte",ao),(0,B.oI)("init.rte",so),(0,B.oI)("init.rte",()=>{h.tinymce.plugins.Autoconvert.autoConvert.addHandler(lo.pasteHandler)}),(0,B.oI)("init.rte",mo),(0,B.oI)("init.rte",po),(0,B.oI)("init.rte",()=>{h.tinymce.plugins.Autoconvert.autoConvert.addHandler(io.pasteHandler)}),(0,B.oI)("init.rte",()=>h.tinymce.plugins.Autoconvert.autoConvert.addHandler(go))},function(){(0,B.oI)("rte-ready",vo),(0,B.oI)("rte-destroyed",Co)},()=>{h.tinymce.PluginManager.add("draggable",Ci)},()=>{h.tinymce.PluginManager.add("insertfiles",Gi)},()=>{h.tinymce.PluginManager.add("flextofullsize",ji)},()=>{h.tinymce.PluginManager.add("referrer",Kl)},()=>{h.tinymce.PluginManager.add("tableContentWrapper",$c)},()=>{h.tinymce.PluginManager.add("linkbrowser",Ls)},()=>{h.tinymce.PluginManager.add("confluenceversioncomment",pd)},()=>{h.tinymce.PluginManager.add("autocomplete",$n)},()=>{},()=>{h.tinymce.PluginManager.add("autocompletelink",Un)},()=>{h.tinymce.PluginManager.add("autocompletemacro",Zn)},()=>{h.tinymce.PluginManager.add("autocompletemedia",to)},()=>{h.tinymce.PluginManager.add("confluenceleavecomment",Ss)},()=>{h.tinymce.PluginManager.add("confluenceleavetemplate",Ns)},()=>{xt(document,"initContextToolbars.Toolbar",(e,t)=>{h.Confluence.Editor.searchToolbar=function(){const e=h.Confluence.Editor;return{initContextToolbars(t,n){const o=function(e){if(h.tinymce.Env.browser.isFirefox()){const t=l()(e).val().length;e.setSelectionRange(t,t)}},r=function(e){var t;null===(t=top)||void 0===t||t.focus(),h.tinymce.activeEditor.plugins.customtoolbar.focusToolbarButton(e)},a=function(){var e;null===(e=top)||void 0===e||e.focus();const t=l()("#search-toolbar-find-text");t.trigger("focus"),o(t[0])},i=function(){var e;null===(e=top)||void 0===e||e.focus();const t=l()("#search-toolbar-replace-text");t.trigger("focus"),o(t[0])},s=function(){if(h.tinymce.Env.browser.isFirefox()){const e=h.tinymce.activeEditor;e.focus(),e.selection.select(e.getBody()),e.selection.collapse(!1),e.focus()}},c=new e.Toolbar.Components.TextBox({id:"search-toolbar-find-text",text:n.translate("searchreplace_dlg.findlabel"),name:"find",keydown:function(e){if((e.ctrlKey||h.tinymce.Env.os.isMacOS()&&e.metaKey)&&70===e.which)e.preventDefault();else if(13===e.which){e.preventDefault();const t={backwards:!1,onFound:a,onNotFound:a};h.tinymce.activeEditor.undoManager.ignore(()=>{h.tinymce.activeEditor.execCommand("mceConfSearch",!1,t)})}else 27===e.which&&(e.preventDefault(),h.tinymce.activeEditor.undoManager.ignore(()=>{h.tinymce.activeEditor.execCommand("mceSearchReplaceToolbar",!1,!1)}))},cssClass:"toolbar-find-input"}),d=new e.Toolbar.Components.TextBox({id:"search-toolbar-replace-text",text:n.translate("searchreplace_dlg.replacelabel"),name:"replace",keydown:function(e){if((e.ctrlKey||h.tinymce.Env.os.isMacOS()&&e.metaKey)&&70===e.which)e.preventDefault();else if(13===e.which){e.preventDefault();const t=h.tinymce.activeEditor.undoManager.ignore(()=>{h.tinymce.activeEditor.execCommand("mceConfSearch",!1,{backwards:!1,onFound:i,onNotFound:a})});p(i,a,t)}else 27===e.which&&(e.preventDefault(),h.tinymce.activeEditor.undoManager.ignore(()=>{h.tinymce.activeEditor.execCommand("mceSearchReplaceToolbar",!1,!1)}))},cssClass:"toolbar-replace-input"}),u=new e.Toolbar.Components.TextButton({text:n.translate("searchreplace_dlg.findprevious"),click(){const e={backwards:!0,onFound(){var e;null===(e=top)||void 0===e||e.focus(),r("search-toolbar-find-previous-button")},onNotFound:a};n.undoManager.ignore(()=>{n.execCommand("mceConfSearch",!1,e)})},textClass:"search-toolbar-find-previous-button"}),g=new e.Toolbar.Components.TextButton({text:n.translate("searchreplace_dlg.findnext"),click(){const e={backwards:!1,onFound(){var e;null===(e=top)||void 0===e||e.focus(),r("search-toolbar-find-next-button")},onNotFound:a};n.undoManager.ignore(()=>{n.execCommand("mceConfSearch",!1,e)})},textClass:"search-toolbar-find-next-button"}),m=new e.Toolbar.Components.TextButton({text:n.translate("searchreplace_dlg.replace"),click(){p(()=>{var e;null===(e=top)||void 0===e||e.focus(),r("search-toolbar-replace-button")},a)},textClass:"search-toolbar-replace-button"}),p=(e,t,n)=>{ac&&(h.tinymce.activeEditor.plugins.customtoolbar.isToolbarButtonEnabled("search-toolbar-replace-button")?ac.replace(e,t):n&&n())},f=new e.Toolbar.Components.TextButton({text:n.translate("searchreplace_dlg.replaceall"),click(){const e={onReplaced:s,onNotReplaced:a};n.undoManager.transact(()=>{n.execCommand("mceConfReplaceAll",!1,e)})},textClass:"search-toolbar-replaceall-button"}),b=new e.Toolbar.Components.Button({text:n.translate("searchreplace_dlg.close"),iconClass:"icon aui-icon aui-icon-small aui-iconfont-close-dialog",click(){n.undoManager.ignore(()=>{n.execCommand("mceConfSearchClose",!1,null)})}});return{Buttons:[new e.Toolbar.Components.Group([b],{groupClass:"close"}),new e.Toolbar.Components.Group([c,d],{groupClass:"no-separator"}),new e.Toolbar.Components.Group([u,g]),new e.Toolbar.Components.Group([m,f])]}}}}().initContextToolbars(e,t)}),h.tinymce.PluginManager.add("searchreplace",ic)},()=>{h.tinymce.PluginManager.add("confluencedrafts",Tr)},()=>{(0,B.oI)("rte-ready",()=>{var e,t;null==Ws||null===(e=Ws.unuse)||void 0===e||e.call(Ws),null==Ws||null===(t=Ws.use)||void 0===t||t.call(Ws)}),(0,B.oI)("rte-ready",()=>{u.A.getBoolean("collaborative-content")||l()('meta[name="ajs-collaborative-editor-status"]').attr("content","off"),h.Confluence.Editor.UI.saveButton.bind("click",ja),ti()}),(0,B.oI)("editor.error.message",(e,t)=>{Oa(t)}
6),(0,B.oI)("dismiss.editor.error.message",(e,t)=>{xa.A.closeMessages([t.messageKey]),t.enablePublish&&Ra(!0)}),h.Confluence.Editor=l().extend(h.Confluence.Editor||{},ni,r().Editor),r().toInit(e=>{e(document).ajaxError((e,t)=>{if(405===t.status)try{const e=JSON.parse(t.responseText).reason;void 0!==e&&"READ_ONLY"===e&&(g.A.info("*** READ_ONLY mode detected ***"),(0,B.hZ)("rte.heartbeat-error",t))}catch(e){g.A.error("Cannot parse xhr.responseText: "+e)}}),(0,B.oI)("init.rte",h.Confluence.Editor.onInit)}),r().Editor=h.Confluence.Editor,(0,B.oI)("init.rte",()=>{var e;const t=tl();h.Confluence.Editor.UI=t,null==t||null===(e=t.init)||void 0===e||e.call(t)}),l().fn.sizeToFit=Vi.sizeToFit,h.Confluence.Editor.ImageDialog=Vi,h.Confluence.Editor.defaultInsertImageDialog=Vi.defaultInsertImageDialog,h.Confluence.Editor.insertImageDialog=Vi.insertImageDialog,(0,nl.A)().then(ol),r().PagePermissions=r().PagePermissions||{},l().extend(r().PagePermissions,{updateEditPageRestrictions:Vs}),r().toInit(Ys)},()=>{h.tinymce.PluginManager.add("pagelayoutplugin",Al),"comment"!==u.A.get("content-type")&&xt(document,"initContextToolbars.Toolbar",()=>h.Confluence.Editor.PageLayoutToolbar=(()=>{const e=h.tinymce.activeEditor,t=Cl(e),n=e=>{const n=(e=e||t.findNearestLayoutSection()).attr("data-layout"),o=l()("#rte-toolbar-row-pl2-toolbar").find(".layouts button"),r=o.find(".pl2-layout-"+n).closest(".aui-button");r.hasClass("active")||(o.filter(".active").removeClass("active"),r.addClass("active"))};return{initContextToolbars:()=>{const o=l()(document),r=l()("#page-layout-2"),a=l()("#rte-button-pagelayout-2"),i="pl2-toolbar";e.addCommand("mcePageLayoutsToolbar",()=>{a.hasClass("active")?o.trigger("removeContextToolbarRow.Toolbar",{id:i,animate:!0}):(o.trigger("createContextToolbarRow.Toolbar",{id:i,buttons:h.Confluence.Editor.PageLayoutToolbar.Buttons,topToolbar:!0,animate:!0}),n(),e.execCommand("mcePageLayoutInitialize")),a.toggleClass("active")}),a.on("click",t=>{t.preventDefault(),r.hasClass("disabled")||e.execCommand("mcePageLayoutsToolbar",!1,null)}),e.on("NodeChange",e=>{const t=l()(e.element).closest(".columnLayout");n(t)});const s=t.Layouts,c=[],d=t=>{c.push(new h.Confluence.Editor.Toolbar.Components.Button({text:t.name,iconClass:"aui-icon aui-icon-small aui-iconfont-layout-"+t.icon+"-large",click:()=>{e.execCommand("mcePageLayoutChangeSection",!1,{layout:t})}}))};for(let e=0;e<s.length;e++)d(s[e]);return{Buttons:[new h.Confluence.Editor.Toolbar.Components.Group([new h.Confluence.Editor.Toolbar.Components.Button({triggerText:(0,we.A)("page-layout-2.add-section"),id:"add-layout-section",tooltip:(0,we.A)("page-layout-2.add-section.tooltip"),iconClass:"aui-icon aui-icon-small aui-iconfont-add",click:()=>e.execCommand("mcePageLayoutAddSection")}),new h.Confluence.Editor.Toolbar.Components.Button({triggerText:(0,we.A)("page-layout-2.remove-section"),id:"remove-layout-section",tooltip:(0,we.A)("page-layout-2.remove-section.tooltip"),iconClass:"aui-icon aui-icon-small aui-iconfont-delete",click:()=>e.execCommand("mcePageLayoutRemoveSection")})]),new h.Confluence.Editor.Toolbar.Components.Group([new h.Confluence.Editor.Toolbar.Components.Button({triggerText:(0,we.A)("page-layout-2.move-section-up"),id:"move-up-layout-section",tooltip:(0,we.A)("page-layout-2.move-section-up.tooltip"),iconClass:"aui-icon aui-icon-small aui-iconfont-up",click:()=>e.execCommand("mcePageLayoutMoveSectionUp")}),new h.Confluence.Editor.Toolbar.Components.Button({triggerText:(0,we.A)("page-layout-2.move-section-down"),id:"move-down-layout-section",tooltip:(0,we.A)("page-layout-2.move-section-down.tooltip"),iconClass:"aui-icon aui-icon-small aui-iconfont-down",click:()=>e.execCommand("mcePageLayoutMoveSectionDown")})]),new h.Confluence.Editor.Toolbar.Components.Group(c,{id:"pagelayout2-toolbar",text:(0,we.A)("page-layout-2.layout.group"),groupClass:"layouts"}),new h.Confluence.Editor.Toolbar.Components.Group([new h.Confluence.Editor.Toolbar.Components.Button({text:(0,we.A)("page-layout-2.close"),iconClass:"aui-icon aui-icon-small aui-iconfont-close-dialog",click:()=>e.execCommand("mcePageLayoutsToolbar",!1,null)})],{groupClass:"close"})],Events:[]}}}})().initContextToolbars()),(()=>{const e=e=>!!e.querySelector(".contentLayout, .contentLayout2"),t=e=>Array.from(e.querySelectorAll(".contentLayout2 .columnLayout.single")),n=(e,t)=>{e.undoManager.ignore(()=>{t.forEach(t=>t.appendChild((e=>e.dom.create("div",{class:"pagelayout-delete-stub synchrony-exclude",style:"display:none;",contenteditable:"true"},"."))(e)))})},o=(e,t)=>{const n=Array.from(t.querySelectorAll(".pagelayout-delete-stub"));e.undoManager.ignore(()=>
6{n.forEach(e=>e.parentNode&&e.parentNode.removeChild(e))})};(0,B.oI)("rte-ready",()=>{const r=h.tinymce.activeEditor,a=r.getDoc(),i=r.getBody();i.addEventListener("keydown",o=>{if((8===o.keyCode||46===o.keyCode)&&e(a))if(r.dom.isEmpty(r.getBody()))o.stopImmediatePropagation();else{const e=t(a);e.length>0&&(n(r,e),o.stopImmediatePropagation())}},!0),i.addEventListener("keyup",t=>{8!==t.keyCode&&46!==t.keyCode||!e(a)||o(r,a)},!0),r.on("beforeExecCommand",o=>{if("delete"===o.command&&e(a)){const e=t(a);e.length>0&&n(r,e)}}),r.on("ExecCommand",t=>{"delete"===t.command&&e(a)&&o(r,a)}),r.on("BeforeGetContent",()=>{o(r,a)})})})()},function(){},()=>{h.tinymce.PluginManager.add("confluencemacrobrowser",Rs)},()=>{h.tinymce.PluginManager.add("statusmacro",Sc),h.Confluence.PropertyPanel.Macro.registerInitHandler((e,t)=>{var n;Cc=e,function(e){const t=function(e){for(let t=0;t<e.length;t++)if(e[t].className.indexOf("macro-placeholder-property-panel-edit-button")>-1)return e[t];return null}(e),n=function(e){Qn.editMacro(e)};t&&(t.click=function(){h.Confluence.PropertyPanel.destroy(),Mc()?vc.always(n):n(Cc)})}(t),Ac=h.Confluence.MacroParameterSerializer.deserialize(l()(Cc).attr("data-macro-parameters")),xc=null,t.splice(1,0,(n=function(e){return e.title||Tc(e)}(Ac),{className:hc,text:Bt(n),click:Dc}))},"status"),l().each(yc,(e,t)=>{h.Confluence.PropertyPanel.Macro.registerButtonHandler(t,function(){Ac.colour=t,h.Confluence.PropertyPanel.destroy()},bc)}),(0,B.oI)("destroyed.property-panel",()=>{Mc()&&function(){if(vc&&vc.state&&"pending"===vc.state())return void g.A.debug("Macro update already in progress.");Ec();const e={contentId:h.Confluence.Editor.getContentId(),macro:{name:bc,params:Ac,defaultParameterValue:"",body:""}};vc=h.tinymce.confluence.MacroUtils.insertMacro(e,Cc),vc.done(e=>{Cc=e,function(e){h.tinymce.activeEditor.selection.select(e),It(),h.tinymce.activeEditor.selection.collapse()}(Cc)}).fail(e=>{g.A.error(`Failed to load status macro - ${e}`)})}()})},function(){},function(){},function(){},function(){},()=>{h.tinymce.PluginManager.add("confluencewatch",fd)},()=>{h.tinymce.PluginManager.add("confluencesortabletablesplugin",sc)},()=>{h.tinymce.PluginManager.add("autoresize",Fo)},function(){},function(){},()=>{h.tinymce.PluginManager.add("confluencenotifywatchers",Ps)},function(){},()=>{h.Confluence.PropertyPanel.Macro.registerButtonHandler("office-connector-download-file-button",(e,t)=>{const n=(t=t.nodeType?t:t[0]).getAttribute("data-macro-parameters").split("|"),o={};for(let e=0;e<n.length;e++){const t=n[e].split("=");t.length>1&&(o[t[0]]=t[1])}const r=u.A.get("page-id"),a=u.A.get("content-type");function i(e,t,n){return e&&t&&("?"!=n.charAt(n.length-1)&&(n+="&"),n=`${n}${e}=${encodeURI(t)}`),n}o.space||(o.space=u.A.get("space-key"));let s=u.A.get("context-path")+"/plugins/servlet/oc/getattachment?";s=i("title",o.page,s),s=i("date",o.date,s),s=i("space",o.space,s),s=i("filename",o.name,s),s=i("contextid",r,s),s=i("contexttype",a,s);const l=window.open(s,"download-office-attachment");l&&l.opener&&(l.opener=null)}),function(){const e=function(e){this.fileTypes=e};e.prototype.beforeParamsSet=function(e){if(!e.page&&!e.date&&!e.space){const t=u.A.get("content-type");"page"==t||"blogpost"==t?e.page=document.getElementById("content-title").value:"comment"==t&&(e.page=u.A.get("page-title"))}if(e.date){const t=e.date.split("/");e.page=["",t[2],t[0],t[1],e.page].join("/")}return e.space&&(e.page=`${e.space}:${e.page}`),e},e.prototype.beforeParamsRetrieved=function(e){if(e.page){const t=e.page.split(":");t.length>1&&(e.space=t[0],e.page=t[1]);const n=e.page.split("/");n.length>1&&(e.date=[n[2],n[3],n[1]].join("/"),e.page=n[4]);const o=u.A.get("content-type");(("page"==o||"blogpost"==o)&&e.page==document.getElementById("content-title").value||"comment"==o&&e.page==u.A.get("page-title"))&&delete e.page}return e},e.prototype.fields={attachment:function(e){const t={fileTypes:this.fileTypes},n=r().MacroBrowser.ParameterFields.attachment(e,t);return n.dependencyUpdated=function(e,t){g.A.debug(`attachment:dependencyUpdated called: ${e}, ${t}`);const n=function(e){const t={},n=e.split(":",2);return t.spaceKey=2==n.length&&n[0]||u.A.get("space-key"),t.title=n[n.length-1],0==t.title.indexOf("/")&&(t.postingDay=t.title.substr(1,10),t.title=t.title.substr(12)),t.title==document.getElementById("content-title").value&&(t.title=""),t.title||(u.A.get("new-page")?t.draftId=u.A.get("content-id"):t.pageId=u.A.get("page-id")),t}(t);this.getData(n)},n},spacekey:function(e){return r().MacroBrowser.ParameterFields._hidden(e,{})},date:function(e){return r().MacroBrowser.ParameterFields._hidden(e,{})},"confluence-content":function(e){return r().MacroBrowser.ParameterFields["confluence-content"](e,{dependencies:["name"]})}},r().MacroBrowser.Macros.viewdoc=new e(["doc","docx"]),r().MacroBrowser.Macros.viewpdf=ne
6w e(["pdf"]),r().MacroBrowser.Macros.viewxls=new e(["xls","xlsx"]),r().MacroBrowser.Macros.viewppt=new e(["ppt","pptx"]),r().MacroBrowser.Macros.viewfile={updateSelectedMacro(e){const t=e.params[""]||e.params.name;if(t){const n=t.lastIndexOf(".");if(n>0){const o=t.substring(n+1);o&&("doc"==o&&"docx"==o&&(e.name="viewdoc"),"pdf"==o&&(e.name="viewpdf"),"ppt"==o&&"pptx"==o&&(e.name="viewppt"),"xls"==o&&"xlsx"==o&&(e.name="viewxls"))}}}}}()},function(){(0,B.oI)("rte-ready",()=>{!function(e){(0,h.clearTimeout)(Di),Di=(0,h.setTimeout)(Ri,6e4),e.on("ExecCommand",e=>{const t="mceToggleFormat"===e.command?(n=e.value).charAt(0).toUpperCase()+n.slice(1):e.command;var n;Bi(Oi[t])}),e.on("KeyPress",()=>{Bi("keys")}),e.on("KeyUp",t=>{46===t.keyCode?Bi("delete",Ni):8===t.keyCode&&Bi("backspace",Ni),Li(e.selection)}),e.on("MouseUp",()=>{Li(e.selection)}),e.on("PastePostProcess",e=>{const t=e&&e.node?e.node.innerText||e.node.textContent:"";Bi("paste",t.length)}),e.on("Remove",()=>{Ri(),(0,h.clearTimeout)(Di)})}(h.tinymce.activeEditor),window.addEventListener("beforeunload",()=>{Ri()})})},function(){h.tinymce.PluginManager.add("tableAnalytics",jc)},()=>{(0,B.oI)("init.rte",_o)},function(){(0,B.oI)("init.rte",()=>{kt(document,"postPaste",Yi),xt(document,"postPaste",Yi),h.tinymce.activeEditor&&h.tinymce.activeEditor.on("Remove",()=>{kt(document,"postPaste",Yi)})})},()=>{h.tinymce.PluginManager.add("confindentation",Vo)},function(){},()=>{h.tinymce.PluginManager.add("aetextpattern",Yc)},function(){h.tinymce.Env.browser.isFirefox()&&(0,B.oI)("rte-ready",zo)},()=>{h.tinymce.PluginManager.add("persist_scroll_position",Ll)},()=>{h.tinymce.PluginManager.add("templateeditor",Qc)},()=>{h.tinymce.PluginManager.add("preserve-paragraph-formatting-on-delete",Vl)},()=>{h.tinymce.PluginManager.add("macroNavigation",Bs)},()=>{h.tinymce.PluginManager.add("confluenceimagedialog",Qi)},()=>{i().PluginManager.add("confluenceresizeimageplugin",nc)},()=>{i().PluginManager.add("dark-theme",bi)},()=>{i().PluginManager.add("confluencewordcount",Er)},function(){h.tinymce.PluginManager.add("colorTransformer",Wo)},()=>{i().PluginManager.add("duplication-tags-removal",Mi)},function(){i().PluginManager.add("cleanup",Ho)}],bd=()=>(hd.forEach((e,t)=>{try{e()}catch(n){ld("initError",{fnName:e.name||t,message:n.message||"",exceptionName:n.name||""}),g.A.error(`Editor plugin '${e.name||t}' failed to load`,n)}}),!0);let yd=!1;const wd=()=>{if(yd)return ld("initError",{message:"Editor was loaded already, stop re-running init phase"}),Promise.reject();const e=window.tinymce;return e.VK=e.util.VK,e.confluence=e.confluence||{},h.tinymce.confluence=h.tinymce.confluence||{},h.tinymce.confluence.ImageUtils=md,h.tinymce.confluence.ImageProperties=gd,h.tinymce.confluence=h.tinymce.confluence||{},h.tinymce.confluence.macrobrowser=Vn,Ne(),h.tinymce.confluence=h.tinymce.confluence||{},h.tinymce.confluence.NodeUtils=ke,h.tinymce.confluence=h.tinymce.confluence||{},h.tinymce.confluence.MacroUtils=ot,r().EditorUtils=Nr,r().Rte=r().Rte||{},r().Rte.Cursor=r().Rte.Cursor||{},l().extend(r().Rte.Cursor,{insertParagraph:Rr,isCursorAtStart:Br,isCursorAtEnd:Lr.isCursorAtEnd}),yd=!0,new Promise(e=>{!function({listener:e,globalProperty:t,interval:n=250},o){if(Le(t))return g.A.debug(`window.${t} is already available for use by ${e}.`),o(),null;const r=setInterval(()=>{g.A.debug(`${e} is waiting for window.${t} to be available`),Le(t)&&(g.A.debug(`window.${t} now available!`),clearInterval(r),o())},n)}({listener:"editor-plugins/index",globalProperty:"AJS.Confluence.PropertyPanel.Macro",interval:20},()=>{e()})}).then(bd)};var vd=n(6338),Cd=n.n(vd);const Ad=""===u.A.get("remote-user"),xd=()=>u.A.getBoolean("shared-drafts");let kd=null,Md=!1,Ed=!1,Td=!1,Id=!1,Dd=!1;(0,B.oI)("editor-shared-drafts-published editor-shared-drafts-discarded",()=>{Md=!1,Ed=!1}),(0,B.oI)("synchrony.history.evicted",()=>{Id=!0}),(0,B.oI)("synchrony.connected",()=>{Dd=!0});const Sd=(e,t,n)=>l()("<input>").attr({type:"hidden",name:e,value:t}).appendTo(n),Nd=()=>Md,Ld={isDraftManuallySaved:()=>Ed,isDraftBlank:()=>r().Rte.Content.isEmpty()&&!h.Confluence.Editor.getCurrentTitle().trim(),isNewContent:()=>null!==i().activeEditor&&u.A.getBoolean("new-page"),isDraftDirty:()=>h.Confluence.Editor.hasContentChanged()||Nd()&&!h.Confluence.Editor.Drafts.isDraftManuallySaved(),unloadMessage:()=>{const e=()=>h.Confluence.Editor.Drafts.isDraftBlank()&&!xd()?h.Confluence.Editor.Drafts.discardDraft(u.A.get("draft-id")):h.Confluence.Editor.Drafts.save({
6skipErrorHandler:!0});if(h.Confluence.Editor.isLimitedModeEnabled()||!xd()){if(h.Confluence.Editor.hasContentChanged()||Nd()&&!h.Confluence.Editor.Drafts.isDraftManuallySaved())return e(),(0,we.A)("saved.draft")}else if(e(),Dd&&(Td||h.Confluence.Editor.hasContentChanged()||Id))return(0,we.A)("saved.shared.draft.leave.page")},hasPendingChanges:()=>Td,setPendingChanges:e=>Td=e,isSharedDraftsEnabled:xd,bindUnloadMessage:()=>{!h.Confluence.Editor.isLimitedModeEnabled()&&xd()&&((0,B.oI)("synchrony.entity.ack",(e,t)=>{t.pendingChanges||(Td=!1)}),(0,B.oI)("editor.local.change",()=>{Td=!0})),(0,B.oI)("beforeunload",h.Confluence.Editor.Drafts.unloadMessage)},unBindUnloadMessage:()=>(0,B.Nw)("beforeunload"),useDraft:()=>((e,t)=>{h.Confluence.Editor.Drafts.unBindUnloadMessage();const n=h.Confluence.Editor.getCurrentForm();Sd("useDraft","true",n),Sd("contentChanged",""+h.Confluence.Editor.hasContentChanged(),n),Sd("pageId",r().params.pageId,n),l()("#draftId",h.Confluence.Editor.getCurrentForm()).val(t),n.spaceKey||Sd("spaceKey",u.A.get("space-key"),n),n.action=y.Y+"/pages/"+(r().params.newPage?"create":"edit")+r().params.draftType+".action",n.submit()})(0,u.A.get("existing-draft-id")),discardDraft:e=>r().safe.ajax({url:`${y.Y}/rest/api/content/${e}?status=draft`,type:"DELETE",dataType:"json",data:{},contentType:"application/json",success:()=>{l()("#draft-messages").remove(),r().messages.success("#editor-messages",{body:"Your draft has been discarded."})},error:e=>{r().messages.error({title:"Error",body:e.errors||"An unknown error has occurred. Please check your logs."})}}),save:(e={})=>{if(Id)return;if(h.Confluence.Editor.isPublishing()||!Ya()&&!e.forceSave)return g.A.debug("skipping draft save because:"),void(h.Confluence.Editor.isPublishing()?g.A.debug("The user is publishing the page already."):Ya()||e.forceSave||g.A.debug("The content hasn't changed and a forceSave wasn't requested in the options."));g.A.info("preparing to save editor draft");const t=l()("#content-title"),n=l()("#newSpaceKey"),o=l()("#originalVersion"),a=h.Confluence.Editor.inRichTextMode(),i={draftId:u.A.get("draft-id"),pageId:u.A.get("page-id"),parentPageId:u.A.get("parent-page-id"),type:r().params.draftType,title:t.hasClass("placeholded")?"":t.val(),spaceKey:n.length?n.val():encodeURIComponent(u.A.get("space-key"))};Cd().getEditorContent().pipe(t=>{l().extend(i,t),o.length&&(i.pageVersion=parseInt(o.val(),10)),kd=l().ajax({type:"POST",url:`${y.Y}/rest/tinymce/1/drafts${e.ignoreRelations?"?ignoreRelations=true":""}`,data:JSON.stringify(i),contentType:"application/json",dataType:"text json",success:t=>{if(null==t)return;if(!Ad&&0===t.draftId)return;h.Confluence.Editor.contentHasChangedSinceLastSave=!1,a&&r().Rte.Content.editorResetContentChanged(),Md=!0,Ed=!!e.manualSave,u.A.set("draft-id",t.draftId+""),l()("#draftId",h.Confluence.Editor.getCurrentForm()).val(t.draftId),l()("#draft-error").remove();const n=t.time||(e=>{let t=e.getHours();const n=e.getMinutes(),o=t>11?"PM":"AM";return t%=12,(0==t?"12":t)+":"+(n<10?"0":"")+n+" "+o})(new Date);if(!u.A.get("collaborative-content")){const e=l()("#draft-status");let t;t=Ed?(0,we.A)("draft.saved.at.new",n):(0,we.A)("draft.autosaved.at.new",n);const o=r().params.newPage?t:"<a id='view-diff-link-heartbeat' class='view-diff-link' href='#'>"+t+"</a>";e.attr("data-tooltip",t),e.html(o)}"function"==typeof e.onSuccessHandler&&e.onSuccessHandler(t),h.Confluence.Editor.Drafts.lastSaveTime=n,(0,B.hZ)("rte-draft-saved",{draftId:t.draftId})},error:(t,n)=>{const o=()=>{h.Confluence.Editor.addErrorMessage("draft-error",h.Confluence.Editor.Drafts.lastSaveTime?(0,we.A)("draft.saving.error.previous.draft",h.Confluence.Editor.Drafts.lastSaveTime):(0,we.A)("draft.saving.error"),!0)};if(!e.skipErrorHandler&&!xd()){if(400===t.status)if(t.responseText.indexOf("Legacy drafts deprecated")>=0)xa.A.handleMessage("legacy-draft-deprecated",{type:"error",message:(0,we.A)("editor.page.legacy.draft.deprecated")});else if(t.responseText.indexOf("Unsupported character found in content: ")>=0){const e=t.responseJSON.message.split("Unsupported character found in content: ")[1];xa.A.handleMessage("utf8-validation-failed",{title:(0,we.A)("mysql.utf8.content.validation.failed.title"),type:"error",message:(0,we.A)("mysql.utf8.content.validation.failed.message",e)})}else o();else o();"function"==typeof e.onErrorHandler&&e.onErrorHandler(n)}},timeout:3e4}).always(()=>{kd=null})})},getDraftSavingPromise:()=>kd};var Bd;n(9294),n(8159),n(901),n(8734),n(5120),i().confluenceEditorVersion="20.2.39",Ee(),Ne(),void 0!==window.AJS.Rte?void 0===window.AJS.Rte.BootstrapManager&&(window.AJS.Rte.BootstrapManager=Se):g.A.error("AJS.Rte is supposed to be defined"),void 0!==window.AJS.Rte?void 0===window.AJS.Rte.Placeholder&&(window.AJS.Rte.Placeholder=_l):g.A.error("AJS.Rte is supposed to be defined"),void 0!==window.AJS.Rte?void 0===window.AJS.Rte.BookmarkManager&&(window.AJS.Rte.BookmarkManager=Lt):g.A.error("AJS.Rte is supposed to be defined"),void 0!==(null===r()||void 0===r()?void 0:r().Confluence)?void 0===(null===r()||void 0===r()||null===(Bd=r().Confluence)||void 0===Bd||null===(Bd=Bd.Editor)||void 0===Bd?void 0:Bd.Drafts)&&(r().Confluence.Editor.Drafts=Ld):g.A.error("AJS.Confluence is supposed to be defined"),(()=>{var e;void 0!==(null===r()||void 0===r()?void 0:r().Confluence)?void 0===(null===r()||void 0===r()||null===(e=r().Confluence)||void 0===e||null===(e=e.Templates)||void 0===e||null===(e=e.Editor)||void 0===e?void 0:e.Page)&&(r().Confluence.Templates.Editor={...r().Confluence.Templates.Editor,Page:{...qs}}):g.A.error("AJS.Confluence is supposed to be defined")})(),window.AJS=window.AJS||{},window.AJS.Rte=window.AJS.Rte||{},window.AJS.Rte.Support=window.AJS.Rte.Support||{},window.AJS.Rte.Support.inlineTasks=S,window.AJS.Rte.Support.isCollaborativeContentType=I,(0,bn.A)("confluence-editor/loader/tinymce-bootstrap",()=>Se),(0,bn.A)("confluence-editor/editor/atlassian-editor",()=>f),(0,bn.A)("confluence-editor/editor/atlassian-editor-content",()=>b),(0,bn.A)("confluence-editor/support/atlassian-editor-support",()=>({inlineTasks:S,isCollaborativeContentType:I}
6)),(0,bn.A)("confluence-editor/utils/tinymce-node-utils",()=>Me),(0,bn.A)("confluence-editor/utils/tinymce-image-utils",()=>({ImageUtils:md,ImageProperties:gd})),(0,bn.A)("confluence-editor/init",()=>{wd().then(()=>{const e={locale:u.A.get("user-locale").replace("_","-")};r().toInit(()=>{!function(e){h.tinymce.ThemeManager.requireLangPack("advanced"),h.tinymce.ThemeManager.add("default",pe);const t=(()=>{let e={theme:"default"};return function(){const e=new ee;return(e.isChrome()&&e.version()<80||e.isFirefox()&&e.version()<80)&&!window.QUnit&&0===u.A.get("remote-user").indexOf("testuser")}()&&(e={...e,object_resizing:!1}),e={...e,...U(),autoresize_min_height:"100%",width:"100%",height:"100%",document_base_url:`${te}${y.Y}/`,plugins:ne.join(","),theme_advanced_buttons1:"formatselect,confimage,conf_macro_browser,code,customtoolbar,monospace,searchreplace,linkbrowserbutton",toolbar:!1,menubar:!1,skin:!1,statusbar:!1,table_toolbar:"",contextmenu:!1,selector:"textarea.tinymce-editor:not(#editor-preload-container textarea.tinymce-editor)",body_class:"aui-theme-default mceContentBody wiki-content",popup_css:!1,content_css:!1,editor_css:!1,custom_undo_redo:!0,custom_undo_redo_levels:20,context_path:y.Y,plugin_action_base_path:`${y.Y}/plugins/tinymce`,editor_plugin_action_base_path:`${y.Y}/plugins/editor/tinymce`,page_id:u.A.get("page-id"),draft_type:null,form_name:u.A.get("form-name"),space_key:encodeURI(u.A.get("space-key")),confluence_popup_width:620,confluence_popup_height:550,editor_id:"wysiwygTextarea",indent:!1,table_tab_navigation:!0,inline_boundaries:!1,indent_use_margin:!0,atlassian:!0,keep_values:!0,convert_urls:!0,relative_urls:!1,remove_script_host:!1,button_tile_map:!0,apply_source_formatting:!1,list_outdent_on_enter:!0,visual:!1,confluence_table_style:"confluenceTable",confluence_table_cell_style:"confluenceTd",confluence_table_heading_style:"confluenceTh",confluence_table_default_rows:4,confluence_table_default_cols:3,confluence_table_default_heading:!0,cleanup:!0,cleanup_on_startup:!0,fix_list_elements:!1,fix_table_elements:!0,valid_elements:"@[id|class|style|title|wysiwyg|dir<ltr?rtl|lang|xml::lang|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],a[*],strong/b,em/i,s,u,#p[align|user],-ol[type|compact],-ul[type|compact],li,br,img[imagetext|longdesc|usemap|src|border|alt=|title|hspace|vspace|width|height|align|draggable|thumbnail|confluence-query-params],-sub,-sup,-blockquote[cite|markup],-table[*],-tr[rowspan|width|height|align|valign|bgcolor|background|bordercolor],tbody,thead,tfoot,#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor|scope|contenteditable],#th[colspan|rowspan|width|height|align|valign|scope|contenteditable],caption,#div[*],span[*],-code,#pre[*],address,-h1,-h2,-h3,-h4,-h5,-h6,hr[size|noshade],-font[face|size|color],dd,dl,dt,cite,abbr,acronym,del[datetime|cite],ins[datetime|cite],object[classid|width|height|codebase|*],param[name|value],embed[type|width|height|src|*],map[name],area[shape|coords|href|alt|target],bdo,button,col[align|char|charoff|span|valign|width],colgroup[align|char|charoff|span|valign|width],dfn,fieldset,form[action|accept|accept-charset|enctype|method],input[accept|alt|checked|disabled|maxlength|name|readonly|size|src|type|value],kbd,label[for],legend,noscript,optgroup[label|disabled],option[disabled|label|selected|value],q[cite],samp,select[disabled|multiple|name|size],small,textarea[cols|rows|disabled|name|readonly],tt,var,big",extended_valid_elements:"time[class|datetime|contenteditable|onselectstart|unselectable|oncontrolselect]",formats:{alignleft:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"}},{selector:"img.confluence-embedded-image",classes:"image-left"},{selector:"img,table",collapsed:!1,styles:{float:"left"}}],aligncenter:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"}},{selector:"img.confluence-embedded-image",classes:"image-center"},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"}},{selector:"img.confluence-embedded-image",classes:"image-right"},{selector:"img,table",collapsed:!1,styles:{float:"right"}}],bold:[{inline:"strong",remove:"all",preserve_attributes:["class"]},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"em",remove:"all",preserve_attributes:["class"]},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],removeformat:[{selector:"h1,h2,h3,h4,h5,h6,pre",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0,block:"*"},{selector:"address,article,b,big,blockquote,center,cite,code,date,dd,del,dfn,dl,dt,em,embed,font,footer,header,hgroup,i,ins,kbd,link,menu,nav,object,param,q,s,samp,script,section,small,strike,strong,style,sub,sup,time,tt,u,var",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"table",attributes:["cellpadding","cellspacing","border"],split:!1,expand:!1,deep:!0},{selector:":not(li)",attributes:["style","color","bgcolor","title","lang"],split:!1,expand:!1,deep:!0}]},forced_root_block:"p",allow_unsafe_link_target:!0,paste_remove_styles_if_webkit:!1,automatic_uploads:!1,allow_html_data_urls:!0,browser_spellcheck:!oe(),paste_data_images:!1,pad_empty_with_br:!0,object_resizing:"table",text_patterns:!1,license_key:"T8LK:eyJhbGciOiJFUzI1NiIsIng1YyI6WyJNSUlCbURDQ0FUMmdBd0lCQWdJVWJTS2NpUDJROHBNTFJTc29JS29ucUNXYmw1VXdDZ1lJS29aSXpqMEVBd0l3UHpFYU1CZ0dBMVVFQ2d3UlZHbHVlU0JVWldOb2JtOXNiMmRwWlhNeElUQWZCZ05WQkFNTUdGUnBibmxOUTBVZ09DQnNhV05sYm5ObElHdGxlU0JEUVRBZ0Z3MHlOVEEwTVRBd05ESTJNVEJhR0E4eU1EYzFNREV3TVRBME1qWXhNRm93RWpFUU1BNEdBMVVFQXd3SFZEaE1TMU10VURCWk1CTUdCeXFHU000OUFnRUdDQ3FHU000OUF3RUhBMElBQkdnTjlqUG5Ga2o1Q0VSbEJDUkNMNGliOXBDMUo5U3p4ajBmckU1QkgxdE8yaEZYQmlNd2VlRjFheEh6cjBEcnhycUE0dDNFbTJZaUYyekk4ZVFoa2dHalFqQkFNQjBHQTFVZERnUVdCQlE0dU42blREemN1YmlHMXVET3Q4OUlQMkFWQlRBZkJnTlZIU01FR0RBV2dCVHFoanNsN0lWdEZFYVMvaFNSUXhiT2ZuaWFRVEFLQmdncWhrak9QUVFE
6QWdOSkFEQkdBaUVBMmtHTmVZRnRranYvemFzUEVKWjBQVFZTOW1KdTFaRWYvWklQTGFFSDJ6MENJUURRTnFBL0FFTVFlQno2T0VHNlBteVhFakJVZDVqRDBxcVlwVS9pM1hhL2VRPT0iXX0.CiQwMTk4ZTdjNC1mYzhiLTdmMTgtODcwOC0wMzkzYjk0OWM4MTnCAhUKDAj_v9TTBhDAj67cAxIFCICangGwBAjSBQEB.U0uAq2zJCMOBCARgBgsrBsAoXDI9i35VVuzm6szNDAHQ4FAC0ipUACZgGcz5ImRWw3TYe1SNqTckhRBZhv_yvg",external_plugins:{licensekeymanager:`${u.A.get("editor-plugin-resource-prefix")}/download/resources/com.atlassian.confluence.plugins.confluence-editor-plugin:split_commerciallicensekeymanager/commerciallicensekeymanager.js`}},e})();0===Number(t.page_id)&&(t.page_id=null,t.draft_type=u.A.get("draft-type")),Se.addBeforeInitCallback(e=>{var t;e.contentCssTags=null===(t=document.querySelector('script[title="editor-css"]'))||void 0===t?void 0:t.innerHTML,e.language=u.A.get("action-locale").replace("_","-");const n=u.A.get("min-editor-height");n&&(e.autoresize_min_height=n)});const n=!(u.A.get("remote-user")&&u.A.get("confluence.prefs.editor.disable.autocomplete"));if(n&&(t.plugins+=",autocomplete,autocompletelink,autocompletemedia"),t.locale="object"==typeof e&&void 0!==e.locale?e.locale:"",u.A.get("auto-start")){if((0,B.hZ)("rte-loaded",{editPermission:!0}),I()){const e=document.getElementById(t.editor_id);(0,B.hZ)("rte-collaborative-content-ready",{title:u.A.get("page-title")||u.A.get("original-content-title")||"",editorContent:e.value,confRev:u.A.get("conf-revision"),syncRev:document.getElementById("syncRev").value,syncRevSource:u.A.get("sync-revision-source")})}ce("confluence.editor"),n&&(t.plugins+=",autocompletemacro");const e="0"==`${u.A.get("page-id")}`,o=function(e,t){if("template"===e)return me();if("comment"===e)return ue();return ge({versionComment:!t,notifyWatchers:!t})}(u.A.get("content-type"),e).plugins.join(",");o&&(t.plugins+=`,${o}`),Se.preInitialise(t),Se.initialise(),de("confluence.editor")}else Se.preInitialise(t)}(e)})})})},589:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var o=n(1601),r=n.n(o),a=n(6314),i=n.n(a)()(r());i.push([e.id,"#rte-ellipsis-menu.aui-dropdown2 ul li a{margin:0 2px}",""]);const s=i},802:e=>{"use strict";e.exports=require("confluence-macro-browser/macro-browser")},901:(e,t,n)=>{e.exports=n},1040:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTAgNC4wMXYzOS45OEE0LjAwOSA0LjAwOSAwIDAwNC4wMSA0OGgzOS45OEE0LjAwOSA0LjAwOSAwIDAwNDggNDMuOTlWNC4wMUE0LjAwOSA0LjAwOSAwIDAwNDMuOTkgMEg0LjAxQTQuMDA5IDQuMDA5IDAgMDAwIDQuMDF6TTQ3IDE2VjQuMDFBMy4wMSAzLjAxIDAgMDA0My45OSAxSDE2djE1aDMxem0wIDF2MTBIMzJWMTdoMTV6bTAgMTF2MTBIMzJWMjhoMTV6bTAgMTF2NC45OUEzLjAxIDMuMDEgMCAwMTQzLjk5IDQ3
6SDMydi04aDE1em0tMTYgOEgxNnYtOGgxNXY4em0tMTYgMEg0LjAxQTMuMDEgMy4wMSAwIDAxMSA0My45OVYxN2gxNHYzMHpNMSAxNlY0LjAxQTMuMDEgMy4wMSAwIDAxNC4wMSAxSDE1djE1SDF6bTE1IDEyaDE1djEwSDE2VjI4em0wLTExaDE1djEwSDE2VjE3eiIgZmlsbD0iIzcwNzA3MCIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+"},1189:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTAgNC4wMXYzOS45OEE0LjAxIDQuMDEgMCAwMDQuMDEgNDhoMzkuOThBNC4wMSA0LjAxIDAgMDA0OCA0My45OVY0LjAxQTQuMDEgNC4wMSAwIDAwNDMuOTkgMEg0LjAxQTQuMDEgNC4wMSAwIDAwMCA0LjAxek00My45OSAxQTMuMDEgMy4wMSAwIDAxNDcgNC4wMXYzOS45OEEzLjAxIDMuMDEgMCAwMTQzLjk5IDQ3SDQuMDFBMy4wMSAzLjAxIDAgMDExIDQzLjk5VjQuMDFBMy4wMSAzLjAxIDAgMDE0LjAxIDFoMzkuOTh6TTI5LjkgMTkuNTZsLTEuNjgxIDMgLjQwMi0zLjQxNWE1LjY4MyA1LjY4MyAwIDAxLTEuNzc3LTEuMjkzbC0zLjEyNSAxLjQzOCAyLjMzMy0yLjUyNmE1LjYzIDUuNjMgMCAwMS0uNjgtMi4wOTFMMjIgMTRsMy4zNzMtLjY3M2E1LjYzIDUuNjMgMCAwMS42NzktMi4wOUwyMy43MTkgOC43MWwzLjEyNSAxLjQzOGMuNS0uNTM5IDEuMTAyLS45OCAxLjc3Ny0xLjI5M0wyOC4yMiA1LjQ0bDEuNjgyIDNhNS42OTUgNS42OTUgMCAwMTIuMTk4IDBsMS42ODItMy0uNDAyIDMuNDE1YTUuNjgzIDUuNjgzIDAgMDExLjc3NyAxLjI5M2wzLjEyNS0xLjQzOC0yLjMzMyAyLjUyNmE1LjYzIDUuNjMgMCAwMS42OCAyLjA5MUw0MCAxNGwtMy4zNzMuNjczYTUuNjMgNS42MyAwIDAxLS42NzkgMi4wOWwyLjMzMyAyLjUyNy0zLjEyNS0xLjQzOGMtLjUuNTM5LTEuMTAyLjk4LTEuNzc3IDEuMjkzbC40MDIgMy40MTUtMS42ODItM2E1LjY5NSA1LjY5NSAwIDAxLTIuMTk4IDB6TTI2LjMzNCAxNGE0LjY2NyA0LjY2NyAwIDExOS4zMzQgMCA0LjY2NyA0LjY2NyAwIDAxLTkuMzM0IDB6bTEuNDg0IDIwLjY4M0wzMyA0MmwtLjUgMUwxNiAxOS41IDUuNSAzMiA1IDMxbDExLTEzIDExLjE5NSAxNS44MDVMMzUgMjZsOCAxMC0uNSAxLTcuNS05LjUtNy4xODMgNy4xODN6IiBmaWxsPSIjNzE3MTcxIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4="},1339:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var o=n(1601),r=n.n(o),a=n(6314),i=n.n(a)()(r());i.push([e.id,".mce-content-body .mce-visual-caret{background-color:var(--ds-background-input,#000);background-color:currentcolor;position:absolute;display:none}.mce-content-body .mce-visual-caret-hidden{display:none}.mce-content-body [data-mce-caret]{left:-1000px;margin:0;padding:0;position:absolute;right:auto;top:0}.mce-content-body .mce-offscreen-selection{left:-2000000px;max-width:1000000px;position:absolute}.ephox-snooker-resizer-bar{background-color:var(--ds-border-focused,#22b5fe);opacity:0;-webkit-user-select:none;user-select:none}.ephox-snooker-resizer-bar:hover{opacity:1}.ephox-snooker-resizer-cols{cursor:col-resize;width:3px!important}.ephox-snooker-resizer-rows{cursor:default;height:0!important}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:1}table[data-mce-selected]{outline:1px solid var(--ds-surface,#fff)}li strong{font-weight:700}",""]);const s=i},1883:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAw0lEQVR42q1TMQqAMBDr0/UBroJiBUEf0E51dRMcxUlwFBcHPxA5IUuLONSDcDmupO01VQCiEC+gtYagrusH5FVVCfdz0FfRQVVR5CmoLtzfnWBf/R7WWhhjIFnAmvlToOs6XNeF8zyx7zvWdcU8zxjHEW3bhgK8NydaFAWO48C2bViWBdM0YRgGOOcgPc7t9RWyLEPf92ia5hEuyxJ5nj+Lpae+IkkSpGkKZnLW6u/gDHzX+c6kP4j/nfjmNJ8HiP6NN81gzxU6QYojAAAAAElFTkSuQmCC"},1944:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTAgNC4wMXYzOS45OEE0LjAxIDQuMDEgMCAwMDQuMDEgNDhoMzkuOThBNC4wMSA0LjAxIDAgMDA0OCA0My45OVY0LjAxQTQuMDEgNC4wMSAwIDAwNDMuOTkgMEg0LjAxQTQuMDEgNC4wMSAwIDAwMCA0LjAxek00My45OSAxQTMuMDEgMy4wMSAwIDAxNDcgNC4wMXYzOS45OEEzLjAxIDMuMDEgMCAwMTQzLjk5IDQ3
6SDQuMDFBMy4wMSAzLjAxIDAgMDExIDQzLjk5VjQuMDFBMy4wMSAzLjAxIDAgMDE0LjAxIDFoMzkuOTh6TTYgMTcuNWwxMC0xMCAuNSAxLTkgOSA5IDktLjUgMS0xMC0xMHptMzcgMTJsLTEwLTEwLS41IDEgOSA5LTkgOSAuNSAxIDEwLTEwek0xOCA0Mi45NjJoMUwzMCA2aC0xTDE4IDQyLjk2MnoiIGZpbGw9IiM3MDcwNzAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg=="},2367:(e,t,n)=>{e.exports=n},2413:(e,t,n)=>{e.exports=n},2590:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAgUlEQVR4AcXKrw5BcRzG4e803QWcRDRN0CRJMkU3V8BluBFXoEiSizDJFIKZMR7bUfw5v2jeT3nDE3+csZ4QobghVmnQd7NVTYGOi726KAYtJ0dN8QoyC1n+Gg7O2uIdzLGWqdm56opPULHMycbdQHyDUDYDI1EMQsnURCTBs1+ABxXN3umBGxghAAAAAElFTkSuQmCC"},2652:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var o=n(1601),r=n.n(o),a=n(6314),i=n.n(a)()(r());i.push([e.id,"#property-panel a.macro-property-panel-Grey span.icon{background-color:#44546f}#property-panel a.macro-property-panel-Green span.icon{background-color:#1f845a}#property-panel a.macro-property-panel-Red span.icon{background-color:#c9372c}#property-panel a.macro-property-panel-Yellow span.icon{background-color:#f5cd47}#property-panel a.macro-property-panel-Blue span.icon{background-color:#0c66e4}#property-panel a.macro-property-panel-Blue,#property-panel a.macro-property-panel-Brown,#property-panel a.macro-property-panel-Green,#property-panel a.macro-property-panel-Grey,#property-panel a.macro-property-panel-Red,#property-panel a.macro-property-panel-Yellow{padding:6px;display:inline-block}#property-panel a.macro-property-panel-Blue span.icon,#property-panel a.macro-property-panel-Brown span.icon,#property-panel a.macro-property-panel-Green span.icon,#property-panel a.macro-property-panel-Grey span.icon,#property-panel a.macro-property-panel-Red span.icon,#property-panel a.macro-property-panel-Yellow span.icon{display:inline-block;background-image:none;margin:0;border:0;min-width:auto;border-radius:3px;width:16px;height:16px}#property-panel .editable.status-macro-title{margin-right:10px;float:none;text-transform:uppercase;text-decoration:none;width:88px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:11px;padding:0 5px}#property-panel input.editable.status-macro-title{outline:none;height:30px;line-height:20px;vertical-align:bottom;padding-top:2px}",""]);const s=i},2674:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAvklEQVR42rVTPQuFIBT1p1t7e2EFDrXnVmNb4Ca4BS5BW9AfOA+F+wjfAwfpwuHcDzn3olcGIAv5An3fo+u6L55x27bE5P+cZdkWqVJH6pDMsWxTSsFjmqbAMZIC4zjivm9c14XjOLDvO4wx2LYNwzCkBZqmwXmecM7BWgutNdZ1xTzP8LWkQFVVWJYFUspwQUII1HUd2NeSApxzeJRlCfKLovBxYPa6xe9KsedHLc7TXryzidQpnurvZNm/8QMbqb4yyqv4rAAAAABJRU5ErkJggg=="},2994:e=>{"use strict";e.exports=require("confluence-rest/confluence-rest")},3038:e=>{"use strict";e.exports=require("confluence/table-color-names")},3610:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTAgNC4wMXYzOS45OEE0LjAwOSA0LjAwOSAwIDAwNC4wMSA0OGgzOS45OEE0LjAwOSA0LjAwOSAwIDAwNDggNDMuOTlWNC4wMUE0LjAwOSA0LjAwOSAwIDAwNDMuOTkgMEg0LjAxQTQuMDA5IDQuMDA5IDAgMDAwIDQuMDF6TTQzLjk5IDFBMy4wMSAzLjAxIDAgMDE0NyA0LjAxdjM5Ljk4QTMuMDEgMy4wMSAwIDAxNDMuOTkgNDdINC4wMUEzLjAwOSAzLjAwOSAwIDAxMSA0My45OVY0LjAxQTMuMDEgMy4wMSAwIDAxNC4wMSAxaDM5Ljk4ek01IDM5aDI4di0xSDV2MXptMC03aDMydi0xSDV2MXptMC0yMWgxN3YtMUg1djF6bTAgN2gxNHYtMUg1djF6bTAgN2gxOXYtMUg1djF6bTM2LjAwOC0xNUgyOS45OTJjLTEuMSAwLTEuOTkyLjg5NC0xLjk5MiAxLjk5MnYxMS4wMTZjMCAxLjEwMS44OTQgMS45OTIgMS45OTIgMS45OTJoMTEuMDE2YzEuMSAwIDEuOTkyLS44OTMgMS45OTItMS45OTJWMTEuOTkyYzAtMS4xLS44OTQtMS45OTItMS45OTItMS45OTJ6TTI5Ljk5MiAyNGEuOTkyLjk5MiAwIDAxLS45OTItLjk5MlYyMWwzLTMuNSA1IDYuNWgtNy4wMDh6bTExLjAxNiAwaC0yLjg5MWwtMS4wOTgtMS40MzUgMi40NjUtMi4wNjUgMi40MzMgMi45MDFhLjk5Mi45OTIgMCAwMS0uOTA5LjU5OXpNNDIgMjEuOTJMMzkuNDg0IDE5bC0zLjEzIDIuNjk1TDMyIDE2bC0zIDMuNXYtNy41MDhjMC0uNTQ3LjQ0NS0uOTkyLjk5Mi0uOTkyaDExLjAxNmMuNTQ3IDAgLjk5Mi40NDUuOTkyLjk5MnY5LjkyOHptLTEuNzY0LTkuMTAzbC0xLjk3Ni42MDYtLjc2LTEuOTIzLS43NiAxLjkyMy0xLjk3Ni0uNjA2IDEuMDMgMS43OTQtMS43MDYgMS4xNjggMi4wNDQuMzEyLS4xNTEgMi4wNjNMMzcuNSAxNi43NWwxLjUxOSAxLjQwNC0uMTUxLTIuMDYzIDIuMDQ0LS4zMTItMS43MDYtMS4xNjggMS4wMy0xLjc5NHpNMzcuNSAxNi4zYTEuMyAxLjMgMCAxMTAtMi42IDEuMyAxLjMgMCAwMTAgMi42eiIgZmlsbD0iIzcwNzA3MCIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+"},4266:e=>{"use strict";e.exports=require("confluence-editor/i18n/translations.i18n")},4414:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTAgNC4wMXYzOS45OEE0LjAxIDQuMDEgMCAwMDQuMDEgNDhoMzkuOThBNC4wMSA0LjAxIDAgMDA0OCA0My45OVY0LjAxQTQuMDEgNC4wMSAwIDAwNDMuOTkgMEg0LjAxQTQuMDEgNC4wMSAwIDAwMCA0LjAxek00My45OSAxQTMuMDEgMy4wMSAwIDAxNDcgNC4wMXYzOS45OEEzLjAxIDMuMDEgMCAwMTQzLjk5IDQ3
6SDQuMDFBMy4wMSAzLjAxIDAgMDExIDQzLjk5VjQuMDFBMy4wMSAzLjAxIDAgMDE0LjAxIDFoMzkuOTh6TTIwIDMxLjAwMnY4Ljk5QzIwIDQxLjEgMjAuODg3IDQyIDIxLjk5OCA0Mmg0LjAwNEEyLjAwNSAyLjAwNSAwIDAwMjggMzkuOTkxdi04Ljk4OWMwLS41NTMtLjQ1My0xLjAwMi0uOTk3LTEuMDAyaC02LjAwNmMtLjU1IDAtLjk5Ny40NTYtLjk5NyAxLjAwMnpNMjcuMDAzIDMxYy0uMDA2IDAtLjAwMyA4Ljk5MS0uMDAzIDguOTkxIDAgLjU1Ny0uNDUgMS4wMDktLjk5OCAxLjAwOWgtNC4wMDRBLjk5OC45OTggMCAwMTIxIDM5Ljk5MXYtOC45ODlMMjcuMDAzIDMxek0yMiAzNy45OTl2MS4wMDJjMCAuNTUyLjQ0My45OTkgMS4wMS45OTloMS45OGMuNTU4IDAgMS4wMS0uNDQzIDEuMDEtLjk5OXYtMS4wMDJBLjk5OS45OTkgMCAwMDI0Ljk5IDM3aC0xLjk4Yy0uNTU4IDAtMS4wMS40NDMtMS4wMS45OTl6bTIuOTkuMDAxYy4wMTIgMCAuMDEtLjAwMi4wMS0uMDAxdjEuMDAyTDI0Ljk5IDM5aC0xLjk4Yy0uMDEyIDAtLjAxLjAwMi0uMDEuMDAxdi0xLjAwMmwuMDEuMDAxaDEuOTh6TTIwIDZ2MWg1VjZoLTV6bTAtNHYxaDVWMmgtNXptMyA2djFoNVY4aC01em0wLTR2MWg1VjRoLTV6bS0zIDZ2MWg1di0xaC01em0zIDJ2MWg1di0xaC01em0tMyAydjFoNXYtMWgtNXptMyAydjFoNXYtMWgtNXptLTMgMnYxaDV2LTFoLTV6bTAgNHYxaDV2LTFoLTV6bTAgNHYxaDV2LTFoLTV6bTMtNnYxaDV2LTFoLTV6bTAgNHYxaDV2LTFoLTV6bTAgNHYxaDV2LTFoLTV6IiBmaWxsPSIjNzA3MDcwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4="},4426:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var o=n(1601),r=n.n(o),a=n(6314),i=n.n(a)()(r());i.push([e.id,"#rte-toolbar .insert-files .toolbar-item{padding:0}.quick-comment-form #rte-toolbar .insert-files.toolbar-item{padding:0 6px}.quick-comment-form #rte-toolbar .insert-files .toolbar-trigger{margin:0 -6px}#rte-toolbar .insert-files .trigger-text{display:none}#rte-toolbar .insert-files .aui-button{padding:0 6px}",""]);const s=i},4442:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var o=n(1601),r=n.n(o),a=n(6314),i=n.n(a)()(r());i.push([e.id,"body.ios{min-height:150px}",""]);const s=i},4454:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTAgNC4wMXYzOS45OEE0LjAxIDQuMDEgMCAwMDQuMDEgNDhoMzkuOThBNC4wMSA0LjAxIDAgMDA0OCA0My45OVY0LjAxQTQuMDEgNC4wMSAwIDAwNDMuOTkgMEg0LjAxQTQuMDEgNC4wMSAwIDAwMCA0LjAxek00My45OSAxQTMuMDEgMy4wMSAwIDAxNDcgNC4wMXYzOS45OEEzLjAxIDMuMDEgMCAwMTQzLjk5IDQ3
6SDQuMDFBMy4wMSAzLjAxIDAgMDExIDQzLjk5VjQuMDFBMy4wMSAzLjAxIDAgMDE0LjAxIDFoMzkuOTh6TTUgMzF2MWgzOHYtMUg1em0wLTE0djFoMzN2LTFINXptMC03djFoMjh2LTFINXptMCAxNHYxaDI0di0xSDV6bTAgMTR2MWgyOHYtMUg1eiIgZmlsbD0iIzcwNzA3MCIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+"},4670:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var o=n(1601),r=n.n(o),a=n(6314),i=n.n(a),s=n(4417),l=n.n(s),c=new URL(n(6475),n.b),d=i()(r()),u=l()(c);d.push([e.id,`#insert-image-dialog .loading-message,#insert-image-dialog .upload-in-progress,#insert-image-dialog ul.image-list li .loading,#searched-images .loading-message{background-image:var(--confluence-icon-spinner-gif);background-repeat:no-repeat}#insert-image-dialog .loading-message,#insert-image-dialog .upload-in-progress,#searched-images .loading-message{background-position:left 50%;height:20px;line-height:20px;padding-left:24px}#insert-image-dialog h2.dialog-title{white-space:normal}#insert-web-image-form fieldset.inline,#search-image-form fieldset.inline{padding:0;margin-right:-10px}#insert-web-image-form,#search-image-form,#upload-attachment{padding:0 0 10px}#attached-files,#attached-images,#searched-images{overflow:auto;margin-right:-10px}#upload-attachment .upfile{margin-left:8px;padding:0}#insert-web-image-form .web-image-input{display:inline}.insert-web-image .image-preview-area{margin-top:0}#insert-web-image-image-url{max-width:420px}.insert-web-image .image-preview-error{background:url(${u}) 60px no-repeat;text-align:center}#insert-image-dialog .image-preview,#insert-web-image-image-url{margin-left:8px}.insert-web-image .image-preview-throbber{text-align:center;padding-top:50px}.insert-web-image .faraway{position:absolute;left:-9999em;top:-9999em}#search-image-form .search-input{display:inline}#search-image-form .search-input .search-image-text{max-width:250px}#search-image-form .aui-button,#search-image-space-select{margin-left:8px}`,""]);const g=d},4741:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var o=n(1601),r=n.n(o),a=n(6314),i=n.n(a)()(r());i.push([e.id,'.dragger-handle{cursor:col-resize;position:absolute;border:0;border-radius:6px;padding:0;width:4px;transition:opacity .2s,background-color .2s,filter .2s;z-index:9999;opacity:.4;background-color:var(--ds-surface,#fff);filter:grayscale(1)}.dragger-handle:focus{outline:none}.dragger-handle:focus,.dragger-handle:hover{opacity:1;background-color:var(--ds-background-selected,#e9f2ff);filter:grayscale(0)}.dragger-handle:after{content:"";position:absolute;width:2px;height:20%;background-color:var(--ds-border-focused,#2684ff);border-radius:6px;opacity:1;transform:translate(-50%,-50%)}.dragger-handle:before{content:"";position:absolute;width:10px;height:100%;background-color:initial;border-radius:6px;top:0;transform:translateX(-50%)}#dimension-box{position:absolute;color:var(--ds-text,#172b4d);background:var(--ds-surface-overlay,#fff);transform:translate(-50%,-100%);padding:1px 4px;border-radius:5px;font-size:.75rem;margin-top:1px;margin-bottom:4px;width:max-content}',""]);const s=i},4774:e=>{"use strict";e.exports=require("confluence/aui-overrides")}
6,5064:(e,t,n)=>{"use strict";n.d(t,{m:()=>o});let o=function(e){return e.DIALOG_CONTROL="editor.charmap.dialog",e}({})},5120:(e,t,n)=>{e.exports=n},5153:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAMFBMVEX///9wcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHAnFTKsAAAAD3RSTlMAESIzRFVmd4iZqrvM3e5GKvWZAAAAWUlEQVQIW2NgQAZWJyA0+++5l8AM3gSG6zDJUyCCeaYCyxUQI/bMY74FQJrxJoPhWQEgQ/bADKmHIJl1AnlvDUCMqwwMAmCdjxnkAsCMvSV3ICKc7zcwYAUAjz0WbHRhn40AAAAASUVORK5CYII="},5314:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var o=n(1601),r=n.n(o),a=n(6314),i=n.n(a),s=n(4417),l=n.n(s),c=new URL(n(7486),n.b),d=i()(r()),u=l()(c);d.push([e.id,`html{height:100%}html.insert-wiki-markup-dialog{box-sizing:border-box;height:96%;overflow:auto}html .assistive{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}body.wiki-content{min-height:100%}body.previewWiki{box-sizing:border-box;background:var(--ds-surface,#fff);height:100%;overflow:auto;padding:10px}body.resizable{height:auto;margin:0;padding:0}body.fullsize{box-sizing:border-box;border:0;margin:0 10px;padding:10px 0}body.mceContentBody{background:var(--ds-surface,#fff);border:none;text-align:left}.mceContentBody .wysiwyg-macro-body-preformat{border:1px solid var(--ds-border,#ccc);margin:5px 20px}.mceContentBody .wysiwyg-macro-inline{display:inline}.mceContentBody .user-new-line,.mceContentBody .wysiwyg-macro-body-newline{display:none;line-height:0}img.emoticon{vertical-align:text-bottom;width:16px;height:16px}#autocomplete-trigger{background-color:initial;padding:0 2px;border-radius:3px 0 0 3px}#autocomplete-container{background-color:var(--ds-background-neutral,#ebecf0);border-radius:3px;padding:1px 0}#autocomplete-container.fabric{color:var(--ds-text-brand,#0052cc)}#autocomplete-container.fabric,#autocomplete-container.fabric #autocomplete-trigger{background-color:initial;border:transparent}#autocomplete-search-text{padding:1px 6px 1px 3px}.macro span.macro-name{border-radius:3px;background-clip:padding-box;background-color:var(--ds-surface-raised-pressed,#f0f0f0);padding:4px}.wysiwyg-macro{background-color:#b4b9c3;background-position:0 1px;background-repeat:no-repeat;border-bottom:1px solid #b4b9c3}p+table.wysiwyg-macro,table.wysiwyg-macro+p{margin-top:10px}.wiki-content .wysiwyg-macro{padding:24px 0 0;width:100%;border-radius:3px}.wiki-content .wysiwyg-macro-body{background-color:var(--ds-surface,#fff);border:1px solid var(--ds-border,#ddd);margin:0;padding:10px}.wiki-content .wysiwyg-macro-body>p:first-child{margin-top:0}.wiki-content .wysiwyg-macro-body>p:last-child{margin-bottom:0}.wiki-content .wysiwyg-macro-body>pre{tab-size:4;margin:0;white-space:pre-wrap;min-height:1em}
6.wiki-content td .wysiwyg-macro-body{min-width:200px}.wiki-content .confluence-embedded-image{cursor:default;max-width:calc(100% - 4px);margin-left:2px;margin-right:2px;vertical-align:text-bottom}.wiki-content .confluence-embedded-image[height],.wiki-content .confluence-embedded-image[width]{max-width:none}.wiki-content .image-left{float:left;margin:0 10px 10px 0}.wiki-content .image-center{margin-left:auto;margin-right:auto;display:block}.wiki-content .image-right{float:right;margin:0 0 10px 10px}.wiki-content table.wysiwyg-macro{border-collapse:initial}.wiki-content .highlight-marker{background-color:var(--ds-background-input,#feeecd)}.wiki-content table tbody td.mceSelected,.wiki-content table tbody th.mceSelected.nohighlight{background-color:var(--ds-background-selected,#edf5ff)!important}.wiki-content table tbody td.mceSelected.highlight,.wiki-content table tbody th.mceSelected{background-color:var(--ds-background-selected,#e0e0e0)!important}.wiki-content table tbody td.mceSelected.highlight-blue,.wiki-content table tbody td.mceSelected.info,.wiki-content table tbody th.mceSelected.highlight-blue,.wiki-content table tbody th.mceSelected.info{background-color:var(--ds-background-selected-bold,#d3e3f7)!important}.wiki-content table tbody td.mceSelected.highlight-green,.wiki-content table tbody td.mceSelected.success,.wiki-content table tbody th.mceSelected.highlight-green,.wiki-content table tbody th.mceSelected.success{background-color:var(--ds-background-selected,#d3f4cc)!important}.wiki-content table tbody td.mceSelected.highlight-red,.wiki-content table tbody td.mceSelected.warning,.wiki-content table tbody th.mceSelected.highlight-red,.wiki-content table tbody th.mceSelected.warning{background-color:var(--ds-background-selected,#f3dada)!important}.wiki-content table tbody td.mceSelected.highlight-yellow,.wiki-content table tbody td.mceSelected.note,.wiki-content table tbody th.mceSelected.highlight-yellow,.wiki-content table tbody th.mceSelected.note{background-color:var(--ds-background-selected,#f6f7ca)!important}.wiki-content.show-eol-markup h1:after,.wiki-content.show-eol-markup h2:after,.wiki-content.show-eol-markup h3:after,.wiki-content.show-eol-markup h4:after,.wiki-content.show-eol-markup h5:after,.wiki-content.show-eol-markup h6:after,.wiki-content.show-eol-markup li:after,.wiki-content.show-eol-markup p:after{color:var(--ds-text,#777);content:" \\00B6"}.editor-inline-macro,.wysiwyg-unknown-macro{vertical-align:text-bottom}.editor-inline-macro{background-color:var(--ds-surface-raised-pressed,#f0f0f0);border:1px solid var(--ds-border,#ddd);margin:0 2px;min-height:24px}.editor-inline-macro.with-chrome{background-position:0 0;background-repeat:no-repeat;height:auto;padding:24px 2px 2px}.confluenceTd>.editor-inline-macro,.confluenceTd>.wysiwyg-unknown-macro,.confluenceTh>.editor-inline-macro,.confluenceTh>.wysiwyg-unknown-macro{vertical-align:inherit}.macro-placeholder-icon{background-image:url(${u});background-position:0 3px;background-repeat:no-repeat}.image-hotswap{background-image:var(--confluence-icon-spinner-gif);background-position:4px 50%;background-repeat:no-repeat}table.layout,table.layout td.layout-cell{border:1px dotted var(--ds-border-accent-gray,#ccc)}table.confluenceTable{margin-bottom:0}.find-current{background-color:inherit;color:inherit}.find-current[data-searching]{border-radius:3px;background-clip:padding-box;box-shadow:var(--ds-shadow-raised,0 2px 2px #ccc);background-color:var(--ds-background-accent-teal-subtle,#ffde00);padding:2px;margin:-2px;position:relative;color:var(--ds-text-accent-gray-bolder,inherit)}`,""]);const g=d},5526:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var o=n(1601),r=n.n(o),a=n(6314),i=n.n(a)()(r());i.push([e.id,".wiki-content .columnLayout{border-spacing:8px}.wiki-content .cell,.wiki-content .footer,.wiki-content .header{border:2px dashed var(--ds-border-accent-gray,#ccc);margin:8px;padding:4px 8px}.wiki-content .innerCell{outline:0;overflow:auto;overflow-y:hidden;height:100%}.wiki-content .header,.wiki-content .header .innerCell{margin-bottom:0}.wiki-content .footer,.wiki-content .footer .innerCell{margin-top:0}.section-decorator{display:table-cell;width:14px;overflow:visible}.section-decorator button{border:0;background:transparent;box-shadow:none;padding:7px 0;text-align:center;width:14px;
6height:20px;color:var(--ds-text-subtlest,#aaa)}.show-property-panel .icon{width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid var(--ds-border,#333)}.section-decorator .move-section{cursor:move}body.mceContentBody.pl2-contextual{margin:0;padding:0}.wiki-content .contentLayout2 .columnLayout{border-spacing:4px 2px;margin-top:0;margin-bottom:0}.wiki-content .contentLayout2 .cell{border:1px dashed var(--ds-border,#999);border-radius:5px;padding:0}.wiki-content .contentLayout2 .innerCell{padding:5px;min-height:20px}.wiki-content .contentLayout2>:first-child{margin-top:5px}",""]);const s=i},5713:e=>{e.exports=function(e){window.document.getElementById("wysiwygTextarea_ifr").contentDocument.head.appendChild(e)}},6305:(e,t,n)=>{"use strict";n.d(t,{fg:()=>o});const o=()=>!1},6338:e=>{"use strict";e.exports=require("confluence-editor/loader/collaborative-helper")},6372:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQzLjk5IDBINC4wMUE0LjAwOSA0LjAwOSAwIDAwMCA0LjAxdjM5Ljk4QTQuMDA5IDQuMDA5IDAgMDA0LjAxIDQ4aDM5Ljk4QTQuMDA5IDQuMDA5IDAgMDA0OCA0My45OVY0LjAxQTQuMDA5IDQuMDA5IDAgMDA0My45OSAwek00NyAxMXYzMi45OUEzLjAxIDMuMDEgMCAwMTQzLjk5IDQ3
6SDQuMDFBMy4wMSAzLjAxIDAgMDExIDQzLjk5TDEuMDMxIDExSDQ3em0tMTIuNzkyLTFoLTUuMzMxbDguODU2LTloNS4zMzFsLTguODU2IDl6bS03IDBoLTUuMzMxbDguODU2LTloNS4zMzFsLTguODU2IDl6bS03IDBoLTUuMzMxbDguODU2LTloNS4zMzFsLTguODU2IDl6bS03IDBINy44NzdsOC44NTYtOWg1LjMzMWwtOC44NTYgOXptLTcgMEgxLjAzMnYtLjI1MUw5LjcyNiAxaDUuMzM4bC04Ljg1NiA5ek0xIDQuMDFBMy4wMSAzLjAxIDAgMDE0LjAxIDFoMy45OTNMMSA4LjA0OFY0LjAxek00Mi45NzQgMTBMNDcgNS45MzNWMTBoLTQuMDI2em0tNy4wOTcgMGw4Ljc4My04LjkyNUM0NiAxLjM3OSA0NyAyLjU3NyA0NyA0LjEyNkw0MS4xODYgMTBoLTUuMzA5ek0xOSAzOWwxMi0xMC41TDE5IDE5djIwem0xLTE4bDkuNSA3LjVMMjAgMzdWMjF6IiBmaWxsPSIjNzA3MDcwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4="},6475:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABA0lEQVR42p2QP0tCURiH7zdQRA3u4OJUiyDY4CDtTuEXuXs0JEQ4uDk5C0EuKoEu+SWcg5baLCS7tNTx98IzyMWjXoeHe95/z3vODdzi2kdTvIo30fL1+YbLIhYOfsV5GsFAOL59zsNjBRfij60lEXKbf1E5RvDExl4URYGwXJfc6JCgwqZYhBp2hs5n4odadZ9gzKYu2x1YrUPt2SeosWEtijsEBfGN5HKXYErxweKkAMk9PbOkoE5hJXI+AbUVvfVtwZzkHTECAGptel8cgisSnyJDk+8GRlZ8MdOwxITghoa9ArhlZmzB+/abDjwh+c8+LBgRnMLEBHnxKJYpBpfMFDbGjWcGPFD11gAAAABJRU5ErkJggg=="},6524:(e,t,n)=>{e.exports=n},6615:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGQ9Ik0xMyA2LjVhMS41IDEuNSAwIDEwLjAwMSAzLjAwMUExLjUgMS41IDAgMDAxMyA2LjVtLTUgMGExLjUgMS41IDAgMTAuMDAxIDMuMDAxQTEuNSAxLjUgMCAwMDggNi41TTQuNSA4YTEuNSAxLjUgMCAxMS0zLjAwMS0uMDAxQTEuNSAxLjUgMCAwMTQuNSA4IiBpZD0iYSIvPjwvZGVmcz48dXNlIGZpbGw9IiM5N0EwQUYiIHhsaW5rOmhyZWY9IiNhIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4="},6726:e=>{"use strict";e.exports=require("confluence/macro-js-overrides")},6764:e=>{"use strict";e.exports=require("confluence-editor/utils/attachments-insert-utils")},6852:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTAgNC4wMXYzOS45OEE0LjAxIDQuMDEgMCAwMDQuMDEgNDhoMzkuOThBNC4wMSA0LjAxIDAgMDA0OCA0My45OVY0LjAxQTQuMDEgNC4wMSAwIDAwNDMuOTkgMEg0LjAxQTQuMDEgNC4wMSAwIDAwMCA0LjAxek00My45OS45OEEzLjAxIDMuMDEgMCAwMTQ3IDMuOTkxdjQwLjAxNmEzLjAxIDMuMDEgMCAwMS0zLjAxIDMuMDEzSDQuMDFBMy4wMSAzLjAxIDAgMDExIDQ0LjAwOFYzLjk5MkEzLjAxIDMuMDEgMCAwMTQuMDEuOTc5aDM5Ljk4ek0xOSAzMC45OTVDMTkgMzQgMjEgMzYgMjQgMzZzNS0yIDUtNVYxMy45ODZjMC0zLjk4Ni0zLTYuOTk3LTcuMDA0LTYuOTk3UzE0Ljk5MiAxMCAxNC45OTIgMTMuOTl2MTguMDA1YzAgNS4wMDUgNCA5IDkuMDA0IDlBOC45NjMgOC45NjMgMCAwMDMzIDMxLjk4MlYxMi45OTRoLTF2MTguOTg4YzAgNC41MTgtMy41IDguMDEzLTguMDA0IDguMDEzcy04LjAwNC0zLjQ5NS04LjAwNC04VjEzLjk5YzAtMy40OSAyLjUtNiA2LjAwNC02QzI1LjUgNy45OSAyOCAxMC41IDI4IDEzLjk4NVYzMWMwIDIuNS0yIDQtNCA0cy00LTEuNS00LTQuMDA0VjIwaC0xdjEwLjk5NnoiIGZpbGw9IiM3MDcwNzAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg=="},6990:e=>{"use strict";e.exports=require("confluence/root")},7098:(e,t,n)=>{e.exports=n},7231:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gcLBBgu2AWxpAAAAUdJREFUOMuVUzFOw0AQnLlzHhCKVNBQwBPgC8ALEAUKRQQozp1p6JEoaPDZipAgzwAp4ilRygQ+QBGa3KaxE8ckFp7uRrPj2bkzUYK19gTAK4A9VGPive8EZVZE3rz312maflRN93q9G6XUABsSyH9hrZVg2xeiKFo7x3G8xsVxDAAIUAP5UBFBHfGmBKzbepIkw6JhUKd1rfUwT7FMWNW6MeYxDMOLYuu5YRiGZ8aYydYOut3uYaPRGCmlvsvXnK8EYPWQrLVPAFrOuTYA9Pv9kbX2DsAYwHuuc86xaKiy4ReS9yTbxpjzgvhZa/1V1Y0CAJK3S0KpZDabpZnx5Xw+f4iiyG0zYLGYwv8wIPlD8iDnvPdjklF5hUBEpiR3Sx5XIvIpIjskWyLSBHAkItM/K5DsZI2uYpGa5CnJYwD7JJskfzPtGhZ44Nh/W3weYAAAAABJRU5ErkJggg=="},7355:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAeElEQVQoz62Ovw1AYBTEz0pKWqUZPhNI7p4V6CzBPGIBo0g8xReJwuvctb/7A/wuHfTH30CniT2XEAAASzq1hYAGXlqtiiYaumYvrA0bWAMAS+2v5+pyOso4R0ADPae/gN4SL81xw6JTqxcx4NqsspZlCGS/nv+mG6d9RJUXBH/5AAAAAElFTkSuQmCC"},7486:(e,t,n)=>{"use strict";e.exports=n.p+"8467ff64525b1572c8f8.png"},7515:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var o=n(1601),r=n.n(o),a=n(6314),i=n.n(a)()(r());i.push([e.id,"#property-panel.page-layout-2-panel .icon-fat .icon,#rte-toolbar-row-pl2-toolbar .icon-fat{width:20px;height:20px}#property-panel.page-layout-2-panel .icon-fat,#rte-toolbar-row-pl2-toolbar .layouts button{padding-left:6px;padding-right:6px}#property-panel.page-layout-2-panel a.icon-fat span.icon,#property-panel.page-layout-2-panel a span.icon{display:inline}",""]);const s=i}
vendor: 3,082 bytes, line 6
6,7602:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var o=n(1601),r=n.n(o),a=n(6314),i=n.n(a)()(r());i.push([e.id,"table.draggable{margin-left:-10px;margin-top:-10px}td.draggable-column,td.draggable-row,td.draggable-table{background-color:initial;border-top:1px solid transparent;border-left:1px solid transparent;cursor:move}td.draggable-column,td.draggable-table{border-right:1px solid transparent}td.draggable-row,td.draggable-table{border-bottom:1px solid transparent}td.draggable-column{height:10px}td.draggable-row{width:10px}table.draggable:hover>tbody>tr>td.draggable-column,table.draggable:hover>tbody>tr>td.draggable-row,table.draggable:hover>tbody>tr>td.draggable-table{background-color:var(--ds-background-accent-gray-subtle,#777);border-top:1px solid var(--ds-border-accent-gray,#777);border-left:1px solid var(--ds-border-accent-gray,#777)}table.draggable:hover>tbody>tr>td.draggable-column,table.draggable:hover>tbody>tr>td.draggable-table{border-right:1px solid var(--ds-border-inverse,#aaa)}table.draggable:hover>tbody>tr>td.draggable-row,table.draggable:hover>tbody>tr>td.draggable-table{border-bottom:1px solid var(--ds-border-inverse,#aaa)}.wiki-content img.confluence-embedded-image,.wiki-content img.editor-inline-macro,.wiki-content table.wysiwyg-macro{cursor:move}.wiki-content table.wysiwyg-macro>tbody>tr>td.wysiwyg-macro-body{cursor:text}#move-indicator{font-weight:400!important}",""]);const s=i},7816:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQzLjk5IDBINC4wMUE0LjAwOSA0LjAwOSAwIDAwMCA0LjAxdjM5Ljk4QTQuMDA5IDQuMDA5IDAgMDA0LjAxIDQ4aDM5Ljk4QTQuMDA5IDQuMDA5IDAgMDA0OCA0My45OVY0LjAxQTQuMDA5IDQuMDA5IDAgMDA0My45OSAwek00LjAxIDQ3QTMuMDEgMy4wMSAwIDAxMSA0My45OVYxNC45ODVjOS4zODQtLjA3NyAxOS4xMzItMi4zMjUgMjktNi43MTJWNDdINC4wMXpNNDAgNDdoLTRWMTZoMy41MDJjLjI3NCAwIC40OTguMjIxLjQ5OC40OTNWNDd6bS01IDBoLTRWMTJoMy41MDJhLjUuNSAwIDAxLjQ5OC41VjQ3em04Ljk5IDBINDFWMTYuNDkzQzQxIDE1LjY3IDQwLjMyOCAxNSAzOS41MDIgMTVIMzZ2LTIuNWExLjUgMS41IDAgMDAtMS40OTgtMS41SDMxVjYuNzI0bC0uNzA3LjMyMUMyMC4zMTUgMTEuNTgxIDEwLjQ2NCAxMy45MDYgMSAxMy45ODVWNC4wMUEzLjAxIDMuMDEgMCAwMTQuMDEgMWgzOS45OEEzLjAxIDMuMDEgMCAwMTQ3IDQuMDF2MzkuOThBMy4wMSAzLjAxIDAgMDE0My45OSA0N3pNNSAyNGM4LjUtLjUgMTItMSAyMC00di0xYy04IDMtMTIgMy41LTIwIDR2MXptMCA2YzguNS0uNSAxMi0xIDIwLTR2LTFjLTggMy0xMiAzLjUtMjAgNHYxem0wIDZjOC41LS41IDEyLTEgMjAtNHYtMWMtOCAzLTEyIDMuNS0yMCA0djF6bTAgNmM4LjUtLjUgMTItMSAyMC00di0xYy04IDMtMTIgMy41LTIwIDR2MXoiIGZpbGw9IiM3MzZGNkUiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg=="},7864:(e,t,n)=>{"use strict";n.d(t,{A:()=>P});var o=n(1601),r=n.n(o),a=n(6314),i=n.n(a),s=n(4417),l=n.n(s),c=new URL(n(7355),n.b),d=new URL(n(8630),n.b),u=new URL(n(2590),n.b),g=new URL(n(1189),n.b),m=new URL(n(7816),n.b),p=new URL(n(4454),n.b),f=new URL(n(3610),n.b),h=new URL(n(1040),n.b),b=new URL(n(9048),n.b),y=new URL(n(1944),n.b),w=new URL(n(6372),n.b),v=new URL(n(4414),n.b),C=new URL(n(6852),n.b),A=i()(r()),x=l()(c),k=l()(d),M=l()(u),E=l()(g),T=l()(m),I=l()(p),D=l()(f),S=l()(h),N=l()(b),L=l()(y),B=l()(w),R=l()(v),O=l()(C);
6A.push([e.id,`.aui-dialog .dialog-page-menu li.page-menu-item button.item-button:active{background-color:var(--ds-background-neutral-subtle-pressed,#ebf2f9)}.attach-tip-discovery{position:relative;border-top:1px solid var(--ds-border,#ccc);padding-top:20px;margin-right:10px;margin-top:10px;margin-bottom:20px;overflow:hidden;color:var(--ds-text-subtlest,#707070)}.attach-tip-discovery .text p{display:inline}.attach-tip-discovery a{text-decoration:none;display:block}.attached-file{position:relative}.attached-file:focus-visible .abs-icon,.attached-file:focus-within .abs-icon,.attached-file:focus .abs-icon,.attached-file:hover .abs-icon{opacity:1}.file-list,.image-list{padding:0;list-style:none;overflow:hidden;margin-top:0}.file-list li,.image-list li{width:23%;cursor:default;float:left;margin:0 10px 8px 0;padding:0;text-align:center}.file-list li .caption,.image-list li .caption{text-overflow:ellipsis;display:block;overflow:hidden;white-space:nowrap;margin:0 auto;font-size:12px}.file-list li .owner-title,.image-list li .owner-title{font-size:10px}.file-list li .image-preview-throbber,.image-list li .image-preview-throbber{text-align:center;padding:0;position:absolute;top:50%;left:50%;margin-top:-10px;margin-left:-10px}.file-list li .file-container,.file-list li .image-container,.image-list li .file-container,.image-list li .image-container{border-radius:3px;background-color:var(--ds-background-accent-gray-subtlest,#f5f5f5);padding:5px;margin-bottom:5px;position:relative;vertical-align:top;box-sizing:border-box;height:90px}.file-list li .file-container img,.file-list li .image-container img,.image-list li .file-container img,.image-list li .image-container img{width:auto;height:auto;position:relative;top:50%;transform:translateY(-50%);box-shadow:0 1px 3px var(--ds-shadow-overlay,rgba(0,0,0,.2));max-width:100%;max-height:100%}.file-list li .file-container .thumbnail,.file-list li .image-container .thumbnail,.image-list li .file-container .thumbnail,.image-list li .image-container .thumbnail{position:relative;top:50%;transform:translateY(-50%);background-image:none;display:inline-block}.file-list li .aui-progress-indicator,.image-list li .aui-progress-indicator{position:absolute;top:50%;left:10%;width:80%;z-index:2;transform:translateY(-50%)}.file-list li .overlay,.image-list li .overlay{width:100%;height:100%;display:none;position:absolute;z-index:1;background-color:var(--ds-background-discovery,rgba(0,0,0,.8));top:0;left:0}.file-list li .abs-icon,.image-list li .abs-icon{width:20px;height:20px;line-height:20px;border:1px solid var(--ds-border,#ccc);box-sizing:border-box;border-radius:3px;position:absolute;outline:none;opacity:0;cursor:pointer;color:var(--ds-text-subtlest,#707070);background-color:var(--ds-surface,#fff);background-repeat:no-repeat;background-position:50%;vertical-align:text-bottom;text-indent:-999em}.file-list li .abs-icon.zoom,.image-list li .abs-icon.zoom{top:5px;right:27px;background-image:url(${x})}.file-list li .abs-icon.select,.image-list li .abs-icon.select{top:5px;right:5px;background-image:url(${k})}.file-list li .abs-icon.cancel,.image-list li .abs-icon.cancel{width:16px;height:16px;line-height:16px;top:5px;right:5px;border:0;color:var(--ds-surface,#fff);display:block;background-color:initial}.file-list li.loading .overlay,.image-list li.loading .overlay{display:block}.file-list li.loading,.image-list li.loading{color:var(--ds-text-subtlest,#707070)}.file-list li.loading .cancel,.image-list li.loading .cancel{z-index:2}.file-list li.hover,.file-list li:hover,.image-list li.hover,.image-list li:hover{cursor:pointer}.file-list li.hover .select,.file-list li.hover .zoom,.file-list li:hover .select,.file-list li:hover .zoom,.image-list li.hover .select,.image-list li.hover .zoom,.image-list li:hover .select,.image-list li:hover .zoom{display:block}.file-list li.current .file-container,.file-list li.hover .file-container,.file-list li.selected .file-container,.file-list li:hover .file-container,.image-list li.current .file-container,.image-list li.hover .file-container,.image-list li.selected .file-container,.image-list li:hover .file-container{background-color:var(--ds-background-accent-gray-subtler,#ebf2f9)}.file-list li.current .caption,.file-list li.hover .caption,.file-list li.selected .caption,.file-list li:hover .caption,.image-list li.current .caption,.image-list li.hover .caption,.image-list li.selected .caption,.image-list li:hover .caption{color:var(--ds-text,#000)}.file-list li.selected .select,.image-list li.selected .select{display:block;background-color:var(--ds-icon-accent-blue,#3572b0);opacity:1;background-image:url(${M});border:0}.file-list li.selected.hover .select,.file-list li.selected:hover .select,.image-list li.selected.hover .select,.image-list li.selected:hover .select{background-color:var(--ds-icon-accent-blue,#3572b0)}.file-list li.current .file-container,.image-list li.current .file-container{border:1px solid var(--ds-border,#ccc)}.file-list li.last,.file-list li:nth-child(4n),.image-list li.last,.image-list li:nth-child(4n){margin-right:0}#insert-image-dialog.aui-dialog .dialog-panel-body{overflow:hidden;position:relative;padding:10px 10px 0}#insert-image-dialog.aui-dialog .dialog-panel-body .aui-message p{margin-top:0}#insert-image-dialog.aui-dialog .dialog-panel-body .aui-message ul{padding-left:15px;margin:0}#insert-image-dialog.aui-dialog .dialog-panel-body .aui-message ul.one-message{padding-left:0}#insert-image-dialog.aui-dialog .dialog-panel-body .aui-message ul.one-message li{list-style:none}#insert-image-dialog.aui-dialog .dialog-panel-body.web-image-panel{overflow:auto}#insert-image-dialog.aui-dialog .dialog-panel-body .no-files{margin-top:0}#insert-image-dialog.aui-dialog .dialog-panel-body .message-handler{margin-right:10px;margin-bottom:10px}#insert-image-dialog.aui-dialog .aui-progress-indicator,#insert-image-dialog.aui-dialog .aui-progress-indicator .aui-progress-indicator-value{height:4px;border-radius:0}#insert-image-dialog.aui-dialog .scroll-wrapper{position:relative}#insert-image-dialog.aui-dialog .divider{border-top:1px solid var(--ds-border,#ccc);width:110%;height:1px;margin-left:-10px}#insert-image-dialog.aui-dialog .search-panel-wrapper{height:100%}#insert-image-dialog.aui-dialog .dialog-page-menu li.page-menu-item button.item-button{color:var(--ds-text,var(--confluence-color-scheme-linkColor))}#insert-image-dialog.aui-dialog .dialog-page-menu li.page-menu-item button.item-button :hover{background-color:var(--ds-background-accent-gray-subtlest,#f5f5f5)}#insert-image-dialog.aui-dialog .dialog-page-menu li.page-menu-item.selected button.item-button{background-color:var(--ds-background-accent-gray-subtler,var(--aui-item-selected-bg,#ebf2f9));color:var(--ds-text,var(--aui-item-selected-text,#707070))}#insert-image-dialog.aui-dialog .dialog-page-menu li.page-menu-item.selected button.item-button :hover{background-color:var(--ds-background-accent-gray-subtle,var(--aui-item-selected-bg,#ebf2f9))}#upload-attachment form{padding:0}#upload-attachment form .invisible{height:1px;width:1px;opacity:0;z-index:1}#upload-attachment .file-upload-icon{vertical-align:text-bottom}#attached-files{padding:10px 0}ul.image-list li{width:175px}ul.image-list li.image-effect-preview.hover{background-color:var(--ds-background-discovery-hovered,#e9e9e9);border:0}ul.image-list li.image-effect-preview .caption{font-size:14px}ul.image-list li.image-effect-preview.selected{background-color:var(--ds-icon-selected,#3572b0);border:0}ul.image-list li.image-effect-preview.selected .caption{color:var(--ds-surface,#fff);font-weight:700;font-size:14px;width:145px}ul.image-list li.image-effect-preview .image-container{margin:0 15px 5px;padding:0;width:145px;height:auto}ul.image-list li.image-effect-preview .image-container img{box-shadow:none;position:static;transform:translate(0)}
6#image-properties-dialog .image-effects-panel ul.image-list .image-container{height:auto}.svg-icon:before{display:none;content:""}.svg-icon.size-48{width:48px;height:48px}.svg-icon.aui-iconfont-file-image.size-48{background-image:url(${E})}.svg-icon.aui-iconfont-file-pdf.size-48{background-image:url(${T})}.svg-icon.aui-iconfont-file-txt.size-48{background-image:url(${I})}.svg-icon.aui-iconfont-file-doc.size-48{background-image:url(${D})}.svg-icon.aui-iconfont-file-xls.size-48{background-image:url(${S})}.svg-icon.aui-iconfont-file-ppt.size-48{background-image:url(${N})}.svg-icon.aui-iconfont-file-code.size-48{background-image:url(${L})}.svg-icon.aui-iconfont-file-video.size-48{background-image:url(${B})}.svg-icon.aui-iconfont-file-zip.size-48{background-image:url(${R})}.svg-icon.aui-iconfont-file-generic.size-48{background-image:url(${O})}`,""]);const P=A},8159:(e,t,n)=>{e.exports=n},8248:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var o=n(1601),r=n.n(o),a=n(6314),i=n.n(a)()(r());i.push([e.id,".aui-dialog .wiki-parser-selector{font-size:14px;margin-right:5px}.insert-wiki-markup-panel div,.insert-wiki-markup-panel div form{height:100%;text-align:center}.insert-wiki-markup-panel .spinner{position:absolute;top:50%;left:50%;margin-top:-73px;margin-left:-60px}#insert-wiki-info-title{text-align:left;margin-left:10px}#insert-wiki-markup-form{height:95%}#insert-wiki-markup-form .wiki-title span{box-sizing:border-box;display:-moz-inline-stack;display:inline-block;margin-bottom:10px;max-width:48%;text-align:left;vertical-align:middle;width:48%}#insert-wiki-markup-form .wiki-title span:first-child{margin-right:20px}#insert-wiki-textarea,#insert-wiki-textarea-preview{box-sizing:border-box;display:-moz-inline-stack;display:inline-block;font-size:14px;height:84%;max-width:48%;vertical-align:middle;width:48%;resize:none}#insert-wiki-textarea.originalDefault{height:100%;min-width:100%;width:100%}#insert-wiki-textarea{font-family:Monaco,Consolas,Courier New,monospace;margin-right:20px}#insert-wiki-textarea-preview{border:1px solid var(--ds-border-input,#ccc);border-radius:3px;position:relative}#insert-wiki-textarea-preview iframe{border:0;height:100%;left:0;min-height:100%;overflow:hidden;position:absolute;top:0;width:100%}",""]);const s=i},8536:e=>{"use strict";e.exports=require("confluence/dark-features")},8630:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAW0lEQVQYlWP4jwYYSBPYewFV4FhBL4rA+aLaV8gC14srnyKbca+s/AHU0HdT3v3//6Sy5BbMlukFTe9e1RRfhlv7ZUJBU2PhGSR3/JpXUHAUxWH/1u8h1y8gAADgQu+TLTiA3gAAAABJRU5ErkJggg=="},8734:(e,t,n)=>{e.exports=n},8873:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEX///9wcHBwcHBwcHD6E60rAAAAA3RSTlMAmaps9r97AAAAJ0lEQVQIW2NgQADGC0CC+QMywfj//wUG5v//P4BYD9BlGRiBQqgAAJ+HEATHbgMnAAAAAElFTkSuQmCC"},8917:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var o=n(1601),r=n.n(o),a=n(6314),i=n.n(a)()(r());i.push([e.id,".aui-toolbar-confluence .icon-svg{display:flex;justify-content:center;align-items:center}#rte-toolbar .dropdown-item.active{box-shadow:0 0 0 2px var(--aui-focus);outline-style:none}",""]);const s=i},9002:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var o=n(1601),r=n.n(o),a=n(6314),i=n.n(a),s=n(4417),l=n.n(s),c=new URL(n(5153),n.b),d=new URL(n(7231),n.b),u=new URL(n(6615),n.b),g=new URL(n(8873),n.b),m=i()(r()),p=l()(c),f=l()(d),h=l()(u),b=l()(g);m.push([e.id,`#autocomplete-dropdown span.editor-icon{padding:0}#autocomplete-dropdown span.icon{height:20px;width:20px;background-position:50%;background-repeat:no-repeat}#autocomplete-dropdown .dropdown-insert-link span.icon{background-image:url(${p})}#autocomplete-dropdown .dropdown-insert-image span.icon{background-image:url(${f})}#autocomplete-dropdown .dropdown-insert-macro span.icon{background-image:url(${h});background-size:20px 20px}#autocomplete-dropdown .insert-create-page-link span.icon{background-image:url(${b})}#autocomplete-dropdown .aui-dropdown h2.top-menu-title{background:var(--ds-surface-overlay,#f5f5f5);font-size:14px;font-weight:400;line-height:24px;margin:0;padding:2px 5px;border-bottom:1px solid var(--ds-border-accent-gray,#ccc)}#autocomplete-dropdown .aui-dropdown.fabric h2.top-menu-title{display:none}#autocomplete-dropdown .aui-dropdown li.active,#autocomplete-dropdown .emoji-typeahead-selected{box-shadow:inset 0 0 0 2px var(--aui-focus);outline-style:none}`,""]);const y=m},9048:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTAgNC4wMXYzOS45OEE0LjAxIDQuMDEgMCAwMDQuMDEgNDhoMzkuOThBNC4wMSA0LjAxIDAgMDA0OCA0My45OVY0LjAxQTQuMDEgNC4wMSAwIDAwNDMuOTkgMEg0LjAxQTQuMDEgNC4wMSAwIDAwMCA0LjAxek00My45OSAxQTMuMDEgMy4wMSAwIDAxNDcgNC4wMXYzOS45OEEzLjAxIDMuMDEgMCAwMTQzLjk5IDQ3
6SDQuMDFBMy4wMSAzLjAxIDAgMDExIDQzLjk5VjQuMDFBMy4wMSAzLjAxIDAgMDE0LjAxIDFoMzkuOTh6TTI4IDEydjFoMTV2LTFIMjh6bTAgNnYxaDE1di0xSDI4em0tMiA2djFoMTd2LTFIMjZ6TTUgMzh2MWgzOHYtMUg1em0wLTd2MWgzOHYtMUg1em0wLTE0LjVhOS41IDkuNSAwIDAwOS41IDkuNSA5LjUgOS41IDAgMDA5LjUtOS41QTkuNSA5LjUgMCAwMDE0LjUgNyA5LjUgOS41IDAgMDA1IDE2LjV6bTEgMGE4LjUgOC41IDAgMDE4LTguNDg1djguMTM4bC03LjYyMyAyLjg1OUE4LjUwOSA4LjUwOSAwIDAxNiAxNi41em04LjUgOC41YTguNTAyIDguNTAyIDAgMDEtNy43NzItNS4wNTJsNy42NDYtMi44NjcgNS43NzMgNS43NzNBOC40NyA4LjQ3IDAgMDExNC41IDI1em02LjM1My0yLjg1M0wxNSAxNi4yOTNWOC4wMTVhOC41IDguNSAwIDAxNS44NTMgMTQuMTMyeiIgZmlsbD0iIzcwNzA3MCIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+"},9158:e=>{"use strict";e.exports=require("confluence/form-state-control")},9170:e=>{"use strict";e.exports=require("confluence/dropdown")},9294:(e,t,n)=>{e.exports=n},9586:e=>{"use strict";e.exports=require("confluence-drag-and-drop/analytics/files-upload-analytics")},9743:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var o=n(1601),r=n.n(o),a=n(6314),i=n.n(a),s=n(4417),l=n.n(s),c=new URL(n(2674),n.b),d=new URL(n(1883),n.b),u=i()(r()),g=l()(c),m=l()(d);
6u.push([e.id,`#property-panel a.macro-placeholder-property-panel-display-newline-button span.icon{background-image:url(${g});width:16px;height:16px;display:inline-block}#property-panel a.macro-placeholder-property-panel-display-inline-button span.icon{background-image:url(${m});width:16px;height:16px;display:inline-block}#property-panel a.macro-placeholder-property-panel-display-inline-button,#property-panel a.macro-placeholder-property-panel-display-newline-button{padding:0 6px}`,""]);const p=u}},e=>{e.O(0,["vendors-node_modules_css-loader_dist_runtime_api_js-node_modules_css-loader_dist_runtime_noSo-d6dffd","vendors-node_modules_window-or-global_lib_index_js","vendors-node_modules_atlaskit_tokens_dist_esm_theme-mutation-observer_js-node_modules_css-loa-2cf915","src_lib_export-as-amd_ts-com_atlassian_auiplugin_aui-flag_require_aui_flag_","src_editor-plugins_page-editor_page-editor-message_ts","src_editor-plugins_page-editor_page-editor-quit-dialog_ts","src_editor-plugins_utils_editor-notifications_ts"],()=>e(e.s=531)),e.O()}]); 7}catch(e){WRMCB(e)};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.