diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-03-21 10:09:24 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-03-21 13:36:50 +0100 |
commit | 35550fe42e36868be1a3ac471bea6dc89b8b6200 (patch) | |
tree | c18c147f6f59202baee0bfe2c45bf30d83c2bbba /js/build | |
parent | c0e6ca12e83e27b2ef86a58f9a44c0248e711a75 (diff) |
fix autopaging in search
Diffstat (limited to 'js/build')
-rw-r--r-- | js/build/app.js | 12 | ||||
-rw-r--r-- | js/build/app.min.js | 2 | ||||
-rw-r--r-- | js/build/app.min.js.map | 2 |
3 files changed, 9 insertions, 7 deletions
diff --git a/js/build/app.js b/js/build/app.js index 626fb7550..bc178ff8c 100644 --- a/js/build/app.js +++ b/js/build/app.js @@ -335,8 +335,8 @@ app.controller('AppController', }; }]); app.controller('ContentController', -["Publisher", "FeedResource", "ItemResource", "SettingsResource", "data", "$route", "$routeParams", "FEED_TYPE", "ITEM_AUTO_PAGE_SIZE", "Loading", function (Publisher, FeedResource, ItemResource, SettingsResource, data, - $route, $routeParams, FEED_TYPE, ITEM_AUTO_PAGE_SIZE, Loading) { +["Publisher", "FeedResource", "ItemResource", "SettingsResource", "data", "$route", "$routeParams", "$location", "FEED_TYPE", "ITEM_AUTO_PAGE_SIZE", "Loading", function (Publisher, FeedResource, ItemResource, SettingsResource, data, + $route, $routeParams, $location, FEED_TYPE, ITEM_AUTO_PAGE_SIZE, Loading) { 'use strict'; ItemResource.clear(); @@ -479,10 +479,11 @@ app.controller('ContentController', var oldestFirst = getOrdering(); var showAll = SettingsResource.get('showAll'); var self = this; + var search = $location.search().search; Loading.setLoading('autopaging', true); - ItemResource.autoPage(type, id, oldestFirst, showAll) + ItemResource.autoPage(type, id, oldestFirst, showAll, search) .success(function (data) { Publisher.publishAll(data); @@ -1572,7 +1573,7 @@ app.factory('ItemResource', ["Resource", "$http", "BASE_URL", "ITEM_BATCH_SIZE", ItemResource.prototype.autoPage = function (type, id, oldestFirst, - showAll) { + showAll, search) { var offset; if (oldestFirst) { @@ -1590,7 +1591,8 @@ app.factory('ItemResource', ["Resource", "$http", "BASE_URL", "ITEM_BATCH_SIZE", offset: offset, limit: this.batchSize, oldestFirst: oldestFirst, - showAll: showAll + showAll: showAll, + search: search } }); }; diff --git a/js/build/app.min.js b/js/build/app.min.js index d24c7bf7a..04e728703 100644 --- a/js/build/app.min.js +++ b/js/build/app.min.js @@ -1,3 +1,3 @@ -!function(a,b,c,d,e,f,g,h,i){"use strict";var j=d.module("News",["ngRoute","ngSanitize","ngAnimate"]);j.config(["$routeProvider","$provide","$httpProvider",function(a,b,c){var d={FEED:0,FOLDER:1,STARRED:2,SUBSCRIPTIONS:3,SHARED:4,EXPLORE:5};b.constant("REFRESH_RATE",60),b.constant("ITEM_BATCH_SIZE",40),b.constant("ITEM_AUTO_PAGE_SIZE",20),b.constant("BASE_URL",f.generateUrl("/apps/news")),b.constant("FEED_TYPE",d),b.constant("MARK_READ_TIMEOUT",.5),b.constant("SCROLL_TIMEOUT",.1),b.factory("CSRFInterceptor",["$q","BASE_URL","$window",function(a,b,c){return{request:function(d){var e=c.location.href.split(c.location.pathname)[0];return(0===d.url.indexOf(b)||0===d.url.indexOf(e))&&(d.headers.requesttoken=g),d||a.when(d)}}}]);var e={0:t("news","Request failed, network connection unavailable!"),401:t("news","Request unauthorized. Are you logged in?"),403:t("news","Request forbidden. Are you an admin?"),412:t("news","Token expired or app not enabled! Reload the page!"),500:t("news","Internal server error! Please check your data/owncloud.log file for additional information!"),503:t("news","Request failed, ownCloud is in currently in maintenance mode!")};b.factory("ConnectionErrorInterceptor",["$q","$timeout",function(a,b){var c;return{responseError:function(d){return d.status in e&&(c&&b.cancel(c),f.Notification.hide(),f.Notification.showHtml(e[d.status]),c=b(function(){f.Notification.hide()},5e3)),a.reject(d)}}}]),c.interceptors.push("CSRFInterceptor"),c.interceptors.push("ConnectionErrorInterceptor");var h=function(a){return{data:["$http","$route","$q","$location","BASE_URL","ITEM_BATCH_SIZE","FEED_TYPE","SettingsResource","FeedResource",function(b,c,d,e,f,g,h,j,k){var l=j.get("showAll"),m=j.get("oldestFirst"),n=e.search().search||"",o=d.defer();if(null===l||null===m)o.resolve({});else{var p={type:a,limit:g,showAll:l,oldestFirst:m,search:n};if(c.current.params.id!==i&&(p.id=c.current.params.id),a===h.FEED){var q=k.getById(p.id);q===i||2===q.ordering?p.oldestFirst=!1:1===q.ordering&&(p.oldestFirst=!0)}b({url:f+"/items",method:"GET",params:p}).success(function(a){o.resolve(a)})}return o.promise}]}},j=function(){return{sites:["$http","$q","BASE_URL","Publisher","SettingsResource",function(a,b,c,d,e){var f=b.defer();return a.get(c+"/settings").then(function(b){d.publishAll(b);var c=e.get("exploreUrl"),f=e.get("language");return a({url:c,method:"GET",params:{lang:f}})}).then(function(a){f.resolve(a.data)})["catch"](function(){f.reject()}),f.promise}]}};a.when("/items",{controller:"ContentController as Content",templateUrl:"content.html",resolve:h(d.SUBSCRIPTIONS),type:d.SUBSCRIPTIONS}).when("/items/starred",{controller:"ContentController as Content",templateUrl:"content.html",resolve:h(d.STARRED),type:d.STARRED}).when("/items/feeds/:id",{controller:"ContentController as Content",templateUrl:"content.html",resolve:h(d.FEED),type:d.FEED}).when("/items/folders/:id",{controller:"ContentController as Content",templateUrl:"content.html",resolve:h(d.FOLDER),type:d.FOLDER}).when("/explore",{controller:"ExploreController as Explore",templateUrl:"explore.html",resolve:j(),type:d.EXPLORE}).when("/shortcuts",{templateUrl:"shortcuts.html",type:-1})}]),j.run(["$rootScope","$location","$http","$q","$interval","$route","Loading","ItemResource","FeedResource","FolderResource","SettingsResource","Publisher","BASE_URL","FEED_TYPE","REFRESH_RATE",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){g.setLoading("global",!0),l.subscribe(h).toChannels(["items","newestItemId","starred"]),l.subscribe(j).toChannels(["folders"]),l.subscribe(i).toChannels(["feeds"]),l.subscribe(k).toChannels(["settings"]);var p=d.defer();c.get(m+"/settings").success(function(a){l.publishAll(a),p.resolve()});var q=d.defer(),r=b.path();c.get(m+"/feeds/active").success(function(a){var c;switch(a.activeFeed.type){case n.FEED:c="/items/feeds/"+a.activeFeed.id;break;case n.FOLDER:c="/items/folders/"+a.activeFeed.id;break;case n.STARRED:c="/items/starred";break;case n.EXPLORE:c="/explore";break;default:c="/items"}/^\/items(\/(starred|explore|feeds\/\d+|folders\/\d+))?\/?$/.test(r)||b.path(c),q.resolve()});var s,t=d.defer();c.get(m+"/feeds").success(function(a){s=a,t.resolve()});var u,v=d.defer();c.get(m+"/folders").success(function(a){u=a,v.resolve()}),d.all([t.promise,v.promise]).then(function(){l.publishAll(s),l.publishAll(u),0===s.feeds.length&&0===u.folders.length&&b.path("/explore")}),d.all([p.promise,q.promise,t.promise,v.promise]).then(function(){f.reload(),g.setLoading("global",!1)}),e(function(){c.get(m+"/feeds").success(function(a){l.publishAll(a)}),c.get(m+"/folders").success(function(a){l.publishAll(a)})},1e3*o),a.$on("$routeChangeStart",function(){g.setLoading("content",!0)}),a.$on("$routeChangeSuccess",function(){g.setLoading("content",!1)}),a.$on("$routeChangeError",function(){b.path("/items")})}]),j.controller("AppController",["Loading","FeedResource","FolderResource",function(a,b,c){this.loading=a,this.isFirstRun=function(){return 0===b.size()&&0===c.size()}}]),j.controller("ContentController",["Publisher","FeedResource","ItemResource","SettingsResource","data","$route","$routeParams","FEED_TYPE","ITEM_AUTO_PAGE_SIZE","Loading",function(a,b,c,d,e,f,g,h,j,k){c.clear(),a.publishAll(e),this.isAutoPagingEnabled=!0,this.isNothingMoreToAutoPage=c.size()>=j?!1:!0,this.getItems=function(){return c.getAll()},this.toggleStar=function(a){c.toggleStar(a)},this.toggleItem=function(a){this.isCompactView()&&(a.show=!a.show)},this.isShowAll=function(){return d.get("showAll")},this.markRead=function(a){var d=c.get(a);d.keepUnread||d.unread!==!0||(c.markItemRead(a),b.markItemOfFeedRead(d.feedId))},this.getFeed=function(a){return b.getById(a)},this.toggleKeepUnread=function(a){var d=c.get(a);d.unread||(b.markItemOfFeedUnread(d.feedId),c.markItemRead(a,!1)),d.keepUnread=!d.keepUnread};var l=this,m=function(){var a=d.get("oldestFirst");if(l.isFeed()){var c=b.getById(g.id);c&&1===c.ordering?a=!0:c&&2===c.ordering&&(a=!1)}return a};this.orderBy=function(){return m()?"id":"-id"},this.isCompactView=function(){return d.get("compact")},this.isCompactExpand=function(){return d.get("compactExpand")},this.autoPagingEnabled=function(){return this.isAutoPagingEnabled},this.markReadEnabled=function(){return!d.get("preventReadOnScroll")},this.scrollRead=function(a){var d=[],e=[];a.forEach(function(a){var b=c.get(a);b.keepUnread||(d.push(a),e.push(b.feedId))}),d.length>0&&(b.markItemsOfFeedsRead(e),c.markItemsRead(d))},this.isFeed=function(){return f.current.$$route.type===h.FEED},this.autoPage=function(){if(!this.isNothingMoreToAutoPage){if(!this.isAutoPagingEnabled)return void(this.autoPageAgain=!0);this.isAutoPagingEnabled=!1,this.autoPageAgain=!1;var b=f.current.$$route.type,e=g.id,h=m(),i=d.get("showAll"),l=this;k.setLoading("autopaging",!0),c.autoPage(b,e,h,i).success(function(b){a.publishAll(b),b.items.length>=j?l.isAutoPagingEnabled=!0:l.isNothingMoreToAutoPage=!0,l.isAutoPagingEnabled&&l.autoPageAgain&&l.autoPage()}).error(function(){l.isAutoPagingEnabled=!0})["finally"](function(){k.setLoading("autopaging",!1)})}},this.getRelativeDate=function(a){if(a!==i&&""!==a){var b=d.get("language"),c=moment.unix(a).locale(b).fromNow()+"";return c}return""},this.refresh=function(){f.reload()}}]),j.controller("ExploreController",["sites","$rootScope","FeedResource",function(a,b,c){this.sites=a,this.feedExists=function(a){return c.getByLocation(a)!==i},this.subscribeTo=function(a){b.$broadcast("addFeed",a)},this.isCategoryShown=function(a){return a.filter(function(a){return c.getByLocation(a.feed)===i}).length>0}}]),j.controller("NavigationController",["$route","FEED_TYPE","FeedResource","FolderResource","ItemResource","SettingsResource","Publisher","$rootScope","$location","$q",function(a,b,c,d,e,f,g,h,j,k){this.feedError="",this.showNewFolder=!1,this.renamingFolder=!1,this.addingFeed=!1,this.addingFolder=!1,this.folderError="",this.renameError="",this.feed={};var l=function(){return parseInt(a.current.params.id,10)};this.getFeeds=function(){return c.getAll()},this.getFolders=function(){return d.getAll()},this.markFolderRead=function(a){c.markFolderRead(a),c.getByFolderId(a).forEach(function(a){e.markFeedRead(a.id)})},this.markFeedRead=function(a){e.markFeedRead(a),c.markFeedRead(a)},this.markRead=function(){e.markRead(),c.markRead()},this.isShowAll=function(){return f.get("showAll")},this.getFeedsOfFolder=function(a){return c.getByFolderId(a)},this.getUnreadCount=function(){return c.getUnreadCount()},this.getFeedUnreadCount=function(a){var b=c.getById(a);return b!==i?b.unreadCount:0},this.getFolderUnreadCount=function(a){return c.getFolderUnreadCount(a)},this.getStarredCount=function(){return e.getStarredCount()},this.toggleFolder=function(a){d.toggleOpen(a)},this.hasFeeds=function(a){return c.getFolderUnreadCount(a)!==i},this.subFeedActive=function(d){var e=a.current.$$route.type;if(e===b.FEED){var f=c.getById(l());if(f!==i&&f.folderId===d)return!0}return!1},this.isSubscriptionsActive=function(){return a.current&&a.current.$$route.type===b.SUBSCRIPTIONS},this.isStarredActive=function(){return a.current&&a.current.$$route.type===b.STARRED},this.isExploreActive=function(){return a.current&&a.current.$$route.type===b.EXPLORE},this.isFolderActive=function(c){return a.current&&a.current.$$route.type===b.FOLDER&&l()===c},this.isFeedActive=function(c){return a.current&&a.current.$$route.type===b.FEED&&l()===c},this.folderNameExists=function(a){return a=a||"",d.get(a.trim())!==i},this.feedUrlExists=function(a){return a=a||"",a=a.trim(),c.get(a)!==i||c.get("http://"+a)!==i},this.createFeed=function(a){var b=this;this.showNewFolder=!1,this.addingFeed=!0;var e=a.newFolder,f=a.existingFolder||{id:0};e===i||""===e?(f.getsFeed=!0,c.create(a.url,f.id,i).then(function(a){g.publishAll(a),j.path("/items/feeds/"+a.feeds[0].id+"/")})["finally"](function(){f.getsFeed=i,a.url="",b.addingFeed=!1})):d.create(e).then(function(c){g.publishAll(c),a.existingFolder=d.get(c.folders[0].name),a.newFolder=i,b.createFeed(a)})},this.createFolder=function(a){var b=this;this.addingFolder=!0,d.create(a.name).then(function(a){g.publishAll(a)})["finally"](function(){b.addingFolder=!1,a.name=""})},this.moveFeed=function(b,d){var e=!1,f=c.getById(b);f.folderId!==d&&((this.isFolderActive(f.folderId)||this.isFolderActive(d))&&(e=!0),c.move(b,d),e&&a.reload())},this.renameFeed=function(a){c.rename(a.id,a.title),a.editing=!1},this.renameFolder=function(a,b){a.renameError="",this.renamingFolder=!0;var c=this;a.name===b?(a.renameError="",a.editing=!1,this.renamingFolder=!1):d.rename(a.name,b).then(function(){a.renameError="",a.editing=!1},function(b){a.renameError=b})["finally"](function(){c.renamingFolder=!1})},this.reversiblyDeleteFeed=function(b){c.reversiblyDelete(b.id)["finally"](function(){a.reload()})},this.undoDeleteFeed=function(b){c.undoDelete(b.id)["finally"](function(){a.reload()})},this.deleteFeed=function(a){c["delete"](a.url)},this.reversiblyDeleteFolder=function(b){k.all(c.reversiblyDeleteFolder(b.id),d.reversiblyDelete(b.name))["finally"](function(){a.reload()})},this.undoDeleteFolder=function(b){k.all(c.undoDeleteFolder(b.id),d.undoDelete(b.name))["finally"](function(){a.reload()})},this.deleteFolder=function(a){c.deleteFolder(a.id),d["delete"](a.name)},this.setOrdering=function(b,d){c.setOrdering(b.id,d),a.reload()},this.search=function(a){""===a?j.search("search",null):j.search("search",a)};var m=this;h.$on("moveFeedToFolder",function(a,b){m.moveFeed(b.feedId,b.folderId)});var n=function(){var e;a.current&&(e=a.current.$$route.type);var f=0;if(e===b.FOLDER)f=l();else if(e===b.FEED){var g=c.getById(l());g&&(f=g.folderId)}var h;0!==f&&(h=d.getById(f)),m.feed.existingFolder=h};h.$on("$routeChangeSuccess",function(){n()})}]),j.controller("SettingsController",["$route","$q","SettingsResource","ItemResource","OPMLParser","OPMLImporter","Publisher",function(a,b,c,d,e,f,g){this.isOPMLImporting=!1,this.isArticlesImporting=!1,this.opmlImportError=!1,this.articleImportError=!1;var h=function(b,d){c.set(b,d),["showAll","oldestFirst","compact"].indexOf(b)>=0&&a.reload()};this.toggleSetting=function(a){h(a,!this.getSetting(a))},this.getSetting=function(a){return c.get(a)},this.importOPML=function(a){this.opmlImportError=!1,this.articleImportError=!1;try{this.isOPMLImporting=!1;var b=e.parse(a),c=this,d=5;f.importFolders(b).then(function(a){return f.importFeedQueue(a,d)})["finally"](function(){c.isOPMLImporting=!1})}catch(g){console.error(g),this.isOPMLImporting=!1,this.opmlImportError=!0}},this.importArticles=function(a){this.opmlImportError=!1,this.articleImportError=!1;try{this.isArticlesImporting=!0;var b=JSON.parse(a),c=this;d.importArticles(b).success(function(a){g.publishAll(a)})["finally"](function(){c.isArticlesImporting=!1})}catch(e){console.error(e),this.articleImportError=!0,this.isArticlesImporting=!1}}}]),j.filter("trustUrl",["$sce",function(a){return function(b){return a.trustAsResourceUrl(b)}}]),j.filter("unreadCountFormatter",function(){return function(a){return a>999?"999+":a}}),j.factory("FeedResource",["Resource","$http","BASE_URL","$q",function(a,b,c,d){var e=function(b,c,d){a.call(this,b,c,"url"),this.ids={},this.locations={},this.unreadCount=0,this.folderUnreadCount={},this.folderIds={},this.$q=d};return e.prototype=Object.create(a.prototype),e.prototype.receive=function(b){a.prototype.receive.call(this,b),this.updateUnreadCache(),this.updateFolderCache()},e.prototype.clear=function(){a.prototype.clear.call(this),this.unreadCount=0,this.folderUnreadCount={},this.folderIds={},this.ids={},this.locations={}},e.prototype.updateUnreadCache=function(){this.unreadCount=0,this.folderUnreadCount={};var a=this;this.values.forEach(function(b){b.unreadCount&&(a.unreadCount+=b.unreadCount),b.folderId!==i&&(a.folderUnreadCount[b.folderId]=a.folderUnreadCount[b.folderId]||0,a.folderUnreadCount[b.folderId]+=b.unreadCount)})},e.prototype.updateFolderCache=function(){this.folderIds={};var a=this;this.values.forEach(function(b){a.folderIds[b.folderId]=a.folderIds[b.folderId]||[],a.folderIds[b.folderId].push(b)})},e.prototype.add=function(b){a.prototype.add.call(this,b),b.id!==i&&(this.ids[b.id]=this.hashMap[b.url]),b.location!==i&&(this.locations[b.location]=this.hashMap[b.url])},e.prototype.markRead=function(){this.values.forEach(function(a){a.unreadCount=0}),this.updateUnreadCache()},e.prototype.markFeedRead=function(a){this.ids[a].unreadCount=0,this.updateUnreadCache()},e.prototype.markFolderRead=function(a){this.values.forEach(function(b){b.folderId===a&&(b.unreadCount=0)}),this.updateUnreadCache()},e.prototype.markItemOfFeedRead=function(a){this.ids[a].unreadCount-=1,this.updateUnreadCache()},e.prototype.markItemsOfFeedsRead=function(a){var b=this;a.forEach(function(a){b.ids[a].unreadCount-=1}),this.updateUnreadCache()},e.prototype.markItemOfFeedUnread=function(a){this.ids[a].unreadCount+=1,this.updateUnreadCache()},e.prototype.getUnreadCount=function(){return this.unreadCount},e.prototype.getFolderUnreadCount=function(a){return this.folderUnreadCount[a]},e.prototype.getByFolderId=function(a){return this.folderIds[a]||[]},e.prototype.getById=function(a){return this.ids[a]},e.prototype.getByLocation=function(a){return this.locations[a]},e.prototype.rename=function(a,b){return this.http({method:"POST",url:this.BASE_URL+"/feeds/"+a+"/rename",data:{feedTitle:b}})},e.prototype.move=function(a,b){var c=this.getById(a);return c.folderId=b,this.updateFolderCache(),this.updateUnreadCache(),this.http({method:"POST",url:this.BASE_URL+"/feeds/"+c.id+"/move",data:{parentFolderId:b}})},e.prototype.create=function(a,b,c){a=a.trim(),a.startsWith("http")||(a="https://"+a),c!==i&&(c=c.trim());var d={url:a,folderId:b||0,title:c||a,unreadCount:0};this.add(d),this.updateFolderCache();var e=this.$q.defer();return this.http({method:"POST",url:this.BASE_URL+"/feeds",data:{url:a,parentFolderId:b||0,title:c}}).success(function(a){e.resolve(a)}).error(function(a){d.faviconLink="",d.error=a.message,e.reject()}),e.promise},e.prototype.reversiblyDelete=function(a,b,c){var d=this.getById(a);return d&&c!==!0&&(d.deleted=!0),b!==!1&&this.updateUnreadCache(),this.http["delete"](this.BASE_URL+"/feeds/"+a)},e.prototype.reversiblyDeleteFolder=function(a){var b=this,c=[];this.getByFolderId(a).forEach(function(a){c.push(b.reversiblyDelete(a.id,!1,!0))}),this.updateUnreadCache();var d=this.$q.all(c);return d.promise},e.prototype["delete"]=function(b,c){var d=this.get(b);return d!==i&&d.id&&delete this.ids[d.id],d!==i&&d.location&&delete this.locations[d.location],a.prototype["delete"].call(this,b),c!==!1&&(this.updateUnreadCache(),this.updateFolderCache()),d},e.prototype.deleteFolder=function(a){var b=this;this.getByFolderId(a).forEach(function(a){b["delete"](a.url,!1)}),this.updateUnreadCache(),this.updateFolderCache()},e.prototype.undoDelete=function(a,b){var c=this.getById(a);return c&&(c.deleted=!1),b!==!1&&this.updateUnreadCache(),this.http.post(this.BASE_URL+"/feeds/"+a+"/restore")},e.prototype.undoDeleteFolder=function(a){var b=this,c=[];this.getByFolderId(a).forEach(function(a){c.push(b.undoDelete(a.id,!1))}),this.updateUnreadCache();var d=this.$q.all(c);return d.promise},e.prototype.setOrdering=function(a,b){var c=this.getById(a);if(c){c.ordering=b;var d=this.BASE_URL+"/feeds/"+a+"/ordering";return this.http.post(d,{ordering:b})}},new e(b,c,d)}]),j.factory("FolderResource",["Resource","$http","BASE_URL","$q",function(a,b,c,d){var e=function(b,c,d){a.call(this,b,c,"name"),this.deleted=null,this.$q=d,this.ids={}};return e.prototype=Object.create(a.prototype),e.prototype.add=function(b){a.prototype.add.call(this,b),b.id!==i&&(this.ids[b.id]=this.hashMap[b.name])},e.prototype.clear=function(){a.prototype.clear.call(this),this.ids={}},e.prototype["delete"]=function(b){var c=this.get(b);return c!==i&&c.id&&delete this.ids[c.id],a.prototype["delete"].call(this,b),c},e.prototype.toggleOpen=function(a){var b=this.get(a);return b.opened=!b.opened,this.http({url:this.BASE_URL+"/folders/"+b.id+"/open",method:"POST",data:{folderId:b.id,open:b.opened}})},e.prototype.rename=function(a,b){var c=this.get(a),d=this.$q.defer(),e=this;return this.http({url:this.BASE_URL+"/folders/"+c.id+"/rename",method:"POST",data:{folderName:b}}).success(function(){c.name=b,delete e.hashMap[a],e.hashMap[b]=c,d.resolve()}).error(function(a){d.reject(a.message)}),d.promise},e.prototype.getById=function(a){return this.ids[a]},e.prototype.create=function(a){a=a.trim();var b={name:a};this.add(b);var c=this.$q.defer();return this.http({url:this.BASE_URL+"/folders",method:"POST",data:{folderName:a}}).success(function(a){c.resolve(a)}).error(function(a){b.error=a.message}),c.promise},e.prototype.reversiblyDelete=function(a){var b=this.get(a),c=b.id;return b.deleted=!0,this.http["delete"](this.BASE_URL+"/folders/"+c)},e.prototype.undoDelete=function(a){var b=this.get(a),c=b.id;return b.deleted=!1,this.http.post(this.BASE_URL+"/folders/"+c+"/restore")},new e(b,c,d)}]),j.factory("ItemResource",["Resource","$http","BASE_URL","ITEM_BATCH_SIZE",function(a,b,c,d){var e=function(b,c,d){a.call(this,b,c),this.batchSize=d,this.clear()};return e.prototype=Object.create(a.prototype),e.prototype.clear=function(){this.starredCount=0,this.lowestId=0,this.highestId=0,a.prototype.clear.call(this)},e.prototype.receive=function(b,c){switch(c){case"newestItemId":this.newestItemId=b;break;case"starred":this.starredCount=b;break;default:var d=this;b.forEach(function(a){0===d.lowestId&&(d.lowestId=a.id),0===d.highestId&&(d.highestId=a.id),a.id>d.highestId&&(d.highestId=a.id),a.id<d.lowestId&&(d.lowestId=a.id)}),a.prototype.receive.call(this,b,c)}},e.prototype.getNewestItemId=function(){return this.newestItemId},e.prototype.getStarredCount=function(){return this.starredCount},e.prototype.star=function(a,b){b===i&&(b=!0);var c=this.get(a),d=this.BASE_URL+"/items/"+c.feedId+"/"+c.guidHash+"/star";return c.starred=b,b?this.starredCount+=1:this.starredCount-=1,this.http({url:d,method:"POST",data:{isStarred:b}})},e.prototype.toggleStar=function(a){this.get(a).starred?this.star(a,!1):this.star(a,!0)},e.prototype.markItemRead=function(a,b){return b===i&&(b=!0),this.get(a).unread=!b,this.http({url:this.BASE_URL+"/items/"+a+"/read",method:"POST",data:{isRead:b}})},e.prototype.markItemsRead=function(a){var b=this;return a.forEach(function(a){b.get(a).unread=!1}),this.http({url:this.BASE_URL+"/items/read/multiple",method:"POST",data:{itemIds:a}})},e.prototype.markFeedRead=function(a,b){b===i&&(b=!0);var c=this.values.filter(function(b){return b.feedId===a});return c.forEach(function(a){a.unread=!b}),this.http.post(this.BASE_URL+"/feeds/"+a+"/read",{highestItemId:this.getNewestItemId()})},e.prototype.markRead=function(){return this.values.forEach(function(a){a.unread=!1}),this.http({url:this.BASE_URL+"/items/read",method:"POST",data:{highestItemId:this.getNewestItemId()}})},e.prototype.autoPage=function(a,b,c,d){var e;return e=c?this.highestId:this.lowestId,this.http({url:this.BASE_URL+"/items",method:"GET",params:{type:a,id:b,offset:e,limit:this.batchSize,oldestFirst:c,showAll:d}})},e.prototype.importArticles=function(a){return this.http({url:this.BASE_URL+"/feeds/import/articles",method:"POST",data:{json:a}})},new e(b,c,d)}]),j.service("Loading",function(){this.loading={global:!1,content:!1,autopaging:!1},this.setLoading=function(a,b){this.loading[a]=b},this.isLoading=function(a){return this.loading[a]}}),j.service("OPMLImporter",["FeedResource","FolderResource","Publisher","$q",function(a,b,c,d){var e=function(f){var g=d.defer();if(f.length>0){var h=f.pop(),j=h.url,k=h.title,l=0,m=h.folderName;if(m!==i&&b.get(m)!==i){var n=b.get(m);n.opened=!0,l=n.id,n.getsFeed=!0,n.getsFeedCounter=n.getsFeedCounter||0,n.getsFeedCounter+=1}j!==i&&a.get(j)===i&&a.create(j,l,k).then(function(a){c.publishAll(a)})["finally"](function(){0!==l&&(n.getsFeedCounter-=1,0===n.getsFeedCounter&&(n.getsFeed=!1)),e(f)})}else g.resolve();return g.promise};this.importFolders=function(a){var e=[],f=[];a.folders.forEach(function(a){if(a.name!==i){if(b.get(a.name)===i){var d=b.create(a.name).then(function(a){c.publishAll(a)});f.push(d)}a.feeds.forEach(function(b){b.folderName=a.name,e.push(b)})}}),e=e.concat(a.feeds);var g=d.defer();return d.all(f)["finally"](function(){g.resolve(e)}),g.promise},this.importFeedQueue=function(a,b){for(var c=d.defer(),f=[],g=0;b>g;g+=1)f.push(e(a));return d.all(f).then(function(){c.resolve()}),c.promise}}]),j.service("OPMLParser",function(){var a=function(a){var b=a.attr("xmlUrl")||a.attr("htmlUrl"),c=a.attr("title")||a.attr("text")||b;return b===i?{type:"folder",name:c,feeds:[]}:{type:"feed",name:c,url:b}},b=function(c,d,f){for(var g=0;g<c.length;g+=1){var h=e(c[g]),i=a(h);"feed"===i.type?d.feeds.push(i):f?(b(h.children("outline"),i,!1),d.folders.push(i)):b(h.children("outline"),d,!1)}return d};this.parse=function(a){a=e.parseXML(a);var c=e(a).find("body > outline"),d={feeds:[],folders:[]};return b(c,d,!0)}}),j.service("Publisher",function(){this.channels={},this.subscribe=function(a){var b=this;return{toChannels:function(c){c.forEach(function(c){b.channels[c]=b.channels[c]||[],b.channels[c].push(a)})}}},this.publishAll=function(a){var b=this;Object.keys(a).forEach(function(c){var d=b.channels[c];d!==i&&d.forEach(function(b){b.receive(a[c],c)})})}}),j.factory("Resource",function(){var a=function(a,b,c){this.id=c||"id",this.values=[],this.hashMap={},this.http=a,this.BASE_URL=b};return a.prototype.receive=function(a){var b=this;a.forEach(function(a){b.add(a)})},a.prototype.add=function(a){var b=this.hashMap[a[this.id]];b===i?(this.values.push(a),this.hashMap[a[this.id]]=a):Object.keys(a).forEach(function(c){b[c]=a[c]})},a.prototype.size=function(){return this.values.length},a.prototype.get=function(a){return this.hashMap[a]},a.prototype["delete"]=function(a){var b=this,c=this.values.findIndex(function(c){return c[b.id]===a});c!==i&&this.values.splice(c,1),this.hashMap[a]!==i&&delete this.hashMap[a]},a.prototype.clear=function(){for(this.hashMap={};this.values.length>0;)this.values.pop()},a.prototype.getAll=function(){return this.values},a}),j.service("SettingsResource",["$http","BASE_URL",function(a,b){this.settings={language:"en",showAll:null,compact:!1,oldestFirst:null,preventReadOnScroll:!1,compactExpand:!1,exploreUrl:""},this.defaultLanguageCode="en",this.supportedLanguageCodes=["ar-ma","ar","bg","ca","cs","cv","da","de","el","en-ca","en-gb","eo","es","et","eu","fi","fr-ca","fr","gl","he","hi","hu","id","is","it","ja","ka","ko","lv","ms-my","nb","ne","nl","pl","pt-br","pt","ro","ru","sk","sl","sv","th","tr","tzm-la","tzm","uk","zh-cn","zh-tw"],this.receive=function(a){var b=this;Object.keys(a).forEach(function(c){var d=a[c];"language"===c&&(d=b.processLanguageCode(d)),b.settings[c]=d})},this.get=function(a){return this.settings[a]},this.set=function(c,d){return this.settings[c]=d,a({url:b+"/settings",method:"PUT",data:{language:this.settings.language,showAll:this.settings.showAll,compact:this.settings.compact,oldestFirst:this.settings.oldestFirst,compactExpand:this.settings.compactExpand,preventReadOnScroll:this.settings.preventReadOnScroll}})},this.processLanguageCode=function(a){return a=a.replace("_","-").toLowerCase(),this.supportedLanguageCodes.indexOf(a)<0&&(a=a.split("-")[0]),this.supportedLanguageCodes.indexOf(a)<0&&(a=this.defaultLanguageCode),a}}]),function(a,b,c,d,e){var f=a.location,g=a.localStorage,h=function(a,b,d){var e=c.isContentHandlerRegistered,f=function(a,b){return e?"new"!==e(a,b):g.getItem("registeredHandler")===b};c.registerContentHandler&&!f(a,b)&&(c.registerContentHandler(a,j,d),e||g.setItem("registeredHandler",b))},i=f.protocol+"//"+f.host+f.pathname,j=i+"?subscribe_to=%s",k="application/vnd.mozilla.maybe.feed",l="ownCloud News @ "+i;h(k,j,l),e(b).ready(function(){var b=a.decodeURIComponent(d("?subscribe_to"));if(b&&"null"!==b){e("#new-feed").show();var c=e('input[ng-model="Navigation.feed.url"]');c.val(b),c.trigger("input"),setTimeout(function(){c.focus()},1e3)}})}(b,c,a,h,e),function(a,b,c){var d=function(a){return!(a.is("input")||a.is("select")||a.is("textarea")||a.is("checkbox"))},e=function(a){return!(a.shiftKey||a.altKey||a.ctrlKey||a.metaKey)},f=function(a,b){var c=a.offset().top-b.offset().top,d=c+a.height(),e=b.height();return c>=0&&e>d},g=function(a,b,c){0===a.length||!c&&f(a,b)||b.scrollTop(a.offset().top-b.offset().top+b.scrollTop())},h=function(a){var b=a.find(".active");g(b,a.children("ul"),!0)},i=function(a){a.find(".active > a:visible").trigger("click")},j=function(a,b){if(0===b.scrollTop()){var c=b.find(".pull-to-refresh");c.hasClass("show-pull-to-refresh")?c.hasClass("done")&&i(a):c.addClass("show-pull-to-refresh")}},k=function(a,b){a.children("a:visible").trigger("click"),g(a,b.children("ul"))},l=function(a){var b=a.find(".active"),d=a.find(".explore-feed,.subscriptions-feed:visible,.starred-feed:visible,.feed:visible");if(b.hasClass("folder"))for(;b.length>0;){var e=b.find(".feed:visible");if(e.length>0)return void k(c(e[0]),a);b=b.next(".folder")}else for(var f=0;f<d.length-1;f+=1){var g=d[f];if(g===b[0]){var h=d[f+1];k(c(h),a);break}}},m=function(a){return a.parent().parent(".folder")},n=function(a,b){var d,e=a.find(".folder:visible");d=b?e.length-1:0,e.length>0&&k(c(e[d]),a)},o=function(a){var b=a.find(".active");if(b.hasClass("folder"))k(b.prevAll(".folder:visible").first(),a);else if(b.hasClass("feed")){var c=m(b);c.length>0?k(c,a):n(a,!0)}else n(a,!0)},p=function(a){var b=a.find(".active");if(b.hasClass("folder"))k(b.nextAll(".folder:visible").first(),a);else if(b.hasClass("feed")){var c=m(b);c.length>0?k(c.nextAll(".folder:visible").first(),a):n(a)}else n(a)},q=function(a){var b=a.find(".active"),d=a.find(".explore-feed,.subscriptions-feed:visible,.starred-feed:visible,.feed:visible");if(b.hasClass("folder")){for(var e=b.prev(".folder");e.length>0;){var f=e.find(".feed:visible");if(f.length>0)return void k(c(f[f.length-1]),a);e=e.prev(".folder")}var g=b.siblings(".feed");if(g.length>0)return void k(c(g[g.length-1]),a);var h=c(".starred-feed:visible");return void(h.length>0&&k(h,a))}for(var i=d.length-1;i>0;i-=1){var j=d[i];if(j===b[0]){var l=d[i-1];k(c(l),a);break}}},r=function(a,b){var d=a.find(".item");d.each(function(a,d){return d=c(d),d.height()+d.position().top>30?(b(d),!1):void 0})},s=function(a){r(a,function(a){a.find(".toggle-keep-unread").trigger("click")})},t=function(a){r(a,function(a){a.find(".star").trigger("click")})},u=function(a){r(a,function(a){a.find(".utils").trigger("click")})},v=function(b){r(b,function(b){b.trigger("click"),a.open(b.find(".external:visible").attr("href"),"_blank")})},w=function(a,b,c){a.scrollTop(b.offset().top-a.offset().top+a.scrollTop()),c&&r(a,function(a){a.hasClass("open")||a.find(".utils").trigger("click")})},x=function(a,b){var d=a.find(".item"),e=!1;d.each(function(d,f){return f=c(f),f.position().top>1?(w(a,f,b),e=!0,!1):void 0}),e||a.scrollTop(a.prop("scrollHeight"))},y=function(a,b,d){var e=b.find(".item"),f=!1;e.each(function(e,g){if(g=c(g),g.position().top>=0){var h=g.prev();return h.length>0?w(b,h,d):j(a,b),f=!0,!1}}),!f&&e.length>0&&w(b,e.last())};c(b).keyup(function(a){if(d(c(":focus"))&&e(a)){var b=a.keyCode,f=c("#app-content"),g=c("#app-navigation"),k=c("#articles.compact").length>0,m="true"===c("#articles").attr("news-compact-expand"),n=k&&m;[74,78,39].indexOf(b)>=0?(a.preventDefault(),x(f,n)):[75,80,37].indexOf(b)>=0?(a.preventDefault(),y(g,f,n)):[85].indexOf(b)>=0?(a.preventDefault(),s(f)):[69].indexOf(b)>=0?(a.preventDefault(),u(f)):[73,83,76].indexOf(b)>=0?(a.preventDefault(),t(f)):[72].indexOf(b)>=0?(a.preventDefault(),t(f),x(f)):[79].indexOf(b)>=0?(a.preventDefault(),v(f)):[82].indexOf(b)>=0?(a.preventDefault(),i(g)):[70].indexOf(b)>=0?(a.preventDefault(),l(g)):[68].indexOf(b)>=0?(a.preventDefault(),q(g)):[67].indexOf(b)>=0?(a.preventDefault(),o(g)):[65].indexOf(b)>=0?(a.preventDefault(),h(g)):[86].indexOf(b)>=0?(a.preventDefault(),p(g)):[33].indexOf(b)>=0&&j(g,f)}})}(b,c,e),b.News=b.News||{},function(a,b,c,d){var e=[];d.addArticleAction=function(a){e.push(a)},d.getArticleActionPlugins=function(){return e}}(b,c,jQuery,b.News),j.run(["$document","$rootScope",function(a,b){a.click(function(a){b.$broadcast("documentClicked",a)})}]),j.directive("appNavigationEntryUtils",function(){return{restrict:"C",link:function(a,b){var c=b.siblings(".app-navigation-entry-menu"),d=e(b).find(".app-navigation-entry-utils-menu-button button");d.click(function(){c.toggleClass("open")}),a.$on("documentClicked",function(a,b){b.target!==d[0]&&c.removeClass("open")})}}}),j.directive("newsAddFeed",["$rootScope","$timeout",function(a,b){return{restrict:"A",link:function(c,d){a.$on("addFeed",function(a,e){b(function(){d.is(":animated")?(d.stop(!0,!0),d.show()):d.is(":visible")||d.slideDown(),d.find('[ng-model="Navigation.feed.url"]').focus()}),c.Navigation.feed.url=e})}}}]),j.directive("newsArticleActions",function(){return{restrict:"E",scope:{article:"="},link:function(a,b){for(var c=News.getArticleActionPlugins(),d=0;d<c.length;d+=1)c[d](b,a.article)}}}),j.directive("newsAutoFocus",["$timeout",function(a){return function(b,c,d){var f=c;d.newsAutoFocus&&(f=e(d.newsAutoFocus)),a(function(){f.focus()},0)}}]),j.directive("newsBindHtmlUnsafe",function(){return function(a,b,c){a.$watch(c.newsBindHtmlUnsafe,function(){b.html(a.$eval(c.newsBindHtmlUnsafe))})}}),j.directive("newsDraggable",function(){return function(a,b,c){var e=a.$eval(c.newsDraggable);d.isDefined(e)?b.draggable(e):b.draggable(),c.$observe("newsDraggableDisable",function(a){b.draggable("true"===a?"disable":"enable")})}}),j.directive("newsDroppable",["$rootScope",function(a){return function(b,c,d){var f={accept:".feed",hoverClass:"drag-and-drop",greedy:!0,drop:function(f,g){e(".drag-and-drop").removeClass("drag-and-drop");var h={folderId:parseInt(c.data("id"),10),feedId:parseInt(e(g.draggable).data("id"),10)};a.$broadcast("moveFeedToFolder",h),b.$apply(d.droppable)}};c.droppable(f)}}]),j.directive("newsEnclosure",function(){return{restrict:"E",scope:{link:"@",type:"@"},transclude:!0,template:'<div><video controls preload="none" ng-show="mediaType==\'video\' && !cantPlay()"><source ng-src="{{ link|trustUrl }}" type="{{ type }}"></video><audio controls preload="none" ng-show="mediaType==\'audio\' && !cantPlay()"><source ng-src="{{ link|trustUrl }}" type="{{ type }}"></audio><div ng-transclude ng-show="cantPlay()"></div></div>',link:function(a,b){a.mediaType=0===a.type.indexOf("audio")?"audio":"video"; +!function(a,b,c,d,e,f,g,h,i){"use strict";var j=d.module("News",["ngRoute","ngSanitize","ngAnimate"]);j.config(["$routeProvider","$provide","$httpProvider",function(a,b,c){var d={FEED:0,FOLDER:1,STARRED:2,SUBSCRIPTIONS:3,SHARED:4,EXPLORE:5};b.constant("REFRESH_RATE",60),b.constant("ITEM_BATCH_SIZE",40),b.constant("ITEM_AUTO_PAGE_SIZE",20),b.constant("BASE_URL",f.generateUrl("/apps/news")),b.constant("FEED_TYPE",d),b.constant("MARK_READ_TIMEOUT",.5),b.constant("SCROLL_TIMEOUT",.1),b.factory("CSRFInterceptor",["$q","BASE_URL","$window",function(a,b,c){return{request:function(d){var e=c.location.href.split(c.location.pathname)[0];return(0===d.url.indexOf(b)||0===d.url.indexOf(e))&&(d.headers.requesttoken=g),d||a.when(d)}}}]);var e={0:t("news","Request failed, network connection unavailable!"),401:t("news","Request unauthorized. Are you logged in?"),403:t("news","Request forbidden. Are you an admin?"),412:t("news","Token expired or app not enabled! Reload the page!"),500:t("news","Internal server error! Please check your data/owncloud.log file for additional information!"),503:t("news","Request failed, ownCloud is in currently in maintenance mode!")};b.factory("ConnectionErrorInterceptor",["$q","$timeout",function(a,b){var c;return{responseError:function(d){return d.status in e&&(c&&b.cancel(c),f.Notification.hide(),f.Notification.showHtml(e[d.status]),c=b(function(){f.Notification.hide()},5e3)),a.reject(d)}}}]),c.interceptors.push("CSRFInterceptor"),c.interceptors.push("ConnectionErrorInterceptor");var h=function(a){return{data:["$http","$route","$q","$location","BASE_URL","ITEM_BATCH_SIZE","FEED_TYPE","SettingsResource","FeedResource",function(b,c,d,e,f,g,h,j,k){var l=j.get("showAll"),m=j.get("oldestFirst"),n=e.search().search||"",o=d.defer();if(null===l||null===m)o.resolve({});else{var p={type:a,limit:g,showAll:l,oldestFirst:m,search:n};if(c.current.params.id!==i&&(p.id=c.current.params.id),a===h.FEED){var q=k.getById(p.id);q===i||2===q.ordering?p.oldestFirst=!1:1===q.ordering&&(p.oldestFirst=!0)}b({url:f+"/items",method:"GET",params:p}).success(function(a){o.resolve(a)})}return o.promise}]}},j=function(){return{sites:["$http","$q","BASE_URL","Publisher","SettingsResource",function(a,b,c,d,e){var f=b.defer();return a.get(c+"/settings").then(function(b){d.publishAll(b);var c=e.get("exploreUrl"),f=e.get("language");return a({url:c,method:"GET",params:{lang:f}})}).then(function(a){f.resolve(a.data)})["catch"](function(){f.reject()}),f.promise}]}};a.when("/items",{controller:"ContentController as Content",templateUrl:"content.html",resolve:h(d.SUBSCRIPTIONS),type:d.SUBSCRIPTIONS}).when("/items/starred",{controller:"ContentController as Content",templateUrl:"content.html",resolve:h(d.STARRED),type:d.STARRED}).when("/items/feeds/:id",{controller:"ContentController as Content",templateUrl:"content.html",resolve:h(d.FEED),type:d.FEED}).when("/items/folders/:id",{controller:"ContentController as Content",templateUrl:"content.html",resolve:h(d.FOLDER),type:d.FOLDER}).when("/explore",{controller:"ExploreController as Explore",templateUrl:"explore.html",resolve:j(),type:d.EXPLORE}).when("/shortcuts",{templateUrl:"shortcuts.html",type:-1})}]),j.run(["$rootScope","$location","$http","$q","$interval","$route","Loading","ItemResource","FeedResource","FolderResource","SettingsResource","Publisher","BASE_URL","FEED_TYPE","REFRESH_RATE",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){g.setLoading("global",!0),l.subscribe(h).toChannels(["items","newestItemId","starred"]),l.subscribe(j).toChannels(["folders"]),l.subscribe(i).toChannels(["feeds"]),l.subscribe(k).toChannels(["settings"]);var p=d.defer();c.get(m+"/settings").success(function(a){l.publishAll(a),p.resolve()});var q=d.defer(),r=b.path();c.get(m+"/feeds/active").success(function(a){var c;switch(a.activeFeed.type){case n.FEED:c="/items/feeds/"+a.activeFeed.id;break;case n.FOLDER:c="/items/folders/"+a.activeFeed.id;break;case n.STARRED:c="/items/starred";break;case n.EXPLORE:c="/explore";break;default:c="/items"}/^\/items(\/(starred|explore|feeds\/\d+|folders\/\d+))?\/?$/.test(r)||b.path(c),q.resolve()});var s,t=d.defer();c.get(m+"/feeds").success(function(a){s=a,t.resolve()});var u,v=d.defer();c.get(m+"/folders").success(function(a){u=a,v.resolve()}),d.all([t.promise,v.promise]).then(function(){l.publishAll(s),l.publishAll(u),0===s.feeds.length&&0===u.folders.length&&b.path("/explore")}),d.all([p.promise,q.promise,t.promise,v.promise]).then(function(){f.reload(),g.setLoading("global",!1)}),e(function(){c.get(m+"/feeds").success(function(a){l.publishAll(a)}),c.get(m+"/folders").success(function(a){l.publishAll(a)})},1e3*o),a.$on("$routeChangeStart",function(){g.setLoading("content",!0)}),a.$on("$routeChangeSuccess",function(){g.setLoading("content",!1)}),a.$on("$routeChangeError",function(){b.path("/items")})}]),j.controller("AppController",["Loading","FeedResource","FolderResource",function(a,b,c){this.loading=a,this.isFirstRun=function(){return 0===b.size()&&0===c.size()}}]),j.controller("ContentController",["Publisher","FeedResource","ItemResource","SettingsResource","data","$route","$routeParams","$location","FEED_TYPE","ITEM_AUTO_PAGE_SIZE","Loading",function(a,b,c,d,e,f,g,h,j,k,l){c.clear(),a.publishAll(e),this.isAutoPagingEnabled=!0,this.isNothingMoreToAutoPage=c.size()>=k?!1:!0,this.getItems=function(){return c.getAll()},this.toggleStar=function(a){c.toggleStar(a)},this.toggleItem=function(a){this.isCompactView()&&(a.show=!a.show)},this.isShowAll=function(){return d.get("showAll")},this.markRead=function(a){var d=c.get(a);d.keepUnread||d.unread!==!0||(c.markItemRead(a),b.markItemOfFeedRead(d.feedId))},this.getFeed=function(a){return b.getById(a)},this.toggleKeepUnread=function(a){var d=c.get(a);d.unread||(b.markItemOfFeedUnread(d.feedId),c.markItemRead(a,!1)),d.keepUnread=!d.keepUnread};var m=this,n=function(){var a=d.get("oldestFirst");if(m.isFeed()){var c=b.getById(g.id);c&&1===c.ordering?a=!0:c&&2===c.ordering&&(a=!1)}return a};this.orderBy=function(){return n()?"id":"-id"},this.isCompactView=function(){return d.get("compact")},this.isCompactExpand=function(){return d.get("compactExpand")},this.autoPagingEnabled=function(){return this.isAutoPagingEnabled},this.markReadEnabled=function(){return!d.get("preventReadOnScroll")},this.scrollRead=function(a){var d=[],e=[];a.forEach(function(a){var b=c.get(a);b.keepUnread||(d.push(a),e.push(b.feedId))}),d.length>0&&(b.markItemsOfFeedsRead(e),c.markItemsRead(d))},this.isFeed=function(){return f.current.$$route.type===j.FEED},this.autoPage=function(){if(!this.isNothingMoreToAutoPage){if(!this.isAutoPagingEnabled)return void(this.autoPageAgain=!0);this.isAutoPagingEnabled=!1,this.autoPageAgain=!1;var b=f.current.$$route.type,e=g.id,i=n(),j=d.get("showAll"),m=this,o=h.search().search;l.setLoading("autopaging",!0),c.autoPage(b,e,i,j,o).success(function(b){a.publishAll(b),b.items.length>=k?m.isAutoPagingEnabled=!0:m.isNothingMoreToAutoPage=!0,m.isAutoPagingEnabled&&m.autoPageAgain&&m.autoPage()}).error(function(){m.isAutoPagingEnabled=!0})["finally"](function(){l.setLoading("autopaging",!1)})}},this.getRelativeDate=function(a){if(a!==i&&""!==a){var b=d.get("language"),c=moment.unix(a).locale(b).fromNow()+"";return c}return""},this.refresh=function(){f.reload()}}]),j.controller("ExploreController",["sites","$rootScope","FeedResource",function(a,b,c){this.sites=a,this.feedExists=function(a){return c.getByLocation(a)!==i},this.subscribeTo=function(a){b.$broadcast("addFeed",a)},this.isCategoryShown=function(a){return a.filter(function(a){return c.getByLocation(a.feed)===i}).length>0}}]),j.controller("NavigationController",["$route","FEED_TYPE","FeedResource","FolderResource","ItemResource","SettingsResource","Publisher","$rootScope","$location","$q",function(a,b,c,d,e,f,g,h,j,k){this.feedError="",this.showNewFolder=!1,this.renamingFolder=!1,this.addingFeed=!1,this.addingFolder=!1,this.folderError="",this.renameError="",this.feed={};var l=function(){return parseInt(a.current.params.id,10)};this.getFeeds=function(){return c.getAll()},this.getFolders=function(){return d.getAll()},this.markFolderRead=function(a){c.markFolderRead(a),c.getByFolderId(a).forEach(function(a){e.markFeedRead(a.id)})},this.markFeedRead=function(a){e.markFeedRead(a),c.markFeedRead(a)},this.markRead=function(){e.markRead(),c.markRead()},this.isShowAll=function(){return f.get("showAll")},this.getFeedsOfFolder=function(a){return c.getByFolderId(a)},this.getUnreadCount=function(){return c.getUnreadCount()},this.getFeedUnreadCount=function(a){var b=c.getById(a);return b!==i?b.unreadCount:0},this.getFolderUnreadCount=function(a){return c.getFolderUnreadCount(a)},this.getStarredCount=function(){return e.getStarredCount()},this.toggleFolder=function(a){d.toggleOpen(a)},this.hasFeeds=function(a){return c.getFolderUnreadCount(a)!==i},this.subFeedActive=function(d){var e=a.current.$$route.type;if(e===b.FEED){var f=c.getById(l());if(f!==i&&f.folderId===d)return!0}return!1},this.isSubscriptionsActive=function(){return a.current&&a.current.$$route.type===b.SUBSCRIPTIONS},this.isStarredActive=function(){return a.current&&a.current.$$route.type===b.STARRED},this.isExploreActive=function(){return a.current&&a.current.$$route.type===b.EXPLORE},this.isFolderActive=function(c){return a.current&&a.current.$$route.type===b.FOLDER&&l()===c},this.isFeedActive=function(c){return a.current&&a.current.$$route.type===b.FEED&&l()===c},this.folderNameExists=function(a){return a=a||"",d.get(a.trim())!==i},this.feedUrlExists=function(a){return a=a||"",a=a.trim(),c.get(a)!==i||c.get("http://"+a)!==i},this.createFeed=function(a){var b=this;this.showNewFolder=!1,this.addingFeed=!0;var e=a.newFolder,f=a.existingFolder||{id:0};e===i||""===e?(f.getsFeed=!0,c.create(a.url,f.id,i).then(function(a){g.publishAll(a),j.path("/items/feeds/"+a.feeds[0].id+"/")})["finally"](function(){f.getsFeed=i,a.url="",b.addingFeed=!1})):d.create(e).then(function(c){g.publishAll(c),a.existingFolder=d.get(c.folders[0].name),a.newFolder=i,b.createFeed(a)})},this.createFolder=function(a){var b=this;this.addingFolder=!0,d.create(a.name).then(function(a){g.publishAll(a)})["finally"](function(){b.addingFolder=!1,a.name=""})},this.moveFeed=function(b,d){var e=!1,f=c.getById(b);f.folderId!==d&&((this.isFolderActive(f.folderId)||this.isFolderActive(d))&&(e=!0),c.move(b,d),e&&a.reload())},this.renameFeed=function(a){c.rename(a.id,a.title),a.editing=!1},this.renameFolder=function(a,b){a.renameError="",this.renamingFolder=!0;var c=this;a.name===b?(a.renameError="",a.editing=!1,this.renamingFolder=!1):d.rename(a.name,b).then(function(){a.renameError="",a.editing=!1},function(b){a.renameError=b})["finally"](function(){c.renamingFolder=!1})},this.reversiblyDeleteFeed=function(b){c.reversiblyDelete(b.id)["finally"](function(){a.reload()})},this.undoDeleteFeed=function(b){c.undoDelete(b.id)["finally"](function(){a.reload()})},this.deleteFeed=function(a){c["delete"](a.url)},this.reversiblyDeleteFolder=function(b){k.all(c.reversiblyDeleteFolder(b.id),d.reversiblyDelete(b.name))["finally"](function(){a.reload()})},this.undoDeleteFolder=function(b){k.all(c.undoDeleteFolder(b.id),d.undoDelete(b.name))["finally"](function(){a.reload()})},this.deleteFolder=function(a){c.deleteFolder(a.id),d["delete"](a.name)},this.setOrdering=function(b,d){c.setOrdering(b.id,d),a.reload()},this.search=function(a){""===a?j.search("search",null):j.search("search",a)};var m=this;h.$on("moveFeedToFolder",function(a,b){m.moveFeed(b.feedId,b.folderId)});var n=function(){var e;a.current&&(e=a.current.$$route.type);var f=0;if(e===b.FOLDER)f=l();else if(e===b.FEED){var g=c.getById(l());g&&(f=g.folderId)}var h;0!==f&&(h=d.getById(f)),m.feed.existingFolder=h};h.$on("$routeChangeSuccess",function(){n()})}]),j.controller("SettingsController",["$route","$q","SettingsResource","ItemResource","OPMLParser","OPMLImporter","Publisher",function(a,b,c,d,e,f,g){this.isOPMLImporting=!1,this.isArticlesImporting=!1,this.opmlImportError=!1,this.articleImportError=!1;var h=function(b,d){c.set(b,d),["showAll","oldestFirst","compact"].indexOf(b)>=0&&a.reload()};this.toggleSetting=function(a){h(a,!this.getSetting(a))},this.getSetting=function(a){return c.get(a)},this.importOPML=function(a){this.opmlImportError=!1,this.articleImportError=!1;try{this.isOPMLImporting=!1;var b=e.parse(a),c=this,d=5;f.importFolders(b).then(function(a){return f.importFeedQueue(a,d)})["finally"](function(){c.isOPMLImporting=!1})}catch(g){console.error(g),this.isOPMLImporting=!1,this.opmlImportError=!0}},this.importArticles=function(a){this.opmlImportError=!1,this.articleImportError=!1;try{this.isArticlesImporting=!0;var b=JSON.parse(a),c=this;d.importArticles(b).success(function(a){g.publishAll(a)})["finally"](function(){c.isArticlesImporting=!1})}catch(e){console.error(e),this.articleImportError=!0,this.isArticlesImporting=!1}}}]),j.filter("trustUrl",["$sce",function(a){return function(b){return a.trustAsResourceUrl(b)}}]),j.filter("unreadCountFormatter",function(){return function(a){return a>999?"999+":a}}),j.factory("FeedResource",["Resource","$http","BASE_URL","$q",function(a,b,c,d){var e=function(b,c,d){a.call(this,b,c,"url"),this.ids={},this.locations={},this.unreadCount=0,this.folderUnreadCount={},this.folderIds={},this.$q=d};return e.prototype=Object.create(a.prototype),e.prototype.receive=function(b){a.prototype.receive.call(this,b),this.updateUnreadCache(),this.updateFolderCache()},e.prototype.clear=function(){a.prototype.clear.call(this),this.unreadCount=0,this.folderUnreadCount={},this.folderIds={},this.ids={},this.locations={}},e.prototype.updateUnreadCache=function(){this.unreadCount=0,this.folderUnreadCount={};var a=this;this.values.forEach(function(b){b.unreadCount&&(a.unreadCount+=b.unreadCount),b.folderId!==i&&(a.folderUnreadCount[b.folderId]=a.folderUnreadCount[b.folderId]||0,a.folderUnreadCount[b.folderId]+=b.unreadCount)})},e.prototype.updateFolderCache=function(){this.folderIds={};var a=this;this.values.forEach(function(b){a.folderIds[b.folderId]=a.folderIds[b.folderId]||[],a.folderIds[b.folderId].push(b)})},e.prototype.add=function(b){a.prototype.add.call(this,b),b.id!==i&&(this.ids[b.id]=this.hashMap[b.url]),b.location!==i&&(this.locations[b.location]=this.hashMap[b.url])},e.prototype.markRead=function(){this.values.forEach(function(a){a.unreadCount=0}),this.updateUnreadCache()},e.prototype.markFeedRead=function(a){this.ids[a].unreadCount=0,this.updateUnreadCache()},e.prototype.markFolderRead=function(a){this.values.forEach(function(b){b.folderId===a&&(b.unreadCount=0)}),this.updateUnreadCache()},e.prototype.markItemOfFeedRead=function(a){this.ids[a].unreadCount-=1,this.updateUnreadCache()},e.prototype.markItemsOfFeedsRead=function(a){var b=this;a.forEach(function(a){b.ids[a].unreadCount-=1}),this.updateUnreadCache()},e.prototype.markItemOfFeedUnread=function(a){this.ids[a].unreadCount+=1,this.updateUnreadCache()},e.prototype.getUnreadCount=function(){return this.unreadCount},e.prototype.getFolderUnreadCount=function(a){return this.folderUnreadCount[a]},e.prototype.getByFolderId=function(a){return this.folderIds[a]||[]},e.prototype.getById=function(a){return this.ids[a]},e.prototype.getByLocation=function(a){return this.locations[a]},e.prototype.rename=function(a,b){return this.http({method:"POST",url:this.BASE_URL+"/feeds/"+a+"/rename",data:{feedTitle:b}})},e.prototype.move=function(a,b){var c=this.getById(a);return c.folderId=b,this.updateFolderCache(),this.updateUnreadCache(),this.http({method:"POST",url:this.BASE_URL+"/feeds/"+c.id+"/move",data:{parentFolderId:b}})},e.prototype.create=function(a,b,c){a=a.trim(),a.startsWith("http")||(a="https://"+a),c!==i&&(c=c.trim());var d={url:a,folderId:b||0,title:c||a,unreadCount:0};this.add(d),this.updateFolderCache();var e=this.$q.defer();return this.http({method:"POST",url:this.BASE_URL+"/feeds",data:{url:a,parentFolderId:b||0,title:c}}).success(function(a){e.resolve(a)}).error(function(a){d.faviconLink="",d.error=a.message,e.reject()}),e.promise},e.prototype.reversiblyDelete=function(a,b,c){var d=this.getById(a);return d&&c!==!0&&(d.deleted=!0),b!==!1&&this.updateUnreadCache(),this.http["delete"](this.BASE_URL+"/feeds/"+a)},e.prototype.reversiblyDeleteFolder=function(a){var b=this,c=[];this.getByFolderId(a).forEach(function(a){c.push(b.reversiblyDelete(a.id,!1,!0))}),this.updateUnreadCache();var d=this.$q.all(c);return d.promise},e.prototype["delete"]=function(b,c){var d=this.get(b);return d!==i&&d.id&&delete this.ids[d.id],d!==i&&d.location&&delete this.locations[d.location],a.prototype["delete"].call(this,b),c!==!1&&(this.updateUnreadCache(),this.updateFolderCache()),d},e.prototype.deleteFolder=function(a){var b=this;this.getByFolderId(a).forEach(function(a){b["delete"](a.url,!1)}),this.updateUnreadCache(),this.updateFolderCache()},e.prototype.undoDelete=function(a,b){var c=this.getById(a);return c&&(c.deleted=!1),b!==!1&&this.updateUnreadCache(),this.http.post(this.BASE_URL+"/feeds/"+a+"/restore")},e.prototype.undoDeleteFolder=function(a){var b=this,c=[];this.getByFolderId(a).forEach(function(a){c.push(b.undoDelete(a.id,!1))}),this.updateUnreadCache();var d=this.$q.all(c);return d.promise},e.prototype.setOrdering=function(a,b){var c=this.getById(a);if(c){c.ordering=b;var d=this.BASE_URL+"/feeds/"+a+"/ordering";return this.http.post(d,{ordering:b})}},new e(b,c,d)}]),j.factory("FolderResource",["Resource","$http","BASE_URL","$q",function(a,b,c,d){var e=function(b,c,d){a.call(this,b,c,"name"),this.deleted=null,this.$q=d,this.ids={}};return e.prototype=Object.create(a.prototype),e.prototype.add=function(b){a.prototype.add.call(this,b),b.id!==i&&(this.ids[b.id]=this.hashMap[b.name])},e.prototype.clear=function(){a.prototype.clear.call(this),this.ids={}},e.prototype["delete"]=function(b){var c=this.get(b);return c!==i&&c.id&&delete this.ids[c.id],a.prototype["delete"].call(this,b),c},e.prototype.toggleOpen=function(a){var b=this.get(a);return b.opened=!b.opened,this.http({url:this.BASE_URL+"/folders/"+b.id+"/open",method:"POST",data:{folderId:b.id,open:b.opened}})},e.prototype.rename=function(a,b){var c=this.get(a),d=this.$q.defer(),e=this;return this.http({url:this.BASE_URL+"/folders/"+c.id+"/rename",method:"POST",data:{folderName:b}}).success(function(){c.name=b,delete e.hashMap[a],e.hashMap[b]=c,d.resolve()}).error(function(a){d.reject(a.message)}),d.promise},e.prototype.getById=function(a){return this.ids[a]},e.prototype.create=function(a){a=a.trim();var b={name:a};this.add(b);var c=this.$q.defer();return this.http({url:this.BASE_URL+"/folders",method:"POST",data:{folderName:a}}).success(function(a){c.resolve(a)}).error(function(a){b.error=a.message}),c.promise},e.prototype.reversiblyDelete=function(a){var b=this.get(a),c=b.id;return b.deleted=!0,this.http["delete"](this.BASE_URL+"/folders/"+c)},e.prototype.undoDelete=function(a){var b=this.get(a),c=b.id;return b.deleted=!1,this.http.post(this.BASE_URL+"/folders/"+c+"/restore")},new e(b,c,d)}]),j.factory("ItemResource",["Resource","$http","BASE_URL","ITEM_BATCH_SIZE",function(a,b,c,d){var e=function(b,c,d){a.call(this,b,c),this.batchSize=d,this.clear()};return e.prototype=Object.create(a.prototype),e.prototype.clear=function(){this.starredCount=0,this.lowestId=0,this.highestId=0,a.prototype.clear.call(this)},e.prototype.receive=function(b,c){switch(c){case"newestItemId":this.newestItemId=b;break;case"starred":this.starredCount=b;break;default:var d=this;b.forEach(function(a){0===d.lowestId&&(d.lowestId=a.id),0===d.highestId&&(d.highestId=a.id),a.id>d.highestId&&(d.highestId=a.id),a.id<d.lowestId&&(d.lowestId=a.id)}),a.prototype.receive.call(this,b,c)}},e.prototype.getNewestItemId=function(){return this.newestItemId},e.prototype.getStarredCount=function(){return this.starredCount},e.prototype.star=function(a,b){b===i&&(b=!0);var c=this.get(a),d=this.BASE_URL+"/items/"+c.feedId+"/"+c.guidHash+"/star";return c.starred=b,b?this.starredCount+=1:this.starredCount-=1,this.http({url:d,method:"POST",data:{isStarred:b}})},e.prototype.toggleStar=function(a){this.get(a).starred?this.star(a,!1):this.star(a,!0)},e.prototype.markItemRead=function(a,b){return b===i&&(b=!0),this.get(a).unread=!b,this.http({url:this.BASE_URL+"/items/"+a+"/read",method:"POST",data:{isRead:b}})},e.prototype.markItemsRead=function(a){var b=this;return a.forEach(function(a){b.get(a).unread=!1}),this.http({url:this.BASE_URL+"/items/read/multiple",method:"POST",data:{itemIds:a}})},e.prototype.markFeedRead=function(a,b){b===i&&(b=!0);var c=this.values.filter(function(b){return b.feedId===a});return c.forEach(function(a){a.unread=!b}),this.http.post(this.BASE_URL+"/feeds/"+a+"/read",{highestItemId:this.getNewestItemId()})},e.prototype.markRead=function(){return this.values.forEach(function(a){a.unread=!1}),this.http({url:this.BASE_URL+"/items/read",method:"POST",data:{highestItemId:this.getNewestItemId()}})},e.prototype.autoPage=function(a,b,c,d,e){var f;return f=c?this.highestId:this.lowestId,this.http({url:this.BASE_URL+"/items",method:"GET",params:{type:a,id:b,offset:f,limit:this.batchSize,oldestFirst:c,showAll:d,search:e}})},e.prototype.importArticles=function(a){return this.http({url:this.BASE_URL+"/feeds/import/articles",method:"POST",data:{json:a}})},new e(b,c,d)}]),j.service("Loading",function(){this.loading={global:!1,content:!1,autopaging:!1},this.setLoading=function(a,b){this.loading[a]=b},this.isLoading=function(a){return this.loading[a]}}),j.service("OPMLImporter",["FeedResource","FolderResource","Publisher","$q",function(a,b,c,d){var e=function(f){var g=d.defer();if(f.length>0){var h=f.pop(),j=h.url,k=h.title,l=0,m=h.folderName;if(m!==i&&b.get(m)!==i){var n=b.get(m);n.opened=!0,l=n.id,n.getsFeed=!0,n.getsFeedCounter=n.getsFeedCounter||0,n.getsFeedCounter+=1}j!==i&&a.get(j)===i&&a.create(j,l,k).then(function(a){c.publishAll(a)})["finally"](function(){0!==l&&(n.getsFeedCounter-=1,0===n.getsFeedCounter&&(n.getsFeed=!1)),e(f)})}else g.resolve();return g.promise};this.importFolders=function(a){var e=[],f=[];a.folders.forEach(function(a){if(a.name!==i){if(b.get(a.name)===i){var d=b.create(a.name).then(function(a){c.publishAll(a)});f.push(d)}a.feeds.forEach(function(b){b.folderName=a.name,e.push(b)})}}),e=e.concat(a.feeds);var g=d.defer();return d.all(f)["finally"](function(){g.resolve(e)}),g.promise},this.importFeedQueue=function(a,b){for(var c=d.defer(),f=[],g=0;b>g;g+=1)f.push(e(a));return d.all(f).then(function(){c.resolve()}),c.promise}}]),j.service("OPMLParser",function(){var a=function(a){var b=a.attr("xmlUrl")||a.attr("htmlUrl"),c=a.attr("title")||a.attr("text")||b;return b===i?{type:"folder",name:c,feeds:[]}:{type:"feed",name:c,url:b}},b=function(c,d,f){for(var g=0;g<c.length;g+=1){var h=e(c[g]),i=a(h);"feed"===i.type?d.feeds.push(i):f?(b(h.children("outline"),i,!1),d.folders.push(i)):b(h.children("outline"),d,!1)}return d};this.parse=function(a){a=e.parseXML(a);var c=e(a).find("body > outline"),d={feeds:[],folders:[]};return b(c,d,!0)}}),j.service("Publisher",function(){this.channels={},this.subscribe=function(a){var b=this;return{toChannels:function(c){c.forEach(function(c){b.channels[c]=b.channels[c]||[],b.channels[c].push(a)})}}},this.publishAll=function(a){var b=this;Object.keys(a).forEach(function(c){var d=b.channels[c];d!==i&&d.forEach(function(b){b.receive(a[c],c)})})}}),j.factory("Resource",function(){var a=function(a,b,c){this.id=c||"id",this.values=[],this.hashMap={},this.http=a,this.BASE_URL=b};return a.prototype.receive=function(a){var b=this;a.forEach(function(a){b.add(a)})},a.prototype.add=function(a){var b=this.hashMap[a[this.id]];b===i?(this.values.push(a),this.hashMap[a[this.id]]=a):Object.keys(a).forEach(function(c){b[c]=a[c]})},a.prototype.size=function(){return this.values.length},a.prototype.get=function(a){return this.hashMap[a]},a.prototype["delete"]=function(a){var b=this,c=this.values.findIndex(function(c){return c[b.id]===a});c!==i&&this.values.splice(c,1),this.hashMap[a]!==i&&delete this.hashMap[a]},a.prototype.clear=function(){for(this.hashMap={};this.values.length>0;)this.values.pop()},a.prototype.getAll=function(){return this.values},a}),j.service("SettingsResource",["$http","BASE_URL",function(a,b){this.settings={language:"en",showAll:null,compact:!1,oldestFirst:null,preventReadOnScroll:!1,compactExpand:!1,exploreUrl:""},this.defaultLanguageCode="en",this.supportedLanguageCodes=["ar-ma","ar","bg","ca","cs","cv","da","de","el","en-ca","en-gb","eo","es","et","eu","fi","fr-ca","fr","gl","he","hi","hu","id","is","it","ja","ka","ko","lv","ms-my","nb","ne","nl","pl","pt-br","pt","ro","ru","sk","sl","sv","th","tr","tzm-la","tzm","uk","zh-cn","zh-tw"],this.receive=function(a){var b=this;Object.keys(a).forEach(function(c){var d=a[c];"language"===c&&(d=b.processLanguageCode(d)),b.settings[c]=d})},this.get=function(a){return this.settings[a]},this.set=function(c,d){return this.settings[c]=d,a({url:b+"/settings",method:"PUT",data:{language:this.settings.language,showAll:this.settings.showAll,compact:this.settings.compact,oldestFirst:this.settings.oldestFirst,compactExpand:this.settings.compactExpand,preventReadOnScroll:this.settings.preventReadOnScroll}})},this.processLanguageCode=function(a){return a=a.replace("_","-").toLowerCase(),this.supportedLanguageCodes.indexOf(a)<0&&(a=a.split("-")[0]),this.supportedLanguageCodes.indexOf(a)<0&&(a=this.defaultLanguageCode),a}}]),function(a,b,c,d,e){var f=a.location,g=a.localStorage,h=function(a,b,d){var e=c.isContentHandlerRegistered,f=function(a,b){return e?"new"!==e(a,b):g.getItem("registeredHandler")===b};c.registerContentHandler&&!f(a,b)&&(c.registerContentHandler(a,j,d),e||g.setItem("registeredHandler",b))},i=f.protocol+"//"+f.host+f.pathname,j=i+"?subscribe_to=%s",k="application/vnd.mozilla.maybe.feed",l="ownCloud News @ "+i;h(k,j,l),e(b).ready(function(){var b=a.decodeURIComponent(d("?subscribe_to"));if(b&&"null"!==b){e("#new-feed").show();var c=e('input[ng-model="Navigation.feed.url"]');c.val(b),c.trigger("input"),setTimeout(function(){c.focus()},1e3)}})}(b,c,a,h,e),function(a,b,c){var d=function(a){return!(a.is("input")||a.is("select")||a.is("textarea")||a.is("checkbox"))},e=function(a){return!(a.shiftKey||a.altKey||a.ctrlKey||a.metaKey)},f=function(a,b){var c=a.offset().top-b.offset().top,d=c+a.height(),e=b.height();return c>=0&&e>d},g=function(a,b,c){0===a.length||!c&&f(a,b)||b.scrollTop(a.offset().top-b.offset().top+b.scrollTop())},h=function(a){var b=a.find(".active");g(b,a.children("ul"),!0)},i=function(a){a.find(".active > a:visible").trigger("click")},j=function(a,b){if(0===b.scrollTop()){var c=b.find(".pull-to-refresh");c.hasClass("show-pull-to-refresh")?c.hasClass("done")&&i(a):c.addClass("show-pull-to-refresh")}},k=function(a,b){a.children("a:visible").trigger("click"),g(a,b.children("ul"))},l=function(a){var b=a.find(".active"),d=a.find(".explore-feed,.subscriptions-feed:visible,.starred-feed:visible,.feed:visible");if(b.hasClass("folder"))for(;b.length>0;){var e=b.find(".feed:visible");if(e.length>0)return void k(c(e[0]),a);b=b.next(".folder")}else for(var f=0;f<d.length-1;f+=1){var g=d[f];if(g===b[0]){var h=d[f+1];k(c(h),a);break}}},m=function(a){return a.parent().parent(".folder")},n=function(a,b){var d,e=a.find(".folder:visible");d=b?e.length-1:0,e.length>0&&k(c(e[d]),a)},o=function(a){var b=a.find(".active");if(b.hasClass("folder"))k(b.prevAll(".folder:visible").first(),a);else if(b.hasClass("feed")){var c=m(b);c.length>0?k(c,a):n(a,!0)}else n(a,!0)},p=function(a){var b=a.find(".active");if(b.hasClass("folder"))k(b.nextAll(".folder:visible").first(),a);else if(b.hasClass("feed")){var c=m(b);c.length>0?k(c.nextAll(".folder:visible").first(),a):n(a)}else n(a)},q=function(a){var b=a.find(".active"),d=a.find(".explore-feed,.subscriptions-feed:visible,.starred-feed:visible,.feed:visible");if(b.hasClass("folder")){for(var e=b.prev(".folder");e.length>0;){var f=e.find(".feed:visible");if(f.length>0)return void k(c(f[f.length-1]),a);e=e.prev(".folder")}var g=b.siblings(".feed");if(g.length>0)return void k(c(g[g.length-1]),a);var h=c(".starred-feed:visible");return void(h.length>0&&k(h,a))}for(var i=d.length-1;i>0;i-=1){var j=d[i];if(j===b[0]){var l=d[i-1];k(c(l),a);break}}},r=function(a,b){var d=a.find(".item");d.each(function(a,d){return d=c(d),d.height()+d.position().top>30?(b(d),!1):void 0})},s=function(a){r(a,function(a){a.find(".toggle-keep-unread").trigger("click")})},t=function(a){r(a,function(a){a.find(".star").trigger("click")})},u=function(a){r(a,function(a){a.find(".utils").trigger("click")})},v=function(b){r(b,function(b){b.trigger("click"),a.open(b.find(".external:visible").attr("href"),"_blank")})},w=function(a,b,c){a.scrollTop(b.offset().top-a.offset().top+a.scrollTop()),c&&r(a,function(a){a.hasClass("open")||a.find(".utils").trigger("click")})},x=function(a,b){var d=a.find(".item"),e=!1;d.each(function(d,f){return f=c(f),f.position().top>1?(w(a,f,b),e=!0,!1):void 0}),e||a.scrollTop(a.prop("scrollHeight"))},y=function(a,b,d){var e=b.find(".item"),f=!1;e.each(function(e,g){if(g=c(g),g.position().top>=0){var h=g.prev();return h.length>0?w(b,h,d):j(a,b),f=!0,!1}}),!f&&e.length>0&&w(b,e.last())};c(b).keyup(function(a){if(d(c(":focus"))&&e(a)){var b=a.keyCode,f=c("#app-content"),g=c("#app-navigation"),k=c("#articles.compact").length>0,m="true"===c("#articles").attr("news-compact-expand"),n=k&&m;[74,78,39].indexOf(b)>=0?(a.preventDefault(),x(f,n)):[75,80,37].indexOf(b)>=0?(a.preventDefault(),y(g,f,n)):[85].indexOf(b)>=0?(a.preventDefault(),s(f)):[69].indexOf(b)>=0?(a.preventDefault(),u(f)):[73,83,76].indexOf(b)>=0?(a.preventDefault(),t(f)):[72].indexOf(b)>=0?(a.preventDefault(),t(f),x(f)):[79].indexOf(b)>=0?(a.preventDefault(),v(f)):[82].indexOf(b)>=0?(a.preventDefault(),i(g)):[70].indexOf(b)>=0?(a.preventDefault(),l(g)):[68].indexOf(b)>=0?(a.preventDefault(),q(g)):[67].indexOf(b)>=0?(a.preventDefault(),o(g)):[65].indexOf(b)>=0?(a.preventDefault(),h(g)):[86].indexOf(b)>=0?(a.preventDefault(),p(g)):[33].indexOf(b)>=0&&j(g,f)}})}(b,c,e),b.News=b.News||{},function(a,b,c,d){var e=[];d.addArticleAction=function(a){e.push(a)},d.getArticleActionPlugins=function(){return e}}(b,c,jQuery,b.News),j.run(["$document","$rootScope",function(a,b){a.click(function(a){b.$broadcast("documentClicked",a)})}]),j.directive("appNavigationEntryUtils",function(){return{restrict:"C",link:function(a,b){var c=b.siblings(".app-navigation-entry-menu"),d=e(b).find(".app-navigation-entry-utils-menu-button button");d.click(function(){c.toggleClass("open")}),a.$on("documentClicked",function(a,b){b.target!==d[0]&&c.removeClass("open")})}}}),j.directive("newsAddFeed",["$rootScope","$timeout",function(a,b){return{restrict:"A",link:function(c,d){a.$on("addFeed",function(a,e){b(function(){d.is(":animated")?(d.stop(!0,!0),d.show()):d.is(":visible")||d.slideDown(),d.find('[ng-model="Navigation.feed.url"]').focus()}),c.Navigation.feed.url=e})}}}]),j.directive("newsArticleActions",function(){return{restrict:"E",scope:{article:"="},link:function(a,b){for(var c=News.getArticleActionPlugins(),d=0;d<c.length;d+=1)c[d](b,a.article)}}}),j.directive("newsAutoFocus",["$timeout",function(a){return function(b,c,d){var f=c;d.newsAutoFocus&&(f=e(d.newsAutoFocus)),a(function(){f.focus()},0)}}]),j.directive("newsBindHtmlUnsafe",function(){return function(a,b,c){a.$watch(c.newsBindHtmlUnsafe,function(){b.html(a.$eval(c.newsBindHtmlUnsafe))})}}),j.directive("newsDraggable",function(){return function(a,b,c){var e=a.$eval(c.newsDraggable);d.isDefined(e)?b.draggable(e):b.draggable(),c.$observe("newsDraggableDisable",function(a){b.draggable("true"===a?"disable":"enable")})}}),j.directive("newsDroppable",["$rootScope",function(a){return function(b,c,d){var f={accept:".feed",hoverClass:"drag-and-drop",greedy:!0,drop:function(f,g){e(".drag-and-drop").removeClass("drag-and-drop");var h={folderId:parseInt(c.data("id"),10),feedId:parseInt(e(g.draggable).data("id"),10)};a.$broadcast("moveFeedToFolder",h),b.$apply(d.droppable)}};c.droppable(f)}}]),j.directive("newsEnclosure",function(){return{restrict:"E",scope:{link:"@",type:"@"},transclude:!0,template:'<div><video controls preload="none" ng-show="mediaType==\'video\' && !cantPlay()"><source ng-src="{{ link|trustUrl }}" type="{{ type }}"></video><audio controls preload="none" ng-show="mediaType==\'audio\' && !cantPlay()"><source ng-src="{{ link|trustUrl }}" type="{{ type }}"></audio><div ng-transclude ng-show="cantPlay()"></div></div>',link:function(a,b){a.mediaType=0===a.type.indexOf("audio")?"audio":"video"; var c=b.children().children(a.mediaType).children("source")[0],d=!1;a.cantPlay=function(){return d},c.addEventListener("error",function(){a.$apply(function(){d=!0})})}}}),j.directive("newsFinishedTransition",function(){return function(a,b,c){b.on("transitionend",function(){b.addClass(c.newsFinishedTransition)})}}),j.directive("newsFocus",["$timeout","$interpolate",function(a,b){return function(c,d,f){d.click(function(){var d=e(b(f.newsFocus)(c));a(function(){d.focus()},500)})}}]),j.directive("newsPullToRefresh",["$rootScope",function(a){var b=!1;return{restrict:"A",scope:{newsPullToRefresh:"="},link:function(c,d){a.$on("$routeChangeStart",function(){b=!1,c.newsPullToRefresh=!1}),d.on("scroll",function(){0===d.scrollTop()&&b&&(c.newsPullToRefresh=!0),b=!0})}}}]),j.directive("newsReadFile",function(){return function(a,b,c){b.change(function(){var d=b[0].files[0],e=new FileReader;e.onload=function(b){a.$fileContent=b.target.result,a.$apply(c.newsReadFile)},e.readAsText(d)})}}),j.directive("newsScroll",["$timeout","ITEM_AUTO_PAGE_SIZE","MARK_READ_TIMEOUT","SCROLL_TIMEOUT",function(a,b,c,d){var f,g=function(a,b,c){for(var d=0,f=b.find(".item"),g=f.length-1;g>=0;g-=1){var h=e(f[g]);if(d>=a)break;if(h.position().top<0){c.$apply(c.newsScrollAutoPage);break}d+=1}},h=function(a,b,c){if(a){var d=[],f=b.find(".item:not(.read)");f.each(function(a,b){var c=e(b);return c.position().top<=-10?void d.push(parseInt(c.data("id"),10)):!1}),c.itemIds=d,c.$apply(c.newsScrollMarkRead)}};return{restrict:"A",scope:{newsScroll:"@",newsScrollAutoPage:"&",newsScrollMarkRead:"&",newsScrollEnabledMarkRead:"="},link:function(j,k){var l=!0,m=k;j.newsScroll&&(m=e(j.newsScroll));var n=function(){l&&(l=!1,a(function(){l=!0},1e3*d),g(b,k,j),f&&a.cancel(f),f=a(function(){h(j.newsScrollEnabledMarkRead,k,j),f=i},1e3*c))};m.on("scroll",n),j.$on("$destroy",function(){m.off("scroll",n)})}}}]),j.directive("newsSearch",["$timeout",function(a){var b;return{restrict:"E",scope:{onSearch:"="},link:function(c){e("#searchbox").on("search keyup",function(){var d=e(this).val();b&&a.cancel(b),b=a(function(){c.$apply(function(){c.onSearch(d)})},500)})}}}]),j.directive("newsStopPropagation",function(){return{restrict:"A",link:function(a,b){b.bind("click",function(a){a.stopPropagation()})}}}),j.directive("newsTimeout",["$timeout","$rootScope",function(a,b){return{restrict:"A",scope:{newsTimeout:"&"},link:function(c,d){var e=!1,f=7,g=a(c.newsTimeout,1e3*f);c.$on("$destroy",function(){e=!0,a.cancel(g)}),b.$on("$locationChangeStart",function(){a.cancel(g),e||(e=!0,d.remove(),c.newsTimeout())})}}}]),j.directive("newsTitleUnreadCount",["$window",function(a){var b=a.document.title,c=b.split("-"),d=c[0]||"News",e=c[1]||"ownCloud";return{restrict:"E",scope:{unreadCount:"@"},link:function(b,c,f){f.$observe("unreadCount",function(b){a.document.title="0"!==b?d+"("+b+") - "+e:d+" - "+e})}}}]),j.directive("newsTriggerClick",function(){return function(a,b,c){b.click(function(){e(c.newsTriggerClick).trigger("click")})}})}(navigator,window,document,angular,jQuery,OC,oc_requesttoken,url); //# sourceMappingURL=app.min.js.map
\ No newline at end of file diff --git a/js/build/app.min.js.map b/js/build/app.min.js.map index 1ca05ef39..aedb704b8 100644 --- a/js/build/app.min.js.map +++ b/js/build/app.min.js.map @@ -1 +1 @@ -{"version":3,"file":"app.min.js","sources":["app.js"],"names":["navigator","window","document","angular","$","OC","csrfToken","url","undefined","app","module","config","$routeProvider","$provide","$httpProvider","feedType","FEED","FOLDER","STARRED","SUBSCRIPTIONS","SHARED","EXPLORE","constant","generateUrl","factory","$q","BASE_URL","$window","request","domain","location","href","split","pathname","indexOf","headers","requesttoken","when","errorMessages","t",401,403,412,500,503,"$timeout","timer","responseError","response","status","cancel","Notification","hide","showHtml","reject","interceptors","push","getItemResolve","type","data","$http","$route","$location","ITEM_BATCH_SIZE","FEED_TYPE","SettingsResource","FeedResource","showAll","get","oldestFirst","search","deferred","defer","resolve","parameters","limit","current","params","id","feed","getById","ordering","method","success","promise","getExploreResolve","sites","Publisher","then","publishAll","language","lang","controller","templateUrl","run","$rootScope","$interval","Loading","ItemResource","FolderResource","REFRESH_RATE","setLoading","subscribe","toChannels","settingsDeferred","activeFeedDeferred","path","activeFeed","test","feeds","feedDeferred","folders","folderDeferred","all","length","reload","$on","this","loading","isFirstRun","size","$routeParams","ITEM_AUTO_PAGE_SIZE","clear","isAutoPagingEnabled","isNothingMoreToAutoPage","getItems","getAll","toggleStar","itemId","toggleItem","item","isCompactView","show","isShowAll","markRead","keepUnread","unread","markItemRead","markItemOfFeedRead","feedId","getFeed","toggleKeepUnread","markItemOfFeedUnread","self","getOrdering","isFeed","orderBy","isCompactExpand","autoPagingEnabled","markReadEnabled","scrollRead","itemIds","ids","feedIds","forEach","markItemsOfFeedsRead","markItemsRead","$$route","autoPage","autoPageAgain","items","error","getRelativeDate","timestamp","languageCode","date","moment","unix","locale","fromNow","refresh","feedExists","getByLocation","subscribeTo","$broadcast","isCategoryShown","filter","element","feedError","showNewFolder","renamingFolder","addingFeed","addingFolder","folderError","renameError","getRouteId","parseInt","getFeeds","getFolders","markFolderRead","folderId","getByFolderId","markFeedRead","getFeedsOfFolder","getUnreadCount","getFeedUnreadCount","unreadCount","getFolderUnreadCount","getStarredCount","toggleFolder","folderName","toggleOpen","hasFeeds","subFeedActive","isSubscriptionsActive","isStarredActive","isExploreActive","isFolderActive","isFeedActive","folderNameExists","trim","feedUrlExists","createFeed","newFolder","existingFolder","getsFeed","create","name","createFolder","folder","moveFeed","move","renameFeed","rename","title","editing","renameFolder","message","reversiblyDeleteFeed","reversiblyDelete","undoDeleteFeed","undoDelete","deleteFeed","reversiblyDeleteFolder","undoDeleteFolder","deleteFolder","setOrdering","value","scope","setSelectedFolderForRoute","OPMLParser","OPMLImporter","isOPMLImporting","isArticlesImporting","opmlImportError","articleImportError","set","key","toggleSetting","getSetting","importOPML","content","parsedContent","parse","jobSize","importFolders","feedQueue","importFeedQueue","console","importArticles","articles","JSON","$sce","trustAsResourceUrl","Resource","call","locations","folderUnreadCount","folderIds","prototype","Object","receive","updateUnreadCache","updateFolderCache","values","add","hashMap","http","feedTitle","parentFolderId","startsWith","faviconLink","updateCache","isFolder","deleted","promises","post","opened","open","toFolderName","batchSize","starredCount","lowestId","highestId","channel","newestItemId","getNewestItemId","star","isStarred","it","guidHash","starred","isRead","read","highestItemId","offset","json","service","global","autopaging","area","isLoading","startFeedJob","queue","pop","getsFeedCounter","folderPromises","concat","jobPromises","i","parseOutline","outline","attr","recursivelyParse","level","root","firstLevel","entry","children","xml","parseXML","find","channels","obj","keys","listeners","listener","objs","existing","deleteAtIndex","findIndex","splice","settings","compact","preventReadOnScroll","compactExpand","exploreUrl","defaultLanguageCode","supportedLanguageCodes","processLanguageCode","replace","toLowerCase","storage","localStorage","registerHandler","mime","registered","isContentHandlerRegistered","isRegistered","getItem","registerContentHandler","subscribeUrl","setItem","cleanUrl","protocol","host","mimeType","ready","subscription","decodeURIComponent","input","val","trigger","setTimeout","focus","noInputFocused","is","noModifierKey","event","shiftKey","altKey","ctrlKey","metaKey","isInScrollView","elem","scrollArea","elemTop","top","elemBottom","height","areaBottom","scrollToNavigationElement","toTop","scrollTop","scrollToActiveNavigationEntry","navigationArea","reloadFeed","tryReload","pullToRefresh","hasClass","addClass","activateNavigationEntry","nextFeed","elements","subfeeds","next","getParentFolder","parent","selectFirstOrLastFolder","isLast","index","previousFolder","prevAll","first","parentFolder","nextFolder","nextAll","previousFeed","prev","siblings","previous","onActiveItem","callback","each","position","toggleUnread","expandItem","openLink","scrollToItem","expandItemInCompact","scrollToNextItem","jumped","prop","scrollToPreviousItem","last","keyup","keyCode","isExpandItem","preventDefault","News","exports","articleActionPlugins","addArticleAction","action","getArticleActionPlugins","jQuery","$document","click","directive","restrict","link","elm","menu","button","toggleClass","target","removeClass","_","stop","slideDown","Navigation","article","plugins","attrs","toFocus","newsAutoFocus","$watch","newsBindHtmlUnsafe","html","$eval","options","newsDraggable","isDefined","draggable","$observe","details","accept","hoverClass","greedy","drop","ui","$apply","droppable","transclude","template","mediaType","source","cantPlay","addEventListener","on","newsFinishedTransition","$interpolate","toReadd","newsFocus","scrolled","newsPullToRefresh","change","file","files","reader","FileReader","onload","$fileContent","result","newsReadFile","readAsText","MARK_READ_TIMEOUT","SCROLL_TIMEOUT","counter","newsScrollAutoPage","enabled","newsScrollMarkRead","newsScroll","newsScrollEnabledMarkRead","allowScroll","scrollHandler","off","onSearch","bind","stopPropagation","newsTimeout","destroyed","seconds","remove","baseTitle","titles","appName","ownCloudName","newsTriggerClick","oc_requesttoken"],"mappings":"CAAA,SAAUA,EAAWC,EAAQC,EAAUC,EAASC,EAAGC,EAAIC,EAAWC,EAAKC,GAEvE,YAIA,IAAIC,GAAMN,EAAQO,OAAO,QAAS,UAAW,aAAc,aAC3DD,GAAIE,QAAQ,iBAAkB,WAAY,gBAAiB,SAAUC,EAAgBC,EAAUC,GAG3F,GAAIC,IACAC,KAAM,EACNC,OAAQ,EACRC,QAAS,EACTC,cAAe,EACfC,OAAQ,EACRC,QAAS,EAIbR,GAASS,SAAS,eAAgB,IAClCT,EAASS,SAAS,kBAAmB,IAErCT,EAASS,SAAS,sBAAuB,IACzCT,EAASS,SAAS,WAAYjB,EAAGkB,YAAY,eAC7CV,EAASS,SAAS,YAAaP,GAC/BF,EAASS,SAAS,oBAAqB,IACvCT,EAASS,SAAS,iBAAkB,IAGpCT,EAASW,QAAQ,mBAAoB,KAAM,WAAY,UAAW,SAAUC,EAAIC,EAAUC,GACtF,OACIC,QAAS,SAAUjB,GACf,GAAIkB,GACAF,EAAQG,SAASC,KAAKC,MAAML,EAAQG,SAASG,UAAU,EAM3D,QALqC,IAAjCtB,EAAOJ,IA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d,EAAQD,EAASkM,EAAM0R,YAAuB,IAAVE,EAIxC5R,GAAM3H,IAAI,WAAY,WAClBsZ,GAAY,EACZ7d,EAASK,OAAOJ,KAKpBiD,EAAWqB,IAAI,uBAAwB,WAInCvE,EAASK,OAAOJ,GACX4d,IACDA,GAAY,EACZxV,EAAQ0V,SACR7R,EAAM0R,sBAM1BhgB,EAAIwb,UAAU,wBAAyB,UAAW,SAAUta,GAGxD,GAAIkf,GAAYlf,EAAQzB,SAAS+N,MAC7B6S,EAASD,EAAU7e,MAAM,KACzB+e,EAAUD,EAAO,IAAM,OACvBE,EAAeF,EAAO,IAAM,UAEhC,QACI5E,SAAU,IACVnN,OACI1C,YAAa,KAEjB8P,KAAM,SAAUpN,EAAOkJ,EAAM+E,GACzBA,EAAMW,SAAS,cAAe,SAAU7O,GAEhCnN,EAAQzB,SAAS+N,MADP,MAAVa,EACyBiS,EACrB,IAAMjS,EAAQ,OAASkS,EAEFD,EAAU,MAAQC,SAO/DvgB,EAAIwb,UAAU,mBAAoB,WAG9B,MAAO,UAAUlN,EAAOqN,EAAKjI,GACzBiI,EAAIJ,MAAM,WACN5b,EAAE+T,EAAK8M,kBAAkB5J,QAAQ,eAM1CrX,UAAWC,OAAQC,SAAUC,QAAS2b,OAASzb,GAAI6gB,gBAAiB3gB"}
\ No newline at end of file +{"version":3,"file":"app.min.js","sources":["app.js"],"names":["navigator","window","document","angular","$","OC","csrfToken","url","undefined","app","module","config","$routeProvider","$provide","$httpProvider","feedType","FEED","FOLDER","STARRED","SUBSCRIPTIONS","SHARED","EXPLORE","constant","generateUrl","factory","$q","BASE_URL","$window","request","domain","location","href","split","pathname","indexOf","headers","requesttoken","when","errorMessages","t",401,403,412,500,503,"$timeout","timer","responseError","response","status","cancel","Notification","hide","showHtml","reject","interceptors","push","getItemResolve","type","data","$http","$route","$location","ITEM_BATCH_SIZE","FEED_TYPE","SettingsResource","FeedResource","showAll","get","oldestFirst","search","deferred","defer","resolve","parameters","limit","current","params","id","feed","getById","ordering","method","success","promise","getExploreResolve","sites","Publisher","then","publishAll","language","lang","controller","templateUrl","run","$rootScope","$interval","Loading","ItemResource","FolderResource","REFRESH_RATE","setLoading","subscribe","toChannels","settingsDeferred","activeFeedDeferred","path","activeFeed","test","feeds","feedDeferred","folders","folderDeferred","all","length","reload","$on","this","loading","isFirstRun","size","$routeParams","ITEM_AUTO_PAGE_SIZE","clear","isAutoPagingEnabled","isNothingMoreToAutoPage","getItems","getAll","toggleStar","itemId","toggleItem","item","isCompactView","show","isShowAll","markRead","keepUnread","unread","markItemRead","markItemOfFeedRead","feedId","getFeed","toggleKeepUnread","markItemOfFeedUnread","self","getOrdering","isFeed","orderBy","isCompactExpand","autoPagingEnabled","markReadEnabled","scrollRead","itemIds","ids","feedIds","forEach","markItemsOfFeedsRead","markItemsRead","$$route","autoPage","autoPageAgain","items","error","getRelativeDate","timestamp","languageCode","date","moment","unix","locale","fromNow","refresh","feedExists","getByLocation","subscribeTo","$broadcast","isCategoryShown","filter","element","feedError","showNewFolder","renamingFolder","addingFeed","addingFolder","folderError","renameError","getRouteId","parseInt","getFeeds","getFolders","markFolderRead","folderId","getByFolderId","markFeedRead","getFeedsOfFolder","getUnreadCount","getFeedUnreadCount","unreadCount","getFolderUnreadCount","getStarredCount","toggleFolder","folderName","toggleOpen","hasFeeds","subFeedActive","isSubscriptionsActive","isStarredActive","isExploreActive","isFolderActive","isFeedActive","folderNameExists","trim","feedUrlExists","createFeed","newFolder","existingFolder","getsFeed","create","name","createFolder","folder","moveFeed","move","renameFeed","rename","title","editing","renameFolder","message","reversiblyDeleteFeed","reversiblyDelete","undoDeleteFeed","undoDelete","deleteFeed","reversiblyDeleteFolder","undoDeleteFolder","deleteFolder","setOrdering","value","scope","setSelectedFolderForRoute","OPMLParser","OPMLImporter","isOPMLImporting","isArticlesImporting","opmlImportError","articleImportError","set","key","toggleSetting","getSetting","importOPML","content","parsedContent","parse","jobSize","importFolders","feedQueue","importFeedQueue","console","importArticles","articles","JSON","$sce","trustAsResourceUrl","Resource","call","locations","folderUnreadCount","folderIds","prototype","Object","receive","updateUnreadCache","updateFolderCache","values","add","hashMap","http","feedTitle","parentFolderId","startsWith","faviconLink","updateCache","isFolder","deleted","promises","post","opened","open","toFolderName","batchSize","starredCount","lowestId","highestId","channel","newestItemId","getNewestItemId","star","isStarred","it","guidHash","starred","isRead","read","highestItemId","offset","json","service","global","autopaging","area","isLoading","startFeedJob","queue","pop","getsFeedCounter","folderPromises","concat","jobPromises","i","parseOutline","outline","attr","recursivelyParse","level","root","firstLevel","entry","children","xml","parseXML","find","channels","obj","keys","listeners","listener","objs","existing","deleteAtIndex","findIndex","splice","settings","compact","preventReadOnScroll","compactExpand","exploreUrl","defaultLanguageCode","supportedLanguageCodes","processLanguageCode","replace","toLowerCase","storage","localStorage","registerHandler","mime","registered","isContentHandlerRegistered","isRegistered","getItem","registerContentHandler","subscribeUrl","setItem","cleanUrl","protocol","host","mimeType","ready","subscription","decodeURIComponent","input","val","trigger","setTimeout","focus","noInputFocused","is","noModifierKey","event","shiftKey","altKey","ctrlKey","metaKey","isInScrollView","elem","scrollArea","elemTop","top","elemBottom","height","areaBottom","scrollToNavigationElement","toTop","scrollTop","scrollToActiveNavigationEntry","navigationArea","reloadFeed","tryReload","pullToRefresh","hasClass","addClass","activateNavigationEntry","nextFeed","elements","subfeeds","next","getParentFolder","parent","selectFirstOrLastFolder","isLast","index","previousFolder","prevAll","first","parentFolder","nextFolder","nextAll","previousFeed","prev","siblings","previous","onActiveItem","callback","each","position","toggleUnread","expandItem","openLink","scrollToItem","expandItemInCompact","scrollToNextItem","jumped","prop","scrollToPreviousItem","last","keyup","keyCode","isExpandItem","preventDefault","News","exports","articleActionPlugins","addArticleAction","action","getArticleActionPlugins","jQuery","$document","click","directive","restrict","link","elm","menu","button","toggleClass","target","removeClass","_","stop","slideDown","Navigation","article","plugins","attrs","toFocus","newsAutoFocus","$watch","newsBindHtmlUnsafe","html","$eval","options","newsDraggable","isDefined","draggable","$observe","details","accept","hoverClass","greedy","drop","ui","$apply","droppable","transclude","template","mediaType","source","cantPlay","addEventListener","on","newsFinishedTransition","$interpolate","toReadd","newsFocus","scrolled","newsPullToRefresh","change","file","files","reader","FileReader","onload","$fileContent","result","newsReadFile","readAsText","MARK_READ_TIMEOUT","SCROLL_TIMEOUT","counter","newsScrollAutoPage","enabled","newsScrollMarkRead","newsScroll","newsScrollEnabledMarkRead","allowScroll","scrollHandler","off","onSearch","bind","stopPropagation","newsTimeout","destroyed","seconds","remove","baseTitle","titles","appName","ownCloudName","newsTriggerClick","oc_requesttoken"],"mappings":"CAAA,SAAUA,EAAWC,EAAQC,EAAUC,EAASC,EAAGC,EAAIC,EAAWC,EAAKC,GAEvE,YAIA,IAAIC,GAAMN,EAAQO,OAAO,QAAS,UAAW,aAAc,aAC3DD,GAAIE,QAAQ,iBAAkB,WAAY,gBAAiB,SAAUC,EAAgBC,EAAUC,GAG3F,GAAIC,IACAC,KAAM,EACNC,OAAQ,EACRC,QAAS,EACTC,cAAe,EACfC,OAAQ,EACRC,QAAS,EAIbR,GAASS,SAAS,eAAgB,IAClCT,EAASS,SAAS,kBAAmB,IAErCT,EAASS,SAAS,sBAAuB,IACzCT,EAASS,SAAS,WAAYjB,EAAGkB,YAAY,eAC7CV,EAASS,SAAS,YAAaP,GAC/BF,EAASS,SAAS,oBAAqB,IACvCT,EAASS,SAAS,iBAAkB,IAGpCT,EAASW,QAAQ,mBAAoB,KAAM,WAAY,UAAW,SAAUC,EAAIC,EAAUC,GACtF,OACIC,QAAS,SAAUjB,GACf,GAAIkB,GACAF,EAAQG,SAASC,KAAKC,MAAML,EAAQG,SAASG,UAAU,EAM3D,QALqC,IAAjCtB,EAAOJ,IAAI2B,QAAQR,IACY,IAA/Bf,EAAOJ,IAAI2B,QAAQL,MACnBlB,EAAOwB,QAAQC,aAAe9B,GAG3BK,GAAUc,EAAGY,KAAK1B,OAIrC,IAAI2B,IACA,EAAGC,EAAE,OAAQ,mDACbC,IAAKD,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