From b3b79bbea3b093d8ca2cfacd0fbcd6afcbb52007 Mon Sep 17 00:00:00 2001 From: pc035860 Date: Tue, 3 Feb 2015 17:23:08 +0800 Subject: [PATCH 1/2] Browserify support. #39 --- .jshintrc | 10 + Gruntfile.js | 48 ++-- angular-highlightjs.js | 42 ++-- build/angular-highlightjs.js | 382 +++++++++++++++++++++++++++++++ build/angular-highlightjs.min.js | 6 + example/index.html | 2 +- package.json | 9 +- 7 files changed, 457 insertions(+), 42 deletions(-) create mode 100644 .jshintrc create mode 100644 build/angular-highlightjs.js create mode 100644 build/angular-highlightjs.min.js diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000..dca35eb --- /dev/null +++ b/.jshintrc @@ -0,0 +1,10 @@ +{ + "curly": true, + "multistr": true, + "expr": true, + "boss": true, + "undef": true, + "predef": [ + "require", "define", "escape", "module" + ] +} diff --git a/Gruntfile.js b/Gruntfile.js index 01fba86..ee6b887 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,31 +1,44 @@ module.exports = function(grunt) { grunt.initConfig({ + modulename: 'hljs', + builddir: 'build', pkg: grunt.file.readJSON('package.json'), + meta: { + banner: + '/*! <%= pkg.name %>\n' + + 'version: <%= pkg.version %>\n' + + 'build date: <%= grunt.template.today("yyyy-mm-dd") %>\n' + + 'author: <%= pkg.author %>\n' + + '<%= pkg.repository.url %> */' + }, jshint: { - options: { - curly: true, - multistr: true, - expr: true, - boss: true, - undef: true - }, beforeuglify: ['<%= pkg.name %>.js'], gruntfile: ['Gruntfile.js'] }, - uglify: { + concat: { + options: { + banner: '<%= meta.banner %>\n\n'+ + '/* commonjs package manager support (eg componentjs) */\n'+ + 'if (typeof module !== "undefined" && typeof exports !== "undefined" && module.exports === exports){\n'+ + ' module.exports = \'<%= modulename %>\';\n'+ + '}\n\n'+ + '(function (window, angular, undefined) {\n', + footer: '})(window, window.angular);' + }, build: { src: '<%= pkg.name %>.js', - dest: '<%= pkg.name %>.min.js' - }, + dest: '<%= builddir %>/<%= pkg.name %>.js' + } + }, + uglify: { options: { mangle: true, compress: true, - banner: - '/*! <%= pkg.name %>\n' + - 'version: <%= pkg.version %>\n' + - 'build date: <%= grunt.template.today("yyyy-mm-dd") %>\n' + - 'author: <%= pkg.author %>\n' + - '<%= pkg.repository.url %> */\n' + banner: '<%= meta.banner %>\n' + }, + build: { + src: '<%= builddir %>/<%= pkg.name %>.js', + dest: '<%= builddir %>/<%= pkg.name %>.min.js' } }, watch: { @@ -53,7 +66,8 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-connect'); + grunt.loadNpmTasks('grunt-contrib-concat'); - grunt.registerTask('default', ['jshint:beforeuglify', 'uglify']); + grunt.registerTask('default', ['jshint:beforeuglify', 'concat:build', 'uglify:build']); }; diff --git a/angular-highlightjs.js b/angular-highlightjs.js index 9d150f7..1180778 100644 --- a/angular-highlightjs.js +++ b/angular-highlightjs.js @@ -1,7 +1,4 @@ /*global angular*/ -(function (module) { - -var dirHljs, dirLanguageFactory, dirSourceFactory, dirIncludeFactory; function shouldHighlightStatics(attrs) { var should = true; @@ -15,12 +12,13 @@ function shouldHighlightStatics(attrs) { return should; } -module + +var ngModule = angular.module('hljs', []); /** * hljsService service */ -.provider('hljsService', function () { +ngModule.provider('hljsService', function () { var _hljsOptions = {}; return { @@ -35,21 +33,21 @@ module return $window.hljs; }] }; -}) +}); /** * hljsCache service */ -.factory('hljsCache', [ +ngModule.factory('hljsCache', [ '$cacheFactory', function ($cacheFactory) { return $cacheFactory('hljsCache'); -}]) +}]); /** * HljsCtrl controller */ -.controller('HljsCtrl', [ +ngModule.controller('HljsCtrl', [ 'hljsCache', 'hljsService', function HljsCtrl (hljsCache, hljsService) { var ctrl = this; @@ -133,10 +131,13 @@ function HljsCtrl (hljsCache, hljsService) { }; }]); + +var hljsDir, languageDirFactory, sourceDirFactory, includeDirFactory; + /** * hljs directive */ -dirHljs = ['$compile', '$parse', function ($compile, $parse) { +hljsDir = ['$compile', '$parse', function ($compile, $parse) { return { restrict: 'EA', controller: 'HljsCtrl', @@ -205,7 +206,7 @@ dirHljs = ['$compile', '$parse', function ($compile, $parse) { /** * language directive */ -dirLanguageFactory = function (dirName) { +languageDirFactory = function (dirName) { return [function () { return { require: '?hljs', @@ -227,7 +228,7 @@ dirLanguageFactory = function (dirName) { /** * source directive */ -dirSourceFactory = function (dirName) { +sourceDirFactory = function (dirName) { return ['$compile', '$parse', function ($compile, $parse) { return { require: '?hljs', @@ -267,7 +268,7 @@ dirSourceFactory = function (dirName) { /** * include directive */ -dirIncludeFactory = function (dirName) { +includeDirFactory = function (dirName) { return [ '$http', '$templateCache', '$q', '$compile', '$parse', function ($http, $templateCache, $q, $compile, $parse) { @@ -356,10 +357,11 @@ dirIncludeFactory = function (dirName) { }]; }; -module -.directive('hljs', dirHljs) -.directive('language', dirLanguageFactory('language')) -.directive('source', dirSourceFactory('source')) -.directive('include', dirIncludeFactory('include')); - -})(angular.module('hljs', [])); \ No newline at end of file +/** + * Add directives + */ +ngModule +.directive('hljs', hljsDir) +.directive('language', languageDirFactory('language')) +.directive('source', sourceDirFactory('source')) +.directive('include', includeDirFactory('include')); diff --git a/build/angular-highlightjs.js b/build/angular-highlightjs.js new file mode 100644 index 0000000..051a9e7 --- /dev/null +++ b/build/angular-highlightjs.js @@ -0,0 +1,382 @@ +/*! angular-highlightjs +version: 0.3.3 +build date: 2015-02-03 +author: Robin Fan +https://github.com/pc035860/angular-highlightjs.git */ + +/* commonjs package manager support (eg componentjs) */ +if (typeof module !== "undefined" && typeof exports !== "undefined" && module.exports === exports){ + module.exports = 'hljs'; +} + +(function (window, angular, undefined) { +/*jshint globalstrict: true*/ +/*global angular*/ +'use strict'; + +function shouldHighlightStatics(attrs) { + var should = true; + angular.forEach([ + 'source', 'include' + ], function (name) { + if (attrs[name]) { + should = false; + } + }); + return should; +} + + +var ngModule = angular.module('hljs', []); + +/** + * hljsService service + */ +ngModule.provider('hljsService', function () { + var _hljsOptions = {}; + + return { + setOptions: function (options) { + angular.extend(_hljsOptions, options); + }, + getOptions: function () { + return angular.copy(_hljsOptions); + }, + $get: ['$window', function ($window) { + ($window.hljs.configure || angular.noop)(_hljsOptions); + return $window.hljs; + }] + }; +}); + +/** + * hljsCache service + */ +ngModule.factory('hljsCache', [ + '$cacheFactory', +function ($cacheFactory) { + return $cacheFactory('hljsCache'); +}]); + +/** + * HljsCtrl controller + */ +ngModule.controller('HljsCtrl', [ + 'hljsCache', 'hljsService', +function HljsCtrl (hljsCache, hljsService) { + var ctrl = this; + + var _elm = null, + _lang = null, + _code = null, + _hlCb = null; + + ctrl.init = function (codeElm) { + _elm = codeElm; + }; + + ctrl.setLanguage = function (lang) { + _lang = lang; + + if (_code) { + ctrl.highlight(_code); + } + }; + + ctrl.highlightCallback = function (cb) { + _hlCb = cb; + }; + + ctrl.highlight = function (code) { + if (!_elm) { + return; + } + + var res, cacheKey; + + _code = code; + + if (_lang) { + // language specified + cacheKey = ctrl._cacheKey(_lang, _code); + res = hljsCache.get(cacheKey); + + if (!res) { + res = hljsService.highlight(_lang, hljsService.fixMarkup(_code), true); + hljsCache.put(cacheKey, res); + } + } + else { + // language auto-detect + cacheKey = ctrl._cacheKey(_code); + res = hljsCache.get(cacheKey); + + if (!res) { + res = hljsService.highlightAuto(hljsService.fixMarkup(_code)); + hljsCache.put(cacheKey, res); + } + } + + _elm.html(res.value); + // language as class on the tag + _elm.addClass(res.language); + + if (_hlCb !== null && angular.isFunction(_hlCb)) { + _hlCb(); + } + }; + + ctrl.clear = function () { + if (!_elm) { + return; + } + _code = null; + _elm.text(''); + }; + + ctrl.release = function () { + _elm = null; + }; + + ctrl._cacheKey = function () { + var args = Array.prototype.slice.call(arguments), + glue = "!angular-highlightjs!"; + return args.join(glue); + }; +}]); + + +var hljsDir, languageDirFactory, sourceDirFactory, includeDirFactory; + +/** + * hljs directive + */ +hljsDir = ['$compile', '$parse', function ($compile, $parse) { + return { + restrict: 'EA', + controller: 'HljsCtrl', + compile: function(tElm, tAttrs, transclude) { + // get static code + // strip the starting "new line" character + var staticHTML = tElm[0].innerHTML.replace(/^(\r\n|\r|\n)/m, ''), + staticText = tElm[0].textContent.replace(/^(\r\n|\r|\n)/m, ''); + + // put template + tElm.html('
'); + + return function postLink(scope, iElm, iAttrs, ctrl) { + var compileCheck, escapeCheck; + + if (angular.isDefined(iAttrs.compile)) { + compileCheck = $parse(iAttrs.compile); + } + + if (angular.isDefined(iAttrs.escape)) { + escapeCheck = $parse(iAttrs.escape); + } else if (angular.isDefined(iAttrs.noEscape)) { + escapeCheck = $parse('false'); + } + + ctrl.init(iElm.find('code')); + + if (iAttrs.onhighlight) { + ctrl.highlightCallback(function () { + scope.$eval(iAttrs.onhighlight); + }); + } + + if ((staticHTML || staticText) && shouldHighlightStatics(iAttrs)) { + + var code; + + // Auto-escape check + // default to "true" + if (escapeCheck && !escapeCheck(scope)) { + code = staticText; + } + else { + code = staticHTML; + } + + ctrl.highlight(code); + + // Check if the highlight result needs to be compiled + if (compileCheck && compileCheck(scope)) { + // compile the new DOM and link it to the current scope. + // NOTE: we only compile .childNodes so that + // we don't get into infinite loop compiling ourselves + $compile(iElm.find('code').contents())(scope); + } + } + + scope.$on('$destroy', function () { + ctrl.release(); + }); + }; + } + }; +}]; + +/** + * language directive + */ +languageDirFactory = function (dirName) { + return [function () { + return { + require: '?hljs', + restrict: 'A', + link: function (scope, iElm, iAttrs, ctrl) { + if (!ctrl) { + return; + } + iAttrs.$observe(dirName, function (lang) { + if (angular.isDefined(lang)) { + ctrl.setLanguage(lang); + } + }); + } + }; + }]; +}; + +/** + * source directive + */ +sourceDirFactory = function (dirName) { + return ['$compile', '$parse', function ($compile, $parse) { + return { + require: '?hljs', + restrict: 'A', + link: function(scope, iElm, iAttrs, ctrl) { + var compileCheck; + + if (!ctrl) { + return; + } + + if (angular.isDefined(iAttrs.compile)) { + compileCheck = $parse(iAttrs.compile); + } + + scope.$watch(iAttrs[dirName], function (newCode, oldCode) { + if (newCode) { + ctrl.highlight(newCode); + + // Check if the highlight result needs to be compiled + if (compileCheck && compileCheck(scope)) { + // compile the new DOM and link it to the current scope. + // NOTE: we only compile .childNodes so that + // we don't get into infinite loop compiling ourselves + $compile(iElm.find('code').contents())(scope); + } + } + else { + ctrl.clear(); + } + }); + } + }; + }]; +}; + +/** + * include directive + */ +includeDirFactory = function (dirName) { + return [ + '$http', '$templateCache', '$q', '$compile', '$parse', + function ($http, $templateCache, $q, $compile, $parse) { + return { + require: '?hljs', + restrict: 'A', + compile: function(tElm, tAttrs, transclude) { + var srcExpr = tAttrs[dirName]; + + return function postLink(scope, iElm, iAttrs, ctrl) { + var changeCounter = 0, compileCheck; + + if (!ctrl) { + return; + } + + if (angular.isDefined(iAttrs.compile)) { + compileCheck = $parse(iAttrs.compile); + } + + scope.$watch(srcExpr, function (src) { + var thisChangeId = ++changeCounter; + + if (src && angular.isString(src)) { + var templateCachePromise, dfd; + + templateCachePromise = $templateCache.get(src); + if (!templateCachePromise) { + dfd = $q.defer(); + $http.get(src, { + cache: $templateCache, + transformResponse: function(data, headersGetter) { + // Return the raw string, so $http doesn't parse it + // if it's json. + return data; + } + }).success(function (code) { + if (thisChangeId !== changeCounter) { + return; + } + dfd.resolve(code); + }).error(function() { + if (thisChangeId === changeCounter) { + ctrl.clear(); + } + dfd.resolve(); + }); + templateCachePromise = dfd.promise; + } + + $q.when(templateCachePromise) + .then(function (code) { + if (!code) { + return; + } + + // $templateCache from $http + if (angular.isArray(code)) { + // 1.1.5 + code = code[1]; + } + else if (angular.isObject(code)) { + // 1.0.7 + code = code.data; + } + + code = code.replace(/^(\r\n|\r|\n)/m, ''); + ctrl.highlight(code); + + // Check if the highlight result needs to be compiled + if (compileCheck && compileCheck(scope)) { + // compile the new DOM and link it to the current scope. + // NOTE: we only compile .childNodes so that + // we don't get into infinite loop compiling ourselves + $compile(iElm.find('code').contents())(scope); + } + }); + } + else { + ctrl.clear(); + } + }); + }; + } + }; + }]; +}; + +/** + * Add directives + */ +ngModule +.directive('hljs', hljsDir) +.directive('language', languageDirFactory('language')) +.directive('source', sourceDirFactory('source')) +.directive('include', includeDirFactory('include')); +})(window, window.angular); \ No newline at end of file diff --git a/build/angular-highlightjs.min.js b/build/angular-highlightjs.min.js new file mode 100644 index 0000000..f89c860 --- /dev/null +++ b/build/angular-highlightjs.min.js @@ -0,0 +1,6 @@ +/*! angular-highlightjs +version: 0.3.3 +build date: 2015-02-03 +author: Robin Fan +https://github.com/pc035860/angular-highlightjs.git */ +"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="hljs"),function(a,b){"use strict";function c(a){var c=!0;return b.forEach(["source","include"],function(b){a[b]&&(c=!1)}),c}var d=b.module("hljs",[]);d.provider("hljsService",function(){var a={};return{setOptions:function(c){b.extend(a,c)},getOptions:function(){return b.copy(a)},$get:["$window",function(c){return(c.hljs.configure||b.noop)(a),c.hljs}]}}),d.factory("hljsCache",["$cacheFactory",function(a){return a("hljsCache")}]),d.controller("HljsCtrl",["hljsCache","hljsService",function(a,c){var d=this,e=null,f=null,g=null,h=null;d.init=function(a){e=a},d.setLanguage=function(a){f=a,g&&d.highlight(g)},d.highlightCallback=function(a){h=a},d.highlight=function(i){if(e){var j,k;g=i,f?(k=d._cacheKey(f,g),j=a.get(k),j||(j=c.highlight(f,c.fixMarkup(g),!0),a.put(k,j))):(k=d._cacheKey(g),j=a.get(k),j||(j=c.highlightAuto(c.fixMarkup(g)),a.put(k,j))),e.html(j.value),e.addClass(j.language),null!==h&&b.isFunction(h)&&h()}},d.clear=function(){e&&(g=null,e.text(""))},d.release=function(){e=null},d._cacheKey=function(){var a=Array.prototype.slice.call(arguments),b="!angular-highlightjs!";return a.join(b)}}]);var e,f,g,h;e=["$compile","$parse",function(a,d){return{restrict:"EA",controller:"HljsCtrl",compile:function(e){var f=e[0].innerHTML.replace(/^(\r\n|\r|\n)/m,""),g=e[0].textContent.replace(/^(\r\n|\r|\n)/m,"");return e.html('
'),function(e,h,i,j){var k,l;if(b.isDefined(i.compile)&&(k=d(i.compile)),b.isDefined(i.escape)?l=d(i.escape):b.isDefined(i.noEscape)&&(l=d("false")),j.init(h.find("code")),i.onhighlight&&j.highlightCallback(function(){e.$eval(i.onhighlight)}),(f||g)&&c(i)){var m;m=l&&!l(e)?g:f,j.highlight(m),k&&k(e)&&a(h.find("code").contents())(e)}e.$on("$destroy",function(){j.release()})}}}}],f=function(a){return[function(){return{require:"?hljs",restrict:"A",link:function(c,d,e,f){f&&e.$observe(a,function(a){b.isDefined(a)&&f.setLanguage(a)})}}}]},g=function(a){return["$compile","$parse",function(c,d){return{require:"?hljs",restrict:"A",link:function(e,f,g,h){var i;h&&(b.isDefined(g.compile)&&(i=d(g.compile)),e.$watch(g[a],function(a){a?(h.highlight(a),i&&i(e)&&c(f.find("code").contents())(e)):h.clear()}))}}}]},h=function(a){return["$http","$templateCache","$q","$compile","$parse",function(c,d,e,f,g){return{require:"?hljs",restrict:"A",compile:function(h,i){var j=i[a];return function(a,h,i,k){var l,m=0;k&&(b.isDefined(i.compile)&&(l=g(i.compile)),a.$watch(j,function(g){var i=++m;if(g&&b.isString(g)){var j,n;j=d.get(g),j||(n=e.defer(),c.get(g,{cache:d,transformResponse:function(a){return a}}).success(function(a){i===m&&n.resolve(a)}).error(function(){i===m&&k.clear(),n.resolve()}),j=n.promise),e.when(j).then(function(c){c&&(b.isArray(c)?c=c[1]:b.isObject(c)&&(c=c.data),c=c.replace(/^(\r\n|\r|\n)/m,""),k.highlight(c),l&&l(a)&&f(h.find("code").contents())(a))})}else k.clear()}))}}}}]},d.directive("hljs",e).directive("language",f("language")).directive("source",g("source")).directive("include",h("include"))}(window,window.angular); \ No newline at end of file diff --git a/example/index.html b/example/index.html index f044197..710256a 100644 --- a/example/index.html +++ b/example/index.html @@ -13,7 +13,7 @@ - + diff --git a/package.json b/package.json index 96e3bca..91d6dcf 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "angular-highlightjs", "version": "0.3.3", "description": "AngularJS directive for syntax highlighting with highlight.js", - "main": "index.js", + "main": "./build/angular-highlightjs.js", "directories": {}, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" @@ -21,9 +21,10 @@ "readmeFilename": "README.md", "devDependencies": { "grunt": "~0.4.1", - "grunt-contrib-uglify": "~0.4.0", - "grunt-contrib-jshint": "~0.10.0", + "grunt-contrib-uglify": "~0.7.0", + "grunt-contrib-jshint": "~0.11.0", "grunt-contrib-watch": "~0.6.0", - "grunt-contrib-connect": "~0.7.0" + "grunt-contrib-connect": "~0.9.0", + "grunt-contrib-concat": "^0.5.0" } } From dcf5c958e2e710f7ecdc2cf45d759e61878afc1d Mon Sep 17 00:00:00 2001 From: pc035860 Date: Tue, 3 Feb 2015 17:24:24 +0800 Subject: [PATCH 2/2] Example for using angular-highlightjs with browserify. #39 --- with-browserify/index.html | 39 ++ with-browserify/package.json | 27 ++ with-browserify/scripts/app.js | 7 + with-browserify/scripts/bundle.js | 686 +++++++++++++++++++++++++++ with-browserify/scripts/main-ctrl.js | 28 ++ with-browserify/style.css | 26 + 6 files changed, 813 insertions(+) create mode 100644 with-browserify/index.html create mode 100644 with-browserify/package.json create mode 100644 with-browserify/scripts/app.js create mode 100644 with-browserify/scripts/bundle.js create mode 100644 with-browserify/scripts/main-ctrl.js create mode 100644 with-browserify/style.css diff --git a/with-browserify/index.html b/with-browserify/index.html new file mode 100644 index 0000000..534b98d --- /dev/null +++ b/with-browserify/index.html @@ -0,0 +1,39 @@ + + + + + + JSON pretty print with AngularJS + + + + + + + + + + +
+

JSON pretty print with AngularJS  powered by angular-highlightjs

+
+
+

JSON or Object expression

+
+ +
+
+
+

+ Pretty print     + tab width: +

+
+
+
+ +
+ + + + diff --git a/with-browserify/package.json b/with-browserify/package.json new file mode 100644 index 0000000..b53ab7c --- /dev/null +++ b/with-browserify/package.json @@ -0,0 +1,27 @@ +{ + "name": "with-browserify", + "version": "0.0.0", + "description": "", + "main": "./scripts/app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "build": "browserify . -d -o scripts/bundle.js" + }, + "author": "", + "license": "ISC", + "devDependencies": { + "angular": "^1.3.11", + "angular-highlightjs": "^0.4.0", + "browserify-shim": "^3.8.2" + }, + + "browserify": { + "transform": [ "browserify-shim" ] + }, + "browser": { + "angular": "./node_modules/angular/angular.min.js" + }, + "browserify-shim": { + "angular": "angular" + } +} diff --git a/with-browserify/scripts/app.js b/with-browserify/scripts/app.js new file mode 100644 index 0000000..9ddbd4a --- /dev/null +++ b/with-browserify/scripts/app.js @@ -0,0 +1,7 @@ +var angular = require('angular'); + +angular +.module('exampleApp', [ + require('angular-highlightjs') +]) +.controller('MainCtrl', require('./main-ctrl')); diff --git a/with-browserify/scripts/bundle.js b/with-browserify/scripts/bundle.js new file mode 100644 index 0000000..1b7accb --- /dev/null +++ b/with-browserify/scripts/bundle.js @@ -0,0 +1,686 @@ +(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o").append(b).html();try{return b[0].nodeType===pb?Q(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+Q(b)})}catch(d){return Q(c)}}function pc(b){try{return decodeURIComponent(b)}catch(a){}}function qc(b){var a={},c,d;s((b||"").split("&"),function(b){b&& +(c=b.replace(/\+/g,"%20").split("="),d=pc(c[0]),y(d)&&(b=y(c[1])?pc(c[1]):!0,rc.call(a,d)?D(a[d])?a[d].push(b):a[d]=[a[d],b]:a[d]=b))});return a}function Nb(b){var a=[];s(b,function(b,d){D(b)?s(b,function(b){a.push(Fa(d,!0)+(!0===b?"":"="+Fa(b,!0)))}):a.push(Fa(d,!0)+(!0===b?"":"="+Fa(b,!0)))});return a.length?a.join("&"):""}function qb(b){return Fa(b,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Fa(b,a){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi, +":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,a?"%20":"+")}function Id(b,a){var c,d,e=rb.length;b=B(b);for(d=0;d/,">"));}a=a||[];a.unshift(["$provide",function(a){a.value("$rootElement",b)}]);c.debugInfoEnabled&&a.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]);a.unshift("ng");d=Ob(a,c.strictDi);d.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return d}, +e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;M&&e.test(M.name)&&(c.debugInfoEnabled=!0,M.name=M.name.replace(e,""));if(M&&!f.test(M.name))return d();M.name=M.name.replace(f,"");ga.resumeBootstrap=function(b){s(b,function(b){a.push(b)});d()}}function Kd(){M.name="NG_ENABLE_DEBUG_INFO!"+M.name;M.location.reload()}function Ld(b){b=ga.element(b).injector();if(!b)throw Ka("test");return b.get("$$testability")}function tc(b,a){a=a||"_";return b.replace(Md,function(b,d){return(d?a:"")+b.toLowerCase()})} +function Nd(){var b;uc||((sa=M.jQuery)&&sa.fn.on?(B=sa,z(sa.fn,{scope:La.scope,isolateScope:La.isolateScope,controller:La.controller,injector:La.injector,inheritedData:La.inheritedData}),b=sa.cleanData,sa.cleanData=function(a){var c;if(Pb)Pb=!1;else for(var d=0,e;null!=(e=a[d]);d++)(c=sa._data(e,"events"))&&c.$destroy&&sa(e).triggerHandler("$destroy");b(a)}):B=R,ga.element=B,uc=!0)}function Qb(b,a,c){if(!b)throw Ka("areq",a||"?",c||"required");return b}function sb(b,a,c){c&&D(b)&&(b=b[b.length-1]); +Qb(G(b),a,"not a function, got "+(b&&"object"===typeof b?b.constructor.name||"Object":typeof b));return b}function Ma(b,a){if("hasOwnProperty"===b)throw Ka("badname",a);}function vc(b,a,c){if(!a)return b;a=a.split(".");for(var d,e=b,f=a.length,g=0;g")+d[2];for(d=d[0];d--;)c=c.lastChild;f=Ya(f,c.childNodes);c=e.firstChild;c.textContent=""}else f.push(a.createTextNode(b));e.textContent="";e.innerHTML="";s(f,function(a){e.appendChild(a)});return e}function R(b){if(b instanceof +R)return b;var a;F(b)&&(b=U(b),a=!0);if(!(this instanceof R)){if(a&&"<"!=b.charAt(0))throw Sb("nosel");return new R(b)}if(a){a=Y;var c;b=(c=gf.exec(b))?[a.createElement(c[1])]:(c=Fc(b,a))?c.childNodes:[]}Gc(this,b)}function Tb(b){return b.cloneNode(!0)}function wb(b,a){a||xb(b);if(b.querySelectorAll)for(var c=b.querySelectorAll("*"),d=0,e=c.length;d 4096 bytes)!"));else{if(n.cookie!==y)for(y=n.cookie,d=y.split("; "),ea={},f=0;fk&&this.remove(q.key), +b},get:function(a){if(k").parent()[0])});var f=S(a,b,a,c,d,e);E.$$addScopeClass(a);var g=null;return function(b,c,d){Qb(b,"scope");d=d||{};var e=d.parentBoundTranscludeFn,h=d.transcludeControllers;d=d.futureParentElement;e&&e.$$boundTransclude&&(e=e.$$boundTransclude);g||(g=(d=d&&d[0])?"foreignobject"!==ua(d)&&d.toString().match(/SVG/)?"svg":"html":"html");d="html"!==g?B(Wb(g,B("
").append(a).html())): +c?La.clone.call(a):a;if(h)for(var l in h)d.data("$"+l+"Controller",h[l].instance);E.$$addScopeInfo(d,b);c&&c(d,b);f&&f(b,d,d,e);return d}}function S(a,b,c,d,e,f){function g(a,c,d,e){var f,l,k,q,n,p,w;if(r)for(w=Array(c.length),q=0;qK.priority)break;if(N=K.scope)K.templateUrl||(I(N)?(Oa("new/isolated scope",S||P,K,aa),S=K):Oa("new/isolated scope",S,K,aa)),P=P||K;z=K.name;!K.templateUrl&&K.controller&&(N=K.controller, +C=C||{},Oa("'"+z+"' controller",C[z],K,aa),C[z]=K);if(N=K.transclude)ca=!0,K.$$tlb||(Oa("transclusion",ea,K,aa),ea=K),"element"==N?(H=!0,x=K.priority,N=aa,aa=e.$$element=B(Y.createComment(" "+z+": "+e[z]+" ")),d=aa[0],V(g,Za.call(N,0),d),Aa=E(N,f,x,l&&l.name,{nonTlbTranscludeDirective:ea})):(N=B(Tb(d)).contents(),aa.empty(),Aa=E(N,f));if(K.template)if(A=!0,Oa("template",ka,K,aa),ka=K,N=G(K.template)?K.template(aa,e):K.template,N=Sc(N),K.replace){l=K;N=Rb.test(N)?Tc(Wb(K.templateNamespace,U(N))):[]; +d=N[0];if(1!=N.length||d.nodeType!==oa)throw ja("tplrt",z,"");V(g,aa,d);R={$attr:{}};N=W(d,[],R);var ba=a.splice(M+1,a.length-(M+1));S&&y(N);a=a.concat(N).concat(ba);Qc(e,R);R=a.length}else aa.html(N);if(K.templateUrl)A=!0,Oa("template",ka,K,aa),ka=K,K.replace&&(l=K),v=T(a.splice(M,a.length-M),aa,e,g,ca&&Aa,k,n,{controllerDirectives:C,newIsolateScopeDirective:S,templateDirective:ka,nonTlbTranscludeDirective:ea}),R=a.length;else if(K.compile)try{Q=K.compile(aa,e,Aa),G(Q)?w(null,Q,Pa,fb):Q&&w(Q.pre, +Q.post,Pa,fb)}catch(qf){c(qf,va(aa))}K.terminal&&(v.terminal=!0,x=Math.max(x,K.priority))}v.scope=P&&!0===P.scope;v.transcludeOnThisElement=ca;v.elementTranscludeOnThisElement=H;v.templateOnThisElement=A;v.transclude=Aa;r.hasElementTranscludeDirective=H;return v}function y(a){for(var b=0,c=a.length;bq.priority)&&-1!=q.restrict.indexOf(f)){if(l){var w={$$start:l,$$end:k};q=z(Object.create(q),w)}b.push(q);h=q}}catch(O){c(O)}}return h}function A(b){if(d.hasOwnProperty(b))for(var c=a.get(b+"Directive"),e=0,f=c.length;e"+b+"";return c.childNodes[0].childNodes;default:return b}}function R(a,b){if("srcdoc"==b)return L.HTML;var c=ua(a);if("xlinkHref"==b||"form"==c&&"action"==b||"img"!=c&&("src"==b||"ngSrc"==b))return L.RESOURCE_URL}function Pa(a,c,d,e,f){var h=R(a,e);f=g[e]||f;var k=b(d,!0, +h,f);if(k){if("multiple"===e&&"select"===ua(a))throw ja("selmulti",va(a));c.push({priority:100,compile:function(){return{pre:function(a,c,g){c=g.$$observers||(g.$$observers={});if(l.test(e))throw ja("nodomevents");var n=g[e];n!==d&&(k=n&&b(n,!0,h,f),d=n);k&&(g[e]=k(a),(c[e]||(c[e]=[])).$$inter=!0,(g.$$observers&&g.$$observers[e].$$scope||a).$watch(k,function(a,b){"class"===e&&a!=b?g.$updateClass(a,b):g.$set(e,a)}))}}}})}}function V(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g< +h;g++)if(a[g]==d){a[g++]=c;h=g+e-1;for(var l=a.length;g=a)return b;for(;a--;)8===b[a].nodeType&&rf.call(b,a,1);return b}function Fe(){var b={},a=!1,c=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(a,c){Ma(a,"controller");I(a)?z(b,a):b[a]=c};this.allowGlobals=function(){a=!0};this.$get=["$injector","$window",function(d,e){function f(a,b,c,d){if(!a||!I(a.$scope))throw T("$controller")("noscp",d,b);a.$scope[b]=c}return function(g,h, +l,k){var m,n,q;l=!0===l;k&&F(k)&&(q=k);F(g)&&(k=g.match(c),n=k[1],q=q||k[3],g=b.hasOwnProperty(n)?b[n]:vc(h.$scope,n,!0)||(a?vc(e,n,!0):t),sb(g,n,!0));if(l)return l=(D(g)?g[g.length-1]:g).prototype,m=Object.create(l||null),q&&f(h,q,m,n||g.name),z(function(){d.invoke(g,m,h,n);return m},{instance:m,identifier:q});m=d.instantiate(g,h,n);q&&f(h,q,m,n||g.name);return m}}]}function Ge(){this.$get=["$window",function(b){return B(b.document)}]}function He(){this.$get=["$log",function(b){return function(a, +c){b.error.apply(b,arguments)}}]}function Yb(b,a){if(F(b)){var c=b.replace(sf,"").trim();if(c){var d=a("Content-Type");(d=d&&0===d.indexOf(Vc))||(d=(d=c.match(tf))&&uf[d[0]].test(c));d&&(b=oc(c))}}return b}function Wc(b){var a=ha(),c,d,e;if(!b)return a;s(b.split("\n"),function(b){e=b.indexOf(":");c=Q(U(b.substr(0,e)));d=U(b.substr(e+1));c&&(a[c]=a[c]?a[c]+", "+d:d)});return a}function Xc(b){var a=I(b)?b:t;return function(c){a||(a=Wc(b));return c?(c=a[Q(c)],void 0===c&&(c=null),c):a}}function Yc(b, +a,c,d){if(G(d))return d(b,a,c);s(d,function(d){b=d(b,a,c)});return b}function Ke(){var b=this.defaults={transformResponse:[Yb],transformRequest:[function(a){return I(a)&&"[object File]"!==Da.call(a)&&"[object Blob]"!==Da.call(a)&&"[object FormData]"!==Da.call(a)?$a(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},post:ra(Zb),put:ra(Zb),patch:ra(Zb)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},a=!1;this.useApplyAsync=function(b){return y(b)?(a=!!b,this):a};var c=this.interceptors= +[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(d,e,f,g,h,l){function k(a){function c(a){var b=z({},a);b.data=a.data?Yc(a.data,a.headers,a.status,e.transformResponse):a.data;a=a.status;return 200<=a&&300>a?b:h.reject(b)}function d(a){var b,c={};s(a,function(a,d){G(a)?(b=a(),null!=b&&(c[d]=b)):c[d]=a});return c}if(!ga.isObject(a))throw T("$http")("badreq",a);var e=z({method:"get",transformRequest:b.transformRequest,transformResponse:b.transformResponse}, +a);e.headers=function(a){var c=b.headers,e=z({},a.headers),f,g,c=z({},c.common,c[Q(a.method)]);a:for(f in c){a=Q(f);for(g in e)if(Q(g)===a)continue a;e[f]=c[f]}return d(e)}(a);e.method=ub(e.method);var f=[function(a){var d=a.headers,e=Yc(a.data,Xc(d),t,a.transformRequest);A(e)&&s(d,function(a,b){"content-type"===Q(b)&&delete d[b]});A(a.withCredentials)&&!A(b.withCredentials)&&(a.withCredentials=b.withCredentials);return m(a,e).then(c,c)},t],g=h.when(e);for(s(u,function(a){(a.request||a.requestError)&& +f.unshift(a.request,a.requestError);(a.response||a.responseError)&&f.push(a.response,a.responseError)});f.length;){a=f.shift();var l=f.shift(),g=g.then(a,l)}g.success=function(a){g.then(function(b){a(b.data,b.status,b.headers,e)});return g};g.error=function(a){g.then(null,function(b){a(b.data,b.status,b.headers,e)});return g};return g}function m(c,f){function l(b,c,d,e){function f(){m(c,b,d,e)}P&&(200<=b&&300>b?P.put(X,[b,c,Wc(d),e]):P.remove(X));a?g.$applyAsync(f):(f(),g.$$phase||g.$apply())}function m(a, +b,d,e){b=Math.max(b,0);(200<=b&&300>b?C.resolve:C.reject)({data:a,status:b,headers:Xc(d),config:c,statusText:e})}function w(a){m(a.data,a.status,ra(a.headers()),a.statusText)}function u(){var a=k.pendingRequests.indexOf(c);-1!==a&&k.pendingRequests.splice(a,1)}var C=h.defer(),x=C.promise,P,E,s=c.headers,X=n(c.url,c.params);k.pendingRequests.push(c);x.then(u,u);!c.cache&&!b.cache||!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(P=I(c.cache)?c.cache:I(b.cache)?b.cache:q);P&&(E=P.get(X),y(E)?E&& +G(E.then)?E.then(w,w):D(E)?m(E[1],E[0],ra(E[2]),E[3]):m(E,200,{},"OK"):P.put(X,x));A(E)&&((E=Zc(c.url)?e.cookies()[c.xsrfCookieName||b.xsrfCookieName]:t)&&(s[c.xsrfHeaderName||b.xsrfHeaderName]=E),d(c.method,X,f,l,s,c.timeout,c.withCredentials,c.responseType));return x}function n(a,b){if(!b)return a;var c=[];Ed(b,function(a,b){null===a||A(a)||(D(a)||(a=[a]),s(a,function(a){I(a)&&(a=qa(a)?a.toISOString():$a(a));c.push(Fa(b)+"="+Fa(a))}))});0=l&&(r.resolve(q),n(O.$$intervalId),delete f[O.$$intervalId]);u||b.$apply()},h);f[O.$$intervalId]=r;return O}var f={};e.cancel=function(b){return b&&b.$$intervalId in f?(f[b.$$intervalId].reject("canceled"),a.clearInterval(b.$$intervalId),delete f[b.$$intervalId],!0):!1};return e}]}function Rd(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3, +lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"\u00a4",posSuf:"",negPre:"(\u00a4",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January February March April May June July August September October November December".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a", +fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(b){return 1===b?"one":"other"}}}}function ac(b){b=b.split("/");for(var a=b.length;a--;)b[a]=qb(b[a]);return b.join("/")}function $c(b,a){var c=Ba(b);a.$$protocol=c.protocol;a.$$host=c.hostname;a.$$port=ba(c.port)||xf[c.protocol]||null}function ad(b,a){var c="/"!==b.charAt(0);c&&(b="/"+b);var d=Ba(b);a.$$path=decodeURIComponent(c&&"/"===d.pathname.charAt(0)? +d.pathname.substring(1):d.pathname);a.$$search=qc(d.search);a.$$hash=decodeURIComponent(d.hash);a.$$path&&"/"!=a.$$path.charAt(0)&&(a.$$path="/"+a.$$path)}function za(b,a){if(0===a.indexOf(b))return a.substr(b.length)}function Ha(b){var a=b.indexOf("#");return-1==a?b:b.substr(0,a)}function bd(b){return b.replace(/(#.+)|#$/,"$1")}function bc(b){return b.substr(0,Ha(b).lastIndexOf("/")+1)}function cc(b,a){this.$$html5=!0;a=a||"";var c=bc(b);$c(b,this);this.$$parse=function(a){var b=za(c,a);if(!F(b))throw Fb("ipthprfx", +a,c);ad(b,this);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var a=Nb(this.$$search),b=this.$$hash?"#"+qb(this.$$hash):"";this.$$url=ac(this.$$path)+(a?"?"+a:"")+b;this.$$absUrl=c+this.$$url.substr(1)};this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;(f=za(b,d))!==t?(g=f,g=(f=za(a,f))!==t?c+(za("/",f)||f):b+g):(f=za(c,d))!==t?g=c+f:c==d+"/"&&(g=c);g&&this.$$parse(g);return!!g}}function dc(b,a){var c=bc(b);$c(b,this);this.$$parse= +function(d){d=za(b,d)||za(c,d);var e;"#"===d.charAt(0)?(e=za(a,d),A(e)&&(e=d)):e=this.$$html5?d:"";ad(e,this);d=this.$$path;var f=/^\/[A-Z]:(\/.*)/;0===e.indexOf(b)&&(e=e.replace(b,""));f.exec(e)||(d=(e=f.exec(d))?e[1]:d);this.$$path=d;this.$$compose()};this.$$compose=function(){var c=Nb(this.$$search),e=this.$$hash?"#"+qb(this.$$hash):"";this.$$url=ac(this.$$path)+(c?"?"+c:"")+e;this.$$absUrl=b+(this.$$url?a+this.$$url:"")};this.$$parseLinkUrl=function(a,c){return Ha(b)==Ha(a)?(this.$$parse(a),!0): +!1}}function cd(b,a){this.$$html5=!0;dc.apply(this,arguments);var c=bc(b);this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;b==Ha(d)?f=d:(g=za(c,d))?f=b+a+g:c===d+"/"&&(f=c);f&&this.$$parse(f);return!!f};this.$$compose=function(){var c=Nb(this.$$search),e=this.$$hash?"#"+qb(this.$$hash):"";this.$$url=ac(this.$$path)+(c?"?"+c:"")+e;this.$$absUrl=b+a+this.$$url}}function Gb(b){return function(){return this[b]}}function dd(b,a){return function(c){if(A(c))return this[b]; +this[b]=a(c);this.$$compose();return this}}function Me(){var b="",a={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(a){return y(a)?(b=a,this):b};this.html5Mode=function(b){return Wa(b)?(a.enabled=b,this):I(b)?(Wa(b.enabled)&&(a.enabled=b.enabled),Wa(b.requireBase)&&(a.requireBase=b.requireBase),Wa(b.rewriteLinks)&&(a.rewriteLinks=b.rewriteLinks),this):a};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(c,d,e,f,g){function h(a,b,c){var e=k.url(), +f=k.$$state;try{d.url(a,b,c),k.$$state=d.state()}catch(g){throw k.url(e),k.$$state=f,g;}}function l(a,b){c.$broadcast("$locationChangeSuccess",k.absUrl(),a,k.$$state,b)}var k,m;m=d.baseHref();var n=d.url(),q;if(a.enabled){if(!m&&a.requireBase)throw Fb("nobase");q=n.substring(0,n.indexOf("/",n.indexOf("//")+2))+(m||"/");m=e.history?cc:cd}else q=Ha(n),m=dc;k=new m(q,"#"+b);k.$$parseLinkUrl(n,n);k.$$state=d.state();var u=/^\s*(javascript|mailto):/i;f.on("click",function(b){if(a.rewriteLinks&&!b.ctrlKey&& +!b.metaKey&&!b.shiftKey&&2!=b.which&&2!=b.button){for(var e=B(b.target);"a"!==ua(e[0]);)if(e[0]===f[0]||!(e=e.parent())[0])return;var h=e.prop("href"),l=e.attr("href")||e.attr("xlink:href");I(h)&&"[object SVGAnimatedString]"===h.toString()&&(h=Ba(h.animVal).href);u.test(h)||!h||e.attr("target")||b.isDefaultPrevented()||!k.$$parseLinkUrl(h,l)||(b.preventDefault(),k.absUrl()!=d.url()&&(c.$apply(),g.angular["ff-684208-preventDefault"]=!0))}});k.absUrl()!=n&&d.url(k.absUrl(),!0);var r=!0;d.onUrlChange(function(a, +b){c.$evalAsync(function(){var d=k.absUrl(),e=k.$$state,f;k.$$parse(a);k.$$state=b;f=c.$broadcast("$locationChangeStart",a,d,b,e).defaultPrevented;k.absUrl()===a&&(f?(k.$$parse(d),k.$$state=e,h(d,!1,e)):(r=!1,l(d,e)))});c.$$phase||c.$digest()});c.$watch(function(){var a=bd(d.url()),b=bd(k.absUrl()),f=d.state(),g=k.$$replace,q=a!==b||k.$$html5&&e.history&&f!==k.$$state;if(r||q)r=!1,c.$evalAsync(function(){var b=k.absUrl(),d=c.$broadcast("$locationChangeStart",b,a,k.$$state,f).defaultPrevented;k.absUrl()=== +b&&(d?(k.$$parse(a),k.$$state=f):(q&&h(b,g,f===k.$$state?null:k.$$state),l(a,f)))});k.$$replace=!1});return k}]}function Ne(){var b=!0,a=this;this.debugEnabled=function(a){return y(a)?(b=a,this):b};this.$get=["$window",function(c){function d(a){a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=c.console||{},e=b[a]||b.log||H;a=!1;try{a=!!e.apply}catch(l){}return a? +function(){var a=[];s(arguments,function(b){a.push(d(b))});return e.apply(b,a)}:function(a,b){e(a,null==b?"":b)}}return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){b&&c.apply(a,arguments)}}()}}]}function ta(b,a){if("__defineGetter__"===b||"__defineSetter__"===b||"__lookupGetter__"===b||"__lookupSetter__"===b||"__proto__"===b)throw la("isecfld",a);return b}function ma(b,a){if(b){if(b.constructor===b)throw la("isecfn",a);if(b.window=== +b)throw la("isecwindow",a);if(b.children&&(b.nodeName||b.prop&&b.attr&&b.find))throw la("isecdom",a);if(b===Object)throw la("isecobj",a);}return b}function ec(b){return b.constant}function gb(b,a,c,d,e){ma(b,e);ma(a,e);c=c.split(".");for(var f,g=0;1h?ed(g[0],g[1],g[2],g[3],g[4],c,d):function(a,b){var e=0,f;do f=ed(g[e++],g[e++],g[e++],g[e++],g[e++],c,d)(a,b),b=t,a=f;while(e=this.promise.$$state.status&&d&&d.length&&b(function(){for(var b,e,f=0,g=d.length;fa)for(b in k++,f)e.hasOwnProperty(b)||(u--,delete f[b])}else f!==e&&(f=e,k++);return k}}c.$stateful=!0;var d=this,e,f,h,l=1s&&(y=4-s,W[y]||(W[y]=[]),W[y].push({msg:G(e.exp)?"fn: "+(e.exp.name||e.exp.toString()):e.exp,newVal:g,oldVal:l}));else if(e===c){v=!1;break a}}catch(A){f(A)}if(!(m=t.$$childHead||t!==this&&t.$$nextSibling))for(;t!==this&&!(m=t.$$nextSibling);)t=t.$parent}while(t=m);if((v||O.length)&&!s--)throw r.$$phase=null,a("infdig",b,W);}while(v||O.length);for(r.$$phase=null;p.length;)try{p.shift()()}catch(ca){f(ca)}},$destroy:function(){if(!this.$$destroyed){var a= +this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;if(this!==r){for(var b in this.$$listenerCount)m(this,this.$$listenerCount[b],b);a.$$childHead==this&&(a.$$childHead=this.$$nextSibling);a.$$childTail==this&&(a.$$childTail=this.$$prevSibling);this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling);this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=H;this.$on=this.$watch=this.$watchGroup= +function(){return H};this.$$listeners={};this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}}},$eval:function(a,b){return g(a)(this,b)},$evalAsync:function(a,b){r.$$phase||O.length||h.defer(function(){O.length&&r.$digest()});O.push({scope:this,expression:a,locals:b})},$$postDigest:function(a){p.push(a)},$apply:function(a){try{return k("$apply"),this.$eval(a)}catch(b){f(b)}finally{r.$$phase=null;try{r.$digest()}catch(c){throw f(c),c; +}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&v.push(b);u()},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(c[d]=null,m(e,1,a))}},$emit:function(a,b){var c=[],d,e=this,g=!1,h={name:a,targetScope:e,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1}, +l=Ya([h],arguments,1),k,m;do{d=e.$$listeners[a]||c;h.currentScope=e;k=0;for(m=d.length;kRa)throw Ca("iequirks");var d=ra(na);d.isEnabled=function(){return b};d.trustAs=c.trustAs;d.getTrusted=c.getTrusted;d.valueOf=c.valueOf;b||(d.trustAs=d.getTrusted=function(a,b){return b},d.valueOf=pa);d.parseAs=function(b,c){var e=a(c);return e.literal&&e.constant?e:a(c,function(a){return d.getTrusted(b,a)})};var e=d.parseAs,f=d.getTrusted,g=d.trustAs;s(na,function(a,b){var c=Q(b);d[cb("parse_as_"+c)]=function(b){return e(a,b)};d[cb("get_trusted_"+c)]=function(b){return f(a,b)};d[cb("trust_as_"+ +c)]=function(b){return g(a,b)}});return d}]}function Ue(){this.$get=["$window","$document",function(b,a){var c={},d=ba((/android (\d+)/.exec(Q((b.navigator||{}).userAgent))||[])[1]),e=/Boxee/i.test((b.navigator||{}).userAgent),f=a[0]||{},g,h=/^(Moz|webkit|ms)(?=[A-Z])/,l=f.body&&f.body.style,k=!1,m=!1;if(l){for(var n in l)if(k=h.exec(n)){g=k[0];g=g.substr(0,1).toUpperCase()+g.substr(1);break}g||(g="WebkitOpacity"in l&&"webkit");k=!!("transition"in l||g+"Transition"in l);m=!!("animation"in l||g+"Animation"in +l);!d||k&&m||(k=F(f.body.style.webkitTransition),m=F(f.body.style.webkitAnimation))}return{history:!(!b.history||!b.history.pushState||4>d||e),hasEvent:function(a){if("input"===a&&11>=Ra)return!1;if(A(c[a])){var b=f.createElement("div");c[a]="on"+a in b}return c[a]},csp:ab(),vendorPrefix:g,transitions:k,animations:m,android:d}}]}function We(){this.$get=["$templateCache","$http","$q",function(b,a,c){function d(e,f){d.totalPendingRequests++;var g=a.defaults&&a.defaults.transformResponse;D(g)?g=g.filter(function(a){return a!== +Yb}):g===Yb&&(g=null);return a.get(e,{cache:b,transformResponse:g}).finally(function(){d.totalPendingRequests--}).then(function(a){return a.data},function(a){if(!f)throw ja("tpload",e);return c.reject(a)})}d.totalPendingRequests=0;return d}]}function Xe(){this.$get=["$rootScope","$browser","$location",function(b,a,c){return{findBindings:function(a,b,c){a=a.getElementsByClassName("ng-binding");var g=[];s(a,function(a){var d=ga.element(a).data("$binding");d&&s(d,function(d){c?(new RegExp("(^|\\s)"+ +gd(b)+"(\\s|\\||$)")).test(d)&&g.push(a):-1!=d.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,c){for(var g=["ng-","data-ng-","ng\\:"],h=0;hb;b=Math.abs(b);var g=b+"",h="",l=[],k=!1;if(-1!==g.indexOf("e")){var m=g.match(/([\d\.]+)e(-?)(\d+)/);m&& +"-"==m[2]&&m[3]>e+1?b=0:(h=g,k=!0)}if(k)0b&&(h=b.toFixed(e),b=parseFloat(h));else{g=(g.split(od)[1]||"").length;A(e)&&(e=Math.min(Math.max(a.minFrac,g),a.maxFrac));b=+(Math.round(+(b.toString()+"e"+e)).toString()+"e"+-e);var g=(""+b).split(od),k=g[0],g=g[1]||"",n=0,q=a.lgSize,u=a.gSize;if(k.length>=q+u)for(n=k.length-q,m=0;mb&&(d="-",b=-b);for(b=""+b;b.length-c)e+=c;0===e&&-12==c&&(e=12);return Hb(e,a,d)}}function Ib(b,a){return function(c,d){var e=c["get"+b](),f=ub(a?"SHORT"+b:b);return d[f][e]}}function pd(b){var a=(new Date(b,0,1)).getDay();return new Date(b,0,(4>=a?5:12)-a)}function qd(b){return function(a){var c= +pd(a.getFullYear());a=+new Date(a.getFullYear(),a.getMonth(),a.getDate()+(4-a.getDay()))-+c;a=1+Math.round(a/6048E5);return Hb(a,b)}}function kd(b){function a(a){var b;if(b=a.match(c)){a=new Date(0);var f=0,g=0,h=b[8]?a.setUTCFullYear:a.setFullYear,l=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=ba(b[9]+b[10]),g=ba(b[9]+b[11]));h.call(a,ba(b[1]),ba(b[2])-1,ba(b[3]));f=ba(b[4]||0)-f;g=ba(b[5]||0)-g;h=ba(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));l.call(a,f,g,h,b)}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/; +return function(c,e,f){var g="",h=[],l,k;e=e||"mediumDate";e=b.DATETIME_FORMATS[e]||e;F(c)&&(c=Kf.test(c)?ba(c):a(c));V(c)&&(c=new Date(c));if(!qa(c))return c;for(;e;)(k=Lf.exec(e))?(h=Ya(h,k,1),e=h.pop()):(h.push(e),e=null);f&&"UTC"===f&&(c=new Date(c.getTime()),c.setMinutes(c.getMinutes()+c.getTimezoneOffset()));s(h,function(a){l=Mf[a];g+=l?l(c,b.DATETIME_FORMATS):a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function Ff(){return function(b,a){A(a)&&(a=2);return $a(b,a)}}function Gf(){return function(b, +a){V(b)&&(b=b.toString());return D(b)||F(b)?(a=Infinity===Math.abs(Number(a))?Number(a):ba(a))?0b||37<=b&&40>=b||m(a,this,this.value)});if(e.hasEvent("paste"))a.on("paste cut",m)}a.on("change",l);d.$render=function(){a.val(d.$isEmpty(d.$viewValue)?"":d.$viewValue)}}function Lb(b,a){return function(c,d){var e,f;if(qa(c))return c;if(F(c)){'"'==c.charAt(0)&&'"'==c.charAt(c.length-1)&&(c=c.substring(1,c.length-1));if(Nf.test(c))return new Date(c);b.lastIndex= +0;if(e=b.exec(c))return e.shift(),f=d?{yyyy:d.getFullYear(),MM:d.getMonth()+1,dd:d.getDate(),HH:d.getHours(),mm:d.getMinutes(),ss:d.getSeconds(),sss:d.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},s(e,function(b,c){c=s}; +g.$observe("min",function(a){s=q(a);h.$validate()})}if(y(g.max)||g.ngMax){var p;h.$validators.max=function(a){return!n(a)||A(p)||c(a)<=p};g.$observe("max",function(a){p=q(a);h.$validate()})}}}function td(b,a,c,d){(d.$$hasNativeValidators=I(a[0].validity))&&d.$parsers.push(function(b){var c=a.prop("validity")||{};return c.badInput&&!c.typeMismatch?t:b})}function ud(b,a,c,d,e){if(y(d)){b=b(d);if(!b.constant)throw T("ngModel")("constexpr",c,d);return b(a)}return e}function ic(b,a){b="ngClass"+b;return["$animate", +function(c){function d(a,b){var c=[],d=0;a:for(;d(?:<\/\1>|)$/,Rb=/<|&#?\w+;/,ef=/<([\w:]+)/,ff=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ia={option:[1,'"],thead:[1,"","
"],col:[2,"", +"
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ia.optgroup=ia.option;ia.tbody=ia.tfoot=ia.colgroup=ia.caption=ia.thead;ia.th=ia.td;var La=R.prototype={ready:function(b){function a(){c||(c=!0,b())}var c=!1;"complete"===Y.readyState?setTimeout(a):(this.on("DOMContentLoaded",a),R(M).on("load",a))},toString:function(){var b=[];s(this,function(a){b.push(""+a)});return"["+b.join(", ")+"]"},eq:function(b){return 0<= +b?B(this[b]):B(this[this.length+b])},length:0,push:Pf,sort:[].sort,splice:[].splice},Eb={};s("multiple selected checked disabled readOnly required open".split(" "),function(b){Eb[Q(b)]=b});var Mc={};s("input select option textarea button form details".split(" "),function(b){Mc[b]=!0});var Nc={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};s({data:Ub,removeData:xb},function(b,a){R[a]=b});s({data:Ub,inheritedData:Db,scope:function(b){return B.data(b,"$scope")|| +Db(b.parentNode||b,["$isolateScope","$scope"])},isolateScope:function(b){return B.data(b,"$isolateScope")||B.data(b,"$isolateScopeNoTemplate")},controller:Ic,injector:function(b){return Db(b,"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},hasClass:Ab,css:function(b,a,c){a=cb(a);if(y(c))b.style[a]=c;else return b.style[a]},attr:function(b,a,c){var d=Q(a);if(Eb[d])if(y(c))c?(b[a]=!0,b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||H).specified? +d:t;else if(y(c))b.setAttribute(a,c);else if(b.getAttribute)return b=b.getAttribute(a,2),null===b?t:b},prop:function(b,a,c){if(y(c))b[a]=c;else return b[a]},text:function(){function b(a,b){if(A(b)){var d=a.nodeType;return d===oa||d===pb?a.textContent:""}a.textContent=b}b.$dv="";return b}(),val:function(b,a){if(A(a)){if(b.multiple&&"select"===ua(b)){var c=[];s(b.options,function(a){a.selected&&c.push(a.value||a.text)});return 0===c.length?null:c}return b.value}b.value=a},html:function(b,a){if(A(a))return b.innerHTML; +wb(b,!0);b.innerHTML=a},empty:Jc},function(b,a){R.prototype[a]=function(a,d){var e,f,g=this.length;if(b!==Jc&&(2==b.length&&b!==Ab&&b!==Ic?a:d)===t){if(I(a)){for(e=0;e":function(a,c,d,e){return d(a,c)>e(a,c)},"<=":function(a, +c,d,e){return d(a,c)<=e(a,c)},">=":function(a,c,d,e){return d(a,c)>=e(a,c)},"&&":function(a,c,d,e){return d(a,c)&&e(a,c)},"||":function(a,c,d,e){return d(a,c)||e(a,c)},"!":function(a,c,d){return!d(a,c)},"=":!0,"|":!0}),Xf={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},gc=function(a){this.options=a};gc.prototype={constructor:gc,lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index=a&&"string"===typeof a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdent:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,c,d){d=d||this.index;c=y(c)?"s "+c+"-"+this.index+" ["+this.text.substring(c, +d)+"]":" "+d;throw la("lexerr",a,c,this.text);},readNumber:function(){for(var a="",c=this.index;this.indexa){a=this.tokens[a];var g=a.text;if(g===c||g===d||g===e||g===f||!(c||d||e||f))return a}return!1},expect:function(a,c,d,e){return(a=this.peek(a,c,d,e))?(this.tokens.shift(),a):!1},consume:function(a){if(0===this.tokens.length)throw la("ueoe",this.text);var c=this.expect(a);c||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return c},unaryFn:function(a,c){var d=mb[a];return z(function(a,f){return d(a,f,c)},{constant:c.constant,inputs:[c]})},binaryFn:function(a, +c,d,e){var f=mb[c];return z(function(c,e){return f(c,e,a,d)},{constant:a.constant&&d.constant,inputs:!e&&[a,d]})},identifier:function(){for(var a=this.consume().text;this.peek(".")&&this.peekAhead(1).identifier&&!this.peekAhead(2,"(");)a+=this.consume().text+this.consume().text;return zf(a,this.options,this.text)},constant:function(){var a=this.consume().value;return z(function(){return a},{constant:!0,literal:!0})},statements:function(){for(var a=[];;)if(0","<=",">=");)a=this.binaryFn(a,c.text,this.additive());return a},additive:function(){for(var a=this.multiplicative(),c;c=this.expect("+","-");)a=this.binaryFn(a,c.text,this.multiplicative());return a},multiplicative:function(){for(var a=this.unary(),c;c=this.expect("*","/","%");)a=this.binaryFn(a,c.text,this.unary());return a},unary:function(){var a;return this.expect("+")?this.primary():(a=this.expect("-"))?this.binaryFn(hb.ZERO, +a.text,this.unary()):(a=this.expect("!"))?this.unaryFn(a.text,this.unary()):this.primary()},fieldAccess:function(a){var c=this.identifier();return z(function(d,e,f){d=f||a(d,e);return null==d?t:c(d)},{assign:function(d,e,f){var g=a(d,f);g||a.assign(d,g={},f);return c.assign(g,e)}})},objectIndex:function(a){var c=this.text,d=this.expression();this.consume("]");return z(function(e,f){var g=a(e,f),h=d(e,f);ta(h,c);return g?ma(g[h],c):t},{assign:function(e,f,g){var h=ta(d(e,g),c),l=ma(a(e,g),c);l||a.assign(e, +l={},g);return l[h]=f}})},functionCall:function(a,c){var d=[];if(")"!==this.peekToken().text){do d.push(this.expression());while(this.expect(","))}this.consume(")");var e=this.text,f=d.length?[]:null;return function(g,h){var l=c?c(g,h):y(c)?t:g,k=a(g,h,l)||H;if(f)for(var m=d.length;m--;)f[m]=ma(d[m](g,h),e);ma(l,e);if(k){if(k.constructor===k)throw la("isecfn",e);if(k===Uf||k===Vf||k===Wf)throw la("isecff",e);}l=k.apply?k.apply(l,f):k(f[0],f[1],f[2],f[3],f[4]);return ma(l,e)}},arrayDeclaration:function(){var a= +[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","))}this.consume("]");return z(function(c,d){for(var e=[],f=0,g=a.length;fa.getHours()?c.AMPMS[0]:c.AMPMS[1]},Z:function(a){a=-1*a.getTimezoneOffset();return a=(0<=a?"+":"")+(Hb(Math[0=h};d.$observe("min",function(a){y(a)&& +!V(a)&&(a=parseFloat(a,10));h=V(a)&&!isNaN(a)?a:t;e.$validate()})}if(d.max||d.ngMax){var l;e.$validators.max=function(a){return e.$isEmpty(a)||A(l)||a<=l};d.$observe("max",function(a){y(a)&&!V(a)&&(a=parseFloat(a,10));l=V(a)&&!isNaN(a)?a:t;e.$validate()})}},url:function(a,c,d,e,f,g){ib(a,c,d,e,f,g);hc(e);e.$$parserName="url";e.$validators.url=function(a,c){var d=a||c;return e.$isEmpty(d)||Yf.test(d)}},email:function(a,c,d,e,f,g){ib(a,c,d,e,f,g);hc(e);e.$$parserName="email";e.$validators.email=function(a, +c){var d=a||c;return e.$isEmpty(d)||Zf.test(d)}},radio:function(a,c,d,e){A(d.name)&&c.attr("name",++nb);c.on("click",function(a){c[0].checked&&e.$setViewValue(d.value,a&&a.type)});e.$render=function(){c[0].checked=d.value==e.$viewValue};d.$observe("value",e.$render)},checkbox:function(a,c,d,e,f,g,h,l){var k=ud(l,a,"ngTrueValue",d.ngTrueValue,!0),m=ud(l,a,"ngFalseValue",d.ngFalseValue,!1);c.on("click",function(a){e.$setViewValue(c[0].checked,a&&a.type)});e.$render=function(){c[0].checked=e.$viewValue}; +e.$isEmpty=function(a){return!1===a};e.$formatters.push(function(a){return fa(a,k)});e.$parsers.push(function(a){return a?k:m})},hidden:H,button:H,submit:H,reset:H,file:H},xc=["$browser","$sniffer","$filter","$parse",function(a,c,d,e){return{restrict:"E",require:["?ngModel"],link:{pre:function(f,g,h,l){l[0]&&(Dd[Q(h.type)]||Dd.text)(f,g,h,l[0],c,a,d,e)}}}}],ag=/^(true|false|\d+)$/,ye=function(){return{restrict:"A",priority:100,compile:function(a,c){return ag.test(c.ngValue)?function(a,c,f){f.$set("value", +a.$eval(f.ngValue))}:function(a,c,f){a.$watch(f.ngValue,function(a){f.$set("value",a)})}}}},Zd=["$compile",function(a){return{restrict:"AC",compile:function(c){a.$$addBindingClass(c);return function(c,e,f){a.$$addBindingInfo(e,f.ngBind);e=e[0];c.$watch(f.ngBind,function(a){e.textContent=a===t?"":a})}}}}],ae=["$interpolate","$compile",function(a,c){return{compile:function(d){c.$$addBindingClass(d);return function(d,f,g){d=a(f.attr(g.$attr.ngBindTemplate));c.$$addBindingInfo(f,d.expressions);f=f[0]; +g.$observe("ngBindTemplate",function(a){f.textContent=a===t?"":a})}}}}],$d=["$sce","$parse","$compile",function(a,c,d){return{restrict:"A",compile:function(e,f){var g=c(f.ngBindHtml),h=c(f.ngBindHtml,function(a){return(a||"").toString()});d.$$addBindingClass(e);return function(c,e,f){d.$$addBindingInfo(e,f.ngBindHtml);c.$watch(h,function(){e.html(a.getTrustedHtml(g(c))||"")})}}}}],xe=da({restrict:"A",require:"ngModel",link:function(a,c,d,e){e.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}), +be=ic("",!0),de=ic("Odd",0),ce=ic("Even",1),ee=Ja({compile:function(a,c){c.$set("ngCloak",t);a.removeClass("ng-cloak")}}),fe=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Cc={},bg={blur:!0,focus:!0};s("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var c=ya("ng-"+a);Cc[c]=["$parse","$rootScope",function(d,e){return{restrict:"A",compile:function(f,g){var h= +d(g[c],null,!0);return function(c,d){d.on(a,function(d){var f=function(){h(c,{$event:d})};bg[a]&&e.$$phase?c.$evalAsync(f):c.$apply(f)})}}}}]});var ie=["$animate",function(a){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(c,d,e,f,g){var h,l,k;c.$watch(e.ngIf,function(c){c?l||g(function(c,f){l=f;c[c.length++]=Y.createComment(" end ngIf: "+e.ngIf+" ");h={clone:c};a.enter(c,d.parent(),d)}):(k&&(k.remove(),k=null),l&&(l.$destroy(),l=null),h&&(k= +tb(h.clone),a.leave(k).then(function(){k=null}),h=null))})}}}],je=["$templateRequest","$anchorScroll","$animate","$sce",function(a,c,d,e){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:ga.noop,compile:function(f,g){var h=g.ngInclude||g.src,l=g.onload||"",k=g.autoscroll;return function(f,g,q,s,r){var t=0,p,v,w,L=function(){v&&(v.remove(),v=null);p&&(p.$destroy(),p=null);w&&(d.leave(w).then(function(){v=null}),v=w,w=null)};f.$watch(e.parseAsResourceUrl(h),function(e){var h= +function(){!y(k)||k&&!f.$eval(k)||c()},q=++t;e?(a(e,!0).then(function(a){if(q===t){var c=f.$new();s.template=a;a=r(c,function(a){L();d.enter(a,null,g).then(h)});p=c;w=a;p.$emit("$includeContentLoaded",e);f.$eval(l)}},function(){q===t&&(L(),f.$emit("$includeContentError",e))}),f.$emit("$includeContentRequested",e)):(L(),s.template=null)})}}}}],Ae=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(c,d,e,f){/SVG/.test(d[0].toString())?(d.empty(),a(Fc(f.template, +Y).childNodes)(c,function(a){d.append(a)},{futureParentElement:d})):(d.html(f.template),a(d.contents())(c))}}}],ke=Ja({priority:450,compile:function(){return{pre:function(a,c,d){a.$eval(d.ngInit)}}}}),we=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,c,d,e){var f=c.attr(d.$attr.ngList)||", ",g="false"!==d.ngTrim,h=g?U(f):f;e.$parsers.push(function(a){if(!A(a)){var c=[];a&&s(a.split(h),function(a){a&&c.push(g?U(a):a)});return c}});e.$formatters.push(function(a){return D(a)? +a.join(f):t});e.$isEmpty=function(a){return!a||!a.length}}}},kb="ng-valid",vd="ng-invalid",Sa="ng-pristine",Kb="ng-dirty",xd="ng-pending",Mb=new T("ngModel"),cg=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,c,d,e,f,g,h,l,k,m){this.$modelValue=this.$viewValue=Number.NaN;this.$$rawModelValue=t;this.$validators={};this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$untouched=!0; +this.$touched=!1;this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$error={};this.$$success={};this.$pending=t;this.$name=m(d.name||"",!1)(a);var n=f(d.ngModel),q=n.assign,u=n,r=q,O=null,p=this;this.$$setOptions=function(a){if((p.$options=a)&&a.getterSetter){var c=f(d.ngModel+"()"),g=f(d.ngModel+"($$$p)");u=function(a){var d=n(a);G(d)&&(d=c(a));return d};r=function(a,c){G(n(a))?g(a,{$$$p:p.$modelValue}):q(a,p.$modelValue)}}else if(!n.assign)throw Mb("nonassign",d.ngModel,va(e)); +};this.$render=H;this.$isEmpty=function(a){return A(a)||""===a||null===a||a!==a};var v=e.inheritedData("$formController")||Jb,w=0;sd({ctrl:this,$element:e,set:function(a,c){a[c]=!0},unset:function(a,c){delete a[c]},parentForm:v,$animate:g});this.$setPristine=function(){p.$dirty=!1;p.$pristine=!0;g.removeClass(e,Kb);g.addClass(e,Sa)};this.$setDirty=function(){p.$dirty=!0;p.$pristine=!1;g.removeClass(e,Sa);g.addClass(e,Kb);v.$setDirty()};this.$setUntouched=function(){p.$touched=!1;p.$untouched=!0;g.setClass(e, +"ng-untouched","ng-touched")};this.$setTouched=function(){p.$touched=!0;p.$untouched=!1;g.setClass(e,"ng-touched","ng-untouched")};this.$rollbackViewValue=function(){h.cancel(O);p.$viewValue=p.$$lastCommittedViewValue;p.$render()};this.$validate=function(){if(!V(p.$modelValue)||!isNaN(p.$modelValue)){var a=p.$$rawModelValue,c=p.$valid,d=p.$modelValue,e=p.$options&&p.$options.allowInvalid;p.$$runValidators(p.$error[p.$$parserName||"parse"]?!1:t,a,p.$$lastCommittedViewValue,function(f){e||c===f||(p.$modelValue= +f?a:t,p.$modelValue!==d&&p.$$writeModelToScope())})}};this.$$runValidators=function(a,c,d,e){function f(){var a=!0;s(p.$validators,function(e,f){var g=e(c,d);a=a&&g;h(f,g)});return a?!0:(s(p.$asyncValidators,function(a,c){h(c,null)}),!1)}function g(){var a=[],e=!0;s(p.$asyncValidators,function(f,g){var l=f(c,d);if(!l||!G(l.then))throw Mb("$asyncValidators",l);h(g,t);a.push(l.then(function(){h(g,!0)},function(a){e=!1;h(g,!1)}))});a.length?k.all(a).then(function(){l(e)},H):l(!0)}function h(a,c){m=== +w&&p.$setValidity(a,c)}function l(a){m===w&&e(a)}w++;var m=w;(function(a){var c=p.$$parserName||"parse";if(a===t)h(c,null);else if(h(c,a),!a)return s(p.$validators,function(a,c){h(c,null)}),s(p.$asyncValidators,function(a,c){h(c,null)}),!1;return!0})(a)?f()?g():l(!1):l(!1)};this.$commitViewValue=function(){var a=p.$viewValue;h.cancel(O);if(p.$$lastCommittedViewValue!==a||""===a&&p.$$hasNativeValidators)p.$$lastCommittedViewValue=a,p.$pristine&&this.$setDirty(),this.$$parseAndValidate()};this.$$parseAndValidate= +function(){var c=p.$$lastCommittedViewValue,d=A(c)?t:!0;if(d)for(var e=0;eF;)d=r.pop(),m(N,d.label,!1),d.element.remove()}for(;R.length>x;){l=R.pop();for(F=1;Fa&&q.removeOption(c)})}var n;if(!(n=r.match(d)))throw eg("iexp", +r,va(f));var C=c(n[2]||n[1]),x=n[4]||n[6],A=/ as /.test(n[0])&&n[1],B=A?c(A):null,G=n[5],I=c(n[3]||""),F=c(n[2]?n[1]:x),P=c(n[7]),M=n[8]?c(n[8]):null,Q={},R=[[{element:f,label:""}]],T={};z&&(a(z)(e),z.removeClass("ng-scope"),z.remove());f.empty();f.on("change",function(){e.$apply(function(){var a=P(e)||[],c;if(u)c=[],s(f.val(),function(d){d=M?Q[d]:d;c.push("?"===d?t:""===d?null:h(B?B:F,d,a[d]))});else{var d=M?Q[f.val()]:f.val();c="?"===d?t:""===d?null:h(B?B:F,d,a[d])}g.$setViewValue(c);p()})});g.$render= +p;e.$watchCollection(P,l);e.$watchCollection(function(){var a=P(e),c;if(a&&D(a)){c=Array(a.length);for(var d=0,f=a.length;df||e.$isEmpty(a)||c.length<=f}}}}},Ac=function(){return{restrict:"A",require:"?ngModel",link:function(a,c, +d,e){if(e){var f=0;d.$observe("minlength",function(a){f=ba(a)||0;e.$validate()});e.$validators.minlength=function(a,c){return e.$isEmpty(c)||c.length>=f}}}}};M.angular.bootstrap?console.log("WARNING: Tried to load angular more than once."):(Nd(),Pd(ga),B(Y).ready(function(){Jd(Y,sc)}))})(window,document);!window.angular.$$csp()&&window.angular.element(document).find("head").prepend(''); +//# sourceMappingURL=angular.min.js.map + +; browserify_shim__define__module__export__(typeof angular != "undefined" ? angular : window.angular); + +}).call(global, undefined, undefined, undefined, undefined, function defineExport(ex) { module.exports = ex; }); + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{}],2:[function(require,module,exports){ +/*! angular-highlightjs +version: 0.3.3 +build date: 2015-02-03 +author: Robin Fan +https://github.com/pc035860/angular-highlightjs.git */ + +/* commonjs package manager support (eg componentjs) */ +if (typeof module !== "undefined" && typeof exports !== "undefined" && module.exports === exports){ + module.exports = 'hljs'; +} + +(function (window, angular, undefined) { +/*jshint globalstrict: true*/ +/*global angular*/ +'use strict'; + +function shouldHighlightStatics(attrs) { + var should = true; + angular.forEach([ + 'source', 'include' + ], function (name) { + if (attrs[name]) { + should = false; + } + }); + return should; +} + + +var ngModule = angular.module('hljs', []); + +/** + * hljsService service + */ +ngModule.provider('hljsService', function () { + var _hljsOptions = {}; + + return { + setOptions: function (options) { + angular.extend(_hljsOptions, options); + }, + getOptions: function () { + return angular.copy(_hljsOptions); + }, + $get: ['$window', function ($window) { + ($window.hljs.configure || angular.noop)(_hljsOptions); + return $window.hljs; + }] + }; +}); + +/** + * hljsCache service + */ +ngModule.factory('hljsCache', [ + '$cacheFactory', +function ($cacheFactory) { + return $cacheFactory('hljsCache'); +}]); + +/** + * HljsCtrl controller + */ +ngModule.controller('HljsCtrl', [ + 'hljsCache', 'hljsService', +function HljsCtrl (hljsCache, hljsService) { + var ctrl = this; + + var _elm = null, + _lang = null, + _code = null, + _hlCb = null; + + ctrl.init = function (codeElm) { + _elm = codeElm; + }; + + ctrl.setLanguage = function (lang) { + _lang = lang; + + if (_code) { + ctrl.highlight(_code); + } + }; + + ctrl.highlightCallback = function (cb) { + _hlCb = cb; + }; + + ctrl.highlight = function (code) { + if (!_elm) { + return; + } + + var res, cacheKey; + + _code = code; + + if (_lang) { + // language specified + cacheKey = ctrl._cacheKey(_lang, _code); + res = hljsCache.get(cacheKey); + + if (!res) { + res = hljsService.highlight(_lang, hljsService.fixMarkup(_code), true); + hljsCache.put(cacheKey, res); + } + } + else { + // language auto-detect + cacheKey = ctrl._cacheKey(_code); + res = hljsCache.get(cacheKey); + + if (!res) { + res = hljsService.highlightAuto(hljsService.fixMarkup(_code)); + hljsCache.put(cacheKey, res); + } + } + + _elm.html(res.value); + // language as class on the tag + _elm.addClass(res.language); + + if (_hlCb !== null && angular.isFunction(_hlCb)) { + _hlCb(); + } + }; + + ctrl.clear = function () { + if (!_elm) { + return; + } + _code = null; + _elm.text(''); + }; + + ctrl.release = function () { + _elm = null; + }; + + ctrl._cacheKey = function () { + var args = Array.prototype.slice.call(arguments), + glue = "!angular-highlightjs!"; + return args.join(glue); + }; +}]); + + +var hljsDir, languageDirFactory, sourceDirFactory, includeDirFactory; + +/** + * hljs directive + */ +hljsDir = ['$compile', '$parse', function ($compile, $parse) { + return { + restrict: 'EA', + controller: 'HljsCtrl', + compile: function(tElm, tAttrs, transclude) { + // get static code + // strip the starting "new line" character + var staticHTML = tElm[0].innerHTML.replace(/^(\r\n|\r|\n)/m, ''), + staticText = tElm[0].textContent.replace(/^(\r\n|\r|\n)/m, ''); + + // put template + tElm.html('
'); + + return function postLink(scope, iElm, iAttrs, ctrl) { + var compileCheck, escapeCheck; + + if (angular.isDefined(iAttrs.compile)) { + compileCheck = $parse(iAttrs.compile); + } + + if (angular.isDefined(iAttrs.escape)) { + escapeCheck = $parse(iAttrs.escape); + } else if (angular.isDefined(iAttrs.noEscape)) { + escapeCheck = $parse('false'); + } + + ctrl.init(iElm.find('code')); + + if (iAttrs.onhighlight) { + ctrl.highlightCallback(function () { + scope.$eval(iAttrs.onhighlight); + }); + } + + if ((staticHTML || staticText) && shouldHighlightStatics(iAttrs)) { + + var code; + + // Auto-escape check + // default to "true" + if (escapeCheck && !escapeCheck(scope)) { + code = staticText; + } + else { + code = staticHTML; + } + + ctrl.highlight(code); + + // Check if the highlight result needs to be compiled + if (compileCheck && compileCheck(scope)) { + // compile the new DOM and link it to the current scope. + // NOTE: we only compile .childNodes so that + // we don't get into infinite loop compiling ourselves + $compile(iElm.find('code').contents())(scope); + } + } + + scope.$on('$destroy', function () { + ctrl.release(); + }); + }; + } + }; +}]; + +/** + * language directive + */ +languageDirFactory = function (dirName) { + return [function () { + return { + require: '?hljs', + restrict: 'A', + link: function (scope, iElm, iAttrs, ctrl) { + if (!ctrl) { + return; + } + iAttrs.$observe(dirName, function (lang) { + if (angular.isDefined(lang)) { + ctrl.setLanguage(lang); + } + }); + } + }; + }]; +}; + +/** + * source directive + */ +sourceDirFactory = function (dirName) { + return ['$compile', '$parse', function ($compile, $parse) { + return { + require: '?hljs', + restrict: 'A', + link: function(scope, iElm, iAttrs, ctrl) { + var compileCheck; + + if (!ctrl) { + return; + } + + if (angular.isDefined(iAttrs.compile)) { + compileCheck = $parse(iAttrs.compile); + } + + scope.$watch(iAttrs[dirName], function (newCode, oldCode) { + if (newCode) { + ctrl.highlight(newCode); + + // Check if the highlight result needs to be compiled + if (compileCheck && compileCheck(scope)) { + // compile the new DOM and link it to the current scope. + // NOTE: we only compile .childNodes so that + // we don't get into infinite loop compiling ourselves + $compile(iElm.find('code').contents())(scope); + } + } + else { + ctrl.clear(); + } + }); + } + }; + }]; +}; + +/** + * include directive + */ +includeDirFactory = function (dirName) { + return [ + '$http', '$templateCache', '$q', '$compile', '$parse', + function ($http, $templateCache, $q, $compile, $parse) { + return { + require: '?hljs', + restrict: 'A', + compile: function(tElm, tAttrs, transclude) { + var srcExpr = tAttrs[dirName]; + + return function postLink(scope, iElm, iAttrs, ctrl) { + var changeCounter = 0, compileCheck; + + if (!ctrl) { + return; + } + + if (angular.isDefined(iAttrs.compile)) { + compileCheck = $parse(iAttrs.compile); + } + + scope.$watch(srcExpr, function (src) { + var thisChangeId = ++changeCounter; + + if (src && angular.isString(src)) { + var templateCachePromise, dfd; + + templateCachePromise = $templateCache.get(src); + if (!templateCachePromise) { + dfd = $q.defer(); + $http.get(src, { + cache: $templateCache, + transformResponse: function(data, headersGetter) { + // Return the raw string, so $http doesn't parse it + // if it's json. + return data; + } + }).success(function (code) { + if (thisChangeId !== changeCounter) { + return; + } + dfd.resolve(code); + }).error(function() { + if (thisChangeId === changeCounter) { + ctrl.clear(); + } + dfd.resolve(); + }); + templateCachePromise = dfd.promise; + } + + $q.when(templateCachePromise) + .then(function (code) { + if (!code) { + return; + } + + // $templateCache from $http + if (angular.isArray(code)) { + // 1.1.5 + code = code[1]; + } + else if (angular.isObject(code)) { + // 1.0.7 + code = code.data; + } + + code = code.replace(/^(\r\n|\r|\n)/m, ''); + ctrl.highlight(code); + + // Check if the highlight result needs to be compiled + if (compileCheck && compileCheck(scope)) { + // compile the new DOM and link it to the current scope. + // NOTE: we only compile .childNodes so that + // we don't get into infinite loop compiling ourselves + $compile(iElm.find('code').contents())(scope); + } + }); + } + else { + ctrl.clear(); + } + }); + }; + } + }; + }]; +}; + +/** + * Add directives + */ +ngModule +.directive('hljs', hljsDir) +.directive('language', languageDirFactory('language')) +.directive('source', sourceDirFactory('source')) +.directive('include', includeDirFactory('include')); +})(window, window.angular); +},{}],3:[function(require,module,exports){ +var MainCtrl = function MainCtrl($scope, $parse) { + + $scope.editObject = '{angularjs: 1, is: 2, awesome: 3}'; + + $scope.prettyJSON = ''; + + $scope.tabWidth = 4; + + var _lastGoodResult = ''; + $scope.toPrettyJSON = function (objStr, tabWidth) { + var obj; + + try { + obj = $parse(objStr)({}); + }catch(e){ + // eat $parse error + return _lastGoodResult; + } + + var result = JSON.stringify(obj, null, Number(tabWidth)); + _lastGoodResult = result; + + return result; + }; + +}; + +module.exports = MainCtrl; + +},{}],4:[function(require,module,exports){ +var angular = require('angular'); + +angular +.module('exampleApp', [ + // use 'angular-highlightjs' instead once you have angular-highlightjs npm installed + require('./angular-highlightjs') +]) +.controller('MainCtrl', require('./main-ctrl')); + +},{"./angular-highlightjs":2,"./main-ctrl":3,"angular":1}]},{},[4]) +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJub2RlX21vZHVsZXMvYW5ndWxhci9hbmd1bGFyLm1pbi5qcyIsInNjcmlwdHMvYW5ndWxhci1oaWdobGlnaHRqcy5qcyIsInNjcmlwdHMvbWFpbi1jdHJsLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUF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G4gICAgICAgICAgaWYgKGFuZ3VsYXIuaXNEZWZpbmVkKGxhbmcpKSB7XG4gICAgICAgICAgICBjdHJsLnNldExhbmd1YWdlKGxhbmcpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgfTtcbiAgfV07XG59O1xuXG4vKipcbiAqIHNvdXJjZSBkaXJlY3RpdmVcbiAqL1xuc291cmNlRGlyRmFjdG9yeSA9IGZ1bmN0aW9uIChkaXJOYW1lKSB7XG4gIHJldHVybiBbJyRjb21waWxlJywgJyRwYXJzZScsIGZ1bmN0aW9uICgkY29tcGlsZSwgJHBhcnNlKSB7XG4gICAgcmV0dXJuIHtcbiAgICAgIHJlcXVpcmU6ICc/aGxqcycsXG4gICAgICByZXN0cmljdDogJ0EnLFxuICAgICAgbGluazogZnVuY3Rpb24oc2NvcGUsIGlFbG0sIGlBdHRycywgY3RybCkge1xuICAgICAgICB2YXIgY29tcGlsZUNoZWNrO1xuXG4gICAgICAgIGlmICghY3RybCkge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChhbmd1bGFyLmlzRGVmaW5lZChpQXR0cnMuY29tcGlsZSkpIHtcbiAgICAgICAgICBjb21waWxlQ2hlY2sgPSAkcGFyc2UoaUF0dHJzLmNvbXBpbGUpO1xuICAgICAgICB9XG5cbiAgICAgICAgc2NvcGUuJHdhdGNoKGlBdHRyc1tkaXJOYW1lXSwgZnVuY3Rpb24gKG5ld0NvZGUsIG9sZENvZGUpIHtcbiAgICAgICAgICBpZiAobmV3Q29kZSkge1xuICAgICAgICAgICAgY3RybC5oaWdobGlnaHQobmV3Q29kZSk7XG5cbiAgICAgICAgICAgIC8vIENoZWNrIGlmIHRoZSBoaWdobGlnaHQgcmVzdWx0IG5lZWRzIHRvIGJlIGNvbXBpbGVkXG4gICAgICAgICAgICBpZiAoY29tcGlsZUNoZWNrICYmIGNvbXBpbGVDaGVjayhzY29wZSkpIHtcbiAgICAgICAgICAgICAgLy8gY29tcGlsZSB0aGUgbmV3IERPTSBhbmQgbGluayBpdCB0byB0aGUgY3VycmVudCBzY29wZS5cbiAgICAgICAgICAgICAgLy8gTk9URTogd2Ugb25seSBjb21waWxlIC5jaGlsZE5vZGVzIHNvIHRoYXRcbiAgICAgICAgICAgICAgLy8gd2UgZG9uJ3QgZ2V0IGludG8gaW5maW5pdGUgbG9vcCBjb21waWxpbmcgb3Vyc2VsdmVzXG4gICAgICAgICAgICAgICRjb21waWxlKGlFbG0uZmluZCgnY29kZScpLmNvbnRlbnRzKCkpKHNjb3BlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBjdHJsLmNsZWFyKCk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH1cbiAgICB9O1xuICB9XTtcbn07XG5cbi8qKlxuICogaW5jbHVkZSBkaXJlY3RpdmVcbiAqL1xuaW5jbHVkZURpckZhY3RvcnkgPSBmdW5jdGlvbiAoZGlyTmFtZSkge1xuICByZXR1cm4gW1xuICAgICAgICAgICAgICckaHR0cCcsICckdGVtcGxhdGVDYWNoZScsICckcScsICckY29tcGlsZScsICckcGFyc2UnLFxuICAgIGZ1bmN0aW9uICgkaHR0cCwgICAkdGVtcGxhdGVDYWNoZSwgICAkcSwgICAkY29tcGlsZSwgICAkcGFyc2UpIHtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIHJlcXVpcmU6ICc/aGxqcycsXG4gICAgICAgIHJlc3RyaWN0OiAnQScsXG4gICAgICAgIGNvbXBpbGU6IGZ1bmN0aW9uKHRFbG0sIHRBdHRycywgdHJhbnNjbHVkZSkge1xuICAgICAgICAgIHZhciBzcmNFeHByID0gdEF0dHJzW2Rpck5hbWVdO1xuXG4gICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIHBvc3RMaW5rKHNjb3BlLCBpRWxtLCBpQXR0cnMsIGN0cmwpIHtcbiAgICAgICAgICAgIHZhciBjaGFuZ2VDb3VudGVyID0gMCwgY29tcGlsZUNoZWNrO1xuXG4gICAgICAgICAgICBpZiAoIWN0cmwpIHtcbiAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoYW5ndWxhci5pc0RlZmluZWQoaUF0dHJzLmNvbXBpbGUpKSB7XG4gICAgICAgICAgICAgIGNvbXBpbGVDaGVjayA9ICRwYXJzZShpQXR0cnMuY29tcGlsZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHNjb3BlLiR3YXRjaChzcmNFeHByLCBmdW5jdGlvbiAoc3JjKSB7XG4gICAgICAgICAgICAgIHZhciB0aGlzQ2hhbmdlSWQgPSArK2NoYW5nZUNvdW50ZXI7XG5cbiAgICAgICAgICAgICAgaWYgKHNyYyAmJiBhbmd1bGFyLmlzU3RyaW5nKHNyYykpIHtcbiAgICAgICAgICAgICAgICB2YXIgdGVtcGxhdGVDYWNoZVByb21pc2UsIGRmZDtcblxuICAgICAgICAgICAgICAgIHRlbXBsYXRlQ2FjaGVQcm9taXNlID0gJHRlbXBsYXRlQ2FjaGUuZ2V0KHNyYyk7XG4gICAgICAgICAgICAgICAgaWYgKCF0ZW1wbGF0ZUNhY2hlUHJvbWlzZSkge1xuICAgICAgICAgICAgICAgICAgZGZkID0gJHEuZGVmZXIoKTtcbiAgICAgICAgICAgICAgICAgICRodHRwLmdldChzcmMsIHtcbiAgICAgICAgICAgICAgICAgICAgY2FjaGU6ICR0ZW1wbGF0ZUNhY2hlLFxuICAgICAgICAgICAgICAgICAgICB0cmFuc2Zvcm1SZXNwb25zZTogZnVuY3Rpb24oZGF0YSwgaGVhZGVyc0dldHRlcikge1xuICAgICAgICAgICAgICAgICAgICAgIC8vIFJldHVybiB0aGUgcmF3IHN0cmluZywgc28gJGh0dHAgZG9lc24ndCBwYXJzZSBpdFxuICAgICAgICAgICAgICAgICAgICAgIC8vIGlmIGl0J3MganNvbi5cbiAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGF0YTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSkuc3VjY2VzcyhmdW5jdGlvbiAoY29kZSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpc0NoYW5nZUlkICE9PSBjaGFuZ2VDb3VudGVyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGRmZC5yZXNvbHZlKGNvZGUpO1xuICAgICAgICAgICAgICAgICAgfSkuZXJyb3IoZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzQ2hhbmdlSWQgPT09IGNoYW5nZUNvdW50ZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICBjdHJsLmNsZWFyKCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZGZkLnJlc29sdmUoKTtcbiAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgdGVtcGxhdGVDYWNoZVByb21pc2UgPSBkZmQucHJvbWlzZTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAkcS53aGVuKHRlbXBsYXRlQ2FjaGVQcm9taXNlKVxuICAgICAgICAgICAgICAgIC50aGVuKGZ1bmN0aW9uIChjb2RlKSB7XG4gICAgICAgICAgICAgICAgICBpZiAoIWNvZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAvLyAkdGVtcGxhdGVDYWNoZSBmcm9tICRodHRwXG4gICAgICAgICAgICAgICAgICBpZiAoYW5ndWxhci5pc0FycmF5KGNvZGUpKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIDEuMS41XG4gICAgICAgICAgICAgICAgICAgIGNvZGUgPSBjb2RlWzFdO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoYW5ndWxhci5pc09iamVjdChjb2RlKSkge1xuICAgICAgICAgICAgICAgICAgICAvLyAxLjAuN1xuICAgICAgICAgICAgICAgICAgICBjb2RlID0gY29kZS5kYXRhO1xuICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICBjb2RlID0gY29kZS5yZXBsYWNlKC9eKFxcclxcbnxcXHJ8XFxuKS9tLCAnJyk7XG4gICAgICAgICAgICAgICAgICBjdHJsLmhpZ2hsaWdodChjb2RlKTtcblxuICAgICAgICAgICAgICAgICAgLy8gQ2hlY2sgaWYgdGhlIGhpZ2hsaWdodCByZXN1bHQgbmVlZHMgdG8gYmUgY29tcGlsZWRcbiAgICAgICAgICAgICAgICAgIGlmIChjb21waWxlQ2hlY2sgJiYgY29tcGlsZUNoZWNrKHNjb3BlKSkge1xuICAgICAgICAgICAgICAgICAgICAvLyBjb21waWxlIHRoZSBuZXcgRE9NIGFuZCBsaW5rIGl0IHRvIHRoZSBjdXJyZW50IHNjb3BlLlxuICAgICAgICAgICAgICAgICAgICAvLyBOT1RFOiB3ZSBvbmx5IGNvbXBpbGUgLmNoaWxkTm9kZXMgc28gdGhhdFxuICAgICAgICAgICAgICAgICAgICAvLyB3ZSBkb24ndCBnZXQgaW50byBpbmZpbml0ZSBsb29wIGNvbXBpbGluZyBvdXJzZWx2ZXNcbiAgICAgICAgICAgICAgICAgICAgJGNvbXBpbGUoaUVsbS5maW5kKCdjb2RlJykuY29udGVudHMoKSkoc2NvcGUpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGN0cmwuY2xlYXIoKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgfTtcbiAg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AgICAgIHJldHVybiByZXN1bHQ7XG4gICAgfTtcbiAgXG59O1xuXG5tb2R1bGUuZXhwb3J0cyA9IE1haW5DdHJsO1xuIl19 diff --git a/with-browserify/scripts/main-ctrl.js b/with-browserify/scripts/main-ctrl.js new file mode 100644 index 0000000..280f479 --- /dev/null +++ b/with-browserify/scripts/main-ctrl.js @@ -0,0 +1,28 @@ +var MainCtrl = function MainCtrl($scope, $parse) { + + $scope.editObject = '{angularjs: 1, is: 2, awesome: 3}'; + + $scope.prettyJSON = ''; + + $scope.tabWidth = 4; + + var _lastGoodResult = ''; + $scope.toPrettyJSON = function (objStr, tabWidth) { + var obj; + + try { + obj = $parse(objStr)({}); + }catch(e){ + // eat $parse error + return _lastGoodResult; + } + + var result = JSON.stringify(obj, null, Number(tabWidth)); + _lastGoodResult = result; + + return result; + }; + +}; + +module.exports = MainCtrl; diff --git a/with-browserify/style.css b/with-browserify/style.css new file mode 100644 index 0000000..eb9c1fb --- /dev/null +++ b/with-browserify/style.css @@ -0,0 +1,26 @@ +.taller { + line-height: 28px; +} + +textarea { + width: 100%; + + min-height: 500px; +} + +.btn { + + padding: 3px 12px; + +} + +pre { + background-color: transparent; + padding: 0; +} + +.text-muted input[type="text"] { + width: 37px; + font-size: 1em; + display: inline-block; +}