From 2d3502acd6a574a0115649d0562c2da805409a55 Mon Sep 17 00:00:00 2001 From: Leonardo Merlin Date: Thu, 10 Sep 2015 18:10:55 -0300 Subject: [PATCH] Update dist --- dist/assets/images/event-video-area.png | Bin 0 -> 178334 bytes dist/scripts/app-acb8cb79ea.js | 4 ++++ dist/styles/app-f18abb0ff6.css | 1 + 3 files changed, 5 insertions(+), 0 deletions(-) create mode 100644 dist/assets/images/event-video-area.png create mode 100644 dist/scripts/app-acb8cb79ea.js create mode 100644 dist/styles/app-f18abb0ff6.css diff --git a/dist/assets/images/event-video-area.png b/dist/assets/images/event-video-area.png new file mode 100644 index 0000000..7e1b5bd Binary files /dev/null and b/dist/assets/images/event-video-area.png differ diff --git a/dist/scripts/app-acb8cb79ea.js b/dist/scripts/app-acb8cb79ea.js new file mode 100644 index 0000000..b6ae8ca --- /dev/null +++ b/dist/scripts/app-acb8cb79ea.js @@ -0,0 +1,4 @@ +!function(){"use strict";angular.module("dialoga",["ngAnimate","ngCookies","ngTouch","ngSanitize","ui.router","ngStorage","720kb.socialshare","slugifier","ncy-angular-breadcrumb","ngMessages"])}(),function(){"use strict";function e(e,a,o,s,r){var t=this;t.DialogaService=e,t.$scope=a,t.$location=o,t.$filter=s,t.$log=r,t.init(),t.loadData(),t.attachListeners(),r.debug("PropostasPageController")}function a(e,a){if(e=e||[],!a)return e;for(var o=[],s=0;s0)){var p=l.pop();a.push(p),c=!0}c||(n=!1)}return a}angular.module("dialoga").controller("ProgramasPageController",e),e.$inject=["DialogaService","$scope","$location","$filter","$log"],e.prototype.init=function(){var e=this;e.themes=null,e.selectedTheme=null,e.programs=null,e.filtredPrograms=null,e.query=null,e.search=e.$location.search(),e.search.tema&&(e._filtredByThemeSlug=e.search.tema),e.search.filtro&&(e._filtredByQuery=e.search.filtro),(e.search.tema||e.search.filtro)&&(e.loadingFilter=!0),e.loading=null,e.error=null},e.prototype.loadData=function(){var e=this;e.loading=!0,e.loadingPrograms=!0,e.DialogaService.getPrograms(function(a){e.programs=a,e.filtredPrograms=e.programs,e.loadingPrograms=!1,e.filter()},function(a){e.error=a,e.$log.error(a),e.loadingPrograms=!1}),e.loadingThemes=!0,e.DialogaService.getThemes(function(a){e.themes=a,e.loadingThemes=!1,e.filter()},function(a){e.error=a,e.$log.error(a),e.loadingThemes=!1})},e.prototype.attachListeners=function(){var e=this;e.$scope.$on("change-selectedCategory",function(a,o){e.selectedTheme=o,e.$log.debug("vm.selectedTheme",e.selectedTheme)}),e.$scope.$watch("pageProgramas.selectedTheme",function(a){e.search.tema=a?a.slug:null,e.$location.search("tema",e.search.tema),e.loadingFilter||(e.filtredPrograms=e.getFiltredPrograms())}),e.$scope.$watch("pageProgramas.query",function(a){e.search.filtro=a?a:null,e.$location.search("filtro",e.search.filtro),e.loadingFilter||(e.filtredPrograms=e.getFiltredPrograms())})},e.prototype.filter=function(){var e=this;if(e.loadingThemes||e.loadingPrograms)return void e.$log.info("No programs or themes loaded yet. Abort.");if(e._filtredByThemeSlug){var a=e._filtredByThemeSlug;e.DialogaService.getThemeBySlug(a,function(a){e.selectedTheme=a},function(a){e.$log.error('Error when try to "getThemeBySlug"',a)})}e._filtredByQuery&&(e.query=e._filtredByQuery),(e._filtredByThemeSlug||e._filtredByQuery)&&(e.filtredPrograms=e.getFiltredPrograms(),e.loadingFilter=!1)},e.prototype.showAllPrograms=function(e){var a=this;e.stopPropagation(),a.resetFilterValues(),a._showAllFlag=!0,a.filtredPrograms=a.getFiltredPrograms()},e.prototype.resetFilterValues=function(){var e=this;e.query=null,e.selectedTheme=null},e.prototype.getFiltredPrograms=function(){var e=this;if(!e.programs)return e.$log.warn("No programs loaded yet. Abort."),null;var s=e.programs,r=s,t=e.query,i=e.selectedTheme,l=e.$filter("filter");return i&&(r=a(r,i)),t&&(r=l(r,t,!1)),t||i||!e._showAllFlag||(r=o(r)),r}}(),function(){"use strict";function e(e,a,o,s,r,t,i,l,n){n.debug("ProgramaPageController");var c=this;c.DialogaService=e,c.PATH=a,c.$state=o,c.$location=s,c.$scope=r,c.$rootScope=t,c.$element=i,c.$timeout=l,c.$log=n,c.init(),c.loadData(),c.attachListeners()}angular.module("dialoga").controller("ProgramaPageController",e),e.$inject=["DialogaService","PATH","$state","$location","$scope","$rootScope","$element","$timeout","$log"],e.prototype.init=function(){var e=this;e.article=null,e.category=null,e.sendProposalRedirectURI=null,e.search=e.$location.search(),e.error=!1},e.prototype.loadData=function(){var e=this;e.loading=!0;var a=e.$state.params.slug;a||(e.$log.error("slug not defined."),e.$log.info("Rollback to home page."),e.$state.go("inicio",{},{location:!0})),e.DialogaService.getProgramBySlug(a,function(o){function s(a){a&&a.articles&&(e.randomProposal=a.articles[0]),e.search.proposal_id&&e.$timeout(function(){var e=angular.element(".focused-proposal");angular.element("body").animate({scrollTop:e.offset().top},"fast")},300)}function r(a){e.$log.error(a)}if(e.article=o,e.category=e.article.categories[0],e.sendProposalRedirectURI="state=programa&task=send-proposal&slug="+a,e.$rootScope.contentTitle=e.article.title,e.banner||(e.banner={src:e.PATH.image+e.article.image.url,alt:"Imagem de destaque do conteúdo"}),e.DialogaService.getProposalsByTopicId(e.article.id,{},function(a){e.proposals=a.articles,e.proposalsTopRated=e.proposals.slice(0,3)},function(a){e.$log.error(a)}),e.search.proposal_id){var t=e.search.proposal_id;e.DialogaService.getProposalById(t,{limit:"1"},s,r)}else e.DialogaService.getProposalsByTopicId(e.article.id,{order:"random()",limit:"1"},s,r);e.loading=!1},function(a){e.$log.error(a),e.error=a,e.loading=!1})},e.prototype.attachListeners=function(){var e=this;e.$scope.$on("proposal-carousel:showProposalsList",function(){e.showProposalsList()}),e.$scope.$on("cadastro-proposa:startSendProposal",function(a,o){e.creatingProposal=!0,e.DialogaService.createProposal(o,e.article.id,function(a){e.$log.debug("response",a),e.creatingProposal=!1},function(a){e.$log.error(a),e.creatingProposal=!1})})},e.prototype.showProposalsList=function(){var e=this;e.findAndShow("#section-proposal-list")},e.prototype.hideProposalsList=function(){var e=this;e.findAndHide("#section-proposal-list")},e.prototype.showProposalForm=function(){var e=this;e.findAndShow("#section-proposal-form")},e.prototype.hideProposalForm=function(){var e=this;e.findAndHide("#section-proposal-form")},e.prototype.findAndShow=function(e){var a=this,o=a.$element.find(e);o.slideDown(),angular.element("body").animate({scrollTop:o.offset().top},"fast")},e.prototype.findAndHide=function(e){var a=this;a.$element.find(e).slideUp()},e.prototype.sendProposal=function(){var e=this;e.$log.warn('Not implemented yet: "sendProposal"')}}(),function(){"use strict";function e(e,a,o,s){var r=this;r.DialogaService=e,r.$log=s,r.init(),r.loadData(),r.$log.debug("SitemapPageController")}function a(e){for(var a={},o=e.length,s=0;o>s;s++){var r=e[s],t=r.categories[0],i=a[t.slug]||{};angular.isArray(i.programs)||(i=t,i.programs=[],a[i.slug]=i),i.programs.push(r)}return a}angular.module("dialoga").controller("SitemapPageController",e),e.$inject=["DialogaService","$state","$sce","$log"],e.prototype.init=function(){var e=this;e.programsPerThemes=null},e.prototype.loadData=function(){var e=this;e.DialogaService.getPrograms(function(o){e.programsPerThemes=a(o)},function(a){e.error=a,e.$log.error(a)})}}(),function(){"use strict";function e(e,a,o,s,r,t){var i=this;i.DialogaService=e,i.$scope=a,i.$location=o,i.$filter=s,i.$sce=r,i.$log=t,i.init(),i.loadData(),i.attachListeners(),i.$log.debug("InicioPageController")}function a(e,a){if(e=e||[],!a)return e;for(var o=[],s=0;s0)){var p=l.pop();a.push(p),c=!0}c||(n=!1)}return a}function s(){var e=document.createElement("script");e.src="https://www.youtube.com/iframe_api";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(e,a)}function r(){var e=angular.element.find(".js-iframe iframe"),a=window.YT.Player;new a(e[0],{events:{onReady:t}})}function t(e){e.target.playVideo(),i(1e3)}function i(e){var a=angular.element.find(".video-background");angular.element(a).fadeOut(e||100)}angular.module("dialoga").controller("InicioPageController",e),e.$inject=["DialogaService","$scope","$location","$filter","$sce","$log"],e.prototype.init=function(){var e=this;e.article=null,e.events=null,e.featuredEvent=!0,e.themes=null,e.selectedTheme=null,e.programs=null,e.filtredPrograms=null,e.query=null,e.search=e.$location.search(),e.search.tema&&(e._filtredByThemeSlug=e.search.tema),e.search.filtro&&(e._filtredByQuery=e.search.filtro),(e.search.tema||e.search.filtro)&&(e.loadingFilter=!0),e.loading=null,e.error=null},e.prototype.loadData=function(){function e(){a.loadingThemes=!0,a.DialogaService.getThemes(function(e){a.themes=e,a.loadingThemes=!1,a.filter()},function(e){a.$log.error("Error on getThemes.",e),a.loadingThemes=!1,a.errorThemes=e}),a.loadingPrograms=!0,a.DialogaService.getProgramsRandom({},function(e){a.programs=a.article.children,a.filtredPrograms=e.articles,a.loadingPrograms=!1,a.filter()},function(e){a.$log.error("Error on getPrograms.",e),a.loadingPrograms=!1,a.errorPrograms=e})}var a=this;a.loading=!0,a.DialogaService.getHome(function(o){a.article=o.article,a.article.videoIsLoaded&&i(2e3),e(),a.loading=!1},function(e){a.$log.error("Error on getHome.",e),a.loading=!1,a.error=e}),a.loadingEvents=!0,a.DialogaService.getEvents({},function(e){a.events=e,a.loadingEvents=!1},function(e){a.$log.error("Error on getEvents.",e),a.loadingEvents=!1,a.eventsError=e})},e.prototype.attachListeners=function(){var e=this;e.$scope.$on("change-selectedCategory",function(a,o){e.selectedTheme=o}),e.$scope.$watch("pageInicio.selectedTheme",function(a){e.search.tema=a?a.slug:null,e.$location.search("tema",e.search.tema),e.loadingFilter||(e.filtredPrograms=e.getFiltredPrograms())}),e.$scope.$watch("pageInicio.query",function(a){e.search.filtro=a?a:null,e.$location.search("filtro",e.search.filtro),e.loadingFilter||(e.filtredPrograms=e.getFiltredPrograms())})},e.prototype.showVideo=function(){var e=this;return e.article.videoIsLoaded?(i(0),void e.$log.debug("The content already cached. Show-it!")):(s(),window.onYouTubeIframeAPIReady=window.onYouTubeIframeAPIReady||r,window.onYouTubePlayerReady=window.onYouTubePlayerReady||t,void(e.article.videoIsLoaded=!0))},e.prototype.filter=function(){var e=this;if(e.loadingThemes||e.loadingPrograms)return void e.$log.info("No programs or themes loaded yet. Abort.");if(e._filtredByThemeSlug){var a=e._filtredByThemeSlug;e.DialogaService.getThemeBySlug(a,function(a){e.selectedTheme=a},function(a){e.$log.error('Error when try to "getThemeBySlug"',a)})}e._filtredByQuery&&(e.query=e._filtredByQuery),(e._filtredByThemeSlug||e._filtredByQuery)&&(e.filtredPrograms=e.getFiltredPrograms(),e.loadingFilter=!1)},e.prototype.showAllPrograms=function(e){var a=this;e.stopPropagation(),a.resetFilterValues(),a.filtredPrograms=a.getFiltredPrograms()},e.prototype.resetFilterValues=function(){var e=this;e.query=null,e.selectedTheme=null},e.prototype.getFiltredPrograms=function(){var e=this;if(!e.programs)return e.$log.warn("No programs loaded yet. Abort."),null;var s=e.programs,r=s,t=e.query,i=e.selectedTheme,l=e.$filter("filter");return i&&(r=a(r,i)),t&&(r=l(r,t,!1)),t||i||(r=o(r)),r}}(),function(){"use strict";function e(e,a){a.debug("DuvidasPageController");var o=this;o.DialogaService=e,o.$log=a,o.init()}angular.module("dialoga").controller("DuvidasPageController",e),e.$inject=["DialogaService","$log"],e.prototype.init=function(){var e=this;e.questions=null,e.loading=!0,e.error=!1,e.loadData()},e.prototype.loadData=function(){var e=this;e.DialogaService.getQuestions(function(a){e.questions=a},function(a){e.error=a,e.$log.error(a)})}}(),function(){"use strict";function e(e,a,o,s,r,t,i,l,n,c){var p=this;p.$scope=e,p.$rootScope=a,p.$location=o,p.$state=s,p.$timeout=r,p.AUTH_EVENTS=t,p.AuthService=i,p.DialogaService=l,p.Session=n,p.$log=c,p.init(),p.loadData(),p.$log.debug("AuthPageController")}angular.module("dialoga").controller("AuthPageController",e),e.$inject=["$scope","$rootScope","$location","$state","$timeout","AUTH_EVENTS","AuthService","DialogaService","Session","$log"],e.prototype.init=function(){var e=this;e.signin={},e.singup={},e.terms=null,e.loadingTerms=null,e.delay=3,e.countdown=0,e.search=e.$location.search();var a=e.search.redirect_uri||"";a&&a.length>0&&(e.params=JSON.parse('{"'+decodeURI(a).replace(/"/g,'\\"').replace(/&/g,'","').replace(/=/g,'":"')+'"}'),e.hasRedirect=!0),e.currentUser=e.Session.getCurrentUser(),e.$scope.$on(e.AUTH_EVENTS.loginSuccess,function(){e.currentUser=e.Session.getCurrentUser()}),e.$scope.$on(e.AUTH_EVENTS.logoutSuccess,function(){e.currentUser=e.Session.getCurrentUser()})},e.prototype.loadData=function(){var e=this;e.loadingTerms=!0,e.DialogaService.getTerms(function(a){e.loadingTerms=!1,e.terms=a.article},function(a){e.loadingTerms=!1,e.error=a})},e.prototype.onClickLogout=function(){var e=this;e.AuthService.logout()},e.prototype.submitSigup=function(e){var a=this;a.AuthService.register(e).then(function(e){a.$log.debug("register success.response",e),a.successMessage="

Cadastro efetuado com sucesso.

Verifique seu email para confirmar o cadastro.

",a.redirectBack()},function(e){a.$log.debug("register error.response",e)})},e.prototype.submitSignin=function(e){var a=this;a.AuthService.login(e).then(function(e){a.$log.debug("user",e),a.successMessage="Login efetuado com sucesso!",a.redirectBack()},function(){})},e.prototype.redirectBack=function(){var e=this;return e.hasRedirect?(e.countdown=e.delay,function a(){e.$timeout(function(){e.countdown--,e.$log.debug("vm.countdown",e.countdown),e.countdown>0&&a()},1e3)}(),void e.$timeout(function(){var a=e.params.state;switch(a){case"inicio":e.$state.go(a,{event_id:e.params.event_id,task:e.params.task});break;case"programa":e.$state.go(a,{slug:e.params.slug,task:e.params.task});break;default:e.$log.debug("State not handled yet:",a)}},1e3*e.delay)):void e.$log.warn("No redirect params defined.")}}(),function(){"use strict";function e(e,a,o,s){var r=this;r.DialogaService=e,r.$state=a,r.$sce=o,r.$log=s,r.init(),r.loadData(),r.$log.debug("ArticlePageController")}angular.module("dialoga").controller("ArticlePageController",e),e.$inject=["DialogaService","$state","$sce","$log"],e.prototype.init=function(){var e=this;e.page=e.$state.current.name,e.article=null,e.loading=!0,e.$log.debug("vm.page",e.page)},e.prototype.loadData=function(){function e(e){o.loading=!1,o.article=e.article}function a(e){o.loading=!1,o.error=e}var o=this;switch(o.page){case"sobre":o.DialogaService.getAbout(e,a);break;case"termos-de-uso":o.DialogaService.getTerms(e,a);break;default:o.$log.warn("Page not handled:",o.page)}}}(),function(){"use strict";function e(){function e(e){e.debug("validationMessagesController");var a=this;a.$log=e,a.init()}e.$inject=["$log"],e.prototype.init=function(){var e=this;e.required||(e.required="Ops, o campo é obrigatório."),e.minlength||(e.minlength="O campo deve ser maior."),e.maxlength||(e.maxlength="O campo deve ser menor"),e.email||(e.email="O endereço de e-mail deve ser válido")};var a={restrict:"E",templateUrl:"app/components/validation-messages/validation-messages.html",scope:{field:"=",required:"=",minlength:"=",maxlength:"=",email:"="},controller:e,controllerAs:"vm",bindToController:!0};return a}angular.module("dialoga").directive("validationMessages",e)}(),function(){"use strict";function e(e,a,o){function s(a,o){return e.get(a,o).then(t)["catch"](i)}function r(a,o){return e.post(a,o).then(t)["catch"](i)}function t(e){return o.debug("[SUCCESS]",e),e.data}function i(e){return o.debug("[ERROR]",e),o.error("XHR Failed on Service.\n"+angular.toJson(e.data,!0)),a.reject(angular.isObject(e.data)&&e.data.message?e.data.message:"An unknown error occurred.")}o.debug("UtilService");var l={get:s,post:r,handleSuccess:t,handleError:i};return l}angular.module("dialoga").factory("UtilService",e),e.$inject=["$http","$q","$log"]}(),function(){"use strict";function e(){function e(e,a,o,s,r){r.debug("TopicListController");var t=this;t.$scope=e,t.$element=a,t.$location=o,t.$filter=s,t.$log=r,t.defaultLimit=6,t.init()}e.$inject=["$scope","$element","$location","$filter","$log"],e.prototype.init=function(){var e=this;if(!e.article)return void e.$log.warn("no article to display. Tip: use a ng-if before use this directive");if(e.categories=e.article.categories,e.programs=e.article.children,e.orderCriteries=[{label:"Título",name:"titulo"},{label:"Tema",name:"tema"},{label:"Aleatório",name:"aleatorio"}],e.filtredProgramList=e.getFiltredPrograms(),e.search=e.$location.search(),e.query=e.search&&e.search.filtro?e.search.filtro:null,e.limitTo=e.search&&e.search.limite?parseInt(e.search.limite,10):e.defaultLimit,e.categoryFilter=e.search&&e.search.tema?e.getCategoryBySlug(e.search.tema):null,e.orderCriteria=e.search&&e.search.ordem?{name:e.search.ordem}:null,e.reverse=e.search&&e.search.reverso?!0:!1,!angular.equals({},e.search)){var a=e.$element;angular.element("body").animate({scrollTop:a.offset().top},"slow")}e.$scope.$watch("vm.query",function(a){e.search.filtro=a?a:null,e.$location.search("filtro",e.search.filtro),e.limitTo=e.search.filtro?e.programs.length:e.defaultLimit,e.filtredProgramList=e.getFiltredPrograms()}),e.$scope.$watch("vm.limitTo",function(a){e.search.limite=a&&a!==e.defaultLimit?a:null,e.$location.search("limite",e.search.limite),e.filtredProgramList=e.getFiltredPrograms()}),e.$scope.$watch("vm.categoryFilter",function(a){e.search.tema=a?a.slug:null,e.$location.search("tema",e.search.tema),e.search.tema&&(e.limitTo=e.programs.length),e.filtredProgramList=e.getFiltredPrograms()}),e.$scope.$watch("vm.orderCriteria",function(a){e.search.ordem=a&&a.name?a.name:null,e.$location.search("ordem",e.search.ordem),e.filtredProgramList=e.getFiltredPrograms()}),e.$scope.$watch("vm.reverse",function(a){e.search.reverso=a?a:null,e.$location.search("reverso",e.search.reverso),e.filtredProgramList=e.getFiltredPrograms()})},e.prototype.resetFilterValues=function(){var e=this;e.query=null,e.limitTo=e.defaultLimit,e.categoryFilter=null,e.orderCriteria=null},e.prototype.getIconClasses=function(e){var a=this;return a.$log.debug("[TODO] getIconClasses of category:",e),"glyphicon glyphicon-exclamation-sign"},e.prototype.getCategoryBySlug=function(e){var a=this,o=null;return angular.forEach(a.categories,function(a){a.slug===e&&(o=a)}),o},e.prototype.filterByCategory=function(e,a){var o=this;a.stopPropagation(),o.categoryFilter=e!==o.categoryFilter?e:null},e.prototype.showAll=function(e){var a=this;e.stopPropagation(),a.resetFilterValues(),a.limitTo=a.programs.length},e.prototype.getFiltredPrograms=function(){var e=this,o=e.programs,s=o,r=e.query,t=e.categoryFilter,i=e.orderCriteria?e.orderCriteria:{name:"aleatorio"},l=e.$filter("filter"),n=e.$filter("orderBy"),c=e.$filter("limitTo"),p=e.limitTo?e.limitTo:4;switch(t&&(s=a(s,t)),r&&(s=l(s,r,!1)),i.name){case"titulo":s=n(s,"title",e.reverse);break;case"tema":s=n(s,"categories[0].name",e.reverse);break;case"more_participants":e.$log.info("Criteria not handled yet: ",i);break;case"aleatorio":s=e.filterShuffle(s),e.reverse&&(s=s.slice().reverse());break;default:e.$log.warn("Criteria not matched: ",i)}return s=c(s,p)},e.prototype.filterShuffle=function(e){for(var a=[],s={},r=0;r0)){var d=n.pop();a.push(d),p=!0}p||(c=!1)}return a};var s={restrict:"E",templateUrl:"app/components/programas/programas.html",scope:{article:"="},controller:e,controllerAs:"vm",bindToController:!0};return s}function a(e,a){if(e=e||[],!a)return e;for(var o=[],s=0;sÉ calculada pelo saldo de interações das propostas (curtidas - não curtidas) dividido pela diferença de exibições entre elas.

O objetivo dessa correção é compensar o saldo de interações e a diferença de exibições das propostas que não tiveram muitas oportunidades de visualização ou das propostas que tiveram mais oportunidades de visualização que a média.

Com essa correção, é possível comparar propostas que entraram em diferentes momentos, durante todo o período da consulta.

"})}e.$inject=["ArticleService","$state","$scope","$element","$timeout","$log"],e.prototype.init=function(){var e=this;if(!e.proposals)throw{name:"NotDefined",message:'The attribute "proposals" is undefined.'};e.per_page||(e.per_page=5),e.initPorposalList()},e.prototype.initPorposalList=function(){var e=this;e.currentPageIndex=0,e.proposalsPerPage=e.getProposalsPerPage(0),e.proposalsLength=e.proposals.length,e.pages=e.proposalsLength%e.per_page===0?e.proposalsLength/e.per_page:e.proposalsLength/e.per_page+1,e.arraypages=new Array(Math.floor(e.pages))},e.prototype.loadData=function(){var e=this;e.$timeout(function(){a.call(e)},1e3)},e.prototype.attachListeners=function(){var e=this;e.$scope.$watch("vm.proposals",function(){e.initPorposalList()})},e.prototype.getProposalsPerPage=function(e){var a=this,o=e*a.per_page,s=o+a.per_page;return a.proposals.slice(o,s)},e.prototype.showPage=function(e){var a=this;0>e&&(e=0),e>a.arraypages.length-1&&(e=a.arraypages.length-1),a.proposalsPerPage=a.getProposalsPerPage(e),a.currentPageIndex=e},e.prototype.showContent=function(e){var a=this;a.$state.go("programa",{slug:e.parent.slug,proposal_id:e.id},{location:!0,reload:!0})};var o={restrict:"E",templateUrl:"app/components/proposal-list/proposal-list.html",scope:{proposals:"=",per_page:"="},controller:e,controllerAs:"vm",bindToController:!0};return o}angular.module("dialoga").directive("proposalList",e)}(),function(){"use strict";function e(){function e(e,a,o,s,r,t){t.debug("ProposalGridController");var i=this;i.$scope=e,i.$rootScope=a,i.$element=o,i.$location=s,i.$filter=r,i.$log=t,i.init(),i.attachListeners()}e.$inject=["$scope","$rootScope","$element","$location","$filter","$log"],e.prototype.init=function(){},e.prototype.attachListeners=function(){};var a={restrict:"E",templateUrl:"app/components/proposal-grid/proposal-grid.html",scope:{proposals:"="},controller:e,controllerAs:"vm",bindToController:!0};return a}angular.module("dialoga").directive("proposalGrid",e)}(),function(){"use strict";function e(){function e(e,a,o,s){s.debug("ProposalCarouselController");var r=this;r.$scope=e,r.$element=a,r.$timeout=o,r.$log=s,r.init()}e.$inject=["$scope","$element","$timeout","$log"],e.prototype.init=function(){var e=this;if(!e.proposals)throw{name:"NotDefined",message:'The attribute "proposals" is undefined.'};e.activeIndex=0,e.loading=!1,e.proposalsLength=e.proposals.length},e.prototype.swipeLeft=function(){var e=this;e.activeIndex=e.activeIndex0?--e.activeIndex:e.proposalsLength-1},e.prototype.switchProposal=function(e){var a=this;e>=0&&e=0;s--){var r=k.themes[s];if(r&&r.slug&&r.slug===e){o=r;break}}a(o)}k.themes?s(k.themes):p(s,o)}function g(e,a){k.programs?e(k.programs):l(function(){if(!k.hasOwnProperty("programs"))throw{name:"NotFound",message:'"programs" is not defined. "article.children" was handled?'};e(k.programs)},a)}function u(e,a,o){function s(){var o=k.programs.filter(function(a){return angular.equals(a.slug,e)?!0:!1});a(o[0])}k.programs?s():g(s,o)}function m(e,a,s){if(k.programsRandom)a(k.programsRandom);else{var t=!!k.programs,i=T.serviceDialoga+"random_topics/"+o.articleId.home,l=null;l=t?["id","title","slug"]:[];var n=angular.extend({"fields[]":l},e);r.get(i,{params:n}).then(function(e){x(t,e,a)})["catch"](function(e){s(e)})}}function v(e,a,r){var t=angular.extend({},e);s.getEvents(o.communityId,t,a,r)}function h(e){if(k.questions)e(k.questions);else{var a=[];k.questions=a,e(k.questions)}}function f(e,a,o){s.searchTopics({query:e},a,o)}function b(e,a,o){s.searchProposals({query:e},a,o)}function y(e){var o=e.article["abstract"];o=A(o),o=C(o),e.article["abstract"]=o,e.article.abstractTrusted=a.trustAsHtml(o)}function P(e){e.article.slug||(e.article.slug=t.slugify(e.article.title));for(var a=e.article.children.length-1;a>=0;a--){var o=e.article.children[a];o.slug||(o.slug=t.slugify(o.title))}}function $(e){k.hasOwnProperty("themes")||(k.themes=e.article.categories),S(e)}function w(e){k.hasOwnProperty("programs")||(k.programs=e.article.children,k.programs_count=e.article.children_count)}function S(e){e.article.categories}function x(e,a,o){if(e){for(var s=[],r=a.articles,t=k.programs.length-1;t>=0;t--)for(var i=k.programs[t],l=r.length-1;l>=0;l--){ +var n=r[l];n.id===i.id&&s.push(i)}a.articles=s}o(a)}function A(e){var a='