!function(){"use strict";angular.module("SOGo.ContactsUI",["ngCookies","ui.router","angularFileUpload","ck","SOGo.Common","SOGo.PreferencesUI","SOGo.MailerUI"]).config(e).run(a),e.$inject=["$stateProvider","$urlRouterProvider"];functione(e,a){e.state("app",{url:"/addressbooks",abstract:!0,views:{addressbooks:{templateUrl:"UIxContactFoldersView",controller:"AddressBooksController",controllerAs:"app"}},resolve:{stateAddressbooks:t}}).state("app.addressbook",{url:"/:addressbookId",views:{addressbook:{templateUrl:"addressbook",controller:"AddressBookController",controllerAs:"addressbook"}},resolve:{stateAddressbook:o}}).state("app.addressbook.new",{url:"/{contactType:(?:card|list)}/new",params:{refs:{array:!0}},views:{card:{templateUrl:"UIxContactEditorTemplate",controller:"CardController",controllerAs:"editor"}},resolve:{stateCard:r}}).state("app.addressbook.card",{url:"/:cardId",abstract:!0,views:{card:{template:"<ui-view/>"}},resolve:{stateCard:s},onEnter:d,onExit:n}).state("app.addressbook.card.view",{url:"/view",views:{"card@app.addressbook":{templateUrl:"UIxContactViewTemplate",controller:"CardController",controllerAs:"editor"}}}).state("app.addressbook.card.editor",{url:"/edit",views:{"card@app.addressbook":{templateUrl:"UIxContactEditorTemplate",controller:"CardController",controllerAs:"editor"}}}),a.otherwise("/addressbooks/personal")}t.$inject=["AddressBook"];functiont(e){returne.$findAll(window.contactFolders)}o.$inject=["$q","$state","$stateParams","AddressBook"];functiono(e,t,o,r){vars=_.find(r.$findAll(),function(e){returne.id==o.addressbookId});returns?(deletes.selectedCard,s.$reload(),s):e.reject("Addressbook "+o.addressbookId+" not found")}r.$inject=["$stateParams","stateAddressbook","Card"];functionr(e,t,o){varr="v"+e.contactType,s=newo({pid:e.addressbookId,c_component:r,refs:e.refs});returnt.selectedCard=!0,s}s.$inject=["$state","$stateParams","stateAddressbook"];functions(e,t,o){returno.$futureAddressBookData.then(function(){varr=_.find(o.$cards,function(e){returne.id==t.cardId});if(r)returnr.$reload();e.go("app.addressbook")})}d.$inject=["$stateParams","stateAddressbook"];functiond(e,t){t.selectedCard=e.cardId}n.$inject=["stateAddressbook"];functionn(e){deleteo.selectedCard}a.$inject=["$rootScope","$log","$state"];functiona(e,t,o){e.$on("$stateChangeError",function(e,r,s,d,n,a){t.error(a),o.go("app.addressbook",{addressbookId:"personal"})}),e.$on("$routeChangeError",function(e,o,r,s){t.error(e,o,r,s)})}}(),function(){"use strict";e.$inject=["$scope","$q","$window","$state","$timeout","$mdDialog","$mdToast","Account","Card","AddressBook","sgFocus","Dialog","sgSettings","sgHotkeys","stateAddressbooks","stateAddressbook"];functione(e,t,o,r,s,d,n,a,c,i,u,f,p,h,m,g){var$=this,k=[];this.$onInit=function(){i.selectedFolder=g,this.service=i,this.selectedFolder=g,this.mode={search:!1,multiple:0},(t=k).push(h.createHotkey({key:l("hotkey_search"),description:l("Search"),callback:angular.bind($,$.searchMode)})),t.push(h.createHotkey({key:l("key_create_card"),description:l("Create a new address book card"),callback:angular.bind($,$.newComponent,"card")})),t.push(h.createHotkey({key:l("key_create_list"),description:l("Create a new list"),callback:angular.bind($,$.newComponent,"list")})),t.push(h.createHotkey({key:"space",description:l("Toggle item"),callback:angular.bind($,$.toggleCardSelection)})),t.push(h.createHotkey({key:"shift+space",description:l("Toggle range of items"),callback:angular.bind($,$.toggleCardSelection)})),t.push(h.createHotkey({key:"up",description:l("View next item"),callback:b})),t.push(h.createHotkey({key:"down",description:l("View previous item"),callback:C})),t.push(h.createHotkey({key:"shift+up",description:l("Add next item to selection"),callback:v})),t.push(h.createHotkey({key:"shift+down",description:l("Add previous item to selection"),callback:w})),_.forEach(["backspace","delete"],function(e){t.push(h.createHotkey({key:e,description:l("Delete selected card or address book"),callback:angular.bind($,$.confirmDeleteSelectedCards)}))}),_.forEach(t,function(e){h.regist