(function(){'use strict';if(typeof angular!=='undefined'){var root=this;var $=root.jQuery;var controllers={};var app=root.app;app.config(function($routeProvider){$routeProvider.when('/account/',{templateUrl:'https://snipt.s3.amazonaws.com/static/js/src/modules/partials/profile.html',controller:controllers.ProfileController});$routeProvider.when('/account/billing/',{templateUrl:'https://snipt.s3.amazonaws.com/static/js/src/modules/partials/billing.html',controller:controllers.BillingController});$routeProvider.when('/account/blogging/',{templateUrl:'https://snipt.s3.amazonaws.com/static/js/src/modules/partials/blogging.html',controller:controllers.BloggingController});$routeProvider.when('/account/editor/',{templateUrl:'https://snipt.s3.amazonaws.com/static/js/src/modules/partials/editor.html',controller:controllers.EditorController});$routeProvider.otherwise({'redirectTo':function(routeParams,locationPath){window.location=locationPath;}});});app.factory('AccountStorage',function($http){return{cancelSubscription:function(){var promise=$http({method:'GET',url:'/account/cancel-subscription/',headers:{'Authorization':'ApiKey '+window.user+':'+window.api_key}});return promise;},getAccount:function(){var promise=$http({method:'GET',url:'/api/private/profile/'+window.user_profile_id+'/',headers:{'Authorization':'ApiKey '+window.user+':'+window.api_key}});return promise;},getStripeAccount:function(){var promise=$http({method:'GET',url:'/account/stripe-account-details/'});return promise;},saveAccount:function(user,fields){var promise=$http({method:'PUT',url:'/api/private/profile/'+window.user_profile_id+'/',headers:{'Authorization':'ApiKey '+window.user+':'+window.api_key},data:function(){var userData={};for(var i=0;i