From b909842c4cffdf30e032766ee624357f62c94031 Mon Sep 17 00:00:00 2001 From: Rafael Diego Gomes Date: Wed, 6 Apr 2016 17:49:34 -0300 Subject: [PATCH] Update dist --- dist/index.html | 2 +- dist/scripts/app-86fda8de69.js | 7 ------- dist/scripts/app-a3182ffea6.js | 7 +++++++ dist/scripts/vendor-55f30cf492.js | 4 ++-- dist/styles/app-27f43b34cf.css | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) delete mode 100644 dist/scripts/app-86fda8de69.js create mode 100644 dist/scripts/app-a3182ffea6.js diff --git a/dist/index.html b/dist/index.html index 9844ee3..2477ac2 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1,3 +1,3 @@ Dialoga Brasil
Seu navegador está desatualizado!

Atualize o seu navegador para acessar o Dialoga Brasil corretamente.Atualizar agora

×

\ No newline at end of file +
Seu navegador está desatualizado!

Atualize o seu navegador para acessar o Dialoga Brasil corretamente.Atualizar agora

×

\ No newline at end of file diff --git a/dist/scripts/app-86fda8de69.js b/dist/scripts/app-86fda8de69.js deleted file mode 100644 index 67b707a..0000000 --- a/dist/scripts/app-86fda8de69.js +++ /dev/null @@ -1,7 +0,0 @@ -!function(){"use strict";angular.module("dialoga",["ngAnimate","ngCookies","ngTouch","ngSanitize","ui.router","ngStorage","720kb.socialshare","slugifier","ncy-angular-breadcrumb","ngMessages","vcRecaptcha"])}(),function(){"use strict";function e(e,a,o,s,r,t){var i=this;i.DialogaService=e,i.$scope=a,i.$rootScope=o,i.$location=s,i.$filter=r,i.$log=t,i.init(),i.loadData(),i.attachListeners(),i.$rootScope.focusMainContent(),t.debug("RespostasPageController")}e.$inject=["DialogaService","$scope","$rootScope","$location","$filter","$log"],angular.module("dialoga").controller("RespostasPageController",e),e.prototype.init=function(){var e=this;e.page=1,e.per_page=10,e.themes=null,e.selectedTheme=null,e.filtredProposals=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.loadingThemes=!0,e.DialogaService.getThemes(function(a){for(var o=[],s=a.length-1;s>=0;s--){var r=a[s];r.archived&&o.push(r)}e.themes=o,e.loadingThemes=!1,e.loading=!1,e.filter()},function(a){e.error=a,e.$log.error(a),e.loadingThemes=!1,e.loading=!1})},e.prototype.attachListeners=function(){var e=this;e.$scope.$on("change-selectedCategory",function(a,o){e.selectedTheme=o}),e.$scope.$watch("pageRespostas.selectedTheme",function(a){e.search.tema=a?a.slug:null,e.$location.search("tema",e.search.tema),e.loadingFilter||e.filterProposals()}),e.$scope.$watch("pageRespostas.query",function(a){e.search.filtro=a?a:null,e.$location.search("filtro",e.search.filtro),e.loadingFilter||e.filterProposals()})},e.prototype.resetFilterValues=function(){var e=this;e.query=null,e.selectedTheme=null},e.prototype.changePage=function(e){var a=this;a.page=e,a.filterProposals(e)},e.prototype.filter=function(){var e=this;if(e.loadingThemes||e.loadingProposals)return void e.$log.info("No proposals 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.filterProposals(),e.loadingFilter=!1)},e.prototype.filterProposals=function(e,a){var o=this;if(o.loadingProposals)return void o.$log.debug("Content is not loaded yet.");var s=e||o.page,r=a||o.per_page,t=o.query,i={page:s,per_page:r,has_children:!0,"fields[]":["id","body","abstract","hits","ranking_position","votes_against","votes_count","votes_for","parent","categories","slug","url","image","title","archived"]};o.selectedTheme&&(i.category_ids=o.selectedTheme.id),t&&(i.query=t),o.loadingProposals=!0,o.DialogaService.searchProposals(i,function(e){o.total_proposals=parseInt(e._obj.headers("total")),o.filtredProposals=e.articles,o.loadingProposals=!1},function(e){o.error=e,o.$log.error(e),o.loadingProposals=!1})},e.prototype.submitSearch=function(){var e=this,a=angular.element("#search-result");a&&a.length>0?(angular.element("html,body").animate({scrollTop:a.offset().top},"fast"),e.filterProposals()):e.$log.warn("#search-result element not found.")}}(),function(){"use strict";function e(e,a,o,s,r,t){var i=this;i.DialogaService=e,i.$scope=a,i.$rootScope=o,i.$location=s,i.$filter=r,i.$log=t,i.init(),i.loadData(),i.attachListeners(),i.$rootScope.focusMainContent(),t.debug("RankingPageController")}e.$inject=["DialogaService","$scope","$rootScope","$location","$filter","$log"],angular.module("dialoga").controller("RankingPageController",e),e.prototype.init=function(){var e=this;e.page=1,e.per_page=10,e.themes=null,e.selectedTheme=null,e.filtredPrograms=null,e.selectedProgram=null,e.filtredProposals=null,e.query=null,e.search=e.$location.search(),e.slug=e.$location.$$path,e.search.tema&&(e._filtredByThemeSlug=e.search.tema),e.search.programa&&(e._filtredByProgramSlug=e.search.programa),(e.search.tema||e.search.programa)&&(e.loadingFilter=!0),e.loading=null,e.error=null},e.prototype.loadData=function(){var e=this;e.loading=!0,e.loadingThemes=!0,e.DialogaService.getThemes(function(a){e.themes=a,e.loadingThemes=!1;var o=null;if(e.search.tema||e._filtredByThemeSlug){var s=e.themes.filter(function(a){return a.slug===e.search.tema||a.slug===e._filtredByThemeSlug});s&&s.length>0&&(o=s[0],e.selectedTheme=o)}o||(e.selectedTheme=e.themes[Math.floor(Math.random()*e.themes.length)]);var r=e.selectedTheme.id;e.loadPrograms(r,function(){e.loading=!1,e.loadingFilter=!1})},function(a){e.error=a,e.$log.error(a),e.loadingThemes=!1,e.loading=!1})},e.prototype.loadPrograms=function(e,a){var o=this;o.DialogaService.getProgramsByThemeId(e,function(e){o.filtredPrograms=e;var s=null;if(o.search.programa||o._filtredByProgramSlug){var r=o.filtredPrograms.filter(function(e){return e.slug===o.search.programa||e.slug===o._filtredByProgramSlug});r&&r.length>0&&(s=r[0],o.selectedProgram=s)}s||(o.selectedProgram=o.filtredPrograms[Math.floor(Math.random()*o.filtredPrograms.length)]),a&&a()},function(e){o.$log.error(e),a&&a()})},e.prototype.attachListeners=function(){var e=this;e.$scope.$on("change-selectedCategory",function(a,o){e.selectedTheme=o}),e.$scope.$watch("pageRanking.selectedTheme",function(a){e.search.tema=a?a.slug:null,e.$location.search("tema",e.search.tema),!e.loadingFilter&&e.selectedTheme&&e.selectedTheme.id&&e.loadPrograms(e.selectedTheme.id,function(){e.filterProposals()})}),e.$scope.$on("change-selectedTopic",function(a,o){e.selectedProgram=o}),e.$scope.$watch("pageRanking.selectedProgram",function(a){e.search.programa=a?a.slug:null,e.$location.search("programa",e.search.programa),e.loadingFilter||e.filterProposals()}),e.$scope.$watch("pageRanking.query",function(a){e.search.filtro=a?a:null,e.$location.search("filtro",e.search.filtro),e.loadingFilter||e.filterProposals()})},e.prototype.resetFilterValues=function(){var e=this;e.query=null,e.selectedTheme=null},e.prototype.changePage=function(e){var a=this;a.page=e,a.filterProposals(e)},e.prototype.filterProposals=function(e,a){var o=this;if(o.loadingProposals)return void o.$log.debug("Content is not loaded yet.");var s=e||o.page,r=a||o.per_page,t=o.query,i=o.selectedProgram,n={page:s,per_page:r};i&&(n.parent_id=i.id),t&&(n.query=t),o.loadingProposals=!0,o.DialogaService.searchProposals(n,function(e){o.total_proposals=parseInt(e._obj.headers("total")),o.filtredProposals=e.articles,o.loadingProposals=!1},function(e){o.error=e,o.$log.error(e),o.loadingProposals=!1})}}(),function(){"use strict";function e(e,a,o,s,r,t){var i=this;i.DialogaService=e,i.$scope=a,i.$rootScope=o,i.$location=s,i.$filter=r,i.$log=t,i.init(),i.loadData(),i.attachListeners(),i.$rootScope.focusMainContent(),t.debug("PropostasPageController")}e.$inject=["DialogaService","$scope","$rootScope","$location","$filter","$log"],angular.module("dialoga").controller("PropostasPageController",e),e.prototype.init=function(){var e=this;e.page=1,e.per_page=10,e.themes=null,e.selectedTheme=null,e.filtredProposals=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.loadingThemes=!0,e.DialogaService.getThemes(function(a){e.themes=a,e.loadingThemes=!1,e.loading=!1,e.filter()},function(a){e.error=a,e.$log.error(a),e.loadingThemes=!1,e.loading=!1})},e.prototype.attachListeners=function(){var e=this;e.$scope.$on("change-selectedCategory",function(a,o){e.selectedTheme=o}),e.$scope.$watch("pagePropostas.selectedTheme",function(a){e.search.tema=a?a.slug:null,e.$location.search("tema",e.search.tema),e.page=1,e.loadingFilter||e.filterProposals()}),e.$scope.$watch("pagePropostas.query",function(a){e.search.filtro=a?a:null,e.$location.search("filtro",e.search.filtro),e.loadingFilter||e.filterProposals()})},e.prototype.resetFilterValues=function(){var e=this;e.query=null,e.selectedTheme=null},e.prototype.changePage=function(e){var a=this;a.page=e,a.filterProposals(e)},e.prototype.filter=function(){var e=this;if(e.loadingThemes||e.loadingProposals)return void e.$log.info("No proposals 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.filterProposals(),e.loadingFilter=!1)},e.prototype.filterProposals=function(e,a){var o=this;if(o.loadingProposals)return void o.$log.debug("Content is not loaded yet.");var s=e||o.page,r=a||o.per_page,t=o.query,i={page:s,per_page:r};o.selectedTheme&&(i.category_ids=o.selectedTheme.id),t&&(i.query=t),o.loadingProposals=!0,o.DialogaService.searchProposals(i,function(e){o.total_proposals=parseInt(e._obj.headers("total")),o.filtredProposals=e.articles,o.loadingProposals=!1},function(e){o.error=e,o.$log.error(e),o.loadingProposals=!1})},e.prototype.submitSearch=function(){var e=this,a=angular.element("#search-result");a&&a.length>0?(angular.element("html,body").animate({scrollTop:a.offset().top},"fast"),e.filterProposals()):e.$log.warn("#search-result element not found.")}}(),function(){"use strict";function e(e,a,o,s,r,t){var i=this;i.DialogaService=e,i.$scope=a,i.$rootScope=o,i.$location=s,i.$filter=r,i.$log=t,i.init(),i.loadData(),i.attachListeners(),i.$rootScope.focusMainContent(),i.$log.debug("ProgramasPageController")}e.$inject=["DialogaService","$scope","$rootScope","$location","$filter","$log"],angular.module("dialoga").controller("ProgramasPageController",e),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.submitSearch=function(){var e=this;e.loadingFilter=!0;var a=angular.element("#search-result");a&&a.length>0?(angular.element("html,body").animate({scrollTop:a.offset().top},"fast"),e.filtredPrograms=e.getFiltredPrograms()):e.$log.warn("#search-result element not found.")},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.info("No programs loaded yet. Abort."),null;var a=e.programs,o=a,s=e.query,r=e.selectedTheme,t=e.$filter("filter");return r&&(o=e._filterByCategory(o,r)),s&&(o=t(o,s,!1)),s||r||!e._showAllFlag||(o=e._balanceByCategory(o)),o},e.prototype._filterByCategory=function(e,a){var o=this;if(e=e||[],!a)return e;for(var s=[],r=0;r0)){var d=l.pop();o.push(d),p=!0}p||(c=!1)}return o}}(),function(){"use strict";function e(e,a,o,s,r,t,i,n,l,c,p){var d=this;d.DialogaService=e,d.PATH=a,d.VOTE_OPTIONS=o,d.PROPOSAL_STATUS=s,d.$state=r,d.$location=t,d.$scope=i,d.$rootScope=n,d.$element=l,d.$sce=c,d.$log=p,d.init(),d.loadData(),d.attachListeners(),d.$rootScope.focusMainContent(),d.$log.debug("ProgramaPageController")}e.$inject=["DialogaService","PATH","VOTE_OPTIONS","PROPOSAL_STATUS","$state","$location","$scope","$rootScope","$element","$sce","$log"],angular.module("dialoga").controller("ProgramaPageController",e),e.prototype.init=function(){var e=this;e.article=null,e.category=null,e.loading=null,e.loadingTopProposals=null,e.loadingProposalBox=null,e.sendProposalRedirectURI=null,e.showDetailAboutArchived=!1,e.search=e.$location.search(),e.error=!1},e.prototype.loadData=function(){var e=this;e.loading=!0,e.proposalStatus=null;var a=e.$state.params.slug;return a?void e.DialogaService.getProgramBySlug(a,function(o){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.article.image&&(e.banner={src:e.PATH.image+e.article.image.url,alt:"Imagem de destaque do conteúdo"}),e.article.body&&!e.article.bodyTrusted&&(e.article.bodyTrusted=e.$sce.trustAsHtml(e.article.body)),e.loadingTopProposals=!0,e.DialogaService.getProposalsByTopicIdRanked(e.article.id,{limit:5},function(a){e.total_proposals=parseInt(e.article.children_count),e.proposals=a.articles?a.articles:a.proposals,e.proposalsTopFive=e.proposals.slice(0,5),e.proposalsTopRated=e.proposals.slice(0,3),e.loadingTopProposals=!1;for(var o=e.proposalsTopRated.length-1;o>=0;o--){var s=e.proposalsTopRated[o];s.body=s&&s.body&&s.body.length>0?String(s.body).replace(/<[^>]+>/gm,""):e.banner.src}if(e.article.archived&&e.search.proposal_id){for(var r=!1,t=parseInt(e.search.proposal_id),i=e.proposalsTopRated.length-1;i>=0;i--){var n=e.proposalsTopRated[i];if(n.id===t){r=!0;break}}if(!r)return void e.$log.debug("Proposal is not one of top 3.");e.$rootScope.findElAsyncAndFocus(".sub-section-"+t)}},function(a){e.$log.error(a),e.loadingTopProposals=!1}),e.article.archived||(e.search.proposal_id?e.loadProposalById(e.search.proposal_id):e.loadRandomProposal()),e.loading=!1},function(a){e.$log.error(a),e.error=a,e.loading=!1}):(e.$log.warn("slug not defined."),e.$log.info("Rollback to home page."),void e.$state.go("inicio",{},{location:"replace"}))},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.proposalStatus=e.PROPOSAL_STATUS.SENDING;var s=e.article.categories[0].id;e.DialogaService.createProposal(o,e.article.id,s,function(a){e.$log.debug("response",a),e.proposalStatus=e.PROPOSAL_STATUS.SUCCESS},function(a){e.$log.error(a),e.error=a,400===e.error.code&&(angular.equals(a.message,"Resumo é muito longo (máximo: 200 caracteres)")?e.error.message="Proposta muito longa (máximo: 200 caracteres)":(e.error.message="",e.error.message+="Não foi possível enviar a proposta.
",e.error.message+="Este problema já foi registrado em nossos servidores.
",e.error.message+="Por favor, tente novamente mais tarde.")),e.proposalStatus=e.PROPOSAL_STATUS.ERROR})})},e.prototype.loadProposalById=function(e){var a=this;a.loadingProposalBox=!0,a.DialogaService.getProposalById(e,{limit:"1"},a._handleSuccessOnGetProposal.bind(a),a._handleErrorOnGetProposal.bind(a))},e.prototype.loadRandomProposal=function(){var e=this;e.loadingProposalBox=!0,e.DialogaService.getProposalsByTopicId(e.article.id,{order:"random()",limit:"1",t:Date.now()},e._handleSuccessOnGetProposal.bind(e),e._handleErrorOnGetProposal.bind(e))},e.prototype._handleSuccessOnGetProposal=function(e){var a=this;if(e&&e.articles){var o=e.articles.length;a.randomProposal=e.articles[Math.floor(Math.random()*o)],a.loadingProposalBox=!1,a.$scope.$broadcast("proposal-box:proposal-loaded",{success:!0})}a.search.proposal_id&&a.$rootScope.findElAsyncAndFocus(".focused-proposal")},e.prototype._handleErrorOnGetProposal=function(e){var a=this;a.$log.error(e),a.$scope.$broadcast("proposal-box:proposal-loaded",{error:!0})},e.prototype.voteSkip=function(){var e=this;e.loadRandomProposal()},e.prototype.vote=function(e,a){var o=this;return o.article.archived?void o.$log.info("Article archived. Abort."):a===o.VOTE_OPTIONS.SKIP?void o.voteSkip():void o.DialogaService.voteProposal(e,{value:a}).then(function(e){o.$log.debug("voteProposal response",e),e.success=!0,o.$scope.$broadcast("proposal-box:vote-response",e)},function(e){o.$log.debug("voteProposal error",e),e.error=!0,o.$scope.$broadcast("proposal-box:vote-response",e)})["finally"](function(e){o.$log.debug("voteProposal finally",e)})},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;return e.article.archived?void e.$log.info("Article archived. Abort."):void 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("html,body").animate({scrollTop:o.offset().top},"fast")},e.prototype.findAndHide=function(e){var a=this;a.$element.find(e).slideUp()},e.prototype.sendAnotherProposal=function(){var e=this;e.proposalStatus=null},e.prototype.toggleContentVisibility=function(){var e=this,a=angular.element(".section-content");return a&&0!==a.length?void(a.is(":visible")?a.slideUp():(a.slideDown(),angular.element("html,body").animate({scrollTop:a.offset().top},"fast"))):void e.$log.warn('".section-content" not found.')},e.prototype.toggleResponseVisibility=function(e){function a(){var a=angular.element(".gov-response-"+e.id);a.is(":visible")?a.slideUp():a.slideDown(100,function(){angular.element("html,body").animate({scrollTop:a.offset().top},"fast")})}var o=this;return e?void(e.response?a():(e.response={loading:!0,error:!1,content:null},o.DialogaService.getResponseByProposalId(e.proposal_id).then(function(o){e.response.content=o.articles[0].body,a()})["catch"](function(){e.response.error=!1})["finally"](function(){e.response.loading=!1}))):void o.$log.error("Error - proposal is:",e)}}(),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}e.$inject=["DialogaService","$state","$sce","$log"],angular.module("dialoga").controller("SitemapPageController",e),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,i){var n=this;n.DialogaService=e,n.$scope=a,n.$location=o,n.$filter=s,n.$sce=r,n.$timeout=t,n.$log=i,n.init(),n.loadData(),n.attachListeners(),n.$log.debug("InicioPageController")}function a(e){for(var a=[],o={},s=0;s0)){var p=n.pop();a.push(p),c=!0}c||(l=!1)}return a}function o(){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 s(){var e=angular.element.find(".js-iframe iframe"),a=window.YT.Player;new a(e[0],{events:{onReady:r}})}function r(e){e.target.playVideo(),t(1e3)}function t(e){var a=angular.element.find(".video-background");angular.element(a).fadeOut(e||100)}e.$inject=["DialogaService","$scope","$location","$filter","$sce","$timeout","$log"],angular.module("dialoga").controller("InicioPageController",e),e.prototype.init=function(){var e=this;e.article=null,e.events=null,e.featuredEvent=null,e.bannerRespostas=!0,e.themes=null,e.selectedTheme=null,e.programs=null,e.filtredPrograms=null,e.query=null,e.scroll=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.search.scroll&&(e.scroll=e.search.scroll),e.loading=null,e.error=null},e.prototype.loadData=function(){function e(){o.loadingThemes=!0,o.DialogaService.getThemes(function(e){o.themes=e,o.loadingThemes=!1,o.filter()},function(e){o.$log.error("Error on getThemes.",e),o.loadingThemes=!1,o.errorThemes=e}),o.loadingPrograms=!0,o.DialogaService.getProgramsRandom({},function(e){o.programs=o.article.children,o.filtredPrograms=e.articles,o.loadingPrograms=!1,o.filter(),a()},function(e){o.$log.error("Error on getPrograms.",e),o.loadingPrograms=!1,o.errorPrograms=e})}function a(){o._scrollHandler()}var o=this;o.loading=!0,o.DialogaService.getHome(function(a){o.article=a.article,o.article.videoIsLoaded&&t(2e3),e(),o.loading=!1},function(e){o.$log.error("Error on getHome.",e),o.loading=!1,o.error=e}),o.loadingEvents=!0,o.DialogaService.getEvents().then(function(e){o.$log.debug("getEvents.success",e),o.events=e.articles;var a=o.$filter("orderBy");o.featuredEvent=a(o.events,"start_date",!1)[0]},function(e){o.$log.debug("Error on getEvents.",e),o.eventsError=e},function(e){o.$log.debug("{UPDATE}",e)})["finally"](function(e){o.$log.debug("{FINALLY}",e),o.loadingEvents=!1})},e.prototype._scrollHandler=function(){var e=this;if(e.search.scroll){var a=e.search.scroll,o=0;if(angular.isNumber(a))o=parseInt(a);else{var s=angular.element("#"+e.search.scroll);s&&s.length>0?o=s.offset().top:e.$log.warn("element not found:",e.search.scroll)}e.$timeout(function(){angular.element("html,body").animate({scrollTop:o},"fast")},0)}},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?(t(0),void e.$log.debug("The content already cached. Show-it!")):(o(),window.onYouTubeIframeAPIReady=window.onYouTubeIframeAPIReady||s,window.onYouTubePlayerReady=window.onYouTubePlayerReady||r,void(e.article.videoIsLoaded=!0))},e.prototype.showEventVideo=function(){var e=this;t(0),e.featuredEvent.canView=!0,e.featuredEvent.bodyTrusted=e.$sce.trustAsHtml(e.featuredEvent.body)},e.prototype.submitSearch=function(){var e=this;e.loadingFilter=!0;var a=angular.element("#search-result");a&&a.length>0?(angular.element("html,body").animate({scrollTop:a.offset().top},"fast"),e.filtredPrograms=e.getFiltredPrograms()):e.$log.warn("#search-result element not found.")},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.debug("No programs loaded yet. Abort."),null;var o=e.programs,s=o,r=e.query,t=e.selectedTheme,i=e.$filter("filter");return e.loadingFilter=!0,t&&(s=e._filterByCategory(s,t)),r&&(s=i(s,r,!1)),r||t||(s=a(s)),e.loadingFilter=!1,s},e.prototype._filterByCategory=function(e,a){var o=this;if(e=e||[],!a)return e;for(var s=[],r=0;r=500&&e.status<600&&(o.internalError=!0)})["finally"](function(){o.loading=!1})}}(),function(){"use strict";function e(e,a,o,s,r,t,i,n,l,c,p,d,g,u){var v=this;v.$scope=e,v.$rootScope=a,v.$window=o,v.$location=s,v.$state=r,v.$timeout=t,v.$interval=i,v.APP=n,v.AUTH_EVENTS=l,v.AuthService=c,v.DialogaService=p,v.Session=d,v.vcRecaptchaService=g,v.$log=u,v.init(),v.loadData(),v.attachListeners(),v.$rootScope.focusMainContent(),v.$log.debug("AuthPageController")}e.$inject=["$scope","$rootScope","$window","$location","$state","$timeout","$interval","APP","AUTH_EVENTS","AuthService","DialogaService","Session","vcRecaptchaService","$log"],angular.module("dialoga").controller("AuthPageController",e),e.prototype.init=function(){var e=this;e.signin={},e.signup={},e.terms=null,e.loadingTerms=null,e.delay=3,e.countdown=0,e.recaptchaResponse=null,e.recaptchaWidgetId=null,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.clearMessages(),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.attachListeners=function(){var e=this;e.$scope.$on(e.AUTH_EVENTS.registerSuccess,function(a,o){e.$log.debug("[register success] response",o)}),e.$scope.$on(e.AUTH_EVENTS.registerFailed,function(a,o){e.$log.debug("[register error] response",o)}),e.$scope.$on("oauthClientPluginResult",function(a,o){e.$log.debug("response",o);var s=o.data.logged_in,r=o.data.private_token;if(o.data.user&&!o.data.user.private_token&&(o.data.user.private_token=r),s){var t=e.Session.create(o.data);e.$rootScope.currentUser=t,e.$rootScope.$broadcast(e.AUTH_EVENTS.loginSuccess,t)}}),e.setWidgetId=function(a){e.$log.info("Created widget ID:",a),e.recaptchaWidgetId=a},e.setResponse=function(a){e.$log.debug("Response available",a),e.recaptchaResponse=a},e.cbExpiration=function(){e.$log.debug("cbExpiration")}},e.prototype.onClickLogout=function(){var e=this;e.AuthService.logout()},e.prototype.submitSignup=function(e,a){var o=this;a.g_recaptcha_response=o.recaptchaResponse,o.AuthService.register(a).then(function(){o.signupSuccess=!0})["catch"](function(e){if(o.vcRecaptchaService.reload(o.recaptchaWidgetId),o.signupError=!0,o.signupErrorTitle="Erro!",o.signupErrorMessage=e.data.message,e.status>=400&&e.status<500){var a=JSON.parse(e.data.message);a&&a.email&&(o.signupErrorMessage="E-mail já está em uso.")}e.status>=500&&e.status<600&&(o.internalError=!0)})["finally"](function(){})},e.prototype.submitSignin=function(e){var a=this;a.AuthService.login(e).then(function(){a.showSigninSuccessMessage(),a._startRedirect()},function(e){a.$log.error('Error on "submitSignin"',e),a.signinError=!0,e.status>=400&&e.status<500&&(a.signinErrorTitle="Erro!",a.signinErrorContent=e.data.message,401===e.status&&(a.signinErrorTitle="Acesso não autorizado!",a.signinErrorContent="E-mail ou senha incorretos."))})},e.prototype.submitRecover=function(e,a){var o=this;o.loadingSubmitRecover=!0;var s={login:a.login.$modelValue,g_recaptcha_response:o.recaptchaResponse},r=o.AuthService.forgotPassword(s);r.then(function(e){o.$log.debug("recover success.response",e),o.recoverSuccess=!0; - -}),r["catch"](function(e){o.$log.debug("recover error.response",e),o.recoverError=!0,o.recoverErrorMessage=e.data.message,e.status>=400&&e.status<500&&404===e.status&&(o.recoverErrorMessage="E-mail não cadastrado no Dialoga Brasil."),e.status>=500&&e.status<600&&(o.internalError=!0)}),r["finally"](function(){o.loadingSubmitRecover=!1})},e.prototype.submitConfirmationForm=function(e,a){var o=this,s={login:a.login.$modelValue,g_recaptcha_response:o.recaptchaResponse};o.AuthService.resendConfirmation(s).then(function(e){o.$log.debug("resendConfirmation success.response",e),o.resendConfirmationSuccess=!0;var a=e.data.users[0];a&&a.activated===!0?(o.resendConfirmationSuccessTitle="Usuário já está ativo!",o.resendConfirmationSuccessMessage="O e-mail informado já foi confirmado."):(o.resendConfirmationSuccessTitle="Pronto!",o.resendConfirmationSuccessMessage="Em instantes você receberá em seu e-mail um link para confirmar o seu cadastro.")})["catch"](function(e){o.$log.debug("resendConfirmation error.response",e),o.resendConfirmationError=!0,o.resendConfirmationErrorMessage=e.data.message,e.status>=500&&e.status<600&&(o.internalError=!0)})["finally"](function(){})},e.prototype.clearMessages=function(){var e=this;e.signupSuccess=!1,e.signinSuccess=!1,e.confirmSuccess=!1,e.signinError=!1,e.signupError=!1},e.prototype.showSigninSuccessMessage=function(){var e=this;e.signinSuccess=!0,e.successMessage="Login efetuado com sucesso!"},e.prototype._startRedirect=function(){var e=this;if(!e.hasRedirect)return void e.$log.debug("No redirect params defined.");e.countdown=e.delay;var a=null;a=e.$interval(function(){e.countdown--,e.countdown<=0&&(e.$interval.cancel(a),a=void 0)},1e3),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,proposal_id:e.params.proposal_id});break;default:e.$log.debug("State not handled yet:",a)}},1e3*e.delay)},e.prototype.authWithFacebook=function(){var e=this,a="http://hom.login.dialoga.gov.br/plugin/oauth_client/facebook?oauth_client_popup=true&id="+e.APP.facebook_app_id;e.$window.oauthClientAction(a)},e.prototype.authWithGooglePlus=function(){var e=this,a="http://hom.login.dialoga.gov.br/plugin/oauth_client/google_oauth2?oauth_client_popup=true&id="+e.APP.google_app_id;e.$window.oauthClientAction(a)}}(),function(){"use strict";function e(e,a,o){var s=this;s.AuthService=e,s.$state=a,s.$log=o,s.init(),s.doActivation(),s.$log.debug("ActivePageController")}e.$inject=["AuthService","$state","$log"],angular.module("dialoga").controller("ActivePageController",e),e.prototype.init=function(){var e=this;e.loading=!0,e.activation_code=e.$state.params.activation_code},e.prototype.doActivation=function(){var e=this;e.AuthService.activate(e.activation_code).then(function(a){e.$log.info("response",a),e.successMessageTitle="Pronto!",e.successMessageContent="Conta ativada com sucesso!"},function(a){e.$log.error("response",a),e.errorMessageTitle="Erro!",(a.status>=500||a.status<600)&&(e.errorMessageContent="Código de ativação incorreto.")})["finally"](function(a){e.$log.debug("finally",a),e.loading=!1})}}(),function(){"use strict";function e(e,a,o,s,r){var t=this;t.DialogaService=e,t.$rootScope=a,t.$state=o,t.$sce=s,t.$log=r,t.init(),t.loadData(),t.$rootScope.focusMainContent(),t.$log.debug("ArticlePageController")}e.$inject=["DialogaService","$rootScope","$state","$sce","$log"],angular.module("dialoga").controller("ArticlePageController",e),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"acessibilidade":o.DialogaService.getAcessibility(e,a);break;case"sobre":o.DialogaService.getAbout(e,a);break;case"termos-de-uso":o.DialogaService.getTerms(e,a);break;default:o.$log.debug("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._obj=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:"An unknown error occurred.")}o.debug("UtilService");var n={get:s,post:r,handleSuccess:t,handleError:i};return n}e.$inject=["$http","$q","$log"],angular.module("dialoga").factory("UtilService",e)}(),function(){"use strict";function e(){function e(e,a){a.debug("TopicsSelectController");var o=this;o.$rootScope=e,o.$log=a,o.init()}e.$inject=["$rootScope","$log"],e.prototype.init=function(){},e.prototype.selectTopic=function(){var e=this;return null===e.selectedTopic?void e.$log.debug("Default topic selected."):void e.$rootScope.$broadcast("change-selectedTopic",e.selectedTopic)};var a={restrict:"E",templateUrl:"app/components/topics-select/topics-select.html",scope:{topics:"=",selectedTopic:"="},controller:e,controllerAs:"vm",bindToController:!0};return a}angular.module("dialoga").directive("topicsSelect",e)}(),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.debug("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("html,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"},n=e.$filter("filter"),l=e.$filter("orderBy"),c=e.$filter("limitTo"),p=e.limitTo?e.limitTo:4;switch(t&&(s=a(s,t)),r&&(s=n(s,r,!1)),i.name){case"titulo":s=l(s,"title",e.reverse);break;case"tema":s=l(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=l.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=["$state","$element","$timeout","$log"],e.prototype.init=function(){var e=this;if(!e.proposals)throw{name:"NotDefined",message:'The attribute "proposals" is undefined.'};e.$timeout(function(){a.call(e)},0)},e.prototype.showContent=function(e){var a=this;a.$state.go("programa",{slug:e.parent.slug,proposal_id:e.proposal_id},{location:!0,reload:!0})};var o={restrict:"E",templateUrl:"app/components/proposal-list/proposal-list.html",scope:{proposals:"="},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){r.debug("ProposalCarouselController");var t=this;t.$scope=e,t.$state=a,t.$element=o,t.$timeout=s,t.$log=r,t.init()}e.$inject=["$scope","$state","$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.archived=e.archived||!1,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]+>/gm,""),e.ProposalBody="undefined"!==e.proposalsImg?!1:!0},e.prototype.addListeners=function(){var e=this;e.$scope.$on("proposal-box:proposal-loaded",function(a,o){o.success&&(e.STATE=null),o.error&&(e.errorOnSkip=o.error)}),e.$scope.$on("proposal-box:vote-response",function(a,o){o.success&&(e.STATE=e.VOTE_STATUS.SUCCESS),o.error&&(e.STATE=e.VOTE_STATUS.ERROR),401===o.code&&(e.message="Não autorizado."),e.messageCode=o.code}),e.setWidgetId=function(a){e.$log.info("Created widget ID:",a),e.recaptchaWidgetId=a},e.setResponse=function(a){e.$log.debug("Response available",a),e.recaptchaResponse=a},e.cbExpiration=function(){e.$log.debug("cbExpiration")}},e.prototype.canVote=function(){var e=this;return!!e.$rootScope.temporaryToken||e.$rootScope.currentUser&&!!e.$rootScope.currentUser.private_token},e.prototype.submitCaptcha=function(e,a){{var o=this,s=e.target;angular.element(s)}o.sendingCaptcha=!0,o.AuthService.loginCaptcha({g_recaptcha_response:o.recaptchaResponse}).then(function(e){o.$log.debug("register success.data",e),o._oldVoteValue&&(o.vote(o._oldVoteValue),o._oldVoteValue=null),o.showCaptchaForm=!1})["catch"](function(e){o.$log.debug("register error.data",e),o.vcRecaptchaService.reload(o.recaptchaWidgetId),o.sendingCaptchaError={},o.sendingCaptchaError.code=e.status,o.sendingCaptchaError.message=e.message||"Erro ("+e.status+"). Já estamos trabalhando para resolver o problema.
Por favor, tente novamente mais tarde",angular.equals(o.sendingCaptchaError.message,"Internal captcha validation error")&&(o.sendingCaptchaError.message="Erro interno ao tentar validar captcha.

Já estamos trabalhando para resolver o problema.
Por favor, tente novamente mais tarde.")})["finally"](function(){o.sendingCaptcha=!1})},e.prototype.captchaTryAgain=function(){var e=this;e.showCaptchaForm=!0,e.sendingCaptcha=!1,e.sendingCaptchaError=!1,e.message=null,e.vcRecaptchaService.reload(e.recaptchaWidgetId)},e.prototype.vote=function(e){var a=this;return a.archived===!0?void a.$log.info("Article archived. Abort."):(a._oldVoteValue=e,void(a.canVote()?a.doVote?a.doVote({proposal_id:a.proposal.id,value:e}):a.$log.error("No vote function to handler votes"):(a.$log.debug("You cannot vote."),a.showCaptchaForm=!0,angular.element("#captcha_text").focus())))},e.prototype.skip=function(){var e=this;return e.archived===!0?void e.$log.info("Article archived. Abort."):(e.errorOnSkip=!1,e.STATE=e.VOTE_STATUS.LOADING,e.doVote({proposal_id:e.proposal.id,value:e.VOTE_OPTIONS.SKIP}),void e.$log.debug("Sending vote"))},e.prototype.getSocialUrl=function(){var e=this;return e.$state.href("programa",{slug:e.topic.slug,proposal_id:e.proposal.id},{absolute:!0})},e.prototype.getSocialText=function(){var e=this;return e.proposal["abstract"]},e.prototype.getSocialImage=function(){var e=this;return e.$rootScope.basePath+e.topic.image.url};var a={restrict:"E",templateUrl:"app/components/proposal-box/proposal-box.html",scope:{archived:"=",category:"=",doVote:"&",focus:"@",proposal:"=",showVote:"=",topic:"=",location:"="},controller:e,controllerAs:"vm",bindToController:!0};return a}angular.module("dialoga").directive("proposalBox",e)}(),function(){"use strict";function e(){var e={};return e.generate=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},e}angular.module("dialoga").factory("GUID",e)}(),function(){"use strict";function e(){function e(e){return"param required: "+e}var a={paramRequired:e};return a}angular.module("dialoga").service("ErrorService",e)}(),function(){"use strict";function e(){function e(e,a,o,s,r){r.debug("EventListController");var t=this;t.ArticleService=e,t.$scope=a,t.$rootScope=o,t.$state=s,t.$log=r,t.init()}e.$inject=["ArticleService","$scope","$rootScope","$state","$log"],e.prototype.init=function(){var e=this;if(!e.events)throw{name:"NotDefined",message:'The attribute "events" is undefined.'};e.isCollapsed||(e.isCollapsed=!0)},e.prototype.toggleView=function(){var e=this;e.isCollapsed=!e.isCollapsed},e.prototype.subscribe=function(e){var a=this,o=e.id;return a.$rootScope.currentUser?(e._loading=!0,void a.ArticleService.subscribeToEvent(o).then(function(o){a.$log.debug("success",o),o.success===!0&&(e.already_follow=!0),o.success===!1&&o.already_follow===!0&&(e.already_follow=!0)},function(e){a.$log.debug("error",e)},function(e){a.$log.debug("update",e)})["finally"](function(o){a.$log.debug("finally",o),e._loading=!1})):(a.$log.info("User is not logged in. Redirect to Auth page."),void a.$state.go("entrar",{redirect_uri:"state=inicio&task=subscribe&event_id="+o},{location:!0}))};var a={restrict:"E",templateUrl:"app/components/event-list/event-list.html",scope:{events:"=",isCollapsed:"="},controller:e,controllerAs:"vm",bindToController:!0};return a}angular.module("dialoga").directive("eventList",e)}(),function(){"use strict";function e(e,a,o,s,r,t,i){function n(e,a){D.home?e(D.home):s.getArticleById(o.articleId.home,{"fields[]":["id","abstract","body","categories","children","children_count","title","slug","image","url","archived"],content_type:"ProposalsDiscussionPlugin::DiscussionTopic"},function(a){D.home=a,T(a),C(a),k(a),_(a),e(a)},a)}function l(e,a){D.about?e(D.about):s.getArticleById(o.articleId.about,{},function(a){D.about=a,e(D.about)},a)}function c(e,a){D.acessibility?e(D.acessibility):s.getArticleById(o.articleId.acessibility,{},function(a){D.acessibility=a,e(D.acessibility)},a)}function p(e,a){D.terms?e(D.terms):s.getArticleById(o.articleId.terms,{},function(a){D.terms=a,e(D.terms)},a)}function d(e,a){D.themes?e(D.themes):n(function(){if(!D.hasOwnProperty("themes"))throw{name:"NotFound",message:'"themes" is not defined. "article.categories" was loaded?'};e(D.themes)},a)}function g(e,a,o){function s(){for(var o=null,s=D.themes.length-1;s>=0;s--){var r=D.themes[s];if(r&&r.slug&&r.slug===e){o=r;break}}a(o)}D.themes?s(D.themes):d(s,o)}function u(e,a){D.programs?e(D.programs):n(function(){if(!D.hasOwnProperty("programs"))throw{name:"NotFound",message:'"programs" is not defined. "article.children" was handled?'};e(D.programs)},a)}function v(e,a,o){function s(){var o=D.programs.filter(function(a){return angular.equals(a.slug,e)?!0:!1});a(o[0])}D.programs?s():u(s,o)}function m(e,a,o){function s(){var o=D.programs.filter(function(a){var o=a.categories[0];return o&&angular.equals(o.id,e)?!0:!1});a(o)}D.programs?s():u(s,o)}function h(e,a,s){if(D.programsRandom)a(D.programsRandom);else{var t=!!D.programs,i=U.serviceDialoga+"random_topics/"+o.articleId.home,n=null;n=t?["id","title","slug"]:[];var l=angular.extend({"fields[]":n},e);r.get(i,{params:l}).then(function(e){I(t,e,a)})["catch"](function(e){s(e)})}}function f(e){var a=angular.extend({},e);return s.getEvents(o.communityId,a)}function b(e){return s.getResponseByProposalId(e)}function y(){var e=o.articleId.faq,a={};return s.getArtcilesByParentId(e,a)}function w(e,a,o){s.searchTopics({query:e},a,o)}function P(e,a,o){s.searchProposals(e,a,o)}function $(e){return s.sendContactForm(o.communityId,e)}function S(e,a){return angular.isArray(e)?e.filter(function(e){return e.parent?e.parent.categories&&0!==e.parent.categories.length?e.parent.categories[0].slug===a:(i.warn("Proposal parent has no categories."),!1):(i.warn("Proposal without a parent."),!1)}):(i.error("Input is not a Array."),[])}function A(e,a){return angular.isArray(e)?e.filter(function(e){return e.parent&&e.parent.id?e.parent.id===a:(i.warn("Proposal has no parent."),!1)}):(i.error("Input is not a Array."),[])}function T(e){var o=e.article["abstract"];o=F(o),o=B(o),e.article["abstract"]=o,e.article.abstractTrusted=a.trustAsHtml(o)}function C(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 k(e){D.hasOwnProperty("themes")||(D.themes=e.article.categories),R(e),x(e)}function x(e){for(var a=e.article.children,o=e.article.categories,s=o.length-1;s>=0;s--){for(var r=o[s],t=a.length-1;t>=0;t--){var i=a[t];if(i.categories&&i.categories.length>0&&angular.equals(i.categories[0].slug,r.slug)&&i.archived){r.archived=!0;break}}r.archived||(r.archived=!1)}}function _(e){D.hasOwnProperty("programs")||(D.programs=e.article.children,D.programs_count=e.article.children_count),E(D.programs)}function E(a){if(angular.isArray(a))for(var o=null,s=null,r=a.length-1;r>=0;r--)o=a[r],o.summary||(s=o["abstract"].split("
"),o.summary=e.stripHtml(s[0]).trim(),s.length>1&&(o.summaryExtended=s[1].trim()))}function R(e){e.article.categories}function I(e,a,o){if(e){for(var s=[],r=a.articles,t=D.programs.length-1;t>=0;t--)for(var i=D.programs[t],n=r.length-1;n>=0;n--){var l=r[n];l.id===i.id&&s.push(i)}a.articles=s}o(a)}function F(e){var a='