WRMCB = function (e) { var c = console; if (c && c.log && c.error) { c.log('Error running batched script.'); c.error(e); } } ; try { /* module-key = 'com.atlassian.auiplugin:split_aui.splitchunk.036a05e5ff', location = 'aui.chunk.74eedc2ab6f4eddc8452--e9da9d38940a4110e5a8.js' */ (window.__auiJsonp = window.__auiJsonp || []).push([["aui.splitchunk.036a05e5ff"], { "C/C5": function (e, t, a) { "use strict"; Object.defineProperty(t, "__esModule", {value: !0}), t.NavigationEl = void 0; var i = a("HH5i"), n = o(a("+x/D")), r = o(a("4dFR")), l = o(a("KloK")), s = o(a("6RZY")); function o(e) { return e && e.__esModule ? e : {default: e} } function u(e) { if (this.$el = (0, n.default)(e).closest(".aui-nav"), this.$el.length > 1) return this.$el.map(function (e, t) { return new u(t) })[0]; if (this.$el.data("aui-navigation")) return this.$el.data("aui-navigation"); this.$el.data("aui-navigation", this), this.$treeParent = this.$el.parent("li[aria-expanded]"), this.$subtreeToggleIcon = this.$treeParent.children(".aui-nav-subtree-toggle").children("span.aui-icon"), this.hideMoreItems(), this.$el.children("li:has(.aui-nav-selected)").addClass("aui-nav-child-selected"); var t = this.$el.children(".aui-nav-selected"); return t.parents(".aui-nav > [aria-expanded=false]").add(t.filter("[aria-expanded=false]")).each(function () { d((0, n.default)(this).children(".aui-nav")).expand() }), this.$el.find("> li[aria-expanded] > .aui-nav-subtree-toggle").on("click", function () { d((0, n.default)(this).siblings(".aui-nav")).toggle() }), this } u.prototype.isNested = function () { return 1 === this.$treeParent.length }, u.prototype.isCollapsed = function () { return "false" === this.$treeParent.attr("aria-expanded") }, u.prototype.expand = function () { return this.$treeParent.attr("aria-expanded", "true"), this.$subtreeToggleIcon.removeClass("aui-iconfont-collapsed").addClass("aui-iconfont-expanded"), this.hideMoreItems(), this }, u.prototype.collapse = function () { return this.$treeParent.attr("aria-expanded", "false"), this.$subtreeToggleIcon.removeClass("aui-iconfont-expanded").addClass("aui-iconfont-collapsed"), this }, u.prototype.toggle = function () { return this.isCollapsed() ? this.expand() : this.collapse(), this }, u.prototype.hideMoreItems = function () { if (this.$el.is(".aui-nav:not([aria-expanded=false]) [data-more]")) { var e = this.$el.attr("data-more") || "More\u00e2\u0080\u00a6", t = Math.abs(parseInt(this.$el.attr("data-more-limit"))) || 5, a = this.$el.children("li"), r = a.length <= t + 1, l = a.filter(".aui-nav-selected").length, s = a.filter(".aui-nav-more").length; if (r || l || s) return this; (0, n.default)("
  • ", { class: "aui-nav-more", "aria-hidden": "true" }).append((0, n.default)("", { href: "#", class: "aui-nav-item", text: e, click: function (e) { e.preventDefault(), (0, n.default)(this).parent().remove() } })).insertAfter(a.eq(t - 1)) } return this }; var d = (0, s.default)("navigation", u), h = (0, r.default)("aui-nav", { type: r.default.type.CLASSNAME, attached: function (e) { new u(e) }, detached: function (e) { (0, n.default)(e).removeData() } }); (0, l.default)("navigation", d), t.default = d, t.NavigationEl = h }, "eC/R": function (e, t, a) { "use strict"; Object.defineProperty(t, "__esModule", {value: !0}), t.NavigationEl = t.navigation = void 0; var i = a("C/C5"); Object.defineProperty(t, "navigation", { enumerable: !0, get: function () { return function (e) { return e && e.__esModule ? e : {default: e} }(i).default } }), Object.defineProperty(t, "NavigationEl", { enumerable: !0, get: function () { return i.NavigationEl } }), a("pDZt") } }]); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.auiplugin:split_aui.component.sidebar', location = 'aui.chunk.4889f12456410ef37839--b59d91c525901b11a2a0.js' */ (window.__auiJsonp = window.__auiJsonp || []).push([["aui.component.sidebar"], { "5njU": function (e, t, i) { "use strict"; Object.defineProperty(t, "__esModule", {value: !0}); var o = n(i("+x/D")); function n(e) { return e && e.__esModule ? e : {default: e} } function a(e) { return (0, o.default)(e).clone().removeAttr("id") } (0, n(i("KloK")).default)("clone", a), t.default = a, e.exports = t.default }, "6wVx": function (e, t, i) { }, Wzva: function (e, t, i) { "use strict"; Object.defineProperty(t, "__esModule", {value: !0}); var o = g(i("+x/D")); i("XphB"), i("C/C5"); var n = i("HH5i"), a = g(i("5njU")), s = function (e) { if (e && e.__esModule) return e; var t = {}; if (null != e) for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]); return t.default = e, t }(i("bPPT")), r = g(i("KloK")), u = g(i("h2ur")), l = g(i("kV0L")), d = g(i("+ay7")), p = g(i("XxUV")), c = g(i("4dFR")), f = g(i("OEua")), h = g(i("6RZY")), v = g(i("mMNQ")); function g(e) { return e && e.__esModule ? e : {default: e} } function b(e) { return e.offset().top } function m(e) { this.$el = (0, o.default)(e), this.$el.length && (this.$body = (0, o.default)("body"), this.$wrapper = this.$el.children(".aui-sidebar-wrapper"), this.$body.addClass("aui-page-sidebar"), this._previousScrollTop = null, this._previousViewportHeight = null, this._previousViewportWidth = null, this._previousOffsetTop = null, this.submenus = new _, function (e) { if (!(0, o.default)(".aui-sidebar").length) return; (function (e) { e.$el.on("mouseenter mouseleave click focus", e.collapsedTriggersSelector, function (t) { var i = (0, o.default)(t.target); T(e, i) }) })(e), u.default && (0, p.default)("only screen and (max-device-width:1024px)") && (0, o.default)("body").addClass("aui-page-sidebar-touch"); var t = null, i = function () { null === t && (t = requestAnimationFrame(function () { e.reflow(), t = null })) }; (0, o.default)(window).on("scroll resize", i), i(), e.isAnimated() && e.$el.on("transitionend webkitTransitionEnd", function () { e.$el.trigger(o.default.Event(y + (e.isCollapsed() ? "collapse-end" : "expand-end"))) }); e.$el.on("click", ".aui-sidebar-toggle", function (t) { t.preventDefault(), e.toggle() }), (0, o.default)(".aui-page-panel").on("click", function () { !e.isCollapsed() && e.isViewportNarrow() && e.collapse() }); var a = function (t) { (function (e) { return !(e.which !== d.default.LEFT_SQUARE_BRACKET || e.shiftKey || e.ctrlKey || e.metaKey || (0, l.default)(e.target)) })(t) && e.toggle() }; function s(e) { return e.keyCode === d.default.TAB && !e.shiftKey && !e.altKey } (0, o.default)(document).on("keypress", a), e._remove = function () { this._removeAllTooltips(), (0, o.default)(this.inlineDialogSelector).remove(), this.$el.off(), this.$el.remove(), (0, o.default)(document).off("keypress", a), (0, o.default)(window).off("scroll resize", i) }, e.$el.on("touchend", function (t) { e.isCollapsed() && (e.expand(), t.preventDefault()) }), e.$el.on("mouseenter focus", e.collapsedTriggersSelector, function () { if (e.isCollapsed()) { var t = (0, o.default)(this); $(t) || D(t) } }), e.$el.on("click blur mouseleave", e.collapsedTriggersSelector, function () { e.isCollapsed() && P((0, o.default)(this)) }), e.$el.on("mouseenter focus", e.toggleSelector, function () { var t = (0, o.default)(this); e.isCollapsed() ? t.data("tooltip", "Expand sidebar ( [ )") : t.data("tooltip", "Collapse sidebar ( [ )"), D(t) }), e.$el.on("click blur mouseleave", e.toggleSelector, function () { P((0, o.default)(this)) }), e.$el.on("keydown", e.collapsedTriggersSelector, function (t) { if (e.isCollapsed()) { var i = t.target, n = x(i); if (!n) return; var a = (0, o.default)(n); s(t) && n.open && (t.preventDefault(), function (e) { e.attr("persistent", ""), e.find(":aui-tabbable").first().focus(), setTimeout(function () { e.removeAttr("persistent") }, 100) }(a), a.on("keydown", function (e) { ((function (e) { return e.keyCode === d.default.TAB && e.shiftKey })(e) && function (e, t) { return e === t.find(":aui-tabbable")[0] }(e.target, a) || s(e) && function (e, t) { return e === t.find(":aui-tabbable").last()[0] }(e.target, a)) && (i.focus(), (0, o.default)(this).off("keydown"), S()) })) } }) }(this), function (e) { (0, o.default)(e.collapsedTriggersSelector).each(function () { var t = (0, o.default)(this); T(e, t) }) }(this)) } var y = "_aui-internal-sidebar-"; function w(e) { return o.default.map(e.split(" "), function (e) { return y + e }).join(" ") } function k() { return document.querySelectorAll(m.prototype.inlineDialogSelector) } function _() { this.inlineDialog = null } function C(e) { return e.is("a") ? e.next(".aui-nav") : e.children(".aui-nav, hr") } function x(e) { var t = e.getAttribute("aria-controls"); return document.getElementById(t) } function $(e) { return 0 !== C(e).length } function S() { var e = k(); Array.prototype.forEach.call(e, function (e) { e.open = !1 }) } function T(e, t) { if (!t.data("_aui-sidebar-submenu-constructed") && (t.data("_aui-sidebar-submenu-constructed", !0), $(t))) { var i = document.createElement("aui-inline-dialog"), n = (0, f.default)("sidebar-submenu"); return t.attr("aria-controls", n), t.attr("data-aui-trigger", ""), c.default.init(t), i.setAttribute("id", n), i.setAttribute("alignment", "right top"), i.setAttribute("aria-hidden", "true"), i.setAttribute("contained-by", "viewport"), e.isCollapsed() && i.setAttribute("responds-to", "hover"), (0, o.default)(i).addClass(m.prototype.inlineDialogClass), document.body.appendChild(i), c.default.init(i), function (e, t, i) { i.addEventListener("aui-layer-show", function (n) { if (e.isCollapsed()) { if (!function (e) { return "AUI-INLINE-DIALOG" !== e.target.tagName }(n) && !function (e) { return !e.target.classList.contains("aui-sidebar-submenu-dialog") }(n)) { var s = o.default.Event("aui-sidebar-submenu-before-show"); t.trigger(s, i), s.isDefaultPrevented() ? n.preventDefault() : function (e, t) { e.addClass("active"), t.innerHTML = V; var i = e.is("a") ? e.text() : e.children(".aui-nav-heading").text(), n = (0, o.default)(t).find(".aui-navgroup-inner"); n.children(".aui-nav-heading").attr("title", i).children("strong").text(i), function (e) { var t = (0, a.default)(e); (0, v.default)(t, f.default), t.hasClass("aui-expander-content") && (t.find(".aui-expander-cutoff").remove(), t.removeClass("aui-expander-content")); return t }(C(e)).appendTo(n) }(t, i) } } else n.preventDefault() }), i.addEventListener("aui-layer-hide", function () { !function (e) { e.removeClass("active") }(t) }) }(e, t, i), i } } m.prototype.on = function () { var e = arguments[0], t = Array.prototype.slice.call(arguments, 1), i = w(e); return this.$el.on.apply(this.$el, [i].concat(t)), this }, m.prototype.off = function () { var e = arguments[0], t = Array.prototype.slice.call(arguments, 1), i = w(e); return this.$el.off.apply(this.$el, [i].concat(t)), this }, m.prototype.setHeight = function (e, t, i) { var o = Math.max(0, i - e); return this.$wrapper.height(t - o), this }, m.prototype.setTopPosition = function () { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : window.pageYOffset; return this.$wrapper.toggleClass("aui-is-docked", e > b(this.$el)), this }, m.prototype.setPosition = s.fn(m.prototype.setTopPosition, "Sidebar.setPosition", { removeInVersion: "9.0.0", sinceVersion: "7.6.1", alternativeName: "Sidebar.setTopPosition" }), m.prototype.setLeftPosition = function () { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : window.pageXOffset; return this.$wrapper.hasClass("aui-is-docked") && this.$wrapper.css({left: -e}), this }, m.prototype.setCollapsedState = function (e) { var t = {collapsed: {}, expanded: {}}; t.collapsed.narrow = { narrow: o.default.noop, wide: function (t) { t._expand(e, !0) } }, t.collapsed.wide = { narrow: o.default.noop, wide: o.default.noop }, t.expanded.narrow = { narrow: o.default.noop, wide: function (e) { e.$body.removeClass("aui-sidebar-collapsed"), e.$el.removeClass("aui-sidebar-fly-out") } }, t.expanded.wide = { narrow: function (e) { e._collapse(!0) }, wide: o.default.noop }; var i = this.isCollapsed() ? "collapsed" : "expanded", n = this.isViewportNarrow(this._previousViewportWidth) ? "narrow" : "wide", a = this.isViewportNarrow(e) ? "narrow" : "wide"; return t[i][n][a](this), this }, m.prototype._collapse = function (e) { if (this.isCollapsed()) return this; var t = o.default.Event(y + "collapse-start", {isResponsive: e}); return this.$el.trigger(t), t.isDefaultPrevented() ? this : (this.$body.addClass("aui-sidebar-collapsed"), this.$el.attr("aria-expanded", "false"), this.$el.removeClass("aui-sidebar-fly-out"), this.$el.find(this.submenuTriggersSelector).attr("tabindex", 0), (0, o.default)(this.inlineDialogSelector).attr("responds-to", "hover"), this.isAnimated() || this.$el.trigger(o.default.Event(y + "collapse-end", {isResponsive: e})), this) }, m.prototype.collapse = function () { return this._collapse(!1) }, m.prototype._expand = function (e, t) { var i = o.default.Event(y + "expand-start", {isResponsive: t}); if (this.$el.trigger(i), i.isDefaultPrevented()) return this; var n = this.isViewportNarrow(e); return this.$el.attr("aria-expanded", "true"), this.$body.toggleClass("aui-sidebar-collapsed", n), this.$el.toggleClass("aui-sidebar-fly-out", n), this.$el.find(this.submenuTriggersSelector).removeAttr("tabindex"), (0, o.default)(this.inlineDialogSelector).removeAttr("responds-to"), this.isAnimated() || this.$el.trigger(o.default.Event(y + "expand-end", {isResponsive: t})), this }, m.prototype.expand = function () { return this.isCollapsed() && this._expand(this._previousViewportWidth, !1), this }, m.prototype.isAnimated = function () { return this.$el.hasClass("aui-is-animated") }, m.prototype.isCollapsed = function () { return "false" === this.$el.attr("aria-expanded") }, m.prototype.isViewportNarrow = function (e) { return (e = void 0 === e ? this._previousViewportWidth : e) < 1240 }, m.prototype._removeAllTooltips = function () { (0, o.default)(this.tooltipSelector).remove() }, m.prototype.responsiveReflow = function (e, t) { if (e) { if (!this.isCollapsed() && this.isViewportNarrow(t)) { var i = this.isAnimated(); i && this.$el.removeClass("aui-is-animated"), this.collapse(), i && (this.$el[0].offsetHeight, this.$el.addClass("aui-is-animated")) } } else t !== this._previousViewportWidth && this.setCollapsedState(t) }, m.prototype.reflow = function () { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : window.pageYOffset, t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : document.documentElement.clientHeight, i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : window.innerWidth, o = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : document.documentElement.scrollHeight, n = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : window.pageXOffset, a = b(this.$el), s = null === this._previousViewportWidth; if (e !== this._previousScrollTop || t !== this._previousViewportHeight || a !== this._previousOffsetTop) { this.isCollapsed() && !s && e !== this._previousScrollTop && this._removeAllTooltips(); var r = this.$body.hasClass("aui-page-sidebar-touch"), u = e !== this._previousScrollTop && (e < 0 || e + t > o); r || !s && u || (this.setHeight(e, t, a), this.setTopPosition(e)) } if (n !== this._previousScrollLeft && this.setLeftPosition(n), "false" !== this.$el.attr("data-aui-responsive")) this.responsiveReflow(s, i); else { var l = !this.isCollapsed() && this.isViewportNarrow(i); this.$el.toggleClass("aui-sidebar-fly-out", l) } return this._previousScrollTop = e, this._previousViewportHeight = t, this._previousViewportWidth = i, this._previousOffsetTop = a, this._previousScrollLeft = n, this }, m.prototype.toggle = function () { return this.isCollapsed() ? (this.expand(), this._removeAllTooltips()) : this.collapse(), this }, m.prototype.submenuTriggersSelector = ".aui-sidebar-group:not(.aui-sidebar-group-tier-one)", m.prototype.collapsedTriggersSelector = [m.prototype.submenuTriggersSelector, ".aui-sidebar-group.aui-sidebar-group-tier-one > .aui-nav > li > a", ".aui-sidebar-footer > .aui-sidebar-settings-button"].join(", "), m.prototype.toggleSelector = ".aui-sidebar-footer > .aui-sidebar-toggle", m.prototype.tooltipSelector = ".aui-sidebar-section-tooltip", m.prototype.inlineDialogClass = "aui-sidebar-submenu-dialog", m.prototype.inlineDialogSelector = "." + m.prototype.inlineDialogClass, _.prototype.submenu = function (e) { return M(), C(e) }, _.prototype.hasSubmenu = function (e) { return M(), $(e) }, _.prototype.submenuHeadingHeight = function () { return M(), 34 }, _.prototype.isShowing = function () { return M(), m.prototype.isSubmenuVisible() }, _.prototype.show = function (e, t) { M(), function (e) { x(e).open = !0 }(t) }, _.prototype.hide = function () { M(), S() }, _.prototype.inlineDialogShowHandler = function () { M() }, _.prototype.inlineDialogHideHandler = function () { M() }, _.prototype.moveSubmenuToInlineDialog = function () { M() }, _.prototype.restoreSubmenu = function () { M() }, m.prototype.getVisibleSubmenus = function () { return Array.prototype.filter.call(k(), function (e) { return e.open }) }, m.prototype.isSubmenuVisible = function () { return this.getVisibleSubmenus().length > 0 }; var V = '
    '; var A = { trigger: "manual", gravity: "w", className: "aui-sidebar-section-tooltip", title: function () { var e = (0, o.default)(this); return e.is("a") ? e.attr("title") || e.find(".aui-nav-item-label").text() || e.data("tooltip") : e.children(".aui-nav").attr("title") || e.children(".aui-nav-heading").text() } }; function D(e) { e.tooltip(A).tooltip("show"); var t = e.data("tipsy") && e.data("tipsy").$tip; t && t.css({opacity: ""}).addClass("tooltip-shown") } function P(e) { var t = e.data("tipsy") && e.data("tipsy").$tip; if (t) { var i = t.css("transition-duration"); if (i) { var o = i.indexOf("ms") >= 0 ? parseInt(i.substring(0, i.length - 2), 10) : 1e3 * parseInt(i.substring(0, i.length - 1), 10); setTimeout(function () { t.hasClass("tooltip-shown") && (e.tooltip("hide"), t.removeClass("tooltip-shown")) }, o) } else t.removeClass("tooltip-shown") } } var E = (0, h.default)("sidebar", m); (0, o.default)(function () { E(".aui-sidebar") }); var M = s.getMessageLogger("Sidebar.submenus", {removeInVersion: "9.0.0", sinceVersion: "5.8.0"}); (0, r.default)("sidebar", E), t.default = E, e.exports = t.default }, XxUV: function (e, t, i) { "use strict"; Object.defineProperty(t, "__esModule", {value: !0}), t.default = function (e) { if (window.matchMedia) return window.matchMedia(e).matches; var t = document.createElement("style"); t.type = "text/css", t.id = "testMedia", t.innerText = "@media " + e + " { #testMedia { width: 1px; } }", document.head.appendChild(t); var i = "1px" === window.getComputedStyle(t, null).width; return t.parentNode.removeChild(t), i }, e.exports = t.default }, h2ur: function (e, t, i) { "use strict"; Object.defineProperty(t, "__esModule", {value: !0}); var o = window.DocumentTouch, n = "ontouchstart" in window || o && document instanceof o; t.default = n, e.exports = t.default }, kV0L: function (e, t, i) { "use strict"; Object.defineProperty(t, "__esModule", {value: !0}), t.default = function (e) { return "value" in e || e.isContentEditable }, e.exports = t.default }, mMNQ: function (e, t, i) { "use strict"; Object.defineProperty(t, "__esModule", {value: !0}), t.default = function (e, t) { var i = (0, o.default)("
    "); i.append(e), i.find("[id]").each(function (e, o) { var a = t(o.id + "-"); !function (e, t, i) { n(e, t, i, "aria-controls"), n(e, t, i, "aria-owns") }(i, o.id, a), o.id = a }) }; var o = function (e) { return e && e.__esModule ? e : {default: e} }(i("+x/D")); function n(e, t, i, o) { e.find("[" + o + "]").attr(o, function (e, o) { return t === o ? i : void 0 }) } e.exports = t.default }, pju7: function (e, t, i) { "use strict"; Object.defineProperty(t, "__esModule", {value: !0}), t.sidebar = void 0; var o = i("Wzva"); Object.defineProperty(t, "sidebar", { enumerable: !0, get: function () { return function (e) { return e && e.__esModule ? e : {default: e} }(o).default } }), i("FStl"), i("Q0fs"), i("rSV2"), i("nqD9"), i("iQXk"), i("IxCr"), i("S3ao"), i("YQ7q"), i("pDZt"), i("eC/R"), i("Rvtc"), i("Nu/Z"), i("6wVx") } }, [["pju7", "runtime", "aui.splitchunk.vendors--894c8113d9", "aui.splitchunk.vendors--b47d4b691d", "aui.splitchunk.vendors--084821f40b", "aui.splitchunk.vendors--be1eb78c1a", "aui.splitchunk.vendors--23f50a6f00", "aui.splitchunk.0d131bcbf1", "aui.splitchunk.b0831cc7d0", "aui.splitchunk.444efc83be", "aui.splitchunk.78b1c5d416", "aui.splitchunk.572a8bf5cd", "aui.splitchunk.d49cf794d2", "aui.splitchunk.54d3f16c20", "aui.splitchunk.9bbf750f52", "aui.splitchunk.e54c7c7304", "aui.splitchunk.336ae4f9e7", "aui.splitchunk.fb15cffa72", "aui.splitchunk.56dfb54d0c", "aui.splitchunk.f1e06f97a4", "aui.splitchunk.479fe6ee76", "aui.splitchunk.f673ef53ac", "aui.splitchunk.8659b532c1", "aui.splitchunk.908fe798b4", "aui.splitchunk.5f851f97df", "aui.splitchunk.d0110a864f", "aui.splitchunk.afa5039e04", "aui.splitchunk.bff3715233", "aui.splitchunk.c750721820", "aui.splitchunk.ed80e00f15", "aui.splitchunk.6d6f245ed3", "aui.splitchunk.084821f40b", "aui.splitchunk.5b8c290363", "aui.splitchunk.baa83dbaf9", "aui.splitchunk.b2ecdd4179", "aui.splitchunk.36cd9d521c", "aui.splitchunk.be1eb78c1a", "aui.splitchunk.b652d2668a", "aui.splitchunk.d925afe2c0", "aui.splitchunk.5b7fdbd666", "aui.splitchunk.8705a83fa5", "aui.splitchunk.23f50a6f00", "aui.splitchunk.d727dd207f", "aui.splitchunk.8a641c03a4", "aui.splitchunk.141abf7fb1", "aui.splitchunk.543254b237", "aui.splitchunk.a2b2c71491", "aui.splitchunk.036a05e5ff"]]]); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.auiplugin:split_aui.component.dialog2', location = 'aui.chunk.e00e7f9f159aeeec8de2--de6663ce9a7a3034f8d1.js' */ (window.__auiJsonp = window.__auiJsonp || []).push([["aui.component.dialog2"], { "0+IH": function (i, e, t) { "use strict"; Object.defineProperty(e, "__esModule", {value: !0}), e.dialog2 = void 0; var a = t("p4ys"); Object.defineProperty(e, "dialog2", { enumerable: !0, get: function () { return function (i) { return i && i.__esModule ? i : {default: i} }(a).default } }), t("AehQ"), t("ZO0i") }, ZO0i: function (i, e, t) { }, p4ys: function (i, e, t) { "use strict"; Object.defineProperty(e, "__esModule", {value: !0}); var a = s(t("+x/D")), u = s(t("TmQU")), n = s(t("KloK")), o = s(t("jEnx")), l = s(t("6RZY")), d = s(t("+ay7")), f = t("HH5i"); function s(i) { return i && i.__esModule ? i : {default: i} } var c = {"aui-focus": "false", "aui-blanketed": "true"}; function r(i) { this.$el = i ? (0, a.default)(i) : (0, a.default)('\n '), function (i) { a.default.each(c, function (e, t) { var a = "data-" + e; i[0].hasAttribute(a) || i.attr(a, t) }) }(this.$el) } r.prototype.on = function (i, e) { return (0, o.default)(this.$el).on(i, e), this }, r.prototype.off = function (i, e) { return (0, o.default)(this.$el).off(i, e), this }, r.prototype.show = function () { return (0, o.default)(this.$el).show(), this }, r.prototype.hide = function () { return (0, o.default)(this.$el).hide(), this }, r.prototype.remove = function () { return (0, o.default)(this.$el).remove(), this }, r.prototype.isVisible = function () { return (0, o.default)(this.$el).isVisible() }; var h = (0, l.default)("dialog2", r); h.on = function (i, e) { return o.default.on(i, ".aui-dialog2", e), this }, h.off = function (i, e) { return o.default.off(i, ".aui-dialog2", e), this }, (0, a.default)(document).on("click keydown", ".aui-dialog2-header-close", function (i) { ("click" === i.type || i.keyCode === d.default.ENTER || i.keyCode === d.default.SPACE) && (i.preventDefault(), h((0, a.default)(i.target).closest(".aui-dialog2")).hide()) }), h.on("show", function (i, e) { e.find(".aui-dialog2-header-close").attr("tabindex", 0); var t; [".aui-dialog2-content", ".aui-dialog2-footer", ".aui-dialog2-header"].some(function (i) { return (t = e.find(i).find(":aui-tabbable")).length }), t && t.first().focus() }), h.on("hide", function (i, e) { var t = (0, o.default)(e); e.data("aui-remove-on-hide") && t.remove() }), (0, u.default)("aui/dialog2", h), (0, n.default)("dialog2", h), e.default = h, i.exports = e.default } }, [["0+IH", "runtime", "aui.splitchunk.vendors--894c8113d9", "aui.splitchunk.0d131bcbf1", "aui.splitchunk.b0831cc7d0", "aui.splitchunk.444efc83be", "aui.splitchunk.78b1c5d416", "aui.splitchunk.54d3f16c20", "aui.splitchunk.9bbf750f52", "aui.splitchunk.e54c7c7304", "aui.splitchunk.fb15cffa72", "aui.splitchunk.f1e06f97a4", "aui.splitchunk.479fe6ee76", "aui.splitchunk.f673ef53ac", "aui.splitchunk.8659b532c1", "aui.splitchunk.5f851f97df", "aui.splitchunk.d0110a864f", "aui.splitchunk.afa5039e04", "aui.splitchunk.bff3715233", "aui.splitchunk.c750721820", "aui.splitchunk.6d6f245ed3", "aui.splitchunk.5b8c290363"]]]); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'jira.webresources:change-project-type-dialog', location = '/includes/jira/dialog/changeProjectTypeDialog.soy' */ // This file was automatically generated from changeProjectTypeDialog.soy. // Please don't edit this file by hand. /** * @fileoverview Templates in namespace JIRA.Templates.project.ChangeType. */ if (typeof JIRA == 'undefined') { var JIRA = {}; } if (typeof JIRA.Templates == 'undefined') { JIRA.Templates = {}; } if (typeof JIRA.Templates.project == 'undefined') { JIRA.Templates.project = {}; } if (typeof JIRA.Templates.project.ChangeType == 'undefined') { JIRA.Templates.project.ChangeType = {}; } JIRA.Templates.project.ChangeType.changeProjectTypeDialog = function (opt_data, opt_ignored) { return ''; }; if (goog.DEBUG) { JIRA.Templates.project.ChangeType.changeProjectTypeDialog.soyTemplateName = 'JIRA.Templates.project.ChangeType.changeProjectTypeDialog'; } JIRA.Templates.project.ChangeType.changeProjectTypeForm = function (opt_data, opt_ignored) { var output = '
    ' + JIRA.Templates.project.ChangeType.projectAvatar(opt_data) + '
    ' + JIRA.Templates.project.ChangeType.projectTypeDropdown({ projectTypeKey: opt_data.project.projectTypeKey, projectTypes: opt_data.projectTypes }) + '

    '; var helpLinkAnchor__soy21 = ''; output += soy.$$filterNoAutoescape(AJS.format('If you change the project type, you\x27\x27ll also change what your users can see and do with the project. {0}Check the differences here{1}', helpLinkAnchor__soy21, '')) + '

    '; return output; }; if (goog.DEBUG) { JIRA.Templates.project.ChangeType.changeProjectTypeForm.soyTemplateName = 'JIRA.Templates.project.ChangeType.changeProjectTypeForm'; } JIRA.Templates.project.ChangeType.projectTypeDropdown = function (opt_data, opt_ignored) { var output = ''; return output; }; if (goog.DEBUG) { JIRA.Templates.project.ChangeType.projectTypeDropdown.soyTemplateName = 'JIRA.Templates.project.ChangeType.projectTypeDropdown'; } JIRA.Templates.project.ChangeType.updateTargetElement = function (opt_data, opt_ignored) { return '' + soy.$$escapeHtml(opt_data.formattedKey) + ''; }; if (goog.DEBUG) { JIRA.Templates.project.ChangeType.updateTargetElement.soyTemplateName = 'JIRA.Templates.project.ChangeType.updateTargetElement'; } JIRA.Templates.project.ChangeType.projectAvatar = function (opt_data, opt_ignored) { return '
    ' + soy.$$escapeHtml(opt_data.project.name) + '
    ' + soy.$$escapeHtml(opt_data.project.name) + '
    '; }; if (goog.DEBUG) { JIRA.Templates.project.ChangeType.projectAvatar.soyTemplateName = 'JIRA.Templates.project.ChangeType.projectAvatar'; } JIRA.Templates.project.ChangeType.dialogSpinner = function (opt_data, opt_ignored) { return '
    '; }; if (goog.DEBUG) { JIRA.Templates.project.ChangeType.dialogSpinner.soyTemplateName = 'JIRA.Templates.project.ChangeType.dialogSpinner'; } JIRA.Templates.project.ChangeType.successMsg = function (opt_data, opt_ignored) { return '' + soy.$$escapeHtml(AJS.format('You have just changed {0} to a {1} project type.', opt_data.projectName, opt_data.projectTypeName)); }; if (goog.DEBUG) { JIRA.Templates.project.ChangeType.successMsg.soyTemplateName = 'JIRA.Templates.project.ChangeType.successMsg'; } } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'jira.webresources:change-project-type-dialog', location = '/includes/jira/dialog/changeProjectTypeDialog.js' */ define("jira/project/admin/change-project-type-dialog", ["jira/util/formatter", "jquery", "underscore", "jira/analytics", "jira/message", "jira/ajs/select/single-select", "wrm/context-path"], function (e, t, o, n, a, r, c) { "use strict"; function p(e) { return t.ajax({ url: c() + "/rest/internal/2/projects/" + e + "/changetypedata", dataType: "json", contentType: "application/json", type: "GET" }) } function i(r) { var p = t(".project-type-select", r.dialogBody), i = p.val()[0], s = o.findWhere(r.projectTypes, {key: i}); t(".dialog-change-button", r.dialogBody).attr("disabled", "disabled"), t(t.ajax({ url: c() + "/rest/api/2/project/" + r.projectId + "/type/" + i, dataType: "json", contentType: "application/json", type: "PUT" }).done(function () { r.changeProjectTypeDialog.hide(), r.onProjectTypeChanged && r.onProjectTypeChanged(r.trigger, s), a.showSuccessMsg(JIRA.Templates.project.ChangeType.successMsg({ projectName: r.projectName, projectTypeName: s.formattedKey })), n.send({ name: "administration.projecttype.change", properties: { projectId: r.projectId, sourceProjectType: d(r.sourceProjectType), destinationProjectType: d(i) } }) }).fail(function () { t(".aui-dialog2-content", r.dialogBody).prepend(aui.message.error({content: e.format("We haven\'\'t been able to complete the project conversion. You could refresh the page and try again. If this doesn\'\'t work, contact {0}Support{1}.", '', "")})) })).throbber({target: t(".throbber", r.dialogBody)}) } function d(e) { return e && e.replace("_", "") } function s(e, t, o) { e == t ? o.find(".dialog-change-button").attr("disabled", "disabled") : o.find(".dialog-change-button").removeAttr("disabled") } function l(o) { var n = t(JIRA.Templates.project.ChangeType.changeProjectTypeDialog({projectId: o.projectId})), a = AJS.dialog2(n); a.on("show", function () { t(".aui-dialog2-content", n).html(JIRA.Templates.project.ChangeType.dialogSpinner()), t(".dialog-spinner", n).spin(), t(".dialog-change-button", n).unbind("click").addClass("hidden") }), t(o.trigger).click(function (c) { c.preventDefault(), a.show(), p(o.projectId).done(function (e) { n.find(".aui-dialog2-content").html(JIRA.Templates.project.ChangeType.changeProjectTypeForm(e)), new r({ element: t(".project-type-select", n), revertOnInvalid: !0, width: 165 }), n.find(".dialog-change-button").removeClass("hidden"), s(t(".project-type-select", n).val(), e.project.projectTypeKey, n); var c = { dialogBody: n, changeProjectTypeDialog: a, projectName: e.project.name, projectTypes: e.projectTypes, trigger: o.trigger, projectId: o.projectId, onProjectTypeChanged: o.onProjectTypeChanged, sourceProjectType: e.project.projectTypeKey }; t(".dialog-change-button", n).click(function (e) { e.preventDefault(), i(c) }), t(".change-project-type-form", n).on("submit", function (e) { e.preventDefault(), i(c) }), t(".project-type-select", n).on("change", function (o) { s(t(this).val(), e.project.projectTypeKey, n) }) }).fail(function () { t(".aui-dialog2-content", n).html(aui.message.error({content: e.format("We were unable to load data required for the project type change. You could refresh the page and try again. If this doesn\'\'t work, contact {0}Support{1}.", '', "")})) }) }), t(".dialog-close-button", n).click(function (e) { e.preventDefault(), a.hide() }) } return function (e) { l(e) } }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'jira.webresources:project-type-warning', location = '/static/projecttypes/warning/dialog/project-type-warning-dialog.js' */ define("jira/project/types/warning/dialog", ["require"], function (e) { "use strict"; function t(t, a, r) { var o = n(".project-type-warning-icon", r); i(o, "uninstalled-warning-dialog", function (i, r, o) { return i.html(JIRA.Project.Types.Warning.dialog({ title: t.title, firstParagraph: t.firstParagraph, secondParagraph: t.secondParagraph, callToActionText: t.callToActionText })), e("jira/project/admin/change-project-type-dialog")({ trigger: n(".warning-dialog-change-project-type"), projectId: t.projectId, onProjectTypeChanged: a }), o(), !1 }, {width: 375, gravity: "w"}) } var n = e("jquery"), a = e("wrm/data"), i = e("aui/inline-dialog"), r = a.claim("project.type.warning.dialogs.data"); return { init: function (e) { e = e || {}, e.sectionElement = e.sectionElement || n("body"), t(r, e.onProjectTypeChanged, e.sectionElement) } } }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'jira.webresources:project-type-warning', location = '/static/projecttypes/warning/dialog/templates/templates.soy' */ // This file was automatically generated from templates.soy. // Please don't edit this file by hand. /** * @fileoverview Templates in namespace JIRA.Project.Types.Warning. */ if (typeof JIRA == 'undefined') { var JIRA = {}; } if (typeof JIRA.Project == 'undefined') { JIRA.Project = {}; } if (typeof JIRA.Project.Types == 'undefined') { JIRA.Project.Types = {}; } if (typeof JIRA.Project.Types.Warning == 'undefined') { JIRA.Project.Types.Warning = {}; } JIRA.Project.Types.Warning.dialog = function (opt_data, opt_ignored) { return '

    ' + soy.$$escapeHtml(opt_data.title) + '

    ' + soy.$$escapeHtml(opt_data.firstParagraph) + '

    ' + soy.$$escapeHtml(opt_data.secondParagraph) + '

    '; }; if (goog.DEBUG) { JIRA.Project.Types.Warning.dialog.soyTemplateName = 'JIRA.Project.Types.Warning.dialog'; } } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:jira-projects-backbone', location = 'lib/backbone.js' */ define("jira-projects-backbone", ["jquery", "underscore", "atlassian/libs/factories/backbone-1.0.0", "jira/backbone-queryparams"], function (e, b, a, c) { var d = a(b, e); c(d); return d }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.plugin.jslibs:marionette-2.1.0-factory', location = 'factories/marionette/2.1.0/marionette-2.1.0-factory.js' */ /* Includes BabySitter https://github.com/marionettejs/backbone.babysitter/ Includes Wreqr https://github.com/marionettejs/backbone.wreqr/ */ 'use strict'; (function (m) { define("atlassian/libs/factories/marionette-2.1.0", function () { return function (f, e) { f = {_: f, Backbone: e}; m.call(f); return f.Marionette.noConflict() } }) })(function () { (function (m, f) { m.Marionette = f(m, m.Backbone, m._) })(this, function (m, f, e) { function k(a, b) { a = Error(a); a.name = b || "Error"; throw a; } (function (a, b) { var c = a.ChildViewContainer; a.ChildViewContainer = function (a, b) { var c = function (a) { this._views = {}; this._indexByModel = {}; this._indexByCustom = {}; this._updateLength(); b.each(a, this.add, this) }; b.extend(c.prototype, { add: function (a, b) { var c = a.cid; this._views[c] = a; a.model && (this._indexByModel[a.model.cid] = c); b && (this._indexByCustom[b] = c); this._updateLength(); return this }, findByModel: function (a) { return this.findByModelCid(a.cid) }, findByModelCid: function (a) { return this.findByCid(this._indexByModel[a]) }, findByCustom: function (a) { return this.findByCid(this._indexByCustom[a]) }, findByIndex: function (a) { return b.values(this._views)[a] }, findByCid: function (a) { return this._views[a] }, remove: function (a) { var c = a.cid; a.model && delete this._indexByModel[a.model.cid]; b.any(this._indexByCustom, function (a, b) { if (a === c) return delete this._indexByCustom[b], !0 }, this); delete this._views[c]; this._updateLength(); return this }, call: function (a) { this.apply(a, b.tail(arguments)) }, apply: function (a, c) { b.each(this._views, function (e) { b.isFunction(e[a]) && e[a].apply(e, c || []) }) }, _updateLength: function () { this.length = b.size(this._views) } }); b.each("forEach each map find detect filter select reject every all some any include contains invoke toArray first initial rest last without isEmpty pluck".split(" "), function (a) { c.prototype[a] = function () { var c = [b.values(this._views)].concat(b.toArray(arguments)); return b[a].apply(b, c) } }); return c }(a, b); a.ChildViewContainer.VERSION = "0.1.4"; a.ChildViewContainer.noConflict = function () { a.ChildViewContainer = c; return this }; return a.ChildViewContainer })(f, e); (function (a, b) { var c = a.Wreqr, e = a.Wreqr = {}; a.Wreqr.VERSION = "1.3.1"; a.Wreqr.noConflict = function () { a.Wreqr = c; return this }; e.Handlers = function (a, b) { var c = function (a) { this.options = a; this._wreqrHandlers = {}; b.isFunction(this.initialize) && this.initialize(a) }; c.extend = a.Model.extend; b.extend(c.prototype, a.Events, { setHandlers: function (a) { b.each(a, function (a, c) { var e = null; b.isObject(a) && !b.isFunction(a) && (e = a.context, a = a.callback); this.setHandler(c, a, e) }, this) }, setHandler: function (a, b, c) { this._wreqrHandlers[a] = {callback: b, context: c}; this.trigger("handler:add", a, b, c) }, hasHandler: function (a) { return !!this._wreqrHandlers[a] }, getHandler: function (a) { var b = this._wreqrHandlers[a]; if (b) return function () { var a = Array.prototype.slice.apply(arguments); return b.callback.apply(b.context, a) } }, removeHandler: function (a) { delete this._wreqrHandlers[a] }, removeAllHandlers: function () { this._wreqrHandlers = {} } }); return c }(a, b); e.CommandStorage = function () { var c = function (a) { this.options = a; this._commands = {}; b.isFunction(this.initialize) && this.initialize(a) }; b.extend(c.prototype, a.Events, { getCommands: function (a) { var b = this._commands[a]; b || (b = {command: a, instances: []}, this._commands[a] = b); return b }, addCommand: function (a, b) { this.getCommands(a).instances.push(b) }, clearCommands: function (a) { this.getCommands(a).instances = [] } }); return c }(); e.Commands = function (a) { return a.Handlers.extend({ storageType: a.CommandStorage, constructor: function (b) { this.options = b || {}; this._initializeStorage(this.options); this.on("handler:add", this._executeCommands, this); var c = Array.prototype.slice.call(arguments); a.Handlers.prototype.constructor.apply(this, c) }, execute: function (a, b) { a = arguments[0]; b = Array.prototype.slice.call(arguments, 1); this.hasHandler(a) ? this.getHandler(a).apply(this, b) : this.storage.addCommand(a, b) }, _executeCommands: function (a, c, e) { var d = this.storage.getCommands(a); b.each(d.instances, function (a) { c.apply(e, a) }); this.storage.clearCommands(a) }, _initializeStorage: function (a) { a = a.storageType || this.storageType; this.storage = b.isFunction(a) ? new a : a } }) }(e); e.RequestResponse = function (a) { return a.Handlers.extend({ request: function () { var a = arguments[0], b = Array.prototype.slice.call(arguments, 1); if (this.hasHandler(a)) return this.getHandler(a).apply(this, b) } }) }(e); e.EventAggregator = function (a, b) { var c = function () { }; c.extend = a.Model.extend; b.extend(c.prototype, a.Events); return c }(a, b); e.Channel = function (a) { var c = function (b) { this.vent = new a.EventAggregator; this.reqres = new a.RequestResponse; this.commands = new a.Commands; this.channelName = b }; b.extend(c.prototype, { reset: function () { this.vent.off(); this.vent.stopListening(); this.reqres.removeAllHandlers(); this.commands.removeAllHandlers(); return this }, connectEvents: function (a, b) { this._connect("vent", a, b); return this }, connectCommands: function (a, b) { this._connect("commands", a, b); return this }, connectRequests: function (a, b) { this._connect("reqres", a, b); return this }, _connect: function (a, c, e) { if (c) { e = e || this; var d = "vent" === a ? "on" : "setHandler"; b.each(c, function (c, g) { this[a][d](g, b.bind(c, e)) }, this) } } }); return c }(e); e.radio = function (a) { var c = function () { this._channels = {}; this.vent = {}; this.commands = {}; this.reqres = {}; this._proxyMethods() }; b.extend(c.prototype, { channel: function (a) { if (!a) throw Error("Channel must receive a name"); return this._getChannel(a) }, _getChannel: function (b) { var c = this._channels[b]; c || (c = new a.Channel(b), this._channels[b] = c); return c }, _proxyMethods: function () { b.each(["vent", "commands", "reqres"], function (a) { b.each(e[a], function (b) { this[a][b] = d(this, a, b) }, this) }, this) } }); var e = { vent: "on off trigger once stopListening listenTo listenToOnce".split(" "), commands: ["execute", "setHandler", "setHandlers", "removeHandler", "removeAllHandlers"], reqres: ["request", "setHandler", "setHandlers", "removeHandler", "removeAllHandlers"] }, d = function (a, b, c) { return function (e) { var d = a._getChannel(e)[b], g = Array.prototype.slice.call(arguments, 1); return d[c].apply(d, g) } }; return new c }(e); return a.Wreqr })(f, e); var p = f.ChildViewContainer.noConflict(), q = f.Wreqr.noConflict(), r = m.Marionette, d = f.Marionette = {}; d.VERSION = "2.1.0"; d.noConflict = function () { m.Marionette = r; return this }; f.Marionette = d; d.Deferred = f.$.Deferred; var l = Array.prototype.slice; d.extend = f.Model.extend; d.getOption = function (a, b) { if (a && b) return a.options && void 0 !== a.options[b] ? a.options[b] : a[b] }; d.proxyGetOption = function (a) { return d.getOption(this, a) }; d.normalizeMethods = function (a) { var b = {}; e.each(a, function (a, d) { e.isFunction(a) || (a = this[a]); a && (b[d] = a) }, this); return b }; d.normalizeUIKeys = function (a, b) { if ("undefined" !== typeof a) return e.each(e.keys(a), function (c) { var e = /@ui\.[a-zA-Z_$0-9]*/g; c.match(e) && (a[c.replace(e, function (a) { return b[a.slice(4)] })] = a[c], delete a[c]) }), a }; d.actAsCollection = function (a, b) { e.each("forEach each map find detect filter select reject every all some any include contains invoke toArray first initial rest last without isEmpty pluck".split(" "), function (c) { a[c] = function () { var a = [e.values(e.result(this, b))].concat(e.toArray(arguments)); return e[c].apply(e, a) } }) }; d.triggerMethod = function () { function a(a, b, e) { return e.toUpperCase() } var b = /(^|:)(\w)/gi; return function (c) { var d = this["on" + c.replace(b, a)], h; e.isFunction(d) && (h = d.apply(this, e.tail(arguments))); e.isFunction(this.trigger) && this.trigger.apply(this, arguments); return h } }(); d.MonitorDOMRefresh = function (a) { function b(b) { b._isShown && b._isRendered && f.$.contains(a, b.el) && e.isFunction(b.triggerMethod) && b.triggerMethod("dom:refresh") } return function (a) { a.listenTo(a, "show", function () { a._isShown = !0; b(a) }); a.listenTo(a, "render", function () { a._isRendered = !0; b(a) }) } }(document.documentElement); (function (a) { function b(a, b, c, d) { d = d.split(/\s+/); e.each(d, function (e) { var d = a[e]; d || k('Method "' + e + '" was configured as an event handler, but does not exist.'); a.listenTo(b, c, d) }) } function c(a, b, c, e) { a.listenTo(b, c, e) } function d(a, b, c, d) { d = d.split(/\s+/); e.each(d, function (e) { a.stopListening(b, c, a[e]) }) } function h(a, b, c, e) { a.stopListening(b, c, e) } function n(a, b, c, d, g) { b && c && (e.isFunction(c) && (c = c.call(a)), e.each(c, function (c, h) { e.isFunction(c) ? d(a, b, h, c) : g(a, b, h, c) })) } a.bindEntityEvents = function (a, e, d) { n(a, e, d, c, b) }; a.unbindEntityEvents = function (a, b, c) { n(a, b, c, h, d) }; a.proxyBindEntityEvents = function (b, c) { return a.bindEntityEvents(this, b, c) }; a.proxyUnbindEntityEvents = function (b, c) { return a.unbindEntityEvents(this, b, c) } })(d); d.Callbacks = function () { this._deferred = d.Deferred(); this._callbacks = [] }; e.extend(d.Callbacks.prototype, { add: function (a, b) { var c = e.result(this._deferred, "promise"); this._callbacks.push({cb: a, ctx: b}); c.then(function (c) { b && (c.context = b); a.call(c.context, c.options) }) }, run: function (a, b) { this._deferred.resolve({options: a, context: b}) }, reset: function () { var a = this._callbacks; this._deferred = d.Deferred(); this._callbacks = []; e.each(a, function (a) { this.add(a.cb, a.ctx) }, this) } }); d.Controller = function (a) { this.options = a || {}; e.isFunction(this.initialize) && this.initialize(this.options) }; d.Controller.extend = d.extend; e.extend(d.Controller.prototype, f.Events, { destroy: function () { var a = l.call(arguments); this.triggerMethod.apply(this, ["before:destroy"].concat(a)); this.triggerMethod.apply(this, ["destroy"].concat(a)); this.stopListening(); this.off(); return this }, triggerMethod: d.triggerMethod, getOption: d.proxyGetOption }); d.Object = function (a) { this.options = e.extend({}, e.result(this, "options"), a); this.initialize(this.options) }; d.Object.extend = d.extend; e.extend(d.Object.prototype, { initialize: function () { }, destroy: function () { this.triggerMethod("before:destroy"); this.triggerMethod("destroy"); this.stopListening() }, triggerMethod: d.triggerMethod, getOption: d.proxyGetOption, bindEntityEvents: d.proxyBindEntityEvents, unbindEntityEvents: d.proxyUnbindEntityEvents }); e.extend(d.Object.prototype, f.Events); d.Region = function (a) { this.options = a || {}; this.el = this.getOption("el"); (this.el = this.el instanceof f.$ ? this.el[0] : this.el) || k('An "el" must be specified for a region.', "NoElError"); this.$el = this.getEl(this.el); if (this.initialize) { var b = l.apply(arguments); this.initialize.apply(this, b) } }; e.extend(d.Region, { buildRegion: function (a, b) { if (e.isString(a)) return this._buildRegionFromSelector(a, b); if (a.selector || a.el || a.regionClass) return this._buildRegionFromObject(a, b); if (e.isFunction(a)) return this._buildRegionFromRegionClass(a); k("Improper region configuration type. Please refer to http://marionettejs.com/docs/marionette.region.html#region-configuration-types") }, _buildRegionFromSelector: function (a, b) { return new b({el: a}) }, _buildRegionFromObject: function (a, b) { b = a.regionClass || b; var c = e.omit(a, "selector", "regionClass"); a.selector && !c.el && (c.el = a.selector); b = new b(c); a.parentEl && (b.getEl = function (b) { if (e.isObject(b)) return f.$(b); var c = a.parentEl; e.isFunction(c) && (c = c()); return c.find(b) }); return b }, _buildRegionFromRegionClass: function (a) { return new a } }); e.extend(d.Region.prototype, f.Events, { show: function (a, b) { this._ensureElement(); b = b || {}; var c = a !== this.currentView, d = !!b.forceShow, h = !!this.currentView; !b.preventDestroy && c && this.empty(); if (c || d) a.once("destroy", e.bind(this.empty, this)), a.render(), h && this.triggerMethod("before:swap", a), this.triggerMethod("before:show", a), e.isFunction(a.triggerMethod) ? a.triggerMethod("before:show") : this.triggerMethod.call(a, "before:show"), this.attachHtml(a), this.currentView = a, h && this.triggerMethod("swap", a), this.triggerMethod("show", a), e.isFunction(a.triggerMethod) ? a.triggerMethod("show") : this.triggerMethod.call(a, "show"); return this }, _ensureElement: function () { e.isObject(this.el) || (this.$el = this.getEl(this.el), this.el = this.$el[0]); this.$el && 0 !== this.$el.length || k('An "el" ' + this.$el.selector + " must exist in DOM") }, getEl: function (a) { return f.$(a) }, attachHtml: function (a) { this.el.innerHTML = ""; this.el.appendChild(a.el) }, empty: function () { var a = this.currentView; if (a) return this.triggerMethod("before:empty", a), this._destroyView(), this.triggerMethod("empty", a), delete this.currentView, this }, _destroyView: function () { var a = this.currentView; a.destroy && !a.isDestroyed ? a.destroy() : a.remove && a.remove() }, attachView: function (a) { this.currentView = a; return this }, hasView: function () { return !!this.currentView }, reset: function () { this.empty(); this.$el && (this.el = this.$el.selector); delete this.$el; return this }, getOption: d.proxyGetOption, triggerMethod: d.triggerMethod }); d.Region.extend = d.extend; d.RegionManager = function (a) { var b = a.Controller.extend({ constructor: function (b) { this._regions = {}; a.Controller.call(this, b) }, addRegions: function (a, b) { e.isFunction(a) && (a = a.apply(this, arguments)); var c = {}; e.each(a, function (a, d) { e.isString(a) && (a = {selector: a}); a.selector && (a = e.defaults({}, a, b)); a = this.addRegion(d, a); c[d] = a }, this); return c }, addRegion: function (b, d) { var c = e.isObject(d), g = e.isString(d), f = !!d.selector; d = g || c && f ? a.Region.buildRegion(d, a.Region) : e.isFunction(d) ? a.Region.buildRegion(d, a.Region) : d; this.triggerMethod("before:add:region", b, d); this._store(b, d); this.triggerMethod("add:region", b, d); return d }, get: function (a) { return this._regions[a] }, getRegions: function () { return e.clone(this._regions) }, removeRegion: function (a) { var b = this._regions[a]; this._remove(a, b); return b }, removeRegions: function () { var a = this.getRegions(); e.each(this._regions, function (a, b) { this._remove(b, a) }, this); return a }, emptyRegions: function () { var a = this.getRegions(); e.each(a, function (a) { a.empty() }, this); return a }, destroy: function () { this.removeRegions(); return a.Controller.prototype.destroy.apply(this, arguments) }, _store: function (a, b) { this._regions[a] = b; this._setLength() }, _remove: function (a, b) { this.triggerMethod("before:remove:region", a, b); b.empty(); b.stopListening(); delete this._regions[a]; this._setLength(); this.triggerMethod("remove:region", a, b) }, _setLength: function () { this.length = e.size(this._regions) } }); a.actAsCollection(b.prototype, "_regions"); return b }(d); d.TemplateCache = function (a) { this.templateId = a }; e.extend(d.TemplateCache, { templateCaches: {}, get: function (a) { var b = this.templateCaches[a]; b || (b = new d.TemplateCache(a), this.templateCaches[a] = b); return b.load() }, clear: function () { var a, b = l.call(arguments), c = b.length; if (0 < c) for (a = 0; a < c; a++) delete this.templateCaches[b[a]]; else this.templateCaches = {} } }); e.extend(d.TemplateCache.prototype, { load: function () { if (this.compiledTemplate) return this.compiledTemplate; var a = this.loadTemplate(this.templateId); return this.compiledTemplate = this.compileTemplate(a) }, loadTemplate: function (a) { var b = f.$(a).html(); b && 0 !== b.length || k('Could not find template: "' + a + '"', "NoTemplateError"); return b }, compileTemplate: function (a) { return e.template(a) } }); d.Renderer = { render: function (a, b) { a || k("Cannot render the template since its false, null or undefined.", "TemplateNotFoundError"); return ("function" === typeof a ? a : d.TemplateCache.get(a))(b) } }; d.View = f.View.extend({ constructor: function (a) { e.bindAll(this, "render"); this.options = e.extend({}, e.result(this, "options"), e.isFunction(a) ? a.call(this) : a); this.events = this.normalizeUIKeys(e.result(this, "events")); e.isObject(this.behaviors) && new d.Behaviors(this); f.View.apply(this, arguments); d.MonitorDOMRefresh(this); this.listenTo(this, "show", this.onShowCalled) }, getTemplate: function () { return this.getOption("template") }, serializeModel: function (a) { return a.toJSON.apply(a, l.call(arguments, 1)) }, mixinTemplateHelpers: function (a) { a = a || {}; var b = this.getOption("templateHelpers"); e.isFunction(b) && (b = b.call(this)); return e.extend(a, b) }, normalizeUIKeys: function (a) { var b = e.result(this, "ui"), c = e.result(this, "_uiBindings"); return d.normalizeUIKeys(a, c || b) }, configureTriggers: function () { if (this.triggers) { var a = {}, b = this.normalizeUIKeys(e.result(this, "triggers")); e.each(b, function (b, d) { var c = e.isObject(b), g = c ? b.event : b; a[d] = function (a) { if (a) { var e = a.preventDefault, d = a.stopPropagation, h = c ? b.stopPropagation : d; (c ? b.preventDefault : e) && e && e.apply(a); h && d && d.apply(a) } this.triggerMethod(g, {view: this, model: this.model, collection: this.collection}) } }, this); return a } }, delegateEvents: function (a) { this._delegateDOMEvents(a); this.bindEntityEvents(this.model, this.getOption("modelEvents")); this.bindEntityEvents(this.collection, this.getOption("collectionEvents")); return this }, _delegateDOMEvents: function (a) { a = a || this.events; e.isFunction(a) && (a = a.call(this)); a = this.normalizeUIKeys(a); var b = {}, c = e.result(this, "behaviorEvents") || {}, d = this.configureTriggers(); e.extend(b, c, a, d); f.View.prototype.delegateEvents.call(this, b) }, undelegateEvents: function () { var a = l.call(arguments); f.View.prototype.undelegateEvents.apply(this, a); this.unbindEntityEvents(this.model, this.getOption("modelEvents")); this.unbindEntityEvents(this.collection, this.getOption("collectionEvents")); return this }, onShowCalled: function () { }, _ensureViewIsIntact: function () { if (this.isDestroyed) { var a = Error("Cannot use a view thats already been destroyed."); a.name = "ViewDestroyedError"; throw a; } }, destroy: function () { if (!this.isDestroyed) { var a = l.call(arguments); this.triggerMethod.apply(this, ["before:destroy"].concat(a)); this.isDestroyed = !0; this.triggerMethod.apply(this, ["destroy"].concat(a)); this.unbindUIElements(); this.remove(); return this } }, bindUIElements: function () { if (this.ui) { this._uiBindings || (this._uiBindings = this.ui); var a = e.result(this, "_uiBindings"); this.ui = {}; e.each(e.keys(a), function (b) { this.ui[b] = this.$(a[b]) }, this) } }, unbindUIElements: function () { this.ui && this._uiBindings && (e.each(this.ui, function (a, b) { delete this.ui[b] }, this), this.ui = this._uiBindings, delete this._uiBindings) }, triggerMethod: d.triggerMethod, normalizeMethods: d.normalizeMethods, getOption: d.proxyGetOption, bindEntityEvents: d.proxyBindEntityEvents, unbindEntityEvents: d.proxyUnbindEntityEvents }); d.ItemView = d.View.extend({ constructor: function () { d.View.apply(this, arguments) }, serializeData: function () { var a = {}; this.model ? a = e.partial(this.serializeModel, this.model).apply(this, arguments) : this.collection && (a = {items: e.partial(this.serializeCollection, this.collection).apply(this, arguments)}); return a }, serializeCollection: function (a) { return a.toJSON.apply(a, l.call(arguments, 1)) }, render: function () { this._ensureViewIsIntact(); this.triggerMethod("before:render", this); this._renderTemplate(); this.bindUIElements(); this.triggerMethod("render", this); return this }, _renderTemplate: function () { var a = this.getTemplate(); if (!1 !== a) { a || k("Cannot render the template since it is null or undefined.", "UndefinedTemplateError"); var b = this.serializeData(); b = this.mixinTemplateHelpers(b); a = d.Renderer.render(a, b, this); this.attachElContent(a); return this } }, attachElContent: function (a) { this.$el.html(a); return this }, destroy: function () { if (!this.isDestroyed) return d.View.prototype.destroy.apply(this, arguments) } }); d.CollectionView = d.View.extend({ childViewEventPrefix: "childview", constructor: function (a) { var b = a || {}; this.sort = e.isUndefined(b.sort) ? !0 : b.sort; this._initChildViewStorage(); d.View.apply(this, arguments); this._initialEvents(); this.initRenderBuffer() }, initRenderBuffer: function () { this.elBuffer = document.createDocumentFragment(); this._bufferedChildren = [] }, startBuffering: function () { this.initRenderBuffer(); this.isBuffering = !0 }, endBuffering: function () { this.isBuffering = !1; this._triggerBeforeShowBufferedChildren(); this.attachBuffer(this, this.elBuffer); this._triggerShowBufferedChildren(); this.initRenderBuffer() }, _triggerBeforeShowBufferedChildren: function () { this._isShown && e.invoke(this._bufferedChildren, "triggerMethod", "before:show") }, _triggerShowBufferedChildren: function () { this._isShown && (e.each(this._bufferedChildren, function (a) { e.isFunction(a.triggerMethod) ? a.triggerMethod("show") : d.triggerMethod.call(a, "show") }), this._bufferedChildren = []) }, _initialEvents: function () { this.collection && (this.listenTo(this.collection, "add", this._onCollectionAdd), this.listenTo(this.collection, "remove", this._onCollectionRemove), this.listenTo(this.collection, "reset", this.render), this.sort && this.listenTo(this.collection, "sort", this._sortViews)) }, _onCollectionAdd: function (a) { this.destroyEmptyView(); var b = this.getChildView(a), c = this.collection.indexOf(a); this.addChild(a, b, c) }, _onCollectionRemove: function (a) { a = this.children.findByModel(a); this.removeChildView(a); this.checkEmpty() }, onShowCalled: function () { this.children.each(function (a) { e.isFunction(a.triggerMethod) ? a.triggerMethod("show") : d.triggerMethod.call(a, "show") }) }, render: function () { this._ensureViewIsIntact(); this.triggerMethod("before:render", this); this._renderChildren(); this.triggerMethod("render", this); return this }, resortView: function () { this.render() }, _sortViews: function () { this.collection.find(function (a, b) { a = this.children.findByModel(a); return !a || a._index !== b }, this) && this.resortView() }, _renderChildren: function () { this.destroyEmptyView(); this.destroyChildren(); this.isEmpty(this.collection) ? this.showEmptyView() : (this.triggerMethod("before:render:collection", this), this.startBuffering(), this.showCollection(), this.endBuffering(), this.triggerMethod("render:collection", this)) }, showCollection: function () { var a; this.collection.each(function (b, c) { a = this.getChildView(b); this.addChild(b, a, c) }, this) }, showEmptyView: function () { var a = this.getEmptyView(); if (a && !this._showingEmptyView) { this.triggerMethod("before:render:empty"); this._showingEmptyView = !0; var b = new f.Model; this.addEmptyView(b, a); this.triggerMethod("render:empty") } }, destroyEmptyView: function () { this._showingEmptyView && (this.destroyChildren(), delete this._showingEmptyView) }, getEmptyView: function () { return this.getOption("emptyView") }, addEmptyView: function (a, b) { var c = this.getOption("emptyViewOptions") || this.getOption("childViewOptions"); e.isFunction(c) && (c = c.call(this)); a = this.buildChildView(a, b, c); this._isShown && this.triggerMethod.call(a, "before:show"); this.children.add(a); this.renderChildView(a, -1); this._isShown && this.triggerMethod.call(a, "show") }, getChildView: function (a) { (a = this.getOption("childView")) || k('A "childView" must be specified', "NoChildViewError"); return a }, addChild: function (a, b, c) { var d = this.getOption("childViewOptions"); e.isFunction(d) && (d = d.call(this, a, c)); a = this.buildChildView(a, b, d); this._updateIndices(a, !0, c); this._addChildView(a, c); return a }, _updateIndices: function (a, b, c) { this.sort && (b ? (a._index = c, this.children.each(function (b) { b._index >= a._index && b._index++ })) : this.children.each(function (b) { b._index >= a._index && b._index-- })) }, _addChildView: function (a, b) { this.proxyChildEvents(a); this.triggerMethod("before:add:child", a); this.children.add(a); this.renderChildView(a, b); this._isShown && !this.isBuffering && (e.isFunction(a.triggerMethod) ? a.triggerMethod("show") : d.triggerMethod.call(a, "show")); this.triggerMethod("add:child", a) }, renderChildView: function (a, b) { a.render(); this.attachHtml(this, a, b); return a }, buildChildView: function (a, b, c) { a = e.extend({model: a}, c); return new b(a) }, removeChildView: function (a) { a && (this.triggerMethod("before:remove:child", a), a.destroy ? a.destroy() : a.remove && a.remove(), this.stopListening(a), this.children.remove(a), this.triggerMethod("remove:child", a), this._updateIndices(a, !1)); return a }, isEmpty: function (a) { return !this.collection || 0 === this.collection.length }, checkEmpty: function () { this.isEmpty(this.collection) && this.showEmptyView() }, attachBuffer: function (a, b) { a.$el.append(b) }, attachHtml: function (a, b, c) { a.isBuffering ? (a.elBuffer.appendChild(b.el), a._bufferedChildren.push(b)) : a._insertBefore(b, c) || a._insertAfter(b) }, _insertBefore: function (a, b) { var c; this.sort && b < this.children.length - 1 && (c = this.children.find(function (a) { return a._index === b + 1 })); return c ? (c.$el.before(a.el), !0) : !1 }, _insertAfter: function (a) { this.$el.append(a.el) }, _initChildViewStorage: function () { this.children = new p }, destroy: function () { if (!this.isDestroyed) return this.triggerMethod("before:destroy:collection"), this.destroyChildren(), this.triggerMethod("destroy:collection"), d.View.prototype.destroy.apply(this, arguments) }, destroyChildren: function () { var a = this.children.map(e.identity); this.children.each(this.removeChildView, this); this.checkEmpty(); return a }, proxyChildEvents: function (a) { var b = this.getOption("childViewEventPrefix"); this.listenTo(a, "all", function () { var c = l.call(arguments), d = c[0], h = this.normalizeMethods(e.result(this, "childEvents")); c[0] = b + ":" + d; c.splice(1, 0, a); "undefined" !== typeof h && e.isFunction(h[d]) && h[d].apply(this, c.slice(1)); this.triggerMethod.apply(this, c) }, this) } }); d.CompositeView = d.CollectionView.extend({ constructor: function () { d.CollectionView.apply(this, arguments) }, _initialEvents: function () { this.once("render", function () { this.collection && (this.listenTo(this.collection, "add", this._onCollectionAdd), this.listenTo(this.collection, "remove", this._onCollectionRemove), this.listenTo(this.collection, "reset", this._renderChildren), this.sort && this.listenTo(this.collection, "sort", this._sortViews)) }) }, getChildView: function (a) { (a = this.getOption("childView") || this.constructor) || k('A "childView" must be specified', "NoChildViewError"); return a }, serializeData: function () { var a = {}; this.model && (a = e.partial(this.serializeModel, this.model).apply(this, arguments)); return a }, render: function () { this._ensureViewIsIntact(); this.isRendered = !0; this.resetChildViewContainer(); this.triggerMethod("before:render", this); this._renderTemplate(); this._renderChildren(); this.triggerMethod("render", this); return this }, _renderChildren: function () { this.isRendered && d.CollectionView.prototype._renderChildren.call(this) }, _renderTemplate: function () { var a = this.serializeData(); a = this.mixinTemplateHelpers(a); this.triggerMethod("before:render:template"); var b = this.getTemplate(); a = d.Renderer.render(b, a, this); this.attachElContent(a); this.bindUIElements(); this.triggerMethod("render:template") }, attachElContent: function (a) { this.$el.html(a); return this }, attachBuffer: function (a, b) { this.getChildViewContainer(a).append(b) }, _insertAfter: function (a) { this.getChildViewContainer(this).append(a.el) }, getChildViewContainer: function (a) { if ("$childViewContainer" in a) return a.$childViewContainer; var b; (b = d.getOption(a, "childViewContainer")) ? (b = e.isFunction(b) ? b.call(a) : b, b = "@" === b.charAt(0) && a.ui ? a.ui[b.substr(4)] : a.$(b), 0 >= b.length && k('The specified "childViewContainer" was not found: ' + a.childViewContainer, "ChildViewContainerMissingError")) : b = a.$el; return a.$childViewContainer = b }, resetChildViewContainer: function () { this.$childViewContainer && delete this.$childViewContainer } }); d.LayoutView = d.ItemView.extend({ regionClass: d.Region, constructor: function (a) { a = a || {}; this._firstRender = !0; this._initializeRegions(a); d.ItemView.call(this, a) }, render: function () { this._ensureViewIsIntact(); this._firstRender ? this._firstRender = !1 : this._reInitializeRegions(); return d.ItemView.prototype.render.apply(this, arguments) }, destroy: function () { if (this.isDestroyed) return this; this.regionManager.destroy(); return d.ItemView.prototype.destroy.apply(this, arguments) }, addRegion: function (a, b) { this.triggerMethod("before:region:add", a); var c = {}; c[a] = b; return this._buildRegions(c)[a] }, addRegions: function (a) { this.regions = e.extend({}, this.regions, a); return this._buildRegions(a) }, removeRegion: function (a) { this.triggerMethod("before:region:remove", a); delete this.regions[a]; return this.regionManager.removeRegion(a) }, getRegion: function (a) { return this.regionManager.get(a) }, getRegions: function () { return this.regionManager.getRegions() }, _buildRegions: function (a) { var b = this, c = { regionClass: this.getOption("regionClass"), parentEl: function () { return b.$el } }; return this.regionManager.addRegions(a, c) }, _initializeRegions: function (a) { this._initRegionManager(); var b = e.isFunction(this.regions) ? this.regions(a) : this.regions || {}; var c = this.getOption.call(a, "regions"); e.isFunction(c) && (c = c.call(this, a)); e.extend(b, c); this.addRegions(b) }, _reInitializeRegions: function () { this.regionManager.emptyRegions(); this.regionManager.each(function (a) { a.reset() }) }, getRegionManager: function () { return new d.RegionManager }, _initRegionManager: function () { this.regionManager = this.getRegionManager(); this.listenTo(this.regionManager, "before:add:region", function (a) { this.triggerMethod("before:add:region", a) }); this.listenTo(this.regionManager, "add:region", function (a, b) { this[a] = b; this.triggerMethod("add:region", a, b) }); this.listenTo(this.regionManager, "before:remove:region", function (a) { this.triggerMethod("before:remove:region", a) }); this.listenTo(this.regionManager, "remove:region", function (a, b) { delete this[a]; this.triggerMethod("remove:region", a, b) }) } }); d.Behavior = function (a, b) { function c(b, c) { this.view = c; this.defaults = a.result(this, "defaults") || {}; this.options = a.extend({}, this.defaults, b); this.$ = function () { return this.view.$.apply(this.view, arguments) }; this.initialize.apply(this, arguments) } a.extend(c.prototype, b.Events, { initialize: function () { }, destroy: function () { this.stopListening() }, triggerMethod: d.triggerMethod, getOption: d.proxyGetOption, bindEntityEvents: d.proxyBindEntityEvents, unbindEntityEvents: d.proxyUnbindEntityEvents }); c.extend = d.extend; return c }(e, f); d.Behaviors = function (a, b) { function c(a, e) { e = c.parseBehaviors(a, e || b.result(a, "behaviors")); c.wrap(a, e, b.keys(d)) } var d = { setElement: function (a, c) { a.apply(this, b.tail(arguments, 2)); b.each(c, function (a) { a.$el = this.$el; a.el = this.el }, this); return this }, destroy: function (a, c) { var d = b.tail(arguments, 2); a.apply(this, d); b.invoke(c, "destroy", d); return this }, bindUIElements: function (a, c) { a.apply(this); b.invoke(c, a) }, unbindUIElements: function (a, c) { a.apply(this); b.invoke(c, a) }, triggerMethod: function (a, c) { var d = b.tail(arguments, 2); a.apply(this, d); b.each(c, function (b) { a.apply(b, d) }) }, delegateEvents: function (c, d) { var e = b.tail(arguments, 2); c.apply(this, e); b.each(d, function (b) { a.bindEntityEvents(b, this.model, a.getOption(b, "modelEvents")); a.bindEntityEvents(b, this.collection, a.getOption(b, "collectionEvents")) }, this); return this }, undelegateEvents: function (c, d) { var e = b.tail(arguments, 2); c.apply(this, e); b.each(d, function (b) { a.unbindEntityEvents(b, this.model, a.getOption(b, "modelEvents")); a.unbindEntityEvents(b, this.collection, a.getOption(b, "collectionEvents")) }, this); return this }, behaviorEvents: function (c, d) { var e = {}, f = b.result(this, "ui"); b.each(d, function (c, d) { var h = {}, g = b.clone(b.result(c, "events")) || {}, n = b.result(c, "ui"); n = b.extend({}, f, n); g = a.normalizeUIKeys(g, n); b.each(b.keys(g), function (a) { var e = Array(d + 2).join(" "); e = a + e; a = b.isFunction(g[a]) ? g[a] : c[g[a]]; h[e] = b.bind(a, c) }); e = b.extend(e, h) }); return e } }; b.extend(c, { behaviorsLookup: function () { throw Error("You must define where your behaviors are stored.See https://github.com/marionettejs/backbone.marionette/blob/master/docs/marionette.behaviors.md#behaviorslookup"); }, getBehaviorClass: function (a, d) { return a.behaviorClass ? a.behaviorClass : b.isFunction(c.behaviorsLookup) ? c.behaviorsLookup.apply(this, arguments)[d] : c.behaviorsLookup[d] }, parseBehaviors: function (a, d) { return b.chain(d).map(function (d, e) { d = new (c.getBehaviorClass(d, e))(d, a); e = c.parseBehaviors(a, b.result(d, "behaviors")); return [d].concat(e) }).flatten().value() }, wrap: function (a, c, e) { b.each(e, function (e) { a[e] = b.partial(d[e], a[e], c) }) } }); return c }(d, e); d.AppRouter = f.Router.extend({ constructor: function (a) { f.Router.apply(this, arguments); this.options = a || {}; var b = this.getOption("appRoutes"), c = this._getController(); this.processAppRoutes(c, b); this.on("route", this._processOnRoute, this) }, appRoute: function (a, b) { var c = this._getController(); this._addAppRoute(c, a, b) }, _processOnRoute: function (a, b) { var c = e.invert(this.getOption("appRoutes"))[a]; if (e.isFunction(this.onRoute)) this.onRoute(a, c, b) }, processAppRoutes: function (a, b) { if (b) { var c = e.keys(b).reverse(); e.each(c, function (c) { this._addAppRoute(a, c, b[c]) }, this) } }, _getController: function () { return this.getOption("controller") }, _addAppRoute: function (a, b, c) { var d = a[c]; d || k('Method "' + c + '" was not found on the controller'); this.route(b, c, e.bind(d, a)) }, getOption: d.proxyGetOption }); d.Application = function (a) { this._initializeRegions(a); this._initCallbacks = new d.Callbacks; this.submodules = {}; e.extend(this, a); this._initChannel() }; e.extend(d.Application.prototype, f.Events, { execute: function () { this.commands.execute.apply(this.commands, arguments) }, request: function () { return this.reqres.request.apply(this.reqres, arguments) }, addInitializer: function (a) { this._initCallbacks.add(a) }, start: function (a) { this.triggerMethod("before:start", a); this._initCallbacks.run(a, this); this.triggerMethod("start", a) }, addRegions: function (a) { return this._regionManager.addRegions(a) }, emptyRegions: function () { return this._regionManager.emptyRegions() }, removeRegion: function (a) { return this._regionManager.removeRegion(a) }, getRegion: function (a) { return this._regionManager.get(a) }, getRegions: function () { return this._regionManager.getRegions() }, module: function (a, b) { var c = d.Module.getClass(b), e = l.call(arguments); e.unshift(this); return c.create.apply(c, e) }, getRegionManager: function () { return new d.RegionManager }, _initializeRegions: function (a) { var b = e.isFunction(this.regions) ? this.regions(a) : this.regions || {}; this._initRegionManager(); var c = d.getOption(a, "regions"); e.isFunction(c) && (c = c.call(this, a)); e.extend(b, c); this.addRegions(b); return this }, _initRegionManager: function () { this._regionManager = this.getRegionManager(); this.listenTo(this._regionManager, "before:add:region", function (a) { this.triggerMethod("before:add:region", a) }); this.listenTo(this._regionManager, "add:region", function (a, b) { this[a] = b; this.triggerMethod("add:region", a, b) }); this.listenTo(this._regionManager, "before:remove:region", function (a) { this.triggerMethod("before:remove:region", a) }); this.listenTo(this._regionManager, "remove:region", function (a, b) { delete this[a]; this.triggerMethod("remove:region", a, b) }) }, _initChannel: function () { this.channelName = e.result(this, "channelName") || "global"; this.channel = e.result(this, "channel") || q.radio.channel(this.channelName); this.vent = e.result(this, "vent") || this.channel.vent; this.commands = e.result(this, "commands") || this.channel.commands; this.reqres = e.result(this, "reqres") || this.channel.reqres }, triggerMethod: d.triggerMethod, getOption: d.proxyGetOption }); d.Application.extend = d.extend; d.Module = function (a, b, c) { this.moduleName = a; this.options = e.extend({}, this.options, c); this.initialize = c.initialize || this.initialize; this.submodules = {}; this._setupInitializersAndFinalizers(); this.app = b; this.startWithParent = !0; e.isFunction(this.initialize) && this.initialize(a, b, this.options) }; d.Module.extend = d.extend; e.extend(d.Module.prototype, f.Events, { initialize: function () { }, addInitializer: function (a) { this._initializerCallbacks.add(a) }, addFinalizer: function (a) { this._finalizerCallbacks.add(a) }, start: function (a) { this._isInitialized || (e.each(this.submodules, function (b) { b.startWithParent && b.start(a) }), this.triggerMethod("before:start", a), this._initializerCallbacks.run(a, this), this._isInitialized = !0, this.triggerMethod("start", a)) }, stop: function () { this._isInitialized && (this._isInitialized = !1, this.triggerMethod("before:stop"), e.each(this.submodules, function (a) { a.stop() }), this._finalizerCallbacks.run(void 0, this), this._initializerCallbacks.reset(), this._finalizerCallbacks.reset(), this.triggerMethod("stop")) }, addDefinition: function (a, b) { this._runModuleDefinition(a, b) }, _runModuleDefinition: function (a, b) { a && (b = e.flatten([this, this.app, f, d, f.$, e, b]), a.apply(this, b)) }, _setupInitializersAndFinalizers: function () { this._initializerCallbacks = new d.Callbacks; this._finalizerCallbacks = new d.Callbacks }, triggerMethod: d.triggerMethod }); e.extend(d.Module, { create: function (a, b, c) { var d = a, f = l.call(arguments); f.splice(0, 3); b = b.split("."); var n = []; n[b.length - 1] = c; e.each(b, function (b, e) { var g = d; d = this._getModule(g, b, a, c); this._addModuleDefinition(g, d, n[e], f) }, this); return d }, _getModule: function (a, b, c, d, f) { f = e.extend({}, d); d = this.getClass(d); var g = a[b]; g || (g = new d(b, c, f), a[b] = g, a.submodules[b] = g); return g }, getClass: function (a) { var b = d.Module; return a ? a.prototype instanceof b ? a : a.moduleClass || b : b }, _addModuleDefinition: function (a, b, c, d) { var e = this._getDefine(c); c = this._getStartWithParent(c, b); e && b.addDefinition(e, d); this._addStartWithParent(a, b, c) }, _getStartWithParent: function (a, b) { return e.isFunction(a) && a.prototype instanceof d.Module ? (a = b.constructor.prototype.startWithParent, e.isUndefined(a) ? !0 : a) : e.isObject(a) ? (a = a.startWithParent, e.isUndefined(a) ? !0 : a) : !0 }, _getDefine: function (a) { return !e.isFunction(a) || a.prototype instanceof d.Module ? e.isObject(a) ? a.define : null : a }, _addStartWithParent: function (a, b, c) { b.startWithParent = b.startWithParent && c; b.startWithParent && !b.startWithParentIsConfigured && (b.startWithParentIsConfigured = !0, a.addInitializer(function (a) { b.startWithParent && b.start(a) })) } }); return d }) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:marionette', location = '/sidebar/lib/backbone.marionette.mixins.js' */ define("jira/projects/libs/marionette-mixins", [], function () { return function a(d, f) { function e(i, h) { var g = this; var j = d.defaults({}, h || {}, { isPrevented: false, emitter: this, preventDefault: function () { this.isPrevented = true; g.trigger(i + ":prevented", this) } }); this.trigger(i, j); return j } function c(h, g) { var i = this.triggerPreventable(h, g); if (i.isPrevented) { g.preventDefault() } } d.extend(f.View.prototype, { unwrapTemplate: function b() { if (this.$el.parent().length) { var g = this.$el.children(); this.$el.replaceWith(g); this.setElement(g) } else { this.setElement(this.$el.children()) } }, triggerPreventable: e, retriggerPreventable: c }); d.extend(f.Controller.prototype, {triggerPreventable: e, retriggerPreventable: c}); f.ViewManager = f.Controller.extend({ constructor: function () { f.Controller.apply(this, arguments); this.views = {} }, hideView: function (h) { var g = this.views[h]; if (g) { this.stopListening(g); if (!g.isDestroyed) { g.destroy() } delete this.views[h] } }, showView: function (i, h) { var g = this.buildView(i, h); g.render() }, buildView: function (i, h) { var g = this.views[i]; if (!g) { g = h.call(this); this.listenTo(g, "destroy", function () { this.hideView(i) }); this.views[i] = g } return g }, getView: function (g) { return this.views[g] } }); return f } }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:marionette', location = '/sidebar/lib/backbone.marionette.adapter.js' */ define("jira/projects/libs/marionette", ["jira-projects-backbone", "underscore", "atlassian/libs/factories/marionette-2.1.0", "jira/projects/libs/marionette-mixins"], function (e, b, c, a) { var d; d = c(b, e); d = a(b, d); return d }); AJS.namespace("JIRA.Projects.Libs.Marionette", null, require("jira/projects/libs/marionette")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:data', location = 'data/web-resource-manager.js' */ define("jira/projects/data/WRM", window.WRM); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-component', location = '/sidebar/component/navigation-item.js' */ define("jira/projects/sidebar/component/navigation-item", ["jira/util/browser", "jira/projects/libs/marionette"], function (a, b) { return b.CompositeView.extend({ ui: {link: "a.aui-nav-item"}, events: { 'simpleClick @ui.link:not([target="_blank"])': function (c) { c.preventDefault(); this.navigate() } }, initialize: function () { this.id = this.$el.find(">a").attr("data-link-id"); this.bindUIElements() }, onDestroy: function () { this.unbind() }, getElement: function () { return this.el }, navigate: function () { if (!this.select()) { return } var d = this.triggerPreventable("before:navigate"); if (d.isPrevented) { return false } var c = this.ui.link.attr("href"); if (c) { a.reloadViaWindowLocation(c) } return true }, select: function () { var c = this.triggerPreventable("before:select"); if (c.isPrevented) { return false } this.$el.addClass("aui-nav-selected"); this.trigger("select", c); return true }, deselect: function () { if (!this.isSelected()) { return true } var c = this.triggerPreventable("before:deselect"); if (c.isPrevented) { return false } this.$el.removeClass("aui-nav-selected"); this.$el.find("a").blur(); this.trigger("deselect", c); return true }, isSelected: function () { return this.$el.hasClass("aui-nav-selected") }, removeBadge: function () { this.$el.find(".aui-badge").remove() }, getId: function () { return this.id }, getSelectedNavigationItem: function () { if (this.isSelected()) { return this } }, hasASelectedItem: function () { return this.isSelected() } }) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-component', location = '/sidebar/component/navigation-group.js' */ define("jira/projects/sidebar/component/navigation-group", ["jira/projects/sidebar/component/navigation-group-factory", "jira/projects/libs/marionette", "jira/util/logger"], function (b, c, a) { return c.CompositeView.extend({ childEvents: { "before:select": function (d, f) { this.retriggerPreventable("before:select", f); if (f.isPrevented) { return } var e = this.deselect(); if (!e) { f.preventDefault() } }, select: function (e, d) { this.trigger("select", d) }, "before:deselect": function (d, e) { this.retriggerPreventable("before:deselect", e) }, deselect: function (e, d) { this.trigger("deselect", d) }, "before:navigate": function (d, e) { this.retriggerPreventable("before:navigate", e) }, "before:navigate:prevented": function (d, e) { this.trigger("before:navigate:prevented", e) } }, initialize: function () { this.id = this.$el.attr("data-id"); this.$(">ul>li").each(function (e, d) { var f = b.build(d); var g = !!this.getItem(f.id); if (g) { a.warn("Duplicated IDs detected. There are more than one NavigationItem with id data-link-id='" + f.id + "'") } this.proxyChildEvents(f); this.children.add(f, f.id) }.bind(this)) }, onDestroy: function () { this.unbind() }, getElement: function () { return this.el }, deselect: function () { var e = this.triggerPreventable("before:deselect"); if (e.isPrevented) { return false } var d = true; this.children.each(function (f) { d = f.deselect() && d }); return d }, getItem: function (d) { return this.children.findByCustom(d) }, getItemAt: function (d) { return this.children.findByIndex(d) }, getSelectedNavigationItem: function () { var d = this.children.find(function (e) { return e.hasASelectedItem() }); if (d) { return d.getSelectedNavigationItem() } }, hasASelectedItem: function () { return this.children.any(function (d) { return d.hasASelectedItem() }) } }) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-component', location = '/sidebar/component/navigation-subgroup.js' */ define("jira/projects/sidebar/component/navigation-subgroup", ["jira/projects/sidebar/component/navigation-group", "underscore"], function (b, a) { return b.extend({ childEvents: { "before:select": function (c, d) { b.prototype.childEvents["before:select"].apply(this, arguments); if (!d.isPrevented) { this.expand() } } }, initialize: function () { this.childEvents = a.extend({}, b.prototype.childEvents, this.childEvents); b.prototype.initialize.apply(this, arguments); this.id = this.$el.find(">a[data-link-id]").attr("data-link-id") }, expand: function () { this.$el.attr("aria-expanded", "true") }, collapse: function () { this.$el.attr("aria-expanded", "false") }, isExpanded: function () { return this.$el.attr("aria-expanded") === "true" }, isSelected: function () { return this.$el.hasClass("aui-nav-selected") }, getId: function () { return this.id }, getSelectedNavigationItem: function () { if (this.isSelected()) { return this } var c = this.children.find(function (d) { return d.hasASelectedItem() }); if (c) { return c.getSelectedNavigationItem() } }, hasASelectedItem: function () { if (this.isSelected()) { return true } return this.children.any(function (c) { return c.hasASelectedItem() }) } }) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-component', location = '/sidebar/component/navigation-group-factory.js' */ define("jira/projects/sidebar/component/navigation-group-factory", ["exports", "jira/projects/sidebar/component/navigation-item", "jira/projects/sidebar/component/navigation-subgroup", "jquery"], function (a, e, d, c) { a.build = function b(g) { var f; if (c(g).find("ul").length) { f = new d({el: g}) } else { f = new e({el: g}) } return f } }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-component', location = '/sidebar/component/component.js' */ define("jira/projects/sidebar/component", ["jira/projects/sidebar/component/navigation-group", "jira/projects/libs/marionette", "jira/util/logger", "wrm/data", "jquery", "underscore"], function (e, g, d, a, f, c) { var b = Boolean(a.claim("is-global-sidebar")); return g.CompositeView.extend({ childEvents: { "before:select": function (h, i) { if (!this.hasASelectedItem()) { i.isInitial = true } this.retriggerPreventable("before:select", i); if (!i.isPrevented) { this.deselectAllGroups() } }, select: function (i, h) { this.trigger("select", h) }, "before:deselect": function (h, i) { this.retriggerPreventable("before:deselect", i) }, deselect: function (i, h) { this.trigger("deselect", h) }, "before:navigate": function (h, i) { this.retriggerPreventable("before:navigate", i) }, "before:navigate:prevented": function (h, i) { this.trigger("before:navigate:prevented", i) } }, initialize: function () { this.render({force: true}) }, render: function (j) { j = c.defaults({}, j, {force: false}); var i = "el" in j; var n = i || j.force === true; var h = this.children.length > 0; if (!n) { return this } var m = this.triggerPreventable("before:render"); if (m.isPrevented) { return this } if (h) { var l = this.triggerPreventable("before:detach"); if (l.isPrevented) { return this } this.destroyChildren({checkEmpty: false}); this.trigger("detach") } if (i) { var k = f(j.el); this.$el.replaceWith(k); this.setElement(k) } this.$(".aui-sidebar-group").each(c.bind(function (o, p) { var r = new e({el: p}); var q = !!this.getGroup(r.id); if (q) { d.warn('Duplicated IDs detected. There are more than one NavigationGroup with id data-id="' + r.id + '"') } this.proxyChildEvents(r); this.children.add(r, r.id) }, this)); this.trigger("render"); return this }, deselectAllGroups: function () { this.children.call("deselect") }, replaceGroup: function (h, j) { var i = this.getGroup(h); i.$el.replaceWith(j.$el); j.cid = i.cid; this.children.remove(i); this.children.add(j, j.id) }, getGroup: function (h) { return this.children.findByCustom(h) }, getGroupAt: function (h) { return this.children.findByIndex(h) }, getItem: function (h) { return this.getDefaultGroup().getItem(h) }, getElement: function () { return this.el }, getDefaultGroup: function () { return this.getGroup("sidebar-navigation-panel") }, isProjectSidebar: function () { return !b }, getSelectedScopeFilterId: function () { return this.$(".scope-filter a.scope-filter-trigger").attr("data-scope-filter-id") }, setReportsItemLink: function (i) { var j = this.getGroup("sidebar-navigation-panel"); var h = j.getItem("com.atlassian.jira.jira-projects-plugin:report-page"); if (typeof h === "undefined") { h = j.getItem("com.pyxis.greenhopper.jira:global-sidebar-report") } if (h) { h.ui.link.attr("href", i) } }, getAUISidebar: function () { return AJS.sidebar(".aui-sidebar") }, getContentContainer: function () { return this.$(".aui-sidebar-body .sidebar-content-container") }, getSelectedNavigationItem: function () { return this.getDefaultGroup().getSelectedNavigationItem() }, hasASelectedItem: function () { return this.getDefaultGroup().hasASelectedItem() }, dim: function () { this.$el.attr({dimmed: "", "aria-hidden": "true"}) }, undim: function () { this.$el.removeAttr("dimmed"); this.$el.removeAttr("aria-hidden") } }) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-component', location = '/sidebar/component/component-namespaces.js' */ (function () { var a = require("jira/projects/sidebar/component/navigation-group-factory"); var b = require("jira/projects/sidebar/component"); AJS.namespace("JIRA.Projects.Sidebar.Component", null, b); AJS.namespace("JIRA.Projects.Sidebar.Component.NavigationItem", null, require("jira/projects/sidebar/component/navigation-item")); AJS.namespace("JIRA.Projects.Sidebar.Component.NavigationSubgroup", null, require("jira/projects/sidebar/component/navigation-subgroup")); AJS.namespace("JIRA.Projects.Sidebar.Component.NavigationGroup", null, require("jira/projects/sidebar/component/navigation-group")); AJS.namespace("JIRA.Projects.Sidebar.Component.NavigationGroup.build", null, a.build) })(); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-api', location = '/sidebar/api.js' */ define("jira/api/projects/sidebar", ["jira/jquery/deferred", "exports"], function (b, a) { var d = new b(); var c = undefined; a.getSidebar = function () { return d.promise() }; a.initAPI = function (e) { c = e; AJS.namespace("JIRA.API.Sidebar", null, c); d.resolve(c) } }); AJS.namespace("JIRA.API.getSidebar", null, require("jira/api/projects/sidebar").getSidebar); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-analytics', location = '/sidebar/analytics/hash.js' */ define("jira/projects/sidebar/analytics/hash", ["underscore"], function (b) { var e = []; function c(f, g) { return f.indexOf(g) === 0 } function d(f, g) { return f.substring(c(f, g) ? g.length : 0) } function a(g) { var f; var j = 0; if (!g) { return "" } for (var h = 0; h < g.length; h += 1) { f = g.charCodeAt(h); j = ((j * 32) - j) + f; j |= 0 } return j } return { prefixedHash: function (f) { var g = b.find(e, b.partial(c, f)) || ""; return {prefix: g, hash: g + a(d(f, g))} }, addPrefix: function (f) { if (f && !b.contains(e, f)) { e.push(f) } }, clearPrefixes: function () { e.length = 0 } } }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-analytics', location = '/sidebar/analytics/analytics.js' */ define("jira/projects/sidebar/analytics/analytics", ["jira/api/projects/sidebar", "jira/projects/sidebar/analytics/hash", "jira/util/data/meta", "jira/analytics", "jquery"], function (h, f, d, j, g) { function m(n) { return f.prefixedHash(n || "NONE") } function b(n, o) { j.send({name: "jira.project.centric.navigation.sidebar." + n, data: o}) } var k = "proj.config"; function a() { return g('meta[name="admin.active.section"]').attr("content") === "atl.jira.proj.config" } function c(n) { return i.indexOf([k, n].join(".")) !== -1 } function e(n) { var p = n.getAUISidebar(); var o = g(); o = o.add(p.$el); o = o.add(p.submenus.inlineDialog); o.on("click", "a", function () { var r = m(g(this).attr("data-link-id")); var q = {id: r.hash, prefix: r.prefix}; var t = d.get("sidebar-source-page"); if (t) { q.sidebarSourcePage = t } else { if (g(".issue-tools button.expand").length > 0) { q.sidebarSourcePage = "search-el" } else { if (g(".navigation-tools button.collapse").length > 0) { q.sidebarSourcePage = "fullscreen-el" } else { if (a()) { var s = g('meta[name="admin.active.tab"]').attr("content"); s = s.replace("com.atlassian.servicedesk.project-ui:", ""); if (c(s)) { q.sidebarSourcePage = [k, s].join(".") } else { q.sidebarSourcePage = k } } } } } if (i.indexOf(q.sidebarSourcePage) === -1) { q.sidebarSourcePage = "unknown" } b("click.link", q) }) } var i = ["search-el", "fullscreen-el", "search", "fullscreen", "rapid-board", "service-desk", "proj.config", "proj.config.view_project_summary", "proj.config.view_project_issuetypes", "proj.config.project-issuetypes-expand", "proj.config.view_project_workflows", "proj.config.view_project_screens", "proj.config.view_project_fields", "proj.config.view_project_versions", "proj.config.view_project_components", "proj.config.view_project_roles", "proj.config.view_project_permissions", "proj.config.view_project_issuesecurity", "proj.config.view_project_notifications", "proj.config.devstatus-admin-page-link", "proj.config.hipchat-project-admin-page-link", "proj.config.view_issue_collectors", "proj.config.sd-project-request-types-item", "proj.config.sd-project-request-security-item", "proj.config.sd-project-portal-settings-item", "proj.config.sd-project-feedback-settings-item", "proj.config.sd-project-email-settings-item", "proj.config.sd-project-confluence-kb-item", "proj.config.sd-project-sidebar-sla", "proj.config.sd-project-automation-item"]; function l() { h.getSidebar().done(function (n) { if (n.isProjectSidebar()) { b("load.project") } else { b("load.global") } e(n) }) } return {register: l} }); AJS.namespace("JIRA.Projects.Sidebar.Analytics", null, require("jira/projects/sidebar/analytics/analytics")); AJS.namespace("JIRA.Projects.Sidebar.Analytics.Hash", null, require("jira/projects/sidebar/analytics/hash")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-expansion-manager', location = '/sidebar/expansion-manager.js' */ define("jira/projects/sidebar/expansion-manager", ["wrm/data"], function (a) { var c = "jira-sidebar-collapsed"; var b = Boolean(a.claim("sidebar-collapsed-by-default")); return function (f, h) { h || (h = window.localStorage); g(); f.on("expand-start", e); f.on("expand-end collapse-end", d); function e(i) { if (i.isResponsive && h[c] === "true") { i.preventDefault() } } function d(i) { if (!i.isResponsive && !f.isViewportNarrow()) { h[c] = f.isCollapsed().toString() } } function g() { if (f.reflow() && f.isViewportNarrow()) { return } if ((b && h[c] === undefined) || h[c] === "true") { f.collapse() } else { f.expand() } } } }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:projects-api', location = 'page/projects-api.js' */ define("jira/api/projects", ["wrm/data"], function (d) { var a = d.claim("project-key"); var c = d.claim("project-id"); var b = d.claim("project-name"); var e = d.claim("project-type"); return { getCurrentProjectId: function () { return c }, getCurrentProjectKey: function () { return a }, getCurrentProjectName: function () { return b }, getCurrentProjectType: function () { return e } } }); AJS.namespace("JIRA.API.Projects", null, require("jira/api/projects")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:scope-filter', location = '/sidebar/scopefilter/templates.soy' */ // This file was automatically generated from templates.soy. // Please don't edit this file by hand. /** * @fileoverview Templates in namespace JIRA.Projects.Sidebar.ScopeFilter.Templates. */ if (typeof JIRA == 'undefined') { var JIRA = {}; } if (typeof JIRA.Projects == 'undefined') { JIRA.Projects = {}; } if (typeof JIRA.Projects.Sidebar == 'undefined') { JIRA.Projects.Sidebar = {}; } if (typeof JIRA.Projects.Sidebar.ScopeFilter == 'undefined') { JIRA.Projects.Sidebar.ScopeFilter = {}; } if (typeof JIRA.Projects.Sidebar.ScopeFilter.Templates == 'undefined') { JIRA.Projects.Sidebar.ScopeFilter.Templates = {}; } JIRA.Projects.Sidebar.ScopeFilter.Templates.collapsedContainer = function (opt_data, opt_ignored) { return '
    '; }; if (goog.DEBUG) { JIRA.Projects.Sidebar.ScopeFilter.Templates.collapsedContainer.soyTemplateName = 'JIRA.Projects.Sidebar.ScopeFilter.Templates.collapsedContainer'; } JIRA.Projects.Sidebar.ScopeFilter.Templates.collapsedScopeList = function (opt_data, opt_ignored) { opt_data = opt_data || {}; var output = ''; if (opt_data.selectableScopes || opt_data.createActions) { output += '
    ' + soy.$$escapeHtml('Boards in this project') + '
    '; } return output; }; if (goog.DEBUG) { JIRA.Projects.Sidebar.ScopeFilter.Templates.collapsedScopeList.soyTemplateName = 'JIRA.Projects.Sidebar.ScopeFilter.Templates.collapsedScopeList'; } JIRA.Projects.Sidebar.ScopeFilter.Templates.scopeListError = function (opt_data, opt_ignored) { return '
    ' + soy.$$escapeHtml('We\x27re having trouble retrieving the list of boards') + '
    ' + soy.$$escapeHtml('Try again') + '
    '; }; if (goog.DEBUG) { JIRA.Projects.Sidebar.ScopeFilter.Templates.scopeListError.soyTemplateName = 'JIRA.Projects.Sidebar.ScopeFilter.Templates.scopeListError'; } JIRA.Projects.Sidebar.ScopeFilter.Templates.collapsedSelectableItem = function (opt_data, opt_ignored) { return '
  • ' + soy.$$escapeHtml(opt_data.label) + '
  • '; }; if (goog.DEBUG) { JIRA.Projects.Sidebar.ScopeFilter.Templates.collapsedSelectableItem.soyTemplateName = 'JIRA.Projects.Sidebar.ScopeFilter.Templates.collapsedSelectableItem'; } JIRA.Projects.Sidebar.ScopeFilter.Templates.renderScopefilterItems = function (opt_data, opt_ignored) { opt_data = opt_data || {}; var output = ''; if (opt_data.scopeFilterItems.length > 0) { output += '
    ' + soy.$$escapeHtml('Boards in this project') + '
    '; } else if (!opt_data.canCreateScope) { output += '
    ' + soy.$$escapeHtml('Boards in this project') + '
    ' + soy.$$escapeHtml('No boards to display') + '
    '; } return output; }; if (goog.DEBUG) { JIRA.Projects.Sidebar.ScopeFilter.Templates.renderScopefilterItems.soyTemplateName = 'JIRA.Projects.Sidebar.ScopeFilter.Templates.renderScopefilterItems'; } } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:scope-filter', location = '/sidebar/scopefilter/templates.js' */ define("jira/projects/sidebar/scopefilter/templates", function () { return JIRA.Projects.Sidebar.ScopeFilter.Templates }); AJS.namespace("JIRA.Projects.Sidebar.ScopeFilter.Templates", null, require("jira/projects/sidebar/scopefilter/templates")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:scope-filter', location = '/sidebar/scopefilter/model.js' */ define("jira/projects/sidebar/scopefilter/model", ["underscore"], function (a) { var b = function (c) { this.selectedScope = null; this.createScopeActions = []; this.selectableScopes = []; this.setData(c) }; b.prototype.setData = function (c) { if (!c) { return } if (c.selectedScope) { this.selectedScope = c.selectedScope } if (c.createScopeActions.length) { this.createScopeActions = c.createScopeActions } if (c.scopes.length) { if (c.selectedScope) { this.selectableScopes = a.reject(c.scopes, function (d) { return d.label === this.selectedScope.label && d.link === this.selectedScope.link }, this) } else { this.selectableScopes = c.scopes } } }; b.prototype.getSelectedScope = function () { return this.selectedScope }; b.prototype.getSelectableScopes = function () { return this.selectableScopes }; b.prototype.getCreateScopeActions = function () { return this.createScopeActions }; b.prototype.shouldDisplayWhenSidebarIsCollapsed = function () { var d = this.createScopeActions.length > 0; var c = this.selectableScopes.length > 0; return d || c }; return b }); AJS.namespace("JIRA.Projects.Sidebar.ScopeFilter.Model", null, require("jira/projects/sidebar/scopefilter/model")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:scope-filter', location = '/sidebar/scopefilter/scopeFilterDropdownView.js' */ define("jira/projects/sidebar/scopefilter/scopefilter-view", ["jquery", "jira/projects/libs/marionette", "jira/projects/sidebar/scopefilter/templates"], function (b, c, a) { return c.ItemView.extend({ template: a.renderScopefilterItems, events: {"aui-dropdown2-show": "show"}, initialize: function (d) { this.controller = d.controller; this.rendered = false }, show: function () { if (this.rendered) { return } var d = b('').css("margin", "auto"); this.$el.prepend(d); this.$el.addClass("data-load-in-progress"); this.controller.fetchScopeFilterList().then(this.onFetchSuccess.bind(this)).fail(this.onFetchFail.bind(this)).always(function () { this.$el.addClass("data-load-finished").removeClass("data-load-in-progress"); d.remove() }.bind(this)) }, onFetchSuccess: function () { this.$el.addClass("data-load-success"); var f = this.model.getSelectableScopes(); var d = !!this.model.getCreateScopeActions().length; if (f) { var e = this.template({scopeFilterItems: f, canCreateScope: d}); this.$el.prepend(e); this.rendered = true } }, onFetchFail: function () { this.$el.addClass("data-load-fail"); var d = a.scopeListError(); this.$el.prepend(d); this.rendered = true; this.$el.find(".scope-filter-error-message-container .aui-button").on("click", this.onRetryClick.bind(this)) }, onRetryClick: function (f) { f.stopPropagation(); var d = this.$el.find(".scope-filter-error-message-container"); if (d.length) { d.remove() } this.rendered = false; return this.show() } }) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:scope-filter', location = '/sidebar/scopefilter/collapsed-view.js' */ define("jira/projects/sidebar/scopefilter/collapsed-view", ["jquery", "jira/projects/libs/marionette", "jira/projects/sidebar/scopefilter/templates"], function (b, c, a) { return c.ItemView.extend({ template: a.collapsedContainer, ui: {trigger: ".aui-sidebar-group-actions"}, events: {"aui-sidebar-submenu-before-show @ui.trigger": "show"}, initialize: function (d) { this.controller = d.controller; this.rendered = false }, serializeData: function () { return { selectedScope: this.model.getSelectedScope(), selectableScopes: this.model.getSelectableScopes(), createActions: this.model.getCreateScopeActions() } }, show: function (e, d) { if (this.rendered) { return } this.$el.addClass("data-load-in-progress"); this.controller.fetchScopeFilterList().then(this.onFetchSuccess.bind(this, d)).fail(this.onFetchFail.bind(this, d)).always(function () { this.$el.addClass("data-load-finished").removeClass("data-load-in-progress") }.bind(this)) }, onFetchSuccess: function (e) { this.$el.addClass("data-load-success"); var d = a.collapsedScopeList(this.serializeData()); this.renderPreparedTemplate(e, d); this.rendered = true }, onFetchFail: function (e) { this.$el.addClass("data-load-fail"); var d = a.scopeListError(); this.renderPreparedTemplate(e, d); b(e).find(".scope-filter-error-message-container .aui-button").click(this.onRetryClick.bind(this, e)) }, renderPreparedTemplate: function (d, e) { this.ui.trigger.html(e); b(d).find(".aui-navgroup-inner").html(e) }, onRetryClick: function (d) { return this.show(null, d) } }) }); AJS.namespace("JIRA.Projects.Sidebar.ScopeFilter.CollapsedView", null, require("jira/projects/sidebar/scopefilter/collapsed-view")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:scope-filter', location = '/sidebar/scopefilter/scopeFilterController.js' */ define("jira/projects/sidebar/scopefilter/controller", ["jquery", "wrm/require", "wrm/data", "jira/api/projects", "wrm/context-path", "jira/util/logger", "jira/projects/libs/marionette", "jira/projects/sidebar/scopefilter/model", "jira/projects/sidebar/scopefilter/scopefilter-view", "jira/projects/sidebar/scopefilter/collapsed-view"], function (c, d, i, a, b, j, f, g, h, e) { return f.Controller.extend({ initialize: function (k) { this.sidebarAPI = k.sidebarAPI; this.sidebar = this.sidebarAPI.getAUISidebar(); this.$sidebarContentContainer = this.sidebarAPI.getContentContainer(); if (!this.sidebarAPI.isProjectSidebar()) { return } var l = i.claim("scope-filter-data"); this.scopeFilterModel = new g(l); this.dataFetched = false; this.shouldRenderScopeFilterView = !this.scopeFilterModel.getSelectableScopes().length; if (this.sidebar.isCollapsed()) { this.createCollapsedScopeFilterView() } else { this.createScopeFilterView() } this.listenToSidebarEvents() }, createCollapsedScopeFilterView: function () { if (!this.scopeFilterModel.shouldDisplayWhenSidebarIsCollapsed()) { return } this.collapsedView = new e({model: this.scopeFilterModel, controller: this}); this.collapsedView.render(); this.$sidebarContentContainer.prepend(this.collapsedView.el); j.trace("sidebar.scopefilter.collapsed") }, createScopeFilterView: function () { if (!this.shouldRenderScopeFilterView) { return } this.scopeFilterDropdownView = new h({ el: "#sidebar-scope-filter-list", model: this.scopeFilterModel, controller: this }) }, fetchScopeFilterList: function () { var k = c.Deferred(); if (this.dataFetched || this.scopeFilterModel.getSelectableScopes().length) { return k.resolve() } var l = b() + "/rest/projects/1.0/project/" + a.getCurrentProjectKey() + "/rapidviews"; return c.ajax({contentType: "application/json", type: "GET", url: l}).done(function (m) { this.dataFetched = true; this.scopeFilterModel.setData(m) }.bind(this)) }, listenToSidebarEvents: function () { this.sidebar.on("collapse-start", function () { if (this.collapsedView) { return } this.createCollapsedScopeFilterView() }.bind(this)); this.sidebar.on("expand-end", function () { if (this.collapsedView) { this.collapsedView.destroy(); this.collapsedView = null } if (this.scopeFilterDropdownView) { return } this.createScopeFilterView() }.bind(this)) } }) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:scope-filter', location = '/sidebar/scopefilter/scopeFilter-init.js' */ require(["jira/api/projects/sidebar", "jira/projects/sidebar/scopefilter/controller"], function (a, b) { a.getSidebar().done(function (c) { new b({sidebarAPI: c}) }) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:feature-discovery', location = '/sidebar/feature-discovery/feature-discovery.js' */ define("jira/projects/sidebar/feature-discovery", ["jira/api/projects", "jira/api/projects/sidebar", "wrm/context-path", "underscore", "jquery"], function (d, e, a, c, f) { function b(i, h) { c.each(h, function (k) { var j = i.getItem(k); if (j) { j.removeBadge() } }) } function g(h) { e.getSidebar().done(function (i) { b(i, h) }) } return { updateBadges: function () { if (typeof d.getCurrentProjectKey() === "undefined") { return } f.ajax({ url: a() + "/rest/projects/1.0/project/" + encodeURIComponent(d.getCurrentProjectKey()) + "/badges", type: "PUT", contentType: "application/json" }).done(function (h) { g(h.badgesToRemove || []) }) } } }); AJS.namespace("JIRA.Projects.Sidebar.FeatureDiscovery", null, require("jira/projects/sidebar/feature-discovery")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-last-visited', location = '/sidebar/lastvisited/last-visited-updater.js' */ define("jira/projects/sidebar/lastvisited/updater", ["jira/api/projects", "jira/util/logger", "wrm/context-path", "jquery"], function (d, b, a, e) { function c(f, g, h) { if (!f) { return } h = h || function () { b.trace("last.visited.item.saved") }; e.ajax({ url: a() + "/rest/projects/1.0/project/" + encodeURIComponent(f) + "/lastVisited", type: "PUT", contentType: "application/json", data: JSON.stringify({id: g}) }).done(h) } return { start: function (g, i) { var f = d.getCurrentProjectKey(); var h = g.getSelectedNavigationItem(); if (h) { c(f, h.getId(), i) } g.on("before:navigate:prevented", function (j) { c(f, j.emitter.id, i) }); g.on("before:select", function (j) { if (j.isInitial) { c(f, j.emitter.id, i) } }) } } }); AJS.namespace("JIRA.Projects.Sidebar.LastVisited.Updater", null, require("jira/projects/sidebar/lastvisited/updater")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar', location = '/sidebar/sidebar-init.js' */ define("jira/projects/sidebar/sidebar-initializer", ["require"], function (d) { var l = d("jira/util/logger"); var c = d("jira/api/projects"); var h = d("jira/api/projects/sidebar"); var m = d("jira/project/types/warning/dialog"); var j = d("jira/projects/sidebar/lastvisited/updater"); var b = d("jira/projects/sidebar/component"); var a = d("jira/projects/sidebar/analytics/analytics"); var i = d("jira/projects/sidebar/analytics/hash"); var g = d("wrm/context-path"); var n = d("jquery"); var k = d("underscore"); var f = ["NONE", "com.atlassian.jira.jira-projects-plugin:project-issue-search-link", "com.atlassian.jira.jira-projects-plugin:components-page", "com.atlassian.jira.jira-projects-plugin:reports-panel", "com.atlassian.jira.jira-projects-plugin:summary-panel", "com.atlassian.jira.jira-projects-plugin:summary-page", "com.atlassian.jira.jira-projects-plugin:components-page", "com.atlassian.jira.jira-projects-plugin:release-page", "com.atlassian.jira.jira-projects-plugin:release-sidebar-version-", "com.atlassian.jira.jira-projects-plugin:report-page", "com.pyxis.greenhopper.jira:global-sidebar-report", "com.pyxis.greenhopper.jira:global-sidebar-plan-scrum", "com.pyxis.greenhopper.jira:global-sidebar-work-scrum", "com.pyxis.greenhopper.jira:global-sidebar-work-kanban", "com.pyxis.greenhopper.jira:project-sidebar-plan-scrum", "com.pyxis.greenhopper.jira:project-sidebar-work-scrum", "com.pyxis.greenhopper.jira:project-sidebar-work-kanban", "com.atlassian.jira.jira-projects-issue-navigator:embedded-issue-navigator-link", "com.atlassian.jira.jira-projects-issue-navigator:sidebar-issue-navigator"]; var e = function (s) { function p(u) { var t = n(".aui-sidebar .aui-badge"); t.tooltip({gravity: "w"}); if (u.isCollapsed()) { t.tooltip("disable") } u.on("collapse-end expand-end", function () { n(".tipsy").remove(); n(".aui-sidebar .aui-badge").tooltip("toggleEnabled") }) } function q(u) { function t() { u.getAUISidebar().reflow() } setTimeout(t, 200); setInterval(t, 5 * 60 * 1000) } function r(t) { t.on("collapse-start", function () { var u = t.$el.find(".scope-filter-trigger"); if (u.hasClass("aui-dropdown2-active")) { u.trigger("aui-button-invoke") } }) } function o() { m.init({ onProjectTypeChanged: function () { var t = c.getCurrentProjectKey(); window.location.replace(g() + "/projects/" + t + "/summary") } }); l.trace("project.types.warning.messages.init") } h.initAPI(new b({el: s.$el[0]})); k(f).each(i.addPrefix); a.register(); r(s); p(s); o(); h.getSidebar().done(function (t) { q(t); j.start(t) }) }; return {init: e} }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:subnavigator', location = '/static/components/subnavigator/templates/templates.soy' */ // This file was automatically generated from templates.soy. // Please don't edit this file by hand. /** * @fileoverview Templates in namespace JIRA.Projects.Subnavigator.Templates. */ if (typeof JIRA == 'undefined') { var JIRA = {}; } if (typeof JIRA.Projects == 'undefined') { JIRA.Projects = {}; } if (typeof JIRA.Projects.Subnavigator == 'undefined') { JIRA.Projects.Subnavigator = {}; } if (typeof JIRA.Projects.Subnavigator.Templates == 'undefined') { JIRA.Projects.Subnavigator.Templates = {}; } JIRA.Projects.Subnavigator.Templates.content = function (opt_data, opt_ignored) { var output = ''; return output; }; if (goog.DEBUG) { JIRA.Projects.Subnavigator.Templates.content.soyTemplateName = 'JIRA.Projects.Subnavigator.Templates.content'; } JIRA.Projects.Subnavigator.Templates.itemSection = function (opt_data, opt_ignored) { var output = ''; if (opt_data.items.length > 0) { output += '
    '; } return output; }; if (goog.DEBUG) { JIRA.Projects.Subnavigator.Templates.itemSection.soyTemplateName = 'JIRA.Projects.Subnavigator.Templates.itemSection'; } JIRA.Projects.Subnavigator.Templates.item = function (opt_data, opt_ignored) { return '' + ((opt_data.item.link) ? '' + soy.$$escapeHtml(opt_data.item.label) + '' : '' + soy.$$escapeHtml(opt_data.item.label) + '') + ''; }; if (goog.DEBUG) { JIRA.Projects.Subnavigator.Templates.item.soyTemplateName = 'JIRA.Projects.Subnavigator.Templates.item'; } JIRA.Projects.Subnavigator.Templates.trigger = function (opt_data, opt_ignored) { return '' + ((opt_data.renderAsButton) ? '' : '' + soy.$$escapeHtml(opt_data.label) + ''); }; if (goog.DEBUG) { JIRA.Projects.Subnavigator.Templates.trigger.soyTemplateName = 'JIRA.Projects.Subnavigator.Templates.trigger'; } JIRA.Projects.Subnavigator.Templates.title = function (opt_data, opt_ignored) { return '' + soy.$$escapeHtml(opt_data.title) + ''; }; if (goog.DEBUG) { JIRA.Projects.Subnavigator.Templates.title.soyTemplateName = 'JIRA.Projects.Subnavigator.Templates.title'; } } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:subnavigator', location = '/static/components/subnavigator/templates/templates.js' */ (function () { var a = JIRA.Projects.Subnavigator.Templates; define("jira/projects/components/subnavigator/templates", [], function () { return a }) })(); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:subnavigator', location = '/static/components/subnavigator/views/Content.js' */ define("jira/projects/components/subnavigator/views/content", ["jira/projects/components/subnavigator/templates", "underscore", "jira/projects/libs/marionette", "jquery"], function (b, a, d, c) { return d.ItemView.extend({ template: b.content, tooltipTimer: null, ui: {item: "li"}, initialize: function () { this.tooltipTimeout = this.options.tooltipTimeout || 600; this.hideSelectedItem = a.has(this.options, "hideSelectedItem") ? this.options.hideSelectedItem : true }, _hideTooltips: function () { clearTimeout(this.tooltipTimer); c(".tipsy").remove() }, events: { "click @ui.item": function (g) { this._hideTooltips(); var f = c(g.target).attr("data-item-id"); this.trigger("click", f) }, "mouseenter @ui.item": function (e) { this._hideTooltips(); this.tooltipTimer = setTimeout(function () { c(e.currentTarget).tipsy("show") }, this.tooltipTimeout) }, "mouseleave @ui.item": "_hideTooltips", "aui-dropdown2-hide": "_hideTooltips" }, serializeData: function () { var e = this.model.get("selectedItem"); var g = this.model.get("itemGroups"); var f = this.hideSelectedItem; if (e) { g = a.map(g, function (h) { if (f) { return a.reject(h, function (i) { return i.id === e.id }) } else { return a.map(h, function (j) { var i = a.clone(j); if (i.id === e.id) { i.selected = true } return i }) } }) } return {itemGroups: g, hideSelectedItem: f, idSuffix: this.options.id || ""} }, onRender: function () { this.unwrapTemplate(); this._hideTooltips(); c(this.ui.item).tooltip({gravity: "w", trigger: "manual"}) } }) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:subnavigator', location = '/static/components/subnavigator/views/Trigger.js' */ define("jira/projects/components/subnavigator/views/trigger", ["jira/projects/components/subnavigator/templates", "jira/projects/libs/marionette"], function (a, b) { return b.ItemView.extend({ template: a.trigger, serializeData: function () { return { label: this.model.get("selectedItem").label, renderAsButton: this.model.getAllItems().length > 1, idSuffix: this.options.id || "" } }, onRender: function () { this.unwrapTemplate() } }) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:subnavigator', location = '/static/components/subnavigator/views/StaticTrigger.js' */ define("jira/projects/components/subnavigator/views/static-trigger", ["jira/projects/components/subnavigator/views/trigger"], function (a) { return a.extend({ serializeData: function () { return {label: this.options.label, renderAsButton: true, idSuffix: this.options.id || ""} }, onRender: function () { this.unwrapTemplate(); this.$el.removeClass("subnav-trigger") } }) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:subnavigator', location = '/static/components/subnavigator/views/Title.js' */ define("jira/projects/components/subnavigator/views/title", ["jira/projects/components/subnavigator/templates", "jira/projects/libs/marionette"], function (a, b) { return b.ItemView.extend({ template: a.title, serializeData: function () { var c = this.model.get("selectedItem"); return {title: c.label} } }) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:subnavigator', location = '/static/components/subnavigator/entities/Items.js' */ define("jira/projects/components/subnavigator/entities/items", ["underscore", "jira-projects-backbone"], function (a, b) { return b.Model.extend({ defaults: {itemGroups: [], selectedItem: null}, isEmpty: function () { return a.isEmpty(this.getAllItems()) }, selectItem: function (d) { var c = this.getAllItems(); this.set("selectedItem", a.find(c, function (e) { return e.id === d }) || a.first(c)) }, getAllItems: function () { return a.flatten(this.get("itemGroups")) } }) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:subnavigator', location = '/static/components/subnavigator/Subnavigator.js' */ define("jira/projects/components/subnavigator/subnavigator", ["jira/projects/components/subnavigator/views/trigger", "jira/projects/components/subnavigator/views/title", "jira/projects/components/subnavigator/views/static-trigger", "jira/projects/components/subnavigator/views/content", "jira/projects/components/subnavigator/entities/items", "jira/projects/libs/marionette", "jira/util/browser", "underscore", "jquery"], function (h, e, a, b, c, f, d, g, i) { return f.Controller.extend({ _shouldShow: function () { return !this.model.isEmpty() }, _shouldShowTriggerView: function () { if (this.options.changeViewText) { var j = this.model.getAllItems().length; return j > 1 } else { return true } }, _sanitizeItems: function () { var j = this.options.itemGroups; if (j && j[0]) { if (!g.isArray(j[0])) { return [j] } } return j }, _buildModel: function () { this.model = new c({itemGroups: this._sanitizeItems()}); this.model.selectItem(this.options.selectedItem); this.listenTo(this.model, "change:selectedItem", this.show) }, _buildTitleView: function () { this.titleView = new e({model: this.model}); this.titleView.setElement(i(this.options.titlePlaceholder)) }, _buildTriggerView: function () { if (this.options.changeViewText) { this.triggerView = new a({ model: this.model, id: this.options.id, label: this.options.changeViewText }) } else { this.triggerView = new h({model: this.model, id: this.options.id}) } this.triggerView.setElement(i(this.options.triggerPlaceholder)) }, _buildContentView: function () { this.contentView = new b({ model: this.model, id: this.options.id, hideSelectedItem: this.options.hideSelectedItem }); this.contentView.setElement(i(this.options.contentPlaceholder)); this.listenTo(this.contentView, "click", function (l) { this.model.selectItem(l); var k = this.model.get("selectedItem"); var j = this.triggerPreventable("itemSelected", {item: k}); if (j.isPrevented) { return } if (k.link) { d.reloadViaWindowLocation(k.link) } }.bind(this)) }, initialize: function () { this._buildModel(); if (this._shouldShow()) { this._buildTriggerView(); this._buildContentView(); if (this.options.titlePlaceholder) { this._buildTitleView() } } }, show: function () { if (this._shouldShow()) { if (this._shouldShowTriggerView()) { this.triggerView.render(); this.contentView.render() } if (this.titleView) { this.titleView.render() } } }, selectItem: function (j) { if (this._shouldShow()) { this.model.selectItem(j) } } }) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:subnavigator', location = '/static/components/subnavigator/Subnavigator-namespaces.js' */ AJS.namespace("JIRA.Projects.Subnavigator", null, require("jira/projects/components/subnavigator/subnavigator")); AJS.namespace("JIRA.Projects.Subnavigator.Views.Content", null, require("jira/projects/components/subnavigator/views/content")); AJS.namespace("JIRA.Projects.Subnavigator.Views.StaticTrigger", null, require("jira/projects/components/subnavigator/views/static-trigger")); AJS.namespace("JIRA.Projects.Subnavigator.Views.Title", null, require("jira/projects/components/subnavigator/views/title")); AJS.namespace("JIRA.Projects.Subnavigator.Views.Trigger", null, require("jira/projects/components/subnavigator/views/trigger")); AJS.namespace("JIRA.Projects.Subnavigator.Entities.Items", null, require("jira/projects/components/subnavigator/entities/items")); AJS.namespace("JIRA.Projects.Subnavigator.Templates", null, require("jira/projects/components/subnavigator/templates")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:pinnablenavigator', location = '/static/components/pinnablenavigator/templates/templates.soy' */ // This file was automatically generated from templates.soy. // Please don't edit this file by hand. /** * @fileoverview Templates in namespace JIRA.Projects.PinnableNavigator.Templates. */ if (typeof JIRA == 'undefined') { var JIRA = {}; } if (typeof JIRA.Projects == 'undefined') { JIRA.Projects = {}; } if (typeof JIRA.Projects.PinnableNavigator == 'undefined') { JIRA.Projects.PinnableNavigator = {}; } if (typeof JIRA.Projects.PinnableNavigator.Templates == 'undefined') { JIRA.Projects.PinnableNavigator.Templates = {}; } JIRA.Projects.PinnableNavigator.Templates.unpinned = function (opt_data, opt_ignored) { opt_data = opt_data || {}; return ''; }; if (goog.DEBUG) { JIRA.Projects.PinnableNavigator.Templates.unpinned.soyTemplateName = 'JIRA.Projects.PinnableNavigator.Templates.unpinned'; } JIRA.Projects.PinnableNavigator.Templates.unpinnedListItems = function (opt_data, opt_ignored) { var output = ''; var manageButtonLabel__soy15 = opt_data.manageText ? opt_data.manageText : 'Manage' + ' ' + opt_data.title; if (opt_data.sections && opt_data.sections.length) { var sectionList18 = opt_data.sections; var sectionListLen18 = sectionList18.length; for (var sectionIndex18 = 0; sectionIndex18 < sectionListLen18; sectionIndex18++) { var sectionData18 = sectionList18[sectionIndex18]; output += (sectionData18.items.length) ? JIRA.Projects.PinnableNavigator.Templates.dropdownItemSection({ items: sectionData18.items, selectedItem: opt_data.selectedItem, groupId: sectionData18.id, styleClass: sectionData18.styleClass, appendManageButton: opt_data.manageLocation && sectionData18.id == opt_data.manageLocation, manageButtonLabel: manageButtonLabel__soy15 }) : ''; } output += (!opt_data.manageLocation && opt_data.isManageable) ? '
    ' : ''; } else { output += ''; } return output; }; if (goog.DEBUG) { JIRA.Projects.PinnableNavigator.Templates.unpinnedListItems.soyTemplateName = 'JIRA.Projects.PinnableNavigator.Templates.unpinnedListItems'; } JIRA.Projects.PinnableNavigator.Templates.unPinnedManageButton = function (opt_data, opt_ignored) { return '' + JIRA.Projects.PinnableNavigator.Templates.item({ id: 'manageButton', label: opt_data.manageText, styleClass: 'js-manage-button' }); }; if (goog.DEBUG) { JIRA.Projects.PinnableNavigator.Templates.unPinnedManageButton.soyTemplateName = 'JIRA.Projects.PinnableNavigator.Templates.unPinnedManageButton'; } JIRA.Projects.PinnableNavigator.Templates.pinnedNav = function (opt_data, opt_ignored) { opt_data = opt_data || {}; return '
    '; }; if (goog.DEBUG) { JIRA.Projects.PinnableNavigator.Templates.pinnedNav.soyTemplateName = 'JIRA.Projects.PinnableNavigator.Templates.pinnedNav'; } JIRA.Projects.PinnableNavigator.Templates.searchBlock = function (opt_data, opt_ignored) { opt_data = opt_data || {}; return '
    Remove
    '; }; if (goog.DEBUG) { JIRA.Projects.PinnableNavigator.Templates.searchBlock.soyTemplateName = 'JIRA.Projects.PinnableNavigator.Templates.searchBlock'; } JIRA.Projects.PinnableNavigator.Templates.pinnedListItems = function (opt_data, opt_ignored) { var output = '
    '; if (opt_data.sections && opt_data.sections.length) { var sectionList77 = opt_data.sections; var sectionListLen77 = sectionList77.length; for (var sectionIndex77 = 0; sectionIndex77 < sectionListLen77; sectionIndex77++) { var sectionData77 = sectionList77[sectionIndex77]; output += (sectionData77.type == 'buttons') ? (sectionData77.items.length) ? JIRA.Projects.PinnableNavigator.Templates.buttonItemSection({ items: sectionData77.items, styleClass: 'isSelectable', sectionStyleClass: sectionData77.styleClass }) : '' : JIRA.Projects.PinnableNavigator.Templates.pinnedItemSection({ selectedItem: opt_data.selectedItem, section: sectionData77, emptyText: opt_data.emptyText }); } } else { output += '
    ' + soy.$$escapeHtml(opt_data.emptyText) + '
    '; } output += '
    '; return output; }; if (goog.DEBUG) { JIRA.Projects.PinnableNavigator.Templates.pinnedListItems.soyTemplateName = 'JIRA.Projects.PinnableNavigator.Templates.pinnedListItems'; } JIRA.Projects.PinnableNavigator.Templates.pinnedItemSection = function (opt_data, opt_ignored) { return '' + ((opt_data.section.heading) ? '' : '') + ((opt_data.section.items.length) ? JIRA.Projects.PinnableNavigator.Templates.navItemSection({ items: opt_data.section.items, selectedItem: opt_data.selectedItem, groupId: opt_data.section.id, allowReorder: opt_data.section.allowReorder, allowDelete: opt_data.section.allowDelete, styleClass: opt_data.section.styleClass }) : '
    ' + soy.$$escapeHtml(opt_data.emptyText) + '
    '); }; if (goog.DEBUG) { JIRA.Projects.PinnableNavigator.Templates.pinnedItemSection.soyTemplateName = 'JIRA.Projects.PinnableNavigator.Templates.pinnedItemSection'; } JIRA.Projects.PinnableNavigator.Templates.navItemSection = function (opt_data, opt_ignored) { var output = ''; return output; }; if (goog.DEBUG) { JIRA.Projects.PinnableNavigator.Templates.navItemSection.soyTemplateName = 'JIRA.Projects.PinnableNavigator.Templates.navItemSection'; } JIRA.Projects.PinnableNavigator.Templates.buttonItemSection = function (opt_data, opt_ignored) { var output = '
      '; var itemList156 = opt_data.items; var itemListLen156 = itemList156.length; for (var itemIndex156 = 0; itemIndex156 < itemListLen156; itemIndex156++) { var itemData156 = itemList156[itemIndex156]; output += '
    • '; var itemContent__soy158 = '' + ((itemData156.iconClass) ? '' : '') + soy.$$escapeHtml(itemData156.label); var itemAttributes__soy165 = 'title="' + soy.$$escapeHtml(itemData156.label) + '" data-item-id="' + soy.$$escapeHtml(itemData156.id) + '" class="aui-button aui-button-subtle js-item-link ' + ((opt_data.styleClass) ? soy.$$escapeHtml(opt_data.styleClass) : '') + ' ' + ((itemData156.styleClass) ? soy.$$escapeHtml(itemData156.styleClass) : '') + '"'; output += ((itemData156.link) ? '' + soy.$$filterNoAutoescape(itemContent__soy158) + '' : '') + '
    • '; } output += '
    '; return output; }; if (goog.DEBUG) { JIRA.Projects.PinnableNavigator.Templates.buttonItemSection.soyTemplateName = 'JIRA.Projects.PinnableNavigator.Templates.buttonItemSection'; } JIRA.Projects.PinnableNavigator.Templates.dropdownItemSection = function (opt_data, opt_ignored) { var output = ''; return output; }; if (goog.DEBUG) { JIRA.Projects.PinnableNavigator.Templates.dropdownItemSection.soyTemplateName = 'JIRA.Projects.PinnableNavigator.Templates.dropdownItemSection'; } JIRA.Projects.PinnableNavigator.Templates.item = function (opt_data, opt_ignored) { return '' + ((opt_data.content) ? soy.$$filterNoAutoescape(opt_data.content) : ((opt_data.iconClass) ? '' : '') + soy.$$escapeHtml(opt_data.label)) + '' + ((opt_data.countDisplay) ? '' + soy.$$escapeHtml(opt_data.countDisplay) + '' : '') + '' + ((opt_data.allowDelete) ? '' : '') + ''; }; if (goog.DEBUG) { JIRA.Projects.PinnableNavigator.Templates.item.soyTemplateName = 'JIRA.Projects.PinnableNavigator.Templates.item'; } JIRA.Projects.PinnableNavigator.Templates.unpinnedTrigger = function (opt_data, opt_ignored) { return ''; }; if (goog.DEBUG) { JIRA.Projects.PinnableNavigator.Templates.unpinnedTrigger.soyTemplateName = 'JIRA.Projects.PinnableNavigator.Templates.unpinnedTrigger'; } } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:pinnablenavigator', location = '/static/components/pinnablenavigator/templates/search.soy' */ // This file was automatically generated from search.soy. // Please don't edit this file by hand. /** * @fileoverview Templates in namespace JIRA.Projects.PinnableNavigator.Search.Templates. */ if (typeof JIRA == 'undefined') { var JIRA = {}; } if (typeof JIRA.Projects == 'undefined') { JIRA.Projects = {}; } if (typeof JIRA.Projects.PinnableNavigator == 'undefined') { JIRA.Projects.PinnableNavigator = {}; } if (typeof JIRA.Projects.PinnableNavigator.Search == 'undefined') { JIRA.Projects.PinnableNavigator.Search = {}; } if (typeof JIRA.Projects.PinnableNavigator.Search.Templates == 'undefined') { JIRA.Projects.PinnableNavigator.Search.Templates = {}; } JIRA.Projects.PinnableNavigator.Search.Templates.searchBlock = function (opt_data, opt_ignored) { opt_data = opt_data || {}; return '
    Remove
    '; }; if (goog.DEBUG) { JIRA.Projects.PinnableNavigator.Search.Templates.searchBlock.soyTemplateName = 'JIRA.Projects.PinnableNavigator.Search.Templates.searchBlock'; } } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:pinnablenavigator', location = '/static/components/pinnablenavigator/managedialog/templates/templates.soy' */ // This file was automatically generated from templates.soy. // Please don't edit this file by hand. /** * @fileoverview Templates in namespace JIRA.Projects.PinnableNavigator.ManageDialog.Templates. */ if (typeof JIRA == 'undefined') { var JIRA = {}; } if (typeof JIRA.Projects == 'undefined') { JIRA.Projects = {}; } if (typeof JIRA.Projects.PinnableNavigator == 'undefined') { JIRA.Projects.PinnableNavigator = {}; } if (typeof JIRA.Projects.PinnableNavigator.ManageDialog == 'undefined') { JIRA.Projects.PinnableNavigator.ManageDialog = {}; } if (typeof JIRA.Projects.PinnableNavigator.ManageDialog.Templates == 'undefined') { JIRA.Projects.PinnableNavigator.ManageDialog.Templates = {}; } JIRA.Projects.PinnableNavigator.ManageDialog.Templates.dialog = function (opt_data, opt_ignored) { var output = '

    ' + ((opt_data.manageText) ? soy.$$escapeHtml(opt_data.manageText) : soy.$$escapeHtml('Manage' + ' ' + opt_data.title)) + '

    ' + soy.$$escapeHtml('Close') + '
    '; var itemGroupList12 = opt_data.itemGroups; var itemGroupListLen12 = itemGroupList12.length; for (var itemGroupIndex12 = 0; itemGroupIndex12 < itemGroupListLen12; itemGroupIndex12++) { var itemGroupData12 = itemGroupList12[itemGroupIndex12]; if (itemGroupData12.items.length > 0) { output += ''; var itemList22 = itemGroupData12.items; var itemListLen22 = itemList22.length; for (var itemIndex22 = 0; itemIndex22 < itemListLen22; itemIndex22++) { var itemData22 = itemList22[itemIndex22]; output += '' + ((itemGroupData12.allowReorder) ? '' : '') + '' + ((itemGroupData12.allowDelete) ? '' : '') + ''; } output += '
    ' + soy.$$escapeHtml(itemData22.label) + '' + ((itemData22.count >= 0) ? '' + soy.$$escapeHtml(itemData22.count) + '' : '') + '' + aui.buttons.button({ extraClasses: 'subnav-item-delete', text: 'Delete', type: 'link' }) + '
    '; } } output += '
    '; return output; }; if (goog.DEBUG) { JIRA.Projects.PinnableNavigator.ManageDialog.Templates.dialog.soyTemplateName = 'JIRA.Projects.PinnableNavigator.ManageDialog.Templates.dialog'; } JIRA.Projects.PinnableNavigator.ManageDialog.Templates.emptyText = function (opt_data, opt_ignored) { return '

    ' + soy.$$escapeHtml(opt_data.text) + '

    '; }; if (goog.DEBUG) { JIRA.Projects.PinnableNavigator.ManageDialog.Templates.emptyText.soyTemplateName = 'JIRA.Projects.PinnableNavigator.ManageDialog.Templates.emptyText'; } } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:pinnablenavigator', location = '/static/components/pinnablenavigator/templates/templates.js' */ (function () { var a = JIRA.Projects.PinnableNavigator.Templates; define("jira/projects/components/pinnable-navigator/templates", function () { return a }) })(); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:pinnablenavigator', location = '/static/components/pinnablenavigator/templates/search.js' */ (function () { var a = JIRA.Projects.PinnableNavigator.Search.Templates; define("jira/projects/components/pinnable-navigator/search/templates", function () { return a }) })(); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:pinnablenavigator', location = '/static/components/pinnablenavigator/managedialog/templates/templates.js' */ (function () { var a = JIRA.Projects.PinnableNavigator.ManageDialog.Templates; define("jira/projects/components/pinnable-navigator/manage-dialog/templates", function () { return a }) })(); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:pinnablenavigator', location = '/static/components/pinnablenavigator/dark-feature.js' */ define("jira/projects/components/pinnable-navigator/dark-feature", ["jira/ajs/dark-features", "exports"], function (b, a) { a.isSearchEnabled = function () { return b.isEnabled("com.atlassian.jira.projects.PinnableNavigator.Search") } }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:pinnablenavigator', location = '/static/components/pinnablenavigator/views/navigatorview/NavigatorView.js' */ define("jira/projects/components/pinnable-navigator/views/navigator-view/navigator-view", ["jira/projects/libs/marionette", "jquery"], function (b, a) { return b.ItemView.extend({ ui: { manageButton: ".js-manage-button", unPinToggler: ".js-unpin-button", pinToggler: ".js-pin-toggler" }, triggers: { "click @ui.unPinToggler": { event: "navigatorUnPinned", preventDefault: true, stopPropagation: false }, "click @ui.pinToggler": {event: "navigatorPinned", preventDefault: true, stopPropagation: false}, "click @ui.manageButton": {event: "manageDialogOpened", preventDefault: true, stopPropagation: false} }, renderSearch: function () { if (this.options.searchView && this.options.searchView.isSearchable()) { this.options.searchView.setElement(a(this.options.searchView.options.el)); this.options.searchView.render() } }, renderList: function () { this.listItemsView.render() }, isAttachedToDom: function () { return !!this.$el.closest("body").length }, serializeData: function () { return {idSuffix: this.options.id || ""} }, onRender: function () { this.unwrapTemplate() } }) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:pinnablenavigator', location = '/static/components/pinnablenavigator/views/navigatorview/PinnedView.js' */ define("jira/projects/components/pinnable-navigator/views/navigator-view/pinned-view", ["jira/projects/components/pinnable-navigator/templates", "jira/projects/components/pinnable-navigator/views/navigator-view/navigator-view", "jira/projects/components/pinnable-navigator/views/list-view/pinned-list-view"], function (a, c, b) { return c.extend({ template: a.pinnedNav, initialize: function () { this.listItemsView = new b({ model: this.options.model, id: this.options.id || "", title: this.options.title, manageText: this.options.manageText, emptyText: this.options.emptyText, tooltipTimeout: this.options.tooltipTimeout, searchView: this.options.searchView }); this.listenTo(this.listItemsView, { itemSelected: function (d) { this.trigger("itemSelected", d) } }) }, putListintoView: function () { this.listItemsView.setElement(this.$(".js-pinned-items-list")); this.renderList() }, unpin: function () { this.$el.remove() } }) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:pinnablenavigator', location = '/static/components/pinnablenavigator/views/navigatorview/UnpinnedView.js' */ define("jira/projects/components/pinnable-navigator/views/navigator-view/unpinned-view", ["jira/projects/components/pinnable-navigator/templates", "jira/projects/components/pinnable-navigator/views/navigator-view/navigator-view", "jira/projects/components/pinnable-navigator/views/list-view/unpinned-list-view"], function (b, c, a) { return c.extend({ template: b.unpinned, initialize: function () { this.listItemsView = new a({ model: this.options.model, id: this.options.id || "", title: this.options.title, manageText: this.options.manageText, manageLocation: this.options.manageLocation, emptyText: this.options.emptyText, tooltipTimeout: this.options.tooltipTimeout, searchView: this.options.searchView }); this.listenTo(this.listItemsView, "itemSelected", function (d) { this.trigger("itemSelected", d) }) }, putListintoView: function () { this.listItemsView.setElement(this.$(".js-unpinned-items-list")); this.renderList() } }) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:pinnablenavigator', location = '/static/components/pinnablenavigator/views/listview/ListView.js' */ define("jira/projects/components/pinnable-navigator/views/list-view/list-view", ["jira/projects/libs/marionette", "underscore", "jquery"], function (d, a, c) { var b = 99999; return d.ItemView.extend({ tooltipTimer: null, ui: { item: "li", link: ".js-item-link.isSelectable", dropdownTwoHide: "aui-dropdown2-hide", itemSections: ".js-items-section", removeButton: ".js-remove-button" }, events: { "click @ui.link": function (g) { this._hideTooltips(); var f = c(g.currentTarget).data("item-id"); this._processNavItem(f, g) }, "mouseenter @ui.item": function (e) { this._hideTooltips(); this.tooltipTimer = setTimeout(function () { c(e.currentTarget).tipsy("show") }, this.tooltipTimeout) }, "mouseleave @ui.item": "_hideTooltips", "@ui.dropdownTwoHide": "_hideTooltips", "click @ui.removeButton": function (g) { g.preventDefault(); var f = this.$(g.currentTarget).siblings(".js-item-link"); f.addClass("js-deleting"); var h = f.closest(".js-items-section"); this._saveModifications([f.data("item-id")], h).fail(function () { f.removeClass("js-deleting") }) } }, initialize: function () { this.tooltipTimeout = this.options.tooltipTimeout || 600; if (this.options.searchView) { this.listenTo(this.options.searchView, {doQuery: this.render}) } }, _hideTooltips: function () { clearTimeout(this.tooltipTimer); c(".tipsy").remove() }, _processNavItem: function (i, h) { this.model.selectItem(i); var g = this.model.get("selectedItem"); var f = this.triggerPreventable("itemSelected", {item: g}); if (f.isPrevented) { h.preventDefault() } }, serializeData: function () { var g = this.model.get("selectedItem"); var f; if (this.options.searchView) { f = this.options.searchView.getQuery() } else { f = "" } var h = this.model.getAllItemsWithName(f); a.forEach(h, function (i) { a.forEach(i.items, function (j) { if (j.count !== undefined && j.count !== "") { if (j.count > b) { j.countDisplay = b + "+" } else { if (j.count >= 0) { j.countDisplay = j.count } } } }) }); var e = null; if (g) { e = g.id } return { title: this.options.title, sections: h, selectedItem: e, isManageable: this.model.isManageable(), manageLocation: this.options.manageLocation, manageText: this.options.manageText, emptyText: this.options.emptyText } }, onRender: function () { this._hideTooltips(); c(this.ui.item).tooltip({gravity: "w", trigger: "manual"}); this._makeItemsSortable() }, _makeItemsSortable: function () { this.$(".js-sortable-items").sortable({ axis: "y", placeholder: "item-holder-highlight", sort: function (e, f) { f.placeholder.html(f.helper.html()) }, update: function (e, f) { var g = f.item.closest(".js-items-section"); this._saveModifications([], g) }.bind(this) }) }, _saveModifications: function (f, g) { var e = a.map(g.find(".js-item-link:not(.js-deleting)"), function (i) { return c(i).data("item-id") }); var h = [{id: g.data("id"), deleted: f, order: e, inline: true}]; return this.model.save(h) } }) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:pinnablenavigator', location = '/static/components/pinnablenavigator/views/listview/PinnedListView.js' */ define("jira/projects/components/pinnable-navigator/views/list-view/pinned-list-view", ["jira/projects/components/pinnable-navigator/templates", "jira/projects/components/pinnable-navigator/views/list-view/list-view"], function (b, a) { return a.extend({template: b.pinnedListItems}) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:pinnablenavigator', location = '/static/components/pinnablenavigator/views/listview/UnpinnedListView.js' */ define("jira/projects/components/pinnable-navigator/views/list-view/unpinned-list-view", ["jira/projects/components/pinnable-navigator/templates", "jira/projects/components/pinnable-navigator/views/list-view/list-view"], function (b, a) { return a.extend({template: b.unpinnedListItems}) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:pinnablenavigator', location = '/static/components/pinnablenavigator/views/search/Search.js' */ define("jira/projects/components/pinnable-navigator/views/search/search", ["jira/projects/components/pinnable-navigator/search/templates", "jira/projects/components/pinnable-navigator/dark-feature", "jira/projects/libs/marionette", "underscore", "jquery"], function (c, b, e, a, d) { return e.ItemView.extend({ template: c.searchBlock, ui: { searchInput: "input.js-subnav-filter-text", searchIcon: ".js-search-icon", clearIcon: ".js-clear-query" }, events: {"keydown @ui.searchInput": "query", "click @ui.clearIcon": "clearQuery"}, _numberIsNeededToShowTheList: 10, _searchValue: "", isSearchable: function () { return b.isSearchEnabled() && this.model.getAllItemsExceptButtons().length >= this._numberIsNeededToShowTheList }, isExisted: function () { return this.$el.closest("body").length }, getQuery: function () { if (this.isExisted()) { this._searchValue = d.trim(this.ui.searchInput.val()) } else { this._searchValue = "" } return this._searchValue }, clearQuery: function () { if (this.isExisted()) { this._searchValue = ""; this.ui.searchInput.val(this._searchValue).trigger("keydown") } }, query: function () { setTimeout(a.bind(function () { this._searchValue = this.getQuery(); if (this._searchValue !== "") { this.ui.clearIcon.removeClass("hidden"); this.ui.searchIcon.addClass("hidden") } else { this.ui.clearIcon.addClass("hidden"); this.ui.searchIcon.removeClass("hidden") } this.trigger("doQuery", this._searchValue) }, this), 0) }, serializeData: function () { return {searchValue: this._searchValue, searchPlaceHolder: this.options.searchPlaceHolder} } }) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:pinnablenavigator', location = '/static/components/pinnablenavigator/views/Trigger.js' */ define("jira/projects/components/pinnable-navigator/views/trigger", ["jira/util/formatter", "jira/projects/components/pinnable-navigator/templates", "jira/projects/libs/marionette"], function (b, a, c) { return c.ItemView.extend({ template: a.unpinnedTrigger, serializeData: function () { var e = this.model.get("selectedItem"); var f = "Switch"; var d = e ? e.label : f; if (this.options.label) { d = f + " " + this.options.label } return {label: d, idSuffix: this.options.id || ""} }, onRender: function () { this.unwrapTemplate() } }) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:pinnablenavigator', location = '/static/components/pinnablenavigator/managedialog/views/Dialog.js' */ define("jira/projects/components/pinnable-navigator/manage-dialog/views/dialog", ["aui/message", "jira/projects/components/pinnable-navigator/manage-dialog/templates", "jira/projects/libs/marionette", "underscore", "jquery"], function (c, a, e, b, d) { return e.ItemView.extend({ template: a.dialog, tagName: "section", attributes: { "class": "aui-layer aui-dialog2 aui-dialog2-small manage-subnav-dialog", "aria-hidden": true, role: "dialog", "data-aui-modal": true }, ui: { loading: ".js-manage-save-spinner", saveButton: ".js-manage-save-button", cancelButton: ".js-manage-cancel-button", deleteButton: ".js-manage-item-delete-button button", manageItem: ".js-manage-item", manageDialogContents: ".js-manage-contents", itemSections: ".js-item-section" }, triggers: {"click @ui.cancelButton": {event: "closePopup", preventDefault: true, stopPropagation: false}}, events: { "moveToEnd @ui.manageItem": function (g) { var f = this.$(g.currentTarget); f.appendTo(f.parent()) }, "click @ui.deleteButton": function (h) { h.preventDefault(); var g = this.$(h.currentTarget); var f = g.parents("tr"); f.addClass("js-deleted hidden"); this.checkRemainItems() }, "click @ui.saveButton": function (f) { this.showLoading(); var g = this.ui.itemSections.map(function () { var j = d(this); var i = b.map(j.find(".js-deleted"), function (k) { return d(k).data("id") }); var h = b.map(j.find("tr:not(.js-deleted)"), function (k) { return d(k).data("id") }); return {id: j.data("id"), deleted: i, order: h} }); this.model.save(g).done(b.bind(function (h) { this.trigger("closePopup", h) }, this)).fail(b.bind(function (h) { var i = this.$(".error-wrapper"); i.html(""); c.error(i, {closeable: false, body: h.statusText}) }, this)).always(b.bind(function () { this.stopLoading() }, this)); f.preventDefault() } }, onRender: function () { this.$(".js-sortable-items").sortable({ placeholder: "item-holder-highlight item-row js-manage-item", sort: function (f, g) { g.placeholder.html(g.helper.html()) } }) }, checkRemainItems: function () { if (this.$(".js-manage-item").length <= this.$(".js-deleted").length) { this.ui.manageDialogContents.append(a.emptyText({text: this.options.emptyText})) } else { this.$(".js-empty").remove() } }, showLoading: function () { this.ui.loading.spin() }, stopLoading: function () { this.ui.loading.spinStop() }, serializeData: function () { var f = this.model.getManageableItemGroups(); return {itemGroups: f, title: this.options.title, manageText: this.options.manageText} } }) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:pinnablenavigator', location = '/static/components/pinnablenavigator/entities/Items.js' */ define("jira/projects/components/pinnable-navigator/entities/items", ["jira/util/logger", "jira-projects-backbone", "underscore", "jquery"], function (b, e, a, d) { var c = e.Model.extend({ defaults: {itemGroups: [], selectedItem: null}, initialize: function () { if (this.attributes.selectedItem) { this.selectItem(this.attributes.selectedItem) } }, hasDisplayableGroups: function (f) { f = f || this.get("itemGroups"); return a.any(f, function (g) { if (g.type === "buttons") { return false } else { return g.emptyText || g.items && g.items.length } }) }, isManageable: function () { return !!a.flatten(a.pluck(this.getManageableItemGroups(), "items")).length }, getManageableItemGroups: function () { return a.filter(this.get("itemGroups"), function (f) { return f.allowDelete || f.allowReorder }) }, isEmpty: function () { return a.isEmpty(this.getAllItems()) }, selectItem: function (g) { var f = this.getAllItems(); this.set("selectedItem", this.getItemById(g) || a.first(f)) }, getItemById: function (f) { return a.findWhere(this.getAllItems(), {id: f}) }, getAllItems: function () { return a.flatten(a.map(this.get("itemGroups"), function (f) { return f.items })) }, getAllItemsExceptButtons: function () { return a.compact(a.flatten(a.map(this.get("itemGroups"), function (f) { return f.type === "buttons" ? null : f.items }))) }, getAllItemsWithName: function (f) { var g = d.extend(true, {}, this.get("itemGroups")); return a.compact(a.map(g, function (h) { if (h.type !== "buttons") { h.items = a.filter(h.items, function (i) { return i.label.toUpperCase().indexOf(f.toUpperCase()) > -1 }) } if (!h.items.length) { return null } return h })) }, getGroup: function (f) { return a.findWhere(this.get("itemGroups"), {id: f}) }, applyModifications: function (f) { a.each(f, function (h) { var g = this.getGroup(h.id); g.items = a.map(h.order, function (i) { return this.getItemById(i) }, this) }, this) } }); c.create = function (h, g) { var f = new c(h); if (g.save) { f.save = function (i) { return g.save(i).done(function () { f.applyModifications(i); b.trace("jira.projects.items.updated") }) } } return f }; return c }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:pinnablenavigator', location = '/static/components/pinnablenavigator/managedialog/ManageDialog.js' */ define("jira/projects/components/pinnable-navigator/manage-dialog/manage-dialog", ["jira/util/logger", "jira/projects/components/pinnable-navigator/manage-dialog/views/dialog", "jira/projects/libs/marionette", "underscore"], function (c, d, e, b) { var a = e.Controller.extend({ initialize: function () { this.dialog = AJS.dialog2(this.options.manageDialogView.$el, {closeOnOutsideClick: false}); this.listenTo(this.dialog, "hide", b.bind(function () { this.options.manageDialogView.stopLoading() }, this)); this.listenTo(this.options.manageDialogView, { closePopup: function () { this.dialog.hide() }, itemsUpdated: function (f) { this.trigger("itemsUpdated", f) } }); this.dialog.on("show", b.bind(function () { c.trace("jira.projects.manage.dialog.shown"); this.trigger("manageDialogShown") }, this)) }, show: function () { this.options.manageDialogView.render(); this.dialog.show() } }); a.create = function (h) { var g = {}; var f = {ManageDialogView: d}; b.defaults(g, h, f); var i = new g.ManageDialogView({ model: g.model, title: g.title, manageText: g.manageText, emptyText: g.emptyText }); return new a({manageDialogView: i}) }; return a }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:pinnablenavigator', location = '/static/components/pinnablenavigator/PinnableNavigator.js' */ define("jira/projects/components/pinnable-navigator/pinnable-navigator", ["jira/util/logger", "jira/projects/libs/marionette", "wrm/context-path", "jquery"], function (b, d, a, c) { return d.Controller.extend({ _renderPinned: function () { if (this.options.pinnedView.isAttachedToDom() && !this.options.searchView.isSearchable() && this.options.searchView.isExisted()) { this.options.pinnedView.$el.show(); this.options.pinnedView.renderList() } else { this.saveState("pin"); this.options.isPinned = true; this.options.triggerView.$el.empty().hide(); this.options.unpinnedView.$el.empty(); c("#" + this.options.pinnedHolderId).prepend(this.options.pinnedView.render().$el); this.options.pinnedView.renderSearch(); this.options.pinnedView.putListintoView(); this.trigger("navigatorPinned") } }, _renderUnpinned: function () { if (c("#" + this.options.triggerHolderId).length) { this.options.triggerView.setElement(c("#" + this.options.triggerHolderId)); this.options.unpinnedView.setElement(c("#" + this.options.unpinnedHolderId)) } this.saveState("unpin"); this.options.isPinned = false; this.options.triggerView.render().$el.show(); this.options.unpinnedView.render(); this.options.pinnedView.unpin(); this.options.unpinnedView.renderSearch(); this.options.unpinnedView.putListintoView(); this.trigger("navigatorUnPinned") }, _openManageDialog: function () { this.options.manageDialogControl.show() }, update: function (f, e) { this.options.model.set("itemGroups", f); if (e) { this.options.model.selectItem(e) } this.show() }, setSelectedItem: function (e) { this.options.model.selectItem(e) }, saveState: function (e) { c.ajax({url: this.url + "/" + e, type: "PUT", contentType: "application/json"}).error(function () { }).done(function () { b.trace("jira.projects.pinnablenavigator.state.updated") }) }, initialize: function () { this.url = a() + "/rest/projects/1.0/subnav/" + this.options.id; this.listenTo(this.options.unpinnedView, { navigatorPinned: this._renderPinned, manageDialogOpened: this._openManageDialog, itemSelected: function (f) { this.trigger("itemSelected", f) }, "aui-dropdown2-show": function () { this.trigger("aui-dropdown2-show") }, "aui-dropdown2-hide": function () { this.trigger("aui-dropdown2-hide") } }); this.listenTo(this.options.pinnedView, { navigatorUnPinned: this._renderUnpinned, itemSelected: function (f) { this.trigger("itemSelected", f) } }); if (this.options.manageDialogControl) { this.listenTo(this.options.manageDialogControl, {itemsUpdated: this.update}) } }, show: function () { if (this.options.isPinned) { this._renderPinned() } else { this._renderUnpinned() } }, hide: function () { this.options.triggerView.$el.hide(); this.options.unpinnedView.$el.hide(); this.options.pinnedView.$el.hide() } }) }); define("jira/projects/components/pinnable-navigator/pinnable-navigator-factory", ["jira/util/formatter", "jira/projects/components/pinnable-navigator/views/search/search", "jira/projects/components/pinnable-navigator/views/navigator-view/unpinned-view", "jira/projects/components/pinnable-navigator/views/navigator-view/pinned-view", "jira/projects/components/pinnable-navigator/views/trigger", "jira/projects/components/pinnable-navigator/entities/items", "jira/projects/components/pinnable-navigator/manage-dialog/manage-dialog", "jira/projects/components/pinnable-navigator/pinnable-navigator", "underscore", "jquery"], function (h, c, b, g, j, e, a, d, i, k) { function f(s) { var t = {}; var l = {title: "", manageText: "", emptyText: "You have no item to view"}; i.defaults(t, s, l); var n = new e.create({itemGroups: t.itemGroups, selectedItem: t.selectedItem}, t); var p = new c({ searchPlaceHolder: t.searchPlaceHolder, el: t.searchHolder || ".js-subnav-search-block", model: n }); var m = new j({model: n, el: k("#" + t.triggerHolderId), id: t.id, label: s.title}); var o = new b({ model: n, el: k("#" + t.unpinnedHolderId), id: t.id, title: t.title, manageText: t.manageText, manageLocation: t.manageLocation, emptyText: t.emptyText, searchView: p }); var q = new g({ model: n, id: t.id, title: t.title, manageText: t.manageText, emptyText: t.emptyText, searchView: p }); var r = a.create({ model: n, title: t.title, manageText: t.manageText, emptyText: "This will remove all your items." }); return new d({ id: t.id, isPinned: !!t.isPinned, pinnedHolderId: t.pinnedHolderId, triggerView: m, pinnedView: q, unpinnedView: o, manageDialogControl: r, model: n, triggerHolderId: t.triggerHolderId, unpinnedHolderId: t.unpinnedHolderId, searchView: p }) } return {create: f} }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:pinnablenavigator', location = '/static/components/pinnablenavigator/PinnableNavigator-namespaces.js' */ AJS.namespace("JIRA.Projects.PinnableNavigator", null, require("jira/projects/components/pinnable-navigator/pinnable-navigator")); AJS.namespace("JIRA.Projects.PinnableNavigator.create", null, require("jira/projects/components/pinnable-navigator/pinnable-navigator-factory").create); AJS.namespace("JIRA.Projects.PinnableNavigator.Search.isEnabled", null, require("jira/projects/components/pinnable-navigator/dark-feature").isSearchEnabled); AJS.namespace("JIRA.Projects.PinnableNavigator.Search.Templates", null, require("jira/projects/components/pinnable-navigator/search/templates")); AJS.namespace("JIRA.Projects.PinnableNavigator.Entities.Items", null, require("jira/projects/components/pinnable-navigator/entities/items")); AJS.namespace("JIRA.Projects.PinnableNavigator.ManageDialog", null, require("jira/projects/components/pinnable-navigator/manage-dialog/manage-dialog")); AJS.namespace("JIRA.Projects.PinnableNavigator.ManageDialog.Templates", null, require("jira/projects/components/pinnable-navigator/manage-dialog/templates")); AJS.namespace("JIRA.Projects.PinnableNavigator.ManageDialog.Views.Dialog", null, require("jira/projects/components/pinnable-navigator/manage-dialog/views/dialog")); AJS.namespace("JIRA.Projects.PinnableNavigator.Views.Trigger", null, require("jira/projects/components/pinnable-navigator/views/trigger")); AJS.namespace("JIRA.Projects.PinnableNavigator.Views.ListView.ListView", null, require("jira/projects/components/pinnable-navigator/views/list-view/list-view")); AJS.namespace("JIRA.Projects.PinnableNavigator.Views.ListView.PinnedListView", null, require("jira/projects/components/pinnable-navigator/views/list-view/pinned-list-view")); AJS.namespace("JIRA.Projects.PinnableNavigator.Views.ListView.UnpinnedListView", null, require("jira/projects/components/pinnable-navigator/views/list-view/unpinned-list-view")); AJS.namespace("JIRA.Projects.PinnableNavigator.Views.NavigatorView.NavigatorView", null, require("jira/projects/components/pinnable-navigator/views/navigator-view/navigator-view")); AJS.namespace("JIRA.Projects.PinnableNavigator.Views.NavigatorView.PinnedView", null, require("jira/projects/components/pinnable-navigator/views/navigator-view/pinned-view")); AJS.namespace("JIRA.Projects.PinnableNavigator.Views.NavigatorView.UnpinnedView", null, require("jira/projects/components/pinnable-navigator/views/navigator-view/unpinned-view")); AJS.namespace("JIRA.Projects.PinnableNavigator.Views.Search.Search", null, require("jira/projects/components/pinnable-navigator/views/search/search")); AJS.namespace("JIRA.Projects.PinnableNavigator.Templates", null, require("jira/projects/components/pinnable-navigator/templates")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:report-page-assets', location = '/page/project/report/analytics.js' */ define("jira/projects/page/report/analytics", ["jira/analytics", "jquery"], function (a, b) { function c() { b(".reports .reports__list__report").on("click", function (f) { var d = b(this); a.send({ name: "jira.projects.report.clicked", data: { report: d.attr("data-report-key"), category: d.closest("ul").attr("data-category-key"), listPosition: d.closest("li").prevAll().length + 1 } }) }) } return c }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:reports-link-storage', location = '/sidebar/reports/reports-link-storage.js' */ define("jira/projects/sidebar/reports/link-storage", ["jira/util/logger", "jira/data/local-storage", "jira/api/projects", "jira/api/projects/sidebar"], function (b, a, c, d) { function f(j) { var h = j.getSelectedScopeFilterId(); var g = c.getCurrentProjectKey(); var i = "last.viewed.report." + g; if (h) { i += "." + h } return i } function e(g, h) { g.setReportsItemLink(h) } return { storeLastViewedReportLink: function (g) { d.getSidebar().done(function (i) { if (i.isProjectSidebar()) { var h = f(i); a.setItem(h, g); e(i, g) } b.trace("jira.projects.sidebar.reports.link.stored") }) }, restoreLastViewedReportLink: function () { d.getSidebar().done(function (h) { if (h.isProjectSidebar()) { var g = f(h); var i = a.getItem(g); if (i) { e(h, i) } } b.trace("jira.projects.sidebar.reports.link.restored") }) } } }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:reports-page-subnavigator', location = '/page/project/report/subnavigator.js' */ define("jira/projects/page/report/subnavigator", ["require"], function (b) { var i = b("underscore"); var f = b("wrm/data"); var c = b("wrm/context-path"); var e = b("jira/analytics"); var g = b("jira/util/formatter"); var h = b("jira/projects/page/report/analytics"); var k = b("jira/projects/sidebar/reports/link-storage"); var j = b("jira/projects/components/subnavigator/subnavigator"); function d(m, l) { e.send({name: "jira.project.sidebar.report.select", data: {reportId: m, initialLoad: l}}) } function a(n, p, m) { var l = i.map(f.claim("agile-reports"), function (q) { return {id: q.key, label: q.label, description: q.description, link: c() + q.url} }); var o = new j({ id: "reports", triggerPlaceholder: n, contentPlaceholder: p, itemGroups: [l, [{ id: "com.atlassian.jira.jira-projects-plugin:report-page", label: "All reports", description: "Show the reports overview page, which lists all available reports" }]], selectedItem: "com.atlassian.jira.jira-projects-plugin:report-page", titlePlaceholder: m, hideSelectedItem: true, changeViewText: "Switch report" }); o.on("itemSelected", function (q) { d(q.item.id, false) }); o.show(); h(); d("com.atlassian.jira.jira-projects-plugin:report-page", true); k.storeLastViewedReportLink(window.location.href); return o } return {create: a} }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:reports-page-subnavigator', location = '/page/project/report/init.js' */ require(["jira/projects/page/report/subnavigator", "jquery"], function (a, b) { b(function () { var d = b("#reports-subnav-trigger"); var e = b("#reports-subnav-opts"); var c = b("#reports-subnav-title"); a.create(d, e, c) }) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.gadgets.embedded:gadget-core-resources', location = 'js/rpc.js' */ var gadgets = gadgets || {}; gadgets.rpc = function () { var CALLBACK_NAME = "__cb"; var DEFAULT_NAME = ""; var FE_G2C_CHANNEL = "__g2c_rpc"; var FE_C2G_CHANNEL = "__c2g_rpc"; var services = {}; var iframePool = []; var relayUrl = {}; var useLegacyProtocol = {}; var authToken = {}; var callId = 0; var callbacks = {}; var setup = {}; var sameDomain = {}; var params = {}; if (gadgets.util) { params = gadgets.util.getUrlParameters() } authToken[".."] = params.rpctoken || params.ifpctok || 0; function getRelayChannel() { return typeof window.postMessage === "function" ? "wpm" : typeof document.postMessage === "function" ? "dpm" : navigator.product === "Gecko" ? "fe" : "ifpc" } function setupChannel() { if (relayChannel === "dpm" || relayChannel === "wpm") { window.addEventListener("message", function (packet) { try { if (packet && packet.origin && packet.origin !== "null" && typeof packet.data === "string") { if (packet.origin === location.origin) { process(gadgets.json.parse(packet.data)) } else { AJS.$.get(AJS.contextPath() + "/rest/whitelist/1/check", {url: packet.origin}).done(function (result) { if (result && result.inbound && result.inbound === true) { process(gadgets.json.parse(packet.data)) } else { if (AJS.debug) { AJS.log("RPC: request rejected (bad origin): " + (packet && packet.origin ? packet.origin : "undefined origin")) } } }).fail(function (jqXHR, textStatus, errorThrown) { AJS.log("RPC: REST " + textStatus, errorThrown) }) } } else { if (AJS.debug) { AJS.log("RPC: request rejected (bad origin): " + (packet && packet.origin ? packet.origin : "undefined origin")) } } } catch (e) { if (AJS.debug) { var origin = packet && packet.origin ? packet.origin : "undefined origin"; AJS.log("Error processing gadget rpc message from '" + origin + "': " + e) } } }, false) } } var relayChannel = getRelayChannel(); setupChannel(); services[DEFAULT_NAME] = function () { throw new Error("Unknown RPC service: " + this.s) }; services[CALLBACK_NAME] = function (callbackId, result) { var callback = callbacks[callbackId]; if (callback) { delete callbacks[callbackId]; callback(result) } }; function setupFrame(frameId) { if (setup[frameId]) { return } if (relayChannel === "fe") { try { var frame = document.getElementById(frameId); frame[FE_G2C_CHANNEL] = function (args) { process(gadgets.json.parse(args)) } } catch (e) { } } setup[frameId] = true } function encodeLegacyData(args) { var stringify = gadgets.json.stringify; var argsEscaped = []; for (var i = 0, j = args.length; i < j; ++i) { argsEscaped.push(encodeURIComponent(stringify(args[i]))) } return argsEscaped.join("&") } function process(rpc) { if (rpc && typeof rpc.s === "string" && typeof rpc.f === "string" && rpc.a instanceof Array) { if (authToken[rpc.f]) { if (authToken[rpc.f] != rpc.t) { if (AJS.debug) { console.log("Invalid auth token received for operation: " + rpc.s) } return } } if (rpc.c) { rpc.callback = function (result) { gadgets.rpc.call(rpc.f, CALLBACK_NAME, null, rpc.c, result) } } var result = (services[rpc.s] || services[DEFAULT_NAME]).apply(rpc, rpc.a); if (rpc.c && typeof result != "undefined") { gadgets.rpc.call(rpc.f, CALLBACK_NAME, null, rpc.c, result) } } } function callFrameElement(targetId, serviceName, from, rpcData, callArgs) { try { if (from != "..") { var fe = window.frameElement; if (typeof fe[FE_G2C_CHANNEL] === "function") { if (typeof fe[FE_G2C_CHANNEL][FE_C2G_CHANNEL] !== "function") { fe[FE_G2C_CHANNEL][FE_C2G_CHANNEL] = function (args) { process(gadgets.json.parse(args)) } } fe[FE_G2C_CHANNEL](rpcData); return } } else { var frame = document.getElementById(targetId); if (typeof frame[FE_G2C_CHANNEL] === "function" && typeof frame[FE_G2C_CHANNEL][FE_C2G_CHANNEL] === "function") { frame[FE_G2C_CHANNEL][FE_C2G_CHANNEL](rpcData); return } } } catch (e) { } callIfpc(targetId, serviceName, from, rpcData, callArgs) } function callIfpc(targetId, serviceName, from, rpcData, callArgs) { var relay = gadgets.rpc.getRelayUrl(targetId); if (!relay) { throw new Error("No relay file assigned for IFPC") } var src = null; if (useLegacyProtocol[targetId]) { src = [relay, "#", encodeLegacyData([from, callId, 1, 0, encodeLegacyData([from, serviceName, "", "", from].concat(callArgs))])].join("") } else { src = [relay, "#", targetId, "&", from, "@", callId, "&1&0&", encodeURIComponent(rpcData)].join("") } emitInvisibleIframe(src) } function emitInvisibleIframe(src) { var iframe; for (var i = iframePool.length - 1; i >= 0; --i) { var ifr = iframePool[i]; try { if (ifr && (ifr.recyclable || ifr.readyState === "complete")) { ifr.parentNode.removeChild(ifr); if (window.ActiveXObject) { iframePool[i] = ifr = null; iframePool.splice(i, 1) } else { ifr.recyclable = false; iframe = ifr; break } } } catch (e) { } } if (!iframe) { iframe = document.createElement("iframe"); iframe.style.border = iframe.style.width = iframe.style.height = "0px"; iframe.style.visibility = "hidden"; iframe.style.position = "absolute"; iframe.onload = function () { this.recyclable = true }; iframePool.push(iframe) } iframe.src = src; setTimeout(function () { document.body.appendChild(iframe) }, 0) } function callSameDomain(target, rpc) { if (typeof sameDomain[target] === "undefined") { sameDomain[target] = false; var targetEl = null; if (target === "..") { targetEl = parent } else { targetEl = frames[target] } try { sameDomain[target] = targetEl.gadgets.rpc.receiveSameDomain } catch (e) { } } if (typeof sameDomain[target] === "function") { sameDomain[target](rpc); return true } return false } if (gadgets.config) { function init(config) { if (config.rpc.parentRelayUrl.substring(0, 7) === "http://") { relayUrl[".."] = config.rpc.parentRelayUrl } else { var params = document.location.search.substring(0).split("&"); var parentParam = ""; for (var i = 0, param; param = params[i]; ++i) { if (param.indexOf("parent=") === 0) { parentParam = decodeURIComponent(param.substring(7)); break } } relayUrl[".."] = parentParam + config.rpc.parentRelayUrl } useLegacyProtocol[".."] = !!config.rpc.useLegacyProtocol } var requiredConfig = {parentRelayUrl: gadgets.config.NonEmptyStringValidator}; gadgets.config.register("rpc", requiredConfig, init) } return { register: function (serviceName, handler) { if (serviceName == CALLBACK_NAME) { throw new Error("Cannot overwrite callback service") } if (serviceName == DEFAULT_NAME) { throw new Error("Cannot overwrite default service:" + " use registerDefault") } services[serviceName] = handler }, unregister: function (serviceName) { if (serviceName == CALLBACK_NAME) { throw new Error("Cannot delete callback service") } if (serviceName == DEFAULT_NAME) { throw new Error("Cannot delete default service:" + " use unregisterDefault") } delete services[serviceName] }, registerDefault: function (handler) { services[""] = handler }, unregisterDefault: function () { delete services[""] }, call: function (targetId, serviceName, callback, var_args) { ++callId; targetId = targetId || ".."; if (callback) { callbacks[callId] = callback } var from = ".."; if (targetId === "..") { from = window.name } var rpc = { s: serviceName, f: from, c: callback ? callId : 0, a: Array.prototype.slice.call(arguments, 3), t: authToken[targetId] }; if (callSameDomain(targetId, rpc)) { return } var rpcData = gadgets.json.stringify(rpc); var channelType = relayChannel; if (useLegacyProtocol[targetId]) { channelType = "ifpc" } switch (channelType) { case"dpm": var targetDoc = targetId === ".." ? parent.document : frames[targetId].document; targetDoc.postMessage(rpcData); break; case"wpm": var targetWin = targetId === ".." ? parent : frames[targetId]; targetWin.postMessage(rpcData, relayUrl[targetId]); break; case"fe": callFrameElement(targetId, serviceName, from, rpcData, rpc.a); break; default: callIfpc(targetId, serviceName, from, rpcData, rpc.a); break } }, getRelayUrl: function (targetId) { return relayUrl[targetId] }, setRelayUrl: function (targetId, url, opt_useLegacy) { relayUrl[targetId] = url; useLegacyProtocol[targetId] = !!opt_useLegacy }, setAuthToken: function (targetId, token) { authToken[targetId] = token; setupFrame(targetId) }, getRelayChannel: function () { return relayChannel }, receive: function (fragment) { if (fragment.length > 4) { process(gadgets.json.parse(decodeURIComponent(fragment[fragment.length - 1]))) } }, receiveSameDomain: function (rpc) { rpc.a = Array.prototype.slice.call(rpc.a); window.setTimeout(function () { process(rpc) }, 0) } } }(); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.gadgets.embedded:gadget-core-resources', location = 'js/util.js' */ Function.prototype.inherits = function (parentCtor) { function tempCtor() { } tempCtor.prototype = parentCtor.prototype; this.superClass_ = parentCtor.prototype; this.prototype = new tempCtor(); this.prototype.constructor = this }; } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.gadgets.embedded:gadget-core-resources', location = 'js/json.js' */ var gadgets = gadgets || {}; gadgets.json = function () { function f(n) { return n < 10 ? "0" + n : n } Date.prototype.toJSON = function () { return [this.getUTCFullYear(), "-", f(this.getUTCMonth() + 1), "-", f(this.getUTCDate()), "T", f(this.getUTCHours()), ":", f(this.getUTCMinutes()), ":", f(this.getUTCSeconds()), "Z"].join("") }; var m = {"\b": "\\b", "\t": "\\t", "\n": "\\n", "\f": "\\f", "\r": "\\r", '"': '\\"', "\\": "\\\\"}; function stringify(value) { var a, i, k, l, r = /["\\\x00-\x1f\x7f-\x9f]/g, v; switch (typeof value) { case"string": return r.test(value) ? '"' + value.replace(r, function (a) { var c = m[a]; if (c) { return c } c = a.charCodeAt(); return "\\u00" + Math.floor(c / 16).toString(16) + (c % 16).toString(16) }) + '"' : '"' + value + '"'; case"number": return isFinite(value) ? String(value) : "null"; case"boolean": case"null": return String(value); case"object": if (!value) { return "null" } a = []; if (typeof value.length === "number" && !(value.propertyIsEnumerable("length"))) { l = value.length; for (i = 0; i < l; i += 1) { a.push(stringify(value[i]) || "null") } return "[" + a.join(",") + "]" } for (k in value) { if (value.hasOwnProperty(k)) { if (typeof k === "string") { v = stringify(value[k]); if (v) { a.push(stringify(k) + ":" + v) } } } } return "{" + a.join(",") + "}" } } return { stringify: stringify, parse: function (text) { if (/^[\],:{}\s]*$/.test(text.replace(/\\["\\\/b-u]/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) { return eval("(" + text + ")") } return false } } }(); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.gadgets.embedded:gadget-core-resources', location = 'js/gadgets-core.js' */ var gadgets = gadgets || {}; gadgets.error = {}; gadgets.error.SUBCLASS_RESPONSIBILITY = "subclass responsibility"; gadgets.error.TO_BE_DONE = "to be done"; gadgets.log = function (message) { if (window.console && console.log) { console.log(message) } else { var logEntry = document.createElement("div"); logEntry.className = "gadgets-log-entry"; logEntry.innerHTML = message; document.body.appendChild(logEntry) } }; gadgets.Extensible = function () { }; gadgets.Extensible.prototype.setDependencies = function (dependencies) { for (var p in dependencies) { this[p] = dependencies[p] } }; gadgets.Extensible.prototype.getDependencies = function (name) { return this[name] }; gadgets.UserPrefStore = function () { }; gadgets.UserPrefStore.prototype.getPrefs = function (gadget) { throw Error(gadgets.error.SUBCLASS_RESPONSIBILITY) }; gadgets.UserPrefStore.prototype.savePrefs = function (gadget) { throw Error(gadgets.error.SUBCLASS_RESPONSIBILITY) }; gadgets.DefaultUserPrefStore = function () { gadgets.UserPrefStore.call(this) }; gadgets.DefaultUserPrefStore.inherits(gadgets.UserPrefStore); gadgets.DefaultUserPrefStore.prototype.getPrefs = function (gadget) { }; gadgets.DefaultUserPrefStore.prototype.savePrefs = function (gadget) { }; gadgets.GadgetService = function () { }; gadgets.GadgetService.prototype.setHeight = function (elementId, height) { throw Error(gadgets.error.SUBCLASS_RESPONSIBILITY) }; gadgets.GadgetService.prototype.setTitle = function (gadget, title) { throw Error(gadgets.error.SUBCLASS_RESPONSIBILITY) }; gadgets.GadgetService.prototype.setUserPref = function (id) { throw Error(gadgets.error.SUBCLASS_RESPONSIBILITY) }; gadgets.IfrGadgetService = function () { gadgets.GadgetService.call(this); var service = this; gadgets.rpc.register("resize_iframe", function () { service.setHeight.apply(this, arguments) }); gadgets.rpc.register("set_pref", function () { service.setUserPref.apply(this, arguments) }); gadgets.rpc.register("set_title", function () { service.setTitle.apply(this, arguments) }); gadgets.rpc.register("requestNavigateTo", function () { service.requestNavigateTo.apply(this, arguments) }) }; gadgets.IfrGadgetService.inherits(gadgets.GadgetService); gadgets.IfrGadgetService.prototype.setHeight = function (height) { if (height > gadgets.container.maxheight_) { height = gadgets.container.maxheight_ } var element = document.getElementById(this.f); if (element) { element.style.height = height + "px" } }; gadgets.IfrGadgetService.prototype.requestNavigateTo = function (view, opt_params) { var id = this.getGadgetIdFromModuleId(this.f); var url = this.getUrlForView(view); if (opt_params) { var paramStr = JSON.stringify(opt_params); if (paramStr.length > 0) { url += "&appParams=" + encodeURIComponent(paramStr) } } if (url && document.location.href.indexOf(url) == -1) { document.location.href = url } }; gadgets.IfrGadgetService.prototype.getUrlForView = function (view) { if (view === "canvas") { return "/canvas" } else { if (view === "profile") { return "/profile" } else { return null } } }; gadgets.IfrGadgetService.prototype.getGadgetIdFromModuleId = function (moduleId) { return parseInt(moduleId.match(/_([0-9]+)$/)[1], 10) }; gadgets.LayoutManager = function () { }; gadgets.LayoutManager.prototype.getGadgetChrome = function (gadget) { throw Error(gadgets.error.SUBCLASS_RESPONSIBILITY) }; gadgets.StaticLayoutManager = function () { gadgets.LayoutManager.call(this) }; gadgets.StaticLayoutManager.inherits(gadgets.LayoutManager); gadgets.StaticLayoutManager.prototype.setGadgetChromeIds = function (gadgetChromeIds) { this.gadgetChromeIds_ = gadgetChromeIds }; gadgets.StaticLayoutManager.prototype.getGadgetChrome = function (gadget) { var chromeId = this.gadgetChromeIds_[gadget.id]; return chromeId ? document.getElementById(chromeId) : null }; gadgets.FloatLeftLayoutManager = function (layoutRootId) { gadgets.LayoutManager.call(this); this.layoutRootId_ = layoutRootId }; gadgets.FloatLeftLayoutManager.inherits(gadgets.LayoutManager); gadgets.FloatLeftLayoutManager.prototype.getGadgetChrome = function (gadget) { var layoutRoot = document.getElementById(this.layoutRootId_); if (layoutRoot) { var chrome = document.createElement("div"); chrome.className = "gadgets-gadget-chrome"; chrome.style.cssFloat = "left"; layoutRoot.appendChild(chrome); return chrome } else { return null } }; } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.gadgets.embedded:gadget-container-resources', location = 'js/gadgets-container.js' */ gadgets.Container = function () { this.parentUrl_ = "http://" + document.location.host; this.country_ = "ALL"; this.language_ = "ALL"; this.view_ = "default"; this.nocache_ = 1; this.maxheight_ = 2147483647 }; gadgets.Container.inherits(gadgets.Extensible); gadgets.Container.prototype.userPrefStore = new gadgets.DefaultUserPrefStore(); gadgets.Container.prototype.gadgetService = new gadgets.GadgetService(); gadgets.Container.prototype.layoutManager = new gadgets.StaticLayoutManager(); gadgets.Container.prototype.setParentUrl = function (url) { this.parentUrl_ = url }; gadgets.Container.prototype.setCountry = function (country) { this.country_ = country }; gadgets.Container.prototype.setNoCache = function (nocache) { this.nocache_ = nocache }; gadgets.Container.prototype.setLanguage = function (language) { this.language_ = language }; gadgets.Container.prototype.setView = function (view) { this.view_ = view }; gadgets.Container.prototype.setMaxHeight = function (maxheight) { this.maxheight_ = maxheight }; gadgets.Container.prototype.getGadgetKey_ = function (instanceId) { return "gadget_" + instanceId }; gadgets.IfrContainer = function () { gadgets.Container.call(this) }; gadgets.IfrContainer.inherits(gadgets.Container); gadgets.IfrContainer.prototype.gadgetService = new gadgets.IfrGadgetService(); gadgets.IfrContainer.prototype.setParentUrl = function (url) { if (!url.match(/^http[s]?:\/\//)) { url = document.location.href.match(/^[^?#]+\//)[0] + url } this.parentUrl_ = url }; gadgets.container = new gadgets.IfrContainer(); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.gadgets.embedded:gadget-standalone-resources', location = 'js/gadgets-standalone.js' */ new gadgets.IfrGadgetService(); gadgets.IfrGadgetService.prototype.setTitle = function (title) { }; } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:project-page', location = '/sidebar/navigation/items.js' */ require(["jquery"], function (a) { a(document).on("click", '.aui-nav > [aria-expanded] > a.aui-nav-item[href="#"]', function (b) { b.preventDefault(); AJS.navigation(a(this).siblings(".aui-nav")).toggle() }) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-project-shortcuts', location = '/sidebar/project-shortcuts/templates.soy' */ // This file was automatically generated from templates.soy. // Please don't edit this file by hand. /** * @fileoverview Templates in namespace JIRA.Projects.Sidebar.ProjectShortcuts.Templates. */ if (typeof JIRA == 'undefined') { var JIRA = {}; } if (typeof JIRA.Projects == 'undefined') { JIRA.Projects = {}; } if (typeof JIRA.Projects.Sidebar == 'undefined') { JIRA.Projects.Sidebar = {}; } if (typeof JIRA.Projects.Sidebar.ProjectShortcuts == 'undefined') { JIRA.Projects.Sidebar.ProjectShortcuts = {}; } if (typeof JIRA.Projects.Sidebar.ProjectShortcuts.Templates == 'undefined') { JIRA.Projects.Sidebar.ProjectShortcuts.Templates = {}; } JIRA.Projects.Sidebar.ProjectShortcuts.Templates.content = function (opt_data, opt_ignored) { var output = ''; if (opt_data.canManage || opt_data.numberOfShortcuts > 0) { output += '
    ' + soy.$$escapeHtml('Project shortcuts') + '
    ' + soy.$$escapeHtml('Project shortcuts') + '
    ' + ((opt_data.canManage) ? '

    ' + soy.$$escapeHtml('Add a link to useful information for your whole team to see.') + '

    ' : '') + '
      '; if (opt_data.shortcuts) { var shortcutList26 = opt_data.shortcuts; var shortcutListLen26 = shortcutList26.length; for (var shortcutIndex26 = 0; shortcutIndex26 < shortcutListLen26; shortcutIndex26++) { var shortcutData26 = shortcutList26[shortcutIndex26]; output += JIRA.Projects.Sidebar.ProjectShortcuts.Templates.shortcut({ id: shortcutData26.id, name: shortcutData26.name, url: shortcutData26.url, icon: shortcutData26.icon, canManage: opt_data.canManage, iconsMap: opt_data.iconsMap, isWithIcon: opt_data.isWithIcons }); } } output += ((opt_data.canManage) ? '
    • ' + soy.$$escapeHtml('Add link') + '
    • ' : '') + '
    '; } return output; }; if (goog.DEBUG) { JIRA.Projects.Sidebar.ProjectShortcuts.Templates.content.soyTemplateName = 'JIRA.Projects.Sidebar.ProjectShortcuts.Templates.content'; } JIRA.Projects.Sidebar.ProjectShortcuts.Templates.shortcut = function (opt_data, opt_ignored) { return '
  • ' + ((opt_data.isWithIcon) ? '' + soy.$$escapeHtml('Project shortcut icon') + '' : '') + '' + soy.$$escapeHtml(opt_data.name) + '' + ((opt_data.canManage) ? '' : '') + '
  • '; }; if (goog.DEBUG) { JIRA.Projects.Sidebar.ProjectShortcuts.Templates.shortcut.soyTemplateName = 'JIRA.Projects.Sidebar.ProjectShortcuts.Templates.shortcut'; } JIRA.Projects.Sidebar.ProjectShortcuts.Templates.icon = function (opt_data, opt_ignored) { opt_data = opt_data || {}; var output = ''; if (opt_data.iconsMap) { var id__soy85 = opt_data.iconId && opt_data.iconsMap[opt_data.iconId] ? opt_data.iconId : '1'; output += (opt_data.iconsMap[id__soy85]) ? soy.$$escapeHtml(opt_data.iconsMap[id__soy85].className) : ''; } return output; }; if (goog.DEBUG) { JIRA.Projects.Sidebar.ProjectShortcuts.Templates.icon.soyTemplateName = 'JIRA.Projects.Sidebar.ProjectShortcuts.Templates.icon'; } JIRA.Projects.Sidebar.ProjectShortcuts.Templates.shortcutFormFields = function (opt_data, opt_ignored) { return '
    ' + aui.form.textField({ name: 'project-shortcuts-url-' + opt_data.action, isRequired: true, id: 'project-shortcuts-url-' + opt_data.action, labelContent: 'Web address', placeholderText: 'e.g. http://www.atlassian.com', extraClasses: 'project-shortcuts-url', value: opt_data.url ? opt_data.url : '', errorTexts: opt_data.errors.urlError ? [opt_data.errors.urlError] : [] }) + '
    ' + aui.form.label({ isRequired: true, forField: 'project-shortcuts-name-' + opt_data.action, content: 'Label' }) + '
    ' + aui.form.input({ name: 'project-shortcuts-name-' + opt_data.action, id: 'project-shortcuts-name-' + opt_data.action, placeholderText: 'e.g. Atlassian website', extraClasses: 'project-shortcuts-name-input' + (opt_data.isWithIcon ? ' project-shortcuts-name-input-with-icon' : ''), value: opt_data.name ? opt_data.name : '', type: 'text' }) + '
    ' + ((opt_data.errors.iconError) ? aui.form.fieldError({message: opt_data.errors.iconError}) : '') + ((opt_data.errors.nameError) ? aui.form.fieldError({message: opt_data.errors.nameError}) : '') + '
    '; }; if (goog.DEBUG) { JIRA.Projects.Sidebar.ProjectShortcuts.Templates.shortcutFormFields.soyTemplateName = 'JIRA.Projects.Sidebar.ProjectShortcuts.Templates.shortcutFormFields'; } JIRA.Projects.Sidebar.ProjectShortcuts.Templates.iconsPicker = function (opt_data, opt_ignored) { return '' + JIRA.Projects.Sidebar.ProjectShortcuts.Templates.iconsList(opt_data) + '' + aui.dropdown2.trigger({ menu: {id: 'project-shortcuts-icons-list-' + opt_data.cid}, extraClasses: 'aui-button project-shortcuts-icons-picker', iconClasses: 'aui-icon aui-icon-large ' + soy.$$escapeHtml(opt_data.icon.className), extraAttributes: {href: '#'} }); }; if (goog.DEBUG) { JIRA.Projects.Sidebar.ProjectShortcuts.Templates.iconsPicker.soyTemplateName = 'JIRA.Projects.Sidebar.ProjectShortcuts.Templates.iconsPicker'; } JIRA.Projects.Sidebar.ProjectShortcuts.Templates.iconsList = function (opt_data, opt_ignored) { var output = ''; return output; }; if (goog.DEBUG) { JIRA.Projects.Sidebar.ProjectShortcuts.Templates.iconsList.soyTemplateName = 'JIRA.Projects.Sidebar.ProjectShortcuts.Templates.iconsList'; } JIRA.Projects.Sidebar.ProjectShortcuts.Templates.addDialog = function (opt_data, opt_ignored) { return '

    ' + soy.$$escapeHtml('Add link') + '

    ' + JIRA.Projects.Sidebar.ProjectShortcuts.Templates.shortcutFormFields(soy.$$augmentMap(opt_data, {action: 'add'})) + '
    '; }; if (goog.DEBUG) { JIRA.Projects.Sidebar.ProjectShortcuts.Templates.addDialog.soyTemplateName = 'JIRA.Projects.Sidebar.ProjectShortcuts.Templates.addDialog'; } JIRA.Projects.Sidebar.ProjectShortcuts.Templates.editDialogChrome = function (opt_data, opt_ignored) { return ''; }; if (goog.DEBUG) { JIRA.Projects.Sidebar.ProjectShortcuts.Templates.editDialogChrome.soyTemplateName = 'JIRA.Projects.Sidebar.ProjectShortcuts.Templates.editDialogChrome'; } JIRA.Projects.Sidebar.ProjectShortcuts.Templates.editDialog = function (opt_data, opt_ignored) { return '
    ' + JIRA.Projects.Sidebar.ProjectShortcuts.Templates.shortcutFormFields(soy.$$augmentMap(opt_data, {action: 'edit'})) + '
    '; }; if (goog.DEBUG) { JIRA.Projects.Sidebar.ProjectShortcuts.Templates.editDialog.soyTemplateName = 'JIRA.Projects.Sidebar.ProjectShortcuts.Templates.editDialog'; } JIRA.Projects.Sidebar.ProjectShortcuts.Templates.deleteDialog = function (opt_data, opt_ignored) { return ''; }; if (goog.DEBUG) { JIRA.Projects.Sidebar.ProjectShortcuts.Templates.deleteDialog.soyTemplateName = 'JIRA.Projects.Sidebar.ProjectShortcuts.Templates.deleteDialog'; } } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-project-shortcuts', location = '/sidebar/project-shortcuts/templates.js' */ define("jira/projects/sidebar/project-shortcuts/templates", function () { return JIRA.Projects.Sidebar.ProjectShortcuts.Templates }); AJS.namespace("JIRA.Projects.Sidebar.ProjectShortcuts.Templates", null, require("jira/projects/sidebar/project-shortcuts/templates")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-project-shortcuts', location = '/sidebar/project-shortcuts/project-shortcuts-analytics.js' */ define("jira/projects/sidebar/project-shortcuts/analytics", ["jira/ajs/dark-features", "jira/analytics", "jquery"], function (b, a, d) { var e = "a.project-shortcuts-group__link"; var c = b.isEnabled("com.atlassian.jira.projects.ProjectCentricNavigation.ProjectShortcutIcons"); return { initialize: function (f) { this.projectId = f }, initShortcutClick: function (j, h) { var i = h.getAUISidebar(); var g = d(j); var f = this; g.on("click", e, function (m) { var l = g.find(e); var k = d(this); a.send({ name: "jira.projects.shortcut.clicked", data: { shortcutId: k.data("shortcutId"), shortcutPosition: k.closest("li").index() + 1, shortcutIconName: c ? k.find(".aui-icon").data("projectShortcutsIconId") : "", shortcutCount: l.size(), isWithIcons: c, isSidebarCollapsed: i.isCollapsed(), projectId: f.projectId } }) }) }, initDialogActions: function (g) { var f = this; g.on("childview:edit:open", function (h, j) { var i = j.collection.indexOf(j) + 1; a.send({ name: "jira.projects.shortcut.edit.dialog.opened", data: { isWithIcons: c, shortcutId: j.get("id"), shortcutPosition: i, shortcutCount: j.collection.size(), projectId: f.projectId } }) }); g.on("childview:edit:close", function (h, j, k) { var i = j.collection.indexOf(j) + 1; a.send({ name: "jira.projects.shortcut.edit.dialog.closed", data: { isWithIcons: c, isSave: k, shortcutId: j.get("id"), shortcutPosition: i, shortcutCount: j.collection.size(), projectId: f.projectId } }) }); g.on("add:open", function () { a.send({ name: "jira.projects.shortcut.add.dialog.opened", data: {isWithIcons: c, projectId: f.projectId} }) }); g.on("add:close", function (h) { a.send({ name: "jira.projects.shortcut.add.dialog.closed", data: {isWithIcons: c, isSave: h, projectId: f.projectId} }) }) }, iconChanged: function (f, h, g) { a.send({ name: "jira.projects.shortcut.icon.changed", data: { iconName: h, oldIconName: g, shortcutId: f.isNew() ? "" : f.get("id"), isNew: f.isNew(), cid: f.cid, projectId: this.projectId } }) }, iconChangeConfirmed: function (f, g) { a.send({ name: "jira.projects.shortcut.icon.confirmed", data: { oldIconName: f.get("icon"), iconName: g, shortcutId: f.isNew() ? "" : f.get("id"), isNew: f.isNew(), cid: f.cid, projectId: this.projectId } }) }, iconPickerOpened: function (f) { a.send({ name: "jira.projects.shortcut.icon.picker.opened", data: { shortcutId: f.isNew() ? "" : f.get("id"), isNew: f.isNew(), cid: f.cid, projectId: this.projectId } }) }, iconPickerClosed: function (f, g) { a.send({ name: "jira.projects.shortcut.icon.picker.closed", data: { shortcutId: f.isNew() ? "" : f.get("id"), isNew: f.isNew(), cid: f.cid, isSave: g, projectId: this.projectId } }) } } }); AJS.namespace("JIRA.Projects.Sidebar.ProjectShortcuts.Analytics", null, require("jira/projects/sidebar/project-shortcuts/analytics")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-project-shortcuts', location = '/sidebar/project-shortcuts/services/AvailableIcons.js' */ define("jira/projects/sidebar/project-shortcuts/services/available-icons", ["underscore"], function (c) { var d = []; var a = {}; var b = false; return { initialize: function (e) { d = e || d; a = {}; c.each(e, function (f) { a[f.name] = f }) }, getIconsList: function () { return d }, getIconsMap: function () { return a }, getAllIconsClasses: function () { return c.reduce(d, function (e, f) { return e + f.className + " " }, "") }, getIconFromName: function (e) { if (this.getIconsMap()[e]) { return this.getIconsMap()[e] } if (this.getIconsList()[0]) { return this.getIconsList()[0] } return {} }, setWithIcons: function (e) { b = e }, isWithIcons: function () { return b } } }); AJS.namespace("JIRA.Projects.Sidebar.ProjectShortcuts.Services.AvailableIcons", null, require("jira/projects/sidebar/project-shortcuts/services/available-icons")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-project-shortcuts', location = '/sidebar/project-shortcuts/entities/Shortcut.js' */ define("jira/projects/sidebar/project-shortcuts/entities/shortcut", ["jira/util/formatter", "jira/util/logger", "jira-projects-backbone", "wrm/context-path"], function (e, d, g, b) { function c(h) { var i; try { i = JSON.parse(h.responseText) } catch (j) { i = {message: "We couldn\'t complete the action as there seems to be a communication issue."} } return i } return g.Model.extend({ defaults: {url: "", name: "", icon: ""}, initialize: function (i, h) { if (!h || !h.projectKey) { throw"Project key is required" } this.projectKey = h.projectKey }, urlRoot: function f() { return b() + "/rest/projects/1.0/project/" + encodeURIComponent(this.projectKey) + "/shortcut" }, clear: function a() { this.unset("id"); this.set("url", this.defaults.url); this.set("name", this.defaults.name); this.set("icon", this.defaults.icon) }, save: function () { if (this.saving == true) { return } this.saving = true; var i = this; i.trigger("save:start"); var l = this.isNew() ? "create" : "update"; this.sync(l, i).always(function h() { i.saving = false; i.trigger("save:finish") }).done(function j(m) { i.set(m, {silent: true}); d.trace("jira.projects.shortcuts." + l + ".success"); i.trigger("save:success") }).fail(function k(m) { var n = c(m); d.trace("jira.projects.shortcuts." + l + ".fail"); i.trigger("save:failure", n) }) }, destroy: function () { if (this.saving == true) { return } this.saving = true; var i = this; i.trigger("remove:start"); var h = g.Model.prototype.destroy.apply(this, arguments); h.always(function () { i.saving = false; i.trigger("remove:finish") }).done(function j() { i.trigger("remove:success") }).fail(function k(l) { var m = c(l); i.trigger("remove:failure", m) }); return h } }) }); AJS.namespace("JIRA.Projects.Sidebar.ProjectShortcuts.Entities.Shortcut", null, require("jira/projects/sidebar/project-shortcuts/entities/shortcut")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-project-shortcuts', location = '/sidebar/project-shortcuts/entities/ShortcutErrors.js' */ define("jira/projects/sidebar/project-shortcuts/entities/shortcut-errors", ["jira-projects-backbone"], function (b) { return b.Model.extend({ defaults: {urlError: "", nameError: "", iconError: "", generalError: ""}, initialize: function a(f, e) { var d = e.model; this.listenTo(d, "save:failure remove:failure", function c(g) { this.set({ urlError: g.errors && g.errors.url, nameError: g.errors && g.errors.name, iconError: g.errors && g.errors.icon, generalError: (g.message || (g.errorMessages && g.errorMessages.length > 0)) ? g.message || g.errorMessages[0] : undefined }) }); this.listenTo(d, "save:success remove:success", this.clear) } }) }); AJS.namespace("JIRA.Projects.Sidebar.ProjectShortcuts.Entities.ShortcutErrors", null, require("jira/projects/sidebar/project-shortcuts/entities/shortcut-errors")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-project-shortcuts', location = '/sidebar/project-shortcuts/entities/Shortcuts.js' */ define("jira/projects/sidebar/project-shortcuts/entities/shortcuts", ["jira/projects/sidebar/project-shortcuts/entities/shortcut", "jira-projects-backbone"], function (b, a) { return a.Collection.extend({ model: b, initialize: function (d, c) { this.projectKey = c.projectKey } }) }); AJS.namespace("JIRA.Projects.Sidebar.ProjectShortcuts.Entities.Shortcuts", null, require("jira/projects/sidebar/project-shortcuts/entities/shortcuts")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-project-shortcuts', location = '/sidebar/project-shortcuts/views/IconPickerContent.js' */ define("jira/projects/sidebar/project-shortcuts/views/icon-picker-content", ["jira/projects/sidebar/project-shortcuts/templates", "jira/projects/sidebar/project-shortcuts/analytics", "jira/projects/sidebar/project-shortcuts/services/available-icons", "jira/projects/libs/marionette", "jquery"], function (n, l, c, e, m) { var i = "projectShortcutsIconsId"; var a = "active aui-dropdown2-active"; function o(p, t) { var s = 5; var v = p.ui.iconList.find(".active"); var u = p.ui.iconList.find("li").size(); var r; switch (t.keyCode) { case AJS.keyCode.LEFT: r = -1; break; case AJS.keyCode.RIGHT: r = 1; break; case AJS.keyCode.DOWN: r = s; break; case AJS.keyCode.UP: r = -s; break; default: r = 0 } var q = v.closest("li").index() + r; if (q < 0 || q >= u) { q += u; q %= u } v.removeClass(a); p.ui.icon.eq(q).addClass(a) } return e.ItemView.extend({ template: n.iconsPicker, ui: { icon: ".project-shortcuts-icons-icon", iconList: ".project-shortcuts-icons-list", iconPicker: ".project-shortcuts-icons-picker" }, modelEvents: { "change:icon": function k() { var q = this._modelIcon(); var p = this.ui.iconPicker.children(); p.removeClass(this.iconFactory.getAllIconsClasses()); p.addClass(q.className); this.ui.iconPicker.data(i, q.name) }, "save:start": function j() { this.ui.iconPicker.attr("aria-disabled", true) }, "save:finish": function h() { this.ui.iconPicker.attr("aria-disabled", false) } }, events: { "keydown @ui.iconPicker": function f(p) { if (!this.isPickerActive()) { return } switch (p.keyCode) { case AJS.keyCode.LEFT: case AJS.keyCode.RIGHT: case AJS.keyCode.DOWN: case AJS.keyCode.UP: o(this, p); p.stopPropagation(); p.preventDefault(); this.ui.iconList.trigger("aui-dropdown2-item-selected"); break; case AJS.keyCode.ESCAPE: this.hideIconPicker(); p.stopPropagation(); p.preventDefault(); break } } }, initialize: function (p) { this.iconFactory = c; this.analytics = l }, onRender: function () { var p = this; this.ui.icon.on("click", function q() { var r = m(this).data(i); p.analytics.iconChangeConfirmed(p.model, r); p.analyticsOldIconId = ""; p.analyticsIconClicked = true; p.model.set("icon", r); p.ui.iconPicker.focus() }); this.ui.iconList.on("aui-dropdown2-show", function () { p.ui.iconPicker.focus(); p.analyticsIconClicked = false; p.analytics.iconPickerOpened(p.model) }); this.ui.iconList.on("aui-dropdown2-hide", function () { p.analytics.iconPickerClosed(p.model, p.analyticsIconClicked) }); this.analyticsOldIconId = ""; this.ui.iconList.on("aui-dropdown2-item-selected", function (r) { var s = m(this).find(".active").data(i); if (p.analyticsOldIconId && p.analyticsOldIconId !== s) { p.analytics.iconChanged(p.model, s, p.analyticsOldIconId) } p.analyticsOldIconId = s }); this.ui.iconPicker.data(i, this.model.get("icon")) }, hideIconPicker: function () { if (this.isPickerActive()) { this.ui.iconPicker.trigger("aui-button-invoke") } }, isPickerActive: function () { return this.ui.iconPicker.hasClass("active") }, _modelIcon: function b() { return this.iconFactory.getIconFromName(this.model.get("icon")) }, onFormSubmit: function g() { this.model.set("icon", this.ui.iconPicker.data(i) || "") }, focus: function d() { this.ui.iconPicker.focus() }, serializeData: function () { return {iconsList: this.iconFactory.getIconsList(), icon: this._modelIcon(), cid: this.cid} } }) }); AJS.namespace("JIRA.Projects.Sidebar.ProjectShortcuts.Views.IconPickerContent", null, require("jira/projects/sidebar/project-shortcuts/views/icon-picker-content")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-project-shortcuts', location = '/sidebar/project-shortcuts/views/DialogContent.js' */ define("jira/projects/sidebar/project-shortcuts/views/dialog-content", ["jira/util/formatter", "jira/flag", "jira/projects/sidebar/project-shortcuts/views/icon-picker-content", "jira/projects/sidebar/project-shortcuts/services/available-icons", "jira/projects/libs/marionette", "underscore"], function (q, r, n, s, l, v) { function u(x) { x.preventDefault(); this.ensureProtocolPrefix(); this.tryToAutomagicallyDeriveNameFromUrl(); if (this.iconPickerContent) { this.iconPickerContent.onFormSubmit() } this.model.set("url", this.ui.url.val()); this.model.set("name", this.ui.name.val()); this.model.save() } var g = l.LayoutView.extend({ ui: { form: "form", inputs: "input, button", submit: ".project-shortcuts-submit", cancel: ".project-shortcuts-cancel", url: ".project-shortcuts-url input", name: ".project-shortcuts-name input" }, regions: {iconPicker: ".project-shortcuts-icon-picker-block"}, events: { "click @ui.cancel": function f(x) { x.preventDefault(); this.model.clear(); this.setNameAutomagically = true; this.errorModel.clear(); this.trigger("cancel") }, "click @ui.submit": u, "submit @ui.form": u, "blur @ui.url": function c() { this.ensureProtocolPrefix(); this.tryToAutomagicallyDeriveNameFromUrl() }, "input @ui.url": function e() { this.model.set("url", this.ui.url.val()); this.tryToAutomagicallyDeriveNameFromUrl() }, "input @ui.name": function w() { this.setNameAutomagically = false; this.model.set("name", this.ui.name.val()) }, "keydown @ui.name": function j(x) { if (!this.iconPickerContent) { return } if (x.shiftKey && x.keyCode === AJS.keyCode.TAB) { x.preventDefault(); this.iconPickerContent.focus() } }, "keydown @ui.url": function j(x) { if (!this.iconPickerContent) { return } if (!x.shiftKey && x.keyCode === AJS.keyCode.TAB) { x.preventDefault(); this.iconPickerContent.focus() } } }, modelEvents: { "save:start": function a() { this.ui.inputs.prop("disabled", true); this.ui.submit.addClass("loading"); this.ui.submit.spin({className: "spinner"}) }, "save:finish": function o() { this.ui.inputs.prop("disabled", false); this.ui.submit.removeClass("loading"); this.ui.submit.spinStop({className: "spinner"}) }, "save:failure": function d() { this.render(); if (this.errorModel.get("generalError")) { r({ type: "error", title: "We couldn\'t save the link for you", close: "auto", body: this.errorModel.get("generalError") }) } if (this.errorModel.get("nameError")) { this.ui.name.focus() } if (this.errorModel.get("urlError")) { this.ui.url.focus() } return this }, "save:success": function k() { this.setNameAutomagically = true } }, initialize: function b(y) { this.errorModel = y.errorModel; var x = this.model.get("name"); this.setNameAutomagically = (x.length == 0); this.iconFactory = s }, serializeData: function m() { return v.extend(this.model.toJSON(), { errors: this.errorModel.toJSON(), action: this.action, isWithIcon: this.iconFactory.isWithIcons() }) }, onRender: function () { if (this.iconFactory.isWithIcons()) { this.iconPickerContent = new n({model: this.model, action: this.action, observable: this}); this.getRegion("iconPicker").show(this.iconPickerContent) } else { delete this.iconPickerContent } }, hideIconPicker: function () { if (!this.iconPickerContent) { return } this.iconPickerContent.hideIconPicker() }, setName: function i(x) { this.ui.name.val(x); this.model.set("name", x) }, setUrl: function h(x) { this.ui.url.val(x); this.model.set("url", x) }, ensureProtocolPrefix: function p() { var x = this.ui.url.val().trim(); if (x.length > 0 && !g.urlPattern.test(x)) { this.setUrl("http://" + x) } }, tryToAutomagicallyDeriveNameFromUrl: function t() { var y = this.ui.url.val().trim(); if (this.setNameAutomagically) { if (g.urlOptionalProtocolPattern.test(y)) { var x = g.urlOptionalProtocolPattern.exec(y); this.setName(x[3]) } else { this.setName(y) } } } }, { urlPattern: /^[a-zA-Z0-9]+:(\/\/)?([^\/]*).*/, urlOptionalProtocolPattern: /^([a-zA-Z0-9]+:(\/\/)?)?([^\/]*).*/ }); return g }); AJS.namespace("JIRA.Projects.Sidebar.ProjectShortcuts.Views.DialogContent", null, require("jira/projects/sidebar/project-shortcuts/views/dialog-content")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-project-shortcuts', location = '/sidebar/project-shortcuts/views/AddDialogContent.js' */ define("jira/projects/sidebar/project-shortcuts/views/add-dialog-content", ["jira/projects/sidebar/project-shortcuts/templates", "jira/projects/sidebar/project-shortcuts/views/dialog-content"], function (b, a) { return a.extend({template: b.addDialog}) }); AJS.namespace("JIRA.Projects.Sidebar.ProjectShortcuts.Views.AddDialogContent", null, require("jira/projects/sidebar/project-shortcuts/views/add-dialog-content")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-project-shortcuts', location = '/sidebar/project-shortcuts/views/EditDialogContent.js' */ define("jira/projects/sidebar/project-shortcuts/views/edit-dialog-content", ["jira/projects/sidebar/project-shortcuts/templates", "jira/projects/sidebar/project-shortcuts/views/dialog-content"], function (b, a) { return a.extend({template: b.editDialog}) }); AJS.namespace("JIRA.Projects.Sidebar.ProjectShortcuts.Views.EditDialogContent", null, require("jira/projects/sidebar/project-shortcuts/views/edit-dialog-content")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-project-shortcuts', location = '/sidebar/project-shortcuts/dialogs/Delete.js' */ define("jira/projects/sidebar/project-shortcuts/dialogs/delete", ["jira/projects/sidebar/project-shortcuts/templates", "jira/util/formatter", "jira/util/logger", "jira/flag", "jira/projects/libs/marionette", "underscore"], function (m, h, j, d, c, i) { return c.ItemView.extend({ template: m.deleteDialog, ui: {inputs: "input, button", submit: ".project-shortcuts-submit", cancel: ".project-shortcuts-cancel"}, events: { "click @ui.cancel": function k(n) { n.preventDefault(); this.dialog.hide() }, "click @ui.submit": function a(n) { n.preventDefault(); this.model.destroy({wait: true}) } }, modelEvents: { "remove:start": function e() { this.ui.inputs.prop("disabled", true); this.ui.submit.addClass("loading"); this.ui.submit.spin({className: "spinner"}) }, "remove:finish": function g() { this.ui.inputs.prop("disabled", false); this.ui.submit.removeClass("loading"); this.ui.submit.spinStop({className: "spinner"}); this.dialog.hide(); j.trace("jira.projects.shortcuts.deleted") }, "remove:failure": function f(n) { if (n.message || (n.errorMessages && n.errorMessages.length > 0)) { d({ type: "error", title: "We couldn\'t delete the link for you", close: "auto", body: n.message || n.errorMessages[0] }) } } }, initialize: function b() { this.render(); this.$el.appendTo("body"); this.dialog = AJS.dialog2(this.$el); this.dialog.show(); var n = this; this.dialog.on("hide", function () { i.defer(function () { n.destroy() }) }) }, onRender: function l() { this.unwrapTemplate() } }) }); AJS.namespace("JIRA.Projects.Sidebar.ProjectShortcuts.Dialogs.Delete", null, require("jira/projects/sidebar/project-shortcuts/dialogs/delete")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-project-shortcuts', location = '/sidebar/project-shortcuts/dialogs/Edit.js' */ define("jira/projects/sidebar/project-shortcuts/dialogs/edit", ["jira/projects/sidebar/project-shortcuts/templates", "jira/projects/sidebar/project-shortcuts/views/edit-dialog-content", "jira/projects/sidebar/project-shortcuts/entities/shortcut", "jira/projects/sidebar/project-shortcuts/entities/shortcut-errors", "jira/projects/libs/marionette", "underscore", "jquery"], function (d, f, h, a, g, b, e) { return g.Controller.extend({ initialize: function (l) { var j = this; b.bindAll(this, "hide"); this.model = new h(l.model.toJSON(), {projectKey: l.model.projectKey || l.model.collection.projectKey}); this.errorModel = new a(undefined, {model: this.model}); this.view = new f({model: this.model, errorModel: this.errorModel}); this.analyticsSave = false; this.view.render(); var i = e(d.editDialogChrome({})); this.view.$el.appendTo(i); this.dialog = AJS.dialog2(i); this.dialog.show(); this.view.ui.url.focus(); this._onResizeWindow = function () { j.hideIconPicker() }; e(window).on("resize", this._onResizeWindow); this.listenTo(this.view, "cancel", this.hide); this.listenTo(this.model, "save:success", function m() { this.analyticsSave = true; this.hide(); l.model.set(j.model.toJSON()) }); this.dialog.on("hide", function k() { j.trigger("dialog:close", j.analyticsSave) }) }, hideIconPicker: function () { this.view.hideIconPicker() }, hide: function c() { this.dialog.hide(); e(window).off("resize", this._onResizeWindow) } }) }); AJS.namespace("JIRA.Projects.Sidebar.ProjectShortcuts.Dialogs.Edit", null, require("jira/projects/sidebar/project-shortcuts/dialogs/edit")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-project-shortcuts', location = '/sidebar/project-shortcuts/dialogs/Add.js' */ define("jira/projects/sidebar/project-shortcuts/dialogs/add", ["aui/inline-dialog", "jira/projects/sidebar/project-shortcuts/views/add-dialog-content", "jira/projects/sidebar/project-shortcuts/entities/shortcut", "jira/projects/sidebar/project-shortcuts/entities/shortcut-errors", "jira/projects/libs/marionette", "underscore", "jquery"], function (d, c, j, h, g, i, k) { return g.Controller.extend({ initialize: function (u) { i.bindAll(this, "hide", "refresh", "focusForm"); var t = this; this.analyticsSave = false; this.sidebarItem = u.sidebarItem; this.projectKey = u.projectKey; this.collection = u.collection; this.model = new j(null, {projectKey: this.projectKey}); this.errorModel = new h(null, {model: this.model}); this.view = new c({model: this.model, errorModel: this.errorModel}); this.view.render(); var m = k(window); var o = k(document); var s = k(".aui-sidebar-body"); this.dialog = new d(this.sidebarItem.ui.link, "project-shortcuts-group__add-dialog", function (x, w, z) { t.sidebarItem.$el.addClass("aui-nav-selected"); t.view.render(); t.view.$el.appendTo(x); t.view.ui.url.focus(); m.on("scroll.project-shortcuts", function y() { t.refresh() }); s.on("scroll.project-shortcuts", function v() { t.hide() }); o.on("showLayer", t.focusForm); m.on("resize", t.refresh); z(); return false }, { gravity: "w", autoWidth: true, initCallback: function l() { t.trigger("dialog:open"); t.analyticsSave = false }, hideCallback: function n() { t.sidebarItem.$el.removeClass("aui-nav-selected"); t.sidebarItem.ui.link.blur(); m.off("scroll.project-shortcuts"); s.off("scroll.project-shortcuts"); o.off("showLayer", t.focusForm); t.trigger("dialog:close", t.analyticsSave) }, persistent: true, closeOnTriggerClick: true, offsetY: function p(v, y) { var x = y.target.height(); var w = v.height() / 2; return w - x - 10 }, arrowOffsetY: function q(v, y) { var x = y.target.height() / 2; var w = v.height() / 2; return -w + 22 + x } }); this.listenTo(this.view, "render", this.refresh); this.listenTo(this.view, "cancel", this.hideAndRender); this.listenTo(this.model, "save:success", function r() { var v = new j(this.model.toJSON(), {projectKey: this.projectKey}); this.model.clear(); this.collection.add(v); this.analyticsSave = true; this.hide() }); this.listenTo(this.sidebarItem, "before:select", function (v) { v.preventDefault() }); AJS.sidebar(".aui-sidebar").on("collapse-start", this.hide); k(".project-shortcuts-group").on("click", "li", this.hide) }, hide: function e() { this.view.hideIconPicker(); this.dialog.hide() }, refresh: function f() { this.view.hideIconPicker(); this.dialog.refresh() }, hideAndRender: function b() { this.hide() }, focusForm: function a() { this.view.ui.url.focus() } }) }); AJS.namespace("JIRA.Projects.Sidebar.ProjectShortcuts.Dialogs.Add", null, require("jira/projects/sidebar/project-shortcuts/dialogs/add")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-project-shortcuts', location = '/sidebar/project-shortcuts/views/Shortcut.js' */ define("jira/projects/sidebar/project-shortcuts/views/shortcut", ["jira/projects/sidebar/project-shortcuts/templates", "jira/projects/sidebar/project-shortcuts/services/available-icons", "jira/projects/sidebar/project-shortcuts/dialogs/edit", "jira/projects/sidebar/project-shortcuts/dialogs/delete", "jira/projects/libs/marionette", "underscore", "jquery"], function (j, e, b, a, f, g, i) { return f.ItemView.extend({ template: j.shortcut, initialize: function c() { g.bindAll(this, "toggleDropdown"); this.iconFactory = e }, ui: { del: ".project-shortcuts-group__actions__delete", edit: ".project-shortcuts-group__actions__edit", trigger: ".project-shortcuts-group__actions", dropdown: ".project-shortcuts-group__dropdown", link: ".project-shortcuts-group__link" }, modelEvents: {change: "render"}, events: { "click @ui.link": function d() { this.trigger("click:link", this.model) } }, onRender: function () { var k = this; this.unwrapTemplate(); var o = i(window); var n = i(".aui-sidebar-body"); this.ui.edit.on("click", function m(q) { q.preventDefault(); k.ui.trigger.blur(); var p = new b({model: k.model}); k.trigger("edit:open", k.model); k.listenToOnce(p, "dialog:close", function r(s) { k.trigger("edit:close", k.model, s) }) }); this.ui.del.on("click", function l(p) { p.preventDefault(); k.ui.trigger.blur(); var q = new a({model: k.model}) }); this.ui.dropdown.on({ "aui-dropdown2-show": function () { k.$el.addClass("aui-nav-selected"); n.one("scroll", k.toggleDropdown); o.one("scroll", k.toggleDropdown); k.ui.trigger.focus() }, "aui-dropdown2-hide": function () { k.$el.removeClass("aui-nav-selected"); n.off("scroll", k.toggleDropdown); o.off("scroll", k.toggleDropdown) } }) }, serializeData: function () { var k = g.extend(this.model.toJSON(), {canManage: true, isWithIcon: this.iconFactory.isWithIcons()}); if (this.iconFactory.isWithIcons()) { k = g.extend(k, {iconsMap: e.getIconsMap()}) } return k }, toggleDropdown: function h() { this.ui.trigger.trigger("aui-button-invoke") } }) }); AJS.namespace("JIRA.Projects.Sidebar.ProjectShortcuts.Views.Shortcut", null, require("jira/projects/sidebar/project-shortcuts/views/shortcut")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-project-shortcuts', location = '/sidebar/project-shortcuts/views/ShortcutsList.js' */ define("jira/projects/sidebar/project-shortcuts/views/list", ["jira/api/projects/sidebar", "jira/projects/sidebar/project-shortcuts/templates", "jira/projects/sidebar/project-shortcuts/views/shortcut", "jira/projects/sidebar/project-shortcuts/dialogs/add", "jira/projects/sidebar/component/navigation-group", "jira/projects/libs/marionette", "jquery"], function (f, l, g, d, j, i, e) { return i.CompositeView.extend({ template: l.content, childView: g, ui: { itemsContainer: ".aui-nav", description: ".project-shortcuts-group__description", add: ".project-shortcuts-group__add" }, collectionEvents: { "add remove": function b() { if (this.collection.length == 0 && this.lastCollectionLength != 0 || this.collection.length != 0 && this.lastCollectionLength == 0) { this.lastCollectionLength = this.collection.length; this.ui.description.toggleClass("hidden", this.collection.length > 0); this.$el.toggleClass("project-shortcuts-group_empty", this.collection.length == 0) } } }, initialize: function c() { var m = this; f.getSidebar().done(function (p) { var q = p.getAUISidebar(); q.on("expand-end", function o() { e(".aui-sidebar-submenu-dialog .project-shortcuts-group__dropdown").remove() }); q.on("collapse-start", function n() { m.$(".project-shortcuts-group__actions.aui-dropdown2-active").trigger("aui-button-invoke") }) }); this.lastCollectionLength = this.collection.length }, attachElContent: function (m) { var n = new j({el: m}); this.$el = e(n.getElement()); f.getSidebar().done(function (o) { o.replaceGroup(this.options.targetGroup, n) }.bind(this)); return this }, onRender: function k() { f.getSidebar().done(function (p) { var n = new d({ sidebarItem: p.getGroup("project-shortcuts-group").getItem("project-shortcut-add"), projectKey: this.collection.projectKey, collection: this.collection }); this.listenTo(n, "dialog:open", function o() { this.trigger("add:open") }); this.listenTo(n, "dialog:close", function m(q) { this.trigger("add:close", q) }) }.bind(this)) }, serializeData: function h() { return {canManage: true, numberOfShortcuts: this.collection.length} }, attachBuffer: function (n, m) { this.ui.itemsContainer.prepend(m) }, onAddChild: function a(m) { this.ui.add.parent().before(m.$el) } }) }); AJS.namespace("JIRA.Projects.Sidebar.ProjectShortcuts.Views.List", null, require("jira/projects/sidebar/project-shortcuts/views/list")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:sidebar-project-shortcuts-init', location = '/sidebar/project-shortcuts/project-shortcuts-init.js' */ require(["jira/projects/sidebar/project-shortcuts/analytics", "jira/projects/sidebar/project-shortcuts/views/list", "jira/projects/sidebar/project-shortcuts/services/available-icons", "jira/projects/sidebar/project-shortcuts/entities/shortcuts", "jira/api/projects/sidebar", "jira/api/projects", "wrm/data"], function (f, a, g, c, e, d, b) { e.getSidebar().done(function (l) { var i = b.claim("com.atlassian.jira.projects.shortcuts:project-id"); f.initialize(i); if (b.claim("com.atlassian.jira.projects.shortcuts:can-manage")) { var k = b.claim("com.atlassian.jira.projects.shortcuts:with-icons"); if (k) { g.initialize(b.claim("com.atlassian.jira.projects.shortcuts:icons-list")) } g.setWithIcons(k); var h = d.getCurrentProjectKey(); var j = new c(b.claim("com.atlassian.jira.projects.shortcuts:shortcuts"), {projectKey: h}); var m = new a({collection: j, targetGroup: "project-shortcuts-group"}); m.render(); f.initDialogActions(m) } f.initShortcutClick(".project-shortcuts-list", l) }) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.jira.jira-projects-plugin:reports-link-init', location = '/sidebar/reports/reports-link-init.js' */ require(["jira/projects/sidebar/reports/link-storage"], function (a) { a.restoreLastViewedReportLink() }); AJS.namespace("JIRA.Projects.Sidebar.Reports", null, require("jira/projects/sidebar/reports/link-storage")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:gh-analytics-tracker', location = 'includes/js/rapid/AnalyticsTracker.js' */ define("jira-agile/rapid/analytics-tracker", ["jira/util/logger", "underscore", "jquery"], function (e, a, i) { function t(e, i, t) { if (a.isUndefined(e)) throw new Error("You must specify a category"); this.params = {}, this.params.category = e; var r = 0; a.isUndefined(i) || (this.params.action = i, r++, a.isUndefined(t) || (this.params.label = t, r++)), this.requiredArgumentNames = ["action", "label", "value"].slice(r), this.useAsync = !0 } return t.prototype.setAsync = function (e) { return this.useAsync = e, this }, t.prototype.trigger = function () { this.requiredArgumentNames.length < arguments.length && e.log("Warning: too many arguments passed in. Needed at most " + this.requiredArgumentNames.length + " but got " + arguments.length); for (var t = a.clone(this.params), r = 0; r < arguments.length && !a.isUndefined(this.requiredArgumentNames[r]); r++) t[this.requiredArgumentNames[r]] = arguments[r]; this._validateParams(t); var n = "gh.analytics.async"; i(document).trigger(n, t) }, t.prototype._validateParams = function (e) { var i = ["category", "action", "label"]; a.each(i, function (i) { a.isUndefined(e[i]) || a.isString(e[i]) ? a.isUndefined(e[i]) && (e[i] = "") : e[i] = e[i].toString() }), a.each(["category", "action"], function (a) { e[a] = e[a].replace(/\s+/g, "") }), a.isUndefined(e.value) || (e.value = parseInt(e.value, 10), isNaN(e.value) && (e.value = void 0)) }, t }), AJS.namespace("GH.AnalyticsTracker", null, require("jira-agile/rapid/analytics-tracker")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.auiplugin:split_aui.splitchunk.vendors--9c8c8c1546', location = 'aui.chunk.5dea31f049d6c4f0c3de--2aa0019581c68055c6ea.js' */ (window.__auiJsonp = window.__auiJsonp || []).push([["aui.splitchunk.vendors--9c8c8c1546"], { lSwU: function (n, o, i) { var p, e, u; e = [i("oDIA"), i("O+lX")], void 0 === (u = "function" == typeof (p = function (n) { return n.ui.plugin = { add: function (o, i, p) { var e, u = n.ui[o].prototype; for (e in p) u.plugins[e] = u.plugins[e] || [], u.plugins[e].push([i, p[e]]) }, call: function (n, o, i, p) { var e, u = n.plugins[o]; if (u && (p || n.element[0].parentNode && 11 !== n.element[0].parentNode.nodeType)) for (e = 0; e < u.length; e++) n.options[u[e][0]] && u[e][1].apply(n.element, i) } } }) ? p.apply(o, e) : p) || (n.exports = u) } }]); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.auiplugin:split_aui.splitchunk.vendors--06bc6ae5d7', location = 'aui.chunk.604fd3e8f834244da4a6--3b7718afeb87134077c9.js' */ (window.__auiJsonp = window.__auiJsonp || []).push([["aui.splitchunk.vendors--06bc6ae5d7"], { "0Hbr": function (t, e, s) { var i, o, n; o = [s("oDIA"), s("O+lX")], void 0 === (n = "function" == typeof (i = function (t) { return t.ui.safeActiveElement = function (t) { var e; try { e = t.activeElement } catch (s) { e = t.body } return e || (e = t.body), e.nodeName || (e = t.body), e } }) ? i.apply(e, o) : i) || (t.exports = n) }, pTG0: function (t, e, s) { var i, o, n; o = [s("oDIA"), s("O+lX")], void 0 === (n = "function" == typeof (i = function (t) { return t.ui.safeBlur = function (e) { e && "body" !== e.nodeName.toLowerCase() && t(e).trigger("blur") } }) ? i.apply(e, o) : i) || (t.exports = n) }, "z+ct": function (t, e, s) { var i, o, n; o = [s("oDIA"), s("XPYc"), s("5h+3"), s("lSwU"), s("0Hbr"), s("pTG0"), s("0kPy"), s("O+lX"), s("yIBB")], void 0 === (n = "function" == typeof (i = function (t) { return t.widget("ui.draggable", t.ui.mouse, { version: "1.12.1", widgetEventPrefix: "drag", options: { addClasses: !0, appendTo: "parent", axis: !1, connectToSortable: !1, containment: !1, cursor: "auto", cursorAt: !1, grid: !1, handle: !1, helper: "original", iframeFix: !1, opacity: !1, refreshPositions: !1, revert: !1, revertDuration: 500, scope: "default", scroll: !0, scrollSensitivity: 20, scrollSpeed: 20, snap: !1, snapMode: "both", snapTolerance: 20, stack: !1, zIndex: !1, drag: null, start: null, stop: null }, _create: function () { "original" === this.options.helper && this._setPositionRelative(), this.options.addClasses && this._addClass("ui-draggable"), this._setHandleClassName(), this._mouseInit() }, _setOption: function (t, e) { this._super(t, e), "handle" === t && (this._removeHandleClassName(), this._setHandleClassName()) }, _destroy: function () { (this.helper || this.element).is(".ui-draggable-dragging") ? this.destroyOnClear = !0 : (this._removeHandleClassName(), this._mouseDestroy()) }, _mouseCapture: function (e) { var s = this.options; return !(this.helper || s.disabled || t(e.target).closest(".ui-resizable-handle").length > 0 || (this.handle = this._getHandle(e), !this.handle || (this._blurActiveElement(e), this._blockFrames(!0 === s.iframeFix ? "iframe" : s.iframeFix), 0))) }, _blockFrames: function (e) { this.iframeBlocks = this.document.find(e).map(function () { var e = t(this); return t("
    ").css("position", "absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0] }) }, _unblockFrames: function () { this.iframeBlocks && (this.iframeBlocks.remove(), delete this.iframeBlocks) }, _blurActiveElement: function (e) { var s = t.ui.safeActiveElement(this.document[0]); t(e.target).closest(s).length || t.ui.safeBlur(s) }, _mouseStart: function (e) { var s = this.options; return this.helper = this._createHelper(e), this._addClass(this.helper, "ui-draggable-dragging"), this._cacheHelperProportions(), t.ui.ddmanager && (t.ui.ddmanager.current = this), this._cacheMargins(), this.cssPosition = this.helper.css("position"), this.scrollParent = this.helper.scrollParent(!0), this.offsetParent = this.helper.offsetParent(), this.hasFixedAncestor = this.helper.parents().filter(function () { return "fixed" === t(this).css("position") }).length > 0, this.positionAbs = this.element.offset(), this._refreshOffsets(e), this.originalPosition = this.position = this._generatePosition(e, !1), this.originalPageX = e.pageX, this.originalPageY = e.pageY, s.cursorAt && this._adjustOffsetFromHelper(s.cursorAt), this._setContainment(), !1 === this._trigger("start", e) ? (this._clear(), !1) : (this._cacheHelperProportions(), t.ui.ddmanager && !s.dropBehaviour && t.ui.ddmanager.prepareOffsets(this, e), this._mouseDrag(e, !0), t.ui.ddmanager && t.ui.ddmanager.dragStart(this, e), !0) }, _refreshOffsets: function (t) { this.offset = { top: this.positionAbs.top - this.margins.top, left: this.positionAbs.left - this.margins.left, scroll: !1, parent: this._getParentOffset(), relative: this._getRelativeOffset() }, this.offset.click = {left: t.pageX - this.offset.left, top: t.pageY - this.offset.top} }, _mouseDrag: function (e, s) { if (this.hasFixedAncestor && (this.offset.parent = this._getParentOffset()), this.position = this._generatePosition(e, !0), this.positionAbs = this._convertPositionTo("absolute"), !s) { var i = this._uiHash(); if (!1 === this._trigger("drag", e, i)) return this._mouseUp(new t.Event("mouseup", e)), !1; this.position = i.position } return this.helper[0].style.left = this.position.left + "px", this.helper[0].style.top = this.position.top + "px", t.ui.ddmanager && t.ui.ddmanager.drag(this, e), !1 }, _mouseStop: function (e) { var s = this, i = !1; return t.ui.ddmanager && !this.options.dropBehaviour && (i = t.ui.ddmanager.drop(this, e)), this.dropped && (i = this.dropped, this.dropped = !1), "invalid" === this.options.revert && !i || "valid" === this.options.revert && i || !0 === this.options.revert || t.isFunction(this.options.revert) && this.options.revert.call(this.element, i) ? t(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function () { !1 !== s._trigger("stop", e) && s._clear() }) : !1 !== this._trigger("stop", e) && this._clear(), !1 }, _mouseUp: function (e) { return this._unblockFrames(), t.ui.ddmanager && t.ui.ddmanager.dragStop(this, e), this.handleElement.is(e.target) && this.element.trigger("focus"), t.ui.mouse.prototype._mouseUp.call(this, e) }, cancel: function () { return this.helper.is(".ui-draggable-dragging") ? this._mouseUp(new t.Event("mouseup", {target: this.element[0]})) : this._clear(), this }, _getHandle: function (e) { return !this.options.handle || !!t(e.target).closest(this.element.find(this.options.handle)).length }, _setHandleClassName: function () { this.handleElement = this.options.handle ? this.element.find(this.options.handle) : this.element, this._addClass(this.handleElement, "ui-draggable-handle") }, _removeHandleClassName: function () { this._removeClass(this.handleElement, "ui-draggable-handle") }, _createHelper: function (e) { var s = this.options, i = t.isFunction(s.helper), o = i ? t(s.helper.apply(this.element[0], [e])) : "clone" === s.helper ? this.element.clone().removeAttr("id") : this.element; return o.parents("body").length || o.appendTo("parent" === s.appendTo ? this.element[0].parentNode : s.appendTo), i && o[0] === this.element[0] && this._setPositionRelative(), o[0] === this.element[0] || /(fixed|absolute)/.test(o.css("position")) || o.css("position", "absolute"), o }, _setPositionRelative: function () { /^(?:r|a|f)/.test(this.element.css("position")) || (this.element[0].style.position = "relative") }, _adjustOffsetFromHelper: function (e) { "string" == typeof e && (e = e.split(" ")), t.isArray(e) && (e = { left: +e[0], top: +e[1] || 0 }), "left" in e && (this.offset.click.left = e.left + this.margins.left), "right" in e && (this.offset.click.left = this.helperProportions.width - e.right + this.margins.left), "top" in e && (this.offset.click.top = e.top + this.margins.top), "bottom" in e && (this.offset.click.top = this.helperProportions.height - e.bottom + this.margins.top) }, _isRootNode: function (t) { return /(html|body)/i.test(t.tagName) || t === this.document[0] }, _getParentOffset: function () { var e = this.offsetParent.offset(), s = this.document[0]; return "absolute" === this.cssPosition && this.scrollParent[0] !== s && t.contains(this.scrollParent[0], this.offsetParent[0]) && (e.left += this.scrollParent.scrollLeft(), e.top += this.scrollParent.scrollTop()), this._isRootNode(this.offsetParent[0]) && (e = { top: 0, left: 0 }), { top: e.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), left: e.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0) } }, _getRelativeOffset: function () { if ("relative" !== this.cssPosition) return {top: 0, left: 0}; var t = this.element.position(), e = this._isRootNode(this.scrollParent[0]); return { top: t.top - (parseInt(this.helper.css("top"), 10) || 0) + (e ? 0 : this.scrollParent.scrollTop()), left: t.left - (parseInt(this.helper.css("left"), 10) || 0) + (e ? 0 : this.scrollParent.scrollLeft()) } }, _cacheMargins: function () { this.margins = { left: parseInt(this.element.css("marginLeft"), 10) || 0, top: parseInt(this.element.css("marginTop"), 10) || 0, right: parseInt(this.element.css("marginRight"), 10) || 0, bottom: parseInt(this.element.css("marginBottom"), 10) || 0 } }, _cacheHelperProportions: function () { this.helperProportions = {width: this.helper.outerWidth(), height: this.helper.outerHeight()} }, _setContainment: function () { var e, s, i, o = this.options, n = this.document[0]; this.relativeContainer = null, o.containment ? "window" !== o.containment ? "document" !== o.containment ? o.containment.constructor !== Array ? ("parent" === o.containment && (o.containment = this.helper[0].parentNode), (i = (s = t(o.containment))[0]) && (e = /(scroll|auto)/.test(s.css("overflow")), this.containment = [(parseInt(s.css("borderLeftWidth"), 10) || 0) + (parseInt(s.css("paddingLeft"), 10) || 0), (parseInt(s.css("borderTopWidth"), 10) || 0) + (parseInt(s.css("paddingTop"), 10) || 0), (e ? Math.max(i.scrollWidth, i.offsetWidth) : i.offsetWidth) - (parseInt(s.css("borderRightWidth"), 10) || 0) - (parseInt(s.css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (e ? Math.max(i.scrollHeight, i.offsetHeight) : i.offsetHeight) - (parseInt(s.css("borderBottomWidth"), 10) || 0) - (parseInt(s.css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom], this.relativeContainer = s)) : this.containment = o.containment : this.containment = [0, 0, t(n).width() - this.helperProportions.width - this.margins.left, (t(n).height() || n.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top] : this.containment = [t(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, t(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, t(window).scrollLeft() + t(window).width() - this.helperProportions.width - this.margins.left, t(window).scrollTop() + (t(window).height() || n.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top] : this.containment = null }, _convertPositionTo: function (t, e) { e || (e = this.position); var s = "absolute" === t ? 1 : -1, i = this._isRootNode(this.scrollParent[0]); return { top: e.top + this.offset.relative.top * s + this.offset.parent.top * s - ("fixed" === this.cssPosition ? -this.offset.scroll.top : i ? 0 : this.offset.scroll.top) * s, left: e.left + this.offset.relative.left * s + this.offset.parent.left * s - ("fixed" === this.cssPosition ? -this.offset.scroll.left : i ? 0 : this.offset.scroll.left) * s } }, _generatePosition: function (t, e) { var s, i, o, n, r = this.options, l = this._isRootNode(this.scrollParent[0]), a = t.pageX, h = t.pageY; return l && this.offset.scroll || (this.offset.scroll = { top: this.scrollParent.scrollTop(), left: this.scrollParent.scrollLeft() }), e && (this.containment && (this.relativeContainer ? (i = this.relativeContainer.offset(), s = [this.containment[0] + i.left, this.containment[1] + i.top, this.containment[2] + i.left, this.containment[3] + i.top]) : s = this.containment, t.pageX - this.offset.click.left < s[0] && (a = s[0] + this.offset.click.left), t.pageY - this.offset.click.top < s[1] && (h = s[1] + this.offset.click.top), t.pageX - this.offset.click.left > s[2] && (a = s[2] + this.offset.click.left), t.pageY - this.offset.click.top > s[3] && (h = s[3] + this.offset.click.top)), r.grid && (o = r.grid[1] ? this.originalPageY + Math.round((h - this.originalPageY) / r.grid[1]) * r.grid[1] : this.originalPageY, h = s ? o - this.offset.click.top >= s[1] || o - this.offset.click.top > s[3] ? o : o - this.offset.click.top >= s[1] ? o - r.grid[1] : o + r.grid[1] : o, n = r.grid[0] ? this.originalPageX + Math.round((a - this.originalPageX) / r.grid[0]) * r.grid[0] : this.originalPageX, a = s ? n - this.offset.click.left >= s[0] || n - this.offset.click.left > s[2] ? n : n - this.offset.click.left >= s[0] ? n - r.grid[0] : n + r.grid[0] : n), "y" === r.axis && (a = this.originalPageX), "x" === r.axis && (h = this.originalPageY)), { top: h - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ("fixed" === this.cssPosition ? -this.offset.scroll.top : l ? 0 : this.offset.scroll.top), left: a - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ("fixed" === this.cssPosition ? -this.offset.scroll.left : l ? 0 : this.offset.scroll.left) } }, _clear: function () { this._removeClass(this.helper, "ui-draggable-dragging"), this.helper[0] === this.element[0] || this.cancelHelperRemoval || this.helper.remove(), this.helper = null, this.cancelHelperRemoval = !1, this.destroyOnClear && this.destroy() }, _trigger: function (e, s, i) { return i = i || this._uiHash(), t.ui.plugin.call(this, e, [s, i, this], !0), /^(drag|start|stop)/.test(e) && (this.positionAbs = this._convertPositionTo("absolute"), i.offset = this.positionAbs), t.Widget.prototype._trigger.call(this, e, s, i) }, plugins: {}, _uiHash: function () { return { helper: this.helper, position: this.position, originalPosition: this.originalPosition, offset: this.positionAbs } } }), t.ui.plugin.add("draggable", "connectToSortable", { start: function (e, s, i) { var o = t.extend({}, s, {item: i.element}); i.sortables = [], t(i.options.connectToSortable).each(function () { var s = t(this).sortable("instance"); s && !s.options.disabled && (i.sortables.push(s), s.refreshPositions(), s._trigger("activate", e, o)) }) }, stop: function (e, s, i) { var o = t.extend({}, s, {item: i.element}); i.cancelHelperRemoval = !1, t.each(i.sortables, function () { this.isOver ? (this.isOver = 0, i.cancelHelperRemoval = !0, this.cancelHelperRemoval = !1, this._storedCSS = { position: this.placeholder.css("position"), top: this.placeholder.css("top"), left: this.placeholder.css("left") }, this._mouseStop(e), this.options.helper = this.options._helper) : (this.cancelHelperRemoval = !0, this._trigger("deactivate", e, o)) }) }, drag: function (e, s, i) { t.each(i.sortables, function () { var o = !1, n = this; n.positionAbs = i.positionAbs, n.helperProportions = i.helperProportions, n.offset.click = i.offset.click, n._intersectsWith(n.containerCache) && (o = !0, t.each(i.sortables, function () { return this.positionAbs = i.positionAbs, this.helperProportions = i.helperProportions, this.offset.click = i.offset.click, this !== n && this._intersectsWith(this.containerCache) && t.contains(n.element[0], this.element[0]) && (o = !1), o })), o ? (n.isOver || (n.isOver = 1, i._parent = s.helper.parent(), n.currentItem = s.helper.appendTo(n.element).data("ui-sortable-item", !0), n.options._helper = n.options.helper, n.options.helper = function () { return s.helper[0] }, e.target = n.currentItem[0], n._mouseCapture(e, !0), n._mouseStart(e, !0, !0), n.offset.click.top = i.offset.click.top, n.offset.click.left = i.offset.click.left, n.offset.parent.left -= i.offset.parent.left - n.offset.parent.left, n.offset.parent.top -= i.offset.parent.top - n.offset.parent.top, i._trigger("toSortable", e), i.dropped = n.element, t.each(i.sortables, function () { this.refreshPositions() }), i.currentItem = i.element, n.fromOutside = i), n.currentItem && (n._mouseDrag(e), s.position = n.position)) : n.isOver && (n.isOver = 0, n.cancelHelperRemoval = !0, n.options._revert = n.options.revert, n.options.revert = !1, n._trigger("out", e, n._uiHash(n)), n._mouseStop(e, !0), n.options.revert = n.options._revert, n.options.helper = n.options._helper, n.placeholder && n.placeholder.remove(), s.helper.appendTo(i._parent), i._refreshOffsets(e), s.position = i._generatePosition(e, !0), i._trigger("fromSortable", e), i.dropped = !1, t.each(i.sortables, function () { this.refreshPositions() })) }) } }), t.ui.plugin.add("draggable", "cursor", { start: function (e, s, i) { var o = t("body"), n = i.options; o.css("cursor") && (n._cursor = o.css("cursor")), o.css("cursor", n.cursor) }, stop: function (e, s, i) { var o = i.options; o._cursor && t("body").css("cursor", o._cursor) } }), t.ui.plugin.add("draggable", "opacity", { start: function (e, s, i) { var o = t(s.helper), n = i.options; o.css("opacity") && (n._opacity = o.css("opacity")), o.css("opacity", n.opacity) }, stop: function (e, s, i) { var o = i.options; o._opacity && t(s.helper).css("opacity", o._opacity) } }), t.ui.plugin.add("draggable", "scroll", { start: function (t, e, s) { s.scrollParentNotHidden || (s.scrollParentNotHidden = s.helper.scrollParent(!1)), s.scrollParentNotHidden[0] !== s.document[0] && "HTML" !== s.scrollParentNotHidden[0].tagName && (s.overflowOffset = s.scrollParentNotHidden.offset()) }, drag: function (e, s, i) { var o = i.options, n = !1, r = i.scrollParentNotHidden[0], l = i.document[0]; r !== l && "HTML" !== r.tagName ? (o.axis && "x" === o.axis || (i.overflowOffset.top + r.offsetHeight - e.pageY < o.scrollSensitivity ? r.scrollTop = n = r.scrollTop + o.scrollSpeed : e.pageY - i.overflowOffset.top < o.scrollSensitivity && (r.scrollTop = n = r.scrollTop - o.scrollSpeed)), o.axis && "y" === o.axis || (i.overflowOffset.left + r.offsetWidth - e.pageX < o.scrollSensitivity ? r.scrollLeft = n = r.scrollLeft + o.scrollSpeed : e.pageX - i.overflowOffset.left < o.scrollSensitivity && (r.scrollLeft = n = r.scrollLeft - o.scrollSpeed))) : (o.axis && "x" === o.axis || (e.pageY - t(l).scrollTop() < o.scrollSensitivity ? n = t(l).scrollTop(t(l).scrollTop() - o.scrollSpeed) : t(window).height() - (e.pageY - t(l).scrollTop()) < o.scrollSensitivity && (n = t(l).scrollTop(t(l).scrollTop() + o.scrollSpeed))), o.axis && "y" === o.axis || (e.pageX - t(l).scrollLeft() < o.scrollSensitivity ? n = t(l).scrollLeft(t(l).scrollLeft() - o.scrollSpeed) : t(window).width() - (e.pageX - t(l).scrollLeft()) < o.scrollSensitivity && (n = t(l).scrollLeft(t(l).scrollLeft() + o.scrollSpeed)))), !1 !== n && t.ui.ddmanager && !o.dropBehaviour && t.ui.ddmanager.prepareOffsets(i, e) } }), t.ui.plugin.add("draggable", "snap", { start: function (e, s, i) { var o = i.options; i.snapElements = [], t(o.snap.constructor !== String ? o.snap.items || ":data(ui-draggable)" : o.snap).each(function () { var e = t(this), s = e.offset(); this !== i.element[0] && i.snapElements.push({ item: this, width: e.outerWidth(), height: e.outerHeight(), top: s.top, left: s.left }) }) }, drag: function (e, s, i) { var o, n, r, l, a, h, p, c, f, d, g = i.options, u = g.snapTolerance, m = s.offset.left, v = m + i.helperProportions.width, _ = s.offset.top, P = _ + i.helperProportions.height; for (f = i.snapElements.length - 1; f >= 0; f--) h = (a = i.snapElements[f].left - i.margins.left) + i.snapElements[f].width, c = (p = i.snapElements[f].top - i.margins.top) + i.snapElements[f].height, v < a - u || m > h + u || P < p - u || _ > c + u || !t.contains(i.snapElements[f].item.ownerDocument, i.snapElements[f].item) ? (i.snapElements[f].snapping && i.options.snap.release && i.options.snap.release.call(i.element, e, t.extend(i._uiHash(), {snapItem: i.snapElements[f].item})), i.snapElements[f].snapping = !1) : ("inner" !== g.snapMode && (o = Math.abs(p - P) <= u, n = Math.abs(c - _) <= u, r = Math.abs(a - v) <= u, l = Math.abs(h - m) <= u, o && (s.position.top = i._convertPositionTo("relative", { top: p - i.helperProportions.height, left: 0 }).top), n && (s.position.top = i._convertPositionTo("relative", { top: c, left: 0 }).top), r && (s.position.left = i._convertPositionTo("relative", { top: 0, left: a - i.helperProportions.width }).left), l && (s.position.left = i._convertPositionTo("relative", { top: 0, left: h }).left)), d = o || n || r || l, "outer" !== g.snapMode && (o = Math.abs(p - _) <= u, n = Math.abs(c - P) <= u, r = Math.abs(a - m) <= u, l = Math.abs(h - v) <= u, o && (s.position.top = i._convertPositionTo("relative", { top: p, left: 0 }).top), n && (s.position.top = i._convertPositionTo("relative", { top: c - i.helperProportions.height, left: 0 }).top), r && (s.position.left = i._convertPositionTo("relative", { top: 0, left: a }).left), l && (s.position.left = i._convertPositionTo("relative", { top: 0, left: h - i.helperProportions.width }).left)), !i.snapElements[f].snapping && (o || n || r || l || d) && i.options.snap.snap && i.options.snap.snap.call(i.element, e, t.extend(i._uiHash(), {snapItem: i.snapElements[f].item})), i.snapElements[f].snapping = o || n || r || l || d) } }), t.ui.plugin.add("draggable", "stack", { start: function (e, s, i) { var o, n = i.options, r = t.makeArray(t(n.stack)).sort(function (e, s) { return (parseInt(t(e).css("zIndex"), 10) || 0) - (parseInt(t(s).css("zIndex"), 10) || 0) }); r.length && (o = parseInt(t(r[0]).css("zIndex"), 10) || 0, t(r).each(function (e) { t(this).css("zIndex", o + e) }), this.css("zIndex", o + r.length)) } }), t.ui.plugin.add("draggable", "zIndex", { start: function (e, s, i) { var o = t(s.helper), n = i.options; o.css("zIndex") && (n._zIndex = o.css("zIndex")), o.css("zIndex", n.zIndex) }, stop: function (e, s, i) { var o = i.options; o._zIndex && t(s.helper).css("zIndex", o._zIndex) } }), t.ui.draggable }) ? i.apply(e, o) : i) || (t.exports = n) } }]); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.auiplugin:split_aui.splitchunk.vendors--f29b9b9def', location = 'aui.chunk.25d29ac3a5db8655ba18--0c97ad24864d45f4b264.js' */ (window.__auiJsonp = window.__auiJsonp || []).push([["aui.splitchunk.vendors--f29b9b9def"], { zxTg: function (n, i, o) { } }]); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.auiplugin:split_jquery.ui.draggable', location = 'aui.chunk.1b0d9d56f8d99019cafe--aa5a8d7e57114e761f21.js' */ (window.__auiJsonp = window.__auiJsonp || []).push([["jquery.ui.draggable"], { duoV: function (u, e, i) { "use strict"; Object.defineProperty(e, "__esModule", {value: !0}), i("zxTg"), i("z+ct"), e.default = "jquery", u.exports = e.default } }, [["duoV", "runtime", "aui.splitchunk.vendors--20a97d6a33", "aui.splitchunk.vendors--d18e3cafa7", "aui.splitchunk.vendors--db57146687", "aui.splitchunk.vendors--351ae504d7", "aui.splitchunk.vendors--9c8c8c1546", "aui.splitchunk.vendors--51504ebf10", "aui.splitchunk.vendors--06bc6ae5d7", "aui.splitchunk.vendors--f29b9b9def", "aui.splitchunk.0d131bcbf1"]]]); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.auiplugin:split_jquery.ui.mouse', location = 'aui.chunk.68a1dee565d36474fea0--0c4f237e5c34bca7a667.js' */ (window.__auiJsonp = window.__auiJsonp || []).push([["jquery.ui.mouse"], { mz4i: function (u, e, i) { "use strict"; Object.defineProperty(e, "__esModule", {value: !0}), i("XPYc"), e.default = "jquery", u.exports = e.default } }, [["mz4i", "runtime", "aui.splitchunk.vendors--20a97d6a33", "aui.splitchunk.vendors--d18e3cafa7", "aui.splitchunk.vendors--db57146687", "aui.splitchunk.0d131bcbf1"]]]); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.auiplugin:split_aui.splitchunk.vendors--c7d6d1dc80', location = 'aui.chunk.a7fc0d5b8767e9b40315--bdd2730e8619a65df894.js' */ (window.__auiJsonp = window.__auiJsonp || []).push([["aui.splitchunk.vendors--c7d6d1dc80"], { "2NYx": function (t, i, o) { var e, n, l; n = [o("oDIA"), o("O+lX")], void 0 === (l = "function" == typeof (e = function (t) { return function () { var i, o = Math.max, e = Math.abs, n = /left|center|right/, l = /top|center|bottom/, s = /[\+\-]\d+(\.[\d]+)?%?/, f = /^\w+/, h = /%$/, r = t.fn.position; function p(t, i, o) { return [parseFloat(t[0]) * (h.test(t[0]) ? i / 100 : 1), parseFloat(t[1]) * (h.test(t[1]) ? o / 100 : 1)] } function c(i, o) { return parseInt(t.css(i, o), 10) || 0 } t.position = { scrollbarWidth: function () { if (void 0 !== i) return i; var o, e, n = t("
    "), l = n.children()[0]; return t("body").append(n), o = l.offsetWidth, n.css("overflow", "scroll"), o === (e = l.offsetWidth) && (e = n[0].clientWidth), n.remove(), i = o - e }, getScrollInfo: function (i) { var o = i.isWindow || i.isDocument ? "" : i.element.css("overflow-x"), e = i.isWindow || i.isDocument ? "" : i.element.css("overflow-y"), n = "scroll" === o || "auto" === o && i.width < i.element[0].scrollWidth; return { width: "scroll" === e || "auto" === e && i.height < i.element[0].scrollHeight ? t.position.scrollbarWidth() : 0, height: n ? t.position.scrollbarWidth() : 0 } }, getWithinInfo: function (i) { var o = t(i || window), e = t.isWindow(o[0]), n = !!o[0] && 9 === o[0].nodeType; return { element: o, isWindow: e, isDocument: n, offset: e || n ? {left: 0, top: 0} : t(i).offset(), scrollLeft: o.scrollLeft(), scrollTop: o.scrollTop(), width: o.outerWidth(), height: o.outerHeight() } } }, t.fn.position = function (i) { if (!i || !i.of) return r.apply(this, arguments); i = t.extend({}, i); var h, a, d, g, u, m, w = t(i.of), W = t.position.getWithinInfo(i.within), v = t.position.getScrollInfo(W), y = (i.collision || "flip").split(" "), H = {}; return m = function (i) { var o = i[0]; return 9 === o.nodeType ? { width: i.width(), height: i.height(), offset: {top: 0, left: 0} } : t.isWindow(o) ? { width: i.width(), height: i.height(), offset: {top: i.scrollTop(), left: i.scrollLeft()} } : o.preventDefault ? { width: 0, height: 0, offset: {top: o.pageY, left: o.pageX} } : {width: i.outerWidth(), height: i.outerHeight(), offset: i.offset()} }(w), w[0].preventDefault && (i.at = "left top"), a = m.width, d = m.height, g = m.offset, u = t.extend({}, g), t.each(["my", "at"], function () { var t, o, e = (i[this] || "").split(" "); 1 === e.length && (e = n.test(e[0]) ? e.concat(["center"]) : l.test(e[0]) ? ["center"].concat(e) : ["center", "center"]), e[0] = n.test(e[0]) ? e[0] : "center", e[1] = l.test(e[1]) ? e[1] : "center", t = s.exec(e[0]), o = s.exec(e[1]), H[this] = [t ? t[0] : 0, o ? o[0] : 0], i[this] = [f.exec(e[0])[0], f.exec(e[1])[0]] }), 1 === y.length && (y[1] = y[0]), "right" === i.at[0] ? u.left += a : "center" === i.at[0] && (u.left += a / 2), "bottom" === i.at[1] ? u.top += d : "center" === i.at[1] && (u.top += d / 2), h = p(H.at, a, d), u.left += h[0], u.top += h[1], this.each(function () { var n, l, s = t(this), f = s.outerWidth(), r = s.outerHeight(), m = c(this, "marginLeft"), x = c(this, "marginTop"), b = f + m + c(this, "marginRight") + v.width, T = r + x + c(this, "marginBottom") + v.height, L = t.extend({}, u), P = p(H.my, s.outerWidth(), s.outerHeight()); "right" === i.my[0] ? L.left -= f : "center" === i.my[0] && (L.left -= f / 2), "bottom" === i.my[1] ? L.top -= r : "center" === i.my[1] && (L.top -= r / 2), L.left += P[0], L.top += P[1], n = { marginLeft: m, marginTop: x }, t.each(["left", "top"], function (o, e) { t.ui.position[y[o]] && t.ui.position[y[o]][e](L, { targetWidth: a, targetHeight: d, elemWidth: f, elemHeight: r, collisionPosition: n, collisionWidth: b, collisionHeight: T, offset: [h[0] + P[0], h[1] + P[1]], my: i.my, at: i.at, within: W, elem: s }) }), i.using && (l = function (t) { var n = g.left - L.left, l = n + a - f, h = g.top - L.top, p = h + d - r, c = { target: {element: w, left: g.left, top: g.top, width: a, height: d}, element: {element: s, left: L.left, top: L.top, width: f, height: r}, horizontal: l < 0 ? "left" : n > 0 ? "right" : "center", vertical: p < 0 ? "top" : h > 0 ? "bottom" : "middle" }; a < f && e(n + l) < a && (c.horizontal = "center"), d < r && e(h + p) < d && (c.vertical = "middle"), o(e(n), e(l)) > o(e(h), e(p)) ? c.important = "horizontal" : c.important = "vertical", i.using.call(this, t, c) }), s.offset(t.extend(L, {using: l})) }) }, t.ui.position = { fit: { left: function (t, i) { var e, n = i.within, l = n.isWindow ? n.scrollLeft : n.offset.left, s = n.width, f = t.left - i.collisionPosition.marginLeft, h = l - f, r = f + i.collisionWidth - s - l; i.collisionWidth > s ? h > 0 && r <= 0 ? (e = t.left + h + i.collisionWidth - s - l, t.left += h - e) : t.left = r > 0 && h <= 0 ? l : h > r ? l + s - i.collisionWidth : l : h > 0 ? t.left += h : r > 0 ? t.left -= r : t.left = o(t.left - f, t.left) }, top: function (t, i) { var e, n = i.within, l = n.isWindow ? n.scrollTop : n.offset.top, s = i.within.height, f = t.top - i.collisionPosition.marginTop, h = l - f, r = f + i.collisionHeight - s - l; i.collisionHeight > s ? h > 0 && r <= 0 ? (e = t.top + h + i.collisionHeight - s - l, t.top += h - e) : t.top = r > 0 && h <= 0 ? l : h > r ? l + s - i.collisionHeight : l : h > 0 ? t.top += h : r > 0 ? t.top -= r : t.top = o(t.top - f, t.top) } }, flip: { left: function (t, i) { var o, n, l = i.within, s = l.offset.left + l.scrollLeft, f = l.width, h = l.isWindow ? l.scrollLeft : l.offset.left, r = t.left - i.collisionPosition.marginLeft, p = r - h, c = r + i.collisionWidth - f - h, a = "left" === i.my[0] ? -i.elemWidth : "right" === i.my[0] ? i.elemWidth : 0, d = "left" === i.at[0] ? i.targetWidth : "right" === i.at[0] ? -i.targetWidth : 0, g = -2 * i.offset[0]; p < 0 ? ((o = t.left + a + d + g + i.collisionWidth - f - s) < 0 || o < e(p)) && (t.left += a + d + g) : c > 0 && ((n = t.left - i.collisionPosition.marginLeft + a + d + g - h) > 0 || e(n) < c) && (t.left += a + d + g) }, top: function (t, i) { var o, n, l = i.within, s = l.offset.top + l.scrollTop, f = l.height, h = l.isWindow ? l.scrollTop : l.offset.top, r = t.top - i.collisionPosition.marginTop, p = r - h, c = r + i.collisionHeight - f - h, a = "top" === i.my[1] ? -i.elemHeight : "bottom" === i.my[1] ? i.elemHeight : 0, d = "top" === i.at[1] ? i.targetHeight : "bottom" === i.at[1] ? -i.targetHeight : 0, g = -2 * i.offset[1]; p < 0 ? ((n = t.top + a + d + g + i.collisionHeight - f - s) < 0 || n < e(p)) && (t.top += a + d + g) : c > 0 && ((o = t.top - i.collisionPosition.marginTop + a + d + g - h) > 0 || e(o) < c) && (t.top += a + d + g) } }, flipfit: { left: function () { t.ui.position.flip.left.apply(this, arguments), t.ui.position.fit.left.apply(this, arguments) }, top: function () { t.ui.position.flip.top.apply(this, arguments), t.ui.position.fit.top.apply(this, arguments) } } } }(), t.ui.position }) ? e.apply(i, n) : e) || (t.exports = l) } }]); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.auiplugin:split_jquery.ui.position', location = 'aui.chunk.ab65226d563e87915b4b--916c22fa0184fe28dbdb.js' */ (window.__auiJsonp = window.__auiJsonp || []).push([["jquery.ui.position"], { "7ih8": function (i, u, e) { "use strict"; Object.defineProperty(u, "__esModule", {value: !0}), e("2NYx"), u.default = "jquery", i.exports = u.default } }, [["7ih8", "runtime", "aui.splitchunk.vendors--20a97d6a33", "aui.splitchunk.vendors--c7d6d1dc80", "aui.splitchunk.0d131bcbf1"]]]); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.auiplugin:split_aui.splitchunk.vendors--7c76061134', location = 'aui.chunk.ec257084264be2137aff--47070070a0c5ff93b8b0.js' */ (window.__auiJsonp = window.__auiJsonp || []).push([["aui.splitchunk.vendors--7c76061134"], { TRfs: function (e, t, s) { }, iCCw: function (e, t, s) { var l, i, n; i = [s("oDIA"), s("XPYc"), s("O+lX"), s("yIBB")], void 0 === (n = "function" == typeof (l = function (e) { return e.widget("ui.selectable", e.ui.mouse, { version: "1.12.1", options: { appendTo: "body", autoRefresh: !0, distance: 0, filter: "*", tolerance: "touch", selected: null, selecting: null, start: null, stop: null, unselected: null, unselecting: null }, _create: function () { var t = this; this._addClass("ui-selectable"), this.dragged = !1, this.refresh = function () { t.elementPos = e(t.element[0]).offset(), t.selectees = e(t.options.filter, t.element[0]), t._addClass(t.selectees, "ui-selectee"), t.selectees.each(function () { var s = e(this), l = s.offset(), i = {left: l.left - t.elementPos.left, top: l.top - t.elementPos.top}; e.data(this, "selectable-item", { element: this, $element: s, left: i.left, top: i.top, right: i.left + s.outerWidth(), bottom: i.top + s.outerHeight(), startselected: !1, selected: s.hasClass("ui-selected"), selecting: s.hasClass("ui-selecting"), unselecting: s.hasClass("ui-unselecting") }) }) }, this.refresh(), this._mouseInit(), this.helper = e("
    "), this._addClass(this.helper, "ui-selectable-helper") }, _destroy: function () { this.selectees.removeData("selectable-item"), this._mouseDestroy() }, _mouseStart: function (t) { var s = this, l = this.options; this.opos = [t.pageX, t.pageY], this.elementPos = e(this.element[0]).offset(), this.options.disabled || (this.selectees = e(l.filter, this.element[0]), this._trigger("start", t), e(l.appendTo).append(this.helper), this.helper.css({ left: t.pageX, top: t.pageY, width: 0, height: 0 }), l.autoRefresh && this.refresh(), this.selectees.filter(".ui-selected").each(function () { var l = e.data(this, "selectable-item"); l.startselected = !0, t.metaKey || t.ctrlKey || (s._removeClass(l.$element, "ui-selected"), l.selected = !1, s._addClass(l.$element, "ui-unselecting"), l.unselecting = !0, s._trigger("unselecting", t, {unselecting: l.element})) }), e(t.target).parents().addBack().each(function () { var l, i = e.data(this, "selectable-item"); if (i) return l = !t.metaKey && !t.ctrlKey || !i.$element.hasClass("ui-selected"), s._removeClass(i.$element, l ? "ui-unselecting" : "ui-selected")._addClass(i.$element, l ? "ui-selecting" : "ui-unselecting"), i.unselecting = !l, i.selecting = l, i.selected = l, l ? s._trigger("selecting", t, {selecting: i.element}) : s._trigger("unselecting", t, {unselecting: i.element}), !1 })) }, _mouseDrag: function (t) { if (this.dragged = !0, !this.options.disabled) { var s, l = this, i = this.options, n = this.opos[0], c = this.opos[1], a = t.pageX, o = t.pageY; return n > a && (s = a, a = n, n = s), c > o && (s = o, o = c, c = s), this.helper.css({ left: n, top: c, width: a - n, height: o - c }), this.selectees.each(function () { var s = e.data(this, "selectable-item"), r = !1, u = {}; s && s.element !== l.element[0] && (u.left = s.left + l.elementPos.left, u.right = s.right + l.elementPos.left, u.top = s.top + l.elementPos.top, u.bottom = s.bottom + l.elementPos.top, "touch" === i.tolerance ? r = !(u.left > a || u.right < n || u.top > o || u.bottom < c) : "fit" === i.tolerance && (r = u.left > n && u.right < a && u.top > c && u.bottom < o), r ? (s.selected && (l._removeClass(s.$element, "ui-selected"), s.selected = !1), s.unselecting && (l._removeClass(s.$element, "ui-unselecting"), s.unselecting = !1), s.selecting || (l._addClass(s.$element, "ui-selecting"), s.selecting = !0, l._trigger("selecting", t, {selecting: s.element}))) : (s.selecting && ((t.metaKey || t.ctrlKey) && s.startselected ? (l._removeClass(s.$element, "ui-selecting"), s.selecting = !1, l._addClass(s.$element, "ui-selected"), s.selected = !0) : (l._removeClass(s.$element, "ui-selecting"), s.selecting = !1, s.startselected && (l._addClass(s.$element, "ui-unselecting"), s.unselecting = !0), l._trigger("unselecting", t, {unselecting: s.element}))), s.selected && (t.metaKey || t.ctrlKey || s.startselected || (l._removeClass(s.$element, "ui-selected"), s.selected = !1, l._addClass(s.$element, "ui-unselecting"), s.unselecting = !0, l._trigger("unselecting", t, {unselecting: s.element}))))) }), !1 } }, _mouseStop: function (t) { var s = this; return this.dragged = !1, e(".ui-unselecting", this.element[0]).each(function () { var l = e.data(this, "selectable-item"); s._removeClass(l.$element, "ui-unselecting"), l.unselecting = !1, l.startselected = !1, s._trigger("unselected", t, {unselected: l.element}) }), e(".ui-selecting", this.element[0]).each(function () { var l = e.data(this, "selectable-item"); s._removeClass(l.$element, "ui-selecting")._addClass(l.$element, "ui-selected"), l.selecting = !1, l.selected = !0, l.startselected = !0, s._trigger("selected", t, {selected: l.element}) }), this._trigger("stop", t), this.helper.remove(), !1 } }) }) ? l.apply(t, i) : l) || (e.exports = n) } }]); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.auiplugin:split_jquery.ui.selectable', location = 'aui.chunk.ef62ae6fe391b413331b--c41c289ed6f125902a34.js' */ (window.__auiJsonp = window.__auiJsonp || []).push([["jquery.ui.selectable"], { FvNQ: function (u, e, i) { "use strict"; Object.defineProperty(e, "__esModule", {value: !0}), i("TRfs"), i("iCCw"), e.default = "jquery", u.exports = e.default } }, [["FvNQ", "runtime", "aui.splitchunk.vendors--20a97d6a33", "aui.splitchunk.vendors--d18e3cafa7", "aui.splitchunk.vendors--db57146687", "aui.splitchunk.vendors--7c76061134", "aui.splitchunk.0d131bcbf1"]]]); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.auiplugin:split_aui.splitchunk.vendors--85718a7eef', location = 'aui.chunk.ae3c4b97fc5a1976668b--c6988b4dfd3c4a3d1198.js' */ (window.__auiJsonp = window.__auiJsonp || []).push([["aui.splitchunk.vendors--85718a7eef"], { "2V+C": function (t, i, e) { }, XnJT: function (t, i, e) { var s, h, n; h = [e("oDIA"), e("XPYc"), e("zq/Y"), e("lSwU"), e("O+lX"), e("yIBB")], void 0 === (n = "function" == typeof (s = function (t) { return t.widget("ui.resizable", t.ui.mouse, { version: "1.12.1", widgetEventPrefix: "resize", options: { alsoResize: !1, animate: !1, animateDuration: "slow", animateEasing: "swing", aspectRatio: !1, autoHide: !1, classes: {"ui-resizable-se": "ui-icon ui-icon-gripsmall-diagonal-se"}, containment: !1, ghost: !1, grid: !1, handles: "e,s,se", helper: !1, maxHeight: null, maxWidth: null, minHeight: 10, minWidth: 10, zIndex: 90, resize: null, start: null, stop: null }, _num: function (t) { return parseFloat(t) || 0 }, _isNumber: function (t) { return !isNaN(parseFloat(t)) }, _hasScroll: function (i, e) { if ("hidden" === t(i).css("overflow")) return !1; var s, h = e && "left" === e ? "scrollLeft" : "scrollTop"; return i[h] > 0 || (i[h] = 1, s = i[h] > 0, i[h] = 0, s) }, _create: function () { var i, e = this.options, s = this; this._addClass("ui-resizable"), t.extend(this, { _aspectRatio: !!e.aspectRatio, aspectRatio: e.aspectRatio, originalElement: this.element, _proportionallyResizeElements: [], _helper: e.helper || e.ghost || e.animate ? e.helper || "ui-resizable-helper" : null }), this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i) && (this.element.wrap(t("
    ").css({ position: this.element.css("position"), width: this.element.outerWidth(), height: this.element.outerHeight(), top: this.element.css("top"), left: this.element.css("left") })), this.element = this.element.parent().data("ui-resizable", this.element.resizable("instance")), this.elementIsWrapper = !0, i = { marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom"), marginLeft: this.originalElement.css("marginLeft") }, this.element.css(i), this.originalElement.css("margin", 0), this.originalResizeStyle = this.originalElement.css("resize"), this.originalElement.css("resize", "none"), this._proportionallyResizeElements.push(this.originalElement.css({ position: "static", zoom: 1, display: "block" })), this.originalElement.css(i), this._proportionallyResize()), this._setupHandles(), e.autoHide && t(this.element).on("mouseenter", function () { e.disabled || (s._removeClass("ui-resizable-autohide"), s._handles.show()) }).on("mouseleave", function () { e.disabled || s.resizing || (s._addClass("ui-resizable-autohide"), s._handles.hide()) }), this._mouseInit() }, _destroy: function () { this._mouseDestroy(); var i, e = function (i) { t(i).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove() }; return this.elementIsWrapper && (e(this.element), i = this.element, this.originalElement.css({ position: i.css("position"), width: i.outerWidth(), height: i.outerHeight(), top: i.css("top"), left: i.css("left") }).insertAfter(i), i.remove()), this.originalElement.css("resize", this.originalResizeStyle), e(this.originalElement), this }, _setOption: function (t, i) { switch (this._super(t, i), t) { case"handles": this._removeHandles(), this._setupHandles() } }, _setupHandles: function () { var i, e, s, h, n, o = this.options, a = this; if (this.handles = o.handles || (t(".ui-resizable-handle", this.element).length ? { n: ".ui-resizable-n", e: ".ui-resizable-e", s: ".ui-resizable-s", w: ".ui-resizable-w", se: ".ui-resizable-se", sw: ".ui-resizable-sw", ne: ".ui-resizable-ne", nw: ".ui-resizable-nw" } : "e,s,se"), this._handles = t(), this.handles.constructor === String) for ("all" === this.handles && (this.handles = "n,e,s,w,se,sw,ne,nw"), s = this.handles.split(","), this.handles = {}, e = 0; e < s.length; e++) h = "ui-resizable-" + (i = t.trim(s[e])), n = t("
    "), this._addClass(n, "ui-resizable-handle " + h), n.css({zIndex: o.zIndex}), this.handles[i] = ".ui-resizable-" + i, this.element.append(n); this._renderAxis = function (i) { var e, s, h, n; for (e in i = i || this.element, this.handles) this.handles[e].constructor === String ? this.handles[e] = this.element.children(this.handles[e]).first().show() : (this.handles[e].jquery || this.handles[e].nodeType) && (this.handles[e] = t(this.handles[e]), this._on(this.handles[e], {mousedown: a._mouseDown})), this.elementIsWrapper && this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i) && (s = t(this.handles[e], this.element), n = /sw|ne|nw|se|n|s/.test(e) ? s.outerHeight() : s.outerWidth(), h = ["padding", /ne|nw|n/.test(e) ? "Top" : /se|sw|s/.test(e) ? "Bottom" : /^e$/.test(e) ? "Right" : "Left"].join(""), i.css(h, n), this._proportionallyResize()), this._handles = this._handles.add(this.handles[e]) }, this._renderAxis(this.element), this._handles = this._handles.add(this.element.find(".ui-resizable-handle")), this._handles.disableSelection(), this._handles.on("mouseover", function () { a.resizing || (this.className && (n = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)), a.axis = n && n[1] ? n[1] : "se") }), o.autoHide && (this._handles.hide(), this._addClass("ui-resizable-autohide")) }, _removeHandles: function () { this._handles.remove() }, _mouseCapture: function (i) { var e, s, h = !1; for (e in this.handles) ((s = t(this.handles[e])[0]) === i.target || t.contains(s, i.target)) && (h = !0); return !this.options.disabled && h }, _mouseStart: function (i) { var e, s, h, n = this.options, o = this.element; return this.resizing = !0, this._renderProxy(), e = this._num(this.helper.css("left")), s = this._num(this.helper.css("top")), n.containment && (e += t(n.containment).scrollLeft() || 0, s += t(n.containment).scrollTop() || 0), this.offset = this.helper.offset(), this.position = { left: e, top: s }, this.size = this._helper ? { width: this.helper.width(), height: this.helper.height() } : { width: o.width(), height: o.height() }, this.originalSize = this._helper ? { width: o.outerWidth(), height: o.outerHeight() } : {width: o.width(), height: o.height()}, this.sizeDiff = { width: o.outerWidth() - o.width(), height: o.outerHeight() - o.height() }, this.originalPosition = {left: e, top: s}, this.originalMousePosition = { left: i.pageX, top: i.pageY }, this.aspectRatio = "number" == typeof n.aspectRatio ? n.aspectRatio : this.originalSize.width / this.originalSize.height || 1, h = t(".ui-resizable-" + this.axis).css("cursor"), t("body").css("cursor", "auto" === h ? this.axis + "-resize" : h), this._addClass("ui-resizable-resizing"), this._propagate("start", i), !0 }, _mouseDrag: function (i) { var e, s, h = this.originalMousePosition, n = this.axis, o = i.pageX - h.left || 0, a = i.pageY - h.top || 0, l = this._change[n]; return this._updatePrevProperties(), !!l && (e = l.apply(this, [i, o, a]), this._updateVirtualBoundaries(i.shiftKey), (this._aspectRatio || i.shiftKey) && (e = this._updateRatio(e, i)), e = this._respectSize(e, i), this._updateCache(e), this._propagate("resize", i), s = this._applyChanges(), !this._helper && this._proportionallyResizeElements.length && this._proportionallyResize(), t.isEmptyObject(s) || (this._updatePrevProperties(), this._trigger("resize", i, this.ui()), this._applyChanges()), !1) }, _mouseStop: function (i) { this.resizing = !1; var e, s, h, n, o, a, l, r = this.options; return this._helper && (h = (s = (e = this._proportionallyResizeElements).length && /textarea/i.test(e[0].nodeName)) && this._hasScroll(e[0], "left") ? 0 : this.sizeDiff.height, n = s ? 0 : this.sizeDiff.width, o = { width: this.helper.width() - n, height: this.helper.height() - h }, a = parseFloat(this.element.css("left")) + (this.position.left - this.originalPosition.left) || null, l = parseFloat(this.element.css("top")) + (this.position.top - this.originalPosition.top) || null, r.animate || this.element.css(t.extend(o, { top: l, left: a })), this.helper.height(this.size.height), this.helper.width(this.size.width), this._helper && !r.animate && this._proportionallyResize()), t("body").css("cursor", "auto"), this._removeClass("ui-resizable-resizing"), this._propagate("stop", i), this._helper && this.helper.remove(), !1 }, _updatePrevProperties: function () { this.prevPosition = { top: this.position.top, left: this.position.left }, this.prevSize = {width: this.size.width, height: this.size.height} }, _applyChanges: function () { var t = {}; return this.position.top !== this.prevPosition.top && (t.top = this.position.top + "px"), this.position.left !== this.prevPosition.left && (t.left = this.position.left + "px"), this.size.width !== this.prevSize.width && (t.width = this.size.width + "px"), this.size.height !== this.prevSize.height && (t.height = this.size.height + "px"), this.helper.css(t), t }, _updateVirtualBoundaries: function (t) { var i, e, s, h, n, o = this.options; n = { minWidth: this._isNumber(o.minWidth) ? o.minWidth : 0, maxWidth: this._isNumber(o.maxWidth) ? o.maxWidth : 1 / 0, minHeight: this._isNumber(o.minHeight) ? o.minHeight : 0, maxHeight: this._isNumber(o.maxHeight) ? o.maxHeight : 1 / 0 }, (this._aspectRatio || t) && (i = n.minHeight * this.aspectRatio, s = n.minWidth / this.aspectRatio, e = n.maxHeight * this.aspectRatio, h = n.maxWidth / this.aspectRatio, i > n.minWidth && (n.minWidth = i), s > n.minHeight && (n.minHeight = s), e < n.maxWidth && (n.maxWidth = e), h < n.maxHeight && (n.maxHeight = h)), this._vBoundaries = n }, _updateCache: function (t) { this.offset = this.helper.offset(), this._isNumber(t.left) && (this.position.left = t.left), this._isNumber(t.top) && (this.position.top = t.top), this._isNumber(t.height) && (this.size.height = t.height), this._isNumber(t.width) && (this.size.width = t.width) }, _updateRatio: function (t) { var i = this.position, e = this.size, s = this.axis; return this._isNumber(t.height) ? t.width = t.height * this.aspectRatio : this._isNumber(t.width) && (t.height = t.width / this.aspectRatio), "sw" === s && (t.left = i.left + (e.width - t.width), t.top = null), "nw" === s && (t.top = i.top + (e.height - t.height), t.left = i.left + (e.width - t.width)), t }, _respectSize: function (t) { var i = this._vBoundaries, e = this.axis, s = this._isNumber(t.width) && i.maxWidth && i.maxWidth < t.width, h = this._isNumber(t.height) && i.maxHeight && i.maxHeight < t.height, n = this._isNumber(t.width) && i.minWidth && i.minWidth > t.width, o = this._isNumber(t.height) && i.minHeight && i.minHeight > t.height, a = this.originalPosition.left + this.originalSize.width, l = this.originalPosition.top + this.originalSize.height, r = /sw|nw|w/.test(e), p = /nw|ne|n/.test(e); return n && (t.width = i.minWidth), o && (t.height = i.minHeight), s && (t.width = i.maxWidth), h && (t.height = i.maxHeight), n && r && (t.left = a - i.minWidth), s && r && (t.left = a - i.maxWidth), o && p && (t.top = l - i.minHeight), h && p && (t.top = l - i.maxHeight), t.width || t.height || t.left || !t.top ? t.width || t.height || t.top || !t.left || (t.left = null) : t.top = null, t }, _getPaddingPlusBorderDimensions: function (t) { for (var i = 0, e = [], s = [t.css("borderTopWidth"), t.css("borderRightWidth"), t.css("borderBottomWidth"), t.css("borderLeftWidth")], h = [t.css("paddingTop"), t.css("paddingRight"), t.css("paddingBottom"), t.css("paddingLeft")]; i < 4; i++) e[i] = parseFloat(s[i]) || 0, e[i] += parseFloat(h[i]) || 0; return {height: e[0] + e[2], width: e[1] + e[3]} }, _proportionallyResize: function () { if (this._proportionallyResizeElements.length) for (var t, i = 0, e = this.helper || this.element; i < this._proportionallyResizeElements.length; i++) t = this._proportionallyResizeElements[i], this.outerDimensions || (this.outerDimensions = this._getPaddingPlusBorderDimensions(t)), t.css({ height: e.height() - this.outerDimensions.height || 0, width: e.width() - this.outerDimensions.width || 0 }) }, _renderProxy: function () { var i = this.element, e = this.options; this.elementOffset = i.offset(), this._helper ? (this.helper = this.helper || t("
    "), this._addClass(this.helper, this._helper), this.helper.css({ width: this.element.outerWidth(), height: this.element.outerHeight(), position: "absolute", left: this.elementOffset.left + "px", top: this.elementOffset.top + "px", zIndex: ++e.zIndex }), this.helper.appendTo("body").disableSelection()) : this.helper = this.element }, _change: { e: function (t, i) { return {width: this.originalSize.width + i} }, w: function (t, i) { var e = this.originalSize; return {left: this.originalPosition.left + i, width: e.width - i} }, n: function (t, i, e) { var s = this.originalSize; return {top: this.originalPosition.top + e, height: s.height - e} }, s: function (t, i, e) { return {height: this.originalSize.height + e} }, se: function (i, e, s) { return t.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [i, e, s])) }, sw: function (i, e, s) { return t.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [i, e, s])) }, ne: function (i, e, s) { return t.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [i, e, s])) }, nw: function (i, e, s) { return t.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [i, e, s])) } }, _propagate: function (i, e) { t.ui.plugin.call(this, i, [e, this.ui()]), "resize" !== i && this._trigger(i, e, this.ui()) }, plugins: {}, ui: function () { return { originalElement: this.originalElement, element: this.element, helper: this.helper, position: this.position, size: this.size, originalSize: this.originalSize, originalPosition: this.originalPosition } } }), t.ui.plugin.add("resizable", "animate", { stop: function (i) { var e = t(this).resizable("instance"), s = e.options, h = e._proportionallyResizeElements, n = h.length && /textarea/i.test(h[0].nodeName), o = n && e._hasScroll(h[0], "left") ? 0 : e.sizeDiff.height, a = n ? 0 : e.sizeDiff.width, l = {width: e.size.width - a, height: e.size.height - o}, r = parseFloat(e.element.css("left")) + (e.position.left - e.originalPosition.left) || null, p = parseFloat(e.element.css("top")) + (e.position.top - e.originalPosition.top) || null; e.element.animate(t.extend(l, p && r ? {top: p, left: r} : {}), { duration: s.animateDuration, easing: s.animateEasing, step: function () { var s = { width: parseFloat(e.element.css("width")), height: parseFloat(e.element.css("height")), top: parseFloat(e.element.css("top")), left: parseFloat(e.element.css("left")) }; h && h.length && t(h[0]).css({ width: s.width, height: s.height }), e._updateCache(s), e._propagate("resize", i) } }) } }), t.ui.plugin.add("resizable", "containment", { start: function () { var i, e, s, h, n, o, a, l = t(this).resizable("instance"), r = l.options, p = l.element, d = r.containment, g = d instanceof t ? d.get(0) : /parent/.test(d) ? p.parent().get(0) : d; g && (l.containerElement = t(g), /document/.test(d) || d === document ? (l.containerOffset = { left: 0, top: 0 }, l.containerPosition = {left: 0, top: 0}, l.parentData = { element: t(document), left: 0, top: 0, width: t(document).width(), height: t(document).height() || document.body.parentNode.scrollHeight }) : (i = t(g), e = [], t(["Top", "Right", "Left", "Bottom"]).each(function (t, s) { e[t] = l._num(i.css("padding" + s)) }), l.containerOffset = i.offset(), l.containerPosition = i.position(), l.containerSize = { height: i.innerHeight() - e[3], width: i.innerWidth() - e[1] }, s = l.containerOffset, h = l.containerSize.height, n = l.containerSize.width, o = l._hasScroll(g, "left") ? g.scrollWidth : n, a = l._hasScroll(g) ? g.scrollHeight : h, l.parentData = { element: g, left: s.left, top: s.top, width: o, height: a })) }, resize: function (i) { var e, s, h, n, o = t(this).resizable("instance"), a = o.options, l = o.containerOffset, r = o.position, p = o._aspectRatio || i.shiftKey, d = {top: 0, left: 0}, g = o.containerElement, u = !0; g[0] !== document && /static/.test(g.css("position")) && (d = l), r.left < (o._helper ? l.left : 0) && (o.size.width = o.size.width + (o._helper ? o.position.left - l.left : o.position.left - d.left), p && (o.size.height = o.size.width / o.aspectRatio, u = !1), o.position.left = a.helper ? l.left : 0), r.top < (o._helper ? l.top : 0) && (o.size.height = o.size.height + (o._helper ? o.position.top - l.top : o.position.top), p && (o.size.width = o.size.height * o.aspectRatio, u = !1), o.position.top = o._helper ? l.top : 0), h = o.containerElement.get(0) === o.element.parent().get(0), n = /relative|absolute/.test(o.containerElement.css("position")), h && n ? (o.offset.left = o.parentData.left + o.position.left, o.offset.top = o.parentData.top + o.position.top) : (o.offset.left = o.element.offset().left, o.offset.top = o.element.offset().top), e = Math.abs(o.sizeDiff.width + (o._helper ? o.offset.left - d.left : o.offset.left - l.left)), s = Math.abs(o.sizeDiff.height + (o._helper ? o.offset.top - d.top : o.offset.top - l.top)), e + o.size.width >= o.parentData.width && (o.size.width = o.parentData.width - e, p && (o.size.height = o.size.width / o.aspectRatio, u = !1)), s + o.size.height >= o.parentData.height && (o.size.height = o.parentData.height - s, p && (o.size.width = o.size.height * o.aspectRatio, u = !1)), u || (o.position.left = o.prevPosition.left, o.position.top = o.prevPosition.top, o.size.width = o.prevSize.width, o.size.height = o.prevSize.height) }, stop: function () { var i = t(this).resizable("instance"), e = i.options, s = i.containerOffset, h = i.containerPosition, n = i.containerElement, o = t(i.helper), a = o.offset(), l = o.outerWidth() - i.sizeDiff.width, r = o.outerHeight() - i.sizeDiff.height; i._helper && !e.animate && /relative/.test(n.css("position")) && t(this).css({ left: a.left - h.left - s.left, width: l, height: r }), i._helper && !e.animate && /static/.test(n.css("position")) && t(this).css({ left: a.left - h.left - s.left, width: l, height: r }) } }), t.ui.plugin.add("resizable", "alsoResize", { start: function () { var i = t(this).resizable("instance").options; t(i.alsoResize).each(function () { var i = t(this); i.data("ui-resizable-alsoresize", { width: parseFloat(i.width()), height: parseFloat(i.height()), left: parseFloat(i.css("left")), top: parseFloat(i.css("top")) }) }) }, resize: function (i, e) { var s = t(this).resizable("instance"), h = s.options, n = s.originalSize, o = s.originalPosition, a = { height: s.size.height - n.height || 0, width: s.size.width - n.width || 0, top: s.position.top - o.top || 0, left: s.position.left - o.left || 0 }; t(h.alsoResize).each(function () { var i = t(this), s = t(this).data("ui-resizable-alsoresize"), h = {}, n = i.parents(e.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"]; t.each(n, function (t, i) { var e = (s[i] || 0) + (a[i] || 0); e && e >= 0 && (h[i] = e || null) }), i.css(h) }) }, stop: function () { t(this).removeData("ui-resizable-alsoresize") } }), t.ui.plugin.add("resizable", "ghost", { start: function () { var i = t(this).resizable("instance"), e = i.size; i.ghost = i.originalElement.clone(), i.ghost.css({ opacity: .25, display: "block", position: "relative", height: e.height, width: e.width, margin: 0, left: 0, top: 0 }), i._addClass(i.ghost, "ui-resizable-ghost"), !1 !== t.uiBackCompat && "string" == typeof i.options.ghost && i.ghost.addClass(this.options.ghost), i.ghost.appendTo(i.helper) }, resize: function () { var i = t(this).resizable("instance"); i.ghost && i.ghost.css({position: "relative", height: i.size.height, width: i.size.width}) }, stop: function () { var i = t(this).resizable("instance"); i.ghost && i.helper && i.helper.get(0).removeChild(i.ghost.get(0)) } }), t.ui.plugin.add("resizable", "grid", { resize: function () { var i, e = t(this).resizable("instance"), s = e.options, h = e.size, n = e.originalSize, o = e.originalPosition, a = e.axis, l = "number" == typeof s.grid ? [s.grid, s.grid] : s.grid, r = l[0] || 1, p = l[1] || 1, d = Math.round((h.width - n.width) / r) * r, g = Math.round((h.height - n.height) / p) * p, u = n.width + d, f = n.height + g, c = s.maxWidth && s.maxWidth < u, m = s.maxHeight && s.maxHeight < f, z = s.minWidth && s.minWidth > u, w = s.minHeight && s.minHeight > f; s.grid = l, z && (u += r), w && (f += p), c && (u -= r), m && (f -= p), /^(se|s|e)$/.test(a) ? (e.size.width = u, e.size.height = f) : /^(ne)$/.test(a) ? (e.size.width = u, e.size.height = f, e.position.top = o.top - g) : /^(sw)$/.test(a) ? (e.size.width = u, e.size.height = f, e.position.left = o.left - d) : ((f - p <= 0 || u - r <= 0) && (i = e._getPaddingPlusBorderDimensions(this)), f - p > 0 ? (e.size.height = f, e.position.top = o.top - g) : (f = p - i.height, e.size.height = f, e.position.top = o.top + n.height - f), u - r > 0 ? (e.size.width = u, e.position.left = o.left - d) : (u = r - i.width, e.size.width = u, e.position.left = o.left + n.width - u)) } }), t.ui.resizable }) ? s.apply(i, h) : s) || (t.exports = n) }, "zq/Y": function (t, i, e) { var s, h, n; h = [e("oDIA"), e("O+lX")], void 0 === (n = "function" == typeof (s = function (t) { return t.fn.extend({ disableSelection: function () { var t = "onselectstart" in document.createElement("div") ? "selectstart" : "mousedown"; return function () { return this.on(t + ".ui-disableSelection", function (t) { t.preventDefault() }) } }(), enableSelection: function () { return this.off(".ui-disableSelection") } }) }) ? s.apply(i, h) : s) || (t.exports = n) } }]); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.auiplugin:split_jquery.ui.resizable', location = 'aui.chunk.177c20ed1604b726476f--499e3a25af87fcbe3575.js' */ (window.__auiJsonp = window.__auiJsonp || []).push([["jquery.ui.resizable"], { kW2n: function (u, e, i) { "use strict"; Object.defineProperty(e, "__esModule", {value: !0}), i("2V+C"), i("XnJT"), e.default = "jquery", u.exports = e.default } }, [["kW2n", "runtime", "aui.splitchunk.vendors--20a97d6a33", "aui.splitchunk.vendors--d18e3cafa7", "aui.splitchunk.vendors--db57146687", "aui.splitchunk.vendors--9c8c8c1546", "aui.splitchunk.vendors--85718a7eef", "aui.splitchunk.0d131bcbf1"]]]); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.auiplugin:split_aui.splitchunk.vendors--825acd7236', location = 'aui.chunk.30cfc3ee698da81b10f9--0731854b3b05e314e279.js' */ (window.__auiJsonp = window.__auiJsonp || []).push([["aui.splitchunk.vendors--825acd7236"], { PTCr: function (e, t, i) { var s, o, n; o = [i("oDIA"), i("z+ct"), i("XPYc"), i("O+lX"), i("yIBB")], void 0 === (n = "function" == typeof (s = function (e) { e.widget("ui.droppable", { version: "1.12.1", widgetEventPrefix: "drop", options: { accept: "*", addClasses: !0, greedy: !1, scope: "default", tolerance: "intersect", activate: null, deactivate: null, drop: null, out: null, over: null }, _create: function () { var t, i = this.options, s = i.accept; this.isover = !1, this.isout = !0, this.accept = e.isFunction(s) ? s : function (e) { return e.is(s) }, this.proportions = function () { if (!arguments.length) return t || (t = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight }); t = arguments[0] }, this._addToManager(i.scope), i.addClasses && this._addClass("ui-droppable") }, _addToManager: function (t) { e.ui.ddmanager.droppables[t] = e.ui.ddmanager.droppables[t] || [], e.ui.ddmanager.droppables[t].push(this) }, _splice: function (e) { for (var t = 0; t < e.length; t++) e[t] === this && e.splice(t, 1) }, _destroy: function () { var t = e.ui.ddmanager.droppables[this.options.scope]; this._splice(t) }, _setOption: function (t, i) { if ("accept" === t) this.accept = e.isFunction(i) ? i : function (e) { return e.is(i) }; else if ("scope" === t) { var s = e.ui.ddmanager.droppables[this.options.scope]; this._splice(s), this._addToManager(i) } this._super(t, i) }, _activate: function (t) { var i = e.ui.ddmanager.current; this._addActiveClass(), i && this._trigger("activate", t, this.ui(i)) }, _deactivate: function (t) { var i = e.ui.ddmanager.current; this._removeActiveClass(), i && this._trigger("deactivate", t, this.ui(i)) }, _over: function (t) { var i = e.ui.ddmanager.current; i && (i.currentItem || i.element)[0] !== this.element[0] && this.accept.call(this.element[0], i.currentItem || i.element) && (this._addHoverClass(), this._trigger("over", t, this.ui(i))) }, _out: function (t) { var i = e.ui.ddmanager.current; i && (i.currentItem || i.element)[0] !== this.element[0] && this.accept.call(this.element[0], i.currentItem || i.element) && (this._removeHoverClass(), this._trigger("out", t, this.ui(i))) }, _drop: function (i, s) { var o = s || e.ui.ddmanager.current, n = !1; return !(!o || (o.currentItem || o.element)[0] === this.element[0]) && (this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function () { var s = e(this).droppable("instance"); if (s.options.greedy && !s.options.disabled && s.options.scope === o.options.scope && s.accept.call(s.element[0], o.currentItem || o.element) && t(o, e.extend(s, {offset: s.element.offset()}), s.options.tolerance, i)) return n = !0, !1 }), !n && !!this.accept.call(this.element[0], o.currentItem || o.element) && (this._removeActiveClass(), this._removeHoverClass(), this._trigger("drop", i, this.ui(o)), this.element)) }, ui: function (e) { return { draggable: e.currentItem || e.element, helper: e.helper, position: e.position, offset: e.positionAbs } }, _addHoverClass: function () { this._addClass("ui-droppable-hover") }, _removeHoverClass: function () { this._removeClass("ui-droppable-hover") }, _addActiveClass: function () { this._addClass("ui-droppable-active") }, _removeActiveClass: function () { this._removeClass("ui-droppable-active") } }); var t = e.ui.intersect = function () { function e(e, t, i) { return e >= t && e < t + i } return function (t, i, s, o) { if (!i.offset) return !1; var n = (t.positionAbs || t.position.absolute).left + t.margins.left, r = (t.positionAbs || t.position.absolute).top + t.margins.top, a = n + t.helperProportions.width, l = r + t.helperProportions.height, p = i.offset.left, c = i.offset.top, d = p + i.proportions().width, h = c + i.proportions().height; switch (s) { case"fit": return p <= n && a <= d && c <= r && l <= h; case"intersect": return p < n + t.helperProportions.width / 2 && a - t.helperProportions.width / 2 < d && c < r + t.helperProportions.height / 2 && l - t.helperProportions.height / 2 < h; case"pointer": return e(o.pageY, c, i.proportions().height) && e(o.pageX, p, i.proportions().width); case"touch": return (r >= c && r <= h || l >= c && l <= h || r < c && l > h) && (n >= p && n <= d || a >= p && a <= d || n < p && a > d); default: return !1 } } }(); return e.ui.ddmanager = { current: null, droppables: {default: []}, prepareOffsets: function (t, i) { var s, o, n = e.ui.ddmanager.droppables[t.options.scope] || [], r = i ? i.type : null, a = (t.currentItem || t.element).find(":data(ui-droppable)").addBack(); e:for (s = 0; s < n.length; s++) if (!(n[s].options.disabled || t && !n[s].accept.call(n[s].element[0], t.currentItem || t.element))) { for (o = 0; o < a.length; o++) if (a[o] === n[s].element[0]) { n[s].proportions().height = 0; continue e } n[s].visible = "none" !== n[s].element.css("display"), n[s].visible && ("mousedown" === r && n[s]._activate.call(n[s], i), n[s].offset = n[s].element.offset(), n[s].proportions({ width: n[s].element[0].offsetWidth, height: n[s].element[0].offsetHeight })) } }, drop: function (i, s) { var o = !1; return e.each((e.ui.ddmanager.droppables[i.options.scope] || []).slice(), function () { this.options && (!this.options.disabled && this.visible && t(i, this, this.options.tolerance, s) && (o = this._drop.call(this, s) || o), !this.options.disabled && this.visible && this.accept.call(this.element[0], i.currentItem || i.element) && (this.isout = !0, this.isover = !1, this._deactivate.call(this, s))) }), o }, dragStart: function (t, i) { t.element.parentsUntil("body").on("scroll.droppable", function () { t.options.refreshPositions || e.ui.ddmanager.prepareOffsets(t, i) }) }, drag: function (i, s) { i.options.refreshPositions && e.ui.ddmanager.prepareOffsets(i, s), e.each(e.ui.ddmanager.droppables[i.options.scope] || [], function () { if (!this.options.disabled && !this.greedyChild && this.visible) { var o, n, r, a = t(i, this, this.options.tolerance, s), l = !a && this.isover ? "isout" : a && !this.isover ? "isover" : null; l && (this.options.greedy && (n = this.options.scope, (r = this.element.parents(":data(ui-droppable)").filter(function () { return e(this).droppable("instance").options.scope === n })).length && ((o = e(r[0]).droppable("instance")).greedyChild = "isover" === l)), o && "isover" === l && (o.isover = !1, o.isout = !0, o._out.call(o, s)), this[l] = !0, this["isout" === l ? "isover" : "isout"] = !1, this["isover" === l ? "_over" : "_out"].call(this, s), o && "isout" === l && (o.isout = !1, o.isover = !0, o._over.call(o, s))) } }) }, dragStop: function (t, i) { t.element.parentsUntil("body").off("scroll.droppable"), t.options.refreshPositions || e.ui.ddmanager.prepareOffsets(t, i) } }, !1 !== e.uiBackCompat && e.widget("ui.droppable", e.ui.droppable, { options: { hoverClass: !1, activeClass: !1 }, _addActiveClass: function () { this._super(), this.options.activeClass && this.element.addClass(this.options.activeClass) }, _removeActiveClass: function () { this._super(), this.options.activeClass && this.element.removeClass(this.options.activeClass) }, _addHoverClass: function () { this._super(), this.options.hoverClass && this.element.addClass(this.options.hoverClass) }, _removeHoverClass: function () { this._super(), this.options.hoverClass && this.element.removeClass(this.options.hoverClass) } }), e.ui.droppable }) ? s.apply(t, o) : s) || (e.exports = n) } }]); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.auiplugin:split_jquery.ui.droppable', location = 'aui.chunk.4387b11a73d130f1830c--9d93ac39e4878e617bbe.js' */ (window.__auiJsonp = window.__auiJsonp || []).push([["jquery.ui.droppable"], { qe8r: function (u, e, i) { "use strict"; Object.defineProperty(e, "__esModule", {value: !0}), i("PTCr"), e.default = "jquery", u.exports = e.default } }, [["qe8r", "runtime", "aui.splitchunk.vendors--20a97d6a33", "aui.splitchunk.vendors--d18e3cafa7", "aui.splitchunk.vendors--db57146687", "aui.splitchunk.vendors--351ae504d7", "aui.splitchunk.vendors--9c8c8c1546", "aui.splitchunk.vendors--51504ebf10", "aui.splitchunk.vendors--06bc6ae5d7", "aui.splitchunk.vendors--825acd7236", "aui.splitchunk.0d131bcbf1"]]]); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:gh-notification', location = 'includes/js/rapid/ui/notification/Notification.soy' */ // This file was automatically generated from Notification.soy. // Please don't edit this file by hand. /** * @fileoverview Templates in namespace GH.tpl.rapid.notification. */ if (typeof GH == 'undefined') { var GH = {}; } if (typeof GH.tpl == 'undefined') { GH.tpl = {}; } if (typeof GH.tpl.rapid == 'undefined') { GH.tpl.rapid = {}; } if (typeof GH.tpl.rapid.notification == 'undefined') { GH.tpl.rapid.notification = {}; } GH.tpl.rapid.notification.renderErrorMessages = function (opt_data, opt_ignored) { var output = ''; if (opt_data.errors.length > 1) { output += '
      '; var errorList6 = opt_data.errors; var errorListLen6 = errorList6.length; for (var errorIndex6 = 0; errorIndex6 < errorListLen6; errorIndex6++) { var errorData6 = errorList6[errorIndex6]; output += '
    • ' + ((errorData6.noAutoescape) ? soy.$$filterNoAutoescape(errorData6.message) : soy.$$escapeHtml(errorData6.message)) + '
    • '; } output += '
    '; } else { var errorList18 = opt_data.errors; var errorListLen18 = errorList18.length; for (var errorIndex18 = 0; errorIndex18 < errorListLen18; errorIndex18++) { var errorData18 = errorList18[errorIndex18]; output += '

    ' + ((errorData18.noAutoescape) ? soy.$$filterNoAutoescape(errorData18.message) : soy.$$escapeHtml(errorData18.message)) + '

    '; } } return output; }; if (goog.DEBUG) { GH.tpl.rapid.notification.renderErrorMessages.soyTemplateName = 'GH.tpl.rapid.notification.renderErrorMessages'; } GH.tpl.rapid.notification.renderContextualErrors = function (opt_data, opt_ignored) { var output = ''; var errorList29 = opt_data.errors; var errorListLen29 = errorList29.length; for (var errorIndex29 = 0; errorIndex29 < errorListLen29; errorIndex29++) { var errorData29 = errorList29[errorIndex29]; output += '
    ' + soy.$$escapeHtml(errorData29.message) + '
    '; } return output; }; if (goog.DEBUG) { GH.tpl.rapid.notification.renderContextualErrors.soyTemplateName = 'GH.tpl.rapid.notification.renderContextualErrors'; } GH.tpl.rapid.notification.renderMessageHolder = function (opt_data, opt_ignored) { return '
    ' + soy.$$escapeHtml(AJS.format('This version of {0} is not a supported browser.', opt_data.browser)) + ' ' + soy.$$escapeHtml('See our documentation for the list of supported browsers.') + '
    '; }; if (goog.DEBUG) { GH.tpl.rapid.notification.renderMessageHolder.soyTemplateName = 'GH.tpl.rapid.notification.renderMessageHolder'; } GH.tpl.rapid.notification.renderAuiMessage = function (opt_data, opt_ignored) { return '
    ' + ((opt_data.title) ? '

    ' + ((opt_data.icon) ? '' : '') + '' + soy.$$escapeHtml(opt_data.title) + '

    ' : '') + ((opt_data.message) ? '

    ' + ((!opt_data.title && opt_data.icon) ? '' : '') + ((opt_data.messageHtml) ? soy.$$filterNoAutoescape(opt_data.message) : soy.$$escapeHtml(opt_data.message)) + '

    ' : '') + '
    '; }; if (goog.DEBUG) { GH.tpl.rapid.notification.renderAuiMessage.soyTemplateName = 'GH.tpl.rapid.notification.renderAuiMessage'; } GH.tpl.rapid.notification.renderGHtvMessage = function (opt_data, opt_ignored) { return '

    ' + soy.$$escapeHtml('This board has been updated') + ': ' + soy.$$escapeHtml('Refresh') + '' + soy.$$escapeHtml('Ignore') + '

    '; }; if (goog.DEBUG) { GH.tpl.rapid.notification.renderGHtvMessage.soyTemplateName = 'GH.tpl.rapid.notification.renderGHtvMessage'; } } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:gh-notification', location = 'includes/js/rapid/ui/notification/Notification.js' */ define("jira-agile/rapid/ui/notification", ["require"], function (e) { "use strict"; function a(e, a, r) { return s(i({ body: e, title: r.showTitle ? a : void 0, close: r.autoHide ? "auto" : r.closeable ? "manual" : "never", type: r.type })) } function s(e) { var a = r(e).find(".title"); return "" === r.trim(a.text()) && a.remove(), e } var r = e("jquery"), t = e("underscore"), i = e("aui/flag"), n = e("jira/util/logger"), o = e("jira/analytics"), d = { showErrors: function (e) { var a = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], s = arguments[2], r = "Error", t = GH.tpl.rapid.notification.renderErrorMessages(e); d.showError(r, t, a, s) }, showError: function (e, s) { var r = !(arguments.length > 2 && void 0 !== arguments[2]) || arguments[2], i = arguments[3], n = {autoHide: !1, closeable: r, showTitle: !0, type: "error"}; i = t.extend({}, n, i), a(s, e, i) }, showWarnings: function (e, s) { var r = {preRendered: !1, autoHide: !0, closeable: !0, showTitle: !1, type: "warning"}; s = t.extend({}, r, s); var i = void 0; i = s.preRendered ? e : GH.tpl.rapid.notification.renderErrorMessages({errors: e}), a(i, "Warning", s) }, showWarning: function (e) { d.showWarnings(e, {preRendered: !0}) }, showSuccess: function (e, s) { var r = {closeable: !0, autoHide: !0, showTitle: !1, type: "success"}; s = t.extend({}, r, s), a(e, null, s) }, clear: function () { r("#aui-flag-container").empty() }, handleDateFormatMismatchError: function (e) { var a = ''; a += "Advanced Settings", a += ""; var s = AJS.format("It appears your Jira date format settings are misconfigured. Please check the {0} and ensure that \'\'jira.date.time.picker.java.format\'\' and \'\'jira.date.time.picker.javascript.format\'\' have matching output.", a); d.showWarnings(s, {autoHide: !1, preRendered: !0}) }, auiMessage: function () { n.warn("[deprecated] GH.Notification.auiMessage has no effect") }, showIssueMessage: function (e) { var a = JIRA.SessionStorage, s = null, r = null; e || (e = a.getItem("selectedIssueId")), e && (r = a.getItem("selectedIssueKey"), s = a.getItem("selectedIssueMsg"), d.showIssueMessageImpl(e, s, r)), a.removeItem("selectedIssueId"), a.removeItem("selectedIssueKey"), a.removeItem("selectedIssueMsg") }, showIssueMessageImpl: function (e, a, s) { a || (a = "thanks_issue_updated"); var r = AJS.params[a]; r && s && (r = AJS.format(r, s), d.showSuccess(r)) }, addPageLoadMessage: function (e, a) { var s = GH.storage.get("gh.pageloadmessages", !0) || []; s.push({message: e, type: a || "success"}), GH.storage.put("gh.pageloadmessages", s, !0) }, _displayPageLoadMessages: function () { var e = GH.storage.get("gh.pageloadmessages", !0); if (e) { var a = e[0].type, s = ""; switch (t.each(e, function (e) { s.length > 0 && (s += "
    "), s += e.message }), a) { case"warning": d.showWarning(s); break; case"success": default: d.showSuccess(s) } GH.storage.put("gh.pageloadmessages", null, !0) } }, showBoardUpdatedMessage: function () { d.triggerShowMessageAnalytics(), d.clearBoardUpdatedMessage(); var e = r.Deferred(), a = r(GH.tpl.rapid.notification.renderGHtvMessage()).appendTo("#gh"); return a.data("deferred", e), a.find(".js-refresh-now").click(function (s) { s.preventDefault(), a.removeData("deferred"), d.clearBoardUpdatedMessage(), e.resolve() }), a.find(".js-ignore-refresh").click(function (e) { e.preventDefault(), d.clearBoardUpdatedMessage() }), e.promise() }, clearBoardUpdatedMessage: function () { var e = r("#ghx-update-message"); if (e.length) { var a = e.data("deferred"); a && a.reject && a.reject(), e.remove() } }, isBoardUpdatedMessageVisible: function () { var e = r("#ghx-update-message"); return e.length > 0 }, triggerShowMessageAnalytics: function () { o.send({ name: "gh.rapidboard.updated.message.show", properties: {initial: !d.isBoardUpdatedMessageVisible()} }) } }; return d }), AJS.namespace("GH.Notification", null, require("jira-agile/rapid/ui/notification")), AJS.$(document).ready(function () { GH.Notification.showIssueMessage(), GH.storage && GH.Notification._displayPageLoadMessages() }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:gh-underscore', location = 'includes/js/lib/underscore-overrides.js' */ define("_", ["underscore"], function (e) { return e }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:gh-logger', location = 'includes/js/rapid/Logger.js' */ define("jira-agile/rapid/logger", ["underscore", "jira/util/logger"], function (e, t) { var a = {ajax: "ajax", event: "event", state: "state", ui: "ui", callback: "callback", refresh: "refresh"}; return { Contexts: a, enabledContexts: [a.ajax, a.event, a.state, a.ui, a.callback, a.refresh], log: function (a, i) { if (!i || e.contains(this.enabledContexts, i)) { var n = i ? this.pad(i, 6) + ": " + a : a; t.log(n) } }, pad: function (e, t) { return e.length < t ? e + " ".substr(0, t - e.length) : e }, timeMap: {}, timeStart: function (e) { if (!e) throw"start: If starting a timer manually a name must be set"; this.timeMap[e] = (new Date).getTime() }, timeStop: function (e) { if (!(e in this.timeMap)) throw"stop:" + e + " not found"; var t = (new Date).getTime() - this.timeMap[e]; delete this.timeMap[e], this.log(t + "ms on " + e, this.Contexts.ui) } } }), AJS.namespace("GH.Logger", null, require("jira-agile/rapid/logger")), AJS.namespace("GH.log", null, require("jira-agile/rapid/logger").log); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:gh-namespace', location = 'includes/js/gh-namespace.js' */ AJS.namespace("GH.namespace", null, AJS.namespace); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:events', location = 'includes/js/rapid/Events.js' */ define("jira-agile/rapid/events", ["require"], function (t) { function n(t) { return t ? e.extend(t, n.prototype) : t = this, t._bindings = [], t } var e = t("underscore"); return n.prototype = { on: function (t, n, e) { return e && this._off({type: t, context: e}), this._bindings.push({ type: t, handler: n, context: e }), this }, off: function (t) { return e.isString(t) ? this._off({type: t}) : e.isFunction(t) ? this._off({handler: t}) : e.isObject(t) && this._off({context: t}), this }, _off: function (t) { this._bindings = e.reject(this._bindings, function (n) { var e = !t.type || t.type === n.type, i = !t.context || t.context === n.context, r = !t.handler || t.handler === n.handler; return e && i && r }) }, trigger: function (t) { var n = Array.prototype.slice.call(arguments, 1); return e.each(this._bindings, function (e) { e.type === t && e.handler.apply(e.context, n) }), this } }, n }), AJS.namespace("GH.Events", null, require("jira-agile/rapid/events")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:global-events', location = 'includes/js/rapid/GlobalEvents.js' */ define("jira-agile/rapid/global-events", ["require"], function (e) { "use strict"; var i = e("jira-agile/rapid/events"); return new i }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:gh-config', location = 'includes/js/gh-config.js' */ define("jira-agile/config", [], function () { "use strict"; var i = {}; return i.isSampleDataAvailable = !1, i }), AJS.namespace("GH.Config", null, require("jira-agile/config")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:ajax', location = 'includes/js/rapid/Ajax.js' */ define("jira-agile/rapid/ajax", ["jira/util/formatter", "jira/ajs/ajax/smart-ajax", "jira/util/data/meta", "underscore", "wrm/context-path", "jquery", "jira/jquery/deferred"], function (e, r, t, n, o, a, s) { var u = {}; return u.CONTEXT_PATH = o(), u.REST_URL_BASE = "/rest/greenhopper/1.0", u.PUBLIC_REST_URL_BASE = "/rest/agile/1.0", u.xhrRegistery = {}, u.stallTimeout = 300, u.get = function (e, r) { a.extend(e, {type: "GET", headers: {"X-Atlassian-GreenHopper-Gadget": !n.isUndefined(GH.gadget)}}); var t = u._executeGet(e, r); return t.pipe(function (e, r, t) { return s().resolveWith(this, [e.success, r, t]) }) }, u.post = function (e) { return e = u._getSettings(e, !0), a.extend(e, { type: "POST", contentType: "application/json" }), u._executeStore(e) }, u.put = function (e) { return e = u._getSettings(e, !0), e.type = "PUT", u._executeStore(e) }, u.del = function (e) { return e = u._getSettings(e, !0), e.type = "DELETE", u._executeStore(e) }, u._getSettings = function (e, r) { return !e.bareUrl && e.url && (e.bareUrl = u.buildRestUrl(e.url)), e.bareUrl && (e.url = e.bareUrl), e.dataType || (e.dataType = "json"), e.data && r && (e.data = JSON.stringify(e.data)), e.contentType = "application/json", e }, u._getXhrData = function (e) { var r = {timestamp: 0}; return e && (r = u.xhrRegistery[e] ? u.xhrRegistery[e] : u.xhrRegistery[e] = r), r }, u._executeGet = function (e, r) { e = u._getSettings(e); var t = u._getXhrData(r); t.xhr && (GH.log("aborting request for " + r, GH.Logger.Contexts.ajax), t.xhr.abort(), delete t.xhr, delete t.xhrAbort, delete t.timeoutId); var n = t.timestamp; if (t.timestamp = (new Date).getTime(), t.timestamp - n < u.stallTimeout) { GH.log("stalling request for " + r + ", time since last request: " + (t.timestamp - n), GH.Logger.Contexts.ajax); var o, a = s(), i = function () { o = u._executeGet(e, r), o.done(a.resolve).fail(a.reject) }; t.timeoutId = window.setTimeout(i, u.stallTimeout), t.xhr = a.promise(), t.xhr.abort = function () { o ? o.abort.apply(o, arguments) : clearTimeout(t.timeoutId) } } else GH.log("executing request for " + r, GH.Logger.Contexts.ajax), t.xhr = u.makeRequest(e); return t.xhrAbort = t.xhr.abort, t.xhr.abort = function () { var e = t.xhr, r = t.xhrAbort; if (e && r) return r.apply(e, arguments) }, t.xhr.done(function () { t.xhr && delete t.xhr }).fail(function () { t.xhr && delete t.xhr }), t.xhr }, u._executeStore = function (e) { if (e = e || {}, e.data && "string" == typeof e.data && /\?\?/.test(e.data)) { var r = "\\u003F\\u003F"; e.data = e.data.replace(/\?\?/g, r) } return e.dataType = "json", u.makeRequest(e) }, u.makeRequest = function (e) { var t = s(); e = n.extend(e, { success: function () { t.resolveWith(this, arguments) }, error: function () { t.rejectWith(this, arguments) } }); var o = t.promise(r.makeRequest(e)), a = o.abort; o.abort = function (e) { return o.abortMarker = "timeout" != e, a.apply(o, arguments) }; var i = o.pipe(u._generateDoneInterceptor(), u._generateFailInterceptor(e.errorsNoAutoEscape)); return e.deferErrorHandling || i.fail(u._generateErrorHandler(e.onGlobalError, e.errorContextMap, e.contextualErrorRenderer, e.globalErrorDismissable)), i }, u._generateDoneInterceptor = function () { return function (e, r, t) { return e = e || {}, e = u._createExtendedResult(e), u.matchesCurrentUser(t) ? e.isSuccess() ? s().resolveWith(this, [e, r, t]) : s().rejectWith(this, [e, t, r, null]) : u._handleCurrentUserChanged(t) } }, u._generateFailInterceptor = function (e) { return function (r, t, n) { if (r.abortMarker) return s(); if (!u.matchesCurrentUser(r)) return u._handleCurrentUserChanged(r); var o = {}, a = null; if (r.responseText) try { o = JSON.parse(r.responseText) } catch (e) { } return o.errors || o.errorMessages ? a = u._convertJiraErrors(o, e) : o.message && (a = u._convertFrameworkErrors(o)), a || (a = u._convertGenericErrors(r, n)), s().rejectWith(this, [a, r, t, n]) } }, u.handleContextualErrors = function (e, r, t) { return r = r || {}, !!e.hasContextualErrors() && (a(e.getContextualErrors()).each(function (n, o) { var s = r[o.contextId]; if (s) if (a.isFunction(s)) s(o, e); else { s = a(s), s.siblings(".ghx-error").remove(); var u; u = t ? t(o) : GH.tpl.rapid.notification.renderContextualErrors({errors: o.errors}), s.after(u) } else a(o.errors).each(function (r, t) { e.addGlobalError(t) }) }), !0) }, u.handleGlobalErrors = function (e, r, t) { return !!e.hasGlobalErrors() && (GH.Notification.showErrors({errors: e.getGlobalErrors()}, t), r && r instanceof Function && r(e), !0) }, u.buildRestUrl = function (e) { return 0 !== e.indexOf("/") && (e = "/" + e), u.buildBareRestUrl(u.REST_URL_BASE + e) }, u.buildPublicRestUrl = function (e) { return 0 !== e.indexOf("/") && (e = "/" + e), u.buildBareRestUrl(u.PUBLIC_REST_URL_BASE + e) }, u.buildBareRestUrl = function (e) { return 0 !== e.indexOf("/") && (e = "/" + e), u.CONTEXT_PATH + e }, u._createExtendedResult = function (e) { return e ? u._extendResult({success: e}) : u._extendResult({success: !0}) }, u._extendResult = function (e) { return a.extend(e, { getGlobalErrors: function () { return e.error ? e.error.errors : null }, getContextualErrors: function () { return e.error ? e.error.contextualErrors : null }, hasGlobalErrors: function () { return e.error && e.error.errors && e.error.errors.length > 0 }, hasContextualErrors: function () { return e.error && e.error.contextualErrors }, addGlobalError: function (r) { e.error || (e.error = {}), e.error.errors || (e.error.errors = []), e.error.errors[e.error.errors.length] = r }, getSuccessObject: function () { return e.success }, isSuccess: function () { return !e.error } }) }, u._generateErrorHandler = function (e, r, t, n) { return function (o) { u.handleContextualErrors(o, r, t), u.handleGlobalErrors(o, e, n) } }, u._convertJiraErrors = function (e, r) { var t = e.errorMessages ? e.errorMessages : []; t = n.map(t, function (e) { return {message: e, noAutoescape: r} }); var o = e.errors ? e.errors : {}; o = n.map(o, function (e, t) { return {contextId: t, errors: [{message: e, noAutoescape: r}]} }); var a = {error: {errors: t, contextualErrors: o}}; return u._extendResult(a) }, u._convertFrameworkErrors = function (e) { var r = {error: {errors: [{message: e.message}], contextualErrors: []}}; return u._extendResult(r) }, u._convertGenericErrors = function (r, t) { var n = u._extendResult({}); return r.responseText && GH.log("Got an error response with text that we don't know how to parse: " + r.responseText), 504 === r.status || 0 === r.status && a.contains(["abort", "timeout"], t) ? n.addGlobalError({ status: 504, message: e.I18n.getText("gh.ajax.error.timeout") }) : t ? n.addGlobalError({ status: r.status, message: t }) : GH.log("Got an Ajax request error response with empty 'errorThrown' value. Silently logging"), n }, u._hasUsernameResponseHeader = function (e) { return !!e.getResponseHeader("X-AUSERNAME") }, u._getUserForResponse = function (e) { return e.getResponseHeader("X-AUSERNAME") ? decodeURIComponent(e.getResponseHeader("X-AUSERNAME")) : "anonymous" }, u.getUserFromAJS = function () { var e = t.get("remote-user"); return e ? e : "anonymous" }, u.matchesCurrentUser = function (e) { return !e.getResponseHeader || !e.getAllResponseHeaders || !u._hasUsernameResponseHeader(e) || u.getUserFromAJS() === u._getUserForResponse(e) || 204 === e.status && !e.getAllResponseHeaders() && a.browser.msie }, u._handleCurrentUserChanged = function (e) { var r = u.getUserFromAJS(), t = u._getUserForResponse(e); return "anonymous" !== r && "anonymous" === t ? (GH.log("User changed. original: " + r + " new: " + t + ". Redirecting to the login page"), location.href = GH.Navigation.getLoginUrl()) : (GH.log("User changed. original: " + r + " new: " + t + ". Reloading the page"), location.reload()), s() }, u }), AJS.namespace("GH.Ajax", null, require("jira-agile/rapid/ajax")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:storage', location = 'includes/js/rapid/state/storage.js' */ define("jira-agile/rapid/state/storage", [], function () { "use strict"; var e = {}; return e.get = function (e, t) { var r = void 0; if (r = t ? sessionStorage.getItem(e) : localStorage.getItem(e), "string" != typeof r) return r; try { return JSON.parse(r) } catch (e) { return GH.log("GH.storage: Caught error: " + e), void GH.log("GH.storage: Cannot parse json string retrieved from " + (t ? "session" : "local") + " storage. Ignoring value " + r) } }, e.put = function (e, t, r) { if (null === t || void 0 === t) r ? sessionStorage.removeItem(e) : localStorage.removeItem(e); else try { r ? sessionStorage.setItem(e, JSON.stringify(t)) : localStorage.setItem(e, JSON.stringify(t)) } catch (e) { return !1 } return !0 }, window.localStorage && window.sessionStorage || (e.get = function () { return null }, e.put = function () { return !1 }), e }), AJS.namespace("GH.storage", null, require("jira-agile/rapid/state/storage")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:validation', location = 'includes/js/rapid/Validation.js' */ define("jira-agile/rapid/validation", ["jira/util/formatter", "jquery"], function (r, t) { var n = {}; return n.notBlank = function (r, e, a) { var i = n.applyRules(r, e, a, function () { return t.trim(t(r).val()).length > 0 }); return i }, n.maxLength = function (r, e, a, i) { var o = n.applyRules(r, a, i, function () { return t.trim(t(r).val()).length <= e }); return o }, n.isPositiveInteger = function (r, e, a) { var i = n.applyRules(r, e, a, function () { return /^\d*$/.test(t.trim(t(r).val())) }); return i }, n.applyRules = function (r, e, a, i) { r = t(r); var o = a ? t(a) : r, l = i.call(this); return !!l || (n.showContextualErrors(o, e), !1) }, n.showContextualErrors = function (t, e, a, i, o) { n.clearContextualErrors(t), t.after(GH.tpl.rapid.notification.renderContextualErrors({errors: [{message: r.I18n.getText(e, a, i, o)}]})) }, n.clearContextualErrors = function (r) { r = t(r), r.find(".ghx-error").remove(), r.siblings(".ghx-error").remove() }, n }), AJS.namespace("GH.Validation", null, require("jira-agile/rapid/validation")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:help-paths', location = 'includes/js/gh-helppaths.js' */ AJS.namespace("GH.HelpPaths"), GH.HelpPaths.getHelpPath = function (e) { return null }; } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:message', location = 'includes/js/gh-message.js' */ define("jira-agile/message", ["jira/util/logger"], function (e) { "use strict"; var a = {}; return a.showIssueMessage = function () { e.warn("[deprecated] GH.Message.showIssueMessage has no effect, @see module:jira-agile/rapid/ui/notification") }, a.showSuccess = function () { e.warn("[deprecated] GH.Message.showSuccess has no effect, @see module:jira-agile/rapid/ui/notification") }, a.showWarning = function () { e.warn("[deprecated] GH.Message.showWarning has no effect, @see module:jira-agile/rapid/ui/notification") }, a.showPersistentWarning = function () { e.warn("[deprecated] GH.Message.showPersistentWarning has no effect, @see module:jira-agile/rapid/ui/notification") }, a }), AJS.namespace("GH.Message", null, require("jira-agile/message")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:util', location = 'includes/js/rapid/Util.js' */ define("jira-agile/rapid/util", ["underscore", "jquery"], function (e, r) { var n = {}; return n.getPluginKey = function () { return r('meta[name="ghx-plugin-key"]').attr("content") }, n.wrapPreventDefault = function (e, r) { return function (n) { return n.preventDefault(), e.apply(r || this, arguments) } }, n.andThenSplice = function () { return {_needsSplice: Array.prototype.slice.call(arguments)} }, n.andThen = function (n) { var t = [{trigger: "resolveWith", on: "done", filter: arguments[1]}, { trigger: "rejectWith", on: "fail", filter: arguments[2] }, {trigger: "notifyWith", on: "progress", filter: arguments[3]}]; return r.Deferred(function (r) { e.each(t, function (t) { var i = t.on, a = t.trigger, o = e.isFunction(t.filter) && t.filter; n[i](function () { var n = o && o.apply(this, arguments); if (n && e.isFunction(n.promise)) n.promise().done(r.resolve).fail(r.reject).progress(r.notify); else { var t; t = n && e.isArray(n._needsSplice) ? n._needsSplice : o ? [n] : arguments, r[a](e.isFunction(this.promise) ? r.promise() : this, t) } }) }) }).promise() }, r._OriginalDeferred = r.Deferred, r.Deferred = function (e) { return r._OriginalDeferred(function (r) { r.andThen = function () { var e = Array.prototype.slice.call(arguments); return e.unshift(r), n.andThen.apply(this, e) }; var t = r.promise; r.promise = function () { var e = t.apply(this, arguments); return e.andThen = function () { var r = Array.prototype.slice.call(arguments); return r.unshift(e), n.andThen.apply(this, r) }, e }, e && e.call(r, r) }) }, n.indexOf = function (r, n, t) { var i = -1; return t && (r = r.slice().reverse()), e.some(r, function (e, a) { return !!n(e, a) && (i = t ? r.length - 1 - a : a, !0) }), i }, n.swapArrayItems = function (e, r, n) { var t; return !!(e && r !== n && Math.min(r, n) >= 0 && Math.max(r, n) < e.length) && (t = e[n], e[n] = e[r], e[r] = t, !0) }, n.roundToDecimalPlaces = function (e, r) { if ("number" != typeof e || e === Math.round(e)) return e; if (0 === r) return Math.round(e); var n = e.toString(); if (n.indexOf("e") >= 0) return e; var t = e < 0, i = n.split("."), a = +i[1].charAt(r); if (i[1] = i[1].substr(0, r), a > 5 || !t && 5 === a) { var o = /^0*/.exec(i[1])[0]; i[1] = o + (+i[1] + 1), i[1].length > r && (o ? i[1] = i[1].substr(i[1].length - r) : (i[0] = +i[0] + 1, i[1] = 0)) } return parseFloat(i.join(".")) }, n }), AJS.namespace("GH.Util", null, require("jira-agile/rapid/util")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:user-data', location = 'includes/js/rapid/UserData.js' */ define("jira-agile/rapid/user-data", ["jira/util/data/meta"], function (e) { var r = {}; return r.remoteUser = e.get("remote-user"), r.loggedIn = !!r.remoteUser, r.hasUser = function () { return r.loggedIn }, r.getUserName = function () { return r.remoteUser }, r.canCreateProject = function () { return r.userConfig.canCreateProject }, r.setGlobalConfig = function (e) { r.quickCreateDefaultIssueTypeId = e.quickCreateDefaultIssueTypeId, r.userConfig = e.userConfig, r.userConfig && r.userConfig.canCreateProject && (r.userConfig.canCreateProject = !GH.Features.DISABLE_CREATE_PROJECT.isEnabled()) }, r }), AJS.namespace("GH.UserData", null, require("jira-agile/rapid/user-data")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:features', location = 'includes/js/gh-features.js' */ define("jira-agile/gh-features", ["jira/ajs/dark-features"], function (e) { "use strict"; function a(e) { this.featureKey = e, this.featureEmergencyDisabledKey = e + ".emergencyDisabled" } return a.prototype.isEnabled = function () { return e.isEnabled(this.featureKey) && !e.isEnabled(this.featureEmergencyDisabledKey) }, Object.freeze({ DISABLE_CREATE_PROJECT: new a("jag.DISABLE_CREATE_PROJECT"), EDITABLE_DETAIL_VIEW_ENABLED: new a("com.atlassian.jira.agile.darkfeature.editable.detailsview"), SPLIT_ISSUE: new a("com.atlassian.jira.agile.darkfeature.splitissue") }) }), AJS.namespace("GH.Features", null, require("jira-agile/gh-features")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:navigation', location = 'includes/js/gh/navigation/Navigation.js' */ define("jira-agile/rapid/navigation", ["wrm/context-path"], function (a) { "use strict"; var n = {}; return n.gotoDefaultRapidBoardPage = function (a, i) { window.location.href = n.getDefaultRapidBoardPageUrl(a, i) }, n.getDefaultRapidBoardPageUrl = function (a, i) { var e = _.isUndefined(i) ? "" : "&view=" + i; return n.getCanonicRapidBoardPageUrl(a) + e }, n.getCanonicRapidBoardPageUrl = function (n) { return a() + "/secure/RapidBoard.jspa?rapidView=" + n }, n.getLoginUrl = function () { return a() + "/login.jsp?os_destination=" + encodeURIComponent(window.location.href) }, n.updateWindowLocation = function (a) { return window.location.assign(a) }, n }), AJS.namespace("GH.Navigation", null, require("jira-agile/rapid/navigation")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:gh-dialog', location = 'includes/js/dialog/dialog.js' */ AJS.namespace("GH.Dialog"), GH.Dialog.baseExtension = { _getDefaultOptions: function () { return AJS.$.extend(this._super(), { onDialogFinished: function () { this.handleSuccess() } }) }, _performRedirect: function () { this.redirected = !0, this.handleSuccess() }, hide: function (e, n) { return JIRA.Dialog.current === this && (this._super(e), void (n === !0 || !n || n.reason !== JIRA.Dialog.HIDE_REASON.escape && n.reason !== JIRA.Dialog.HIDE_REASON.cancel || this.doCancelCleanup())) }, doCancelCleanup: function () { }, handleSuccess: function () { } }; } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:gh-dialog', location = 'includes/js/rapid/ops/DialogExtension.js' */ AJS.namespace("GH.Dialog.XBoardExtension"), GH.Dialog.XBoardExtension.getActionInfo = function (e) { var t = "workflow-transition-", a = e.options.id; return a.substring(0, t.length) === t ? { formId: a, isTransition: !0, transitionId: a.substring(t.length) } : {formId: a, isTransition: !1} }, GH.Dialog.XBoardExtension.handleSuccess = function () { GH.IssueOperationShortcuts.clearOverrideSelectedIssue(), this.hide(!0, !0), this._hideloadingIndicator(); var e = GH.Dialog.XBoardExtension.getActionInfo(this), t = GH.IssueOperationShortcuts.getSelectedIssueId(), a = GH.IssueOperationShortcuts.getSelectedIssueKey(); GH.WorkController.isActive() ? GH.Dialog.handleWorkModeUpdate(t, a, e) : GH.PlanController.isActive() && GH.Dialog.handlePlanModeUpdate(t, a, e), AJS.$(GH).trigger("issueTransitioned", {issueId: t}), GH.Notification.showIssueMessage(t), GH.WorkDragAndDrop.transitionTargetStatus = void 0 }, GH.Dialog.handlePlanModeUpdate = function (e, t, a) { if (!GH.IssueOperationShortcuts.isOverrideSelectedIssueActive()) { var o = 0, r = null, s = GH.BacklogModel.findModelWithIssue(t); s && (GH.SprintModel.isSprintModel(s) && (r = s.getSprintId()), o = s.getIssueList().getIssueIndex(t)), GH.PlanController.reload(function () { var e = GH.BacklogSelectionController.getSelectedIssueKey(); if (!e) { var t = null; r && (t = GH.BacklogModel.getSprintModel(r)), t || (t = GH.BacklogModel.getBacklogModel2()), GH.BacklogSelectionController.selectIssue(t.getIssueList().getIssueKeyAtIndex(o)) } }) } }, GH.Dialog.handleWorkModeUpdate = function (e, t, a) { var o = GH.Dialog.createParentCompletedCheckCallback(t), r = GH.Dialog.createSelectMostAppropriateIssueCallback(t); if (a.isTransition) if (GH.WorkDragAndDrop.transitionTargetStatus) { var s = GH.WorkDragAndDrop.transitionTargetStatus, n = GH.GridDataController.getModel(), i = n.getIssueDataByKey(t), l = n.getIssuePositionByKey(t), d = n.getColumns(), u = l.columnId, c = GH.GridColumnsData.getColumnIdForStatus(d, s); n.moveIssueToColumn(t, u, c), i.status = s, n.updateIssueData(i), GH.SwimlaneView.rerenderCell(l.swimlaneId, u), GH.SwimlaneView.rerenderCell(l.swimlaneId, c), o() } else GH.CallbackManager.registerCallback(GH.WorkController.CALLBACK_POOL_LOADED, "ParentWithAllSubsCompletedCheck", o); GH.CallbackManager.registerCallback(GH.WorkController.CALLBACK_POOL_LOADED, "SelectMostAppropriateIssueCallback", r), GH.WorkController.reload() }, GH.Dialog.createParentCompletedCheckCallback = function (e) { return function () { var t = GH.GridDataController.getModel(); if (!_.isUndefined(t.data.issues[e]) && !_.isUndefined(t.data.issues[e].parentKey)) { var a = t.data.issues[e].parentKey; if (_.contains(t.data.columnIssueMapping[_.last(t.data.columns).id], e)) { var o = t.data.columnIssueMapping[_.last(t.data.columns).id], r = _.toArray(t.data.issues).reduce(function (e, t) { return o.indexOf(t.key) > -1 ? e : e.concat(t.key) }, []), s = _.find(r, function (e) { return t.data.issues[e].parentKey === a }); s || GH.WorkController.resolveParentTask(t.data.issues[a]) } } } }, GH.Dialog.createSelectMostAppropriateIssueCallback = function (e) { var t = GH.GridDataController.getModel().getIssuePositionByKey(e); return function () { var a = GH.GridDataController.getModel().getIssueDataByKey(e); if (!a) { var o = GH.GridDataController.getModel().getIssueKeyAtPosition(t); o ? (GH.WorkSelectionController.selectIssue(o, { pushState: !1, dontUpdateUI: !0 }), GH.RapidBoard.State.replaceState()) : (GH.WorkSelectionController.selectIssue(void 0, { pushState: !1, dontUpdateUI: !0 }), GH.RapidBoard.State.replaceState()) } } }, GH.Dialog.XBoardExtension.doCancelCleanup = function () { GH.IssueOperationShortcuts.clearOverrideSelectedIssue(), GH.WorkDragAndDrop.transitionTargetStatus = void 0 }; } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:gh-dialog', location = 'includes/js/dialog/form-dialog.js' */ AJS.namespace("GH.FormDialog"), GH.FormDialog = JIRA.FormDialog.extend(GH.Dialog.baseExtension), GH.FormDialog = GH.FormDialog.extend(GH.Dialog.XBoardExtension); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:gh-dialog', location = 'includes/js/dialog/labels-dialog.js' */ define("jira-agile/dialog/labels-dialog", ["jira/dialog/labels-dialog"], function (i) { var n = i.extend(GH.Dialog.baseExtension); return n = n.extend(GH.Dialog.XBoardExtension), n = n.extend({ _handleSubmitResponse: function (i, n, t) { this.serverIsDone && (this.options.onSuccessfulSubmit && this.options.onSuccessfulSubmit.call(this, i, n, t), this.options.autoClose && this.hide(), this.options.onDialogFinished && this.options.onDialogFinished.call(this, i, n, t)) }, decorateContent: function () { this._super(); var i = this.get$popupContent(), n = i.find("input[name=customFieldId]"); if (1 === n.length) { var t = i.find("#hint"); t.hide() } } }) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:gh-dialog', location = 'includes/js/rapid/ui/dialog/DialogUtil.js' */ !function () { AJS.namespace("GH.Dialog"); var n = require("aui/dialog"); GH.Dialog.create = function (e) { AJS.$("#" + e.id).remove(), e = _.defaults(e, {bindEscape: !0}); var i = new n(e), a = i.show, o = function () { GH.Dialog.preShow(), a.call(i); var n = AJS.$("#" + e.id).find(".dialog-button-panel .aui-button"); n.is(":enabled") && n.focus(), AJS.$("#" + e.id).addClass("ghx-dialog") }; return _.extend(i, { dispose: GH.Dialog.generateCloseHandler(i), cancel: GH.Dialog.generateCloseHandler(i, e.onCancelFn), submit: GH.Dialog.generateCloseHandler(i, e.onConfirmFn), show: o, disableControls: GH.Dialog.generateDisableControlsFn(i), enableControls: GH.Dialog.generateEnableControlsFn(i), showSpinner: GH.Dialog.generateShowSpinnerFn(i), hideSpinner: GH.Dialog.generateHideSpinnerFn(i) }), GH.Dialog.bindEscapeHandler(i, !e.bindEscape), i }, GH.Dialog.addCancelButton = function (n) { n.addCancel("Cancel", function (e) { n.cancel(n) }) }, GH.Dialog.bindEscapeHandler = function (n, e) { e ? JIRA.bind("Dialog.beforeHide", function (e, i, a, o) { o === n.id && a === JIRA.Dialog.HIDE_REASON.escape && e.preventDefault() }) : AJS.$(document).bind("keyup." + n.id, function (e) { 27 == e.keyCode && n.cancel(n) }) }, GH.Dialog.generateCloseHandler = function (n, e) { return function () { return n.remove(), GH.Dialog.undim(), AJS.$(document).unbind("keyup." + n.id), AJS.unbind("remove.dialog"), e && e(n), !1 } }, GH.Dialog.generateDisableControlsFn = function (n) { return function () { AJS.$("#" + n.id + " button").attr("disabled", "disabled") } }, GH.Dialog.generateEnableControlsFn = function (n) { return function () { AJS.$("#" + n.id + " button").removeAttr("disabled") } }, GH.Dialog.generateShowSpinnerFn = function (n) { return function () { AJS.$("#" + n.id).find(".button-panel-cancel-link").css("visibility", "hidden").before('') } }, GH.Dialog.generateHideSpinnerFn = function (n) { return function () { AJS.$("#" + n.id).find(".ghx-spinner").remove().end().find(".button-panel-cancel-link").css("visibility", "visible") } }, GH.Dialog.sanitizeAJSDim = function () { var n = AJS.dim; AJS.dim = function () { try { n.apply(this, arguments) } catch (n) { } } }, GH.Dialog.registerDialog = function (n, e, i) { AJS.$(document).undelegate(n, "click").delegate(n, "click", function (n) { var a = AJS.$(this); a.hasClass("disabled") || (n.preventDefault(), e(n, i)) }) }, GH.Dialog.dim = function () { AJS.dim(), AJS.$(".aui-blanket").html('
    ') }, GH.Dialog.undim = function () { AJS.undim(), AJS.$(".aui-blanket").empty() }, GH.Dialog.preShow = function () { AJS.$(".aui-blanket").empty() } }(); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:gh-persistent-messages', location = 'includes/js/rapid/ui/persistent-messages/CreateViewMessage.js' */ AJS.namespace("GH.PersistentMessages.CreateViewMessage"), GH.PersistentMessages.CreateViewMessage = {}, GH.PersistentMessages.CreateViewMessage.setView = function (e, s, a, t) { var r = {id: e, name: s, type: a, subType: t}; GH.storage.put("gh.createViewMessage", r, !0) }, GH.PersistentMessages.CreateViewMessage.clear = function () { GH.storage.put("gh.createViewMessage", null, !0) }, GH.PersistentMessages.CreateViewMessage.renderMessage = function (e) { e && GH.log(e.type + " handled", "GH.PersistentMessages.CreateViewMessage.renderMessage"); var s = GH.storage.get("gh.createViewMessage", !0); if (s) { var a = null; s.name = AJS.escapeHTML(String(s.name)); var t; "advanced" == s.type ? t = GH.tpl.board.x.renderCreateViewMessage : "kanban" == s.subType ? t = GH.tpl.board.x.renderWelcomeViewMessageKanban : "scrum" == s.subType && (t = GH.tpl.board.x.renderWelcomeViewMessageScrum), a = t({ rapidView: s, url: AJS.parseUri(window.location.href) }), GH.Notification.showSuccess(a, { title: "Success", timeout: 1e4 }), GH.PersistentMessages.CreateViewMessage.clear() } }; } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:gh-persistent-messages', location = 'includes/js/rapid/ui/persistent-messages/WelcomeMessage.js' */ AJS.namespace("GH.PersistentMessages.WelcomeMessage"), GH.PersistentMessages.WelcomeMessage = {}, GH.PersistentMessages.WelcomeMessage.show = function (e) { GH.storage.put("gh.welcomeMessage", e, !0) }, GH.PersistentMessages.WelcomeMessage.renderMessage = function () { var e = GH.storage.get("gh.welcomeMessage", !0); if (e) { var s = null; e.rapidView.name = AJS.escapeHTML(String(e.rapidView.name)), e.project.name = AJS.escapeHTML(String(e.project.name)); var a = null; /kanban/.test(e.preset) ? a = e.sample ? GH.tpl.board.x.renderWelcomeProjectSampleMessageKanban : GH.tpl.board.x.renderWelcomeProjectMessageKanban : /scrum/.test(e.preset) && (a = e.sample ? GH.tpl.board.x.renderWelcomeProjectSampleMessageScrum : GH.tpl.board.x.renderWelcomeProjectMessageScrum), s = a({ project: e.project, rapidView: e.rapidView, url: AJS.parseUri(window.location.href) }), GH.Notification.showSuccess(s, { title: "Success", timeout: 1e4 }), GH.storage.put("gh.welcomeMessage", null, !0) } }; } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:gh-project-picker', location = 'includes/js/projects/project-picker.js' */ define("jira-agile/projects/project-picker", [], function () { "use strict"; var t = function (t) { if (!t || !t.selector) throw new Error("Project picker requires a selector"); this.$select = AJS.$(t.selector), t.currentProjectId && (this.currentProjectId = t.currentProjectId, this.currentProject = null), this.multiselect = new AJS.MultiSelect({ element: this.$select, width: 300, itemAttrDisplayed: "label", ajaxOptions: {url: GH.Ajax.buildRestUrl("/project.json"), formatResponse: this._processAjax.bind(this)} }), "function" == typeof t.change && (this.$select.bind("unselect", t.change), this.$select.bind("change", t.change)), this.currentProjectId && this.multiselect.requestSuggestions(!0).done(function () { this.currentProject && this.multiselect.addItem(this._getProjectDescriptor(this.currentProject)) }.bind(this)) }; return t.prototype.show = function () { AJS.warn("ProjectPicker.show is deprecated. It is no longer needed as all initialisation occurs in the constructor") }, t.prototype.hasValue = function () { return !!this.$select.val() }, t.prototype.hasErrors = function () { return this.multiselect.$container.parent().find(".error").length > 0 }, t.prototype.getValue = function () { return this.$select.val() }, t.prototype.getElement = function () { return this.$select }, t.prototype._findProject = function (t, e) { return (t || []).filter(function (t) { return e && t.id === e }.bind(this))[0] }, t.prototype._findUnmatchingProjects = function (t, e) { return (t || []).filter(function (t) { return !e || t.id !== e }.bind(this)) }, t.prototype._processAjax = function (t) { if (!t || !t.projects || !t.projects.length) return []; this.currentProject = this._findProject(t.projects, this.currentProjectId); var e = this._findUnmatchingProjects(t.projects, this.currentProjectId).map(this._getProjectDescriptor.bind(this)); return this.currentProject ? [this._getProjectDescriptor(this.currentProject)].concat(e) : e }, t.prototype._getProjectDescriptor = function (t) { if (!t) throw new Error("ProjectPicker.prototype._getProjectDescriptor requires a project"); return new AJS.ItemDescriptor({ value: t.id + "", label: t.displayName, html: AJS.escapeHTML(String(t.displayName)) }) }, t }), AJS.namespace("GH.ProjectPicker", null, require("jira-agile/projects/project-picker")); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:gh-create-board', location = 'includes/js/rapid/ui/startwizard/WizardView.soy' */ // This file was automatically generated from WizardView.soy. // Please don't edit this file by hand. /** * @fileoverview Templates in namespace GH.tpl.startwizard. */ if (typeof GH == 'undefined') { var GH = {}; } if (typeof GH.tpl == 'undefined') { GH.tpl = {}; } if (typeof GH.tpl.startwizard == 'undefined') { GH.tpl.startwizard = {}; } GH.tpl.startwizard.renderMethodologySelectionStep = function (opt_data, opt_ignored) { return '

    ' + soy.$$escapeHtml('Scrum') + '

    ' + soy.$$escapeHtml('Scrum focuses on planning, committing and delivering time-boxed chunks of work called Sprints.') + '

    ' + soy.$$escapeHtml('Kanban') + '

    ' + soy.$$escapeHtml('Kanban focuses on visualising your workflow and limiting work-in-progress to facilitate incremental improvements to your existing process.') + '

    ' + ((opt_data.isSampleDataAvailable && opt_data.canCreateProject) ? '
    ' : '') + '
    '; }; if (goog.DEBUG) { GH.tpl.startwizard.renderMethodologySelectionStep.soyTemplateName = 'GH.tpl.startwizard.renderMethodologySelectionStep'; } GH.tpl.startwizard.renderMethodSelectionStep = function (opt_data, opt_ignored) { return '
    ' + ((opt_data.canCreateProject) ? '
    ' + soy.$$escapeHtml('A new board based on a new Software project') + '
    ' : '') + ((opt_data.hasProjectsAccessible) ? '
    ' + soy.$$escapeHtml('Boards can contain one or more projects.') + '
    ' : '') + ((opt_data.hasFiltersAccessible) ? '
    ' + soy.$$escapeHtml('An advanced option using a JQL filter.') + '
    ' : '') + '
    '; }; if (goog.DEBUG) { GH.tpl.startwizard.renderMethodSelectionStep.soyTemplateName = 'GH.tpl.startwizard.renderMethodSelectionStep'; } GH.tpl.startwizard.renderProjectSelectionStep = function (opt_data, opt_ignored) { return '
    ' + soy.$$escapeHtml('Select one or more projects to be included in this board.') + '
    '; }; if (goog.DEBUG) { GH.tpl.startwizard.renderProjectSelectionStep.soyTemplateName = 'GH.tpl.startwizard.renderProjectSelectionStep'; } GH.tpl.startwizard.renderFilterSelectionStep = function (opt_data, opt_ignored) { return '

    ' + soy.$$escapeHtml('Saved Filters') + '

    ' + soy.$$escapeHtml('Choose from a list of existing filters as a base for your new board. To create a new Saved Filter, save a search in the Issue Navigator.') + '
    '; }; if (goog.DEBUG) { GH.tpl.startwizard.renderFilterSelectionStep.soyTemplateName = 'GH.tpl.startwizard.renderFilterSelectionStep'; } GH.tpl.startwizard.renderProjectCreationStep = function (opt_data, opt_ignored) { return '
    ' + soy.$$escapeHtml('Start typing to get a list of possible matches.') + '

    ' + soy.$$escapeHtml('Creating a project') + '

    ' + soy.$$escapeHtml('A board will be created with your project, and will be named after your project. You can rename your board in the board configuration screen.') + '
    '; }; if (goog.DEBUG) { GH.tpl.startwizard.renderProjectCreationStep.soyTemplateName = 'GH.tpl.startwizard.renderProjectCreationStep'; } GH.tpl.startwizard.renderPermissionInfo = function (opt_data, opt_ignored) { return '
    ' + GH.tpl.rapid.view.renderPermissionEntries({permissionEntries: opt_data.savedFilter.permissionEntries}) + '
    ' + soy.$$escapeHtml(opt_data.savedFilter.owner.displayName) + '
    '; }; if (goog.DEBUG) { GH.tpl.startwizard.renderPermissionInfo.soyTemplateName = 'GH.tpl.startwizard.renderPermissionInfo'; } GH.tpl.startwizard.createProjectTimeout = function (opt_data, opt_ignored) { return '' + soy.$$filterNoAutoescape(AJS.format('The operation has timed out, the project and board might have been created already. You can confirm this by checking the \x3ca href\x3d\x22{0}\x22\x3eManage Boards\x3c/a\x3e page.', opt_data.manageBoardURL)); }; if (goog.DEBUG) { GH.tpl.startwizard.createProjectTimeout.soyTemplateName = 'GH.tpl.startwizard.createProjectTimeout'; } } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:gh-create-board', location = 'includes/js/rapid/configuration/RapidView.soy' */ // This file was automatically generated from RapidView.soy. // Please don't edit this file by hand. /** * @fileoverview Templates in namespace GH.tpl.rapid.view. */ if (typeof GH == 'undefined') { var GH = {}; } if (typeof GH.tpl == 'undefined') { GH.tpl = {}; } if (typeof GH.tpl.rapid == 'undefined') { GH.tpl.rapid = {}; } if (typeof GH.tpl.rapid.view == 'undefined') { GH.tpl.rapid.view = {}; } GH.tpl.rapid.view.renderConfigurationHeader = function (opt_data, opt_ignored) { return '
    ' + aui.buttons.button({ text: 'Back to board', type: 'subtle', href: GH.Ajax.CONTEXT_PATH + '/secure/RapidBoard.jspa?rapidView=' + opt_data.rapidViewId + '&useStoredSettings=true', id: 'back-to-board', iconType: 'aui', iconText: 'Back to board', iconClass: 'aui-icon-small aui-iconfont-back-page' }) + '

    ' + soy.$$escapeHtml('Configure') + ' ' + soy.$$escapeHtml(opt_data.name) + '

    '; }; if (goog.DEBUG) { GH.tpl.rapid.view.renderConfigurationHeader.soyTemplateName = 'GH.tpl.rapid.view.renderConfigurationHeader'; } GH.tpl.rapid.view.renderConfigurationTabs = function (opt_data, opt_ignored) { var output = '
    '; var configurationTabList35 = opt_data.configurationTabs; var configurationTabListLen35 = configurationTabList35.length; for (var configurationTabIndex35 = 0; configurationTabIndex35 < configurationTabListLen35; configurationTabIndex35++) { var configurationTabData35 = configurationTabList35[configurationTabIndex35]; output += '
    ' + soy.$$filterNoAutoescape(configurationTabData35.html) + '
    '; } output += '
    '; return output; }; if (goog.DEBUG) { GH.tpl.rapid.view.renderConfigurationTabs.soyTemplateName = 'GH.tpl.rapid.view.renderConfigurationTabs'; } GH.tpl.rapid.view.renderViewNameEditForm = function (opt_data, opt_ignored) { var output = ''; var label__soy45 = 'Board name'; output += '' + GH.tpl.rapid.view.renderViewNameField({ rapidViewName: opt_data.rapidViewName, canEdit: opt_data.canEdit, label: label__soy45 }); return output; }; if (goog.DEBUG) { GH.tpl.rapid.view.renderViewNameEditForm.soyTemplateName = 'GH.tpl.rapid.view.renderViewNameEditForm'; } GH.tpl.rapid.view.renderViewNameField = function (opt_data, opt_ignored) { return '' + soy.$$escapeHtml(opt_data.rapidViewName) + ''; }; if (goog.DEBUG) { GH.tpl.rapid.view.renderViewNameField.soyTemplateName = 'GH.tpl.rapid.view.renderViewNameField'; } GH.tpl.rapid.view.renderViewBoardAdminsEditForm = function (opt_data, opt_ignored) { var output = ''; var itemList81 = opt_data.model; var itemListLen81 = itemList81.length; if (itemListLen81 > 0) { for (var itemIndex81 = 0; itemIndex81 < itemListLen81; itemIndex81++) { var itemData81 = itemList81[itemIndex81]; output += soy.$$escapeHtml(itemData81.displayName) + ((!(itemIndex81 == itemListLen81 - 1)) ? ', ' : ''); } } else { output += '' + soy.$$escapeHtml('None') + ''; } output += '' + ((opt_data.canUsePicker) ? '' : '') + ''; return output; }; if (goog.DEBUG) { GH.tpl.rapid.view.renderViewBoardAdminsEditForm.soyTemplateName = 'GH.tpl.rapid.view.renderViewBoardAdminsEditForm'; } GH.tpl.rapid.view.renderBoardAdminsEditNoPicker = function (opt_data, opt_ignored) { var output = '' + soy.$$escapeHtml('Groups') + ': ' + soy.$$escapeHtml('Users') + ':
    ' + soy.$$escapeHtml('Separate user keys and group names with commas.') + '
    '; return output; }; if (goog.DEBUG) { GH.tpl.rapid.view.renderBoardAdminsEditNoPicker.soyTemplateName = 'GH.tpl.rapid.view.renderBoardAdminsEditNoPicker'; } GH.tpl.rapid.view.renderConfigPermissionsWarning = function (opt_data, opt_ignored) { return '' + ((opt_data.model.canEdit != true) ? '

    ' + soy.$$escapeHtml('Contact a Jira or Board Administrator to configure this board.') + '

    ' : ''); }; if (goog.DEBUG) { GH.tpl.rapid.view.renderConfigPermissionsWarning.soyTemplateName = 'GH.tpl.rapid.view.renderConfigPermissionsWarning'; } GH.tpl.rapid.view.renderFilterDetails = function (opt_data, opt_ignored) { var output = '
    ' + soy.$$escapeHtml(opt_data.savedFilter.name) + '

    ' + ((opt_data.savedFilter.canEdit) ? soy.$$escapeHtml('Edit Filter Query') : soy.$$escapeHtml('View Filter Query')) + '

    ' + GH.tpl.rapid.view.renderPermissionInfo(opt_data) + '
    ' + ((opt_data.savedFilter.query) ? soy.$$escapeHtml(opt_data.savedFilter.query) : '') + '
    '; if (opt_data.savedFilter.isOrderedByRank) { output += soy.$$escapeHtml('Using Rank'); } else { if (!opt_data.savedFilter.orderByWarnings) { output += soy.$$escapeHtml('Ranking is disabled, as the Filter Query is not ordered by Rank'); } else { var warningList171 = opt_data.savedFilter.orderByWarnings.errorMessages; var warningListLen171 = warningList171.length; for (var warningIndex171 = 0; warningIndex171 < warningListLen171; warningIndex171++) { var warningData171 = warningList171[warningIndex171]; output += soy.$$escapeHtml(warningData171) + '
    '; } } output += (opt_data.savedFilter.canEdit && opt_data.savedFilter.canBeFixed) ? '

    ' : ''; } output += '
    '; if (opt_data.savedFilter.queryProjects) { output += '
      '; if (opt_data.savedFilter.queryProjects.displayMessage) { output += '' + soy.$$escapeHtml(opt_data.savedFilter.queryProjects.displayMessage) + ''; } else { var avatarSize__soy192 = 'small'; var projectList193 = opt_data.savedFilter.queryProjects.projects; var projectListLen193 = projectList193.length; for (var projectIndex193 = 0; projectIndex193 < projectListLen193; projectIndex193++) { var projectData193 = projectList193[projectIndex193]; output += '
    • ' + aui.avatar.avatar({ isProject: 'true', size: '' + soy.$$escapeHtml(avatarSize__soy192), avatarImageUrl: soy.$$escapeHtml("") + '/secure/projectavatar?size=' + soy.$$escapeHtml(avatarSize__soy192) + '&pid=' + soy.$$escapeHtml(projectData193.id), extraClasses: 'jira-system-avatar', accessibilityText: '' + soy.$$escapeHtml(AJS.format('Project Avatar for {0}', projectData193.name)) }) + '' + soy.$$escapeHtml(projectData193.name) + '

      '; var viewProjectPermissionText__soy213 = 'View permission'; output += ((projectData193.isValidEditProjectConfigAction) ? '' + soy.$$escapeHtml(viewProjectPermissionText__soy213) + '' : '' + soy.$$escapeHtml(viewProjectPermissionText__soy213) + '') + '

    • '; } } output += '
    '; } output += (opt_data.isSubqueriesConfigurable) ? '
    ' + GH.tpl.rapid.view.renderSubQueryView({ section: 'board.kanban.work', queryValue: opt_data.subqueries[0], canEdit: opt_data.canEdit }) + '
    ' + soy.$$escapeHtml('Further filtering of issues for unreleased work.') + '
    ' : ''; if (opt_data.isOldDoneIssuesCutoffConfigurable) { output += '
    ' + soy.$$escapeHtml('Speed up your board by hiding issues you\x27re no longer working on.') + '
    '; } output += '
    '; return output; }; if (goog.DEBUG) { GH.tpl.rapid.view.renderFilterDetails.soyTemplateName = 'GH.tpl.rapid.view.renderFilterDetails'; } GH.tpl.rapid.view.renderSubQueryView = function (opt_data, opt_ignored) { return '' + ((opt_data.queryValue) ? soy.$$escapeHtml(opt_data.queryValue) : (opt_data.canEdit) ? '' + soy.$$escapeHtml('Add Sub-Filter') + '' : soy.$$escapeHtml('No sub-filter')) + ''; }; if (goog.DEBUG) { GH.tpl.rapid.view.renderSubQueryView.soyTemplateName = 'GH.tpl.rapid.view.renderSubQueryView'; } GH.tpl.rapid.view.renderSubQueryControls = function (opt_data, opt_ignored) { return ''; }; if (goog.DEBUG) { GH.tpl.rapid.view.renderSubQueryControls.soyTemplateName = 'GH.tpl.rapid.view.renderSubQueryControls'; } GH.tpl.rapid.view.renderPermissionInfo = function (opt_data, opt_ignored) { return '
    ' + GH.tpl.rapid.view.renderPermissionEntries({permissionEntries: opt_data.savedFilter.permissionEntries}) + ((opt_data.savedFilter.canEdit) ? '

    ' + soy.$$escapeHtml('Edit Filter Shares') + '

    ' : '
    ' + soy.$$filterNoAutoescape(opt_data.savedFilter.owner.renderedLink) + '') + '
    '; }; if (goog.DEBUG) { GH.tpl.rapid.view.renderPermissionInfo.soyTemplateName = 'GH.tpl.rapid.view.renderPermissionInfo'; } GH.tpl.rapid.view.renderPermissionEntries = function (opt_data, opt_ignored) { var output = ''; if (opt_data.permissionEntries.length > 0) { output += '
      '; var permissionEntryList319 = opt_data.permissionEntries; var permissionEntryListLen319 = permissionEntryList319.length; for (var permissionEntryIndex319 = 0; permissionEntryIndex319 < permissionEntryListLen319; permissionEntryIndex319++) { var permissionEntryData319 = permissionEntryList319[permissionEntryIndex319]; output += '
    • '; var permissionValueList321 = permissionEntryData319.values; var permissionValueListLen321 = permissionValueList321.length; for (var permissionValueIndex321 = 0; permissionValueIndex321 < permissionValueListLen321; permissionValueIndex321++) { var permissionValueData321 = permissionValueList321[permissionValueIndex321]; output += '' + soy.$$filterNoAutoescape(permissionValueData321.name) + ''; } output += '
    • '; } output += '
    '; } else { output += '' + soy.$$escapeHtml('No shares') + ''; } return output; }; if (goog.DEBUG) { GH.tpl.rapid.view.renderPermissionEntries.soyTemplateName = 'GH.tpl.rapid.view.renderPermissionEntries'; } GH.tpl.rapid.view.deleteForm = function (opt_data, opt_ignored) { return ''; }; if (goog.DEBUG) { GH.tpl.rapid.view.deleteForm.soyTemplateName = 'GH.tpl.rapid.view.deleteForm'; } GH.tpl.rapid.view.confirmForm = function (opt_data, opt_ignored) { return '

    ' + soy.$$escapeHtml('Confirmation') + '

    ' + soy.$$filterNoAutoescape(opt_data.message) + '

    '; }; if (goog.DEBUG) { GH.tpl.rapid.view.confirmForm.soyTemplateName = 'GH.tpl.rapid.view.confirmForm'; } } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:gh-create-board', location = 'includes/js/rapid/ui/startwizard/WizardView.js' */ GH.StartWizardView = {}, GH.StartWizardView.dialog = void 0, GH.StartWizardView.model = void 0, GH.StartWizardView.stepsNameStack = void 0, GH.StartWizardView.pages = {}, GH.StartWizardView.filterPicker = void 0, GH.StartWizardView.projectPicker = void 0, function () { var e = require("jira-agile/rapid/analytics-tracker"); GH.StartWizardView.analytics = new e("gh.create.wizard") }(), GH.StartWizardView.wizardStepPreRenderCallbacks = [], GH.StartWizardView.wizardStepPostRenderCallbacks = [], GH.StartWizardView.wizardStepOnValidateCallbacks = [], GH.StartWizardView.wizardStepOnCreateCallbacks = [], GH.StartWizardView.steps = { methodologySelection: { render: function (e) { var t = { isSampleDataAvailable: GH.Config.isSampleDataAvailable, canCreateProject: GH.UserData.canCreateProject() }; return {header: "Create an Agile board", content: GH.tpl.startwizard.renderMethodologySelectionStep(t)} }, bind: function (e, t) { AJS.$("#ghx-wizard-methodology-scrum").click(function (e) { e.preventDefault(), t.sampleData = !1, GH.StartWizardView.selectMethodology("scrum", t) }), AJS.$("#ghx-wizard-methodology-kanban").click(function (e) { e.preventDefault(), t.sampleData = !1, GH.StartWizardView.selectMethodology("kanban", t) }), AJS.$("#ghx-wizard-methodology-scrum-sample").click(function (e) { e.preventDefault(), t.sampleData = !0, GH.StartWizardView.selectMethodology("scrum", t) }), AJS.$("#ghx-wizard-methodology-kanban-sample").click(function (e) { e.preventDefault(), t.sampleData = !0, GH.StartWizardView.selectMethodology("kanban", t) }) } }, methodSelection: { render: function (e) { var t = e.method; return t || (t = GH.UserData.userConfig.canCreateProject ? "newProject" : "existingProject"), { header: "Create an Agile board", content: GH.tpl.startwizard.renderMethodSelectionStep(_.extend({}, e, { canCreateProject: GH.UserData.userConfig.canCreateProject, hasProjectsAccessible: GH.UserData.userConfig.hasProjectsAccessible, hasFiltersAccessible: GH.UserData.userConfig.hasFiltersAccessible, selectedOption: t })) } }, bind: function (e) { }, next: function (e, t) { var a = e.find("input[name=ghx-wizard-method]").filter(":checked").val(); t.method = a; var r = AJS.$.Deferred(); return "newProject" === a ? r.resolve("projectCreation") : "existingProject" === a ? r.resolve("projectSelection") : "existingFilter" === a ? r.resolve("filterSelection") : r.reject(new Error("Unknown board creation method : " + a)), r.promise() } }, projectCreation: { render: function (e) { return e.prefix = "project", GH.StartWizardView.renderProjectCreation({ user: GH.UserData.userConfig, prefix: "project", sampleInfo: {projectName: "", projectKey: ""} }) }, bind: function (e, t) { GH.StartWizardView.bindProjectCreation(e, t) }, completeActionName: "Create board", complete: function (e) { return GH.StartWizardView.createProject(GH.StartWizardView.dialog, e) } }, sampleProjectCreation: { render: function (e) { return e.prefix = "sample", GH.StartWizardView.renderProjectCreation({ user: GH.UserData.userConfig, prefix: "sample", sampleInfo: e.sampleInfo }) }, bind: function (e, t) { GH.StartWizardView.bindProjectCreation(e, t) }, completeActionName: "Create board", complete: function (e) { return GH.StartWizardView.createSampleProject(GH.StartWizardView.dialog, e) } }, projectSelection: { render: function (e) { return {header: "Name this board", content: GH.tpl.startwizard.renderProjectSelectionStep()} }, bind: function (e, t) { GH.StartWizardView.bindProjectSelection(e, t) }, completeActionName: "Create board", complete: function (e) { return GH.StartWizardView.validateProjectSelection(e) } }, filterSelection: { render: function (e) { return {header: "Name this board", content: GH.tpl.startwizard.renderFilterSelectionStep()} }, bind: function (e, t) { GH.StartWizardView.bindFilterSelection(e, t) }, completeActionName: "Create board", complete: function (e) { return GH.StartWizardView.validateFilterSelection(e) } } }, GH.StartWizardView.show = function (e) { GH.StartWizardView.dialog || (GH.StartWizardView.dialog = GH.Dialog.create({ width: 840, height: 400, id: "ghx-wizard-dialog", onCancelFn: function () { GH.StartWizardView.disposeWizard(), GH.StartWizardView.analytics.trigger("cancel") } }), GH.StartWizardView.model = {}, GH.StartWizardView.stepsNameStack = [], GH.StartWizardView.dialog.show(), GH.StartWizardView.analytics.trigger("start"), GH.StartWizardView.preventSubmitOnEnter()) }, GH.StartWizardView.preventSubmitOnEnter = function () { var e = function (e) { if (13 == e.keyCode && "ghx-wizard-filter-select-field" != e.target.id) return e.preventDefault(), !1 }; AJS.$("input").keydown(e) }, GH.StartWizardView.showStep = function (e) { if (!_.has(GH.StartWizardView.steps, e)) throw new Error("Unknown wizard step " + e); var t = GH.StartWizardView.dialog; if (GH.StartWizardView.pages[e]) t.gotoPage(GH.StartWizardView.pages[e]), GH.StartWizardView.dialog.popup.element.find(".dialog-panel-body .aui-message-error").remove(); else { var a = GH.StartWizardView.steps[e], r = a.render(GH.StartWizardView.model); _.each(GH.StartWizardView.wizardStepPreRenderCallbacks, function (t) { t(e) }), t.addPage(), GH.StartWizardView.pages[e] = t.curpage, t.addHeader(r.header); var i = AJS.$(r.content); if (t.addPanel(null, i, "ghx-wizard-panel"), _.each(GH.StartWizardView.wizardStepPostRenderCallbacks, function (a) { a(e, t) }), GH.StartWizardView.stepsNameStack.length > 0 && t.addButton("Back", function () { var e = GH.StartWizardView.stepsNameStack.pop(); GH.StartWizardView.showStep(e) }, "aui-button"), _.has(a, "complete")) { var o = function () { var e = AJS.$(this), t = e.attr("aria-disabled"); "true" != t && a.complete(GH.StartWizardView.model) }; t.addButton(a.completeActionName, o, "aui-button aui-button-primary js-wizard-button-complete") } else if (_.has(a, "next")) { var n = function () { var r = AJS.$(this), o = r.attr("aria-disabled"); if ("true" != o) { var n = a.next(i, GH.StartWizardView.model), d = function (t) { GH.StartWizardView.stepsNameStack.push(e), GH.StartWizardView.showStep(t) }, l = function (e) { console.log(e), t.updateHeight() }, c = !0; _.each(GH.StartWizardView.wizardStepOnValidateCallbacks, function (a) { a(e, t) || (c = !1) }), n.done(function (e) { c ? d(e) : l("GH project create extension callback returned failure") }).fail(l) } }; t.addButton("Next", n, "aui-button aui-button-primary js-wizard-button-next") } t.addCancel("Cancel", function () { t.cancel() }), a.bind(i, GH.StartWizardView.model) } t.updateHeight(), GH.StartWizardView.preventSubmitOnEnter() }, GH.StartWizardView.startWizard = function () { GH.StartWizardView.show(), GH.StartWizardView.showStep("methodologySelection") }, GH.StartWizardView.disposeWizard = function () { GH.StartWizardView.dialog = void 0, GH.StartWizardView.pages = {} }, GH.StartWizardView.genStartFunction = function (e, t) { return function () { GH.StartWizardView.show(), GH.StartWizardView.model.sampleData = t, GH.StartWizardView.selectMethodology(e, GH.StartWizardView.model) } }, GH.StartWizardView.bindWelcomePage = function () { GH.Dialog.registerDialog(".js-wizard-scrum", GH.StartWizardView.genStartFunction("scrum", !1)), GH.Dialog.registerDialog(".js-wizard-scrum-sample", GH.StartWizardView.genStartFunction("scrum", !0)), GH.Dialog.registerDialog(".js-wizard-kanban", GH.StartWizardView.genStartFunction("kanban", !1)), GH.Dialog.registerDialog(".js-wizard-kanban-sample", GH.StartWizardView.genStartFunction("kanban", !0)) }, GH.StartWizardView.getCreateProjectRequest = function (e) { var t = e.project, a = { projectName: t.name, projectKey: t.key, projectLeadUserName: t.lead, boardName: e.boardName, preset: e.methodology, sampleData: e.sampleData }; return a }, GH.StartWizardView.createProject = function (e, t) { GH.StartWizardView.populateProjectCreationProperties(t); var a = GH.StartWizardView.getCreateProjectRequest(t); e.disableControls(), e.showSpinner(); var r = { url: "/welcome/createProject", data: a, errorContextMap: { projectName: "#ghx-wizard-" + t.prefix + "-projectname", projectKey: "#ghx-wizard-" + t.prefix + "-projectkey", projectLead: "#ghx-wizard-" + t.prefix + "-projectlead" }, timeout: 12e4, deferErrorHandling: !0 }; return GH.Ajax.put(r).done(function (a) { function r() { if (0 == GH.StartWizardView.wizardStepOnCreateCallbacks.length) i(); else { var a = GH.StartWizardView.wizardStepOnCreateCallbacks.pop(); a(e, r, t) } } a.success.sample = t.sampleData, GH.PersistentMessages.WelcomeMessage.show(a.success); var i = function () { GH.StartWizardView.gotoCreatedView(a.success.rapidView.id, t.methodology) }; r() }).fail(function (t, a, i, o) { _.each(t.getGlobalErrors(), function (e) { 504 == e.status && (e.message = GH.tpl.startwizard.createProjectTimeout({manageBoardURL: GH.RapidBoard.getManageViewsPageUrl()}), e.noAutoescape = !0) }), GH.Ajax.handleContextualErrors(t, r.errorContextMap), GH.Ajax.handleGlobalErrors(t, r.errorContextMap), e.hideSpinner(), e.enableControls(), e.updateHeight() }) }, GH.StartWizardView.validateProjectSelection = function (e) { GH.StartWizardView.dialog.disableControls(), GH.StartWizardView.dialog.showSpinner(); var t = AJS.$("#ghx-wizard-project-board-name"); return GH.Validation.clearContextualErrors(GH.StartWizardView.projectPicker.getElement()), GH.Validation.clearContextualErrors(t), GH.Ajax.post({ url: "/rapidview/create/presets", data: {name: t.val(), projectIds: GH.StartWizardView.projectPicker.getValue(), preset: e.methodology}, errorContextMap: { name: "#ghx-wizard-project-board-name", projectIds: GH.StartWizardView.projectPicker.selector } }).done(function (t) { console.log("mode: " + e), GH.StartWizardView.handleCreate(t, "simple", e.methodology) }).fail(function () { GH.StartWizardView.dialog.enableControls(), GH.StartWizardView.dialog.hideSpinner(), GH.StartWizardView.dialog.updateHeight() }) }, GH.StartWizardView.validateFilterSelection = function (e) { var t = AJS.$("#ghx-wizard-filter-view-name"), a = GH.StartWizardView.filterPicker.getElement(), r = AJS.$(GH.StartWizardView.filterPicker.selector); GH.Validation.clearContextualErrors(t), GH.Validation.clearContextualErrors(a); var i = r.val() ? r.val()[0] : null; return GH.StartWizardView.dialog.disableControls(), GH.StartWizardView.dialog.showSpinner(), GH.Ajax.post({ url: "/rapidview/create/advanced", data: {name: t.val(), filterId: i, methodology: e.methodology}, errorContextMap: {name: "#ghx-wizard-filter-view-name", filterId: GH.StartWizardView.filterPicker.selector} }).done(function (t) { GH.StartWizardView.handleCreate(t, "simple", e.methodology) }).fail(function () { GH.StartWizardView.dialog.hideSpinner(), GH.StartWizardView.dialog.enableControls(), GH.StartWizardView.dialog.updateHeight() }) }, GH.StartWizardView.handleCreate = function (e, t, a) { var r = t != a && a; GH.PersistentMessages.CreateViewMessage.setView(e.success.id, e.success.name, t, r), GH.StartWizardView.analytics.trigger("complete"), GH.StartWizardView.gotoCreatedView(e.success.id, a) }, GH.StartWizardView.gotoCreatedView = function (e, t) { var a = "scrum" == t ? "planning" : null; GH.Navigation.gotoDefaultRapidBoardPage(e, a) }, GH.StartWizardView.selectMethodology = function (e, t) { if (t.methodology = e, GH.StartWizardView.stepsNameStack.push("methodologySelection"), t.sampleData) GH.Ajax.get({url: "/welcome/sampledataproject?preset=" + t.methodology}, "sampledataproject").done(function (e) { t.sampleInfo = e, GH.StartWizardView.showStep("sampleProjectCreation") }).fail(function () { GH.StartWizardView.showStep("sampleProjectCreation") }); else { var a = GH.UserData.userConfig.canCreateProject, r = GH.UserData.userConfig.hasProjectsAccessible, i = GH.UserData.userConfig.hasFiltersAccessible; a || i ? r || i ? GH.StartWizardView.showStep("methodSelection") : GH.StartWizardView.showStep("projectCreation") : GH.StartWizardView.showStep("projectSelection") } }, GH.StartWizardView.populateProjectCreationProperties = function (e) { var t = AJS.$("#ghx-wizard-" + e.prefix + "-projectname"), a = AJS.$("#ghx-wizard-" + e.prefix + "-projectkey"), r = AJS.$("#ghx-wizard-" + e.prefix + "-projectlead"); GH.Validation.clearContextualErrors(t), GH.Validation.clearContextualErrors(a), GH.Validation.clearContextualErrors(r), e.project = { name: t.val(), key: a.val().toUpperCase(), lead: AJS.$("#ghx-wizard-" + e.prefix + "-projectlead option:selected").val() } }, GH.StartWizardView.createSampleProject = function (e, t) { t.sampleData = !0, GH.StartWizardView.createProject(e, t) }, GH.StartWizardView.validateBoardName = function (e, t) { return GH.Validation.clearContextualErrors(e), t.boardName = e.val(), !!t.boardName || (GH.Validation.showContextualErrors(e, "Please enter a name for your board."), !1) }, GH.StartWizardView.renderProjectCreation = function (e) { return {header: "New project with board", content: GH.tpl.startwizard.renderProjectCreationStep(e)} }, GH.StartWizardView.bindProjectSelection = function (e, t) { GH.StartWizardView.projectPicker = new GH.ProjectPicker({ selector: "#ghx-wizard-choose-project", change: function () { GH.StartWizardView.dialog.updateHeight() }, currentProjectId: JIRA.API && JIRA.API.Projects ? JIRA.API.Projects.getCurrentProjectId() : null }), GH.StartWizardView.projectPicker.multiselect.keys.Return = function (e) { e.preventDefault() }, GH.StartWizardView.attachDependantButton({ buttonIndex: 1, selectors: ["#ghx-wizard-project-board-name", "#ghx-wizard-choose-project"] }) }, GH.StartWizardView.bindProjectCreation = function (e, t) { AJS.$("#ghx-wizard-" + t.prefix + "-projectkey").generateFrom(AJS.$("#ghx-wizard-" + t.prefix + "-projectname"), { maxNameLength: 64, maxKeyLength: 64 }), JIRA.trigger(JIRA.Events.NEW_CONTENT_ADDED, [e]), e.trigger("contentRefresh"); var a = GH.StartWizardView.dialog, r = a.page[a.curpage]; r.button[1].item; GH.StartWizardView.attachDependantButton({ buttonIndex: 1, selectors: ["#ghx-wizard-" + t.prefix + "-projectname", "#ghx-wizard-" + t.prefix + "-projectkey", "#ghx-wizard-" + t.prefix + "-projectlead"] }) }, GH.StartWizardView.bindFilterSelection = function (e, t) { var a = function (e, a) { var r = ""; if (delete t.savedFilter, a && a.properties) { var i = a.properties.savedFilter; r = null != i ? GH.tpl.startwizard.renderPermissionInfo({savedFilter: i}) : "", t.savedFilter = i } AJS.$("#ghx-create-permissioninfo-container").html(r), GH.StartWizardView.dialog.updateHeight() }; GH.StartWizardView.filterPicker = new GH.SavedFilterPicker({ selector: "#ghx-wizard-filter-select", selected: a, stayActivated: !0 }), GH.StartWizardView.filterPicker.show(t.savedFilter), GH.StartWizardView.filterPicker.singleSelect.keys.Return = function (e) { e.preventDefault() }, GH.StartWizardView.attachDependantButton({ buttonIndex: 1, selectors: ["#ghx-wizard-filter-view-name", "#ghx-wizard-filter-select"] }) }, GH.StartWizardView.attachDependantButton = function (e) { var t = GH.StartWizardView.dialog, a = t.page[t.curpage], r = a.button[e.buttonIndex].item; GH.StartWizardView.dependantValidationListener({ selectors: e.selectors, full: function () { r.attr("aria-disabled", "false") }, empty: function () { r.attr("aria-disabled", "true") } }) }, GH.StartWizardView.dependantValidationListener = function (e) { function t() { var t = _.filter(e.selectors, function (e) { var t = AJS.$(e); return !AJS.$.trim(t.val()) }); return _.isEmpty(t) ? e.full() : e.empty() } function a() { e.nowait ? t() : setTimeout(t, 50) } _.isEmpty(e.selectors) || (e.full = e.full || AJS.$.noop(), e.empty = e.empty || AJS.$.noop(), e.nowait = e.nowait || !1, _.each(e.selectors, function (e) { var t = AJS.$(e); t.on("input", a), t.on("change", a), t.on("selected", a), t.on("unselect", a) }), t()) }, GH.StartWizardView.registerWizardStepPreRenderCallback = function (e) { GH.StartWizardView.wizardStepPreRenderCallbacks.push(e) }, GH.StartWizardView.registerWizardStepPostRenderCallback = function (e) { GH.StartWizardView.wizardStepPostRenderCallbacks.push(e) }, GH.StartWizardView.registerWizardStepOnValidateCallback = function (e) { GH.StartWizardView.wizardStepOnValidateCallbacks.push(e) }, GH.StartWizardView.registerWizardStepOnCreateCallbacks = function (e) { GH.StartWizardView.wizardStepOnCreateCallbacks.push(e) }; } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:gh-create-board', location = 'includes/js/rapid/ui/component/SavedFilterPicker.js' */ GH.SavedFilterPicker = function (e) { this.selector = e.selector, this.fieldSelector = e.selector + "-field", this.blurHandler = e.blur, this.selectHandler = e.selected, this.stayActivated = e.stayActivated, this.focus = e.focus, this.ariaLabel = e.ariaLabel }, GH.SavedFilterPicker.prototype.show = function (e) { var t = AJS.$(this.selector), i = new AJS.SingleSelect({ element: t, width: 300, removeOnUnSelect: !0, itemAttrDisplayed: "label", errorMessage: "", ajaxOptions: { query: !0, url: GH.Ajax.buildRestUrl("/savedfilter/list.json"), formatResponse: function (e) { if (e.errors) { var i = GH.Ajax._convertJiraErrors(e.errors), r = {searchName: this.selector}; return GH.Ajax.handleContextualErrors(i, r), !1 } t.siblings(".ghx-error").remove(); var s = []; return AJS.$(e.filters).each(function () { s.push(new AJS.ItemDescriptor({ value: this.id.toString(), label: this.name, html: AJS.escapeHTML(String(this.name)), savedFilter: this })) }), s } }, ariaLabel: this.ariaLabel }); this.singleSelect = i; var r = this.removeSingleSelect; this.stayActivated || AJS.$(this.fieldSelector).blur(function () { r(i) }), _.isFunction(this.blurHandler) && AJS.$(this.fieldSelector).blur(this.blurHandler), this.focus && AJS.$(this.fieldSelector).focus().select(), e && this.setSelection(e); var s = this.selectHandler; this.stayActivated ? (t.bind("selected", s), t.bind("unselect", s)) : (t.bind("selected", function (e, t) { r(i), s(e, t) }), t.bind("unselect", function (e, t) { r(i), s(e, t) })) }, GH.SavedFilterPicker.prototype.setSelection = function (e) { this.singleSelect.setSelection(new AJS.ItemDescriptor({ value: e.id.toString(), label: e.name, html: AJS.escapeHTML(String(e.name)), savedFilter: e, selected: !0 })) }, GH.SavedFilterPicker.prototype.removeSingleSelect = function (e) { e.hideSuggestions(), e.disable() }, GH.SavedFilterPicker.prototype.getElement = function () { return this.singleSelect.$field }; } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:gh-create-board', location = 'includes/js/lib/jquery/jquery.keygen.js' */ !function (e, t) { e.KeyGenerator = function () { var e = ["THE", "A", "AN", "AS", "AND", "OF", "OR"], n = {}, a = function (e) { return e.join("").length }, r = function (n) { return t.grep(n, function (n, a) { return t.inArray(n, e) === -1 }) }, o = function (e) { var n = ""; return t.each(e, function (e, t) { n += t.charAt(0) }), n }, u = function (e) { var t, n = !1; for (t = 0; t < e.length; t++) if (i(e[t])) n = !0; else if (n) return e.substring(0, t + 1); return e }, i = function (e) { return e && 1 === e.length && e.search("[AEIOUY]") !== -1 }; return n[199] = "C", n[231] = "c", n[252] = "u", n[251] = "u", n[250] = "u", n[249] = "u", n[233] = "e", n[234] = "e", n[235] = "e", n[232] = "e", n[226] = "a", n[228] = "a", n[224] = "a", n[229] = "a", n[225] = "a", n[239] = "i", n[238] = "i", n[236] = "i", n[237] = "i", n[196] = "A", n[197] = "A", n[201] = "E", n[230] = "ae", n[198] = "Ae", n[244] = "o", n[246] = "o", n[242] = "o", n[243] = "o", n[220] = "U", n[255] = "Y", n[214] = "O", n[241] = "n", n[209] = "N", { generateKey: function (e, i) { i = t.extend({}, i); var c = "number" == typeof i.desiredKeyLength ? i.desiredKeyLength : 4, h = "number" == typeof i.maxKeyLength ? i.maxKeyLength : 1 / 0; if (e = t.trim(e), !e) return ""; for (var s = [], g = 0, f = e.length; g < f; g++) { var l = n[e.charCodeAt(g)]; s.push(l ? l : e[g]) } e = s.join(""); var d = []; t.each(e.split(/\s+/), function (e, t) { t && (t = t.replace(/[^a-zA-Z]/g, ""), t = t.toUpperCase(), t.length && d.push(t)) }), c && a(d) > c && (d = r(d)); var m; if (0 == d.length) m = ""; else if (1 == d.length) { var v = d[0], y = u(v); m = h < v.length || Math.abs(v.length - c) >= Math.abs(y.length - c) ? y : v } else { var K = a(d), x = o(d); m = h < K || Math.abs(K - c) >= Math.abs(x.length - c) ? x : d.join("") } return h && m.length > h && (m = m.substr(0, h)), m } } }; var n = e.KeyGenerator(); t.fn.generateFrom = function (e, a) { var r = { desiredKeyLength: 4, maxKeyLength: 10, maxNameLength: 30, timeoutMS: 100, validationCallback: function () { }, errorCallback: function () { } }, o = t(this).first(), e = e.first(), a = t.extend({}, r, a); return function () { var r = function () { return o.data("autosuggest") !== !1 }, u = function (e) { o.val() && o.data("lastGeneratedValue") !== o.val() && o.data("autosuggest", !1) }, i = function (e) { o.data("lastGeneratedValue", e), o.val(e) }, c = function () { u(o.val()), f() }, h = function (e) { s(e, c) }, s = function (e, n) { var r, o = t(e.target); r = function () { g(e), n(), o.is(":visible") && o.data("checkHook", setTimeout(r, a.timeoutMS)) }, o.data("checkHook") || o.data("checkHook", setTimeout(r, 0)) }, g = function (e) { var n = t(e.target); clearTimeout(n.data("checkHook")), n.removeData("checkHook") }, f = function () { r() && i(n.generateKey(e.val(), { desiredKeyLength: a.desiredKeyLength, maxKeyLength: a.maxKeyLength })) }; e.attr("maxlength", a.maxNameLength), o.attr("maxlength", a.maxKeyLength), o.css("text-transform", "uppercase"), document.activeElement && document.activeElement === e[0] && h({target: e[0]}), e.focus(h), e.blur(g) }(), this } }(window, jQuery); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.pyxis.greenhopper.jira:sidebar', location = 'includes/js/sidebar/create-board.js' */ AJS.$(function () { AJS.$("body").on("click", ".js-create-board", function (e) { e.preventDefault(), GH.UserData.userConfig = { canCreateProject: !1, hasProjectsAccessible: !0, hasFiltersAccessible: !0 }, GH.StartWizardView.startWizard() }) }); } catch (e) { WRMCB(e) } ; ; try { /* module-key = 'com.atlassian.analytics.analytics-client:js-events', location = 'js/store-1.3.1.js' */ (function () { var l = {}, h = window, k = h.document, c = "localStorage", n = "globalStorage", d = "__storejs__", g; l.disabled = false; l.set = function (e, o) { }; l.get = function (e) { }; l.remove = function (e) { }; l.clear = function () { }; l.transact = function (e, o) { var p = l.get(e); if (typeof p == "undefined") { p = {} } o(p); l.set(e, p) }; l.serialize = function (e) { return JSON.stringify(e) }; l.deserialize = function (e) { if (typeof e != "string") { return undefined } return JSON.parse(e) }; function b() { try { return (c in h && h[c]) } catch (e) { return false } } function m() { try { return (n in h && h[n] && h[n][h.location.hostname]) } catch (e) { return false } } if (b()) { g = h[c]; l.set = function (e, o) { if (o === undefined) { return l.remove(e) } g.setItem(e, l.serialize(o)) }; l.get = function (e) { return l.deserialize(g.getItem(e)) }; l.remove = function (e) { g.removeItem(e) }; l.clear = function () { g.clear() } } else { if (m()) { g = h[n][h.location.hostname]; l.set = function (e, o) { if (o === undefined) { return l.remove(e) } g[e] = l.serialize(o) }; l.get = function (e) { return l.deserialize(g[e] && g[e].value) }; l.remove = function (e) { delete g[e] }; l.clear = function () { for (var e in g) { delete g[e] } } } else { if (k.documentElement.addBehavior) { var j, f; try { f = new ActiveXObject("htmlfile"); f.open(); f.write('