PageSourceSearch

https://paymentknowledgebase.com/s/9a454713ccb15681d8649472fabcd21…=true&hostenabled=true&locale=en-US

js paymentknowledgebase.com collected 2026-10-07 00:49:00 UTC 214,694 bytes, 3,352 lines download raw bytes

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.analytics.analytics-client:js-events-analytics', location = 'js/store-wrapper.js' */
5var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(f){return f.raw=f};$jscomp.createTemplateTagFirstArgWithRaw=function(f,h){f.raw=h;return f};
6(function(){function f(){return e&&"object"===typeof e?Object.values(e).map(function(a){return a.length}).reduce(function(a,b){return a+b},0):0}function h(a){var b="kB";a/=1E3;1E3<a&&(a/=1E3,b="MB");return""+a.toFixed(2)+b}function g(a,b){console.error("atlassian-analytics -",a,b)}function l(a,b,c){var d=h(f());void 0!==c&&"string"===typeof c?(c=h(c.length),a=a+" size: "+c+" (used space: "+d+")"):a=a+" (used space: "+d+")";g(a,b)}try{var e=window.localStorage;e.setItem("__test__","__test__");e.removeItem("__test__")}catch(a){g("localStorage is not available",
7a)}var m={remove:function(a){try{e.removeItem(a)}catch(b){g("store.remove("+a+")",b)}},set:function(a,b,c){if(void 0===b)return m.remove(a);try{a:{try{var d=JSON.stringify(b);break a}catch(k){g("serialize",k)}d=void 0}e.setItem(a,d)}catch(k){l("store.set("+a+")",k,d),c&&"function"===typeof c&&c()}},get:function(a){try{a:{var b=e.getItem(a);try{var c=JSON.parse(b);break a}catch(d){g("deserialize",d)}c=void 0}return c}catch(d){l("store.get("+a+")",d)}},clear:function(){try{e.clear()}catch(a){g("store.clear()",
8a)}}};this.store=m})();
9}catch(e){WRMCB(e)};
10;
11try {
12/* module-key = 'com.atlassian.analytics.analytics-client:js-events-analytics', location = 'js/page-visibility.js' */
13define("atlassian/analytics/page-visibility",function(){var hasBrowserSupport=document.hidden!==undefined;var wrapper={supported:hasBrowserSupport,isHidden:function(){return hasBrowserSupport?document.hidden:false}};return wrapper});
14}catch(e){WRMCB(e)};
15;
16try {
17/* module-key = 'com.atlassian.analytics.analytics-client:js-events-analytics', location = 'js/user-activity-xhr-header.js' */
18define("atlassian/analytics/user-activity-xhr-header",["atlassian/analytics/page-visibility"],function(b){var e=XMLHttpRequest.prototype.send,c=window.fetch,d=!1;return{install:function(){!d&&b.supported&&(XMLHttpRequest.prototype.send=function(){b.isHidden()&&this.setRequestHeader("x-atlassian-mau-ignore",b.isHidden());e.apply(this,arguments)},c&&(window.fetch=function(g,a){a=a||{};var f=a.headers;b.isHidden()&&(a.headers=f?new Headers(f):new Headers,a.headers.set("x-atlassian-mau-ignore",b.isHidden()));
19return c.call(this,g,a)}),d=!0)},uninstall:function(){d&&(XMLHttpRequest.prototype.send=e,c&&(window.fetch=c));d=!1}}});require("atlassian/analytics/user-activity-xhr-header").install();
20}catch(e){WRMCB(e)};
21;
22try {
23/* module-key = 'com.atlassian.analytics.analytics-client:js-events-analytics', location = 'js/atlassian-analytics.js' */
24(function(p){var t="function"===typeof AJS.contextPath?AJS.contextPath():"",g=null,h=null,q="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*
24Math.random()|0;return("x"===a?b:b&3|8).toString(16)}),u=function(){return store.remove(g)},l=function(){var a=[],b;if(0!==AJS.EventQueue.length){a=store.get(g)||a;var c=0;for(b=AJS.EventQueue.length;c<b;++c){var d=AJS.EventQueue[c];d.name&&(d={name:d.name,properties:d.properties,time:d.time||0},a.push(d))}AJS.EventQueue.length=0;store.set(g,
25a,u)}},r=0,v=function(a){for(var b=a.length-1;0<=b;b--){var c="",d=a[b],e=d.properties;if("undefined"===typeof d.name)c="you must provide a name for the event.";else if("undefined"!==typeof e&&null!==e)if(e.constructor!==Object)c="properties must be an object with key value pairs.";else{var k=void 0;for(k in e)if(e.hasOwnProperty(k)){var f=e[k];"undefined"!==typeof f&&null!==f&&("number"===typeof f||"string"===typeof f||"boolean"===typeof f)||("undefined"!==typeof f&&null!==f&&f.toString?e[k]=f.toString():
26e[k]="")}}""!==c&&(AJS.log("WARN: Invalid analytics event detected and ignored, "+c+"\nEvent: "+JSON.stringify(d)),a.splice(b,1))}return a.length},m=0,n=function(){function a(){setTimeout(n,Math.min(5E3*Math.pow(2,r=0),3E5))}if(store.get(h))var b=!1;else store.set(h,q),b=store.get(h)===q;if(b)m=0;else if(++m,20>m)return a();try{l();var c=store.get(g);if(!c||!c.length)return a();store.remove(g);if(!v(c))return a();var d=(new Date).getTime();for(b=0;b<c.length;b++)c[b].timeDelta=0<c[b].time?c[b].time-
27d:b-c.length,delete c[b].time;fetch(t+"/rest/analytics/1.0/publish/bulk",{method:"POST",body:JSON.stringify(c),headers:{"Content-Type":"application/json"},cache:"no-cache",credentials:"same-origin"}).then(function(e){if(!e.ok)throw Error("A response outside OK range (200-299)");a()}).catch(function(){AJS.EventQueue=AJS.EventQueue.concat(c);l();setTimeout(n,Math.min(5E3*Math.pow(2,++r),3E5))}).catch(function(e){console.error(e)})}finally{store.set(h,null)}};AJS.toInit(function(){var a="unknown";"jira"===
28document.body.id?a="jira":"com-atlassian-confluence"===document.body.id&&(a="confluence");g="atlassian-analytics."+a;h=g+".lock";setTimeout(n,500);-1<window.location.pathname.indexOf("/secure/admin/ViewApplicationProperties")?AJS.$("[data-property-id\x3d'analytics-enabled']").remove():-1<window.location.pathname.indexOf("/secure/admin/EditApplicationProperties")&&(a=AJS.$(":contains(Enable Atlassian analytics)"),0<a.size()&&(a=a[a.size()-2])&&a.remove())});p(document).on("visibilitychange",function(){"hidden"===
29document.visibilityState&&l()});p(window).on("beforeunload",function(){l()});AJS.bind("analytics",function(a,b){AJS.EventQueue.push({name:b.name,properties:b.data})});AJS.bind("analyticsEvent",function(a,b){AJS.EventQueue.push({name:b.name,properties:b.data})})})(AJS.$);
30}catch(e){WRMCB(e)};
31;
32try {
33/* module-key = 'com.atlassian.auiplugin:split_aui.behaviour.event-bus', location = 'aui.chunk.45258bc10b35dc5f2070--a4ff16e8fe263138e5a1.js' */
34(window.__auiJsonp=window.__auiJsonp||[]).push([["aui.behaviour.event-bus"],[],[["PoOT","runtime","aui.splitchunk.0d131bcbf1","aui.splitchunk.444efc83be","aui.splitchunk.739b9ec8cc","aui.splitchunk.994e478d48","aui.splitchunk.8771ceac91","aui.splitchunk.0fc208f3fe"]]]);
35}catch(e){WRMCB(e)};
36;
37try {
38/* module-key = 'com.atlassian.analytics.analytics-client:js-events', location = 'js/event-queue-init.js' */
39(function(){AJS.EventQueue=AJS.EventQueue||[];var b=Array.prototype.push;AJS.EventQueue.push=function(a){a.time=(new Date).getTime();b.call(AJS.EventQueue,a)};AJS.Analytics={triggerPrivacyPolicySafeEvent:function(a,c){AJS.log("WARN: 'triggerPrivacyPolicySafeEvent' has been deprecated");AJS.EventQueue.push({name:a,properties:c})}}})();
40}catch(e){WRMCB(e)};
41;
42try {
43/* module-key = 'com.atlassian.analytics.analytics-client:policy-update-init', location = 'js/policy-update-init.js' */
44AJS.toInit(function(){WRM.data.claim("com.atlassian.analytics.analytics-client:policy-update-init.policy-update-data-provider")&&WRM.require("wrc!com.atlassian.analytics.analytics-client:policy-update")});
45}catch(e){WRMCB(e)};
46;
47try {
48/* module-key = 'com.atlassian.analytics.analytics-client:programmatic-analytics-init', location = 'js/programmatic-analytics-init.js' */
49(function(){WRM.data.claim("com.atlassian.analytics.analytics-client:programmatic-analytics-init.programmatic-analytics-data-provider")&&WRM.require("wrc!com.atlassian.analytics.analytics-client:programmatic-analytics")})();
50}catch(e){WRMCB(e)};
51;
52try {
53/* module-key = 'com.atlassian.plugins.atlassian-nav-links-plugin:application-header-administration-cog-resource', location = 'header/cog.js' */
54var NavLinks=function(b){b.ApplicationHeader=function(c){c.Cog=function(){return{getDropdown:function(){var a=AJS.$("#system-admin-menu-content");
54if(0<a.length)return a;a=AJS.$("#admin-menu-link-content");return 0<a.length?a:AJS.$("#bamboo\\.global\\.header-admin\\.menu")}}}();return c}(b.ApplicationHeader||{});return b}(NavLinks||{});
55}catch(e){WRMCB(e)};
56;
57try {
58/* module-key = 'com.atlassian.plugins.atlassian-nav-links-plugin:administration-shortcuts-resources', location = 'adminshortcuts/adminshortcuts.soy' */
59// This file was automatically generated from adminshortcuts.soy.
60// Please don't edit this file by hand.
61
62/**
63 * @fileoverview Templates in namespace navlinks.templates.adminshortcuts.
64 */
65
66if (typeof navlinks == 'undefined') { var navlinks = {}; }
67if (typeof navlinks.templates == 'undefined') { navlinks.templates = {}; }
68if (typeof navlinks.templates.adminshortcuts == 'undefined') { navlinks.templates.adminshortcuts = {}; }
69
70
71navlinks.templates.adminshortcuts.section = function(opt_data, opt_ignored) {
72  var param5 = '<ul class="aui-list-truncate">';
73  var linkList7 = opt_data.links;
74  var linkListLen7 = linkList7.length;
75  for (var linkIndex7 = 0; linkIndex7 < linkListLen7; linkIndex7++) {
76    var linkData7 = linkList7[linkIndex7];
77    param5 += '<li><a href="' + soy.$$escapeHtml(linkData7.link) + '">' + soy.$$escapeHtml(linkData7.label) + '</a></li>';
78  }
79  param5 += '</ul>';
80  var output = '' + aui.dropdown2.section({id: 'nl-remote-admin-section', label: 'Other applications', content: param5});
81  return output;
82};
83if (goog.DEBUG) {
84  navlinks.templates.adminshortcuts.section.soyTemplateName = 'navlinks.templates.adminshortcuts.section';
85}
86
87}catch(e){WRMCB(e)};
88;
89try {
90/* module-key = 'com.atlassian.plugins.atlassian-nav-links-plugin:administration-shortcuts-resources', location = 'adminshortcuts/adminnavlinks.js' */
91var NavLinks=function(b){b.AdminShortcuts=function(){var c=function(){AJS.$("#nl-remote-admin-section").on("click","a",function(){NL.trackEvent("remoteAdminItemSelected",NL.getCurrentApplication(),$(this).attr("href"))})};return{render:function(){AJS.$.ajax({url:AJS.contextPath()+"/rest/menu/latest/admin",cache:!1,dataType:"json"}).done(function(a){a=a.filter(function(d){return!d.local});a.length&&(a=navlinks.templates.adminshortcuts.section({links:a}),b.ApplicationHeader.Cog.getDropdown().append(a),
92c())})}}}();return b}(NavLinks||{});
93}catch(e){WRMCB(e)};
94;
95try {
96/* module-key = 'com.atlassian.plugins.atlassian-nav-links-plugin:administration-shortcuts', location = 'adminshortcuts/adminshortcuts-cdn.js' */
97AJS.toInit(function(){AJS.DarkFeatures&&AJS.DarkFeatures.isEnabled("rotp.admin.shortcuts")&&NavLinks.AdminShortcuts.render()});
98}catch(e){WRMCB(e)};
99;
100try {
101/* module-key = 'com.atlassian.auiplugin:split_aui.splitchunk.vendors--02a4084a95', location = 'aui.chunk.cf963d14909600982688--07bdfffa32b68a1cb6ac.js' */
102(window.__auiJsonp=window.__auiJsonp||[]).push([["aui.splitchunk.vendors--02a4084a95"],{M4tZ:function(n,E,o){var i,u,t;
103/*!
104 * jQuery UI Keycode 1.13.2
105 * http://jqueryui.com
106 *
107 * Copyright jQuery Foundation and other contributors
108 * Released under the MIT license.
109 * http://jquery.org/license
110 */!function(A){"use strict";u=[o("oDIA"),o("O+lX")],void 0===(t="function"==typeof(i=function(n){return n.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}})?i.apply(E,u):i)||(n.exports=t)}()}}]);
111}catch(e){WRMCB(e)};
112;
113try {
114/* module-key = 'com.atlassian.auiplugin:split_jquery.ui.keycode', location = 'aui.chunk.23cc8f4ec14f4a4edcc9--1e8aa9ff0eabed1e4547.js' */
115(window.__auiJsonp=window.__auiJsonp||[]).push([["jquery.ui.keycode"],{wrJm:function(u,i,n){"use strict";n.r(i);n("M4tZ");i.default="jquery"}},[["wrJm","runtime","aui.splitchunk.vendors--20a97d6a33","aui.splitchunk.vendors--02a4084a95","aui.splitchunk.0d131bcbf1"]]]);
116}catch(e){WRMCB(e)};
117;
118try {
119/* module-key = 'com.atlassian.plugins.atlassian-nav-links-plugin:rotp-projectshortcuts', location = 'projectshortcuts/projectshortcuts.soy' */
120// This file was automatically generated from projectshortcuts.soy.
121// Please don't edit this file by hand.
122
123/**
124 * @fileoverview Templates in namespace navlinks.templates.projectshortcuts.
125 */
126
127if (typeof navlinks == 'undefined') { var navlinks = {}; }
128if (typeof navlinks.templates == 'undefined') { navlinks.templates = {}; }
129if (typeof navlinks.templates.projectshortcuts == 'undefined') { navlinks.templates.projectshortcuts = {}; }
130
131
132navlinks.templates.projectshortcuts.dialogContent = function(opt_data, opt_ignored) {
133  return '' + ((opt_data.localShortcuts && opt_data.localShortcuts.length > 0) ? navlinks.templates.projectshortcuts.dialogContentShortcuts({shortcuts: opt_data.localShortcuts, listClass: 'projectshortcut-links'}) : '') + ((opt_data.remoteShortcuts != null) ? (opt_data.remoteShortcuts.length > 0) ? '<h2 class="projectshortcuts-heading">Related Links</h2>' + navlinks.templates.projectshortcuts.dialogContentShortcuts(soy.$$augmentMap(opt_data.remoteShortcuts, {shortcuts: opt_data.remoteShortcuts, listClass: 'projectshortcut-links'})) : '' : navlinks.templates.projectshortcuts.dialogLoading(null));
134};
135if (goog.DEBUG) {
136  navlinks.templates.projectshortcuts.dialogContent.soyTemplateName = 'navlinks.templates.projectshortcuts.dialogContent';
137}
138
139
140navlinks.templates.projectshortcuts.headingWrapper = function(opt_data, opt_ignored) {
141  return '<div class="project-dialog-header-wrapper"><div class="project-header"><img class="project-img" src="' + soy.$$escapeHtml(opt_data.logoUrl) + '"><h2 class="dialog-title">' + soy.$$escapeHtml(opt_data.title) + '</h2></div><div class="project-content-wrapper">' + soy.$$filterNoAutoescape(opt_data.contentHtml) + '</div></div>';
142};
143if (goog.DEBUG) {
144  navlinks.templates.projectshortcuts.headingWrapper.soyTemplateName = 'navlinks.templates.projectshortcuts.headingWrapper';
145}
146
147
148navlinks.templates.projectshortcuts.dialogContentShortcuts = function(opt_data, opt_ignored) {
149  opt_data = opt_data || {};
150  var output = '<ul' + ((opt_data.listClass) ? ' class="' + soy.$$escapeHtml(opt_data.listClass) + '"' : '') + '>';
151  var shortcutList35 = opt_data.shortcuts;
152  var shortcutListLen35 = shortcutList35.length;
153  for (var shortcutIndex35 = 0; shortcutIndex35 < shortcutListLen35; shortcutIndex35++) {
154    var shortcutData35 = shortcutList35[shortcutIndex35];
155    output += '<li' + ((shortcutIndex35 == shortcutListLen35 - 1) ? ' class="last"' : '') + '>
155' + navlinks.templates.projectshortcuts.dialogContentShortcut(shortcutData35) + '</li>';
156  }
157  output += '</ul>';
158  return output;
159};
160if (goog.DEBUG) {
161  navlinks.templates.projectshortcuts.dialogContentShortcuts.soyTemplateName = 'navlinks.templates.projectshortcuts.dialogContentShortcuts';
162}
163
164
165navlinks.templates.projectshortcuts.dialogContentShortcut = function(opt_data, opt_ignored) {
166  return '<a href="' + soy.$$escapeHtml(opt_data.link) + '"' + ((opt_data.tooltip) ? ' title="' + soy.$$escapeHtml(opt_data.tooltip) + '"' : '') + '>' + soy.$$escapeHtml(opt_data.label) + '</a>';
167};
168if (goog.DEBUG) {
169  navlinks.templates.projectshortcuts.dialogContentShortcut.soyTemplateName = 'navlinks.templates.projectshortcuts.dialogContentShortcut';
170}
171
172
173navlinks.templates.projectshortcuts.dialogLoading = function(opt_data, opt_ignored) {
174  opt_data = opt_data || {};
175  return '<div class="projectshortcuts-loading">' + ((opt_data.text) ? soy.$$escapeHtml(opt_data.text) : '') + '</div>';
176};
177if (goog.DEBUG) {
178  navlinks.templates.projectshortcuts.dialogLoading.soyTemplateName = 'navlinks.templates.projectshortcuts.dialogLoading';
179}
180
181}catch(e){WRMCB(e)};
182;
183try {
184/* module-key = 'com.atlassian.plugins.atlassian-nav-links-plugin:rotp-projectshortcuts', location = 'projectshortcuts/projectshortcuts.js' */
185(function(g,r){function n(){return g(".project-shortcut-dialog-trigger img").attr("src")}function k(a){a.localShortcuts&&(c.getCurrentPanel().html(navlinks.templates.projectshortcuts.headingWrapper({title:a.entity.title,logoUrl:n(),contentHtml:navlinks.templates.projectshortcuts.dialogContent(a)})),l(c))}function l(a){a=a.popup.element;var h=a.find(".dialog-panel-body"),m=a.find(".dialog-components");h.height("auto");a.height(m.outerHeight()-1);g(".aui-shadow").remove()}function p(a,h){return g.ajax({url:a,
186cache:!1,data:h,dataType:"json"})}var c,e={};g(document).on("click",".project-shortcut-dialog-trigger",function(a){function h(d){e[b].localShortcuts=d.shortcuts;k(e[b])}function m(d){e[b].remoteShortcuts=d.shortcuts;k(e[b])}var f=g(this),b=f.data("key"),q=f.data("name");f=f.data("entity-type");"undefined"!==typeof b&&(a.preventDefault(),c=(new AJS.Dialog({width:600,keypressListener:function(d){d.which==jQuery.ui.keyCode.ESCAPE&&c.remove()},id:"project-shortcuts-dialog"})).addCancel("Close",function(){c.remove()}).addPanel("",
187navlinks.templates.projectshortcuts.headingWrapper({title:q,logoUrl:n(),contentHtml:navlinks.templates.projectshortcuts.dialogLoading({text:"Retrieving links…"})})).show(),l(c),e[b]?k(e[b]):(e[b]={entity:{title:q},localShortcuts:null,remoteShortcuts:null},p(AJS.contextPath()+"/rest/project-shortcuts/1.0/local/"+b,{entityType:f}).done(h),p(AJS.contextPath()+"/rest/project-shortcuts/1.0/remote/"+b,{entityType:f}).done(m).fail(function(){var d=c.getCurrentPanel().body.find(".project-content-wrapper");
188d.find(".projectshortcuts-loading").remove();AJS.messages.error(d,{body:"Could not retrieve remote project shortcuts",closeable:!1});l(c)})))})})(jQuery,window.NL=window.NL||{});
189}catch(e){WRMCB(e)};
190;
191try {
192/* module-key = 'com.atlassian.plugins.atlassian-nav-links-plugin:atlassian-ui-popup-display-controller', location = 'popups/DisplayController.js' */
193AJS.Popups=AJS.Popups||{};AJS.Popups.DisplayController=function(){var a=[],c=!1,d=!1;AJS.toInit(function(){setTimeout(function(){AJS.Popups.DisplayController.render()},0)});return{request:function(b){a.push(b);c&&!1===d&&this.render()},render:function(){a.sort(function(b,e){return b.weight-e.weight});c=!0;0!==a.length&&(d=!0,a[0].show())}}}();
194}catch(e){WRMCB(e)};
195;
196try {
197/* module-key = 'com.atlassian.auiplugin:split_aui.page.iconography', location = 'aui.chunk.27b6ef6c885f8df46db6--a679d90059ed6b6eade5.js' */
198(window.__auiJsonp=window.__auiJsonp||[]).push([["aui.page.iconography"],[],[["rSV2","runtime","aui.splitchunk.fbbef27525","aui.splitchunk.d7c46c2734","aui.splitchunk.56dfb54d0c","aui.splitchunk.908fe798b4"]]]);
199}catch(e){WRMCB(e)};
200;
201try {
202/* module-key = 'confluence.extra.jira:jira-issues-view-mode-resources', location = 'jira/jira-issues-view-mode/main.js' */
203require(["ajs","jquery"],function(a,d){var c=function(){var b=d(".wiki-content [data-jira-key][data-client-id]");if(0==b.length)return!1;WRM.require("wr!confluence.extra.jira:jira-issues-view-mode-async-resource",function(){require(["confluence/jim/jira/jira-issues-view-mode/lazy-loading","confluence/jim/jira/jira-issues-view-mode/fix-ui"],function(e,f){e.init(b).done(function(){f.fixBreakIconInOldConf()})})})};a.toInit(c);a.bind("ic-jim-async-supported",c)});
204}catch(e){WRMCB(e)};
205;
206try {
207/* module-key = 'confluence.extra.jira:amd-support', location = 'amd/confluence-shim.js' */
208define("confluence/jim/confluence-shim",function(){return window.Confluence});
209}catch(e){WRMCB(e)};
210;
211try {
212/* module-key = 'confluence.extra.jira:amd-support', location = 'amd/amd-exporter.js' */
213define("confluence/jim/amd/module-exporter",[],function(){var f={namespace:function(d,e,a){var b=d.split(".");a=a||window;var c,h=b.length-1;for(c=0;c<h;c++){var g=a[b[c]];a=null!=g?g:a[b[c]]={}}a[b[c]]&&window.console&&window.console.warn&&window.console.warn('Value of "'+d+'" was overridden');a[b[c]]=e||a[b[c]]||{};return a[b[c]]},safeRequire:function(d,e){define&&void 0===define.amd&&(d=require(d),e&&e(d))},exportModuleAsGlobal:function(d,e,a){f.safeRequire(d,function(b){f.namespace(e,b);a&&a(b)})}};
214return f});
215}catch(e){WRMCB(e)};
216;
217try {
218/* module-key = 'confluence.web.resources:querystring', location = '/includes/js/api/querystring.js' */
219define("confluence/api/querystring",[],function(){return{stringify:function(a){var b="",c;for(c in a)for(var d=0;d<a[c].length;d++)b+="&"+c,a[c][d]&&(b+="="+a[c][d]);return b.substring(1)}
219,stringifyMap:function(a){for(var b="",a=Array.from(a),c=0;c<a.length;c++)for(var d=a[c][0],f=a[c][1],e=0;e<f.length;e++)b+="&"+d,f[e]&&(b+="="+f[e]);return b.substring(1)},parse:function(a){var b={};if(a){"?"===a.substr(0,1)&&(a=a.substr(1));for(var a=a.split("&"),c=0;c<a.length;c++){var d=a[c].split("=");b[d[0]]||
220(b[d[0]]=[]);b[d[0]].push(a[c].substring(d[0].length+1))}}return b},parseMap:function(a){var b=new Map;if(a){"?"===a.substr(0,1)&&(a=a.substr(1));for(var a=a.split("&"),c=0;c<a.length;c++){var d=a[c].split("=");b.has(d[0])||b.set(d[0],[]);b.get(d[0]).push(a[c].substring(d[0].length+1))}}return b}}});
221}catch(e){WRMCB(e)};
222;
223try {
224/* module-key = 'confluence.web.resources:url', location = '/includes/js/api/url.js' */
225define("confluence/api/url",["confluence/api/querystring","jquery"],function(d,f){var g=/([^?|#]+)[?]?([^#]*)[#]?(.*)/,e=["source","urlPath","queryParams","anchor"];return{parse:function(a){var b={};if(a=g.exec(a)){for(var c=0;c<e.length;c++)b[e[c]]=a[c];b.queryParams=d.parse(b.queryParams)}return b},parseUrl:function(a){var b=new Map;if(a=g.exec(a)){for(var c=0;c<e.length;c++)b.set(e[c],a[c]);b.set("queryParams",d.parseMap(b.get("queryParams")))}return b},format:function(a){return f.isEmptyObject(a)?
226"":(!a.urlPath?"":a.urlPath)+(f.isEmptyObject(a.queryParams)?"":"?"+d.stringify(a.queryParams))+(!a.anchor?"":"#"+a.anchor)},formatUrl:function(a){return 0===a.size?"":(!a.get("urlPath")?"":a.get("urlPath"))+(0===a.get("queryParams").size?"":"?"+d.stringifyMap(a.get("queryParams")))+(!a.get("anchor")?"":"#"+a.get("anchor"))}}});
227}catch(e){WRMCB(e)};
228;
229try {
230/* module-key = 'confluence.web.resources:analytics-support', location = '/includes/js/analytics-support.js' */
231define("confluence/analytics-support","jquery ajs confluence/meta window document confluence/api/url".split(" "),function(j,o,l,k,m,h){var b=Object.create(null),n;b.setAnalyticsSource=function(a,d){if(typeof n==="undefined"){var c=j._data(k,"events");n=c&&c.analytics&&c.analytics.length>0}n&&a.attr("href",function(a,c){var b=encodeURIComponent(d),g=h.parseUrl(c);g.size!==0&&g.get("queryParams").set("src",[b]);return h.formatUrl(g)})};b.srcRemovedUrl=function(a){a=h.parseUrl(a);a.get("queryParams").delete("src");
232for(var d=Array.from(a.get("queryParams").keys()),c=0;c<d.length;c++){var b=d[c],f=b.split(".");f.length===3&&f[0]==="src"&&a.get("queryParams").delete(b);b==="jwt"&&a.get("queryParams").delete(b)}return h.formatUrl(a)};b.srcParamValues=function(a){return(a=h.parseUrl(a).get("queryParams"))&&a.get("src")?a.get("src"):[]};b.srcAttrParamValues=function(a){for(var a=h.parseUrl(a).get("queryParams"),b=Object.create(null),c=Array.from(a.keys()),e=0;e<c.length;e++){var f=c[e],i=f.split(".");if(i.length===
2333&&i[0]==="src"){var g=i[1],i=i[2];b[g]=b[g]||Object.create(null);b[g][i]=decodeURIComponent(a.get(f)[0])}}return b};b.extractAnalyticsData=function(a){for(var d=[],c=b.srcParamValues(a),a=b.srcAttrParamValues(a),e=0;e<c.length;e++){var f=c[e];d.push({src:f,attr:a[f]||{}})}return d};b.publish=function(a,b){o.trigger("analytics",{name:a,data:b||{}})};b.init=function(){var a=b.extractAnalyticsData(m.URL),d={userKey:l.get("remote-user-key"),pageID:l.get("page-id"),draftID:l.get("draft-id")};if(a.length>
2340){for(var c=0;c<a.length;c++){var e=a[c],f=j.extend({},d,e.attr);b.publish("confluence.viewpage.src."+e.src,f)}if(k.history&&k.history.replaceState){a=b.srcRemovedUrl(m.URL);m.URL!==a&&k.history.replaceState(null,"",a)}}else b.publish("confluence.viewpage.src.empty",d)};return b});require("confluence/module-exporter").exportModuleAsGlobal("confluence/analytics-support","AJS.Confluence.Analytics",function(j){require("ajs").toInit(j.init)});
235}catch(e){WRMCB(e)};
236;
237try {
238/* module-key = 'com.atlassian.applinks.applinks-plugin:lodash-amd', location = 'applinks/internal/lib/lodash-amd-global.js' */
239define('applinks/lib/lodash', function() {
240        if (!window._) {
241            throw "lodash not found";
242        }
243        return window._;
244    });
245}catch(e){WRMCB(e)};
246;
247try {
248/* module-key = 'com.atlassian.applinks.applinks-plugin:applinks-lib', location = 'applinks/internal/lib/lib-version.js' */
249// NOTE: this is in "lib" because it's required by aui-amd.js. This module _cannot_ have any dependencies on non-lib
250// modules (like "common")
251define('applinks/lib/version', [
252    'applinks/lib/lodash'
253], function(
254    _
255) {
256
257    function checkIntValue(value, desc) {
258        if (_.isUndefined(value)) {
259            return 0;
260        } else if (typeof value !== 'number' || isNaN(value)) {
261            throw new Error(desc + ': expected a number, was: <' + value + '>');
262        } else {
263            return Math.floor(value);
264        }
265    }
266
267    function checkVersionObject(object, desc) {
268        if (!object || !(object instanceof Version)) {
269            throw new Error(desc + ': expected a Version object, was: <' + object + '>');
270        }
271        return object;
272    }
273
274    function compareInt(intOne, intTwo) {
275        return intOne > intTwo ? 1 : intOne == intTwo ? 0 : -1;
276    }
277
278    /**
279     * Constructs a version object that contains version information and can be compared with other version objects.
280     *
281     * @param major major version component
282     * @param minor minor version component
283     * @param bugfix bugfix version component
284     * @constructor
285     */
286    function Version(major, minor, bugfix) {
287        this.major = checkIntValue(major, 'major');
288        this.minor = checkIntValue(minor, 'minor');
289        this.bugfix = checkIntValue(bugfix, 'bugfix');
290    }
291
292    /**
293     * Constructs a Version by parsing a version string.
294     *
295     * @param versionString version string to parse, expected to be in the form of <major>.<minor>.<bugfix>
296     * @param versionDesc what version does the `versionString` represent
297     */
298    Version.parse = function(versionString, versionDesc) {
299        versionDesc = versionDesc || 'versionString';
300        if (!versionString) {
301            throw new Error(versionDesc + ': expected a non-empty string');
302        }
303        var versionSplit = versionString.split('.');
304        if (versionSplit.length !== 3) {
305            throw new Error(versionDesc + ': expected <major>.<minor>.<bugfix> string, was: <' + versionString + '>');
306        }
307        return new Version(parseInt(versionSplit[0]), parseInt(versionSplit[1]), parseInt(versionSplit[2]));
308    };
309
310    /**
311     * Comparator function to sort Version objects.
312     *
313     * @param versionOne first version object
314     * @param versionTwo second version object
315     * @returns {Number} comparison result
316     * @see Version.compareTo(that)
317     */
318    Version.comparator = function(versionOne, versionTwo) {
319        return checkVersionObject(versionOne, 'versionOne').compareTo(checkVersionObject(versionTwo, 'versionTwo'));
320    };
321
322    /**
323     * Return -1, 0 or 1 as this Version object represents a version less than, equal to, or greater than `that`.
324     *
325     * @param that the other version to compare to
326     * @returns {Number} comparison result
327     */
328    Version.prototype.compareTo = function(that) {
329        checkVersionObject(that, 'that');
330        var majorResult = compareInt(this.major, that.major);
331        if (majorResult != 0) {
332            return majorResult;
333        }
334        var minorResult = compareInt(this.minor, that.minor);
335        if (minorResult != 0) {
336            return minorResult;
337        }
338        return compareInt(this.bugfix, that.bugfix);
339    };
340
341    Version.prototype.greaterThan = function(that) {
342        return this.compareTo(that) > 0;
343    };
344
345    Version.prototype.greaterThanOrEqual = function(that) {
346        return this.compareTo(that) >= 0;
347    };
348
349    Version.prototype.lessThan = function(that) {
350        return this.compareTo(that) < 0;
351    };
352
353    Version.prototype.lessThanOrEqual = function(that) {
354        return this.compareTo(that) <= 0;
355    };
356
357    Version.prototype.equals = function(that) {
358        return this.compareTo(that) == 0;
359    };
360
361    Version.prototype.toMinor = function() {
362        return new Version(this.major, this.minor);
363    };
364
365    Version.prototype.toMajor = function() {
366        return new Version(this.major);
367    };
368
369    Version.prototype.toString = function() {
370        return this.major + '.' + this.minor + '.' + this.bugfix;
371    };
372
373    return Version;
374});
375}catch(e){WRMCB(e)};
376;
377try {
378/* module-key = 'com.atlassian.applinks.applinks-plugin:applinks-lib', location = 'applinks/internal/lib/aui-version-detail
378s.js' */
379define('applinks/lib/aui-version-details', [
380    'applinks/lib/version'
381], function(
382    Version
383) {
384    // minimum 5.9.x AUI versions - lower versions ship with bugs that break some of the Applinks functionality.
385    var MINIMUM_59_VERSION = new Version(5, 9, 13);
386    var VERSION_58 = new Version(5, 8);
387    var VERSION_59 = new Version(5, 9);
388
389    function checkVersion(version) {
390        // if 5.9, must be >= the minimum required 5.9.x version
391        if (version.lessThan(MINIMUM_59_VERSION) || version.lessThan(VERSION_59)) {
392            throw new Error('AUI version ' + version + ' is too low, you need to upgrade AUI to ' + MINIMUM_59_VERSION
393                + ' for Applinks to work');
394        }
395    }
396
397    function addVersionDetails(AJS) {
398        var ajsVersion = Version.parse(AJS.version, 'AUI version');
399        checkVersion(ajsVersion);
400
401        AJS.versionDetails = ajsVersion;
402        AJS.versionDetails.is58 = ajsVersion.toMinor().equals(VERSION_58);
403        AJS.versionDetails.is59 = ajsVersion.toMinor().equals(VERSION_59);
404
405        return AJS;
406    }
407
408    return  {
409        /**
410         * Check AUI version for compatibility with Applinks and add `versionDetails` field.
411         */
412        addVersionDetails: addVersionDetails
413    };
414});
415
416}catch(e){WRMCB(e)};
417;
418try {
419/* module-key = 'com.atlassian.applinks.applinks-plugin:applinks-lib', location = 'applinks/internal/lib/console-amd.js' */
420define('applinks/lib/console', function() {
421    return window.console;
422});
423}catch(e){WRMCB(e)};
424;
425try {
426/* module-key = 'com.atlassian.applinks.applinks-plugin:applinks-lib', location = 'applinks/internal/lib/jquery-amd.js' */
427define('applinks/lib/jquery', function() {
428   return window.jQuery;
429});
430}catch(e){WRMCB(e)};
431;
432try {
433/* module-key = 'com.atlassian.applinks.applinks-plugin:applinks-lib', location = 'applinks/internal/lib/aui-amd.js' */
434define('applinks/lib/aui', [
435    'applinks/lib/window',
436    'applinks/lib/aui-version-details'
437], function(
438    window,
439    VersionDetails
440) {
441    var AJS = window.AJS;
442    if (!AJS) {
443        throw new Error('window.AJS not defined, cannot load AUI');
444    }
445
446    return VersionDetails.addVersionDetails(AJS);
447});
448}catch(e){WRMCB(e)};
449;
450try {
451/* module-key = 'com.atlassian.applinks.applinks-plugin:applinks-lib', location = 'applinks/internal/lib/wrm-amd.js' */
452/**
453 * Define Web resource manager as an AMD dependency. This should also be present in apps using Atlassian Plugins Web
454 * Resources framework.
455 */
456define('applinks/lib/wrm', function() {
457   return window.WRM;
458});
459}catch(e){WRMCB(e)};
460;
461try {
462/* module-key = 'com.atlassian.applinks.applinks-plugin:applinks-lib', location = 'applinks/internal/lib/skate-amd.js' */
463define('applinks/lib/skate', function() {
464   // window.skate is not exposed as a global from AUI 5.9, this will return undefined with that version or later
465   return window.skate;
466});
467
468}catch(e){WRMCB(e)};
469;
470try {
471/* module-key = 'com.atlassian.applinks.applinks-plugin:applinks-lib', location = 'applinks/internal/lib/window-amd.js' */
472/**
473 * Define window as AMD module to facilitate unit testing of some modules
474 */
475define('applinks/lib/window', function() {
476    return window;
477});
478}catch(e){WRMCB(e)};
479;
480try {
481/* module-key = 'com.atlassian.applinks.applinks-plugin:applinks-lib', location = 'applinks/internal/lib/spi-amd.js' */
482/**
483 * Define the Applinks SPI functions as AMD module to facilitate unit testing of some modules
484 */
485define('applinks/lib/spi', function() {
486    return {get:
487        function (){
488            //required since code that depends on this global is run before the global is defined,
489            // can be eliminated once this module is made properly AMD
490            return AppLinks.SPI;
491    }}
492});
493}catch(e){WRMCB(e)};
494;
495try {
496/* module-key = 'com.atlassian.applinks.applinks-plugin:applinks-lib', location = 'applinks/internal/lib/applinks-creation-amd.js' */
497/**
498 * Define the Applinks creation resources  as AMD module to facilitate unit testing of some modules
499 */
500define('applinks/lib/creation', function() {
501    return {
502        get: function () {
503            //required since code that depends on this global is run before the global is defined,
504            // can be eliminated once this module is made properly AMD
505            return AppLinks.Creation;
506        }
507    }
508});
509}catch(e){WRMCB(e)};
510;
511try {
512/* module-key = 'com.atlassian.applinks.applinks-plugin:applinks-common-exported', location = 'applinks/internal/common/docs.js' */
513define('applinks/common/docs', [
514    'applinks/lib/jquery',
515    'applinks/lib/aui',
516    'applinks/common/help-paths'
517], function(
518    $,
519    AJS,
520    ApplinksHelpPaths
521) {
522    // NOTE: should be moved to applinks/feature/help-link, see APLDEV-593
523
524    return {
525        /**
526         * NOTE: this is a dynamically generated version of the link build in _help_link.vm, any update here should be
527         * applied there.
528         * @method createDocLink
529         * @param pageKey a key that maps to a page in ual-help-paths.properties
530         * @param sectionKey (Optional) a key that maps to an anchor section id in ual-help-paths.properties
531         * @param classNames (Optional) Whitespace separated list of additional class names
532         * @return an html &lt;a&gt; element targeting the specified page & section
533         */
534        createDocLink: function(pageKey, sectionKey, classNames) {
535            return this._createDocLink(pageKey, sectionKey, classNames, "Help");
536        },
537        createDocLinkIcon: function(pageKey, sectionKey, classNames) {
538            return this._createDocLink(pageKey, sectionKey, classNames, '')
539                .append($('<span/>', {
540                    "class": 'aui-icon aui-icon-small aui-iconfont-help',
541                    "text": "Help"
542                }));
543        },
544
545        _createDocLink: function(pageKey, sectionKey, classNames, text) {
546            if (!classNames) {
547                classNames = '';
548            } else {
549                classNames = ' ' + classNames;
550            }
551            return $('<a/>', {
552                'class': 'ual-help-link help-link' + classNames,
553                href: this.getDocHref(pageKey, sectionKey),
554                target: '_blank',
555                'data-help-link-key': pageKey,
556                text: text,
557                title: "Help"
558            });
559        },
560
561        /**
562         * @method getDocHref
563         * @param pageKey a key that maps to a page in ual-help-paths.properties
564         * @param sectionKey (Optional) a key that maps to an anchor section id in ual-help-paths.properties
565         * @return the url of the given page and section (if specified)
566         */
567        getDocHref: function(pageKey, sectionKey) {
568            var link = ApplinksHelpPaths.getFullPath(pageKey);
569            if (sectionKey) {
570                link += '#' + ApplinksHelpPaths.getPath(sectionKey);
571            }
572            return link;
573        }
574    };
575
576});
577
578}catch(e){WRMCB(e)};
579;
580try {
581/* module-key = 'com.atlassian.applinks.applinks-plugin:applinks-common-exported', location = 'applinks/internal/common/help-paths.js' */
582define('applinks/common/help-paths', [
583    'applinks/lib/console',
584    'applinks/lib/wrm',
585    'applinks/lib/lodash',
586    'applinks/common/modules',
587    'applinks/common/preconditions'
588], function(
589    console,
590    WRM,
591    _,
592    ApplinksModules,
593    Preconditions
594) {
595    // NOTE: should be moved to applinks/feature/help-link, see APLDEV-593
596
597    // lazy-load help paths, facilitates unit-testing
598    var allHelpPaths = _.memoize(function() {
599        var helpPaths = WRM.data.claim(ApplinksModules.dataFqn(ApplinksModules.COMMON_EXPORTED, 'applinks-help-paths'));
600        if (!helpPaths.entries) {
601            console.warn('Help paths not found, all help links are likely to be broken.');
602        }
603        return helpPaths.entries || {};
604    });
605
606    var getPath = function(key, sectionKey) {
607        Preconditions.nonEmptyString(key, 'key');
608        var path = allHelpPaths()[key] || key;
609        if (sectionKey) {
610            Preconditions.nonEmptyString(sectionKey, 'sectionKey');
611            var prefix = path.replace(/\+/g, ''); // "g" flag to remove _all_ '+' signs
612            path += '#' +prefix + '-' + sectionKey;
613        }
614        return path;
615    };
616
617    function endsWith(string, suffix) {
618        return string.indexOf(suffix, string.length - suffix.length) !== -1;
619    }
620
621    function addSuffixIfRequired(string, suffix) {
622        return endsWith(string, suffix) ? string : string + suffix;
623    }
624
625    return {
626        /**
627         * @param key {string} key to get the path for
628         * @returns {string} relative help path that can be appended to any relevant docs base URL
629         */
630        getPath: getPath,
631
632        /**
633         * @param key {string} key to get the path for
634         * @param sectionKey {string}
634 optional key of the anchor on the target page
635         * @returns {string} full help path including the base URL
636         */
637        getFullPath: function(key, sectionKey) {
638            var baseUrl = this.baseUrl();
639            return addSuffixIfRequired(baseUrl, '/') + this.getPath(key, sectionKey);
640        },
641
642        /**
643         * @returns {string} configured base URL for the help paths
644         */
645        baseUrl: _.partial(getPath, 'applinks.docs.root')
646    }
647});
648}catch(e){WRMCB(e)};
649;
650try {
651/* module-key = 'com.atlassian.applinks.applinks-plugin:applinks-common-exported', location = 'applinks/internal/common/events.js' */
652define('applinks/common/events', [
653    'applinks/lib/jquery',
654    'applinks/lib/lodash',
655    'applinks/lib/window',
656    'applinks/common/preconditions'
657], function(
658    $,
659    _,
660    window,
661    Preconditions
662) {
663    var PREFIX = 'applinks.event.';
664
665    function applinksEvent(eventId) {
666        return PREFIX + Preconditions.nonEmptyString(eventId, 'eventId');
667    }
668
669    /**
670     * Provides common Applinks event IDs and a simple event system facade API. This is a preferred way to subscribe to
671     * and raise Applinks-specific events as it does not depend on a specific event bus or event target (such as
672     * `document`), as well as facilitates unit testing.
673     */
674    return {
675        PREREADY: applinksEvent('preready'),
676        READY: applinksEvent('ready'),
677
678        /**
679         * Raised when applinks list is first loaded
680         */
681        APPLINKS_LOADED: applinksEvent('loaded'),
682        /**
683         * Raised when applinks list is updated
684         */
685        APPLINKS_UPDATED: applinksEvent('updated'),
686
687        /**
688         * This event is only raised when linking to Atlassian applications
689         * Can be consumed by other plugins
690         */
691        NEW_APPLINK_CREATED: applinksEvent('created'),
692
693        /**
694         * Raised when orphaned upgrade operation succeeds in creating a new Applink from the orphaned relationship
695         */
696        ORPHANED_UPGRADE: applinksEvent('orphaned.upgrade'),
697
698        /**
699         * Raised when v3 onboarding has finished or, or has never run on the current page (and won't).
700         */
701        V3_ONBOARDING_FINISHED: applinksEvent('v3-onboarding-finished'),
702
703        // legacy events
704        Legacy: {
705            MESSAGE_BOX_DISPLAYED: applinksEvent('message-box-displayed')
706        },
707
708        applinksEvent: applinksEvent,
709
710        on: function(events, handler, context) {
711            var handlerWithContext = context ? _.bind(handler, context) : handler;
712            $(window.document).on(events, handlerWithContext);
713        },
714
715        off: function(events, handler) {
716            $(window.document).off(events, handler);
717        },
718
719        trigger: function(event, data) {
720            $(window.document).trigger(event, data);
721        }
722    }
723});
724}catch(e){WRMCB(e)};
725;
726try {
727/* module-key = 'com.atlassian.applinks.applinks-plugin:applinks-common-exported', location = 'applinks/internal/common/i18n.js' */
728define('applinks/common/i18n', [
729    'applinks/lib/lodash',
730    'applinks/lib/jquery',
731    'applinks/lib/wrm',
732    'applinks/common/modules',
733    'applinks/common/preconditions',
734    'applinks/common/products'
735], function(
736    _,
737    $,
738    WRM,
739    ApplinksModules,
740    Preconditions,
741    ApplinksProducts
742) {
743    var getAllEntityTypes = _.memoize(function() {
744        var val = WRM.data.claim(ApplinksModules.dataFqn(ApplinksModules.COMMON_EXPORTED, 'entity-types'));
745        return Preconditions.hasValue(val, 'entity-types', 'Entity Types data not found');
746    });
747
748    var getAllAuthTypes = _.memoize(function() {
749        var val = WRM.data.claim(ApplinksModules.dataFqn(ApplinksModules.COMMON_EXPORTED, 'authentication-types'));
750        return Preconditions.hasValue(val, 'authentication-types', 'Authentication Types data not found');
751    });
752
753    return {
754        
755        /**
756         * @param typeId ID of the application type to resolve
757         * @returns {string} resolved i18n-ed type name, or the original `typeId` if there is no mapping
758         */
759        getApplicationTypeName: function(typeId) {
760            return ApplinksProducts.getTypeName(typeId);
761        },
762
763        /**
764         * @param typeId ID of the entity type to resolve
765         * @returns {string}
765 resolved i18n-ed singular entity type name, or the original `typeId` if there is no mapping
766         */
767        getEntityTypeName: function(typeId) {
768            return getAllEntityTypes().singular[typeId] || typeId;
769        },
770
771        /**
772         * @param typeId ID of the entity type to resolve
773         * @returns {string} resolved i18n-ed plural entity type name, or the original `typeId` if there is no mapping
774         */
775        getPluralizedEntityTypeName: function(typeId) {
776            return getAllEntityTypes().plural[typeId] || typeId;
777        },
778
779        /**
780         * @param type ID of the authentication type to resolve (usually in a form of full class name)
781         * @returns {string} resolved i18n-ed authentication type name, or the original `type` if there is no mapping
782         */
783        getAuthenticationTypeName: function(type) {
784            return getAllAuthTypes()[type] || type;
785        }
786    };
787});
788
789}catch(e){WRMCB(e)};
790;
791try {
792/* module-key = 'com.atlassian.applinks.applinks-plugin:applinks-common-exported', location = 'applinks/internal/common/modules.js' */
793/**
794 * Applinks plugin modules core constants and definitions.
795 */
796define('applinks/common/modules', function() {
797    return {
798        /**
799         * Applinks plugin key
800         */
801        PLUGIN_KEY: 'com.atlassian.applinks.applinks-plugin',
802
803        // key web resource keys
804        COMMON_EXPORTED: 'applinks-common-exported',
805        COMMON: 'applinks-common',
806
807        /**
808         * Fully qualifies a module name using the plugin key.
809         *
810         * @param {string} moduleName module name to qualify
811         * @returns {string} fully qualified name
812         */
813        fqn: function(moduleName) {
814            return this.PLUGIN_KEY + ':' + moduleName;
815        },
816
817        /**
818         * Fully qualifies web-resource data using module name and data key.
819         *
820         * @param {string} moduleName module name
821         * @param {string} dataKey key of the data element
822         * @returns {string} fully qualified name
823         */
824        dataFqn: function(moduleName, dataKey) {
825            return this.fqn(moduleName) + '.' + dataKey;
826        }
827    };
828});
829}catch(e){WRMCB(e)};
830;
831try {
832/* module-key = 'com.atlassian.applinks.applinks-plugin:applinks-common-exported', location = 'applinks/internal/common/preconditions.js' */
833define('applinks/common/preconditions', [
834    'applinks/lib/lodash'
835], function(
836    _
837) {
838    function nonEmptyString(value, varName, customMessage) {
839        return _checkArgument(
840            _.isString(value) && !_.isEmpty(value),
841            customMessage,
842            _withVarName(varName, ': expected a non-empty string, was: <' + value + '>'),
843            value
844        );
845    }
846
847    function isFunction(value, varName, customMessage) {
848        return _checkArgument(
849            _.isFunction(value),
850            customMessage,
851            _withVarName(varName, ': expected a function, was: ' + value),
852            value
853        );
854    }
855
856    function isArray(value, varName, customMessage) {
857        return _checkArgument(
858            _.isArray(value),
859            customMessage,
860            _withVarName(varName, ': expected an array, was: ' + value),
861            value
862        );
863    }
864
865    function hasValue(value, varName, customMessage) {
866        return _checkArgument(
867            value,
868            customMessage,
869            _withVarName(varName, ': expected a value'),
870            value
871        );
872    }
873
874    function _checkArgument(test, message, defaultMessage, actualValue) {
875        var actualMessage = message ? message : defaultMessage;
876        if (!test) {
877            throw new Error(actualMessage)
878        }
879        return actualValue || test;
880    }
881
882    function _withVarName(varName, msg) {
883        return (varName || '[unspecified]') + msg;
884    }
885
886    return {
887        // applinks support 1.5.2+ underscore and its lodash counterparts
888        // _.partial works differently in [email protected] vs its newer and underscore versions
889        //  thus replacing _.partial with vanilla JS for full compatibility
890        checkArgument: function(test, message, actualValue) {
891            return _checkArgument(test, message, '', actualValue);
892        },
893        nonEmptyString: nonEmptyString,
894        isArray: isArray,
895        isFunction: isFunction,
896        hasValue: hasValue
897    };
898});
899}catch(e){WRMCB(e)};
900;
901try {
902/* module-key = 'com.atlassian.applinks.applinks-plugin:applinks-common-exported', location = 'applinks/internal/common/products.js' */
903define('applinks/common/products', [
904    'applinks/lib/lodash',
905    'applinks/lib/wrm',
906    'applinks/common/modules',
907    'applinks/common/preconditions'
908], function(
909    _,
910    WRM,
911    ApplinksModules,
912    Preconditions
913) {
914    var getAllTypes = _.memoize(function() {
915        var val = WRM.data.claim(ApplinksModules.dataFqn(ApplinksModules.COMMON_EXPORTED, 'applinks-types'));
916        return Preconditions.hasValue(val, 'types', 'Application Types data not found');
917    });
918
919    /**
920     * @param typeId ID of the application type to resolve
921     * @returns {string} resolved i18n-ed type name, or the original `typeId` if there is no mapping
922     */
923    function getTypeName(typeId) {
924        return getAllTypes()[typeId] || typeId;
925    }
926
927    /**
928     * Map of Atlassian product keys to application type IDs
929     */
930    return {
931        BAMBOO: 'bamboo',
932        BITBUCKET: 'stash', // special case, see java class com.atlassian.applinks.application.bitbucket.BitbucketApplicationTypeImpl.TYPE_ID
933        CONFLUENCE: 'confluence',
934        FECRU: 'fecru',
935        JIRA: 'jira',
936        REFAPP: 'refapp',
937        STASH: 'stash',
938        getTypeName: getTypeName
939    };
940});
941}catch(e){WRMCB(e)};
942;
943try {
944/* module-key = 'com.atlassian.auiplugin:split_aui.core', location = 'aui.chunk.fca78a290db0d989e277--0fe9b92c5d8bc51f1e33.js' */
945(window.__auiJsonp=window.__auiJsonp||[]).push([["aui.core"],[],[["7KGX","runtime","aui.splitchunk.0d131bcbf1","aui.splitchunk.444efc83be","aui.splitchunk.739b9ec8cc","aui.splitchunk.994e478d48","aui.splitchunk.479fe6ee76","aui.splitchunk.2e16019fb9","aui.splitchunk.8771ceac91","aui.splitchunk.7873ba9060","aui.splitchunk.0fc208f3fe","aui.splitchunk.2a34183e72"]]]);
946}catch(e){WRMCB(e)};
947;
948try {
949/* module-key = 'com.atlassian.applinks.applinks-plugin:applinks-util-js', location = 'applinks/internal/non-amd/rest-service.js' */
950// NOTE: this is used outside of Applinks. See atlassian-plugin.xml for more details about the associated restrictions
951
952(function(AppLinksI18n, ApplinksDocs, ApplinksEvents) {
953    var $ = AJS.$;
954
955    /**
956     * The triggering of AppLinks initialisation can be customised by setting a function on
957     * AJS.AppLinksInitialisationBinder. The binder function should take a single argument which is a zero-arg function to
958     * run and should execute this function when appropriate.
959     */
960    AppLinks = $.extend(window.AppLinks || {}, {
961        Event: {
962            NAMESPACE: 'applinks'
963        },
964        I18n: AppLinksI18n,
965        Docs: ApplinksDocs
966    });
967    AppLinks.Event = $.extend(window.AppLinks.Event, ApplinksEvents);
968
969    // Is there an overridden initialisation binder?
970    if (AJS.AppLinksInitialisationBinder) {
971        AppLinks.initialisationBinder = AJS.AppLinksInitialisationBinder;
972    } else {
973        // The default bind if no specific binder is specified
974        AppLinks.initialisationBinder = function(f) {
975            AJS.toInit(f);
976        }
977    }
978
979    function parseJsonResponse(xhr) {
980        var respJSON = xhr.responseText;
981        var respObj;
982        try {
983            respObj = JSON.parse(respJSON);
984        } catch (e) {
985            console && console.error && console.error('invalid JSON response', respJSON, xhr);
986        }
987        return respObj || {};
988    }
989
990    var restUrlVersionMatch = new RegExp('rest/applinks(?:.*?)/(\\d\\.\\d|\\d)/');
991    /**
992     * Determine the REST endpoint version of a given URL.
993     * @param url
994     */
995    function versionOf(url) {
996        var results = restUrlVersionMatch.exec(url);
997        return results && results.length === 2 ? results[1] : false;
998    }
999
1000    AppLinks.initialisationBinder(function() {
1001        AppLinks = $.extend(window.AppLinks || {}, {
1002            failure: function(data) {
1003                if (data.status == 401) {
1004                    window.location.reload();
1005                } else {
1006                    var message = AppLinks.parseError(data);
1007                    var errorDivs = $('.page-error');
1008
1009                    if (errorDivs.length > 0) {
1010                        errorDivs.html(message).fadeIn('slow');
1011                    } else {
1012                        alert('REST request failed: ' + message);
1013                    }
1014                }
1015            },
1016            jsonRequest: function(url, type, data, success, error, beforeSend) {
1017                if (data) {
1018                    data = JSON.stringify(data);
1019                }
1020                $(".page-error").fadeOut('fast');
1021                if (!error) error = AppLinks.failure;
1022                return jQuery.ajax({
1023                    url: url,
1024                    type: type,
1025                    data: data,
1026                    dataType: 'json',
1027                    contentType: "application/json; charset=utf-8",
1028                    beforeSend: beforeSend,
1029                    cache: false,
1030                    success: success,
1031                    error: error,
1032                    jsonp: false
1033                });
1034            },
1035            xmlRequest: function(url, type, data, success, error, beforeSend) {
1036                if (data) {
1037                    data = JSON.stringify(data);
1038                }
1039                $(".page-error").fadeOut('fast');
1040                if (!error) error = AppLinks.failure;
1041                return jQuery.ajax({
1042                    url: url,
1043                    type: type,
1044                    data: data,
1045                    dataType: 'xml',
1046                    contentType: "application/xml; charset=utf-8",
1047                    beforeSend: beforeSend,
1048                    cache: false,
1049                    success: success,
1050                    error: error
1051                });
1052            },
1053            parseError: function(errorData) {
1054                var error = parseJsonResponse(errorData);
1055                var message = error && error.message;
1056                if (message) {
1057                    return $.isArray(message) ? message.join(' ') : message;
1058                }
1059                if (errorData) {
1060                    return errorData.statusText ? errorData.statusText : errorData;
1061                }
1062                return 'An unknown error occurred. Check the console logs for details.';
1063            },
1064            put: function(url, data, success, error, beforeSend) {
1065                return AppLinks.jsonRequest(url, 'PUT', data, success, error, beforeSend);
1066            },
1067            post: function(url, data, success, error, beforeSend) {
1068                return AppLinks.jsonRequest(url, 'POST', data, success, error, beforeSend);
1069            },
1070            update: function(data, success, error, beforeSend) {
1071                var selfLink = AppLinks.self_link(data);
1072                /**
1073                 * Adapt to the version of the endpoint and the HTTP verb it uses.
1074                 * yes, this is not "REST-ful". The verb is wrong. It has been wrong since 2014.
1075                 * It is simpler to adapt than it is to release a new endpoint.
1076                 */
1077                var restMethod = versionOf(selfLink) === '1.0' ? AppLinks.put : AppLinks.post;
1078                restMethod(selfLink, data, success, error, beforeSend);
1079            },
1080            get: function(url, success, error, beforeSend) {
1081                return AppLinks.jsonRequest(url, 'GET', null, success, error, beforeSend);
1082            },
1083            getXml: function(url, success, error, beforeSend) {
1084                return AppLinks.xmlRequest(url, 'GET', null, success, error, beforeSend);
1085            },
1086            self_link: function(item) {
1087                for (var i = 0, _i = item.link.length; i < _i; i++) {
1088                    var link = item.link[i];
1089                    if (link.rel == "self") return link.href;
1090                }
1091
1092                throw "No self-link found";
1093            },
1094            del: function(urlOrObject, success, error, beforeSend) {
1095                var url;
1096                if (typeof(urlOrObject) == 'string') url = urlOrObject;
1097                else url = AppLinks.self_link(urlOrObject);
1098                return AppLinks.jsonRequest(url, 'DELETE', null, success, error, beforeSend);
1099            },
1100            SPI: $.extend({}, {
1101                API_VERSION: "1.0",
1102                REST_RESOURCE_URL: AJS.contextPath() + "/rest/applinks/",
1103                BASE_URL: AJS.contextPath() + "/rest/applinks/1.0",
1104                OAUTH_REST_RESOURCE_URL: AJS.contextPath() + "/rest/applinks-oauth/",
1105                OAUTH_BASE_URL: AJS.contextPath() + "/rest/applinks-oauth/1.0",
1106
1107                /**
1108                 * Update the API version and associated urls.
1109                 * @param version
1110                 */
1111                setApiVersion: function(version){
1112                    AppLinks.SPI.API_VERSION = version;
1113                    AppLinks.SPI.setBaseUrl(AppLinks.SPI.REST_RESOURCE_URL + AppLinks.SPI.API_VERSION);
1114                },
1115                setBaseUrl: function(url){
1116                    AppLinks.SPI.BASE_URL = url;
1117                },
1118                setOAuthBaseUrl: function(url){
1119                    AppLinks.SPI.OAUTH_BASE_URL = url;
1120                },
1121                /**
1122                 * Build a base URL for rest calls using the specified baseUrl.
1123                 * @param baseUrl
1124                 * @returns {string}
1125                 */
1126                getRemoteRestBaseUrl: function(baseUrl) {
1127                    return baseUrl + "/rest/applinks/" + AppLinks.SPI.API_VERSION;
1128                },
1129                /**
1130                 * Build a base URL for plugin servlet calls using the specified baseUrl.
1131                 * @param baseUrl
1132                 * @returns {string}
1133                 */
1134                getRemotePluginServletBaseUrl: function(baseUrl) {
1135                    return baseUrl + "/plugins/servlet";
1136                },
1137                getAllLinks: function(success, failure) {
1138                    var url = AppLinks.SPI.BASE_URL + "/applicationlink";
1139                    return AppLinks.get(url, success, failure);
1140                },
1141                getAllLinksWithAuthInfo: function(success, failure) {
1142                    var url = AppLinks.SPI.BASE_URL + "/listApplicationlinks";
1143                    return AppLinks.get(url, success, failure);
1144                },
1145                getApplicationLinkState: function(id, success, failure) {
1146                    var url = AppLinks.SPI.BASE_URL + "/listApplicationlinkstates/id/" + id;
1147                    return AppLinks.get(url, success, failure);
1148                },
1149                getLinksOfType: function(typeId, success, failure) {
1150                    var url = AppLinks.SPI.BASE_URL + "/applicationlink/type/" + typeId;
1151                    return AppLinks.get(url, success, failure);
1152                },
1153                tryToFetchManifest: function(url, success, failure) {
1154                    var restUrl = AppLinks.SPI.BASE_URL + '/applicationlinkForm/manifest.json?url=' + encodeURIComponent(url);
1155                    return AppLinks.get(restUrl, success, failure, function(jqxhr) {
1156                        jqxhr.setRequestHeader("X-Atlassian-Token", "no-check");
1157                    });
1158                },
1159                getManifestFor: function(id, success, failure) {
1160                    var url = AppLinks.SPI.BASE_URL + '/manifest/' + id + ".json";
1161                    return AppLinks.get(url, success, failure);
1162                },
1163                getLocalManifest: function(success, failure){
1164                    var url = AppLinks.SPI.BASE_URL + '/manifest.json';
1165                    return AppLinks.get(url, success, failure);
1166                },
1167                /**
1168                 * Attempt to get the Manifest of the remote application, via a direct REST call.
1169                 * Requires CORS enabled on the REST resource.
1170                 * @param url
1171                 * @param success
1172                 * @param failure
1173                 * @returns {*}
1174                 */
1175                getRemoteManifest: function(remoteBaseUrl, success, failure){
1176                    var remoteManifestUrl = AppLinks.SPI.getRemoteRestBaseUrl(remoteBaseUrl) + '/manifest.json';
1177                    return AppLinks.get(remoteManifestUrl, success, failure);
1178                },
1179                /**
1180                 * Attempt to get the OAuth Consumer Info of the remote application, via a direct call.
1181                 * Requires CORS enabled on the REST resource.
1182                 * @param url
1183                 * @param success
1184                 * @param failure
1185                 * @returns {*}
1186                 */
1187                getRemoteOAuthConsumerInfo: function(remoteBaseUrl, success, failure){
1188                    var remoteManifestUrl = AppLinks.SPI.getRemotePluginServletBaseUrl(remoteBaseUrl) + '/oauth/consumer-info';
1189                    return AppLinks.getXml(remoteManifestUrl, success, failure);
1190                },
1191                getApplinkStatus: function (applinkId, success, failure) {
1192                    var url = AppLinks.SPI.BASE_URL + '/status/' + applinkId;
1193                    return AppLinks.get(url, success, failure);
1194                },
1195                createStaticUrlAppLink: function(applicationType, success, failure) {
1196                    var restUrl = AppLinks.SPI.BASE_URL + '/applicationlinkForm/createStaticUrlAppLink?typeId=' + applicationType;
1197                    return AppLinks.post(restUrl, null, success, failure);
1198                },
1199                createLink: function(applicationLink, username, password, createTwoWayLink, customRpcUrl, rpcUrl, configFormV
1199alues, success, failure) {
1200                    var url = AppLinks.SPI.BASE_URL + '/applicationlinkForm/createAppLink';
1201                    var data = {
1202                        applicationLink: applicationLink,
1203                        username: username,
1204                        password: password,
1205                        createTwoWayLink: createTwoWayLink,
1206                        customRpcURL: customRpcUrl,
1207                        rpcUrl: rpcUrl,
1208                        configFormValues: configFormValues
1209                    };
1210                    return AppLinks.post(url, data, success, failure);
1211                },
1212                createLinkWithOrphanedTrust : function(applicationLink, username, password, createTwoWayLink, customRpcUrl, rpcUrl, configFormValues, orphanedTrust, success, failure) {
1213                    var url = AppLinks.SPI.BASE_URL + '/applicationlinkForm/createAppLink';
1214                    var data = {
1215                        applicationLink: applicationLink,
1216                        username: username,
1217                        password: password,
1218                        createTwoWayLink: createTwoWayLink,
1219                        customRpcURL: customRpcUrl,
1220                        rpcUrl: rpcUrl,
1221                        configFormValues: configFormValues,
1222                        orphanedTrust: orphanedTrust
1223                    };
1224                    return AppLinks.post(url, data, success, failure);
1225                },
1226                verifyTwoWayLinkDetails : function (remoteUrl, rpcUrl, username, password, success, failure) {
1227                    var url = AppLinks.SPI.BASE_URL + '/applicationlinkForm/details';
1228                    var data = {
1229                        username: username,
1230                        password: password,
1231                        remoteUrl: remoteUrl,
1232                        rpcUrl: rpcUrl
1233                    };
1234                    return AppLinks.post(url, data, success, failure);
1235                },
1236                getApplicationLinkInfo: function (appId, success, error) {
1237                    var url = AppLinks.SPI.BASE_URL + "/applicationlinkInfo/id/" + appId;
1238                    return AppLinks.get(url, success, error);
1239                },
1240                deleteLink: function(applicationLink, reciprocate, success, error) {
1241                    var url = AppLinks.SPI.BASE_URL + "/applicationlink/" + applicationLink.id;
1242                    if (reciprocate) url += "?reciprocate=true";
1243                    return AppLinks.del(url, success, error);
1244                },
1245                makePrimary: function(applicationLink, success) {
1246                    var url = AppLinks.SPI.BASE_URL + "/applicationlink/primary/" + applicationLink.id;
1247                    return AppLinks.post(url, null, success);
1248                },
1249                relocate: function(applicationLink, newUrl, suppressWarnings, success, error) {
1250                    var url = AppLinks.SPI.BASE_URL + "/relocateApplicationlink/" + applicationLink.id + "?newUrl=" + encodeURIComponent(newUrl) +
1251                        "&nowarning=" + (suppressWarnings ? "true" : "false");
1252                    return AppLinks.post(url, null, success, error);
1253                },
1254                legacyUpgrade: function(applicationLink, success, error) {
1255                    var url = AppLinks.SPI.BASE_URL + "/upgrade/legacy/" + applicationLink.id;
1256                    return AppLinks.post(url, null, success, error);
1257                },
1258                ualUpgrade: function(applicationLink, body, success, error) {
1259                    var url = AppLinks.SPI.BASE_URL + "/upgrade/ual/" + applicationLink.id;
1260                    return AppLinks.post(url, body, success, error);
1261                },
1262                getEntityTypesForApplicationType: function(applicationType, success, error) {
1263                    var url = AppLinks.SPI.BASE_URL + "/type/entity/" + applicationType;
1264                    return AppLinks.get(url, success, error);
1265                },
1266                getLocalEntitiesWithLinksToApplication: function(applicationLinkId, success, error) {
1267                    var url = AppLinks.SPI.BASE_URL + "/entitylink/localEntitiesWithLinksTo/" + applicationLinkId + ".json";
1268                    return AppLinks.get(url, success, error);
1269                },
1270                getEntityLinksForApplication: function(applicationLinkId, success, error) {
1271                    var url = AppLinks.SPI.BASE_URL + "/entities/" + applicationLinkId + ".json";
1272                    AppLinks.get(url, success, error);
1273                },
1274                getEntityLinksForApplicationUsingAnonymousAccess: function(applicationLinkId, success, error) {
1275                    var url = AppLinks.SPI.BASE_URL + "/entities/anonymous/" + applicationLinkId + ".json";
1276                    return AppLinks.get(url, success, error);
1277                },
1278                createNonUalEntityLink: function(localType, localKey, applicationId, remoteTypeId, remoteKey, name, success, error) {
1279                    var url = AppLinks.SPI.BASE_URL + "/entitylink/" + localType + "/" + localKey + "?reciprocate=false";
1280                    var data = {
1281                        applicationId: applicationId,
1282                        typeId: remoteTypeId,
1283                        key: remoteKey,
1284                        name: name,
1285                        isPrimary: false
1286                    };
1287                    return AppLinks.put(url, data, success, error);
1288                },
1289                createEntityLink: function(localType, localKey, entity, reciprocate, success, failure) {
1290                    var url = AppLinks.SPI.BASE_URL + "/entitylink/" + localType + "/" 
1290+ localKey + "?reciprocate=";
1291                    url += (reciprocate ? "true" : "false");
1292                    return AppLinks.put(url, entity, success, failure);
1293                },
1294                getConfiguredEntityLinks: function(localType, localKey, success, error) {
1295                    var url = AppLinks.SPI.BASE_URL + "/entitylink/primaryLinks/" + localType + "/" + localKey + ".json";
1296                    return AppLinks.get(url, success, error);
1297                },
1298                deleteEntityLink: function(localTypeId, localKey, entity, reciprocate, success, error) {
1299                    var url = AppLinks.SPI.BASE_URL + "/entitylink/" + localTypeId + "/" + localKey + "?typeId=" + entity.typeId + "&key=" + entity.key + "&applicationId=" + entity.applicationId + "&reciprocate=" + reciprocate;
1300                    return AppLinks.del(url, success, error);
1301                },
1302                makePrimaryEntityLink: function(localTypeID, localKey, entity, success, error) {
1303                    var url = AppLinks.SPI.BASE_URL + "/entitylink/primary/" + localTypeID + "/" + localKey + "?typeId=" + entity.typeId + "&key=" + entity.key + "&applicationId=" + entity.applicationId;
1304                    return AppLinks.post(url, null, success, error);
1305                },
1306                canDeleteAppLink: function(applicationId, success, error) {
1307                    var url = AppLinks.SPI.BASE_URL + "/permission/reciprocate-application-delete/" + applicationId;
1308                    return AppLinks.get(url, success, error);
1309                },
1310                canDeleteEntityLink: function(localTypeId, localKey, entity, success, error) {
1311                    var url = AppLinks.SPI.BASE_URL + "/permission/reciprocate-entity-delete/" + entity.applicationId + "/" + localTypeId + "/" + localKey + "/" + entity.typeId + "/" + entity.key;
1312                    return AppLinks.get(url, success, error);
1313                },
1314                canCreateReciprocateEntityLink: function(applicationId, success, error) {
1315                    var url = AppLinks.SPI.BASE_URL + "/permission/reciprocate-entity-create/" + applicationId;
1316                    return AppLinks.get(url, success, error);
1317                },
1318                processPermissionCode: function(settings) {
1319                    var config = {
1320                        noPermission: function() {},
1321                        missing: function() {},
1322                        credentialsRequired: function(authUrl) {},
1323                        authenticationFailed: function(authUrl) {},
1324                        noAuthentication: function(authUrl) {},
1325                        noAuthenticationConfigured: function() {},
1326                        noConnection: function() {},
1327                        allowed: function() {},
1328                        unrecognisedCode: function(code) {},
1329                        updateView: function(message, icon, button) {}
1330                    };
1331
1332                    if (!settings) settings = {};
1333
1334                    settings = $.extend(config, settings);
1335
1336                    return function(data) {
1337                        var code = data.code;
1338                        if (code == "NO_PERMISSION") {
1339                            settings.noPermission();
1340                        } else if (code == "MISSING") {
1341                            settings.missing();
1342                        } else if (code == "CREDENTIALS_REQUIRED") {
1343                            settings.credentialsRequired(data.url);
1344                        } else if (code == "AUTHENTICATION_FAILED") {
1345                            settings.authenticationFailed(data.url);
1346                        } else if (code == "NO_AUTHENTICATION") {
1347                            settings.noAuthentication(data.url);
1348                        } else if (code == "NO_AUTHENTICATION_CONFIGURED") {
1349                            settings.noAuthenticationConfigured();
1350                        } else if (code == "NO_CONNECTION") {
1351                            settings.noConnection();
1352                        } else if (code == "ALLOWED") {
1353                            settings.allowed();
1354                        } else {
1355                            settings.unrecognisedCode(data.code);
1356                        }
1357                    };
1358                },
1359                addAuthenticationTrigger: function(target, authUrl, callbacks) {
1360                    if (!callbacks) {
1361                        callbacks = {};
1362                    }
1363
1364                    if (typeof callbacks.onSuccess == "undefined") {
1365                        callbacks.onSuccess = function() {
1366                            location.reload();
1367                        }
1368                    }
1369
1370                    if (typeof callbacks.onFailure == "undefined") {
1371                        callbacks.onFailure = function() {
1372                            return true;
1373                        }
1374                    }
1375                    //Unbind previous click listener, otherwise we might end up opening multiple windows.
1376                    $(target).off('click.applinks');
1377                    $(target).on('click.applinks', function() {
1378                        if (callbacks.before) {
1379                            callbacks.before();
1380                        }
1381                        AppLinks.authenticateRemoteCredentials(authUrl, callbacks.onSuccess, callbacks.onFailure);
1382                    });
1383                },
1384                deleteOrphanedTrust: function(id, type, success, error) {
1385                    var url = AppLinks.SPI.BASE_URL + "/orphaned-trust/" + type + "/" + id;
1386                    return AppLinks.del(url, success, error);
1387                },
1388                getOrphanedTrust: function(success, error) {
1389                    var url = AppLinks.SPI.BASE_URL + "/orphaned-trust/";
1390                    return AppLinks.get(url, success, error);
1391                },
1392                showCreateEntityLinkSuggestion: function() {
1393                    return true;
1394                },
1395                getApplicationLink: function(id, success, failure) {
1396                    var url = AppLinks.SPI.BASE_URL + '/applicationlink/' + id;
1397                    return AppLinks.get(url, success, failure);
1398                },
1399                createApplicationLink: function(id, name, rpcUrl, displayUrl, typeId, success, failure) {
1400                    var url = AppLinks.SPI.BASE_URL + '/applicationlink';
1401                    var data = {
1402                        id: id,
1403                        name: name,
1404                        rpcUrl: rpcUrl,
1405                        displayUrl: displayUrl,
1406                        typeId: typeId
1407                    };
1408                    return AppLinks.put(url, data, success, failure);
1409                },
1410// TODO APLDEV-3 extract OAuth creation code into OAuth specific js files in the Oauth plugin.
1411                createConsumer: function(id, key, name, description, sharedSecret, publicKey, twoLOAllowed, executingTwoLOUser, twoLOImpersonationAllowed, outgoing, success, failure) {
1412                    var url = AppLinks.SPI.OAUTH_BASE_URL + '/applicationlink/' + id + '/authentication/consumer';
1413                    var data = {
1414                        key: key,
1415                        name: name,
1416                        description: description,
1417                        sharedSecret: sharedSecret,
1418                        publicKey: publicKey,
1419                        outgoing: outgoing,
1420                        twoLOAllowed: twoLOAllowed,
1421                        executingTwoLOUser: executingTwoLOUser,
1422                        twoLOImpersonationAllowed: twoLOImpersonationAllowed
1423                    };
1424                    return AppLinks.put(url, data, success, failure);
1425                },
1426                createConsumerAutoConfigure: function(id, twoLOAllowed, executingTwoLOUser, twoLOImpersonationAllowed, success, failure) {
1427                    var url = AppLinks.SPI.OAUTH_BASE_URL + '/applicationlink/' + id + '/authentication/consumer?autoConfigure=true';
1428                    var data = {
1429                        twoLOAllowed: twoLOAllowed,
1430                        executingTwoLOUser: executingTwoLOUser,
1431                        twoLOImpersonationAllowed: twoLOImpersonationAllowed
1432                    };
1433                    return AppLinks.put(url, data, success, failure);
1434                },
1435                registerProvider: function(id, provider, config, success, failure) {
1436                    var url = AppLinks.SPI.BASE_URL + '/applicationlink/' + id + '/authentication/provider';
1437                    var data = {
1438                        config : config,
1439                        provider : provider
1440                    };
1441                    return AppLinks.put(url, data, success, failure);
1442                },
1443                enableFeature: function(featureName, success, failure) {
1444                    var url = AppLinks.SPI.BASE_URL + '/features/' + featureName;
1445                    return AppLinks.put(url, {}, success, failure);
1446                },
1447                disableFeature: function(featureName, success, failure) {
1448                    var url = AppLinks.SPI.BASE_URL + '/features/' + featureName;
1449                    return AppLinks.del(url, success, failure);
1450                }
1451            }, (window.AppLinks && window.AppLinks.SPI) || {})
1452        });
1453
1454        AppLinks.UI = {
1455            showInfoBox: function(message) {
1456                $('.aui-message.aui-message-success').remove();
1457                AppLinks.UI.createMessage('success', message, 'page-info');
1458            },
1459            hideInfoBox: function() {
1460                $('.aui-message.aui-message-success').remove();
1461            },
1462            showErrorBox: function(message) {
1463                AppLinks.UI.createMessage('error', message, 'page-error');
1464            },
1465            hideErrorBox: function() {
1466                $('.aui-message.aui-message-error').remove();
1467            },
1468            showWarningBox: function(messages) {
1469                if ($.isArray(messages) && messages.length > 0) {
1470                    var ulEl = $("<ul></ul>");
1471                    $(messages).each(function(index) {
1472                        ulEl.append($("<li/>", {
1473                            text: messages[index]
1474                        }));
1475                    });
1476                    var messageEl = $('<div class="page-warning"></div>').append(ulEl);
1477                    AppLinks.UI.createMessage('warning', messageEl.html(), 'page-warning');
1478                } else {
1479                    AppLinks.UI.createMessage('warning', messages, 'page-warning');
1480                }
1481            },
1482            hideWarningBox: function() {
1483                $('.aui-message.aui-message-warning').remove();
1484            },
1485            shortenString: function(message, maxLength) {
1486                if (message.length  > maxLength) {
1487                    message = message.substring(0, maxLength) + "...";
1488                }
1489                return message;
1490            },
1491            createMessage: function(type, message, cssClass) {
1492                var messageEl = $('<div class="' + cssClass + '">');
1493                messageEl.html(message);
1494                AJS.messages[type](".applinks-message-bar", {
1495                    title: "",
1496                    body: messageEl.wrap('<div></div>').parent().html(),
1497                    closeable: true
1498                });
1499                $(document).trigger(AppLinks.Event.Legacy.MESSAGE_BOX_DISPLAYED);
1500            },
1501            displayValidationErrorMessages: function (errorClass, rootEl, messages) {
1502                if ($.isArray(messages)) {
1503                    $(messages).each(function(i,v) {
1504                        var d = $('<div class="error applinks-error">');
1505                        d.text(v);
1506                        $(rootEl).find("." + errorClass).append(d);
1507                    });
1508                } else if(typeof messages != 'undefined'){
1509                    var d = $('<div class="error applinks-error">');
1510                    d.text(messages.toString());
1511                    $(rootEl).find("." + errorClass).append(d);
1512                }
1513            },
1514            displayValidationError: function(errorClass, rootEl, errorFn) {
1515                return function(xhr) {
1516                    if (xhr.status == 401) {
1517                        window.location.reload();
1518                        return;
1519                    }
1520                    $('.applinks-error').remove();
1521                    $('aui-spinner').remove();
1522
1523                    var respObj = parseJsonResponse(xhr);
1524                    var messages = respObj.message;
1525
1526                    if (typeof respObj.fields == "undefined") {
1527                        AppLinks.UI.displayValidationErrorMessages(errorClass, rootEl, messages);
1528                    } else {
1529                        var fields = respObj.fields;
1530                        $(fields).each(function(index) {
1531                            var d = $('<div class="error applinks-error" id="' + fields[index] + '-error">');
1532                            d.text(messages[index]);
1533                            if ($(rootEl).find('.' + fields[index]).length > 0) {
1534                                d.insertAfter($(rootEl).find('.' + fields[index]));
1535                            } else {
1536                                d.insertAfter($(rootEl).find('.' + errorClass).append(d));
1537                            }
1538                        });
1539                    }
1540                    $(rootEl).find('.' + errorClass).addClass("fully-populated-errors");
1541                    if (errorFn) {
1542                        errorFn();
1543                    }
1544                }
1545            },
1546            addProtocolToURL : function(url) {
1547                var newUrl = $.trim(url);
1548                var tempURL = newUrl.toLowerCase();
1549                var hasProtocol = false;
1550                if (tempURL.length >= 7) {
1551                    if (tempURL.substring(0,7).indexOf('http') != -1) {
1552                        hasProtocol = true;
1553                    }
1554                }
1555                //default protocol is http
1556                if (!hasProtocol) {
1557                    newUrl = 'http://' + newUrl;
1558                }
1559                return newUrl;
1560            },
1561            /**
1562             * Similar to the standard Javascript join() method, but nicer in that
1563             * it uses a different delimiter for the last node (by default "and"),
1564             * so that:
1565             * {code}
1566             * "1, 2 and 3" == prettyJoin(['1', '2', '3'], function(value) {return value;});
1567             * {code}
1568             *
1569             * @param inputArray
1570             * @param resolveFn
1571             * @param finalDelimiter
1572             */
1573            prettyJoin : function(inputArray, resolveFn, finalDelimiter) {
1574                if (!finalDelimiter) {
1575                    finalDelimiter = "and";
1576                }
1577                var maxLength = inputArray.length;
1578                var message = "";
1579                $.each(inputArray, function(index, value) {
1580                    if (index == (maxLength - 1) && maxLength > 1) {
1581                        message += " " + finalDelimiter + "  " + resolveFn(value);
1582                    } else {
1583                        message += resolveFn(value);
1584                        if (index + 2 < maxLength) {
1585                            message += ", ";
1586                        }
1587                    }
1588                });
1589                return message;
1590            },
1591            showLoadingIcon: function(element) {
1592                $('<aui-spinner size="small" class="applinks-loading"></aui-spinner>').insertBefore(element);
1593            },
1594            hideLoadingIcon: function(element) {
1595                $(element).prev('aui-spinner').remove();
1596            },
1597            findUrl: function(text) {
1598                var url = undefined;
1599                var lcText = text.toLowerCase();
1600                var startOfUrl = lcText.indexOf('http:');
1601                if (startOfUrl == -1) {
1602                    startOfUrl = lcText.indexOf('https:');
1603                }
1604                if (startOfUrl > -1) {
1605                    var endOfUrl = lcText.indexOf(' ', startOfUrl);
1606                    if (endOfUrl == -1) {
1607                        endOfUrl = lcText.length;
1608                    }
1609                    url = text.substring(startOfUrl, endOfUrl); // use _case-sensitive_ version to retrieve the actual URL
1610                }
1611                return url;
1612            },
1613            findApplicationType : function(id) {
1614                id = id.toLowerCase();
1615                if (id.indexOf("jira") != -1) {
1616                    return "jira";
1617                } else if (id.indexOf("fisheye") != -1) {
1618                    return "fecru";
1619                } else if (id.indexOf("confluence") != -1) {
1620                    return "confluence";
1621                } else if (id.indexOf("refapp") != -1) {
1622                    return "refapp";
1623                } else {
1624                    return undefined;
1625                }
1626            },
1627            escapeSelector: function(selector) {
1628                // based on http://samuelsjoberg.com/archive/2009/09/escape-jquery-selectors
1629                return selector.replace(/([#;&,\.\+\*\~':"\!\^$\[\]\(\)=>\|])/g, "\\$1");
1630            },
1631            sanitiseHTML: function(input) {
1632                var replacements = {
1633                    "<": "&lt;",
1634                    '"': "&quot;",
1635                    "&": "&amp;"
1636                };
1637                return input.replace(/[<"&]/g, function(match) {
1638                    return replacements[match];
1639                });
1640            },
1641            refreshOrphanedTrust: function() {
1642                // post dialog -- check whether we need to remove any orphaned-trust entries
1643                var updateOrphanedTrust = function(data) {
1644                    $("tr.orphaned-trust-row").each(function() {
1645                        var $this = $(this);
1646                        var id = $this.attr("data-id");
1647                        var type = $this.attr("data-type");
1648                        var stillExists = false;
1649                        for (var i = 0; i < data.orphanedTrust.length; i++) {
1650                            var ot = data.orphanedTrust[i];
1651                            if (id == ot.id && type == ot.type) {
1652                                stillExists = true;
1653                                break;
1654                            }
1655                        }
1656                        if (!stillExists) {
1657                            $this.remove();
1658                            if (data.orphanedTrust.length == 0) {
1659                                // we just removed the last orphaned trust cert, hide warning!
1660                                $(".orphaned-trust-warning").hide();
1661                            }
1662                        }
1663                    });
1664                };
1665
1666                AppLinks.SPI.getOrphanedTrust(updateOrphanedTrust);
1667            },
1668            removeCssClass: function(element, prefix) {
1669                $(element).removeClass( function(index, className) {
1670                    var classes = className.split(' ');
1671                    var classToRemove = "";
1672                    $.each(classes, function(index, value) {
1673                        if (value.indexOf(prefix) != -1) {
1674                            classToRemove = value;
1675                        }
1676                    });
1677                    return classToRemove;
1678                } );
1679            }
1680        };
1681
1682        /**
1683         * Add jQuery event system to AppLinks.UI namespace.
1684         */
1685        (function(){
1686            var eventBus = $({});
1687            $.each(['bind', 'unbind', 'trigger'], function(i, current){
1688                AppLinks.UI[current] = function(){
1689                    return eventBus[current].apply(eventBus, arguments);
1690                }
1691            });
1692        })();
1693
1694        $(document).trigger(AppLinks.Event.PREREADY);
1695        $(document).trigger(AppLinks.Event.READY);
1696    });
1697})(require('applinks/common/i18n'), require('applinks/common/docs'), require('applinks/common/events'));
1698
1699}catch(e){WRMCB(e)};
1700;
1701try {
1702/* module-key = 'com.atlassian.applinks.applinks-plugin:applinks-util-js', location = 'applinks/internal/non-amd/autocomplete.js' */
1703// NOTE: this is used outside of Applinks. See atlassian-plugin.xml for more details about the associated restrictions
1704
1705AJS.$(document).bind(AppLinks.Event.READY, function() {
1706/**
1707 * TODO: THIS CODE IS COPIED FROM CONFLUENCE and should be part of AUI/AJS.
1708 * IF AUI comes with the InputDrivenDropDown when can remove this file.
1709 * https://studio.atlassian.com/browse/AJS-471
1710 *
1711 * A simple cache manager that supports a
1712 * FIFO cache invalidation strategy.
1713 *
1714 * @class cacheManager
1715 * @namespace AJS.Confluence
1716 * @constructor
1717 * @param cacheSize the size of the cache before keys are invalidated
1718 */
1719AppLinks.autoComplete = {
1720        cacheManager : function (cacheSize) {
1721    var cache = {},
1722        cacheStack = [],
1723        cacheSize = cacheSize || 30;
1724
1725    return {
1726        /**
1727         * Return the value stored in the cache for the given key
1728         * @method get
1729         * @param key {String}
1730         */
1731        get: function(key) {
1732            return cache[key];
1733        },
1734        /**
1735         * Put the given key, value in the cache
1736         * @method put
1737         * @param key {String}
1738         * @param value {Object}
1739         */
1740        put: function(key, value) {
1741            cache[key] = value;
1742            cacheStack.push(key);
1743            if (cacheStack.length > cacheSize) {
1744                delete cache[cacheStack.shift()];
1745            }
1746        },
1747        /**
1748         * Clear the cache.
1749         */
1750        clear : function() {
1751            cache = {};
1752            cacheStack = [];
1753        }
1754    };
1755}};
1756
1757
1758(function($){
1759    /**
1760     * Check that all items in the drop down can be displayed - show ellipses at the end of any that
1761     * are too long. Also remove any unused properties that the dropDown may have stored for each
1762     * item in the list.
1763     *
1764     * @method truncateText
1765     * @private
1766     */
1767    var truncateText = function (dd) {
1768        AJS.log("InputDrivenDropDown: truncating text");
1769        var width = dd.$.closest(".aui-dropdown").width(),
1770            rightPadding = 20; // add some padding so the ellipsis doesn't run over the edge of the box
1771
1772        $("a span:not(.icon)", dd.$).each(function () {
1773            var $a = $(this),
1774                elpss = $("<var></var>").html("&#8230;"),
1775                elwidth = elpss.width(),
1776                isLong = false;
1777
1778            $a.wrapInner($("<em>"));
1779            $("em", $a).each(function () {
1780                var $label = $(this);
1781
1782                $label.show();
1783                if (this.offsetLeft + this.offsetWidth > width) {
1784                    var childNodes = this.childNodes,
1785                        success = false;
1786
1787                    for (var j = childNodes.length - 1; j >= 0; j--) {
1788                        var childNode = childNodes[j],
1789                            truncatedChars = 1,
1790                            valueAttr = (childNode.nodeType == 3) ? "nodeValue" : "innerHTML",
1791                            nodeText = childNode[valueAttr];
1792
1793                        do {
1794                            if (truncatedChars <= nodeText.length) {
1795                                childNode[valueAttr] = nodeText.substr(0, nodeText.length - truncatedChars++);
1796                            } else { // if we cannot fit even one character of the next word, then try truncating the node just previous to this
1797                                break;
1798                            }
1799                        } while (this.offsetLeft + this.offsetWidth + elwidth > width - rightPadding);
1800
1801                        if (truncatedChars <= nodeText.length) {
1802                            // we've managed truncate part of the word and fit it in
1803                            success = true;
1804                            break;
1805                        }
1806                    }
1807
1808                    if (success) {
1809                        isLong = true;
1810                    } else {
1811                        $label.hide();
1812                    }
1813                }
1814            });
1815            if (isLong) {
1816                $a.append(elpss);
1817                this.elpss = elpss;
1818            }
1819        });
1820    };
1821
1822    var highlightTokens = function(dd, tokens) {
1823        if (!tokens.length || !tokens[0]) return;
1824
1825        AJS.log("InputDrivenDropDown: highlighting tokens");
1826
1827        // escape regex chars .*+?|()[]{}\ first
1828        for (var i = 0, ii = tokens.length; i < ii; i++) {
1829            var token = tokens[i];
1830            tokens[i] = token ? token.replace(/[\.\*\+\?\|\(\)\[\]{}\\]/g, "\\$") : "";
1831        }
1832
1833        var regex = new RegExp("(" + tokens.join("|") + ")", "gi");
1834
1835        $("li a:not(.dropdown-prevent-highlight) span", dd.$).each(function() {
1836            var span = $(this),
1837                html = span.html().replace(regex, "<strong>$1</strong>");
1838            span.html(html);
1839        });
1840    };
1841
1842    /**
1843     * Builds and shows the dropdown.
1844     *
1845     * @param idd the InputDrivenDropdown
1846     * @param dropdownData in the form { matrix, query, queryTokens }
1847     * @private
1848     */
1849    var makeDropdown = function (idd, dropdownData) {
1850        var options = idd.options,
1851            old_dd = idd.dd;
1852
1853        if (old_dd) {
1854            old_dd.hide();
1855            old_dd.$.remove();
1856        }
1857
1858        options.ajsDropDownOptions = options.ajsDropDownOptions || {};
1859        if (options.ajsDropDownOptions && !options.ajsDropDownOptions.alignment) { // default to left alignment
1860            options.ajsDropDownOptions.alignment = "left";
1861        }
1862        //this needs to be moved into aui
1863        options.ajsDropDownOptions.selectionHandler = options.ajsDropDownOptions.selectionHandler || function(e, element) {
1864            if(e.type != "click") {
1865                e.preventDefault();
1866                $("a",element).click();
1867                document.location = $("a",element).attr("href");
1868            }
1869        };
1870
1871        /* Fixing an AUI bug in here:  AJS.dropdown puts the raw 'matrix[i].name' as html, without escaping it !
1872           The solution is to override their displayHandler
1873         */
1874        /**
1875         * Escape obj.name and return it
1876         */
1877        options.ajsDropDownOptions.displayHandler = function (obj) {
1878            return AJS.escapeHtml(obj.name);
1879        }
1880
1881        var dd = idd.dd = new AJS.dropDown(dropdownData.matrix, options.ajsDropDownOptions)[0];
1882
1883        // could move into dropdown.js in AUI
1884        if (options.ajsDropDownOptions && options.ajsDropDownOptions.className) {
1885            dd.$.addClass(options.ajsDropDownOptions.className);
1886        }
1887
1888        // place the created drop down using the configured dropdownPlacement function
1889        // if there is none then use a default behaviour
1890        if (options.dropdownPlacement) {
1891            options.dropdownPlacement(dd.$);
1892        } else {
1893            AJS.log("No dropdownPlacement function specified. Appending dropdown to the body.");
1894            $("body").append(dd.$);
1895        }
1896
1897        highlightTokens(dd, dropdownData.queryTokens || [dropdownData.query]);
1898        truncateText(dd);
1899
1900        if (options.dropdownPostprocess) {
1901            options.dropdownPostprocess(dd.$);
1902        }
1903        dd.show(idd._effect);
1904
1905        if (typeof options.onShow == "function") {
1906            options.onShow.call(dd, dd.$);
1907        }
1908
1909        return dd;
1910    };
1911
1912    /**
1913     * Provides a controller-agnostic object that listens for controller changes and populates a dropdown
1914     * via a callback. Most aspects can be customized via the options object parameter.
1915     * <br>
1916     * Options are:
1917     * <li>
1918     *   getDataAndRunCallback - (required) callback method used to provide data for the dropdown. It must take
1919     *                          two parameters, user input value and the callback function to execute.
1920     * </li>
1921     * <li>
1922     *   onShow - function to call when the drop-down is displayed
1923     * </li>
1924     * <li>
1925     *   dropdownPlacement - a function that will be called with the drop down and which should place it in the
1926     *                          correct place on the page. The supplied arguments are 1) the input that issued the
1927     *                          search, 2) the dropDown to be placed.
1928     * </li>
1929     * <li>
1930     *   ajsDropDownOptions - any options the underlying dropDown component can handle expects
1931     * </li>
1932     * <li>
1933     *   onDeath - callback to run when dropdown dies
1934     * </li>
1935     * @class InputDrivenDropDown
1936     * @namespace AJS
1937     */
1938    function InputDrivenDropDown(id, options) {
1939        this._effect = "appear";
1940        this._timer = null;
1941
1942        this.id = id;
1943        this.options = options;
1944        this.inactive = false;
1945        this.busy = false;
1946        this.cacheManager = AppLinks.autoComplete.cacheManager();
1947    }
1948
1949    /**
1950     * Clears the cache.
1951     */
1952    InputDrivenDropDown.prototype.clearCache = function () {
1953        this.cacheManager.clear();
1954    };
1955
1956    /**
1957     * This method should be called when the user input for this dropdown has changed.
1958     * It will check the cache before fetching data (via options.getDataAndRunCallback)
1959     * and displaying the dropdown.
1960     *
1961     * @param value {String} the new value of the user input
1962     * @param force {Boolean} force a change to occur regardless of user input
1963     */
1964    InputDrivenDropDown.prototype.change = function (value, force) {
1965        var t = this;
1966        if (value != t._value || force) {
1967            t._value = value;
1968            t.busy = false;
1969
1970            clearTimeout(t._timer);
1971
1972            if (force || (/\S{0,}/).test(value)) {
1973                var cachedVal = t.cacheManager.get(value);
1974                if (cachedVal) {
1975                    makeDropdown(t, cachedVal);
1976                } else {
1977                    t.busy = true;
1978                    t._timer = setTimeout(function () { // delay sending a request to give the user a chance to finish typing their search term(s)
1979                        t.options.getDataAndRunCallback.call(t, value, t.show);
1980                    }, 200);
1981                }
1982            } else {
1983                t.dd && t.dd.hide();
1984            }
1985        }
1986    };
1987
1988    /**
1989     * Gets the number of visible options in the dropdown.
1990     */
1991    InputDrivenDropDown.prototype.dropDownLength = function () {
1992        return this.dd.links ? this.dd.links.length : 0;
1993    };
1994    
1995    /**
1996     * Gets the specified menu item from the dropdown list.
1997     * 
1998     * @param index {Integer} the 0-based index of the dropdown option list
1999     */
2000    InputDrivenDropDown.prototype.dropDownItem = function (index) {
2001        return this.dropDownLength() > index ? this.dd.links[index] : null;
2002    };
2003    
2004    /**
2005     * Hides the drop down
2006     */
2007    InputDrivenDropDown.prototype.hide = function () {
2008        this.dd && this.dd.hide();
2009    };
2010
2011    /**
2012     * Hides and removes the drop down from the DOM.
2013     */
2014    InputDrivenDropDown.prototype.remove = function () {
2015        var dd = this.dd;
2016        if (dd) {
2017            this.hide();
2018            dd.$.remove();
2019        }
2020        this.inactive = true;
2021        this.options.onDeath && this.options.onDeath();
2022    };
2023
2024    /**
2025     * Shows the drop down with the given matrix data and query.
2026     * <br>
2027     * Matrix property should be an array of arrays, where the sub-arrays represent the different
2028     * search categories.
2029     *
2030     * Expected properties of category sub-array objects are:
2031     *  - href
2032     *  - name
2033     *  - className
2034     *  - html (optional, replaces href and name)
2035     *  - icon (optional)
2036     *
2037     *
2038     * @param matrix {Array} matrix to populate the drop down from
2039     * @param query {String} the user input string that triggered this show
2040     * @param queryTokens {Array} an array of strings of the query tokens. Use for highlighting search terms.
2041     */
2042    InputDrivenDropDown.prototype.show = function (matrix, query, queryTokens) {
2043        if (this.inactive) {
2044            AJS.log("Quick search abandoned before server response received, ignoring. " + this);
2045            return;
2046        }
2047
2048        var dropdownData = {
2049            matrix: matrix,
2050            query: query,
2051            queryTokens: queryTokens
2052        };
2053        this.cacheManager.put(query, dropdownData);
2054
2055        makeDropdown(this, dropdownData);
2056        this.busy = false;
2057    };
2058
2059    /**
2060     * Returns an InputDrivenDropDown. See InputDrivenDropDown for more documentation.
2061     * @param options {Object} options for the InputDrivenDropDown
2062     * @constructor
2063     */
2064    AppLinks.inputDrivenDropdown = function (options) {
2065        return new InputDrivenDropDown("inputdriven-dropdown", options);
2066    };
2067
2068})(jQuery);
2069});
2070
2071}catch(e){WRMCB(e)};
2072;
2073try {
2074/* module-key = 'com.atlassian.applinks.applinks-plugin:applinks-util-js', location = 'js/fecru-compatibility.js' */
2075if (jQuery != undefined && AJS != undefined) jQuery = AJS.$; // make sure we're extending the correct jQuery
2076}catch(e){WRMCB(e)};
2077;
2078try {
2079/* module-key = 'com.atlassian.applinks.applinks-plugin:feature-oauth-dance', location = 'applinks/internal/feature/oauth/oauth-callback.js' */
2080define('applinks/feature/oauth-callback', [
2081    'applinks/lib/window',
2082    'applinks/lib/lodash',
2083    'applinks/common/preconditions'
2084], function(
2085    window,
2086    _,
2087    Preconditions
2088) {
2089    function OAuthCallback(url) {
2090        Preconditions.nonEmptyString(url, 'url');
2091        this._url = url;
2092    }
2093
2094    OAuthCallback.prototype.source = function(source) {
2095        Preconditions.hasValue(source, 'source');
2096        this._source = source;
2097        return this;
2098    };
2099
2100    OAuthCallback.prototype.onSuccess = function(callback) {
2101        Preconditions.isFunction(callback, 'onSuccess');
2102        this._onSuccess = callback;
2103        return this;
2104    };
2105
2106    OAuthCallback.prototype.onFailure = function(callback) {
2107        Preconditions.isFunction(callback, 'onFailure');
2108        this._onFailure = callback;
2109        return this;
2110    };
2111
2112    // API for OAuth to invoke callbacks
2113    OAuthCallback.prototype.success = function() {
2114        this.oauthWindow.close();
2115        if (this._onSuccess) {
2116            this._onSuccess(this._source);
2117        }
2118        // free up the oauthCallback object
2119        delete window.oauthCallback;
2120    };
2121
2122    OAuthCallback.prototype.failure = function() {
2123        this.oauthWindow.close();
2124        if (this._onFailure) {
2125            this._onFailure(this._source);
2126        }
2127        // free up the oauthCallback object
2128        delete window.oauthCallback;
2129    };
2130
2131    // start the dance
2132    OAuthCallback.prototype.open = function() {
2133        // required for OAuth callbacks to fire
2134        window.oauthCallback = this;
2135        this.oauthWindow = window.open(this._url, 'com_atlassian_applinks_authentication');
2136    };
2137
2138    return OAuthCallback;
2139});
2140}catch(e){WRMCB(e)};
2141;
2142try {
2143/* module-key = 'com.atlassian.applinks.applinks-plugin:feature-oauth-dance', location = 'applinks/internal/feature/oauth/oauth-dance.js' */
2144define('applinks/feature/oauth-dance', [
2145    'applinks/lib/console',
2146    'applinks/lib/jquery',
2147    'applinks/lib/lodash',
2148    'applinks/lib/window',
2149    'applinks/common/events',
2150    'applinks/common/preconditions',
2151    'applinks/feature/oauth-callback'
2152], function(
2153    console,
2154    $,
2155    _,
2156    window,
2157    ApplinksEvents,
2158    Preconditions,
2159    OAuthCallback
2160) {
2161    /**
2162     * Creates a new OAuth Dance. This initializes elements found by `selector` within `scope` to initiate the OAuth
2163     * dance on click. The elements need to have a `data-authorisation-uri` attribute that points to the authorisation
2164     * page to open.
2165     *
2166     * @param scope {string} optional selector for scope, if not defined then global `document` will be used
2167     * @param selector {string} selector for the DOM elements to initialize OAuth dance for. If not defined then scope will be used
2168     * @constructor
2169     */
2170    function OAuthDance(scope, selector) {
2171        this._scope = scope || window.document;
2172        this._selector = selector;
2173    }
2174
2175    OAuthDance.prototype.onSuccess = function(callback) {
2176        Preconditions.isFunction(callback, 'onSuccess');
2177        this._onSuccess = callback;
2178        return this;
2179    };
2180
2181    OAuthDance.prototype.onFailure = function(callback) {
2182        Preconditions.isFunction(callback, 'onFailure');
2183        this._onFailure = callback;
2184        return this;
2185    };
2186
2187    OAuthDance.prototype.defaultSuccess = function() {
2188        return this.onSuccess(function() {
2189            window.location.reload()
2190        });
2191    };
2192
2193    OAuthDance.prototype.defaultFailure = function() {
2194        return this.onFailure(function() { return true });
2195    };
2196
2197    /**
2198     * Wire up click events for the selected elements to initiate OAuth dance.
2199     */
2200    OAuthDance.prototype.initialize = function() {
2201        var that = this;
2202        if (this._selector) {
2203            $(this._scope).on('click', this._selector, function(e) {
2204                e.preventDefault();
2205                that._open($(this));
2206            });
2207        } else {
2208            $(this._scope).on('click', function(e) {
2209                e.preventDefault();
2210                that._open($(this));
2211            });
2212        }
2213    };
2214
2215    /**
2216     * Start the OAuth dance for the given selector/scope.
2217     */
2218    OAuthDance.prototype.start = function() {
2219        var $scope = $(this._scope);
2220        var $element = this._selector ? $scope.find(this._selector) : $scope;
2221        this._open($element);
2222    };
2223
2224    OAuthDance.prototype._open = function(element) {
2225        if (element.length !== 1) {
2226            console.warn('Could not trigger OAuth dance, the source is not a single HTML element: ' + element);
2227            return;
2228        }
2229        
2230        var authorisationUri = element.attr('data-authorisation-uri');
2231
2232        if (authorisationUri) {
2233            this._onSuccess || this.defaultSuccess();
2234            this._onFailure || this.defaultFailure();
2235            new OAuthCallback(authorisationUri)
2236                .source(element)
2237                .onSuccess(this._onSuccess)
2238                .onFailure(this._onFailure)
2239                .open();
2240        } else {
2241            console.warn('Could not trigger OAuth dance, data-authorisation-uri missing for: ' + element);
2242        }
2243    };
2244
2245    return OAuthDance;
2246});
2247}catch(e){WRMCB(e)};
2248;
2249try {
2250/* module-key = 'com.atlassian.applinks.applinks-plugin:applinks-oauth-ui', location = '
2250js/oauth-dialog.js' */
2251// NOTE: this is used outside of Applinks. See atlassian-plugin.xml for more details about the associated restrictions
2252
2253/**
2254 * @deprecated use applinks/feature/oauth-callback and applinks/feature/oauth-dance AMD module
2255 */
2256(function($, ApplinksEvents, OAuthCallback) {
2257    // rest-service.js will load the AppLinks name space
2258    AppLinks.authenticateRemoteCredentials = function (url, onSuccess, onFailure) {
2259        $('.applinks-error').remove();
2260        new OAuthCallback(url).onSuccess(onSuccess).onFailure(onFailure).open();
2261    };
2262})(require('applinks/lib/jquery'), require('applinks/common/events'), require('applinks/feature/oauth-callback'));
2263
2264}catch(e){WRMCB(e)};
2265;
2266try {
2267/* module-key = 'confluence.extra.jira:common', location = 'util/retry-caller.js' */
2268define("confluence/jim/util/retry-caller",["ajs","jquery","underscore"],function(r,d,h){return function(k,a){a=a||{};var l=a.args,m="function"===typeof a.tester?a.tester:function(){return!0},e=a.delays||[.1,.3,.5,.7,1],n=e.length,c=d.Deferred(),p=c.promise(),b=a.context||c,f=0,g=function(){if(f===n)return c.rejectWith(b,[b,"exceed-maximum-called-times",""]);var q=e[f++];h.delay(function(){d.when(k.apply(b,l)).then(function(){c.notify.apply(b,arguments);m.apply(b,arguments)?g():c.resolveWith(b,arguments)},
2269function(){c.rejectWith(b,arguments)})},q)};g();return p}});
2270}catch(e){WRMCB(e)};
2271;
2272try {
2273/* module-key = 'confluence.extra.jira:common', location = 'util/common.js' */
2274AJS.JiraIssues={Remote:{}};var appLinksI18n={entries:{}};
2275jQuery(document).ready(function(){AJS.JiraIssues=jQuery.extend(AJS.JiraIssues||{},{bindOAuthLink:function(a,b){var d=function(){b()},e=function(){},k=a.attr("href");a.click(function(l){AppLinks.authenticateRemoteCredentials(k,d,e);l.preventDefault()})},getOAuthRealm:function(a){a=a.getResponseHeader("WWW-Authenticate")||"";return(a=/OAuth realm="([^"]+)"/.exec(a))?a[1]:null}});jQuery("a.static-oauth-init").each(function(){AJS.JiraIssues.bindOAuthLink(jQuery(this),function(){window.location.reload()})});
2276jQuery("a.anonymous-init").each(function(a,b){a=encodeURIComponent(window.location.pathname.replace(Confluence.getContextPath(),""));a=Confluence.getContextPath()+"/login.action?os_destination\x3d"+a;AJS.$(b).attr("href",a)});var w=function(a){for(var b=AJS.JiraIssues.Remote[a],d="",e=0;e<b.length;e++)d+=b[e].key+(e<b.length-1?",":"");var k=function(c){c="/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery\x3d"+encodeURIComponent("issuekey in ("+c+")")+"\x26returnMax\x3dtrue";return contextPath+
2277"/plugins/servlet/issue-retriever?appId\x3d"+a+"\x26url\x3d"+encodeURIComponent(c)+"\x26columns\x3dsummary\x26columns\x3dtype\x26columns\x3dresolution\x26columns\x3dstatus"},l=function(c){AJS.$("item",c).each(function(){for(var m=AJS.$("link",this).text(),h=AJS.$("key",this).text(),f=AJS.$("summary",this).text(),p=AJS.$("type",this),g="-1"!=AJS.$("resolution",this).attr("id"),v=AJS.$("status",this),r=AJS.$(".unknown-jira-issue."+h),q=0;q<r.length;q++){var t=AJS.$("\x3ca style\x3d\"background-image: url('"+
2278p.attr("iconUrl")+'\')" href\x3d"'+m+'"\x3e\x3c/a\x3e');t.text(h);var u=AJS.$('\x3cspan class\x3d"jira-status"\x3e\x3c/span\x3e');u.text(v.text().toUpperCase());var n=AJS.$('\x3cspan class\x3d"jira-issue'+(g?" resolved":"")+'" \x3e\x3c/span\x3e');n.append(t);n.append(document.createTextNode(" - "+f+" - "));n.append(u);AJS.$(r[q]).replaceWith(n)}})};d=k(d);AJS.$.ajax({url:d,success:l,error:function(c){if(401==c.status){var m=AJS.JiraIssues.getOAuthRealm(c);if(m){var h={};AJS.$(b).each(function(){if(!h[this.key]){h[this.key]=
2279!0;var f=AJS.$('\x3cspan class\x3d"oauth-msg"\x3e - \x3ca class\x3d"oauth-init" href\x3d"'+m+'"\x3e'+"Authenticate"+"\x3c/a\x3e "+"to see issue details"+"\x3c/span\x3e");AJS.$(".unknown-jira-issue."+this.key).addClass("single-issue-oauth").append(f)}});AJS.JiraIssues.bindOAuthLink(AJS.$(".single-issue-oauth a.oauth-init"),function(){window.location.reload()})}}else 400==c.status&&1<b.length&&AJS.$(b).each(function(){var f=this.key,p=k(f);
2280AJS.$.ajax({url:p,success:l,error:function(g){g=AJS.$(".unknown-jira-issue."+f);g.removeClass("single-issue-oauth");AJS.$(".oauth-msg",g).remove();g.addClass("jira-error")}})})}})};AJS.$(".unknown-jira-issue").each(function(a,b){b=AJS.$(b);a=b.attr("data-app-link");b=b.attr("data-key");AJS.JiraIssues.Remote[a]=AJS.JiraIssues.Remote[a]||[];AJS.JiraIssues.Remote[a].push({key:b})});for(var x in AJS.JiraIssues.Remote)w(x)});
2281}catch(e){WRMCB(e)};
2282;
2283try {
2284/* module-key = 'confluence.extra.jira:web-resources', location = 'templates/extra/jira/jiraIssues.js' */
2285jQuery(document).ready(function(){var k=jQuery.extend(window.JiraIssues||{},{ADG_ENABLED:4E3<=AJS.Meta.getNumber("build-number"),ADG_FONT_SIZE_OVER_FLEXIGRID_FONT_SIZE_RATIO:14/11,onSuccessFunction:function(b){if(!jQuery("fieldset input[name\x3d'height']",b).length){var a=jQuery(".bDiv table[id^\x3d'jiraissues_table']",b)[0],c=a.grid;a=a.clientHeight+jQuery(".hDiv",b)[0].clientHeight;jQuery(".bDiv",b).css("height",a+"px");c.options.height=a;c.fixHeight(a)}},onErrorFunction:function(b,a,c,e,d){c=jQuery("#"+
2286a);d=e.getResponseHeader("WWW-Authenticate")||"";if("401"==e.status&&-1!=d.indexOf("OAuth")){if(e=/OAuth realm="([^"]+)"/.exec(d)){c.empty();k.bigMessageFunction(a,'\x3ca class\x3d"oauth-init" href\x3d"'+e[1]+'"\x3e'+"Authenticate"+"\x3c/a\x3e "+"to retrieve your issues"+"\x3c/span\x3e");jQuery(".bmDiv",b).css({"z-index":2});var l=function(){window.location.reload()},h=function(){};a=jQuery(".oauth-init",c.parent());var m=a.attr("href");a.click(function(g){AppLinks.authenticateRemoteCredentials(m,
2287l,h);g.preventDefault()});AJS.$(".gBlock").remove()}}else if("400"==e.status)k.bigMessageFunction(a,"The Jira server was not able to process the search. This may indicate a problem with the syntax of this macro. Alternatively, if this table is requesting specific issue keys, you may 
2287not have permission to view one of these issues.");else{var f=jQuery("iframe.jiraissues_errorMsgSandbox",b);f.load(function(){var g=this.contentWindow||this.contentDocument;g=jQuery((g.document?g.document:g).body);jQuery("a",g).each(function(){this.target="_top"});jQuery(".pPageStat",b).empty().text(g.text());g=jQuery("div.bmDiv",b)[0];f.removeClass("hidden");f.css({height:g.clientHeight+"px",
2288width:g.clientWidth+"px"})});f[0].src=jQuery("fieldset input[name\x3d'retrieverUrlHtml']",b).val();k.bigMessageFunction(a,f)}jQuery(b).find(".pReload").removeClass("loading");c[0].grid.loading=!1;jQuery(b).find(".pButton").each(function(){jQuery(this).removeClass("pBtnOver");jQuery(this).css({cursor:"default",opacity:"0.3"})});jQuery(b).find("span.pcontrol input").attr("readonly","true")},onReloadFunction:function(b,a,c){jQuery(".bmDiv",a).remove();jQuery(".bmDistance",a).remove();c.onSubmit=function(){k.reloadOnSubmitFunction(b,
2289c);return!0}},reloadOnSubmitFunction:function(b,a){a.params=[{name:"useCache",value:!1}];a.onSubmit=function(){k.onSubmitFunction(b,a);return!0}},onSubmitFunction:function(b,a){a.params=[{name:"useCache",value:b}]},showTrustWarningsFunction:function(b,a){b=jQuery(b).children(".trusted_warnings");a.trustedMessage?(b.find("td:last").html(a.trustedMessage),b.css("display","block")):b.css("display","none")},preProcessFunction:function(b,a,c,e,d){c&&k.showTrustWarningsFunction(b,e);0==e.total&&(jQuery(".pPageStat",
2290b).html(d),k.bigMessageFunction(a,d),jQuery(".pReload",b).removeClass("loading"))},bigMessageFunction:function(b,a){var c=jQuery("\x3cdiv\x3e\x3c/div\x3e"),e=jQuery("\x3cdiv\x3e\x3c/div\x3e");c.addClass("bmDistance");e.addClass("bmDiv");"string"==typeof a?e.html("\x3cp\x3e\x3cstrong\x3e"+a+"\x3c/strong\x3e\x3c/p\x3e"):a.appendTo(e);jQuery("#"+b).after(e).after(c)},getParamsFrom:function(b){var a={};b.children("input").each(function(){a[jQuery(this).attr("name")]=jQuery(this).attr("value")});return a},
2291initializeColumnWidth:function(b,a){var c={},e=function(p){return k.ADG_ENABLED?Math.round(p*k.ADG_FONT_SIZE_OVER_FLEXIGRID_FONT_SIZE_RATIO):p};if(!a||!a.length)return c;b=b.width()-(37+11*a.length);for(var d=!1,l=!1,h=0,m=e(140),f=0,g=a.length;f<g;f++){var n=a[f].name;switch(n){case "summary":d=!0;h++;break;case "description":l=!0;h++;break;case "type":h++;c[n]=30;b-=30;break;case "priority":h++;c[n]=50;b-=50;break;case "status":h++;c[n]=e(100);b-=e(100);break;case "key":h++;c[n]=e(90);b-=e(90);
2292break;case "comments":case "attachments":case "version":case "component":case "resolution":h++;c[n]=e(80);b-=e(80);break;default:c[n]=m}}if(d||l)b-=m*(a.length-h),d&&l?(c.summary=Math.max(b/2,250),c.description=Math.max(b/2,250)):d?c.summary=Math.max(b,250):c.description=Math.max(b,250);else if(!d&&!l&&a.length>h)for(m=b/(a.length-h),f=0;f<g;f++)({resolution:!0,key:!0,type:!0,priority:!0,status:!0})[a[f]]||(c[a[f]]=m);return c}});jQuery(".jiraissues_table").each(function(b,a){var c=jQuery(a),e=c.children("fieldset"),
2293d=k.getParamsFrom(e),l="jiraissues_table_"+b;c.append('\x3ctable id\x3d"'+l+'" style\x3d"display:none"\x3e\x3c/table\x3e');c.css("width",d.width);var h=[];e.children(".columns").each(function(f){var g=jQuery(this).hasClass("nowrap");h[f]={display:this.name,name:this.value,nowrap:g,sortable:!0,align:"left"}});var m=k.initializeColumnWidth(c,h);jQuery.each(h,function(f,g){g.width=m[g.name]});b=jQuery("\x3cdiv\x3e\x3c/div\x3e");jQuery("\x3ca\x3e\x3c/a\x3e").attr({rel:"nofollow",href:d.clickableUrl}).text(d.title).appendTo(b);
2294jQuery("#"+l).flexigrid({url:d.retrieverUrlHtml,method:"GET",dataType:"json",colModel:h,sortname:d.sortField,sortorder:d.sortOrder,usepager:!0,title:b.html(),page:parseInt(d.requestedPage,10),useRp:!1,rp:parseInt(d.resultsPerPage,10),showTableToggleBtn:!0,height:d.height?parseInt(d.height,10):480,onSuccess:function(){k.onSuccessFunction(a)},onSubmit:function(){k.onSubmitFunction(d.useCache,this);return!0},preProcess:function(f){k.preProcessFunction(a,l,d.showTrustWarnings,f,d.nomsg);return f},onError:function(f,
2295g,n){k.onErrorFunction(a,l,d.jiraissuesError,f,g,n)},onReload:function(){k.onReloadFunction(d.useCache,a,this);return!0}
2295,errormsg:d.errormsg,pagestat:d.pagestat,procmsg:d.procmsg,nomsg:d.nomsg})});jQuery(".jiraissues_count").each(function(b,a){var c=jQuery(a);jQuery.ajax({cache:!1,type:"GET",url:c.find(".url").text(),data:{useCache:c.find(".use-cache").text(),rp:c.find(".rp").text(),showCount:"true"},success:function(e){var d=c.find(".result");1==e?d.text(AJS.format("{0} issue",
2296e)):d.text(AJS.format("{0} issues",e));d.removeClass("hidden");jQuery(".calculating, .error, .data",c).remove()},error:function(e){var d=jQuery(".error",c).removeClass("hidden"),l=e.getResponseHeader("WWW-Authenticate")||"",h=!1;if(401===e.status&&-1!=l.indexOf("OAuth")){var m=/OAuth realm="([^"]+)"/.exec(l);m&&(d.empty().append(AJS.$("\x3ca/\x3e",{href:m[1],"class":"oauth-init"}).text("Authenticate").click(function(){AppLinks.authenticateRemoteCredentials(m[1],
2297function(){window.location.reload()},function(){});return!1})).append(AJS.$("\x3cspan/\x3e",{text:" "+"to retrieve your issues"})),h=!0)}h||d.text(AJS.format(d.text(),e.status));jQuery(".calculating, .result, .data",c).remove()}})})});
2298}catch(e){WRMCB(e)};
2299;
2300try {
2301/* module-key = 'com.atlassian.auiplugin:split_aui.component.banner', location = 'aui.chunk.07e7e61e3ced6715e722--edc45bba2b1b3cc67618.js' */
2302(window.__auiJsonp=window.__auiJsonp||[]).push([["aui.component.banner"],{vjN3:function(e,n,t){"use strict";t.r(n),t.d(n,"banner",(function(){return b}));t("iRqc"),t("FStl"),t("Q0fs"),t("nqD9");var i=t("+x/D"),u=t("Ioyv"),a=t("TmQU"),c=t("KloK"),r="header";function d(e){var n,t,a,c,r=(t=(n=e).body,a=n.type,c=void 0===a?"error":a,Object(i.default)('<div class="aui-banner" role="banner"></div>').append(i.default.parseHTML(t||"")).addClass(`aui-banner-${c}`));return o().find(".aui-banner").get().forEach((function(e){e.hasAttribute("hidden")&&Object(i.default)(e).remove()})),function(e){var n=o();if(!n.length)throw new Error("You must implement the application header");e.prependTo(n),Object(u.recomputeStyle)(e),e[0].removeAttribute("hidden")}(r),r[0]}function o(){return Object(i.default)("#"+r)}Object(a.default)("aui/banner",d),Object(c.default)("banner",d);var b=d}},[["vjN3","runtime","aui.splitchunk.0d131bcbf1","aui.splitchunk.fbbef27525","aui.splitchunk.444efc83be","aui.splitchunk.739b9ec8cc","aui.splitchunk.056561461c","aui.splitchunk.949297951c","aui.splitchunk.56dfb54d0c","aui.splitchunk.f673ef53ac","aui.splitchunk.8659b532c1","aui.splitchunk.462ee5f9ef"]]]);
2303}catch(e){WRMCB(e)};
2304;
2305try {
2306/* module-key = 'com.atlassian.confluence.plugins.synchrony-interop:synchrony-status-banner-loader', location = '/js/synchrony-down-banner-loader.js' */
2307require(["ajs","wrm","aui/banner","wrm/context-path","confluence/api/event"],function(a,b,c,d,e){a.toInit(function(){!0===b.data.claim("com.atlassian.confluence.plugins.synchrony-interop:synchrony-status-banner-loader.synchrony-status")&&(c({body:"There\u0027s a problem with collaborative editing. People may be unable to save or publish."+'\x26nbsp;\x3ca href\x3d"'+d()+'/admin/confluence-collaborative-editor-plugin/configure.action"\x3e'+"Troubleshoot this problem"+"\x3c/a\x3e"}),e.trigger("confluence.header-resized"))})});
2308}catch(e){WRMCB(e)};
2309;
2310try {
2311/* module-key = 'com.atlassian.confluence.plugins.recently-viewed-plugin:app-resources', location = 'templates/recently.soy' */
2312// This file was automatically generated from recently.soy.
2313// Please don't edit this file by hand.
2314
2315/**
2316 * @fileoverview Templates in namespace RY.Templates.
2317 */
2318
2319if (typeof RY == 'undefined') { var RY = {}; }
2320if (typeof RY.Templates == 'undefined') { RY.Templates = {}; }
2321
2322
2323RY.Templates.body = function(opt_data, opt_ignored) {
2324  return '<div id="recently-viewed" class="aui-group"><div class="aui-item"><div class="top"><div class="filter"><form class="aui"><input class="filter-input text" type="text" placeholder="' + soy.$$escapeHtmlAttribute('Filter') + '"></form></div></div><div class="pages"></div></div></div>';
2325};
2326if (goog.DEBUG) {
2327  RY.Templates.body.soyTemplateName = 'RY.Templates.body';
2328}
2329
2330
2331RY.Templates.pageCollection = function(opt_data, opt_ignored) {
2332  return '<div class="groups"></div><div class="empty"></div>';
2333};
2334if (goog.DEBUG) {
2335  RY.Templates.pageCollection.soyTemplateName = 'RY.Templates.pageCollection';
2336}
2337
2338
2339RY.Templates.pageGroup = function(opt_data, opt_ignored) {
2340  return '<h3>' + soy.$$escapeHtml(opt_data.title) + '</h3><ul></ul>';
2341};
2342if (goog.DEBUG) {
2343  RY.Templates.pageGroup.soyTemplateName = 'RY.Templates.pageGroup';
2344}
2345
2346
2347RY.Templates.pageItem = function(opt_data, opt_ignored) {
2348  return '<a href=' + soy.$$escapeHtmlAttributeNospace(soy.$$filterNormalizeUri(opt_data.href)) + '><div class="page-icon"><span class="aui-icon content-type-' + soy.$$escapeHtmlAttribute(opt_data.type) + '">' + soy.$$escapeHtml(opt_data.type) + '</span></div><div class="page-title"><span class="ellipsis" href=' + soy.$$escapeHtmlAttributeNospace(soy.$$filterNormalizeUri(opt_data.href)) + '>' + soy.$$escapeHtml(opt_data.title) + ' - ' + soy.$$escapeHtml(opt_data.space) + '</span></div></a>';
2349};
2350if (goog.DEBUG) {
2351  RY.Templates.pageItem.soyTemplateName = 'RY.Templates.pageItem';
2352}
2353
2354}catch(e){WRMCB(e)};
2355;
2356try {
2357/* module-key = 'com.atlassian.confluence.plugins.recently-viewed-plugin:app-resources', location = 'js/util.js' */
2358var RY=RY||{};
2359(function(){var b=new Date,h=(new Date(b)).getTime(),k=(new Date(b.getFullYear(),b.getMonth(),b.getDate())).getTime(),l=(new Date(b.getFullYear(),b.getMonth(),b.getDate()-1)).getTime();RY.util=RY.Util={analytics:{trackDialogOpen:function(){AJS.trigger("analytics",{name:"recently-viewed-dialog-open"})},trackPageOpen:function(){AJS.trigger("analytics",{name:"recently-viewed-page-open"})}},quote:function(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},diffInDays:function(a,c){return Math.floor((a-c)/
2360864E5)},daysSince:function(a){return a>=k?0:a>=l?1:RY.util.diffInDays(h,a)},wait:function(a,c,m){var d,e,f,n=function(){e=setTimeout(function(){a.apply(m,f)},c)};return function(){f=arguments;var g=new Date;d&&g-d<c&&clearTimeout(e);n();d=g}}}})();
2361}catch(e){WRMCB(e)};
2362;
2363try {
2364/* module-key = 'com.atlassian.confluence.plugins.recently-viewed-plugin:app-resources', location = 'js/page-storage.js' */
2365var RY=RY||{};
2366RY.RecentPageStorage=function(f){var c={},g=function(){var b=function(a,d){return"lastSeen"===a&&_.isString(d)?(new Date(d)).getTime():d};try{c=JSON.parse(f.getItem("com.atlassian.confluence.plugins.recently.viewed.pages.v1"),b)||{}}catch(a){c={}}return c},h=function(){var b=_.values(c),a=b.length-100;if(0<a){var d=_.sortBy(b,function(e){return e.lastSeen});_.times(a,function(){var e=d.shift();delete c[e.id]})}};this.addCurrentPage=function(b){if(b.id&&b.title){g();var a=c[b.id];a||(c[b.id]=a={});
2367a=_.extend(a,b);a.lastSeen=(new Date).getTime();a.count=a.count+1||1;h();try{f.setItem("com.atlassian.confluence.plugins.recently.viewed.pages.v1",JSON.stringify(c))}catch(d){}}};this.getPages=function(){return _.values(g())}};
2368}catch(e){WRMCB(e)};
2369;
2370try {
2371/* module-key = 'com.atlassian.confluence.plugins.recently-viewed-plugin:app-resources', location = 'js/filter.js' */
2372var RY=RY||{};
2373RY.FilterView=Backbone.View.extend({className:"filter",events:{"input .filter-input":"onInput","keyup .filter-input":"onInput","keydown .filter-input":"onKeydown"},initialize:function(){_.bindAll(this,"render","onInput","onKeydown","search");this.navigationEvents=this.options.navigationEvents;this.onInput=RY.util.wait(this.onInput,100,this)},render:function(){this.$input=this.$(".filter-input");return this},onInput:function(a){a&&_.contains([37,38,39,40],a.which)||this.search()},onKeydown:function(a){switch(a.which){case 13:this.navigationEvents.trigger("select");a.preventDefault();
2374a.stopPropagation();break;case 38:this.navigationEvents.trigger("previous");a.preventDefault();break;case 40:this.navigationEvents.trigger("next"),a.preventDefault()}},search:function(){var a=this.$input.val();this.collection.search(a)}});
2375}catch(e){WRMCB(e)};
2376;
2377try {
2378/* module-key = 'com.atlassian.confluence.plugins.recently-viewed-plugin:app-resources', location = 'js/page-model.js' */
2379var RY=RY||{};
2380(function(){var d="undefined"!=typeof ConfluenceMobile?ConfluenceMobile.AppData.get("confluence-context-path"):AJS.contextPath();RY.Page=Backbone.Model.extend({href:function(){return d+this.get("url")},daysSinceLastSeen:function(){return RY.util.daysSince(this.get("lastSeen"))}});RY.PageCollection=Backbone.Collection.extend({model:RY.Page,url:d+"/rest/recentlyviewed/1.0/recent?includeTrashedContent\x3dtrue",search:function(a){if(0===this._queryLength(a))var c=this.models;else{var e=a.match(/[^\s-]+/g);
2381c=this.filter(function(b){var f=b.get("title");b=b.get("space");var g=(f+b).toLowerCase();return _.all(e,function(h){return-1!==g.indexOf(h.toLowerCase())})})}this.trigger("filter",c,a);return c},_queryLength:function(a){return String.prototype.trim?a.trim().length:AJS.$.trim(a).length},comparator:function(a){return-a.get("lastSeen")}})})();
2382}catch(e){WRMCB(e)};
2383;
2384try {
2385/* module-key = 'com.atlassian.confluence.plugins.recently-viewed-plugin:app-resources', location = '
2385js/page.js' */
2386var RY=RY||{};RY.PageView=Backbone.View.extend({tagName:"li",className:"ry-page",template:RY.Templates.pageItem,initialize:function(){_.bindAll(this,"hide","show","render")},hide:function(){this.$el.hide().removeClass("shown")},show:function(){this.$el.show().addClass("shown")},render:function(){var a=this.model.toJSON();a.href=this.model.href();this.$el.html(this.template(a));return this}});
2387RY.PageGroupView=Backbone.View.extend({className:"group",template:RY.Templates.pageGroup,initialize:function(){_.bindAll(this,"hide","hideAll","show","showBorder","showPages","add","render");this.title=this.options.title;this.modelViews={}},hide:function(){this.$el.hide()},hideAll:function(){this.$el.removeClass("border").hide();_.invoke(_.values(this.modelViews),"hide")},show:function(){this.$el.show()},showBorder:function(){this.$el.addClass("border")},showPages:function(a){var b=this,c=!1;_.each(a,
2388function(f){if(f=b.modelViews[f.cid])c=!0,f.show()});c&&this.show();return c},add:function(a){var b=new RY.PageView({model:a});this.modelViews[a.cid]=b;this.$list.append(b.render().el)},render:function(){this.$el.html(this.template({title:this.title}));this.$list=this.$("ul");return this}});
2389RY.PageNavigator=function(a,b,c){function f(e){pageItems=a.find("li.shown");var g=pageItems.index(pageItems.filter(".highlight"));d&&d.removeClass("highlight");e+=g;0>e&&(e=pageItems.length-1);e>=pageItems.length&&(e=0);d=pageItems.eq(e);d.addClass("highlight")}function h(){if(d.length){var e=b.children(),g=b.height(),l=d.outerHeight(!0),k=d.position().top;0>k?0===a.find("li.shown").index(d)?b.scrollTop(0):b.scrollTop(d.offset().top-e.offset().top):k>g&&b.scrollTop(d.offset().top-e.offset().top-g+
2390l)}}var d=null;c.on("select",function(){if(d&&d.is(":visible")){RY.util.analytics.trackPageOpen();var e=d.find(".page-title span").attr("href");window.location=e}},this);c.on("previous",function(){f(-1);h()},this);c.on("next",function(){f(1);h()},this)};
2391RY.PageCollectionView=Backbone.View.extend({template:RY.Templates.pageCollection,events:{"click .page-title a":RY.util.analytics.trackPageOpen},initialize:function(){_.bindAll(this,"checkEmpty","filter","_groupForPage","addOne","showEmptyMessage","clearEmptyMessage","addAll","render");this.modelViews={};this.collection.on("reset",this.addAll,this);this.collection.on("add",this.addOne,this);this.collection.on("filter",this.filter,this)},checkEmpty:function(a,b){var c=this.collection.isEmpty();a=0===
2392a.length;c||a?(c?b="Sorry mate, looks like you haven\u0027t visited any pages yet.":(b=AJS.contextPath()+"/dosearchsite.action?queryString\x3d"+encodeURIComponent(b),b="We didn\u0027t find any matching pages in your history."+" "+AJS.format("\u003ca href=\u0022{0}\u0022\u003eClick here\u003c/a\u003e to search for this term instead.",b)),this.showEmptyMessage(b)):this.clearEmptyMessage()},filter:function(a,b){this.checkEmpty(a,b||"");b=[this.$today,this.$yesterday,this.$older];_.invoke(b,
2393"hideAll");var c=[];_.each(b,function(f){f.showPages(a)&&c.push(f)});1<c.length&&(c.pop(),_.invoke(c,"showBorder"))},_groupForPage:function(a){a=a.daysSinceLastSeen();return 0===a?this.$today:1===a?this.$yesterday:this.$older},addOne:function(a){this._groupForPage(a).add(a)},showEmptyMessage:function(a){this.$(".empty").html(AJS.$("\x3cp\x3e").html(a))},clearEmptyMessage:function(){this.$(".empty").html("")},addAll:function(){this.collection.each(this.addOne)},render:function(){this.$el.html(this.template());
2394this.$today=new RY.PageGroupView({title:"Today"});this.$yesterday=new RY.PageGroupView({title:"Yesterday"});this.$older=new RY.PageGroupView({title:"Older"});var a=this.$(".groups");a.append(this.$today.render().el);a.append(this.$yesterday.render().el);a.append(this.$older.render().el);
2395_.invoke([this.$today,this.$yesterday,this.$older],"hideAll");return this}});
2396}catch(e){WRMCB(e)};
2397;
2398try {
2399/* module-key = 'com.atlassian.confluence.plugins.recently-viewed-plugin:main-resources', location = 'js/main.js' */
2400var RY=RY||{};
2401AJS.toInit(function(b){b("#view-user-history-link").unbind("click");b("#view-user-history-link").click(function(a){a.preventDefault();a=new AJS.Dialog({width:600,height:500,id:"recently-viewed-dialog",closeOnOutsideClick:!0});var c=b(RY.Templates.body());a.addHeader("Recently viewed pages");
2401a.addPanel("SinglePanel",c);a.addLink("Close",function(d){d.hide()});var g=b("\x3cdiv\x3e",{"class":"dialog-tip"}).text("Hint: type \u0022g\u0022 and then \u0022r\u0022 anywhere to quickly open this menu");
2402a.popup.element.find(".dialog-button-panel").append(g);var e=new RY.PageCollection,f=new RY.PageCollectionView({collection:e});c.find(".pages").html(f.render().el);a.gotoPanel(0);a.show();var h=b("#recently-viewed-dialog").spin("large");e.fetch({success:function(){h.spinStop();var d=_.extend({},Backbone.Events);new RY.PageNavigator(f.$el,c.parent(),d);(new RY.FilterView({collection:e,el:c.find(".filter"),navigationEvents:d})).render().search()}});RY.util.analytics.trackDialogOpen()})});
2403}catch(e){WRMCB(e)};
2404;
2405try {
2406/* module-key = 'com.atlassian.confluence.plugins.confluence-space-ia:spacemenu-resources', location = 'js/space-menu.js' */
2407AJS.toInit(function(a){var c=a(Confluence.Templates.BrowseSpaces.spacesLink());a("#space-directory-link").replaceWith(a(c));var e=function(d){var b=a("#space-menu-link-content");b.html(d.template);AJS&&AJS.Confluence&&AJS.Confluence.Analytics&&AJS.Confluence.Analytics.setAnalyticsSource&&AJS.Confluence.Analytics.setAnalyticsSource(b.find("a"),"spacemenu");a("#create-space-header").click(function(){AJS.trigger("analytics",{name:"create-space-from-header"});Confluence.SpaceBlueprint.Dialog.launch();
2408return!1})};a("#space-menu-link-content").on("aui-dropdown2-show",function(){AJS.trigger("analytics",{name:"open-space-menu"});a("#space-menu-link-content .aui-dropdown2-section")&&a("#space-menu-link-content .aui-dropdown2-section").length||a.ajax({url:Confluence.getContextPath()+"/rest/ia/1.0/spacesmenu",type:"GET",dataType:"json",cache:!1,success:e});return!1})});
2409}catch(e){WRMCB(e)};
2410;
2411try {
2412/* module-key = 'com.atlassian.confluence.plugins.confluence-space-ia:spacemenu-resources', location = 'soy/space-menu.soy' */
2413// This file was automatically generated from space-menu.soy.
2414// Please don't edit this file by hand.
2415
2416/**
2417 * @fileoverview Templates in namespace Confluence.Templates.BrowseSpaces.
2418 */
2419
2420if (typeof Confluence == 'undefined') { var Confluence = {}; }
2421if (typeof Confluence.Templates == 'undefined') { Confluence.Templates = {}; }
2422if (typeof Confluence.Templates.BrowseSpaces == 'undefined') { Confluence.Templates.BrowseSpaces = {}; }
2423
2424
2425Confluence.Templates.BrowseSpaces.spacesLink = function(opt_data, opt_ignored) {
2426  return '' + aui.dropdown2.trigger({menu: {id: 'space-menu-link-content'}, id: 'space-menu-link', tagName: 'a', extraClasses: 'aui-nav-link', title: 'Spaces', showIcon: false, text: 'Spaces'}) + aui.dropdown2.contents({id: 'space-menu-link-content', extraClasses: 'aui-style-default aui-dropdown2-in-header'});
2427};
2428if (goog.DEBUG) {
2429  Confluence.Templates.BrowseSpaces.spacesLink.soyTemplateName = 'Confluence.Templates.BrowseSpaces.spacesLink';
2430}
2431
2432}catch(e){WRMCB(e)};
2433;
2434try {
2435/* module-key = 'com.atlassian.confluence.plugins.confluence-space-ia:space-ia-analytics', location = 'js/space-ia-analytics.js' */
2436(function(f){function d(){var b=f(".acs-side-bar"),a=b.find("a:not(.external_link a, #acs-configure-link)");c(a,"sidebar");a=b.find("[data-collapsed-tooltip\x3d'"+AJS.I18n.getText("Pages")+"']");c(a,"sidebar-pages");a=b.find("[data-collapsed-tooltip\x3d'"+AJS.I18n.getText("Blog")+"']");c(a,"sidebar-blogs");a=b.find(".quick-links-section li:not(.external_link) a");c(a,"spaceshortcut");a=b.find(".ia-secondary-container a:not(.more-children-link)");"pages"==b.find(".ia-secondary-container").data("tree-type")?
2437c(a,"contextnavchildmode"):"page-tree"==b.find(".ia-secondary-container").data("tree-type")?c(a,"contextnavpagetreemode"):c(a,"contextnav")}function e(b){return function(){AJS.trigger("analytics",{name:"space-ia-nav",data:{linkType:b}})}}var c=AJS.Confluence.Analytics.setAnalyticsSource;AJS.toInit(function(b){b(".acs-side-bar").find(".ia-secondary-container .more-children-link").click(e("context-nav.more-children"));AJS.bind("sidebar.exit-configure-mode",d);AJS.bind("sidebar.flyout-triggered",function(a,
2438g){e("flyout-triggered."+g.flyout)()});AJS.bind("pagetree-children-loaded",d);d()})})(AJS.$);
2439}catch(e){WRMCB(e)};
2440;
2441try {
2442/* module-key = 'com.atlassian.confluence.plugins.confluence-feature-discovery-plugin:confluence-feature-discovery-plugin-resources', location = '/js/confluence-feature-discovery-plugin.js' */
2443(function(q){function k(b){void 0===g&&(g=JSON.parse(AJS.Meta.get("discovered-plugin-features")||"{}"));return b?g[b]||[]:g}function m(b,e){b=k(b);for(var d=0,f=b.length;d<f;d++)if(b[d]===e)return!0;return!1}Confluence.FeatureDiscovery={};var g,n=!1,r=WRM.data.claim("com.atlassian.confluence.plugins.confluence-feature-discovery-plugin:confluence-feature-discovery-plugin-resources.test-mode");Confluence.FeatureDiscovery.forPlugin=function(b,e){function d(a){a=parseInt(f.getItem(a),10);return isNaN(a)?
24440:a}var f=Confluence.storageManager("feature-discovery."+b);e=e||3;return{addDiscoveryView:function(a){var c=d(a)+1;f.setItem(a,c)},shouldShow:function(a,c){if(c=!0===c&&r){a:{c="com.atlassian.webdriver.discovery\x3d"+b+":"+a;for(var p=document.cookie.split(";"),l=0;l<p.length;l++){for(var h=p[l];" "===h.charAt(0);)h=h.substring(1);if(-1!==h.indexOf(c)){c=!0;break a}}c=!1}c=!c}return c||n||m(b,a)?!1:d(a)>=e?(this.markDiscovered(a),!1):n=!0},markDiscovered:function(a,c){m(b,a)||AJS.safeAjax({url:AJS.contextPath()+
2445"/rest/feature-discovery/1.0/discovered/"+b+"/"+a,type:"POST",data:{},success:function(){k(b).unshift(a);f.removeItem(a);AJS.trigger("feature-discovered",{pluginKey:b,featureKey:a});c&&q.isFunction(c)&&c()}})},listDiscovered:function(){return k(b).slice(0)}}}})(AJS.$);
2446}catch(e){WRMCB(e)};
2447;
2448try {
2449/* module-key = 'com.atlassian.confluence.plugins.confluence-quicknav:quicknav-resources', location = 'js/quick-nav.js' */
2450define("confluence-quicknav/quick-nav",["jquery","confluence/api/logger"],function(d,n){var g=[],f,h=function(a){return function(b){a.closest("form").find(".quick-nav-drop-down").append(b)}},k=function(a){"undefined"!==typeof a?g.push(a):n.log("WARN: Attempted to add a dropdown post-process function that was undefined.")},p=function(a){d("a",a).each(function(){var b=d(this),c=b.find("span").data("properties");(c=c?c.spaceName:null)&&!b.is(".content-type-spacedesc")&&(b.after(b.clone().attr("class",
2451"space-name").html(c)),b.parent().addClass("with-space-name"))})};
2451return{addDropDownPostProcess:k,setMakeParams:function(a){f=a},init:function(){var a=d("#quick-search-query"),b=h(a),c=d("#space-blog-quick-search-query"),l=d("#confluence-space-key");a.quicksearch("/rest/quicknav/1/search",null,{dropdownPlacement:b,dropdownPostprocess:function(e){d.each(g,function(q,m){m&&m(e)})},makeParams:function(e){return f?f(e):{query:e}},ajsDropDownOptions:{className:"quick-search-dropdown"}});k(p);c.length&&
2452l.length&&c.quicksearch("/rest/quicknav/1/search?type\x3dblogpost\x26spaceKey\x3d"+d("\x3ci\x3e\x3c/i\x3e").html(l.attr("content")).text(),null,{dropdownPlacement:h(c)})}}});require("confluence/module-exporter").exportModuleAsGlobal("confluence-quicknav/quick-nav","Confluence.QuickNav");
2453}catch(e){WRMCB(e)};
2454;
2455try {
2456/* module-key = 'com.atlassian.confluence.plugins.confluence-license-banner:confluence-license-banner-resources', location = '/js/confluence-license-banner.js' */
2457require(["ajs","jquery"],function(c,b){c.toInit(function(){var g=WRM.data.claim("com.atlassian.confluence.plugins.confluence-license-banner:confluence-license-banner-resources.license-details");if(g){var d={destroyBanner:function(){b("#license-banner").slideUp(function(){b("#license-banner").remove()})},remindMeLater:function(){b.ajax({type:"POST",dataType:"json",contentType:"application/json; charset\x3dutf-8",data:JSON.stringify({atl_token:c.Meta.get("atl-token")}),url:c.contextPath()+"/rest/licensebanner/1.0/reminder/later"});
2458d.destroyBanner()},remindMeNever:function(){b.ajax({type:"POST",dataType:"json",contentType:"application/json; charset\x3dutf-8",data:JSON.stringify({atl_token:c.Meta.get("atl-token")}),url:c.contextPath()+"/rest/licensebanner/1.0/reminder/never"});d.destroyBanner()},createBanner:function(a){var f;a.showLicenseExpiryBanner?f=Confluence.Templates.LicenseBanner.expiryBanner({days:a.daysBeforeLicenseExpiry,mac:a.renewUrl,sales:a.salesUrl}):a.showMaintenanceExpiryBanner&&(f=Confluence.Templates.LicenseBanner.maintenanceBanner({days:a.daysBeforeMaintenanceExpiry,
2459mac:a.renewUrl,sales:a.salesUrl}));f&&(a=b(f),b("#full-height-container").prepend(a),b("#license-banner-later").click(function(e){e.preventDefault();d.remindMeLater()}),b("#license-banner-never").click(function(e){e.preventDefault();d.remindMeNever()}),a.find(".aui-message .aui-close-button").click(function(e){e.preventDefault();d.remindMeLater()}))}};d.createBanner(g)}else c.warn("Unable to claim my required data")})});
2460}catch(e){WRMCB(e)};
2461;
2462try {
2463/* module-key = 'com.atlassian.confluence.plugins.confluence-license-banner:confluence-license-banner-resources', location = 'soy/confluence-license-banner.soy' */
2464// This file was automatically generated from confluence-license-banner.soy.
2465// Please don't edit this file by hand.
2466
2467/**
2468 * @fileoverview Templates in namespace Confluence.Templates.LicenseBanner.
2469 */
2470
2471if (typeof Confluence == 'undefined') { var Confluence = {}; }
2472if (typeof Confluence.Templates == 'undefined') { Confluence.Templates = {}; }
2473if (typeof Confluence.Templates.LicenseBanner == 'undefined') { Confluence.Templates.LicenseBanner = {}; }
2474
2475
2476Confluence.Templates.LicenseBanner.wrapper = function(opt_data, opt_ignored) {
2477  return '<div>' + soy.$$filterNoAutoescape(opt_data.contentHTML) + '</div>';
2478};
2479if (goog.DEBUG) {
2480  Confluence.Templates.LicenseBanner.wrapper.soyTemplateName = 'Confluence.Templates.LicenseBanner.wrapper';
2481}
2482
2483
2484Confluence.Templates.LicenseBanner.expiryBanner = function(opt_data, opt_ignored) {
2485  var output = '';
2486  var renewTag__soy8 = '<a id="license-banner-my-link" target="_blank" href="' + soy.$$escapeHtml(opt_data.mac) + '">';
2487  var end__soy12 = '</a>';
2488  var mailTag__soy14 = '<a id="license-banner-sales-link" target="_blank" href="' + soy.$$escapeHtml(opt_data.sales) + '">';
2489  output += Confluence.Templates.LicenseBanner.wrapper({contentHTML: '<div id="license-banner" class="aui-message aui-message-warning closeable"><div id="license-banner-content" data-days="' + soy.$$escapeHtml(opt_data.days) + '" data-subscription="true">' + ((opt_data.days < 0) ? soy.$$filterNoAutoescape(AJS.format('Your subscription has expired. This site is now read-only. To keep using Confluence, {0}renew online{1} or {2}contact us{3}.',renewTag__soy8,end__soy12,mailTag__soy14,end__soy12)) : (opt_data.days == 0) ? soy.$$filterNoAutoescape(AJS.format('Your subscription will expire today and your site will become read-only. To keep using Confluence, {0}renew online{1} or {2}contact us{3}.',renewTag__soy8,end__soy12,mailTag__soy14,end__soy12)) : soy.$$filterNoAutoescape(AJS.format('Your subscription will expire in {0,choice,1#{0} day|1\x3c{0} days}. Your site will become read-only after the expiry. To keep using Confluence, {1}renew online{2} or {3}contact us{4}.',opt_data.days,renewTag__soy8,end__soy12,mailTag__soy14,end__soy12))) + '</div>' + ((opt_data.days > 7) ? '<button type="button" class="aui-close-button" aria-label="Close"></button>' : '') + '</div>'});
2490  return output;
2491};
2492if (goog.DEBUG) {
2493  Confluence.Templates.LicenseBanner.expiryBanner.soyTemplateName = 'Confluence.Templates.LicenseBanner.expiryBanner';
2494}
2495
2496
2497Confluence.Templates.LicenseBanner.maintenanceBanner = function(opt_data, opt_ignored) {
2498  var output = '';
2499  var renewTag__soy39 = '<a id="license-banner-my-link" target="_blank" href="' + soy.$$escapeHtml(opt_data.mac) + '">';
2500  var end__soy43 = '</a>';
2501  var later__soy45 = '<a href="#" id="license-banner-later">';
2502  var never__soy47 = '<a href="#" id="license-banner-never">';
2503  output += Confluence.Templates.LicenseBanner.wrapper({contentHTML: '' + aui.message.warning({content: '<div id="license-banner-content" data-days="' + soy.$$escapeHtml(opt_data.days) + '" data-subscription="false">' + ((opt_data.days < 0) ? soy.$$filterNoAutoescape(AJS.format('You no longer have access Support and Upd
2503ates. {0}Renew online{1}, {2}remind me later{3} or {4}never remind me again{5}.',renewTag__soy39,end__soy43,later__soy45,end__soy43,never__soy47,end__soy43)) : (opt_data.days == 0) ? soy.$$filterNoAutoescape(AJS.format('You will lose access to Support and Updates today. {0}Renew online{1}, {2}remind me later{3} or {4}never remind me again{5}.',renewTag__soy39,end__soy43,later__soy45,end__soy43,never__soy47,end__soy43)) : soy.$$filterNoAutoescape(AJS.format('You will lose access to Support and Updates in {0,choice,1#{0} day|1\x3c{0} days}. {1}Renew online{2}, {3}remind me later{4} or {5}never remind me again{6}.',opt_data.days,renewTag__soy39,end__soy43,later__soy45,end__soy43,never__soy47,end__soy43))) + '</div>', id: 'license-banner'})});
2504  return output;
2505};
2506if (goog.DEBUG) {
2507  Confluence.Templates.LicenseBanner.maintenanceBanner.soyTemplateName = 'Confluence.Templates.LicenseBanner.maintenanceBanner';
2508}
2509
2510}catch(e){WRMCB(e)};
2511;
2512try {
2513/* module-key = 'com.atlassian.plugins.browser.metrics.browser-metrics-plugin:api', location = 'probe.js' */
2514!function(e){"use strict";const t=[],n=()=>t;function r(e){n().unshift({addReporter:e})}function i(e){const t=n();for(;t.length;)e(t.splice(0,1)[0]);t.unshift=e,t.push=e}const o=()=>window,a=()=>o().performance;function s({key:e,entityId:t}){const r=a().now();console.debug("[BM]",e,"Probe.end",{timestamp:r}),n().push({end:{key:e,timestamp:r,entityId:t}})}const c=e=>!e||null==e||"null"===e||"undefined"===e,u=()=>o().document,l=(e,t)=>{var n=u().querySelectorAll(e);return n.length&&(c(t)||Array.prototype.every.call(n,(function(e){return!e.querySelector(t)})))};function f(){this._={}}var d=function(e){var t=e[0],n=e[1];n instanceof f?e.length>=3?Object.keys(n._).forEach((function(r){d([t,n._[r],r].concat(e.slice(2)))})):Object.keys(n._).forEach((function(e){d([t,n._[e],e])})):Array.isArray(n)&&t.apply(null,[n].concat(e.slice(2)))};f.prototype.forEach=function(e){d([e,this])},f.prototype.add=function(){for(var e=this,t=null,n=0;n<arguments.length;n++){if(t=arguments[n],n===arguments.length-1&&Array.isArray(e)){e.push(t);break}n<arguments.length-2&&!e._.hasOwnProperty(t)?e._[t]=new f:n!==arguments.length-2||e._.hasOwnProperty(t)||(e._[t]=[]),e=e._[t]}};var h=function(e,t){if(0!==e.length){var n=e.pop(),r=n[0],i=n[1];r===t?h(e,r):i._.hasOwnProperty(t)&&delete i._[t],0===Object.keys(i).length&&h(e,r)}};let y;f.prototype.remove=function(){for(var e,t=!1,n=null,r=this,i=[[n,r]],o=null,a=0;a<arguments.length;a++)if(o=arguments[a],Array.isArray(r))(e=r.indexOf(o))>-1&&(r.splice(e,1),0===r.length&&i.length>1&&h(i,n),t=!0);else{if(!r._.hasOwnProperty(o))break;a===arguments.length-1&&(delete r._[o],0===Object.keys(r).length&&i.length>1&&h(i,n),t=!0),n=o,r=r._[o],i.push([n,r])}return t},f.prototype.get=function(e){return this._.hasOwnProperty(e)?this._[e]:[]};function p(e,t){var n;e.forEach||(e=[e]),!c(t)&&Array.isArray(t)&&(t=t.join(", "));var r=new Promise((function(r,i){var a=[],s=[];e.forEach((function(e){var n;l(e,t)||(n=new Promise((function(n){const r=(()=>{if(y)return y;var e,t,n=o().MutationObserver,r=!1;return t=new f,e=new n((function(){t.forEach((function(e,n,r){l(r,n)&&(e.forEach((function(e){e()})),t.remove(r,n))}))})),y={addTarget:function(n,i,o){return r||(e.observe(u(),{attributes:!0,childList:!0,subtree:!0}),r=!0),t.add(n,i,o),()=>{t.remove(n,i,o)}}},y})().addTarget(e,t,n);s.push(r)})),a.push(n))}));var c=function(){s.forEach((function(e){e()}))};Promise.all(a).then(c).then(r,i),n=function(){c(),i()}}));return r.dismiss=n,r}var m,b="visibilitychange",v="animationend",w="browser-metrics-visibility-test",g="browser-metrics-visibility-animation",k=function(){var e=u().createElement("style"),t=["."+w+" {","-webkit-animation-duration: 0.001s;","animation-duration: 0.001s;","-webkit-animation-name: "+g+";","animation-name: "+g+";","-webkit-animation-iteration-count: 1;","animation-iteration-count: 1;","}","@keyframes "+g+" {}","@-webkit-keyframes "+g+" {","from {}","to {}","}"].join("\n");e.type="text/css",e.styleSheet?e.styleSheet.cssText=t:e.appendChild(u().createTextNode(t)),u().head.appendChild(e),k=function(){}};function P(){if(m)return m;var e,t,n=!1;function r(){u().body.classList.remove(w),u().removeEventListener(b,t),u().removeEventListener(v,e),m=null}return(m=new Promise((function(r,i){"visible"!==u().visibilityState?i():(t=function(){n=!0},e=function(e){e.animationName===g&&(n?i():r())},u().addEventListener(b,t),u().addEventListener(v,e),k(),u().body.classList.add(w))}))).then(r,r),m}function _(e){var t,n;return t=e,(Array.isArray(t)||"string"==typeof t)&&(e={rules:e}),e.rules=(n=e.rules,Array.isArray(n)||(n=[n]),n.map((function(e){return"string"==typeof e?{selector:e,hasNone:null}:e}))),e.requirePaint=void 0!==e.requirePaint&&e.requirePaint,e}const A=u();let E=!1;switch(A.readyState){case"interactive":case"complete":E=!0;break;default:A.addEventListener("DOMContentLoaded",(()=>{o().setTimeout((()=>E=!0))}),{once:!0})}let O;function M(){O=null}function L(e){var t;const r="isInitial"in e?e.isInitial:!1===E,i="threshold"in e?e.threshold:1e3,o="reporters"in e?e.reporters:[],c=r?0:a().now(),u=null!==(t=e.timeout)&&void 0!==t?t:6e4;console.debug("[BM]",e.key,"Probe.start",{timestamp:c}),n().push({start:{key:e.key,isInitial:r,threshold:i,timestamp:c,reporters:Array.isArray(o)?o:[o],entityId:e.entityId,waitForMarks:e.waitForMarks,timeout:u}}),O&&(O.cancel(),M()),e.ready&&(O=function(e,t){e=_(e);var n=function(){},r=new Promise((function(t,r){var i=[],o=e.rules.map((function(e){var t=new p(e.selector,e.hasNone);return i.push((function(){t.dismiss()})),t}));
2514n=function(){i.forEach((function(e){e()})),r()},Promise.all(o).then((function(e){})).then(t,r)}));return r.cancel=n,e.requirePaint&&(r=r.then(P)),"function"==typeof t&&r.then(t),r}(e.ready),O.then((function(){console.debug("[BM]",e.key,"Probe.end invoked by ready"),s({key:e.key})})).then(M,M))}function j(e){console.debug("[BM]","Probe.subscribe",e.name),n().push({subscribe:e})}window.define&&window.define("internal/browser-metrics",(function(){return{start:L,end:s,addReporter:r,delegateTo:i,subscribe:j}})),console.debug("[BM]","Probe loaded"),e.addReporter=r,e.delegateTo=i,e.end=s,e.start=L,e.subscribe=j,Object.defineProperty(e,"__esModule",{value:!0})}(this["browser-metrics"]=this["browser-metrics"]||{});
2515
2516}catch(e){WRMCB(e)};
2517;
2518try {
2519/* module-key = 'com.atlassian.plugins.browser.metrics.browser-metrics-plugin:api', location = 'browser-metrics-aa-beacon/browser-metrics-aa-beacon.js' */
2520!function(e){"use strict";const n=[],t=[];let r;const s=e=>{t.push(e)},a=e=>t.reduce(((n,t)=>{const r=t(e);return r.length>n.length?r:n}),""),o=e=>{n.push(e)},c=e=>{r=e},i=e=>{const t={};n.forEach((n=>{const r=n(e);"object"==typeof r&&Object.assign(t,r)}));const s={name:"browser.metrics.navigation",properties:t};(r||AJS.EventQueue).push(s),console.debug("[BM-AA] ","AJS Event pushed",s)};window.define&&window.define("internal/browser-metrics-aa-beacon",(function(){return{beacon:i,setEventQueue:c,addReportMarshaller:o,cleanUrl:a,addUrlCleaner:s}})),e.addReportMarshaller=o,e.addUrlCleaner=s,e.beacon=i,e.cleanUrl=a,e.setEventQueue=c,Object.defineProperty(e,"__esModule",{value:!0})}(this["browser-metrics-aa-beacon"]=this["browser-metrics-aa-beacon"]||{});
2521
2522}catch(e){WRMCB(e)};
2523;
2524try {
2525/* module-key = 'com.atlassian.plugins.browser.metrics.browser-metrics-plugin:api', location = 'loader.js' */
2526!function(){"use strict";let r=window;const n=r.WRM;let i=0,l=0,t=null;function e(){i===l&&t&&(t(),t=null)}const c={install(r){i+=1,r((()=>{l+=1,e()}))}};r["browser-metrics-plugin"]=c,n.require(["wrc!browser-metrics-plugin.contrib"],(()=>{r.require(["internal/browser-metrics-plugin/collector"],(r=>{t=()=>{r.install()},e()}))}))}();
2527
2528}catch(e){WRMCB(e)};
2529;
2530try {
2531/* module-key = 'com.atlassian.confluence.plugins.confluence-browser-metrics:search-metric-util', location = '/js/util/search-metric.js' */
2532require(["internal/browser-metrics","jquery"],function(a,b){b(function(){metricKey="confluence.sidebar.search.update";sidebarSearchViewMetricKey="confluence.sidebar.search.view";AJS.bind("search-started",function(){a.start({key:metricKey,isInitial:!0})});AJS.bind("search-end",function(){a.end({key:metricKey})});AJS.bind("confluence-search-ui-plugin.click-search-panel",function(){a.start({key:sidebarSearchViewMetricKey,isInitial:!0})});AJS.bind("confluence-search-ui-plugin.show-search-panel",function(){a.end({key:sidebarSearchViewMetricKey})})})});
2533}catch(e){WRMCB(e)};
2534;
2535try {
2536/* module-key = 'com.atlassian.confluence.plugins.confluence-browser-metrics:space-creation', location = '/js/space-creation.js' */
2537require(["internal/browser-metrics","jquery"],function(a,b){b(function(){AJS.bind("confluence.space.creation.started",function(){a.start({key:"confluence.space.created"})});AJS.bind("confluence.space.creation.ended",async function(){await a.end({key:"confluence.space.created"});AJS.trigger("confluence.space.creation.event.triggered")})})});
2538}catch(e){WRMCB(e)};
2539;
2540try {
2541/* module-key = 'com.atlassian.confluence.plugins.confluence-browser-metrics:legacy-browser-metrics', location = '/js/legacy/browser-metrics.js' */
2542(function(){var b=window.BrowserMetrics||{};b.isFunction=function(e){return!!(e&&e.constructor&&e.call&&e.apply)};b.isEnabled=function(){void 0===b.enabled&&(b.enabled=!0);return b.enabled};window.BrowserMetrics=b})();
2543(function(){(window.BrowserMetrics||{}).isEnabled()&&(window.ATL_PERF||(window.ATL_PERF={}),window.ATL_PERF.initPageLoad=function(b){function e(){var c=m();c&&n(function(d,a){d="browser.metrics."+d;a={version:5,page:c,value:12E3<a?"x":Math.ceil(a/100),rawValue:Math.round(a)};AJS.Analytics?AJS.Analytics.triggerPrivacyPolicySafeEvent(d,a):AJS.trigger("analyticsEvent",{name:d,data:a})})}function h(){if(b.performance.timing.loadEventEnd)try{e()}catch(c){window.console&&window.console.log("Error reporting browser metrics: "+
2544c)}else setTimeout(h,1E3)}var p=function(){var c=/^(\w+):\/\/([^\/]*)(.*)$/;return function(d){var a=d.match(c);return a?{scheme:a[1],host:a[2],path:a[3]}:{path:d}}}(),n=function(){var c="secureConnectionStart requestStart responseStart responseEnd domContentLoadedEventStart domContentLoadedEventEnd loadEventEnd".split(" ");return function(d){if(b.performance){var a=b.performance.timing,f=a.navigationStart;if(f)for(var g=0;g<c.length;++g){var k=c[g],l=a[k];l&&d(k,l-f)}}}}(),m=function(){var c=[{key:"LOGIN",
2545pattern:/^\/login.*/i},{key:"J-DASH",pattern:/^\/secure\/dashboard\.jspa.*/i},{key:"J-ISSUE",pattern:/^\/browse\/\w+\-\w+.*/i},{key:"J-NAV",pattern:/^\/issues.*/i},{key:"J-RAPID",pattern:/secure\/rapidboard\.jspa/i}
2545,{key:"SD-AGENT",pattern:/^(\/\w+)?\/servicedesk\/agent\/.*/i},{key:"SD-CUSTOMER",pattern:/^(\/\w+)?\/servicedesk\/customer\/.*/i},{key:"C-DASH",pattern:/^\/wiki(\/)?(\?.*|#.*)?$/i},{key:"C-DASH",pattern:/^\/wiki\/dashboard\.action.*$/i},{key:"C-SPACE",pattern:/^\/wiki\/display\/\w+(\?.*|#.*)?$/i},
2546{key:"C-PAGE",pattern:/^\/wiki\/display\/\w+\/.*/i},{key:"C-PAGE",pattern:/^\/wiki\/pages\/viewpage\.action.*/i},{key:"C-BLOG",pattern:/^\/wiki\/display\/~\w+\/\d+\/\d+\/\d+\/.*/i},{key:"C-EDITOR",pattern:/^\/wiki\/pages\/editpage\.action.*/i},{key:"C-CREATE",pattern:/^\/wiki\/pages\/createpage\.action.*/i}];return function(){for(var d=p(b.location.href).path,a=0;a<c.length;++a){var f=c[a];if(d.match(f.pattern))return f.key}return null}}();b.performance&&b.performance.timing&&h()})})();
2547}catch(e){WRMCB(e)};
2548;
2549try {
2550/* module-key = 'com.atlassian.confluence.plugins.confluence-browser-metrics:legacy-browser-metrics', location = '/js/legacy/browser-metrics-events.js' */
2551(function(){(window.BrowserMetrics||{}).isEnabled()&&(window.ATL_PERF||(window.ATL_PERF={}),window.ATL_PERF.initEvents=function(b){function g(){return b.performance&&b.performance.now?b.performance.now():(new Date).getTime()}var f={};return{start:function(a){f[a===Object(a)?a.eventName+"."+a.eventType:a]=g()},end:function(a,e){var c=a===Object(a)?a.eventName+"."+a.eventType:a;if(!f[c])throw"Error logging browser metrics event end: no start event for key '"+c+"'";var d=g()-f[c];f[c]=null;c=a===Object(a)?
2552a.eventName:a;a=a===Object(a)?a.eventType:"";e="browser.metrics.e."+c+(e?"."+e:"");d={version:5,value:12E3<d?"x":Math.ceil(d/100),rawValue:Math.round(100*d)/100,eventType:a};b.AJS.Analytics?b.AJS.Analytics.triggerPrivacyPolicySafeEvent(e,d):b.AJS.trigger("analyticsEvent",{name:e,data:d})}}})})();
2553}catch(e){WRMCB(e)};
2554;
2555try {
2556/* module-key = 'com.atlassian.confluence.plugins.confluence-browser-metrics:legacy-browser-metrics', location = '/js/legacy/browser-metrics-init.js' */
2557(function(){(window.BrowserMetrics||{}).isEnabled()&&(.1>Math.random()&&window.ATL_PERF&&window.ATL_PERF.initPageLoad&&window.ATL_PERF.initPageLoad(window),window.ATL_PERF&&window.ATL_PERF.initEvents&&(window.BrowserMetrics=window.ATL_PERF.initEvents(window)))})();
2558}catch(e){WRMCB(e)};
2559;
2560try {
2561/* module-key = 'com.atlassian.plugins.atlassian-nav-links-plugin:rotp-menu', location = 'appswitcher/appswitcher.soy' */
2562// This file was automatically generated from appswitcher.soy.
2563// Please don't edit this file by hand.
2564
2565/**
2566 * @fileoverview Templates in namespace navlinks.templates.appswitcher.
2567 */
2568
2569if (typeof navlinks == 'undefined') { var navlinks = {}; }
2570if (typeof navlinks.templates == 'undefined') { navlinks.templates = {}; }
2571if (typeof navlinks.templates.appswitcher == 'undefined') { navlinks.templates.appswitcher = {}; }
2572
2573
2574navlinks.templates.appswitcher.switcher = function(opt_data, opt_ignored) {
2575  return '' + ((true) ? navlinks.templates.appswitcher_old.switcher(opt_data) : '');
2576};
2577if (goog.DEBUG) {
2578  navlinks.templates.appswitcher.switcher.soyTemplateName = 'navlinks.templates.appswitcher.switcher';
2579}
2580
2581}catch(e){WRMCB(e)};
2582;
2583try {
2584/* module-key = 'com.atlassian.plugins.atlassian-nav-links-plugin:rotp-menu', location = 'appswitcher/appswitcher_old.js' */
2585var APPSWITCHER_TRIGGER_CLICK="appswitcher.trigger.click",APPSWITCHER_DROPDOWN_SHOW="appswitcher.dropdown.show",APPSWITCHER_DROPDOWN_DISPLAY_ERROR="appswitcher.dropdown.display.error",APPSWITCHER_APP_LINK_CLICK="appswitcher.app.link.click",APPSWITCHER_CONFIGURE_LINK_CLICK="appswitcher.configure.link.click";
2586(function(a,g){g.AppSwitcher=function(e){var h=AJS.contextPath()+"/plugins/servlet/customize-application-navigator",c=this;this.$dropdown=null;e=a.extend({dropdownContents:null},e);this.getLinks=function(){return a.ajax({url:AJS.contextPath()+"/rest/menu/latest/appswitcher",cache:!1,dataType:"json"}).done(this.updateDropdown).fail(this.showError)};this.getDropdown=function(){this.$dropdown||(this.$dropdown=a(e.dropdownContents),this.isUserAdmin=this.$dropdown.data("is-user-admin"));return this.$dropdown};
2587this.updateDropdown=function(b){a(function(){c.getDropdown().html(navlinks.templates.appswitcher_old.applications({apps:b,showAdminLink:c.isUserAdmin,adminLink:h}));c.bindAnalyticsHandlers()})};
2587this.bindAnalyticsHandlers=function(){a(".app-switcher-trigger").on("click",function(){AJS.trigger("analyticsEvent",{name:APPSWITCHER_TRIGGER_CLICK})});a("#app-switcher").on("aui-dropdown2-show",function(){AJS.trigger("analyticsEvent",{name:APPSWITCHER_DROPDOWN_SHOW})});a("#app-switcher .nav-link").on("click",
2588function(){var b="custom",d=a(this).find("a").attr("href"),f=window.location.hostname;d&&-1<d.indexOf("bitbucket.org")?b="bitbucket-cloud":-1<d.indexOf(f+"/wiki")?b="confluence":-1<d.indexOf(f+"/build")?b="bamboo":-1<d.indexOf(f)&&(b="jira");AJS.trigger("analyticsEvent",{name:APPSWITCHER_APP_LINK_CLICK,data:{product:b}})});a(".nav-link-edit-wrapper").on("click",function(){AJS.trigger("analyticsEvent",{name:APPSWITCHER_CONFIGURE_LINK_CLICK})})};this.showError=function(){a(function(){AJS.trigger("analyticsEvent",
2589{name:APPSWITCHER_DROPDOWN_DISPLAY_ERROR});c.getDropdown().html(navlinks.templates.appswitcher_old.error()).off(".appswitcher").on("click.appswitcher",".app-switcher-retry",a.proxy(c.retryLoading,c))})};this.retryLoading=function(b){this.getDropdown().html(navlinks.templates.appswitcher_old.loading());this.getLinks();b&&b.stopPropagation()};this.getLinks()};a(function(){!0===a("#app-switcher").data("is-switcher")&&new g.AppSwitcher({dropdownContents:"#app-switcher"})})})(jQuery,window.NL=window.NL||
2590{});
2591}catch(e){WRMCB(e)};
2592;
2593try {
2594/* module-key = 'com.atlassian.plugins.atlassian-nav-links-plugin:rotp-menu', location = 'appswitcher/appswitcher_old.soy' */
2595// This file was automatically generated from appswitcher_old.soy.
2596// Please don't edit this file by hand.
2597
2598/**
2599 * @fileoverview Templates in namespace navlinks.templates.appswitcher_old.
2600 */
2601
2602if (typeof navlinks == 'undefined') { var navlinks = {}; }
2603if (typeof navlinks.templates == 'undefined') { navlinks.templates = {}; }
2604if (typeof navlinks.templates.appswitcher_old == 'undefined') { navlinks.templates.appswitcher_old = {}; }
2605
2606
2607navlinks.templates.appswitcher_old.applications = function(opt_data, opt_ignored) {
2608  return '' + navlinks.templates.appswitcher_old.applicationsSection({list: opt_data.apps, listClass: 'nav-links', showDescription: opt_data.showDescription}) + ((opt_data.custom) ? navlinks.templates.appswitcher_old.applicationsSection({list: opt_data.custom, showDescription: opt_data.showDescription}) : '') + ((opt_data.showAdminLink) ? navlinks.templates.appswitcher_old.adminSection(opt_data) : '');
2609};
2610if (goog.DEBUG) {
2611  navlinks.templates.appswitcher_old.applications.soyTemplateName = 'navlinks.templates.appswitcher_old.applications';
2612}
2613
2614
2615navlinks.templates.appswitcher_old.applicationsSection = function(opt_data, opt_ignored) {
2616  var output = '';
2617  if (opt_data.list.length > 0) {
2618    var param19 = '<ul' + ((opt_data.listClass) ? ' class="' + soy.$$escapeHtml(opt_data.listClass) + '"' : '') + '>';
2619    var linkList27 = opt_data.list;
2620    var linkListLen27 = linkList27.length;
2621    for (var linkIndex27 = 0; linkIndex27 < linkListLen27; linkIndex27++) {
2622      var linkData27 = linkList27[linkIndex27];
2623      param19 += navlinks.templates.appswitcher_old.applicationsItem(soy.$$augmentMap(linkData27, {showDescription: opt_data.showDescription}));
2624    }
2625    param19 += '</ul>';
2626    output += aui.dropdown2.section({content: param19});
2627  }
2628  return output;
2629};
2630if (goog.DEBUG) {
2631  navlinks.templates.appswitcher_old.applicationsSection.soyTemplateName = 'navlinks.templates.appswitcher_old.applicationsSection';
2632}
2633
2634
2635navlinks.templates.appswitcher_old.applicationsItem = function(opt_data, opt_ignored) {
2636  return '<li class="nav-link' + ((opt_data.self) ? ' nav-link-local' : '') + '"><a href="' + soy.$$escapeHtml(opt_data.link) + '" class="aui-dropdown2-radio ' + ((opt_data.self) ? 'aui-dropdown2-checked' : '') + '" title="' + soy.$$escapeHtml(opt_data.link) + '"><span class="nav-link-label">' + soy.$$escapeHtml(opt_data.label) + '</span>' + ((opt_data.showDescription && opt_data.description) ? '<span class="nav-link-description">' + soy.$$escapeHtml(opt_data.description) + '</span>' : '') + '</a></li>';
2637};
2638if (goog.DEBUG) {
2639  navlinks.templates.appswitcher_old.applicationsItem.soyTemplateName = 'navlinks.templates.appswitcher_old.applicationsItem';
2640}
2641
2642
2643navlinks.templates.appswitcher_old.adminSection = function(opt_data, opt_ignored) {
2644  return '' + aui.dropdown2.section({content: '<ul class="nav-links"><li><a class="nav-link-edit-wrapper" href="' + soy.$$escapeHtml(opt_data.adminLink) + '"><span class="nav-link-edit">' + soy.$$filterNoAutoescape('Configure...') + '</span></a></li></ul>'});
2645};
2646if (goog.DEBUG) {
2647  navlinks.templates.appswitcher_old.adminSection.soyTemplateName = 'navlinks.templates.appswitcher_old.adminSection';
2648}
2649
2650
2651navlinks.templates.appswitcher_old.error = function(opt_data, opt_ignored) {
2652  return '<div class="app-switcher-error">' + soy.$$filterNoAutoescape('Something went wrong, please \x3cspan class\x3d\x22app-switcher-retry\x22\x3etry again\x3c/span\x3e.') + '</div>';
2653};
2654if (goog.DEBUG) {
2655  navlinks.templates.appswitcher_old.error.soyTemplateName = 'navlinks.templates.appswitcher_old.error';
2656}
2657
2658
2659navlinks.templates.appswitcher_old.loading = function(opt_data, opt_ignored) {
2660  return '<div class="app-switcher-loading">' + soy.$$filterNoAutoescape('Loading...') + '</div>';
2661};
2662if (goog.DEBUG) {
2663  navlinks.templates.appswitcher_old.loading.soyTemplateName = 'navlinks.templates.appswitcher_old.loading';
2664}
2665
2666
2667navlinks.templates.appswitcher_old.trigger = function(opt_data, opt_ignored) {
2668  return '<span class="aui-icon aui-icon-small aui-iconfont-appswitcher">' + soy.$$escapeHtml('Linked Applications') + '</span>';
2669};
2670if (goog.DEBUG) {
2671  navlinks.templates.appswitcher_old.trigger.soyTemplateName = 'navlinks.templates.appswitcher_old.trigger';
2672}
2673
2674
2675navlinks.templates.appswitcher_old.switcher = function(opt_data, opt_ignored) {
2676  var output = '';
2677  var loadingContent__soy79 = '' + navlinks.templates.appswitcher_old.loading(null);
2678  var triggerContent__soy81 = '' + navlinks.templates.appswitcher_old.trigger(null);
2679  output += aui.dropdown2.dropdown2({menu: {id: 'app-switcher', content: loadingContent__soy79, extraClasse
2679s: 'aui-style-default', extraAttributes: {'data-is-user-admin': false, 'data-is-switcher': 'true'}}, trigger: {tagName: 'button', showIcon: false, content: triggerContent__soy81, extraClasses: 'app-switcher-trigger aui-dropdown2-trigger-arrowless', extraAttributes: {href: '#app-switcher'}}});
2680  return output;
2681};
2682if (goog.DEBUG) {
2683  navlinks.templates.appswitcher_old.switcher.soyTemplateName = 'navlinks.templates.appswitcher_old.switcher';
2684}
2685
2686}catch(e){WRMCB(e)};
2687;
2688try {
2689/* module-key = 'confluence.web.resources:common-header-resources', location = '/includes/js/header-user-menu.js' */
2690define("confluence/header-user-menu",["jquery","confluence/meta","underscore"],function(a,c,b){function d(){var b=c.get("current-user-avatar-uri-reference");a("#user-menu-link").find(".aui-avatar-inner img").attr("src",b)}return function(){b.defer(d)}});require("confluence/module-exporter").safeRequire("confluence/header-user-menu",function(a){require("ajs").toInit(a)});
2691}catch(e){WRMCB(e)};
2692;
2693try {
2694/* module-key = 'confluence.web.resources:general-analytics-bindings', location = '/includes/js/analytics-bindings.js' */
2695define("confluence/analytics-bindings",["jquery","confluence/analytics-support"],function(b,d){return function(){function e(a,c){b(a).on("click",".view-historical-version-trigger",function(){d.publish("confluence.page.view-historical.from-"+(c||"unknown"))})}function f(a,c){b(a).on("click",".restore-historical-version-trigger",function(){d.publish("confluence.page.restore-historical.from-"+(c||"unknown"))})}function g(a,c){b("#header .aui-header-secondary "+a).on("click",function(){var a=b(this).hasClass("aui-dropdown2-active")?
2696"expanded":"collapsed";d.publish("confluence.header.dropdown."+c,{state:a})})}e("#page-history-warning","navigation");e("#page-history-container","history");e(".diff-menu","diff");f("#page-history-warning","navigation");f("#page-history-container","history");g("#admin-menu-link","administration");g("#user-menu-link","profile")}});require("confluence/module-exporter").safeRequire("confluence/analytics-bindings",function(b){require("ajs").toInit(b)});
2697}catch(e){WRMCB(e)};
2698;
2699try {
2700/* module-key = 'com.atlassian.confluence.plugins.quickreload:quick-reload-core', location = 'utils/quick-reload-timer.js' */
2701define("confluence-quick-reload/utils/quick-reload-timer",["jquery","underscore"],function(d,f){function b(a,c){this.options=d.extend({min:3E4,max:36E5,inactivity:12E4},c);f.bindAll(this,"start","stop","_now","_timeSinceLastSeen","_setActive","_setActivityTrigger","_clamp","_intervalMultiplier");this.callback=a;this._timer=null;this._setActivityTrigger(this._setActive)}b.prototype.start=function(a){this.lastSeenTimestamp=this._now();this.stop();a&&this.callback();var c=function(){this.callback();
2702e.call(this)},e=function(){this.stop();this._timer=setTimeout(f.bind(c,this),this.options.min*this._intervalMultiplier())};e.call(this)};b.prototype.stop=function(){null!==this._timer&&(clearTimeout(this._timer),this._timer=null)};b.prototype._setActive=function(){if(null!==this._timer){var a=this._timeSinceLastSeen()>this.options.inactivity;this.lastSeenTimestamp=this._now();a&&this.start(!0)}};b.prototype._setActivityTrigger=function(a){document.addEventListener("visibilitychange",function(){document.hidden||
2703a()},!1);d(window).focus(a);d("body").click(a);d(window).scroll(a)};b.prototype._now=function(){return(new Date).getTime()};b.prototype._timeSinceLastSeen=function(){return this._now()+1-this.lastSeenTimestamp};b.prototype._clamp=function(a,c,e){c=Math.max(Math.min(c,e),a);return isNaN(c)?a:c};b.prototype._intervalMultiplier=function(){var a=(document.hidden?3:1)*Math.ceil(this._timeSinceLastSeen()/this.options.inactivity);return this._clamp(1,this.options.max/this.options.min,a)};return b});
2704}catch(e){WRMCB(e)};
2705;
2706try {
2707/* module-key = 'com.atlassian.confluence.plugins.quickreload:quick-reload-core', location = 'main/quick-reload-manager.js' */
2708define("confluence-quick-reload/main/quick-reload-manager","underscore jquery ajs confluence/api/constants confluence-quick-reload/utils/quick-reload-timer confluence/meta confluence/api/logger".split(" "),function(h,g,p,l,m,k,n){function b(){this.enabled=!1;this.handlers=[];this.lastFetchTime=g('meta[name\x3d"confluence-request-time"]').attr("content")||(new Date).getTime();this.timer=null;h.bindAll(this,"addHandler","removeHandler","update","enable","disable","onUpdateSuccess","onUpdateError")}
2709b.prototype.addHandler=function(a){var c=!1,e;for(e=0;e<this.handlers.length;e++)this.handlers[e]===a&&(c=!0);!0!==c&&this.handlers.push(a)};b.prototype.removeHandler=function(a){var c;if(a)for(c=0;c<this.handlers.length;c++)if(this.handlers[c]===a){this.handlers.splice(c,1);break}};b.prototype.update=function(){var a=void 0!==k.get("page-id")?k.get("page-id"):"0";g("body").hasClass("contenteditor")?this.disable():g.ajax({type:"GET",url:l.CONTEXT_PATH+"/rest/quickreload/latest/"+a+"?since\x3d"+encodeURIComponent(this.lastFetchTime),
2710dataType:"json"}).done(this.onUpdateSuccess).fail(this.onUpdateError)};b.prototype.enable=function(){this.enabled||(null===this.timer&&(this.timer=new m(this.update)),this.timer.start(),this.enabled=!0)};b.prototype.disable=function(){null!==this.timer&&this.timer.stop();this.enabled=!1};b.prototype.isEnabled=function(){return this.enabled};b.prototype.onUpdateSuccess=function(a,c,e){204!==e.status&&(this.lastFetchTime=a.time,h.map(this.handlers,function(f){var d=a[f.property];
vendor: 7,191 bytes, lines 2710-2737
2710Array.isArray(d)||(d=
2711[d]);d=f.filterNewResults(f.results,d);0<d.length&&(f.results=f.results.concat(d),f.render(d))},this))};b.prototype.onUpdateError=function(a){if(a={404:"not found - the plugin has been probably been removed or disabled from Confluence",500:"generic server error",503:"service unavailable",504:"gateway timeout"}[(a||{}).status])this.disable(),n.error('Quick comment reload plugin has been disabled in this page due to a server error: "'+a+'". Please refresh the page to get it back.')};return new b});
2712}catch(e){WRMCB(e)};
2713;
2714try {
2715/* module-key = 'com.atlassian.confluence.plugins.quickreload:quick-reload-read-only-mode-handler', location = 'handlers/quick-reload-read-only-mode.js' */
2716define("confluence-quick-reload/handlers/quick-reload-read-only-mode",["ajs","jquery","confluence/message-controller","confluence/meta","confluence/api/event"],function(f,k,a,e,g){return{results:[],property:"readOnlyMode",filterNewResults:function(b,c){return 0<c.length&&"string"!==typeof c[0]?c:[]},render:function(b){b=b[0];var c=e.get("access-mode"),d=b.isEnabled?"READ_ONLY":"READ_WRITE",h="READ_ONLY"===e.get("render-mode")?"We\u0027re back! \u003ca onclick=\u0022location.reload()\u0022\u003eRefresh\u003c/a\u003e the page to edit and make changes.":"We\u0027re back! You can now edit and make changes.";
2717if(!a.hasSuccess(a.Location.BANNER)||b.isEnabled)e.set("access-mode",d),d!==c&&g.trigger("qr:access-mode",{accessMode:d}),this.shouldDisplayError(b)?a.hasErrors(a.Location.BANNER)||this.showError(b.bannerMessage):"READ_ONLY"===c&&"READ_WRITE"===d?this.showSuccess(h):this.clearAll()},clearAll:function(){a.clearErrors(a.Location.ALL);a.clearSuccess(a.Location.ALL)},showError:function(b){a.clearSuccess(a.Location.ALL);a.showError(b,a.Location.BANNER)},showSuccess:function(b){a.clearErrors(a.Location.ALL);
2718a.showSuccess(b,a.Location.BANNER,{closeable:!0})},shouldDisplayError:function(b){return b.isBannerMessageOn||b.isEnabled}}});
2719}catch(e){WRMCB(e)};
2720;
2721try {
2722/* module-key = 'com.atlassian.confluence.plugins.quickreload:quick-reload-read-only-mode-bootstrap', location = 'main/quick-reload-read-only-mode-bootstrap.js' */
2723require(["ajs","confluence/dark-features","confluence-quick-reload/main/quick-reload-manager","confluence-quick-reload/handlers/quick-reload-read-only-mode"],function(b,c,a,d){b.toInit(function(){c.isEnabled("quickreload.disabled")||(a.addHandler(d),a.enable())})});
2724}catch(e){WRMCB(e)};
2725;
2726try {
2727/* module-key = 'com.atlassian.confluence.plugins.confluence-frontend:split_vendors~date-time~react~react-dom~react-dom-client~react-dom-server~skip-links~table-styles-editor', location = 'vendors~date-time~react~react-dom~react-dom-client~react-dom-server~skip-links~table-styles-editor.js' */
2728(window.atlassianWebpackJsonpe19a4f58490c3d96a3072d1e47cd0e73=window.atlassianWebpackJsonpe19a4f58490c3d96a3072d1e47cd0e73||[]).push([[4],{541:function(e,t,r){"use strict";
2729/**
2730 * @license React
2731 * react.production.min.js
2732 *
2733 * Copyright (c) Facebook, Inc. and its affiliates.
2734 *
2735 * This source code is licensed under the MIT license found in the
2736 * LICENSE file in the root directory of this source tree.
2737 */var n=Symbol.for("react.element"),o=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),f=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),d=Symbol.iterator;var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,b={};function m(e,t,r){this.props=e,this.context=t,this.refs=b,this.updater=r||_}function v(){}function S(e,t,r){this.props=e,this.context=t,this.refs=b,this.updater=r||_}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=m.prototype;var w=S.prototype=new v;w.constructor=S,h(w,m.prototype),w.isPureReactComponent=!0;var E=Array.isArray,k=Object.prototype.hasOwnProperty,$={current:null},R={key:!0,ref:!0,__self:!0,__source:!0};function C(e,t,r){var o,u={},a=null,c=null;if(null!=t)for(o in void 0!==t.ref&&(c=t.ref),void 0!==t.key&&(a=""+t.key),t)k.call(t,o)&&!R.hasOwnProperty(o)&&(u[o]=t[o]);var i=arguments.length-2;if(1===i)u.children=r;else if(1<i){for(var f=Array(i),s=0;s<i;s++)f[s]=arguments[s+2];u.children=f}if(e&&e.defaultProps)for(o in i=e.defaultProps)void 0===u[o]&&(u[o]=i[o]);return{$$typeof:n,type:e,key:a,ref:c,props:u,_owner:$.current}}function g(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var j=/\/+/g;function O(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function x(e,t,r,u,a){var c=typeof e;"undefined"!==c&&"boolean"!==c||(e=null);var i=!1;if(null===e)i=!0;else switch(c){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case n:case o:i=!0}}if(i)return a=a(i=e),e=""===u?"."+O(i,0):u,E(a)?(r="",null!=e&&(r=e.replace(j,"$&/")+"/"),x(a,t,r,"",(function(e){return e}))):null!=a&&(g(a)&&(a=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,r+(!a.key||i&&i.key===a.key?"":(""+a.key).replace(j,"$&/")+"/")+e)),t.push(a)),1;if(i=0,u=""===u?".":u+":",E(e))for(var f=0;f<e.length;f++){var s=u+O(c=e[f],f);i+=x(c,t,r,s,a)}else if("function"==typeof(s=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e)))for(e=s.call(e),f=0;!(c=e.next()).done;)i+=x(c=c.value,t,r,s=u+O(c,f++),a);else if("object"===c)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function P(e,t,r){if(null==e)return e;var n=[],o=0;return x(e,n,"","",(function(e){return t.call(r,e,o++)})),n}function I(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var T={current:null},V={transition:null},A={ReactCurrentDispatcher:T,ReactCurrentBatchConfig:V,ReactCurrentOwner:$};t.Children={map:P,forEach:function(e,t,r){P(e,(function(){t.apply(this,arguments)}),r)},count:function(e){var t=0;return P(e,(function(){t++})),t},toArray:function(e){return P(e,(function(e){return e}))||[]},only:function(e){if(!g(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=m,t.Fragment=u,t.Profiler=c,t.PureComponent=S,t.StrictMode=a,t.Suspense=l,t.__SECRET_INT
2737ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=A,t.cloneElement=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=h({},e.props),u=e.key,a=e.ref,c=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,c=$.current),void 0!==t.key&&(u=""+t.key),e.type&&e.type.defaultProps)var i=e.type.defaultProps;for(f in t)k.call(t,f)&&!R.hasOwnProperty(f)&&(o[f]=void 0===t[f]&&void 0!==i?i[f]:t[f])}var f=arguments.length-2;if(1===f)o.children=r;else if(1<f){i=Array(f);for(var s=0;s<f;s++)i[s]=arguments[s+2];o.children=i}return{$$typeof:n,type:e.type,key:u,ref:a,props:o,_owner:c}},t.createContext=function(e){return(e={$$typeof:f,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:i,_context:e},e.Consumer=e},t.createElement=C,t.createFactory=function(e){var t=C.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:s,render:e}},t.isValidElement=g,t.lazy=function(e){return{$$typeof:y,_payload:{_status:-1,_result:e},_init:I}},t.memo=function(e,t){return{$$typeof:p,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=V.transition;V.transition={};try{e()}finally{V.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return T.current.useCallback(e,t)},t.useContext=function(e){return T.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return T.current.useDeferredValue(e)},t.useEffect=function(e,t){return T.current.useEffect(e,t)},t.useId=function(){return T.current.useId()},t.useImperativeHandle=function(e,t,r){return T.current.useImperativeHandle(e,t,r)},t.useInsertionEffect=function(e,t){return T.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return T.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return T.current.useMemo(e,t)},t.useReducer=function(e,t,r){return T.current.useReducer(e,t,r)},t.useRef=function(e){return T.current.useRef(e)},t.useState=function(e){return T.current.useState(e)},t.useSyncExternalStore=function(e,t,r){return T.current.useSyncExternalStore(e,t,r)},t.useTransition=function(){return T.current.useTransition()},t.version="18.1.0"},68:function(e,t,r){"use strict";e.exports=r(541)}}]);
2738}catch(e){WRMCB(e)};
2739;
2740try {
2741/* module-key = 'com.atlassian.confluence.plugins.confluence-frontend:split_vendors~date-time~skip-links~table-styles-editor', location = 'vendors~date-time~skip-links~table-styles-editor.js' */
2742(window.atlassianWebpackJsonpe19a4f58490c3d96a3072d1e47cd0e73=window.atlassianWebpackJsonpe19a4f58490c3d96a3072d1e47cd0e73||[]).push([[8],{3:function(t,e,n){!function(t,e,n){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var r="default"in n?n.default:n;function a(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function o(t){for(var o=arguments.length,i=new Array(o>1?o-1:0),c=1;c<o;c++)i[c-1]=arguments[c];var l=0,u={};i=i.map((function(t){if(n.isValidElement(t)){var e="!PLACEHOLDER_".concat(++l,"!");return u[e]=t,e}return t}));var f=e.apply(void 0,[t].concat(a(i))).split(/(!PLACEHOLDER_\d+!)/g);if(1===f.length)return f.join("");var d=f.map((function(t,e){return r.createElement(n.Fragment,{key:e},e%2?u[t]:t)}));return r.createElement(n.Fragment,null,d)}var i={getText:function(){return console.warn('Call to "getText" function was not replaced with either raw translation or call to "format" function. Have you included the "jsI18n" transformation in Web Resource Manager?'),o.apply(void 0,arguments)}};t.I18n=i,t.format=o,Object.defineProperty(t,"__esModule",{value:!0})}(e,n(540),n(68))}}]);
2743}catch(e){WRMCB(e)};
2744;
2745try {
2746/* module-key = 'com.atlassian.confluence.plugins.confluence-frontend:split_date-time~skip-links~table-styles-editor', location = 'date-time~skip-links~table-styles-editor.js' */
2747(window.atlassianWebpackJsonpe19a4f58490c3d96a3072d1e47cd0e73=window.atlassianWebpackJsonpe19a4f58490c3d96a3072d1e47cd0e73||[]).push([[6],{540:function(a,e){a.exports=WRM.format}}]);
2748}catch(e){WRMCB(e)};
2749;
2750try {
2751/* module-key = 'com.atlassian.confluence.plugins.confluence-frontend:split_skip-links', location = 'skip-links.js' */
2752(window.atlassianWebpackJsonpe19a4f58490c3d96a3072d1e47cd0e73=window.atlassianWebpackJsonpe19a4f58490c3d96a3072d1e47cd0e73||[]).push([[31],{574:function(e,i,n){"use strict";n.r(i);var s=n(3),t=n(13),o=n(15);Object(o.a)("confluence/skip-links-loader",["confluence/api/logger"],e=>{const i={rerenderSkipLinks(){i._removeExistingSkipLinks(),i._reloadAutoMappedElements();const e=t.document.getElementById("header");e.dispatchEvent(new CustomEvent("confluence.skip-links-loader.rerender-skip-links",{bubbles:!0}));const n=[],s=i._documentContainsCustomTabIndexes();
2752[...i._skipLinks,...i._skipLinksAutoMapped].reverse().forEach(t=>{const o=i._renderSkipLink(t,s);o&&(e.insertBefore(o,e.firstChild),n.push(o))})},addSkipLink:n=>(n.href?1:0)+(n.skipToCssPath?1:0)+(n.onclick?1:0)>1?(e.error("skip-links-loader: use one of the properties: href/skipToCssPath/onclick. value:",n),!1):(t.document.dispatchEvent(new CustomEvent("confluence.skip-links-loader.add-skip-link",{detail:n})),i._skipLinks.push(n),!0),removeSkipLink(e){t.document.dispatchEvent(new CustomEvent("confluence.skip-links-loader.remove-skip-link",{detail:e})),i._skipLinks=i._skipLinks.filter(i=>i!==e)},_skipLinks:[],_skipLinksAutoMapped:[],_isVisible:e=>e.offsetWidth>0&&e.offsetHeight>0,_verifyOnlyIfExists(n){if(void 0===n.onlyIfExists)return!0;if("string"!=typeof n.onlyIfExists)return e.error('skip-links-loader: "onlyIfExists" only supports undefined and a string css path. value:',n.onlyIfExists,n),!1;const s=t.document.querySelector(n.onlyIfExists);return!!s&&(!!n.ignoreVisibility||i._isVisible(s))},_renderSkipLink(n,s){const o=t.document.createElement("a");if(o.className="aui-skip-link",o.setAttribute("aui-skip-link-auto-generated",""),s&&o.setAttribute("tabindex","1"),o.textContent=n.content,i._verifyOnlyIfExists(n))return n.href&&(o.href=n.href),(n.skipToCssPath||n.el)&&(o.href="",o.onclick=i=>{i.preventDefault();const s=n.el||t.document.querySelector(n.skipToCssPath);s?(s.focus(),t.document.activeElement===s||s.hasAttribute("tabindex")||(s.setAttribute("tabindex","0"),s.focus(),t.document.activeElement!==s&&e.error(`skip-links-loader: can\`t focus element based on css "${n.skipToCssPath}"`),s.removeAttribute("tabindex"))):e.error(`skip-links-loader: no element found based on css "${n.skipToCssPath}"`)}),n.onclick&&(o.href="",o.onclick=e=>{e.preventDefault(),n.onclick()}),o},_removeExistingSkipLinks(){[...t.document.querySelectorAll("#header .aui-skip-link[aui-skip-link-auto-generated]")].forEach(e=>e.parentNode.removeChild(e))},_reloadAutoMappedElements(){i._skipLinksAutoMapped=[...t.document.querySelectorAll("[aui-skip-link-target]")].filter(e=>e.hasAttribute("aui-skip-link-ignore-visibility")||i._isVisible(e)).map(e=>({content:s.format("Skip to {0}",e.getAttribute("aui-skip-link-target")),el:e}))},_documentContainsCustomTabIndexes:()=>[...t.document.querySelectorAll("[tabindex]")].some(e=>parseInt(e.getAttribute("tabindex"),10)>0)};return i});t.document.addEventListener("DOMContentLoaded",()=>{Object(o.b)(["confluence/skip-links-loader","ajs"],(e,i)=>{(e=>{const i={sidebar:"sidebar",mainContent:"main content",breadcrumbs:"breadcrumbs",search:"search"};s.format("Skip to {0}",i.sidebar),e.addSkipLink({onlyIfExists:"#nav-sidebar",skipToCssPath:"#nav-sidebar",ignoreVisibility:!0,content:s.format("Skip to {0}",i.sidebar)}),e.addSkipLink({onlyIfExists:".ia-splitter .ia-splitter-left .acs-side-bar .acs-side-bar-space-info",skipToCssPath:".ia-splitter .ia-splitter-left .acs-side-bar .acs-side-bar-space-info a",ignoreVisibility:!0,content:s.format("Skip to {0}",i.sidebar)}),e.addSkipLink({onlyIfExists:"#main",skipToCssPath:"#main",ignoreVisibility:!0,content:s.format("Skip to {0}",i.mainContent)}),e.addSkipLink({onlyIfExists:"#breadcrumbs > li",skipToCssPath:"#breadcrumbs",ignoreVisibility:!0,content:s.format("Skip to {0}",i.breadcrumbs)}),e.addSkipLink({onlyIfExists:"#quick-search-query",skipToCssPath:"#quick-search-query",ignoreVisibility:!0,content:s.format("Skip to {0}",i.search)})})(e),e.rerenderSkipLinks(),i.bind("rte-ready rte-quick-edit-ready",()=>e.rerenderSkipLinks())})})}},[[574,0,3,2,4,5,8,1,6]]]);
2753}catch(e){WRMCB(e)};
2754;
2755try {
2756/* module-key = 'com.atlassian.mywork.mywork-confluence-host-plugin:mw-header-anchor', location = 'templates/anchor.soy' */
2757// This file was automatically generated from anchor.soy.
2758// Please don't edit this file by hand.
2759
2760/**
2761 * @fileoverview Templates in namespace MyWork.Templates.Anchor.
2762 */
2763
2764if (typeof MyWork == 'undefined') { var MyWork = {}; }
2765if (typeof MyWork.Templates == 'undefined') { MyWork.Templates = {}; }
2766if (typeof MyWork.Templates.Anchor == 'undefined') { MyWork.Templates.Anchor = {}; }
2767
2768
2769MyWork.Templates.Anchor.tasksFeatureDiscovery = function(opt_data, opt_ignored) {
2770  return '<p>' + soy.$$escapeHtml('See the tasks assigned to you, or created by you, in the Tasks tab of your profile.') + '</p><ul class="mw-tasks-discovery-controls"><li>
2770<a id="mw-tasks-discovery-view" href="' + soy.$$escapeHtml(opt_data.tasksUrl) + '" class="aui-button aui-style"><p>' + soy.$$escapeHtml('View Tasks') + '</p></a></li><li><a id="mw-tasks-discovery-dismiss" href="#">' + soy.$$escapeHtml('Dismiss') + '</a></li></ul>';
2771};
2772if (goog.DEBUG) {
2773  MyWork.Templates.Anchor.tasksFeatureDiscovery.soyTemplateName = 'MyWork.Templates.Anchor.tasksFeatureDiscovery';
2774}
2775
2776}catch(e){WRMCB(e)};
2777;
2778try {
2779/* module-key = 'com.atlassian.mywork.mywork-confluence-host-plugin:mw-header-anchor', location = 'js/miniview-anchor.js' */
2780var MW=MW||{$:jQuery};MW.MV={};var originTarget=window.location.protocol+"//"+window.location.host;
2781AJS.toInit(function(){if(!AJS.Meta||AJS.Meta.get("remote-user")){MW.MV.AnchorManager=function(){function y(){MW.$(document).keydown(function(a){AJS.InlineDialog.current&&27==a.which&&!MW.$(a.target).is(":input")&&AJS.InlineDialog.current.hide()})}function z(){MW.$("#header-menu-bar").find(".ajs-drop-down").each(function(){this.hide()})}function t(a){return MW.$("body",a.document).find("a[href]:visible, button:not([disabled]), input, textarea, select, details,[tabindex]:not([tabindex\x3d'-1']):visible")}function A(a,
2782e){(new IntersectionObserver(function(f){f.forEach(function(n){0<n.intersectionRatio&&e()})})).observe(a)}function B(a,e){function f(b){if("escKey"===b.data)l();else if("getParentConfig"===b.data&&b.origin===location.protocol+"//"+location.host){b=JSON.stringify({parentConfig:{parentUrl:location.href,preload:MW.Dialog.preload,unread:p}});var c=MW.$("#"+a+"-miniview-iframe")[0].contentWindow;c.postMessage(b,originTarget);c.document.addEventListener("keydown",n(c));MW.Dialog.preload&&(MW.Dialog.preload=
2783!1)}}function n(b){return function(c){if("Tab"==c.key){var d=t(b),g=d[0],q=d[d.length-1];d.length?c.shiftKey&&b.document.activeElement===g?l():b.document.activeElement===q&&l():l()}}}function l(){MW.$("#notifications-anchor").focus();u.hide()}var u;window.addEventListener?window.addEventListener("message",f,!1):window.attachEvent("onmessage",f);MW.Dialog=AJS.InlineDialog(MW.$("#"+a+"-anchor"),a+"-miniview",function(b,c,d){0===MW.$(b).children().length?MW.$(b).append(MW.$('\x3ciframe id\x3d"'+a+'-miniview-iframe" src\x3d"'+
2784e+'" frameborder\x3d"0"\x3e\x3c/iframe\x3e')):(b=JSON.stringify({unread:p}),MW.$("#"+a+"-miniview-iframe")[0].contentWindow.postMessage(b,originTarget));z();d()},{width:500,height:520,hideDelay:null,initCallback:function(){u=this;MW.$("#notifications-anchor").attr("aria-expanded","true");var b=MW.$("#"+a+"-miniview-iframe")[0].contentWindow;A(MW.$("#inline-dialog-notifications-miniview")[0],function(){var c=t(b)[0];c?c.focus():b.focus()})},hideCallback:function(){if(!0!==this.preload){var b=JSON.stringify({markAllRead:!0});
2785MW.$("#"+a+"-miniview-iframe")[0].contentWindow.postMessage(b,originTarget);MW.$("#notifications-anchor").attr("aria-expanded","false")}},noBind:!0});MW.Tasks=function(){var b,c=$("#user-menu-link"),d=$("#user-menu-link-content"),g=d.find("#view-mytasks-link"),q=function(h,k,r){k=MyWork.Templates.Anchor.tasksFeatureDiscovery({tasksUrl:AJS.contextPath()+"/plugins/inlinetasks/mytasks.action"});h.html(k);h.find("#mw-tasks-discovery-dismiss").click(function(){b.hide()});r()};return{closeAndDiscoverMyTasks:function(){MW.Dialog.hide();
2786d.is(":visible")||c.trigger("aui-button-invoke");var h=function(){b.hide()};d.one("aui-dropdown2-hide",h);b=AJS.InlineDialog(g,"my-tasks-discovery",q,{hideCallback:function(){b.unbind("click focusin mousedown",k);d.unbind("aui-dropdown2-hide",h);d.is(":visible")&&c.trigger("aui-button-invoke");MW.$("#inline-dialog-my-tasks-discovery").remove()},gravity:"w",useLiveEvents:!0,width:300,noBind:!0});d.find(".user-item.active").removeClass("active");g.addClass("active");g.focus();var k=function(r){r.stopPropagation()};
2787b.on("click focusin mousedown",k);b.show()}}}();MW.$("#"+a+"-anchor").click(function(b){b.preventDefault();MW.$("#"+a+"-miniview-iframe").is(":visible")?MW.Dialog.hide():MW.Dialog.show()});v&&MW.$("#"+a+"-anchor").click()}var w=contextPath+"/plugins/servlet/notifications-miniview",p=0,v=/[?&]show-miniview/.test(window.location.search),x=function(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");a=(new RegExp("[\\?\\#\x26]"+a+"\x3d([^\x26#]*)")).exec(window.location.search);if(null!==a)return decodeURIComponent(a[1].replace(/\+/g,
2788" "))}("show-miniview");x&&(w+="#notification/"+x);var C=function(a){var e=!1,f;return function(){if(e)return f;e=!0;return f=a.apply(this,arguments)}}(function(){MW.Dialog.getOptions().closeOthers=!1;MW.Dialog.preload=!0;MW.Dialog.show();MW.Dialog.hide();MW.Dialog.getOptions().closeOthers=!0});return{setupAnchors:function(){MW.$("#notifications-anchor").html('\x3cdiv class\x3d"badge-i aui-icon aui-icon-small aui-iconfont-notification"\x3e\x3c/div\x3e\x3cspan class\x3d"badge-w"\x3e\x3cspan class\x3d"badge" aria-hidden\x3d"true"\x3e\x3c/span\x3e\x3c/span\x3e').attr({title:"Open Notifications",
2789role:"button","aria-label":"Notifications","aria-expanded":"false"});B("notifications",w);y()},updateNotificationCount:function(a){var e=MW.$("#notifications-anchor"),f=e.find(".badge");e.find(".aui-icon");f.html(9>=a?a:"9+");p=a;0<a?(e.addClass("unread").removeClass("read").attr("aria-label",AJS.format("Notifications: {0} new",a)),e.is(":visible")&&!v&&C()):e.addClass("read").removeClass("unread").attr("aria-label","Notifications")}}}();
2790MW.MV.AnchorManager.setupAnchors();var m=new MW.AnchorUtil(MW.$,contextPath,MW.MV.AnchorManager.updateNotificationCount);m.setupAnchors();
2790MW.$("#notifications-anchor").click(function(){AJS.trigger("analytics",{name:"mywork.host.button.clicked.notifications",data:{}});MW.MV.AnchorManager.updateNotificationCount(0)});document.addEventListener("visibilitychange",function(){document.hidden?m.stopRequests(!0):m.startRequests()},!1);MW.$("body").click(function(){m.startRequests()})}});
2791}catch(e){WRMCB(e)};
2792;
2793try {
2794/* module-key = 'com.atlassian.mywork.mywork-confluence-host-plugin:mw-header-anchor', location = 'js/util/anchor-util.js' */
2795MW.AnchorUtil=function(t,n,p){function e(){3E5>(new Date).getTime()-f&&a||l();f=(new Date).getTime()}function l(){a&&clearTimeout(a);a=setTimeout(function(){c()},m=q(m))}function q(b){return Math.min(3E5>(new Date).getTime()-f?d:1.25*b,g)}function c(b){MW.$.getJSON(r+(b?"?pageid\x3d"+b:""),function(h){var k=1E3*h.timeout;g=1E3*h.maxTimeout||g;k&&k!=d&&(d=k,e());p(h.count)});l()}var d=3E4,a,r=n+"/rest/mywork/latest/status/notification/count",f=(new Date).getTime(),g=3E5,m=0;return{setupAnchors:function(){AJS&&
2796AJS.Meta&&AJS.Meta.get&&("page"===AJS.Meta.get("content-type")||"blogpost"===AJS.Meta.get("content-type"))?c(AJS.Meta.get("page-id")):c();e()},startRequests:e,stopRequests:function(b){window.clearInterval(a);a=void 0;!0===b&&(d=3E4)},updateAnchors:c}};
2797}catch(e){WRMCB(e)};
2798;
2799try {
2800/* module-key = 'com.atlassian.confluence.plugins.confluence-search-ui-plugin:search-ui-client-templates', location = 'soy/search-ui-client-templates.soy' */
2801// This file was automatically generated from search-ui-client-templates.soy.
2802// Please don't edit this file by hand.
2803
2804/**
2805 * @fileoverview Templates in namespace Confluence.Templates.SearchUI.
2806 */
2807
2808if (typeof Confluence == 'undefined') { var Confluence = {}; }
2809if (typeof Confluence.Templates == 'undefined') { Confluence.Templates = {}; }
2810if (typeof Confluence.Templates.SearchUI == 'undefined') { Confluence.Templates.SearchUI = {}; }
2811
2812
2813Confluence.Templates.SearchUI.helpUrl = function(opt_data, opt_ignored) {
2814  return '' + soy.$$escapeHtml("https:\/\/docs.atlassian.com\/confluence\/docs-85\/Search");
2815};
2816if (goog.DEBUG) {
2817  Confluence.Templates.SearchUI.helpUrl.soyTemplateName = 'Confluence.Templates.SearchUI.helpUrl';
2818}
2819
2820}catch(e){WRMCB(e)};
2821;
2822try {
2823/* module-key = 'com.atlassian.confluence.plugins.confluence-search-ui-plugin:confluence-search-ui-plugin-resources', location = '/js/confluence-search-ui-analytics-support.js' */
2824'use strict';
2825
2826/**
2827 * Utility functions for publishing new search ui analytics
2828 * @module confluence/searchui/analytics-support
2829 */
2830define('confluence/search-ui/analytics-support', ['window', 'document', 'confluence/api/event', 'confluence/api/url'], function (window, document, eventApi, url) {
2831    "use strict";
2832
2833    var SEARCH_UI_LEAVE_CONTENT_FROM_SEARCH_RESULT = 'confluence-search-ui-leave-content-from-new-search';
2834    var SEARCH_UI_EDIT_CONTENT_FROM_SEARCH_RESULT = 'confluence-search-ui-edit-content-from-new-search';
2835    /**
2836     * trigger analytic
2837     * @since 6.13.0
2838     * @public
2839     * @param name the analytic name
2840     * @param data the analytic data
2841     */
2842    function triggerAnalytic(name, data) {
2843        data = data || {};
2844        eventApi.trigger('analytics', { name: name, data: data });
2845    }
2846
2847    /**
2848     * @param urlString
2849     * @returns {*} return array of searchId
2850     */
2851    function extractAnalyticsData(urlString) {
2852        var params = url.parse(urlString).queryParams;
2853        return params && params.searchId ? params.searchId : [];
2854    }
2855
2856    /**
2857     * trigger period analytic event when beforeunload event happen
2858     * @param searchId searchId
2859     * @param period the period in millisecond
2860     */
2861    function triggerPeriodEventViewContentFromSearch(searchId, period) {
2862        triggerAnalytic(SEARCH_UI_LEAVE_CONTENT_FROM_SEARCH_RESULT, { searchId: searchId, period: period });
2863    }
2864
2865    /**
2866     * trigger period analytic event when enter editor init.rte
2867     * @param searchId searchId
2868     * @param period the period in millisecond
2869     */
2870    function triggerPeriodEvenEditContentFromSearch(searchId, period) {
2871        triggerAnalytic(SEARCH_UI_EDIT_CONTENT_FROM_SEARCH_RESULT, { searchId: searchId, period: period });
2872    }
2873
2874    /**
2875     * Remove
2876     * @param urlString
2877     * @returns {*}
2878     */
2879    function removeSearchIdUrl(urlString) {
2880        var parsedUrl = url.parse(urlString);
2881        delete parsedUrl.queryParams.searchId;
2882        return url.format(parsedUrl);
2883    }
2884
2885    /**
2886     * Clean analytic parameter
2887     */
2888    function replaceStateAfterCleaningUpAnalyticsParameters() {
2889        var cleanUrl = removeSearchIdUrl(document.URL);
2890        if (document.URL !== cleanUrl) {
2891            window.history.replaceState(null, '', cleanUrl);
2892        }
2893    }
2894
2895    /**
2896     * Init analytic for period
2897     * @since 6.13
2898     * @public
2899     */
2900    function initAnalytic() {
2901        var analyticsData = extractAnalyticsData(document.URL);
2902        var searchId = analyticsData[0];
2903        if (!searchId) {
2904            return;
2905        }
2906
2907        var currentDate = new Date();
2908        window.addEventListener('beforeunload', function () {
2909            var currentTriggerTime = new Date();
2910            var period = currentTriggerTime.getTime() - currentDate.getTime();
2911            triggerPeriodEventViewContentFromSearch(searchId, period);
2912        });
2913        eventApi.bind('init.rte', function () {
2914            var currentTriggerTime = new Date();
2915            var period = currentTriggerTime.getTime() - currentDate.getTime();
2916            triggerPeriodEvenEditContentFromSearch(searchId, period);
2917        });
2918        // Check if browser supports HTML5 replaceState()
2919        if (window.history && window.history.replaceState) {
2920            replaceStateAfterCleaningUpAnalyticsParameters();
2921        }
2922    }
2923
2924    return {
2925        init: initAnalytic
2926    };
2927});
2928
2929}catch(e){WRMCB(e)};
2930;
2931try {
2932/* module-key = 'com.atlassian.confluence.plugins.confluence-search-ui-plugin:confluence-search-ui-plugin-resources', location = '/js/confluence-search-ui-plugin.js' */
2933require(['ajs', 'wrm', 'document', 'confluence/api/logger', 'confluence/meta', 'confluence/api/constants', 'confluence/search-ui/analytics-support'],
2934    function (ajs, wrm, document, logger, meta, constants, analyticsSupport) {
2935        const eventsTriggeringPluginLazyLoad = ['keydown', 'input', 'click'];
2936        const eventsTriggeringForQuickSearchEnabled = ['click', 'focusout', 'focus'];
2937        var searchUI;
2938        var searchInput;
2939        var searchInputButton;
2940        var spinner;
2941        var tooltip;
2942        var isTooltipShown = false;
2943        var isLoading = false;
2944
2945        function toggleIcon() {
2946            searchUI.classList.toggle("hide-icon");
2947        }
2948
2949        function startLoading() {
2950            isLoading = true;
2951            toggleIcon();
2952            spinner.style.display = 'block';
2953        }
2954
2955        function stopLoading() {
2956            isLoading = false;
2957            toggleIcon();
2958            spinner.style.display = 'none';
2959        }
2960
2961        function unregisterHandlers() {
2962            eventsTriggeringPluginLazyLoad.forEach(function (event) {
2963                searchInput.removeEventListener(event, lazyLoadManager);
2964            });
2965            searchInputButton.removeEventListener('click', lazyLoadManagerForIcon);
2966            searchInputButton.removeEventListener('keydown', lazyLoadManagerForIcon);
2967        }
2968
2969        // TODO: would be great remove those events too
2970        function unregisterHandlersForQuickEnabledScope() {
2971            eventsTriggeringForQuickSearchEnabled.forEach(function (event) {
2972                searchInput.removeEventListener(event, handleClickAndFocusEvent);
2973                searchInputButton.removeEventListener(event, handleClickAndFocusEvent);
2974            });
2975        }
2976
2977        function showTooltip() {
2978            if (!isTooltipShown) {
2979                tooltip.style.display = 'block';
2980                isTooltipShown = true;
2981            }
2982        }
2983
2984        function hideTooltip() {
2985            if (isTooltipShown) {
2986                tooltip.style.display = 'none';
2987                isTooltipShown = false;
2988            }
2989        }
2990
2991        function handleClickAndFocusEvent(event) {
2992            if (event && event.type ==='focusout') {
2993                hideTooltip()
2994                return;
2995            }
2996
2997            showTooltip();
2998            event.stopPropagation();
2999        }
3000
3001        function handleInputEvent(event) {
3002            if (event.target.value) {
3003                showTooltip();
3004            } else {
3005                hideTooltip();
3006            }
3007        }
3008
3009        function handleKeyDownEvent(event) {
3010            const ENTER_KEY_CODE = 13;
3011            if (event.keyCode === ENTER_KEY_CODE) {
3012                const searchTerm = event.target.value;
3013                const cql = searchTerm ? '?cql=&queryString=' + encodeURIComponent(searchTerm) : '';
3014                window.location.href = constants.CONTEXT_PATH + '/dosearchsite.action' + cql;
3015            }
3016        }
3017
3018        function handleDocumentClick(event) {
3019            if (searchUI.contains(event.target)) {
3020                showTooltip();
3021            } else {
3022                hideTooltip();
3023            }
3024        }
3025
3026        function lazyLoadManager(event) {
3027            if (!event) return;
3028            if(event.type === 'keydown' && event.keyCode !== 13) return;
3029            lazyLoad();
3030        }
3031
3032        function lazyLoadManagerForIcon(event) {
3033            if (!event) return;
3034            if (event.type === 'keydown'
3035            && event.keyCode !== 13
3036            && event.keyCode !== 32) return;
3037            lazyLoad();
3038        }
3039
3040        function lazyLoad() {
3041            if (isLoading) return;
3042
3043            ajs.trigger('confluence-search-ui-plugin.click-search-panel')
3044
3045            startLoading();
3046            wrm
3047                .require(['wrc!confluence-search-ui-plugin-main'])
3048                .done(function () {
3049                    require(['confluence-search-ui-plugin-main'], function (SearchUI) {
3050                        SearchUI.default.init();
3051                        unregisterHandlers();
3052                        stopLoading();
3053                    });
3054                })
3055                .fail(function () {
3056                    stopLoading();
3057                    logger.error('fail to load confluence-search-ui-plugin-main');
3058                });
3059        }
3060
3061        ajs.toInit(function () {
3062            searchUI = document.getElementById('search-ui');
3063            // login screen doesn't have navigation search
3064            if (!searchUI) {
3065                logger.log('no search-ui element found');
3066                return;
3067            }
3068
3069            analyticsSupport.init();
3070            searchInput = searchUI.querySelector('#quick-search-query');
3071            searchInputButton = searchUI.querySelector('#quick-search-query-button');
3072            spinner = searchUI.querySelector('aui-spinner');
3073            tooltip = searchUI.querySelector('[role=alert]');
3074
3075            if (!meta.get('global-settings-quick-search-enabled')) {
3076                searchInputButton.addEventListener('keydown', handleKeyDownEvent);
3077                searchInput.addEventListener('keydown', handleKeyDownEvent);
3078                searchInput.addEventListener('input', handleInputEvent);
3079
3080                eventsTriggeringForQuickSearchEnabled.forEach(function (event) {
3081                    searchInputButton.addEventListener(event, handleClickAndFocusEvent);
3082                    searchInput.addEventListener(event, handleClickAndFocusEvent);
3083                });
3084
3085                document.addEventListener('click', handleDocumentClick);
3086            } else {
3087                eventsTriggeringPluginLazyLoad.forEach(function (event) {
3088                    searchInput.addEventListener(event, lazyLoadManager);
3089                });
3090                searchInputButton.addEventListener('click', lazyLoadManagerForIcon);
3091                searchInputButton.addEventListener('keydown', lazyLoadManagerForIcon);
3092            }
3093        });
3094    });
3095
3096}catch(e){WRMCB(e)};
3097;
3098try {
3099/* module-key = 'com.atlassian.confluence.plugins.dialog-wizard:dialog-wizard-resources', location = '/soy/dialog-wizard.soy' */
3100// This file was automatically generated from dialog-wizard.soy.
3101// Please don't edit this file by hand.
3102
3103/**
3104 * @fileoverview Templates in namespace Confluence.Templates.DialogWizard.
3105 */
3106
3107if (typeof Confluence == 'undefined') { var Confluence = {}; }
3108if (typeof Confluence.Templates == 'undefined') { Confluence.Templates = {}; }
3109if (typeof Confluence.Templates.DialogWizard == 'undefined') { Confluence.Templates.DialogWizard = {}; }
3110
3111
3112Confluence.Templates.DialogWizard.pageContainer = function(opt_data, opt_ignored) {
3113  return '<div class="dialog-wizard-page-wrapper"><div class="dialog-wizard-page-main"></div><div class="dialog-wizard-page-description">' + ((opt_data.descriptionHeaderLink && opt_data.descriptionHeader) ? '<h3><a href=\'' + soy.$$escapeHtml(opt_data.descriptionHeaderLink) + '\' target=\'_blank\'>' + soy.$$escapeHtml(opt_data.descriptionHeader) + '</a></h3>' : (opt_data.descriptionHeader) ? '<h3>' + soy.$$escapeHtml(opt_data.descriptionHeader) + '</h3>' : '') + '<p>' + soy.$$escapeHtml(opt_data.descriptionContent) + '</p></div></div>';
3114};
3115if (goog.DEBUG) {
3116  Confluence.Templates.DialogWizard.pageContainer.soyTemplateName = 'Confluence.Templates.DialogWizard.pageContainer';
3117}
3118
3119
3120Confluence.Templates.DialogWizard.waitIcon = function(opt_data, opt_ignored) {
3121  return '<img class="wait-icon" src="' + soy.$$escapeHtml("") + '/images/icons/wait.gif">';
3122};
3123if (goog.DEBUG) {
3124  Confluence.Templates.DialogWizard.waitIcon.soyTemplateName = 'Confluence.Templates.DialogWizard.waitIcon';
3125}
3126
3127}catch(e){WRMCB(e)};
3128;
3129try {
3130/* module-key = 'com.atlassian.confluence.plugins.dialog-wizard:dialog-wizard-resources', location = '/js/dialog-wizard.js' */
3131(function(q){function z(g,r){var m=-1;_.each(r,function(t,d){t.id==g&&(m=d)});return r[m+1].id}var A=require("confluence/form-state-control");Confluence.DialogWizard=function(g,r){function m(d,b,f,e,h){var a=_.find(d.wizard.pages,function(u){return u.id==b});h.trigger("pre-render."+b,{soyRenderContext:f,wizardData:e});try{var n=eval(a.templateKey),c=q(n(f))}catch(u){throw Error("wizard points to a non-existent Soy template '"+a.templateKey+"'. Check your web-resources or server logs.");}c.find("a, area, button, input, object, select, textarea").attr("tabindex",
3132"10");a.descriptionContent?(n=q(Confluence.Templates.DialogWizard.pageContainer({descriptionHeaderLink:a.descriptionHeaderLink,descriptionHeader:a.descriptionHeader,descriptionContent:a.descriptionContent})),n.addClass("with-description").find(".dialog-wizard-page-main").append(c)):n=c;var k=b;"create-dialog"==g.id&&(k="create-dialog-"+b);k=g.addPage(k).page[g.curpage];
3132k.addHeader(a.title).addPanel("SinglePanel",n,"singlePanel");k.element.find("form").submit(function(){return!1});a.descriptionContent&&
3133k.element.find(".dialog-panel-body").css({padding:0});Confluence.Binder.autocompleteMultiUser(c);Confluence.Binder.placeholder(c);var y=g.addFullButtonPanel(k,function(u){c.find(".placeholded").val("");var x={},v=c.parent().find("form").serializeArray();_.each(v,function(w){x[w.name]=w.value});v=q.Event("submit."+b);var l={$container:c,wizardData:e,pageData:x},p=q.Deferred();p.done(function(){e.pages[b]=x;var w=l.nextPageId?l.nextPageId:!a.last&&z(b,d.wizard.pages);!l.nextPageId&&a.last?(t(u,l,e,
3134r,h),A.disableElement(g.popup.element.find(":input,a").filter(":visible")),y.prepend(Confluence.Templates.DialogWizard.waitIcon())):m(d,w,f,e,h)});p.fail(function(){AJS.log("dialog aborted by on-submit callback on page: "+b)});l.validationDeferred=p;h.trigger(v,l);l.async||(v.isDefaultPrevented()?p.reject():p.resolve())},null,a.last);y.find(".button-panel-back").click(function(){delete e.pages[b]});y.find(".aui-button-primary").attr("tabindex","10");c.find("input, select, textarea").eq(0).focus();
3135h.trigger("post-render."+b,{$container:c,wizardData:e})}function t(d,b,f,e,h){b.finalUrl?"click"===d.type&&2===d.which?window.open(b.finalUrl).opener=null:window.location=b.finalUrl:(_.each(f.pages,function(a){_.extend(f,a)}),delete f.pages,e(d,f,null,h));return{success:function(a){a()}}}return{newPage:m,doFinalAction:t}}})(AJS.$);
3136}catch(e){WRMCB(e)};
3137;
3138try {
3139/* module-key = 'com.atlassian.confluence.plugins.confluence-business-blueprints:common-template-resources', location = 'com/atlassian/confluence/plugins/blueprint/common/soy/common-templates.soy' */
3140// This file was automatically generated from common-templates.soy.
3141// Please don't edit this file by hand.
3142
3143/**
3144 * @fileoverview Templates in namespace Confluence.Blueprints.Common.Index.
3145 */
3146
3147if (typeof Confluence == 'undefined') { var Confluence = {}; }
3148if (typeof Confluence.Blueprints == 'undefined') { Confluence.Blueprints = {}; }
3149if (typeof Confluence.Blueprints.Common == 'undefined') { Confluence.Blueprints.Common = {}; }
3150if (typeof Confluence.Blueprints.Common.Index == 'undefined') { Confluence.Blueprints.Common.Index = {}; }
3151
3152
3153Confluence.Blueprints.Common.Index.detailsSummaryMacro = function(opt_data, opt_ignored) {
3154  return '<ac:macro ac:name="detailssummary"><ac:parameter ac:name="label">' + soy.$$escapeHtml(opt_data.label) + '</ac:parameter><ac:parameter ac:name="spaces">' + soy.$$escapeHtml(opt_data.spaces) + '</ac:parameter><ac:parameter ac:name="firstcolumn">' + soy.$$escapeHtml(opt_data.firstcolumn) + '</ac:parameter><ac:parameter ac:name="headings">' + soy.$$escapeHtml(opt_data.headings) + '</ac:parameter><ac:parameter ac:name="blankTitle">' + soy.$$escapeHtml(opt_data.blankTitle) + '</ac:parameter><ac:parameter ac:name="blankDescription">' + soy.$$escapeHtml(opt_data.blankDescription) + '</ac:parameter><ac:parameter ac:name="contentBlueprintId">' + soy.$$escapeHtml(opt_data.contentBlueprintId) + '</ac:parameter><ac:parameter ac:name="blueprintModuleCompleteKey">' + soy.$$escapeHtml(opt_data.blueprintModuleCompleteKey) + '</ac:parameter><ac:parameter ac:name="createButtonLabel">' + soy.$$escapeHtml(opt_data.createButtonLabel) + '</ac:parameter></ac:macro>';
3155};
3156if (goog.DEBUG) {
3157  Confluence.Blueprints.Common.Index.detailsSummaryMacro.soyTemplateName = 'Confluence.Blueprints.Common.Index.detailsSummaryMacro';
3158}
3159
3160
3161Confluence.Blueprints.Common.Index.createFromTemplateMacro = function(opt_data, opt_ignored) {
3162  return '<ac:macro ac:name="create-from-template"><ac:parameter ac:name="blueprintModuleCompleteKey">' + soy.$$escapeHtml(opt_data.moduleKey) + '</ac:parameter><ac:parameter ac:name="buttonLabel">' + soy.$$escapeHtml(opt_data.buttonLabel) + '</ac:parameter><ac:parameter ac:name="spaceKey">' + soy.$$escapeHtml(opt_data.spaceKey) + '</ac:parameter><ac:parameter ac:name="templateName">' + soy.$$escapeHtml(opt_data.templateName) + '</ac:parameter></ac:macro>';
3163};
3164if (goog.DEBUG) {
3165  Confluence.Blueprints.Common.Index.createFromTemplateMacro.soyTemplateName = 'Confluence.Blueprints.Common.Index.createFromTemplateMacro';
3166}
3167
3168}catch(e){WRMCB(e)};
3169;
3170try {
3171/* module-key = 'com.atlassian.confluence.plugins.confluence-business-blueprints:meeting-notes-resources', location = 'com/atlassian/confluence/plugins/meetingnotes/soy/how-to.soy' */
3172// This file was automatically generated from how-to.soy.
3173// Please don't edit this file by hand.
3174
3175/**
3176 * @fileoverview Templates in namespace Confluence.Blueprints.Meeting.Notes.
3177 */
3178
3179if (typeof Confluence == 'undefined') { var Confluence = {}; }
3180if (typeof Confluence.Blueprints == 'undefined') { Confluence.Blueprints = {}; }
3181if (typeof Confluence.Blueprints.Meeting == 'undefined') { Confluence.Blueprints.Meeting = {}; }
3182if (typeof Confluence.Blueprints.Meeting.Notes == 'undefined') { Confluence.Blueprints.Meeting.Notes = {}; }
3183
3184
3185Confluence.Blueprints.Meeting.Notes.howTo = function(opt_data, opt_ignored) {
3186  return '<h1>' + soy.$$escapeHtml('With meeting notes you can...') + '</h1><ol class="howto-steps"><li class="howto-step"><div><h3>' + soy.$$escapeHtml('Crowd-source your agenda') + '</h3><p>' + soy.$$escapeHtml('Distribute an agenda and keep meetings focused.') + '</p></div></li><li class="howto-step"><div><h3>' + soy.$$escapeHtml('Capture meeting minutes') + '</h3><p>' + soy.$$escapeHtml('Take notes and make them available to everyone.') + '</p></div></li><li class="howto-step"><div><h3>' + soy.$$escapeHtml('Create and assign tasks') + '</h3><p>' + soy.$$escapeHtml('Assign action items for attendees to work on afterward.') + '</p></div></li></ol>';
3187};
3188if (goog.DEBUG) {
3189  Confluence.Blueprints.Meeting.Notes.howTo.soyTemplateName = 'Confluence.Blueprints.Meeting.Notes.howTo';
3190}
3191
3192}catch(e){WRMCB(e)};
3193;
3194try {
3195/* module-key = 'com.atlassian.confluence.plugins.confluence-business-blueprints:meeting-notes-resources', location = 'com/atlassian/confluence/plugins/meetingnotes/soy/user-mention.soy' */
3196// This file was automatically generated from user-mention.soy.
3197// Please don't edit this file by hand.
3198
3199/**
3200 * @fileoverview Templates in namespace Confluence.Templates.Meeting.Notes.
3201 */
3202
3203if (typeof Confluence == 'undefined') { var Confluence = {}; }
3204if (typeof Confluence.Templates == 'undefined') { Confluence.Templates = {}; }
3205if (typeof Confluence.Templates.Meeting == 'undefined') { Confluence.Templates.Meeting = {}; }
3206if (typeof Confluence.Templates.Meeting.Notes == 'undefined') { Confluence.Templates.Meeting.Notes = {}; }
3207
3208
3209Confluence.Templates.Meeting.Notes.userMention = function(opt_data, opt_ignored) {
3210  opt_data = opt_data || {};
3211  return '' + ((opt_data.userkey) ? '<li><p><ac:link><ri:user ri:userkey="' + soy.$$escapeHtml(opt_data.userkey) + '" /></ac:link></p></li><li><p><ac:placeholder ac:type="mention">' + soy.$$escapeHtml('@mention a person to add them as an attendee and they will be notified.') + '</ac:placeholder></p></li>' : '<li><p><ac:placeholder ac:type="mention">' + soy.$$escapeHtml('@mention a person to add them as an attendee and they will be notified.') + '</ac:placeholder></p></li>');
3212};
3213if (goog.DEBUG) {
3214  Confluence.Templates.Meeting.Notes.userMention.soyTemplateName = 'Confluence.Templates.Meeting.Notes.userMention';
3215}
3216
3217}catch(e){WRMCB(e)};
3218;
3219try {
3220/* module-key = 'com.atlassian.troubleshooting.plugin-confluence:atst-common', location = '
3220js/ajs-amd.js' */
3221define('troubleshooting/ajs', [], function () {
3222    'use strict';
3223
3224    return AJS;
3225});
3226}catch(e){WRMCB(e)};
3227;
3228try {
3229/* module-key = 'com.atlassian.troubleshooting.plugin-confluence:atst-healthcheck-sensors', location = 'js/sensors/page-protocols.js' */
3230define('troubleshooting/sensors/page-protocols', ['troubleshooting/ajs'], function(AJS) {
3231    var baseUrl = AJS.contextPath();
3232    var hasPerfData = window.performance && typeof window.performance.getEntriesByType === 'function';
3233
3234    // WARNING: This is a rough assumption based on how the WRM works.
3235    // Consuming this from the WRM would be a better option, but meh.
3236    // See: https://bitbucket.org/atlassian/atlassian-plugins-webresource/src/master/atlassian-plugins-webresource/src/main/java/com/atlassian/plugin/webresource/WebResourceUrlProviderImpl.java
3237    // See also: https://stash.atlassian.com/projects/CP/repos/static-assets-url/browse/src/main/resources/ui/health-checks/health-checks.js
3238    var WRM_STATIC_ASSET_REGEX = new RegExp(baseUrl + '/s/.+?/_/');
3239
3240    function isStaticResource(resource) {
3241        return WRM_STATIC_ASSET_REGEX.test(resource.name);
3242    }
3243
3244    function getNextHopData(resource) {
3245        return (resource && resource.nextHopProtocol) || 'unknown';
3246    }
3247
3248    function unique(elem, pos, arr) {
3249        return arr.indexOf(elem) === pos;
3250    }
3251
3252    return {
3253        isWorking: function() {
3254            return hasPerfData;
3255        },
3256        getName: function() {
3257          return 'page-protocols';
3258        },
3259        getData: function() {
3260            var resources = window.performance.getEntriesByType('resource');
3261            var navigation = window.performance.getEntriesByType('navigation');
3262            var resourceProtocols = resources
3263                .filter(isStaticResource)
3264                .map(getNextHopData)
3265                .filter(unique)
3266                .sort();
3267            if (!resourceProtocols.length) {
3268                resourceProtocols.push('unknown');
3269            }
3270            return {
3271                resourceProtocols: resourceProtocols,
3272                navigationProtocol: getNextHopData(navigation[0]),
3273                userAgent: navigator.getUserAgent && "use-js-client-hints" || navigator.userAgent
3274            };
3275        }
3276    }
3277});
3278
3279}catch(e){WRMCB(e)};
3280;
3281try {
3282/* module-key = 'com.atlassian.troubleshooting.plugin-confluence:atst-healthcheck-sensors', location = 'js/sensors.js' */
3283require([
3284    'troubleshooting/sensors/page-protocols',
3285    'troubleshooting/ajs'
3286], function(
3287    protocolSensor,
3288    AJS
3289) {
3290    var sensors = [protocolSensor];
3291
3292    AJS.toInit(function() {
3293
3294        function hash(str) {
3295            var hash = 0;
3296            for (var i = 0; i < str.length; ++i) {
3297                hash = 31 * hash + str.charCodeAt(i);
3298                hash |= 0; // this reduces the number to 32bits and prevents Infinity
3299            }
3300            return hash;
3301        }
3302
3303        //this handles cases when the user disabled access to local storage
3304        var localStorageWrapper = {
3305            getWithDefaultOnError: function(sensorName, defaultValue) {
3306                try {
3307                    return window.localStorage.getItem(sensorName) || "0";
3308                } catch (e) {
3309                    return defaultValue;
3310                }
3311            },
3312            setItemQuietly: function (key, value) {
3313                try {
3314                    window.localStorage.setItem(key, value);
3315                } catch (ignored) {
3316                }
3317            }
3318        };
3319
3320        // Iterate through each sensor and ingest any data it has for us...
3321        // but only if it's actually working properly in this client.
3322        sensors.forEach(function(sensor) {
3323            if (!sensor.isWorking()) {
3324                return
3325            }
3326
3327            var sensorData = {};
3328            var newData = sensor.getData();
3329            for (var key in newData) {
3330                if (newData.hasOwnProperty(key)) {
3331                    sensorData[key] = newData[key];
3332                }
3333            }
3334
3335            var sensorName = 'atst.healthcheck.sensors.' + sensor.getName();
3336            var currentHash = hash(JSON.stringify(sensorData)).toString(36);
3337            var previousHash = localStorageWrapper.getWithDefaultOnError(sensorName, currentHash);
3338            if (previousHash===currentHash && Math.random()>0.01) {
3339                return;
3340            }
3341            // What's one more analytics event to the world? A drop in the data ocean.
3342            AJS.trigger('analytics', {
3343                name: sensorName,
3344                data: sensorData
3345            });
3346            localStorageWrapper.setItemQuietly(sensorName, currentHash);
3347        });
3348
3349    });
3350});
3351
3352}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.