{"version":3,"file":"../app.js","sources":["app.js"],"sourcesContent":["\n/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n * Copyright (c) 2021-present Kaleidos Ventures SL\n */\n\n(function() {\n var configure, i18nInit, init, module, modules, oldWindowOpen, pluginsModules, pluginsWithModule, taiga;\n\n this.taiga = taiga = {};\n\n taiga.emojis = window.emojis;\n\n this.taigaContribPlugins = this.taigaContribPlugins || window.taigaContribPlugins || [];\n\n taiga.generateHash = function(components) {\n if (components == null) {\n components = [];\n }\n components = _.map(components, function(x) {\n return JSON.stringify(x);\n });\n return hex_sha1(components.join(\":\"));\n };\n\n taiga.generateUniqueSessionIdentifier = function() {\n var date, randomNumber;\n date = (new Date()).getTime();\n randomNumber = Math.floor(Math.random() * 0x9000000);\n return taiga.generateHash([date, randomNumber]);\n };\n\n taiga.sessionId = taiga.generateUniqueSessionIdentifier();\n\n oldWindowOpen = window.open;\n\n window.open = (function(_this) {\n return function(url, name, config) {\n if (url.startsWith('/')) {\n url = document.baseURI + url;\n }\n return oldWindowOpen(url);\n };\n })(this);\n\n configure = function($routeProvider, $locationProvider, $httpProvider, $provide, $tgEventsProvider, $compileProvider, $translateProvider, $translatePartialLoaderProvider, $animateProvider, $logProvider) {\n var authHttpIntercept, blockingIntercept, decorators, defaultHeaders, loaderIntercept, originalWhen, preferedLangCode, userInfo, versionCheckHttpIntercept;\n $animateProvider.classNameFilter(/^(?:(?!ng-animate-disabled).)*$/);\n originalWhen = $routeProvider.when;\n $routeProvider.when = function(path, route) {\n route.resolve || (route.resolve = {});\n angular.extend(route.resolve, {\n languageLoad: [\n \"$q\", \"$translate\", function($q, $translate) {\n var deferred;\n deferred = $q.defer();\n $translate(\"COMMON.YES\").then(function() {\n return deferred.resolve();\n });\n return deferred.promise;\n }\n ],\n projectLoaded: [\n \"$q\", \"tgProjectService\", \"$route\", function($q, projectService, $route) {\n var deferred, ref;\n deferred = $q.defer();\n projectService.setSection((ref = $route.current.$$route) != null ? ref.section : void 0);\n if ($route.current.params.pslug) {\n projectService.setProjectBySlug($route.current.params.pslug).then(deferred.resolve);\n } else {\n projectService.cleanProject();\n deferred.resolve();\n }\n return deferred.promise;\n }\n ]\n });\n return originalWhen.call($routeProvider, path, route);\n };\n $routeProvider.when(\"/\", {\n templateUrl: \"home/home.html\",\n controller: \"Home\",\n controllerAs: \"vm\",\n loader: true,\n title: \"HOME.PAGE_TITLE\",\n loader: true,\n description: \"HOME.PAGE_DESCRIPTION\",\n joyride: \"dashboard\"\n });\n $routeProvider.when(\"/discover\", {\n templateUrl: \"discover/discover-home/discover-home.html\",\n controller: \"DiscoverHome\",\n controllerAs: \"vm\",\n title: \"PROJECT.NAVIGATION.DISCOVER\",\n loader: true\n });\n $routeProvider.when(\"/discover/search\", {\n templateUrl: \"discover/discover-search/discover-search.html\",\n title: \"PROJECT.NAVIGATION.DISCOVER\",\n loader: true,\n controller: \"DiscoverSearch\",\n controllerAs: \"vm\",\n reloadOnSearch: false\n });\n $routeProvider.when(\"/projects/\", {\n templateUrl: \"projects/listing/projects-listing.html\",\n access: {\n requiresLogin: true\n },\n title: \"PROJECTS.PAGE_TITLE\",\n description: \"PROJECTS.PAGE_DESCRIPTION\",\n loader: true,\n controller: \"ProjectsListing\",\n controllerAs: \"vm\"\n });\n $routeProvider.when(\"/project/new\", {\n title: \"PROJECT.CREATE.TITLE\",\n templateUrl: \"projects/create/create-project.html\",\n loader: true,\n controller: \"CreateProjectCtrl\",\n controllerAs: \"vm\"\n });\n $routeProvider.when(\"/project/new/scrum\", {\n title: \"PROJECT.CREATE.TITLE\",\n template: \"
\");\n valid = _.every(lines, function(line) {\n return line.length < width;\n });\n return valid;\n },\n pikaday: function(val) {\n var prettyDate;\n prettyDate = $translate.instant(\"COMMON.PICKERDATE.FORMAT\");\n return moment(val, prettyDate).isValid();\n },\n url: function(val) {\n var re_weburl;\n re_weburl = new RegExp(\"^\" + \"(?:(?:https?|ftp)://)\" + \"(?:\\\\S+(?::\\\\S*)?@)?\" + \"(?:\" + \"(?!(?:10|127)(?:\\\\.\\\\d{1,3}){3})\" + \"(?!(?:169\\\\.254|192\\\\.168)(?:\\\\.\\\\d{1,3}){2})\" + \"(?!172\\\\.(?:1[6-9]|2\\\\d|3[0-1])(?:\\\\.\\\\d{1,3}){2})\" + \"(?:[1-9]\\\\d?|1\\\\d\\\\d|2[01]\\\\d|22[0-3])\" + \"(?:\\\\.(?:1?\\\\d{1,2}|2[0-4]\\\\d|25[0-5])){2}\" + \"(?:\\\\.(?:[1-9]\\\\d?|1\\\\d\\\\d|2[0-4]\\\\d|25[0-4]))\" + \"|\" + \"(?:(?:[a-z\\\\u00a1-\\\\uffff0-9]-*)*[a-z\\\\u00a1-\\\\uffff0-9]+)\" + \"(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff0-9]-*)*[a-z\\\\u00a1-\\\\uffff0-9]+)*\" + \"(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff]{2,}))\" + \"\\\\.?\" + \")\" + \"(?::\\\\d{2,5})?\" + \"(?:[/?#]\\\\S*)?\" + \"$\", \"i\");\n return re_weburl.test(val);\n }\n };\n checksley.updateValidators(validators);\n $rootscope.contribPlugins = this.taigaContribPlugins;\n $rootscope.adminPlugins = _.filter(this.taigaContribPlugins, {\n \"type\": \"admin\"\n });\n $rootscope.authPlugins = _.filter(this.taigaContribPlugins, {\n \"type\": \"auth\"\n });\n $rootscope.userSettingsPlugins = _.filter(this.taigaContribPlugins, {\n \"type\": \"userSettings\"\n });\n lang = null;\n $rootscope.$on(\"$translateChangeEnd\", function(e, ctx) {\n var legacy, rtlLanguages;\n if (lang !== ctx.language) {\n lang = ctx.language;\n i18nInit(lang, $translate);\n rtlLanguages = $tgConfig.get(\"rtlLanguages\", []);\n $rootscope.isRTL = rtlLanguages.indexOf(lang) > -1;\n legacy = document.querySelector('tg-legacy');\n return legacy.translations = {\n translationTable: $translate.getTranslationTable(lang),\n lan: lang\n };\n }\n });\n $events.setupConnection();\n if ($auth.isAuthenticated()) {\n user = $auth.getUser();\n }\n $analytics.initialize();\n $tagManager.initialize();\n $userPilot.initialize();\n $userPilot.identify();\n $rootscope.$on('$locationChangeStart', function(event) {\n errorHandlingService.init();\n if (lightboxService.getLightboxOpen().length) {\n event.preventDefault();\n return lightboxService.closeAll();\n }\n });\n un = $rootscope.$on('$routeChangeStart', function(event, next) {\n if (next.loader) {\n loaderService.start(true);\n }\n return un();\n });\n return $rootscope.$on('$routeChangeSuccess', function(event, next) {\n var description, ref, title;\n if ((ref = projectService.project) != null ? ref.get('blocked_code') : void 0) {\n errorHandlingService.block();\n }\n if (next.loader) {\n loaderService.start(true);\n }\n if (next.access && next.access.requiresLogin) {\n if (!$auth.isAuthenticated()) {\n $location.path($navUrls.resolve(\"login\"));\n }\n }\n if (next.title || next.description) {\n title = $translate.instant(next.title || \"\");\n description = $translate.instant(next.description || \"\");\n appMetaService.setAll(title, description);\n }\n if (next.mobileViewport) {\n appMetaService.addMobileViewport();\n } else {\n appMetaService.removeMobileViewport();\n }\n if (next.disableHeader) {\n return navigationBarService.disableHeader();\n } else {\n return navigationBarService.enableHeader();\n }\n });\n };\n\n angular.module('infinite-scroll').value('THROTTLE_MILLISECONDS', 500);\n\n pluginsWithModule = _.filter(this.taigaContribPlugins, function(plugin) {\n return plugin.module;\n });\n\n pluginsModules = _.map(pluginsWithModule, function(plugin) {\n return plugin.module;\n });\n\n modules = [\"taigaBase\", \"taigaCommon\", \"taigaResources\", \"taigaResources2\", \"taigaAuth\", \"taigaEvents\", \"taigaHome\", \"taigaNavigationBar\", \"taigaProjects\", \"taigaRelatedTasks\", \"taigaBacklog\", \"taigaTaskboard\", \"taigaKanban\", \"taigaIssues\", \"taigaUserStories\", \"taigaTasks\", \"taigaTeam\", \"taigaWiki\", \"taigaSearch\", \"taigaAdmin\", \"taigaProject\", \"taigaUserSettings\", \"taigaFeedback\", \"taigaPlugins\", \"taigaIntegrations\", \"taigaComponents\", \"taigaProfile\", \"taigaHome\", \"taigaUserTimeline\", \"taigaExternalApps\", \"taigaDiscover\", \"taigaHistory\", \"taigaNotifications\", \"taigaWikiHistory\", \"taigaEpics\", \"taigaUtils\", \"templates\", \"ngSanitize\", \"ngRoute\", \"ngAnimate\", \"ngAria\", \"pascalprecht.translate\", \"infinite-scroll\", \"tgRepeat\"].concat(pluginsModules);\n\n module = angular.module(\"taiga\", modules);\n\n module.config([\"$routeProvider\", \"$locationProvider\", \"$httpProvider\", \"$provide\", \"$tgEventsProvider\", \"$compileProvider\", \"$translateProvider\", \"$translatePartialLoaderProvider\", \"$animateProvider\", \"$logProvider\", configure]);\n\n module.run([\"$log\", \"$rootScope\", \"$tgAuth\", \"$tgEvents\", \"$tgAnalytics\", \"$tgTagManager\", \"$tgUserPilot\", \"$translate\", \"$tgLocation\", \"$tgNavUrls\", \"tgAppMetaService\", \"tgLoader\", \"tgNavigationBarService\", \"tgErrorHandlingService\", \"lightboxService\", \"$tgConfig\", \"tgProjectService\", init]);\n\n}).call(this);\n\n\n/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n * Copyright (c) 2021-present Kaleidos Ventures SL\n */\n\n(function() {\n var TaigaBase, TaigaController, TaigaService,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty,\n bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };\n\n TaigaBase = (function() {\n function TaigaBase() {}\n\n return TaigaBase;\n\n })();\n\n TaigaService = (function(superClass) {\n extend(TaigaService, superClass);\n\n function TaigaService() {\n return TaigaService.__super__.constructor.apply(this, arguments);\n }\n\n return TaigaService;\n\n })(TaigaBase);\n\n TaigaController = (function(superClass) {\n extend(TaigaController, superClass);\n\n function TaigaController() {\n this.onInitialDataError = bind(this.onInitialDataError, this);\n return TaigaController.__super__.constructor.apply(this, arguments);\n }\n\n TaigaController.prototype.onInitialDataError = function(xhr) {\n if (xhr) {\n if (xhr.status === 404) {\n this.errorHandlingService.notfound();\n } else if (xhr.status === 403) {\n this.errorHandlingService.permissionDenied();\n }\n }\n return this.q.reject(xhr);\n };\n\n return TaigaController;\n\n })(TaigaBase);\n\n this.taiga.Base = TaigaBase;\n\n this.taiga.Service = TaigaService;\n\n this.taiga.Controller = TaigaController;\n\n}).call(this);\n\n\n/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n * Copyright (c) 2021-present Kaleidos Ventures SL\n */\n\n(function() {\n var DEFAULT_COLOR_LIST, addClass, bindMethods, bindOnce, cancelTimeout, debounce, debounceLeading, defineImmutableProperty, findScope, getDefaulColorList, getMatches, getRandomDefaultColor, groupBy, isEmail, isImage, isPdf, joinStr, mixOf, nl2br, normalizeString, patch, randomInt, replaceTags, scopeDefer, sizeFormat, slugify, startswith, stripTags, taiga, timeout, toString, toggleText, trim, truncate, unslugify,\n indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },\n slice = [].slice,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n addClass = function(el, className) {\n if (el.classList) {\n return el.classList.add(className);\n } else {\n return el.className += ' ' + className;\n }\n };\n\n nl2br = (function(_this) {\n return function(str) {\n var breakTag;\n breakTag = '
';\n return (str + '').replace(/([^>\\r\\n]?)(\\r\\n|\\n\\r|\\r|\\n)/g, '$1' + breakTag + '$2');\n };\n })(this);\n\n bindMethods = (function(_this) {\n return function(object) {\n var dependencies, methods;\n dependencies = _.keys(object);\n methods = [];\n _.forIn(object, function(value, key) {\n if (indexOf.call(dependencies, key) < 0 && _.isFunction(value)) {\n return methods.push(key);\n }\n });\n return _.bindAll(object, methods);\n };\n })(this);\n\n bindOnce = (function(_this) {\n return function(scope, attr, continuation) {\n var delBind, val;\n val = scope.$eval(attr);\n if (val !== void 0) {\n return continuation(val);\n }\n delBind = null;\n return delBind = scope.$watch(attr, function(val) {\n if (val === void 0) {\n return;\n }\n continuation(val);\n if (delBind) {\n return delBind();\n }\n });\n };\n })(this);\n\n mixOf = function() {\n var Mixed, base, i, method, mixin, mixins, name, ref;\n base = arguments[0], mixins = 2 <= arguments.length ? slice.call(arguments, 1) : [];\n Mixed = (function(superClass) {\n extend(Mixed, superClass);\n\n function Mixed() {\n return Mixed.__super__.constructor.apply(this, arguments);\n }\n\n return Mixed;\n\n })(base);\n for (i = mixins.length - 1; i >= 0; i += -1) {\n mixin = mixins[i];\n ref = mixin.prototype;\n for (name in ref) {\n method = ref[name];\n Mixed.prototype[name] = method;\n }\n }\n return Mixed;\n };\n\n trim = function(data, char) {\n return _.trim(data, char);\n };\n\n slugify = function(data) {\n return data.toString().toLowerCase().trim().replace(/\\s+/g, '-').replace(/&/g, '-and-').replace(/[^\\w\\-]+/g, '').replace(/\\-\\-+/g, '-');\n };\n\n unslugify = function(data) {\n if (data) {\n return _.capitalize(data.replace(/-/g, ' '));\n }\n return data;\n };\n\n toggleText = function(element, texts) {\n var nextTextPosition, text;\n nextTextPosition = element.data('nextTextPosition');\n if ((nextTextPosition == null) || nextTextPosition >= texts.length) {\n nextTextPosition = 0;\n }\n text = texts[nextTextPosition];\n element.data('nextTextPosition', nextTextPosition + 1);\n return element.text(text);\n };\n\n groupBy = function(coll, pred) {\n var i, item, len, result;\n result = {};\n for (i = 0, len = coll.length; i < len; i++) {\n item = coll[i];\n result[pred(item)] = item;\n }\n return result;\n };\n\n timeout = function(wait, continuation) {\n return window.setTimeout(continuation, wait);\n };\n\n cancelTimeout = function(timeoutVar) {\n return window.clearTimeout(timeoutVar);\n };\n\n scopeDefer = function(scope, func) {\n return _.defer((function(_this) {\n return function() {\n return scope.$apply(func);\n };\n })(this));\n };\n\n toString = function(value) {\n if (_.isNumber(value)) {\n return value + \"\";\n } else if (_.isString(value)) {\n return value;\n } else if (_.isPlainObject(value)) {\n return JSON.stringify(value);\n } else if (_.isUndefined(value)) {\n return \"\";\n }\n return value.toString();\n };\n\n joinStr = function(str, coll) {\n return coll.join(str);\n };\n\n debounce = function(wait, func) {\n return _.debounce(func, wait, {\n leading: true,\n trailing: false\n });\n };\n\n debounceLeading = function(wait, func) {\n return _.debounce(func, wait, {\n leading: false,\n trailing: true\n });\n };\n\n startswith = function(str1, str2) {\n return _.startsWith(str1, str2);\n };\n\n truncate = function(str, maxLength, suffix) {\n var out;\n if (suffix == null) {\n suffix = \"...\";\n }\n if ((typeof str !== \"string\") && !(str instanceof String)) {\n return str;\n }\n out = str.slice(0);\n if (out.length > maxLength) {\n out = out.substring(0, maxLength + 1);\n out = out.substring(0, Math.min(out.length, out.lastIndexOf(\" \")));\n out = out + suffix;\n }\n return out;\n };\n\n sizeFormat = function(input, precision) {\n var number, size, units;\n if (precision == null) {\n precision = 1;\n }\n if (isNaN(parseFloat(input)) || !isFinite(input)) {\n return \"-\";\n }\n if (input === 0) {\n return \"0 bytes\";\n }\n units = [\"bytes\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\"];\n number = Math.floor(Math.log(input) / Math.log(1024));\n if (number > 5) {\n number = 5;\n }\n size = (input / Math.pow(1024, number)).toFixed(precision);\n return size + \" \" + units[number];\n };\n\n stripTags = function(str, exception) {\n var pattern;\n if (exception) {\n pattern = new RegExp('<(?!' + exception + '\\s*\\/?)[^>]+>', 'gi');\n return String(str).replace(pattern, '');\n } else {\n return String(str).replace(/<\\/?[^>]+>/g, '');\n }\n };\n\n replaceTags = function(str, tags, replace) {\n var pattern;\n pattern = new RegExp('<(' + tags + ')>', 'gi');\n str = str.replace(pattern, '<' + replace + '>');\n pattern = new RegExp('<\\/(' + tags + ')>', 'gi');\n str = str.replace(pattern, '' + replace + '>');\n return str;\n };\n\n defineImmutableProperty = (function(_this) {\n return function(obj, name, fn) {\n return Object.defineProperty(obj, name, {\n get: function() {\n var fn_result;\n if (!_.isFunction(fn)) {\n throw \"defineImmutableProperty third param must be a function\";\n }\n fn_result = fn();\n if (fn_result && _.isObject(fn_result)) {\n if (fn_result.size === void 0) {\n throw \"defineImmutableProperty must return immutable data\";\n }\n }\n return fn_result;\n }\n });\n };\n })(this);\n\n _.mixin({\n removeKeys: function(obj, keys) {\n return _.chain([keys]).flatten().reduce(function(obj, key) {\n delete obj[key];\n return obj;\n }, obj).value();\n },\n cartesianProduct: function() {\n return _.reduceRight(arguments, function(a, b) {\n return _.flatten(_.map(a, function(x) {\n return _.map(b, function(y) {\n return [y].concat(x);\n });\n }), true);\n }, [[]]);\n }\n });\n\n isImage = function(name) {\n return name.match(/\\.(jpe?g|png|gif|gifv|svg|psd|webp)/i) !== null;\n };\n\n isEmail = function(name) {\n return (name != null) && name.match(/^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/) !== null;\n };\n\n isPdf = function(name) {\n return name.match(/\\.(pdf)/i) !== null;\n };\n\n patch = function(oldImmutable, newImmutable) {\n var pathObj;\n pathObj = {};\n newImmutable.forEach(function(newValue, key) {\n if (newValue !== oldImmutable.get(key)) {\n if (newValue.toJS) {\n return pathObj[key] = newValue.toJS();\n } else {\n return pathObj[key] = newValue;\n }\n }\n });\n return pathObj;\n };\n\n DEFAULT_COLOR_LIST = ['#D35163', '#D351CF', '#AC51D3', '#8151D3', '#5551D3', '#5178D3', '#78D351', '#51D355', '#51D381', '#51D3AC', '#51CFD3', '#51A3D3', '#A3D350', '#CFD350', '#D3AC50', '#D38050', '#D35450', '#E44057', '#4C566A', '#70728F', '#A9AABC'];\n\n getRandomDefaultColor = function() {\n return _.sample(DEFAULT_COLOR_LIST);\n };\n\n getDefaulColorList = function() {\n return _.clone(DEFAULT_COLOR_LIST);\n };\n\n getMatches = function(string, regex, index) {\n var match, matches;\n index || (index = 1);\n matches = [];\n match = null;\n while (match = regex.exec(string)) {\n if (index === -1) {\n matches.push(match);\n } else {\n matches.push(match[index]);\n }\n }\n return matches;\n };\n\n randomInt = function(start, end) {\n var interval;\n interval = end - start;\n return start + Math.floor(Math.random() * (interval + 1));\n };\n\n normalizeString = function(string) {\n var normalizedString;\n normalizedString = string;\n normalizedString = normalizedString.replace(\"Á\", \"A\").replace(\"Ä\", \"A\").replace(\"À\", \"A\");\n normalizedString = normalizedString.replace(\"É\", \"E\").replace(\"Ë\", \"E\").replace(\"È\", \"E\");\n normalizedString = normalizedString.replace(\"Í\", \"I\").replace(\"Ï\", \"I\").replace(\"Ì\", \"I\");\n normalizedString = normalizedString.replace(\"Ó\", \"O\").replace(\"Ö\", \"O\").replace(\"Ò\", \"O\");\n normalizedString = normalizedString.replace(\"Ú\", \"U\").replace(\"Ü\", \"U\").replace(\"Ù\", \"U\");\n return normalizedString;\n };\n\n findScope = function($scope, condition) {\n var result;\n result = condition($scope);\n if (result) {\n return result;\n }\n if ($scope) {\n return findScope($scope.$parent, condition);\n }\n return null;\n };\n\n taiga = this.taiga;\n\n taiga.addClass = addClass;\n\n taiga.nl2br = nl2br;\n\n taiga.bindMethods = bindMethods;\n\n taiga.bindOnce = bindOnce;\n\n taiga.mixOf = mixOf;\n\n taiga.trim = trim;\n\n taiga.slugify = slugify;\n\n taiga.unslugify = unslugify;\n\n taiga.toggleText = toggleText;\n\n taiga.groupBy = groupBy;\n\n taiga.timeout = timeout;\n\n taiga.cancelTimeout = cancelTimeout;\n\n taiga.scopeDefer = scopeDefer;\n\n taiga.toString = toString;\n\n taiga.joinStr = joinStr;\n\n taiga.truncate = truncate;\n\n taiga.debounce = debounce;\n\n taiga.debounceLeading = debounceLeading;\n\n taiga.startswith = startswith;\n\n taiga.sizeFormat = sizeFormat;\n\n taiga.stripTags = stripTags;\n\n taiga.replaceTags = replaceTags;\n\n taiga.defineImmutableProperty = defineImmutableProperty;\n\n taiga.isImage = isImage;\n\n taiga.isEmail = isEmail;\n\n taiga.isPdf = isPdf;\n\n taiga.patch = patch;\n\n taiga.getRandomDefaultColor = getRandomDefaultColor;\n\n taiga.getDefaulColorList = getDefaulColorList;\n\n taiga.getMatches = getMatches;\n\n taiga.randomInt = randomInt;\n\n taiga.normalizeString = normalizeString;\n\n taiga.findScope = findScope;\n\n}).call(this);\n\n\n/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n * Copyright (c) 2021-present Kaleidos Ventures SL\n */\n\n(function() {\n var FiltersMixin, PageMixin, UsFiltersMixin, groupBy, joinStr, taiga, toString, trim;\n\n taiga = this.taiga;\n\n groupBy = this.taiga.groupBy;\n\n joinStr = this.taiga.joinStr;\n\n trim = this.taiga.trim;\n\n toString = this.taiga.toString;\n\n PageMixin = (function() {\n function PageMixin() {}\n\n PageMixin.prototype.fillUsersAndRoles = function(users, roles) {\n var activeUsers, computableRoles;\n activeUsers = _.filter(users, (function(_this) {\n return function(user) {\n return user.is_active;\n };\n })(this));\n this.scope.activeUsers = _.sortBy(activeUsers, \"full_name_display\");\n this.scope.activeUsersById = groupBy(this.scope.activeUsers, function(e) {\n return e.id;\n });\n this.scope.users = _.sortBy(users, \"full_name_display\");\n this.scope.usersById = groupBy(users, function(e) {\n return e.id;\n });\n this.scope.roles = _.sortBy(roles, \"order\");\n computableRoles = _(this.scope.project.members).map(\"role\").uniq().value();\n return this.scope.computableRoles = _(roles).filter(\"computable\").filter(function(x) {\n return _.includes(computableRoles, x.id);\n }).value();\n };\n\n PageMixin.prototype.loadUsersAndRoles = function() {\n var promise;\n promise = this.q.all([this.rs.projects.usersList(this.scope.projectId), this.rs.projects.rolesList(this.scope.projectId)]);\n return promise.then((function(_this) {\n return function(results) {\n var roles, users;\n users = results[0], roles = results[1];\n _this.fillUsersAndRoles(users, roles);\n return results;\n };\n })(this));\n };\n\n return PageMixin;\n\n })();\n\n taiga.PageMixin = PageMixin;\n\n FiltersMixin = (function() {\n function FiltersMixin() {}\n\n FiltersMixin.prototype.excludePrefix = \"exclude_\";\n\n FiltersMixin.prototype.selectFilter = function(name, value, load, mode) {\n var existing, location, params;\n if (load == null) {\n load = false;\n }\n if (mode == null) {\n mode = \"include\";\n }\n params = this.location.search();\n if (mode === \"exclude\") {\n name = this.excludePrefix.concat(name);\n }\n if (params[name] !== void 0 && name !== \"page\") {\n existing = _.map(taiga.toString(params[name]).split(\",\"), function(x) {\n return trim(x);\n });\n existing.push(taiga.toString(value));\n existing = _.compact(existing);\n value = joinStr(\",\", _.uniq(existing));\n }\n if (!this.location.isInCurrentRouteParams(name, value)) {\n location = load ? this.location : this.location.noreload(this.scope);\n return location.search(name, value);\n }\n };\n\n FiltersMixin.prototype.replaceFilter = function(name, value, load) {\n var location;\n if (load == null) {\n load = false;\n }\n if (!this.location.isInCurrentRouteParams(name, value)) {\n location = load ? this.location : this.location.noreload(this.scope);\n return location.search(name, value);\n }\n };\n\n FiltersMixin.prototype.replaceAllFilters = function(filters, load) {\n var location;\n if (load == null) {\n load = false;\n }\n location = load ? this.location : this.location.noreload(this.scope);\n return location.search(filters);\n };\n\n FiltersMixin.prototype.unselectFilter = function(name, value, load, mode) {\n var location, newValues, params, parsedValues;\n if (load == null) {\n load = false;\n }\n if (mode == null) {\n mode = 'include';\n }\n params = this.location.search();\n if (mode === \"exclude\") {\n name = this.excludePrefix.concat(name);\n }\n if (params[name] === void 0) {\n return;\n }\n if (value === void 0 || value === null) {\n delete params[name];\n }\n parsedValues = _.map(taiga.toString(params[name]).split(\",\"), function(x) {\n return trim(x);\n });\n newValues = _.reject(parsedValues, function(x) {\n return x === taiga.toString(value);\n });\n newValues = _.compact(newValues);\n if (_.isEmpty(newValues)) {\n value = null;\n } else {\n value = joinStr(\",\", _.uniq(newValues));\n }\n location = load ? this.location : this.location.noreload(this.scope);\n return location.search(name, value);\n };\n\n FiltersMixin.prototype.applyStoredFilters = function(projectSlug, key, validKeys) {\n var filters;\n if (_.isEmpty(this.location.search())) {\n filters = this.getFilters(projectSlug, key);\n if (validKeys) {\n filters = _.pick(filters, validKeys);\n }\n if (Object.keys(filters).length) {\n this.location.search(filters);\n this.location.replace();\n return true;\n }\n }\n return false;\n };\n\n FiltersMixin.prototype.storeFilters = function(projectSlug, params, filtersHashSuffix) {\n var hash, ns;\n ns = projectSlug + \":\" + filtersHashSuffix;\n hash = taiga.generateHash([projectSlug, ns]);\n return this.storage.set(hash, params);\n };\n\n FiltersMixin.prototype.getFilters = function(projectSlug, filtersHashSuffix) {\n var data, hash, ns;\n ns = projectSlug + \":\" + filtersHashSuffix;\n hash = taiga.generateHash([projectSlug, ns]);\n data = this.storage.get(hash) || {};\n delete data.q;\n return data;\n };\n\n FiltersMixin.prototype.formatSelectedFilters = function(type, list, urlIds, mode) {\n var invalidAppliedTags, invalidTags, selectedFilters, selectedIds, validAppliedTags;\n if (mode == null) {\n mode = \"include\";\n }\n selectedIds = urlIds.split(',');\n selectedFilters = _.filter(list, function(it) {\n return selectedIds.indexOf(_.toString(it.id)) !== -1;\n });\n invalidTags = _.filter(selectedIds, function(it) {\n return !_.find(selectedFilters, function(sit) {\n return _.toString(sit.id) === it;\n });\n });\n invalidAppliedTags = _.map(invalidTags, function(it) {\n return {\n id: it,\n key: type + \":\" + it,\n dataType: type,\n name: it,\n mode: mode\n };\n });\n validAppliedTags = _.map(selectedFilters, function(it) {\n return {\n id: it.id,\n key: type + \":\" + it.id,\n dataType: type,\n name: it.name,\n color: it.color,\n mode: mode\n };\n });\n return invalidAppliedTags.concat(validAppliedTags);\n };\n\n return FiltersMixin;\n\n })();\n\n taiga.FiltersMixin = FiltersMixin;\n\n UsFiltersMixin = (function() {\n function UsFiltersMixin() {}\n\n UsFiltersMixin.prototype.excludePrefix = \"exclude_\";\n\n UsFiltersMixin.prototype.filterCategories = [\"tags\", \"status\", \"assigned_users\", \"assigned_to\", \"owner\", \"epic\", \"role\"];\n\n UsFiltersMixin.prototype.excludeFilters = [];\n\n UsFiltersMixin.prototype.changeQ = function(q) {\n this.filterQ = q;\n return this.filtersReloadContent();\n };\n\n UsFiltersMixin.prototype.removeFilter = function(filter) {\n this.unselectFilter(filter.dataType, filter.id, false, filter.mode);\n this.filtersReloadContent();\n return this.generateFilters();\n };\n\n UsFiltersMixin.prototype.addFilter = function(newFilter) {\n this.selectFilter(newFilter.category.dataType, newFilter.filter.id, false, newFilter.mode);\n this.filtersReloadContent();\n return this.generateFilters();\n };\n\n UsFiltersMixin.prototype.selectCustomFilter = function(customFilter) {\n this.replaceAllFilters(customFilter.filter);\n this.filtersReloadContent();\n return this.generateFilters();\n };\n\n UsFiltersMixin.prototype.saveCustomFilter = function(name) {\n var excludeKey, filters, i, key, len, ref, urlfilters;\n filters = {};\n urlfilters = this.location.search();\n ref = this.filterCategories;\n for (i = 0, len = ref.length; i < len; i++) {\n key = ref[i];\n excludeKey = this.excludePrefix.concat(key);\n filters[key] = urlfilters[key];\n filters[excludeKey] = urlfilters[excludeKey];\n }\n return this.filterRemoteStorageService.getFilters(this.scope.projectId, this.storeCustomFiltersName).then((function(_this) {\n return function(userFilters) {\n userFilters[name] = filters;\n return _this.filterRemoteStorageService.storeFilters(_this.scope.projectId, userFilters, _this.storeCustomFiltersName).then(_this.generateFilters);\n };\n })(this));\n };\n\n UsFiltersMixin.prototype.removeCustomFilter = function(customFilter) {\n return this.filterRemoteStorageService.getFilters(this.scope.projectId, this.storeCustomFiltersName).then((function(_this) {\n return function(userFilters) {\n delete userFilters[customFilter.id];\n _this.filterRemoteStorageService.storeFilters(_this.scope.projectId, userFilters, _this.storeCustomFiltersName).then(_this.generateFilters);\n return _this.generateFilters();\n };\n })(this));\n };\n\n UsFiltersMixin.prototype.isFilterDataTypeSelected = function(filterDataType) {\n var filter, i, len, ref;\n ref = this.selectedFilters;\n for (i = 0, len = ref.length; i < len; i++) {\n filter = ref[i];\n if (filter['dataType'] === filterDataType) {\n return true;\n }\n }\n return false;\n };\n\n UsFiltersMixin.prototype.generateFilters = function(milestone) {\n var excludeKey, i, key, len, loadFilters, ref, urlfilters;\n this.storeFilters(this.params.pslug, this.location.search(), this.storeFiltersName);\n urlfilters = this.location.search();\n loadFilters = {};\n loadFilters.project = this.scope.projectId;\n ref = this.filterCategories;\n for (i = 0, len = ref.length; i < len; i++) {\n key = ref[i];\n excludeKey = this.excludePrefix.concat(key);\n loadFilters[key] = urlfilters[key];\n loadFilters[excludeKey] = urlfilters[excludeKey];\n }\n if (milestone) {\n loadFilters.milestone = milestone;\n }\n return this.q.all([this.rs.userstories.filtersData(loadFilters), this.filterRemoteStorageService.getFilters(this.scope.projectId, this.storeCustomFiltersName)]).then((function(_this) {\n return function(result) {\n var customFiltersRaw, data, dataCollection, j, len1, ref1, selected, tagsWithAtLeastOneElement;\n data = result[0];\n customFiltersRaw = result[1];\n dataCollection = {};\n dataCollection.status = _.map(data.statuses, function(it) {\n it.id = it.id.toString();\n return it;\n });\n dataCollection.tags = _.map(data.tags, function(it) {\n it.id = it.name;\n return it;\n });\n tagsWithAtLeastOneElement = _.filter(dataCollection.tags, function(tag) {\n return tag.count > 0;\n });\n dataCollection.assigned_users = _.map(data.assigned_users, function(it) {\n if (it.id) {\n it.id = it.id.toString();\n } else {\n it.id = \"null\";\n }\n it.name = it.full_name || \"Unassigned\";\n return it;\n });\n dataCollection.assigned_to = _.map(data.assigned_to, function(it) {\n if (it.id) {\n it.id = it.id.toString();\n } else {\n it.id = \"null\";\n }\n it.name = it.full_name || \"Unassigned\";\n return it;\n });\n dataCollection.role = _.map(data.roles, function(it) {\n if (it.id) {\n it.id = it.id.toString();\n } else {\n it.id = \"null\";\n }\n it.name = it.name || \"Unassigned\";\n return it;\n });\n dataCollection.owner = _.map(data.owners, function(it) {\n it.id = it.id.toString();\n it.name = it.full_name;\n return it;\n });\n dataCollection.epic = _.map(data.epics, function(it) {\n if (it.id) {\n it.id = it.id.toString();\n it.name = \"#\" + it.ref + \" \" + it.subject;\n } else {\n it.id = \"null\";\n it.name = \"Not in an epic\";\n }\n return it;\n });\n _this.selectedFilters = [];\n ref1 = _this.filterCategories;\n for (j = 0, len1 = ref1.length; j < len1; j++) {\n key = ref1[j];\n excludeKey = _this.excludePrefix.concat(key);\n if (loadFilters[key]) {\n selected = _this.formatSelectedFilters(key, dataCollection[key], loadFilters[key]);\n _this.selectedFilters = _this.selectedFilters.concat(selected);\n }\n if (loadFilters[excludeKey]) {\n selected = _this.formatSelectedFilters(key, dataCollection[key], loadFilters[excludeKey], \"exclude\");\n _this.selectedFilters = _this.selectedFilters.concat(selected);\n }\n }\n _this.filters = [];\n if (!_this.excludeFilters.includes('status')) {\n _this.filters.push({\n title: _this.translate.instant(\"COMMON.FILTERS.CATEGORIES.STATUS\"),\n dataType: \"status\",\n content: dataCollection.status\n });\n }\n if (!_this.excludeFilters.includes('tags')) {\n _this.filters.push({\n title: _this.translate.instant(\"COMMON.FILTERS.CATEGORIES.TAGS\"),\n dataType: \"tags\",\n content: dataCollection.tags,\n hideEmpty: true,\n totalTaggedElements: tagsWithAtLeastOneElement.length\n });\n }\n if (!_this.excludeFilters.includes('assigned_to')) {\n _this.filters.push({\n title: _this.translate.instant(\"COMMON.FILTERS.CATEGORIES.ASSIGNED_TO\"),\n dataType: \"assigned_users\",\n content: dataCollection.assigned_users\n });\n }\n if (!_this.excludeFilters.includes('role')) {\n _this.filters.push({\n title: _this.translate.instant(\"COMMON.FILTERS.CATEGORIES.ROLE\"),\n dataType: \"role\",\n content: dataCollection.role\n });\n }\n if (!_this.excludeFilters.includes('created_by')) {\n _this.filters.push({\n title: _this.translate.instant(\"COMMON.FILTERS.CATEGORIES.CREATED_BY\"),\n dataType: \"owner\",\n content: dataCollection.owner\n });\n }\n if (!_this.excludeFilters.includes('epic')) {\n _this.filters.push({\n title: _this.translate.instant(\"COMMON.FILTERS.CATEGORIES.EPIC\"),\n dataType: \"epic\",\n content: dataCollection.epic\n });\n }\n _this.customFilters = [];\n return _.forOwn(customFiltersRaw, function(value, key) {\n return _this.customFilters.push({\n id: key,\n name: key,\n filter: value\n });\n });\n };\n })(this));\n };\n\n return UsFiltersMixin;\n\n })();\n\n taiga.UsFiltersMixin = UsFiltersMixin;\n\n}).call(this);\n\n\n/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n * Copyright (c) 2021-present Kaleidos Ventures SL\n */\n\n(function() {\n var module;\n\n module = angular.module(\"taigaAdmin\", []);\n\n}).call(this);\n\n\n/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n * Copyright (c) 2021-present Kaleidos Ventures SL\n */\n\n(function() {\n var $translateMissingTranslationHandlerLog;\n\n $translateMissingTranslationHandlerLog = function($log) {\n return function(translationId) {};\n };\n\n $translateMissingTranslationHandlerLog.$inject = ['$log'];\n\n angular.module('pascalprecht.translate').factory('$translateMissingTranslationHandlerLog', $translateMissingTranslationHandlerLog);\n\n $translateMissingTranslationHandlerLog.displayName = '$translateMissingTranslationHandlerLog';\n\n}).call(this);\n\n\n/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n * Copyright (c) 2021-present Kaleidos Ventures SL\n */\n\n(function() {\n var AuthService, CancelAccountDirective, ChangeEmailDirective, ChangePasswordFromRecoveryDirective, ForgotPasswordDirective, InvitationDirective, LoginDirective, LoginPage, PublicRegisterMessageDirective, RegisterDirective, RegisterOptionsDirective, VerifyEmailDirective, debounce, module, taiga,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n taiga = this.taiga;\n\n debounce = this.taiga.debounce;\n\n module = angular.module(\"taigaAuth\", [\"taigaResources\"]);\n\n LoginPage = (function() {\n LoginPage.$inject = ['tgCurrentUserService', '$location', '$tgNavUrls', '$routeParams', '$tgAuth'];\n\n function LoginPage(currentUserService, $location, $navUrls, $routeParams, $auth) {\n var url;\n if (currentUserService.isAuthenticated()) {\n if (!$routeParams['force_login']) {\n url = $navUrls.resolve(\"home\");\n if ($routeParams['next']) {\n url = decodeURIComponent($routeParams['next']);\n $location.search('next', null);\n }\n if ($routeParams['unauthorized']) {\n $auth.clear();\n $auth.removeToken();\n } else {\n $location.url(url);\n }\n }\n }\n }\n\n return LoginPage;\n\n })();\n\n module.controller('LoginPage', LoginPage);\n\n AuthService = (function(superClass) {\n extend(AuthService, superClass);\n\n AuthService.$inject = [\"$rootScope\", \"$tgStorage\", \"$tgModel\", \"$tgResources\", \"$tgHttp\", \"$tgUrls\", \"$tgConfig\", \"$tgUserPilot\", \"$translate\", \"tgCurrentUserService\", \"tgThemeService\", \"$tgAnalytics\"];\n\n function AuthService(rootscope, storage, model, rs, http, urls, config1, userpilot, translate, currentUserService1, themeService, analytics) {\n var userModel;\n this.rootscope = rootscope;\n this.storage = storage;\n this.model = model;\n this.rs = rs;\n this.http = http;\n this.urls = urls;\n this.config = config1;\n this.userpilot = userpilot;\n this.translate = translate;\n this.currentUserService = currentUserService1;\n this.themeService = themeService;\n this.analytics = analytics;\n AuthService.__super__.constructor.call(this);\n userModel = this.getUser();\n this._currentTheme = this._getUserTheme();\n this.setUserdata(userModel);\n }\n\n AuthService.prototype.setUserdata = function(userModel) {\n if (userModel) {\n this.userData = Immutable.fromJS(userModel.getAttrs());\n this.currentUserService.setUser(this.userData);\n } else {\n this.userData = null;\n }\n return this.analytics.setUserId();\n };\n\n AuthService.prototype._getUserTheme = function() {\n var compiledThemes, defaultTheme, ref, ref1, ref2;\n compiledThemes = window._taigaAvailableThemes;\n defaultTheme = this.config.get(\"defaultTheme\") || \"taiga\";\n if (!_.includes(this.config.get(\"themes\"), (ref = this.rootscope.user) != null ? ref.theme : void 0) || !compiledThemes.includes((ref1 = this.rootscope.user) != null ? ref1.theme : void 0)) {\n return defaultTheme;\n }\n return (ref2 = this.rootscope.user) != null ? ref2.theme : void 0;\n };\n\n AuthService.prototype._setTheme = function() {\n var newTheme;\n newTheme = this._getUserTheme();\n if (this._currentTheme !== newTheme) {\n this._currentTheme = newTheme;\n return this.themeService.use(this._currentTheme);\n }\n };\n\n AuthService.prototype._setLocales = function() {\n var lang, ref;\n lang = ((ref = this.rootscope.user) != null ? ref.lang : void 0) || this.config.get(\"defaultLanguage\") || \"en\";\n this.translate.preferredLanguage(lang);\n return this.translate.use(lang);\n };\n\n AuthService.prototype.getUser = function() {\n var user, userData;\n if (this.rootscope.user) {\n return this.rootscope.user;\n }\n userData = this.storage.get(\"userInfo\");\n if (userData) {\n user = this.model.make_model(\"users\", userData);\n this.rootscope.user = user;\n this._setLocales();\n this._setTheme();\n return user;\n } else {\n this._setTheme();\n }\n return null;\n };\n\n AuthService.prototype.setUser = function(user) {\n this.rootscope.auth = user;\n this.storage.set(\"userInfo\", user.getAttrs());\n this.rootscope.user = user;\n this.setUserdata(user);\n this._setLocales();\n return this._setTheme();\n };\n\n AuthService.prototype.clear = function() {\n this.rootscope.auth = null;\n this.rootscope.user = null;\n return this.storage.remove(\"userInfo\");\n };\n\n AuthService.prototype.setRefreshToken = function(token) {\n return this.storage.set(\"refresh\", token);\n };\n\n AuthService.prototype.getRefreshToken = function() {\n return this.storage.get(\"refresh\");\n };\n\n AuthService.prototype.setToken = function(token) {\n return this.storage.set(\"token\", token);\n };\n\n AuthService.prototype.getToken = function() {\n return this.storage.get(\"token\");\n };\n\n AuthService.prototype.removeToken = function() {\n this.storage.remove(\"token\");\n return this.storage.remove(\"refresh\");\n };\n\n AuthService.prototype.isAuthenticated = function() {\n if (this.getUser() !== null) {\n return true;\n }\n return false;\n };\n\n AuthService.prototype.refresh = function() {\n var url;\n url = this.urls.resolve(\"user-me\");\n return this.http.get(url).then((function(_this) {\n return function(data, status) {\n var user;\n user = data.data;\n user.token = _this.getUser().auth_token;\n user = _this.model.make_model(\"users\", user);\n _this.setUser(user);\n _this.rootscope.$broadcast(\"auth:refresh\", user);\n return user;\n };\n })(this));\n };\n\n AuthService.prototype.login = function(data, type) {\n var url;\n url = this.urls.resolve(\"auth\");\n data = _.clone(data, false);\n data.type = type ? type : \"normal\";\n this.removeToken();\n return this.http.post(url, data).then((function(_this) {\n return function(data, status) {\n var user;\n user = _this.model.make_model(\"users\", data.data);\n _this.setToken(user.auth_token);\n _this.setRefreshToken(user.refresh);\n _this.setUser(user);\n _this.rootscope.$broadcast(\"auth:login\", user);\n return user;\n };\n })(this));\n };\n\n AuthService.prototype.logout = function() {\n this.removeToken();\n this.clear();\n this.currentUserService.removeUser();\n this._setTheme();\n this._setLocales();\n this.rootscope.$broadcast(\"auth:logout\");\n return this.analytics.setUserId();\n };\n\n AuthService.prototype.register = function(data, type, existing) {\n var url;\n url = this.urls.resolve(\"auth-register\");\n data = _.clone(data, false);\n data.type = type ? type : \"public\";\n if (type === \"private\") {\n data.existing = existing ? existing : false;\n }\n this.removeToken();\n return this.http.post(url, data).then((function(_this) {\n return function(response) {\n var user;\n user = _this.model.make_model(\"users\", response.data);\n _this.setToken(user.auth_token);\n _this.setUser(user);\n _this.rootscope.$broadcast(\"auth:register\", user);\n return user;\n };\n })(this));\n };\n\n AuthService.prototype.getInvitation = function(token) {\n return this.rs.invitations.get(token);\n };\n\n AuthService.prototype.acceptInvitiationWithNewUser = function(data) {\n return this.register(data, \"private\", false);\n };\n\n AuthService.prototype.forgotPassword = function(data) {\n var url;\n url = this.urls.resolve(\"users-password-recovery\");\n data = _.clone(data, false);\n this.removeToken();\n return this.http.post(url, data);\n };\n\n AuthService.prototype.changePasswordFromRecovery = function(data) {\n var url;\n url = this.urls.resolve(\"users-change-password-from-recovery\");\n data = _.clone(data, false);\n this.removeToken();\n return this.http.post(url, data);\n };\n\n AuthService.prototype.changeEmail = function(data) {\n var url;\n url = this.urls.resolve(\"users-change-email\");\n data = _.clone(data, false);\n return this.http.post(url, data);\n };\n\n AuthService.prototype.cancelAccount = function(data) {\n var url;\n url = this.urls.resolve(\"users-cancel-account\");\n data = _.clone(data, false);\n return this.http.post(url, data);\n };\n\n AuthService.prototype.exportProfile = function() {\n var url;\n url = this.urls.resolve(\"users-export\");\n return this.http.post(url);\n };\n\n AuthService.prototype.sendVerificationEmail = function() {\n var url;\n url = this.urls.resolve(\"user-send-verification-email\");\n return this.http.post(url);\n };\n\n return AuthService;\n\n })(taiga.Service);\n\n module.service(\"$tgAuth\", AuthService);\n\n PublicRegisterMessageDirective = function($config, $navUrls, $routeParams, templates) {\n var template, templateFn;\n template = templates.get(\"auth/login-text.html\", true);\n templateFn = function() {\n var nextUrl, publicRegisterEnabled, url;\n publicRegisterEnabled = $config.get(\"publicRegisterEnabled\");\n if (!publicRegisterEnabled) {\n return \"\";\n }\n url = $navUrls.resolve(\"register\");\n if ($routeParams['force_next']) {\n nextUrl = encodeURIComponent($routeParams['force_next']);\n url += \"?next=\" + nextUrl;\n }\n return template({\n url: url\n });\n };\n return {\n restrict: \"AE\",\n scope: {},\n template: templateFn\n };\n };\n\n module.directive(\"tgPublicRegisterMessage\", [\"$tgConfig\", \"$tgNavUrls\", \"$routeParams\", \"$tgTemplate\", PublicRegisterMessageDirective]);\n\n LoginDirective = function($auth, $confirm, $location, $config, $routeParams, $navUrls, $events, $translate, $window, $analytics) {\n var link;\n link = function($scope, $el, $attrs) {\n var form, onError, onSuccess, submit;\n form = new checksley.Form($el.find(\"form.login-form\"));\n $scope.defaultLoginEnabled = $config.get(\"defaultLoginEnabled\", true);\n if ($routeParams['next'] && $routeParams['next'] !== $navUrls.resolve(\"login\") && !$routeParams['next'].startsWith(\"%2Fdiscover\")) {\n $scope.nextUrl = decodeURIComponent($routeParams['next']);\n } else {\n $scope.nextUrl = $navUrls.resolve(\"home\");\n }\n if ($routeParams['force_next']) {\n $scope.nextUrl = decodeURIComponent($routeParams['force_next']);\n }\n onSuccess = function(response) {\n $events.setupConnection();\n $analytics.trackEvent(\"auth\", \"login\", \"user login\", 1);\n if ($scope.nextUrl.indexOf('http') === 0) {\n return $window.location.href = $scope.nextUrl;\n } else {\n return $location.url($scope.nextUrl);\n }\n };\n onError = function(response) {\n return $confirm.notify(\"light-error\", $translate.instant(\"LOGIN_FORM.ERROR_AUTH_INCORRECT\"));\n };\n $scope.onKeyUp = function(event) {\n var target, value;\n target = angular.element(event.currentTarget);\n value = target.val();\n $scope.iscapsLockActivated = false;\n if (value !== value.toLowerCase()) {\n return $scope.iscapsLockActivated = true;\n }\n };\n submit = debounce(2000, (function(_this) {\n return function(event) {\n var data, loginFormType, promise;\n event.preventDefault();\n if (!form.validate()) {\n return;\n }\n data = {\n \"username\": $el.find(\"form.login-form input[name=username]\").val(),\n \"password\": $el.find(\"form.login-form input[name=password]\").val()\n };\n loginFormType = $config.get(\"loginFormType\", \"normal\");\n promise = $auth.login(data, loginFormType);\n return promise.then(onSuccess, onError);\n };\n })(this));\n $el.on(\"submit\", \"form\", submit);\n window.prerenderReady = true;\n return $scope.$on(\"$destroy\", function() {\n return $el.off();\n });\n };\n return {\n link: link\n };\n };\n\n module.directive(\"tgLogin\", [\"$tgAuth\", \"$tgConfirm\", \"$tgLocation\", \"$tgConfig\", \"$routeParams\", \"$tgNavUrls\", \"$tgEvents\", \"$translate\", \"$window\", \"$tgAnalytics\", LoginDirective]);\n\n RegisterDirective = function($auth, $confirm, $location, $navUrls, $config, $routeParams, $analytics, $translate, $window) {\n var link;\n link = function($scope, $el, $attrs) {\n var form, onErrorSubmit, onSuccessSubmit, submit;\n if (!$config.get(\"publicRegisterEnabled\")) {\n $location.path($navUrls.resolve(\"not-found\"));\n $location.replace();\n }\n $scope.data = {};\n form = $el.find(\"form\").checksley({\n onlyOneErrorElement: true\n });\n if ($routeParams['next'] && $routeParams['next'] !== $navUrls.resolve(\"login\")) {\n $scope.nextUrl = decodeURIComponent($routeParams['next']);\n } else {\n $scope.nextUrl = $navUrls.resolve(\"home\");\n }\n onSuccessSubmit = function(response) {\n $analytics.trackEvent(\"auth\", \"register\", \"user registration\", 1);\n if ($scope.nextUrl.indexOf('http') === 0) {\n return $window.location.href = $scope.nextUrl;\n } else {\n return $location.url($scope.nextUrl);\n }\n };\n onErrorSubmit = function(response) {\n var text;\n if (response.data._error_message) {\n text = $translate.instant(\"COMMON.GENERIC_ERROR\", {\n error: response.data._error_message\n });\n $confirm.notify(\"light-error\", text);\n }\n return form.setErrors(response.data);\n };\n submit = debounce(2000, (function(_this) {\n return function(event) {\n var promise;\n event.preventDefault();\n if (!form.validate()) {\n return;\n }\n promise = $auth.register($scope.data);\n return promise.then(onSuccessSubmit, onErrorSubmit);\n };\n })(this));\n $el.on(\"submit\", \"form\", submit);\n $scope.$on(\"$destroy\", function() {\n return $el.off();\n });\n return window.prerenderReady = true;\n };\n return {\n link: link\n };\n };\n\n module.directive(\"tgRegister\", [\"$tgAuth\", \"$tgConfirm\", \"$tgLocation\", \"$tgNavUrls\", \"$tgConfig\", \"$routeParams\", \"$tgAnalytics\", \"$translate\", \"$window\", RegisterDirective]);\n\n RegisterOptionsDirective = function() {\n return {};\n };\n\n module.directive(\"tgRegisterOptions\", [RegisterOptionsDirective]);\n\n ForgotPasswordDirective = function($auth, $confirm, $location, $navUrls, $translate) {\n var link;\n link = function($scope, $el, $attrs) {\n var form, onErrorSubmit, onSuccessSubmit, submit;\n $scope.data = {};\n form = $el.find(\"form\").checksley();\n onSuccessSubmit = function(response) {\n var message, title;\n $location.path($navUrls.resolve(\"login\"));\n title = $translate.instant(\"FORGOT_PASSWORD_FORM.SUCCESS_TITLE\");\n message = $translate.instant(\"FORGOT_PASSWORD_FORM.SUCCESS_TEXT\");\n return $confirm.success(title, message);\n };\n onErrorSubmit = function(response) {\n var text;\n text = $translate.instant(\"FORGOT_PASSWORD_FORM.ERROR\");\n return $confirm.notify(\"light-error\", text);\n };\n submit = debounce(2000, (function(_this) {\n return function(event) {\n var promise;\n event.preventDefault();\n if (!form.validate()) {\n return;\n }\n promise = $auth.forgotPassword($scope.data);\n return promise.then(onSuccessSubmit, onErrorSubmit);\n };\n })(this));\n $el.on(\"submit\", \"form\", submit);\n $scope.$on(\"$destroy\", function() {\n return $el.off();\n });\n return window.prerenderReady = true;\n };\n return {\n link: link\n };\n };\n\n module.directive(\"tgForgotPassword\", [\"$tgAuth\", \"$tgConfirm\", \"$tgLocation\", \"$tgNavUrls\", \"$translate\", ForgotPasswordDirective]);\n\n ChangePasswordFromRecoveryDirective = function($auth, $confirm, $location, $params, $navUrls, $translate) {\n var link;\n link = function($scope, $el, $attrs) {\n var form, onErrorSubmit, onSuccessSubmit, submit, text;\n $scope.data = {};\n if ($params.token != null) {\n $scope.tokenInParams = true;\n $scope.data.token = $params.token;\n } else {\n $location.path($navUrls.resolve(\"login\"));\n text = '';\n text = response.data.token.map(function(message) {\n return text + \" \" + message;\n });\n $confirm.notify(\"light-error\", text);\n }\n form = $el.find(\"form\").checksley();\n onSuccessSubmit = function(response) {\n $location.path($navUrls.resolve(\"login\"));\n text = $translate.instant(\"CHANGE_PASSWORD_RECOVERY_FORM.SUCCESS\");\n return $confirm.success(text);\n };\n onErrorSubmit = function(response) {\n text = '';\n text = response.data.password.map(function(message) {\n return text + \" \" + message;\n });\n return $confirm.notify(\"light-error\", text);\n };\n submit = debounce(2000, (function(_this) {\n return function(event) {\n var promise;\n event.preventDefault();\n if (!form.validate()) {\n return;\n }\n promise = $auth.changePasswordFromRecovery($scope.data);\n return promise.then(onSuccessSubmit, onErrorSubmit);\n };\n })(this));\n $el.on(\"submit\", \"form\", submit);\n return $scope.$on(\"$destroy\", function() {\n return $el.off();\n });\n };\n return {\n link: link\n };\n };\n\n module.directive(\"tgChangePasswordFromRecovery\", [\"$tgAuth\", \"$tgConfirm\", \"$tgLocation\", \"$routeParams\", \"$tgNavUrls\", \"$translate\", ChangePasswordFromRecoveryDirective]);\n\n InvitationDirective = function($auth, $confirm, $location, $config, $params, $navUrls, $analytics, $translate, config) {\n var link;\n link = function($scope, $el, $attrs) {\n var loginForm, onErrorSubmitLogin, onErrorSubmitRegister, onSuccessSubmitLogin, onSuccessSubmitRegister, promise, registerForm, submitLogin, submitRegister, token;\n token = $params.token;\n promise = $auth.getInvitation(token);\n promise.then(function(invitation) {\n $scope.invitation = invitation;\n return $scope.publicRegisterEnabled = config.get(\"publicRegisterEnabled\");\n });\n promise.then(null, function(response) {\n var text;\n $location.path($navUrls.resolve(\"login\"));\n text = $translate.instant(\"INVITATION_LOGIN_FORM.NOT_FOUND\");\n return $confirm.notify(\"light-error\", text);\n });\n $scope.dataLogin = {\n token: token\n };\n loginForm = $el.find(\"form.login-form\").checksley({\n onlyOneErrorElement: true\n });\n onSuccessSubmitLogin = function(response) {\n var text;\n $analytics.trackEvent(\"auth\", \"invitationAccept\", \"invitation accept with existing user\", 1);\n $location.path($navUrls.resolve(\"project\", {\n project: $scope.invitation.project_slug\n }));\n text = $translate.instant(\"INVITATION_LOGIN_FORM.SUCCESS\", {\n \"project_name\": $scope.invitation.project_name\n });\n return $confirm.notify(\"success\", text);\n };\n onErrorSubmitLogin = function(response) {\n return $confirm.notify(\"light-error\", response.data._error_message);\n };\n submitLogin = debounce(2000, (function(_this) {\n return function(event) {\n var data, loginFormType;\n event.preventDefault();\n if (!loginForm.validate()) {\n return;\n }\n loginFormType = $config.get(\"loginFormType\", \"normal\");\n data = $scope.dataLogin;\n promise = $auth.login({\n username: data.username,\n password: data.password,\n invitation_token: data.token\n }, loginFormType);\n return promise.then(onSuccessSubmitLogin, onErrorSubmitLogin);\n };\n })(this));\n $el.on(\"submit\", \"form.login-form\", submitLogin);\n $el.on(\"click\", \".button-login\", submitLogin);\n $scope.dataRegister = {\n token: token\n };\n registerForm = $el.find(\"form.register-form\").checksley({\n onlyOneErrorElement: true\n });\n onSuccessSubmitRegister = function(response) {\n var text;\n $analytics.trackEvent(\"auth\", \"invitationAccept\", \"invitation accept with new user\", 1);\n $location.path($navUrls.resolve(\"project\", {\n project: $scope.invitation.project_slug\n }));\n text = $translate.instant(\"INVITATION_LOGIN_FORM.SUCCESS\", {\n \"project_name\": $scope.invitation.project_name\n });\n return $confirm.notify(\"success\", text);\n };\n onErrorSubmitRegister = function(response) {\n var text;\n if (response.data._error_message) {\n text = $translate.instant(\"COMMON.GENERIC_ERROR\", {\n error: response.data._error_message\n });\n $confirm.notify(\"light-error\", text);\n }\n return registerForm.setErrors(response.data);\n };\n submitRegister = debounce(2000, (function(_this) {\n return function(event) {\n event.preventDefault();\n if (!registerForm.validate()) {\n return;\n }\n promise = $auth.acceptInvitiationWithNewUser($scope.dataRegister);\n return promise.then(onSuccessSubmitRegister, onErrorSubmitRegister);\n };\n })(this));\n $el.on(\"submit\", \"form.register-form\", submitRegister);\n $el.on(\"click\", \".button-register\", submitRegister);\n return $scope.$on(\"$destroy\", function() {\n return $el.off();\n });\n };\n return {\n link: link\n };\n };\n\n module.directive(\"tgInvitation\", [\"$tgAuth\", \"$tgConfirm\", \"$tgLocation\", \"$tgConfig\", \"$routeParams\", \"$tgNavUrls\", \"$tgAnalytics\", \"$translate\", \"$tgConfig\", InvitationDirective]);\n\n VerifyEmailDirective = function($repo, $model, $auth, $confirm, $location, $params, $navUrls, $translate) {\n var link;\n link = function($scope, $el, $attrs) {\n var form, onErrorSubmit, onSuccessSubmit, submit;\n $scope.data = {};\n $scope.data.email_token = $params.email_token;\n form = $el.find(\"form\").checksley();\n onSuccessSubmit = function(response) {\n var text;\n if ($auth.isAuthenticated()) {\n $repo.queryOne(\"users\", $auth.getUser().id).then((function(_this) {\n return function(data) {\n return $auth.setUser(data);\n };\n })(this));\n $location.url($navUrls.resolve(\"home\"));\n } else {\n $location.url($navUrls.resolve(\"login\"));\n }\n text = $translate.instant(\"VERIFY_EMAIL_FORM.SUCCESS\");\n return $confirm.success(text);\n };\n onErrorSubmit = function(response) {\n var text;\n text = $translate.instant(\"COMMON.GENERIC_ERROR\", {\n error: response.data._error_message\n });\n return $confirm.notify(\"light-error\", text);\n };\n submit = function() {\n var promise;\n if (!form.validate()) {\n return;\n }\n promise = $auth.changeEmail($scope.data);\n return promise.then(onSuccessSubmit, onErrorSubmit);\n };\n $el.on(\"submit\", function(event) {\n event.preventDefault();\n return submit();\n });\n $el.on(\"click\", \"a.ng-submit-form\", function(event) {\n event.preventDefault();\n return submit();\n });\n return $scope.$on(\"$destroy\", function() {\n return $el.off();\n });\n };\n return {\n link: link\n };\n };\n\n module.directive(\"tgVerifyEmail\", [\"$tgRepo\", \"$tgModel\", \"$tgAuth\", \"$tgConfirm\", \"$tgLocation\", \"$routeParams\", \"$tgNavUrls\", \"$translate\", VerifyEmailDirective]);\n\n ChangeEmailDirective = function($repo, $model, $auth, $confirm, $location, $params, $navUrls, $translate) {\n var link;\n link = function($scope, $el, $attrs) {\n var form, onErrorSubmit, onSuccessSubmit, submit;\n $scope.data = {};\n $scope.data.email_token = $params.email_token;\n form = $el.find(\"form\").checksley();\n onSuccessSubmit = function(response) {\n var text;\n if ($auth.isAuthenticated()) {\n $repo.queryOne(\"users\", $auth.getUser().id).then((function(_this) {\n return function(data) {\n return $auth.setUser(data);\n };\n })(this));\n $location.url($navUrls.resolve(\"home\"));\n } else {\n $location.url($navUrls.resolve(\"login\"));\n }\n text = $translate.instant(\"CHANGE_EMAIL_FORM.SUCCESS\");\n return $confirm.success(text);\n };\n onErrorSubmit = function(response) {\n var text;\n text = $translate.instant(\"COMMON.GENERIC_ERROR\", {\n error: response.data._error_message\n });\n return $confirm.notify(\"light-error\", text);\n };\n submit = function() {\n var promise;\n if (!form.validate()) {\n return;\n }\n promise = $auth.changeEmail($scope.data);\n return promise.then(onSuccessSubmit, onErrorSubmit);\n };\n $el.on(\"submit\", function(event) {\n event.preventDefault();\n return submit();\n });\n $el.on(\"click\", \"a.ng-submit-form\", function(event) {\n event.preventDefault();\n return submit();\n });\n return $scope.$on(\"$destroy\", function() {\n return $el.off();\n });\n };\n return {\n link: link\n };\n };\n\n module.directive(\"tgChangeEmail\", [\"$tgRepo\", \"$tgModel\", \"$tgAuth\", \"$tgConfirm\", \"$tgLocation\", \"$routeParams\", \"$tgNavUrls\", \"$translate\", ChangeEmailDirective]);\n\n CancelAccountDirective = function($repo, $model, $auth, $confirm, $location, $params, $navUrls) {\n var link;\n link = function($scope, $el, $attrs) {\n var form, onErrorSubmit, onSuccessSubmit, submit;\n $scope.data = {};\n $scope.data.cancel_token = $params.cancel_token;\n form = $el.find(\"form\").checksley();\n onSuccessSubmit = function(response) {\n var text;\n $auth.logout();\n $location.path($navUrls.resolve(\"home\"));\n text = $translate.instant(\"CANCEL_ACCOUNT.SUCCESS\");\n return $confirm.success(text);\n };\n onErrorSubmit = function(response) {\n var text;\n text = $translate.instant(\"COMMON.GENERIC_ERROR\", {\n error: response.data._error_message\n });\n return $confirm.notify(\"error\", text);\n };\n submit = debounce(2000, (function(_this) {\n return function(event) {\n var promise;\n event.preventDefault();\n if (!form.validate()) {\n return;\n }\n promise = $auth.cancelAccount($scope.data);\n return promise.then(onSuccessSubmit, onErrorSubmit);\n };\n })(this));\n $el.on(\"submit\", \"form\", submit);\n return $scope.$on(\"$destroy\", function() {\n return $el.off();\n });\n };\n return {\n link: link\n };\n };\n\n module.directive(\"tgCancelAccount\", [\"$tgRepo\", \"$tgModel\", \"$tgAuth\", \"$tgConfirm\", \"$tgLocation\", \"$routeParams\", \"$tgNavUrls\", CancelAccountDirective]);\n\n}).call(this);\n\n\n/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n * Copyright (c) 2021-present Kaleidos Ventures SL\n */\n\n(function() {\n var module;\n\n module = angular.module(\"taigaBacklog\", []);\n\n}).call(this);\n\n\n/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n * Copyright (c) 2021-present Kaleidos Ventures SL\n */\n\n(function() {\n var TaigaMainDirective, bindOnce, groupBy, init, module, taiga, urls;\n\n taiga = this.taiga;\n\n groupBy = this.taiga.groupBy;\n\n bindOnce = this.taiga.bindOnce;\n\n module = angular.module(\"taigaBase\", []);\n\n TaigaMainDirective = function($rootscope, $window) {\n var link;\n link = function($scope, $el, $attrs) {\n return $window.onresize = function() {\n return $rootscope.$broadcast(\"resize\");\n };\n };\n return {\n link: link\n };\n };\n\n module.directive(\"tgMain\", [\"$rootScope\", \"$window\", TaigaMainDirective]);\n\n urls = {\n \"home\": \"/\",\n \"projects\": \"/projects\",\n \"error\": \"/error\",\n \"not-found\": \"/not-found\",\n \"permission-denied\": \"/permission-denied\",\n \"discover\": \"/discover\",\n \"discover-search\": \"/discover/search\",\n \"login\": \"/login\",\n \"forgot-password\": \"/forgot-password\",\n \"change-password\": \"/change-password/:token\",\n \"change-email\": \"/change-email/:token\",\n \"verified-email\": \"/change-email/:token\",\n \"cancel-account\": \"/cancel-account/:token\",\n \"register\": \"/register\",\n \"invitation\": \"/invitation/:token\",\n \"create-project\": \"/project/new\",\n \"create-project-scrum\": \"/project/new/scrum\",\n \"create-project-kanban\": \"/project/new/kanban\",\n \"create-project-duplicate\": \"/project/new/duplicate\",\n \"create-project-import\": \"/project/new/import\",\n \"create-project-import-platform\": \"/project/new/import/:platform\",\n \"profile\": \"/profile\",\n \"user-profile\": \"/profile/:username\",\n \"blocked-project\": \"/blocked-project/:project\",\n \"project\": \"/project/:project\",\n \"project-detail-ref\": \"/project/:project/t/:ref\",\n \"project-backlog\": \"/project/:project/backlog\",\n \"project-taskboard\": \"/project/:project/taskboard/:sprint\",\n \"project-kanban\": \"/project/:project/kanban\",\n \"project-issues\": \"/project/:project/issues\",\n \"project-epics\": \"/project/:project/epics\",\n \"project-search\": \"/project/:project/search\",\n \"project-timeline\": \"/project/:project/timeline\",\n \"project-epics-detail\": \"/project/:project/epic/:ref\",\n \"project-userstories-detail\": \"/project/:project/us/:ref\",\n \"project-tasks-detail\": \"/project/:project/task/:ref\",\n \"project-issues-detail\": \"/project/:project/issue/:ref\",\n \"project-wiki\": \"/project/:project/wiki\",\n \"project-wiki-list\": \"/project/:project/wiki-list\",\n \"project-wiki-page\": \"/project/:project/wiki/:slug\",\n \"project-team\": \"/project/:project/team\",\n \"project-admin-home\": \"/project/:project/admin/project-profile/details\",\n \"project-admin-project-profile-details\": \"/project/:project/admin/project-profile/details\",\n \"project-admin-project-profile-default-values\": \"/project/:project/admin/project-profile/default-values\",\n \"project-admin-project-profile-modules\": \"/project/:project/admin/project-profile/modules\",\n \"project-admin-project-profile-export\": \"/project/:project/admin/project-profile/export\",\n \"project-admin-project-profile-reports\": \"/project/:project/admin/project-profile/reports\",\n \"project-admin-project-values-status\": \"/project/:project/admin/project-values/status\",\n \"project-admin-project-values-points\": \"/project/:project/admin/project-values/points\",\n \"project-admin-project-values-priorities\": \"/project/:project/admin/project-values/priorities\",\n \"project-admin-project-values-severities\": \"/project/:project/admin/project-values/severities\",\n \"project-admin-project-values-types\": \"/project/:project/admin/project-values/types\",\n \"project-admin-project-values-custom-fields\": \"/project/:project/admin/project-values/custom-fields\",\n \"project-admin-project-values-tags\": \"/project/:project/admin/project-values/tags\",\n \"project-admin-project-values-due-dates\": \"/project/:project/admin/project-values/due-dates\",\n \"project-admin-project-values-kanban-power-ups\": \"/project/:project/admin/project-values/kanban-power-ups\",\n \"project-admin-memberships\": \"/project/:project/admin/memberships\",\n \"project-admin-roles\": \"/project/:project/admin/roles\",\n \"project-admin-third-parties-webhooks\": \"/project/:project/admin/third-parties/webhooks\",\n \"project-admin-third-parties-github\": \"/project/:project/admin/third-parties/github\",\n \"project-admin-third-parties-gitlab\": \"/project/:project/admin/third-parties/gitlab\",\n \"project-admin-third-parties-bitbucket\": \"/project/:project/admin/third-parties/bitbucket\",\n \"project-admin-third-parties-gogs\": \"/project/:project/admin/third-parties/gogs\",\n \"project-admin-contrib\": \"/project/:project/admin/contrib/:plugin\",\n \"user-settings-user-profile\": \"/user-settings/user-profile\",\n \"user-settings-user-change-password\": \"/user-settings/user-change-password\",\n \"user-settings-user-avatar\": \"/user-settings/user-avatar\",\n \"user-settings-user-project-settings\": \"/user-settings/user-project-settings\",\n \"user-settings-mail-notifications\": \"/user-settings/mail-notifications\",\n \"user-settings-live-notifications\": \"/user-settings/live-notifications\",\n \"user-settings-web-notifications\": \"/user-settings/web-notifications\",\n \"user-settings-contrib\": \"/user-settings/contrib/:plugin\",\n \"notifications\": \"/notifications\"\n };\n\n init = function($log, $navurls) {\n $log.debug(\"Initialize navigation urls\");\n return $navurls.update(urls);\n };\n\n module.run([\"$log\", \"$tgNavUrls\", init]);\n\n}).call(this);\n\n\n/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n * Copyright (c) 2021-present Kaleidos Ventures SL\n */\n\n(function() {\n var AnimationFrame, Autofocus, Capslock, CheckPermissionDirective, ClassPermissionDirective, DataPickerConfig, ProjectUrl, Qqueue, QueueModelTransformation, SelectedText, Svg, Template, ToggleCommentDirective, module, taiga,\n slice = [].slice,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n taiga = this.taiga;\n\n module = angular.module(\"taigaCommon\", []);\n\n DataPickerConfig = function($translate, $config, $auth) {\n return {\n get: function() {\n var isRTL, lang, rtlLanguages, user;\n user = $auth.getUser();\n lang = (user != null ? user.lang : void 0) || $translate.preferredLanguage();\n rtlLanguages = $config.get(\"rtlLanguages\", []);\n isRTL = rtlLanguages.indexOf(lang) > -1;\n return {\n i18n: {\n previousMonth: $translate.instant(\"COMMON.PICKERDATE.PREV_MONTH\"),\n nextMonth: $translate.instant(\"COMMON.PICKERDATE.NEXT_MONTH\"),\n months: [$translate.instant(\"COMMON.PICKERDATE.MONTHS.JAN\"), $translate.instant(\"COMMON.PICKERDATE.MONTHS.FEB\"), $translate.instant(\"COMMON.PICKERDATE.MONTHS.MAR\"), $translate.instant(\"COMMON.PICKERDATE.MONTHS.APR\"), $translate.instant(\"COMMON.PICKERDATE.MONTHS.MAY\"), $translate.instant(\"COMMON.PICKERDATE.MONTHS.JUN\"), $translate.instant(\"COMMON.PICKERDATE.MONTHS.JUL\"), $translate.instant(\"COMMON.PICKERDATE.MONTHS.AUG\"), $translate.instant(\"COMMON.PICKERDATE.MONTHS.SEP\"), $translate.instant(\"COMMON.PICKERDATE.MONTHS.OCT\"), $translate.instant(\"COMMON.PICKERDATE.MONTHS.NOV\"), $translate.instant(\"COMMON.PICKERDATE.MONTHS.DEC\")],\n weekdays: [$translate.instant(\"COMMON.PICKERDATE.WEEK_DAYS.SUN\"), $translate.instant(\"COMMON.PICKERDATE.WEEK_DAYS.MON\"), $translate.instant(\"COMMON.PICKERDATE.WEEK_DAYS.TUE\"), $translate.instant(\"COMMON.PICKERDATE.WEEK_DAYS.WED\"), $translate.instant(\"COMMON.PICKERDATE.WEEK_DAYS.THU\"), $translate.instant(\"COMMON.PICKERDATE.WEEK_DAYS.FRI\"), $translate.instant(\"COMMON.PICKERDATE.WEEK_DAYS.SAT\")],\n weekdaysShort: [$translate.instant(\"COMMON.PICKERDATE.WEEK_DAYS_SHORT.SUN\"), $translate.instant(\"COMMON.PICKERDATE.WEEK_DAYS_SHORT.MON\"), $translate.instant(\"COMMON.PICKERDATE.WEEK_DAYS_SHORT.TUE\"), $translate.instant(\"COMMON.PICKERDATE.WEEK_DAYS_SHORT.WED\"), $translate.instant(\"COMMON.PICKERDATE.WEEK_DAYS_SHORT.THU\"), $translate.instant(\"COMMON.PICKERDATE.WEEK_DAYS_SHORT.FRI\"), $translate.instant(\"COMMON.PICKERDATE.WEEK_DAYS_SHORT.SAT\")]\n },\n isRTL: isRTL,\n firstDay: parseInt($translate.instant(\"COMMON.PICKERDATE.FIRST_DAY_OF_WEEK\"), 10),\n format: $translate.instant(\"COMMON.PICKERDATE.FORMAT\")\n };\n }\n };\n };\n\n module.factory(\"tgDatePickerConfigService\", [\"$translate\", \"$tgConfig\", \"$tgAuth\", DataPickerConfig]);\n\n SelectedText = function($window, $document) {\n var get;\n get = function() {\n if ($window.getSelection) {\n return $window.getSelection().toString();\n } else if ($document.selection) {\n return $document.selection.createRange().text;\n }\n return \"\";\n };\n return {\n get: get\n };\n };\n\n module.factory(\"$selectedText\", [\"$window\", \"$document\", SelectedText]);\n\n CheckPermissionDirective = function(projectService) {\n var link, render;\n render = function($el, project, permission) {\n if (project && permission) {\n if (project.get('my_permissions').indexOf(permission) > -1) {\n return $el.removeClass('hidden');\n }\n }\n };\n link = function($scope, $el, $attrs) {\n var permission, unObserve, unwatch;\n $el.addClass('hidden');\n permission = $attrs.tgCheckPermission;\n unwatch = $scope.$watch(function() {\n return projectService.project;\n }, function() {\n if (!projectService.project) {\n return;\n }\n render($el, projectService.project, permission);\n return unwatch();\n });\n unObserve = $attrs.$observe(\"tgCheckPermission\", function(permission) {\n if (!permission) {\n return;\n }\n render($el, projectService.project, permission);\n return unObserve();\n });\n return $scope.$on(\"$destroy\", function() {\n return $el.off();\n });\n };\n return {\n link: link\n };\n };\n\n CheckPermissionDirective.$inject = [\"tgProjectService\"];\n\n module.directive(\"tgCheckPermission\", CheckPermissionDirective);\n\n ClassPermissionDirective = function() {\n var link, name;\n name = \"tgClassPermission\";\n link = function($scope, $el, $attrs) {\n var checkPermissions, tgClassPermissionWatchAction, unbindWatcher;\n checkPermissions = function(project, className, permission) {\n var negation;\n negation = permission[0] === \"!\";\n if (negation) {\n permission = permission.slice(1);\n }\n if (negation && project.my_permissions.indexOf(permission) === -1) {\n return $el.addClass(className);\n } else if (!negation && project.my_permissions.indexOf(permission) !== -1) {\n return $el.addClass(className);\n } else {\n return $el.removeClass(className);\n }\n };\n tgClassPermissionWatchAction = function(project) {\n var className, classes, permission, results;\n if (project) {\n unbindWatcher();\n classes = $scope.$eval($attrs[name]);\n results = [];\n for (className in classes) {\n permission = classes[className];\n results.push(checkPermissions(project, className, permission));\n }\n return results;\n }\n };\n return unbindWatcher = $scope.$watch(\"project\", tgClassPermissionWatchAction);\n };\n return {\n link: link\n };\n };\n\n module.directive(\"tgClassPermission\", ClassPermissionDirective);\n\n AnimationFrame = function() {\n var add, animationFrame, performAnimation, tail;\n animationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;\n performAnimation = (function(_this) {\n return function(time) {\n var fn;\n fn = tail.shift();\n fn();\n if (tail.length) {\n return animationFrame(performAnimation);\n }\n };\n })(this);\n tail = [];\n add = function() {\n var fn, i, len, results;\n results = [];\n for (i = 0, len = arguments.length; i < len; i++) {\n fn = arguments[i];\n tail.push(fn);\n if (tail.length === 1) {\n results.push(animationFrame(performAnimation));\n } else {\n results.push(void 0);\n }\n }\n return results;\n };\n return {\n add: add\n };\n };\n\n module.factory(\"animationFrame\", AnimationFrame);\n\n ToggleCommentDirective = function() {\n var link;\n link = function($scope, $el, $attrs) {\n return $el.find(\"textarea\").on(\"focus\", function() {\n return $el.addClass(\"active\");\n });\n };\n return {\n link: link\n };\n };\n\n module.directive(\"tgToggleComment\", ToggleCommentDirective);\n\n ProjectUrl = function($navurls) {\n var get;\n get = function(project) {\n var ctx;\n if (project.toJS) {\n project = project.toJS();\n }\n ctx = {\n project: project.slug\n };\n if (project.is_backlog_activated && project.my_permissions.indexOf(\"view_us\") > -1) {\n return $navurls.resolve(\"project-backlog\", ctx);\n }\n if (project.is_kanban_activated && project.my_permissions.indexOf(\"view_us\") > -1) {\n return $navurls.resolve(\"project-kanban\", ctx);\n }\n if (project.is_wiki_activated && project.my_permissions.indexOf(\"view_wiki_pages\") > -1) {\n return $navurls.resolve(\"project-wiki\", ctx);\n }\n if (project.is_issues_activated && project.my_permissions.indexOf(\"view_issues\") > -1) {\n return $navurls.resolve(\"project-issues\", ctx);\n }\n return $navurls.resolve(\"project\", ctx);\n };\n return {\n get: get\n };\n };\n\n module.factory(\"$projectUrl\", [\"$tgNavUrls\", ProjectUrl]);\n\n Qqueue = function($q) {\n var deferred, lastPromise, qqueue;\n deferred = $q.defer();\n deferred.resolve();\n lastPromise = deferred.promise;\n qqueue = {\n bindAdd: (function(_this) {\n return function(fn) {\n return function() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return lastPromise = lastPromise.then(function() {\n return fn.apply(_this, args);\n });\n };\n };\n })(this),\n add: (function(_this) {\n return function(fn) {\n if (!lastPromise) {\n lastPromise = fn();\n } else {\n lastPromise = lastPromise.then(fn);\n }\n return qqueue;\n };\n })(this)\n };\n return qqueue;\n };\n\n module.factory(\"$tgQqueue\", [\"$q\", Qqueue]);\n\n QueueModelTransformation = (function(superClass) {\n extend(QueueModelTransformation, superClass);\n\n QueueModelTransformation.$inject = [\"$tgQqueue\", \"$tgRepo\", \"$q\", \"$tgModel\"];\n\n function QueueModelTransformation(qqueue1, repo, q, model1) {\n this.qqueue = qqueue1;\n this.repo = repo;\n this.q = q;\n this.model = model1;\n }\n\n QueueModelTransformation.prototype.setObject = function(scope1, prop) {\n this.scope = scope1;\n this.prop = prop;\n };\n\n QueueModelTransformation.prototype.clone = function() {\n var attrs, model;\n attrs = _.cloneDeep(this.scope[this.prop]._attrs);\n model = this.model.make_model(this.scope[this.prop]._name, attrs);\n return model;\n };\n\n QueueModelTransformation.prototype.getObj = function() {\n return this.scope[this.prop];\n };\n\n QueueModelTransformation.prototype.save = function(transformation) {\n var defered;\n defered = this.q.defer();\n this.qqueue.add((function(_this) {\n return function() {\n var clone, comment, modified, obj, success;\n obj = _this.getObj();\n comment = obj.comment;\n obj.comment = '';\n clone = _this.clone();\n modified = _.omit(obj._modifiedAttrs, ['version']);\n clone = _.assign(clone, modified);\n transformation(clone);\n if (comment.length) {\n clone.comment = comment;\n }\n success = function() {\n _this.scope[_this.prop] = clone;\n return defered.resolve.apply(null, arguments);\n };\n return _this.repo.save(clone).then(success, defered.reject);\n };\n })(this));\n return defered.promise;\n };\n\n return QueueModelTransformation;\n\n })(taiga.Service);\n\n module.service(\"$tgQueueModelTransformation\", QueueModelTransformation);\n\n Template = function($templateCache) {\n return {\n get: (function(_this) {\n return function(name, lodash) {\n var tmp;\n if (lodash == null) {\n lodash = false;\n }\n tmp = $templateCache.get(name);\n if (lodash) {\n tmp = _.template(tmp);\n }\n return tmp;\n };\n })(this)\n };\n };\n\n module.factory(\"$tgTemplate\", [\"$templateCache\", Template]);\n\n Capslock = function() {\n var template;\n template = \"\";\n template = \"
\" + text + \"
\";\n });\n } else {\n html += \"\" + item.joyride.text + \"
\";\n }\n item.intro = html;\n return item;\n });\n };\n\n return JoyRideService;\n\n })(taiga.Service);\n\n angular.module(\"taigaComponents\").service(\"tgJoyRideService\", JoyRideService);\n\n}).call(this);\n\n\n/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n * Copyright (c) 2021-present Kaleidos Ventures SL\n */\n\n(function() {\n var KanbanBoardZoomDirective;\n\n KanbanBoardZoomDirective = function(storage, projectService) {\n var link;\n link = function(scope, el, attrs, ctrl) {\n var getZoomView, zooms;\n scope.zoomIndex = storage.get(\"kanban_zoom\", 1);\n scope.levels = 4;\n zooms = [[\"assigned_to\", \"ref\"], [\"subject\", \"card-data\", \"assigned_to_extended\"], [\"tags\", \"extra_info\", \"unfold\"], [\"related_tasks\", \"attachments\"]];\n getZoomView = function(zoomIndex) {\n if (zoomIndex == null) {\n zoomIndex = 0;\n }\n if (zoomIndex > 3) {\n zoomIndex = 3;\n }\n zoomIndex = Number(zoomIndex);\n if (Number(storage.get(\"kanban_zoom\")) !== zoomIndex) {\n storage.set(\"kanban_zoom\", zoomIndex);\n }\n return _.reduce(zooms, function(result, value, key) {\n if (key <= zoomIndex) {\n result = result.concat(value);\n }\n return result;\n });\n };\n return scope.$watch('zoomIndex', function(zoomLevel) {\n var zoom;\n zoom = getZoomView(zoomLevel);\n return scope.onZoomChange({\n zoomLevel: zoomLevel,\n zoom: zoom\n });\n });\n };\n return {\n scope: {\n onZoomChange: \"&\"\n },\n template: \"