diff --git a/release/frontpress.js b/release/frontpress.js index 44c58a9..8da59d5 100644 --- a/release/frontpress.js +++ b/release/frontpress.js @@ -5731,6 +5731,30 @@ TrustAsHtml.$inject = ["$sce"]; "use strict"; +function ApiManager(ApiManagerMap){ + var service = { + getPath: getPath + }; + + return service; + + function getPath(object, pathName){ + var result = object; + var path = ApiManagerMap[pathName]; + + for(var i=0; i < path.length; i++){ + result = result[path[i]]; + } + + return result; + } +} + +angular.module("frontpress.components.api-manager").service("ApiManager", ApiManager); +ApiManager.$inject = ["ApiManagerMap"]; + +"use strict"; + function AjaxModel($http) { function request(url, params, method) { params = params || {}; @@ -5768,30 +5792,6 @@ angular.module("frontpress.components.ajax").factory("AjaxModel", AjaxModel); AjaxModel.$inject = ["$http"]; -"use strict"; - -function ApiManager(ApiManagerMap){ - var service = { - getPath: getPath - }; - - return service; - - function getPath(object, pathName){ - var result = object; - var path = ApiManagerMap[pathName]; - - for(var i=0; i < path.length; i++){ - result = result[path[i]]; - } - - return result; - } -} - -angular.module("frontpress.components.api-manager").service("ApiManager", ApiManager); -ApiManager.$inject = ["ApiManagerMap"]; - "use strict"; function BlogModel(BlogApi, $q, ApiManager, $FrontPress){ diff --git a/release/frontpress.min.js b/release/frontpress.min.js index 32b2049..62b4fd2 100644 --- a/release/frontpress.min.js +++ b/release/frontpress.min.js @@ -1,3 +1,3 @@ -function FrontPressConfig(t){t.errorOnUnhandledRejections(!1)}function frontpressRun(){function t(){String.prototype.format||(String.prototype.format=function(){var t=arguments;return this.replace(/{(\d+)}/g,function(e,r){return"undefined"!=typeof t[r]?t[r]:e})}),String.prototype.replaceAll||(String.prototype.replaceAll=function(t){var e=this;for(var r in t)e=e.replace(new RegExp(r,"g"),t[r]);return e}),String.prototype.getDateInfo||(String.prototype.getDateInfo=function(){var t={},e=new Date(this);return t.year=e.getFullYear(),t.month=e.getMonth()+1,t.day=("0"+e.getDate()).slice(-2),t})}function e(){Array.prototype.removeDuplicatedObjectsByField||(Array.prototype.removeDuplicatedObjectsByField=function(t){this.sort(function(e,r){return e[t]r[t]?1:0});var e=[];return this.reduce(function(r,n){return r[t]!==n[t]&&e.push(n),n},[]),e}),Array.prototype.getObjectByValue||(Array.prototype.getObjectByValue=function(t,e){return this.find(function(r){return r[t]==e})}),Array.prototype.filterToProperties||(Array.prototype.filterToProperties=function(){for(var t=[],e=0;e",controller:"HomeRouteController as vc"},r={url:P.routes["home.pagination"],template:"",controller:"HomeRouteController as vc"};e.state("home",t),e.state("home-pagination",r)}function v(){var t={url:P.routes.post,template:"",controller:"PostRouteController as vc"};e.state("post",t)}function h(){function t(t){return e.templateUrl[t]}var e={pageSize:P.pageSize,restApiUrl:P.restApiUrl,overrides:P.overrides,apiVersion:P.apiVersion,templateUrl:P.templateUrl,routes:P.routes,titles:P.titles,siteName:P.siteName,infiniteScroll:P.infiniteScroll,getTemplateUrl:t};return e}function $(t){return P.routes[t]}var P={load:d,loadFromFile:m,overrides:null,pageSize:null,restApiUrl:null,setApiVersion:o,setOverrides:a,setPageSize:n,setRestApiUrl:s,setTemplateUrl:i,setRoutes:l,setTitles:u,setInfiniteScroll:p,templateUrl:null,routes:null,titles:null,siteName:null,setSiteName:c},y={$get:h,configure:P,getRoute:$};return y}function FullPostCategoriesListDirectiveController(){}function FullPostDirectiveController(t,e){var r=this;r.vm=t}function FullPostGenericDirectiveController(){}function FullPostTagsListDirectiveController(){}function FullPostModel(t,e,r,n,o,s,a){function i(t){P.categories.push(t)}function l(t){P.authorName=t}function u(t){P.tags.push(t)}function c(t){P.title=t}function p(t){P.content=t}function f(t){P.date=t}function m(t){P.featuredImage=t,P.featured_image=t}function d(t){P.slug=t}function g(t){P.id=t}function v(t){var i=n.defer();return t.then(function(t){switch(t=Array.isArray(t.data)?t.data[0]:t.data,P.setTitle(t.title),P.setContent(t.content),P.setDate(t.date),P.setSlug(t.slug),P.setId(t[a.postId]),s.apiVersion){case"v2":for(var n=t.categories,l=0;l1){var r=t-1;s.setPrevPageNumber(r)}for(var n=1;n<=s.paginationSize;n++){var o=t+n;if(o<=s.lastPageNumber){var a={number:o};e.push(a)}}if(t":s,"":n.slug,"":e.getPath(n,"postTitle")});t.open(a,r+"-share","width=550,height=235")}var n={openShareWindow:r},o={facebook:"https://www.facebook.com/sharer/sharer.php?u=/",twitter:"https://twitter.com/intent/tweet?url=//&text=",gplus:"https://plus.google.com/share?url=//&t=",linkedin:"https://www.linkedin.com/shareArticle?url=/&title="};return n}function SlugsMapModel(t,e,r){function n(t){var e=l.get("slugs");"undefined"==typeof e&&(e=[]);var n=e.concat(t),o=r.postId;n=n.removeDuplicatedObjectsByField(o),l.put("slugs",n)}function o(){var t=l.get("slugs");return t}function s(t){var e=t.filterToProperties(u);i.addToCache(e)}function a(t,r){var n={pageSize:t,pageNumber:r},o=e.getAllPosts(n);o.then(function(t){var e=t.posts.filterToProperties(u);i.addToCache(e)}),o.catch(function(t){console.log(t)})}var i={addToCache:n,load:a,updateFromPosts:s,getCachedSlugs:o},l=t("slugsCache"),u=["slug"];return u.push(r.postId),i}function HomeDirectiveController(t,e,r,n,o,s,a,i){function l(){var t=o.getInformationPromise();t.then(function(t){var e={":siteName":t.name,":siteDescription":t.description};s.parsePageTitle("home",e)});var e=a.absUrl().replace(/\/page\/[0-9]{1,}\/?/,"");s.setPageCanonical(e)}function u(){m.pageNumber++;var t=m.pageNumber?m.pageNumber:f,e={notify:!1},o=p.vm.loadPosts(m);o.then(function(t){"v2"===n.apiVersion&&p.vm.loadExternalFeaturedImages(t)}),l(),c(m.pageNumber),r.go("home-pagination",{pageNumber:t},e)}function c(t){i.generatePaginationFromCurrentPageNumber(t)}var p=this;p.vm=e;var f=2;p.loadMorePostsAndPaginate=u,p.isInfiniteScrollDisabled=!n.infiniteScroll,s.init();var m={pageSize:n.pageSize,pageNumber:t.pageNumber?t.pageNumber:1},d=p.vm.loadPosts(m);d.then(function(t){var r=e.totalPostsNumber/n.pageSize;i.setLastPageNumber(r),c(m.pageNumber),"v2"===n.apiVersion&&p.vm.loadExternalFeaturedImages(t)}),l()}function HomeRouteController(){}function PostDirectiveController(t,e,r,n,o,s,a,i,l){var u=this;u.vm=t;var c,p,f=e.postSlug,m=n.getCachedSlugs(),d=a.postId[0],g=m&&m.getObjectByValue("slug",f)?m.getObjectByValue("slug",f):void 0;e.postId?(p=e.postId,c=t.loadFullPostById(p)):!e.postId&&g?(p=g[d],c=t.loadFullPostById(p)):f?c=t.loadFullPostBySlug(f):console.error("Error: [$FrontPress configuration error: empty id and slug for post route.] You should provide :postSlug or :postId as route parameter.");var v=i.getInformationPromise();r.init();var h=[c,v];l.all(h).then(function(e){var n=e[0],o=e[1],a=s.getPath(n,"postTitle"),i=s.getPath(n,"postDate").getDateInfo(),l={":postTitle":a,":year":i.year,":month":i.month,":day":i.day,":siteName":o.name,":siteDescription":o.description};r.parsePageTitle("post",l),u.disqusId=t.slug}),l.all(h).catch(function(t){console.error(t)})}function PostRouteController(){}function BlogApi(t,e){function r(){return t.get(n)}var n=e.restApiUrl,o={getBlogInformation:r};return o}function CategoriesApi(t,e,r){function n(e){var n=s,o=r.parse(e);return t.get(n,o)}function o(e,r){var n=s+"";return n=n.replace("",e),t.get(n,r)}var s=e.restApiUrl+"/wp/v2/categories/";return{getAllCategories:n,getCategoryById:o}}function MediaApi(t,e,r){function n(e,r){var n=o+"";return n=n.replace("",e),t.get(n,r)}var o=e.restApiUrl+"/wp/v2/media/";return{getMediaById:n}}function PostsApi(t,e,r){function n(e){var n=a+"?_envelope",o=r.parse(e);return t.get(n,o)}function o(e,r){var n=a+'?filter[name]=""';return n=n.replace("",e),t.get(n,r)}function s(e,r){var n=a+"";return n=n.replace("",e),t.get(n,r)}var a=e.restApiUrl+"/wp/v2/posts/";return{getAllPosts:n,getPostBySlug:o,getPostById:s}}function TagsApi(t,e,r){function n(e){var n=s,o=r.parse(e);return t.get(n,o)}function o(e,r){var n=s+"";return n=n.replace("",e),t.get(n,r)}var s=e.restApiUrl+"/wp/v2/tags/";return{getAllTags:n,getTagById:o}}"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(t,e,r){"use strict";function n(t,e){return _(new(_(function(){},{prototype:t})),e)}function o(t){return B(arguments,function(e){e!==t&&B(e,function(e,r){t.hasOwnProperty(r)||(t[r]=e)})}),t}function s(t,e){var r=[];for(var n in t.path){if(t.path[n]!==e.path[n])break;r.push(t.path[n])}return r}function a(t){if(Object.keys)return Object.keys(t);var e=[];return B(t,function(t,r){e.push(r)}),e}function i(t,e){if(Array.prototype.indexOf)return t.indexOf(e,Number(arguments[2])||0);var r=t.length>>>0,n=Number(arguments[2])||0;for(n=n<0?Math.ceil(n):Math.floor(n),n<0&&(n+=r);n=0||(c.push(o[f]),u[o[f]]=t[o[f]]);return _({},u,e)}function u(t,e,r){if(!r){r=[];for(var n in t)r.push(n)}for(var o=0;o "));if($[r]=n,H(t))v.push(r,[function(){return e.get(t)}],u);else{var o=e.annotate(t);B(o,function(t){t!==r&&l.hasOwnProperty(t)&&m(l[t],t)}),v.push(r,t,o)}h.pop(),$[r]=s}}function d(t){return V(t)&&t.then&&t.$$promises}if(!V(l))throw new Error("'invocables' must be an object");var g=a(l||{}),v=[],h=[],$={};return B(l,m),l=h=$=null,function(n,s,a){function i(){--y||(w||o(P,s.$$values),h.$$values=P,h.$$promises=h.$$promises||!0,delete h.$$inheritedValues,m.resolve(P))}function l(t){h.$$failure=t,m.reject(t)}function u(r,o,s){function u(t){p.reject(t),l(t)}function c(){if(!O(h.$$failure))try{p.resolve(e.invoke(o,a,P)),p.promise.then(function(t){P[r]=t,i()},u)}catch(t){u(t)}}var p=t.defer(),f=0;B(s,function(t){$.hasOwnProperty(t)&&!n.hasOwnProperty(t)&&(f++,$[t].then(function(e){P[t]=e,--f||c()},u))}),f||c(),$[r]=p.promise}if(d(n)&&a===r&&(a=s,s=n,n=null),n){if(!V(n))throw new Error("'locals' must be an object")}else n=c;if(s){if(!d(s))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else s=p;var m=t.defer(),h=m.promise,$=h.$$promises={},P=_({},n),y=1+v.length/3,w=!1;if(O(s.$$failure))return l(s.$$failure),h;s.$$inheritedValues&&o(P,f(s.$$inheritedValues,g)),_($,s.$$promises),s.$$values?(w=o(P,f(s.$$values,g)),h.$$inheritedValues=f(s.$$values,g),i()):(s.$$inheritedValues&&(h.$$inheritedValues=f(s.$$inheritedValues,g)),s.then(i,l));for(var b=0,C=v.length;b=0));)$=s(h.id,h.type,h.cfg,"path"),p+=a(h.segment,$.type.pattern.source,$.squash,$.isOptional),m.push(h.segment),f=u.lastIndex;P=t.substring(f);var y=P.indexOf("?");if(y>=0){var w=this.sourceSearch=P.substring(y);if(P=P.substring(0,y),this.sourcePath=t.substring(0,f+y),w.length>0)for(f=0;l=c.exec(w);)h=i(l,!0),$=s(h.id,h.type,h.cfg,"search"),f=u.lastIndex}else this.sourcePath=t,this.sourceSearch="";p+=a(P)+(e.strict===!1?"/?":"")+"$",m.push(P),this.regexp=new RegExp(p,e.caseInsensitive?"i":r),this.prefix=m[0],this.$$paramNames=v}function P(t){_(this,t)}function y(){function t(t){return null!=t?t.toString().replace(/(~|\/)/g,function(t){return{"~":"~~","/":"~2F"}[t]}):t}function o(t){return null!=t?t.toString().replace(/(~~|~2F)/g,function(t){return{"~~":"~","~2F":"/"}[t]}):t}function s(){return{strict:g,caseInsensitive:f}}function l(t){return k(t)||R(t)&&k(t[t.length-1])}function u(){for(;b.length;){var t=b.shift();if(t.pattern)throw new Error("You cannot override a type's .pattern at runtime.");e.extend(h[t.name],p.invoke(t.def))}}function c(t){_(this,t||{})}Y=this;var p,f=!1,g=!0,v=!1,h={},w=!0,b=[],C={string:{encode:t,decode:o,is:function(t){return null==t||!O(t)||"string"==typeof t},pattern:/[^\/]*/},int:{encode:t,decode:function(t){return parseInt(t,10)},is:function(t){return O(t)&&this.decode(t.toString())===t},pattern:/\d+/},bool:{encode:function(t){return t?1:0},decode:function(t){return 0!==parseInt(t,10)},is:function(t){return t===!0||t===!1},pattern:/0|1/},date:{encode:function(t){return this.is(t)?[t.getFullYear(),("0"+(t.getMonth()+1)).slice(-2),("0"+t.getDate()).slice(-2)].join("-"):r},decode:function(t){if(this.is(t))return t;var e=this.capture.exec(t);return e?new Date(e[1],e[2]-1,e[3]):r},is:function(t){return t instanceof Date&&!isNaN(t.valueOf())},equals:function(t,e){return this.is(t)&&this.is(e)&&t.toISOString()===e.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:e.toJson,decode:e.fromJson,is:e.isObject,equals:e.equals,pattern:/[^\/]*/},any:{encode:e.identity,decode:e.identity,equals:e.equals,pattern:/.*/}};y.$$getDefaultValue=function(t){if(!l(t.value))return t.value;if(!p)throw new Error("Injectable functions cannot be called at configuration time");return p.invoke(t.value)},this.caseInsensitive=function(t){return O(t)&&(f=t),f},this.strictMode=function(t){return O(t)&&(g=t),g},this.defaultSquashPolicy=function(t){if(!O(t))return v;if(t!==!0&&t!==!1&&!H(t))throw new Error("Invalid squash policy: "+t+". Valid policies: false, true, arbitrary-string");return v=t,t},this.compile=function(t,e){return new $(t,_(s(),e))},this.isMatcher=function(t){if(!V(t))return!1;var e=!0;return B($.prototype,function(r,n){k(r)&&(e=e&&O(t[n])&&k(t[n]))}),e},this.type=function(t,e,r){if(!O(e))return h[t];if(h.hasOwnProperty(t))throw new Error("A type named '"+t+"' has already been defined.");return h[t]=new P(_({name:t},e)),r&&(b.push({name:t,def:r}),w||u()),this},B(C,function(t,e){h[e]=new P(_({name:e},t))}),h=n(h,{}),this.$get=["$injector",function(t){return p=t,w=!1,u(),B(C,function(t,e){h[e]||(h[e]=new P(t))}),this}],this.Param=function(t,n,o,s){function u(t){var e=V(t)?a(t):[],r=i(e,"value")===-1&&i(e,"type")===-1&&i(e,"squash")===-1&&i(e,"array")===-1;return r&&(t={value:t}),t.$$fn=l(t.value)?t.value:function(){return t.value},t}function c(r,n,o){if(r.type&&n)throw new Error("Param '"+t+"' has two type configurations.");return n?n:r.type?e.isString(r.type)?h[r.type]:r.type instanceof P?r.type:new P(r.type):"config"===o?h.any:h.string}function f(){var e={array:"search"===s&&"auto"},r=t.match(/\[\]$/)?{array:!0}:{};return _(e,r,o).array}function g(t,e){var r=t.squash;if(!e||r===!1)return!1;if(!O(r)||null==r)return v;if(r===!0||H(r))return r;throw new Error("Invalid squash policy: '"+r+"'. Valid policies: false, true, or arbitrary string")}function $(t,e,n,o){var s,a,l=[{from:"",to:n||e?r:""},{from:null,to:n||e?r:""}];return s=R(t.replace)?t.replace:[],H(o)&&s.push({from:o,to:r}),a=d(s,function(t){return t.from}),m(l,function(t){return i(a,t.from)===-1}).concat(s)}function y(){if(!p)throw new Error("Injectable functions cannot be called at configuration time");var t=p.invoke(o.$$fn);if(null!==t&&t!==r&&!C.type.is(t))throw new Error("Default value ("+t+") for parameter '"+C.id+"' is not an instance of Type ("+C.type.name+")");return t}function w(t){function e(t){return function(e){return e.from===t}}function r(t){var r=d(m(C.replace,e(t)),function(t){return t.to});return r.length?r[0]:t}return t=r(t),O(t)?C.type.$normalize(t):y()}function b(){return"{Param:"+t+" "+n+" squash: '"+j+"' optional: "+S+"}"}var C=this;o=u(o),n=c(o,n,s);var A=f();n=A?n.$asArray(A,"search"===s):n,"string"!==n.name||A||"path"!==s||o.value!==r||(o.value="");var S=o.value!==r,j=g(o,S),D=$(o,A,S,j);_(this,{id:t,type:n,location:s,array:A,squash:j,replace:D,isOptional:S,value:w,dynamic:r,config:o,toString:b})},c.prototype={$$new:function(){return n(this,_(new c,{$$parent:this}))},$$keys:function(){for(var t=[],e=[],r=this,n=a(c.prototype);r;)e.push(r),r=r.$$parent;return e.reverse(),B(e,function(e){B(a(e),function(e){i(t,e)===-1&&i(n,e)===-1&&t.push(e)})}),t},$$values:function(t){var e={},r=this;return B(r.$$keys(),function(n){e[n]=r[n].value(t&&t[n])}),e},$$equals:function(t,e){var r=!0,n=this;return B(n.$$keys(),function(o){var s=t&&t[o],a=e&&e[o];n[o].type.equals(s,a)||(r=!1)}),r},$$validates:function(t){var n,o,s,a,i,l=this.$$keys();for(n=0;nr[t]?1:0});var e=[];return this.reduce(function(r,n){return r[t]!==n[t]&&e.push(n),n},[]),e}),Array.prototype.getObjectByValue||(Array.prototype.getObjectByValue=function(t,e){return this.find(function(r){return r[t]==e})}),Array.prototype.filterToProperties||(Array.prototype.filterToProperties=function(){for(var t=[],e=0;e",controller:"HomeRouteController as vc"},r={url:P.routes["home.pagination"],template:"",controller:"HomeRouteController as vc"};e.state("home",t),e.state("home-pagination",r)}function v(){var t={url:P.routes.post,template:"",controller:"PostRouteController as vc"};e.state("post",t)}function h(){function t(t){return e.templateUrl[t]}var e={pageSize:P.pageSize,restApiUrl:P.restApiUrl,overrides:P.overrides,apiVersion:P.apiVersion,templateUrl:P.templateUrl,routes:P.routes,titles:P.titles,siteName:P.siteName,infiniteScroll:P.infiniteScroll,getTemplateUrl:t};return e}function $(t){return P.routes[t]}var P={load:d,loadFromFile:m,overrides:null,pageSize:null,restApiUrl:null,setApiVersion:o,setOverrides:a,setPageSize:n,setRestApiUrl:s,setTemplateUrl:i,setRoutes:l,setTitles:u,setInfiniteScroll:p,templateUrl:null,routes:null,titles:null,siteName:null,setSiteName:c},y={$get:h,configure:P,getRoute:$};return y}function FullPostCategoriesListDirectiveController(){}function FullPostDirectiveController(t,e){var r=this;r.vm=t}function FullPostGenericDirectiveController(){}function FullPostTagsListDirectiveController(){}function FullPostModel(t,e,r,n,o,s,a){function i(t){P.categories.push(t)}function l(t){P.authorName=t}function u(t){P.tags.push(t)}function c(t){P.title=t}function p(t){P.content=t}function f(t){P.date=t}function m(t){P.featuredImage=t,P.featured_image=t}function d(t){P.slug=t}function g(t){P.id=t}function v(t){var i=n.defer();return t.then(function(t){switch(t=Array.isArray(t.data)?t.data[0]:t.data,P.setTitle(t.title),P.setContent(t.content),P.setDate(t.date),P.setSlug(t.slug),P.setId(t[a.postId]),s.apiVersion){case"v2":for(var n=t.categories,l=0;l1){var r=t-1;s.setPrevPageNumber(r)}for(var n=1;n<=s.paginationSize;n++){var o=t+n;if(o<=s.lastPageNumber){var a={number:o};e.push(a)}}if(t":s,"":n.slug,"":e.getPath(n,"postTitle")});t.open(a,r+"-share","width=550,height=235")}var n={openShareWindow:r},o={facebook:"https://www.facebook.com/sharer/sharer.php?u=/",twitter:"https://twitter.com/intent/tweet?url=//&text=",gplus:"https://plus.google.com/share?url=//&t=",linkedin:"https://www.linkedin.com/shareArticle?url=/&title="};return n}function SlugsMapModel(t,e,r){function n(t){var e=l.get("slugs");"undefined"==typeof e&&(e=[]);var n=e.concat(t),o=r.postId;n=n.removeDuplicatedObjectsByField(o),l.put("slugs",n)}function o(){var t=l.get("slugs");return t}function s(t){var e=t.filterToProperties(u);i.addToCache(e)}function a(t,r){var n={pageSize:t,pageNumber:r},o=e.getAllPosts(n);o.then(function(t){var e=t.posts.filterToProperties(u);i.addToCache(e)}),o.catch(function(t){console.log(t)})}var i={addToCache:n,load:a,updateFromPosts:s,getCachedSlugs:o},l=t("slugsCache"),u=["slug"];return u.push(r.postId),i}function HomeDirectiveController(t,e,r,n,o,s,a,i){function l(){var t=o.getInformationPromise();t.then(function(t){var e={":siteName":t.name,":siteDescription":t.description};s.parsePageTitle("home",e)});var e=a.absUrl().replace(/\/page\/[0-9]{1,}\/?/,"");s.setPageCanonical(e)}function u(){m.pageNumber++;var t=m.pageNumber?m.pageNumber:f,e={notify:!1},o=p.vm.loadPosts(m);o.then(function(t){"v2"===n.apiVersion&&p.vm.loadExternalFeaturedImages(t)}),l(),c(m.pageNumber),r.go("home-pagination",{pageNumber:t},e)}function c(t){i.generatePaginationFromCurrentPageNumber(t)}var p=this;p.vm=e;var f=2;p.loadMorePostsAndPaginate=u,p.isInfiniteScrollDisabled=!n.infiniteScroll,s.init();var m={pageSize:n.pageSize,pageNumber:t.pageNumber?t.pageNumber:1},d=p.vm.loadPosts(m);d.then(function(t){var r=e.totalPostsNumber/n.pageSize;i.setLastPageNumber(r),c(m.pageNumber),"v2"===n.apiVersion&&p.vm.loadExternalFeaturedImages(t)}),l()}function HomeRouteController(){}function PostDirectiveController(t,e,r,n,o,s,a,i,l){var u=this;u.vm=t;var c,p,f=e.postSlug,m=n.getCachedSlugs(),d=a.postId[0],g=m&&m.getObjectByValue("slug",f)?m.getObjectByValue("slug",f):void 0;e.postId?(p=e.postId,c=t.loadFullPostById(p)):!e.postId&&g?(p=g[d],c=t.loadFullPostById(p)):f?c=t.loadFullPostBySlug(f):console.error("Error: [$FrontPress configuration error: empty id and slug for post route.] You should provide :postSlug or :postId as route parameter.");var v=i.getInformationPromise();r.init();var h=[c,v];l.all(h).then(function(e){var n=e[0],o=e[1],a=s.getPath(n,"postTitle"),i=s.getPath(n,"postDate").getDateInfo(),l={":postTitle":a,":year":i.year,":month":i.month,":day":i.day,":siteName":o.name,":siteDescription":o.description};r.parsePageTitle("post",l),u.disqusId=t.slug}),l.all(h).catch(function(t){console.error(t)})}function PostRouteController(){}function BlogApi(t,e){function r(){return t.get(n)}var n=e.restApiUrl,o={getBlogInformation:r};return o}function CategoriesApi(t,e,r){function n(e){var n=s,o=r.parse(e);return t.get(n,o)}function o(e,r){var n=s+"";return n=n.replace("",e),t.get(n,r)}var s=e.restApiUrl+"/wp/v2/categories/";return{getAllCategories:n,getCategoryById:o}}function MediaApi(t,e,r){function n(e,r){var n=o+"";return n=n.replace("",e),t.get(n,r)}var o=e.restApiUrl+"/wp/v2/media/";return{getMediaById:n}}function PostsApi(t,e,r){function n(e){var n=a+"?_envelope",o=r.parse(e);return t.get(n,o)}function o(e,r){var n=a+'?filter[name]=""';return n=n.replace("",e),t.get(n,r)}function s(e,r){var n=a+"";return n=n.replace("",e),t.get(n,r)}var a=e.restApiUrl+"/wp/v2/posts/";return{getAllPosts:n,getPostBySlug:o,getPostById:s}}function TagsApi(t,e,r){function n(e){var n=s,o=r.parse(e);return t.get(n,o)}function o(e,r){var n=s+"";return n=n.replace("",e),t.get(n,r)}var s=e.restApiUrl+"/wp/v2/tags/";return{getAllTags:n,getTagById:o}}"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(t,e,r){"use strict";function n(t,e){return _(new(_(function(){},{prototype:t})),e)}function o(t){return B(arguments,function(e){e!==t&&B(e,function(e,r){t.hasOwnProperty(r)||(t[r]=e)})}),t}function s(t,e){var r=[];for(var n in t.path){if(t.path[n]!==e.path[n])break;r.push(t.path[n])}return r}function a(t){if(Object.keys)return Object.keys(t);var e=[];return B(t,function(t,r){e.push(r)}),e}function i(t,e){if(Array.prototype.indexOf)return t.indexOf(e,Number(arguments[2])||0);var r=t.length>>>0,n=Number(arguments[2])||0;for(n=n<0?Math.ceil(n):Math.floor(n),n<0&&(n+=r);n=0||(c.push(o[f]),u[o[f]]=t[o[f]]);return _({},u,e)}function u(t,e,r){if(!r){r=[];for(var n in t)r.push(n)}for(var o=0;o "));if($[r]=n,H(t))v.push(r,[function(){return e.get(t)}],u);else{var o=e.annotate(t);B(o,function(t){t!==r&&l.hasOwnProperty(t)&&m(l[t],t)}),v.push(r,t,o)}h.pop(),$[r]=s}}function d(t){return V(t)&&t.then&&t.$$promises}if(!V(l))throw new Error("'invocables' must be an object");var g=a(l||{}),v=[],h=[],$={};return B(l,m),l=h=$=null,function(n,s,a){function i(){--y||(w||o(P,s.$$values),h.$$values=P,h.$$promises=h.$$promises||!0,delete h.$$inheritedValues,m.resolve(P))}function l(t){h.$$failure=t,m.reject(t)}function u(r,o,s){function u(t){p.reject(t),l(t)}function c(){if(!O(h.$$failure))try{p.resolve(e.invoke(o,a,P)),p.promise.then(function(t){P[r]=t,i()},u)}catch(t){u(t)}}var p=t.defer(),f=0;B(s,function(t){$.hasOwnProperty(t)&&!n.hasOwnProperty(t)&&(f++,$[t].then(function(e){P[t]=e,--f||c()},u))}),f||c(),$[r]=p.promise}if(d(n)&&a===r&&(a=s,s=n,n=null),n){if(!V(n))throw new Error("'locals' must be an object")}else n=c;if(s){if(!d(s))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else s=p;var m=t.defer(),h=m.promise,$=h.$$promises={},P=_({},n),y=1+v.length/3,w=!1;if(O(s.$$failure))return l(s.$$failure),h;s.$$inheritedValues&&o(P,f(s.$$inheritedValues,g)),_($,s.$$promises),s.$$values?(w=o(P,f(s.$$values,g)),h.$$inheritedValues=f(s.$$values,g),i()):(s.$$inheritedValues&&(h.$$inheritedValues=f(s.$$inheritedValues,g)),s.then(i,l));for(var b=0,C=v.length;b=0));)$=s(h.id,h.type,h.cfg,"path"),p+=a(h.segment,$.type.pattern.source,$.squash,$.isOptional),m.push(h.segment),f=u.lastIndex;P=t.substring(f);var y=P.indexOf("?");if(y>=0){var w=this.sourceSearch=P.substring(y);if(P=P.substring(0,y),this.sourcePath=t.substring(0,f+y),w.length>0)for(f=0;l=c.exec(w);)h=i(l,!0),$=s(h.id,h.type,h.cfg,"search"),f=u.lastIndex}else this.sourcePath=t,this.sourceSearch="";p+=a(P)+(e.strict===!1?"/?":"")+"$",m.push(P),this.regexp=new RegExp(p,e.caseInsensitive?"i":r),this.prefix=m[0],this.$$paramNames=v}function P(t){_(this,t)}function y(){function t(t){return null!=t?t.toString().replace(/(~|\/)/g,function(t){return{"~":"~~","/":"~2F"}[t]}):t}function o(t){return null!=t?t.toString().replace(/(~~|~2F)/g,function(t){return{"~~":"~","~2F":"/"}[t]}):t}function s(){return{strict:g,caseInsensitive:f}}function l(t){return k(t)||R(t)&&k(t[t.length-1])}function u(){for(;b.length;){var t=b.shift();if(t.pattern)throw new Error("You cannot override a type's .pattern at runtime.");e.extend(h[t.name],p.invoke(t.def))}}function c(t){_(this,t||{})}Y=this;var p,f=!1,g=!0,v=!1,h={},w=!0,b=[],C={string:{encode:t,decode:o,is:function(t){return null==t||!O(t)||"string"==typeof t},pattern:/[^\/]*/},int:{encode:t,decode:function(t){return parseInt(t,10)},is:function(t){return O(t)&&this.decode(t.toString())===t},pattern:/\d+/},bool:{encode:function(t){return t?1:0},decode:function(t){return 0!==parseInt(t,10)},is:function(t){return t===!0||t===!1},pattern:/0|1/},date:{encode:function(t){return this.is(t)?[t.getFullYear(),("0"+(t.getMonth()+1)).slice(-2),("0"+t.getDate()).slice(-2)].join("-"):r},decode:function(t){if(this.is(t))return t;var e=this.capture.exec(t);return e?new Date(e[1],e[2]-1,e[3]):r},is:function(t){return t instanceof Date&&!isNaN(t.valueOf())},equals:function(t,e){return this.is(t)&&this.is(e)&&t.toISOString()===e.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:e.toJson,decode:e.fromJson,is:e.isObject,equals:e.equals,pattern:/[^\/]*/},any:{encode:e.identity,decode:e.identity,equals:e.equals,pattern:/.*/}};y.$$getDefaultValue=function(t){if(!l(t.value))return t.value;if(!p)throw new Error("Injectable functions cannot be called at configuration time");return p.invoke(t.value)},this.caseInsensitive=function(t){return O(t)&&(f=t),f},this.strictMode=function(t){return O(t)&&(g=t),g},this.defaultSquashPolicy=function(t){if(!O(t))return v;if(t!==!0&&t!==!1&&!H(t))throw new Error("Invalid squash policy: "+t+". Valid policies: false, true, arbitrary-string");return v=t,t},this.compile=function(t,e){return new $(t,_(s(),e))},this.isMatcher=function(t){if(!V(t))return!1;var e=!0;return B($.prototype,function(r,n){k(r)&&(e=e&&O(t[n])&&k(t[n]))}),e},this.type=function(t,e,r){if(!O(e))return h[t];if(h.hasOwnProperty(t))throw new Error("A type named '"+t+"' has already been defined.");return h[t]=new P(_({name:t},e)),r&&(b.push({name:t,def:r}),w||u()),this},B(C,function(t,e){h[e]=new P(_({name:e},t))}),h=n(h,{}),this.$get=["$injector",function(t){return p=t,w=!1,u(),B(C,function(t,e){h[e]||(h[e]=new P(t))}),this}],this.Param=function(t,n,o,s){function u(t){var e=V(t)?a(t):[],r=i(e,"value")===-1&&i(e,"type")===-1&&i(e,"squash")===-1&&i(e,"array")===-1;return r&&(t={value:t}),t.$$fn=l(t.value)?t.value:function(){return t.value},t}function c(r,n,o){if(r.type&&n)throw new Error("Param '"+t+"' has two type configurations.");return n?n:r.type?e.isString(r.type)?h[r.type]:r.type instanceof P?r.type:new P(r.type):"config"===o?h.any:h.string}function f(){var e={array:"search"===s&&"auto"},r=t.match(/\[\]$/)?{array:!0}:{};return _(e,r,o).array}function g(t,e){var r=t.squash;if(!e||r===!1)return!1;if(!O(r)||null==r)return v;if(r===!0||H(r))return r;throw new Error("Invalid squash policy: '"+r+"'. Valid policies: false, true, or arbitrary string")}function $(t,e,n,o){var s,a,l=[{from:"",to:n||e?r:""},{from:null,to:n||e?r:""}];return s=R(t.replace)?t.replace:[],H(o)&&s.push({from:o,to:r}),a=d(s,function(t){return t.from}),m(l,function(t){return i(a,t.from)===-1}).concat(s)}function y(){if(!p)throw new Error("Injectable functions cannot be called at configuration time");var t=p.invoke(o.$$fn);if(null!==t&&t!==r&&!C.type.is(t))throw new Error("Default value ("+t+") for parameter '"+C.id+"' is not an instance of Type ("+C.type.name+")");return t}function w(t){function e(t){return function(e){return e.from===t}}function r(t){var r=d(m(C.replace,e(t)),function(t){return t.to});return r.length?r[0]:t}return t=r(t),O(t)?C.type.$normalize(t):y()}function b(){return"{Param:"+t+" "+n+" squash: '"+j+"' optional: "+S+"}"}var C=this;o=u(o),n=c(o,n,s);var A=f();n=A?n.$asArray(A,"search"===s):n,"string"!==n.name||A||"path"!==s||o.value!==r||(o.value="");var S=o.value!==r,j=g(o,S),D=$(o,A,S,j);_(this,{id:t,type:n,location:s,array:A,squash:j,replace:D,isOptional:S,value:w,dynamic:r,config:o,toString:b})},c.prototype={$$new:function(){return n(this,_(new c,{$$parent:this}))},$$keys:function(){for(var t=[],e=[],r=this,n=a(c.prototype);r;)e.push(r),r=r.$$parent;return e.reverse(),B(e,function(e){B(a(e),function(e){i(t,e)===-1&&i(n,e)===-1&&t.push(e)})}),t},$$values:function(t){var e={},r=this;return B(r.$$keys(),function(n){e[n]=r[n].value(t&&t[n])}),e},$$equals:function(t,e){var r=!0,n=this;return B(n.$$keys(),function(o){var s=t&&t[o],a=e&&e[o];n[o].type.equals(s,a)||(r=!1)}),r},$$validates:function(t){var n,o,s,a,i,l=this.$$keys();for(n=0;n=0)throw new Error("State must have a valid name");if(j.hasOwnProperty(r))throw new Error("State '"+r+"' is already defined");var o=r.indexOf(".")!==-1?r.substring(0,r.lastIndexOf(".")):H(e.parent)?e.parent:V(e.parent)&&H(e.parent.name)?e.parent.name:"";if(o&&!j[o])return m(o,e.self);for(var s in T)k(T[s])&&(e[s]=T[s](e,T.$delegates[s]));return j[r]=e,!e[F]&&e.url&&t.when(e.url,["$match","$stateParams",function(t,r){S.$current.navigable==e&&u(t,r)||S.transitionTo(e,t,{inherit:!0,location:!1})}]),v(r),e}function $(t){return t.indexOf("*")>-1}function P(t){for(var e=t.split("."),r=S.$current.name.split("."),n=0,o=e.length;n=j;n--)a=d[n],a.self.onExit&&i.invoke(a.self.onExit,a.self,a.locals.globals),a.locals=null;for(n=j;n2?c.enter(t,null,r).then(n):c.enter(t,null,r,n)},leave:function(t,r){e.version.minor>2?c.leave(t).then(r):c.leave(t,r)}};if(u){var o=u&&u(r,t);return{enter:function(t,e,r){o.enter(t,null,e),r()},leave:function(t,e){o.leave(t),e()}}}return n()}var l=a(),u=l("$animator"),c=l("$animate"),p={restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(r,a,l){return function(r,a,u){function c(){if(f&&(f.remove(),f=null),d&&(d.$destroy(),d=null),m){var t=m.data("$uiViewAnim");$.leave(m,function(){t.$$animLeave.resolve(),f=null}),f=m,m=null}}function p(i){var p,f=D(r,u,a,o),P=f&&t.$current&&t.$current.locals[f];if(i||P!==g){p=r.$new(),g=t.$current.locals[f],p.$emit("$viewContentLoading",f);var y=l(p,function(t){var o=s.defer(),i=s.defer(),l={$animEnter:o.promise,$animLeave:i.promise,$$animLeave:i};t.data("$uiViewAnim",l),$.enter(t,a,function(){o.resolve(),d&&d.$emit("$viewContentAnimationEnded"),(e.isDefined(h)&&!h||r.$eval(h))&&n(t)}),c()});m=y,d=p,d.$emit("$viewContentLoaded",f),d.$eval(v)}}var f,m,d,g,v=u.onload||"",h=u.autoscroll,$=i(u,r);a.inheritedData("$uiView");r.$on("$stateChangeSuccess",function(){p(!1)}),p(!0)}}};return p}function j(t,r,n,o){return{restrict:"ECA",priority:-400,compile:function(s){var a=s.html();return function(s,i,l){var u=n.$current,c=D(s,l,i,o),p=u&&u.locals[c];if(p){i.data("$uiView",{name:c,state:p.$$state}),i.html(p.$template?p.$template:a);var f=e.extend({},p);s[p.$$resolveAs]=f;var m=t(i.contents());if(p.$$controller){p.$scope=s,p.$element=i;var d=r(p.$$controller,p);p.$$controllerAs&&(s[p.$$controllerAs]=d,s[p.$$controllerAs][p.$$resolveAs]=f),k(d.$onInit)&&d.$onInit(),i.data("$ngControllerController",d),i.children().data("$ngControllerController",d)}m(s)}}}}}function D(t,e,r,n){var o=n(e.uiView||e.name||"")(t),s=r.inheritedData("$uiView");return o.indexOf("@")>=0?o:o+"@"+(s?s.state.name:"")}function F(t,e){var r,n=t.match(/^\s*({[^}]*})\s*$/);if(n&&(t=e+"("+n[1]+")"),r=t.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!r||4!==r.length)throw new Error("Invalid state ref '"+t+"'");return{state:r[1],paramExpr:r[3]||null}}function T(t){var e=t.parent().inheritedData("$uiView");if(e&&e.state&&e.state.name)return e.state}function x(t){var e="[object SVGAnimatedString]"===Object.prototype.toString.call(t.prop("href")),r="FORM"===t[0].nodeName;return{attr:r?"action":e?"xlink:href":"href",isAnchor:"A"===t.prop("tagName").toUpperCase(),clickable:!r}}function I(t,e,r,n,o){return function(s){var a=s.which||s.button,i=o();if(!(a>1||s.ctrlKey||s.metaKey||s.shiftKey||t.attr("target"))){var l=r(function(){e.go(i.state,i.params,i.options)});s.preventDefault();var u=n.isAnchor&&!i.href?1:0;s.preventDefault=function(){u--<=0&&r.cancel(l)}}}}function N(t,e){return{relative:T(t)||e.$current,inherit:!0}}function M(t,r){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(n,o,s,a){var i,l=F(s.uiSref,t.current.name),u={state:l.state,href:null,params:null},c=x(o),p=a[1]||a[0],f=null;u.options=_(N(o,t),s.uiSrefOpts?n.$eval(s.uiSrefOpts):{});var m=function(r){r&&(u.params=e.copy(r)),u.href=t.href(l.state,u.params,u.options),f&&f(),p&&(f=p.$$addStateInfo(l.state,u.params)),null!==u.href&&s.$set(c.attr,u.href)};l.paramExpr&&(n.$watch(l.paramExpr,function(t){t!==u.params&&m(t)},!0),u.params=e.copy(n.$eval(l.paramExpr))),m(),c.clickable&&(i=I(o,t,r,c,function(){return u}),o[o.on?"on":"bind"]("click",i),n.$on("$destroy",function(){o[o.off?"off":"unbind"]("click",i)}))}}}function E(t,e){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(r,n,o,s){function a(e){f.state=e[0],f.params=e[1],f.options=e[2],f.href=t.href(f.state,f.params,f.options),m&&m(),u&&(m=u.$$addStateInfo(f.state,f.params)),f.href&&o.$set(l.attr,f.href)}var i,l=x(n),u=s[1]||s[0],c=[o.uiState,o.uiStateParams||null,o.uiStateOpts||null],p="["+c.map(function(t){return t||"null"}).join(", ")+"]",f={state:null,params:null,options:null,href:null},m=null;r.$watch(p,a,!0),a(r.$eval(p)),l.clickable&&(i=I(n,t,e,l,function(){return f}),n[n.on?"on":"bind"]("click",i),r.$on("$destroy",function(){n[n.off?"off":"unbind"]("click",i)}))}}}function L(t,e,r){return{restrict:"A",controller:["$scope","$element","$attrs","$timeout",function(e,n,o,s){function a(e,r,o){var s=t.get(e,T(n)),a=i(e,r),l={state:s||{name:e},params:r,hash:a};return g.push(l),v[a]=o,function(){var t=g.indexOf(l);t!==-1&&g.splice(t,1)}}function i(t,r){if(!H(t))throw new Error("state should be a string");return V(r)?t+G(r):(r=e.$eval(r),V(r)?t+G(r):t)}function l(){for(var t=0;t0)){var r=a(t,e,d);return l(),r}},e.$on("$stateChangeSuccess",l),l()}]}}function U(t){var e=function(e,r){return t.is(e,r)};return e.$stateful=!0,e}function q(t){var e=function(e,r,n){return t.includes(e,r,n)};return e.$stateful=!0,e}var O=e.isDefined,k=e.isFunction,H=e.isString,V=e.isObject,R=e.isArray,B=e.forEach,_=e.extend,z=e.copy,G=e.toJson;e.module("ui.router.util",["ng"]),e.module("ui.router.router",["ui.router.util"]),e.module("ui.router.state",["ui.router.router","ui.router.util"]),e.module("ui.router",["ui.router.state"]),e.module("ui.router.compat",["ui.router"]),v.$inject=["$q","$injector"],e.module("ui.router.util").service("$resolve",v),h.$inject=["$http","$templateCache","$injector"],e.module("ui.router.util").service("$templateFactory",h);var Y;$.prototype.concat=function(t,e){var r={caseInsensitive:Y.caseInsensitive(),strict:Y.strictMode(),squash:Y.defaultSquashPolicy()};return new $(this.sourcePath+t+this.sourceSearch,_(r,e),this)},$.prototype.toString=function(){return this.source},$.prototype.exec=function(t,e){function r(t){function e(t){return t.split("").reverse().join("")}function r(t){return t.replace(/\\-/g,"-")}var n=e(t).split(/-(?!\\)/),o=d(n,e);return d(o,r).reverse()}var n=this.regexp.exec(t);if(!n)return null;e=e||{};var o,s,a,i=this.parameters(),l=i.length,u=this.segments.length-1,c={};if(u!==n.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");var p,f;for(o=0;o0&&(e.disqus_config=function(){this.page.remote_auth_s3=s.remote_auth_s3,this.page.api_key=s.api_key})}function u(){var r=e.DISQUSWIDGETS;r&&t.isFunction(r.getCount)&&r.getCount()}function c(t,r,n){var s=o();e.DISQUS.reset({reload:!0,config:function(){this.page.identifier=r,this.page.url=t.absUrl(),this.page.title=n,this.page.remote_auth_s3=s.remote_auth_s3,this.page.api_key=s.api_key}})}function p(t){var e=n(),o=r(),l=s(e,t);i(o,l)||o.appendChild(a(l))}var f,m="embed.js",d="count.js";this.setShortname=function(t){f=t},this.$get=["$location",function(r){function o(n,o){if(!t.isDefined(f))throw new Error("No disqus shortname defined");if(!t.isDefined(n))throw new Error("No disqus thread id defined");t.isDefined(e.DISQUS)?c(r,n,o):(l(r,n,o),p(m))}function s(n){e.disqus_sso=n,t.isDefined(e.DISQUS)&&c(r,e.disqus_identifier,e.disqus_title)}function a(t){l(r,t),p(m),p(d),u()}return{commit:o,getShortname:n,setSso:s,loadCount:a}}]}),r.service("disqusService",["$disqus",function(t){return{setSso:function(e){t.setSso(e)}}}]),r.directive("disqus",["$disqus",function(e){return{restrict:"AC",replace:!0,scope:{id:"=disqus",title:"=title"},template:'
',link:function(r){r.$watch("id",function(n){t.isDefined(n)&&e.commit(n,r.title)})}}}]),r.directive("disqusIdentifier",["$disqus",function(t){return{restrict:"A",link:function(e,r,n){t.loadCount(n.disqusIdentifier)}}}])}(angular,this),angular.module("frontpress.template-cache",[]),angular.module("frontpress.template-cache").run(["$templateCache",function(t){t.put("/js/components/featured-image/templates/featured-image.template.html",''),t.put("/js/components/full-post/templates/full-post-author-name.template.html",''),t.put("/js/components/full-post/templates/full-post-categories-list.template.html",'
\n\t

carregando categorias...

\n\t

\n\t\tcategorias:\t\n\t\t\t\t\n\t\t{{category.name}}{{$last ? "" : ", "}}\t\t\n\t\t\t\t\n\t

\n
'),t.put("/js/components/full-post/templates/full-post-content-v1.template.html",'
'),t.put("/js/components/full-post/templates/full-post-content-v2.template.html",'
'),t.put("/js/components/full-post/templates/full-post-tags-list.template.html",'
\n\t

carregando tags...

\n\t

\n\t\ttags:\t\n\t\t\t\t\n\t\t{{tag.name}}{{$last ? "" : ", "}}\t\t\n\t\t\t\t\n\t

\n
'),t.put("/js/components/full-post/templates/full-post-title-v1.template.html",'

'),t.put("/js/components/full-post/templates/full-post-title-v2.template.html",'

'),t.put("/js/components/full-post/templates/full-post.template.html",'
\t\n\t

carregando...

\n\t
\t\t\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t \n\t\t\n\t\t \n\t\t \n\t
\n
'),t.put("/js/components/list-posts/templates/list-posts-excerpt-v1.template.html",'

'),t.put("/js/components/list-posts/templates/list-posts-excerpt-v2.template.html",'

'),t.put("/js/components/list-posts/templates/list-posts-title-v1.template.html",'

'),t.put("/js/components/list-posts/templates/list-posts-title-v2.template.html",'

'),t.put("/js/components/list-posts/templates/list-posts.template.html",'
\n\t

Carregando posts

\n\t
\t\n\t\t\t\n\t\t\n\t\t\t\n\t\t\n \n\t
\n
\n'),t.put("/js/components/page-head/templates/page-head.template.html",'\n\n\n\t\n\n\n\n\n\n'),t.put("/js/components/pagination/templates/pagination.template.html",'
\n\t<<\n\t\n\t\t\t\n\n\t>>\n
'),t.put("/js/components/post-date/templates/post-date.template.html","

"), -t.put("/js/components/share/templates/share.template.html","
\n Share:\n Twitter\n Facebook\n Google+\n
\n"),t.put("/js/views/home/templates/home.template.html",'
\n\t
\n\t\t\n\t\tCarregando posts novos ...\n\t\t\n\t
\n
'),t.put("/js/views/post/templates/post.template.html","
\n\t\n
")}]),angular.module("frontpress",["frontpress.views","frontpress.apis.blog","frontpress.components.slugs-map","frontpress.components.frontpress-provider","frontpress.template-cache"]),angular.module("frontpress").config(FrontPressConfig),FrontPressConfig.$inject=["$qProvider"],angular.module("frontpress").run(frontpressRun),angular.module("frontpress.apis.configs-to-params",[]),angular.module("frontpress.apis.configs-to-params").factory("ConfigsToParams",ConfigsToParams),angular.module("frontpress.filters",[]),angular.module("frontpress.views",["frontpress.views.home","frontpress.views.post"]),angular.module("frontpress.components.ajax",[]),angular.module("frontpress.components.api-manager",["frontpress.apis.api-manager-map"]),angular.module("frontpress.components.blog",["frontpress.components.frontpress-provider","frontpress.components.api-manager","frontpress.apis.blog"]),angular.module("frontpress.components.featured-image",["frontpress.components.frontpress-provider"]),angular.module("frontpress.components.frontpress-provider",["ngDisqus","frontpress.components.frontpress-provider-constant"]),angular.module("frontpress.components.full-post",["frontpress.filters","frontpress.apis.tags","frontpress.apis.posts","frontpress.apis.categories","frontpress.apis.media","frontpress.components.post-date","frontpress.apis.api-manager-map","frontpress.components.blog","frontpress.components.featured-image","frontpress.components.frontpress-provider"]),angular.module("frontpress.components.list-posts",["frontpress.filters","frontpress.components.slugs-map","frontpress.apis.posts","frontpress.apis.media","frontpress.components.api-manager","frontpress.components.post-date","frontpress.components.featured-image","frontpress.components.frontpress-provider"]),angular.module("frontpress.components.page-head",["frontpress.components.frontpress-provider"]),angular.module("frontpress.components.pagination",["frontpress.components.page-head","frontpress.components.frontpress-provider"]),angular.module("frontpress.components.post-date",["frontpress.components.frontpress-provider"]),angular.module("frontpress.components.share",["frontpress.filters","frontpress.apis.api-manager-map","frontpress.components.frontpress-provider"]),angular.module("frontpress.components.slugs-map",["frontpress.apis.posts","frontpress.apis.api-manager-map"]),angular.module("frontpress.views.home",["ui.router","infinite-scroll","frontpress.components.api-manager","frontpress.components.pagination","frontpress.components.list-posts","frontpress.components.page-head","frontpress.components.blog","frontpress.components.frontpress-provider"]),angular.module("frontpress.views.post",["frontpress.components.full-post","frontpress.components.share","ui.router","frontpress.components.page-head","frontpress.components.blog","ngDisqus","frontpress.components.slugs-map","frontpress.components.api-manager","frontpress.components.frontpress-provider"]),angular.module("frontpress.components.featured-image").directive("featuredImage",FeaturedImageDirective),FeaturedImageDirective.$inject=["$FrontPress"],angular.module("frontpress.components.full-post").directive("fullPostAuthorName",FullPostAuthorNameDirective),FullPostAuthorNameDirective.$inject=["$FrontPress"],angular.module("frontpress.components.full-post").directive("fullPostCategoriesList",FullPostCategoriesListDirective),FullPostCategoriesListDirective.$inject=["$FrontPress"],angular.module("frontpress.components.full-post").directive("fullPostContent",FullPostContentDirective),FullPostContentDirective.$inject=["$FrontPress"],angular.module("frontpress.components.full-post").directive("fullPostTagsList",FullPostTagListDirective),FullPostTagListDirective.$inject=["$FrontPress"],angular.module("frontpress.components.full-post").directive("fullPostTitle",FullPostTitleDirective),FullPostTitleDirective.$inject=["$FrontPress"],angular.module("frontpress.components.full-post").directive("fullPost",FullPostDirective),FullPostDirective.$inject=["$FrontPress"],angular.module("frontpress.components.list-posts").directive("listPostsExcerpt",ListPostsExcerptDirective),ListPostsExcerptDirective.$inject=["$FrontPress"],angular.module("frontpress.components.list-posts").directive("listPostsTitle",ListPostsTitleDirective),ListPostsTitleDirective.$inject=["$FrontPress"],angular.module("frontpress.components.list-posts").directive("listPosts",ListPostsDirective),ListPostsDirective.$inject=["$FrontPress"],angular.module("frontpress.components.page-head").directive("pageHead",PageHead),PageHead.$inject=["$FrontPress"],angular.module("frontpress.components.pagination").directive("pagination",Pagination),Pagination.$inject=["$FrontPress"],angular.module("frontpress.components.post-date").directive("postDate",PostDateDirective),PostDateDirective.$inject=["$FrontPress"],angular.module("frontpress.components.share").directive("share",Share),Share.$inject=["$FrontPress"],angular.module("frontpress.views.home").directive("homeView",HomeViewDirective),HomeViewDirective.$inject=["$FrontPress"],angular.module("frontpress.views.post").directive("postView",PostViewDirective),PostViewDirective.$inject=["$FrontPress"],angular.module("infinite-scroll").value("THROTTLE_MILLISECONDS",1e3),angular.module("frontpress.components.frontpress-provider-constant",[]).constant("FrontPressConfigurationFile",{}),angular.module("frontpress.filters").filter("trustAsHtml",TrustAsHtml),TrustAsHtml.$inject=["$sce"],angular.module("frontpress.components.ajax").factory("AjaxModel",AjaxModel),AjaxModel.$inject=["$http"],angular.module("frontpress.components.api-manager").service("ApiManager",ApiManager),ApiManager.$inject=["ApiManagerMap"],angular.module("frontpress.components.blog").factory("BlogModel",BlogModel),BlogModel.$inject=["BlogApi","$q","ApiManager","$FrontPress"],angular.module("frontpress.components.featured-image").controller("FeaturedImageDirectiveController",FeaturedImageDirectiveController),angular.module("frontpress.components.frontpress-provider").provider("$FrontPress",FrontPressProvider),FrontPressProvider.$inject=["$disqusProvider","$stateProvider","FrontPressConfigurationFile"],angular.module("frontpress.components.full-post").controller("FullPostCategoriesListDirectiveController",FullPostCategoriesListDirectiveController),angular.module("frontpress.components.full-post").controller("FullPostDirectiveController",FullPostDirectiveController),FullPostDirectiveController.$inject=["FullPostModel","BlogModel"],angular.module("frontpress.components.full-post").controller("FullPostGenericDirectiveController",FullPostGenericDirectiveController),angular.module("frontpress.components.full-post").controller("FullPostTagsListDirectiveController",FullPostTagsListDirectiveController),angular.module("frontpress.components.full-post").factory("FullPostModel",FullPostModel),FullPostModel.$inject=["PostsApi","TagsApi","CategoriesApi","$q","MediaApi","$FrontPress","ApiManagerMap"],angular.module("frontpress.components.list-posts").controller("ListPostsDirectiveController",ListPostsDirectiveController),ListPostsDirectiveController.$inject=["ListPostsModel"],angular.module("frontpress.components.list-posts").controller("ListPostsGenericDirectiveController",ListPostsGenericDirectiveController),angular.module("frontpress.components.list-posts").factory("ListPostsModel",ListPostsModel),ListPostsModel.$inject=["PostsApi","MediaApi","$q","SlugsMapModel","ApiManager"],angular.module("frontpress.components.page-head").controller("PageHeadController",PageHeadController),PageHeadController.$inject=["PageHeadModel"],angular.module("frontpress.components.page-head").factory("PageHeadModel",PageHeadModel),PageHeadModel.$inject=["$location","$FrontPress"],angular.module("frontpress.components.pagination").controller("PaginationController",PaginationController),PaginationController.$inject=["PaginationModel"],angular.module("frontpress.components.pagination").factory("PaginationModel",PaginationModel),PaginationModel.$inject=["PageHeadModel"],angular.module("frontpress.components.post-date").controller("PostDateDirectiveController",PostDateDirectiveController),PostDateDirectiveController.$inject=[],angular.module("frontpress.components.share").controller("ShareController",ShareController),ShareController.$inject=["ShareModel"],angular.module("frontpress.components.share").factory("ShareModel",ShareModel),ShareModel.$inject=["$window","ApiManager"],angular.module("frontpress.components.slugs-map").factory("SlugsMapModel",SlugsMapModel),SlugsMapModel.$inject=["$cacheFactory","PostsApi","ApiManagerMap"],angular.module("frontpress.views.home").controller("HomeDirectiveController",HomeDirectiveController),HomeDirectiveController.$inject=["$stateParams","ListPostsModel","$state","$FrontPress","BlogModel","PageHeadModel","$location","PaginationModel"],angular.module("frontpress.views.home").controller("HomeRouteController",HomeRouteController),HomeRouteController.$inject=[],angular.module("frontpress.views.post").controller("PostDirectiveController",PostDirectiveController),PostDirectiveController.$inject=["FullPostModel","$stateParams","PageHeadModel","SlugsMapModel","CategoriesApi","ApiManager","ApiManagerMap","BlogModel","$q"],angular.module("frontpress.views.post").controller("PostRouteController",PostRouteController),PostRouteController.$inject=[],angular.module("frontpress.apis.api-manager-map",[]),angular.module("frontpress.apis.blog",["frontpress.components.ajax","frontpress.components.frontpress-provider"]),angular.module("frontpress.apis.categories",["frontpress.components.ajax","frontpress.components.frontpress-provider","frontpress.apis.configs-to-params"]),angular.module("frontpress.apis.media",["frontpress.components.ajax","frontpress.components.frontpress-provider","frontpress.apis.configs-to-params"]),angular.module("frontpress.apis.posts",["frontpress.components.ajax","frontpress.components.frontpress-provider","frontpress.apis.configs-to-params"]),angular.module("frontpress.apis.tags",["frontpress.components.ajax","frontpress.components.frontpress-provider","frontpress.apis.configs-to-params"]),angular.module("frontpress.apis.api-manager-map").constant("ApiManagerMap",{totalPostsNumber:["headers","X-WP-Total"],allPostsPath:["body"],postTitle:["title","rendered"],postId:["id"],postDate:["date"],siteName:["name"],siteDescription:["description"]}),angular.module("frontpress.apis.blog").factory("BlogApi",BlogApi),BlogApi.$inject=["AjaxModel","$FrontPress"],angular.module("frontpress.apis.categories").factory("CategoriesApi",CategoriesApi),CategoriesApi.$inject=["AjaxModel","$FrontPress","ConfigsToParams"],angular.module("frontpress.apis.media").factory("MediaApi",MediaApi),MediaApi.$inject=["AjaxModel","$FrontPress","ConfigsToParams"],angular.module("frontpress.apis.posts").factory("PostsApi",PostsApi),PostsApi.$inject=["AjaxModel","$FrontPress","ConfigsToParams"],angular.module("frontpress.apis.categories").factory("TagsApi",TagsApi),TagsApi.$inject=["AjaxModel","$FrontPress","ConfigsToParams"]; \ No newline at end of file +t.put("/js/components/share/templates/share.template.html","
\n Share:\n Twitter\n Facebook\n Google+\n
\n"),t.put("/js/views/home/templates/home.template.html",'
\n\t
\n\t\t\n\t\tCarregando posts novos ...\n\t\t\n\t
\n
'),t.put("/js/views/post/templates/post.template.html","
\n\t\n
")}]),angular.module("frontpress",["frontpress.views","frontpress.apis.blog","frontpress.components.slugs-map","frontpress.components.frontpress-provider","frontpress.template-cache"]),angular.module("frontpress").config(FrontPressConfig),FrontPressConfig.$inject=["$qProvider"],angular.module("frontpress").run(frontpressRun),angular.module("frontpress.apis.configs-to-params",[]),angular.module("frontpress.apis.configs-to-params").factory("ConfigsToParams",ConfigsToParams),angular.module("frontpress.filters",[]),angular.module("frontpress.views",["frontpress.views.home","frontpress.views.post"]),angular.module("frontpress.components.ajax",[]),angular.module("frontpress.components.api-manager",["frontpress.apis.api-manager-map"]),angular.module("frontpress.components.blog",["frontpress.components.frontpress-provider","frontpress.components.api-manager","frontpress.apis.blog"]),angular.module("frontpress.components.featured-image",["frontpress.components.frontpress-provider"]),angular.module("frontpress.components.frontpress-provider",["ngDisqus","frontpress.components.frontpress-provider-constant"]),angular.module("frontpress.components.full-post",["frontpress.filters","frontpress.apis.tags","frontpress.apis.posts","frontpress.apis.categories","frontpress.apis.media","frontpress.components.post-date","frontpress.apis.api-manager-map","frontpress.components.blog","frontpress.components.featured-image","frontpress.components.frontpress-provider"]),angular.module("frontpress.components.list-posts",["frontpress.filters","frontpress.components.slugs-map","frontpress.apis.posts","frontpress.apis.media","frontpress.components.api-manager","frontpress.components.post-date","frontpress.components.featured-image","frontpress.components.frontpress-provider"]),angular.module("frontpress.components.page-head",["frontpress.components.frontpress-provider"]),angular.module("frontpress.components.pagination",["frontpress.components.page-head","frontpress.components.frontpress-provider"]),angular.module("frontpress.components.post-date",["frontpress.components.frontpress-provider"]),angular.module("frontpress.components.share",["frontpress.filters","frontpress.apis.api-manager-map","frontpress.components.frontpress-provider"]),angular.module("frontpress.components.slugs-map",["frontpress.apis.posts","frontpress.apis.api-manager-map"]),angular.module("frontpress.views.home",["ui.router","infinite-scroll","frontpress.components.api-manager","frontpress.components.pagination","frontpress.components.list-posts","frontpress.components.page-head","frontpress.components.blog","frontpress.components.frontpress-provider"]),angular.module("frontpress.views.post",["frontpress.components.full-post","frontpress.components.share","ui.router","frontpress.components.page-head","frontpress.components.blog","ngDisqus","frontpress.components.slugs-map","frontpress.components.api-manager","frontpress.components.frontpress-provider"]),angular.module("frontpress.components.featured-image").directive("featuredImage",FeaturedImageDirective),FeaturedImageDirective.$inject=["$FrontPress"],angular.module("frontpress.components.full-post").directive("fullPostAuthorName",FullPostAuthorNameDirective),FullPostAuthorNameDirective.$inject=["$FrontPress"],angular.module("frontpress.components.full-post").directive("fullPostCategoriesList",FullPostCategoriesListDirective),FullPostCategoriesListDirective.$inject=["$FrontPress"],angular.module("frontpress.components.full-post").directive("fullPostContent",FullPostContentDirective),FullPostContentDirective.$inject=["$FrontPress"],angular.module("frontpress.components.full-post").directive("fullPostTagsList",FullPostTagListDirective),FullPostTagListDirective.$inject=["$FrontPress"],angular.module("frontpress.components.full-post").directive("fullPostTitle",FullPostTitleDirective),FullPostTitleDirective.$inject=["$FrontPress"],angular.module("frontpress.components.full-post").directive("fullPost",FullPostDirective),FullPostDirective.$inject=["$FrontPress"],angular.module("frontpress.components.list-posts").directive("listPostsExcerpt",ListPostsExcerptDirective),ListPostsExcerptDirective.$inject=["$FrontPress"],angular.module("frontpress.components.list-posts").directive("listPostsTitle",ListPostsTitleDirective),ListPostsTitleDirective.$inject=["$FrontPress"],angular.module("frontpress.components.list-posts").directive("listPosts",ListPostsDirective),ListPostsDirective.$inject=["$FrontPress"],angular.module("frontpress.components.page-head").directive("pageHead",PageHead),PageHead.$inject=["$FrontPress"],angular.module("frontpress.components.pagination").directive("pagination",Pagination),Pagination.$inject=["$FrontPress"],angular.module("frontpress.components.post-date").directive("postDate",PostDateDirective),PostDateDirective.$inject=["$FrontPress"],angular.module("frontpress.components.share").directive("share",Share),Share.$inject=["$FrontPress"],angular.module("frontpress.views.home").directive("homeView",HomeViewDirective),HomeViewDirective.$inject=["$FrontPress"],angular.module("frontpress.views.post").directive("postView",PostViewDirective),PostViewDirective.$inject=["$FrontPress"],angular.module("infinite-scroll").value("THROTTLE_MILLISECONDS",1e3),angular.module("frontpress.components.frontpress-provider-constant",[]).constant("FrontPressConfigurationFile",{}),angular.module("frontpress.filters").filter("trustAsHtml",TrustAsHtml),TrustAsHtml.$inject=["$sce"],angular.module("frontpress.components.api-manager").service("ApiManager",ApiManager),ApiManager.$inject=["ApiManagerMap"],angular.module("frontpress.components.ajax").factory("AjaxModel",AjaxModel),AjaxModel.$inject=["$http"],angular.module("frontpress.components.blog").factory("BlogModel",BlogModel),BlogModel.$inject=["BlogApi","$q","ApiManager","$FrontPress"],angular.module("frontpress.components.featured-image").controller("FeaturedImageDirectiveController",FeaturedImageDirectiveController),angular.module("frontpress.components.frontpress-provider").provider("$FrontPress",FrontPressProvider),FrontPressProvider.$inject=["$disqusProvider","$stateProvider","FrontPressConfigurationFile"],angular.module("frontpress.components.full-post").controller("FullPostCategoriesListDirectiveController",FullPostCategoriesListDirectiveController),angular.module("frontpress.components.full-post").controller("FullPostDirectiveController",FullPostDirectiveController),FullPostDirectiveController.$inject=["FullPostModel","BlogModel"],angular.module("frontpress.components.full-post").controller("FullPostGenericDirectiveController",FullPostGenericDirectiveController),angular.module("frontpress.components.full-post").controller("FullPostTagsListDirectiveController",FullPostTagsListDirectiveController),angular.module("frontpress.components.full-post").factory("FullPostModel",FullPostModel),FullPostModel.$inject=["PostsApi","TagsApi","CategoriesApi","$q","MediaApi","$FrontPress","ApiManagerMap"],angular.module("frontpress.components.list-posts").controller("ListPostsDirectiveController",ListPostsDirectiveController),ListPostsDirectiveController.$inject=["ListPostsModel"],angular.module("frontpress.components.list-posts").controller("ListPostsGenericDirectiveController",ListPostsGenericDirectiveController),angular.module("frontpress.components.list-posts").factory("ListPostsModel",ListPostsModel),ListPostsModel.$inject=["PostsApi","MediaApi","$q","SlugsMapModel","ApiManager"],angular.module("frontpress.components.page-head").controller("PageHeadController",PageHeadController),PageHeadController.$inject=["PageHeadModel"],angular.module("frontpress.components.page-head").factory("PageHeadModel",PageHeadModel),PageHeadModel.$inject=["$location","$FrontPress"],angular.module("frontpress.components.pagination").controller("PaginationController",PaginationController),PaginationController.$inject=["PaginationModel"],angular.module("frontpress.components.pagination").factory("PaginationModel",PaginationModel),PaginationModel.$inject=["PageHeadModel"],angular.module("frontpress.components.post-date").controller("PostDateDirectiveController",PostDateDirectiveController),PostDateDirectiveController.$inject=[],angular.module("frontpress.components.share").controller("ShareController",ShareController),ShareController.$inject=["ShareModel"],angular.module("frontpress.components.share").factory("ShareModel",ShareModel),ShareModel.$inject=["$window","ApiManager"],angular.module("frontpress.components.slugs-map").factory("SlugsMapModel",SlugsMapModel),SlugsMapModel.$inject=["$cacheFactory","PostsApi","ApiManagerMap"],angular.module("frontpress.views.home").controller("HomeDirectiveController",HomeDirectiveController),HomeDirectiveController.$inject=["$stateParams","ListPostsModel","$state","$FrontPress","BlogModel","PageHeadModel","$location","PaginationModel"],angular.module("frontpress.views.home").controller("HomeRouteController",HomeRouteController),HomeRouteController.$inject=[],angular.module("frontpress.views.post").controller("PostDirectiveController",PostDirectiveController),PostDirectiveController.$inject=["FullPostModel","$stateParams","PageHeadModel","SlugsMapModel","CategoriesApi","ApiManager","ApiManagerMap","BlogModel","$q"],angular.module("frontpress.views.post").controller("PostRouteController",PostRouteController),PostRouteController.$inject=[],angular.module("frontpress.apis.api-manager-map",[]),angular.module("frontpress.apis.blog",["frontpress.components.ajax","frontpress.components.frontpress-provider"]),angular.module("frontpress.apis.categories",["frontpress.components.ajax","frontpress.components.frontpress-provider","frontpress.apis.configs-to-params"]),angular.module("frontpress.apis.media",["frontpress.components.ajax","frontpress.components.frontpress-provider","frontpress.apis.configs-to-params"]),angular.module("frontpress.apis.posts",["frontpress.components.ajax","frontpress.components.frontpress-provider","frontpress.apis.configs-to-params"]),angular.module("frontpress.apis.tags",["frontpress.components.ajax","frontpress.components.frontpress-provider","frontpress.apis.configs-to-params"]),angular.module("frontpress.apis.api-manager-map").constant("ApiManagerMap",{totalPostsNumber:["headers","X-WP-Total"],allPostsPath:["body"],postTitle:["title","rendered"],postId:["id"],postDate:["date"],siteName:["name"],siteDescription:["description"]}),angular.module("frontpress.apis.blog").factory("BlogApi",BlogApi),BlogApi.$inject=["AjaxModel","$FrontPress"],angular.module("frontpress.apis.categories").factory("CategoriesApi",CategoriesApi),CategoriesApi.$inject=["AjaxModel","$FrontPress","ConfigsToParams"],angular.module("frontpress.apis.media").factory("MediaApi",MediaApi),MediaApi.$inject=["AjaxModel","$FrontPress","ConfigsToParams"],angular.module("frontpress.apis.posts").factory("PostsApi",PostsApi),PostsApi.$inject=["AjaxModel","$FrontPress","ConfigsToParams"],angular.module("frontpress.apis.categories").factory("TagsApi",TagsApi),TagsApi.$inject=["AjaxModel","$FrontPress","ConfigsToParams"]; \ No newline at end of file diff --git a/release/frontpress.v1.js b/release/frontpress.v1.js index cd1e80f..f2fb733 100644 --- a/release/frontpress.v1.js +++ b/release/frontpress.v1.js @@ -5731,6 +5731,30 @@ TrustAsHtml.$inject = ["$sce"]; "use strict"; +function ApiManager(ApiManagerMap){ + var service = { + getPath: getPath + }; + + return service; + + function getPath(object, pathName){ + var result = object; + var path = ApiManagerMap[pathName]; + + for(var i=0; i < path.length; i++){ + result = result[path[i]]; + } + + return result; + } +} + +angular.module("frontpress.components.api-manager").service("ApiManager", ApiManager); +ApiManager.$inject = ["ApiManagerMap"]; + +"use strict"; + function AjaxModel($http) { function request(url, params, method) { params = params || {}; @@ -5768,30 +5792,6 @@ angular.module("frontpress.components.ajax").factory("AjaxModel", AjaxModel); AjaxModel.$inject = ["$http"]; -"use strict"; - -function ApiManager(ApiManagerMap){ - var service = { - getPath: getPath - }; - - return service; - - function getPath(object, pathName){ - var result = object; - var path = ApiManagerMap[pathName]; - - for(var i=0; i < path.length; i++){ - result = result[path[i]]; - } - - return result; - } -} - -angular.module("frontpress.components.api-manager").service("ApiManager", ApiManager); -ApiManager.$inject = ["ApiManagerMap"]; - "use strict"; function BlogModel(BlogApi, $q, ApiManager, $FrontPress){ diff --git a/release/frontpress.v1.min.js b/release/frontpress.v1.min.js index 9ccf126..9ad0e72 100644 --- a/release/frontpress.v1.min.js +++ b/release/frontpress.v1.min.js @@ -1,3 +1,3 @@ -function FrontPressConfig(t){t.errorOnUnhandledRejections(!1)}function frontpressRun(){function t(){String.prototype.format||(String.prototype.format=function(){var t=arguments;return this.replace(/{(\d+)}/g,function(e,r){return"undefined"!=typeof t[r]?t[r]:e})}),String.prototype.replaceAll||(String.prototype.replaceAll=function(t){var e=this;for(var r in t)e=e.replace(new RegExp(r,"g"),t[r]);return e}),String.prototype.getDateInfo||(String.prototype.getDateInfo=function(){var t={},e=new Date(this);return t.year=e.getFullYear(),t.month=e.getMonth()+1,t.day=("0"+e.getDate()).slice(-2),t})}function e(){Array.prototype.removeDuplicatedObjectsByField||(Array.prototype.removeDuplicatedObjectsByField=function(t){this.sort(function(e,r){return e[t]r[t]?1:0});var e=[];return this.reduce(function(r,n){return r[t]!==n[t]&&e.push(n),n},[]),e}),Array.prototype.getObjectByValue||(Array.prototype.getObjectByValue=function(t,e){return this.find(function(r){return r[t]==e})}),Array.prototype.filterToProperties||(Array.prototype.filterToProperties=function(){for(var t=[],e=0;e",controller:"HomeRouteController as vc"},r={url:P.routes["home.pagination"],template:"",controller:"HomeRouteController as vc"};e.state("home",t),e.state("home-pagination",r)}function v(){var t={url:P.routes.post,template:"",controller:"PostRouteController as vc"};e.state("post",t)}function h(){function t(t){return e.templateUrl[t]}var e={pageSize:P.pageSize,restApiUrl:P.restApiUrl,overrides:P.overrides,apiVersion:P.apiVersion,templateUrl:P.templateUrl,routes:P.routes,titles:P.titles,siteName:P.siteName,infiniteScroll:P.infiniteScroll,getTemplateUrl:t};return e}function $(t){return P.routes[t]}var P={load:d,loadFromFile:m,overrides:null,pageSize:null,restApiUrl:null,setApiVersion:o,setOverrides:a,setPageSize:n,setRestApiUrl:s,setTemplateUrl:i,setRoutes:l,setTitles:u,setInfiniteScroll:p,templateUrl:null,routes:null,titles:null,siteName:null,setSiteName:c},y={$get:h,configure:P,getRoute:$};return y}function FullPostCategoriesListDirectiveController(){}function FullPostDirectiveController(t,e){var r=this;r.vm=t}function FullPostGenericDirectiveController(){}function FullPostTagsListDirectiveController(){}function FullPostModel(t,e,r,n,o,s,a){function i(t){P.categories.push(t)}function l(t){P.authorName=t}function u(t){P.tags.push(t)}function c(t){P.title=t}function p(t){P.content=t}function f(t){P.date=t}function m(t){P.featuredImage=t,P.featured_image=t}function d(t){P.slug=t}function g(t){P.id=t}function v(t){var i=n.defer();return t.then(function(t){switch(t=Array.isArray(t.data)?t.data[0]:t.data,P.setTitle(t.title),P.setContent(t.content),P.setDate(t.date),P.setSlug(t.slug),P.setId(t[a.postId]),s.apiVersion){case"v2":for(var n=t.categories,l=0;l1){var r=t-1;s.setPrevPageNumber(r)}for(var n=1;n<=s.paginationSize;n++){var o=t+n;if(o<=s.lastPageNumber){var a={number:o};e.push(a)}}if(t":s,"":n.slug,"":e.getPath(n,"postTitle")});t.open(a,r+"-share","width=550,height=235")}var n={openShareWindow:r},o={facebook:"https://www.facebook.com/sharer/sharer.php?u=/",twitter:"https://twitter.com/intent/tweet?url=//&text=",gplus:"https://plus.google.com/share?url=//&t=",linkedin:"https://www.linkedin.com/shareArticle?url=/&title="};return n}function SlugsMapModel(t,e,r){function n(t){var e=l.get("slugs");"undefined"==typeof e&&(e=[]);var n=e.concat(t),o=r.postId;n=n.removeDuplicatedObjectsByField(o),l.put("slugs",n)}function o(){var t=l.get("slugs");return t}function s(t){var e=t.filterToProperties(u);i.addToCache(e)}function a(t,r){var n={pageSize:t,pageNumber:r},o=e.getAllPosts(n);o.then(function(t){var e=t.posts.filterToProperties(u);i.addToCache(e)}),o.catch(function(t){console.log(t)})}var i={addToCache:n,load:a,updateFromPosts:s,getCachedSlugs:o},l=t("slugsCache"),u=["slug"];return u.push(r.postId),i}function HomeDirectiveController(t,e,r,n,o,s,a,i){function l(){var t=o.getInformationPromise();t.then(function(t){var e={":siteName":t.name,":siteDescription":t.description};s.parsePageTitle("home",e)});var e=a.absUrl().replace(/\/page\/[0-9]{1,}\/?/,"");s.setPageCanonical(e)}function u(){m.pageNumber++;var t=m.pageNumber?m.pageNumber:f,e={notify:!1},o=p.vm.loadPosts(m);o.then(function(t){"v2"===n.apiVersion&&p.vm.loadExternalFeaturedImages(t)}),l(),c(m.pageNumber),r.go("home-pagination",{pageNumber:t},e)}function c(t){i.generatePaginationFromCurrentPageNumber(t)}var p=this;p.vm=e;var f=2;p.loadMorePostsAndPaginate=u,p.isInfiniteScrollDisabled=!n.infiniteScroll,s.init();var m={pageSize:n.pageSize,pageNumber:t.pageNumber?t.pageNumber:1},d=p.vm.loadPosts(m);d.then(function(t){var r=e.totalPostsNumber/n.pageSize;i.setLastPageNumber(r),c(m.pageNumber),"v2"===n.apiVersion&&p.vm.loadExternalFeaturedImages(t)}),l()}function HomeRouteController(){}function PostDirectiveController(t,e,r,n,o,s,a,i,l){var u=this;u.vm=t;var c,p,f=e.postSlug,m=n.getCachedSlugs(),d=a.postId[0],g=m&&m.getObjectByValue("slug",f)?m.getObjectByValue("slug",f):void 0;e.postId?(p=e.postId,c=t.loadFullPostById(p)):!e.postId&&g?(p=g[d],c=t.loadFullPostById(p)):f?c=t.loadFullPostBySlug(f):console.error("Error: [$FrontPress configuration error: empty id and slug for post route.] You should provide :postSlug or :postId as route parameter.");var v=i.getInformationPromise();r.init();var h=[c,v];l.all(h).then(function(e){var n=e[0],o=e[1],a=s.getPath(n,"postTitle"),i=s.getPath(n,"postDate").getDateInfo(),l={":postTitle":a,":year":i.year,":month":i.month,":day":i.day,":siteName":o.name,":siteDescription":o.description};r.parsePageTitle("post",l),u.disqusId=t.slug}),l.all(h).catch(function(t){console.error(t)})}function PostRouteController(){}function BlogApi(t,e){function r(){return t.get(n)}var n=e.restApiUrl,o={getBlogInformation:r};return o}function CategoriesApi(t,e,r){function n(e){var n=s,o=r.parse(e);return t.get(n,o)}function o(e,r){var n=s+"?fields=categories";return n=n.replace("",e),t.get(n,r)}var s=e.restApiUrl+"/posts/";return{getAllCategories:n,getCategoriesByPostId:o}}function MediaApi(t,e,r){function n(e,n){var s=o+"?fields=post_thumbnail";s=s.replace("",e);var a=r.parse(n);return t.get(s,a)}var o=(e.restApiUrl+"/media/",e.restApiUrl+"/posts/");return{getPostThumbnailByPostId:n}}function PostsApi(t,e,r){function n(e){var n=a,o=r.parse(e);return t.get(n,o)}function o(e,r){var n=a+"slug:";return n=n.replace("",e),t.get(n,r)}function s(e,r){var n=a+"";return n=n.replace("",e),t.get(n,r)}var a=e.restApiUrl+"/posts/",i={getAllPosts:n,getPostBySlug:o,getPostById:s};return i}function TagsApi(t,e,r){function n(e){var n=s,o=r.parse(e);return t.get(n,o)}function o(e,n){var o=s+"?fields=tags",a=r.parse(n);return o=o.replace("",e),t.get(o,a)}var s=e.restApiUrl+"/posts/",a={getAllTags:n,getTagByPostId:o};return a}"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(t,e,r){"use strict";function n(t,e){return _(new(_(function(){},{prototype:t})),e)}function o(t){return B(arguments,function(e){e!==t&&B(e,function(e,r){t.hasOwnProperty(r)||(t[r]=e)})}),t}function s(t,e){var r=[];for(var n in t.path){if(t.path[n]!==e.path[n])break;r.push(t.path[n])}return r}function a(t){if(Object.keys)return Object.keys(t);var e=[];return B(t,function(t,r){e.push(r)}),e}function i(t,e){if(Array.prototype.indexOf)return t.indexOf(e,Number(arguments[2])||0);var r=t.length>>>0,n=Number(arguments[2])||0;for(n=n<0?Math.ceil(n):Math.floor(n),n<0&&(n+=r);n=0||(c.push(o[f]),u[o[f]]=t[o[f]]);return _({},u,e)}function u(t,e,r){if(!r){r=[];for(var n in t)r.push(n)}for(var o=0;o "));if($[r]=n,H(t))v.push(r,[function(){return e.get(t)}],u);else{var o=e.annotate(t);B(o,function(t){t!==r&&l.hasOwnProperty(t)&&m(l[t],t)}),v.push(r,t,o)}h.pop(),$[r]=s}}function d(t){return V(t)&&t.then&&t.$$promises}if(!V(l))throw new Error("'invocables' must be an object");var g=a(l||{}),v=[],h=[],$={};return B(l,m),l=h=$=null,function(n,s,a){function i(){--y||(w||o(P,s.$$values),h.$$values=P,h.$$promises=h.$$promises||!0,delete h.$$inheritedValues,m.resolve(P))}function l(t){h.$$failure=t,m.reject(t)}function u(r,o,s){function u(t){p.reject(t),l(t)}function c(){if(!O(h.$$failure))try{p.resolve(e.invoke(o,a,P)),p.promise.then(function(t){P[r]=t,i()},u)}catch(t){u(t)}}var p=t.defer(),f=0;B(s,function(t){$.hasOwnProperty(t)&&!n.hasOwnProperty(t)&&(f++,$[t].then(function(e){P[t]=e,--f||c()},u))}),f||c(),$[r]=p.promise}if(d(n)&&a===r&&(a=s,s=n,n=null),n){if(!V(n))throw new Error("'locals' must be an object")}else n=c;if(s){if(!d(s))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else s=p;var m=t.defer(),h=m.promise,$=h.$$promises={},P=_({},n),y=1+v.length/3,w=!1;if(O(s.$$failure))return l(s.$$failure),h;s.$$inheritedValues&&o(P,f(s.$$inheritedValues,g)),_($,s.$$promises),s.$$values?(w=o(P,f(s.$$values,g)),h.$$inheritedValues=f(s.$$values,g),i()):(s.$$inheritedValues&&(h.$$inheritedValues=f(s.$$inheritedValues,g)),s.then(i,l));for(var b=0,C=v.length;b=0));)$=s(h.id,h.type,h.cfg,"path"),p+=a(h.segment,$.type.pattern.source,$.squash,$.isOptional),m.push(h.segment),f=u.lastIndex;P=t.substring(f);var y=P.indexOf("?");if(y>=0){var w=this.sourceSearch=P.substring(y);if(P=P.substring(0,y),this.sourcePath=t.substring(0,f+y),w.length>0)for(f=0;l=c.exec(w);)h=i(l,!0),$=s(h.id,h.type,h.cfg,"search"),f=u.lastIndex}else this.sourcePath=t,this.sourceSearch="";p+=a(P)+(e.strict===!1?"/?":"")+"$",m.push(P),this.regexp=new RegExp(p,e.caseInsensitive?"i":r),this.prefix=m[0],this.$$paramNames=v}function P(t){_(this,t)}function y(){function t(t){return null!=t?t.toString().replace(/(~|\/)/g,function(t){return{"~":"~~","/":"~2F"}[t]}):t}function o(t){return null!=t?t.toString().replace(/(~~|~2F)/g,function(t){return{"~~":"~","~2F":"/"}[t]}):t}function s(){return{strict:g,caseInsensitive:f}}function l(t){return k(t)||R(t)&&k(t[t.length-1])}function u(){for(;b.length;){var t=b.shift();if(t.pattern)throw new Error("You cannot override a type's .pattern at runtime.");e.extend(h[t.name],p.invoke(t.def))}}function c(t){_(this,t||{})}Y=this;var p,f=!1,g=!0,v=!1,h={},w=!0,b=[],C={string:{encode:t,decode:o,is:function(t){return null==t||!O(t)||"string"==typeof t},pattern:/[^\/]*/},int:{encode:t,decode:function(t){return parseInt(t,10)},is:function(t){return O(t)&&this.decode(t.toString())===t},pattern:/\d+/},bool:{encode:function(t){return t?1:0},decode:function(t){return 0!==parseInt(t,10)},is:function(t){return t===!0||t===!1},pattern:/0|1/},date:{encode:function(t){return this.is(t)?[t.getFullYear(),("0"+(t.getMonth()+1)).slice(-2),("0"+t.getDate()).slice(-2)].join("-"):r},decode:function(t){if(this.is(t))return t;var e=this.capture.exec(t);return e?new Date(e[1],e[2]-1,e[3]):r},is:function(t){return t instanceof Date&&!isNaN(t.valueOf())},equals:function(t,e){return this.is(t)&&this.is(e)&&t.toISOString()===e.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:e.toJson,decode:e.fromJson,is:e.isObject,equals:e.equals,pattern:/[^\/]*/},any:{encode:e.identity,decode:e.identity,equals:e.equals,pattern:/.*/}};y.$$getDefaultValue=function(t){if(!l(t.value))return t.value;if(!p)throw new Error("Injectable functions cannot be called at configuration time");return p.invoke(t.value)},this.caseInsensitive=function(t){return O(t)&&(f=t),f},this.strictMode=function(t){return O(t)&&(g=t),g},this.defaultSquashPolicy=function(t){if(!O(t))return v;if(t!==!0&&t!==!1&&!H(t))throw new Error("Invalid squash policy: "+t+". Valid policies: false, true, arbitrary-string");return v=t,t},this.compile=function(t,e){return new $(t,_(s(),e))},this.isMatcher=function(t){if(!V(t))return!1;var e=!0;return B($.prototype,function(r,n){k(r)&&(e=e&&O(t[n])&&k(t[n]))}),e},this.type=function(t,e,r){if(!O(e))return h[t];if(h.hasOwnProperty(t))throw new Error("A type named '"+t+"' has already been defined.");return h[t]=new P(_({name:t},e)),r&&(b.push({name:t,def:r}),w||u()),this},B(C,function(t,e){h[e]=new P(_({name:e},t))}),h=n(h,{}),this.$get=["$injector",function(t){return p=t,w=!1,u(),B(C,function(t,e){h[e]||(h[e]=new P(t))}),this}],this.Param=function(t,n,o,s){function u(t){var e=V(t)?a(t):[],r=i(e,"value")===-1&&i(e,"type")===-1&&i(e,"squash")===-1&&i(e,"array")===-1;return r&&(t={value:t}),t.$$fn=l(t.value)?t.value:function(){return t.value},t}function c(r,n,o){if(r.type&&n)throw new Error("Param '"+t+"' has two type configurations.");return n?n:r.type?e.isString(r.type)?h[r.type]:r.type instanceof P?r.type:new P(r.type):"config"===o?h.any:h.string}function f(){var e={array:"search"===s&&"auto"},r=t.match(/\[\]$/)?{array:!0}:{};return _(e,r,o).array}function g(t,e){var r=t.squash;if(!e||r===!1)return!1;if(!O(r)||null==r)return v;if(r===!0||H(r))return r;throw new Error("Invalid squash policy: '"+r+"'. Valid policies: false, true, or arbitrary string")}function $(t,e,n,o){var s,a,l=[{from:"",to:n||e?r:""},{from:null,to:n||e?r:""}];return s=R(t.replace)?t.replace:[],H(o)&&s.push({from:o,to:r}),a=d(s,function(t){return t.from}),m(l,function(t){return i(a,t.from)===-1}).concat(s)}function y(){if(!p)throw new Error("Injectable functions cannot be called at configuration time");var t=p.invoke(o.$$fn);if(null!==t&&t!==r&&!C.type.is(t))throw new Error("Default value ("+t+") for parameter '"+C.id+"' is not an instance of Type ("+C.type.name+")");return t}function w(t){function e(t){return function(e){return e.from===t}}function r(t){var r=d(m(C.replace,e(t)),function(t){return t.to});return r.length?r[0]:t}return t=r(t),O(t)?C.type.$normalize(t):y()}function b(){return"{Param:"+t+" "+n+" squash: '"+j+"' optional: "+S+"}"}var C=this;o=u(o),n=c(o,n,s);var A=f();n=A?n.$asArray(A,"search"===s):n,"string"!==n.name||A||"path"!==s||o.value!==r||(o.value="");var S=o.value!==r,j=g(o,S),D=$(o,A,S,j);_(this,{id:t,type:n,location:s,array:A,squash:j,replace:D,isOptional:S,value:w,dynamic:r,config:o,toString:b})},c.prototype={$$new:function(){return n(this,_(new c,{$$parent:this}))},$$keys:function(){for(var t=[],e=[],r=this,n=a(c.prototype);r;)e.push(r),r=r.$$parent;return e.reverse(),B(e,function(e){B(a(e),function(e){i(t,e)===-1&&i(n,e)===-1&&t.push(e)})}),t},$$values:function(t){var e={},r=this;return B(r.$$keys(),function(n){e[n]=r[n].value(t&&t[n])}),e},$$equals:function(t,e){var r=!0,n=this;return B(n.$$keys(),function(o){var s=t&&t[o],a=e&&e[o];n[o].type.equals(s,a)||(r=!1)}),r},$$validates:function(t){var n,o,s,a,i,l=this.$$keys();for(n=0;nr[t]?1:0});var e=[];return this.reduce(function(r,n){return r[t]!==n[t]&&e.push(n),n},[]),e}),Array.prototype.getObjectByValue||(Array.prototype.getObjectByValue=function(t,e){return this.find(function(r){return r[t]==e})}),Array.prototype.filterToProperties||(Array.prototype.filterToProperties=function(){for(var t=[],e=0;e",controller:"HomeRouteController as vc"},r={url:P.routes["home.pagination"],template:"",controller:"HomeRouteController as vc"};e.state("home",t),e.state("home-pagination",r)}function v(){var t={url:P.routes.post,template:"",controller:"PostRouteController as vc"};e.state("post",t)}function h(){function t(t){return e.templateUrl[t]}var e={pageSize:P.pageSize,restApiUrl:P.restApiUrl,overrides:P.overrides,apiVersion:P.apiVersion,templateUrl:P.templateUrl,routes:P.routes,titles:P.titles,siteName:P.siteName,infiniteScroll:P.infiniteScroll,getTemplateUrl:t};return e}function $(t){return P.routes[t]}var P={load:d,loadFromFile:m,overrides:null,pageSize:null,restApiUrl:null,setApiVersion:o,setOverrides:a,setPageSize:n,setRestApiUrl:s,setTemplateUrl:i,setRoutes:l,setTitles:u,setInfiniteScroll:p,templateUrl:null,routes:null,titles:null,siteName:null,setSiteName:c},y={$get:h,configure:P,getRoute:$};return y}function FullPostCategoriesListDirectiveController(){}function FullPostDirectiveController(t,e){var r=this;r.vm=t}function FullPostGenericDirectiveController(){}function FullPostTagsListDirectiveController(){}function FullPostModel(t,e,r,n,o,s,a){function i(t){P.categories.push(t)}function l(t){P.authorName=t}function u(t){P.tags.push(t)}function c(t){P.title=t}function p(t){P.content=t}function f(t){P.date=t}function m(t){P.featuredImage=t,P.featured_image=t}function d(t){P.slug=t}function g(t){P.id=t}function v(t){var i=n.defer();return t.then(function(t){switch(t=Array.isArray(t.data)?t.data[0]:t.data,P.setTitle(t.title),P.setContent(t.content),P.setDate(t.date),P.setSlug(t.slug),P.setId(t[a.postId]),s.apiVersion){case"v2":for(var n=t.categories,l=0;l1){var r=t-1;s.setPrevPageNumber(r)}for(var n=1;n<=s.paginationSize;n++){var o=t+n;if(o<=s.lastPageNumber){var a={number:o};e.push(a)}}if(t":s,"":n.slug,"":e.getPath(n,"postTitle")});t.open(a,r+"-share","width=550,height=235")}var n={openShareWindow:r},o={facebook:"https://www.facebook.com/sharer/sharer.php?u=/",twitter:"https://twitter.com/intent/tweet?url=//&text=",gplus:"https://plus.google.com/share?url=//&t=",linkedin:"https://www.linkedin.com/shareArticle?url=/&title="};return n}function SlugsMapModel(t,e,r){function n(t){var e=l.get("slugs");"undefined"==typeof e&&(e=[]);var n=e.concat(t),o=r.postId;n=n.removeDuplicatedObjectsByField(o),l.put("slugs",n)}function o(){var t=l.get("slugs");return t}function s(t){var e=t.filterToProperties(u);i.addToCache(e)}function a(t,r){var n={pageSize:t,pageNumber:r},o=e.getAllPosts(n);o.then(function(t){var e=t.posts.filterToProperties(u);i.addToCache(e)}),o.catch(function(t){console.log(t)})}var i={addToCache:n,load:a,updateFromPosts:s,getCachedSlugs:o},l=t("slugsCache"),u=["slug"];return u.push(r.postId),i}function HomeDirectiveController(t,e,r,n,o,s,a,i){function l(){var t=o.getInformationPromise();t.then(function(t){var e={":siteName":t.name,":siteDescription":t.description};s.parsePageTitle("home",e)});var e=a.absUrl().replace(/\/page\/[0-9]{1,}\/?/,"");s.setPageCanonical(e)}function u(){m.pageNumber++;var t=m.pageNumber?m.pageNumber:f,e={notify:!1},o=p.vm.loadPosts(m);o.then(function(t){"v2"===n.apiVersion&&p.vm.loadExternalFeaturedImages(t)}),l(),c(m.pageNumber),r.go("home-pagination",{pageNumber:t},e)}function c(t){i.generatePaginationFromCurrentPageNumber(t)}var p=this;p.vm=e;var f=2;p.loadMorePostsAndPaginate=u,p.isInfiniteScrollDisabled=!n.infiniteScroll,s.init();var m={pageSize:n.pageSize,pageNumber:t.pageNumber?t.pageNumber:1},d=p.vm.loadPosts(m);d.then(function(t){var r=e.totalPostsNumber/n.pageSize;i.setLastPageNumber(r),c(m.pageNumber),"v2"===n.apiVersion&&p.vm.loadExternalFeaturedImages(t)}),l()}function HomeRouteController(){}function PostDirectiveController(t,e,r,n,o,s,a,i,l){var u=this;u.vm=t;var c,p,f=e.postSlug,m=n.getCachedSlugs(),d=a.postId[0],g=m&&m.getObjectByValue("slug",f)?m.getObjectByValue("slug",f):void 0;e.postId?(p=e.postId,c=t.loadFullPostById(p)):!e.postId&&g?(p=g[d],c=t.loadFullPostById(p)):f?c=t.loadFullPostBySlug(f):console.error("Error: [$FrontPress configuration error: empty id and slug for post route.] You should provide :postSlug or :postId as route parameter.");var v=i.getInformationPromise();r.init();var h=[c,v];l.all(h).then(function(e){var n=e[0],o=e[1],a=s.getPath(n,"postTitle"),i=s.getPath(n,"postDate").getDateInfo(),l={":postTitle":a,":year":i.year,":month":i.month,":day":i.day,":siteName":o.name,":siteDescription":o.description};r.parsePageTitle("post",l),u.disqusId=t.slug}),l.all(h).catch(function(t){console.error(t)})}function PostRouteController(){}function BlogApi(t,e){function r(){return t.get(n)}var n=e.restApiUrl,o={getBlogInformation:r};return o}function CategoriesApi(t,e,r){function n(e){var n=s,o=r.parse(e);return t.get(n,o)}function o(e,r){var n=s+"?fields=categories";return n=n.replace("",e),t.get(n,r)}var s=e.restApiUrl+"/posts/";return{getAllCategories:n,getCategoriesByPostId:o}}function MediaApi(t,e,r){function n(e,n){var s=o+"?fields=post_thumbnail";s=s.replace("",e);var a=r.parse(n);return t.get(s,a)}var o=(e.restApiUrl+"/media/",e.restApiUrl+"/posts/");return{getPostThumbnailByPostId:n}}function PostsApi(t,e,r){function n(e){var n=a,o=r.parse(e);return t.get(n,o)}function o(e,r){var n=a+"slug:";return n=n.replace("",e),t.get(n,r)}function s(e,r){var n=a+"";return n=n.replace("",e),t.get(n,r)}var a=e.restApiUrl+"/posts/",i={getAllPosts:n,getPostBySlug:o,getPostById:s};return i}function TagsApi(t,e,r){function n(e){var n=s,o=r.parse(e);return t.get(n,o)}function o(e,n){var o=s+"?fields=tags",a=r.parse(n);return o=o.replace("",e),t.get(o,a)}var s=e.restApiUrl+"/posts/",a={getAllTags:n,getTagByPostId:o};return a}"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(t,e,r){"use strict";function n(t,e){return _(new(_(function(){},{prototype:t})),e)}function o(t){return B(arguments,function(e){e!==t&&B(e,function(e,r){t.hasOwnProperty(r)||(t[r]=e)})}),t}function s(t,e){var r=[];for(var n in t.path){if(t.path[n]!==e.path[n])break;r.push(t.path[n])}return r}function a(t){if(Object.keys)return Object.keys(t);var e=[];return B(t,function(t,r){e.push(r)}),e}function i(t,e){if(Array.prototype.indexOf)return t.indexOf(e,Number(arguments[2])||0);var r=t.length>>>0,n=Number(arguments[2])||0;for(n=n<0?Math.ceil(n):Math.floor(n),n<0&&(n+=r);n=0||(c.push(o[f]),u[o[f]]=t[o[f]]);return _({},u,e)}function u(t,e,r){if(!r){r=[];for(var n in t)r.push(n)}for(var o=0;o "));if($[r]=n,H(t))v.push(r,[function(){return e.get(t)}],u);else{var o=e.annotate(t);B(o,function(t){t!==r&&l.hasOwnProperty(t)&&m(l[t],t)}),v.push(r,t,o)}h.pop(),$[r]=s}}function d(t){return V(t)&&t.then&&t.$$promises}if(!V(l))throw new Error("'invocables' must be an object");var g=a(l||{}),v=[],h=[],$={};return B(l,m),l=h=$=null,function(n,s,a){function i(){--y||(w||o(P,s.$$values),h.$$values=P,h.$$promises=h.$$promises||!0,delete h.$$inheritedValues,m.resolve(P))}function l(t){h.$$failure=t,m.reject(t)}function u(r,o,s){function u(t){p.reject(t),l(t)}function c(){if(!O(h.$$failure))try{p.resolve(e.invoke(o,a,P)),p.promise.then(function(t){P[r]=t,i()},u)}catch(t){u(t)}}var p=t.defer(),f=0;B(s,function(t){$.hasOwnProperty(t)&&!n.hasOwnProperty(t)&&(f++,$[t].then(function(e){P[t]=e,--f||c()},u))}),f||c(),$[r]=p.promise}if(d(n)&&a===r&&(a=s,s=n,n=null),n){if(!V(n))throw new Error("'locals' must be an object")}else n=c;if(s){if(!d(s))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else s=p;var m=t.defer(),h=m.promise,$=h.$$promises={},P=_({},n),y=1+v.length/3,w=!1;if(O(s.$$failure))return l(s.$$failure),h;s.$$inheritedValues&&o(P,f(s.$$inheritedValues,g)),_($,s.$$promises),s.$$values?(w=o(P,f(s.$$values,g)),h.$$inheritedValues=f(s.$$values,g),i()):(s.$$inheritedValues&&(h.$$inheritedValues=f(s.$$inheritedValues,g)),s.then(i,l));for(var b=0,C=v.length;b=0));)$=s(h.id,h.type,h.cfg,"path"),p+=a(h.segment,$.type.pattern.source,$.squash,$.isOptional),m.push(h.segment),f=u.lastIndex;P=t.substring(f);var y=P.indexOf("?");if(y>=0){var w=this.sourceSearch=P.substring(y);if(P=P.substring(0,y),this.sourcePath=t.substring(0,f+y),w.length>0)for(f=0;l=c.exec(w);)h=i(l,!0),$=s(h.id,h.type,h.cfg,"search"),f=u.lastIndex}else this.sourcePath=t,this.sourceSearch="";p+=a(P)+(e.strict===!1?"/?":"")+"$",m.push(P),this.regexp=new RegExp(p,e.caseInsensitive?"i":r),this.prefix=m[0],this.$$paramNames=v}function P(t){_(this,t)}function y(){function t(t){return null!=t?t.toString().replace(/(~|\/)/g,function(t){return{"~":"~~","/":"~2F"}[t]}):t}function o(t){return null!=t?t.toString().replace(/(~~|~2F)/g,function(t){return{"~~":"~","~2F":"/"}[t]}):t}function s(){return{strict:g,caseInsensitive:f}}function l(t){return k(t)||R(t)&&k(t[t.length-1])}function u(){for(;b.length;){var t=b.shift();if(t.pattern)throw new Error("You cannot override a type's .pattern at runtime.");e.extend(h[t.name],p.invoke(t.def))}}function c(t){_(this,t||{})}Y=this;var p,f=!1,g=!0,v=!1,h={},w=!0,b=[],C={string:{encode:t,decode:o,is:function(t){return null==t||!O(t)||"string"==typeof t},pattern:/[^\/]*/},int:{encode:t,decode:function(t){return parseInt(t,10)},is:function(t){return O(t)&&this.decode(t.toString())===t},pattern:/\d+/},bool:{encode:function(t){return t?1:0},decode:function(t){return 0!==parseInt(t,10)},is:function(t){return t===!0||t===!1},pattern:/0|1/},date:{encode:function(t){return this.is(t)?[t.getFullYear(),("0"+(t.getMonth()+1)).slice(-2),("0"+t.getDate()).slice(-2)].join("-"):r},decode:function(t){if(this.is(t))return t;var e=this.capture.exec(t);return e?new Date(e[1],e[2]-1,e[3]):r},is:function(t){return t instanceof Date&&!isNaN(t.valueOf())},equals:function(t,e){return this.is(t)&&this.is(e)&&t.toISOString()===e.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:e.toJson,decode:e.fromJson,is:e.isObject,equals:e.equals,pattern:/[^\/]*/},any:{encode:e.identity,decode:e.identity,equals:e.equals,pattern:/.*/}};y.$$getDefaultValue=function(t){if(!l(t.value))return t.value;if(!p)throw new Error("Injectable functions cannot be called at configuration time");return p.invoke(t.value)},this.caseInsensitive=function(t){return O(t)&&(f=t),f},this.strictMode=function(t){return O(t)&&(g=t),g},this.defaultSquashPolicy=function(t){if(!O(t))return v;if(t!==!0&&t!==!1&&!H(t))throw new Error("Invalid squash policy: "+t+". Valid policies: false, true, arbitrary-string");return v=t,t},this.compile=function(t,e){return new $(t,_(s(),e))},this.isMatcher=function(t){if(!V(t))return!1;var e=!0;return B($.prototype,function(r,n){k(r)&&(e=e&&O(t[n])&&k(t[n]))}),e},this.type=function(t,e,r){if(!O(e))return h[t];if(h.hasOwnProperty(t))throw new Error("A type named '"+t+"' has already been defined.");return h[t]=new P(_({name:t},e)),r&&(b.push({name:t,def:r}),w||u()),this},B(C,function(t,e){h[e]=new P(_({name:e},t))}),h=n(h,{}),this.$get=["$injector",function(t){return p=t,w=!1,u(),B(C,function(t,e){h[e]||(h[e]=new P(t))}),this}],this.Param=function(t,n,o,s){function u(t){var e=V(t)?a(t):[],r=i(e,"value")===-1&&i(e,"type")===-1&&i(e,"squash")===-1&&i(e,"array")===-1;return r&&(t={value:t}),t.$$fn=l(t.value)?t.value:function(){return t.value},t}function c(r,n,o){if(r.type&&n)throw new Error("Param '"+t+"' has two type configurations.");return n?n:r.type?e.isString(r.type)?h[r.type]:r.type instanceof P?r.type:new P(r.type):"config"===o?h.any:h.string}function f(){var e={array:"search"===s&&"auto"},r=t.match(/\[\]$/)?{array:!0}:{};return _(e,r,o).array}function g(t,e){var r=t.squash;if(!e||r===!1)return!1;if(!O(r)||null==r)return v;if(r===!0||H(r))return r;throw new Error("Invalid squash policy: '"+r+"'. Valid policies: false, true, or arbitrary string")}function $(t,e,n,o){var s,a,l=[{from:"",to:n||e?r:""},{from:null,to:n||e?r:""}];return s=R(t.replace)?t.replace:[],H(o)&&s.push({from:o,to:r}),a=d(s,function(t){return t.from}),m(l,function(t){return i(a,t.from)===-1}).concat(s)}function y(){if(!p)throw new Error("Injectable functions cannot be called at configuration time");var t=p.invoke(o.$$fn);if(null!==t&&t!==r&&!C.type.is(t))throw new Error("Default value ("+t+") for parameter '"+C.id+"' is not an instance of Type ("+C.type.name+")");return t}function w(t){function e(t){return function(e){return e.from===t}}function r(t){var r=d(m(C.replace,e(t)),function(t){return t.to});return r.length?r[0]:t}return t=r(t),O(t)?C.type.$normalize(t):y()}function b(){return"{Param:"+t+" "+n+" squash: '"+j+"' optional: "+S+"}"}var C=this;o=u(o),n=c(o,n,s);var A=f();n=A?n.$asArray(A,"search"===s):n,"string"!==n.name||A||"path"!==s||o.value!==r||(o.value="");var S=o.value!==r,j=g(o,S),D=$(o,A,S,j);_(this,{id:t,type:n,location:s,array:A,squash:j,replace:D,isOptional:S,value:w,dynamic:r,config:o,toString:b})},c.prototype={$$new:function(){return n(this,_(new c,{$$parent:this}))},$$keys:function(){for(var t=[],e=[],r=this,n=a(c.prototype);r;)e.push(r),r=r.$$parent;return e.reverse(),B(e,function(e){B(a(e),function(e){i(t,e)===-1&&i(n,e)===-1&&t.push(e)})}),t},$$values:function(t){var e={},r=this;return B(r.$$keys(),function(n){e[n]=r[n].value(t&&t[n])}),e},$$equals:function(t,e){var r=!0,n=this;return B(n.$$keys(),function(o){var s=t&&t[o],a=e&&e[o];n[o].type.equals(s,a)||(r=!1)}),r},$$validates:function(t){var n,o,s,a,i,l=this.$$keys();for(n=0;n=0)throw new Error("State must have a valid name");if(j.hasOwnProperty(r))throw new Error("State '"+r+"' is already defined");var o=r.indexOf(".")!==-1?r.substring(0,r.lastIndexOf(".")):H(e.parent)?e.parent:V(e.parent)&&H(e.parent.name)?e.parent.name:"";if(o&&!j[o])return m(o,e.self);for(var s in T)k(T[s])&&(e[s]=T[s](e,T.$delegates[s]));return j[r]=e,!e[F]&&e.url&&t.when(e.url,["$match","$stateParams",function(t,r){S.$current.navigable==e&&u(t,r)||S.transitionTo(e,t,{inherit:!0,location:!1})}]),v(r),e}function $(t){return t.indexOf("*")>-1}function P(t){for(var e=t.split("."),r=S.$current.name.split("."),n=0,o=e.length;n=j;n--)a=d[n],a.self.onExit&&i.invoke(a.self.onExit,a.self,a.locals.globals),a.locals=null;for(n=j;n2?c.enter(t,null,r).then(n):c.enter(t,null,r,n)},leave:function(t,r){e.version.minor>2?c.leave(t).then(r):c.leave(t,r)}};if(u){var o=u&&u(r,t);return{enter:function(t,e,r){o.enter(t,null,e),r()},leave:function(t,e){o.leave(t),e()}}}return n()}var l=a(),u=l("$animator"),c=l("$animate"),p={restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(r,a,l){return function(r,a,u){function c(){if(f&&(f.remove(),f=null),d&&(d.$destroy(),d=null),m){var t=m.data("$uiViewAnim");$.leave(m,function(){t.$$animLeave.resolve(),f=null}),f=m,m=null}}function p(i){var p,f=D(r,u,a,o),P=f&&t.$current&&t.$current.locals[f];if(i||P!==g){p=r.$new(),g=t.$current.locals[f],p.$emit("$viewContentLoading",f);var y=l(p,function(t){var o=s.defer(),i=s.defer(),l={$animEnter:o.promise,$animLeave:i.promise,$$animLeave:i};t.data("$uiViewAnim",l),$.enter(t,a,function(){o.resolve(),d&&d.$emit("$viewContentAnimationEnded"),(e.isDefined(h)&&!h||r.$eval(h))&&n(t)}),c()});m=y,d=p,d.$emit("$viewContentLoaded",f),d.$eval(v)}}var f,m,d,g,v=u.onload||"",h=u.autoscroll,$=i(u,r);a.inheritedData("$uiView");r.$on("$stateChangeSuccess",function(){p(!1)}),p(!0)}}};return p}function j(t,r,n,o){return{restrict:"ECA",priority:-400,compile:function(s){var a=s.html();return function(s,i,l){var u=n.$current,c=D(s,l,i,o),p=u&&u.locals[c];if(p){i.data("$uiView",{name:c,state:p.$$state}),i.html(p.$template?p.$template:a);var f=e.extend({},p);s[p.$$resolveAs]=f;var m=t(i.contents());if(p.$$controller){p.$scope=s,p.$element=i;var d=r(p.$$controller,p);p.$$controllerAs&&(s[p.$$controllerAs]=d,s[p.$$controllerAs][p.$$resolveAs]=f),k(d.$onInit)&&d.$onInit(),i.data("$ngControllerController",d),i.children().data("$ngControllerController",d)}m(s)}}}}}function D(t,e,r,n){var o=n(e.uiView||e.name||"")(t),s=r.inheritedData("$uiView");return o.indexOf("@")>=0?o:o+"@"+(s?s.state.name:"")}function F(t,e){var r,n=t.match(/^\s*({[^}]*})\s*$/);if(n&&(t=e+"("+n[1]+")"),r=t.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!r||4!==r.length)throw new Error("Invalid state ref '"+t+"'");return{state:r[1],paramExpr:r[3]||null}}function T(t){var e=t.parent().inheritedData("$uiView");if(e&&e.state&&e.state.name)return e.state}function x(t){var e="[object SVGAnimatedString]"===Object.prototype.toString.call(t.prop("href")),r="FORM"===t[0].nodeName;return{attr:r?"action":e?"xlink:href":"href",isAnchor:"A"===t.prop("tagName").toUpperCase(),clickable:!r}}function I(t,e,r,n,o){return function(s){var a=s.which||s.button,i=o();if(!(a>1||s.ctrlKey||s.metaKey||s.shiftKey||t.attr("target"))){var l=r(function(){e.go(i.state,i.params,i.options)});s.preventDefault();var u=n.isAnchor&&!i.href?1:0;s.preventDefault=function(){u--<=0&&r.cancel(l)}}}}function N(t,e){return{relative:T(t)||e.$current,inherit:!0}}function M(t,r){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(n,o,s,a){var i,l=F(s.uiSref,t.current.name),u={state:l.state,href:null,params:null},c=x(o),p=a[1]||a[0],f=null;u.options=_(N(o,t),s.uiSrefOpts?n.$eval(s.uiSrefOpts):{});var m=function(r){r&&(u.params=e.copy(r)),u.href=t.href(l.state,u.params,u.options),f&&f(),p&&(f=p.$$addStateInfo(l.state,u.params)),null!==u.href&&s.$set(c.attr,u.href)};l.paramExpr&&(n.$watch(l.paramExpr,function(t){t!==u.params&&m(t)},!0),u.params=e.copy(n.$eval(l.paramExpr))),m(),c.clickable&&(i=I(o,t,r,c,function(){return u}),o[o.on?"on":"bind"]("click",i),n.$on("$destroy",function(){o[o.off?"off":"unbind"]("click",i)}))}}}function E(t,e){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(r,n,o,s){function a(e){f.state=e[0],f.params=e[1],f.options=e[2],f.href=t.href(f.state,f.params,f.options),m&&m(),u&&(m=u.$$addStateInfo(f.state,f.params)),f.href&&o.$set(l.attr,f.href)}var i,l=x(n),u=s[1]||s[0],c=[o.uiState,o.uiStateParams||null,o.uiStateOpts||null],p="["+c.map(function(t){return t||"null"}).join(", ")+"]",f={state:null,params:null,options:null,href:null},m=null;r.$watch(p,a,!0),a(r.$eval(p)),l.clickable&&(i=I(n,t,e,l,function(){return f}),n[n.on?"on":"bind"]("click",i),r.$on("$destroy",function(){n[n.off?"off":"unbind"]("click",i)}))}}}function L(t,e,r){return{restrict:"A",controller:["$scope","$element","$attrs","$timeout",function(e,n,o,s){function a(e,r,o){var s=t.get(e,T(n)),a=i(e,r),l={state:s||{name:e},params:r,hash:a};return g.push(l),v[a]=o,function(){var t=g.indexOf(l);t!==-1&&g.splice(t,1)}}function i(t,r){if(!H(t))throw new Error("state should be a string");return V(r)?t+G(r):(r=e.$eval(r),V(r)?t+G(r):t)}function l(){for(var t=0;t0)){var r=a(t,e,d);return l(),r}},e.$on("$stateChangeSuccess",l),l()}]}}function U(t){var e=function(e,r){return t.is(e,r)};return e.$stateful=!0,e}function q(t){var e=function(e,r,n){return t.includes(e,r,n)};return e.$stateful=!0,e}var O=e.isDefined,k=e.isFunction,H=e.isString,V=e.isObject,R=e.isArray,B=e.forEach,_=e.extend,z=e.copy,G=e.toJson;e.module("ui.router.util",["ng"]),e.module("ui.router.router",["ui.router.util"]),e.module("ui.router.state",["ui.router.router","ui.router.util"]),e.module("ui.router",["ui.router.state"]),e.module("ui.router.compat",["ui.router"]),v.$inject=["$q","$injector"],e.module("ui.router.util").service("$resolve",v),h.$inject=["$http","$templateCache","$injector"],e.module("ui.router.util").service("$templateFactory",h);var Y;$.prototype.concat=function(t,e){var r={caseInsensitive:Y.caseInsensitive(),strict:Y.strictMode(),squash:Y.defaultSquashPolicy()};return new $(this.sourcePath+t+this.sourceSearch,_(r,e),this)},$.prototype.toString=function(){return this.source},$.prototype.exec=function(t,e){function r(t){function e(t){return t.split("").reverse().join("")}function r(t){return t.replace(/\\-/g,"-")}var n=e(t).split(/-(?!\\)/),o=d(n,e);return d(o,r).reverse()}var n=this.regexp.exec(t);if(!n)return null;e=e||{};var o,s,a,i=this.parameters(),l=i.length,u=this.segments.length-1,c={};if(u!==n.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");var p,f;for(o=0;o0&&(e.disqus_config=function(){this.page.remote_auth_s3=s.remote_auth_s3,this.page.api_key=s.api_key})}function u(){var r=e.DISQUSWIDGETS;r&&t.isFunction(r.getCount)&&r.getCount()}function c(t,r,n){var s=o();e.DISQUS.reset({reload:!0,config:function(){this.page.identifier=r,this.page.url=t.absUrl(),this.page.title=n,this.page.remote_auth_s3=s.remote_auth_s3,this.page.api_key=s.api_key}})}function p(t){var e=n(),o=r(),l=s(e,t);i(o,l)||o.appendChild(a(l))}var f,m="embed.js",d="count.js";this.setShortname=function(t){f=t},this.$get=["$location",function(r){function o(n,o){if(!t.isDefined(f))throw new Error("No disqus shortname defined");if(!t.isDefined(n))throw new Error("No disqus thread id defined");t.isDefined(e.DISQUS)?c(r,n,o):(l(r,n,o),p(m))}function s(n){e.disqus_sso=n,t.isDefined(e.DISQUS)&&c(r,e.disqus_identifier,e.disqus_title)}function a(t){l(r,t),p(m),p(d),u()}return{commit:o,getShortname:n,setSso:s,loadCount:a}}]}),r.service("disqusService",["$disqus",function(t){return{setSso:function(e){t.setSso(e)}}}]),r.directive("disqus",["$disqus",function(e){return{restrict:"AC",replace:!0,scope:{id:"=disqus",title:"=title"},template:'
',link:function(r){r.$watch("id",function(n){t.isDefined(n)&&e.commit(n,r.title)})}}}]),r.directive("disqusIdentifier",["$disqus",function(t){return{restrict:"A",link:function(e,r,n){t.loadCount(n.disqusIdentifier)}}}])}(angular,this),angular.module("frontpress.template-cache",[]),angular.module("frontpress.template-cache").run(["$templateCache",function(t){t.put("/js/components/featured-image/templates/featured-image.template.html",''),t.put("/js/components/full-post/templates/full-post-author-name.template.html",''),t.put("/js/components/full-post/templates/full-post-categories-list.template.html",'
\n\t

carregando categorias...

\n\t

\n\t\tcategorias:\t\n\t\t\t\t\n\t\t{{category.name}}{{$last ? "" : ", "}}\t\t\n\t\t\t\t\n\t

\n
'),t.put("/js/components/full-post/templates/full-post-content-v1.template.html",'
'),t.put("/js/components/full-post/templates/full-post-content-v2.template.html",'
'),t.put("/js/components/full-post/templates/full-post-tags-list.template.html",'
\n\t

carregando tags...

\n\t

\n\t\ttags:\t\n\t\t\t\t\n\t\t{{tag.name}}{{$last ? "" : ", "}}\t\t\n\t\t\t\t\n\t

\n
'),t.put("/js/components/full-post/templates/full-post-title-v1.template.html",'

'),t.put("/js/components/full-post/templates/full-post-title-v2.template.html",'

'),t.put("/js/components/full-post/templates/full-post.template.html",'
\t\n\t

carregando...

\n\t
\t\t\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t \n\t\t\n\t\t \n\t\t \n\t
\n
'),t.put("/js/components/list-posts/templates/list-posts-excerpt-v1.template.html",'

'),t.put("/js/components/list-posts/templates/list-posts-excerpt-v2.template.html",'

'),t.put("/js/components/list-posts/templates/list-posts-title-v1.template.html",'

'),t.put("/js/components/list-posts/templates/list-posts-title-v2.template.html",'

'),t.put("/js/components/list-posts/templates/list-posts.template.html",'
\n\t

Carregando posts

\n\t
\t\n\t\t\t\n\t\t\n\t\t\t\n\t\t\n \n\t
\n
\n'),t.put("/js/components/page-head/templates/page-head.template.html",'\n\n\n\t\n\n\n\n\n\n'),t.put("/js/components/pagination/templates/pagination.template.html",'
\n\t<<\n\t\n\t\t\t\n\n\t>>\n
'), -t.put("/js/components/post-date/templates/post-date.template.html","

"),t.put("/js/components/share/templates/share.template.html","
\n Share:\n Twitter\n Facebook\n Google+\n
\n"),t.put("/js/views/home/templates/home.template.html",'
\n\t
\n\t\t\n\t\tCarregando posts novos ...\n\t\t\n\t
\n
'),t.put("/js/views/post/templates/post.template.html","
\n\t\n
")}]),angular.module("frontpress",["frontpress.views","frontpress.apis.blog","frontpress.components.slugs-map","frontpress.components.frontpress-provider","frontpress.template-cache"]),angular.module("frontpress").config(FrontPressConfig),FrontPressConfig.$inject=["$qProvider"],angular.module("frontpress").run(frontpressRun),angular.module("frontpress.apis.configs-to-params",[]),angular.module("frontpress.apis.configs-to-params").factory("ConfigsToParams",ConfigsToParams),angular.module("frontpress.filters",[]),angular.module("frontpress.views",["frontpress.views.home","frontpress.views.post"]),angular.module("frontpress.components.ajax",[]),angular.module("frontpress.components.api-manager",["frontpress.apis.api-manager-map"]),angular.module("frontpress.components.blog",["frontpress.components.frontpress-provider","frontpress.components.api-manager","frontpress.apis.blog"]),angular.module("frontpress.components.featured-image",["frontpress.components.frontpress-provider"]),angular.module("frontpress.components.frontpress-provider",["ngDisqus","frontpress.components.frontpress-provider-constant"]),angular.module("frontpress.components.full-post",["frontpress.filters","frontpress.apis.tags","frontpress.apis.posts","frontpress.apis.categories","frontpress.apis.media","frontpress.components.post-date","frontpress.apis.api-manager-map","frontpress.components.blog","frontpress.components.featured-image","frontpress.components.frontpress-provider"]),angular.module("frontpress.components.list-posts",["frontpress.filters","frontpress.components.slugs-map","frontpress.apis.posts","frontpress.apis.media","frontpress.components.api-manager","frontpress.components.post-date","frontpress.components.featured-image","frontpress.components.frontpress-provider"]),angular.module("frontpress.components.page-head",["frontpress.components.frontpress-provider"]),angular.module("frontpress.components.pagination",["frontpress.components.page-head","frontpress.components.frontpress-provider"]),angular.module("frontpress.components.post-date",["frontpress.components.frontpress-provider"]),angular.module("frontpress.components.share",["frontpress.filters","frontpress.apis.api-manager-map","frontpress.components.frontpress-provider"]),angular.module("frontpress.components.slugs-map",["frontpress.apis.posts","frontpress.apis.api-manager-map"]),angular.module("frontpress.views.home",["ui.router","infinite-scroll","frontpress.components.api-manager","frontpress.components.pagination","frontpress.components.list-posts","frontpress.components.page-head","frontpress.components.blog","frontpress.components.frontpress-provider"]),angular.module("frontpress.views.post",["frontpress.components.full-post","frontpress.components.share","ui.router","frontpress.components.page-head","frontpress.components.blog","ngDisqus","frontpress.components.slugs-map","frontpress.components.api-manager","frontpress.components.frontpress-provider"]),angular.module("frontpress.components.featured-image").directive("featuredImage",FeaturedImageDirective),FeaturedImageDirective.$inject=["$FrontPress"],angular.module("frontpress.components.full-post").directive("fullPostAuthorName",FullPostAuthorNameDirective),FullPostAuthorNameDirective.$inject=["$FrontPress"],angular.module("frontpress.components.full-post").directive("fullPostCategoriesList",FullPostCategoriesListDirective),FullPostCategoriesListDirective.$inject=["$FrontPress"],angular.module("frontpress.components.full-post").directive("fullPostContent",FullPostContentDirective),FullPostContentDirective.$inject=["$FrontPress"],angular.module("frontpress.components.full-post").directive("fullPostTagsList",FullPostTagListDirective),FullPostTagListDirective.$inject=["$FrontPress"],angular.module("frontpress.components.full-post").directive("fullPostTitle",FullPostTitleDirective),FullPostTitleDirective.$inject=["$FrontPress"],angular.module("frontpress.components.full-post").directive("fullPost",FullPostDirective),FullPostDirective.$inject=["$FrontPress"],angular.module("frontpress.components.list-posts").directive("listPostsExcerpt",ListPostsExcerptDirective),ListPostsExcerptDirective.$inject=["$FrontPress"],angular.module("frontpress.components.list-posts").directive("listPostsTitle",ListPostsTitleDirective),ListPostsTitleDirective.$inject=["$FrontPress"],angular.module("frontpress.components.list-posts").directive("listPosts",ListPostsDirective),ListPostsDirective.$inject=["$FrontPress"],angular.module("frontpress.components.page-head").directive("pageHead",PageHead),PageHead.$inject=["$FrontPress"],angular.module("frontpress.components.pagination").directive("pagination",Pagination),Pagination.$inject=["$FrontPress"],angular.module("frontpress.components.post-date").directive("postDate",PostDateDirective),PostDateDirective.$inject=["$FrontPress"],angular.module("frontpress.components.share").directive("share",Share),Share.$inject=["$FrontPress"],angular.module("frontpress.views.home").directive("homeView",HomeViewDirective),HomeViewDirective.$inject=["$FrontPress"],angular.module("frontpress.views.post").directive("postView",PostViewDirective),PostViewDirective.$inject=["$FrontPress"],angular.module("infinite-scroll").value("THROTTLE_MILLISECONDS",1e3),angular.module("frontpress.components.frontpress-provider-constant",[]).constant("FrontPressConfigurationFile",{}),angular.module("frontpress.filters").filter("trustAsHtml",TrustAsHtml),TrustAsHtml.$inject=["$sce"],angular.module("frontpress.components.ajax").factory("AjaxModel",AjaxModel),AjaxModel.$inject=["$http"],angular.module("frontpress.components.api-manager").service("ApiManager",ApiManager),ApiManager.$inject=["ApiManagerMap"],angular.module("frontpress.components.blog").factory("BlogModel",BlogModel),BlogModel.$inject=["BlogApi","$q","ApiManager","$FrontPress"],angular.module("frontpress.components.featured-image").controller("FeaturedImageDirectiveController",FeaturedImageDirectiveController),angular.module("frontpress.components.frontpress-provider").provider("$FrontPress",FrontPressProvider),FrontPressProvider.$inject=["$disqusProvider","$stateProvider","FrontPressConfigurationFile"],angular.module("frontpress.components.full-post").controller("FullPostCategoriesListDirectiveController",FullPostCategoriesListDirectiveController),angular.module("frontpress.components.full-post").controller("FullPostDirectiveController",FullPostDirectiveController),FullPostDirectiveController.$inject=["FullPostModel","BlogModel"],angular.module("frontpress.components.full-post").controller("FullPostGenericDirectiveController",FullPostGenericDirectiveController),angular.module("frontpress.components.full-post").controller("FullPostTagsListDirectiveController",FullPostTagsListDirectiveController),angular.module("frontpress.components.full-post").factory("FullPostModel",FullPostModel),FullPostModel.$inject=["PostsApi","TagsApi","CategoriesApi","$q","MediaApi","$FrontPress","ApiManagerMap"],angular.module("frontpress.components.list-posts").controller("ListPostsDirectiveController",ListPostsDirectiveController),ListPostsDirectiveController.$inject=["ListPostsModel"],angular.module("frontpress.components.list-posts").controller("ListPostsGenericDirectiveController",ListPostsGenericDirectiveController),angular.module("frontpress.components.list-posts").factory("ListPostsModel",ListPostsModel),ListPostsModel.$inject=["PostsApi","MediaApi","$q","SlugsMapModel","ApiManager"],angular.module("frontpress.components.page-head").controller("PageHeadController",PageHeadController),PageHeadController.$inject=["PageHeadModel"],angular.module("frontpress.components.page-head").factory("PageHeadModel",PageHeadModel),PageHeadModel.$inject=["$location","$FrontPress"],angular.module("frontpress.components.pagination").controller("PaginationController",PaginationController),PaginationController.$inject=["PaginationModel"],angular.module("frontpress.components.pagination").factory("PaginationModel",PaginationModel),PaginationModel.$inject=["PageHeadModel"],angular.module("frontpress.components.post-date").controller("PostDateDirectiveController",PostDateDirectiveController),PostDateDirectiveController.$inject=[],angular.module("frontpress.components.share").controller("ShareController",ShareController),ShareController.$inject=["ShareModel"],angular.module("frontpress.components.share").factory("ShareModel",ShareModel),ShareModel.$inject=["$window","ApiManager"],angular.module("frontpress.components.slugs-map").factory("SlugsMapModel",SlugsMapModel),SlugsMapModel.$inject=["$cacheFactory","PostsApi","ApiManagerMap"],angular.module("frontpress.views.home").controller("HomeDirectiveController",HomeDirectiveController),HomeDirectiveController.$inject=["$stateParams","ListPostsModel","$state","$FrontPress","BlogModel","PageHeadModel","$location","PaginationModel"],angular.module("frontpress.views.home").controller("HomeRouteController",HomeRouteController),HomeRouteController.$inject=[],angular.module("frontpress.views.post").controller("PostDirectiveController",PostDirectiveController),PostDirectiveController.$inject=["FullPostModel","$stateParams","PageHeadModel","SlugsMapModel","CategoriesApi","ApiManager","ApiManagerMap","BlogModel","$q"],angular.module("frontpress.views.post").controller("PostRouteController",PostRouteController),PostRouteController.$inject=[],angular.module("frontpress.apis.api-manager-map",[]),angular.module("frontpress.apis.blog",["frontpress.components.ajax","frontpress.components.frontpress-provider"]),angular.module("frontpress.apis.categories",["frontpress.components.ajax","frontpress.components.frontpress-provider","frontpress.apis.configs-to-params"]),angular.module("frontpress.apis.media",["frontpress.components.ajax","frontpress.components.frontpress-provider","frontpress.apis.configs-to-params"]),angular.module("frontpress.apis.posts",["frontpress.components.ajax","frontpress.components.frontpress-provider","frontpress.apis.configs-to-params"]),angular.module("frontpress.apis.tags",["frontpress.components.ajax","frontpress.components.frontpress-provider","frontpress.apis.configs-to-params"]),angular.module("frontpress.apis.api-manager-map").constant("ApiManagerMap",{totalPostsNumber:["found"],allPostsPath:["posts"],postTitle:["title"],postId:["ID"],postDate:["date"],siteName:["name"],siteDescription:["description"]}),angular.module("frontpress.apis.blog").factory("BlogApi",BlogApi),BlogApi.$inject=["AjaxModel","$FrontPress"],angular.module("frontpress.apis.categories").factory("CategoriesApi",CategoriesApi),CategoriesApi.$inject=["AjaxModel","$FrontPress","ConfigsToParams"],MediaApi.$inject=["AjaxModel","$FrontPress","ConfigsToParams"],angular.module("frontpress.apis.media").factory("MediaApi",MediaApi),angular.module("frontpress.apis.posts").factory("PostsApi",PostsApi),PostsApi.$inject=["AjaxModel","$FrontPress","ConfigsToParams"],angular.module("frontpress.apis.categories").factory("TagsApi",TagsApi),TagsApi.$inject=["AjaxModel","$FrontPress","ConfigsToParams"]; \ No newline at end of file +t.put("/js/components/post-date/templates/post-date.template.html","

"),t.put("/js/components/share/templates/share.template.html","
\n Share:\n Twitter\n Facebook\n Google+\n
\n"),t.put("/js/views/home/templates/home.template.html",'
\n\t
\n\t\t\n\t\tCarregando posts novos ...\n\t\t\n\t
\n
'),t.put("/js/views/post/templates/post.template.html","
\n\t\n
")}]),angular.module("frontpress",["frontpress.views","frontpress.apis.blog","frontpress.components.slugs-map","frontpress.components.frontpress-provider","frontpress.template-cache"]),angular.module("frontpress").config(FrontPressConfig),FrontPressConfig.$inject=["$qProvider"],angular.module("frontpress").run(frontpressRun),angular.module("frontpress.apis.configs-to-params",[]),angular.module("frontpress.apis.configs-to-params").factory("ConfigsToParams",ConfigsToParams),angular.module("frontpress.filters",[]),angular.module("frontpress.views",["frontpress.views.home","frontpress.views.post"]),angular.module("frontpress.components.ajax",[]),angular.module("frontpress.components.api-manager",["frontpress.apis.api-manager-map"]),angular.module("frontpress.components.blog",["frontpress.components.frontpress-provider","frontpress.components.api-manager","frontpress.apis.blog"]),angular.module("frontpress.components.featured-image",["frontpress.components.frontpress-provider"]),angular.module("frontpress.components.frontpress-provider",["ngDisqus","frontpress.components.frontpress-provider-constant"]),angular.module("frontpress.components.full-post",["frontpress.filters","frontpress.apis.tags","frontpress.apis.posts","frontpress.apis.categories","frontpress.apis.media","frontpress.components.post-date","frontpress.apis.api-manager-map","frontpress.components.blog","frontpress.components.featured-image","frontpress.components.frontpress-provider"]),angular.module("frontpress.components.list-posts",["frontpress.filters","frontpress.components.slugs-map","frontpress.apis.posts","frontpress.apis.media","frontpress.components.api-manager","frontpress.components.post-date","frontpress.components.featured-image","frontpress.components.frontpress-provider"]),angular.module("frontpress.components.page-head",["frontpress.components.frontpress-provider"]),angular.module("frontpress.components.pagination",["frontpress.components.page-head","frontpress.components.frontpress-provider"]),angular.module("frontpress.components.post-date",["frontpress.components.frontpress-provider"]),angular.module("frontpress.components.share",["frontpress.filters","frontpress.apis.api-manager-map","frontpress.components.frontpress-provider"]),angular.module("frontpress.components.slugs-map",["frontpress.apis.posts","frontpress.apis.api-manager-map"]),angular.module("frontpress.views.home",["ui.router","infinite-scroll","frontpress.components.api-manager","frontpress.components.pagination","frontpress.components.list-posts","frontpress.components.page-head","frontpress.components.blog","frontpress.components.frontpress-provider"]),angular.module("frontpress.views.post",["frontpress.components.full-post","frontpress.components.share","ui.router","frontpress.components.page-head","frontpress.components.blog","ngDisqus","frontpress.components.slugs-map","frontpress.components.api-manager","frontpress.components.frontpress-provider"]),angular.module("frontpress.components.featured-image").directive("featuredImage",FeaturedImageDirective),FeaturedImageDirective.$inject=["$FrontPress"],angular.module("frontpress.components.full-post").directive("fullPostAuthorName",FullPostAuthorNameDirective),FullPostAuthorNameDirective.$inject=["$FrontPress"],angular.module("frontpress.components.full-post").directive("fullPostCategoriesList",FullPostCategoriesListDirective),FullPostCategoriesListDirective.$inject=["$FrontPress"],angular.module("frontpress.components.full-post").directive("fullPostContent",FullPostContentDirective),FullPostContentDirective.$inject=["$FrontPress"],angular.module("frontpress.components.full-post").directive("fullPostTagsList",FullPostTagListDirective),FullPostTagListDirective.$inject=["$FrontPress"],angular.module("frontpress.components.full-post").directive("fullPostTitle",FullPostTitleDirective),FullPostTitleDirective.$inject=["$FrontPress"],angular.module("frontpress.components.full-post").directive("fullPost",FullPostDirective),FullPostDirective.$inject=["$FrontPress"],angular.module("frontpress.components.list-posts").directive("listPostsExcerpt",ListPostsExcerptDirective),ListPostsExcerptDirective.$inject=["$FrontPress"],angular.module("frontpress.components.list-posts").directive("listPostsTitle",ListPostsTitleDirective),ListPostsTitleDirective.$inject=["$FrontPress"],angular.module("frontpress.components.list-posts").directive("listPosts",ListPostsDirective),ListPostsDirective.$inject=["$FrontPress"],angular.module("frontpress.components.page-head").directive("pageHead",PageHead),PageHead.$inject=["$FrontPress"],angular.module("frontpress.components.pagination").directive("pagination",Pagination),Pagination.$inject=["$FrontPress"],angular.module("frontpress.components.post-date").directive("postDate",PostDateDirective),PostDateDirective.$inject=["$FrontPress"],angular.module("frontpress.components.share").directive("share",Share),Share.$inject=["$FrontPress"],angular.module("frontpress.views.home").directive("homeView",HomeViewDirective),HomeViewDirective.$inject=["$FrontPress"],angular.module("frontpress.views.post").directive("postView",PostViewDirective),PostViewDirective.$inject=["$FrontPress"],angular.module("infinite-scroll").value("THROTTLE_MILLISECONDS",1e3),angular.module("frontpress.components.frontpress-provider-constant",[]).constant("FrontPressConfigurationFile",{}),angular.module("frontpress.filters").filter("trustAsHtml",TrustAsHtml),TrustAsHtml.$inject=["$sce"],angular.module("frontpress.components.api-manager").service("ApiManager",ApiManager),ApiManager.$inject=["ApiManagerMap"],angular.module("frontpress.components.ajax").factory("AjaxModel",AjaxModel),AjaxModel.$inject=["$http"],angular.module("frontpress.components.blog").factory("BlogModel",BlogModel),BlogModel.$inject=["BlogApi","$q","ApiManager","$FrontPress"],angular.module("frontpress.components.featured-image").controller("FeaturedImageDirectiveController",FeaturedImageDirectiveController),angular.module("frontpress.components.frontpress-provider").provider("$FrontPress",FrontPressProvider),FrontPressProvider.$inject=["$disqusProvider","$stateProvider","FrontPressConfigurationFile"],angular.module("frontpress.components.full-post").controller("FullPostCategoriesListDirectiveController",FullPostCategoriesListDirectiveController),angular.module("frontpress.components.full-post").controller("FullPostDirectiveController",FullPostDirectiveController),FullPostDirectiveController.$inject=["FullPostModel","BlogModel"],angular.module("frontpress.components.full-post").controller("FullPostGenericDirectiveController",FullPostGenericDirectiveController),angular.module("frontpress.components.full-post").controller("FullPostTagsListDirectiveController",FullPostTagsListDirectiveController),angular.module("frontpress.components.full-post").factory("FullPostModel",FullPostModel),FullPostModel.$inject=["PostsApi","TagsApi","CategoriesApi","$q","MediaApi","$FrontPress","ApiManagerMap"],angular.module("frontpress.components.list-posts").controller("ListPostsDirectiveController",ListPostsDirectiveController),ListPostsDirectiveController.$inject=["ListPostsModel"],angular.module("frontpress.components.list-posts").controller("ListPostsGenericDirectiveController",ListPostsGenericDirectiveController),angular.module("frontpress.components.list-posts").factory("ListPostsModel",ListPostsModel),ListPostsModel.$inject=["PostsApi","MediaApi","$q","SlugsMapModel","ApiManager"],angular.module("frontpress.components.page-head").controller("PageHeadController",PageHeadController),PageHeadController.$inject=["PageHeadModel"],angular.module("frontpress.components.page-head").factory("PageHeadModel",PageHeadModel),PageHeadModel.$inject=["$location","$FrontPress"],angular.module("frontpress.components.pagination").controller("PaginationController",PaginationController),PaginationController.$inject=["PaginationModel"],angular.module("frontpress.components.pagination").factory("PaginationModel",PaginationModel),PaginationModel.$inject=["PageHeadModel"],angular.module("frontpress.components.post-date").controller("PostDateDirectiveController",PostDateDirectiveController),PostDateDirectiveController.$inject=[],angular.module("frontpress.components.share").controller("ShareController",ShareController),ShareController.$inject=["ShareModel"],angular.module("frontpress.components.share").factory("ShareModel",ShareModel),ShareModel.$inject=["$window","ApiManager"],angular.module("frontpress.components.slugs-map").factory("SlugsMapModel",SlugsMapModel),SlugsMapModel.$inject=["$cacheFactory","PostsApi","ApiManagerMap"],angular.module("frontpress.views.home").controller("HomeDirectiveController",HomeDirectiveController),HomeDirectiveController.$inject=["$stateParams","ListPostsModel","$state","$FrontPress","BlogModel","PageHeadModel","$location","PaginationModel"],angular.module("frontpress.views.home").controller("HomeRouteController",HomeRouteController),HomeRouteController.$inject=[],angular.module("frontpress.views.post").controller("PostDirectiveController",PostDirectiveController),PostDirectiveController.$inject=["FullPostModel","$stateParams","PageHeadModel","SlugsMapModel","CategoriesApi","ApiManager","ApiManagerMap","BlogModel","$q"],angular.module("frontpress.views.post").controller("PostRouteController",PostRouteController),PostRouteController.$inject=[],angular.module("frontpress.apis.api-manager-map",[]),angular.module("frontpress.apis.blog",["frontpress.components.ajax","frontpress.components.frontpress-provider"]),angular.module("frontpress.apis.categories",["frontpress.components.ajax","frontpress.components.frontpress-provider","frontpress.apis.configs-to-params"]),angular.module("frontpress.apis.media",["frontpress.components.ajax","frontpress.components.frontpress-provider","frontpress.apis.configs-to-params"]),angular.module("frontpress.apis.posts",["frontpress.components.ajax","frontpress.components.frontpress-provider","frontpress.apis.configs-to-params"]),angular.module("frontpress.apis.tags",["frontpress.components.ajax","frontpress.components.frontpress-provider","frontpress.apis.configs-to-params"]),angular.module("frontpress.apis.api-manager-map").constant("ApiManagerMap",{totalPostsNumber:["found"],allPostsPath:["posts"],postTitle:["title"],postId:["ID"],postDate:["date"],siteName:["name"],siteDescription:["description"]}),angular.module("frontpress.apis.blog").factory("BlogApi",BlogApi),BlogApi.$inject=["AjaxModel","$FrontPress"],angular.module("frontpress.apis.categories").factory("CategoriesApi",CategoriesApi),CategoriesApi.$inject=["AjaxModel","$FrontPress","ConfigsToParams"],MediaApi.$inject=["AjaxModel","$FrontPress","ConfigsToParams"],angular.module("frontpress.apis.media").factory("MediaApi",MediaApi),angular.module("frontpress.apis.posts").factory("PostsApi",PostsApi),PostsApi.$inject=["AjaxModel","$FrontPress","ConfigsToParams"],angular.module("frontpress.apis.categories").factory("TagsApi",TagsApi),TagsApi.$inject=["AjaxModel","$FrontPress","ConfigsToParams"]; \ No newline at end of file