You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2014/01/28 00:21:19 UTC

[01/61] [abbrv] [partial] updated to latest Angular-based admin portal

Updated Branches:
  refs/heads/master 832017bf7 -> 2a01c30b6
  refs/heads/optimistic-tx-semantics 6178ec0a8 -> 13120f53e
  refs/pull/34/merge [deleted] cc175edb0
  refs/pull/35/head [created] 5da8ea8ea
  refs/pull/35/merge [created] bed1ee837


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/jquery/jquery-migrate-1.1.1.min.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/jquery/jquery-migrate-1.1.1.min.js b/portal/js/libs/jquery/jquery-migrate-1.1.1.min.js
new file mode 100644
index 0000000..eb3ecb1
--- /dev/null
+++ b/portal/js/libs/jquery/jquery-migrate-1.1.1.min.js
@@ -0,0 +1,3 @@
+/*! jQuery Migrate v1.1.1 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */
+jQuery.migrateMute===void 0&&(jQuery.migrateMute=!0),function(e,t,n){function r(n){o[n]||(o[n]=!0,e.migrateWarnings.push(n),t.console&&console.warn&&!e.migrateMute&&(console.warn("JQMIGRATE: "+n),e.migrateTrace&&console.trace&&console.trace()))}function a(t,a,o,i){if(Object.defineProperty)try{return Object.defineProperty(t,a,{configurable:!0,enumerable:!0,get:function(){return r(i),o},set:function(e){r(i),o=e}}),n}catch(s){}e._definePropertyBroken=!0,t[a]=o}var o={};e.migrateWarnings=[],!e.migrateMute&&t.console&&console.log&&console.log("JQMIGRATE: Logging is active"),e.migrateTrace===n&&(e.migrateTrace=!0),e.migrateReset=function(){o={},e.migrateWarnings.length=0},"BackCompat"===document.compatMode&&r("jQuery is not compatible with Quirks Mode");var i=e("<input/>",{size:1}).attr("size")&&e.attrFn,s=e.attr,u=e.attrHooks.value&&e.attrHooks.value.get||function(){return null},c=e.attrHooks.value&&e.attrHooks.value.set||function(){return n},l=/^(?:input|button)$/i,d=/^[238]$/,p=/^(?:au
 tofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,f=/^(?:checked|selected)$/i;a(e,"attrFn",i||{},"jQuery.attrFn is deprecated"),e.attr=function(t,a,o,u){var c=a.toLowerCase(),g=t&&t.nodeType;return u&&(4>s.length&&r("jQuery.fn.attr( props, pass ) is deprecated"),t&&!d.test(g)&&(i?a in i:e.isFunction(e.fn[a])))?e(t)[a](o):("type"===a&&o!==n&&l.test(t.nodeName)&&t.parentNode&&r("Can't change the 'type' of an input or button in IE 6/7/8"),!e.attrHooks[c]&&p.test(c)&&(e.attrHooks[c]={get:function(t,r){var a,o=e.prop(t,r);return o===!0||"boolean"!=typeof o&&(a=t.getAttributeNode(r))&&a.nodeValue!==!1?r.toLowerCase():n},set:function(t,n,r){var a;return n===!1?e.removeAttr(t,r):(a=e.propFix[r]||r,a in t&&(t[a]=!0),t.setAttribute(r,r.toLowerCase())),r}},f.test(c)&&r("jQuery.fn.attr('"+c+"') may use property instead of attribute")),s.call(e,t,a,o))},e.attrHooks.value={get:function(e,t){var n=(e.nodeName||"").toLowerCase();r
 eturn"button"===n?u.apply(this,arguments):("input"!==n&&"option"!==n&&r("jQuery.fn.attr('value') no longer gets properties"),t in e?e.value:null)},set:function(e,t){var a=(e.nodeName||"").toLowerCase();return"button"===a?c.apply(this,arguments):("input"!==a&&"option"!==a&&r("jQuery.fn.attr('value', val) no longer sets properties"),e.value=t,n)}};var g,h,v=e.fn.init,m=e.parseJSON,y=/^(?:[^<]*(<[\w\W]+>)[^>]*|#([\w\-]*))$/;e.fn.init=function(t,n,a){var o;return t&&"string"==typeof t&&!e.isPlainObject(n)&&(o=y.exec(t))&&o[1]&&("<"!==t.charAt(0)&&r("$(html) HTML strings must start with '<' character"),n&&n.context&&(n=n.context),e.parseHTML)?v.call(this,e.parseHTML(e.trim(t),n,!0),n,a):v.apply(this,arguments)},e.fn.init.prototype=e.fn,e.parseJSON=function(e){return e||null===e?m.apply(this,arguments):(r("jQuery.parseJSON requires a valid JSON string"),null)},e.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*versi
 on|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e.browser||(g=e.uaMatch(navigator.userAgent),h={},g.browser&&(h[g.browser]=!0,h.version=g.version),h.chrome?h.webkit=!0:h.webkit&&(h.safari=!0),e.browser=h),a(e,"browser",e.browser,"jQuery.browser is deprecated"),e.sub=function(){function t(e,n){return new t.fn.init(e,n)}e.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(r,a){return a&&a instanceof e&&!(a instanceof t)&&(a=t(a)),e.fn.init.call(this,r,a,n)},t.fn.init.prototype=t.fn;var n=t(document);return r("jQuery.sub() is deprecated"),t},e.ajaxSetup({converters:{"text json":e.parseJSON}});var b=e.fn.data;e.fn.data=function(t){var a,o,i=this[0];return!i||"events"!==t||1!==arguments.length||(a=e.data(i,t),o=e._data(i,t),a!==n&&a!==o||o===n)?b.apply(this,arguments):(r("Use of jQuery.fn.data('events') is 
 deprecated"),o)};var j=/\/(java|ecma)script/i,w=e.fn.andSelf||e.fn.addBack;e.fn.andSelf=function(){return r("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),w.apply(this,arguments)},e.clean||(e.clean=function(t,a,o,i){a=a||document,a=!a.nodeType&&a[0]||a,a=a.ownerDocument||a,r("jQuery.clean() is deprecated");var s,u,c,l,d=[];if(e.merge(d,e.buildFragment(t,a).childNodes),o)for(c=function(e){return!e.type||j.test(e.type)?i?i.push(e.parentNode?e.parentNode.removeChild(e):e):o.appendChild(e):n},s=0;null!=(u=d[s]);s++)e.nodeName(u,"script")&&c(u)||(o.appendChild(u),u.getElementsByTagName!==n&&(l=e.grep(e.merge([],u.getElementsByTagName("script")),c),d.splice.apply(d,[s+1,0].concat(l)),s+=l.length));return d});var Q=e.event.add,x=e.event.remove,k=e.event.trigger,N=e.fn.toggle,C=e.fn.live,S=e.fn.die,T="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",M=RegExp("\\b(?:"+T+")\\b"),H=/(?:^|\s)hover(\.\S+|)\b/,A=function(t){return"string"!=typeof t||e.event.special.hover?t:
 (H.test(t)&&r("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),t&&t.replace(H,"mouseenter$1 mouseleave$1"))};e.event.props&&"attrChange"!==e.event.props[0]&&e.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),e.event.dispatch&&a(e.event,"handle",e.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),e.event.add=function(e,t,n,a,o){e!==document&&M.test(t)&&r("AJAX events should be attached to document: "+t),Q.call(this,e,A(t||""),n,a,o)},e.event.remove=function(e,t,n,r,a){x.call(this,e,A(t)||"",n,r,a)},e.fn.error=function(){var e=Array.prototype.slice.call(arguments,0);return r("jQuery.fn.error() is deprecated"),e.splice(0,0,"error"),arguments.length?this.bind.apply(this,e):(this.triggerHandler.apply(this,e),this)},e.fn.toggle=function(t,n){if(!e.isFunction(t)||!e.isFunction(n))return N.apply(this,arguments);r("jQuery.fn.toggle(handler, handler...) is deprecated");var a=arguments,o=t.guid||e.guid++,i=0,s=function(n){var r=(e._da
 ta(this,"lastToggle"+t.guid)||0)%i;return e._data(this,"lastToggle"+t.guid,r+1),n.preventDefault(),a[r].apply(this,arguments)||!1};for(s.guid=o;a.length>i;)a[i++].guid=o;return this.click(s)},e.fn.live=function(t,n,a){return r("jQuery.fn.live() is deprecated"),C?C.apply(this,arguments):(e(this.context).on(t,this.selector,n,a),this)},e.fn.die=function(t,n){return r("jQuery.fn.die() is deprecated"),S?S.apply(this,arguments):(e(this.context).off(t,this.selector||"**",n),this)},e.event.trigger=function(e,t,n,a){return n||M.test(e)||r("Global events are undocumented and deprecated"),k.call(this,e,t,n||document,a)},e.each(T.split("|"),function(t,n){e.event.special[n]={setup:function(){var t=this;return t!==document&&(e.event.add(document,n+"."+e.guid,function(){e.event.trigger(n,null,t,!0)}),e._data(this,n,e.guid++)),!1},teardown:function(){return this!==document&&e.event.remove(document,n+"."+e._data(this,n)),!1}}})}(jQuery,window);
+//@ sourceMappingURL=dist/jquery-migrate.min.map
\ No newline at end of file


[36/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/lib/jquery-ui-1.8.18.min.js
----------------------------------------------------------------------
diff --git a/portal/js/lib/jquery-ui-1.8.18.min.js b/portal/js/lib/jquery-ui-1.8.18.min.js
deleted file mode 100644
index 59d4a5e..0000000
--- a/portal/js/lib/jquery-ui-1.8.18.min.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/*!
- * jQuery UI 1.8.18
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI
- */(function(a,b){function d(b){return!a(b).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}function c(b,c){var e=b.nodeName.toLowerCase();if("area"===e){var f=b.parentNode,g=f.name,h;if(!b.href||!g||f.nodeName.toLowerCase()!=="map")return!1;h=a("img[usemap=#"+g+"]")[0];return!!h&&d(h)}return(/input|select|textarea|button|object/.test(e)?!b.disabled:"a"==e?b.href||c:c)&&d(b)}a.ui=a.ui||{};a.ui.version||(a.extend(a.ui,{version:"1.8.18",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(b,c){return typeof b=="numb
 er"?this.each(function(){var d=this;setTimeout(function(){a(d).focus(),c&&c.call(d)},b)}):this._focus.apply(this,arguments)},scrollParent:function(){var b;a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?b=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):b=this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(c){if(c!==b)return this.css("zIndex",c);if(this.length){var d=a(this[0]),e,f;while(d.length&&d[0]!==document){e=d.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){f=parseInt(d.css("zIndex"),10);if(!isNaN(f)&&f!==0)return f}d=d.parent()}}return 0},disableSelecti
 on:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a.each(["Width","Height"],function(c,d){function h(b,c,d,f){a.each(e,function(){c-=parseFloat(a.curCSS(b,"padding"+this,!0))||0,d&&(c-=parseFloat(a.curCSS(b,"border"+this+"Width",!0))||0),f&&(c-=parseFloat(a.curCSS(b,"margin"+this,!0))||0)});return c}var e=d==="Width"?["Left","Right"]:["Top","Bottom"],f=d.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+d]=function(c){if(c===b)return g["inner"+d].call(this);return this.each(function(){a(this).css(f,h(this,c)+"px")})},a.fn["outer"+d]=function(b,c){if(typeof b!="number")return g["outer"+d].call(this,b);return this.each(function(){a(this).css(f,h(this,b,!0,c)+"px")})}}),a.extend(a.expr[":"],{data:function(b,c,d){return!!a.data(b,d[3])},
 focusable:function(b){return c(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var d=a.attr(b,"tabindex"),e=isNaN(d);return(e||d>=0)&&c(b,!e)}}),a(function(){var b=document.body,c=b.appendChild(c=document.createElement("div"));c.offsetHeight,a.extend(c.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),a.support.minHeight=c.offsetHeight===100,a.support.selectstart="onselectstart"in c,b.removeChild(c).style.display="none"}),a.extend(a.ui,{plugin:{add:function(b,c,d){var e=a.ui[b].prototype;for(var f in d)e.plugins[f]=e.plugins[f]||[],e.plugins[f].push([c,d[f]])},call:function(a,b,c){var d=a.plugins[b];if(!!d&&!!a.element[0].parentNode)for(var e=0;e<d.length;e++)a.options[d[e][0]]&&d[e][1].apply(a.element,c)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(b,c){if(a(b).css("overflow")==="hidden")return!1;var d=c&&c==="left"?"scrollLeft":"scrollTop",e=!1;if(b[d]>0)return!0;b[d]=
 1,e=b[d]>0,b[d]=0;return e},isOverAxis:function(a,b,c){return a>b&&a<b+c},isOver:function(b,c,d,e,f,g){return a.ui.isOverAxis(b,d,f)&&a.ui.isOverAxis(c,e,g)}}))})(jQuery),function(a,b){if(a.cleanData){var c=a.cleanData;a.cleanData=function(b){for(var d=0,e;(e=b[d])!=null;d++)try{a(e).triggerHandler("remove")}catch(f){}c(b)}}else{var d=a.fn.remove;a.fn.remove=function(b,c){return this.each(function(){c||(!b||a.filter(b,[this]).length)&&a("*",this).add([this]).each(function(){try{a(this).triggerHandler("remove")}catch(b){}});return d.call(a(this),b,c)})}}a.widget=function(b,c,d){var e=b.split(".")[0],f;b=b.split(".")[1],f=e+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][f]=function(c){return!!a.data(c,b)},a[e]=a[e]||{},a[e][b]=function(a,b){arguments.length&&this._createWidget(a,b)};var g=new c;g.options=a.extend(!0,{},g.options),a[e][b].prototype=a.extend(!0,g,{namespace:e,widgetName:b,widgetEventPrefix:a[e][b].prototype.widgetEventPrefix||b,widgetBaseClass:f},d),a.widget.bridge(b,a[e][b])},a
 .widget.bridge=function(c,d){a.fn[c]=function(e){var f=typeof e=="string",g=Array.prototype.slice.call(arguments,1),h=this;e=!f&&g.length?a.extend.apply(null,[!0,e].concat(g)):e;if(f&&e.charAt(0)==="_")return h;f?this.each(function(){var d=a.data(this,c),f=d&&a.isFunction(d[e])?d[e].apply(d,g):d;if(f!==d&&f!==b){h=f;return!1}}):this.each(function(){var b=a.data(this,c);b?b.option(e||{})._init():a.data(this,c,new d(e,this))});return h}},a.Widget=function(a,b){arguments.length&&this._createWidget(a,b)},a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function(b,c){a.data(c,this.widgetName,this),this.element=a(c),this.options=a.extend(!0,{},this.options,this._getCreateOptions(),b);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()}),this._create(),this._trigger("create"),this._init()},_getCreateOptions:function(){return a.metadata&&a.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:func
 tion(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName),this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled "+"ui-state-disabled")},widget:function(){return this.element},option:function(c,d){var e=c;if(arguments.length===0)return a.extend({},this.options);if(typeof c=="string"){if(d===b)return this.options[c];e={},e[c]=d}this._setOptions(e);return this},_setOptions:function(b){var c=this;a.each(b,function(a,b){c._setOption(a,b)});return this},_setOption:function(a,b){this.options[a]=b,a==="disabled"&&this.widget()[b?"addClass":"removeClass"](this.widgetBaseClass+"-disabled"+" "+"ui-state-disabled").attr("aria-disabled",b);return this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(b,c,d){var e,f,g=this.options[b];d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).
 toLowerCase(),c.target=this.element[0],f=c.originalEvent;if(f)for(e in f)e in c||(c[e]=f[e]);this.element.trigger(c,d);return!(a.isFunction(g)&&g.call(this.element[0],c,d)===!1||c.isDefaultPrevented())}}}(jQuery),function(a,b){var c=!1;a(document).mouseup(function(a){c=!1}),a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(c){if(!0===a.data(c.target,b.widgetName+".preventClickEvent")){a.removeData(c.target,b.widgetName+".preventClickEvent"),c.stopImmediatePropagation();return!1}}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(b){if(!c){this._mouseStarted&&this._mouseUp(b),this._mouseDownEvent=b;var d=this,e=b.which==1,f=typeof this.options.cancel=="string"&&b.target.nodeName?a(b.target).closest(this.options.cancel).length:!1;if(!e||f||!this._mouseCap
 ture(b))return!0;this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){this._mouseStarted=this._mouseStart(b)!==!1;if(!this._mouseStarted){b.preventDefault();return!0}}!0===a.data(b.target,this.widgetName+".preventClickEvent")&&a.removeData(b.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return d._mouseMove(a)},this._mouseUpDelegate=function(a){return d._mouseUp(a)},a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),b.preventDefault(),c=!0;return!0}},_mouseMove:function(b){if(a.browser.msie&&!(document.documentMode>=9)&&!b.button)return this._mouseUp(b);if(this._mouseStarted){this._mouseDrag(b);return b.preventDefault()}this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==
 !1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b));return!this._mouseStarted},_mouseUp:function(b){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,b.target==this._mouseDownEvent.target&&a.data(b.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(b));return!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(a){return this.mouseDelayMet},_mouseStart:function(a){},_mouseDrag:function(a){},_mouseStop:function(a){},_mouseCapture:function(a){return!0}})}(jQuery),function(a,b){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refresh
 Positions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position"))&&(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},destroy:function(){if(!!this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy();return this}},_mouseCapture:function(b){var c=this.options;if(this.helper||c.disabled||a(b.target).is(".ui-resizable-handle"))return!1;this.handle=this._getHandle(b);if(!this.handle)return!1;c.iframeFix&&a(c.iframeFix===!0?"iframe":c.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"><
 /div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(a(this).offset()).appendTo("body")});return!0},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b),this._cacheHelperProportions(),a.ui.ddmanager&&(a.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt),c.containment&&this._setContainment();if(this._trigger("start",b)===!1){this._clear();return!1
 }this._cacheHelperProportions(),a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this.helper.addClass("ui-draggable-dragging"),this._mouseDrag(b,!0),a.ui.ddmanager&&a.ui.ddmanager.dragStart(this,b);return!0},_mouseDrag:function(b,c){this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute");if(!c){var d=this._uiHash();if(this._trigger("drag",b,d)===!1){this._mouseUp({});return!1}this.position=d.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";a.ui.ddmanager&&a.ui.ddmanager.drag(this,b);return!1},_mouseStop:function(b){var c=!1;a.ui.ddmanager&&!this.options.dropBehaviour&&(c=a.ui.ddmanager.drop(this,b)),this.dropped&&(c=this.dropped,this.dropped=!1);if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return!1;if(this.options.revert=="invalid"&&!c||t
 his.options.revert=="valid"&&c||this.options.revert===!0||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,c)){var d=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){d._trigger("stop",b)!==!1&&d._clear()})}else this._trigger("stop",b)!==!1&&this._clear();return!1},_mouseUp:function(b){this.options.iframeFix===!0&&a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),a.ui.ddmanager&&a.ui.ddmanager.dragStop(this,b);return a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?!0:!1;a(this.options.handle,this.element).find("*").andSelf().each(function(){this==b.target&&(c=!0)});return c},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b])):c
 .helper=="clone"?this.element.clone().removeAttr("id"):this.element;d.parents("body").length||d.appendTo(c.appendTo=="parent"?this.element[0].parentNode:c.appendTo),d[0]!=this.element[0]&&!/(fixed|absolute)/.test(d.css("position"))&&d.css("position","absolute");return d},_adjustOffsetFromHelper:function(b){typeof b=="string"&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop
 ());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function
 (){var b=this.options;b.containment=="parent"&&(b.containment=this.helper[0].parentNode);if(b.containment=="document"||b.containment=="window")this.containment=[b.containment=="document"?0:a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,b.containment=="document"?0:a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(b.containment=="document"?0:a(window).scrollLeft())+a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(b.containment=="document"?0:a(window).scrollTop())+(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)&&b.containment.constructor!=Array){var c=a(b.containment),d=c[0];if(!d)return;var e=c.offset(),f=a(d).css("overflow")!="hidden";this.containment=[(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0),(p
 arseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0),(f?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(f?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=c}else b.containment.constructor==Array&&(this.containment=b.containment)},_convertPositionTo:function(b,c){c||(c=this.position);var d=b=="absolute"?1:-1,e=this.options,f=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&&a.browser
 .version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:f.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())*d)}},_generatePosition:function(b){var c=this.options,d=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName),f=b.pageX,g=b.pageY;if(this.originalPosition){var h;if(this.containment){if(this.relative_container){var i=this.relative_container.offset();h=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]}else h=this.containment;b.pageX-this.offset.click.left<h[0]&&(f=h[0]+this.offset.click.left),b.pageY-this.offset.click.top<h[1]&&(g=h[1]+this.offset.click.top),
 b.pageX-this.offset.click.left>h[2]&&(f=h[2]+this.offset.click.left),b.pageY-this.offset.click.top>h[3]&&(g=h[3]+this.offset.click.top)}if(c.grid){var j=c.grid[1]?this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1]:this.originalPageY;g=h?j-this.offset.click.top<h[1]||j-this.offset.click.top>h[3]?j-this.offset.click.top<h[1]?j+c.grid[1]:j-c.grid[1]:j:j;var k=c.grid[0]?this.originalPageX+Math.round((f-this.originalPageX)/c.grid[0])*c.grid[0]:this.originalPageX;f=h?k-this.offset.click.left<h[0]||k-this.offset.click.left>h[2]?k-this.offset.click.left<h[0]?k+c.grid[0]:k-c.grid[0]:k:k}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:d.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssP
 osition=="fixed"?-this.scrollParent.scrollLeft():e?0:d.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(b,c,d){d=d||this._uiHash(),a.ui.plugin.call(this,b,[c,d]),b=="drag"&&(this.positionAbs=this._convertPositionTo("absolute"));return a.Widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(a){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),a.extend(a.ui.draggable,{version:"1.8.18"}),a.ui.plugin.add("draggable","connectToSortable",{start:function(b,c){var d=a(this).data("draggable"),e=d.options,f=a.extend({},c,{item:d.element});d.sortables=[],a(e.connectToSortable).each(function(){var c=a.data(this,"sortable");c&&!c.options.disabled&&(d.sortables.push({instance:c,shouldRevert:c.options.revert}),c.refreshPositions(),c._trigg
 er("activate",b,f))})},stop:function(b,c){var d=a(this).data("draggable"),e=a.extend({},c,{item:d.element});a.each(d.sortables,function(){this.instance.isOver?(this.instance.isOver=0,d.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=!0),this.instance._mouseStop(b),this.instance.options.helper=this.instance.options._helper,d.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",b,e))})},drag:function(b,c){var d=a(this).data("draggable"),e=this,f=function(b){var c=this.offset.click.top,d=this.offset.click.left,e=this.positionAbs.top,f=this.positionAbs.left,g=b.height,h=b.width,i=b.top,j=b.left;return a.ui.isOver(e+c,f+d,i,j,g,h)};a.each(d.sortables,function(f){this.instance.positionAbs=d.positionAbs,this.instance.helperProportions=d.helperProportions,this.instance.offset.click=d.offset.click,this.instance._intersectsWith(
 this.instance.containerCache)?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=a(e).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return c.helper[0]},b.target=this.instance.currentItem[0],this.instance._mouseCapture(b,!0),this.instance._mouseStart(b,!0,!0),this.instance.offset.click.top=d.offset.click.top,this.instance.offset.click.left=d.offset.click.left,this.instance.offset.parent.left-=d.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=d.offset.parent.top-this.instance.offset.parent.top,d._trigger("toSortable",b),d.dropped=this.instance.element,d.currentItem=d.element,this.instance.fromOutside=d),this.instance.currentItem&&this.instance._mouseDrag(b)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger(
 "out",b,this.instance._uiHash(this.instance)),this.instance._mouseStop(b,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),d._trigger("fromSortable",b),d.dropped=!1)})}}),a.ui.plugin.add("draggable","cursor",{start:function(b,c){var d=a("body"),e=a(this).data("draggable").options;d.css("cursor")&&(e._cursor=d.css("cursor")),d.css("cursor",e.cursor)},stop:function(b,c){var d=a(this).data("draggable").options;d._cursor&&a("body").css("cursor",d._cursor)}}),a.ui.plugin.add("draggable","opacity",{start:function(b,c){var d=a(c.helper),e=a(this).data("draggable").options;d.css("opacity")&&(e._opacity=d.css("opacity")),d.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;d._opacity&&a(c.helper).css("opacity",d._opacity)}}),a.ui.plugin.add("draggable","scroll",{start:function(b,c){var d=a(this).data("draggable");d.scrollParent[0]!=document&&d.scroll
 Parent[0].tagName!="HTML"&&(d.overflowOffset=d.scrollParent.offset())},drag:function(b,c){var d=a(this).data("draggable"),e=d.options,f=!1;if(d.scrollParent[0]!=document&&d.scrollParent[0].tagName!="HTML"){if(!e.axis||e.axis!="x")d.overflowOffset.top+d.scrollParent[0].offsetHeight-b.pageY<e.scrollSensitivity?d.scrollParent[0].scrollTop=f=d.scrollParent[0].scrollTop+e.scrollSpeed:b.pageY-d.overflowOffset.top<e.scrollSensitivity&&(d.scrollParent[0].scrollTop=f=d.scrollParent[0].scrollTop-e.scrollSpeed);if(!e.axis||e.axis!="y")d.overflowOffset.left+d.scrollParent[0].offsetWidth-b.pageX<e.scrollSensitivity?d.scrollParent[0].scrollLeft=f=d.scrollParent[0].scrollLeft+e.scrollSpeed:b.pageX-d.overflowOffset.left<e.scrollSensitivity&&(d.scrollParent[0].scrollLeft=f=d.scrollParent[0].scrollLeft-e.scrollSpeed)}else{if(!e.axis||e.axis!="x")b.pageY-a(document).scrollTop()<e.scrollSensitivity?f=a(document).scrollTop(a(document).scrollTop()-e.scrollSpeed):a(window).height()-(b.pageY-a(document).sc
 rollTop())<e.scrollSensitivity&&(f=a(document).scrollTop(a(document).scrollTop()+e.scrollSpeed));if(!e.axis||e.axis!="y")b.pageX-a(document).scrollLeft()<e.scrollSensitivity?f=a(document).scrollLeft(a(document).scrollLeft()-e.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())<e.scrollSensitivity&&(f=a(document).scrollLeft(a(document).scrollLeft()+e.scrollSpeed))}f!==!1&&a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(d,b)}}),a.ui.plugin.add("draggable","snap",{start:function(b,c){var d=a(this).data("draggable"),e=d.options;d.snapElements=[],a(e.snap.constructor!=String?e.snap.items||":data(draggable)":e.snap).each(function(){var b=a(this),c=b.offset();this!=d.element[0]&&d.snapElements.push({item:this,width:b.outerWidth(),height:b.outerHeight(),top:c.top,left:c.left})})},drag:function(b,c){var d=a(this).data("draggable"),e=d.options,f=e.snapTolerance,g=c.offset.left,h=g+d.helperProportions.width,i=c.offset.top,j=i+d.helperProportions.height;for(var k=d
 .snapElements.length-1;k>=0;k--){var l=d.snapElements[k].left,m=l+d.snapElements[k].width,n=d.snapElements[k].top,o=n+d.snapElements[k].height;if(!(l-f<g&&g<m+f&&n-f<i&&i<o+f||l-f<g&&g<m+f&&n-f<j&&j<o+f||l-f<h&&h<m+f&&n-f<i&&i<o+f||l-f<h&&h<m+f&&n-f<j&&j<o+f)){d.snapElements[k].snapping&&d.options.snap.release&&d.options.snap.release.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[k].item})),d.snapElements[k].snapping=!1;continue}if(e.snapMode!="inner"){var p=Math.abs(n-j)<=f,q=Math.abs(o-i)<=f,r=Math.abs(l-h)<=f,s=Math.abs(m-g)<=f;p&&(c.position.top=d._convertPositionTo("relative",{top:n-d.helperProportions.height,left:0}).top-d.margins.top),q&&(c.position.top=d._convertPositionTo("relative",{top:o,left:0}).top-d.margins.top),r&&(c.position.left=d._convertPositionTo("relative",{top:0,left:l-d.helperProportions.width}).left-d.margins.left),s&&(c.position.left=d._convertPositionTo("relative",{top:0,left:m}).left-d.margins.left)}var t=p||q||r||s;if(e.snapMode!="outer"){
 var p=Math.abs(n-i)<=f,q=Math.abs(o-j)<=f,r=Math.abs(l-g)<=f,s=Math.abs(m-h)<=f;p&&(c.position.top=d._convertPositionTo("relative",{top:n,left:0}).top-d.margins.top),q&&(c.position.top=d._convertPositionTo("relative",{top:o-d.helperProportions.height,left:0}).top-d.margins.top),r&&(c.position.left=d._convertPositionTo("relative",{top:0,left:l}).left-d.margins.left),s&&(c.position.left=d._convertPositionTo("relative",{top:0,left:m-d.helperProportions.width}).left-d.margins.left)}!d.snapElements[k].snapping&&(p||q||r||s||t)&&d.options.snap.snap&&d.options.snap.snap.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[k].item})),d.snapElements[k].snapping=p||q||r||s||t}}}),a.ui.plugin.add("draggable","stack",{start:function(b,c){var d=a(this).data("draggable").options,e=a.makeArray(a(d.stack)).sort(function(b,c){return(parseInt(a(b).css("zIndex"),10)||0)-(parseInt(a(c).css("zIndex"),10)||0)});if(!!e.length){var f=parseInt(e[0].style.zIndex)||0;a(e).each(function(a){this.style
 .zIndex=f+a}),this[0].style.zIndex=f+e.length}}}),a.ui.plugin.add("draggable","zIndex",{start:function(b,c){var d=a(c.helper),e=a(this).data("draggable").options;d.css("zIndex")&&(e._zIndex=d.css("zIndex")),d.css("zIndex",e.zIndex)},stop:function(b,c){var d=a(this).data("draggable").options;d._zIndex&&a(c.helper).css("zIndex",d._zIndex)}})}(jQuery),function(a,b){a.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect"},_create:function(){var b=this.options,c=b.accept;this.isover=0,this.isout=1,this.accept=a.isFunction(c)?c:function(a){return a.is(c)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},a.ui.ddmanager.droppables[b.scope]=a.ui.ddmanager.droppables[b.scope]||[],a.ui.ddmanager.droppables[b.scope].push(this),b.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){var b=a.ui.ddmanager.droppables[this.options.scope];for
 (var c=0;c<b.length;c++)b[c]==this&&b.splice(c,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(b,c){b=="accept"&&(this.accept=a.isFunction(c)?c:function(a){return a.is(c)}),a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),c&&this._trigger("activate",b,this.ui(c))},_deactivate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),c&&this._trigger("deactivate",b,this.ui(c))},_over:function(b){var c=a.ui.ddmanager.current;!!c&&(c.currentItem||c.element)[0]!=this.element[0]&&this.accept.call(this.element[0],c.currentItem||c.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",b,this.ui(c)))},_out:function(b){var c=a.ui.ddmanager.current;!!c&&(c.currentI
 tem||c.element)[0]!=this.element[0]&&this.accept.call(this.element[0],c.currentItem||c.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",b,this.ui(c)))},_drop:function(b,c){var d=c||a.ui.ddmanager.current;if(!d||(d.currentItem||d.element)[0]==this.element[0])return!1;var e=!1;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var b=a.data(this,"droppable");if(b.options.greedy&&!b.options.disabled&&b.options.scope==d.options.scope&&b.accept.call(b.element[0],d.currentItem||d.element)&&a.ui.intersect(d,a.extend(b,{offset:b.element.offset()}),b.options.tolerance)){e=!0;return!1}});if(e)return!1;if(this.accept.call(this.element[0],d.currentItem||d.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",b,this.ui(d));return this.element}return!1},ui:function(a){return{draggab
 le:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}}),a.extend(a.ui.droppable,{version:"1.8.18"}),a.ui.intersect=function(b,c,d){if(!c.offset)return!1;var e=(b.positionAbs||b.position.absolute).left,f=e+b.helperProportions.width,g=(b.positionAbs||b.position.absolute).top,h=g+b.helperProportions.height,i=c.offset.left,j=i+c.proportions.width,k=c.offset.top,l=k+c.proportions.height;switch(d){case"fit":return i<=e&&f<=j&&k<=g&&h<=l;case"intersect":return i<e+b.helperProportions.width/2&&f-b.helperProportions.width/2<j&&k<g+b.helperProportions.height/2&&h-b.helperProportions.height/2<l;case"pointer":var m=(b.positionAbs||b.position.absolute).left+(b.clickOffset||b.offset.click).left,n=(b.positionAbs||b.position.absolute).top+(b.clickOffset||b.offset.click).top,o=a.ui.isOver(n,m,k,i,c.proportions.height,c.proportions.width);return o;case"touch":return(g>=k&&g<=l||h>=k&&h<=l||g<k&&h>l)&&(e>=i&&e<=j||f>=i&&f<=j||e<i&&f>j);default:return!1}},a.ui.ddmanager
 ={current:null,droppables:{"default":[]},prepareOffsets:function(b,c){var d=a.ui.ddmanager.droppables[b.options.scope]||[],e=c?c.type:null,f=(b.currentItem||b.element).find(":data(droppable)").andSelf();droppablesLoop:for(var g=0;g<d.length;g++){if(d[g].options.disabled||b&&!d[g].accept.call(d[g].element[0],b.currentItem||b.element))continue;for(var h=0;h<f.length;h++)if(f[h]==d[g].element[0]){d[g].proportions.height=0;continue droppablesLoop}d[g].visible=d[g].element.css("display")!="none";if(!d[g].visible)continue;e=="mousedown"&&d[g]._activate.call(d[g],c),d[g].offset=d[g].element.offset(),d[g].proportions={width:d[g].element[0].offsetWidth,
-height:d[g].element[0].offsetHeight}}},drop:function(b,c){var d=!1;a.each(a.ui.ddmanager.droppables[b.options.scope]||[],function(){!this.options||(!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance)&&(d=this._drop.call(this,c)||d),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],b.currentItem||b.element)&&(this.isout=1,this.isover=0,this._deactivate.call(this,c)))});return d},dragStart:function(b,c){b.element.parents(":not(body,html)").bind("scroll.droppable",function(){b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)})},drag:function(b,c){b.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(b,c),a.each(a.ui.ddmanager.droppables[b.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var d=a.ui.intersect(b,this,this.options.tolerance),e=!d&&this.isover==1?"isout":d&&this.isover==0?"isover":null;if(!e)return;var f;if(this.options.greedy){var g=this.element.parents(":data(dr
 oppable):eq(0)");g.length&&(f=a.data(g[0],"droppable"),f.greedyChild=e=="isover"?1:0)}f&&e=="isover"&&(f.isover=0,f.isout=1,f._out.call(f,c)),this[e]=1,this[e=="isout"?"isover":"isout"]=0,this[e=="isover"?"_over":"_out"].call(this,c),f&&e=="isout"&&(f.isout=0,f.isover=1,f._over.call(f,c))}})},dragStop:function(b,c){b.element.parents(":not(body,html)").unbind("scroll.droppable"),b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)}}}(jQuery),function(a,b){a.widget("ui.resizable",a.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1e3},_create:function(){var b=this,c=this.options;this.element.addClass("ui-resizable"),a.extend(this,{_aspectRatio:!!c.aspectRatio,aspectRatio:c.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:c.helper||c
 .ghost||c.animate?c.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(a('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("resizable",this.element.data("resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,displ
 ay:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=c.handles||(a(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se");if(this.handles.constructor==String){this.handles=="all"&&(this.handles="n,e,s,w,se,sw,ne,nw");var d=this.handles.split(",");this.handles={};for(var e=0;e<d.length;e++){var f=a.trim(d[e]),g="ui-resizable-"+f,h=a('<div class="ui-resizable-handle '+g+'"></div>');/sw|se|ne|nw/.test(f)&&h.css({zIndex:++c.zIndex}),"se"==f&&h.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[f]=".ui-resizable-"+f,this.element.append(h)}}this._renderAxis=function(b){b=b||this.element;for(var c in this.handles){this.handles[c].constructor==String&&(this.handles[c]=a(this.handles[c],this.element).show());if(this.elementIsWrapper&&this.or
 iginalElement[0].nodeName.match(/textarea|input|select|button/i)){var d=a(this.handles[c],this.element),e=0;e=/sw|ne|nw|se|n|s/.test(c)?d.outerHeight():d.outerWidth();var f=["padding",/ne|nw|n/.test(c)?"Top":/se|sw|s/.test(c)?"Bottom":/^e$/.test(c)?"Right":"Left"].join("");b.css(f,e),this._proportionallyResize()}if(!a(this.handles[c]).length)continue}},this._renderAxis(this.element),this._handles=a(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){if(!b.resizing){if(this.className)var a=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=a&&a[1]?a[1]:"se"}}),c.autoHide&&(this._handles.hide(),a(this.element).addClass("ui-resizable-autohide").hover(function(){c.disabled||(a(this).removeClass("ui-resizable-autohide"),b._handles.show())},function(){c.disabled||b.resizing||(a(this).addClass("ui-resizable-autohide"),b._handles.hide())})),this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(b){a(b).removeClass("ui
 -resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){b(this.element);var c=this.element;c.after(this.originalElement.css({position:c.css("position"),width:c.outerWidth(),height:c.outerHeight(),top:c.css("top"),left:c.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle),b(this.originalElement);return this},_mouseCapture:function(b){var c=!1;for(var d in this.handles)a(this.handles[d])[0]==b.target&&(c=!0);return!this.options.disabled&&c},_mouseStart:function(b){var d=this.options,e=this.element.position(),f=this.element;this.resizing=!0,this.documentScroll={top:a(document).scrollTop(),left:a(document).scrollLeft()},(f.is(".ui-draggable")||/absolute/.test(f.css("position")))&&f.css({position:"absolute",top:e.top,left:e.left}),this._renderProxy();var g=c(this.helper.css("left")),h=c(this.helper.css("top"));d.containment&&(g+=a(d.containment).s
 crollLeft()||0,h+=a(d.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:g,top:h},this.size=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()},this.originalSize=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()},this.originalPosition={left:g,top:h},this.sizeDiff={width:f.outerWidth()-f.width(),height:f.outerHeight()-f.height()},this.originalMousePosition={left:b.pageX,top:b.pageY},this.aspectRatio=typeof d.aspectRatio=="number"?d.aspectRatio:this.originalSize.width/this.originalSize.height||1;var i=a(".ui-resizable-"+this.axis).css("cursor");a("body").css("cursor",i=="auto"?this.axis+"-resize":i),f.addClass("ui-resizable-resizing"),this._propagate("start",b);return!0},_mouseDrag:function(b){var c=this.helper,d=this.options,e={},f=this,g=this.originalMousePosition,h=this.axis,i=b.pageX-g.left||0,j=b.pageY-g.top||0,k=this._change[h];if(!k)return!1;var l=k.apply(this,[
 b,i,j]),m=a.browser.msie&&a.browser.version<7,n=this.sizeDiff;this._updateVirtualBoundaries(b.shiftKey);if(this._aspectRatio||b.shiftKey)l=this._updateRatio(l,b);l=this._respectSize(l,b),this._propagate("resize",b),c.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"}),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),this._updateCache(l),this._trigger("resize",b,this.ui());return!1},_mouseStop:function(b){this.resizing=!1;var c=this.options,d=this;if(this._helper){var e=this._proportionallyResizeElements,f=e.length&&/textarea/i.test(e[0].nodeName),g=f&&a.ui.hasScroll(e[0],"left")?0:d.sizeDiff.height,h=f?0:d.sizeDiff.width,i={width:d.helper.width()-h,height:d.helper.height()-g},j=parseInt(d.element.css("left"),10)+(d.position.left-d.originalPosition.left)||null,k=parseInt(d.element.css("top"),10)+(d.position.top-d.originalPosition.top)||null;c.animate||this.element.css(a.extend(i,{
 top:k,left:j})),d.helper.height(d.size.height),d.helper.width(d.size.width),this._helper&&!c.animate&&this._proportionallyResize()}a("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",b),this._helper&&this.helper.remove();return!1},_updateVirtualBoundaries:function(a){var b=this.options,c,e,f,g,h;h={minWidth:d(b.minWidth)?b.minWidth:0,maxWidth:d(b.maxWidth)?b.maxWidth:Infinity,minHeight:d(b.minHeight)?b.minHeight:0,maxHeight:d(b.maxHeight)?b.maxHeight:Infinity};if(this._aspectRatio||a)c=h.minHeight*this.aspectRatio,f=h.minWidth/this.aspectRatio,e=h.maxHeight*this.aspectRatio,g=h.maxWidth/this.aspectRatio,c>h.minWidth&&(h.minWidth=c),f>h.minHeight&&(h.minHeight=f),e<h.maxWidth&&(h.maxWidth=e),g<h.maxHeight&&(h.maxHeight=g);this._vBoundaries=h},_updateCache:function(a){var b=this.options;this.offset=this.helper.offset(),d(a.left)&&(this.position.left=a.left),d(a.top)&&(this.position.top=a.top),d(a.height)&&(this.size.height=a.height),
 d(a.width)&&(this.size.width=a.width)},_updateRatio:function(a,b){var c=this.options,e=this.position,f=this.size,g=this.axis;d(a.height)?a.width=a.height*this.aspectRatio:d(a.width)&&(a.height=a.width/this.aspectRatio),g=="sw"&&(a.left=e.left+(f.width-a.width),a.top=null),g=="nw"&&(a.top=e.top+(f.height-a.height),a.left=e.left+(f.width-a.width));return a},_respectSize:function(a,b){var c=this.helper,e=this._vBoundaries,f=this._aspectRatio||b.shiftKey,g=this.axis,h=d(a.width)&&e.maxWidth&&e.maxWidth<a.width,i=d(a.height)&&e.maxHeight&&e.maxHeight<a.height,j=d(a.width)&&e.minWidth&&e.minWidth>a.width,k=d(a.height)&&e.minHeight&&e.minHeight>a.height;j&&(a.width=e.minWidth),k&&(a.height=e.minHeight),h&&(a.width=e.maxWidth),i&&(a.height=e.maxHeight);var l=this.originalPosition.left+this.originalSize.width,m=this.position.top+this.size.height,n=/sw|nw|w/.test(g),o=/nw|ne|n/.test(g);j&&n&&(a.left=l-e.minWidth),h&&n&&(a.left=l-e.maxWidth),k&&o&&(a.top=m-e.minHeight),i&&o&&(a.top=m-e.maxHeig
 ht);var p=!a.width&&!a.height;p&&!a.left&&a.top?a.top=null:p&&!a.top&&a.left&&(a.left=null);return a},_proportionallyResize:function(){var b=this.options;if(!!this._proportionallyResizeElements.length){var c=this.helper||this.element;for(var d=0;d<this._proportionallyResizeElements.length;d++){var e=this._proportionallyResizeElements[d];if(!this.borderDif){var f=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],g=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];this.borderDif=a.map(f,function(a,b){var c=parseInt(a,10)||0,d=parseInt(g[b],10)||0;return c+d})}if(a.browser.msie&&(!!a(c).is(":hidden")||!!a(c).parents(":hidden").length))continue;e.css({height:c.height()-this.borderDif[0]-this.borderDif[2]||0,width:c.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var b=this.element,c=this.options;this.elementOffset=b.offset();if(this._helper){this.helper=this.helper||a(
 '<div style="overflow:hidden;"></div>');var d=a.browser.msie&&a.browser.version<7,e=d?1:0,f=d?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+f,height:this.element.outerHeight()+f,position:"absolute",left:this.elementOffset.left-e+"px",top:this.elementOffset.top-e+"px",zIndex:++c.zIndex}),this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(a,b,c){return{width:this.originalSize.width+b}},w:function(a,b,c){var d=this.options,e=this.originalSize,f=this.originalPosition;return{left:f.left+b,width:e.width-b}},n:function(a,b,c){var d=this.options,e=this.originalSize,f=this.originalPosition;return{top:f.top+c,height:e.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},sw:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,c,d]))},ne:function(
 b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},nw:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,c,d]))}},_propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]),b!="resize"&&this._trigger(b,c,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),a.extend(a.ui.resizable,{version:"1.8.18"}),a.ui.plugin.add("resizable","alsoResize",{start:function(b,c){var d=a(this).data("resizable"),e=d.options,f=function(b){a(b).each(function(){var b=a(this);b.data("resizable-alsoresize",{width:parseInt(b.width(),10),height:parseInt(b.height(),10),left:parseInt(b.css("left"),10),top:parseInt(b.css("top"),10)})})};typeof e.alsoResize=="object"&&!e.alsoResize.parentNode?e.alsoResize.length?(e.alsoResize=e.alsoResize[0]
 ,f(e.alsoResize)):a.each(e.alsoResize,function(a){f(a)}):f(e.alsoResize)},resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.originalSize,g=d.originalPosition,h={height:d.size.height-f.height||0,width:d.size.width-f.width||0,top:d.position.top-g.top||0,left:d.position.left-g.left||0},i=function(b,d){a(b).each(function(){var b=a(this),e=a(this).data("resizable-alsoresize"),f={},g=d&&d.length?d:b.parents(c.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(g,function(a,b){var c=(e[b]||0)+(h[b]||0);c&&c>=0&&(f[b]=c||null)}),b.css(f)})};typeof e.alsoResize=="object"&&!e.alsoResize.nodeType?a.each(e.alsoResize,function(a,b){i(a,b)}):i(e.alsoResize)},stop:function(b,c){a(this).removeData("resizable-alsoresize")}}),a.ui.plugin.add("resizable","animate",{stop:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d._proportionallyResizeElements,g=f.length&&/textarea/i.test(f[0].nodeName),h=g&&a.ui.hasScroll(f[0],"left")?0:d.sizeDiff.h
 eight,i=g?0:d.sizeDiff.width,j={width:d.size.width-i,height:d.size.height-h},k=parseInt(d.element.css("left"),10)+(d.position.left-d.originalPosition.left)||null,l=parseInt(d.element.css("top"),10)+(d.position.top-d.originalPosition.top)||null;d.element.animate(a.extend(j,l&&k?{top:l,left:k}:{}),{duration:e.animateDuration,easing:e.animateEasing,step:function(){var c={width:parseInt(d.element.css("width"),10),height:parseInt(d.element.css("height"),10),top:parseInt(d.element.css("top"),10),left:parseInt(d.element.css("left"),10)};f&&f.length&&a(f[0]).css({width:c.width,height:c.height}),d._updateCache(c),d._propagate("resize",b)}})}}),a.ui.plugin.add("resizable","containment",{start:function(b,d){var e=a(this).data("resizable"),f=e.options,g=e.element,h=f.containment,i=h instanceof a?h.get(0):/parent/.test(h)?g.parent().get(0):h;if(!!i){e.containerElement=a(i);if(/document/.test(h)||h==document)e.containerOffset={left:0,top:0},e.containerPosition={left:0,top:0},e.parentData={element
 :a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight};else{var j=a(i),k=[];a(["Top","Right","Left","Bottom"]).each(function(a,b){k[a]=c(j.css("padding"+b))}),e.containerOffset=j.offset(),e.containerPosition=j.position(),e.containerSize={height:j.innerHeight()-k[3],width:j.innerWidth()-k[1]};var l=e.containerOffset,m=e.containerSize.height,n=e.containerSize.width,o=a.ui.hasScroll(i,"left")?i.scrollWidth:n,p=a.ui.hasScroll(i)?i.scrollHeight:m;e.parentData={element:i,left:l.left,top:l.top,width:o,height:p}}}},resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.containerSize,g=d.containerOffset,h=d.size,i=d.position,j=d._aspectRatio||b.shiftKey,k={top:0,left:0},l=d.containerElement;l[0]!=document&&/static/.test(l.css("position"))&&(k=g),i.left<(d._helper?g.left:0)&&(d.size.width=d.size.width+(d._helper?d.position.left-g.left:d.position.left-k.left),j&&(d.size.height=d.size.width/e.aspectRatio),d.position.
 left=e.helper?g.left:0),i.top<(d._helper?g.top:0)&&(d.size.height=d.size.height+(d._helper?d.position.top-g.top:d.position.top),j&&(d.size.width=d.size.height*e.aspectRatio),d.position.top=d._helper?g.top:0),d.offset.left=d.parentData.left+d.position.left,d.offset.top=d.parentData.top+d.position.top;var m=Math.abs((d._helper?d.offset.left-k.left:d.offset.left-k.left)+d.sizeDiff.width),n=Math.abs((d._helper?d.offset.top-k.top:d.offset.top-g.top)+d.sizeDiff.height),o=d.containerElement.get(0)==d.element.parent().get(0),p=/relative|absolute/.test(d.containerElement.css("position"));o&&p&&(m-=d.parentData.left),m+d.size.width>=d.parentData.width&&(d.size.width=d.parentData.width-m,j&&(d.size.height=d.size.width/d.aspectRatio)),n+d.size.height>=d.parentData.height&&(d.size.height=d.parentData.height-n,j&&(d.size.width=d.size.height*d.aspectRatio))},stop:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.position,g=d.containerOffset,h=d.containerPosition,i=d.containerElement,j=
 a(d.helper),k=j.offset(),l=j.outerWidth()-d.sizeDiff.width,m=j.outerHeight()-d.sizeDiff.height;d._helper&&!e.animate&&/relative/.test(i.css("position"))&&a(this).css({left:k.left-h.left-g.left,width:l,height:m}),d._helper&&!e.animate&&/static/.test(i.css("position"))&&a(this).css({left:k.left-h.left-g.left,width:l,height:m})}}),a.ui.plugin.add("resizable","ghost",{start:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.size;d.ghost=d.originalElement.clone(),d.ghost.css({opacity:.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof e.ghost=="string"?e.ghost:""),d.ghost.appendTo(d.helper)},resize:function(b,c){var d=a(this).data("resizable"),e=d.options;d.ghost&&d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})},stop:function(b,c){var d=a(this).data("resizable"),e=d.options;d.ghost&&d.helper&&d.helper.get(0).removeChild(d.ghost.get(0))}}),a.ui.plugin.add("resizab
 le","grid",{resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.size,g=d.originalSize,h=d.originalPosition,i=d.axis,j=e._aspectRatio||b.shiftKey;e.grid=typeof e.grid=="number"?[e.grid,e.grid]:e.grid;var k=Math.round((f.width-g.width)/(e.grid[0]||1))*(e.grid[0]||1),l=Math.round((f.height-g.height)/(e.grid[1]||1))*(e.grid[1]||1);/^(se|s|e)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l):/^(ne)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l,d.position.top=h.top-l):/^(sw)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l,d.position.left=h.left-k):(d.size.width=g.width+k,d.size.height=g.height+l,d.position.top=h.top-l,d.position.left=h.left-k)}});var c=function(a){return parseInt(a,10)||0},d=function(a){return!isNaN(parseInt(a,10))}}(jQuery),function(a,b){a.widget("ui.selectable",a.ui.mouse,{options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var b=this;this.element.addClass("ui-selectable")
 ,this.dragged=!1;var c;this.refresh=function(){c=a(b.options.filter,b.element[0]),c.addClass("ui-selectee"),c.each(function(){var b=a(this),c=b.offset();a.data(this,"selectable-item",{element:this,$element:b,left:c.left,top:c.top,right:c.left+b.outerWidth(),bottom:c.top+b.outerHeight(),startselected:!1,selected:b.hasClass("ui-selected"),selecting:b.hasClass("ui-selecting"),unselecting:b.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=c.addClass("ui-selectee"),this._mouseInit(),this.helper=a("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable"),this._mouseDestroy();return this},_mouseStart:function(b){var c=this;this.opos=[b.pageX,b.pageY];if(!this.options.disabled){var d=this.options;this.selectees=a(d.filter,this.element[0]),this._trigger("start",b),a(d.appendTo).append(this.he
 lper),this.helper.css({left:b.clientX,top:b.clientY,width:0,height:0}),d.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var d=a.data(this,"selectable-item");d.startselected=!0,!b.metaKey&&!b.ctrlKey&&(d.$element.removeClass("ui-selected"),d.selected=!1,d.$element.addClass("ui-unselecting"),d.unselecting=!0,c._trigger("unselecting",b,{unselecting:d.element}))}),a(b.target).parents().andSelf().each(function(){var d=a.data(this,"selectable-item");if(d){var e=!b.metaKey&&!b.ctrlKey||!d.$element.hasClass("ui-selected");d.$element.removeClass(e?"ui-unselecting":"ui-selected").addClass(e?"ui-selecting":"ui-unselecting"),d.unselecting=!e,d.selecting=e,d.selected=e,e?c._trigger("selecting",b,{selecting:d.element}):c._trigger("unselecting",b,{unselecting:d.element});return!1}})}},_mouseDrag:function(b){var c=this;this.dragged=!0;if(!this.options.disabled){var d=this.options,e=this.opos[0],f=this.opos[1],g=b.pageX,h=b.pageY;if(e>g){var i=g;g=e,e=i}if(f>h){var
  i=h;h=f,f=i}this.helper.css({left:e,top:f,width:g-e,height:h-f}),this.selectees.each(function(){var i=a.data(this,"selectable-item");if(!!i&&i.element!=c.element[0]){var j=!1;d.tolerance=="touch"?j=!(i.left>g||i.right<e||i.top>h||i.bottom<f):d.tolerance=="fit"&&(j=i.left>e&&i.right<g&&i.top>f&&i.bottom<h),j?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,c._trigger("selecting",b,{selecting:i.element}))):(i.selecting&&((b.metaKey||b.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),c._trigger("unselecting",b,{unselecting:i.element}))),i.selected&&!b.metaKey&&!b.ctrlKey&&!i.startselected&&(i.$element.removeClass("ui-selec
 ted"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,c._trigger("unselecting",b,{unselecting:i.element})))}});return!1}},_mouseStop:function(b){var c=this;this.dragged=!1;var d=this.options;a(".ui-unselecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-unselecting"),d.unselecting=!1,d.startselected=!1,c._trigger("unselected",b,{unselected:d.element})}),a(".ui-selecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected"),d.selecting=!1,d.selected=!0,d.startselected=!0,c._trigger("selected",b,{selected:d.element})}),this._trigger("stop",b),this.helper.remove();return!1}}),a.extend(a.ui.selectable,{version:"1.8.18"})}(jQuery),function(a,b){a.widget("ui.sortable",a.ui.mouse,{widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSiz
 e:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var a=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?a.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},destroy:function(){a.Widget.prototype.destroy.call(this),this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var b=this.items.length-1;b>=0;b--)this.items[b].item.removeData(this.widgetName+"-item");return this},_setOption:function(b,c){b==="disabled"?(this.options[b]=c,this.widget()[c?"addClass":"removeClass"]("ui-sortable-disabled")):a.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(b,c)
 {var d=this;if(this.reverting)return!1;if(this.options.disabled||this.options.type=="static")return!1;this._refreshItems(b);var e=null,f=this,g=a(b.target).parents().each(function(){if(a.data(this,d.widgetName+"-item")==f){e=a(this);return!1}});a.data(b.target,d.widgetName+"-item")==f&&(e=a(b.target));if(!e)return!1;if(this.options.handle&&!c){var h=!1;a(this.options.handle,e).find("*").andSelf().each(function(){this==b.target&&(h=!0)});if(!h)return!1}this.currentItem=e,this._removeCurrentsFromItems();return!0},_mouseStart:function(b,c,d){var e=this.options,f=this;this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(b),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),a.extend(this.offset,{click:{le
 ft:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),e.containment&&this._setContainment(),e.cursor&&(a("body").css("cursor")&&(this._storedCursor=a("body").css("cursor")),a("body").css("cursor",e.cursor)),e.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",e.opacity)),e.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",e.zIndex)),this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",b
 ,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions();if(!d)for(var g=this.containers.length-1;g>=0;g--)this.containers[g]._trigger("activate",b,f._uiHash(this));a.ui.ddmanager&&(a.ui.ddmanager.current=this),a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(b);return!0},_mouseDrag:function(b){this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){var c=this.options,d=!1;this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-b.pageY<c.scrollSensitivity?this.scrollParent[0].scrollTop=d=this.scrollParent[0].scrollTop+c.scrollSpeed:b.pageY-this.overflowOffset.top<c.scrollSensitivity&&(this.scrollParent[0].scrollTop=d=this.scrollParent[0].scrollTop-c.scrollSpeed),this.ove
 rflowOffset.left+this.scrollParent[0].offsetWidth-b.pageX<c.scrollSensitivity?this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft+c.scrollSpeed:b.pageX-this.overflowOffset.left<c.scrollSensitivity&&(this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft-c.scrollSpeed)):(b.pageY-a(document).scrollTop()<c.scrollSensitivity?d=a(document).scrollTop(a(document).scrollTop()-c.scrollSpeed):a(window).height()-(b.pageY-a(document).scrollTop())<c.scrollSensitivity&&(d=a(document).scrollTop(a(document).scrollTop()+c.scrollSpeed)),b.pageX-a(document).scrollLeft()<c.scrollSensitivity?d=a(document).scrollLeft(a(document).scrollLeft()-c.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())<c.scrollSensitivity&&(d=a(document).scrollLeft(a(document).scrollLeft()+c.scrollSpeed))),d!==!1&&a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.hel
 per[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(var e=this.items.length-1;e>=0;e--){var f=this.items[e],g=f.item[0],h=this._intersectsWithPointer(f);if(!h)continue;if(g!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=g&&!a.ui.contains(this.placeholder[0],g)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],g):!0)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(f))this._rearrange(b,f);else break;this._trigger("change",b,this._uiHash());break}}this._contactContainers(b),a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),this._trigger("sort",b,this._uiHash()),this.lastPositionAbs=this.positionAbs;return!1},_mouseStop:function(b,c){if(!!b){a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,b);if(this.options.revert){var d=this,e=d.placeholder.offset();d.reverting=!0,a(this.helper).animate({left:e.left-t
 his.offset.parent.left-d.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-d.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){d._clear(b)})}else this._clear(b,c);return!1}},cancel:function(){var b=this;if(this.dragging){this._mouseUp({target:null}),this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("deactivate",null,b._uiHash(this)),this.containers[c].containerCache.over&&(this.containers[c]._trigger("out",null,b._uiHash(this)),this.containers[c].containerCache.over=0)}this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),a.extend(this
 ,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem));return this},serialize:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];b=b||{},a(c).each(function(){var c=(a(b.item||this).attr(b.attribute||"id")||"").match(b.expression||/(.+)[-=_](.+)/);c&&d.push((b.key||c[1]+"[]")+"="+(b.key&&b.expression?c[1]:c[2]))}),!d.length&&b.key&&d.push(b.key+"=");return d.join("&")},toArray:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];b=b||{},c.each(function(){d.push(a(b.item||this).attr(b.attribute||"id")||"")});return d},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,d=this.positionAbs.top,e=d+this.helperProportions.height,f=a.left,g=f+a.width,h=a.top,i=h+a.height,j=this.offset.click.top,k=this.offset.click.left,l=d+j>h&&d+j<i&&b+k>f&&b+k<g;return this.options.tolerance=="pointer"||this.options.force
 PointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?l:f<b+this.helperProportions.width/2&&c-this.helperProportions.width/2<g&&h<d+this.helperProportions.height/2&&e-this.helperProportions.height/2<i},_intersectsWithPointer:function(b){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top,b.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,b.left,b.width),e=c&&d,f=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();if(!e)return!1;return this.floating?g&&g=="right"||f=="down"?2:1:f&&(f=="down"?2:1)},_intersectsWithSides:function(b){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top+b.height/2,b.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,b.left+b.width/2,b.width),e=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();return this.floating&&f?f=="right"&&d||f=="left"&&!d:e&&(e
 =="down"&&c||e=="up"&&!c)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return a!=0&&(a>0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a),this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(b){var c=this,d=[],e=[],f=this._connectWith();if(f&&b)for(var g=f.length-1;g>=0;g--){var h=a(f[g]);for(var i=h.length-1;i>=0;i--){var j=a.data(h[i],this.widgetName);j&&j!=this&&!j.options.disabled&&e.push([a.isFunction(j.options.items)?j.options.items.call(j.element):a(j.options.items,j.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),j])}}e.push
-([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var g=e.length-1;g>=0;g--)e[g][0].each(function(){d.push(this)});return a(d)},_removeCurrentsFromItems:function(){var a=this.currentItem.find(":data("+this.widgetName+"-item)");for(var b=0;b<this.items.length;b++)for(var c=0;c<a.length;c++)a[c]==this.items[b].item[0]&&this.items.splice(b,1)},_refreshItems:function(b){this.items=[],this.containers=[this];var c=this.items,d=this,e=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]],f=this._connectWith();if(f&&this.ready)for(var g=f.length-1;g>=0;g--){var h=a(f[g]);for(var i=h.length-1;i>=0;i--){var j=a.data(h[i],this.widgetName);j&&j!=this&&!j.options.disabled&&(e.push([a.isFunction(j.options.items)?j.options.items.call(
 j.element[0],b,{item:this.currentItem}):a(j.options.items,j.element),j]),this.containers.push(j))}}for(var g=e.length-1;g>=0;g--){var k=e[g][1],l=e[g][0];for(var i=0,m=l.length;i<m;i++){var n=a(l[i]);n.data(this.widgetName+"-item",k),c.push({item:n,instance:k,width:0,height:0,left:0,top:0})}}},refreshPositions:function(b){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());for(var c=this.items.length-1;c>=0;c--){var d=this.items[c];if(d.instance!=this.currentContainer&&this.currentContainer&&d.item[0]!=this.currentItem[0])continue;var e=this.options.toleranceElement?a(this.options.toleranceElement,d.item):d.item;b||(d.width=e.outerWidth(),d.height=e.outerHeight());var f=e.offset();d.left=f.left,d.top=f.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(var c=this.containers.length-1;c>=0;c--){var f=this.containers[c].element.offset();this.containers[c].containerCache.left=f.left,this.co
 ntainers[c].containerCache.top=f.top,this.containers[c].containerCache.width=this.containers[c].element.outerWidth(),this.containers[c].containerCache.height=this.containers[c].element.outerHeight()}return this},_createPlaceholder:function(b){var c=b||this,d=c.options;if(!d.placeholder||d.placeholder.constructor==String){var e=d.placeholder;d.placeholder={element:function(){var b=a(document.createElement(c.currentItem[0].nodeName)).addClass(e||c.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];e||(b.style.visibility="hidden");return b},update:function(a,b){if(!e||!!d.forcePlaceholderSize)b.height()||b.height(c.currentItem.innerHeight()-parseInt(c.currentItem.css("paddingTop")||0,10)-parseInt(c.currentItem.css("paddingBottom")||0,10)),b.width()||b.width(c.currentItem.innerWidth()-parseInt(c.currentItem.css("paddingLeft")||0,10)-parseInt(c.currentItem.css("paddingRight")||0,10))}}}c.placeholder=a(d.placeholder.element.call(c.element,c.currentIt
 em)),c.currentItem.after(c.placeholder),d.placeholder.update(c,c.placeholder)},_contactContainers:function(b){var c=null,d=null;for(var e=this.containers.length-1;e>=0;e--){if(a.ui.contains(this.currentItem[0],this.containers[e].element[0]))continue;if(this._intersectsWith(this.containers[e].containerCache)){if(c&&a.ui.contains(this.containers[e].element[0],c.element[0]))continue;c=this.containers[e],d=e}else this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",b,this._uiHash(this)),this.containers[e].containerCache.over=0)}if(!!c)if(this.containers.length===1)this.containers[d]._trigger("over",b,this._uiHash(this)),this.containers[d].containerCache.over=1;else if(this.currentContainer!=this.containers[d]){var f=1e4,g=null,h=this.positionAbs[this.containers[d].floating?"left":"top"];for(var i=this.items.length-1;i>=0;i--){if(!a.ui.contains(this.containers[d].element[0],this.items[i].item[0]))continue;var j=this.items[i][this.containers[d].floating?"left":"top"]
 ;Math.abs(j-h)<f&&(f=Math.abs(j-h),g=this.items[i])}if(!g&&!this.options.dropOnEmpty)return;this.currentContainer=this.containers[d],g?this._rearrange(b,g,null,!0):this._rearrange(b,null,this.containers[d].element,!0),this._trigger("change",b,this._uiHash()),this.containers[d]._trigger("change",b,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[d]._trigger("over",b,this._uiHash(this)),this.containers[d].containerCache.over=1}},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b,this.currentItem])):c.helper=="clone"?this.currentItem.clone():this.currentItem;d.parents("body").length||a(c.appendTo!="parent"?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(d[0]),d[0]==this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.c
 urrentItem.css("left")}),(d[0].style.width==""||c.forceHelperSize)&&d.width(this.currentItem.width()),(d[0].style.height==""||c.forceHelperSize)&&d.height(this.currentItem.height());return d},_adjustOffsetFromHelper:function(b){typeof b=="string"&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.o
 ffsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;b.containment=="parent"&&(b.containment=this.helper[0].parentNode);if(b.containment=="document"||b.containment=="window")this.containment=[0-this.offset.rel
 ative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)){var c=a(b.containment)[0],d=a(b.containment).offset(),e=a(c).css("overflow")!="hidden";this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(e?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(e?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("bord
 erTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(b,c){c||(c=this.position);var d=b=="absolute"?1:-1,e=this.options,f=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:f.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())*d)}},_generatePosition:function(b){var c=this.options,d=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scr
 ollParent,e=/(html|body)/i.test(d[0].tagName);this.cssPosition=="relative"&&(this.scrollParent[0]==document||this.scrollParent[0]==this.offsetParent[0])&&(this.offset.relative=this._getRelativeOffset());var f=b.pageX,g=b.pageY;if(this.originalPosition){this.containment&&(b.pageX-this.offset.click.left<this.containment[0]&&(f=this.containment[0]+this.offset.click.left),b.pageY-this.offset.click.top<this.containment[1]&&(g=this.containment[1]+this.offset.click.top),b.pageX-this.offset.click.left>this.containment[2]&&(f=this.containment[2]+this.offset.click.left),b.pageY-this.offset.click.top>this.containment[3]&&(g=this.containment[3]+this.offset.click.top));if(c.grid){var h=this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1];g=this.containment?h-this.offset.click.top<this.containment[1]||h-this.offset.click.top>this.containment[3]?h-this.offset.click.top<this.containment[1]?h+c.grid[1]:h-c.grid[1]:h:h;var i=this.originalPageX+Math.round((f-this.originalPageX)/c.
 grid[0])*c.grid[0];f=this.containment?i-this.offset.click.left<this.containment[0]||i-this.offset.click.left>this.containment[2]?i-this.offset.click.left<this.containment[0]?i+c.grid[0]:i-c.grid[0]:i:i}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:d.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:d.scrollLeft())}},_rearrange:function(a,b,c,d){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?b.item[0]:b.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var e=this,f=this.counter;window.setTimeout(function(){f==e.counter&&e.refreshPositions(!d)},0)},_clear:function(b,c){this.reverting=!1;var d=[],e=this;!this._
 noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var f in this._storedCSS)if(this._storedCSS[f]=="auto"||this._storedCSS[f]=="static")this._storedCSS[f]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!c&&d.push(function(a){this._trigger("receive",a,this._uiHash(this.fromOutside))}),(this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!c&&d.push(function(a){this._trigger("update",a,this._uiHash())});if(!a.ui.contains(this.element[0],this.currentItem[0])){c||d.push(function(a){this._trigger("remove",a,this._uiHash())});for(var f=this.containers.length-1;f>=0;f--)a.ui.contains(this.containers[f].element[0],this.currentItem[0])&&!c&&(d.push(function(a){return function(b){a._trigger("receive",b,this._uiHash(thi
 s))}}.call(this,this.containers[f])),d.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.containers[f])))}for(var f=this.containers.length-1;f>=0;f--)c||d.push(function(a){return function(b){a._trigger("deactivate",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over&&(d.push(function(a){return function(b){a._trigger("out",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over=0);this._storedCursor&&a("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex),this.dragging=!1;if(this.cancelHelperRemoval){if(!c){this._trigger("beforeStop",b,this._uiHash());for(var f=0;f<d.length;f++)d[f].call(this,b);this._trigger("stop",b,this._uiHash())}return!1}c||this._trigger("beforeStop",b,this._uiHash()),this.placeholder[0].pare
 ntNode.removeChild(this.placeholder[0]),this.helper[0]!=this.currentItem[0]&&this.helper.remove(),this.helper=null;if(!c){for(var f=0;f<d.length;f++)d[f].call(this,b);this._trigger("stop",b,this._uiHash())}this.fromOutside=!1;return!0},_trigger:function(){a.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(b){var c=b||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:b?b.element:null}}}),a.extend(a.ui.sortable,{version:"1.8.18"})}(jQuery),jQuery.effects||function(a,b){function l(b){if(!b||typeof b=="number"||a.fx.speeds[b])return!0;if(typeof b=="string"&&!a.effects[b])return!0;return!1}function k(b,c,d,e){typeof b=="object"&&(e=c,d=null,c=b,b=c.effect),a.isFunction(c)&&(e=c,d=null,c={});if(typeof c=="number"||a.fx.speeds[c])e=d,d=c,c={};a.isFunction(d)&&(e=d,d=null),c=c||{},d=d||c.duration,d=a.fx.off?0:typeof d=="number"?d:d in a.fx.sp
 eeds?a.fx.speeds[d]:a.fx.speeds._default,e=e||c.complete;return[b,c,d,e]}function j(a,b){var c={_:0},d;for(d in b)a[d]!=b[d]&&(c[d]=b[d]);return c}function i(b){var c,d;for(c in b)d=b[c],(d==null||a.isFunction(d)||c in g||/scrollbar/.test(c)||!/color/i.test(c)&&isNaN(parseFloat(d)))&&delete b[c];return b}function h(){var a=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,b={},c,d;if(a&&a.length&&a[0]&&a[a[0]]){var e=a.length;while(e--)c=a[e],typeof a[c]=="string"&&(d=c.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),b[d]=a[c])}else for(c in a)typeof a[c]=="string"&&(b[c]=a[c]);return b}function d(b,d){var e;do{e=a.curCSS(b,d);if(e!=""&&e!="transparent"||a.nodeName(b,"body"))break;d="backgroundColor"}while(b=b.parentNode);return c(e)}function c(b){var c;if(b&&b.constructor==Array&&b.length==3)return b;if(c=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b))return[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],1
 0)];if(c=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(b))return[parseFloat(c[1])*2.55,parseFloat(c[2])*2.55,parseFloat(c[3])*2.55];if(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(b))return[parseInt(c[1],16),parseInt(c[2],16),parseInt(c[3],16)];if(c=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(b))return[parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16),parseInt(c[3]+c[3],16)];if(c=/rgba\(0, 0, 0, 0\)/.exec(b))return e.transparent;return e[a.trim(b).toLowerCase()]}a.effects={},a.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(b,e){a.fx.step[e]=function(a){a.colorInit||(a.start=d(a.elem,e),a.end=c(a.end),a.colorInit=!0),a.elem.style[e]="rgb("+Math.max(Math.min(parseInt(a.pos*(a.end[0]-a.start[0])+a.start[0],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[1]-a.start[1])+a.start[1],10),255),0)+","+Math.max(Math.mi
 n(parseInt(a.pos*(a.end[2]-a.start[2])+a.start[2],10),255),0)+")"}});var e={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},f=["add","remove","toggle"],g
 ={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.effects.animateClass=function(b,c,d,e){a.isFunction(d)&&(e=d,d=null);return this.queue(function(){var g=a(this),k=g.attr("style")||" ",l=i(h.call(this)),m,n=g.attr("class");a.each(f,function(a,c){b[c]&&g[c+"Class"](b[c])}),m=i(h.call(this)),g.attr("class",n),g.animate(j(l,m),{queue:!1,duration:c,easing:d,complete:function(){a.each(f,function(a,c){b[c]&&g[c+"Class"](b[c])}),typeof g.attr("style")=="object"?(g.attr("style").cssText="",g.attr("style").cssText=k):g.attr("style",k),e&&e.apply(this,arguments),a.dequeue(this)}})})},a.fn.extend({_addClass:a.fn.addClass,addClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{add:b},c,d,e]):this._addClass(b)},_removeClass:a.fn.removeClass,removeClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{remove:b},c,d,e]):this._removeClass(b)},_toggleClass:a.fn.toggleClass,toggleClass:function(c,d,e,f,g){r
 eturn typeof d=="boolean"||d===b?e?a.effects.animateClass.apply(this,[d?{add:c}:{remove:c},e,f,g]):this._toggleClass(c,d):a.effects.animateClass.apply(this,[{toggle:c},d,e,f])},switchClass:function(b,c,d,e,f){return a.effects.animateClass.apply(this,[{add:c,remove:b},d,e,f])}}),a.extend(a.effects,{version:"1.8.18",save:function(a,b){for(var c=0;c<b.length;c++)b[c]!==null&&a.data("ec.storage."+b[c],a[0].style[b[c]])},restore:function(a,b){for(var c=0;c<b.length;c++)b[c]!==null&&a.css(b[c],a.data("ec.storage."+b[c]))},setMode:function(a,b){b=="toggle"&&(b=a.is(":hidden")?"show":"hide");return b},getBaseline:function(a,b){var c,d;switch(a[0]){case"top":c=0;break;case"middle":c=.5;break;case"bottom":c=1;break;default:c=a[0]/b.height}switch(a[1]){case"left":d=0;break;case"center":d=.5;break;case"right":d=1;break;default:d=a[1]/b.width}return{x:d,y:c}},createWrapper:function(b){if(b.parent().is(".ui-effects-wrapper"))return b.parent();var c={width:b.outerWidth(!0),height:b.outerHeight(!0)
 ,"float":b.css("float")},d=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e=document.activeElement;b.wrap(d),(b[0]===e||a.contains(b[0],e))&&a(e).focus(),d=b.parent(),b.css("position")=="static"?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"}));return d.css(c).show()},removeWrapper:function(b){var c,d=document.activeElement;if(b.parent().is(".ui-effects-wrapper")){c=b.parent().replaceWith(b),(b[0]===d||a.contains(b[0],d))&&a(d).focus();return c}return b},setTransition:function(b,c,d,e){e=e||{},a.each(c,function(a,c){unit=b.cssUnit(c),unit[0]>0&&(e[c]=unit[0]*d+unit[1])});return e}}),a.fn.extend({effect:function(b,c,d,e){var f=k.apply(this,arguments),g=
 {options:f[1],duration:f[2],callback:f[3]},h=g.options.mode,i=a.effects[b];if(a.fx.off||!i)return h?this[h](g.duration,g.callback):this.each(function(){g.callback&&g.callback.call(this)});return i.call(this,g)},_show:a.fn.show,show:function(a){if(l(a))return this._show.apply(this,arguments);var b=k.apply(this,arguments);b[1].mode="show";return this.effect.apply(this,b)},_hide:a.fn.hide,hide:function(a){if(l(a))return this._hide.apply(this,arguments);var b=k.apply(this,arguments);b[1].mode="hide";return this.effect.apply(this,b)},__toggle:a.fn.toggle,toggle:function(b){if(l(b)||typeof b=="boolean"||a.isFunction(b))return this.__toggle.apply(this,arguments);var c=k.apply(this,arguments);c[1].mode="toggle";return this.effect.apply(this,c)},cssUnit:function(b){var c=this.css(b),d=[];a.each(["em","px","%","pt"],function(a,b){c.indexOf(b)>0&&(d=[parseFloat(c),b])});return d}}),a.easing.jswing=a.easing.swing,a.extend(a.easing,{def:"easeOutQuad",swing:function(b,c,d,e,f){return a.easing[a.e
 asing.def](b,c,d,e,f)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b+c;return-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b+c;return d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b*b+c;return-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b*b*b+c;return d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){
 return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return b==0?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){if(b==0)return c;if(b==e)return c+d;if((b/=e/2)<1)return d/2*Math.pow(2,10*(b-1))+c;return d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){if((b/=e/2)<1)return-d/2*(Math.sqrt(1-b*b)-1)+c;return d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e)==1)return c+d;g||(g=e*.3);if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g))+c},easeOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)retur
 n c;if((b/=e)==1)return c+d;g||(g=e*.3);if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*b)*Math.sin((b*e-f)*2*Math.PI/g)+d+c},easeInOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e/2)==2)return c+d;g||(g=e*.3*1.5);if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);if(b<1)return-0.5*h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)+c;return h*Math.pow(2,-10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)*.5+d+c},easeInBack:function(a,c,d,e,f,g){g==b&&(g=1.70158);return e*(c/=f)*c*((g+1)*c-g)+d},easeOutBack:function(a,c,d,e

<TRUNCATED>

[50/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/custom-theme/jquery-ui-1.8.9.custom.css
----------------------------------------------------------------------
diff --git a/portal/css/custom-theme/jquery-ui-1.8.9.custom.css b/portal/css/custom-theme/jquery-ui-1.8.9.custom.css
deleted file mode 100755
index 044734a..0000000
--- a/portal/css/custom-theme/jquery-ui-1.8.9.custom.css
+++ /dev/null
@@ -1,573 +0,0 @@
-/*
- * jQuery UI CSS Framework 1.8.9
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Theming/API
- */
-
-/* Layout helpers
-----------------------------------*/
-.ui-helper-hidden { display: none; }
-.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
-.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
-.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
-.ui-helper-clearfix { display: inline-block; }
-/* required comment for clearfix to work in Opera \*/
-* html .ui-helper-clearfix { height:1%; }
-.ui-helper-clearfix { display:block; }
-/* end clearfix */
-.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
-
-
-/* Interaction Cues
-----------------------------------*/
-.ui-state-disabled { cursor: default !important; }
-
-
-/* Icons
-----------------------------------*/
-
-/* states and images */
-.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
-
-
-/* Misc visuals
-----------------------------------*/
-
-/* Overlays */
-.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
-
-
-/*
- * jQuery UI CSS Framework 1.8.9
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Theming/API
- *
- * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=deedf7&bgTextureHeader=01_flat.png&bgImgOpacityHeader=100&borderColorHeader=aed0ea&fcHeader=222222&iconColorHeader=72a7cf&bgColorContent=f2f5f7&bgTextureContent=01_flat.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=362b36&iconColorContent=72a7cf&bgColorDefault=d7ebf9&bgTextureDefault=01_flat.png&bgImgOpacityDefault=80&borderColorDefault=aed0ea&fcDefault=2779aa&iconColorDefault=3d80b3&bgColorHover=e4f1fb&bgTextureHover=01_flat.png&bgImgOpacityHover=100&borderColorHover=74b2e2&fcHover=0070a3&iconColorHover=2694e8&bgColorActive=3baae3&bgTextureActive=01_flat.png&bgImgOpacityActive=50&borderColorActive=2694e8&fcActive=ffffff&iconColorActive=ffffff&bgColorHighlight=ffef8f&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=25&borderColorHighlight=f9dd34&fcHighli
 ght=363636&iconColorHighlight=2e83ff&bgColorError=cd0a0a&bgTextureError=01_flat.png&bgImgOpacityError=15&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffffff&bgColorOverlay=eeeeee&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=90&opacityOverlay=80&bgColorShadow=000000&bgTextureShadow=04_highlight_hard.png&bgImgOpacityShadow=70&opacityShadow=30&thicknessShadow=7px&offsetTopShadow=-7px&offsetLeftShadow=-7px&cornerRadiusShadow=8px
- */
-
-
-/* Component containers
-----------------------------------*/
-.ui-widget { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1.1em; }
-.ui-widget .ui-widget { font-size: 1em; }
-.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1em; }
-.ui-widget-content { border: 1px solid #dddddd; background: #f2f5f7 url(images/ui-bg_flat_100_f2f5f7_40x100.png) 50% 50% repeat-x; color: #362b36; }
-.ui-widget-content a { color: #362b36; }
-.ui-widget-header { border: 1px solid #aed0ea; background: #deedf7 url(images/ui-bg_flat_100_deedf7_40x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
-.ui-widget-header a { color: #222222; }
-
-/* Interaction states
-----------------------------------*/
-.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #aed0ea; background: #d7ebf9 url(images/ui-bg_flat_80_d7ebf9_40x100.png) 50% 50% repeat-x; font-weight: bold; color: #2779aa; }
-.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #2779aa; text-decoration: none; }
-.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #74b2e2; background: #e4f1fb url(images/ui-bg_flat_100_e4f1fb_40x100.png) 50% 50% repeat-x; font-weight: bold; color: #0070a3; }
-.ui-state-hover a, .ui-state-hover a:hover { color: #0070a3; text-decoration: none; }
-.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #2694e8; background: #3baae3 url(images/ui-bg_flat_50_3baae3_40x100.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; }
-.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #ffffff; text-decoration: none; }
-.ui-widget :active { outline: none; }
-
-/* Interaction Cues
-----------------------------------*/
-.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight  {border: 1px solid #f9dd34; background: #ffef8f url(images/ui-bg_highlight-soft_25_ffef8f_1x100.png) 50% top repeat-x; color: #363636; }
-.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
-.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #cd0a0a url(images/ui-bg_flat_15_cd0a0a_40x100.png) 50% 50% repeat-x; color: #ffffff; }
-.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; }
-.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; }
-.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
-.ui-priority-secondary, .ui-widget-content .ui-priority-secondary,  .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
-.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
-
-/* Icons
-----------------------------------*/
-
-/* states and images */
-.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_72a7cf_256x240.png); }
-.ui-widget-content .ui-icon {background-image: url(images/ui-icons_72a7cf_256x240.png); }
-.ui-widget-header .ui-icon {background-image: url(images/ui-icons_72a7cf_256x240.png); }
-.ui-state-default .ui-icon { background-image: url(images/ui-icons_3d80b3_256x240.png); }
-.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_2694e8_256x240.png); }
-.ui-state-active .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
-.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
-.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
-
-/* positioning */
-.ui-icon-carat-1-n { background-position: 0 0; }
-.ui-icon-carat-1-ne { background-position: -16px 0; }
-.ui-icon-carat-1-e { background-position: -32px 0; }
-.ui-icon-carat-1-se { background-position: -48px 0; }
-.ui-icon-carat-1-s { background-position: -64px 0; }
-.ui-icon-carat-1-sw { background-position: -80px 0; }
-.ui-icon-carat-1-w { background-position: -96px 0; }
-.ui-icon-carat-1-nw { background-position: -112px 0; }
-.ui-icon-carat-2-n-s { background-position: -128px 0; }
-.ui-icon-carat-2-e-w { background-position: -144px 0; }
-.ui-icon-triangle-1-n { background-position: 0 -16px; }
-.ui-icon-triangle-1-ne { background-position: -16px -16px; }
-.ui-icon-triangle-1-e { background-position: -32px -16px; }
-.ui-icon-triangle-1-se { background-position: -48px -16px; }
-.ui-icon-triangle-1-s { background-position: -64px -16px; }
-.ui-icon-triangle-1-sw { background-position: -80px -16px; }
-.ui-icon-triangle-1-w { background-position: -96px -16px; }
-.ui-icon-triangle-1-nw { background-position: -112px -16px; }
-.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
-.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
-.ui-icon-arrow-1-n { background-position: 0 -32px; }
-.ui-icon-arrow-1-ne { background-position: -16px -32px; }
-.ui-icon-arrow-1-e { background-position: -32px -32px; }
-.ui-icon-arrow-1-se { background-position: -48px -32px; }
-.ui-icon-arrow-1-s { background-position: -64px -32px; }
-.ui-icon-arrow-1-sw { background-position: -80px -32px; }
-.ui-icon-arrow-1-w { background-position: -96px -32px; }
-.ui-icon-arrow-1-nw { background-position: -112px -32px; }
-.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
-.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
-.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
-.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
-.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
-.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
-.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
-.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
-.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
-.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
-.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
-.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
-.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
-.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
-.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
-.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
-.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
-.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
-.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
-.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
-.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
-.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
-.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
-.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
-.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
-.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
-.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
-.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
-.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
-.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
-.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
-.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
-.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
-.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
-.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
-.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
-.ui-icon-arrow-4 { background-position: 0 -80px; }
-.ui-icon-arrow-4-diag { background-position: -16px -80px; }
-.ui-icon-extlink { background-position: -32px -80px; }
-.ui-icon-newwin { background-position: -48px -80px; }
-.ui-icon-refresh { background-position: -64px -80px; }
-.ui-icon-shuffle { background-position: -80px -80px; }
-.ui-icon-transfer-e-w { background-position: -96px -80px; }
-.ui-icon-transferthick-e-w { background-position: -112px -80px; }
-.ui-icon-folder-collapsed { background-position: 0 -96px; }
-.ui-icon-folder-open { background-position: -16px -96px; }
-.ui-icon-document { background-position: -32px -96px; }
-.ui-icon-document-b { background-position: -48px -96px; }
-.ui-icon-note { background-position: -64px -96px; }
-.ui-icon-mail-closed { background-position: -80px -96px; }
-.ui-icon-mail-open { background-position: -96px -96px; }
-.ui-icon-suitcase { background-position: -112px -96px; }
-.ui-icon-comment { background-position: -128px -96px; }
-.ui-icon-person { background-position: -144px -96px; }
-.ui-icon-print { background-position: -160px -96px; }
-.ui-icon-trash { background-position: -176px -96px; }
-.ui-icon-locked { background-position: -192px -96px; }
-.ui-icon-unlocked { background-position: -208px -96px; }
-.ui-icon-bookmark { background-position: -224px -96px; }
-.ui-icon-tag { background-position: -240px -96px; }
-.ui-icon-home { background-position: 0 -112px; }
-.ui-icon-flag { background-position: -16px -112px; }
-.ui-icon-calendar { background-position: -32px -112px; }
-.ui-icon-cart { background-position: -48px -112px; }
-.ui-icon-pencil { background-position: -64px -112px; }
-.ui-icon-clock { background-position: -80px -112px; }
-.ui-icon-disk { background-position: -96px -112px; }
-.ui-icon-calculator { background-position: -112px -112px; }
-.ui-icon-zoomin { background-position: -128px -112px; }
-.ui-icon-zoomout { background-position: -144px -112px; }
-.ui-icon-search { background-position: -160px -112px; }
-.ui-icon-wrench { background-position: -176px -112px; }
-.ui-icon-gear { background-position: -192px -112px; }
-.ui-icon-heart { background-position: -208px -112px; }
-.ui-icon-star { background-position: -224px -112px; }
-.ui-icon-link { background-position: -240px -112px; }
-.ui-icon-cancel { background-position: 0 -128px; }
-.ui-icon-plus { background-position: -16px -128px; }
-.ui-icon-plusthick { background-position: -32px -128px; }
-.ui-icon-minus { background-position: -48px -128px; }
-.ui-icon-minusthick { background-position: -64px -128px; }
-.ui-icon-close { background-position: -80px -128px; }
-.ui-icon-closethick { background-position: -96px -128px; }
-.ui-icon-key { background-position: -112px -128px; }
-.ui-icon-lightbulb { background-position: -128px -128px; }
-.ui-icon-scissors { background-position: -144px -128px; }
-.ui-icon-clipboard { background-position: -160px -128px; }
-.ui-icon-copy { background-position: -176px -128px; }
-.ui-icon-contact { background-position: -192px -128px; }
-.ui-icon-image { background-position: -208px -128px; }
-.ui-icon-video { background-position: -224px -128px; }
-.ui-icon-script { background-position: -240px -128px; }
-.ui-icon-alert { background-position: 0 -144px; }
-.ui-icon-info { background-position: -16px -144px; }
-.ui-icon-notice { background-position: -32px -144px; }
-.ui-icon-help { background-position: -48px -144px; }
-.ui-icon-check { background-position: -64px -144px; }
-.ui-icon-bullet { background-position: -80px -144px; }
-.ui-icon-radio-off { background-position: -96px -144px; }
-.ui-icon-radio-on { background-position: -112px -144px; }
-.ui-icon-pin-w { background-position: -128px -144px; }
-.ui-icon-pin-s { background-position: -144px -144px; }
-.ui-icon-play { background-position: 0 -160px; }
-.ui-icon-pause { background-position: -16px -160px; }
-.ui-icon-seek-next { background-position: -32px -160px; }
-.ui-icon-seek-prev { background-position: -48px -160px; }
-.ui-icon-seek-end { background-position: -64px -160px; }
-.ui-icon-seek-start { background-position: -80px -160px; }
-/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
-.ui-icon-seek-first { background-position: -80px -160px; }
-.ui-icon-stop { background-position: -96px -160px; }
-.ui-icon-eject { background-position: -112px -160px; }
-.ui-icon-volume-off { background-position: -128px -160px; }
-.ui-icon-volume-on { background-position: -144px -160px; }
-.ui-icon-power { background-position: 0 -176px; }
-.ui-icon-signal-diag { background-position: -16px -176px; }
-.ui-icon-signal { background-position: -32px -176px; }
-.ui-icon-battery-0 { background-position: -48px -176px; }
-.ui-icon-battery-1 { background-position: -64px -176px; }
-.ui-icon-battery-2 { background-position: -80px -176px; }
-.ui-icon-battery-3 { background-position: -96px -176px; }
-.ui-icon-circle-plus { background-position: 0 -192px; }
-.ui-icon-circle-minus { background-position: -16px -192px; }
-.ui-icon-circle-close { background-position: -32px -192px; }
-.ui-icon-circle-triangle-e { background-position: -48px -192px; }
-.ui-icon-circle-triangle-s { background-position: -64px -192px; }
-.ui-icon-circle-triangle-w { background-position: -80px -192px; }
-.ui-icon-circle-triangle-n { background-position: -96px -192px; }
-.ui-icon-circle-arrow-e { background-position: -112px -192px; }
-.ui-icon-circle-arrow-s { background-position: -128px -192px; }
-.ui-icon-circle-arrow-w { background-position: -144px -192px; }
-.ui-icon-circle-arrow-n { background-position: -160px -192px; }
-.ui-icon-circle-zoomin { background-position: -176px -192px; }
-.ui-icon-circle-zoomout { background-position: -192px -192px; }
-.ui-icon-circle-check { background-position: -208px -192px; }
-.ui-icon-circlesmall-plus { background-position: 0 -208px; }
-.ui-icon-circlesmall-minus { background-position: -16px -208px; }
-.ui-icon-circlesmall-close { background-position: -32px -208px; }
-.ui-icon-squaresmall-plus { background-position: -48px -208px; }
-.ui-icon-squaresmall-minus { background-position: -64px -208px; }
-.ui-icon-squaresmall-close { background-position: -80px -208px; }
-.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
-.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
-.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
-.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
-.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
-.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
-
-
-/* Misc visuals
-----------------------------------*/
-
-/* Corner radius */
-.ui-corner-tl { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; }
-.ui-corner-tr { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; }
-.ui-corner-bl { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; }
-.ui-corner-br { -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; }
-.ui-corner-top { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; }
-.ui-corner-bottom { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; }
-.ui-corner-right {  -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; }
-.ui-corner-left { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; }
-.ui-corner-all { -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px; }
-
-/* Overlays */
-.ui-widget-overlay { background: #eeeeee url(images/ui-bg_diagonals-thick_90_eeeeee_40x40.png) 50% 50% repeat; opacity: .80;filter:Alpha(Opacity=80); }
-.ui-widget-shadow { margin: -7px 0 0 -7px; padding: 7px; background: #000000 url(images/ui-bg_highlight-hard_70_000000_1x100.png) 50% top repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*
- * jQuery UI Resizable 1.8.9
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Resizable#theming
- */
-.ui-resizable { position: relative;}
-.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
-.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
-.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
-.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
-.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
-.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
-.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
-.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
-.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
-.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
- * jQuery UI Selectable 1.8.9
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Selectable#theming
- */
-.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
-/*
- * jQuery UI Accordion 1.8.9
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Accordion#theming
- */
-/* IE/Win - Fix animation bug - #4615 */
-.ui-accordion { width: 100%; }
-.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
-.ui-accordion .ui-accordion-li-fix { display: inline; }
-.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
-.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
-.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
-.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
-.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
-.ui-accordion .ui-accordion-content-active { display: block; }
-/*
- * jQuery UI Autocomplete 1.8.9
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Autocomplete#theming
- */
-.ui-autocomplete { position: absolute; cursor: default; }	
-
-/* workarounds */
-* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
-
-/*
- * jQuery UI Menu 1.8.9
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Menu#theming
- */
-.ui-menu {
-	list-style:none;
-	padding: 2px;
-	margin: 0;
-	display:block;
-	float: left;
-}
-.ui-menu .ui-menu {
-	margin-top: -3px;
-}
-.ui-menu .ui-menu-item {
-	margin:0;
-	padding: 0;
-	zoom: 1;
-	float: left;
-	clear: left;
-	width: 100%;
-}
-.ui-menu .ui-menu-item a {
-	text-decoration:none;
-	display:block;
-	padding:.2em .4em;
-	line-height:1.5;
-	zoom:1;
-}
-.ui-menu .ui-menu-item a.ui-state-hover,
-.ui-menu .ui-menu-item a.ui-state-active {
-	font-weight: normal;
-	margin: -1px;
-}
-/*
- * jQuery UI Button 1.8.9
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Button#theming
- */
-.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
-.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
-button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
-.ui-button-icons-only { width: 3.4em; } 
-button.ui-button-icons-only { width: 3.7em; } 
-
-/*button text element */
-.ui-button .ui-button-text { display: block; line-height: 1.4;  }
-.ui-button-text-only .ui-button-text { padding: .4em 1em; }
-.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
-.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
-.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
-.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
-/* no icon support for input elements, provide padding by default */
-input.ui-button { padding: .4em 1em; }
-
-/*button icon element(s) */
-.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
-.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
-.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
-.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
-.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
-
-/*button sets*/
-.ui-buttonset { margin-right: 7px; }
-.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
-
-/* workarounds */
-button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
-/*
- * jQuery UI Dialog 1.8.9
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Dialog#theming
- */
-.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
-.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative;  }
-.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } 
-.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
-.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
-.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
-.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
-.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
-.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
-.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
-.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
-.ui-draggable .ui-dialog-titlebar { cursor: move; }
-/*
- * jQuery UI Slider 1.8.9
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Slider#theming
- */
-.ui-slider { position: relative; text-align: left; }
-.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
-.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
-
-.ui-slider-horizontal { height: .8em; }
-.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
-.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
-.ui-slider-horizontal .ui-slider-range-min { left: 0; }
-.ui-slider-horizontal .ui-slider-range-max { right: 0; }
-
-.ui-slider-vertical { width: .8em; height: 100px; }
-.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
-.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
-.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
-.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
- * jQuery UI Tabs 1.8.9
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Tabs#theming
- */
-.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
-.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
-.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
-.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
-.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
-.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
-.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
-.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
-.ui-tabs .ui-tabs-hide { display: none !important; }
-/*
- * jQuery UI Datepicker 1.8.9
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Datepicker#theming
- */
-.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
-.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
-.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
-.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
-.ui-datepicker .ui-datepicker-prev { left:2px; }
-.ui-datepicker .ui-datepicker-next { right:2px; }
-.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
-.ui-datepicker .ui-datepicker-next-hover { right:1px; }
-.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px;  }
-.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
-.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
-.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
-.ui-datepicker select.ui-datepicker-month, 
-.ui-datepicker select.ui-datepicker-year { width: 49%;}
-.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
-.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0;  }
-.ui-datepicker td { border: 0; padding: 1px; }
-.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
-.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
-.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
-.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
-
-/* with multiple calendars */
-.ui-datepicker.ui-datepicker-multi { width:auto; }
-.ui-datepicker-multi .ui-datepicker-group { float:left; }
-.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
-.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
-.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
-.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
-.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
-.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
-.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
-.ui-datepicker-row-break { clear:both; width:100%; }
-
-/* RTL support */
-.ui-datepicker-rtl { direction: rtl; }
-.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
-.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
-.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
-.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
-.ui-datepicker-rtl .ui-datepicker-group { float:right; }
-.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
-.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
-
-/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
-.ui-datepicker-cover {
-    display: none; /*sorry for IE5*/
-    display/**/: block; /*sorry for IE5*/
-    position: absolute; /*must have*/
-    z-index: -1; /*must have*/
-    filter: mask(); /*must have*/
-    top: -4px; /*must have*/
-    left: -4px; /*must have*/
-    width: 200px; /*must have*/
-    height: 200px; /*must have*/
-}/*
- * jQuery UI Progressbar 1.8.9
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Progressbar#theming
- */
-.ui-progressbar { height:2em; text-align: left; }
-.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/entypo/entypo.eot
----------------------------------------------------------------------
diff --git a/portal/css/entypo/entypo.eot b/portal/css/entypo/entypo.eot
new file mode 100644
index 0000000..d9d7326
Binary files /dev/null and b/portal/css/entypo/entypo.eot differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/entypo/entypo.svg
----------------------------------------------------------------------
diff --git a/portal/css/entypo/entypo.svg b/portal/css/entypo/entypo.svg
new file mode 100644
index 0000000..e1a95c3
--- /dev/null
+++ b/portal/css/entypo/entypo.svg
@@ -0,0 +1,13 @@
+<?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" > <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%">
+<defs >
+<font id="entypo" horiz-adv-x="508" ><font-face
+    font-family="Entypo"
+    units-per-em="1000"
+    panose-1="0 0 0 0 0 0 0 0 0 0"
+    ascent="750"
+    descent="-250"
+    alphabetic="0" />
+<missing-glyph horiz-adv-x="500" />
+</font>
+</defs>
+</svg>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/entypo/entypo.ttf
----------------------------------------------------------------------
diff --git a/portal/css/entypo/entypo.ttf b/portal/css/entypo/entypo.ttf
new file mode 100644
index 0000000..fc305d2
Binary files /dev/null and b/portal/css/entypo/entypo.ttf differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/entypo/entypo.woff
----------------------------------------------------------------------
diff --git a/portal/css/entypo/entypo.woff b/portal/css/entypo/entypo.woff
new file mode 100644
index 0000000..e744a79
Binary files /dev/null and b/portal/css/entypo/entypo.woff differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/jquery-ui-timepicker.css
----------------------------------------------------------------------
diff --git a/portal/css/jquery-ui-timepicker.css b/portal/css/jquery-ui-timepicker.css
deleted file mode 100644
index d72d486..0000000
--- a/portal/css/jquery-ui-timepicker.css
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Timepicker stylesheet
- * Highly inspired from datepicker
- * FG - Nov 2010 - Web3R 
- *
- * version 0.0.3 : Fixed some settings, more dynamic
- * version 0.0.4 : Removed width:100% on tables
- * version 0.1.1 : set width 0 on tables to fix an ie6 bug
- */
-
-.ui-timepicker-inline { display: inline; }
-
-#ui-timepicker-div { padding: 0.2em }
-.ui-timepicker-table { display: inline-table; width: 0; }
-.ui-timepicker-table table { margin:0.15em 0 0 0; border-collapse: collapse; }
-
-.ui-timepicker-hours, .ui-timepicker-minutes { padding: 0.2em;  }
-
-.ui-timepicker-table .ui-timepicker-title { line-height: 1.8em; text-align: center; }
-.ui-timepicker-table td { padding: 0.1em; width: 2.2em; }
-.ui-timepicker-table th.periods { padding: 0.1em; width: 2.2em; }
-
-/* span for disabled cells */
-.ui-timepicker-table td span {
-	display:block;
-    padding:0.2em 0.3em 0.2em 0.5em;
-    width: 1.2em;
-
-    text-align:right;
-    text-decoration:none;
-}
-/* anchors for clickable cells */
-.ui-timepicker-table td a {
-    display:block;
-    padding:0.2em 0.3em 0.2em 0.5em;
-    width: 1.2em;
-
-    text-align:right;
-    text-decoration:none;
-}
-
-/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
-.ui-timepicker-cover {
-    display: none; /*sorry for IE5*/
-    display/**/: block; /*sorry for IE5*/
-    position: absolute; /*must have*/
-    z-index: -1; /*must have*/
-    filter: mask(); /*must have*/
-    top: -4px; /*must have*/
-    left: -4px; /*must have*/
-    width: 200px; /*must have*/
-    height: 200px; /*must have*/
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/jquery.ui.statusbar.css
----------------------------------------------------------------------
diff --git a/portal/css/jquery.ui.statusbar.css b/portal/css/jquery.ui.statusbar.css
deleted file mode 100644
index 3b45b7e..0000000
--- a/portal/css/jquery.ui.statusbar.css
+++ /dev/null
@@ -1,25 +0,0 @@
-.ui-statusbar {
-    background-color: white;
-    position: fixed;
-    bottom: 0em;
-    left: 0.5em;
-    right: 0.5em;
-    width: auto;
-    height: auto;
-    padding: 0.5em;
-    /*opacity: .80;
-    filter: alpha(opacity="80");*/
-    z-index: 999;
-    overflow: auto;
-}
-
-.ui-statusbar ul {
-    list-style: none;
-    margin-left: 0em;
-    padding-left: 0.5em;
-}
-
-.ui-statusbar ul li {
-    margin-top: 0.2em;
-    padding: 0.2em;
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/main.css
----------------------------------------------------------------------
diff --git a/portal/css/main.css b/portal/css/main.css
new file mode 100644
index 0000000..cdb31fe
--- /dev/null
+++ b/portal/css/main.css
@@ -0,0 +1,1460 @@
+[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
+  display: none;
+}
+
+html{
+  min-height: 100%;
+  position:relative;
+  margin: 0 auto;
+  background: #fff;
+  min-width: 1100px;
+}
+
+body {
+  padding: 0;
+  background-color: #fff;
+  font-family: 'marquette-light', 'Helvetica Neue', Helvetica, Arial, sans-serif;
+  height: 100%;
+  max-height: 100%;
+  overflow-x:hidden;
+}
+
+a {
+  cursor: pointer;
+}
+
+@font-face {
+  font-family: 'entypo';
+  src: url('entypo/entypo.eot');
+  src: url('entypo/entypo.eot?#iefix') format('embedded-opentype'), url('entypo/entypo.woff') format('woff'), url('entypo/entypo.ttf') format('truetype'), url('entypo/entypo.svg#entypo') format('svg');
+  font-weight: normal;
+  font-style: normal;
+}
+
+@font-face {
+  font-family: 'marquette-medium';
+  src: url('arsmarquette/ARSMaquettePro-Medium.otf'), url('arsmarquette/ARSMaquettePro-Medium.otf') format('opentype');
+}
+
+@font-face {
+  font-family: 'marquette-regular';
+  src: url('arsmarquette/ARSMaquettePro-Regular.otf'), url('arsmarquette/ARSMaquettePro-Regular.otf') format('opentype');
+}
+
+@font-face {
+  font-family: 'marquette-light';
+  src: url('arsmarquette/ARSMaquettePro-Light.otf'), url('arsmarquette/ARSMaquettePro-Light.otf') format('opentype');
+}
+
+.bold {
+  font-family: 'marquette-medium';
+}
+
+/*--------------------- structural setup*/
+.main-content {
+  background-color: white;
+  margin: 0 0 0 200px;
+}
+
+.page-holder {
+  /*position:relative;*/
+}
+
+.side-menu {
+  position: absolute;
+  top: 51px;
+  left: 0;
+  bottom: 0;
+  width: 200px;
+  float: left;
+  background-color: #eee;
+}
+
+footer {
+  padding-top: 20px;
+  clear: both;
+}
+
+
+/*zero out... for bootstrap nonsense*/
+.zero-out {
+  padding: 0;
+  text-shadow: none;
+  background-color: transparent;
+  background-image: none;
+  border: none;
+  box-shadow: none;
+  outline: none;
+}
+
+.modal-body {
+  overflow-y: visible;
+}
+
+.demo-holder {
+  margin: 0 -20px 0 -20px;
+  position:relative;
+}
+
+.alert-holder {
+  position: fixed;
+  right: 0;
+  margin: 20px 20px 0 0;
+  z-index: 1050;
+  width: 302px;
+}
+
+.alert,
+.alert.alert-demo {
+  padding: 9px 35px 5px 14px;
+  margin-bottom: 3px;
+  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+  background-color: #eee;
+  border: 1px solid #eee;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+  -webkit-transition: all 1s ease;
+  -moz-transition: all 1s ease;
+  transition: all 1s ease;
+  height: 0;
+  overflow: hidden;
+  opacity: 0;
+  line-height: 0;
+  float: right;
+}
+
+.alert.alert-demo {
+  float: none;
+}
+
+.alert {
+  width: 0;
+}
+
+.alert.alert-success {
+   background-color: rgba(155, 198, 144, 0.31);
+   color: #1f6719;
+   border-left: 2px solid #1f6719;
+ }
+
+.alert.alert-warning {
+  background-color: rgba(239,172,37,0.2);
+  color: rgb(239,172,37);
+  border-left: 2px solid rgb(239,172,37);
+  /*border: 1px solid rgb(239,172,37);*/
+}
+
+.alert.alert-info {
+  background-color: rgba(27,151,209,0.2);
+  color: rgb(27,151,209);
+  border-left: 2px solid rgb(27,151,209);
+  /*border: 1px solid rgb(27,151,209);*/
+}
+
+.alert.alert-error {
+  background-color: rgba(255,3,3,0.2);
+  color: rgb(255,3,3);
+  border-left: 2px solid rgb(255,3,3);
+  /*border: 1px solid rgb(255,3,3);*/
+}
+
+.alert.alert-animate.alert-demo {
+  height: 20px;
+  line-height: normal;
+  opacity: 1;
+  width: 100%;
+  -moz-box-shadow:    inset 0 2px 13px #b8b8b8;
+  -webkit-box-shadow: inset 0 2px 13px #b8b8b8;
+  box-shadow:         inset 0 2px 13px #b8b8b8;
+  /*overflow: visible;*/
+}
+
+.alert.alert-animate {
+  height: auto;
+  line-height: normal;
+  opacity: .9;
+  width: 300px;
+  /*overflow: visible;*/
+}
+
+
+
+@-webkit-keyframes alert-out
+{
+  from {
+    /*-webkit-transform: translateY(100%);*/
+    opacity: 1;
+  }
+  to {
+    -webkit-transform: translateY(500px);
+    opacity: 0;
+  }
+}
+
+@keyframes alert-out
+{
+  from {
+    /*transform: scale(1,1);*/
+    opacity: 1;
+  }
+  to {
+    transform: translateY(500px);
+    opacity: 0;
+  }
+}
+
+.fade-out {
+  -webkit-animation-name: alert-out;
+  -webkit-animation-duration: 1s;
+  -webkit-animation-timing-function: step-stop;
+  -webkit-animation-direction: normal;
+  -webkit-animation-iteration-count: 1;
+  /*-webkit-transform: scale(0,0);*/
+  animation-name: alert-out;
+  animation-duration: 1s;
+  animation-timing-function: step-stop;
+  animation-direction: normal;
+  animation-iteration-count: 1;
+  /*transform: scale(0,0);*/
+  opacity: .9;
+}
+
+.margin-35 {
+  margin-top: 35px;
+}
+
+.modal-footer {
+  background-color: transparent;
+}
+
+
+/*------------------ balloons*/
+
+.baloon {
+  margin: 20px;
+  padding: 20px 30px;
+  position: fixed;
+  bottom: 0;
+  top: auto;
+  border-style: solid;
+  border-radius: 2px;
+  box-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
+  /*text-shadow: 0 -1px 0px rgba(255, 255, 255, 0.50);*/
+}
+
+.baloon:after {
+  content: "";
+  position: absolute;
+  width: 10px;
+  height: 10px;
+
+  -webkit-transform: rotate(45deg);
+  -moz-transform: rotate(45deg);
+  -o-transform: rotate(45deg);
+  -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.7071067811865473, M12=-0.7071067811865477, M21=0.7071067811865477, M22=0.7071067811865473, SizingMethod='auto expand')";
+}
+
+
+.north.baloon:after {
+  top: -6px;
+  left: 30px;
+  border-top-style: solid;
+  border-left-style: solid;
+  box-shadow: -2px -2px 3px -1px rgba(0, 0, 0, 0.5)
+}
+
+.south.baloon:after {
+  bottom: -6px;
+  left: 30px;
+  border-bottom-style: solid;
+  border-right-style: solid;
+  box-shadow: 2px 2px 3px -1px rgba(0, 0, 0, 0.5)
+}
+
+
+.left.baloon:after {
+  top: 10px;
+  left: -6px;
+  border-bottom-style: solid;
+  border-left-style: solid;
+  box-shadow: -2px 2px 3px -1px rgba(0, 0, 0, 0.5)
+}
+
+
+.right.baloon:after {
+  bottom: 10px;
+  right: -6px;
+  border-top-style: solid;
+  border-right-style: solid;
+  box-shadow: 2px -2px 3px -1px rgba(0, 0, 0, 0.5)
+}
+
+.baloon, .baloon:after {
+  font-family: sans-serif;
+  font-weight: bold;
+  border-color: #f7f7f7;
+  border-width: 1px;
+  background-color: #3ac62f;
+  color: #fff;
+}
+
+
+/*----------------- app switcher*/
+
+#globalNav {
+  float: right;
+  margin: 15px 8px 0 9px;
+  list-style: none;
+  width: 114px;
+}
+
+#globalNav ul {
+  list-style: none;
+}
+
+#globalNavDetail > div {
+  display: none;
+  color: graytext;
+  background-image: none;
+  background-repeat: no-repeat;
+  background-position: 0 0;
+  min-height: 64px;
+}
+
+#globalNavDetail #globalNavDetailApiPlatform {
+  background-image: url('../img/appswitcher/apiPlatform_lg.png');
+}
+
+#globalNavDetail #globalNavDetailAppServices {
+  background-image: url('../img/appswitcher/appServices_lg.png');
+}
+
+#globalNavDetail #globalNavDetailApigeeHome {
+  margin-top: -10px;
+  background-image: url('../img/appswitcher/home_lg.png');
+}
+
+#globalNavDetail #globalNavDetailApiConsoles {
+  background-image: url('../img/appswitcher/console_lg.png');
+}
+
+#globalNavDetail #globalNavDetailApigeeHome .globalNavDetailApigeeLogo {
+  margin-top: 10px;
+  background-image: url('../img/appswitcher/logo_color.png');
+  width: 116px;
+  height: 40px;
+}
+
+#globalNavDetail > div .globalNavDetailDescription {
+  margin-top: 10px;
+  line-height: 17px;
+  font-style: oblique;
+}
+
+#globalNavDetail > div .globalNavDetailSubtitle {
+  font-size: 10px;
+  text-transform: uppercase;
+}
+
+#globalNavDetail > div .globalNavDetailTitle {
+  margin-top: 5px;
+  font-size: 20px;
+}
+
+#globalNavDetail > div .globalNavDetailDescription {
+  margin-top: 10px;
+  line-height: 17px;
+  font-style: oblique;
+}
+
+.navbar.navbar-static-top .dropdownContainingSubmenu .dropdown-menu a {
+  color: #494949;
+  padding: 13px 10px;
+}
+
+.navbar.navbar-static-top .dropdownContainingSubmenu .dropdown-menu .active a {
+
+  color: #ffffff;
+  background-color: #bb2d16;
+}
+
+
+
+.navbar.navbar-static-top .dropdown-menu a {
+  display: block;
+  padding: 3px 15px;
+  clear: both;
+  font-weight: normal;
+  line-height: 18px;
+  color: #333333;
+  white-space: nowrap;
+}
+
+
+#globalNav .dropdown-toggle {
+  border-radius: 3px;
+  padding: 3px 6px 3px 6px;
+  margin: 0;
+}
+
+.dropdown-toggle{
+  background-color: #bb2d16;
+  padding: 3px;
+}
+
+
+
+/*----end structural */
+
+.demo-holder {
+
+}
+
+.demo-holder .alert.alert-demo {
+  background-color: rgba(196, 196, 196, 0.10);
+  color: rgb(119, 119, 119);
+  padding: 12px 35px 7px 14px;
+}
+
+.demo-holder-content {
+  position: absolute;
+  right: 50px;
+}
+
+.demo-text {
+  position: absolute;
+  right: 223px;
+  left: 0;
+  padding: 0 0 0 10px;
+}
+
+.b {
+  display: block;
+}
+
+.toggle,
+.toggle-form {
+  position: absolute;
+  top: 10px;
+  right: 173px;
+  width: 50px;
+  height: 23px;
+  border-radius: 100px;
+  background-color: #ddd;
+  /*margin: -20px -40px;*/
+  overflow: hidden;
+  box-shadow: inset 0 0 2px 1px rgba(0,0,0,.05);
+
+}
+
+
+.form-horizontal.configs .control-label {
+  width: 250px;
+  padding: 0 10px 0 0;
+}
+
+
+.toggle-form {
+  position: relative;
+  right: auto;
+  top: auto;
+  display: inline-block;
+}
+
+.toggle-form-label {
+  display: inline-block;
+}
+
+input[type="checkbox"].check {
+  position: absolute;
+  display: block;
+  cursor: pointer;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  opacity: 0;
+  z-index: 6;
+}
+
+.check:checked ~ .track {
+  box-shadow: inset 0 0 0 20px #ff3b00;
+}
+
+.toggle-form .check:checked ~ .track {
+  box-shadow: inset 0 0 0 20px #82ce85;
+}
+
+.check:checked ~ .switch {
+  right: 2px;
+  left: 27px;
+  transition: .4s ease;
+  transition-property: left, right;
+  transition-delay: .05s, 0s;
+}
+
+.switch {
+  position: absolute;
+  left: 2px;
+  top: 2px;
+  bottom: 2px;
+  right: 27px;
+  background-color: #fff;
+  border-radius: 36px;
+  z-index: 1;
+  transition: .4s ease;
+  transition-property: left, right;
+  transition-delay: 0s, .05s;
+  box-shadow: 0 1px 2px rgba(0,0,0,.2);
+}
+
+.track {
+  position: absolute;
+  left: 0;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  transition: .4s ease;
+  box-shadow: inset 0 0 0 2px rgba(0,0,0,.05);
+  border-radius: 40px;
+}
+
+
+/*li {*/
+  /*line-height: 26px;*/
+/*}*/
+
+
+/*------------------------ icons*/
+top-selector .pictogram,
+.add-app .pictogram {
+  margin: 0 3px 0 0;
+}
+
+i.pictogram {
+  font-family: "entypo";
+  display: inline-block;
+  width: 23px;
+  margin: 0 5px 0 0;
+  font-size: 2.5em;
+  height: 17px;
+  line-height: 0.35;
+  overflow:hidden;
+  vertical-align: middle;
+  padding: 5px 0 0 0;
+  font-style: normal;
+  font-weight: 100;
+  -webkit-font-smoothing: antialiased;
+}
+
+i.pictogram.sub {
+  margin: 0 0 0 10px;
+  font-size: 2.1em;
+}
+
+i.pictogram.title {
+  margin: 0 0 0 0;
+  font-size: 2.1em;
+}
+
+i.pictogram.chart {
+  margin: 0 0 0 3px;
+  font-size: 2.1em;
+  line-height: .4em;
+  height: .5em;
+  width: 100%;
+}
+
+i.pictogram.apichart {
+  margin: 0 0 0 11px;
+  font-size: 2.1em;
+  line-height: .4em;
+  height: .5em;
+  width: 100%;
+}
+
+[class^="ma-icon-"], [class*=" ma-icon-"] {
+  display: inline-block;
+  width: 23px;
+  height: 20px;
+  margin: 1px 3px 0 0;
+  line-height: 20px;
+  vertical-align: text-top;
+  background-image: url("../img/nav-sprites.png");
+  background-position: 14px 14px;
+  background-repeat: no-repeat;
+}
+
+[class^="sdk-icon-"], [class*=" sdk-icon-"] {
+  display: inline-block;
+  width: 32px;
+  height: 29px;
+  margin: -3px 3px 0 0;
+  line-height: 32px;
+  vertical-align: text-top;
+  background-image: url("../img/sdk-sprites.png");
+  background-position: 14px 14px;
+  background-repeat: no-repeat;
+  cursor: pointer;
+  overflow:hidden;
+}
+
+[class^="sdk-icon-large-"], [class*=" sdk-icon-large-"] {
+  display: inline-block;
+  width: 86px;
+  height: 86px;
+  margin: -3px 3px 0 0;
+  line-height: 32px;
+  vertical-align: text-top;
+  background-image: url("../img/sdk-sprites-large.png");
+  background-position: 14px 14px;
+  background-repeat: no-repeat;
+  border:1px solid #aaa;
+  -moz-box-shadow:    3px 3px 0px -1px #ccc;
+  -webkit-box-shadow: 3px 3px 0px -1px #ccc;
+  box-shadow:         3px 3px 0px -1px #ccc;
+}
+
+.sdk-icon-ios {
+  background-position: -6px -4px;
+}
+
+.sdk-icon-android {
+  background-position: -59px -3px;
+}
+
+.sdk-icon-js {
+  background-position: -109px -4px;
+}
+
+.sdk-icon-node {
+  background-position: -154px -3px;
+}
+
+.sdk-icon-ruby {
+  background-position: -204px -3px;
+}
+
+.sdk-icon-net {
+  background-position: -256px -4px;
+}
+
+
+.sdk-icon-large-ios {
+  background-position: -6px -3px;
+}
+
+.sdk-icon-large-android {
+  background-position: -113px 0;
+}
+
+.sdk-icon-large-js {
+  background-position: -219px 0;
+}
+
+.sdk-icon-large-node {
+  background-position: -323px -3px;
+}
+
+.sdk-icon-large-ruby {
+  background-position: -431px 0;
+}
+
+.sdk-icon-large-net {
+  background-position: -537px -3px;
+}
+
+/*---------------------------- orange apigee header*/
+
+body > header > .navbar {
+  background-color: #ff3b00;
+}
+
+/*apigee logo*/
+body > header .navbar:first-child > a {
+  height: 22px;
+  line-height: 22px;
+  padding: 10px 20px 20px 13px;
+}
+
+.navbar.navbar-static-top a {
+  text-shadow: none;
+  color: #fff;
+}
+
+.navbar-text {
+  color: #fff;
+  margin: 4px;
+}
+
+.navbar-text .dropdown-menu a {
+  color: #343434;
+}
+
+/*---------------------------secondary header (org/app nav + sdks)*/
+
+.top-nav {
+  background-color: #fff;
+  /*border-right: 3px solid #e6e6e6;*/
+  /*border-left: 3px solid #e6e6e6;*/
+}
+
+ul.org-nav li {
+  background-color: #fff;
+ /* border-bottom: 3px solid #e6e6e6;*/
+}
+ul.app-nav li {
+    background-color: #fff;
+    /* border-bottom: 3px solid #e6e6e6;*/
+}
+.top-nav .btn-group {
+  margin: 9px 0 5px 5px;
+}
+
+.nav .org-selector .caret,
+.nav .org-selector:focus .caret,
+.nav .org-selector:active .caret,
+.nav .org-selector:hover .caret,
+.nav .app-selector .caret,
+.nav .app-selector:focus .caret,
+.nav .app-selector:active .caret,
+.nav .app-selector:hover .caret{
+  border-top-color: #5f5f5f;
+  border-bottom-color: transparent;
+  margin-top: 8px;
+  position: absolute;
+  right: 10px;
+}
+
+.org-options {
+  margin: 5px 2px -8px -5px;
+  border-top: 3px solid #e6e6e6;
+  overflow: hidden;
+}
+
+.navbar.secondary {
+  margin: 0 -20px 0 -21px;
+  border-bottom: 3px solid #e6e6e6;
+}
+
+.navbar.secondary > .container-fluid {
+  margin: 0 -20px 0 -18px;
+}
+
+.navbar.secondary .nav {
+  margin: 0 0 0 0;
+}
+
+.top-nav,
+.navbar.secondary > .container-fluid .nav-collapse.collapse.span9 {
+  margin: 0;
+}
+
+.top-nav > li,
+.top-nav > li > div {
+  width: 100%;
+}
+
+.span9.button-area {
+  margin-left: 0;
+}
+
+.navbar .nav a.btn-create i {
+  margin: 1px 0 0 0;
+  /*line-height: 0.2;*/
+}
+
+.navbar .nav a.btn-create,
+.navbar .nav a.btn-create:hover{
+  text-align: left;
+  font-weight: normal;
+  color: #1b70a0;
+  padding: 0 0 0 10px;
+  margin: 4px 0 0 3px;
+  display: block;
+  width: 140px;
+  height: 30px;
+  line-height: 30px;
+  background-color: #f3f3f3
+}
+
+
+.navbar .nav a.btn-create:hover {
+  color: #1b70a0;
+}
+
+.navbar .nav a.btn-create:active {
+  box-shadow: none;
+}
+
+.sdks > ul > li.title label {
+  color: #5f5f5f;
+  font-size: 15px;
+  display: inline-block;
+  padding: 16px 0 0 0;
+  line-height: 6px;
+  cursor: default;
+}
+
+.sdks > ul > li.title a {
+    color: #5f5f5f;
+    font-size: 15px;
+    display: inline-block;
+    padding: 16px 0 0 0;
+    line-height: 6px;
+}
+
+.sdks > ul {
+  list-style: none;
+  margin: 0;
+  height: 32px;
+  overflow: hidden;
+}
+
+.sdks > ul > li {
+  display: inline;
+  margin: 0 10px 0 0;
+  line-height: 11px;
+}
+
+.side-menu .dropdown-menu,
+.navbar.secondary,
+.navbar.secondary .btn-group > .btn,
+.navbar.secondary .btn-group > .dropdown-menu,
+.side-menu .btn-group > .btn {
+  text-transform: uppercase;
+  font-family: 'marquette-regular', 'Helvetica Neue', Helvetica, Arial, sans-serif;
+  color: #5f5f5f;
+  font-size: 14px;
+  -webkit-font-smoothing: antialiased;
+}
+
+.dropdown-menu > .active > a,
+.dropdown-menu > .active > a:hover,
+.dropdown-menu > .active > a:focus,
+.dropdown-menu > li > a:hover,
+.dropdown-menu > li > a:focus,
+.dropdown-submenu:hover > a,
+.dropdown-submenu:focus > a {
+  text-decoration: none;
+  color: #ffffff;
+  background-color: #5f5f5f;
+  background-image: -moz-linear-gradient(top, #5f5f5f, #787878);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5f5f5f), to(#787878));
+  background-image: -webkit-linear-gradient(top, #5f5f5f, #787878);
+  background-image: -o-linear-gradient(top, #5f5f5f, #787878);
+  background-image: linear-gradient(to bottom, #5f5f5f, #787878);
+  background-repeat: repeat-x;
+}
+
+.top-selector,
+.top-selector:hover,
+.top-selector:active,
+.top-selector:focus,
+.btn-group.open .btn.dropdown-toggle.top-selector{
+  color: #5f5f5f;
+  padding: 0;
+  text-shadow: none;
+  background-color: transparent;
+  background-image: none;
+  border: none;
+  box-shadow: none;
+  outline: none;
+  width: 100%;
+  text-align: left;
+}
+
+/*---------------------------- dialogs */
+.dialog-body{
+  padding:20px;
+}
+
+/*---------------------------- global headers */
+
+h1.title {
+  font-size: 1.3em;
+  font-family: 'marquette-medium', "Helvetica Neue", sans-serif;
+  color: #686868;
+}
+
+h1.title {
+  line-height: 17px;
+  display:inline-block;
+  padding: 0 10px 0 0;
+}
+
+
+h2.title {
+  text-transform: uppercase;
+  font-size: 1.2em;
+  border-top: 2px solid #eee;
+  color: #828282;
+}
+
+h2.title.chart {
+  margin: 10px 0 20px 10px;
+  z-index: 101;
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+}
+
+h3.title {
+  text-transform: uppercase;
+  font-size: 1.1em;
+}
+
+/*---------------------------- left hand menu/nav */
+
+.sidebar-nav .nav-list {
+  padding: 0;
+}
+
+.sidebar-nav .nav-list > li > a, .nav-list .nav-header {
+  margin-right: 0;
+}
+
+.sidebar-nav .nav-list.trans{
+  max-height: 100000px;
+  -webkit-transition: all .5s ease;
+  -moz-transition: all .5s ease;
+  transition: all .5s ease;
+  display: block;
+  opacity: 0;
+}
+
+
+
+.sidebar-nav .nav-list li a {
+  padding: 10px 0 10px 25px;
+  color: #5f5f5f;
+  text-shadow: none;
+  background-color: #eee;
+  font-size: 14px;
+  text-transform: uppercase;
+  position:relative;
+
+}
+
+.sidebar-nav .nav-list li a.org-overview {
+  background-color: #fff;
+  font-family: 'marquette-light', 'Helvetica Neue', Helvetica, Arial, sans-serif;
+}
+
+.sidebar-nav .nav-list li a.org-overview:hover {
+  color: #5f5f5f;
+}
+
+.sidebar-nav .nav-list:first-child > li {
+  margin: 0 0 0 0;
+  height: 39px;
+  overflow: hidden;
+}
+
+.sidebar-nav .nav-list:first-child > li.active {
+  /*background-color: #0088cc;*/
+  height: auto;
+  overflow: visible;
+
+}
+
+.sidebar-nav .nav-list:first-child > li > ul > li > a {
+  color: #5f5f5f;
+}
+
+.sidebar-nav .nav-list:first-child > li.active > a,
+.sidebar-nav .nav-list:first-child > li > a:hover,
+.sidebar-nav .nav-list:first-child > li > a:focus {
+  color: #ffffff;
+  text-shadow: none;
+  background-color: #1b70a0;
+  margin: 0 0 0 -15px;
+
+}
+
+.sidebar-nav .nav-list:first-child  li.active > ul > li > a {
+  background-color: #fff;
+}
+
+.sidebar-nav .nav-list li.option > ul {
+  overflow: hidden;
+  opacity: 0;
+  height: auto;
+  display: block;
+  -webkit-transition: all .5s ease;
+  -moz-transition: all .5s ease;
+  transition: all .5s ease;
+  max-height: 100000px;
+}
+
+.sidebar-nav .nav-list li.option.active > ul {
+  opacity: 1;
+}
+
+.sidebar-nav .nav-list li.active > ul > li a {
+  border-bottom: 1px solid #eee;
+  color: #747474;
+  text-transform: none;
+  font-weight: 300;
+  padding: 10px 0 10px 22px;
+}
+
+.sidebar-nav .nav-list li.active > ul > li.active > a,
+.sidebar-nav .nav-list li.active > ul > li > a:hover,
+.sidebar-nav .nav-list li.active > ul > li > a:focus {
+  color: #1b70a0;
+  background: #fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAKCAYAAAB4zEQNAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1NkEzQ0Y1MUI0MjIxMUUyODZGN0I5RUE1NjAwQ0I0MCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1NkEzQ0Y1MkI0MjIxMUUyODZGN0I5RUE1NjAwQ0I0MCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlE
 PSJ4bXAuaWlkOjU2QTNDRjRGQjQyMjExRTI4NkY3QjlFQTU2MDBDQjQwIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjU2QTNDRjUwQjQyMjExRTI4NkY3QjlFQTU2MDBDQjQwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+poqUzgAAAG1JREFUeNpilC5YwIADqLNgEWQG4kYg9mNCk1AE4sNAXA3iIEuGAPF5ILaECYAkeYB4DhCvBmJ+ZGNAkt+B+CkQ/0W3nAkqWA/EblBFKJIwsA+IDYF4BzZJEHgNxJ5AXAbEv1hwBEA3EK8BCDAAwgoRW2zTv6EAAAAASUVORK5CYII=) no-repeat;
+  background-position: 206px 16px;
+  font-family: 'marquette-medium', 'Helvetica Neue', Helvetica, Arial, sans-serif;
+  border-bottom: 1px solid #eee;
+  text-shadow: none;
+  -webkit-font-smoothing: antialiased;
+
+}
+
+.sidebar-nav .nav-list li.option ul {
+  list-style: none;
+  /*margin-right: -15px;*/
+  /*margin-left: -15px;*/
+}
+
+.new-tag {
+  border-radius: 3px;
+  display: inline-block;
+  font-family: "marquette-medium";
+  font-size: .6em;
+  background-color: rgba(26, 26, 26, 0.50);
+  color: #fff;
+  padding: 3px;
+  height: 8px;
+  line-height: 8px;
+  position: absolute;
+  right: 5px;
+  top: 13px;
+}
+
+.sidebar-nav .nav-list li:active a {
+  background-color: rgba(255,255,255,.5);
+}
+
+/*---------------------------- org overview*/
+
+
+
+/*---------------------------- setup sdk*/
+.app-creds dt {
+  font-family: "marquette-medium"
+}
+
+.intro-container {
+  position:relative;
+  height: auto;
+  -webkit-transition: all .5s ease-out;
+  -moz-transition: all .5s ease-out;
+  transition: all .5s ease-out;
+  overflow: hidden;
+}
+
+.sdk-intro {
+  position: absolute;
+  border:1px solid #aaa;
+  background-color: #f4f4f4;
+  -moz-box-shadow:    inset 0 0 10px #ccc;
+  -webkit-box-shadow: inset 0 0 10px #ccc;
+  box-shadow:         inset 0 4px 10px #ccc;
+  opacity: .4;
+  top:0;
+  left:6px;
+  right:1px;
+  bottom:0;
+  height: auto;
+  overflow:hidden;
+}
+
+.sdk-intro-content {
+  position: absolute;
+  padding: 10px 40px 10px 10px;
+  top:0;
+  left:6px;
+  right:-20px;
+  bottom:0;
+  height: auto;
+  overflow: auto;
+}
+
+.sdk-intro-content .btn.normal {
+   margin: 19px 10px 0 0;
+}
+
+.keys-creds h2 {
+  margin-bottom: -2px;
+}
+
+
+/*---------------------------- user pages */
+
+
+
+.user-list {
+  padding: 0;
+  margin: 0;
+  list-style: none;
+  min-height: 450px;
+  float:left;
+  width:100%;
+}
+
+.user-list li {
+  padding: 10px;
+  border-bottom: 1px solid #c5c5c5;
+  cursor:pointer;
+}
+
+.user-list li .label {
+  margin: 0 0 0 22px;
+}
+
+.user-list li:nth-child(2n){
+  /*background-color: #f7f7f7;*/
+}
+
+.user-list li input{
+  margin: 0 10px 0 0;
+}
+
+.user-list li.selected {
+  background-color: #eee;
+}
+
+#user-panel{
+  margin-top: 20px;
+}
+
+.user-col {
+  border-right: 1px solid #c5c5c5;
+  -moz-box-shadow:    inset -27px 1px 6px -27px #b8b8b8;
+  -webkit-box-shadow: inset -27px 1px 6px -27px #b8b8b8;
+  box-shadow:         inset -27px 1px 6px -27px #b8b8b8;
+}
+
+.user-profile-picture{
+  width:40px;
+  height:40px;
+}
+
+.content-page > .well {
+  padding: 10px;
+  height: 40px;
+}
+.table-header td {
+  font-weight: 800;
+  color: black;
+}
+
+.user-header-title{
+  font-size: 13px;
+  font-family: 'marquette-regular', 'Helvetica Neue', Helvetica, Arial, sans-serif;
+}
+
+.tabbable > .tab-content {
+  overflow: visible;
+}
+
+.button-strip {
+  float: right;
+  margin-bottom: 10px;
+}
+a.notifications-links {
+  color: #1b97d1;
+}
+.notifications-header{
+  height: 50px; background-color: #eee; padding: 10px; border-bottom: 1px solid #aaa; position:relative; overflow: hidden;
+}
+
+.users-row td.details,
+.groups-row td.details,
+.roles-row td.details,
+.notifications-row td.details {
+  line-height: 25px !important;
+  border-right: 1px solid #e5e5e5;
+}
+.nav-tabs > li {
+  cursor: pointer;
+}
+
+/*------------------------------- login page*/
+
+.login-content {
+  position: absolute;
+  top: 91px;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  background-color: #fff;
+  padding: 9% 0 0 32%;
+}
+
+.login-content form {
+  margin: 0;
+}
+
+.login-content form h1 {
+  padding: 10px 0 5px 20px;
+}
+
+.login-holder {
+  width: 450px;
+  border: 1px solid #e5e5e5;
+}
+
+.login-holder .form-actions {
+    padding-left: 30px;
+   margin-bottom: 0;
+}
+
+.login-holder .form-actions .submit {
+  padding: 0 30px 0 0;
+}
+
+.login-content .extra-actions {
+    margin-top:10px;
+    padding-left: 30px;
+    margin-bottom: 0;
+}
+
+.login-content .extra-actions .submit {
+    padding: 0 30px 0 0;
+}
+.login-content .extra-actions .submit a {
+    margin-left:3px;
+    margin-right:3px;
+}
+
+.signUp-content {
+    position: absolute;
+    top: 91px;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    background-color: #fff;
+    padding: 9% 0 0 32%;
+}
+
+.signUp-content form {
+    margin: 0;
+}
+
+.signUp-content form h1 {
+    padding: 10px 0 5px 20px;
+}
+
+.signUp-holder {
+    width: 450px;
+    border: 1px solid #e5e5e5;
+}
+
+.signUp-holder .form-actions {
+    margin-bottom: 0;
+}
+
+.signUp-holder .form-actions .submit {
+    padding: 0 30px 0 0;
+}
+
+
+/*-------------------------------- data / collections page*/
+
+.table.collection-list {
+  border: 1px solid #eee;
+  /*min-height: 500px;*/
+}
+
+.formatted-json,
+.formatted-json ul {
+  list-style: none;
+}
+
+.formatted-json .key {
+  font-family: "marquette-medium";
+
+}
+
+.formatted-json li {
+  border-bottom: 1px solid #eee;
+  margin: 3px 0 3px 0;
+}
+
+/*---------------------------- media queries
+/* Large desktop */
+/*@media (min-width: 1200px) {*/
+
+/*}*/
+
+/* Portrait tablet to landscape and desktop */
+/*@media (min-width: 768px) and (max-width: 979px) {*/
+  /*.main-content {*/
+    /*margin: 0;*/
+  /*}*/
+
+  /*.container-fluid {*/
+    /*padding: 0;*/
+  /*}*/
+/*}*/
+
+/* Landscape phone to portrait tablet */
+/*@media (max-width: 767px) {*/
+
+/*}*/
+
+/* Landscape phones and down */
+/*@media (max-width: 480px) {*/
+
+/*}*/
+
+/*@media (min-width: 768px) and (max-width: 979px), (max-width: 480px), (max-width: 767px) {*/
+
+  /*.side-menu {*/
+    /*position: absolute;*/
+    /*top: 51px;*/
+    /*left: -200px;*/
+  /*}*/
+
+  /*.side-menu .nav-collapse .nav.nav-list {*/
+      /*position: absolute;*/
+      /*top: 51px;*/
+      /*left: -200px;*/
+  /*}*/
+
+  /*.side-menu .nav-collapse.in .nav.nav-list {*/
+    /*position: absolute;*/
+    /*top: 51px;*/
+    /*left: 200px;*/
+  /*}*/
+
+  /*.side-menu .nav-collapse.collapse {*/
+    /*overflow: visible;*/
+  /*}*/
+
+  /*.main-content {*/
+    /*margin: 0;*/
+    /*border: none;*/
+  /*}*/
+
+  /*.side-menu ul.nav li {*/
+    /*display: inline-block;*/
+  /*}*/
+
+  /*.navbar.secondary,*/
+  /*.navbar-static-top,*/
+  /*.navbar.secondary > .container-fluid {*/
+    /*margin: 0;*/
+  /*}*/
+
+  /*.page-filters {*/
+    /*padding: 10px 0 0 0;*/
+  /*}*/
+
+  /*ul.info-details.fixed {*/
+    /*width: 100%;*/
+  /*}*/
+
+  /*.navbar .nav a.btn-create,*/
+  /*.navbar .nav a.btn-create:hover {*/
+    /*margin: 5px;*/
+  /*}*/
+
+  /*.navbar.secondary > .container-fluid {*/
+    /*border: none*/
+  /*}*/
+/*}*/
+
+/*------------------------ USERGRID OVERRIDES and styles*/
+
+iframe[seamless] {
+  background-color: transparent;
+  border: 0px none transparent;
+  padding: 0px;
+  overflow: visible;
+  overflow-x: hidden;
+  width: 100%;
+  /*min-height: 1500px;*/
+}
+
+.gravatar20 {
+    padding: 7px 0 0 10px !important;
+    margin: 0px;
+    width: 30px;
+}
+
+#shell-panel * {
+    font-family: monospace;
+}
+#shell-panel .boxContent {
+    font-family: monospace;
+    font-size: 14px;
+    min-height: 400px;
+}
+#shell-panel input {
+    font-family: monospace;
+    overflow: auto;
+    width: 90%;
+    margin-top:10px;
+}
+#shell-panel hr {
+    margin: 2px;
+    border-color: #e1e1e1;
+}
+
+form input.has-error{
+  -webkit-animation: pulse-red 1s alternate infinite;
+  -moz-animation: pulse-red 1s alternate infinite;
+  /*color: rgba(255, 67, 0, 1);*/
+  border: 1px solid rgba(255, 3, 3, 0.60);
+}
+
+.validator-error-message{
+  /*background-color: rgba(255, 3, 3, 0.20);*/
+  color: rgb(255, 3, 3);
+}
+
+
+
+@-webkit-keyframes pulse-red {
+  0% {
+    box-shadow: inset 0px 0px 5px 2px rgba(255, 3, 3, 0.1),
+    0px 0px 5px 2px rgba(255, 3, 3, 0.3);
+  }
+  100% {
+    box-shadow: inset 0px 0px 5px 2px rgba(255, 3, 3, 0.3),
+    0px 0px 5px 2px rgba(255, 3, 3, .1);
+  }
+}
+
+@-moz-keyframes pulse-red {
+  0% {
+    box-shadow: inset 0px 0px 5px 2px rgba(255, 3, 3, 0.1),
+    0px 0px 5px 2px rgba(255, 3, 3, .3);
+  }
+  100% {
+    box-shadow: inset 0px 0px 5px 2px rgba(255, 3, 3, 0.3),
+    0px 0px 5px 2px rgba(255, 3, 3, .1);
+  }
+}
+
+.modal-instructions{
+    padding-top:5px;
+    padding-bottom:5px;
+}
+
+.dropdown-menu{
+    width:100%;
+}
+
+.modal{
+    width:560px !important;
+}
+.dropdown-backdrop {
+    position: static;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/prettify.css
----------------------------------------------------------------------
diff --git a/portal/css/prettify.css b/portal/css/prettify.css
deleted file mode 100644
index 400fd74..0000000
--- a/portal/css/prettify.css
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Pretty printing styles. Used with prettify.js. */
-
-/* SPAN elements with the classes below are added by prettyprint. */
-.pln { color: #000 }  /* plain text */
-
-@media screen {
-  .str { color: #080 }  /* string content */
-  .kwd { color: #008 }  /* a keyword */
-  .com { color: #800 }  /* a comment */
-  .typ { color: #606 }  /* a type name */
-  .lit { color: #066 }  /* a literal value */
-  /* punctuation, lisp open bracket, lisp close bracket */
-  .pun, .opn, .clo { color: #660 }
-  .tag { color: #008 }  /* a markup tag name */
-  .atn { color: #606 }  /* a markup attribute name */
-  .atv { color: #080 }  /* a markup attribute value */
-  .dec, .var { color: #606 }  /* a declaration; a variable name */
-  .fun { color: red }  /* a function name */
-}
-
-/* Use higher contrast and text-weight for printable form. */
-@media print, projection {
-  .str { color: #060 }
-  .kwd { color: #006; font-weight: bold }
-  .com { color: #600; font-style: italic }
-  .typ { color: #404; font-weight: bold }
-  .lit { color: #044 }
-  .pun, .opn, .clo { color: #440 }
-  .tag { color: #006; font-weight: bold }
-  .atn { color: #404 }
-  .atv { color: #060 }
-}
-
-/* Put a border around prettyprinted code snippets. */
-pre.prettyprint { padding: 2px; border: 1px solid #888 }
-
-/* Specify class=linenums on a pre to get line numbering */
-ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */
-li.L0,
-li.L1,
-li.L2,
-li.L3,
-li.L5,
-li.L6,
-li.L7,
-li.L8 { list-style-type: none }
-/* Alternate shading for lines */
-li.L1,
-li.L3,
-li.L5,
-li.L7,
-li.L9 { background: #eee }


[20/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular-animate.min.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular-animate.min.js b/portal/js/libs/angular-1.2.5/angular-animate.min.js
new file mode 100755
index 0000000..b808b8b
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular-animate.min.js
@@ -0,0 +1,23 @@
+/*
+ AngularJS v1.2.5
+ (c) 2010-2014 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(C,k,F){'use strict';k.module("ngAnimate",["ng"]).config(["$provide","$animateProvider",function(M,G){function l(l){for(var h=0;h<l.length;h++){var m=l[h];if(m.nodeType==T)return m}}var s=k.noop,m=k.forEach,N=G.$$selectors,T=1,h="$$ngAnimateState",J="ng-animate",g={running:!0};M.decorator("$animate",["$delegate","$injector","$sniffer","$rootElement","$timeout","$rootScope","$document",function(H,C,I,n,t,q,F){function O(a){if(a){var c=[],e={};a=a.substr(1).split(".");(I.transitions||I.animations)&&
+a.push("");for(var f=0;f<a.length;f++){var b=a[f],l=N[b];l&&!e[b]&&(c.push(C.get(l)),e[b]=!0)}return c}}function p(a,c,e,f,b,g,q){function x(a){v();if(!0===a)w();else{if(a=e.data(h))a.done=w,e.data(h,a);p(y,"after",w)}}function p(f,b,l){var h=b+"End";m(f,function(m,g){var d=function(){a:{var d=b+"Complete",a=f[g];a[d]=!0;(a[h]||s)();for(a=0;a<f.length;a++)if(!f[a][d])break a;l()}};"before"!=b||"enter"!=a&&"move"!=a?m[b]?m[h]=z?m[b](e,c,d):m[b](e,d):d():d()})}function n(){q&&t(q,0,!1)}function v(){v.hasBeenRun||
+(v.hasBeenRun=!0,g())}function w(){if(!w.hasBeenRun){w.hasBeenRun=!0;var a=e.data(h);a&&(z?A(e):(a.closeAnimationTimeout=t(function(){A(e)},0,!1),e.data(h,a)));n()}}var u=l(e);if(u){var u=u.className,k=(" "+(u+" "+c)).replace(/\s+/g,".");f||(f=b?b.parent():e.parent());var k=O(k),z="addClass"==a||"removeClass"==a;b=e.data(h)||{};if(K(e,f)||0===k.length)v(),w();else{var y=[];b.running&&z&&b.structural||m(k,function(b){if(!b.allowCancel||b.allowCancel(e,a,c)){var f=b[a];"leave"==a?(b=f,f=null):b=b["before"+
+a.charAt(0).toUpperCase()+a.substr(1)];y.push({before:b,after:f})}});0===y.length?(v(),n()):(f=" "+u+" ",b.running&&(t.cancel(b.closeAnimationTimeout),A(e),L(b.animations),b.beforeComplete?(b.done||s)(!0):z&&!b.structural&&(f="removeClass"==b.event?f.replace(b.className,""):f+b.className+" ")),u=" "+c+" ","addClass"==a&&0<=f.indexOf(u)||"removeClass"==a&&-1==f.indexOf(u)?(v(),n()):(e.addClass(J),e.data(h,{running:!0,event:a,className:c,structural:!z,animations:y,done:x}),p(y,"before",x)))}}else v(),
+w()}function E(a){a=l(a);m(a.querySelectorAll("."+J),function(a){a=k.element(a);var e=a.data(h);e&&(L(e.animations),A(a))})}function L(a){m(a,function(c){a.beforeComplete||(c.beforeEnd||s)(!0);a.afterComplete||(c.afterEnd||s)(!0)})}function A(a){l(a)==l(n)?g.disabled||(g.running=!1,g.structural=!1):(a.removeClass(J),a.removeData(h))}function K(a,c){if(g.disabled)return!0;if(l(a)==l(n))return g.disabled||g.running;do{if(0===c.length)break;var e=l(c)==l(n),f=e?g:c.data(h),f=f&&(!!f.disabled||!!f.running);
+if(e||f)return f;if(e)break}while(c=c.parent());return!0}n.data(h,g);q.$$postDigest(function(){q.$$postDigest(function(){g.running=!1})});return{enter:function(a,c,e,f){this.enabled(!1,a);H.enter(a,c,e);q.$$postDigest(function(){p("enter","ng-enter",a,c,e,s,f)})},leave:function(a,c){E(a);this.enabled(!1,a);q.$$postDigest(function(){p("leave","ng-leave",a,null,null,function(){H.leave(a)},c)})},move:function(a,c,e,f){E(a);this.enabled(!1,a);H.move(a,c,e);q.$$postDigest(function(){p("move","ng-move",
+a,c,e,s,f)})},addClass:function(a,c,e){p("addClass",c,a,null,null,function(){H.addClass(a,c)},e)},removeClass:function(a,c,e){p("removeClass",c,a,null,null,function(){H.removeClass(a,c)},e)},enabled:function(a,c){switch(arguments.length){case 2:if(a)A(c);else{var e=c.data(h)||{};e.disabled=!0;c.data(h,e)}break;case 1:g.disabled=!a;break;default:a=!g.disabled}return!!a}}}]);G.register("",["$window","$sniffer","$timeout",function(h,g,I){function n(d){R.push(d);I.cancel(S);S=I(function(){m(R,function(d){d()});
+R=[];S=null;D={}},10,!1)}function t(d,a){var b=a?D[a]:null;if(!b){var e=0,c=0,f=0,l=0,g,k,n,p;m(d,function(d){if(d.nodeType==T){d=h.getComputedStyle(d)||{};n=d[B+G];e=Math.max(q(n),e);p=d[B+v];g=d[B+w];c=Math.max(q(g),c);k=d[x+w];l=Math.max(q(k),l);var a=q(d[x+G]);0<a&&(a*=parseInt(d[x+u],10)||1);f=Math.max(a,f)}});b={total:0,transitionPropertyStyle:p,transitionDurationStyle:n,transitionDelayStyle:g,transitionDelay:c,transitionDuration:e,animationDelayStyle:k,animationDelay:l,animationDuration:f};
+a&&(D[a]=b)}return b}function q(d){var a=0;d=k.isString(d)?d.split(/\s*,\s*/):[];m(d,function(d){a=Math.max(parseFloat(d)||0,a)});return a}function J(d){var a=d.parent(),b=a.data(V);b||(a.data(V,++U),b=U);return b+"-"+l(d).className}function O(d,a){var b=J(d),e=b+" "+a,c={},f=D[e]?++D[e].total:0;if(0<f){var h=a+"-stagger",c=b+" "+h;(b=!D[c])&&d.addClass(h);c=t(d,c);b&&d.removeClass(h)}d.addClass(a);e=t(d,e);h=Math.max(e.transitionDuration,e.animationDuration);if(0===h)return d.removeClass(a),!1;var g=
+"";0<e.transitionDuration?(d.addClass(y),g+=M+" ",l(d).style[B+v]="none"):l(d).style[x]="none 0s";m(a.split(" "),function(d,a){g+=(0<a?" ":"")+d+"-active"});d.data(z,{className:a,activeClassName:g,maxDuration:h,classes:a+" "+g,timings:e,stagger:c,ii:f});return!0}function p(d){var a=B+v;d=l(d);d.style[a]&&0<d.style[a].length&&(d.style[a]="")}function E(d){var a=x;d=l(d);d.style[a]&&0<d.style[a].length&&(d.style[a]="")}function L(a,c,f){function h(a){a.stopPropagation();var d=a.originalEvent||a;a=d.$manualTimeStamp||
+d.timeStamp||Date.now();d=parseFloat(d.elapsedTime.toFixed(N));Math.max(a-x,0)>=v&&d>=p&&f()}var r=a.data(z),m=l(a);if(-1!=m.className.indexOf(c)&&r){var k=r.timings,n=r.stagger,p=r.maxDuration,q=r.activeClassName,v=1E3*Math.max(k.transitionDelay,k.animationDelay),x=Date.now(),w=Q+" "+P,u=r.ii,y,r="",s=[];if(0<k.transitionDuration){var t=k.transitionPropertyStyle;-1==t.indexOf("all")&&(y=!0,r+=b+"transition-property: "+t+", "+(g.msie?"-ms-zoom":"border-spacing")+"; ",r+=b+"transition-duration: "+
+k.transitionDurationStyle+", "+k.transitionDuration+"s; ",s.push(b+"transition-property"),s.push(b+"transition-duration"))}0<u&&(0<n.transitionDelay&&0===n.transitionDuration&&(t=k.transitionDelayStyle,y&&(t+=", "+k.transitionDelay+"s"),r+=b+"transition-delay: "+A(t,n.transitionDelay,u)+"; ",s.push(b+"transition-delay")),0<n.animationDelay&&0===n.animationDuration&&(r+=b+"animation-delay: "+A(k.animationDelayStyle,n.animationDelay,u)+"; ",s.push(b+"animation-delay")));0<s.length&&(k=m.getAttribute("style")||
+"",m.setAttribute("style",k+" "+r));a.on(w,h);a.addClass(q);return function(b){a.off(w,h);a.removeClass(q);e(a,c);b=l(a);for(var f in s)b.style.removeProperty(s[f])}}f()}function A(a,b,e){var c="";m(a.split(","),function(a,d){c+=(0<d?",":"")+(e*b+parseInt(a,10))+"s"});return c}function K(a,b){if(O(a,b))return function(c){c&&e(a,b)}}function a(a,b,c){if(a.data(z))return L(a,b,c);e(a,b);c()}function c(d,b,c){var e=K(d,b);if(e){var f=e;n(function(){p(d);E(d);f=a(d,b,c)});return function(a){(f||s)(a)}}c()}
+function e(a,b){a.removeClass(b);a.removeClass(y);a.removeData(z)}function f(a,b){var c="";a=k.isArray(a)?a:a.split(/\s+/);m(a,function(a,d){a&&0<a.length&&(c+=(0<d?" ":"")+a+b)});return c}var b="",B,P,x,Q;C.ontransitionend===F&&C.onwebkittransitionend!==F?(b="-webkit-",B="WebkitTransition",P="webkitTransitionEnd transitionend"):(B="transition",P="transitionend");C.onanimationend===F&&C.onwebkitanimationend!==F?(b="-webkit-",x="WebkitAnimation",Q="webkitAnimationEnd animationend"):(x="animation",
+Q="animationend");var G="Duration",v="Property",w="Delay",u="IterationCount",V="$$ngAnimateKey",z="$$ngAnimateCSS3Data",y="ng-animate-start",M="ng-animate-active",N=3,D={},U=0,R=[],S;return{allowCancel:function(a,b,c){var e=(a.data(z)||{}).classes;if(!e||0<=["enter","leave","move"].indexOf(b))return!0;var h=a.parent(),g=k.element(l(a).cloneNode());g.attr("style","position:absolute; top:-9999px; left:-9999px");g.removeAttr("id");g.empty();m(e.split(" "),function(a){g.removeClass(a)});g.addClass(f(c,
+"addClass"==b?"-add":"-remove"));h.append(g);a=t(g);g.remove();return 0<Math.max(a.transitionDuration,a.animationDuration)},enter:function(a,b){return c(a,"ng-enter",b)},leave:function(a,b){return c(a,"ng-leave",b)},move:function(a,b){return c(a,"ng-move",b)},beforeAddClass:function(a,b,c){if(b=K(a,f(b,"-add")))return n(function(){p(a);E(a);c()}),b;c()},addClass:function(b,c,e){return a(b,f(c,"-add"),e)},beforeRemoveClass:function(a,b,c){if(b=K(a,f(b,"-remove")))return n(function(){p(a);E(a);c()}),
+b;c()},removeClass:function(b,c,e){return a(b,f(c,"-remove"),e)}}}])}])})(window,window.angular);
+//# sourceMappingURL=angular-animate.min.js.map

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular-animate.min.js.map
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular-animate.min.js.map b/portal/js/libs/angular-1.2.5/angular-animate.min.js.map
new file mode 100755
index 0000000..65c6d6a
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular-animate.min.js.map
@@ -0,0 +1,8 @@
+{
+"version":3,
+"file":"angular-animate.min.js",
+"lineCount":22,
+"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CA2OtCD,CAAAE,OAAA,CAAe,WAAf,CAA4B,CAAC,IAAD,CAA5B,CAAAC,OAAA,CAgBU,CAAC,UAAD,CAAa,kBAAb,CAAiC,QAAQ,CAACC,CAAD,CAAWC,CAAX,CAA6B,CAU5EC,QAASA,EAAkB,CAACC,CAAD,CAAU,CACnC,IAAI,IAAIC,EAAI,CAAZ,CAAeA,CAAf,CAAmBD,CAAAE,OAAnB,CAAmCD,CAAA,EAAnC,CAAwC,CACtC,IAAIE,EAAMH,CAAA,CAAQC,CAAR,CACV,IAAGE,CAAAC,SAAH,EAAmBC,CAAnB,CACE,MAAOF,EAH6B,CADL,CATrC,IAAIG,EAAOb,CAAAa,KAAX,CACIC,EAAUd,CAAAc,QADd,CAEIC,EAAYV,CAAAW,YAFhB,CAIIJ,EAAe,CAJnB,CAKIK,EAAmB,kBALvB,CAMIC,EAAwB,YAN5B,CAOIC,EAAmB,SAAU,CAAA,CAAV,CAevBf,EAAAgB,UAAA,CAAmB,UAAnB,CAA+B,CAAC,WAAD,CAAc,WAAd,CAA2B,UAA3B,CAAuC,cAAvC,CAAuD,UAAvD,CAAmE,YAAnE,CAAiF,WAAjF,CACP,QAAQ,CAACC,CAAD,CAAcC,CAAd,CAA2BC,CAA3B,CAAuCC,CAAvC,CAAuDC,CAAvD,CAAmEC,CAAnE,CAAiFC,CAAjF,CAA4F,CAgB1HC,QAASA,EAAM,CAACC,CAAD,CAAO,CACpB,GAAIA,CAAJ,CAAU,CAAA,IACJC,EAAU,EADN,CAEJC,EAAU,EACVC,EAAAA,CAAUH,CAAAI,OAAA,CAAY,CAAZ,CAAAC,MAAA,CAAqB,GAArB,CAOd,EAAIX,CAAAY,YAAJ,EAA4BZ,CAAAa,WAA5B;AACEJ,CAAAK,KAAA,CAAa,EA
 Ab,CAGF,KAAI,IAAI7B,EAAE,CAAV,CAAaA,CAAb,CAAiBwB,CAAAvB,OAAjB,CAAiCD,CAAA,EAAjC,CAAsC,CAAA,IAChC8B,EAAQN,CAAA,CAAQxB,CAAR,CADwB,CAEhC+B,EAAsBxB,CAAA,CAAUuB,CAAV,CACvBC,EAAH,EAA2B,CAAAR,CAAA,CAAQO,CAAR,CAA3B,GACER,CAAAO,KAAA,CAAaf,CAAAkB,IAAA,CAAcD,CAAd,CAAb,CACA,CAAAR,CAAA,CAAQO,CAAR,CAAA,CAAiB,CAAA,CAFnB,CAHoC,CAQtC,MAAOR,EAtBC,CADU,CAwRtBW,QAASA,EAAgB,CAACC,CAAD,CAAiBC,CAAjB,CAA4BpC,CAA5B,CAAqCqC,CAArC,CAAoDC,CAApD,CAAkEC,CAAlE,CAAgFC,CAAhF,CAA8F,CA0HrHC,QAASA,EAA0B,CAACC,CAAD,CAAY,CAC7CC,CAAA,EACA,IAAiB,CAAA,CAAjB,GAAGD,CAAH,CACEE,CAAA,EADF,KAAA,CASA,GADIC,CACJ,CADW7C,CAAA6C,KAAA,CAAanC,CAAb,CACX,CACEmC,CAAAC,KACA,CADYF,CACZ,CAAA5C,CAAA6C,KAAA,CAAanC,CAAb,CAA+BmC,CAA/B,CAEFE,EAAA,CAA6BlB,CAA7B,CAAyC,OAAzC,CAAkDe,CAAlD,CAbA,CAF6C,CAkB/CG,QAASA,EAA4B,CAAClB,CAAD,CAAamB,CAAb,CAAoBC,CAApB,CAA6C,CAChF,IAAIC,EAAYF,CAAZE,CAAoB,KACxB3C,EAAA,CAAQsB,CAAR,CAAoB,QAAQ,CAACsB,CAAD,CAAYC,CAAZ,CAAmB,CAC7C,IAAIC,EAA0BA,QAAQ,EAAG,CAoBX,CAAA,CAAA,CAC9B,IAAIC,EApBcN,CAoBdM,CAA8B,UAAlC,CACIC,EAAmB1B,
 CAAA,CArBZuB,CAqBY,CACvBG,EAAA,CAAiBD,CAAjB,CAAA,CAAwC,CAAA,CACvC,EAAAC,CAAA,CAAiBL,CAAjB,CAAA,EAA+B5C,CAA/B,GAED,KAAQL,CAAR,CAAU,CAAV,CAAYA,CAAZ,CAAc4B,CAAA3B,OAAd,CAAgCD,CAAA,EAAhC,CACE,GAAG,CAAC4B,CAAA,CAAW5B,CAAX,CAAA,CAAcqD,CAAd,CAAJ,CAAwC,MAAA,CAG1CL,EAAA,EAV8B,CApBW,CAM7B,SAAZ,EAAGD,CAAH,EAA2C,OAA3C,EAAyBb,CAAzB,EAAwE,MAAxE,EAAsDA,CAAtD,CAKGgB,CAAA,CAAUH,CAAV,CAAH,CACEG,CAAA,CAAUD,CAAV,CADF,CACyBM,CAAA,CACrBL,CAAA,CAAUH,CAAV,CAAA,CAAiBhD,CAAjB,CAA0BoC,CAA1B,CAAqCiB,CAArC,CADqB,CAErBF,CAAA,CAAUH,CAAV,CAAA,CAAiBhD,CAAjB,CAA0BqD,CAA1B,CAHJ,CAKEA,CAAA,EAVF,CACEA,CAAA,EAR2C,CAA/C,CAFgF,CAqClFI,QAASA,EAAqB,EAAG,CAC/BjB,CAAA,EAAgBtB,CAAA,CAASsB,CAAT,CAAuB,CAAvB,CAA0B,CAAA,CAA1B,CADe,CAMjCG,QAASA,EAAgB,EAAG,CACtBA,CAAAe,WAAJ;CACEf,CAAAe,WACA,CAD8B,CAAA,CAC9B,CAAAnB,CAAA,EAFF,CAD0B,CAO5BK,QAASA,EAAc,EAAG,CACxB,GAAG,CAACA,CAAAc,WAAJ,CAA+B,CAC7Bd,CAAAc,WAAA,CAA4B,CAAA,CAC5B,KAAIb,EAAO7C,CAAA6C,KAAA,CAAanC,CAAb,CACRmC,EAAH,GAKKW,CAAH,CACEG,CAAA,CAAQ3D,CAAR,CADF,EAGE6C,CAAAe,sBAGA,CAH6B1C
 ,CAAA,CAAS,QAAQ,EAAG,CAC/CyC,CAAA,CAAQ3D,CAAR,CAD+C,CAApB,CAE1B,CAF0B,CAEvB,CAAA,CAFuB,CAG7B,CAAAA,CAAA6C,KAAA,CAAanC,CAAb,CAA+BmC,CAA/B,CANF,CALF,CAcAY,EAAA,EAjB6B,CADP,CA7L1B,IAAII,EAAO9D,CAAA,CAAmBC,CAAnB,CAGX,IAAI6D,CAAJ,CAAA,CAMIC,IAAAA,EAAmBD,CAAAzB,UAAnB0B,CAEAC,EAAmBC,CAAA,GAAAA,EADTF,CACSE,CADU,GACVA,CADgB5B,CAChB4B,UAAA,CAAuB,MAAvB,CAA8B,GAA9B,CAClB3B,EAAL,GACEA,CADF,CACkBC,CAAA,CAAeA,CAAA2B,OAAA,EAAf,CAAuCjE,CAAAiE,OAAA,EADzD,CAII1C,KAAAA,EAAUF,CAAA,CAAO0C,CAAP,CAAVxC,CACAiC,EAAiC,UAAjCA,EAAerB,CAAfqB,EAAiE,aAAjEA,EAA+CrB,CAC/C+B,EAAAA,CAAiBlE,CAAA6C,KAAA,CAAanC,CAAb,CAAjBwD,EAAmD,EAMvD,IAAIC,CAAA,CAAmBnE,CAAnB,CAA4BqC,CAA5B,CAAJ,EAAqE,CAArE,GAAkDd,CAAArB,OAAlD,CACEyC,CAAA,EACA,CAAAC,CAAA,EAFF,KAAA,CAMA,IAAIf,EAAa,EAGbqC,EAAAE,QAAJ,EAAgCZ,CAAhC,EAAgDU,CAAAG,WAAhD,EACE9D,CAAA,CAAQgB,CAAR,CAAiB,QAAQ,CAAC4B,CAAD,CAAY,CAEnC,GAAG,CAACA,CAAAmB,YAAJ,EAA6BnB,CAAAmB,YAAA,CAAsBtE,CAAtB,CAA+BmC,CAA/B,CAA+CC,CAA/C,CAA7B,CAAwF,CACtF,IAAcmC,EAAUpB,CAAA,CAAUhB,CAAV,CAIH,QAArB,EAAGA,CAAH
 ,EACEqC,CACA,CADWD,CACX,CAAAA,CAAA,CAAU,IAFZ,EAIEC,CAJF,CAIarB,CAAA,CAAU,QAAV;AAAqBhB,CAAAsC,OAAA,CAAsB,CAAtB,CAAAC,YAAA,EAArB,CAA8DvC,CAAAT,OAAA,CAAsB,CAAtB,CAA9D,CAEbG,EAAAC,KAAA,CAAgB,QACL0C,CADK,OAEND,CAFM,CAAhB,CAXsF,CAFrD,CAArC,CAuBuB,EAAzB,GAAG1C,CAAA3B,OAAH,EACEyC,CAAA,EACA,CAAAc,CAAA,EAFF,GASIkB,CA+BJ,CA/BsB,GA+BtB,CA/B4Bb,CA+B5B,CA/B+C,GA+B/C,CA9BGI,CAAAE,QA8BH,GA3BElD,CAAA0D,OAAA,CAAgBV,CAAAN,sBAAhB,CAOA,CANAD,CAAA,CAAQ3D,CAAR,CAMA,CALA6E,CAAA,CAAiBX,CAAArC,WAAjB,CAKA,CAAGqC,CAAAY,eAAH,CACG,CAAAZ,CAAApB,KAAA,EAAuBxC,CAAvB,EAA6B,CAAA,CAA7B,CADH,CAEUkD,CAFV,EAE2Ba,CAAAH,CAAAG,WAF3B,GASEM,CATF,CAS4C,aAAxB,EAAAT,CAAAa,MAAA,CAChBJ,CAAAX,QAAA,CAAwBE,CAAA9B,UAAxB,CAAkD,EAAlD,CADgB,CAEhBuC,CAFgB,CAEET,CAAA9B,UAFF,CAE6B,GAXjD,CAoBF,EADI4C,CACJ,CADqB,GACrB,CAD2B5C,CAC3B,CADuC,GACvC,CAAsB,UAAtB,EAAID,CAAJ,EAAkF,CAAlF,EAAuCwC,CAAAM,QAAA,CAAwBD,CAAxB,CAAvC,EACsB,aADtB,EACI7C,CADJ,EACmF,EADnF,EACuCwC,CAAAM,QAAA,CAAwBD,CAAxB,CADvC,EAEErC,CAAA,EACA,CAAAc,CAAA,EAHF,GASAzD,CAAAkF,SAAA,CAAi
 BvE,CAAjB,CAaA,CAXAX,CAAA6C,KAAA,CAAanC,CAAb,CAA+B,SACrB,CAAA,CADqB,OAEvByB,CAFuB,WAGnBC,CAHmB,YAIlB,CAACoB,CAJiB,YAKlB3B,CALkB,MAMxBY,CANwB,CAA/B,CAWA,CAAAM,CAAA,CAA6BlB,CAA7B,CAAyC,QAAzC,CAAmDY,CAAnD,CAtBA,CAxCA,CAjCA,CArBA,CAAA,IACEE,EAAA,EACA;AAAAC,CAAA,EANmH,CAqNvHuC,QAASA,EAAqB,CAACnF,CAAD,CAAU,CAClC6D,CAAAA,CAAO9D,CAAA,CAAmBC,CAAnB,CACXO,EAAA,CAAQsD,CAAAuB,iBAAA,CAAsB,GAAtB,CAA4BzE,CAA5B,CAAR,CAA4D,QAAQ,CAACX,CAAD,CAAU,CAC5EA,CAAA,CAAUP,CAAAO,QAAA,CAAgBA,CAAhB,CACV,KAAI6C,EAAO7C,CAAA6C,KAAA,CAAanC,CAAb,CACRmC,EAAH,GACEgC,CAAA,CAAiBhC,CAAAhB,WAAjB,CACA,CAAA8B,CAAA,CAAQ3D,CAAR,CAFF,CAH4E,CAA9E,CAFsC,CAYxC6E,QAASA,EAAgB,CAAChD,CAAD,CAAa,CAEpCtB,CAAA,CAAQsB,CAAR,CAAoB,QAAQ,CAACsB,CAAD,CAAY,CAClCtB,CAAAiD,eAAJ,EACG,CAAA3B,CAAAkC,UAAA,EAAuB/E,CAAvB,EAHiBgF,CAAAA,CAGjB,CAECzD,EAAA0D,cAAJ,EACG,CAAApC,CAAAqC,SAAA,EAAsBlF,CAAtB,EANiBgF,CAAAA,CAMjB,CALmC,CAAxC,CAFoC,CAYtC3B,QAASA,EAAO,CAAC3D,CAAD,CAAU,CAzhBnBD,CAAA,CA0hBgBC,CA1hBhB,CA0hBL,EA1hBiCD,CAAA,CA0hBHkB,CA1hBG,CA0hBjC,CACML,CAAA
 6E,SADN,GAEI7E,CAAAwD,QACA,CAD2B,CAAA,CAC3B,CAAAxD,CAAAyD,WAAA,CAA8B,CAAA,CAHlC,GAMErE,CAAA0F,YAAA,CAAoB/E,CAApB,CACA,CAAAX,CAAA2F,WAAA,CAAmBjF,CAAnB,CAPF,CADwB,CAY1ByD,QAASA,EAAkB,CAACnE,CAAD,CAAUqC,CAAV,CAAyB,CAClD,GAAIzB,CAAA6E,SAAJ,CAA+B,MAAO,CAAA,CAEtC,IAxiBK1F,CAAA,CAwiBgBC,CAxiBhB,CAwiBL,EAxiBiCD,CAAA,CAwiBHkB,CAxiBG,CAwiBjC,CACE,MAAOL,EAAA6E,SAAP,EAAoC7E,CAAAwD,QAGtC,GAAG,CAID,GAA4B,CAA5B,GAAG/B,CAAAnC,OAAH,CAA+B,KAE/B,KAAI0F,EAljBD7F,CAAA,CAkjB4BsC,CAljB5B,CAkjBCuD,EAljB2B7F,CAAA,CAkjBekB,CAljBf,CAkjB/B,CACI4E,EAAQD,CAAA,CAAShF,CAAT,CAA4ByB,CAAAQ,KAAA,CAAmBnC,CAAnB,CADxC,CAEIoF,EAASD,CAATC,GAAmB,CAAC,CAACD,CAAAJ,SAArBK,EAAuC,CAAC,CAACD,CAAAzB,QAAzC0B,CACJ;GAAGF,CAAH,EAAaE,CAAb,CACE,MAAOA,EAGT,IAAGF,CAAH,CAAW,KAbV,CAAH,MAeMvD,CAfN,CAesBA,CAAA4B,OAAA,EAftB,CAiBA,OAAO,CAAA,CAxB2C,CA/hBpDhD,CAAA4B,KAAA,CAAkBnC,CAAlB,CAAoCE,CAApC,CAQAO,EAAA4E,aAAA,CAAwB,QAAQ,EAAG,CACjC5E,CAAA4E,aAAA,CAAwB,QAAQ,EAAG,CACjCnF,CAAAwD,QAAA,CAA2B,CAAA,CADM,CAAnC,CADiC,CAAnC,CAoDA,OAAO,OA+BG4B,QAAQ,CAA
 ChG,CAAD,CAAUqC,CAAV,CAAyBC,CAAzB,CAAuCE,CAAvC,CAAqD,CACnE,IAAAyD,QAAA,CAAa,CAAA,CAAb,CAAoBjG,CAApB,CACAc,EAAAkF,MAAA,CAAgBhG,CAAhB,CAAyBqC,CAAzB,CAAwCC,CAAxC,CACAnB,EAAA4E,aAAA,CAAwB,QAAQ,EAAG,CACjC7D,CAAA,CAAiB,OAAjB,CAA0B,UAA1B,CAAsClC,CAAtC,CAA+CqC,CAA/C,CAA8DC,CAA9D,CAA4EhC,CAA5E,CAAkFkC,CAAlF,CADiC,CAAnC,CAHmE,CA/BhE,OAmEG0D,QAAQ,CAAClG,CAAD,CAAUwC,CAAV,CAAwB,CACtC2C,CAAA,CAAsBnF,CAAtB,CACA,KAAAiG,QAAA,CAAa,CAAA,CAAb,CAAoBjG,CAApB,CACAmB,EAAA4E,aAAA,CAAwB,QAAQ,EAAG,CACjC7D,CAAA,CAAiB,OAAjB,CAA0B,UAA1B,CAAsClC,CAAtC,CAA+C,IAA/C,CAAqD,IAArD,CAA2D,QAAQ,EAAG,CACpEc,CAAAoF,MAAA,CAAgBlG,CAAhB,CADoE,CAAtE,CAEGwC,CAFH,CADiC,CAAnC,CAHsC,CAnEnC,MA4GE2D,QAAQ,CAACnG,CAAD,CAAUqC,CAAV,CAAyBC,CAAzB,CAAuCE,CAAvC,CAAqD,CAClE2C,CAAA,CAAsBnF,CAAtB,CACA,KAAAiG,QAAA,CAAa,CAAA,CAAb,CAAoBjG,CAApB,CACAc,EAAAqF,KAAA,CAAenG,CAAf,CAAwBqC,CAAxB,CAAuCC,CAAvC,CACAnB,EAAA4E,aAAA,CAAwB,QAAQ,EAAG,CACjC7D,CAAA,CAAiB,MAAjB,CAAyB,SAAzB;AAAoClC,CAApC,CAA6CqC,CAA7C,CAA4DC,CAA5D,CAA0EhC,CAA1E,CAAgFkC,CAAhF,CADiC,CA
 AnC,CAJkE,CA5G/D,UAmJM0C,QAAQ,CAAClF,CAAD,CAAUoC,CAAV,CAAqBI,CAArB,CAAmC,CACpDN,CAAA,CAAiB,UAAjB,CAA6BE,CAA7B,CAAwCpC,CAAxC,CAAiD,IAAjD,CAAuD,IAAvD,CAA6D,QAAQ,EAAG,CACtEc,CAAAoE,SAAA,CAAmBlF,CAAnB,CAA4BoC,CAA5B,CADsE,CAAxE,CAEGI,CAFH,CADoD,CAnJjD,aAuLSkD,QAAQ,CAAC1F,CAAD,CAAUoC,CAAV,CAAqBI,CAArB,CAAmC,CACvDN,CAAA,CAAiB,aAAjB,CAAgCE,CAAhC,CAA2CpC,CAA3C,CAAoD,IAApD,CAA0D,IAA1D,CAAgE,QAAQ,EAAG,CACzEc,CAAA4E,YAAA,CAAsB1F,CAAtB,CAA+BoC,CAA/B,CADyE,CAA3E,CAEGI,CAFH,CADuD,CAvLpD,SA2MKyD,QAAQ,CAACG,CAAD,CAAQpG,CAAR,CAAiB,CACjC,OAAOqG,SAAAnG,OAAP,EACE,KAAK,CAAL,CACE,GAAGkG,CAAH,CACEzC,CAAA,CAAQ3D,CAAR,CADF,KAEO,CACL,IAAI6C,EAAO7C,CAAA6C,KAAA,CAAanC,CAAb,CAAPmC,EAAyC,EAC7CA,EAAA4C,SAAA,CAAgB,CAAA,CAChBzF,EAAA6C,KAAA,CAAanC,CAAb,CAA+BmC,CAA/B,CAHK,CAKT,KAEA,MAAK,CAAL,CACEjC,CAAA6E,SAAA,CAA4B,CAACW,CAC/B,MAEA,SACEA,CAAA,CAAQ,CAACxF,CAAA6E,SAhBb,CAmBA,MAAO,CAAC,CAACW,CApBwB,CA3M9B,CA9DmH,CAD7F,CAA/B,CA8jBAtG,EAAAwG,SAAA,CAA0B,EAA1B,CAA8B,CAAC,SAAD,CAAY,UAAZ,CAAwB,UAAxB,CAAoC,QAAQ,CAACC,CAAD,CAAU
 vF,CAAV,CAAoBE,CAApB,CAA8B,CA4CtGsF,QAASA,EAAW,CAACC,CAAD,CAAW,CAC7BC,CAAA5E,KAAA,CAA0B2E,CAA1B,CACAvF,EAAA0D,OAAA,CAAgB+B,CAAhB,CACAA,EAAA,CAAiBzF,CAAA,CAAS,QAAQ,EAAG,CACnCX,CAAA,CAAQmG,CAAR,CAA8B,QAAQ,CAACE,CAAD,CAAK,CACzCA,CAAA,EADyC,CAA3C,CAGAF;CAAA,CAAuB,EACvBC,EAAA,CAAiB,IACjBE,EAAA,CAAc,EANqB,CAApB,CAOd,EAPc,CAOV,CAAA,CAPU,CAHY,CAa/BC,QAASA,EAA0B,CAAC9G,CAAD,CAAU+G,CAAV,CAAoB,CACrD,IAAIlE,EAAOkE,CAAA,CAAWF,CAAA,CAAYE,CAAZ,CAAX,CAAmC,IAC9C,IAAG,CAAClE,CAAJ,CAAU,CACR,IAAImE,EAAqB,CAAzB,CACIC,EAAkB,CADtB,CAEIC,EAAoB,CAFxB,CAGIC,EAAiB,CAHrB,CAIIC,CAJJ,CAKIC,CALJ,CAMIC,CANJ,CAOIC,CAGJhH,EAAA,CAAQP,CAAR,CAAiB,QAAQ,CAACA,CAAD,CAAU,CACjC,GAAIA,CAAAI,SAAJ,EAAwBC,CAAxB,CAAsC,CAChCmH,CAAAA,CAAgBjB,CAAAkB,iBAAA,CAAyBzH,CAAzB,CAAhBwH,EAAqD,EAEzDF,EAAA,CAA0BE,CAAA,CAAcE,CAAd,CAAgCC,CAAhC,CAE1BX,EAAA,CAAqBY,IAAAC,IAAA,CAASC,CAAA,CAAaR,CAAb,CAAT,CAAgDN,CAAhD,CAErBO,EAAA,CAA0BC,CAAA,CAAcE,CAAd,CAAgCK,CAAhC,CAE1BX,EAAA,CAAuBI,CAAA,CAAcE,CAAd,CAAgCM,CAAhC,CAEvBf,EAAA,CAAmBW,IAAAC,IAAA,CAASC,CAA
 A,CAAaV,CAAb,CAAT,CAA6CH,CAA7C,CAEnBI,EAAA,CAAsBG,CAAA,CAAcS,CAAd,CAA+BD,CAA/B,CAEtBb,EAAA,CAAmBS,IAAAC,IAAA,CAASC,CAAA,CAAaT,CAAb,CAAT,CAA4CF,CAA5C,CAEnB,KAAIe,EAAaJ,CAAA,CAAaN,CAAA,CAAcS,CAAd,CAA+BN,CAA/B,CAAb,CAEF,EAAf,CAAGO,CAAH,GACEA,CADF,EACeC,QAAA,CAASX,CAAA,CAAcS,CAAd,CAA+BG,CAA/B,CAAT,CAAwE,EAAxE,CADf,EAC8F,CAD9F,CAIAlB,EAAA,CAAoBU,IAAAC,IAAA,CAASK,CAAT,CAAoBhB,CAApB,CAvBgB,CADL,CAAnC,CA2BArE,EAAA,CAAO,OACG,CADH,yBAEoB0E,CAFpB,yBAGoBD,CAHpB,sBAIiBF,CAJjB,iBAKYH,CALZ,oBAMeD,CANf,qBAOgBK,CAPhB,gBAQWF,CARX,mBAScD,CATd,CAWJH;CAAH,GACEF,CAAA,CAAYE,CAAZ,CADF,CAC0BlE,CAD1B,CAjDQ,CAqDV,MAAOA,EAvD8C,CA0DvDiF,QAASA,EAAY,CAACO,CAAD,CAAM,CACzB,IAAIC,EAAW,CACXC,EAAAA,CAAS9I,CAAA+I,SAAA,CAAiBH,CAAjB,CAAA,CACXA,CAAA1G,MAAA,CAAU,SAAV,CADW,CAEX,EACFpB,EAAA,CAAQgI,CAAR,CAAgB,QAAQ,CAACnC,CAAD,CAAQ,CAC9BkC,CAAA,CAAWV,IAAAC,IAAA,CAASY,UAAA,CAAWrC,CAAX,CAAT,EAA8B,CAA9B,CAAiCkC,CAAjC,CADmB,CAAhC,CAGA,OAAOA,EARkB,CAW3BI,QAASA,EAAW,CAAC1I,CAAD,CAAU,CAC5B,IAAIqC,EAAgBrC,CAAAiE,OAAA,EAApB,CACI0E,EAAW
 tG,CAAAQ,KAAA,CAAmB+F,CAAnB,CACXD,EAAJ,GACEtG,CAAAQ,KAAA,CAAmB+F,CAAnB,CAA0C,EAAEC,CAA5C,CACA,CAAAF,CAAA,CAAWE,CAFb,CAIA,OAAOF,EAAP,CAAkB,GAAlB,CAAwB5I,CAAA,CAAmBC,CAAnB,CAAAoC,UAPI,CAU9B0G,QAASA,EAAY,CAAC9I,CAAD,CAAUoC,CAAV,CAAqB,CACxC,IAAI2E,EAAW2B,CAAA,CAAY1I,CAAZ,CAAf,CACI+I,EAAgBhC,CAAhBgC,CAA2B,GAA3BA,CAAiC3G,CADrC,CAEI4G,EAAU,EAFd,CAGIC,EAAKpC,CAAA,CAAYkC,CAAZ,CAAA,CAA6B,EAAElC,CAAA,CAAYkC,CAAZ,CAAAG,MAA/B,CAAkE,CAE3E,IAAQ,CAAR,CAAGD,CAAH,CAAW,CACT,IAAIE,EAAmB/G,CAAnB+G,CAA+B,UAAnC,CACIC,EAAkBrC,CAAlBqC,CAA6B,GAA7BA,CAAmCD,CAGvC,EAFIE,CAEJ,CAFmB,CAACxC,CAAA,CAAYuC,CAAZ,CAEpB,GAAgBpJ,CAAAkF,SAAA,CAAiBiE,CAAjB,CAEhBH,EAAA,CAAUlC,CAAA,CAA2B9G,CAA3B,CAAoCoJ,CAApC,CAEVC,EAAA,EAAgBrJ,CAAA0F,YAAA,CAAoByD,CAApB,CATP,CAYXnJ,CAAAkF,SAAA,CAAiB9C,CAAjB,CAEIkH,EAAAA,CAAUxC,CAAA,CAA2B9G,CAA3B,CAAoC+I,CAApC,CAMVQ,EAAAA,CAAc3B,IAAAC,IAAA,CAASyB,CAAAtC,mBAAT,CAAqCsC,CAAApC,kBAArC,CAClB,IAAmB,CAAnB,GAAGqC,CAAH,CAEE,MADAvJ,EAAA0F,YAAA,CAAoBtD,CAApB,CACO,CAAA,CAAA,CAKT,KAAIoH;AAAkB,EACU,EAAhC,CA
 AGF,CAAAtC,mBAAH,EACEhH,CAAAkF,SAAA,CAAiBuE,CAAjB,CAyBF,CAxBED,CAwBF,EAxBqBE,CAwBrB,CAxB6D,GAwB7D,CAAA3J,CAAA,CAvBmBC,CAuBnB,CAAA2J,MAAA,CAAkCjC,CAAlC,CAAoDK,CAApD,CAAA,CAAoE,MA1BpE,EA8BAhI,CAAA,CAzB0BC,CAyB1B,CAAA2J,MAAA,CAAkC1B,CAAlC,CA9BA,CA8BoD,SAtBpD1H,EAAA,CAAQ6B,CAAAT,MAAA,CAAgB,GAAhB,CAAR,CAA8B,QAAQ,CAACI,CAAD,CAAQ9B,CAAR,CAAW,CAC/CuJ,CAAA,GAAwB,CAAJ,CAAAvJ,CAAA,CAAQ,GAAR,CAAc,EAAlC,EAAwC8B,CAAxC,CAAgD,SADD,CAAjD,CAIA/B,EAAA6C,KAAA,CAAa+G,CAAb,CAAsC,WACxBxH,CADwB,iBAElBoH,CAFkB,aAGtBD,CAHsB,SAI1BnH,CAJ0B,CAId,GAJc,CAIRoH,CAJQ,SAK1BF,CAL0B,SAM1BN,CAN0B,IAO/BC,CAP+B,CAAtC,CAUA,OAAO,CAAA,CAzDiC,CAoE1CY,QAASA,EAAkB,CAAC7J,CAAD,CAAU,CACnC,IAAI8J,EAAOpC,CAAPoC,CAAyB/B,CACzBlE,EAAAA,CAAO9D,CAAA,CAAmBC,CAAnB,CACR6D,EAAA8F,MAAA,CAAWG,CAAX,CAAH,EAAiD,CAAjD,CAAuBjG,CAAA8F,MAAA,CAAWG,CAAX,CAAA5J,OAAvB,GACE2D,CAAA8F,MAAA,CAAWG,CAAX,CADF,CACqB,EADrB,CAHmC,CAQrCC,QAASA,EAAyB,CAAC/J,CAAD,CAAU,CAC1C,IAAI8J,EAAO7B,CACPpE,EAAAA,CAAO9D,CAAA,CAAmBC,CAAnB,CACR6D,EAAA8F,MAAA,CAAWG,CAAX,CAAH,EAAiD,
 CAAjD,CAAuBjG,CAAA8F,MAAA,CAAWG,CAAX,CAAA5J,OAAvB,GACE2D,CAAA8F,MAAA,CAAWG,CAAX,CADF,CACqB,EADrB,CAH0C,CAQ5CE,QAASA,EAAU,CAAChK,CAAD,CAAUoC,CAAV,CAAqB6H,CAArB,CAA8C,CAyE/DC,QAASA,EAAmB,CAACnF,CAAD,CAAQ,CAClCA,CAAAoF,gBAAA,EACA,KAAIC,EAAKrF,CAAAsF,cAALD,EAA4BrF,CAC5BuF,EAAAA,CAAYF,CAAAG,iBAAZD;AAAmCF,CAAAE,UAAnCA,EAAmDE,IAAAC,IAAA,EAInDC,EAAAA,CAAcjC,UAAA,CAAW2B,CAAAM,YAAAC,QAAA,CAAuBC,CAAvB,CAAX,CASfhD,KAAAC,IAAA,CAASyC,CAAT,CAAqBO,CAArB,CAAgC,CAAhC,CAAH,EAAyCC,CAAzC,EAAyDJ,CAAzD,EAAwEnB,CAAxE,EACEU,CAAA,EAjBgC,CAxEpC,IAAIpH,EAAO7C,CAAA6C,KAAA,CAAa+G,CAAb,CAAX,CACI/F,EAAO9D,CAAA,CAAmBC,CAAnB,CACX,IAAyC,EAAzC,EAAG6D,CAAAzB,UAAA6C,QAAA,CAAuB7C,CAAvB,CAAH,EAA+CS,CAA/C,CAAA,CAKA,IAAIyG,EAAUzG,CAAAyG,QAAd,CACIN,EAAUnG,CAAAmG,QADd,CAEIO,EAAc1G,CAAA0G,YAFlB,CAGIC,EAAkB3G,CAAA2G,gBAHtB,CAIIsB,EAA2E,GAA3EA,CAAelD,IAAAC,IAAA,CAASyB,CAAArC,gBAAT,CAAkCqC,CAAAnC,eAAlC,CAJnB,CAKI0D,EAAYL,IAAAC,IAAA,EALhB,CAMIM,EAAsBC,CAAtBD,CAA2C,GAA3CA,CAAiDE,CANrD,CAOIhC,EAAKpG,CAAAoG,GAPT,CASIiC,CATJ,CASwBvB,E
 AAQ,EAThC,CASoCwB,EAAgB,EACpD,IAAgC,CAAhC,CAAG7B,CAAAtC,mBAAH,CAAmC,CACjC,IAAIoE,EAAgB9B,CAAA/B,wBACgB,GAApC,EAAG6D,CAAAnG,QAAA,CAAsB,KAAtB,CAAH,GACEiG,CAKA,CALqB,CAAA,CAKrB,CAHAvB,CAGA,EAHS0B,CAGT,CAHsB,uBAGtB,CAHgDD,CAGhD,CAHgE,IAGhE,EAJuBpK,CAAAsK,KAAAC,CAAgB,UAAhBA,CAA6B,gBAIpD,EAH0F,IAG1F,CAFA5B,CAEA,EAFS0B,CAET,CAFsB,uBAEtB;AAFgD/B,CAAAhC,wBAEhD,CAFkF,IAElF,CAFyFgC,CAAAtC,mBAEzF,CAFsH,KAEtH,CADAmE,CAAArJ,KAAA,CAAmBuJ,CAAnB,CAAgC,qBAAhC,CACA,CAAAF,CAAArJ,KAAA,CAAmBuJ,CAAnB,CAAgC,qBAAhC,CANF,CAFiC,CAY3B,CAAR,CAAGpC,CAAH,GAC+B,CAW7B,CAXGD,CAAA/B,gBAWH,EAXiE,CAWjE,GAXkC+B,CAAAhC,mBAWlC,GAVMwE,CAOJ,CAPiBlC,CAAAlC,qBAOjB,CANG8D,CAMH,GALEM,CAKF,EALgB,IAKhB,CALuBlC,CAAArC,gBAKvB,CALiD,GAKjD,EAFA0C,CAEA,EAFS0B,CAET,CAFsB,oBAEtB,CADSI,CAAA,CAAoBD,CAApB,CAAgCxC,CAAA/B,gBAAhC,CAAyDgC,CAAzD,CACT,CADwE,IACxE,CAAAkC,CAAArJ,KAAA,CAAmBuJ,CAAnB,CAAgC,kBAAhC,CAGF,EAA4B,CAA5B,CAAGrC,CAAA7B,eAAH,EAA+D,CAA/D,GAAiC6B,CAAA9B,kBAAjC,GACEyC,CAEA,EAFS0B,CAET,CAFsB,mBAEtB,CADSI,CAAA,CAAoBnC,CAAAjC,oBAApB
 ,CAAiD2B,CAAA7B,eAAjD,CAAyE8B,CAAzE,CACT,CADwF,IACxF,CAAAkC,CAAArJ,KAAA,CAAmBuJ,CAAnB,CAAgC,iBAAhC,CAHF,CAZF,CAmB0B,EAA1B,CAAGF,CAAAjL,OAAH,GAIMwL,CACJ,CADe7H,CAAA8H,aAAA,CAAkB,OAAlB,CACf;AAD6C,EAC7C,CAAA9H,CAAA+H,aAAA,CAAkB,OAAlB,CAA2BF,CAA3B,CAAsC,GAAtC,CAA4C/B,CAA5C,CALF,CAQA3J,EAAA6L,GAAA,CAAWd,CAAX,CAAgCb,CAAhC,CACAlK,EAAAkF,SAAA,CAAiBsE,CAAjB,CAKA,OAAOsC,SAAc,CAACpJ,CAAD,CAAY,CAC/B1C,CAAA+L,IAAA,CAAYhB,CAAZ,CAAiCb,CAAjC,CACAlK,EAAA0F,YAAA,CAAoB8D,CAApB,CACAwC,EAAA,CAAahM,CAAb,CAAsBoC,CAAtB,CACIyB,EAAAA,CAAO9D,CAAA,CAAmBC,CAAnB,CACX,KAAKC,IAAIA,CAAT,GAAckL,EAAd,CACEtH,CAAA8F,MAAAsC,eAAA,CAA0Bd,CAAA,CAAclL,CAAd,CAA1B,CAN6B,CA5DjC,CACEgK,CAAA,EAJ6D,CA+FjEwB,QAASA,EAAmB,CAACD,CAAD,CAAaU,CAAb,CAA2B9I,CAA3B,CAAkC,CAC5D,IAAIuG,EAAQ,EACZpJ,EAAA,CAAQiL,CAAA7J,MAAA,CAAiB,GAAjB,CAAR,CAA+B,QAAQ,CAACwK,CAAD,CAAMlM,CAAN,CAAS,CAC9C0J,CAAA,GAAc,CAAJ,CAAA1J,CAAA,CAAQ,GAAR,CAAc,EAAxB,GACUmD,CADV,CACkB8I,CADlB,CACiC/D,QAAA,CAASgE,CAAT,CAAc,EAAd,CADjC,EACsD,GAFR,CAAhD,CAIA,OAAOxC,EANqD,CAS9DyC,QA
 ASA,EAAa,CAACpM,CAAD,CAAUoC,CAAV,CAAqB,CACzC,GAAG0G,CAAA,CAAa9I,CAAb,CAAsBoC,CAAtB,CAAH,CACE,MAAO,SAAQ,CAACM,CAAD,CAAY,CACzBA,CAAA,EAAasJ,CAAA,CAAahM,CAAb,CAAsBoC,CAAtB,CADY,CAFY,CAQ3CiK,QAASA,EAAY,CAACrM,CAAD,CAAUoC,CAAV,CAAqBkK,CAArB,CAA6C,CAChE,GAAGtM,CAAA6C,KAAA,CAAa+G,CAAb,CAAH,CACE,MAAOI,EAAA,CAAWhK,CAAX,CAAoBoC,CAApB,CAA+BkK,CAA/B,CAEPN,EAAA,CAAahM,CAAb,CAAsBoC,CAAtB,CACAkK,EAAA,EAL8D,CASlEC,QAASA,EAAO,CAACvM,CAAD,CAAUoC,CAAV,CAAqBoK,CAArB,CAAwC,CAItD,IAAIC,EAAwBL,CAAA,CAAcpM,CAAd,CAAuBoC,CAAvB,CAC5B,IAAIqK,CAAJ,CAAA,CAUA,IAAI7H,EAAS6H,CACbjG,EAAA,CAAY,QAAQ,EAAG,CACrBqD,CAAA,CAAmB7J,CAAnB,CACA+J,EAAA,CAA0B/J,CAA1B,CAIA4E,EAAA,CAASyH,CAAA,CAAarM,CAAb,CAAsBoC,CAAtB,CAAiCoK,CAAjC,CANY,CAAvB,CASA,OAAO,SAAQ,CAAC9J,CAAD,CAAY,CACxB,CAAAkC,CAAA,EAAUtE,CAAV,EAAgBoC,CAAhB,CADwB,CApB3B,CACE8J,CAAA,EANoD,CArV8C;AAmXtGR,QAASA,EAAY,CAAChM,CAAD,CAAUoC,CAAV,CAAqB,CACxCpC,CAAA0F,YAAA,CAAoBtD,CAApB,CACApC,EAAA0F,YAAA,CAAoB+D,CAApB,CACAzJ,EAAA2F,WAAA,CAAmBiE,CAAnB,CAHwC,CAoF1C8C,QAASA,EAAa,CAAC
 jL,CAAD,CAAUkL,CAAV,CAAkB,CACtC,IAAIvK,EAAY,EAChBX,EAAA,CAAUhC,CAAAmN,QAAA,CAAgBnL,CAAhB,CAAA,CAA2BA,CAA3B,CAAqCA,CAAAE,MAAA,CAAc,KAAd,CAC/CpB,EAAA,CAAQkB,CAAR,CAAiB,QAAQ,CAACM,CAAD,CAAQ9B,CAAR,CAAW,CAC/B8B,CAAH,EAA2B,CAA3B,CAAYA,CAAA7B,OAAZ,GACEkC,CADF,GACoB,CAAJ,CAAAnC,CAAA,CAAQ,GAAR,CAAc,EAD9B,EACoC8B,CADpC,CAC4C4K,CAD5C,CADkC,CAApC,CAKA,OAAOvK,EAR+B,CAvc8D,IAElGiJ,EAAa,EAFqF,CAEjF3D,CAFiF,CAEhEuD,CAFgE,CAE3ChD,CAF2C,CAE3B+C,CAUvExL,EAAAqN,gBAAJ,GAA+BnN,CAA/B,EAA4CF,CAAAsN,sBAA5C,GAA6EpN,CAA7E,EACE2L,CAEA,CAFa,UAEb,CADA3D,CACA,CADkB,kBAClB,CAAAuD,CAAA,CAAsB,mCAHxB,GAKEvD,CACA,CADkB,YAClB,CAAAuD,CAAA,CAAsB,eANxB,CASIzL,EAAAuN,eAAJ,GAA8BrN,CAA9B,EAA2CF,CAAAwN,qBAA3C,GAA2EtN,CAA3E,EACE2L,CAEA,CAFa,UAEb,CADApD,CACA,CADiB,iBACjB,CAAA+C,CAAA,CAAqB,iCAHvB,GAKE/C,CACA,CADiB,WACjB;AAAA+C,CAAA,CAAqB,cANvB,CASA,KAAIrD,EAAe,UAAnB,CACII,EAAe,UADnB,CAEIC,EAAY,OAFhB,CAGII,EAAgC,gBAHpC,CAIIQ,EAAwB,gBAJ5B,CAKIgB,EAA0B,qBAL9B,CAMIH,EAAiC,kBANrC,CAOIC,EAAwC,mBAP5C,CAQIkB,EAAkC,CARtC,CAUI/D,EAAc,EAV
 lB,CAWIgC,EAAgB,CAXpB,CAaInC,EAAuB,EAb3B,CAa+BC,CA8U/B,OAAO,aACSrC,QAAQ,CAACtE,CAAD,CAAUmC,CAAV,CAA0BC,CAA1B,CAAqC,CAGzD,IAAI6K,EAAcxL,CAAAzB,CAAA6C,KAAA,CAAa+G,CAAb,CAAAnI,EAAyC,EAAzCA,SAClB,IAAG,CAACwL,CAAJ,EAAsE,CAAtE,EAAkB,CAAC,OAAD,CAAS,OAAT,CAAiB,MAAjB,CAAAhI,QAAA,CAAiC9C,CAAjC,CAAlB,CACE,MAAO,CAAA,CAGT,KAAIE,EAAgBrC,CAAAiE,OAAA,EAApB,CACIiJ,EAAQzN,CAAAO,QAAA,CAAgBD,CAAA,CAAmBC,CAAnB,CAAAmN,UAAA,EAAhB,CAGZD,EAAAE,KAAA,CAAW,OAAX,CAAmB,8CAAnB,CACAF,EAAAG,WAAA,CAAiB,IAAjB,CACAH,EAAAI,MAAA,EAEA/M,EAAA,CAAQ0M,CAAAtL,MAAA,CAAiB,GAAjB,CAAR,CAA+B,QAAQ,CAACI,CAAD,CAAQ,CAC7CmL,CAAAxH,YAAA,CAAkB3D,CAAlB,CAD6C,CAA/C,CAKAmL,EAAAhI,SAAA,CAAewH,CAAA,CAActK,CAAd;AADgB,UAAlBuK,EAAAxK,CAAAwK,CAA+B,MAA/BA,CAAwC,SACtC,CAAf,CACAtK,EAAAkL,OAAA,CAAqBL,CAArB,CAEI5D,EAAAA,CAAUxC,CAAA,CAA2BoG,CAA3B,CACdA,EAAAM,OAAA,EAEA,OAAyE,EAAzE,CAAO5F,IAAAC,IAAA,CAASyB,CAAAtC,mBAAT,CAAqCsC,CAAApC,kBAArC,CA3BkD,CADtD,OA+BGlB,QAAQ,CAAChG,CAAD,CAAUyN,CAAV,CAA8B,CAC5C,MAAOlB,EAAA,CAAQvM,CAAR,CAAiB,UAAjB,CAA6ByN,CAA7B,C
 ADqC,CA/BzC,OAmCGvH,QAAQ,CAAClG,CAAD,CAAUyN,CAAV,CAA8B,CAC5C,MAAOlB,EAAA,CAAQvM,CAAR,CAAiB,UAAjB,CAA6ByN,CAA7B,CADqC,CAnCzC,MAuCEtH,QAAQ,CAACnG,CAAD,CAAUyN,CAAV,CAA8B,CAC3C,MAAOlB,EAAA,CAAQvM,CAAR,CAAiB,SAAjB,CAA4ByN,CAA5B,CADoC,CAvCxC,gBA2CYC,QAAQ,CAAC1N,CAAD,CAAUoC,CAAV,CAAqBqL,CAArB,CAAyC,CAEhE,GADIE,CACJ,CADyBvB,CAAA,CAAcpM,CAAd,CAAuB0M,CAAA,CAActK,CAAd,CAAyB,MAAzB,CAAvB,CACzB,CAME,MALAoE,EAAA,CAAY,QAAQ,EAAG,CACrBqD,CAAA,CAAmB7J,CAAnB,CACA+J,EAAA,CAA0B/J,CAA1B,CACAyN,EAAA,EAHqB,CAAvB,CAKOE,CAAAA,CAETF,EAAA,EAVgE,CA3C7D,UAwDMvI,QAAQ,CAAClF,CAAD,CAAUoC,CAAV,CAAqBqL,CAArB,CAAyC,CAC1D,MAAOpB,EAAA,CAAarM,CAAb,CAAsB0M,CAAA,CAActK,CAAd,CAAyB,MAAzB,CAAtB,CAAwDqL,CAAxD,CADmD,CAxDvD,mBA4DeG,QAAQ,CAAC5N,CAAD,CAAUoC,CAAV,CAAqBqL,CAArB,CAAyC,CAEnE,GADIE,CACJ,CADyBvB,CAAA,CAAcpM,CAAd,CAAuB0M,CAAA,CAActK,CAAd,CAAyB,SAAzB,CAAvB,CACzB,CAME,MALAoE,EAAA,CAAY,QAAQ,EAAG,CACrBqD,CAAA,CAAmB7J,CAAnB,CACA+J,EAAA,CAA0B/J,CAA1B,CACAyN,EAAA,EAHqB,CAAvB,CAKOE;AAAAA,CAETF,EAAA,EAVmE,CA5DhE,aAyES/H,QAAQ,CAAC1
 F,CAAD,CAAUoC,CAAV,CAAqBqL,CAArB,CAAyC,CAC7D,MAAOpB,EAAA,CAAarM,CAAb,CAAsB0M,CAAA,CAActK,CAAd,CAAyB,SAAzB,CAAtB,CAA2DqL,CAA3D,CADsD,CAzE1D,CAzX+F,CAA1E,CAA9B,CArlB4E,CAAtE,CAhBV,CA3OsC,CAArC,CAAA,CAqyCEjO,MAryCF,CAqyCUA,MAAAC,QAryCV;",
+"sources":["angular-animate.js"],
+"names":["window","angular","undefined","module","config","$provide","$animateProvider","extractElementNode","element","i","length","elm","nodeType","ELEMENT_NODE","noop","forEach","selectors","$$selectors","NG_ANIMATE_STATE","NG_ANIMATE_CLASS_NAME","rootAnimateState","decorator","$delegate","$injector","$sniffer","$rootElement","$timeout","$rootScope","$document","lookup","name","matches","flagMap","classes","substr","split","transitions","animations","push","klass","selectorFactoryName","get","performAnimation","animationEvent","className","parentElement","afterElement","domOperation","doneCallback","onBeforeAnimationsComplete","cancelled","fireDOMOperation","closeAnimation","data","done","invokeRegisteredAnimationFns","phase","allAnimationFnsComplete","endFnName","animation","index","animationPhaseCompleted","phaseCompletionFlag","currentAnimation","isClassBased","fireDoneCallbackAsync","hasBeenRun","cleanup","closeAnimationTimeout","node","currentClassName","animationLookup","re
 place","parent","ngAnimateState","animationsDisabled","running","structural","allowCancel","afterFn","beforeFn","charAt","toUpperCase","futureClassName","cancel","cancelAnimations","beforeComplete","event","classNameToken","indexOf","addClass","cancelChildAnimations","querySelectorAll","beforeEnd","isCancelledFlag","afterComplete","afterEnd","disabled","removeClass","removeData","isRoot","state","result","$$postDigest","enter","enabled","leave","move","value","arguments","register","$window","afterReflow","callback","animationReflowQueue","animationTimer","fn","lookupCache","getElementAnimationDetails","cacheKey","transitionDuration","transitionDelay","animationDuration","animationDelay","transitionDelayStyle","animationDelayStyle","transitionDurationStyle","transitionPropertyStyle","elementStyles","getComputedStyle","TRANSITION_PROP","DURATION_KEY","Math","max","parseMaxTime","PROPERTY_KEY","DELAY_KEY","ANIMATION_PROP","aDuration","parseInt","ANIMATION_ITERATION_COUNT_KEY","str","m
 axValue","values","isString","parseFloat","getCacheKey","parentID","NG_ANIMATE_PARENT_KEY","parentCounter","animateSetup","eventCacheKey","stagger","ii","total","staggerClassName","staggerCacheKey","applyClasses","timings","maxDuration","activeClassName","NG_ANIMATE_FALLBACK_CLASS_NAME","NG_ANIMATE_FALLBACK_ACTIVE_CLASS_NAME","style","NG_ANIMATE_CSS_DATA_KEY","unblockTransitions","prop","unblockKeyframeAnimations","animateRun","activeAnimationComplete","onAnimationProgress","stopPropagation","ev","originalEvent","timeStamp","$manualTimeStamp","Date","now","elapsedTime","toFixed","ELAPSED_TIME_MAX_DECIMAL_PLACES","startTime","maxDelayTime","css3AnimationEvents","ANIMATIONEND_EVENT","TRANSITIONEND_EVENT","applyFallbackStyle","appliedStyles","propertyStyle","CSS_PREFIX","msie","fallbackProperty","delayStyle","prepareStaggerDelay","oldStyle","getAttribute","setAttribute","on","onEnd","off","animateClose","removeProperty","staggerDelay","val","animateBefore","animateAfter","afterAnimatio
 nComplete","animate","animationComplete","preReflowCancellation","suffixClasses","suffix","isArray","ontransitionend","onwebkittransitionend","onanimationend","onwebkitanimationend","oldClasses","clone","cloneNode","attr","removeAttr","empty","append","remove","animationCompleted","beforeAddClass","cancellationMethod","beforeRemoveClass"]
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular-cookies.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular-cookies.js b/portal/js/libs/angular-1.2.5/angular-cookies.js
new file mode 100755
index 0000000..968ffcb
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular-cookies.js
@@ -0,0 +1,202 @@
+/**
+ * @license AngularJS v1.2.5
+ * (c) 2010-2014 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, angular, undefined) {'use strict';
+
+/**
+ * @ngdoc overview
+ * @name ngCookies
+ * @description
+ *
+ * # ngCookies
+ *
+ * The `ngCookies` module provides a convenient wrapper for reading and writing browser cookies. 
+ *
+ * {@installModule cookies}
+ *
+ * <div doc-module-components="ngCookies"></div>
+ *
+ * See {@link ngCookies.$cookies `$cookies`} and
+ * {@link ngCookies.$cookieStore `$cookieStore`} for usage.
+ */
+
+
+angular.module('ngCookies', ['ng']).
+  /**
+   * @ngdoc object
+   * @name ngCookies.$cookies
+   * @requires $browser
+   *
+   * @description
+   * Provides read/write access to browser's cookies.
+   *
+   * Only a simple Object is exposed and by adding or removing properties to/from
+   * this object, new cookies are created/deleted at the end of current $eval.
+   *
+   * Requires the {@link ngCookies `ngCookies`} module to be installed.
+   *
+   * @example
+   <doc:example>
+     <doc:source>
+       <script>
+         function ExampleController($cookies) {
+           // Retrieving a cookie
+           var favoriteCookie = $cookies.myFavorite;
+           // Setting a cookie
+           $cookies.myFavorite = 'oatmeal';
+         }
+       </script>
+     </doc:source>
+   </doc:example>
+   */
+   factory('$cookies', ['$rootScope', '$browser', function ($rootScope, $browser) {
+      var cookies = {},
+          lastCookies = {},
+          lastBrowserCookies,
+          runEval = false,
+          copy = angular.copy,
+          isUndefined = angular.isUndefined;
+
+      //creates a poller fn that copies all cookies from the $browser to service & inits the service
+      $browser.addPollFn(function() {
+        var currentCookies = $browser.cookies();
+        if (lastBrowserCookies != currentCookies) { //relies on browser.cookies() impl
+          lastBrowserCookies = currentCookies;
+          copy(currentCookies, lastCookies);
+          copy(currentCookies, cookies);
+          if (runEval) $rootScope.$apply();
+        }
+      })();
+
+      runEval = true;
+
+      //at the end of each eval, push cookies
+      //TODO: this should happen before the "delayed" watches fire, because if some cookies are not
+      //      strings or browser refuses to store some cookies, we update the model in the push fn.
+      $rootScope.$watch(push);
+
+      return cookies;
+
+
+      /**
+       * Pushes all the cookies from the service to the browser and verifies if all cookies were
+       * stored.
+       */
+      function push() {
+        var name,
+            value,
+            browserCookies,
+            updated;
+
+        //delete any cookies deleted in $cookies
+        for (name in lastCookies) {
+          if (isUndefined(cookies[name])) {
+            $browser.cookies(name, undefined);
+          }
+        }
+
+        //update all cookies updated in $cookies
+        for(name in cookies) {
+          value = cookies[name];
+          if (!angular.isString(value)) {
+            if (angular.isDefined(lastCookies[name])) {
+              cookies[name] = lastCookies[name];
+            } else {
+              delete cookies[name];
+            }
+          } else if (value !== lastCookies[name]) {
+            $browser.cookies(name, value);
+            updated = true;
+          }
+        }
+
+        //verify what was actually stored
+        if (updated){
+          updated = false;
+          browserCookies = $browser.cookies();
+
+          for (name in cookies) {
+            if (cookies[name] !== browserCookies[name]) {
+              //delete or reset all cookies that the browser dropped from $cookies
+              if (isUndefined(browserCookies[name])) {
+                delete cookies[name];
+              } else {
+                cookies[name] = browserCookies[name];
+              }
+              updated = true;
+            }
+          }
+        }
+      }
+    }]).
+
+
+  /**
+   * @ngdoc object
+   * @name ngCookies.$cookieStore
+   * @requires $cookies
+   *
+   * @description
+   * Provides a key-value (string-object) storage, that is backed by session cookies.
+   * Objects put or retrieved from this storage are automatically serialized or
+   * deserialized by angular's toJson/fromJson.
+   *
+   * Requires the {@link ngCookies `ngCookies`} module to be installed.
+   *
+   * @example
+   */
+   factory('$cookieStore', ['$cookies', function($cookies) {
+
+      return {
+        /**
+         * @ngdoc method
+         * @name ngCookies.$cookieStore#get
+         * @methodOf ngCookies.$cookieStore
+         *
+         * @description
+         * Returns the value of given cookie key
+         *
+         * @param {string} key Id to use for lookup.
+         * @returns {Object} Deserialized cookie value.
+         */
+        get: function(key) {
+          var value = $cookies[key];
+          return value ? angular.fromJson(value) : value;
+        },
+
+        /**
+         * @ngdoc method
+         * @name ngCookies.$cookieStore#put
+         * @methodOf ngCookies.$cookieStore
+         *
+         * @description
+         * Sets a value for given cookie key
+         *
+         * @param {string} key Id for the `value`.
+         * @param {Object} value Value to be stored.
+         */
+        put: function(key, value) {
+          $cookies[key] = angular.toJson(value);
+        },
+
+        /**
+         * @ngdoc method
+         * @name ngCookies.$cookieStore#remove
+         * @methodOf ngCookies.$cookieStore
+         *
+         * @description
+         * Remove given cookie
+         *
+         * @param {string} key Id of the key-value pair to delete.
+         */
+        remove: function(key) {
+          delete $cookies[key];
+        }
+      };
+
+    }]);
+
+
+})(window, window.angular);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular-cookies.min.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular-cookies.min.js b/portal/js/libs/angular-1.2.5/angular-cookies.min.js
new file mode 100755
index 0000000..3694c48
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular-cookies.min.js
@@ -0,0 +1,8 @@
+/*
+ AngularJS v1.2.5
+ (c) 2010-2014 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(p,f,n){'use strict';f.module("ngCookies",["ng"]).factory("$cookies",["$rootScope","$browser",function(d,b){var c={},g={},h,k=!1,l=f.copy,m=f.isUndefined;b.addPollFn(function(){var a=b.cookies();h!=a&&(h=a,l(a,g),l(a,c),k&&d.$apply())})();k=!0;d.$watch(function(){var a,e,d;for(a in g)m(c[a])&&b.cookies(a,n);for(a in c)(e=c[a],f.isString(e))?e!==g[a]&&(b.cookies(a,e),d=!0):f.isDefined(g[a])?c[a]=g[a]:delete c[a];if(d)for(a in e=b.cookies(),c)c[a]!==e[a]&&(m(e[a])?delete c[a]:c[a]=e[a])});
+return c}]).factory("$cookieStore",["$cookies",function(d){return{get:function(b){return(b=d[b])?f.fromJson(b):b},put:function(b,c){d[b]=f.toJson(c)},remove:function(b){delete d[b]}}}])})(window,window.angular);
+//# sourceMappingURL=angular-cookies.min.js.map

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular-cookies.min.js.map
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular-cookies.min.js.map b/portal/js/libs/angular-1.2.5/angular-cookies.min.js.map
new file mode 100755
index 0000000..a7fd1e9
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular-cookies.min.js.map
@@ -0,0 +1,8 @@
+{
+"version":3,
+"file":"angular-cookies.min.js",
+"lineCount":7,
+"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CAoBtCD,CAAAE,OAAA,CAAe,WAAf,CAA4B,CAAC,IAAD,CAA5B,CAAAC,QAAA,CA4BW,UA5BX,CA4BuB,CAAC,YAAD,CAAe,UAAf,CAA2B,QAAS,CAACC,CAAD,CAAaC,CAAb,CAAuB,CAAA,IACxEC,EAAU,EAD8D,CAExEC,EAAc,EAF0D,CAGxEC,CAHwE,CAIxEC,EAAU,CAAA,CAJ8D,CAKxEC,EAAOV,CAAAU,KALiE,CAMxEC,EAAcX,CAAAW,YAGlBN,EAAAO,UAAA,CAAmB,QAAQ,EAAG,CAC5B,IAAIC,EAAiBR,CAAAC,QAAA,EACjBE,EAAJ,EAA0BK,CAA1B,GACEL,CAGA,CAHqBK,CAGrB,CAFAH,CAAA,CAAKG,CAAL,CAAqBN,CAArB,CAEA,CADAG,CAAA,CAAKG,CAAL,CAAqBP,CAArB,CACA,CAAIG,CAAJ,EAAaL,CAAAU,OAAA,EAJf,CAF4B,CAA9B,CAAA,EAUAL,EAAA,CAAU,CAAA,CAKVL,EAAAW,OAAA,CASAC,QAAa,EAAG,CAAA,IACVC,CADU,CAEVC,CAFU,CAIVC,CAGJ,KAAKF,CAAL,GAAaV,EAAb,CACMI,CAAA,CAAYL,CAAA,CAAQW,CAAR,CAAZ,CAAJ,EACEZ,CAAAC,QAAA,CAAiBW,CAAjB,CAAuBhB,CAAvB,CAKJ,KAAIgB,CAAJ,GAAYX,EAAZ,CAEE,CADAY,CACK,CADGZ,CAAA,CAAQW,CAAR,CACH,CAAAjB,CAAAoB,SAAA,CAAiBF,CAAjB,CAAL,EAMWA,CANX,GAMqBX,CAAA,CAAYU,CAAZ,CANrB,GAOEZ,CAAAC,QAAA,CAAiBW,CAAjB,CAAuBC,CAAvB,CACA,CAAAC,CAAA,CAAU,CAAA,CARZ,E
 ACMnB,CAAAqB,UAAA,CAAkBd,CAAA,CAAYU,CAAZ,CAAlB,CAAJ,CACEX,CAAA,CAAQW,CAAR,CADF,CACkBV,CAAA,CAAYU,CAAZ,CADlB,CAGE,OAAOX,CAAA,CAAQW,CAAR,CASb,IAAIE,CAAJ,CAIE,IAAKF,CAAL,GAFAK,EAEahB,CAFID,CAAAC,QAAA,EAEJA,CAAAA,CAAb,CACMA,CAAA,CAAQW,CAAR,CAAJ,GAAsBK,CAAA,CAAeL,CAAf,CAAtB,GAEMN,CAAA,CAAYW,CAAA,CAAeL,CAAf,CAAZ,CAAJ,CACE,OAAOX,CAAA,CAAQW,CAAR,CADT,CAGEX,CAAA,CAAQW,CAAR,CAHF,CAGkBK,CAAA,CAAeL,CAAf,CALpB,CAlCU,CAThB,CAEA;MAAOX,EA1BqE,CAA3D,CA5BvB,CAAAH,QAAA,CA4HW,cA5HX,CA4H2B,CAAC,UAAD,CAAa,QAAQ,CAACoB,CAAD,CAAW,CAErD,MAAO,KAYAC,QAAQ,CAACC,CAAD,CAAM,CAEjB,MAAO,CADHP,CACG,CADKK,CAAA,CAASE,CAAT,CACL,EAAQzB,CAAA0B,SAAA,CAAiBR,CAAjB,CAAR,CAAkCA,CAFxB,CAZd,KA4BAS,QAAQ,CAACF,CAAD,CAAMP,CAAN,CAAa,CACxBK,CAAA,CAASE,CAAT,CAAA,CAAgBzB,CAAA4B,OAAA,CAAeV,CAAf,CADQ,CA5BrB,QA0CGW,QAAQ,CAACJ,CAAD,CAAM,CACpB,OAAOF,CAAA,CAASE,CAAT,CADa,CA1CjB,CAF8C,CAAhC,CA5H3B,CApBsC,CAArC,CAAA,CAoME1B,MApMF,CAoMUA,MAAAC,QApMV;",
+"sources":["angular-cookies.js"],
+"names":["window","angular","undefined","module","factory","$rootScope","$browser","cookies","lastCookies","lastBrowserCookies","runEval","copy","isUndefined","addPollFn","currentCookies","$apply","$watch","push","name","value","updated","isString","isDefined","browserCookies","$cookies","get","key","fromJson","put","toJson","remove"]
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular-csp.css
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular-csp.css b/portal/js/libs/angular-1.2.5/angular-csp.css
new file mode 100755
index 0000000..585878e
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular-csp.css
@@ -0,0 +1,24 @@
+/* Include this file in your html if you are using the CSP mode. */
+
+@charset "UTF-8";
+
+[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak],
+.ng-cloak, .x-ng-cloak,
+.ng-hide {
+  display: none !important;
+}
+
+ng\:form {
+  display: block;
+}
+
+/* The styles below ensure that the CSS transition will ALWAYS
+ * animate and close. A nasty bug occurs with CSS transitions where
+ * when the active class isn't set, or if the active class doesn't
+ * contain any styles to transition to, then, if ngAnimate is used,
+ * it will appear as if the webpage is broken due to the forever hanging
+ * animations. The border-spacing (!ie) and zoom (ie) CSS properties are
+ * used below since they trigger a transition without making the browser
+ * animate anything and they're both highly underused CSS properties */
+.ng-animate-start { border-spacing:1px 1px; -ms-zoom:1.0001; }
+.ng-animate-active { border-spacing:0px 0px; -ms-zoom:1; }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular-loader.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular-loader.js b/portal/js/libs/angular-1.2.5/angular-loader.js
new file mode 100755
index 0000000..c98fb04
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular-loader.js
@@ -0,0 +1,410 @@
+/**
+ * @license AngularJS v1.2.5
+ * (c) 2010-2014 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+
+(function() {'use strict';
+
+/**
+ * @description
+ *
+ * This object provides a utility for producing rich Error messages within
+ * Angular. It can be called as follows:
+ *
+ * var exampleMinErr = minErr('example');
+ * throw exampleMinErr('one', 'This {0} is {1}', foo, bar);
+ *
+ * The above creates an instance of minErr in the example namespace. The
+ * resulting error will have a namespaced error code of example.one.  The
+ * resulting error will replace {0} with the value of foo, and {1} with the
+ * value of bar. The object is not restricted in the number of arguments it can
+ * take.
+ *
+ * If fewer arguments are specified than necessary for interpolation, the extra
+ * interpolation markers will be preserved in the final string.
+ *
+ * Since data will be parsed statically during a build step, some restrictions
+ * are applied with respect to how minErr instances are created and called.
+ * Instances should have names of the form namespaceMinErr for a minErr created
+ * using minErr('namespace') . Error codes, namespaces and template strings
+ * should all be static strings, not variables or general expressions.
+ *
+ * @param {string} module The namespace to use for the new minErr instance.
+ * @returns {function(string, string, ...): Error} instance
+ */
+
+function minErr(module) {
+  return function () {
+    var code = arguments[0],
+      prefix = '[' + (module ? module + ':' : '') + code + '] ',
+      template = arguments[1],
+      templateArgs = arguments,
+      stringify = function (obj) {
+        if (typeof obj === 'function') {
+          return obj.toString().replace(/ \{[\s\S]*$/, '');
+        } else if (typeof obj === 'undefined') {
+          return 'undefined';
+        } else if (typeof obj !== 'string') {
+          return JSON.stringify(obj);
+        }
+        return obj;
+      },
+      message, i;
+
+    message = prefix + template.replace(/\{\d+\}/g, function (match) {
+      var index = +match.slice(1, -1), arg;
+
+      if (index + 2 < templateArgs.length) {
+        arg = templateArgs[index + 2];
+        if (typeof arg === 'function') {
+          return arg.toString().replace(/ ?\{[\s\S]*$/, '');
+        } else if (typeof arg === 'undefined') {
+          return 'undefined';
+        } else if (typeof arg !== 'string') {
+          return toJson(arg);
+        }
+        return arg;
+      }
+      return match;
+    });
+
+    message = message + '\nhttp://errors.angularjs.org/1.2.5/' +
+      (module ? module + '/' : '') + code;
+    for (i = 2; i < arguments.length; i++) {
+      message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' +
+        encodeURIComponent(stringify(arguments[i]));
+    }
+
+    return new Error(message);
+  };
+}
+
+/**
+ * @ngdoc interface
+ * @name angular.Module
+ * @description
+ *
+ * Interface for configuring angular {@link angular.module modules}.
+ */
+
+function setupModuleLoader(window) {
+
+  var $injectorMinErr = minErr('$injector');
+  var ngMinErr = minErr('ng');
+
+  function ensure(obj, name, factory) {
+    return obj[name] || (obj[name] = factory());
+  }
+
+  var angular = ensure(window, 'angular', Object);
+
+  // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap
+  angular.$$minErr = angular.$$minErr || minErr;
+
+  return ensure(angular, 'module', function() {
+    /** @type {Object.<string, angular.Module>} */
+    var modules = {};
+
+    /**
+     * @ngdoc function
+     * @name angular.module
+     * @description
+     *
+     * The `angular.module` is a global place for creating, registering and retrieving Angular
+     * modules.
+     * All modules (angular core or 3rd party) that should be available to an application must be
+     * registered using this mechanism.
+     *
+     * When passed two or more arguments, a new module is created.  If passed only one argument, an
+     * existing module (the name passed as the first argument to `module`) is retrieved.
+     *
+     *
+     * # Module
+     *
+     * A module is a collection of services, directives, filters, and configuration information.
+     * `angular.module` is used to configure the {@link AUTO.$injector $injector}.
+     *
+     * <pre>
+     * // Create a new module
+     * var myModule = angular.module('myModule', []);
+     *
+     * // register a new service
+     * myModule.value('appName', 'MyCoolApp');
+     *
+     * // configure existing services inside initialization blocks.
+     * myModule.config(function($locationProvider) {
+     *   // Configure existing providers
+     *   $locationProvider.hashPrefix('!');
+     * });
+     * </pre>
+     *
+     * Then you can create an injector and load your modules like this:
+     *
+     * <pre>
+     * var injector = angular.injector(['ng', 'MyModule'])
+     * </pre>
+     *
+     * However it's more likely that you'll just use
+     * {@link ng.directive:ngApp ngApp} or
+     * {@link angular.bootstrap} to simplify this process for you.
+     *
+     * @param {!string} name The name of the module to create or retrieve.
+     * @param {Array.<string>=} requires If specified then new module is being created. If
+     *        unspecified then the the module is being retrieved for further configuration.
+     * @param {Function} configFn Optional configuration function for the module. Same as
+     *        {@link angular.Module#methods_config Module#config()}.
+     * @returns {module} new module with the {@link angular.Module} api.
+     */
+    return function module(name, requires, configFn) {
+      var assertNotHasOwnProperty = function(name, context) {
+        if (name === 'hasOwnProperty') {
+          throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);
+        }
+      };
+
+      assertNotHasOwnProperty(name, 'module');
+      if (requires && modules.hasOwnProperty(name)) {
+        modules[name] = null;
+      }
+      return ensure(modules, name, function() {
+        if (!requires) {
+          throw $injectorMinErr('nomod', "Module '{0}' is not available! You either misspelled " +
+             "the module name or forgot to load it. If registering a module ensure that you " +
+             "specify the dependencies as the second argument.", name);
+        }
+
+        /** @type {!Array.<Array.<*>>} */
+        var invokeQueue = [];
+
+        /** @type {!Array.<Function>} */
+        var runBlocks = [];
+
+        var config = invokeLater('$injector', 'invoke');
+
+        /** @type {angular.Module} */
+        var moduleInstance = {
+          // Private state
+          _invokeQueue: invokeQueue,
+          _runBlocks: runBlocks,
+
+          /**
+           * @ngdoc property
+           * @name angular.Module#requires
+           * @propertyOf angular.Module
+           * @returns {Array.<string>} List of module names which must be loaded before this module.
+           * @description
+           * Holds the list of modules which the injector will load before the current module is
+           * loaded.
+           */
+          requires: requires,
+
+          /**
+           * @ngdoc property
+           * @name angular.Module#name
+           * @propertyOf angular.Module
+           * @returns {string} Name of the module.
+           * @description
+           */
+          name: name,
+
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#provider
+           * @methodOf angular.Module
+           * @param {string} name service name
+           * @param {Function} providerType Construction function for creating new instance of the
+           *                                service.
+           * @description
+           * See {@link AUTO.$provide#provider $provide.provider()}.
+           */
+          provider: invokeLater('$provide', 'provider'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#factory
+           * @methodOf angular.Module
+           * @param {string} name service name
+           * @param {Function} providerFunction Function for creating new instance of the service.
+           * @description
+           * See {@link AUTO.$provide#factory $provide.factory()}.
+           */
+          factory: invokeLater('$provide', 'factory'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#service
+           * @methodOf angular.Module
+           * @param {string} name service name
+           * @param {Function} constructor A constructor function that will be instantiated.
+           * @description
+           * See {@link AUTO.$provide#service $provide.service()}.
+           */
+          service: invokeLater('$provide', 'service'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#value
+           * @methodOf angular.Module
+           * @param {string} name service name
+           * @param {*} object Service instance object.
+           * @description
+           * See {@link AUTO.$provide#value $provide.value()}.
+           */
+          value: invokeLater('$provide', 'value'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#constant
+           * @methodOf angular.Module
+           * @param {string} name constant name
+           * @param {*} object Constant value.
+           * @description
+           * Because the constant are fixed, they get applied before other provide methods.
+           * See {@link AUTO.$provide#constant $provide.constant()}.
+           */
+          constant: invokeLater('$provide', 'constant', 'unshift'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#animation
+           * @methodOf angular.Module
+           * @param {string} name animation name
+           * @param {Function} animationFactory Factory function for creating new instance of an
+           *                                    animation.
+           * @description
+           *
+           * **NOTE**: animations take effect only if the **ngAnimate** module is loaded.
+           *
+           *
+           * Defines an animation hook that can be later used with
+           * {@link ngAnimate.$animate $animate} service and directives that use this service.
+           *
+           * <pre>
+           * module.animation('.animation-name', function($inject1, $inject2) {
+           *   return {
+           *     eventName : function(element, done) {
+           *       //code to run the animation
+           *       //once complete, then run done()
+           *       return function cancellationFunction(element) {
+           *         //code to cancel the animation
+           *       }
+           *     }
+           *   }
+           * })
+           * </pre>
+           *
+           * See {@link ngAnimate.$animateProvider#register $animateProvider.register()} and
+           * {@link ngAnimate ngAnimate module} for more information.
+           */
+          animation: invokeLater('$animateProvider', 'register'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#filter
+           * @methodOf angular.Module
+           * @param {string} name Filter name.
+           * @param {Function} filterFactory Factory function for creating new instance of filter.
+           * @description
+           * See {@link ng.$filterProvider#register $filterProvider.register()}.
+           */
+          filter: invokeLater('$filterProvider', 'register'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#controller
+           * @methodOf angular.Module
+           * @param {string|Object} name Controller name, or an object map of controllers where the
+           *    keys are the names and the values are the constructors.
+           * @param {Function} constructor Controller constructor function.
+           * @description
+           * See {@link ng.$controllerProvider#register $controllerProvider.register()}.
+           */
+          controller: invokeLater('$controllerProvider', 'register'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#directive
+           * @methodOf angular.Module
+           * @param {string|Object} name Directive name, or an object map of directives where the
+           *    keys are the names and the values are the factories.
+           * @param {Function} directiveFactory Factory function for creating new instance of
+           * directives.
+           * @description
+           * See {@link ng.$compileProvider#methods_directive $compileProvider.directive()}.
+           */
+          directive: invokeLater('$compileProvider', 'directive'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#config
+           * @methodOf angular.Module
+           * @param {Function} configFn Execute this function on module load. Useful for service
+           *    configuration.
+           * @description
+           * Use this method to register work which needs to be performed on module loading.
+           */
+          config: config,
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#run
+           * @methodOf angular.Module
+           * @param {Function} initializationFn Execute this function after injector creation.
+           *    Useful for application initialization.
+           * @description
+           * Use this method to register work which should be performed when the injector is done
+           * loading all modules.
+           */
+          run: function(block) {
+            runBlocks.push(block);
+            return this;
+          }
+        };
+
+        if (configFn) {
+          config(configFn);
+        }
+
+        return  moduleInstance;
+
+        /**
+         * @param {string} provider
+         * @param {string} method
+         * @param {String=} insertMethod
+         * @returns {angular.Module}
+         */
+        function invokeLater(provider, method, insertMethod) {
+          return function() {
+            invokeQueue[insertMethod || 'push']([provider, method, arguments]);
+            return moduleInstance;
+          };
+        }
+      });
+    };
+  });
+
+}
+
+setupModuleLoader(window);
+})(window);
+
+/**
+ * Closure compiler type information
+ *
+ * @typedef { {
+ *   requires: !Array.<string>,
+ *   invokeQueue: !Array.<Array.<*>>,
+ *
+ *   service: function(string, Function):angular.Module,
+ *   factory: function(string, Function):angular.Module,
+ *   value: function(string, *):angular.Module,
+ *
+ *   filter: function(string, Function):angular.Module,
+ *
+ *   init: function(Function):angular.Module
+ * } }
+ */
+angular.Module;
+

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular-loader.min.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular-loader.min.js b/portal/js/libs/angular-1.2.5/angular-loader.min.js
new file mode 100755
index 0000000..d3bb3f7
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular-loader.min.js
@@ -0,0 +1,9 @@
+/*
+ AngularJS v1.2.5
+ (c) 2010-2014 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(){'use strict';function d(a){return function(){var c=arguments[0],b,c="["+(a?a+":":"")+c+"] http://errors.angularjs.org/1.2.5/"+(a?a+"/":"")+c;for(b=1;b<arguments.length;b++)c=c+(1==b?"?":"&")+"p"+(b-1)+"="+encodeURIComponent("function"==typeof arguments[b]?arguments[b].toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof arguments[b]?"undefined":"string"!=typeof arguments[b]?JSON.stringify(arguments[b]):arguments[b]);return Error(c)}}(function(a){var c=d("$injector"),b=d("ng");a=a.angular||
+(a.angular={});a.$$minErr=a.$$minErr||d;return a.module||(a.module=function(){var a={};return function(e,d,f){if("hasOwnProperty"===e)throw b("badname","module");d&&a.hasOwnProperty(e)&&(a[e]=null);return a[e]||(a[e]=function(){function a(c,d,e){return function(){b[e||"push"]([c,d,arguments]);return g}}if(!d)throw c("nomod",e);var b=[],h=[],k=a("$injector","invoke"),g={_invokeQueue:b,_runBlocks:h,requires:d,name:e,provider:a("$provide","provider"),factory:a("$provide","factory"),service:a("$provide",
+"service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),animation:a("$animateProvider","register"),filter:a("$filterProvider","register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:k,run:function(a){h.push(a);return this}};f&&k(f);return g}())}}())})(window)})(window);
+//# sourceMappingURL=angular-loader.min.js.map

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular-loader.min.js.map
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular-loader.min.js.map b/portal/js/libs/angular-1.2.5/angular-loader.min.js.map
new file mode 100755
index 0000000..b395960
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular-loader.min.js.map
@@ -0,0 +1,8 @@
+{
+"version":3,
+"file":"angular-loader.min.js",
+"lineCount":8,
+"mappings":"A;;;;;aAMC,SAAQ,EAAG,CCNZA,QAAS,EAAM,CAAC,CAAD,CAAS,CAWtB,MAAO,SAAS,EAAG,CAAA,IACb,EAAO,SAAA,CAAU,CAAV,CADM,CAIf,CAJe,CAKjB,EAHW,GAGX,EAHkB,CAAA,CAAS,CAAT,CAAkB,GAAlB,CAAwB,EAG1C,EAHgD,CAGhD,CAAmB,sCAAnB,EAA2D,CAAA,CAAS,CAAT,CAAkB,GAAlB,CAAwB,EAAnF,EAAyF,CACzF,KAAK,CAAL,CAAS,CAAT,CAAY,CAAZ,CAAgB,SAAA,OAAhB,CAAkC,CAAA,EAAlC,CACE,CAAA,CAAU,CAAV,EAA0B,CAAL,EAAA,CAAA,CAAS,GAAT,CAAe,GAApC,EAA2C,GAA3C,EAAkD,CAAlD,CAAoD,CAApD,EAAyD,GAAzD,CACE,kBAAA,CAjBc,UAAlB,EAAI,MAiB6B,UAAA,CAAU,CAAV,CAjBjC,CAiBiC,SAAA,CAAU,CAAV,CAhBxB,SAAA,EAAA,QAAA,CAAuB,aAAvB,CAAsC,EAAtC,CADT,CAEyB,WAAlB,EAAI,MAesB,UAAA,CAAU,CAAV,CAf1B,CACE,WADF,CAEoB,QAApB,EAAM,MAaoB,UAAA,CAAU,CAAV,CAb1B,CACE,IAAA,UAAA,CAYwB,SAAA,CAAU,CAAV,CAZxB,CADF,CAa0B,SAAA,CAAU,CAAV,CAA7B,CAEJ,OAAW,MAAJ,CAAU,CAAV,CAVU,CAXG,CD0FxBC,SAA0B,CAACC,CAAD,CAAS,CAEjC,IAAIC,EAAkBH,CAAA,CAAO,WAAP,CAAtB,CACII,EAAWJ,CAAA,CAAO,IAAP,CAMXK,EAAAA,CAAiBH,CAHZ,QAGLG;CAAiBH,CAHE,QAGnBG,CAH+B,EAG/BA,CAGJA,EAAAC,SAAA,CAAmBD,CAAAC,SAAnB,EAAuCN,CAEvC,OAAcK
 ,EARL,OAQT,GAAcA,CARS,OAQvB,CAAiCE,QAAQ,EAAG,CAE1C,IAAIC,EAAU,EAoDd,OAAOC,SAAe,CAACC,CAAD,CAAOC,CAAP,CAAiBC,CAAjB,CAA2B,CAE7C,GAAa,gBAAb,GAKsBF,CALtB,CACE,KAAMN,EAAA,CAAS,SAAT,CAIoBS,QAJpB,CAAN,CAKAF,CAAJ,EAAgBH,CAAAM,eAAA,CAAuBJ,CAAvB,CAAhB,GACEF,CAAA,CAAQE,CAAR,CADF,CACkB,IADlB,CAGA,OAAcF,EAzET,CAyEkBE,CAzElB,CAyEL,GAAcF,CAzEK,CAyEIE,CAzEJ,CAyEnB,CAA6BH,QAAQ,EAAG,CAgNtCQ,QAASA,EAAW,CAACC,CAAD,CAAWC,CAAX,CAAmBC,CAAnB,CAAiC,CACnD,MAAO,SAAQ,EAAG,CAChBC,CAAA,CAAYD,CAAZ,EAA4B,MAA5B,CAAA,CAAoC,CAACF,CAAD,CAAWC,CAAX,CAAmBG,SAAnB,CAApC,CACA,OAAOC,EAFS,CADiC,CA/MrD,GAAI,CAACV,CAAL,CACE,KAAMR,EAAA,CAAgB,OAAhB,CAEiDO,CAFjD,CAAN,CAMF,IAAIS,EAAc,EAAlB,CAGIG,EAAY,EAHhB,CAKIC,EAASR,CAAA,CAAY,WAAZ,CAAyB,QAAzB,CALb,CAQIM,EAAiB,cAELF,CAFK,YAGPG,CAHO,UAcTX,CAdS,MAuBbD,CAvBa,UAoCTK,CAAA,CAAY,UAAZ,CAAwB,UAAxB,CApCS,SA+CVA,CAAA,CAAY,UAAZ,CAAwB,SAAxB,CA/CU,SA0DVA,CAAA,CAAY,UAAZ;AAAwB,SAAxB,CA1DU,OAqEZA,CAAA,CAAY,UAAZ,CAAwB,OAAxB,CArEY,UAiFTA,CAAA,CAAY,UAAZ,CAAwB,UAAxB,CAAoC,SAApC,CAjFS,WAmHRA,CAAA,CAAY,
 kBAAZ,CAAgC,UAAhC,CAnHQ,QA8HXA,CAAA,CAAY,iBAAZ,CAA+B,UAA/B,CA9HW,YA0IPA,CAAA,CAAY,qBAAZ,CAAmC,UAAnC,CA1IO,WAuJRA,CAAA,CAAY,kBAAZ,CAAgC,WAAhC,CAvJQ,QAkKXQ,CAlKW,KA8KdC,QAAQ,CAACC,CAAD,CAAQ,CACnBH,CAAAI,KAAA,CAAeD,CAAf,CACA,OAAO,KAFY,CA9KF,CAoLjBb,EAAJ,EACEW,CAAA,CAAOX,CAAP,CAGF,OAAQS,EAxM8B,CAzET,EAyE/B,CAX+C,CAtDP,CART,EAQnC,CAdiC,CAAnCpB,CA2SA,CAAkBC,MAAlB,CA/XY,CAAX,CAAA,CAgYEA,MAhYF;",
+"sources":["angular-loader.js","MINERR_ASSET"],
+"names":["minErr","setupModuleLoader","window","$injectorMinErr","ngMinErr","angular","$$minErr","factory","modules","module","name","requires","configFn","context","hasOwnProperty","invokeLater","provider","method","insertMethod","invokeQueue","arguments","moduleInstance","runBlocks","config","run","block","push"]
+}


[51/61] [abbrv] [partial] git commit: updated to latest Angular-based admin portal

Posted by sn...@apache.org.
updated to latest Angular-based admin portal


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/508ef2f7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/508ef2f7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/508ef2f7

Branch: refs/pull/35/merge
Commit: 508ef2f7ac52f1fc22edc9fdaa2e2d0f3ff6f22d
Parents: f0974e7
Author: Rod Simpson <ro...@apigee.com>
Authored: Mon Jan 27 15:24:01 2014 -0700
Committer: Rod Simpson <ro...@apigee.com>
Committed: Mon Jan 27 15:24:01 2014 -0700

----------------------------------------------------------------------
 portal/Deployment.md                            |    23 +
 portal/Gruntfile.js                             |   304 +
 portal/LICENSE                                  |   202 -
 portal/README.md                                |   273 +-
 portal/UnitTests.md                             |    24 +
 portal/Vagrantfile                              |    23 -
 portal/bower.json                               |    12 +
 portal/build.sh                                 |    28 +
 portal/coming_soon.html                         |    31 -
 portal/config.js                                |    87 +-
 portal/css/apigeeGlobalNavigation.css           |   274 +
 .../css/arsmarquette/ARSMaquettePro-Light.otf   |   Bin 0 -> 184600 bytes
 .../css/arsmarquette/ARSMaquettePro-Medium.otf  |   Bin 0 -> 188020 bytes
 .../css/arsmarquette/ARSMaquettePro-Regular.otf |   Bin 0 -> 188096 bytes
 .../ui-bg_diagonals-thick_90_eeeeee_40x40.png   |   Bin 251 -> 0 bytes
 .../images/ui-bg_flat_100_deedf7_40x100.png     |   Bin 182 -> 0 bytes
 .../images/ui-bg_flat_100_e4f1fb_40x100.png     |   Bin 213 -> 0 bytes
 .../images/ui-bg_flat_100_f2f5f7_40x100.png     |   Bin 212 -> 0 bytes
 .../images/ui-bg_flat_15_cd0a0a_40x100.png      |   Bin 181 -> 0 bytes
 .../images/ui-bg_flat_50_3baae3_40x100.png      |   Bin 182 -> 0 bytes
 .../images/ui-bg_flat_80_d7ebf9_40x100.png      |   Bin 183 -> 0 bytes
 .../ui-bg_highlight-hard_70_000000_1x100.png    |   Bin 118 -> 0 bytes
 .../ui-bg_highlight-soft_25_ffef8f_1x100.png    |   Bin 153 -> 0 bytes
 .../images/ui-icons_000000_256x240.png          |   Bin 4369 -> 0 bytes
 .../images/ui-icons_2694e8_256x240.png          |   Bin 4369 -> 0 bytes
 .../images/ui-icons_2e83ff_256x240.png          |   Bin 4369 -> 0 bytes
 .../images/ui-icons_3d80b3_256x240.png          |   Bin 4369 -> 0 bytes
 .../images/ui-icons_72a7cf_256x240.png          |   Bin 4369 -> 0 bytes
 .../images/ui-icons_ffffff_256x240.png          |   Bin 4369 -> 0 bytes
 .../css/custom-theme/jquery-ui-1.8.9.custom.css |   573 -
 portal/css/entypo/entypo.eot                    |   Bin 0 -> 35540 bytes
 portal/css/entypo/entypo.svg                    |    13 +
 portal/css/entypo/entypo.ttf                    |   Bin 0 -> 35392 bytes
 portal/css/entypo/entypo.woff                   |   Bin 0 -> 21916 bytes
 portal/css/jquery-ui-timepicker.css             |    53 -
 portal/css/jquery.ui.statusbar.css              |    25 -
 portal/css/main.css                             |  1460 +
 portal/css/prettify.css                         |    52 -
 portal/css/usergrid.css                         |  6358 ----
 portal/images/android-sdk-download.png          |   Bin 4848 -> 0 bytes
 portal/images/api-activity.gif                  |   Bin 10819 -> 0 bytes
 portal/images/apigee-logo.png                   |   Bin 3647 -> 0 bytes
 portal/images/apigeetopbar.png                  |   Bin 4658 -> 0 bytes
 portal/images/btn-copyCurl-up.png               |   Bin 2762 -> 0 bytes
 portal/images/clippy-bg.png                     |   Bin 561 -> 0 bytes
 portal/images/close.gif                         |   Bin 718 -> 0 bytes
 portal/images/dotnet-sdk-download.png           |   Bin 7149 -> 0 bytes
 portal/images/down_arrow.png                    |   Bin 1285 -> 0 bytes
 portal/images/error.png                         |   Bin 2009 -> 0 bytes
 portal/images/faviconApigee.ico                 |   Bin 1150 -> 0 bytes
 portal/images/glyphicons-halflings-white.png    |   Bin 4352 -> 0 bytes
 portal/images/glyphicons-halflings.png          |   Bin 4352 -> 0 bytes
 .../glyphicons_halflings_135_wrench-white2.pdn  |   Bin 5400 -> 0 bytes
 .../glyphicons_halflings_135_wrench-white2.png  |   Bin 296 -> 0 bytes
 .../images/glyphicons_halflings_135_wrench.png  |   Bin 228 -> 0 bytes
 .../glyphicons_halflings_135_wrench_white.png   |   Bin 251 -> 0 bytes
 .../glyphicons_halflings_wrench_white.png       |   Bin 1016 -> 0 bytes
 portal/images/grid.png                          |   Bin 166 -> 0 bytes
 portal/images/icons.png                         |   Bin 13132 -> 0 bytes
 portal/images/ios-sdk-download.png              |   Bin 4886 -> 0 bytes
 portal/images/javascript-sdk-download.png       |   Bin 4618 -> 0 bytes
 portal/images/left_arrow.png                    |   Bin 1257 -> 0 bytes
 portal/images/logo-white.png                    |   Bin 2014 -> 0 bytes
 portal/images/menuActiveTriangle.png            |   Bin 315 -> 0 bytes
 portal/images/nodejs-sdk-download.png           |   Bin 5273 -> 0 bytes
 portal/images/notice.png                        |   Bin 2112 -> 0 bytes
 portal/images/orange-arrow.png                  |   Bin 242 -> 0 bytes
 portal/images/right_arrow.png                   |   Bin 1251 -> 0 bytes
 portal/images/ruby-sdk-download.png             |   Bin 6343 -> 0 bytes
 portal/images/success.png                       |   Bin 1863 -> 0 bytes
 portal/images/swish_arrow.png                   |   Bin 220 -> 0 bytes
 portal/images/topbackground.png                 |   Bin 2890 -> 0 bytes
 portal/images/up_arrow.png                      |   Bin 1292 -> 0 bytes
 portal/images/user-photo.png                    |   Bin 3849 -> 0 bytes
 portal/images/user_profile.png                  |   Bin 3775 -> 0 bytes
 portal/images/usergrid_200.png                  |   Bin 6397 -> 0 bytes
 portal/images/usergrid_400.png                  |   Bin 8746 -> 0 bytes
 portal/images/warning.png                       |   Bin 1179 -> 0 bytes
 portal/img/appswitcher/apiPlatform_lg.png       |   Bin 0 -> 2397 bytes
 portal/img/appswitcher/appServices_lg.png       |   Bin 0 -> 2295 bytes
 portal/img/appswitcher/console_lg.png           |   Bin 0 -> 1453 bytes
 portal/img/appswitcher/home_lg.png              |   Bin 0 -> 1522 bytes
 portal/img/appswitcher/logo_color.png           |   Bin 0 -> 3459 bytes
 portal/img/appswitcher/max_lg.png               |   Bin 0 -> 1970 bytes
 .../img/appswitcher/triangleMenuItem_right.png  |   Bin 0 -> 1158 bytes
 .../triangleMenuItem_right_hover.png            |   Bin 0 -> 1169 bytes
 portal/img/blue-bars.png                        |   Bin 0 -> 3635 bytes
 portal/img/blue-bolt.png                        |   Bin 0 -> 3942 bytes
 portal/img/blue-carat.png                       |   Bin 0 -> 1006 bytes
 portal/img/green_dot.png                        |   Bin 0 -> 3472 bytes
 portal/img/logo.gif                             |   Bin 0 -> 2279 bytes
 portal/img/nav-device.gif                       |   Bin 0 -> 2184 bytes
 portal/img/nav-sprites.png                      |   Bin 0 -> 7953 bytes
 portal/img/no-data1.png                         |   Bin 0 -> 45300 bytes
 portal/img/phone-small.gif                      |   Bin 0 -> 1300 bytes
 portal/img/push/APNS_cert_upload.png            |   Bin 0 -> 33956 bytes
 portal/img/push/APNS_certification.png          |   Bin 0 -> 16855 bytes
 portal/img/push/android-notification.png        |   Bin 0 -> 41629 bytes
 portal/img/push/google_api_key.png              |   Bin 0 -> 98118 bytes
 portal/img/push/iphone_message.png              |   Bin 0 -> 90307 bytes
 portal/img/push/step_1.png                      |   Bin 0 -> 1953 bytes
 portal/img/push/step_2.png                      |   Bin 0 -> 2117 bytes
 portal/img/push/step_3.png                      |   Bin 0 -> 2162 bytes
 portal/img/red_dot.png                          |   Bin 0 -> 3482 bytes
 portal/img/sdk-sprites-large.png                |   Bin 0 -> 14642 bytes
 portal/img/sdk-sprites.png                      |   Bin 0 -> 5027 bytes
 portal/img/tablet-small.gif                     |   Bin 0 -> 1390 bytes
 portal/img/user-photo.png                       |   Bin 0 -> 3849 bytes
 portal/img/user_profile.png                     |   Bin 0 -> 3775 bytes
 portal/img/yellow_dot.png                       |   Bin 0 -> 3475 bytes
 portal/index.html                               |  1602 +-
 portal/js/activities/activities-controller.js   |    11 +
 portal/js/activities/activities.html            |    33 +
 .../js/app-overview/app-overview-controller.js  |    76 +
 portal/js/app-overview/app-overview.html        |    34 +
 .../js/app-overview/doc-includes/android.html   |   209 +
 .../app-overview/doc-includes/images/verify.png |   Bin 0 -> 22934 bytes
 portal/js/app-overview/doc-includes/ios.html    |   173 +
 .../app-overview/doc-includes/javascript.html   |    94 +
 portal/js/app-overview/doc-includes/net.html    |     0
 portal/js/app-overview/doc-includes/node.html   |     0
 portal/js/app-overview/doc-includes/ruby.html   |     0
 .../app-overview/getting-started-controller.js  |    90 +
 portal/js/app-overview/getting-started.html     |   126 +
 portal/js/app.js                                |   125 +
 portal/js/app/app.js                            |   118 -
 portal/js/app/console.js                        |  4536 ---
 portal/js/app/helpers.js                        |   241 -
 portal/js/app/navigation.js                     |   189 -
 portal/js/app/pages.js                          |   154 -
 portal/js/app/params.js                         |    30 -
 portal/js/app/quickLogin.js                     |    30 -
 portal/js/app/session.js                        |   172 -
 portal/js/app/sso.js                            |    89 -
 portal/js/app/status.js                         |    33 -
 portal/js/app/ui/collections.entity.js          |   320 -
 portal/js/app/ui/collections.user.js            |   120 -
 portal/js/app/ui/ui.js                          |   415 -
 portal/js/app/usergrid.appSDK.js                |  2073 --
 portal/js/app/usergrid.appSDK.orig.js           |  2070 --
 portal/js/charts/chart-controller.js            |     6 +
 portal/js/charts/chart-directives.js            |   141 +
 portal/js/charts/chart-service.js               |   494 +
 portal/js/charts/highcharts.json                |   329 +
 portal/js/charts/sparklines.js                  |     2 +
 portal/js/data/data-controller.js               |   304 +
 portal/js/data/data.html                        |   121 +
 portal/js/data/display-generic.html             |    95 +
 portal/js/data/display-groups.html              |     0
 portal/js/data/display-roles.html               |     1 +
 portal/js/data/display-users.html               |    88 +
 portal/js/data/entity-controller.js             |    69 +
 portal/js/data/entity.html                      |    31 +
 portal/js/data/shell-controller.js              |     9 +
 portal/js/data/shell.html                       |    16 +
 portal/js/dialogs/balloon-directive.js          |    25 +
 portal/js/dialogs/modal-directive.js            |    41 +
 portal/js/dialogs/modal.html                    |    16 +
 portal/js/global/alert-controller.js            |    33 +
 portal/js/global/alert-directive.js             |    40 +
 portal/js/global/app-switcher-directive.js      |    35 +
 portal/js/global/appswitcher-template.html      |    34 +
 portal/js/global/insecure-banner.html           |     7 +
 portal/js/global/insecure-banner.js             |    46 +
 portal/js/global/page-constants.js              |    11 +
 portal/js/global/page-controller.js             |   392 +
 portal/js/global/page-service.js                |   214 +
 portal/js/global/temp.json                      |    18 +
 portal/js/global/ug-service.js                  |   987 +
 portal/js/global/util-directive.js              |    24 +
 portal/js/global/utility-service.js             |    52 +
 portal/js/global/validate-directive.js          |    40 +
 .../js/groups/groups-activities-controller.js   |    27 +
 portal/js/groups/groups-activities.html         |    24 +
 portal/js/groups/groups-controller.js           |   119 +
 portal/js/groups/groups-details-controller.js   |    38 +
 portal/js/groups/groups-details.html            |    28 +
 portal/js/groups/groups-members-controller.js   |   113 +
 portal/js/groups/groups-members.html            |    60 +
 portal/js/groups/groups-roles-controller.js     |   184 +
 portal/js/groups/groups-roles.html              |   127 +
 portal/js/groups/groups-tabs.html               |    31 +
 portal/js/groups/groups.html                    |    92 +
 portal/js/lib/MD5.min.js                        |     1 -
 portal/js/lib/backbone.js                       |  1431 -
 portal/js/lib/bootstrap.min.js                  |     7 -
 portal/js/lib/date.min.js                       |     2 -
 portal/js/lib/jquery-1.7.2.min.js               |     4 -
 portal/js/lib/jquery-ui-1.8.18.min.js           |    15 -
 portal/js/lib/jquery.dataset.min.js             |     1 -
 portal/js/lib/jquery.dform-0.1.3.min.js         |    16 -
 portal/js/lib/jquery.jsonp-2.3.1.min.js         |     3 -
 portal/js/lib/jquery.tmpl.min.js                |    10 -
 portal/js/lib/jquery.ui.statusbar.min.js        |     1 -
 portal/js/lib/jquery.ui.timepicker.min.js       |     1 -
 portal/js/lib/prettify.js                       |  1477 -
 portal/js/lib/underscore-min.js                 |     5 -
 portal/js/libs/Highcharts-2.3.5/index.htm       |    79 +
 .../js/adapters/mootools-adapter.js             |    13 +
 .../js/adapters/mootools-adapter.src.js         |   328 +
 .../js/adapters/prototype-adapter.js            |    16 +
 .../js/adapters/prototype-adapter.src.js        |   385 +
 .../libs/Highcharts-2.3.5/js/highcharts-more.js |    35 +
 .../Highcharts-2.3.5/js/highcharts-more.src.js  |  1581 +
 .../js/libs/Highcharts-2.3.5/js/highcharts.js   |   250 +
 .../libs/Highcharts-2.3.5/js/highcharts.src.js  | 15281 ++++++++
 .../Highcharts-2.3.5/js/modules/canvas-tools.js |   133 +
 .../js/modules/canvas-tools.src.js              |  3113 ++
 .../js/libs/Highcharts-2.3.5/js/modules/data.js |    14 +
 .../Highcharts-2.3.5/js/modules/data.src.js     |   512 +
 .../Highcharts-2.3.5/js/modules/exporting.js    |    23 +
 .../js/modules/exporting.src.js                 |   752 +
 .../Highcharts-2.3.5/js/themes/dark-blue.js     |   263 +
 .../Highcharts-2.3.5/js/themes/dark-green.js    |   263 +
 .../js/libs/Highcharts-2.3.5/js/themes/gray.js  |   262 +
 .../js/libs/Highcharts-2.3.5/js/themes/grid.js  |    95 +
 .../js/libs/Highcharts-2.3.5/js/themes/skies.js |    89 +
 portal/js/libs/MD5.min.js                       |     1 +
 portal/js/libs/angular-1.0.5/angular-cookies.js |   183 +
 .../libs/angular-1.0.5/angular-cookies.min.js   |     7 +
 portal/js/libs/angular-1.0.5/angular-loader.js  |   276 +
 .../js/libs/angular-1.0.5/angular-loader.min.js |     7 +
 portal/js/libs/angular-1.0.5/angular-mocks.js   |  1886 +
 .../js/libs/angular-1.0.5/angular-resource.js   |   445 +
 .../libs/angular-1.0.5/angular-resource.min.js  |    10 +
 .../js/libs/angular-1.0.5/angular-sanitize.js   |   535 +
 .../libs/angular-1.0.5/angular-sanitize.min.js  |    13 +
 portal/js/libs/angular-1.0.5/angular.js         | 14733 ++++++++
 portal/js/libs/angular-1.0.5/angular.min.js     |   161 +
 portal/js/libs/angular-1.0.5/version.txt        |     1 +
 portal/js/libs/angular-1.1.5/angular-1.1.5.js   | 16876 +++++++++
 .../js/libs/angular-1.1.5/angular-merge.min.js  |     8 +
 .../angular-1.1.5/angular-resource-1.1.5.js     |   537 +
 portal/js/libs/angular-1.2.5/angular-animate.js |  1323 +
 .../libs/angular-1.2.5/angular-animate.min.js   |    23 +
 .../angular-1.2.5/angular-animate.min.js.map    |     8 +
 portal/js/libs/angular-1.2.5/angular-cookies.js |   202 +
 .../libs/angular-1.2.5/angular-cookies.min.js   |     8 +
 .../angular-1.2.5/angular-cookies.min.js.map    |     8 +
 portal/js/libs/angular-1.2.5/angular-csp.css    |    24 +
 portal/js/libs/angular-1.2.5/angular-loader.js  |   410 +
 .../js/libs/angular-1.2.5/angular-loader.min.js |     9 +
 .../angular-1.2.5/angular-loader.min.js.map     |     8 +
 portal/js/libs/angular-1.2.5/angular-mocks.js   |  2116 ++
 .../js/libs/angular-1.2.5/angular-resource.js   |   565 +
 .../libs/angular-1.2.5/angular-resource.min.js  |    13 +
 .../angular-1.2.5/angular-resource.min.js.map   |     8 +
 portal/js/libs/angular-1.2.5/angular-route.js   |   911 +
 .../js/libs/angular-1.2.5/angular-route.min.js  |    14 +
 .../libs/angular-1.2.5/angular-route.min.js.map |     8 +
 .../js/libs/angular-1.2.5/angular-sanitize.js   |   622 +
 .../libs/angular-1.2.5/angular-sanitize.min.js  |    14 +
 .../angular-1.2.5/angular-sanitize.min.js.map   |     8 +
 .../js/libs/angular-1.2.5/angular-scenario.js   | 32374 +++++++++++++++++
 portal/js/libs/angular-1.2.5/angular-touch.js   |   563 +
 .../js/libs/angular-1.2.5/angular-touch.min.js  |    13 +
 .../libs/angular-1.2.5/angular-touch.min.js.map |     8 +
 portal/js/libs/angular-1.2.5/angular.js         | 20369 +++++++++++
 portal/js/libs/angular-1.2.5/angular.min.js     |   201 +
 portal/js/libs/angular-1.2.5/angular.min.js.map |     8 +
 portal/js/libs/angular-1.2.5/errors.json        |     1 +
 portal/js/libs/angular-1.2.5/version.json       |     1 +
 portal/js/libs/angular-1.2.5/version.txt        |     1 +
 .../angularitics-0.8.5-google-analytics.js      |     7 +
 .../js/libs/angularitics/angularitics-0.8.5.js  |     6 +
 .../libs/bootstrap/css/bootstrap-responsive.css |  1345 +
 .../bootstrap/css/bootstrap-responsive.min.css  |  1245 +
 portal/js/libs/bootstrap/css/bootstrap.css      |  6169 ++++
 portal/js/libs/bootstrap/css/bootstrap.min.css  |  5469 +++
 .../js/libs/bootstrap/custom/css/bootstrap.css  |  6315 ++++
 .../libs/bootstrap/custom/css/bootstrap.min.css |   874 +
 .../custom/img/glyphicons-halflings-white.png   |   Bin 0 -> 8777 bytes
 .../custom/img/glyphicons-halflings.png         |   Bin 0 -> 12799 bytes
 portal/js/libs/bootstrap/custom/js/bootstrap.js |  2291 ++
 .../libs/bootstrap/custom/js/bootstrap.min.js   |     7 +
 .../img/glyphicons-halflings-white.png          |   Bin 0 -> 8777 bytes
 .../libs/bootstrap/img/glyphicons-halflings.png |   Bin 0 -> 12799 bytes
 portal/js/libs/bootstrap/js/bootstrap.js        |  2117 ++
 portal/js/libs/bootstrap/js/bootstrap.min.js    |   644 +
 portal/js/libs/google-viz-api.js                |    49 +
 portal/js/libs/jquery/jquery-1.9.1.min.js       |     5 +
 .../js/libs/jquery/jquery-migrate-1.1.1.min.js  |     3 +
 portal/js/libs/jquery/jquery.sparkline.min.js   |     5 +
 portal/js/libs/jqueryui/date.min.js             |     2 +
 .../ui-bg_diagonals-thick_90_eeeeee_40x40.png   |   Bin 0 -> 251 bytes
 .../images/ui-bg_flat_100_deedf7_40x100.png     |   Bin 0 -> 182 bytes
 .../images/ui-bg_flat_100_e4f1fb_40x100.png     |   Bin 0 -> 213 bytes
 .../images/ui-bg_flat_100_f2f5f7_40x100.png     |   Bin 0 -> 212 bytes
 .../images/ui-bg_flat_15_cd0a0a_40x100.png      |   Bin 0 -> 181 bytes
 .../images/ui-bg_flat_50_3baae3_40x100.png      |   Bin 0 -> 182 bytes
 .../images/ui-bg_flat_80_d7ebf9_40x100.png      |   Bin 0 -> 183 bytes
 .../ui-bg_highlight-hard_70_000000_1x100.png    |   Bin 0 -> 118 bytes
 .../ui-bg_highlight-soft_25_ffef8f_1x100.png    |   Bin 0 -> 153 bytes
 .../jqueryui/images/ui-icons_000000_256x240.png |   Bin 0 -> 4369 bytes
 .../jqueryui/images/ui-icons_2694e8_256x240.png |   Bin 0 -> 4369 bytes
 .../jqueryui/images/ui-icons_2e83ff_256x240.png |   Bin 0 -> 4369 bytes
 .../jqueryui/images/ui-icons_3d80b3_256x240.png |   Bin 0 -> 4369 bytes
 .../jqueryui/images/ui-icons_72a7cf_256x240.png |   Bin 0 -> 4369 bytes
 .../jqueryui/images/ui-icons_ffffff_256x240.png |   Bin 0 -> 4369 bytes
 portal/js/libs/jqueryui/jquery-ui-1.8.18.min.js |    15 +
 .../js/libs/jqueryui/jquery-ui-1.8.9.custom.css |   573 +
 .../js/libs/jqueryui/jquery-ui-timepicker.css   |    53 +
 .../libs/jqueryui/jquery.ui.timepicker.min.js   |     1 +
 .../ui-bootstrap-custom-0.3.0.min.js            |     1 +
 .../ui-bootstrap-custom-tpls-0.3.0.min.js       |     1 +
 portal/js/libs/usergrid.sdk.js                  |  2469 ++
 portal/js/login/forgot-password-controller.js   |    12 +
 portal/js/login/forgot-password.html            |     5 +
 portal/js/login/loading.html                    |     3 +
 portal/js/login/login-controller.js             |    83 +
 portal/js/login/login.html                      |    48 +
 portal/js/login/logout-controller.js            |    10 +
 portal/js/login/logout.html                     |     1 +
 portal/js/login/register-controller.js          |    36 +
 portal/js/login/register.html                   |    80 +
 portal/js/menus/appMenu.html                    |    41 +
 portal/js/menus/menu-directives.js              |   434 +
 portal/js/menus/orgMenu.html                    |    13 +
 .../js/org-overview/org-overview-controller.js  |    86 +
 portal/js/org-overview/org-overview.html        |   121 +
 portal/js/profile/account-controller.js         |    18 +
 portal/js/profile/account.html                  |    18 +
 portal/js/profile/organizations-controller.js   |    73 +
 portal/js/profile/organizations.html            |    71 +
 portal/js/profile/profile-controller.js         |    40 +
 portal/js/profile/profile.html                  |    68 +
 portal/js/roles/roles-controller.js             |   112 +
 portal/js/roles/roles-groups-controller.js      |   113 +
 portal/js/roles/roles-groups.html               |    60 +
 portal/js/roles/roles-settings-controller.js    |    87 +
 portal/js/roles/roles-settings.html             |    80 +
 portal/js/roles/roles-tabs.html                 |    30 +
 portal/js/roles/roles-users-controller.js       |   112 +
 portal/js/roles/roles-users.html                |    59 +
 portal/js/roles/roles.html                      |    91 +
 portal/js/shell/shell-controller.js             |   216 +
 portal/js/shell/shell.html                      |    25 +
 portal/js/spec/client-tests.js                  |   159 -
 portal/js/spec/index.html                       |    20 -
 portal/js/spec/qunit-git.css                    |   238 -
 portal/js/spec/qunit-git.js                     |  1865 -
 portal/js/unit-tests/appSDK-tests.js            |   255 -
 portal/js/unit-tests/ie-jquery-tests.js         |   191 -
 portal/js/unit-tests/qunit.css                  |   231 -
 portal/js/unit-tests/qunit.js                   |  1934 -
 portal/js/users/users-activities-controller.js  |    40 +
 portal/js/users/users-activities.html           |    39 +
 portal/js/users/users-controller.js             |   115 +
 portal/js/users/users-graph-controller.js       |    67 +
 portal/js/users/users-graph.html                |    67 +
 portal/js/users/users-groups-controller.js      |   124 +
 portal/js/users/users-groups.html               |    67 +
 portal/js/users/users-profile-controller.js     |    32 +
 portal/js/users/users-profile.html              |    70 +
 portal/js/users/users-roles-controller.js       |   138 +
 portal/js/users/users-roles.html                |   129 +
 portal/js/users/users-tabs.html                 |     3 +
 portal/js/users/users.html                      |   126 +
 portal/loading.html                             |     9 -
 portal/package.json                             |    48 +
 portal/planned_outage.html                      |    48 -
 portal/sass/.gitignore                          |     1 -
 portal/sass/config.rb                           |    25 -
 portal/sass/usergrid.scss                       |  1855 -
 portal/scripts/e2e-test.bat                     |    11 +
 portal/scripts/e2e-test.sh                      |     9 +
 portal/scripts/test.bat                         |    11 +
 portal/scripts/test.sh                          |     9 +
 portal/scripts/watchr.rb                        |    19 +
 portal/scripts/web-server.js                    |   244 +
 portal/sdk/usergrid.0.10.4.js                   |  1402 +
 portal/sdk/usergrid.0.10.5.js                   |  1755 +
 portal/sdk/usergrid.0.10.7.js                   |  2265 ++
 portal/server.js                                |   244 +
 portal/service_down.html                        |    48 -
 .../apigee.ui.activities.table_rows.html        |    14 -
 .../templates/apigee.ui.admins.table_rows.html  |     8 -
 .../apigee.ui.applications.table_rows.html      |     4 -
 .../apigee.ui.collection.table_rows.html        |    65 -
 .../apigee.ui.collections.query.indexes.html    |     5 -
 .../apigee.ui.collections.table_rows.html       |     9 -
 .../apigee.ui.collections.user.header.html      |    21 -
 portal/templates/apigee.ui.curl.detail.html     |    11 -
 portal/templates/apigee.ui.feed.table_rows.html |    15 -
 .../templates/apigee.ui.groups.table_rows.html  |    14 -
 .../apigee.ui.panels.group.activities.html      |    28 -
 .../apigee.ui.panels.group.details.html         |    97 -
 .../apigee.ui.panels.group.memberships.html     |    40 -
 .../apigee.ui.panels.group.permissions.html     |    99 -
 .../apigee.ui.panels.role.permissions.html      |    58 -
 .../templates/apigee.ui.panels.role.users.html  |    38 -
 .../apigee.ui.panels.user.activities.html       |    40 -
 .../templates/apigee.ui.panels.user.graph.html  |    80 -
 .../apigee.ui.panels.user.memberships.html      |    40 -
 .../apigee.ui.panels.user.permissions.html      |   105 -
 .../apigee.ui.panels.user.profile.html          |   113 -
 .../apigee.ui.role.groups.table_rows.html       |    44 -
 .../templates/apigee.ui.roles.table_rows.html   |    15 -
 .../templates/apigee.ui.users.table_rows.html   |    18 -
 portal/templates/test/modalForm2.html           |    32 -
 portal/test/autocomplete.html                   |    25 -
 portal/test/modalForm.html                      |    32 -
 portal/tests/karma.conf.js                      |    68 +
 portal/tests/protractor/applications.spec.js    |    31 +
 portal/tests/protractor/data.spec.js            |    46 +
 portal/tests/protractor/forgotPassword.spec.js  |    28 +
 portal/tests/protractor/monitoring.spec.js      |    15 +
 portal/tests/protractor/organization.spec.js    |    40 +
 portal/tests/protractor/profile.spec.js         |    69 +
 portal/tests/protractor/push.spec.js            |    15 +
 portal/tests/protractor/users.spec.js           |    49 +
 portal/tests/protractor/util.js                 |    91 +
 portal/tests/protractorConf.js                  |    89 +
 portal/tests/selenium/chromedriver              |   Bin 0 -> 22034760 bytes
 .../selenium-server-standalone-2.37.0.jar       |   Bin 0 -> 34730734 bytes
 portal/tests/unit/sample.spec.js                |    46 +
 stack/pom.xml                                   |     2 +-
 417 files changed, 166651 insertions(+), 30356 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/Deployment.md
----------------------------------------------------------------------
diff --git a/portal/Deployment.md b/portal/Deployment.md
new file mode 100644
index 0000000..50c79fe
--- /dev/null
+++ b/portal/Deployment.md
@@ -0,0 +1,23 @@
+## Deploying or Developing
+
+If you are just deploying...
+
+1. install nodejs - http://nodejs.org/download/
+2. install grunt - "sudo npm install grunt-cli -g"
+3. from the root dir, run ./build.sh
+4. this will create a directory in the root called dist, in dist is a zip file appsvc-ui.zip, unzip and deploy to your favorite web server
+
+If you are developing...
+
+1. from the root dir, run ./build.sh;
+2. to monitor and build the performance code => run grunt --gruntfile Perf-Gruntfile.js dev; this will need to continue running in terminal as you are developing
+3. to monitor and build the portal code base => run grunt dev; this will open a browser with http://localhost:3000/index-debug.html
+4. to debug in the browser go to http://localhost:3000/index-debug.html; http://localhost:3000/ will point to the compressed files
+5. if the libraries get out of sync run ./build.sh again and this will run grunt build in the background.
+
+If you want to run the e2e tests
+
+1. from the root directory ./build.sh e2e
+
+
+To version open a terminal and run 'npm version x.x.x' this will add a tag and increment the package.json.

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/Gruntfile.js
----------------------------------------------------------------------
diff --git a/portal/Gruntfile.js b/portal/Gruntfile.js
new file mode 100644
index 0000000..d30fa90
--- /dev/null
+++ b/portal/Gruntfile.js
@@ -0,0 +1,304 @@
+var packageJson = require('./package.json');
+var userGrid = require('./config.js');
+
+var menu = '<ul class="nav nav-list" menu="sideMenu">';
+userGrid.options.menuItems.forEach(function(menuItem){
+  menu += '<li class="option '+ (menuItem.active ? 'active' : '') + '" ng-cloak>';
+  menu += '<a data-ng-href="'+menuItem.path+'"><i class="pictogram">'+menuItem.pic+'</i>'+menuItem.title+'</a>';
+  menuItem.items && menuItem.items.forEach(function(subItem){
+    menu += '<ul class="nav nav-list">';
+    menu += '<li>';
+    menu += '<a data-ng-href="'+subItem.path+'"><i class="pictogram sub">'+subItem.pic+'</i>'+subItem.title+'</a>'
+    menu += '</li>';
+    menu += '</ul>';
+  });
+  menu += '</li>';
+});
+menu += '</ul>';
+
+var mainRefs = "",
+    devRefs = ""
+    ;
+userGrid.options.scriptReferences.main.forEach(function (current) {
+  mainRefs += "<script src='" + current + "'></script>";
+});
+userGrid.options.scriptReferences.dev.forEach(function (current) {
+  devRefs += "<script src='" + current + "'></script>";
+});
+
+var cssRefs = "";
+userGrid.options.cssRefs.forEach(function(css){
+  cssRefs += '<link href="'+css.src+'" rel="stylesheet" id="'+css.id+'"/>';
+});
+
+module.exports = function (grunt) {
+
+  var distPath = 'dist/'+packageJson.packageName,
+      libsFile = 'js/libs/usergrid-libs.min.js',
+      devFile = 'js/usergrid-dev.min.js',
+      devFileIncludes= ['js/**/*.js','!js/libs/**/*.js', '!js/**/*.min.js'],
+      mainFile = 'js/usergrid.min.js',
+      templateFile = 'js/templates.js',
+      distName = packageJson.packageName
+      ;
+  // Project configuration.
+  grunt.initConfig({
+    pkg: grunt.file.readJSON('package.json'),
+
+    uglify: {
+      options: {
+        banner: '/*! <%= pkg.name %>@<%= pkg.version %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
+      },
+      'usergrid-libs':{
+        options: {
+          mangle: false,
+          compress: {warnings:false},
+          beautify: false
+        },
+        files:{
+          'js/libs/usergrid-libs.min.js':[
+            'js/libs/jquery/jquery-1.9.1.min.js',
+            'js/libs/jquery/jquery-migrate-1.1.1.min.js',
+            'js/libs/jquery/jquery.sparkline.min.js',
+            'js/libs/Highcharts-2.3.5/js/highcharts.js',
+            'js/libs/angular-1.2.5/angular.min.js',
+            'js/libs/angular-1.2.5/angular-route.min.js',
+            'js/libs/angular-1.2.5/angular-resource.min.js',
+            'js/libs/angular-1.2.5/angular-sanitize.min.js',
+            'js/libs/usergrid.sdk.js',
+            'js/libs/MD5.min.js',
+            'bower_components/angularitics/dist/angulartics.min.js',
+            'bower_components/angularitics/dist/angulartics-google-analytics.min.js',
+            'js/libs/ui-bootstrap/ui-bootstrap-custom-tpls-0.3.0.min.js',
+            'js/libs/jqueryui/jquery-ui-1.8.18.min.js',
+            'js/libs/jqueryui/date.min.js'
+          ]
+        }
+      },
+      'usergrid-dev': {
+        options: {
+          mangle: false,
+          compress: false,
+          beautify: true,
+          wrap: true
+        },
+        files: {
+          'js/usergrid-dev.min.js': [
+            'js/app.js',
+            'js/**/*.js',
+            '!js/config.js',
+            '!js/libs/**/*.js',
+            '!'+mainFile,
+            '!'+devFile
+          ]
+        }
+      },
+      'usergrid': {
+        options: {
+          mangle: false,
+          compress: {warnings:false},
+          beautify: false
+        },
+        files: {
+          'js/usergrid.min.js': [
+            devFile
+          ]
+        }
+      }
+
+    },
+    ngtemplates: {
+      "appservices": {
+        options: {
+          base: 'js/'
+        },
+        src: ['js/**/*.html','!**/index*'],
+        dest: templateFile,
+        options:  {
+          url:    function(url) { return url.replace('js/', ''); }
+        }
+      }
+    },
+
+    cssmin: {
+      combine: {
+        files: {
+          'css/dash.min.css': ['css/apigeeGlobalNavigation.css', 'css/main.css']
+        }
+      }
+    },
+    watch: {
+      files: [
+        'index-template.html',
+        'css/**/*.css',
+        'js/**/*.js',
+        'js/**/*.html',
+        '!tests/',
+        '!archive/',
+        '!css/dash.min.css',
+        '!js/libs/',
+        '!js/*.min.js',
+        '!'+templateFile,
+        '!'+libsFile
+      ],
+      tasks: ['build-dev']
+    },
+    connect: {
+      server: {
+        options: {
+          target: 'http://localhost:3000/index-debug.html', // target url to open
+          open: 'http://localhost:3000/index-debug.html',
+          port: 3000,
+          base: ''
+        }
+      },
+      'e2e-phantom': {
+        options: {
+          port: 3005,
+          base: distPath
+        }
+      },
+      'e2e-chrome': {
+        options: {
+          port: 3006,
+          base: distPath
+        }
+      }
+    },
+    karma: {
+      unit: {
+        configFile: 'tests/karma.conf.js',
+        runnerPort: 9999,
+        singleRun: true,
+        browsers: ['PhantomJS']
+      }
+    },
+    protractor: {
+      options: {
+        configFile: "tests/protractorConf.js", // Default config file
+        keepAlive: true, // If false, the grunt process stops when the test fails.
+        noColor: false, // If true, protractor will not use colors in its output.
+        args: {
+          baseUrl:'http://localhost:3005'
+        }
+      },
+      phantom: {
+        options: {
+          args: {
+            // Arguments passed to the command
+            capabilities: {
+              baseUrl:'http://localhost:3005',
+              'browserName': 'phantomjs'
+            }
+          }
+        }
+      },
+      chrome: {
+        options: {
+          args: {
+            // Arguments passed to the command
+            capabilities: {
+              baseUrl:'http://localhost:3006',
+              'browserName': 'chrome'
+            }
+          }
+        }
+      }
+    },
+    copy:{
+      main:{
+        files:[
+          // includes files within path
+          {expand: true, src: ['*.html','config.js', '*.ico','js/*.min.js'], dest: distPath, filter: 'isFile'},
+          {expand: true, src: ['sdk/**','css/**','bower_components/**','img/**','js/app-overview/doc-includes/images/**','archive/**','js/libs/**','js/charts/*.json'], dest: distPath}
+
+        ]
+      }
+    },
+    compress: {
+      main: {
+        options: {
+          archive: 'dist/'+distName+'.'+packageJson.version+'.zip'
+        },
+        expand: true,
+        cwd: distPath+'/',
+        src: ['**/*'],
+        dest: distName+'.'+packageJson.version
+      }
+    },
+    clean: {
+        build: ['dist/','js/*.min.js',templateFile]
+    },
+    dom_munger: {
+      main: {
+        options: {
+          append:{selector:'body',html:mainRefs},
+          update: {selector:'#main-script',attribute:'src',value:mainFile}
+
+        },
+        src: 'index-template.html',  //update the dist/index.html (the src index.html is copied there)
+        dest: 'index.html'  //update the dist/index.html (the src index.html is copied there)
+
+      },
+      dev: {
+        options: {
+          append:{selector:'body',html:devRefs},
+          update: {selector:'#main-script',attribute:'src',value:devFile}
+        },
+        src: 'index-template.html',  //update the dist/index.html (the src index.html is copied there)
+        dest: 'index-debug.html'  //update the dist/index.html (the src index.html is copied there)
+      },
+      menu: {
+        options: {
+          append:{selector:'#sideMenu',html:menu}
+        },
+        src: ['index.html','index-debug.html']  //update the dist/index.html (the src index.html is copied there)
+      },
+      css: {
+        options: {
+          append:{selector:'head',html:cssRefs}
+        },
+        src: ['index.html','index-debug.html']  //update the dist/index.html (the src index.html is copied there)
+      }
+    },
+    bower: {
+      install: {
+        options:{
+          cleanup:false,
+          copy:false
+        }
+      }
+    }
+  });
+
+  grunt.loadNpmTasks('grunt-contrib-uglify');
+  grunt.loadNpmTasks('grunt-contrib-cssmin');
+  grunt.loadNpmTasks('grunt-contrib-copy');
+  grunt.loadNpmTasks('grunt-contrib-watch');
+  grunt.loadNpmTasks('grunt-contrib-connect');
+  grunt.loadNpmTasks('grunt-contrib-compress');
+  grunt.loadNpmTasks('grunt-contrib-clean');
+  grunt.loadNpmTasks('grunt-angular-templates');
+  grunt.loadNpmTasks('grunt-bower-task');
+  grunt.loadNpmTasks('grunt-contrib-connect');
+  grunt.loadNpmTasks('grunt-protractor-runner');
+  grunt.loadNpmTasks('grunt-karma');
+  grunt.loadNpmTasks('grunt-dom-munger');
+
+  // Default task(s).
+  grunt.registerTask('dev', ['connect:server', 'watch']);
+
+  grunt.registerTask('validate', ['jshint', 'complexity']);
+
+  grunt.registerTask('build-dev', [ 'ngtemplates','uglify:usergrid-dev','uglify:usergrid', 'cssmin','dom_munger','karma:unit']);
+
+  grunt.registerTask('default', ['build','karma:unit']);
+
+  grunt.registerTask('e2e', ['karma:unit','connect:e2e-phantom','protractor:phantom']);
+  grunt.registerTask('e2e-chrome', ['karma:unit','connect:e2e-chrome','protractor:chrome']);
+
+
+  grunt.registerTask('no-monitoring', ['build','clean:perf','karma:unit','compress']);
+
+  grunt.registerTask('build', ['clean:build','bower:install','ngtemplates', 'uglify','cssmin','dom_munger','copy','compress']);
+};

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/LICENSE
----------------------------------------------------------------------
diff --git a/portal/LICENSE b/portal/LICENSE
deleted file mode 100644
index 246e032..0000000
--- a/portal/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright 2012 Apigee Corp
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/README.md
----------------------------------------------------------------------
diff --git a/portal/README.md b/portal/README.md
index 2d3de8e..9c9a289 100644
--- a/portal/README.md
+++ b/portal/README.md
@@ -1,137 +1,138 @@
-##Version
-
-Current Version: **0.11.1**
-
-Change log:
-
-<https://github.com/apigee/usergrid-portal/blob/master/changelog.md> 
-
-
-##Overview
-This is an open-source Javascript-based console application for Usergrid called the *Admin portal*. The Admin portal is the primary administrative user interface for working with Usergrid. 
-
-The Admin portal is available online at <https://apigee.com/usergrid/>. The Admin portal source code is fully open source and forkable. You can easily extend the Admin portal, embed it into your own applications, or inspect the code to learn best practices associated with the Usergrid API.
-
-The Admin portal repo is located here:
-
-<https://github.com/apigee/usergrid-portal>
-
-You can download the Admin portal code here:
-
-* Download as a zip file: <https://github.com/apigee/usergrid-portal/archive/master.zip>
-* Download as a tar.gz file: <https://github.com/apigee/usergrid-portal/archive/master.tar.gz>
-
-To find out more about Apigee App Services, a free, hosted version of Usergrid, see:
-
-<http://apigee.com/about/developers>
-
-To view the Apigee App Services documentation, see:
-
-<http://apigee.com/docs/app_services>
-
-
-##About the Admin portal
-Use the Admin portal for administrative operations, including:
-
-* Create new organizations and applications.
-* View information about the current organization, such as its applications, administrators, and credentials.
+##Overview
+This is an open-source Javascript-based console application for Usergrid called the *admin portal*. The admin portal is the primary administrative user interface for working with Usergrid.
+
+The admin portal source code is fully open source and forkable. You can easily extend the admin portal, embed it into your own applications, or inspect the code to learn best practices associated with the Usergrid API.
+
+The admin portal source is in the Usergrid repo here:
+
+<https://github.com/usergrid/usergrid>
+
+##About the admin portal
+Use the admin portal for administrative operations, including:
+
+* Create new organizations and applications.
+* View information about the current organization, such as its applications, administrators, and credentials.
 * Display information about an application, such as its users, groups, collections, and roles.
-* Create and modify roles to manage access to your data.
-* View and modify your data, with full support for users, groups, and custom entities and collections. 
-* Generate and access credentials for API access.
-
-
-##Navigating the Admin portal
-
-The Admin portal interface displays a variety of pages that display information and enable you to perform management
-actions. These include:
-
-* Account home
-* Application dashboard
-* Users
-* Groups
-* Roles
-* Activities
-* Collections
-* Analytics
-* Properties
-* Shell
-
-
-You can display any of these pages by clicking its respective item in the left sidebar menu of the Admin portal.
-
-###Account Home
-When you log in to the Admin portal, you are presented with a home page for managing the applications and data for your organization. 
-The home page displays:
-
-* Applications associated with the currently selected organization
-* Administrators that are part of that organization
-* API credentials for the organization
-* Activities performed recently by administrators
-* A menu for building, organizing, and managing application content
-
-###Application dashboard
-The Application Dashboard shows a variety of statistical data for the selected application. You can see the activity level, the total number of entities, and other vital statistics for monitoring application health as well as quota limits.
-
-###Users
-The Users page lists the user entities created in the current application. You can add or delete users. You can also edit various properties of a user entity such as the user's name or address.
-
-###Groups
-The Groups page lists the groups created in the current application. You can add or delete groups. You can also edit some properties of a group such as the group's display name.
-
-###Roles
-The Roles page lists the roles defined for the current application. You can add or delete roles. You can also specify and update the permissions for a role.
-
-###Activities
-The Activities page lists the activities posted in an application. You can view when the activity was posted, who posted the activity, and the content of the activity. You can also search for activities by content or actor.
-
-###Collections
-The Collections page lists the collections created in the current application. You can also search for, add, update, or deleted collections.
-
-###Analytics
-Use this page to collect and analyze Usergrid usage data such as the number of times a particular collection has been accessed over a period of time.
-You can specify parameters for data collection, including what data points you'd like to collect, over what time period, and at what resolution. 
-When you click the Generate button, the results are displayed in tabular form and graphically in the lower portion of the page.
-
-###Properties
-The Properties page lists the credentials (Client ID and Client Secret) for the current application. You can regenerate credentials for the application from this page.
-
-###Shell
-The Shell page gives you a simple way to get started using the Usergrid API. It provides a command-line environment within your web browser for trying out Usergrid API calls interactively. 
-
-##Displaying API calls as cURL commands
-You can display the equivalent cURL syntax for each API call that is made through the Admin portal. The calls are displayed in the console area of any of the following browsers: Chrome, Internet Explorer (in the debugger), Firefox (in Firebug), and Safari. 
-For details, see Displaying Usergrid API calls as Curl commands:
-
-<http://apigee.com/docs/usergrid/content/displaying-app-services-api-calls-curl-commands>
-
-More information on cURL can be found here:
-
-<http://curl.haxx.se/>
-
-## Contributing
-We welcome your enhancements!
-
-Like [Usergrid](https://github.com/apigee/usergrid-node-module), the Admin portal is open source and licensed under the Apache License, Version 2.0.
-
-1. Fork it
-2. Create your feature branch (`git checkout -b my-new-feature`)
-3. Commit your changes (`git commit -am 'Added some feature'`)
-4. Push your changes to the upstream branch (`git push origin my-new-feature`)
-5. Create new Pull Request (make sure you describe what you did and why your mod is needed)
-
-##More information
-For more information on App Services, Apigee's free hosted version of Usergrid, visit <http://apigee.com/about/developers>.
-
-## Usergrid is open source
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-<http://www.apache.org/licenses/LICENSE-2.0>
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
\ No newline at end of file
+* Create and modify roles to manage access to your data.
+* View and modify your data, with full support for users, groups, and custom entities and collections.
+* Generate and access credentials for API access.
+
+##Navigating the admin portal
+
+The admin portal interface displays a variety of pages that display information and enable you to perform management
+actions. These include:
+
+* Account home
+* Application dashboard
+* Users
+* Groups
+* Roles
+* Activities
+* Collections
+* Analytics
+* Properties
+* Shell
+
+You can display any of these pages by clicking its respective item in the left sidebar menu of the admin portal.
+
+###Account Home
+When you log in to the admin portal, you are presented with a home page for managing the applications and data for your organization.
+
+The home page displays:
+
+* Applications associated with the currently selected organization
+* Administrators that are part of that organization
+* API credentials for the organization
+* Activities performed recently by administrators
+* A menu for building, organizing, and managing application content
+
+###Application dashboard
+The Application Dashboard shows a variety of statistical data for the selected application. You can see the activity level, the total number of entities, and other vital statistics for monitoring application health as well as quota limits.
+
+###Users
+The Users page lists the user entities created in the current application. You can add or delete users. You can also edit various properties of a user entity such as the user's name or address.
+
+###Groups
+The Groups page lists the groups created in the current application. You can add or delete groups. You can also edit some properties of a group such as the group's display name.
+
+###Roles
+The Roles page lists the roles defined for the current application. You can add or delete roles. You can also specify and update the permissions for a role.
+
+###Activities
+The Activities page lists the activities posted in an application. You can view when the activity was posted, who posted the activity, and the content of the activity. You can also search for activities by content or actor.
+
+###Collections
+The Collections page lists the collections created in the current application. You can also search for, add, update, or deleted collections.
+
+###Analytics
+Use this page to collect and analyze Usergrid usage data such as the number of times a particular collection has been accessed over a period of time.
+You can specify parameters for data collection, including what data points you'd like to collect, over what time period, and at what resolution.
+When you click the Generate button, the results are displayed in tabular form and graphically in the lower portion of the page.
+
+###Properties
+The Properties page lists the credentials (Client ID and Client Secret) for the current application. You can regenerate credentials for the application from this page.
+
+###Shell
+The Shell page gives you a simple way to get started using the Usergrid API. It provides a command-line environment within your web browser for trying out Usergrid API calls interactively.
+
+##Displaying API calls as cURL commands
+You can display the equivalent cURL syntax for each API call that is made through the Admin portal. The calls are displayed in the console area of any of the following browsers: Chrome, Internet Explorer (in the debugger), Firefox (in Firebug), and Safari.
+
+More information on cURL can be found here:
+
+<http://curl.haxx.se/>
+
+You can also use the Usergrid Command Line (ugc) for terminal access to the Usergrid API. ugc provides simplified access to Usergrid. For more about ugc, see the Usergrid repo:
+
+<https://github.com/usergrid/usergrid>
+
+##Deploying or Developing
+
+If you are just deploying:
+
+1. Install Node.js from http://nodejs.org/download/.
+2. Install Grunt with `sudo npm install grunt-cli -g`
+3. From the root directory, run `./build.sh`.
+4. This will create a directory in the root called dist. In dist is a zip file called appsvc-ui.zip. Unzip and deploy to your favorite web server.
+
+If you are developing:
+
+1. From the root directory, run `./build.sh`.
+2. To monitor and build the performance code => run `grunt --gruntfile Perf-Gruntfile.js dev;`. This will need to continue running in terminal as you are developing.
+3. To monitor and build the portal code base => run `grunt dev;`. This will open a browser with http://localhost:3000/index-debug.html.
+4. To debug in the browser go to http://localhost:3000/index-debug.html; http://localhost:3000/ will point to the compressed files.
+5. If the libraries get out of sync, run `./build.sh` again and this will run grunt build in the background.
+
+If you want to run the e2e tests:
+
+- From the root directory, run `./build.sh e2e`.
+
+
+To version open a terminal and run 'npm version x.x.x' this will add a tag and increment the package.json.
+
+##Unit Tests
+[Unit Tests](UnitTests.md)
+
+## Contributing
+We welcome your enhancements!
+
+Like [Usergrid](https://github.com/apigee/usergrid-node-module), the admin portal is open source and licensed under the Apache License, Version 2.0.
+
+1. Fork it
+2. Create your feature branch (`git checkout -b my-new-feature`)
+3. Commit your changes (`git commit -am 'Added some feature'`)
+4. Push your changes to the upstream branch (`git push origin my-new-feature`)
+5. Create new Pull Request (make sure you describe what you did and why your mod is needed)
+
+## Usergrid is open source
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+<http://www.apache.org/licenses/LICENSE-2.0>
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/UnitTests.md
----------------------------------------------------------------------
diff --git a/portal/UnitTests.md b/portal/UnitTests.md
new file mode 100644
index 0000000..082093b
--- /dev/null
+++ b/portal/UnitTests.md
@@ -0,0 +1,24 @@
+## Running the tests
+Before running the tests you will need to run the following steps.
+
+1. install nodejs - http://nodejs.org/download/
+
+2. install grunt - "sudo npm install grunt-cli -g"
+
+3. install karma - "sudo npm install karma -g"
+
+4. install protractor - "sudo npm install protractor -g"
+
+5. in terminal navigate to the root directory of git repo for the Usergrid Admin Portal
+
+6. run npm install in your terminal - "npm install"
+
+7. run grunt in your terminal - "grunt", this will also run the tests, if you want to run the tests independently follow the next steps
+
+8. run karma in your terminal - "karma start tests/karma.conf.js"
+
+9. this will open a browser window where you can debug
+
+10. if you want to run the e2e tests open a terminal, navigate to the root and run "protractor ./tests/protractorConf.js"
+
+for more info see http://karma-runner.github.io/0.10/index.html or https://github.com/angular/protractor

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/Vagrantfile
----------------------------------------------------------------------
diff --git a/portal/Vagrantfile b/portal/Vagrantfile
deleted file mode 100644
index 72b44da..0000000
--- a/portal/Vagrantfile
+++ /dev/null
@@ -1,23 +0,0 @@
-Vagrant::Config.run do |config|
-  puppet_dir = ".puppet"
-
-  config.vm.box = "precise64"
-  config.vm.box_url = "http://files.vagrantup.com/precise64.box"
-  config.vm.host_name = "usergrid.dev"
-  config.vm.network :hostonly, "10.10.4.22"
-  config.vm.share_folder "templates", "/tmp/vagrant-puppet/templates", File.join(puppet_dir, "templates")
-
-  config.vm.provision :shell, :path => File.join(puppet_dir, "bootstrap.sh")
-
-  config.vm.provision :puppet do |puppet|
-      puppet.module_path = File.join(puppet_dir, "modules")
-      puppet.manifests_path = File.join(puppet_dir, "manifests")
-      puppet.manifest_file = "main.pp"
-
-      puppet.options = [
-        "--templatedir", "/tmp/vagrant-puppet/templates",
-        "--verbose",
-        "--debug"
-      ]
-    end
-end

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/bower.json
----------------------------------------------------------------------
diff --git a/portal/bower.json b/portal/bower.json
new file mode 100644
index 0000000..862eadc
--- /dev/null
+++ b/portal/bower.json
@@ -0,0 +1,12 @@
+{
+  "name": "usergrid-portal",
+  "version": "2.0.12",
+  "ignore": [],
+  "dependencies": {
+    "angularitics": "~0.8.7"
+  },
+  "devDependencies": {},
+  "keywords": [
+    "usergrid"
+  ]
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/build.sh
----------------------------------------------------------------------
diff --git a/portal/build.sh b/portal/build.sh
new file mode 100755
index 0000000..0c1107d
--- /dev/null
+++ b/portal/build.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+buildMain(){
+  echo #####
+  echo grunt --gruntfile Gruntfile.js $1
+  echo #####
+  ./node_modules/grunt-cli/bin/grunt --gruntfile Gruntfile.js $1
+}
+
+
+npm install
+
+case "$1" in
+e2e) buildMain
+    ./node_modules/grunt-cli/bin/grunt --gruntfile Gruntfile.js $1
+    ;;
+dev) buildMain
+    ./node_modules/grunt-cli/bin/grunt --gruntfile Gruntfile.js $1
+    ;;
+*)   echo "pass e2e to run e2e tests"
+   buildMain
+   ;;
+esac
+
+echo ####
+echo zip has been delivered to ./dist/
+
+

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/coming_soon.html
----------------------------------------------------------------------
diff --git a/portal/coming_soon.html b/portal/coming_soon.html
deleted file mode 100644
index ae609d3..0000000
--- a/portal/coming_soon.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<body>
-<div id="fullContainer">
-  <div class="navbar navbar-fixed-top">
-    <h1 class="apigee"><a href="https://apigee.com" target="_blank"><img src="images/apigee-logo.png">apigee</a></h1>
-    <h2 id="ActualPage1">App Services Admin Portal</h2>
-    <ul id="loginMenu" class="nav secondary-nav">
-      <li><a id="login-link" href="#"><i class="icon-user"></i> Login</a></li>
-      <li><a id="signup-link" href="#">Sign Up</a></li>
-      <li><a id="forgot-password-link" href="#"><i class="icon-lock"></i> Forgot Password</a></li>
-    </ul>
-  </div>
-  <div id="coming_soon">
-    <div class="huge">
-      Coming Soon
-    </div>
-    <br />
-    <div class="bigbig">
-      Thanks for checking us out, we're almost ready!
-    </div>
-    <div class="big">
-      Find out more about App Services <a href="#"><strong>here</strong></a>
-    </div>
-  </div>
-  <footer>
-    <div class="container-fluid">
-      <span id="copyright" class="pull-right">&copy; 2012 Apigee Corp. All rights reserved.</span>
-    </div>
-  </footer>
-</div>
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/config.js
----------------------------------------------------------------------
diff --git a/portal/config.js b/portal/config.js
index bcd2028..d48c0b8 100644
--- a/portal/config.js
+++ b/portal/config.js
@@ -1,2 +1,87 @@
 var Usergrid = Usergrid || {};
-//Usergrid.apiUrl = 'http://localhost:8080/'; //notice trailing slash
\ No newline at end of file
+
+Usergrid.showNotifcations = true;
+
+// used only if hostname does not match a real server name
+Usergrid.overrideUrl = 'https://api.usergrid.com/';
+
+Usergrid.options = {
+  client:{
+   // apiKey:'123456'
+  },
+  cssRefs:[],
+  "scriptReferences":{
+    "dev":[],
+    "main": []
+  },
+  menuItems:[
+    {path:'#!/org-overview', active:true,pic:'&#128193',title:'Org Overview'},
+    {path:'#!/getting-started/setup',pic:'&#128640;',title:'Getting Started'},
+    {path:'#!/app-overview/summary',pic:'&#59214;',title:'App Overview',
+      items:[
+        {path:'#!/app-overview/summary',pic:'&#128241;',title:'Summary'}
+      ]
+    },
+    {
+      path:'#!/users',pic:'&#59214;',title:'Users',
+      items:[
+        {path:'#!/users',pic:'&#128100;',title:'Users'},
+        {path:'#!/groups',pic:'&#128101;',title:'Groups'},
+        {path:'#!/roles',pic:'&#59170;',title:'Roles'}
+      ]
+    },
+    {
+      path:'#!/data',pic:'&#128248;',title:'Data',
+      items:[
+        {path:'#!/data',pic:'&#128254;',title:'Collections'}
+      ]
+    },
+    {
+      path:'#!/activities',pic:'&#59194;',title:'Activities'
+    },
+    {
+      path:'#!/configure/default-configs',pic:'&#9874;',title:'Configure',
+      items:[
+        {path:'#!/configure/default-configs',pic:'&#128214;',title:'Default Configs'},
+        {path:'#!/configure/beta-configs',pic:'&#59190;',title:'Beta Testing Configs'},
+        {path:'#!/configure/ab-configs',pic:'&#59146;',title:'A/B Configs'}
+      ]
+    },
+    {path:'#!/shell',pic:'&#9000;',title:'Shell'}
+  ]
+};
+
+Usergrid.regex = {
+  appNameRegex: new RegExp("^[0-9a-zA-Z.-]{3,25}$"),
+  usernameRegex: new RegExp("^[0-9a-zA-Z\.\_-]{4,25}$"),
+  nameRegex: new RegExp("^([0-9a-zA-Z@#$%^&!?;:.,'\"~*-:+_\[\\](){}/\\ |]{3,60})+$"),
+  roleNameRegex: new RegExp("^([0-9a-zA-Z./-]{3,25})+$"),
+  emailRegex: new RegExp("^(([0-9a-zA-Z]+[_\+.-]?)+@[0-9a-zA-Z]+[0-9,a-z,A-Z,.,-]*(.){1}[a-zA-Z]{2,4})+$"),
+  passwordRegex: new RegExp("^([0-9a-zA-Z@#$%^&!?<>;:.,'\"~*-:+_\[\\](){}/\\ |]{6,25})+$"),
+  pathRegex: new RegExp("^/[a-zA-Z0-9\.\*_~-]+(\/[a-zA-Z0-9\.\*_~-]+)*$"),
+  titleRegex: new RegExp("[a-zA-Z0-9.!-?]+[\/]?"),
+  urlRegex: new RegExp("^(http?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$"),
+  zipRegex: new RegExp("^[0-9]{5}(?:-[0-9]{4})?$"),
+  countryRegex: new RegExp("^[A-Za-z ]{3,100}$"),
+  stateRegex: new RegExp("^[A-Za-z ]{2,100}$"),
+  collectionNameRegex: new RegExp("^[0-9a-zA-Z_.]{3,25}$"),
+  appNameRegexDescription: "This field only allows : A-Z, a-z, 0-9, dot, and dash and must be between 3-25 characters.",
+  usernameRegexDescription: "This field only allows : A-Z, a-z, 0-9, dot, underscore and dash. Must be between 4 and 15 characters.",
+  nameRegexDescription: "Please enter a valid name. Must be betwee 3 and 60 characters.",
+  roleNameRegexDescription: "Role only allows : /, a-z, 0-9, dot, and dash. Must be between 3 and 25 characters.",
+  emailRegexDescription: "Please enter a valid email.",
+  passwordRegexDescription: "Please enter a valid password between 6 and 25 characters.",
+  pathRegexDescription: "Path must begin with a slash, path only allows: /, a-z, 0-9, dot, and dash, paths of the format:  /path/ or /path//path are not allowed",
+  titleRegexDescription: "Please enter a valid title.",
+  urlRegexDescription: "Please enter a valid url",
+  zipRegexDescription: "Please enter a valid zip code.",
+  countryRegexDescription: "Sorry only alphabetical characters or spaces are allowed. Must be between 3-100 characters.",
+  stateRegexDescription: "Sorry only alphabetical characters or spaces are allowed. Must be between 2-100 characters.",
+  collectionNameRegexDescription: "Collection name only allows : a-z A-Z 0-9. Must be between 3-25 characters."
+};
+
+try{
+  if(module && module.exports){
+    module.exports = Usergrid;
+  }
+}catch(e){}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/apigeeGlobalNavigation.css
----------------------------------------------------------------------
diff --git a/portal/css/apigeeGlobalNavigation.css b/portal/css/apigeeGlobalNavigation.css
new file mode 100644
index 0000000..88673d0
--- /dev/null
+++ b/portal/css/apigeeGlobalNavigation.css
@@ -0,0 +1,274 @@
+
+.dropdown {
+  position: relative;
+}
+.dropdown-toggle {
+  *margin-bottom: -3px;
+}
+.dropdown-toggle:active,
+.open .dropdown-toggle {
+  outline: 0;
+}
+.caret {
+  display: inline-block;
+  width: 0;
+  height: 0;
+  vertical-align: top;
+  border-left: 4px solid transparent;
+  border-right: 4px solid transparent;
+  border-top: 4px solid #000000;
+  opacity: 0.3;
+  filter: alpha(opacity=30);
+  content: "";
+}
+.dropdown .caret {
+  margin-top: 8px;
+  margin-left: 2px;
+}
+.dropdown:hover .caret,
+.open.dropdown .caret {
+  opacity: 1;
+  filter: alpha(opacity=100);
+}
+.dropdown-menu {
+  position: absolute;
+  top: 100%;
+  left: 0;
+  z-index: 1000;
+  float: left;
+  display: none;
+  min-width: 160px;
+  padding: 4px 0;
+  margin: 0;
+  list-style: none;
+  background-color: #ffffff;
+  border-color: #ccc;
+  border-color: rgba(0, 0, 0, 0.2);
+  border-style: solid;
+  border-width: 1px;
+  -webkit-border-radius: 0 0 5px 5px;
+  -moz-border-radius: 0 0 5px 5px;
+  border-radius: 0 0 5px 5px;
+  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+  -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+  -webkit-background-clip: padding-box;
+  -moz-background-clip: padding;
+  background-clip: padding-box;
+  *border-right-width: 2px;
+  *border-bottom-width: 2px;
+}
+.dropdown-menu.pull-right {
+  right: 0;
+  left: auto;
+}
+.dropdown-menu .divider {
+  height: 1px;
+  margin: 8px 1px;
+  overflow: hidden;
+  background-color: #e5e5e5;
+  border-bottom: 1px solid #ffffff;
+  *width: 100%;
+  *margin: -5px 0 5px;
+}
+.dropdown-menu a {
+  display: block;
+  padding: 3px 15px;
+  clear: both;
+  font-weight: normal;
+  line-height: 18px;
+  color: #333333;
+  white-space: nowrap;
+}
+.dropdown-menu li > a:hover,
+.dropdown-menu .active > a,
+.dropdown-menu .active > a:hover {
+  color: #ffffff;
+  text-decoration: none;
+  background-color: #0088cc;
+}
+.dropdown.open {
+  *z-index: 1000;
+}
+.dropdown.open .dropdown-toggle {
+  color: #ffffff;
+  background: #ccc;
+  background: rgba(0, 0, 0, 0.3);
+}
+.dropdown.open .dropdown-menu {
+  display: block;
+}
+.pull-right .dropdown-menu {
+  left: auto;
+  right: 0;
+}
+.dropup .caret,
+.navbar-fixed-bottom .dropdown .caret {
+  border-top: 0;
+  border-bottom: 4px solid #000000;
+  content: "\2191";
+}
+.dropup .dropdown-menu,
+.navbar-fixed-bottom .dropdown .dropdown-menu {
+  top: auto;
+  bottom: 100%;
+  margin-bottom: 1px;
+}
+
+.dropdownContainingSubmenu .dropdown-menu {
+  padding: 0;
+  margin-top: -4px;
+  min-width: auto;
+  background-color: #ffffff;
+  -webkit-border-radius: 0 0 0 0;
+  -moz-border-radius: 0 0 0 0;
+  border-radius: 0 0 0 0;
+  -webkit-box-shadow: 4px 4px 16px rgba(0, 0, 0, 0.25);
+  -moz-box-shadow: 4px 4px 16px rgba(0, 0, 0, 0.25);
+  box-shadow: 4px 4px 16px rgba(0, 0, 0, 0.25);
+  border-width: 1px;
+  border-top-width: 4px;
+  border-color: #bb2d16;
+}
+.dropdownContainingSubmenu .dropdown-menu a {
+  color: #494949;
+  padding: 7px 10px;
+}
+.dropdownContainingSubmenu .dropdown-menu a:hover {
+  color: #ffffff;
+  background-color: #f03800;
+}
+.dropdownContainingSubmenu .dropdown-menu .nav-header {
+  background-color: #f0f0f0;
+  margin-top: 0;
+  padding-left: 10px;
+}
+.dropdownContainingSubmenu .dropdown-menu .divider {
+  margin: 0;
+}
+.navbar .dropdown-menu:before {
+  content: normal;
+}
+.navbar .dropdown-menu:after {
+  content: normal;
+}
+/*#E02E01;*/
+#globalNav {
+  margin-left: 20px;
+  background-color: transparent;
+}
+#globalNav .dropdown-toggle {
+  border-radius: 3px;
+  padding-top: 3px;
+  padding-bottom: 3px;
+  margin-top: 7.5px;
+  margin-bottom: 7.5px;
+}
+#globalNav .dropdown-toggle :hover {
+  background-color: transparent;
+}
+#globalNav.active .caret {
+  opacity: .7;
+}
+#globalNav.active :hover .caret {
+  opacity: 1;
+}
+
+#globalNav ul ul a {
+  border-left: 1px solid #bb2d16;
+}
+#globalNav ul ul li {
+  position: relative;
+}
+#globalNav ul ul li:first-child {
+  border-bottom: 1px solid #bb2d16;
+}
+#globalNav ul ul a:before {
+  content: "";
+  width: 6px;
+  height: 32px;
+  position: absolute;
+  left: -6px;
+  top: 0;
+}
+#globalNav ul ul .active a:hover:before,
+#globalNav ul ul .active a:before {
+  background-image: url('images/triangleMenuItem_right.png');
+}
+#globalNav ul ul:hover a:before {
+  background-image: none;
+}
+#globalNav ul ul a:hover:before {
+  background-image: url('images/triangleMenuItem_right_hover.png');
+}
+#globalNav ul ul li a:hover {
+  border-color: transparent;
+}
+#globalNav .dropdown-menu {
+  width: 400px;
+}
+#globalNavDetail {
+  padding: 20px 10px 0 10px;
+  width: 250px;
+  height: 100%;
+  position: relative;
+  top: 0;
+}
+#globalNavDetail > div {
+  display: none;
+  color: graytext;
+  background-image: none;
+  background-repeat: no-repeat;
+  background-position: 0 0;
+  min-height: 64px;
+}
+#globalNavDetail > div.open {
+  display: inline-block;
+}
+#globalNavDetail > div .globalNavDetailApigeeLogo,
+#globalNavDetail > div .globalNavDetailSubtitle,
+#globalNavDetail > div .globalNavDetailTitle,
+#globalNavDetail > div .globalNavDetailDescription {
+  margin-left: 80px;
+}
+#globalNavDetail > div .globalNavDetailSubtitle {
+  font-size: 10px;
+  text-transform: uppercase;
+}
+#globalNavDetail > div .globalNavDetailTitle {
+  margin-top: 5px;
+  font-size: 20px;
+}
+#globalNavDetail > div .globalNavDetailDescription {
+  margin-top: 10px;
+  line-height: 17px;
+  font-style: oblique;
+}
+#globalNavDetail #globalNavDetailApigeeHome {
+  margin-top: -10px;
+  background-image: url('img/appswitcher/home_lg.png');
+}
+#globalNavDetail #globalNavDetailApigeeHome .globalNavDetailApigeeLogo {
+  margin-top: 10px;
+  background-image: url('img/appswitcher/logo_color.png');
+  width: 116px;
+  height: 40px;
+}
+#globalNavDetail #globalNavDetailAppServices {
+  background-image: url('img/appswitcher/appServices_lg.png');
+}
+#globalNavDetail #globalNavDetailApiPlatform {
+  background-image: url('img/appswitcher/apiPlatform_lg.png');
+}
+#globalNavDetail #globalNavDetailMobileAnalytics {
+  background-image: url('img/appswitcher/max_lg.png');
+}
+#globalNavDetail #globalNavDetailApiConsoles {
+  background-image: url('img/appswitcher/console_lg.png');
+}
+#globalNavSubmenuContainer {
+  float: right;
+}
+#globalNavSubmenuContainer ul {
+  margin-left: 0;
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/arsmarquette/ARSMaquettePro-Light.otf
----------------------------------------------------------------------
diff --git a/portal/css/arsmarquette/ARSMaquettePro-Light.otf b/portal/css/arsmarquette/ARSMaquettePro-Light.otf
new file mode 100644
index 0000000..afd066d
Binary files /dev/null and b/portal/css/arsmarquette/ARSMaquettePro-Light.otf differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/arsmarquette/ARSMaquettePro-Medium.otf
----------------------------------------------------------------------
diff --git a/portal/css/arsmarquette/ARSMaquettePro-Medium.otf b/portal/css/arsmarquette/ARSMaquettePro-Medium.otf
new file mode 100644
index 0000000..052dad8
Binary files /dev/null and b/portal/css/arsmarquette/ARSMaquettePro-Medium.otf differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/arsmarquette/ARSMaquettePro-Regular.otf
----------------------------------------------------------------------
diff --git a/portal/css/arsmarquette/ARSMaquettePro-Regular.otf b/portal/css/arsmarquette/ARSMaquettePro-Regular.otf
new file mode 100644
index 0000000..c738638
Binary files /dev/null and b/portal/css/arsmarquette/ARSMaquettePro-Regular.otf differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/custom-theme/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png
----------------------------------------------------------------------
diff --git a/portal/css/custom-theme/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png b/portal/css/custom-theme/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png
deleted file mode 100755
index 6348115..0000000
Binary files a/portal/css/custom-theme/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/custom-theme/images/ui-bg_flat_100_deedf7_40x100.png
----------------------------------------------------------------------
diff --git a/portal/css/custom-theme/images/ui-bg_flat_100_deedf7_40x100.png b/portal/css/custom-theme/images/ui-bg_flat_100_deedf7_40x100.png
deleted file mode 100755
index 85aaedf..0000000
Binary files a/portal/css/custom-theme/images/ui-bg_flat_100_deedf7_40x100.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/custom-theme/images/ui-bg_flat_100_e4f1fb_40x100.png
----------------------------------------------------------------------
diff --git a/portal/css/custom-theme/images/ui-bg_flat_100_e4f1fb_40x100.png b/portal/css/custom-theme/images/ui-bg_flat_100_e4f1fb_40x100.png
deleted file mode 100755
index 5a501f8..0000000
Binary files a/portal/css/custom-theme/images/ui-bg_flat_100_e4f1fb_40x100.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/custom-theme/images/ui-bg_flat_100_f2f5f7_40x100.png
----------------------------------------------------------------------
diff --git a/portal/css/custom-theme/images/ui-bg_flat_100_f2f5f7_40x100.png b/portal/css/custom-theme/images/ui-bg_flat_100_f2f5f7_40x100.png
deleted file mode 100755
index f0d20dd..0000000
Binary files a/portal/css/custom-theme/images/ui-bg_flat_100_f2f5f7_40x100.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/custom-theme/images/ui-bg_flat_15_cd0a0a_40x100.png
----------------------------------------------------------------------
diff --git a/portal/css/custom-theme/images/ui-bg_flat_15_cd0a0a_40x100.png b/portal/css/custom-theme/images/ui-bg_flat_15_cd0a0a_40x100.png
deleted file mode 100755
index 7680b54..0000000
Binary files a/portal/css/custom-theme/images/ui-bg_flat_15_cd0a0a_40x100.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/custom-theme/images/ui-bg_flat_50_3baae3_40x100.png
----------------------------------------------------------------------
diff --git a/portal/css/custom-theme/images/ui-bg_flat_50_3baae3_40x100.png b/portal/css/custom-theme/images/ui-bg_flat_50_3baae3_40x100.png
deleted file mode 100755
index a966891..0000000
Binary files a/portal/css/custom-theme/images/ui-bg_flat_50_3baae3_40x100.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/custom-theme/images/ui-bg_flat_80_d7ebf9_40x100.png
----------------------------------------------------------------------
diff --git a/portal/css/custom-theme/images/ui-bg_flat_80_d7ebf9_40x100.png b/portal/css/custom-theme/images/ui-bg_flat_80_d7ebf9_40x100.png
deleted file mode 100755
index 3f3d137..0000000
Binary files a/portal/css/custom-theme/images/ui-bg_flat_80_d7ebf9_40x100.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/custom-theme/images/ui-bg_highlight-hard_70_000000_1x100.png
----------------------------------------------------------------------
diff --git a/portal/css/custom-theme/images/ui-bg_highlight-hard_70_000000_1x100.png b/portal/css/custom-theme/images/ui-bg_highlight-hard_70_000000_1x100.png
deleted file mode 100755
index d588297..0000000
Binary files a/portal/css/custom-theme/images/ui-bg_highlight-hard_70_000000_1x100.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/custom-theme/images/ui-bg_highlight-soft_25_ffef8f_1x100.png
----------------------------------------------------------------------
diff --git a/portal/css/custom-theme/images/ui-bg_highlight-soft_25_ffef8f_1x100.png b/portal/css/custom-theme/images/ui-bg_highlight-soft_25_ffef8f_1x100.png
deleted file mode 100755
index 54aff0c..0000000
Binary files a/portal/css/custom-theme/images/ui-bg_highlight-soft_25_ffef8f_1x100.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/custom-theme/images/ui-icons_000000_256x240.png
----------------------------------------------------------------------
diff --git a/portal/css/custom-theme/images/ui-icons_000000_256x240.png b/portal/css/custom-theme/images/ui-icons_000000_256x240.png
deleted file mode 100644
index 7c211aa..0000000
Binary files a/portal/css/custom-theme/images/ui-icons_000000_256x240.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/custom-theme/images/ui-icons_2694e8_256x240.png
----------------------------------------------------------------------
diff --git a/portal/css/custom-theme/images/ui-icons_2694e8_256x240.png b/portal/css/custom-theme/images/ui-icons_2694e8_256x240.png
deleted file mode 100755
index e62b8f7..0000000
Binary files a/portal/css/custom-theme/images/ui-icons_2694e8_256x240.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/custom-theme/images/ui-icons_2e83ff_256x240.png
----------------------------------------------------------------------
diff --git a/portal/css/custom-theme/images/ui-icons_2e83ff_256x240.png b/portal/css/custom-theme/images/ui-icons_2e83ff_256x240.png
deleted file mode 100755
index 09d1cdc..0000000
Binary files a/portal/css/custom-theme/images/ui-icons_2e83ff_256x240.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/custom-theme/images/ui-icons_3d80b3_256x240.png
----------------------------------------------------------------------
diff --git a/portal/css/custom-theme/images/ui-icons_3d80b3_256x240.png b/portal/css/custom-theme/images/ui-icons_3d80b3_256x240.png
deleted file mode 100755
index 52c3cc6..0000000
Binary files a/portal/css/custom-theme/images/ui-icons_3d80b3_256x240.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/custom-theme/images/ui-icons_72a7cf_256x240.png
----------------------------------------------------------------------
diff --git a/portal/css/custom-theme/images/ui-icons_72a7cf_256x240.png b/portal/css/custom-theme/images/ui-icons_72a7cf_256x240.png
deleted file mode 100755
index 0d20b73..0000000
Binary files a/portal/css/custom-theme/images/ui-icons_72a7cf_256x240.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/custom-theme/images/ui-icons_ffffff_256x240.png
----------------------------------------------------------------------
diff --git a/portal/css/custom-theme/images/ui-icons_ffffff_256x240.png b/portal/css/custom-theme/images/ui-icons_ffffff_256x240.png
deleted file mode 100755
index 42f8f99..0000000
Binary files a/portal/css/custom-theme/images/ui-icons_ffffff_256x240.png and /dev/null differ


[56/61] [abbrv] git commit: removed lingering puppet files

Posted by sn...@apache.org.
removed lingering puppet files


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/616641ea
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/616641ea
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/616641ea

Branch: refs/pull/35/merge
Commit: 616641ead62b13623d10164197495b6f211fc3a2
Parents: ebc5f18
Author: Rod Simpson <ro...@apigee.com>
Authored: Mon Jan 27 16:05:58 2014 -0700
Committer: Rod Simpson <ro...@apigee.com>
Committed: Mon Jan 27 16:05:58 2014 -0700

----------------------------------------------------------------------
 portal/.puppet/.gitignore                   |  2 -
 portal/.puppet/Puppetfile                   |  3 --
 portal/.puppet/Puppetfile.lock              | 12 ------
 portal/.puppet/bootstrap.sh                 | 18 ---------
 portal/.puppet/manifests/main.pp            | 49 ------------------------
 portal/.puppet/modules/.gitignore           |  2 -
 portal/.puppet/templates/vhost-ssl.conf.erb | 33 ----------------
 7 files changed, 119 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/616641ea/portal/.puppet/.gitignore
----------------------------------------------------------------------
diff --git a/portal/.puppet/.gitignore b/portal/.puppet/.gitignore
deleted file mode 100644
index 0dca211..0000000
--- a/portal/.puppet/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-.librarian
-.tmp
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/616641ea/portal/.puppet/Puppetfile
----------------------------------------------------------------------
diff --git a/portal/.puppet/Puppetfile b/portal/.puppet/Puppetfile
deleted file mode 100644
index ac9c577..0000000
--- a/portal/.puppet/Puppetfile
+++ /dev/null
@@ -1,3 +0,0 @@
-forge "http://forge.puppetlabs.com"
-
-mod "puppetlabs/apache"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/616641ea/portal/.puppet/Puppetfile.lock
----------------------------------------------------------------------
diff --git a/portal/.puppet/Puppetfile.lock b/portal/.puppet/Puppetfile.lock
deleted file mode 100644
index 0f25dd0..0000000
--- a/portal/.puppet/Puppetfile.lock
+++ /dev/null
@@ -1,12 +0,0 @@
-FORGE
-  remote: http://forge.puppetlabs.com
-  specs:
-    puppetlabs/apache (0.6.0)
-      puppetlabs/firewall (>= 0.0.4)
-      puppetlabs/stdlib (>= 2.2.1)
-    puppetlabs/firewall (0.2.1)
-    puppetlabs/stdlib (3.2.0)
-
-DEPENDENCIES
-  puppetlabs/apache (>= 0)
-

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/616641ea/portal/.puppet/bootstrap.sh
----------------------------------------------------------------------
diff --git a/portal/.puppet/bootstrap.sh b/portal/.puppet/bootstrap.sh
deleted file mode 100644
index 2b2fb64..0000000
--- a/portal/.puppet/bootstrap.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-
-BOOTSTRAP_LOCK=/tmp/bootsrap.lock
-PUPPET_DIR=/vagrant/.puppet/
-
-if [ ! -f $BOOTSTRAP_LOCK ]; then
-    apt-get update
-    apt-get install git -y
-
-    if [ `gem query --local | grep librarian-puppet-maestrodev | wc -l` -eq 0 ]; then
-      gem install librarian-puppet-maestrodev
-      cd $PUPPET_DIR && librarian-puppet install --clean
-    fi
-
-    touch $BOOTSTRAP_LOCK
-fi
-
-cd $PUPPET_DIR && librarian-puppet update
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/616641ea/portal/.puppet/manifests/main.pp
----------------------------------------------------------------------
diff --git a/portal/.puppet/manifests/main.pp b/portal/.puppet/manifests/main.pp
deleted file mode 100644
index 9f23c27..0000000
--- a/portal/.puppet/manifests/main.pp
+++ /dev/null
@@ -1,49 +0,0 @@
-$server_name = 'usergrid.dev'
-$ssl_path = '/etc/apache2/ssl/'
-$key_path = "${ssl_path}${server_name}.key"
-$cert_path = "${ssl_path}${server_name}.cert"
-
-Exec { path => '/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin' }
-
-package { 'openssl':
-    ensure => installed
-}
-
-file { $ssl_path:
-    ensure => directory,
-    owner => "root",
-    group => "root"
-}
-
-exec { 'openssl-genrsa':
-    command => "openssl genrsa -out ${key_path} 2048",
-    creates => $key_path,
-    require => File[$ssl_path]
-}
-
-exec { 'openssl-req':
-    command => "openssl req -new -x509 -key ${key_path} -out ${cert_path} -days 3650 -subj /CN=${server_name}",
-    creates => $cert_path,
-    require => Exec['openssl-genrsa']
-}
-
-class { 'apache': }
-
-apache::mod { 'env': }
-
-apache::vhost { $server_name:
-    port     => '443',
-    docroot  => '/vagrant',
-    template => 'vhost-ssl.conf.erb',
-    require  => Exec['openssl-req']
-}
-
-package { 'compass':
-    ensure => present,
-    provider => gem
-}
-
-package { 'bootstrap-sass':
-    ensure => '2.0.0',
-    provider => gem
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/616641ea/portal/.puppet/modules/.gitignore
----------------------------------------------------------------------
diff --git a/portal/.puppet/modules/.gitignore b/portal/.puppet/modules/.gitignore
deleted file mode 100644
index c96a04f..0000000
--- a/portal/.puppet/modules/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*
-!.gitignore
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/616641ea/portal/.puppet/templates/vhost-ssl.conf.erb
----------------------------------------------------------------------
diff --git a/portal/.puppet/templates/vhost-ssl.conf.erb b/portal/.puppet/templates/vhost-ssl.conf.erb
deleted file mode 100644
index 3eb916c..0000000
--- a/portal/.puppet/templates/vhost-ssl.conf.erb
+++ /dev/null
@@ -1,33 +0,0 @@
-# ************************************
-# Managed by Puppet
-# ************************************
-
-NameVirtualHost <%= vhost_name %>:<%= port %>
-<VirtualHost <%= vhost_name %>:<%= port %>>
-  ServerName <%= srvname %>
-<% if serveradmin %>
-  ServerAdmin <%= serveradmin %>
-<% end %>
-<% if serveraliases.is_a? Array -%>
-<% serveraliases.each do |name| -%><%= "  ServerAlias #{name}\n" %><% end -%>
-<% elsif serveraliases != '' -%>
-<%= "  ServerAlias #{serveraliases}" %>
-<% end -%>
-  DocumentRoot <%= docroot %>
-  <Directory <%= docroot %>>
-    Options <%= options %>
-    AllowOverride <%= Array(override).join(' ') %>
-    Order allow,deny
-    allow from all
-  </Directory>
-  ErrorLog <%= logroot %>/<%= name %>_error.log
-  LogLevel warn
-  CustomLog <%= logroot %>/<%= name %>_access.log combined
-  ServerSignature Off
-
-  SSLEngine on
-  SSLCertificateKeyFile <%= key_path %>
-  SSLCertificateFile <%= cert_path %>
-  SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
-</VirtualHost>
-


[29/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/modules/canvas-tools.src.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/modules/canvas-tools.src.js b/portal/js/libs/Highcharts-2.3.5/js/modules/canvas-tools.src.js
new file mode 100644
index 0000000..8e8954d
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/modules/canvas-tools.src.js
@@ -0,0 +1,3113 @@
+/**
+ * @license A class to parse color values
+ * @author Stoyan Stefanov <ss...@gmail.com>
+ * @link   http://www.phpied.com/rgb-color-parser-in-javascript/
+ * Use it if you like it
+ *
+ */
+function RGBColor(color_string)
+{
+    this.ok = false;
+
+    // strip any leading #
+    if (color_string.charAt(0) == '#') { // remove # if any
+        color_string = color_string.substr(1,6);
+    }
+
+    color_string = color_string.replace(/ /g,'');
+    color_string = color_string.toLowerCase();
+
+    // before getting into regexps, try simple matches
+    // and overwrite the input
+    var simple_colors = {
+        aliceblue: 'f0f8ff',
+        antiquewhite: 'faebd7',
+        aqua: '00ffff',
+        aquamarine: '7fffd4',
+        azure: 'f0ffff',
+        beige: 'f5f5dc',
+        bisque: 'ffe4c4',
+        black: '000000',
+        blanchedalmond: 'ffebcd',
+        blue: '0000ff',
+        blueviolet: '8a2be2',
+        brown: 'a52a2a',
+        burlywood: 'deb887',
+        cadetblue: '5f9ea0',
+        chartreuse: '7fff00',
+        chocolate: 'd2691e',
+        coral: 'ff7f50',
+        cornflowerblue: '6495ed',
+        cornsilk: 'fff8dc',
+        crimson: 'dc143c',
+        cyan: '00ffff',
+        darkblue: '00008b',
+        darkcyan: '008b8b',
+        darkgoldenrod: 'b8860b',
+        darkgray: 'a9a9a9',
+        darkgreen: '006400',
+        darkkhaki: 'bdb76b',
+        darkmagenta: '8b008b',
+        darkolivegreen: '556b2f',
+        darkorange: 'ff8c00',
+        darkorchid: '9932cc',
+        darkred: '8b0000',
+        darksalmon: 'e9967a',
+        darkseagreen: '8fbc8f',
+        darkslateblue: '483d8b',
+        darkslategray: '2f4f4f',
+        darkturquoise: '00ced1',
+        darkviolet: '9400d3',
+        deeppink: 'ff1493',
+        deepskyblue: '00bfff',
+        dimgray: '696969',
+        dodgerblue: '1e90ff',
+        feldspar: 'd19275',
+        firebrick: 'b22222',
+        floralwhite: 'fffaf0',
+        forestgreen: '228b22',
+        fuchsia: 'ff00ff',
+        gainsboro: 'dcdcdc',
+        ghostwhite: 'f8f8ff',
+        gold: 'ffd700',
+        goldenrod: 'daa520',
+        gray: '808080',
+        green: '008000',
+        greenyellow: 'adff2f',
+        honeydew: 'f0fff0',
+        hotpink: 'ff69b4',
+        indianred : 'cd5c5c',
+        indigo : '4b0082',
+        ivory: 'fffff0',
+        khaki: 'f0e68c',
+        lavender: 'e6e6fa',
+        lavenderblush: 'fff0f5',
+        lawngreen: '7cfc00',
+        lemonchiffon: 'fffacd',
+        lightblue: 'add8e6',
+        lightcoral: 'f08080',
+        lightcyan: 'e0ffff',
+        lightgoldenrodyellow: 'fafad2',
+        lightgrey: 'd3d3d3',
+        lightgreen: '90ee90',
+        lightpink: 'ffb6c1',
+        lightsalmon: 'ffa07a',
+        lightseagreen: '20b2aa',
+        lightskyblue: '87cefa',
+        lightslateblue: '8470ff',
+        lightslategray: '778899',
+        lightsteelblue: 'b0c4de',
+        lightyellow: 'ffffe0',
+        lime: '00ff00',
+        limegreen: '32cd32',
+        linen: 'faf0e6',
+        magenta: 'ff00ff',
+        maroon: '800000',
+        mediumaquamarine: '66cdaa',
+        mediumblue: '0000cd',
+        mediumorchid: 'ba55d3',
+        mediumpurple: '9370d8',
+        mediumseagreen: '3cb371',
+        mediumslateblue: '7b68ee',
+        mediumspringgreen: '00fa9a',
+        mediumturquoise: '48d1cc',
+        mediumvioletred: 'c71585',
+        midnightblue: '191970',
+        mintcream: 'f5fffa',
+        mistyrose: 'ffe4e1',
+        moccasin: 'ffe4b5',
+        navajowhite: 'ffdead',
+        navy: '000080',
+        oldlace: 'fdf5e6',
+        olive: '808000',
+        olivedrab: '6b8e23',
+        orange: 'ffa500',
+        orangered: 'ff4500',
+        orchid: 'da70d6',
+        palegoldenrod: 'eee8aa',
+        palegreen: '98fb98',
+        paleturquoise: 'afeeee',
+        palevioletred: 'd87093',
+        papayawhip: 'ffefd5',
+        peachpuff: 'ffdab9',
+        peru: 'cd853f',
+        pink: 'ffc0cb',
+        plum: 'dda0dd',
+        powderblue: 'b0e0e6',
+        purple: '800080',
+        red: 'ff0000',
+        rosybrown: 'bc8f8f',
+        royalblue: '4169e1',
+        saddlebrown: '8b4513',
+        salmon: 'fa8072',
+        sandybrown: 'f4a460',
+        seagreen: '2e8b57',
+        seashell: 'fff5ee',
+        sienna: 'a0522d',
+        silver: 'c0c0c0',
+        skyblue: '87ceeb',
+        slateblue: '6a5acd',
+        slategray: '708090',
+        snow: 'fffafa',
+        springgreen: '00ff7f',
+        steelblue: '4682b4',
+        tan: 'd2b48c',
+        teal: '008080',
+        thistle: 'd8bfd8',
+        tomato: 'ff6347',
+        turquoise: '40e0d0',
+        violet: 'ee82ee',
+        violetred: 'd02090',
+        wheat: 'f5deb3',
+        white: 'ffffff',
+        whitesmoke: 'f5f5f5',
+        yellow: 'ffff00',
+        yellowgreen: '9acd32'
+    };
+    for (var key in simple_colors) {
+        if (color_string == key) {
+            color_string = simple_colors[key];
+        }
+    }
+    // emd of simple type-in colors
+
+    // array of color definition objects
+    var color_defs = [
+        {
+            re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
+            example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],
+            process: function (bits){
+                return [
+                    parseInt(bits[1]),
+                    parseInt(bits[2]),
+                    parseInt(bits[3])
+                ];
+            }
+        },
+        {
+            re: /^(\w{2})(\w{2})(\w{2})$/,
+            example: ['#00ff00', '336699'],
+            process: function (bits){
+                return [
+                    parseInt(bits[1], 16),
+                    parseInt(bits[2], 16),
+                    parseInt(bits[3], 16)
+                ];
+            }
+        },
+        {
+            re: /^(\w{1})(\w{1})(\w{1})$/,
+            example: ['#fb0', 'f0f'],
+            process: function (bits){
+                return [
+                    parseInt(bits[1] + bits[1], 16),
+                    parseInt(bits[2] + bits[2], 16),
+                    parseInt(bits[3] + bits[3], 16)
+                ];
+            }
+        }
+    ];
+
+    // search through the definitions to find a match
+    for (var i = 0; i < color_defs.length; i++) {
+        var re = color_defs[i].re;
+        var processor = color_defs[i].process;
+        var bits = re.exec(color_string);
+        if (bits) {
+            channels = processor(bits);
+            this.r = channels[0];
+            this.g = channels[1];
+            this.b = channels[2];
+            this.ok = true;
+        }
+
+    }
+
+    // validate/cleanup values
+    this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);
+    this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);
+    this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);
+
+    // some getters
+    this.toRGB = function () {
+        return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';
+    }
+    this.toHex = function () {
+        var r = this.r.toString(16);
+        var g = this.g.toString(16);
+        var b = this.b.toString(16);
+        if (r.length == 1) r = '0' + r;
+        if (g.length == 1) g = '0' + g;
+        if (b.length == 1) b = '0' + b;
+        return '#' + r + g + b;
+    }
+
+    // help
+    this.getHelpXML = function () {
+
+        var examples = new Array();
+        // add regexps
+        for (var i = 0; i < color_defs.length; i++) {
+            var example = color_defs[i].example;
+            for (var j = 0; j < example.length; j++) {
+                examples[examples.length] = example[j];
+            }
+        }
+        // add type-in colors
+        for (var sc in simple_colors) {
+            examples[examples.length] = sc;
+        }
+
+        var xml = document.createElement('ul');
+        xml.setAttribute('id', 'rgbcolor-examples');
+        for (var i = 0; i < examples.length; i++) {
+            try {
+                var list_item = document.createElement('li');
+                var list_color = new RGBColor(examples[i]);
+                var example_div = document.createElement('div');
+                example_div.style.cssText =
+                        'margin: 3px; '
+                        + 'border: 1px solid black; '
+                        + 'background:' + list_color.toHex() + '; '
+                        + 'color:' + list_color.toHex()
+                ;
+                example_div.appendChild(document.createTextNode('test'));
+                var list_item_value = document.createTextNode(
+                    ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex()
+                );
+                list_item.appendChild(example_div);
+                list_item.appendChild(list_item_value);
+                xml.appendChild(list_item);
+
+            } catch(e){}
+        }
+        return xml;
+
+    }
+
+}
+
+/**
+ * @license canvg.js - Javascript SVG parser and renderer on Canvas
+ * MIT Licensed 
+ * Gabe Lerner (gabelerner@gmail.com)
+ * http://code.google.com/p/canvg/
+ *
+ * Requires: rgbcolor.js - http://www.phpied.com/rgb-color-parser-in-javascript/
+ *
+ */
+if(!window.console) {
+	window.console = {};
+	window.console.log = function(str) {};
+	window.console.dir = function(str) {};
+}
+
+if(!Array.prototype.indexOf){
+	Array.prototype.indexOf = function(obj){
+		for(var i=0; i<this.length; i++){
+			if(this[i]==obj){
+				return i;
+			}
+		}
+		return -1;
+	}
+}
+
+(function(){
+	// canvg(target, s)
+	// empty parameters: replace all 'svg' elements on page with 'canvas' elements
+	// target: canvas element or the id of a canvas element
+	// s: svg string, url to svg file, or xml document
+	// opts: optional hash of options
+	//		 ignoreMouse: true => ignore mouse events
+	//		 ignoreAnimation: true => ignore animations
+	//		 ignoreDimensions: true => does not try to resize canvas
+	//		 ignoreClear: true => does not clear canvas
+	//		 offsetX: int => draws at a x offset
+	//		 offsetY: int => draws at a y offset
+	//		 scaleWidth: int => scales horizontally to width
+	//		 scaleHeight: int => scales vertically to height
+	//		 renderCallback: function => will call the function after the first render is completed
+	//		 forceRedraw: function => will call the function on every frame, if it returns true, will redraw
+	this.canvg = function (target, s, opts) {
+		// no parameters
+		if (target == null && s == null && opts == null) {
+			var svgTags = document.getElementsByTagName('svg');
+			for (var i=0; i<svgTags.length; i++) {
+				var svgTag = svgTags[i];
+				var c = document.createElement('canvas');
+				c.width = svgTag.clientWidth;
+				c.height = svgTag.clientHeight;
+				svgTag.parentNode.insertBefore(c, svgTag);
+				svgTag.parentNode.removeChild(svgTag);
+				var div = document.createElement('div');
+				div.appendChild(svgTag);
+				canvg(c, div.innerHTML);
+			}
+			return;
+		}	
+		opts = opts || {};
+	
+		if (typeof target == 'string') {
+			target = document.getElementById(target);
+		}
+		
+		// reuse class per canvas
+		var svg;
+		if (target.svg == null) {
+			svg = build();
+			target.svg = svg;
+		}
+		else {
+			svg = target.svg;
+			svg.stop();
+		}
+		svg.opts = opts;
+		
+		var ctx = target.getContext('2d');
+		if (typeof(s.documentElement) != 'undefined') {
+			// load from xml doc
+			svg.loadXmlDoc(ctx, s);
+		}
+		else if (s.substr(0,1) == '<') {
+			// load from xml string
+			svg.loadXml(ctx, s);
+		}
+		else {
+			// load from url
+			svg.load(ctx, s);
+		}
+	}
+
+	function build() {
+		var svg = { };
+		
+		svg.FRAMERATE = 30;
+		svg.MAX_VIRTUAL_PIXELS = 30000;
+		
+		// globals
+		svg.init = function(ctx) {
+			svg.Definitions = {};
+			svg.Styles = {};
+			svg.Animations = [];
+			svg.Images = [];
+			svg.ctx = ctx;
+			svg.ViewPort = new (function () {
+				this.viewPorts = [];
+				this.Clear = function() { this.viewPorts = []; }
+				this.SetCurrent = function(width, height) { this.viewPorts.push({ width: width, height: height }); }
+				this.RemoveCurrent = function() { this.viewPorts.pop(); }
+				this.Current = function() { return this.viewPorts[this.viewPorts.length - 1]; }
+				this.width = function() { return this.Current().width; }
+				this.height = function() { return this.Current().height; }
+				this.ComputeSize = function(d) {
+					if (d != null && typeof(d) == 'number') return d;
+					if (d == 'x') return this.width();
+					if (d == 'y') return this.height();
+					return Math.sqrt(Math.pow(this.width(), 2) + Math.pow(this.height(), 2)) / Math.sqrt(2);			
+				}
+			});
+		}
+		svg.init();
+		
+		// images loaded
+		svg.ImagesLoaded = function() { 
+			for (var i=0; i<svg.Images.length; i++) {
+				if (!svg.Images[i].loaded) return false;
+			}
+			return true;
+		}
+
+		// trim
+		svg.trim = function(s) { return s.replace(/^\s+|\s+$/g, ''); }
+		
+		// compress spaces
+		svg.compressSpaces = function(s) { return s.replace(/[\s\r\t\n]+/gm,' '); }
+		
+		// ajax
+		svg.ajax = function(url) {
+			var AJAX;
+			if(window.XMLHttpRequest){AJAX=new XMLHttpRequest();}
+			else{AJAX=new ActiveXObject('Microsoft.XMLHTTP');}
+			if(AJAX){
+			   AJAX.open('GET',url,false);
+			   AJAX.send(null);
+			   return AJAX.responseText;
+			}
+			return null;
+		} 
+		
+		// parse xml
+		svg.parseXml = function(xml) {
+			if (window.DOMParser)
+			{
+				var parser = new DOMParser();
+				return parser.parseFromString(xml, 'text/xml');
+			}
+			else 
+			{
+				xml = xml.replace(/<!DOCTYPE svg[^>]*>/, '');
+				var xmlDoc = new ActiveXObject('Microsoft.XMLDOM');
+				xmlDoc.async = 'false';
+				xmlDoc.loadXML(xml); 
+				return xmlDoc;
+			}		
+		}
+		
+		svg.Property = function(name, value) {
+			this.name = name;
+			this.value = value;
+			
+			this.hasValue = function() {
+				return (this.value != null && this.value !== '');
+			}
+							
+			// return the numerical value of the property
+			this.numValue = function() {
+				if (!this.hasValue()) return 0;
+				
+				var n = parseFloat(this.value);
+				if ((this.value + '').match(/%$/)) {
+					n = n / 100.0;
+				}
+				return n;
+			}
+			
+			this.valueOrDefault = function(def) {
+				if (this.hasValue()) return this.value;
+				return def;
+			}
+			
+			this.numValueOrDefault = function(def) {
+				if (this.hasValue()) return this.numValue();
+				return def;
+			}
+			
+			/* EXTENSIONS */
+			var that = this;
+			
+			// color extensions
+			this.Color = {
+				// augment the current color value with the opacity
+				addOpacity: function(opacity) {
+					var newValue = that.value;
+					if (opacity != null && opacity != '') {
+						var color = new RGBColor(that.value);
+						if (color.ok) {
+							newValue = 'rgba(' + color.r + ', ' + color.g + ', ' + color.b + ', ' + opacity + ')';
+						}
+					}
+					return new svg.Property(that.name, newValue);
+				}
+			}
+			
+			// definition extensions
+			this.Definition = {
+				// get the definition from the definitions table
+				getDefinition: function() {
+					var name = that.value.replace(/^(url\()?#([^\)]+)\)?$/, '$2');
+					return svg.Definitions[name];
+				},
+				
+				isUrl: function() {
+					return that.value.indexOf('url(') == 0
+				},
+				
+				getFillStyle: function(e) {
+					var def = this.getDefinition();
+					
+					// gradient
+					if (def != null && def.createGradient) {
+						return def.createGradient(svg.ctx, e);
+					}
+					
+					// pattern
+					if (def != null && def.createPattern) {
+						return def.createPattern(svg.ctx, e);
+					}
+					
+					return null;
+				}
+			}
+			
+			// length extensions
+			this.Length = {
+				DPI: function(viewPort) {
+					return 96.0; // TODO: compute?
+				},
+				
+				EM: function(viewPort) {
+					var em = 12;
+					
+					var fontSize = new svg.Property('fontSize', svg.Font.Parse(svg.ctx.font).fontSize);
+					if (fontSize.hasValue()) em = fontSize.Length.toPixels(viewPort);
+					
+					return em;
+				},
+			
+				// get the length as pixels
+				toPixels: function(viewPort) {
+					if (!that.hasValue()) return 0;
+					var s = that.value+'';
+					if (s.match(/em$/)) return that.numValue() * this.EM(viewPort);
+					if (s.match(/ex$/)) return that.numValue() * this.EM(viewPort) / 2.0;
+					if (s.match(/px$/)) return that.numValue();
+					if (s.match(/pt$/)) return that.numValue() * 1.25;
+					if (s.match(/pc$/)) return that.numValue() * 15;
+					if (s.match(/cm$/)) return that.numValue() * this.DPI(viewPort) / 2.54;
+					if (s.match(/mm$/)) return that.numValue() * this.DPI(viewPort) / 25.4;
+					if (s.match(/in$/)) return that.numValue() * this.DPI(viewPort);
+					if (s.match(/%$/)) return that.numValue() * svg.ViewPort.ComputeSize(viewPort);
+					return that.numValue();
+				}
+			}
+			
+			// time extensions
+			this.Time = {
+				// get the time as milliseconds
+				toMilliseconds: function() {
+					if (!that.hasValue()) return 0;
+					var s = that.value+'';
+					if (s.match(/s$/)) return that.numValue() * 1000;
+					if (s.match(/ms$/)) return that.numValue();
+					return that.numValue();
+				}
+			}
+			
+			// angle extensions
+			this.Angle = {
+				// get the angle as radians
+				toRadians: function() {
+					if (!that.hasValue()) return 0;
+					var s = that.value+'';
+					if (s.match(/deg$/)) return that.numValue() * (Math.PI / 180.0);
+					if (s.match(/grad$/)) return that.numValue() * (Math.PI / 200.0);
+					if (s.match(/rad$/)) return that.numValue();
+					return that.numValue() * (Math.PI / 180.0);
+				}
+			}
+		}
+		
+		// fonts
+		svg.Font = new (function() {
+			this.Styles = ['normal','italic','oblique','inherit'];
+			this.Variants = ['normal','small-caps','inherit'];
+			this.Weights = ['normal','bold','bolder','lighter','100','200','300','400','500','600','700','800','900','inherit'];
+			
+			this.CreateFont = function(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit) { 
+				var f = inherit != null ? this.Parse(inherit) : this.CreateFont('', '', '', '', '', svg.ctx.font);
+				return { 
+					fontFamily: fontFamily || f.fontFamily, 
+					fontSize: fontSize || f.fontSize, 
+					fontStyle: fontStyle || f.fontStyle, 
+					fontWeight: fontWeight || f.fontWeight, 
+					fontVariant: fontVariant || f.fontVariant,
+					toString: function () { return [this.fontStyle, this.fontVariant, this.fontWeight, this.fontSize, this.fontFamily].join(' ') } 
+				} 
+			}
+			
+			var that = this;
+			this.Parse = function(s) {
+				var f = {};
+				var d = svg.trim(svg.compressSpaces(s || '')).split(' ');
+				var set = { fontSize: false, fontStyle: false, fontWeight: false, fontVariant: false }
+				var ff = '';
+				for (var i=0; i<d.length; i++) {
+					if (!set.fontStyle && that.Styles.indexOf(d[i]) != -1) { if (d[i] != 'inherit') f.fontStyle = d[i]; set.fontStyle = true; }
+					else if (!set.fontVariant && that.Variants.indexOf(d[i]) != -1) { if (d[i] != 'inherit') f.fontVariant = d[i]; set.fontStyle = set.fontVariant = true;	}
+					else if (!set.fontWeight && that.Weights.indexOf(d[i]) != -1) {	if (d[i] != 'inherit') f.fontWeight = d[i]; set.fontStyle = set.fontVariant = set.fontWeight = true; }
+					else if (!set.fontSize) { if (d[i] != 'inherit') f.fontSize = d[i].split('/')[0]; set.fontStyle = set.fontVariant = set.fontWeight = set.fontSize = true; }
+					else { if (d[i] != 'inherit') ff += d[i]; }
+				} if (ff != '') f.fontFamily = ff;
+				return f;
+			}
+		});
+		
+		// points and paths
+		svg.ToNumberArray = function(s) {
+			var a = svg.trim(svg.compressSpaces((s || '').replace(/,/g, ' '))).split(' ');
+			for (var i=0; i<a.length; i++) {
+				a[i] = parseFloat(a[i]);
+			}
+			return a;
+		}		
+		svg.Point = function(x, y) {
+			this.x = x;
+			this.y = y;
+			
+			this.angleTo = function(p) {
+				return Math.atan2(p.y - this.y, p.x - this.x);
+			}
+			
+			this.applyTransform = function(v) {
+				var xp = this.x * v[0] + this.y * v[2] + v[4];
+				var yp = this.x * v[1] + this.y * v[3] + v[5];
+				this.x = xp;
+				this.y = yp;
+			}
+		}
+		svg.CreatePoint = function(s) {
+			var a = svg.ToNumberArray(s);
+			return new svg.Point(a[0], a[1]);
+		}
+		svg.CreatePath = function(s) {
+			var a = svg.ToNumberArray(s);
+			var path = [];
+			for (var i=0; i<a.length; i+=2) {
+				path.push(new svg.Point(a[i], a[i+1]));
+			}
+			return path;
+		}
+		
+		// bounding box
+		svg.BoundingBox = function(x1, y1, x2, y2) { // pass in initial points if you want
+			this.x1 = Number.NaN;
+			this.y1 = Number.NaN;
+			this.x2 = Number.NaN;
+			this.y2 = Number.NaN;
+			
+			this.x = function() { return this.x1; }
+			this.y = function() { return this.y1; }
+			this.width = function() { return this.x2 - this.x1; }
+			this.height = function() { return this.y2 - this.y1; }
+			
+			this.addPoint = function(x, y) {	
+				if (x != null) {
+					if (isNaN(this.x1) || isNaN(this.x2)) {
+						this.x1 = x;
+						this.x2 = x;
+					}
+					if (x < this.x1) this.x1 = x;
+					if (x > this.x2) this.x2 = x;
+				}
+			
+				if (y != null) {
+					if (isNaN(this.y1) || isNaN(this.y2)) {
+						this.y1 = y;
+						this.y2 = y;
+					}
+					if (y < this.y1) this.y1 = y;
+					if (y > this.y2) this.y2 = y;
+				}
+			}			
+			this.addX = function(x) { this.addPoint(x, null); }
+			this.addY = function(y) { this.addPoint(null, y); }
+			
+			this.addBoundingBox = function(bb) {
+				this.addPoint(bb.x1, bb.y1);
+				this.addPoint(bb.x2, bb.y2);
+			}
+			
+			this.addQuadraticCurve = function(p0x, p0y, p1x, p1y, p2x, p2y) {
+				var cp1x = p0x + 2/3 * (p1x - p0x); // CP1 = QP0 + 2/3 *(QP1-QP0)
+				var cp1y = p0y + 2/3 * (p1y - p0y); // CP1 = QP0 + 2/3 *(QP1-QP0)
+				var cp2x = cp1x + 1/3 * (p2x - p0x); // CP2 = CP1 + 1/3 *(QP2-QP0)
+				var cp2y = cp1y + 1/3 * (p2y - p0y); // CP2 = CP1 + 1/3 *(QP2-QP0)
+				this.addBezierCurve(p0x, p0y, cp1x, cp2x, cp1y,	cp2y, p2x, p2y);
+			}
+			
+			this.addBezierCurve = function(p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) {
+				// from http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html
+				var p0 = [p0x, p0y], p1 = [p1x, p1y], p2 = [p2x, p2y], p3 = [p3x, p3y];
+				this.addPoint(p0[0], p0[1]);
+				this.addPoint(p3[0], p3[1]);
+				
+				for (i=0; i<=1; i++) {
+					var f = function(t) { 
+						return Math.pow(1-t, 3) * p0[i]
+						+ 3 * Math.pow(1-t, 2) * t * p1[i]
+						+ 3 * (1-t) * Math.pow(t, 2) * p2[i]
+						+ Math.pow(t, 3) * p3[i];
+					}
+					
+					var b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];
+					var a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];
+					var c = 3 * p1[i] - 3 * p0[i];
+					
+					if (a == 0) {
+						if (b == 0) continue;
+						var t = -c / b;
+						if (0 < t && t < 1) {
+							if (i == 0) this.addX(f(t));
+							if (i == 1) this.addY(f(t));
+						}
+						continue;
+					}
+					
+					var b2ac = Math.pow(b, 2) - 4 * c * a;
+					if (b2ac < 0) continue;
+					var t1 = (-b + Math.sqrt(b2ac)) / (2 * a);
+					if (0 < t1 && t1 < 1) {
+						if (i == 0) this.addX(f(t1));
+						if (i == 1) this.addY(f(t1));
+					}
+					var t2 = (-b - Math.sqrt(b2ac)) / (2 * a);
+					if (0 < t2 && t2 < 1) {
+						if (i == 0) this.addX(f(t2));
+						if (i == 1) this.addY(f(t2));
+					}
+				}
+			}
+			
+			this.isPointInBox = function(x, y) {
+				return (this.x1 <= x && x <= this.x2 && this.y1 <= y && y <= this.y2);
+			}
+			
+			this.addPoint(x1, y1);
+			this.addPoint(x2, y2);
+		}
+		
+		// transforms
+		svg.Transform = function(v) {	
+			var that = this;
+			this.Type = {}
+		
+			// translate
+			this.Type.translate = function(s) {
+				this.p = svg.CreatePoint(s);			
+				this.apply = function(ctx) {
+					ctx.translate(this.p.x || 0.0, this.p.y || 0.0);
+				}
+				this.applyToPoint = function(p) {
+					p.applyTransform([1, 0, 0, 1, this.p.x || 0.0, this.p.y || 0.0]);
+				}
+			}
+			
+			// rotate
+			this.Type.rotate = function(s) {
+				var a = svg.ToNumberArray(s);
+				this.angle = new svg.Property('angle', a[0]);
+				this.cx = a[1] || 0;
+				this.cy = a[2] || 0;
+				this.apply = function(ctx) {
+					ctx.translate(this.cx, this.cy);
+					ctx.rotate(this.angle.Angle.toRadians());
+					ctx.translate(-this.cx, -this.cy);
+				}
+				this.applyToPoint = function(p) {
+					var a = this.angle.Angle.toRadians();
+					p.applyTransform([1, 0, 0, 1, this.p.x || 0.0, this.p.y || 0.0]);
+					p.applyTransform([Math.cos(a), Math.sin(a), -Math.sin(a), Math.cos(a), 0, 0]);
+					p.applyTransform([1, 0, 0, 1, -this.p.x || 0.0, -this.p.y || 0.0]);
+				}			
+			}
+			
+			this.Type.scale = function(s) {
+				this.p = svg.CreatePoint(s);
+				this.apply = function(ctx) {
+					ctx.scale(this.p.x || 1.0, this.p.y || this.p.x || 1.0);
+				}
+				this.applyToPoint = function(p) {
+					p.applyTransform([this.p.x || 0.0, 0, 0, this.p.y || 0.0, 0, 0]);
+				}				
+			}
+			
+			this.Type.matrix = function(s) {
+				this.m = svg.ToNumberArray(s);
+				this.apply = function(ctx) {
+					ctx.transform(this.m[0], this.m[1], this.m[2], this.m[3], this.m[4], this.m[5]);
+				}
+				this.applyToPoint = function(p) {
+					p.applyTransform(this.m);
+				}					
+			}
+			
+			this.Type.SkewBase = function(s) {
+				this.base = that.Type.matrix;
+				this.base(s);
+				this.angle = new svg.Property('angle', s);
+			}
+			this.Type.SkewBase.prototype = new this.Type.matrix;
+			
+			this.Type.skewX = function(s) {
+				this.base = that.Type.SkewBase;
+				this.base(s);
+				this.m = [1, 0, Math.tan(this.angle.Angle.toRadians()), 1, 0, 0];
+			}
+			this.Type.skewX.prototype = new this.Type.SkewBase;
+			
+			this.Type.skewY = function(s) {
+				this.base = that.Type.SkewBase;
+				this.base(s);
+				this.m = [1, Math.tan(this.angle.Angle.toRadians()), 0, 1, 0, 0];
+			}
+			this.Type.skewY.prototype = new this.Type.SkewBase;
+		
+			this.transforms = [];
+			
+			this.apply = function(ctx) {
+				for (var i=0; i<this.transforms.length; i++) {
+					this.transforms[i].apply(ctx);
+				}
+			}
+			
+			this.applyToPoint = function(p) {
+				for (var i=0; i<this.transforms.length; i++) {
+					this.transforms[i].applyToPoint(p);
+				}
+			}
+			
+			var data = svg.trim(svg.compressSpaces(v)).split(/\s(?=[a-z])/);
+			for (var i=0; i<data.length; i++) {
+				var type = data[i].split('(')[0];
+				var s = data[i].split('(')[1].replace(')','');
+				var transform = new this.Type[type](s);
+				this.transforms.push(transform);
+			}
+		}
+		
+		// aspect ratio
+		svg.AspectRatio = function(ctx, aspectRatio, width, desiredWidth, height, desiredHeight, minX, minY, refX, refY) {
+			// aspect ratio - http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute
+			aspectRatio = svg.compressSpaces(aspectRatio);
+			aspectRatio = aspectRatio.replace(/^defer\s/,''); // ignore defer
+			var align = aspectRatio.split(' ')[0] || 'xMidYMid';
+			var meetOrSlice = aspectRatio.split(' ')[1] || 'meet';					
+	
+			// calculate scale
+			var scaleX = width / desiredWidth;
+			var scaleY = height / desiredHeight;
+			var scaleMin = Math.min(scaleX, scaleY);
+			var scaleMax = Math.max(scaleX, scaleY);
+			if (meetOrSlice == 'meet') { desiredWidth *= scaleMin; desiredHeight *= scaleMin; }
+			if (meetOrSlice == 'slice') { desiredWidth *= scaleMax; desiredHeight *= scaleMax; }	
+			
+			refX = new svg.Property('refX', refX);
+			refY = new svg.Property('refY', refY);
+			if (refX.hasValue() && refY.hasValue()) {				
+				ctx.translate(-scaleMin * refX.Length.toPixels('x'), -scaleMin * refY.Length.toPixels('y'));
+			} 
+			else {					
+				// align
+				if (align.match(/^xMid/) && ((meetOrSlice == 'meet' && scaleMin == scaleY) || (meetOrSlice == 'slice' && scaleMax == scaleY))) ctx.translate(width / 2.0 - desiredWidth / 2.0, 0); 
+				if (align.match(/YMid$/) && ((meetOrSlice == 'meet' && scaleMin == scaleX) || (meetOrSlice == 'slice' && scaleMax == scaleX))) ctx.translate(0, height / 2.0 - desiredHeight / 2.0); 
+				if (align.match(/^xMax/) && ((meetOrSlice == 'meet' && scaleMin == scaleY) || (meetOrSlice == 'slice' && scaleMax == scaleY))) ctx.translate(width - desiredWidth, 0); 
+				if (align.match(/YMax$/) && ((meetOrSlice == 'meet' && scaleMin == scaleX) || (meetOrSlice == 'slice' && scaleMax == scaleX))) ctx.translate(0, height - desiredHeight); 
+			}
+			
+			// scale
+			if (align == 'none') ctx.scale(scaleX, scaleY);
+			else if (meetOrSlice == 'meet') ctx.scale(scaleMin, scaleMin); 
+			else if (meetOrSlice == 'slice') ctx.scale(scaleMax, scaleMax); 	
+			
+			// translate
+			ctx.translate(minX == null ? 0 : -minX, minY == null ? 0 : -minY);			
+		}
+		
+		// elements
+		svg.Element = {}
+		
+		svg.Element.ElementBase = function(node) {	
+			this.attributes = {};
+			this.styles = {};
+			this.children = [];
+			
+			// get or create attribute
+			this.attribute = function(name, createIfNotExists) {
+				var a = this.attributes[name];
+				if (a != null) return a;
+							
+				a = new svg.Property(name, '');
+				if (createIfNotExists == true) this.attributes[name] = a;
+				return a;
+			}
+			
+			// get or create style, crawls up node tree
+			this.style = function(name, createIfNotExists) {
+				var s = this.styles[name];
+				if (s != null) return s;
+				
+				var a = this.attribute(name);
+				if (a != null && a.hasValue()) {
+					return a;
+				}
+				
+				var p = this.parent;
+				if (p != null) {
+					var ps = p.style(name);
+					if (ps != null && ps.hasValue()) {
+						return ps;
+					}
+				}
+					
+				s = new svg.Property(name, '');
+				if (createIfNotExists == true) this.styles[name] = s;
+				return s;
+			}
+			
+			// base render
+			this.render = function(ctx) {
+				// don't render display=none
+				if (this.style('display').value == 'none') return;
+				
+				// don't render visibility=hidden
+				if (this.attribute('visibility').value == 'hidden') return;
+			
+				ctx.save();
+					this.setContext(ctx);
+						// mask
+						if (this.attribute('mask').hasValue()) {
+							var mask = this.attribute('mask').Definition.getDefinition();
+							if (mask != null) mask.apply(ctx, this);
+						}
+						else if (this.style('filter').hasValue()) {
+							var filter = this.style('filter').Definition.getDefinition();
+							if (filter != null) filter.apply(ctx, this);
+						}
+						else this.renderChildren(ctx);				
+					this.clearContext(ctx);
+				ctx.restore();
+			}
+			
+			// base set context
+			this.setContext = function(ctx) {
+				// OVERRIDE ME!
+			}
+			
+			// base clear context
+			this.clearContext = function(ctx) {
+				// OVERRIDE ME!
+			}			
+			
+			// base render children
+			this.renderChildren = function(ctx) {
+				for (var i=0; i<this.children.length; i++) {
+					this.children[i].render(ctx);
+				}
+			}
+			
+			this.addChild = function(childNode, create) {
+				var child = childNode;
+				if (create) child = svg.CreateElement(childNode);
+				child.parent = this;
+				this.children.push(child);			
+			}
+				
+			if (node != null && node.nodeType == 1) { //ELEMENT_NODE
+				// add children
+				for (var i=0; i<node.childNodes.length; i++) {
+					var childNode = node.childNodes[i];
+					if (childNode.nodeType == 1) this.addChild(childNode, true); //ELEMENT_NODE
+				}
+				
+				// add attributes
+				for (var i=0; i<node.attributes.length; i++) {
+					var attribute = node.attributes[i];
+					this.attributes[attribute.nodeName] = new svg.Property(attribute.nodeName, attribute.nodeValue);
+				}
+										
+				// add tag styles
+				var styles = svg.Styles[node.nodeName];
+				if (styles != null) {
+					for (var name in styles) {
+						this.styles[name] = styles[name];
+					}
+				}					
+				
+				// add class styles
+				if (this.attribute('class').hasValue()) {
+					var classes = svg.compressSpaces(this.attribute('class').value).split(' ');
+					for (var j=0; j<classes.length; j++) {
+						styles = svg.Styles['.'+classes[j]];
+						if (styles != null) {
+							for (var name in styles) {
+								this.styles[name] = styles[name];
+							}
+						}
+						styles = svg.Styles[node.nodeName+'.'+classes[j]];
+						if (styles != null) {
+							for (var name in styles) {
+								this.styles[name] = styles[name];
+							}
+						}
+					}
+				}
+				
+				// add inline styles
+				if (this.attribute('style').hasValue()) {
+					var styles = this.attribute('style').value.split(';');
+					for (var i=0; i<styles.length; i++) {
+						if (svg.trim(styles[i]) != '') {
+							var style = styles[i].split(':');
+							var name = svg.trim(style[0]);
+							var value = svg.trim(style[1]);
+							this.styles[name] = new svg.Property(name, value);
+						}
+					}
+				}	
+
+				// add id
+				if (this.attribute('id').hasValue()) {
+					if (svg.Definitions[this.attribute('id').value] == null) {
+						svg.Definitions[this.attribute('id').value] = this;
+					}
+				}
+			}
+		}
+		
+		svg.Element.RenderedElementBase = function(node) {
+			this.base = svg.Element.ElementBase;
+			this.base(node);
+			
+			this.setContext = function(ctx) {
+				// fill
+				if (this.style('fill').Definition.isUrl()) {
+					var fs = this.style('fill').Definition.getFillStyle(this);
+					if (fs != null) ctx.fillStyle = fs;
+				}
+				else if (this.style('fill').hasValue()) {
+					var fillStyle = this.style('fill');
+					if (this.style('fill-opacity').hasValue()) fillStyle = fillStyle.Color.addOpacity(this.style('fill-opacity').value);
+					ctx.fillStyle = (fillStyle.value == 'none' ? 'rgba(0,0,0,0)' : fillStyle.value);
+				}
+									
+				// stroke
+				if (this.style('stroke').Definition.isUrl()) {
+					var fs = this.style('stroke').Definition.getFillStyle(this);
+					if (fs != null) ctx.strokeStyle = fs;
+				}
+				else if (this.style('stroke').hasValue()) {
+					var strokeStyle = this.style('stroke');
+					if (this.style('stroke-opacity').hasValue()) strokeStyle = strokeStyle.Color.addOpacity(this.style('stroke-opacity').value);
+					ctx.strokeStyle = (strokeStyle.value == 'none' ? 'rgba(0,0,0,0)' : strokeStyle.value);
+				}
+				if (this.style('stroke-width').hasValue()) ctx.lineWidth = this.style('stroke-width').Length.toPixels();
+				if (this.style('stroke-linecap').hasValue()) ctx.lineCap = this.style('stroke-linecap').value;
+				if (this.style('stroke-linejoin').hasValue()) ctx.lineJoin = this.style('stroke-linejoin').value;
+				if (this.style('stroke-miterlimit').hasValue()) ctx.miterLimit = this.style('stroke-miterlimit').value;
+
+				// font
+				if (typeof(ctx.font) != 'undefined') {
+					ctx.font = svg.Font.CreateFont( 
+						this.style('font-style').value, 
+						this.style('font-variant').value, 
+						this.style('font-weight').value, 
+						this.style('font-size').hasValue() ? this.style('font-size').Length.toPixels() + 'px' : '', 
+						this.style('font-family').value).toString();
+				}
+				
+				// transform
+				if (this.attribute('transform').hasValue()) { 
+					var transform = new svg.Transform(this.attribute('transform').value);
+					transform.apply(ctx);
+				}
+				
+				// clip
+				if (this.attribute('clip-path').hasValue()) {
+					var clip = this.attribute('clip-path').Definition.getDefinition();
+					if (clip != null) clip.apply(ctx);
+				}
+				
+				// opacity
+				if (this.style('opacity').hasValue()) {
+					ctx.globalAlpha = this.style('opacity').numValue();
+				}
+			}		
+		}
+		svg.Element.RenderedElementBase.prototype = new svg.Element.ElementBase;
+		
+		svg.Element.PathElementBase = function(node) {
+			this.base = svg.Element.RenderedElementBase;
+			this.base(node);
+			
+			this.path = function(ctx) {
+				if (ctx != null) ctx.beginPath();
+				return new svg.BoundingBox();
+			}
+			
+			this.renderChildren = function(ctx) {
+				this.path(ctx);
+				svg.Mouse.checkPath(this, ctx);
+				if (ctx.fillStyle != '') ctx.fill();
+				if (ctx.strokeStyle != '') ctx.stroke();
+				
+				var markers = this.getMarkers();
+				if (markers != null) {
+					if (this.style('marker-start').Definition.isUrl()) {
+						var marker = this.style('marker-start').Definition.getDefinition();
+						marker.render(ctx, markers[0][0], markers[0][1]);
+					}
+					if (this.style('marker-mid').Definition.isUrl()) {
+						var marker = this.style('marker-mid').Definition.getDefinition();
+						for (var i=1;i<markers.length-1;i++) {
+							marker.render(ctx, markers[i][0], markers[i][1]);
+						}
+					}
+					if (this.style('marker-end').Definition.isUrl()) {
+						var marker = this.style('marker-end').Definition.getDefinition();
+						marker.render(ctx, markers[markers.length-1][0], markers[markers.length-1][1]);
+					}
+				}					
+			}
+			
+			this.getBoundingBox = function() {
+				return this.path();
+			}
+			
+			this.getMarkers = function() {
+				return null;
+			}
+		}
+		svg.Element.PathElementBase.prototype = new svg.Element.RenderedElementBase;
+		
+		// svg element
+		svg.Element.svg = function(node) {
+			this.base = svg.Element.RenderedElementBase;
+			this.base(node);
+			
+			this.baseClearContext = this.clearContext;
+			this.clearContext = function(ctx) {
+				this.baseClearContext(ctx);
+				svg.ViewPort.RemoveCurrent();
+			}
+			
+			this.baseSetContext = this.setContext;
+			this.setContext = function(ctx) {
+				// initial values
+				ctx.strokeStyle = 'rgba(0,0,0,0)';
+				ctx.lineCap = 'butt';
+				ctx.lineJoin = 'miter';
+				ctx.miterLimit = 4;			
+			
+				this.baseSetContext(ctx);
+				
+				// create new view port
+				if (this.attribute('x').hasValue() && this.attribute('y').hasValue()) {
+					ctx.translate(this.attribute('x').Length.toPixels('x'), this.attribute('y').Length.toPixels('y'));
+				}
+				
+				var width = svg.ViewPort.width();
+				var height = svg.ViewPort.height();
+				if (typeof(this.root) == 'undefined' && this.attribute('width').hasValue() && this.attribute('height').hasValue()) {
+					width = this.attribute('width').Length.toPixels('x');
+					height = this.attribute('height').Length.toPixels('y');
+					
+					var x = 0;
+					var y = 0;
+					if (this.attribute('refX').hasValue() && this.attribute('refY').hasValue()) {
+						x = -this.attribute('refX').Length.toPixels('x');
+						y = -this.attribute('refY').Length.toPixels('y');
+					}
+					
+					ctx.beginPath();
+					ctx.moveTo(x, y);
+					ctx.lineTo(width, y);
+					ctx.lineTo(width, height);
+					ctx.lineTo(x, height);
+					ctx.closePath();
+					ctx.clip();
+				}
+				svg.ViewPort.SetCurrent(width, height);	
+						
+				// viewbox
+				if (this.attribute('viewBox').hasValue()) {				
+					var viewBox = svg.ToNumberArray(this.attribute('viewBox').value);
+					var minX = viewBox[0];
+					var minY = viewBox[1];
+					width = viewBox[2];
+					height = viewBox[3];
+					
+					svg.AspectRatio(ctx,
+									this.attribute('preserveAspectRatio').value, 
+									svg.ViewPort.width(), 
+									width,
+									svg.ViewPort.height(),
+									height,
+									minX,
+									minY,
+									this.attribute('refX').value,
+									this.attribute('refY').value);
+										
+					svg.ViewPort.RemoveCurrent();	
+					svg.ViewPort.SetCurrent(viewBox[2], viewBox[3]);						
+				}				
+			}
+		}
+		svg.Element.svg.prototype = new svg.Element.RenderedElementBase;
+
+		// rect element
+		svg.Element.rect = function(node) {
+			this.base = svg.Element.PathElementBase;
+			this.base(node);
+			
+			this.path = function(ctx) {
+				var x = this.attribute('x').Length.toPixels('x');
+				var y = this.attribute('y').Length.toPixels('y');
+				var width = this.attribute('width').Length.toPixels('x');
+				var height = this.attribute('height').Length.toPixels('y');
+				var rx = this.attribute('rx').Length.toPixels('x');
+				var ry = this.attribute('ry').Length.toPixels('y');
+				if (this.attribute('rx').hasValue() && !this.attribute('ry').hasValue()) ry = rx;
+				if (this.attribute('ry').hasValue() && !this.attribute('rx').hasValue()) rx = ry;
+				
+				if (ctx != null) {
+					ctx.beginPath();
+					ctx.moveTo(x + rx, y);
+					ctx.lineTo(x + width - rx, y);
+					ctx.quadraticCurveTo(x + width, y, x + width, y + ry)
+					ctx.lineTo(x + width, y + height - ry);
+					ctx.quadraticCurveTo(x + width, y + height, x + width - rx, y + height)
+					ctx.lineTo(x + rx, y + height);
+					ctx.quadraticCurveTo(x, y + height, x, y + height - ry)
+					ctx.lineTo(x, y + ry);
+					ctx.quadraticCurveTo(x, y, x + rx, y)
+					ctx.closePath();
+				}
+				
+				return new svg.BoundingBox(x, y, x + width, y + height);
+			}
+		}
+		svg.Element.rect.prototype = new svg.Element.PathElementBase;
+		
+		// circle element
+		svg.Element.circle = function(node) {
+			this.base = svg.Element.PathElementBase;
+			this.base(node);
+			
+			this.path = function(ctx) {
+				var cx = this.attribute('cx').Length.toPixels('x');
+				var cy = this.attribute('cy').Length.toPixels('y');
+				var r = this.attribute('r').Length.toPixels();
+			
+				if (ctx != null) {
+					ctx.beginPath();
+					ctx.arc(cx, cy, r, 0, Math.PI * 2, true); 
+					ctx.closePath();
+				}
+				
+				return new svg.BoundingBox(cx - r, cy - r, cx + r, cy + r);
+			}
+		}
+		svg.Element.circle.prototype = new svg.Element.PathElementBase;	
+
+		// ellipse element
+		svg.Element.ellipse = function(node) {
+			this.base = svg.Element.PathElementBase;
+			this.base(node);
+			
+			this.path = function(ctx) {
+				var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);
+				var rx = this.attribute('rx').Length.toPixels('x');
+				var ry = this.attribute('ry').Length.toPixels('y');
+				var cx = this.attribute('cx').Length.toPixels('x');
+				var cy = this.attribute('cy').Length.toPixels('y');
+				
+				if (ctx != null) {
+					ctx.beginPath();
+					ctx.moveTo(cx, cy - ry);
+					ctx.bezierCurveTo(cx + (KAPPA * rx), cy - ry,  cx + rx, cy - (KAPPA * ry), cx + rx, cy);
+					ctx.bezierCurveTo(cx + rx, cy + (KAPPA * ry), cx + (KAPPA * rx), cy + ry, cx, cy + ry);
+					ctx.bezierCurveTo(cx - (KAPPA * rx), cy + ry, cx - rx, cy + (KAPPA * ry), cx - rx, cy);
+					ctx.bezierCurveTo(cx - rx, cy - (KAPPA * ry), cx - (KAPPA * rx), cy - ry, cx, cy - ry);
+					ctx.closePath();
+				}
+				
+				return new svg.BoundingBox(cx - rx, cy - ry, cx + rx, cy + ry);
+			}
+		}
+		svg.Element.ellipse.prototype = new svg.Element.PathElementBase;			
+		
+		// line element
+		svg.Element.line = function(node) {
+			this.base = svg.Element.PathElementBase;
+			this.base(node);
+			
+			this.getPoints = function() {
+				return [
+					new svg.Point(this.attribute('x1').Length.toPixels('x'), this.attribute('y1').Length.toPixels('y')),
+					new svg.Point(this.attribute('x2').Length.toPixels('x'), this.attribute('y2').Length.toPixels('y'))];
+			}
+								
+			this.path = function(ctx) {
+				var points = this.getPoints();
+				
+				if (ctx != null) {
+					ctx.beginPath();
+					ctx.moveTo(points[0].x, points[0].y);
+					ctx.lineTo(points[1].x, points[1].y);
+				}
+				
+				return new svg.BoundingBox(points[0].x, points[0].y, points[1].x, points[1].y);
+			}
+			
+			this.getMarkers = function() {
+				var points = this.getPoints();	
+				var a = points[0].angleTo(points[1]);
+				return [[points[0], a], [points[1], a]];
+			}
+		}
+		svg.Element.line.prototype = new svg.Element.PathElementBase;		
+				
+		// polyline element
+		svg.Element.polyline = function(node) {
+			this.base = svg.Element.PathElementBase;
+			this.base(node);
+			
+			this.points = svg.CreatePath(this.attribute('points').value);
+			this.path = function(ctx) {
+				var bb = new svg.BoundingBox(this.points[0].x, this.points[0].y);
+				if (ctx != null) {
+					ctx.beginPath();
+					ctx.moveTo(this.points[0].x, this.points[0].y);
+				}
+				for (var i=1; i<this.points.length; i++) {
+					bb.addPoint(this.points[i].x, this.points[i].y);
+					if (ctx != null) ctx.lineTo(this.points[i].x, this.points[i].y);
+				}
+				return bb;
+			}
+			
+			this.getMarkers = function() {
+				var markers = [];
+				for (var i=0; i<this.points.length - 1; i++) {
+					markers.push([this.points[i], this.points[i].angleTo(this.points[i+1])]);
+				}
+				markers.push([this.points[this.points.length-1], markers[markers.length-1][1]]);
+				return markers;
+			}			
+		}
+		svg.Element.polyline.prototype = new svg.Element.PathElementBase;				
+				
+		// polygon element
+		svg.Element.polygon = function(node) {
+			this.base = svg.Element.polyline;
+			this.base(node);
+			
+			this.basePath = this.path;
+			this.path = function(ctx) {
+				var bb = this.basePath(ctx);
+				if (ctx != null) {
+					ctx.lineTo(this.points[0].x, this.points[0].y);
+					ctx.closePath();
+				}
+				return bb;
+			}
+		}
+		svg.Element.polygon.prototype = new svg.Element.polyline;
+
+		// path element
+		svg.Element.path = function(node) {
+			this.base = svg.Element.PathElementBase;
+			this.base(node);
+					
+			var d = this.attribute('d').value;
+			// TODO: convert to real lexer based on http://www.w3.org/TR/SVG11/paths.html#PathDataBNF
+			d = d.replace(/,/gm,' '); // get rid of all commas
+			d = d.replace(/([MmZzLlHhVvCcSsQqTtAa])([MmZzLlHhVvCcSsQqTtAa])/gm,'$1 $2'); // separate commands from commands
+			d = d.replace(/([MmZzLlHhVvCcSsQqTtAa])([MmZzLlHhVvCcSsQqTtAa])/gm,'$1 $2'); // separate commands from commands
+			d = d.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm,'$1 $2'); // separate commands from points
+			d = d.replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm,'$1 $2'); // separate commands from points
+			d = d.replace(/([0-9])([+\-])/gm,'$1 $2'); // separate digits when no comma
+			d = d.replace(/(\.[0-9]*)(\.)/gm,'$1 $2'); // separate digits when no comma
+			d = d.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,'$1 $3 $4 '); // shorthand elliptical arc path syntax
+			d = svg.compressSpaces(d); // compress multiple spaces
+			d = svg.trim(d);
+			this.PathParser = new (function(d) {
+				this.tokens = d.split(' ');
+				
+				this.reset = function() {
+					this.i = -1;
+					this.command = '';
+					this.previousCommand = '';
+					this.start = new svg.Point(0, 0);
+					this.control = new svg.Point(0, 0);
+					this.current = new svg.Point(0, 0);
+					this.points = [];
+					this.angles = [];
+				}
+								
+				this.isEnd = function() {
+					return this.i >= this.tokens.length - 1;
+				}
+				
+				this.isCommandOrEnd = function() {
+					if (this.isEnd()) return true;
+					return this.tokens[this.i + 1].match(/^[A-Za-z]$/) != null;
+				}
+				
+				this.isRelativeCommand = function() {
+					return this.command == this.command.toLowerCase();
+				}
+							
+				this.getToken = function() {
+					this.i = this.i + 1;
+					return this.tokens[this.i];
+				}
+				
+				this.getScalar = function() {
+					return parseFloat(this.getToken());
+				}
+				
+				this.nextCommand = function() {
+					this.previousCommand = this.command;
+					this.command = this.getToken();
+				}				
+				
+				this.getPoint = function() {
+					var p = new svg.Point(this.getScalar(), this.getScalar());
+					return this.makeAbsolute(p);
+				}
+				
+				this.getAsControlPoint = function() {
+					var p = this.getPoint();
+					this.control = p;
+					return p;
+				}
+				
+				this.getAsCurrentPoint = function() {
+					var p = this.getPoint();
+					this.current = p;
+					return p;	
+				}
+				
+				this.getReflectedControlPoint = function() {
+					if (this.previousCommand.toLowerCase() != 'c' && this.previousCommand.toLowerCase() != 's') {
+						return this.current;
+					}
+					
+					// reflect point
+					var p = new svg.Point(2 * this.current.x - this.control.x, 2 * this.current.y - this.control.y);					
+					return p;
+				}
+				
+				this.makeAbsolute = function(p) {
+					if (this.isRelativeCommand()) {
+						p.x = this.current.x + p.x;
+						p.y = this.current.y + p.y;
+					}
+					return p;
+				}
+				
+				this.addMarker = function(p, from, priorTo) {
+					// if the last angle isn't filled in because we didn't have this point yet ...
+					if (priorTo != null && this.angles.length > 0 && this.angles[this.angles.length-1] == null) {
+						this.angles[this.angles.length-1] = this.points[this.points.length-1].angleTo(priorTo);
+					}
+					this.addMarkerAngle(p, from == null ? null : from.angleTo(p));
+				}
+				
+				this.addMarkerAngle = function(p, a) {
+					this.points.push(p);
+					this.angles.push(a);
+				}				
+				
+				this.getMarkerPoints = function() { return this.points; }
+				this.getMarkerAngles = function() {
+					for (var i=0; i<this.angles.length; i++) {
+						if (this.angles[i] == null) {
+							for (var j=i+1; j<this.angles.length; j++) {
+								if (this.angles[j] != null) {
+									this.angles[i] = this.angles[j];
+									break;
+								}
+							}
+						}
+					}
+					return this.angles;
+				}
+			})(d);
+
+			this.path = function(ctx) {
+				var pp = this.PathParser;
+				pp.reset();
+
+				var bb = new svg.BoundingBox();
+				if (ctx != null) ctx.beginPath();
+				while (!pp.isEnd()) {
+					pp.nextCommand();
+					switch (pp.command.toUpperCase()) {
+					case 'M':
+						var p = pp.getAsCurrentPoint();
+						pp.addMarker(p);
+						bb.addPoint(p.x, p.y);
+						if (ctx != null) ctx.moveTo(p.x, p.y);
+						pp.start = pp.current;
+						while (!pp.isCommandOrEnd()) {
+							var p = pp.getAsCurrentPoint();
+							pp.addMarker(p, pp.start);
+							bb.addPoint(p.x, p.y);
+							if (ctx != null) ctx.lineTo(p.x, p.y);
+						}
+						break;
+					case 'L':
+						while (!pp.isCommandOrEnd()) {
+							var c = pp.current;
+							var p = pp.getAsCurrentPoint();
+							pp.addMarker(p, c);
+							bb.addPoint(p.x, p.y);
+							if (ctx != null) ctx.lineTo(p.x, p.y);
+						}
+						break;
+					case 'H':
+						while (!pp.isCommandOrEnd()) {
+							var newP = new svg.Point((pp.isRelativeCommand() ? pp.current.x : 0) + pp.getScalar(), pp.current.y);
+							pp.addMarker(newP, pp.current);
+							pp.current = newP;
+							bb.addPoint(pp.current.x, pp.current.y);
+							if (ctx != null) ctx.lineTo(pp.current.x, pp.current.y);
+						}
+						break;
+					case 'V':
+						while (!pp.isCommandOrEnd()) {
+							var newP = new svg.Point(pp.current.x, (pp.isRelativeCommand() ? pp.current.y : 0) + pp.getScalar());
+							pp.addMarker(newP, pp.current);
+							pp.current = newP;
+							bb.addPoint(pp.current.x, pp.current.y);
+							if (ctx != null) ctx.lineTo(pp.current.x, pp.current.y);
+						}
+						break;
+					case 'C':
+						while (!pp.isCommandOrEnd()) {
+							var curr = pp.current;
+							var p1 = pp.getPoint();
+							var cntrl = pp.getAsControlPoint();
+							var cp = pp.getAsCurrentPoint();
+							pp.addMarker(cp, cntrl, p1);
+							bb.addBezierCurve(curr.x, curr.y, p1.x, p1.y, cntrl.x, cntrl.y, cp.x, cp.y);
+							if (ctx != null) ctx.bezierCurveTo(p1.x, p1.y, cntrl.x, cntrl.y, cp.x, cp.y);
+						}
+						break;
+					case 'S':
+						while (!pp.isCommandOrEnd()) {
+							var curr = pp.current;
+							var p1 = pp.getReflectedControlPoint();
+							var cntrl = pp.getAsControlPoint();
+							var cp = pp.getAsCurrentPoint();
+							pp.addMarker(cp, cntrl, p1);
+							bb.addBezierCurve(curr.x, curr.y, p1.x, p1.y, cntrl.x, cntrl.y, cp.x, cp.y);
+							if (ctx != null) ctx.bezierCurveTo(p1.x, p1.y, cntrl.x, cntrl.y, cp.x, cp.y);
+						}
+						break;
+					case 'Q':
+						while (!pp.isCommandOrEnd()) {
+							var curr = pp.current;
+							var cntrl = pp.getAsControlPoint();
+							var cp = pp.getAsCurrentPoint();
+							pp.addMarker(cp, cntrl, cntrl);
+							bb.addQuadraticCurve(curr.x, curr.y, cntrl.x, cntrl.y, cp.x, cp.y);
+							if (ctx != null) ctx.quadraticCurveTo(cntrl.x, cntrl.y, cp.x, cp.y);
+						}
+						break;
+					case 'T':
+						while (!pp.isCommandOrEnd()) {
+							var curr = pp.current;
+							var cntrl = pp.getReflectedControlPoint();
+							pp.control = cntrl;
+							var cp = pp.getAsCurrentPoint();
+							pp.addMarker(cp, cntrl, cntrl);
+							bb.addQuadraticCurve(curr.x, curr.y, cntrl.x, cntrl.y, cp.x, cp.y);
+							if (ctx != null) ctx.quadraticCurveTo(cntrl.x, cntrl.y, cp.x, cp.y);
+						}
+						break;
+					case 'A':
+						while (!pp.isCommandOrEnd()) {
+						    var curr = pp.current;
+							var rx = pp.getScalar();
+							var ry = pp.getScalar();
+							var xAxisRotation = pp.getScalar() * (Math.PI / 180.0);
+							var largeArcFlag = pp.getScalar();
+							var sweepFlag = pp.getScalar();
+							var cp = pp.getAsCurrentPoint();
+
+							// Conversion from endpoint to center parameterization
+							// http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
+							// x1', y1'
+							var currp = new svg.Point(
+								Math.cos(xAxisRotation) * (curr.x - cp.x) / 2.0 + Math.sin(xAxisRotation) * (curr.y - cp.y) / 2.0,
+								-Math.sin(xAxisRotation) * (curr.x - cp.x) / 2.0 + Math.cos(xAxisRotation) * (curr.y - cp.y) / 2.0
+							);
+							// adjust radii
+							var l = Math.pow(currp.x,2)/Math.pow(rx,2)+Math.pow(currp.y,2)/Math.pow(ry,2);
+							if (l > 1) {
+								rx *= Math.sqrt(l);
+								ry *= Math.sqrt(l);
+							}
+							// cx', cy'
+							var s = (largeArcFlag == sweepFlag ? -1 : 1) * Math.sqrt(
+								((Math.pow(rx,2)*Math.pow(ry,2))-(Math.pow(rx,2)*Math.pow(currp.y,2))-(Math.pow(ry,2)*Math.pow(currp.x,2))) /
+								(Math.pow(rx,2)*Math.pow(currp.y,2)+Math.pow(ry,2)*Math.pow(currp.x,2))
+							);
+							if (isNaN(s)) s = 0;
+							var cpp = new svg.Point(s * rx * currp.y / ry, s * -ry * currp.x / rx);
+							// cx, cy
+							var centp = new svg.Point(
+								(curr.x + cp.x) / 2.0 + Math.cos(xAxisRotation) * cpp.x - Math.sin(xAxisRotation) * cpp.y,
+								(curr.y + cp.y) / 2.0 + Math.sin(xAxisRotation) * cpp.x + Math.cos(xAxisRotation) * cpp.y
+							);
+							// vector magnitude
+							var m = function(v) { return Math.sqrt(Math.pow(v[0],2) + Math.pow(v[1],2)); }
+							// ratio between two vectors
+							var r = function(u, v) { return (u[0]*v[0]+u[1]*v[1]) / (m(u)*m(v)) }
+							// angle between two vectors
+							var a = function(u, v) { return (u[0]*v[1] < u[1]*v[0] ? -1 : 1) * Math.acos(r(u,v)); }
+							// initial angle
+							var a1 = a([1,0], [(currp.x-cpp.x)/rx,(currp.y-cpp.y)/ry]);
+							// angle delta
+							var u = [(currp.x-cpp.x)/rx,(currp.y-cpp.y)/ry];
+							var v = [(-currp.x-cpp.x)/rx,(-currp.y-cpp.y)/ry];
+							var ad = a(u, v);
+							if (r(u,v) <= -1) ad = Math.PI;
+							if (r(u,v) >= 1) ad = 0;
+
+							if (sweepFlag == 0 && ad > 0) ad = ad - 2 * Math.PI;
+							if (sweepFlag == 1 && ad < 0) ad = ad + 2 * Math.PI;
+
+							// for markers
+							var halfWay = new svg.Point(
+								centp.x - rx * Math.cos((a1 + ad) / 2),
+								centp.y - ry * Math.sin((a1 + ad) / 2)
+							);
+							pp.addMarkerAngle(halfWay, (a1 + ad) / 2 + (sweepFlag == 0 ? 1 : -1) * Math.PI / 2);
+							pp.addMarkerAngle(cp, ad + (sweepFlag == 0 ? 1 : -1) * Math.PI / 2);
+
+							bb.addPoint(cp.x, cp.y); // TODO: this is too naive, make it better
+							if (ctx != null) {
+								var r = rx > ry ? rx : ry;
+								var sx = rx > ry ? 1 : rx / ry;
+								var sy = rx > ry ? ry / rx : 1;
+
+								ctx.translate(centp.x, centp.y);
+								ctx.rotate(xAxisRotation);
+								ctx.scale(sx, sy);
+								ctx.arc(0, 0, r, a1, a1 + ad, 1 - sweepFlag);
+								ctx.scale(1/sx, 1/sy);
+								ctx.rotate(-xAxisRotation);
+								ctx.translate(-centp.x, -centp.y);
+							}
+						}
+						break;
+					case 'Z':
+						if (ctx != null) ctx.closePath();
+						pp.current = pp.start;
+					}
+				}
+
+				return bb;
+			}
+
+			this.getMarkers = function() {
+				var points = this.PathParser.getMarkerPoints();
+				var angles = this.PathParser.getMarkerAngles();
+				
+				var markers = [];
+				for (var i=0; i<points.length; i++) {
+					markers.push([points[i], angles[i]]);
+				}
+				return markers;
+			}
+		}
+		svg.Element.path.prototype = new svg.Element.PathElementBase;
+		
+		// pattern element
+		svg.Element.pattern = function(node) {
+			this.base = svg.Element.ElementBase;
+			this.base(node);
+			
+			this.createPattern = function(ctx, element) {
+				// render me using a temporary svg element
+				var tempSvg = new svg.Element.svg();
+				tempSvg.attributes['viewBox'] = new svg.Property('viewBox', this.attribute('viewBox').value);
+				tempSvg.attributes['x'] = new svg.Property('x', this.attribute('x').value);
+				tempSvg.attributes['y'] = new svg.Property('y', this.attribute('y').value);
+				tempSvg.attributes['width'] = new svg.Property('width', this.attribute('width').value);
+				tempSvg.attributes['height'] = new svg.Property('height', this.attribute('height').value);
+				tempSvg.children = this.children;
+				
+				var c = document.createElement('canvas');
+				c.width = this.attribute('width').Length.toPixels('x');
+				c.height = this.attribute('height').Length.toPixels('y');
+				tempSvg.render(c.getContext('2d'));		
+				return ctx.createPattern(c, 'repeat');
+			}
+		}
+		svg.Element.pattern.prototype = new svg.Element.ElementBase;
+		
+		// marker element
+		svg.Element.marker = function(node) {
+			this.base = svg.Element.ElementBase;
+			this.base(node);
+			
+			this.baseRender = this.render;
+			this.render = function(ctx, point, angle) {
+				ctx.translate(point.x, point.y);
+				if (this.attribute('orient').valueOrDefault('auto') == 'auto') ctx.rotate(angle);
+				if (this.attribute('markerUnits').valueOrDefault('strokeWidth') == 'strokeWidth') ctx.scale(ctx.lineWidth, ctx.lineWidth);
+				ctx.save();
+							
+				// render me using a temporary svg element
+				var tempSvg = new svg.Element.svg();
+				tempSvg.attributes['viewBox'] = new svg.Property('viewBox', this.attribute('viewBox').value);
+				tempSvg.attributes['refX'] = new svg.Property('refX', this.attribute('refX').value);
+				tempSvg.attributes['refY'] = new svg.Property('refY', this.attribute('refY').value);
+				tempSvg.attributes['width'] = new svg.Property('width', this.attribute('markerWidth').value);
+				tempSvg.attributes['height'] = new svg.Property('height', this.attribute('markerHeight').value);
+				tempSvg.attributes['fill'] = new svg.Property('fill', this.attribute('fill').valueOrDefault('black'));
+				tempSvg.attributes['stroke'] = new svg.Property('stroke', this.attribute('stroke').valueOrDefault('none'));
+				tempSvg.children = this.children;
+				tempSvg.render(ctx);
+				
+				ctx.restore();
+				if (this.attribute('markerUnits').valueOrDefault('strokeWidth') == 'strokeWidth') ctx.scale(1/ctx.lineWidth, 1/ctx.lineWidth);
+				if (this.attribute('orient').valueOrDefault('auto') == 'auto') ctx.rotate(-angle);
+				ctx.translate(-point.x, -point.y);
+			}
+		}
+		svg.Element.marker.prototype = new svg.Element.ElementBase;
+		
+		// definitions element
+		svg.Element.defs = function(node) {
+			this.base = svg.Element.ElementBase;
+			this.base(node);	
+			
+			this.render = function(ctx) {
+				// NOOP
+			}
+		}
+		svg.Element.defs.prototype = new svg.Element.ElementBase;
+		
+		// base for gradients
+		svg.Element.GradientBase = function(node) {
+			this.base = svg.Element.ElementBase;
+			this.base(node);
+			
+			this.gradientUnits = this.attribute('gradientUnits').valueOrDefault('objectBoundingBox');
+			
+			this.stops = [];			
+			for (var i=0; i<this.children.length; i++) {
+				var child = this.children[i];
+				this.stops.push(child);
+			}	
+			
+			this.getGradient = function() {
+				// OVERRIDE ME!
+			}			
+
+			this.createGradient = function(ctx, element) {
+				var stopsContainer = this;
+				if (this.attribute('xlink:href').hasValue()) {
+					stopsContainer = this.attribute('xlink:href').Definition.getDefinition();
+				}
+			
+				var g = this.getGradient(ctx, element);
+				for (var i=0; i<stopsContainer.stops.length; i++) {
+					g.addColorStop(stopsContainer.stops[i].offset, stopsContainer.stops[i].color);
+				}
+				
+				if (this.attribute('gradientTransform').hasValue()) {
+					// render as transformed pattern on temporary canvas
+					var rootView = svg.ViewPort.viewPorts[0];
+					
+					var rect = new svg.Element.rect();
+					rect.attributes['x'] = new svg.Property('x', -svg.MAX_VIRTUAL_PIXELS/3.0);
+					rect.attributes['y'] = new svg.Property('y', -svg.MAX_VIRTUAL_PIXELS/3.0);
+					rect.attributes['width'] = new svg.Property('width', svg.MAX_VIRTUAL_PIXELS);
+					rect.attributes['height'] = new svg.Property('height', svg.MAX_VIRTUAL_PIXELS);
+					
+					var group = new svg.Element.g();
+					group.attributes['transform'] = new svg.Property('transform', this.attribute('gradientTransform').value);
+					group.children = [ rect ];
+					
+					var tempSvg = new svg.Element.svg();
+					tempSvg.attributes['x'] = new svg.Property('x', 0);
+					tempSvg.attributes['y'] = new svg.Property('y', 0);
+					tempSvg.attributes['width'] = new svg.Property('width', rootView.width);
+					tempSvg.attributes['height'] = new svg.Property('height', rootView.height);
+					tempSvg.children = [ group ];
+					
+					var c = document.createElement('canvas');
+					c.width = rootView.width;
+					c.height = rootView.height;
+					var tempCtx = c.getContext('2d');
+					tempCtx.fillStyle = g;
+					tempSvg.render(tempCtx);		
+					return tempCtx.createPattern(c, 'no-repeat');
+				}
+				
+				return g;				
+			}
+		}
+		svg.Element.GradientBase.prototype = new svg.Element.ElementBase;
+		
+		// linear gradient element
+		svg.Element.linearGradient = function(node) {
+			this.base = svg.Element.GradientBase;
+			this.base(node);
+			
+			this.getGradient = function(ctx, element) {
+				var bb = element.getBoundingBox();
+				
+				var x1 = (this.gradientUnits == 'objectBoundingBox' 
+					? bb.x() + bb.width() * this.attribute('x1').numValue() 
+					: this.attribute('x1').Length.toPixels('x'));
+				var y1 = (this.gradientUnits == 'objectBoundingBox' 
+					? bb.y() + bb.height() * this.attribute('y1').numValue()
+					: this.attribute('y1').Length.toPixels('y'));
+				var x2 = (this.gradientUnits == 'objectBoundingBox' 
+					? bb.x() + bb.width() * this.attribute('x2').numValue()
+					: this.attribute('x2').Length.toPixels('x'));
+				var y2 = (this.gradientUnits == 'objectBoundingBox' 
+					? bb.y() + bb.height() * this.attribute('y2').numValue()
+					: this.attribute('y2').Length.toPixels('y'));
+
+				return ctx.createLinearGradient(x1, y1, x2, y2);
+			}
+		}
+		svg.Element.linearGradient.prototype = new svg.Element.GradientBase;
+		
+		// radial gradient element
+		svg.Element.radialGradient = function(node) {
+			this.base = svg.Element.GradientBase;
+			this.base(node);
+			
+			this.getGradient = function(ctx, element) {
+				var bb = element.getBoundingBox();
+				
+				var cx = (this.gradientUnits == 'objectBoundingBox' 
+					? bb.x() + bb.width() * this.attribute('cx').numValue() 
+					: this.attribute('cx').Length.toPixels('x'));
+				var cy = (this.gradientUnits == 'objectBoundingBox' 
+					? bb.y() + bb.height() * this.attribute('cy').numValue() 
+					: this.attribute('cy').Length.toPixels('y'));
+				
+				var fx = cx;
+				var fy = cy;
+				if (this.attribute('fx').hasValue()) {
+					fx = (this.gradientUnits == 'objectBoundingBox' 
+					? bb.x() + bb.width() * this.attribute('fx').numValue() 
+					: this.attribute('fx').Length.toPixels('x'));
+				}
+				if (this.attribute('fy').hasValue()) {
+					fy = (this.gradientUnits == 'objectBoundingBox' 
+					? bb.y() + bb.height() * this.attribute('fy').numValue() 
+					: this.attribute('fy').Length.toPixels('y'));
+				}
+				
+				var r = (this.gradientUnits == 'objectBoundingBox' 
+					? (bb.width() + bb.height()) / 2.0 * this.attribute('r').numValue()
+					: this.attribute('r').Length.toPixels());
+				
+				return ctx.createRadialGradient(fx, fy, 0, cx, cy, r);
+			}
+		}
+		svg.Element.radialGradient.prototype = new svg.Element.GradientBase;
+		
+		// gradient stop element
+		svg.Element.stop = function(node) {
+			this.base = svg.Element.ElementBase;
+			this.base(node);
+			
+			this.offset = this.attribute('offset').numValue();
+			
+			var stopColor = this.style('stop-color');
+			if (this.style('stop-opacity').hasValue()) stopColor = stopColor.Color.addOpacity(this.style('stop-opacity').value);
+			this.color = stopColor.value;
+		}
+		svg.Element.stop.prototype = new svg.Element.ElementBase;
+		
+		// animation base element
+		svg.Element.AnimateBase = function(node) {
+			this.base = svg.Element.ElementBase;
+			this.base(node);
+			
+			svg.Animations.push(this);
+			
+			this.duration = 0.0;
+			this.begin = this.attribute('begin').Time.toMilliseconds();
+			this.maxDuration = this.begin + this.attribute('dur').Time.toMilliseconds();
+			
+			this.getProperty = function() {
+				var attributeType = this.attribute('attributeType').value;
+				var attributeName = this.attribute('attributeName').value;
+				
+				if (attributeType == 'CSS') {
+					return this.parent.style(attributeName, true);
+				}
+				return this.parent.attribute(attributeName, true);			
+			};
+			
+			this.initialValue = null;
+			this.removed = false;			
+
+			this.calcValue = function() {
+				// OVERRIDE ME!
+				return '';
+			}
+			
+			this.update = function(delta) {	
+				// set initial value
+				if (this.initialValue == null) {
+					this.initialValue = this.getProperty().value;
+				}
+			
+				// if we're past the end time
+				if (this.duration > this.maxDuration) {
+					// loop for indefinitely repeating animations
+					if (this.attribute('repeatCount').value == 'indefinite') {
+						this.duration = 0.0
+					}
+					else if (this.attribute('fill').valueOrDefault('remove') == 'remove' && !this.removed) {
+						this.removed = true;
+						this.getProperty().value = this.initialValue;
+						return true;
+					}
+					else {
+						return false; // no updates made
+					}
+				}			
+				this.duration = this.duration + delta;
+			
+				// if we're past the begin time
+				var updated = false;
+				if (this.begin < this.duration) {
+					var newValue = this.calcValue(); // tween
+					
+					if (this.attribute('type').hasValue()) {
+						// for transform, etc.
+						var type = this.attribute('type').value;
+						newValue = type + '(' + newValue + ')';
+					}
+					
+					this.getProperty().value = newValue;
+					updated = true;
+				}
+				
+				return updated;
+			}
+			
+			// fraction of duration we've covered
+			this.progress = function() {
+				return ((this.duration - this.begin) / (this.maxDuration - this.begin));
+			}			
+		}
+		svg.Element.AnimateBase.prototype = new svg.Element.ElementBase;
+		
+		// animate element
+		svg.Element.animate = function(node) {
+			this.base = svg.Element.AnimateBase;
+			this.base(node);
+			
+			this.calcValue = function() {
+				var from = this.attribute('from').numValue();
+				var to = this.attribute('to').numValue();
+				
+				// tween value linearly
+				return from + (to - from) * this.progress(); 
+			};
+		}
+		svg.Element.animate.prototype = new svg.Element.AnimateBase;
+			
+		// animate color element
+		svg.Element.animateColor = function(node) {
+			this.base = svg.Element.AnimateBase;
+			this.base(node);
+
+			this.calcValue = function() {
+				var from = new RGBColor(this.attribute('from').value);
+				var to = new RGBColor(this.attribute('to').value);
+				
+				if (from.ok && to.ok) {
+					// tween color linearly
+					var r = from.r + (to.r - from.r) * this.progress();
+					var g = from.g + (to.g - from.g) * this.progress();
+					var b = from.b + (to.b - from.b) * this.progress();
+					return 'rgb('+parseInt(r,10)+','+parseInt(g,10)+','+parseInt(b,10)+')';
+				}
+				return this.attribute('from').value;
+			};
+		}
+		svg.Element.animateColor.prototype = new svg.Element.AnimateBase;
+		
+		// animate transform element
+		svg.Element.animateTransform = function(node) {
+			this.base = svg.Element.animate;
+			this.base(node);
+		}
+		svg.Element.animateTransform.prototype = new svg.Element.animate;
+		
+		// font element
+		svg.Element.font = function(node) {
+			this.base = svg.Element.ElementBase;
+			this.base(node);
+
+			this.horizAdvX = this.attribute('horiz-adv-x').numValue();			
+			
+			this.isRTL = false;
+			this.isArabic = false;
+			this.fontFace = null;
+			this.missingGlyph = null;
+			this.glyphs = [];			
+			for (var i=0; i<this.children.length; i++) {
+				var child = this.children[i];
+				if (child.type == 'font-face') {
+					this.fontFace = child;
+					if (child.style('font-family').hasValue()) {
+						svg.Definitions[child.style('font-family').value] = this;
+					}
+				}
+				else if (child.type == 'missing-glyph') this.missingGlyph = child;
+				else if (child.type == 'glyph') {
+					if (child.arabicForm != '') {
+						this.isRTL = true;
+						this.isArabic = true;
+						if (typeof(this.glyphs[child.unicode]) == 'undefined') this.glyphs[child.unicode] = [];
+						this.glyphs[child.unicode][child.arabicForm] = child;
+					}
+					else {
+						this.glyphs[child.unicode] = child;
+					}
+				}
+			}	
+		}
+		svg.Element.font.prototype = new svg.Element.ElementBase;
+		
+		// font-face element
+		svg.Element.fontface = function(node) {
+			this.base = svg.Element.ElementBase;
+			this.base(node);	
+			
+			this.ascent = this.attribute('ascent').value;
+			this.descent = this.attribute('descent').value;
+			this.unitsPerEm = this.attribute('units-per-em').numValue();				
+		}
+		svg.Element.fontface.prototype = new svg.Element.ElementBase;
+		
+		// missing-glyph element
+		svg.Element.missingglyph = function(node) {
+			this.base = svg.Element.path;
+			this.base(node);	
+			
+			this.horizAdvX = 0;
+		}
+		svg.Element.missingglyph.prototype = new svg.Element.path;
+		
+		// glyph element
+		svg.Element.glyph = function(node) {
+			this.base = svg.Element.path;
+			this.base(node);	
+			
+			this.horizAdvX = this.attribute('horiz-adv-x').numValue();
+			this.unicode = this.attribute('unicode').value;
+			this.arabicForm = this.attribute('arabic-form').value;
+		}
+		svg.Element.glyph.prototype = new svg.Element.path;
+		
+		// text element
+		svg.Element.text = function(node) {
+			this.base = svg.Element.RenderedElementBase;
+			this.base(node);
+			
+			if (node != null) {
+				// add children
+				this.children = [];
+				for (var i=0; i<node.childNodes.length; i++) {
+					var childNode = node.childNodes[i];
+					if (childNode.nodeType == 1) { // capture tspan and tref nodes
+						this.addChild(childNode, true);
+					}
+					else if (childNode.nodeType == 3) { // capture text
+						this.addChild(new svg.Element.tspan(childNode), false);
+					}
+				}
+			}
+			
+			this.baseSetContext = this.setContext;
+			this.setContext = function(ctx) {
+				this.baseSetContext(ctx);
+				if (this.style('dominant-baseline').hasValue()) ctx.textBaseline = this.style('dominant-baseline').value;
+				if (this.style('alignment-baseline').hasValue()) ctx.textBaseline = this.style('alignment-baseline').value;
+			}
+			
+			this.renderChildren = function(ctx) {
+				var textAnchor = this.style('text-anchor').valueOrDefault('start');
+				var x = this.attribute('x').Length.toPixels('x');
+				var y = this.attribute('y').Length.toPixels('y');
+				for (var i=0; i<this.children.length; i++) {
+					var child = this.children[i];
+				
+					if (child.attribute('x').hasValue()) {
+						child.x = child.attribute('x').Length.toPixels('x');
+					}
+					else {
+						if (child.attribute('dx').hasValue()) x += child.attribute('dx').Length.toPixels('x');
+						child.x = x;
+					}
+					
+					var childLength = child.measureText(ctx);
+					if (textAnchor != 'start' && (i==0 || child.attribute('x').hasValue())) { // new group?
+						// loop through rest of children
+						var groupLength = childLength;
+						for (var j=i+1; j<this.children.length; j++) {
+							var childInGroup = this.children[j];
+							if (childInGroup.attribute('x').hasValue()) break; // new group
+							groupLength += childInGroup.measureText(ctx);
+						}
+						child.x -= (textAnchor == 'end' ? groupLength : groupLength / 2.0);
+					}
+					x = child.x + childLength;
+					
+					if (child.attribute('y').hasValue()) {
+						child.y = child.attribute('y').Length.toPixels('y');
+					}
+					else {
+						if (child.attribute('dy').hasValue()) y += child.attribute('dy').Length.toPixels('y');
+						child.y = y;
+					}	
+					y = child.y;
+					
+					child.render(ctx);
+				}
+			}
+		}
+		svg.Element.text.prototype = new svg.Element.RenderedElementBase;
+		
+		// text base
+		svg.Element.TextElementBase = function(node) {
+			this.base = svg.Element.RenderedElementBase;
+			this.base(node);
+			
+			this.getGlyph = function(font, text, i) {
+				var c = text[i];
+				var glyph = null;
+				if (font.isArabic) {
+					var arabicForm = 'isolated';
+					if ((i==0 || text[i-1]==' ') && i<text.length-2 && text[i+1]!=' ') arabicForm = 'terminal'; 
+					if (i>0 && text[i-1]!=' ' && i<text.length-2 && text[i+1]!=' ') arabicForm = 'medial';
+					if (i>0 && text[i-1]!=' ' && (i == text.length-1 || text[i+1]==' ')) arabicForm = 'initial';
+					if (typeof(font.glyphs[c]) != 'undefined') {
+						glyph = font.glyphs[c][arabicForm];
+						if (glyph == null && font.glyphs[c].type == 'glyph') glyph = font.glyphs[c];
+					}
+				}
+				else {
+					glyph = font.glyphs[c];
+				}
+				if (glyph == null) glyph = font.missingGlyph;
+				return glyph;
+			}
+			
+			this.renderChildren = function(ctx) {
+				var customFont = this.parent.style('font-family').Definition.getDefinition();
+				if (customFont != null) {
+					var fontSize = this.parent.style('font-size').numValueOrDefault(svg.Font.Parse(svg.ctx.font).fontSize);
+					var fontStyle = this.parent.style('font-style').valueOrDefault(svg.Font.Parse(svg.ctx.font).fontStyle);
+					var text = this.getText();
+					if (customFont.isRTL) text = text.split("").reverse().join("");
+					
+					var dx = svg.ToNumberArray(this.parent.attribute('dx').value);
+					for (var i=0; i<text.length; i++) {
+						var glyph = this.getGlyph(customFont, text, i);
+						var scale = fontSize / customFont.fontFace.unitsPerEm;
+						ctx.translate(this.x, this.y);
+						ctx.scale(scale, -scale);
+						var lw = ctx.lineWidth;
+						ctx.lineWidth = ctx.lineWidth * customFont.fontFace.unitsPerEm / fontSize;
+						if (fontStyle == 'italic') ctx.transform(1, 0, .4, 1, 0, 0);
+						glyph.render(ctx);
+						if (fontStyle == 'italic') ctx.transform(1, 0, -.4, 1, 0, 0);
+						ctx.lineWidth = lw;
+						ctx.scale(1/scale, -1/scale);
+						ctx.translate(-this.x, -this.y);	
+						
+						this.x += fontSize * (glyph.horizAdvX || customFont.horizAdvX) / customFont.fontFace.unitsPerEm;
+						if (typeof(dx[i]) != 'undefined' && !isNaN(dx[i])) {
+							this.x += dx[i];
+						}
+					}
+					return;
+				}
+			
+				if (ctx.strokeStyle != '') ctx.strokeText(svg.compressSpaces(this.getText()), this.x, this.y);
+				if (ctx.fillStyle != '') ctx.fillText(svg.compressSpaces(this.getText()), this.x, this.y);
+			}
+			
+			this.getText = function() {
+				// OVERRIDE ME
+			}
+			
+			this.measureText = function(ctx) {
+				var customFont = this.parent.style('font-family').Definition.getDefinition();
+				if (customFont != null) {
+					var fontSize = this.parent.style('font-size').numValueOrDefault(svg.Font.Parse(svg.ctx.font).fontSize);
+					var measure = 0;
+					var text = this.getText();
+					if (customFont.isRTL) text = text.split("").reverse().join("");
+					var dx = svg.ToNumberArray(this.parent.attribute('dx').value);
+					for (var i=0; i<text.length; i++) {
+						var glyph = this.getGlyph(customFont, text, i);
+						measure += (glyph.horizAdvX || customFont.horizAdvX) * fontSize / customFont.fontFace.unitsPerEm;
+						if (typeof(dx[i]) != 'undefined' && !isNaN(dx[i])) {
+							measure += dx[i];
+						}
+					}
+					return measure;
+				}
+			
+				var textToMeasure = svg.compressSpaces(this.getText());
+				if (!ctx.measureText) return textToMeasure.length * 10;
+				
+				ctx.save();
+				this.setContext(ctx);
+				var width = ctx.measureText(textToMeasure).width;
+				ctx.restore();
+				return width;
+			}
+		}
+		svg.Element.TextElementBase.prototype = new svg.Element.RenderedElementBase;
+		
+		// tspan 
+		svg.Element.tspan = function(node) {
+			this.base = svg.Element.TextElementBase;
+			this.base(node);
+			
+			this.text = node.nodeType == 3 ? node.nodeValue : // text
+						node.childNodes.length > 0 ? node.childNodes[0].nodeValue : // element
+						node.text;
+			this.getText = function() {
+				return this.text;
+			}
+		}
+		svg.Element.tspan.prototype = new svg.Element.TextElementBase;
+		
+		// tref
+		svg.Element.tref = function(node) {
+			this.base = svg.Element.TextElementBase;
+			this.base(node);
+			
+			this.getText = function() {
+				var element = this.attribute('xlink:href').Definition.getDefinition();
+				if (element != null) return element.children[0].getText();
+			}
+		}
+		svg.Element.tref.prototype = new svg.Element.TextElementBase;		
+		
+		// a element
+		svg.Element.a = function(node) {
+			this.base = svg.Element.TextElementBase;
+			this.base(node);
+			
+			this.hasText = true;
+			for (var i=0; i<node.childNodes.length; i++) {
+				if (node.childNodes[i].nodeType != 3) this.hasText = false;
+			}
+			
+			// this might contain text
+			this.text = this.hasText ? node.childNodes[0].nodeValue : '';
+			this.getText = function() {
+				return this.text;
+			}		
+
+			this.baseRenderChildren = this.renderChildren;
+			this.renderChildren = function(ctx) {
+				if (this.hasText) {
+					// render as text element
+					this.baseRenderChildren(ctx);
+					var fontSize = new svg.Property('fontSize', svg.Font.Parse(svg.ctx.font).fontSize);
+					svg.Mouse.checkBoundingBox(this, new svg.BoundingBox(this.x, this.y - fontSize.Length.toPixels('y'), this.x + this.measureText(ctx), this.y));					
+				}
+				else {
+					// render as temporary group
+					var g = new svg.Element.g();
+					g.children = this.children;
+					g.parent = this;
+					g.render(ctx);
+				}
+			}
+			
+			this.onclick = function() {
+				window.open(this.attribute('xlink:href').value);
+			}
+			
+			this.onmousemove = function() {
+				svg.ctx.canvas.style.cursor = 'pointer';
+			}
+		}
+		svg.Element.a.prototype = new svg.Element.TextElementBase;		
+		
+		// image element
+		svg.Element.image = function(node) {
+			this.base = svg.Element.RenderedElementBase;
+			this.base(node);
+			
+			svg.Images.push(this);
+			this.img = document.createElement('img');
+			this.loaded = false;
+			var that = this;
+			this.img.onload = function() { that.loaded = true; }
+			this.img.src = this.attribute('xlink:href').value;
+			
+			this.renderChildren = function(ctx) {
+				var x = this.attribute('x').Length.toPixels('x');
+				var y = this.attribute('y').Length.toPixels('y');
+				
+				var width = this.attribute('width').Length.toPixels('x');
+				var height = this.attribute('height').Length.toPixels('y');			
+				if (width == 0 || height == 0) return;
+			
+				ctx.save();
+				ctx.translate(x, y);
+				svg.AspectRatio(ctx,
+								this.attribute('preserveAspectRatio').value,
+								width,
+								this.img.width,
+								height,
+								this.img.height,
+								0,
+								0);	
+				ctx.drawImage(this.img, 0, 0);			
+				ctx.restore();
+			}
+		}
+		svg.Element.image.prototype = new svg.Element.RenderedElementBase;
+		
+		// group element
+		svg.Element.g = function(node) {
+			this.base = svg.Element.RenderedElementBase;
+			this.base(node);
+			
+			this.getBoundingBox = function() {
+				var bb = new svg.BoundingBox();
+				for (var i=0; i<this.children.length; i++) {
+					bb.addBoundingBox(this.children[i].getBoundingBox());
+				}
+				return bb;
+			};
+		}
+		svg.Element.g.prototype = new svg.Element.RenderedElementBase;
+
+		// symbol element
+		svg.Element.symbol = function(node) {
+			this.base = svg.Element.RenderedElementBase;
+			this.base(node);
+			
+			this.baseSetContext = this.setContext;
+			this.setContext = function(ctx) {		
+				this.baseSetContext(ctx);
+				
+				// viewbox
+				if (this.attribute('viewBox').hasValue()) {				
+					var viewBox = svg.ToNumberArray(this.attribute('viewBox').value);
+					var minX = viewBox[0];
+					var minY = viewBox[1];
+					width = viewBox[2];
+					height = viewBox[3];
+					
+					svg.AspectRatio(ctx,
+									this.attribute('preserveAspectRatio').value, 
+									this.attribute('width').Length.toPixels('x'),
+									width,
+									this.attribute('height').Length.toPixels('y'),
+									height,
+									minX,
+									minY);
+
+					svg.ViewPort.SetCurrent(viewBox[2], viewBox[3]);						
+				}
+			}			
+		}
+		svg.Element.symbol.prototype = new svg.Element.RenderedElementBase;		
+			
+		// style element
+		svg.Element.style = function(node) { 
+			this.base = svg.Element.ElementBase;
+			this.base(node);
+			
+			// text, or spaces then CDATA
+			var css = node.childNodes[0].nodeValue + (node.childNodes.length > 1 ? node.childNodes[1].nodeValue : '');
+			css = css.replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm, ''); // remove comments
+			css = svg.compressSpaces(css); // replace whitespace
+			var cssDefs = css.split('}');
+			for (var i=0; i<cssDefs.length; i++) {
+				if (svg.trim(cssDefs[i]) != '') {
+					var cssDef = cssDefs[i].split('{');
+					var cssClasses = cssDef[0].split(',');
+					var cssProps = cssDef[1].split(';');
+					for (var j=0; j<cssClasses.length; j++) {
+						var cssClass = svg.trim(cssClasses[j]);
+						if (cssClass != '') {
+							var props = {};
+							for (var k=0; k<cssProps.length; k++) {
+								var prop = cssProps[k].indexOf(':');
+								var name = cssProps[k].substr(0, prop);
+								var value = cssProps[k].substr(prop + 1, cssProps[k].length - prop);
+								if (name != null && value != null) {
+									props[svg.trim(name)] = new svg.Property(svg.trim(name), svg.trim(value));
+								}
+							}
+							svg.Styles[cssClass] = props;
+							if (cssClass == '@font-face') {
+								var fontFamily = props['font-family'].value.replace(/"/g,'');
+								var srcs = props['src'].value.split(',');
+								for (var s=0; s<srcs.length; s++) {
+									if (srcs[s].indexOf('format("svg")') > 0) {
+										var urlStart = srcs[s].indexOf('url');
+										var urlEnd = srcs[s].indexOf(')', urlStart);
+										var url = srcs[s].substr(urlStart + 5, urlEnd - urlStart - 6);
+										var doc = svg.parseXml(svg.ajax(url));
+										var fonts = doc.getElementsByTagName('font');
+										for (var f=0; f<fonts.length; f++) {
+											var font = svg.CreateElement(fonts[f]);
+											svg.Definitions[fontFamily] = font;
+										}
+									}
+								}
+							}
+						}
+					}
+				}
+			}
+		}
+		svg.Element.style.prototype = new svg.Element.ElementBase;
+		
+		// use element 
+		svg.Element.use = function(node) {
+			this.base = svg.Element.RenderedElementBase;
+			this.base(node);
+			
+			this.baseSetContext = this.setContext;
+			this.setContext = function(ctx) {
+				this.baseSetContext(ctx);
+				if (this.attribute('x').hasValue()) ctx.translate(this.attribute('x').Length.toPixels('x'), 0);
+				if (this.attribute('y').hasValue()) ctx.translate(0, this.attribute('y').Length.toPixels('y'));
+			}
+			
+			this.getDefinition = function() {
+				var element = this.attribute('xlink:href').Definition.getDefinition();
+				if (this.attribute('width').hasValue()) element.attribute('width', true).value = this.attribute('width').value;
+				if (this.attribute('height').hasValue()) element.attribute('height', true).value = this.attribute('height').value;
+				return element;
+			}
+			
+			this.path = function(ctx) {
+				var element = this.getDefinition();
+				if (element != null) element.path(ctx);
+			}
+			
+			this.renderChildren = function(ctx) {
+				var element = this.getDefinition();
+				if (element != null) element.render(ctx);
+			}
+		}
+		svg.Element.use.prototype = new svg.Element.RenderedElementBase;
+		
+		// mask element
+		svg.Element.mask = function(node) {
+			this.base = svg.Element.ElementBase;
+			this.base(node);
+						
+			this.apply = function(ctx, element) {
+				// render as temp svg	
+				var x = this.attribute('x').Length.toPixels('x');
+				var y = this.attribute('y').Length.toPixels('y');
+				var width = this.attribute('width').Length.toPixels('x');
+				var height = this.attribute('height').Length.toPixels('y');
+				
+				// temporarily remove mask to avoid recursion
+				var mask = element.attribute('mask').value;
+				element.attribute('mask').value = '';
+				
+					var cMask = document.createElement('canvas');
+					cMask.width = x + width;
+					cMask.height = y + height;
+					var maskCtx = cMask.getContext('2d');
+					this.renderChildren(maskCtx);
+				
+					var c = document.createElement('canvas');
+					c.width = x + width;
+					c.height = y + height;
+					var tempCtx = c.getContext('2d');
+					element.render(tempCtx);
+					tempCtx.globalCompositeOperation = 'destination-in';
+					tempCtx.fillStyle = maskCtx.createPattern(cMask, 'no-repeat');
+					tempCtx.fillRect(0, 0, x + width, y + height);
+					
+					ctx.fillStyle = tempCtx.createPattern(c, 'no-repeat');
+					ctx.fillRect(0, 0, x + width, y + height);
+					
+				// reassign mask
+				element.attribute('mask').value = mask;	
+			}
+			
+			this.render = function(ctx) {
+				// NO RENDER
+			}
+		}
+		svg.Element.mask.prototype = new svg.Element.ElementBase;
+		
+		// clip element
+		svg.Element.clipPath = function(node) {
+			this.base = svg.Element.ElementBase;
+			this.base(node);
+			
+			this.apply = function(ctx) {
+				for (var i=0; i<this.children.length; i++) {
+					if (this.children[i].path) {
+						this.children[i].path(ctx);
+						ctx.clip();
+					}
+				}
+			}
+			
+			this.render = function(ctx) {
+				// NO RENDER
+			}
+		}
+		svg.Element.clipPath.prototype = new svg.Element.ElementBase;
+
+		// filters
+		svg.Element.filter = function(node) {
+			this.base = svg.Element.ElementBase;
+			this.base(node);
+						
+			this.apply = function(ctx, element) {
+				// render as temp svg	
+				var bb = element.getBoundingBox();
+				var x = this.attribute('x').Length.toPixels('x');
+				var y = this.attribute('y').Length.toPixels('y');
+				if (x == 0 || y == 0) {
+					x = bb.x1;
+					y = bb.y1;
+				}
+				var width = this.attribute('width').Length.toPixels('x');
+				var height = this.attribute('height').Length.toPixels('y');
+				if (width == 0 || height == 0) {
+					width = bb.width();
+					height = bb.height();
+				}
+				
+				// temporarily remove filter to avoid recursion
+				var filter = element.style('filter').value;
+				element.style('filter').value = '';
+				
+				// max filter distance
+				var extraPercent = .20;
+				var px = extraPercent * width;
+				var py = extraPercent * height;
+				
+				var c = document.createElement('canvas');
+				c.width = width + 2*px;
+				c.height = height + 2*py;
+				var tempCtx = c.getContext('2d');
+				tempCtx.translate(-x + px, -y + py);
+				element.render(tempCtx);
+			
+				// apply filters
+				for (var i=0; i<this.children.length; i++) {
+					this.children[i].apply(tempCtx, 0, 0, width + 2*px, height + 2*py);
+				}
+				
+				// render on me
+				ctx.drawImage(c, 0, 0, width + 2*px, height + 2*py, x - px, y - py, width + 2*px, height + 2*py);
+				
+				// reassign filter
+				element.style('filter', true).value = filter;	
+			}
+			
+			this.render = function(ctx) {
+				// NO RENDER
+			}		
+		}
+		svg.Element.filter.prototype = new svg.Element.ElementBase;
+		
+		svg.Element.feGaussianBlur = function(node) {
+			this.base = svg.Element.ElementBase;
+			this.base(node);	
+			
+			function make_fgauss(sigma) {
+				sigma = Math.max(sigma, 0.01);			      
+				var len = Math.ceil(sigma * 4.0) + 1;                     
+				mask = [];                               
+				for (var i = 0; i < len; i++) {                             
+					mask[i] = Math.exp(-0.5 * (i / sigma) * (i / sigma));                                           
+				}                                                           
+				return mask; 
+			}
+			
+			function normalize(mask) {
+				var sum = 0;
+				for (var i = 1; i < mask.length; i++) {
+					sum += Math.abs(mask[i]);
+				}
+				sum = 2 * sum + Math.abs(mask[0]);
+				for (var i = 0; i < mask.length; i++) {
+					mask[i] /= sum;
+				}
+				return mask;
+			}
+			
+			function convolve_even(src, dst, mask, width, height) {
+			  for (var y = 0; y < height; y++) {
+				for (var x = 0; x < width; x++) {
+				  var a = imGet(src, x, y, width, height, 3)/255;
+				  for (var rgba = 0; rgba < 4; rgba++) {					  
+					  var sum = mask[0] * (a==0?255:imGet(src, x, y, width, height, rgba)) * (a==0||rgba==3?1:a);
+					  for 

<TRUNCATED>

[26/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.0.5/angular-sanitize.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.0.5/angular-sanitize.js b/portal/js/libs/angular-1.0.5/angular-sanitize.js
new file mode 100644
index 0000000..39e72bf
--- /dev/null
+++ b/portal/js/libs/angular-1.0.5/angular-sanitize.js
@@ -0,0 +1,535 @@
+/**
+ * @license AngularJS v1.0.5
+ * (c) 2010-2012 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, angular, undefined) {
+'use strict';
+
+/**
+ * @ngdoc overview
+ * @name ngSanitize
+ * @description
+ */
+
+/*
+ * HTML Parser By Misko Hevery (misko@hevery.com)
+ * based on:  HTML Parser By John Resig (ejohn.org)
+ * Original code by Erik Arvidsson, Mozilla Public License
+ * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
+ *
+ * // Use like so:
+ * htmlParser(htmlString, {
+ *     start: function(tag, attrs, unary) {},
+ *     end: function(tag) {},
+ *     chars: function(text) {},
+ *     comment: function(text) {}
+ * });
+ *
+ */
+
+
+/**
+ * @ngdoc service
+ * @name ngSanitize.$sanitize
+ * @function
+ *
+ * @description
+ *   The input is sanitized by parsing the html into tokens. All safe tokens (from a whitelist) are
+ *   then serialized back to properly escaped html string. This means that no unsafe input can make
+ *   it into the returned string, however, since our parser is more strict than a typical browser
+ *   parser, it's possible that some obscure input, which would be recognized as valid HTML by a
+ *   browser, won't make it through the sanitizer.
+ *
+ * @param {string} html Html input.
+ * @returns {string} Sanitized html.
+ *
+ * @example
+   <doc:example module="ngSanitize">
+     <doc:source>
+       <script>
+         function Ctrl($scope) {
+           $scope.snippet =
+             '<p style="color:blue">an html\n' +
+             '<em onmouseover="this.textContent=\'PWN3D!\'">click here</em>\n' +
+             'snippet</p>';
+         }
+       </script>
+       <div ng-controller="Ctrl">
+          Snippet: <textarea ng-model="snippet" cols="60" rows="3"></textarea>
+           <table>
+             <tr>
+               <td>Filter</td>
+               <td>Source</td>
+               <td>Rendered</td>
+             </tr>
+             <tr id="html-filter">
+               <td>html filter</td>
+               <td>
+                 <pre>&lt;div ng-bind-html="snippet"&gt;<br/>&lt;/div&gt;</pre>
+               </td>
+               <td>
+                 <div ng-bind-html="snippet"></div>
+               </td>
+             </tr>
+             <tr id="escaped-html">
+               <td>no filter</td>
+               <td><pre>&lt;div ng-bind="snippet"&gt;<br/>&lt;/div&gt;</pre></td>
+               <td><div ng-bind="snippet"></div></td>
+             </tr>
+             <tr id="html-unsafe-filter">
+               <td>unsafe html filter</td>
+               <td><pre>&lt;div ng-bind-html-unsafe="snippet"&gt;<br/>&lt;/div&gt;</pre></td>
+               <td><div ng-bind-html-unsafe="snippet"></div></td>
+             </tr>
+           </table>
+         </div>
+     </doc:source>
+     <doc:scenario>
+       it('should sanitize the html snippet ', function() {
+         expect(using('#html-filter').element('div').html()).
+           toBe('<p>an html\n<em>click here</em>\nsnippet</p>');
+       });
+
+       it('should escape snippet without any filter', function() {
+         expect(using('#escaped-html').element('div').html()).
+           toBe("&lt;p style=\"color:blue\"&gt;an html\n" +
+                "&lt;em onmouseover=\"this.textContent='PWN3D!'\"&gt;click here&lt;/em&gt;\n" +
+                "snippet&lt;/p&gt;");
+       });
+
+       it('should inline raw snippet if filtered as unsafe', function() {
+         expect(using('#html-unsafe-filter').element("div").html()).
+           toBe("<p style=\"color:blue\">an html\n" +
+                "<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" +
+                "snippet</p>");
+       });
+
+       it('should update', function() {
+         input('snippet').enter('new <b>text</b>');
+         expect(using('#html-filter').binding('snippet')).toBe('new <b>text</b>');
+         expect(using('#escaped-html').element('div').html()).toBe("new &lt;b&gt;text&lt;/b&gt;");
+         expect(using('#html-unsafe-filter').binding("snippet")).toBe('new <b>text</b>');
+       });
+     </doc:scenario>
+   </doc:example>
+ */
+var $sanitize = function(html) {
+  var buf = [];
+    htmlParser(html, htmlSanitizeWriter(buf));
+    return buf.join('');
+};
+
+
+// Regular Expressions for parsing tags and attributes
+var START_TAG_REGEXP = /^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,
+  END_TAG_REGEXP = /^<\s*\/\s*([\w:-]+)[^>]*>/,
+  ATTR_REGEXP = /([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,
+  BEGIN_TAG_REGEXP = /^</,
+  BEGING_END_TAGE_REGEXP = /^<\s*\//,
+  COMMENT_REGEXP = /<!--(.*?)-->/g,
+  CDATA_REGEXP = /<!\[CDATA\[(.*?)]]>/g,
+  URI_REGEXP = /^((ftp|https?):\/\/|mailto:|#)/,
+  NON_ALPHANUMERIC_REGEXP = /([^\#-~| |!])/g; // Match everything outside of normal chars and " (quote character)
+
+
+// Good source of info about elements and attributes
+// http://dev.w3.org/html5/spec/Overview.html#semantics
+// http://simon.html5.org/html-elements
+
+// Safe Void Elements - HTML5
+// http://dev.w3.org/html5/spec/Overview.html#void-elements
+var voidElements = makeMap("area,br,col,hr,img,wbr");
+
+// Elements that you can, intentionally, leave open (and which close themselves)
+// http://dev.w3.org/html5/spec/Overview.html#optional-tags
+var optionalEndTagBlockElements = makeMap("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),
+    optionalEndTagInlineElements = makeMap("rp,rt"),
+    optionalEndTagElements = angular.extend({}, optionalEndTagInlineElements, optionalEndTagBlockElements);
+
+// Safe Block Elements - HTML5
+var blockElements = angular.extend({}, optionalEndTagBlockElements, makeMap("address,article,aside," +
+        "blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6," +
+        "header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul"));
+
+// Inline Elements - HTML5
+var inlineElements = angular.extend({}, optionalEndTagInlineElements, makeMap("a,abbr,acronym,b,bdi,bdo," +
+        "big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small," +
+        "span,strike,strong,sub,sup,time,tt,u,var"));
+
+
+// Special Elements (can contain anything)
+var specialElements = makeMap("script,style");
+
+var validElements = angular.extend({}, voidElements, blockElements, inlineElements, optionalEndTagElements);
+
+//Attributes that have href and hence need to be sanitized
+var uriAttrs = makeMap("background,cite,href,longdesc,src,usemap");
+var validAttrs = angular.extend({}, uriAttrs, makeMap(
+    'abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,'+
+    'color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,'+
+    'ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,'+
+    'scope,scrolling,shape,span,start,summary,target,title,type,'+
+    'valign,value,vspace,width'));
+
+function makeMap(str) {
+  var obj = {}, items = str.split(','), i;
+  for (i = 0; i < items.length; i++) obj[items[i]] = true;
+  return obj;
+}
+
+
+/**
+ * @example
+ * htmlParser(htmlString, {
+ *     start: function(tag, attrs, unary) {},
+ *     end: function(tag) {},
+ *     chars: function(text) {},
+ *     comment: function(text) {}
+ * });
+ *
+ * @param {string} html string
+ * @param {object} handler
+ */
+function htmlParser( html, handler ) {
+  var index, chars, match, stack = [], last = html;
+  stack.last = function() { return stack[ stack.length - 1 ]; };
+
+  while ( html ) {
+    chars = true;
+
+    // Make sure we're not in a script or style element
+    if ( !stack.last() || !specialElements[ stack.last() ] ) {
+
+      // Comment
+      if ( html.indexOf("<!--") === 0 ) {
+        index = html.indexOf("-->");
+
+        if ( index >= 0 ) {
+          if (handler.comment) handler.comment( html.substring( 4, index ) );
+          html = html.substring( index + 3 );
+          chars = false;
+        }
+
+      // end tag
+      } else if ( BEGING_END_TAGE_REGEXP.test(html) ) {
+        match = html.match( END_TAG_REGEXP );
+
+        if ( match ) {
+          html = html.substring( match[0].length );
+          match[0].replace( END_TAG_REGEXP, parseEndTag );
+          chars = false;
+        }
+
+      // start tag
+      } else if ( BEGIN_TAG_REGEXP.test(html) ) {
+        match = html.match( START_TAG_REGEXP );
+
+        if ( match ) {
+          html = html.substring( match[0].length );
+          match[0].replace( START_TAG_REGEXP, parseStartTag );
+          chars = false;
+        }
+      }
+
+      if ( chars ) {
+        index = html.indexOf("<");
+
+        var text = index < 0 ? html : html.substring( 0, index );
+        html = index < 0 ? "" : html.substring( index );
+
+        if (handler.chars) handler.chars( decodeEntities(text) );
+      }
+
+    } else {
+      html = html.replace(new RegExp("(.*)<\\s*\\/\\s*" + stack.last() + "[^>]*>", 'i'), function(all, text){
+        text = text.
+          replace(COMMENT_REGEXP, "$1").
+          replace(CDATA_REGEXP, "$1");
+
+        if (handler.chars) handler.chars( decodeEntities(text) );
+
+        return "";
+      });
+
+      parseEndTag( "", stack.last() );
+    }
+
+    if ( html == last ) {
+      throw "Parse Error: " + html;
+    }
+    last = html;
+  }
+
+  // Clean up any remaining tags
+  parseEndTag();
+
+  function parseStartTag( tag, tagName, rest, unary ) {
+    tagName = angular.lowercase(tagName);
+    if ( blockElements[ tagName ] ) {
+      while ( stack.last() && inlineElements[ stack.last() ] ) {
+        parseEndTag( "", stack.last() );
+      }
+    }
+
+    if ( optionalEndTagElements[ tagName ] && stack.last() == tagName ) {
+      parseEndTag( "", tagName );
+    }
+
+    unary = voidElements[ tagName ] || !!unary;
+
+    if ( !unary )
+      stack.push( tagName );
+
+    var attrs = {};
+
+    rest.replace(ATTR_REGEXP, function(match, name, doubleQuotedValue, singleQoutedValue, unqoutedValue) {
+      var value = doubleQuotedValue
+        || singleQoutedValue
+        || unqoutedValue
+        || '';
+
+      attrs[name] = decodeEntities(value);
+    });
+    if (handler.start) handler.start( tagName, attrs, unary );
+  }
+
+  function parseEndTag( tag, tagName ) {
+    var pos = 0, i;
+    tagName = angular.lowercase(tagName);
+    if ( tagName )
+      // Find the closest opened tag of the same type
+      for ( pos = stack.length - 1; pos >= 0; pos-- )
+        if ( stack[ pos ] == tagName )
+          break;
+
+    if ( pos >= 0 ) {
+      // Close all the open elements, up the stack
+      for ( i = stack.length - 1; i >= pos; i-- )
+        if (handler.end) handler.end( stack[ i ] );
+
+      // Remove the open elements from the stack
+      stack.length = pos;
+    }
+  }
+}
+
+/**
+ * decodes all entities into regular string
+ * @param value
+ * @returns {string} A string with decoded entities.
+ */
+var hiddenPre=document.createElement("pre");
+function decodeEntities(value) {
+  hiddenPre.innerHTML=value.replace(/</g,"&lt;");
+  return hiddenPre.innerText || hiddenPre.textContent || '';
+}
+
+/**
+ * Escapes all potentially dangerous characters, so that the
+ * resulting string can be safely inserted into attribute or
+ * element text.
+ * @param value
+ * @returns escaped text
+ */
+function encodeEntities(value) {
+  return value.
+    replace(/&/g, '&amp;').
+    replace(NON_ALPHANUMERIC_REGEXP, function(value){
+      return '&#' + value.charCodeAt(0) + ';';
+    }).
+    replace(/</g, '&lt;').
+    replace(/>/g, '&gt;');
+}
+
+/**
+ * create an HTML/XML writer which writes to buffer
+ * @param {Array} buf use buf.jain('') to get out sanitized html string
+ * @returns {object} in the form of {
+ *     start: function(tag, attrs, unary) {},
+ *     end: function(tag) {},
+ *     chars: function(text) {},
+ *     comment: function(text) {}
+ * }
+ */
+function htmlSanitizeWriter(buf){
+  var ignore = false;
+  var out = angular.bind(buf, buf.push);
+  return {
+    start: function(tag, attrs, unary){
+      tag = angular.lowercase(tag);
+      if (!ignore && specialElements[tag]) {
+        ignore = tag;
+      }
+      if (!ignore && validElements[tag] == true) {
+        out('<');
+        out(tag);
+        angular.forEach(attrs, function(value, key){
+          var lkey=angular.lowercase(key);
+          if (validAttrs[lkey]==true && (uriAttrs[lkey]!==true || value.match(URI_REGEXP))) {
+            out(' ');
+            out(key);
+            out('="');
+            out(encodeEntities(value));
+            out('"');
+          }
+        });
+        out(unary ? '/>' : '>');
+      }
+    },
+    end: function(tag){
+        tag = angular.lowercase(tag);
+        if (!ignore && validElements[tag] == true) {
+          out('</');
+          out(tag);
+          out('>');
+        }
+        if (tag == ignore) {
+          ignore = false;
+        }
+      },
+    chars: function(chars){
+        if (!ignore) {
+          out(encodeEntities(chars));
+        }
+      }
+  };
+}
+
+
+// define ngSanitize module and register $sanitize service
+angular.module('ngSanitize', []).value('$sanitize', $sanitize);
+
+/**
+ * @ngdoc directive
+ * @name ngSanitize.directive:ngBindHtml
+ *
+ * @description
+ * Creates a binding that will sanitize the result of evaluating the `expression` with the
+ * {@link ngSanitize.$sanitize $sanitize} service and innerHTML the result into the current element.
+ *
+ * See {@link ngSanitize.$sanitize $sanitize} docs for examples.
+ *
+ * @element ANY
+ * @param {expression} ngBindHtml {@link guide/expression Expression} to evaluate.
+ */
+angular.module('ngSanitize').directive('ngBindHtml', ['$sanitize', function($sanitize) {
+  return function(scope, element, attr) {
+    element.addClass('ng-binding').data('$binding', attr.ngBindHtml);
+    scope.$watch(attr.ngBindHtml, function ngBindHtmlWatchAction(value) {
+      value = $sanitize(value);
+      element.html(value || '');
+    });
+  };
+}]);
+/**
+ * @ngdoc filter
+ * @name ngSanitize.filter:linky
+ * @function
+ *
+ * @description
+ *   Finds links in text input and turns them into html links. Supports http/https/ftp/mailto and
+ *   plain email address links.
+ *
+ * @param {string} text Input text.
+ * @returns {string} Html-linkified text.
+ *
+ * @usage
+   <span ng-bind-html="linky_expression | linky"></span>
+ *
+ * @example
+   <doc:example module="ngSanitize">
+     <doc:source>
+       <script>
+         function Ctrl($scope) {
+           $scope.snippet =
+             'Pretty text with some links:\n'+
+             'http://angularjs.org/,\n'+
+             'mailto:us@somewhere.org,\n'+
+             'another@somewhere.org,\n'+
+             'and one more: ftp://127.0.0.1/.';
+         }
+       </script>
+       <div ng-controller="Ctrl">
+       Snippet: <textarea ng-model="snippet" cols="60" rows="3"></textarea>
+       <table>
+         <tr>
+           <td>Filter</td>
+           <td>Source</td>
+           <td>Rendered</td>
+         </tr>
+         <tr id="linky-filter">
+           <td>linky filter</td>
+           <td>
+             <pre>&lt;div ng-bind-html="snippet | linky"&gt;<br>&lt;/div&gt;</pre>
+           </td>
+           <td>
+             <div ng-bind-html="snippet | linky"></div>
+           </td>
+         </tr>
+         <tr id="escaped-html">
+           <td>no filter</td>
+           <td><pre>&lt;div ng-bind="snippet"&gt;<br>&lt;/div&gt;</pre></td>
+           <td><div ng-bind="snippet"></div></td>
+         </tr>
+       </table>
+     </doc:source>
+     <doc:scenario>
+       it('should linkify the snippet with urls', function() {
+         expect(using('#linky-filter').binding('snippet | linky')).
+           toBe('Pretty text with some links:&#10;' +
+                '<a href="http://angularjs.org/">http://angularjs.org/</a>,&#10;' +
+                '<a href="mailto:us@somewhere.org">us@somewhere.org</a>,&#10;' +
+                '<a href="mailto:another@somewhere.org">another@somewhere.org</a>,&#10;' +
+                'and one more: <a href="ftp://127.0.0.1/">ftp://127.0.0.1/</a>.');
+       });
+
+       it ('should not linkify snippet without the linky filter', function() {
+         expect(using('#escaped-html').binding('snippet')).
+           toBe("Pretty text with some links:\n" +
+                "http://angularjs.org/,\n" +
+                "mailto:us@somewhere.org,\n" +
+                "another@somewhere.org,\n" +
+                "and one more: ftp://127.0.0.1/.");
+       });
+
+       it('should update', function() {
+         input('snippet').enter('new http://link.');
+         expect(using('#linky-filter').binding('snippet | linky')).
+           toBe('new <a href="http://link">http://link</a>.');
+         expect(using('#escaped-html').binding('snippet')).toBe('new http://link.');
+       });
+     </doc:scenario>
+   </doc:example>
+ */
+angular.module('ngSanitize').filter('linky', function() {
+  var LINKY_URL_REGEXP = /((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s\.\;\,\(\)\{\}\<\>]/,
+      MAILTO_REGEXP = /^mailto:/;
+
+  return function(text) {
+    if (!text) return text;
+    var match;
+    var raw = text;
+    var html = [];
+    // TODO(vojta): use $sanitize instead
+    var writer = htmlSanitizeWriter(html);
+    var url;
+    var i;
+    while ((match = raw.match(LINKY_URL_REGEXP))) {
+      // We can not end in these as they are sometimes found at the end of the sentence
+      url = match[0];
+      // if we did not match ftp/http/mailto then assume mailto
+      if (match[2] == match[3]) url = 'mailto:' + url;
+      i = match.index;
+      writer.chars(raw.substr(0, i));
+      writer.start('a', {href:url});
+      writer.chars(match[0].replace(MAILTO_REGEXP, ''));
+      writer.end('a');
+      raw = raw.substring(i + match[0].length);
+    }
+    writer.chars(raw);
+    return html.join('');
+  };
+});
+
+})(window, window.angular);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.0.5/angular-sanitize.min.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.0.5/angular-sanitize.min.js b/portal/js/libs/angular-1.0.5/angular-sanitize.min.js
new file mode 100644
index 0000000..212a90a
--- /dev/null
+++ b/portal/js/libs/angular-1.0.5/angular-sanitize.min.js
@@ -0,0 +1,13 @@
+/*
+ AngularJS v1.0.5
+ (c) 2010-2012 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(I,g){'use strict';function i(a){var d={},a=a.split(","),b;for(b=0;b<a.length;b++)d[a[b]]=!0;return d}function z(a,d){function b(a,b,c,h){b=g.lowercase(b);if(m[b])for(;f.last()&&n[f.last()];)e("",f.last());o[b]&&f.last()==b&&e("",b);(h=p[b]||!!h)||f.push(b);var j={};c.replace(A,function(a,b,d,e,c){j[b]=k(d||e||c||"")});d.start&&d.start(b,j,h)}function e(a,b){var e=0,c;if(b=g.lowercase(b))for(e=f.length-1;e>=0;e--)if(f[e]==b)break;if(e>=0){for(c=f.length-1;c>=e;c--)d.end&&d.end(f[c]);f.length=
+e}}var c,h,f=[],j=a;for(f.last=function(){return f[f.length-1]};a;){h=!0;if(!f.last()||!q[f.last()]){if(a.indexOf("<\!--")===0)c=a.indexOf("--\>"),c>=0&&(d.comment&&d.comment(a.substring(4,c)),a=a.substring(c+3),h=!1);else if(B.test(a)){if(c=a.match(r))a=a.substring(c[0].length),c[0].replace(r,e),h=!1}else if(C.test(a)&&(c=a.match(s)))a=a.substring(c[0].length),c[0].replace(s,b),h=!1;h&&(c=a.indexOf("<"),h=c<0?a:a.substring(0,c),a=c<0?"":a.substring(c),d.chars&&d.chars(k(h)))}else a=a.replace(RegExp("(.*)<\\s*\\/\\s*"+
+f.last()+"[^>]*>","i"),function(b,a){a=a.replace(D,"$1").replace(E,"$1");d.chars&&d.chars(k(a));return""}),e("",f.last());if(a==j)throw"Parse Error: "+a;j=a}e()}function k(a){l.innerHTML=a.replace(/</g,"&lt;");return l.innerText||l.textContent||""}function t(a){return a.replace(/&/g,"&amp;").replace(F,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function u(a){var d=!1,b=g.bind(a,a.push);return{start:function(a,c,h){a=g.lowercase(a);!d&&q[a]&&(d=a);!d&&v[a]==
+!0&&(b("<"),b(a),g.forEach(c,function(a,c){var e=g.lowercase(c);if(G[e]==!0&&(w[e]!==!0||a.match(H)))b(" "),b(c),b('="'),b(t(a)),b('"')}),b(h?"/>":">"))},end:function(a){a=g.lowercase(a);!d&&v[a]==!0&&(b("</"),b(a),b(">"));a==d&&(d=!1)},chars:function(a){d||b(t(a))}}}var s=/^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,r=/^<\s*\/\s*([\w:-]+)[^>]*>/,A=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,C=/^</,B=/^<\s*\//,D=/<\!--(.*?)--\>/g,
+E=/<!\[CDATA\[(.*?)]]\>/g,H=/^((ftp|https?):\/\/|mailto:|#)/,F=/([^\#-~| |!])/g,p=i("area,br,col,hr,img,wbr"),x=i("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),y=i("rp,rt"),o=g.extend({},y,x),m=g.extend({},x,i("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),n=g.extend({},y,i("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),
+q=i("script,style"),v=g.extend({},p,m,n,o),w=i("background,cite,href,longdesc,src,usemap"),G=g.extend({},w,i("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,span,start,summary,target,title,type,valign,value,vspace,width")),l=document.createElement("pre");g.module("ngSanitize",[]).value("$sanitize",function(a){var d=[];
+z(a,u(d));return d.join("")});g.module("ngSanitize").directive("ngBindHtml",["$sanitize",function(a){return function(d,b,e){b.addClass("ng-binding").data("$binding",e.ngBindHtml);d.$watch(e.ngBindHtml,function(c){c=a(c);b.html(c||"")})}}]);g.module("ngSanitize").filter("linky",function(){var a=/((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s\.\;\,\(\)\{\}\<\>]/,d=/^mailto:/;return function(b){if(!b)return b;for(var e=b,c=[],h=u(c),f,g;b=e.match(a);)f=b[0],b[2]==b[3]&&(f="mailto:"+f),g=b.index,
+h.chars(e.substr(0,g)),h.start("a",{href:f}),h.chars(b[0].replace(d,"")),h.end("a"),e=e.substring(g+b[0].length);h.chars(e);return c.join("")}})})(window,window.angular);


[24/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.0.5/angular.min.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.0.5/angular.min.js b/portal/js/libs/angular-1.0.5/angular.min.js
new file mode 100644
index 0000000..07ea01c
--- /dev/null
+++ b/portal/js/libs/angular-1.0.5/angular.min.js
@@ -0,0 +1,161 @@
+/*
+ AngularJS v1.0.5
+ (c) 2010-2012 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(X,Y,q){'use strict';function n(b,a,c){var d;if(b)if(H(b))for(d in b)d!="prototype"&&d!="length"&&d!="name"&&b.hasOwnProperty(d)&&a.call(c,b[d],d);else if(b.forEach&&b.forEach!==n)b.forEach(a,c);else if(!b||typeof b.length!=="number"?0:typeof b.hasOwnProperty!="function"&&typeof b.constructor!="function"||b instanceof L||ca&&b instanceof ca||xa.call(b)!=="[object Object]"||typeof b.callee==="function")for(d=0;d<b.length;d++)a.call(c,b[d],d);else for(d in b)b.hasOwnProperty(d)&&a.call(c,b[d],
+d);return b}function mb(b){var a=[],c;for(c in b)b.hasOwnProperty(c)&&a.push(c);return a.sort()}function fc(b,a,c){for(var d=mb(b),e=0;e<d.length;e++)a.call(c,b[d[e]],d[e]);return d}function nb(b){return function(a,c){b(c,a)}}function ya(){for(var b=aa.length,a;b;){b--;a=aa[b].charCodeAt(0);if(a==57)return aa[b]="A",aa.join("");if(a==90)aa[b]="0";else return aa[b]=String.fromCharCode(a+1),aa.join("")}aa.unshift("0");return aa.join("")}function v(b){n(arguments,function(a){a!==b&&n(a,function(a,d){b[d]=
+a})});return b}function E(b){return parseInt(b,10)}function za(b,a){return v(new (v(function(){},{prototype:b})),a)}function C(){}function na(b){return b}function I(b){return function(){return b}}function w(b){return typeof b=="undefined"}function x(b){return typeof b!="undefined"}function M(b){return b!=null&&typeof b=="object"}function A(b){return typeof b=="string"}function Ra(b){return typeof b=="number"}function oa(b){return xa.apply(b)=="[object Date]"}function B(b){return xa.apply(b)=="[object Array]"}
+function H(b){return typeof b=="function"}function pa(b){return b&&b.document&&b.location&&b.alert&&b.setInterval}function O(b){return A(b)?b.replace(/^\s*/,"").replace(/\s*$/,""):b}function gc(b){return b&&(b.nodeName||b.bind&&b.find)}function Sa(b,a,c){var d=[];n(b,function(b,g,h){d.push(a.call(c,b,g,h))});return d}function Aa(b,a){if(b.indexOf)return b.indexOf(a);for(var c=0;c<b.length;c++)if(a===b[c])return c;return-1}function Ta(b,a){var c=Aa(b,a);c>=0&&b.splice(c,1);return a}function U(b,a){if(pa(b)||
+b&&b.$evalAsync&&b.$watch)throw Error("Can't copy Window or Scope");if(a){if(b===a)throw Error("Can't copy equivalent objects or arrays");if(B(b))for(var c=a.length=0;c<b.length;c++)a.push(U(b[c]));else for(c in n(a,function(b,c){delete a[c]}),b)a[c]=U(b[c])}else(a=b)&&(B(b)?a=U(b,[]):oa(b)?a=new Date(b.getTime()):M(b)&&(a=U(b,{})));return a}function hc(b,a){var a=a||{},c;for(c in b)b.hasOwnProperty(c)&&c.substr(0,2)!=="$$"&&(a[c]=b[c]);return a}function ga(b,a){if(b===a)return!0;if(b===null||a===
+null)return!1;if(b!==b&&a!==a)return!0;var c=typeof b,d;if(c==typeof a&&c=="object")if(B(b)){if((c=b.length)==a.length){for(d=0;d<c;d++)if(!ga(b[d],a[d]))return!1;return!0}}else if(oa(b))return oa(a)&&b.getTime()==a.getTime();else{if(b&&b.$evalAsync&&b.$watch||a&&a.$evalAsync&&a.$watch||pa(b)||pa(a))return!1;c={};for(d in b)if(!(d.charAt(0)==="$"||H(b[d]))){if(!ga(b[d],a[d]))return!1;c[d]=!0}for(d in a)if(!c[d]&&d.charAt(0)!=="$"&&a[d]!==q&&!H(a[d]))return!1;return!0}return!1}function Ua(b,a){var c=
+arguments.length>2?ha.call(arguments,2):[];return H(a)&&!(a instanceof RegExp)?c.length?function(){return arguments.length?a.apply(b,c.concat(ha.call(arguments,0))):a.apply(b,c)}:function(){return arguments.length?a.apply(b,arguments):a.call(b)}:a}function ic(b,a){var c=a;/^\$+/.test(b)?c=q:pa(a)?c="$WINDOW":a&&Y===a?c="$DOCUMENT":a&&a.$evalAsync&&a.$watch&&(c="$SCOPE");return c}function da(b,a){return JSON.stringify(b,ic,a?"  ":null)}function ob(b){return A(b)?JSON.parse(b):b}function Va(b){b&&b.length!==
+0?(b=y(""+b),b=!(b=="f"||b=="0"||b=="false"||b=="no"||b=="n"||b=="[]")):b=!1;return b}function qa(b){b=u(b).clone();try{b.html("")}catch(a){}var c=u("<div>").append(b).html();try{return b[0].nodeType===3?y(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+y(b)})}catch(d){return y(c)}}function Wa(b){var a={},c,d;n((b||"").split("&"),function(b){b&&(c=b.split("="),d=decodeURIComponent(c[0]),a[d]=x(c[1])?decodeURIComponent(c[1]):!0)});return a}function pb(b){var a=[];n(b,function(b,
+d){a.push(Xa(d,!0)+(b===!0?"":"="+Xa(b,!0)))});return a.length?a.join("&"):""}function Ya(b){return Xa(b,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Xa(b,a){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(a?null:/%20/g,"+")}function jc(b,a){function c(a){a&&d.push(a)}var d=[b],e,g,h=["ng:app","ng-app","x-ng-app","data-ng-app"],f=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;n(h,function(a){h[a]=!0;c(Y.getElementById(a));
+a=a.replace(":","\\:");b.querySelectorAll&&(n(b.querySelectorAll("."+a),c),n(b.querySelectorAll("."+a+"\\:"),c),n(b.querySelectorAll("["+a+"]"),c))});n(d,function(a){if(!e){var b=f.exec(" "+a.className+" ");b?(e=a,g=(b[2]||"").replace(/\s+/g,",")):n(a.attributes,function(b){if(!e&&h[b.name])e=a,g=b.value})}});e&&a(e,g?[g]:[])}function qb(b,a){b=u(b);a=a||[];a.unshift(["$provide",function(a){a.value("$rootElement",b)}]);a.unshift("ng");var c=rb(a);c.invoke(["$rootScope","$rootElement","$compile","$injector",
+function(a,b,c,h){a.$apply(function(){b.data("$injector",h);c(b)(a)})}]);return c}function Za(b,a){a=a||"_";return b.replace(kc,function(b,d){return(d?a:"")+b.toLowerCase()})}function $a(b,a,c){if(!b)throw Error("Argument '"+(a||"?")+"' is "+(c||"required"));return b}function ra(b,a,c){c&&B(b)&&(b=b[b.length-1]);$a(H(b),a,"not a function, got "+(b&&typeof b=="object"?b.constructor.name||"Object":typeof b));return b}function lc(b){function a(a,b,e){return a[b]||(a[b]=e())}return a(a(b,"angular",Object),
+"module",function(){var b={};return function(d,e,g){e&&b.hasOwnProperty(d)&&(b[d]=null);return a(b,d,function(){function a(c,d,e){return function(){b[e||"push"]([c,d,arguments]);return k}}if(!e)throw Error("No module: "+d);var b=[],c=[],i=a("$injector","invoke"),k={_invokeQueue:b,_runBlocks:c,requires:e,name:d,provider:a("$provide","provider"),factory:a("$provide","factory"),service:a("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),filter:a("$filterProvider",
+"register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:i,run:function(a){c.push(a);return this}};g&&i(g);return k})}})}function sb(b){return b.replace(mc,function(a,b,d,e){return e?d.toUpperCase():d}).replace(nc,"Moz$1")}function ab(b,a){function c(){var e;for(var b=[this],c=a,h,f,j,i,k,m;b.length;){h=b.shift();f=0;for(j=h.length;f<j;f++){i=u(h[f]);c?i.triggerHandler("$destroy"):c=!c;k=0;for(e=(m=i.children()).length,i=e;k<i;k++)b.push(ca(m[k]))}}return d.apply(this,
+arguments)}var d=ca.fn[b],d=d.$original||d;c.$original=d;ca.fn[b]=c}function L(b){if(b instanceof L)return b;if(!(this instanceof L)){if(A(b)&&b.charAt(0)!="<")throw Error("selectors not implemented");return new L(b)}if(A(b)){var a=Y.createElement("div");a.innerHTML="<div>&#160;</div>"+b;a.removeChild(a.firstChild);bb(this,a.childNodes);this.remove()}else bb(this,b)}function cb(b){return b.cloneNode(!0)}function sa(b){tb(b);for(var a=0,b=b.childNodes||[];a<b.length;a++)sa(b[a])}function ub(b,a,c){var d=
+ba(b,"events");ba(b,"handle")&&(w(a)?n(d,function(a,c){db(b,c,a);delete d[c]}):w(c)?(db(b,a,d[a]),delete d[a]):Ta(d[a],c))}function tb(b){var a=b[Ba],c=Ca[a];c&&(c.handle&&(c.events.$destroy&&c.handle({},"$destroy"),ub(b)),delete Ca[a],b[Ba]=q)}function ba(b,a,c){var d=b[Ba],d=Ca[d||-1];if(x(c))d||(b[Ba]=d=++oc,d=Ca[d]={}),d[a]=c;else return d&&d[a]}function vb(b,a,c){var d=ba(b,"data"),e=x(c),g=!e&&x(a),h=g&&!M(a);!d&&!h&&ba(b,"data",d={});if(e)d[a]=c;else if(g)if(h)return d&&d[a];else v(d,a);else return d}
+function Da(b,a){return(" "+b.className+" ").replace(/[\n\t]/g," ").indexOf(" "+a+" ")>-1}function wb(b,a){a&&n(a.split(" "),function(a){b.className=O((" "+b.className+" ").replace(/[\n\t]/g," ").replace(" "+O(a)+" "," "))})}function xb(b,a){a&&n(a.split(" "),function(a){if(!Da(b,a))b.className=O(b.className+" "+O(a))})}function bb(b,a){if(a)for(var a=!a.nodeName&&x(a.length)&&!pa(a)?a:[a],c=0;c<a.length;c++)b.push(a[c])}function yb(b,a){return Ea(b,"$"+(a||"ngController")+"Controller")}function Ea(b,
+a,c){b=u(b);for(b[0].nodeType==9&&(b=b.find("html"));b.length;){if(c=b.data(a))return c;b=b.parent()}}function zb(b,a){var c=Fa[a.toLowerCase()];return c&&Ab[b.nodeName]&&c}function pc(b,a){var c=function(c,e){if(!c.preventDefault)c.preventDefault=function(){c.returnValue=!1};if(!c.stopPropagation)c.stopPropagation=function(){c.cancelBubble=!0};if(!c.target)c.target=c.srcElement||Y;if(w(c.defaultPrevented)){var g=c.preventDefault;c.preventDefault=function(){c.defaultPrevented=!0;g.call(c)};c.defaultPrevented=
+!1}c.isDefaultPrevented=function(){return c.defaultPrevented};n(a[e||c.type],function(a){a.call(b,c)});Z<=8?(c.preventDefault=null,c.stopPropagation=null,c.isDefaultPrevented=null):(delete c.preventDefault,delete c.stopPropagation,delete c.isDefaultPrevented)};c.elem=b;return c}function fa(b){var a=typeof b,c;if(a=="object"&&b!==null)if(typeof(c=b.$$hashKey)=="function")c=b.$$hashKey();else{if(c===q)c=b.$$hashKey=ya()}else c=b;return a+":"+c}function Ga(b){n(b,this.put,this)}function eb(){}function Bb(b){var a,
+c;if(typeof b=="function"){if(!(a=b.$inject))a=[],c=b.toString().replace(qc,""),c=c.match(rc),n(c[1].split(sc),function(b){b.replace(tc,function(b,c,d){a.push(d)})}),b.$inject=a}else B(b)?(c=b.length-1,ra(b[c],"fn"),a=b.slice(0,c)):ra(b,"fn",!0);return a}function rb(b){function a(a){return function(b,c){if(M(b))n(b,nb(a));else return a(b,c)}}function c(a,b){if(H(b)||B(b))b=m.instantiate(b);if(!b.$get)throw Error("Provider "+a+" must define $get factory method.");return k[a+f]=b}function d(a,b){return c(a,
+{$get:b})}function e(a){var b=[];n(a,function(a){if(!i.get(a))if(i.put(a,!0),A(a)){var c=ta(a);b=b.concat(e(c.requires)).concat(c._runBlocks);try{for(var d=c._invokeQueue,c=0,f=d.length;c<f;c++){var g=d[c],h=g[0]=="$injector"?m:m.get(g[0]);h[g[1]].apply(h,g[2])}}catch(j){throw j.message&&(j.message+=" from "+a),j;}}else if(H(a))try{b.push(m.invoke(a))}catch(o){throw o.message&&(o.message+=" from "+a),o;}else if(B(a))try{b.push(m.invoke(a))}catch(k){throw k.message&&(k.message+=" from "+String(a[a.length-
+1])),k;}else ra(a,"module")});return b}function g(a,b){function c(d){if(typeof d!=="string")throw Error("Service name expected");if(a.hasOwnProperty(d)){if(a[d]===h)throw Error("Circular dependency: "+j.join(" <- "));return a[d]}else try{return j.unshift(d),a[d]=h,a[d]=b(d)}finally{j.shift()}}function d(a,b,e){var f=[],i=Bb(a),g,h,j;h=0;for(g=i.length;h<g;h++)j=i[h],f.push(e&&e.hasOwnProperty(j)?e[j]:c(j));a.$inject||(a=a[g]);switch(b?-1:f.length){case 0:return a();case 1:return a(f[0]);case 2:return a(f[0],
+f[1]);case 3:return a(f[0],f[1],f[2]);case 4:return a(f[0],f[1],f[2],f[3]);case 5:return a(f[0],f[1],f[2],f[3],f[4]);case 6:return a(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return a(f[0],f[1],f[2],f[3],f[4],f[5],f[6]);case 8:return a(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7]);case 9:return a(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8]);case 10:return a(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9]);default:return a.apply(b,f)}}return{invoke:d,instantiate:function(a,b){var c=function(){},e;c.prototype=
+(B(a)?a[a.length-1]:a).prototype;c=new c;e=d(a,c,b);return M(e)?e:c},get:c,annotate:Bb}}var h={},f="Provider",j=[],i=new Ga,k={$provide:{provider:a(c),factory:a(d),service:a(function(a,b){return d(a,["$injector",function(a){return a.instantiate(b)}])}),value:a(function(a,b){return d(a,I(b))}),constant:a(function(a,b){k[a]=b;l[a]=b}),decorator:function(a,b){var c=m.get(a+f),d=c.$get;c.$get=function(){var a=t.invoke(d,c);return t.invoke(b,null,{$delegate:a})}}}},m=g(k,function(){throw Error("Unknown provider: "+
+j.join(" <- "));}),l={},t=l.$injector=g(l,function(a){a=m.get(a+f);return t.invoke(a.$get,a)});n(e(b),function(a){t.invoke(a||C)});return t}function uc(){var b=!0;this.disableAutoScrolling=function(){b=!1};this.$get=["$window","$location","$rootScope",function(a,c,d){function e(a){var b=null;n(a,function(a){!b&&y(a.nodeName)==="a"&&(b=a)});return b}function g(){var b=c.hash(),d;b?(d=h.getElementById(b))?d.scrollIntoView():(d=e(h.getElementsByName(b)))?d.scrollIntoView():b==="top"&&a.scrollTo(0,0):
+a.scrollTo(0,0)}var h=a.document;b&&d.$watch(function(){return c.hash()},function(){d.$evalAsync(g)});return g}]}function vc(b,a,c,d){function e(a){try{a.apply(null,ha.call(arguments,1))}finally{if(o--,o===0)for(;p.length;)try{p.pop()()}catch(b){c.error(b)}}}function g(a,b){(function R(){n(s,function(a){a()});J=b(R,a)})()}function h(){F!=f.url()&&(F=f.url(),n(V,function(a){a(f.url())}))}var f=this,j=a[0],i=b.location,k=b.history,m=b.setTimeout,l=b.clearTimeout,t={};f.isMock=!1;var o=0,p=[];f.$$completeOutstandingRequest=
+e;f.$$incOutstandingRequestCount=function(){o++};f.notifyWhenNoOutstandingRequests=function(a){n(s,function(a){a()});o===0?a():p.push(a)};var s=[],J;f.addPollFn=function(a){w(J)&&g(100,m);s.push(a);return a};var F=i.href,z=a.find("base");f.url=function(a,b){if(a){if(F!=a)return F=a,d.history?b?k.replaceState(null,"",a):(k.pushState(null,"",a),z.attr("href",z.attr("href"))):b?i.replace(a):i.href=a,f}else return i.href.replace(/%27/g,"'")};var V=[],K=!1;f.onUrlChange=function(a){K||(d.history&&u(b).bind("popstate",
+h),d.hashchange?u(b).bind("hashchange",h):f.addPollFn(h),K=!0);V.push(a);return a};f.baseHref=function(){var a=z.attr("href");return a?a.replace(/^https?\:\/\/[^\/]*/,""):""};var r={},$="",P=f.baseHref();f.cookies=function(a,b){var d,e,f,i;if(a)if(b===q)j.cookie=escape(a)+"=;path="+P+";expires=Thu, 01 Jan 1970 00:00:00 GMT";else{if(A(b))d=(j.cookie=escape(a)+"="+escape(b)+";path="+P).length+1,d>4096&&c.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+d+" > 4096 bytes)!")}else{if(j.cookie!==
+$){$=j.cookie;d=$.split("; ");r={};for(f=0;f<d.length;f++)e=d[f],i=e.indexOf("="),i>0&&(r[unescape(e.substring(0,i))]=unescape(e.substring(i+1)))}return r}};f.defer=function(a,b){var c;o++;c=m(function(){delete t[c];e(a)},b||0);t[c]=!0;return c};f.defer.cancel=function(a){return t[a]?(delete t[a],l(a),e(C),!0):!1}}function wc(){this.$get=["$window","$log","$sniffer","$document",function(b,a,c,d){return new vc(b,d,a,c)}]}function xc(){this.$get=function(){function b(b,d){function e(a){if(a!=m){if(l){if(l==
+a)l=a.n}else l=a;g(a.n,a.p);g(a,m);m=a;m.n=null}}function g(a,b){if(a!=b){if(a)a.p=b;if(b)b.n=a}}if(b in a)throw Error("cacheId "+b+" taken");var h=0,f=v({},d,{id:b}),j={},i=d&&d.capacity||Number.MAX_VALUE,k={},m=null,l=null;return a[b]={put:function(a,b){var c=k[a]||(k[a]={key:a});e(c);w(b)||(a in j||h++,j[a]=b,h>i&&this.remove(l.key))},get:function(a){var b=k[a];if(b)return e(b),j[a]},remove:function(a){var b=k[a];if(b){if(b==m)m=b.p;if(b==l)l=b.n;g(b.n,b.p);delete k[a];delete j[a];h--}},removeAll:function(){j=
+{};h=0;k={};m=l=null},destroy:function(){k=f=j=null;delete a[b]},info:function(){return v({},f,{size:h})}}}var a={};b.info=function(){var b={};n(a,function(a,e){b[e]=a.info()});return b};b.get=function(b){return a[b]};return b}}function yc(){this.$get=["$cacheFactory",function(b){return b("templates")}]}function Cb(b){var a={},c="Directive",d=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,e=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,g="Template must have exactly one root element. was: ",h=/^\s*(https?|ftp|mailto):/;
+this.directive=function j(d,e){A(d)?($a(e,"directive"),a.hasOwnProperty(d)||(a[d]=[],b.factory(d+c,["$injector","$exceptionHandler",function(b,c){var e=[];n(a[d],function(a){try{var g=b.invoke(a);if(H(g))g={compile:I(g)};else if(!g.compile&&g.link)g.compile=I(g.link);g.priority=g.priority||0;g.name=g.name||d;g.require=g.require||g.controller&&g.name;g.restrict=g.restrict||"A";e.push(g)}catch(h){c(h)}});return e}])),a[d].push(e)):n(d,nb(j));return this};this.urlSanitizationWhitelist=function(a){return x(a)?
+(h=a,this):h};this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document",function(b,i,k,m,l,t,o,p,s){function J(a,b,c){a instanceof u||(a=u(a));n(a,function(b,c){b.nodeType==3&&b.nodeValue.match(/\S+/)&&(a[c]=u(b).wrap("<span></span>").parent()[0])});var d=z(a,b,a,c);return function(b,c){$a(b,"scope");for(var e=c?va.clone.call(a):a,g=0,i=e.length;g<i;g++){var h=e[g];(h.nodeType==1||h.nodeType==9)&&e.eq(g).data("$scope",b)}F(e,
+"ng-scope");c&&c(e,b);d&&d(b,e,e);return e}}function F(a,b){try{a.addClass(b)}catch(c){}}function z(a,b,c,d){function e(a,c,d,i){var h,j,k,o,l,m,t,s=[];l=0;for(m=c.length;l<m;l++)s.push(c[l]);t=l=0;for(m=g.length;l<m;t++)j=s[t],c=g[l++],h=g[l++],c?(c.scope?(k=a.$new(M(c.scope)),u(j).data("$scope",k)):k=a,(o=c.transclude)||!i&&b?c(h,k,j,d,function(b){return function(c){var d=a.$new();d.$$transcluded=!0;return b(d,c).bind("$destroy",Ua(d,d.$destroy))}}(o||b)):c(h,k,j,q,i)):h&&h(a,j.childNodes,q,i)}
+for(var g=[],i,h,j,k=0;k<a.length;k++)h=new ia,i=V(a[k],[],h,d),h=(i=i.length?K(i,a[k],h,b,c):null)&&i.terminal||!a[k].childNodes.length?null:z(a[k].childNodes,i?i.transclude:b),g.push(i),g.push(h),j=j||i||h;return j?e:null}function V(a,b,c,i){var g=c.$attr,h;switch(a.nodeType){case 1:r(b,ea(fb(a).toLowerCase()),"E",i);var j,k,l;h=a.attributes;for(var o=0,m=h&&h.length;o<m;o++)if(j=h[o],j.specified)k=j.name,l=ea(k.toLowerCase()),g[l]=k,c[l]=j=O(Z&&k=="href"?decodeURIComponent(a.getAttribute(k,2)):
+j.value),zb(a,l)&&(c[l]=!0),R(a,b,j,l),r(b,l,"A",i);a=a.className;if(A(a)&&a!=="")for(;h=e.exec(a);)l=ea(h[2]),r(b,l,"C",i)&&(c[l]=O(h[3])),a=a.substr(h.index+h[0].length);break;case 3:x(b,a.nodeValue);break;case 8:try{if(h=d.exec(a.nodeValue))l=ea(h[1]),r(b,l,"M",i)&&(c[l]=O(h[2]))}catch(t){}}b.sort(G);return b}function K(a,b,c,d,e){function i(a,b){if(a)a.require=r.require,m.push(a);if(b)b.require=r.require,s.push(b)}function h(a,b){var c,d="data",e=!1;if(A(a)){for(;(c=a.charAt(0))=="^"||c=="?";)a=
+a.substr(1),c=="^"&&(d="inheritedData"),e=e||c=="?";c=b[d]("$"+a+"Controller");if(!c&&!e)throw Error("No controller: "+a);}else B(a)&&(c=[],n(a,function(a){c.push(h(a,b))}));return c}function j(a,d,e,i,g){var l,p,r,D,F;l=b===e?c:hc(c,new ia(u(e),c.$attr));p=l.$$element;if(K){var J=/^\s*([@=&])\s*(\w*)\s*$/,ja=d.$parent||d;n(K.scope,function(a,b){var c=a.match(J)||[],e=c[2]||b,c=c[1],i,g,h;d.$$isolateBindings[b]=c+e;switch(c){case "@":l.$observe(e,function(a){d[b]=a});l.$$observers[e].$$scope=ja;break;
+case "=":g=t(l[e]);h=g.assign||function(){i=d[b]=g(ja);throw Error(Db+l[e]+" (directive: "+K.name+")");};i=d[b]=g(ja);d.$watch(function(){var a=g(ja);a!==d[b]&&(a!==i?i=d[b]=a:h(ja,a=i=d[b]));return a});break;case "&":g=t(l[e]);d[b]=function(a){return g(ja,a)};break;default:throw Error("Invalid isolate scope definition for directive "+K.name+": "+a);}})}x&&n(x,function(a){var b={$scope:d,$element:p,$attrs:l,$transclude:g};F=a.controller;F=="@"&&(F=l[a.name]);p.data("$"+a.name+"Controller",o(F,b))});
+i=0;for(r=m.length;i<r;i++)try{D=m[i],D(d,p,l,D.require&&h(D.require,p))}catch(z){k(z,qa(p))}a&&a(d,e.childNodes,q,g);i=0;for(r=s.length;i<r;i++)try{D=s[i],D(d,p,l,D.require&&h(D.require,p))}catch(zc){k(zc,qa(p))}}for(var l=-Number.MAX_VALUE,m=[],s=[],p=null,K=null,z=null,D=c.$$element=u(b),r,G,S,ka,R=d,x,w,W,v=0,y=a.length;v<y;v++){r=a[v];S=q;if(l>r.priority)break;if(W=r.scope)ua("isolated scope",K,r,D),M(W)&&(F(D,"ng-isolate-scope"),K=r),F(D,"ng-scope"),p=p||r;G=r.name;if(W=r.controller)x=x||{},
+ua("'"+G+"' controller",x[G],r,D),x[G]=r;if(W=r.transclude)ua("transclusion",ka,r,D),ka=r,l=r.priority,W=="element"?(S=u(b),D=c.$$element=u(Y.createComment(" "+G+": "+c[G]+" ")),b=D[0],C(e,u(S[0]),b),R=J(S,d,l)):(S=u(cb(b)).contents(),D.html(""),R=J(S,d));if(W=r.template)if(ua("template",z,r,D),z=r,W=Eb(W),r.replace){S=u("<div>"+O(W)+"</div>").contents();b=S[0];if(S.length!=1||b.nodeType!==1)throw Error(g+W);C(e,D,b);G={$attr:{}};a=a.concat(V(b,a.splice(v+1,a.length-(v+1)),G));$(c,G);y=a.length}else D.html(W);
+if(r.templateUrl)ua("template",z,r,D),z=r,j=P(a.splice(v,a.length-v),j,D,c,e,r.replace,R),y=a.length;else if(r.compile)try{w=r.compile(D,c,R),H(w)?i(null,w):w&&i(w.pre,w.post)}catch(E){k(E,qa(D))}if(r.terminal)j.terminal=!0,l=Math.max(l,r.priority)}j.scope=p&&p.scope;j.transclude=ka&&R;return j}function r(d,e,i,g){var h=!1;if(a.hasOwnProperty(e))for(var l,e=b.get(e+c),o=0,m=e.length;o<m;o++)try{if(l=e[o],(g===q||g>l.priority)&&l.restrict.indexOf(i)!=-1)d.push(l),h=!0}catch(t){k(t)}return h}function $(a,
+b){var c=b.$attr,d=a.$attr,e=a.$$element;n(a,function(d,e){e.charAt(0)!="$"&&(b[e]&&(d+=(e==="style"?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});n(b,function(b,i){i=="class"?(F(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):i=="style"?e.attr("style",e.attr("style")+";"+b):i.charAt(0)!="$"&&!a.hasOwnProperty(i)&&(a[i]=b,d[i]=c[i])})}function P(a,b,c,d,e,i,h){var j=[],k,o,t=c[0],s=a.shift(),p=v({},s,{controller:null,templateUrl:null,transclude:null,scope:null});c.html("");m.get(s.templateUrl,{cache:l}).success(function(l){var m,
+s,l=Eb(l);if(i){s=u("<div>"+O(l)+"</div>").contents();m=s[0];if(s.length!=1||m.nodeType!==1)throw Error(g+l);l={$attr:{}};C(e,c,m);V(m,a,l);$(d,l)}else m=t,c.html(l);a.unshift(p);k=K(a,m,d,h);for(o=z(c.contents(),h);j.length;){var ia=j.pop(),l=j.pop();s=j.pop();var r=j.pop(),D=m;s!==t&&(D=cb(m),C(l,u(s),D));k(function(){b(o,r,D,e,ia)},r,D,e,ia)}j=null}).error(function(a,b,c,d){throw Error("Failed to load template: "+d.url);});return function(a,c,d,e,i){j?(j.push(c),j.push(d),j.push(e),j.push(i)):
+k(function(){b(o,c,d,e,i)},c,d,e,i)}}function G(a,b){return b.priority-a.priority}function ua(a,b,c,d){if(b)throw Error("Multiple directives ["+b.name+", "+c.name+"] asking for "+a+" on: "+qa(d));}function x(a,b){var c=i(b,!0);c&&a.push({priority:0,compile:I(function(a,b){var d=b.parent(),e=d.data("$binding")||[];e.push(c);F(d.data("$binding",e),"ng-binding");a.$watch(c,function(a){b[0].nodeValue=a})})})}function R(a,b,c,d){var e=i(c,!0);e&&b.push({priority:100,compile:I(function(a,b,c){b=c.$$observers||
+(c.$$observers={});d==="class"&&(e=i(c[d],!0));c[d]=q;(b[d]||(b[d]=[])).$$inter=!0;(c.$$observers&&c.$$observers[d].$$scope||a).$watch(e,function(a){c.$set(d,a)})})})}function C(a,b,c){var d=b[0],e=d.parentNode,i,g;if(a){i=0;for(g=a.length;i<g;i++)if(a[i]==d){a[i]=c;break}}e&&e.replaceChild(c,d);c[u.expando]=d[u.expando];b[0]=c}var ia=function(a,b){this.$$element=a;this.$attr=b||{}};ia.prototype={$normalize:ea,$set:function(a,b,c,d){var e=zb(this.$$element[0],a),i=this.$$observers;e&&(this.$$element.prop(a,
+b),d=e);this[a]=b;d?this.$attr[a]=d:(d=this.$attr[a])||(this.$attr[a]=d=Za(a,"-"));if(fb(this.$$element[0])==="A"&&a==="href")D.setAttribute("href",b),e=D.href,e.match(h)||(this[a]=b="unsafe:"+e);c!==!1&&(b===null||b===q?this.$$element.removeAttr(d):this.$$element.attr(d,b));i&&n(i[a],function(a){try{a(b)}catch(c){k(c)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers={}),e=d[a]||(d[a]=[]);e.push(b);p.$evalAsync(function(){e.$$inter||b(c[a])});return b}};var D=s[0].createElement("a"),
+S=i.startSymbol(),ka=i.endSymbol(),Eb=S=="{{"||ka=="}}"?na:function(a){return a.replace(/\{\{/g,S).replace(/}}/g,ka)};return J}]}function ea(b){return sb(b.replace(Ac,""))}function Bc(){var b={};this.register=function(a,c){M(a)?v(b,a):b[a]=c};this.$get=["$injector","$window",function(a,c){return function(d,e){if(A(d)){var g=d,d=b.hasOwnProperty(g)?b[g]:gb(e.$scope,g,!0)||gb(c,g,!0);ra(d,g,!0)}return a.instantiate(d,e)}}]}function Cc(){this.$get=["$window",function(b){return u(b.document)}]}function Dc(){this.$get=
+["$log",function(b){return function(a,c){b.error.apply(b,arguments)}}]}function Ec(){var b="{{",a="}}";this.startSymbol=function(a){return a?(b=a,this):b};this.endSymbol=function(b){return b?(a=b,this):a};this.$get=["$parse",function(c){function d(d,f){for(var j,i,k=0,m=[],l=d.length,t=!1,o=[];k<l;)(j=d.indexOf(b,k))!=-1&&(i=d.indexOf(a,j+e))!=-1?(k!=j&&m.push(d.substring(k,j)),m.push(k=c(t=d.substring(j+e,i))),k.exp=t,k=i+g,t=!0):(k!=l&&m.push(d.substring(k)),k=l);if(!(l=m.length))m.push(""),l=1;
+if(!f||t)return o.length=l,k=function(a){for(var b=0,c=l,d;b<c;b++){if(typeof(d=m[b])=="function")d=d(a),d==null||d==q?d="":typeof d!="string"&&(d=da(d));o[b]=d}return o.join("")},k.exp=d,k.parts=m,k}var e=b.length,g=a.length;d.startSymbol=function(){return b};d.endSymbol=function(){return a};return d}]}function Fb(b){for(var b=b.split("/"),a=b.length;a--;)b[a]=Ya(b[a]);return b.join("/")}function wa(b,a){var c=Gb.exec(b),c={protocol:c[1],host:c[3],port:E(c[5])||Hb[c[1]]||null,path:c[6]||"/",search:c[8],
+hash:c[10]};if(a)a.$$protocol=c.protocol,a.$$host=c.host,a.$$port=c.port;return c}function la(b,a,c){return b+"://"+a+(c==Hb[b]?"":":"+c)}function Fc(b,a,c){var d=wa(b);return decodeURIComponent(d.path)!=a||w(d.hash)||d.hash.indexOf(c)!==0?b:la(d.protocol,d.host,d.port)+a.substr(0,a.lastIndexOf("/"))+d.hash.substr(c.length)}function Gc(b,a,c){var d=wa(b);if(decodeURIComponent(d.path)==a)return b;else{var e=d.search&&"?"+d.search||"",g=d.hash&&"#"+d.hash||"",h=a.substr(0,a.lastIndexOf("/")),f=d.path.substr(h.length);
+if(d.path.indexOf(h)!==0)throw Error('Invalid url "'+b+'", missing path prefix "'+h+'" !');return la(d.protocol,d.host,d.port)+a+"#"+c+f+e+g}}function hb(b,a,c){a=a||"";this.$$parse=function(b){var c=wa(b,this);if(c.path.indexOf(a)!==0)throw Error('Invalid url "'+b+'", missing path prefix "'+a+'" !');this.$$path=decodeURIComponent(c.path.substr(a.length));this.$$search=Wa(c.search);this.$$hash=c.hash&&decodeURIComponent(c.hash)||"";this.$$compose()};this.$$compose=function(){var b=pb(this.$$search),
+c=this.$$hash?"#"+Ya(this.$$hash):"";this.$$url=Fb(this.$$path)+(b?"?"+b:"")+c;this.$$absUrl=la(this.$$protocol,this.$$host,this.$$port)+a+this.$$url};this.$$rewriteAppUrl=function(a){if(a.indexOf(c)==0)return a};this.$$parse(b)}function Ha(b,a,c){var d;this.$$parse=function(b){var c=wa(b,this);if(c.hash&&c.hash.indexOf(a)!==0)throw Error('Invalid url "'+b+'", missing hash prefix "'+a+'" !');d=c.path+(c.search?"?"+c.search:"");c=Hc.exec((c.hash||"").substr(a.length));this.$$path=c[1]?(c[1].charAt(0)==
+"/"?"":"/")+decodeURIComponent(c[1]):"";this.$$search=Wa(c[3]);this.$$hash=c[5]&&decodeURIComponent(c[5])||"";this.$$compose()};this.$$compose=function(){var b=pb(this.$$search),c=this.$$hash?"#"+Ya(this.$$hash):"";this.$$url=Fb(this.$$path)+(b?"?"+b:"")+c;this.$$absUrl=la(this.$$protocol,this.$$host,this.$$port)+d+(this.$$url?"#"+a+this.$$url:"")};this.$$rewriteAppUrl=function(a){if(a.indexOf(c)==0)return a};this.$$parse(b)}function Ib(b,a,c,d){Ha.apply(this,arguments);this.$$rewriteAppUrl=function(b){if(b.indexOf(c)==
+0)return c+d+"#"+a+b.substr(c.length)}}function Ia(b){return function(){return this[b]}}function Jb(b,a){return function(c){if(w(c))return this[b];this[b]=a(c);this.$$compose();return this}}function Ic(){var b="",a=!1;this.hashPrefix=function(a){return x(a)?(b=a,this):b};this.html5Mode=function(b){return x(b)?(a=b,this):a};this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(c,d,e,g){function h(a){c.$broadcast("$locationChangeSuccess",f.absUrl(),a)}var f,j,i,k=d.url(),m=wa(k);a?(j=
+d.baseHref()||"/",i=j.substr(0,j.lastIndexOf("/")),m=la(m.protocol,m.host,m.port)+i+"/",f=e.history?new hb(Fc(k,j,b),i,m):new Ib(Gc(k,j,b),b,m,j.substr(i.length+1))):(m=la(m.protocol,m.host,m.port)+(m.path||"")+(m.search?"?"+m.search:"")+"#"+b+"/",f=new Ha(k,b,m));g.bind("click",function(a){if(!a.ctrlKey&&!(a.metaKey||a.which==2)){for(var b=u(a.target);y(b[0].nodeName)!=="a";)if(b[0]===g[0]||!(b=b.parent())[0])return;var d=b.prop("href"),e=f.$$rewriteAppUrl(d);d&&!b.attr("target")&&e&&(f.$$parse(e),
+c.$apply(),a.preventDefault(),X.angular["ff-684208-preventDefault"]=!0)}});f.absUrl()!=k&&d.url(f.absUrl(),!0);d.onUrlChange(function(a){f.absUrl()!=a&&(c.$evalAsync(function(){var b=f.absUrl();f.$$parse(a);h(b)}),c.$$phase||c.$digest())});var l=0;c.$watch(function(){var a=d.url(),b=f.$$replace;if(!l||a!=f.absUrl())l++,c.$evalAsync(function(){c.$broadcast("$locationChangeStart",f.absUrl(),a).defaultPrevented?f.$$parse(a):(d.url(f.absUrl(),b),h(a))});f.$$replace=!1;return l});return f}]}function Jc(){this.$get=
+["$window",function(b){function a(a){a instanceof Error&&(a.stack?a=a.message&&a.stack.indexOf(a.message)===-1?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function c(c){var e=b.console||{},g=e[c]||e.log||C;return g.apply?function(){var b=[];n(arguments,function(c){b.push(a(c))});return g.apply(e,b)}:function(a,b){g(a,b)}}return{log:c("log"),warn:c("warn"),info:c("info"),error:c("error")}}]}function Kc(b,a){function c(a){return a.indexOf(s)!=
+-1}function d(){return o+1<b.length?b.charAt(o+1):!1}function e(a){return"0"<=a&&a<="9"}function g(a){return a==" "||a=="\r"||a=="\t"||a=="\n"||a=="\u000b"||a=="\u00a0"}function h(a){return"a"<=a&&a<="z"||"A"<=a&&a<="Z"||"_"==a||a=="$"}function f(a){return a=="-"||a=="+"||e(a)}function j(a,c,d){d=d||o;throw Error("Lexer Error: "+a+" at column"+(x(c)?"s "+c+"-"+o+" ["+b.substring(c,d)+"]":" "+d)+" in expression ["+b+"].");}function i(){for(var a="",c=o;o<b.length;){var i=y(b.charAt(o));if(i=="."||
+e(i))a+=i;else{var g=d();if(i=="e"&&f(g))a+=i;else if(f(i)&&g&&e(g)&&a.charAt(a.length-1)=="e")a+=i;else if(f(i)&&(!g||!e(g))&&a.charAt(a.length-1)=="e")j("Invalid exponent");else break}o++}a*=1;l.push({index:c,text:a,json:!0,fn:function(){return a}})}function k(){for(var c="",d=o,f,i,j;o<b.length;){var k=b.charAt(o);if(k=="."||h(k)||e(k))k=="."&&(f=o),c+=k;else break;o++}if(f)for(i=o;i<b.length;){k=b.charAt(i);if(k=="("){j=c.substr(f-d+1);c=c.substr(0,f-d);o=i;break}if(g(k))i++;else break}d={index:d,
+text:c};if(Ja.hasOwnProperty(c))d.fn=d.json=Ja[c];else{var m=Kb(c,a);d.fn=v(function(a,b){return m(a,b)},{assign:function(a,b){return Lb(a,c,b)}})}l.push(d);j&&(l.push({index:f,text:".",json:!1}),l.push({index:f+1,text:j,json:!1}))}function m(a){var c=o;o++;for(var d="",e=a,f=!1;o<b.length;){var i=b.charAt(o);e+=i;if(f)i=="u"?(i=b.substring(o+1,o+5),i.match(/[\da-f]{4}/i)||j("Invalid unicode escape [\\u"+i+"]"),o+=4,d+=String.fromCharCode(parseInt(i,16))):(f=Lc[i],d+=f?f:i),f=!1;else if(i=="\\")f=
+!0;else if(i==a){o++;l.push({index:c,text:e,string:d,json:!0,fn:function(){return d}});return}else d+=i;o++}j("Unterminated quote",c)}for(var l=[],t,o=0,p=[],s,J=":";o<b.length;){s=b.charAt(o);if(c("\"'"))m(s);else if(e(s)||c(".")&&e(d()))i();else if(h(s)){if(k(),"{,".indexOf(J)!=-1&&p[0]=="{"&&(t=l[l.length-1]))t.json=t.text.indexOf(".")==-1}else if(c("(){}[].,;:"))l.push({index:o,text:s,json:":[,".indexOf(J)!=-1&&c("{[")||c("}]:,")}),c("{[")&&p.unshift(s),c("}]")&&p.shift(),o++;else if(g(s)){o++;
+continue}else{var n=s+d(),z=Ja[s],V=Ja[n];V?(l.push({index:o,text:n,fn:V}),o+=2):z?(l.push({index:o,text:s,fn:z,json:"[,:".indexOf(J)!=-1&&c("+-")}),o+=1):j("Unexpected next character ",o,o+1)}J=s}return l}function Mc(b,a,c,d){function e(a,c){throw Error("Syntax Error: Token '"+c.text+"' "+a+" at column "+(c.index+1)+" of the expression ["+b+"] starting at ["+b.substring(c.index)+"].");}function g(){if(P.length===0)throw Error("Unexpected end of expression: "+b);return P[0]}function h(a,b,c,d){if(P.length>
+0){var e=P[0],f=e.text;if(f==a||f==b||f==c||f==d||!a&&!b&&!c&&!d)return e}return!1}function f(b,c,d,f){return(b=h(b,c,d,f))?(a&&!b.json&&e("is not valid json",b),P.shift(),b):!1}function j(a){f(a)||e("is unexpected, expecting ["+a+"]",h())}function i(a,b){return function(c,d){return a(c,d,b)}}function k(a,b,c){return function(d,e){return b(d,e,a,c)}}function m(){for(var a=[];;)if(P.length>0&&!h("}",")",";","]")&&a.push(w()),!f(";"))return a.length==1?a[0]:function(b,c){for(var d,e=0;e<a.length;e++){var f=
+a[e];f&&(d=f(b,c))}return d}}function l(){for(var a=f(),b=c(a.text),d=[];;)if(a=f(":"))d.push(G());else{var e=function(a,c,e){for(var e=[e],f=0;f<d.length;f++)e.push(d[f](a,c));return b.apply(a,e)};return function(){return e}}}function t(){for(var a=o(),b;;)if(b=f("||"))a=k(a,b.fn,o());else return a}function o(){var a=p(),b;if(b=f("&&"))a=k(a,b.fn,o());return a}function p(){var a=s(),b;if(b=f("==","!="))a=k(a,b.fn,p());return a}function s(){var a;a=J();for(var b;b=f("+","-");)a=k(a,b.fn,J());if(b=
+f("<",">","<=",">="))a=k(a,b.fn,s());return a}function J(){for(var a=n(),b;b=f("*","/","%");)a=k(a,b.fn,n());return a}function n(){var a;return f("+")?z():(a=f("-"))?k(r,a.fn,n()):(a=f("!"))?i(a.fn,n()):z()}function z(){var a;if(f("("))a=w(),j(")");else if(f("["))a=V();else if(f("{"))a=K();else{var b=f();(a=b.fn)||e("not a primary expression",b)}for(var c;b=f("(","[",".");)b.text==="("?(a=x(a,c),c=null):b.text==="["?(c=a,a=R(a)):b.text==="."?(c=a,a=u(a)):e("IMPOSSIBLE");return a}function V(){var a=
+[];if(g().text!="]"){do a.push(G());while(f(","))}j("]");return function(b,c){for(var d=[],e=0;e<a.length;e++)d.push(a[e](b,c));return d}}function K(){var a=[];if(g().text!="}"){do{var b=f(),b=b.string||b.text;j(":");var c=G();a.push({key:b,value:c})}while(f(","))}j("}");return function(b,c){for(var d={},e=0;e<a.length;e++){var f=a[e],i=f.value(b,c);d[f.key]=i}return d}}var r=I(0),$,P=Kc(b,d),G=function(){var a=t(),c,d;return(d=f("="))?(a.assign||e("implies assignment but ["+b.substring(0,d.index)+
+"] can not be assigned to",d),c=t(),function(b,d){return a.assign(b,c(b,d),d)}):a},x=function(a,b){var c=[];if(g().text!=")"){do c.push(G());while(f(","))}j(")");return function(d,e){for(var f=[],i=b?b(d,e):d,g=0;g<c.length;g++)f.push(c[g](d,e));g=a(d,e)||C;return g.apply?g.apply(i,f):g(f[0],f[1],f[2],f[3],f[4])}},u=function(a){var b=f().text,c=Kb(b,d);return v(function(b,d){return c(a(b,d),d)},{assign:function(c,d,e){return Lb(a(c,e),b,d)}})},R=function(a){var b=G();j("]");return v(function(c,d){var e=
+a(c,d),f=b(c,d),i;if(!e)return q;if((e=e[f])&&e.then){i=e;if(!("$$v"in e))i.$$v=q,i.then(function(a){i.$$v=a});e=e.$$v}return e},{assign:function(c,d,e){return a(c,e)[b(c,e)]=d}})},w=function(){for(var a=G(),b;;)if(b=f("|"))a=k(a,b.fn,l());else return a};a?(G=t,x=u=R=w=function(){e("is not valid json",{text:b,index:0})},$=z()):$=m();P.length!==0&&e("is an unexpected token",P[0]);return $}function Lb(b,a,c){for(var a=a.split("."),d=0;a.length>1;d++){var e=a.shift(),g=b[e];g||(g={},b[e]=g);b=g}return b[a.shift()]=
+c}function gb(b,a,c){if(!a)return b;for(var a=a.split("."),d,e=b,g=a.length,h=0;h<g;h++)d=a[h],b&&(b=(e=b)[d]);return!c&&H(b)?Ua(e,b):b}function Mb(b,a,c,d,e){return function(g,h){var f=h&&h.hasOwnProperty(b)?h:g,j;if(f===null||f===q)return f;if((f=f[b])&&f.then){if(!("$$v"in f))j=f,j.$$v=q,j.then(function(a){j.$$v=a});f=f.$$v}if(!a||f===null||f===q)return f;if((f=f[a])&&f.then){if(!("$$v"in f))j=f,j.$$v=q,j.then(function(a){j.$$v=a});f=f.$$v}if(!c||f===null||f===q)return f;if((f=f[c])&&f.then){if(!("$$v"in
+f))j=f,j.$$v=q,j.then(function(a){j.$$v=a});f=f.$$v}if(!d||f===null||f===q)return f;if((f=f[d])&&f.then){if(!("$$v"in f))j=f,j.$$v=q,j.then(function(a){j.$$v=a});f=f.$$v}if(!e||f===null||f===q)return f;if((f=f[e])&&f.then){if(!("$$v"in f))j=f,j.$$v=q,j.then(function(a){j.$$v=a});f=f.$$v}return f}}function Kb(b,a){if(ib.hasOwnProperty(b))return ib[b];var c=b.split("."),d=c.length,e;if(a)e=d<6?Mb(c[0],c[1],c[2],c[3],c[4]):function(a,b){var e=0,i;do i=Mb(c[e++],c[e++],c[e++],c[e++],c[e++])(a,b),b=q,
+a=i;while(e<d);return i};else{var g="var l, fn, p;\n";n(c,function(a,b){g+="if(s === null || s === undefined) return s;\nl=s;\ns="+(b?"s":'((k&&k.hasOwnProperty("'+a+'"))?k:s)')+'["'+a+'"];\nif (s && s.then) {\n if (!("$$v" in s)) {\n p=s;\n p.$$v = undefined;\n p.then(function(v) {p.$$v=v;});\n}\n s=s.$$v\n}\n'});g+="return s;";e=Function("s","k",g);e.toString=function(){return g}}return ib[b]=e}function Nc(){var b={};this.$get=["$filter","$sniffer",function(a,c){return function(d){switch(typeof d){case "string":return b.hasOwnProperty(d)?
+b[d]:b[d]=Mc(d,!1,a,c.csp);case "function":return d;default:return C}}}]}function Oc(){this.$get=["$rootScope","$exceptionHandler",function(b,a){return Pc(function(a){b.$evalAsync(a)},a)}]}function Pc(b,a){function c(a){return a}function d(a){return h(a)}var e=function(){var f=[],j,i;return i={resolve:function(a){if(f){var c=f;f=q;j=g(a);c.length&&b(function(){for(var a,b=0,d=c.length;b<d;b++)a=c[b],j.then(a[0],a[1])})}},reject:function(a){i.resolve(h(a))},promise:{then:function(b,i){var g=e(),h=
+function(d){try{g.resolve((b||c)(d))}catch(e){a(e),g.reject(e)}},o=function(b){try{g.resolve((i||d)(b))}catch(c){a(c),g.reject(c)}};f?f.push([h,o]):j.then(h,o);return g.promise}}}},g=function(a){return a&&a.then?a:{then:function(c){var d=e();b(function(){d.resolve(c(a))});return d.promise}}},h=function(a){return{then:function(c,i){var g=e();b(function(){g.resolve((i||d)(a))});return g.promise}}};return{defer:e,reject:h,when:function(f,j,i){var k=e(),m,l=function(b){try{return(j||c)(b)}catch(d){return a(d),
+h(d)}},t=function(b){try{return(i||d)(b)}catch(c){return a(c),h(c)}};b(function(){g(f).then(function(a){m||(m=!0,k.resolve(g(a).then(l,t)))},function(a){m||(m=!0,k.resolve(t(a)))})});return k.promise},all:function(a){var b=e(),c=a.length,d=[];c?n(a,function(a,e){g(a).then(function(a){e in d||(d[e]=a,--c||b.resolve(d))},function(a){e in d||b.reject(a)})}):b.resolve(d);return b.promise}}}function Qc(){var b={};this.when=function(a,c){b[a]=v({reloadOnSearch:!0},c);if(a){var d=a[a.length-1]=="/"?a.substr(0,
+a.length-1):a+"/";b[d]={redirectTo:a}}return this};this.otherwise=function(a){this.when(null,a);return this};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$http","$templateCache",function(a,c,d,e,g,h,f){function j(a,b){for(var b="^"+b.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"$",c="",d=[],e={},f=/:(\w+)/g,i,g=0;(i=f.exec(b))!==null;)c+=b.slice(g,i.index),c+="([^\\/]*)",d.push(i[1]),g=f.lastIndex;c+=b.substr(g);var h=a.match(RegExp(c));h&&n(d,function(a,b){e[a]=h[b+1]});return h?
+e:null}function i(){var b=k(),i=t.current;if(b&&i&&b.$route===i.$route&&ga(b.pathParams,i.pathParams)&&!b.reloadOnSearch&&!l)i.params=b.params,U(i.params,d),a.$broadcast("$routeUpdate",i);else if(b||i)l=!1,a.$broadcast("$routeChangeStart",b,i),(t.current=b)&&b.redirectTo&&(A(b.redirectTo)?c.path(m(b.redirectTo,b.params)).search(b.params).replace():c.url(b.redirectTo(b.pathParams,c.path(),c.search())).replace()),e.when(b).then(function(){if(b){var a=[],c=[],d;n(b.resolve||{},function(b,d){a.push(d);
+c.push(A(b)?g.get(b):g.invoke(b))});if(!x(d=b.template))if(x(d=b.templateUrl))d=h.get(d,{cache:f}).then(function(a){return a.data});x(d)&&(a.push("$template"),c.push(d));return e.all(c).then(function(b){var c={};n(b,function(b,d){c[a[d]]=b});return c})}}).then(function(c){if(b==t.current){if(b)b.locals=c,U(b.params,d);a.$broadcast("$routeChangeSuccess",b,i)}},function(c){b==t.current&&a.$broadcast("$routeChangeError",b,i,c)})}function k(){var a,d;n(b,function(b,e){if(!d&&(a=j(c.path(),e)))d=za(b,
+{params:v({},c.search(),a),pathParams:a}),d.$route=b});return d||b[null]&&za(b[null],{params:{},pathParams:{}})}function m(a,b){var c=[];n((a||"").split(":"),function(a,d){if(d==0)c.push(a);else{var e=a.match(/(\w+)(.*)/),f=e[1];c.push(b[f]);c.push(e[2]||"");delete b[f]}});return c.join("")}var l=!1,t={routes:b,reload:function(){l=!0;a.$evalAsync(i)}};a.$on("$locationChangeSuccess",i);return t}]}function Rc(){this.$get=I({})}function Sc(){var b=10;this.digestTtl=function(a){arguments.length&&(b=a);
+return b};this.$get=["$injector","$exceptionHandler","$parse",function(a,c,d){function e(){this.$id=ya();this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this["this"]=this.$root=this;this.$$destroyed=!1;this.$$asyncQueue=[];this.$$listeners={};this.$$isolateBindings={}}function g(a){if(j.$$phase)throw Error(j.$$phase+" already in progress");j.$$phase=a}function h(a,b){var c=d(a);ra(c,b);return c}function f(){}e.prototype={$new:function(a){if(H(a))throw Error("API-CHANGE: Use $controller to instantiate controllers.");
+a?(a=new e,a.$root=this.$root):(a=function(){},a.prototype=this,a=new a,a.$id=ya());a["this"]=a;a.$$listeners={};a.$parent=this;a.$$asyncQueue=[];a.$$watchers=a.$$nextSibling=a.$$childHead=a.$$childTail=null;a.$$prevSibling=this.$$childTail;this.$$childHead?this.$$childTail=this.$$childTail.$$nextSibling=a:this.$$childHead=this.$$childTail=a;return a},$watch:function(a,b,c){var d=h(a,"watch"),e=this.$$watchers,g={fn:b,last:f,get:d,exp:a,eq:!!c};if(!H(b)){var j=h(b||C,"listener");g.fn=function(a,b,
+c){j(c)}}if(!e)e=this.$$watchers=[];e.unshift(g);return function(){Ta(e,g)}},$digest:function(){var a,d,e,h,t,o,p,s=b,n,F=[],z,q;g("$digest");do{p=!1;n=this;do{for(t=n.$$asyncQueue;t.length;)try{n.$eval(t.shift())}catch(K){c(K)}if(h=n.$$watchers)for(o=h.length;o--;)try{if(a=h[o],(d=a.get(n))!==(e=a.last)&&!(a.eq?ga(d,e):typeof d=="number"&&typeof e=="number"&&isNaN(d)&&isNaN(e)))p=!0,a.last=a.eq?U(d):d,a.fn(d,e===f?d:e,n),s<5&&(z=4-s,F[z]||(F[z]=[]),q=H(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):
+a.exp,q+="; newVal: "+da(d)+"; oldVal: "+da(e),F[z].push(q))}catch(r){c(r)}if(!(h=n.$$childHead||n!==this&&n.$$nextSibling))for(;n!==this&&!(h=n.$$nextSibling);)n=n.$parent}while(n=h);if(p&&!s--)throw j.$$phase=null,Error(b+" $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: "+da(F));}while(p||t.length);j.$$phase=null},$destroy:function(){if(!(j==this||this.$$destroyed)){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;if(a.$$childHead==this)a.$$childHead=
+this.$$nextSibling;if(a.$$childTail==this)a.$$childTail=this.$$prevSibling;if(this.$$prevSibling)this.$$prevSibling.$$nextSibling=this.$$nextSibling;if(this.$$nextSibling)this.$$nextSibling.$$prevSibling=this.$$prevSibling;this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null}},$eval:function(a,b){return d(a)(this,b)},$evalAsync:function(a){this.$$asyncQueue.push(a)},$apply:function(a){try{return g("$apply"),this.$eval(a)}catch(b){c(b)}finally{j.$$phase=null;try{j.$digest()}catch(d){throw c(d),
+d;}}},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);return function(){c[Aa(c,b)]=null}},$emit:function(a,b){var d=[],e,f=this,g=!1,h={name:a,targetScope:f,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},j=[h].concat(ha.call(arguments,1)),n,q;do{e=f.$$listeners[a]||d;h.currentScope=f;n=0;for(q=e.length;n<q;n++)if(e[n])try{if(e[n].apply(null,j),g)return h}catch(z){c(z)}else e.splice(n,1),n--,q--;f=f.$parent}while(f);
+return h},$broadcast:function(a,b){var d=this,e=this,f={name:a,targetScope:this,preventDefault:function(){f.defaultPrevented=!0},defaultPrevented:!1},g=[f].concat(ha.call(arguments,1)),h,j;do{d=e;f.currentScope=d;e=d.$$listeners[a]||[];h=0;for(j=e.length;h<j;h++)if(e[h])try{e[h].apply(null,g)}catch(n){c(n)}else e.splice(h,1),h--,j--;if(!(e=d.$$childHead||d!==this&&d.$$nextSibling))for(;d!==this&&!(e=d.$$nextSibling);)d=d.$parent}while(d=e);return f}};var j=new e;return j}]}function Tc(){this.$get=
+["$window",function(b){var a={},c=E((/android (\d+)/.exec(y(b.navigator.userAgent))||[])[1]);return{history:!(!b.history||!b.history.pushState||c<4),hashchange:"onhashchange"in b&&(!b.document.documentMode||b.document.documentMode>7),hasEvent:function(c){if(c=="input"&&Z==9)return!1;if(w(a[c])){var e=b.document.createElement("div");a[c]="on"+c in e}return a[c]},csp:!1}}]}function Uc(){this.$get=I(X)}function Nb(b){var a={},c,d,e;if(!b)return a;n(b.split("\n"),function(b){e=b.indexOf(":");c=y(O(b.substr(0,
+e)));d=O(b.substr(e+1));c&&(a[c]?a[c]+=", "+d:a[c]=d)});return a}function Ob(b){var a=M(b)?b:q;return function(c){a||(a=Nb(b));return c?a[y(c)]||null:a}}function Pb(b,a,c){if(H(c))return c(b,a);n(c,function(c){b=c(b,a)});return b}function Vc(){var b=/^\s*(\[|\{[^\{])/,a=/[\}\]]\s*$/,c=/^\)\]\}',?\n/,d=this.defaults={transformResponse:[function(d){A(d)&&(d=d.replace(c,""),b.test(d)&&a.test(d)&&(d=ob(d,!0)));return d}],transformRequest:[function(a){return M(a)&&xa.apply(a)!=="[object File]"?da(a):a}],
+headers:{common:{Accept:"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest"},post:{"Content-Type":"application/json;charset=utf-8"},put:{"Content-Type":"application/json;charset=utf-8"}}},e=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,b,c,j,i,k){function m(a){function c(a){var b=v({},a,{data:Pb(a.data,a.headers,f)});return 200<=a.status&&a.status<300?b:i.reject(b)}a.method=ma(a.method);var e=a.transformRequest||
+d.transformRequest,f=a.transformResponse||d.transformResponse,g=d.headers,g=v({"X-XSRF-TOKEN":b.cookies()["XSRF-TOKEN"]},g.common,g[y(a.method)],a.headers),e=Pb(a.data,Ob(g),e),j;w(a.data)&&delete g["Content-Type"];j=l(a,e,g);j=j.then(c,c);n(p,function(a){j=a(j)});j.success=function(b){j.then(function(c){b(c.data,c.status,c.headers,a)});return j};j.error=function(b){j.then(null,function(c){b(c.data,c.status,c.headers,a)});return j};return j}function l(b,c,d){function e(a,b,c){n&&(200<=a&&a<300?n.put(q,
+[a,b,Nb(c)]):n.remove(q));f(b,a,c);j.$apply()}function f(a,c,d){c=Math.max(c,0);(200<=c&&c<300?k.resolve:k.reject)({data:a,status:c,headers:Ob(d),config:b})}function h(){var a=Aa(m.pendingRequests,b);a!==-1&&m.pendingRequests.splice(a,1)}var k=i.defer(),l=k.promise,n,p,q=t(b.url,b.params);m.pendingRequests.push(b);l.then(h,h);b.cache&&b.method=="GET"&&(n=M(b.cache)?b.cache:o);if(n)if(p=n.get(q))if(p.then)return p.then(h,h),p;else B(p)?f(p[1],p[0],U(p[2])):f(p,200,{});else n.put(q,l);p||a(b.method,
+q,c,e,d,b.timeout,b.withCredentials);return l}function t(a,b){if(!b)return a;var c=[];fc(b,function(a,b){a==null||a==q||(M(a)&&(a=da(a)),c.push(encodeURIComponent(b)+"="+encodeURIComponent(a)))});return a+(a.indexOf("?")==-1?"?":"&")+c.join("&")}var o=c("$http"),p=[];n(e,function(a){p.push(A(a)?k.get(a):k.invoke(a))});m.pendingRequests=[];(function(a){n(arguments,function(a){m[a]=function(b,c){return m(v(c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){n(arguments,function(a){m[a]=
+function(b,c,d){return m(v(d||{},{method:a,url:b,data:c}))}})})("post","put");m.defaults=d;return m}]}function Wc(){this.$get=["$browser","$window","$document",function(b,a,c){return Xc(b,Yc,b.defer,a.angular.callbacks,c[0],a.location.protocol.replace(":",""))}]}function Xc(b,a,c,d,e,g){function h(a,b){var c=e.createElement("script"),d=function(){e.body.removeChild(c);b&&b()};c.type="text/javascript";c.src=a;Z?c.onreadystatechange=function(){/loaded|complete/.test(c.readyState)&&d()}:c.onload=c.onerror=
+d;e.body.appendChild(c)}return function(e,j,i,k,m,l,t){function o(a,c,d,e){c=(j.match(Gb)||["",g])[1]=="file"?d?200:404:c;a(c==1223?204:c,d,e);b.$$completeOutstandingRequest(C)}b.$$incOutstandingRequestCount();j=j||b.url();if(y(e)=="jsonp"){var p="_"+(d.counter++).toString(36);d[p]=function(a){d[p].data=a};h(j.replace("JSON_CALLBACK","angular.callbacks."+p),function(){d[p].data?o(k,200,d[p].data):o(k,-2);delete d[p]})}else{var s=new a;s.open(e,j,!0);n(m,function(a,b){a&&s.setRequestHeader(b,a)});
+var q;s.onreadystatechange=function(){if(s.readyState==4){var a=s.getAllResponseHeaders(),b=["Cache-Control","Content-Language","Content-Type","Expires","Last-Modified","Pragma"];a||(a="",n(b,function(b){var c=s.getResponseHeader(b);c&&(a+=b+": "+c+"\n")}));o(k,q||s.status,s.responseText,a)}};if(t)s.withCredentials=!0;s.send(i||"");l>0&&c(function(){q=-1;s.abort()},l)}}}function Zc(){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 b===1?"one":"other"}}}}function $c(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(b,a,c,d){function e(e,f,j){var i=c.defer(),k=i.promise,m=x(j)&&!j,f=a.defer(function(){try{i.resolve(e())}catch(a){i.reject(a),d(a)}m||b.$apply()},f),j=function(){delete g[k.$$timeoutId]};
+k.$$timeoutId=f;g[f]=i;k.then(j,j);return k}var g={};e.cancel=function(b){return b&&b.$$timeoutId in g?(g[b.$$timeoutId].reject("canceled"),a.defer.cancel(b.$$timeoutId)):!1};return e}]}function Qb(b){function a(a,e){return b.factory(a+c,e)}var c="Filter";this.register=a;this.$get=["$injector",function(a){return function(b){return a.get(b+c)}}];a("currency",Rb);a("date",Sb);a("filter",ad);a("json",bd);a("limitTo",cd);a("lowercase",dd);a("number",Tb);a("orderBy",Ub);a("uppercase",ed)}function ad(){return function(b,
+a){if(!B(b))return b;var c=[];c.check=function(a){for(var b=0;b<c.length;b++)if(!c[b](a))return!1;return!0};var d=function(a,b){if(b.charAt(0)==="!")return!d(a,b.substr(1));switch(typeof a){case "boolean":case "number":case "string":return(""+a).toLowerCase().indexOf(b)>-1;case "object":for(var c in a)if(c.charAt(0)!=="$"&&d(a[c],b))return!0;return!1;case "array":for(c=0;c<a.length;c++)if(d(a[c],b))return!0;return!1;default:return!1}};switch(typeof a){case "boolean":case "number":case "string":a=
+{$:a};case "object":for(var e in a)e=="$"?function(){var b=(""+a[e]).toLowerCase();b&&c.push(function(a){return d(a,b)})}():function(){var b=e,f=(""+a[e]).toLowerCase();f&&c.push(function(a){return d(gb(a,b),f)})}();break;case "function":c.push(a);break;default:return b}for(var g=[],h=0;h<b.length;h++){var f=b[h];c.check(f)&&g.push(f)}return g}}function Rb(b){var a=b.NUMBER_FORMATS;return function(b,d){if(w(d))d=a.CURRENCY_SYM;return Vb(b,a.PATTERNS[1],a.GROUP_SEP,a.DECIMAL_SEP,2).replace(/\u00A4/g,
+d)}}function Tb(b){var a=b.NUMBER_FORMATS;return function(b,d){return Vb(b,a.PATTERNS[0],a.GROUP_SEP,a.DECIMAL_SEP,d)}}function Vb(b,a,c,d,e){if(isNaN(b)||!isFinite(b))return"";var g=b<0,b=Math.abs(b),h=b+"",f="",j=[],i=!1;if(h.indexOf("e")!==-1){var k=h.match(/([\d\.]+)e(-?)(\d+)/);k&&k[2]=="-"&&k[3]>e+1?h="0":(f=h,i=!0)}if(!i){h=(h.split(Wb)[1]||"").length;w(e)&&(e=Math.min(Math.max(a.minFrac,h),a.maxFrac));var h=Math.pow(10,e),b=Math.round(b*h)/h,b=(""+b).split(Wb),h=b[0],b=b[1]||"",i=0,k=a.lgSize,
+m=a.gSize;if(h.length>=k+m)for(var i=h.length-k,l=0;l<i;l++)(i-l)%m===0&&l!==0&&(f+=c),f+=h.charAt(l);for(l=i;l<h.length;l++)(h.length-l)%k===0&&l!==0&&(f+=c),f+=h.charAt(l);for(;b.length<e;)b+="0";e&&e!=="0"&&(f+=d+b.substr(0,e))}j.push(g?a.negPre:a.posPre);j.push(f);j.push(g?a.negSuf:a.posSuf);return j.join("")}function jb(b,a,c){var d="";b<0&&(d="-",b=-b);for(b=""+b;b.length<a;)b="0"+b;c&&(b=b.substr(b.length-a));return d+b}function N(b,a,c,d){return function(e){e=e["get"+b]();if(c>0||e>-c)e+=
+c;e===0&&c==-12&&(e=12);return jb(e,a,d)}}function Ka(b,a){return function(c,d){var e=c["get"+b](),g=ma(a?"SHORT"+b:b);return d[g][e]}}function Sb(b){function a(a){var b;if(b=a.match(c)){var a=new Date(0),g=0,h=0;b[9]&&(g=E(b[9]+b[10]),h=E(b[9]+b[11]));a.setUTCFullYear(E(b[1]),E(b[2])-1,E(b[3]));a.setUTCHours(E(b[4]||0)-g,E(b[5]||0)-h,E(b[6]||0),E(b[7]||0))}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){var g=
+"",h=[],f,j,e=e||"mediumDate",e=b.DATETIME_FORMATS[e]||e;A(c)&&(c=fd.test(c)?E(c):a(c));Ra(c)&&(c=new Date(c));if(!oa(c))return c;for(;e;)(j=gd.exec(e))?(h=h.concat(ha.call(j,1)),e=h.pop()):(h.push(e),e=null);n(h,function(a){f=hd[a];g+=f?f(c,b.DATETIME_FORMATS):a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function bd(){return function(b){return da(b,!0)}}function cd(){return function(b,a){if(!(b instanceof Array))return b;var a=E(a),c=[],d,e;if(!b||!(b instanceof Array))return c;a>b.length?
+a=b.length:a<-b.length&&(a=-b.length);a>0?(d=0,e=a):(d=b.length+a,e=b.length);for(;d<e;d++)c.push(b[d]);return c}}function Ub(b){return function(a,c,d){function e(a,b){return Va(b)?function(b,c){return a(c,b)}:a}if(!B(a))return a;if(!c)return a;for(var c=B(c)?c:[c],c=Sa(c,function(a){var c=!1,d=a||na;if(A(a)){if(a.charAt(0)=="+"||a.charAt(0)=="-")c=a.charAt(0)=="-",a=a.substring(1);d=b(a)}return e(function(a,b){var c;c=d(a);var e=d(b),f=typeof c,g=typeof e;f==g?(f=="string"&&(c=c.toLowerCase()),f==
+"string"&&(e=e.toLowerCase()),c=c===e?0:c<e?-1:1):c=f<g?-1:1;return c},c)}),g=[],h=0;h<a.length;h++)g.push(a[h]);return g.sort(e(function(a,b){for(var d=0;d<c.length;d++){var e=c[d](a,b);if(e!==0)return e}return 0},d))}}function Q(b){H(b)&&(b={link:b});b.restrict=b.restrict||"AC";return I(b)}function Xb(b,a){function c(a,c){c=c?"-"+Za(c,"-"):"";b.removeClass((a?La:Ma)+c).addClass((a?Ma:La)+c)}var d=this,e=b.parent().controller("form")||Na,g=0,h=d.$error={};d.$name=a.name;d.$dirty=!1;d.$pristine=!0;
+d.$valid=!0;d.$invalid=!1;e.$addControl(d);b.addClass(Oa);c(!0);d.$addControl=function(a){a.$name&&!d.hasOwnProperty(a.$name)&&(d[a.$name]=a)};d.$removeControl=function(a){a.$name&&d[a.$name]===a&&delete d[a.$name];n(h,function(b,c){d.$setValidity(c,!0,a)})};d.$setValidity=function(a,b,i){var k=h[a];if(b){if(k&&(Ta(k,i),!k.length)){g--;if(!g)c(b),d.$valid=!0,d.$invalid=!1;h[a]=!1;c(!0,a);e.$setValidity(a,!0,d)}}else{g||c(b);if(k){if(Aa(k,i)!=-1)return}else h[a]=k=[],g++,c(!1,a),e.$setValidity(a,!1,
+d);k.push(i);d.$valid=!1;d.$invalid=!0}};d.$setDirty=function(){b.removeClass(Oa).addClass(Yb);d.$dirty=!0;d.$pristine=!1;e.$setDirty()}}function T(b){return w(b)||b===""||b===null||b!==b}function Pa(b,a,c,d,e,g){var h=function(){var c=O(a.val());d.$viewValue!==c&&b.$apply(function(){d.$setViewValue(c)})};if(e.hasEvent("input"))a.bind("input",h);else{var f;a.bind("keydown",function(a){a=a.keyCode;a===91||15<a&&a<19||37<=a&&a<=40||f||(f=g.defer(function(){h();f=null}))});a.bind("change",h)}d.$render=
+function(){a.val(T(d.$viewValue)?"":d.$viewValue)};var j=c.ngPattern,i=function(a,b){return T(b)||a.test(b)?(d.$setValidity("pattern",!0),b):(d.$setValidity("pattern",!1),q)};j&&(j.match(/^\/(.*)\/$/)?(j=RegExp(j.substr(1,j.length-2)),e=function(a){return i(j,a)}):e=function(a){var c=b.$eval(j);if(!c||!c.test)throw Error("Expected "+j+" to be a RegExp but was "+c);return i(c,a)},d.$formatters.push(e),d.$parsers.push(e));if(c.ngMinlength){var k=E(c.ngMinlength),e=function(a){return!T(a)&&a.length<
+k?(d.$setValidity("minlength",!1),q):(d.$setValidity("minlength",!0),a)};d.$parsers.push(e);d.$formatters.push(e)}if(c.ngMaxlength){var m=E(c.ngMaxlength),c=function(a){return!T(a)&&a.length>m?(d.$setValidity("maxlength",!1),q):(d.$setValidity("maxlength",!0),a)};d.$parsers.push(c);d.$formatters.push(c)}}function kb(b,a){b="ngClass"+b;return Q(function(c,d,e){function g(b){if(a===!0||c.$index%2===a)j&&b!==j&&h(j),f(b);j=b}function h(a){M(a)&&!B(a)&&(a=Sa(a,function(a,b){if(a)return b}));d.removeClass(B(a)?
+a.join(" "):a)}function f(a){M(a)&&!B(a)&&(a=Sa(a,function(a,b){if(a)return b}));a&&d.addClass(B(a)?a.join(" "):a)}var j=q;c.$watch(e[b],g,!0);e.$observe("class",function(){var a=c.$eval(e[b]);g(a,a)});b!=="ngClass"&&c.$watch("$index",function(d,g){var j=d%2;j!==g%2&&(j==a?f(c.$eval(e[b])):h(c.$eval(e[b])))})})}var y=function(b){return A(b)?b.toLowerCase():b},ma=function(b){return A(b)?b.toUpperCase():b},Z=E((/msie (\d+)/.exec(y(navigator.userAgent))||[])[1]),u,ca,ha=[].slice,Qa=[].push,xa=Object.prototype.toString,
+Zb=X.angular||(X.angular={}),ta,fb,aa=["0","0","0"];C.$inject=[];na.$inject=[];fb=Z<9?function(b){b=b.nodeName?b:b[0];return b.scopeName&&b.scopeName!="HTML"?ma(b.scopeName+":"+b.nodeName):b.nodeName}:function(b){return b.nodeName?b.nodeName:b[0].nodeName};var kc=/[A-Z]/g,id={full:"1.0.5",major:1,minor:0,dot:5,codeName:"flatulent-propulsion"},Ca=L.cache={},Ba=L.expando="ng-"+(new Date).getTime(),oc=1,$b=X.document.addEventListener?function(b,a,c){b.addEventListener(a,c,!1)}:function(b,a,c){b.attachEvent("on"+
+a,c)},db=X.document.removeEventListener?function(b,a,c){b.removeEventListener(a,c,!1)}:function(b,a,c){b.detachEvent("on"+a,c)},mc=/([\:\-\_]+(.))/g,nc=/^moz([A-Z])/,va=L.prototype={ready:function(b){function a(){c||(c=!0,b())}var c=!1;this.bind("DOMContentLoaded",a);L(X).bind("load",a)},toString:function(){var b=[];n(this,function(a){b.push(""+a)});return"["+b.join(", ")+"]"},eq:function(b){return b>=0?u(this[b]):u(this[this.length+b])},length:0,push:Qa,sort:[].sort,splice:[].splice},Fa={};n("multiple,selected,checked,disabled,readOnly,required".split(","),
+function(b){Fa[y(b)]=b});var Ab={};n("input,select,option,textarea,button,form".split(","),function(b){Ab[ma(b)]=!0});n({data:vb,inheritedData:Ea,scope:function(b){return Ea(b,"$scope")},controller:yb,injector:function(b){return Ea(b,"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},hasClass:Da,css:function(b,a,c){a=sb(a);if(x(c))b.style[a]=c;else{var d;Z<=8&&(d=b.currentStyle&&b.currentStyle[a],d===""&&(d="auto"));d=d||b.style[a];Z<=8&&(d=d===""?q:d);return d}},attr:function(b,a,c){var d=
+y(a);if(Fa[d])if(x(c))c?(b[a]=!0,b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||C).specified?d:q;else if(x(c))b.setAttribute(a,c);else if(b.getAttribute)return b=b.getAttribute(a,2),b===null?q:b},prop:function(b,a,c){if(x(c))b[a]=c;else return b[a]},text:v(Z<9?function(b,a){if(b.nodeType==1){if(w(a))return b.innerText;b.innerText=a}else{if(w(a))return b.nodeValue;b.nodeValue=a}}:function(b,a){if(w(a))return b.textContent;b.textContent=a},{$dv:""}),
+val:function(b,a){if(w(a))return b.value;b.value=a},html:function(b,a){if(w(a))return b.innerHTML;for(var c=0,d=b.childNodes;c<d.length;c++)sa(d[c]);b.innerHTML=a}},function(b,a){L.prototype[a]=function(a,d){var e,g;if((b.length==2&&b!==Da&&b!==yb?a:d)===q)if(M(a)){for(e=0;e<this.length;e++)if(b===vb)b(this[e],a);else for(g in a)b(this[e],g,a[g]);return this}else{if(this.length)return b(this[0],a,d)}else{for(e=0;e<this.length;e++)b(this[e],a,d);return this}return b.$dv}});n({removeData:tb,dealoc:sa,
+bind:function a(c,d,e){var g=ba(c,"events"),h=ba(c,"handle");g||ba(c,"events",g={});h||ba(c,"handle",h=pc(c,g));n(d.split(" "),function(d){var j=g[d];if(!j){if(d=="mouseenter"||d=="mouseleave"){var i=0;g.mouseenter=[];g.mouseleave=[];a(c,"mouseover",function(a){i++;i==1&&h(a,"mouseenter")});a(c,"mouseout",function(a){i--;i==0&&h(a,"mouseleave")})}else $b(c,d,h),g[d]=[];j=g[d]}j.push(e)})},unbind:ub,replaceWith:function(a,c){var d,e=a.parentNode;sa(a);n(new L(c),function(c){d?e.insertBefore(c,d.nextSibling):
+e.replaceChild(c,a);d=c})},children:function(a){var c=[];n(a.childNodes,function(a){a.nodeType===1&&c.push(a)});return c},contents:function(a){return a.childNodes||[]},append:function(a,c){n(new L(c),function(c){a.nodeType===1&&a.appendChild(c)})},prepend:function(a,c){if(a.nodeType===1){var d=a.firstChild;n(new L(c),function(c){d?a.insertBefore(c,d):(a.appendChild(c),d=c)})}},wrap:function(a,c){var c=u(c)[0],d=a.parentNode;d&&d.replaceChild(c,a);c.appendChild(a)},remove:function(a){sa(a);var c=a.parentNode;
+c&&c.removeChild(a)},after:function(a,c){var d=a,e=a.parentNode;n(new L(c),function(a){e.insertBefore(a,d.nextSibling);d=a})},addClass:xb,removeClass:wb,toggleClass:function(a,c,d){w(d)&&(d=!Da(a,c));(d?xb:wb)(a,c)},parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},next:function(a){if(a.nextElementSibling)return a.nextElementSibling;for(a=a.nextSibling;a!=null&&a.nodeType!==1;)a=a.nextSibling;return a},find:function(a,c){return a.getElementsByTagName(c)},clone:cb,triggerHandler:function(a,
+c){var d=(ba(a,"events")||{})[c];n(d,function(c){c.call(a,null)})}},function(a,c){L.prototype[c]=function(c,e){for(var g,h=0;h<this.length;h++)g==q?(g=a(this[h],c,e),g!==q&&(g=u(g))):bb(g,a(this[h],c,e));return g==q?this:g}});Ga.prototype={put:function(a,c){this[fa(a)]=c},get:function(a){return this[fa(a)]},remove:function(a){var c=this[a=fa(a)];delete this[a];return c}};eb.prototype={push:function(a,c){var d=this[a=fa(a)];d?d.push(c):this[a]=[c]},shift:function(a){var c=this[a=fa(a)];if(c)return c.length==
+1?(delete this[a],c[0]):c.shift()},peek:function(a){if(a=this[fa(a)])return a[0]}};var rc=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,sc=/,/,tc=/^\s*(_?)(\S+?)\1\s*$/,qc=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Db="Non-assignable model expression: ";Cb.$inject=["$provide"];var Ac=/^(x[\:\-_]|data[\:\-_])/i,Gb=/^([^:]+):\/\/(\w+:{0,1}\w*@)?([\w\.-]*)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/,ac=/^([^\?#]*)?(\?([^#]*))?(#(.*))?$/,Hc=ac,Hb={http:80,https:443,ftp:21};hb.prototype={$$replace:!1,absUrl:Ia("$$absUrl"),
+url:function(a,c){if(w(a))return this.$$url;var d=ac.exec(a);d[1]&&this.path(decodeURIComponent(d[1]));if(d[2]||d[1])this.search(d[3]||"");this.hash(d[5]||"",c);return this},protocol:Ia("$$protocol"),host:Ia("$$host"),port:Ia("$$port"),path:Jb("$$path",function(a){return a.charAt(0)=="/"?a:"/"+a}),search:function(a,c){if(w(a))return this.$$search;x(c)?c===null?delete this.$$search[a]:this.$$search[a]=c:this.$$search=A(a)?Wa(a):a;this.$$compose();return this},hash:Jb("$$hash",na),replace:function(){this.$$replace=
+!0;return this}};Ha.prototype=za(hb.prototype);Ib.prototype=za(Ha.prototype);var Ja={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:C,"+":function(a,c,d,e){d=d(a,c);e=e(a,c);return x(d)?x(e)?d+e:d:x(e)?e:q},"-":function(a,c,d,e){d=d(a,c);e=e(a,c);return(x(d)?d:0)-(x(e)?e:0)},"*":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)},
+"=":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,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,e){return e(a,c)(a,c,d(a,c))},"!":function(a,c,d){return!d(a,c)}},Lc=
+{n:"\n",f:"\u000c",r:"\r",t:"\t",v:"\u000b","'":"'",'"':'"'},ib={},Yc=X.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw Error("This browser does not support XMLHttpRequest.");};Qb.$inject=["$provide"];Rb.$inject=["$locale"];Tb.$inject=["$locale"];var Wb=".",hd={yyyy:N("FullYear",4),yy:N("FullYear",2,0,!0),y:N("FullYear",1),MMMM:Ka("Month"),
+MMM:Ka("Month",!0),MM:N("Month",2,1),M:N("Month",1,1),dd:N("Date",2),d:N("Date",1),HH:N("Hours",2),H:N("Hours",1),hh:N("Hours",2,-12),h:N("Hours",1,-12),mm:N("Minutes",2),m:N("Minutes",1),ss:N("Seconds",2),s:N("Seconds",1),EEEE:Ka("Day"),EEE:Ka("Day",!0),a:function(a,c){return a.getHours()<12?c.AMPMS[0]:c.AMPMS[1]},Z:function(a){var a=-1*a.getTimezoneOffset(),c=a>=0?"+":"";c+=jb(a/60,2)+jb(Math.abs(a%60),2);return c}},gd=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,
+fd=/^\d+$/;Sb.$inject=["$locale"];var dd=I(y),ed=I(ma);Ub.$inject=["$parse"];var jd=I({restrict:"E",compile:function(a,c){Z<=8&&(!c.href&&!c.name&&c.$set("href",""),a.append(Y.createComment("IE fix")));return function(a,c){c.bind("click",function(a){c.attr("href")||a.preventDefault()})}}}),lb={};n(Fa,function(a,c){var d=ea("ng-"+c);lb[d]=function(){return{priority:100,compile:function(){return function(a,g,h){a.$watch(h[d],function(a){h.$set(c,!!a)})}}}}});n(["src","href"],function(a){var c=ea("ng-"+
+a);lb[c]=function(){return{priority:99,link:function(d,e,g){g.$observe(c,function(c){c&&(g.$set(a,c),Z&&e.prop(a,g[a]))})}}}});var Na={$addControl:C,$removeControl:C,$setValidity:C,$setDirty:C};Xb.$inject=["$element","$attrs","$scope"];var Qa=function(a){return["$timeout",function(c){var d={name:"form",restrict:"E",controller:Xb,compile:function(){return{pre:function(a,d,h,f){if(!h.action){var j=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1};$b(d[0],"submit",j);d.bind("$destroy",
+function(){c(function(){db(d[0],"submit",j)},0,!1)})}var i=d.parent().controller("form"),k=h.name||h.ngForm;k&&(a[k]=f);i&&d.bind("$destroy",function(){i.$removeControl(f);k&&(a[k]=q);v(f,Na)})}}}};return a?v(U(d),{restrict:"EAC"}):d}]},kd=Qa(),ld=Qa(!0),md=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,nd=/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/,od=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,bc={text:Pa,number:function(a,c,d,e,g,h){Pa(a,c,d,e,g,h);e.$parsers.push(function(a){var c=
+T(a);return c||od.test(a)?(e.$setValidity("number",!0),a===""?null:c?a:parseFloat(a)):(e.$setValidity("number",!1),q)});e.$formatters.push(function(a){return T(a)?"":""+a});if(d.min){var f=parseFloat(d.min),a=function(a){return!T(a)&&a<f?(e.$setValidity("min",!1),q):(e.$setValidity("min",!0),a)};e.$parsers.push(a);e.$formatters.push(a)}if(d.max){var j=parseFloat(d.max),d=function(a){return!T(a)&&a>j?(e.$setValidity("max",!1),q):(e.$setValidity("max",!0),a)};e.$parsers.push(d);e.$formatters.push(d)}e.$formatters.push(function(a){return T(a)||
+Ra(a)?(e.$setValidity("number",!0),a):(e.$setValidity("number",!1),q)})},url:function(a,c,d,e,g,h){Pa(a,c,d,e,g,h);a=function(a){return T(a)||md.test(a)?(e.$setValidity("url",!0),a):(e.$setValidity("url",!1),q)};e.$formatters.push(a);e.$parsers.push(a)},email:function(a,c,d,e,g,h){Pa(a,c,d,e,g,h);a=function(a){return T(a)||nd.test(a)?(e.$setValidity("email",!0),a):(e.$setValidity("email",!1),q)};e.$formatters.push(a);e.$parsers.push(a)},radio:function(a,c,d,e){w(d.name)&&c.attr("name",ya());c.bind("click",
+function(){c[0].checked&&a.$apply(function(){e.$setViewValue(d.value)})});e.$render=function(){c[0].checked=d.value==e.$viewValue};d.$observe("value",e.$render)},checkbox:function(a,c,d,e){var g=d.ngTrueValue,h=d.ngFalseValue;A(g)||(g=!0);A(h)||(h=!1);c.bind("click",function(){a.$apply(function(){e.$setViewValue(c[0].checked)})});e.$render=function(){c[0].checked=e.$viewValue};e.$formatters.push(function(a){return a===g});e.$parsers.push(function(a){return a?g:h})},hidden:C,button:C,submit:C,reset:C},
+cc=["$browser","$sniffer",function(a,c){return{restrict:"E",require:"?ngModel",link:function(d,e,g,h){h&&(bc[y(g.type)]||bc.text)(d,e,g,h,c,a)}}}],Ma="ng-valid",La="ng-invalid",Oa="ng-pristine",Yb="ng-dirty",pd=["$scope","$exceptionHandler","$attrs","$element","$parse",function(a,c,d,e,g){function h(a,c){c=c?"-"+Za(c,"-"):"";e.removeClass((a?La:Ma)+c).addClass((a?Ma:La)+c)}this.$modelValue=this.$viewValue=Number.NaN;this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$pristine=
+!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$name=d.name;var f=g(d.ngModel),j=f.assign;if(!j)throw Error(Db+d.ngModel+" ("+qa(e)+")");this.$render=C;var i=e.inheritedData("$formController")||Na,k=0,m=this.$error={};e.addClass(Oa);h(!0);this.$setValidity=function(a,c){if(m[a]!==!c){if(c){if(m[a]&&k--,!k)h(!0),this.$valid=!0,this.$invalid=!1}else h(!1),this.$invalid=!0,this.$valid=!1,k++;m[a]=!c;h(c,a);i.$setValidity(a,c,this)}};this.$setViewValue=function(d){this.$viewValue=d;if(this.$pristine)this.$dirty=
+!0,this.$pristine=!1,e.removeClass(Oa).addClass(Yb),i.$setDirty();n(this.$parsers,function(a){d=a(d)});if(this.$modelValue!==d)this.$modelValue=d,j(a,d),n(this.$viewChangeListeners,function(a){try{a()}catch(d){c(d)}})};var l=this;a.$watch(function(){var c=f(a);if(l.$modelValue!==c){var d=l.$formatters,e=d.length;for(l.$modelValue=c;e--;)c=d[e](c);if(l.$viewValue!==c)l.$viewValue=c,l.$render()}})}],qd=function(){return{require:["ngModel","^?form"],controller:pd,link:function(a,c,d,e){var g=e[0],h=
+e[1]||Na;h.$addControl(g);c.bind("$destroy",function(){h.$removeControl(g)})}}},rd=I({require:"ngModel",link:function(a,c,d,e){e.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),dc=function(){return{require:"?ngModel",link:function(a,c,d,e){if(e){d.required=!0;var g=function(a){if(d.required&&(T(a)||a===!1))e.$setValidity("required",!1);else return e.$setValidity("required",!0),a};e.$formatters.push(g);e.$parsers.unshift(g);d.$observe("required",function(){g(e.$viewValue)})}}}},sd=function(){return{require:"ngModel",
+link:function(a,c,d,e){var g=(a=/\/(.*)\//.exec(d.ngList))&&RegExp(a[1])||d.ngList||",";e.$parsers.push(function(a){var c=[];a&&n(a.split(g),function(a){a&&c.push(O(a))});return c});e.$formatters.push(function(a){return B(a)?a.join(", "):q})}}},td=/^(true|false|\d+)$/,ud=function(){return{priority:100,compile:function(a,c){return td.test(c.ngValue)?function(a,c,g){g.$set("value",a.$eval(g.ngValue))}:function(a,c,g){a.$watch(g.ngValue,function(a){g.$set("value",a,!1)})}}}},vd=Q(function(a,c,d){c.addClass("ng-binding").data("$binding",
+d.ngBind);a.$watch(d.ngBind,function(a){c.text(a==q?"":a)})}),wd=["$interpolate",function(a){return function(c,d,e){c=a(d.attr(e.$attr.ngBindTemplate));d.addClass("ng-binding").data("$binding",c);e.$observe("ngBindTemplate",function(a){d.text(a)})}}],xd=[function(){return function(a,c,d){c.addClass("ng-binding").data("$binding",d.ngBindHtmlUnsafe);a.$watch(d.ngBindHtmlUnsafe,function(a){c.html(a||"")})}}],yd=kb("",!0),zd=kb("Odd",0),Ad=kb("Even",1),Bd=Q({compile:function(a,c){c.$set("ngCloak",q);
+a.removeClass("ng-cloak")}}),Cd=[function(){return{scope:!0,controller:"@"}}],Dd=["$sniffer",function(a){return{priority:1E3,compile:function(){a.csp=!0}}}],ec={};n("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave".split(" "),function(a){var c=ea("ng-"+a);ec[c]=["$parse",function(d){return function(e,g,h){var f=d(h[c]);g.bind(y(a),function(a){e.$apply(function(){f(e,{$event:a})})})}}]});var Ed=Q(function(a,c,d){c.bind("submit",function(){a.$apply(d.ngSubmit)})}),
+Fd=["$http","$templateCache","$anchorScroll","$compile",function(a,c,d,e){return{restrict:"ECA",terminal:!0,compile:function(g,h){var f=h.ngInclude||h.src,j=h.onload||"",i=h.autoscroll;return function(g,h){var l=0,n,o=function(){n&&(n.$destroy(),n=null);h.html("")};g.$watch(f,function(f){var s=++l;f?a.get(f,{cache:c}).success(function(a){s===l&&(n&&n.$destroy(),n=g.$new(),h.html(a),e(h.contents())(n),x(i)&&(!i||g.$eval(i))&&d(),n.$emit("$includeContentLoaded"),g.$eval(j))}).error(function(){s===l&&
+o()}):o()})}}}}],Gd=Q({compile:function(){return{pre:function(a,c,d){a.$eval(d.ngInit)}}}}),Hd=Q({terminal:!0,priority:1E3}),Id=["$locale","$interpolate",function(a,c){var d=/{}/g;return{restrict:"EA",link:function(e,g,h){var f=h.count,j=g.attr(h.$attr.when),i=h.offset||0,k=e.$eval(j),m={},l=c.startSymbol(),t=c.endSymbol();n(k,function(a,e){m[e]=c(a.replace(d,l+f+"-"+i+t))});e.$watch(function(){var c=parseFloat(e.$eval(f));return isNaN(c)?"":(k[c]||(c=a.pluralCat(c-i)),m[c](e,g,!0))},function(a){g.text(a)})}}}],
+Jd=Q({transclude:"element",priority:1E3,terminal:!0,compile:function(a,c,d){return function(a,c,h){var f=h.ngRepeat,h=f.match(/^\s*(.+)\s+in\s+(.*)\s*$/),j,i,k;if(!h)throw Error("Expected ngRepeat in form of '_item_ in _collection_' but got '"+f+"'.");f=h[1];j=h[2];h=f.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!h)throw Error("'item' in 'item in collection' should be identifier or (key, value) but got '"+f+"'.");i=h[3]||h[1];k=h[2];var m=new eb;a.$watch(function(a){var e,f,h=a.$eval(j),
+n=c,q=new eb,x,z,u,w,r,v;if(B(h))r=h||[];else{r=[];for(u in h)h.hasOwnProperty(u)&&u.charAt(0)!="$"&&r.push(u);r.sort()}x=r.length;e=0;for(f=r.length;e<f;e++){u=h===r?e:r[e];w=h[u];if(v=m.shift(w)){z=v.scope;q.push(w,v);if(e!==v.index)v.index=e,n.after(v.element);n=v.element}else z=a.$new();z[i]=w;k&&(z[k]=u);z.$index=e;z.$first=e===0;z.$last=e===x-1;z.$middle=!(z.$first||z.$last);v||d(z,function(a){n.after(a);v={scope:z,element:n=a,index:e};q.push(w,v)})}for(u in m)if(m.hasOwnProperty(u))for(r=m[u];r.length;)w=
+r.pop(),w.element.remove(),w.scope.$destroy();m=q})}}}),Kd=Q(function(a,c,d){a.$watch(d.ngShow,function(a){c.css("display",Va(a)?"":"none")})}),Ld=Q(function(a,c,d){a.$watch(d.ngHide,function(a){c.css("display",Va(a)?"none":"")})}),Md=Q(function(a,c,d){a.$watch(d.ngStyle,function(a,d){d&&a!==d&&n(d,function(a,d){c.css(d,"")});a&&c.css(a)},!0)}),Nd=I({restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(a,c,d,e){var g,h,f;a.$watch(d.ngSwitch||d.on,function(j){h&&
+(f.$destroy(),h.remove(),h=f=null);if(g=e.cases["!"+j]||e.cases["?"])a.$eval(d.change),f=a.$new(),g(f,function(a){h=a;c.append(a)})})}}),Od=Q({transclude:"element",priority:500,require:"^ngSwitch",compile:function(a,c,d){return function(a,g,h,f){f.cases["!"+c.ngSwitchWhen]=d}}}),Pd=Q({transclude:"element",priority:500,require:"^ngSwitch",compile:function(a,c,d){return function(a,c,h,f){f.cases["?"]=d}}}),Qd=Q({controller:["$transclude","$element",function(a,c){a(function(a){c.append(a)})}]}),Rd=["$http",
+"$templateCache","$route","$anchorScroll","$compile","$controller",function(a,c,d,e,g,h){return{restrict:"ECA",terminal:!0,link:function(a,c,i){function k(){var i=d.current&&d.current.locals,k=i&&i.$template;if(k){c.html(k);m&&(m.$destroy(),m=null);var k=g(c.contents()),n=d.current;m=n.scope=a.$new();if(n.controller)i.$scope=m,i=h(n.controller,i),c.children().data("$ngControllerController",i);k(m);m.$emit("$viewContentLoaded");m.$eval(l);e()}else c.html(""),m&&(m.$destroy(),m=null)}var m,l=i.onload||
+"";a.$on("$routeChangeSuccess",k);k()}}}],Sd=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(c,d){d.type=="text/ng-template"&&a.put(d.id,c[0].text)}}}],Td=I({terminal:!0}),Ud=["$compile","$parse",function(a,c){var d=/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w\d]*)|(?:\(\s*([\$\w][\$\w\d]*)\s*,\s*([\$\w][\$\w\d]*)\s*\)))\s+in\s+(.*)$/,e={$setViewValue:C};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope",
+"$attrs",function(a,c,d){var j=this,i={},k=e,m;j.databound=d.ngModel;j.init=function(a,c,d){k=a;m=d};j.addOption=function(c){i[c]=!0;k.$viewValue==c&&(a.val(c),m.parent()&&m.remove())};j.removeOption=function(a){this.hasOption(a)&&(delete i[a],k.$viewValue==a&&this.renderUnknownOption(a))};j.renderUnknownOption=function(c){c="? "+fa(c)+" ?";m.val(c);a.prepend(m);a.val(c);m.prop("selected",!0)};j.hasOption=function(a){return i.hasOwnProperty(a)};c.$on("$destroy",function(){j.renderUnknownOption=C})}],
+link:function(e,h,f,j){function i(a,c,d,e){d.$render=function(){var a=d.$viewValue;e.hasOption(a)?(y.parent()&&y.remove(),c.val(a),a===""&&v.prop("selected",!0)):w(a)&&v?c.val(""):e.renderUnknownOption(a)};c.bind("change",function(){a.$apply(function(){y.parent()&&y.remove();d.$setViewValue(c.val())})})}function k(a,c,d){var e;d.$render=function(){var a=new Ga(d.$viewValue);n(c.find("option"),function(c){c.selected=x(a.get(c.value))})};a.$watch(function(){ga(e,d.$viewValue)||(e=U(d.$viewValue),d.$render())});
+c.bind("change",function(){a.$apply(function(){var a=[];n(c.find("option"),function(c){c.selected&&a.push(c.value)});d.$setViewValue(a)})})}function m(e,f,g){function h(){var a={"":[]},c=[""],d,i,p,u,v;p=g.$modelValue;u=t(e)||[];var w=l?mb(u):u,x,y,A;y={};v=!1;var B,E;if(o)v=new Ga(p);else if(p===null||s)a[""].push({selected:p===null,id:"",label:""}),v=!0;for(A=0;x=w.length,A<x;A++){y[k]=u[l?y[l]=w[A]:A];d=m(e,y)||"";if(!(i=a[d]))i=a[d]=[],c.push(d);o?d=v.remove(n(e,y))!=q:(d=p===n(e,y),v=v||d);B=
+j(e,y);B=B===q?"":B;i.push({id:l?w[A]:A,label:B,selected:d})}!o&&!v&&a[""].unshift({id:"?",label:"",selected:!0});y=0;for(w=c.length;y<w;y++){d=c[y];i=a[d];if(r.length<=y)p={element:z.clone().attr("label",d),label:i.label},u=[p],r.push(u),f.append(p.element);else if(u=r[y],p=u[0],p.label!=d)p.element.attr("label",p.label=d);B=null;A=0;for(x=i.length;A<x;A++)if(d=i[A],v=u[A+1]){B=v.element;if(v.label!==d.label)B.text(v.label=d.label);if(v.id!==d.id)B.val(v.id=d.id);if(v.element.selected!==d.selected)B.prop("selected",
+v.selected=d.selected)}else d.id===""&&s?E=s:(E=C.clone()).val(d.id).attr("selected",d.selected).text(d.label),u.push({element:E,label:d.label,id:d.id,selected:d.selected}),B?B.after(E):p.element.append(E),B=E;for(A++;u.length>A;)u.pop().element.remove()}for(;r.length>y;)r.pop()[0].element.remove()}var i;if(!(i=p.match(d)))throw Error("Expected ngOptions in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '"+p+"'.");var j=c(i[2]||i[1]),k=i[4]||i[6],l=i[5],m=c(i[3]||""),
+n=c(i[2]?i[1]:k),t=c(i[7]),r=[[{element:f,label:""}]];s&&(a(s)(e),s.removeClass("ng-scope"),s.remove());f.html("");f.bind("change",function(){e.$apply(function(){var a,c=t(e)||[],d={},h,i,j,m,p,s;if(o){i=[];m=0;for(s=r.length;m<s;m++){a=r[m];j=1;for(p=a.length;j<p;j++)if((h=a[j].element)[0].selected)h=h.val(),l&&(d[l]=h),d[k]=c[h],i.push(n(e,d))}}else h=f.val(),h=="?"?i=q:h==""?i=null:(d[k]=c[h],l&&(d[l]=h),i=n(e,d));g.$setViewValue(i)})});g.$render=h;e.$watch(h)}if(j[1]){for(var l=j[0],t=j[1],o=
+f.multiple,p=f.ngOptions,s=!1,v,C=u(Y.createElement("option")),z=u(Y.createElement("optgroup")),y=C.clone(),j=0,A=h.children(),r=A.length;j<r;j++)if(A[j].value==""){v=s=A.eq(j);break}l.init(t,s,y);if(o&&(f.required||f.ngRequired)){var B=function(a){t.$setValidity("required",!f.required||a&&a.length);return a};t.$parsers.push(B);t.$formatters.unshift(B);f.$observe("required",function(){B(t.$viewValue)})}p?m(e,h,t):o?k(e,h,t):i(e,h,t,l)}}}}],Vd=["$interpolate",function(a){var c={addOption:C,removeOption:C};
+return{restrict:"E",priority:100,compile:function(d,e){if(w(e.value)){var g=a(d.text(),!0);g||e.$set("value",d.text())}return function(a,d,e){var i=d.parent(),k=i.data("$selectController")||i.parent().data("$selectController");k&&k.databound?d.prop("selected",!1):k=c;g?a.$watch(g,function(a,c){e.$set("value",a);a!==c&&k.removeOption(c);k.addOption(a)}):k.addOption(e.value);d.bind("$destroy",function(){k.removeOption(e.value)})}}}}],Wd=I({restrict:"E",terminal:!0});(ca=X.jQuery)?(u=ca,v(ca.fn,{scope:va.scope,
+controller:va.controller,injector:va.injector,inheritedData:va.inheritedData}),ab("remove",!0),ab("empty"),ab("html")):u=L;Zb.element=u;(function(a){v(a,{bootstrap:qb,copy:U,extend:v,equals:ga,element:u,forEach:n,injector:rb,noop:C,bind:Ua,toJson:da,fromJson:ob,identity:na,isUndefined:w,isDefined:x,isString:A,isFunction:H,isObject:M,isNumber:Ra,isElement:gc,isArray:B,version:id,isDate:oa,lowercase:y,uppercase:ma,callbacks:{counter:0}});ta=lc(X);try{ta("ngLocale")}catch(c){ta("ngLocale",[]).provider("$locale",
+Zc)}ta("ng",["ngLocale"],["$provide",function(a){a.provider("$compile",Cb).directive({a:jd,input:cc,textarea:cc,form:kd,script:Sd,select:Ud,style:Wd,option:Vd,ngBind:vd,ngBindHtmlUnsafe:xd,ngBindTemplate:wd,ngClass:yd,ngClassEven:Ad,ngClassOdd:zd,ngCsp:Dd,ngCloak:Bd,ngController:Cd,ngForm:ld,ngHide:Ld,ngInclude:Fd,ngInit:Gd,ngNonBindable:Hd,ngPluralize:Id,ngRepeat:Jd,ngShow:Kd,ngSubmit:Ed,ngStyle:Md,ngSwitch:Nd,ngSwitchWhen:Od,ngSwitchDefault:Pd,ngOptions:Td,ngView:Rd,ngTransclude:Qd,ngModel:qd,ngList:sd,
+ngChange:rd,required:dc,ngRequired:dc,ngValue:ud}).directive(lb).directive(ec);a.provider({$anchorScroll:uc,$browser:wc,$cacheFactory:xc,$controller:Bc,$document:Cc,$exceptionHandler:Dc,$filter:Qb,$interpolate:Ec,$http:Vc,$httpBackend:Wc,$location:Ic,$log:Jc,$parse:Nc,$route:Qc,$routeParams:Rc,$rootScope:Sc,$q:Oc,$sniffer:Tc,$templateCache:yc,$timeout:$c,$window:Uc})}])})(Zb);u(Y).ready(function(){jc(Y,qb)})})(window,document);angular.element(document).find("head").append('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak{display:none;}ng\\:form{display:block;}</style>');

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.0.5/version.txt
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.0.5/version.txt b/portal/js/libs/angular-1.0.5/version.txt
new file mode 100644
index 0000000..90a27f9
--- /dev/null
+++ b/portal/js/libs/angular-1.0.5/version.txt
@@ -0,0 +1 @@
+1.0.5


[54/61] [abbrv] git commit: Merge branch 'master' of github.com:usergrid/usergrid

Posted by sn...@apache.org.
Merge branch 'master' of github.com:usergrid/usergrid


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/ebc5f18d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/ebc5f18d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/ebc5f18d

Branch: refs/pull/35/merge
Commit: ebc5f18de24630370e2a6307356958308aa2e353
Parents: 508ef2f 2a01c30
Author: Rod Simpson <ro...@apigee.com>
Authored: Mon Jan 27 16:05:02 2014 -0700
Committer: Rod Simpson <ro...@apigee.com>
Committed: Mon Jan 27 16:05:02 2014 -0700

----------------------------------------------------------------------
 sdks/html5-javascript/Gruntfile.js              |   83 +
 sdks/html5-javascript/lib/Client.js             |  865 +++
 sdks/html5-javascript/lib/Collection.js         |  446 ++
 sdks/html5-javascript/lib/Counter.js            |  186 +
 sdks/html5-javascript/lib/Entity.js             |  646 +++
 sdks/html5-javascript/lib/Group.js              |  233 +
 sdks/html5-javascript/lib/Usergrid.js           |   87 +
 sdks/html5-javascript/package.json              |   22 +
 sdks/html5-javascript/tests/mocha/index.html    |   49 +
 sdks/html5-javascript/tests/mocha/test.js       |  325 ++
 .../tests/qunit/apigee_test.html                |   14 +
 sdks/html5-javascript/tests/qunit/tests.js      |    3 +
 .../resources/css/bootstrap-combined.min.css    |   18 +
 .../tests/resources/css/mocha.css               |  270 +
 .../tests/resources/css/styles.css              |   91 +
 .../tests/resources/images/apigee.png           |  Bin 0 -> 6010 bytes
 .../tests/resources/js/blanket_mocha.min.js     |    1 +
 .../tests/resources/js/json2.js                 |  486 ++
 .../tests/resources/js/mocha.js                 | 5341 ++++++++++++++++++
 sdks/html5-javascript/tests/test.html           |   37 +
 sdks/html5-javascript/tests/test.js             |  910 +++
 sdks/html5-javascript/usergrid.js               | 3078 +++++-----
 sdks/html5-javascript/usergrid.min.js           |    3 +-
 sdks/php/lib/vendor/Apigee/Usergrid/Client.php  |    7 +-
 stack/core/pom.xml                              |    6 +-
 .../org/usergrid/persistence/EntityManager.java |    6 +-
 .../usergrid/persistence/RelationManager.java   |    6 +-
 .../persistence/cassandra/CassandraService.java |   10 +
 .../cassandra/EntityManagerImpl.java            |   35 +-
 .../persistence/cassandra/QueryProcessor.java   |   18 +-
 .../cassandra/RelationManagerImpl.java          |   35 +-
 .../cassandra/index/IndexScanner.java           |    1 +
 .../usergrid/persistence/query/ir/OrNode.java   |   18 +-
 .../persistence/query/ir/SearchVisitor.java     |    4 +-
 .../query/ir/result/AbstractScanColumn.java     |   14 +-
 .../query/ir/result/IntersectionIterator.java   |    5 +-
 .../query/ir/result/SliceIterator.java          |   56 +-
 .../query/ir/result/UnionIterator.java          |  210 +-
 .../persistence/query/util/PeekingIterator.java |   64 -
 .../main/resources/usergrid-core-context.xml    |    2 +-
 .../batch/job/AbstractSchedulerRuntimeIT.java   |    1 +
 .../usergrid/batch/job/SchedulerRuntime1IT.java |   38 +-
 .../usergrid/batch/job/SchedulerRuntime2IT.java |   61 +-
 .../org/usergrid/batch/job/TestJobListener.java |   20 +-
 .../usergrid/batch/job/TestJobListenerTest.java |    8 +-
 .../count/BatchCountParallelismTest.java        |   29 +-
 .../count/CassandraCounterStoreTest.java        |   63 -
 .../org/usergrid/persistence/CollectionIT.java  |    8 +-
 .../query/AbstractIteratingQueryIT.java         |   20 +-
 .../persistence/query/AllInCollectionIT.java    |    2 +-
 .../persistence/query/AllInConnectionIT.java    |    2 +-
 .../query/AllInConnectionNoTypeIT.java          |   20 +-
 .../query/IntersectionUnionPagingIT.java        |  163 +
 .../query/MultiOrderByCollectionIT.java         |    2 +-
 .../MultiOrderByComplexUnionCollectionIT.java   |    2 +-
 .../MultiOrderByComplexUnionConnectionIT.java   |    2 +-
 .../query/MultiOrderByConnectionIT.java         |    2 +-
 .../query/NotOrderByCollectionIT.java           |    2 +-
 .../query/NotOrderByConnectionIT.java           |    2 +-
 ...gleOrderByBoundRangeScanAscCollectionIT.java |    2 +-
 ...gleOrderByBoundRangeScanAscConnectionIT.java |    2 +-
 ...leOrderByBoundRangeScanDescCollectionIT.java |    2 +-
 ...leOrderByBoundRangeScanDescConnectionIT.java |    2 +-
 ...eOrderByComplexIntersectionCollectionIT.java |    2 +-
 ...eOrderByComplexIntersectionConnectionIT.java |    2 +-
 .../SingleOrderByComplexUnionCollectionIT.java  |    2 +-
 .../SingleOrderByComplexUnionConnectionIT.java  |    2 +-
 .../SingleOrderByIntersectionCollectionIT.java  |    2 +-
 .../SingleOrderByIntersectionConnectionIT.java  |    2 +-
 .../SingleOrderByLessThanLimitCollectionIT.java |    2 +-
 .../SingleOrderByLessThanLimitConnectionIT.java |    2 +-
 .../SingleOrderByMaxLimitCollectionIT.java      |    2 +-
 .../SingleOrderByMaxLimitConnectionIT.java      |    2 +-
 ...SingleOrderByNoIntersectionCollectionIT.java |    2 +-
 ...SingleOrderByNoIntersectionConnectionIT.java |    2 +-
 .../query/SingleOrderByNotCollectionIT.java     |    2 +-
 .../query/SingleOrderByNotConnectionIT.java     |    2 +-
 ...OrderBySameRangeScanGreaterCollectionIT.java |    2 +-
 ...OrderBySameRangeScanGreaterConnectionIT.java |    2 +-
 ...meRangeScanGreaterThanEqualCollectionIT.java |    2 +-
 ...gleOrderBySameRangeScanLessCollectionIT.java |    2 +-
 ...gleOrderBySameRangeScanLessConnectionIT.java |    2 +-
 ...ySameRangeScanLessThanEqualCollectionIT.java |    2 +-
 ...ySameRangeScanLessThanEqualConnectionIT.java |    2 +-
 .../query/ir/result/AbstractScanColumnTest.java |   84 +
 .../query/ir/result/UnionIteratorTest.java      |  154 +-
 .../persistence/query/tree/GrammarTreeTest.java |   35 +
 stack/mongo-emulator/pom.xml                    |    2 +-
 stack/pom.xml                                   |    4 +-
 stack/rest/pom.xml                              |   12 +-
 .../applications/assets/AssetsResource.java     |   25 +-
 .../rest/applications/users/UserResource.java   |    6 +-
 .../rest/management/ManagementResource.java     |   18 +-
 .../rest/management/users/UserResource.java     |    2 +-
 .../queues/AbstractQueueResourceIT.java         |   30 +-
 .../rest/management/ManagementResourceIT.java   |   13 +-
 stack/services/pom.xml                          |   14 +-
 .../services/AbstractConnectionsService.java    |   13 +-
 stack/test-utils/pom.xml                        |    2 +-
 .../usergrid/cassandra/AvailablePortFinder.java |   30 +-
 .../usergrid/cassandra/CassandraResource.java   |   22 +-
 stack/tools/pom.xml                             |    2 +-
 stack/websocket/pom.xml                         |    2 +-
 103 files changed, 12769 insertions(+), 1889 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ebc5f18d/stack/pom.xml
----------------------------------------------------------------------


[17/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular-sanitize.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular-sanitize.js b/portal/js/libs/angular-1.2.5/angular-sanitize.js
new file mode 100755
index 0000000..b15f67c
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular-sanitize.js
@@ -0,0 +1,622 @@
+/**
+ * @license AngularJS v1.2.5
+ * (c) 2010-2014 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, angular, undefined) {'use strict';
+
+var $sanitizeMinErr = angular.$$minErr('$sanitize');
+
+/**
+ * @ngdoc overview
+ * @name ngSanitize
+ * @description
+ *
+ * # ngSanitize
+ *
+ * The `ngSanitize` module provides functionality to sanitize HTML.
+ *
+ * {@installModule sanitize}
+ *
+ * <div doc-module-components="ngSanitize"></div>
+ *
+ * See {@link ngSanitize.$sanitize `$sanitize`} for usage.
+ */
+
+/*
+ * HTML Parser By Misko Hevery (misko@hevery.com)
+ * based on:  HTML Parser By John Resig (ejohn.org)
+ * Original code by Erik Arvidsson, Mozilla Public License
+ * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
+ *
+ * // Use like so:
+ * htmlParser(htmlString, {
+ *     start: function(tag, attrs, unary) {},
+ *     end: function(tag) {},
+ *     chars: function(text) {},
+ *     comment: function(text) {}
+ * });
+ *
+ */
+
+
+/**
+ * @ngdoc service
+ * @name ngSanitize.$sanitize
+ * @function
+ *
+ * @description
+ *   The input is sanitized by parsing the html into tokens. All safe tokens (from a whitelist) are
+ *   then serialized back to properly escaped html string. This means that no unsafe input can make
+ *   it into the returned string, however, since our parser is more strict than a typical browser
+ *   parser, it's possible that some obscure input, which would be recognized as valid HTML by a
+ *   browser, won't make it through the sanitizer.
+ *   The whitelist is configured using the functions `aHrefSanitizationWhitelist` and
+ *   `imgSrcSanitizationWhitelist` of {@link ng.$compileProvider `$compileProvider`}.
+ *
+ * @param {string} html Html input.
+ * @returns {string} Sanitized html.
+ *
+ * @example
+   <doc:example module="ngSanitize">
+   <doc:source>
+     <script>
+       function Ctrl($scope, $sce) {
+         $scope.snippet =
+           '<p style="color:blue">an html\n' +
+           '<em onmouseover="this.textContent=\'PWN3D!\'">click here</em>\n' +
+           'snippet</p>';
+         $scope.deliberatelyTrustDangerousSnippet = function() {
+           return $sce.trustAsHtml($scope.snippet);
+         };
+       }
+     </script>
+     <div ng-controller="Ctrl">
+        Snippet: <textarea ng-model="snippet" cols="60" rows="3"></textarea>
+       <table>
+         <tr>
+           <td>Directive</td>
+           <td>How</td>
+           <td>Source</td>
+           <td>Rendered</td>
+         </tr>
+         <tr id="bind-html-with-sanitize">
+           <td>ng-bind-html</td>
+           <td>Automatically uses $sanitize</td>
+           <td><pre>&lt;div ng-bind-html="snippet"&gt;<br/>&lt;/div&gt;</pre></td>
+           <td><div ng-bind-html="snippet"></div></td>
+         </tr>
+         <tr id="bind-html-with-trust">
+           <td>ng-bind-html</td>
+           <td>Bypass $sanitize by explicitly trusting the dangerous value</td>
+           <td>
+           <pre>&lt;div ng-bind-html="deliberatelyTrustDangerousSnippet()"&gt;
+&lt;/div&gt;</pre>
+           </td>
+           <td><div ng-bind-html="deliberatelyTrustDangerousSnippet()"></div></td>
+         </tr>
+         <tr id="bind-default">
+           <td>ng-bind</td>
+           <td>Automatically escapes</td>
+           <td><pre>&lt;div ng-bind="snippet"&gt;<br/>&lt;/div&gt;</pre></td>
+           <td><div ng-bind="snippet"></div></td>
+         </tr>
+       </table>
+       </div>
+   </doc:source>
+   <doc:scenario>
+     it('should sanitize the html snippet by default', function() {
+       expect(using('#bind-html-with-sanitize').element('div').html()).
+         toBe('<p>an html\n<em>click here</em>\nsnippet</p>');
+     });
+
+     it('should inline raw snippet if bound to a trusted value', function() {
+       expect(using('#bind-html-with-trust').element("div").html()).
+         toBe("<p style=\"color:blue\">an html\n" +
+              "<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" +
+              "snippet</p>");
+     });
+
+     it('should escape snippet without any filter', function() {
+       expect(using('#bind-default').element('div').html()).
+         toBe("&lt;p style=\"color:blue\"&gt;an html\n" +
+              "&lt;em onmouseover=\"this.textContent='PWN3D!'\"&gt;click here&lt;/em&gt;\n" +
+              "snippet&lt;/p&gt;");
+     });
+
+     it('should update', function() {
+       input('snippet').enter('new <b onclick="alert(1)">text</b>');
+       expect(using('#bind-html-with-sanitize').element('div').html()).toBe('new <b>text</b>');
+       expect(using('#bind-html-with-trust').element('div').html()).toBe(
+         'new <b onclick="alert(1)">text</b>');
+       expect(using('#bind-default').element('div').html()).toBe(
+         "new &lt;b onclick=\"alert(1)\"&gt;text&lt;/b&gt;");
+     });
+   </doc:scenario>
+   </doc:example>
+ */
+function $SanitizeProvider() {
+  this.$get = ['$$sanitizeUri', function($$sanitizeUri) {
+    return function(html) {
+      var buf = [];
+      htmlParser(html, htmlSanitizeWriter(buf, function(uri, isImage) {
+        return !/^unsafe/.test($$sanitizeUri(uri, isImage));
+      }));
+      return buf.join('');
+    };
+  }];
+}
+
+function sanitizeText(chars) {
+  var buf = [];
+  var writer = htmlSanitizeWriter(buf, angular.noop);
+  writer.chars(chars);
+  return buf.join('');
+}
+
+
+// Regular Expressions for parsing tags and attributes
+var START_TAG_REGEXP =
+       /^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,
+  END_TAG_REGEXP = /^<\s*\/\s*([\w:-]+)[^>]*>/,
+  ATTR_REGEXP = /([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,
+  BEGIN_TAG_REGEXP = /^</,
+  BEGING_END_TAGE_REGEXP = /^<\s*\//,
+  COMMENT_REGEXP = /<!--(.*?)-->/g,
+  DOCTYPE_REGEXP = /<!DOCTYPE([^>]*?)>/i,
+  CDATA_REGEXP = /<!\[CDATA\[(.*?)]]>/g,
+  // Match everything outside of normal chars and " (quote character)
+  NON_ALPHANUMERIC_REGEXP = /([^\#-~| |!])/g;
+
+
+// Good source of info about elements and attributes
+// http://dev.w3.org/html5/spec/Overview.html#semantics
+// http://simon.html5.org/html-elements
+
+// Safe Void Elements - HTML5
+// http://dev.w3.org/html5/spec/Overview.html#void-elements
+var voidElements = makeMap("area,br,col,hr,img,wbr");
+
+// Elements that you can, intentionally, leave open (and which close themselves)
+// http://dev.w3.org/html5/spec/Overview.html#optional-tags
+var optionalEndTagBlockElements = makeMap("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),
+    optionalEndTagInlineElements = makeMap("rp,rt"),
+    optionalEndTagElements = angular.extend({},
+                                            optionalEndTagInlineElements,
+                                            optionalEndTagBlockElements);
+
+// Safe Block Elements - HTML5
+var blockElements = angular.extend({}, optionalEndTagBlockElements, makeMap("address,article," +
+        "aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5," +
+        "h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul"));
+
+// Inline Elements - HTML5
+var inlineElements = angular.extend({}, optionalEndTagInlineElements, makeMap("a,abbr,acronym,b," +
+        "bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s," +
+        "samp,small,span,strike,strong,sub,sup,time,tt,u,var"));
+
+
+// Special Elements (can contain anything)
+var specialElements = makeMap("script,style");
+
+var validElements = angular.extend({},
+                                   voidElements,
+                                   blockElements,
+                                   inlineElements,
+                                   optionalEndTagElements);
+
+//Attributes that have href and hence need to be sanitized
+var uriAttrs = makeMap("background,cite,href,longdesc,src,usemap");
+var validAttrs = angular.extend({}, uriAttrs, makeMap(
+    'abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,'+
+    'color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,'+
+    'ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,'+
+    'scope,scrolling,shape,span,start,summary,target,title,type,'+
+    'valign,value,vspace,width'));
+
+function makeMap(str) {
+  var obj = {}, items = str.split(','), i;
+  for (i = 0; i < items.length; i++) obj[items[i]] = true;
+  return obj;
+}
+
+
+/**
+ * @example
+ * htmlParser(htmlString, {
+ *     start: function(tag, attrs, unary) {},
+ *     end: function(tag) {},
+ *     chars: function(text) {},
+ *     comment: function(text) {}
+ * });
+ *
+ * @param {string} html string
+ * @param {object} handler
+ */
+function htmlParser( html, handler ) {
+  var index, chars, match, stack = [], last = html;
+  stack.last = function() { return stack[ stack.length - 1 ]; };
+
+  while ( html ) {
+    chars = true;
+
+    // Make sure we're not in a script or style element
+    if ( !stack.last() || !specialElements[ stack.last() ] ) {
+
+      // Comment
+      if ( html.indexOf("<!--") === 0 ) {
+        // comments containing -- are not allowed unless they terminate the comment
+        index = html.indexOf("--", 4);
+
+        if ( index >= 0 && html.lastIndexOf("-->", index) === index) {
+          if (handler.comment) handler.comment( html.substring( 4, index ) );
+          html = html.substring( index + 3 );
+          chars = false;
+        }
+      // DOCTYPE
+      } else if ( DOCTYPE_REGEXP.test(html) ) {
+        match = html.match( DOCTYPE_REGEXP );
+
+        if ( match ) {
+          html = html.replace( match[0] , '');
+          chars = false;
+        }
+      // end tag
+      } else if ( BEGING_END_TAGE_REGEXP.test(html) ) {
+        match = html.match( END_TAG_REGEXP );
+
+        if ( match ) {
+          html = html.substring( match[0].length );
+          match[0].replace( END_TAG_REGEXP, parseEndTag );
+          chars = false;
+        }
+
+      // start tag
+      } else if ( BEGIN_TAG_REGEXP.test(html) ) {
+        match = html.match( START_TAG_REGEXP );
+
+        if ( match ) {
+          html = html.substring( match[0].length );
+          match[0].replace( START_TAG_REGEXP, parseStartTag );
+          chars = false;
+        }
+      }
+
+      if ( chars ) {
+        index = html.indexOf("<");
+
+        var text = index < 0 ? html : html.substring( 0, index );
+        html = index < 0 ? "" : html.substring( index );
+
+        if (handler.chars) handler.chars( decodeEntities(text) );
+      }
+
+    } else {
+      html = html.replace(new RegExp("(.*)<\\s*\\/\\s*" + stack.last() + "[^>]*>", 'i'),
+        function(all, text){
+          text = text.replace(COMMENT_REGEXP, "$1").replace(CDATA_REGEXP, "$1");
+
+          if (handler.chars) handler.chars( decodeEntities(text) );
+
+          return "";
+      });
+
+      parseEndTag( "", stack.last() );
+    }
+
+    if ( html == last ) {
+      throw $sanitizeMinErr('badparse', "The sanitizer was unable to parse the following block " +
+                                        "of html: {0}", html);
+    }
+    last = html;
+  }
+
+  // Clean up any remaining tags
+  parseEndTag();
+
+  function parseStartTag( tag, tagName, rest, unary ) {
+    tagName = angular.lowercase(tagName);
+    if ( blockElements[ tagName ] ) {
+      while ( stack.last() && inlineElements[ stack.last() ] ) {
+        parseEndTag( "", stack.last() );
+      }
+    }
+
+    if ( optionalEndTagElements[ tagName ] && stack.last() == tagName ) {
+      parseEndTag( "", tagName );
+    }
+
+    unary = voidElements[ tagName ] || !!unary;
+
+    if ( !unary )
+      stack.push( tagName );
+
+    var attrs = {};
+
+    rest.replace(ATTR_REGEXP,
+      function(match, name, doubleQuotedValue, singleQuotedValue, unquotedValue) {
+        var value = doubleQuotedValue
+          || singleQuotedValue
+          || unquotedValue
+          || '';
+
+        attrs[name] = decodeEntities(value);
+    });
+    if (handler.start) handler.start( tagName, attrs, unary );
+  }
+
+  function parseEndTag( tag, tagName ) {
+    var pos = 0, i;
+    tagName = angular.lowercase(tagName);
+    if ( tagName )
+      // Find the closest opened tag of the same type
+      for ( pos = stack.length - 1; pos >= 0; pos-- )
+        if ( stack[ pos ] == tagName )
+          break;
+
+    if ( pos >= 0 ) {
+      // Close all the open elements, up the stack
+      for ( i = stack.length - 1; i >= pos; i-- )
+        if (handler.end) handler.end( stack[ i ] );
+
+      // Remove the open elements from the stack
+      stack.length = pos;
+    }
+  }
+}
+
+var hiddenPre=document.createElement("pre");
+var spaceRe = /^(\s*)([\s\S]*?)(\s*)$/;
+/**
+ * decodes all entities into regular string
+ * @param value
+ * @returns {string} A string with decoded entities.
+ */
+function decodeEntities(value) {
+  if (!value) { return ''; }
+
+  // Note: IE8 does not preserve spaces at the start/end of innerHTML
+  // so we must capture them and reattach them afterward
+  var parts = spaceRe.exec(value);
+  var spaceBefore = parts[1];
+  var spaceAfter = parts[3];
+  var content = parts[2];
+  if (content) {
+    hiddenPre.innerHTML=content.replace(/</g,"&lt;");
+    // innerText depends on styling as it doesn't display hidden elements.
+    // Therefore, it's better to use textContent not to cause unnecessary
+    // reflows. However, IE<9 don't support textContent so the innerText
+    // fallback is necessary.
+    content = 'textContent' in hiddenPre ?
+      hiddenPre.textContent : hiddenPre.innerText;
+  }
+  return spaceBefore + content + spaceAfter;
+}
+
+/**
+ * Escapes all potentially dangerous characters, so that the
+ * resulting string can be safely inserted into attribute or
+ * element text.
+ * @param value
+ * @returns escaped text
+ */
+function encodeEntities(value) {
+  return value.
+    replace(/&/g, '&amp;').
+    replace(NON_ALPHANUMERIC_REGEXP, function(value){
+      return '&#' + value.charCodeAt(0) + ';';
+    }).
+    replace(/</g, '&lt;').
+    replace(/>/g, '&gt;');
+}
+
+/**
+ * create an HTML/XML writer which writes to buffer
+ * @param {Array} buf use buf.jain('') to get out sanitized html string
+ * @returns {object} in the form of {
+ *     start: function(tag, attrs, unary) {},
+ *     end: function(tag) {},
+ *     chars: function(text) {},
+ *     comment: function(text) {}
+ * }
+ */
+function htmlSanitizeWriter(buf, uriValidator){
+  var ignore = false;
+  var out = angular.bind(buf, buf.push);
+  return {
+    start: function(tag, attrs, unary){
+      tag = angular.lowercase(tag);
+      if (!ignore && specialElements[tag]) {
+        ignore = tag;
+      }
+      if (!ignore && validElements[tag] === true) {
+        out('<');
+        out(tag);
+        angular.forEach(attrs, function(value, key){
+          var lkey=angular.lowercase(key);
+          var isImage = (tag === 'img' && lkey === 'src') || (lkey === 'background');
+          if (validAttrs[lkey] === true &&
+            (uriAttrs[lkey] !== true || uriValidator(value, isImage))) {
+            out(' ');
+            out(key);
+            out('="');
+            out(encodeEntities(value));
+            out('"');
+          }
+        });
+        out(unary ? '/>' : '>');
+      }
+    },
+    end: function(tag){
+        tag = angular.lowercase(tag);
+        if (!ignore && validElements[tag] === true) {
+          out('</');
+          out(tag);
+          out('>');
+        }
+        if (tag == ignore) {
+          ignore = false;
+        }
+      },
+    chars: function(chars){
+        if (!ignore) {
+          out(encodeEntities(chars));
+        }
+      }
+  };
+}
+
+
+// define ngSanitize module and register $sanitize service
+angular.module('ngSanitize', []).provider('$sanitize', $SanitizeProvider);
+
+/* global sanitizeText: false */
+
+/**
+ * @ngdoc filter
+ * @name ngSanitize.filter:linky
+ * @function
+ *
+ * @description
+ * Finds links in text input and turns them into html links. Supports http/https/ftp/mailto and
+ * plain email address links.
+ *
+ * Requires the {@link ngSanitize `ngSanitize`} module to be installed.
+ *
+ * @param {string} text Input text.
+ * @param {string} target Window (_blank|_self|_parent|_top) or named frame to open links in.
+ * @returns {string} Html-linkified text.
+ *
+ * @usage
+   <span ng-bind-html="linky_expression | linky"></span>
+ *
+ * @example
+   <doc:example module="ngSanitize">
+     <doc:source>
+       <script>
+         function Ctrl($scope) {
+           $scope.snippet =
+             'Pretty text with some links:\n'+
+             'http://angularjs.org/,\n'+
+             'mailto:us@somewhere.org,\n'+
+             'another@somewhere.org,\n'+
+             'and one more: ftp://127.0.0.1/.';
+           $scope.snippetWithTarget = 'http://angularjs.org/';
+         }
+       </script>
+       <div ng-controller="Ctrl">
+       Snippet: <textarea ng-model="snippet" cols="60" rows="3"></textarea>
+       <table>
+         <tr>
+           <td>Filter</td>
+           <td>Source</td>
+           <td>Rendered</td>
+         </tr>
+         <tr id="linky-filter">
+           <td>linky filter</td>
+           <td>
+             <pre>&lt;div ng-bind-html="snippet | linky"&gt;<br>&lt;/div&gt;</pre>
+           </td>
+           <td>
+             <div ng-bind-html="snippet | linky"></div>
+           </td>
+         </tr>
+         <tr id="linky-target">
+          <td>linky target</td>
+          <td>
+            <pre>&lt;div ng-bind-html="snippetWithTarget | linky:'_blank'"&gt;<br>&lt;/div&gt;</pre>
+          </td>
+          <td>
+            <div ng-bind-html="snippetWithTarget | linky:'_blank'"></div>
+          </td>
+         </tr>
+         <tr id="escaped-html">
+           <td>no filter</td>
+           <td><pre>&lt;div ng-bind="snippet"&gt;<br>&lt;/div&gt;</pre></td>
+           <td><div ng-bind="snippet"></div></td>
+         </tr>
+       </table>
+     </doc:source>
+     <doc:scenario>
+       it('should linkify the snippet with urls', function() {
+         expect(using('#linky-filter').binding('snippet | linky')).
+           toBe('Pretty text with some links:&#10;' +
+                '<a href="http://angularjs.org/">http://angularjs.org/</a>,&#10;' +
+                '<a href="mailto:us@somewhere.org">us@somewhere.org</a>,&#10;' +
+                '<a href="mailto:another@somewhere.org">another@somewhere.org</a>,&#10;' +
+                'and one more: <a href="ftp://127.0.0.1/">ftp://127.0.0.1/</a>.');
+       });
+
+       it ('should not linkify snippet without the linky filter', function() {
+         expect(using('#escaped-html').binding('snippet')).
+           toBe("Pretty text with some links:\n" +
+                "http://angularjs.org/,\n" +
+                "mailto:us@somewhere.org,\n" +
+                "another@somewhere.org,\n" +
+                "and one more: ftp://127.0.0.1/.");
+       });
+
+       it('should update', function() {
+         input('snippet').enter('new http://link.');
+         expect(using('#linky-filter').binding('snippet | linky')).
+           toBe('new <a href="http://link">http://link</a>.');
+         expect(using('#escaped-html').binding('snippet')).toBe('new http://link.');
+       });
+
+       it('should work with the target property', function() {
+        expect(using('#linky-target').binding("snippetWithTarget | linky:'_blank'")).
+          toBe('<a target="_blank" href="http://angularjs.org/">http://angularjs.org/</a>');
+       });
+     </doc:scenario>
+   </doc:example>
+ */
+angular.module('ngSanitize').filter('linky', ['$sanitize', function($sanitize) {
+  var LINKY_URL_REGEXP =
+        /((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>]/,
+      MAILTO_REGEXP = /^mailto:/;
+
+  return function(text, target) {
+    if (!text) return text;
+    var match;
+    var raw = text;
+    var html = [];
+    var url;
+    var i;
+    while ((match = raw.match(LINKY_URL_REGEXP))) {
+      // We can not end in these as they are sometimes found at the end of the sentence
+      url = match[0];
+      // if we did not match ftp/http/mailto then assume mailto
+      if (match[2] == match[3]) url = 'mailto:' + url;
+      i = match.index;
+      addText(raw.substr(0, i));
+      addLink(url, match[0].replace(MAILTO_REGEXP, ''));
+      raw = raw.substring(i + match[0].length);
+    }
+    addText(raw);
+    return $sanitize(html.join(''));
+
+    function addText(text) {
+      if (!text) {
+        return;
+      }
+      html.push(sanitizeText(text));
+    }
+
+    function addLink(url, text) {
+      html.push('<a ');
+      if (angular.isDefined(target)) {
+        html.push('target="');
+        html.push(target);
+        html.push('" ');
+      }
+      html.push('href="');
+      html.push(url);
+      html.push('">');
+      addText(text);
+      html.push('</a>');
+    }
+  };
+}]);
+
+
+})(window, window.angular);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular-sanitize.min.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular-sanitize.min.js b/portal/js/libs/angular-1.2.5/angular-sanitize.min.js
new file mode 100755
index 0000000..3aa15a8
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular-sanitize.min.js
@@ -0,0 +1,14 @@
+/*
+ AngularJS v1.2.5
+ (c) 2010-2014 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(p,h,q){'use strict';function E(a){var e=[];s(e,h.noop).chars(a);return e.join("")}function k(a){var e={};a=a.split(",");var d;for(d=0;d<a.length;d++)e[a[d]]=!0;return e}function F(a,e){function d(a,b,d,g){b=h.lowercase(b);if(t[b])for(;f.last()&&u[f.last()];)c("",f.last());v[b]&&f.last()==b&&c("",b);(g=w[b]||!!g)||f.push(b);var l={};d.replace(G,function(a,b,e,c,d){l[b]=r(e||c||d||"")});e.start&&e.start(b,l,g)}function c(a,b){var c=0,d;if(b=h.lowercase(b))for(c=f.length-1;0<=c&&f[c]!=b;c--);
+if(0<=c){for(d=f.length-1;d>=c;d--)e.end&&e.end(f[d]);f.length=c}}var b,g,f=[],l=a;for(f.last=function(){return f[f.length-1]};a;){g=!0;if(f.last()&&x[f.last()])a=a.replace(RegExp("(.*)<\\s*\\/\\s*"+f.last()+"[^>]*>","i"),function(b,a){a=a.replace(H,"$1").replace(I,"$1");e.chars&&e.chars(r(a));return""}),c("",f.last());else{if(0===a.indexOf("\x3c!--"))b=a.indexOf("--",4),0<=b&&a.lastIndexOf("--\x3e",b)===b&&(e.comment&&e.comment(a.substring(4,b)),a=a.substring(b+3),g=!1);else if(y.test(a)){if(b=a.match(y))a=
+a.replace(b[0],""),g=!1}else if(J.test(a)){if(b=a.match(z))a=a.substring(b[0].length),b[0].replace(z,c),g=!1}else K.test(a)&&(b=a.match(A))&&(a=a.substring(b[0].length),b[0].replace(A,d),g=!1);g&&(b=a.indexOf("<"),g=0>b?a:a.substring(0,b),a=0>b?"":a.substring(b),e.chars&&e.chars(r(g)))}if(a==l)throw L("badparse",a);l=a}c()}function r(a){if(!a)return"";var e=M.exec(a);a=e[1];var d=e[3];if(e=e[2])n.innerHTML=e.replace(/</g,"&lt;"),e="textContent"in n?n.textContent:n.innerText;return a+e+d}function B(a){return a.replace(/&/g,
+"&amp;").replace(N,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function s(a,e){var d=!1,c=h.bind(a,a.push);return{start:function(a,g,f){a=h.lowercase(a);!d&&x[a]&&(d=a);d||!0!==C[a]||(c("<"),c(a),h.forEach(g,function(d,f){var g=h.lowercase(f),k="img"===a&&"src"===g||"background"===g;!0!==O[g]||!0===D[g]&&!e(d,k)||(c(" "),c(f),c('="'),c(B(d)),c('"'))}),c(f?"/>":">"))},end:function(a){a=h.lowercase(a);d||!0!==C[a]||(c("</"),c(a),c(">"));a==d&&(d=!1)},chars:function(a){d||
+c(B(a))}}}var L=h.$$minErr("$sanitize"),A=/^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,z=/^<\s*\/\s*([\w:-]+)[^>]*>/,G=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,K=/^</,J=/^<\s*\//,H=/\x3c!--(.*?)--\x3e/g,y=/<!DOCTYPE([^>]*?)>/i,I=/<!\[CDATA\[(.*?)]]\x3e/g,N=/([^\#-~| |!])/g,w=k("area,br,col,hr,img,wbr");p=k("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr");q=k("rp,rt");var v=h.extend({},q,p),t=h.extend({},p,k("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),
+u=h.extend({},q,k("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),x=k("script,style"),C=h.extend({},w,t,u,v),D=k("background,cite,href,longdesc,src,usemap"),O=h.extend({},D,k("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,span,start,summary,target,title,type,valign,value,vspace,width")),
+n=document.createElement("pre"),M=/^(\s*)([\s\S]*?)(\s*)$/;h.module("ngSanitize",[]).provider("$sanitize",function(){this.$get=["$$sanitizeUri",function(a){return function(e){var d=[];F(e,s(d,function(c,b){return!/^unsafe/.test(a(c,b))}));return d.join("")}}]});h.module("ngSanitize").filter("linky",["$sanitize",function(a){var e=/((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>]/,d=/^mailto:/;return function(c,b){function g(a){a&&m.push(E(a))}function f(a,c){m.push("<a ");h.isDefined(b)&&
+(m.push('target="'),m.push(b),m.push('" '));m.push('href="');m.push(a);m.push('">');g(c);m.push("</a>")}if(!c)return c;for(var l,k=c,m=[],n,p;l=k.match(e);)n=l[0],l[2]==l[3]&&(n="mailto:"+n),p=l.index,g(k.substr(0,p)),f(n,l[0].replace(d,"")),k=k.substring(p+l[0].length);g(k);return a(m.join(""))}}])})(window,window.angular);
+//# sourceMappingURL=angular-sanitize.min.js.map

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular-sanitize.min.js.map
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular-sanitize.min.js.map b/portal/js/libs/angular-1.2.5/angular-sanitize.min.js.map
new file mode 100755
index 0000000..cf980ba
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular-sanitize.min.js.map
@@ -0,0 +1,8 @@
+{
+"version":3,
+"file":"angular-sanitize.min.js",
+"lineCount":13,
+"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CAgJtCC,QAASA,EAAY,CAACC,CAAD,CAAQ,CAC3B,IAAIC,EAAM,EACGC,EAAAC,CAAmBF,CAAnBE,CAAwBN,CAAAO,KAAxBD,CACbH,MAAA,CAAaA,CAAb,CACA,OAAOC,EAAAI,KAAA,CAAS,EAAT,CAJoB,CAmE7BC,QAASA,EAAO,CAACC,CAAD,CAAM,CAAA,IAChBC,EAAM,EAAIC,EAAAA,CAAQF,CAAAG,MAAA,CAAU,GAAV,CAAtB,KAAsCC,CACtC,KAAKA,CAAL,CAAS,CAAT,CAAYA,CAAZ,CAAgBF,CAAAG,OAAhB,CAA8BD,CAAA,EAA9B,CAAmCH,CAAA,CAAIC,CAAA,CAAME,CAAN,CAAJ,CAAA,CAAgB,CAAA,CACnD,OAAOH,EAHa,CAmBtBK,QAASA,EAAU,CAAEC,CAAF,CAAQC,CAAR,CAAkB,CAiFnCC,QAASA,EAAa,CAAEC,CAAF,CAAOC,CAAP,CAAgBC,CAAhB,CAAsBC,CAAtB,CAA8B,CAClDF,CAAA,CAAUrB,CAAAwB,UAAA,CAAkBH,CAAlB,CACV,IAAKI,CAAA,CAAeJ,CAAf,CAAL,CACE,IAAA,CAAQK,CAAAC,KAAA,EAAR,EAAwBC,CAAA,CAAgBF,CAAAC,KAAA,EAAhB,CAAxB,CAAA,CACEE,CAAA,CAAa,EAAb,CAAiBH,CAAAC,KAAA,EAAjB,CAICG,EAAA,CAAwBT,CAAxB,CAAL,EAA0CK,CAAAC,KAAA,EAA1C,EAA0DN,CAA1D,EACEQ,CAAA,CAAa,EAAb,CAAiBR,CAAjB,CAKF,EAFAE,CAEA,CAFQQ,CAAA,CAAcV,CAAd,CAER,EAFmC,CAAC,CAACE,CAErC,GACEG,CAAAM,KAAA,CAAYX,CAAZ,CAEF,
 KAAIY,EAAQ,EAEZX,EAAAY,QAAA,CAAaC,CAAb,CACE,QAAQ,CAACC,CAAD,CAAQC,CAAR,CAAcC,CAAd,CAAiCC,CAAjC,CAAoDC,CAApD,CAAmE,CAMzEP,CAAA,CAAMI,CAAN,CAAA,CAAcI,CAAA,CALFH,CAKE,EAJTC,CAIS,EAHTC,CAGS,EAFT,EAES,CAN2D,CAD7E,CASItB,EAAAwB,MAAJ,EAAmBxB,CAAAwB,MAAA,CAAerB,CAAf,CAAwBY,CAAxB,CAA+BV,CAA/B,CA5B+B,CA+BpDM,QAASA,EAAW,CAAET,CAAF,CAAOC,CAAP,CAAiB,CAAA,IAC/BsB,EAAM,CADyB,CACtB7B,CAEb,IADAO,CACA,CADUrB,CAAAwB,UAAA,CAAkBH,CAAlB,CACV,CAEE,IAAMsB,CAAN,CAAYjB,CAAAX,OAAZ,CAA2B,CAA3B,CAAqC,CAArC,EAA8B4B,CAA9B,EACOjB,CAAA,CAAOiB,CAAP,CADP,EACuBtB,CADvB,CAAwCsB,CAAA,EAAxC;AAIF,GAAY,CAAZ,EAAKA,CAAL,CAAgB,CAEd,IAAM7B,CAAN,CAAUY,CAAAX,OAAV,CAAyB,CAAzB,CAA4BD,CAA5B,EAAiC6B,CAAjC,CAAsC7B,CAAA,EAAtC,CACMI,CAAA0B,IAAJ,EAAiB1B,CAAA0B,IAAA,CAAalB,CAAA,CAAOZ,CAAP,CAAb,CAGnBY,EAAAX,OAAA,CAAe4B,CAND,CATmB,CAhHF,IAC/BE,CAD+B,CACxB1C,CADwB,CACVuB,EAAQ,EADE,CACEC,EAAOV,CAG5C,KAFAS,CAAAC,KAEA,CAFamB,QAAQ,EAAG,CAAE,MAAOpB,EAAA,CAAOA,CAAAX,OAAP,CAAsB,CAAtB,CAAT,CAExB,CAAQE,CAAR,CAAA,CAAe,CACbd,CAAA,CAAQ,CAAA,CAGR,IAAMuB
 ,CAAAC,KAAA,EAAN,EAAuBoB,CAAA,CAAiBrB,CAAAC,KAAA,EAAjB,CAAvB,CAmDEV,CASA,CATOA,CAAAiB,QAAA,CAAiBc,MAAJ,CAAW,kBAAX,CAAgCtB,CAAAC,KAAA,EAAhC,CAA+C,QAA/C,CAAyD,GAAzD,CAAb,CACL,QAAQ,CAACsB,CAAD,CAAMC,CAAN,CAAW,CACjBA,CAAA,CAAOA,CAAAhB,QAAA,CAAaiB,CAAb,CAA6B,IAA7B,CAAAjB,QAAA,CAA2CkB,CAA3C,CAAyD,IAAzD,CAEHlC,EAAAf,MAAJ,EAAmBe,CAAAf,MAAA,CAAesC,CAAA,CAAeS,CAAf,CAAf,CAEnB,OAAO,EALU,CADd,CASP,CAAArB,CAAA,CAAa,EAAb,CAAiBH,CAAAC,KAAA,EAAjB,CA5DF,KAAyD,CAGvD,GAA8B,CAA9B,GAAKV,CAAAoC,QAAA,CAAa,SAAb,CAAL,CAEER,CAEA,CAFQ5B,CAAAoC,QAAA,CAAa,IAAb,CAAmB,CAAnB,CAER,CAAc,CAAd,EAAKR,CAAL,EAAmB5B,CAAAqC,YAAA,CAAiB,QAAjB,CAAwBT,CAAxB,CAAnB,GAAsDA,CAAtD,GACM3B,CAAAqC,QAEJ,EAFqBrC,CAAAqC,QAAA,CAAiBtC,CAAAuC,UAAA,CAAgB,CAAhB,CAAmBX,CAAnB,CAAjB,CAErB,CADA5B,CACA,CADOA,CAAAuC,UAAA,CAAgBX,CAAhB,CAAwB,CAAxB,CACP,CAAA1C,CAAA,CAAQ,CAAA,CAHV,CAJF,KAUO,IAAKsD,CAAAC,KAAA,CAAoBzC,CAApB,CAAL,CAGL,IAFAmB,CAEA,CAFQnB,CAAAmB,MAAA,CAAYqB,CAAZ,CAER,CACExC,CACA;AADOA,CAAAiB,QAAA,CAAcE,CAAA,CAAM,CAAN,CAAd,CAAyB,EAAzB,CACP,CA
 AAjC,CAAA,CAAQ,CAAA,CAFV,CAHK,IAQA,IAAKwD,CAAAD,KAAA,CAA4BzC,CAA5B,CAAL,CAGL,IAFAmB,CAEA,CAFQnB,CAAAmB,MAAA,CAAYwB,CAAZ,CAER,CACE3C,CAEA,CAFOA,CAAAuC,UAAA,CAAgBpB,CAAA,CAAM,CAAN,CAAArB,OAAhB,CAEP,CADAqB,CAAA,CAAM,CAAN,CAAAF,QAAA,CAAkB0B,CAAlB,CAAkC/B,CAAlC,CACA,CAAA1B,CAAA,CAAQ,CAAA,CAHV,CAHK,IAUK0D,EAAAH,KAAA,CAAsBzC,CAAtB,CAAL,GACLmB,CADK,CACGnB,CAAAmB,MAAA,CAAY0B,CAAZ,CADH,IAIH7C,CAEA,CAFOA,CAAAuC,UAAA,CAAgBpB,CAAA,CAAM,CAAN,CAAArB,OAAhB,CAEP,CADAqB,CAAA,CAAM,CAAN,CAAAF,QAAA,CAAkB4B,CAAlB,CAAoC3C,CAApC,CACA,CAAAhB,CAAA,CAAQ,CAAA,CANL,CAUFA,EAAL,GACE0C,CAKA,CALQ5B,CAAAoC,QAAA,CAAa,GAAb,CAKR,CAHIH,CAGJ,CAHmB,CAAR,CAAAL,CAAA,CAAY5B,CAAZ,CAAmBA,CAAAuC,UAAA,CAAgB,CAAhB,CAAmBX,CAAnB,CAG9B,CAFA5B,CAEA,CAFe,CAAR,CAAA4B,CAAA,CAAY,EAAZ,CAAiB5B,CAAAuC,UAAA,CAAgBX,CAAhB,CAExB,CAAI3B,CAAAf,MAAJ,EAAmBe,CAAAf,MAAA,CAAesC,CAAA,CAAeS,CAAf,CAAf,CANrB,CAzCuD,CA+DzD,GAAKjC,CAAL,EAAaU,CAAb,CACE,KAAMoC,EAAA,CAAgB,UAAhB,CAC4C9C,CAD5C,CAAN,CAGFU,CAAA,CAAOV,CAvEM,CA2EfY,CAAA,EA/EmC,CA2IrCY,QAASA,EAAc,CAA
 CuB,CAAD,CAAQ,CAC7B,GAAI,CAACA,CAAL,CAAc,MAAO,EAIrB,KAAIC,EAAQC,CAAAC,KAAA,CAAaH,CAAb,CACRI,EAAAA,CAAcH,CAAA,CAAM,CAAN,CAClB,KAAII,EAAaJ,CAAA,CAAM,CAAN,CAEjB,IADIK,CACJ,CADcL,CAAA,CAAM,CAAN,CACd,CACEM,CAAAC,UAKA,CALoBF,CAAApC,QAAA,CAAgB,IAAhB,CAAqB,MAArB,CAKpB,CAAAoC,CAAA,CAAU,aAAA,EAAiBC,EAAjB,CACRA,CAAAE,YADQ,CACgBF,CAAAG,UAE5B,OAAON,EAAP,CAAqBE,CAArB,CAA+BD,CAlBF,CA4B/BM,QAASA,EAAc,CAACX,CAAD,CAAQ,CAC7B,MAAOA,EAAA9B,QAAA,CACG,IADH;AACS,OADT,CAAAA,QAAA,CAEG0C,CAFH,CAE4B,QAAQ,CAACZ,CAAD,CAAO,CAC9C,MAAO,IAAP,CAAcA,CAAAa,WAAA,CAAiB,CAAjB,CAAd,CAAoC,GADU,CAF3C,CAAA3C,QAAA,CAKG,IALH,CAKS,MALT,CAAAA,QAAA,CAMG,IANH,CAMS,MANT,CADsB,CAoB/B7B,QAASA,EAAkB,CAACD,CAAD,CAAM0E,CAAN,CAAmB,CAC5C,IAAIC,EAAS,CAAA,CAAb,CACIC,EAAMhF,CAAAiF,KAAA,CAAa7E,CAAb,CAAkBA,CAAA4B,KAAlB,CACV,OAAO,OACEU,QAAQ,CAACtB,CAAD,CAAMa,CAAN,CAAaV,CAAb,CAAmB,CAChCH,CAAA,CAAMpB,CAAAwB,UAAA,CAAkBJ,CAAlB,CACD2D,EAAAA,CAAL,EAAehC,CAAA,CAAgB3B,CAAhB,CAAf,GACE2D,CADF,CACW3D,CADX,CAGK2D,EAAL,EAAsC,CAAA,CAAtC,GAAeG,CAAA,CAAc9D,CAAd
 ,CAAf,GACE4D,CAAA,CAAI,GAAJ,CAcA,CAbAA,CAAA,CAAI5D,CAAJ,CAaA,CAZApB,CAAAmF,QAAA,CAAgBlD,CAAhB,CAAuB,QAAQ,CAAC+B,CAAD,CAAQoB,CAAR,CAAY,CACzC,IAAIC,EAAKrF,CAAAwB,UAAA,CAAkB4D,CAAlB,CAAT,CACIE,EAAmB,KAAnBA,GAAWlE,CAAXkE,EAAqC,KAArCA,GAA4BD,CAA5BC,EAAyD,YAAzDA,GAAgDD,CAC3B,EAAA,CAAzB,GAAIE,CAAA,CAAWF,CAAX,CAAJ,EACsB,CAAA,CADtB,GACGG,CAAA,CAASH,CAAT,CADH,EAC8B,CAAAP,CAAA,CAAad,CAAb,CAAoBsB,CAApB,CAD9B,GAEEN,CAAA,CAAI,GAAJ,CAIA,CAHAA,CAAA,CAAII,CAAJ,CAGA,CAFAJ,CAAA,CAAI,IAAJ,CAEA,CADAA,CAAA,CAAIL,CAAA,CAAeX,CAAf,CAAJ,CACA,CAAAgB,CAAA,CAAI,GAAJ,CANF,CAHyC,CAA3C,CAYA,CAAAA,CAAA,CAAIzD,CAAA,CAAQ,IAAR,CAAe,GAAnB,CAfF,CALgC,CAD7B,KAwBAqB,QAAQ,CAACxB,CAAD,CAAK,CACdA,CAAA,CAAMpB,CAAAwB,UAAA,CAAkBJ,CAAlB,CACD2D,EAAL,EAAsC,CAAA,CAAtC,GAAeG,CAAA,CAAc9D,CAAd,CAAf,GACE4D,CAAA,CAAI,IAAJ,CAEA,CADAA,CAAA,CAAI5D,CAAJ,CACA,CAAA4D,CAAA,CAAI,GAAJ,CAHF,CAKI5D,EAAJ,EAAW2D,CAAX,GACEA,CADF,CACW,CAAA,CADX,CAPc,CAxBb,OAmCE5E,QAAQ,CAACA,CAAD,CAAO,CACb4E,CAAL;AACEC,CAAA,CAAIL,CAAA,CAAexE,CAAf,CAAJ,CAFgB,CAnCjB,CAHq
 C,CA/Z9C,IAAI4D,EAAkB/D,CAAAyF,SAAA,CAAiB,WAAjB,CAAtB,CAuJI3B,EACG,4FAxJP,CAyJEF,EAAiB,2BAzJnB,CA0JEzB,EAAc,yEA1JhB,CA2JE0B,EAAmB,IA3JrB,CA4JEF,EAAyB,SA5J3B,CA6JER,EAAiB,qBA7JnB,CA8JEM,EAAiB,qBA9JnB,CA+JEL,EAAe,yBA/JjB,CAiKEwB,EAA0B,gBAjK5B,CA0KI7C,EAAetB,CAAA,CAAQ,wBAAR,CAIfiF,EAAAA,CAA8BjF,CAAA,CAAQ,gDAAR,CAC9BkF,EAAAA,CAA+BlF,CAAA,CAAQ,OAAR,CADnC,KAEIqB,EAAyB9B,CAAA4F,OAAA,CAAe,EAAf,CACeD,CADf,CAEeD,CAFf,CAF7B,CAOIjE,EAAgBzB,CAAA4F,OAAA,CAAe,EAAf,CAAmBF,CAAnB,CAAgDjF,CAAA,CAAQ,4KAAR,CAAhD,CAPpB;AAYImB,EAAiB5B,CAAA4F,OAAA,CAAe,EAAf,CAAmBD,CAAnB,CAAiDlF,CAAA,CAAQ,2JAAR,CAAjD,CAZrB,CAkBIsC,EAAkBtC,CAAA,CAAQ,cAAR,CAlBtB,CAoBIyE,EAAgBlF,CAAA4F,OAAA,CAAe,EAAf,CACe7D,CADf,CAEeN,CAFf,CAGeG,CAHf,CAIeE,CAJf,CApBpB,CA2BI0D,EAAW/E,CAAA,CAAQ,0CAAR,CA3Bf,CA4BI8E,EAAavF,CAAA4F,OAAA,CAAe,EAAf,CAAmBJ,CAAnB,CAA6B/E,CAAA,CAC1C,oSAD0C,CAA7B,CA5BjB;AA0LI8D,EAAUsB,QAAAC,cAAA,CAAuB,KAAvB,CA1Ld,CA2LI5B,EAAU,wBAsGdlE,EAAA+F,OAAA,CAAe,YAAf,CAA6B,EAA7B,CAAAC,SAAA,CAA0C,WAA1C,CA7UAC,QAA0B,EAAG,CAC3B,IAAAC,K
 AAA,CAAY,CAAC,eAAD,CAAkB,QAAQ,CAACC,CAAD,CAAgB,CACpD,MAAO,SAAQ,CAAClF,CAAD,CAAO,CACpB,IAAIb,EAAM,EACVY,EAAA,CAAWC,CAAX,CAAiBZ,CAAA,CAAmBD,CAAnB,CAAwB,QAAQ,CAACgG,CAAD,CAAMd,CAAN,CAAe,CAC9D,MAAO,CAAC,SAAA5B,KAAA,CAAeyC,CAAA,CAAcC,CAAd,CAAmBd,CAAnB,CAAf,CADsD,CAA/C,CAAjB,CAGA,OAAOlF,EAAAI,KAAA,CAAS,EAAT,CALa,CAD8B,CAA1C,CADe,CA6U7B,CAsGAR,EAAA+F,OAAA,CAAe,YAAf,CAAAM,OAAA,CAAoC,OAApC,CAA6C,CAAC,WAAD,CAAc,QAAQ,CAACC,CAAD,CAAY,CAAA,IACzEC,EACE,mEAFuE,CAGzEC,EAAgB,UAEpB,OAAO,SAAQ,CAACtD,CAAD,CAAOuD,CAAP,CAAe,CAoB5BC,QAASA,EAAO,CAACxD,CAAD,CAAO,CAChBA,CAAL,EAGAjC,CAAAe,KAAA,CAAU9B,CAAA,CAAagD,CAAb,CAAV,CAJqB,CAOvByD,QAASA,EAAO,CAACC,CAAD,CAAM1D,CAAN,CAAY,CAC1BjC,CAAAe,KAAA,CAAU,KAAV,CACIhC,EAAA6G,UAAA,CAAkBJ,CAAlB,CAAJ;CACExF,CAAAe,KAAA,CAAU,UAAV,CAEA,CADAf,CAAAe,KAAA,CAAUyE,CAAV,CACA,CAAAxF,CAAAe,KAAA,CAAU,IAAV,CAHF,CAKAf,EAAAe,KAAA,CAAU,QAAV,CACAf,EAAAe,KAAA,CAAU4E,CAAV,CACA3F,EAAAe,KAAA,CAAU,IAAV,CACA0E,EAAA,CAAQxD,CAAR,CACAjC,EAAAe,KAAA,CAAU,MAAV,CAX0B,CA1B5B,GAAI,CAACkB,CAAL,CAAW,MAAO
 A,EAMlB,KALA,IAAId,CAAJ,CACI0E,EAAM5D,CADV,CAEIjC,EAAO,EAFX,CAGI2F,CAHJ,CAII9F,CACJ,CAAQsB,CAAR,CAAgB0E,CAAA1E,MAAA,CAAUmE,CAAV,CAAhB,CAAA,CAEEK,CAMA,CANMxE,CAAA,CAAM,CAAN,CAMN,CAJIA,CAAA,CAAM,CAAN,CAIJ,EAJgBA,CAAA,CAAM,CAAN,CAIhB,GAJ0BwE,CAI1B,CAJgC,SAIhC,CAJ4CA,CAI5C,EAHA9F,CAGA,CAHIsB,CAAAS,MAGJ,CAFA6D,CAAA,CAAQI,CAAAC,OAAA,CAAW,CAAX,CAAcjG,CAAd,CAAR,CAEA,CADA6F,CAAA,CAAQC,CAAR,CAAaxE,CAAA,CAAM,CAAN,CAAAF,QAAA,CAAiBsE,CAAjB,CAAgC,EAAhC,CAAb,CACA,CAAAM,CAAA,CAAMA,CAAAtD,UAAA,CAAc1C,CAAd,CAAkBsB,CAAA,CAAM,CAAN,CAAArB,OAAlB,CAER2F,EAAA,CAAQI,CAAR,CACA,OAAOR,EAAA,CAAUrF,CAAAT,KAAA,CAAU,EAAV,CAAV,CAlBqB,CAL+C,CAAlC,CAA7C,CAvjBsC,CAArC,CAAA,CAwmBET,MAxmBF,CAwmBUA,MAAAC,QAxmBV;",
+"sources":["angular-sanitize.js"],
+"names":["window","angular","undefined","sanitizeText","chars","buf","htmlSanitizeWriter","writer","noop","join","makeMap","str","obj","items","split","i","length","htmlParser","html","handler","parseStartTag","tag","tagName","rest","unary","lowercase","blockElements","stack","last","inlineElements","parseEndTag","optionalEndTagElements","voidElements","push","attrs","replace","ATTR_REGEXP","match","name","doubleQuotedValue","singleQuotedValue","unquotedValue","decodeEntities","start","pos","end","index","stack.last","specialElements","RegExp","all","text","COMMENT_REGEXP","CDATA_REGEXP","indexOf","lastIndexOf","comment","substring","DOCTYPE_REGEXP","test","BEGING_END_TAGE_REGEXP","END_TAG_REGEXP","BEGIN_TAG_REGEXP","START_TAG_REGEXP","$sanitizeMinErr","value","parts","spaceRe","exec","spaceBefore","spaceAfter","content","hiddenPre","innerHTML","textContent","innerText","encodeEntities","NON_ALPHANUMERIC_REGEXP","charCodeAt","uriValidator","ignore","out","bind","validElements","forE
 ach","key","lkey","isImage","validAttrs","uriAttrs","$$minErr","optionalEndTagBlockElements","optionalEndTagInlineElements","extend","document","createElement","module","provider","$SanitizeProvider","$get","$$sanitizeUri","uri","filter","$sanitize","LINKY_URL_REGEXP","MAILTO_REGEXP","target","addText","addLink","url","isDefined","raw","substr"]
+}


[37/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/lib/jquery-1.7.2.min.js
----------------------------------------------------------------------
diff --git a/portal/js/lib/jquery-1.7.2.min.js b/portal/js/lib/jquery-1.7.2.min.js
deleted file mode 100644
index 16ad06c..0000000
--- a/portal/js/lib/jquery-1.7.2.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery v1.7.2 jquery.com | jquery.org/license */
-(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;
 g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&f.type(b)==="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);e
 lse d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0;return d+"px"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d
 =parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaul
 tSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typ
 eof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c
 =a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;r
 eturn this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==nu
 ll?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),t
 ypeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready
 );var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:functio
 n(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[
 ];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f
 .concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h,i){var j,k=d==null,l=0,m=a.length;if(d&&typeof d=="object"){for(l in d)e.access(a,c,l,d[l],1,h,f);g=1}else if(f!==b){j=i===b&&e.isFunction(f),k&&(j?(j=c,c=function(a,b,c){return j.call(e(a),c)}):(c.call(a,f),c=null));if(c)for(;l<m;l++)c(a[l],d,j?f.call(a[l],l,c(a[l],d)):f,i);g=1}return g?a:k?c.call(a):m?c(a[0],d):h},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date 
 RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m,n=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?n(g):h==="function"&&(!a.unique||!p.has(g))&&c.push(g)},o=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,j=!0,m=k||0,k=0,l=c.length;for(;c&&m<l;m++)if(c[m].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}j=!1,c&&(a.once?e===!0?p.disable():c=[]:d&&d.length&&(e=d.shift(),p.fireWith(e[0],e[1])))},p={add:function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],
 e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){j&&f<=l&&(l--,f<=m&&m--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&p.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(j?a.once||d.push([b,c]):(!a.once||!e)&&o(b,c));return this},fire:function(){p.fireWith(this,arguments);return this},fired:function(){return!!i}};return p};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);re
 turn this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f
 .isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p=c.createElement("div"),q=c.documentElement;p.setAttribute("className","t"),p.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.va
 lue==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecke
 d=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="<div "+n+"display:block;'><div style='"+t+"0;display:block;overflow:hidden;'></div></div>"+"<table "+n+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="<table><tr><td style='"+t+"0;display:none'></td><td>t</td></tr></table>",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="no
 ne",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="<div style='width:5px;'></div>",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position=
 "relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[
 n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h,i,j=this[0],k=0,m=null;if(a===b){if(this.length){m=f.data(j);if(j.nodeType===1&&!f._data(
 j,"parsedAttrs")){g=j.attributes;for(i=g.length;k<i;k++)h=g[k].name,h.indexOf("data-")===0&&(h=f.camelCase(h.substring(5)),l(j,h,m[h]));f._data(j,"parsedAttrs",!0)}}return m}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!";return f.access(this,function(c){if(c===b){m=this.triggerHandler("getData"+e,[d[0]]),m===b&&j&&(m=f.data(j,a),m=l(j,a,m));return m===b&&d[1]?this.data(d[0]):m}d[1]=c,this.each(function(){var b=f(this);b.triggerHandler("setData"+e,d),f.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f
 ._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length<d)return f.queue(this[0],a);return c===b?this:this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=th
 is,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise(c)}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,f.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof
  a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeCla
 ss"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a
 .attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);r
 eturn}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i<g;i++)e=d[i],e&&(c=f.propFix[e]||e,h=u.test(e),h||f.attr(a,e,""),a.removeAttribute(v?e:c),h&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowsp
 an:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0,coords:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b}
 ,set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["r
 adio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(
-a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.gui
 d,selector:g,quick:g&&G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remov
 e.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=
 f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.na
 mespace,i=f.event.special[c.type]||{},j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(!i.preDispatch||i.preDispatch.call(this,c)!==!1){if(e&&(!c.button||c.type!=="click")){n=f(this),n.context=this.ownerDocument||this;for(m=c.target;m!=this;m=m.parentNode||this)if(m.disabled!==!0){p={},r=[],n[0]=m;for(k=0;k<e;k++)s=d[k],t=s.selector,p[t]===b&&(p[t]=s.quick?H(m,s.quick):n.is(t)),p[t]&&r.push(s);r.length&&j.push({elem:m,matches:r})}}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){q=j[k],c.currentTarget=q.elem;for(l=0;l<q.matches.length&&!c.isImmediatePropagationStopped();l++){s=q.matches[l];if(h||!c.namespace&&!s.namespace||c.namespace_re&&c.namespace_re.test(s.namespace))c.data=s.data,c.handleObj=s,o=((f.event.special[s.origType]||{}).handle||s.handler).apply(q.elem,g),o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()))}}i.postDispatch&&i.postDispatch.call(this,c);return c.result}},props:"attrChange attr
 Name relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.prop
 s?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.
 type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.
 type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),d._submit_attached=!0)})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("ch
 ange",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e=
 =null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:funct
 ion(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.tes
 t(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,
 l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[
 t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFi
 lter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9||d===11){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]
 |\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode=
 ==b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG
 :function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.
 parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a)
 {var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nod
 eType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p
 =o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,
 e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElemen
 t("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]
 );if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}
 }(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.select
 ors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.globalPOS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.c
 ontext).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({p
 arent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P
 .call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")[\\s/>]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^
 \s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChi
 ld;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f
-.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;
 if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(f.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(g){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(functi
 on(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,function(a,b){b.src?f.ajax({type:"GET",global:!1,url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h))
 ,e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.
 createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1></$2>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]==="<table>"&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;
 i<u;i++)bn(l[i]);else bn(l);l.nodeType?j.push(l):j=f.merge(j,l)}if(d){g=function(a){return!a.type||be.test(a.type)};for(k=0;j[k];k++){h=j[k];if(e&&f.nodeName(h,"script")&&(!h.type||be.test(h.type)))e.push(h.parentNode?h.parentNode.removeChild(h):h);else{if(h.nodeType===1){var v=f.grep(h.getElementsByTagName("script"),g);j.splice.apply(j,[k+1,0].concat(v))}d.appendChild(h)}}}return j},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bp=/alpha\([^)]*\)/i,bq=/opacity=([^)]*)/,br=/([A-Z]|^ms)/g,bs=/^[\-+]?(?:\d*\.)?\d+$/i,bt=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,bu=/^([\-+])=([\-+.\de]+)/,bv=/^margin/,bw={position:"absolute",vi
 sibility:"hidden",display:"block"},bx=["Top","Right","Bottom","Left"],by,bz,bA;f.fn.css=function(a,c){return f.access(this,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)},a,c,arguments.length>1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f
 .cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f
 ===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.su
 pport.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:f
 unction(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.e
 ach("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},
 ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if
 (!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.
 toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d
 .async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.json
 p!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||
 /loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{i
 f(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),(e===""&&f.
 css(d,"display")==="none"||!f.contains(d.ownerDocument.documentElement,d))&&f._data(d,"olddisplay",cu(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(ct("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(ct("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark
 (this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o,p,q;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]);if((k=f.cssHooks[g])&&"expand"in k){l=k.expand(a[g]),delete a[g];for(i in l)i in a||(a[i]=l[i])}}for(g in a){h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cu(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cm.test(h)?(q=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),q?(f._data(this,"toggle"+i,q==="show"?"hide":"show"
 ),j[q]()):j[h]()):(m=cn.exec(h),n=j.cur(),m?(o=parseFloat(m[2]),p=m[3]||(f.cssNumber[i]?"":"px"),p!=="px"&&(f.style(this,i,(o||1)+p),n=(o||1)/j.cur()*n,f.style(this,i,n+p)),m[1]&&(o=(m[1]==="-="?-1:1)*o+n),j.custom(n,o,p)):j.custom(n,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:ct("show",1),slideUp:ct("hide",1),slideToggle:ct("toggle",1),fadeIn:{
 opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a){return a},swing:function(a){return-Math.cos(a*Math.PI)/2+.5}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=nul
 l&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cq||cr(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){f._data(e.elem,"fxshow"+e.prop)===b&&(e.options.hide?f._data(e.elem,"fxshow"+e.prop,e.start):e.options.show&&f._data(e.elem,"fxshow"+e.prop,e.end))},h()&&f.timers.push(h)&&!co&&(co=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function()

<TRUNCATED>

[25/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.0.5/angular.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.0.5/angular.js b/portal/js/libs/angular-1.0.5/angular.js
new file mode 100644
index 0000000..68b33c7
--- /dev/null
+++ b/portal/js/libs/angular-1.0.5/angular.js
@@ -0,0 +1,14733 @@
+/**
+ * @license AngularJS v1.0.5
+ * (c) 2010-2012 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, document, undefined) {
+'use strict';
+
+////////////////////////////////////
+
+/**
+ * @ngdoc function
+ * @name angular.lowercase
+ * @function
+ *
+ * @description Converts the specified string to lowercase.
+ * @param {string} string String to be converted to lowercase.
+ * @returns {string} Lowercased string.
+ */
+var lowercase = function(string){return isString(string) ? string.toLowerCase() : string;};
+
+
+/**
+ * @ngdoc function
+ * @name angular.uppercase
+ * @function
+ *
+ * @description Converts the specified string to uppercase.
+ * @param {string} string String to be converted to uppercase.
+ * @returns {string} Uppercased string.
+ */
+var uppercase = function(string){return isString(string) ? string.toUpperCase() : string;};
+
+
+var manualLowercase = function(s) {
+  return isString(s)
+      ? s.replace(/[A-Z]/g, function(ch) {return fromCharCode(ch.charCodeAt(0) | 32);})
+      : s;
+};
+var manualUppercase = function(s) {
+  return isString(s)
+      ? s.replace(/[a-z]/g, function(ch) {return fromCharCode(ch.charCodeAt(0) & ~32);})
+      : s;
+};
+
+
+// String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish
+// locale, for this reason we need to detect this case and redefine lowercase/uppercase methods
+// with correct but slower alternatives.
+if ('i' !== 'I'.toLowerCase()) {
+  lowercase = manualLowercase;
+  uppercase = manualUppercase;
+}
+
+function fromCharCode(code) {return String.fromCharCode(code);}
+
+
+var /** holds major version number for IE or NaN for real browsers */
+    msie              = int((/msie (\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]),
+    jqLite,           // delay binding since jQuery could be loaded after us.
+    jQuery,           // delay binding
+    slice             = [].slice,
+    push              = [].push,
+    toString          = Object.prototype.toString,
+
+    /** @name angular */
+    angular           = window.angular || (window.angular = {}),
+    angularModule,
+    nodeName_,
+    uid               = ['0', '0', '0'];
+
+/**
+ * @ngdoc function
+ * @name angular.forEach
+ * @function
+ *
+ * @description
+ * Invokes the `iterator` function once for each item in `obj` collection, which can be either an
+ * object or an array. The `iterator` function is invoked with `iterator(value, key)`, where `value`
+ * is the value of an object property or an array element and `key` is the object property key or
+ * array element index. Specifying a `context` for the function is optional.
+ *
+ * Note: this function was previously known as `angular.foreach`.
+ *
+   <pre>
+     var values = {name: 'misko', gender: 'male'};
+     var log = [];
+     angular.forEach(values, function(value, key){
+       this.push(key + ': ' + value);
+     }, log);
+     expect(log).toEqual(['name: misko', 'gender:male']);
+   </pre>
+ *
+ * @param {Object|Array} obj Object to iterate over.
+ * @param {Function} iterator Iterator function.
+ * @param {Object=} context Object to become context (`this`) for the iterator function.
+ * @returns {Object|Array} Reference to `obj`.
+ */
+
+
+/**
+ * @private
+ * @param {*} obj
+ * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments, ...)
+ */
+function isArrayLike(obj) {
+  if (!obj || (typeof obj.length !== 'number')) return false;
+
+  // We have on object which has length property. Should we treat it as array?
+  if (typeof obj.hasOwnProperty != 'function' &&
+      typeof obj.constructor != 'function') {
+    // This is here for IE8: it is a bogus object treat it as array;
+    return true;
+  } else  {
+    return obj instanceof JQLite ||                      // JQLite
+           (jQuery && obj instanceof jQuery) ||          // jQuery
+           toString.call(obj) !== '[object Object]' ||   // some browser native object
+           typeof obj.callee === 'function';              // arguments (on IE8 looks like regular obj)
+  }
+}
+
+
+function forEach(obj, iterator, context) {
+  var key;
+  if (obj) {
+    if (isFunction(obj)){
+      for (key in obj) {
+        if (key != 'prototype' && key != 'length' && key != 'name' && obj.hasOwnProperty(key)) {
+          iterator.call(context, obj[key], key);
+        }
+      }
+    } else if (obj.forEach && obj.forEach !== forEach) {
+      obj.forEach(iterator, context);
+    } else if (isArrayLike(obj)) {
+      for (key = 0; key < obj.length; key++)
+        iterator.call(context, obj[key], key);
+    } else {
+      for (key in obj) {
+        if (obj.hasOwnProperty(key)) {
+          iterator.call(context, obj[key], key);
+        }
+      }
+    }
+  }
+  return obj;
+}
+
+function sortedKeys(obj) {
+  var keys = [];
+  for (var key in obj) {
+    if (obj.hasOwnProperty(key)) {
+      keys.push(key);
+    }
+  }
+  return keys.sort();
+}
+
+function forEachSorted(obj, iterator, context) {
+  var keys = sortedKeys(obj);
+  for ( var i = 0; i < keys.length; i++) {
+    iterator.call(context, obj[keys[i]], keys[i]);
+  }
+  return keys;
+}
+
+
+/**
+ * when using forEach the params are value, key, but it is often useful to have key, value.
+ * @param {function(string, *)} iteratorFn
+ * @returns {function(*, string)}
+ */
+function reverseParams(iteratorFn) {
+  return function(value, key) { iteratorFn(key, value) };
+}
+
+/**
+ * A consistent way of creating unique IDs in angular. The ID is a sequence of alpha numeric
+ * characters such as '012ABC'. The reason why we are not using simply a number counter is that
+ * the number string gets longer over time, and it can also overflow, where as the nextId
+ * will grow much slower, it is a string, and it will never overflow.
+ *
+ * @returns an unique alpha-numeric string
+ */
+function nextUid() {
+  var index = uid.length;
+  var digit;
+
+  while(index) {
+    index--;
+    digit = uid[index].charCodeAt(0);
+    if (digit == 57 /*'9'*/) {
+      uid[index] = 'A';
+      return uid.join('');
+    }
+    if (digit == 90  /*'Z'*/) {
+      uid[index] = '0';
+    } else {
+      uid[index] = String.fromCharCode(digit + 1);
+      return uid.join('');
+    }
+  }
+  uid.unshift('0');
+  return uid.join('');
+}
+
+/**
+ * @ngdoc function
+ * @name angular.extend
+ * @function
+ *
+ * @description
+ * Extends the destination object `dst` by copying all of the properties from the `src` object(s)
+ * to `dst`. You can specify multiple `src` objects.
+ *
+ * @param {Object} dst Destination object.
+ * @param {...Object} src Source object(s).
+ */
+function extend(dst) {
+  forEach(arguments, function(obj){
+    if (obj !== dst) {
+      forEach(obj, function(value, key){
+        dst[key] = value;
+      });
+    }
+  });
+  return dst;
+}
+
+function int(str) {
+  return parseInt(str, 10);
+}
+
+
+function inherit(parent, extra) {
+  return extend(new (extend(function() {}, {prototype:parent}))(), extra);
+}
+
+
+/**
+ * @ngdoc function
+ * @name angular.noop
+ * @function
+ *
+ * @description
+ * A function that performs no operations. This function can be useful when writing code in the
+ * functional style.
+   <pre>
+     function foo(callback) {
+       var result = calculateResult();
+       (callback || angular.noop)(result);
+     }
+   </pre>
+ */
+function noop() {}
+noop.$inject = [];
+
+
+/**
+ * @ngdoc function
+ * @name angular.identity
+ * @function
+ *
+ * @description
+ * A function that returns its first argument. This function is useful when writing code in the
+ * functional style.
+ *
+   <pre>
+     function transformer(transformationFn, value) {
+       return (transformationFn || identity)(value);
+     };
+   </pre>
+ */
+function identity($) {return $;}
+identity.$inject = [];
+
+
+function valueFn(value) {return function() {return value;};}
+
+/**
+ * @ngdoc function
+ * @name angular.isUndefined
+ * @function
+ *
+ * @description
+ * Determines if a reference is undefined.
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is undefined.
+ */
+function isUndefined(value){return typeof value == 'undefined';}
+
+
+/**
+ * @ngdoc function
+ * @name angular.isDefined
+ * @function
+ *
+ * @description
+ * Determines if a reference is defined.
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is defined.
+ */
+function isDefined(value){return typeof value != 'undefined';}
+
+
+/**
+ * @ngdoc function
+ * @name angular.isObject
+ * @function
+ *
+ * @description
+ * Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not
+ * considered to be objects.
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is an `Object` but not `null`.
+ */
+function isObject(value){return value != null && typeof value == 'object';}
+
+
+/**
+ * @ngdoc function
+ * @name angular.isString
+ * @function
+ *
+ * @description
+ * Determines if a reference is a `String`.
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is a `String`.
+ */
+function isString(value){return typeof value == 'string';}
+
+
+/**
+ * @ngdoc function
+ * @name angular.isNumber
+ * @function
+ *
+ * @description
+ * Determines if a reference is a `Number`.
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is a `Number`.
+ */
+function isNumber(value){return typeof value == 'number';}
+
+
+/**
+ * @ngdoc function
+ * @name angular.isDate
+ * @function
+ *
+ * @description
+ * Determines if a value is a date.
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is a `Date`.
+ */
+function isDate(value){
+  return toString.apply(value) == '[object Date]';
+}
+
+
+/**
+ * @ngdoc function
+ * @name angular.isArray
+ * @function
+ *
+ * @description
+ * Determines if a reference is an `Array`.
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is an `Array`.
+ */
+function isArray(value) {
+  return toString.apply(value) == '[object Array]';
+}
+
+
+/**
+ * @ngdoc function
+ * @name angular.isFunction
+ * @function
+ *
+ * @description
+ * Determines if a reference is a `Function`.
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is a `Function`.
+ */
+function isFunction(value){return typeof value == 'function';}
+
+
+/**
+ * Checks if `obj` is a window object.
+ *
+ * @private
+ * @param {*} obj Object to check
+ * @returns {boolean} True if `obj` is a window obj.
+ */
+function isWindow(obj) {
+  return obj && obj.document && obj.location && obj.alert && obj.setInterval;
+}
+
+
+function isScope(obj) {
+  return obj && obj.$evalAsync && obj.$watch;
+}
+
+
+function isFile(obj) {
+  return toString.apply(obj) === '[object File]';
+}
+
+
+function isBoolean(value) {
+  return typeof value == 'boolean';
+}
+
+
+function trim(value) {
+  return isString(value) ? value.replace(/^\s*/, '').replace(/\s*$/, '') : value;
+}
+
+/**
+ * @ngdoc function
+ * @name angular.isElement
+ * @function
+ *
+ * @description
+ * Determines if a reference is a DOM element (or wrapped jQuery element).
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is a DOM element (or wrapped jQuery element).
+ */
+function isElement(node) {
+  return node &&
+    (node.nodeName  // we are a direct element
+    || (node.bind && node.find));  // we have a bind and find method part of jQuery API
+}
+
+/**
+ * @param str 'key1,key2,...'
+ * @returns {object} in the form of {key1:true, key2:true, ...}
+ */
+function makeMap(str){
+  var obj = {}, items = str.split(","), i;
+  for ( i = 0; i < items.length; i++ )
+    obj[ items[i] ] = true;
+  return obj;
+}
+
+
+if (msie < 9) {
+  nodeName_ = function(element) {
+    element = element.nodeName ? element : element[0];
+    return (element.scopeName && element.scopeName != 'HTML')
+      ? uppercase(element.scopeName + ':' + element.nodeName) : element.nodeName;
+  };
+} else {
+  nodeName_ = function(element) {
+    return element.nodeName ? element.nodeName : element[0].nodeName;
+  };
+}
+
+
+function map(obj, iterator, context) {
+  var results = [];
+  forEach(obj, function(value, index, list) {
+    results.push(iterator.call(context, value, index, list));
+  });
+  return results;
+}
+
+
+/**
+ * @description
+ * Determines the number of elements in an array, the number of properties an object has, or
+ * the length of a string.
+ *
+ * Note: This function is used to augment the Object type in Angular expressions. See
+ * {@link angular.Object} for more information about Angular arrays.
+ *
+ * @param {Object|Array|string} obj Object, array, or string to inspect.
+ * @param {boolean} [ownPropsOnly=false] Count only "own" properties in an object
+ * @returns {number} The size of `obj` or `0` if `obj` is neither an object nor an array.
+ */
+function size(obj, ownPropsOnly) {
+  var size = 0, key;
+
+  if (isArray(obj) || isString(obj)) {
+    return obj.length;
+  } else if (isObject(obj)){
+    for (key in obj)
+      if (!ownPropsOnly || obj.hasOwnProperty(key))
+        size++;
+  }
+
+  return size;
+}
+
+
+function includes(array, obj) {
+  return indexOf(array, obj) != -1;
+}
+
+function indexOf(array, obj) {
+  if (array.indexOf) return array.indexOf(obj);
+
+  for ( var i = 0; i < array.length; i++) {
+    if (obj === array[i]) return i;
+  }
+  return -1;
+}
+
+function arrayRemove(array, value) {
+  var index = indexOf(array, value);
+  if (index >=0)
+    array.splice(index, 1);
+  return value;
+}
+
+function isLeafNode (node) {
+  if (node) {
+    switch (node.nodeName) {
+    case "OPTION":
+    case "PRE":
+    case "TITLE":
+      return true;
+    }
+  }
+  return false;
+}
+
+/**
+ * @ngdoc function
+ * @name angular.copy
+ * @function
+ *
+ * @description
+ * Creates a deep copy of `source`, which should be an object or an array.
+ *
+ * * If no destination is supplied, a copy of the object or array is created.
+ * * If a destination is provided, all of its elements (for array) or properties (for objects)
+ *   are deleted and then all elements/properties from the source are copied to it.
+ * * If  `source` is not an object or array, `source` is returned.
+ *
+ * Note: this function is used to augment the Object type in Angular expressions. See
+ * {@link ng.$filter} for more information about Angular arrays.
+ *
+ * @param {*} source The source that will be used to make a copy.
+ *                   Can be any type, including primitives, `null`, and `undefined`.
+ * @param {(Object|Array)=} destination Destination into which the source is copied. If
+ *     provided, must be of the same type as `source`.
+ * @returns {*} The copy or updated `destination`, if `destination` was specified.
+ */
+function copy(source, destination){
+  if (isWindow(source) || isScope(source)) throw Error("Can't copy Window or Scope");
+  if (!destination) {
+    destination = source;
+    if (source) {
+      if (isArray(source)) {
+        destination = copy(source, []);
+      } else if (isDate(source)) {
+        destination = new Date(source.getTime());
+      } else if (isObject(source)) {
+        destination = copy(source, {});
+      }
+    }
+  } else {
+    if (source === destination) throw Error("Can't copy equivalent objects or arrays");
+    if (isArray(source)) {
+      destination.length = 0;
+      for ( var i = 0; i < source.length; i++) {
+        destination.push(copy(source[i]));
+      }
+    } else {
+      forEach(destination, function(value, key){
+        delete destination[key];
+      });
+      for ( var key in source) {
+        destination[key] = copy(source[key]);
+      }
+    }
+  }
+  return destination;
+}
+
+/**
+ * Create a shallow copy of an object
+ */
+function shallowCopy(src, dst) {
+  dst = dst || {};
+
+  for(var key in src) {
+    if (src.hasOwnProperty(key) && key.substr(0, 2) !== '$$') {
+      dst[key] = src[key];
+    }
+  }
+
+  return dst;
+}
+
+
+/**
+ * @ngdoc function
+ * @name angular.equals
+ * @function
+ *
+ * @description
+ * Determines if two objects or two values are equivalent. Supports value types, arrays and
+ * objects.
+ *
+ * Two objects or values are considered equivalent if at least one of the following is true:
+ *
+ * * Both objects or values pass `===` comparison.
+ * * Both objects or values are of the same type and all of their properties pass `===` comparison.
+ * * Both values are NaN. (In JavasScript, NaN == NaN => false. But we consider two NaN as equal)
+ *
+ * During a property comparision, properties of `function` type and properties with names
+ * that begin with `$` are ignored.
+ *
+ * Scope and DOMWindow objects are being compared only be identify (`===`).
+ *
+ * @param {*} o1 Object or value to compare.
+ * @param {*} o2 Object or value to compare.
+ * @returns {boolean} True if arguments are equal.
+ */
+function equals(o1, o2) {
+  if (o1 === o2) return true;
+  if (o1 === null || o2 === null) return false;
+  if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN
+  var t1 = typeof o1, t2 = typeof o2, length, key, keySet;
+  if (t1 == t2) {
+    if (t1 == 'object') {
+      if (isArray(o1)) {
+        if ((length = o1.length) == o2.length) {
+          for(key=0; key<length; key++) {
+            if (!equals(o1[key], o2[key])) return false;
+          }
+          return true;
+        }
+      } else if (isDate(o1)) {
+        return isDate(o2) && o1.getTime() == o2.getTime();
+      } else {
+        if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2)) return false;
+        keySet = {};
+        for(key in o1) {
+          if (key.charAt(0) === '$' || isFunction(o1[key])) continue;
+          if (!equals(o1[key], o2[key])) return false;
+          keySet[key] = true;
+        }
+        for(key in o2) {
+          if (!keySet[key] &&
+              key.charAt(0) !== '$' &&
+              o2[key] !== undefined &&
+              !isFunction(o2[key])) return false;
+        }
+        return true;
+      }
+    }
+  }
+  return false;
+}
+
+
+function concat(array1, array2, index) {
+  return array1.concat(slice.call(array2, index));
+}
+
+function sliceArgs(args, startIndex) {
+  return slice.call(args, startIndex || 0);
+}
+
+
+/**
+ * @ngdoc function
+ * @name angular.bind
+ * @function
+ *
+ * @description
+ * Returns a function which calls function `fn` bound to `self` (`self` becomes the `this` for
+ * `fn`). You can supply optional `args` that are are prebound to the function. This feature is also
+ * known as [function currying](http://en.wikipedia.org/wiki/Currying).
+ *
+ * @param {Object} self Context which `fn` should be evaluated in.
+ * @param {function()} fn Function to be bound.
+ * @param {...*} args Optional arguments to be prebound to the `fn` function call.
+ * @returns {function()} Function that wraps the `fn` with all the specified bindings.
+ */
+function bind(self, fn) {
+  var curryArgs = arguments.length > 2 ? sliceArgs(arguments, 2) : [];
+  if (isFunction(fn) && !(fn instanceof RegExp)) {
+    return curryArgs.length
+      ? function() {
+          return arguments.length
+            ? fn.apply(self, curryArgs.concat(slice.call(arguments, 0)))
+            : fn.apply(self, curryArgs);
+        }
+      : function() {
+          return arguments.length
+            ? fn.apply(self, arguments)
+            : fn.call(self);
+        };
+  } else {
+    // in IE, native methods are not functions so they cannot be bound (note: they don't need to be)
+    return fn;
+  }
+}
+
+
+function toJsonReplacer(key, value) {
+  var val = value;
+
+  if (/^\$+/.test(key)) {
+    val = undefined;
+  } else if (isWindow(value)) {
+    val = '$WINDOW';
+  } else if (value &&  document === value) {
+    val = '$DOCUMENT';
+  } else if (isScope(value)) {
+    val = '$SCOPE';
+  }
+
+  return val;
+}
+
+
+/**
+ * @ngdoc function
+ * @name angular.toJson
+ * @function
+ *
+ * @description
+ * Serializes input into a JSON-formatted string.
+ *
+ * @param {Object|Array|Date|string|number} obj Input to be serialized into JSON.
+ * @param {boolean=} pretty If set to true, the JSON output will contain newlines and whitespace.
+ * @returns {string} Jsonified string representing `obj`.
+ */
+function toJson(obj, pretty) {
+  return JSON.stringify(obj, toJsonReplacer, pretty ? '  ' : null);
+}
+
+
+/**
+ * @ngdoc function
+ * @name angular.fromJson
+ * @function
+ *
+ * @description
+ * Deserializes a JSON string.
+ *
+ * @param {string} json JSON string to deserialize.
+ * @returns {Object|Array|Date|string|number} Deserialized thingy.
+ */
+function fromJson(json) {
+  return isString(json)
+      ? JSON.parse(json)
+      : json;
+}
+
+
+function toBoolean(value) {
+  if (value && value.length !== 0) {
+    var v = lowercase("" + value);
+    value = !(v == 'f' || v == '0' || v == 'false' || v == 'no' || v == 'n' || v == '[]');
+  } else {
+    value = false;
+  }
+  return value;
+}
+
+/**
+ * @returns {string} Returns the string representation of the element.
+ */
+function startingTag(element) {
+  element = jqLite(element).clone();
+  try {
+    // turns out IE does not let you set .html() on elements which
+    // are not allowed to have children. So we just ignore it.
+    element.html('');
+  } catch(e) {}
+  // As Per DOM Standards
+  var TEXT_NODE = 3;
+  var elemHtml = jqLite('<div>').append(element).html();
+  try {
+    return element[0].nodeType === TEXT_NODE ? lowercase(elemHtml) :
+        elemHtml.
+          match(/^(<[^>]+>)/)[1].
+          replace(/^<([\w\-]+)/, function(match, nodeName) { return '<' + lowercase(nodeName); });
+  } catch(e) {
+    return lowercase(elemHtml);
+  }
+
+}
+
+
+/////////////////////////////////////////////////
+
+/**
+ * Parses an escaped url query string into key-value pairs.
+ * @returns Object.<(string|boolean)>
+ */
+function parseKeyValue(/**string*/keyValue) {
+  var obj = {}, key_value, key;
+  forEach((keyValue || "").split('&'), function(keyValue){
+    if (keyValue) {
+      key_value = keyValue.split('=');
+      key = decodeURIComponent(key_value[0]);
+      obj[key] = isDefined(key_value[1]) ? decodeURIComponent(key_value[1]) : true;
+    }
+  });
+  return obj;
+}
+
+function toKeyValue(obj) {
+  var parts = [];
+  forEach(obj, function(value, key) {
+    parts.push(encodeUriQuery(key, true) + (value === true ? '' : '=' + encodeUriQuery(value, true)));
+  });
+  return parts.length ? parts.join('&') : '';
+}
+
+
+/**
+ * We need our custom method because encodeURIComponent is too agressive and doesn't follow
+ * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path
+ * segments:
+ *    segment       = *pchar
+ *    pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
+ *    pct-encoded   = "%" HEXDIG HEXDIG
+ *    unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
+ *    sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
+ *                     / "*" / "+" / "," / ";" / "="
+ */
+function encodeUriSegment(val) {
+  return encodeUriQuery(val, true).
+             replace(/%26/gi, '&').
+             replace(/%3D/gi, '=').
+             replace(/%2B/gi, '+');
+}
+
+
+/**
+ * This method is intended for encoding *key* or *value* parts of query component. We need a custom
+ * method becuase encodeURIComponent is too agressive and encodes stuff that doesn't have to be
+ * encoded per http://tools.ietf.org/html/rfc3986:
+ *    query       = *( pchar / "/" / "?" )
+ *    pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
+ *    unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
+ *    pct-encoded   = "%" HEXDIG HEXDIG
+ *    sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
+ *                     / "*" / "+" / "," / ";" / "="
+ */
+function encodeUriQuery(val, pctEncodeSpaces) {
+  return encodeURIComponent(val).
+             replace(/%40/gi, '@').
+             replace(/%3A/gi, ':').
+             replace(/%24/g, '$').
+             replace(/%2C/gi, ',').
+             replace((pctEncodeSpaces ? null : /%20/g), '+');
+}
+
+
+/**
+ * @ngdoc directive
+ * @name ng.directive:ngApp
+ *
+ * @element ANY
+ * @param {angular.Module} ngApp an optional application
+ *   {@link angular.module module} name to load.
+ *
+ * @description
+ *
+ * Use this directive to auto-bootstrap on application. Only
+ * one directive can be used per HTML document. The directive
+ * designates the root of the application and is typically placed
+ * at the root of the page.
+ *
+ * In the example below if the `ngApp` directive would not be placed
+ * on the `html` element then the document would not be compiled
+ * and the `{{ 1+2 }}` would not be resolved to `3`.
+ *
+ * `ngApp` is the easiest way to bootstrap an application.
+ *
+ <doc:example>
+   <doc:source>
+    I can add: 1 + 2 =  {{ 1+2 }}
+   </doc:source>
+ </doc:example>
+ *
+ */
+function angularInit(element, bootstrap) {
+  var elements = [element],
+      appElement,
+      module,
+      names = ['ng:app', 'ng-app', 'x-ng-app', 'data-ng-app'],
+      NG_APP_CLASS_REGEXP = /\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;
+
+  function append(element) {
+    element && elements.push(element);
+  }
+
+  forEach(names, function(name) {
+    names[name] = true;
+    append(document.getElementById(name));
+    name = name.replace(':', '\\:');
+    if (element.querySelectorAll) {
+      forEach(element.querySelectorAll('.' + name), append);
+      forEach(element.querySelectorAll('.' + name + '\\:'), append);
+      forEach(element.querySelectorAll('[' + name + ']'), append);
+    }
+  });
+
+  forEach(elements, function(element) {
+    if (!appElement) {
+      var className = ' ' + element.className + ' ';
+      var match = NG_APP_CLASS_REGEXP.exec(className);
+      if (match) {
+        appElement = element;
+        module = (match[2] || '').replace(/\s+/g, ',');
+      } else {
+        forEach(element.attributes, function(attr) {
+          if (!appElement && names[attr.name]) {
+            appElement = element;
+            module = attr.value;
+          }
+        });
+      }
+    }
+  });
+  if (appElement) {
+    bootstrap(appElement, module ? [module] : []);
+  }
+}
+
+/**
+ * @ngdoc function
+ * @name angular.bootstrap
+ * @description
+ * Use this function to manually start up angular application.
+ *
+ * See: {@link guide/bootstrap Bootstrap}
+ *
+ * @param {Element} element DOM element which is the root of angular application.
+ * @param {Array<String|Function>=} modules an array of module declarations. See: {@link angular.module modules}
+ * @returns {AUTO.$injector} Returns the newly created injector for this app.
+ */
+function bootstrap(element, modules) {
+  element = jqLite(element);
+  modules = modules || [];
+  modules.unshift(['$provide', function($provide) {
+    $provide.value('$rootElement', element);
+  }]);
+  modules.unshift('ng');
+  var injector = createInjector(modules);
+  injector.invoke(
+    ['$rootScope', '$rootElement', '$compile', '$injector', function(scope, element, compile, injector){
+      scope.$apply(function() {
+        element.data('$injector', injector);
+        compile(element)(scope);
+      });
+    }]
+  );
+  return injector;
+}
+
+var SNAKE_CASE_REGEXP = /[A-Z]/g;
+function snake_case(name, separator){
+  separator = separator || '_';
+  return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {
+    return (pos ? separator : '') + letter.toLowerCase();
+  });
+}
+
+function bindJQuery() {
+  // bind to jQuery if present;
+  jQuery = window.jQuery;
+  // reset to jQuery or default to us.
+  if (jQuery) {
+    jqLite = jQuery;
+    extend(jQuery.fn, {
+      scope: JQLitePrototype.scope,
+      controller: JQLitePrototype.controller,
+      injector: JQLitePrototype.injector,
+      inheritedData: JQLitePrototype.inheritedData
+    });
+    JQLitePatchJQueryRemove('remove', true);
+    JQLitePatchJQueryRemove('empty');
+    JQLitePatchJQueryRemove('html');
+  } else {
+    jqLite = JQLite;
+  }
+  angular.element = jqLite;
+}
+
+/**
+ * throw error of the argument is falsy.
+ */
+function assertArg(arg, name, reason) {
+  if (!arg) {
+    throw new Error("Argument '" + (name || '?') + "' is " + (reason || "required"));
+  }
+  return arg;
+}
+
+function assertArgFn(arg, name, acceptArrayAnnotation) {
+  if (acceptArrayAnnotation && isArray(arg)) {
+      arg = arg[arg.length - 1];
+  }
+
+  assertArg(isFunction(arg), name, 'not a function, got ' +
+      (arg && typeof arg == 'object' ? arg.constructor.name || 'Object' : typeof arg));
+  return arg;
+}
+
+/**
+ * @ngdoc interface
+ * @name angular.Module
+ * @description
+ *
+ * Interface for configuring angular {@link angular.module modules}.
+ */
+
+function setupModuleLoader(window) {
+
+  function ensure(obj, name, factory) {
+    return obj[name] || (obj[name] = factory());
+  }
+
+  return ensure(ensure(window, 'angular', Object), 'module', function() {
+    /** @type {Object.<string, angular.Module>} */
+    var modules = {};
+
+    /**
+     * @ngdoc function
+     * @name angular.module
+     * @description
+     *
+     * The `angular.module` is a global place for creating and registering Angular modules. All
+     * modules (angular core or 3rd party) that should be available to an application must be
+     * registered using this mechanism.
+     *
+     *
+     * # Module
+     *
+     * A module is a collocation of services, directives, filters, and configuration information. Module
+     * is used to configure the {@link AUTO.$injector $injector}.
+     *
+     * <pre>
+     * // Create a new module
+     * var myModule = angular.module('myModule', []);
+     *
+     * // register a new service
+     * myModule.value('appName', 'MyCoolApp');
+     *
+     * // configure existing services inside initialization blocks.
+     * myModule.config(function($locationProvider) {
+     *   // Configure existing providers
+     *   $locationProvider.hashPrefix('!');
+     * });
+     * </pre>
+     *
+     * Then you can create an injector and load your modules like this:
+     *
+     * <pre>
+     * var injector = angular.injector(['ng', 'MyModule'])
+     * </pre>
+     *
+     * However it's more likely that you'll just use
+     * {@link ng.directive:ngApp ngApp} or
+     * {@link angular.bootstrap} to simplify this process for you.
+     *
+     * @param {!string} name The name of the module to create or retrieve.
+     * @param {Array.<string>=} requires If specified then new module is being created. If unspecified then the
+     *        the module is being retrieved for further configuration.
+     * @param {Function} configFn Optional configuration function for the module. Same as
+     *        {@link angular.Module#config Module#config()}.
+     * @returns {module} new module with the {@link angular.Module} api.
+     */
+    return function module(name, requires, configFn) {
+      if (requires && modules.hasOwnProperty(name)) {
+        modules[name] = null;
+      }
+      return ensure(modules, name, function() {
+        if (!requires) {
+          throw Error('No module: ' + name);
+        }
+
+        /** @type {!Array.<Array.<*>>} */
+        var invokeQueue = [];
+
+        /** @type {!Array.<Function>} */
+        var runBlocks = [];
+
+        var config = invokeLater('$injector', 'invoke');
+
+        /** @type {angular.Module} */
+        var moduleInstance = {
+          // Private state
+          _invokeQueue: invokeQueue,
+          _runBlocks: runBlocks,
+
+          /**
+           * @ngdoc property
+           * @name angular.Module#requires
+           * @propertyOf angular.Module
+           * @returns {Array.<string>} List of module names which must be loaded before this module.
+           * @description
+           * Holds the list of modules which the injector will load before the current module is loaded.
+           */
+          requires: requires,
+
+          /**
+           * @ngdoc property
+           * @name angular.Module#name
+           * @propertyOf angular.Module
+           * @returns {string} Name of the module.
+           * @description
+           */
+          name: name,
+
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#provider
+           * @methodOf angular.Module
+           * @param {string} name service name
+           * @param {Function} providerType Construction function for creating new instance of the service.
+           * @description
+           * See {@link AUTO.$provide#provider $provide.provider()}.
+           */
+          provider: invokeLater('$provide', 'provider'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#factory
+           * @methodOf angular.Module
+           * @param {string} name service name
+           * @param {Function} providerFunction Function for creating new instance of the service.
+           * @description
+           * See {@link AUTO.$provide#factory $provide.factory()}.
+           */
+          factory: invokeLater('$provide', 'factory'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#service
+           * @methodOf angular.Module
+           * @param {string} name service name
+           * @param {Function} constructor A constructor function that will be instantiated.
+           * @description
+           * See {@link AUTO.$provide#service $provide.service()}.
+           */
+          service: invokeLater('$provide', 'service'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#value
+           * @methodOf angular.Module
+           * @param {string} name service name
+           * @param {*} object Service instance object.
+           * @description
+           * See {@link AUTO.$provide#value $provide.value()}.
+           */
+          value: invokeLater('$provide', 'value'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#constant
+           * @methodOf angular.Module
+           * @param {string} name constant name
+           * @param {*} object Constant value.
+           * @description
+           * Because the constant are fixed, they get applied before other provide methods.
+           * See {@link AUTO.$provide#constant $provide.constant()}.
+           */
+          constant: invokeLater('$provide', 'constant', 'unshift'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#filter
+           * @methodOf angular.Module
+           * @param {string} name Filter name.
+           * @param {Function} filterFactory Factory function for creating new instance of filter.
+           * @description
+           * See {@link ng.$filterProvider#register $filterProvider.register()}.
+           */
+          filter: invokeLater('$filterProvider', 'register'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#controller
+           * @methodOf angular.Module
+           * @param {string} name Controller name.
+           * @param {Function} constructor Controller constructor function.
+           * @description
+           * See {@link ng.$controllerProvider#register $controllerProvider.register()}.
+           */
+          controller: invokeLater('$controllerProvider', 'register'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#directive
+           * @methodOf angular.Module
+           * @param {string} name directive name
+           * @param {Function} directiveFactory Factory function for creating new instance of
+           * directives.
+           * @description
+           * See {@link ng.$compileProvider#directive $compileProvider.directive()}.
+           */
+          directive: invokeLater('$compileProvider', 'directive'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#config
+           * @methodOf angular.Module
+           * @param {Function} configFn Execute this function on module load. Useful for service
+           *    configuration.
+           * @description
+           * Use this method to register work which needs to be performed on module loading.
+           */
+          config: config,
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#run
+           * @methodOf angular.Module
+           * @param {Function} initializationFn Execute this function after injector creation.
+           *    Useful for application initialization.
+           * @description
+           * Use this method to register work which should be performed when the injector is done
+           * loading all modules.
+           */
+          run: function(block) {
+            runBlocks.push(block);
+            return this;
+          }
+        };
+
+        if (configFn) {
+          config(configFn);
+        }
+
+        return  moduleInstance;
+
+        /**
+         * @param {string} provider
+         * @param {string} method
+         * @param {String=} insertMethod
+         * @returns {angular.Module}
+         */
+        function invokeLater(provider, method, insertMethod) {
+          return function() {
+            invokeQueue[insertMethod || 'push']([provider, method, arguments]);
+            return moduleInstance;
+          }
+        }
+      });
+    };
+  });
+
+}
+
+/**
+ * @ngdoc property
+ * @name angular.version
+ * @description
+ * An object that contains information about the current AngularJS version. This object has the
+ * following properties:
+ *
+ * - `full` – `{string}` – Full version string, such as "0.9.18".
+ * - `major` – `{number}` – Major version number, such as "0".
+ * - `minor` – `{number}` – Minor version number, such as "9".
+ * - `dot` – `{number}` – Dot version number, such as "18".
+ * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
+ */
+var version = {
+  full: '1.0.5',    // all of these placeholder strings will be replaced by rake's
+  major: 1,    // compile task
+  minor: 0,
+  dot: 5,
+  codeName: 'flatulent-propulsion'
+};
+
+
+function publishExternalAPI(angular){
+  extend(angular, {
+    'bootstrap': bootstrap,
+    'copy': copy,
+    'extend': extend,
+    'equals': equals,
+    'element': jqLite,
+    'forEach': forEach,
+    'injector': createInjector,
+    'noop':noop,
+    'bind':bind,
+    'toJson': toJson,
+    'fromJson': fromJson,
+    'identity':identity,
+    'isUndefined': isUndefined,
+    'isDefined': isDefined,
+    'isString': isString,
+    'isFunction': isFunction,
+    'isObject': isObject,
+    'isNumber': isNumber,
+    'isElement': isElement,
+    'isArray': isArray,
+    'version': version,
+    'isDate': isDate,
+    'lowercase': lowercase,
+    'uppercase': uppercase,
+    'callbacks': {counter: 0}
+  });
+
+  angularModule = setupModuleLoader(window);
+  try {
+    angularModule('ngLocale');
+  } catch (e) {
+    angularModule('ngLocale', []).provider('$locale', $LocaleProvider);
+  }
+
+  angularModule('ng', ['ngLocale'], ['$provide',
+    function ngModule($provide) {
+      $provide.provider('$compile', $CompileProvider).
+        directive({
+            a: htmlAnchorDirective,
+            input: inputDirective,
+            textarea: inputDirective,
+            form: formDirective,
+            script: scriptDirective,
+            select: selectDirective,
+            style: styleDirective,
+            option: optionDirective,
+            ngBind: ngBindDirective,
+            ngBindHtmlUnsafe: ngBindHtmlUnsafeDirective,
+            ngBindTemplate: ngBindTemplateDirective,
+            ngClass: ngClassDirective,
+            ngClassEven: ngClassEvenDirective,
+            ngClassOdd: ngClassOddDirective,
+            ngCsp: ngCspDirective,
+            ngCloak: ngCloakDirective,
+            ngController: ngControllerDirective,
+            ngForm: ngFormDirective,
+            ngHide: ngHideDirective,
+            ngInclude: ngIncludeDirective,
+            ngInit: ngInitDirective,
+            ngNonBindable: ngNonBindableDirective,
+            ngPluralize: ngPluralizeDirective,
+            ngRepeat: ngRepeatDirective,
+            ngShow: ngShowDirective,
+            ngSubmit: ngSubmitDirective,
+            ngStyle: ngStyleDirective,
+            ngSwitch: ngSwitchDirective,
+            ngSwitchWhen: ngSwitchWhenDirective,
+            ngSwitchDefault: ngSwitchDefaultDirective,
+            ngOptions: ngOptionsDirective,
+            ngView: ngViewDirective,
+            ngTransclude: ngTranscludeDirective,
+            ngModel: ngModelDirective,
+            ngList: ngListDirective,
+            ngChange: ngChangeDirective,
+            required: requiredDirective,
+            ngRequired: requiredDirective,
+            ngValue: ngValueDirective
+        }).
+        directive(ngAttributeAliasDirectives).
+        directive(ngEventDirectives);
+      $provide.provider({
+        $anchorScroll: $AnchorScrollProvider,
+        $browser: $BrowserProvider,
+        $cacheFactory: $CacheFactoryProvider,
+        $controller: $ControllerProvider,
+        $document: $DocumentProvider,
+        $exceptionHandler: $ExceptionHandlerProvider,
+        $filter: $FilterProvider,
+        $interpolate: $InterpolateProvider,
+        $http: $HttpProvider,
+        $httpBackend: $HttpBackendProvider,
+        $location: $LocationProvider,
+        $log: $LogProvider,
+        $parse: $ParseProvider,
+        $route: $RouteProvider,
+        $routeParams: $RouteParamsProvider,
+        $rootScope: $RootScopeProvider,
+        $q: $QProvider,
+        $sniffer: $SnifferProvider,
+        $templateCache: $TemplateCacheProvider,
+        $timeout: $TimeoutProvider,
+        $window: $WindowProvider
+      });
+    }
+  ]);
+}
+
+//////////////////////////////////
+//JQLite
+//////////////////////////////////
+
+/**
+ * @ngdoc function
+ * @name angular.element
+ * @function
+ *
+ * @description
+ * Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element.
+ * `angular.element` can be either an alias for [jQuery](http://api.jquery.com/jQuery/) function, if
+ * jQuery is available, or a function that wraps the element or string in Angular's jQuery lite
+ * implementation (commonly referred to as jqLite).
+ *
+ * Real jQuery always takes precedence over jqLite, provided it was loaded before `DOMContentLoaded`
+ * event fired.
+ *
+ * jqLite is a tiny, API-compatible subset of jQuery that allows
+ * Angular to manipulate the DOM. jqLite implements only the most commonly needed functionality
+ * within a very small footprint, so only a subset of the jQuery API - methods, arguments and
+ * invocation styles - are supported.
+ *
+ * Note: All element references in Angular are always wrapped with jQuery or jqLite; they are never
+ * raw DOM references.
+ *
+ * ## Angular's jQuery lite provides the following methods:
+ *
+ * - [addClass()](http://api.jquery.com/addClass/)
+ * - [after()](http://api.jquery.com/after/)
+ * - [append()](http://api.jquery.com/append/)
+ * - [attr()](http://api.jquery.com/attr/)
+ * - [bind()](http://api.jquery.com/bind/)
+ * - [children()](http://api.jquery.com/children/)
+ * - [clone()](http://api.jquery.com/clone/)
+ * - [contents()](http://api.jquery.com/contents/)
+ * - [css()](http://api.jquery.com/css/)
+ * - [data()](http://api.jquery.com/data/)
+ * - [eq()](http://api.jquery.com/eq/)
+ * - [find()](http://api.jquery.com/find/) - Limited to lookups by tag name.
+ * - [hasClass()](http://api.jquery.com/hasClass/)
+ * - [html()](http://api.jquery.com/html/)
+ * - [next()](http://api.jquery.com/next/)
+ * - [parent()](http://api.jquery.com/parent/)
+ * - [prepend()](http://api.jquery.com/prepend/)
+ * - [prop()](http://api.jquery.com/prop/)
+ * - [ready()](http://api.jquery.com/ready/)
+ * - [remove()](http://api.jquery.com/remove/)
+ * - [removeAttr()](http://api.jquery.com/removeAttr/)
+ * - [removeClass()](http://api.jquery.com/removeClass/)
+ * - [removeData()](http://api.jquery.com/removeData/)
+ * - [replaceWith()](http://api.jquery.com/replaceWith/)
+ * - [text()](http://api.jquery.com/text/)
+ * - [toggleClass()](http://api.jquery.com/toggleClass/)
+ * - [triggerHandler()](http://api.jquery.com/triggerHandler/) - Doesn't pass native event objects to handlers.
+ * - [unbind()](http://api.jquery.com/unbind/)
+ * - [val()](http://api.jquery.com/val/)
+ * - [wrap()](http://api.jquery.com/wrap/)
+ *
+ * ## In addtion to the above, Angular provides additional methods to both jQuery and jQuery lite:
+ *
+ * - `controller(name)` - retrieves the controller of the current element or its parent. By default
+ *   retrieves controller associated with the `ngController` directive. If `name` is provided as
+ *   camelCase directive name, then the controller for this directive will be retrieved (e.g.
+ *   `'ngModel'`).
+ * - `injector()` - retrieves the injector of the current element or its parent.
+ * - `scope()` - retrieves the {@link api/ng.$rootScope.Scope scope} of the current
+ *   element or its parent.
+ * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top
+ *   parent element is reached.
+ *
+ * @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery.
+ * @returns {Object} jQuery object.
+ */
+
+var jqCache = JQLite.cache = {},
+    jqName = JQLite.expando = 'ng-' + new Date().getTime(),
+    jqId = 1,
+    addEventListenerFn = (window.document.addEventListener
+      ? function(element, type, fn) {element.addEventListener(type, fn, false);}
+      : function(element, type, fn) {element.attachEvent('on' + type, fn);}),
+    removeEventListenerFn = (window.document.removeEventListener
+      ? function(element, type, fn) {element.removeEventListener(type, fn, false); }
+      : function(element, type, fn) {element.detachEvent('on' + type, fn); });
+
+function jqNextId() { return ++jqId; }
+
+
+var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
+var MOZ_HACK_REGEXP = /^moz([A-Z])/;
+
+/**
+ * Converts snake_case to camelCase.
+ * Also there is special case for Moz prefix starting with upper case letter.
+ * @param name Name to normalize
+ */
+function camelCase(name) {
+  return name.
+    replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
+      return offset ? letter.toUpperCase() : letter;
+    }).
+    replace(MOZ_HACK_REGEXP, 'Moz$1');
+}
+
+/////////////////////////////////////////////
+// jQuery mutation patch
+//
+//  In conjunction with bindJQuery intercepts all jQuery's DOM destruction apis and fires a
+// $destroy event on all DOM nodes being removed.
+//
+/////////////////////////////////////////////
+
+function JQLitePatchJQueryRemove(name, dispatchThis) {
+  var originalJqFn = jQuery.fn[name];
+  originalJqFn = originalJqFn.$original || originalJqFn;
+  removePatch.$original = originalJqFn;
+  jQuery.fn[name] = removePatch;
+
+  function removePatch() {
+    var list = [this],
+        fireEvent = dispatchThis,
+        set, setIndex, setLength,
+        element, childIndex, childLength, children,
+        fns, events;
+
+    while(list.length) {
+      set = list.shift();
+      for(setIndex = 0, setLength = set.length; setIndex < setLength; setIndex++) {
+        element = jqLite(set[setIndex]);
+        if (fireEvent) {
+          element.triggerHandler('$destroy');
+        } else {
+          fireEvent = !fireEvent;
+        }
+        for(childIndex = 0, childLength = (children = element.children()).length;
+            childIndex < childLength;
+            childIndex++) {
+          list.push(jQuery(children[childIndex]));
+        }
+      }
+    }
+    return originalJqFn.apply(this, arguments);
+  }
+}
+
+/////////////////////////////////////////////
+function JQLite(element) {
+  if (element instanceof JQLite) {
+    return element;
+  }
+  if (!(this instanceof JQLite)) {
+    if (isString(element) && element.charAt(0) != '<') {
+      throw Error('selectors not implemented');
+    }
+    return new JQLite(element);
+  }
+
+  if (isString(element)) {
+    var div = document.createElement('div');
+    // Read about the NoScope elements here:
+    // http://msdn.microsoft.com/en-us/library/ms533897(VS.85).aspx
+    div.innerHTML = '<div>&#160;</div>' + element; // IE insanity to make NoScope elements work!
+    div.removeChild(div.firstChild); // remove the superfluous div
+    JQLiteAddNodes(this, div.childNodes);
+    this.remove(); // detach the elements from the temporary DOM div.
+  } else {
+    JQLiteAddNodes(this, element);
+  }
+}
+
+function JQLiteClone(element) {
+  return element.cloneNode(true);
+}
+
+function JQLiteDealoc(element){
+  JQLiteRemoveData(element);
+  for ( var i = 0, children = element.childNodes || []; i < children.length; i++) {
+    JQLiteDealoc(children[i]);
+  }
+}
+
+function JQLiteUnbind(element, type, fn) {
+  var events = JQLiteExpandoStore(element, 'events'),
+      handle = JQLiteExpandoStore(element, 'handle');
+
+  if (!handle) return; //no listeners registered
+
+  if (isUndefined(type)) {
+    forEach(events, function(eventHandler, type) {
+      removeEventListenerFn(element, type, eventHandler);
+      delete events[type];
+    });
+  } else {
+    if (isUndefined(fn)) {
+      removeEventListenerFn(element, type, events[type]);
+      delete events[type];
+    } else {
+      arrayRemove(events[type], fn);
+    }
+  }
+}
+
+function JQLiteRemoveData(element) {
+  var expandoId = element[jqName],
+      expandoStore = jqCache[expandoId];
+
+  if (expandoStore) {
+    if (expandoStore.handle) {
+      expandoStore.events.$destroy && expandoStore.handle({}, '$destroy');
+      JQLiteUnbind(element);
+    }
+    delete jqCache[expandoId];
+    element[jqName] = undefined; // ie does not allow deletion of attributes on elements.
+  }
+}
+
+function JQLiteExpandoStore(element, key, value) {
+  var expandoId = element[jqName],
+      expandoStore = jqCache[expandoId || -1];
+
+  if (isDefined(value)) {
+    if (!expandoStore) {
+      element[jqName] = expandoId = jqNextId();
+      expandoStore = jqCache[expandoId] = {};
+    }
+    expandoStore[key] = value;
+  } else {
+    return expandoStore && expandoStore[key];
+  }
+}
+
+function JQLiteData(element, key, value) {
+  var data = JQLiteExpandoStore(element, 'data'),
+      isSetter = isDefined(value),
+      keyDefined = !isSetter && isDefined(key),
+      isSimpleGetter = keyDefined && !isObject(key);
+
+  if (!data && !isSimpleGetter) {
+    JQLiteExpandoStore(element, 'data', data = {});
+  }
+
+  if (isSetter) {
+    data[key] = value;
+  } else {
+    if (keyDefined) {
+      if (isSimpleGetter) {
+        // don't create data in this case.
+        return data && data[key];
+      } else {
+        extend(data, key);
+      }
+    } else {
+      return data;
+    }
+  }
+}
+
+function JQLiteHasClass(element, selector) {
+  return ((" " + element.className + " ").replace(/[\n\t]/g, " ").
+      indexOf( " " + selector + " " ) > -1);
+}
+
+function JQLiteRemoveClass(element, cssClasses) {
+  if (cssClasses) {
+    forEach(cssClasses.split(' '), function(cssClass) {
+      element.className = trim(
+          (" " + element.className + " ")
+          .replace(/[\n\t]/g, " ")
+          .replace(" " + trim(cssClass) + " ", " ")
+      );
+    });
+  }
+}
+
+function JQLiteAddClass(element, cssClasses) {
+  if (cssClasses) {
+    forEach(cssClasses.split(' '), function(cssClass) {
+      if (!JQLiteHasClass(element, cssClass)) {
+        element.className = trim(element.className + ' ' + trim(cssClass));
+      }
+    });
+  }
+}
+
+function JQLiteAddNodes(root, elements) {
+  if (elements) {
+    elements = (!elements.nodeName && isDefined(elements.length) && !isWindow(elements))
+      ? elements
+      : [ elements ];
+    for(var i=0; i < elements.length; i++) {
+      root.push(elements[i]);
+    }
+  }
+}
+
+function JQLiteController(element, name) {
+  return JQLiteInheritedData(element, '$' + (name || 'ngController' ) + 'Controller');
+}
+
+function JQLiteInheritedData(element, name, value) {
+  element = jqLite(element);
+
+  // if element is the document object work with the html element instead
+  // this makes $(document).scope() possible
+  if(element[0].nodeType == 9) {
+    element = element.find('html');
+  }
+
+  while (element.length) {
+    if (value = element.data(name)) return value;
+    element = element.parent();
+  }
+}
+
+//////////////////////////////////////////
+// Functions which are declared directly.
+//////////////////////////////////////////
+var JQLitePrototype = JQLite.prototype = {
+  ready: function(fn) {
+    var fired = false;
+
+    function trigger() {
+      if (fired) return;
+      fired = true;
+      fn();
+    }
+
+    this.bind('DOMContentLoaded', trigger); // works for modern browsers and IE9
+    // we can not use jqLite since we are not done loading and jQuery could be loaded later.
+    JQLite(window).bind('load', trigger); // fallback to window.onload for others
+  },
+  toString: function() {
+    var value = [];
+    forEach(this, function(e){ value.push('' + e);});
+    return '[' + value.join(', ') + ']';
+  },
+
+  eq: function(index) {
+      return (index >= 0) ? jqLite(this[index]) : jqLite(this[this.length + index]);
+  },
+
+  length: 0,
+  push: push,
+  sort: [].sort,
+  splice: [].splice
+};
+
+//////////////////////////////////////////
+// Functions iterating getter/setters.
+// these functions return self on setter and
+// value on get.
+//////////////////////////////////////////
+var BOOLEAN_ATTR = {};
+forEach('multiple,selected,checked,disabled,readOnly,required'.split(','), function(value) {
+  BOOLEAN_ATTR[lowercase(value)] = value;
+});
+var BOOLEAN_ELEMENTS = {};
+forEach('input,select,option,textarea,button,form'.split(','), function(value) {
+  BOOLEAN_ELEMENTS[uppercase(value)] = true;
+});
+
+function getBooleanAttrName(element, name) {
+  // check dom last since we will most likely fail on name
+  var booleanAttr = BOOLEAN_ATTR[name.toLowerCase()];
+
+  // booleanAttr is here twice to minimize DOM access
+  return booleanAttr && BOOLEAN_ELEMENTS[element.nodeName] && booleanAttr;
+}
+
+forEach({
+  data: JQLiteData,
+  inheritedData: JQLiteInheritedData,
+
+  scope: function(element) {
+    return JQLiteInheritedData(element, '$scope');
+  },
+
+  controller: JQLiteController ,
+
+  injector: function(element) {
+    return JQLiteInheritedData(element, '$injector');
+  },
+
+  removeAttr: function(element,name) {
+    element.removeAttribute(name);
+  },
+
+  hasClass: JQLiteHasClass,
+
+  css: function(element, name, value) {
+    name = camelCase(name);
+
+    if (isDefined(value)) {
+      element.style[name] = value;
+    } else {
+      var val;
+
+      if (msie <= 8) {
+        // this is some IE specific weirdness that jQuery 1.6.4 does not sure why
+        val = element.currentStyle && element.currentStyle[name];
+        if (val === '') val = 'auto';
+      }
+
+      val = val || element.style[name];
+
+      if (msie <= 8) {
+        // jquery weirdness :-/
+        val = (val === '') ? undefined : val;
+      }
+
+      return  val;
+    }
+  },
+
+  attr: function(element, name, value){
+    var lowercasedName = lowercase(name);
+    if (BOOLEAN_ATTR[lowercasedName]) {
+      if (isDefined(value)) {
+        if (!!value) {
+          element[name] = true;
+          element.setAttribute(name, lowercasedName);
+        } else {
+          element[name] = false;
+          element.removeAttribute(lowercasedName);
+        }
+      } else {
+        return (element[name] ||
+                 (element.attributes.getNamedItem(name)|| noop).specified)
+               ? lowercasedName
+               : undefined;
+      }
+    } else if (isDefined(value)) {
+      element.setAttribute(name, value);
+    } else if (element.getAttribute) {
+      // the extra argument "2" is to get the right thing for a.href in IE, see jQuery code
+      // some elements (e.g. Document) don't have get attribute, so return undefined
+      var ret = element.getAttribute(name, 2);
+      // normalize non-existing attributes to undefined (as jQuery)
+      return ret === null ? undefined : ret;
+    }
+  },
+
+  prop: function(element, name, value) {
+    if (isDefined(value)) {
+      element[name] = value;
+    } else {
+      return element[name];
+    }
+  },
+
+  text: extend((msie < 9)
+      ? function(element, value) {
+        if (element.nodeType == 1 /** Element */) {
+          if (isUndefined(value))
+            return element.innerText;
+          element.innerText = value;
+        } else {
+          if (isUndefined(value))
+            return element.nodeValue;
+          element.nodeValue = value;
+        }
+      }
+      : function(element, value) {
+        if (isUndefined(value)) {
+          return element.textContent;
+        }
+        element.textContent = value;
+      }, {$dv:''}),
+
+  val: function(element, value) {
+    if (isUndefined(value)) {
+      return element.value;
+    }
+    element.value = value;
+  },
+
+  html: function(element, value) {
+    if (isUndefined(value)) {
+      return element.innerHTML;
+    }
+    for (var i = 0, childNodes = element.childNodes; i < childNodes.length; i++) {
+      JQLiteDealoc(childNodes[i]);
+    }
+    element.innerHTML = value;
+  }
+}, function(fn, name){
+  /**
+   * Properties: writes return selection, reads return first value
+   */
+  JQLite.prototype[name] = function(arg1, arg2) {
+    var i, key;
+
+    // JQLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it
+    // in a way that survives minification.
+    if (((fn.length == 2 && (fn !== JQLiteHasClass && fn !== JQLiteController)) ? arg1 : arg2) === undefined) {
+      if (isObject(arg1)) {
+
+        // we are a write, but the object properties are the key/values
+        for(i=0; i < this.length; i++) {
+          if (fn === JQLiteData) {
+            // data() takes the whole object in jQuery
+            fn(this[i], arg1);
+          } else {
+            for (key in arg1) {
+              fn(this[i], key, arg1[key]);
+            }
+          }
+        }
+        // return self for chaining
+        return this;
+      } else {
+        // we are a read, so read the first child.
+        if (this.length)
+          return fn(this[0], arg1, arg2);
+      }
+    } else {
+      // we are a write, so apply to all children
+      for(i=0; i < this.length; i++) {
+        fn(this[i], arg1, arg2);
+      }
+      // return self for chaining
+      return this;
+    }
+    return fn.$dv;
+  };
+});
+
+function createEventHandler(element, events) {
+  var eventHandler = function (event, type) {
+    if (!event.preventDefault) {
+      event.preventDefault = function() {
+        event.returnValue = false; //ie
+      };
+    }
+
+    if (!event.stopPropagation) {
+      event.stopPropagation = function() {
+        event.cancelBubble = true; //ie
+      };
+    }
+
+    if (!event.target) {
+      event.target = event.srcElement || document;
+    }
+
+    if (isUndefined(event.defaultPrevented)) {
+      var prevent = event.preventDefault;
+      event.preventDefault = function() {
+        event.defaultPrevented = true;
+        prevent.call(event);
+      };
+      event.defaultPrevented = false;
+    }
+
+    event.isDefaultPrevented = function() {
+      return event.defaultPrevented;
+    };
+
+    forEach(events[type || event.type], function(fn) {
+      fn.call(element, event);
+    });
+
+    // Remove monkey-patched methods (IE),
+    // as they would cause memory leaks in IE8.
+    if (msie <= 8) {
+      // IE7/8 does not allow to delete property on native object
+      event.preventDefault = null;
+      event.stopPropagation = null;
+      event.isDefaultPrevented = null;
+    } else {
+      // It shouldn't affect normal browsers (native methods are defined on prototype).
+      delete event.preventDefault;
+      delete event.stopPropagation;
+      delete event.isDefaultPrevented;
+    }
+  };
+  eventHandler.elem = element;
+  return eventHandler;
+}
+
+//////////////////////////////////////////
+// Functions iterating traversal.
+// These functions chain results into a single
+// selector.
+//////////////////////////////////////////
+forEach({
+  removeData: JQLiteRemoveData,
+
+  dealoc: JQLiteDealoc,
+
+  bind: function bindFn(element, type, fn){
+    var events = JQLiteExpandoStore(element, 'events'),
+        handle = JQLiteExpandoStore(element, 'handle');
+
+    if (!events) JQLiteExpandoStore(element, 'events', events = {});
+    if (!handle) JQLiteExpandoStore(element, 'handle', handle = createEventHandler(element, events));
+
+    forEach(type.split(' '), function(type){
+      var eventFns = events[type];
+
+      if (!eventFns) {
+        if (type == 'mouseenter' || type == 'mouseleave') {
+          var counter = 0;
+
+          events.mouseenter = [];
+          events.mouseleave = [];
+
+          bindFn(element, 'mouseover', function(event) {
+            counter++;
+            if (counter == 1) {
+              handle(event, 'mouseenter');
+            }
+          });
+          bindFn(element, 'mouseout', function(event) {
+            counter --;
+            if (counter == 0) {
+              handle(event, 'mouseleave');
+            }
+          });
+        } else {
+          addEventListenerFn(element, type, handle);
+          events[type] = [];
+        }
+        eventFns = events[type]
+      }
+      eventFns.push(fn);
+    });
+  },
+
+  unbind: JQLiteUnbind,
+
+  replaceWith: function(element, replaceNode) {
+    var index, parent = element.parentNode;
+    JQLiteDealoc(element);
+    forEach(new JQLite(replaceNode), function(node){
+      if (index) {
+        parent.insertBefore(node, index.nextSibling);
+      } else {
+        parent.replaceChild(node, element);
+      }
+      index = node;
+    });
+  },
+
+  children: function(element) {
+    var children = [];
+    forEach(element.childNodes, function(element){
+      if (element.nodeType === 1)
+        children.push(element);
+    });
+    return children;
+  },
+
+  contents: function(element) {
+    return element.childNodes || [];
+  },
+
+  append: function(element, node) {
+    forEach(new JQLite(node), function(child){
+      if (element.nodeType === 1)
+        element.appendChild(child);
+    });
+  },
+
+  prepend: function(element, node) {
+    if (element.nodeType === 1) {
+      var index = element.firstChild;
+      forEach(new JQLite(node), function(child){
+        if (index) {
+          element.insertBefore(child, index);
+        } else {
+          element.appendChild(child);
+          index = child;
+        }
+      });
+    }
+  },
+
+  wrap: function(element, wrapNode) {
+    wrapNode = jqLite(wrapNode)[0];
+    var parent = element.parentNode;
+    if (parent) {
+      parent.replaceChild(wrapNode, element);
+    }
+    wrapNode.appendChild(element);
+  },
+
+  remove: function(element) {
+    JQLiteDealoc(element);
+    var parent = element.parentNode;
+    if (parent) parent.removeChild(element);
+  },
+
+  after: function(element, newElement) {
+    var index = element, parent = element.parentNode;
+    forEach(new JQLite(newElement), function(node){
+      parent.insertBefore(node, index.nextSibling);
+      index = node;
+    });
+  },
+
+  addClass: JQLiteAddClass,
+  removeClass: JQLiteRemoveClass,
+
+  toggleClass: function(element, selector, condition) {
+    if (isUndefined(condition)) {
+      condition = !JQLiteHasClass(element, selector);
+    }
+    (condition ? JQLiteAddClass : JQLiteRemoveClass)(element, selector);
+  },
+
+  parent: function(element) {
+    var parent = element.parentNode;
+    return parent && parent.nodeType !== 11 ? parent : null;
+  },
+
+  next: function(element) {
+    if (element.nextElementSibling) {
+      return element.nextElementSibling;
+    }
+
+    // IE8 doesn't have nextElementSibling
+    var elm = element.nextSibling;
+    while (elm != null && elm.nodeType !== 1) {
+      elm = elm.nextSibling;
+    }
+    return elm;
+  },
+
+  find: function(element, selector) {
+    return element.getElementsByTagName(selector);
+  },
+
+  clone: JQLiteClone,
+
+  triggerHandler: function(element, eventName) {
+    var eventFns = (JQLiteExpandoStore(element, 'events') || {})[eventName];
+
+    forEach(eventFns, function(fn) {
+      fn.call(element, null);
+    });
+  }
+}, function(fn, name){
+  /**
+   * chaining functions
+   */
+  JQLite.prototype[name] = function(arg1, arg2) {
+    var value;
+    for(var i=0; i < this.length; i++) {
+      if (value == undefined) {
+        value = fn(this[i], arg1, arg2);
+        if (value !== undefined) {
+          // any function which returns a value needs to be wrapped
+          value = jqLite(value);
+        }
+      } else {
+        JQLiteAddNodes(value, fn(this[i], arg1, arg2));
+      }
+    }
+    return value == undefined ? this : value;
+  };
+});
+
+/**
+ * Computes a hash of an 'obj'.
+ * Hash of a:
+ *  string is string
+ *  number is number as string
+ *  object is either result of calling $$hashKey function on the object or uniquely generated id,
+ *         that is also assigned to the $$hashKey property of the object.
+ *
+ * @param obj
+ * @returns {string} hash string such that the same input will have the same hash string.
+ *         The resulting string key is in 'type:hashKey' format.
+ */
+function hashKey(obj) {
+  var objType = typeof obj,
+      key;
+
+  if (objType == 'object' && obj !== null) {
+    if (typeof (key = obj.$$hashKey) == 'function') {
+      // must invoke on object to keep the right this
+      key = obj.$$hashKey();
+    } else if (key === undefined) {
+      key = obj.$$hashKey = nextUid();
+    }
+  } else {
+    key = obj;
+  }
+
+  return objType + ':' + key;
+}
+
+/**
+ * HashMap which can use objects as keys
+ */
+function HashMap(array){
+  forEach(array, this.put, this);
+}
+HashMap.prototype = {
+  /**
+   * Store key value pair
+   * @param key key to store can be any type
+   * @param value value to store can be any type
+   */
+  put: function(key, value) {
+    this[hashKey(key)] = value;
+  },
+
+  /**
+   * @param key
+   * @returns the value for the key
+   */
+  get: function(key) {
+    return this[hashKey(key)];
+  },
+
+  /**
+   * Remove the key/value pair
+   * @param key
+   */
+  remove: function(key) {
+    var value = this[key = hashKey(key)];
+    delete this[key];
+    return value;
+  }
+};
+
+/**
+ * A map where multiple values can be added to the same key such that they form a queue.
+ * @returns {HashQueueMap}
+ */
+function HashQueueMap() {}
+HashQueueMap.prototype = {
+  /**
+   * Same as array push, but using an array as the value for the hash
+   */
+  push: function(key, value) {
+    var array = this[key = hashKey(key)];
+    if (!array) {
+      this[key] = [value];
+    } else {
+      array.push(value);
+    }
+  },
+
+  /**
+   * Same as array shift, but using an array as the value for the hash
+   */
+  shift: function(key) {
+    var array = this[key = hashKey(key)];
+    if (array) {
+      if (array.length == 1) {
+        delete this[key];
+        return array[0];
+      } else {
+        return array.shift();
+      }
+    }
+  },
+
+  /**
+   * return the first item without deleting it
+   */
+  peek: function(key) {
+    var array = this[hashKey(key)];
+    if (array) {
+    return array[0];
+    }
+  }
+};
+
+/**
+ * @ngdoc function
+ * @name angular.injector
+ * @function
+ *
+ * @description
+ * Creates an injector function that can be used for retrieving services as well as for
+ * dependency injection (see {@link guide/di dependency injection}).
+ *
+
+ * @param {Array.<string|Function>} modules A list of module functions or their aliases. See
+ *        {@link angular.module}. The `ng` module must be explicitly added.
+ * @returns {function()} Injector function. See {@link AUTO.$injector $injector}.
+ *
+ * @example
+ * Typical usage
+ * <pre>
+ *   // create an injector
+ *   var $injector = angular.injector(['ng']);
+ *
+ *   // use the injector to kick off your application
+ *   // use the type inference to auto inject arguments, or use implicit injection
+ *   $injector.invoke(function($rootScope, $compile, $document){
+ *     $compile($document)($rootScope);
+ *     $rootScope.$digest();
+ *   });
+ * </pre>
+ */
+
+
+/**
+ * @ngdoc overview
+ * @name AUTO
+ * @description
+ *
+ * Implicit module which gets automatically added to each {@link AUTO.$injector $injector}.
+ */
+
+var FN_ARGS = /^function\s*[^\(]*\(\s*([^\)]*)\)/m;
+var FN_ARG_SPLIT = /,/;
+var FN_ARG = /^\s*(_?)(\S+?)\1\s*$/;
+var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
+function annotate(fn) {
+  var $inject,
+      fnText,
+      argDecl,
+      last;
+
+  if (typeof fn == 'function') {
+    if (!($inject = fn.$inject)) {
+      $inject = [];
+      fnText = fn.toString().replace(STRIP_COMMENTS, '');
+      argDecl = fnText.match(FN_ARGS);
+      forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg){
+        arg.replace(FN_ARG, function(all, underscore, name){
+          $inject.push(name);
+        });
+      });
+      fn.$inject = $inject;
+    }
+  } else if (isArray(fn)) {
+    last = fn.length - 1;
+    assertArgFn(fn[last], 'fn')
+    $inject = fn.slice(0, last);
+  } else {
+    assertArgFn(fn, 'fn', true);
+  }
+  return $inject;
+}
+
+///////////////////////////////////////
+
+/**
+ * @ngdoc object
+ * @name AUTO.$injector
+ * @function
+ *
+ * @description
+ *
+ * `$injector` is used to retrieve object instances as defined by
+ * {@link AUTO.$provide provider}, instantiate types, invoke methods,
+ * and load modules.
+ *
+ * The following always holds true:
+ *
+ * <pre>
+ *   var $injector = angular.injector();
+ *   expect($injector.get('$injector')).toBe($injector);
+ *   expect($injector.invoke(function($injector){
+ *     return $injector;
+ *   }).toBe($injector);
+ * </pre>
+ *
+ * # Injection Function Annotation
+ *
+ * JavaScript does not have annotations, and annotations are needed for dependency injection. The
+ * following ways are all valid way of annotating function with injection arguments and are equivalent.
+ *
+ * <pre>
+ *   // inferred (only works if code not minified/obfuscated)
+ *   $inject.invoke(function(serviceA){});
+ *
+ *   // annotated
+ *   function explicit(serviceA) {};
+ *   explicit.$inject = ['serviceA'];
+ *   $inject.invoke(explicit);
+ *
+ *   // inline
+ *   $inject.invoke(['serviceA', function(serviceA){}]);
+ * </pre>
+ *
+ * ## Inference
+ *
+ * In JavaScript calling `toString()` on a function returns the function definition. The definition can then be
+ * parsed and the function arguments can be extracted. *NOTE:* This does not work with minification, and obfuscation
+ * tools since these tools change the argument names.
+ *
+ * ## `$inject` Annotation
+ * By adding a `$inject` property onto a function the injection parameters can be specified.
+ *
+ * ## Inline
+ * As an array of injection names, where the last item in the array is the function to call.
+ */
+
+/**
+ * @ngdoc method
+ * @name AUTO.$injector#get
+ * @methodOf AUTO.$injector
+ *
+ * @description
+ * Return an instance of the service.
+ *
+ * @param {string} name The name of the instance to retrieve.
+ * @return {*} The instance.
+ */
+
+/**
+ * @ngdoc method
+ * @name AUTO.$injector#invoke
+ * @methodOf AUTO.$injector
+ *
+ * @description
+ * Invoke the method and supply the method arguments from the `$injector`.
+ *
+ * @param {!function} fn The function to invoke. The function arguments come form the function annotation.
+ * @param {Object=} self The `this` for the invoked method.
+ * @param {Object=} locals Optional object. If preset then any argument names are read from this object first, before
+ *   the `$injector` is consulted.
+ * @returns {*} the value returned by the invoked `fn` function.
+ */
+
+/**
+ * @ngdoc method
+ * @name AUTO.$injector#instantiate
+ * @methodOf AUTO.$injector
+ * @description
+ * Create a new instance of JS type. The method takes a constructor function invokes the new operator and supplies
+ * all of the arguments to the constructor function as specified by the constructor annotation.
+ *
+ * @param {function} Type Annotated constructor function.
+ * @param {Object=} locals Optional object. If preset then any argument names are read from this object first, before
+ *   the `$injector` is consulted.
+ * @returns {Object} new instance of `Type`.
+ */
+
+/**
+ * @ngdoc method
+ * @name AUTO.$injector#annotate
+ * @methodOf AUTO.$injector
+ *
+ * @description
+ * Returns an array of service names which the function is requesting for injection. This API is used by the injector
+ * to determine which services need to be injected into the function when the function is invoked. There are three
+ * ways in which the function can be annotated with the needed dependencies.
+ *
+ * # Argument names
+ *
+ * The simplest form is to extract the dependencies from the arguments of the function. This is done by converting
+ * the function into a string using `toString()` method and extracting the argument names.
+ * <pre>
+ *   // Given
+ *   function MyController($scope, $route) {
+ *     // ...
+ *   }
+ *
+ *   // Then
+ *   expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);
+ * </pre>
+ *
+ * This method does not work with code minfication / obfuscation. For this reason the following annotation strategies
+ * are supported.
+ *
+ * # The `$inject` property
+ *
+ * If a function has an `$inject` property and its value is an array of strings, then the strings represent names of
+ * services to be injected into the function.
+ * <pre>
+ *   // Given
+ *   var MyController = function(obfuscatedScope, obfuscatedRoute) {
+ *     // ...
+ *   }
+ *   // Define function dependencies
+ *   MyController.$inject = ['$scope', '$route'];
+ *
+ *   // Then
+ *   expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);
+ * </pre>
+ *
+ * # The array notation
+ *
+ * It is often desirable to inline Injected functions and that's when setting the `$inject` property is very
+ * inconvenient. In these situations using the array notation to specify the dependencies in a way that survives
+ * minification is a better choice:
+ *
+ * <pre>
+ *   // We wish to write this (not minification / obfuscation safe)
+ *   injector.invoke(function($compile, $rootScope) {
+ *     // ...
+ *   });
+ *
+ *   // We are forced to write break inlining
+ *   var tmpFn = function(obfuscatedCompile, obfuscatedRootScope) {
+ *     // ...
+ *   };
+ *   tmpFn.$inject = ['$compile', '$rootScope'];
+ *   injector.invoke(tempFn);
+ *
+ *   // To better support inline function the inline annotation is supported
+ *   injector.invoke(['$compile', '$rootScope', function(obfCompile, obfRootScope) {
+ *     // ...
+ *   }]);
+ *
+ *   // Therefore
+ *   expect(injector.annotate(
+ *      ['$compile', '$rootScope', function(obfus_$compile, obfus_$rootScope) {}])
+ *    ).toEqual(['$compile', '$rootScope']);
+ * </pre>
+ *
+ * @param {function|Array.<string|Function>} fn Function for which dependent service names need to be retrieved as described
+ *   above.
+ *
+ * @returns {Array.<string>} The names of the services which the function requires.
+ */
+
+
+
+
+/**
+ * @ngdoc object
+ * @name AUTO.$provide
+ *
+ * @description
+ *
+ * Use `$provide` to register new providers with the `$injector`. The providers are the factories for the instance.
+ * The providers share the same name as the instance they create with the `Provider` suffixed to them.
+ *
+ * A provider is an object with a `$get()` method. The injector calls the `$get` method to create a new instance of
+ * a service. The Provider can have additional methods which would allow for configuration of the provider.
+ *
+ * <pre>
+ *   function GreetProvider() {
+ *     var salutation = 'Hello';
+ *
+ *     this.salutation = function(text) {
+ *       salutation = text;
+ *     };
+ *
+ *     this.$get = function() {
+ *       return function (name) {
+ *         return salutation + ' ' + name + '!';
+ *       };
+ *     };
+ *   }
+ *
+ *   describe('Greeter', function(){
+ *
+ *     beforeEach(module(function($provide) {
+ *       $provide.provider('greet', GreetProvider);
+ *     });
+ *
+ *     it('should greet', inject(function(greet) {
+ *       expect(greet('angular')).toEqual('Hello angular!');
+ *     }));
+ *
+ *     it('should allow configuration of salutation', function() {
+ *       module(function(greetProvider) {
+ *         greetProvider.salutation('Ahoj');
+ *       });
+ *       inject(function(greet) {
+ *         expect(greet('angular')).toEqual('Ahoj angular!');
+ *       });
+ *     )};
+ *
+ *   });
+ * </pre>
+ */
+
+/**
+ * @ngdoc method
+ * @name AUTO.$provide#provider
+ * @methodOf AUTO.$provide
+ * @description
+ *
+ * Register a provider for a service. The providers can be retrieved and can have additional configuration methods.
+ *
+ * @param {string} name The name of the instance. NOTE: the provider will be available under `name + 'Provider'` key.
+ * @param {(Object|function())} provider If the provider is:
+ *
+ *   - `Object`: then it should have a `$get` method. The `$get` method will be invoked using
+ *               {@link AUTO.$injector#invoke $injector.invoke()} when an instance needs to be created.
+ *   - `Constructor`: a new instance of the provider will be created using
+ *               {@link AUTO.$injector#instantiate $injector.instantiate()}, then treated as `object`.
+ *
+ * @returns {Object} registered provider instance
+ */
+
+/**
+ * @ngdoc method
+ * @name AUTO.$provide#factory
+ * @methodOf AUTO.$provide
+ * @description
+ *
+ * A short hand for configuring services if only `$get` method is required.
+ *
+ * @param {string} name The name of the instance.
+ * @param {function()} $getFn The $getFn for the instance creation. Internally this is a short hand for
+ * `$provide.provider(name, {$get: $getFn})`.
+ * @returns {Object} registered provider instance
+ */
+
+
+/**
+ * @ngdoc method
+ * @name AUTO.$provide#service
+ * @methodOf AUTO.$provide
+ * @description
+ *
+ * A short hand for registering service of given class.
+ *
+ * @param {string} name The name of the instance.
+ * @param {Function} constructor A class (constructor function) that will be instantiated.
+ * @returns {Object} registered provider instance
+ */
+
+
+/**
+ * @ngdoc method
+ * @name AUTO.$provide#value
+ * @methodOf AUTO.$provide
+ * @description
+ *
+ * A short hand for configuring services if the `$get` method is a constant.
+ *
+ * @param {string} name The name of the instance.
+ * @param {*} value The value.
+ * @returns {Object} registered provider instance
+ */
+
+
+/**
+ * @ngdoc method
+ * @name AUTO.$provide#constant
+ * @methodOf AUTO.$provide
+ * @description
+ *
+ * A constant value, but unlike {@link AUTO.$provide#value value} it can be injected
+ * into configuration function (other modules) and it is not interceptable by
+ * {@link AUTO.$provide#decorator decorator}.
+ *
+ * @param {string} name The name of the constant.
+ * @param {*} value The constant value.
+ * @returns {Object} registered instance
+ */
+
+
+/**
+ * @ngdoc method
+ * @name AUTO.$provide#decorator
+ * @methodOf AUTO.$provide
+ * @description
+ *
+ * Decoration of service, allows the decorator to intercept the service instance creation. The
+ * returned instance may be the original instance, or a new instance which delegates to the
+ * original instance.
+ *
+ * @param {string} name The name of the service to decorate.
+ * @param {function()} decorator This function will be invoked when the service needs to be
+ *    instanciated. The function is called using the {@link AUTO.$injector#invoke
+ *    injector.invoke} method and is therefore fully injectable. Local injection arguments:
+ *
+ *    * `$delegate` - The original service instance, which can be monkey patched, configured,
+ *      decorated or delegated to.
+ */
+
+
+function createInjector(modulesToLoad) {
+  var INSTANTIATING = {},
+      providerSuffix = 'Provider',
+      path = [],
+      loadedModules = new HashMap(),
+      providerCache = {
+        $provide: {
+            provider: supportObject(provider),
+            factory: supportObject(factory),
+            service: supportObject(service),
+            value: supportObject(value),
+            constant: supportObject(constant),
+            decorator: decorator
+          }
+      },
+      providerInjector = createInternalInjector(providerCache, function() {
+        throw Error("Unknown provider: " + path.join(' <- '));
+      }),
+      instanceCache = {},
+      instanceInjector = (instanceCache.$injector =
+          createInternalInjector(instanceCache, function(servicename) {
+            var provider = providerInjector.get(servicename + providerSuffix);
+            return instanceInjector.invoke(provider.$get, provider);
+          }));
+
+
+  forEach(loadModules(modulesToLoad), function(fn) { instanceInjector.invoke(fn || noop); });
+
+  return instanceInjector;
+
+  ////////////////////////////////////
+  // $provider
+  ////////////////////////////////////
+
+  function supportObject(delegate) {
+    return function(key, value) {
+      if (isObject(key)) {
+        forEach(key, reverseParams(delegate));
+      } else {
+        return delegate(key, value);
+      }
+    }
+  }
+
+  function provider(name, provider_) {
+    if (isFunction(provider_) || isArray(provider_)) {
+      provider_ = providerInjector.instantiate(provider_);
+    }
+    if (!provider_.$get) {
+      throw Error('Provider ' + name + ' must define $get factory method.');
+    }
+    return providerCache[name + providerSuffix] = provider_;
+  }
+
+  function factory(name, factoryFn) { return provider(name, { $get: factoryFn }); }
+
+  function service(name, constructor) {
+    return factory(name, ['$injector', function($injector) {
+      return $injector.instantiate(constructor);
+    }]);
+  }
+
+  function value(name, value) { return factory(name, valueFn(value)); }
+
+  function constant(name, value) {
+    providerCache[name] = value;
+    instanceCache[name] = value;
+  }
+
+  function decorator(serviceName, decorFn) {
+    var origProvider = providerInjector.get(serviceName + providerSuffix),
+        orig$get = origProvider.$get;
+
+    origProvider.$get = function() {
+      var origInstance = instanceInjector.invoke(orig$get, origProvider);
+      return instanceInjector.invoke(decorFn, null, {$delegate: origInstance});
+    };
+  }
+
+  ////////////////////////////////////
+  // Module Loading
+  ////////////////////////////////////
+  function loadModules(modulesToLoad){
+    var runBlocks = [];
+    forEach(modulesToLoad, function(module) {
+      if (loadedModules.get(module)) return;
+      loadedModules.put(module, true);
+      if (isString(module)) {
+        var moduleFn = angularModule(module);
+        runBlocks = runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks);
+
+        try {
+          for(var invokeQueue = moduleFn._invokeQueue, i = 0, ii = invokeQueue.length; i < ii; i++) {
+            var invokeArgs = invokeQueue[i],
+                provider = invokeArgs[0] == '$injector'
+                    ? providerInjector
+                    : providerInjector.get(invokeArgs[0]);
+
+            provider[invokeArgs[1]].apply(provider, invokeArgs[2]);
+          }
+        } catch (e) {
+          if (e.message) e.message += ' from ' + module;
+          throw e;
+        }
+      } else if (isFunction(module)) {
+        try {
+          runBlocks.push(providerInjector.invoke(module));
+        } catch (e) {
+          if (e.message) e.message += ' from ' + module;
+          throw e;
+        }
+      } else if (isArray(module)) {
+        try {
+          runBlocks.push(providerInjector.invoke(module));
+        } catch (e) {
+          if (e.message) e.message += ' from ' + String(module[module.length - 1]);
+          throw e;
+        }
+      } else {
+        assertArgFn(module, 'module');
+      }
+    });
+    return runBlocks;
+  }
+
+  ////////////////////////////////////
+  // internal Injector
+  ////////////////////////////////////
+
+  function createInternalInjector(cache, factory) {
+
+    function getService(serviceName) {
+      if (typeof serviceName !== 'string') {
+        throw Error('Service name expected');
+      }
+      if (cache.hasOwnProperty(serviceName)) {
+        if (cache[serviceName] === INSTANTIATING) {
+          throw Error('Circular dependency: ' + path.join(' <- '));
+        }
+        return cache[serviceName];
+      } else {
+        try {
+          path.unshift(serviceName);
+          cache[serviceName] = INSTANTIATING;
+          return cache[serviceName] = factory(serviceName);
+        } finally {
+          path.shift();
+        }
+      }
+    }
+
+    function invoke(fn, self, locals){
+      var args = [],
+          $inject = annotate(fn),
+          length, i,
+          key;
+
+      for(i = 0, length = $inject.length; i < length; i++) {
+        key = $inject[i];
+        args.push(
+          locals && locals.hasOwnProperty(key)
+          ? locals[key]
+          : getService(key)
+        );
+      }
+      if (!fn.$inject) {
+        // this means that we must be an array.
+        fn = fn[length];
+      }
+
+
+      // Performance optimization: http://jsperf.com/apply-vs-call-vs-invoke
+      switch (self ? -1 : args.length) {
+        case  0: return fn();
+        case  1: return fn(args[0]);
+        case  2: return fn(args[0], args[1]);
+        case  3: return fn(args[0], args[1], args[2]);
+        case  4: return fn(args[0], args[1], args[2], args[3]);
+        case  5: return fn(args[0], args[1], args[2], args[3], args[4]);
+        case  6: return fn(args[0], args[1], args[2], args[3], args[4], args[5]);
+        case  7: return fn(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
+        case  8: return fn(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7]);
+        case  9: return fn(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8]);
+        case 10: return fn(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8], args[9]);
+        default: return fn.apply(self, args);
+      }
+    }
+
+    function instantiate(Type, locals) {
+      var Constructor = function() {},
+          instance, returnedValue;
+
+      Constructor.prototype = (isArray(Type) ? Type[Type.length - 1] : Type).prototype;
+      instance = new Constructor();
+      returnedValue = invoke(Type, instance, locals);
+
+      return isObject(returnedValue) ? returnedValue : instance;
+    }
+
+    return {
+      invoke: invoke,
+      instantiate: instantiate,
+      get: getService,
+      annotate: annotate
+    };
+  }
+}
+/**
+ * @ngdoc function
+ * @name ng.$anchorScroll
+ * @requires $window
+ * @requires $location
+ * @requires $rootScope
+ *
+ * @description
+ * When called, it checks current value of `$location.hash()` and scroll to related element,
+ * according to rules specified in
+ * {@link http://dev.w3.org/html5/spec/Overview.html#the-indicated-part-of-the-document Html5 spec}.
+ *
+ * It also watches the `$location.hash()` and scroll whenever it changes to match any anchor.
+ * This can be disabled by calling `$anchorScrollProvider.disableAutoScrolling()`.
+ */
+function $AnchorScrollProvider() {
+
+  var autoScrollingEnabled = true;
+
+  this.disableAutoScrolling = function() {
+    autoScrollingEnabled = false;
+  };
+
+  this.$get = ['$window', '$location', '$rootScope', function($window, $location, $rootScope) {
+    var document = $window.document;
+
+    // helper function to get first anchor from a NodeList
+    // can't use filter.filter, as it accepts only instances of Array
+    // and IE can't convert NodeList to an array using [].slice
+    // TODO(vojta): use filter if we change it to accept lists as well
+    function getFirstAnchor(list) {
+      var result = null;
+      forEach(list, function(element) {
+        if (!result && lowercase(element.nodeName) === 'a') result = element;
+      });
+      return result;
+    }
+
+    function scroll() {
+      var hash = $location.hash(), elm;
+
+      // empty hash, scroll to the top of the page
+      if (!hash) $window.scrollTo(0, 0);
+
+      // element with given id
+      else if ((elm = document.getElementById(hash))) elm.scrollIntoView();
+
+      // first anchor with given name :-D
+      else if ((elm = getFirstAnchor(document.getElementsByName(hash)))) elm.scrollIntoView(

<TRUNCATED>

[06/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/bootstrap/custom/img/glyphicons-halflings-white.png
----------------------------------------------------------------------
diff --git a/portal/js/libs/bootstrap/custom/img/glyphicons-halflings-white.png b/portal/js/libs/bootstrap/custom/img/glyphicons-halflings-white.png
new file mode 100755
index 0000000..3bf6484
Binary files /dev/null and b/portal/js/libs/bootstrap/custom/img/glyphicons-halflings-white.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/bootstrap/custom/img/glyphicons-halflings.png
----------------------------------------------------------------------
diff --git a/portal/js/libs/bootstrap/custom/img/glyphicons-halflings.png b/portal/js/libs/bootstrap/custom/img/glyphicons-halflings.png
new file mode 100755
index 0000000..a996999
Binary files /dev/null and b/portal/js/libs/bootstrap/custom/img/glyphicons-halflings.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/bootstrap/custom/js/bootstrap.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/bootstrap/custom/js/bootstrap.js b/portal/js/libs/bootstrap/custom/js/bootstrap.js
new file mode 100755
index 0000000..96fed13
--- /dev/null
+++ b/portal/js/libs/bootstrap/custom/js/bootstrap.js
@@ -0,0 +1,2291 @@
+/* ===================================================
+ * bootstrap-transition.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#transitions
+ * ===================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+  /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
+   * ======================================================= */
+
+  $(function () {
+
+    $.support.transition = (function () {
+
+      var transitionEnd = (function () {
+
+        var el = document.createElement('bootstrap')
+          , transEndEventNames = {
+               'WebkitTransition' : 'webkitTransitionEnd'
+            ,  'MozTransition'    : 'transitionend'
+            ,  'OTransition'      : 'oTransitionEnd otransitionend'
+            ,  'transition'       : 'transitionend'
+            }
+          , name
+
+        for (name in transEndEventNames){
+          if (el.style[name] !== undefined) {
+            return transEndEventNames[name]
+          }
+        }
+
+      }())
+
+      return transitionEnd && {
+        end: transitionEnd
+      }
+
+    })()
+
+  })
+
+}(window.jQuery);
+/* =========================================================
+ * bootstrap-modal.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#modals
+ * =========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================= */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* MODAL CLASS DEFINITION
+  * ====================== */
+
+  var Modal = function (element, options) {
+    this.options = options
+    this.$element = $(element)
+      .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
+    this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
+  }
+
+  Modal.prototype = {
+
+      constructor: Modal
+
+    , toggle: function () {
+        return this[!this.isShown ? 'show' : 'hide']()
+      }
+
+    , show: function () {
+        var that = this
+          , e = $.Event('show')
+
+        this.$element.trigger(e)
+
+        if (this.isShown || e.isDefaultPrevented()) return
+
+        this.isShown = true
+
+        this.escape()
+
+        this.backdrop(function () {
+          var transition = $.support.transition && that.$element.hasClass('fade')
+
+          if (!that.$element.parent().length) {
+            that.$element.appendTo(document.body) //don't move modals dom position
+          }
+
+          that.$element.show()
+
+          if (transition) {
+            that.$element[0].offsetWidth // force reflow
+          }
+
+          that.$element
+            .addClass('in')
+            .attr('aria-hidden', false)
+
+          that.enforceFocus()
+
+          transition ?
+            that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
+            that.$element.focus().trigger('shown')
+
+        })
+      }
+
+    , hide: function (e) {
+        e && e.preventDefault()
+
+        var that = this
+
+        e = $.Event('hide')
+
+        this.$element.trigger(e)
+
+        if (!this.isShown || e.isDefaultPrevented()) return
+
+        this.isShown = false
+
+        this.escape()
+
+        $(document).off('focusin.modal')
+
+        this.$element
+          .removeClass('in')
+          .attr('aria-hidden', true)
+
+        $.support.transition && this.$element.hasClass('fade') ?
+          this.hideWithTransition() :
+          this.hideModal()
+      }
+
+    , enforceFocus: function () {
+        var that = this
+        $(document).on('focusin.modal', function (e) {
+          if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
+            that.$element.focus()
+          }
+        })
+      }
+
+    , escape: function () {
+        var that = this
+        if (this.isShown && this.options.keyboard) {
+          this.$element.on('keyup.dismiss.modal', function ( e ) {
+            e.which == 27 && that.hide()
+          })
+        } else if (!this.isShown) {
+          this.$element.off('keyup.dismiss.modal')
+        }
+      }
+
+    , hideWithTransition: function () {
+        var that = this
+          , timeout = setTimeout(function () {
+              that.$element.off($.support.transition.end)
+              that.hideModal()
+            }, 500)
+
+        this.$element.one($.support.transition.end, function () {
+          clearTimeout(timeout)
+          that.hideModal()
+        })
+      }
+
+    , hideModal: function () {
+        var that = this
+        this.$element.hide()
+        this.backdrop(function () {
+          that.removeBackdrop()
+          that.$element.trigger('hidden')
+        })
+      }
+
+    , removeBackdrop: function () {
+        this.$backdrop && this.$backdrop.remove()
+        this.$backdrop = null
+      }
+
+    , backdrop: function (callback) {
+        var that = this
+          , animate = this.$element.hasClass('fade') ? 'fade' : ''
+
+        if (this.isShown && this.options.backdrop) {
+          var doAnimate = $.support.transition && animate
+
+          this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
+            .appendTo(document.body)
+
+          this.$backdrop.click(
+            this.options.backdrop == 'static' ?
+              $.proxy(this.$element[0].focus, this.$element[0])
+            : $.proxy(this.hide, this)
+          )
+
+          if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
+
+          this.$backdrop.addClass('in')
+
+          if (!callback) return
+
+          doAnimate ?
+            this.$backdrop.one($.support.transition.end, callback) :
+            callback()
+
+        } else if (!this.isShown && this.$backdrop) {
+          this.$backdrop.removeClass('in')
+
+          $.support.transition && this.$element.hasClass('fade')?
+            this.$backdrop.one($.support.transition.end, callback) :
+            callback()
+
+        } else if (callback) {
+          callback()
+        }
+      }
+  }
+
+
+ /* MODAL PLUGIN DEFINITION
+  * ======================= */
+
+  var old = $.fn.modal
+
+  $.fn.modal = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('modal')
+        , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
+      if (!data) $this.data('modal', (data = new Modal(this, options)))
+      if (typeof option == 'string') data[option]()
+      else if (options.show) data.show()
+    })
+  }
+
+  $.fn.modal.defaults = {
+      backdrop: true
+    , keyboard: true
+    , show: true
+  }
+
+  $.fn.modal.Constructor = Modal
+
+
+ /* MODAL NO CONFLICT
+  * ================= */
+
+  $.fn.modal.noConflict = function () {
+    $.fn.modal = old
+    return this
+  }
+
+
+ /* MODAL DATA-API
+  * ============== */
+
+  $(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) {
+    var $this = $(this)
+      , href = $this.attr('href')
+      , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
+      , option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
+
+    e.preventDefault()
+
+    $target
+      .modal(option)
+      .one('hide', function () {
+        $this.focus()
+      })
+  })
+
+}(window.jQuery);
+
+/* ============================================================
+ * bootstrap-dropdown.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#dropdowns
+ * ============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* DROPDOWN CLASS DEFINITION
+  * ========================= */
+
+  var toggle = '[data-toggle=dropdown]'
+    , Dropdown = function (element) {
+        var $el = $(element).on('click.dropdown.data-api', this.toggle)
+        $('html').on('click.dropdown.data-api', function () {
+          $el.parent().removeClass('open')
+        })
+      }
+
+  Dropdown.prototype = {
+
+    constructor: Dropdown
+
+  , toggle: function (e) {
+      var $this = $(this)
+        , $parent
+        , isActive
+
+      if ($this.is('.disabled, :disabled')) return
+
+      $parent = getParent($this)
+
+      isActive = $parent.hasClass('open')
+
+      clearMenus()
+
+      if (!isActive) {
+        if ('ontouchstart' in document.documentElement) {
+          // if mobile we we use a backdrop because click events don't delegate
+          $('<div class="dropdown-backdrop"/>').insertBefore($(this)).on('click', clearMenus)
+        }
+        $parent.toggleClass('open')
+      }
+
+      $this.focus()
+
+      return false
+    }
+
+  , keydown: function (e) {
+      var $this
+        , $items
+        , $active
+        , $parent
+        , isActive
+        , index
+
+      if (!/(38|40|27)/.test(e.keyCode)) return
+
+      $this = $(this)
+
+      e.preventDefault()
+      e.stopPropagation()
+
+      if ($this.is('.disabled, :disabled')) return
+
+      $parent = getParent($this)
+
+      isActive = $parent.hasClass('open')
+
+      if (!isActive || (isActive && e.keyCode == 27)) {
+        if (e.which == 27) $parent.find(toggle).focus()
+        return $this.click()
+      }
+
+      $items = $('[role=menu] li:not(.divider):visible a', $parent)
+
+      if (!$items.length) return
+
+      index = $items.index($items.filter(':focus'))
+
+      if (e.keyCode == 38 && index > 0) index--                                        // up
+      if (e.keyCode == 40 && index < $items.length - 1) index++                        // down
+      if (!~index) index = 0
+
+      $items
+        .eq(index)
+        .focus()
+    }
+
+  }
+
+  function clearMenus() {
+    $('.dropdown-backdrop').remove()
+    $(toggle).each(function () {
+      getParent($(this)).removeClass('open')
+    })
+  }
+
+  function getParent($this) {
+    var selector = $this.attr('data-target')
+      , $parent
+
+    if (!selector) {
+      selector = $this.attr('href')
+      selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+    }
+
+    $parent = selector && $(selector)
+
+    if (!$parent || !$parent.length) $parent = $this.parent()
+
+    return $parent
+  }
+
+
+  /* DROPDOWN PLUGIN DEFINITION
+   * ========================== */
+
+  var old = $.fn.dropdown
+
+  $.fn.dropdown = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('dropdown')
+      if (!data) $this.data('dropdown', (data = new Dropdown(this)))
+      if (typeof option == 'string') data[option].call($this)
+    })
+  }
+
+  $.fn.dropdown.Constructor = Dropdown
+
+
+ /* DROPDOWN NO CONFLICT
+  * ==================== */
+
+  $.fn.dropdown.noConflict = function () {
+    $.fn.dropdown = old
+    return this
+  }
+
+
+  /* APPLY TO STANDARD DROPDOWN ELEMENTS
+   * =================================== */
+
+  $(document)
+    .on('click.dropdown.data-api', clearMenus)
+    .on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
+    .on('click.dropdown.data-api'  , toggle, Dropdown.prototype.toggle)
+    .on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
+
+}(window.jQuery);
+
+/* =============================================================
+ * bootstrap-scrollspy.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#scrollspy
+ * =============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* SCROLLSPY CLASS DEFINITION
+  * ========================== */
+
+  function ScrollSpy(element, options) {
+    var process = $.proxy(this.process, this)
+      , $element = $(element).is('body') ? $(window) : $(element)
+      , href
+    this.options = $.extend({}, $.fn.scrollspy.defaults, options)
+    this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
+    this.selector = (this.options.target
+      || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
+      || '') + ' .nav li > a'
+    this.$body = $('body')
+    this.refresh()
+    this.process()
+  }
+
+  ScrollSpy.prototype = {
+
+      constructor: ScrollSpy
+
+    , refresh: function () {
+        var self = this
+          , $targets
+
+        this.offsets = $([])
+        this.targets = $([])
+
+        $targets = this.$body
+          .find(this.selector)
+          .map(function () {
+            var $el = $(this)
+              , href = $el.data('target') || $el.attr('href')
+              , $href = /^#\w/.test(href) && $(href)
+            return ( $href
+              && $href.length
+              && [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]] ) || null
+          })
+          .sort(function (a, b) { return a[0] - b[0] })
+          .each(function () {
+            self.offsets.push(this[0])
+            self.targets.push(this[1])
+          })
+      }
+
+    , process: function () {
+        var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
+          , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
+          , maxScroll = scrollHeight - this.$scrollElement.height()
+          , offsets = this.offsets
+          , targets = this.targets
+          , activeTarget = this.activeTarget
+          , i
+
+        if (scrollTop >= maxScroll) {
+          return activeTarget != (i = targets.last()[0])
+            && this.activate ( i )
+        }
+
+        for (i = offsets.length; i--;) {
+          activeTarget != targets[i]
+            && scrollTop >= offsets[i]
+            && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
+            && this.activate( targets[i] )
+        }
+      }
+
+    , activate: function (target) {
+        var active
+          , selector
+
+        this.activeTarget = target
+
+        $(this.selector)
+          .parent('.active')
+          .removeClass('active')
+
+        selector = this.selector
+          + '[data-target="' + target + '"],'
+          + this.selector + '[href="' + target + '"]'
+
+        active = $(selector)
+          .parent('li')
+          .addClass('active')
+
+        if (active.parent('.dropdown-menu').length)  {
+          active = active.closest('li.dropdown').addClass('active')
+        }
+
+        active.trigger('activate')
+      }
+
+  }
+
+
+ /* SCROLLSPY PLUGIN DEFINITION
+  * =========================== */
+
+  var old = $.fn.scrollspy
+
+  $.fn.scrollspy = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('scrollspy')
+        , options = typeof option == 'object' && option
+      if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.scrollspy.Constructor = ScrollSpy
+
+  $.fn.scrollspy.defaults = {
+    offset: 10
+  }
+
+
+ /* SCROLLSPY NO CONFLICT
+  * ===================== */
+
+  $.fn.scrollspy.noConflict = function () {
+    $.fn.scrollspy = old
+    return this
+  }
+
+
+ /* SCROLLSPY DATA-API
+  * ================== */
+
+  $(window).on('load', function () {
+    $('[data-spy="scroll"]').each(function () {
+      var $spy = $(this)
+      $spy.scrollspy($spy.data())
+    })
+  })
+
+}(window.jQuery);
+/* ========================================================
+ * bootstrap-tab.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#tabs
+ * ========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ======================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* TAB CLASS DEFINITION
+  * ==================== */
+
+  var Tab = function (element) {
+    this.element = $(element)
+  }
+
+  Tab.prototype = {
+
+    constructor: Tab
+
+  , show: function () {
+      var $this = this.element
+        , $ul = $this.closest('ul:not(.dropdown-menu)')
+        , selector = $this.attr('data-target')
+        , previous
+        , $target
+        , e
+
+      if (!selector) {
+        selector = $this.attr('href')
+        selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+      }
+
+      if ( $this.parent('li').hasClass('active') ) return
+
+      previous = $ul.find('.active:last a')[0]
+
+      e = $.Event('show', {
+        relatedTarget: previous
+      })
+
+      $this.trigger(e)
+
+      if (e.isDefaultPrevented()) return
+
+      $target = $(selector)
+
+      this.activate($this.parent('li'), $ul)
+      this.activate($target, $target.parent(), function () {
+        $this.trigger({
+          type: 'shown'
+        , relatedTarget: previous
+        })
+      })
+    }
+
+  , activate: function ( element, container, callback) {
+      var $active = container.find('> .active')
+        , transition = callback
+            && $.support.transition
+            && $active.hasClass('fade')
+
+      function next() {
+        $active
+          .removeClass('active')
+          .find('> .dropdown-menu > .active')
+          .removeClass('active')
+
+        element.addClass('active')
+
+        if (transition) {
+          element[0].offsetWidth // reflow for transition
+          element.addClass('in')
+        } else {
+          element.removeClass('fade')
+        }
+
+        if ( element.parent('.dropdown-menu') ) {
+          element.closest('li.dropdown').addClass('active')
+        }
+
+        callback && callback()
+      }
+
+      transition ?
+        $active.one($.support.transition.end, next) :
+        next()
+
+      $active.removeClass('in')
+    }
+  }
+
+
+ /* TAB PLUGIN DEFINITION
+  * ===================== */
+
+  var old = $.fn.tab
+
+  $.fn.tab = function ( option ) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('tab')
+      if (!data) $this.data('tab', (data = new Tab(this)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.tab.Constructor = Tab
+
+
+ /* TAB NO CONFLICT
+  * =============== */
+
+  $.fn.tab.noConflict = function () {
+    $.fn.tab = old
+    return this
+  }
+
+
+ /* TAB DATA-API
+  * ============ */
+
+  $(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
+    e.preventDefault()
+    $(this).tab('show')
+  })
+
+}(window.jQuery);
+/* ===========================================================
+ * bootstrap-tooltip.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#tooltips
+ * Inspired by the original jQuery.tipsy by Jason Frame
+ * ===========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* TOOLTIP PUBLIC CLASS DEFINITION
+  * =============================== */
+
+  var Tooltip = function (element, options) {
+    this.init('tooltip', element, options)
+  }
+
+  Tooltip.prototype = {
+
+    constructor: Tooltip
+
+  , init: function (type, element, options) {
+      var eventIn
+        , eventOut
+        , triggers
+        , trigger
+        , i
+
+      this.type = type
+      this.$element = $(element)
+      this.options = this.getOptions(options)
+      this.enabled = true
+
+      triggers = this.options.trigger.split(' ')
+
+      for (i = triggers.length; i--;) {
+        trigger = triggers[i]
+        if (trigger == 'click') {
+          this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
+        } else if (trigger != 'manual') {
+          eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
+          eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
+          this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
+          this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
+        }
+      }
+
+      this.options.selector ?
+        (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
+        this.fixTitle()
+    }
+
+  , getOptions: function (options) {
+      options = $.extend({}, $.fn[this.type].defaults, this.$element.data(), options)
+
+      if (options.delay && typeof options.delay == 'number') {
+        options.delay = {
+          show: options.delay
+        , hide: options.delay
+        }
+      }
+
+      return options
+    }
+
+  , enter: function (e) {
+      var defaults = $.fn[this.type].defaults
+        , options = {}
+        , self
+
+      this._options && $.each(this._options, function (key, value) {
+        if (defaults[key] != value) options[key] = value
+      }, this)
+
+      self = $(e.currentTarget)[this.type](options).data(this.type)
+
+      if (!self.options.delay || !self.options.delay.show) return self.show()
+
+      clearTimeout(this.timeout)
+      self.hoverState = 'in'
+      this.timeout = setTimeout(function() {
+        if (self.hoverState == 'in') self.show()
+      }, self.options.delay.show)
+    }
+
+  , leave: function (e) {
+      var self = $(e.currentTarget)[this.type](this._options).data(this.type)
+
+      if (this.timeout) clearTimeout(this.timeout)
+      if (!self.options.delay || !self.options.delay.hide) return self.hide()
+
+      self.hoverState = 'out'
+      this.timeout = setTimeout(function() {
+        if (self.hoverState == 'out') self.hide()
+      }, self.options.delay.hide)
+    }
+
+  , show: function () {
+      var $tip
+        , pos
+        , actualWidth
+        , actualHeight
+        , placement
+        , tp
+        , e = $.Event('show')
+
+      if (this.hasContent() && this.enabled) {
+        this.$element.trigger(e)
+        if (e.isDefaultPrevented()) return
+        $tip = this.tip()
+        this.setContent()
+
+        if (this.options.animation) {
+          $tip.addClass('fade')
+        }
+
+        placement = typeof this.options.placement == 'function' ?
+          this.options.placement.call(this, $tip[0], this.$element[0]) :
+          this.options.placement
+
+        $tip
+          .detach()
+          .css({ top: 0, left: 0, display: 'block' })
+
+        this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
+
+        pos = this.getPosition()
+
+        actualWidth = $tip[0].offsetWidth
+        actualHeight = $tip[0].offsetHeight
+
+        switch (placement) {
+          case 'bottom':
+            tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
+            break
+          case 'top':
+            tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
+            break
+          case 'left':
+            tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
+            break
+          case 'right':
+            tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
+            break
+        }
+
+        this.applyPlacement(tp, placement)
+        this.$element.trigger('shown')
+      }
+    }
+
+  , applyPlacement: function(offset, placement){
+      var $tip = this.tip()
+        , width = $tip[0].offsetWidth
+        , height = $tip[0].offsetHeight
+        , actualWidth
+        , actualHeight
+        , delta
+        , replace
+
+      $tip
+        .offset(offset)
+        .addClass(placement)
+        .addClass('in')
+
+      actualWidth = $tip[0].offsetWidth
+      actualHeight = $tip[0].offsetHeight
+
+      if (placement == 'top' && actualHeight != height) {
+        offset.top = offset.top + height - actualHeight
+        replace = true
+      }
+
+      if (placement == 'bottom' || placement == 'top') {
+        delta = 0
+
+        if (offset.left < 0){
+          delta = offset.left * -2
+          offset.left = 0
+          $tip.offset(offset)
+          actualWidth = $tip[0].offsetWidth
+          actualHeight = $tip[0].offsetHeight
+        }
+
+        this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
+      } else {
+        this.replaceArrow(actualHeight - height, actualHeight, 'top')
+      }
+
+      if (replace) $tip.offset(offset)
+    }
+
+  , replaceArrow: function(delta, dimension, position){
+      this
+        .arrow()
+        .css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
+    }
+
+  , setContent: function () {
+      var $tip = this.tip()
+        , title = this.getTitle()
+
+      $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
+      $tip.removeClass('fade in top bottom left right')
+    }
+
+  , hide: function () {
+      var that = this
+        , $tip = this.tip()
+        , e = $.Event('hide')
+
+      this.$element.trigger(e)
+      if (e.isDefaultPrevented()) return
+
+      $tip.removeClass('in')
+
+      function removeWithAnimation() {
+        var timeout = setTimeout(function () {
+          $tip.off($.support.transition.end).detach()
+        }, 500)
+
+        $tip.one($.support.transition.end, function () {
+          clearTimeout(timeout)
+          $tip.detach()
+        })
+      }
+
+      $.support.transition && this.$tip.hasClass('fade') ?
+        removeWithAnimation() :
+        $tip.detach()
+
+      this.$element.trigger('hidden')
+
+      return this
+    }
+
+  , fixTitle: function () {
+      var $e = this.$element
+      if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
+        $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
+      }
+    }
+
+  , hasContent: function () {
+      return this.getTitle()
+    }
+
+  , getPosition: function () {
+      var el = this.$element[0]
+      return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
+        width: el.offsetWidth
+      , height: el.offsetHeight
+      }, this.$element.offset())
+    }
+
+  , getTitle: function () {
+      var title
+        , $e = this.$element
+        , o = this.options
+
+      title = $e.attr('data-original-title')
+        || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)
+
+      return title
+    }
+
+  , tip: function () {
+      return this.$tip = this.$tip || $(this.options.template)
+    }
+
+  , arrow: function(){
+      return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
+    }
+
+  , validate: function () {
+      if (!this.$element[0].parentNode) {
+        this.hide()
+        this.$element = null
+        this.options = null
+      }
+    }
+
+  , enable: function () {
+      this.enabled = true
+    }
+
+  , disable: function () {
+      this.enabled = false
+    }
+
+  , toggleEnabled: function () {
+      this.enabled = !this.enabled
+    }
+
+  , toggle: function (e) {
+      var self = e ? $(e.currentTarget)[this.type](this._options).data(this.type) : this
+      self.tip().hasClass('in') ? self.hide() : self.show()
+    }
+
+  , destroy: function () {
+      this.hide().$element.off('.' + this.type).removeData(this.type)
+    }
+
+  }
+
+
+ /* TOOLTIP PLUGIN DEFINITION
+  * ========================= */
+
+  var old = $.fn.tooltip
+
+  $.fn.tooltip = function ( option ) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('tooltip')
+        , options = typeof option == 'object' && option
+      if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.tooltip.Constructor = Tooltip
+
+  $.fn.tooltip.defaults = {
+    animation: true
+  , placement: 'top'
+  , selector: false
+  , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
+  , trigger: 'hover focus'
+  , title: ''
+  , delay: 0
+  , html: false
+  , container: false
+  }
+
+
+ /* TOOLTIP NO CONFLICT
+  * =================== */
+
+  $.fn.tooltip.noConflict = function () {
+    $.fn.tooltip = old
+    return this
+  }
+
+}(window.jQuery);
+
+/* ===========================================================
+ * bootstrap-popover.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#popovers
+ * ===========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* POPOVER PUBLIC CLASS DEFINITION
+  * =============================== */
+
+  var Popover = function (element, options) {
+    this.init('popover', element, options)
+  }
+
+
+  /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
+     ========================================== */
+
+  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
+
+    constructor: Popover
+
+  , setContent: function () {
+      var $tip = this.tip()
+        , title = this.getTitle()
+        , content = this.getContent()
+
+      $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
+      $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
+
+      $tip.removeClass('fade top bottom left right in')
+    }
+
+  , hasContent: function () {
+      return this.getTitle() || this.getContent()
+    }
+
+  , getContent: function () {
+      var content
+        , $e = this.$element
+        , o = this.options
+
+      content = (typeof o.content == 'function' ? o.content.call($e[0]) :  o.content)
+        || $e.attr('data-content')
+
+      return content
+    }
+
+  , tip: function () {
+      if (!this.$tip) {
+        this.$tip = $(this.options.template)
+      }
+      return this.$tip
+    }
+
+  , destroy: function () {
+      this.hide().$element.off('.' + this.type).removeData(this.type)
+    }
+
+  })
+
+
+ /* POPOVER PLUGIN DEFINITION
+  * ======================= */
+
+  var old = $.fn.popover
+
+  $.fn.popover = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('popover')
+        , options = typeof option == 'object' && option
+      if (!data) $this.data('popover', (data = new Popover(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.popover.Constructor = Popover
+
+  $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
+    placement: 'right'
+  , trigger: 'click'
+  , content: ''
+  , template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
+  })
+
+
+ /* POPOVER NO CONFLICT
+  * =================== */
+
+  $.fn.popover.noConflict = function () {
+    $.fn.popover = old
+    return this
+  }
+
+}(window.jQuery);
+
+/* ==========================================================
+ * bootstrap-affix.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#affix
+ * ==========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* AFFIX CLASS DEFINITION
+  * ====================== */
+
+  var Affix = function (element, options) {
+    this.options = $.extend({}, $.fn.affix.defaults, options)
+    this.$window = $(window)
+      .on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
+      .on('click.affix.data-api',  $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
+    this.$element = $(element)
+    this.checkPosition()
+  }
+
+  Affix.prototype.checkPosition = function () {
+    if (!this.$element.is(':visible')) return
+
+    var scrollHeight = $(document).height()
+      , scrollTop = this.$window.scrollTop()
+      , position = this.$element.offset()
+      , offset = this.options.offset
+      , offsetBottom = offset.bottom
+      , offsetTop = offset.top
+      , reset = 'affix affix-top affix-bottom'
+      , affix
+
+    if (typeof offset != 'object') offsetBottom = offsetTop = offset
+    if (typeof offsetTop == 'function') offsetTop = offset.top()
+    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
+
+    affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
+      false    : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
+      'bottom' : offsetTop != null && scrollTop <= offsetTop ?
+      'top'    : false
+
+    if (this.affixed === affix) return
+
+    this.affixed = affix
+    this.unpin = affix == 'bottom' ? position.top - scrollTop : null
+
+    this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
+  }
+
+
+ /* AFFIX PLUGIN DEFINITION
+  * ======================= */
+
+  var old = $.fn.affix
+
+  $.fn.affix = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('affix')
+        , options = typeof option == 'object' && option
+      if (!data) $this.data('affix', (data = new Affix(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.affix.Constructor = Affix
+
+  $.fn.affix.defaults = {
+    offset: 0
+  }
+
+
+ /* AFFIX NO CONFLICT
+  * ================= */
+
+  $.fn.affix.noConflict = function () {
+    $.fn.affix = old
+    return this
+  }
+
+
+ /* AFFIX DATA-API
+  * ============== */
+
+  $(window).on('load', function () {
+    $('[data-spy="affix"]').each(function () {
+      var $spy = $(this)
+        , data = $spy.data()
+
+      data.offset = data.offset || {}
+
+      data.offsetBottom && (data.offset.bottom = data.offsetBottom)
+      data.offsetTop && (data.offset.top = data.offsetTop)
+
+      $spy.affix(data)
+    })
+  })
+
+
+}(window.jQuery);
+/* ==========================================================
+ * bootstrap-alert.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#alerts
+ * ==========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* ALERT CLASS DEFINITION
+  * ====================== */
+
+  var dismiss = '[data-dismiss="alert"]'
+    , Alert = function (el) {
+        $(el).on('click', dismiss, this.close)
+      }
+
+  Alert.prototype.close = function (e) {
+    var $this = $(this)
+      , selector = $this.attr('data-target')
+      , $parent
+
+    if (!selector) {
+      selector = $this.attr('href')
+      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+    }
+
+    $parent = $(selector)
+
+    e && e.preventDefault()
+
+    $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
+
+    $parent.trigger(e = $.Event('close'))
+
+    if (e.isDefaultPrevented()) return
+
+    $parent.removeClass('in')
+
+    function removeElement() {
+      $parent
+        .trigger('closed')
+        .remove()
+    }
+
+    $.support.transition && $parent.hasClass('fade') ?
+      $parent.on($.support.transition.end, removeElement) :
+      removeElement()
+  }
+
+
+ /* ALERT PLUGIN DEFINITION
+  * ======================= */
+
+  var old = $.fn.alert
+
+  $.fn.alert = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('alert')
+      if (!data) $this.data('alert', (data = new Alert(this)))
+      if (typeof option == 'string') data[option].call($this)
+    })
+  }
+
+  $.fn.alert.Constructor = Alert
+
+
+ /* ALERT NO CONFLICT
+  * ================= */
+
+  $.fn.alert.noConflict = function () {
+    $.fn.alert = old
+    return this
+  }
+
+
+ /* ALERT DATA-API
+  * ============== */
+
+  $(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
+
+}(window.jQuery);
+/* ============================================================
+ * bootstrap-button.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#buttons
+ * ============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* BUTTON PUBLIC CLASS DEFINITION
+  * ============================== */
+
+  var Button = function (element, options) {
+    this.$element = $(element)
+    this.options = $.extend({}, $.fn.button.defaults, options)
+  }
+
+  Button.prototype.setState = function (state) {
+    var d = 'disabled'
+      , $el = this.$element
+      , data = $el.data()
+      , val = $el.is('input') ? 'val' : 'html'
+
+    state = state + 'Text'
+    data.resetText || $el.data('resetText', $el[val]())
+
+    $el[val](data[state] || this.options[state])
+
+    // push to event loop to allow forms to submit
+    setTimeout(function () {
+      state == 'loadingText' ?
+        $el.addClass(d).attr(d, d) :
+        $el.removeClass(d).removeAttr(d)
+    }, 0)
+  }
+
+  Button.prototype.toggle = function () {
+    var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
+
+    $parent && $parent
+      .find('.active')
+      .removeClass('active')
+
+    this.$element.toggleClass('active')
+  }
+
+
+ /* BUTTON PLUGIN DEFINITION
+  * ======================== */
+
+  var old = $.fn.button
+
+  $.fn.button = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('button')
+        , options = typeof option == 'object' && option
+      if (!data) $this.data('button', (data = new Button(this, options)))
+      if (option == 'toggle') data.toggle()
+      else if (option) data.setState(option)
+    })
+  }
+
+  $.fn.button.defaults = {
+    loadingText: 'loading...'
+  }
+
+  $.fn.button.Constructor = Button
+
+
+ /* BUTTON NO CONFLICT
+  * ================== */
+
+  $.fn.button.noConflict = function () {
+    $.fn.button = old
+    return this
+  }
+
+
+ /* BUTTON DATA-API
+  * =============== */
+
+  $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) {
+    var $btn = $(e.target)
+    if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
+    $btn.button('toggle')
+  })
+
+}(window.jQuery);
+/* =============================================================
+ * bootstrap-collapse.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#collapse
+ * =============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* COLLAPSE PUBLIC CLASS DEFINITION
+  * ================================ */
+
+  var Collapse = function (element, options) {
+    this.$element = $(element)
+    this.options = $.extend({}, $.fn.collapse.defaults, options)
+
+    if (this.options.parent) {
+      this.$parent = $(this.options.parent)
+    }
+
+    this.options.toggle && this.toggle()
+  }
+
+  Collapse.prototype = {
+
+    constructor: Collapse
+
+  , dimension: function () {
+      var hasWidth = this.$element.hasClass('width')
+      return hasWidth ? 'width' : 'height'
+    }
+
+  , show: function () {
+      var dimension
+        , scroll
+        , actives
+        , hasData
+
+      if (this.transitioning || this.$element.hasClass('in')) return
+
+      dimension = this.dimension()
+      scroll = $.camelCase(['scroll', dimension].join('-'))
+      actives = this.$parent && this.$parent.find('> .accordion-group > .in')
+
+      if (actives && actives.length) {
+        hasData = actives.data('collapse')
+        if (hasData && hasData.transitioning) return
+        actives.collapse('hide')
+        hasData || actives.data('collapse', null)
+      }
+
+      this.$element[dimension](0)
+      this.transition('addClass', $.Event('show'), 'shown')
+      $.support.transition && this.$element[dimension](this.$element[0][scroll])
+    }
+
+  , hide: function () {
+      var dimension
+      if (this.transitioning || !this.$element.hasClass('in')) return
+      dimension = this.dimension()
+      this.reset(this.$element[dimension]())
+      this.transition('removeClass', $.Event('hide'), 'hidden')
+      this.$element[dimension](0)
+    }
+
+  , reset: function (size) {
+      var dimension = this.dimension()
+
+      this.$element
+        .removeClass('collapse')
+        [dimension](size || 'auto')
+        [0].offsetWidth
+
+      this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
+
+      return this
+    }
+
+  , transition: function (method, startEvent, completeEvent) {
+      var that = this
+        , complete = function () {
+            if (startEvent.type == 'show') that.reset()
+            that.transitioning = 0
+            that.$element.trigger(completeEvent)
+          }
+
+      this.$element.trigger(startEvent)
+
+      if (startEvent.isDefaultPrevented()) return
+
+      this.transitioning = 1
+
+      this.$element[method]('in')
+
+      $.support.transition && this.$element.hasClass('collapse') ?
+        this.$element.one($.support.transition.end, complete) :
+        complete()
+    }
+
+  , toggle: function () {
+      this[this.$element.hasClass('in') ? 'hide' : 'show']()
+    }
+
+  }
+
+
+ /* COLLAPSE PLUGIN DEFINITION
+  * ========================== */
+
+  var old = $.fn.collapse
+
+  $.fn.collapse = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('collapse')
+        , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
+      if (!data) $this.data('collapse', (data = new Collapse(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.collapse.defaults = {
+    toggle: true
+  }
+
+  $.fn.collapse.Constructor = Collapse
+
+
+ /* COLLAPSE NO CONFLICT
+  * ==================== */
+
+  $.fn.collapse.noConflict = function () {
+    $.fn.collapse = old
+    return this
+  }
+
+
+ /* COLLAPSE DATA-API
+  * ================= */
+
+  $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
+    var $this = $(this), href
+      , target = $this.attr('data-target')
+        || e.preventDefault()
+        || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
+      , option = $(target).data('collapse') ? 'toggle' : $this.data()
+    $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
+    $(target).collapse(option)
+  })
+
+}(window.jQuery);
+/* ==========================================================
+ * bootstrap-carousel.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#carousel
+ * ==========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* CAROUSEL CLASS DEFINITION
+  * ========================= */
+
+  var Carousel = function (element, options) {
+    this.$element = $(element)
+    this.$indicators = this.$element.find('.carousel-indicators')
+    this.options = options
+    this.options.pause == 'hover' && this.$element
+      .on('mouseenter', $.proxy(this.pause, this))
+      .on('mouseleave', $.proxy(this.cycle, this))
+  }
+
+  Carousel.prototype = {
+
+    cycle: function (e) {
+      if (!e) this.paused = false
+      if (this.interval) clearInterval(this.interval);
+      this.options.interval
+        && !this.paused
+        && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
+      return this
+    }
+
+  , getActiveIndex: function () {
+      this.$active = this.$element.find('.item.active')
+      this.$items = this.$active.parent().children()
+      return this.$items.index(this.$active)
+    }
+
+  , to: function (pos) {
+      var activeIndex = this.getActiveIndex()
+        , that = this
+
+      if (pos > (this.$items.length - 1) || pos < 0) return
+
+      if (this.sliding) {
+        return this.$element.one('slid', function () {
+          that.to(pos)
+        })
+      }
+
+      if (activeIndex == pos) {
+        return this.pause().cycle()
+      }
+
+      return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
+    }
+
+  , pause: function (e) {
+      if (!e) this.paused = true
+      if (this.$element.find('.next, .prev').length && $.support.transition.end) {
+        this.$element.trigger($.support.transition.end)
+        this.cycle(true)
+      }
+      clearInterval(this.interval)
+      this.interval = null
+      return this
+    }
+
+  , next: function () {
+      if (this.sliding) return
+      return this.slide('next')
+    }
+
+  , prev: function () {
+      if (this.sliding) return
+      return this.slide('prev')
+    }
+
+  , slide: function (type, next) {
+      var $active = this.$element.find('.item.active')
+        , $next = next || $active[type]()
+        , isCycling = this.interval
+        , direction = type == 'next' ? 'left' : 'right'
+        , fallback  = type == 'next' ? 'first' : 'last'
+        , that = this
+        , e
+
+      this.sliding = true
+
+      isCycling && this.pause()
+
+      $next = $next.length ? $next : this.$element.find('.item')[fallback]()
+
+      e = $.Event('slide', {
+        relatedTarget: $next[0]
+      , direction: direction
+      })
+
+      if ($next.hasClass('active')) return
+
+      if (this.$indicators.length) {
+        this.$indicators.find('.active').removeClass('active')
+        this.$element.one('slid', function () {
+          var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
+          $nextIndicator && $nextIndicator.addClass('active')
+        })
+      }
+
+      if ($.support.transition && this.$element.hasClass('slide')) {
+        this.$element.trigger(e)
+        if (e.isDefaultPrevented()) return
+        $next.addClass(type)
+        $next[0].offsetWidth // force reflow
+        $active.addClass(direction)
+        $next.addClass(direction)
+        this.$element.one($.support.transition.end, function () {
+          $next.removeClass([type, direction].join(' ')).addClass('active')
+          $active.removeClass(['active', direction].join(' '))
+          that.sliding = false
+          setTimeout(function () { that.$element.trigger('slid') }, 0)
+        })
+      } else {
+        this.$element.trigger(e)
+        if (e.isDefaultPrevented()) return
+        $active.removeClass('active')
+        $next.addClass('active')
+        this.sliding = false
+        this.$element.trigger('slid')
+      }
+
+      isCycling && this.cycle()
+
+      return this
+    }
+
+  }
+
+
+ /* CAROUSEL PLUGIN DEFINITION
+  * ========================== */
+
+  var old = $.fn.carousel
+
+  $.fn.carousel = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('carousel')
+        , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
+        , action = typeof option == 'string' ? option : options.slide
+      if (!data) $this.data('carousel', (data = new Carousel(this, options)))
+      if (typeof option == 'number') data.to(option)
+      else if (action) data[action]()
+      else if (options.interval) data.pause().cycle()
+    })
+  }
+
+  $.fn.carousel.defaults = {
+    interval: 5000
+  , pause: 'hover'
+  }
+
+  $.fn.carousel.Constructor = Carousel
+
+
+ /* CAROUSEL NO CONFLICT
+  * ==================== */
+
+  $.fn.carousel.noConflict = function () {
+    $.fn.carousel = old
+    return this
+  }
+
+ /* CAROUSEL DATA-API
+  * ================= */
+
+  $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
+    var $this = $(this), href
+      , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
+      , options = $.extend({}, $target.data(), $this.data())
+      , slideIndex
+
+    $target.carousel(options)
+
+    if (slideIndex = $this.attr('data-slide-to')) {
+      $target.data('carousel').pause().to(slideIndex).cycle()
+    }
+
+    e.preventDefault()
+  })
+
+}(window.jQuery);
+/* =============================================================
+ * bootstrap-typeahead.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#typeahead
+ * =============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function($){
+
+  "use strict"; // jshint ;_;
+
+
+ /* TYPEAHEAD PUBLIC CLASS DEFINITION
+  * ================================= */
+
+  var Typeahead = function (element, options) {
+    this.$element = $(element)
+    this.options = $.extend({}, $.fn.typeahead.defaults, options)
+    this.matcher = this.options.matcher || this.matcher
+    this.sorter = this.options.sorter || this.sorter
+    this.highlighter = this.options.highlighter || this.highlighter
+    this.updater = this.options.updater || this.updater
+    this.source = this.options.source
+    this.$menu = $(this.options.menu)
+    this.shown = false
+    this.listen()
+  }
+
+  Typeahead.prototype = {
+
+    constructor: Typeahead
+
+  , select: function () {
+      var val = this.$menu.find('.active').attr('data-value')
+      this.$element
+        .val(this.updater(val))
+        .change()
+      return this.hide()
+    }
+
+  , updater: function (item) {
+      return item
+    }
+
+  , show: function () {
+      var pos = $.extend({}, this.$element.position(), {
+        height: this.$element[0].offsetHeight
+      })
+
+      this.$menu
+        .insertAfter(this.$element)
+        .css({
+          top: pos.top + pos.height
+        , left: pos.left
+        })
+        .show()
+
+      this.shown = true
+      return this
+    }
+
+  , hide: function () {
+      this.$menu.hide()
+      this.shown = false
+      return this
+    }
+
+  , lookup: function (event) {
+      var items
+
+      this.query = this.$element.val()
+
+      if (!this.query || this.query.length < this.options.minLength) {
+        return this.shown ? this.hide() : this
+      }
+
+      items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source
+
+      return items ? this.process(items) : this
+    }
+
+  , process: function (items) {
+      var that = this
+
+      items = $.grep(items, function (item) {
+        return that.matcher(item)
+      })
+
+      items = this.sorter(items)
+
+      if (!items.length) {
+        return this.shown ? this.hide() : this
+      }
+
+      return this.render(items.slice(0, this.options.items)).show()
+    }
+
+  , matcher: function (item) {
+      return ~item.toLowerCase().indexOf(this.query.toLowerCase())
+    }
+
+  , sorter: function (items) {
+      var beginswith = []
+        , caseSensitive = []
+        , caseInsensitive = []
+        , item
+
+      while (item = items.shift()) {
+        if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
+        else if (~item.indexOf(this.query)) caseSensitive.push(item)
+        else caseInsensitive.push(item)
+      }
+
+      return beginswith.concat(caseSensitive, caseInsensitive)
+    }
+
+  , highlighter: function (item) {
+      var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
+      return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
+        return '<strong>' + match + '</strong>'
+      })
+    }
+
+  , render: function (items) {
+      var that = this
+
+      items = $(items).map(function (i, item) {
+        i = $(that.options.item).attr('data-value', item)
+        i.find('a').html(that.highlighter(item))
+        return i[0]
+      })
+
+      items.first().addClass('active')
+      this.$menu.html(items)
+      return this
+    }
+
+  , next: function (event) {
+      var active = this.$menu.find('.active').removeClass('active')
+        , next = active.next()
+
+      if (!next.length) {
+        next = $(this.$menu.find('li')[0])
+      }
+
+      next.addClass('active')
+    }
+
+  , prev: function (event) {
+      var active = this.$menu.find('.active').removeClass('active')
+        , prev = active.prev()
+
+      if (!prev.length) {
+        prev = this.$menu.find('li').last()
+      }
+
+      prev.addClass('active')
+    }
+
+  , listen: function () {
+      this.$element
+        .on('focus',    $.proxy(this.focus, this))
+        .on('blur',     $.proxy(this.blur, this))
+        .on('keypress', $.proxy(this.keypress, this))
+        .on('keyup',    $.proxy(this.keyup, this))
+
+      if (this.eventSupported('keydown')) {
+        this.$element.on('keydown', $.proxy(this.keydown, this))
+      }
+
+      this.$menu
+        .on('click', $.proxy(this.click, this))
+        .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
+        .on('mouseleave', 'li', $.proxy(this.mouseleave, this))
+    }
+
+  , eventSupported: function(eventName) {
+      var isSupported = eventName in this.$element
+      if (!isSupported) {
+        this.$element.setAttribute(eventName, 'return;')
+        isSupported = typeof this.$element[eventName] === 'function'
+      }
+      return isSupported
+    }
+
+  , move: function (e) {
+      if (!this.shown) return
+
+      switch(e.keyCode) {
+        case 9: // tab
+        case 13: // enter
+        case 27: // escape
+          e.preventDefault()
+          break
+
+        case 38: // up arrow
+          e.preventDefault()
+          this.prev()
+          break
+
+        case 40: // down arrow
+          e.preventDefault()
+          this.next()
+          break
+      }
+
+      e.stopPropagation()
+    }
+
+  , keydown: function (e) {
+      this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27])
+      this.move(e)
+    }
+
+  , keypress: function (e) {
+      if (this.suppressKeyPressRepeat) return
+      this.move(e)
+    }
+
+  , keyup: function (e) {
+      switch(e.keyCode) {
+        case 40: // down arrow
+        case 38: // up arrow
+        case 16: // shift
+        case 17: // ctrl
+        case 18: // alt
+          break
+
+        case 9: // tab
+        case 13: // enter
+          if (!this.shown) return
+          this.select()
+          break
+
+        case 27: // escape
+          if (!this.shown) return
+          this.hide()
+          break
+
+        default:
+          this.lookup()
+      }
+
+      e.stopPropagation()
+      e.preventDefault()
+  }
+
+  , focus: function (e) {
+      this.focused = true
+    }
+
+  , blur: function (e) {
+      this.focused = false
+      if (!this.mousedover && this.shown) this.hide()
+    }
+
+  , click: function (e) {
+      e.stopPropagation()
+      e.preventDefault()
+      this.select()
+      this.$element.focus()
+    }
+
+  , mouseenter: function (e) {
+      this.mousedover = true
+      this.$menu.find('.active').removeClass('active')
+      $(e.currentTarget).addClass('active')
+    }
+
+  , mouseleave: function (e) {
+      this.mousedover = false
+      if (!this.focused && this.shown) this.hide()
+    }
+
+  }
+
+
+  /* TYPEAHEAD PLUGIN DEFINITION
+   * =========================== */
+
+  var old = $.fn.typeahead
+
+  $.fn.typeahead = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('typeahead')
+        , options = typeof option == 'object' && option
+      if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.typeahead.defaults = {
+    source: []
+  , items: 8
+  , menu: '<ul class="typeahead dropdown-menu"></ul>'
+  , item: '<li><a href="#"></a></li>'
+  , minLength: 1
+  }
+
+  $.fn.typeahead.Constructor = Typeahead
+
+
+ /* TYPEAHEAD NO CONFLICT
+  * =================== */
+
+  $.fn.typeahead.noConflict = function () {
+    $.fn.typeahead = old
+    return this
+  }
+
+
+ /* TYPEAHEAD DATA-API
+  * ================== */
+
+  $(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
+    var $this = $(this)
+    if ($this.data('typeahead')) return
+    $this.typeahead($this.data())
+  })
+
+}(window.jQuery);


[23/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.1.5/angular-1.1.5.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.1.5/angular-1.1.5.js b/portal/js/libs/angular-1.1.5/angular-1.1.5.js
new file mode 100644
index 0000000..5a732aa
--- /dev/null
+++ b/portal/js/libs/angular-1.1.5/angular-1.1.5.js
@@ -0,0 +1,16876 @@
+/**
+ * @license AngularJS v1.1.5
+ * (c) 2010-2012 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, document, undefined) {
+'use strict';
+
+////////////////////////////////////
+
+/**
+ * @ngdoc function
+ * @name angular.lowercase
+ * @function
+ *
+ * @description Converts the specified string to lowercase.
+ * @param {string} string String to be converted to lowercase.
+ * @returns {string} Lowercased string.
+ */
+var lowercase = function(string){return isString(string) ? string.toLowerCase() : string;};
+
+
+/**
+ * @ngdoc function
+ * @name angular.uppercase
+ * @function
+ *
+ * @description Converts the specified string to uppercase.
+ * @param {string} string String to be converted to uppercase.
+ * @returns {string} Uppercased string.
+ */
+var uppercase = function(string){return isString(string) ? string.toUpperCase() : string;};
+
+
+var manualLowercase = function(s) {
+  return isString(s)
+      ? s.replace(/[A-Z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) | 32);})
+      : s;
+};
+var manualUppercase = function(s) {
+  return isString(s)
+      ? s.replace(/[a-z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) & ~32);})
+      : s;
+};
+
+
+// String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish
+// locale, for this reason we need to detect this case and redefine lowercase/uppercase methods
+// with correct but slower alternatives.
+if ('i' !== 'I'.toLowerCase()) {
+  lowercase = manualLowercase;
+  uppercase = manualUppercase;
+}
+
+
+var /** holds major version number for IE or NaN for real browsers */
+    msie              = int((/msie (\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]),
+    jqLite,           // delay binding since jQuery could be loaded after us.
+    jQuery,           // delay binding
+    slice             = [].slice,
+    push              = [].push,
+    toString          = Object.prototype.toString,
+
+
+    _angular          = window.angular,
+    /** @name angular */
+    angular           = window.angular || (window.angular = {}),
+    angularModule,
+    nodeName_,
+    uid               = ['0', '0', '0'];
+
+/**
+ * @ngdoc function
+ * @name angular.noConflict
+ * @function
+ *
+ * @description
+ * Restores the previous global value of angular and returns the current instance. Other libraries may already use the
+ * angular namespace. Or a previous version of angular is already loaded on the page. In these cases you may want to
+ * restore the previous namespace and keep a reference to angular.
+ *
+ * @return {Object} The current angular namespace
+ */
+function noConflict() {
+  var a = window.angular;
+  window.angular = _angular;
+  return a;
+}
+
+/**
+ * @private
+ * @param {*} obj
+ * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments, ...)
+ */
+function isArrayLike(obj) {
+  if (!obj || (typeof obj.length !== 'number')) return false;
+
+  // We have on object which has length property. Should we treat it as array?
+  if (typeof obj.hasOwnProperty != 'function' &&
+      typeof obj.constructor != 'function') {
+    // This is here for IE8: it is a bogus object treat it as array;
+    return true;
+  } else  {
+    return obj instanceof JQLite ||                      // JQLite
+           (jQuery && obj instanceof jQuery) ||          // jQuery
+           toString.call(obj) !== '[object Object]' ||   // some browser native object
+           typeof obj.callee === 'function';              // arguments (on IE8 looks like regular obj)
+  }
+}
+
+/**
+ * @ngdoc function
+ * @name angular.forEach
+ * @function
+ *
+ * @description
+ * Invokes the `iterator` function once for each item in `obj` collection, which can be either an
+ * object or an array. The `iterator` function is invoked with `iterator(value, key)`, where `value`
+ * is the value of an object property or an array element and `key` is the object property key or
+ * array element index. Specifying a `context` for the function is optional.
+ *
+ * Note: this function was previously known as `angular.foreach`.
+ *
+   <pre>
+     var values = {name: 'misko', gender: 'male'};
+     var log = [];
+     angular.forEach(values, function(value, key){
+       this.push(key + ': ' + value);
+     }, log);
+     expect(log).toEqual(['name: misko', 'gender:male']);
+   </pre>
+ *
+ * @param {Object|Array} obj Object to iterate over.
+ * @param {Function} iterator Iterator function.
+ * @param {Object=} context Object to become context (`this`) for the iterator function.
+ * @returns {Object|Array} Reference to `obj`.
+ */
+function forEach(obj, iterator, context) {
+  var key;
+  if (obj) {
+    if (isFunction(obj)){
+      for (key in obj) {
+        if (key != 'prototype' && key != 'length' && key != 'name' && obj.hasOwnProperty(key)) {
+          iterator.call(context, obj[key], key);
+        }
+      }
+    } else if (obj.forEach && obj.forEach !== forEach) {
+      obj.forEach(iterator, context);
+    } else if (isArrayLike(obj)) {
+      for (key = 0; key < obj.length; key++)
+        iterator.call(context, obj[key], key);
+    } else {
+      for (key in obj) {
+        if (obj.hasOwnProperty(key)) {
+          iterator.call(context, obj[key], key);
+        }
+      }
+    }
+  }
+  return obj;
+}
+
+function sortedKeys(obj) {
+  var keys = [];
+  for (var key in obj) {
+    if (obj.hasOwnProperty(key)) {
+      keys.push(key);
+    }
+  }
+  return keys.sort();
+}
+
+function forEachSorted(obj, iterator, context) {
+  var keys = sortedKeys(obj);
+  for ( var i = 0; i < keys.length; i++) {
+    iterator.call(context, obj[keys[i]], keys[i]);
+  }
+  return keys;
+}
+
+
+/**
+ * when using forEach the params are value, key, but it is often useful to have key, value.
+ * @param {function(string, *)} iteratorFn
+ * @returns {function(*, string)}
+ */
+function reverseParams(iteratorFn) {
+  return function(value, key) { iteratorFn(key, value) };
+}
+
+/**
+ * A consistent way of creating unique IDs in angular. The ID is a sequence of alpha numeric
+ * characters such as '012ABC'. The reason why we are not using simply a number counter is that
+ * the number string gets longer over time, and it can also overflow, where as the nextId
+ * will grow much slower, it is a string, and it will never overflow.
+ *
+ * @returns an unique alpha-numeric string
+ */
+function nextUid() {
+  var index = uid.length;
+  var digit;
+
+  while(index) {
+    index--;
+    digit = uid[index].charCodeAt(0);
+    if (digit == 57 /*'9'*/) {
+      uid[index] = 'A';
+      return uid.join('');
+    }
+    if (digit == 90  /*'Z'*/) {
+      uid[index] = '0';
+    } else {
+      uid[index] = String.fromCharCode(digit + 1);
+      return uid.join('');
+    }
+  }
+  uid.unshift('0');
+  return uid.join('');
+}
+
+
+/**
+ * Set or clear the hashkey for an object.
+ * @param obj object 
+ * @param h the hashkey (!truthy to delete the hashkey)
+ */
+function setHashKey(obj, h) {
+  if (h) {
+    obj.$$hashKey = h;
+  }
+  else {
+    delete obj.$$hashKey;
+  }
+}
+
+/**
+ * @ngdoc function
+ * @name angular.extend
+ * @function
+ *
+ * @description
+ * Extends the destination object `dst` by copying all of the properties from the `src` object(s)
+ * to `dst`. You can specify multiple `src` objects.
+ *
+ * @param {Object} dst Destination object.
+ * @param {...Object} src Source object(s).
+ * @returns {Object} Reference to `dst`.
+ */
+function extend(dst) {
+  var h = dst.$$hashKey;
+  forEach(arguments, function(obj){
+    if (obj !== dst) {
+      forEach(obj, function(value, key){
+        dst[key] = value;
+      });
+    }
+  });
+
+  setHashKey(dst,h);
+  return dst;
+}
+
+function int(str) {
+  return parseInt(str, 10);
+}
+
+
+function inherit(parent, extra) {
+  return extend(new (extend(function() {}, {prototype:parent}))(), extra);
+}
+
+var START_SPACE = /^\s*/;
+var END_SPACE = /\s*$/;
+function stripWhitespace(str) {
+  return isString(str) ? str.replace(START_SPACE, '').replace(END_SPACE, '') : str;
+}
+
+/**
+ * @ngdoc function
+ * @name angular.noop
+ * @function
+ *
+ * @description
+ * A function that performs no operations. This function can be useful when writing code in the
+ * functional style.
+   <pre>
+     function foo(callback) {
+       var result = calculateResult();
+       (callback || angular.noop)(result);
+     }
+   </pre>
+ */
+function noop() {}
+noop.$inject = [];
+
+
+/**
+ * @ngdoc function
+ * @name angular.identity
+ * @function
+ *
+ * @description
+ * A function that returns its first argument. This function is useful when writing code in the
+ * functional style.
+ *
+   <pre>
+     function transformer(transformationFn, value) {
+       return (transformationFn || identity)(value);
+     };
+   </pre>
+ */
+function identity($) {return $;}
+identity.$inject = [];
+
+
+function valueFn(value) {return function() {return value;};}
+
+/**
+ * @ngdoc function
+ * @name angular.isUndefined
+ * @function
+ *
+ * @description
+ * Determines if a reference is undefined.
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is undefined.
+ */
+function isUndefined(value){return typeof value == 'undefined';}
+
+
+/**
+ * @ngdoc function
+ * @name angular.isDefined
+ * @function
+ *
+ * @description
+ * Determines if a reference is defined.
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is defined.
+ */
+function isDefined(value){return typeof value != 'undefined';}
+
+
+/**
+ * @ngdoc function
+ * @name angular.isObject
+ * @function
+ *
+ * @description
+ * Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not
+ * considered to be objects.
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is an `Object` but not `null`.
+ */
+function isObject(value){return value != null && typeof value == 'object';}
+
+
+/**
+ * @ngdoc function
+ * @name angular.isString
+ * @function
+ *
+ * @description
+ * Determines if a reference is a `String`.
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is a `String`.
+ */
+function isString(value){return typeof value == 'string';}
+
+
+/**
+ * @ngdoc function
+ * @name angular.isNumber
+ * @function
+ *
+ * @description
+ * Determines if a reference is a `Number`.
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is a `Number`.
+ */
+function isNumber(value){return typeof value == 'number';}
+
+
+/**
+ * @ngdoc function
+ * @name angular.isDate
+ * @function
+ *
+ * @description
+ * Determines if a value is a date.
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is a `Date`.
+ */
+function isDate(value){
+  return toString.apply(value) == '[object Date]';
+}
+
+
+/**
+ * @ngdoc function
+ * @name angular.isArray
+ * @function
+ *
+ * @description
+ * Determines if a reference is an `Array`.
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is an `Array`.
+ */
+function isArray(value) {
+  return toString.apply(value) == '[object Array]';
+}
+
+
+/**
+ * @ngdoc function
+ * @name angular.isFunction
+ * @function
+ *
+ * @description
+ * Determines if a reference is a `Function`.
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is a `Function`.
+ */
+function isFunction(value){return typeof value == 'function';}
+
+
+/**
+ * Checks if `obj` is a window object.
+ *
+ * @private
+ * @param {*} obj Object to check
+ * @returns {boolean} True if `obj` is a window obj.
+ */
+function isWindow(obj) {
+  return obj && obj.document && obj.location && obj.alert && obj.setInterval;
+}
+
+
+function isScope(obj) {
+  return obj && obj.$evalAsync && obj.$watch;
+}
+
+
+function isFile(obj) {
+  return toString.apply(obj) === '[object File]';
+}
+
+
+function isBoolean(value) {
+  return typeof value == 'boolean';
+}
+
+
+function trim(value) {
+  return isString(value) ? value.replace(/^\s*/, '').replace(/\s*$/, '') : value;
+}
+
+/**
+ * @ngdoc function
+ * @name angular.isElement
+ * @function
+ *
+ * @description
+ * Determines if a reference is a DOM element (or wrapped jQuery element).
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is a DOM element (or wrapped jQuery element).
+ */
+function isElement(node) {
+  return node &&
+    (node.nodeName  // we are a direct element
+    || (node.bind && node.find));  // we have a bind and find method part of jQuery API
+}
+
+/**
+ * @param str 'key1,key2,...'
+ * @returns {object} in the form of {key1:true, key2:true, ...}
+ */
+function makeMap(str){
+  var obj = {}, items = str.split(","), i;
+  for ( i = 0; i < items.length; i++ )
+    obj[ items[i] ] = true;
+  return obj;
+}
+
+
+if (msie < 9) {
+  nodeName_ = function(element) {
+    element = element.nodeName ? element : element[0];
+    return (element.scopeName && element.scopeName != 'HTML')
+      ? uppercase(element.scopeName + ':' + element.nodeName) : element.nodeName;
+  };
+} else {
+  nodeName_ = function(element) {
+    return element.nodeName ? element.nodeName : element[0].nodeName;
+  };
+}
+
+
+function map(obj, iterator, context) {
+  var results = [];
+  forEach(obj, function(value, index, list) {
+    results.push(iterator.call(context, value, index, list));
+  });
+  return results;
+}
+
+
+/**
+ * @description
+ * Determines the number of elements in an array, the number of properties an object has, or
+ * the length of a string.
+ *
+ * Note: This function is used to augment the Object type in Angular expressions. See
+ * {@link angular.Object} for more information about Angular arrays.
+ *
+ * @param {Object|Array|string} obj Object, array, or string to inspect.
+ * @param {boolean} [ownPropsOnly=false] Count only "own" properties in an object
+ * @returns {number} The size of `obj` or `0` if `obj` is neither an object nor an array.
+ */
+function size(obj, ownPropsOnly) {
+  var size = 0, key;
+
+  if (isArray(obj) || isString(obj)) {
+    return obj.length;
+  } else if (isObject(obj)){
+    for (key in obj)
+      if (!ownPropsOnly || obj.hasOwnProperty(key))
+        size++;
+  }
+
+  return size;
+}
+
+
+function includes(array, obj) {
+  return indexOf(array, obj) != -1;
+}
+
+function indexOf(array, obj) {
+  if (array.indexOf) return array.indexOf(obj);
+
+  for ( var i = 0; i < array.length; i++) {
+    if (obj === array[i]) return i;
+  }
+  return -1;
+}
+
+function arrayRemove(array, value) {
+  var index = indexOf(array, value);
+  if (index >=0)
+    array.splice(index, 1);
+  return value;
+}
+
+function isLeafNode (node) {
+  if (node) {
+    switch (node.nodeName) {
+    case "OPTION":
+    case "PRE":
+    case "TITLE":
+      return true;
+    }
+  }
+  return false;
+}
+
+/**
+ * @ngdoc function
+ * @name angular.copy
+ * @function
+ *
+ * @description
+ * Creates a deep copy of `source`, which should be an object or an array.
+ *
+ * * If no destination is supplied, a copy of the object or array is created.
+ * * If a destination is provided, all of its elements (for array) or properties (for objects)
+ *   are deleted and then all elements/properties from the source are copied to it.
+ * * If  `source` is not an object or array, `source` is returned.
+ *
+ * Note: this function is used to augment the Object type in Angular expressions. See
+ * {@link ng.$filter} for more information about Angular arrays.
+ *
+ * @param {*} source The source that will be used to make a copy.
+ *                   Can be any type, including primitives, `null`, and `undefined`.
+ * @param {(Object|Array)=} destination Destination into which the source is copied. If
+ *     provided, must be of the same type as `source`.
+ * @returns {*} The copy or updated `destination`, if `destination` was specified.
+ */
+function copy(source, destination){
+  if (isWindow(source) || isScope(source)) throw Error("Can't copy Window or Scope");
+  if (!destination) {
+    destination = source;
+    if (source) {
+      if (isArray(source)) {
+        destination = copy(source, []);
+      } else if (isDate(source)) {
+        destination = new Date(source.getTime());
+      } else if (isObject(source)) {
+        destination = copy(source, {});
+      }
+    }
+  } else {
+    if (source === destination) throw Error("Can't copy equivalent objects or arrays");
+    if (isArray(source)) {
+      destination.length = 0;
+      for ( var i = 0; i < source.length; i++) {
+        destination.push(copy(source[i]));
+      }
+    } else {
+      var h = destination.$$hashKey;
+      forEach(destination, function(value, key){
+        delete destination[key];
+      });
+      for ( var key in source) {
+        destination[key] = copy(source[key]);
+      }
+      setHashKey(destination,h);
+    }
+  }
+  return destination;
+}
+
+/**
+ * Create a shallow copy of an object
+ */
+function shallowCopy(src, dst) {
+  dst = dst || {};
+
+  for(var key in src) {
+    if (src.hasOwnProperty(key) && key.substr(0, 2) !== '$$') {
+      dst[key] = src[key];
+    }
+  }
+
+  return dst;
+}
+
+
+/**
+ * @ngdoc function
+ * @name angular.equals
+ * @function
+ *
+ * @description
+ * Determines if two objects or two values are equivalent. Supports value types, arrays and
+ * objects.
+ *
+ * Two objects or values are considered equivalent if at least one of the following is true:
+ *
+ * * Both objects or values pass `===` comparison.
+ * * Both objects or values are of the same type and all of their properties pass `===` comparison.
+ * * Both values are NaN. (In JavasScript, NaN == NaN => false. But we consider two NaN as equal)
+ *
+ * During a property comparison, properties of `function` type and properties with names
+ * that begin with `$` are ignored.
+ *
+ * Scope and DOMWindow objects are being compared only by identify (`===`).
+ *
+ * @param {*} o1 Object or value to compare.
+ * @param {*} o2 Object or value to compare.
+ * @returns {boolean} True if arguments are equal.
+ */
+function equals(o1, o2) {
+  if (o1 === o2) return true;
+  if (o1 === null || o2 === null) return false;
+  if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN
+  var t1 = typeof o1, t2 = typeof o2, length, key, keySet;
+  if (t1 == t2) {
+    if (t1 == 'object') {
+      if (isArray(o1)) {
+        if ((length = o1.length) == o2.length) {
+          for(key=0; key<length; key++) {
+            if (!equals(o1[key], o2[key])) return false;
+          }
+          return true;
+        }
+      } else if (isDate(o1)) {
+        return isDate(o2) && o1.getTime() == o2.getTime();
+      } else {
+        if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2)) return false;
+        keySet = {};
+        for(key in o1) {
+          if (key.charAt(0) === '$' || isFunction(o1[key])) continue;
+          if (!equals(o1[key], o2[key])) return false;
+          keySet[key] = true;
+        }
+        for(key in o2) {
+          if (!keySet[key] &&
+              key.charAt(0) !== '$' &&
+              o2[key] !== undefined &&
+              !isFunction(o2[key])) return false;
+        }
+        return true;
+      }
+    }
+  }
+  return false;
+}
+
+
+function concat(array1, array2, index) {
+  return array1.concat(slice.call(array2, index));
+}
+
+function sliceArgs(args, startIndex) {
+  return slice.call(args, startIndex || 0);
+}
+
+
+/**
+ * @ngdoc function
+ * @name angular.bind
+ * @function
+ *
+ * @description
+ * Returns a function which calls function `fn` bound to `self` (`self` becomes the `this` for
+ * `fn`). You can supply optional `args` that are prebound to the function. This feature is also
+ * known as [function currying](http://en.wikipedia.org/wiki/Currying).
+ *
+ * @param {Object} self Context which `fn` should be evaluated in.
+ * @param {function()} fn Function to be bound.
+ * @param {...*} args Optional arguments to be prebound to the `fn` function call.
+ * @returns {function()} Function that wraps the `fn` with all the specified bindings.
+ */
+function bind(self, fn) {
+  var curryArgs = arguments.length > 2 ? sliceArgs(arguments, 2) : [];
+  if (isFunction(fn) && !(fn instanceof RegExp)) {
+    return curryArgs.length
+      ? function() {
+          return arguments.length
+            ? fn.apply(self, curryArgs.concat(slice.call(arguments, 0)))
+            : fn.apply(self, curryArgs);
+        }
+      : function() {
+          return arguments.length
+            ? fn.apply(self, arguments)
+            : fn.call(self);
+        };
+  } else {
+    // in IE, native methods are not functions so they cannot be bound (note: they don't need to be)
+    return fn;
+  }
+}
+
+
+function toJsonReplacer(key, value) {
+  var val = value;
+
+  if (/^\$+/.test(key)) {
+    val = undefined;
+  } else if (isWindow(value)) {
+    val = '$WINDOW';
+  } else if (value &&  document === value) {
+    val = '$DOCUMENT';
+  } else if (isScope(value)) {
+    val = '$SCOPE';
+  }
+
+  return val;
+}
+
+
+/**
+ * @ngdoc function
+ * @name angular.toJson
+ * @function
+ *
+ * @description
+ * Serializes input into a JSON-formatted string.
+ *
+ * @param {Object|Array|Date|string|number} obj Input to be serialized into JSON.
+ * @param {boolean=} pretty If set to true, the JSON output will contain newlines and whitespace.
+ * @returns {string} Jsonified string representing `obj`.
+ */
+function toJson(obj, pretty) {
+  return JSON.stringify(obj, toJsonReplacer, pretty ? '  ' : null);
+}
+
+
+/**
+ * @ngdoc function
+ * @name angular.fromJson
+ * @function
+ *
+ * @description
+ * Deserializes a JSON string.
+ *
+ * @param {string} json JSON string to deserialize.
+ * @returns {Object|Array|Date|string|number} Deserialized thingy.
+ */
+function fromJson(json) {
+  return isString(json)
+      ? JSON.parse(json)
+      : json;
+}
+
+
+function toBoolean(value) {
+  if (value && value.length !== 0) {
+    var v = lowercase("" + value);
+    value = !(v == 'f' || v == '0' || v == 'false' || v == 'no' || v == 'n' || v == '[]');
+  } else {
+    value = false;
+  }
+  return value;
+}
+
+/**
+ * @returns {string} Returns the string representation of the element.
+ */
+function startingTag(element) {
+  element = jqLite(element).clone();
+  try {
+    // turns out IE does not let you set .html() on elements which
+    // are not allowed to have children. So we just ignore it.
+    element.html('');
+  } catch(e) {}
+  // As Per DOM Standards
+  var TEXT_NODE = 3;
+  var elemHtml = jqLite('<div>').append(element).html();
+  try {
+    return element[0].nodeType === TEXT_NODE ? lowercase(elemHtml) :
+        elemHtml.
+          match(/^(<[^>]+>)/)[1].
+          replace(/^<([\w\-]+)/, function(match, nodeName) { return '<' + lowercase(nodeName); });
+  } catch(e) {
+    return lowercase(elemHtml);
+  }
+
+}
+
+
+/////////////////////////////////////////////////
+
+/**
+ * Parses an escaped url query string into key-value pairs.
+ * @returns Object.<(string|boolean)>
+ */
+function parseKeyValue(/**string*/keyValue) {
+  var obj = {}, key_value, key;
+  forEach((keyValue || "").split('&'), function(keyValue){
+    if (keyValue) {
+      key_value = keyValue.split('=');
+      key = decodeURIComponent(key_value[0]);
+      obj[key] = isDefined(key_value[1]) ? decodeURIComponent(key_value[1]) : true;
+    }
+  });
+  return obj;
+}
+
+function toKeyValue(obj) {
+  var parts = [];
+  forEach(obj, function(value, key) {
+    parts.push(encodeUriQuery(key, true) + (value === true ? '' : '=' + encodeUriQuery(value, true)));
+  });
+  return parts.length ? parts.join('&') : '';
+}
+
+
+/**
+ * We need our custom method because encodeURIComponent is too aggressive and doesn't follow
+ * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path
+ * segments:
+ *    segment       = *pchar
+ *    pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
+ *    pct-encoded   = "%" HEXDIG HEXDIG
+ *    unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
+ *    sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
+ *                     / "*" / "+" / "," / ";" / "="
+ */
+function encodeUriSegment(val) {
+  return encodeUriQuery(val, true).
+             replace(/%26/gi, '&').
+             replace(/%3D/gi, '=').
+             replace(/%2B/gi, '+');
+}
+
+
+/**
+ * This method is intended for encoding *key* or *value* parts of query component. We need a custom
+ * method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be
+ * encoded per http://tools.ietf.org/html/rfc3986:
+ *    query       = *( pchar / "/" / "?" )
+ *    pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
+ *    unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
+ *    pct-encoded   = "%" HEXDIG HEXDIG
+ *    sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
+ *                     / "*" / "+" / "," / ";" / "="
+ */
+function encodeUriQuery(val, pctEncodeSpaces) {
+  return encodeURIComponent(val).
+             replace(/%40/gi, '@').
+             replace(/%3A/gi, ':').
+             replace(/%24/g, '$').
+             replace(/%2C/gi, ',').
+             replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));
+}
+
+
+/**
+ * @ngdoc directive
+ * @name ng.directive:ngApp
+ *
+ * @element ANY
+ * @param {angular.Module} ngApp an optional application
+ *   {@link angular.module module} name to load.
+ *
+ * @description
+ *
+ * Use this directive to auto-bootstrap an application. Only
+ * one directive can be used per HTML document. The directive
+ * designates the root of the application and is typically placed
+ * at the root of the page.
+ *
+ * In the example below if the `ngApp` directive would not be placed
+ * on the `html` element then the document would not be compiled
+ * and the `{{ 1+2 }}` would not be resolved to `3`.
+ *
+ * `ngApp` is the easiest way to bootstrap an application.
+ *
+ <doc:example>
+   <doc:source>
+    I can add: 1 + 2 =  {{ 1+2 }}
+   </doc:source>
+ </doc:example>
+ *
+ */
+function angularInit(element, bootstrap) {
+  var elements = [element],
+      appElement,
+      module,
+      names = ['ng:app', 'ng-app', 'x-ng-app', 'data-ng-app'],
+      NG_APP_CLASS_REGEXP = /\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;
+
+  function append(element) {
+    element && elements.push(element);
+  }
+
+  forEach(names, function(name) {
+    names[name] = true;
+    append(document.getElementById(name));
+    name = name.replace(':', '\\:');
+    if (element.querySelectorAll) {
+      forEach(element.querySelectorAll('.' + name), append);
+      forEach(element.querySelectorAll('.' + name + '\\:'), append);
+      forEach(element.querySelectorAll('[' + name + ']'), append);
+    }
+  });
+
+  forEach(elements, function(element) {
+    if (!appElement) {
+      var className = ' ' + element.className + ' ';
+      var match = NG_APP_CLASS_REGEXP.exec(className);
+      if (match) {
+        appElement = element;
+        module = (match[2] || '').replace(/\s+/g, ',');
+      } else {
+        forEach(element.attributes, function(attr) {
+          if (!appElement && names[attr.name]) {
+            appElement = element;
+            module = attr.value;
+          }
+        });
+      }
+    }
+  });
+  if (appElement) {
+    bootstrap(appElement, module ? [module] : []);
+  }
+}
+
+/**
+ * @ngdoc function
+ * @name angular.bootstrap
+ * @description
+ * Use this function to manually start up angular application.
+ *
+ * See: {@link guide/bootstrap Bootstrap}
+ *
+ * @param {Element} element DOM element which is the root of angular application.
+ * @param {Array<String|Function>=} modules an array of module declarations. See: {@link angular.module modules}
+ * @returns {AUTO.$injector} Returns the newly created injector for this app.
+ */
+function bootstrap(element, modules) {
+  var resumeBootstrapInternal = function() {
+    element = jqLite(element);
+    modules = modules || [];
+    modules.unshift(['$provide', function($provide) {
+      $provide.value('$rootElement', element);
+    }]);
+    modules.unshift('ng');
+    var injector = createInjector(modules);
+    injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector', '$animator',
+       function(scope, element, compile, injector, animator) {
+        scope.$apply(function() {
+          element.data('$injector', injector);
+          compile(element)(scope);
+        });
+        animator.enabled(true);
+      }]
+    );
+    return injector;
+  };
+
+  var NG_DEFER_BOOTSTRAP = /^NG_DEFER_BOOTSTRAP!/;
+
+  if (window && !NG_DEFER_BOOTSTRAP.test(window.name)) {
+    return resumeBootstrapInternal();
+  }
+
+  window.name = window.name.replace(NG_DEFER_BOOTSTRAP, '');
+  angular.resumeBootstrap = function(extraModules) {
+    forEach(extraModules, function(module) {
+      modules.push(module);
+    });
+    resumeBootstrapInternal();
+  };
+}
+
+var SNAKE_CASE_REGEXP = /[A-Z]/g;
+function snake_case(name, separator){
+  separator = separator || '_';
+  return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {
+    return (pos ? separator : '') + letter.toLowerCase();
+  });
+}
+
+function bindJQuery() {
+  // bind to jQuery if present;
+  jQuery = window.jQuery;
+  // reset to jQuery or default to us.
+  if (jQuery) {
+    jqLite = jQuery;
+    extend(jQuery.fn, {
+      scope: JQLitePrototype.scope,
+      controller: JQLitePrototype.controller,
+      injector: JQLitePrototype.injector,
+      inheritedData: JQLitePrototype.inheritedData
+    });
+    JQLitePatchJQueryRemove('remove', true);
+    JQLitePatchJQueryRemove('empty');
+    JQLitePatchJQueryRemove('html');
+  } else {
+    jqLite = JQLite;
+  }
+  angular.element = jqLite;
+}
+
+/**
+ * throw error if the argument is falsy.
+ */
+function assertArg(arg, name, reason) {
+  if (!arg) {
+    throw new Error("Argument '" + (name || '?') + "' is " + (reason || "required"));
+  }
+  return arg;
+}
+
+function assertArgFn(arg, name, acceptArrayAnnotation) {
+  if (acceptArrayAnnotation && isArray(arg)) {
+      arg = arg[arg.length - 1];
+  }
+
+  assertArg(isFunction(arg), name, 'not a function, got ' +
+      (arg && typeof arg == 'object' ? arg.constructor.name || 'Object' : typeof arg));
+  return arg;
+}
+
+/**
+ * @ngdoc interface
+ * @name angular.Module
+ * @description
+ *
+ * Interface for configuring angular {@link angular.module modules}.
+ */
+
+function setupModuleLoader(window) {
+
+  function ensure(obj, name, factory) {
+    return obj[name] || (obj[name] = factory());
+  }
+
+  return ensure(ensure(window, 'angular', Object), 'module', function() {
+    /** @type {Object.<string, angular.Module>} */
+    var modules = {};
+
+    /**
+     * @ngdoc function
+     * @name angular.module
+     * @description
+     *
+     * The `angular.module` is a global place for creating and registering Angular modules. All
+     * modules (angular core or 3rd party) that should be available to an application must be
+     * registered using this mechanism.
+     *
+     *
+     * # Module
+     *
+     * A module is a collocation of services, directives, filters, and configuration information. Module
+     * is used to configure the {@link AUTO.$injector $injector}.
+     *
+     * <pre>
+     * // Create a new module
+     * var myModule = angular.module('myModule', []);
+     *
+     * // register a new service
+     * myModule.value('appName', 'MyCoolApp');
+     *
+     * // configure existing services inside initialization blocks.
+     * myModule.config(function($locationProvider) {
+     *   // Configure existing providers
+     *   $locationProvider.hashPrefix('!');
+     * });
+     * </pre>
+     *
+     * Then you can create an injector and load your modules like this:
+     *
+     * <pre>
+     * var injector = angular.injector(['ng', 'MyModule'])
+     * </pre>
+     *
+     * However it's more likely that you'll just use
+     * {@link ng.directive:ngApp ngApp} or
+     * {@link angular.bootstrap} to simplify this process for you.
+     *
+     * @param {!string} name The name of the module to create or retrieve.
+     * @param {Array.<string>=} requires If specified then new module is being created. If unspecified then the
+     *        the module is being retrieved for further configuration.
+     * @param {Function} configFn Optional configuration function for the module. Same as
+     *        {@link angular.Module#config Module#config()}.
+     * @returns {module} new module with the {@link angular.Module} api.
+     */
+    return function module(name, requires, configFn) {
+      if (requires && modules.hasOwnProperty(name)) {
+        modules[name] = null;
+      }
+      return ensure(modules, name, function() {
+        if (!requires) {
+          throw Error('No module: ' + name);
+        }
+
+        /** @type {!Array.<Array.<*>>} */
+        var invokeQueue = [];
+
+        /** @type {!Array.<Function>} */
+        var runBlocks = [];
+
+        var config = invokeLater('$injector', 'invoke');
+
+        /** @type {angular.Module} */
+        var moduleInstance = {
+          // Private state
+          _invokeQueue: invokeQueue,
+          _runBlocks: runBlocks,
+
+          /**
+           * @ngdoc property
+           * @name angular.Module#requires
+           * @propertyOf angular.Module
+           * @returns {Array.<string>} List of module names which must be loaded before this module.
+           * @description
+           * Holds the list of modules which the injector will load before the current module is loaded.
+           */
+          requires: requires,
+
+          /**
+           * @ngdoc property
+           * @name angular.Module#name
+           * @propertyOf angular.Module
+           * @returns {string} Name of the module.
+           * @description
+           */
+          name: name,
+
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#provider
+           * @methodOf angular.Module
+           * @param {string} name service name
+           * @param {Function} providerType Construction function for creating new instance of the service.
+           * @description
+           * See {@link AUTO.$provide#provider $provide.provider()}.
+           */
+          provider: invokeLater('$provide', 'provider'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#factory
+           * @methodOf angular.Module
+           * @param {string} name service name
+           * @param {Function} providerFunction Function for creating new instance of the service.
+           * @description
+           * See {@link AUTO.$provide#factory $provide.factory()}.
+           */
+          factory: invokeLater('$provide', 'factory'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#service
+           * @methodOf angular.Module
+           * @param {string} name service name
+           * @param {Function} constructor A constructor function that will be instantiated.
+           * @description
+           * See {@link AUTO.$provide#service $provide.service()}.
+           */
+          service: invokeLater('$provide', 'service'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#value
+           * @methodOf angular.Module
+           * @param {string} name service name
+           * @param {*} object Service instance object.
+           * @description
+           * See {@link AUTO.$provide#value $provide.value()}.
+           */
+          value: invokeLater('$provide', 'value'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#constant
+           * @methodOf angular.Module
+           * @param {string} name constant name
+           * @param {*} object Constant value.
+           * @description
+           * Because the constant are fixed, they get applied before other provide methods.
+           * See {@link AUTO.$provide#constant $provide.constant()}.
+           */
+          constant: invokeLater('$provide', 'constant', 'unshift'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#animation
+           * @methodOf angular.Module
+           * @param {string} name animation name
+           * @param {Function} animationFactory Factory function for creating new instance of an animation.
+           * @description
+           *
+           * Defines an animation hook that can be later used with {@link ng.directive:ngAnimate ngAnimate}
+           * alongside {@link ng.directive:ngAnimate#Description common ng directives} as well as custom directives.
+           * <pre>
+           * module.animation('animation-name', function($inject1, $inject2) {
+           *   return {
+           *     //this gets called in preparation to setup an animation
+           *     setup : function(element) { ... },
+           *
+           *     //this gets called once the animation is run
+           *     start : function(element, done, memo) { ... }
+           *   }
+           * })
+           * </pre>
+           *
+           * See {@link ng.$animationProvider#register $animationProvider.register()} and
+           * {@link ng.directive:ngAnimate ngAnimate} for more information.
+           */
+          animation: invokeLater('$animationProvider', 'register'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#filter
+           * @methodOf angular.Module
+           * @param {string} name Filter name.
+           * @param {Function} filterFactory Factory function for creating new instance of filter.
+           * @description
+           * See {@link ng.$filterProvider#register $filterProvider.register()}.
+           */
+          filter: invokeLater('$filterProvider', 'register'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#controller
+           * @methodOf angular.Module
+           * @param {string} name Controller name.
+           * @param {Function} constructor Controller constructor function.
+           * @description
+           * See {@link ng.$controllerProvider#register $controllerProvider.register()}.
+           */
+          controller: invokeLater('$controllerProvider', 'register'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#directive
+           * @methodOf angular.Module
+           * @param {string} name directive name
+           * @param {Function} directiveFactory Factory function for creating new instance of
+           * directives.
+           * @description
+           * See {@link ng.$compileProvider#directive $compileProvider.directive()}.
+           */
+          directive: invokeLater('$compileProvider', 'directive'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#config
+           * @methodOf angular.Module
+           * @param {Function} configFn Execute this function on module load. Useful for service
+           *    configuration.
+           * @description
+           * Use this method to register work which needs to be performed on module loading.
+           */
+          config: config,
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#run
+           * @methodOf angular.Module
+           * @param {Function} initializationFn Execute this function after injector creation.
+           *    Useful for application initialization.
+           * @description
+           * Use this method to register work which should be performed when the injector is done
+           * loading all modules.
+           */
+          run: function(block) {
+            runBlocks.push(block);
+            return this;
+          }
+        };
+
+        if (configFn) {
+          config(configFn);
+        }
+
+        return  moduleInstance;
+
+        /**
+         * @param {string} provider
+         * @param {string} method
+         * @param {String=} insertMethod
+         * @returns {angular.Module}
+         */
+        function invokeLater(provider, method, insertMethod) {
+          return function() {
+            invokeQueue[insertMethod || 'push']([provider, method, arguments]);
+            return moduleInstance;
+          }
+        }
+      });
+    };
+  });
+
+}
+
+/**
+ * @ngdoc property
+ * @name angular.version
+ * @description
+ * An object that contains information about the current AngularJS version. This object has the
+ * following properties:
+ *
+ * - `full` – `{string}` – Full version string, such as "0.9.18".
+ * - `major` – `{number}` – Major version number, such as "0".
+ * - `minor` – `{number}` – Minor version number, such as "9".
+ * - `dot` – `{number}` – Dot version number, such as "18".
+ * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
+ */
+var version = {
+  full: '1.1.5',    // all of these placeholder strings will be replaced by grunt's
+  major: 1,    // package task
+  minor: 1,
+  dot: 5,
+  codeName: 'triangle-squarification'
+};
+
+
+function publishExternalAPI(angular){
+  extend(angular, {
+    'bootstrap': bootstrap,
+    'copy': copy,
+    'extend': extend,
+    'equals': equals,
+    'element': jqLite,
+    'forEach': forEach,
+    'injector': createInjector,
+    'noop':noop,
+    'bind':bind,
+    'toJson': toJson,
+    'fromJson': fromJson,
+    'identity':identity,
+    'isUndefined': isUndefined,
+    'isDefined': isDefined,
+    'isString': isString,
+    'isFunction': isFunction,
+    'isObject': isObject,
+    'isNumber': isNumber,
+    'isElement': isElement,
+    'isArray': isArray,
+    'version': version,
+    'isDate': isDate,
+    'lowercase': lowercase,
+    'uppercase': uppercase,
+    'callbacks': {counter: 0},
+    'noConflict': noConflict
+  });
+
+  angularModule = setupModuleLoader(window);
+  try {
+    angularModule('ngLocale');
+  } catch (e) {
+    angularModule('ngLocale', []).provider('$locale', $LocaleProvider);
+  }
+
+  angularModule('ng', ['ngLocale'], ['$provide',
+    function ngModule($provide) {
+      $provide.provider('$compile', $CompileProvider).
+        directive({
+            a: htmlAnchorDirective,
+            input: inputDirective,
+            textarea: inputDirective,
+            form: formDirective,
+            script: scriptDirective,
+            select: selectDirective,
+            style: styleDirective,
+            option: optionDirective,
+            ngBind: ngBindDirective,
+            ngBindHtmlUnsafe: ngBindHtmlUnsafeDirective,
+            ngBindTemplate: ngBindTemplateDirective,
+            ngClass: ngClassDirective,
+            ngClassEven: ngClassEvenDirective,
+            ngClassOdd: ngClassOddDirective,
+            ngCsp: ngCspDirective,
+            ngCloak: ngCloakDirective,
+            ngController: ngControllerDirective,
+            ngForm: ngFormDirective,
+            ngHide: ngHideDirective,
+            ngIf: ngIfDirective,
+            ngInclude: ngIncludeDirective,
+            ngInit: ngInitDirective,
+            ngNonBindable: ngNonBindableDirective,
+            ngPluralize: ngPluralizeDirective,
+            ngRepeat: ngRepeatDirective,
+            ngShow: ngShowDirective,
+            ngSubmit: ngSubmitDirective,
+            ngStyle: ngStyleDirective,
+            ngSwitch: ngSwitchDirective,
+            ngSwitchWhen: ngSwitchWhenDirective,
+            ngSwitchDefault: ngSwitchDefaultDirective,
+            ngOptions: ngOptionsDirective,
+            ngView: ngViewDirective,
+            ngTransclude: ngTranscludeDirective,
+            ngModel: ngModelDirective,
+            ngList: ngListDirective,
+            ngChange: ngChangeDirective,
+            required: requiredDirective,
+            ngRequired: requiredDirective,
+            ngValue: ngValueDirective
+        }).
+        directive(ngAttributeAliasDirectives).
+        directive(ngEventDirectives);
+      $provide.provider({
+        $anchorScroll: $AnchorScrollProvider,
+        $animation: $AnimationProvider,
+        $animator: $AnimatorProvider,
+        $browser: $BrowserProvider,
+        $cacheFactory: $CacheFactoryProvider,
+        $controller: $ControllerProvider,
+        $document: $DocumentProvider,
+        $exceptionHandler: $ExceptionHandlerProvider,
+        $filter: $FilterProvider,
+        $interpolate: $InterpolateProvider,
+        $http: $HttpProvider,
+        $httpBackend: $HttpBackendProvider,
+        $location: $LocationProvider,
+        $log: $LogProvider,
+        $parse: $ParseProvider,
+        $route: $RouteProvider,
+        $routeParams: $RouteParamsProvider,
+        $rootScope: $RootScopeProvider,
+        $q: $QProvider,
+        $sniffer: $SnifferProvider,
+        $templateCache: $TemplateCacheProvider,
+        $timeout: $TimeoutProvider,
+        $window: $WindowProvider
+      });
+    }
+  ]);
+}
+
+//////////////////////////////////
+//JQLite
+//////////////////////////////////
+
+/**
+ * @ngdoc function
+ * @name angular.element
+ * @function
+ *
+ * @description
+ * Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element.
+ * `angular.element` can be either an alias for [jQuery](http://api.jquery.com/jQuery/) function, if
+ * jQuery is available, or a function that wraps the element or string in Angular's jQuery lite
+ * implementation (commonly referred to as jqLite).
+ *
+ * Real jQuery always takes precedence over jqLite, provided it was loaded before `DOMContentLoaded`
+ * event fired.
+ *
+ * jqLite is a tiny, API-compatible subset of jQuery that allows
+ * Angular to manipulate the DOM. jqLite implements only the most commonly needed functionality
+ * within a very small footprint, so only a subset of the jQuery API - methods, arguments and
+ * invocation styles - are supported.
+ *
+ * Note: All element references in Angular are always wrapped with jQuery or jqLite; they are never
+ * raw DOM references.
+ *
+ * ## Angular's jQuery lite provides the following methods:
+ *
+ * - [addClass()](http://api.jquery.com/addClass/)
+ * - [after()](http://api.jquery.com/after/)
+ * - [append()](http://api.jquery.com/append/)
+ * - [attr()](http://api.jquery.com/attr/)
+ * - [bind()](http://api.jquery.com/bind/) - Does not support namespaces
+ * - [children()](http://api.jquery.com/children/) - Does not support selectors
+ * - [clone()](http://api.jquery.com/clone/)
+ * - [contents()](http://api.jquery.com/contents/)
+ * - [css()](http://api.jquery.com/css/)
+ * - [data()](http://api.jquery.com/data/)
+ * - [eq()](http://api.jquery.com/eq/)
+ * - [find()](http://api.jquery.com/find/) - Limited to lookups by tag name
+ * - [hasClass()](http://api.jquery.com/hasClass/)
+ * - [html()](http://api.jquery.com/html/)
+ * - [next()](http://api.jquery.com/next/) - Does not support selectors
+ * - [parent()](http://api.jquery.com/parent/) - Does not support selectors
+ * - [prepend()](http://api.jquery.com/prepend/)
+ * - [prop()](http://api.jquery.com/prop/)
+ * - [ready()](http://api.jquery.com/ready/)
+ * - [remove()](http://api.jquery.com/remove/)
+ * - [removeAttr()](http://api.jquery.com/removeAttr/)
+ * - [removeClass()](http://api.jquery.com/removeClass/)
+ * - [removeData()](http://api.jquery.com/removeData/)
+ * - [replaceWith()](http://api.jquery.com/replaceWith/)
+ * - [text()](http://api.jquery.com/text/)
+ * - [toggleClass()](http://api.jquery.com/toggleClass/)
+ * - [triggerHandler()](http://api.jquery.com/triggerHandler/) - Passes a dummy event object to handlers.
+ * - [unbind()](http://api.jquery.com/unbind/) - Does not support namespaces
+ * - [val()](http://api.jquery.com/val/)
+ * - [wrap()](http://api.jquery.com/wrap/)
+ *
+ * ## In addition to the above, Angular provides additional methods to both jQuery and jQuery lite:
+ *
+ * - `controller(name)` - retrieves the controller of the current element or its parent. By default
+ *   retrieves controller associated with the `ngController` directive. If `name` is provided as
+ *   camelCase directive name, then the controller for this directive will be retrieved (e.g.
+ *   `'ngModel'`).
+ * - `injector()` - retrieves the injector of the current element or its parent.
+ * - `scope()` - retrieves the {@link api/ng.$rootScope.Scope scope} of the current
+ *   element or its parent.
+ * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top
+ *   parent element is reached.
+ *
+ * @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery.
+ * @returns {Object} jQuery object.
+ */
+
+var jqCache = JQLite.cache = {},
+    jqName = JQLite.expando = 'ng-' + new Date().getTime(),
+    jqId = 1,
+    addEventListenerFn = (window.document.addEventListener
+      ? function(element, type, fn) {element.addEventListener(type, fn, false);}
+      : function(element, type, fn) {element.attachEvent('on' + type, fn);}),
+    removeEventListenerFn = (window.document.removeEventListener
+      ? function(element, type, fn) {element.removeEventListener(type, fn, false); }
+      : function(element, type, fn) {element.detachEvent('on' + type, fn); });
+
+function jqNextId() { return ++jqId; }
+
+
+var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
+var MOZ_HACK_REGEXP = /^moz([A-Z])/;
+
+/**
+ * Converts snake_case to camelCase.
+ * Also there is special case for Moz prefix starting with upper case letter.
+ * @param name Name to normalize
+ */
+function camelCase(name) {
+  return name.
+    replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
+      return offset ? letter.toUpperCase() : letter;
+    }).
+    replace(MOZ_HACK_REGEXP, 'Moz$1');
+}
+
+/////////////////////////////////////////////
+// jQuery mutation patch
+//
+//  In conjunction with bindJQuery intercepts all jQuery's DOM destruction apis and fires a
+// $destroy event on all DOM nodes being removed.
+//
+/////////////////////////////////////////////
+
+function JQLitePatchJQueryRemove(name, dispatchThis) {
+  var originalJqFn = jQuery.fn[name];
+  originalJqFn = originalJqFn.$original || originalJqFn;
+  removePatch.$original = originalJqFn;
+  jQuery.fn[name] = removePatch;
+
+  function removePatch() {
+    var list = [this],
+        fireEvent = dispatchThis,
+        set, setIndex, setLength,
+        element, childIndex, childLength, children,
+        fns, events;
+
+    while(list.length) {
+      set = list.shift();
+      for(setIndex = 0, setLength = set.length; setIndex < setLength; setIndex++) {
+        element = jqLite(set[setIndex]);
+        if (fireEvent) {
+          element.triggerHandler('$destroy');
+        } else {
+          fireEvent = !fireEvent;
+        }
+        for(childIndex = 0, childLength = (children = element.children()).length;
+            childIndex < childLength;
+            childIndex++) {
+          list.push(jQuery(children[childIndex]));
+        }
+      }
+    }
+    return originalJqFn.apply(this, arguments);
+  }
+}
+
+/////////////////////////////////////////////
+function JQLite(element) {
+  if (element instanceof JQLite) {
+    return element;
+  }
+  if (!(this instanceof JQLite)) {
+    if (isString(element) && element.charAt(0) != '<') {
+      throw Error('selectors not implemented');
+    }
+    return new JQLite(element);
+  }
+
+  if (isString(element)) {
+    var div = document.createElement('div');
+    // Read about the NoScope elements here:
+    // http://msdn.microsoft.com/en-us/library/ms533897(VS.85).aspx
+    div.innerHTML = '<div>&#160;</div>' + element; // IE insanity to make NoScope elements work!
+    div.removeChild(div.firstChild); // remove the superfluous div
+    JQLiteAddNodes(this, div.childNodes);
+    this.remove(); // detach the elements from the temporary DOM div.
+  } else {
+    JQLiteAddNodes(this, element);
+  }
+}
+
+function JQLiteClone(element) {
+  return element.cloneNode(true);
+}
+
+function JQLiteDealoc(element){
+  JQLiteRemoveData(element);
+  for ( var i = 0, children = element.childNodes || []; i < children.length; i++) {
+    JQLiteDealoc(children[i]);
+  }
+}
+
+function JQLiteUnbind(element, type, fn) {
+  var events = JQLiteExpandoStore(element, 'events'),
+      handle = JQLiteExpandoStore(element, 'handle');
+
+  if (!handle) return; //no listeners registered
+
+  if (isUndefined(type)) {
+    forEach(events, function(eventHandler, type) {
+      removeEventListenerFn(element, type, eventHandler);
+      delete events[type];
+    });
+  } else {
+    if (isUndefined(fn)) {
+      removeEventListenerFn(element, type, events[type]);
+      delete events[type];
+    } else {
+      arrayRemove(events[type], fn);
+    }
+  }
+}
+
+function JQLiteRemoveData(element) {
+  var expandoId = element[jqName],
+      expandoStore = jqCache[expandoId];
+
+  if (expandoStore) {
+    if (expandoStore.handle) {
+      expandoStore.events.$destroy && expandoStore.handle({}, '$destroy');
+      JQLiteUnbind(element);
+    }
+    delete jqCache[expandoId];
+    element[jqName] = undefined; // ie does not allow deletion of attributes on elements.
+  }
+}
+
+function JQLiteExpandoStore(element, key, value) {
+  var expandoId = element[jqName],
+      expandoStore = jqCache[expandoId || -1];
+
+  if (isDefined(value)) {
+    if (!expandoStore) {
+      element[jqName] = expandoId = jqNextId();
+      expandoStore = jqCache[expandoId] = {};
+    }
+    expandoStore[key] = value;
+  } else {
+    return expandoStore && expandoStore[key];
+  }
+}
+
+function JQLiteData(element, key, value) {
+  var data = JQLiteExpandoStore(element, 'data'),
+      isSetter = isDefined(value),
+      keyDefined = !isSetter && isDefined(key),
+      isSimpleGetter = keyDefined && !isObject(key);
+
+  if (!data && !isSimpleGetter) {
+    JQLiteExpandoStore(element, 'data', data = {});
+  }
+
+  if (isSetter) {
+    data[key] = value;
+  } else {
+    if (keyDefined) {
+      if (isSimpleGetter) {
+        // don't create data in this case.
+        return data && data[key];
+      } else {
+        extend(data, key);
+      }
+    } else {
+      return data;
+    }
+  }
+}
+
+function JQLiteHasClass(element, selector) {
+  return ((" " + element.className + " ").replace(/[\n\t]/g, " ").
+      indexOf( " " + selector + " " ) > -1);
+}
+
+function JQLiteRemoveClass(element, cssClasses) {
+  if (cssClasses) {
+    forEach(cssClasses.split(' '), function(cssClass) {
+      element.className = trim(
+          (" " + element.className + " ")
+          .replace(/[\n\t]/g, " ")
+          .replace(" " + trim(cssClass) + " ", " ")
+      );
+    });
+  }
+}
+
+function JQLiteAddClass(element, cssClasses) {
+  if (cssClasses) {
+    forEach(cssClasses.split(' '), function(cssClass) {
+      if (!JQLiteHasClass(element, cssClass)) {
+        element.className = trim(element.className + ' ' + trim(cssClass));
+      }
+    });
+  }
+}
+
+function JQLiteAddNodes(root, elements) {
+  if (elements) {
+    elements = (!elements.nodeName && isDefined(elements.length) && !isWindow(elements))
+      ? elements
+      : [ elements ];
+    for(var i=0; i < elements.length; i++) {
+      root.push(elements[i]);
+    }
+  }
+}
+
+function JQLiteController(element, name) {
+  return JQLiteInheritedData(element, '$' + (name || 'ngController' ) + 'Controller');
+}
+
+function JQLiteInheritedData(element, name, value) {
+  element = jqLite(element);
+
+  // if element is the document object work with the html element instead
+  // this makes $(document).scope() possible
+  if(element[0].nodeType == 9) {
+    element = element.find('html');
+  }
+
+  while (element.length) {
+    if (value = element.data(name)) return value;
+    element = element.parent();
+  }
+}
+
+//////////////////////////////////////////
+// Functions which are declared directly.
+//////////////////////////////////////////
+var JQLitePrototype = JQLite.prototype = {
+  ready: function(fn) {
+    var fired = false;
+
+    function trigger() {
+      if (fired) return;
+      fired = true;
+      fn();
+    }
+
+    // check if document already is loaded
+    if (document.readyState === 'complete'){
+      setTimeout(trigger);
+    } else {
+      this.bind('DOMContentLoaded', trigger); // works for modern browsers and IE9
+      // we can not use jqLite since we are not done loading and jQuery could be loaded later.
+      JQLite(window).bind('load', trigger); // fallback to window.onload for others
+    }
+  },
+  toString: function() {
+    var value = [];
+    forEach(this, function(e){ value.push('' + e);});
+    return '[' + value.join(', ') + ']';
+  },
+
+  eq: function(index) {
+      return (index >= 0) ? jqLite(this[index]) : jqLite(this[this.length + index]);
+  },
+
+  length: 0,
+  push: push,
+  sort: [].sort,
+  splice: [].splice
+};
+
+//////////////////////////////////////////
+// Functions iterating getter/setters.
+// these functions return self on setter and
+// value on get.
+//////////////////////////////////////////
+var BOOLEAN_ATTR = {};
+forEach('multiple,selected,checked,disabled,readOnly,required,open'.split(','), function(value) {
+  BOOLEAN_ATTR[lowercase(value)] = value;
+});
+var BOOLEAN_ELEMENTS = {};
+forEach('input,select,option,textarea,button,form,details'.split(','), function(value) {
+  BOOLEAN_ELEMENTS[uppercase(value)] = true;
+});
+
+function getBooleanAttrName(element, name) {
+  // check dom last since we will most likely fail on name
+  var booleanAttr = BOOLEAN_ATTR[name.toLowerCase()];
+
+  // booleanAttr is here twice to minimize DOM access
+  return booleanAttr && BOOLEAN_ELEMENTS[element.nodeName] && booleanAttr;
+}
+
+forEach({
+  data: JQLiteData,
+  inheritedData: JQLiteInheritedData,
+
+  scope: function(element) {
+    return JQLiteInheritedData(element, '$scope');
+  },
+
+  controller: JQLiteController ,
+
+  injector: function(element) {
+    return JQLiteInheritedData(element, '$injector');
+  },
+
+  removeAttr: function(element,name) {
+    element.removeAttribute(name);
+  },
+
+  hasClass: JQLiteHasClass,
+
+  css: function(element, name, value) {
+    name = camelCase(name);
+
+    if (isDefined(value)) {
+      element.style[name] = value;
+    } else {
+      var val;
+
+      if (msie <= 8) {
+        // this is some IE specific weirdness that jQuery 1.6.4 does not sure why
+        val = element.currentStyle && element.currentStyle[name];
+        if (val === '') val = 'auto';
+      }
+
+      val = val || element.style[name];
+
+      if (msie <= 8) {
+        // jquery weirdness :-/
+        val = (val === '') ? undefined : val;
+      }
+
+      return  val;
+    }
+  },
+
+  attr: function(element, name, value){
+    var lowercasedName = lowercase(name);
+    if (BOOLEAN_ATTR[lowercasedName]) {
+      if (isDefined(value)) {
+        if (!!value) {
+          element[name] = true;
+          element.setAttribute(name, lowercasedName);
+        } else {
+          element[name] = false;
+          element.removeAttribute(lowercasedName);
+        }
+      } else {
+        return (element[name] ||
+                 (element.attributes.getNamedItem(name)|| noop).specified)
+               ? lowercasedName
+               : undefined;
+      }
+    } else if (isDefined(value)) {
+      element.setAttribute(name, value);
+    } else if (element.getAttribute) {
+      // the extra argument "2" is to get the right thing for a.href in IE, see jQuery code
+      // some elements (e.g. Document) don't have get attribute, so return undefined
+      var ret = element.getAttribute(name, 2);
+      // normalize non-existing attributes to undefined (as jQuery)
+      return ret === null ? undefined : ret;
+    }
+  },
+
+  prop: function(element, name, value) {
+    if (isDefined(value)) {
+      element[name] = value;
+    } else {
+      return element[name];
+    }
+  },
+
+  text: extend((msie < 9)
+      ? function(element, value) {
+        if (element.nodeType == 1 /** Element */) {
+          if (isUndefined(value))
+            return element.innerText;
+          element.innerText = value;
+        } else {
+          if (isUndefined(value))
+            return element.nodeValue;
+          element.nodeValue = value;
+        }
+      }
+      : function(element, value) {
+        if (isUndefined(value)) {
+          return element.textContent;
+        }
+        element.textContent = value;
+      }, {$dv:''}),
+
+  val: function(element, value) {
+    if (isUndefined(value)) {
+      return element.value;
+    }
+    element.value = value;
+  },
+
+  html: function(element, value) {
+    if (isUndefined(value)) {
+      return element.innerHTML;
+    }
+    for (var i = 0, childNodes = element.childNodes; i < childNodes.length; i++) {
+      JQLiteDealoc(childNodes[i]);
+    }
+    element.innerHTML = value;
+  }
+}, function(fn, name){
+  /**
+   * Properties: writes return selection, reads return first value
+   */
+  JQLite.prototype[name] = function(arg1, arg2) {
+    var i, key;
+
+    // JQLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it
+    // in a way that survives minification.
+    if (((fn.length == 2 && (fn !== JQLiteHasClass && fn !== JQLiteController)) ? arg1 : arg2) === undefined) {
+      if (isObject(arg1)) {
+
+        // we are a write, but the object properties are the key/values
+        for(i=0; i < this.length; i++) {
+          if (fn === JQLiteData) {
+            // data() takes the whole object in jQuery
+            fn(this[i], arg1);
+          } else {
+            for (key in arg1) {
+              fn(this[i], key, arg1[key]);
+            }
+          }
+        }
+        // return self for chaining
+        return this;
+      } else {
+        // we are a read, so read the first child.
+        if (this.length)
+          return fn(this[0], arg1, arg2);
+      }
+    } else {
+      // we are a write, so apply to all children
+      for(i=0; i < this.length; i++) {
+        fn(this[i], arg1, arg2);
+      }
+      // return self for chaining
+      return this;
+    }
+    return fn.$dv;
+  };
+});
+
+function createEventHandler(element, events) {
+  var eventHandler = function (event, type) {
+    if (!event.preventDefault) {
+      event.preventDefault = function() {
+        event.returnValue = false; //ie
+      };
+    }
+
+    if (!event.stopPropagation) {
+      event.stopPropagation = function() {
+        event.cancelBubble = true; //ie
+      };
+    }
+
+    if (!event.target) {
+      event.target = event.srcElement || document;
+    }
+
+    if (isUndefined(event.defaultPrevented)) {
+      var prevent = event.preventDefault;
+      event.preventDefault = function() {
+        event.defaultPrevented = true;
+        prevent.call(event);
+      };
+      event.defaultPrevented = false;
+    }
+
+    event.isDefaultPrevented = function() {
+      return event.defaultPrevented || event.returnValue == false;
+    };
+
+    forEach(events[type || event.type], function(fn) {
+      fn.call(element, event);
+    });
+
+    // Remove monkey-patched methods (IE),
+    // as they would cause memory leaks in IE8.
+    if (msie <= 8) {
+      // IE7/8 does not allow to delete property on native object
+      event.preventDefault = null;
+      event.stopPropagation = null;
+      event.isDefaultPrevented = null;
+    } else {
+      // It shouldn't affect normal browsers (native methods are defined on prototype).
+      delete event.preventDefault;
+      delete event.stopPropagation;
+      delete event.isDefaultPrevented;
+    }
+  };
+  eventHandler.elem = element;
+  return eventHandler;
+}
+
+//////////////////////////////////////////
+// Functions iterating traversal.
+// These functions chain results into a single
+// selector.
+//////////////////////////////////////////
+forEach({
+  removeData: JQLiteRemoveData,
+
+  dealoc: JQLiteDealoc,
+
+  bind: function bindFn(element, type, fn){
+    var events = JQLiteExpandoStore(element, 'events'),
+        handle = JQLiteExpandoStore(element, 'handle');
+
+    if (!events) JQLiteExpandoStore(element, 'events', events = {});
+    if (!handle) JQLiteExpandoStore(element, 'handle', handle = createEventHandler(element, events));
+
+    forEach(type.split(' '), function(type){
+      var eventFns = events[type];
+
+      if (!eventFns) {
+        if (type == 'mouseenter' || type == 'mouseleave') {
+          var contains = document.body.contains || document.body.compareDocumentPosition ?
+          function( a, b ) {
+            var adown = a.nodeType === 9 ? a.documentElement : a,
+            bup = b && b.parentNode;
+            return a === bup || !!( bup && bup.nodeType === 1 && (
+              adown.contains ?
+              adown.contains( bup ) :
+              a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
+              ));
+            } :
+            function( a, b ) {
+              if ( b ) {
+                while ( (b = b.parentNode) ) {
+                  if ( b === a ) {
+                    return true;
+                  }
+                }
+              }
+              return false;
+            };	
+
+          events[type] = [];
+		
+		  // Refer to jQuery's implementation of mouseenter & mouseleave
+          // Read about mouseenter and mouseleave:
+          // http://www.quirksmode.org/js/events_mouse.html#link8
+          var eventmap = { mouseleave : "mouseout", mouseenter : "mouseover"}          
+          bindFn(element, eventmap[type], function(event) {
+            var ret, target = this, related = event.relatedTarget;
+            // For mousenter/leave call the handler if related is outside the target.
+            // NB: No relatedTarget if the mouse left/entered the browser window
+            if ( !related || (related !== target && !contains(target, related)) ){
+              handle(event, type);
+            }	
+
+          });
+
+        } else {
+          addEventListenerFn(element, type, handle);
+          events[type] = [];
+        }
+        eventFns = events[type]
+      }
+      eventFns.push(fn);
+    });
+  },
+
+  unbind: JQLiteUnbind,
+
+  replaceWith: function(element, replaceNode) {
+    var index, parent = element.parentNode;
+    JQLiteDealoc(element);
+    forEach(new JQLite(replaceNode), function(node){
+      if (index) {
+        parent.insertBefore(node, index.nextSibling);
+      } else {
+        parent.replaceChild(node, element);
+      }
+      index = node;
+    });
+  },
+
+  children: function(element) {
+    var children = [];
+    forEach(element.childNodes, function(element){
+      if (element.nodeType === 1)
+        children.push(element);
+    });
+    return children;
+  },
+
+  contents: function(element) {
+    return element.childNodes || [];
+  },
+
+  append: function(element, node) {
+    forEach(new JQLite(node), function(child){
+      if (element.nodeType === 1 || element.nodeType === 11) {
+        element.appendChild(child);
+      }
+    });
+  },
+
+  prepend: function(element, node) {
+    if (element.nodeType === 1) {
+      var index = element.firstChild;
+      forEach(new JQLite(node), function(child){
+        if (index) {
+          element.insertBefore(child, index);
+        } else {
+          element.appendChild(child);
+          index = child;
+        }
+      });
+    }
+  },
+
+  wrap: function(element, wrapNode) {
+    wrapNode = jqLite(wrapNode)[0];
+    var parent = element.parentNode;
+    if (parent) {
+      parent.replaceChild(wrapNode, element);
+    }
+    wrapNode.appendChild(element);
+  },
+
+  remove: function(element) {
+    JQLiteDealoc(element);
+    var parent = element.parentNode;
+    if (parent) parent.removeChild(element);
+  },
+
+  after: function(element, newElement) {
+    var index = element, parent = element.parentNode;
+    forEach(new JQLite(newElement), function(node){
+      parent.insertBefore(node, index.nextSibling);
+      index = node;
+    });
+  },
+
+  addClass: JQLiteAddClass,
+  removeClass: JQLiteRemoveClass,
+
+  toggleClass: function(element, selector, condition) {
+    if (isUndefined(condition)) {
+      condition = !JQLiteHasClass(element, selector);
+    }
+    (condition ? JQLiteAddClass : JQLiteRemoveClass)(element, selector);
+  },
+
+  parent: function(element) {
+    var parent = element.parentNode;
+    return parent && parent.nodeType !== 11 ? parent : null;
+  },
+
+  next: function(element) {
+    if (element.nextElementSibling) {
+      return element.nextElementSibling;
+    }
+
+    // IE8 doesn't have nextElementSibling
+    var elm = element.nextSibling;
+    while (elm != null && elm.nodeType !== 1) {
+      elm = elm.nextSibling;
+    }
+    return elm;
+  },
+
+  find: function(element, selector) {
+    return element.getElementsByTagName(selector);
+  },
+
+  clone: JQLiteClone,
+
+  triggerHandler: function(element, eventName) {
+    var eventFns = (JQLiteExpandoStore(element, 'events') || {})[eventName];
+    var event;
+
+    forEach(eventFns, function(fn) {
+      fn.call(element, {preventDefault: noop});
+    });
+  }
+}, function(fn, name){
+  /**
+   * chaining functions
+   */
+  JQLite.prototype[name] = function(arg1, arg2) {
+    var value;
+    for(var i=0; i < this.length; i++) {
+      if (value == undefined) {
+        value = fn(this[i], arg1, arg2);
+        if (value !== undefined) {
+          // any function which returns a value needs to be wrapped
+          value = jqLite(value);
+        }
+      } else {
+        JQLiteAddNodes(value, fn(this[i], arg1, arg2));
+      }
+    }
+    return value == undefined ? this : value;
+  };
+});
+
+/**
+ * Computes a hash of an 'obj'.
+ * Hash of a:
+ *  string is string
+ *  number is number as string
+ *  object is either result of calling $$hashKey function on the object or uniquely generated id,
+ *         that is also assigned to the $$hashKey property of the object.
+ *
+ * @param obj
+ * @returns {string} hash string such that the same input will have the same hash string.
+ *         The resulting string key is in 'type:hashKey' format.
+ */
+function hashKey(obj) {
+  var objType = typeof obj,
+      key;
+
+  if (objType == 'object' && obj !== null) {
+    if (typeof (key = obj.$$hashKey) == 'function') {
+      // must invoke on object to keep the right this
+      key = obj.$$hashKey();
+    } else if (key === undefined) {
+      key = obj.$$hashKey = nextUid();
+    }
+  } else {
+    key = obj;
+  }
+
+  return objType + ':' + key;
+}
+
+/**
+ * HashMap which can use objects as keys
+ */
+function HashMap(array){
+  forEach(array, this.put, this);
+}
+HashMap.prototype = {
+  /**
+   * Store key value pair
+   * @param key key to store can be any type
+   * @param value value to store can be any type
+   */
+  put: function(key, value) {
+    this[hashKey(key)] = value;
+  },
+
+  /**
+   * @param key
+   * @returns the value for the key
+   */
+  get: function(key) {
+    return this[hashKey(key)];
+  },
+
+  /**
+   * Remove the key/value pair
+   * @param key
+   */
+  remove: function(key) {
+    var value = this[key = hashKey(key)];
+    delete this[key];
+    return value;
+  }
+};
+
+/**
+ * @ngdoc function
+ * @name angular.injector
+ * @function
+ *
+ * @description
+ * Creates an injector function that can be used for retrieving services as well as for
+ * dependency injection (see {@link guide/di dependency injection}).
+ *
+
+ * @param {Array.<string|Function>} modules A list of module functions or their aliases. See
+ *        {@link angular.module}. The `ng` module must be explicitly added.
+ * @returns {function()} Injector function. See {@link AUTO.$injector $injector}.
+ *
+ * @example
+ * Typical usage
+ * <pre>
+ *   // create an injector
+ *   var $injector = angular.injector(['ng']);
+ *
+ *   // use the injector to kick off your application
+ *   // use the type inference to auto inject arguments, or use implicit injection
+ *   $injector.invoke(function($rootScope, $compile, $document){
+ *     $compile($document)($rootScope);
+ *     $rootScope.$digest();
+ *   });
+ * </pre>
+ */
+
+
+/**
+ * @ngdoc overview
+ * @name AUTO
+ * @description
+ *
+ * Implicit module which gets automatically added to each {@link AUTO.$injector $injector}.
+ */
+
+var FN_ARGS = /^function\s*[^\(]*\(\s*([^\)]*)\)/m;
+var FN_ARG_SPLIT = /,/;
+var FN_ARG = /^\s*(_?)(\S+?)\1\s*$/;
+var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
+function annotate(fn) {
+  var $inject,
+      fnText,
+      argDecl,
+      last;
+
+  if (typeof fn == 'function') {
+    if (!($inject = fn.$inject)) {
+      $inject = [];
+      fnText = fn.toString().replace(STRIP_COMMENTS, '');
+      argDecl = fnText.match(FN_ARGS);
+      forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg){
+        arg.replace(FN_ARG, function(all, underscore, name){
+          $inject.push(name);
+        });
+      });
+      fn.$inject = $inject;
+    }
+  } else if (isArray(fn)) {
+    last = fn.length - 1;
+    assertArgFn(fn[last], 'fn');
+    $inject = fn.slice(0, last);
+  } else {
+    assertArgFn(fn, 'fn', true);
+  }
+  return $inject;
+}
+
+///////////////////////////////////////
+
+/**
+ * @ngdoc object
+ * @name AUTO.$injector
+ * @function
+ *
+ * @description
+ *
+ * `$injector` is used to retrieve object instances as defined by
+ * {@link AUTO.$provide provider}, instantiate types, invoke methods,
+ * and load modules.
+ *
+ * The following always holds true:
+ *
+ * <pre>
+ *   var $injector = angular.injector();
+ *   expect($injector.get('$injector')).toBe($injector);
+ *   expect($injector.invoke(function($injector){
+ *     return $injector;
+ *   }).toBe($injector);
+ * </pre>
+ *
+ * # Injection Function Annotation
+ *
+ * JavaScript does not have annotations, and annotations are needed for dependency injection. The
+ * following are all valid ways of annotating function with injection arguments and are equivalent.
+ *
+ * <pre>
+ *   // inferred (only works if code not minified/obfuscated)
+ *   $injector.invoke(function(serviceA){});
+ *
+ *   // annotated
+ *   function explicit(serviceA) {};
+ *   explicit.$inject = ['serviceA'];
+ *   $injector.invoke(explicit);
+ *
+ *   // inline
+ *   $injector.invoke(['serviceA', function(serviceA){}]);
+ * </pre>
+ *
+ * ## Inference
+ *
+ * In JavaScript calling `toString()` on a function returns the function definition. The definition can then be
+ * parsed and the function arguments can be extracted. *NOTE:* This does not work with minification, and obfuscation
+ * tools since these tools change the argument names.
+ *
+ * ## `$inject` Annotation
+ * By adding a `$inject` property onto a function the injection parameters can be specified.
+ *
+ * ## Inline
+ * As an array of injection names, where the last item in the array is the function to call.
+ */
+
+/**
+ * @ngdoc method
+ * @name AUTO.$injector#get
+ * @methodOf AUTO.$injector
+ *
+ * @description
+ * Return an instance of the service.
+ *
+ * @param {string} name The name of the instance to retrieve.
+ * @return {*} The instance.
+ */
+
+/**
+ * @ngdoc method
+ * @name AUTO.$injector#invoke
+ * @methodOf AUTO.$injector
+ *
+ * @description
+ * Invoke the method and supply the method arguments from the `$injector`.
+ *
+ * @param {!function} fn The function to invoke. The function arguments come form the function annotation.
+ * @param {Object=} self The `this` for the invoked method.
+ * @param {Object=} locals Optional object. If preset then any argument names are read from this object first, before
+ *   the `$injector` is consulted.
+ * @returns {*} the value returned by the invoked `fn` function.
+ */
+
+/**
+ * @ngdoc method
+ * @name AUTO.$injector#has
+ * @methodOf AUTO.$injector
+ *
+ * @description
+ * Allows the user to query if the particular service exist.
+ *
+ * @param {string} Name of the service to query.
+ * @returns {boolean} returns true if injector has given service.
+ */
+
+/**
+ * @ngdoc method
+ * @name AUTO.$injector#instantiate
+ * @methodOf AUTO.$injector
+ * @description
+ * Create a new instance of JS type. The method takes a constructor function invokes the new operator and supplies
+ * all of the arguments to the constructor function as specified by the constructor annotation.
+ *
+ * @param {function} Type Annotated constructor function.
+ * @param {Object=} locals Optional object. If preset then any argument names are read from this object first, before
+ *   the `$injector` is consulted.
+ * @returns {Object} new instance of `Type`.
+ */
+
+/**
+ * @ngdoc method
+ * @name AUTO.$injector#annotate
+ * @methodOf AUTO.$injector
+ *
+ * @description
+ * Returns an array of service names which the function is requesting for injection. This API is used by the injector
+ * to determine which services need to be injected into the function when the function is invoked. There are three
+ * ways in which the function can be annotated with the needed dependencies.
+ *
+ * # Argument names
+ *
+ * The simplest form is to extract the dependencies from the arguments of the function. This is done by converting
+ * the function into a string using `toString()` method and extracting the argument names.
+ * <pre>
+ *   // Given
+ *   function MyController($scope, $route) {
+ *     // ...
+ *   }
+ *
+ *   // Then
+ *   expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);
+ * </pre>
+ *
+ * This method does not work with code minfication / obfuscation. For this reason the following annotation strategies
+ * are supported.
+ *
+ * # The `$inject` property
+ *
+ * If a function has an `$inject` property and its value is an array of strings, then the strings represent names of
+ * services to be injected into the function.
+ * <pre>
+ *   // Given
+ *   var MyController = function(obfuscatedScope, obfuscatedRoute) {
+ *     // ...
+ *   }
+ *   // Define function dependencies
+ *   MyController.$inject = ['$scope', '$route'];
+ *
+ *   // Then
+ *   expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);
+ * </pre>
+ *
+ * # The array notation
+ *
+ * It is often desirable to inline Injected functions and that's when setting the `$inject` property is very
+ * inconvenient. In these situations using the array notation to specify the dependencies in a way that survives
+ * minification is a better choice:
+ *
+ * <pre>
+ *   // We wish to write this (not minification / obfuscation safe)
+ *   injector.invoke(function($compile, $rootScope) {
+ *     // ...
+ *   });
+ *
+ *   // We are forced to write break inlining
+ *   var tmpFn = function(obfuscatedCompile, obfuscatedRootScope) {
+ *     // ...
+ *   };
+ *   tmpFn.$inject = ['$compile', '$rootScope'];
+ *   injector.invoke(tmpFn);
+ *
+ *   // To better support inline function the inline annotation is supported
+ *   injector.invoke(['$compile', '$rootScope', function(obfCompile, obfRootScope) {
+ *     // ...
+ *   }]);
+ *
+ *   // Therefore
+ *   expect(injector.annotate(
+ *      ['$compile', '$rootScope', function(obfus_$compile, obfus_$rootScope) {}])
+ *    ).toEqual(['$compile', '$rootScope']);
+ * </pre>
+ *
+ * @param {function|Array.<string|Function>} fn Function for which dependent service names need to be retrieved as described
+ *   above.
+ *
+ * @returns {Array.<string>} The names of the services which the function requires.
+ */
+
+
+
+
+/**
+ * @ngdoc object
+ * @name AUTO.$provide
+ *
+ * @description
+ *
+ * Use `$provide` to register new providers with the `$injector`. The providers are the factories for the instance.
+ * The providers share the same name as the instance they create with `Provider` suffixed to them.
+ *
+ * A provider is an object with a `$get()` method. The injector calls the `$get` method to create a new instance of
+ * a service. The Provider can have additional methods which would allow for configuration of the provider.
+ *
+ * <pre>
+ *   function GreetProvider() {
+ *     var salutation = 'Hello';
+ *
+ *     this.salutation = function(text) {
+ *       salutation = text;
+ *     };
+ *
+ *     this.$get = function() {
+ *       return function (name) {
+ *         return salutation + ' ' + name + '!';
+ *       };
+ *     };
+ *   }
+ *
+ *   describe('Greeter', function(){
+ *
+ *     beforeEach(module(function($provide) {
+ *       $provide.provider('greet', GreetProvider);
+ *     }));
+ *
+ *     it('should greet', inject(function(greet) {
+ *       expect(greet('angular')).toEqual('Hello angular!');
+ *     }));
+ *
+ *     it('should allow configuration of salutation', function() {
+ *       module(function(greetProvider) {
+ *         greetProvider.salutation('Ahoj');
+ *       });
+ *       inject(function(greet) {
+ *         expect(greet('angular')).toEqual('Ahoj angular!');
+ *       });
+ *     });
+ * </pre>
+ */
+
+/**
+ * @ngdoc method
+ * @name AUTO.$provide#provider
+ * @methodOf AUTO.$provide
+ * @description
+ *
+ * Register a provider for a service. The providers can be retrieved and can have additional configuration methods.
+ *
+ * @param {string} name The name of the instance. NOTE: the provider will be available under `name + 'Provider'` key.
+ * @param {(Object|function())} provider If the provider is:
+ *
+ *   - `Object`: then it should have a `$get` method. The `$get` method will be invoked using
+ *               {@link AUTO.$injector#invoke $injector.invoke()} when an instance needs to be created.
+ *   - `Constructor`: a new instance of the provider will be created using
+ *               {@link AUTO.$injector#instantiate $injector.instantiate()}, then treated as `object`.
+ *
+ * @returns {Object} registered provider instance
+ */
+
+/**
+ * @ngdoc method
+ * @name AUTO.$provide#factory
+ * @methodOf AUTO.$provide
+ * @description
+ *
+ * A short hand for configuring services if only `$get` method is required.
+ *
+ * @param {string} name The name of the instance.
+ * @param {function()} $getFn The $getFn for the instance creation. Internally this is a short hand for
+ * `$provide.provider(name, {$get: $getFn})`.
+ * @returns {Object} registered provider instance
+ */
+
+
+/**
+ * @ngdoc method
+ * @name AUTO.$provide#service
+ * @methodOf AUTO.$provide
+ * @description
+ *
+ * A short hand for registering service of given class.
+ *
+ * @param {string} name The name of the instance.
+ * @param {Function} constructor A class (constructor function) that will be instantiated.
+ * @returns {Object} registered provider instance
+ */
+
+
+/**
+ * @ngdoc method
+ * @name AUTO.$provide#value
+ * @methodOf AUTO.$provide
+ * @description
+ *
+ * A short hand for configuring services if the `$get` method is a constant.
+ *
+ * @param {string} name The name of the instance.
+ * @param {*} value The value.
+ * @returns {Object} registered provider instance
+ */
+
+
+/**
+ * @ngdoc method
+ * @name AUTO.$provide#constant
+ * @methodOf AUTO.$provide
+ * @description
+ *
+ * A constant value, but unlike {@link AUTO.$provide#value value} it can be injected
+ * into configuration function (other modules) and it is not interceptable by
+ * {@link AUTO.$provide#decorator decorator}.
+ *
+ * @param {string} name The name of the constant.
+ * @param {*} value The constant value.
+ * @returns {Object} registered instance
+ */
+
+
+/**
+ * @ngdoc method
+ * @name AUTO.$provide#decorator
+ * @methodOf AUTO.$provide
+ * @description
+ *
+ * Decoration of service, allows the decorator to intercept the service instance creation. The
+ * returned instance may be the original instance, or a new instance which delegates to the
+ * original instance.
+ *
+ * @param {string} name The name of the service to decorate.
+ * @param {function()} decorator This function will be invoked when the service needs to be
+ *    instantiated. The function is called using the {@link AUTO.$injector#invoke
+ *    injector.invoke} method and is therefore fully injectable. Local injection arguments:
+ *
+ *    * `$delegate` - The original service instance, which can be monkey patched, configured,
+ *      decorated or delegated to.
+ */
+
+
+function createInjector(modulesToLoad) {
+  var INSTANTIATING = {},
+      providerSuffix = 'Provider',
+      path = [],
+      loadedModules = new HashMap(),
+      providerCache = {
+        $provide: {
+            provider: supportObject(provider),
+            factory: supportObject(factory),
+            service: supportObject(service),
+            value: supportObject(value),
+            constant: supportObject(constant),
+            decorator: decorator
+          }
+      },
+      providerInjector = (providerCache.$injector =
+          createInternalInjector(providerCache, function() {
+            throw Error("Unknown provider: " + path.join(' <- '));
+          })),
+      instanceCache = {},
+      instanceInjector = (instanceCache.$injector =
+          createInternalInjector(instanceCache, function(servicename) {
+            var provider = providerInjector.get(servicename + providerSuffix);
+            return instanceInjector.invoke(provider.$get, provider);
+          }));
+
+
+  forEach(loadModules(modulesToLoad), function(fn) { instanceInjector.invoke(fn || noop); });
+
+  return instanceInjector;
+
+  ////////////////////////////////////
+  // $provider
+  ////////////////////////////////////
+
+  function supportObject(delegate) {
+    return function(key, value) {
+      if (isObject(key)) {
+        forEach(key, reverseParams(delegate));
+      } else {
+        return delegate(key, value);
+      }
+    }
+  }
+
+  function provider(name, provider_) {
+    if (isFunction(provider_) || isArray(provider_)) {
+      provider_ = providerInjector.instantiate(provider_);
+    }
+    if (!provider_.$get) {
+      throw Error('Provider ' + name + ' must define $get factory method.');
+    }
+    return providerCache[name + providerSuffix] = provider_;
+  }
+
+  function factory(name, factoryFn) { return provider(name, { $get: factoryFn }); }
+
+  function service(name, constructor) {
+    return factory(name, ['$injector', function($injector) {
+      return $injector.instantiate(constructor);
+    }]);
+  }
+
+  function value(name, value) { return factory(name, valueFn(value)); }
+
+  function constant(name, value) {
+    providerCache[name] = value;
+    instanceCache[name] = value;
+  }
+
+  function decorator(serviceName, decorFn) {
+    var origProvider = providerInjector.get(serviceName + providerSuffix),
+        orig$get = origProvider.$get;
+
+    origProvider.$get = function() {
+      var origInstance = instanceInjector.invoke(orig$get, origProvider);
+      return instanceInjector.invoke(decorFn, null, {$delegate: origInstance});
+    };
+  }
+
+  ////////////////////////////////////
+  // Module Loading
+  ////////////////////////////////////
+  function loadModules(modulesToLoad){
+    var runBlocks = [];
+    forEach(modulesToLoad, function(module) {
+      if (loadedModules.get(module)) return;
+      loadedModules.put(module, true);
+      if (isString(module)) {
+        var moduleFn = angularModule(module);
+        runBlocks = runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks);
+
+        try {
+          for(var invokeQueue = moduleFn._invokeQueue, i = 0, ii = invokeQueue.length; i < ii; i++) {
+            var invokeArgs = invokeQueue[i],
+                provider = providerInjector.get(invokeArgs[0]);
+
+            provider[invokeArgs[1]].apply(provider, invokeArgs[2]);
+          }
+        } catch (e) {
+          if (e.message) e.message += ' from ' + module;
+          throw e;
+        }
+      } else if (isFunction(module)) {
+        try {
+          runBlocks.push(providerInjector.invoke(module));
+        } catch (e) {
+          if (e.message) e.message += ' from ' + module;
+          throw e;
+        }
+      } else if (isArray(module)) {
+        try {
+          runBlocks.push(providerInjector.invoke(module));
+        } catch (e) {
+          if (e.message) e.message += ' from ' + String(module[module.length - 1]);
+          throw e;
+        }
+      } else {
+        assertArgFn(module, 'module');
+      }
+    });
+    return runBlocks;
+  }
+
+  ////////////////////////////////////
+  // internal Injector
+  ////////////////////////////////////
+
+  function createInternalInjector(cache, factory) {
+
+    function getService(serviceName) {
+      if (typeof serviceName !== 'string') {
+        throw Error('Service name expected');
+      }
+      if (cache.hasOwnProperty(serviceName)) {
+        if (cache[serviceName] === INSTANTIATING) {
+          throw Error('Circular dependency: ' + path.join(' <- '));
+        }
+        return cache[serviceName];
+      } else {
+        try {
+          path.unshift(serviceName);
+          cache[serviceName] = INSTANTIATING;
+          return cache[serviceName] = factory(serviceName);
+    

<TRUNCATED>

[57/61] [abbrv] git commit: updated git ignore

Posted by sn...@apache.org.
updated git ignore


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/db6f01c1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/db6f01c1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/db6f01c1

Branch: refs/pull/35/merge
Commit: db6f01c162d60ebbc055ee374b93b2e2eaf02ccd
Parents: 616641e
Author: Rod Simpson <ro...@apigee.com>
Authored: Mon Jan 27 16:08:05 2014 -0700
Committer: Rod Simpson <ro...@apigee.com>
Committed: Mon Jan 27 16:08:05 2014 -0700

----------------------------------------------------------------------
 .gitignore        | 5 ++++-
 portal/.gitignore | 8 --------
 2 files changed, 4 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/db6f01c1/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index dec7818..e733658 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,4 +11,7 @@ Icon
 
 # Files that might appear on external disk
 .Spotlight-V100
-.Trashes
\ No newline at end of file
+.Trashes
+/portal/performance/
+
+/portal/node_modules/

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/db6f01c1/portal/.gitignore
----------------------------------------------------------------------
diff --git a/portal/.gitignore b/portal/.gitignore
deleted file mode 100644
index b310a13..0000000
--- a/portal/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-/.DS_Store
-dist
-.DS_Store
-.idea
-nbproject/
-*.swp
-node-modules/
-.vagrant


[47/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/index.html
----------------------------------------------------------------------
diff --git a/portal/index.html b/portal/index.html
index 91d4390..99a5577 100644
--- a/portal/index.html
+++ b/portal/index.html
@@ -1,1412 +1,238 @@
-<!DOCTYPE html>
-<meta charset="utf-8" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html"
-      xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html">
-<html>
-  <head>
-  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
-  <title>Apigee App Services Admin Portal </title>
-    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
-    <link rel="stylesheet" type="text/css" href="css/usergrid.css"/>
-    <script src="config.js" type="text/javascript"></script>
-    <script src="js/app/usergrid.appSDK.js" type="text/javascript"></script>
-    <script src="js/app/session.js" type="text/javascript"></script>
-    <script src="js/app/quickLogin.js" type="text/javascript"></script>
-    <script src="js/app/params.js" type="text/javascript"></script>
-    <script src="js/app/sso.js" type="text/javascript"></script>
-    <script type="text/javascript">
-      /*
-      Quick Login: script loads the minimal amount of resources to be able to detect if the user is logged in
-      and if not, send him directly to the SSO page
-       */
-      Usergrid.Params.parseParams();
-      Usergrid.SSO.setUseSSO(Usergrid.Params.queryParams.use_sso);
-      Usergrid.QuickLogin.init(Usergrid.Params.queryParams,Usergrid.userSession.loggedIn(),
-      Usergrid.SSO.usingSSO());
-
-    </script>
-    <script src="js/lib/jquery-1.7.2.min.js" type="text/javascript"></script>
-    <script src="js/lib/underscore-min.js" type="text/javascript"></script>
-    <script src="js/lib/backbone.js" type="text/javascript"></script>
-    <script src="js/lib/jquery-ui-1.8.18.min.js" type="text/javascript"></script>
-    <script src="js/lib/jquery.jsonp-2.3.1.min.js" type="text/javascript"></script>
-    <script src="js/lib/jquery.dataset.min.js" type="text/javascript"></script>
-    <script src="js/lib/jquery.tmpl.min.js" type="text/javascript"></script>
-    <script src="js/lib/jquery.dform-0.1.3.min.js" type="text/javascript"></script>
-    <script src="js/lib/jquery.ui.timepicker.min.js" type="text/javascript"></script>
-    <script src="js/lib/jquery.ui.statusbar.min.js" type="text/javascript"></script>
-    <script src="js/lib/date.min.js" type="text/javascript"></script>
-    <script src="js/app/helpers.js" type="text/javascript"></script>
-    <script src="js/app/navigation.js" type="text/javascript"></script>
-    <script src="js/app/console.js" type="text/javascript"></script>
-    <script src="js/app/ui/ui.js" type="text/javascript"></script>
-
-<style type="text/css">
-
-
-</style>
-
+<!doctype html>
+<html lang="en" ng-app="appservices">
+<head>
+  <meta charset="utf-8">
+  <title>Apigee App Services</title>
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <meta name="description" content="">
+  <meta name="author" content="">
+
+  <link href="js/libs/bootstrap/custom/css/bootstrap.css" rel="stylesheet">
+  <link href="css/dash.min.css" rel="stylesheet">
+  <link id="perf-script" href="bower_components/apigee.performance.ui/dist/css/performance.min.css" rel="stylesheet">
+
+  <!--styles for jquery ui calendar component-->
+  <link rel="stylesheet" type="text/css" href="js/libs/jqueryui/jquery-ui-1.8.9.custom.css">
+  <link rel="stylesheet" type="text/css" href="js/libs/jqueryui/jquery-ui-timepicker.css">
 </head>
-<body>
-
-<div id="alert-error-message-container" class="alert alert-error" style="width:96.5%; z-index: 99; position: fixed; top: 84px;display: none;">
-  <a href="#" class="close" data-dismiss="alert">&times;</a>
-  <strong id="alert-error-header"></strong>
-  <span id="alert-error-message"></span>
-</div>
-
-<div id="header">
-  <div class="column-in">
-    <div data-dropdown="dropdown" class="main-nav navbar navbar-fixed-top">
-      <div class="header-menus">
-        <div id="publicMenu" class="navbar-inner">
-          <div class="left-header">
-            <h1 class="apigee"><a href="https://apigee.com" target="_blank"><img src="images/logo-white.png">apigee</a></h1>
-            <h2 id="ActualPage1">Admin Portal</h2>
-          </div>
-          <div class="right-header">
-            <ul id="loginMenu" class="nav secondary-nav">
-              <li><a id="login-link" ><i class="icon-user"></i> Login</a></li>
-              <li><a id="signup-link" > Sign Up</a></li>
-              <li><a id="forgot-password-link" ><i class="icon-lock"></i> Forgot Password</a></li>
-            </ul>
-          </div>
-        </div>
-        <div class="navbar-inner privateMenu">
-          <div class="left-header">
-            <h1 class="apigee"><a href="https://apigee.com" target="_blank"><img class="logo" src="images/logo-white.png">apigee</a></h1>
-            <ul class="nav">
-              <li class="portal-name" ><a class="go-home">App Services</a></li>
-              <li><a href="http://mobileanalytics.apigee.com/pages/signin.seam " target="_blank"> Mobile Analytics</a></li>
-            </ul>
-          </div>
-          <div class="right-header">
-            <ul id="profileMenu" class="nav secondary-nav">
-              <li ><a href="#">Dashboard</a></li>
-              <li class="dropdown">
-                <a id="account-link1" class="dropdown-toggle" data-toggle="dropdown" ><span id="userEmail">test</span> <span class="caret"></span></a>
-                <ul class="dropdown-menu">
-                  <li><a id="account-link" ><i class="icon-user"></i> Profile</a></li>
-                  <li><a id="logout-link" ><i class="icon-off"></i> Sign Out</a></li>
-                </ul>
-              </li>
-            </ul>
-          </div>
-        </div>
-        <div id="api-activity" class="alert">Loading...</div>
-      </div>
-    </div>
-    <div class="sub-nav navbar navbar-fixed privateMenu" style="display: none">
-        <div class="left-header nav pull-left">
-            <li id="organizations-menu" class="dropdown">
-                <a id="console-links" class="dropdown-toggle" data-toggle="dropdown">
-                    <i class="icon-folder-close icon-white"></i>
-                    <span>Organizations</span>
-                    <span class="caret"></span>
-                </a>
-                <ul class="dropdown-menu">
-                    <li><a >loading...</a></li>
-                </ul>
-            </li>
-            <li class="dropdown">
-                <a class="dropdown-toggle" data-toggle="dropdown">
-                   <i class="icon-cog icon-white"></i>
-                    <span id="nav-app-name">App Name</span>
-                    <span class="caret"></span>
-                </a>
-                <ul class="dropdown-menu applications-menu" >
-                    <li><a >loading apps...</a></li>
-                </ul>
-            </li>
+<body ng-controller="PageCtrl">
+<!-- Google Tag Manager -->
+<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-N52333" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
+<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
+    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
+    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
+    '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
+})(window,document,'script','dataLayer','GTM-N52333');</script>
+<!-- End Google Tag Manager -->
+<header>
+  <nav class="navbar navbar-static-top">
+    <div class="container-fluid">
+      <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+        <span class="icon-bar"></span>
+        <span class="icon-bar"></span>
+        <span class="icon-bar"></span>
+      </button>
+      <a class="brand" href="#"><img src="img/logo.gif"></a>
+
+      <div appswitcher=""></div>
+
+
+      <div class="nav-collapse collapse" ng-show="loaded">
+
+        <div class="navbar-text pull-right" ng-if="activeUI">
+          <span class="navbar-text" id="userEmail">{{userEmail || 'anonymous'}}</span> |
+          <span ng-controller="LoginCtrl"><a id="logout-link" ng-click="logout()" title="logout"><i class="pictogram">&#59201</i></a></span>
+          <span><a ng-click="profile()" title="profile"><i class="pictogram">&#59170</i></a></span> |
+          <span><a href="archive/" target="_blank">Legacy Portal</a></span>
         </div>
-        <div class="right-header pull-right">
-            <ul class="nav">
-                <li id="switchTo-menu" class="dropdown">
-                    <a id="switchTo-link" class="dropdown-toggle" data-toggle="dropdown" ><span>Switch to...
-                </span> <span class="caret"></span></a>
-                    <ul class="dropdown-menu">
-                        <li><a href="http://mobileanalytics.apigee.com/pages/signin.seam " target="_blank"> Mobile Analytics</a></li>
-                        <li><a href="http://apigee.com/console/others" target="_blank"> API Consoles</a></li>
-                    </ul>
-                </li>
-                <li><a href="http://support.apigee.com/apigee" target="_blank"> Support</a></li>
-                <li><a href="http://apigee.com/docs/app_services" target="_blank"> Docs</a></li>
-                <li><a href="http://apigee.com/docs/usergrid/codesamples" target="_blank">Examples & SDKs</a></li>
-                <li><a href="https://groups.google.com/forum/?fromgroups#!forum/usergrid" target="_blank"> Google Group</a></li>
-                <li><a href="http://apigee.com/about/products/usergrid" target="_blank"> About</a></li>
-            </ul>
-        </div>
-    </div>
-  </div>
-</div>
-
-<div id="pages">
-
-  <div id="message-page" class="container-fluid">
-    <div id="message-area" class="alert alert-info curl-data" style="padding: 20px;">
-      Whoops! We encounterd an error connecting to the API.  Press refresh to try loading the Admin Portal again.
-      <button id="reload-button" class="btn btn-primary" style="float: right; margin: -4px 30px;" onClick="window.location.reload()">Refresh</button>
-    </div>
-  </div>
-  <div id="login-page" class="container-fluid">
-    <div class="row">
-      <div id="login-area" class="span6 offset1">
-        <div id="login-message" class="alert alert-error">
-          <strong>ERROR</strong>: Your details were incorrect.<br/>
-        </div>
-        <div class="console-section">
-          <div class="well thingy"><span style="margin-left: 30px" class="title">Login</span></div>
-          <form name="login-form" id="login-form" class="form-horizontal">
-            <div class="control-group">
-              <label class="control-label" for="login-email">Email:</label>
-              <div class="controls">
-                <input type="text" name="login-email" id="login-email" class="" value="" size="20"/>
-              </div>
-
-            </div>
-            <div class="control-group">
-              <label class="control-label" for="login-password">Password:</label>
-              <div class="controls">
-                <input type="password" name="login-password" id="login-password" class="" value="" size="20"/>
 
-              </div>
-            </div>
-            <div class="control-group">
-              <div class="controls">
-                <input type="checkbox" value="true" id="remember" name="remember"/>
-                <span>Remember me</span>
-              </div>
-            </div>
-            <div class="form-actions">
-              <div class="submit">
-                <input type="submit" name="button-login" id="button-login" value="Log In" class="btn btn-usergrid"/>
-              </div>
-            </div>
-          </form>
-        </div>
       </div>
     </div>
-  </div>
-  <div id="post-signup-page" class="container-fluid">
-    <div class="row">
-      <div id="login-area" class="span6 offset1">
-        <div class="console-section well thingy">
-          <span class="title">We're holding a seat for you!</span>
-          <br /><br />
-          <p>Thanks for signing up for a spot on our private beta. We will send you an email as soon as we're ready for you!</p>
-          <p>In the mean time, you can stay up to date with App Services on our <a href="https://groups.google.com/forum/?fromgroups#!forum/usergrid">Google Group</a>.</p>
-        </div>
-      </div>
-    </div>
-  </div>
-  <div id="signup-page" class="container-fluid">
-    <div class="row">
-      <div id="signup-area" class="span6 offset1">
-        <div id="signup-message" class="alert alert-error"></div>
-        <div class="console-section">
-          <div class="well thingy"><span class="title">Register</span> </div>
-          <form name="signup-form" id="signup-form" onsubmit="return false;" class="form-horizontal">
-            <div class="control-group">
-              <label class="control-label" for="signup-organization-name">Organization Account</label>
-              <div class="controls">
-                <input type="text" name="signup-organization-name" id="signup-organization-name" class="" value="" size="20"/>
-              </div>
-            </div>
-            <div class="control-group">
-              <label class="control-label" for="signup-username">Username</label>
-              <div class="controls">
-                <input type="text" name="signup-username" id="signup-username" class="" value="" size="20"/>
-              </div>
-            </div>
-            <div class="control-group">
-              <label class="control-label" for="signup-name">Name </label>
-              <div class="controls">
-                <input type="text" name="signup-name" id="signup-name" class="" value="" size="20"/>
-              </div>
-            </div>
-            <div class="control-group">
-              <label class="control-label" for="signup-email">Email </label>
-              <div class="controls">
-                <input type="text" name="signup-email" id="signup-email" class="" value="" size="20"/>
-              </div>
-            </div>
-            <div class="control-group">
-              <label class="control-label" for="signup-password">Password </label>
-              <div class="controls">
-                <input type="password" name="signup-password" id="signup-password" class="" value="" size="20"/>
-              </div>
-            </div>
-            <div class="control-group">
-              <label class="control-label" for="signup-password-confirm">Confirm </label>
-              <div class="controls">
-                <input type="password" name="signup-password-confirm" id="signup-password-confirm" class="" value="" size="20"/>
-              </div>
-            </div>
-            <div class="form-actions">
-              <div class="submit">
-                <input type="button" name="button-signup" id="button-signup" value="Sign up" class="btn btn-usergrid"/>
-              </div>
-            </div>
-          </form>
-        </div>
-      </div>
-    </div>
-  </div>
-  <div id="forgot-password-page" class="container">
-    <iframe class="container"></iframe>
-  </div>
-
-  <div id="console-page" class="">
-    <div id="main1">
-      <div id="main2">
-
+  </nav>
+</header>
+<section class="side-menu" ng-show="activeUI">
+  <div class="sidebar-nav">
+    <div class="nav-collapse collapse">
 
-        <div id="left" style="">
-          <div class="column-in">
+      <org-menu context="orgmenu"></org-menu>
 
-
-            <div id="sidebar-menu" style="padding-top: 10px;">
-              <ul id="application-panel-buttons" class="nav nav-list" style="margin: 0 0 5px -2px;">
-                <h4 class="panel-title">Organization</h4>
-                <div class="panel-desc">View your org's apps, activities, administrators and more.</div>
-                <hr  class="col-divider">
-                <li id="application-panel-button-dashboard"><a href="#"><i class="icon-th"></i> Org Overview</a></li>
-                <br/>
-                <h4 class="panel-title">Application</h4>
-                <p class="panel-desc">View your app's data, scripts, analytics and more.</p>
-                <hr  class="col-divider">
-
-                <li id="application-panel-button-dashboard"><a href="#dashboard" id="dashboard-link"><i class="icon-th"></i> App Overview</a></li>
-
-                <li><a href="#users" id="users-link"><i class="icon-user"></i> <span class="nav-menu-text">App End-Users</span></a></li>
-                <li><a href="#collections" id="collections-link"><i class="icon-book"></i> <span class="nav-menu-text">App Data</span></a></li>
-                <li><a href="#activities" id="activities-link"><i class="icon-calendar"></i> <span class="nav-menu-text">Activities</span></a></li>
-                <li><a href="#analytics" id="analytics-link"><i class="icon-signal"></i> <span class="nav-menu-text">Analytics</span></a></li>
-                <li><a href="#properties" id="properties-link"><i class="wrench "></i> <span class="nav-menu-text">App Settings</span></a></li>
-                <li><a href="#shell" id="shell-link"><i class="icon-warning-sign"></i> <span class="nav-menu-text">Shell</span></a></li>
-              </ul>
-            </div>
+    </div>
+    <div class="nav-collapse collapse">
+      <ul class="nav nav-list" menu="sideMenu">
+        <li class="option active">
+          <a href="#!/org-overview"><i class="pictogram">&#128193</i>Org Overview</a>
+        </li>
+        <li class="option active">
+          <a href="#!/getting-started/setup"><i class="pictogram">&#128640;</i>Getting Started</a>
+        </li>
+
+        <li class="option">
+          <a href="#!/app-overview/summary"><i class="pictogram">&#59214;</i>App Overview</a>
+          <ul class="nav nav-list">
+            <li>
+              <a href="#!/app-overview/summary"><i class="pictogram sub">&#128241;</i> Summary</a>
+            </li>
+          </ul>
+        </li>
 
 
-          </div>
-        </div>
+        <li class="option">
+          <a href="#!/users"><i class="pictogram">&#128100;</i>Users</a>
+          <ul class="nav nav-list">
+            <li>
+              <a href="#!/users"><i class="pictogram sub">&#128100;</i>Users</a>
+            </li>
+            <li>
+              <a href="#!/groups"><i class="pictogram sub">&#128101;</i>Groups</a>
+            </li>
+            <li>
+              <a href="#!/roles"><i class="pictogram sub">&#59170;</i>Roles</a>
+            </li>
+          </ul>
+        </li>
+
+        <li class="option" id="perf-script">
+          <a href="#!/performance/app-usage?timeFilter={{selectedtimefilter.value}}&amp;sessionChartFilter={{selectedChartCriteria.chartCriteriaId}}&amp;currentCompare={{currentCompare}}"><i class="pictogram">&#128711;</i>Monitoring <div class="new-tag">new</div></a>
+          <ul class="nav nav-list">
+            <li><a href="#!/performance/app-usage?timeFilter={{selectedtimefilter.value}}&amp;sessionChartFilter={{selectedChartCriteria.chartCriteriaId}}&amp;currentCompare={{currentCompare}}"><i class="pictogram sub">&#128202;</i>App Usage</a></li>
+            <li><a href="#!/performance/errors-crashes?timeFilter={{selectedtimefilter.value}}&amp;logChartFilter={{selectedChartCriteria.chartCriteriaId}}&amp;currentCompare={{currentCompare}}"><i class="pictogram sub">&#9889;</i>Errors &amp;
+              Crashes</a></li>
+            <li><a href="#!/performance/api-perf?timeFilter={{selectedtimefilter.value}}&amp;networkChartFilter={{selectedChartCriteria.chartCriteriaId}}&amp;currentCompare={{currentCompare}}"><i class="pictogram sub">&#128200;</i>API Performance</a>
+            </li>
+          </ul>
+        </li>
 
-        <div id="left2" style="display: none;">
-          <div id="left2-content" class="column-in">
 
-            <div id="sidebar-menu2" style="padding-top: 10px; display: none;">
-              <h4 class="panel-title">End-Users</h4>
-              <p class="panel-desc">Data related to your application end-users.</p>
-              <hr style="margin: 0 0 0 1px;">
-              <ul id="app-end-users-buttons" class="nav nav-list" style="margin-bottom: 5px;">
-                <li><a href="#users" id="users-sublink"><span class="nav-menu-text">/users</span></a></li>
-                <li><a href="#groups" id="groups-sublink"><span class="nav-menu-text">/groups</span></a></li>
-                <li><a href="#roles" id="roles-sublink"> <span class="nav-menu-text">/roles</span></a></li>
-              </ul>
-            </div>
+        <li class="option">
+          <a href="#!/push/sendNotification"><i class="pictogram">&#59200;</i>Push</a>
+          <ul class="nav nav-list">
+            <li>
+              <a href="#!/push/sendNotification"><i class="pictogram sub">&#128319;</i>Send
+                Notification</a>
+            </li>
+            <li>
+              <a href="#!/push/history"><i class="pictogram sub">&#9991;</i>Message History</a>
+            </li>
+            <li>
+              <a href="#!/push/configuration"><i class="pictogram sub">&#9874;</i>Configuration</a>
+            </li>
+            <li>
+              <a href="#!/push/getStarted"><i class="pictogram sub">&#59176;</i>Getting Started</a>
+            </li>
+          </ul>
+        </li>
 
-            <div id="left-collections-menu" style="display: none;">
-              <h4 class="panel-title">Data Collections</h4>
-                <p class="panel-desc">Explore your application's data collections.</p>
-                <hr class="col-divider">
-                <div style="padding:10px 0 10px 10px;">
-                  <a id="data-explorer-link"><i class="icon-user"></i> <span class="nav-menu-text">Data Explorer</span></a>
-                </div>
-                <hr class="col-divider">
 
-                <div id="collections-menu" style="padding: 10px">
-                 <a class="btn" data-toggle="modal" href="#dialog-form-new-collection">Add Collection</a>
-                </div>
-                <hr class="col-divider">
-                <div id="left-collections-content">
+        <li class="option">
+          <a href="#!/data"><i class="pictogram">&#128248;</i>Data</a>
+          <ul class="nav nav-list">
+            <li>
+              <a href="#!/data"><i class="pictogram sub">&#128254;</i>Collections</a>
+            </li>
+            <!--li>
+              <a href="#!/data/shell"><i class="pictogram sub">&#128254;</i>Shell</a>
+            </li-->
+          </ul>
+        </li>
+
+        <li class="option">
+          <a href="#!/activities"><i class="pictogram ">&#59194;</i> Activities</a>
+        </li>
+
+
+        <li class="option" id="perf-script">
+          <a href="#!/configure/default-configs"><i class="pictogram">&#9874;</i>Configure</a>
+          <ul class="nav nav-list">
+            <li><a href="#!/configure/default-configs"><i class="pictogram sub">&#128214;</i>Default
+              Configs</a></li>
+            <li><a href="#!/configure/beta-configs"><i class="pictogram sub">&#59190;</i>Beta Testing Configs</a>
+            </li>
+            <li><a href="#!/configure/ab-configs"><i class="pictogram sub">&#59146;</i>A/B Testing
+              Configs</a></li>
+          </ul>
+        </li>
+        <li class="option">
+          <a href="#!/shell"><i class="pictogram">&#9000;</i>Shell</a>
+        </li>
+
+      </ul>
+    </div>
+  </div>
+</section>
+
+<section class="main-content" ng-show="loaded">
+  <div class="container-fluid">
+    <div class="row-fluid">
+      <div class="span12">
+
+        <!--header app/org context nav-->
+
+        <nav class="navbar secondary" ng-show="activeUI">
+          <div class="container-fluid">
+            <div class="row-fluid">
+              <div class="span12">
+                <div class="span5">
+                  <app-menu></app-menu>
+                </div>
+                <div class="span7 button-area">
+                  <div class="nav-collapse collapse">
+                    <ul class="helper-links nav span12">
+                      <li class="sdks span12">
+                        <ul class="pull-right">
+                          <li class="title"><label>SDKs and Modules</label></li>
+                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#ios"><i class="sdk-icon-ios"></i></a></li>
+                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#android"><i class="sdk-icon-android"></i></a></li>
+                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#javascript"><i class="sdk-icon-js"></i></a></li>
+                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#nodejs"><i class="sdk-icon-node"></i></a></li>
+                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#ruby"><i class="sdk-icon-ruby"></i></a></li>
+                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#c"><i class="sdk-icon-net"></i></a></li>
+                        </ul>
+                      </li>
+                    </ul>
+                  </div>
                 </div>
-            </div>
-
-          </div>
-        </div>
-
-
-        <div id="right">
-          <div class="column-in">
-            <div style="padding-top: 10px;">
-              <h4 class="panel-title">Quick Start Guide</h4>
-              <div class="panel-desc">Need help getting started? Follow our Quick Start Guide</div>
-              <hr class="col-divider">
-
-              <div class="panel-desc" style="height: 50px; text-align:center; width:100px;margin: 20px auto;">
-              <a href="http://apigee.com/docs/usergrid/content/quick-start" target="_blank">App Services: Quick Start Guide</a>
-              </div>
-
-              <h4 class="panel-title">SDKs & Modules</h4>
-              <div class="panel-desc">Download an SDK or module to get up-and-running quickly</div>
-              <hr class="col-divider">
-
-              <div class="sdk-download">
-                <img src="images/ios-sdk-download.png">
-                <br>
-                <a href="https://github.com/apigee/usergrid-ios-sdk/archive/master.zip" target="_blank">iOS SDK: Download</a>
-              </div>
-
-              <div class="sdk-download">
-                <img src="images/android-sdk-download.png">
-                <br>
-                <a href="https://github.com/apigee/usergrid-java-sdk/archive/master.zip" target="_blank">Android SDK: Download</a>
-              </div>
-
-              <div class="sdk-download">
-                <img src="images/javascript-sdk-download.png">
-                <br>
-                <a href="https://github.com/apigee/usergrid-javascript-sdk/archive/master.zip">Javascript SDK: Download</a>
-              </div>
-
-              <div class="sdk-download">
-                <img src="images/nodejs-sdk-download.png">
-                <br>
-                <a href="http://npmjs.org/usergrid" target="_blank">Node.js Module</a>
-              </div>
-
-              <div class="sdk-download">
-                <img src="images/ruby-sdk-download.png">
-                <br>
-                <a href="https://github.com/scottganyo/usergrid_iron" target="_blank">Ruby SDK: Download</a>
-              </div>
-
-              <div class="sdk-download">
-                <img src="images/dotnet-sdk-download.png">
-                <br>
-                <a href="https://github.com/apigee/Apigee.Net" target="_blank">C# SDK: Download</a>
               </div>
             </div>
           </div>
+        </nav>
+        <!--for demo mode-->
+        <!--todo - this needs a style applied only when shown ng-class-->
+        <div ng-controller="AlertCtrl" ng-cloak="" class="alert-holder main-alert">
+          <alerti ng-repeat="alert in alerts" type="alert.type" closeable="true" index="$index" ng-cloak="">{{alert.msg}}</alerti>
         </div>
 
-        <div id="middle">
-          <div class="column-in" style="border-right: 1px solid #cacaca; border-left: 1px solid #cacaca; padding-top: 10px;">
-
-
-            <div id="console-panels" class="container-fluid">
-              <div id="organization-panel" style="display: none">
-                <div id="console-panel-nav-bar"></div>
-                <div id="home-messages" class="alert" style="display: none;"></div>
-                <div class="console-section">
-                  <div class="well thingy"><span class="title"> Current Organization </span></div>
-                  <table id="organizations-table" class="hideable table">
-                    <tbody></tbody>
-                  </table>
-                </div>
-                <div class="console-section">
-                  <div class="well thingy"><span class="title"> Applications </span>
-                    <div class="bar">
-                      <a class="btn button bottom-space" data-toggle="modal" href="#dialog-form-new-application"> New Application</a>
-                    </div>
-                  </div>
-                  <table id="organization-applications-table" class="hideable table">
-                    <tbody></tbody>
-                  </table>
-                </div>
-                <div class="console-section">
-                  <div class="well thingy">
-                    <span class="title"> Activities </span>
-                  </div>
-                  <table id="organization-feed-table" class="hideable table">
-                    <tbody></tbody>
-                  </table>
-                </div>
-                <div class="console-section">
-                  <div class="well thingy"><span class="title"> Organization's Administrators </span>
-                    <div class="bar">
-                      <a class="btn button bottom-space" data-toggle="modal" href="#dialog-form-new-admin"> New Administrator</a>
-                    </div>
-                  </div>
-                  <table id="organization-admins-table" class="hideable table">
-                    <tbody></tbody>
-                  </table>
-                </div>
-                <div class="console-section">
-                  <div class="well thingy"><span class="title"> Organization API Credentials </span>
-                    <div class="bar">
-                      <a class="btn button bottom-space" onclick="Usergrid.console.newOrganizationCredentials(); return false;"> Regenerate Credentials</a>
-                    </div>
-                  </div>
-                  <table class="hideable table">
-                    <tbody>
-                      <tr>
-                        <td>
-                          <span class="span2">Client ID</span>
-                        </td>
-                        <td>
-                          <span id="organization-panel-key">...</span>
-                        </td>
-                      </tr>
-                      <tr>
-                        <td>
-                          <span class="span2">Client Secret</span>
-                        </td>
-                        <td>
-                          <span id="organization-panel-secret">...</span>
-                        </td>
-                      </tr>
-                    </tbody>
-                  </table>
-                </div>
-                <form id="dialog-form-force-new-application" class="modal hide fade" action="#">
-                  <div class="modal-header">
-                    <h4>No applications for this organization</h4>
-                  </div>
-                  <div class="modal-body">
-                    <p class="validateTips">All organizations require at least one application. Please create one.</p>
-                    <fieldset>
-                      <div class="control-group">
-                        <label for="new-application-name">Name</label>
-                        <div class="controls">
-                          <input type="text" name="name" id="" value="" class="input-xlarge new-application-name"/>
-                          <p class="help-block">Length of name must be between 4 and 80</p>
-                        </div>
-                      </div>
-                    </fieldset>
-                  </div>
-                  <div class="modal-footer">
-                    <input type="submit" class="btn btn-usergrid" value="Create"/>
-                    <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
-                  </div>
-                </form>
-                <form id="dialog-form-new-admin" class="modal hide fade">
-                  <div class="modal-header">
-                    <a class="close" data-dismiss="modal">&times</a>
-                    <h4>Create new administrator</h4>
-                  </div>
-                  <div class="modal-body">
-                    <fieldset>
-                      <div class="control-group">
-                        <label for="new-admin-email">Email</label>
-                        <div class="controls">
-                          <input type="text" name="email" id="new-admin-email" value="" class="input-xlarge"/>
-                          <input type="hidden" name="password" id="new-admin-password" value=""/>
-                          <input type="hidden" name="" id="new-admin-password-confirm" value=""/>
-                          <p class="help-block hide"></p>
-                        </div>
-                      </div>
-                    </fieldset>
-                  </div>
-                  <div class="modal-footer">
-                    <input type="submit" class="btn btn-usergrid" value="Create"/>
-                    <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
-                  </div>
-                </form>
-              </div>
-
-              <div id="dashboard-panel" style="display: none">
-                <div class="console-section">
-                  <div class="well thingy">
-                    <span class="title"> Application Dashboard: <span class="app_title"></span> </span>
-                  </div>
-                  <div class="console-section-contents">
-                    <div id="application-panel-table" style="overflow: hidden;">
-                      <div id="application-panel-entity-graph" class="span graph"></div>
-                      <div id="application-panel-text" class="span">...</div>
-                    </div>
-
-                    <div style="max-width: 680px; overflow: hidden;">
-                    <div>
-                      <div id="application-entities-timeline" class="span graph"></div>
-                      <div id="application-cpu-time" class="span graph"></div>
-                    </div>
-                    <div>
-                      <div id="application-data-uploaded" class="span graph"></div>
-                      <div id="application-data-downloaded" class="span graph"></div>
-                    </div>
-                    </div>
-                  </div>
-                </div>
-              </div>
-              <div id="account-panel" class="container-fluid hide">
-                <div id="account-update-modal" class="modal hide fade">
-                  <div class="modal-header">
-                    <a class="close" data-dismiss="modal">&times</a>
-                    <h4>Account Settings</h4>
-                  </div>
-                  <div class="modal-body">
-                    <p>Account settings updated.</p>
-                  </div>
-                  <div class="modal-footer">
-                    <button class="btn btn-usergrid" data-dismiss="modal">OK</button>
-                  </div>
-                </div>
-                <div class="span offset1">
-                  <h2>Account Settings </h2>
-                  <div id="account-panels">
-                    <div class="panel-content">
-                      <div class="console-section">
-                        <div class="well thingy"><span class="title"> Personal Account </span> </div>
-                        <div class="console-section-contents">
-                          <form name="update-account-form" id="update-account-form" class="form-horizontal">
-                            <fieldset>
-                              <div class="control-group">
-                                <label id="update-account-id-label" class="control-label" for="update-account-id">UUID</label>
-                                <div class="controls">
-                                  <span id="update-account-id" class="monospace"></span>
-                                </div>
-                              </div>
-                              <div class="control-group">
-                                <label class="control-label" for="update-account-username">Username </label>
-                                <div class="controls">
-                                  <input type="text" name="update-account-username" id="update-account-username" class="span4" value="" size="20"/>
-                                </div>
-                              </div>
-                              <div class="control-group">
-                                <label class="control-label" for="update-account-name">Name </label>
-                                <div class="controls">
-                                  <input type="text" name="update-account-name" id="update-account-name" class="span4" value="" size="20"/>
-                                </div>
-                              </div>
-                              <div class="control-group">
-                                <label class="control-label" for="update-account-email"> Email</label>
-                                <div class="controls">
-                                  <input type="text" name="update-account-email" id="update-account-email" class="span4" value="" size="20"/>
-                                </div>
-                              </div>
-                              <div class="control-group">
-                                <label class="control-label" for="update-account-picture-img">Picture <br />(from <a href="http://gravatar.com">gravatar.com</a>) </label>
-                                <div class="controls">
-                                  <img id="update-account-picture-img" src="" class="" width="50" />
-                                </div>
-                              </div>
-                              <span class="help-block">Leave blank any of the following to keep the current password unchanged</span>
-                              <br />
-                              <div class="control-group">
-                                <label class="control-label" for="old-account-password">Old Password</label>
-                                <div class="controls">
-                                  <input type="password" name="old-account-password" id="old-account-password" class="span4" value="" size="20"/>
-                                </div>
-                              </div>
-                              <div class="control-group">
-                                <label class="control-label" for="update-account-password">New Password</label>
-                                <div class="controls">
-                                  <input type="password" name="update-account-password" id="update-account-password" class="span4" value="" size="20"/>
-                                </div>
-                              </div>
-                              <div class="control-group">
-                                <label class="control-label" for="update-account-password-repeat">Confirm New Password</label>
-                                <div class="controls">
-                                  <input type="password" name="update-account-password-repeat" id="update-account-password-repeat" class="span4" value="" size="20"/>
-                                </div>
-                              </div>
-                            </fieldset>
-                            <div class="form-actions">
-                              <input type="button" name="button-update-account" id="button-update-account" value="Update" class="btn btn-usergrid span"/>
-                            </div>
-                          </form>
-                        </div>
-                      </div>
-                    </div>
-                  </div>
-                  <div class="panel-content">
-                    <div class="console-section">
-                      <div class="well thingy"><span class="title"> Organizations </span>
-                        <div class="bar">
-                          <a class="" data-toggle="modal" href="#dialog-form-new-organization"> Add </a>
-                        </div>
-                      </div>
-                      <table class="table" id="organizations">
-                      </table>
-                    </div>
-                  </div>
-                  <form id="dialog-form-new-organization" class="modal hide fade">
-                    <div class="modal-header">
-                      <a class="close" data-dismiss="modal">&times</a>
-                      <h4>Create new organization</h4>
-                    </div>
-                    <div class="modal-body">
-                      <p class="validateTips">All form fields are required.</p>
-                      <fieldset>
-                        <div class="control-group">
-                          <label for="new-organization-name">Name</label>
-                          <div class="controls">
-                            <input type="text" name="organization" id="new-organization-name" class="input-xlarge"/>
-                            <p class="help-block hide"></p>
-                          </div>
-                        </div>
-                      </fieldset>
-                    </div>
-                    <div class="modal-footer">
-                      <input type="submit" class="btn btn-usergrid" value="Create"/>
-                      <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
-                    </div>
-                  </form>
-                </div>
-              </div>
-              <div id="users-panel" class="panel-buffer">
-
-                  <div id="users-panel-list" class="panel-content">
-                    <div id="users-messages" class="alert" style="display: none;"></div>
-
-                    <div class="console-section">
-                       <span class="title"> Collection: /users </span>
-                      <div class="well thingy">
-                        <div class="bar">
-                          <input onkeyup="Usergrid.console.searchUsers();" type="text" name="search-user-username" id="search-user-username" class="input-small search" placeholder="Search"/>
-                          <select id="search-user-type" onChange="Usergrid.console.searchUsers();" class="input-medium search">
-                            <option value="username">Username</option>
-                            <option value="name">Full Name</option>
-                          </select>
-
-                          <a class="btn " data-toggle="modal" id="delete-users-link" > Delete</a>
-                          <a style="margin-right: 15px;" class="btn btn-primary" data-toggle="modal" href="#dialog-form-new-user"> Create new user</a>
-
-
-
-                        </div>
-                      </div>
-                      <table id="users-table" class="table">
-                        <tbody></tbody>
-                      </table>
-                      <ul id="users-pagination" class="pager">
-                        <li id="users-previous" class="previous"><a >&larr; Previous</a></li>
-                        <li id="users-next" class="next"><a >Next &rarr;</a></li>
-                      </ul>
-                    </div>
-                    <div id="users-curl-container" class="row-fluid curl-container ">
-                    </div>
-                  </div>
-                  <form id="dialog-form-new-user" class="modal hide fade">
-                    <div class="modal-header">
-                      <a class="close" data-dismiss="modal">&times</a>
-                      <h4>Create new user</h4>
-                    </div>
-                    <div class="modal-body">
-                      <p class="validateTips">Username is required.</p>
-                      <fieldset>
-                        <div class="control-group">
-                          <label for="new-user-username">Username</label>
-                          <div class="controls">
-                            <input type="text" name="username" id="new-user-username" class="input-xlarge"/>
-                            <p class="help-block hide"></p>
-                          </div>
-                        </div>
-                        <div class="control-group">
-                          <label for="new-user-fullname">Full name</label>
-                          <div class="controls">
-                            <input type="text" name="name" id="new-user-fullname" class="input-xlarge"/>
-                            <p class="help-block hide"></p>
-                          </div>
-                        </div>
-                        <div class="control-group">
-                          <label for="new-user-email">Email</label>
-                          <div class="controls">
-                            <input type="text" name="email" id="new-user-email" class="input-xlarge"/>
-                            <p class="help-block hide"></p>
-                          </div>
-                        </div>
-                        <div class="control-group">
-                          <label for="new-user-password">Password</label>
-                          <div class="controls">
-                            <input type="password" name="password" id="new-user-password" class="input-xlarge"/>
-                            <p class="help-block hide"></p>
-                          </div>
-                        </div>
-                        <div class="control-group">
-                          <label for="new-user-validate-password">Confirm password</label>
-                          <div class="controls">
-                            <input type="password" name="validate-password" id="new-user-validate-password" class="input-xlarge"/>
-                            <p class="help-block hide"></p>
-                          </div>
-                        </div>
-                      </fieldset>
-                    </div>
-                    <div class="modal-footer">
-                      <input type="submit" class="btn btn-usergrid" value="Create"/>
-                      <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
-                    </div>
-                  </form>
-                </div>
-
-              <form id="confirmAction" class="modal hide fade">
-                <div class="modal-header">
-                  <a class="close" data-dismiss="modal">&times</a>
-                  <h4></h4>
-                </div>
-                <div class="modal-body">
-                  <p></p>
-                </div>
-                <div class="modal-footer">
-                  <input type="submit" class="btn btn-danger" value="Yes, continue"/>
-                  <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
-                </div>
-              </form>
-              <form id="confirmDialog" class="modal hide fade">
-                <div class="modal-header">
-                  <a class="close" data-dismiss="modal">&times</a>
-                  <h4>Are you sure?</h4>
-                </div>
-                <div class="modal-body">
-                  <p></p>
-                </div>
-                <div class="modal-footer">
-                  <input type="submit" class="btn btn-danger" value="Yes, delete"/>
-                  <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
-                </div>
-              </form>
-              <form id="alertModal" class="modal hide fade">
-                <div class="modal-header">
-                  <a class="close" data-dismiss="modal">&times</a>
-                  <h4></h4>
-                </div>
-                <div class="modal-body">
-                  <p></p>
-                </div>
-                <div class="modal-footer">
-                  <input type="reset" class="btn btn-usergrid" value="OK" data-dismiss="modal"/>
-                </div>
-              </form>
-
-               <form id="dialog-form-new-application" class="modal hide fade" action="#">
-                <div class="modal-header">
-                  <a class="close" data-dismiss="modal">&times</a>
-                  <h4>Create new application</h4>
-                </div>
-                <div class="modal-body">
-                  <p class="validateTips">All form fields are required.</p>
-                  <fieldset>
-                    <div class="control-group">
-                      <label for="new-application-name">Name</label>
-                      <div class="controls">
-                        <input type="text" name="name" id="" value="" class="input-xlarge new-application-name"/>
-                        <p class="help-block">Length of name must be between 4 and 80</p>
-                      </div>
-                    </div>
-                  </fieldset>
-                </div>
-                <div class="modal-footer">
-                  <input type="submit" class="btn btn-usergrid" value="Create"/>
-                  <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
-                </div>
-              </form>
-
-              <div id="user-panel" class="panel-buffer">
-                <div id="user-panel-tab-bar">
-                  <a class="tab-button btn" id="button-user-list" >List</a>
-                  <a class="tab-button btn active" id="button-user-profile" >Profile</a>
-                  <a class="tab-button btn" id="button-user-memberships" >Groups</a>
-                  <a class="tab-button btn" id="button-user-activities" >Activities</a>
-                  <a class="tab-button btn" id="button-user-graph" >Graph</a>
-                  <a class="tab-button btn" id="button-user-permissions" >Roles & Permissions</a>
-                </div>
-                <div id="user-panel-profile" class="panel-content"></div>
-                <div id="user-panel-memberships" class="panel-content" style="display: none;"></div>
-                <div id="user-panel-activities" class="panel-content" style="display: none;"></div>
-                <div id="user-panel-graph" class="panel-content" style="display: none;"></div>
-                <div id="user-panel-permissions" class="panel-content" style="display: none;"></div>
-                <form id="dialog-form-add-user-to-role" class="modal hide fade">
-                  <div class="modal-header">
-                    <a class="close" data-dismiss="modal">&times</a>
-                    <h4>Add this user to a Role</h4>
-                  </div>
-                  <div class="modal-body">
-                    <p class="validateTips">Search for the role you want to add to this user.</p>
-                    <fieldset>
-                      <div class="control-group">
-                        <label for="search-role-name-input">Role</label>
-                        <div class="controls">
-                          <input type="text" name="search-role-name-input" id="search-role-name-input" class="input-xlarge"/>
-                          <p class="help-block hide"></p>
-                        </div>
-                      </div>
-                    </fieldset>
-                  </div>
-                  <div class="modal-footer">
-                    <input type="submit" class="btn btn-usergrid" value="Add"/>
-                    <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
-                  </div>
-                </form>
-                <form id="dialog-form-add-group-to-user" class="modal hide fade">
-                  <div class="modal-header">
-                    <a class="close" data-dismiss="modal">&times</a>
-                    <h4>Add this user to a Group</h4>
-                  </div>
-                  <div class="modal-body">
-                    <p class="validateTips">Search for the group you want to add this user to.</p>
-                    <fieldset>
-                      <div class="control-group">
-                        <label for="search-group-name-input">Group</label>
-                        <div class="controls">
-                          <input type="text" name="search-group-name-input" id="search-group-name-input" class="input-xlarge"/>
-                          <p class="help-block hide"></p>
-                        </div>
-                      </div>
-                    </fieldset>
-                  </div>
-                  <div class="modal-footer">
-                    <input type="submit" class="btn btn-usergrid" value="Add"/>
-                    <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
-                  </div>
-                </form>
-                <form id="dialog-form-follow-user" class="modal hide fade">
-                  <div class="modal-header">
-                    <a class="close" data-dismiss="modal">&times</a>
-                    <h4>Follow this User</h4>
-                  </div>
-                  <div class="modal-body">
-                    <p class="validateTips">Search for the user you want to Follow.</p>
-                    <fieldset>
-                      <div class="control-group">
-                        <label for="search-follow-username-input">User</label>
-                        <div class="controls">
-                          <input type="text" name="search-follow-username-input" id="search-follow-username-input"
-                                 class="input-xlarge"/>
-                          <p class="help-block hide"></p>
-                        </div>
-                      </div>
-                    </fieldset>
-                  </div>
-                  <div class="modal-footer">
-                    <input type="submit" class="btn btn-usergrid" value="Follow"/>
-                    <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
-                  </div>
-                </form>
-              </div>
-
-
-
-              <div id="groups-panel" class="panel-buffer">
-                <div id="groups-panel-list" class="panel-content">
-                  <div id="groups-messages" class="alert" style="display: none;"></div>
-                  <div class="console-section">
-                      <span class="title"> Collection: /groups </span>
-                      <div class="well thingy">
-                        <div class="bar">
-                        <input onkeyup="Usergrid.console.searchGroups();" type="text" name="search-user-groupname" id="search-user-groupname" class="input-small search" placeholder="Search"/>
-                        <select id="search-group-type" onChange="Usergrid.console.searchGroups();" class="input-medium search">
-                          <option value="path">Path</option>
-                          <option value="title">Group Name</option>
-                        </select>
-
-                        <a class="btn" id="delete-groups-link" > Delete</a>
-                        <a style="margin-right: 15px;" class="btn btn-primary" data-toggle="modal" href="#dialog-form-new-group"> Create new group</a>
-
-                      </div>
-                    </div>
-                    <table id="groups-table" class="table">
-                      <tbody></tbody>
-                    </table>
-                    <ul id="groups-pagination" class="pager">
-                      <li id="groups-previous" class="previous"><a >&larr; Previous</a></li>
-                      <li id="groups-next" class="next"><a >Next &rarr;</a></li>
-                    </ul>
-                  </div>
-                  <div id="groups-curl-container" class="row-fluid curl-container ">
-                  </div>
-                </div>
-                <form id="dialog-form-new-group" class="modal hide fade">
-                  <div class="modal-header">
-                    <a class="close" data-dismiss="modal">&times</a>
-                    <h4>Create new group</h4>
-                  </div>
-                  <div class="modal-body">
-                    <p class="validateTips">All form fields are required.</p>
-                    <fieldset>
-                      <div class="control-group">
-                        <label for="new-group-title">Display Name</label>
-                        <div class="controls">
-                          <input type="text" name="title" id="new-group-title" value="" class="input-xlarge"/>
-                          <p class="help-block hide"></p>
-                        </div>
-                      </div>
-                      <div class="control-group">
-                        <label for="new-group-path">Group Path</label>
-                        <div class="controls">
-                          <input type="text" name="path" id="new-group-path" value="" class="input-xlarge"/>
-                          <p class="help-block hide"></p>
-                        </div>
-                      </div>
-                    </fieldset>
-                  </div>
-                  <div class="modal-footer">
-                    <input type="submit" class="btn btn-usergrid" value="Create"/>
-                    <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
-                  </div>
-                </form>
-              </div>
-              <div id="group-panel" class="panel-buffer">
-                <!--ul id="group-panel-tab-bar" class="nav nav-tabs">
-                  <li><a id="button-group-list" >List</a></li>
-                  <li><a id="button-group-details" >Details</a></li>
-                  <li><a id="button-group-memberships" >Members</a></li>
-                  <li><a id="button-group-activities" >Activities</a></li>
-                  <li><a id="button-group-permissions" >Roles & Permissions</a></li>
-                </ul-->
-                <div id="group-panel-tab-bar">
-                  <a class="tab-button btn" id="button-group-list" >List</a>
-                  <a class="tab-button btn active" id="button-group-details" >Details</a>
-                  <a class="tab-button btn" id="button-group-memberships" >Members</a>
-                  <a class="tab-button btn" id="button-group-activities" >Activities</a>
-                  <a class="tab-button btn" id="button-group-permissions" >Roles & Permissions</a>
-                </div>
-
-                <div id="group-panel-details" class="panel-content"></div>
-                <div id="group-panel-memberships" class="panel-content" style="display: none;"></div>
-                <div id="group-panel-activities" class="panel-content" style="display: none;"></div>
-                <div id="group-panel-permissions" class="panel-content" style="display: none;"></div>
-                <form id="dialog-form-add-user-to-group" class="modal hide fade">
-                  <div class="modal-header">
-                    <a class="close" data-dismiss="modal">&times</a>
-                    <h4>Add a User to this Group</h4>
-                  </div>
-                  <div class="modal-body">
-                    <p class="validateTips">Search for the user you want to add to this group.</p>
-                    <fieldset>
-                      <div class="control-group">
-                        <label for="search-user-name-input">User</label>
-                        <div class="controls">
-                          <input type="text" name="search-user-name-input" id="search-user-name-input" class="input-xlarge" autocomplete="off"/>
-                          <p class="help-block hide"></p>
-                        </div>
-                      </div>
-                    </fieldset>
-                  </div>
-                  <div class="modal-footer">
-                    <input type="submit" class="btn btn-usergrid" value="Add"/>
-                    <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
-                  </div>
-                </form>
-                <form id="dialog-form-add-role-to-group" class="modal hide fade">
-                  <div class="modal-header">
-                    <a class="close" data-dismiss="modal">&times</a>
-                    <h4>Add a Role to this Group</h4>
-                  </div>
-                  <div class="modal-body">
-                    <p class="validateTips">Search for the role you want to add to this group.</p>
-                    <fieldset>
-                      <div class="control-group">
-                        <label for="search-groups-role-name-input">Role</label>
-                        <div class="controls">
-                          <input type="text" name="search-groups-role-name-input" id="search-groups-role-name-input" class="input-xlarge" autocomplete="off"/>
-                          <p class="help-block hide"></p>
-                        </div>
-                      </div>
-                    </fieldset>
-                  </div>
-                  <div class="modal-footer">
-                    <input type="submit" class="btn btn-usergrid" value="Add"/>
-                    <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
-                  </div>
-                </form>
-              </div>
-              <div id="roles-panel" class="panel-buffer">
-                <div id="roles-panel-list" class="panel-content">
-                  <div id="roles-messages" class="alert" style="display: none;"></div>
-                  <div class="console-section">
-                    <span class="title"> Collection: /roles </span>
-                    <div class="well thingy">
-                      <div class="bar">
-
-                        <a class="btn" id="delete-roles-link" > Delete</a>
-                        <a style="margin-right: 15px;" class="btn btn-primary" data-toggle="modal" href="#dialog-form-new-role"> Add Role</a>
-
-
-                      </div>
-                    </div>
-                    <table id="roles-table" class="table">
-                      <tbody></tbody>
-                    </table>
-                    <ul id="roles-pagination" class="pager">
-                      <li id="roles-previous" class="previous"><a >&larr; Previous</a></li>
-                      <li id="roles-next" class="next"><a >Next &rarr;</a></li>
-                    </ul>
-                  </div>
-                  <div id="roles-curl-container" class="row-fluid curl-container ">
-                  </div>
-                </div>
-                <div id="roles-panel-search" class="panel-content" style="display: none;">
-                  <div class="console-section">
-                    <div class="well thingy"><span class="title"> Role Settings: <span class="app_title"></span></span></div>
-                    <div class="console-section-contents">
-                      <div id="roles-settings">
-                        <h2>No Permissions.</h2>
-                      </div>
-                    </div>
-                  </div>
-                </div>
-                <form id="dialog-form-new-role" class="modal hide fade">
-                  <div class="modal-header">
-                    <a class="close" data-dismiss="modal">&times</a>
-                    <h4>Create new Role</h4>
-                  </div>
-                  <div class="modal-body">
-                    <p class="validateTips">All form fields are required.</p>
-                    <fieldset>
-                      <div class="control-group">
-                        <label for="new-role-title">Display Name</label>
-                        <div class="controls">
-                          <input type="text" name="title" id="new-role-title" class="input-xlarge"/>
-                          <p class="help-block hide"></p>
-                        </div>
-                      </div>
-                      <div class="control-group">
-                        <label for="new-role-name">Name</label>
-                        <div class="controls">
-                          <input type="text" name="name" id="new-role-name" class="input-xlarge"/>
-                          <p class="help-block hide"></p>
-                        </div>
-                      </div>
-                    </fieldset>
-                  </div>
-                  <div class="modal-footer">
-                    <input type="submit" class="btn btn-usergrid" value="Create"/>
-                    <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
-                  </div>
-                </form>
-              </div>
-              <div id="role-panel" class="panel-buffer">
-                <div id="role-panel-tab-bar">
-                  <a class="tab-button btn" id="button-role-list" >List</a>
-                  <a class="tab-button btn active" id="button-role-settings" >Settings</a>
-                  <a class="tab-button btn" id="button-role-users" >Users</a>
-                  <a class="tab-button btn" id="button-role-groups" >Groups</a>
-                </div>
-
-                <div id="role-panel-settings" class="panel-content">
-                  <div class="console-section">
-                    <div class="well thingy"> <span id="role-section-title" class="title">Role</span> </div>
-                    <div class="console-section-contents">
-                      <div id="role-permissions-messages" class="alert" style="display: none"></div>
-                      <div id="role-permissions">
-                        <h2>...</h2>
-                      </div>
-                    </div>
-                  </div>
-                  <div id="role-permissions-curl-container" class="curl-container">
-                  </div>
-                </div>
-                <div id="role-panel-users" class="panel-content">
-                  <div class="console-section" id="role-users"></div>
-                  <div id="role-users-curl-container" class="curl-container">
-                  </div>
-                </div>
-                <div id="role-panel-groups" class="panel-content"></div>
-                <form id="dialog-form-add-group-to-role" class="modal hide fade">
-                  <div class="modal-header">
-                    <a class="close" data-dismiss="modal">&times</a>
-                    <h4>Add a Group to this Role</h4>
-                  </div>
-                  <div class="modal-body">
-                    <p class="validateTips">Search for the group you want to add to this role.</p>
-                    <fieldset>
-                      <div class="control-group">
-                        <label for="search-roles-group-name-input">Group</label>
-                        <div class="controls">
-                          <input type="text" name="search-roles-group-name-input" id="search-roles-group-name-input" class="input-xlarge" autocomplete="off"/>
-                          <p class="help-block hide"></p>
-                        </div>
-                      </div>
-                    </fieldset>
-                  </div>
-                  <div class="modal-footer">
-                    <input type="submit" class="btn btn-usergrid" value="Add"/>
-                    <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
-                  </div>
-                </form>
-                <form id="dialog-form-add-role-to-user" class="modal hide fade">
-                  <div class="modal-header">
-                <a class="close" data-dismiss="modal">&times</a>
-                <h4>Add a user to this Role</h4>
-              </div>
-                <div class="modal-body">
-                  <p class="validateTips">Search for the user you want to add to this role.</p>
-                  <fieldset>
-                    <div class="control-group">
-                      <label for="search-roles-user-name-input">User</label>
-                      <div class="controls">
-                        <input type="text" name="search-roles-user-name-input" id="search-roles-user-name-input" class="input-xlarge"/>
-                        <p class="help-block hide"></p>
-                      </div>
-                    </div>
-                  </fieldset>
-                </div>
-                <div class="modal-footer">
-                  <input type="submit" class="btn btn-usergrid" value="Add"/>
-                  <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
-                </div>
-                </form>
-              </div>
-              <div id="activities-panel" style="display: none">
-                <div id="activities-panel-list" class="panel-content">
-                  <div class="console-section">
-                    <span class="title"> Activities </span>
-                    <div class="well thingy">
-                      <div class="bar" style="margin-bottom: 25px;">
-                        <input onkeyup="Usergrid.console.searchActivities();" type="text" name="search-activities" id="search-activities" class="input-small search" placeholder="Search"/>
-                        <select id="search-activities-type" onChange="Usergrid.console.searchActivities();" class="input-medium search">
-                          <option value="content">Content</option>
-                          <option value="actor">Actor</option>
-                        </select>
-                        <a class="btn" onclick="Usergrid.console.requestActivities(); return false;">Update Activities</a>
-                      </div>
-                    </div>
-                    <table id="activities-table" class="table">
-                      <tbody></tbody>
-                    </table>
-                    <ul id="activities-pagination" class="pager">
-                      <li id="activities-previous" class="previous"><a >&larr; Previous</a></li>
-                      <li id="activities-next" class="next"><a >Next &rarr;</a></li>
-                    </ul>
-                  </div>
-                </div>
-              </div>
-              <div id="analytics-panel" style="display: none">
-                <div class="panel-content">
-                  <div class="console-section">
-                    <div class="well thingy"><span class="title"> Analytics </span></div>
-                    <div class="console-section-contents">
-                      <div id="analytics-time">
-                        <form id="resolutionSelectForm" action="" class="form-horizontal">
-                          <div class="row">
-                            <fieldset class="span">
-                              <div id="analytics-start-time-span" class="control-group">
-                                <label class="control-label" for="start-date">Start:</label>
-                                <div class="controls">
-                                  <input type="text" id="start-date" class="fixSpan2"/>
-                                  <input type="text" id="start-time" value="12:00 AM" class="fixSpan2"/>
-                                </div>
-                              </div>
-                              <div id="analytics-end-time-span" class="control-group">
-                                <label class="control-label" for="end-date">End:</label>
-                                <div class="controls">
-                                  <input type="text" id="end-date" class="fixSpan2"/>
-                                  <input type="text" id="end-time" value="12:00 AM" class="fixSpan2"/>
-                                </div>
-                              </div>
-                              <div class="control-group">
-                                <label class="control-label" for="resolutionSelect">Resolution</label>
-                                <div class="controls">
-                                  <select name="resolutionSelect" id="resolutionSelect">
-                                    <option value="all">All</option>
-                                    <option value="minute">Minute</option>
-                                    <option value="five_minutes">5 Minutes</option>
-                                    <option value="half_hour">30 Minutes</option>
-                                    <option value="hour">Hour</option>
-                                    <option value="six_hour">6 Hours</option>
-                                    <option value="half_day">Half Day</option>
-                                    <option value="day" selected="selected">Day</option>
-                                    <option value="week">Week</option>
-                                    <option value="month">Month</option>
-                                  </select>
-                                </div>
-                              </div>
-                            </fieldset>
-                            <fieldset class="span offset1">
-                              <div id="analytics-counter-names"></div>
-                            </fieldset>
-                          </div>
-                          <div class="form-actions">
-                            <button class="btn btn-primary" id="button-analytics-generate">Generate</button>
-                          </div>
-                        </form>
-                      </div>
-                    </div>
-                  </div>
-                  <div class="console-section">
-                    <div class="well thingy"><span class="title"> Result Analytics <span class="app_title"></span></span></div>
-                    <div class="console-section-contents">
-                      <div id="analytics-graph"></div>
-                      <div id="analytics-graph-area" style="overflow-x: auto;"></div>
-                    </div>
-                  </div>
-                </div>
-              </div>
-              <div id="properties-panel" style="display: none">
-                <div class="console-section">
-                  <div class="well thingy"><span class="title"> Application Properties: <span class="app_title"></span></span>
-                    <div class="bar" style="margin-bottom: 25px;">
-                      <a class="btn"  onclick="Usergrid.console.newApplicationCredentials(); return false;">Regenerate Credentials</a>
-                    </div>
-                  </div>
-                  <div class="console-section-contents">
-                    <table id="application-panel-key-table" class="table">
-                      <tr>
-                        <td>
-                          <span class="span3">Client ID</span>
-                        </td>
-                        <td>
-                          <span id="application-panel-key">...</span>
-                        </td>
-                      </tr>
-                      <tr>
-                        <td>
-                          <span class="span3">Client Secret</span>
-                        </td>
-                        <td>
-                          <span id="application-panel-secret">...</span>
-                        </td>
-                      </tr>
-                    </table>
-                  </div>
-                </div>
-              </div>
-              <div id="shell-panel" style="display: none">
-                <div id="shell-content" class="console-section">
-                  <div class="well thingy"> <span class="title"> Interactive Shell </span></div>
-                  <div class="console-section-contents">
-                    <div id="shell-input-div">
-                      <p>   Type "help" to view a list of the available commands.</p><hr />
-                      <span>&nbsp;&gt&gt; </span>
-                      <textarea id="shell-input" rows="2" autofocus="autofocus"></textarea>
-                    </div>
-                    <pre id="shell-output" class="prettyprint lang-js" style="overflow-x: auto; height: 400px;">
-                      <p>  Response:</p><hr />
-                    </pre>
-                  </div>
-                </div>
-              </div>
-
-
-              <div id="collections-panel" style="display: none; margin-left: 151px; padding-left: 30px;">
-                <div id="query-path-area" class="console-section query-path-area">
-
-                  <form id="dialog-form-new-collection" class="modal hide fade">
-                    <div class="modal-header">
-                      <a class="close" data-dismiss="modal">&times</a>
-                      <h4>Create new collection</h4>
-                    </div>
-                    <div class="modal-body">
-                      <p class="validateTips">All form fields are required.</p>
-                      <fieldset>
-                        <div class="control-group">
-                          <label for="new-collection-name">Name</label>
-                          <div class="controls">
-                            <input type="text" name="name" id="new-collection-name" value="" class="input-xlarge"/>
-                            <p class="help-block hide"></p>
-                          </div>
-                        </div>
-                      </fieldset>
-                    </div>
-                    <div class="modal-footer">
-                      <input type="submit" class="btn btn-usergrid" value="Create"/>
-                      <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
-                    </div>
-                  </form>
-
-
-                    <!--a class="data-explorer-link"  style="float: right" onclick="$('#data-explorer').toggle(); return false;">Data Explorer</a -->
-
-
-                  <div id="data-explorer" class="">
-                    <div class="well thingy">
-                      <span class="title">Data Explorer</span>
-                    </div>
-
-
-                    <form id="query-inputs" class="">
-                      <div class="control-group">
-                        <div class="" data-toggle="buttons-radio">
-                          <!--a class="btn" id="button-query-back">&#9664; Back</a-->
-                          <!--Added disabled class to change the way button looks but their functionality is as usual -->
-                          <label class="control-label"><strong>Method </strong></label>
-                          <input type="radio" name="query-action" value="get" style="margin-top: -2px;" id="button-query-get" checked> GET &nbsp; &nbsp;
-                          <input type="radio" name="query-action" value="post" style="margin-top: -2px;" id="button-query-post"> POST &nbsp; &nbsp;
-                          <input type="radio" name="query-action" value="put" style="margin-top: -2px;" id="button-query-put"> PUT &nbsp; &nbsp;
-                          <input type="radio" name="query-action" value="delete" style="margin-top: -2px;" id="button-query-delete"> DELETE
-                        </div>
-                      </div>
-                      <div class="control-group">
-                        <label class="control-label" for="query-path"><strong>Path </strong></label>
-                        <div class="controls">
-                          <div class="input-append">
-                            <input id="query-path" type="text" name="path" class="span6" autocomplete="off" placeholder="ex: /users"/>
-                          </div>
-                        </div>
-                      </div>
-                      <div class="control-group">
-                          <a id="back-to-collection" class="outside-link" style="display:none">Back to collection</a>
-                      </div>
-                      <div class="control-group" id="query-ql-box">
-                        <label class="control-label" for="query-ql"><strong>Query String</strong></label>
-                        <div class="controls">
-                          <div class="input-append">
-                            <input id="query-ql" type="text" name="query" class="span5" placeholder="ex: select * where name='fred'"/>
-                            <div class="btn-group pull-right">
-                              <a class="btn dropdown-toggle " data-toggle="dropdown">
-                                <span id='query-collections-caret' class="caret"></span>
-                              </a>
-                              <ul id="query-collections-indexes-list"  class="dropdown-menu ">
-                              </ul>
-                            </div>
-                          </div>
-                        </div>
-                      </div>
-                      <div class="control-group" id="query-limit-box">
-                        <label class="control-label" for="query-limit"><strong>Limit</strong></label>
-                        <div class="controls">
-                          <div class="input-append">
-                            <input id="query-limit" type="text" name="query-limit" class="span5" placeholder="ex: 10"/>
-                          </div>
-                        </div>
-                      </div>
-                      <div class="control-group" id="query-json-box" style="display:none">
-                        <label class="control-label" for="query-source"><strong>Json Body </strong></label>
-                        <div class="controls">
-                          <div class="input-append">
-                            <textarea id="query-source" class="span6 pull-left" rows="4"
-                               placeholder="{  &quot;name&quot;  :  &quot;value&quot;  }"></textarea>
-                            <a class="btn pull-left disabled" id="button-query-validate" >Validate Json</a>
-                            <div id="statusbar-placeholder" class=" pull-left span4"></div>
-                          </div>
-                        </div>
-                      </div>
-
-                      <div class="control-group">
-                         <button type="button" class="btn btn-primary" id="button-query">Run Query</button>
-                      </div>
-                    </form>
-                  </div>
+        <insecure-banner></insecure-banner>
+        <!--Dynamic Content-->
+        <div ng-view="" class="page-holder"></div>
 
-
-
-
-
-
-                  <div id="query-response-area" class="console-section" style="display: none;">
-                    <div class="well thingy" id="query-received-header">
-                      <div class="bar">
-                        <a class="btn " data-toggle="modal" id="delete-entity-link" > Delete</a>
-                      </div>
-                    </div>
-                    <div class="console-section-contents">
-                      <!--<pre class="query-response-json">{ }</pre>-->
-                      <table id="query-response-table">
-
-                      </table>
-                      <ul id="query-response-pagination" class="pager">
-                        <li style="display: none" id="query-response-previous" class="previous"><a >&larr; Previous</a></li>
-                        <li style="display: none" id="query-response-next" class="next"><a >Next &rarr;</a></li>
-                      </ul>
-                    </div>
-                  </div>
-                </div>
-              </div>
-
-          </div>
-        </div>
-        <div class="cleaner">&nbsp;</div>
+        <footer>
+          <hr>
+          <p class="pull-right">&copy; Apigee 2013</p>
+        </footer>
       </div>
     </div>
   </div>
-</div>
-
-
-<script src="js/app/ui/collections.entity.js" type="text/javascript"></script>
-  <script src="js/app/ui/collections.user.js" type="text/javascript"></script>
-
-  <link rel="stylesheet" type="text/css" href="css/custom-theme/jquery-ui-1.8.9.custom.css"/>
-  <link rel="stylesheet" type="text/css" href="css/jquery-ui-timepicker.css"/>
-  <link rel="stylesheet" type="text/css" href="css/jquery.ui.statusbar.css"/>
-  <link rel="stylesheet" type="text/css" href="css/prettify.css"/>
-
-  <script src="js/lib/MD5.min.js" type="text/javascript"></script>
-  <script src="https://www.google.com/jsapi?autoload=%7B%22modules%22%3A%5B%7B%22name%22%3A%22visualization%22%2C%22version%22%3A%221.0%22%2C%22packages%22%3A%5B%22corechart%22%5D%7D%5D%7D" type="text/javascript"></script>
-  <script src="js/lib/bootstrap.min.js" type="text/javascript"></script>
-  <script src="js/app/pages.js" type="text/javascript"></script>
-  <script src="js/app/app.js" type="text/javascript"></script>
-  <script src="js/app/status.js" type="text/javascript"></script>
-  <script src="js/lib/prettify.js" type="text/javascript"></script>
-  <script type="text/javascript" charset="utf-8">prettyPrint();</script>
-</body>
+</section>
+<script src="config.js"></script>
+<script src="js/libs/usergrid-libs.min.js"></script>
+<script src="js/libs/bootstrap/custom/js/bootstrap.min.js"></script>
+<!--todo - remove this. temporarily including jquery ui for calendar in push-->
+<script src="js/libs/jqueryui/jquery.ui.timepicker.min.js" type="text/javascript"></script>
+<!-- In dev use: <script src="js/libs/angular-1.1.5.js"></script> -->
+<!--<script type="text/javascript" src="js/libs/angular-ui-ng-grid/ng-grid-2.0.2.debug.js"></script>-->
+<script id="main-script" src="js/usergrid.min.js"></script>
+
+<script type="text/javascript">
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-4084158-4']);
+
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+  })();
+
+</script>
+
+<script id="perf-script" src="bower_components/apigee.performance.ui/dist/js/usergrid-perf.min.js"></script></body>
 </html>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/activities/activities-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/activities/activities-controller.js b/portal/js/activities/activities-controller.js
new file mode 100644
index 0000000..c674789
--- /dev/null
+++ b/portal/js/activities/activities-controller.js
@@ -0,0 +1,11 @@
+AppServices.Controllers.controller('ActivitiesCtrl', ['ug', '$scope', '$rootScope', '$location','$route',
+  function (ug, $scope, $rootScope, $location, $route) {
+    $scope.$on('app-activities-received',function(evt,data){
+      $scope.activities = data;
+      $scope.$apply();
+    });
+    $scope.$on('app-activities-error',function(evt,data){
+      $rootScope.$broadcast('alert', 'error', 'Application failed to retreive activities data.');
+    });
+    ug.getActivities();
+  }]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/activities/activities.html
----------------------------------------------------------------------
diff --git a/portal/js/activities/activities.html b/portal/js/activities/activities.html
new file mode 100644
index 0000000..1300704
--- /dev/null
+++ b/portal/js/activities/activities.html
@@ -0,0 +1,33 @@
+<section class="row-fluid">
+  <div class="span12">
+    <div class="page-filters">
+      <h1 class="title" class="pull-left"><i class="pictogram title">&#128241;</i> Activities</h1>
+    </div>
+  </div>
+
+</section>
+<section class="row-fluid">
+  <div class="span12 tab-content">
+    <table class="table table-striped">
+      <tbody>
+      <tr class="table-header">
+        <td>Date</td>
+        <td></td>
+        <td>User</td>
+        <td>Content</td>
+        <td>Verb</td>
+        <td>UUID</td>
+      </tr>
+      <tr class="zebraRows" ng-repeat="activity in activities">
+        <td>{{formatDate(activity.created)}}</td>
+        <td class="gravatar20"> <img ng-src="{{activity.actor.picture}}"/>
+        </td>
+        <td>{{activity.actor.displayName}}</td>
+        <td>{{activity.content}}</td>
+        <td>{{activity.verb}}</td>
+        <td>{{activity.uuid}}</td>
+      </tr>
+      </tbody>
+    </table>
+  </div>
+</section>
\ No newline at end of file


[39/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/lib/backbone.js
----------------------------------------------------------------------
diff --git a/portal/js/lib/backbone.js b/portal/js/lib/backbone.js
deleted file mode 100644
index 3373c95..0000000
--- a/portal/js/lib/backbone.js
+++ /dev/null
@@ -1,1431 +0,0 @@
-//     Backbone.js 0.9.2
-
-//     (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc.
-//     Backbone may be freely distributed under the MIT license.
-//     For all details and documentation:
-//     http://backbonejs.org
-
-(function(){
-
-  // Initial Setup
-  // -------------
-
-  // Save a reference to the global object (`window` in the browser, `global`
-  // on the server).
-  var root = this;
-
-  // Save the previous value of the `Backbone` variable, so that it can be
-  // restored later on, if `noConflict` is used.
-  var previousBackbone = root.Backbone;
-
-  // Create a local reference to slice/splice.
-  var slice = Array.prototype.slice;
-  var splice = Array.prototype.splice;
-
-  // The top-level namespace. All public Backbone classes and modules will
-  // be attached to this. Exported for both CommonJS and the browser.
-  var Backbone;
-  if (typeof exports !== 'undefined') {
-    Backbone = exports;
-  } else {
-    Backbone = root.Backbone = {};
-  }
-
-  // Current version of the library. Keep in sync with `package.json`.
-  Backbone.VERSION = '0.9.2';
-
-  // Require Underscore, if we're on the server, and it's not already present.
-  var _ = root._;
-  if (!_ && (typeof require !== 'undefined')) _ = require('underscore');
-
-  // For Backbone's purposes, jQuery, Zepto, or Ender owns the `$` variable.
-  var $ = root.jQuery || root.Zepto || root.ender;
-
-  // Set the JavaScript library that will be used for DOM manipulation and
-  // Ajax calls (a.k.a. the `$` variable). By default Backbone will use: jQuery,
-  // Zepto, or Ender; but the `setDomLibrary()` method lets you inject an
-  // alternate JavaScript library (or a mock library for testing your views
-  // outside of a browser).
-  Backbone.setDomLibrary = function(lib) {
-    $ = lib;
-  };
-
-  // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable
-  // to its previous owner. Returns a reference to this Backbone object.
-  Backbone.noConflict = function() {
-    root.Backbone = previousBackbone;
-    return this;
-  };
-
-  // Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option
-  // will fake `"PUT"` and `"DELETE"` requests via the `_method` parameter and
-  // set a `X-Http-Method-Override` header.
-  Backbone.emulateHTTP = false;
-
-  // Turn on `emulateJSON` to support legacy servers that can't deal with direct
-  // `application/json` requests ... will encode the body as
-  // `application/x-www-form-urlencoded` instead and will send the model in a
-  // form param named `model`.
-  Backbone.emulateJSON = false;
-
-  // Backbone.Events
-  // -----------------
-
-  // Regular expression used to split event strings
-  var eventSplitter = /\s+/;
-
-  // A module that can be mixed in to *any object* in order to provide it with
-  // custom events. You may bind with `on` or remove with `off` callback functions
-  // to an event; trigger`-ing an event fires all callbacks in succession.
-  //
-  //     var object = {};
-  //     _.extend(object, Backbone.Events);
-  //     object.on('expand', function(){ alert('expanded'); });
-  //     object.trigger('expand');
-  //
-  var Events = Backbone.Events = {
-
-    // Bind one or more space separated events, `events`, to a `callback`
-    // function. Passing `"all"` will bind the callback to all events fired.
-    on: function(events, callback, context) {
-
-      var calls, event, node, tail, list;
-      if (!callback) return this;
-      events = events.split(eventSplitter);
-      calls = this._callbacks || (this._callbacks = {});
-
-      // Create an immutable callback list, allowing traversal during
-      // modification.  The tail is an empty object that will always be used
-      // as the next node.
-      while (event = events.shift()) {
-        list = calls[event];
-        node = list ? list.tail : {};
-        node.next = tail = {};
-        node.context = context;
-        node.callback = callback;
-        calls[event] = {tail: tail, next: list ? list.next : node};
-      }
-
-      return this;
-    },
-
-    // Remove one or many callbacks. If `context` is null, removes all callbacks
-    // with that function. If `callback` is null, removes all callbacks for the
-    // event. If `events` is null, removes all bound callbacks for all events.
-    off: function(events, callback, context) {
-      var event, calls, node, tail, cb, ctx;
-
-      // No events, or removing *all* events.
-      if (!(calls = this._callbacks)) return;
-      if (!(events || callback || context)) {
-        delete this._callbacks;
-        return this;
-      }
-
-      // Loop through the listed events and contexts, splicing them out of the
-      // linked list of callbacks if appropriate.
-      events = events ? events.split(eventSplitter) : _.keys(calls);
-      while (event = events.shift()) {
-        node = calls[event];
-        delete calls[event];
-        if (!node || !(callback || context)) continue;
-        // Create a new list, omitting the indicated callbacks.
-        tail = node.tail;
-        while ((node = node.next) !== tail) {
-          cb = node.callback;
-          ctx = node.context;
-          if ((callback && cb !== callback) || (context && ctx !== context)) {
-            this.on(event, cb, ctx);
-          }
-        }
-      }
-
-      return this;
-    },
-
-    // Trigger one or many events, firing all bound callbacks. Callbacks are
-    // passed the same arguments as `trigger` is, apart from the event name
-    // (unless you're listening on `"all"`, which will cause your callback to
-    // receive the true name of the event as the first argument).
-    trigger: function(events) {
-      var event, node, calls, tail, args, all, rest;
-      if (!(calls = this._callbacks)) return this;
-      all = calls.all;
-      events = events.split(eventSplitter);
-      rest = slice.call(arguments, 1);
-
-      // For each event, walk through the linked list of callbacks twice,
-      // first to trigger the event, then to trigger any `"all"` callbacks.
-      while (event = events.shift()) {
-        if (node = calls[event]) {
-          tail = node.tail;
-          while ((node = node.next) !== tail) {
-            node.callback.apply(node.context || this, rest);
-          }
-        }
-        if (node = all) {
-          tail = node.tail;
-          args = [event].concat(rest);
-          while ((node = node.next) !== tail) {
-            node.callback.apply(node.context || this, args);
-          }
-        }
-      }
-
-      return this;
-    }
-
-  };
-
-  // Aliases for backwards compatibility.
-  Events.bind   = Events.on;
-  Events.unbind = Events.off;
-
-  // Backbone.Model
-  // --------------
-
-  // Create a new model, with defined attributes. A client id (`cid`)
-  // is automatically generated and assigned for you.
-  var Model = Backbone.Model = function(attributes, options) {
-    var defaults;
-    attributes || (attributes = {});
-    if (options && options.parse) attributes = this.parse(attributes);
-    if (defaults = getValue(this, 'defaults')) {
-      attributes = _.extend({}, defaults, attributes);
-    }
-    if (options && options.collection) this.collection = options.collection;
-    this.attributes = {};
-    this._escapedAttributes = {};
-    this.cid = _.uniqueId('c');
-    this.changed = {};
-    this._silent = {};
-    this._pending = {};
-    this.set(attributes, {silent: true});
-    // Reset change tracking.
-    this.changed = {};
-    this._silent = {};
-    this._pending = {};
-    this._previousAttributes = _.clone(this.attributes);
-    this.initialize.apply(this, arguments);
-  };
-
-  // Attach all inheritable methods to the Model prototype.
-  _.extend(Model.prototype, Events, {
-
-    // A hash of attributes whose current and previous value differ.
-    changed: null,
-
-    // A hash of attributes that have silently changed since the last time
-    // `change` was called.  Will become pending attributes on the next call.
-    _silent: null,
-
-    // A hash of attributes that have changed since the last `'change'` event
-    // began.
-    _pending: null,
-
-    // The default name for the JSON `id` attribute is `"id"`. MongoDB and
-    // CouchDB users may want to set this to `"_id"`.
-    idAttribute: 'id',
-
-    // Initialize is an empty function by default. Override it with your own
-    // initialization logic.
-    initialize: function(){},
-
-    // Return a copy of the model's `attributes` object.
-    toJSON: function(options) {
-      return _.clone(this.attributes);
-    },
-
-    // Get the value of an attribute.
-    get: function(attr) {
-      return this.attributes[attr];
-    },
-
-    // Get the HTML-escaped value of an attribute.
-    escape: function(attr) {
-      var html;
-      if (html = this._escapedAttributes[attr]) return html;
-      var val = this.get(attr);
-      return this._escapedAttributes[attr] = _.escape(val == null ? '' : '' + val);
-    },
-
-    // Returns `true` if the attribute contains a value that is not null
-    // or undefined.
-    has: function(attr) {
-      return this.get(attr) != null;
-    },
-
-    // Set a hash of model attributes on the object, firing `"change"` unless
-    // you choose to silence it.
-    set: function(key, value, options) {
-      var attrs, attr, val;
-
-      // Handle both `"key", value` and `{key: value}` -style arguments.
-      if (_.isObject(key) || key == null) {
-        attrs = key;
-        options = value;
-      } else {
-        attrs = {};
-        attrs[key] = value;
-      }
-
-      // Extract attributes and options.
-      options || (options = {});
-      if (!attrs) return this;
-      if (attrs instanceof Model) attrs = attrs.attributes;
-      if (options.unset) for (attr in attrs) attrs[attr] = void 0;
-
-      // Run validation.
-      if (!this._validate(attrs, options)) return false;
-
-      // Check for changes of `id`.
-      if (this.idAttribute in attrs) this.id = attrs[this.idAttribute];
-
-      var changes = options.changes = {};
-      var now = this.attributes;
-      var escaped = this._escapedAttributes;
-      var prev = this._previousAttributes || {};
-
-      // For each `set` attribute...
-      for (attr in attrs) {
-        val = attrs[attr];
-
-        // If the new and current value differ, record the change.
-        if (!_.isEqual(now[attr], val) || (options.unset && _.has(now, attr))) {
-          delete escaped[attr];
-          (options.silent ? this._silent : changes)[attr] = true;
-        }
-
-        // Update or delete the current value.
-        options.unset ? delete now[attr] : now[attr] = val;
-
-        // If the new and previous value differ, record the change.  If not,
-        // then remove changes for this attribute.
-        if (!_.isEqual(prev[attr], val) || (_.has(now, attr) != _.has(prev, attr))) {
-          this.changed[attr] = val;
-          if (!options.silent) this._pending[attr] = true;
-        } else {
-          delete this.changed[attr];
-          delete this._pending[attr];
-        }
-      }
-
-      // Fire the `"change"` events.
-      if (!options.silent) this.change(options);
-      return this;
-    },
-
-    // Remove an attribute from the model, firing `"change"` unless you choose
-    // to silence it. `unset` is a noop if the attribute doesn't exist.
-    unset: function(attr, options) {
-      (options || (options = {})).unset = true;
-      return this.set(attr, null, options);
-    },
-
-    // Clear all attributes on the model, firing `"change"` unless you choose
-    // to silence it.
-    clear: function(options) {
-      (options || (options = {})).unset = true;
-      return this.set(_.clone(this.attributes), options);
-    },
-
-    // Fetch the model from the server. If the server's representation of the
-    // model differs from its current attributes, they will be overriden,
-    // triggering a `"change"` event.
-    fetch: function(options) {
-      options = options ? _.clone(options) : {};
-      var model = this;
-      var success = options.success;
-      options.success = function(resp, status, xhr) {
-        if (!model.set(model.parse(resp, xhr), options)) return false;
-        if (success) success(model, resp);
-      };
-      options.error = Backbone.wrapError(options.error, model, options);
-      return (this.sync || Backbone.sync).call(this, 'read', this, options);
-    },
-
-    // Set a hash of model attributes, and sync the model to the server.
-    // If the server returns an attributes hash that differs, the model's
-    // state will be `set` again.
-    save: function(key, value, options) {
-      var attrs, current;
-
-      // Handle both `("key", value)` and `({key: value})` -style calls.
-      if (_.isObject(key) || key == null) {
-        attrs = key;
-        options = value;
-      } else {
-        attrs = {};
-        attrs[key] = value;
-      }
-      options = options ? _.clone(options) : {};
-
-      // If we're "wait"-ing to set changed attributes, validate early.
-      if (options.wait) {
-        if (!this._validate(attrs, options)) return false;
-        current = _.clone(this.attributes);
-      }
-
-      // Regular saves `set` attributes before persisting to the server.
-      var silentOptions = _.extend({}, options, {silent: true});
-      if (attrs && !this.set(attrs, options.wait ? silentOptions : options)) {
-        return false;
-      }
-
-      // After a successful server-side save, the client is (optionally)
-      // updated with the server-side state.
-      var model = this;
-      var success = options.success;
-      options.success = function(resp, status, xhr) {
-        var serverAttrs = model.parse(resp, xhr);
-        if (options.wait) {
-          delete options.wait;
-          serverAttrs = _.extend(attrs || {}, serverAttrs);
-        }
-        if (!model.set(serverAttrs, options)) return false;
-        if (success) {
-          success(model, resp);
-        } else {
-          model.trigger('sync', model, resp, options);
-        }
-      };
-
-      // Finish configuring and sending the Ajax request.
-      options.error = Backbone.wrapError(options.error, model, options);
-      var method = this.isNew() ? 'create' : 'update';
-      var xhr = (this.sync || Backbone.sync).call(this, method, this, options);
-      if (options.wait) this.set(current, silentOptions);
-      return xhr;
-    },
-
-    // Destroy this model on the server if it was already persisted.
-    // Optimistically removes the model from its collection, if it has one.
-    // If `wait: true` is passed, waits for the server to respond before removal.
-    destroy: function(options) {
-      options = options ? _.clone(options) : {};
-      var model = this;
-      var success = options.success;
-
-      var triggerDestroy = function() {
-        model.trigger('destroy', model, model.collection, options);
-      };
-
-      if (this.isNew()) {
-        triggerDestroy();
-        return false;
-      }
-
-      options.success = function(resp) {
-        if (options.wait) triggerDestroy();
-        if (success) {
-          success(model, resp);
-        } else {
-          model.trigger('sync', model, resp, options);
-        }
-      };
-
-      options.error = Backbone.wrapError(options.error, model, options);
-      var xhr = (this.sync || Backbone.sync).call(this, 'delete', this, options);
-      if (!options.wait) triggerDestroy();
-      return xhr;
-    },
-
-    // Default URL for the model's representation on the server -- if you're
-    // using Backbone's restful methods, override this to change the endpoint
-    // that will be called.
-    url: function() {
-      var base = getValue(this, 'urlRoot') || getValue(this.collection, 'url') || urlError();
-      if (this.isNew()) return base;
-      return base + (base.charAt(base.length - 1) == '/' ? '' : '/') + encodeURIComponent(this.id);
-    },
-
-    // **parse** converts a response into the hash of attributes to be `set` on
-    // the model. The default implementation is just to pass the response along.
-    parse: function(resp, xhr) {
-      return resp;
-    },
-
-    // Create a new model with identical attributes to this one.
-    clone: function() {
-      return new this.constructor(this.attributes);
-    },
-
-    // A model is new if it has never been saved to the server, and lacks an id.
-    isNew: function() {
-      return this.id == null;
-    },
-
-    // Call this method to manually fire a `"change"` event for this model and
-    // a `"change:attribute"` event for each changed attribute.
-    // Calling this will cause all objects observing the model to update.
-    change: function(options) {
-      options || (options = {});
-      var changing = this._changing;
-      this._changing = true;
-
-      // Silent changes become pending changes.
-      for (var attr in this._silent) this._pending[attr] = true;
-
-      // Silent changes are triggered.
-      var changes = _.extend({}, options.changes, this._silent);
-      this._silent = {};
-      for (var attr in changes) {
-        this.trigger('change:' + attr, this, this.get(attr), options);
-      }
-      if (changing) return this;
-
-      // Continue firing `"change"` events while there are pending changes.
-      while (!_.isEmpty(this._pending)) {
-        this._pending = {};
-        this.trigger('change', this, options);
-        // Pending and silent changes still remain.
-        for (var attr in this.changed) {
-          if (this._pending[attr] || this._silent[attr]) continue;
-          delete this.changed[attr];
-        }
-        this._previousAttributes = _.clone(this.attributes);
-      }
-
-      this._changing = false;
-      return this;
-    },
-
-    // Determine if the model has changed since the last `"change"` event.
-    // If you specify an attribute name, determine if that attribute has changed.
-    hasChanged: function(attr) {
-      if (!arguments.length) return !_.isEmpty(this.changed);
-      return _.has(this.changed, attr);
-    },
-
-    // Return an object containing all the attributes that have changed, or
-    // false if there are no changed attributes. Useful for determining what
-    // parts of a view need to be updated and/or what attributes need to be
-    // persisted to the server. Unset attributes will be set to undefined.
-    // You can also pass an attributes object to diff against the model,
-    // determining if there *would be* a change.
-    changedAttributes: function(diff) {
-      if (!diff) return this.hasChanged() ? _.clone(this.changed) : false;
-      var val, changed = false, old = this._previousAttributes;
-      for (var attr in diff) {
-        if (_.isEqual(old[attr], (val = diff[attr]))) continue;
-        (changed || (changed = {}))[attr] = val;
-      }
-      return changed;
-    },
-
-    // Get the previous value of an attribute, recorded at the time the last
-    // `"change"` event was fired.
-    previous: function(attr) {
-      if (!arguments.length || !this._previousAttributes) return null;
-      return this._previousAttributes[attr];
-    },
-
-    // Get all of the attributes of the model at the time of the previous
-    // `"change"` event.
-    previousAttributes: function() {
-      return _.clone(this._previousAttributes);
-    },
-
-    // Check if the model is currently in a valid state. It's only possible to
-    // get into an *invalid* state if you're using silent changes.
-    isValid: function() {
-      return !this.validate(this.attributes);
-    },
-
-    // Run validation against the next complete set of model attributes,
-    // returning `true` if all is well. If a specific `error` callback has
-    // been passed, call that instead of firing the general `"error"` event.
-    _validate: function(attrs, options) {
-      if (options.silent || !this.validate) return true;
-      attrs = _.extend({}, this.attributes, attrs);
-      var error = this.validate(attrs, options);
-      if (!error) return true;
-      if (options && options.error) {
-        options.error(this, error, options);
-      } else {
-        this.trigger('error', this, error, options);
-      }
-      return false;
-    }
-
-  });
-
-  // Backbone.Collection
-  // -------------------
-
-  // Provides a standard collection class for our sets of models, ordered
-  // or unordered. If a `comparator` is specified, the Collection will maintain
-  // its models in sort order, as they're added and removed.
-  var Collection = Backbone.Collection = function(models, options) {
-    options || (options = {});
-    if (options.model) this.model = options.model;
-    if (options.comparator) this.comparator = options.comparator;
-    this._reset();
-    this.initialize.apply(this, arguments);
-    if (models) this.reset(models, {silent: true, parse: options.parse});
-  };
-
-  // Define the Collection's inheritable methods.
-  _.extend(Collection.prototype, Events, {
-
-    // The default model for a collection is just a **Backbone.Model**.
-    // This should be overridden in most cases.
-    model: Model,
-
-    // Initialize is an empty function by default. Override it with your own
-    // initialization logic.
-    initialize: function(){},
-
-    // The JSON representation of a Collection is an array of the
-    // models' attributes.
-    toJSON: function(options) {
-      return this.map(function(model){ return model.toJSON(options); });
-    },
-
-    // Add a model, or list of models to the set. Pass **silent** to avoid
-    // firing the `add` event for every new model.
-    add: function(models, options) {
-      var i, index, length, model, cid, id, cids = {}, ids = {}, dups = [];
-      options || (options = {});
-      models = _.isArray(models) ? models.slice() : [models];
-
-      // Begin by turning bare objects into model references, and preventing
-      // invalid models or duplicate models from being added.
-      for (i = 0, length = models.length; i < length; i++) {
-        if (!(model = models[i] = this._prepareModel(models[i], options))) {
-          throw new Error("Can't add an invalid model to a collection");
-        }
-        cid = model.cid;
-        id = model.id;
-        if (cids[cid] || this._byCid[cid] || ((id != null) && (ids[id] || this._byId[id]))) {
-          dups.push(i);
-          continue;
-        }
-        cids[cid] = ids[id] = model;
-      }
-
-      // Remove duplicates.
-      i = dups.length;
-      while (i--) {
-        models.splice(dups[i], 1);
-      }
-
-      // Listen to added models' events, and index models for lookup by
-      // `id` and by `cid`.
-      for (i = 0, length = models.length; i < length; i++) {
-        (model = models[i]).on('all', this._onModelEvent, this);
-        this._byCid[model.cid] = model;
-        if (model.id != null) this._byId[model.id] = model;
-      }
-
-      // Insert models into the collection, re-sorting if needed, and triggering
-      // `add` events unless silenced.
-      this.length += length;
-      index = options.at != null ? options.at : this.models.length;
-      splice.apply(this.models, [index, 0].concat(models));
-      if (this.comparator) this.sort({silent: true});
-      if (options.silent) return this;
-      for (i = 0, length = this.models.length; i < length; i++) {
-        if (!cids[(model = this.models[i]).cid]) continue;
-        options.index = i;
-        model.trigger('add', model, this, options);
-      }
-      return this;
-    },
-
-    // Remove a model, or a list of models from the set. Pass silent to avoid
-    // firing the `remove` event for every model removed.
-    remove: function(models, options) {
-      var i, l, index, model;
-      options || (options = {});
-      models = _.isArray(models) ? models.slice() : [models];
-      for (i = 0, l = models.length; i < l; i++) {
-        model = this.getByCid(models[i]) || this.get(models[i]);
-        if (!model) continue;
-        delete this._byId[model.id];
-        delete this._byCid[model.cid];
-        index = this.indexOf(model);
-        this.models.splice(index, 1);
-        this.length--;
-        if (!options.silent) {
-          options.index = index;
-          model.trigger('remove', model, this, options);
-        }
-        this._removeReference(model);
-      }
-      return this;
-    },
-
-    // Add a model to the end of the collection.
-    push: function(model, options) {
-      model = this._prepareModel(model, options);
-      this.add(model, options);
-      return model;
-    },
-
-    // Remove a model from the end of the collection.
-    pop: function(options) {
-      var model = this.at(this.length - 1);
-      this.remove(model, options);
-      return model;
-    },
-
-    // Add a model to the beginning of the collection.
-    unshift: function(model, options) {
-      model = this._prepareModel(model, options);
-      this.add(model, _.extend({at: 0}, options));
-      return model;
-    },
-
-    // Remove a model from the beginning of the collection.
-    shift: function(options) {
-      var model = this.at(0);
-      this.remove(model, options);
-      return model;
-    },
-
-    // Get a model from the set by id.
-    get: function(id) {
-      if (id == null) return void 0;
-      return this._byId[id.id != null ? id.id : id];
-    },
-
-    // Get a model from the set by client id.
-    getByCid: function(cid) {
-      return cid && this._byCid[cid.cid || cid];
-    },
-
-    // Get the model at the given index.
-    at: function(index) {
-      return this.models[index];
-    },
-
-    // Return models with matching attributes. Useful for simple cases of `filter`.
-    where: function(attrs) {
-      if (_.isEmpty(attrs)) return [];
-      return this.filter(function(model) {
-        for (var key in attrs) {
-          if (attrs[key] !== model.get(key)) return false;
-        }
-        return true;
-      });
-    },
-
-    // Force the collection to re-sort itself. You don't need to call this under
-    // normal circumstances, as the set will maintain sort order as each item
-    // is added.
-    sort: function(options) {
-      options || (options = {});
-      if (!this.comparator) throw new Error('Cannot sort a set without a comparator');
-      var boundComparator = _.bind(this.comparator, this);
-      if (this.comparator.length == 1) {
-        this.models = this.sortBy(boundComparator);
-      } else {
-        this.models.sort(boundComparator);
-      }
-      if (!options.silent) this.trigger('reset', this, options);
-      return this;
-    },
-
-    // Pluck an attribute from each model in the collection.
-    pluck: function(attr) {
-      return _.map(this.models, function(model){ return model.get(attr); });
-    },
-
-    // When you have more items than you want to add or remove individually,
-    // you can reset the entire set with a new list of models, without firing
-    // any `add` or `remove` events. Fires `reset` when finished.
-    reset: function(models, options) {
-      models  || (models = []);
-      options || (options = {});
-      for (var i = 0, l = this.models.length; i < l; i++) {
-        this._removeReference(this.models[i]);
-      }
-      this._reset();
-      this.add(models, _.extend({silent: true}, options));
-      if (!options.silent) this.trigger('reset', this, options);
-      return this;
-    },
-
-    // Fetch the default set of models for this collection, resetting the
-    // collection when they arrive. If `add: true` is passed, appends the
-    // models to the collection instead of resetting.
-    fetch: function(options) {
-      options = options ? _.clone(options) : {};
-      if (options.parse === undefined) options.parse = true;
-      var collection = this;
-      var success = options.success;
-      options.success = function(resp, status, xhr) {
-        collection[options.add ? 'add' : 'reset'](collection.parse(resp, xhr), options);
-        if (success) success(collection, resp);
-      };
-      options.error = Backbone.wrapError(options.error, collection, options);
-      return (this.sync || Backbone.sync).call(this, 'read', this, options);
-    },
-
-    // Create a new instance of a model in this collection. Add the model to the
-    // collection immediately, unless `wait: true` is passed, in which case we
-    // wait for the server to agree.
-    create: function(model, options) {
-      var coll = this;
-      options = options ? _.clone(options) : {};
-      model = this._prepareModel(model, options);
-      if (!model) return false;
-      if (!options.wait) coll.add(model, options);
-      var success = options.success;
-      options.success = function(nextModel, resp, xhr) {
-        if (options.wait) coll.add(nextModel, options);
-        if (success) {
-          success(nextModel, resp);
-        } else {
-          nextModel.trigger('sync', model, resp, options);
-        }
-      };
-      model.save(null, options);
-      return model;
-    },
-
-    // **parse** converts a response into a list of models to be added to the
-    // collection. The default implementation is just to pass it through.
-    parse: function(resp, xhr) {
-      return resp;
-    },
-
-    // Proxy to _'s chain. Can't be proxied the same way the rest of the
-    // underscore methods are proxied because it relies on the underscore
-    // constructor.
-    chain: function () {
-      return _(this.models).chain();
-    },
-
-    // Reset all internal state. Called when the collection is reset.
-    _reset: function(options) {
-      this.length = 0;
-      this.models = [];
-      this._byId  = {};
-      this._byCid = {};
-    },
-
-    // Prepare a model or hash of attributes to be added to this collection.
-    _prepareModel: function(model, options) {
-      options || (options = {});
-      if (!(model instanceof Model)) {
-        var attrs = model;
-        options.collection = this;
-        model = new this.model(attrs, options);
-        if (!model._validate(model.attributes, options)) model = false;
-      } else if (!model.collection) {
-        model.collection = this;
-      }
-      return model;
-    },
-
-    // Internal method to remove a model's ties to a collection.
-    _removeReference: function(model) {
-      if (this == model.collection) {
-        delete model.collection;
-      }
-      model.off('all', this._onModelEvent, this);
-    },
-
-    // Internal method called every time a model in the set fires an event.
-    // Sets need to update their indexes when models change ids. All other
-    // events simply proxy through. "add" and "remove" events that originate
-    // in other collections are ignored.
-    _onModelEvent: function(event, model, collection, options) {
-      if ((event == 'add' || event == 'remove') && collection != this) return;
-      if (event == 'destroy') {
-        this.remove(model, options);
-      }
-      if (model && event === 'change:' + model.idAttribute) {
-        delete this._byId[model.previous(model.idAttribute)];
-        this._byId[model.id] = model;
-      }
-      this.trigger.apply(this, arguments);
-    }
-
-  });
-
-  // Underscore methods that we want to implement on the Collection.
-  var methods = ['forEach', 'each', 'map', 'reduce', 'reduceRight', 'find',
-    'detect', 'filter', 'select', 'reject', 'every', 'all', 'some', 'any',
-    'include', 'contains', 'invoke', 'max', 'min', 'sortBy', 'sortedIndex',
-    'toArray', 'size', 'first', 'initial', 'rest', 'last', 'without', 'indexOf',
-    'shuffle', 'lastIndexOf', 'isEmpty', 'groupBy'];
-
-  // Mix in each Underscore method as a proxy to `Collection#models`.
-  _.each(methods, function(method) {
-    Collection.prototype[method] = function() {
-      return _[method].apply(_, [this.models].concat(_.toArray(arguments)));
-    };
-  });
-
-  // Backbone.Router
-  // -------------------
-
-  // Routers map faux-URLs to actions, and fire events when routes are
-  // matched. Creating a new one sets its `routes` hash, if not set statically.
-  var Router = Backbone.Router = function(options) {
-    options || (options = {});
-    if (options.routes) this.routes = options.routes;
-    this._bindRoutes();
-    this.initialize.apply(this, arguments);
-  };
-
-  // Cached regular expressions for matching named param parts and splatted
-  // parts of route strings.
-  var namedParam    = /:\w+/g;
-  var splatParam    = /\*\w+/g;
-  var escapeRegExp  = /[-[\]{}()+?.,\\^$|#\s]/g;
-
-  // Set up all inheritable **Backbone.Router** properties and methods.
-  _.extend(Router.prototype, Events, {
-
-    // Initialize is an empty function by default. Override it with your own
-    // initialization logic.
-    initialize: function(){},
-
-    // Manually bind a single named route to a callback. For example:
-    //
-    //     this.route('search/:query/p:num', 'search', function(query, num) {
-    //       ...
-    //     });
-    //
-    route: function(route, name, callback) {
-      Backbone.history || (Backbone.history = new History);
-      if (!_.isRegExp(route)) route = this._routeToRegExp(route);
-      if (!callback) callback = this[name];
-      Backbone.history.route(route, _.bind(function(fragment) {
-        var args = this._extractParameters(route, fragment);
-        callback && callback.apply(this, args);
-        this.trigger.apply(this, ['route:' + name].concat(args));
-        Backbone.history.trigger('route', this, name, args);
-      }, this));
-      return this;
-    },
-
-    // Simple proxy to `Backbone.history` to save a fragment into the history.
-    navigate: function(fragment, options) {
-      Backbone.history.navigate(fragment, options);
-    },
-
-    // Bind all defined routes to `Backbone.history`. We have to reverse the
-    // order of the routes here to support behavior where the most general
-    // routes can be defined at the bottom of the route map.
-    _bindRoutes: function() {
-      if (!this.routes) return;
-      var routes = [];
-      for (var route in this.routes) {
-        routes.unshift([route, this.routes[route]]);
-      }
-      for (var i = 0, l = routes.length; i < l; i++) {
-        this.route(routes[i][0], routes[i][1], this[routes[i][1]]);
-      }
-    },
-
-    // Convert a route string into a regular expression, suitable for matching
-    // against the current location hash.
-    _routeToRegExp: function(route) {
-      route = route.replace(escapeRegExp, '\\$&')
-                   .replace(namedParam, '([^\/]+)')
-                   .replace(splatParam, '(.*?)');
-      return new RegExp('^' + route + '$');
-    },
-
-    // Given a route, and a URL fragment that it matches, return the array of
-    // extracted parameters.
-    _extractParameters: function(route, fragment) {
-      return route.exec(fragment).slice(1);
-    }
-
-  });
-
-  // Backbone.History
-  // ----------------
-
-  // Handles cross-browser history management, based on URL fragments. If the
-  // browser does not support `onhashchange`, falls back to polling.
-  var History = Backbone.History = function() {
-    this.handlers = [];
-    _.bindAll(this, 'checkUrl');
-  };
-
-  // Cached regex for cleaning leading hashes and slashes .
-  var routeStripper = /^[#\/]/;
-
-  // Cached regex for detecting MSIE.
-  var isExplorer = /msie [\w.]+/;
-
-  // Has the history handling already been started?
-  History.started = false;
-
-  // Set up all inheritable **Backbone.History** properties and methods.
-  _.extend(History.prototype, Events, {
-
-    // The default interval to poll for hash changes, if necessary, is
-    // twenty times a second.
-    interval: 50,
-
-    // Gets the true hash value. Cannot use location.hash directly due to bug
-    // in Firefox where location.hash will always be decoded.
-    getHash: function(windowOverride) {
-      var loc = windowOverride ? windowOverride.location : window.location;
-      var match = loc.href.match(/#(.*)$/);
-      return match ? match[1] : '';
-    },
-
-    // Get the cross-browser normalized URL fragment, either from the URL,
-    // the hash, or the override.
-    getFragment: function(fragment, forcePushState) {
-      if (fragment == null) {
-        if (this._hasPushState || forcePushState) {
-          fragment = window.location.pathname;
-          var search = window.location.search;
-          if (search) fragment += search;
-        } else {
-          fragment = this.getHash();
-        }
-      }
-      if (!fragment.indexOf(this.options.root)) fragment = fragment.substr(this.options.root.length);
-      return fragment.replace(routeStripper, '');
-    },
-
-    // Start the hash change handling, returning `true` if the current URL matches
-    // an existing route, and `false` otherwise.
-    start: function(options) {
-      if (History.started) throw new Error("Backbone.history has already been started");
-      History.started = true;
-
-      // Figure out the initial configuration. Do we need an iframe?
-      // Is pushState desired ... is it available?
-      this.options          = _.extend({}, {root: '/'}, this.options, options);
-      this._wantsHashChange = this.options.hashChange !== false;
-      this._wantsPushState  = !!this.options.pushState;
-      this._hasPushState    = !!(this.options.pushState && window.history && window.history.pushState);
-      var fragment          = this.getFragment();
-      var docMode           = document.documentMode;
-      var oldIE             = (isExplorer.exec(navigator.userAgent.toLowerCase()) && (!docMode || docMode <= 7));
-
-      if (oldIE) {
-        this.iframe = $('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo('body')[0].contentWindow;
-        this.navigate(fragment);
-      }
-
-      // Depending on whether we're using pushState or hashes, and whether
-      // 'onhashchange' is supported, determine how we check the URL state.
-      if (this._hasPushState) {
-        $(window).bind('popstate', this.checkUrl);
-      } else if (this._wantsHashChange && ('onhashchange' in window) && !oldIE) {
-        $(window).bind('hashchange', this.checkUrl);
-      } else if (this._wantsHashChange) {
-        this._checkUrlInterval = setInterval(this.checkUrl, this.interval);
-      }
-
-      // Determine if we need to change the base url, for a pushState link
-      // opened by a non-pushState browser.
-      this.fragment = fragment;
-      var loc = window.location;
-      var atRoot  = loc.pathname == this.options.root;
-
-      // If we've started off with a route from a `pushState`-enabled browser,
-      // but we're currently in a browser that doesn't support it...
-      if (this._wantsHashChange && this._wantsPushState && !this._hasPushState && !atRoot) {
-        this.fragment = this.getFragment(null, true);
-        window.location.replace(this.options.root + '#' + this.fragment);
-        // Return immediately as browser will do redirect to new url
-        return true;
-
-      // Or if we've started out with a hash-based route, but we're currently
-      // in a browser where it could be `pushState`-based instead...
-      } else if (this._wantsPushState && this._hasPushState && atRoot && loc.hash) {
-        this.fragment = this.getHash().replace(routeStripper, '');
-        window.history.replaceState({}, document.title, loc.protocol + '//' + loc.host + this.options.root + this.fragment);
-      }
-
-      if (!this.options.silent) {
-        return this.loadUrl();
-      }
-    },
-
-    // Disable Backbone.history, perhaps temporarily. Not useful in a real app,
-    // but possibly useful for unit testing Routers.
-    stop: function() {
-      $(window).unbind('popstate', this.checkUrl).unbind('hashchange', this.checkUrl);
-      clearInterval(this._checkUrlInterval);
-      History.started = false;
-    },
-
-    // Add a route to be tested when the fragment changes. Routes added later
-    // may override previous routes.
-    route: function(route, callback) {
-      this.handlers.unshift({route: route, callback: callback});
-    },
-
-    // Checks the current URL to see if it has changed, and if it has,
-    // calls `loadUrl`, normalizing across the hidden iframe.
-    checkUrl: function(e) {
-      var current = this.getFragment();
-      if (current == this.fragment && this.iframe) current = this.getFragment(this.getHash(this.iframe));
-      if (current == this.fragment) return false;
-      if (this.iframe) this.navigate(current);
-      this.loadUrl() || this.loadUrl(this.getHash());
-    },
-
-    // Attempt to load the current URL fragment. If a route succeeds with a
-    // match, returns `true`. If no defined routes matches the fragment,
-    // returns `false`.
-    loadUrl: function(fragmentOverride) {
-      var fragment = this.fragment = this.getFragment(fragmentOverride);
-      var matched = _.any(this.handlers, function(handler) {
-        if (handler.route.test(fragment)) {
-          handler.callback(fragment);
-          return true;
-        }
-      });
-      return matched;
-    },
-
-    // Save a fragment into the hash history, or replace the URL state if the
-    // 'replace' option is passed. You are responsible for properly URL-encoding
-    // the fragment in advance.
-    //
-    // The options object can contain `trigger: true` if you wish to have the
-    // route callback be fired (not usually desirable), or `replace: true`, if
-    // you wish to modify the current URL without adding an entry to the history.
-    navigate: function(fragment, options) {
-      if (!History.started) return false;
-      if (!options || options === true) options = {trigger: options};
-      var frag = (fragment || '').replace(routeStripper, '');
-      if (this.fragment == frag) return;
-
-      // If pushState is available, we use it to set the fragment as a real URL.
-      if (this._hasPushState) {
-        if (frag.indexOf(this.options.root) != 0) frag = this.options.root + frag;
-        this.fragment = frag;
-        window.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, frag);
-
-      // If hash changes haven't been explicitly disabled, update the hash
-      // fragment to store history.
-      } else if (this._wantsHashChange) {
-        this.fragment = frag;
-        this._updateHash(window.location, frag, options.replace);
-        if (this.iframe && (frag != this.getFragment(this.getHash(this.iframe)))) {
-          // Opening and closing the iframe tricks IE7 and earlier to push a history entry on hash-tag change.
-          // When replace is true, we don't want this.
-          if(!options.replace) this.iframe.document.open().close();
-          this._updateHash(this.iframe.location, frag, options.replace);
-        }
-
-      // If you've told us that you explicitly don't want fallback hashchange-
-      // based history, then `navigate` becomes a page refresh.
-      } else {
-        window.location.assign(this.options.root + fragment);
-      }
-      if (options.trigger) this.loadUrl(fragment);
-    },
-
-    // Update the hash location, either replacing the current entry, or adding
-    // a new one to the browser history.
-    _updateHash: function(location, fragment, replace) {
-      if (replace) {
-        location.replace(location.toString().replace(/(javascript:|#).*$/, '') + '#' + fragment);
-      } else {
-        location.hash = fragment;
-      }
-    }
-  });
-
-  // Backbone.View
-  // -------------
-
-  // Creating a Backbone.View creates its initial element outside of the DOM,
-  // if an existing element is not provided...
-  var View = Backbone.View = function(options) {
-    this.cid = _.uniqueId('view');
-    this._configure(options || {});
-    this._ensureElement();
-    this.initialize.apply(this, arguments);
-    this.delegateEvents();
-  };
-
-  // Cached regex to split keys for `delegate`.
-  var delegateEventSplitter = /^(\S+)\s*(.*)$/;
-
-  // List of view options to be merged as properties.
-  var viewOptions = ['model', 'collection', 'el', 'id', 'attributes', 'className', 'tagName'];
-
-  // Set up all inheritable **Backbone.View** properties and methods.
-  _.extend(View.prototype, Events, {
-
-    // The default `tagName` of a View's element is `"div"`.
-    tagName: 'div',
-
-    // jQuery delegate for element lookup, scoped to DOM elements within the
-    // current view. This should be prefered to global lookups where possible.
-    $: function(selector) {
-      return this.$el.find(selector);
-    },
-
-    // Initialize is an empty function by default. Override it with your own
-    // initialization logic.
-    initialize: function(){},
-
-    // **render** is the core function that your view should override, in order
-    // to populate its element (`this.el`), with the appropriate HTML. The
-    // convention is for **render** to always return `this`.
-    render: function() {
-      return this;
-    },
-
-    // Remove this view from the DOM. Note that the view isn't present in the
-    // DOM by default, so calling this method may be a no-op.
-    remove: function() {
-      this.$el.remove();
-      return this;
-    },
-
-    // For small amounts of DOM Elements, where a full-blown template isn't
-    // needed, use **make** to manufacture elements, one at a time.
-    //
-    //     var el = this.make('li', {'class': 'row'}, this.model.escape('title'));
-    //
-    make: function(tagName, attributes, content) {
-      var el = document.createElement(tagName);
-      if (attributes) $(el).attr(attributes);
-      if (content) $(el).html(content);
-      return el;
-    },
-
-    // Change the view's element (`this.el` property), including event
-    // re-delegation.
-    setElement: function(element, delegate) {
-      if (this.$el) this.undelegateEvents();
-      this.$el = (element instanceof $) ? element : $(element);
-      this.el = this.$el[0];
-      if (delegate !== false) this.delegateEvents();
-      return this;
-    },
-
-    // Set callbacks, where `this.events` is a hash of
-    //
-    // *{"event selector": "callback"}*
-    //
-    //     {
-    //       'mousedown .title':  'edit',
-    //       'click .button':     'save'
-    //       'click .open':       function(e) { ... }
-    //     }
-    //
-    // pairs. Callbacks will be bound to the view, with `this` set properly.
-    // Uses event delegation for efficiency.
-    // Omitting the selector binds the event to `this.el`.
-    // This only works for delegate-able events: not `focus`, `blur`, and
-    // not `change`, `submit`, and `reset` in Internet Explorer.
-    delegateEvents: function(events) {
-      if (!(events || (events = getValue(this, 'events')))) return;
-      this.undelegateEvents();
-      for (var key in events) {
-        var method = events[key];
-        if (!_.isFunction(method)) method = this[events[key]];
-        if (!method) throw new Error('Method "' + events[key] + '" does not exist');
-        var match = key.match(delegateEventSplitter);
-        var eventName = match[1], selector = match[2];
-        method = _.bind(method, this);
-        eventName += '.delegateEvents' + this.cid;
-        if (selector === '') {
-          this.$el.bind(eventName, method);
-        } else {
-          this.$el.delegate(selector, eventName, method);
-        }
-      }
-    },
-
-    // Clears all callbacks previously bound to the view with `delegateEvents`.
-    // You usually don't need to use this, but may wish to if you have multiple
-    // Backbone views attached to the same DOM element.
-    undelegateEvents: function() {
-      this.$el.unbind('.delegateEvents' + this.cid);
-    },
-
-    // Performs the initial configuration of a View with a set of options.
-    // Keys with special meaning *(model, collection, id, className)*, are
-    // attached directly to the view.
-    _configure: function(options) {
-      if (this.options) options = _.extend({}, this.options, options);
-      for (var i = 0, l = viewOptions.length; i < l; i++) {
-        var attr = viewOptions[i];
-        if (options[attr]) this[attr] = options[attr];
-      }
-      this.options = options;
-    },
-
-    // Ensure that the View has a DOM element to render into.
-    // If `this.el` is a string, pass it through `$()`, take the first
-    // matching element, and re-assign it to `el`. Otherwise, create
-    // an element from the `id`, `className` and `tagName` properties.
-    _ensureElement: function() {
-      if (!this.el) {
-        var attrs = getValue(this, 'attributes') || {};
-        if (this.id) attrs.id = this.id;
-        if (this.className) attrs['class'] = this.className;
-        this.setElement(this.make(this.tagName, attrs), false);
-      } else {
-        this.setElement(this.el, false);
-      }
-    }
-
-  });
-
-  // The self-propagating extend function that Backbone classes use.
-  var extend = function (protoProps, classProps) {
-    var child = inherits(this, protoProps, classProps);
-    child.extend = this.extend;
-    return child;
-  };
-
-  // Set up inheritance for the model, collection, and view.
-  Model.extend = Collection.extend = Router.extend = View.extend = extend;
-
-  // Backbone.sync
-  // -------------
-
-  // Map from CRUD to HTTP for our default `Backbone.sync` implementation.
-  var methodMap = {
-    'create': 'POST',
-    'update': 'PUT',
-    'delete': 'DELETE',
-    'read':   'GET'
-  };
-
-  // Override this function to change the manner in which Backbone persists
-  // models to the server. You will be passed the type of request, and the
-  // model in question. By default, makes a RESTful Ajax request
-  // to the model's `url()`. Some possible customizations could be:
-  //
-  // * Use `setTimeout` to batch rapid-fire updates into a single request.
-  // * Send up the models as XML instead of JSON.
-  // * Persist models via WebSockets instead of Ajax.
-  //
-  // Turn on `Backbone.emulateHTTP` in order to send `PUT` and `DELETE` requests
-  // as `POST`, with a `_method` parameter containing the true HTTP method,
-  // as well as all requests with the body as `application/x-www-form-urlencoded`
-  // instead of `application/json` with the model in a param named `model`.
-  // Useful when interfacing with server-side languages like **PHP** that make
-  // it difficult to read the body of `PUT` requests.
-  Backbone.sync = function(method, model, options) {
-    var type = methodMap[method];
-
-    // Default options, unless specified.
-    options || (options = {});
-
-    // Default JSON-request options.
-    var params = {type: type, dataType: 'json'};
-
-    // Ensure that we have a URL.
-    if (!options.url) {
-      params.url = getValue(model, 'url') || urlError();
-    }
-
-    // Ensure that we have the appropriate request data.
-    if (!options.data && model && (method == 'create' || method == 'update')) {
-      params.contentType = 'application/json';
-      params.data = JSON.stringify(model.toJSON());
-    }
-
-    // For older servers, emulate JSON by encoding the request into an HTML-form.
-    if (Backbone.emulateJSON) {
-      params.contentType = 'application/x-www-form-urlencoded';
-      params.data = params.data ? {model: params.data} : {};
-    }
-
-    // For older servers, emulate HTTP by mimicking the HTTP method with `_method`
-    // And an `X-HTTP-Method-Override` header.
-    if (Backbone.emulateHTTP) {
-      if (type === 'PUT' || type === 'DELETE') {
-        if (Backbone.emulateJSON) params.data._method = type;
-        params.type = 'POST';
-        params.beforeSend = function(xhr) {
-          xhr.setRequestHeader('X-HTTP-Method-Override', type);
-        };
-      }
-    }
-
-    // Don't process data on a non-GET request.
-    if (params.type !== 'GET' && !Backbone.emulateJSON) {
-      params.processData = false;
-    }
-
-    // Make the request, allowing the user to override any Ajax options.
-    return $.ajax(_.extend(params, options));
-  };
-
-  // Wrap an optional error callback with a fallback error event.
-  Backbone.wrapError = function(onError, originalModel, options) {
-    return function(model, resp) {
-      resp = model === originalModel ? resp : model;
-      if (onError) {
-        onError(originalModel, resp, options);
-      } else {
-        originalModel.trigger('error', originalModel, resp, options);
-      }
-    };
-  };
-
-  // Helpers
-  // -------
-
-  // Shared empty constructor function to aid in prototype-chain creation.
-  var ctor = function(){};
-
-  // Helper function to correctly set up the prototype chain, for subclasses.
-  // Similar to `goog.inherits`, but uses a hash of prototype properties and
-  // class properties to be extended.
-  var inherits = function(parent, protoProps, staticProps) {
-    var child;
-
-    // The constructor function for the new subclass is either defined by you
-    // (the "constructor" property in your `extend` definition), or defaulted
-    // by us to simply call the parent's constructor.
-    if (protoProps && protoProps.hasOwnProperty('constructor')) {
-      child = protoProps.constructor;
-    } else {
-      child = function(){ parent.apply(this, arguments); };
-    }
-
-    // Inherit class (static) properties from parent.
-    _.extend(child, parent);
-
-    // Set the prototype chain to inherit from `parent`, without calling
-    // `parent`'s constructor function.
-    ctor.prototype = parent.prototype;
-    child.prototype = new ctor();
-
-    // Add prototype properties (instance properties) to the subclass,
-    // if supplied.
-    if (protoProps) _.extend(child.prototype, protoProps);
-
-    // Add static properties to the constructor function, if supplied.
-    if (staticProps) _.extend(child, staticProps);
-
-    // Correctly set child's `prototype.constructor`.
-    child.prototype.constructor = child;
-
-    // Set a convenience property in case the parent's prototype is needed later.
-    child.__super__ = parent.prototype;
-
-    return child;
-  };
-
-  // Helper function to get a value from a Backbone object as a property
-  // or as a function.
-  var getValue = function(object, prop) {
-    if (!(object && object[prop])) return null;
-    return _.isFunction(object[prop]) ? object[prop]() : object[prop];
-  };
-
-  // Throw an error when a URL is needed, and none is supplied.
-  var urlError = function() {
-    throw new Error('A "url" property or function must be specified');
-  };
-
-}).call(this);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/lib/bootstrap.min.js
----------------------------------------------------------------------
diff --git a/portal/js/lib/bootstrap.min.js b/portal/js/lib/bootstrap.min.js
deleted file mode 100644
index 63e4610..0000000
--- a/portal/js/lib/bootstrap.min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/**
-* Bootstrap.js by @fat & @mdo
-* plugins: bootstrap-transition.js, bootstrap-modal.js, bootstrap-dropdown.js, bootstrap-scrollspy.js, bootstrap-tab.js, bootstrap-tooltip.js, bootstrap-popover.js, bootstrap-alert.js, bootstrap-button.js, bootstrap-collapse.js, bootstrap-carousel.js, bootstrap-typeahead.js
-* Copyright 2012 Twitter, Inc.
-* http://www.apache.org/licenses/LICENSE-2.0.txt
-*/
-!function(a){a(function(){"use strict",a.support.transition=function(){var b=document.body||document.documentElement,c=b.style,d=c.transition!==undefined||c.WebkitTransition!==undefined||c.MozTransition!==undefined||c.MsTransition!==undefined||c.OTransition!==undefined;return d&&{end:function(){var b="TransitionEnd";return a.browser.webkit?b="webkitTransitionEnd":a.browser.mozilla?b="transitionend":a.browser.opera&&(b="oTransitionEnd"),b}()}}()})}(window.jQuery),!function(a){function c(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),d.call(b)},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),d.call(b)})}function d(a){this.$element.hide().trigger("hidden"),e.call(this)}function e(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a('<div class="modal-backdrop '+d+'" />').appendTo(document.body),this.options.backdrop!="static"&&this.$backdr
 op.click(a.proxy(this.hide,this)),e&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),e?this.$backdrop.one(a.support.transition.end,b):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,a.proxy(f,this)):f.call(this)):b&&b()}function f(){this.$backdrop.remove(),this.$backdrop=null}function g(){var b=this;this.isShown&&this.options.keyboard?a(document).on("keyup.dismiss.modal",function(a){a.which==27&&b.hide()}):this.isShown||a(document).off("keyup.dismiss.modal")}"use strict";var b=function(b,c){this.options=a.extend({},a.fn.modal.defaults,c),this.$element=a(b).delegate('[data-dismiss="modal"]',"click.dismiss.modal",a.proxy(this.hide,this))};b.prototype={constructor:b,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var b=this;if(this.isShown)return;a("body").addClass("modal-open"),this.isShown=!0,this.$element.trigger("show"),g.
 call(this),e.call(this,function(){var c=a.support.transition&&b.$element.hasClass("fade");!b.$element.parent().length&&b.$element.appendTo(document.body),b.$element.show(),c&&b.$element[0].offsetWidth,b.$element.addClass("in"),c?b.$element.one(a.support.transition.end,function(){b.$element.trigger("shown")}):b.$element.trigger("shown")})},hide:function(b){b&&b.preventDefault();if(!this.isShown)return;var e=this;this.isShown=!1,a("body").removeClass("modal-open"),g.call(this),this.$element.trigger("hide").removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?c.call(this):d.call(this)}},a.fn.modal=function(c){return this.each(function(){var d=a(this),e=d.data("modal"),f=typeof c=="object"&&c;e||d.data("modal",e=new b(this,f)),typeof c=="string"?e[c]():e.show()})},a.fn.modal.defaults={backdrop:!0,keyboard:!0},a.fn.modal.Constructor=b,a(function(){a("body").on("click.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr
 ("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({},e.data(),c.data());b.preventDefault(),e.modal(f)})})}(window.jQuery),!function(a){function d(){a(b).parent().removeClass("open")}"use strict";var b='[data-toggle="dropdown"]',c=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(b){var c=a(this),e=c.attr("data-target"),f,g;return e||(e=c.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,"")),f=a(e),f.length||(f=c.parent()),g=f.hasClass("open"),d(),!g&&f.toggleClass("open"),!1}},a.fn.dropdown=function(b){return this.each(function(){var d=a(this),e=d.data("dropdown");e||d.data("dropdown",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.dropdown.Constructor=c,a(function(){a("html").on("click.dropdown.data-api",d),a("body").on("click.dropdown.data-api",b,c.prototype.toggle)})}(window.jQuery),!function(a){function b(b
 ,c){var d=a.proxy(this.process,this),e=a(b).is("body")?a(window):a(b),f;this.options=a.extend({},a.fn.scrollspy.defaults,c),this.$scrollElement=e.on("scroll.scroll.data-api",d),this.selector=(this.options.target||(f=a(b).attr("href"))&&f.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=a("body").on("click.scroll.data-api",this.selector,d),this.refresh(),this.process()}"use strict",b.prototype={constructor:b,refresh:function(){this.targets=this.$body.find(this.selector).map(function(){var b=a(this).attr("href");return/^#\w/.test(b)&&a(b).length?b:null}),this.offsets=a.map(this.targets,function(b){return a(b).position().top})},process:function(){var a=this.$scrollElement.scrollTop()+this.options.offset,b=this.offsets,c=this.targets,d=this.activeTarget,e;for(e=b.length;e--;)d!=c[e]&&a>=b[e]&&(!b[e+1]||a<=b[e+1])&&this.activate(c[e])},activate:function(a){var b;this.activeTarget=a,this.$body.find(this.selector).parent(".active").removeClass("active"),b=this.$body.find(this.se
 lector+'[href="'+a+'"]').parent("li").addClass("active"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active")}},a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("scrollspy"),f=typeof c=="object"&&c;e||d.data("scrollspy",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.defaults={offset:10},a(function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),!function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype={constructor:b,show:function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target"),e,f;d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,""));if(b.parent("li").hasClass("active"))return;e=c.find(".active a").last()[0],b.trigger({type:"show",relatedTarget:e}),f=a(d),this.activate(b.parent("li"),c),this.activate(f,f.parent(),function(){b.trigger({type:"shown",relatedTarget:e})})},activate:function(b
 ,c,d){function g(){e.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),f?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var e=c.find("> .active"),f=d&&a.support.transition&&e.hasClass("fade");f?e.one(a.support.transition.end,g):g(),e.removeClass("in")}},a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("tab");e||d.data("tab",e=new b(this)),typeof c=="string"&&e[c]()})},a.fn.tab.Constructor=b,a(function(){a("body").on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})})}(window.jQuery),!function(a){"use strict";var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f;this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,this.options.trigger!="manual"&&(e=this.options.trigger=="hover"?"mouse
 enter":"focus",f=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(e,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f,this.options.selector,a.proxy(this.leave,this))),this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,b,this.$element.data()),b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);!c.options.delay||!c.options.delay.show?c.show():(c.hoverState="in",setTimeout(function(){c.hoverState=="in"&&c.show()},c.options.delay.show))},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);!c.options.delay||!c.options.delay.hide?c.hide():(c.hoverState="out",setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide))},show:function(){var a,b,c,d,e,f,g;if(this.hasContent()&&
 this.enabled){a=this.tip(),this.setContent(),this.options.animation&&a.addClass("fade"),f=typeof this.options.placement=="function"?this.options.placement.call(this,a[0],this.$element[0]):this.options.placement,b=/in/.test(f),a.remove().css({top:0,left:0,display:"block"}).appendTo(b?this.$element:document.body),c=this.getPosition(b),d=a[0].offsetWidth,e=a[0].offsetHeight;switch(b?f.split(" ")[1]:f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}a.css(g).addClass(f).addClass("in")}},setContent:function(){var a=this.tip();a.find(".tooltip-inner").html(this.getTitle()),a.removeClass("fade in top bottom left right")},hide:function(){function d(){var b=setTimeout(function(){c.off(a.support.transition.end).remove()},500);c.one(a.support.transition.end,function(){clearTimeout(b),c.remove()})}v
 ar b=this,c=this.tip();c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d():c.remove()},fixTitle:function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(b){return a.extend({},b?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title),a=a.toString().replace(/(^\s*|\s*$)/,""),a},tip:function(){return this.$tip=this.$tip||a(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function
 (){this[this.tip().hasClass("in")?"hide":"show"]()}},a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f=typeof c=="object"&&c;e||d.data("tooltip",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,delay:0,selector:!1,placement:"top",trigger:"hover",title:"",template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'}}(window.jQuery),!function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype,{constructor:b,setContent:function(){var b=this.tip(),c=this.getTitle(),d=this.getContent();b.find(".popover-title")[a.type(c)=="object"?"append":"html"](c),b.find(".popover-content > *")[a.type(d)=="object"?"append":"html"](d),b.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var a,b=this.$element,c=th
 is.options;return a=b.attr("data-content")||(typeof c.content=="function"?c.content.call(b[0]):c.content),a=a.toString().replace(/(^\s*|\s*$)/,""),a},tip:function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip}}),a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("popover"),f=typeof c=="object"&&c;e||d.data("popover",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.defaults=a.extend({},a.fn.tooltip.defaults,{placement:"right",content:"",template:'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'})}(window.jQuery),!function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype={constructor:c,close:function(b){function f(){e.remove(),e.trigger("closed")}var c=a(this),d=c.attr("data-target"),e;d||(d=c.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"
 ")),e=a(d),e.trigger("close"),b&&b.preventDefault(),e.length||(e=c.hasClass("alert")?c:c.parent()),e.removeClass("in"),a.support.transition&&e.hasClass("fade")?e.on(a.support.transition.end,f):f()}},a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.alert.Constructor=c,a(function(){a("body").on("click.alert.data-api",b,c.prototype.close)})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype={constructor:b,setState:function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){a=="loadingText"?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},toggle:function(){var a=this.$element.parent('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active")
 ,this.$element.toggleClass("active")}},a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f=typeof c=="object"&&c;e||d.data("button",e=new b(this,f)),c=="toggle"?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a(function(){a("body").on("click.button.data-api","[data-toggle^=button]",function(b){a(b.target).button("toggle")})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find(".in"),e;d&&d.length&&(e=d.data("collapse"),d.collapse("hide"),e||d.data("collapse",null)),this.$element[b](0),this.transition
 ("addClass","show","shown"),this.$element[b](this.$element[0][c])},hide:function(){var a=this.dimension();this.reset(this.$element[a]()),this.transition("removeClass","hide","hidden"),this.$element[a](0)},reset:function(a){var b=this.dimension();this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element.addClass("collapse")},transition:function(b,c,d){var e=this,f=function(){c=="show"&&e.reset(),e.$element.trigger(d)};this.$element.trigger(c)[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=typeof c=="object"&&c;e||d.data("collapse",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a(function(){a("body").on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c=a
 (this),d,e=c.attr("data-target")||b.preventDefault()||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":c.data();a(e).collapse(f)})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.carousel.defaults,c),this.options.slide&&this.slide(this.options.slide)};b.prototype={cycle:function(){return this.interval=setInterval(a.proxy(this.next,this),this.options.interval),this},to:function(b){var c=this.$element.find(".active"),d=c.parent().children(),e=d.index(c),f=this;if(b>d.length-1||b<0)return;return this.sliding?this.$element.one("slid",function(){f.to(b)}):e==b?this.pause().cycle():this.slide(b>e?"next":"prev",a(d[b]))},pause:function(){return clearInterval(this.interval),this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(b,c){var d=this.$element.find(".active"),e=c||d[b](),f=this.interval,
 g=b=="next"?"left":"right",h=b=="next"?"first":"last",i=this;return this.sliding=!0,f&&this.pause(),e=e.length?e:this.$element.find(".item")[h](),!a.support.transition&&this.$element.hasClass("slide")?(this.$element.trigger("slide"),d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")):(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),this.$element.trigger("slide"),this.$element.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)})),f&&this.cycle(),this}},a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=typeof c=="object"&&c;e||d.data("carousel",e=new b(this,f)),typeof c=="number"?e.to(c):typeof c=="string"||(c=f.slide)?e[c]():e.cycle()})},a.fn.carousel.defaults={interval:5e3},a.fn.carousel.Constructor=b,a(function(){a("body").on("click.carousel.data-api"
 ,"[data-slide]",function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=!e.data("modal")&&a.extend({},e.data(),c.data());e.carousel(f),b.preventDefault()})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.typeahead.defaults,c),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.$menu=a(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};b.prototype={constructor:b,select:function(){var a=this.$menu.find(".active").attr("data-value");return this.$element.val(a),this.hide()},show:function(){var b=a.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:b.top+b.height,left:b.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},
 lookup:function(b){var c=this,d,e;return this.query=this.$element.val(),this.query?(d=a.grep(this.source,function(a){if(c.matcher(a))return a}),d=this.sorter(d),d.length?this.render(d.slice(0,this.options.items)).show():this.shown?this.hide():this):this.shown?this.hide():this},matcher:function(a){return~a.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(a){var b=[],c=[],d=[],e;while(e=a.shift())e.toLowerCase().indexOf(this.query.toLowerCase())?~e.indexOf(this.query)?c.push(e):d.push(e):b.push(e);return b.concat(c,d)},highlighter:function(a){return a.replace(new RegExp("("+this.query+")","ig"),function(a,b){return"<strong>"+b+"</strong>"})},render:function(b){var c=this;return b=a(b).map(function(b,d){return b=a(c.options.item).attr("data-value",d),b.find("a").html(c.highlighter(d)),b[0]}),b.first().addClass("active"),this.$menu.html(b),this},next:function(b){var c=this.$menu.find(".active").removeClass("active"),d=c.next();d.length||(d=a(this.$menu.find("li")[0])),d.
 addClass("active")},prev:function(a){var b=this.$menu.find(".active").removeClass("active"),c=b.prev();c.length||(c=this.$menu.find("li").last()),c.addClass("active")},listen:function(){this.$element.on("blur",a.proxy(this.blur,this)).on("keypress",a.proxy(this.keypress,this)).on("keyup",a.proxy(this.keyup,this)),(a.browser.webkit||a.browser.msie)&&this.$element.on("keydown",a.proxy(this.keypress,this)),this.$menu.on("click",a.proxy(this.click,this)).on("mouseenter","li",a.proxy(this.mouseenter,this))},keyup:function(a){a.stopPropagation(),a.preventDefault();switch(a.keyCode){case 40:case 38:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:this.hide();break;default:this.lookup()}},keypress:function(a){a.stopPropagation();if(!this.shown)return;switch(a.keyCode){case 9:case 13:case 27:a.preventDefault();break;case 38:a.preventDefault(),this.prev();break;case 40:a.preventDefault(),this.next()}},blur:function(a){var b=this;a.stopPropagation(),a.preventDefault(),set
 Timeout(function(){b.hide()},150)},click:function(a){a.stopPropagation(),a.preventDefault(),this.select()},mouseenter:function(b){this.$menu.find(".active").removeClass("active"),a(b.currentTarget).addClass("active")}},a.fn.typeahead=function(c){return this.each(function(){var d=a(this),e=d.data("typeahead"),f=typeof c=="object"&&c;e||d.data("typeahead",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>'},a.fn.typeahead.Constructor=b,a(function(){a("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(b){var c=a(this);if(c.data("typeahead"))return;b.preventDefault(),c.typeahead(c.data())})})}(window.jQuery)
\ No newline at end of file


[34/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/lib/prettify.js
----------------------------------------------------------------------
diff --git a/portal/js/lib/prettify.js b/portal/js/lib/prettify.js
deleted file mode 100644
index 037c26d..0000000
--- a/portal/js/lib/prettify.js
+++ /dev/null
@@ -1,1477 +0,0 @@
-// Copyright (C) 2006 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-
-/**
- * @fileoverview
- * some functions for browser-side pretty printing of code contained in html.
- *
- * <p>
- * For a fairly comprehensive set of languages see the
- * <a href="http://google-code-prettify.googlecode.com/svn/trunk/README.html#langs">README</a>
- * file that came with this source.  At a minimum, the lexer should work on a
- * number of languages including C and friends, Java, Python, Bash, SQL, HTML,
- * XML, CSS, Javascript, and Makefiles.  It works passably on Ruby, PHP and Awk
- * and a subset of Perl, but, because of commenting conventions, doesn't work on
- * Smalltalk, Lisp-like, or CAML-like languages without an explicit lang class.
- * <p>
- * Usage: <ol>
- * <li> include this source file in an html page via
- *   {@code <script type="text/javascript" src="/path/to/prettify.js"></script>}
- * <li> define style rules.  See the example page for examples.
- * <li> mark the {@code <pre>} and {@code <code>} tags in your source with
- *    {@code class=prettyprint.}
- *    You can also use the (html deprecated) {@code <xmp>} tag, but the pretty
- *    printer needs to do more substantial DOM manipulations to support that, so
- *    some css styles may not be preserved.
- * </ol>
- * That's it.  I wanted to keep the API as simple as possible, so there's no
- * need to specify which language the code is in, but if you wish, you can add
- * another class to the {@code <pre>} or {@code <code>} element to specify the
- * language, as in {@code <pre class="prettyprint lang-java">}.  Any class that
- * starts with "lang-" followed by a file extension, specifies the file type.
- * See the "lang-*.js" files in this directory for code that implements
- * per-language file handlers.
- * <p>
- * Change log:<br>
- * cbeust, 2006/08/22
- * <blockquote>
- *   Java annotations (start with "@") are now captured as literals ("lit")
- * </blockquote>
- * @requires console
- */
-
-// JSLint declarations
-/*global console, document, navigator, setTimeout, window */
-
-/**
- * Split {@code prettyPrint} into multiple timeouts so as not to interfere with
- * UI events.
- * If set to {@code false}, {@code prettyPrint()} is synchronous.
- */
-window['PR_SHOULD_USE_CONTINUATION'] = true;
-
-(function () {
-  // Keyword lists for various languages.
-  // We use things that coerce to strings to make them compact when minified
-  // and to defeat aggressive optimizers that fold large string constants.
-  var FLOW_CONTROL_KEYWORDS = ["break,continue,do,else,for,if,return,while"];
-  var C_KEYWORDS = [FLOW_CONTROL_KEYWORDS,"auto,case,char,const,default," + 
-      "double,enum,extern,float,goto,int,long,register,short,signed,sizeof," +
-      "static,struct,switch,typedef,union,unsigned,void,volatile"];
-  var COMMON_KEYWORDS = [C_KEYWORDS,"catch,class,delete,false,import," +
-      "new,operator,private,protected,public,this,throw,true,try,typeof"];
-  var CPP_KEYWORDS = [COMMON_KEYWORDS,"alignof,align_union,asm,axiom,bool," +
-      "concept,concept_map,const_cast,constexpr,decltype," +
-      "dynamic_cast,explicit,export,friend,inline,late_check," +
-      "mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast," +
-      "template,typeid,typename,using,virtual,where"];
-  var JAVA_KEYWORDS = [COMMON_KEYWORDS,
-      "abstract,boolean,byte,extends,final,finally,implements,import," +
-      "instanceof,null,native,package,strictfp,super,synchronized,throws," +
-      "transient"];
-  var CSHARP_KEYWORDS = [JAVA_KEYWORDS,
-      "as,base,by,checked,decimal,delegate,descending,dynamic,event," +
-      "fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock," +
-      "object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed," +
-      "stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];
-  var COFFEE_KEYWORDS = "all,and,by,catch,class,else,extends,false,finally," +
-      "for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then," +
-      "true,try,unless,until,when,while,yes";
-  var JSCRIPT_KEYWORDS = [COMMON_KEYWORDS,
-      "debugger,eval,export,function,get,null,set,undefined,var,with," +
-      "Infinity,NaN"];
-  var PERL_KEYWORDS = "caller,delete,die,do,dump,elsif,eval,exit,foreach,for," +
-      "goto,if,import,last,local,my,next,no,our,print,package,redo,require," +
-      "sub,undef,unless,until,use,wantarray,while,BEGIN,END";
-  var PYTHON_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "and,as,assert,class,def,del," +
-      "elif,except,exec,finally,from,global,import,in,is,lambda," +
-      "nonlocal,not,or,pass,print,raise,try,with,yield," +
-      "False,True,None"];
-  var RUBY_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "alias,and,begin,case,class," +
-      "def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo," +
-      "rescue,retry,self,super,then,true,undef,unless,until,when,yield," +
-      "BEGIN,END"];
-  var SH_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "case,done,elif,esac,eval,fi," +
-      "function,in,local,set,then,until"];
-  var ALL_KEYWORDS = [
-      CPP_KEYWORDS, CSHARP_KEYWORDS, JSCRIPT_KEYWORDS, PERL_KEYWORDS +
-      PYTHON_KEYWORDS, RUBY_KEYWORDS, SH_KEYWORDS];
-  var C_TYPES = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;
-
-  // token style names.  correspond to css classes
-  /**
-   * token style for a string literal
-   * @const
-   */
-  var PR_STRING = 'str';
-  /**
-   * token style for a keyword
-   * @const
-   */
-  var PR_KEYWORD = 'kwd';
-  /**
-   * token style for a comment
-   * @const
-   */
-  var PR_COMMENT = 'com';
-  /**
-   * token style for a type
-   * @const
-   */
-  var PR_TYPE = 'typ';
-  /**
-   * token style for a literal value.  e.g. 1, null, true.
-   * @const
-   */
-  var PR_LITERAL = 'lit';
-  /**
-   * token style for a punctuation string.
-   * @const
-   */
-  var PR_PUNCTUATION = 'pun';
-  /**
-   * token style for a punctuation string.
-   * @const
-   */
-  var PR_PLAIN = 'pln';
-
-  /**
-   * token style for an sgml tag.
-   * @const
-   */
-  var PR_TAG = 'tag';
-  /**
-   * token style for a markup declaration such as a DOCTYPE.
-   * @const
-   */
-  var PR_DECLARATION = 'dec';
-  /**
-   * token style for embedded source.
-   * @const
-   */
-  var PR_SOURCE = 'src';
-  /**
-   * token style for an sgml attribute name.
-   * @const
-   */
-  var PR_ATTRIB_NAME = 'atn';
-  /**
-   * token style for an sgml attribute value.
-   * @const
-   */
-  var PR_ATTRIB_VALUE = 'atv';
-
-  /**
-   * A class that indicates a section of markup that is not code, e.g. to allow
-   * embedding of line numbers within code listings.
-   * @const
-   */
-  var PR_NOCODE = 'nocode';
-
-
-
-/**
- * A set of tokens that can precede a regular expression literal in
- * javascript
- * http://web.archive.org/web/20070717142515/http://www.mozilla.org/js/language/js20/rationale/syntax.html
- * has the full list, but I've removed ones that might be problematic when
- * seen in languages that don't support regular expression literals.
- *
- * <p>Specifically, I've removed any keywords that can't precede a regexp
- * literal in a syntactically legal javascript program, and I've removed the
- * "in" keyword since it's not a keyword in many languages, and might be used
- * as a count of inches.
- *
- * <p>The link a above does not accurately describe EcmaScript rules since
- * it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works
- * very well in practice.
- *
- * @private
- * @const
- */
-var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*';
-
-// CAVEAT: this does not properly handle the case where a regular
-// expression immediately follows another since a regular expression may
-// have flags for case-sensitivity and the like.  Having regexp tokens
-// adjacent is not valid in any language I'm aware of, so I'm punting.
-// TODO: maybe style special characters inside a regexp as punctuation.
-
-
-  /**
-   * Given a group of {@link RegExp}s, returns a {@code RegExp} that globally
-   * matches the union of the sets of strings matched by the input RegExp.
-   * Since it matches globally, if the input strings have a start-of-input
-   * anchor (/^.../), it is ignored for the purposes of unioning.
-   * @param {Array.<RegExp>} regexs non multiline, non-global regexs.
-   * @return {RegExp} a global regex.
-   */
-  function combinePrefixPatterns(regexs) {
-    var capturedGroupIndex = 0;
-  
-    var needToFoldCase = false;
-    var ignoreCase = false;
-    for (var i = 0, n = regexs.length; i < n; ++i) {
-      var regex = regexs[i];
-      if (regex.ignoreCase) {
-        ignoreCase = true;
-      } else if (/[a-z]/i.test(regex.source.replace(
-                     /\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ''))) {
-        needToFoldCase = true;
-        ignoreCase = false;
-        break;
-      }
-    }
-  
-    var escapeCharToCodeUnit = {
-      'b': 8,
-      't': 9,
-      'n': 0xa,
-      'v': 0xb,
-      'f': 0xc,
-      'r': 0xd
-    };
-  
-    function decodeEscape(charsetPart) {
-      var cc0 = charsetPart.charCodeAt(0);
-      if (cc0 !== 92 /* \\ */) {
-        return cc0;
-      }
-      var c1 = charsetPart.charAt(1);
-      cc0 = escapeCharToCodeUnit[c1];
-      if (cc0) {
-        return cc0;
-      } else if ('0' <= c1 && c1 <= '7') {
-        return parseInt(charsetPart.substring(1), 8);
-      } else if (c1 === 'u' || c1 === 'x') {
-        return parseInt(charsetPart.substring(2), 16);
-      } else {
-        return charsetPart.charCodeAt(1);
-      }
-    }
-  
-    function encodeEscape(charCode) {
-      if (charCode < 0x20) {
-        return (charCode < 0x10 ? '\\x0' : '\\x') + charCode.toString(16);
-      }
-      var ch = String.fromCharCode(charCode);
-      if (ch === '\\' || ch === '-' || ch === '[' || ch === ']') {
-        ch = '\\' + ch;
-      }
-      return ch;
-    }
-  
-    function caseFoldCharset(charSet) {
-      var charsetParts = charSet.substring(1, charSet.length - 1).match(
-          new RegExp(
-              '\\\\u[0-9A-Fa-f]{4}'
-              + '|\\\\x[0-9A-Fa-f]{2}'
-              + '|\\\\[0-3][0-7]{0,2}'
-              + '|\\\\[0-7]{1,2}'
-              + '|\\\\[\\s\\S]'
-              + '|-'
-              + '|[^-\\\\]',
-              'g'));
-      var groups = [];
-      var ranges = [];
-      var inverse = charsetParts[0] === '^';
-      for (var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) {
-        var p = charsetParts[i];
-        if (/\\[bdsw]/i.test(p)) {  // Don't muck with named groups.
-          groups.push(p);
-        } else {
-          var start = decodeEscape(p);
-          var end;
-          if (i + 2 < n && '-' === charsetParts[i + 1]) {
-            end = decodeEscape(charsetParts[i + 2]);
-            i += 2;
-          } else {
-            end = start;
-          }
-          ranges.push([start, end]);
-          // If the range might intersect letters, then expand it.
-          // This case handling is too simplistic.
-          // It does not deal with non-latin case folding.
-          // It works for latin source code identifiers though.
-          if (!(end < 65 || start > 122)) {
-            if (!(end < 65 || start > 90)) {
-              ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]);
-            }
-            if (!(end < 97 || start > 122)) {
-              ranges.push([Math.max(97, start) & ~32, Math.min(end, 122) & ~32]);
-            }
-          }
-        }
-      }
-  
-      // [[1, 10], [3, 4], [8, 12], [14, 14], [16, 16], [17, 17]]
-      // -> [[1, 12], [14, 14], [16, 17]]
-      ranges.sort(function (a, b) { return (a[0] - b[0]) || (b[1]  - a[1]); });
-      var consolidatedRanges = [];
-      var lastRange = [NaN, NaN];
-      for (var i = 0; i < ranges.length; ++i) {
-        var range = ranges[i];
-        if (range[0] <= lastRange[1] + 1) {
-          lastRange[1] = Math.max(lastRange[1], range[1]);
-        } else {
-          consolidatedRanges.push(lastRange = range);
-        }
-      }
-  
-      var out = ['['];
-      if (inverse) { out.push('^'); }
-      out.push.apply(out, groups);
-      for (var i = 0; i < consolidatedRanges.length; ++i) {
-        var range = consolidatedRanges[i];
-        out.push(encodeEscape(range[0]));
-        if (range[1] > range[0]) {
-          if (range[1] + 1 > range[0]) { out.push('-'); }
-          out.push(encodeEscape(range[1]));
-        }
-      }
-      out.push(']');
-      return out.join('');
-    }
-  
-    function allowAnywhereFoldCaseAndRenumberGroups(regex) {
-      // Split into character sets, escape sequences, punctuation strings
-      // like ('(', '(?:', ')', '^'), and runs of characters that do not
-      // include any of the above.
-      var parts = regex.source.match(
-          new RegExp(
-              '(?:'
-              + '\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]'  // a character set
-              + '|\\\\u[A-Fa-f0-9]{4}'  // a unicode escape
-              + '|\\\\x[A-Fa-f0-9]{2}'  // a hex escape
-              + '|\\\\[0-9]+'  // a back-reference or octal escape
-              + '|\\\\[^ux0-9]'  // other escape sequence
-              + '|\\(\\?[:!=]'  // start of a non-capturing group
-              + '|[\\(\\)\\^]'  // start/emd of a group, or line start
-              + '|[^\\x5B\\x5C\\(\\)\\^]+'  // run of other characters
-              + ')',
-              'g'));
-      var n = parts.length;
-  
-      // Maps captured group numbers to the number they will occupy in
-      // the output or to -1 if that has not been determined, or to
-      // undefined if they need not be capturing in the output.
-      var capturedGroups = [];
-  
-      // Walk over and identify back references to build the capturedGroups
-      // mapping.
-      for (var i = 0, groupIndex = 0; i < n; ++i) {
-        var p = parts[i];
-        if (p === '(') {
-          // groups are 1-indexed, so max group index is count of '('
-          ++groupIndex;
-        } else if ('\\' === p.charAt(0)) {
-          var decimalValue = +p.substring(1);
-          if (decimalValue && decimalValue <= groupIndex) {
-            capturedGroups[decimalValue] = -1;
-          }
-        }
-      }
-  
-      // Renumber groups and reduce capturing groups to non-capturing groups
-      // where possible.
-      for (var i = 1; i < capturedGroups.length; ++i) {
-        if (-1 === capturedGroups[i]) {
-          capturedGroups[i] = ++capturedGroupIndex;
-        }
-      }
-      for (var i = 0, groupIndex = 0; i < n; ++i) {
-        var p = parts[i];
-        if (p === '(') {
-          ++groupIndex;
-          if (capturedGroups[groupIndex] === undefined) {
-            parts[i] = '(?:';
-          }
-        } else if ('\\' === p.charAt(0)) {
-          var decimalValue = +p.substring(1);
-          if (decimalValue && decimalValue <= groupIndex) {
-            parts[i] = '\\' + capturedGroups[groupIndex];
-          }
-        }
-      }
-  
-      // Remove any prefix anchors so that the output will match anywhere.
-      // ^^ really does mean an anchored match though.
-      for (var i = 0, groupIndex = 0; i < n; ++i) {
-        if ('^' === parts[i] && '^' !== parts[i + 1]) { parts[i] = ''; }
-      }
-  
-      // Expand letters to groups to handle mixing of case-sensitive and
-      // case-insensitive patterns if necessary.
-      if (regex.ignoreCase && needToFoldCase) {
-        for (var i = 0; i < n; ++i) {
-          var p = parts[i];
-          var ch0 = p.charAt(0);
-          if (p.length >= 2 && ch0 === '[') {
-            parts[i] = caseFoldCharset(p);
-          } else if (ch0 !== '\\') {
-            // TODO: handle letters in numeric escapes.
-            parts[i] = p.replace(
-                /[a-zA-Z]/g,
-                function (ch) {
-                  var cc = ch.charCodeAt(0);
-                  return '[' + String.fromCharCode(cc & ~32, cc | 32) + ']';
-                });
-          }
-        }
-      }
-  
-      return parts.join('');
-    }
-  
-    var rewritten = [];
-    for (var i = 0, n = regexs.length; i < n; ++i) {
-      var regex = regexs[i];
-      if (regex.global || regex.multiline) { throw new Error('' + regex); }
-      rewritten.push(
-          '(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex) + ')');
-    }
-  
-    return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g');
-  }
-
-
-  /**
-   * Split markup into a string of source code and an array mapping ranges in
-   * that string to the text nodes in which they appear.
-   *
-   * <p>
-   * The HTML DOM structure:</p>
-   * <pre>
-   * (Element   "p"
-   *   (Element "b"
-   *     (Text  "print "))       ; #1
-   *   (Text    "'Hello '")      ; #2
-   *   (Element "br")            ; #3
-   *   (Text    "  + 'World';")) ; #4
-   * </pre>
-   * <p>
-   * corresponds to the HTML
-   * {@code <p><b>print </b>'Hello '<br>  + 'World';</p>}.</p>
-   *
-   * <p>
-   * It will produce the output:</p>
-   * <pre>
-   * {
-   *   sourceCode: "print 'Hello '\n  + 'World';",
-   *   //                 1         2
-   *   //       012345678901234 5678901234567
-   *   spans: [0, #1, 6, #2, 14, #3, 15, #4]
-   * }
-   * </pre>
-   * <p>
-   * where #1 is a reference to the {@code "print "} text node above, and so
-   * on for the other text nodes.
-   * </p>
-   *
-   * <p>
-   * The {@code} spans array is an array of pairs.  Even elements are the start
-   * indices of substrings, and odd elements are the text nodes (or BR elements)
-   * that contain the text for those substrings.
-   * Substrings continue until the next index or the end of the source.
-   * </p>
-   *
-   * @param {Node} node an HTML DOM subtree containing source-code.
-   * @return {Object} source code and the text nodes in which they occur.
-   */
-  function extractSourceSpans(node) {
-    var nocode = /(?:^|\s)nocode(?:\s|$)/;
-  
-    var chunks = [];
-    var length = 0;
-    var spans = [];
-    var k = 0;
-  
-    var whitespace;
-    if (node.currentStyle) {
-      whitespace = node.currentStyle.whiteSpace;
-    } else if (window.getComputedStyle) {
-      whitespace = document.defaultView.getComputedStyle(node, null)
-          .getPropertyValue('white-space');
-    }
-    var isPreformatted = whitespace && 'pre' === whitespace.substring(0, 3);
-  
-    function walk(node) {
-      switch (node.nodeType) {
-        case 1:  // Element
-          if (nocode.test(node.className)) { return; }
-          for (var child = node.firstChild; child; child = child.nextSibling) {
-            walk(child);
-          }
-          var nodeName = node.nodeName;
-          if ('BR' === nodeName || 'LI' === nodeName) {
-            chunks[k] = '\n';
-            spans[k << 1] = length++;
-            spans[(k++ << 1) | 1] = node;
-          }
-          break;
-        case 3: case 4:  // Text
-          var text = node.nodeValue;
-          if (text.length) {
-            if (!isPreformatted) {
-              text = text.replace(/[ \t\r\n]+/g, ' ');
-            } else {
-              text = text.replace(/\r\n?/g, '\n');  // Normalize newlines.
-            }
-            // TODO: handle tabs here?
-            chunks[k] = text;
-            spans[k << 1] = length;
-            length += text.length;
-            spans[(k++ << 1) | 1] = node;
-          }
-          break;
-      }
-    }
-  
-    walk(node);
-  
-    return {
-      sourceCode: chunks.join('').replace(/\n$/, ''),
-      spans: spans
-    };
-  }
-
-
-  /**
-   * Apply the given language handler to sourceCode and add the resulting
-   * decorations to out.
-   * @param {number} basePos the index of sourceCode within the chunk of source
-   *    whose decorations are already present on out.
-   */
-  function appendDecorations(basePos, sourceCode, langHandler, out) {
-    if (!sourceCode) { return; }
-    var job = {
-      sourceCode: sourceCode,
-      basePos: basePos
-    };
-    langHandler(job);
-    out.push.apply(out, job.decorations);
-  }
-
-  var notWs = /\S/;
-
-  /**
-   * Given an element, if it contains only one child element and any text nodes
-   * it contains contain only space characters, return the sole child element.
-   * Otherwise returns undefined.
-   * <p>
-   * This is meant to return the CODE element in {@code <pre><code ...>} when
-   * there is a single child element that contains all the non-space textual
-   * content, but not to return anything where there are multiple child elements
-   * as in {@code <pre><code>...</code><code>...</code></pre>} or when there
-   * is textual content.
-   */
-  function childContentWrapper(element) {
-    var wrapper = undefined;
-    for (var c = element.firstChild; c; c = c.nextSibling) {
-      var type = c.nodeType;
-      wrapper = (type === 1)  // Element Node
-          ? (wrapper ? element : c)
-          : (type === 3)  // Text Node
-          ? (notWs.test(c.nodeValue) ? element : wrapper)
-          : wrapper;
-    }
-    return wrapper === element ? undefined : wrapper;
-  }
-
-  /** Given triples of [style, pattern, context] returns a lexing function,
-    * The lexing function interprets the patterns to find token boundaries and
-    * returns a decoration list of the form
-    * [index_0, style_0, index_1, style_1, ..., index_n, style_n]
-    * where index_n is an index into the sourceCode, and style_n is a style
-    * constant like PR_PLAIN.  index_n-1 <= index_n, and style_n-1 applies to
-    * all characters in sourceCode[index_n-1:index_n].
-    *
-    * The stylePatterns is a list whose elements have the form
-    * [style : string, pattern : RegExp, DEPRECATED, shortcut : string].
-    *
-    * Style is a style constant like PR_PLAIN, or can be a string of the
-    * form 'lang-FOO', where FOO is a language extension describing the
-    * language of the portion of the token in $1 after pattern executes.
-    * E.g., if style is 'lang-lisp', and group 1 contains the text
-    * '(hello (world))', then that portion of the token will be passed to the
-    * registered lisp handler for formatting.
-    * The text before and after group 1 will be restyled using this decorator
-    * so decorators should take care that this doesn't result in infinite
-    * recursion.  For example, the HTML lexer rule for SCRIPT elements looks
-    * something like ['lang-js', /<[s]cript>(.+?)<\/script>/].  This may match
-    * '<script>foo()<\/script>', which would cause the current decorator to
-    * be called with '<script>' which would not match the same rule since
-    * group 1 must not be empty, so it would be instead styled as PR_TAG by
-    * the generic tag rule.  The handler registered for the 'js' extension would
-    * then be called with 'foo()', and finally, the current decorator would
-    * be called with '<\/script>' which would not match the original rule and
-    * so the generic tag rule would identify it as a tag.
-    *
-    * Pattern must only match prefixes, and if it matches a prefix, then that
-    * match is considered a token with the same style.
-    *
-    * Context is applied to the last non-whitespace, non-comment token
-    * recognized.
-    *
-    * Shortcut is an optional string of characters, any of which, if the first
-    * character, gurantee that this pattern and only this pattern matches.
-    *
-    * @param {Array} shortcutStylePatterns patterns that always start with
-    *   a known character.  Must have a shortcut string.
-    * @param {Array} fallthroughStylePatterns patterns that will be tried in
-    *   order if the shortcut ones fail.  May have shortcuts.
-    *
-    * @return {function (Object)} a
-    *   function that takes source code and returns a list of decorations.
-    */
-  function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) {
-    var shortcuts = {};
-    var tokenizer;
-    (function () {
-      var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns);
-      var allRegexs = [];
-      var regexKeys = {};
-      for (var i = 0, n = allPatterns.length; i < n; ++i) {
-        var patternParts = allPatterns[i];
-        var shortcutChars = patternParts[3];
-        if (shortcutChars) {
-          for (var c = shortcutChars.length; --c >= 0;) {
-            shortcuts[shortcutChars.charAt(c)] = patternParts;
-          }
-        }
-        var regex = patternParts[1];
-        var k = '' + regex;
-        if (!regexKeys.hasOwnProperty(k)) {
-          allRegexs.push(regex);
-          regexKeys[k] = null;
-        }
-      }
-      allRegexs.push(/[\0-\uffff]/);
-      tokenizer = combinePrefixPatterns(allRegexs);
-    })();
-
-    var nPatterns = fallthroughStylePatterns.length;
-
-    /**
-     * Lexes job.sourceCode and produces an output array job.decorations of
-     * style classes preceded by the position at which they start in
-     * job.sourceCode in order.
-     *
-     * @param {Object} job an object like <pre>{
-     *    sourceCode: {string} sourceText plain text,
-     *    basePos: {int} position of job.sourceCode in the larger chunk of
-     *        sourceCode.
-     * }</pre>
-     */
-    var decorate = function (job) {
-      var sourceCode = job.sourceCode, basePos = job.basePos;
-      /** Even entries are positions in source in ascending order.  Odd enties
-        * are style markers (e.g., PR_COMMENT) that run from that position until
-        * the end.
-        * @type {Array.<number|string>}
-        */
-      var decorations = [basePos, PR_PLAIN];
-      var pos = 0;  // index into sourceCode
-      var tokens = sourceCode.match(tokenizer) || [];
-      var styleCache = {};
-
-      for (var ti = 0, nTokens = tokens.length; ti < nTokens; ++ti) {
-        var token = tokens[ti];
-        var style = styleCache[token];
-        var match = void 0;
-
-        var isEmbedded;
-        if (typeof style === 'string') {
-          isEmbedded = false;
-        } else {
-          var patternParts = shortcuts[token.charAt(0)];
-          if (patternParts) {
-            match = token.match(patternParts[1]);
-            style = patternParts[0];
-          } else {
-            for (var i = 0; i < nPatterns; ++i) {
-              patternParts = fallthroughStylePatterns[i];
-              match = token.match(patternParts[1]);
-              if (match) {
-                style = patternParts[0];
-                break;
-              }
-            }
-
-            if (!match) {  // make sure that we make progress
-              style = PR_PLAIN;
-            }
-          }
-
-          isEmbedded = style.length >= 5 && 'lang-' === style.substring(0, 5);
-          if (isEmbedded && !(match && typeof match[1] === 'string')) {
-            isEmbedded = false;
-            style = PR_SOURCE;
-          }
-
-          if (!isEmbedded) { styleCache[token] = style; }
-        }
-
-        var tokenStart = pos;
-        pos += token.length;
-
-        if (!isEmbedded) {
-          decorations.push(basePos + tokenStart, style);
-        } else {  // Treat group 1 as an embedded block of source code.
-          var embeddedSource = match[1];
-          var embeddedSourceStart = token.indexOf(embeddedSource);
-          var embeddedSourceEnd = embeddedSourceStart + embeddedSource.length;
-          if (match[2]) {
-            // If embeddedSource can be blank, then it would match at the
-            // beginning which would cause us to infinitely recurse on the
-            // entire token, so we catch the right context in match[2].
-            embeddedSourceEnd = token.length - match[2].length;
-            embeddedSourceStart = embeddedSourceEnd - embeddedSource.length;
-          }
-          var lang = style.substring(5);
-          // Decorate the left of the embedded source
-          appendDecorations(
-              basePos + tokenStart,
-              token.substring(0, embeddedSourceStart),
-              decorate, decorations);
-          // Decorate the embedded source
-          appendDecorations(
-              basePos + tokenStart + embeddedSourceStart,
-              embeddedSource,
-              langHandlerForExtension(lang, embeddedSource),
-              decorations);
-          // Decorate the right of the embedded section
-          appendDecorations(
-              basePos + tokenStart + embeddedSourceEnd,
-              token.substring(embeddedSourceEnd),
-              decorate, decorations);
-        }
-      }
-      job.decorations = decorations;
-    };
-    return decorate;
-  }
-
-  /** returns a function that produces a list of decorations from source text.
-    *
-    * This code treats ", ', and ` as string delimiters, and \ as a string
-    * escape.  It does not recognize perl's qq() style strings.
-    * It has no special handling for double delimiter escapes as in basic, or
-    * the tripled delimiters used in python, but should work on those regardless
-    * although in those cases a single string literal may be broken up into
-    * multiple adjacent string literals.
-    *
-    * It recognizes C, C++, and shell style comments.
-    *
-    * @param {Object} options a set of optional parameters.
-    * @return {function (Object)} a function that examines the source code
-    *     in the input job and builds the decoration list.
-    */
-  function sourceDecorator(options) {
-    var shortcutStylePatterns = [], fallthroughStylePatterns = [];
-    if (options['tripleQuotedStrings']) {
-      // '''multi-line-string''', 'single-line-string', and double-quoted
-      shortcutStylePatterns.push(
-          [PR_STRING,  /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
-           null, '\'"']);
-    } else if (options['multiLineStrings']) {
-      // 'multi-line-string', "multi-line-string"
-      shortcutStylePatterns.push(
-          [PR_STRING,  /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,
-           null, '\'"`']);
-    } else {
-      // 'single-line-string', "single-line-string"
-      shortcutStylePatterns.push(
-          [PR_STRING,
-           /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,
-           null, '"\'']);
-    }
-    if (options['verbatimStrings']) {
-      // verbatim-string-literal production from the C# grammar.  See issue 93.
-      fallthroughStylePatterns.push(
-          [PR_STRING, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
-    }
-    var hc = options['hashComments'];
-    if (hc) {
-      if (options['cStyleComments']) {
-        if (hc > 1) {  // multiline hash comments
-          shortcutStylePatterns.push(
-              [PR_COMMENT, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, '#']);
-        } else {
-          // Stop C preprocessor declarations at an unclosed open comment
-          shortcutStylePatterns.push(
-              [PR_COMMENT, /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,
-               null, '#']);
-        }
-        fallthroughStylePatterns.push(
-            [PR_STRING,
-             /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,
-             null]);
-      } else {
-        shortcutStylePatterns.push([PR_COMMENT, /^#[^\r\n]*/, null, '#']);
-      }
-    }
-    if (options['cStyleComments']) {
-      fallthroughStylePatterns.push([PR_COMMENT, /^\/\/[^\r\n]*/, null]);
-      fallthroughStylePatterns.push(
-          [PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
-    }
-    if (options['regexLiterals']) {
-      /**
-       * @const
-       */
-      var REGEX_LITERAL = (
-          // A regular expression literal starts with a slash that is
-          // not followed by * or / so that it is not confused with
-          // comments.
-          '/(?=[^/*])'
-          // and then contains any number of raw characters,
-          + '(?:[^/\\x5B\\x5C]'
-          // escape sequences (\x5C),
-          +    '|\\x5C[\\s\\S]'
-          // or non-nesting character sets (\x5B\x5D);
-          +    '|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+'
-          // finally closed by a /.
-          + '/');
-      fallthroughStylePatterns.push(
-          ['lang-regex',
-           new RegExp('^' + REGEXP_PRECEDER_PATTERN + '(' + REGEX_LITERAL + ')')
-           ]);
-    }
-
-    var types = options['types'];
-    if (types) {
-      fallthroughStylePatterns.push([PR_TYPE, types]);
-    }
-
-    var keywords = ("" + options['keywords']).replace(/^ | $/g, '');
-    if (keywords.length) {
-      fallthroughStylePatterns.push(
-          [PR_KEYWORD,
-           new RegExp('^(?:' + keywords.replace(/[\s,]+/g, '|') + ')\\b'),
-           null]);
-    }
-
-    shortcutStylePatterns.push([PR_PLAIN,       /^\s+/, null, ' \r\n\t\xA0']);
-    fallthroughStylePatterns.push(
-        // TODO(mikesamuel): recognize non-latin letters and numerals in idents
-        [PR_LITERAL,     /^@[a-z_$][a-z_$@0-9]*/i, null],
-        [PR_TYPE,        /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null],
-        [PR_PLAIN,       /^[a-z_$][a-z_$@0-9]*/i, null],
-        [PR_LITERAL,
-         new RegExp(
-             '^(?:'
-             // A hex number
-             + '0x[a-f0-9]+'
-             // or an octal or decimal number,
-             + '|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)'
-             // possibly in scientific notation
-             + '(?:e[+\\-]?\\d+)?'
-             + ')'
-             // with an optional modifier like UL for unsigned long
-             + '[a-z]*', 'i'),
-         null, '0123456789'],
-        // Don't treat escaped quotes in bash as starting strings.  See issue 144.
-        [PR_PLAIN,       /^\\[\s\S]?/, null],
-        [PR_PUNCTUATION, /^.[^\s\w\.$@\'\"\`\/\#\\]*/, null]);
-
-    return createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns);
-  }
-
-  var decorateSource = sourceDecorator({
-        'keywords': ALL_KEYWORDS,
-        'hashComments': true,
-        'cStyleComments': true,
-        'multiLineStrings': true,
-        'regexLiterals': true
-      });
-
-  /**
-   * Given a DOM subtree, wraps it in a list, and puts each line into its own
-   * list item.
-   *
-   * @param {Node} node modified in place.  Its content is pulled into an
-   *     HTMLOListElement, and each line is moved into a separate list item.
-   *     This requires cloning elements, so the input might not have unique
-   *     IDs after numbering.
-   */
-  function numberLines(node, opt_startLineNum) {
-    var nocode = /(?:^|\s)nocode(?:\s|$)/;
-    var lineBreak = /\r\n?|\n/;
-  
-    var document = node.ownerDocument;
-  
-    var whitespace;
-    if (node.currentStyle) {
-      whitespace = node.currentStyle.whiteSpace;
-    } else if (window.getComputedStyle) {
-      whitespace = document.defaultView.getComputedStyle(node, null)
-          .getPropertyValue('white-space');
-    }
-    // If it's preformatted, then we need to split lines on line breaks
-    // in addition to <BR>s.
-    var isPreformatted = whitespace && 'pre' === whitespace.substring(0, 3);
-  
-    var li = document.createElement('LI');
-    while (node.firstChild) {
-      li.appendChild(node.firstChild);
-    }
-    // An array of lines.  We split below, so this is initialized to one
-    // un-split line.
-    var listItems = [li];
-  
-    function walk(node) {
-      switch (node.nodeType) {
-        case 1:  // Element
-          if (nocode.test(node.className)) { break; }
-          if ('BR' === node.nodeName) {
-            breakAfter(node);
-            // Discard the <BR> since it is now flush against a </LI>.
-            if (node.parentNode) {
-              node.parentNode.removeChild(node);
-            }
-          } else {
-            for (var child = node.firstChild; child; child = child.nextSibling) {
-              walk(child);
-            }
-          }
-          break;
-        case 3: case 4:  // Text
-          if (isPreformatted) {
-            var text = node.nodeValue;
-            var match = text.match(lineBreak);
-            if (match) {
-              var firstLine = text.substring(0, match.index);
-              node.nodeValue = firstLine;
-              var tail = text.substring(match.index + match[0].length);
-              if (tail) {
-                var parent = node.parentNode;
-                parent.insertBefore(
-                    document.createTextNode(tail), node.nextSibling);
-              }
-              breakAfter(node);
-              if (!firstLine) {
-                // Don't leave blank text nodes in the DOM.
-                node.parentNode.removeChild(node);
-              }
-            }
-          }
-          break;
-      }
-    }
-  
-    // Split a line after the given node.
-    function breakAfter(lineEndNode) {
-      // If there's nothing to the right, then we can skip ending the line
-      // here, and move root-wards since splitting just before an end-tag
-      // would require us to create a bunch of empty copies.
-      while (!lineEndNode.nextSibling) {
-        lineEndNode = lineEndNode.parentNode;
-        if (!lineEndNode) { return; }
-      }
-  
-      function breakLeftOf(limit, copy) {
-        // Clone shallowly if this node needs to be on both sides of the break.
-        var rightSide = copy ? limit.cloneNode(false) : limit;
-        var parent = limit.parentNode;
-        if (parent) {
-          // We clone the parent chain.
-          // This helps us resurrect important styling elements that cross lines.
-          // E.g. in <i>Foo<br>Bar</i>
-          // should be rewritten to <li><i>Foo</i></li><li><i>Bar</i></li>.
-          var parentClone = breakLeftOf(parent, 1);
-          // Move the clone and everything to the right of the original
-          // onto the cloned parent.
-          var next = limit.nextSibling;
-          parentClone.appendChild(rightSide);
-          for (var sibling = next; sibling; sibling = next) {
-            next = sibling.nextSibling;
-            parentClone.appendChild(sibling);
-          }
-        }
-        return rightSide;
-      }
-  
-      var copiedListItem = breakLeftOf(lineEndNode.nextSibling, 0);
-  
-      // Walk the parent chain until we reach an unattached LI.
-      for (var parent;
-           // Check nodeType since IE invents document fragments.
-           (parent = copiedListItem.parentNode) && parent.nodeType === 1;) {
-        copiedListItem = parent;
-      }
-      // Put it on the list of lines for later processing.
-      listItems.push(copiedListItem);
-    }
-  
-    // Split lines while there are lines left to split.
-    for (var i = 0;  // Number of lines that have been split so far.
-         i < listItems.length;  // length updated by breakAfter calls.
-         ++i) {
-      walk(listItems[i]);
-    }
-  
-    // Make sure numeric indices show correctly.
-    if (opt_startLineNum === (opt_startLineNum|0)) {
-      listItems[0].setAttribute('value', opt_startLineNum);
-    }
-  
-    var ol = document.createElement('OL');
-    ol.className = 'linenums';
-    var offset = Math.max(0, ((opt_startLineNum - 1 /* zero index */)) | 0) || 0;
-    for (var i = 0, n = listItems.length; i < n; ++i) {
-      li = listItems[i];
-      // Stick a class on the LIs so that stylesheets can
-      // color odd/even rows, or any other row pattern that
-      // is co-prime with 10.
-      li.className = 'L' + ((i + offset) % 10);
-      if (!li.firstChild) {
-        li.appendChild(document.createTextNode('\xA0'));
-      }
-      ol.appendChild(li);
-    }
-  
-    node.appendChild(ol);
-  }
-
-  /**
-   * Breaks {@code job.sourceCode} around style boundaries in
-   * {@code job.decorations} and modifies {@code job.sourceNode} in place.
-   * @param {Object} job like <pre>{
-   *    sourceCode: {string} source as plain text,
-   *    spans: {Array.<number|Node>} alternating span start indices into source
-   *       and the text node or element (e.g. {@code <BR>}) corresponding to that
-   *       span.
-   *    decorations: {Array.<number|string} an array of style classes preceded
-   *       by the position at which they start in job.sourceCode in order
-   * }</pre>
-   * @private
-   */
-  function recombineTagsAndDecorations(job) {
-    var isIE = /\bMSIE\b/.test(navigator.userAgent);
-    var newlineRe = /\n/g;
-  
-    var source = job.sourceCode;
-    var sourceLength = source.length;
-    // Index into source after the last code-unit recombined.
-    var sourceIndex = 0;
-  
-    var spans = job.spans;
-    var nSpans = spans.length;
-    // Index into spans after the last span which ends at or before sourceIndex.
-    var spanIndex = 0;
-  
-    var decorations = job.decorations;
-    var nDecorations = decorations.length;
-    // Index into decorations after the last decoration which ends at or before
-    // sourceIndex.
-    var decorationIndex = 0;
-  
-    // Remove all zero-length decorations.
-    decorations[nDecorations] = sourceLength;
-    var decPos, i;
-    for (i = decPos = 0; i < nDecorations;) {
-      if (decorations[i] !== decorations[i + 2]) {
-        decorations[decPos++] = decorations[i++];
-        decorations[decPos++] = decorations[i++];
-      } else {
-        i += 2;
-      }
-    }
-    nDecorations = decPos;
-  
-    // Simplify decorations.
-    for (i = decPos = 0; i < nDecorations;) {
-      var startPos = decorations[i];
-      // Conflate all adjacent decorations that use the same style.
-      var startDec = decorations[i + 1];
-      var end = i + 2;
-      while (end + 2 <= nDecorations && decorations[end + 1] === startDec) {
-        end += 2;
-      }
-      decorations[decPos++] = startPos;
-      decorations[decPos++] = startDec;
-      i = end;
-    }
-  
-    nDecorations = decorations.length = decPos;
-  
-    var decoration = null;
-    while (spanIndex < nSpans) {
-      var spanStart = spans[spanIndex];
-      var spanEnd = spans[spanIndex + 2] || sourceLength;
-  
-      var decStart = decorations[decorationIndex];
-      var decEnd = decorations[decorationIndex + 2] || sourceLength;
-  
-      var end = Math.min(spanEnd, decEnd);
-  
-      var textNode = spans[spanIndex + 1];
-      var styledText;
-      if (textNode.nodeType !== 1  // Don't muck with <BR>s or <LI>s
-          // Don't introduce spans around empty text nodes.
-          && (styledText = source.substring(sourceIndex, end))) {
-        // This may seem bizarre, and it is.  Emitting LF on IE causes the
-        // code to display with spaces instead of line breaks.
-        // Emitting Windows standard issue linebreaks (CRLF) causes a blank
-        // space to appear at the beginning of every line but the first.
-        // Emitting an old Mac OS 9 line separator makes everything spiffy.
-        if (isIE) { styledText = styledText.replace(newlineRe, '\r'); }
-        textNode.nodeValue = styledText;
-        var document = textNode.ownerDocument;
-        var span = document.createElement('SPAN');
-        span.className = decorations[decorationIndex + 1];
-        var parentNode = textNode.parentNode;
-        parentNode.replaceChild(span, textNode);
-        span.appendChild(textNode);
-        if (sourceIndex < spanEnd) {  // Split off a text node.
-          spans[spanIndex + 1] = textNode
-              // TODO: Possibly optimize by using '' if there's no flicker.
-              = document.createTextNode(source.substring(end, spanEnd));
-          parentNode.insertBefore(textNode, span.nextSibling);
-        }
-      }
-  
-      sourceIndex = end;
-  
-      if (sourceIndex >= spanEnd) {
-        spanIndex += 2;
-      }
-      if (sourceIndex >= decEnd) {
-        decorationIndex += 2;
-      }
-    }
-  }
-
-
-  /** Maps language-specific file extensions to handlers. */
-  var langHandlerRegistry = {};
-  /** Register a language handler for the given file extensions.
-    * @param {function (Object)} handler a function from source code to a list
-    *      of decorations.  Takes a single argument job which describes the
-    *      state of the computation.   The single parameter has the form
-    *      {@code {
-    *        sourceCode: {string} as plain text.
-    *        decorations: {Array.<number|string>} an array of style classes
-    *                     preceded by the position at which they start in
-    *                     job.sourceCode in order.
-    *                     The language handler should assigned this field.
-    *        basePos: {int} the position of source in the larger source chunk.
-    *                 All positions in the output decorations array are relative
-    *                 to the larger source chunk.
-    *      } }
-    * @param {Array.<string>} fileExtensions
-    */
-  function registerLangHandler(handler, fileExtensions) {
-    for (var i = fileExtensions.length; --i >= 0;) {
-      var ext = fileExtensions[i];
-      if (!langHandlerRegistry.hasOwnProperty(ext)) {
-        langHandlerRegistry[ext] = handler;
-      } else if (window['console']) {
-        console['warn']('cannot override language handler %s', ext);
-      }
-    }
-  }
-  function langHandlerForExtension(extension, source) {
-    if (!(extension && langHandlerRegistry.hasOwnProperty(extension))) {
-      // Treat it as markup if the first non whitespace character is a < and
-      // the last non-whitespace character is a >.
-      extension = /^\s*</.test(source)
-          ? 'default-markup'
-          : 'default-code';
-    }
-    return langHandlerRegistry[extension];
-  }
-  registerLangHandler(decorateSource, ['default-code']);
-  registerLangHandler(
-      createSimpleLexer(
-          [],
-          [
-           [PR_PLAIN,       /^[^<?]+/],
-           [PR_DECLARATION, /^<!\w[^>]*(?:>|$)/],
-           [PR_COMMENT,     /^<\!--[\s\S]*?(?:-\->|$)/],
-           // Unescaped content in an unknown language
-           ['lang-',        /^<\?([\s\S]+?)(?:\?>|$)/],
-           ['lang-',        /^<%([\s\S]+?)(?:%>|$)/],
-           [PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/],
-           ['lang-',        /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],
-           // Unescaped content in javascript.  (Or possibly vbscript).
-           ['lang-js',      /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],
-           // Contains unescaped stylesheet content
-           ['lang-css',     /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],
-           ['lang-in.tag',  /^(<\/?[a-z][^<>]*>)/i]
-          ]),
-      ['default-markup', 'htm', 'html', 'mxml', 'xhtml', 'xml', 'xsl']);
-  registerLangHandler(
-      createSimpleLexer(
-          [
-           [PR_PLAIN,        /^[\s]+/, null, ' \t\r\n'],
-           [PR_ATTRIB_VALUE, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, '\"\'']
-           ],
-          [
-           [PR_TAG,          /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],
-           [PR_ATTRIB_NAME,  /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
-           ['lang-uq.val',   /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],
-           [PR_PUNCTUATION,  /^[=<>\/]+/],
-           ['lang-js',       /^on\w+\s*=\s*\"([^\"]+)\"/i],
-           ['lang-js',       /^on\w+\s*=\s*\'([^\']+)\'/i],
-           ['lang-js',       /^on\w+\s*=\s*([^\"\'>\s]+)/i],
-           ['lang-css',      /^style\s*=\s*\"([^\"]+)\"/i],
-           ['lang-css',      /^style\s*=\s*\'([^\']+)\'/i],
-           ['lang-css',      /^style\s*=\s*([^\"\'>\s]+)/i]
-           ]),
-      ['in.tag']);
-  registerLangHandler(
-      createSimpleLexer([], [[PR_ATTRIB_VALUE, /^[\s\S]+/]]), ['uq.val']);
-  registerLangHandler(sourceDecorator({
-          'keywords': CPP_KEYWORDS,
-          'hashComments': true,
-          'cStyleComments': true,
-          'types': C_TYPES
-        }), ['c', 'cc', 'cpp', 'cxx', 'cyc', 'm']);
-  registerLangHandler(sourceDecorator({
-          'keywords': 'null,true,false'
-        }), ['json']);
-  registerLangHandler(sourceDecorator({
-          'keywords': CSHARP_KEYWORDS,
-          'hashComments': true,
-          'cStyleComments': true,
-          'verbatimStrings': true,
-          'types': C_TYPES
-        }), ['cs']);
-  registerLangHandler(sourceDecorator({
-          'keywords': JAVA_KEYWORDS,
-          'cStyleComments': true
-        }), ['java']);
-  registerLangHandler(sourceDecorator({
-          'keywords': SH_KEYWORDS,
-          'hashComments': true,
-          'multiLineStrings': true
-        }), ['bsh', 'csh', 'sh']);
-  registerLangHandler(sourceDecorator({
-          'keywords': PYTHON_KEYWORDS,
-          'hashComments': true,
-          'multiLineStrings': true,
-          'tripleQuotedStrings': true
-        }), ['cv', 'py']);
-  registerLangHandler(sourceDecorator({
-          'keywords': PERL_KEYWORDS,
-          'hashComments': true,
-          'multiLineStrings': true,
-          'regexLiterals': true
-        }), ['perl', 'pl', 'pm']);
-  registerLangHandler(sourceDecorator({
-          'keywords': RUBY_KEYWORDS,
-          'hashComments': true,
-          'multiLineStrings': true,
-          'regexLiterals': true
-        }), ['rb']);
-  registerLangHandler(sourceDecorator({
-          'keywords': JSCRIPT_KEYWORDS,
-          'cStyleComments': true,
-          'regexLiterals': true
-        }), ['js']);
-  registerLangHandler(sourceDecorator({
-          'keywords': COFFEE_KEYWORDS,
-          'hashComments': 3,  // ### style block comments
-          'cStyleComments': true,
-          'multilineStrings': true,
-          'tripleQuotedStrings': true,
-          'regexLiterals': true
-        }), ['coffee']);
-  registerLangHandler(createSimpleLexer([], [[PR_STRING, /^[\s\S]+/]]), ['regex']);
-
-  function applyDecorator(job) {
-    var opt_langExtension = job.langExtension;
-
-    try {
-      // Extract tags, and convert the source code to plain text.
-      var sourceAndSpans = extractSourceSpans(job.sourceNode);
-      /** Plain text. @type {string} */
-      var source = sourceAndSpans.sourceCode;
-      job.sourceCode = source;
-      job.spans = sourceAndSpans.spans;
-      job.basePos = 0;
-
-      // Apply the appropriate language handler
-      langHandlerForExtension(opt_langExtension, source)(job);
-
-      // Integrate the decorations and tags back into the source code,
-      // modifying the sourceNode in place.
-      recombineTagsAndDecorations(job);
-    } catch (e) {
-      if ('console' in window) {
-        console['log'](e && e['stack'] ? e['stack'] : e);
-      }
-    }
-  }
-
-  /**
-   * @param sourceCodeHtml {string} The HTML to pretty print.
-   * @param opt_langExtension {string} The language name to use.
-   *     Typically, a filename extension like 'cpp' or 'java'.
-   * @param opt_numberLines {number|boolean} True to number lines,
-   *     or the 1-indexed number of the first line in sourceCodeHtml.
-   */
-  function prettyPrintOne(sourceCodeHtml, opt_langExtension, opt_numberLines) {
-    var container = document.createElement('PRE');
-    // This could cause images to load and onload listeners to fire.
-    // E.g. <img onerror="alert(1337)" src="nosuchimage.png">.
-    // We assume that the inner HTML is from a trusted source.
-    container.innerHTML = sourceCodeHtml;
-    if (opt_numberLines) {
-      numberLines(container, opt_numberLines);
-    }
-
-    var job = {
-      langExtension: opt_langExtension,
-      numberLines: opt_numberLines,
-      sourceNode: container
-    };
-    applyDecorator(job);
-    return container.innerHTML;
-  }
-
-  function prettyPrint(opt_whenDone) {
-    function byTagName(tn) { return document.getElementsByTagName(tn); }
-    // fetch a list of nodes to rewrite
-    var codeSegments = [byTagName('pre'), byTagName('code'), byTagName('xmp')];
-    var elements = [];
-    for (var i = 0; i < codeSegments.length; ++i) {
-      for (var j = 0, n = codeSegments[i].length; j < n; ++j) {
-        elements.push(codeSegments[i][j]);
-      }
-    }
-    codeSegments = null;
-
-    var clock = Date;
-    if (!clock['now']) {
-      clock = { 'now': function () { return +(new Date); } };
-    }
-
-    // The loop is broken into a series of continuations to make sure that we
-    // don't make the browser unresponsive when rewriting a large page.
-    var k = 0;
-    var prettyPrintingJob;
-
-    var langExtensionRe = /\blang(?:uage)?-([\w.]+)(?!\S)/;
-    var prettyPrintRe = /\bprettyprint\b/;
-
-    function doWork() {
-      var endTime = (window['PR_SHOULD_USE_CONTINUATION'] ?
-                     clock['now']() + 250 /* ms */ :
-                     Infinity);
-      for (; k < elements.length && clock['now']() < endTime; k++) {
-        var cs = elements[k];
-        var className = cs.className;
-        if (className.indexOf('prettyprint') >= 0) {
-          // If the classes includes a language extensions, use it.
-          // Language extensions can be specified like
-          //     <pre class="prettyprint lang-cpp">
-          // the language extension "cpp" is used to find a language handler as
-          // passed to PR.registerLangHandler.
-          // HTML5 recommends that a language be specified using "language-"
-          // as the prefix instead.  Google Code Prettify supports both.
-          // http://dev.w3.org/html5/spec-author-view/the-code-element.html
-          var langExtension = className.match(langExtensionRe);
-          // Support <pre class="prettyprint"><code class="language-c">
-          var wrapper;
-          if (!langExtension && (wrapper = childContentWrapper(cs))
-              && "CODE" === wrapper.tagName) {
-            langExtension = wrapper.className.match(langExtensionRe);
-          }
-
-          if (langExtension) {
-            langExtension = langExtension[1];
-          }
-
-          // make sure this is not nested in an already prettified element
-          var nested = false;
-          for (var p = cs.parentNode; p; p = p.parentNode) {
-            if ((p.tagName === 'pre' || p.tagName === 'code' ||
-                 p.tagName === 'xmp') &&
-                p.className && p.className.indexOf('prettyprint') >= 0) {
-              nested = true;
-              break;
-            }
-          }
-          if (!nested) {
-            // Look for a class like linenums or linenums:<n> where <n> is the
-            // 1-indexed number of the first line.
-            var lineNums = cs.className.match(/\blinenums\b(?::(\d+))?/);
-            lineNums = lineNums
-                  ? lineNums[1] && lineNums[1].length ? +lineNums[1] : true
-                  : false;
-            if (lineNums) { numberLines(cs, lineNums); }
-
-            // do the pretty printing
-            prettyPrintingJob = {
-              langExtension: langExtension,
-              sourceNode: cs,
-              numberLines: lineNums
-            };
-            applyDecorator(prettyPrintingJob);
-          }
-        }
-      }
-      if (k < elements.length) {
-        // finish up in a continuation
-        setTimeout(doWork, 250);
-      } else if (opt_whenDone) {
-        opt_whenDone();
-      }
-    }
-
-    doWork();
-  }
-
-   /**
-    * Find all the {@code <pre>} and {@code <code>} tags in the DOM with
-    * {@code class=prettyprint} and prettify them.
-    *
-    * @param {Function?} opt_whenDone if specified, called when the last entry
-    *     has been finished.
-    */
-  window['prettyPrintOne'] = prettyPrintOne;
-   /**
-    * Pretty print a chunk of code.
-    *
-    * @param {string} sourceCodeHtml code as html
-    * @return {string} code as html, but prettier
-    */
-  window['prettyPrint'] = prettyPrint;
-   /**
-    * Contains functions for creating and registering new language handlers.
-    * @type {Object}
-    */
-  window['PR'] = {
-        'createSimpleLexer': createSimpleLexer,
-        'registerLangHandler': registerLangHandler,
-        'sourceDecorator': sourceDecorator,
-        'PR_ATTRIB_NAME': PR_ATTRIB_NAME,
-        'PR_ATTRIB_VALUE': PR_ATTRIB_VALUE,
-        'PR_COMMENT': PR_COMMENT,
-        'PR_DECLARATION': PR_DECLARATION,
-        'PR_KEYWORD': PR_KEYWORD,
-        'PR_LITERAL': PR_LITERAL,
-        'PR_NOCODE': PR_NOCODE,
-        'PR_PLAIN': PR_PLAIN,
-        'PR_PUNCTUATION': PR_PUNCTUATION,
-        'PR_SOURCE': PR_SOURCE,
-        'PR_STRING': PR_STRING,
-        'PR_TAG': PR_TAG,
-        'PR_TYPE': PR_TYPE
-      };
-})();

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/lib/underscore-min.js
----------------------------------------------------------------------
diff --git a/portal/js/lib/underscore-min.js b/portal/js/lib/underscore-min.js
deleted file mode 100644
index ad3a39a..0000000
--- a/portal/js/lib/underscore-min.js
+++ /dev/null
@@ -1,5 +0,0 @@
-//     Underscore.js 1.4.2
-//     http://underscorejs.org
-//     (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
-//     Underscore may be freely distributed under the MIT license.
-(function(){var e=this,t=e._,n={},r=Array.prototype,i=Object.prototype,s=Function.prototype,o=r.push,u=r.slice,a=r.concat,f=r.unshift,l=i.toString,c=i.hasOwnProperty,h=r.forEach,p=r.map,d=r.reduce,v=r.reduceRight,m=r.filter,g=r.every,y=r.some,b=r.indexOf,w=r.lastIndexOf,E=Array.isArray,S=Object.keys,x=s.bind,T=function(e){if(e instanceof T)return e;if(!(this instanceof T))return new T(e);this._wrapped=e};typeof exports!="undefined"?(typeof module!="undefined"&&module.exports&&(exports=module.exports=T),exports._=T):e._=T,T.VERSION="1.4.2";var N=T.each=T.forEach=function(e,t,r){if(e==null)return;if(h&&e.forEach===h)e.forEach(t,r);else if(e.length===+e.length){for(var i=0,s=e.length;i<s;i++)if(t.call(r,e[i],i,e)===n)return}else for(var o in e)if(T.has(e,o)&&t.call(r,e[o],o,e)===n)return};T.map=T.collect=function(e,t,n){var r=[];return e==null?r:p&&e.map===p?e.map(t,n):(N(e,function(e,i,s){r[r.length]=t.call(n,e,i,s)}),r)},T.reduce=T.foldl=T.inject=function(e,t,n,r){var i=arguments.len
 gth>2;e==null&&(e=[]);if(d&&e.reduce===d)return r&&(t=T.bind(t,r)),i?e.reduce(t,n):e.reduce(t);N(e,function(e,s,o){i?n=t.call(r,n,e,s,o):(n=e,i=!0)});if(!i)throw new TypeError("Reduce of empty array with no initial value");return n},T.reduceRight=T.foldr=function(e,t,n,r){var i=arguments.length>2;e==null&&(e=[]);if(v&&e.reduceRight===v)return r&&(t=T.bind(t,r)),arguments.length>2?e.reduceRight(t,n):e.reduceRight(t);var s=e.length;if(s!==+s){var o=T.keys(e);s=o.length}N(e,function(u,a,f){a=o?o[--s]:--s,i?n=t.call(r,n,e[a],a,f):(n=e[a],i=!0)});if(!i)throw new TypeError("Reduce of empty array with no initial value");return n},T.find=T.detect=function(e,t,n){var r;return C(e,function(e,i,s){if(t.call(n,e,i,s))return r=e,!0}),r},T.filter=T.select=function(e,t,n){var r=[];return e==null?r:m&&e.filter===m?e.filter(t,n):(N(e,function(e,i,s){t.call(n,e,i,s)&&(r[r.length]=e)}),r)},T.reject=function(e,t,n){var r=[];return e==null?r:(N(e,function(e,i,s){t.call(n,e,i,s)||(r[r.length]=e)}),r)},T.
 every=T.all=function(e,t,r){t||(t=T.identity);var i=!0;return e==null?i:g&&e.every===g?e.every(t,r):(N(e,function(e,s,o){if(!(i=i&&t.call(r,e,s,o)))return n}),!!i)};var C=T.some=T.any=function(e,t,r){t||(t=T.identity);var i=!1;return e==null?i:y&&e.some===y?e.some(t,r):(N(e,function(e,s,o){if(i||(i=t.call(r,e,s,o)))return n}),!!i)};T.contains=T.include=function(e,t){var n=!1;return e==null?n:b&&e.indexOf===b?e.indexOf(t)!=-1:(n=C(e,function(e){return e===t}),n)},T.invoke=function(e,t){var n=u.call(arguments,2);return T.map(e,function(e){return(T.isFunction(t)?t:e[t]).apply(e,n)})},T.pluck=function(e,t){return T.map(e,function(e){return e[t]})},T.where=function(e,t){return T.isEmpty(t)?[]:T.filter(e,function(e){for(var n in t)if(t[n]!==e[n])return!1;return!0})},T.max=function(e,t,n){if(!t&&T.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.max.apply(Math,e);if(!t&&T.isEmpty(e))return-Infinity;var r={computed:-Infinity};return N(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;o>=r.com
 puted&&(r={value:e,computed:o})}),r.value},T.min=function(e,t,n){if(!t&&T.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.min.apply(Math,e);if(!t&&T.isEmpty(e))return Infinity;var r={computed:Infinity};return N(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;o<r.computed&&(r={value:e,computed:o})}),r.value},T.shuffle=function(e){var t,n=0,r=[];return N(e,function(e){t=T.random(n++),r[n-1]=r[t],r[t]=e}),r};var k=function(e){return T.isFunction(e)?e:function(t){return t[e]}};T.sortBy=function(e,t,n){var r=k(t);return T.pluck(T.map(e,function(e,t,i){return{value:e,index:t,criteria:r.call(n,e,t,i)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||n===void 0)return 1;if(n<r||r===void 0)return-1}return e.index<t.index?-1:1}),"value")};var L=function(e,t,n,r){var i={},s=k(t);return N(e,function(t,o){var u=s.call(n,t,o,e);r(i,u,t)}),i};T.groupBy=function(e,t,n){return L(e,t,n,function(e,t,n){(T.has(e,t)?e[t]:e[t]=[]).push(n)})},T.countBy=function(e,t,n){return L(e,t,n,f
 unction(e,t,n){T.has(e,t)||(e[t]=0),e[t]++})},T.sortedIndex=function(e,t,n,r){n=n==null?T.identity:k(n);var i=n.call(r,t),s=0,o=e.length;while(s<o){var u=s+o>>>1;n.call(r,e[u])<i?s=u+1:o=u}return s},T.toArray=function(e){return e?e.length===+e.length?u.call(e):T.values(e):[]},T.size=function(e){return e.length===+e.length?e.length:T.keys(e).length},T.first=T.head=T.take=function(e,t,n){return t!=null&&!n?u.call(e,0,t):e[0]},T.initial=function(e,t,n){return u.call(e,0,e.length-(t==null||n?1:t))},T.last=function(e,t,n){return t!=null&&!n?u.call(e,Math.max(e.length-t,0)):e[e.length-1]},T.rest=T.tail=T.drop=function(e,t,n){return u.call(e,t==null||n?1:t)},T.compact=function(e){return T.filter(e,function(e){return!!e})};var A=function(e,t,n){return N(e,function(e){T.isArray(e)?t?o.apply(n,e):A(e,t,n):n.push(e)}),n};T.flatten=function(e,t){return A(e,t,[])},T.without=function(e){return T.difference(e,u.call(arguments,1))},T.uniq=T.unique=function(e,t,n,r){var i=n?T.map(e,n,r):e,s=[],o=[];
 return N(i,function(n,r){if(t?!r||o[o.length-1]!==n:!T.contains(o,n))o.push(n),s.push(e[r])}),s},T.union=function(){return T.uniq(a.apply(r,arguments))},T.intersection=function(e){var t=u.call(arguments,1);return T.filter(T.uniq(e),function(e){return T.every(t,function(t){return T.indexOf(t,e)>=0})})},T.difference=function(e){var t=a.apply(r,u.call(arguments,1));return T.filter(e,function(e){return!T.contains(t,e)})},T.zip=function(){var e=u.call(arguments),t=T.max(T.pluck(e,"length")),n=new Array(t);for(var r=0;r<t;r++)n[r]=T.pluck(e,""+r);return n},T.object=function(e,t){var n={};for(var r=0,i=e.length;r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},T.indexOf=function(e,t,n){if(e==null)return-1;var r=0,i=e.length;if(n){if(typeof n!="number")return r=T.sortedIndex(e,t),e[r]===t?r:-1;r=n<0?Math.max(0,i+n):n}if(b&&e.indexOf===b)return e.indexOf(t,n);for(;r<i;r++)if(e[r]===t)return r;return-1},T.lastIndexOf=function(e,t,n){if(e==null)return-1;var r=n!=null;if(w&&e.lastIndexOf===w)
 return r?e.lastIndexOf(t,n):e.lastIndexOf(t);var i=r?n:e.length;while(i--)if(e[i]===t)return i;return-1},T.range=function(e,t,n){arguments.length<=1&&(t=e||0,e=0),n=arguments[2]||1;var r=Math.max(Math.ceil((t-e)/n),0),i=0,s=new Array(r);while(i<r)s[i++]=e,e+=n;return s};var O=function(){};T.bind=function(t,n){var r,i;if(t.bind===x&&x)return x.apply(t,u.call(arguments,1));if(!T.isFunction(t))throw new TypeError;return i=u.call(arguments,2),r=function(){if(this instanceof r){O.prototype=t.prototype;var e=new O,s=t.apply(e,i.concat(u.call(arguments)));return Object(s)===s?s:e}return t.apply(n,i.concat(u.call(arguments)))}},T.bindAll=function(e){var t=u.call(arguments,1);return t.length==0&&(t=T.functions(e)),N(t,function(t){e[t]=T.bind(e[t],e)}),e},T.memoize=function(e,t){var n={};return t||(t=T.identity),function(){var r=t.apply(this,arguments);return T.has(n,r)?n[r]:n[r]=e.apply(this,arguments)}},T.delay=function(e,t){var n=u.call(arguments,2);return setTimeout(function(){return e.ap
 ply(null,n)},t)},T.defer=function(e){return T.delay.apply(T,[e,1].concat(u.call(arguments,1)))},T.throttle=function(e,t){var n,r,i,s,o,u,a=T.debounce(function(){o=s=!1},t);return function(){n=this,r=arguments;var f=function(){i=null,o&&(u=e.apply(n,r)),a()};return i||(i=setTimeout(f,t)),s?o=!0:(s=!0,u=e.apply(n,r)),a(),u}},T.debounce=function(e,t,n){var r,i;return function(){var s=this,o=arguments,u=function(){r=null,n||(i=e.apply(s,o))},a=n&&!r;return clearTimeout(r),r=setTimeout(u,t),a&&(i=e.apply(s,o)),i}},T.once=function(e){var t=!1,n;return function(){return t?n:(t=!0,n=e.apply(this,arguments),e=null,n)}},T.wrap=function(e,t){return function(){var n=[e];return o.apply(n,arguments),t.apply(this,n)}},T.compose=function(){var e=arguments;return function(){var t=arguments;for(var n=e.length-1;n>=0;n--)t=[e[n].apply(this,t)];return t[0]}},T.after=function(e,t){return e<=0?t():function(){if(--e<1)return t.apply(this,arguments)}},T.keys=S||function(e){if(e!==Object(e))throw new TypeEr
 ror("Invalid object");var t=[];for(var n in e)T.has(e,n)&&(t[t.length]=n);return t},T.values=function(e){var t=[];for(var n in e)T.has(e,n)&&t.push(e[n]);return t},T.pairs=function(e){var t=[];for(var n in e)T.has(e,n)&&t.push([n,e[n]]);return t},T.invert=function(e){var t={};for(var n in e)T.has(e,n)&&(t[e[n]]=n);return t},T.functions=T.methods=function(e){var t=[];for(var n in e)T.isFunction(e[n])&&t.push(n);return t.sort()},T.extend=function(e){return N(u.call(arguments,1),function(t){for(var n in t)e[n]=t[n]}),e},T.pick=function(e){var t={},n=a.apply(r,u.call(arguments,1));return N(n,function(n){n in e&&(t[n]=e[n])}),t},T.omit=function(e){var t={},n=a.apply(r,u.call(arguments,1));for(var i in e)T.contains(n,i)||(t[i]=e[i]);return t},T.defaults=function(e){return N(u.call(arguments,1),function(t){for(var n in t)e[n]==null&&(e[n]=t[n])}),e},T.clone=function(e){return T.isObject(e)?T.isArray(e)?e.slice():T.extend({},e):e},T.tap=function(e,t){return t(e),e};var M=function(e,t,n,r){i
 f(e===t)return e!==0||1/e==1/t;if(e==null||t==null)return e===t;e instanceof T&&(e=e._wrapped),t instanceof T&&(t=t._wrapped);var i=l.call(e);if(i!=l.call(t))return!1;switch(i){case"[object String]":return e==String(t);case"[object Number]":return e!=+e?t!=+t:e==0?1/e==1/t:e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}if(typeof e!="object"||typeof t!="object")return!1;var s=n.length;while(s--)if(n[s]==e)return r[s]==t;n.push(e),r.push(t);var o=0,u=!0;if(i=="[object Array]"){o=e.length,u=o==t.length;if(u)while(o--)if(!(u=M(e[o],t[o],n,r)))break}else{var a=e.constructor,f=t.constructor;if(a!==f&&!(T.isFunction(a)&&a instanceof a&&T.isFunction(f)&&f instanceof f))return!1;for(var c in e)if(T.has(e,c)){o++;if(!(u=T.has(t,c)&&M(e[c],t[c],n,r)))break}if(u){for(c in t)if(T.has(t,c)&&!(o--))break;u=!o}}return n.pop(),r.pop(),u};T.isEqual=function(e,t){ret
 urn M(e,t,[],[])},T.isEmpty=function(e){if(e==null)return!0;if(T.isArray(e)||T.isString(e))return e.length===0;for(var t in e)if(T.has(e,t))return!1;return!0},T.isElement=function(e){return!!e&&e.nodeType===1},T.isArray=E||function(e){return l.call(e)=="[object Array]"},T.isObject=function(e){return e===Object(e)},N(["Arguments","Function","String","Number","Date","RegExp"],function(e){T["is"+e]=function(t){return l.call(t)=="[object "+e+"]"}}),T.isArguments(arguments)||(T.isArguments=function(e){return!!e&&!!T.has(e,"callee")}),typeof /./!="function"&&(T.isFunction=function(e){return typeof e=="function"}),T.isFinite=function(e){return T.isNumber(e)&&isFinite(e)},T.isNaN=function(e){return T.isNumber(e)&&e!=+e},T.isBoolean=function(e){return e===!0||e===!1||l.call(e)=="[object Boolean]"},T.isNull=function(e){return e===null},T.isUndefined=function(e){return e===void 0},T.has=function(e,t){return c.call(e,t)},T.noConflict=function(){return e._=t,this},T.identity=function(e){return e
 },T.times=function(e,t,n){for(var r=0;r<e;r++)t.call(n,r)},T.random=function(e,t){return t==null&&(t=e,e=0),e+(0|Math.random()*(t-e+1))};var _={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"}};_.unescape=T.invert(_.escape);var D={escape:new RegExp("["+T.keys(_.escape).join("")+"]","g"),unescape:new RegExp("("+T.keys(_.unescape).join("|")+")","g")};T.each(["escape","unescape"],function(e){T[e]=function(t){return t==null?"":(""+t).replace(D[e],function(t){return _[e][t]})}}),T.result=function(e,t){if(e==null)return null;var n=e[t];return T.isFunction(n)?n.call(e):n},T.mixin=function(e){N(T.functions(e),function(t){var n=T[t]=e[t];T.prototype[t]=function(){var e=[this._wrapped];return o.apply(e,arguments),F.call(this,n.apply(T,e))}})};var P=0;T.uniqueId=function(e){var t=P++;return e?e+t:t},T.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var H=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","	":"t"
 ,"\u2028":"u2028","\u2029":"u2029"},j=/\\|'|\r|\n|\t|\u2028|\u2029/g;T.template=function(e,t,n){n=T.defaults({},n,T.templateSettings);var r=new RegExp([(n.escape||H).source,(n.interpolate||H).source,(n.evaluate||H).source].join("|")+"|$","g"),i=0,s="__p+='";e.replace(r,function(t,n,r,o,u){s+=e.slice(i,u).replace(j,function(e){return"\\"+B[e]}),s+=n?"'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?"'+\n((__t=("+r+"))==null?'':__t)+\n'":o?"';\n"+o+"\n__p+='":"",i=u+t.length}),s+="';\n",n.variable||(s="with(obj||{}){\n"+s+"}\n"),s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{var o=new Function(n.variable||"obj","_",s)}catch(u){throw u.source=s,u}if(t)return o(t,T);var a=function(e){return o.call(this,e,T)};return a.source="function("+(n.variable||"obj")+"){\n"+s+"}",a},T.chain=function(e){return T(e).chain()};var F=function(e){return this._chain?T(e).chain():e};T.mixin(T),N(["pop","push","reverse","shift","sort","sp
 lice","unshift"],function(e){var t=r[e];T.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),(e=="shift"||e=="splice")&&n.length===0&&delete n[0],F.call(this,n)}}),N(["concat","join","slice"],function(e){var t=r[e];T.prototype[e]=function(){return F.call(this,t.apply(this._wrapped,arguments))}}),T.extend(T.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/index.htm
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/index.htm b/portal/js/libs/Highcharts-2.3.5/index.htm
new file mode 100644
index 0000000..c6c5cd0
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/index.htm
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+	<head>
+		<meta http-equiv="Content-Type" content="text/html; charset=iso-utf-8" />
+		<title>Highcharts Examples</title>
+	</head>
+	<body>
+		<h1>Highcharts Examples</h1>
+		<h4>Line and scatter charts</h4>
+		<ul>
+			<li><a href="examples/line-basic/index.htm">Basic line</a></li>
+			<li><a href="examples/line-ajax/index.htm">Ajax loaded data, clickable points</a></li>
+			<li><a href="examples/line-labels/index.htm">With data labels</a></li>
+			<li><a href="examples/line-time-series/index.htm">Time series, zoomable</a></li>
+			<li><a href="examples/spline-inverted/index.htm">Spline with inverted axes</a></li>
+			<li><a href="examples/spline-symbols/index.htm">Spline with symbols</a></li>
+			<li><a href="examples/spline-plot-bands/index.htm">Spline with plot bands</a></li>
+			<li><a href="examples/spline-irregular-time/index.htm">Time data with irregular intervals</a></li>
+			<li><a href="examples/line-log-axis/index.htm">Logarithmic axis</a></li>
+			<li><a href="examples/scatter/index.htm">Scatter plot</a></li>
+		</ul>
+		<h4>Area charts</h4>
+		<ul>
+			<li><a href="examples/area-basic/index.htm">Basic area</a></li>
+			<li><a href="examples/area-negative/index.htm">Area with negative values</a></li>
+			<li><a href="examples/area-stacked/index.htm">Stacked area</a></li>
+			<li><a href="examples/area-stacked-percent/index.htm">Percentage area</a></li>
+			<li><a href="examples/area-missing/index.htm">Area with missing points</a></li>
+			<li><a href="examples/area-inverted/index.htm">Inverted axes</a></li>
+			<li><a href="examples/areaspline/index.htm">Area-spline</a></li>
+		</ul>
+		<h4>Column and bar charts</h4>
+		<ul>
+			<li><a href="examples/bar-basic/index.htm">Basic bar</a></li>
+			<li><a href="examples/bar-stacked/index.htm">Stacked bar</a></li>
+			<li><a href="examples/bar-negative-stack/index.htm">Bar with negative stack</a></li>
+			<li><a href="examples/column-basic/index.htm">Basic column</a></li>
+			<li><a href="examples/column-negative/index.htm">Column with negative values</a></li>
+			<li><a href="examples/column-stacked/index.htm">Stacked column</a></li>
+			<li><a href="examples/column-stacked-and-grouped/index.htm">Stacked and grouped column</a></li>
+			<li><a href="examples/column-stacked-percent/index.htm">Stacked percentage column</a></li>
+			<li><a href="examples/column-rotated-labels/index.htm">Column with rotated labels</a></li>
+			<li><a href="examples/column-drilldown/index.htm">Column with drilldown</a></li>
+			<li><a href="examples/column-parsed/index.htm">Data defined in a HTML table</a></li>
+		</ul>
+		<h4>Pie charts</h4>
+		<ul>
+			<li><a href="examples/pie-basic/index.htm">Pie chart</a></li>
+			<li><a href="examples/pie-gradient/index.htm">Pie with gradient fill</a></li>
+			<li><a href="examples/pie-donut/index.htm">Donut chart</a></li>
+			<li><a href="examples/pie-legend/index.htm">Pie with legend</a></li>
+		</ul>
+		<h4>Dynamic charts</h4>
+		<ul>
+			<li><a href="examples/dynamic-update/index.htm">Spline updating each second</a></li>
+			<li><a href="examples/dynamic-click-to-add/index.htm">Click to add a point</a></li>
+			<li><a href="examples/dynamic-master-detail/index.htm">Master-detail chart</a></li>
+		</ul>
+		<h4>Combinations</h4>
+		<ul>
+			<li><a href="examples/combo/index.htm">Column, line and pie</a></li>
+			<li><a href="examples/combo-dual-axes/index.htm">Dual axes, line and column</a></li>
+			<li><a href="examples/combo-multi-axes/index.htm">Multiple axes</a></li>
+			<li><a href="examples/combo-regression/index.htm">Scatter with regression line</a></li>
+		</ul>
+		<h4>More chart types</h4>
+		<ul>
+			<li><a href="examples/gauge-speedometer/index.htm">Angular gauge</a></li>
+			<li><a href="examples/gauge-clock/index.htm">Clock</a></li>
+			<li><a href="examples/gauge-dual/index.htm">Gauge with dual axes</a></li>
+			<li><a href="examples/gauge-vu-meter/index.htm">VU meter</a></li>
+			<li><a href="examples/arearange/index.htm">Area range</a></li>
+			<li><a href="examples/columnrange/index.htm">Column range</a></li>
+			<li><a href="examples/polar/index.htm">Polar chart</a></li>
+			<li><a href="examples/polar-spider/index.htm">Spiderweb</a></li>
+			<li><a href="examples/polar-wind-rose/index.htm">Wind rose</a></li>
+		</ul>
+	</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/adapters/mootools-adapter.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/adapters/mootools-adapter.js b/portal/js/libs/Highcharts-2.3.5/js/adapters/mootools-adapter.js
new file mode 100644
index 0000000..cddecb8
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/adapters/mootools-adapter.js
@@ -0,0 +1,13 @@
+/*
+ Highcharts JS v2.3.5 (2012-12-19)
+ MooTools adapter
+
+ (c) 2010-2011 Torstein Hønsi
+
+ License: www.highcharts.com/license
+*/
+(function(){var e=window,i=document,f=e.MooTools.version.substring(0,3),g=f==="1.2"||f==="1.1",j=g||f==="1.3",h=e.$extend||function(){return Object.append.apply(Object,arguments)};e.HighchartsAdapter={init:function(a){var b=Fx.prototype,c=b.start,d=Fx.Morph.prototype,e=d.compute;b.start=function(b,d){var e=this.element;if(b.d)this.paths=a.init(e,e.d,this.toD);c.apply(this,arguments);return this};d.compute=function(b,c,d){var f=this.paths;if(f)this.element.attr("d",a.step(f[0],f[1],d,this.toD));else return e.apply(this,
+arguments)}},adapterRun:function(a,b){if(b==="width"||b==="height")return parseInt($(a).getStyle(b),10)},getScript:function(a,b){var c=i.getElementsByTagName("head")[0],d=i.createElement("script");d.type="text/javascript";d.src=a;d.onload=b;c.appendChild(d)},animate:function(a,b,c){var d=a.attr,f=c&&c.complete;if(d&&!a.setStyle)a.getStyle=a.attr,a.setStyle=function(){var a=arguments;this.attr.call(this,a[0],a[1][0])},a.$family=function(){return!0};e.HighchartsAdapter.stop(a);c=new Fx.Morph(d?a:$(a),
+h({transition:Fx.Transitions.Quad.easeInOut},c));if(d)c.element=a;if(b.d)c.toD=b.d;f&&c.addEvent("complete",f);c.start(b);a.fx=c},each:function(a,b){return g?$each(a,b):Array.each(a,b)},map:function(a,b){return a.map(b)},grep:function(a,b){return a.filter(b)},inArray:function(a,b,c){return b.indexOf(a,c)},merge:function(){var a=arguments,b=[{}],c=a.length;if(g)a=$merge.apply(null,a);else{for(;c--;)typeof a[c]!=="boolean"&&(b[c+1]=a[c]);a=Object.merge.apply(Object,b)}return a},offset:function(a){a=
+$(a).getOffsets();return{left:a.x,top:a.y}},extendWithEvents:function(a){a.addEvent||(a.nodeName?$(a):h(a,new Events))},addEvent:function(a,b,c){typeof b==="string"&&(b==="unload"&&(b="beforeunload"),e.HighchartsAdapter.extendWithEvents(a),a.addEvent(b,c))},removeEvent:function(a,b,c){typeof a!=="string"&&a.addEvent&&(b?(b==="unload"&&(b="beforeunload"),c?a.removeEvent(b,c):a.removeEvents&&a.removeEvents(b)):a.removeEvents())},fireEvent:function(a,b,c,d){b={type:b,target:a};b=j?new Event(b):new DOMEvent(b);
+b=h(b,c);b.preventDefault=function(){d=null};a.fireEvent&&a.fireEvent(b.type,b);d&&d(b)},washMouseEvent:function(a){return a.event||a},stop:function(a){a.fx&&a.fx.cancel()}}})();

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/adapters/mootools-adapter.src.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/adapters/mootools-adapter.src.js b/portal/js/libs/Highcharts-2.3.5/js/adapters/mootools-adapter.src.js
new file mode 100644
index 0000000..fcae32f
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/adapters/mootools-adapter.src.js
@@ -0,0 +1,328 @@
+/**
+ * @license Highcharts JS v2.3.5 (2012-12-19)
+ * MooTools adapter
+ *
+ * (c) 2010-2011 Torstein Hønsi
+ *
+ * License: www.highcharts.com/license
+ */
+
+// JSLint options:
+/*global Fx, $, $extend, $each, $merge, Events, Event, DOMEvent */
+
+(function () {
+
+var win = window,
+	doc = document,
+	mooVersion = win.MooTools.version.substring(0, 3), // Get the first three characters of the version number
+	legacy = mooVersion === '1.2' || mooVersion === '1.1', // 1.1 && 1.2 considered legacy, 1.3 is not.
+	legacyEvent = legacy || mooVersion === '1.3', // In versions 1.1 - 1.3 the event class is named Event, in newer versions it is named DOMEvent.
+	$extend = win.$extend || function () {
+		return Object.append.apply(Object, arguments);
+	};
+
+win.HighchartsAdapter = {
+	/**
+	 * Initialize the adapter. This is run once as Highcharts is first run.
+	 * @param {Object} pathAnim The helper object to do animations across adapters.
+	 */
+	init: function (pathAnim) {
+		var fxProto = Fx.prototype,
+			fxStart = fxProto.start,
+			morphProto = Fx.Morph.prototype,
+			morphCompute = morphProto.compute;
+
+		// override Fx.start to allow animation of SVG element wrappers
+		/*jslint unparam: true*//* allow unused parameters in fx functions */
+		fxProto.start = function (from, to) {
+			var fx = this,
+				elem = fx.element;
+
+			// special for animating paths
+			if (from.d) {
+				//this.fromD = this.element.d.split(' ');
+				fx.paths = pathAnim.init(
+					elem,
+					elem.d,
+					fx.toD
+				);
+			}
+			fxStart.apply(fx, arguments);
+
+			return this; // chainable
+		};
+
+		// override Fx.step to allow animation of SVG element wrappers
+		morphProto.compute = function (from, to, delta) {
+			var fx = this,
+				paths = fx.paths;
+
+			if (paths) {
+				fx.element.attr(
+					'd',
+					pathAnim.step(paths[0], paths[1], delta, fx.toD)
+				);
+			} else {
+				return morphCompute.apply(fx, arguments);
+			}
+		};
+		/*jslint unparam: false*/
+	},
+	
+	/**
+	 * Run a general method on the framework, following jQuery syntax
+	 * @param {Object} el The HTML element
+	 * @param {String} method Which method to run on the wrapped element
+	 */
+	adapterRun: function (el, method) {
+		
+		// This currently works for getting inner width and height. If adding
+		// more methods later, we need a conditional implementation for each.
+		if (method === 'width' || method === 'height') {
+			return parseInt($(el).getStyle(method), 10);
+		}
+	},
+
+	/**
+	 * Downloads a script and executes a callback when done.
+	 * @param {String} scriptLocation
+	 * @param {Function} callback
+	 */
+	getScript: function (scriptLocation, callback) {
+		// We cannot assume that Assets class from mootools-more is available so instead insert a script tag to download script.
+		var head = doc.getElementsByTagName('head')[0];
+		var script = doc.createElement('script');
+
+		script.type = 'text/javascript';
+		script.src = scriptLocation;
+		script.onload = callback;
+
+		head.appendChild(script);
+	},
+
+	/**
+	 * Animate a HTML element or SVG element wrapper
+	 * @param {Object} el
+	 * @param {Object} params
+	 * @param {Object} options jQuery-like animation options: duration, easing, callback
+	 */
+	animate: function (el, params, options) {
+		var isSVGElement = el.attr,
+			effect,
+			complete = options && options.complete;
+
+		if (isSVGElement && !el.setStyle) {
+			// add setStyle and getStyle methods for internal use in Moo
+			el.getStyle = el.attr;
+			el.setStyle = function () { // property value is given as array in Moo - break it down
+				var args = arguments;
+				this.attr.call(this, args[0], args[1][0]);
+			};
+			// dirty hack to trick Moo into handling el as an element wrapper
+			el.$family = function () { return true; };
+		}
+
+		// stop running animations
+		win.HighchartsAdapter.stop(el);
+
+		// define and run the effect
+		effect = new Fx.Morph(
+			isSVGElement ? el : $(el),
+			$extend({
+				transition: Fx.Transitions.Quad.easeInOut
+			}, options)
+		);
+
+		// Make sure that the element reference is set when animating svg elements
+		if (isSVGElement) {
+			effect.element = el;
+		}
+
+		// special treatment for paths
+		if (params.d) {
+			effect.toD = params.d;
+		}
+
+		// jQuery-like events
+		if (complete) {
+			effect.addEvent('complete', complete);
+		}
+
+		// run
+		effect.start(params);
+
+		// record for use in stop method
+		el.fx = effect;
+	},
+
+	/**
+	 * MooTool's each function
+	 *
+	 */
+	each: function (arr, fn) {
+		return legacy ?
+			$each(arr, fn) :
+			Array.each(arr, fn);
+	},
+
+	/**
+	 * Map an array
+	 * @param {Array} arr
+	 * @param {Function} fn
+	 */
+	map: function (arr, fn) {
+		return arr.map(fn);
+	},
+
+	/**
+	 * Grep or filter an array
+	 * @param {Array} arr
+	 * @param {Function} fn
+	 */
+	grep: function (arr, fn) {
+		return arr.filter(fn);
+	},
+	
+	/**
+	 * Return the index of an item in an array, or -1 if not matched
+	 */
+	inArray: function (item, arr, from) {
+		return arr.indexOf(item, from);
+	},
+
+	/**
+	 * Deep merge two objects and return a third
+	 */
+	merge: function () {
+		var args = arguments,
+			args13 = [{}], // MooTools 1.3+
+			i = args.length,
+			ret;
+
+		if (legacy) {
+			ret = $merge.apply(null, args);
+		} else {
+			while (i--) {
+				// Boolean argumens should not be merged.
+				// JQuery explicitly skips this, so we do it here as well.
+				if (typeof args[i] !== 'boolean') {
+					args13[i + 1] = args[i];
+				}
+			}
+			ret = Object.merge.apply(Object, args13);
+		}
+
+		return ret;
+	},
+
+	/**
+	 * Get the offset of an element relative to the top left corner of the web page
+	 */
+	offset: function (el) {
+		var offsets = $(el).getOffsets();
+		return {
+			left: offsets.x,
+			top: offsets.y
+		};
+	},
+
+	/**
+	 * Extends an object with Events, if its not done
+	 */
+	extendWithEvents: function (el) {
+		// if the addEvent method is not defined, el is a custom Highcharts object
+		// like series or point
+		if (!el.addEvent) {
+			if (el.nodeName) {
+				el = $(el); // a dynamically generated node
+			} else {
+				$extend(el, new Events()); // a custom object
+			}
+		}
+	},
+
+	/**
+	 * Add an event listener
+	 * @param {Object} el HTML element or custom object
+	 * @param {String} type Event type
+	 * @param {Function} fn Event handler
+	 */
+	addEvent: function (el, type, fn) {
+		if (typeof type === 'string') { // chart broke due to el being string, type function
+
+			if (type === 'unload') { // Moo self destructs before custom unload events
+				type = 'beforeunload';
+			}
+
+			win.HighchartsAdapter.extendWithEvents(el);
+
+			el.addEvent(type, fn);
+		}
+	},
+
+	removeEvent: function (el, type, fn) {
+		if (typeof el === 'string') {
+			// el.removeEvents below apperantly calls this method again. Do not quite understand why, so for now just bail out.
+			return;
+		}
+		
+		if (el.addEvent) { // If el doesn't have an addEvent method, there are no events to remove
+			if (type) {
+				if (type === 'unload') { // Moo self destructs before custom unload events
+					type = 'beforeunload';
+				}
+	
+				if (fn) {
+					el.removeEvent(type, fn);
+				} else if (el.removeEvents) { // #958
+					el.removeEvents(type);
+				}
+			} else {
+				el.removeEvents();
+			}
+		}
+	},
+
+	fireEvent: function (el, event, eventArguments, defaultFunction) {
+		var eventArgs = {
+			type: event,
+			target: el
+		};
+		// create an event object that keeps all functions
+		event = legacyEvent ? new Event(eventArgs) : new DOMEvent(eventArgs);
+		event = $extend(event, eventArguments);
+		// override the preventDefault function to be able to use
+		// this for custom events
+		event.preventDefault = function () {
+			defaultFunction = null;
+		};
+		// if fireEvent is not available on the object, there hasn't been added
+		// any events to it above
+		if (el.fireEvent) {
+			el.fireEvent(event.type, event);
+		}
+
+		// fire the default if it is passed and it is not prevented above
+		if (defaultFunction) {
+			defaultFunction(event);
+		}
+	},
+	
+	/**
+	 * Set back e.pageX and e.pageY that MooTools has abstracted away
+	 */
+	washMouseEvent: function (e) {
+		return e.event || e;
+	},
+
+	/**
+	 * Stop running animations on the object
+	 */
+	stop: function (el) {
+		if (el.fx) {
+			el.fx.cancel();
+		}
+	}
+};
+
+}());


[12/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular.min.js.map
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular.min.js.map b/portal/js/libs/angular-1.2.5/angular.min.js.map
new file mode 100755
index 0000000..df1e7c0
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular.min.js.map
@@ -0,0 +1,8 @@
+{
+"version":3,
+"file":"angular.min.js",
+"lineCount":200,
+"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAmBC,CAAnB,CAA8B,CCLvCC,QAAS,EAAM,CAAC,CAAD,CAAS,CAWtB,MAAO,SAAS,EAAG,CAAA,IACb,EAAO,SAAA,CAAU,CAAV,CADM,CAIf,CAJe,CAKjB,EAHW,GAGX,EAHkB,CAAA,CAAS,CAAT,CAAkB,GAAlB,CAAwB,EAG1C,EAHgD,CAGhD,CAAmB,sCAAnB,EAA2D,CAAA,CAAS,CAAT,CAAkB,GAAlB,CAAwB,EAAnF,EAAyF,CACzF,KAAK,CAAL,CAAS,CAAT,CAAY,CAAZ,CAAgB,SAAA,OAAhB,CAAkC,CAAA,EAAlC,CACE,CAAA,CAAU,CAAV,EAA0B,CAAL,EAAA,CAAA,CAAS,GAAT,CAAe,GAApC,EAA2C,GAA3C,EAAkD,CAAlD,CAAoD,CAApD,EAAyD,GAAzD,CACE,kBAAA,CAjBc,UAAlB,EAAI,MAiB6B,UAAA,CAAU,CAAV,CAjBjC,CAiBiC,SAAA,CAAU,CAAV,CAhBxB,SAAA,EAAA,QAAA,CAAuB,aAAvB,CAAsC,EAAtC,CADT,CAEyB,WAAlB,EAAI,MAesB,UAAA,CAAU,CAAV,CAf1B,CACE,WADF,CAEoB,QAApB,EAAM,MAaoB,UAAA,CAAU,CAAV,CAb1B,CACE,IAAA,UAAA,CAYwB,SAAA,CAAU,CAAV,CAZxB,CADF,CAa0B,SAAA,CAAU,CAAV,CAA7B,CAEJ,OAAW,MAAJ,CAAU,CAAV,CAVU,CAXG,CDuPxBC,QAASA,GAAW,CAACC,CAAD,CAAM,CACxB,GAAW,IAAX,EAAIA,CAAJ,EAAmBC,EAAA,CAASD,CAAT,CAAnB,CACE,MAAO,CAAA,CAGT,KAAIE;AAASF,CAAAE,OAEb,OAAqB,EAArB,GAAIF,CAAAG,SAAJ,EAA0BD,CAA1B,
 CACS,CAAA,CADT,CAIOE,CAAA,CAASJ,CAAT,CAJP,EAIwBK,CAAA,CAAQL,CAAR,CAJxB,EAImD,CAJnD,GAIwCE,CAJxC,EAKyB,QALzB,GAKO,MAAOA,EALd,EAK8C,CAL9C,CAKqCA,CALrC,EAKoDA,CALpD,CAK6D,CAL7D,GAKmEF,EAZ3C,CA0C1BM,QAASA,EAAO,CAACN,CAAD,CAAMO,CAAN,CAAgBC,CAAhB,CAAyB,CACvC,IAAIC,CACJ,IAAIT,CAAJ,CACE,GAAIU,CAAA,CAAWV,CAAX,CAAJ,CACE,IAAKS,CAAL,GAAYT,EAAZ,CACa,WAAX,EAAIS,CAAJ,GAAiC,QAAjC,EAA0BA,CAA1B,EAAoD,MAApD,EAA6CA,CAA7C,EAA8DT,CAAAW,eAAA,CAAmBF,CAAnB,CAA9D,GACEF,CAAAK,KAAA,CAAcJ,CAAd,CAAuBR,CAAA,CAAIS,CAAJ,CAAvB,CAAiCA,CAAjC,CAHN,KAMO,IAAIT,CAAAM,QAAJ,EAAmBN,CAAAM,QAAnB,GAAmCA,CAAnC,CACLN,CAAAM,QAAA,CAAYC,CAAZ,CAAsBC,CAAtB,CADK,KAEA,IAAIT,EAAA,CAAYC,CAAZ,CAAJ,CACL,IAAKS,CAAL,CAAW,CAAX,CAAcA,CAAd,CAAoBT,CAAAE,OAApB,CAAgCO,CAAA,EAAhC,CACEF,CAAAK,KAAA,CAAcJ,CAAd,CAAuBR,CAAA,CAAIS,CAAJ,CAAvB,CAAiCA,CAAjC,CAFG,KAIL,KAAKA,CAAL,GAAYT,EAAZ,CACMA,CAAAW,eAAA,CAAmBF,CAAnB,CAAJ,EACEF,CAAAK,KAAA,CAAcJ,CAAd,CAAuBR,CAAA,CAAIS,CAAJ,CAAvB,CAAiCA,CAAjC,CAKR,OAAOT,EAtBgC,CAyBzCa,QAASA,GAAU,CAACb,CAAD,CAAM,CACvB,IAAIc,EA
 AO,EAAX,CACSL,CAAT,KAASA,CAAT,GAAgBT,EAAhB,CACMA,CAAAW,eAAA,CAAmBF,CAAnB,CAAJ,EACEK,CAAAC,KAAA,CAAUN,CAAV,CAGJ,OAAOK,EAAAE,KAAA,EAPgB,CAUzBC,QAASA,GAAa,CAACjB,CAAD,CAAMO,CAAN,CAAgBC,CAAhB,CAAyB,CAE7C,IADA,IAAIM,EAAOD,EAAA,CAAWb,CAAX,CAAX;AACUkB,EAAI,CAAd,CAAiBA,CAAjB,CAAqBJ,CAAAZ,OAArB,CAAkCgB,CAAA,EAAlC,CACEX,CAAAK,KAAA,CAAcJ,CAAd,CAAuBR,CAAA,CAAIc,CAAA,CAAKI,CAAL,CAAJ,CAAvB,CAAqCJ,CAAA,CAAKI,CAAL,CAArC,CAEF,OAAOJ,EALsC,CAc/CK,QAASA,GAAa,CAACC,CAAD,CAAa,CACjC,MAAO,SAAQ,CAACC,CAAD,CAAQZ,CAAR,CAAa,CAAEW,CAAA,CAAWX,CAAX,CAAgBY,CAAhB,CAAF,CADK,CAYnCC,QAASA,GAAO,EAAG,CAIjB,IAHA,IAAIC,EAAQC,EAAAtB,OAAZ,CACIuB,CAEJ,CAAMF,CAAN,CAAA,CAAa,CACXA,CAAA,EACAE,EAAA,CAAQD,EAAA,CAAID,CAAJ,CAAAG,WAAA,CAAsB,CAAtB,CACR,IAAa,EAAb,EAAID,CAAJ,CAEE,MADAD,GAAA,CAAID,CAAJ,CACO,CADM,GACN,CAAAC,EAAAG,KAAA,CAAS,EAAT,CAET,IAAa,EAAb,EAAIF,CAAJ,CACED,EAAA,CAAID,CAAJ,CAAA,CAAa,GADf,KAIE,OADAC,GAAA,CAAID,CAAJ,CACO,CADMK,MAAAC,aAAA,CAAoBJ,CAApB,CAA4B,CAA5B,CACN,CAAAD,EAAAG,KAAA,CAAS,EAAT,CAXE,CAcbH,EAAAM,QAAA,CAAY,G
 AAZ,CACA,OAAON,GAAAG,KAAA,CAAS,EAAT,CAnBU,CA4BnBI,QAASA,GAAU,CAAC/B,CAAD,CAAMgC,CAAN,CAAS,CACtBA,CAAJ,CACEhC,CAAAiC,UADF,CACkBD,CADlB,CAIE,OAAOhC,CAAAiC,UALiB,CAsB5BC,QAASA,EAAM,CAACC,CAAD,CAAM,CACnB,IAAIH,EAAIG,CAAAF,UACR3B,EAAA,CAAQ8B,SAAR,CAAmB,QAAQ,CAACpC,CAAD,CAAK,CAC1BA,CAAJ,GAAYmC,CAAZ,EACE7B,CAAA,CAAQN,CAAR,CAAa,QAAQ,CAACqB,CAAD,CAAQZ,CAAR,CAAY,CAC/B0B,CAAA,CAAI1B,CAAJ,CAAA,CAAWY,CADoB,CAAjC,CAF4B,CAAhC,CAQAU,GAAA,CAAWI,CAAX,CAAeH,CAAf,CACA,OAAOG,EAXY,CAcrBE,QAASA,EAAG,CAACC,CAAD,CAAM,CAChB,MAAOC,SAAA,CAASD,CAAT;AAAc,EAAd,CADS,CAKlBE,QAASA,GAAO,CAACC,CAAD,CAASC,CAAT,CAAgB,CAC9B,MAAOR,EAAA,CAAO,KAAKA,CAAA,CAAO,QAAQ,EAAG,EAAlB,CAAsB,WAAWO,CAAX,CAAtB,CAAL,CAAP,CAA0DC,CAA1D,CADuB,CAmBhCC,QAASA,EAAI,EAAG,EAmBhBC,QAASA,GAAQ,CAACC,CAAD,CAAI,CAAC,MAAOA,EAAR,CAIrBC,QAASA,GAAO,CAACzB,CAAD,CAAQ,CAAC,MAAO,SAAQ,EAAG,CAAC,MAAOA,EAAR,CAAnB,CAaxB0B,QAASA,EAAW,CAAC1B,CAAD,CAAO,CAAC,MAAwB,WAAxB,GAAO,MAAOA,EAAf,CAc3B2B,QAASA,EAAS,CAAC3B,CAAD,CAAO,CAAC,MAAwB,WAAxB,GAAO,MAAOA,EAAf,CAezB4B,QAASA,
 EAAQ,CAAC5B,CAAD,CAAO,CAAC,MAAgB,KAAhB,EAAOA,CAAP,EAAyC,QAAzC,GAAwB,MAAOA,EAAhC,CAcxBjB,QAASA,EAAQ,CAACiB,CAAD,CAAO,CAAC,MAAwB,QAAxB,GAAO,MAAOA,EAAf,CAcxB6B,QAASA,GAAQ,CAAC7B,CAAD,CAAO,CAAC,MAAwB,QAAxB,GAAO,MAAOA,EAAf,CAcxB8B,QAASA,GAAM,CAAC9B,CAAD,CAAO,CACpB,MAAgC,eAAhC,GAAO+B,EAAAxC,KAAA,CAAcS,CAAd,CADa,CAgBtBhB,QAASA,EAAO,CAACgB,CAAD,CAAQ,CACtB,MAAgC,gBAAhC,GAAO+B,EAAAxC,KAAA,CAAcS,CAAd,CADe,CAgBxBX,QAASA,EAAU,CAACW,CAAD,CAAO,CAAC,MAAwB,UAAxB,GAAO,MAAOA,EAAf,CA5jBa;AAskBvCgC,QAASA,GAAQ,CAAChC,CAAD,CAAQ,CACvB,MAAgC,iBAAhC,GAAO+B,EAAAxC,KAAA,CAAcS,CAAd,CADgB,CAYzBpB,QAASA,GAAQ,CAACD,CAAD,CAAM,CACrB,MAAOA,EAAP,EAAcA,CAAAJ,SAAd,EAA8BI,CAAAsD,SAA9B,EAA8CtD,CAAAuD,MAA9C,EAA2DvD,CAAAwD,YADtC,CA8CvBC,QAASA,GAAS,CAACC,CAAD,CAAO,CACvB,MAAO,EAAGA,CAAAA,CAAH,EACJ,EAAAA,CAAAC,SAAA,EACGD,CAAAE,GADH,EACcF,CAAAG,KADd,CADI,CADgB,CA+BzBC,QAASA,GAAG,CAAC9D,CAAD,CAAMO,CAAN,CAAgBC,CAAhB,CAAyB,CACnC,IAAIuD,EAAU,EACdzD,EAAA,CAAQN,CAAR,CAAa,QAAQ,CAACqB,CAAD,CAAQE,CAAR,CAAeyC,CAAf,CAAqB,CACxCD,CAAAhD,KAA
 A,CAAaR,CAAAK,KAAA,CAAcJ,CAAd,CAAuBa,CAAvB,CAA8BE,CAA9B,CAAqCyC,CAArC,CAAb,CADwC,CAA1C,CAGA,OAAOD,EAL4B,CAwCrCE,QAASA,GAAO,CAACC,CAAD,CAAQlE,CAAR,CAAa,CAC3B,GAAIkE,CAAAD,QAAJ,CAAmB,MAAOC,EAAAD,QAAA,CAAcjE,CAAd,CAE1B,KAAK,IAAIkB,EAAI,CAAb,CAAgBA,CAAhB,CAAoBgD,CAAAhE,OAApB,CAAkCgB,CAAA,EAAlC,CACE,GAAIlB,CAAJ,GAAYkE,CAAA,CAAMhD,CAAN,CAAZ,CAAsB,MAAOA,EAE/B,OAAQ,EANmB,CAS7BiD,QAASA,GAAW,CAACD,CAAD,CAAQ7C,CAAR,CAAe,CACjC,IAAIE,EAAQ0C,EAAA,CAAQC,CAAR,CAAe7C,CAAf,CACA,EAAZ,EAAIE,CAAJ,EACE2C,CAAAE,OAAA,CAAa7C,CAAb,CAAoB,CAApB,CACF,OAAOF,EAJ0B,CA2EnCgD,QAASA,GAAI,CAACC,CAAD,CAASC,CAAT,CAAqB,CAChC,GAAItE,EAAA,CAASqE,CAAT,CAAJ,EAAgCA,CAAhC,EAAgCA,CApMlBE,WAoMd,EAAgCF,CApMAG,OAoMhC,CACE,KAAMC,GAAA,CAAS,MAAT,CAAN,CAIF,GAAKH,CAAL,CAaO,CACL,GAAID,CAAJ;AAAeC,CAAf,CAA4B,KAAMG,GAAA,CAAS,KAAT,CAAN,CAE5B,GAAIrE,CAAA,CAAQiE,CAAR,CAAJ,CAEE,IAAM,IAAIpD,EADVqD,CAAArE,OACUgB,CADW,CACrB,CAAiBA,CAAjB,CAAqBoD,CAAApE,OAArB,CAAoCgB,CAAA,EAApC,CACEqD,CAAAxD,KAAA,CAAiBsD,EAAA,CAAKC,CAAA,CAAOpD,CAAP,CAAL,CAAjB,CAHJ,
 KAKO,CACDc,CAAAA,CAAIuC,CAAAtC,UACR3B,EAAA,CAAQiE,CAAR,CAAqB,QAAQ,CAAClD,CAAD,CAAQZ,CAAR,CAAY,CACvC,OAAO8D,CAAA,CAAY9D,CAAZ,CADgC,CAAzC,CAGA,KAAMA,IAAIA,CAAV,GAAiB6D,EAAjB,CACEC,CAAA,CAAY9D,CAAZ,CAAA,CAAmB4D,EAAA,CAAKC,CAAA,CAAO7D,CAAP,CAAL,CAErBsB,GAAA,CAAWwC,CAAX,CAAuBvC,CAAvB,CARK,CARF,CAbP,IAEE,CADAuC,CACA,CADcD,CACd,IACMjE,CAAA,CAAQiE,CAAR,CAAJ,CACEC,CADF,CACgBF,EAAA,CAAKC,CAAL,CAAa,EAAb,CADhB,CAEWnB,EAAA,CAAOmB,CAAP,CAAJ,CACLC,CADK,CACS,IAAII,IAAJ,CAASL,CAAAM,QAAA,EAAT,CADT,CAEIvB,EAAA,CAASiB,CAAT,CAAJ,CACLC,CADK,CACaM,MAAJ,CAAWP,CAAAA,OAAX,CADT,CAEIrB,CAAA,CAASqB,CAAT,CAFJ,GAGLC,CAHK,CAGSF,EAAA,CAAKC,CAAL,CAAa,EAAb,CAHT,CALT,CA8BF,OAAOC,EAtCyB,CA4ClCO,QAASA,GAAW,CAACC,CAAD,CAAM5C,CAAN,CAAW,CAC7BA,CAAA,CAAMA,CAAN,EAAa,EAEb,KAAI1B,IAAIA,CAAR,GAAesE,EAAf,CAGMA,CAAApE,eAAA,CAAmBF,CAAnB,CAAJ,EAAoD,IAApD,GAA+BA,CAAAuE,OAAA,CAAW,CAAX,CAAc,CAAd,CAA/B,GACE7C,CAAA,CAAI1B,CAAJ,CADF,CACasE,CAAA,CAAItE,CAAJ,CADb,CAKF,OAAO0B,EAXsB,CA2C/B8C,QAASA,GAAM,CAACC,CAAD,CAAKC,CAAL,CAAS,CACtB,GAAID,
 CAAJ,GAAWC,CAAX,CAAe,MAAO,CAAA,CACtB,IAAW,IAAX,GAAID,CAAJ,EAA0B,IAA1B,GAAmBC,CAAnB,CAAgC,MAAO,CAAA,CACvC,IAAID,CAAJ,GAAWA,CAAX,EAAiBC,CAAjB,GAAwBA,CAAxB,CAA4B,MAAO,CAAA,CAHb,KAIlBC,EAAK,MAAOF,EAJM,CAIsBzE,CAC5C,IAAI2E,CAAJ,EADyBC,MAAOF,EAChC;AACY,QADZ,EACMC,CADN,CAEI,GAAI/E,CAAA,CAAQ6E,CAAR,CAAJ,CAAiB,CACf,GAAI,CAAC7E,CAAA,CAAQ8E,CAAR,CAAL,CAAkB,MAAO,CAAA,CACzB,KAAKjF,CAAL,CAAcgF,CAAAhF,OAAd,GAA4BiF,CAAAjF,OAA5B,CAAuC,CACrC,IAAIO,CAAJ,CAAQ,CAAR,CAAWA,CAAX,CAAeP,CAAf,CAAuBO,CAAA,EAAvB,CACE,GAAI,CAACwE,EAAA,CAAOC,CAAA,CAAGzE,CAAH,CAAP,CAAgB0E,CAAA,CAAG1E,CAAH,CAAhB,CAAL,CAA+B,MAAO,CAAA,CAExC,OAAO,CAAA,CAJ8B,CAFxB,CAAjB,IAQO,CAAA,GAAI0C,EAAA,CAAO+B,CAAP,CAAJ,CACL,MAAO/B,GAAA,CAAOgC,CAAP,CAAP,EAAqBD,CAAAN,QAAA,EAArB,EAAqCO,CAAAP,QAAA,EAChC,IAAIvB,EAAA,CAAS6B,CAAT,CAAJ,EAAoB7B,EAAA,CAAS8B,CAAT,CAApB,CACL,MAAOD,EAAA9B,SAAA,EAAP,EAAwB+B,CAAA/B,SAAA,EAExB,IAAY8B,CAAZ,EAAYA,CA9SJV,WA8SR,EAAYU,CA9ScT,OA8S1B,EAA2BU,CAA3B,EAA2BA,CA9SnBX,WA8SR,EAA2BW,CA9SDV,OA8S1B,EAAkCxE,EAAA,CAASiF,CAAT,CAAlC,
 EAAkDjF,EAAA,CAASkF,CAAT,CAAlD,EAAkE9E,CAAA,CAAQ8E,CAAR,CAAlE,CAA+E,MAAO,CAAA,CACtFG,EAAA,CAAS,EACT,KAAI7E,CAAJ,GAAWyE,EAAX,CACE,GAAsB,GAAtB,GAAIzE,CAAA8E,OAAA,CAAW,CAAX,CAAJ,EAA6B,CAAA7E,CAAA,CAAWwE,CAAA,CAAGzE,CAAH,CAAX,CAA7B,CAAA,CACA,GAAI,CAACwE,EAAA,CAAOC,CAAA,CAAGzE,CAAH,CAAP,CAAgB0E,CAAA,CAAG1E,CAAH,CAAhB,CAAL,CAA+B,MAAO,CAAA,CACtC6E,EAAA,CAAO7E,CAAP,CAAA,CAAc,CAAA,CAFd,CAIF,IAAIA,CAAJ,GAAW0E,EAAX,CACE,GAAI,CAACG,CAAA3E,eAAA,CAAsBF,CAAtB,CAAL,EACsB,GADtB,GACIA,CAAA8E,OAAA,CAAW,CAAX,CADJ,EAEIJ,CAAA,CAAG1E,CAAH,CAFJ,GAEgBZ,CAFhB,EAGI,CAACa,CAAA,CAAWyE,CAAA,CAAG1E,CAAH,CAAX,CAHL,CAG0B,MAAO,CAAA,CAEnC,OAAO,CAAA,CAlBF,CAsBX,MAAO,CAAA,CArCe,CAyCxB+E,QAASA,GAAG,EAAG,CACb,MAAQ5F,EAAA6F,eAAR;AAAmC7F,CAAA6F,eAAAC,SAAnC,EACK9F,CAAA+F,cADL,EAEI,EAAG,CAAA/F,CAAA+F,cAAA,CAAuB,UAAvB,CAAH,EAAyC,CAAA/F,CAAA+F,cAAA,CAAuB,eAAvB,CAAzC,CAHS,CAkCfC,QAASA,GAAI,CAACC,CAAD,CAAOC,CAAP,CAAW,CACtB,IAAIC,EAA+B,CAAnB,CAAA3D,SAAAlC,OAAA,CAvBT8F,EAAApF,KAAA,CAuB0CwB,SAvB1C,CAuBqD6D,CAvBrD,CAuBS,CAAiD,EACjE,
 OAAI,CAAAvF,CAAA,CAAWoF,CAAX,CAAJ,EAAwBA,CAAxB,WAAsCjB,OAAtC,CAcSiB,CAdT,CACSC,CAAA7F,OACA,CAAH,QAAQ,EAAG,CACT,MAAOkC,UAAAlC,OACA,CAAH4F,CAAAI,MAAA,CAASL,CAAT,CAAeE,CAAAI,OAAA,CAAiBH,EAAApF,KAAA,CAAWwB,SAAX,CAAsB,CAAtB,CAAjB,CAAf,CAAG,CACH0D,CAAAI,MAAA,CAASL,CAAT,CAAeE,CAAf,CAHK,CAAR,CAKH,QAAQ,EAAG,CACT,MAAO3D,UAAAlC,OACA,CAAH4F,CAAAI,MAAA,CAASL,CAAT,CAAezD,SAAf,CAAG,CACH0D,CAAAlF,KAAA,CAAQiF,CAAR,CAHK,CATK,CAqBxBO,QAASA,GAAc,CAAC3F,CAAD,CAAMY,CAAN,CAAa,CAClC,IAAIgF,EAAMhF,CAES,SAAnB,GAAI,MAAOZ,EAAX,EAAiD,GAAjD,GAA+BA,CAAA8E,OAAA,CAAW,CAAX,CAA/B,CACEc,CADF,CACQxG,CADR,CAEWI,EAAA,CAASoB,CAAT,CAAJ,CACLgF,CADK,CACC,SADD,CAEIhF,CAAJ,EAAczB,CAAd,GAA2ByB,CAA3B,CACLgF,CADK,CACC,WADD,CAEYhF,CAFZ,GAEYA,CAnYLmD,WAiYP;AAEYnD,CAnYaoD,OAiYzB,IAGL4B,CAHK,CAGC,QAHD,CAMP,OAAOA,EAb2B,CA8BpCC,QAASA,GAAM,CAACtG,CAAD,CAAMuG,CAAN,CAAc,CAC3B,MAAmB,WAAnB,GAAI,MAAOvG,EAAX,CAAuCH,CAAvC,CACO2G,IAAAC,UAAA,CAAezG,CAAf,CAAoBoG,EAApB,CAAoCG,CAAA,CAAS,IAAT,CAAgB,IAApD,CAFoB,CAiB7BG,QAASA,GAAQ,CAACC,CAAD,CAAO,CACt
 B,MAAOvG,EAAA,CAASuG,CAAT,CACA,CAADH,IAAAI,MAAA,CAAWD,CAAX,CAAC,CACDA,CAHgB,CAOxBE,QAASA,GAAS,CAACxF,CAAD,CAAQ,CACpBA,CAAJ,EAA8B,CAA9B,GAAaA,CAAAnB,OAAb,EACM4G,CACJ,CADQC,CAAA,CAAU,EAAV,CAAe1F,CAAf,CACR,CAAAA,CAAA,CAAQ,EAAO,GAAP,EAAEyF,CAAF,EAAmB,GAAnB,EAAcA,CAAd,EAA+B,OAA/B,EAA0BA,CAA1B,EAA+C,IAA/C,EAA0CA,CAA1C,EAA4D,GAA5D,EAAuDA,CAAvD,EAAwE,IAAxE,EAAmEA,CAAnE,CAFV,EAIEzF,CAJF,CAIU,CAAA,CAEV,OAAOA,EAPiB,CAa1B2F,QAASA,GAAW,CAACC,CAAD,CAAU,CAC5BA,CAAA,CAAUC,CAAA,CAAOD,CAAP,CAAAE,MAAA,EACV,IAAI,CAGFF,CAAAG,MAAA,EAHE,CAIF,MAAMC,CAAN,CAAS,EAGX,IAAIC,EAAWJ,CAAA,CAAO,OAAP,CAAAK,OAAA,CAAuBN,CAAvB,CAAAO,KAAA,EACf,IAAI,CACF,MAHcC,EAGP,GAAAR,CAAA,CAAQ,CAAR,CAAA9G,SAAA,CAAoC4G,CAAA,CAAUO,CAAV,CAApC,CACHA,CAAAI,MAAA,CACQ,YADR,CACA,CAAsB,CAAtB,CAAAC,QAAA,CACU,aADV,CACyB,QAAQ,CAACD,CAAD,CAAQ/D,CAAR,CAAkB,CAAE,MAAO,GAAP,CAAaoD,CAAA,CAAUpD,CAAV,CAAf,CADnD,CAHF,CAKF,MAAM0D,CAAN,CAAS,CACT,MAAON,EAAA,CAAUO,CAAV,CADE,CAfiB,CAgC9BM,QAASA,GAAqB,CAACvG,CAAD,CAAQ,CACpC,GAAI,CACF,MAAOwG,mBAAA,CAAmBxG,CAAnB,
 CADL,CAEF,MAAMgG,CAAN,CAAS,EAHyB,CArjCC;AAkkCvCS,QAASA,GAAa,CAAYC,CAAZ,CAAsB,CAAA,IACtC/H,EAAM,EADgC,CAC5BgI,CAD4B,CACjBvH,CACzBH,EAAA,CAAS2H,CAAAF,CAAAE,EAAY,EAAZA,OAAA,CAAsB,GAAtB,CAAT,CAAqC,QAAQ,CAACF,CAAD,CAAU,CAChDA,CAAL,GACEC,CAEA,CAFYD,CAAAE,MAAA,CAAe,GAAf,CAEZ,CADAxH,CACA,CADMmH,EAAA,CAAsBI,CAAA,CAAU,CAAV,CAAtB,CACN,CAAKhF,CAAA,CAAUvC,CAAV,CAAL,GACM4F,CACJ,CADUrD,CAAA,CAAUgF,CAAA,CAAU,CAAV,CAAV,CAAA,CAA0BJ,EAAA,CAAsBI,CAAA,CAAU,CAAV,CAAtB,CAA1B,CAAgE,CAAA,CAC1E,CAAKhI,CAAA,CAAIS,CAAJ,CAAL,CAEUJ,CAAA,CAAQL,CAAA,CAAIS,CAAJ,CAAR,CAAH,CACLT,CAAA,CAAIS,CAAJ,CAAAM,KAAA,CAAcsF,CAAd,CADK,CAGLrG,CAAA,CAAIS,CAAJ,CAHK,CAGM,CAACT,CAAA,CAAIS,CAAJ,CAAD,CAAU4F,CAAV,CALb,CACErG,CAAA,CAAIS,CAAJ,CADF,CACa4F,CAHf,CAHF,CADqD,CAAvD,CAgBA,OAAOrG,EAlBmC,CAqB5CkI,QAASA,GAAU,CAAClI,CAAD,CAAM,CACvB,IAAImI,EAAQ,EACZ7H,EAAA,CAAQN,CAAR,CAAa,QAAQ,CAACqB,CAAD,CAAQZ,CAAR,CAAa,CAC5BJ,CAAA,CAAQgB,CAAR,CAAJ,CACEf,CAAA,CAAQe,CAAR,CAAe,QAAQ,CAAC+G,CAAD,CAAa,CAClCD,CAAApH,KAAA,CAAWsH,EAAA,CAAe5H,CAAf,CAAoB,CAAA,
 CAApB,CAAX,EAC2B,CAAA,CAAf,GAAA2H,CAAA,CAAsB,EAAtB,CAA2B,GAA3B,CAAiCC,EAAA,CAAeD,CAAf,CAA2B,CAAA,CAA3B,CAD7C,EADkC,CAApC,CADF,CAMAD,CAAApH,KAAA,CAAWsH,EAAA,CAAe5H,CAAf,CAAoB,CAAA,CAApB,CAAX,EACsB,CAAA,CAAV,GAAAY,CAAA,CAAiB,EAAjB,CAAsB,GAAtB,CAA4BgH,EAAA,CAAehH,CAAf,CAAsB,CAAA,CAAtB,CADxC,EAPgC,CAAlC,CAWA,OAAO8G,EAAAjI,OAAA,CAAeiI,CAAAxG,KAAA,CAAW,GAAX,CAAf,CAAiC,EAbjB,CA4BzB2G,QAASA,GAAgB,CAACjC,CAAD,CAAM,CAC7B,MAAOgC,GAAA,CAAehC,CAAf,CAAoB,CAAA,CAApB,CAAAsB,QAAA,CACY,OADZ,CACqB,GADrB,CAAAA,QAAA,CAEY,OAFZ,CAEqB,GAFrB,CAAAA,QAAA,CAGY,OAHZ,CAGqB,GAHrB,CADsB,CAmB/BU,QAASA,GAAc,CAAChC,CAAD,CAAMkC,CAAN,CAAuB,CAC5C,MAAOC,mBAAA,CAAmBnC,CAAnB,CAAAsB,QAAA,CACY,OADZ;AACqB,GADrB,CAAAA,QAAA,CAEY,OAFZ,CAEqB,GAFrB,CAAAA,QAAA,CAGY,MAHZ,CAGoB,GAHpB,CAAAA,QAAA,CAIY,OAJZ,CAIqB,GAJrB,CAAAA,QAAA,CAKY,MALZ,CAKqBY,CAAA,CAAkB,KAAlB,CAA0B,GAL/C,CADqC,CAsD9CE,QAASA,GAAW,CAACxB,CAAD,CAAUyB,CAAV,CAAqB,CAOvCnB,QAASA,EAAM,CAACN,CAAD,CAAU,CACvBA,CAAA,EAAW0B,CAAA5H,KAAA,CAAckG,CAAd,CADY,CAPc,IACnC0B,EAAW,CAAC1B,C
 AAD,CADwB,CAEnC2B,CAFmC,CAGnCC,CAHmC,CAInCC,EAAQ,CAAC,QAAD,CAAW,QAAX,CAAqB,UAArB,CAAiC,aAAjC,CAJ2B,CAKnCC,EAAsB,mCAM1BzI,EAAA,CAAQwI,CAAR,CAAe,QAAQ,CAACE,CAAD,CAAO,CAC5BF,CAAA,CAAME,CAAN,CAAA,CAAc,CAAA,CACdzB,EAAA,CAAO3H,CAAAqJ,eAAA,CAAwBD,CAAxB,CAAP,CACAA,EAAA,CAAOA,CAAArB,QAAA,CAAa,GAAb,CAAkB,KAAlB,CACHV,EAAAiC,iBAAJ,GACE5I,CAAA,CAAQ2G,CAAAiC,iBAAA,CAAyB,GAAzB,CAA+BF,CAA/B,CAAR,CAA8CzB,CAA9C,CAEA,CADAjH,CAAA,CAAQ2G,CAAAiC,iBAAA,CAAyB,GAAzB,CAA+BF,CAA/B,CAAsC,KAAtC,CAAR,CAAsDzB,CAAtD,CACA,CAAAjH,CAAA,CAAQ2G,CAAAiC,iBAAA,CAAyB,GAAzB,CAA+BF,CAA/B,CAAsC,GAAtC,CAAR,CAAoDzB,CAApD,CAHF,CAJ4B,CAA9B,CAWAjH,EAAA,CAAQqI,CAAR,CAAkB,QAAQ,CAAC1B,CAAD,CAAU,CAClC,GAAI,CAAC2B,CAAL,CAAiB,CAEf,IAAIlB,EAAQqB,CAAAI,KAAA,CADI,GACJ,CADUlC,CAAAmC,UACV,CAD8B,GAC9B,CACR1B,EAAJ,EACEkB,CACA,CADa3B,CACb,CAAA4B,CAAA;AAAUlB,CAAAD,CAAA,CAAM,CAAN,CAAAC,EAAY,EAAZA,SAAA,CAAwB,MAAxB,CAAgC,GAAhC,CAFZ,EAIErH,CAAA,CAAQ2G,CAAAoC,WAAR,CAA4B,QAAQ,CAACC,CAAD,CAAO,CACpCV,CAAAA,CAAL,EAAmBE,CAAA,CAAMQ,CAAAN,KAAN,CAAnB,GACEJ,C
 ACA,CADa3B,CACb,CAAA4B,CAAA,CAASS,CAAAjI,MAFX,CADyC,CAA3C,CAPa,CADiB,CAApC,CAiBIuH,EAAJ,EACEF,CAAA,CAAUE,CAAV,CAAsBC,CAAA,CAAS,CAACA,CAAD,CAAT,CAAoB,EAA1C,CAxCqC,CA8DzCH,QAASA,GAAS,CAACzB,CAAD,CAAUsC,CAAV,CAAmB,CACnC,IAAIC,EAAcA,QAAQ,EAAG,CAC3BvC,CAAA,CAAUC,CAAA,CAAOD,CAAP,CAEV,IAAIA,CAAAwC,SAAA,EAAJ,CAAwB,CACtB,IAAIC,EAAOzC,CAAA,CAAQ,CAAR,CAAD,GAAgBrH,CAAhB,CAA4B,UAA5B,CAAyCoH,EAAA,CAAYC,CAAZ,CACnD,MAAMvC,GAAA,CAAS,SAAT,CAAwEgF,CAAxE,CAAN,CAFsB,CAKxBH,CAAA,CAAUA,CAAV,EAAqB,EACrBA,EAAAzH,QAAA,CAAgB,CAAC,UAAD,CAAa,QAAQ,CAAC6H,CAAD,CAAW,CAC9CA,CAAAtI,MAAA,CAAe,cAAf,CAA+B4F,CAA/B,CAD8C,CAAhC,CAAhB,CAGAsC,EAAAzH,QAAA,CAAgB,IAAhB,CACI2H,EAAAA,CAAWG,EAAA,CAAeL,CAAf,CACfE,EAAAI,OAAA,CAAgB,CAAC,YAAD,CAAe,cAAf,CAA+B,UAA/B,CAA2C,WAA3C,CAAwD,UAAxD,CACb,QAAQ,CAACC,CAAD,CAAQ7C,CAAR,CAAiB8C,CAAjB,CAA0BN,CAA1B,CAAoCO,CAApC,CAA6C,CACpDF,CAAAG,OAAA,CAAa,QAAQ,EAAG,CACtBhD,CAAAiD,KAAA,CAAa,WAAb,CAA0BT,CAA1B,CACAM,EAAA,CAAQ9C,CAAR,CAAA,CAAiB6C,CAAjB,CAFsB,CAAxB,CADoD,CADxC,CAAhB,CAQA,OAAOL,EAtBoB,CAA7B
 ,CAyBIU,EAAqB,sBAEzB;GAAIxK,CAAJ,EAAc,CAACwK,CAAAC,KAAA,CAAwBzK,CAAAqJ,KAAxB,CAAf,CACE,MAAOQ,EAAA,EAGT7J,EAAAqJ,KAAA,CAAcrJ,CAAAqJ,KAAArB,QAAA,CAAoBwC,CAApB,CAAwC,EAAxC,CACdE,GAAAC,gBAAA,CAA0BC,QAAQ,CAACC,CAAD,CAAe,CAC/ClK,CAAA,CAAQkK,CAAR,CAAsB,QAAQ,CAAC3B,CAAD,CAAS,CACrCU,CAAAxI,KAAA,CAAa8H,CAAb,CADqC,CAAvC,CAGAW,EAAA,EAJ+C,CAjCd,CA0CrCiB,QAASA,GAAU,CAACzB,CAAD,CAAO0B,CAAP,CAAiB,CAClCA,CAAA,CAAYA,CAAZ,EAAyB,GACzB,OAAO1B,EAAArB,QAAA,CAAagD,EAAb,CAAgC,QAAQ,CAACC,CAAD,CAASC,CAAT,CAAc,CAC3D,OAAQA,CAAA,CAAMH,CAAN,CAAkB,EAA1B,EAAgCE,CAAAE,YAAA,EAD2B,CAAtD,CAF2B,CAkCpCC,QAASA,GAAS,CAACC,CAAD,CAAMhC,CAAN,CAAYiC,CAAZ,CAAoB,CACpC,GAAI,CAACD,CAAL,CACE,KAAMtG,GAAA,CAAS,MAAT,CAA2CsE,CAA3C,EAAmD,GAAnD,CAA0DiC,CAA1D,EAAoE,UAApE,CAAN,CAEF,MAAOD,EAJ6B,CAOtCE,QAASA,GAAW,CAACF,CAAD,CAAMhC,CAAN,CAAYmC,CAAZ,CAAmC,CACjDA,CAAJ,EAA6B9K,CAAA,CAAQ2K,CAAR,CAA7B,GACIA,CADJ,CACUA,CAAA,CAAIA,CAAA9K,OAAJ,CAAiB,CAAjB,CADV,CAIA6K,GAAA,CAAUrK,CAAA,CAAWsK,CAAX,CAAV,CAA2BhC,CAA3B,CAAiC,sBAAjC,EACKgC,CAAA,EAAqB,QAArB
 ,EAAO,MAAOA,EAAd,CAAgCA,CAAAI,YAAApC,KAAhC,EAAwD,QAAxD,CAAmE,MAAOgC,EAD/E,EAEA,OAAOA,EAP8C,CAevDK,QAASA,GAAuB,CAACrC,CAAD,CAAOxI,CAAP,CAAgB,CAC9C,GAAa,gBAAb,GAAIwI,CAAJ,CACE,KAAMtE,GAAA,CAAS,SAAT;AAA8DlE,CAA9D,CAAN,CAF4C,CAchD8K,QAASA,GAAM,CAACtL,CAAD,CAAMuL,CAAN,CAAYC,CAAZ,CAA2B,CACxC,GAAI,CAACD,CAAL,CAAW,MAAOvL,EACdc,EAAAA,CAAOyK,CAAAtD,MAAA,CAAW,GAAX,CAKX,KAJA,IAAIxH,CAAJ,CACIgL,EAAezL,CADnB,CAEI0L,EAAM5K,CAAAZ,OAFV,CAISgB,EAAI,CAAb,CAAgBA,CAAhB,CAAoBwK,CAApB,CAAyBxK,CAAA,EAAzB,CACET,CACA,CADMK,CAAA,CAAKI,CAAL,CACN,CAAIlB,CAAJ,GACEA,CADF,CACQ,CAACyL,CAAD,CAAgBzL,CAAhB,EAAqBS,CAArB,CADR,CAIF,OAAI,CAAC+K,CAAL,EAAsB9K,CAAA,CAAWV,CAAX,CAAtB,CACS4F,EAAA,CAAK6F,CAAL,CAAmBzL,CAAnB,CADT,CAGOA,CAhBiC,CAwB1C2L,QAASA,GAAgB,CAACC,CAAD,CAAQ,CAAA,IAC3BC,EAAYD,CAAA,CAAM,CAAN,CACZE,EAAAA,CAAUF,CAAA,CAAMA,CAAA1L,OAAN,CAAqB,CAArB,CACd,IAAI2L,CAAJ,GAAkBC,CAAlB,CACE,MAAO5E,EAAA,CAAO2E,CAAP,CAIT,KAAIlD,EAAW,CAAC1B,CAAD,CAEf,GAAG,CACDA,CAAA,CAAUA,CAAA8E,YACV,IAAI,CAAC9E,CAAL,CAAc,KACd0B,EAAA5H,KAAA,CA
 AckG,CAAd,CAHC,CAAH,MAISA,CAJT,GAIqB6E,CAJrB,CAMA,OAAO5E,EAAA,CAAOyB,CAAP,CAhBwB,CA2BjCqD,QAASA,GAAiB,CAACrM,CAAD,CAAS,CAEjC,IAAIsM,EAAkBnM,CAAA,CAAO,WAAP,CAAtB,CACI4E,EAAW5E,CAAA,CAAO,IAAP,CAMXuK,EAAAA,CAAiB1K,CAHZ,QAGL0K,GAAiB1K,CAHE,QAGnB0K,CAH+B,EAG/BA,CAGJA,EAAA6B,SAAA,CAAmB7B,CAAA6B,SAAnB,EAAuCpM,CAEvC,OAAcuK,EARL,OAQT,GAAcA,CARS,OAQvB,CAAiC8B,QAAQ,EAAG,CAE1C,IAAI5C,EAAU,EAoDd,OAAOV,SAAe,CAACG,CAAD,CAAOoD,CAAP,CAAiBC,CAAjB,CAA2B,CAE7C,GAAa,gBAAb,GAKsBrD,CALtB,CACE,KAAMtE,EAAA,CAAS,SAAT,CAIoBlE,QAJpB,CAAN,CAKA4L,CAAJ;AAAgB7C,CAAA5I,eAAA,CAAuBqI,CAAvB,CAAhB,GACEO,CAAA,CAAQP,CAAR,CADF,CACkB,IADlB,CAGA,OAAcO,EAzET,CAyEkBP,CAzElB,CAyEL,GAAcO,CAzEK,CAyEIP,CAzEJ,CAyEnB,CAA6BmD,QAAQ,EAAG,CAgNtCG,QAASA,EAAW,CAACC,CAAD,CAAWC,CAAX,CAAmBC,CAAnB,CAAiC,CACnD,MAAO,SAAQ,EAAG,CAChBC,CAAA,CAAYD,CAAZ,EAA4B,MAA5B,CAAA,CAAoC,CAACF,CAAD,CAAWC,CAAX,CAAmBpK,SAAnB,CAApC,CACA,OAAOuK,EAFS,CADiC,CA/MrD,GAAI,CAACP,CAAL,CACE,KAAMH,EAAA,CAAgB,OAAhB,CAEiDjD,CAFjD,CAAN,CAMF,IAAI0D,EAAc,EAAlB,CAGIE,EAAY,EAHhB,
 CAKIC,EAASP,CAAA,CAAY,WAAZ,CAAyB,QAAzB,CALb,CAQIK,EAAiB,cAELD,CAFK,YAGPE,CAHO,UAcTR,CAdS,MAuBbpD,CAvBa,UAoCTsD,CAAA,CAAY,UAAZ,CAAwB,UAAxB,CApCS,SA+CVA,CAAA,CAAY,UAAZ,CAAwB,SAAxB,CA/CU,SA0DVA,CAAA,CAAY,UAAZ,CAAwB,SAAxB,CA1DU,OAqEZA,CAAA,CAAY,UAAZ,CAAwB,OAAxB,CArEY,UAiFTA,CAAA,CAAY,UAAZ,CAAwB,UAAxB,CAAoC,SAApC,CAjFS,WAmHRA,CAAA,CAAY,kBAAZ,CAAgC,UAAhC,CAnHQ,QA8HXA,CAAA,CAAY,iBAAZ,CAA+B,UAA/B,CA9HW;WA0IPA,CAAA,CAAY,qBAAZ,CAAmC,UAAnC,CA1IO,WAuJRA,CAAA,CAAY,kBAAZ,CAAgC,WAAhC,CAvJQ,QAkKXO,CAlKW,KA8KdC,QAAQ,CAACC,CAAD,CAAQ,CACnBH,CAAA7L,KAAA,CAAegM,CAAf,CACA,OAAO,KAFY,CA9KF,CAoLjBV,EAAJ,EACEQ,CAAA,CAAOR,CAAP,CAGF,OAAQM,EAxM8B,CAzET,EAyE/B,CAX+C,CAtDP,CART,EAQnC,CAdiC,CAynBnCK,QAASA,GAAS,CAAChE,CAAD,CAAO,CACvB,MAAOA,EAAArB,QAAA,CACGsF,EADH,CACyB,QAAQ,CAACC,CAAD,CAAIxC,CAAJ,CAAeE,CAAf,CAAuBuC,CAAvB,CAA+B,CACnE,MAAOA,EAAA,CAASvC,CAAAwC,YAAA,EAAT,CAAgCxC,CAD4B,CADhE,CAAAjD,QAAA,CAIG0F,EAJH,CAIoB,OAJpB,CADgB,CAgBzBC,QAASA,GAAuB,CAACtE,CAAD,CAAOuE,CAAP,CAAqBC,CAArB,CAAkCC,CAAlC,CAAuD,CAMrFC,QAASA
 ,EAAW,CAACC,CAAD,CAAQ,CAAA,IAEtB3J,EAAOwJ,CAAA,EAAeG,CAAf,CAAuB,CAAC,IAAAC,OAAA,CAAYD,CAAZ,CAAD,CAAvB,CAA8C,CAAC,IAAD,CAF/B,CAGtBE,EAAYN,CAHU,CAItBO,CAJsB,CAIjBC,CAJiB,CAIPC,CAJO,CAKtB/G,CALsB,CAKbgH,CALa,CAKYC,CAEtC,IAAI,CAACT,CAAL,EAAqC,IAArC,EAA4BE,CAA5B,CACE,IAAA,CAAM3J,CAAA9D,OAAN,CAAA,CAEE,IADA4N,CACkB,CADZ9J,CAAAmK,MAAA,EACY,CAAdJ,CAAc,CAAH,CAAG,CAAAC,CAAA,CAAYF,CAAA5N,OAA9B,CAA0C6N,CAA1C,CAAqDC,CAArD,CAAgED,CAAA,EAAhE,CAOE,IANA9G,CAMoB,CANVC,CAAA,CAAO4G,CAAA,CAAIC,CAAJ,CAAP,CAMU,CALhBF,CAAJ,CACE5G,CAAAmH,eAAA,CAAuB,UAAvB,CADF,CAGEP,CAHF,CAGc,CAACA,CAEK,CAAhBI,CAAgB,CAAH,CAAG,CAAAI,CAAA,CAAenO,CAAAgO,CAAAhO,CAAW+G,CAAAiH,SAAA,EAAXhO,QAAnC,CACI+N,CADJ;AACiBI,CADjB,CAEIJ,CAAA,EAFJ,CAGEjK,CAAAjD,KAAA,CAAUuN,EAAA,CAAOJ,CAAA,CAASD,CAAT,CAAP,CAAV,CAKR,OAAOM,EAAArI,MAAA,CAAmB,IAAnB,CAAyB9D,SAAzB,CAzBmB,CAL5B,IAAImM,EAAeD,EAAAxI,GAAA,CAAUkD,CAAV,CAAnB,CACAuF,EAAeA,CAAAC,UAAfD,EAAyCA,CACzCb,EAAAc,UAAA,CAAwBD,CACxBD,GAAAxI,GAAA,CAAUkD,CAAV,CAAA,CAAkB0E,CAJmE,CAoCvFe,QAASA,EAAM,CAACxH,C
 AAD,CAAU,CACvB,GAAIA,CAAJ,WAAuBwH,EAAvB,CACE,MAAOxH,EAET,IAAI,EAAE,IAAF,WAAkBwH,EAAlB,CAAJ,CAA+B,CAC7B,GAAIrO,CAAA,CAAS6G,CAAT,CAAJ,EAA8C,GAA9C,EAAyBA,CAAA1B,OAAA,CAAe,CAAf,CAAzB,CACE,KAAMmJ,GAAA,CAAa,OAAb,CAAN,CAEF,MAAO,KAAID,CAAJ,CAAWxH,CAAX,CAJsB,CAO/B,GAAI7G,CAAA,CAAS6G,CAAT,CAAJ,CAAuB,CACrB,IAAI0H,EAAM/O,CAAAgP,cAAA,CAAuB,KAAvB,CAGVD,EAAAE,UAAA,CAAgB,mBAAhB,CAAsC5H,CACtC0H,EAAAG,YAAA,CAAgBH,CAAAI,WAAhB,CACAC,GAAA,CAAe,IAAf,CAAqBL,CAAAM,WAArB,CACe/H,EAAAgI,CAAOtP,CAAAuP,uBAAA,EAAPD,CACf3H,OAAA,CAAgB,IAAhB,CARqB,CAAvB,IAUEyH,GAAA,CAAe,IAAf,CAAqB/H,CAArB,CArBqB,CAyBzBmI,QAASA,GAAW,CAACnI,CAAD,CAAU,CAC5B,MAAOA,EAAAoI,UAAA,CAAkB,CAAA,CAAlB,CADqB,CAI9BC,QAASA,GAAY,CAACrI,CAAD,CAAS,CAC5BsI,EAAA,CAAiBtI,CAAjB,CAD4B,KAElB/F,EAAI,CAAd,KAAiBgN,CAAjB,CAA4BjH,CAAAgI,WAA5B;AAAkD,EAAlD,CAAsD/N,CAAtD,CAA0DgN,CAAAhO,OAA1D,CAA2EgB,CAAA,EAA3E,CACEoO,EAAA,CAAapB,CAAA,CAAShN,CAAT,CAAb,CAH0B,CAO9BsO,QAASA,GAAS,CAACvI,CAAD,CAAUwI,CAAV,CAAgB3J,CAAhB,CAAoB4J,CAApB,CAAiC,CACjD,GAAI1M,CAAA,CAAU0M,CAAV,CA
 AJ,CAA4B,KAAMhB,GAAA,CAAa,SAAb,CAAN,CADqB,IAG7CiB,EAASC,EAAA,CAAmB3I,CAAnB,CAA4B,QAA5B,CACA2I,GAAAC,CAAmB5I,CAAnB4I,CAA4B,QAA5BA,CAEb,GAEI9M,CAAA,CAAY0M,CAAZ,CAAJ,CACEnP,CAAA,CAAQqP,CAAR,CAAgB,QAAQ,CAACG,CAAD,CAAeL,CAAf,CAAqB,CAC3CM,EAAA,CAAsB9I,CAAtB,CAA+BwI,CAA/B,CAAqCK,CAArC,CACA,QAAOH,CAAA,CAAOF,CAAP,CAFoC,CAA7C,CADF,CAMEnP,CAAA,CAAQmP,CAAAxH,MAAA,CAAW,GAAX,CAAR,CAAyB,QAAQ,CAACwH,CAAD,CAAO,CAClC1M,CAAA,CAAY+C,CAAZ,CAAJ,EACEiK,EAAA,CAAsB9I,CAAtB,CAA+BwI,CAA/B,CAAqCE,CAAA,CAAOF,CAAP,CAArC,CACA,CAAA,OAAOE,CAAA,CAAOF,CAAP,CAFT,EAIEtL,EAAA,CAAYwL,CAAA,CAAOF,CAAP,CAAZ,EAA4B,EAA5B,CAAgC3J,CAAhC,CALoC,CAAxC,CARF,CANiD,CAyBnDyJ,QAASA,GAAgB,CAACtI,CAAD,CAAU+B,CAAV,CAAgB,CAAA,IACnCgH,EAAY/I,CAAA,CAAQgJ,EAAR,CADuB,CAEnCC,EAAeC,EAAA,CAAQH,CAAR,CAEfE,EAAJ,GACMlH,CAAJ,CACE,OAAOmH,EAAA,CAAQH,CAAR,CAAA9F,KAAA,CAAwBlB,CAAxB,CADT,EAKIkH,CAAAL,OAKJ,GAJEK,CAAAP,OAAAS,SACA,EADgCF,CAAAL,OAAA,CAAoB,EAApB,CAAwB,UAAxB,CAChC,CAAAL,EAAA,CAAUvI,CAAV,CAGF,EADA,OAAOkJ,EAAA,CAAQH,CAAR,CACP,CAAA/I,CAAA,CAAQgJ,E
 AAR,CAAA,CAAkBpQ,CAVlB,CADF,CAJuC,CAmBzC+P,QAASA,GAAkB,CAAC3I,CAAD,CAAUxG,CAAV,CAAeY,CAAf,CAAsB,CAAA,IAC3C2O,EAAY/I,CAAA,CAAQgJ,EAAR,CAD+B,CAE3CC,EAAeC,EAAA,CAAQH,CAAR,EAAsB,EAAtB,CAEnB,IAAIhN,CAAA,CAAU3B,CAAV,CAAJ,CACO6O,CAIL,GAHEjJ,CAAA,CAAQgJ,EAAR,CACA,CADkBD,CAClB,CAvJuB,EAAEK,EAuJzB,CAAAH,CAAA,CAAeC,EAAA,CAAQH,CAAR,CAAf,CAAoC,EAEtC,EAAAE,CAAA,CAAazP,CAAb,CAAA,CAAoBY,CALtB,KAOE,OAAO6O,EAAP,EAAuBA,CAAA,CAAazP,CAAb,CAXsB,CAejD6P,QAASA,GAAU,CAACrJ,CAAD;AAAUxG,CAAV,CAAeY,CAAf,CAAsB,CAAA,IACnC6I,EAAO0F,EAAA,CAAmB3I,CAAnB,CAA4B,MAA5B,CAD4B,CAEnCsJ,EAAWvN,CAAA,CAAU3B,CAAV,CAFwB,CAGnCmP,EAAa,CAACD,CAAdC,EAA0BxN,CAAA,CAAUvC,CAAV,CAHS,CAInCgQ,EAAiBD,CAAjBC,EAA+B,CAACxN,CAAA,CAASxC,CAAT,CAE/ByJ,EAAL,EAAcuG,CAAd,EACEb,EAAA,CAAmB3I,CAAnB,CAA4B,MAA5B,CAAoCiD,CAApC,CAA2C,EAA3C,CAGF,IAAIqG,CAAJ,CACErG,CAAA,CAAKzJ,CAAL,CAAA,CAAYY,CADd,KAGE,IAAImP,CAAJ,CAAgB,CACd,GAAIC,CAAJ,CAEE,MAAOvG,EAAP,EAAeA,CAAA,CAAKzJ,CAAL,CAEfyB,EAAA,CAAOgI,CAAP,CAAazJ,CAAb,CALY,CAAhB,IAQE,OAAOyJ,EArB4B,CA0BzCwG,QAASA,GAA
 c,CAACzJ,CAAD,CAAU0J,CAAV,CAAoB,CACzC,MAAK1J,EAAA2J,aAAL,CAEuC,EAFvC,CACSjJ,CAAA,GAAAA,EAAOV,CAAA2J,aAAA,CAAqB,OAArB,CAAPjJ,EAAwC,EAAxCA,EAA8C,GAA9CA,SAAA,CAA2D,SAA3D,CAAsE,GAAtE,CAAA1D,QAAA,CACI,GADJ,CACU0M,CADV,CACqB,GADrB,CADT,CAAkC,CAAA,CADO,CAM3CE,QAASA,GAAiB,CAAC5J,CAAD,CAAU6J,CAAV,CAAsB,CAC1CA,CAAJ,EAAkB7J,CAAA8J,aAAlB,EACEzQ,CAAA,CAAQwQ,CAAA7I,MAAA,CAAiB,GAAjB,CAAR,CAA+B,QAAQ,CAAC+I,CAAD,CAAW,CAChD/J,CAAA8J,aAAA,CAAqB,OAArB,CAA8BE,EAAA,CACzBtJ,CAAA,GAAAA,EAAOV,CAAA2J,aAAA,CAAqB,OAArB,CAAPjJ,EAAwC,EAAxCA,EAA8C,GAA9CA,SAAA,CACQ,SADR,CACmB,GADnB,CAAAA,QAAA,CAEQ,GAFR,CAEcsJ,EAAA,CAAKD,CAAL,CAFd,CAE+B,GAF/B,CAEoC,GAFpC,CADyB,CAA9B,CADgD,CAAlD,CAF4C,CAYhDE,QAASA,GAAc,CAACjK,CAAD,CAAU6J,CAAV,CAAsB,CAC3C,GAAIA,CAAJ,EAAkB7J,CAAA8J,aAAlB,CAAwC,CACtC,IAAII,EAAmBxJ,CAAA,GAAAA;CAAOV,CAAA2J,aAAA,CAAqB,OAArB,CAAPjJ,EAAwC,EAAxCA,EAA8C,GAA9CA,SAAA,CACU,SADV,CACqB,GADrB,CAGvBrH,EAAA,CAAQwQ,CAAA7I,MAAA,CAAiB,GAAjB,CAAR,CAA+B,QAAQ,CAAC+I,CAAD,CAAW,CAChDA,CAAA,CAAWC,EAAA,CAAKD,CAAL,CAC4C,GAAvD,G
 AAIG,CAAAlN,QAAA,CAAwB,GAAxB,CAA8B+M,CAA9B,CAAyC,GAAzC,CAAJ,GACEG,CADF,EACqBH,CADrB,CACgC,GADhC,CAFgD,CAAlD,CAOA/J,EAAA8J,aAAA,CAAqB,OAArB,CAA8BE,EAAA,CAAKE,CAAL,CAA9B,CAXsC,CADG,CAgB7CnC,QAASA,GAAc,CAACoC,CAAD,CAAOzI,CAAP,CAAiB,CACtC,GAAIA,CAAJ,CAAc,CACZA,CAAA,CAAaA,CAAAhF,SACF,EADuB,CAAAX,CAAA,CAAU2F,CAAAzI,OAAV,CACvB,EADsDD,EAAA,CAAS0I,CAAT,CACtD,CACP,CAAEA,CAAF,CADO,CAAPA,CAEJ,KAAI,IAAIzH,EAAE,CAAV,CAAaA,CAAb,CAAiByH,CAAAzI,OAAjB,CAAkCgB,CAAA,EAAlC,CACEkQ,CAAArQ,KAAA,CAAU4H,CAAA,CAASzH,CAAT,CAAV,CALU,CADwB,CAWxCmQ,QAASA,GAAgB,CAACpK,CAAD,CAAU+B,CAAV,CAAgB,CACvC,MAAOsI,GAAA,CAAoBrK,CAApB,CAA6B,GAA7B,EAAoC+B,CAApC,EAA4C,cAA5C,EAA+D,YAA/D,CADgC,CAIzCsI,QAASA,GAAmB,CAACrK,CAAD,CAAU+B,CAAV,CAAgB3H,CAAhB,CAAuB,CACjD4F,CAAA,CAAUC,CAAA,CAAOD,CAAP,CAIgB,EAA1B,EAAGA,CAAA,CAAQ,CAAR,CAAA9G,SAAH,GACE8G,CADF,CACYA,CAAApD,KAAA,CAAa,MAAb,CADZ,CAKA,KAFIiF,CAEJ,CAFYzI,CAAA,CAAQ2I,CAAR,CAAA,CAAgBA,CAAhB,CAAuB,CAACA,CAAD,CAEnC,CAAO/B,CAAA/G,OAAP,CAAA,CAAuB,CAErB,IAFqB,IAEZgB,EAAI,CAFQ,CAELqQ,EAAKzI
 ,CAAA5I,OAArB,CAAmCgB,CAAnC,CAAuCqQ,CAAvC,CAA2CrQ,CAAA,EAA3C,CACE,IAAKG,CAAL,CAAa4F,CAAAiD,KAAA,CAAapB,CAAA,CAAM5H,CAAN,CAAb,CAAb,IAAyCrB,CAAzC,CAAoD,MAAOwB,EAE7D4F,EAAA,CAAUA,CAAAxE,OAAA,EALW,CAV0B,CApvEZ;AAuwEvC+O,QAASA,GAAW,CAACvK,CAAD,CAAU,CAC5B,IAD4B,IACnB/F,EAAI,CADe,CACZ+N,EAAahI,CAAAgI,WAA7B,CAAiD/N,CAAjD,CAAqD+N,CAAA/O,OAArD,CAAwEgB,CAAA,EAAxE,CACEoO,EAAA,CAAaL,CAAA,CAAW/N,CAAX,CAAb,CAEF,KAAA,CAAO+F,CAAA8H,WAAP,CAAA,CACE9H,CAAA6H,YAAA,CAAoB7H,CAAA8H,WAApB,CAL0B,CA+D9B0C,QAASA,GAAkB,CAACxK,CAAD,CAAU+B,CAAV,CAAgB,CAEzC,IAAI0I,EAAcC,EAAA,CAAa3I,CAAA8B,YAAA,EAAb,CAGlB,OAAO4G,EAAP,EAAsBE,EAAA,CAAiB3K,CAAAtD,SAAjB,CAAtB,EAA4D+N,CALnB,CAgM3CG,QAASA,GAAkB,CAAC5K,CAAD,CAAU0I,CAAV,CAAkB,CAC3C,IAAIG,EAAeA,QAAS,CAACgC,CAAD,CAAQrC,CAAR,CAAc,CACnCqC,CAAAC,eAAL,GACED,CAAAC,eADF,CACyBC,QAAQ,EAAG,CAChCF,CAAAG,YAAA,CAAoB,CAAA,CADY,CADpC,CAMKH,EAAAI,gBAAL,GACEJ,CAAAI,gBADF,CAC0BC,QAAQ,EAAG,CACjCL,CAAAM,aAAA,CAAqB,CAAA,CADY,CADrC,CAMKN,EAAAO,OAAL,GACEP,CAAAO,OADF,CACiBP,CAAAQ,WADjB,EACqC1S,CAD
 rC,CAIA,IAAImD,CAAA,CAAY+O,CAAAS,iBAAZ,CAAJ,CAAyC,CACvC,IAAIC,EAAUV,CAAAC,eACdD,EAAAC,eAAA,CAAuBC,QAAQ,EAAG,CAChCF,CAAAS,iBAAA,CAAyB,CAAA,CACzBC,EAAA5R,KAAA,CAAakR,CAAb,CAFgC,CAIlCA;CAAAS,iBAAA,CAAyB,CAAA,CANc,CASzCT,CAAAW,mBAAA,CAA2BC,QAAQ,EAAG,CACpC,MAAOZ,EAAAS,iBAAP,EAAuD,CAAA,CAAvD,GAAiCT,CAAAG,YADG,CAItC3R,EAAA,CAAQqP,CAAA,CAAOF,CAAP,EAAeqC,CAAArC,KAAf,CAAR,CAAoC,QAAQ,CAAC3J,CAAD,CAAK,CAC/CA,CAAAlF,KAAA,CAAQqG,CAAR,CAAiB6K,CAAjB,CAD+C,CAAjD,CAMY,EAAZ,EAAIa,CAAJ,EAEEb,CAAAC,eAEA,CAFuB,IAEvB,CADAD,CAAAI,gBACA,CADwB,IACxB,CAAAJ,CAAAW,mBAAA,CAA2B,IAJ7B,GAOE,OAAOX,CAAAC,eAEP,CADA,OAAOD,CAAAI,gBACP,CAAA,OAAOJ,CAAAW,mBATT,CApCwC,CAgD1C3C,EAAA8C,KAAA,CAAoB3L,CACpB,OAAO6I,EAlDoC,CA0R7C+C,QAASA,GAAO,CAAC7S,CAAD,CAAM,CAAA,IAChB8S,EAAU,MAAO9S,EADD,CAEhBS,CAEW,SAAf,EAAIqS,CAAJ,EAAmC,IAAnC,GAA2B9S,CAA3B,CACsC,UAApC,EAAI,OAAQS,CAAR,CAAcT,CAAAiC,UAAd,CAAJ,CAEExB,CAFF,CAEQT,CAAAiC,UAAA,EAFR,CAGWxB,CAHX,GAGmBZ,CAHnB,GAIEY,CAJF,CAIQT,CAAAiC,UAJR,CAIwBX,EAAA,EAJxB,CADF,CAQEb,CARF,CAQQT,CAGR,OAAO8S
 ,EAAP,CAAiB,GAAjB,CAAuBrS,CAfH,CAqBtBsS,QAASA,GAAO,CAAC7O,CAAD,CAAO,CACrB5D,CAAA,CAAQ4D,CAAR,CAAe,IAAA8O,IAAf,CAAyB,IAAzB,CADqB,CArzFgB;AAs5FvCC,QAASA,GAAQ,CAACnN,CAAD,CAAK,CAAA,IAChBoN,CADgB,CAEhBC,CAIa,WAAjB,EAAI,MAAOrN,EAAX,EACQoN,CADR,CACkBpN,CAAAoN,QADlB,IAEIA,CAUA,CAVU,EAUV,CATIpN,CAAA5F,OASJ,GAREiT,CAEA,CAFSrN,CAAA1C,SAAA,EAAAuE,QAAA,CAAsByL,EAAtB,CAAsC,EAAtC,CAET,CADAC,CACA,CADUF,CAAAzL,MAAA,CAAa4L,EAAb,CACV,CAAAhT,CAAA,CAAQ+S,CAAA,CAAQ,CAAR,CAAApL,MAAA,CAAiBsL,EAAjB,CAAR,CAAwC,QAAQ,CAACvI,CAAD,CAAK,CACnDA,CAAArD,QAAA,CAAY6L,EAAZ,CAAoB,QAAQ,CAACC,CAAD,CAAMC,CAAN,CAAkB1K,CAAlB,CAAuB,CACjDkK,CAAAnS,KAAA,CAAaiI,CAAb,CADiD,CAAnD,CADmD,CAArD,CAMF,EAAAlD,CAAAoN,QAAA,CAAaA,CAZjB,EAcW7S,CAAA,CAAQyF,CAAR,CAAJ,EACL6N,CAEA,CAFO7N,CAAA5F,OAEP,CAFmB,CAEnB,CADAgL,EAAA,CAAYpF,CAAA,CAAG6N,CAAH,CAAZ,CAAsB,IAAtB,CACA,CAAAT,CAAA,CAAUpN,CAAAE,MAAA,CAAS,CAAT,CAAY2N,CAAZ,CAHL,EAKLzI,EAAA,CAAYpF,CAAZ,CAAgB,IAAhB,CAAsB,CAAA,CAAtB,CAEF,OAAOoN,EA3Ba,CAkhBtBtJ,QAASA,GAAc,CAACgK,CAAD,CAAgB,CAmCrCC,QAAS
 A,EAAa,CAACC,CAAD,CAAW,CAC/B,MAAO,SAAQ,CAACrT,CAAD,CAAMY,CAAN,CAAa,CAC1B,GAAI4B,CAAA,CAASxC,CAAT,CAAJ,CACEH,CAAA,CAAQG,CAAR,CAAaU,EAAA,CAAc2S,CAAd,CAAb,CADF,KAGE,OAAOA,EAAA,CAASrT,CAAT,CAAcY,CAAd,CAJiB,CADG,CAUjCkL,QAASA,EAAQ,CAACvD,CAAD,CAAO+K,CAAP,CAAkB,CACjC1I,EAAA,CAAwBrC,CAAxB,CAA8B,SAA9B,CACA,IAAItI,CAAA,CAAWqT,CAAX,CAAJ,EAA6B1T,CAAA,CAAQ0T,CAAR,CAA7B,CACEA,CAAA,CAAYC,CAAAC,YAAA,CAA6BF,CAA7B,CAEd,IAAI,CAACA,CAAAG,KAAL,CACE,KAAMjI,GAAA,CAAgB,MAAhB,CAA2EjD,CAA3E,CAAN,CAEF,MAAOmL,EAAA,CAAcnL,CAAd,CAAqBoL,CAArB,CAAP,CAA8CL,CARb,CAWnC5H,QAASA,EAAO,CAACnD,CAAD,CAAOqL,CAAP,CAAkB,CAAE,MAAO9H,EAAA,CAASvD,CAAT;AAAe,MAAQqL,CAAR,CAAf,CAAT,CA6BlCC,QAASA,EAAW,CAACV,CAAD,CAAe,CAAA,IAC7BhH,EAAY,EADiB,CACb2H,CADa,CACH7H,CADG,CACUxL,CADV,CACaqQ,CAC9CjR,EAAA,CAAQsT,CAAR,CAAuB,QAAQ,CAAC/K,CAAD,CAAS,CACtC,GAAI,CAAA2L,CAAAC,IAAA,CAAkB5L,CAAlB,CAAJ,CAAA,CACA2L,CAAAxB,IAAA,CAAkBnK,CAAlB,CAA0B,CAAA,CAA1B,CAEA,IAAI,CACF,GAAIzI,CAAA,CAASyI,CAAT,CAAJ,CAIE,IAHA0L,CAGgD,CAHrCG,EAAA,CAAc7L,CAAd,CAGqC,CAFhD+
 D,CAEgD,CAFpCA,CAAAzG,OAAA,CAAiBmO,CAAA,CAAYC,CAAAnI,SAAZ,CAAjB,CAAAjG,OAAA,CAAwDoO,CAAAI,WAAxD,CAEoC,CAA5CjI,CAA4C,CAA9B6H,CAAAK,aAA8B,CAAP1T,CAAO,CAAH,CAAG,CAAAqQ,CAAA,CAAK7E,CAAAxM,OAArD,CAAyEgB,CAAzE,CAA6EqQ,CAA7E,CAAiFrQ,CAAA,EAAjF,CAAsF,CAAA,IAChF2T,EAAanI,CAAA,CAAYxL,CAAZ,CADmE,CAEhFqL,EAAWyH,CAAAS,IAAA,CAAqBI,CAAA,CAAW,CAAX,CAArB,CAEftI,EAAA,CAASsI,CAAA,CAAW,CAAX,CAAT,CAAA3O,MAAA,CAA8BqG,CAA9B,CAAwCsI,CAAA,CAAW,CAAX,CAAxC,CAJoF,CAJxF,IAUWnU,EAAA,CAAWmI,CAAX,CAAJ,CACH+D,CAAA7L,KAAA,CAAeiT,CAAAnK,OAAA,CAAwBhB,CAAxB,CAAf,CADG,CAEIxI,CAAA,CAAQwI,CAAR,CAAJ,CACH+D,CAAA7L,KAAA,CAAeiT,CAAAnK,OAAA,CAAwBhB,CAAxB,CAAf,CADG,CAGLqC,EAAA,CAAYrC,CAAZ,CAAoB,QAApB,CAhBA,CAkBF,MAAOxB,CAAP,CAAU,CAYV,KAXIhH,EAAA,CAAQwI,CAAR,CAWE,GAVJA,CAUI,CAVKA,CAAA,CAAOA,CAAA3I,OAAP,CAAuB,CAAvB,CAUL,EARFmH,CAAAyN,QAQE,GARWzN,CAAA0N,MAQX,EARqD,EAQrD,EARsB1N,CAAA0N,MAAA9Q,QAAA,CAAgBoD,CAAAyN,QAAhB,CAQtB,IAFJzN,CAEI,CAFAA,CAAAyN,QAEA,CAFY,IAEZ,CAFmBzN,CAAA0N,MAEnB,EAAA9I,EAAA,CAAgB,UAAhB,CACIpD,CADJ,CACYxB,CAAA0
 N,MADZ,EACuB1N,CAAAyN,QADvB,EACoCzN,CADpC,CAAN,CAZU,CArBZ,CADsC,CAAxC,CAsCA,OAAOuF,EAxC0B,CA+CnCoI,QAASA,EAAsB,CAACC,CAAD,CAAQ9I,CAAR,CAAiB,CAE9C+I,QAASA,EAAU,CAACC,CAAD,CAAc,CAC/B,GAAIF,CAAAtU,eAAA,CAAqBwU,CAArB,CAAJ,CAAuC,CACrC,GAAIF,CAAA,CAAME,CAAN,CAAJ;AAA2BC,CAA3B,CACE,KAAMnJ,GAAA,CAAgB,MAAhB,CAA0DV,CAAA5J,KAAA,CAAU,MAAV,CAA1D,CAAN,CAEF,MAAOsT,EAAA,CAAME,CAAN,CAJ8B,CAMrC,GAAI,CAGF,MAFA5J,EAAAzJ,QAAA,CAAaqT,CAAb,CAEO,CADPF,CAAA,CAAME,CAAN,CACO,CADcC,CACd,CAAAH,CAAA,CAAME,CAAN,CAAA,CAAqBhJ,CAAA,CAAQgJ,CAAR,CAH1B,CAAJ,OAIU,CACR5J,CAAA4C,MAAA,EADQ,CAXmB,CAiBjCtE,QAASA,EAAM,CAAC/D,CAAD,CAAKD,CAAL,CAAWwP,CAAX,CAAkB,CAAA,IAC3BC,EAAO,EADoB,CAE3BpC,EAAUD,EAAA,CAASnN,CAAT,CAFiB,CAG3B5F,CAH2B,CAGnBgB,CAHmB,CAI3BT,CAEAS,EAAA,CAAI,CAAR,KAAWhB,CAAX,CAAoBgT,CAAAhT,OAApB,CAAoCgB,CAApC,CAAwChB,CAAxC,CAAgDgB,CAAA,EAAhD,CAAqD,CACnDT,CAAA,CAAMyS,CAAA,CAAQhS,CAAR,CACN,IAAmB,QAAnB,GAAI,MAAOT,EAAX,CACE,KAAMwL,GAAA,CAAgB,MAAhB,CACyExL,CADzE,CAAN,CAGF6U,CAAAvU,KAAA,CACEsU,CACA,EADUA,CAAA1U,eAAA,CAAsBF,
 CAAtB,CACV,CAAE4U,CAAA,CAAO5U,CAAP,CAAF,CACEyU,CAAA,CAAWzU,CAAX,CAHJ,CANmD,CAYhDqF,CAAAoN,QAAL,GAEEpN,CAFF,CAEOA,CAAA,CAAG5F,CAAH,CAFP,CAOA,OAAO4F,EAAAI,MAAA,CAASL,CAAT,CAAeyP,CAAf,CAzBwB,CAyCjC,MAAO,QACGzL,CADH,aAbPoK,QAAoB,CAACsB,CAAD,CAAOF,CAAP,CAAe,CAAA,IAC7BG,EAAcA,QAAQ,EAAG,EADI,CAEnBC,CAIdD,EAAAE,UAAA,CAAyBA,CAAArV,CAAA,CAAQkV,CAAR,CAAA,CAAgBA,CAAA,CAAKA,CAAArV,OAAL,CAAmB,CAAnB,CAAhB,CAAwCqV,CAAxCG,WACzBC,EAAA,CAAW,IAAIH,CACfC,EAAA,CAAgB5L,CAAA,CAAO0L,CAAP,CAAaI,CAAb,CAAuBN,CAAvB,CAEhB,OAAOpS,EAAA,CAASwS,CAAT,CAAA,EAA2B/U,CAAA,CAAW+U,CAAX,CAA3B,CAAuDA,CAAvD,CAAuEE,CAV7C,CAa5B,KAGAT,CAHA,UAIKjC,EAJL,KAKA2C,QAAQ,CAAC5M,CAAD,CAAO,CAClB,MAAOmL,EAAAxT,eAAA,CAA6BqI,CAA7B;AAAoCoL,CAApC,CAAP,EAA8Da,CAAAtU,eAAA,CAAqBqI,CAArB,CAD5C,CALf,CA5DuC,CApIX,IACjCoM,EAAgB,EADiB,CAEjChB,EAAiB,UAFgB,CAGjC7I,EAAO,EAH0B,CAIjCiJ,EAAgB,IAAIzB,EAJa,CAKjCoB,EAAgB,UACJ,UACIN,CAAA,CAActH,CAAd,CADJ,SAEGsH,CAAA,CAAc1H,CAAd,CAFH,SAGG0H,CAAA,CAiDnBgC,QAAgB,CAAC7M,CAAD,CAAOoC,CAAP,CAAoB,CAClC,MAAOe,EAAA,CAAQn
 D,CAAR,CAAc,CAAC,WAAD,CAAc,QAAQ,CAAC8M,CAAD,CAAY,CACrD,MAAOA,EAAA7B,YAAA,CAAsB7I,CAAtB,CAD8C,CAAlC,CAAd,CAD2B,CAjDjB,CAHH,OAICyI,CAAA,CAsDjBxS,QAAc,CAAC2H,CAAD,CAAO3C,CAAP,CAAY,CAAE,MAAO8F,EAAA,CAAQnD,CAAR,CAAclG,EAAA,CAAQuD,CAAR,CAAd,CAAT,CAtDT,CAJD,UAKIwN,CAAA,CAuDpBkC,QAAiB,CAAC/M,CAAD,CAAO3H,CAAP,CAAc,CAC7BgK,EAAA,CAAwBrC,CAAxB,CAA8B,UAA9B,CACAmL,EAAA,CAAcnL,CAAd,CAAA,CAAsB3H,CACtB2U,EAAA,CAAchN,CAAd,CAAA,CAAsB3H,CAHO,CAvDX,CALJ,WAkEhB4U,QAAkB,CAACd,CAAD,CAAce,CAAd,CAAuB,CAAA,IACnCC,EAAenC,CAAAS,IAAA,CAAqBU,CAArB,CAAmCf,CAAnC,CADoB,CAEnCgC,EAAWD,CAAAjC,KAEfiC,EAAAjC,KAAA,CAAoBmC,QAAQ,EAAG,CAC7B,IAAIC,EAAeC,CAAA1M,OAAA,CAAwBuM,CAAxB,CAAkCD,CAAlC,CACnB,OAAOI,EAAA1M,OAAA,CAAwBqM,CAAxB,CAAiC,IAAjC,CAAuC,WAAYI,CAAZ,CAAvC,CAFsB,CAJQ,CAlEzB,CADI,CALiB,CAejCtC,EAAoBG,CAAA2B,UAApB9B,CACIgB,CAAA,CAAuBb,CAAvB,CAAsC,QAAQ,EAAG,CAC/C,KAAMlI,GAAA,CAAgB,MAAhB,CAAiDV,CAAA5J,KAAA,CAAU,MAAV,CAAjD,CAAN,CAD+C,CAAjD,CAhB6B,CAmBjCqU,EAAgB,EAnBiB,CAoBjCO,EAAoBP,CAAAF,UAApBS;AACIvB,CAAA,CAAuBgB,CAAvB,CA
 AsC,QAAQ,CAACQ,CAAD,CAAc,CACtDjK,CAAAA,CAAWyH,CAAAS,IAAA,CAAqB+B,CAArB,CAAmCpC,CAAnC,CACf,OAAOmC,EAAA1M,OAAA,CAAwB0C,CAAA2H,KAAxB,CAAuC3H,CAAvC,CAFmD,CAA5D,CAMRjM,EAAA,CAAQgU,CAAA,CAAYV,CAAZ,CAAR,CAAoC,QAAQ,CAAC9N,CAAD,CAAK,CAAEyQ,CAAA1M,OAAA,CAAwB/D,CAAxB,EAA8BnD,CAA9B,CAAF,CAAjD,CAEA,OAAO4T,EA7B8B,CA4PvCE,QAASA,GAAqB,EAAG,CAE/B,IAAIC,EAAuB,CAAA,CAE3B,KAAAC,qBAAA,CAA4BC,QAAQ,EAAG,CACrCF,CAAA,CAAuB,CAAA,CADc,CAIvC,KAAAxC,KAAA,CAAY,CAAC,SAAD,CAAY,WAAZ,CAAyB,YAAzB,CAAuC,QAAQ,CAAC2C,CAAD,CAAUC,CAAV,CAAqBC,CAArB,CAAiC,CAO1FC,QAASA,EAAc,CAAChT,CAAD,CAAO,CAC5B,IAAIiT,EAAS,IACb3W,EAAA,CAAQ0D,CAAR,CAAc,QAAQ,CAACiD,CAAD,CAAU,CACzBgQ,CAAL,EAA+C,GAA/C,GAAelQ,CAAA,CAAUE,CAAAtD,SAAV,CAAf,GAAoDsT,CAApD,CAA6DhQ,CAA7D,CAD8B,CAAhC,CAGA,OAAOgQ,EALqB,CAQ9BC,QAASA,EAAM,EAAG,CAAA,IACZC,EAAOL,CAAAK,KAAA,EADK,CACaC,CAGxBD,EAAL,CAGK,CAAKC,CAAL,CAAWxX,CAAAqJ,eAAA,CAAwBkO,CAAxB,CAAX,EAA2CC,CAAAC,eAAA,EAA3C,CAGA,CAAKD,CAAL,CAAWJ,CAAA,CAAepX,CAAA0X,kBAAA,CAA2BH,CAA3B,CAAf,CAAX,EAA8DC,CAAAC,eAAA,EAA9D,CAGa,KAHb
 ,GAGIF,CAHJ,EAGoBN,CAAAU,SAAA,CAAiB,CAAjB,CAAoB,CAApB,CATzB,CAAWV,CAAAU,SAAA,CAAiB,CAAjB,CAAoB,CAApB,CAJK,CAdlB,IAAI3X,EAAWiX,CAAAjX,SAgCX8W,EAAJ,EACEK,CAAAtS,OAAA,CAAkB+S,QAAwB,EAAG,CAAC,MAAOV,EAAAK,KAAA,EAAR,CAA7C;AACEM,QAA8B,EAAG,CAC/BV,CAAAvS,WAAA,CAAsB0S,CAAtB,CAD+B,CADnC,CAMF,OAAOA,EAxCmF,CAAhF,CARmB,CAuRjCQ,QAASA,GAAO,CAAC/X,CAAD,CAASC,CAAT,CAAmB+X,CAAnB,CAAyBC,CAAzB,CAAmC,CAsBjDC,QAASA,EAA0B,CAAC/R,CAAD,CAAK,CACtC,GAAI,CACFA,CAAAI,MAAA,CAAS,IAAT,CA5iGGF,EAAApF,KAAA,CA4iGsBwB,SA5iGtB,CA4iGiC6D,CA5iGjC,CA4iGH,CADE,CAAJ,OAEU,CAER,GADA6R,CAAA,EACI,CAA4B,CAA5B,GAAAA,CAAJ,CACE,IAAA,CAAMC,CAAA7X,OAAN,CAAA,CACE,GAAI,CACF6X,CAAAC,IAAA,EAAA,EADE,CAEF,MAAO3Q,CAAP,CAAU,CACVsQ,CAAAM,MAAA,CAAW5Q,CAAX,CADU,CANR,CAH4B,CAoExC6Q,QAASA,EAAW,CAACC,CAAD,CAAWC,CAAX,CAAuB,CACxCC,SAASA,GAAK,EAAG,CAChB/X,CAAA,CAAQgY,CAAR,CAAiB,QAAQ,CAACC,CAAD,CAAQ,CAAEA,CAAA,EAAF,CAAjC,CACAC,EAAA,CAAcJ,CAAA,CAAWC,EAAX,CAAkBF,CAAlB,CAFE,CAAjBE,CAAA,EADwC,CAuE3CI,QAASA,EAAa,EAAG,CACvBC,CAAA,CAAc,IACVC,EAAJ,EAAsB9S,CAA
 A+S,IAAA,EAAtB,GAEAD,CACA,CADiB9S,CAAA+S,IAAA,EACjB,CAAAtY,CAAA,CAAQuY,EAAR,CAA4B,QAAQ,CAACC,CAAD,CAAW,CAC7CA,CAAA,CAASjT,CAAA+S,IAAA,EAAT,CAD6C,CAA/C,CAHA,CAFuB,CAjKwB,IAC7C/S,EAAO,IADsC,CAE7CkT,EAAcnZ,CAAA,CAAS,CAAT,CAF+B,CAG7C0D,EAAW3D,CAAA2D,SAHkC,CAI7C0V,EAAUrZ,CAAAqZ,QAJmC,CAK7CZ,EAAazY,CAAAyY,WALgC,CAM7Ca,EAAetZ,CAAAsZ,aAN8B,CAO7CC,EAAkB,EAEtBrT,EAAAsT,OAAA,CAAc,CAAA,CAEd,KAAIrB,EAA0B,CAA9B,CACIC,EAA8B,EAGlClS,EAAAuT,6BAAA,CAAoCvB,CACpChS,EAAAwT,6BAAA,CAAoCC,QAAQ,EAAG,CAAExB,CAAA,EAAF,CA6B/CjS;CAAA0T,gCAAA,CAAuCC,QAAQ,CAACC,CAAD,CAAW,CAIxDnZ,CAAA,CAAQgY,CAAR,CAAiB,QAAQ,CAACC,CAAD,CAAQ,CAAEA,CAAA,EAAF,CAAjC,CAEgC,EAAhC,GAAIT,CAAJ,CACE2B,CAAA,EADF,CAGE1B,CAAAhX,KAAA,CAAiC0Y,CAAjC,CATsD,CA7CT,KA6D7CnB,EAAU,EA7DmC,CA8D7CE,CAcJ3S,EAAA6T,UAAA,CAAiBC,QAAQ,CAAC7T,CAAD,CAAK,CACxB/C,CAAA,CAAYyV,CAAZ,CAAJ,EAA8BN,CAAA,CAAY,GAAZ,CAAiBE,CAAjB,CAC9BE,EAAAvX,KAAA,CAAa+E,CAAb,CACA,OAAOA,EAHqB,CA5EmB,KAqG7C6S,EAAiBrV,CAAAsW,KArG4B,CAsG7CC,EAAcja,CAAAiE,KAAA,CAAc,MAAd,CAtG+B,CAuG7C6U,EAAc,IAsBl
 B7S,EAAA+S,IAAA,CAAWkB,QAAQ,CAAClB,CAAD,CAAMjR,CAAN,CAAe,CAE5BrE,CAAJ,GAAiB3D,CAAA2D,SAAjB,GAAkCA,CAAlC,CAA6C3D,CAAA2D,SAA7C,CAGA,IAAIsV,CAAJ,CACE,IAAID,CAAJ,EAAsBC,CAAtB,CAiBA,MAhBAD,EAgBO9S,CAhBU+S,CAgBV/S,CAfH+R,CAAAoB,QAAJ,CACMrR,CAAJ,CAAaqR,CAAAe,aAAA,CAAqB,IAArB,CAA2B,EAA3B,CAA+BnB,CAA/B,CAAb,EAEEI,CAAAgB,UAAA,CAAkB,IAAlB,CAAwB,EAAxB,CAA4BpB,CAA5B,CAEA,CAAAiB,CAAAvQ,KAAA,CAAiB,MAAjB,CAAyBuQ,CAAAvQ,KAAA,CAAiB,MAAjB,CAAzB,CAJF,CADF,EAQEoP,CACA,CADcE,CACd,CAAIjR,CAAJ,CACErE,CAAAqE,QAAA,CAAiBiR,CAAjB,CADF,CAGEtV,CAAAsW,KAHF,CAGkBhB,CAZpB,CAeO/S,CAAAA,CAjBP,CADF,IAwBE,OAAO6S,EAAP,EAAsBpV,CAAAsW,KAAAjS,QAAA,CAAsB,MAAtB,CAA6B,GAA7B,CA7BQ,CA7He,KA8J7CkR,GAAqB,EA9JwB,CA+J7CoB,EAAgB,CAAA,CAmCpBpU,EAAAqU,YAAA,CAAmBC,QAAQ,CAACV,CAAD,CAAW,CACpC,GAAI,CAACQ,CAAL,CAAoB,CAMlB,GAAIrC,CAAAoB,QAAJ,CAAsB9R,CAAA,CAAOvH,CAAP,CAAAiE,GAAA,CAAkB,UAAlB;AAA8B6U,CAA9B,CAEtB,IAAIb,CAAAwC,WAAJ,CAAyBlT,CAAA,CAAOvH,CAAP,CAAAiE,GAAA,CAAkB,YAAlB,CAAgC6U,CAAhC,CAAzB,KAEK5S,EAAA6T,UAAA,CAAejB,CAAf,CAELwB,EAAA,CAA
 gB,CAAA,CAZE,CAepBpB,EAAA9X,KAAA,CAAwB0Y,CAAxB,CACA,OAAOA,EAjB6B,CAkCtC5T,EAAAwU,SAAA,CAAgBC,QAAQ,EAAG,CACzB,IAAIV,EAAOC,CAAAvQ,KAAA,CAAiB,MAAjB,CACX,OAAOsQ,EAAA,CAAOA,CAAAjS,QAAA,CAAa,qBAAb,CAAoC,EAApC,CAAP,CAAiD,EAF/B,CAQ3B,KAAI4S,EAAc,EAAlB,CACIC,EAAmB,EADvB,CAEIC,EAAa5U,CAAAwU,SAAA,EAuBjBxU,EAAA6U,QAAA,CAAeC,QAAQ,CAAC3R,CAAD,CAAO3H,CAAP,CAAc,CAAA,IAE/BuZ,CAF+B,CAEJC,CAFI,CAEI3Z,CAFJ,CAEOK,CAE1C,IAAIyH,CAAJ,CACM3H,CAAJ,GAAcxB,CAAd,CACEkZ,CAAA8B,OADF,CACuBC,MAAA,CAAO9R,CAAP,CADvB,CACsC,SADtC,CACkDyR,CADlD,CAE0B,wCAF1B,CAIMra,CAAA,CAASiB,CAAT,CAJN,GAKIuZ,CAOA,CAPgB1a,CAAA6Y,CAAA8B,OAAA3a,CAAqB4a,MAAA,CAAO9R,CAAP,CAArB9I,CAAoC,GAApCA,CAA0C4a,MAAA,CAAOzZ,CAAP,CAA1CnB,CACM,QADNA,CACiBua,CADjBva,QAOhB,CANsD,CAMtD,CAAmB,IAAnB,CAAI0a,CAAJ,EACEjD,CAAAoD,KAAA,CAAU,UAAV,CAAsB/R,CAAtB,CACE,6DADF,CAEE4R,CAFF,CAEiB,iBAFjB,CAbN,CADF;IAoBO,CACL,GAAI7B,CAAA8B,OAAJ,GAA2BL,CAA3B,CAKE,IAJAA,CAIK,CAJczB,CAAA8B,OAId,CAHLG,CAGK,CAHSR,CAAAvS,MAAA,CAAuB,IAAvB,CAGT,CAFLsS,CAEK,CAFS,EAET,CAAArZ,CAAA,CAAI,C
 AAT,CAAYA,CAAZ,CAAgB8Z,CAAA9a,OAAhB,CAAoCgB,CAAA,EAApC,CACE2Z,CAEA,CAFSG,CAAA,CAAY9Z,CAAZ,CAET,CADAK,CACA,CADQsZ,CAAA5W,QAAA,CAAe,GAAf,CACR,CAAY,CAAZ,CAAI1C,CAAJ,GACEyH,CAIA,CAJOiS,QAAA,CAASJ,CAAAK,UAAA,CAAiB,CAAjB,CAAoB3Z,CAApB,CAAT,CAIP,CAAIgZ,CAAA,CAAYvR,CAAZ,CAAJ,GAA0BnJ,CAA1B,GACE0a,CAAA,CAAYvR,CAAZ,CADF,CACsBiS,QAAA,CAASJ,CAAAK,UAAA,CAAiB3Z,CAAjB,CAAyB,CAAzB,CAAT,CADtB,CALF,CAWJ,OAAOgZ,EApBF,CAxB4B,CAgErC1U,EAAAsV,MAAA,CAAaC,QAAQ,CAACtV,CAAD,CAAKuV,CAAL,CAAY,CAC/B,IAAIC,CACJxD,EAAA,EACAwD,EAAA,CAAYlD,CAAA,CAAW,QAAQ,EAAG,CAChC,OAAOc,CAAA,CAAgBoC,CAAhB,CACPzD,EAAA,CAA2B/R,CAA3B,CAFgC,CAAtB,CAGTuV,CAHS,EAGA,CAHA,CAIZnC,EAAA,CAAgBoC,CAAhB,CAAA,CAA6B,CAAA,CAC7B,OAAOA,EARwB,CAuBjCzV,EAAAsV,MAAAI,OAAA,CAAoBC,QAAQ,CAACC,CAAD,CAAU,CACpC,MAAIvC,EAAA,CAAgBuC,CAAhB,CAAJ,EACE,OAAOvC,CAAA,CAAgBuC,CAAhB,CAGA,CAFPxC,CAAA,CAAawC,CAAb,CAEO,CADP5D,CAAA,CAA2BlV,CAA3B,CACO,CAAA,CAAA,CAJT,EAMO,CAAA,CAP6B,CA5VW,CAwWnD+Y,QAASA,GAAgB,EAAE,CACzB,IAAAxH,KAAA,CAAY,CAAC,SAAD,CAAY,MAAZ,CAAoB,UAApB,CAAgC,WA
 AhC,CACR,QAAQ,CAAE2C,CAAF,CAAac,CAAb,CAAqBC,CAArB,CAAiC+D,CAAjC,CAA2C,CACjD,MAAO,KAAIjE,EAAJ,CAAYb,CAAZ,CAAqB8E,CAArB,CAAgChE,CAAhC,CAAsCC,CAAtC,CAD0C,CAD3C,CADa,CA6C3BgE,QAASA,GAAqB,EAAG,CAE/B,IAAA1H,KAAA,CAAY2H,QAAQ,EAAG,CAGrBC,QAASA,EAAY,CAACC,CAAD;AAAUC,CAAV,CAAmB,CAmFtCC,QAASA,EAAO,CAACC,CAAD,CAAQ,CAClBA,CAAJ,EAAaC,CAAb,GACOC,CAAL,CAEWA,CAFX,EAEuBF,CAFvB,GAGEE,CAHF,CAGaF,CAAAG,EAHb,EACED,CADF,CACaF,CAQb,CAHAI,CAAA,CAAKJ,CAAAG,EAAL,CAAcH,CAAAK,EAAd,CAGA,CAFAD,CAAA,CAAKJ,CAAL,CAAYC,CAAZ,CAEA,CADAA,CACA,CADWD,CACX,CAAAC,CAAAE,EAAA,CAAa,IAVf,CADsB,CAmBxBC,QAASA,EAAI,CAACE,CAAD,CAAYC,CAAZ,CAAuB,CAC9BD,CAAJ,EAAiBC,CAAjB,GACMD,CACJ,GADeA,CAAAD,EACf,CAD6BE,CAC7B,EAAIA,CAAJ,GAAeA,CAAAJ,EAAf,CAA6BG,CAA7B,CAFF,CADkC,CArGpC,GAAIT,CAAJ,GAAeW,EAAf,CACE,KAAM5c,EAAA,CAAO,eAAP,CAAA,CAAwB,KAAxB,CAAkEic,CAAlE,CAAN,CAFoC,IAKlCY,EAAO,CAL2B,CAMlCC,EAAQ1a,CAAA,CAAO,EAAP,CAAW8Z,CAAX,CAAoB,IAAKD,CAAL,CAApB,CAN0B,CAOlC7R,EAAO,EAP2B,CAQlC2S,EAAYb,CAAZa,EAAuBb,CAAAa,SAAvBA,EAA4CC,MAAAC,UARV,CASlCC,EAAU,EA
 TwB,CAUlCb,EAAW,IAVuB,CAWlCC,EAAW,IAEf,OAAOM,EAAA,CAAOX,CAAP,CAAP,CAAyB,KAElB/I,QAAQ,CAACvS,CAAD,CAAMY,CAAN,CAAa,CACxB,IAAI4b,EAAWD,CAAA,CAAQvc,CAAR,CAAXwc,GAA4BD,CAAA,CAAQvc,CAAR,CAA5Bwc,CAA2C,KAAMxc,CAAN,CAA3Cwc,CAEJhB,EAAA,CAAQgB,CAAR,CAEA,IAAI,CAAAla,CAAA,CAAY1B,CAAZ,CAAJ,CAQA,MAPMZ,EAOCY,GAPM6I,EAON7I,EAPasb,CAAA,EAObtb,CANP6I,CAAA,CAAKzJ,CAAL,CAMOY,CANKA,CAMLA,CAJHsb,CAIGtb,CAJIwb,CAIJxb,EAHL,IAAA6b,OAAA,CAAYd,CAAA3b,IAAZ,CAGKY,CAAAA,CAbiB,CAFH,KAmBlBoT,QAAQ,CAAChU,CAAD,CAAM,CACjB,IAAIwc,EAAWD,CAAA,CAAQvc,CAAR,CAEf,IAAKwc,CAAL,CAIA,MAFAhB,EAAA,CAAQgB,CAAR,CAEO,CAAA/S,CAAA,CAAKzJ,CAAL,CAPU,CAnBI,QA8Bfyc,QAAQ,CAACzc,CAAD,CAAM,CACpB,IAAIwc,EAAWD,CAAA,CAAQvc,CAAR,CAEVwc,EAAL,GAEIA,CAMJ,EANgBd,CAMhB,GAN0BA,CAM1B,CANqCc,CAAAV,EAMrC,EALIU,CAKJ,EALgBb,CAKhB,GAL0BA,CAK1B,CALqCa,CAAAZ,EAKrC,EAJAC,CAAA,CAAKW,CAAAZ,EAAL,CAAgBY,CAAAV,EAAhB,CAIA,CAFA,OAAOS,CAAA,CAAQvc,CAAR,CAEP;AADA,OAAOyJ,CAAA,CAAKzJ,CAAL,CACP,CAAAkc,CAAA,EARA,CAHoB,CA9BC,WA6CZQ,QAAQ,EAAG,CACpBjT,CAAA,CAAO,EACPyS,EAAA,CAAO
 ,CACPK,EAAA,CAAU,EACVb,EAAA,CAAWC,CAAX,CAAsB,IAJF,CA7CC,SAqDdgB,QAAQ,EAAG,CAGlBJ,CAAA,CADAJ,CACA,CAFA1S,CAEA,CAFO,IAGP,QAAOwS,CAAA,CAAOX,CAAP,CAJW,CArDG,MA6DjBsB,QAAQ,EAAG,CACf,MAAOnb,EAAA,CAAO,EAAP,CAAW0a,CAAX,CAAkB,MAAOD,CAAP,CAAlB,CADQ,CA7DM,CAba,CAFxC,IAAID,EAAS,EA2HbZ,EAAAuB,KAAA,CAAoBC,QAAQ,EAAG,CAC7B,IAAID,EAAO,EACX/c,EAAA,CAAQoc,CAAR,CAAgB,QAAQ,CAACzH,CAAD,CAAQ8G,CAAR,CAAiB,CACvCsB,CAAA,CAAKtB,CAAL,CAAA,CAAgB9G,CAAAoI,KAAA,EADuB,CAAzC,CAGA,OAAOA,EALsB,CAoB/BvB,EAAArH,IAAA,CAAmB8I,QAAQ,CAACxB,CAAD,CAAU,CACnC,MAAOW,EAAA,CAAOX,CAAP,CAD4B,CAKrC,OAAOD,EArJc,CAFQ,CAyMjC0B,QAASA,GAAsB,EAAG,CAChC,IAAAtJ,KAAA,CAAY,CAAC,eAAD,CAAkB,QAAQ,CAACuJ,CAAD,CAAgB,CACpD,MAAOA,EAAA,CAAc,WAAd,CAD6C,CAA1C,CADoB,CAoflCC,QAASA,GAAgB,CAAC/T,CAAD,CAAWgU,CAAX,CAAkC,CAAA,IACrDC,EAAgB,EADqC,CAErDC,EAAS,WAF4C,CAGrDC,EAA2B,wCAH0B,CAIrDC,EAAyB,gCAJ4B,CASrDC,EAA4B,yBAkB/B,KAAAC,UAAA;AAAiBC,QAASC,EAAiB,CAACnV,CAAD,CAAOoV,CAAP,CAAyB,CACnE/S,EAAA,CAAwBrC,CAAxB,CAA8B,WAA9B,CACI5I,EAAA,CAAS4I,CAAT,CAAJ,EACE+B,EAAA
 ,CAAUqT,CAAV,CAA4B,kBAA5B,CA2BA,CA1BKR,CAAAjd,eAAA,CAA6BqI,CAA7B,CA0BL,GAzBE4U,CAAA,CAAc5U,CAAd,CACA,CADsB,EACtB,CAAAW,CAAAwC,QAAA,CAAiBnD,CAAjB,CAAwB6U,CAAxB,CAAgC,CAAC,WAAD,CAAc,mBAAd,CAC9B,QAAQ,CAAC/H,CAAD,CAAYuI,CAAZ,CAA+B,CACrC,IAAIC,EAAa,EACjBhe,EAAA,CAAQsd,CAAA,CAAc5U,CAAd,CAAR,CAA6B,QAAQ,CAACoV,CAAD,CAAmB7c,CAAnB,CAA0B,CAC7D,GAAI,CACF,IAAI0c,EAAYnI,CAAAjM,OAAA,CAAiBuU,CAAjB,CACZ1d,EAAA,CAAWud,CAAX,CAAJ,CACEA,CADF,CACc,SAAWnb,EAAA,CAAQmb,CAAR,CAAX,CADd,CAEYlU,CAAAkU,CAAAlU,QAFZ,EAEiCkU,CAAA3B,KAFjC,GAGE2B,CAAAlU,QAHF,CAGsBjH,EAAA,CAAQmb,CAAA3B,KAAR,CAHtB,CAKA2B,EAAAM,SAAA,CAAqBN,CAAAM,SAArB,EAA2C,CAC3CN,EAAA1c,MAAA,CAAkBA,CAClB0c,EAAAjV,KAAA,CAAiBiV,CAAAjV,KAAjB,EAAmCA,CACnCiV,EAAAO,QAAA,CAAoBP,CAAAO,QAApB,EAA0CP,CAAAQ,WAA1C,EAAkER,CAAAjV,KAClEiV,EAAAS,SAAA,CAAqBT,CAAAS,SAArB,EAA2C,GAC3CJ,EAAAvd,KAAA,CAAgBkd,CAAhB,CAZE,CAaF,MAAO5W,CAAP,CAAU,CACVgX,CAAA,CAAkBhX,CAAlB,CADU,CAdiD,CAA/D,CAkBA,OAAOiX,EApB8B,CADT,CAAhC,CAwBF,EAAAV,CAAA,CAAc5U,CAAd,CAAAjI,KAAA,CAAyBqd,CAAzB,CA5BF,EA
 8BE9d,CAAA,CAAQ0I,CAAR,CAAc7H,EAAA,CAAcgd,CAAd,CAAd,CAEF,OAAO,KAlC4D,CA2DrE,KAAAQ,2BAAA;AAAkCC,QAAQ,CAACC,CAAD,CAAS,CACjD,MAAI7b,EAAA,CAAU6b,CAAV,CAAJ,EACElB,CAAAgB,2BAAA,CAAiDE,CAAjD,CACO,CAAA,IAFT,EAISlB,CAAAgB,2BAAA,EALwC,CA+BnD,KAAAG,4BAAA,CAAmCC,QAAQ,CAACF,CAAD,CAAS,CAClD,MAAI7b,EAAA,CAAU6b,CAAV,CAAJ,EACElB,CAAAmB,4BAAA,CAAkDD,CAAlD,CACO,CAAA,IAFT,EAISlB,CAAAmB,4BAAA,EALyC,CASpD,KAAA5K,KAAA,CAAY,CACF,WADE,CACW,cADX,CAC2B,mBAD3B,CACgD,OADhD,CACyD,gBADzD,CAC2E,QAD3E,CAEF,aAFE,CAEa,YAFb,CAE2B,WAF3B,CAEwC,MAFxC,CAEgD,UAFhD,CAE4D,eAF5D,CAGV,QAAQ,CAAC4B,CAAD,CAAckJ,CAAd,CAA8BX,CAA9B,CAAmDY,CAAnD,CAA4DC,CAA5D,CAA8EC,CAA9E,CACCC,CADD,CACgBrI,CADhB,CAC8B4E,CAD9B,CAC2C0D,CAD3C,CACmDC,CADnD,CAC+DC,CAD/D,CAC8E,CAiLtFxV,QAASA,EAAO,CAACyV,CAAD,CAAgBC,CAAhB,CAA8BC,CAA9B,CAA2CC,CAA3C,CACIC,CADJ,CAC4B,CACpCJ,CAAN,WAA+BtY,EAA/B,GAGEsY,CAHF,CAGkBtY,CAAA,CAAOsY,CAAP,CAHlB,CAOAlf,EAAA,CAAQkf,CAAR,CAAuB,QAAQ,CAAC9b,CAAD,CAAOnC,CAAP,CAAa,CACrB,CAArB,EAAImC,CAAAvD,SAAJ;AAA0CuD,CAAAmc,UAAAnY,MAAA,CAAqB
 ,KAArB,CAA1C,GACE8X,CAAA,CAAcje,CAAd,CADF,CACgC2F,CAAA,CAAOxD,CAAP,CAAAoc,KAAA,CAAkB,eAAlB,CAAArd,OAAA,EAAA,CAA4C,CAA5C,CADhC,CAD0C,CAA5C,CAKA,KAAIsd,EACIC,CAAA,CAAaR,CAAb,CAA4BC,CAA5B,CAA0CD,CAA1C,CACaE,CADb,CAC0BC,CAD1B,CAC2CC,CAD3C,CAER,OAAOK,SAAqB,CAACnW,CAAD,CAAQoW,CAAR,CAAwBC,CAAxB,CAA8C,CACxEpV,EAAA,CAAUjB,CAAV,CAAiB,OAAjB,CAGA,KAAIsW,EAAYF,CACA,CAAZG,EAAAlZ,MAAAvG,KAAA,CAA2B4e,CAA3B,CAAY,CACZA,CAEJlf,EAAA,CAAQ6f,CAAR,CAA+B,QAAQ,CAACxK,CAAD,CAAW3M,CAAX,CAAiB,CACtDoX,CAAAlW,KAAA,CAAe,GAAf,CAAqBlB,CAArB,CAA4B,YAA5B,CAA0C2M,CAA1C,CADsD,CAAxD,CAKQzU,EAAAA,CAAI,CAAZ,KAAI,IAAWqQ,EAAK6O,CAAAlgB,OAApB,CAAsCgB,CAAtC,CAAwCqQ,CAAxC,CAA4CrQ,CAAA,EAA5C,CAAiD,CAC/C,IAAIwC,EAAO0c,CAAA,CAAUlf,CAAV,CACU,EAArB,EAAIwC,CAAAvD,SAAJ,EAAyD,CAAzD,EAAwCuD,CAAAvD,SAAxC,EACEigB,CAAAE,GAAA,CAAapf,CAAb,CAAAgJ,KAAA,CAAqB,QAArB,CAA+BJ,CAA/B,CAH6C,CAMjDyW,EAAA,CAAaH,CAAb,CAAwB,UAAxB,CACIF,EAAJ,EAAoBA,CAAA,CAAeE,CAAf,CAA0BtW,CAA1B,CAChBiW,EAAJ,EAAqBA,CAAA,CAAgBjW,CAAhB,CAAuBsW,CAAvB,CAAkCA,CAAlC,CACrB,OAAOA,
 EAtBiE,CAhBhC,CA0C5CG,QAASA,GAAY,CAACC,CAAD,CAAWpX,CAAX,CAAsB,CACzC,GAAI,CACFoX,CAAAC,SAAA,CAAkBrX,CAAlB,CADE,CAEF,MAAM/B,CAAN,CAAS,EAH8B,CAwB3C2Y,QAASA,EAAY,CAACU,CAAD,CAAWjB,CAAX,CAAyBkB,CAAzB,CAAuCjB,CAAvC,CAAoDC,CAApD,CACGC,CADH,CAC2B,CAiC9CG,QAASA,EAAe,CAACjW,CAAD,CAAQ4W,CAAR,CAAkBC,CAAlB,CAAgCC,CAAhC,CAAmD,CAAA,IACzDC,CADyD,CAC5Cnd,CAD4C,CACtCod,CADsC,CAC/BC,CAD+B,CACA7f,CADA,CACGqQ,CADH,CACO8K,CADP,CAIrE2E,GAAiB,EAChB9f,EAAA,CAAI,CAAT,KAAYqQ,CAAZ,CAAiBmP,CAAAxgB,OAAjB,CAAkCgB,CAAlC,CAAsCqQ,CAAtC,CAA0CrQ,CAAA,EAA1C,CACE8f,EAAAjgB,KAAA,CAAoB2f,CAAA,CAASxf,CAAT,CAApB,CAGSmb;CAAP,CAAAnb,CAAA,CAAI,CAAR,KAAkBqQ,CAAlB,CAAuB0P,CAAA/gB,OAAvB,CAAuCgB,CAAvC,CAA2CqQ,CAA3C,CAA+C8K,CAAA,EAA/C,CACE3Y,CAKA,CALOsd,EAAA,CAAe3E,CAAf,CAKP,CAJA6E,CAIA,CAJaD,CAAA,CAAQ/f,CAAA,EAAR,CAIb,CAHA2f,CAGA,CAHcI,CAAA,CAAQ/f,CAAA,EAAR,CAGd,CAFA4f,CAEA,CAFQ5Z,CAAA,CAAOxD,CAAP,CAER,CAAIwd,CAAJ,EACMA,CAAApX,MAAJ,EACEiX,CAEA,CAFajX,CAAAqX,KAAA,EAEb,CADAL,CAAA5W,KAAA,CAAW,QAAX,CAAqB6W,CAArB,CACA,CAAAR,EAAA,CAAaO,
 CAAb,CAAoB,UAApB,CAHF,EAKEC,CALF,CAKejX,CAGf,CAAA,CADAsX,CACA,CADoBF,CAAAG,WACpB,GAA2BT,CAAAA,CAA3B,EAAgDnB,CAAhD,CACEyB,CAAA,CAAWL,CAAX,CAAwBE,CAAxB,CAAoCrd,CAApC,CAA0Cid,CAA1C,CACEW,CAAA,CAAwBxX,CAAxB,CAA+BsX,CAA/B,EAAoD3B,CAApD,CADF,CADF,CAKEyB,CAAA,CAAWL,CAAX,CAAwBE,CAAxB,CAAoCrd,CAApC,CAA0Cid,CAA1C,CAAwDC,CAAxD,CAdJ,EAgBWC,CAhBX,EAiBEA,CAAA,CAAY/W,CAAZ,CAAmBpG,CAAAuL,WAAnB,CAAoCpP,CAApC,CAA+C+gB,CAA/C,CAhCqE,CA7B3E,IAJ8C,IAC1CK,EAAU,EADgC,CAE9BJ,CAF8B,CAELU,CAFK,CAEEC,CAFF,CAItCtgB,EAAI,CAAZ,CAAeA,CAAf,CAAmBwf,CAAAxgB,OAAnB,CAAoCgB,CAAA,EAApC,CACEqgB,CAsBA,CAtBQ,IAAIE,EAsBZ,CAnBAnD,CAmBA,CAnBaoD,CAAA,CAAkBhB,CAAA,CAASxf,CAAT,CAAlB,CAA+B,EAA/B,CAAmCqgB,CAAnC,CAAgD,CAAN,GAAArgB,CAAA,CAAUwe,CAAV,CAAwB7f,CAAlE,CACmB8f,CADnB,CAmBb,CAXAkB,CAWA,CARc,CARdK,CAQc,CARA5C,CAAApe,OACD,CAAPyhB,CAAA,CAAsBrD,CAAtB,CAAkCoC,CAAA,CAASxf,CAAT,CAAlC,CAA+CqgB,CAA/C,CAAsD9B,CAAtD,CAAoEkB,CAApE,CACwB,IADxB,CAC8B,EAD9B,CACkC,EADlC,CACsCf,CADtC,CAAO,CAEP,IAKQ,GAHesB,CAAAU,SAGf,EAFA,CAAClB,CAAA,CAASxf,CA
 AT,CAAA+N,WAED,EADA,CAACyR,CAAA,CAASxf,CAAT,CAAA+N,WAAA/O,OACD,CAAR,IAAQ,CACR8f,CAAA,CAAaU,CAAA,CAASxf,CAAT,CAAA+N,WAAb,CACGiS,CAAA,CAAaA,CAAAG,WAAb,CAAqC5B,CADxC,CAON,CAJAwB,CAAAlgB,KAAA,CAAamgB,CAAb,CAIA,CAHAD,CAAAlgB,KAAA,CAAa8f,CAAb,CAGA,CAFAW,CAEA,CAFeA,CAEf,EAF8BN,CAE9B,EAF4CL,CAE5C,CAAAjB,CAAA,CAAyB,IAI3B,OAAO4B,EAAA,CAAczB,CAAd,CAAgC,IA/BO,CAuEhDuB,QAASA,EAAuB,CAACxX,CAAD,CAAQ2V,CAAR,CAAsB,CACpD,MAAOmB,SAA0B,CAACiB,CAAD;AAAmBC,CAAnB,CAA4BC,CAA5B,CAAyC,CACxE,IAAIC,EAAe,CAAA,CAEdH,EAAL,GACEA,CAEA,CAFmB/X,CAAAqX,KAAA,EAEnB,CAAAa,CAAA,CADAH,CAAAI,cACA,CADiC,CAAA,CAFnC,CAMI9a,EAAAA,CAAQsY,CAAA,CAAaoC,CAAb,CAA+BC,CAA/B,CAAwCC,CAAxC,CACZ,IAAIC,CAAJ,CACE7a,CAAAvD,GAAA,CAAS,UAAT,CAAqBgC,EAAA,CAAKic,CAAL,CAAuBA,CAAAzR,SAAvB,CAArB,CAEF,OAAOjJ,EAbiE,CADtB,CA4BtDua,QAASA,EAAiB,CAAChe,CAAD,CAAO4a,CAAP,CAAmBiD,CAAnB,CAA0B7B,CAA1B,CAAuCC,CAAvC,CAAwD,CAAA,IAE5EuC,EAAWX,CAAAY,MAFiE,CAG5Eza,CAGJ,QALehE,CAAAvD,SAKf,EACE,KAAK,CAAL,CAEEiiB,EAAA,CAAa9D,CAAb,CACI+D,EAAA,CAAmBC,EAAA,CAAU5e,CAAV,CAAA
 oH,YAAA,EAAnB,CADJ,CACuD,GADvD,CAC4D4U,CAD5D,CACyEC,CADzE,CAFF,KAMWrW,CANX,CAMiBN,CANjB,CAMuBuZ,CAA0BC,EAAAA,CAAS9e,CAAA2F,WAAxD,KANF,IAOWoZ,EAAI,CAPf,CAOkBC,EAAKF,CAALE,EAAeF,CAAAtiB,OAD/B,CAC8CuiB,CAD9C,CACkDC,CADlD,CACsDD,CAAA,EADtD,CAC2D,CACzD,IAAIE,EAAgB,CAAA,CAApB,CACIC,EAAc,CAAA,CAElBtZ,EAAA,CAAOkZ,CAAA,CAAOC,CAAP,CACP,IAAI,CAAC9P,CAAL,EAAqB,CAArB,EAAaA,CAAb,EAA0BrJ,CAAAuZ,UAA1B,CAA0C,CACxC7Z,CAAA,CAAOM,CAAAN,KAEP8Z,EAAA,CAAaT,EAAA,CAAmBrZ,CAAnB,CACT+Z,GAAA3Y,KAAA,CAAqB0Y,CAArB,CAAJ,GACE9Z,CADF,CACSyB,EAAA,CAAWqY,CAAA9d,OAAA,CAAkB,CAAlB,CAAX,CAAiC,GAAjC,CADT,CAIA,KAAIge,EAAiBF,CAAAnb,QAAA,CAAmB,cAAnB,CAAmC,EAAnC,CACjBmb,EAAJ,GAAmBE,CAAnB,CAAoC,OAApC,GACEL,CAEA,CAFgB3Z,CAEhB,CADA4Z,CACA,CADc5Z,CAAAhE,OAAA,CAAY,CAAZ,CAAegE,CAAA9I,OAAf,CAA6B,CAA7B,CACd,CADgD,KAChD,CAAA8I,CAAA,CAAOA,CAAAhE,OAAA,CAAY,CAAZ,CAAegE,CAAA9I,OAAf,CAA6B,CAA7B,CAHT,CAMAqiB,EAAA,CAAQF,EAAA,CAAmBrZ,CAAA8B,YAAA,EAAnB,CACRoX;CAAA,CAASK,CAAT,CAAA,CAAkBvZ,CAClBuY,EAAA,CAAMgB,CAAN,CAAA,CAAelhB,CAAf,CAAuB4P,EAAA,
 CAAM0B,CACD,EADiB,MACjB,EADS3J,CACT,CAAxBnB,kBAAA,CAAmBnE,CAAAkN,aAAA,CAAkB5H,CAAlB,CAAwB,CAAxB,CAAnB,CAAwB,CACxBM,CAAAjI,MAFmB,CAGnBoQ,GAAA,CAAmB/N,CAAnB,CAAyB6e,CAAzB,CAAJ,GACEhB,CAAA,CAAMgB,CAAN,CADF,CACiB,CAAA,CADjB,CAGAU,EAAA,CAA4Bvf,CAA5B,CAAkC4a,CAAlC,CAA8Cjd,CAA9C,CAAqDkhB,CAArD,CACAH,GAAA,CAAa9D,CAAb,CAAyBiE,CAAzB,CAAgC,GAAhC,CAAqC7C,CAArC,CAAkDC,CAAlD,CAAmEgD,CAAnE,CACcC,CADd,CAxBwC,CALe,CAmC3DxZ,CAAA,CAAY1F,CAAA0F,UACZ,IAAIhJ,CAAA,CAASgJ,CAAT,CAAJ,EAAyC,EAAzC,GAA2BA,CAA3B,CACE,IAAA,CAAO1B,CAAP,CAAeqW,CAAA5U,KAAA,CAA4BC,CAA5B,CAAf,CAAA,CACEmZ,CAIA,CAJQF,EAAA,CAAmB3a,CAAA,CAAM,CAAN,CAAnB,CAIR,CAHI0a,EAAA,CAAa9D,CAAb,CAAyBiE,CAAzB,CAAgC,GAAhC,CAAqC7C,CAArC,CAAkDC,CAAlD,CAGJ,GAFE4B,CAAA,CAAMgB,CAAN,CAEF,CAFiBtR,EAAA,CAAKvJ,CAAA,CAAM,CAAN,CAAL,CAEjB,EAAA0B,CAAA,CAAYA,CAAApE,OAAA,CAAiB0C,CAAAnG,MAAjB,CAA+BmG,CAAA,CAAM,CAAN,CAAAxH,OAA/B,CAGhB,MACF,MAAK,CAAL,CACEgjB,CAAA,CAA4B5E,CAA5B,CAAwC5a,CAAAmc,UAAxC,CACA,MACF,MAAK,CAAL,CACE,GAAI,CAEF,GADAnY,CACA,CADQoW,CAAA3U,KAAA,CAA8BzF,C
 AAAmc,UAA9B,CACR,CACE0C,CACA,CADQF,EAAA,CAAmB3a,CAAA,CAAM,CAAN,CAAnB,CACR,CAAI0a,EAAA,CAAa9D,CAAb,CAAyBiE,CAAzB,CAAgC,GAAhC,CAAqC7C,CAArC,CAAkDC,CAAlD,CAAJ,GACE4B,CAAA,CAAMgB,CAAN,CADF,CACiBtR,EAAA,CAAKvJ,CAAA,CAAM,CAAN,CAAL,CADjB,CAJA,CAQF,MAAOL,CAAP,CAAU,EAlEhB,CA0EAiX,CAAAtd,KAAA,CAAgBmiB,CAAhB,CACA,OAAO7E,EAjFyE,CA4FlF8E,QAASA,EAAS,CAAC1f,CAAD,CAAO2f,CAAP,CAAkBC,CAAlB,CAA2B,CAC3C,IAAI1X,EAAQ,EAAZ,CACI2X,EAAQ,CACZ,IAAIF,CAAJ,EAAiB3f,CAAA8f,aAAjB,EAAsC9f,CAAA8f,aAAA,CAAkBH,CAAlB,CAAtC,EAEE,EAAG,CACD,GAAI,CAAC3f,CAAL,CACE,KAAM+f,GAAA,CAAe,SAAf,CAEIJ,CAFJ;AAEeC,CAFf,CAAN,CAImB,CAArB,EAAI5f,CAAAvD,SAAJ,GACMuD,CAAA8f,aAAA,CAAkBH,CAAlB,CACJ,EADkCE,CAAA,EAClC,CAAI7f,CAAA8f,aAAA,CAAkBF,CAAlB,CAAJ,EAAgCC,CAAA,EAFlC,CAIA3X,EAAA7K,KAAA,CAAW2C,CAAX,CACAA,EAAA,CAAOA,CAAAqI,YAXN,CAAH,MAYiB,CAZjB,CAYSwX,CAZT,CAFF,KAgBE3X,EAAA7K,KAAA,CAAW2C,CAAX,CAGF,OAAOwD,EAAA,CAAO0E,CAAP,CAtBoC,CAiC7C8X,QAASA,EAA0B,CAACC,CAAD,CAASN,CAAT,CAAoBC,CAApB,CAA6B,CAC9D,MAAO,SAAQ,CAACxZ,CAAD,CAAQ7C,CAAR,CAAiBsa,CAAjB,
 CAAwBQ,CAAxB,CAAqCtC,CAArC,CAAmD,CAChExY,CAAA,CAAUmc,CAAA,CAAUnc,CAAA,CAAQ,CAAR,CAAV,CAAsBoc,CAAtB,CAAiCC,CAAjC,CACV,OAAOK,EAAA,CAAO7Z,CAAP,CAAc7C,CAAd,CAAuBsa,CAAvB,CAA8BQ,CAA9B,CAA2CtC,CAA3C,CAFyD,CADJ,CA8BhEkC,QAASA,EAAqB,CAACrD,CAAD,CAAasF,CAAb,CAA0BC,CAA1B,CAAyCpE,CAAzC,CACCqE,CADD,CACeC,CADf,CACyCC,CADzC,CACqDC,CADrD,CAECrE,CAFD,CAEyB,CA8LrDsE,QAASA,EAAU,CAACC,CAAD,CAAMC,CAAN,CAAYf,CAAZ,CAAuBC,CAAvB,CAAgC,CACjD,GAAIa,CAAJ,CAAS,CACHd,CAAJ,GAAec,CAAf,CAAqBT,CAAA,CAA2BS,CAA3B,CAAgCd,CAAhC,CAA2CC,CAA3C,CAArB,CACAa,EAAA3F,QAAA,CAAcP,CAAAO,QACd,IAAI6F,CAAJ,GAAiCpG,CAAjC,EAA8CA,CAAAqG,eAA9C,CACEH,CAAA,CAAMI,CAAA,CAAmBJ,CAAnB,CAAwB,cAAe,CAAA,CAAf,CAAxB,CAERH,EAAAjjB,KAAA,CAAgBojB,CAAhB,CANO,CAQT,GAAIC,CAAJ,CAAU,CACJf,CAAJ,GAAee,CAAf,CAAsBV,CAAA,CAA2BU,CAA3B,CAAiCf,CAAjC,CAA4CC,CAA5C,CAAtB,CACAc,EAAA5F,QAAA,CAAeP,CAAAO,QACf,IAAI6F,CAAJ,GAAiCpG,CAAjC,EAA8CA,CAAAqG,eAA9C,CACEF,CAAA,CAAOG,CAAA,CAAmBH,CAAnB,CAAyB,cAAe,CAAA,CAAf,CAAzB,CAETH,EAAAljB,KAAA,CAAiBqjB,CAAjB,CANQ,CATuC,CAoBnDI,QAA
 SA,EAAc,CAAChG,CAAD,CAAUgC,CAAV,CAAoBiE,CAApB,CAAwC,CAAA,IACzDpjB,CADyD,CAClDqjB,EAAkB,MADgC;AACxBC,EAAW,CAAA,CAChD,IAAIvkB,CAAA,CAASoe,CAAT,CAAJ,CAAuB,CACrB,IAAA,CAAqC,GAArC,GAAOnd,CAAP,CAAemd,CAAAjZ,OAAA,CAAe,CAAf,CAAf,GAAqD,GAArD,EAA4ClE,CAA5C,CAAA,CACEmd,CAIA,CAJUA,CAAAxZ,OAAA,CAAe,CAAf,CAIV,CAHa,GAGb,EAHI3D,CAGJ,GAFEqjB,CAEF,CAFoB,eAEpB,EAAAC,CAAA,CAAWA,CAAX,EAAgC,GAAhC,EAAuBtjB,CAEzBA,EAAA,CAAQ,IAEJojB,EAAJ,EAA8C,MAA9C,GAA0BC,CAA1B,GACErjB,CADF,CACUojB,CAAA,CAAmBjG,CAAnB,CADV,CAGAnd,EAAA,CAAQA,CAAR,EAAiBmf,CAAA,CAASkE,CAAT,CAAA,CAA0B,GAA1B,CAAgClG,CAAhC,CAA0C,YAA1C,CAEjB,IAAI,CAACnd,CAAL,EAAc,CAACsjB,CAAf,CACE,KAAMlB,GAAA,CAAe,OAAf,CAEFjF,CAFE,CAEOoG,EAFP,CAAN,CAhBmB,CAAvB,IAqBWvkB,EAAA,CAAQme,CAAR,CAAJ,GACLnd,CACA,CADQ,EACR,CAAAf,CAAA,CAAQke,CAAR,CAAiB,QAAQ,CAACA,CAAD,CAAU,CACjCnd,CAAAN,KAAA,CAAWyjB,CAAA,CAAehG,CAAf,CAAwBgC,CAAxB,CAAkCiE,CAAlC,CAAX,CADiC,CAAnC,CAFK,CAMP,OAAOpjB,EA7BsD,CAiC/D6f,QAASA,EAAU,CAACL,CAAD,CAAc/W,CAAd,CAAqB+a,CAArB,CAA+BlE,CAA/B,CAA6CC,CAA7C,CAAgE,CA
 mKjFkE,QAASA,EAA0B,CAAChb,CAAD,CAAQib,CAAR,CAAuB,CACxD,IAAI5E,CAGmB,EAAvB,CAAI/d,SAAAlC,OAAJ,GACE6kB,CACA,CADgBjb,CAChB,CAAAA,CAAA,CAAQjK,CAFV,CAKImlB,GAAJ,GACE7E,CADF,CAC0BsE,CAD1B,CAIA,OAAO7D,EAAA,CAAkB9W,CAAlB,CAAyBib,CAAzB,CAAwC5E,CAAxC,CAbiD,CAnKuB,IAC7EoB,CAD6E,CACtEf,EADsE,CACzDjP,CADyD,CACrDoS,CADqD,CAC7ClF,CAD6C,CACjCwG,CADiC,CACnBR,EAAqB,EADF,CACMhF,CAGrF8B,EAAA,CADEqC,CAAJ,GAAoBiB,CAApB,CACUhB,CADV,CAGU/e,EAAA,CAAY+e,CAAZ,CAA2B,IAAIpC,EAAJ,CAAeva,CAAA,CAAO2d,CAAP,CAAf,CAAiChB,CAAA1B,MAAjC,CAA3B,CAEV3B,GAAA,CAAWe,CAAA2D,UAEX,IAAIb,CAAJ,CAA8B,CAC5B,IAAIc,EAAe,8BACf/E,EAAAA,CAAYlZ,CAAA,CAAO2d,CAAP,CAEhBI,EAAA,CAAenb,CAAAqX,KAAA,CAAW,CAAA,CAAX,CAEXiE,EAAJ;AAA0BA,CAA1B,GAAgDf,CAAAgB,oBAAhD,CACEjF,CAAAlW,KAAA,CAAe,eAAf,CAAgC+a,CAAhC,CADF,CAGE7E,CAAAlW,KAAA,CAAe,yBAAf,CAA0C+a,CAA1C,CAKF1E,GAAA,CAAaH,CAAb,CAAwB,kBAAxB,CAEA9f,EAAA,CAAQ+jB,CAAAva,MAAR,CAAwC,QAAQ,CAACwb,CAAD,CAAaC,CAAb,CAAwB,CAAA,IAClE7d,EAAQ4d,CAAA5d,MAAA,CAAiByd,CAAjB,CAARzd,EAA0C,EADwB,CAElE8d,EAAW9d,CAAA,CAAM,CA
 AN,CAAX8d,EAAuBD,CAF2C,CAGlEZ,EAAwB,GAAxBA,EAAYjd,CAAA,CAAM,CAAN,CAHsD,CAIlE+d,EAAO/d,CAAA,CAAM,CAAN,CAJ2D,CAKlEge,CALkE,CAMlEC,CANkE,CAMvDC,CANuD,CAM5CC,CAE1BZ,EAAAa,kBAAA,CAA+BP,CAA/B,CAAA,CAA4CE,CAA5C,CAAmDD,CAEnD,QAAQC,CAAR,EAEE,KAAK,GAAL,CACElE,CAAAwE,SAAA,CAAeP,CAAf,CAAyB,QAAQ,CAACnkB,CAAD,CAAQ,CACvC4jB,CAAA,CAAaM,CAAb,CAAA,CAA0BlkB,CADa,CAAzC,CAGAkgB,EAAAyE,YAAA,CAAkBR,CAAlB,CAAAS,QAAA,CAAsCnc,CAClCyX,EAAA,CAAMiE,CAAN,CAAJ,GAGEP,CAAA,CAAaM,CAAb,CAHF,CAG4BvG,CAAA,CAAauC,CAAA,CAAMiE,CAAN,CAAb,CAAA,CAA8B1b,CAA9B,CAH5B,CAKA,MAEF,MAAK,GAAL,CACE,GAAI6a,CAAJ,EAAgB,CAACpD,CAAA,CAAMiE,CAAN,CAAjB,CACE,KAEFG,EAAA,CAAYxG,CAAA,CAAOoC,CAAA,CAAMiE,CAAN,CAAP,CAEVK,EAAA,CADEF,CAAAO,QAAJ,CACYjhB,EADZ,CAGY4gB,QAAQ,CAACM,CAAD,CAAGC,CAAH,CAAM,CAAE,MAAOD,EAAP,GAAaC,CAAf,CAE1BR,EAAA,CAAYD,CAAAU,OAAZ,EAAgC,QAAQ,EAAG,CAEzCX,CAAA,CAAYT,CAAA,CAAaM,CAAb,CAAZ,CAAsCI,CAAA,CAAU7b,CAAV,CACtC,MAAM2Z,GAAA,CAAe,WAAf,CAEFlC,CAAA,CAAMiE,CAAN,CAFE,CAEenB,CAAArb,KAFf,CAAN,CAHyC,CAO3C0c,EAAA,CAAYT,CAAA,CAAaM,CAAb,C
 AAZ,CAAsCI,CAAA,CAAU7b,CAAV,CACtCmb,EAAAxgB,OAAA,CAAoB6hB,QAAyB,EAAG,CAC9C,IAAIC;AAAcZ,CAAA,CAAU7b,CAAV,CACb+b,EAAA,CAAQU,CAAR,CAAqBtB,CAAA,CAAaM,CAAb,CAArB,CAAL,GAEOM,CAAA,CAAQU,CAAR,CAAqBb,CAArB,CAAL,CAKEE,CAAA,CAAU9b,CAAV,CAAiByc,CAAjB,CAA+BtB,CAAA,CAAaM,CAAb,CAA/B,CALF,CAEEN,CAAA,CAAaM,CAAb,CAFF,CAE4BgB,CAJ9B,CAUA,OAAOb,EAAP,CAAmBa,CAZ2B,CAAhD,CAaG,IAbH,CAaSZ,CAAAO,QAbT,CAcA,MAEF,MAAK,GAAL,CACEP,CAAA,CAAYxG,CAAA,CAAOoC,CAAA,CAAMiE,CAAN,CAAP,CACZP,EAAA,CAAaM,CAAb,CAAA,CAA0B,QAAQ,CAAClQ,CAAD,CAAS,CACzC,MAAOsQ,EAAA,CAAU7b,CAAV,CAAiBuL,CAAjB,CADkC,CAG3C,MAEF,SACE,KAAMoO,GAAA,CAAe,MAAf,CAGFY,CAAArb,KAHE,CAG6Buc,CAH7B,CAGwCD,CAHxC,CAAN,CAxDJ,CAVsE,CAAxE,CAhB4B,CAyF9B7F,CAAA,CAAemB,CAAf,EAAoCkE,CAChC0B,EAAJ,EACElmB,CAAA,CAAQkmB,CAAR,CAA8B,QAAQ,CAACvI,CAAD,CAAY,CAAA,IAC5C5I,EAAS,QACH4I,CAAA,GAAcoG,CAAd,EAA0CpG,CAAAqG,eAA1C,CAAqEW,CAArE,CAAoFnb,CADjF,UAED0W,EAFC,QAGHe,CAHG,aAIE9B,CAJF,CADmC,CAM7CgH,CAEHhI,EAAA,CAAaR,CAAAQ,WACK,IAAlB,EAAIA,CAAJ,GACEA,CADF,CACe8C,CAAA,CAAMtD,CAAAjV,KAAN,CA
 Df,CAIAyd,EAAA,CAAqBrH,CAAA,CAAYX,CAAZ,CAAwBpJ,CAAxB,CAMrBoP,EAAA,CAAmBxG,CAAAjV,KAAnB,CAAA,CAAqCyd,CAChCzB,GAAL,EACExE,EAAAtW,KAAA,CAAc,GAAd,CAAoB+T,CAAAjV,KAApB,CAAqC,YAArC,CAAmDyd,CAAnD,CAGExI,EAAAyI,aAAJ,GACErR,CAAAsR,OAAA,CAAc1I,CAAAyI,aAAd,CADF,CAC0CD,CAD1C,CAxBgD,CAAlD,CA+BEvlB,EAAA,CAAI,CAAR,KAAWqQ,CAAX,CAAgByS,CAAA9jB,OAAhB,CAAmCgB,CAAnC,CAAuCqQ,CAAvC,CAA2CrQ,CAAA,EAA3C,CACE,GAAI,CACFyiB,CACA,CADSK,CAAA,CAAW9iB,CAAX,CACT,CAAAyiB,CAAA,CAAOA,CAAAsB,aAAA,CAAsBA,CAAtB,CAAqCnb,CAA5C,CAAmD0W,EAAnD,CAA6De,CAA7D,CACIoC,CAAAnF,QADJ,EACsBgG,CAAA,CAAeb,CAAAnF,QAAf;AAA+BgC,EAA/B,CAAyCiE,CAAzC,CADtB,CACoFhF,CADpF,CAFE,CAIF,MAAOpY,CAAP,CAAU,CACVgX,CAAA,CAAkBhX,CAAlB,CAAqBL,EAAA,CAAYwZ,EAAZ,CAArB,CADU,CAQVoG,CAAAA,CAAe9c,CACfua,EAAJ,GAAiCA,CAAAwC,SAAjC,EAA+G,IAA/G,GAAsExC,CAAAyC,YAAtE,IACEF,CADF,CACiB3B,CADjB,CAGApE,EAAA,EAAeA,CAAA,CAAY+F,CAAZ,CAA0B/B,CAAA5V,WAA1B,CAA+CpP,CAA/C,CAA0D+gB,CAA1D,CAGf,KAAI1f,CAAJ,CAAQ+iB,CAAA/jB,OAAR,CAA6B,CAA7B,CAAqC,CAArC,EAAgCgB,CAAhC,CAAwCA,CAAA,EAAxC,CAC
 E,GAAI,CACFyiB,CACA,CADSM,CAAA,CAAY/iB,CAAZ,CACT,CAAAyiB,CAAA,CAAOA,CAAAsB,aAAA,CAAsBA,CAAtB,CAAqCnb,CAA5C,CAAmD0W,EAAnD,CAA6De,CAA7D,CACIoC,CAAAnF,QADJ,EACsBgG,CAAA,CAAeb,CAAAnF,QAAf,CAA+BgC,EAA/B,CAAyCiE,CAAzC,CADtB,CACoFhF,CADpF,CAFE,CAIF,MAAOpY,EAAP,CAAU,CACVgX,CAAA,CAAkBhX,EAAlB,CAAqBL,EAAA,CAAYwZ,EAAZ,CAArB,CADU,CA7JmE,CAlPnFZ,CAAA,CAAyBA,CAAzB,EAAmD,EADE,KAGjDmH,EAAmB,CAACjK,MAAAC,UAH6B,CAIjDiK,CAJiD,CAKjDR,EAAuB5G,CAAA4G,qBAL0B,CAMjDnC,EAA2BzE,CAAAyE,yBANsB,CAOjDe,EAAoBxF,CAAAwF,kBACpB6B,EAAAA,CAA4BrH,CAAAqH,0BAahC,KArBqD,IASjDC,GAAyB,CAAA,CATwB,CAUjDlC,GAAgC,CAAA,CAViB,CAWjDmC,EAAetD,CAAAqB,UAAfiC,CAAyCjgB,CAAA,CAAO0c,CAAP,CAXQ,CAYjD3F,CAZiD,CAajD2G,EAbiD,CAcjDwC,CAdiD,CAgBjDhG,EAAoB3B,CAhB6B,CAiBjDkE,CAjBiD,CAqB7CziB,EAAI,CArByC,CAqBtCqQ,EAAK+M,CAAApe,OAApB,CAAuCgB,CAAvC,CAA2CqQ,CAA3C,CAA+CrQ,CAAA,EAA/C,CAAoD,CAClD+c,CAAA,CAAYK,CAAA,CAAWpd,CAAX,CACZ,KAAImiB,GAAYpF,CAAAoJ,QAAhB,CACI/D,GAAUrF,CAAAqJ,MAGVjE,GAAJ,GACE8D,CADF,CACiB/D,CAAA,CAAUQ,CAAV,CAAuBP,EAAvB,CAAkCC,EAAlC,CA
 DjB,CAGA8D,EAAA,CAAYvnB,CAEZ,IAAIknB,CAAJ;AAAuB9I,CAAAM,SAAvB,CACE,KAGF,IAAIgJ,CAAJ,CAAqBtJ,CAAAnU,MAArB,CACEkd,CAIA,CAJoBA,CAIpB,EAJyC/I,CAIzC,CAAKA,CAAA6I,YAAL,GACEU,CAAA,CAAkB,oBAAlB,CAAwCnD,CAAxC,CAAkEpG,CAAlE,CACkBkJ,CADlB,CAEA,CAAIlkB,CAAA,CAASskB,CAAT,CAAJ,GACElD,CADF,CAC6BpG,CAD7B,CAHF,CASF2G,GAAA,CAAgB3G,CAAAjV,KAEX8d,EAAA7I,CAAA6I,YAAL,EAA8B7I,CAAAQ,WAA9B,GACE8I,CAIA,CAJiBtJ,CAAAQ,WAIjB,CAHA+H,CAGA,CAHuBA,CAGvB,EAH+C,EAG/C,CAFAgB,CAAA,CAAkB,GAAlB,CAAwB5C,EAAxB,CAAwC,cAAxC,CACI4B,CAAA,CAAqB5B,EAArB,CADJ,CACyC3G,CADzC,CACoDkJ,CADpD,CAEA,CAAAX,CAAA,CAAqB5B,EAArB,CAAA,CAAsC3G,CALxC,CAQA,IAAIsJ,CAAJ,CAAqBtJ,CAAAoD,WAArB,CACE6F,EAUA,CAVyB,CAAA,CAUzB,CALKjJ,CAAAwJ,MAKL,GAJED,CAAA,CAAkB,cAAlB,CAAkCP,CAAlC,CAA6DhJ,CAA7D,CAAwEkJ,CAAxE,CACA,CAAAF,CAAA,CAA4BhJ,CAG9B,EAAsB,SAAtB,EAAIsJ,CAAJ,EACEvC,EASA,CATgC,CAAA,CAShC,CARA+B,CAQA,CARmB9I,CAAAM,SAQnB,CAPA6I,CAOA,CAPYhE,CAAA,CAAUQ,CAAV,CAAuBP,EAAvB,CAAkCC,EAAlC,CAOZ,CANA6D,CAMA,CANetD,CAAAqB,UAMf,CALIhe,CAAA,CAAOtH,CAAA8nB,cAAA,CAAuB,GA
 AvB,CAA6B9C,EAA7B,CAA6C,IAA7C,CACuBf,CAAA,CAAce,EAAd,CADvB,CACsD,GADtD,CAAP,CAKJ,CAHAhB,CAGA,CAHcuD,CAAA,CAAa,CAAb,CAGd,CAFAQ,CAAA,CAAY7D,CAAZ,CAA0B5c,CAAA,CA5yJ7BlB,EAAApF,KAAA,CA4yJ8CwmB,CA5yJ9C,CAA+B,CAA/B,CA4yJ6B,CAA1B,CAAwDxD,CAAxD,CAEA,CAAAxC,CAAA,CAAoBrX,CAAA,CAAQqd,CAAR,CAAmB3H,CAAnB,CAAiCsH,CAAjC,CACQa,CADR,EAC4BA,CAAA5e,KAD5B,CACmD,2BAQdie,CARc,CADnD,CAVtB,GAsBEG,CAEA,CAFYlgB,CAAA,CAAOkI,EAAA,CAAYwU,CAAZ,CAAP,CAAAiE,SAAA,EAEZ,CADAV,CAAA/f,MAAA,EACA,CAAAga,CAAA,CAAoBrX,CAAA,CAAQqd,CAAR,CAAmB3H,CAAnB,CAxBtB,CA4BF,IAAIxB,CAAA4I,SAAJ,CAUE,GATAW,CAAA,CAAkB,UAAlB;AAA8BpC,CAA9B,CAAiDnH,CAAjD,CAA4DkJ,CAA5D,CASIxf,CARJyd,CAQIzd,CARgBsW,CAQhBtW,CANJ4f,CAMI5f,CANcjH,CAAA,CAAWud,CAAA4I,SAAX,CACD,CAAX5I,CAAA4I,SAAA,CAAmBM,CAAnB,CAAiCtD,CAAjC,CAAW,CACX5F,CAAA4I,SAIFlf,CAFJ4f,CAEI5f,CAFamgB,EAAA,CAAoBP,CAApB,CAEb5f,CAAAsW,CAAAtW,QAAJ,CAAuB,CACrBigB,CAAA,CAAmB3J,CACnBmJ,EAAA,CAAYlgB,CAAA,CAAO,OAAP,CACS+J,EAAA,CAAKsW,CAAL,CADT,CAEO,QAFP,CAAAM,SAAA,EAGZjE,EAAA,CAAcwD,CAAA,CAAU,CAAV,CAEd,IAA
 wB,CAAxB,EAAIA,CAAAlnB,OAAJ,EAAsD,CAAtD,GAA6B0jB,CAAAzjB,SAA7B,CACE,KAAMsjB,GAAA,CAAe,OAAf,CAEFmB,EAFE,CAEa,EAFb,CAAN,CAKF+C,CAAA,CAAY7D,CAAZ,CAA0BqD,CAA1B,CAAwCvD,CAAxC,CAEImE,EAAAA,CAAmB,OAAQ,EAAR,CAOnBC,EAAAA,CAAqBtG,CAAA,CAAkBkC,CAAlB,CAA+B,EAA/B,CAAmCmE,CAAnC,CACzB,KAAIE,EAAwB3J,CAAAla,OAAA,CAAkBlD,CAAlB,CAAsB,CAAtB,CAAyBod,CAAApe,OAAzB,EAA8CgB,CAA9C,CAAkD,CAAlD,EAExBmjB,EAAJ,EACE6D,CAAA,CAAwBF,CAAxB,CAEF1J,EAAA,CAAaA,CAAAnY,OAAA,CAAkB6hB,CAAlB,CAAA7hB,OAAA,CAA6C8hB,CAA7C,CACbE,GAAA,CAAwBtE,CAAxB,CAAuCkE,CAAvC,CAEAxW,EAAA,CAAK+M,CAAApe,OA/BgB,CAAvB,IAiCEinB,EAAA3f,KAAA,CAAkB+f,CAAlB,CAIJ,IAAItJ,CAAA6I,YAAJ,CACEU,CAAA,CAAkB,UAAlB,CAA8BpC,CAA9B,CAAiDnH,CAAjD,CAA4DkJ,CAA5D,CAcA,CAbA/B,CAaA,CAboBnH,CAapB,CAXIA,CAAAtW,QAWJ,GAVEigB,CAUF,CAVqB3J,CAUrB,EAPAiD,CAOA,CAPakH,CAAA,CAAmB9J,CAAAla,OAAA,CAAkBlD,CAAlB,CAAqBod,CAAApe,OAArB,CAAyCgB,CAAzC,CAAnB,CAAgEimB,CAAhE,CACTtD,CADS,CACMC,CADN,CACoB1C,CADpB,CACuC4C,CADvC,CACmDC,CADnD,CACgE,sBACjDuC,CADiD,0BAE7CnC,CAF6C,mBAGpDe,CAHoD,2BAI5C6B,
 CAJ4C,CADhE,CAOb;AAAA1V,CAAA,CAAK+M,CAAApe,OAfP,KAgBO,IAAI+d,CAAAlU,QAAJ,CACL,GAAI,CACF4Z,CACA,CADS1F,CAAAlU,QAAA,CAAkBod,CAAlB,CAAgCtD,CAAhC,CAA+CzC,CAA/C,CACT,CAAI1gB,CAAA,CAAWijB,CAAX,CAAJ,CACEO,CAAA,CAAW,IAAX,CAAiBP,CAAjB,CAAyBN,EAAzB,CAAoCC,EAApC,CADF,CAEWK,CAFX,EAGEO,CAAA,CAAWP,CAAAQ,IAAX,CAAuBR,CAAAS,KAAvB,CAAoCf,EAApC,CAA+CC,EAA/C,CALA,CAOF,MAAOjc,CAAP,CAAU,CACVgX,CAAA,CAAkBhX,CAAlB,CAAqBL,EAAA,CAAYmgB,CAAZ,CAArB,CADU,CAKVlJ,CAAA2D,SAAJ,GACEV,CAAAU,SACA,CADsB,CAAA,CACtB,CAAAmF,CAAA,CAAmBsB,IAAAC,IAAA,CAASvB,CAAT,CAA2B9I,CAAAM,SAA3B,CAFrB,CA1JkD,CAiKpD2C,CAAApX,MAAA,CAAmBkd,CAAnB,EAAoE,CAAA,CAApE,GAAwCA,CAAAld,MACxCoX,EAAAG,WAAA,CAAwB6F,EAAxB,EAAkD9F,CAGlD,OAAOF,EA1L8C,CAwavDgH,QAASA,EAAuB,CAAC5J,CAAD,CAAa,CAE3C,IAF2C,IAElCmE,EAAI,CAF8B,CAE3BC,EAAKpE,CAAApe,OAArB,CAAwCuiB,CAAxC,CAA4CC,CAA5C,CAAgDD,CAAA,EAAhD,CACEnE,CAAA,CAAWmE,CAAX,CAAA,CAAgBjgB,EAAA,CAAQ8b,CAAA,CAAWmE,CAAX,CAAR,CAAuB,gBAAiB,CAAA,CAAjB,CAAvB,CAHyB,CAqB7CL,QAASA,GAAY,CAACmG,CAAD,CAAcvf,CAAd,CAAoB1F,CAApB,CAA8B
 oc,CAA9B,CAA2CC,CAA3C,CAA4D6I,CAA5D,CACCC,CADD,CACc,CACjC,GAAIzf,CAAJ,GAAa2W,CAAb,CAA8B,MAAO,KACjCjY,EAAAA,CAAQ,IACZ,IAAIkW,CAAAjd,eAAA,CAA6BqI,CAA7B,CAAJ,CAAwC,CAAA,IAC9BiV,CAAWK,EAAAA,CAAaxI,CAAArB,IAAA,CAAczL,CAAd,CAAqB6U,CAArB,CAAhC,KADsC,IAElC3c,EAAI,CAF8B,CAE3BqQ,EAAK+M,CAAApe,OADhB,CACmCgB,CADnC,CACqCqQ,CADrC,CACyCrQ,CAAA,EADzC,CAEE,GAAI,CACF+c,CACA,CADYK,CAAA,CAAWpd,CAAX,CACZ,EAAMwe,CAAN,GAAsB7f,CAAtB,EAAmC6f,CAAnC,CAAiDzB,CAAAM,SAAjD,GAC8C,EAD9C,EACKN,CAAAS,SAAAza,QAAA,CAA2BX,CAA3B,CADL,GAEMklB,CAIJ,GAHEvK,CAGF,CAHczb,EAAA,CAAQyb,CAAR;AAAmB,SAAUuK,CAAV,OAAgCC,CAAhC,CAAnB,CAGd,EADAF,CAAAxnB,KAAA,CAAiBkd,CAAjB,CACA,CAAAvW,CAAA,CAAQuW,CANV,CAFE,CAUF,MAAM5W,CAAN,CAAS,CAAEgX,CAAA,CAAkBhX,CAAlB,CAAF,CAbyB,CAgBxC,MAAOK,EAnB0B,CA+BnCygB,QAASA,GAAuB,CAAChmB,CAAD,CAAM4C,CAAN,CAAW,CAAA,IACrC2jB,EAAU3jB,CAAAod,MAD2B,CAErCwG,EAAUxmB,CAAAggB,MAF2B,CAGrC3B,EAAWre,CAAA+iB,UAGf5kB,EAAA,CAAQ6B,CAAR,CAAa,QAAQ,CAACd,CAAD,CAAQZ,CAAR,CAAa,CACX,GAArB,EAAIA,CAAA8E,OAAA,CAAW,CAAX,CAAJ,GACMR,CAAA,CA
 AItE,CAAJ,CAGJ,GAFEY,CAEF,GAFoB,OAAR,GAAAZ,CAAA,CAAkB,GAAlB,CAAwB,GAEpC,EAF2CsE,CAAA,CAAItE,CAAJ,CAE3C,EAAA0B,CAAAymB,KAAA,CAASnoB,CAAT,CAAcY,CAAd,CAAqB,CAAA,CAArB,CAA2BqnB,CAAA,CAAQjoB,CAAR,CAA3B,CAJF,CADgC,CAAlC,CAUAH,EAAA,CAAQyE,CAAR,CAAa,QAAQ,CAAC1D,CAAD,CAAQZ,CAAR,CAAa,CACrB,OAAX,EAAIA,CAAJ,EACE8f,EAAA,CAAaC,CAAb,CAAuBnf,CAAvB,CACA,CAAAc,CAAA,CAAI,OAAJ,CAAA,EAAgBA,CAAA,CAAI,OAAJ,CAAA,CAAeA,CAAA,CAAI,OAAJ,CAAf,CAA8B,GAA9B,CAAoC,EAApD,EAA0Dd,CAF5D,EAGkB,OAAX,EAAIZ,CAAJ,EACL+f,CAAAlX,KAAA,CAAc,OAAd,CAAuBkX,CAAAlX,KAAA,CAAc,OAAd,CAAvB,CAAgD,GAAhD,CAAsDjI,CAAtD,CACA,CAAAc,CAAA,MAAA,EAAgBA,CAAA,MAAA,CAAeA,CAAA,MAAf,CAA8B,GAA9B,CAAoC,EAApD,EAA0Dd,CAFrD,EAMqB,GANrB,EAMIZ,CAAA8E,OAAA,CAAW,CAAX,CANJ,EAM6BpD,CAAAxB,eAAA,CAAmBF,CAAnB,CAN7B,GAOL0B,CAAA,CAAI1B,CAAJ,CACA,CADWY,CACX,CAAAsnB,CAAA,CAAQloB,CAAR,CAAA,CAAeioB,CAAA,CAAQjoB,CAAR,CARV,CAJyB,CAAlC,CAhByC,CAkC3C2nB,QAASA,EAAkB,CAAC9J,CAAD,CAAa6I,CAAb,CAA2B0B,CAA3B,CACvBlI,CADuB,CACTS,CADS,CACU4C,CADV,CACsBC,CADtB,CACmCrE,CADnC,CAC2D,CAA
 A,IAChFkJ,EAAY,EADoE,CAEhFC,CAFgF,CAGhFC,CAHgF,CAIhFC,EAA4B9B,CAAA,CAAa,CAAb,CAJoD,CAKhF+B,EAAqB5K,CAAAnQ,MAAA,EAL2D;AAOhFgb,EAAuBjnB,CAAA,CAAO,EAAP,CAAWgnB,CAAX,CAA+B,aACvC,IADuC,YACrB,IADqB,SACN,IADM,qBACqBA,CADrB,CAA/B,CAPyD,CAUhFpC,EAAepmB,CAAA,CAAWwoB,CAAApC,YAAX,CACD,CAARoC,CAAApC,YAAA,CAA+BK,CAA/B,CAA6C0B,CAA7C,CAAQ,CACRK,CAAApC,YAEVK,EAAA/f,MAAA,EAEA6X,EAAAxK,IAAA,CAAU4K,CAAA+J,sBAAA,CAA2BtC,CAA3B,CAAV,CAAmD,OAAQ5H,CAAR,CAAnD,CAAAmK,QAAA,CACU,QAAQ,CAACC,CAAD,CAAU,CAAA,IACpB1F,CADoB,CACuB2F,CAE/CD,EAAA,CAAUxB,EAAA,CAAoBwB,CAApB,CAEV,IAAIJ,CAAAvhB,QAAJ,CAAgC,CAC9Byf,CAAA,CAAYlgB,CAAA,CAAO,OAAP,CAAiB+J,EAAA,CAAKqY,CAAL,CAAjB,CAAiC,QAAjC,CAAAzB,SAAA,EACZjE,EAAA,CAAcwD,CAAA,CAAU,CAAV,CAEd,IAAwB,CAAxB,EAAIA,CAAAlnB,OAAJ,EAAsD,CAAtD,GAA6B0jB,CAAAzjB,SAA7B,CACE,KAAMsjB,GAAA,CAAe,OAAf,CAEFyF,CAAAlgB,KAFE,CAEuB8d,CAFvB,CAAN,CAKF0C,CAAA,CAAoB,OAAQ,EAAR,CACpB7B,EAAA,CAAYhH,CAAZ,CAA0BwG,CAA1B,CAAwCvD,CAAxC,CACA,KAAIoE,EAAqBtG,CAAA,CAAkBkC,CAAlB,CAA+B,EAA/B,CAAmC4F,CAAnC,CAErBvmB,EAAA,CAA
 SimB,CAAApf,MAAT,CAAJ,EACEoe,CAAA,CAAwBF,CAAxB,CAEF1J,EAAA,CAAa0J,CAAA7hB,OAAA,CAA0BmY,CAA1B,CACb6J,GAAA,CAAwBU,CAAxB,CAAgCW,CAAhC,CAlB8B,CAAhC,IAoBE5F,EACA,CADcqF,CACd,CAAA9B,CAAA3f,KAAA,CAAkB8hB,CAAlB,CAGFhL,EAAAxc,QAAA,CAAmBqnB,CAAnB,CAEAJ,EAAA,CAA0BpH,CAAA,CAAsBrD,CAAtB,CAAkCsF,CAAlC,CAA+CiF,CAA/C,CACtBzH,CADsB,CACH+F,CADG,CACW+B,CADX,CAC+BlF,CAD/B,CAC2CC,CAD3C,CAEtBrE,CAFsB,CAG1Btf,EAAA,CAAQqgB,CAAR,CAAsB,QAAQ,CAACjd,CAAD,CAAOxC,CAAP,CAAU,CAClCwC,CAAJ,EAAYkgB,CAAZ,GACEjD,CAAA,CAAazf,CAAb,CADF;AACoBimB,CAAA,CAAa,CAAb,CADpB,CADsC,CAAxC,CAQA,KAHA6B,CAGA,CAH2BhJ,CAAA,CAAamH,CAAA,CAAa,CAAb,CAAAlY,WAAb,CAAyCmS,CAAzC,CAG3B,CAAM0H,CAAA5oB,OAAN,CAAA,CAAwB,CAClB4J,CAAAA,CAAQgf,CAAA3a,MAAA,EACRsb,EAAAA,CAAyBX,CAAA3a,MAAA,EAFP,KAGlBub,GAAkBZ,CAAA3a,MAAA,EAHA,CAIlByS,EAAoBkI,CAAA3a,MAAA,EAJF,CAKlB0W,EAAWsC,CAAA,CAAa,CAAb,CAEXsC,EAAJ,GAA+BR,CAA/B,GAEEpE,CACA,CADWzV,EAAA,CAAYwU,CAAZ,CACX,CAAA+D,CAAA,CAAY+B,EAAZ,CAA6BxiB,CAAA,CAAOuiB,CAAP,CAA7B,CAA6D5E,CAA7D,CAHF,CAME0E,EAAA,CADER,CAAA1H,WAAJ,
 CAC2BC,CAAA,CAAwBxX,CAAxB,CAA+Bif,CAAA1H,WAA/B,CAD3B,CAG2BT,CAE3BmI,EAAA,CAAwBC,CAAxB,CAAkDlf,CAAlD,CAAyD+a,CAAzD,CAAmElE,CAAnE,CACE4I,CADF,CAjBsB,CAoBxBT,CAAA,CAAY,IA9DY,CAD5B,CAAA7Q,MAAA,CAiEQ,QAAQ,CAAC0R,CAAD,CAAWC,CAAX,CAAiBC,CAAjB,CAA0Bhd,CAA1B,CAAkC,CAC9C,KAAM4W,GAAA,CAAe,QAAf,CAAyD5W,CAAA+L,IAAzD,CAAN,CAD8C,CAjElD,CAqEA,OAAOkR,SAA0B,CAACC,CAAD,CAAoBjgB,CAApB,CAA2BpG,CAA3B,CAAiCsmB,CAAjC,CAA8CpJ,CAA9C,CAAiE,CAC5FkI,CAAJ,EACEA,CAAA/nB,KAAA,CAAe+I,CAAf,CAGA,CAFAgf,CAAA/nB,KAAA,CAAe2C,CAAf,CAEA,CADAolB,CAAA/nB,KAAA,CAAeipB,CAAf,CACA,CAAAlB,CAAA/nB,KAAA,CAAe6f,CAAf,CAJF,EAMEmI,CAAA,CAAwBC,CAAxB,CAAkDlf,CAAlD,CAAyDpG,CAAzD,CAA+DsmB,CAA/D,CAA4EpJ,CAA5E,CAP8F,CArFd,CAqGtFuC,QAASA,EAAU,CAACgD,CAAD,CAAIC,CAAJ,CAAO,CACxB,IAAI6D,EAAO7D,CAAA7H,SAAP0L,CAAoB9D,CAAA5H,SACxB,OAAa,EAAb,GAAI0L,CAAJ,CAAuBA,CAAvB,CACI9D,CAAAnd,KAAJ,GAAeod,CAAApd,KAAf,CAA+Bmd,CAAAnd,KAAD,CAAUod,CAAApd,KAAV,CAAqB,EAArB,CAAyB,CAAvD,CACOmd,CAAA5kB,MADP,CACiB6kB,CAAA7kB,MAJO,CAQ1BimB,QAASA,EAAiB,CAAC0C,CAAD,CAAOC,CAAP
 ,CAA0BlM,CAA1B,CAAqChX,CAArC,CAA8C,CACtE,GAAIkjB,CAAJ,CACE,KAAM1G,GAAA,CAAe,UAAf,CACF0G,CAAAnhB,KADE,CACsBiV,CAAAjV,KADtB,CACsCkhB,CADtC;AAC4CljB,EAAA,CAAYC,CAAZ,CAD5C,CAAN,CAFoE,CAQxEic,QAASA,EAA2B,CAAC5E,CAAD,CAAa8L,CAAb,CAAmB,CACrD,IAAIC,EAAgBrL,CAAA,CAAaoL,CAAb,CAAmB,CAAA,CAAnB,CAChBC,EAAJ,EACE/L,CAAAvd,KAAA,CAAgB,UACJ,CADI,SAEL+B,EAAA,CAAQwnB,QAA8B,CAACxgB,CAAD,CAAQpG,CAAR,CAAc,CAAA,IACvDjB,EAASiB,CAAAjB,OAAA,EAD8C,CAEvD8nB,EAAW9nB,CAAAyH,KAAA,CAAY,UAAZ,CAAXqgB,EAAsC,EAC1CA,EAAAxpB,KAAA,CAAcspB,CAAd,CACA9J,GAAA,CAAa9d,CAAAyH,KAAA,CAAY,UAAZ,CAAwBqgB,CAAxB,CAAb,CAAgD,YAAhD,CACAzgB,EAAArF,OAAA,CAAa4lB,CAAb,CAA4BG,QAAiC,CAACnpB,CAAD,CAAQ,CACnEqC,CAAA,CAAK,CAAL,CAAAmc,UAAA,CAAoBxe,CAD+C,CAArE,CAL2D,CAApD,CAFK,CAAhB,CAHmD,CAmBvDopB,QAASA,EAAiB,CAAC/mB,CAAD,CAAOgnB,CAAP,CAA2B,CACnD,GAA0B,QAA1B,EAAIA,CAAJ,CACE,MAAOrL,EAAAsL,KAET,KAAIjhB,EAAM4Y,EAAA,CAAU5e,CAAV,CAEV,IAA0B,WAA1B,EAAIgnB,CAAJ,EACY,MADZ,EACKhhB,CADL,EAC4C,QAD5C,EACsBghB,CADtB,EAEY,KAFZ,EAEKhhB,CAFL,GAE4C,KAF5C,EAEsBghB,CAF
 tB,EAG4C,OAH5C,EAGsBA,CAHtB,EAIE,MAAOrL,EAAAuL,aAV0C,CAerD3H,QAASA,EAA2B,CAACvf,CAAD,CAAO4a,CAAP,CAAmBjd,CAAnB,CAA0B2H,CAA1B,CAAgC,CAClE,IAAIqhB,EAAgBrL,CAAA,CAAa3d,CAAb,CAAoB,CAAA,CAApB,CAGpB,IAAKgpB,CAAL,CAAA,CAGA,GAAa,UAAb,GAAIrhB,CAAJ,EAA+C,QAA/C,GAA2BsZ,EAAA,CAAU5e,CAAV,CAA3B,CACE,KAAM+f,GAAA,CAAe,UAAf,CAEFzc,EAAA,CAAYtD,CAAZ,CAFE,CAAN,CAKF4a,CAAAvd,KAAA,CAAgB,UACJ,GADI,SAELgJ,QAAQ,EAAG,CAChB,MAAO,KACA8gB,QAAiC,CAAC/gB,CAAD;AAAQ7C,CAAR,CAAiBqC,CAAjB,CAAuB,CACvD0c,CAAAA,CAAe1c,CAAA0c,YAAfA,GAAoC1c,CAAA0c,YAApCA,CAAuD,EAAvDA,CAEJ,IAAIhI,CAAA5T,KAAA,CAA+BpB,CAA/B,CAAJ,CACE,KAAMya,GAAA,CAAe,aAAf,CAAN,CAWF,GAJA4G,CAIA,CAJgBrL,CAAA,CAAa1V,CAAA,CAAKN,CAAL,CAAb,CAAyB,CAAA,CAAzB,CAA+ByhB,CAAA,CAAkB/mB,CAAlB,CAAwBsF,CAAxB,CAA/B,CAIhB,CAIAM,CAAA,CAAKN,CAAL,CAEC,CAFYqhB,CAAA,CAAcvgB,CAAd,CAEZ,CADAghB,CAAA9E,CAAA,CAAYhd,CAAZ,CAAA8hB,GAAsB9E,CAAA,CAAYhd,CAAZ,CAAtB8hB,CAA0C,EAA1CA,UACA,CADyD,CAAA,CACzD,CAAArmB,CAAA6E,CAAA0c,YAAAvhB,EAAoB6E,CAAA0c,YAAA,CAAiBhd,CAAjB,CAAAid,QAApBxhB,EAAsDqF,CAA
 tDrF,QAAA,CACQ4lB,CADR,CACuBG,QAAiC,CAACO,CAAD,CAAWC,CAAX,CAAqB,CAO9D,OAAZ,GAAGhiB,CAAH,EAAuB+hB,CAAvB,EAAmCC,CAAnC,CACE1hB,CAAA2hB,aAAA,CAAkBF,CAAlB,CAA4BC,CAA5B,CADF,CAGE1hB,CAAAsf,KAAA,CAAU5f,CAAV,CAAgB+hB,CAAhB,CAVwE,CAD7E,CArB0D,CADxD,CADS,CAFN,CAAhB,CATA,CAJkE,CAqEpEpD,QAASA,EAAW,CAAChH,CAAD,CAAeuK,CAAf,CAAiCC,CAAjC,CAA0C,CAAA,IACxDC,EAAuBF,CAAA,CAAiB,CAAjB,CADiC,CAExDG,EAAcH,CAAAhrB,OAF0C,CAGxDuC,EAAS2oB,CAAAE,WAH+C,CAIxDpqB,CAJwD,CAIrDqQ,CAEP,IAAIoP,CAAJ,CACE,IAAIzf,CAAO,CAAH,CAAG,CAAAqQ,CAAA,CAAKoP,CAAAzgB,OAAhB,CAAqCgB,CAArC,CAAyCqQ,CAAzC,CAA6CrQ,CAAA,EAA7C,CACE,GAAIyf,CAAA,CAAazf,CAAb,CAAJ,EAAuBkqB,CAAvB,CAA6C,CAC3CzK,CAAA,CAAazf,CAAA,EAAb,CAAA,CAAoBiqB,CACJI,EAAAA,CAAK9I,CAAL8I,CAASF,CAATE,CAAuB,CAAvC,KAAK,IACI7I,EAAK/B,CAAAzgB,OADd,CAEKuiB,CAFL,CAESC,CAFT,CAEaD,CAAA,EAAA,CAAK8I,CAAA,EAFlB,CAGMA,CAAJ,CAAS7I,CAAT,CACE/B,CAAA,CAAa8B,CAAb,CADF,CACoB9B,CAAA,CAAa4K,CAAb,CADpB,CAGE,OAAO5K,CAAA,CAAa8B,CAAb,CAGX9B,EAAAzgB,OAAA,EAAuBmrB,CAAvB,CAAqC,CACrC,MAZ2C,CAiB7C5oB,CAAJ,EACE
 A,CAAA+oB,aAAA,CAAoBL,CAApB,CAA6BC,CAA7B,CAEElc,EAAAA,CAAWtP,CAAAuP,uBAAA,EACfD;CAAAuc,YAAA,CAAqBL,CAArB,CACAD,EAAA,CAAQjkB,CAAAwkB,QAAR,CAAA,CAA0BN,CAAA,CAAqBlkB,CAAAwkB,QAArB,CACjBC,EAAAA,CAAI,CAAb,KAAgBC,CAAhB,CAAqBV,CAAAhrB,OAArB,CAA8CyrB,CAA9C,CAAkDC,CAAlD,CAAsDD,CAAA,EAAtD,CACM1kB,CAGJ,CAHcikB,CAAA,CAAiBS,CAAjB,CAGd,CAFAzkB,CAAA,CAAOD,CAAP,CAAAiW,OAAA,EAEA,CADAhO,CAAAuc,YAAA,CAAqBxkB,CAArB,CACA,CAAA,OAAOikB,CAAA,CAAiBS,CAAjB,CAGTT,EAAA,CAAiB,CAAjB,CAAA,CAAsBC,CACtBD,EAAAhrB,OAAA,CAA0B,CAvCkC,CA2C9DqkB,QAASA,EAAkB,CAACze,CAAD,CAAK+lB,CAAL,CAAiB,CAC1C,MAAO3pB,EAAA,CAAO,QAAQ,EAAG,CAAE,MAAO4D,EAAAI,MAAA,CAAS,IAAT,CAAe9D,SAAf,CAAT,CAAlB,CAAyD0D,CAAzD,CAA6D+lB,CAA7D,CADmC,CA1vC5C,IAAIpK,GAAaA,QAAQ,CAACxa,CAAD,CAAUqC,CAAV,CAAgB,CACvC,IAAA4b,UAAA,CAAiBje,CACjB,KAAAkb,MAAA,CAAa7Y,CAAb,EAAqB,EAFkB,CAKzCmY,GAAA/L,UAAA,CAAuB,YACT2M,EADS,WAgBTyJ,QAAQ,CAACC,CAAD,CAAW,CAC1BA,CAAH,EAAiC,CAAjC,CAAeA,CAAA7rB,OAAf,EACEof,CAAAmB,SAAA,CAAkB,IAAAyE,UAAlB,CAAkC6G,CAAlC,CAF2B,CAhBV,cAkCNC,QAAQ,CAACD,
 CAAD,CAAW,CAC7BA,CAAH,EAAiC,CAAjC,CAAeA,CAAA7rB,OAAf,EACEof,CAAA2M,YAAA,CAAqB,IAAA/G,UAArB,CAAqC6G,CAArC,CAF8B,CAlCb,cAqDNd,QAAQ,CAACiB,CAAD,CAAaC,CAAb,CAAyB,CAC9C,IAAAH,aAAA,CAAkBI,EAAA,CAAgBD,CAAhB,CAA4BD,CAA5B,CAAlB,CACA,KAAAJ,UAAA,CAAeM,EAAA,CAAgBF,CAAhB;AAA4BC,CAA5B,CAAf,CAF8C,CArD3B,MAmEfvD,QAAQ,CAACnoB,CAAD,CAAMY,CAAN,CAAagrB,CAAb,CAAwB7G,CAAxB,CAAkC,CAAA,IAK1C8G,EAAa7a,EAAA,CAAmB,IAAAyT,UAAA,CAAe,CAAf,CAAnB,CAAsCzkB,CAAtC,CAIb6rB,EAAJ,GACE,IAAApH,UAAAqH,KAAA,CAAoB9rB,CAApB,CAAyBY,CAAzB,CACA,CAAAmkB,CAAA,CAAW8G,CAFb,CAKA,KAAA,CAAK7rB,CAAL,CAAA,CAAYY,CAGRmkB,EAAJ,CACE,IAAArD,MAAA,CAAW1hB,CAAX,CADF,CACoB+kB,CADpB,EAGEA,CAHF,CAGa,IAAArD,MAAA,CAAW1hB,CAAX,CAHb,IAKI,IAAA0hB,MAAA,CAAW1hB,CAAX,CALJ,CAKsB+kB,CALtB,CAKiC/a,EAAA,CAAWhK,CAAX,CAAgB,GAAhB,CALjC,CASAkD,EAAA,CAAW2e,EAAA,CAAU,IAAA4C,UAAV,CAGX,IAAkB,GAAlB,GAAKvhB,CAAL,EAAiC,MAAjC,GAAyBlD,CAAzB,EACkB,KADlB,GACKkD,CADL,EACmC,KADnC,GAC2BlD,CAD3B,CAEE,IAAA,CAAKA,CAAL,CAAA,CAAYY,CAAZ,CAAoBke,CAAA,CAAcle,CAAd,CAA6B,KAA7B,GAAqBZ,CAA
 rB,CAGJ,EAAA,CAAlB,GAAI4rB,CAAJ,GACgB,IAAd,GAAIhrB,CAAJ,EAAsBA,CAAtB,GAAgCxB,CAAhC,CACE,IAAAqlB,UAAAsH,WAAA,CAA0BhH,CAA1B,CADF,CAGE,IAAAN,UAAA5b,KAAA,CAAoBkc,CAApB,CAA8BnkB,CAA9B,CAJJ,CAUA,EADI2kB,CACJ,CADkB,IAAAA,YAClB,GAAe1lB,CAAA,CAAQ0lB,CAAA,CAAYvlB,CAAZ,CAAR,CAA0B,QAAQ,CAACqF,CAAD,CAAK,CACpD,GAAI,CACFA,CAAA,CAAGzE,CAAH,CADE,CAEF,MAAOgG,CAAP,CAAU,CACVgX,CAAA,CAAkBhX,CAAlB,CADU,CAHwC,CAAvC,CA5C+B,CAnE3B,UA4IX0e,QAAQ,CAACtlB,CAAD,CAAMqF,CAAN,CAAU,CAAA,IACtByb,EAAQ,IADc,CAEtByE,EAAezE,CAAAyE,YAAfA,GAAqCzE,CAAAyE,YAArCA,CAAyD,EAAzDA,CAFsB,CAGtByG,EAAazG,CAAA,CAAYvlB,CAAZ,CAAbgsB,GAAkCzG,CAAA,CAAYvlB,CAAZ,CAAlCgsB,CAAqD,EAArDA,CAEJA,EAAA1rB,KAAA,CAAe+E,CAAf,CACAiR;CAAAvS,WAAA,CAAsB,QAAQ,EAAG,CAC1BioB,CAAA3B,QAAL,EAEEhlB,CAAA,CAAGyb,CAAA,CAAM9gB,CAAN,CAAH,CAH6B,CAAjC,CAMA,OAAOqF,EAZmB,CA5IP,CAP+D,KAmKlF4mB,GAAc1N,CAAA0N,YAAA,EAnKoE,CAoKlFC,GAAY3N,CAAA2N,UAAA,EApKsE,CAqKlF7E,GAAsC,IAChB,EADC4E,EACD,EADsC,IACtC,EADwBC,EACxB,CAAhB/pB,EAAgB,CAChBklB,QAA4B,CAACjB,CAAD,CAAW,CACvC,MAAOA,EAAA
 lf,QAAA,CAAiB,OAAjB,CAA0B+kB,EAA1B,CAAA/kB,QAAA,CAA+C,KAA/C,CAAsDglB,EAAtD,CADgC,CAvKqC,CA0KlF5J,GAAkB,cAGtB,OAAOhZ,EA7K+E,CAJ5E,CA9H6C,CAg5C3DsY,QAASA,GAAkB,CAACrZ,CAAD,CAAO,CAChC,MAAOgE,GAAA,CAAUhE,CAAArB,QAAA,CAAailB,EAAb,CAA4B,EAA5B,CAAV,CADyB,CA8DlCR,QAASA,GAAe,CAACS,CAAD,CAAOC,CAAP,CAAa,CAAA,IAC/BC,EAAS,EADsB,CAE/BC,EAAUH,CAAA5kB,MAAA,CAAW,KAAX,CAFqB,CAG/BglB,EAAUH,CAAA7kB,MAAA,CAAW,KAAX,CAHqB,CAM3B/G,EAAI,CADZ,EAAA,CACA,IAAA,CAAeA,CAAf,CAAmB8rB,CAAA9sB,OAAnB,CAAmCgB,CAAA,EAAnC,CAAwC,CAEtC,IADA,IAAIgsB,EAAQF,CAAA,CAAQ9rB,CAAR,CAAZ,CACQuhB,EAAI,CAAZ,CAAeA,CAAf,CAAmBwK,CAAA/sB,OAAnB,CAAmCuiB,CAAA,EAAnC,CACE,GAAGyK,CAAH,EAAYD,CAAA,CAAQxK,CAAR,CAAZ,CAAwB,SAAS,CAEnCsK,EAAA,GAA2B,CAAhB,CAAAA,CAAA7sB,OAAA,CAAoB,GAApB,CAA0B,EAArC,EAA2CgtB,CALL,CAOxC,MAAOH,EAb4B,CA0BrCI,QAASA,GAAmB,EAAG,CAAA,IACzBpL,EAAc,EADW,CAEzBqL,EAAY,yBAYhB,KAAAC,SAAA,CAAgBC,QAAQ,CAACtkB,CAAD;AAAOoC,CAAP,CAAoB,CAC1CC,EAAA,CAAwBrC,CAAxB,CAA8B,YAA9B,CACI/F,EAAA,CAAS+F,CAAT,CAAJ,CACE9G,CAAA,CAAO6f,CAAP,CAAoB/Y,CAApB,
 CADF,CAGE+Y,CAAA,CAAY/Y,CAAZ,CAHF,CAGsBoC,CALoB,CAU5C,KAAA8I,KAAA,CAAY,CAAC,WAAD,CAAc,SAAd,CAAyB,QAAQ,CAAC4B,CAAD,CAAYe,CAAZ,CAAqB,CAyBhE,MAAO,SAAQ,CAAC0W,CAAD,CAAalY,CAAb,CAAqB,CAAA,IAC9BM,CAD8B,CACbvK,CADa,CACAoiB,CAE/BptB,EAAA,CAASmtB,CAAT,CAAH,GACE7lB,CAOA,CAPQ6lB,CAAA7lB,MAAA,CAAiB0lB,CAAjB,CAOR,CANAhiB,CAMA,CANc1D,CAAA,CAAM,CAAN,CAMd,CALA8lB,CAKA,CALa9lB,CAAA,CAAM,CAAN,CAKb,CAJA6lB,CAIA,CAJaxL,CAAAphB,eAAA,CAA2ByK,CAA3B,CACA,CAAP2W,CAAA,CAAY3W,CAAZ,CAAO,CACPE,EAAA,CAAO+J,CAAAsR,OAAP,CAAsBvb,CAAtB,CAAmC,CAAA,CAAnC,CADO,EACqCE,EAAA,CAAOuL,CAAP,CAAgBzL,CAAhB,CAA6B,CAAA,CAA7B,CAElD,CAAAF,EAAA,CAAYqiB,CAAZ,CAAwBniB,CAAxB,CAAqC,CAAA,CAArC,CARF,CAWAuK,EAAA,CAAWG,CAAA7B,YAAA,CAAsBsZ,CAAtB,CAAkClY,CAAlC,CAEX,IAAImY,CAAJ,CAAgB,CACd,GAAMnY,CAAAA,CAAN,EAAwC,QAAxC,EAAgB,MAAOA,EAAAsR,OAAvB,CACE,KAAM7mB,EAAA,CAAO,aAAP,CAAA,CAAsB,OAAtB,CAEFsL,CAFE,EAEamiB,CAAAvkB,KAFb,CAE8BwkB,CAF9B,CAAN,CAKFnY,CAAAsR,OAAA,CAAc6G,CAAd,CAAA,CAA4B7X,CAPd,CAUhB,MAAOA,EA1B2B,CAzB4B,CAAtD,CAxBiB,CAyF/B8X,QAASA,GAA
 iB,EAAE,CAC1B,IAAAvZ,KAAA,CAAY,CAAC,SAAD,CAAY,QAAQ,CAACvU,CAAD,CAAQ,CACtC,MAAOuH,EAAA,CAAOvH,CAAAC,SAAP,CAD+B,CAA5B,CADc,CAsC5B8tB,QAASA,GAAyB,EAAG,CACnC,IAAAxZ,KAAA,CAAY,CAAC,MAAD,CAAS,QAAQ,CAACyD,CAAD,CAAO,CAClC,MAAO,SAAQ,CAACgW,CAAD,CAAYC,CAAZ,CAAmB,CAChCjW,CAAAM,MAAA/R,MAAA,CAAiByR,CAAjB;AAAuBvV,SAAvB,CADgC,CADA,CAAxB,CADuB,CAcrCyrB,QAASA,GAAY,CAAChE,CAAD,CAAU,CAAA,IACzBiE,EAAS,EADgB,CACZrtB,CADY,CACP4F,CADO,CACFnF,CAE3B,IAAI,CAAC2oB,CAAL,CAAc,MAAOiE,EAErBxtB,EAAA,CAAQupB,CAAA5hB,MAAA,CAAc,IAAd,CAAR,CAA6B,QAAQ,CAAC8lB,CAAD,CAAO,CAC1C7sB,CAAA,CAAI6sB,CAAA9pB,QAAA,CAAa,GAAb,CACJxD,EAAA,CAAMsG,CAAA,CAAUkK,EAAA,CAAK8c,CAAA/oB,OAAA,CAAY,CAAZ,CAAe9D,CAAf,CAAL,CAAV,CACNmF,EAAA,CAAM4K,EAAA,CAAK8c,CAAA/oB,OAAA,CAAY9D,CAAZ,CAAgB,CAAhB,CAAL,CAEFT,EAAJ,GAEIqtB,CAAA,CAAOrtB,CAAP,CAFJ,CACMqtB,CAAA,CAAOrtB,CAAP,CAAJ,CACEqtB,CAAA,CAAOrtB,CAAP,CADF,EACiB,IADjB,CACwB4F,CADxB,EAGgBA,CAJlB,CAL0C,CAA5C,CAcA,OAAOynB,EAnBsB,CAmC/BE,QAASA,GAAa,CAACnE,CAAD,CAAU,CAC9B,IAAIoE,EAAahrB,CAAA,CAAS4mB,CAAT,CAA
 A,CAAoBA,CAApB,CAA8BhqB,CAE/C,OAAO,SAAQ,CAACmJ,CAAD,CAAO,CACfilB,CAAL,GAAiBA,CAAjB,CAA+BJ,EAAA,CAAahE,CAAb,CAA/B,CAEA,OAAI7gB,EAAJ,CACSilB,CAAA,CAAWlnB,CAAA,CAAUiC,CAAV,CAAX,CADT,EACwC,IADxC,CAIOilB,CAPa,CAHQ,CAyBhCC,QAASA,GAAa,CAAChkB,CAAD,CAAO2f,CAAP,CAAgBsE,CAAhB,CAAqB,CACzC,GAAIztB,CAAA,CAAWytB,CAAX,CAAJ,CACE,MAAOA,EAAA,CAAIjkB,CAAJ,CAAU2f,CAAV,CAETvpB,EAAA,CAAQ6tB,CAAR,CAAa,QAAQ,CAACroB,CAAD,CAAK,CACxBoE,CAAA,CAAOpE,CAAA,CAAGoE,CAAH,CAAS2f,CAAT,CADiB,CAA1B,CAIA,OAAO3f,EARkC,CAiB3CkkB,QAASA,GAAa,EAAG,CAAA,IACnBC,EAAa,kBADM,CAEnBC,EAAW,YAFQ,CAGnBC,EAAoB,cAHD,CAInBC,EAAgC,CAAC,cAAD,CAAiB,gCAAjB,CAJb,CAMnBC,EAAW,IAAAA,SAAXA,CAA2B,mBAEV,CAAC,QAAQ,CAACvkB,CAAD,CAAO,CAC7B9J,CAAA,CAAS8J,CAAT,CAAJ;CAEEA,CACA,CADOA,CAAAvC,QAAA,CAAa4mB,CAAb,CAAgC,EAAhC,CACP,CAAIF,CAAAjkB,KAAA,CAAgBF,CAAhB,CAAJ,EAA6BokB,CAAAlkB,KAAA,CAAcF,CAAd,CAA7B,GACEA,CADF,CACSxD,EAAA,CAASwD,CAAT,CADT,CAHF,CAMA,OAAOA,EAP0B,CAAhB,CAFU,kBAaX,CAAC,QAAQ,CAACwkB,CAAD,CAAI,CAC7B,MAAOzrB,EAAA,CAASyrB,CAAT,CAAA,EAtoMmB,eAsoMnB
 ,GAtoMJtrB,EAAAxC,KAAA,CAsoM2B8tB,CAtoM3B,CAsoMI,CAA4BpoB,EAAA,CAAOooB,CAAP,CAA5B,CAAwCA,CADlB,CAAb,CAbW,SAkBpB,QACC,QACI,mCADJ,CADD,MAICF,CAJD,KAKCA,CALD,OAMCA,CAND,CAlBoB,gBA2Bb,YA3Ba,gBA4Bb,cA5Ba,CANR,CAyCnBG,EAAuB,IAAAC,aAAvBD,CAA2C,EAzCxB,CA+CnBE,EAA+B,IAAAC,qBAA/BD,CAA2D,EAE/D,KAAA3a,KAAA,CAAY,CAAC,cAAD,CAAiB,UAAjB,CAA6B,eAA7B,CAA8C,YAA9C,CAA4D,IAA5D,CAAkE,WAAlE,CACR,QAAQ,CAAC6a,CAAD,CAAeC,CAAf,CAAyBvR,CAAzB,CAAwC1G,CAAxC,CAAoDkY,CAApD,CAAwDnZ,CAAxD,CAAmE,CAghB7EmJ,QAASA,EAAK,CAACiQ,CAAD,CAAgB,CA4E5BC,QAASA,EAAiB,CAACxF,CAAD,CAAW,CAEnC,IAAIyF,EAAOltB,CAAA,CAAO,EAAP,CAAWynB,CAAX,CAAqB,MACxBuE,EAAA,CAAcvE,CAAAzf,KAAd;AAA6Byf,CAAAE,QAA7B,CAA+Chd,CAAAsiB,kBAA/C,CADwB,CAArB,CAGX,OAvpBC,IAwpBM,EADWxF,CAAA0F,OACX,EAxpBoB,GAwpBpB,CADW1F,CAAA0F,OACX,CAAHD,CAAG,CACHH,CAAAK,OAAA,CAAUF,CAAV,CAP+B,CA3ErC,IAAIviB,EAAS,kBACO4hB,CAAAc,iBADP,mBAEQd,CAAAU,kBAFR,CAAb,CAIItF,EAiFJ2F,QAAqB,CAAC3iB,CAAD,CAAS,CA2B5B4iB,QAASA,EAAW,CAAC5F,CAAD,CAAU,CAC5B,IAAI6F,CAEJpvB,EAAA,CAAQupB,CAAR,CAAiB,QAAQ,CAA
 C8F,CAAD,CAAWC,CAAX,CAAmB,CACtClvB,CAAA,CAAWivB,CAAX,CAAJ,GACED,CACA,CADgBC,CAAA,EAChB,CAAqB,IAArB,EAAID,CAAJ,CACE7F,CAAA,CAAQ+F,CAAR,CADF,CACoBF,CADpB,CAGE,OAAO7F,CAAA,CAAQ+F,CAAR,CALX,CAD0C,CAA5C,CAH4B,CA3BF,IACxBC,EAAapB,CAAA5E,QADW,CAExBiG,EAAa5tB,CAAA,CAAO,EAAP,CAAW2K,CAAAgd,QAAX,CAFW,CAGxBkG,CAHwB,CAGeC,CAHf,CAK5BH,EAAa3tB,CAAA,CAAO,EAAP,CAAW2tB,CAAAI,OAAX,CAA8BJ,CAAA,CAAW9oB,CAAA,CAAU8F,CAAAL,OAAV,CAAX,CAA9B,CAGbijB,EAAA,CAAYI,CAAZ,CACAJ,EAAA,CAAYK,CAAZ,CAGA,EAAA,CACA,IAAKC,CAAL,GAAsBF,EAAtB,CAAkC,CAChCK,CAAA,CAAyBnpB,CAAA,CAAUgpB,CAAV,CAEzB,KAAKC,CAAL,GAAsBF,EAAtB,CACE,GAAI/oB,CAAA,CAAUipB,CAAV,CAAJ,GAAiCE,CAAjC,CACE,SAAS,CAIbJ,EAAA,CAAWC,CAAX,CAAA,CAA4BF,CAAA,CAAWE,CAAX,CATI,CAYlC,MAAOD,EAzBqB,CAjFhB,CAAaZ,CAAb,CAEdhtB,EAAA,CAAO2K,CAAP,CAAeqiB,CAAf,CACAriB,EAAAgd,QAAA,CAAiBA,CACjBhd,EAAAL,OAAA,CAAgB2jB,EAAA,CAAUtjB,CAAAL,OAAV,CAKhB,EAHI4jB,CAGJ,CAHgBC,EAAA,CAAgBxjB,CAAA+L,IAAhB,CACA,CAAVoW,CAAAtU,QAAA,EAAA,CAAmB7N,CAAAyjB,eAAnB;AAA4C7B,CAAA6B,eAA5C,CAAU,CACVzwB,CACN,IACEgqB
 ,CAAA,CAAShd,CAAA0jB,eAAT,EAAkC9B,CAAA8B,eAAlC,CADF,CACgEH,CADhE,CA0BA,KAAII,EAAQ,CArBQC,QAAQ,CAAC5jB,CAAD,CAAS,CACnCgd,CAAA,CAAUhd,CAAAgd,QACV,KAAI6G,EAAUxC,EAAA,CAAcrhB,CAAA3C,KAAd,CAA2B8jB,EAAA,CAAcnE,CAAd,CAA3B,CAAmDhd,CAAA0iB,iBAAnD,CAGVxsB,EAAA,CAAY8J,CAAA3C,KAAZ,CAAJ,EACE5J,CAAA,CAAQupB,CAAR,CAAiB,QAAQ,CAACxoB,CAAD,CAAQuuB,CAAR,CAAgB,CACb,cAA1B,GAAI7oB,CAAA,CAAU6oB,CAAV,CAAJ,EACI,OAAO/F,CAAA,CAAQ+F,CAAR,CAF4B,CAAzC,CAOE7sB,EAAA,CAAY8J,CAAA8jB,gBAAZ,CAAJ,EAA4C,CAAA5tB,CAAA,CAAY0rB,CAAAkC,gBAAZ,CAA5C,GACE9jB,CAAA8jB,gBADF,CAC2BlC,CAAAkC,gBAD3B,CAKA,OAAOC,EAAA,CAAQ/jB,CAAR,CAAgB6jB,CAAhB,CAAyB7G,CAAzB,CAAAgH,KAAA,CAAuC1B,CAAvC,CAA0DA,CAA1D,CAlB4B,CAqBzB,CAAgBtvB,CAAhB,CAAZ,CACIixB,EAAU7B,CAAA8B,KAAA,CAAQlkB,CAAR,CAYd,KATAvM,CAAA,CAAQ0wB,CAAR,CAA8B,QAAQ,CAACC,CAAD,CAAc,CAClD,CAAIA,CAAAC,QAAJ,EAA2BD,CAAAE,aAA3B,GACEX,CAAA1uB,QAAA,CAAcmvB,CAAAC,QAAd,CAAmCD,CAAAE,aAAnC,CAEF,EAAIF,CAAAtH,SAAJ,EAA4BsH,CAAAG,cAA5B,GACEZ,CAAAzvB,KAAA,CAAWkwB,CAAAtH,SAAX,CAAiCsH,CAAAG,cAAjC,CALgD,CAApD,C
 ASA,CAAMZ,CAAAtwB,OAAN,CAAA,CAAoB,CACdmxB,CAAAA,CAASb,CAAAriB,MAAA,EACb;IAAImjB,EAAWd,CAAAriB,MAAA,EAAf,CAEA2iB,EAAUA,CAAAD,KAAA,CAAaQ,CAAb,CAAqBC,CAArB,CAJQ,CAOpBR,CAAAzH,QAAA,CAAkBkI,QAAQ,CAACzrB,CAAD,CAAK,CAC7BgrB,CAAAD,KAAA,CAAa,QAAQ,CAAClH,CAAD,CAAW,CAC9B7jB,CAAA,CAAG6jB,CAAAzf,KAAH,CAAkByf,CAAA0F,OAAlB,CAAmC1F,CAAAE,QAAnC,CAAqDhd,CAArD,CAD8B,CAAhC,CAGA,OAAOikB,EAJsB,CAO/BA,EAAA7Y,MAAA,CAAgBuZ,QAAQ,CAAC1rB,CAAD,CAAK,CAC3BgrB,CAAAD,KAAA,CAAa,IAAb,CAAmB,QAAQ,CAAClH,CAAD,CAAW,CACpC7jB,CAAA,CAAG6jB,CAAAzf,KAAH,CAAkByf,CAAA0F,OAAlB,CAAmC1F,CAAAE,QAAnC,CAAqDhd,CAArD,CADoC,CAAtC,CAGA,OAAOikB,EAJoB,CAO7B,OAAOA,EA1EqB,CAuQ9BF,QAASA,EAAO,CAAC/jB,CAAD,CAAS6jB,CAAT,CAAkBZ,CAAlB,CAA8B,CAqD5C2B,QAASA,EAAI,CAACpC,CAAD,CAAS1F,CAAT,CAAmB+H,CAAnB,CAAkC,CACzCzc,CAAJ,GAn4BC,GAo4BC,EAAcoa,CAAd,EAp4ByB,GAo4BzB,CAAcA,CAAd,CACEpa,CAAAjC,IAAA,CAAU4F,CAAV,CAAe,CAACyW,CAAD,CAAS1F,CAAT,CAAmBkE,EAAA,CAAa6D,CAAb,CAAnB,CAAf,CADF,CAIEzc,CAAAiI,OAAA,CAAatE,CAAb,CALJ,CASA+Y,EAAA,CAAehI,CAAf,CAAyB0F,CAAzB,CAAiCq
 C,CAAjC,CACK3a,EAAA6a,QAAL,EAAyB7a,CAAA9M,OAAA,EAXoB,CAkB/C0nB,QAASA,EAAc,CAAChI,CAAD,CAAW0F,CAAX,CAAmBxF,CAAnB,CAA4B,CAEjDwF,CAAA,CAAShH,IAAAC,IAAA,CAAS+G,CAAT,CAAiB,CAAjB,CAER,EAx5BA,GAw5BA,EAAUA,CAAV,EAx5B0B,GAw5B1B,CAAUA,CAAV,CAAoBwC,CAAAC,QAApB,CAAuCD,CAAAvC,OAAvC,EAAwD,MACjD3F,CADiD,QAE/C0F,CAF+C,SAG9CrB,EAAA,CAAcnE,CAAd,CAH8C,QAI/Chd,CAJ+C,CAAxD,CAJgD,CAanDklB,QAASA,EAAgB,EAAG,CAC1B,IAAIC,EAAM/tB,EAAA,CAAQgb,CAAAgT,gBAAR,CAA+BplB,CAA/B,CACG,GAAb,GAAImlB,CAAJ,EAAgB/S,CAAAgT,gBAAA7tB,OAAA,CAA6B4tB,CAA7B;AAAkC,CAAlC,CAFU,CApFgB,IACxCH,EAAW5C,CAAA9T,MAAA,EAD6B,CAExC2V,EAAUe,CAAAf,QAF8B,CAGxC7b,CAHwC,CAIxCid,CAJwC,CAKxCtZ,EAAMuZ,CAAA,CAAStlB,CAAA+L,IAAT,CAAqB/L,CAAAulB,OAArB,CAEVnT,EAAAgT,gBAAAlxB,KAAA,CAA2B8L,CAA3B,CACAikB,EAAAD,KAAA,CAAakB,CAAb,CAA+BA,CAA/B,CAGA,EAAKllB,CAAAoI,MAAL,EAAqBwZ,CAAAxZ,MAArB,IAAyD,CAAA,CAAzD,GAAwCpI,CAAAoI,MAAxC,EAAmF,KAAnF,EAAkEpI,CAAAL,OAAlE,IACEyI,CADF,CACUhS,CAAA,CAAS4J,CAAAoI,MAAT,CAAA,CAAyBpI,CAAAoI,MAAzB,CACAhS,CAAA,CAASwrB,CAAAxZ,MAAT,CAAA,CAA
 2BwZ,CAAAxZ,MAA3B,CACAod,CAHV,CAMA,IAAIpd,CAAJ,CAEE,GADAid,CACI,CADSjd,CAAAR,IAAA,CAAUmE,CAAV,CACT,CAAA5V,CAAA,CAAUkvB,CAAV,CAAJ,CAA2B,CACzB,GAAIA,CAAArB,KAAJ,CAGE,MADAqB,EAAArB,KAAA,CAAgBkB,CAAhB,CAAkCA,CAAlC,CACOG,CAAAA,CAGH7xB,EAAA,CAAQ6xB,CAAR,CAAJ,CACEP,CAAA,CAAeO,CAAA,CAAW,CAAX,CAAf,CAA8BA,CAAA,CAAW,CAAX,CAA9B,CAA6C7tB,EAAA,CAAK6tB,CAAA,CAAW,CAAX,CAAL,CAA7C,CADF,CAGEP,CAAA,CAAeO,CAAf,CAA2B,GAA3B,CAAgC,EAAhC,CAVqB,CAA3B,IAeEjd,EAAAjC,IAAA,CAAU4F,CAAV,CAAekY,CAAf,CAKA/tB,EAAA,CAAYmvB,CAAZ,CAAJ,EACEnD,CAAA,CAAaliB,CAAAL,OAAb,CAA4BoM,CAA5B,CAAiC8X,CAAjC,CAA0Ce,CAA1C,CAAgD3B,CAAhD,CAA4DjjB,CAAAylB,QAA5D,CACIzlB,CAAA8jB,gBADJ,CAC4B9jB,CAAA0lB,aAD5B,CAIF,OAAOzB,EA5CqC,CA2F9CqB,QAASA,EAAQ,CAACvZ,CAAD,CAAMwZ,CAAN,CAAc,CACzB,GAAI,CAACA,CAAL,CAAa,MAAOxZ,EACpB,KAAIzQ,EAAQ,EACZlH,GAAA,CAAcmxB,CAAd,CAAsB,QAAQ,CAAC/wB,CAAD,CAAQZ,CAAR,CAAa,CAC3B,IAAd,GAAIY,CAAJ,EAAsB0B,CAAA,CAAY1B,CAAZ,CAAtB,GACKhB,CAAA,CAAQgB,CAAR,CAEL,GAFqBA,CAErB,CAF6B,CAACA,CAAD,CAE7B,EAAAf,CAAA,CAAQe,CAAR,CAAe,QAAQ,CAACy
 F,CAAD,CAAI,CACrB7D,CAAA,CAAS6D,CAAT,CAAJ,GACEA,CADF,CACMR,EAAA,CAAOQ,CAAP,CADN,CAGAqB;CAAApH,KAAA,CAAWsH,EAAA,CAAe5H,CAAf,CAAX,CAAiC,GAAjC,CACW4H,EAAA,CAAevB,CAAf,CADX,CAJyB,CAA3B,CAHA,CADyC,CAA3C,CAYA,OAAO8R,EAAP,EAAoC,EAAtB,EAACA,CAAA3U,QAAA,CAAY,GAAZ,CAAD,CAA2B,GAA3B,CAAiC,GAA/C,EAAsDkE,CAAAxG,KAAA,CAAW,GAAX,CAf7B,CAh3B/B,IAAI0wB,EAAe5U,CAAA,CAAc,OAAd,CAAnB,CAOIuT,EAAuB,EAE3B1wB,EAAA,CAAQquB,CAAR,CAA8B,QAAQ,CAAC6D,CAAD,CAAqB,CACzDxB,CAAAlvB,QAAA,CAA6B1B,CAAA,CAASoyB,CAAT,CACA,CAAvB1c,CAAArB,IAAA,CAAc+d,CAAd,CAAuB,CAAa1c,CAAAjM,OAAA,CAAiB2oB,CAAjB,CAD1C,CADyD,CAA3D,CAKAlyB,EAAA,CAAQuuB,CAAR,CAAsC,QAAQ,CAAC2D,CAAD,CAAqBjxB,CAArB,CAA4B,CACxE,IAAIkxB,EAAaryB,CAAA,CAASoyB,CAAT,CACA,CAAX1c,CAAArB,IAAA,CAAc+d,CAAd,CAAW,CACX1c,CAAAjM,OAAA,CAAiB2oB,CAAjB,CAONxB,EAAA5sB,OAAA,CAA4B7C,CAA5B,CAAmC,CAAnC,CAAsC,UAC1BooB,QAAQ,CAACA,CAAD,CAAW,CAC3B,MAAO8I,EAAA,CAAWxD,CAAA8B,KAAA,CAAQpH,CAAR,CAAX,CADoB,CADO,eAIrByH,QAAQ,CAACzH,CAAD,CAAW,CAChC,MAAO8I,EAAA,CAAWxD,CAAAK,OAAA,CAAU3F,CAAV,CAAX,CADyB,C
 AJE,CAAtC,CAVwE,CAA1E,CAkoBA1K,EAAAgT,gBAAA,CAAwB,EAsGxBS,UAA2B,CAAC5pB,CAAD,CAAQ,CACjCxI,CAAA,CAAQ8B,SAAR,CAAmB,QAAQ,CAAC4G,CAAD,CAAO,CAChCiW,CAAA,CAAMjW,CAAN,CAAA,CAAc,QAAQ,CAAC4P,CAAD,CAAM/L,CAAN,CAAc,CAClC,MAAOoS,EAAA,CAAM/c,CAAA,CAAO2K,CAAP,EAAiB,EAAjB,CAAqB,QACxB7D,CADwB,KAE3B4P,CAF2B,CAArB,CAAN,CAD2B,CADJ,CAAlC,CADiC,CAAnC8Z,CAhDA,CAAmB,KAAnB,CAA0B,QAA1B,CAAoC,MAApC,CAA4C,OAA5C,CA4DAC,UAAmC,CAAC3pB,CAAD,CAAO,CACxC1I,CAAA,CAAQ8B,SAAR,CAAmB,QAAQ,CAAC4G,CAAD,CAAO,CAChCiW,CAAA,CAAMjW,CAAN,CAAA;AAAc,QAAQ,CAAC4P,CAAD,CAAM1O,CAAN,CAAY2C,CAAZ,CAAoB,CACxC,MAAOoS,EAAA,CAAM/c,CAAA,CAAO2K,CAAP,EAAiB,EAAjB,CAAqB,QACxB7D,CADwB,KAE3B4P,CAF2B,MAG1B1O,CAH0B,CAArB,CAAN,CADiC,CADV,CAAlC,CADwC,CAA1CyoB,CA/BA,CAA2B,MAA3B,CAAmC,KAAnC,CAaA1T,EAAAwP,SAAA,CAAiBA,CAGjB,OAAOxP,EArvBsE,CADnE,CAjDW,CAo9BzB2T,QAASA,GAAoB,EAAG,CAC9B,IAAA1e,KAAA,CAAY,CAAC,UAAD,CAAa,SAAb,CAAwB,WAAxB,CAAqC,QAAQ,CAAC8a,CAAD,CAAWnY,CAAX,CAAoB8E,CAApB,CAA+B,CACtF,MAAOkX,GAAA,CAAkB7D,CAAlB,CAA4B8D,EAA5B,CAAiC9D,CAAA7T,MAAjC,CAAiD
 tE,CAAAxM,QAAA0oB,UAAjD,CAA4EpX,CAAA,CAAU,CAAV,CAA5E,CAD+E,CAA5E,CADkB,CAMhCkX,QAASA,GAAiB,CAAC7D,CAAD,CAAW8D,CAAX,CAAgBE,CAAhB,CAA+BD,CAA/B,CAA0Cha,CAA1C,CAAuD,CAiG/Eka,QAASA,EAAQ,CAACra,CAAD,CAAM6Y,CAAN,CAAY,CAAA,IAIvByB,EAASna,CAAAnK,cAAA,CAA0B,QAA1B,CAJc,CAKvBukB,EAAcA,QAAQ,EAAG,CACvBD,CAAAE,mBAAA,CAA4BF,CAAAG,OAA5B,CAA4CH,CAAAI,QAA5C,CAA6D,IAC7Dva,EAAAwa,KAAAzkB,YAAA,CAA6BokB,CAA7B,CACIzB,EAAJ,EAAUA,CAAA,EAHa,CAM7ByB,EAAAzjB,KAAA,CAAc,iBACdyjB,EAAAnuB,IAAA,CAAa6T,CAETjG,EAAJ,EAAoB,CAApB,EAAYA,CAAZ,CACEugB,CAAAE,mBADF,CAC8BI,QAAQ,EAAG,CACjC,iBAAAppB,KAAA,CAAuB8oB,CAAAO,WAAvB,CAAJ,EACEN,CAAA,EAFmC,CADzC;AAOED,CAAAG,OAPF,CAOkBH,CAAAI,QAPlB,CAOmCI,QAAQ,EAAG,CAC1CP,CAAA,EAD0C,CAK9Cpa,EAAAwa,KAAA9H,YAAA,CAA6ByH,CAA7B,CACA,OAAOC,EA3BoB,CAhG7B,IAAIQ,EAAW,EAGf,OAAO,SAAQ,CAACnnB,CAAD,CAASoM,CAAT,CAAcwL,CAAd,CAAoB3K,CAApB,CAA8BoQ,CAA9B,CAAuCyI,CAAvC,CAAgD3B,CAAhD,CAAiE4B,CAAjE,CAA+E,CAqE5FqB,QAASA,EAAc,EAAG,CACxBvE,CAAA,CAASsE,CACTE,EAAA,EAAaA,CAAA,EACbC,EAAA,EAAOA,CAAAC,MAAA,EAHiB,CAM1BC
 ,QAASA,EAAe,CAACva,CAAD,CAAW4V,CAAX,CAAmB1F,CAAnB,CAA6B+H,CAA7B,CAA4C,CAClE,IAAIuC,EAAWC,EAAA,CAAWtb,CAAX,CAAAqb,SAGf3Y,GAAA,EAAa0X,CAAAzX,OAAA,CAAqBD,EAArB,CACbuY,EAAA,CAAYC,CAAZ,CAAkB,IAGlBzE,EAAA,CAAsB,MAAb,EAAC4E,CAAD,EAAkC,CAAlC,GAAuB5E,CAAvB,CAAwC1F,CAAA,CAAW,GAAX,CAAiB,GAAzD,CAAgE0F,CAKzE5V,EAAA,CAFmB,IAAV4V,EAAAA,CAAAA,CAAiB,GAAjBA,CAAuBA,CAEhC,CAAiB1F,CAAjB,CAA2B+H,CAA3B,CACA1C,EAAA5V,6BAAA,CAAsCzW,CAAtC,CAdkE,CA1EpE,IAAI0sB,CACJL,EAAA3V,6BAAA,EACAT,EAAA,CAAMA,CAAN,EAAaoW,CAAApW,IAAA,EAEb,IAAyB,OAAzB,EAAI7R,CAAA,CAAUyF,CAAV,CAAJ,CAAkC,CAChC,IAAI2nB,EAAa,GAAbA,CAAoB/wB,CAAA2vB,CAAAqB,QAAA,EAAAhxB,UAAA,CAA8B,EAA9B,CACxB2vB,EAAA,CAAUoB,CAAV,CAAA,CAAwB,QAAQ,CAACjqB,CAAD,CAAO,CACrC6oB,CAAA,CAAUoB,CAAV,CAAAjqB,KAAA,CAA6BA,CADQ,CAIvC,KAAI2pB,EAAYZ,CAAA,CAASra,CAAAjR,QAAA,CAAY,eAAZ,CAA6B,oBAA7B,CAAoDwsB,CAApD,CAAT,CACZ,QAAQ,EAAG,CACTpB,CAAA,CAAUoB,CAAV,CAAAjqB,KAAJ;AACE8pB,CAAA,CAAgBva,CAAhB,CAA0B,GAA1B,CAA+BsZ,CAAA,CAAUoB,CAAV,CAAAjqB,KAA/B,CADF,CAGE8pB,CAAA,CAAgBva,CAAhB,CAA0B4V,
 CAA1B,EAAqC,EAArC,CAEF,QAAO0D,CAAA,CAAUoB,CAAV,CANM,CADC,CANgB,CAAlC,IAeO,CACL,IAAIL,EAAM,IAAIhB,CACdgB,EAAAO,KAAA,CAAS7nB,CAAT,CAAiBoM,CAAjB,CAAsB,CAAA,CAAtB,CACAtY,EAAA,CAAQupB,CAAR,CAAiB,QAAQ,CAACxoB,CAAD,CAAQZ,CAAR,CAAa,CAChCuC,CAAA,CAAU3B,CAAV,CAAJ,EACIyyB,CAAAQ,iBAAA,CAAqB7zB,CAArB,CAA0BY,CAA1B,CAFgC,CAAtC,CASAyyB,EAAAV,mBAAA,CAAyBmB,QAAQ,EAAG,CAClC,GAAsB,CAAtB,EAAIT,CAAAL,WAAJ,CAAyB,CAAA,IACnBe,EAAkB,IADC,CAEnB7K,EAAW,IAEZ0F,EAAH,GAAcsE,CAAd,GACEa,CACA,CADkBV,CAAAW,sBAAA,EAClB,CAAA9K,CAAA,CAAWmK,CAAAvB,aAAA,CAAmBuB,CAAAnK,SAAnB,CAAkCmK,CAAAY,aAF/C,CAOAV,EAAA,CAAgBva,CAAhB,CACI4V,CADJ,EACcyE,CAAAzE,OADd,CAEI1F,CAFJ,CAGI6K,CAHJ,CAXuB,CADS,CAmBhC7D,EAAJ,GACEmD,CAAAnD,gBADF,CACwB,CAAA,CADxB,CAII4B,EAAJ,GACEuB,CAAAvB,aADF,CACqBA,CADrB,CAIAuB,EAAAa,KAAA,CAASvQ,CAAT,EAAiB,IAAjB,CAvCK,CA0CP,GAAc,CAAd,CAAIkO,CAAJ,CACE,IAAIhX,GAAY0X,CAAA,CAAcY,CAAd,CAA8BtB,CAA9B,CADlB,KAEWA,EAAJ,EAAeA,CAAAzB,KAAf,EACLyB,CAAAzB,KAAA,CAAa+C,CAAb,CAjE0F,CAJf,CAsKjFgB,QAASA,GAAoB,EAAG,CAC9B,IAAIlI,EAAc,IAA
 lB,CACIC,EAAY,IAYhB,KAAAD,YAAA,CAAmBmI,QAAQ,CAACxzB,CAAD,CAAO,CAChC,MAAIA,EAAJ,EACEqrB,CACO,CADOrrB,CACP,CAAA,IAFT,EAISqrB,CALuB,CAmBlC,KAAAC,UAAA;AAAiBmI,QAAQ,CAACzzB,CAAD,CAAO,CAC9B,MAAIA,EAAJ,EACEsrB,CACO,CADKtrB,CACL,CAAA,IAFT,EAISsrB,CALqB,CAUhC,KAAAzY,KAAA,CAAY,CAAC,QAAD,CAAW,mBAAX,CAAgC,MAAhC,CAAwC,QAAQ,CAACiL,CAAD,CAASd,CAAT,CAA4BgB,CAA5B,CAAkC,CA0C5FL,QAASA,EAAY,CAACoL,CAAD,CAAO2K,CAAP,CAA2BC,CAA3B,CAA2C,CAW9D,IAX8D,IAC1D/uB,CAD0D,CAE1DgvB,CAF0D,CAG1D1zB,EAAQ,CAHkD,CAI1D4G,EAAQ,EAJkD,CAK1DjI,EAASkqB,CAAAlqB,OALiD,CAM1Dg1B,EAAmB,CAAA,CANuC,CAS1D/uB,EAAS,EAEb,CAAM5E,CAAN,CAAcrB,CAAd,CAAA,CAC4D,EAA1D,GAAO+F,CAAP,CAAoBmkB,CAAAnmB,QAAA,CAAayoB,CAAb,CAA0BnrB,CAA1B,CAApB,GAC+E,EAD/E,GACO0zB,CADP,CACkB7K,CAAAnmB,QAAA,CAAa0oB,CAAb,CAAwB1mB,CAAxB,CAAqCkvB,CAArC,CADlB,GAEG5zB,CAID,EAJU0E,CAIV,EAJyBkC,CAAApH,KAAA,CAAWqpB,CAAAlP,UAAA,CAAe3Z,CAAf,CAAsB0E,CAAtB,CAAX,CAIzB,CAHAkC,CAAApH,KAAA,CAAW+E,CAAX,CAAgBqZ,CAAA,CAAOiW,CAAP,CAAahL,CAAAlP,UAAA,CAAejV,CAAf,CAA4BkvB,CAA5B,CAA+CF,CAA/C,CAA
 b,CAAhB,CAGA,CAFAnvB,CAAAsvB,IAEA,CAFSA,CAET,CADA7zB,CACA,CADQ0zB,CACR,CADmBI,CACnB,CAAAH,CAAA,CAAmB,CAAA,CANrB,GASG3zB,CACD,EADUrB,CACV,EADqBiI,CAAApH,KAAA,CAAWqpB,CAAAlP,UAAA,CAAe3Z,CAAf,CAAX,CACrB,CAAAA,CAAA,CAAQrB,CAVV,CAcF,EAAMA,CAAN,CAAeiI,CAAAjI,OAAf,IAEEi

<TRUNCATED>

[42/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app/usergrid.appSDK.orig.js
----------------------------------------------------------------------
diff --git a/portal/js/app/usergrid.appSDK.orig.js b/portal/js/app/usergrid.appSDK.orig.js
deleted file mode 100644
index 4e80c64..0000000
--- a/portal/js/app/usergrid.appSDK.orig.js
+++ /dev/null
@@ -1,2070 +0,0 @@
-/**
- *  App SDK is a collection of classes designed to make working with
- *  the Appigee App Services API as easy as possible.
- *  Learn more at http://apigee.com/docs
- *
- *   Copyright 2012 Apigee Corporation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-//define the console.log for IE
-window.console = window.console || {};
-window.console.log = window.console.log || function() {};
-
-//Usergrid namespace encapsulates this SDK
-window.Usergrid = window.Usergrid || {};
-Usergrid = Usergrid || {};
-Usergrid.SDK_VERSION = '0.9.9';
-
-/**
- *  Usergrid.Query is a class for holding all query information and paging state
- *
- *  @class Query
- *  @author Rod Simpson (rod@apigee.com)
- */
-
-(function () {
-
-  /**
-   *  @constructor
-   *  @param {string} method
-   *  @param {string} path
-   *  @param {object} jsonObj
-   *  @param {object} paramsObj
-   *  @param {function} successCallback
-   *  @param {function} failureCallback
-   */
-  Usergrid.Query = function(method, resource, jsonObj, paramsObj, successCallback, failureCallback) {
-    //query vars
-    this._method = method;
-    this._resource = resource;
-    this._jsonObj = jsonObj;
-    this._paramsObj = paramsObj;
-    this._successCallback = successCallback;
-    this._failureCallback = failureCallback;
-
-    //curl command - will be populated by runQuery function
-    this._curl = '';
-    this._token = false;
-
-    //paging vars
-    this._cursor = null;
-    this._next = null;
-    this._previous = [];
-    this._start = 0;
-    this._end = 0;
-  };
-
-  Usergrid.Query.prototype = {
-     setQueryStartTime: function() {
-       this._start = new Date().getTime();
-     },
-
-     setQueryEndTime: function() {
-       this._end = new Date().getTime();
-     },
-
-     getQueryTotalTime: function() {
-       var seconds = 0;
-       var time = this._end - this._start;
-       try {
-          seconds = ((time/10) / 60).toFixed(2);
-       } catch(e){ return 0; }
-       return this.getMethod() + " " + this.getResource() + " - " + seconds + " seconds";
-     },
-    /**
-     *  A method to set all settable parameters of the Query at one time
-     *
-     *  @public
-     *  @method validateUsername
-     *  @param {string} method
-     *  @param {string} path
-     *  @param {object} jsonObj
-     *  @param {object} paramsObj
-     *  @param {function} successCallback
-     *  @param {function} failureCallback
-     *  @return none
-     */
-    setAllQueryParams: function(method, resource, jsonObj, paramsObj, successCallback, failureCallback) {
-      this._method = method;
-      this._resource = resource;
-      this._jsonObj = jsonObj;
-      this._paramsObj = paramsObj;
-      this._successCallback = successCallback;
-      this._failureCallback = failureCallback;
-    },
-
-    /**
-     *  A method to reset all the parameters in one call
-     *
-     *  @public
-     *  @return none
-     */
-    clearAll: function() {
-      this._method = null;
-      this._resource = null;
-      this._jsonObj = {};
-      this._paramsObj = {};
-      this._successCallback = null;
-      this._failureCallback = null;
-    },
-    /**
-    * Returns the method
-    *
-    * @public
-    * @method getMethod
-    * @return {string} Returns method
-    */
-    getMethod: function() {
-      return this._method;
-    },
-
-    /**
-    * sets the method (POST, PUT, DELETE, GET)
-    *
-    * @public
-    * @method setMethod
-    * @return none
-    */
-    setMethod: function(method) {
-      this._method = method;
-    },
-
-    /**
-    * Returns the resource
-    *
-    * @public
-    * @method getResource
-    * @return {string} the resource
-    */
-    getResource: function() {
-      return this._resource;
-    },
-
-    /**
-    * sets the resource
-    *
-    * @public
-    * @method setResource
-    * @return none
-    */
-    setResource: function(resource) {
-      this._resource = resource;
-    },
-
-    /**
-    * Returns the json Object
-    *
-    * @public
-    * @method getJsonObj
-    * @return {object} Returns the json Object
-    */
-    getJsonObj: function() {
-      return this._jsonObj;
-    },
-
-    /**
-    * sets the json object
-    *
-    * @public
-    * @method setJsonObj
-    * @return none
-    */
-    setJsonObj: function(jsonObj) {
-      this._jsonObj = jsonObj;
-    },
-    /**
-    * Returns the Query Parameters object
-    *
-    * @public
-    * @method getQueryParams
-    * @return {object} Returns Query Parameters object
-    */
-    getQueryParams: function() {
-      return this._paramsObj;
-    },
-
-    /**
-    * sets the query parameter object
-    *
-    * @public
-    * @method setQueryParams
-    * @return none
-    */
-    setQueryParams: function(paramsObj) {
-      this._paramsObj = paramsObj;
-    },
-
-    /**
-    * Returns the success callback function
-    *
-    * @public
-    * @method getSuccessCallback
-    * @return {function} Returns the successCallback
-    */
-    getSuccessCallback: function() {
-      return this._successCallback;
-    },
-
-    /**
-    * sets the success callback function
-    *
-    * @public
-    * @method setSuccessCallback
-    * @return none
-    */
-    setSuccessCallback: function(successCallback) {
-      this._successCallback = successCallback;
-    },
-
-    /**
-    * Calls the success callback function
-    *
-    * @public
-    * @method callSuccessCallback
-    * @return {boolean} Returns true or false based on if there was a callback to call
-    */
-    callSuccessCallback: function(response) {
-      if (this._successCallback && typeof(this._successCallback ) === "function") {
-        this._successCallback(response);
-        return true;
-      } else {
-        return false;
-      }
-    },
-
-    /**
-    * Returns the failure callback function
-    *
-    * @public
-    * @method getFailureCallback
-    * @return {function} Returns the failureCallback
-    */
-    getFailureCallback: function() {
-      return this._failureCallback;
-    },
-
-    /**
-    * sets the failure callback function
-    *
-    * @public
-    * @method setFailureCallback
-    * @return none
-    */
-    setFailureCallback: function(failureCallback) {
-      this._failureCallback = failureCallback;
-    },
-
-    /**
-    * Calls the failure callback function
-    *
-    * @public
-    * @method callFailureCallback
-    * @return {boolean} Returns true or false based on if there was a callback to call
-    */
-    callFailureCallback: function(response) {
-      if (this._failureCallback && typeof(this._failureCallback) === "function") {
-        this._failureCallback(response);
-        return true;
-      } else {
-        return false;
-      }
-    },
-
-    /**
-    * Returns the curl call
-    *
-    * @public
-    * @method getCurl
-    * @return {function} Returns the curl call
-    */
-    getCurl: function() {
-      return this._curl;
-    },
-
-    /**
-    * sets the curl call
-    *
-    * @public
-    * @method setCurl
-    * @return none
-    */
-    setCurl: function(curl) {
-      this._curl = curl;
-    },
-
-    /**
-    * Returns the Token
-    *
-    * @public
-    * @method getToken
-    * @return {function} Returns the Token
-    */
-    getToken: function() {
-      return this._token;
-    },
-
-    /**
-    * Method to set
-    *
-    * @public
-    * @method setToken
-    * @return none
-    */
-    setToken: function(token) {
-      this._token = token;
-    },
-
-    /**
-    * Resets the paging pointer (back to original page)
-    *
-    * @public
-    * @method resetPaging
-    * @return none
-    */
-    resetPaging: function() {
-      this._previous = [];
-      this._next = null;
-      this._cursor = null;
-    },
-
-    /**
-    * Method to determine if there is a previous page of data
-    *
-    * @public
-    * @method hasPrevious
-    * @return {boolean} true or false based on if there is a previous page
-    */
-    hasPrevious: function() {
-      return (this._previous.length > 0);
-    },
-
-    /**
-    * Method to set the paging object to get the previous page of data
-    *
-    * @public
-    * @method getPrevious
-    * @return none
-    */
-    getPrevious: function() {
-      this._next=null; //clear out next so the comparison will find the next item
-      this._cursor = this._previous.pop();
-    },
-
-    /**
-    * Method to determine if there is a next page of data
-    *
-    * @public
-    * @method hasNext
-    * @return {boolean} true or false based on if there is a next page
-    */
-    hasNext: function(){
-      return (this._next);
-    },
-
-    /**
-    * Method to set the paging object to get the next page of data
-    *
-    * @public
-    * @method getNext
-    * @return none
-    */
-    getNext: function() {
-      this._previous.push(this._cursor);
-      this._cursor = this._next;
-    },
-
-    /**
-    * Method to save off the cursor just returned by the last API call
-    *
-    * @public
-    * @method saveCursor
-    * @return none
-    */
-    saveCursor: function(cursor) {
-      //if current cursor is different, grab it for next cursor
-      if (this._next !== cursor) {
-        this._next = cursor;
-      }
-    },
-
-    /**
-    * Method to determine if there is a next page of data
-    *
-    * @public
-    * @method getCursor
-    * @return {string} the current cursor
-    */
-    getCursor: function() {
-      return this._cursor;
-    }
-  };
-})(Usergrid);
-
-
-/**
- *  A class to Model a Usergrid Entity.
- *
- *  @class Entity
- *  @author Rod Simpson (rod@apigee.com)
- */
-(function () {
-  /**
-   *  Constructor for initializing an entity
-   *
-   *  @constructor
-   *  @param {string} collectionType - the type of collection to model
-   *  @param {uuid} uuid - (optional), the UUID of the collection if it is known
-   */
-  Usergrid.Entity = function(collectionType, uuid) {
-    this._collectionType = collectionType;
-    this._data = {};
-    this._uuid = uuid;
-  };
-
-  //inherit prototype from Query
-  Usergrid.Entity.prototype = new Usergrid.Query();
-
-  /**
-   *  gets the current Entity type
-   *
-   *  @method getCollectionType
-   *  @return {string} collection type
-   */
-  Usergrid.Entity.prototype.getCollectionType = function (){
-    return this._collectionType;
-  }
-
-  /**
-   *  sets the current Entity type
-   *
-   *  @method setCollectionType
-   *  @param {string} collectionType
-   *  @return none
-   */
-  Usergrid.Entity.prototype.setCollectionType = function (collectionType){
-    this._collectionType = collectionType;
-  }
-
-  /**
-   *  gets a specific field or the entire data object. If null or no argument
-   *  passed, will return all data, else, will return a specific field
-   *
-   *  @method get
-   *  @param {string} field
-   *  @return {string} || {object} data
-   */
-  Usergrid.Entity.prototype.get = function (field){
-    if (field) {
-      return this._data[field];
-    } else {
-      return this._data;
-    }
-  },
-
-  /**
-   *  adds a specific field or object to the Entity's data
-   *
-   *  @method set
-   *  @param {string} item || {object}
-   *  @param {string} value
-   *  @return none
-   */
-  Usergrid.Entity.prototype.set = function (item, value){
-    if (typeof item === 'object') {
-      for(field in item) {
-        this._data[field] = item[field];
-      }
-    } else if (typeof item === 'string') {
-      this._data[item] = value;
-    } else {
-      this._data = null;
-    }
-  }
-
-  /**
-   *  Saves the entity back to the database
-   *
-   *  @method save
-   *  @public
-   *  @param {function} successCallback
-   *  @param {function} errorCallback
-   *  @return none
-   */
-  Usergrid.Entity.prototype.save = function (successCallback, errorCallback){
-    var path = this.getCollectionType();
-    //TODO:  API will be changed soon to accomodate PUTs via name which create new entities
-    //       This function should be changed to PUT only at that time, and updated to use
-    //       either uuid or name
-    var method = 'POST';
-    if (this.get('uuid')) {
-      method = 'PUT';
-      if (Usergrid.validation.isUUID(this.get('uuid'))) {
-        path += "/" + this.get('uuid');
-      }
-    }
-
-    //if this is a user, update the password if it has been specified
-    var data = {};
-    if (path == 'users') {
-      data = this.get();
-      var pwdata = {};
-      //Note: we have a ticket in to change PUT calls to /users to accept the password change
-      //      once that is done, we will remove this call and merge it all into one
-      if (data.oldpassword && data.newpassword) {
-        pwdata.oldpassword = data.oldpassword;
-        pwdata.newpassword = data.newpassword;
-        this.runAppQuery(new Usergrid.Query('PUT', 'users/'+uuid+'/password', pwdata, null,
-          function (response) {
-            //not calling any callbacks - this section will be merged as soon as API supports
-            //   updating passwords in general PUT call
-          },
-          function (response) {
-
-          }
-        ));
-      }
-      //remove old and new password fields so they don't end up as part of the entity object
-      delete data.oldpassword;
-      delete data.newpassword;
-    }
-
-    //update the entity
-    var self = this;
-
-    data = {};
-    var entityData = this.get();
-    //remove system specific properties
-    for (var item in entityData) {
-      if (item == 'metadata' || item == 'created' || item == 'modified' ||
-          item == 'type' || item == 'activatted' ) { continue; }
-      data[item] = entityData[item];
-    }
-
-    this.setAllQueryParams(method, path, data, null,
-      function(response) {
-        try {
-          var entity = response.entities[0];
-          self.set(entity);
-          if (typeof(successCallback) === "function"){
-            successCallback(response);
-          }
-        } catch (e) {
-          if (typeof(errorCallback) === "function"){
-            errorCallback(response);
-          }
-        }
-      },
-      function(response) {
-        if (typeof(errorCallback) === "function"){
-          errorCallback(response);
-        }
-      }
-    );
-    Usergrid.ApiClient.runAppQuery(this);
-  }
-
-  /**
-   *  refreshes the entity by making a GET call back to the database
-   *
-   *  @method fetch
-   *  @public
-   *  @param {function} successCallback
-   *  @param {function} errorCallback
-   *  @return none
-   */
-  Usergrid.Entity.prototype.fetch = function (successCallback, errorCallback){
-    var path = this.getCollectionType();
-    //if a uuid is available, use that, otherwise, use the name
-    if (this.get('uuid')) {
-      path += "/" + this.get('uuid');
-    } else {
-      if (path == "users") {
-        if (this.get("username")) {
-          path += "/" + this.get("username");
-        } else {
-          console.log('no username specified');
-          if (typeof(errorCallback) === "function"){
-            console.log('no username specified');
-          }
-        }
-      } else {
-        if (this.get()) {
-          path += "/" + this.get();
-        } else {
-          console.log('no entity identifier specified');
-          if (typeof(errorCallback) === "function"){
-            console.log('no entity identifier specified');
-          }
-        }
-      }
-    }
-    var self = this;
-    this.setAllQueryParams('GET', path, null, null,
-      function(response) {
-        try {
-          if (response.user) {
-            self.set(response.user);
-          }
-          var entity = response.entities[0];
-          self.set(entity);
-          if (typeof(successCallback) === "function"){
-            successCallback(response);
-          }
-        } catch (e) {
-          if (typeof(errorCallback) === "function"){
-            errorCallback(response);
-          }
-        }
-      },
-      function(response) {
-        if (typeof(errorCallback) === "function"){
-            errorCallback(response);
-        }
-      }
-    );
-    Usergrid.ApiClient.runAppQuery(this);
-  }
-
-  /**
-   *  deletes the entity from the database - will only delete
-   *  if the object has a valid uuid
-   *
-   *  @method destroy
-   *  @public
-   *  @param {function} successCallback
-   *  @param {function} errorCallback
-   *  @return none
-   *
-   */
-  Usergrid.Entity.prototype.destroy = function (successCallback, errorCallback){
-    var path = this.getCollectionType();
-    if (this.get('uuid')) {
-      path += "/" + this.get('uuid');
-    } else {
-      console.log('Error trying to delete object - no uuid specified.');
-      if (typeof(errorCallback) === "function"){
-        errorCallback('Error trying to delete object - no uuid specified.');
-      }
-    }
-    var self = this;
-    this.setAllQueryParams('DELETE', path, null, null,
-      function(response) {
-        //clear out this object
-        self.set(null);
-        if (typeof(successCallback) === "function"){
-          successCallback(response);
-        }
-      },
-      function(response) {
-        if (typeof(errorCallback) === "function"){
-            errorCallback(response);
-        }
-      }
-    );
-    Usergrid.ApiClient.runAppQuery(this);
-  }
-
-})(Usergrid);
-
-
-/**
- *  The Collection class models Usergrid Collections.  It essentially
- *  acts as a container for holding Entity objects, while providing
- *  additional funcitonality such as paging, and saving
- *
- *  @class Collection
- *  @author Rod Simpson (rod@apigee.com)
- */
-(function () {
-  /**
-   *  Collection is a container class for holding entities
-   *
-   *  @constructor
-   *  @param {string} collectionPath - the type of collection to model
-   *  @param {uuid} uuid - (optional), the UUID of the collection if it is known
-   */
-  Usergrid.Collection = function(path, uuid) {
-    this._path = path;
-    this._uuid = uuid;
-    this._list = [];
-    this._Query = new Usergrid.Query();
-    this._iterator = -1; //first thing we do is increment, so set to -1
-  };
-
-  Usergrid.Collection.prototype = new Usergrid.Query();
-
-  /**
-   *  gets the current Collection path
-   *
-   *  @method getPath
-   *  @return {string} path
-   */
-  Usergrid.Collection.prototype.getPath = function (){
-    return this._path;
-  }
-
-  /**
-   *  sets the Collection path
-   *
-   *  @method setPath
-   *  @param {string} path
-   *  @return none
-   */
-  Usergrid.Collection.prototype.setPath = function (path){
-    this._path = path;
-  }
-
-  /**
-   *  gets the current Collection UUID
-   *
-   *  @method getUUID
-   *  @return {string} the uuid
-   */
-  Usergrid.Collection.prototype.getUUID = function (){
-    return this._uuid;
-  }
-
-  /**
-   *  sets the current Collection UUID
-   *  @method setUUID
-   *  @param {string} uuid
-   *  @return none
-   */
-  Usergrid.Collection.prototype.setUUID = function (uuid){
-    this._uuid = uuid;
-  }
-
-  /**
-   *  Adds an Entity to the collection (adds to the local object)
-   *
-   *  @method addEntity
-   *  @param {object} entity
-   *  @param {function} successCallback
-   *  @param {function} errorCallback
-   *  @return none
-   */
-  Usergrid.Collection.prototype.addEntity = function (entity){
-    //then add it to the list
-    var count = this._list.length;
-    this._list[count] = entity;
-  }
-
-  /**
-   *  Adds a new Entity to the collection (saves, then adds to the local object)
-   *
-   *  @method addNewEntity
-   *  @param {object} entity
-   *  @return none
-   */
-  Usergrid.Collection.prototype.addNewEntity = function (entity,successCallback, errorCallback) {
-    //add the entity to the list
-    this.addEntity(entity);
-    //then save the entity
-    entity.save(successCallback, errorCallback);
-  }
-
-  Usergrid.Collection.prototype.destroyEntity = function (entity) {
-    //first get the entities uuid
-    var uuid = entity.get('uuid');
-    //if the entity has a uuid, delete it
-    if (Usergrid.validation.isUUID(uuid)) {
-      //then remove it from the list
-      var count = this._list.length;
-      var i=0;
-      var reorder = false;
-      for (i=0; i<count; i++) {
-        if(reorder) {
-          this._list[i-1] = this._list[i];
-          this._list[i] = null;
-        }
-        if (this._list[i].get('uuid') == uuid) {
-          this._list[i] = null;
-          reorder=true;
-        }
-      }
-    }
-    //first destroy the entity on the server
-    entity.destroy();
-  }
-
-  /**
-   *  Looks up an Entity by a specific field - will return the first Entity that
-   *  has a matching field
-   *
-   *  @method getEntityByField
-   *  @param {string} field
-   *  @param {string} value
-   *  @return {object} returns an entity object, or null if it is not found
-   */
-  Usergrid.Collection.prototype.getEntityByField = function (field, value){
-    var count = this._list.length;
-    var i=0;
-    for (i=0; i<count; i++) {
-      if (this._list[i].getField(field) == value) {
-        return this._list[i];
-      }
-    }
-    return null;
-  }
-
-  /**
-   *  Looks up an Entity by UUID
-   *
-   *  @method getEntityByUUID
-   *  @param {string} UUID
-   *  @return {object} returns an entity object, or null if it is not found
-   */
-  Usergrid.Collection.prototype.getEntityByUUID = function (UUID){
-    var count = this._list.length;
-    var i=0;
-    for (i=0; i<count; i++) {
-      if (this._list[i].get('uuid') == UUID) {
-        return this._list[i];
-      }
-    }
-    return null;
-  }
-
-  /**
-   *  Returns the first Entity of the Entity list - does not affect the iterator
-   *
-   *  @method getFirstEntity
-   *  @return {object} returns an entity object
-   */
-  Usergrid.Collection.prototype.getFirstEntity = function (){
-    var count = this._list.length;
-      if (count > 0) {
-        return this._list[0];
-      }
-      return null;
-  }
-
-  /**
-   *  Returns the last Entity of the Entity list - does not affect the iterator
-   *
-   *  @method getLastEntity
-   *  @return {object} returns an entity object
-   */
-  Usergrid.Collection.prototype.getLastEntity = function (){
-    var count = this._list.length;
-      if (count > 0) {
-        return this._list[count-1];
-      }
-      return null;
-  }
-
-  /**
-   *  Entity iteration -Checks to see if there is a "next" entity
-   *  in the list.  The first time this method is called on an entity
-   *  list, or after the resetEntityPointer method is called, it will
-   *  return true referencing the first entity in the list
-   *
-   *  @method hasNextEntity
-   *  @return {boolean} true if there is a next entity, false if not
-   */
-  Usergrid.Collection.prototype.hasNextEntity = function (){
-    var next = this._iterator + 1;
-      if(next >=0 && next < this._list.length) {
-        return true;
-      }
-      return false;
-  }
-
-  /**
-   *  Entity iteration - Gets the "next" entity in the list.  The first
-   *  time this method is called on an entity list, or after the method
-   *  resetEntityPointer is called, it will return the,
-   *  first entity in the list
-   *
-   *  @method hasNextEntity
-   *  @return {object} entity
-   */
-  Usergrid.Collection.prototype.getNextEntity = function (){
-    this._iterator++;
-      if(this._iterator >= 0 && this._iterator <= this._list.length) {
-        return this._list[this._iterator];
-      }
-      return false;
-  }
-
-  /**
-   *  Entity iteration - Checks to see if there is a "previous"
-   *  entity in the list.
-   *
-   *  @method hasPreviousEntity
-   *  @return {boolean} true if there is a previous entity, false if not
-   */
-  Usergrid.Collection.prototype.hasPreviousEntity = function (){
-    var previous = this._iterator - 1;
-      if(previous >=0 && previous < this._list.length) {
-        return true;
-      }
-      return false;
-  }
-
-  /**
-   *  Entity iteration - Gets the "previous" entity in the list.
-   *
-   *  @method getPreviousEntity
-   *  @return {object} entity
-   */
-  Usergrid.Collection.prototype.getPreviousEntity = function (){
-     this._iterator--;
-      if(this._iterator >= 0 && this._iterator <= this._list.length) {
-        return this.list[this._iterator];
-      }
-      return false;
-  }
-
-  /**
-   *  Entity iteration - Resets the iterator back to the beginning
-   *  of the list
-   *
-   *  @method resetEntityPointer
-   *  @return none
-   */
-  Usergrid.Collection.prototype.resetEntityPointer = function (){
-     this._iterator  = -1;
-  }
-
-  /**
-   *  gets and array of all entities currently in the colleciton object
-   *
-   *  @method getEntityList
-   *  @return {array} returns an array of entity objects
-   */
-  Usergrid.Collection.prototype.getEntityList = function (){
-     return this._list;
-  }
-
-  /**
-   *  sets the entity list
-   *
-   *  @method setEntityList
-   *  @param {array} list - an array of Entity objects
-   *  @return none
-   */
-  Usergrid.Collection.prototype.setEntityList = function (list){
-    this._list = list;
-  }
-
-  /**
-   *  Paging -  checks to see if there is a next page od data
-   *
-   *  @method hasNextPage
-   *  @return {boolean} returns true if there is a next page of data, false otherwise
-   */
-  Usergrid.Collection.prototype.hasNextPage = function (){
-    return this.hasNext();
-  }
-
-  /**
-   *  Paging - advances the cursor and gets the next
-   *  page of data from the API.  Stores returned entities
-   *  in the Entity list.
-   *
-   *  @method getNextPage
-   *  @return none
-   */
-  Usergrid.Collection.prototype.getNextPage = function (){
-    if (this.hasNext()) {
-        //set the cursor to the next page of data
-        this.getNext();
-        //empty the list
-        this.setEntityList([]);
-        Usergrid.ApiClient.runAppQuery(this);
-      }
-  }
-
-  /**
-   *  Paging -  checks to see if there is a previous page od data
-   *
-   *  @method hasPreviousPage
-   *  @return {boolean} returns true if there is a previous page of data, false otherwise
-   */
-  Usergrid.Collection.prototype.hasPreviousPage = function (){
-    return this.hasPrevious();
-  }
-
-  /**
-   *  Paging - reverts the cursor and gets the previous
-   *  page of data from the API.  Stores returned entities
-   *  in the Entity list.
-   *
-   *  @method getPreviousPage
-   *  @return none
-   */
-  Usergrid.Collection.prototype.getPreviousPage = function (){
-    if (this.hasPrevious()) {
-        this.getPrevious();
-        //empty the list
-        this.setEntityList([]);
-        Usergrid.ApiClient.runAppQuery(this);
-      }
-  }
-
-  /**
-   *  clears the query parameters object
-   *
-   *  @method clearQuery
-   *  @return none
-   */
-  Usergrid.Collection.prototype.clearQuery = function (){
-    this.clearAll();
-  }
-
-  //The get() function is deprecated.  Including here for backwards compatibility
-  //with previous versions of the SDK
-  Usergrid.Collection.prototype.get = function (successCallback, errorCallback){
-    Usergrid.Collection.fetch(successCallback, errorCallback);
-  }
-
-  /**
-   *  A method to get all items in the collection, as dictated by the
-   *  cursor and the query.  By default, the API returns 10 items in
-   *  a given call.  This can be overriden so that more or fewer items
-   *  are returned.  The entities returned are all stored in the colleciton
-   *  object's entity list, and can be retrieved by calling getEntityList()
-   *
-   *  @method get
-   *  @param {function} successCallback
-   *  @param {function} errorCallback
-   *  @return none
-   */
-  Usergrid.Collection.prototype.fetch = function (successCallback, errorCallback){
-    var self = this;
-    var queryParams = this.getQueryParams();
-    //empty the list
-    this.setEntityList([]);
-    this.setAllQueryParams('GET', this.getPath(), null, queryParams,
-      function(response) {
-        if (response.entities) {
-          this.resetEntityPointer();
-          var count = response.entities.length;
-          for (var i=0;i<count;i++) {
-            var uuid = response.entities[i].uuid;
-            if (uuid) {
-              var entity = new Usergrid.Entity(self.getPath(), uuid);
-              //store the data in the entity
-              var data = response.entities[i] || {};
-              delete data.uuid; //remove uuid from the object
-              entity.set(data);
-              //store the new entity in this collection
-              self.addEntity(entity);
-            }
-          }
-          if (typeof(successCallback) === "function"){
-            successCallback(response);
-          }
-        } else {
-          if (typeof(errorCallback) === "function"){
-              errorCallback(response);
-          }
-        }
-      },
-      function(response) {
-        if (typeof(errorCallback) === "function"){
-            errorCallback(response);
-        }
-      }
-    );
-    Usergrid.ApiClient.runAppQuery(this);
-  }
-
-  /**
-   *  A method to save all items currently stored in the collection object
-   *  caveat with this method: we can't update anything except the items
-   *  currently stored in the collection.
-   *
-   *  @method save
-   *  @param {function} successCallback
-   *  @param {function} errorCallback
-   *  @return none
-   */
-  Usergrid.Collection.prototype.save = function (successCallback, errorCallback){
-    //loop across all entities and save each one
-    var entities = this.getEntityList();
-    var count = entities.length;
-    var jsonObj = [];
-    for (var i=0;i<count;i++) {
-      entity = entities[i];
-      data = entity.get();
-      if (entity.get('uuid')) {
-        data.uuid = entity.get('uuid');
-        jsonObj.push(data);
-      }
-      entity.save();
-    }
-    this.setAllQueryParams('PUT', this.getPath(), jsonObj, null,successCallback, errorCallback);
-    Usergrid.ApiClient.runAppQuery(this);
-  }
-})(Usergrid);
-
-
-/*
- *  Usergrid.ApiClient
- *
- *  A Singleton that is the main client for making calls to the API. Maintains
- *  state between calls for the following items:
- *
- *  Token
- *  User (username, email, name, uuid)
- *
- *  Main methods for making calls to the API are:
- *
- *  runAppQuery (Query)
- *  runManagementQuery(Query)
- *
- *  Create a new Usergrid.Query object and then pass it to either of these
- *  two methods for making calls directly to the API.
- *
- *  A method for logging in an app user (to get a OAuth token) also exists:
- *
- *  logInAppUser (username, password, successCallback, failureCallback)
- *
- *  @class Usergrid.ApiClient
- *  @author Rod Simpson (rod@apigee.com)
- *
- */
-Usergrid.M = 'ManagementQuery';
-Usergrid.A = 'ApplicationQuery';
-Usergrid.ApiClient = (function () {
-  //API endpoint
-  var _apiUrl = "https://api.usergrid.com/";
-  var _orgName = null;
-  var _appName = null;
-  var _token = null;
-  var _callTimeout = 30000;
-  var _queryType = null;
-  var _loggedInUser = null;
-  var _logoutCallback = null;
-  var _callTimeoutCallback = null;
-
-  /*
-   *  A method to set up the ApiClient with orgname and appname
-   *
-   *  @method init
-   *  @public
-   *  @param {string} orgName
-   *  @param {string} appName
-   *  @return none
-   *
-   */
-  function init(orgName, appName){
-    this.setOrganizationName(orgName);
-    this.setApplicationName(appName);
-  }
-
-  /*
-  *  Public method to run calls against the app endpoint
-  *
-  *  @method runAppQuery
-  *  @public
-  *  @params {object} Usergrid.Query - {method, path, jsonObj, params, successCallback, failureCallback}
-  *  @return none
-  */
-  function runAppQuery (Query) {
-    var endpoint = "/" + this.getOrganizationName() + "/" + this.getApplicationName() + "/";
-    setQueryType(Usergrid.A);
-    run(Query, endpoint);
-  }
-
-  /*
-  *  Public method to run calls against the management endpoint
-  *
-  *  @method runManagementQuery
-  *  @public
-  *  @params {object} Usergrid.Query - {method, path, jsonObj, params, successCallback, failureCallback}
-  *  @return none
-  */
-  function runManagementQuery (Query) {
-    var endpoint = "/management/";
-    setQueryType(Usergrid.M);
-    run(Query, endpoint)
-  }
-
-  /*
-    *  A public method to get the organization name to be used by the client
-    *
-    *  @method getOrganizationName
-    *  @public
-    *  @return {string} the organization name
-    */
-  function getOrganizationName() {
-    return _orgName;
-  }
-
-  /*
-    *  A public method to set the organization name to be used by the client
-    *
-    *  @method setOrganizationName
-    *  @param orgName - the organization name
-    *  @return none
-    */
-  function setOrganizationName(orgName) {
-    _orgName = orgName;
-  }
-
-  /*
-  *  A public method to get the application name to be used by the client
-  *
-  *  @method getApplicationName
-  *  @public
-  *  @return {string} the application name
-  */
-  function getApplicationName() {
-    return _appName;
-  }
-
-  /*
-  *  A public method to set the application name to be used by the client
-  *
-  *  @method setApplicationName
-  *  @public
-  *  @param appName - the application name
-  *  @return none
-  */
-  function setApplicationName(appName) {
-    _appName = appName;
-  }
-
-  /*
-  *  A public method to get current OAuth token
-  *
-  *  @method getToken
-  *  @public
-  *  @return {string} the current token
-  */
-  function getToken() {
-    return _token;
-  }
-
-  /*
-  *  A public method to set the current Oauth token
-  *
-  *  @method setToken
-  *  @public
-  *  @param token - the bearer token
-  *  @return none
-  */
-  function setToken(token) {
-    _token = token;
-  }
-
-  /*
-   *  A public method to return the API URL
-   *
-   *  @method getApiUrl
-   *  @public
-   *  @return {string} the API url
-   */
-  function getApiUrl() {
-    return _apiUrl;
-  }
-
-  /*
-   *  A public method to overide the API url
-   *
-   *  @method setApiUrl
-   *  @public
-   *  @return none
-   */
-  function setApiUrl(apiUrl) {
-    _apiUrl = apiUrl;
-  }
-
-  /*
-   *  A public method to return the call timeout amount
-   *
-   *  @method getCallTimeout
-   *  @public
-   *  @return {string} the timeout value (an integer) 30000 = 30 seconds
-   */
-  function getCallTimeout() {
-    return _callTimeout;
-  }
-
-  /*
-   *  A public method to override the call timeout amount
-   *
-   *  @method setCallTimeout
-   *  @public
-   *  @return none
-   */
-  function setCallTimeout(callTimeout) {
-    _callTimeout = callTimeout;
-  }
-
-  /*
-   * Returns the call timeout callback function
-   *
-   * @public
-   * @method setCallTimeoutCallback
-   * @return none
-   */
-  function setCallTimeoutCallback(callback) {
-    _callTimeoutCallback = callback;
-  }
-
-  /*
-   * Returns the call timeout callback function
-   *
-   * @public
-   * @method getCallTimeoutCallback
-   * @return {function} Returns the callTimeoutCallback
-   */
-  function getCallTimeoutCallback() {
-    return _callTimeoutCallback;
-  }
-
-  /*
-   * Calls the call timeout callback function
-   *
-   * @public
-   * @method callTimeoutCallback
-   * @return {boolean} Returns true or false based on if there was a callback to call
-   */
-  function callTimeoutCallback(response) {
-    if (_callTimeoutCallback && typeof(_callTimeoutCallback) === "function") {
-      _callTimeoutCallback(response);
-      return true;
-    } else {
-      return false;
-    }
-  }
-
-  /*
-   *  A public method to get the api url of the reset pasword endpoint
-   *
-   *  @method getResetPasswordUrl
-   *  @public
-   *  @return {string} the api rul of the reset password endpoint
-   */
-  function getResetPasswordUrl() {
-    return getApiUrl() + "/management/users/resetpw"
-  }
-
-  /*
-   *  A public method to get an Entity object for the current logged in user
-   *
-   *  @method getLoggedInUser
-   *  @public
-   *  @return {object} user - Entity object of type user
-   */
-  function getLoggedInUser() {
-    return this._loggedInUser;
-  }
-
-  /*
-   *  A public method to set an Entity object for the current logged in user
-   *
-   *  @method setLoggedInUser
-   *  @public
-   *  @param {object} user - Entity object of type user
-   *  @return none
-   */
-  function setLoggedInUser(user) {
-    this._loggedInUser = user;
-  }
-
-  /*
-  *  A public method to log in an app user - stores the token for later use
-  *
-  *  @method logInAppUser
-  *  @public
-  *  @params {string} username
-  *  @params {string} password
-  *  @params {function} successCallback
-  *  @params {function} failureCallback
-  *  @return {response} callback functions return API response object
-  */
-  function logInAppUser (username, password, successCallback, failureCallback) {
-    var self = this;
-    var data = {"username": username, "password": password, "grant_type": "password"};
-    this.runAppQuery(new Usergrid.Query('GET', 'token', null, data,
-      function (response) {
-        var user = new Usergrid.Entity('users');
-        user.set('username', response.user.username);
-        user.set('name', response.user.name);
-        user.set('email', response.user.email);
-        user.set('uuid', response.user.uuid);
-        self.setLoggedInUser(user);
-        self.setToken(response.access_token);
-        if (successCallback && typeof(successCallback) === "function") {
-          successCallback(response);
-        }
-      },
-      function (response) {
-        if (failureCallback && typeof(failureCallback) === "function") {
-          failureCallback(response);
-        }
-      }
-     ));
-  }
-
-  /*
-   *  TODO:  NOT IMPLEMENTED YET - A method to renew an app user's token
-   *  Note: waiting for API implementation
-   *  @method renewAppUserToken
-   *  @public
-   *  @return none
-   */
-  function renewAppUserToken() {
-
-  }
-
-  /**
-   *  A public method to log out an app user - clears all user fields from client
-   *
-   *  @method logoutAppUser
-   *  @public
-   *  @return none
-   */
-  function logoutAppUser() {
-    this.setLoggedInUser(null);
-    this.setToken(null);
-  }
-
-  /**
-   *  A public method to test if a user is logged in - does not guarantee that the token is still valid,
-   *  but rather that one exists, and that there is a valid UUID
-   *
-   *  @method isLoggedInAppUser
-   *  @public
-   *  @params {object} Usergrid.Query - {method, path, jsonObj, params, successCallback, failureCallback}
-   *  @return {boolean} Returns true the user is logged in (has token and uuid), false if not
-   */
-  function isLoggedInAppUser() {
-    var user = this.getLoggedInUser();
-    return (this.getToken() && Usergrid.validation.isUUID(user.get('uuid')));
-  }
-
-   /*
-   *  A public method to get the logout callback, which is called
-   *
-   *  when the token is found to be invalid
-   *  @method getLogoutCallback
-   *  @public
-   *  @return {string} the api rul of the reset password endpoint
-   */
-  function getLogoutCallback() {
-    return _logoutCallback;
-  }
-
-  /*
-   *  A public method to set the logout callback, which is called
-   *
-   *  when the token is found to be invalid
-   *  @method setLogoutCallback
-   *  @public
-   *  @param {function} logoutCallback
-   *  @return none
-   */
-  function setLogoutCallback(logoutCallback) {
-    _logoutCallback = logoutCallback;
-  }
-
-  /*
-   *  A public method to call the logout callback, which is called
-   *
-   *  when the token is found to be invalid
-   *  @method callLogoutCallback
-   *  @public
-   *  @return none
-   */
-  function callLogoutCallback() {
-    if (_logoutCallback && typeof(_logoutCallback ) === "function") {
-      _logoutCallback();
-      return true;
-    } else {
-      return false;
-    }
-  }
-
-  /**
-   *  Private helper method to encode the query string parameters
-   *
-   *  @method encodeParams
-   *  @public
-   *  @params {object} params - an object of name value pairs that will be urlencoded
-   *  @return {string} Returns the encoded string
-   */
-  function encodeParams (params) {
-    tail = [];
-    var item = [];
-    if (params instanceof Array) {
-      for (i in params) {
-        item = params[i];
-        if ((item instanceof Array) && (item.length > 1)) {
-          tail.push(item[0] + "=" + encodeURIComponent(item[1]));
-        }
-      }
-    } else {
-      for (var key in params) {
-        if (params.hasOwnProperty(key)) {
-          var value = params[key];
-          if (value instanceof Array) {
-            for (i in value) {
-              item = value[i];
-              tail.push(key + "=" + encodeURIComponent(item));
-            }
-          } else {
-            tail.push(key + "=" + encodeURIComponent(value));
-          }
-        }
-      }
-    }
-    return tail.join("&");
-  }
-
-  /*
-   *  A private method to get the type of the current api call - (Management or Application)
-   *
-   *  @method getQueryType
-   *  @private
-   *  @return {string} the call type
-   */
-  function getQueryType() {
-    return _queryType;
-  }
-  /*
-   *  A private method to set the type of the current api call - (Management or Application)
-   *
-   *  @method setQueryType
-   *  @private
-   *  @param {string} call type
-   *  @return none
-   */
-  function setQueryType(type) {
-    _queryType = type;
-  }
-
-  /**
-   *  A private method to validate, prepare,, and make the calls to the API
-   *  Use runAppQuery or runManagementQuery to make your calls!
-   *
-   *  @method run
-   *  @private
-   *  @params {object} Usergrid.Query - {method, path, jsonObj, params, successCallback, failureCallback}
-   *  @params {string} endpoint - used to differentiate between management and app queries
-   *  @return {response} callback functions return API response object
-   */
-  function run (Query, endpoint) {
-    var curl = "curl";
-    //validate parameters
-    try {
-      //verify that the query object is valid
-      if(!(Query instanceof Usergrid.Query)) {
-        throw(new Error('Query is not a valid object.'));
-      }
-      //for timing, call start
-      Query.setQueryStartTime();
-      //peel the data out of the query object
-      var method = Query.getMethod().toUpperCase();
-      var path = Query.getResource();
-      var jsonObj = Query.getJsonObj() || {};
-      var params = Query.getQueryParams() || {};
-
-      //method - should be GET, POST, PUT, or DELETE only
-      if (method != 'GET' && method != 'POST' && method != 'PUT' && method != 'DELETE') {
-        throw(new Error('Invalid method - should be GET, POST, PUT, or DELETE.'));
-      }
-      //curl - add the method to the command (no need to add anything for GET)
-      if (method == "POST") {curl += " -X POST"; }
-      else if (method == "PUT") { curl += " -X PUT"; }
-      else if (method == "DELETE") { curl += " -X DELETE"; }
-      else { curl += " -X GET"; }
-
-      //curl - append the bearer token if this is not the sandbox app
-      var application_name = Usergrid.ApiClient.getApplicationName();
-      if (application_name) {
-        application_name = application_name.toUpperCase();
-      }
-      //if (application_name != 'SANDBOX' && Usergrid.ApiClient.getToken()) {
-      if ( (application_name != 'SANDBOX' && Usergrid.ApiClient.getToken()) || (getQueryType() == Usergrid.M && Usergrid.ApiClient.getToken())) {
-        curl += ' -i -H "Authorization: Bearer ' + Usergrid.ApiClient.getToken() + '"';
-        Query.setToken(true);
-      }
-
-      //params - make sure we have a valid json object
-      _params = JSON.stringify(params);
-      if (!JSON.parse(_params)) {
-        throw(new Error('Params object is not valid.'));
-      }
-
-      //add in the cursor if one is available
-      if (Query.getCursor()) {
-        params.cursor = Query.getCursor();
-      } else {
-        delete params.cursor;
-      }
-
-      //strip off the leading slash of the endpoint if there is one
-      endpoint = endpoint.indexOf('/') == 0 ? endpoint.substring(1) : endpoint;
-
-      //add the endpoint to the path
-      path = endpoint + path;
-
-      //make sure path never has more than one / together
-      if (path) {
-        //regex to strip multiple slashes
-        while(path.indexOf('//') != -1){
-          path = path.replace('//', '/');
-        }
-      }
-
-      //add the http:// bit on the front
-      path = Usergrid.ApiClient.getApiUrl() + path;
-
-      //curl - append the path
-      curl += ' "' + path;
-
-      //curl - append params to the path for curl prior to adding the timestamp
-      var curl_encoded_params = encodeParams(params);
-      if (curl_encoded_params) {
-        curl += "?" + curl_encoded_params;
-      }
-      curl += '"';
-
-      //add in a timestamp for gets and deletes - to avoid caching by the browser
-      if ((method == "GET") || (method == "DELETE")) {
-        params['_'] = new Date().getTime();
-      }
-
-      //append params to the path
-      var encoded_params = encodeParams(params);
-      if (encoded_params) {
-        path += "?" + encoded_params;
-      }
-
-      //jsonObj - make sure we have a valid json object
-      jsonObj = JSON.stringify(jsonObj)
-      if (!JSON.parse(jsonObj)) {
-        throw(new Error('JSON object is not valid.'));
-      }
-      if (jsonObj == '{}') {
-        jsonObj = null;
-      } else {
-        //curl - add in the json obj
-        curl += " -d '" + jsonObj + "'";
-      }
-
-    } catch (e) {
-      //parameter was invalid
-      console.log('error occured running query -' + e.message);
-      return false;
-    }
-    //log the curl command to the console
-    console.log(curl);
-    //store the curl command back in the object
-    Query.setCurl(curl);
-
-    //so far so good, so run the query
-    var xD = window.XDomainRequest ? true : false;
-    var xhr = getXHR(method, path, jsonObj);
-
-    // Handle response.
-    /*
-    xhr.onerror = function() {
-      //for timing, call end
-      Query.setQueryEndTime();
-      //for timing, log the total call time
-      console.log(Query.getQueryTotalTime());
-      //network error
-      clearTimeout(timeout);
-      console.log('API call failed at the network level.');
-      //send back an error (best we can do with what ie gives back)
-      Query.callFailureCallback(response.innerText);
-    };*/
-    xhr.xdomainOnload = function (response) {
-      //for timing, call end
-      Query.setQueryEndTime();
-      //for timing, log the total call time
-      console.log('Call timing: ' + Query.getQueryTotalTime());
-      //call completed
-      clearTimeout(timeout);
-      //decode the response
-      response = JSON.parse(xhr.responseText);
-      //if a cursor was present, grab it
-      try {
-        var cursor = response.cursor || null;
-        Query.saveCursor(cursor);
-      }catch(e) {}
-      Query.callSuccessCallback(response);
-    };
-    xhr.onload = function(response) {
-      //for timing, call end
-      Query.setQueryEndTime();
-      //for timing, log the total call time
-      console.log('Call timing: ' + Query.getQueryTotalTime());
-      //call completed
-      clearTimeout(timeout);
-      //decode the response
-      response = JSON.parse(xhr.responseText);
-      if (xhr.status != 200 && !xD)   {
-        //there was an api error
-        try {
-          var error = response.error;
-          console.log('API call failed: (status: '+xhr.status+').' + error.type);
-          if ( (error == "auth_expired_session_token") ||
-               (error == "unauthorized")   ||
-               (error == "auth_missing_credentials")   ||
-               (error == "auth_invalid")) {
-            //this error type means the user is not authorized. If a logout function is defined, call it
-            callLogoutCallback();
-        }} catch(e){}
-        //otherwise, just call the failure callback
-        Query.callFailureCallback(response.error_description);
-        return;
-      } else {
-        //query completed succesfully, so store cursor
-        var cursor = response.cursor || null;
-        Query.saveCursor(cursor);
-        //then call the original callback
-        Query.callSuccessCallback(response);
-     }
-    };
-
-    var timeout = setTimeout(
-      function() {
-        xhr.abort();
-        if ( typeof(Usergrid.ApiClient.getCallTimeoutCallback()) === 'function') {
-          Usergrid.ApiClient.callTimeoutCallback('API CALL TIMEOUT');
-        } else if (typeof(Query.getFailureCallback()) === 'function'){
-          Query.callFailureCallback('API CALL TIMEOUT');
-        }
-      },
-      Usergrid.ApiClient.getCallTimeout()); //set for 30 seconds
-
-    xhr.send(jsonObj);
-  }
-
-   /**
-   *  A private method to return the XHR object
-   *
-   *  @method getXHR
-   *  @private
-   *  @params {string} method (GET,POST,PUT,DELETE)
-   *  @params {string} path - api endpoint to call
-   *  @return {object} jsonObj - the json object if there is one
-   */
-  function getXHR(method, path, jsonObj) {
-    var xhr;
-    if(window.XDomainRequest)
-    {
-      xhr = new window.XDomainRequest();
-      if (Usergrid.ApiClient.getToken()) {
-        if (path.indexOf("?")) {
-          path += '&access_token='+Usergrid.ApiClient.getToken();
-        } else {
-          path = '?access_token='+Usergrid.ApiClient.getToken();
-        }
-      }
-      xhr.open(method, path, true);
-    }
-    else
-    {
-      xhr = new XMLHttpRequest();
-      xhr.open(method, path, true);
-      //add content type = json if there is a json payload
-      if (jsonObj) {
-        xhr.setRequestHeader("Content-Type", "application/json");
-      }
-      if (Usergrid.ApiClient.getToken()) {
-        xhr.setRequestHeader("Authorization", "Bearer " + Usergrid.ApiClient.getToken());
-        xhr.withCredentials = true;
-      }
-    }
-    return xhr;
-  }
-
-  return {
-    init:init,
-    runAppQuery:runAppQuery,
-    runManagementQuery:runManagementQuery,
-    getOrganizationName:getOrganizationName,
-    setOrganizationName:setOrganizationName,
-    getApplicationName:getApplicationName,
-    setApplicationName:setApplicationName,
-    getToken:getToken,
-    setToken:setToken,
-    getCallTimeout:getCallTimeout,
-    setCallTimeout:setCallTimeout,
-    getCallTimeoutCallback:getCallTimeoutCallback,
-    setCallTimeoutCallback:setCallTimeoutCallback,
-    callTimeoutCallback:callTimeoutCallback,
-    getApiUrl:getApiUrl,
-    setApiUrl:setApiUrl,
-    getResetPasswordUrl:getResetPasswordUrl,
-    getLoggedInUser:getLoggedInUser,
-    setLoggedInUser:setLoggedInUser,
-    logInAppUser:logInAppUser,
-    renewAppUserToken:renewAppUserToken,
-    logoutAppUser:logoutAppUser,
-    isLoggedInAppUser:isLoggedInAppUser,
-    getLogoutCallback:getLogoutCallback,
-    setLogoutCallback:setLogoutCallback,
-    callLogoutCallback:callLogoutCallback
-  }
-})();
-
-/**
- * validation is a Singleton that provides methods for validating common field types
- *
- * @class Usergrid.validation
- * @author Rod Simpson (rod@apigee.com)
-**/
-Usergrid.validation = (function () {
-
-  var usernameRegex = new RegExp("^([0-9a-zA-Z\.\-])+$");
-  var nameRegex     = new RegExp("^([0-9a-zA-Z@#$%^&!?;:.,'\"~*-=+_\[\\](){}/\\ |])+$");
-  var emailRegex    = new RegExp("^(([0-9a-zA-Z]+[_\+.-]?)+@[0-9a-zA-Z]+[0-9,a-z,A-Z,.,-]*(.){1}[a-zA-Z]{2,4})+$");
-  var passwordRegex = new RegExp("^([0-9a-zA-Z@#$%^&!?<>;:.,'\"~*-=+_\[\\](){}/\\ |])+$");
-  var pathRegex     = new RegExp("^([0-9a-z./-])+$");
-  var titleRegex    = new RegExp("^([0-9a-zA-Z.!-?/])+$");
-
-  /**
-    * Tests the string against the allowed chars regex
-    *
-    * @public
-    * @method validateUsername
-    * @param {string} username - The string to test
-    * @param {function} failureCallback - (optional), the function to call on a failure
-    * @return {boolean} Returns true if string passes regex, false if not
-    */
-  function validateUsername(username, failureCallback) {
-    if (usernameRegex.test(username) && checkLength(username, 4, 80)) {
-      return true;
-    } else {
-      if (failureCallback && typeof(failureCallback) === "function") {
-        failureCallback(this.getUsernameAllowedChars());
-      }
-      return false;
-    }
-  }
-
-  /**
-    * Returns the regex of allowed chars
-    *
-    * @public
-    * @method getUsernameAllowedChars
-    * @return {string} Returns a string with the allowed chars
-    */
-  function getUsernameAllowedChars(){
-    return 'Length: min 4, max 80. Allowed: A-Z, a-z, 0-9, dot, and dash';
-  }
-
-  /**
-    * Tests the string against the allowed chars regex
-    *
-    * @public
-    * @method validateName
-    * @param {string} name - The string to test
-    * @param {function} failureCallback - (optional), the function to call on a failure
-    * @return {boolean} Returns true if string passes regex, false if not
-    */
-  function validateName(name, failureCallback) {
-    if (nameRegex.test(name) && checkLength(name, 4, 16)) {
-      return true;
-    } else {
-      if (failureCallback && typeof(failureCallback) === "function") {
-        failureCallback(this.getNameAllowedChars());
-      }
-      return false;
-    }
-  }
-
-  /**
-    * Returns the regex of allowed chars
-    *
-    * @public
-    * @method getNameAllowedChars
-    * @return {string} Returns a string with the allowed chars
-    */
-  function getNameAllowedChars(){
-    return 'Length: min 4, max 80. Allowed: A-Z, a-z, 0-9, ~ @ # % ^ & * ( ) - _ = + [ ] { } \\ | ; : \' " , . / ? !';
-  }
-
-  /**
-    * Tests the string against the allowed chars regex
-    *
-    * @public
-    * @method validatePassword
-    * @param {string} password - The string to test
-    * @param {function} failureCallback - (optional), the function to call on a failure
-    * @return {boolean} Returns true if string passes regex, false if not
-    */
-  function validatePassword(password, failureCallback) {
-    if (passwordRegex.test(password) && checkLength(password, 5, 16)) {
-      return true;
-    } else {
-      if (failureCallback && typeof(failureCallback) === "function") {
-        failureCallback(this.getPasswordAllowedChars());
-      }
-      return false;
-    }
-  }
-
-  /**
-    * Returns the regex of allowed chars
-    *
-    * @public
-    * @method getPasswordAllowedChars
-    * @return {string} Returns a string with the allowed chars
-    */
-  function getPasswordAllowedChars(){
-    return 'Length: min 5, max 16. Allowed: A-Z, a-z, 0-9, ~ @ # % ^ & * ( ) - _ = + [ ] { } \\ | ; : \' " , . < > / ? !';
-  }
-
-  /**
-    * Tests the string against the allowed chars regex
-    *
-    * @public
-    * @method validateEmail
-    * @param {string} email - The string to test
-    * @param {function} failureCallback - (optional), the function to call on a failure
-    * @return {boolean} Returns true if string passes regex, false if not
-    */
-  function validateEmail(email, failureCallback) {
-    if (emailRegex.test(email) && checkLength(email, 4, 80)) {
-      return true;
-    } else {
-      if (failureCallback && typeof(failureCallback) === "function") {
-        failureCallback(this.getEmailAllowedChars());
-      }
-      return false;
-    }
-  }
-
-  /**
-    * Returns the regex of allowed chars
-    *
-    * @public
-    * @method getEmailAllowedChars
-    * @return {string} Returns a string with the allowed chars
-    */
-  function getEmailAllowedChars(){
-    return 'Email must be in standard form: e.g. example@Usergrid.com';
-  }
-
-  /**
-    * Tests the string against the allowed chars regex
-    *
-    * @public
-    * @method validatePath
-    * @param {string} path - The string to test
-    * @param {function} failureCallback - (optional), the function to call on a failure
-    * @return {boolean} Returns true if string passes regex, false if not
-    */
-  function validatePath(path, failureCallback) {
-    if (pathRegex.test(path) && checkLength(path, 4, 80)) {
-      return true;
-    } else {
-      if (failureCallback && typeof(failureCallback) === "function") {
-        failureCallback(this.getPathAllowedChars());
-      }
-      return false;
-    }
-  }
-
-  /**
-    * Returns the regex of allowed chars
-    *
-    * @public
-    * @method getPathAllowedChars
-    * @return {string} Returns a string with the allowed chars
-    */
-  function getPathAllowedChars(){
-    return 'Length: min 4, max 80. Allowed: /, a-z, 0-9, dot, and dash';
-  }
-
-  /**
-    * Tests the string against the allowed chars regex
-    *
-    * @public
-    * @method validateTitle
-    * @param {string} title - The string to test
-    * @param {function} failureCallback - (optional), the function to call on a failure
-    * @return {boolean} Returns true if string passes regex, false if not
-    */
-  function validateTitle(title, failureCallback) {
-    if (titleRegex.test(title) && checkLength(title, 4, 80)) {
-      return true;
-    } else {
-      if (failureCallback && typeof(failureCallback) === "function") {
-        failureCallback(this.getTitleAllowedChars());
-      }
-      return false;
-    }
-  }
-
-  /**
-    * Returns the regex of allowed chars
-    *
-    * @public
-    * @method getTitleAllowedChars
-    * @return {string} Returns a string with the allowed chars
-    */
-  function getTitleAllowedChars(){
-    return 'Length: min 4, max 80. Allowed: space, A-Z, a-z, 0-9, dot, dash, /, !, and ?';
-  }
-
-  /**
-    * Tests if the string is the correct length
-    *
-    * @public
-    * @method checkLength
-    * @param {string} string - The string to test
-    * @param {integer} min - the lower bound
-    * @param {integer} max - the upper bound
-    * @return {boolean} Returns true if string is correct length, false if not
-    */
-  function checkLength(string, min, max) {
-    if (string.length > max || string.length < min) {
-      return false;
-    }
-    return true;
-  }
-
-  /**
-    * Tests if the string is a uuid
-    *
-    * @public
-    * @method isUUID
-    * @param {string} uuid The string to test
-    * @returns {Boolean} true if string is uuid
-    */
-  function isUUID (uuid) {
-    var uuidValueRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
-    if (!uuid) return false;
-    return uuidValueRegex.test(uuid);
-  }
-
-  return {
-    validateUsername:validateUsername,
-    getUsernameAllowedChars:getUsernameAllowedChars,
-    validateName:validateName,
-    getNameAllowedChars:getNameAllowedChars,
-    validatePassword:validatePassword,
-    getPasswordAllowedChars:getPasswordAllowedChars,
-    validateEmail:validateEmail,
-    getEmailAllowedChars:getEmailAllowedChars,
-    validatePath:validatePath,
-    getPathAllowedChars:getPathAllowedChars,
-    validateTitle:validateTitle,
-    getTitleAllowedChars:getTitleAllowedChars,
-    isUUID:isUUID
-  }
-})();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/charts/chart-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/charts/chart-controller.js b/portal/js/charts/chart-controller.js
new file mode 100644
index 0000000..a5122d1
--- /dev/null
+++ b/portal/js/charts/chart-controller.js
@@ -0,0 +1,6 @@
+'use strict'
+
+AppServices.Controllers.controller('ChartCtrl', ['data', '$scope', '$location', function (data, $scope, $location) {
+
+
+}]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/charts/chart-directives.js
----------------------------------------------------------------------
diff --git a/portal/js/charts/chart-directives.js b/portal/js/charts/chart-directives.js
new file mode 100644
index 0000000..6ea1a9f
--- /dev/null
+++ b/portal/js/charts/chart-directives.js
@@ -0,0 +1,141 @@
+'use strict';
+
+AppServices.Directives.directive('chart', function ($rootScope) {
+  return {
+    restrict: 'E',
+    scope: {
+      chartdata: '=chartdata'
+    },
+    template: '<div></div>',
+    replace: true,
+    controller: function($scope, $element) {
+
+
+    },
+    link: function (scope, element, attrs) {
+      //we need scope.watch because the value is not populated yet
+      //http://stackoverflow.com/questions/14619884/angularjs-passing-object-to-directive
+      scope.$watch('chartdata', function(chartdata,oldchartdata) {
+
+        if(chartdata){
+          //set chart defaults through tag attributes
+          var chartsDefaults = {
+            chart: {
+              renderTo: element[0],
+              type: attrs.type || null,
+              height: attrs.height || null,
+              width: attrs.width || null,
+              reflow: true,
+              animation: false,
+              zoomType: 'x'
+//              events: {
+//                redraw: resize,
+//                load: resize
+//              }
+            }
+          }
+
+          if(attrs.type === 'pie'){
+            chartsDefaults.chart.margin = [0, 0, 0, 0];
+            chartsDefaults.chart.spacingLeft = 0;
+            chartsDefaults.chart.spacingRight = 0;
+            chartsDefaults.chart.spacingTop = 0;
+            chartsDefaults.chart.spacingBottom = 0;
+
+            if(attrs.titleimage){
+              chartdata.title.text = '<img src=\"'+ attrs.titleimage +'\">';
+            }
+
+            if(attrs.titleicon){
+              chartdata.title.text = '<i class=\"pictogram ' + attrs.titleiconclass + '\">' + attrs.titleicon + '</i>';
+            }
+
+            if(attrs.titlecolor){
+              chartdata.title.style.color = attrs.titlecolor;
+            }
+
+            if(attrs.titleimagetop){
+              chartdata.title.style.marginTop = attrs.titleimagetop;
+            }
+
+            if(attrs.titleimageleft){
+              chartdata.title.style.marginLeft = attrs.titleimageleft;
+            }
+
+          }
+
+          if(attrs.type === 'line'){
+            chartsDefaults.chart.marginTop = 30;
+            chartsDefaults.chart.spacingTop = 50;
+//            chartsDefaults.chart.zoomType = null;
+          }
+
+          if(attrs.type === 'column'){
+            chartsDefaults.chart.marginBottom = 80;
+//            chartsDefaults.chart.spacingBottom = 50;
+//            chartsDefaults.chart.zoomType = null;
+          }
+
+          if(attrs.type === 'area'){
+            chartsDefaults.chart.spacingLeft = 0;
+            chartsDefaults.chart.spacingRight = 0;
+            chartsDefaults.chart.marginLeft = 0;
+            chartsDefaults.chart.marginRight = 0;
+          }
+
+          Highcharts.setOptions({
+            global : {
+              useUTC : false
+            },
+            chart: {
+              style: {
+                fontFamily: 'marquette-light, Helvetica, Arial, sans-serif'
+              }
+            }
+          });
+
+          //          scope.$parent.$watch('apptest.step',function(step){
+          //            xAxis1.labels.step = step
+          //            renderChart(chartsDefaults,chartdata);
+          //          })
+
+          if(attrs.type === 'line'){
+            //------line charts
+            var xAxis1 = chartdata.xAxis[0];
+
+            //check for previous setting from service layer or json template... if it doesn't exist use the attr value
+            if(!xAxis1.labels.formatter){
+              xAxis1.labels.formatter = new Function(attrs.xaxislabel);
+            }
+            if(!xAxis1.labels.step){
+              xAxis1.labels.step = attrs.xaxisstep;
+            }
+            //end check
+          }
+
+
+
+
+
+          //pull any stringified from template JS and eval it
+          if(chartdata.tooltip){
+            if(typeof chartdata.tooltip.formatter === 'string'){
+              chartdata.tooltip.formatter = new Function(chartdata.tooltip.formatter);
+            }
+          }
+
+          renderChart(chartsDefaults,chartdata);
+        }
+
+      },true)
+    }
+  }
+
+});
+
+
+function renderChart(chartsDefaults,chartdata,attrs){
+  var newSettings = {};
+  $.extend(true, newSettings, chartsDefaults, chartdata);
+  var chart = new Highcharts.Chart(newSettings);
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/charts/chart-service.js
----------------------------------------------------------------------
diff --git a/portal/js/charts/chart-service.js b/portal/js/charts/chart-service.js
new file mode 100644
index 0000000..df04217
--- /dev/null
+++ b/portal/js/charts/chart-service.js
@@ -0,0 +1,494 @@
+AppServices.Services.factory('charts', function () {
+
+  var lineChart,
+    areaChart,
+    paretoChart,
+    pieChart,
+    pieCompare,
+    xaxis,
+    seriesIndex;
+
+  return {
+    convertLineChart: function (chartData, chartTemplate, dataDescription, settings, currentCompare) {
+
+      lineChart = chartTemplate;
+//      console.log('chartData',chartData[0])
+      if (typeof chartData[0] === 'undefined') {
+        chartData[0] = {};
+        chartData[0].datapoints = []
+      }
+      var dataPoints = chartData[0].datapoints,
+      dPLength = dataPoints.length,
+      label;
+
+      if(currentCompare === 'YESTERDAY'){
+//        lineChart = chartTemplate;
+        seriesIndex = dataDescription.dataAttr.length;
+        label = 'Yesterday ';
+      }
+      else if(currentCompare === 'LAST_WEEK'){
+//        lineChart = chartTemplate;
+        seriesIndex = dataDescription.dataAttr.length;
+        label = 'Last Week ';
+      }else{
+        lineChart = chartTemplate;
+
+        seriesIndex = 0;
+        lineChart.series = [];
+        label = '';
+      }
+      xaxis = lineChart.xAxis[0];
+      xaxis.categories = [];
+
+
+
+      //the next 2 setting options are provided in the timeFormat dropdown, so we must inspect them here
+      if (settings.xaxisformat) {
+        xaxis.labels.formatter = new Function(settings.xaxisformat);
+      }
+      if (settings.step) {
+        xaxis.labels.step = settings.step;
+      }
+      //end check
+
+      for (var i = 0; i < dPLength; i++) {
+        var dp = dataPoints[i];
+        xaxis.categories.push(dp.timestamp);
+      }
+
+      //check to see if there are multiple "chartGroupNames" in the object, otherwise "NA" will go to the else
+      if(chartData.length > 1){
+
+        for (var l = 0; l < chartData.length; l++){
+
+          if(chartData[l].chartGroupName){
+
+            dataPoints = chartData[l].datapoints;
+//            dPLength = dataPoints.length;
+
+            lineChart.series[l] = {};
+            lineChart.series[l].data = [];
+            lineChart.series[l].name = chartData[l].chartGroupName;
+            lineChart.series[l].yAxis = 0;
+            lineChart.series[l].type = 'line';
+            lineChart.series[l].color = dataDescription.colors[i];
+            lineChart.series[l].dashStyle = 'solid';
+
+            lineChart.series[l].yAxis.title.text = dataDescription.yAxisLabels;
+
+            plotData(l,dPLength,dataPoints,dataDescription.detailDataAttr,true)
+          }
+        }
+      }else{
+
+      var steadyCounter = 0;
+
+        //loop over incoming data members for axis setup... create empty arrays and settings ahead of time
+        //the seriesIndex is for the upcoming compare options - if compare is clicked... if it isn't just use 0 :/
+        for (var i = seriesIndex;i < (dataDescription.dataAttr.length + (seriesIndex > 0 ? seriesIndex : 0)); i++) {
+          var yAxisIndex = dataDescription.multiAxis ? steadyCounter : 0;
+          lineChart.series[i] = {};
+          lineChart.series[i].data = [];
+          lineChart.series[i].name = label + dataDescription.labels[steadyCounter];
+          lineChart.series[i].yAxis = yAxisIndex;
+          lineChart.series[i].type = 'line';
+          lineChart.series[i].color = dataDescription.colors[i];
+          lineChart.series[i].dashStyle = 'solid';
+
+          lineChart.yAxis[yAxisIndex].title.text = dataDescription.yAxisLabels[(dataDescription.yAxisLabels > 1 ? steadyCounter : 0)];
+          steadyCounter++;
+        }
+
+        plotData(seriesIndex,dPLength,dataPoints,dataDescription.dataAttr,false)
+      }
+
+      function plotData(counter,dPLength,dataPoints,dataAttrs,detailedView){
+        //massage the data... happy ending
+        for (var i = 0; i < dPLength; i++) {
+          var dp = dataPoints[i];
+
+          var localCounter = counter;
+          //loop over incoming data members
+          for (var j = 0; j < dataAttrs.length; j++) {
+            if(typeof dp === 'undefined'){
+              lineChart.series[localCounter].data.push([i, 0]);
+            }else{
+              lineChart.series[localCounter].data.push([i, dp[dataAttrs[j]]]);
+            }
+            if(!detailedView){
+            localCounter++;
+            }
+
+          }
+
+        }
+      }
+      return lineChart;
+    },
+
+    convertAreaChart: function (chartData, chartTemplate, dataDescription, settings, currentCompare) {
+
+      areaChart = angular.copy(areaChart);
+//      console.log('chartData',chartData[0])
+      if (typeof chartData[0] === 'undefined') {
+        chartData[0] = {};
+        chartData[0].datapoints = []
+      }
+      var dataPoints = chartData[0].datapoints,
+        dPLength = dataPoints.length,
+        label;
+
+      if(currentCompare === 'YESTERDAY'){
+//        areaChart = chartTemplate;
+        seriesIndex = dataDescription.dataAttr.length;
+        label = 'Yesterday ';
+      }
+      else if(currentCompare === 'LAST_WEEK'){
+//        areaChart = chartTemplate;
+        seriesIndex = dataDescription.dataAttr.length;
+        label = 'Last Week ';
+      }else{
+        areaChart = chartTemplate;
+
+        seriesIndex = 0;
+        areaChart.series = [];
+        label = '';
+      }
+      xaxis = areaChart.xAxis[0];
+      xaxis.categories = [];
+
+
+
+      //the next 2 setting options are provided in the timeFormat dropdown, so we must inspect them here
+      if (settings.xaxisformat) {
+        xaxis.labels.formatter = new Function(settings.xaxisformat);
+      }
+      if (settings.step) {
+        xaxis.labels.step = settings.step;
+      }
+      //end check
+
+      for (var i = 0; i < dPLength; i++) {
+        var dp = dataPoints[i];
+        xaxis.categories.push(dp.timestamp);
+      }
+
+      //check to see if there are multiple "chartGroupNames" in the object, otherwise "NA" will go to the else
+      if(chartData.length > 1){
+
+        for (var l = 0; l < chartData.length; l++){
+
+          if(chartData[l].chartGroupName){
+
+            dataPoints = chartData[l].datapoints;
+//            dPLength = dataPoints.length;
+
+            areaChart.series[l] = {};
+            areaChart.series[l].data = [];
+            areaChart.series[l].fillColor = dataDescription.areaColors[l];
+            areaChart.series[l].name = chartData[l].chartGroupName;
+            areaChart.series[l].yAxis = 0;
+            areaChart.series[l].type = 'area';
+            areaChart.series[l].pointInterval = 1;
+            areaChart.series[l].color = dataDescription.colors[l];
+            areaChart.series[l].dashStyle = 'solid';
+
+            areaChart.series[l].yAxis.title.text = dataDescription.yAxisLabels;
+
+            plotData(l,dPLength,dataPoints,dataDescription.detailDataAttr,true)
+          }
+        }
+      }else{
+
+        var steadyCounter = 0;
+
+        //loop over incoming data members for axis setup... create empty arrays and settings ahead of time
+        //the seriesIndex is for the upcoming compare options - if compare is clicked... if it isn't just use 0 :/
+        for (var i = seriesIndex;i < (dataDescription.dataAttr.length + (seriesIndex > 0 ? seriesIndex : 0)); i++) {
+          var yAxisIndex = dataDescription.multiAxis ? steadyCounter : 0;
+          areaChart.series[i] = {};
+          areaChart.series[i].data = [];
+          areaChart.series[i].fillColor = dataDescription.areaColors[i];
+          areaChart.series[i].name = label + dataDescription.labels[steadyCounter];
+          areaChart.series[i].yAxis = yAxisIndex;
+          areaChart.series[i].type = 'area';
+          areaChart.series[i].pointInterval = 1;
+          areaChart.series[i].color = dataDescription.colors[i];
+          areaChart.series[i].dashStyle = 'solid';
+
+          areaChart.yAxis[yAxisIndex].title.text = dataDescription.yAxisLabels[(dataDescription.yAxisLabels > 1 ? steadyCounter : 0)];
+          steadyCounter++;
+        }
+
+        plotData(seriesIndex,dPLength,dataPoints,dataDescription.dataAttr,false)
+      }
+
+      function plotData(counter,dPLength,dataPoints,dataAttrs,detailedView){
+        //massage the data... happy ending
+        for (var i = 0; i < dPLength; i++) {
+          var dp = dataPoints[i];
+
+          var localCounter = counter;
+          //loop over incoming data members
+          for (var j = 0; j < dataAttrs.length; j++) {
+            if(typeof dp === 'undefined'){
+              areaChart.series[localCounter].data.push(0);
+            }else{
+              areaChart.series[localCounter].data.push(dp[dataAttrs[j]]);
+            }
+            if(!detailedView){
+              localCounter++;
+            }
+
+          }
+
+        }
+      }
+      return areaChart;
+    },
+
+    convertParetoChart: function (chartData, chartTemplate, dataDescription, settings, currentCompare) {
+
+      paretoChart = chartTemplate;
+
+      if (typeof chartData === 'undefined') {
+        chartData = [];
+      }
+
+      var label,
+        cdLength = chartData.length,
+        compare = false,
+        allParetoOptions = [],
+        stackedBar = false;
+
+      seriesIndex = 0;
+
+      function getPreviousData(){
+        for(var i = 0;i < chartTemplate.series[0].data.length;i++){
+          //pulling the "now" values for comparison later, assuming they will be in the 0 index :)
+           allParetoOptions.push(chartTemplate.xAxis.categories[i])
+        }
+      }
+
+      if(typeof dataDescription.dataAttr[1] === 'object'){
+        stackedBar = true;
+      }
+
+      if(currentCompare === 'YESTERDAY'){
+        label = 'Yesterday ';
+        compare = true;
+        if(stackedBar){
+          seriesIndex = dataDescription.dataAttr[1].length;
+        }
+        getPreviousData()
+      }
+      else if(currentCompare === 'LAST_WEEK'){
+        label = 'Last Week ';
+        compare = true;
+        if(stackedBar){
+          seriesIndex = dataDescription.dataAttr[1].length;
+        }
+        seriesIndex =
+        getPreviousData()
+      }else{
+        compare = false;
+        label = '';
+        paretoChart.xAxis.categories = [];
+        paretoChart.series = [];
+        paretoChart.series[0] = {};
+        paretoChart.series[0].data = [];
+        paretoChart.legend.enabled = false;
+      }
+
+      paretoChart.plotOptions.series.borderColor = dataDescription.borderColor;
+
+
+      //create a basic compare series (more advanced needed for stacked bar)
+      if(compare && !stackedBar){
+        paretoChart.series[1] = {};
+        paretoChart.series[1].data = [];
+        //repopulate array with 0 values based on length of NOW data
+        for(var i = 0; i < allParetoOptions.length; i++) {
+          paretoChart.series[1].data.push(0);
+        }
+        paretoChart.legend.enabled = true;
+//        paretoChart.series[1].name = label;
+//        paretoChart.series[0].name = "Now";
+      }
+
+      for (var i = 0; i < cdLength; i++) {
+        var bar = chartData[i];
+
+        if(!compare){
+          paretoChart.xAxis.categories.push(bar[dataDescription.dataAttr[0]]);
+
+          //if we send multiple attributes to be plotted, assume it's a stacked bar for now
+          if(typeof dataDescription.dataAttr[1] === 'object'){
+            createStackedBar(dataDescription,paretoChart,paretoChart.series.length);
+          }else{
+            paretoChart.series[0].data.push(bar[dataDescription.dataAttr[1]]);
+            paretoChart.series[0].name = dataDescription.labels[0];
+            paretoChart.series[0].color = dataDescription.colors[0];
+          }
+
+        }else{
+
+          //check if this is a stacked bar
+
+
+          var newLabel = bar[dataDescription.dataAttr[0]],
+              newValue = bar[dataDescription.dataAttr[1]],
+              previousIndex = allParetoOptions.indexOf(newLabel);
+
+              //make sure this label existed in the NOW data
+              if(previousIndex > -1){
+                if(typeof dataDescription.dataAttr[1] === 'object'){
+                  createStackedBar(dataDescription,paretoChart,paretoChart.series.length);
+                }else{
+                  paretoChart.series[1].data[previousIndex] = newValue;
+                  paretoChart.series[1].name = (label !== '' ? label + ' ' + dataDescription.labels[0] : dataDescription.labels[0]);
+                  paretoChart.series[1].color = dataDescription.colors[1];
+                }
+              }else{
+                //not found for comparison
+              }
+
+
+        }
+
+      }
+
+      function createStackedBar(dataDescription,paretoChart,startingPoint){
+
+          paretoChart.plotOptions = {
+            series: {
+              shadow: false,
+              borderColor: dataDescription.borderColor,
+              borderWidth: 1
+            },
+            column: {
+              stacking: 'normal',
+              dataLabels: {
+                enabled: true,
+                color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white'
+              }
+            }
+          };
+
+          var start = dataDescription.dataAttr[1].length,
+            steadyCounter = 0,
+            stackName = label;
+
+          if(compare){
+            paretoChart.legend.enabled = true;
+          }
+
+          for (var f = seriesIndex; f < (start + seriesIndex); f++) {
+            if(!paretoChart.series[f]){
+              paretoChart.series[f] = {'data':[]}
+            }
+            paretoChart.series[f].data.push(bar[dataDescription.dataAttr[1][steadyCounter]]);
+            paretoChart.series[f].name = (label !== '' ? label + ' ' + dataDescription.labels[steadyCounter] : dataDescription.labels[steadyCounter]);
+            paretoChart.series[f].color = dataDescription.colors[f];
+            paretoChart.series[f].stack = label;
+            steadyCounter++
+          }
+
+
+      }
+
+      return paretoChart;
+    },
+
+    convertPieChart: function (chartData, chartTemplate, dataDescription, settings, currentCompare) {
+
+      var label,
+        cdLength = chartData.length,
+        compare = false;
+
+      pieChart = chartTemplate;
+
+      if(currentCompare === 'YESTERDAY'){
+        label = 'Yesterday ';
+        compare = false; //override for now to false
+      }
+      else if(currentCompare === 'LAST_WEEK'){
+        label = 'Last Week ';
+        compare = false; //override for now to false
+      }else{
+        compare = false;
+
+        pieChart.series[0].data = [];
+
+        if (pieChart.series[0].dataLabels) {
+          if(typeof pieChart.series[0].dataLabels.formatter === 'string'){
+            pieChart.series[0].dataLabels.formatter = new Function(pieChart.series[0].dataLabels.formatter);
+          }
+        }
+
+      }
+
+      pieChart.plotOptions.pie.borderColor = dataDescription.borderColor;
+
+      if(compare){
+        pieChart.series[1].data = [];
+        if (pieChart.series[1].dataLabels) {
+          if(typeof pieChart.series[1].dataLabels.formatter === 'string'){
+            pieChart.series[1].dataLabels.formatter = new Function(pieChart.series[1].dataLabels.formatter);
+          }
+        }
+      }
+
+      var tempArray = [];
+      for (var i = 0; i < cdLength; i++) {
+        var pie = chartData[i];
+
+        tempArray.push({
+          name:pie[dataDescription.dataAttr[0]],
+          y:pie[dataDescription.dataAttr[1]],
+          color:''
+        });
+
+      }
+
+
+      //sort by name prop so we can have a good looking comparison donut
+      sortJsonArrayByProperty(tempArray,'name');
+      //add colors so they match up
+      for (var i = 0; i < tempArray.length; i++) {
+          tempArray[i].color = dataDescription.colors[i];
+      }
+
+      if(!compare){
+        pieChart.series[0].data = tempArray;
+      }else{
+        pieChart.series[1].data = tempArray;
+      }
+
+      return pieChart;
+    }
+  }
+
+
+  function sortJsonArrayByProperty(objArray, prop, direction){
+    if (arguments.length<2) throw new Error("sortJsonArrayByProp requires 2 arguments");
+    var direct = arguments.length>2 ? arguments[2] : 1; //Default to ascending
+
+    if (objArray && objArray.constructor===Array){
+      var propPath = (prop.constructor===Array) ? prop : prop.split(".");
+      objArray.sort(function(a,b){
+        for (var p in propPath){
+          if (a[propPath[p]] && b[propPath[p]]){
+            a = a[propPath[p]];
+            b = b[propPath[p]];
+          }
+        }
+        // convert numeric strings to integers
+        a = a.match(/^\d+$/) ? +a : a;
+        b = b.match(/^\d+$/) ? +b : b;
+        return ( (a < b) ? -1*direct : ((a > b) ? 1*direct : 0) );
+      });
+    }
+  }
+
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/charts/highcharts.json
----------------------------------------------------------------------
diff --git a/portal/js/charts/highcharts.json b/portal/js/charts/highcharts.json
new file mode 100644
index 0000000..817befc
--- /dev/null
+++ b/portal/js/charts/highcharts.json
@@ -0,0 +1,329 @@
+{
+  "pie": {
+    "colors": [
+      "#828282",
+      "#9b9b9b",
+      "#bababa",
+      "#c5c5c5",
+      "#828282",
+      "#9b9b9b",
+      "#bababa",
+      "#c5c5c5"
+    ],
+    "credits": {
+      "enabled": false
+    },
+    "title": {
+      "text": "",
+      "verticalAlign": "middle",
+      "floating": "true",
+      "useHTML": true,
+      "style":{
+        "fontSize": "49px",
+        "color": "#ff0303",
+        "marginTop": "",
+        "marginLeft": ""
+      }
+    },
+    "tooltip": {
+      "percentageDecimals": 0,
+      "valueSuffix": "%",
+      "formatter": "return '<span style=\"font-weight:bold; font-size:14px;color:' + this.point.series.color + '\">'+ (this.point.name || this.series.name) +': ' + Highcharts.numberFormat(this.y, 2) + '%</span><br />'",
+      "borderRadius" : 0
+    },
+    "plotOptions": {
+      "pie": {
+        "shadow": false,
+        "center": ["50%","45%"],
+        "size":"100%",
+        "borderWidth": 0,
+        "borderColor": "#fff",
+        "animation": {"duration":400}
+      }
+    },
+    "series": [
+      {
+        "name": "",
+        "data": [],
+        "size": "90%",
+        "innerSize": "45%",
+        "dataLabels": {
+          "formatter": "return this.y > 5 ? this.point.name : null;",
+          "color": "#fff",
+          "distance": -30,
+          "style": {
+            "fontFamily": "marquette-regular, Helvetica, Arial, sans-serif",
+            "fontSize": "11px"
+          }
+        }
+      },
+      {
+        "name": "",
+        "data": [],
+        "size": "80%",
+        "innerSize": "60%",
+        "dataLabels": {
+          "formatter": "return this.y > 1 ? '<b>'+ this.point.name +':</b> '+ Highcharts.numberFormat(this.y, 2) +'%'  : null;"
+        }
+      }
+    ]
+  },
+
+
+  "line": {
+
+    "title": {
+      "text": ""
+    },
+    "tooltip": {
+      "formatter": "return '<span style=\"font-weight:bold;font-size:14px;color:' + this.point.series.color + '\">'+ this.y +' ' + (this.point.name || this.series.name) + '</span><br />'+Highcharts.dateFormat('%A %H:%M', this.x) + '<br />'",
+      "borderRadius" : 0
+    },
+    "xAxis": [
+      {
+        "type": "datetime",
+        "labels": {
+          "formatter": "",
+          "rotation": 65,
+          "style": {
+            "fontSize": "13px"
+          },
+          "align": "left",
+          "step": "3"
+        }
+      }
+    ],
+    "yAxis": [
+      {
+        "title": {
+          "text": ""
+        },
+        "min": 0,
+        "labels":{
+          "align":"left",
+          "x":3,
+          "y":16
+        },
+        "showFirstLabel": false
+      },
+      {
+        "title": {
+          "text": ""
+        },
+        "min": 0,
+        "opposite": true,
+        "labels":{
+          "align":"right",
+          "x":-3,
+          "y":16
+        },
+        "showFirstLabel": false
+      }
+    ],
+    "series": [],
+    "legend": {
+      "align": "right",
+      "verticalAlign": "top",
+      "floating": true,
+      "borderWidth": 0,
+      "y": -50,
+      "itemStyle": {"fontSize": "14px"}
+    },
+    "plotOptions": {
+      "series": {
+        "lineWidth": 2,
+        "marker": {
+          "enabled": true,
+          "radius": 2,
+          "lineWidth": 1,
+          "fillColor": "white",
+          "lineColor": null
+        },
+        "animation": {"duration":400}
+      }
+    },
+    "colors": [
+      "#4572A7",
+      "#AA4643",
+      "#89A54E",
+      "#80699B",
+      "#3D96AE",
+      "#DB843D",
+      "#92A8CD",
+      "#A47D7C",
+      "#B5CA92"
+    ],
+    "credits": {
+      "enabled": false
+    }
+
+  },
+
+  "pareto": {
+    "chart": {
+      "defaultSeriesType": "column"
+    },
+    "title": {
+      "text": ""
+    },
+    "legend": {
+      "enabled": true
+    },
+    "plotOptions": {
+      "series": {
+        "shadow": false,
+        "borderColor": "#fff",
+        "borderWidth": 2
+      }
+    },
+    "tooltip": {
+      "percentageDecimals": 0,
+      "formatter": "return this.x + '<br/>' + '<span style=\"font-weight:bold;font-size:14px;color:' + this.point.series.color + '\">'+ this.y + ' ' + (this.point.name || this.series.name) + '</span><br />'",
+      "borderRadius" : 0
+    },
+    "xAxis": {
+      "categories": [],
+      "lineColor": "#999",
+      "lineWidth": 1,
+      "tickColor": "#666",
+      "tickLength": 1,
+      "labels": {
+        "formatter": "",
+        "rotation": 65,
+        "style": {
+          "fontSize": "10px"
+        },
+        "align": "left"
+      }
+    },
+    "yAxis": [
+      {
+        "min": 0,
+        "lineColor": "#999",
+        "lineWidth": 1,
+        "tickColor": "#666",
+        "tickWidth": 1,
+        "tickLength": 1,
+        "gridLineColor": "#ddd",
+        "title": {
+          "text": "",
+          "style": {
+            "color": "#000"
+          }
+        }
+      }
+
+    ],
+    "credits": {
+      "enabled": false
+    },
+    "colors": [
+      "#828282",
+      "#9b9b9b",
+      "#bababa",
+      "#c5c5c5",
+      "#828282",
+      "#9b9b9b",
+      "#bababa",
+      "#c5c5c5"
+    ]
+  },
+
+  "area": {
+
+    "title": {
+      "text": ""
+    },
+    "tooltip": {
+      "formatter": "return '<span style=\"font-weight:bold;font-size:14px;color:' + this.point.series.color + '\">'+ this.y +' ' + (this.point.name || this.series.name) + '</span><br />'+Highcharts.dateFormat('%A %H:%M', this.x) + '<br />'",
+      "borderRadius" : 0
+    },
+    "xAxis": [
+      {
+        "type": "datetime",
+        "maxZoom": 1,
+        "labels": {
+          "formatter": "",
+          "rotation": 65,
+          "style": {
+            "fontSize": "13px"
+          },
+          "align": "left",
+          "step": "3"
+        }
+      }
+    ],
+    "yAxis": [
+      {
+        "title": {
+          "text": ""
+        },
+        "min": 0,
+        "labels":{
+          "align":"left",
+          "x":3,
+          "y":16
+        },
+        "showFirstLabel": false
+      },
+      {
+        "title": {
+          "text": ""
+        },
+        "min": 0,
+        "opposite": true,
+        "labels":{
+          "align":"right",
+          "x":-3,
+          "y":16
+        },
+        "showFirstLabel": false
+      }
+    ],
+    "series": [],
+    "legend": {
+      "align": "right",
+      "verticalAlign": "top",
+      "floating": true,
+      "borderWidth": 0,
+      "itemStyle": {"fontSize": "14px"}
+    },
+    "plotOptions": {
+      "area": {
+        "stacking": "normal",
+        "lineWidth": 1,
+        "marker": {
+          "enabled": false
+        },
+        "threshold": null,
+        "shadow": false,
+        "animation": {"duration":400}
+      },
+      "series": {
+        "lineWidth": 1,
+        "marker": {
+          "radius": 2,
+          "lineWidth": 1,
+          "fillColor": "white",
+          "lineColor": null
+        },
+        "animation": {"duration":400}
+      }
+    },
+    "colors": [
+      "#4572A7",
+      "#AA4643",
+      "#89A54E",
+      "#80699B",
+      "#3D96AE",
+      "#DB843D",
+      "#92A8CD",
+      "#A47D7C",
+      "#B5CA92"
+    ],
+    "credits": {
+      "enabled": false
+    }
+
+  }
+}


[45/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app/console.js
----------------------------------------------------------------------
diff --git a/portal/js/app/console.js b/portal/js/app/console.js
deleted file mode 100644
index 9784a2a..0000000
--- a/portal/js/app/console.js
+++ /dev/null
@@ -1,4536 +0,0 @@
-function apigee_console_app(Pages, query_params) {
-  //This code block *WILL NOT* load before the document is complete
-  window.Usergrid = window.Usergrid || {};
-  Usergrid.console = Usergrid.console || {};
-
-  // for running Apigee App Services as a local server
-  var LOCAL_STANDALONE_API_URL = "http://localhost/usergrid";
-  var LOCAL_TOMCAT_API_URL = "http://localhost:8080/ROOT";
-  var LOCAL_API_URL = LOCAL_STANDALONE_API_URL;
-  var PUBLIC_API_URL = "https://api.usergrid.com/";
-  var FORCE_PUBLIC_API = true; // Always use public API
-  if (!FORCE_PUBLIC_API && (document.domain.substring(0,9) == "localhost")) {
-    Usergrid.ApiClient.setApiUrl(LOCAL_API_URL);
-  }
-
-  String.prototype.endsWith = function (s) {
-    return (this.length >= s.length && this.substr(this.length - s.length) == s);
-  };
-
-  if (query_params.api_url) {
-      if (!query_params.api_url.endsWith('/')) {
-        query_params.api_url += '/';
-      }
-      Usergrid.ApiClient.setApiUrl(query_params.api_url);
-  }
-  //Display message page in case there is a a timeout to the API
-  Usergrid.ApiClient.setCallTimeoutCallback(function(){
-    showMessagePage();
-  });
-
-  var HIDE_CONSOLE = query_params.hide_console || "";
-
-  if (HIDE_CONSOLE.indexOf("true") >= 0) {
-    $('#sidebar-menu ul li a[href="#console"]').hide();
-  }
-
-  var OFFLINE = false;
-  var OFFLINE_PAGE = "#query-page";
-
-  var self = this;
-
-  var emailRegex = new RegExp("^(([0-9a-zA-Z]+[_\+.-]?)+@[0-9a-zA-Z]+[0-9,a-z,A-Z,.,-]*(.){1}[a-zA-Z]{2,4})+$");
-  var emailAllowedCharsMessage = 'eg. example@apigee.com';
-
-  var passwordRegex = new RegExp("^([0-9a-zA-Z@#$%^&!?<>;:.,'\"~*=+_\[\\](){}/\\ |-])+$");
-  var passwordAllowedCharsMessage = 'This field only allows: A-Z, a-z, 0-9, ~ @ # % ^ & * ( ) - _ = + [ ] { } \\ | ; : \' " , . < > / ? !';
-  var passwordMismatchMessage = 'Password must match';
-
-  var usernameRegex = new RegExp("^([0-9a-zA-Z\.\_-])+$");
-  var usernameAllowedCharsMessage = 'This field only allows : A-Z, a-z, 0-9, dot, underscore and dash';
-
-  var organizationNameRegex = new RegExp ("^([0-9a-zA-Z.-])+$");
-  var organizationNameAllowedCharsMessage = 'This field only allows : A-Z, a-z, 0-9, dot, and dash';
-
-  //Regex declared differently from al the others because of the use of ". Functions exacly as if it was called from new RegExp
-  var nameRegex = /[0-9a-zA-ZáéíóúÁÉÍÓÚÑñ@#$%\^&!\?;:\.,'\"~\*-=\+_\(\)\[\]\{\}\|\/\\]+/;
-  var nameAllowedCharsMessage = "This field only allows: A-Z, a-z, áéíóúÁÉÍÓÚÑñ, 0-9, ~ @ # % ^ & * ( ) - _ = + [ ] { } \\ | ; : \' \" , . / ? !";
-
-  var titleRegex = new RegExp("[a-zA-Z0-9.!-?]+[\/]?");
-  var titleAllowedCharsMessage = 'Title field only allows : space, A-Z, a-z, 0-9, dot, dash, /, !, and ?';
-
-  var alphaNumRegex = new RegExp("[0-9a-zA-Z]+");
-  var alphaNumAllowedCharsMessage = 'Collection name only allows : a-z A-Z 0-9';
-
-  var pathRegex = new RegExp("^[^\/]*([a-zA-Z0-9\.-]+[\/]{0,1})+[^\/]$");
-  var pathAllowedCharsMessage = 'Path only allows : /, a-z, 0-9, dot, and dash, paths of the format: /path, path/, or path//path are not allowed';
-
-  var roleRegex = new RegExp("^([0-9a-zA-Z./-])+$");
-  var roleAllowedCharsMessage = 'Role only allows : /, a-z, 0-9, dot, and dash';
-
-  var intRegex = new RegExp("^([0-9])+$");
-
-  var applications = {};
-  var applications_by_id = {};
-
-  var current_application_id = "";
-  var current_application_name = {};
-  var applicationData = {};
-
-  var query_entities = null;
-  var query_entities_by_id = null;
-
-  var query_history = [];
-
-  var indexes = [];
-  var backgroundGraphColor = '#ffffff';
-
-  String.prototype.startsWith = function(s) {
-    return this.lastIndexOf(s, 0) === 0;
-  };
-
-  String.prototype.endsWith = function(s) {
-    return this.length >= s.length
-      && this.substr(this.length - s.length) == s;
-  };
-
-  function initOrganizationVars() {
-    applications = {};
-    applications_by_id = {};
-
-    current_application_id = "";
-    current_application_name = "";
-
-    query_entities = null;
-    query_entities_by_id = null;
-
-    query_history = [];
-
-    indexes = [];
-  }
-
-  function keys(o) {
-    var a = [];
-    for (var propertyName in o) {
-      a.push(propertyName);
-    }
-    return a;
-  }
-
-  $('#api-activity').ajaxStart( function() {
-    $(this).show();
-  });
-
-  $('#api-activity').ajaxComplete( function() {
-    $(this).hide();
-  });
-
-  function showPanel(page) {
-    var p = $(page);
-    $("#console-panels").children().each(function() {
-      if ($(this).attr("id") == p.attr("id")) {
-        $(this).show();
-      } else {
-        $(this).hide();
-      }
-    });
-  }
-
-  function initConsoleFrame(){
-    $("#console-panel iframe").attr("src", url);
-  }
-
-  function getAccessTokenURL(){
-    var bearerToken = Usergrid.ApiClient.getToken();
-    var app_name = Usergrid.ApiClient.getApplicationName();
-    if (typeof app_name != 'string') {
-      app_name = '';
-    }
-    var org_name = Usergrid.ApiClient.getOrganizationName();
-    if (typeof org_name != 'string') {
-      org_name = '';
-    }
-    var bearerTokenJson = JSON.stringify(
-      [{
-        "type":"custom_token",
-        "name":"Authorization",
-        "value":"Bearer " + bearerToken,
-        "style":"header"
-      }, {
-        "type":"custom_token",
-        "name":"app_name",
-        "value":app_name,
-        "style":"template"
-      }, {
-        "type":"custom_token",
-        "name":"org_name",
-        "value":org_name,
-        "style":"template"
-      }]
-    );
-    var bearerTokenString = encodeURIComponent(bearerTokenJson);
-    var url = 'https://apigee.com/apigeedev/console/usergrid?v=2&embedded=true&auth=' + bearerTokenString;
-    return url;
-  }
-  Usergrid.console.getAccessTokenURL = getAccessTokenURL;
-
-  function showPanelContent(panelDiv, contentDiv) {
-    var cdiv = $(contentDiv);
-    $(panelDiv).children(".panel-content").each(function() {
-      var el = $(this);
-      if (el.attr("id") == cdiv.attr("id")) {
-        el.show();
-      } else {
-        el.hide();
-      }
-    });
-  }
-
-  function selectTabButton(link) {
-    var tab = $(link).parent();
-    tab.parent().find("li.active").removeClass('active');
-    tab.addClass('active');
-  }
-
-  function selectPillButton(link) {
-    var tab = $(link);
-    tab.parent().find("a.active").removeClass('active');
-    tab.addClass('active');
-  }
-  function selectFirstTabButton(bar){
-    selectTabButton($(bar).find("li:first-child a"));
-  }
-
-  function setNavApplicationText() {
-    var name = Usergrid.ApiClient.getApplicationName();
-    if(!name) {
-      name = "Select an Application";
-    }
-    $('#current-app-name').html('<div class="app-menu">' + name + '</div>  <span class="caret"></span>');
-  //  $('.thingy span.title span.app_title').text(" " + name);
-    $('#nav-app-name').html(name);
-  }
-
-  /*******************************************************************
-   *
-   * Collections
-   *
-   ******************************************************************/
-
-  function pageSelectCollections() {
-    hideModal(' #collections-messages')
-    getCollections();
-  }
-  window.Usergrid.console.pageSelectCollections = pageSelectCollections;
-
-  function getCollections() {
-    //clear out the table before we start
-    var output = $('#collections-table');
-    output.empty();
-    hideCurlCommand('collections');
-    var section =$('#application-collections');
-    section.empty().html('<div class="alert alert-info">Loading...</div>');
-
-    var queryObj = new Usergrid.Query("GET",'', null, null, getCollectionsCallback,
-      function() { alertModal("Error", "There was an error getting the collections"); }
-    );
-
-    runAppQuery(queryObj);
-    return false;
-  }
-
-function compare(a,b) {
-  if (a.name < b.name)
-     return -1;
-  if (a.name > b.name)
-    return 1;
-  return 0;
-}
-
-  function getCollectionsCallback(response) {
-    $('#collections-pagination').hide();
-    $('#collections-next').hide();
-    $('#collections-previous').hide();
-    showEntitySelectButton();
-    if (response.entities && response.entities[0] && response.entities[0].metadata && response.entities[0].metadata.collections) {
-      applicationData.Collections = response.entities[0].metadata.collections;
-      updateApplicationDashboard();
-      updateQueryAutocompleteCollections();
-    }
-
-    var data = response.entities[0].metadata.collections;
-    var output = $('#collections-table');
-
-    var elements = [];
-    for (var key in data) {
-      if (data.hasOwnProperty(key)) {
-        elements.push(data[key])
-      }
-    }
-    elements.sort(compare)
-    var r = {};
-    if ($.isEmptyObject(data)) {
-      output.replaceWith('<div id="collections-table" class="collection-panel-section-message">No collections found.</div>');
-    } else {
-      output.replaceWith('<table id="collections-table" class="table"><tbody></tbody></table>');
-      var leftMenuContent = '<ul id="collections-link-buttons" class="nav nav-list" style="margin-bottom: 5px;">';
-      for (var i=0;i<elements.length;i++) {
-        r.name = elements[i];
-        r.count = data[elements[i].count];
-        $.tmpl('apigee.ui.collections.table_rows.html', r).appendTo('#collections-table');
-
-        var link = "Usergrid.console.pageOpenQueryExplorer('"+elements[i].name+"'); return false;";
-        leftMenuContent += '<li id="collections-link-button-'+elements[i].name+'"><a href="#" onclick="'+link+'" class="collection-nav-links"><span class="nav-menu-text">/'+elements[i].name+'</span></a></li>';
-
-
-      }
-      /*
-      for (var i in data) {
-        var this_data = data[i];
-        $.tmpl('apigee.ui.collections.table_rows.html', this_data).appendTo('#collections-table');
-
-        var link = "Usergrid.console.pageOpenQueryExplorer('"+data[i].name+"'); return false;";
-        leftMenuContent += '<li id="collections-link-button-'+data[i].name+'"><a href="#" onclick="'+link+'" class="collection-nav-links"><span class="nav-menu-text">/'+data[i].name+'</span></a></li>';
-      }*/
-      leftMenuContent += '</ul>';
-      $('#left-collections-content').html(leftMenuContent);
-    }
-    showCurlCommand('collections', this.getCurl(), this.getToken());
-  }
-
-  /*******************************************************************
-   *
-   * Query Explorer
-   *
-   ******************************************************************/
-
-  function pageOpenQueryExplorer(collection) {
-
-    collection = collection || "";
-    showPanel("#collections-panel");
-    hideMoreQueryOptions();
-    //reset the form fields
-    $("#query-path").val("");
-    $("#query-source").val("");
-    $("#query-ql").val("");
-    showQueryCollectionView();
-    query_history = [];
-    //Prepare Collection Index Dropdown Menu
-    requestIndexes(collection);
-    //bind events for previous and next buttons
-    bindPagingEvents('query-response');
-    //clear out the table before we start
-    var output = $('#query-response-table');
-    output.empty();
-    //if a collection was provided, go ahead and get the default data
-    if (collection) {
-      getCollection('GET', collection);
-    }
-  }
-  window.Usergrid.console.pageOpenQueryExplorer = pageOpenQueryExplorer;
-
-  //change contexts for REST operations
-  $("#button-query-get").click(function(){
-    $("#query-json-box").hide();
-    $("#query-query-box").show();
-    $("#query-limit-box").show();
-  });
-
-  $("#button-query-post").click(function(){
-    $("#query-json-box").show();
-    $("#query-query-box").hide();
-    $("#query-limit-box").hide();
-  });
-
-  $("#button-query-put").click(function(){
-    $("#query-json-box").show();
-    $("#query-query-box").show();
-    $("#query-limit-box").hide();
-  });
-
-  $("#button-query-delete").click(function(){
-    $("#query-json-box").hide();
-    $("#query-query-box").show();
-    $("#query-limit-box").hide();
-  });
-
-  $("#data-explorer-link").click(function(){
-    $('#data-explorer').show();
-    $('#query-path').val('');
-    $("#query-response-area").hide();
-  });
-
-  var queryPath = '';
-  function runCollectionQuery(){
-    var method;
-
-
-    //Select method to use
-    if($('#button-query-get').prop('checked') ){
-      method = 'GET';
-    } else if($('#button-query-post').prop('checked')){
-      method = 'POST';
-    } else if($('#button-query-put').prop('checked')){
-      method = 'PUT';
-    } else if($('#button-query-delete').prop('checked')){
-      method = 'DELETE';
-    } else {
-      alertModal("Notice", "Please select a method.");
-      return;
-    }
-
-
-    //If jsonBody is empty fill it with empty brackets
-    if($('#query-source').val() === '') {
-      $("#query-source").val('{"name":"value"}');
-    }
-    getCollection(method);
-  }
-
-  window.Usergrid.console.getCollection = getCollection;
-
-  function getCollection(method, path){
-    //get the data to run the query
-    if(!path){
-      var path = $("#query-path").val();
-    }
-    if(method.toUpperCase() !== 'GET' && method.toUpperCase() !== 'DELETE'){
-      var data = $("#query-source").val();
-      try{
-        validateJson();
-        data = JSON.parse(data);
-      } catch (e) {
-        alertModal("Error", "There is a problem with your JSON.");
-        return false;
-      }
-    }
-
-    var params = {};
-    var ql = $("#query-ql").val();
-    params.ql = ql;
-    if(method.toUpperCase() === 'GET'){
-      var limit = $("#query-limit").val();
-      params.limit = limit;
-    }
-
-    queryPath = path;
-
-    queryObj = new Usergrid.Query(method, path, data, params, getCollectionCallback, function(response) { alertModal("Error", response) });
-    runAppQuery(queryObj);
-  }
-
-
-function getCollectionCallback(response) {
-  hidePagination('query-response');
-  $('#query-response-area').show();
-  if (response.action == 'post') {
-    pageSelectCollections();
-  }
-
-  var path = response.path || "";
-  path = "" + path.match(/[^?]*/);
-  var path_no_slashes = "";
-  try {
-    path_no_slashes = response.path.replace(/\//g,'');
-  } catch(e) {}
-
-  $("#collections-link-buttons li").removeClass('active');
-  $("#collections-link-button-"+path_no_slashes).addClass('active');
-
-  if(response.action === ("delete")){
-    getCollection("GET", path);
-    return;
-  }
-
-  var slashes = (queryPath.split("/").length -1)
-  if (response.entities.length == 1 && slashes > 1){
-    generateBackToCollectionButton(response.path);
-  } else {
-    $('#back-to-collection').hide();
-  }
-  if (!slashes && queryPath.length > 0) {
-    queryPath = "/" + queryPath;
-  }
-
-  $('#query-path').val(queryPath);
-
-  $("#collection-type-field").html(response.path);
-  var output = $('#query-response-table');
-  if (response.entities) {
-    if (response.entities.length < 1) {
-      output.replaceWith('<table id="query-response-table" class="table"><tbody><tr class="zebraRows users-row"><td>No entities found</td></tr></table>');
-    } else {
-      //Inform the user of a valid query
-      showQueryStatus('Done');
-
-      var entity_type = response.entities [0].type;
-
-      var table = '<table id="query-response-table" class="table"><tbody><tr class="zebraRows users-row">' +
-                  '<td class="checkboxo"><input type="checkbox" onclick="Usergrid.console.selectAllEntities(this);" /></td>';
-      if (entity_type === 'user') {
-        table += '<td class="gravatar50-td">&nbsp;</td>'+
-          '<td class="user-details bold-header">username</td>'+
-          '<td class="user-details bold-header">Display Name</td>';
-      } else if (entity_type === 'group') {
-        table += '<td class="user-details bold-header">Path</td>'+
-          '<td class="user-details bold-header">Title</td>';
-      } else if (entity_type === 'role') {
-        table += '<td class="user-details bold-header">Title</td>'+
-          '<td class="user-details bold-header">Rolename</td>';
-      } else {
-        table += '<td class="user-details bold-header">Name</td>';
-      }
-      table += '<td class="view-details">&nbsp;</td>' +
-               '</tr></tbody></table>';
-      output.replaceWith(table);
-      for (i = 0; i < response.entities.length; i++) {
-        var this_data = {}
-        this_data.r = response.entities [i];
-
-        //next get a table view of the object
-        this_data.content = buildContentArea(response.entities [i]);
-
-
-        //get a json representation of the object
-        this_data.json = JSON.stringify(response.entities [i], null, 2);
-
-        if (this_data.type === 'user') {
-          if (!this_data.r.picture) {
-            this_data.r.picture = window.location.protocol+ "//" + window.location.host + window.location.pathname + "images/user-photo.png"
-          } else {
-            this_data.r.picture = get_replacementGravatar(this_data.r.picture);
-          }
-        } else {
-          if (!this_data.r.name) {
-            this_data.r.name = '[No value set]';
-          }
-        }
-        $.tmpl('apigee.ui.collection.table_rows.html', this_data).appendTo('#query-response-table');
-      }
-
-    }
-  } else {
-    output.replaceWith('<table id="query-response-table" class="table"><tbody><tr class="zebraRows users-row"><td>No entities found</td></tr></table>');
-  }
-
-  showPagination('query-response');
-}
-
-
-function buildContentArea(obj2) {
-  function getProperties(obj, depth){
-    depth = 1;
-    var output = '';
-    for (var property in obj) {
-      if (depth ==1) { output += '<tr>';}
-      if (obj.hasOwnProperty(property)){
-        if (obj[property].constructor == Object || obj[property] instanceof Array) {
-
-          var prop = (obj[property] instanceof Array)?property:'';
-          //console.log('**Object -> '+property+': ');
-          output += '<td>'+prop+'</td><td style="padding: 0"><table><tr>';
-          output += getProperties(obj[property], depth);
-          output += '</td></tr></table>';
-        }
-        else {
-          //console.log(property + " " + obj[property]);
-          output += '<td>'+property+'</td><td>'+obj[property]+'</td>';
-        }
-      }
-      if (depth ==1) { output += '</tr>';}
-    }
-    return output;
-  }
-  var output = getProperties(obj2, '', 0);
-  return '<table>' + output + '</table>';
-}
-
-  function activateQueryRowJSONButton() {
-     $("#button-query-show-row-JSON").removeClass('disabled').addClass('active');
-     $("#button-query-show-row-content").removeClass('active').addClass('disabled');
-  }
-  window.Usergrid.console.activateQueryRowJSONButton = activateQueryRowJSONButton;
-
-  function activateQueryRowContentButton() {
-     $("#button-query-show-row-JSON").removeClass('active').addClass('disabled');
-     $("#button-query-show-row-content").removeClass('disabled').addClass('active');
-  }
-  window.Usergrid.console.activateQueryRowContentButton = activateQueryRowContentButton;
-
-  function showQueryCollectionView() {
-    $('#query-collection-info').show();
-    $('#query-detail-info').hide();
-    $('#query-ql-box').show();
-    $('#back-to-collection').hide();
-  }
-
-
-
-  function generateBackToCollectionButton(returnPath) {
-    var backButton = $('#back-to-collection');
-    if(backButton.attr('onclick')){
-      backButton.removeAttr('onclick');
-    }
-    backButton.attr('onclick',"Usergrid.console.getCollection('GET','" + returnPath+ "')");
-    $('#back-to-collection').show();
-  }
-
-  $.fn.loadEntityCollectionsListWidget = function() {
-    this.each(function() {
-      var entityType = $(this).dataset('entity-type');
-      var entityUIPlugin = "apigee_collections_" + entityType + "_list_item";
-      if (!$(this)[entityUIPlugin]) {
-        entityUIPlugin = "apigee_collections_entity_list_item";
-      }
-      $(this)[entityUIPlugin]();
-    });
-  };
-
-  $.fn.loadEntityCollectionsDetailWidget = function() {
-    this.each(function() {
-      var entityType = $(this).dataset('entity-type');
-      var entityUIPlugin = "apigee_collections_" + entityType + "_detail";
-      if (!$(this)[entityUIPlugin]) {
-        entityUIPlugin = "apigee_collections_entity_detail";
-      }
-      $(this)[entityUIPlugin]();
-    });
-    if (this.length === 1 ){
-      hideEntityCheckboxes();
-      hideEntitySelectButton();
-    }
-  };
-
-  function hideEntityCheckboxes(){
-    $(".listItem").hide();
-    $(".listItem").attr('checked', true);
-  }
-
-  function hideEntitySelectButton(){
-    $("#selectAllCollections").hide();
-  }
-  function showEntitySelectButton(){
-    $("#selectAllCollections").show();
-  }
-
-  function getQueryResultEntity(id) {
-    if (query_entities_by_id) {
-      return query_entities_by_id[id];
-    }
-    return null;
-  }
-  window.Usergrid.console.getQueryResultEntity = getQueryResultEntity;
-
-  function showQueryStatus(s, _type) {
-    StatusBar.showAlert(s, _type);
-  }
-
-  function expandQueryInput() {
-    $('#query-source').height(150);
-    $('#button-query-shrink').show();
-    $('#button-query-expand').hide();
-    return false;
-  }
-
-  function shrinkQueryInput() {
-    $('#query-source').height(60);
-    $('#button-query-shrink').hide();
-    $('#button-query-expand').show();
-    return false;
-  }
-
-  InitQueryPanel();
-  function InitQueryPanel(){
-    $('#query-source').focus(function(){
-        expandQueryInput();
-        prepareQueryInput(this);
-    });
-    $('#query-source').keyup(function(){activateJSONValidator('#button-query-validate', '#query-source');})
-    $('#button-query-shrink').click(shrinkQueryInput);
-    $('#button-query-expand').click(expandQueryInput);
-
-    $('#button-query').click(function(){runCollectionQuery(); return false;});
-
-  }
-
-  function prepareQueryInput(selector) {
-    var queryInput = $(selector);
-    if( queryInput.val() === ""){
-      queryInput.val("{\n\n}");
-    }
-  }
-
-  function activateJSONValidator(valButton, jsonArea) {
-    var validatorButton = $(valButton);
-    var textArea = $(jsonArea)
-    if(validatorButton.hasClass('disabled')){
-      validatorButton.removeClass('disabled');
-      validatorButton.click(function() {validateJson();return false;});
-    } else if(textArea.val() === "") {
-      validatorButton.addClass('disabled');
-      validatorButton.unbind('click');
-    }
-  }
-
-  function showMoreQueryOptions() {
-    $('.query-more-options').show();
-    $('.query-less-options').hide();
-    $('#query-ql').val("");
-    $('#query-source').val("{ }");
-  }
-
-  function hideMoreQueryOptions() {
-    $('.query-more-options').hide();
-    $('.query-less-options').show();
-    $('#query-ql').val("");
-    $('#query-source').val("");
-  }
-
-  function toggleMoreQueryOptions() {
-    $('.query-more-options').toggle();
-    $('.query-less-options').toggle();
-    $('#query-ql').val("");
-    $('#query-source').val("");
-  }
-
-  $('#button-query-more-options').click(function() {
-    toggleMoreQueryOptions();
-    return false;
-  });
-
-  $('#button-query-less-options').click(function() {
-    toggleMoreQueryOptions();
-    return false;
-  });
-
-  $('#query-source').keydown(function(e) {
-    var key = e.keyCode || e.which;
-
-    if ((key == 9 || key ===13)) {
-      e.preventDefault();
-      //Get cursor position
-      var start = this.selectionStart;
-      var end = this.selectionEnd;
-      var field = $(this);
-      var value = field.val();
-      //insert Text and indentation
-      field.val(value.substring(0, start) + '\r  ' + value.substring(end));
-      //return cursor to its position
-      this.selectionStart = this.selectionEnd = start + 1;
-    }
-  });
-
-  function validateJson() {
-    try {
-      var result = JSON.parse($('#query-source').val());
-      if (result) {
-        showQueryStatus('JSON is valid!');
-        $('#query-source').val(
-            JSON.stringify(result, null, "  "));
-        return result;
-      }
-    } catch(e) {
-      showQueryStatus(e.toString(), "error");
-    }
-    return false;
-  };
-
-  window.Usergrid.console.doChildClick = function(event) {
-    var path = new String($('#query-path').val());
-    if (!path.endsWith("/")) {
-      path += "/";
-    }
-    path += event.target.innerText;
-    $('#query-path').val(path);
-  };
-
-  var queryQl = $('#query-ql');
-  queryQl.typeahead({source:indexes});
-
-  function doBuildIndexMenu() {
-    queryQl.data('typeahead').source = indexes;
-  }
-
-  $('#delete-entity-link').click(deleteEntity);
-
-  function deleteEntity(e) {
-    e.preventDefault();
-    var items = $('#query-response-table input[class=listItem]:checked');
-    if(!items.length){
-      alertModal("Please, first select the entities you want to delete.");
-      return;
-    }
-    var itemsCount = items.size();
-    confirmDelete(function(){
-      items.each(function() {
-        var path = $(this).attr('name');
-        runAppQuery(new Usergrid.Query("DELETE", path, null, null,
-          function() {
-            itemsCount--;
-            if(itemsCount==0){
-              getCollection('GET');
-            }},
-          function() { alertModal("Unable to delete: " + path); }
-        ));
-      });
-    });
-  }
-
-  function requestIndexes(path){
-    var data = {};
-    runAppQuery(new Usergrid.Query("GET", path + "/indexes", null, null,
-      function(response) {
-        if(response && response.data) {
-          data = response;
-        }
-        buildIndexDropdown('query-collections-indexes-list', data);
-
-      }));
-  }
-
-  function buildIndexDropdown(menuId, indexes) {
-    var menu = $("#" + menuId);
-    menu.empty();
-    $.tmpl('apigee.ui.collections.query.indexes.html', indexes).appendTo(menu);
-  }
-
-  function appendToCollectionsQuery(message){
-    var queryTextArea = $("#query-ql");
-    queryTextArea.val(queryTextArea.val()+ " " + message );
-  }
-  window.Usergrid.console.appendToCollectionsQuery = appendToCollectionsQuery;
-
-  /*******************************************************************
-   *
-   * Organization Home
-   *
-   ******************************************************************/
-
-
-  function pageSelectHome() {
-
-    requestAdmins();
-    displayOrganizationName(Usergrid.ApiClient.getOrganizationName());
-    requestOrganizationCredentials();
-    requestAdminFeed();
-  }
-  window.Usergrid.console.pageSelectHome = pageSelectHome;
-
-
-  function displayApplications(response) {
-    applications = {};
-    applications_by_id = {};
-    var appMenu = $('.applications-menu');
-    var appList = $('table#organization-applications-table');
-    appMenu.empty();
-    appList.empty();
-
-    if (response.data) {
-      applications = response.data;
-      var count = 0;
-      var applicationNames = keys(applications).sort();
-      var data = [];
-      var appMenuTmpl = $('<li><a >${name}</a></li>');
-
-      for (var i in applicationNames) {
-        var name = applicationNames[i];
-        var uuid = applications[name];
-        data.push({uuid:uuid, name:name.split("/")[1]});
-        count++;
-        applications_by_id[uuid] = name.split("/")[1];
-      }
-
-      if (count) {
-        $.tmpl('apigee.ui.applications.table_rows.html', data).appendTo(appList);
-        appMenuTmpl.tmpl(data).appendTo(appMenu);
-        appMenuTmpl.tmpl(data)
-        appMenu.find("a").click(function selectApp(e) {
-          var link = $(this);
-          pageSelect(link.tmplItem().data.name);
-          Usergrid.Navigation.router.navigateTo('dashboard');
-        });
-
-        appList.find("a").click(function selectApp(e) {
-          e.preventDefault();
-          var link = $(this);
-          pageSelect(link.tmplItem().data.name);
-          Usergrid.Navigation.router.navigateTo('dashboard');
-        });
-        enableApplicationPanelButtons();
-      }
-      appMenu.append('<li class="divider"></li>');
-      appMenu.append('<li><a class="" data-toggle="modal" href="#dialog-form-new-application"> <strong>+</strong> New Application</a></li>');
-    }
-
-    if(appList.is(":empty")){
-      appList.html('<div class="alert user-panel-section">No applications created.</div>');
-      appMenu.html('<li>--No Apps--</li>');
-      forceNewApp();
-    }
-
-    var appName = Usergrid.ApiClient.getApplicationName();
-    if (!appName) {
-      selectFirstApp();
-    } else {
-      setNavApplicationText();
-    }
-  }
-
-  function requestApplications() {
-    var sectionApps = $('#organization-applications-table');
-    sectionApps.empty().html('<div class="alert alert-info user-panel-section">Loading...</div>');
-    runManagementQuery(new Usergrid.Query("GET","organizations/" + Usergrid.ApiClient.getOrganizationName() + "/applications", null, null,
-      displayApplications,
-      function() {
-        sectionApps.html('<div class="alert user-panel-section">Unable to retrieve application list.</div>');
-        }
-    ));
-  }
-  Usergrid.console.requestApplications = requestApplications;
-
-  function selectFirstApp() {
-    //get the currently specified app name
-    var appName = Usergrid.ApiClient.getApplicationName();
-    //and make sure we it is in one of the current orgs
-    var app = Usergrid.organizations.getItemByName(appName);
-    if(appName && app) {
-      Usergrid.ApiClient.setApplicationName(appName);
-      pageSelect(appName);
-    } else {
-      //we need to select an app, so get the current org name
-      var orgName = Usergrid.ApiClient.getOrganizationName();
-      //get a reference to the org object by using the name
-      var org = Usergrid.organizations.getItemByName(orgName);
-      //get a handle to the first app in the org
-      app = org.getFirstItem();
-      //store the new app in the client
-      Usergrid.ApiClient.setApplicationName(app.getName());
-      pageSelect(app.getName());
-    }
-    setNavApplicationText();
-  }
-
-  function displayAdmins(response) {
-    var sectionAdmins = $('#organization-admins-table');
-    sectionAdmins.empty();
-    if (response.data) {
-      var admins = response.data;
-      admins = admins.sort();
-      for (var i in admins) {
-        var admin = admins[i];
-        admin.gravatar = get_gravatar(admin.email, 20);
-        $.tmpl('apigee.ui.admins.table_rows.html', admin).appendTo(sectionAdmins);
-      }
-    }
-    if(sectionAdmins.is(':empty')){
-      sectionAdmins.html('<div class="alert user-panel-section">No organization administrators.</div>');
-    }
-  }
-
-  function requestAdmins() {
-    var sectionAdmins =$('#organization-admins-table');
-    sectionAdmins.empty().html('<div class="alert alert-info user-panel-section">Loading...</div>');
-    runManagementQuery(new Usergrid.Query("GET","organizations/" + Usergrid.ApiClient.getOrganizationName()  + "/users", null, null,
-      displayAdmins,
-      function() {sectionAdmins.html('<div class="alert user-panel-section">Unable to retrieve admin list</div>');
-    }));
-  }
-
-  $(document).on('click', '.toggleableSP', function() {
-    $(this).parent().find('.toggleableSP').toggle();
-    return false
-  });
-
-  function get_gravatar(email, size) {
-    var size = size || 50;
-    return 'https://secure.gravatar.com/avatar/' + MD5(email) + '?s=' + size + encodeURI("&d=http://apigee.com/usergrid/images/user_profile.png");
-  }
-
-  function get_replacementGravatar(picture) {
-    picture = picture.replace(/^http:\/\/www.gravatar/i, 'https://secure.gravatar');
-    //note: changing this to use the image on apigee.com - since the gravatar default won't work on any non-public domains such as localhost
-    //this_data.picture = this_data.picture + encodeURI("?d="+window.location.protocol+"//" + window.location.host + window.location.pathname + "images/user_profile.png");
-    picture = picture + encodeURI("?d=http://apigee.com/usergrid/images/user_profile.png");
-    return picture;
-  }
-
-  function displayAdminFeed(response) {
-
-    var sectionActivities = $('#organization-feed-table');
-    sectionActivities.empty();
-
-    if (response.entities && (response.entities.length > 0)) {
-      var activities = response.entities;
-      for (var i in activities) {
-        var activity = activities[i];
-
-        // Next part is a hack. The API should return the email and title cleanly.
-        var title_tmp = $("<span/>", {html: activity.title});
-        activity.actor.email  = title_tmp.find('a').attr('mailto');
-        title_tmp.find('a').remove();
-        activity.title = title_tmp.text();
-        // hack ends here
-
-        activity.actor.gravatar = get_gravatar(activity.actor.email, 20);
-        $.tmpl('apigee.ui.feed.table_rows.html', activity).appendTo(sectionActivities);
-      }
-    }
-
-    if (sectionActivities.is(":empty")) {
-      sectionActivities.html('<div class="alert user-panel-section">No activities.</div>');
-    }
-  }
-
-  function requestAdminFeed() {
-    var section =$('#organization-activities');
-    section.empty().html('<div class="alert alert-info">Loading...</div>');
-    runManagementQuery(new Usergrid.Query("GET","orgs/" + Usergrid.ApiClient.getOrganizationName()  + "/feed", null, null, displayAdminFeed,
-      function() { section.html('<div class="alert">Unable to retrieve feed.</div>'); }));
-  }
-  window.Usergrid.console.requestAdminFeed = requestAdminFeed;
-
-  var organization_keys = { };
-
-  function requestOrganizationCredentials() {
-    $('#organization-panel-key').html('<div class="alert alert-info marginless">Loading...</div>');
-    $('#organization-panel-secret').html('<div class="alert alert-info marginless">Loading...</div>');
-    runManagementQuery(new Usergrid.Query("GET",'organizations/'+ Usergrid.ApiClient.getOrganizationName()  + "/credentials", null, null,
-      function(response) {
-        $('#organization-panel-key').html(response.credentials.client_id);
-        $('#organization-panel-secret').html(response.credentials.client_secret);
-        organization_keys = {client_id : response.credentials.client_id, client_secret : response.credentials.client_secret};
-      },
-      function() {
-        $('#organization-panel-key').html('<div class="alert marginless">Unable to load...</div>');
-        $('#organization-panel-secret').html('<div class="alert marginless">Unable to load...</div>');
-      }));
-  }
-
-  function newOrganizationCredentials() {
-    $('#organization-panel-key').html('<div class="alert alert-info marginless">Loading...</div>');
-    $('#organization-panel-secret').html('<div class="alert alert-info marginless">Loading...</div>');
-    runManagementQuery(new Usergrid.Query("POST",'organizations/' + Usergrid.ApiClient.getOrganizationName()   + "/credentials",null, null,
-      function(response) {
-        $('#organization-panel-key').html(response.credentials.client_id);
-        $('#organization-panel-secret').html(response.credentials.client_secret);
-        organization_keys = {client_id : response.credentials.client_id, client_secret : response.credentials.client_secret};
-      },
-      function() {
-        $('#organization-panel-key').html('<div class="alert marginless">Unable to load...</div>');
-        $('#organization-panel-secret').html('<div class="alert marginless">Unable to load...</div>');
-      }
-    ));
-  }
-  window.Usergrid.console.newOrganizationCredentials = newOrganizationCredentials;
-
-  function updateTips(t) {
-    tips.text(t).addClass('ui-state-highlight');
-    setTimeout(function() {
-      tips.removeClass('ui-state-highlight', 1500);
-    },
-    500);
-  }
-
-  function checkLength(o, n, min, max) {
-    if (o.val().length > max || o.val().length < min) {
-      o.addClass('ui-state-error');
-      updateTips("Length of " + n + " must be between " + min
-          + " and " + max + ".");
-      return false;
-    } else {
-      return true;
-    }
-  }
-
-  function checkRegexp(o, regexp, n) {
-    if (! (regexp.test(o.val()))) {
-      o.addClass('ui-state-error');
-      updateTips(n);
-      return false;
-    } else {
-      return true;
-    }
-  }
-
-  function checkTrue(o, t, n) {
-    if (!t) {
-      o.addClass('ui-state-error');
-      updateTips(n);
-    }
-    return t;
-  }
-
-  var tips = $('.validateTips');
-
-  /*******************************************************************
-   *
-   * Modals
-   *
-   ******************************************************************/
-
-  function alertModal(header,message) {
-    $('#alertModal h4').text(header);
-    $('#alertModal p').text(message);
-    $('#alertModal').modal('show');
-  }
-
-  //use like: alertBanner("Oh no!", "Say it isn't so!!");
-  //or like: alertBanner("Oh no!", "Say it isn't so!!", 5000); //will auto-close in 5 seconds
-  function alertBanner(header, message, timeout) {
-    $('#alert-error-header').html(header);
-    $('#alert-error-message').html(message);
-    $('#alert-error-message-container').show();
-    if (timeout) {
-      var alertTimer = setInterval(function(){
-          $('#alert-error-message-container').hide();
-          window.clearInterval(alertTimer);
-        },timeout);
-    }
-  }
-
-
-  function hideModal(id){
-    $(id).hide();
-  }
-
-  function confirmAction(header, message, callback){
-    var form = $('#confirmAction');
-
-    form.find('h4').text(header);
-    form.find('p').text(message);
-    form.unbind('submit');
-
-    form.submit(function(){
-      form.modal("hide");
-      callback();
-
-      return false;
-    });
-
-    form.modal('show');
-  }
-
-  function resetModal(){
-    this.reset();
-    var form = $(this);
-    formClearErrors(form);
-  }
-
-  function focusModal(){
-    $(this).find('input:first').focus();
-  }
-
-  function submitModal(e){
-    e.preventDefault();
-  }
-
-  $('form.modal').on('hidden',resetModal).on('shown',focusModal).submit(submitModal);
-  $('#dialog-form-new-application').submit(submitApplication);
-  $('#dialog-form-force-new-application').submit(submitApplication);
-  $('#dialog-form-new-admin').submit(submitNewAdmin);
-  $('#dialog-form-new-organization').submit(submitNewOrg);
-  $('#dialog-form-new-user').submit(submitNewUser);
-  $('#dialog-form-new-role').submit(submitNewRole);
-  $('#dialog-form-new-collection').submit(submitNewCollection);
-  $('#dialog-form-new-group').submit(submitNewGroup);
-  $('#dialog-form-add-group-to-user').submit(submitAddGroupToUser);
-  $('#dialog-form-add-user-to-group').submit(submitAddUserToGroup);
-  $('#dialog-form-add-user-to-role').submit(submitAddUserToRole);
-  $('#dialog-form-add-role-to-user').submit(function() {
-    submitAddRoleToUser(current_roleName, current_roleTitle)});
-  $('#dialog-form-add-group-to-role').submit(function() {
-    submitAddGroupToRole(current_roleName, current_roleTitle)});
-  $('#dialog-form-add-role-to-group').submit(submitAddRoleToGroup);
-  $('#dialog-form-follow-user').submit(submitFollowUser);
-
-  function checkLength2(input, min, max) {
-    if (input.val().length > max || input.val().length < min) {
-      var tip = "Length must be between " + min + " and " + max + ".";
-      validationError(input,tip);
-      return false;
-    }
-
-    return true;
-  }
-
-  function checkRegexp2(input, regexp, tip) {
-    if (! (regexp.test(input.val()))) {
-      validationError(input,tip);
-      return false;
-    }
-    return true;
-  }
-
-  function checkTrue2(input, exp, tip) {
-    if (!exp) {
-      validationError(input,tip);
-      return false;
-    }
-
-    return true;
-  }
-
-  function confirmDelete(callback){
-    var form = $('#confirmDialog');
-    if (form.submit) {
-      form.unbind('submit');
-    }
-
-    form.submit(function(e){
-      e.preventDefault();
-      form.modal('hide');
-    }).submit(callback);
-
-    form.modal('show');
-  }
-
-  function validationError(input, tip){
-    input.focus();
-    input.parent().parent().addClass("error");
-    input.parent().parent().find(".help-block").text(tip).addClass("alert-error").addClass("alert").show();
-  }
-
-  $.fn.serializeObject = function() {
-    var o = {};
-    var a = this.serializeArray();
-
-    $.each(a, function() {
-      if (o[this.name]) {
-        if (!o[this.name].push) {
-          o[this.name] = [o[this.name]];
-        }
-        o[this.name].push(this.value || '');
-      } else {
-        o[this.name] = this.value || '';
-      }
-    });
-
-    return o;
-  };
-
-  function formClearErrors(form){
-    form.find('.ui-state-error').removeClass('ui-state-error');
-    form.find('.error').removeClass('error');
-    form.find('.help-block').empty().hide();
-  }
-
-  function submitApplication() {
-    var form = $(this);
-    formClearErrors(form);
-
-    var new_application_name = $(this).find('.new-application-name');
-
-    var bValid = checkLength2(new_application_name, 4, 80)
-      && checkRegexp2(new_application_name, usernameRegex, usernameAllowedCharsMessage);
-
-    if (bValid) {
-      runManagementQuery(new Usergrid.Query("POST","organizations/" + Usergrid.ApiClient.getOrganizationName()  + "/applications", form.serializeObject(), null,
-        function(response) {
-          for (var appName in response.data) { break; }
-          var appTitle = appName.split("/")[1];
-          var currentOrg = Usergrid.ApiClient.getOrganizationName();
-          Usergrid.organizations.getItemByName(currentOrg).addItem(new Usergrid.Application(appTitle, response.data[appName]));
-          pageSelect(appTitle);
-          requestApplications();
-        },
-        function() {
-          closeErrorMessage = function() {
-            $('#home-messages').hide();
-          };
-          var closebutton = '<a  onclick="closeErrorMessage();" class="close">&times;</a>'
-          $('#home-messages').text("Unable to create application: ").prepend(closebutton).addClass('alert-error').show();
-      }));
-      $(this).modal('hide');
-    }
-  }
-
-  function submitNewAdmin() {
-    var form = $(this);
-    formClearErrors(form);
-
-    var new_admin_email = $('#new-admin-email');
-    var bValid = checkLength2(new_admin_email, 6, 80)
-      && checkRegexp2(new_admin_email,emailRegex, emailAllowedCharsMessage);
-    if (bValid) {
-      var data = form.serializeObject();
-      runManagementQuery(new Usergrid.Query("POST","organizations/" + Usergrid.ApiClient.getOrganizationName() + "/users", data, null,
-        requestAdmins,
-        function () { alertModal("Error", "Unable to create admin"); }
-      ));
-      $(this).modal('hide');
-    }
-  }
-
-  function addOrganizationToList(orgName) {
-    runManagementQuery(new Usergrid.Query("GET","orgs/" + orgName, null, null,
-      function(response) {
-        var orgName = response.organization.name;
-        var orgUUID = response.organization.uuid;
-        organization = new Usergrid.Organization(orgName, orgUUID);
-        var apps = response.organization.applications;
-        for(app in apps) {
-          var appName = app.split("/")[1];
-          //grab the id
-          var appUUID = response.organization.applications[app];
-          //store in the new Application object
-          application = new Usergrid.Application(appName, appUUID);
-          organization.addItem(application);
-        }
-        //add organization to organizations list
-        Usergrid.organizations.addItem(organization);
-        requestAccountSettings();
-        setupOrganizationsMenu();
-      },
-      function() { alertModal("Error", "Unable to get organization" + orgName);
-      }
-    ));
-  }
-
-  function submitNewOrg() {
-    var form = $(this);
-    formClearErrors(form);
-
-    var new_organization_name = $('#new-organization-name');
-    var new_organization_name_val = $('#new-organization-name').val();
-    var bValid = checkLength2(new_organization_name, 4, 80)
-      && checkRegexp2(new_organization_name, organizationNameRegex, organizationNameAllowedCharsMessage);
-
-    if (bValid) {
-      var data = form.serializeObject();
-      runManagementQuery(new Usergrid.Query("POST","users/" + Usergrid.userSession.getUserUUID() + "/organizations", data, null,
-        function() {
-          addOrganizationToList(new_organization_name_val);
-        },
-        function() { alertModal("Error", "Unable to create organization"); }
-      ));
-      $(this).modal('hide');
-    }
-  }
- //TODO: the organization, and required fields for this method, are hidden. There is no quick way to check variable names and order
- /*
-  * Needed fields:
-  * username:
-  * name: FULL NAME
-  * email:
-  * password:
-  */
-  function submitNewUser() {
-    var form = $(this);
-    formClearErrors(form);
-
-    var email = $('#new-user-email');
-    var username = $('#new-user-username');
-    var fullname = $('#new-user-fullname');
-    var password = $('#new-user-password');
-    var validate_password = $('#new-user-validate-password');
-
-    var bValid =
-      //Fullname can is not required.
-      checkLength2(fullname , 0, 80)
-      && ( fullname.val() === "" || checkRegexp2(fullname, nameRegex, nameAllowedCharsMessage) )
-      //Username IS required
-      && checkRegexp2(username, usernameRegex, usernameAllowedCharsMessage)
-      //Email is NOT required
-      && ( checkLength2(email, 6, 80) )
-      && ( email.val() === "" || checkRegexp2(email,emailRegex, emailAllowedCharsMessage) )
-      && ( checkLength2(password ,0 ,0) || checkLength2(password, 1, 64) )
-      && ( password.val() === "" || checkRegexp2(password,passwordRegex, passwordAllowedCharsMessage) )
-      && ( checkTrue2(password, (password.val() === validate_password.val()), passwordMismatchMessage));
-
-    if (bValid) {
-      var data = {"email":email.val(), "username":username.val(),"name":fullname.val(), "password":password.val()}
-      runAppQuery(new Usergrid.Query("POST", 'users', data, null,
-        function() {
-          getUsers();
-          closeErrorMessage = function() {
-            $('#users-messages').hide();
-          };
-          var closebutton = '<a  onclick="closeErrorMessage();" class="close">&times;</a>';
-          $('#users-messages')
-            .text("User created successfully.")
-            .prepend(closebutton)
-            .removeClass()
-            .addClass('alert alert-warning')
-            .show();
-        },
-        function() {
-          closeErrorMessage = function() {
-            $('#users-messages').hide();
-          };
-          var closebutton = '<a  onclick="closeErrorMessage();" class="close">&times;</a>'
-          $('#users-messages')
-          .text("Unable to create user")
-          .prepend(closebutton)
-          .removeClass()
-          .addClass('alert alert-error')
-          .show();
-        }
-      ));
-
-      $(this).modal('hide');
-    }
-  }
-
-  function submitNewRole() {
-    var form = $(this);
-    formClearErrors(form);
-
-    var new_role_name = $('#new-role-name');
-    var new_role_title = $('#new-role-title');
-
-    var bValid = checkLength2(new_role_name, 1, 80)
-      && checkRegexp2(new_role_name, roleRegex, roleAllowedCharsMessage)
-      && checkLength2(new_role_title, 1, 80)
-      && checkRegexp2(new_role_title,titleRegex, titleAllowedCharsMessage);
-
-    if (bValid) {
-      var data = form.serializeObject();
-      runAppQuery(new Usergrid.Query("POST", "role", data, null,
-        function() {
-          getRoles();
-          closeErrorMessage = function() {
-            $('#roles-messages').hide();
-          };
-          var closebutton = '<a  onclick="closeErrorMessage();" class="close">&times;</a>'
-          $('#roles-messages')
-            .text("Role created successfully.")
-            .prepend(closebutton)
-            .removeClass()
-            .addClass('alert alert-warning')
-            .show();
-          },
-          function() {
-            closeErrorMessage = function() {
-            $('#roles-messages').hide();
-          };
-          var closebutton = '<a  onclick="closeErrorMessage();" class="close">&times;</a>'
-          $('#roles-messages')
-            .text("Unable to create user")
-            .prepend(closebutton)
-            .removeClass()
-            .addClass('alert alert-error')
-            .show();
-        }
-      ));
-
-      $(this).modal('hide');
-    }
-  }
-
-  function submitNewCollection() {
-    var form = $(this);
-    formClearErrors(form);
-
-    var new_collection_name = $('#new-collection-name');
-
-    var bValid = checkLength2(new_collection_name, 4, 80)
-      && checkRegexp2(new_collection_name, alphaNumRegex, alphaNumAllowedCharsMessage);
-
-    if (bValid) {
-      var data = form.serializeObject();
-      var collections = {};
-      collections[data.name] = {};
-      var metadata = {
-        metadata: {
-          collections: collections
-        }
-      }
-      runAppQuery(new Usergrid.Query("PUT", "", metadata, null,
-        function() {
-          getCollections();
-          closeErrorMessage = function() {
-            $('#collections-messages').hide();
-          };
-          var closebutton = '<a  onclick="closeErrorMessage();" class="close">&times;</a>'
-          $('#collections-messages')
-            .text("Collection created successfully.")
-            .prepend(closebutton)
-            .removeClass()
-            .addClass('alert alert-warning')
-            .show();
-        },
-        function() {
-          closeErrorMessage = function() {
-            $('#collections-messages').hide();
-          };
-          var closebutton = '<a  onclick="closeErrorMessage();" class="close">&times;</a>'
-          $('#collections-messages')
-            .text("Unable to create user")
-            .prepend(closebutton)
-            .removeClass()
-            .addClass('alert alert-error')
-            .show();
-        }
-      ));
-
-      $(this).modal('hide');
-    }
-  }
-
-  function submitNewGroup() {
-    var form = $(this);
-    formClearErrors(form);
-
-    var new_group_title = $('#new-group-title');
-    var new_group_path = $('#new-group-path');
-
-    var bValid = checkLength2(new_group_title, 1, 80)
-      && checkRegexp2(new_group_title, nameRegex, nameAllowedCharsMessage)
-      && checkLength2(new_group_path, 1, 80)
-      && checkRegexp2(new_group_path, pathRegex, pathAllowedCharsMessage);
-
-    if (bValid) {
-      var data = form.serializeObject();
-      runAppQuery(new Usergrid.Query("POST", "groups", data, null,
-        function() {
-          getGroups();
-          closeErrorMessage = function() {
-          $('#groups-messages').hide();
-        };
-        var closebutton = '<a  onclick="closeErrorMessage();" class="close">&times;</a>'
-        $('#groups-messages')
-          .text("Group created successfully.")
-          .prepend(closebutton)
-          .removeClass()
-          .addClass('alert alert-warning')
-          .show();
-        },
-        function() {
-          closeErrorMessage = function() {
-            $('#groups-messages').hide();
-          };
-          var closebutton = '<a  onclick="closeErrorMessage();" class="close">&times;</a>'
-          $('#groups-messages').text("Unable to create group").prepend(closebutton).addClass('alert-error').show();
-        }
-      ));
-
-      $(this).modal('hide');
-    }
-  }
-
-  function submitAddGroupToUser() {
-    var form = $(this);
-    formClearErrors(form);
-    var add_group_groupname = $('#search-group-name-input');
-    var bValid = checkLength2(add_group_groupname, 1, 80)
-      && checkRegexp2(add_group_groupname, usernameRegex, usernameAllowedCharsMessage);
-
-    if (bValid) {
-      userId = $('#search-group-userid').val();
-      groupId = $('#search-group-name-input').val();
-
-      runAppQuery(new Usergrid.Query("POST", "/groups/" + groupId + "/users/" + userId, null, null,
-        function() { requestUser(userId); },
-        function() { alertModal("Error", "Unable to add group to user"); }
-      ));
-
-      $(this).modal('hide');
-    }
-  }
-
-  function submitAddUserToGroup() {
-    var form = $(this);
-    formClearErrors(form);
-    var add_user_username = $('#search-user-name-input');
-    var bValid = checkLength2(add_user_username, 1, 80)
-      && checkRegexp2(add_user_username, usernameRegex, usernameAllowedCharsMessage);
-
-    if (bValid) {
-      userId = $('#search-user-name-input').val();
-      groupId = $('#search-user-groupid').val();
-      runAppQuery(new Usergrid.Query("POST", "/groups/" + groupId + "/users/" + userId, null, null,
-        function() { requestGroup(groupId); },
-        function() { alertModal("Error", "Unable to add user to group"); }
-      ));
-      $(this).modal('hide');
-    }
-  }
-
-  function submitFollowUser(){
-    var form = $(this);
-    formClearErrors(form);
-    var username = $('#search-follow-username-input');
-    var bValid = checkLength2(username, 1, 80) && checkRegexp2(username, usernameRegex, usernameAllowedCharsMessage);
-    if (bValid) {
-      var followingUserId = $('#search-follow-username').val();
-      var followedUserId = $('#search-follow-username-input').val();
-      runAppQuery(new Usergrid.Query("POST", "/users/" + followingUserId + "/following/user/" + followedUserId, null, null,
-        function() { pageSelectUserGraph(followingUserId)},
-        function() {alertModal("Error", "Unable to follow User");}
-      ));
-      $(this).modal('hide');
-    }
-  }
-
-  function submitAddRoleToUser(roleName, roleTitle) {
-    var form = $(this);
-    formClearErrors(form);
-    var roleIdField = $('#search-roles-user-name-input');
-    var bValid = checkLength2(roleIdField, 1, 80) && checkRegexp2(roleIdField, usernameRegex, usernameAllowedCharsMessage)
-    var username = $('#search-roles-user-name-input').val();
-    if (bValid) {
-      runAppQuery(new Usergrid.Query("POST", "/roles/" + roleName + "/users/" + username, null, null,
-        function() { pageSelectRoleUsers(roleName, roleTitle); },
-        function() { alertModal("Error", "Unable to add user to role"); }
-      ));
-      $('#dialog-form-add-role-to-user').modal('hide');
-    }
-  }
-
-  function submitAddUserToRole() {
-    var form = $(this);
-    formClearErrors(form);
-
-    var roleIdField = $('#search-role-name-input');
-    var bValid = checkLength2(roleIdField, 1, 80)
-      && checkRegexp2(roleIdField, roleRegex, roleAllowedCharsMessage)
-
-    var username = $('#role-form-username').val();
-    var roleId = $('#search-role-name-input').val();
-    // role may have a preceding or trailing slash, remove it
-    roleId = roleId.replace('/','');
-    if (bValid) {
-      runAppQuery(new Usergrid.Query("POST", "/roles/" + roleId + "/users/" + username, null, null,
-        function() { pageSelectUserPermissions(username); },
-        function() { alertModal("Error", "Unable to add user to role"); }
-      ));
-
-      $(this).modal('hide');
-    }
-  }
-
-  function deleteUsersFromRoles(username) {
-    var items = $('#users-permissions-response-table input[class^=listItem]:checked');
-    if(!items.length){
-      alertModal("Error", "Please, first select the roles you want to delete for this user.");
-      return;
-    }
-
-    confirmDelete(function(){
-        items.each(function() {
-          var roleName = $(this).attr("value");
-          runAppQuery(new Usergrid.Query("DELETE", "/roles/" + roleName + "/users/" + username, null, null,
-            function() { pageSelectUserPermissions (username); },
-            function() { alertModal("Error", "Unable to remove user from role"); }
-          ));
-      });
-    });
-  }
-  window.Usergrid.console.deleteUsersFromRoles = deleteUsersFromRoles;
-
-  function deleteRoleFromUser(roleName, roleTitle) {
-    var items = $('#role-users input[class^=listItem]:checked');
-    if(!items.length){
-      alertModal("Error", "Please, first select the users you want to delete from this role.");
-        return;
-    }
-
-    confirmDelete(function(){
-        items.each(function() {
-          var username = $(this).attr("value");
-          runAppQuery(new Usergrid.Query("DELETE", "/roles/" + roleName + "/users/" + username, null, null,
-            function() { pageSelectRoleUsers (roleName, roleTitle); },
-            function() { alertModal("Error", "Unable to remove user from role"); }
-          ));
-      });
-    });
-  }
-  window.Usergrid.console.deleteRoleFromUser = deleteRoleFromUser;
-
-  function removeUserFromGroup(userId) {
-    var items = $('#user-panel-memberships input[class^=listItem]:checked');
-    if(!items.length){
-      alertModal("Error", "Please, first select the groups you want to delete for this user.")
-        return;
-    }
-    confirmDelete(function(){
-      items.each(function() {
-        var groupId = $(this).attr("value");
-        runAppQuery(new Usergrid.Query("DELETE", "/groups/" + groupId + "/users/" + userId, null, null,
-          function() { pageSelectUserGroups (userId); },
-          function() { alertModal("Error", "Unable to remove user from group"); }
-        ));
-      });
-    });
-  }
-  window.Usergrid.console.removeUserFromGroup = removeUserFromGroup;
-
-  function removeGroupFromUser(groupId) {
-    var items = $('#group-panel-memberships input[class^=listItem]:checked');
-    if (!items.length) {
-      alertModal("Error", "Please, first select the users you want to from this group.");
-      return;
-    }
-
-    confirmDelete(function(){
-      items.each(function() {
-        var userId = $(this).attr("value");
-        runAppQuery(new Usergrid.Query("DELETE", "/groups/" + groupId + "/users/" + userId, null, null,
-          function() { pageSelectGroupMemberships (groupId); },
-          function() { alertModal("Error", "Unable to remove user from group"); }
-        ));
-      });
-    });
-  }
-  window.Usergrid.console.removeGroupFromUser = removeGroupFromUser;
-
-  function deleteRolesFromGroup(roleId, rolename) {
-    var items = $('#group-panel-permissions input[class^=listItem]:checked');
-    if(!items.length){
-      alertModal("Error", "Please, first select the roles you want to delete from this group.")
-        return;
-    }
-
-    confirmDelete(function(){
-      items.each(function() {
-        var roleId = $(this).attr("value");
-        var groupname = $('#role-form-groupname').val();
-        runAppQuery(new Usergrid.Query("DELETE", "/roles/" + roleId + "/groups/" + groupname, null, null,
-          function() { pageSelectGroupPermissions(groupname); },
-          function() { alertModal("Error", "Unable to remove role from group"); }
-        ));
-      });
-    });
-  }
-  window.Usergrid.console.deleteRolesFromGroup = deleteRolesFromGroup;
-
-  function submitAddRoleToGroup() {
-    var form = $(this);
-    formClearErrors(form);
-
-    var roleIdField = $('#search-groups-role-name-input');
-    var bValid = checkLength2(roleIdField, 1, 80)
-      && checkRegexp2(roleIdField, roleRegex, roleAllowedCharsMessage)
-
-    var groupname = $('#role-form-groupname').val();
-    var roleId = $('#search-groups-role-name-input').val();
-    // role may have a preceding or trailing slash, remove it
-    roleId = roleId.replace('/','');
-
-    if (bValid) {
-      runAppQuery(new Usergrid.Query("POST", "/groups/" + groupname + "/roles/" + roleId, null, null,
-        function() { pageSelectGroupPermissions(groupname); },
-        function() { alertModal("Error", "Unable to add user to role"); }
-      ));
-    $(this).modal('hide');
-    }
-  }
-
-  /*******************************************************************
-   *
-   * Generic page select
-   *
-   ******************************************************************/
-  function pageSelect(name) {
-    if (name) {
-      //the following 3 lines are just a safety check, we could just store the name
-      //get the current org name
-      var currentOrg = Usergrid.ApiClient.getOrganizationName();
-      //get a reference to the current org object by using the name
-      var org = Usergrid.organizations.getItemByName(currentOrg);
-      //get a reference to the specified app by name
-      var app = org.getItemByName(name);
-      //store the name
-      Usergrid.ApiClient.setApplicationName(app.getName());
-    }
-    setNavApplicationText();
-    getCollections();
-    query_history = [];
-  }
-  window.Usergrid.console.pageSelect = pageSelect;
-
-
-  /*******************************************************************
-   *
-   * Application
-   *
-   ******************************************************************/
-
-  function pageSelectApplication() {
-    pageSelect();
-    requestApplicationUsage();
-  }
-  window.Usergrid.console.pageSelectApplication = pageSelectApplication;
-
-  function updateApplicationDashboard(){
-    var data = new google.visualization.DataTable();
-    data.addColumn('string', 'Entity');
-    data.addColumn('number', 'Count');
-    var rows = [];
-    var t = '<table class="table table-bordered" id="application-panel-entity-counts">';
-    var collectionNames = keys(applicationData.Collections).sort();
-
-    var entity_count = 0;
-    for (var i in collectionNames) {
-      var collectionName = collectionNames[i];
-      var collection = applicationData.Collections[collectionName];
-      var row = [collectionName, {v: collection.count}];
-      rows.push(row);
-      t += '<tr class="zebraRows"><td>' + collection.count + '</td><td>' + collectionName + '</td></tr>';
-      entity_count += collection.count;
-    }
-    t += '<tr id="application-panel-entity-total"><th>' + entity_count + '</th><th>entities total</th></tr>';
-    t += '</table>';
-    data.addRows(rows);
-
-    new google.visualization.PieChart(
-      document.getElementById('application-panel-entity-graph')).
-      draw(data, {
-        height: 200,
-        is3D: true,
-        backgroundColor: backgroundGraphColor
-      }
-    );
-
-    $('#dashboard-panel #application-panel-text').html(t);
-  }
-
-  function requestApplicationUsage() {
-    $('#application-entities-timeline').html("");
-    $('#application-cpu-time').html("");
-    $('#application-data-uploaded').html("");
-    $('#application-data-downloaded').html("");
-    var params = {};
-    params.start_time = Math.floor(new Date().getTime() / 1209600000) * 1209600000;
-    params.end_time = start_timestamp + 1209600000;
-    params.resolution = "day";
-    params.counter = ["application.entities", "application.request.download", "application.request.time", "application.request.upload"];
-    params.pad = true;
-
-    runAppQuery(new Usergrid.Query("GET", "counters", null, params,
-      function(response) {
-        var usage_counters = response.counters;
-
-        if (!usage_counters) {
-          $('#application-entities-timeline').html("");
-          $('#application-cpu-time').html("");
-          $('#application-data-uploaded').html("");
-          $('#application-data-downloaded').html("");
-          return;
-        }
-
-        var graph_width = 350;
-        var graph_height = 100;
-        var data = new google.visualization.DataTable();
-        data.addColumn('date', 'Time');
-        data.addColumn('number', 'Entities');
-        data.addRows(15);
-
-        for (var i in usage_counters[0].values) {
-        data.setCell(parseInt(i), 0, new Date(usage_counters[0].values[i].timestamp));
-        data.setCell(parseInt(i), 1, usage_counters[0].values[i].value);
-        }
-
-        new google.visualization.LineChart(document.getElementById('application-entities-timeline')).draw(data, {
-          title: "Entities",
-          titlePosition: "in",
-          titleTextStyle: {color: 'black', fontName: 'Arial', fontSize: 18},
-          width: graph_width,
-          height: graph_height,
-          backgroundColor: backgroundGraphColor,
-          legend: "none",
-          hAxis: {textStyle: {color:"transparent", fontSize: 1}},
-          vAxis: {textStyle: {color:"transparent", fontSize: 1}}
-        });
-
-        data = new google.visualization.DataTable();
-        data.addColumn('date', 'Time');
-        data.addColumn('number', 'CPU');
-        data.addRows(15);
-
-        for (var i in usage_counters[2].values) {
-          data.setCell(parseInt(i), 0, new Date(usage_counters[2].values[i].timestamp));
-          data.setCell(parseInt(i), 1, usage_counters[2].values[i].value);
-        }
-
-        new google.visualization.LineChart(document.getElementById('application-cpu-time')).draw(data, {
-          title: "CPU Time Used",
-          titlePosition: "in",
-          titleTextStyle: {color: 'black', fontName: 'Arial', fontSize: 18},
-          width: graph_width,
-          height: graph_height,
-          backgroundColor: backgroundGraphColor,
-          legend: "none",
-          hAxis: {textStyle: {color:"transparent", fontSize: 1}},
-          vAxis: {textStyle: {color:"transparent", fontSize: 1}}
-        });
-
-        data = new google.visualization.DataTable();
-        data.addColumn('date', 'Time');
-        data.addColumn('number', 'Uploaded');
-        data.addRows(15);
-
-        for (var i in usage_counters[3].values) {
-          data.setCell(parseInt(i), 0, new Date(usage_counters[3].values[i].timestamp));
-          data.setCell(parseInt(i), 1, usage_counters[3].values[i].value);
-        }
-
-        new google.visualization.LineChart(document.getElementById('application-data-uploaded')).draw(data, {
-          title: "Bytes Uploaded",
-          titlePosition: "in",
-          titleTextStyle: {color: 'black', fontName: 'Arial', fontSize: 18},
-          width: graph_width,
-          height: graph_height,
-          backgroundColor: backgroundGraphColor,
-          legend: "none",
-          hAxis: {textStyle: {color:"transparent", fontSize: 1}},
-          vAxis: {textStyle: {color:"transparent", fontSize: 1}}
-        });
-
-        data = new google.visualization.DataTable();
-        data.addColumn('date', 'Time');
-        data.addColumn('number', 'Downloaded');
-        data.addRows(15);
-
-        for (var i in usage_counters[1].values) {
-          data.setCell(parseInt(i), 0, new Date(usage_counters[1].values[i].timestamp));
-          data.setCell(parseInt(i), 1, usage_counters[1].values[i].value);
-        }
-
-        new google.visualization.LineChart(document.getElementById('application-data-downloaded')).draw(data, {
-          title: "Bytes Downloaded",
-          titlePosition: "in",
-          titleTextStyle: {color: 'black', fontName: 'Arial', fontSize: 18},
-          width: graph_width,
-          height: graph_height,
-          backgroundColor: backgroundGraphColor,
-          legend: "none",
-          hAxis: {textStyle: {color:"transparent", fontSize: 1}},
-          vAxis: {textStyle: {color:"transparent", fontSize: 1}}
-        });
-      },
-      function() {
-        $('#application-entities-timeline').html("");
-        $('#application-cpu-time').html("");
-        $('#application-data-uploaded').html("");
-        $('#application-data-downloaded').html("");
-      }
-    ));
-  }
-  window.Usergrid.console.requestApplicationUsage = requestApplicationUsage;
-
-  /*******************************************************************
-   *
-   * Query Object Setup
-   *
-   ******************************************************************/
-  var queryObj = {};
-
-  function hidePagination(section) {
-    $('#'+section+'-pagination').hide();
-    $('#'+section+'-next').hide();
-    $('#'+section+'-previous').hide();
-  }
-
-  function showPagination(section){
-    if (queryObj.hasNext()) {
-      $('#'+section+'-pagination').show();
-      $('#'+section+'-next').show();
-    }
-
-    if (queryObj.hasPrevious()) {
-      $('#'+section+'-pagination').show();
-      $('#'+section+'-previous').show();
-    }
-  }
-
-  function hideCurlCommand(section) {
-    $('#'+section+'-curl-container').hide();
-    $('#'+section+'-curl-token').hide();
-  }
-
-  function showCurlCommand(section, curl, token) {
-    var data = {
-      curlData: curl,
-      sectionName: section
-    };
-    var sectionId = $('#'+section+'-curl-container');
-    sectionId.html("");
-    $.tmpl('apigee.ui.curl.detail.html', data).appendTo(sectionId);
-     sectionId.show();
-    if (!token) {
-      $('#'+section+'-curl-token').hide();
-    }
-  }
-
-  function copyCurlCommand() {
-    $('#copypath', 'body')
-    .find('a')
-        .livequery('click', function() {
-            $(this)
-                .blur();
-            var nodetext = $('#'+section+'-curl').html();
-            $('#copypath input').focus();
-            $('#copypath input').select();
-            return false;
-        });
-
-  }
-
-  function bindPagingEvents(section) {
-    $(document).off('click', '#'+section+'-previous', getPrevious);
-    $(document).off('click', '#'+section+'-next', getNext);
-    //bind the click events
-    $(document).on('click', '#'+section+'-previous', getPrevious);
-    $(document).on('click', '#'+section+'-next', getNext);
-  }
-
-  function getPrevious() { //called by a click event - for paging
-    queryObj.getPrevious();
-    runAppQuery();
-  }
-
-  function getNext() { //called by a click event - for paging
-    queryObj.getNext();
-    runAppQuery();
-  }
-
-  function runAppQuery(_queryObj) {
-    var obj = _queryObj || queryObj;
-    Usergrid.ApiClient.runAppQuery(obj);
-    return false;
-  }
-
-  function runManagementQuery(_queryObj) {
-    var obj = _queryObj || queryObj;
-    Usergrid.ApiClient.runManagementQuery(obj);
-    return false;
-  }
-
-  /*******************************************************************
-   *
-   * Users
-   *
-   ******************************************************************/
-  var userLetter = "*";
-  var userSortBy = "username";
-
-  function pageSelectUsers() {
-    //Hide old Alert Messages
-    hideModal('#users-messages');
-    //make a new query object
-    queryObj = new Usergrid.Query(null);
-    //bind events for previous and next buttons
-    bindPagingEvents('users');
-    //reset paging so we start at the first page
-    queryObj.resetPaging();
-    //the method to get the compile and call the query
-    getUsers();
-    //ui stuff
-    selectFirstTabButton('#users-panel-tab-bar');
-    showPanelList('users');
-    $('#search-user-username').val(''); //reset the search box
-  }
-  window.Usergrid.console.pageSelectUsers = pageSelectUsers;
-
-  function getUsers(search, searchType) {
-    //clear out the table before we start
-    hideCurlCommand('users');
-    var output = $('#users-table');
-    output.empty();
-    var query = {"ql" : "order by " + userSortBy}; //default to built in search
-    if (typeof search == 'string') {
-      if (search.length > 0) {
-        if (searchType == 'name') {
-          query = {"ql" : searchType + " contains '" + search + "*'"};
-        } else {
-          query = {"ql" : searchType + "='" + search + "*'"};
-        }
-      }
-    } else if (userLetter != "*") {
-      query = {"ql" : searchType + "='" + userLetter + "*'"};
-    }
-
-    queryObj = new Usergrid.Query("GET", "users", null, query, getUsersCallback, function() { alertModal("Error", "Unable to retrieve users."); });
-    runAppQuery(queryObj);
-  }
-
-  function getUsersCallback(response) {
-    hidePagination('users');
-    var output = $('#users-table');
-    if (response.entities.length < 1) {
-      output.replaceWith('<div id="users-table" class="panel-section-message">No users found.</div>');
-    } else {
-      output.replaceWith('<table id="users-table" class="table"><tbody><tr class="zebraRows users-row"><td class="checkboxo"><input type="checkbox" onclick="Usergrid.console.selectAllEntities(this);" /></td><td class="gravatar50-td">&nbsp;</td><td class="user-details bold-header">username</td><td class="user-details bold-header">Display Name</td><td class="view-details">&nbsp;</td></tr></tbody></table>');
-      for (i = 0; i < response.entities.length; i++) {
-        var this_data = response.entities[i];
-        if (!this_data.picture) {
-          this_data.picture = window.location.protocol+ "//" + window.location.host + window.location.pathname + "images/user-photo.png"
-        } else {
-          this_data.picture = get_replacementGravatar(this_data.picture);
-        }
-        $.tmpl('apigee.ui.users.table_rows.html', this_data).appendTo('#users-table');
-      }
-    }
-    showPagination('users');
-    showCurlCommand('users', queryObj.getCurl(), queryObj.getToken());
-  }
-
-  function showUsersForSearch(search){
-    selectFirstTabButton('#users-panel-tab-bar');
-    $('#users-panel-search').hide();
-    selectTabButton('#button-users-list');
-    $('#users-panel-list').show();
-    userLetter = search;
-    getUsers();
-  }
-  Usergrid.console.showUsersForSearch = showUsersForSearch;
-
-  function searchUsers(){
-    var search = $('#search-user-username').val();
-    var searchType = ($('#search-user-type').val())?$('#search-user-type').val():userSortBy;
-    //make sure the input is valid:
-    if (searchType == 'name') {
-      searchType = 'name';
-    } else if (searchType == 'username') {searchType = 'username';}
-    getUsers(search, searchType);
-  }
-  Usergrid.console.searchUsers = searchUsers;
-
-  function selectAllEntities(checkbox){
-    if (checkbox.checked) {
-      $('[class=listItem]').attr('checked', true);
-    } else {
-      $('[class=listItem]').attr('checked', false);
-    }
-  }
-  window.Usergrid.console.selectAllEntities = selectAllEntities;
-
-  $('#delete-users-link').click(deleteUsers);
-  function deleteUsers(e) {
-    e.preventDefault();
-
-    var items = $('#users-table input[class^=listItem]:checked');
-    if(!items.length){
-      alertModal("Error", "Please, first select the users you want to delete.");
-      return;
-    }
-
-    confirmDelete(function(){
-      items.each(function() {
-        var userId = $(this).attr("value");
-        runAppQuery(new Usergrid.Query("DELETE", 'users/' + userId, null, null,
-          getUsers,
-          function() { alertModal("Error", "Unable to delete user - " + userId) }
-        ));
-      });
-    });
-  }
-
-  /*******************************************************************
-   *
-   * User
-   *
-   ******************************************************************/
-
-  function pageOpenUserProfile(userName) {
-    hideModal('.messages');
-    Pages.SelectPanel('user');
-    requestUser(userName);
-    selectPillButton('#button-user-profile');
-    showPanelContent('#user-panel', '#user-panel-profile');
-  }
-  window.Usergrid.console.pageOpenUserProfile = pageOpenUserProfile;
-
-  function pageOpenUserActivities(userId) {
-    Pages.SelectPanel('user');
-    requestUser(userId);
-    selectPillButton('#button-user-activities');
-    showPanelContent('#user-panel', '#user-panel-activities');
-  }
-  window.Usergrid.console.pageOpenUserActivities = pageOpenUserActivities;
-
-  function pageSelectUserPermissions(userId) {
-    Pages.SelectPanel('user');
-    requestUser(userId);
-    selectPillButton('#button-user-permissions');
-    showPanelContent('#user-panel', '#user-panel-permissions');
-  }
-  window.Usergrid.console.pageSelectUserPermissions = pageSelectUserPermissions;
-
-  function pageSelectUserGroups(userId) {
-    Pages.SelectPanel('user');
-    requestUser(userId);
-    selectPillButton('#button-user-memberships');
-    showPanelContent('#user-panel', '#user-panel-memberships');
-  }
-
-  function pageSelectUserGraph(userId) {
-    Pages.SelectPanel('user');
-    requestUser(userId);
-    selectPillButton('#button-user-graph');
-    showPanelContent('#user-panel', '#user-panel-graph');
-  }
-
-  window.Usergrid.console.pageSelectUserGroups = pageSelectUserGroups;
-
-  function saveUserProfile(uuid){
-    var payload = Usergrid.console.ui.jsonSchemaToPayload(Usergrid.console.ui.collections.vcard_schema);
-    runAppQuery(new Usergrid.Query("PUT", "users/"+uuid, payload, null,
-      completeSave,
-      function() { alertModal("Error", "Unable to update User"); }
-    ));
-  }
-  window.Usergrid.console.saveUserProfile = saveUserProfile;
-
-  function completeSave(){
-    closeMessage = function() {
-      $('.messages').hide();
-    };
-    var closebutton = '<a  onclick="closeMessage();" class="close">&times;</a>'
-    $('.messages').text("Information Saved.").prepend(closebutton).show();
-  }
-
-  function redrawUserProfile(data, curl){
-    redrawFormPanel('user-panel-profile', 'apigee.ui.panels.user.profile.html', data);
-    showCurlCommand('user-panel-profile', curl);
-  };
-
-  function redrawUserMemberships(data, curl){
-    redrawPanel('user-panel-memberships', 'apigee.ui.panels.user.memberships.html', data);
-    showCurlCommand('user-panel-memberships', curl);
-    updateGroupsAutocomplete();
-  };
-
-  function redrawUserActivities(data, curl){
-    redrawPanel('user-panel-activities', 'apigee.ui.panels.user.activities.html', data);
-    showCurlCommand('user-panel-activities', curl);
-  };
-
-  function redrawUserGraph(data, curlFollowing, curlFollowers){
-    redrawPanel('user-panel-graph', 'apigee.ui.panels.user.graph.html', data);
-    showCurlCommand('user-panel-following', curlFollowing);
-    showCurlCommand('user-panel-followers', curlFollowers);
-    updateFollowUserAutocomplete();
-  };
-
-  function redrawUserPermissions(data, curlRoles, curlPermissions){
-    redrawPanel('user-panel-permissions', 'apigee.ui.panels.user.permissions.html', data);
-    showCurlCommand('user-panel-roles', curlRoles);
-    showCurlCommand('user-panel-permissions', curlPermissions);
-    updateRolesAutocomplete();
-    updateQueryAutocompleteCollectionsUsers();
-  };
-
-  function redrawPanel(panelDiv, panelTemplate, data){
-    $("#"+panelDiv).html("");
-    $.tmpl(panelTemplate, data).appendTo($("#"+panelDiv));
-  };
-
-  function redrawGroupForm(panelDiv, panelTemplate, data){
-    $("#"+panelDiv).html("");
-    var details = $.tmpl(panelTemplate, data);
-    var formDiv = details.find('.query-result-form');
-    $(formDiv).buildForm(Usergrid.console.ui.jsonSchemaToDForm(Usergrid.console.ui.collections.group_schema, data.entity));
-    details.appendTo($("#"+panelDiv));
-    details.find('.button').button();
-  }
-
-  function redrawFormPanel(panelDiv, panelTemplate, data){
-    $("#"+panelDiv).html("");
-    var details = $.tmpl(panelTemplate, data);
-    var formDiv = details.find('.query-result-form');
-    $(formDiv).buildForm(Usergrid.console.ui.jsonSchemaToDForm(Usergrid.console.ui.collections.vcard_schema, data.entity));
-    details.appendTo($("#"+panelDiv));
-  };
-
-  function saveUserData(){
-    Usergrid.console.ui.jsonSchemaToPayload(schema, obj);
-  }
-
-  var user_data = null;
-
-  function handleUserResponse(response) {
-    if (response.entities && (response.entities.length > 0)) {
-      var entity = response.entities[0];
-      var path = response.path || "";
-      path = "" + path.match(/[^?]*/);
-      var username = entity.username;
-      var name = entity.uuid + " : " + entity.type;
-
-      if (entity.username) {
-        name = entity.username;
-      }
-
-      if (entity.name) {
-        name = name + " : " + entity.name;
-      }
-
-      var collections = $.extend({ }, (entity.metadata || { }).collections, (entity.metadata || { }).connections);
-      if ($.isEmptyObject(collections)){
-        collections = null;
-      }
-
-      var entity_contents = $.extend( false, { }, entity);
-      delete entity_contents['metadata'];
-
-      var metadata = entity.metadata;
-      if ($.isEmptyObject(metadata)){
-        metadata = null;
-      }
-
-      var entity_path = (entity.metadata || {}).path;
-      if ($.isEmptyObject(entity_path)) {
-        entity_path = path + "/" + entity.uuid;
-      }
-
-      var picture = window.location.protocol+ "//" + window.location.host + window.location.pathname + "images/user_profile.png";
-      if (entity.picture) {
-        entity.picture = entity.picture.replace(/^http:\/\/www.gravatar/i, 'https://secure.gravatar');
-        //note: changing this to use the image on apigee.com - since the gravatar default won't work on any non-public domains such as localhost
-        //this_data.picture = this_data.picture + encodeURI("?d="+window.location.protocol+"//" + window.location.host + window.location.pathname + "images/user_profile.png");
-        picture = entity.picture + encodeURI("?d=http://apigee.com/usergrid/images/user_profile.png");
-      }
-
-    var data = {
-      entity: entity_contents,
-      picture: picture,
-      name: name,
-      username: username,
-      path: entity_path,
-      collections: collections,
-      metadata: metadata,
-      uri: (entity.metadata || { }).uri,
-      followingCurl: "",
-      followersCurl: "",
-      rolesCurl: "",
-      permissionsCurl: ""
-    }
-
-    redrawUserProfile(data, this.getCurl());
-
-    //TODO: This block and the subsequent blocks could all be methods of their own
-      runAppQuery(new Usergrid.Query("GET", 'users/' + entity.username + '/groups', null, null,
-        function(response) {
-          if (data && response.entities && (response.entities.length > 0)) {
-            data.memberships = response.entities;
-          }
-          redrawUserMemberships(data, this.getCurl());
-        },
-        function() { alertModal("Error", "Unable to retrieve user's groups."); }
-      ));
-
-      runAppQuery(new Usergrid.Query("GET", 'users/' + entity.username + '/activities', null, null,
-        function(response) {
-          if (data && response.entities && (response.entities.length > 0)) {
-            data.activities = response.entities;
-            data.curl = this.getCurl();
-            $('span[id^=activities-date-field]').each( function() {
-              var created = dateToString(parseInt($(this).html()))
-              $(this).html(created);
-            });
-          }
-          redrawUserActivities(data, this.getCurl());
-        },
-        function() { alertModal("Error", "Unable to retrieve user's activities.");}
-      ));
-
-      runAppQuery(new Usergrid.Query("GET", 'users/' + entity.username + '/roles', null, null,
-        function(response) {
-          if (data && response.entities && (response.entities.length > 0)) {
-            data.roles = response.entities;
-          } else {
-            data.roles = null;
-          }
-          data.rolesCurl = this.getCurl();
-          //Run Permissions query after roles query has been handled
-        runAppQuery(new Usergrid.Query("GET", 'users/' + entity.username + '/permissions', null, null,
-          function(response) {
-            var permissions = {};
-            if (data && response.data && (response.data.length > 0)) {
-
-              if (response.data) {
-                var perms = response.data;
-                var count = 0;
-
-                for (var i in perms) {
-                  count++;
-                  var perm = perms[i];
-                  var parts = perm.split(':');
-                  var ops_part = "";
-                  var path_part = parts[0];
-
-                  if (parts.length > 1) {
-                    ops_part = parts[0];
-                    path_part = parts[1];
-                  }
-
-                  ops_part.replace("*", "get,post,put,delete")
-                    var ops = ops_part.split(',');
-                  permissions[perm] = {ops : {}, path : path_part, perm : perm};
-
-                  for (var j in ops) {
-                    permissions[perm].ops[ops[j]] = true;
-                  }
-                }
-
-                if (count == 0) {
-                  permissions = null;
-                }
-                data.permissions = permissions;
-              }
-            }
-            data.permissionsCurl = this.getCurl();
-            redrawUserPermissions(data, data.rolesCurl, data.permissionsCurl);
-          },
-          function() { alertModal("Error", "Unable to retrieve user's permissions.");}
-        ));
-        },
-        function() { alertModal("Error", "Unable to retrieve user's roles.");}
-      ));
-
-        runAppQuery(new Usergrid.Query("GET", 'users/' + entity.username + '/following', null, null,
-          function(response) {
-            data.followingCurl = this.getCurl();
-            if (data && response.entities && (response.entities.length > 0)) {
-              data.following = response.entities;
-            }
-            //Requests /Followers after the /following response has been handled.
-            runAppQuery(new Usergrid.Query("GET", 'users/' + entity.username + '/followers', null, null,
-            function(response) {
-
-              if (data && response.entities && (response.entities.length > 0)) {
-                data.followers = response.entities;
-              }
-              data.followersCurl = this.getCurl();
-              redrawUserGraph(data, data.followingCurl, data.followersCurl);
-            },
-            function() { alertModal("Error", "Unable to retrieve user's followers.");
-            }
-          ));
-        },
-        function() { alertModal("Error", "Unable to retrieve user's following.");}
-        ));
-    }
-
-  };
-
-  function requestUser(userId) {
-    $('#user-profile-area').html('<div class="alert alert-info">Loading...</div>');
-    runAppQuery(new Usergrid.Query("GET", 'users/'+userId, null, null, handleUserResponse,
-      function() { alertModal("Error", "Unable to retrieve user's profile."); }
-    ));
-  }
-
-  /*******************************************************************
-   *
-   * Groups
-   *
-   ******************************************************************/
-  var groupLetter = "*";
-  var groupSortBy = "path";
-  function pageSelectGroups() {
-    //Hide old messages
-    hideModal('#groups-messages');
-    //make a new query object
-    queryObj = new Usergrid.Query(null);
-    //bind events for previous and next buttons
-    bindPagingEvents('groups', getPreviousGroups, getNextGroups);
-    //reset paging so we start at the first page
-    queryObj.resetPaging();
-    //the method to get the compile and call the query
-    getGroups();
-    //ui stuff
-    selectFirstTabButton('#groups-panel-tab-bar');
-    showPanelList('groups');
-    $('#search-user-groupname').val('');
-  }
-  window.Usergrid.console.pageSelectGroups = pageSelectGroups;
-
-  function getGroups(search, searchType) {
-    //clear out the table before we start
-    var output = $('#groups-table');
-    output.empty();
-  hideCurlCommand('groups');
-    var query = {"ql" : "order by " + groupSortBy};
-    if (typeof search == 'string') {
-      if (search.length > 0) {
-        if (searchType == 'title') {
-          query = {"ql" : searchType + " contains '" + search + "*'"};
-        } else {
-          query = {"ql" : searchType + "='" + search + "*'"};
-        }
-      }
-    } else if (groupLetter != "*") {
-      query = {"ql" : searchType + "='" + groupLetter + "*'"};
-    }
-
-    queryObj = new Usergrid.Query("GET", "groups", null, query, getGroupsCallback, function() { alertModal("Error", "Unable to retrieve groups."); });
-    runAppQuery(queryObj);
-
-    return false;
-  }
-
-  function getPreviousGroups() {
-    queryObj.getPrevious();
-    getGroups();
-  }
-
-  function getNextGroups() {
-    queryObj.getNext();
-    getGroups();
-  }
-
-  function getGroupsCallback(response) {
-    hidePagination('groups');
-
-    var output = $('#groups-table');
-    if (response.entities.length < 1) {
-      output.replaceWith('<div id="groups-table" class="panel-section-message">No groups found.</div>');
-    } else {
-      output.replaceWith('<table id="groups-table" class="table"><tbody><tr class="zebraRows users-row"><td class="checkboxo"><input type="checkbox" onclick="Usergrid.console.selectAllEntities(this);" /></td><td class="user-details bold-header">Path</td><td class="user-details bold-header">Title</td><td class="view-details">&nbsp;</td></tr></tbody></table>');
-      for (i = 0; i < response.entities.length; i++) {
-        var this_data = response.entities[i];
-        $.tmpl('apigee.ui.groups.table_rows.html', this_data).appendTo('#groups-table');
-      }
-    }
-
-    showPagination('groups');
-    showCurlCommand('groups', queryObj.getCurl(), queryObj.getToken());
-  }
-
-  function showGroupsForSearch(search){
-    selectFirstTabButton('#groups-panel-tab-bar');
-    $('#groups-panel-search').hide();
-    selectTabButton('#button-groups-list');
-    $('#groups-panel-list').show();
-    groupLetter = search;
-    getGroups();
-  }
-  Usergrid.console.showUsersForSearch = showUsersForSearch;
-
-  function searchGroups(){
-    var search = $('#search-user-groupname').val();
-    var searchType = ($('#search-group-type').val())?$('#search-group-type').val():groupSortBy;
-
-    if (searchType == 'title') {
-      searchType = 'title';
-    } else if (searchType == 'path') {
-      searchType = 'path';
-    }
-
-    getGroups(search, searchType);
-  }
-  U

<TRUNCATED>

[33/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/adapters/prototype-adapter.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/adapters/prototype-adapter.js b/portal/js/libs/Highcharts-2.3.5/js/adapters/prototype-adapter.js
new file mode 100644
index 0000000..6441d2a
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/adapters/prototype-adapter.js
@@ -0,0 +1,16 @@
+/*
+ Highcharts JS v2.3.5 (2012-12-19)
+ Prototype adapter
+
+ @author Michael Nelson, Torstein Hønsi.
+
+ Feel free to use and modify this script.
+ Highcharts license: www.highcharts.com/license.
+*/
+var HighchartsAdapter=function(){var g=typeof Effect!=="undefined";return{init:function(c){if(g)Effect.HighchartsTransition=Class.create(Effect.Base,{initialize:function(a,b,d,e){var f;this.element=a;this.key=b;f=a.attr?a.attr(b):$(a).getStyle(b);if(b==="d")this.paths=c.init(a,a.d,d),this.toD=d,f=0,d=1;this.start(Object.extend(e||{},{from:f,to:d,attribute:b}))},setup:function(){HighchartsAdapter._extend(this.element);if(!this.element._highchart_animation)this.element._highchart_animation={};this.element._highchart_animation[this.key]=
+this},update:function(a){var b=this.paths,d=this.element;b&&(a=c.step(b[0],b[1],a,this.toD));d.attr?d.attr(this.options.attribute,a):(b={},b[this.options.attribute]=a,$(d).setStyle(b))},finish:function(){delete this.element._highchart_animation[this.key]}})},adapterRun:function(c,a){return parseInt($(c).getStyle(a),10)},getScript:function(c,a){var b=$$("head")[0];b&&b.appendChild((new Element("script",{type:"text/javascript",src:c})).observe("load",a))},addNS:function(c){var a=/^(?:click|mouse(?:down|up|over|move|out))$/;
+return/^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/.test(c)||a.test(c)?c:"h:"+c},addEvent:function(c,a,b){c.addEventListener||c.attachEvent?Event.observe($(c),HighchartsAdapter.addNS(a),b):(HighchartsAdapter._extend(c),c._highcharts_observe(a,b))},animate:function(c,a,b){var d,b=b||{};b.delay=0;b.duration=(b.duration||500)/1E3;b.afterFinish=b.complete;if(g)for(d in a)new Effect.HighchartsTransition($(c),d,a[d],b);else{if(c.attr)for(d in a)c.attr(d,a[d]);b.complete&&
+b.complete()}c.attr||$(c).setStyle(a)},stop:function(c){var a;if(c._highcharts_extended&&c._highchart_animation)for(a in c._highchart_animation)c._highchart_animation[a].cancel()},each:function(c,a){$A(c).each(a)},inArray:function(c,a){return a.indexOf(c)},offset:function(c){return $(c).cumulativeOffset()},fireEvent:function(c,a,b,d){c.fire?c.fire(HighchartsAdapter.addNS(a),b):c._highcharts_extended&&(b=b||{},c._highcharts_fire(a,b));b&&b.defaultPrevented&&(d=null);d&&d(b)},removeEvent:function(c,
+a,b){$(c).stopObserving&&(a&&(a=HighchartsAdapter.addNS(a)),$(c).stopObserving(a,b));window===c?Event.stopObserving(c,a,b):(HighchartsAdapter._extend(c),c._highcharts_stop_observing(a,b))},washMouseEvent:function(c){return c},grep:function(c,a){return c.findAll(a)},map:function(c,a){return c.map(a)},merge:function(){function c(a,b){var d,e;for(e in b)d=b[e],a[e]=d&&typeof d==="object"&&d.constructor!==Array&&typeof d.nodeType!=="number"?c(a[e]||{},d):b[e];return a}return function(){var a=arguments,
+b,d={};for(b=0;b<a.length;b++)d=c(d,a[b]);return d}.apply(this,arguments)},_extend:function(c){c._highcharts_extended||Object.extend(c,{_highchart_events:{},_highchart_animation:null,_highcharts_extended:!0,_highcharts_observe:function(a,b){this._highchart_events[a]=[this._highchart_events[a],b].compact().flatten()},_highcharts_stop_observing:function(a,b){a?b?this._highchart_events[a]=[this._highchart_events[a]].compact().flatten().without(b):delete this._highchart_events[a]:this._highchart_events=
+{}},_highcharts_fire:function(a,b){(this._highchart_events[a]||[]).each(function(a){if(!b.stopped)b.preventDefault=function(){b.defaultPrevented=!0},a.bind(this)(b)===!1&&b.preventDefault()}.bind(this))}})}}}();

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/adapters/prototype-adapter.src.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/adapters/prototype-adapter.src.js b/portal/js/libs/Highcharts-2.3.5/js/adapters/prototype-adapter.src.js
new file mode 100644
index 0000000..1f698c5
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/adapters/prototype-adapter.src.js
@@ -0,0 +1,385 @@
+/**
+ * @license Highcharts JS v2.3.5 (2012-12-19)
+ * Prototype adapter
+ *
+ * @author Michael Nelson, Torstein Hønsi.
+ *
+ * Feel free to use and modify this script.
+ * Highcharts license: www.highcharts.com/license.
+ */
+
+// JSLint options:
+/*global Effect, Class, Event, Element, $, $$, $A */
+
+// Adapter interface between prototype and the Highcharts charting library
+var HighchartsAdapter = (function () {
+
+var hasEffect = typeof Effect !== 'undefined';
+
+return {
+
+	/**
+	 * Initialize the adapter. This is run once as Highcharts is first run.
+	 * @param {Object} pathAnim The helper object to do animations across adapters.
+	 */
+	init: function (pathAnim) {
+		if (hasEffect) {
+			/**
+			 * Animation for Highcharts SVG element wrappers only
+			 * @param {Object} element
+			 * @param {Object} attribute
+			 * @param {Object} to
+			 * @param {Object} options
+			 */
+			Effect.HighchartsTransition = Class.create(Effect.Base, {
+				initialize: function (element, attr, to, options) {
+					var from,
+						opts;
+
+					this.element = element;
+					this.key = attr;
+					from = element.attr ? element.attr(attr) : $(element).getStyle(attr);
+
+					// special treatment for paths
+					if (attr === 'd') {
+						this.paths = pathAnim.init(
+							element,
+							element.d,
+							to
+						);
+						this.toD = to;
+
+
+						// fake values in order to read relative position as a float in update
+						from = 0;
+						to = 1;
+					}
+
+					opts = Object.extend((options || {}), {
+						from: from,
+						to: to,
+						attribute: attr
+					});
+					this.start(opts);
+				},
+				setup: function () {
+					HighchartsAdapter._extend(this.element);
+					// If this is the first animation on this object, create the _highcharts_animation helper that
+					// contain pointers to the animation objects.
+					if (!this.element._highchart_animation) {
+						this.element._highchart_animation = {};
+					}
+
+					// Store a reference to this animation instance.
+					this.element._highchart_animation[this.key] = this;
+				},
+				update: function (position) {
+					var paths = this.paths,
+						element = this.element,
+						obj;
+
+					if (paths) {
+						position = pathAnim.step(paths[0], paths[1], position, this.toD);
+					}
+
+					if (element.attr) { // SVGElement
+						element.attr(this.options.attribute, position);
+					
+					} else { // HTML, #409
+						obj = {};
+						obj[this.options.attribute] = position;
+						$(element).setStyle(obj);
+					}
+					
+				},
+				finish: function () {
+					// Delete the property that holds this animation now that it is finished.
+					// Both canceled animations and complete ones gets a 'finish' call.
+					delete this.element._highchart_animation[this.key];
+				}
+			});
+		}
+	},
+	
+	/**
+	 * Run a general method on the framework, following jQuery syntax
+	 * @param {Object} el The HTML element
+	 * @param {String} method Which method to run on the wrapped element
+	 */
+	adapterRun: function (el, method) {
+		
+		// This currently works for getting inner width and height. If adding
+		// more methods later, we need a conditional implementation for each.
+		return parseInt($(el).getStyle(method), 10);
+		
+	},
+
+	/**
+	 * Downloads a script and executes a callback when done.
+	 * @param {String} scriptLocation
+	 * @param {Function} callback
+	 */
+	getScript: function (scriptLocation, callback) {
+		var head = $$('head')[0]; // Returns an array, so pick the first element.
+		if (head) {
+			// Append a new 'script' element, set its type and src attributes, add a 'load' handler that calls the callback
+			head.appendChild(new Element('script', { type: 'text/javascript', src: scriptLocation}).observe('load', callback));
+		}
+	},
+
+	/**
+	 * Custom events in prototype needs to be namespaced. This method adds a namespace 'h:' in front of
+	 * events that are not recognized as native.
+	 */
+	addNS: function (eventName) {
+		var HTMLEvents = /^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/,
+			MouseEvents = /^(?:click|mouse(?:down|up|over|move|out))$/;
+		return (HTMLEvents.test(eventName) || MouseEvents.test(eventName)) ?
+			eventName :
+			'h:' + eventName;
+	},
+
+	// el needs an event to be attached. el is not necessarily a dom element
+	addEvent: function (el, event, fn) {
+		if (el.addEventListener || el.attachEvent) {
+			Event.observe($(el), HighchartsAdapter.addNS(event), fn);
+
+		} else {
+			HighchartsAdapter._extend(el);
+			el._highcharts_observe(event, fn);
+		}
+	},
+
+	// motion makes things pretty. use it if effects is loaded, if not... still get to the end result.
+	animate: function (el, params, options) {
+		var key,
+			fx;
+
+		// default options
+		options = options || {};
+		options.delay = 0;
+		options.duration = (options.duration || 500) / 1000;
+		options.afterFinish = options.complete;
+
+		// animate wrappers and DOM elements
+		if (hasEffect) {
+			for (key in params) {
+				// The fx variable is seemingly thrown away here, but the Effect.setup will add itself to the _highcharts_animation object
+				// on the element itself so its not really lost.
+				fx = new Effect.HighchartsTransition($(el), key, params[key], options);
+			}
+		} else {
+			if (el.attr) { // #409 without effects
+				for (key in params) {
+					el.attr(key, params[key]);
+				}
+			}
+			if (options.complete) {
+				options.complete();
+			}
+		}
+
+		if (!el.attr) { // HTML element, #409
+			$(el).setStyle(params);
+		}
+	},
+
+	// this only occurs in higcharts 2.0+
+	stop: function (el) {
+		var key;
+		if (el._highcharts_extended && el._highchart_animation) {
+			for (key in el._highchart_animation) {
+				// Cancel the animation
+				// The 'finish' function in the Effect object will remove the reference
+				el._highchart_animation[key].cancel();
+			}
+		}
+	},
+
+	// um.. each
+	each: function (arr, fn) {
+		$A(arr).each(fn);
+	},
+	
+	inArray: function (item, arr) {
+		return arr.indexOf(item);
+	},
+
+	/**
+	 * Get the cumulative offset relative to the top left of the page. This method, unlike its
+	 * jQuery and MooTools counterpart, still suffers from issue #208 regarding the position
+	 * of a chart within a fixed container.
+	 */
+	offset: function (el) {
+		return $(el).cumulativeOffset();
+	},
+
+	// fire an event based on an event name (event) and an object (el).
+	// again, el may not be a dom element
+	fireEvent: function (el, event, eventArguments, defaultFunction) {
+		if (el.fire) {
+			el.fire(HighchartsAdapter.addNS(event), eventArguments);
+		} else if (el._highcharts_extended) {
+			eventArguments = eventArguments || {};
+			el._highcharts_fire(event, eventArguments);
+		}
+
+		if (eventArguments && eventArguments.defaultPrevented) {
+			defaultFunction = null;
+		}
+
+		if (defaultFunction) {
+			defaultFunction(eventArguments);
+		}
+	},
+
+	removeEvent: function (el, event, handler) {
+		if ($(el).stopObserving) {
+			if (event) {
+				event = HighchartsAdapter.addNS(event);
+			}
+			$(el).stopObserving(event, handler);
+		} if (window === el) {
+			Event.stopObserving(el, event, handler);
+		} else {
+			HighchartsAdapter._extend(el);
+			el._highcharts_stop_observing(event, handler);
+		}
+	},
+	
+	washMouseEvent: function (e) {
+		return e;
+	},
+
+	// um, grep
+	grep: function (arr, fn) {
+		return arr.findAll(fn);
+	},
+
+	// um, map
+	map: function (arr, fn) {
+		return arr.map(fn);
+	},
+
+	// deep merge. merge({a : 'a', b : {b1 : 'b1', b2 : 'b2'}}, {b : {b2 : 'b2_prime'}, c : 'c'}) => {a : 'a', b : {b1 : 'b1', b2 : 'b2_prime'}, c : 'c'}
+	/*merge: function(){
+		function doCopy(copy, original) {
+			var value,
+				key,
+				undef,
+				nil,
+				same,
+				obj,
+				arr,
+				node;
+
+			for (key in original) {
+				value = original[key];
+				undef = typeof(value) === 'undefined';
+				nil = value === null;
+				same = original === copy[key];
+
+				if (undef || nil || same) {
+					continue;
+				}
+
+				obj = typeof(value) === 'object';
+				arr = value && obj && value.constructor == Array;
+				node = !!value.nodeType;
+
+				if (obj && !arr && !node) {
+					copy[key] = doCopy(typeof copy[key] == 'object' ? copy[key] : {}, value);
+				}
+				else {
+					copy[key] = original[key];
+				}
+			}
+			return copy;
+		}
+
+		var args = arguments, retVal = {};
+
+		for (var i = 0; i < args.length; i++) {
+			retVal = doCopy(retVal, args[i]);
+		}
+
+		return retVal;
+	},*/
+	merge: function () { // the built-in prototype merge function doesn't do deep copy
+		function doCopy(copy, original) {
+			var value, key;
+
+			for (key in original) {
+				value = original[key];
+				if (value && typeof value === 'object' && value.constructor !== Array &&
+						typeof value.nodeType !== 'number') {
+					copy[key] = doCopy(copy[key] || {}, value); // copy
+
+				} else {
+					copy[key] = original[key];
+				}
+			}
+			return copy;
+		}
+
+		function merge() {
+			var args = arguments,
+				i,
+				retVal = {};
+
+			for (i = 0; i < args.length; i++) {
+				retVal = doCopy(retVal, args[i]);
+
+			}
+			return retVal;
+		}
+
+		return merge.apply(this, arguments);
+	},
+
+	// extend an object to handle highchart events (highchart objects, not svg elements).
+	// this is a very simple way of handling events but whatever, it works (i think)
+	_extend: function (object) {
+		if (!object._highcharts_extended) {
+			Object.extend(object, {
+				_highchart_events: {},
+				_highchart_animation: null,
+				_highcharts_extended: true,
+				_highcharts_observe: function (name, fn) {
+					this._highchart_events[name] = [this._highchart_events[name], fn].compact().flatten();
+				},
+				_highcharts_stop_observing: function (name, fn) {
+					if (name) {
+						if (fn) {
+							this._highchart_events[name] = [this._highchart_events[name]].compact().flatten().without(fn);
+						} else {
+							delete this._highchart_events[name];
+						}
+					} else {
+						this._highchart_events = {};
+					}
+				},
+				_highcharts_fire: function (name, args) {
+					(this._highchart_events[name] || []).each(function (fn) {
+						// args is never null here
+						if (args.stopped) {
+							return; // "throw $break" wasn't working. i think because of the scope of 'this'.
+						}
+
+						// Attach a simple preventDefault function to skip default handler if called
+						args.preventDefault = function () {
+							args.defaultPrevented = true;
+						};
+
+						// If the event handler return false, prevent the default handler from executing
+						if (fn.bind(this)(args) === false) {
+							args.preventDefault();
+						}
+					}
+.bind(this));
+				}
+			});
+		}
+	}
+};
+}());

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/highcharts-more.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/highcharts-more.js b/portal/js/libs/Highcharts-2.3.5/js/highcharts-more.js
new file mode 100644
index 0000000..cc23e4c
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/highcharts-more.js
@@ -0,0 +1,35 @@
+/*
+ Highcharts JS v2.3.5 (2012-12-19)
+
+ (c) 2009-2011 Torstein Hønsi
+
+ License: www.highcharts.com/license
+*/
+(function(i,v){function A(a,b,c){this.init.call(this,a,b,c)}function B(a,b,c){a.call(this,b,c);if(this.chart.polar)this.closeSegment=function(a){var b=this.xAxis.center;a.push("L",b[0],b[1])},this.closedStacks=!0}function C(a,b){var c=this.chart,d=this.options.animation,g=this.group,f=this.markerGroup,e=this.xAxis.center,h=c.plotLeft,m=c.plotTop;if(c.polar){if(c.renderer.isSVG)if(d===!0&&(d={}),b){if(g.attrSetters.scaleX=g.attrSetters.scaleY=function(a,b){this[b]=a;this.scaleX!==v&&this.scaleY!==
+v&&this.element.setAttribute("transform","translate("+this.translateX+","+this.translateY+") scale("+this.scaleX+","+this.scaleY+")");return!1},c={translateX:e[0]+h,translateY:e[1]+m,scaleX:0,scaleY:0},g.attr(c),f)f.attrSetters=g.attrSetters,f.attr(c)}else c={translateX:h,translateY:m,scaleX:1,scaleY:1},g.animate(c,d),f&&f.animate(c,d),this.animate=null}else a.call(this,b)}var q=i.each,w=i.extend,p=i.merge,G=i.map,o=i.pick,x=i.pInt,n=i.getOptions().plotOptions,j=i.seriesTypes,D=i.extendClass,E=i.splat,
+l=i.wrap,s=i.Axis,H=i.Tick,z=i.Series,r=j.column.prototype,t=function(){};w(A.prototype,{init:function(a,b,c){var d=this,g=d.defaultOptions;d.chart=b;if(b.angular)g.background={};d.options=a=p(g,a);(a=a.background)&&q([].concat(E(a)).reverse(),function(a){var b=a.backgroundColor,a=p(d.defaultBackgroundOptions,a);if(b)a.backgroundColor=b;a.color=a.backgroundColor;c.options.plotBands.unshift(a)})},defaultOptions:{center:["50%","50%"],size:"85%",startAngle:0},defaultBackgroundOptions:{shape:"circle",
+borderWidth:1,borderColor:"silver",backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"#FFF"],[1,"#DDD"]]},from:Number.MIN_VALUE,innerRadius:0,to:Number.MAX_VALUE,outerRadius:"105%"}});var y=s.prototype,s=H.prototype,I={getOffset:t,redraw:function(){this.isDirty=!1},render:function(){this.isDirty=!1},setScale:t,setCategories:t,setTitle:t},F={isRadial:!0,defaultRadialGaugeOptions:{labels:{align:"center",x:0,y:null},minorGridLineWidth:0,minorTickInterval:"auto",minorTickLength:10,minorTickPosition:"inside",
+minorTickWidth:1,plotBands:[],tickLength:10,tickPosition:"inside",tickWidth:2,title:{rotation:0},zIndex:2},defaultRadialXOptions:{gridLineWidth:1,labels:{align:null,distance:15,x:0,y:null},maxPadding:0,minPadding:0,plotBands:[],showLastLabel:!1,tickLength:0},defaultRadialYOptions:{gridLineInterpolation:"circle",labels:{align:"right",x:-3,y:-2},plotBands:[],showLastLabel:!1,title:{x:4,text:null,rotation:90}},setOptions:function(a){this.options=p(this.defaultOptions,this.defaultRadialOptions,a)},getOffset:function(){y.getOffset.call(this);
+this.chart.axisOffset[this.side]=0;this.center=this.pane.center=j.pie.prototype.getCenter.call(this.pane)},getLinePath:function(a,b){var c=this.center,b=o(b,c[2]/2-this.offset);return this.chart.renderer.symbols.arc(this.left+c[0],this.top+c[1],b,b,{start:this.startAngleRad,end:this.endAngleRad,open:!0,innerR:0})},setAxisTranslation:function(){y.setAxisTranslation.call(this);if(this.center&&(this.transA=this.isCircular?(this.endAngleRad-this.startAngleRad)/(this.max-this.min||1):this.center[2]/2/
+(this.max-this.min||1),this.isXAxis))this.minPixelPadding=this.transA*this.minPointOffset+(this.reversed?(this.endAngleRad-this.startAngleRad)/4:0)},beforeSetTickPositions:function(){this.autoConnect&&(this.max+=this.categories&&1||this.pointRange||this.closestPointRange)},setAxisSize:function(){y.setAxisSize.call(this);if(this.center)this.len=this.width=this.height=this.isCircular?this.center[2]*(this.endAngleRad-this.startAngleRad)/2:this.center[2]/2},getPosition:function(a,b){if(!this.isCircular)b=
+this.translate(a),a=this.min;return this.postTranslate(this.translate(a),o(b,this.center[2]/2)-this.offset)},postTranslate:function(a,b){var c=this.chart,d=this.center,a=this.startAngleRad+a;return{x:c.plotLeft+d[0]+Math.cos(a)*b,y:c.plotTop+d[1]+Math.sin(a)*b}},getPlotBandPath:function(a,b,c){var d=this.center,g=this.startAngleRad,f=d[2]/2,e=[o(c.outerRadius,"100%"),c.innerRadius,o(c.thickness,10)],h=/%$/,m,k=this.isCircular;this.options.gridLineInterpolation==="polygon"?d=this.getPlotLinePath(a).concat(this.getPlotLinePath(b,
+!0)):(k||(e[0]=this.translate(a),e[1]=this.translate(b)),e=G(e,function(a){h.test(a)&&(a=x(a,10)*f/100);return a}),c.shape==="circle"||!k?(a=-Math.PI/2,b=Math.PI*1.5,m=!0):(a=g+this.translate(a),b=g+this.translate(b)),d=this.chart.renderer.symbols.arc(this.left+d[0],this.top+d[1],e[0],e[0],{start:a,end:b,innerR:o(e[1],e[0]-e[2]),open:m}));return d},getPlotLinePath:function(a,b){var c=this.center,d=this.chart,g=this.getPosition(a),f,e,h;this.isCircular?h=["M",c[0]+d.plotLeft,c[1]+d.plotTop,"L",g.x,
+g.y]:this.options.gridLineInterpolation==="circle"?(a=this.translate(a))&&(h=this.getLinePath(0,a)):(f=d.xAxis[0],h=[],a=this.translate(a),c=f.tickPositions,f.autoConnect&&(c=c.concat([c[0]])),b&&(c=[].concat(c).reverse()),q(c,function(b,c){e=f.getPosition(b,a);h.push(c?"L":"M",e.x,e.y)}));return h},getTitlePosition:function(){var a=this.center,b=this.chart,c=this.options.title;return{x:b.plotLeft+a[0]+(c.x||0),y:b.plotTop+a[1]-{high:0.5,middle:0.25,low:0}[c.align]*a[2]+(c.y||0)}}};l(y,"init",function(a,
+b,c){var d=b.angular,g=b.polar,f=c.isX,e=d&&f,h,m;m=b.options;var k=c.pane||0;if(d){if(w(this,e?I:F),h=!f)this.defaultRadialOptions=this.defaultRadialGaugeOptions}else if(g)w(this,F),this.defaultRadialOptions=(h=f)?this.defaultRadialXOptions:p(this.defaultYAxisOptions,this.defaultRadialYOptions);a.call(this,b,c);if(!e&&(d||g)){a=this.options;if(!b.panes)b.panes=[];this.pane=b.panes[k]=k=new A(E(m.pane)[k],b,this);k=k.options;b.inverted=!1;m.chart.zoomType=null;this.startAngleRad=b=(k.startAngle-90)*
+Math.PI/180;this.endAngleRad=m=(o(k.endAngle,k.startAngle+360)-90)*Math.PI/180;this.offset=a.offset||0;if((this.isCircular=h)&&c.max===v&&m-b===2*Math.PI)this.autoConnect=!0}});l(s,"getPosition",function(a,b,c,d,g){var f=this.axis;return f.getPosition?f.getPosition(c):a.call(this,b,c,d,g)});l(s,"getLabelPosition",function(a,b,c,d,g,f,e,h,m){var k=this.axis,i=f.y,j=f.align,l=(k.translate(this.pos)+k.startAngleRad+Math.PI/2)/Math.PI*180;k.isRadial?(a=k.getPosition(this.pos,k.center[2]/2+o(f.distance,
+-25)),f.rotation==="auto"?d.attr({rotation:l}):i===null&&(i=x(d.styles.lineHeight)*0.9-d.getBBox().height/2),j===null&&(j=k.isCircular?l>20&&l<160?"left":l>200&&l<340?"right":"center":"center",d.attr({align:j})),a.x+=f.x,a.y+=i):a=a.call(this,b,c,d,g,f,e,h,m);return a});l(s,"getMarkPath",function(a,b,c,d,g,f,e){var h=this.axis;h.isRadial?(a=h.getPosition(this.pos,h.center[2]/2+d),b=["M",b,c,"L",a.x,a.y]):b=a.call(this,b,c,d,g,f,e);return b});n.arearange=p(n.area,{lineWidth:1,marker:null,threshold:null,
+tooltip:{pointFormat:'<span style="color:{series.color}">{series.name}</span>: <b>{point.low}</b> - <b>{point.high}</b><br/>'},trackByArea:!0,dataLabels:{verticalAlign:null,xLow:0,xHigh:0,yLow:0,yHigh:0},shadow:!1});s=i.extendClass(i.Point,{applyOptions:function(a,b){var c=this.series,d=c.pointArrayMap,g=0,f=0,e=d.length;if(typeof a==="object"&&typeof a.length!=="number")w(this,a),this.options=a;else if(a.length){if(a.length>e){if(typeof a[0]==="string")this.name=a[0];else if(typeof a[0]==="number")this.x=
+a[0];g++}for(;f<e;)this[d[f++]]=a[g++]}this.y=this[c.pointValKey];if(this.x===v&&c)this.x=b===v?c.autoIncrement():b;return this},toYData:function(){return[this.low,this.high]}});j.arearange=i.extendClass(j.area,{type:"arearange",pointArrayMap:["low","high"],pointClass:s,pointValKey:"low",translate:function(){var a=this.yAxis;j.area.prototype.translate.apply(this);q(this.points,function(b){if(b.y!==null)b.plotLow=b.plotY,b.plotHigh=a.translate(b.high,0,1,0,1)})},getSegmentPath:function(a){var b=[],
+c=a.length,d=z.prototype.getSegmentPath,g,f;f=this.options;for(var e=f.step;c--;)g=a[c],b.push({plotX:g.plotX,plotY:g.plotHigh});a=d.call(this,a);if(e)e===!0&&(e="left"),f.step={left:"right",center:"center",right:"left"}[e];b=d.call(this,b);f.step=e;f=[].concat(a,b);b[0]="L";this.areaPath=this.areaPath.concat(a,b);return f},drawDataLabels:function(){var a=this.data,b=a.length,c,d=[],g=z.prototype,f=this.options.dataLabels,e,h=this.chart.inverted;if(f.enabled||this._hasPointLabels){for(c=b;c--;)e=
+a[c],e.y=e.high,e.plotY=e.plotHigh,d[c]=e.dataLabel,e.dataLabel=e.dataLabelUpper,e.below=!1,h?(f.align="left",f.x=f.xHigh):f.y=f.yHigh;g.drawDataLabels.apply(this,arguments);for(c=b;c--;)e=a[c],e.dataLabelUpper=e.dataLabel,e.dataLabel=d[c],e.y=e.low,e.plotY=e.plotLow,e.below=!0,h?(f.align="right",f.x=f.xLow):f.y=f.yLow;g.drawDataLabels.apply(this,arguments)}},alignDataLabel:j.column.prototype.alignDataLabel,getSymbol:j.column.prototype.getSymbol,drawPoints:t});n.areasplinerange=p(n.arearange);j.areasplinerange=
+D(j.arearange,{type:"areasplinerange",getPointSpline:j.spline.prototype.getPointSpline});n.columnrange=p(n.column,n.arearange,{lineWidth:1,pointRange:null});j.columnrange=D(j.arearange,{type:"columnrange",translate:function(){var a=this.yAxis,b;r.translate.apply(this);q(this.points,function(c){var d=c.shapeArgs;c.plotHigh=b=a.translate(c.high,0,1,0,1);c.plotLow=c.plotY;d.y=b;d.height=c.plotY-b;c.trackerArgs=d})},drawGraph:t,pointAttrToOptions:r.pointAttrToOptions,drawPoints:r.drawPoints,drawTracker:r.drawTracker,
+animate:r.animate});n.gauge=p(n.line,{dataLabels:{enabled:!0,y:15,borderWidth:1,borderColor:"silver",borderRadius:3,style:{fontWeight:"bold"},verticalAlign:"top",zIndex:2},dial:{},pivot:{},tooltip:{headerFormat:""},showInLegend:!1});n={type:"gauge",pointClass:i.extendClass(i.Point,{setState:function(a){this.state=a}}),angular:!0,translate:function(){var a=this,b=a.yAxis,c=b.center;a.generatePoints();q(a.points,function(d){var g=p(a.options.dial,d.dial),f=x(o(g.radius,80))*c[2]/200,e=x(o(g.baseLength,
+70))*f/100,h=x(o(g.rearLength,10))*f/100,m=g.baseWidth||3,k=g.topWidth||1;d.shapeType="path";d.shapeArgs={d:g.path||["M",-h,-m/2,"L",e,-m/2,f,-k/2,f,k/2,e,m/2,-h,m/2,"z"],translateX:c[0],translateY:c[1],rotation:(b.startAngleRad+b.translate(d.y,null,null,null,!0))*180/Math.PI};d.plotX=c[0];d.plotY=c[1]})},drawPoints:function(){var a=this,b=a.yAxis.center,c=a.pivot,d=a.options,g=d.pivot,f=a.chart.renderer;q(a.points,function(b){var c=b.graphic,g=b.shapeArgs,k=g.d,i=p(d.dial,b.dial);c?(c.animate(g),
+g.d=k):b.graphic=f[b.shapeType](g).attr({stroke:i.borderColor||"none","stroke-width":i.borderWidth||0,fill:i.backgroundColor||"black",rotation:g.rotation}).add(a.group)});c?c.animate({translateX:b[0],translateY:b[1]}):a.pivot=f.circle(0,0,o(g.radius,5)).attr({"stroke-width":g.borderWidth||0,stroke:g.borderColor||"silver",fill:g.backgroundColor||"black"}).translate(b[0],b[1]).add(a.group)},animate:function(){var a=this;q(a.points,function(b){var c=b.graphic;c&&(c.attr({rotation:a.yAxis.startAngleRad*
+180/Math.PI}),c.animate({rotation:b.shapeArgs.rotation},a.options.animation))});a.animate=null},render:function(){this.group=this.plotGroup("group","series",this.visible?"visible":"hidden",this.options.zIndex,this.chart.seriesGroup);j.pie.prototype.render.call(this);this.group.clip(this.chart.clipRect)},setData:j.pie.prototype.setData,drawTracker:j.column.prototype.drawTracker};j.gauge=i.extendClass(j.line,n);var u=z.prototype,n=i.MouseTracker.prototype;u.toXY=function(a){var b,c=this.chart;b=a.plotX;
+var d=a.plotY;a.rectPlotX=b;a.rectPlotY=d;a.deg=b/Math.PI*180;b=this.xAxis.postTranslate(a.plotX,this.yAxis.len-d);a.plotX=a.polarPlotX=b.x-c.plotLeft;a.plotY=a.polarPlotY=b.y-c.plotTop};l(j.area.prototype,"init",B);l(j.areaspline.prototype,"init",B);l(j.spline.prototype,"getPointSpline",function(a,b,c,d){var g,f,e,h,i,k,j;if(this.chart.polar){g=c.plotX;f=c.plotY;a=b[d-1];e=b[d+1];this.connectEnds&&(a||(a=b[b.length-2]),e||(e=b[1]));if(a&&e)h=a.plotX,i=a.plotY,b=e.plotX,k=e.plotY,h=(1.5*g+h)/2.5,
+i=(1.5*f+i)/2.5,e=(1.5*g+b)/2.5,j=(1.5*f+k)/2.5,b=Math.sqrt(Math.pow(h-g,2)+Math.pow(i-f,2)),k=Math.sqrt(Math.pow(e-g,2)+Math.pow(j-f,2)),h=Math.atan2(i-f,h-g),i=Math.atan2(j-f,e-g),j=Math.PI/2+(h+i)/2,Math.abs(h-j)>Math.PI/2&&(j-=Math.PI),h=g+Math.cos(j)*b,i=f+Math.sin(j)*b,e=g+Math.cos(Math.PI+j)*k,j=f+Math.sin(Math.PI+j)*k,c.rightContX=e,c.rightContY=j;d?(c=["C",a.rightContX||a.plotX,a.rightContY||a.plotY,h||g,i||f,g,f],a.rightContX=a.rightContY=null):c=["M",g,f]}else c=a.call(this,b,c,d);return c});
+l(u,"translate",function(a){a.call(this);if(this.chart.polar&&!this.preventPostTranslate)for(var a=this.points,b=a.length;b--;)this.toXY(a[b])});l(u,"getSegmentPath",function(a,b){var c=this.points;if(this.chart.polar&&this.options.connectEnds!==!1&&b[b.length-1]===c[c.length-1]&&c[0].y!==null)this.connectEnds=!0,b=[].concat(b,[c[0]]);return a.call(this,b)});l(u,"animate",C);l(r,"animate",C);l(u,"setTooltipPoints",function(a,b){this.chart.polar&&w(this.xAxis,{tooltipLen:360,tooltipPosName:"deg"});
+return a.call(this,b)});l(r,"translate",function(a){var b=this.xAxis,c=this.yAxis.len,d=b.center,g=b.startAngleRad,f=this.chart.renderer,e,h;this.preventPostTranslate=!0;a.call(this);if(b.isRadial){b=this.points;for(h=b.length;h--;)e=b[h],a=e.barX+g,e.shapeType="path",e.shapeArgs={d:f.symbols.arc(d[0],d[1],c-e.plotY,null,{start:a,end:a+e.pointWidth,innerR:c-o(e.yBottom,c)})},this.toXY(e)}});l(r,"alignDataLabel",function(a,b,c,d,g,f){if(this.chart.polar){a=b.rectPlotX/Math.PI*180;if(d.align===null)d.align=
+a>20&&a<160?"left":a>200&&a<340?"right":"center";if(d.verticalAlign===null)d.verticalAlign=a<45||a>315?"bottom":a>135&&a<225?"top":"middle";u.alignDataLabel.call(this,b,c,d,g,f)}else a.call(this,b,c,d,g,f)});l(n,"getIndex",function(a,b){var c,d=this.chart,g;d.polar?(g=d.xAxis[0].center,c=b.chartX-g[0]-d.plotLeft,d=b.chartY-g[1]-d.plotTop,c=180-Math.round(Math.atan2(c,d)/Math.PI*180)):c=a.call(this,b);return c});l(n,"getMouseCoordinates",function(a,b){var c=this.chart,d={xAxis:[],yAxis:[]};c.polar?
+q(c.axes,function(a){var f=a.isXAxis,e=a.center,h=b.chartX-e[0]-c.plotLeft,e=b.chartY-e[1]-c.plotTop;d[f?"xAxis":"yAxis"].push({axis:a,value:a.translate(f?Math.PI-Math.atan2(h,e):Math.sqrt(Math.pow(h,2)+Math.pow(e,2)),!0)})}):d=a.call(this,b);return d})})(Highcharts);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/highcharts-more.src.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/highcharts-more.src.js b/portal/js/libs/Highcharts-2.3.5/js/highcharts-more.src.js
new file mode 100644
index 0000000..d75102c
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/highcharts-more.src.js
@@ -0,0 +1,1581 @@
+// ==ClosureCompiler==
+// @compilation_level SIMPLE_OPTIMIZATIONS
+
+/**
+ * @license Highcharts JS v2.3.5 (2012-12-19)
+ *
+ * (c) 2009-2011 Torstein Hønsi
+ *
+ * License: www.highcharts.com/license
+ */
+
+// JSLint options:
+/*global Highcharts, document, window, navigator, setInterval, clearInterval, clearTimeout, setTimeout, location, jQuery, $, console */
+
+(function (Highcharts, UNDEFINED) {
+var each = Highcharts.each,
+	extend = Highcharts.extend,
+	merge = Highcharts.merge,
+	map = Highcharts.map,
+	pick = Highcharts.pick,
+	pInt = Highcharts.pInt,
+	defaultPlotOptions = Highcharts.getOptions().plotOptions,
+	seriesTypes = Highcharts.seriesTypes,
+	extendClass = Highcharts.extendClass,
+	splat = Highcharts.splat,
+	wrap = Highcharts.wrap,
+	Axis = Highcharts.Axis,
+	Tick = Highcharts.Tick,
+	Series = Highcharts.Series,
+	colProto = seriesTypes.column.prototype,
+	noop = function () {};/**
+ * The Pane object allows options that are common to a set of X and Y axes.
+ * 
+ * In the future, this can be extended to basic Highcharts and Highstock.
+ */
+function Pane(options, chart, firstAxis) {
+	this.init.call(this, options, chart, firstAxis);
+}
+
+// Extend the Pane prototype
+extend(Pane.prototype, {
+	
+	/**
+	 * Initiate the Pane object
+	 */
+	init: function (options, chart, firstAxis) {
+		var pane = this,
+			backgroundOption,
+			defaultOptions = pane.defaultOptions;
+		
+		pane.chart = chart;
+		
+		// Set options
+		if (chart.angular) { // gauges
+			defaultOptions.background = {}; // gets extended by this.defaultBackgroundOptions
+		}
+		pane.options = options = merge(defaultOptions, options);
+		
+		backgroundOption = options.background;
+		
+		// To avoid having weighty logic to place, update and remove the backgrounds,
+		// push them to the first axis' plot bands and borrow the existing logic there.
+		if (backgroundOption) {
+			each([].concat(splat(backgroundOption)).reverse(), function (config) {
+				var backgroundColor = config.backgroundColor; // if defined, replace the old one (specific for gradients)
+				config = merge(pane.defaultBackgroundOptions, config);
+				if (backgroundColor) {
+					config.backgroundColor = backgroundColor;
+				}
+				config.color = config.backgroundColor; // due to naming in plotBands
+				firstAxis.options.plotBands.unshift(config);
+			});
+		}
+	},
+	
+	/**
+	 * The default options object
+	 */
+	defaultOptions: {
+		// background: {conditional},
+		center: ['50%', '50%'],
+		size: '85%',
+		startAngle: 0
+		//endAngle: startAngle + 360
+	},	
+	
+	/**
+	 * The default background options
+	 */
+	defaultBackgroundOptions: {
+		shape: 'circle',
+		borderWidth: 1,
+		borderColor: 'silver',
+		backgroundColor: {
+			linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+			stops: [
+				[0, '#FFF'],
+				[1, '#DDD']
+			]
+		},
+		from: Number.MIN_VALUE, // corrected to axis min
+		innerRadius: 0,
+		to: Number.MAX_VALUE, // corrected to axis max
+		outerRadius: '105%'
+	}
+	
+});
+var axisProto = Axis.prototype,
+	tickProto = Tick.prototype;
+	
+/**
+ * Augmented methods for the x axis in order to hide it completely, used for the X axis in gauges
+ */
+var hiddenAxisMixin = {
+	getOffset: noop,
+	redraw: function () {
+		this.isDirty = false; // prevent setting Y axis dirty
+	},
+	render: function () {
+		this.isDirty = false; // prevent setting Y axis dirty
+	},
+	setScale: noop,
+	setCategories: noop,
+	setTitle: noop
+};
+
+/**
+ * Augmented methods for the value axis
+ */
+/*jslint unparam: true*/
+var radialAxisMixin = {
+	isRadial: true,
+	
+	/**
+	 * The default options extend defaultYAxisOptions
+	 */
+	defaultRadialGaugeOptions: {
+		labels: {
+			align: 'center',
+			x: 0,
+			y: null // auto
+		},
+		minorGridLineWidth: 0,
+		minorTickInterval: 'auto',
+		minorTickLength: 10,
+		minorTickPosition: 'inside',
+		minorTickWidth: 1,
+		plotBands: [],
+		tickLength: 10,
+		tickPosition: 'inside',
+		tickWidth: 2,
+		title: {
+			rotation: 0
+		},
+		zIndex: 2 // behind dials, points in the series group
+	},
+	
+	// Circular axis around the perimeter of a polar chart
+	defaultRadialXOptions: {
+		gridLineWidth: 1, // spokes
+		labels: {
+			align: null, // auto
+			distance: 15,
+			x: 0,
+			y: null // auto
+		},
+		maxPadding: 0,
+		minPadding: 0,
+		plotBands: [],
+		showLastLabel: false, 
+		tickLength: 0
+	},
+	
+	// Radial axis, like a spoke in a polar chart
+	defaultRadialYOptions: {
+		gridLineInterpolation: 'circle',
+		labels: {
+			align: 'right',
+			x: -3,
+			y: -2
+		},
+		plotBands: [],
+		showLastLabel: false,
+		title: {
+			x: 4,
+			text: null,
+			rotation: 90
+		}
+	},
+	
+	/**
+	 * Merge and set options
+	 */
+	setOptions: function (userOptions) {
+		
+		this.options = merge(
+			this.defaultOptions,
+			this.defaultRadialOptions,
+			userOptions
+		);
+		
+	},
+	
+	/**
+	 * Wrap the getOffset method to return zero offset for title or labels in a radial 
+	 * axis
+	 */
+	getOffset: function () {
+		// Call the Axis prototype method (the method we're in now is on the instance)
+		axisProto.getOffset.call(this);
+		
+		// Title or label offsets are not counted
+		this.chart.axisOffset[this.side] = 0;
+		
+		// Set the center array
+		this.center = this.pane.center = seriesTypes.pie.prototype.getCenter.call(this.pane);
+	},
+
+
+	/**
+	 * Get the path for the axis line. This method is also referenced in the getPlotLinePath
+	 * method.
+	 */
+	getLinePath: function (lineWidth, radius) {
+		var center = this.center;
+		radius = pick(radius, center[2] / 2 - this.offset);
+		
+		return this.chart.renderer.symbols.arc(
+			this.left + center[0],
+			this.top + center[1],
+			radius,
+			radius, 
+			{
+				start: this.startAngleRad,
+				end: this.endAngleRad,
+				open: true,
+				innerR: 0
+			}
+		);
+	},
+
+	/**
+	 * Override setAxisTranslation by setting the translation to the difference
+	 * in rotation. This allows the translate method to return angle for 
+	 * any given value.
+	 */
+	setAxisTranslation: function () {
+		
+		// Call uber method		
+		axisProto.setAxisTranslation.call(this);
+			
+		// Set transA and minPixelPadding
+		if (this.center) { // it's not defined the first time
+			if (this.isCircular) {
+				
+				this.transA = (this.endAngleRad - this.startAngleRad) / 
+					((this.max - this.min) || 1);
+					
+				
+			} else { 
+				this.transA = (this.center[2] / 2) / ((this.max - this.min) || 1);
+			}
+			
+			if (this.isXAxis) {
+				this.minPixelPadding = this.transA * this.minPointOffset +
+					(this.reversed ? (this.endAngleRad - this.startAngleRad) / 4 : 0); // ???
+			}
+		}
+	},
+	
+	/**
+	 * In case of auto connect, add one closestPointRange to the max value right before
+	 * tickPositions are computed, so that ticks will extend passed the real max.
+	 */
+	beforeSetTickPositions: function () {
+		if (this.autoConnect) {
+			this.max += (this.categories && 1) || this.pointRange || this.closestPointRange; // #1197
+		}
+	},
+	
+	/**
+	 * Override the setAxisSize method to use the arc's circumference as length. This
+	 * allows tickPixelInterval to apply to pixel lengths along the perimeter
+	 */
+	setAxisSize: function () {
+		
+		axisProto.setAxisSize.call(this);
+		
+		if (this.center) { // it's not defined the first time
+			this.len = this.width = this.height = this.isCircular ?
+				this.center[2] * (this.endAngleRad - this.startAngleRad) / 2 :
+				this.center[2] / 2;
+		}
+	},
+	
+	/**
+	 * Returns the x, y coordinate of a point given by a value and a pixel distance
+	 * from center
+	 */
+	getPosition: function (value, length) {
+		if (!this.isCircular) {
+			length = this.translate(value);
+			value = this.min;	
+		}
+		
+		return this.postTranslate(
+			this.translate(value),
+			pick(length, this.center[2] / 2) - this.offset
+		);		
+	},
+	
+	/**
+	 * Translate from intermediate plotX (angle), plotY (axis.len - radius) to final chart coordinates. 
+	 */
+	postTranslate: function (angle, radius) {
+		
+		var chart = this.chart,
+			center = this.center;
+			
+		angle = this.startAngleRad + angle;
+		
+		return {
+			x: chart.plotLeft + center[0] + Math.cos(angle) * radius,
+			y: chart.plotTop + center[1] + Math.sin(angle) * radius
+		}; 
+		
+	},
+	
+	/**
+	 * Find the path for plot bands along the radial axis
+	 */
+	getPlotBandPath: function (from, to, options) {
+		var center = this.center,
+			startAngleRad = this.startAngleRad,
+			fullRadius = center[2] / 2,
+			radii = [
+				pick(options.outerRadius, '100%'),
+				options.innerRadius,
+				pick(options.thickness, 10)
+			],
+			percentRegex = /%$/,
+			start,
+			end,
+			open,
+			isCircular = this.isCircular, // X axis in a polar chart
+			ret;
+			
+		// Polygonal plot bands
+		if (this.options.gridLineInterpolation === 'polygon') {
+			ret = this.getPlotLinePath(from).concat(this.getPlotLinePath(to, true));
+		
+		// Circular grid bands
+		} else {
+			
+			// Plot bands on Y axis (radial axis) - inner and outer radius depend on to and from
+			if (!isCircular) {
+				radii[0] = this.translate(from);
+				radii[1] = this.translate(to);
+			}
+			
+			// Convert percentages to pixel values
+			radii = map(radii, function (radius) {
+				if (percentRegex.test(radius)) {
+					radius = (pInt(radius, 10) * fullRadius) / 100;
+				}
+				return radius;
+			});
+			
+			// Handle full circle
+			if (options.shape === 'circle' || !isCircular) {
+				start = -Math.PI / 2;
+				end = Math.PI * 1.5;
+				open = true;
+			} else {
+				start = startAngleRad + this.translate(from);
+				end = startAngleRad + this.translate(to);
+			}
+		
+		
+			ret = this.chart.renderer.symbols.arc(
+				this.left + center[0],
+				this.top + center[1],
+				radii[0],
+				radii[0],
+				{
+					start: start,
+					end: end,
+					innerR: pick(radii[1], radii[0] - radii[2]),
+					open: open
+				}
+			);
+		}
+		 
+		return ret;
+	},
+	
+	/**
+	 * Find the path for plot lines perpendicular to the radial axis.
+	 */
+	getPlotLinePath: function (value, reverse) {
+		var axis = this,
+			center = axis.center,
+			chart = axis.chart,
+			end = axis.getPosition(value),
+			xAxis,
+			xy,
+			tickPositions,
+			ret;
+		
+		// Spokes
+		if (axis.isCircular) {
+			ret = ['M', center[0] + chart.plotLeft, center[1] + chart.plotTop, 'L', end.x, end.y];
+		
+		// Concentric circles			
+		} else if (axis.options.gridLineInterpolation === 'circle') {
+			value = axis.translate(value);
+			if (value) { // a value of 0 is in the center
+				ret = axis.getLinePath(0, value);
+			}
+		// Concentric polygons 
+		} else {
+			xAxis = chart.xAxis[0];
+			ret = [];
+			value = axis.translate(value);
+			tickPositions = xAxis.tickPositions;
+			if (xAxis.autoConnect) {
+				tickPositions = tickPositions.concat([tickPositions[0]]);
+			}
+			// Reverse the positions for concatenation of polygonal plot bands
+			if (reverse) {
+				tickPositions = [].concat(tickPositions).reverse();
+			}
+				
+			each(tickPositions, function (pos, i) {
+				xy = xAxis.getPosition(pos, value);
+				ret.push(i ? 'L' : 'M', xy.x, xy.y);
+			});
+			
+		}
+		return ret;
+	},
+	
+	/**
+	 * Find the position for the axis title, by default inside the gauge
+	 */
+	getTitlePosition: function () {
+		var center = this.center,
+			chart = this.chart,
+			titleOptions = this.options.title;
+		
+		return { 
+			x: chart.plotLeft + center[0] + (titleOptions.x || 0), 
+			y: chart.plotTop + center[1] - ({ high: 0.5, middle: 0.25, low: 0 }[titleOptions.align] * 
+				center[2]) + (titleOptions.y || 0)  
+		};
+	}
+	
+};
+/*jslint unparam: false*/
+
+/**
+ * Override axisProto.init to mix in special axis instance functions and function overrides
+ */
+wrap(axisProto, 'init', function (proceed, chart, userOptions) {
+	var axis = this,
+		angular = chart.angular,
+		polar = chart.polar,
+		isX = userOptions.isX,
+		isHidden = angular && isX,
+		isCircular,
+		startAngleRad,
+		endAngleRad,
+		options,
+		chartOptions = chart.options,
+		paneIndex = userOptions.pane || 0,
+		pane,
+		paneOptions;
+		
+	// Before prototype.init
+	if (angular) {
+		extend(this, isHidden ? hiddenAxisMixin : radialAxisMixin);
+		isCircular =  !isX;
+		if (isCircular) {
+			this.defaultRadialOptions = this.defaultRadialGaugeOptions;
+		}
+		
+	} else if (polar) {
+		//extend(this, userOptions.isX ? radialAxisMixin : radialAxisMixin);
+		extend(this, radialAxisMixin);
+		isCircular = isX;
+		this.defaultRadialOptions = isX ? this.defaultRadialXOptions : merge(this.defaultYAxisOptions, this.defaultRadialYOptions);
+		
+	}
+	
+	// Run prototype.init
+	proceed.call(this, chart, userOptions);
+	
+	if (!isHidden && (angular || polar)) {
+		options = this.options;
+		
+		// Create the pane and set the pane options.
+		if (!chart.panes) {
+			chart.panes = [];
+		}
+		this.pane = chart.panes[paneIndex] = pane = new Pane(
+			splat(chartOptions.pane)[paneIndex],
+			chart,
+			axis
+		);
+		paneOptions = pane.options;
+		
+			
+		// Disable certain features on angular and polar axes
+		chart.inverted = false;
+		chartOptions.chart.zoomType = null;
+		
+		// Start and end angle options are
+		// given in degrees relative to top, while internal computations are
+		// in radians relative to right (like SVG).
+		this.startAngleRad = startAngleRad = (paneOptions.startAngle - 90) * Math.PI / 180;
+		this.endAngleRad = endAngleRad = (pick(paneOptions.endAngle, paneOptions.startAngle + 360)  - 90) * Math.PI / 180;
+		this.offset = options.offset || 0;
+		
+		this.isCircular = isCircular;
+		
+		// Automatically connect grid lines?
+		if (isCircular && userOptions.max === UNDEFINED && endAngleRad - startAngleRad === 2 * Math.PI) {
+			this.autoConnect = true;
+		}
+	}
+	
+});
+
+/**
+ * Add special cases within the Tick class' methods for radial axes.
+ */	
+wrap(tickProto, 'getPosition', function (proceed, horiz, pos, tickmarkOffset, old) {
+	var axis = this.axis;
+	
+	return axis.getPosition ? 
+		axis.getPosition(pos) :
+		proceed.call(this, horiz, pos, tickmarkOffset, old);	
+});
+
+/**
+ * Wrap the getLabelPosition function to find the center position of the label
+ * based on the distance option
+ */	
+wrap(tickProto, 'getLabelPosition', function (proceed, x, y, label, horiz, labelOptions, tickmarkOffset, index, step) {
+	var axis = this.axis,
+		optionsY = labelOptions.y,
+		ret,
+		align = labelOptions.align,
+		angle = (axis.translate(this.pos) + axis.startAngleRad + Math.PI / 2) / Math.PI * 180;
+	
+	if (axis.isRadial) {
+		ret = axis.getPosition(this.pos, (axis.center[2] / 2) + pick(labelOptions.distance, -25));
+		
+		// Automatically rotated
+		if (labelOptions.rotation === 'auto') {
+			label.attr({ 
+				rotation: angle
+			});
+		
+		// Vertically centered
+		} else if (optionsY === null) {
+			optionsY = pInt(label.styles.lineHeight) * 0.9 - label.getBBox().height / 2;
+		
+		}
+		
+		// Automatic alignment
+		if (align === null) {
+			if (axis.isCircular) {
+				if (angle > 20 && angle < 160) {
+					align = 'left'; // right hemisphere
+				} else if (angle > 200 && angle < 340) {
+					align = 'right'; // left hemisphere
+				} else {
+					align = 'center'; // top or bottom
+				}
+			} else {
+				align = 'center';
+			}
+			label.attr({
+				align: align
+			});
+		}
+		
+		ret.x += labelOptions.x;
+		ret.y += optionsY;
+		
+	} else {
+		ret = proceed.call(this, x, y, label, horiz, labelOptions, tickmarkOffset, index, step);
+	}
+	return ret;
+});
+
+/**
+ * Wrap the getMarkPath function to return the path of the radial marker
+ */
+wrap(tickProto, 'getMarkPath', function (proceed, x, y, tickLength, tickWidth, horiz, renderer) {
+	var axis = this.axis,
+		endPoint,
+		ret;
+		
+	if (axis.isRadial) {
+		endPoint = axis.getPosition(this.pos, axis.center[2] / 2 + tickLength);
+		ret = [
+			'M',
+			x,
+			y,
+			'L',
+			endPoint.x,
+			endPoint.y
+		];
+	} else {
+		ret = proceed.call(this, x, y, tickLength, tickWidth, horiz, renderer);
+	}
+	return ret;
+});/* 
+ * The AreaRangeSeries class
+ * 
+ */
+
+/**
+ * Extend the default options with map options
+ */
+defaultPlotOptions.arearange = merge(defaultPlotOptions.area, {
+	lineWidth: 1,
+	marker: null,
+	threshold: null,
+	tooltip: {
+		pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.low}</b> - <b>{point.high}</b><br/>' 
+	},
+	trackByArea: true,
+	dataLabels: {
+		verticalAlign: null,
+		xLow: 0,
+		xHigh: 0,
+		yLow: 0,
+		yHigh: 0	
+	},
+	shadow: false
+});
+
+/**
+ * Extend the point object
+ */
+var RangePoint = Highcharts.extendClass(Highcharts.Point, {
+	/**
+	 * Apply the options containing the x and low/high data and possible some extra properties.
+	 * This is called on point init or from point.update. Extends base Point by adding
+	 * multiple y-like values.
+	 *
+	 * @param {Object} options
+	 */
+	applyOptions: function (options, x) {
+		var point = this,
+			series = point.series,
+			pointArrayMap = series.pointArrayMap,
+			i = 0,
+			j = 0,
+			valueCount = pointArrayMap.length;
+
+
+		// object input
+		if (typeof options === 'object' && typeof options.length !== 'number') {
+
+			// copy options directly to point
+			extend(point, options);
+
+			point.options = options;
+			
+		} else if (options.length) { // array
+			// with leading x value
+			if (options.length > valueCount) {
+				if (typeof options[0] === 'string') {
+					point.name = options[0];
+				} else if (typeof options[0] === 'number') {
+					point.x = options[0];
+				}
+				i++;
+			}
+			while (j < valueCount) {
+				point[pointArrayMap[j++]] = options[i++];
+			}
+		}
+
+		// Handle null and make low alias y
+		/*if (point.high === null) {
+			point.low = null;
+		}*/
+		point.y = point[series.pointValKey];
+		
+		// If no x is set by now, get auto incremented value. All points must have an
+		// x value, however the y value can be null to create a gap in the series
+		if (point.x === UNDEFINED && series) {
+			point.x = x === UNDEFINED ? series.autoIncrement() : x;
+		}
+		
+		return point;
+	},
+	
+	/**
+	 * Return a plain array for speedy calculation
+	 */
+	toYData: function () {
+		return [this.low, this.high];
+	}
+});
+
+/**
+ * Add the series type
+ */
+seriesTypes.arearange = Highcharts.extendClass(seriesTypes.area, {
+	type: 'arearange',
+	pointArrayMap: ['low', 'high'],
+	pointClass: RangePoint,
+	pointValKey: 'low',
+	
+	/**
+	 * Translate data points from raw values x and y to plotX and plotY
+	 */
+	translate: function () {
+		var series = this,
+			yAxis = series.yAxis;
+
+		seriesTypes.area.prototype.translate.apply(series);
+
+		// Set plotLow and plotHigh
+		each(series.points, function (point) {
+			
+			if (point.y !== null) {
+				point.plotLow = point.plotY;
+				point.plotHigh = yAxis.translate(point.high, 0, 1, 0, 1);
+			}
+		});
+	},
+	
+	/**
+	 * Extend the line series' getSegmentPath method by applying the segment
+	 * path to both lower and higher values of the range
+	 */
+	getSegmentPath: function (segment) {
+		
+		var highSegment = [],
+			i = segment.length,
+			baseGetSegmentPath = Series.prototype.getSegmentPath,
+			point,
+			linePath,
+			lowerPath,
+			options = this.options,
+			step = options.step,
+			higherPath;
+			
+		// Make a segment with plotX and plotY for the top values
+		while (i--) {
+			point = segment[i];
+			highSegment.push({
+				plotX: point.plotX,
+				plotY: point.plotHigh
+			});
+		}
+		
+		// Get the paths
+		lowerPath = baseGetSegmentPath.call(this, segment);
+		if (step) {
+			if (step === true) {
+				step = 'left';
+			}
+			options.step = { left: 'right', center: 'center', right: 'left' }[step]; // swap for reading in getSegmentPath
+		}
+		higherPath = baseGetSegmentPath.call(this, highSegment);
+		options.step = step;
+		
+		// Create a line on both top and bottom of the range
+		linePath = [].concat(lowerPath, higherPath);
+		
+		// For the area path, we need to change the 'move' statement into 'lineTo' or 'curveTo'
+		higherPath[0] = 'L'; // this probably doesn't work for spline			
+		this.areaPath = this.areaPath.concat(lowerPath, higherPath);
+		
+		return linePath;
+	},
+	
+	/**
+	 * Extend the basic drawDataLabels method by running it for both lower and higher
+	 * values.
+	 */
+	drawDataLabels: function () {
+		
+		var data = this.data,
+			length = data.length,
+			i,
+			originalDataLabels = [],
+			seriesProto = Series.prototype,
+			dataLabelOptions = this.options.dataLabels,
+			point,
+			inverted = this.chart.inverted;
+			
+		if (dataLabelOptions.enabled || this._hasPointLabels) {
+			
+			// Step 1: set preliminary values for plotY and dataLabel and draw the upper labels
+			i = length;
+			while (i--) {
+				point = data[i];
+				
+				// Set preliminary values
+				point.y = point.high;
+				point.plotY = point.plotHigh;
+				
+				// Store original data labels and set preliminary label objects to be picked up 
+				// in the uber method
+				originalDataLabels[i] = point.dataLabel;
+				point.dataLabel = point.dataLabelUpper;
+				
+				// Set the default offset
+				point.below = false;
+				if (inverted) {
+					dataLabelOptions.align = 'left';
+					dataLabelOptions.x = dataLabelOptions.xHigh;								
+				} else {
+					dataLabelOptions.y = dataLabelOptions.yHigh;
+				}
+			}
+			seriesProto.drawDataLabels.apply(this, arguments); // #1209
+			
+			// Step 2: reorganize and handle data labels for the lower values
+			i = length;
+			while (i--) {
+				point = data[i];
+				
+				// Move the generated labels from step 1, and reassign the original data labels
+				point.dataLabelUpper = point.dataLabel;
+				point.dataLabel = originalDataLabels[i];
+				
+				// Reset values
+				point.y = point.low;
+				point.plotY = point.plotLow;
+				
+				// Set the default offset
+				point.below = true;
+				if (inverted) {
+					dataLabelOptions.align = 'right';
+					dataLabelOptions.x = dataLabelOptions.xLow;
+				} else {
+					dataLabelOptions.y = dataLabelOptions.yLow;
+				}
+			}
+			seriesProto.drawDataLabels.apply(this, arguments);
+		}
+	
+	},
+	
+	alignDataLabel: seriesTypes.column.prototype.alignDataLabel,
+	
+	getSymbol: seriesTypes.column.prototype.getSymbol,
+	
+	drawPoints: noop
+});/**
+ * The AreaSplineRangeSeries class
+ */
+
+defaultPlotOptions.areasplinerange = merge(defaultPlotOptions.arearange);
+
+/**
+ * AreaSplineRangeSeries object
+ */
+seriesTypes.areasplinerange = extendClass(seriesTypes.arearange, {
+	type: 'areasplinerange',
+	getPointSpline: seriesTypes.spline.prototype.getPointSpline
+});/**
+ * The ColumnRangeSeries class
+ */
+defaultPlotOptions.columnrange = merge(defaultPlotOptions.column, defaultPlotOptions.arearange, {
+	lineWidth: 1,
+	pointRange: null
+});
+
+/**
+ * ColumnRangeSeries object
+ */
+seriesTypes.columnrange = extendClass(seriesTypes.arearange, {
+	type: 'columnrange',
+	/**
+	 * Translate data points from raw values x and y to plotX and plotY
+	 */
+	translate: function () {
+		var series = this,
+			yAxis = series.yAxis,
+			plotHigh;
+
+		colProto.translate.apply(series);
+
+		// Set plotLow and plotHigh
+		each(series.points, function (point) {
+			var shapeArgs = point.shapeArgs;
+			
+			point.plotHigh = plotHigh = yAxis.translate(point.high, 0, 1, 0, 1);
+			point.plotLow = point.plotY;
+			
+			// adjust shape
+			shapeArgs.y = plotHigh;
+			shapeArgs.height = point.plotY - plotHigh;
+			
+			point.trackerArgs = shapeArgs;
+		});
+	},
+	drawGraph: noop,
+	pointAttrToOptions: colProto.pointAttrToOptions,
+	drawPoints: colProto.drawPoints,
+	drawTracker: colProto.drawTracker,
+	animate: colProto.animate
+});/* 
+ * The GaugeSeries class
+ */
+
+
+
+/**
+ * Extend the default options
+ */
+defaultPlotOptions.gauge = merge(defaultPlotOptions.line, {
+	dataLabels: {
+		enabled: true,
+		y: 15,
+		borderWidth: 1,
+		borderColor: 'silver',
+		borderRadius: 3,
+		style: {
+			fontWeight: 'bold'
+		},
+		verticalAlign: 'top',
+		zIndex: 2
+	},
+	dial: {
+		// radius: '80%',
+		// backgroundColor: 'black',
+		// borderColor: 'silver',
+		// borderWidth: 0,
+		// baseWidth: 3,
+		// topWidth: 1,
+		// baseLength: '70%' // of radius
+		// rearLength: '10%'
+	},
+	pivot: {
+		//radius: 5,
+		//borderWidth: 0
+		//borderColor: 'silver',
+		//backgroundColor: 'black'
+	},
+	tooltip: {
+		headerFormat: ''
+	},
+	showInLegend: false
+});
+
+/**
+ * Extend the point object
+ */
+var GaugePoint = Highcharts.extendClass(Highcharts.Point, {
+	/**
+	 * Don't do any hover colors or anything
+	 */
+	setState: function (state) {
+		this.state = state;
+	}
+});
+
+
+/**
+ * Add the series type
+ */
+var GaugeSeries = {
+	type: 'gauge',
+	pointClass: GaugePoint,
+	
+	// chart.angular will be set to true when a gauge series is present, and this will
+	// be used on the axes
+	angular: true, 
+	
+	/* *
+	 * Extend the bindAxes method by adding radial features to the axes
+	 * /
+	_bindAxes: function () {
+		Series.prototype.bindAxes.call(this);
+		
+		extend(this.xAxis, gaugeXAxisMixin);
+		extend(this.yAxis, radialAxisMixin);
+		this.yAxis.onBind();
+	},*/
+	
+	/**
+	 * Calculate paths etc
+	 */
+	translate: function () {
+		
+		var series = this,
+			yAxis = series.yAxis,
+			center = yAxis.center;
+			
+		series.generatePoints();
+		
+		each(series.points, function (point) {
+			
+			var dialOptions = merge(series.options.dial, point.dial),
+				radius = (pInt(pick(dialOptions.radius, 80)) * center[2]) / 200,
+				baseLength = (pInt(pick(dialOptions.baseLength, 70)) * radius) / 100,
+				rearLength = (pInt(pick(dialOptions.rearLength, 10)) * radius) / 100,
+				baseWidth = dialOptions.baseWidth || 3,
+				topWidth = dialOptions.topWidth || 1;
+				
+			point.shapeType = 'path';
+			point.shapeArgs = {
+				d: dialOptions.path || [
+					'M', 
+					-rearLength, -baseWidth / 2, 
+					'L', 
+					baseLength, -baseWidth / 2,
+					radius, -topWidth / 2,
+					radius, topWidth / 2,
+					baseLength, baseWidth / 2,
+					-rearLength, baseWidth / 2,
+					'z'
+				],
+				translateX: center[0],
+				translateY: center[1],
+				rotation: (yAxis.startAngleRad + yAxis.translate(point.y, null, null, null, true)) * 180 / Math.PI
+			};
+			
+			// Positions for data label
+			point.plotX = center[0];
+			point.plotY = center[1];
+		});
+	},
+	
+	/**
+	 * Draw the points where each point is one needle
+	 */
+	drawPoints: function () {
+		
+		var series = this,
+			center = series.yAxis.center,
+			pivot = series.pivot,
+			options = series.options,
+			pivotOptions = options.pivot,
+			renderer = series.chart.renderer;
+		
+		each(series.points, function (point) {
+			
+			var graphic = point.graphic,
+				shapeArgs = point.shapeArgs,
+				d = shapeArgs.d,
+				dialOptions = merge(options.dial, point.dial); // #1233
+			
+			if (graphic) {
+				graphic.animate(shapeArgs);
+				shapeArgs.d = d; // animate alters it
+			} else {
+				point.graphic = renderer[point.shapeType](shapeArgs)
+					.attr({
+						stroke: dialOptions.borderColor || 'none',
+						'stroke-width': dialOptions.borderWidth || 0,
+						fill: dialOptions.backgroundColor || 'black',
+						rotation: shapeArgs.rotation // required by VML when animation is false
+					})
+					.add(series.group);
+			}
+		});
+		
+		// Add or move the pivot
+		if (pivot) {
+			pivot.animate({ // #1235
+				translateX: center[0],
+				translateY: center[1]
+			});
+		} else {
+			series.pivot = renderer.circle(0, 0, pick(pivotOptions.radius, 5))
+				.attr({
+					'stroke-width': pivotOptions.borderWidth || 0,
+					stroke: pivotOptions.borderColor || 'silver',
+					fill: pivotOptions.backgroundColor || 'black'
+				})
+				.translate(center[0], center[1])
+				.add(series.group);
+		}
+	},
+	
+	/**
+	 * Animate the arrow up from startAngle
+	 */
+	animate: function () {
+		var series = this;
+
+		each(series.points, function (point) {
+			var graphic = point.graphic;
+
+			if (graphic) {
+				// start value
+				graphic.attr({
+					rotation: series.yAxis.startAngleRad * 180 / Math.PI
+				});
+
+				// animate
+				graphic.animate({
+					rotation: point.shapeArgs.rotation
+				}, series.options.animation);
+			}
+		});
+
+		// delete this function to allow it only once
+		series.animate = null;
+	},
+	
+	render: function () {
+		this.group = this.plotGroup(
+			'group', 
+			'series', 
+			this.visible ? 'visible' : 'hidden', 
+			this.options.zIndex, 
+			this.chart.seriesGroup
+		);
+		seriesTypes.pie.prototype.render.call(this);
+		this.group.clip(this.chart.clipRect);
+	},
+	
+	setData: seriesTypes.pie.prototype.setData,
+	drawTracker: seriesTypes.column.prototype.drawTracker
+};
+seriesTypes.gauge = Highcharts.extendClass(seriesTypes.line, GaugeSeries);/**
+ * Extensions for polar charts. Additionally, much of the geometry required for polar charts is
+ * gathered in RadialAxes.js.
+ * 
+ */
+
+var seriesProto = Series.prototype,
+	mouseTrackerProto = Highcharts.MouseTracker.prototype;
+
+
+
+/**
+ * Translate a point's plotX and plotY from the internal angle and radius measures to 
+ * true plotX, plotY coordinates
+ */
+seriesProto.toXY = function (point) {
+	var xy,
+		chart = this.chart,
+		plotX = point.plotX,
+		plotY = point.plotY;
+	
+	// Save rectangular plotX, plotY for later computation
+	point.rectPlotX = plotX;
+	point.rectPlotY = plotY;
+	
+	// Record the angle in degrees for use in tooltip
+	point.deg = plotX / Math.PI * 180;
+	
+	// Find the polar plotX and plotY
+	xy = this.xAxis.postTranslate(point.plotX, this.yAxis.len - plotY);
+	point.plotX = point.polarPlotX = xy.x - chart.plotLeft;
+	point.plotY = point.polarPlotY = xy.y - chart.plotTop;
+};
+
+
+/**
+ * Add some special init logic to areas and areasplines
+ */
+function initArea(proceed, chart, options) {
+	proceed.call(this, chart, options);
+	if (this.chart.polar) {
+		
+		/**
+		 * Overridden method to close a segment path. While in a cartesian plane the area 
+		 * goes down to the threshold, in the polar chart it goes to the center.
+		 */
+		this.closeSegment = function (path) {
+			var center = this.xAxis.center;
+			path.push(
+				'L',
+				center[0],
+				center[1]
+			);			
+		};
+		
+		// Instead of complicated logic to draw an area around the inner area in a stack,
+		// just draw it behind
+		this.closedStacks = true;
+	}
+}
+wrap(seriesTypes.area.prototype, 'init', initArea);
+wrap(seriesTypes.areaspline.prototype, 'init', initArea);
+		
+
+/**
+ * Overridden method for calculating a spline from one point to the next
+ */
+wrap(seriesTypes.spline.prototype, 'getPointSpline', function (proceed, segment, point, i) {
+	
+	var ret,
+		smoothing = 1.5, // 1 means control points midway between points, 2 means 1/3 from the point, 3 is 1/4 etc;
+		denom = smoothing + 1,
+		plotX, 
+		plotY,
+		lastPoint,
+		nextPoint,
+		lastX,
+		lastY,
+		nextX,
+		nextY,
+		leftContX,
+		leftContY,
+		rightContX,
+		rightContY,
+		distanceLeftControlPoint,
+		distanceRightControlPoint,
+		leftContAngle,
+		rightContAngle,
+		jointAngle;
+		
+		
+	if (this.chart.polar) {
+		
+		plotX = point.plotX;
+		plotY = point.plotY;
+		lastPoint = segment[i - 1];
+		nextPoint = segment[i + 1];
+			
+		// Connect ends
+		if (this.connectEnds) {
+			if (!lastPoint) {
+				lastPoint = segment[segment.length - 2]; // not the last but the second last, because the segment is already connected
+			}
+			if (!nextPoint) {
+				nextPoint = segment[1];
+			}	
+		}
+
+		// find control points
+		if (lastPoint && nextPoint) {
+		
+			lastX = lastPoint.plotX;
+			lastY = lastPoint.plotY;
+			nextX = nextPoint.plotX;
+			nextY = nextPoint.plotY;
+			leftContX = (smoothing * plotX + lastX) / denom;
+			leftContY = (smoothing * plotY + lastY) / denom;
+			rightContX = (smoothing * plotX + nextX) / denom;
+			rightContY = (smoothing * plotY + nextY) / denom;
+			distanceLeftControlPoint = Math.sqrt(Math.pow(leftContX - plotX, 2) + Math.pow(leftContY - plotY, 2));
+			distanceRightControlPoint = Math.sqrt(Math.pow(rightContX - plotX, 2) + Math.pow(rightContY - plotY, 2));
+			leftContAngle = Math.atan2(leftContY - plotY, leftContX - plotX);
+			rightContAngle = Math.atan2(rightContY - plotY, rightContX - plotX);
+			jointAngle = (Math.PI / 2) + ((leftContAngle + rightContAngle) / 2);
+				
+				
+			// Ensure the right direction, jointAngle should be in the same quadrant as leftContAngle
+			if (Math.abs(leftContAngle - jointAngle) > Math.PI / 2) {
+				jointAngle -= Math.PI;
+			}
+			
+			// Find the corrected control points for a spline straight through the point
+			leftContX = plotX + Math.cos(jointAngle) * distanceLeftControlPoint;
+			leftContY = plotY + Math.sin(jointAngle) * distanceLeftControlPoint;
+			rightContX = plotX + Math.cos(Math.PI + jointAngle) * distanceRightControlPoint;
+			rightContY = plotY + Math.sin(Math.PI + jointAngle) * distanceRightControlPoint;
+			
+			// Record for drawing in next point
+			point.rightContX = rightContX;
+			point.rightContY = rightContY;
+
+		}
+		
+		
+		// moveTo or lineTo
+		if (!i) {
+			ret = ['M', plotX, plotY];
+		} else { // curve from last point to this
+			ret = [
+				'C',
+				lastPoint.rightContX || lastPoint.plotX,
+				lastPoint.rightContY || lastPoint.plotY,
+				leftContX || plotX,
+				leftContY || plotY,
+				plotX,
+				plotY
+			];
+			lastPoint.rightContX = lastPoint.rightContY = null; // reset for updating series later
+		}
+		
+		
+	} else {
+		ret = proceed.call(this, segment, point, i);
+	}
+	return ret;
+});
+
+/**
+ * Extend translate. The plotX and plotY values are computed as if the polar chart were a
+ * cartesian plane, where plotX denotes the angle in radians and (yAxis.len - plotY) is the pixel distance from
+ * center. 
+ */
+wrap(seriesProto, 'translate', function (proceed) {
+		
+	// Run uber method
+	proceed.call(this);
+	
+	// Postprocess plot coordinates
+	if (this.chart.polar && !this.preventPostTranslate) {
+		var points = this.points,
+			i = points.length;
+		while (i--) {
+			// Translate plotX, plotY from angle and radius to true plot coordinates
+			this.toXY(points[i]);
+		}
+	}
+});
+
+/** 
+ * Extend getSegmentPath to allow connecting ends across 0 to provide a closed circle in 
+ * line-like series.
+ */
+wrap(seriesProto, 'getSegmentPath', function (proceed, segment) {
+		
+	var points = this.points;
+	
+	// Connect the path
+	if (this.chart.polar && this.options.connectEnds !== false && 
+			segment[segment.length - 1] === points[points.length - 1] && points[0].y !== null) {
+		this.connectEnds = true; // re-used in splines
+		segment = [].concat(segment, [points[0]]);
+	}
+	
+	// Run uber method
+	return proceed.call(this, segment);
+	
+});
+
+
+function polarAnimate(proceed, init) {
+	var chart = this.chart,
+		animation = this.options.animation,
+		group = this.group,
+		markerGroup = this.markerGroup,
+		center = this.xAxis.center,
+		plotLeft = chart.plotLeft,
+		plotTop = chart.plotTop,
+		attribs;
+
+	// Specific animation for polar charts
+	if (chart.polar) {
+		
+		// Enable animation on polar charts only in SVG. In VML, the scaling is different, plus animation
+		// would be so slow it would't matter.
+		if (chart.renderer.isSVG) {
+
+			if (animation === true) {
+				animation = {};
+			}
+	
+			// Initialize the animation
+			if (init) {
+				
+				// Create an SVG specific attribute setter for scaleX and scaleY
+				group.attrSetters.scaleX = group.attrSetters.scaleY = function (value, key) {
+					this[key] = value;
+					if (this.scaleX !== UNDEFINED && this.scaleY !== UNDEFINED) {
+						this.element.setAttribute('transform', 'translate(' + this.translateX + ',' + this.translateY + ') scale(' + 
+							this.scaleX + ',' + this.scaleY + ')');
+					}
+					return false;
+				};
+				
+				// Scale down the group and place it in the center
+				attribs = {
+					translateX: center[0] + plotLeft,
+					translateY: center[1] + plotTop,
+					scaleX: 0,
+					scaleY: 0
+				};
+					
+				group.attr(attribs);
+				if (markerGroup) {
+					markerGroup.attrSetters = group.attrSetters;
+					markerGroup.attr(attribs);
+				}
+				
+			// Run the animation
+			} else {
+				attribs = {
+					translateX: plotLeft,
+					translateY: plotTop,
+					scaleX: 1,
+					scaleY: 1
+				};
+				group.animate(attribs, animation);
+				if (markerGroup) {
+					markerGroup.animate(attribs, animation);
+				}
+				
+				// Delete this function to allow it only once
+				this.animate = null;
+			}
+		}
+	
+	// For non-polar charts, revert to the basic animation
+	} else {
+		proceed.call(this, init);
+	} 
+}
+
+// Define the animate method for both regular series and column series and their derivatives
+wrap(seriesProto, 'animate', polarAnimate);
+wrap(colProto, 'animate', polarAnimate);
+
+
+/**
+ * Throw in a couple of properties to let setTooltipPoints know we're indexing the points
+ * in degrees (0-360), not plot pixel width.
+ */
+wrap(seriesProto, 'setTooltipPoints', function (proceed, renew) {
+		
+	if (this.chart.polar) {
+		extend(this.xAxis, {
+			tooltipLen: 360, // degrees are the resolution unit of the tooltipPoints array
+			tooltipPosName: 'deg'
+		});	
+	}
+	
+	// Run uber method
+	return proceed.call(this, renew);
+});
+
+
+/**
+ * Extend the column prototype's translate method
+ */
+wrap(colProto, 'translate', function (proceed) {
+		
+	var xAxis = this.xAxis,
+		len = this.yAxis.len,
+		center = xAxis.center,
+		startAngleRad = xAxis.startAngleRad,
+		renderer = this.chart.renderer,
+		start,
+		points,
+		point,
+		i;
+	
+	this.preventPostTranslate = true;
+	
+	// Run uber method
+	proceed.call(this);
+	
+	// Postprocess plot coordinates
+	if (xAxis.isRadial) {
+		points = this.points;
+		i = points.length;
+		while (i--) {
+			point = points[i];
+			start = point.barX + startAngleRad;
+			point.shapeType = 'path';
+			point.shapeArgs = {
+				d: renderer.symbols.arc(
+					center[0],
+					center[1],
+					len - point.plotY,
+					null, 
+					{
+						start: start,
+						end: start + point.pointWidth,
+						innerR: len - pick(point.yBottom, len)
+					}
+				)
+			};
+			this.toXY(point); // provide correct plotX, plotY for tooltip
+		}
+	}
+});
+
+
+/**
+ * Align column data labels outside the columns. #1199.
+ */
+wrap(colProto, 'alignDataLabel', function (proceed, point, dataLabel, options, alignTo, isNew) {
+	
+	if (this.chart.polar) {
+		var angle = point.rectPlotX / Math.PI * 180,
+			align,
+			verticalAlign;
+		
+		// Align nicely outside the perimeter of the columns
+		if (options.align === null) {
+			if (angle > 20 && angle < 160) {
+				align = 'left'; // right hemisphere
+			} else if (angle > 200 && angle < 340) {
+				align = 'right'; // left hemisphere
+			} else {
+				align = 'center'; // top or bottom
+			}
+			options.align = align;
+		}
+		if (options.verticalAlign === null) {
+			if (angle < 45 || angle > 315) {
+				verticalAlign = 'bottom'; // top part
+			} else if (angle > 135 && angle < 225) {
+				verticalAlign = 'top'; // bottom part
+			} else {
+				verticalAlign = 'middle'; // left or right
+			}
+			options.verticalAlign = verticalAlign;
+		}
+		
+		seriesProto.alignDataLabel.call(this, point, dataLabel, options, alignTo, isNew);
+	} else {
+		proceed.call(this, point, dataLabel, options, alignTo, isNew);
+	}
+	
+});
+
+/**
+ * Extend the mouse tracker to return the tooltip position index in terms of
+ * degrees rather than pixels
+ */
+wrap(mouseTrackerProto, 'getIndex', function (proceed, e) {
+	var ret,
+		chart = this.chart,
+		center,
+		x,
+		y;
+	
+	if (chart.polar) {
+		center = chart.xAxis[0].center;
+		x = e.chartX - center[0] - chart.plotLeft;
+		y = e.chartY - center[1] - chart.plotTop;
+		
+		ret = 180 - Math.round(Math.atan2(x, y) / Math.PI * 180);
+	
+	} else {
+	
+		// Run uber method
+		ret = proceed.call(this, e);
+	}
+	return ret;
+});
+
+/**
+ * Extend getMouseCoordinates to prepare for polar axis values
+ */
+wrap(mouseTrackerProto, 'getMouseCoordinates', function (proceed, e) {
+	var chart = this.chart,
+		ret = {
+			xAxis: [],
+			yAxis: []
+		};
+	
+	if (chart.polar) {	
+
+		each(chart.axes, function (axis) {
+			var isXAxis = axis.isXAxis,
+				center = axis.center,
+				x = e.chartX - center[0] - chart.plotLeft,
+				y = e.chartY - center[1] - chart.plotTop;
+			
+			ret[isXAxis ? 'xAxis' : 'yAxis'].push({
+				axis: axis,
+				value: axis.translate(
+					isXAxis ?
+						Math.PI - Math.atan2(x, y) : // angle 
+						Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)), // distance from center
+					true
+				)
+			});
+		});
+		
+	} else {
+		ret = proceed.call(this, e);
+	}
+	
+	return ret;
+});
+}(Highcharts));


[16/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular-scenario.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular-scenario.js b/portal/js/libs/angular-1.2.5/angular-scenario.js
new file mode 100755
index 0000000..a1e1ab6
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular-scenario.js
@@ -0,0 +1,32374 @@
+/*!
+ * jQuery JavaScript Library v1.10.2
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2013-07-03T13:48Z
+ */
+(function( window, undefined ) {'use strict';
+
+// Can't do this because several apps including ASP.NET trace
+// the stack via arguments.caller.callee and Firefox dies if
+// you try to trace through "use strict" call chains. (#13335)
+// Support: Firefox 18+
+//
+
+var
+	// The deferred used on DOM ready
+	readyList,
+
+	// A central reference to the root jQuery(document)
+	rootjQuery,
+
+	// Support: IE<10
+	// For `typeof xmlNode.method` instead of `xmlNode.method !== undefined`
+	core_strundefined = typeof undefined,
+
+	// Use the correct document accordingly with window argument (sandbox)
+	location = window.location,
+	document = window.document,
+	docElem = document.documentElement,
+
+	// Map over jQuery in case of overwrite
+	_jQuery = window.jQuery,
+
+	// Map over the $ in case of overwrite
+	_$ = window.$,
+
+	// [[Class]] -> type pairs
+	class2type = {},
+
+	// List of deleted data cache ids, so we can reuse them
+	core_deletedIds = [],
+
+	core_version = "1.10.2",
+
+	// Save a reference to some core methods
+	core_concat = core_deletedIds.concat,
+	core_push = core_deletedIds.push,
+	core_slice = core_deletedIds.slice,
+	core_indexOf = core_deletedIds.indexOf,
+	core_toString = class2type.toString,
+	core_hasOwn = class2type.hasOwnProperty,
+	core_trim = core_version.trim,
+
+	// Define a local copy of jQuery
+	jQuery = function( selector, context ) {
+		// The jQuery object is actually just the init constructor 'enhanced'
+		return new jQuery.fn.init( selector, context, rootjQuery );
+	},
+
+	// Used for matching numbers
+	core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
+
+	// Used for splitting on whitespace
+	core_rnotwhite = /\S+/g,
+
+	// Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
+	rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+	// A simple way to check for HTML strings
+	// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+	// Strict HTML recognition (#11290: must start with <)
+	rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
+
+	// Match a standalone tag
+	rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
+
+	// JSON RegExp
+	rvalidchars = /^[\],:{}\s]*$/,
+	rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+	rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
+	rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
+
+	// Matches dashed string for camelizing
+	rmsPrefix = /^-ms-/,
+	rdashAlpha = /-([\da-z])/gi,
+
+	// Used by jQuery.camelCase as callback to replace()
+	fcamelCase = function( all, letter ) {
+		return letter.toUpperCase();
+	},
+
+	// The ready event handler
+	completed = function( event ) {
+
+		// readyState === "complete" is good enough for us to call the dom ready in oldIE
+		if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) {
+			detach();
+			jQuery.ready();
+		}
+	},
+	// Clean-up method for dom ready events
+	detach = function() {
+		if ( document.addEventListener ) {
+			document.removeEventListener( "DOMContentLoaded", completed, false );
+			window.removeEventListener( "load", completed, false );
+
+		} else {
+			document.detachEvent( "onreadystatechange", completed );
+			window.detachEvent( "onload", completed );
+		}
+	};
+
+jQuery.fn = jQuery.prototype = {
+	// The current version of jQuery being used
+	jquery: core_version,
+
+	constructor: jQuery,
+	init: function( selector, context, rootjQuery ) {
+		var match, elem;
+
+		// HANDLE: $(""), $(null), $(undefined), $(false)
+		if ( !selector ) {
+			return this;
+		}
+
+		// Handle HTML strings
+		if ( typeof selector === "string" ) {
+			if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
+				// Assume that strings that start and end with <> are HTML and skip the regex check
+				match = [ null, selector, null ];
+
+			} else {
+				match = rquickExpr.exec( selector );
+			}
+
+			// Match html or make sure no context is specified for #id
+			if ( match && (match[1] || !context) ) {
+
+				// HANDLE: $(html) -> $(array)
+				if ( match[1] ) {
+					context = context instanceof jQuery ? context[0] : context;
+
+					// scripts is true for back-compat
+					jQuery.merge( this, jQuery.parseHTML(
+						match[1],
+						context && context.nodeType ? context.ownerDocument || context : document,
+						true
+					) );
+
+					// HANDLE: $(html, props)
+					if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
+						for ( match in context ) {
+							// Properties of context are called as methods if possible
+							if ( jQuery.isFunction( this[ match ] ) ) {
+								this[ match ]( context[ match ] );
+
+							// ...and otherwise set as attributes
+							} else {
+								this.attr( match, context[ match ] );
+							}
+						}
+					}
+
+					return this;
+
+				// HANDLE: $(#id)
+				} else {
+					elem = document.getElementById( match[2] );
+
+					// Check parentNode to catch when Blackberry 4.6 returns
+					// nodes that are no longer in the document #6963
+					if ( elem && elem.parentNode ) {
+						// Handle the case where IE and Opera return items
+						// by name instead of ID
+						if ( elem.id !== match[2] ) {
+							return rootjQuery.find( selector );
+						}
+
+						// Otherwise, we inject the element directly into the jQuery object
+						this.length = 1;
+						this[0] = elem;
+					}
+
+					this.context = document;
+					this.selector = selector;
+					return this;
+				}
+
+			// HANDLE: $(expr, $(...))
+			} else if ( !context || context.jquery ) {
+				return ( context || rootjQuery ).find( selector );
+
+			// HANDLE: $(expr, context)
+			// (which is just equivalent to: $(context).find(expr)
+			} else {
+				return this.constructor( context ).find( selector );
+			}
+
+		// HANDLE: $(DOMElement)
+		} else if ( selector.nodeType ) {
+			this.context = this[0] = selector;
+			this.length = 1;
+			return this;
+
+		// HANDLE: $(function)
+		// Shortcut for document ready
+		} else if ( jQuery.isFunction( selector ) ) {
+			return rootjQuery.ready( selector );
+		}
+
+		if ( selector.selector !== undefined ) {
+			this.selector = selector.selector;
+			this.context = selector.context;
+		}
+
+		return jQuery.makeArray( selector, this );
+	},
+
+	// Start with an empty selector
+	selector: "",
+
+	// The default length of a jQuery object is 0
+	length: 0,
+
+	toArray: function() {
+		return core_slice.call( this );
+	},
+
+	// Get the Nth element in the matched element set OR
+	// Get the whole matched element set as a clean array
+	get: function( num ) {
+		return num == null ?
+
+			// Return a 'clean' array
+			this.toArray() :
+
+			// Return just the object
+			( num < 0 ? this[ this.length + num ] : this[ num ] );
+	},
+
+	// Take an array of elements and push it onto the stack
+	// (returning the new matched element set)
+	pushStack: function( elems ) {
+
+		// Build a new jQuery matched element set
+		var ret = jQuery.merge( this.constructor(), elems );
+
+		// Add the old object onto the stack (as a reference)
+		ret.prevObject = this;
+		ret.context = this.context;
+
+		// Return the newly-formed element set
+		return ret;
+	},
+
+	// Execute a callback for every element in the matched set.
+	// (You can seed the arguments with an array of args, but this is
+	// only used internally.)
+	each: function( callback, args ) {
+		return jQuery.each( this, callback, args );
+	},
+
+	ready: function( fn ) {
+		// Add the callback
+		jQuery.ready.promise().done( fn );
+
+		return this;
+	},
+
+	slice: function() {
+		return this.pushStack( core_slice.apply( this, arguments ) );
+	},
+
+	first: function() {
+		return this.eq( 0 );
+	},
+
+	last: function() {
+		return this.eq( -1 );
+	},
+
+	eq: function( i ) {
+		var len = this.length,
+			j = +i + ( i < 0 ? len : 0 );
+		return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
+	},
+
+	map: function( callback ) {
+		return this.pushStack( jQuery.map(this, function( elem, i ) {
+			return callback.call( elem, i, elem );
+		}));
+	},
+
+	end: function() {
+		return this.prevObject || this.constructor(null);
+	},
+
+	// For internal use only.
+	// Behaves like an Array's method, not like a jQuery method.
+	push: core_push,
+	sort: [].sort,
+	splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+	var src, copyIsArray, copy, name, options, clone,
+		target = arguments[0] || {},
+		i = 1,
+		length = arguments.length,
+		deep = false;
+
+	// Handle a deep copy situation
+	if ( typeof target === "boolean" ) {
+		deep = target;
+		target = arguments[1] || {};
+		// skip the boolean and the target
+		i = 2;
+	}
+
+	// Handle case when target is a string or something (possible in deep copy)
+	if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+		target = {};
+	}
+
+	// extend jQuery itself if only one argument is passed
+	if ( length === i ) {
+		target = this;
+		--i;
+	}
+
+	for ( ; i < length; i++ ) {
+		// Only deal with non-null/undefined values
+		if ( (options = arguments[ i ]) != null ) {
+			// Extend the base object
+			for ( name in options ) {
+				src = target[ name ];
+				copy = options[ name ];
+
+				// Prevent never-ending loop
+				if ( target === copy ) {
+					continue;
+				}
+
+				// Recurse if we're merging plain objects or arrays
+				if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+					if ( copyIsArray ) {
+						copyIsArray = false;
+						clone = src && jQuery.isArray(src) ? src : [];
+
+					} else {
+						clone = src && jQuery.isPlainObject(src) ? src : {};
+					}
+
+					// Never move original objects, clone them
+					target[ name ] = jQuery.extend( deep, clone, copy );
+
+				// Don't bring in undefined values
+				} else if ( copy !== undefined ) {
+					target[ name ] = copy;
+				}
+			}
+		}
+	}
+
+	// Return the modified object
+	return target;
+};
+
+jQuery.extend({
+	// Unique for each copy of jQuery on the page
+	// Non-digits removed to match rinlinejQuery
+	expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ),
+
+	noConflict: function( deep ) {
+		if ( window.$ === jQuery ) {
+			window.$ = _$;
+		}
+
+		if ( deep && window.jQuery === jQuery ) {
+			window.jQuery = _jQuery;
+		}
+
+		return jQuery;
+	},
+
+	// Is the DOM ready to be used? Set to true once it occurs.
+	isReady: false,
+
+	// A counter to track how many items to wait for before
+	// the ready event fires. See #6781
+	readyWait: 1,
+
+	// Hold (or release) the ready event
+	holdReady: function( hold ) {
+		if ( hold ) {
+			jQuery.readyWait++;
+		} else {
+			jQuery.ready( true );
+		}
+	},
+
+	// Handle when the DOM is ready
+	ready: function( wait ) {
+
+		// Abort if there are pending holds or we're already ready
+		if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
+			return;
+		}
+
+		// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+		if ( !document.body ) {
+			return setTimeout( jQuery.ready );
+		}
+
+		// Remember that the DOM is ready
+		jQuery.isReady = true;
+
+		// If a normal DOM Ready event fired, decrement, and wait if need be
+		if ( wait !== true && --jQuery.readyWait > 0 ) {
+			return;
+		}
+
+		// If there are functions bound, to execute
+		readyList.resolveWith( document, [ jQuery ] );
+
+		// Trigger any bound ready events
+		if ( jQuery.fn.trigger ) {
+			jQuery( document ).trigger("ready").off("ready");
+		}
+	},
+
+	// See test/unit/core.js for details concerning isFunction.
+	// Since version 1.3, DOM methods and functions like alert
+	// aren't supported. They return false on IE (#2968).
+	isFunction: function( obj ) {
+		return jQuery.type(obj) === "function";
+	},
+
+	isArray: Array.isArray || function( obj ) {
+		return jQuery.type(obj) === "array";
+	},
+
+	isWindow: function( obj ) {
+		/* jshint eqeqeq: false */
+		return obj != null && obj == obj.window;
+	},
+
+	isNumeric: function( obj ) {
+		return !isNaN( parseFloat(obj) ) && isFinite( obj );
+	},
+
+	type: function( obj ) {
+		if ( obj == null ) {
+			return String( obj );
+		}
+		return typeof obj === "object" || typeof obj === "function" ?
+			class2type[ core_toString.call(obj) ] || "object" :
+			typeof obj;
+	},
+
+	isPlainObject: function( obj ) {
+		var key;
+
+		// Must be an Object.
+		// Because of IE, we also have to check the presence of the constructor property.
+		// Make sure that DOM nodes and window objects don't pass through, as well
+		if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+			return false;
+		}
+
+		try {
+			// Not own constructor property must be Object
+			if ( obj.constructor &&
+				!core_hasOwn.call(obj, "constructor") &&
+				!core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+				return false;
+			}
+		} catch ( e ) {
+			// IE8,9 Will throw exceptions on certain host objects #9897
+			return false;
+		}
+
+		// Support: IE<9
+		// Handle iteration over inherited properties before own properties.
+		if ( jQuery.support.ownLast ) {
+			for ( key in obj ) {
+				return core_hasOwn.call( obj, key );
+			}
+		}
+
+		// Own properties are enumerated firstly, so to speed up,
+		// if last one is own, then all properties are own.
+		for ( key in obj ) {}
+
+		return key === undefined || core_hasOwn.call( obj, key );
+	},
+
+	isEmptyObject: function( obj ) {
+		var name;
+		for ( name in obj ) {
+			return false;
+		}
+		return true;
+	},
+
+	error: function( msg ) {
+		throw new Error( msg );
+	},
+
+	// data: string of html
+	// context (optional): If specified, the fragment will be created in this context, defaults to document
+	// keepScripts (optional): If true, will include scripts passed in the html string
+	parseHTML: function( data, context, keepScripts ) {
+		if ( !data || typeof data !== "string" ) {
+			return null;
+		}
+		if ( typeof context === "boolean" ) {
+			keepScripts = context;
+			context = false;
+		}
+		context = context || document;
+
+		var parsed = rsingleTag.exec( data ),
+			scripts = !keepScripts && [];
+
+		// Single tag
+		if ( parsed ) {
+			return [ context.createElement( parsed[1] ) ];
+		}
+
+		parsed = jQuery.buildFragment( [ data ], context, scripts );
+		if ( scripts ) {
+			jQuery( scripts ).remove();
+		}
+		return jQuery.merge( [], parsed.childNodes );
+	},
+
+	parseJSON: function( data ) {
+		// Attempt to parse using the native JSON parser first
+		if ( window.JSON && window.JSON.parse ) {
+			return window.JSON.parse( data );
+		}
+
+		if ( data === null ) {
+			return data;
+		}
+
+		if ( typeof data === "string" ) {
+
+			// Make sure leading/trailing whitespace is removed (IE can't handle it)
+			data = jQuery.trim( data );
+
+			if ( data ) {
+				// Make sure the incoming data is actual JSON
+				// Logic borrowed from http://json.org/json2.js
+				if ( rvalidchars.test( data.replace( rvalidescape, "@" )
+					.replace( rvalidtokens, "]" )
+					.replace( rvalidbraces, "")) ) {
+
+					return ( new Function( "return " + data ) )();
+				}
+			}
+		}
+
+		jQuery.error( "Invalid JSON: " + data );
+	},
+
+	// Cross-browser xml parsing
+	parseXML: function( data ) {
+		var xml, tmp;
+		if ( !data || typeof data !== "string" ) {
+			return null;
+		}
+		try {
+			if ( window.DOMParser ) { // Standard
+				tmp = new DOMParser();
+				xml = tmp.parseFromString( data , "text/xml" );
+			} else { // IE
+				xml = new ActiveXObject( "Microsoft.XMLDOM" );
+				xml.async = "false";
+				xml.loadXML( data );
+			}
+		} catch( e ) {
+			xml = undefined;
+		}
+		if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
+			jQuery.error( "Invalid XML: " + data );
+		}
+		return xml;
+	},
+
+	noop: function() {},
+
+	// Evaluates a script in a global context
+	// Workarounds based on findings by Jim Driscoll
+	// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+	globalEval: function( data ) {
+		if ( data && jQuery.trim( data ) ) {
+			// We use execScript on Internet Explorer
+			// We use an anonymous function so that context is window
+			// rather than jQuery in Firefox
+			( window.execScript || function( data ) {
+				window[ "eval" ].call( window, data );
+			} )( data );
+		}
+	},
+
+	// Convert dashed to camelCase; used by the css and data modules
+	// Microsoft forgot to hump their vendor prefix (#9572)
+	camelCase: function( string ) {
+		return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+	},
+
+	nodeName: function( elem, name ) {
+		return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+	},
+
+	// args is for internal usage only
+	each: function( obj, callback, args ) {
+		var value,
+			i = 0,
+			length = obj.length,
+			isArray = isArraylike( obj );
+
+		if ( args ) {
+			if ( isArray ) {
+				for ( ; i < length; i++ ) {
+					value = callback.apply( obj[ i ], args );
+
+					if ( value === false ) {
+						break;
+					}
+				}
+			} else {
+				for ( i in obj ) {
+					value = callback.apply( obj[ i ], args );
+
+					if ( value === false ) {
+						break;
+					}
+				}
+			}
+
+		// A special, fast, case for the most common use of each
+		} else {
+			if ( isArray ) {
+				for ( ; i < length; i++ ) {
+					value = callback.call( obj[ i ], i, obj[ i ] );
+
+					if ( value === false ) {
+						break;
+					}
+				}
+			} else {
+				for ( i in obj ) {
+					value = callback.call( obj[ i ], i, obj[ i ] );
+
+					if ( value === false ) {
+						break;
+					}
+				}
+			}
+		}
+
+		return obj;
+	},
+
+	// Use native String.trim function wherever possible
+	trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
+		function( text ) {
+			return text == null ?
+				"" :
+				core_trim.call( text );
+		} :
+
+		// Otherwise use our own trimming functionality
+		function( text ) {
+			return text == null ?
+				"" :
+				( text + "" ).replace( rtrim, "" );
+		},
+
+	// results is for internal usage only
+	makeArray: function( arr, results ) {
+		var ret = results || [];
+
+		if ( arr != null ) {
+			if ( isArraylike( Object(arr) ) ) {
+				jQuery.merge( ret,
+					typeof arr === "string" ?
+					[ arr ] : arr
+				);
+			} else {
+				core_push.call( ret, arr );
+			}
+		}
+
+		return ret;
+	},
+
+	inArray: function( elem, arr, i ) {
+		var len;
+
+		if ( arr ) {
+			if ( core_indexOf ) {
+				return core_indexOf.call( arr, elem, i );
+			}
+
+			len = arr.length;
+			i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
+
+			for ( ; i < len; i++ ) {
+				// Skip accessing in sparse arrays
+				if ( i in arr && arr[ i ] === elem ) {
+					return i;
+				}
+			}
+		}
+
+		return -1;
+	},
+
+	merge: function( first, second ) {
+		var l = second.length,
+			i = first.length,
+			j = 0;
+
+		if ( typeof l === "number" ) {
+			for ( ; j < l; j++ ) {
+				first[ i++ ] = second[ j ];
+			}
+		} else {
+			while ( second[j] !== undefined ) {
+				first[ i++ ] = second[ j++ ];
+			}
+		}
+
+		first.length = i;
+
+		return first;
+	},
+
+	grep: function( elems, callback, inv ) {
+		var retVal,
+			ret = [],
+			i = 0,
+			length = elems.length;
+		inv = !!inv;
+
+		// Go through the array, only saving the items
+		// that pass the validator function
+		for ( ; i < length; i++ ) {
+			retVal = !!callback( elems[ i ], i );
+			if ( inv !== retVal ) {
+				ret.push( elems[ i ] );
+			}
+		}
+
+		return ret;
+	},
+
+	// arg is for internal usage only
+	map: function( elems, callback, arg ) {
+		var value,
+			i = 0,
+			length = elems.length,
+			isArray = isArraylike( elems ),
+			ret = [];
+
+		// Go through the array, translating each of the items to their
+		if ( isArray ) {
+			for ( ; i < length; i++ ) {
+				value = callback( elems[ i ], i, arg );
+
+				if ( value != null ) {
+					ret[ ret.length ] = value;
+				}
+			}
+
+		// Go through every key on the object,
+		} else {
+			for ( i in elems ) {
+				value = callback( elems[ i ], i, arg );
+
+				if ( value != null ) {
+					ret[ ret.length ] = value;
+				}
+			}
+		}
+
+		// Flatten any nested arrays
+		return core_concat.apply( [], ret );
+	},
+
+	// A global GUID counter for objects
+	guid: 1,
+
+	// Bind a function to a context, optionally partially applying any
+	// arguments.
+	proxy: function( fn, context ) {
+		var args, proxy, tmp;
+
+		if ( typeof context === "string" ) {
+			tmp = fn[ context ];
+			context = fn;
+			fn = tmp;
+		}
+
+		// Quick check to determine if target is callable, in the spec
+		// this throws a TypeError, but we will just return undefined.
+		if ( !jQuery.isFunction( fn ) ) {
+			return undefined;
+		}
+
+		// Simulated bind
+		args = core_slice.call( arguments, 2 );
+		proxy = function() {
+			return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );
+		};
+
+		// Set the guid of unique handler to the same of original handler, so it can be removed
+		proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+		return proxy;
+	},
+
+	// Multifunctional method to get and set values of a collection
+	// The value/s can optionally be executed if it's a function
+	access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
+		var i = 0,
+			length = elems.length,
+			bulk = key == null;
+
+		// Sets many values
+		if ( jQuery.type( key ) === "object" ) {
+			chainable = true;
+			for ( i in key ) {
+				jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
+			}
+
+		// Sets one value
+		} else if ( value !== undefined ) {
+			chainable = true;
+
+			if ( !jQuery.isFunction( value ) ) {
+				raw = true;
+			}
+
+			if ( bulk ) {
+				// Bulk operations run against the entire set
+				if ( raw ) {
+					fn.call( elems, value );
+					fn = null;
+
+				// ...except when executing function values
+				} else {
+					bulk = fn;
+					fn = function( elem, key, value ) {
+						return bulk.call( jQuery( elem ), value );
+					};
+				}
+			}
+
+			if ( fn ) {
+				for ( ; i < length; i++ ) {
+					fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
+				}
+			}
+		}
+
+		return chainable ?
+			elems :
+
+			// Gets
+			bulk ?
+				fn.call( elems ) :
+				length ? fn( elems[0], key ) : emptyGet;
+	},
+
+	now: function() {
+		return ( new Date() ).getTime();
+	},
+
+	// A method for quickly swapping in/out CSS properties to get correct calculations.
+	// Note: this method belongs to the css module but it's needed here for the support module.
+	// If support gets modularized, this method should be moved back to the css module.
+	swap: function( elem, options, callback, args ) {
+		var ret, name,
+			old = {};
+
+		// Remember the old values, and insert the new ones
+		for ( name in options ) {
+			old[ name ] = elem.style[ name ];
+			elem.style[ name ] = options[ name ];
+		}
+
+		ret = callback.apply( elem, args || [] );
+
+		// Revert the old values
+		for ( name in options ) {
+			elem.style[ name ] = old[ name ];
+		}
+
+		return ret;
+	}
+});
+
+jQuery.ready.promise = function( obj ) {
+	if ( !readyList ) {
+
+		readyList = jQuery.Deferred();
+
+		// Catch cases where $(document).ready() is called after the browser event has already occurred.
+		// we once tried to use readyState "interactive" here, but it caused issues like the one
+		// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+		if ( document.readyState === "complete" ) {
+			// Handle it asynchronously to allow scripts the opportunity to delay ready
+			setTimeout( jQuery.ready );
+
+		// Standards-based browsers support DOMContentLoaded
+		} else if ( document.addEventListener ) {
+			// Use the handy event callback
+			document.addEventListener( "DOMContentLoaded", completed, false );
+
+			// A fallback to window.onload, that will always work
+			window.addEventListener( "load", completed, false );
+
+		// If IE event model is used
+		} else {
+			// Ensure firing before onload, maybe late but safe also for iframes
+			document.attachEvent( "onreadystatechange", completed );
+
+			// A fallback to window.onload, that will always work
+			window.attachEvent( "onload", completed );
+
+			// If IE and not a frame
+			// continually check to see if the document is ready
+			var top = false;
+
+			try {
+				top = window.frameElement == null && document.documentElement;
+			} catch(e) {}
+
+			if ( top && top.doScroll ) {
+				(function doScrollCheck() {
+					if ( !jQuery.isReady ) {
+
+						try {
+							// Use the trick by Diego Perini
+							// http://javascript.nwbox.com/IEContentLoaded/
+							top.doScroll("left");
+						} catch(e) {
+							return setTimeout( doScrollCheck, 50 );
+						}
+
+						// detach all dom ready events
+						detach();
+
+						// and execute any waiting functions
+						jQuery.ready();
+					}
+				})();
+			}
+		}
+	}
+	return readyList.promise( obj );
+};
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
+	class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+function isArraylike( obj ) {
+	var length = obj.length,
+		type = jQuery.type( obj );
+
+	if ( jQuery.isWindow( obj ) ) {
+		return false;
+	}
+
+	if ( obj.nodeType === 1 && length ) {
+		return true;
+	}
+
+	return type === "array" || type !== "function" &&
+		( length === 0 ||
+		typeof length === "number" && length > 0 && ( length - 1 ) in obj );
+}
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+/*!
+ * Sizzle CSS Selector Engine v1.10.2
+ * http://sizzlejs.com/
+ *
+ * Copyright 2013 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2013-07-03
+ */
+(function( window, undefined ) {
+
+var i,
+	support,
+	cachedruns,
+	Expr,
+	getText,
+	isXML,
+	compile,
+	outermostContext,
+	sortInput,
+
+	// Local document vars
+	setDocument,
+	document,
+	docElem,
+	documentIsHTML,
+	rbuggyQSA,
+	rbuggyMatches,
+	matches,
+	contains,
+
+	// Instance-specific data
+	expando = "sizzle" + -(new Date()),
+	preferredDoc = window.document,
+	dirruns = 0,
+	done = 0,
+	classCache = createCache(),
+	tokenCache = createCache(),
+	compilerCache = createCache(),
+	hasDuplicate = false,
+	sortOrder = function( a, b ) {
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+		}
+		return 0;
+	},
+
+	// General-purpose constants
+	strundefined = typeof undefined,
+	MAX_NEGATIVE = 1 << 31,
+
+	// Instance methods
+	hasOwn = ({}).hasOwnProperty,
+	arr = [],
+	pop = arr.pop,
+	push_native = arr.push,
+	push = arr.push,
+	slice = arr.slice,
+	// Use a stripped-down indexOf if we can't use a native one
+	indexOf = arr.indexOf || function( elem ) {
+		var i = 0,
+			len = this.length;
+		for ( ; i < len; i++ ) {
+			if ( this[i] === elem ) {
+				return i;
+			}
+		}
+		return -1;
+	},
+
+	booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
+
+	// Regular expressions
+
+	// Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
+	whitespace = "[\\x20\\t\\r\\n\\f]",
+	// http://www.w3.org/TR/css3-syntax/#characters
+	characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
+
+	// Loosely modeled on CSS identifier characters
+	// An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
+	// Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+	identifier = characterEncoding.replace( "w", "w#" ),
+
+	// Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
+	attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
+		"*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
+
+	// Prefer arguments quoted,
+	//   then not containing pseudos/brackets,
+	//   then attribute selectors/non-parenthetical expressions,
+	//   then anything else
+	// These preferences are here to reduce the number of selectors
+	//   needing tokenize in the PSEUDO preFilter
+	pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)",
+
+	// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+	rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
+
+	rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
+	rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
+
+	rsibling = new RegExp( whitespace + "*[+~]" ),
+	rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ),
+
+	rpseudo = new RegExp( pseudos ),
+	ridentifier = new RegExp( "^" + identifier + "$" ),
+
+	matchExpr = {
+		"ID": new RegExp( "^#(" + characterEncoding + ")" ),
+		"CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
+		"TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
+		"ATTR": new RegExp( "^" + attributes ),
+		"PSEUDO": new RegExp( "^" + pseudos ),
+		"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
+			"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
+			"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+		"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
+		// For use in libraries implementing .is()
+		// We use this for POS matching in `select`
+		"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
+			whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
+	},
+
+	rnative = /^[^{]+\{\s*\[native \w/,
+
+	// Easily-parseable/retrievable ID or TAG or CLASS selectors
+	rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+
+	rinputs = /^(?:input|select|textarea|button)$/i,
+	rheader = /^h\d$/i,
+
+	rescape = /'|\\/g,
+
+	// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+	runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
+	funescape = function( _, escaped, escapedWhitespace ) {
+		var high = "0x" + escaped - 0x10000;
+		// NaN means non-codepoint
+		// Support: Firefox
+		// Workaround erroneous numeric interpretation of +"0x"
+		return high !== high || escapedWhitespace ?
+			escaped :
+			// BMP codepoint
+			high < 0 ?
+				String.fromCharCode( high + 0x10000 ) :
+				// Supplemental Plane codepoint (surrogate pair)
+				String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
+	};
+
+// Optimize for push.apply( _, NodeList )
+try {
+	push.apply(
+		(arr = slice.call( preferredDoc.childNodes )),
+		preferredDoc.childNodes
+	);
+	// Support: Android<4.0
+	// Detect silently failing push.apply
+	arr[ preferredDoc.childNodes.length ].nodeType;
+} catch ( e ) {
+	push = { apply: arr.length ?
+
+		// Leverage slice if possible
+		function( target, els ) {
+			push_native.apply( target, slice.call(els) );
+		} :
+
+		// Support: IE<9
+		// Otherwise append directly
+		function( target, els ) {
+			var j = target.length,
+				i = 0;
+			// Can't trust NodeList.length
+			while ( (target[j++] = els[i++]) ) {}
+			target.length = j - 1;
+		}
+	};
+}
+
+function Sizzle( selector, context, results, seed ) {
+	var match, elem, m, nodeType,
+		// QSA vars
+		i, groups, old, nid, newContext, newSelector;
+
+	if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
+		setDocument( context );
+	}
+
+	context = context || document;
+	results = results || [];
+
+	if ( !selector || typeof selector !== "string" ) {
+		return results;
+	}
+
+	if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
+		return [];
+	}
+
+	if ( documentIsHTML && !seed ) {
+
+		// Shortcuts
+		if ( (match = rquickExpr.exec( selector )) ) {
+			// Speed-up: Sizzle("#ID")
+			if ( (m = match[1]) ) {
+				if ( nodeType === 9 ) {
+					elem = context.getElementById( m );
+					// Check parentNode to catch when Blackberry 4.6 returns
+					// nodes that are no longer in the document #6963
+					if ( elem && elem.parentNode ) {
+						// Handle the case where IE, Opera, and Webkit return items
+						// by name instead of ID
+						if ( elem.id === m ) {
+							results.push( elem );
+							return results;
+						}
+					} else {
+						return results;
+					}
+				} else {
+					// Context is not a document
+					if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
+						contains( context, elem ) && elem.id === m ) {
+						results.push( elem );
+						return results;
+					}
+				}
+
+			// Speed-up: Sizzle("TAG")
+			} else if ( match[2] ) {
+				push.apply( results, context.getElementsByTagName( selector ) );
+				return results;
+
+			// Speed-up: Sizzle(".CLASS")
+			} else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {
+				push.apply( results, context.getElementsByClassName( m ) );
+				return results;
+			}
+		}
+
+		// QSA path
+		if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
+			nid = old = expando;
+			newContext = context;
+			newSelector = nodeType === 9 && selector;
+
+			// qSA works strangely on Element-rooted queries
+			// We can work around this by specifying an extra ID on the root
+			// and working up from there (Thanks to Andrew Dupont for the technique)
+			// IE 8 doesn't work on object elements
+			if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+				groups = tokenize( selector );
+
+				if ( (old = context.getAttribute("id")) ) {
+					nid = old.replace( rescape, "\\$&" );
+				} else {
+					context.setAttribute( "id", nid );
+				}
+				nid = "[id='" + nid + "'] ";
+
+				i = groups.length;
+				while ( i-- ) {
+					groups[i] = nid + toSelector( groups[i] );
+				}
+				newContext = rsibling.test( selector ) && context.parentNode || context;
+				newSelector = groups.join(",");
+			}
+
+			if ( newSelector ) {
+				try {
+					push.apply( results,
+						newContext.querySelectorAll( newSelector )
+					);
+					return results;
+				} catch(qsaError) {
+				} finally {
+					if ( !old ) {
+						context.removeAttribute("id");
+					}
+				}
+			}
+		}
+	}
+
+	// All others
+	return select( selector.replace( rtrim, "$1" ), context, results, seed );
+}
+
+/**
+ * Create key-value caches of limited size
+ * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
+ *	property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
+ *	deleting the oldest entry
+ */
+function createCache() {
+	var keys = [];
+
+	function cache( key, value ) {
+		// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
+		if ( keys.push( key += " " ) > Expr.cacheLength ) {
+			// Only keep the most recent entries
+			delete cache[ keys.shift() ];
+		}
+		return (cache[ key ] = value);
+	}
+	return cache;
+}
+
+/**
+ * Mark a function for special use by Sizzle
+ * @param {Function} fn The function to mark
+ */
+function markFunction( fn ) {
+	fn[ expando ] = true;
+	return fn;
+}
+
+/**
+ * Support testing using an element
+ * @param {Function} fn Passed the created div and expects a boolean result
+ */
+function assert( fn ) {
+	var div = document.createElement("div");
+
+	try {
+		return !!fn( div );
+	} catch (e) {
+		return false;
+	} finally {
+		// Remove from its parent by default
+		if ( div.parentNode ) {
+			div.parentNode.removeChild( div );
+		}
+		// release memory in IE
+		div = null;
+	}
+}
+
+/**
+ * Adds the same handler for all of the specified attrs
+ * @param {String} attrs Pipe-separated list of attributes
+ * @param {Function} handler The method that will be applied
+ */
+function addHandle( attrs, handler ) {
+	var arr = attrs.split("|"),
+		i = attrs.length;
+
+	while ( i-- ) {
+		Expr.attrHandle[ arr[i] ] = handler;
+	}
+}
+
+/**
+ * Checks document order of two siblings
+ * @param {Element} a
+ * @param {Element} b
+ * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
+ */
+function siblingCheck( a, b ) {
+	var cur = b && a,
+		diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
+			( ~b.sourceIndex || MAX_NEGATIVE ) -
+			( ~a.sourceIndex || MAX_NEGATIVE );
+
+	// Use IE sourceIndex if available on both nodes
+	if ( diff ) {
+		return diff;
+	}
+
+	// Check if b follows a
+	if ( cur ) {
+		while ( (cur = cur.nextSibling) ) {
+			if ( cur === b ) {
+				return -1;
+			}
+		}
+	}
+
+	return a ? 1 : -1;
+}
+
+/**
+ * Returns a function to use in pseudos for input types
+ * @param {String} type
+ */
+function createInputPseudo( type ) {
+	return function( elem ) {
+		var name = elem.nodeName.toLowerCase();
+		return name === "input" && elem.type === type;
+	};
+}
+
+/**
+ * Returns a function to use in pseudos for buttons
+ * @param {String} type
+ */
+function createButtonPseudo( type ) {
+	return function( elem ) {
+		var name = elem.nodeName.toLowerCase();
+		return (name === "input" || name === "button") && elem.type === type;
+	};
+}
+
+/**
+ * Returns a function to use in pseudos for positionals
+ * @param {Function} fn
+ */
+function createPositionalPseudo( fn ) {
+	return markFunction(function( argument ) {
+		argument = +argument;
+		return markFunction(function( seed, matches ) {
+			var j,
+				matchIndexes = fn( [], seed.length, argument ),
+				i = matchIndexes.length;
+
+			// Match elements found at the specified indexes
+			while ( i-- ) {
+				if ( seed[ (j = matchIndexes[i]) ] ) {
+					seed[j] = !(matches[j] = seed[j]);
+				}
+			}
+		});
+	});
+}
+
+/**
+ * Detect xml
+ * @param {Element|Object} elem An element or a document
+ */
+isXML = Sizzle.isXML = function( elem ) {
+	// documentElement is verified for cases where it doesn't yet exist
+	// (such as loading iframes in IE - #4833)
+	var documentElement = elem && (elem.ownerDocument || elem).documentElement;
+	return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+// Expose support vars for convenience
+support = Sizzle.support = {};
+
+/**
+ * Sets document-related variables once based on the current document
+ * @param {Element|Object} [doc] An element or document object to use to set the document
+ * @returns {Object} Returns the current document
+ */
+setDocument = Sizzle.setDocument = function( node ) {
+	var doc = node ? node.ownerDocument || node : preferredDoc,
+		parent = doc.defaultView;
+
+	// If no document and documentElement is available, return
+	if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
+		return document;
+	}
+
+	// Set our document
+	document = doc;
+	docElem = doc.documentElement;
+
+	// Support tests
+	documentIsHTML = !isXML( doc );
+
+	// Support: IE>8
+	// If iframe document is assigned to "document" variable and if iframe has been reloaded,
+	// IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
+	// IE6-8 do not support the defaultView property so parent will be undefined
+	if ( parent && parent.attachEvent && parent !== parent.top ) {
+		parent.attachEvent( "onbeforeunload", function() {
+			setDocument();
+		});
+	}
+
+	/* Attributes
+	---------------------------------------------------------------------- */
+
+	// Support: IE<8
+	// Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
+	support.attributes = assert(function( div ) {
+		div.className = "i";
+		return !div.getAttribute("className");
+	});
+
+	/* getElement(s)By*
+	---------------------------------------------------------------------- */
+
+	// Check if getElementsByTagName("*") returns only elements
+	support.getElementsByTagName = assert(function( div ) {
+		div.appendChild( doc.createComment("") );
+		return !div.getElementsByTagName("*").length;
+	});
+
+	// Check if getElementsByClassName can be trusted
+	support.getElementsByClassName = assert(function( div ) {
+		div.innerHTML = "<div class='a'></div><div class='a i'></div>";
+
+		// Support: Safari<4
+		// Catch class over-caching
+		div.firstChild.className = "i";
+		// Support: Opera<10
+		// Catch gEBCN failure to find non-leading classes
+		return div.getElementsByClassName("i").length === 2;
+	});
+
+	// Support: IE<10
+	// Check if getElementById returns elements by name
+	// The broken getElementById methods don't pick up programatically-set names,
+	// so use a roundabout getElementsByName test
+	support.getById = assert(function( div ) {
+		docElem.appendChild( div ).id = expando;
+		return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
+	});
+
+	// ID find and filter
+	if ( support.getById ) {
+		Expr.find["ID"] = function( id, context ) {
+			if ( typeof context.getElementById !== strundefined && documentIsHTML ) {
+				var m = context.getElementById( id );
+				// Check parentNode to catch when Blackberry 4.6 returns
+				// nodes that are no longer in the document #6963
+				return m && m.parentNode ? [m] : [];
+			}
+		};
+		Expr.filter["ID"] = function( id ) {
+			var attrId = id.replace( runescape, funescape );
+			return function( elem ) {
+				return elem.getAttribute("id") === attrId;
+			};
+		};
+	} else {
+		// Support: IE6/7
+		// getElementById is not reliable as a find shortcut
+		delete Expr.find["ID"];
+
+		Expr.filter["ID"] =  function( id ) {
+			var attrId = id.replace( runescape, funescape );
+			return function( elem ) {
+				var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
+				return node && node.value === attrId;
+			};
+		};
+	}
+
+	// Tag
+	Expr.find["TAG"] = support.getElementsByTagName ?
+		function( tag, context ) {
+			if ( typeof context.getElementsByTagName !== strundefined ) {
+				return context.getElementsByTagName( tag );
+			}
+		} :
+		function( tag, context ) {
+			var elem,
+				tmp = [],
+				i = 0,
+				results = context.getElementsByTagName( tag );
+
+			// Filter out possible comments
+			if ( tag === "*" ) {
+				while ( (elem = results[i++]) ) {
+					if ( elem.nodeType === 1 ) {
+						tmp.push( elem );
+					}
+				}
+
+				return tmp;
+			}
+			return results;
+		};
+
+	// Class
+	Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
+		if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {
+			return context.getElementsByClassName( className );
+		}
+	};
+
+	/* QSA/matchesSelector
+	---------------------------------------------------------------------- */
+
+	// QSA and matchesSelector support
+
+	// matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+	rbuggyMatches = [];
+
+	// qSa(:focus) reports false when true (Chrome 21)
+	// We allow this because of a bug in IE8/9 that throws an error
+	// whenever `document.activeElement` is accessed on an iframe
+	// So, we allow :focus to pass through QSA all the time to avoid the IE error
+	// See http://bugs.jquery.com/ticket/13378
+	rbuggyQSA = [];
+
+	if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
+		// Build QSA regex
+		// Regex strategy adopted from Diego Perini
+		assert(function( div ) {
+			// Select is set to empty string on purpose
+			// This is to test IE's treatment of not explicitly
+			// setting a boolean content attribute,
+			// since its presence should be enough
+			// http://bugs.jquery.com/ticket/12359
+			div.innerHTML = "<select><option selected=''></option></select>";
+
+			// Support: IE8
+			// Boolean attributes and "value" are not treated correctly
+			if ( !div.querySelectorAll("[selected]").length ) {
+				rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
+			}
+
+			// Webkit/Opera - :checked should return selected option elements
+			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+			// IE8 throws error here and will not see later tests
+			if ( !div.querySelectorAll(":checked").length ) {
+				rbuggyQSA.push(":checked");
+			}
+		});
+
+		assert(function( div ) {
+
+			// Support: Opera 10-12/IE8
+			// ^= $= *= and empty values
+			// Should not select anything
+			// Support: Windows 8 Native Apps
+			// The type attribute is restricted during .innerHTML assignment
+			var input = doc.createElement("input");
+			input.setAttribute( "type", "hidden" );
+			div.appendChild( input ).setAttribute( "t", "" );
+
+			if ( div.querySelectorAll("[t^='']").length ) {
+				rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
+			}
+
+			// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+			// IE8 throws error here and will not see later tests
+			if ( !div.querySelectorAll(":enabled").length ) {
+				rbuggyQSA.push( ":enabled", ":disabled" );
+			}
+
+			// Opera 10-11 does not throw on post-comma invalid pseudos
+			div.querySelectorAll("*,:x");
+			rbuggyQSA.push(",.*:");
+		});
+	}
+
+	if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector ||
+		docElem.mozMatchesSelector ||
+		docElem.oMatchesSelector ||
+		docElem.msMatchesSelector) )) ) {
+
+		assert(function( div ) {
+			// Check to see if it's possible to do matchesSelector
+			// on a disconnected node (IE 9)
+			support.disconnectedMatch = matches.call( div, "div" );
+
+			// This should fail with an exception
+			// Gecko does not error, returns false instead
+			matches.call( div, "[s!='']:x" );
+			rbuggyMatches.push( "!=", pseudos );
+		});
+	}
+
+	rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
+	rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
+
+	/* Contains
+	---------------------------------------------------------------------- */
+
+	// Element contains another
+	// Purposefully does not implement inclusive descendent
+	// As in, an element does not contain itself
+	contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ?
+		function( a, b ) {
+			var adown = a.nodeType === 9 ? a.documentElement : a,
+				bup = b && b.parentNode;
+			return a === bup || !!( bup && bup.nodeType === 1 && (
+				adown.contains ?
+					adown.contains( bup ) :
+					a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
+			));
+		} :
+		function( a, b ) {
+			if ( b ) {
+				while ( (b = b.parentNode) ) {
+					if ( b === a ) {
+						return true;
+					}
+				}
+			}
+			return false;
+		};
+
+	/* Sorting
+	---------------------------------------------------------------------- */
+
+	// Document order sorting
+	sortOrder = docElem.compareDocumentPosition ?
+	function( a, b ) {
+
+		// Flag for duplicate removal
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+		}
+
+		var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );
+
+		if ( compare ) {
+			// Disconnected nodes
+			if ( compare & 1 ||
+				(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
+
+				// Choose the first element that is related to our preferred document
+				if ( a === doc || contains(preferredDoc, a) ) {
+					return -1;
+				}
+				if ( b === doc || contains(preferredDoc, b) ) {
+					return 1;
+				}
+
+				// Maintain original order
+				return sortInput ?
+					( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
+					0;
+			}
+
+			return compare & 4 ? -1 : 1;
+		}
+
+		// Not directly comparable, sort on existence of method
+		return a.compareDocumentPosition ? -1 : 1;
+	} :
+	function( a, b ) {
+		var cur,
+			i = 0,
+			aup = a.parentNode,
+			bup = b.parentNode,
+			ap = [ a ],
+			bp = [ b ];
+
+		// Exit early if the nodes are identical
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+
+		// Parentless nodes are either documents or disconnected
+		} else if ( !aup || !bup ) {
+			return a === doc ? -1 :
+				b === doc ? 1 :
+				aup ? -1 :
+				bup ? 1 :
+				sortInput ?
+				( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
+				0;
+
+		// If the nodes are siblings, we can do a quick check
+		} else if ( aup === bup ) {
+			return siblingCheck( a, b );
+		}
+
+		// Otherwise we need full lists of their ancestors for comparison
+		cur = a;
+		while ( (cur = cur.parentNode) ) {
+			ap.unshift( cur );
+		}
+		cur = b;
+		while ( (cur = cur.parentNode) ) {
+			bp.unshift( cur );
+		}
+
+		// Walk down the tree looking for a discrepancy
+		while ( ap[i] === bp[i] ) {
+			i++;
+		}
+
+		return i ?
+			// Do a sibling check if the nodes have a common ancestor
+			siblingCheck( ap[i], bp[i] ) :
+
+			// Otherwise nodes in our document sort first
+			ap[i] === preferredDoc ? -1 :
+			bp[i] === preferredDoc ? 1 :
+			0;
+	};
+
+	return doc;
+};
+
+Sizzle.matches = function( expr, elements ) {
+	return Sizzle( expr, null, null, elements );
+};
+
+Sizzle.matchesSelector = function( elem, expr ) {
+	// Set document vars if needed
+	if ( ( elem.ownerDocument || elem ) !== document ) {
+		setDocument( elem );
+	}
+
+	// Make sure that attribute selectors are quoted
+	expr = expr.replace( rattributeQuotes, "='$1']" );
+
+	if ( support.matchesSelector && documentIsHTML &&
+		( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
+		( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {
+
+		try {
+			var ret = matches.call( elem, expr );
+
+			// IE 9's matchesSelector returns false on disconnected nodes
+			if ( ret || support.disconnectedMatch ||
+					// As well, disconnected nodes are said to be in a document
+					// fragment in IE 9
+					elem.document && elem.document.nodeType !== 11 ) {
+				return ret;
+			}
+		} catch(e) {}
+	}
+
+	return Sizzle( expr, document, null, [elem] ).length > 0;
+};
+
+Sizzle.contains = function( context, elem ) {
+	// Set document vars if needed
+	if ( ( context.ownerDocument || context ) !== document ) {
+		setDocument( context );
+	}
+	return contains( context, elem );
+};
+
+Sizzle.attr = function( elem, name ) {
+	// Set document vars if needed
+	if ( ( elem.ownerDocument || elem ) !== document ) {
+		setDocument( elem );
+	}
+
+	var fn = Expr.attrHandle[ name.toLowerCase() ],
+		// Don't get fooled by Object.prototype properties (jQuery #13807)
+		val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
+			fn( elem, name, !documentIsHTML ) :
+			undefined;
+
+	return val === undefined ?
+		support.attributes || !documentIsHTML ?
+			elem.getAttribute( name ) :
+			(val = elem.getAttributeNode(name)) && val.specified ?
+				val.value :
+				null :
+		val;
+};
+
+Sizzle.error = function( msg ) {
+	throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+/**
+ * Document sorting and removing duplicates
+ * @param {ArrayLike} results
+ */
+Sizzle.uniqueSort = function( results ) {
+	var elem,
+		duplicates = [],
+		j = 0,
+		i = 0;
+
+	// Unless we *know* we can detect duplicates, assume their presence
+	hasDuplicate = !support.detectDuplicates;
+	sortInput = !support.sortStable && results.slice( 0 );
+	results.sort( sortOrder );
+
+	if ( hasDuplicate ) {
+		while ( (elem = results[i++]) ) {
+			if ( elem === results[ i ] ) {
+				j = duplicates.push( i );
+			}
+		}
+		while ( j-- ) {
+			results.splice( duplicates[ j ], 1 );
+		}
+	}
+
+	return results;
+};
+
+/**
+ * Utility function for retrieving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+getText = Sizzle.getText = function( elem ) {
+	var node,
+		ret = "",
+		i = 0,
+		nodeType = elem.nodeType;
+
+	if ( !nodeType ) {
+		// If no nodeType, this is expected to be an array
+		for ( ; (node = elem[i]); i++ ) {
+			// Do not traverse comment nodes
+			ret += getText( node );
+		}
+	} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+		// Use textContent for elements
+		// innerText usage removed for consistency of new lines (see #11153)
+		if ( typeof elem.textContent === "string" ) {
+			return elem.textContent;
+		} else {
+			// Traverse its children
+			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+				ret += getText( elem );
+			}
+		}
+	} else if ( nodeType === 3 || nodeType === 4 ) {
+		return elem.nodeValue;
+	}
+	// Do not include comment or processing instruction nodes
+
+	return ret;
+};
+
+Expr = Sizzle.selectors = {
+
+	// Can be adjusted by the user
+	cacheLength: 50,
+
+	createPseudo: markFunction,
+
+	match: matchExpr,
+
+	attrHandle: {},
+
+	find: {},
+
+	relative: {
+		">": { dir: "parentNode", first: true },
+		" ": { dir: "parentNode" },
+		"+": { dir: "previousSibling", first: true },
+		"~": { dir: "previousSibling" }
+	},
+
+	preFilter: {
+		"ATTR": function( match ) {
+			match[1] = match[1].replace( runescape, funescape );
+
+			// Move the given value to match[3] whether quoted or unquoted
+			match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );
+
+			if ( match[2] === "~=" ) {
+				match[3] = " " + match[3] + " ";
+			}
+
+			return match.slice( 0, 4 );
+		},
+
+		"CHILD": function( match ) {
+			/* matches from matchExpr["CHILD"]
+				1 type (only|nth|...)
+				2 what (child|of-type)
+				3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+				4 xn-component of xn+y argument ([+-]?\d*n|)
+				5 sign of xn-component
+				6 x of xn-component
+				7 sign of y-component
+				8 y of y-component
+			*/
+			match[1] = match[1].toLowerCase();
+
+			if ( match[1].slice( 0, 3 ) === "nth" ) {
+				// nth-* requires argument
+				if ( !match[3] ) {
+					Sizzle.error( match[0] );
+				}
+
+				// numeric x and y parameters for Expr.filter.CHILD
+				// remember that false/true cast respectively to 0/1
+				match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
+				match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
+
+			// other types prohibit arguments
+			} else if ( match[3] ) {
+				Sizzle.error( match[0] );
+			}
+
+			return match;
+		},
+
+		"PSEUDO": function( match ) {
+			var excess,
+				unquoted = !match[5] && match[2];
+
+			if ( matchExpr["CHILD"].test( match[0] ) ) {
+				return null;
+			}
+
+			// Accept quoted arguments as-is
+			if ( match[3] && match[4] !== undefined ) {
+				match[2] = match[4];
+
+			// Strip excess characters from unquoted arguments
+			} else if ( unquoted && rpseudo.test( unquoted ) &&
+				// Get excess from tokenize (recursively)
+				(excess = tokenize( unquoted, true )) &&
+				// advance to the next closing parenthesis
+				(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
+
+				// excess is a negative index
+				match[0] = match[0].slice( 0, excess );
+				match[2] = unquoted.slice( 0, excess );
+			}
+
+			// Return only captures needed by the pseudo filter method (type and argument)
+			return match.slice( 0, 3 );
+		}
+	},
+
+	filter: {
+
+		"TAG": function( nodeNameSelector ) {
+			var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
+			return nodeNameSelector === "*" ?
+				function() { return true; } :
+				function( elem ) {
+					return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+				};
+		},
+
+		"CLASS": function( className ) {
+			var pattern = classCache[ className + " " ];
+
+			return pattern ||
+				(pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
+				classCache( className, function( elem ) {
+					return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" );
+				});
+		},
+
+		"ATTR": function( name, operator, check ) {
+			return function( elem ) {
+				var result = Sizzle.attr( elem, name );
+
+				if ( result == null ) {
+					return operator === "!=";
+				}
+				if ( !operator ) {
+					return true;
+				}
+
+				result += "";
+
+				return operator === "=" ? result === check :
+					operator === "!=" ? result !== check :
+					operator === "^=" ? check && result.indexOf( check ) === 0 :
+					operator === "*=" ? check && result.indexOf( check ) > -1 :
+					operator === "$=" ? check && result.slice( -check.length ) === check :
+					operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
+					operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
+					false;
+			};
+		},
+
+		"CHILD": function( type, what, argument, first, last ) {
+			var simple = type.slice( 0, 3 ) !== "nth",
+				forward = type.slice( -4 ) !== "last",
+				ofType = what === "of-type";
+
+			return first === 1 && last === 0 ?
+
+				// Shortcut for :nth-*(n)
+				function( elem ) {
+					return !!elem.parentNode;
+				} :
+
+				function( elem, context, xml ) {
+					var cache, outerCache, node, diff, nodeIndex, start,
+						dir = simple !== forward ? "nextSibling" : "previousSibling",
+						parent = elem.parentNode,
+						name = ofType && elem.nodeName.toLowerCase(),
+						useCache = !xml && !ofType;
+
+					if ( parent ) {
+
+						// :(first|last|only)-(child|of-type)
+						if ( simple ) {
+							while ( dir ) {
+								node = elem;
+								while ( (node = node[ dir ]) ) {
+									if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
+										return false;
+									}
+								}
+								// Reverse direction for :only-* (if we haven't yet done so)
+								start = dir = type === "only" && !start && "nextSibling";
+							}
+							return true;
+						}
+
+						start = [ forward ? parent.firstChild : parent.lastChild ];
+
+						// non-xml :nth-child(...) stores cache data on `parent`
+						if ( forward && useCache ) {
+							// Seek `elem` from a previously-cached index
+							outerCache = parent[ expando ] || (parent[ expando ] = {});
+							cache = outerCache[ type ] || [];
+							nodeIndex = cache[0] === dirruns && cache[1];
+							diff = cache[0] === dirruns && cache[2];
+							node = nodeIndex && parent.childNodes[ nodeIndex ];
+
+							while ( (node = ++nodeIndex && node && node[ dir ] ||
+
+								// Fallback to seeking `elem` from the start
+								(diff = nodeIndex = 0) || start.pop()) ) {
+
+								// When found, cache indexes on `parent` and break
+								if ( node.nodeType === 1 && ++diff && node === elem ) {
+									outerCache[ type ] = [ dirruns, nodeIndex, diff ];
+									break;
+								}
+							}
+
+						// Use previously-cached element index if available
+						} else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
+							diff = cache[1];
+
+						// xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
+						} else {
+							// Use the same loop as above to seek `elem` from the start
+							while ( (node = ++nodeIndex && node && node[ dir ] ||
+								(diff = nodeIndex = 0) || start.pop()) ) {
+
+								if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
+									// Cache the index of each encountered element
+									if ( useCache ) {
+										(node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
+									}
+
+									if ( node === elem ) {
+										break;
+									}
+								}
+							}
+						}
+
+						// Incorporate the offset, then check against cycle size
+						diff -= last;
+						return diff === first || ( diff % first === 0 && diff / first >= 0 );
+					}
+				};
+		},
+
+		"PSEUDO": function( pseudo, argument ) {
+			// pseudo-class names are case-insensitive
+			// http://www.w3.org/TR/selectors/#pseudo-classes
+			// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+			// Remember that setFilters inherits from pseudos
+			var args,
+				fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+					Sizzle.error( "unsupported pseudo: " + pseudo );
+
+			// The user may use createPseudo to indicate that
+			// arguments are needed to create the filter function
+			// just as Sizzle does
+			if ( fn[ expando ] ) {
+				return fn( argument );
+			}
+
+			// But maintain support for old signatures
+			if ( fn.length > 1 ) {
+				args = [ pseudo, pseudo, "", argument ];
+				return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+					markFunction(function( seed, matches ) {
+						var idx,
+							matched = fn( seed, argument ),
+							i = matched.length;
+						while ( i-- ) {
+							idx = indexOf.call( seed, matched[i] );
+							seed[ idx ] = !( matches[ idx ] = matched[i] );
+						}
+					}) :
+					function( elem ) {
+						return fn( elem, 0, args );
+					};
+			}
+
+			return fn;
+		}
+	},
+
+	pseudos: {
+		// Potentially complex pseudos
+		"not": markFunction(function( selector ) {
+			// Trim the selector passed to compile
+			// to avoid treating leading and trailing
+			// spaces as combinators
+			var input = [],
+				results = [],
+				matcher = compile( selector.replace( rtrim, "$1" ) );
+
+			return matcher[ expando ] ?
+				markFunction(function( seed, matches, context, xml ) {
+					var elem,
+						unmatched = matcher( seed, null, xml, [] ),
+						i = seed.length;
+
+					// Match elements unmatched by `matcher`
+					while ( i-- ) {
+						if ( (elem = unmatched[i]) ) {
+							seed[i] = !(matches[i] = elem);
+						}
+					}
+				}) :
+				function( elem, context, xml ) {
+					input[0] = elem;
+					matcher( input, null, xml, results );
+					return !results.pop();
+				};
+		}),
+
+		"has": markFunction(function( selector ) {
+			return function( elem ) {
+				return Sizzle( selector, elem ).length > 0;
+			};
+		}),
+
+		"contains": markFunction(function( text ) {
+			return function( elem ) {
+				return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
+			};
+		}),
+
+		// "Whether an element is represented by a :lang() selector
+		// is based solely on the element's language value
+		// being equal to the identifier C,
+		// or beginning with the identifier C immediately followed by "-".
+		// The matching of C against the element's language value is performed case-insensitively.
+		// The identifier C does not have to be a valid language name."
+		// http://www.w3.org/TR/selectors/#lang-pseudo
+		"lang": markFunction( function( lang ) {
+			// lang value must be a valid identifier
+			if ( !ridentifier.test(lang || "") ) {
+				Sizzle.error( "unsupported lang: " + lang );
+			}
+			lang = lang.replace( runescape, funescape ).toLowerCase();
+			return function( elem ) {
+				var elemLang;
+				do {
+					if ( (elemLang = documentIsHTML ?
+						elem.lang :
+						elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
+
+						elemLang = elemLang.toLowerCase();
+						return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
+					}
+				} while ( (elem = elem.parentNode) && elem.nodeType === 1 );
+				return false;
+			};
+		}),
+
+		// Miscellaneous
+		"target": function( elem ) {
+			var hash = window.location && window.location.hash;
+			return hash && hash.slice( 1 ) === elem.id;
+		},
+
+		"root": function( elem ) {
+			return elem === docElem;
+		},
+
+		"focus": function( elem ) {
+			return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+		},
+
+		// Boolean properties
+		"enabled": function( elem ) {
+			return elem.disabled === false;
+		},
+
+		"disabled": function( elem ) {
+			return elem.disabled === true;
+		},
+
+		"checked": function( elem ) {
+			// In CSS3, :checked should return both checked and selected elements
+			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+			var nodeName = elem.nodeName.toLowerCase();
+			return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+		},
+
+		"selected": function( elem ) {
+			// Accessing this property makes selected-by-default
+			// options in Safari work properly
+			if ( elem.parentNode ) {
+				elem.parentNode.selectedIndex;
+			}
+
+			return elem.selected === true;
+		},
+
+		// Contents
+		"empty": function( elem ) {
+			// http://www.w3.org/TR/selectors/#empty-pseudo
+			// :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
+			//   not comment, processing instructions, or others
+			// Thanks to Diego Perini for the nodeName shortcut
+			//   Greater than "@" means alpha characters (specifically not starting with "#" or "?")
+			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+				if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) {
+					return false;
+				}
+			}
+			return true;
+		},
+
+		"parent": function( elem ) {
+			return !Expr.pseudos["empty"]( elem );
+		},
+
+		// Element/input types
+		"header": function( elem ) {
+			return rheader.test( elem.nodeName );
+		},
+
+		"input": function( elem ) {
+			return rinputs.test( elem.nodeName );
+		},
+
+		"button": function( elem ) {
+			var name = elem.nodeName.toLowerCase();
+			return name === "input" && elem.type === "button" || name === "button";
+		},
+
+		"text": function( elem ) {
+			var attr;
+			// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
+			// use getAttribute instead to test this case
+			return elem.nodeName.toLowerCase() === "input" &&
+				elem.type === "text" &&
+				( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type );
+		},
+
+		// Position-in-collection
+		"first": createPositionalPseudo(function() {
+			return [ 0 ];
+		}),
+
+		"last": createPositionalPseudo(function( matchIndexes, length ) {
+			return [ length - 1 ];
+		}),
+
+		"eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+			return [ argument < 0 ? argument + length : argument ];
+		}),
+
+		"even": createPositionalPseudo(function( matchIndexes, length ) {
+			var i = 0;
+			for ( ; i < length; i += 2 ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		}),
+
+		"odd": createPositionalPseudo(function( matchIndexes, length ) {
+			var i = 1;
+			for ( ; i < length; i += 2 ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		}),
+
+		"lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+			var i = argument < 0 ? argument + length : argument;
+			for ( ; --i >= 0; ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		}),
+
+		"gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+			var i = argument < 0 ? argument + length : argument;
+			for ( ; ++i < length; ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		})
+	}
+};
+
+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Add button/input type pseudos
+for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
+	Expr.pseudos[ i ] = createInputPseudo( i );
+}
+for ( i in { submit: true, reset: true } ) {
+	Expr.pseudos[ i ] = createButtonPseudo( i );
+}
+
+// Easy API for creating new setFilters
+function setFilters() {}
+setFilters.prototype = Expr.filters = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+function tokenize( selector, parseOnly ) {
+	var matched, match, tokens, type,
+		soFar, groups, preFilters,
+		cached = tokenCache[ selector + " " ];
+
+	if ( cached ) {
+		return parseOnly ? 0 : cached.slice( 0 );
+	}
+
+	soFar = selector;
+	groups = [];
+	preFilters = Expr.preFilter;
+
+	while ( soFar ) {
+
+		// Comma and first run
+		if ( !matched || (match = rcomma.exec( soFar )) ) {
+			if ( match ) {
+				// Don't consume trailing commas as valid
+				soFar = soFar.slice( match[0].length ) || soFar;
+			}
+			groups.push( tokens = [] );
+		}
+
+		matched = false;
+
+		// Combinators
+		if ( (match = rcombinators.exec( soFar )) ) {
+			matched = match.shift();
+			tokens.push({
+				value: matched,
+				// Cast descendant combinators to space
+				type: match[0].replace( rtrim, " " )
+			});
+			soFar = soFar.slice( matched.length );
+		}
+
+		// Filters
+		for ( type in Expr.filter ) {
+			if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
+				(match = preFilters[ type ]( match ))) ) {
+				matched = match.shift();
+				tokens.push({
+					value: matched,
+					type: type,
+					matches: match
+				});
+				soFar = soFar.slice( matched.length );
+			}
+		}
+
+		if ( !matched ) {
+			break;
+		}
+	}
+
+	// Return the length of the invalid excess
+	// if we're just parsing
+	// Otherwise, throw an error or return tokens
+	return parseOnly ?
+		soFar.length :
+		soFar ?
+			Sizzle.error( selector ) :
+			// Cache the tokens
+			tokenCache( selector, groups ).slice( 0 );
+}
+
+function toSelector( tokens ) {
+	var i = 0,
+		len = tokens.length,
+		selector = "";
+	for ( ; i < len; i++ ) {
+		selector += tokens[i].value;
+	}
+	return selector;
+}
+
+function addCombinator( matcher, combinator, base ) {
+	var dir = combinator.dir,
+		checkNonElements = base && dir === "parentNode",
+		doneName = done++;
+
+	return combinator.first ?
+		// Check against closest ancestor/preceding element
+		function( elem, context, xml ) {
+			while ( (elem = elem[ dir ]) ) {
+				if ( elem.nodeType === 1 || checkNonElements ) {
+					return matcher( elem, context, xml );
+				}
+			}
+		} :
+
+		// Check against all ancestor/preceding elements
+		function( elem, context, xml ) {
+			var data, cache, outerCache,
+				dirkey = dirruns + " " + doneName;
+
+			// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
+			if ( xml ) {
+				while ( (elem = elem[ dir ]) ) {
+					if ( elem.nodeType === 1 || checkNonElements ) {
+						if ( matcher( elem, context, xml ) ) {
+							return true;
+						}
+					}
+				}
+			} else {
+				while ( (elem = elem[ dir ]) ) {
+					if ( elem.nodeType === 1 || checkNonElements ) {
+						outerCache = elem[ expando ] || (elem[ expando ] = {});
+						if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {
+							if ( (data = cache[1]) === true || data === cachedruns ) {
+								return data === true;
+							}
+						} else {
+							cache = outerCache[ dir ] = [ dirkey ];
+							cache[1] = matcher( elem, context, xml ) || cachedruns;
+							if ( cache[1] === true ) {
+								return true;
+							}
+						}
+					}
+				}
+			}
+		};
+}
+
+function elementMatcher( matchers ) {
+	return matchers.length > 1 ?
+		function( elem, context, xml ) {
+			var i = matchers.length;
+			while ( i-- ) {
+				if ( !matchers[i]( elem, context, xml ) ) {
+					return false;
+				}
+			}
+			return true;
+		} :
+		matchers[0];
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+	var elem,
+		newUnmatched = [],
+		i = 0,
+		len = unmatched.length,
+		mapped = map != null;
+
+	for ( ; i < len; i++ ) {
+		if ( (elem = unmatched[i]) ) {
+			if ( !filter || filter( elem, context, xml ) ) {
+				newUnmatched.push( elem );
+				if ( mapped ) {
+					map.push( i );
+				}
+			}
+		}
+	}
+
+	return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+	if ( postFilter && !postFilter[ expando ] ) {
+		postFilter = setMatcher( postFilter );
+	}
+	if ( postFinder && !postFinder[ expando ] ) {
+		postFinder = setMatcher( postFinder, postSelector );
+	}
+	return markFunction(function( seed, results, context, xml ) {
+		var temp, i, elem,
+			preMap = [],
+			postMap = [],
+			preexisting = results.length,
+
+			// Get initial elements from seed or context
+			elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
+
+			// Prefilter to get matcher input, preserving a map for seed-results synchronization
+			matcherIn = preFilter && ( seed || !selector ) ?
+				condense( elems, preMap, preFilter, context, xml ) :
+				elems,
+
+			matcherOut = matcher ?
+				// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+				postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+					// ...intermediate processing is necessary
+					[] :
+
+					// ...otherwise use results directly
+					results :
+				matcherIn;
+
+		// Find primary matches
+		if ( matcher ) {
+			matcher( matcherIn, matcherOut, context, xml );
+		}
+
+		// Apply postFilter
+		if ( postFilter ) {
+			temp = condense( matcherOut, postMap );
+			postFilter( temp, [], context, xml );
+
+			// Un-match failing elements by moving them back to matcherIn
+			i = temp.length;
+			while ( i-- ) {
+				if ( (elem = temp[i]) ) {
+					matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+				}
+			}
+		}
+
+		if ( seed ) {
+			if ( postFinder || preFilter ) {
+				if ( postFinder ) {
+					// Get the final matcherOut by condensing this intermediate into postFinder contexts
+					temp = [];
+					i = matcherOut.length;
+					while ( i-- ) {
+						if ( (elem = matcherOut[i]) ) {
+							// Restore matcherIn since elem is not yet a final match
+							temp.push( (matcherIn[i] = elem) );
+						}
+					}
+					postFinder( null, (matcherOut = []), temp, xml );
+				}
+
+				// Move matched elements from seed to results to keep them synchronized
+				i = matcherOut.length;
+				while ( i-- ) {
+					if ( (elem = matcherOut[i]) &&
+						(temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
+
+						seed[temp] = !(results[temp] = elem);
+					}
+				}
+			}
+
+		// Add elements to results, through postFinder if defined
+		} else {
+			matcherOut = condense(
+				matcherOut === results ?
+					matcherOut.splice( preexisting, matcherOut.length ) :
+					matcherOut
+			);
+			if ( postFinder ) {
+				postFinder( null, results, matcherOut, xml );
+			} else {
+				push.apply( results, matcherOut );
+			}
+		}
+	});
+}
+
+function matcherFromTokens( tokens ) {
+	var checkContext, matcher, j,
+		len = tokens.length,
+		leadingRelative = Expr.relative[ tokens[0].type ],
+		implicitRelative = leadingRelative || Expr.relative[" "],
+		i = leadingRelative ? 1 : 0,
+
+		// The foundational matcher ensures that elements are reachable from top-level context(s)
+		matchContext = addCombinator( function( elem ) {
+			return elem === checkContext;
+		}, implicitRelative, true ),
+		matchAnyContext = addCombinator( function( elem ) {
+			return indexOf.call( checkContext, elem ) > -1;
+		}, implicitRelative, true ),
+		matchers = [ function( elem, context, xml ) {
+			return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+				(checkContext = context).nodeType ?
+					matchContext( elem, context, xml ) :
+					matchAnyContext( elem, context, xml ) );
+		} ];
+
+	for ( ; i < len; i++ ) {
+		if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
+			matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
+		} else {
+			matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+
+			// Return special upon seeing a positional matcher
+			if ( matcher[ expando ] ) {
+				// Find the next relative operator (if any) for proper handling
+				j = ++i;
+				for ( ; j < len; j++ ) {
+					if ( Expr.relative[ tokens[j].type ] ) {
+						break;
+					}
+				}
+				return setMatcher(
+					i > 1 && elementMatcher( matchers ),
+					i > 1 && toSelector(
+						// If the preceding token was a descendant combinator, insert an implicit any-element `*`
+						tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
+					).replace( rtrim, "$1" ),
+					matcher,
+					i < j && matcherFromTokens( tokens.slice( i, j ) ),
+					j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
+					j < len && toSelector( tokens )
+				);
+			}
+			matchers.push( matcher );
+		}
+	}
+
+	return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+	// A counter to specify which element is currently being matched
+	var matcherCachedRuns = 0,
+		bySet = setMatchers.length > 0,
+		byElement = elementMatchers.length > 0,
+		superMatcher = function( seed, context, xml, results, expandContext ) {
+			var elem, j, matcher,
+				setMatched = [],
+				matchedCount = 0,
+				i = "0",
+				unmatched = seed && [],
+				outermost = expandContext != null,
+				contextBackup = outermostContext,
+				// We must always have either seed elements or context
+				elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
+				// Use integer dirruns iff this is the outermost matcher
+				dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);
+
+			if ( outermost ) {
+				outermostContext = context !== document && context;
+				cachedruns = matcherCachedRuns;
+			}
+
+			// Add elements passing elementMatchers directly to results
+			// Keep `i` a string if there are no elements so `matchedCount` will be "00" below
+			for ( ; (elem = elems[i]) != null; i++ ) {
+				if ( byElement && elem ) {
+					j = 0;
+					while ( (matcher = elementMatchers[j++]) ) {
+						if ( matcher( elem, context, xml ) ) {
+							results.push( elem );
+							break;
+						}
+					}
+					if ( outermost ) {
+						dirruns = dirrunsUnique;
+						cachedruns = ++matcherCachedRuns;
+					}
+				}
+
+				// Track unmatched elements for set filters
+				if ( bySet ) {
+					// They will have gone through all possible matchers
+					if ( (elem = !matcher && elem) ) {
+						matchedCount--;
+					}
+
+					// Lengthen the array for every element, matched or not
+					if ( seed ) {
+						unmatched.push( elem );
+					}
+				}
+			}
+
+			// Apply set filters to unmatched elements
+			matchedCount += i;
+			if ( bySet && i !== matchedCount ) {
+				j = 0;
+				while ( (matcher = setMatchers[j++]) ) {
+					matcher( unmatched, setMatched, context, xml );
+				}
+
+				if ( seed ) {
+					// Reintegrate element matches to eliminate the need for sorting
+					if ( matchedCount > 0 ) {
+						while ( i-- ) {
+							if ( !(unmatched[i] || setMatched[i]) ) {
+								setMatched[i] = pop.call( results );
+							}
+						}
+					}
+
+					// Discard index placeholder values to get only actual matches
+					setMatched = condense( setMatched );
+				}
+
+				// Add matches to results
+				push.apply( results, setMatched );
+
+				// Seedless set matches succeeding multiple successful matchers stipulate sorting
+				if ( outermost && !seed && setMatched.length > 0 &&
+					( matchedCount + setMatchers.length ) > 1 ) {
+
+					Sizzle.uniqueSort( results );
+				}
+			}
+
+			// Override manipulation of globals by nested matchers
+			if ( outermost ) {
+				dirruns = dirrunsUnique;
+				outermostContext = contextBackup;
+			}
+
+			return unmatched;
+		};
+
+	return bySet ?
+		markFunction( superMatcher ) :
+		superMatcher;
+}
+
+compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
+	var i,
+		setMatchers = [],
+		elementMatchers = [],
+		cached = compilerCache[ selector + " " ];
+
+	if ( !cached ) {
+		// Generate a function of recursive functions that can be used to check each element
+		if ( !group ) {
+			group = tokenize( selector );
+		}
+		i = group.length;
+		while ( i-- ) {
+			cached = matcherFromTokens( group[i] );
+			if ( cached[ expando ] ) {
+				setMatchers.push( cached );
+			} else {
+				elementMatchers.push( cached );
+			}
+		}
+
+		// Cache the compiled function
+		cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+	}
+	return cached;
+};
+
+function multipleContexts( selector, contexts, results ) {
+	var i = 0,
+		len = contexts.length;
+	for ( ; i < len; i++ ) {
+		Sizzle( selector, contexts[i], results );
+	}
+	return results;
+}
+
+function select( selector, context, results, seed ) {
+	var i, tokens, token, type, find,
+		match = tokenize( selector );
+
+	if ( !seed ) {
+		// Try to minimize operations if there is only one group
+		if ( match.length === 1 ) {
+
+			// Take a shortcut and set the context if the root selector is an ID
+			tokens = match[0] = match[0].slice( 0 );
+			if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+					support.getById && context.nodeType === 9 && documentIsHTML &&
+					Expr.relative[ tokens[1].type ] ) {
+
+				context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
+				if ( !context ) {
+					return results;
+				}
+				selector = selector.slice( tokens.shift().value.length );
+			}
+
+			// Fetch a seed set for right-to-left matching
+			i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
+			while ( i-- ) {
+				token = tokens[i];
+
+				// Abort if we hit a combinator
+				if ( Expr.relative[ (type = token.type) ] ) {
+					break;
+				}
+				if ( (find = Expr.find[ type ]) ) {
+					// Search, expanding context for leading sibling combinators
+					if ( (seed = find(
+						token.matches[0].replace( runescape, funescape ),
+						rsibling.test( tokens[0].type ) && context.parentNode || context
+					)) ) {
+
+						// If seed is empty or no tokens remain, we can return early
+						tokens.splice( i, 1 );
+						selector = seed.length && toSelector( tokens );
+						if ( !selector ) {
+							push.apply( results, seed );
+							return results;
+						}
+
+						break;
+					}
+				}
+			}
+		}
+	}
+
+	// Compile and execute a filtering function
+	// Provide `match` to avoid retokenization if we modified the selector above
+	compile( selector, match )(
+		seed,
+		context,
+		!documentIsHTML,
+		results,
+		rsibling.test( selector )
+	);
+	return results;
+}
+
+// One-time assignments
+
+// Sort stability
+support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
+
+// Support: Chrome<14
+// Always assume duplicates if they aren't passed to the comparison function
+support.detectDuplicates = hasDuplicate;
+
+// Initialize against the default document
+setDocument();
+
+// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
+// Detached nodes confoundingly follow *each other*
+support.sortDetached = assert(function( div1 ) {
+	// Should return 1, but returns 4 (following)
+	return div1.compareDocumentPosition( document.createElement("div") ) & 1;
+});
+
+// Support: IE<8
+// Prevent attribute/property "interpolation"
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !assert(function( div ) {
+	div.innerHTML = "<a href='#'></a>";
+	return div.firstChild.getAttribute("href") === "#" ;
+}) ) {
+	addHandle( "type|href|height|width", function( elem, name, isXML ) {
+		if ( !isXML ) {
+			return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
+		}
+	});
+}
+
+// Support: IE<9
+// Use defaultValue in place of getAttribute("value")
+if ( !support.attributes || !assert(function( div ) {
+	div.innerHTML = "<input/>";
+	div.firstChild.setAttribute( "value", "" );
+	return div.firstChild.getAttribute( "value" ) === "";
+}) ) {
+	addHandle( "value", function( elem, name, isXML ) {
+		if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
+			return elem.defaultValue;
+		}
+	});
+}
+
+// Support: IE<9
+// Use getAttributeNode to fetch booleans when getAttribute lies
+if ( !assert(function( div ) {
+	return div.getAttribute("disabled") == null;
+}) ) {
+	addHandle( booleans, function( elem, name, isXML ) {
+		var val;
+		if ( !isXML ) {
+			return (val = elem.getAttributeNode( name )) && val.specified ?
+				val.value :
+				elem[ name ] === true ? name.toLowerCase() : null;
+		}
+	});
+}
+
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.pseudos;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})( window );
+// String to Object options format cache
+var optionsCache = {};
+
+// Convert String-formatted options into Object-formatted ones and store in cache
+function createOptions( options ) {
+	var object = optionsCache[ options ] = {};
+	jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {
+		object[ flag ] = true;
+	});
+	return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ *	options: an optional list of space-separated options that will change how
+ *			the callback list behaves or a more traditional option object
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible options:
+ *
+ *	once:			will ensure the callback list can only be fired once (like a Deferred)
+ *
+ *	memory:			will keep track of previous values and will call any callback added
+ *					after the list has been fired right away with the latest "memorized"
+ *					values (like a Deferred)
+ *
+ *	unique:			will ensure a callback can only be added once (no duplicate in the list)
+ *
+ *	stopOnFalse:	interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( options ) {
+
+	// Convert options from String-formatted to Object-formatted if needed
+	// (we check in cache first)
+	options = typeof options === "string" ?
+		( optionsCache[ options ] || createOptions( options ) ) :
+		jQuery.extend( {}, options );
+
+	var // Flag to know if list is currently firing
+		firing,
+		// Last fire value (for non-forgettable lists)
+		memory,
+		// Flag to know if list was already fired
+		fired,
+		// End of the loop when firing
+		firingLength,
+		// Index of currently firing callback (modified by remove if needed)
+		firingIndex,
+		// First callback to fire (used internally by add and fireWith)
+		firingStart,
+		// Actual callback list
+		list = [],
+		// Stack of fire calls for repeatable lists
+		stack = !options.once && [],
+		// Fire callbacks
+		fire = function( data ) {
+			memory = options.memory && data;
+			fired = true;
+			firingIndex = firingStart || 0;
+			firingStart = 0;
+			firingLength = list.length;
+			firing = true;
+			for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+				if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
+					memory = false; // To prevent further calls using add
+					break;
+				}
+			}
+			firing = false;
+			if ( list ) {
+				if ( stack ) {
+					if ( stack.length ) {
+						fire( stack.shift() );
+					}
+				} else if ( memory ) {
+					list = [];
+				} else {
+					self.disable();
+				}
+			}
+		},
+		// Actual Callbacks object
+		self = {
+			// Add a callback or a collection of callbacks to the list
+			add: function() {
+				if ( list ) {
+					// First, we save the current length
+					var start = list.length;
+					(function add( args ) {
+						jQuery.each( args, function( _, arg ) {
+							var type = jQuery.type( arg );
+							if ( type === "function" ) {
+								if ( !options.unique || !self.has( arg ) ) {
+									list.push( arg );
+								}
+							} else if ( arg && arg.length && type !== "string" ) {
+								// Inspect recursively
+								add( arg );
+							}
+						});
+					})( arguments );
+					// Do we need to add the callbacks to the
+					// current firing batch?
+					if ( firing ) {
+						firingLength = list.length;
+					// With memory, if we're not firing then
+					// we should call right away
+					} else if ( memory ) {
+						firingStart = start;
+						fire( memory );
+					}
+				}
+				return this;
+			},
+			// Remove a callback from the list
+			remove: function() {
+				if ( list ) {
+					jQuery.each( arguments, function( _, arg ) {
+						var index;
+						while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
+							list.splice( index, 1 );
+							// Handle firing indexes
+							if ( firing ) {
+								if ( index <= firingLength ) {
+									firingLength--;
+								}
+								if ( index <= firingIndex ) {
+									firingIndex--;
+								}
+							}
+						}
+					});
+				}
+				return this;
+			},
+			// Check if a given callback is in the list.
+			// If no argument is given, return whether or not list has callbacks attached.
+			has: function( fn ) {
+				return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
+			},
+			// Remove all callbacks from the list
+			empty: function() {
+				list = [];
+				firingLength = 0;
+				return this;
+			},
+			// Have the list do nothing anymore
+			disable: function() {
+				list = stack = memory = undefined;
+				return this;
+			},
+			// Is it disabled?
+			disabled: function() {
+				return !list;
+			},
+			// Lock the list in its current state
+			lock: function() {
+				stack = undefined;
+				if ( !memory ) {
+					self.disable();
+				}
+				return this;

<TRUNCATED>

[58/61] [abbrv] git commit: updated git ignore

Posted by sn...@apache.org.
updated git ignore


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/db6f01c1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/db6f01c1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/db6f01c1

Branch: refs/pull/35/head
Commit: db6f01c162d60ebbc055ee374b93b2e2eaf02ccd
Parents: 616641e
Author: Rod Simpson <ro...@apigee.com>
Authored: Mon Jan 27 16:08:05 2014 -0700
Committer: Rod Simpson <ro...@apigee.com>
Committed: Mon Jan 27 16:08:05 2014 -0700

----------------------------------------------------------------------
 .gitignore        | 5 ++++-
 portal/.gitignore | 8 --------
 2 files changed, 4 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/db6f01c1/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index dec7818..e733658 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,4 +11,7 @@ Icon
 
 # Files that might appear on external disk
 .Spotlight-V100
-.Trashes
\ No newline at end of file
+.Trashes
+/portal/performance/
+
+/portal/node_modules/

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/db6f01c1/portal/.gitignore
----------------------------------------------------------------------
diff --git a/portal/.gitignore b/portal/.gitignore
deleted file mode 100644
index b310a13..0000000
--- a/portal/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-/.DS_Store
-dist
-.DS_Store
-.idea
-nbproject/
-*.swp
-node-modules/
-.vagrant


[19/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular-mocks.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular-mocks.js b/portal/js/libs/angular-1.2.5/angular-mocks.js
new file mode 100755
index 0000000..1863746
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular-mocks.js
@@ -0,0 +1,2116 @@
+/**
+ * @license AngularJS v1.2.5
+ * (c) 2010-2014 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, angular, undefined) {
+
+'use strict';
+
+/**
+ * @ngdoc overview
+ * @name angular.mock
+ * @description
+ *
+ * Namespace from 'angular-mocks.js' which contains testing related code.
+ */
+angular.mock = {};
+
+/**
+ * ! This is a private undocumented service !
+ *
+ * @name ngMock.$browser
+ *
+ * @description
+ * This service is a mock implementation of {@link ng.$browser}. It provides fake
+ * implementation for commonly used browser apis that are hard to test, e.g. setTimeout, xhr,
+ * cookies, etc...
+ *
+ * The api of this service is the same as that of the real {@link ng.$browser $browser}, except
+ * that there are several helper methods available which can be used in tests.
+ */
+angular.mock.$BrowserProvider = function() {
+  this.$get = function() {
+    return new angular.mock.$Browser();
+  };
+};
+
+angular.mock.$Browser = function() {
+  var self = this;
+
+  this.isMock = true;
+  self.$$url = "http://server/";
+  self.$$lastUrl = self.$$url; // used by url polling fn
+  self.pollFns = [];
+
+  // TODO(vojta): remove this temporary api
+  self.$$completeOutstandingRequest = angular.noop;
+  self.$$incOutstandingRequestCount = angular.noop;
+
+
+  // register url polling fn
+
+  self.onUrlChange = function(listener) {
+    self.pollFns.push(
+      function() {
+        if (self.$$lastUrl != self.$$url) {
+          self.$$lastUrl = self.$$url;
+          listener(self.$$url);
+        }
+      }
+    );
+
+    return listener;
+  };
+
+  self.cookieHash = {};
+  self.lastCookieHash = {};
+  self.deferredFns = [];
+  self.deferredNextId = 0;
+
+  self.defer = function(fn, delay) {
+    delay = delay || 0;
+    self.deferredFns.push({time:(self.defer.now + delay), fn:fn, id: self.deferredNextId});
+    self.deferredFns.sort(function(a,b){ return a.time - b.time;});
+    return self.deferredNextId++;
+  };
+
+
+  /**
+   * @name ngMock.$browser#defer.now
+   * @propertyOf ngMock.$browser
+   *
+   * @description
+   * Current milliseconds mock time.
+   */
+  self.defer.now = 0;
+
+
+  self.defer.cancel = function(deferId) {
+    var fnIndex;
+
+    angular.forEach(self.deferredFns, function(fn, index) {
+      if (fn.id === deferId) fnIndex = index;
+    });
+
+    if (fnIndex !== undefined) {
+      self.deferredFns.splice(fnIndex, 1);
+      return true;
+    }
+
+    return false;
+  };
+
+
+  /**
+   * @name ngMock.$browser#defer.flush
+   * @methodOf ngMock.$browser
+   *
+   * @description
+   * Flushes all pending requests and executes the defer callbacks.
+   *
+   * @param {number=} number of milliseconds to flush. See {@link #defer.now}
+   */
+  self.defer.flush = function(delay) {
+    if (angular.isDefined(delay)) {
+      self.defer.now += delay;
+    } else {
+      if (self.deferredFns.length) {
+        self.defer.now = self.deferredFns[self.deferredFns.length-1].time;
+      } else {
+        throw new Error('No deferred tasks to be flushed');
+      }
+    }
+
+    while (self.deferredFns.length && self.deferredFns[0].time <= self.defer.now) {
+      self.deferredFns.shift().fn();
+    }
+  };
+
+  self.$$baseHref = '';
+  self.baseHref = function() {
+    return this.$$baseHref;
+  };
+};
+angular.mock.$Browser.prototype = {
+
+/**
+  * @name ngMock.$browser#poll
+  * @methodOf ngMock.$browser
+  *
+  * @description
+  * run all fns in pollFns
+  */
+  poll: function poll() {
+    angular.forEach(this.pollFns, function(pollFn){
+      pollFn();
+    });
+  },
+
+  addPollFn: function(pollFn) {
+    this.pollFns.push(pollFn);
+    return pollFn;
+  },
+
+  url: function(url, replace) {
+    if (url) {
+      this.$$url = url;
+      return this;
+    }
+
+    return this.$$url;
+  },
+
+  cookies:  function(name, value) {
+    if (name) {
+      if (angular.isUndefined(value)) {
+        delete this.cookieHash[name];
+      } else {
+        if (angular.isString(value) &&       //strings only
+            value.length <= 4096) {          //strict cookie storage limits
+          this.cookieHash[name] = value;
+        }
+      }
+    } else {
+      if (!angular.equals(this.cookieHash, this.lastCookieHash)) {
+        this.lastCookieHash = angular.copy(this.cookieHash);
+        this.cookieHash = angular.copy(this.cookieHash);
+      }
+      return this.cookieHash;
+    }
+  },
+
+  notifyWhenNoOutstandingRequests: function(fn) {
+    fn();
+  }
+};
+
+
+/**
+ * @ngdoc object
+ * @name ngMock.$exceptionHandlerProvider
+ *
+ * @description
+ * Configures the mock implementation of {@link ng.$exceptionHandler} to rethrow or to log errors
+ * passed into the `$exceptionHandler`.
+ */
+
+/**
+ * @ngdoc object
+ * @name ngMock.$exceptionHandler
+ *
+ * @description
+ * Mock implementation of {@link ng.$exceptionHandler} that rethrows or logs errors passed
+ * into it. See {@link ngMock.$exceptionHandlerProvider $exceptionHandlerProvider} for configuration
+ * information.
+ *
+ *
+ * <pre>
+ *   describe('$exceptionHandlerProvider', function() {
+ *
+ *     it('should capture log messages and exceptions', function() {
+ *
+ *       module(function($exceptionHandlerProvider) {
+ *         $exceptionHandlerProvider.mode('log');
+ *       });
+ *
+ *       inject(function($log, $exceptionHandler, $timeout) {
+ *         $timeout(function() { $log.log(1); });
+ *         $timeout(function() { $log.log(2); throw 'banana peel'; });
+ *         $timeout(function() { $log.log(3); });
+ *         expect($exceptionHandler.errors).toEqual([]);
+ *         expect($log.assertEmpty());
+ *         $timeout.flush();
+ *         expect($exceptionHandler.errors).toEqual(['banana peel']);
+ *         expect($log.log.logs).toEqual([[1], [2], [3]]);
+ *       });
+ *     });
+ *   });
+ * </pre>
+ */
+
+angular.mock.$ExceptionHandlerProvider = function() {
+  var handler;
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$exceptionHandlerProvider#mode
+   * @methodOf ngMock.$exceptionHandlerProvider
+   *
+   * @description
+   * Sets the logging mode.
+   *
+   * @param {string} mode Mode of operation, defaults to `rethrow`.
+   *
+   *   - `rethrow`: If any errors are passed into the handler in tests, it typically
+   *                means that there is a bug in the application or test, so this mock will
+   *                make these tests fail.
+   *   - `log`: Sometimes it is desirable to test that an error is thrown, for this case the `log`
+   *            mode stores an array of errors in `$exceptionHandler.errors`, to allow later
+   *            assertion of them. See {@link ngMock.$log#assertEmpty assertEmpty()} and
+   *            {@link ngMock.$log#reset reset()}
+   */
+  this.mode = function(mode) {
+    switch(mode) {
+      case 'rethrow':
+        handler = function(e) {
+          throw e;
+        };
+        break;
+      case 'log':
+        var errors = [];
+
+        handler = function(e) {
+          if (arguments.length == 1) {
+            errors.push(e);
+          } else {
+            errors.push([].slice.call(arguments, 0));
+          }
+        };
+
+        handler.errors = errors;
+        break;
+      default:
+        throw new Error("Unknown mode '" + mode + "', only 'log'/'rethrow' modes are allowed!");
+    }
+  };
+
+  this.$get = function() {
+    return handler;
+  };
+
+  this.mode('rethrow');
+};
+
+
+/**
+ * @ngdoc service
+ * @name ngMock.$log
+ *
+ * @description
+ * Mock implementation of {@link ng.$log} that gathers all logged messages in arrays
+ * (one array per logging level). These arrays are exposed as `logs` property of each of the
+ * level-specific log function, e.g. for level `error` the array is exposed as `$log.error.logs`.
+ *
+ */
+angular.mock.$LogProvider = function() {
+  var debug = true;
+
+  function concat(array1, array2, index) {
+    return array1.concat(Array.prototype.slice.call(array2, index));
+  }
+
+  this.debugEnabled = function(flag) {
+    if (angular.isDefined(flag)) {
+      debug = flag;
+      return this;
+    } else {
+      return debug;
+    }
+  };
+
+  this.$get = function () {
+    var $log = {
+      log: function() { $log.log.logs.push(concat([], arguments, 0)); },
+      warn: function() { $log.warn.logs.push(concat([], arguments, 0)); },
+      info: function() { $log.info.logs.push(concat([], arguments, 0)); },
+      error: function() { $log.error.logs.push(concat([], arguments, 0)); },
+      debug: function() {
+        if (debug) {
+          $log.debug.logs.push(concat([], arguments, 0));
+        }
+      }
+    };
+
+    /**
+     * @ngdoc method
+     * @name ngMock.$log#reset
+     * @methodOf ngMock.$log
+     *
+     * @description
+     * Reset all of the logging arrays to empty.
+     */
+    $log.reset = function () {
+      /**
+       * @ngdoc property
+       * @name ngMock.$log#log.logs
+       * @propertyOf ngMock.$log
+       *
+       * @description
+       * Array of messages logged using {@link ngMock.$log#log}.
+       *
+       * @example
+       * <pre>
+       * $log.log('Some Log');
+       * var first = $log.log.logs.unshift();
+       * </pre>
+       */
+      $log.log.logs = [];
+      /**
+       * @ngdoc property
+       * @name ngMock.$log#info.logs
+       * @propertyOf ngMock.$log
+       *
+       * @description
+       * Array of messages logged using {@link ngMock.$log#info}.
+       *
+       * @example
+       * <pre>
+       * $log.info('Some Info');
+       * var first = $log.info.logs.unshift();
+       * </pre>
+       */
+      $log.info.logs = [];
+      /**
+       * @ngdoc property
+       * @name ngMock.$log#warn.logs
+       * @propertyOf ngMock.$log
+       *
+       * @description
+       * Array of messages logged using {@link ngMock.$log#warn}.
+       *
+       * @example
+       * <pre>
+       * $log.warn('Some Warning');
+       * var first = $log.warn.logs.unshift();
+       * </pre>
+       */
+      $log.warn.logs = [];
+      /**
+       * @ngdoc property
+       * @name ngMock.$log#error.logs
+       * @propertyOf ngMock.$log
+       *
+       * @description
+       * Array of messages logged using {@link ngMock.$log#error}.
+       *
+       * @example
+       * <pre>
+       * $log.log('Some Error');
+       * var first = $log.error.logs.unshift();
+       * </pre>
+       */
+      $log.error.logs = [];
+        /**
+       * @ngdoc property
+       * @name ngMock.$log#debug.logs
+       * @propertyOf ngMock.$log
+       *
+       * @description
+       * Array of messages logged using {@link ngMock.$log#debug}.
+       *
+       * @example
+       * <pre>
+       * $log.debug('Some Error');
+       * var first = $log.debug.logs.unshift();
+       * </pre>
+       */
+      $log.debug.logs = [];
+    };
+
+    /**
+     * @ngdoc method
+     * @name ngMock.$log#assertEmpty
+     * @methodOf ngMock.$log
+     *
+     * @description
+     * Assert that the all of the logging methods have no logged messages. If messages present, an
+     * exception is thrown.
+     */
+    $log.assertEmpty = function() {
+      var errors = [];
+      angular.forEach(['error', 'warn', 'info', 'log', 'debug'], function(logLevel) {
+        angular.forEach($log[logLevel].logs, function(log) {
+          angular.forEach(log, function (logItem) {
+            errors.push('MOCK $log (' + logLevel + '): ' + String(logItem) + '\n' +
+                        (logItem.stack || ''));
+          });
+        });
+      });
+      if (errors.length) {
+        errors.unshift("Expected $log to be empty! Either a message was logged unexpectedly, or "+
+          "an expected log message was not checked and removed:");
+        errors.push('');
+        throw new Error(errors.join('\n---------\n'));
+      }
+    };
+
+    $log.reset();
+    return $log;
+  };
+};
+
+
+/**
+ * @ngdoc service
+ * @name ngMock.$interval
+ *
+ * @description
+ * Mock implementation of the $interval service.
+ *
+ * Use {@link ngMock.$interval#methods_flush `$interval.flush(millis)`} to
+ * move forward by `millis` milliseconds and trigger any functions scheduled to run in that
+ * time.
+ *
+ * @param {function()} fn A function that should be called repeatedly.
+ * @param {number} delay Number of milliseconds between each function call.
+ * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat
+ *   indefinitely.
+ * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise
+ *   will invoke `fn` within the {@link ng.$rootScope.Scope#methods_$apply $apply} block.
+ * @returns {promise} A promise which will be notified on each iteration.
+ */
+angular.mock.$IntervalProvider = function() {
+  this.$get = ['$rootScope', '$q',
+       function($rootScope,   $q) {
+    var repeatFns = [],
+        nextRepeatId = 0,
+        now = 0;
+
+    var $interval = function(fn, delay, count, invokeApply) {
+      var deferred = $q.defer(),
+          promise = deferred.promise,
+          iteration = 0,
+          skipApply = (angular.isDefined(invokeApply) && !invokeApply);
+
+      count = (angular.isDefined(count)) ? count : 0,
+      promise.then(null, null, fn);
+
+      promise.$$intervalId = nextRepeatId;
+
+      function tick() {
+        deferred.notify(iteration++);
+
+        if (count > 0 && iteration >= count) {
+          var fnIndex;
+          deferred.resolve(iteration);
+
+          angular.forEach(repeatFns, function(fn, index) {
+            if (fn.id === promise.$$intervalId) fnIndex = index;
+          });
+
+          if (fnIndex !== undefined) {
+            repeatFns.splice(fnIndex, 1);
+          }
+        }
+
+        if (!skipApply) $rootScope.$apply();
+      }
+
+      repeatFns.push({
+        nextTime:(now + delay),
+        delay: delay,
+        fn: tick,
+        id: nextRepeatId,
+        deferred: deferred
+      });
+      repeatFns.sort(function(a,b){ return a.nextTime - b.nextTime;});
+
+      nextRepeatId++;
+      return promise;
+    };
+
+    $interval.cancel = function(promise) {
+      var fnIndex;
+
+      angular.forEach(repeatFns, function(fn, index) {
+        if (fn.id === promise.$$intervalId) fnIndex = index;
+      });
+
+      if (fnIndex !== undefined) {
+        repeatFns[fnIndex].deferred.reject('canceled');
+        repeatFns.splice(fnIndex, 1);
+        return true;
+      }
+
+      return false;
+    };
+
+    /**
+     * @ngdoc method
+     * @name ngMock.$interval#flush
+     * @methodOf ngMock.$interval
+     * @description
+     *
+     * Runs interval tasks scheduled to be run in the next `millis` milliseconds.
+     *
+     * @param {number=} millis maximum timeout amount to flush up until.
+     *
+     * @return {number} The amount of time moved forward.
+     */
+    $interval.flush = function(millis) {
+      now += millis;
+      while (repeatFns.length && repeatFns[0].nextTime <= now) {
+        var task = repeatFns[0];
+        task.fn();
+        task.nextTime += task.delay;
+        repeatFns.sort(function(a,b){ return a.nextTime - b.nextTime;});
+      }
+      return millis;
+    };
+
+    return $interval;
+  }];
+};
+
+
+/* jshint -W101 */
+/* The R_ISO8061_STR regex is never going to fit into the 100 char limit!
+ * This directive should go inside the anonymous function but a bug in JSHint means that it would
+ * not be enacted early enough to prevent the warning.
+ */
+var R_ISO8061_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?:\:?(\d\d)(?:\:?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/;
+
+function jsonStringToDate(string) {
+  var match;
+  if (match = string.match(R_ISO8061_STR)) {
+    var date = new Date(0),
+        tzHour = 0,
+        tzMin  = 0;
+    if (match[9]) {
+      tzHour = int(match[9] + match[10]);
+      tzMin = int(match[9] + match[11]);
+    }
+    date.setUTCFullYear(int(match[1]), int(match[2]) - 1, int(match[3]));
+    date.setUTCHours(int(match[4]||0) - tzHour,
+                     int(match[5]||0) - tzMin,
+                     int(match[6]||0),
+                     int(match[7]||0));
+    return date;
+  }
+  return string;
+}
+
+function int(str) {
+  return parseInt(str, 10);
+}
+
+function padNumber(num, digits, trim) {
+  var neg = '';
+  if (num < 0) {
+    neg =  '-';
+    num = -num;
+  }
+  num = '' + num;
+  while(num.length < digits) num = '0' + num;
+  if (trim)
+    num = num.substr(num.length - digits);
+  return neg + num;
+}
+
+
+/**
+ * @ngdoc object
+ * @name angular.mock.TzDate
+ * @description
+ *
+ * *NOTE*: this is not an injectable instance, just a globally available mock class of `Date`.
+ *
+ * Mock of the Date type which has its timezone specified via constructor arg.
+ *
+ * The main purpose is to create Date-like instances with timezone fixed to the specified timezone
+ * offset, so that we can test code that depends on local timezone settings without dependency on
+ * the time zone settings of the machine where the code is running.
+ *
+ * @param {number} offset Offset of the *desired* timezone in hours (fractions will be honored)
+ * @param {(number|string)} timestamp Timestamp representing the desired time in *UTC*
+ *
+ * @example
+ * !!!! WARNING !!!!!
+ * This is not a complete Date object so only methods that were implemented can be called safely.
+ * To make matters worse, TzDate instances inherit stuff from Date via a prototype.
+ *
+ * We do our best to intercept calls to "unimplemented" methods, but since the list of methods is
+ * incomplete we might be missing some non-standard methods. This can result in errors like:
+ * "Date.prototype.foo called on incompatible Object".
+ *
+ * <pre>
+ * var newYearInBratislava = new TzDate(-1, '2009-12-31T23:00:00Z');
+ * newYearInBratislava.getTimezoneOffset() => -60;
+ * newYearInBratislava.getFullYear() => 2010;
+ * newYearInBratislava.getMonth() => 0;
+ * newYearInBratislava.getDate() => 1;
+ * newYearInBratislava.getHours() => 0;
+ * newYearInBratislava.getMinutes() => 0;
+ * newYearInBratislava.getSeconds() => 0;
+ * </pre>
+ *
+ */
+angular.mock.TzDate = function (offset, timestamp) {
+  var self = new Date(0);
+  if (angular.isString(timestamp)) {
+    var tsStr = timestamp;
+
+    self.origDate = jsonStringToDate(timestamp);
+
+    timestamp = self.origDate.getTime();
+    if (isNaN(timestamp))
+      throw {
+        name: "Illegal Argument",
+        message: "Arg '" + tsStr + "' passed into TzDate constructor is not a valid date string"
+      };
+  } else {
+    self.origDate = new Date(timestamp);
+  }
+
+  var localOffset = new Date(timestamp).getTimezoneOffset();
+  self.offsetDiff = localOffset*60*1000 - offset*1000*60*60;
+  self.date = new Date(timestamp + self.offsetDiff);
+
+  self.getTime = function() {
+    return self.date.getTime() - self.offsetDiff;
+  };
+
+  self.toLocaleDateString = function() {
+    return self.date.toLocaleDateString();
+  };
+
+  self.getFullYear = function() {
+    return self.date.getFullYear();
+  };
+
+  self.getMonth = function() {
+    return self.date.getMonth();
+  };
+
+  self.getDate = function() {
+    return self.date.getDate();
+  };
+
+  self.getHours = function() {
+    return self.date.getHours();
+  };
+
+  self.getMinutes = function() {
+    return self.date.getMinutes();
+  };
+
+  self.getSeconds = function() {
+    return self.date.getSeconds();
+  };
+
+  self.getMilliseconds = function() {
+    return self.date.getMilliseconds();
+  };
+
+  self.getTimezoneOffset = function() {
+    return offset * 60;
+  };
+
+  self.getUTCFullYear = function() {
+    return self.origDate.getUTCFullYear();
+  };
+
+  self.getUTCMonth = function() {
+    return self.origDate.getUTCMonth();
+  };
+
+  self.getUTCDate = function() {
+    return self.origDate.getUTCDate();
+  };
+
+  self.getUTCHours = function() {
+    return self.origDate.getUTCHours();
+  };
+
+  self.getUTCMinutes = function() {
+    return self.origDate.getUTCMinutes();
+  };
+
+  self.getUTCSeconds = function() {
+    return self.origDate.getUTCSeconds();
+  };
+
+  self.getUTCMilliseconds = function() {
+    return self.origDate.getUTCMilliseconds();
+  };
+
+  self.getDay = function() {
+    return self.date.getDay();
+  };
+
+  // provide this method only on browsers that already have it
+  if (self.toISOString) {
+    self.toISOString = function() {
+      return padNumber(self.origDate.getUTCFullYear(), 4) + '-' +
+            padNumber(self.origDate.getUTCMonth() + 1, 2) + '-' +
+            padNumber(self.origDate.getUTCDate(), 2) + 'T' +
+            padNumber(self.origDate.getUTCHours(), 2) + ':' +
+            padNumber(self.origDate.getUTCMinutes(), 2) + ':' +
+            padNumber(self.origDate.getUTCSeconds(), 2) + '.' +
+            padNumber(self.origDate.getUTCMilliseconds(), 3) + 'Z';
+    };
+  }
+
+  //hide all methods not implemented in this mock that the Date prototype exposes
+  var unimplementedMethods = ['getUTCDay',
+      'getYear', 'setDate', 'setFullYear', 'setHours', 'setMilliseconds',
+      'setMinutes', 'setMonth', 'setSeconds', 'setTime', 'setUTCDate', 'setUTCFullYear',
+      'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds',
+      'setYear', 'toDateString', 'toGMTString', 'toJSON', 'toLocaleFormat', 'toLocaleString',
+      'toLocaleTimeString', 'toSource', 'toString', 'toTimeString', 'toUTCString', 'valueOf'];
+
+  angular.forEach(unimplementedMethods, function(methodName) {
+    self[methodName] = function() {
+      throw new Error("Method '" + methodName + "' is not implemented in the TzDate mock");
+    };
+  });
+
+  return self;
+};
+
+//make "tzDateInstance instanceof Date" return true
+angular.mock.TzDate.prototype = Date.prototype;
+/* jshint +W101 */
+
+angular.mock.animate = angular.module('mock.animate', ['ng'])
+
+  .config(['$provide', function($provide) {
+
+    $provide.decorator('$animate', function($delegate) {
+      var animate = {
+        queue : [],
+        enabled : $delegate.enabled,
+        flushNext : function(name) {
+          var tick = animate.queue.shift();
+
+          if (!tick) throw new Error('No animation to be flushed');
+          if(tick.method !== name) {
+            throw new Error('The next animation is not "' + name +
+              '", but is "' + tick.method + '"');
+          }
+          tick.fn();
+          return tick;
+        }
+      };
+
+      angular.forEach(['enter','leave','move','addClass','removeClass'], function(method) {
+        animate[method] = function() {
+          var params = arguments;
+          animate.queue.push({
+            method : method,
+            params : params,
+            element : angular.isElement(params[0]) && params[0],
+            parent  : angular.isElement(params[1]) && params[1],
+            after   : angular.isElement(params[2]) && params[2],
+            fn : function() {
+              $delegate[method].apply($delegate, params);
+            }
+          });
+        };
+      });
+
+      return animate;
+    });
+
+  }]);
+
+
+/**
+ * @ngdoc function
+ * @name angular.mock.dump
+ * @description
+ *
+ * *NOTE*: this is not an injectable instance, just a globally available function.
+ *
+ * Method for serializing common angular objects (scope, elements, etc..) into strings, useful for
+ * debugging.
+ *
+ * This method is also available on window, where it can be used to display objects on debug
+ * console.
+ *
+ * @param {*} object - any object to turn into string.
+ * @return {string} a serialized string of the argument
+ */
+angular.mock.dump = function(object) {
+  return serialize(object);
+
+  function serialize(object) {
+    var out;
+
+    if (angular.isElement(object)) {
+      object = angular.element(object);
+      out = angular.element('<div></div>');
+      angular.forEach(object, function(element) {
+        out.append(angular.element(element).clone());
+      });
+      out = out.html();
+    } else if (angular.isArray(object)) {
+      out = [];
+      angular.forEach(object, function(o) {
+        out.push(serialize(o));
+      });
+      out = '[ ' + out.join(', ') + ' ]';
+    } else if (angular.isObject(object)) {
+      if (angular.isFunction(object.$eval) && angular.isFunction(object.$apply)) {
+        out = serializeScope(object);
+      } else if (object instanceof Error) {
+        out = object.stack || ('' + object.name + ': ' + object.message);
+      } else {
+        // TODO(i): this prevents methods being logged,
+        // we should have a better way to serialize objects
+        out = angular.toJson(object, true);
+      }
+    } else {
+      out = String(object);
+    }
+
+    return out;
+  }
+
+  function serializeScope(scope, offset) {
+    offset = offset ||  '  ';
+    var log = [offset + 'Scope(' + scope.$id + '): {'];
+    for ( var key in scope ) {
+      if (Object.prototype.hasOwnProperty.call(scope, key) && !key.match(/^(\$|this)/)) {
+        log.push('  ' + key + ': ' + angular.toJson(scope[key]));
+      }
+    }
+    var child = scope.$$childHead;
+    while(child) {
+      log.push(serializeScope(child, offset + '  '));
+      child = child.$$nextSibling;
+    }
+    log.push('}');
+    return log.join('\n' + offset);
+  }
+};
+
+/**
+ * @ngdoc object
+ * @name ngMock.$httpBackend
+ * @description
+ * Fake HTTP backend implementation suitable for unit testing applications that use the
+ * {@link ng.$http $http service}.
+ *
+ * *Note*: For fake HTTP backend implementation suitable for end-to-end testing or backend-less
+ * development please see {@link ngMockE2E.$httpBackend e2e $httpBackend mock}.
+ *
+ * During unit testing, we want our unit tests to run quickly and have no external dependencies so
+ * we don’t want to send {@link https://developer.mozilla.org/en/xmlhttprequest XHR} or
+ * {@link http://en.wikipedia.org/wiki/JSONP JSONP} requests to a real server. All we really need is
+ * to verify whether a certain request has been sent or not, or alternatively just let the
+ * application make requests, respond with pre-trained responses and assert that the end result is
+ * what we expect it to be.
+ *
+ * This mock implementation can be used to respond with static or dynamic responses via the
+ * `expect` and `when` apis and their shortcuts (`expectGET`, `whenPOST`, etc).
+ *
+ * When an Angular application needs some data from a server, it calls the $http service, which
+ * sends the request to a real server using $httpBackend service. With dependency injection, it is
+ * easy to inject $httpBackend mock (which has the same API as $httpBackend) and use it to verify
+ * the requests and respond with some testing data without sending a request to real server.
+ *
+ * There are two ways to specify what test data should be returned as http responses by the mock
+ * backend when the code under test makes http requests:
+ *
+ * - `$httpBackend.expect` - specifies a request expectation
+ * - `$httpBackend.when` - specifies a backend definition
+ *
+ *
+ * # Request Expectations vs Backend Definitions
+ *
+ * Request expectations provide a way to make assertions about requests made by the application and
+ * to define responses for those requests. The test will fail if the expected requests are not made
+ * or they are made in the wrong order.
+ *
+ * Backend definitions allow you to define a fake backend for your application which doesn't assert
+ * if a particular request was made or not, it just returns a trained response if a request is made.
+ * The test will pass whether or not the request gets made during testing.
+ *
+ *
+ * <table class="table">
+ *   <tr><th width="220px"></th><th>Request expectations</th><th>Backend definitions</th></tr>
+ *   <tr>
+ *     <th>Syntax</th>
+ *     <td>.expect(...).respond(...)</td>
+ *     <td>.when(...).respond(...)</td>
+ *   </tr>
+ *   <tr>
+ *     <th>Typical usage</th>
+ *     <td>strict unit tests</td>
+ *     <td>loose (black-box) unit testing</td>
+ *   </tr>
+ *   <tr>
+ *     <th>Fulfills multiple requests</th>
+ *     <td>NO</td>
+ *     <td>YES</td>
+ *   </tr>
+ *   <tr>
+ *     <th>Order of requests matters</th>
+ *     <td>YES</td>
+ *     <td>NO</td>
+ *   </tr>
+ *   <tr>
+ *     <th>Request required</th>
+ *     <td>YES</td>
+ *     <td>NO</td>
+ *   </tr>
+ *   <tr>
+ *     <th>Response required</th>
+ *     <td>optional (see below)</td>
+ *     <td>YES</td>
+ *   </tr>
+ * </table>
+ *
+ * In cases where both backend definitions and request expectations are specified during unit
+ * testing, the request expectations are evaluated first.
+ *
+ * If a request expectation has no response specified, the algorithm will search your backend
+ * definitions for an appropriate response.
+ *
+ * If a request didn't match any expectation or if the expectation doesn't have the response
+ * defined, the backend definitions are evaluated in sequential order to see if any of them match
+ * the request. The response from the first matched definition is returned.
+ *
+ *
+ * # Flushing HTTP requests
+ *
+ * The $httpBackend used in production, always responds to requests with responses asynchronously.
+ * If we preserved this behavior in unit testing, we'd have to create async unit tests, which are
+ * hard to write, follow and maintain. At the same time the testing mock, can't respond
+ * synchronously because that would change the execution of the code under test. For this reason the
+ * mock $httpBackend has a `flush()` method, which allows the test to explicitly flush pending
+ * requests and thus preserving the async api of the backend, while allowing the test to execute
+ * synchronously.
+ *
+ *
+ * # Unit testing with mock $httpBackend
+ * The following code shows how to setup and use the mock backend in unit testing a controller.
+ * First we create the controller under test
+ *
+  <pre>
+  // The controller code
+  function MyController($scope, $http) {
+    var authToken;
+
+    $http.get('/auth.py').success(function(data, status, headers) {
+      authToken = headers('A-Token');
+      $scope.user = data;
+    });
+
+    $scope.saveMessage = function(message) {
+      var headers = { 'Authorization': authToken };
+      $scope.status = 'Saving...';
+
+      $http.post('/add-msg.py', message, { headers: headers } ).success(function(response) {
+        $scope.status = '';
+      }).error(function() {
+        $scope.status = 'ERROR!';
+      });
+    };
+  }
+  </pre>
+ *
+ * Now we setup the mock backend and create the test specs.
+ *
+  <pre>
+    // testing controller
+    describe('MyController', function() {
+       var $httpBackend, $rootScope, createController;
+
+       beforeEach(inject(function($injector) {
+         // Set up the mock http service responses
+         $httpBackend = $injector.get('$httpBackend');
+         // backend definition common for all tests
+         $httpBackend.when('GET', '/auth.py').respond({userId: 'userX'}, {'A-Token': 'xxx'});
+
+         // Get hold of a scope (i.e. the root scope)
+         $rootScope = $injector.get('$rootScope');
+         // The $controller service is used to create instances of controllers
+         var $controller = $injector.get('$controller');
+
+         createController = function() {
+           return $controller('MyController', {'$scope' : $rootScope });
+         };
+       }));
+
+
+       afterEach(function() {
+         $httpBackend.verifyNoOutstandingExpectation();
+         $httpBackend.verifyNoOutstandingRequest();
+       });
+
+
+       it('should fetch authentication token', function() {
+         $httpBackend.expectGET('/auth.py');
+         var controller = createController();
+         $httpBackend.flush();
+       });
+
+
+       it('should send msg to server', function() {
+         var controller = createController();
+         $httpBackend.flush();
+
+         // now you don’t care about the authentication, but
+         // the controller will still send the request and
+         // $httpBackend will respond without you having to
+         // specify the expectation and response for this request
+
+         $httpBackend.expectPOST('/add-msg.py', 'message content').respond(201, '');
+         $rootScope.saveMessage('message content');
+         expect($rootScope.status).toBe('Saving...');
+         $httpBackend.flush();
+         expect($rootScope.status).toBe('');
+       });
+
+
+       it('should send auth header', function() {
+         var controller = createController();
+         $httpBackend.flush();
+
+         $httpBackend.expectPOST('/add-msg.py', undefined, function(headers) {
+           // check if the header was send, if it wasn't the expectation won't
+           // match the request and the test will fail
+           return headers['Authorization'] == 'xxx';
+         }).respond(201, '');
+
+         $rootScope.saveMessage('whatever');
+         $httpBackend.flush();
+       });
+    });
+   </pre>
+ */
+angular.mock.$HttpBackendProvider = function() {
+  this.$get = ['$rootScope', createHttpBackendMock];
+};
+
+/**
+ * General factory function for $httpBackend mock.
+ * Returns instance for unit testing (when no arguments specified):
+ *   - passing through is disabled
+ *   - auto flushing is disabled
+ *
+ * Returns instance for e2e testing (when `$delegate` and `$browser` specified):
+ *   - passing through (delegating request to real backend) is enabled
+ *   - auto flushing is enabled
+ *
+ * @param {Object=} $delegate Real $httpBackend instance (allow passing through if specified)
+ * @param {Object=} $browser Auto-flushing enabled if specified
+ * @return {Object} Instance of $httpBackend mock
+ */
+function createHttpBackendMock($rootScope, $delegate, $browser) {
+  var definitions = [],
+      expectations = [],
+      responses = [],
+      responsesPush = angular.bind(responses, responses.push),
+      copy = angular.copy;
+
+  function createResponse(status, data, headers) {
+    if (angular.isFunction(status)) return status;
+
+    return function() {
+      return angular.isNumber(status)
+          ? [status, data, headers]
+          : [200, status, data];
+    };
+  }
+
+  // TODO(vojta): change params to: method, url, data, headers, callback
+  function $httpBackend(method, url, data, callback, headers, timeout, withCredentials) {
+    var xhr = new MockXhr(),
+        expectation = expectations[0],
+        wasExpected = false;
+
+    function prettyPrint(data) {
+      return (angular.isString(data) || angular.isFunction(data) || data instanceof RegExp)
+          ? data
+          : angular.toJson(data);
+    }
+
+    function wrapResponse(wrapped) {
+      if (!$browser && timeout && timeout.then) timeout.then(handleTimeout);
+
+      return handleResponse;
+
+      function handleResponse() {
+        var response = wrapped.response(method, url, data, headers);
+        xhr.$$respHeaders = response[2];
+        callback(copy(response[0]), copy(response[1]), xhr.getAllResponseHeaders());
+      }
+
+      function handleTimeout() {
+        for (var i = 0, ii = responses.length; i < ii; i++) {
+          if (responses[i] === handleResponse) {
+            responses.splice(i, 1);
+            callback(-1, undefined, '');
+            break;
+          }
+        }
+      }
+    }
+
+    if (expectation && expectation.match(method, url)) {
+      if (!expectation.matchData(data))
+        throw new Error('Expected ' + expectation + ' with different data\n' +
+            'EXPECTED: ' + prettyPrint(expectation.data) + '\nGOT:      ' + data);
+
+      if (!expectation.matchHeaders(headers))
+        throw new Error('Expected ' + expectation + ' with different headers\n' +
+                        'EXPECTED: ' + prettyPrint(expectation.headers) + '\nGOT:      ' +
+                        prettyPrint(headers));
+
+      expectations.shift();
+
+      if (expectation.response) {
+        responses.push(wrapResponse(expectation));
+        return;
+      }
+      wasExpected = true;
+    }
+
+    var i = -1, definition;
+    while ((definition = definitions[++i])) {
+      if (definition.match(method, url, data, headers || {})) {
+        if (definition.response) {
+          // if $browser specified, we do auto flush all requests
+          ($browser ? $browser.defer : responsesPush)(wrapResponse(definition));
+        } else if (definition.passThrough) {
+          $delegate(method, url, data, callback, headers, timeout, withCredentials);
+        } else throw new Error('No response defined !');
+        return;
+      }
+    }
+    throw wasExpected ?
+        new Error('No response defined !') :
+        new Error('Unexpected request: ' + method + ' ' + url + '\n' +
+                  (expectation ? 'Expected ' + expectation : 'No more request expected'));
+  }
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#when
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new backend definition.
+   *
+   * @param {string} method HTTP method.
+   * @param {string|RegExp} url HTTP url.
+   * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives
+   *   data string and returns true if the data is as expected.
+   * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
+   *   object and returns true if the headers match the current definition.
+   * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
+   *   request is handled.
+   *
+   *  - respond –
+   *      `{function([status,] data[, headers])|function(function(method, url, data, headers)}`
+   *    – The respond method takes a set of static data to be returned or a function that can return
+   *    an array containing response status (number), response data (string) and response headers
+   *    (Object).
+   */
+  $httpBackend.when = function(method, url, data, headers) {
+    var definition = new MockHttpExpectation(method, url, data, headers),
+        chain = {
+          respond: function(status, data, headers) {
+            definition.response = createResponse(status, data, headers);
+          }
+        };
+
+    if ($browser) {
+      chain.passThrough = function() {
+        definition.passThrough = true;
+      };
+    }
+
+    definitions.push(definition);
+    return chain;
+  };
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#whenGET
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new backend definition for GET requests. For more info see `when()`.
+   *
+   * @param {string|RegExp} url HTTP url.
+   * @param {(Object|function(Object))=} headers HTTP headers.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   * request is handled.
+   */
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#whenHEAD
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new backend definition for HEAD requests. For more info see `when()`.
+   *
+   * @param {string|RegExp} url HTTP url.
+   * @param {(Object|function(Object))=} headers HTTP headers.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   * request is handled.
+   */
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#whenDELETE
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new backend definition for DELETE requests. For more info see `when()`.
+   *
+   * @param {string|RegExp} url HTTP url.
+   * @param {(Object|function(Object))=} headers HTTP headers.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   * request is handled.
+   */
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#whenPOST
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new backend definition for POST requests. For more info see `when()`.
+   *
+   * @param {string|RegExp} url HTTP url.
+   * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives
+   *   data string and returns true if the data is as expected.
+   * @param {(Object|function(Object))=} headers HTTP headers.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   * request is handled.
+   */
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#whenPUT
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new backend definition for PUT requests.  For more info see `when()`.
+   *
+   * @param {string|RegExp} url HTTP url.
+   * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives
+   *   data string and returns true if the data is as expected.
+   * @param {(Object|function(Object))=} headers HTTP headers.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   * request is handled.
+   */
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#whenJSONP
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new backend definition for JSONP requests. For more info see `when()`.
+   *
+   * @param {string|RegExp} url HTTP url.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   * request is handled.
+   */
+  createShortMethods('when');
+
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#expect
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new request expectation.
+   *
+   * @param {string} method HTTP method.
+   * @param {string|RegExp} url HTTP url.
+   * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that
+   *  receives data string and returns true if the data is as expected, or Object if request body
+   *  is in JSON format.
+   * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
+   *   object and returns true if the headers match the current expectation.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   *  request is handled.
+   *
+   *  - respond –
+   *    `{function([status,] data[, headers])|function(function(method, url, data, headers)}`
+   *    – The respond method takes a set of static data to be returned or a function that can return
+   *    an array containing response status (number), response data (string) and response headers
+   *    (Object).
+   */
+  $httpBackend.expect = function(method, url, data, headers) {
+    var expectation = new MockHttpExpectation(method, url, data, headers);
+    expectations.push(expectation);
+    return {
+      respond: function(status, data, headers) {
+        expectation.response = createResponse(status, data, headers);
+      }
+    };
+  };
+
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#expectGET
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new request expectation for GET requests. For more info see `expect()`.
+   *
+   * @param {string|RegExp} url HTTP url.
+   * @param {Object=} headers HTTP headers.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   * request is handled. See #expect for more info.
+   */
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#expectHEAD
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new request expectation for HEAD requests. For more info see `expect()`.
+   *
+   * @param {string|RegExp} url HTTP url.
+   * @param {Object=} headers HTTP headers.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   *   request is handled.
+   */
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#expectDELETE
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new request expectation for DELETE requests. For more info see `expect()`.
+   *
+   * @param {string|RegExp} url HTTP url.
+   * @param {Object=} headers HTTP headers.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   *   request is handled.
+   */
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#expectPOST
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new request expectation for POST requests. For more info see `expect()`.
+   *
+   * @param {string|RegExp} url HTTP url.
+   * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that
+   *  receives data string and returns true if the data is as expected, or Object if request body
+   *  is in JSON format.
+   * @param {Object=} headers HTTP headers.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   *   request is handled.
+   */
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#expectPUT
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new request expectation for PUT requests. For more info see `expect()`.
+   *
+   * @param {string|RegExp} url HTTP url.
+   * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that
+   *  receives data string and returns true if the data is as expected, or Object if request body
+   *  is in JSON format.
+   * @param {Object=} headers HTTP headers.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   *   request is handled.
+   */
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#expectPATCH
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new request expectation for PATCH requests. For more info see `expect()`.
+   *
+   * @param {string|RegExp} url HTTP url.
+   * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that
+   *  receives data string and returns true if the data is as expected, or Object if request body
+   *  is in JSON format.
+   * @param {Object=} headers HTTP headers.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   *   request is handled.
+   */
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#expectJSONP
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new request expectation for JSONP requests. For more info see `expect()`.
+   *
+   * @param {string|RegExp} url HTTP url.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   *   request is handled.
+   */
+  createShortMethods('expect');
+
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#flush
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Flushes all pending requests using the trained responses.
+   *
+   * @param {number=} count Number of responses to flush (in the order they arrived). If undefined,
+   *   all pending requests will be flushed. If there are no pending requests when the flush method
+   *   is called an exception is thrown (as this typically a sign of programming error).
+   */
+  $httpBackend.flush = function(count) {
+    $rootScope.$digest();
+    if (!responses.length) throw new Error('No pending request to flush !');
+
+    if (angular.isDefined(count)) {
+      while (count--) {
+        if (!responses.length) throw new Error('No more pending request to flush !');
+        responses.shift()();
+      }
+    } else {
+      while (responses.length) {
+        responses.shift()();
+      }
+    }
+    $httpBackend.verifyNoOutstandingExpectation();
+  };
+
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#verifyNoOutstandingExpectation
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Verifies that all of the requests defined via the `expect` api were made. If any of the
+   * requests were not made, verifyNoOutstandingExpectation throws an exception.
+   *
+   * Typically, you would call this method following each test case that asserts requests using an
+   * "afterEach" clause.
+   *
+   * <pre>
+   *   afterEach($httpBackend.verifyNoOutstandingExpectation);
+   * </pre>
+   */
+  $httpBackend.verifyNoOutstandingExpectation = function() {
+    $rootScope.$digest();
+    if (expectations.length) {
+      throw new Error('Unsatisfied requests: ' + expectations.join(', '));
+    }
+  };
+
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#verifyNoOutstandingRequest
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Verifies that there are no outstanding requests that need to be flushed.
+   *
+   * Typically, you would call this method following each test case that asserts requests using an
+   * "afterEach" clause.
+   *
+   * <pre>
+   *   afterEach($httpBackend.verifyNoOutstandingRequest);
+   * </pre>
+   */
+  $httpBackend.verifyNoOutstandingRequest = function() {
+    if (responses.length) {
+      throw new Error('Unflushed requests: ' + responses.length);
+    }
+  };
+
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#resetExpectations
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Resets all request expectations, but preserves all backend definitions. Typically, you would
+   * call resetExpectations during a multiple-phase test when you want to reuse the same instance of
+   * $httpBackend mock.
+   */
+  $httpBackend.resetExpectations = function() {
+    expectations.length = 0;
+    responses.length = 0;
+  };
+
+  return $httpBackend;
+
+
+  function createShortMethods(prefix) {
+    angular.forEach(['GET', 'DELETE', 'JSONP'], function(method) {
+     $httpBackend[prefix + method] = function(url, headers) {
+       return $httpBackend[prefix](method, url, undefined, headers);
+     };
+    });
+
+    angular.forEach(['PUT', 'POST', 'PATCH'], function(method) {
+      $httpBackend[prefix + method] = function(url, data, headers) {
+        return $httpBackend[prefix](method, url, data, headers);
+      };
+    });
+  }
+}
+
+function MockHttpExpectation(method, url, data, headers) {
+
+  this.data = data;
+  this.headers = headers;
+
+  this.match = function(m, u, d, h) {
+    if (method != m) return false;
+    if (!this.matchUrl(u)) return false;
+    if (angular.isDefined(d) && !this.matchData(d)) return false;
+    if (angular.isDefined(h) && !this.matchHeaders(h)) return false;
+    return true;
+  };
+
+  this.matchUrl = function(u) {
+    if (!url) return true;
+    if (angular.isFunction(url.test)) return url.test(u);
+    return url == u;
+  };
+
+  this.matchHeaders = function(h) {
+    if (angular.isUndefined(headers)) return true;
+    if (angular.isFunction(headers)) return headers(h);
+    return angular.equals(headers, h);
+  };
+
+  this.matchData = function(d) {
+    if (angular.isUndefined(data)) return true;
+    if (data && angular.isFunction(data.test)) return data.test(d);
+    if (data && angular.isFunction(data)) return data(d);
+    if (data && !angular.isString(data)) return angular.equals(data, angular.fromJson(d));
+    return data == d;
+  };
+
+  this.toString = function() {
+    return method + ' ' + url;
+  };
+}
+
+function MockXhr() {
+
+  // hack for testing $http, $httpBackend
+  MockXhr.$$lastInstance = this;
+
+  this.open = function(method, url, async) {
+    this.$$method = method;
+    this.$$url = url;
+    this.$$async = async;
+    this.$$reqHeaders = {};
+    this.$$respHeaders = {};
+  };
+
+  this.send = function(data) {
+    this.$$data = data;
+  };
+
+  this.setRequestHeader = function(key, value) {
+    this.$$reqHeaders[key] = value;
+  };
+
+  this.getResponseHeader = function(name) {
+    // the lookup must be case insensitive,
+    // that's why we try two quick lookups first and full scan last
+    var header = this.$$respHeaders[name];
+    if (header) return header;
+
+    name = angular.lowercase(name);
+    header = this.$$respHeaders[name];
+    if (header) return header;
+
+    header = undefined;
+    angular.forEach(this.$$respHeaders, function(headerVal, headerName) {
+      if (!header && angular.lowercase(headerName) == name) header = headerVal;
+    });
+    return header;
+  };
+
+  this.getAllResponseHeaders = function() {
+    var lines = [];
+
+    angular.forEach(this.$$respHeaders, function(value, key) {
+      lines.push(key + ': ' + value);
+    });
+    return lines.join('\n');
+  };
+
+  this.abort = angular.noop;
+}
+
+
+/**
+ * @ngdoc function
+ * @name ngMock.$timeout
+ * @description
+ *
+ * This service is just a simple decorator for {@link ng.$timeout $timeout} service
+ * that adds a "flush" and "verifyNoPendingTasks" methods.
+ */
+
+angular.mock.$TimeoutDecorator = function($delegate, $browser) {
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$timeout#flush
+   * @methodOf ngMock.$timeout
+   * @description
+   *
+   * Flushes the queue of pending tasks.
+   *
+   * @param {number=} delay maximum timeout amount to flush up until
+   */
+  $delegate.flush = function(delay) {
+    $browser.defer.flush(delay);
+  };
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$timeout#verifyNoPendingTasks
+   * @methodOf ngMock.$timeout
+   * @description
+   *
+   * Verifies that there are no pending tasks that need to be flushed.
+   */
+  $delegate.verifyNoPendingTasks = function() {
+    if ($browser.deferredFns.length) {
+      throw new Error('Deferred tasks to flush (' + $browser.deferredFns.length + '): ' +
+          formatPendingTasksAsString($browser.deferredFns));
+    }
+  };
+
+  function formatPendingTasksAsString(tasks) {
+    var result = [];
+    angular.forEach(tasks, function(task) {
+      result.push('{id: ' + task.id + ', ' + 'time: ' + task.time + '}');
+    });
+
+    return result.join(', ');
+  }
+
+  return $delegate;
+};
+
+/**
+ *
+ */
+angular.mock.$RootElementProvider = function() {
+  this.$get = function() {
+    return angular.element('<div ng-app></div>');
+  };
+};
+
+/**
+ * @ngdoc overview
+ * @name ngMock
+ * @description
+ *
+ * # ngMock
+ *
+ * The `ngMock` module providers support to inject and mock Angular services into unit tests.
+ * In addition, ngMock also extends various core ng services such that they can be
+ * inspected and controlled in a synchronous manner within test code.
+ *
+ * {@installModule mocks}
+ *
+ * <div doc-module-components="ngMock"></div>
+ *
+ */
+angular.module('ngMock', ['ng']).provider({
+  $browser: angular.mock.$BrowserProvider,
+  $exceptionHandler: angular.mock.$ExceptionHandlerProvider,
+  $log: angular.mock.$LogProvider,
+  $interval: angular.mock.$IntervalProvider,
+  $httpBackend: angular.mock.$HttpBackendProvider,
+  $rootElement: angular.mock.$RootElementProvider
+}).config(['$provide', function($provide) {
+  $provide.decorator('$timeout', angular.mock.$TimeoutDecorator);
+}]);
+
+/**
+ * @ngdoc overview
+ * @name ngMockE2E
+ * @description
+ *
+ * The `ngMockE2E` is an angular module which contains mocks suitable for end-to-end testing.
+ * Currently there is only one mock present in this module -
+ * the {@link ngMockE2E.$httpBackend e2e $httpBackend} mock.
+ */
+angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {
+  $provide.decorator('$httpBackend', angular.mock.e2e.$httpBackendDecorator);
+}]);
+
+/**
+ * @ngdoc object
+ * @name ngMockE2E.$httpBackend
+ * @description
+ * Fake HTTP backend implementation suitable for end-to-end testing or backend-less development of
+ * applications that use the {@link ng.$http $http service}.
+ *
+ * *Note*: For fake http backend implementation suitable for unit testing please see
+ * {@link ngMock.$httpBackend unit-testing $httpBackend mock}.
+ *
+ * This implementation can be used to respond with static or dynamic responses via the `when` api
+ * and its shortcuts (`whenGET`, `whenPOST`, etc) and optionally pass through requests to the
+ * real $httpBackend for specific requests (e.g. to interact with certain remote apis or to fetch
+ * templates from a webserver).
+ *
+ * As opposed to unit-testing, in an end-to-end testing scenario or in scenario when an application
+ * is being developed with the real backend api replaced with a mock, it is often desirable for
+ * certain category of requests to bypass the mock and issue a real http request (e.g. to fetch
+ * templates or static files from the webserver). To configure the backend with this behavior
+ * use the `passThrough` request handler of `when` instead of `respond`.
+ *
+ * Additionally, we don't want to manually have to flush mocked out requests like we do during unit
+ * testing. For this reason the e2e $httpBackend automatically flushes mocked out requests
+ * automatically, closely simulating the behavior of the XMLHttpRequest object.
+ *
+ * To setup the application to run with this http backend, you have to create a module that depends
+ * on the `ngMockE2E` and your application modules and defines the fake backend:
+ *
+ * <pre>
+ *   myAppDev = angular.module('myAppDev', ['myApp', 'ngMockE2E']);
+ *   myAppDev.run(function($httpBackend) {
+ *     phones = [{name: 'phone1'}, {name: 'phone2'}];
+ *
+ *     // returns the current list of phones
+ *     $httpBackend.whenGET('/phones').respond(phones);
+ *
+ *     // adds a new phone to the phones array
+ *     $httpBackend.whenPOST('/phones').respond(function(method, url, data) {
+ *       phones.push(angular.fromJson(data));
+ *     });
+ *     $httpBackend.whenGET(/^\/templates\//).passThrough();
+ *     //...
+ *   });
+ * </pre>
+ *
+ * Afterwards, bootstrap your app with this new module.
+ */
+
+/**
+ * @ngdoc method
+ * @name ngMockE2E.$httpBackend#when
+ * @methodOf ngMockE2E.$httpBackend
+ * @description
+ * Creates a new backend definition.
+ *
+ * @param {string} method HTTP method.
+ * @param {string|RegExp} url HTTP url.
+ * @param {(string|RegExp)=} data HTTP request body.
+ * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
+ *   object and returns true if the headers match the current definition.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ *   control how a matched request is handled.
+ *
+ *  - respond –
+ *    `{function([status,] data[, headers])|function(function(method, url, data, headers)}`
+ *    – The respond method takes a set of static data to be returned or a function that can return
+ *    an array containing response status (number), response data (string) and response headers
+ *    (Object).
+ *  - passThrough – `{function()}` – Any request matching a backend definition with `passThrough`
+ *    handler, will be pass through to the real backend (an XHR request will be made to the
+ *    server.
+ */
+
+/**
+ * @ngdoc method
+ * @name ngMockE2E.$httpBackend#whenGET
+ * @methodOf ngMockE2E.$httpBackend
+ * @description
+ * Creates a new backend definition for GET requests. For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ *   control how a matched request is handled.
+ */
+
+/**
+ * @ngdoc method
+ * @name ngMockE2E.$httpBackend#whenHEAD
+ * @methodOf ngMockE2E.$httpBackend
+ * @description
+ * Creates a new backend definition for HEAD requests. For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ *   control how a matched request is handled.
+ */
+
+/**
+ * @ngdoc method
+ * @name ngMockE2E.$httpBackend#whenDELETE
+ * @methodOf ngMockE2E.$httpBackend
+ * @description
+ * Creates a new backend definition for DELETE requests. For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ *   control how a matched request is handled.
+ */
+
+/**
+ * @ngdoc method
+ * @name ngMockE2E.$httpBackend#whenPOST
+ * @methodOf ngMockE2E.$httpBackend
+ * @description
+ * Creates a new backend definition for POST requests. For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {(string|RegExp)=} data HTTP request body.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ *   control how a matched request is handled.
+ */
+
+/**
+ * @ngdoc method
+ * @name ngMockE2E.$httpBackend#whenPUT
+ * @methodOf ngMockE2E.$httpBackend
+ * @description
+ * Creates a new backend definition for PUT requests.  For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {(string|RegExp)=} data HTTP request body.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ *   control how a matched request is handled.
+ */
+
+/**
+ * @ngdoc method
+ * @name ngMockE2E.$httpBackend#whenPATCH
+ * @methodOf ngMockE2E.$httpBackend
+ * @description
+ * Creates a new backend definition for PATCH requests.  For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {(string|RegExp)=} data HTTP request body.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ *   control how a matched request is handled.
+ */
+
+/**
+ * @ngdoc method
+ * @name ngMockE2E.$httpBackend#whenJSONP
+ * @methodOf ngMockE2E.$httpBackend
+ * @description
+ * Creates a new backend definition for JSONP requests. For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ *   control how a matched request is handled.
+ */
+angular.mock.e2e = {};
+angular.mock.e2e.$httpBackendDecorator =
+  ['$rootScope', '$delegate', '$browser', createHttpBackendMock];
+
+
+angular.mock.clearDataCache = function() {
+  var key,
+      cache = angular.element.cache;
+
+  for(key in cache) {
+    if (Object.prototype.hasOwnProperty.call(cache,key)) {
+      var handle = cache[key].handle;
+
+      handle && angular.element(handle.elem).off();
+      delete cache[key];
+    }
+  }
+};
+
+
+
+if(window.jasmine || window.mocha) {
+
+  var currentSpec = null,
+      isSpecRunning = function() {
+        return currentSpec && (window.mocha || currentSpec.queue.running);
+      };
+
+
+  beforeEach(function() {
+    currentSpec = this;
+  });
+
+  afterEach(function() {
+    var injector = currentSpec.$injector;
+
+    currentSpec.$injector = null;
+    currentSpec.$modules = null;
+    currentSpec = null;
+
+    if (injector) {
+      injector.get('$rootElement').off();
+      injector.get('$browser').pollFns.length = 0;
+    }
+
+    angular.mock.clearDataCache();
+
+    // clean up jquery's fragment cache
+    angular.forEach(angular.element.fragments, function(val, key) {
+      delete angular.element.fragments[key];
+    });
+
+    MockXhr.$$lastInstance = null;
+
+    angular.forEach(angular.callbacks, function(val, key) {
+      delete angular.callbacks[key];
+    });
+    angular.callbacks.counter = 0;
+  });
+
+  /**
+   * @ngdoc function
+   * @name angular.mock.module
+   * @description
+   *
+   * *NOTE*: This function is also published on window for easy access.<br>
+   *
+   * This function registers a module configuration code. It collects the configuration information
+   * which will be used when the injector is created by {@link angular.mock.inject inject}.
+   *
+   * See {@link angular.mock.inject inject} for usage example
+   *
+   * @param {...(string|Function|Object)} fns any number of modules which are represented as string
+   *        aliases or as anonymous module initialization functions. The modules are used to
+   *        configure the injector. The 'ng' and 'ngMock' modules are automatically loaded. If an
+   *        object literal is passed they will be register as values in the module, the key being
+   *        the module name and the value being what is returned.
+   */
+  window.module = angular.mock.module = function() {
+    var moduleFns = Array.prototype.slice.call(arguments, 0);
+    return isSpecRunning() ? workFn() : workFn;
+    /////////////////////
+    function workFn() {
+      if (currentSpec.$injector) {
+        throw new Error('Injector already created, can not register a module!');
+      } else {
+        var modules = currentSpec.$modules || (currentSpec.$modules = []);
+        angular.forEach(moduleFns, function(module) {
+          if (angular.isObject(module) && !angular.isArray(module)) {
+            modules.push(function($provide) {
+              angular.forEach(module, function(value, key) {
+                $provide.value(key, value);
+              });
+            });
+          } else {
+            modules.push(module);
+          }
+        });
+      }
+    }
+  };
+
+  /**
+   * @ngdoc function
+   * @name angular.mock.inject
+   * @description
+   *
+   * *NOTE*: This function is also published on window for easy access.<br>
+   *
+   * The inject function wraps a function into an injectable function. The inject() creates new
+   * instance of {@link AUTO.$injector $injector} per test, which is then used for
+   * resolving references.
+   *
+   *
+   * ## Resolving References (Underscore Wrapping)
+   * Often, we would like to inject a reference once, in a `beforeEach()` block and reuse this
+   * in multiple `it()` clauses. To be able to do this we must assign the reference to a variable
+   * that is declared in the scope of the `describe()` block. Since we would, most likely, want
+   * the variable to have the same name of the reference we have a problem, since the parameter
+   * to the `inject()` function would hide the outer variable.
+   *
+   * To help with this, the injected parameters can, optionally, be enclosed with underscores.
+   * These are ignored by the injector when the reference name is resolved.
+   *
+   * For example, the parameter `_myService_` would be resolved as the reference `myService`.
+   * Since it is available in the function body as _myService_, we can then assign it to a variable
+   * defined in an outer scope.
+   *
+   * ```
+   * // Defined out reference variable outside
+   * var myService;
+   *
+   * // Wrap the parameter in underscores
+   * beforeEach( inject( function(_myService_){
+   *   myService = _myService_;
+   * }));
+   *
+   * // Use myService in a series of tests.
+   * it('makes use of myService', function() {
+   *   myService.doStuff();
+   * });
+   *
+   * ```
+   *
+   * See also {@link angular.mock.module angular.mock.module}
+   *
+   * ## Example
+   * Example of what a typical jasmine tests looks like with the inject method.
+   * <pre>
+   *
+   *   angular.module('myApplicationModule', [])
+   *       .value('mode', 'app')
+   *       .value('version', 'v1.0.1');
+   *
+   *
+   *   describe('MyApp', function() {
+   *
+   *     // You need to load modules that you want to test,
+   *     // it loads only the "ng" module by default.
+   *     beforeEach(module('myApplicationModule'));
+   *
+   *
+   *     // inject() is used to inject arguments of all given functions
+   *     it('should provide a version', inject(function(mode, version) {
+   *       expect(version).toEqual('v1.0.1');
+   *       expect(mode).toEqual('app');
+   *     }));
+   *
+   *
+   *     // The inject and module method can also be used inside of the it or beforeEach
+   *     it('should override a version and test the new version is injected', function() {
+   *       // module() takes functions or strings (module aliases)
+   *       module(function($provide) {
+   *         $provide.value('version', 'overridden'); // override version here
+   *       });
+   *
+   *       inject(function(version) {
+   *         expect(version).toEqual('overridden');
+   *       });
+   *     });
+   *   });
+   *
+   * </pre>
+   *
+   * @param {...Function} fns any number of functions which will be injected using the injector.
+   */
+  window.inject = angular.mock.inject = function() {
+    var blockFns = Array.prototype.slice.call(arguments, 0);
+    var errorForStack = new Error('Declaration Location');
+    return isSpecRunning() ? workFn() : workFn;
+    /////////////////////
+    function workFn() {
+      var modules = currentSpec.$modules || [];
+
+      modules.unshift('ngMock');
+      modules.unshift('ng');
+      var injector = currentSpec.$injector;
+      if (!injector) {
+        injector = currentSpec.$injector = angular.injector(modules);
+      }
+      for(var i = 0, ii = blockFns.length; i < ii; i++) {
+        try {
+          /* jshint -W040 *//* Jasmine explicitly provides a `this` object when calling functions */
+          injector.invoke(blockFns[i] || angular.noop, this);
+          /* jshint +W040 */
+        } catch (e) {
+          if(e.stack && errorForStack) e.stack +=  '\n' + errorForStack.stack;
+          throw e;
+        } finally {
+          errorForStack = null;
+        }
+      }
+    }
+  };
+}
+
+
+})(window, window.angular);


[10/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/bootstrap/css/bootstrap.css
----------------------------------------------------------------------
diff --git a/portal/js/libs/bootstrap/css/bootstrap.css b/portal/js/libs/bootstrap/css/bootstrap.css
new file mode 100644
index 0000000..c7af8b8
--- /dev/null
+++ b/portal/js/libs/bootstrap/css/bootstrap.css
@@ -0,0 +1,6169 @@
+/*!
+ * Bootstrap v2.3.1
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */
+
+.clearfix {
+  *zoom: 1;
+}
+
+.clearfix:before,
+.clearfix:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.clearfix:after {
+  clear: both;
+}
+
+.hide-text {
+  font: 0/0 a;
+  color: transparent;
+  text-shadow: none;
+  background-color: transparent;
+  border: 0;
+}
+
+.input-block-level {
+  display: block;
+  width: 100%;
+  min-height: 30px;
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+}
+
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+nav,
+section {
+  display: block;
+}
+
+audio,
+canvas,
+video {
+  display: inline-block;
+  *display: inline;
+  *zoom: 1;
+}
+
+audio:not([controls]) {
+  display: none;
+}
+
+html {
+  font-size: 100%;
+  -webkit-text-size-adjust: 100%;
+  -ms-text-size-adjust: 100%;
+}
+
+a:focus {
+  outline: thin dotted #333;
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
+}
+
+a:hover,
+a:active {
+  outline: 0;
+}
+
+sub,
+sup {
+  position: relative;
+  font-size: 75%;
+  line-height: 0;
+  vertical-align: baseline;
+}
+
+sup {
+  top: -0.5em;
+}
+
+sub {
+  bottom: -0.25em;
+}
+
+img {
+  width: auto\9;
+  height: auto;
+  max-width: 100%;
+  vertical-align: middle;
+  border: 0;
+  -ms-interpolation-mode: bicubic;
+}
+
+#map_canvas img,
+.google-maps img {
+  max-width: none;
+}
+
+button,
+input,
+select,
+textarea {
+  margin: 0;
+  font-size: 100%;
+  vertical-align: middle;
+}
+
+button,
+input {
+  *overflow: visible;
+  line-height: normal;
+}
+
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+  padding: 0;
+  border: 0;
+}
+
+button,
+html input[type="button"],
+input[type="reset"],
+input[type="submit"] {
+  cursor: pointer;
+  -webkit-appearance: button;
+}
+
+label,
+select,
+button,
+input[type="button"],
+input[type="reset"],
+input[type="submit"],
+input[type="radio"],
+input[type="checkbox"] {
+  cursor: pointer;
+}
+
+input[type="search"] {
+  -webkit-box-sizing: content-box;
+  -moz-box-sizing: content-box;
+  box-sizing: content-box;
+  -webkit-appearance: textfield;
+}
+
+input[type="search"]::-webkit-search-decoration,
+input[type="search"]::-webkit-search-cancel-button {
+  -webkit-appearance: none;
+}
+
+textarea {
+  overflow: auto;
+  vertical-align: top;
+}
+
+@media print {
+  * {
+    color: #000 !important;
+    text-shadow: none !important;
+    background: transparent !important;
+    box-shadow: none !important;
+  }
+
+  a,
+  a:visited {
+    text-decoration: underline;
+  }
+
+  a[href]:after {
+    content: " (" attr(href) ")";
+  }
+
+  abbr[title]:after {
+    content: " (" attr(title) ")";
+  }
+
+  .ir a:after,
+  a[href^="javascript:"]:after,
+  a[href^="#"]:after {
+    content: "";
+  }
+
+  pre,
+  blockquote {
+    border: 1px solid #999;
+    page-break-inside: avoid;
+  }
+
+  thead {
+    display: table-header-group;
+  }
+
+  tr,
+  img {
+    page-break-inside: avoid;
+  }
+
+  img {
+    max-width: 100% !important;
+  }
+
+  @page {
+    margin: 0.5cm;
+  }
+
+  p,
+  h2,
+  h3 {
+    orphans: 3;
+    widows: 3;
+  }
+
+  h2,
+  h3 {
+    page-break-after: avoid;
+  }
+}
+
+body {
+  margin: 0;
+  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+  font-size: 14px;
+  line-height: 20px;
+  color: #333333;
+  background-color: #ffffff;
+}
+
+a {
+  color: #0088cc;
+  text-decoration: none;
+}
+
+a:hover,
+a:focus {
+  color: #005580;
+  text-decoration: underline;
+}
+
+.img-rounded {
+  -webkit-border-radius: 6px;
+  -moz-border-radius: 6px;
+  border-radius: 6px;
+}
+
+.img-polaroid {
+  padding: 4px;
+  background-color: #fff;
+  border: 1px solid #ccc;
+  border: 1px solid rgba(0, 0, 0, 0.2);
+  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+}
+
+.img-circle {
+  -webkit-border-radius: 500px;
+  -moz-border-radius: 500px;
+  border-radius: 500px;
+}
+
+.row {
+  margin-left: -20px;
+  *zoom: 1;
+}
+
+.row:before,
+.row:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.row:after {
+  clear: both;
+}
+
+[class*="span"] {
+  float: left;
+  min-height: 1px;
+  margin-left: 20px;
+}
+
+.container,
+.navbar-static-top .container,
+.navbar-fixed-top .container,
+.navbar-fixed-bottom .container {
+  width: 940px;
+}
+
+.span12 {
+  width: 940px;
+}
+
+.span11 {
+  width: 860px;
+}
+
+.span10 {
+  width: 780px;
+}
+
+.span9 {
+  width: 700px;
+}
+
+.span8 {
+  width: 620px;
+}
+
+.span7 {
+  width: 540px;
+}
+
+.span6 {
+  width: 460px;
+}
+
+.span5 {
+  width: 380px;
+}
+
+.span4 {
+  width: 300px;
+}
+
+.span3 {
+  width: 220px;
+}
+
+.span2 {
+  width: 140px;
+}
+
+.span1 {
+  width: 60px;
+}
+
+.offset12 {
+  margin-left: 980px;
+}
+
+.offset11 {
+  margin-left: 900px;
+}
+
+.offset10 {
+  margin-left: 820px;
+}
+
+.offset9 {
+  margin-left: 740px;
+}
+
+.offset8 {
+  margin-left: 660px;
+}
+
+.offset7 {
+  margin-left: 580px;
+}
+
+.offset6 {
+  margin-left: 500px;
+}
+
+.offset5 {
+  margin-left: 420px;
+}
+
+.offset4 {
+  margin-left: 340px;
+}
+
+.offset3 {
+  margin-left: 260px;
+}
+
+.offset2 {
+  margin-left: 180px;
+}
+
+.offset1 {
+  margin-left: 100px;
+}
+
+.row-fluid {
+  width: 100%;
+  *zoom: 1;
+}
+
+.row-fluid:before,
+.row-fluid:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.row-fluid:after {
+  clear: both;
+}
+
+.row-fluid [class*="span"] {
+  display: block;
+  float: left;
+  width: 100%;
+  min-height: 30px;
+  margin-left: 2.127659574468085%;
+  *margin-left: 2.074468085106383%;
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+}
+
+.row-fluid [class*="span"]:first-child {
+  margin-left: 0;
+}
+
+.row-fluid .controls-row [class*="span"] + [class*="span"] {
+  margin-left: 2.127659574468085%;
+}
+
+.row-fluid .span12 {
+  width: 100%;
+  *width: 99.94680851063829%;
+}
+
+.row-fluid .span11 {
+  width: 91.48936170212765%;
+  *width: 91.43617021276594%;
+}
+
+.row-fluid .span10 {
+  width: 82.97872340425532%;
+  *width: 82.92553191489361%;
+}
+
+.row-fluid .span9 {
+  width: 74.46808510638297%;
+  *width: 74.41489361702126%;
+}
+
+.row-fluid .span8 {
+  width: 65.95744680851064%;
+  *width: 65.90425531914893%;
+}
+
+.row-fluid .span7 {
+  width: 57.44680851063829%;
+  *width: 57.39361702127659%;
+}
+
+.row-fluid .span6 {
+  width: 48.93617021276595%;
+  *width: 48.88297872340425%;
+}
+
+.row-fluid .span5 {
+  width: 40.42553191489362%;
+  *width: 40.37234042553192%;
+}
+
+.row-fluid .span4 {
+  width: 31.914893617021278%;
+  *width: 31.861702127659576%;
+}
+
+.row-fluid .span3 {
+  width: 23.404255319148934%;
+  *width: 23.351063829787233%;
+}
+
+.row-fluid .span2 {
+  width: 14.893617021276595%;
+  *width: 14.840425531914894%;
+}
+
+.row-fluid .span1 {
+  width: 6.382978723404255%;
+  *width: 6.329787234042553%;
+}
+
+.row-fluid .offset12 {
+  margin-left: 104.25531914893617%;
+  *margin-left: 104.14893617021275%;
+}
+
+.row-fluid .offset12:first-child {
+  margin-left: 102.12765957446808%;
+  *margin-left: 102.02127659574467%;
+}
+
+.row-fluid .offset11 {
+  margin-left: 95.74468085106382%;
+  *margin-left: 95.6382978723404%;
+}
+
+.row-fluid .offset11:first-child {
+  margin-left: 93.61702127659574%;
+  *margin-left: 93.51063829787232%;
+}
+
+.row-fluid .offset10 {
+  margin-left: 87.23404255319149%;
+  *margin-left: 87.12765957446807%;
+}
+
+.row-fluid .offset10:first-child {
+  margin-left: 85.1063829787234%;
+  *margin-left: 84.99999999999999%;
+}
+
+.row-fluid .offset9 {
+  margin-left: 78.72340425531914%;
+  *margin-left: 78.61702127659572%;
+}
+
+.row-fluid .offset9:first-child {
+  margin-left: 76.59574468085106%;
+  *margin-left: 76.48936170212764%;
+}
+
+.row-fluid .offset8 {
+  margin-left: 70.2127659574468%;
+  *margin-left: 70.10638297872339%;
+}
+
+.row-fluid .offset8:first-child {
+  margin-left: 68.08510638297872%;
+  *margin-left: 67.9787234042553%;
+}
+
+.row-fluid .offset7 {
+  margin-left: 61.70212765957446%;
+  *margin-left: 61.59574468085106%;
+}
+
+.row-fluid .offset7:first-child {
+  margin-left: 59.574468085106375%;
+  *margin-left: 59.46808510638297%;
+}
+
+.row-fluid .offset6 {
+  margin-left: 53.191489361702125%;
+  *margin-left: 53.085106382978715%;
+}
+
+.row-fluid .offset6:first-child {
+  margin-left: 51.063829787234035%;
+  *margin-left: 50.95744680851063%;
+}
+
+.row-fluid .offset5 {
+  margin-left: 44.68085106382979%;
+  *margin-left: 44.57446808510638%;
+}
+
+.row-fluid .offset5:first-child {
+  margin-left: 42.5531914893617%;
+  *margin-left: 42.4468085106383%;
+}
+
+.row-fluid .offset4 {
+  margin-left: 36.170212765957444%;
+  *margin-left: 36.06382978723405%;
+}
+
+.row-fluid .offset4:first-child {
+  margin-left: 34.04255319148936%;
+  *margin-left: 33.93617021276596%;
+}
+
+.row-fluid .offset3 {
+  margin-left: 27.659574468085104%;
+  *margin-left: 27.5531914893617%;
+}
+
+.row-fluid .offset3:first-child {
+  margin-left: 25.53191489361702%;
+  *margin-left: 25.425531914893618%;
+}
+
+.row-fluid .offset2 {
+  margin-left: 19.148936170212764%;
+  *margin-left: 19.04255319148936%;
+}
+
+.row-fluid .offset2:first-child {
+  margin-left: 17.02127659574468%;
+  *margin-left: 16.914893617021278%;
+}
+
+.row-fluid .offset1 {
+  margin-left: 10.638297872340425%;
+  *margin-left: 10.53191489361702%;
+}
+
+.row-fluid .offset1:first-child {
+  margin-left: 8.51063829787234%;
+  *margin-left: 8.404255319148938%;
+}
+
+[class*="span"].hide,
+.row-fluid [class*="span"].hide {
+  display: none;
+}
+
+[class*="span"].pull-right,
+.row-fluid [class*="span"].pull-right {
+  float: right;
+}
+
+.container {
+  margin-right: auto;
+  margin-left: auto;
+  *zoom: 1;
+}
+
+.container:before,
+.container:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.container:after {
+  clear: both;
+}
+
+.container-fluid {
+  padding-right: 20px;
+  padding-left: 20px;
+  *zoom: 1;
+}
+
+.container-fluid:before,
+.container-fluid:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.container-fluid:after {
+  clear: both;
+}
+
+p {
+  margin: 0 0 10px;
+}
+
+.lead {
+  margin-bottom: 20px;
+  font-size: 21px;
+  font-weight: 200;
+  line-height: 30px;
+}
+
+small {
+  font-size: 85%;
+}
+
+strong {
+  font-weight: bold;
+}
+
+em {
+  font-style: italic;
+}
+
+cite {
+  font-style: normal;
+}
+
+.muted {
+  color: #999999;
+}
+
+a.muted:hover,
+a.muted:focus {
+  color: #808080;
+}
+
+.text-warning {
+  color: #c09853;
+}
+
+a.text-warning:hover,
+a.text-warning:focus {
+  color: #a47e3c;
+}
+
+.text-error {
+  color: #b94a48;
+}
+
+a.text-error:hover,
+a.text-error:focus {
+  color: #953b39;
+}
+
+.text-info {
+  color: #3a87ad;
+}
+
+a.text-info:hover,
+a.text-info:focus {
+  color: #2d6987;
+}
+
+.text-success {
+  color: #468847;
+}
+
+a.text-success:hover,
+a.text-success:focus {
+  color: #356635;
+}
+
+.text-left {
+  text-align: left;
+}
+
+.text-right {
+  text-align: right;
+}
+
+.text-center {
+  text-align: center;
+}
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+  margin: 10px 0;
+  font-family: inherit;
+  font-weight: bold;
+  line-height: 20px;
+  color: inherit;
+  text-rendering: optimizelegibility;
+}
+
+h1 small,
+h2 small,
+h3 small,
+h4 small,
+h5 small,
+h6 small {
+  font-weight: normal;
+  line-height: 1;
+  color: #999999;
+}
+
+h1,
+h2,
+h3 {
+  line-height: 40px;
+}
+
+h1 {
+  font-size: 38.5px;
+}
+
+h2 {
+  font-size: 31.5px;
+}
+
+h3 {
+  font-size: 24.5px;
+}
+
+h4 {
+  font-size: 17.5px;
+}
+
+h5 {
+  font-size: 14px;
+}
+
+h6 {
+  font-size: 11.9px;
+}
+
+h1 small {
+  font-size: 24.5px;
+}
+
+h2 small {
+  font-size: 17.5px;
+}
+
+h3 small {
+  font-size: 14px;
+}
+
+h4 small {
+  font-size: 14px;
+}
+
+.page-header {
+  padding-bottom: 9px;
+  margin: 20px 0 30px;
+  border-bottom: 1px solid #eeeeee;
+}
+
+ul,
+ol {
+  padding: 0;
+  margin: 0 0 10px 25px;
+}
+
+ul ul,
+ul ol,
+ol ol,
+ol ul {
+  margin-bottom: 0;
+}
+
+li {
+  line-height: 20px;
+}
+
+ul.unstyled,
+ol.unstyled {
+  margin-left: 0;
+  list-style: none;
+}
+
+ul.inline,
+ol.inline {
+  margin-left: 0;
+  list-style: none;
+}
+
+ul.inline > li,
+ol.inline > li {
+  display: inline-block;
+  *display: inline;
+  padding-right: 5px;
+  padding-left: 5px;
+  *zoom: 1;
+}
+
+dl {
+  margin-bottom: 20px;
+}
+
+dt,
+dd {
+  line-height: 20px;
+}
+
+dt {
+  font-weight: bold;
+}
+
+dd {
+  margin-left: 10px;
+}
+
+.dl-horizontal {
+  *zoom: 1;
+}
+
+.dl-horizontal:before,
+.dl-horizontal:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.dl-horizontal:after {
+  clear: both;
+}
+
+.dl-horizontal dt {
+  float: left;
+  width: 160px;
+  overflow: hidden;
+  clear: left;
+  text-align: right;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.dl-horizontal dd {
+  margin-left: 180px;
+}
+
+hr {
+  margin: 20px 0;
+  border: 0;
+  border-top: 1px solid #eeeeee;
+  border-bottom: 1px solid #ffffff;
+}
+
+abbr[title],
+abbr[data-original-title] {
+  cursor: help;
+  border-bottom: 1px dotted #999999;
+}
+
+abbr.initialism {
+  font-size: 90%;
+  text-transform: uppercase;
+}
+
+blockquote {
+  padding: 0 0 0 15px;
+  margin: 0 0 20px;
+  border-left: 5px solid #eeeeee;
+}
+
+blockquote p {
+  margin-bottom: 0;
+  font-size: 17.5px;
+  font-weight: 300;
+  line-height: 1.25;
+}
+
+blockquote small {
+  display: block;
+  line-height: 20px;
+  color: #999999;
+}
+
+blockquote small:before {
+  content: '\2014 \00A0';
+}
+
+blockquote.pull-right {
+  float: right;
+  padding-right: 15px;
+  padding-left: 0;
+  border-right: 5px solid #eeeeee;
+  border-left: 0;
+}
+
+blockquote.pull-right p,
+blockquote.pull-right small {
+  text-align: right;
+}
+
+blockquote.pull-right small:before {
+  content: '';
+}
+
+blockquote.pull-right small:after {
+  content: '\00A0 \2014';
+}
+
+q:before,
+q:after,
+blockquote:before,
+blockquote:after {
+  content: "";
+}
+
+address {
+  display: block;
+  margin-bottom: 20px;
+  font-style: normal;
+  line-height: 20px;
+}
+
+code,
+pre {
+  padding: 0 3px 2px;
+  font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
+  font-size: 12px;
+  color: #333333;
+  -webkit-border-radius: 3px;
+  -moz-border-radius: 3px;
+  border-radius: 3px;
+}
+
+code {
+  padding: 2px 4px;
+  color: #d14;
+  white-space: nowrap;
+  background-color: #f7f7f9;
+  border: 1px solid #e1e1e8;
+}
+
+pre {
+  display: block;
+  padding: 9.5px;
+  margin: 0 0 10px;
+  font-size: 13px;
+  line-height: 20px;
+  word-break: break-all;
+  word-wrap: break-word;
+  white-space: pre;
+  white-space: pre-wrap;
+  background-color: #f5f5f5;
+  border: 1px solid #ccc;
+  border: 1px solid rgba(0, 0, 0, 0.15);
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+}
+
+pre.prettyprint {
+  margin-bottom: 20px;
+}
+
+pre code {
+  padding: 0;
+  color: inherit;
+  white-space: pre;
+  white-space: pre-wrap;
+  background-color: transparent;
+  border: 0;
+}
+
+.pre-scrollable {
+  max-height: 340px;
+  overflow-y: scroll;
+}
+
+form {
+  margin: 0 0 20px;
+}
+
+fieldset {
+  padding: 0;
+  margin: 0;
+  border: 0;
+}
+
+legend {
+  display: block;
+  width: 100%;
+  padding: 0;
+  margin-bottom: 20px;
+  font-size: 21px;
+  line-height: 40px;
+  color: #333333;
+  border: 0;
+  border-bottom: 1px solid #e5e5e5;
+}
+
+legend small {
+  font-size: 15px;
+  color: #999999;
+}
+
+label,
+input,
+button,
+select,
+textarea {
+  font-size: 14px;
+  font-weight: normal;
+  line-height: 20px;
+}
+
+input,
+button,
+select,
+textarea {
+  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+}
+
+label {
+  display: block;
+  margin-bottom: 5px;
+}
+
+select,
+textarea,
+input[type="text"],
+input[type="password"],
+input[type="datetime"],
+input[type="datetime-local"],
+input[type="date"],
+input[type="month"],
+input[type="time"],
+input[type="week"],
+input[type="number"],
+input[type="email"],
+input[type="url"],
+input[type="search"],
+input[type="tel"],
+input[type="color"],
+.uneditable-input {
+  display: inline-block;
+  height: 20px;
+  padding: 4px 6px;
+  margin-bottom: 10px;
+  font-size: 14px;
+  line-height: 20px;
+  color: #555555;
+  vertical-align: middle;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+}
+
+input,
+textarea,
+.uneditable-input {
+  width: 206px;
+}
+
+textarea {
+  height: auto;
+}
+
+textarea,
+input[type="text"],
+input[type="password"],
+input[type="datetime"],
+input[type="datetime-local"],
+input[type="date"],
+input[type="month"],
+input[type="time"],
+input[type="week"],
+input[type="number"],
+input[type="email"],
+input[type="url"],
+input[type="search"],
+input[type="tel"],
+input[type="color"],
+.uneditable-input {
+  background-color: #ffffff;
+  border: 1px solid #cccccc;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
+  -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
+  -o-transition: border linear 0.2s, box-shadow linear 0.2s;
+  transition: border linear 0.2s, box-shadow linear 0.2s;
+}
+
+textarea:focus,
+input[type="text"]:focus,
+input[type="password"]:focus,
+input[type="datetime"]:focus,
+input[type="datetime-local"]:focus,
+input[type="date"]:focus,
+input[type="month"]:focus,
+input[type="time"]:focus,
+input[type="week"]:focus,
+input[type="number"]:focus,
+input[type="email"]:focus,
+input[type="url"]:focus,
+input[type="search"]:focus,
+input[type="tel"]:focus,
+input[type="color"]:focus,
+.uneditable-input:focus {
+  border-color: rgba(82, 168, 236, 0.8);
+  outline: 0;
+  outline: thin dotted  \9;
+  /* IE6-9 */
+
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
+}
+
+input[type="radio"],
+input[type="checkbox"] {
+  margin: 4px 0 0;
+  margin-top: 1px  \9;
+  *margin-top: 0;
+  line-height: normal;
+}
+
+input[type="file"],
+input[type="image"],
+input[type="submit"],
+input[type="reset"],
+input[type="button"],
+input[type="radio"],
+input[type="checkbox"] {
+  width: auto;
+}
+
+select,
+input[type="file"] {
+  height: 30px;
+  /* In IE7, the height of the select element cannot be changed by height, only font-size */
+
+  *margin-top: 4px;
+  /* For IE7, add top margin to align select with labels */
+
+  line-height: 30px;
+}
+
+select {
+  width: 220px;
+  background-color: #ffffff;
+  border: 1px solid #cccccc;
+}
+
+select[multiple],
+select[size] {
+  height: auto;
+}
+
+select:focus,
+input[type="file"]:focus,
+input[type="radio"]:focus,
+input[type="checkbox"]:focus {
+  outline: thin dotted #333;
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
+}
+
+.uneditable-input,
+.uneditable-textarea {
+  color: #999999;
+  cursor: not-allowed;
+  background-color: #fcfcfc;
+  border-color: #cccccc;
+  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
+  -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
+  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
+}
+
+.uneditable-input {
+  overflow: hidden;
+  white-space: nowrap;
+}
+
+.uneditable-textarea {
+  width: auto;
+  height: auto;
+}
+
+input:-moz-placeholder,
+textarea:-moz-placeholder {
+  color: #999999;
+}
+
+input:-ms-input-placeholder,
+textarea:-ms-input-placeholder {
+  color: #999999;
+}
+
+input::-webkit-input-placeholder,
+textarea::-webkit-input-placeholder {
+  color: #999999;
+}
+
+.radio,
+.checkbox {
+  min-height: 20px;
+  padding-left: 20px;
+}
+
+.radio input[type="radio"],
+.checkbox input[type="checkbox"] {
+  float: left;
+  margin-left: -20px;
+}
+
+.controls > .radio:first-child,
+.controls > .checkbox:first-child {
+  padding-top: 5px;
+}
+
+.radio.inline,
+.checkbox.inline {
+  display: inline-block;
+  padding-top: 5px;
+  margin-bottom: 0;
+  vertical-align: middle;
+}
+
+.radio.inline + .radio.inline,
+.checkbox.inline + .checkbox.inline {
+  margin-left: 10px;
+}
+
+.input-mini {
+  width: 60px;
+}
+
+.input-small {
+  width: 90px;
+}
+
+.input-medium {
+  width: 150px;
+}
+
+.input-large {
+  width: 210px;
+}
+
+.input-xlarge {
+  width: 270px;
+}
+
+.input-xxlarge {
+  width: 530px;
+}
+
+input[class*="span"],
+select[class*="span"],
+textarea[class*="span"],
+.uneditable-input[class*="span"],
+.row-fluid input[class*="span"],
+.row-fluid select[class*="span"],
+.row-fluid textarea[class*="span"],
+.row-fluid .uneditable-input[class*="span"] {
+  float: none;
+  margin-left: 0;
+}
+
+.input-append input[class*="span"],
+.input-append .uneditable-input[class*="span"],
+.input-prepend input[class*="span"],
+.input-prepend .uneditable-input[class*="span"],
+.row-fluid input[class*="span"],
+.row-fluid select[class*="span"],
+.row-fluid textarea[class*="span"],
+.row-fluid .uneditable-input[class*="span"],
+.row-fluid .input-prepend [class*="span"],
+.row-fluid .input-append [class*="span"] {
+  display: inline-block;
+}
+
+input,
+textarea,
+.uneditable-input {
+  margin-left: 0;
+}
+
+.controls-row [class*="span"] + [class*="span"] {
+  margin-left: 20px;
+}
+
+input.span12,
+textarea.span12,
+.uneditable-input.span12 {
+  width: 926px;
+}
+
+input.span11,
+textarea.span11,
+.uneditable-input.span11 {
+  width: 846px;
+}
+
+input.span10,
+textarea.span10,
+.uneditable-input.span10 {
+  width: 766px;
+}
+
+input.span9,
+textarea.span9,
+.uneditable-input.span9 {
+  width: 686px;
+}
+
+input.span8,
+textarea.span8,
+.uneditable-input.span8 {
+  width: 606px;
+}
+
+input.span7,
+textarea.span7,
+.uneditable-input.span7 {
+  width: 526px;
+}
+
+input.span6,
+textarea.span6,
+.uneditable-input.span6 {
+  width: 446px;
+}
+
+input.span5,
+textarea.span5,
+.uneditable-input.span5 {
+  width: 366px;
+}
+
+input.span4,
+textarea.span4,
+.uneditable-input.span4 {
+  width: 286px;
+}
+
+input.span3,
+textarea.span3,
+.uneditable-input.span3 {
+  width: 206px;
+}
+
+input.span2,
+textarea.span2,
+.uneditable-input.span2 {
+  width: 126px;
+}
+
+input.span1,
+textarea.span1,
+.uneditable-input.span1 {
+  width: 46px;
+}
+
+.controls-row {
+  *zoom: 1;
+}
+
+.controls-row:before,
+.controls-row:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.controls-row:after {
+  clear: both;
+}
+
+.controls-row [class*="span"],
+.row-fluid .controls-row [class*="span"] {
+  float: left;
+}
+
+.controls-row .checkbox[class*="span"],
+.controls-row .radio[class*="span"] {
+  padding-top: 5px;
+}
+
+input[disabled],
+select[disabled],
+textarea[disabled],
+input[readonly],
+select[readonly],
+textarea[readonly] {
+  cursor: not-allowed;
+  background-color: #eeeeee;
+}
+
+input[type="radio"][disabled],
+input[type="checkbox"][disabled],
+input[type="radio"][readonly],
+input[type="checkbox"][readonly] {
+  background-color: transparent;
+}
+
+.control-group.warning .control-label,
+.control-group.warning .help-block,
+.control-group.warning .help-inline {
+  color: #c09853;
+}
+
+.control-group.warning .checkbox,
+.control-group.warning .radio,
+.control-group.warning input,
+.control-group.warning select,
+.control-group.warning textarea {
+  color: #c09853;
+}
+
+.control-group.warning input,
+.control-group.warning select,
+.control-group.warning textarea {
+  border-color: #c09853;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+
+.control-group.warning input:focus,
+.control-group.warning select:focus,
+.control-group.warning textarea:focus {
+  border-color: #a47e3c;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+}
+
+.control-group.warning .input-prepend .add-on,
+.control-group.warning .input-append .add-on {
+  color: #c09853;
+  background-color: #fcf8e3;
+  border-color: #c09853;
+}
+
+.control-group.error .control-label,
+.control-group.error .help-block,
+.control-group.error .help-inline {
+  color: #b94a48;
+}
+
+.control-group.error .checkbox,
+.control-group.error .radio,
+.control-group.error input,
+.control-group.error select,
+.control-group.error textarea {
+  color: #b94a48;
+}
+
+.control-group.error input,
+.control-group.error select,
+.control-group.error textarea {
+  border-color: #b94a48;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+
+.control-group.error input:focus,
+.control-group.error select:focus,
+.control-group.error textarea:focus {
+  border-color: #953b39;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+}
+
+.control-group.error .input-prepend .add-on,
+.control-group.error .input-append .add-on {
+  color: #b94a48;
+  background-color: #f2dede;
+  border-color: #b94a48;
+}
+
+.control-group.success .control-label,
+.control-group.success .help-block,
+.control-group.success .help-inline {
+  color: #468847;
+}
+
+.control-group.success .checkbox,
+.control-group.success .radio,
+.control-group.success input,
+.control-group.success select,
+.control-group.success textarea {
+  color: #468847;
+}
+
+.control-group.success input,
+.control-group.success select,
+.control-group.success textarea {
+  border-color: #468847;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+
+.control-group.success input:focus,
+.control-group.success select:focus,
+.control-group.success textarea:focus {
+  border-color: #356635;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+}
+
+.control-group.success .input-prepend .add-on,
+.control-group.success .input-append .add-on {
+  color: #468847;
+  background-color: #dff0d8;
+  border-color: #468847;
+}
+
+.control-group.info .control-label,
+.control-group.info .help-block,
+.control-group.info .help-inline {
+  color: #3a87ad;
+}
+
+.control-group.info .checkbox,
+.control-group.info .radio,
+.control-group.info input,
+.control-group.info select,
+.control-group.info textarea {
+  color: #3a87ad;
+}
+
+.control-group.info input,
+.control-group.info select,
+.control-group.info textarea {
+  border-color: #3a87ad;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+
+.control-group.info input:focus,
+.control-group.info select:focus,
+.control-group.info textarea:focus {
+  border-color: #2d6987;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
+}
+
+.control-group.info .input-prepend .add-on,
+.control-group.info .input-append .add-on {
+  color: #3a87ad;
+  background-color: #d9edf7;
+  border-color: #3a87ad;
+}
+
+input:focus:invalid,
+textarea:focus:invalid,
+select:focus:invalid {
+  color: #b94a48;
+  border-color: #ee5f5b;
+}
+
+input:focus:invalid:focus,
+textarea:focus:invalid:focus,
+select:focus:invalid:focus {
+  border-color: #e9322d;
+  -webkit-box-shadow: 0 0 6px #f8b9b7;
+  -moz-box-shadow: 0 0 6px #f8b9b7;
+  box-shadow: 0 0 6px #f8b9b7;
+}
+
+.form-actions {
+  padding: 19px 20px 20px;
+  margin-top: 20px;
+  margin-bottom: 20px;
+  background-color: #f5f5f5;
+  border-top: 1px solid #e5e5e5;
+  *zoom: 1;
+}
+
+.form-actions:before,
+.form-actions:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.form-actions:after {
+  clear: both;
+}
+
+.help-block,
+.help-inline {
+  color: #595959;
+}
+
+.help-block {
+  display: block;
+  margin-bottom: 10px;
+}
+
+.help-inline {
+  display: inline-block;
+  *display: inline;
+  padding-left: 5px;
+  vertical-align: middle;
+  *zoom: 1;
+}
+
+.input-append,
+.input-prepend {
+  display: inline-block;
+  margin-bottom: 10px;
+  font-size: 0;
+  white-space: nowrap;
+  vertical-align: middle;
+}
+
+.input-append input,
+.input-prepend input,
+.input-append select,
+.input-prepend select,
+.input-append .uneditable-input,
+.input-prepend .uneditable-input,
+.input-append .dropdown-menu,
+.input-prepend .dropdown-menu,
+.input-append .popover,
+.input-prepend .popover {
+  font-size: 14px;
+}
+
+.input-append input,
+.input-prepend input,
+.input-append select,
+.input-prepend select,
+.input-append .uneditable-input,
+.input-prepend .uneditable-input {
+  position: relative;
+  margin-bottom: 0;
+  *margin-left: 0;
+  vertical-align: top;
+  -webkit-border-radius: 0 4px 4px 0;
+  -moz-border-radius: 0 4px 4px 0;
+  border-radius: 0 4px 4px 0;
+}
+
+.input-append input:focus,
+.input-prepend input:focus,
+.input-append select:focus,
+.input-prepend select:focus,
+.input-append .uneditable-input:focus,
+.input-prepend .uneditable-input:focus {
+  z-index: 2;
+}
+
+.input-append .add-on,
+.input-prepend .add-on {
+  display: inline-block;
+  width: auto;
+  height: 20px;
+  min-width: 16px;
+  padding: 4px 5px;
+  font-size: 14px;
+  font-weight: normal;
+  line-height: 20px;
+  text-align: center;
+  text-shadow: 0 1px 0 #ffffff;
+  background-color: #eeeeee;
+  border: 1px solid #ccc;
+}
+
+.input-append .add-on,
+.input-prepend .add-on,
+.input-append .btn,
+.input-prepend .btn,
+.input-append .btn-group > .dropdown-toggle,
+.input-prepend .btn-group > .dropdown-toggle {
+  vertical-align: top;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+
+.input-append .active,
+.input-prepend .active {
+  background-color: #a9dba9;
+  border-color: #46a546;
+}
+
+.input-prepend .add-on,
+.input-prepend .btn {
+  margin-right: -1px;
+}
+
+.input-prepend .add-on:first-child,
+.input-prepend .btn:first-child {
+  -webkit-border-radius: 4px 0 0 4px;
+  -moz-border-radius: 4px 0 0 4px;
+  border-radius: 4px 0 0 4px;
+}
+
+.input-append input,
+.input-append select,
+.input-append .uneditable-input {
+  -webkit-border-radius: 4px 0 0 4px;
+  -moz-border-radius: 4px 0 0 4px;
+  border-radius: 4px 0 0 4px;
+}
+
+.input-append input + .btn-group .btn:last-child,
+.input-append select + .btn-group .btn:last-child,
+.input-append .uneditable-input + .btn-group .btn:last-child {
+  -webkit-border-radius: 0 4px 4px 0;
+  -moz-border-radius: 0 4px 4px 0;
+  border-radius: 0 4px 4px 0;
+}
+
+.input-append .add-on,
+.input-append .btn,
+.input-append .btn-group {
+  margin-left: -1px;
+}
+
+.input-append .add-on:last-child,
+.input-append .btn:last-child,
+.input-append .btn-group:last-child > .dropdown-toggle {
+  -webkit-border-radius: 0 4px 4px 0;
+  -moz-border-radius: 0 4px 4px 0;
+  border-radius: 0 4px 4px 0;
+}
+
+.input-prepend.input-append input,
+.input-prepend.input-append select,
+.input-prepend.input-append .uneditable-input {
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+
+.input-prepend.input-append input + .btn-group .btn,
+.input-prepend.input-append select + .btn-group .btn,
+.input-prepend.input-append .uneditable-input + .btn-group .btn {
+  -webkit-border-radius: 0 4px 4px 0;
+  -moz-border-radius: 0 4px 4px 0;
+  border-radius: 0 4px 4px 0;
+}
+
+.input-prepend.input-append .add-on:first-child,
+.input-prepend.input-append .btn:first-child {
+  margin-right: -1px;
+  -webkit-border-radius: 4px 0 0 4px;
+  -moz-border-radius: 4px 0 0 4px;
+  border-radius: 4px 0 0 4px;
+}
+
+.input-prepend.input-append .add-on:last-child,
+.input-prepend.input-append .btn:last-child {
+  margin-left: -1px;
+  -webkit-border-radius: 0 4px 4px 0;
+  -moz-border-radius: 0 4px 4px 0;
+  border-radius: 0 4px 4px 0;
+}
+
+.input-prepend.input-append .btn-group:first-child {
+  margin-left: 0;
+}
+
+input.search-query {
+  padding-right: 14px;
+  padding-right: 4px  \9;
+  padding-left: 14px;
+  padding-left: 4px  \9;
+  /* IE7-8 doesn't have border-radius, so don't indent the padding */
+
+  margin-bottom: 0;
+  -webkit-border-radius: 15px;
+  -moz-border-radius: 15px;
+  border-radius: 15px;
+}
+
+/* Allow for input prepend/append in search forms */
+
+.form-search .input-append .search-query,
+.form-search .input-prepend .search-query {
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+
+.form-search .input-append .search-query {
+  -webkit-border-radius: 14px 0 0 14px;
+  -moz-border-radius: 14px 0 0 14px;
+  border-radius: 14px 0 0 14px;
+}
+
+.form-search .input-append .btn {
+  -webkit-border-radius: 0 14px 14px 0;
+  -moz-border-radius: 0 14px 14px 0;
+  border-radius: 0 14px 14px 0;
+}
+
+.form-search .input-prepend .search-query {
+  -webkit-border-radius: 0 14px 14px 0;
+  -moz-border-radius: 0 14px 14px 0;
+  border-radius: 0 14px 14px 0;
+}
+
+.form-search .input-prepend .btn {
+  -webkit-border-radius: 14px 0 0 14px;
+  -moz-border-radius: 14px 0 0 14px;
+  border-radius: 14px 0 0 14px;
+}
+
+.form-search input,
+.form-inline input,
+.form-horizontal input,
+.form-search textarea,
+.form-inline textarea,
+.form-horizontal textarea,
+.form-search select,
+.form-inline select,
+.form-horizontal select,
+.form-search .help-inline,
+.form-inline .help-inline,
+.form-horizontal .help-inline,
+.form-search .uneditable-input,
+.form-inline .uneditable-input,
+.form-horizontal .uneditable-input,
+.form-search .input-prepend,
+.form-inline .input-prepend,
+.form-horizontal .input-prepend,
+.form-search .input-append,
+.form-inline .input-append,
+.form-horizontal .input-append {
+  display: inline-block;
+  *display: inline;
+  margin-bottom: 0;
+  vertical-align: middle;
+  *zoom: 1;
+}
+
+.form-search .hide,
+.form-inline .hide,
+.form-horizontal .hide {
+  display: none;
+}
+
+.form-search label,
+.form-inline label,
+.form-search .btn-group,
+.form-inline .btn-group {
+  display: inline-block;
+}
+
+.form-search .input-append,
+.form-inline .input-append,
+.form-search .input-prepend,
+.form-inline .input-prepend {
+  margin-bottom: 0;
+}
+
+.form-search .radio,
+.form-search .checkbox,
+.form-inline .radio,
+.form-inline .checkbox {
+  padding-left: 0;
+  margin-bottom: 0;
+  vertical-align: middle;
+}
+
+.form-search .radio input[type="radio"],
+.form-search .checkbox input[type="checkbox"],
+.form-inline .radio input[type="radio"],
+.form-inline .checkbox input[type="checkbox"] {
+  float: left;
+  margin-right: 3px;
+  margin-left: 0;
+}
+
+.control-group {
+  margin-bottom: 10px;
+}
+
+legend + .control-group {
+  margin-top: 20px;
+  -webkit-margin-top-collapse: separate;
+}
+
+.form-horizontal .control-group {
+  margin-bottom: 20px;
+  *zoom: 1;
+}
+
+.form-horizontal .control-group:before,
+.form-horizontal .control-group:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.form-horizontal .control-group:after {
+  clear: both;
+}
+
+.form-horizontal .control-label {
+  float: left;
+  width: 160px;
+  padding-top: 5px;
+  text-align: right;
+}
+
+.form-horizontal .controls {
+  *display: inline-block;
+  *padding-left: 20px;
+  margin-left: 180px;
+  *margin-left: 0;
+}
+
+.form-horizontal .controls:first-child {
+  *padding-left: 180px;
+}
+
+.form-horizontal .help-block {
+  margin-bottom: 0;
+}
+
+.form-horizontal input + .help-block,
+.form-horizontal select + .help-block,
+.form-horizontal textarea + .help-block,
+.form-horizontal .uneditable-input + .help-block,
+.form-horizontal .input-prepend + .help-block,
+.form-horizontal .input-append + .help-block {
+  margin-top: 10px;
+}
+
+.form-horizontal .form-actions {
+  padding-left: 180px;
+}
+
+table {
+  max-width: 100%;
+  background-color: transparent;
+  border-collapse: collapse;
+  border-spacing: 0;
+}
+
+.table {
+  width: 100%;
+  margin-bottom: 20px;
+}
+
+.table th,
+.table td {
+  padding: 8px;
+  line-height: 20px;
+  text-align: left;
+  vertical-align: top;
+  border-top: 1px solid #dddddd;
+}
+
+.table th {
+  font-weight: bold;
+}
+
+.table thead th {
+  vertical-align: bottom;
+}
+
+.table caption + thead tr:first-child th,
+.table caption + thead tr:first-child td,
+.table colgroup + thead tr:first-child th,
+.table colgroup + thead tr:first-child td,
+.table thead:first-child tr:first-child th,
+.table thead:first-child tr:first-child td {
+  border-top: 0;
+}
+
+.table tbody + tbody {
+  border-top: 2px solid #dddddd;
+}
+
+.table .table {
+  background-color: #ffffff;
+}
+
+.table-condensed th,
+.table-condensed td {
+  padding: 4px 5px;
+}
+
+.table-bordered {
+  border: 1px solid #dddddd;
+  border-collapse: separate;
+  *border-collapse: collapse;
+  border-left: 0;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+}
+
+.table-bordered th,
+.table-bordered td {
+  border-left: 1px solid #dddddd;
+}
+
+.table-bordered caption + thead tr:first-child th,
+.table-bordered caption + tbody tr:first-child th,
+.table-bordered caption + tbody tr:first-child td,
+.table-bordered colgroup + thead tr:first-child th,
+.table-bordered colgroup + tbody tr:first-child th,
+.table-bordered colgroup + tbody tr:first-child td,
+.table-bordered thead:first-child tr:first-child th,
+.table-bordered tbody:first-child tr:first-child th,
+.table-bordered tbody:first-child tr:first-child td {
+  border-top: 0;
+}
+
+.table-bordered thead:first-child tr:first-child > th:first-child,
+.table-bordered tbody:first-child tr:first-child > td:first-child,
+.table-bordered tbody:first-child tr:first-child > th:first-child {
+  -webkit-border-top-left-radius: 4px;
+  border-top-left-radius: 4px;
+  -moz-border-radius-topleft: 4px;
+}
+
+.table-bordered thead:first-child tr:first-child > th:last-child,
+.table-bordered tbody:first-child tr:first-child > td:last-child,
+.table-bordered tbody:first-child tr:first-child > th:last-child {
+  -webkit-border-top-right-radius: 4px;
+  border-top-right-radius: 4px;
+  -moz-border-radius-topright: 4px;
+}
+
+.table-bordered thead:last-child tr:last-child > th:first-child,
+.table-bordered tbody:last-child tr:last-child > td:first-child,
+.table-bordered tbody:last-child tr:last-child > th:first-child,
+.table-bordered tfoot:last-child tr:last-child > td:first-child,
+.table-bordered tfoot:last-child tr:last-child > th:first-child {
+  -webkit-border-bottom-left-radius: 4px;
+  border-bottom-left-radius: 4px;
+  -moz-border-radius-bottomleft: 4px;
+}
+
+.table-bordered thead:last-child tr:last-child > th:last-child,
+.table-bordered tbody:last-child tr:last-child > td:last-child,
+.table-bordered tbody:last-child tr:last-child > th:last-child,
+.table-bordered tfoot:last-child tr:last-child > td:last-child,
+.table-bordered tfoot:last-child tr:last-child > th:last-child {
+  -webkit-border-bottom-right-radius: 4px;
+  border-bottom-right-radius: 4px;
+  -moz-border-radius-bottomright: 4px;
+}
+
+.table-bordered tfoot + tbody:last-child tr:last-child td:first-child {
+  -webkit-border-bottom-left-radius: 0;
+  border-bottom-left-radius: 0;
+  -moz-border-radius-bottomleft: 0;
+}
+
+.table-bordered tfoot + tbody:last-child tr:last-child td:last-child {
+  -webkit-border-bottom-right-radius: 0;
+  border-bottom-right-radius: 0;
+  -moz-border-radius-bottomright: 0;
+}
+
+.table-bordered caption + thead tr:first-child th:first-child,
+.table-bordered caption + tbody tr:first-child td:first-child,
+.table-bordered colgroup + thead tr:first-child th:first-child,
+.table-bordered colgroup + tbody tr:first-child td:first-child {
+  -webkit-border-top-left-radius: 4px;
+  border-top-left-radius: 4px;
+  -moz-border-radius-topleft: 4px;
+}
+
+.table-bordered caption + thead tr:first-child th:last-child,
+.table-bordered caption + tbody tr:first-child td:last-child,
+.table-bordered colgroup + thead tr:first-child th:last-child,
+.table-bordered colgroup + tbody tr:first-child td:last-child {
+  -webkit-border-top-right-radius: 4px;
+  border-top-right-radius: 4px;
+  -moz-border-radius-topright: 4px;
+}
+
+.table-striped tbody > tr:nth-child(odd) > td,
+.table-striped tbody > tr:nth-child(odd) > th {
+  background-color: #f9f9f9;
+}
+
+.table-hover tbody tr:hover > td,
+.table-hover tbody tr:hover > th {
+  background-color: #f5f5f5;
+}
+
+table td[class*="span"],
+table th[class*="span"],
+.row-fluid table td[class*="span"],
+.row-fluid table th[class*="span"] {
+  display: table-cell;
+  float: none;
+  margin-left: 0;
+}
+
+.table td.span1,
+.table th.span1 {
+  float: none;
+  width: 44px;
+  margin-left: 0;
+}
+
+.table td.span2,
+.table th.span2 {
+  float: none;
+  width: 124px;
+  margin-left: 0;
+}
+
+.table td.span3,
+.table th.span3 {
+  float: none;
+  width: 204px;
+  margin-left: 0;
+}
+
+.table td.span4,
+.table th.span4 {
+  float: none;
+  width: 284px;
+  margin-left: 0;
+}
+
+.table td.span5,
+.table th.span5 {
+  float: none;
+  width: 364px;
+  margin-left: 0;
+}
+
+.table td.span6,
+.table th.span6 {
+  float: none;
+  width: 444px;
+  margin-left: 0;
+}
+
+.table td.span7,
+.table th.span7 {
+  float: none;
+  width: 524px;
+  margin-left: 0;
+}
+
+.table td.span8,
+.table th.span8 {
+  float: none;
+  width: 604px;
+  margin-left: 0;
+}
+
+.table td.span9,
+.table th.span9 {
+  float: none;
+  width: 684px;
+  margin-left: 0;
+}
+
+.table td.span10,
+.table th.span10 {
+  float: none;
+  width: 764px;
+  margin-left: 0;
+}
+
+.table td.span11,
+.table th.span11 {
+  float: none;
+  width: 844px;
+  margin-left: 0;
+}
+
+.table td.span12,
+.table th.span12 {
+  float: none;
+  width: 924px;
+  margin-left: 0;
+}
+
+.table tbody tr.success > td {
+  background-color: #dff0d8;
+}
+
+.table tbody tr.error > td {
+  background-color: #f2dede;
+}
+
+.table tbody tr.warning > td {
+  background-color: #fcf8e3;
+}
+
+.table tbody tr.info > td {
+  background-color: #d9edf7;
+}
+
+.table-hover tbody tr.success:hover > td {
+  background-color: #d0e9c6;
+}
+
+.table-hover tbody tr.error:hover > td {
+  background-color: #ebcccc;
+}
+
+.table-hover tbody tr.warning:hover > td {
+  background-color: #faf2cc;
+}
+
+.table-hover tbody tr.info:hover > td {
+  background-color: #c4e3f3;
+}
+
+[class^="icon-"],
+[class*=" icon-"] {
+  display: inline-block;
+  width: 14px;
+  height: 14px;
+  margin-top: 1px;
+  *margin-right: .3em;
+  line-height: 14px;
+  vertical-align: text-top;
+  background-image: url("../img/glyphicons-halflings.png");
+  background-position: 14px 14px;
+  background-repeat: no-repeat;
+}
+
+/* White icons with optional class, or on hover/focus/active states of certain elements */
+
+.icon-white,
+.nav-pills > .active > a > [class^="icon-"],
+.nav-pills > .active > a > [class*=" icon-"],
+.nav-list > .active > a > [class^="icon-"],
+.nav-list > .active > a > [class*=" icon-"],
+.navbar-inverse .nav > .active > a > [class^="icon-"],
+.navbar-inverse .nav > .active > a > [class*=" icon-"],
+.dropdown-menu > li > a:hover > [class^="icon-"],
+.dropdown-menu > li > a:focus > [class^="icon-"],
+.dropdown-menu > li > a:hover > [class*=" icon-"],
+.dropdown-menu > li > a:focus > [class*=" icon-"],
+.dropdown-menu > .active > a > [class^="icon-"],
+.dropdown-menu > .active > a > [class*=" icon-"],
+.dropdown-submenu:hover > a > [class^="icon-"],
+.dropdown-submenu:focus > a > [class^="icon-"],
+.dropdown-submenu:hover > a > [class*=" icon-"],
+.dropdown-submenu:focus > a > [class*=" icon-"] {
+  background-image: url("../img/glyphicons-halflings-white.png");
+}
+
+.icon-glass {
+  background-position: 0 0;
+}
+
+.icon-music {
+  background-position: -24px 0;
+}
+
+.icon-search {
+  background-position: -48px 0;
+}
+
+.icon-envelope {
+  background-position: -72px 0;
+}
+
+.icon-heart {
+  background-position: -96px 0;
+}
+
+.icon-star {
+  background-position: -120px 0;
+}
+
+.icon-star-empty {
+  background-position: -144px 0;
+}
+
+.icon-user {
+  background-position: -168px 0;
+}
+
+.icon-film {
+  background-position: -192px 0;
+}
+
+.icon-th-large {
+  background-position: -216px 0;
+}
+
+.icon-th {
+  background-position: -240px 0;
+}
+
+.icon-th-list {
+  background-position: -264px 0;
+}
+
+.icon-ok {
+  background-position: -288px 0;
+}
+
+.icon-remove {
+  background-position: -312px 0;
+}
+
+.icon-zoom-in {
+  background-position: -336px 0;
+}
+
+.icon-zoom-out {
+  background-position: -360px 0;
+}
+
+.icon-off {
+  background-position: -384px 0;
+}
+
+.icon-signal {
+  background-position: -408px 0;
+}
+
+.icon-cog {
+  background-position: -432px 0;
+}
+
+.icon-trash {
+  background-position: -456px 0;
+}
+
+.icon-home {
+  background-position: 0 -24px;
+}
+
+.icon-file {
+  background-position: -24px -24px;
+}
+
+.icon-time {
+  background-position: -48px -24px;
+}
+
+.icon-road {
+  background-position: -72px -24px;
+}
+
+.icon-download-alt {
+  background-position: -96px -24px;
+}
+
+.icon-download {
+  background-position: -120px -24px;
+}
+
+.icon-upload {
+  background-position: -144px -24px;
+}
+
+.icon-inbox {
+  background-position: -168px -24px;
+}
+
+.icon-play-circle {
+  background-position: -192px -24px;
+}
+
+.icon-repeat {
+  background-position: -216px -24px;
+}
+
+.icon-refresh {
+  background-position: -240px -24px;
+}
+
+.icon-list-alt {
+  background-position: -264px -24px;
+}
+
+.icon-lock {
+  background-position: -287px -24px;
+}
+
+.icon-flag {
+  background-position: -312px -24px;
+}
+
+.icon-headphones {
+  background-position: -336px -24px;
+}
+
+.icon-volume-off {
+  background-position: -360px -24px;
+}
+
+.icon-volume-down {
+  background-position: -384px -24px;
+}
+
+.icon-volume-up {
+  background-position: -408px -24px;
+}
+
+.icon-qrcode {
+  background-position: -432px -24px;
+}
+
+.icon-barcode {
+  background-position: -456px -24px;
+}
+
+.icon-tag {
+  background-position: 0 -48px;
+}
+
+.icon-tags {
+  background-position: -25px -48px;
+}
+
+.icon-book {
+  background-position: -48px -48px;
+}
+
+.icon-bookmark {
+  background-position: -72px -48px;
+}
+
+.icon-print {
+  background-position: -96px -48px;
+}
+
+.icon-camera {
+  background-position: -120px -48px;
+}
+
+.icon-font {
+  background-position: -144px -48px;
+}
+
+.icon-bold {
+  background-position: -167px -48px;
+}
+
+.icon-italic {
+  background-position: -192px -48px;
+}
+
+.icon-text-height {
+  background-position: -216px -48px;
+}
+
+.icon-text-width {
+  background-position: -240px -48px;
+}
+
+.icon-align-left {
+  background-position: -264px -48px;
+}
+
+.icon-align-center {
+  background-position: -288px -48px;
+}
+
+.icon-align-right {
+  background-position: -312px -48px;
+}
+
+.icon-align-justify {
+  background-position: -336px -48px;
+}
+
+.icon-list {
+  background-position: -360px -48px;
+}
+
+.icon-indent-left {
+  background-position: -384px -48px;
+}
+
+.icon-indent-right {
+  background-position: -408px -48px;
+}
+
+.icon-facetime-video {
+  background-position: -432px -48px;
+}
+
+.icon-picture {
+  background-position: -456px -48px;
+}
+
+.icon-pencil {
+  background-position: 0 -72px;
+}
+
+.icon-map-marker {
+  background-position: -24px -72px;
+}
+
+.icon-adjust {
+  background-position: -48px -72px;
+}
+
+.icon-tint {
+  background-position: -72px -72px;
+}
+
+.icon-edit {
+  background-position: -96px -72px;
+}
+
+.icon-share {
+  background-position: -120px -72px;
+}
+
+.icon-check {
+  background-position: -144px -72px;
+}
+
+.icon-move {
+  background-position: -168px -72px;
+}
+
+.icon-step-backward {
+  background-position: -192px -72px;
+}
+
+.icon-fast-backward {
+  background-position: -216px -72px;
+}
+
+.icon-backward {
+  background-position: -240px -72px;
+}
+
+.icon-play {
+  background-position: -264px -72px;
+}
+
+.icon-pause {
+  background-position: -288px -72px;
+}
+
+.icon-stop {
+  background-position: -312px -72px;
+}
+
+.icon-forward {
+  background-position: -336px -72px;
+}
+
+.icon-fast-forward {
+  background-position: -360px -72px;
+}
+
+.icon-step-forward {
+  background-position: -384px -72px;
+}
+
+.icon-eject {
+  background-position: -408px -72px;
+}
+
+.icon-chevron-left {
+  background-position: -432px -72px;
+}
+
+.icon-chevron-right {
+  background-position: -456px -72px;
+}
+
+.icon-plus-sign {
+  background-position: 0 -96px;
+}
+
+.icon-minus-sign {
+  background-position: -24px -96px;
+}
+
+.icon-remove-sign {
+  background-position: -48px -96px;
+}
+
+.icon-ok-sign {
+  background-position: -72px -96px;
+}
+
+.icon-question-sign {
+  background-position: -96px -96px;
+}
+
+.icon-info-sign {
+  background-position: -120px -96px;
+}
+
+.icon-screenshot {
+  background-position: -144px -96px;
+}
+
+.icon-remove-circle {
+  background-position: -168px -96px;
+}
+
+.icon-ok-circle {
+  background-position: -192px -96px;
+}
+
+.icon-ban-circle {
+  background-position: -216px -96px;
+}
+
+.icon-arrow-left {
+  background-position: -240px -96px;
+}
+
+.icon-arrow-right {
+  background-position: -264px -96px;
+}
+
+.icon-arrow-up {
+  background-position: -289px -96px;
+}
+
+.icon-arrow-down {
+  background-position: -312px -96px;
+}
+
+.icon-share-alt {
+  background-position: -336px -96px;
+}
+
+.icon-resize-full {
+  background-position: -360px -96px;
+}
+
+.icon-resize-small {
+  background-position: -384px -96px;
+}
+
+.icon-plus {
+  background-position: -408px -96px;
+}
+
+.icon-minus {
+  background-position: -433px -96px;
+}
+
+.icon-asterisk {
+  background-position: -456px -96px;
+}
+
+.icon-exclamation-sign {
+  background-position: 0 -120px;
+}
+
+.icon-gift {
+  background-position: -24px -120px;
+}
+
+.icon-leaf {
+  background-position: -48px -120px;
+}
+
+.icon-fire {
+  background-position: -72px -120px;
+}
+
+.icon-eye-open {
+  background-position: -96px -120px;
+}
+
+.icon-eye-close {
+  background-position: -120px -120px;
+}
+
+.icon-warning-sign {
+  background-position: -144px -120px;
+}
+
+.icon-plane {
+  background-position: -168px -120px;
+}
+
+.icon-calendar {
+  background-position: -192px -120px;
+}
+
+.icon-random {
+  width: 16px;
+  background-position: -216px -120px;
+}
+
+.icon-comment {
+  background-position: -240px -120px;
+}
+
+.icon-magnet {
+  background-position: -264px -120px;
+}
+
+.icon-chevron-up {
+  background-position: -288px -120px;
+}
+
+.icon-chevron-down {
+  background-position: -313px -119px;
+}
+
+.icon-retweet {
+  background-position: -336px -120px;
+}
+
+.icon-shopping-cart {
+  background-position: -360px -120px;
+}
+
+.icon-folder-close {
+  width: 16px;
+  background-position: -384px -120px;
+}
+
+.icon-folder-open {
+  width: 16px;
+  background-position: -408px -120px;
+}
+
+.icon-resize-vertical {
+  background-position: -432px -119px;
+}
+
+.icon-resize-horizontal {
+  background-position: -456px -118px;
+}
+
+.icon-hdd {
+  background-position: 0 -144px;
+}
+
+.icon-bullhorn {
+  background-position: -24px -144px;
+}
+
+.icon-bell {
+  background-position: -48px -144px;
+}
+
+.icon-certificate {
+  background-position: -72px -144px;
+}
+
+.icon-thumbs-up {
+  background-position: -96px -144px;
+}
+
+.icon-thumbs-down {
+  background-position: -120px -144px;
+}
+
+.icon-hand-right {
+  background-position: -144px -144px;
+}
+
+.icon-hand-left {
+  background-position: -168px -144px;
+}
+
+.icon-hand-up {
+  background-position: -192px -144px;
+}
+
+.icon-hand-down {
+  background-position: -216px -144px;
+}
+
+.icon-circle-arrow-right {
+  background-position: -240px -144px;
+}
+
+.icon-circle-arrow-left {
+  background-position: -264px -144px;
+}
+
+.icon-circle-arrow-up {
+  background-position: -288px -144px;
+}
+
+.icon-circle-arrow-down {
+  background-position: -312px -144px;
+}
+
+.icon-globe {
+  background-position: -336px -144px;
+}
+
+.icon-wrench {
+  background-position: -360px -144px;
+}
+
+.icon-tasks {
+  background-position: -384px -144px;
+}
+
+.icon-filter {
+  background-position: -408px -144px;
+}
+
+.icon-briefcase {
+  background-position: -432px -144px;
+}
+
+.icon-fullscreen {
+  background-position: -456px -144px;
+}
+
+.dropup,
+.dropdown {
+  position: relative;
+}
+
+.dropdown-toggle {
+  *margin-bottom: -3px;
+}
+
+.dropdown-toggle:active,
+.open .dropdown-toggle {
+  outline: 0;
+}
+
+.caret {
+  display: inline-block;
+  width: 0;
+  height: 0;
+  vertical-align: top;
+  border-top: 4px solid #000000;
+  border-right: 4px solid transparent;
+  border-left: 4px solid transparent;
+  content: "";
+}
+
+.dropdown .caret {
+  margin-top: 8px;
+  margin-left: 2px;
+}
+
+.dropdown-menu {
+  position: absolute;
+  top: 100%;
+  left: 0;
+  z-index: 1000;
+  display: none;
+  float: left;
+  min-width: 160px;
+  padding: 5px 0;
+  margin: 2px 0 0;
+  list-style: none;
+  background-color: #ffffff;
+  border: 1px solid #ccc;
+  border: 1px solid rgba(0, 0, 0, 0.2);
+  *border-right-width: 2px;
+  *border-bottom-width: 2px;
+  -webkit-border-radius: 6px;
+  -moz-border-radius: 6px;
+  border-radius: 6px;
+  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+  -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+  -webkit-background-clip: padding-box;
+  -moz-background-clip: padding;
+  background-clip: padding-box;
+}
+
+.dropdown-menu.pull-right {
+  right: 0;
+  left: auto;
+}
+
+.dropdown-menu .divider {
+  *width: 100%;
+  height: 1px;
+  margin: 9px 1px;
+  *margin: -5px 0 5px;
+  overflow: hidden;
+  background-color: #e5e5e5;
+  border-bottom: 1px solid #ffffff;
+}
+
+.dropdown-menu > li > a {
+  display: block;
+  padding: 3px 20px;
+  clear: both;
+  font-weight: normal;
+  line-height: 20px;
+  color: #333333;
+  white-space: nowrap;
+}
+
+.dropdown-menu > li > a:hover,
+.dropdown-menu > li > a:focus,
+.dropdown-submenu:hover > a,
+.dropdown-submenu:focus > a {
+  color: #ffffff;
+  text-decoration: none;
+  background-color: #0081c2;
+  background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));
+  background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);
+  background-image: -o-linear-gradient(top, #0088cc, #0077b3);
+  background-image: linear-gradient(to bottom, #0088cc, #0077b3);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
+}
+
+.dropdown-menu > .active > a,
+.dropdown-menu > .active > a:hover,
+.dropdown-menu > .active > a:focus {
+  color: #ffffff;
+  text-decoration: none;
+  background-color: #0081c2;
+  background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));
+  background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);
+  background-image: -o-linear-gradient(top, #0088cc, #0077b3);
+  background-image: linear-gradient(to bottom, #0088cc, #0077b3);
+  background-repeat: repeat-x;
+  outline: 0;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
+}
+
+.dropdown-menu > .disabled > a,
+.dropdown-menu > .disabled > a:hover,
+.dropdown-menu > .disabled > a:focus {
+  color: #999999;
+}
+
+.dropdown-menu > .disabled > a:hover,
+.dropdown-menu > .disabled > a:focus {
+  text-decoration: none;
+  cursor: default;
+  background-color: transparent;
+  background-image: none;
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.open {
+  *z-index: 1000;
+}
+
+.open > .dropdown-menu {
+  display: block;
+}
+
+.pull-right > .dropdown-menu {
+  right: 0;
+  left: auto;
+}
+
+.dropup .caret,
+.navbar-fixed-bottom .dropdown .caret {
+  border-top: 0;
+  border-bottom: 4px solid #000000;
+  content: "";
+}
+
+.dropup .dropdown-menu,
+.navbar-fixed-bottom .dropdown .dropdown-menu {
+  top: auto;
+  bottom: 100%;
+  margin-bottom: 1px;
+}
+
+.dropdown-submenu {
+  position: relative;
+}
+
+.dropdown-submenu > .dropdown-menu {
+  top: 0;
+  left: 100%;
+  margin-top: -6px;
+  margin-left: -1px;
+  -webkit-border-radius: 0 6px 6px 6px;
+  -moz-border-radius: 0 6px 6px 6px;
+  border-radius: 0 6px 6px 6px;
+}
+
+.dropdown-submenu:hover > .dropdown-menu {
+  display: block;
+}
+
+.dropup .dropdown-submenu > .dropdown-menu {
+  top: auto;
+  bottom: 0;
+  margin-top: 0;
+  margin-bottom: -2px;
+  -webkit-border-radius: 5px 5px 5px 0;
+  -moz-border-radius: 5px 5px 5px 0;
+  border-radius: 5px 5px 5px 0;
+}
+
+.dropdown-submenu > a:after {
+  display: block;
+  float: right;
+  width: 0;
+  height: 0;
+  margin-top: 5px;
+  margin-right: -10px;
+  border-color: transparent;
+  border-left-color: #cccccc;
+  border-style: solid;
+  border-width: 5px 0 5px 5px;
+  content: " ";
+}
+
+.dropdown-submenu:hover > a:after {
+  border-left-color: #ffffff;
+}
+
+.dropdown-submenu.pull-left {
+  float: none;
+}
+
+.dropdown-submenu.pull-left > .dropdown-menu {
+  left: -100%;
+  margin-left: 10px;
+  -webkit-border-radius: 6px 0 6px 6px;
+  -moz-border-radius: 6px 0 6px 6px;
+  border-radius: 6px 0 6px 6px;
+}
+
+.dropdown .dropdown-menu .nav-header {
+  padding-right: 20px;
+  padding-left: 20px;
+}
+
+.typeahead {
+  z-index: 1051;
+  margin-top: 2px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+}
+
+.well {
+  min-height: 20px;
+  padding: 19px;
+  margin-bottom: 20px;
+  background-color: #f5f5f5;
+  border: 1px solid #e3e3e3;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+}
+
+.well blockquote {
+  border-color: #ddd;
+  border-color: rgba(0, 0, 0, 0.15);
+}
+
+.well-large {
+  padding: 24px;
+  -webkit-border-radius: 6px;
+  -moz-border-radius: 6px;
+  border-radius: 6px;
+}
+
+.well-small {
+  padding: 9px;
+  -webkit-border-radius: 3px;
+  -moz-border-radius: 3px;
+  border-radius: 3px;
+}
+
+.fade {
+  opacity: 0;
+  -webkit-transition: opacity 0.15s linear;
+  -moz-transition: opacity 0.15s linear;
+  -o-transition: opacity 0.15s linear;
+  transition: opacity 0.15s linear;
+}
+
+.fade.in {
+  opacity: 1;
+}
+
+.collapse {
+  position: relative;
+  height: 0;
+  overflow: hidden;
+  -webkit-transition: height 0.35s ease;
+  -moz-transition: height 0.35s ease;
+  -o-transition: height 0.35s ease;
+  transition: height 0.35s ease;
+}
+
+.collapse.in {
+  height: auto;
+}
+
+.close {
+  float: right;
+  font-size: 20px;
+  font-weight: bold;
+  line-height: 20px;
+  color: #000000;
+  text-shadow: 0 1px 0 #ffffff;
+  opacity: 0.2;
+  filter: alpha(opacity=20);
+}
+
+.close:hover,
+.close:focus {
+  color: #000000;
+  text-decoration: none;
+  cursor: pointer;
+  opacity: 0.4;
+  filter: alpha(opacity=40);
+}
+
+button.close {
+  padding: 0;
+  cursor: pointer;
+  background: transparent;
+  border: 0;
+  -webkit-appearance: none;
+}
+
+.btn {
+  display: inline-block;
+  *display: inline;
+  padding: 4px 12px;
+  margin-bottom: 0;
+  *margin-left: .3em;
+  font-size: 14px;
+  line-height: 20px;
+  color: #333333;
+  text-align: center;
+  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+  vertical-align: middle;
+  cursor: pointer;
+  background-color: #f5f5f5;
+  *background-color: #e6e6e6;
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
+  background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
+  background-repeat: repeat-x;
+  border: 1px solid #cccccc;
+  *border: 0;
+  border-color: #e6e6e6 #e6e6e6 #bfbfbf;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  border-bottom-color: #b3b3b3;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+  *zoom: 1;
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+
+.btn:hover,
+.btn:focus,
+.btn:active,
+.btn.active,
+.btn.disabled,
+.btn[disabled] {
+  color: #333333;
+  background-color: #e6e6e6;
+  *background-color: #d9d9d9;
+}
+
+.btn:active,
+.btn.active {
+  background-color: #cccccc  \9;
+}
+
+.btn:first-child {
+  *margin-left: 0;
+}
+
+.btn:hover,
+.btn:focus {
+  color: #333333;
+  text-decoration: none;
+  background-position: 0 -15px;
+  -webkit-transition: background-position 0.1s linear;
+  -moz-transition: background-position 0.1s linear;
+  -o-transition: background-position 0.1s linear;
+  transition: background-position 0.1s linear;
+}
+
+.btn:focus {
+  outline: thin dotted #333;
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
+}
+
+.btn.active,
+.btn:active {
+  background-image: none;
+  outline: 0;
+  -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+
+.btn.disabled,
+.btn[disabled] {
+  cursor: default;
+  background-image: none;
+  opacity: 0.65;
+  filter: alpha(opacity=65);
+  -webkit-box-shadow: none;
+  -moz-box-shadow: none;
+  box-shadow: none;
+}
+
+.btn-large {
+  padding: 11px 19px;
+  font-size: 17.5px;
+  -webkit-border-radius: 6px;
+  -moz-border-radius: 6px;
+  border-radius: 6px;
+}
+
+.btn-large [class^="icon-"],
+.btn-large [class*=" icon-"] {
+  margin-top: 4px;
+}
+
+.btn-small {
+  padding: 2px 10px;
+  font-size: 11.9px;
+  -webkit-border-radius: 3px;
+  -moz-border-radius: 3px;
+  border-radius: 3px;
+}
+
+.btn-small [class^="icon-"],
+.btn-small [class*=" icon-"] {
+  margin-top: 0;
+}
+
+.btn-mini [class^="icon-"],
+.btn-mini [class*=" icon-"] {
+  margin-top: -1px;
+}
+
+.btn-mini {
+  padding: 0 6px;
+  font-size: 10.5px;
+  -webkit-border-radius: 3px;
+  -moz-border-radius: 3px;
+  border-radius: 3px;
+}
+
+.btn-block {
+  display: block;
+  width: 100%;
+  padding-right: 0;
+  padding-left: 0;
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+}
+
+.btn-block + .btn-block {
+  margin-top: 5px;
+}
+
+input[type="submit"].btn-block,
+input[type="reset"].btn-block,
+input[type="button"].btn-block {
+  width: 100%;
+}
+
+.btn-primary.active,
+.btn-warning.active,
+.btn-danger.active,
+.btn-success.active,
+.btn-info.active,
+.btn-inverse.active {
+  color: rgba(255, 255, 255, 0.75);
+}
+
+.btn-primary {
+  color: #ffffff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #006dcc;
+  *background-color: #0044cc;
+  background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
+  background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
+  background-image: -o-linear-gradient(top, #0088cc, #0044cc);
+  background-image: linear-gradient(to bottom, #0088cc, #0044cc);
+  background-repeat: repeat-x;
+  border-color: #0044cc #0044cc #002a80;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-primary:hover,
+.btn-primary:focus,
+.btn-primary:active,
+.btn-primary.active,
+.btn-primary.disabled,
+.btn-primary[disabled] {
+  color: #ffffff;
+  background-color: #0044cc;
+  *background-color: #003bb3;
+}
+
+.btn-primary:active,
+.btn-primary.active {
+  background-color: #003399  \9;
+}
+
+.btn-warning {
+  color: #ffffff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #faa732;
+  *background-color: #f89406;
+  background-image: -moz-linear-gradient(top, #fbb450, #f89406);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
+  background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
+  background-image: -o-linear-gradient(top, #fbb450, #f89406);
+  background-image: linear-gradient(to bottom, #fbb450, #f89406);
+  background-repeat: repeat-x;
+  border-color: #f89406 #f89406 #ad6704;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-warning:hover,
+.btn-warning:focus,
+.btn-warning:active,
+.btn-warning.active,
+.btn-warning.disabled,
+.btn-warning[disabled] {
+  color: #ffffff;
+  background-color: #f89406;
+  *background-color: #df8505;
+}
+
+.btn-warning:active,
+.btn-warning.active {
+  background-color: #c67605  \9;
+}
+
+.btn-danger {
+  color: #ffffff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #da4f49;
+  *background-color: #bd362f;
+  background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));
+  background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);
+  background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);
+  background-image: linear-gradient(to bottom, #ee5f5b, #bd362f);
+  background-repeat: repeat-x;
+  border-color: #bd362f #bd362f #802420;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-danger:hover,
+.btn-danger:focus,
+.btn-danger:active,
+.btn-danger.active,
+.btn-danger.disabled,
+.btn-danger[disabled] {
+  color: #ffffff;
+  background-color: #bd362f;
+  *background-color: #a9302a;
+}
+
+.btn-danger:active,
+.btn-danger.active {
+  background-color: #942a25  \9;
+}
+
+.btn-success {
+  color: #ffffff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #5bb75b;
+  *background-color: #51a351;
+  background-image: -moz-linear-gradient(top, #62c462, #51a351);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));
+  background-image: -webkit-linear-gradient(top, #62c462, #51a351);
+  background-image: -o-linear-gradient(top, #62c462, #51a351);
+  background-image: linear-gradient(to bottom, #62c462, #51a351);
+  background-repeat: repeat-x;
+  border-color: #51a351 #51a351 #387038;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-success:hover,
+.btn-success:focus,
+.btn-success:active,
+.btn-success.active,
+.btn-success.disabled,
+.btn-success[disabled] {
+  color: #ffffff;
+  background-color: #51a351;
+  *background-color: #499249;
+}
+
+.btn-success:active,
+.btn-success.active {
+  background-color: #408140  \9;
+}
+
+.btn-info {
+  color: #ffffff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #49afcd;
+  *background-color: #2f96b4;
+  background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));
+  background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4);
+  background-image: -o-linear-gradient(top, #5bc0de, #2f96b4);
+  background-image: linear-gradient(to bottom, #5bc0de, #2f96b4);
+  background-repeat: repeat-x;
+  border-color: #2f96b4 #2f96b4 #1f6377;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-info:hover,
+.btn-info:focus,
+.btn-info:active,
+.btn-info.active,
+.btn-info.disabled,
+.btn-info[disabled] {
+  color: #ffffff;
+  background-color: #2f96b4;
+  *background-color: #2a85a0;
+}
+
+.btn-info:active,
+.btn-info.active {
+  background-color: #24748c  \9;
+}
+
+.btn-inverse {
+  color: #ffffff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #363636;
+  *background-color: #222222;
+  background-image: -moz-linear-gradient(top, #444444, #222222);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222));
+  background-image: -webkit-linear-gradient(top, #444444, #222222);
+  background-image: -o-linear-gradient(top, #444444, #222222);
+  background-image: linear-gradient(to bottom, #444444, #222222);
+  background-repeat: repeat-x;
+  border-color: #222222 #222222 #000000;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-inverse:hover,
+.btn-inverse:focus,
+.btn-inverse:active,
+.btn-inverse.active,
+.btn-inverse.disabled,
+.btn-inverse[disabled] {
+  color: #ffffff;
+  background-color: #222222;
+  *background-color: #151515;
+}
+
+.btn-inverse:active,
+.btn-inverse.active {
+  background-color: #080808  \9;
+}
+
+button.btn,
+input[type="submit"].btn {
+  *padding-top: 3px;
+  *padding-bottom: 3px;
+}
+
+button.btn::-moz-focus-inner,
+input[type="submit"].btn::-moz-focus-inner {
+  padding: 0;
+  border: 0;
+}
+
+button.btn.btn-large,
+input[type="submit"].btn.btn-large {
+  *padding-top: 7px;
+  *padding-bottom: 7px;
+}
+
+button.btn.btn-small,
+input[type="submit"].btn.btn-small {
+  *padding-top: 3px;
+  *padding-bottom: 3px;
+}
+
+button.btn.btn-mini,
+input[type="submit"].btn.btn-mini {
+  *padding-top: 1px;
+  *padding-bottom: 1px;
+}
+
+.btn-link,
+.btn-link:active,
+.btn-link[disabled] {
+  background-color: transparent;
+  background-image: none;
+  -webkit-box-shadow: none;
+  -moz-box-shadow: none;
+  box-shadow: none;
+}
+
+.btn-link {
+  color: #0088cc;
+  cursor: pointer;
+  border-color: transparent;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+
+.btn-link:hover,
+.btn-link:focus {
+  color: #005580;
+  text-decoration: underline;
+  background-color: transparent;
+}
+
+.btn-link[disabled]:hover,
+.btn-link[disabled]:focus {
+  color: #333333;
+  text-decoration: none;
+}
+
+.btn-group {
+  position: relative;
+  display: inline-block;
+  *display: inline;
+  *margin-left: .3em;
+  font-size: 0;
+  white-space: nowrap;
+  vertical-align: middle;
+  *zoom: 1;
+}
+
+.btn-group:first-child {
+  *margin-left: 0;
+}
+
+.btn-group + .btn-group {
+  margin-left: 5px;
+}
+
+.btn-toolbar {
+  margin-top: 10px;
+  margin-bottom: 10px;
+  font-size: 0;
+}
+
+.btn-toolbar > .btn + .btn,
+.btn-toolbar > .btn-group + .btn,
+.btn-toolbar > .btn + .btn-group {
+  margin-left: 5px;
+}
+
+.btn-group > .btn {
+  position: relative;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+
+.btn-group > .btn + .btn {
+  margin-left: -1px;
+}
+
+.btn-group > .btn,
+.btn-group > .dropdown-menu,
+.btn-group > .popover {
+  font-size: 14px;
+}
+
+.btn-group > .btn-mini {
+  font-size: 10.5px;
+}
+
+.btn-group > .btn-small {
+  font-size: 11.9px;
+}
+
+.btn-group > .btn-large {
+  font-size: 17.5px;
+}
+
+.btn-group > .btn:first-child {
+  margin-left: 0;
+  -webkit-border-bottom-left-radius: 4px;
+  border-bottom-left-radius: 4px;
+  -webkit-border-top-left-radius: 4px;
+  border-top-left-radius: 4px;
+  -moz-border-radius-bottomleft: 4px;
+  -moz-border-radius-topleft: 4px;
+}
+
+.btn-group > .btn:last-child,
+.btn-group > .dropdown-toggle {
+  -webkit-border-top-right-radius: 4px;
+  border-top-right-radius: 4px;
+  -webkit-border-bottom-right-radius: 4px;
+  border-bottom-right-radius: 4px;
+  -moz-border-radius-topright: 4px;
+  -moz-border-radius-bottomright: 4px;
+}
+
+.btn-group > .btn.large:first-child {
+  margin-left: 0;
+  -webkit-border-bottom-left-radius: 6px;
+  border-bottom-left-radius: 6px;
+  -webkit-border-top-left-radius: 6px;
+  border-top-left-radius: 6px;
+  -moz-border-radius-bottomleft: 6px;
+  -moz-border-radius-topleft: 6px;
+}
+
+.btn-group > .btn.large:last-child,
+.btn-group > .large.dropdown-toggle {
+  -webkit-border-top-right-radius: 6px;
+  border-top-right-radius: 6px;
+  -webkit-border-bottom-right-radius: 6px;
+  border-bottom-right-radius: 6px;
+  -moz-border-radius-topright: 6px;
+  -moz-border-radius-bottomright: 6px;
+}
+
+.btn-group > .btn:hover,
+.btn-group > .btn:focus,
+.btn-group > .btn:active,
+.btn-group > .btn.active {
+  z-index: 2;
+}
+
+.btn-group .dropdown-toggle:active,
+.btn-group.open .dropdown-toggle {
+  outline: 0;
+}
+
+.btn-group > .btn + .dropdown-toggle {
+  *padding-top: 5px;
+  padding-right: 8px;
+  *padding-bottom: 5px;
+  padding-left: 8px;
+  -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+
+.btn-group > .btn-mini + .dropdown-toggle {
+  *padding-top: 2px;
+  padding-right: 5px;
+  *padding-bottom: 2px;
+  padding-left: 5px;
+}
+
+.btn-group > .btn-small + .dropdown-toggle {
+  *padding-top: 5px;
+  *padding-bottom: 4px;
+}
+
+.btn-group > .btn-large + .dropdown-toggle {
+  *padding-top: 7px;
+  padding-right: 12px;
+  *padding-bottom: 7px;
+  padding-left: 12px;
+}
+
+.btn-group.open .dropdown-toggle {
+  background-image: none;
+  -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+
+.btn-group.open .btn.dropdown-toggle {
+  background-color: #e6e6e6;
+}
+
+.btn-group.open .btn-primary.dropdown-toggle {
+  background-color: #0044cc;
+}
+
+.btn-group.open .btn-warning.dropdown-toggle {
+  background-color: #f89406;
+}
+
+.btn-group.open .btn-danger.dropdown-toggle {
+  background-color: #bd362f;
+}
+
+.btn-group.open .btn-success.dropdown-toggle {
+  background-color: #51a351;
+}
+
+.btn-group.open .btn-info.dropdown-toggle {
+  background-color: #2f96b4;
+}
+
+.btn-group.open .btn-inverse.dropdown-toggle {
+  background-color: #222222;
+}
+
+.btn .caret {
+  margin-top: 8px;
+  margin-left: 0;
+}
+
+.btn-large .caret {
+  margin-top: 6px;
+}
+
+.btn-large .caret {
+  border-top-width: 5px;
+  border-right-width: 5px;
+  border-left-width: 5px;
+}
+
+.btn-mini .caret,
+.btn-small .caret {
+  margin-top: 8px;
+}
+
+.dropup .btn-large .caret {
+  border-bottom-width: 5px;
+}
+
+.btn-primary .caret,
+.btn-warning .caret,
+.btn-danger .caret,
+.btn-info .caret,
+.btn-success .caret,
+.btn-inverse .caret {
+  border-top-color: #ffffff;
+  border-bottom-color: #ffffff;
+}
+
+.btn-group-vertical {
+  display: inline-block;
+  *display: inline;
+  /* IE7 inline-block hack */
+
+  *zoom: 1;
+}
+
+.btn-group-vertical > .btn {
+  display: block;
+  float: none;
+  max-width: 100%;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+
+.btn-group-vertical > .btn + .btn {
+  margin-top: -1px;
+  margin-left: 0;
+}
+
+.btn-group-vertical > .btn:first-child {
+  -webkit-border-radius: 4px 4px 0 0;
+  -moz-border-radius: 4px 4px 0 0;
+  border-radius: 4px 4px 0 0;
+}
+
+.btn-group-vertical > .btn:last-child {
+  -webkit-border-radius: 0 0 4px 4px;
+  -moz-border-radius: 0 0 4px 4px;
+  border-radius: 0 0 4px 4px;
+}
+
+.btn-group-vertical > .btn-large:first-child {
+  -webkit-border-radius: 6px 6px 0 0;
+  -moz-border-radius: 6px 6px 0 0;
+  border-radius: 6px 6px 0 0;
+}
+
+.btn-group-vertical > .btn-large:last-child {
+  -webkit-border-radius: 0 0 6px 6px;
+  -moz-border-radius: 0 0 6px 6px;
+  border-radius: 0 0 6px 6px;
+}
+
+.alert {
+  padding: 8px 35px 8px 14px;
+  margin-bottom: 20px;
+  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+  background-color: #fcf8e3;
+  border: 1px solid #fbeed5;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+}
+
+.alert,
+.alert h4 {
+  color: #c09853;
+}
+
+.alert h4 {
+  margin: 0;
+}
+
+.alert .close {
+  position: relative;
+  top: -2px;
+  right: -21px;
+  line-height: 20px;
+}
+
+.alert-success {
+  color: #468847;
+  background-color: #dff0d8;
+  border-color: #d6e9c6;
+}
+
+.alert-success h4 {
+  color: #468847;
+}
+
+.alert-danger,
+.alert-error {
+  color: #b94a48;
+  background-color: #f2dede;
+  border-color: #eed3d7;
+}
+
+.alert-danger h4,
+.alert-error h4 {
+  color: #b94a48;
+}
+
+.alert-info {
+  color: #3a87ad;
+  background-color: #d9edf7;
+  border-color: #bce8f1;
+}
+
+.alert-info h4 {
+  color: #3a87ad;
+}
+
+.alert-block {
+  padding-top: 14px;
+  padding-bottom: 14px;
+}
+
+.alert-block > p,
+.alert-block > ul {
+  margin-bottom: 0;
+}
+
+.alert-block p + p {
+  margin-top: 5px;
+}
+
+.nav {
+  margin-bottom: 20px;
+  margin-left: 0;
+  list-style: none;
+}
+
+.nav > li > a {
+  display: block;
+}
+
+.nav > li > a:hover,
+.nav > li > a:focus {
+  text-decoration: none;
+  background-color: #eeeeee;
+}
+
+.nav > li > a > img {
+  max-width: none;
+}
+
+.nav > .pull-right {
+  float: right;
+}
+
+.nav-header {
+  display: block;
+  padding: 3px 15px;
+  font-size: 11px;
+  font-weight: bold;
+  line-height: 20px;
+  color: #999999;
+  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+  text-transform: uppercase;
+}
+
+.nav li + .nav-header {
+  margin-top: 9px;
+}
+
+.nav-list {
+  padding-right: 15px;
+  padding-left: 15px;
+  margin-bottom: 0;
+}
+
+.nav-list > li > a,
+.nav-list .nav-header {
+  margin-right: -15px;
+  margin-left: -15px;
+  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+}
+
+.nav-list > li > a {
+  padding: 3px 15px;
+}
+
+.nav-list > .active > a,
+.nav-list > .active > a:hover,
+.nav-list > .active > a:focus {
+  color: #ffffff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
+  background-color: #0088cc;
+}
+
+.nav-list [class^="icon-"],
+.nav-list [class*=" icon-"] {
+  margin-right: 2px;
+}
+
+.nav-list .divider {
+  *width: 100%;
+  height: 1px;
+  margin: 9px 1px;
+  *margin: -5px 0 5px;
+  overflow: hidden;
+  background-color: #e5e5e5;
+  border-bottom: 1px solid #ffffff;
+}
+
+.nav-tabs,
+.nav-pills {
+  *zoom: 1;
+}
+
+.nav-tabs:before,
+.nav-pills:before,
+.nav-tabs:after,
+.nav-pills:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.nav-tabs:after,
+.nav-pills:after {
+  clear: both;
+}
+
+.nav-tabs > li,
+.nav-pills > li {
+  float: left;
+}
+
+.nav-tabs > li > a,
+.nav-pills > li > a {
+  padding-right: 12px;
+  padding-left: 12px;
+  margin-right: 2px;
+  line-height: 14px;
+}
+
+.nav-tabs {
+  border-bottom: 1px solid #ddd;
+}
+
+.nav-tabs > li {
+  margin-bottom: -1px;
+}
+
+.nav-tabs > li > a {
+  padding-top: 8px;
+  padding-bottom: 8px;
+  line-height: 20px;
+  border: 1px solid transparent;
+  -webkit-border-radius: 4px 4px 0 0;
+  -moz-border-radius: 4px 4px 0 0;
+  border-radius: 4px 4px 0 0;
+}
+
+.nav-tabs > li > a:hover,
+.nav-tabs > li > a:focus {
+  border-color: #eeeeee #eeeeee #dddddd;
+}
+
+.nav-tabs > .active > a,
+.nav-tabs > .active > a:hover,
+.nav-tabs > .active > a:focus {
+  color: #555555;
+  cursor: default;
+  background-color: #ffffff;
+  border: 1px solid #ddd;
+  border-bottom-color: transparent;
+}
+
+.nav-pills > li > a {
+  padding-top: 8px;
+  padding-bottom: 8px;
+  margin-top: 2px;
+  margin-bottom: 2px;
+  -webkit-border-radius: 5px;
+  -moz-border-radius: 5px;
+  border-radius: 5px;
+}
+
+.nav-pills > .active > a,
+.nav-pills > .active > a:hover,
+.nav-pills > .active > a:focus {
+  color: #ffffff;
+  background-color: #0088cc;
+}
+
+.nav-stacked > li {
+  float: none;
+}
+
+.nav-stacked > li > a {
+  margin-right: 0;
+}
+
+.nav-tabs.nav-stacked {
+  border-bottom: 0;
+}
+
+.nav-tabs.nav-stacked > li > a {
+  border: 1px solid #ddd;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+
+.nav-tabs.nav-stacked > li:first-child > a {
+  -webkit-border-top-right-radius: 4px;
+  border-top-right-radius: 4px;
+  -webkit-border-top-left-radius: 4px;
+  border-top-left-radius: 4px;
+  -moz-border-radius-topright: 4px;
+  -moz-border-radius-topleft: 4px;
+}
+
+.nav-tabs.nav-stacked > li:last-child > a {
+  -webkit-border-bottom-right-radius: 4px;
+  border-bottom-right-radius: 4px;
+  -webkit-border-bottom-left-radius: 4px;
+  border-bottom-left-radius: 4px;
+  -moz-border-radius-bottomright: 4px;
+  -moz-border-radius-bottomleft: 4px;
+}
+
+.nav-tabs.nav-stacked > li > a:hover,
+.nav-tabs.nav-stacked > li > a:focus {
+  z-index: 2;
+  border-color: #ddd;
+}
+
+.nav-pills.nav-stacked > li > a {
+  margin-bottom: 3px;
+}
+
+.nav-pills.nav-stacked > li:last-child > a {
+  margin-bottom: 1px;
+}
+
+.nav-tabs .dropdown-menu {
+  -webkit-border-radius: 0 0 6px 6px;
+  -moz-border-radius: 0 0 6px 6px;
+  border-radius: 0 0 6px 6px;
+}
+
+.nav-pills .dropdown-menu {
+  -webkit-border-radius: 6px;
+  -moz-border-radius: 6px;
+  border-radius: 6px;
+}
+
+.nav .dropdown-toggle .caret {
+  margin-top: 6px;
+  border-top-color: #0088cc;
+  border-bottom-color: #0088cc;
+}
+
+.nav .dropdown-toggle:hover .caret,
+.nav .dropdown-toggle:focus .caret {
+  border-top-color: #005580;
+  border-bottom-color: #005580;
+}
+
+/* move down carets for tabs */
+
+.nav-tabs .dropdown-toggle .caret {
+  margin-top: 8px;
+}
+
+.nav .active .dropdown-toggle .caret {
+  border-top-color: #fff;
+  border-bottom-color: #fff;
+}
+
+.nav-tabs .active .dropdown-toggle .caret {
+  border-top-color: #555555;
+  border-bottom-color: #555555;
+}
+
+.nav > .dropdown.active > a:hover,
+.nav > .dropdown.active > a:focus {
+  cursor: pointer;
+}
+
+.nav-tabs .open .dropdown-toggle,
+.nav-pills .open .dropdown-toggle,
+.nav > li.dropdown.open.active > a:hover,
+.nav > li.dropdown.open.active > a:focus {
+  color: #ffffff;
+  background-color: #999999;
+  border-color: #999999;
+}
+
+.nav li.dropdown.open .caret,
+.nav li.dropdown.open.active .caret,
+.nav li.dropdown.open a:hover .caret,
+.nav li.dropdown.open a:focus .caret {
+  border-top-color: #ffffff;
+  border-bottom-color: #ffffff;
+  opacity: 1;
+  filter: alpha(opacity=100);
+}
+
+.tabs-stacked .open > a:hover,
+.tabs-stacked .open > a:focus {
+  border-color: #999999;
+}
+
+.tabbable {
+  *zoom: 1;
+}
+
+.tabbable:before,
+.tabbable:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.tabbable:after {
+  clear: both;
+}
+
+.tab-content {
+  overflow: auto;
+}
+
+.tabs-below > .nav-tabs,
+.tabs-right > .nav-tabs,
+.tabs-left > .nav-tabs {
+  border-bottom: 0;
+}
+
+.tab-content > .tab-pane,
+.pill-content > .pill-pane {
+  display: none;
+}
+
+.tab-content > .active,
+.pill-content > .active {
+  display: block;
+}
+
+.tabs-below > .nav-tabs {
+  border-top: 1px solid #ddd;
+}
+
+.tabs-below > .nav-tabs > li {
+  margin-top: -1px;
+  margin-bottom: 0;
+}
+
+.tabs-below > .nav-tabs > li > a {
+  -webkit-border-radius: 0 0 4px 4px;
+  -moz-border-radius: 0 0 4px 4px;
+  border-radius: 0 0 4px 4px;
+}
+
+.tabs-below > .nav-tabs > li > a:hover,
+.tabs-below > .nav-tabs > li > a:focus {
+  border-top-color: #ddd;
+  border-bottom-color: transparent;
+}
+
+.tabs-below > .nav-tabs > .active > a,
+.tabs-below > .nav-tabs > .active > a:hover,
+.tabs-below > .nav-tabs > .active > a:focus {
+  border-color: transparent #ddd #ddd #ddd;
+}
+
+.tabs-left > .nav-tabs > li,
+.tabs-right > .nav-tabs > li {
+  float: none;
+}
+
+.tabs-left > .nav-tabs > li > a,
+.tabs-right > .nav-tabs > li > a {
+  min-width: 74px;
+  margin-right: 0;
+  margin-bottom: 3px;
+}
+
+.tabs-left > .nav-tabs {
+  float: left;
+  margin-right: 19px;
+  border-right: 1px solid #ddd;
+}
+
+.tabs-left > .nav-tabs > li > a {
+  margin-right: -1px;
+  -webkit-border-radius: 4px 0 0 4px;
+  -moz-border-radius: 4px 0 0 4px;
+  border-radius: 4px 0 0 4px;
+}
+
+.tabs-left > .nav-tabs > li > a:hover,
+.tabs-left > .nav-tabs > li > a:focus {
+  border-color: #eeeeee #dddddd #eeeeee #eeeeee;
+}
+
+.tabs-left > .nav-tabs .active > a,
+.tabs-left > .nav-tabs .active > a:hover,
+.tabs-left > .nav-tabs .active > a:focus {
+  border-color: #ddd transparent #ddd #ddd;
+  *border-right-color: #ffffff;
+}
+
+.tabs-right > .nav-tabs {
+  float: right;
+  margin-left: 19px;
+  border-left: 1px solid #ddd;
+}
+
+.tabs-right > .nav-tabs > li > a {
+  margin-left: -1px;
+  -webkit-border-radius: 0 4px 4px 0;
+  -moz-border-radius: 0 4px 4px 0;
+  border-radius: 0 4px 4px 0;
+}
+
+.tabs-right > .nav-tabs > li > a:hover,
+.tabs-right > .nav-tabs > li > a:focus {
+  border-color: #eeeeee #eeeeee #eeeeee #dddddd;
+}
+
+.tabs-right > .nav-tabs .active > a,
+.tabs-right > .nav-tabs .active > a:hover,
+.tabs-right > .nav-tabs .active > a:focus {
+  border-color: #ddd #ddd #ddd transparent;
+  *border-left-color: #ffffff;
+}
+
+.nav > .disabled > a {
+  color: #999999;
+}
+
+.nav > .disabled > a:hover,
+.nav > .disabled > a:focus {
+  text-decoration: none;
+  cursor: default;
+  background-color: transparent;
+}
+
+.navbar {
+  *position: relative;
+  *z-index: 2;
+  margin-bottom: 20px;
+  overflow: visible;
+}
+
+.navbar-inner {
+  min-height: 40px;
+  padding-right: 20px;
+  padding-left: 20px;
+  background-color: #fafafa;
+  background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2));
+  background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2);
+  background-image: -o-linear-gradient(top, #ffffff, #f2f2f2);
+  background-image: linear-gradient(to bottom, #ffffff, #f2f2f2);
+  background-repeat: repeat-x;
+  border: 1px solid #d4d4d4;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);
+  *zoom: 1;
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+}
+
+.navbar-inner:before,
+.navbar-inner:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.navbar-inner:after {
+  clear: both;
+}
+
+.navbar .container {
+  width: auto;
+}
+
+.nav-collapse.collapse {
+  height: auto;
+  overflow: visible;
+}
+
+.navbar .brand {
+  display: block;
+  float: left;
+  padding: 10px 20px 10px;
+  margin-left: -20px;
+  font-size: 20px;
+  font-weight: 200;
+  color: #777777;
+  text-shadow: 0 1px 0 #ffffff;
+}
+
+.navbar .brand:hover,
+.navbar .brand:focus {
+  text-decoration: none;
+}
+
+.navbar-text {
+  margin-bottom: 0;
+  line-height: 40px;
+  color: #777777;
+}
+
+.navbar-link {
+  color: #777777;
+}
+
+.navbar-link:hover,
+.navbar-link:focus {
+  color: #333333;
+}
+
+.navbar .divider-vertical {
+  height: 40px;
+  margin: 0 9px;
+  border-right: 1px solid #ffffff;
+  border-left: 1px solid #f2f2f2;
+}
+
+.navbar .btn,
+.navbar .btn-group {
+  margin-top: 5px;
+}
+
+.navbar .btn-group .btn,
+.navbar .input-prepend .btn,
+.navbar .input-append .btn,
+.navbar .input-prepend .btn-group,
+.navbar .input-append .btn-group {
+  margin-top: 0;
+}
+
+.navbar-form {
+  margin-bottom: 0;
+  *zoom: 1;
+}
+
+.navbar-form:before,
+.navbar-form:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.navbar-form:after {
+  clear: both;
+}
+
+.navbar-form input,
+.navbar-form select,
+.navbar-form .radio,
+.navbar-form .checkbox {
+  margin-top: 5px;
+}
+
+.navbar-form input,
+.navbar-form select,
+.navbar-form .bt

<TRUNCATED>

[40/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/global/ug-service.js
----------------------------------------------------------------------
diff --git a/portal/js/global/ug-service.js b/portal/js/global/ug-service.js
new file mode 100644
index 0000000..ba9d762
--- /dev/null
+++ b/portal/js/global/ug-service.js
@@ -0,0 +1,987 @@
+'use strict';
+
+AppServices.Services.factory('ug', function (configuration, $rootScope,utility) {
+
+  return {
+    get:function(prop,isObject){
+      return isObject ? this.client().getObject(prop) : this.client().get(prop);
+    },
+    set:function(prop,value){
+      this.client().set(prop,value);
+
+    },
+    orgLogin:function(username,password){
+      var self = this;
+      this.client().set('email', username);
+      this.client().set('token', null);
+      this.client().orgLogin(username,password,function(err, data, user, organizations, applications){
+        if(err){
+          $rootScope.$broadcast('loginFailed', err,data);
+        }else{
+          self.initializeCurrentUser(function () {
+            $rootScope.$broadcast('loginSuccesful', user, organizations, applications);
+          });
+        }
+      });
+    },
+
+    checkAuthentication:function(force){
+      var ug = this;
+      var client = ug.client();
+
+      var initialize = function () {
+            ug.initializeCurrentUser(function () {
+              $rootScope.userEmail = client.get('email');
+              $rootScope.organizations = client.getObject('organizations');
+              $rootScope.applications = client.getObject('applications');
+              $rootScope.currentOrg = client.get('orgName');
+              $rootScope.currentApp = client.get('appName');
+              var size = 0, key;
+              for (key in  $rootScope.applications) {
+                if ($rootScope.applications.hasOwnProperty(key)) size++;
+              }
+              $rootScope.addApplications = size < 10;
+              $rootScope.$broadcast('checkAuthentication-success', client.getObject('organizations'), client.getObject('applications'), client.get('orgName'), client.get('appName'), client.get('email'));
+            });
+          },
+          isAuthenticated = function () {
+            var authenticated = client.get('token') !== null && client.get('organizations') !== null;
+            if (authenticated) {
+              initialize();
+            }
+            return authenticated;
+          };
+      if(!isAuthenticated() || force){
+        if(!client.get('token')){
+          return $rootScope.$broadcast('checkAuthentication-error','no token',{},client.get('email'));
+        }
+        this.client().reAuthenticateLite(function(err){
+          var missingData = err || ( !client.get('orgName') || !client.get('appName') || !client.getObject('organizations') || !client.getObject('applications'));
+          var email  = client.get('email');
+          if(err || missingData){
+            $rootScope.$broadcast('checkAuthentication-error',err,missingData,email);
+          }else{
+            initialize();
+          }
+        });
+      }
+    },
+    reAuthenticate:function(email,eventOveride){
+      var ug = this;
+      this.client().reAuthenticate(email,function(err, data, user, organizations, applications){
+        if(!err){
+          $rootScope.currentUser = user;
+        }
+        if(!err){
+          $rootScope.userEmail = user.get('email');
+          $rootScope.organizations = organizations;
+          $rootScope.applications = applications;
+          $rootScope.currentOrg = ug.get('orgName');
+          $rootScope.currentApp = ug.get('appName');
+          $rootScope.currentUser = user._data;
+          $rootScope.currentUser.profileImg = utility.get_gravatar($rootScope.currentUser.email);
+        }
+        $rootScope.$broadcast((eventOveride || 'reAuthenticate')+'-' + (err ? 'error' : 'success'),err, data, user, organizations, applications);
+
+      });
+    },
+    logoutCallback: function() {
+      $rootScope.$broadcast('userNotAuthenticated');
+    },
+    logout:function(){
+      $rootScope.activeUI = false;
+      $rootScope.userEmail = 'user@apigee.com';
+      $rootScope.organizations = {"noOrg":{name:"No Orgs Found"}};
+      $rootScope.applications = {"noApp":{name:"No Apps Found"}};
+      $rootScope.currentOrg = 'No Org Found';
+      $rootScope.currentApp = 'No App Found';
+      sessionStorage.setItem('accessToken', null);
+      sessionStorage.setItem('userUUID', null);
+      sessionStorage.setItem('userEmail', null);
+
+      this.client().logout();
+      this._client = null;
+    },
+    client: function(){
+      var options = {
+        buildCurl:true,
+        logging:true
+      };
+      if(Usergrid.options && Usergrid.options.client){
+        options.keys = Usergrid.options.client;
+      }
+
+      this._client = this._client || new Usergrid.Client(options,
+          $rootScope.urls().DATA_URL
+      );
+      return this._client;
+    },
+    getTopCollections: function () {
+      var options = {
+        method:'GET',
+        endpoint: ''
+      }
+      this.client().request(options, function (err, data) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error getting collections');
+        } else {
+          var collections = data.entities[0].metadata.collections;
+          $rootScope.$broadcast('top-collections-received', collections);
+        }
+      });
+    },
+    createCollection: function (collectionName) {
+      var collections = {};
+      collections[collectionName] = {};
+      var metadata = {
+        metadata: {
+          collections: collections
+        }
+      }
+      var options = {
+        method:'PUT',
+        body: metadata,
+        endpoint: ''
+      }
+      this.client().request(options, function (err, data) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error creating collection');
+        } else {
+          $rootScope.$broadcast('collection-created', collections);
+        }
+      });
+    },
+    getApplications: function () {
+      this.client().getApplications(function (err, applications) {
+        if (err) {
+           applications && console.error(applications);
+        }else{
+          $rootScope.$broadcast('applications-received', applications);
+        }
+      });
+    },
+    getAdministrators: function () {
+      this.client().getAdministrators(function (err, administrators) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error getting administrators');
+        }
+        $rootScope.$broadcast('administrators-received', administrators);
+      });
+    },
+    createApplication: function (appName) {
+      this.client().createApplication(appName, function (err, applications) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error creating application');
+        }else{
+          $rootScope.$broadcast('applications-created', applications,appName);
+          $rootScope.$broadcast('applications-received', applications);
+        }
+      });
+    },
+    createAdministrator: function (adminName) {
+      this.client().createAdministrator(adminName, function (err, administrators) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error creating administrator');
+        }
+        $rootScope.$broadcast('administrators-received', administrators);
+      });
+    },
+    getFeed: function () {
+      var options = {
+        method:'GET',
+        endpoint:'management/organizations/'+this.client().get('orgName')+'/feed',
+        mQuery:true
+      };
+      this.client().request(options, function (err, data) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error getting feed');
+        } else {
+          var feedData = data.entities;
+          var feed = [];
+          var i=0;
+          for (i=0; i < feedData.length; i++) {
+            var date = (new Date(feedData[i].created)).toUTCString();
+
+            var title = feedData[i].title;
+
+            var n=title.indexOf(">");
+            title = title.substring(n+1,title.length);
+
+            n=title.indexOf(">");
+            title = title.substring(n+1,title.length);
+
+            if (feedData[i].actor) {
+              title = feedData[i].actor.displayName + ' ' + title;
+            }
+            feed.push({date:date, title:title});
+          }
+          if (i === 0) {
+            feed.push({date:"", title:"No Activities found."});
+          }
+
+          $rootScope.$broadcast('feed-received', feed);
+        }
+      });
+
+    },
+    createGroup: function (path, title) {
+      var options = {
+        path:path,
+        title:title
+      }
+      var self = this;
+      this.groupsCollection.addEntity(options, function(err){
+        if (err) {
+          $rootScope.$broadcast('groups-create-error', err);
+        } else {
+          $rootScope.$broadcast('groups-create-success', self.groupsCollection);
+          $rootScope.$broadcast('groups-received', self.groupsCollection);
+        }
+      });
+    },
+    createRole: function (name, title) {
+      var options = {
+        name:name,
+        title:title
+          },
+          self = this;
+      this.rolesCollection.addEntity(options, function(err){
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error creating role');
+        } else {
+          $rootScope.$broadcast('roles-received', self.rolesCollection);
+        }
+      });
+    },
+    createUser: function (username, name, email, password){
+      var options = {
+        username:username,
+        name:name,
+        email:email,
+        password:password
+      }
+      var self = this;
+      this.usersCollection.addEntity(options, function(err, data){
+        if (err) {
+          if (data) {
+            $rootScope.$broadcast("alert", "error", "error: " + data);
+          } else {
+            $rootScope.$broadcast("alert", "error", "error creating user");
+          }
+        } else {
+          $rootScope.$broadcast('users-create-success', self.usersCollection);
+
+          $rootScope.$broadcast('users-received', self.usersCollection);
+        }
+      });
+    },
+    getCollection: function (type, path, orderBy, query, limit) {
+      var options = {
+        type:path,
+        qs:{}
+      }
+      if (query) {
+        options.qs['ql'] = query;
+      }
+
+      //force order by 'created desc' if none exists
+      if (options.qs.ql) {
+        options.qs['ql'] = options.qs.ql + ' order by ' + (orderBy || 'created desc');
+      } else {
+        options.qs['ql'] = ' order by ' + (orderBy || 'created desc');
+      }
+
+      if (limit) {
+        options.qs['limit'] = limit;
+      }
+      this.client().createCollection(options, function (err, collection, data) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error getting ' + collection._type + ': ' + data.error_description);
+        } else {
+          $rootScope.$broadcast(type + '-received', collection);
+        }
+        //temporarily adding scope.apply to get working in prod, otherwise the events won't get broadcast
+        //todo - we need an apply strategy for 3rd party ug calls!
+        if(!$rootScope.$$phase) {
+          $rootScope.$apply();
+        }
+      });
+    },
+    runDataQuery: function (queryPath, searchString, queryLimit) {
+      this.getCollection('query', queryPath, null, searchString, queryLimit);
+    },
+    runDataPOSTQuery: function(queryPath, body) {
+      var self = this;
+      var options = {
+        method:'POST',
+        endpoint:queryPath,
+        body:body
+      };
+      this.client().request(options, function (err, data) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error: ' + data.error_description);
+          $rootScope.$broadcast('error-running-query',  data);
+        } else {
+
+          var queryPath = data.path;
+          self.getCollection('query', queryPath, null, 'order by modified DESC', null);
+
+        }
+      });
+    },
+    runDataPutQuery: function(queryPath, searchString, queryLimit, body) {
+      var self = this;
+      var options = {
+        method:'PUT',
+        endpoint:queryPath,
+        body:body
+      };
+
+      if (searchString) {
+        options.qs['ql'] = searchString;
+      }
+      if (queryLimit) {
+        options.qs['queryLimit'] = queryLimit;
+      }
+
+      this.client().request(options, function (err, data) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error: ' + data.error_description);
+        } else {
+
+          var queryPath = data.path;
+          self.getCollection('query', queryPath, null, 'order by modified DESC', null);
+
+        }
+      });
+    },
+    runDataDeleteQuery: function(queryPath, searchString, queryLimit) {
+      var self = this;
+      var options = {
+        method:'DELETE',
+        endpoint:queryPath
+      };
+
+      if (searchString) {
+        options.qs['ql'] = searchString;
+      }
+      if (queryLimit) {
+        options.qs['queryLimit'] = queryLimit;
+      }
+
+      this.client().request(options, function (err, data) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error: ' + data.error_description);
+        } else {
+
+          var queryPath = data.path;
+          self.getCollection('query', queryPath, null, 'order by modified DESC', null);
+
+        }
+      });
+    },
+    getUsers: function () {
+      this.getCollection('users','users','username');
+      var self = this;
+      $rootScope.$on("users-received",function(evt, users){
+        self.usersCollection = users;
+      })
+    },
+    getGroups: function () {
+      this.getCollection('groups','groups','title');
+      var self = this;
+      $rootScope.$on('groups-received', function(event, roles) {
+        self.groupsCollection = roles;
+      });
+
+     },
+    getRoles: function () {
+      this.getCollection('roles','roles','name');
+      var self = this;
+      $rootScope.$on('roles-received', function(event, roles) {
+        self.rolesCollection = roles
+      });
+    },
+    getNotifiers: function () {
+      var query = '',
+          limit = '100',
+          self = this;
+      this.getCollection('notifiers','notifiers','created', query, limit);
+      $rootScope.$on('notifiers-received', function(event, notifiers) {
+        self.notifiersCollection = notifiers;
+      });
+    },
+    getNotificationHistory: function (type) {
+      var query = null;
+      if (type) {
+        query = "select * where state = '" + type + "'";
+      }
+      this.getCollection('notifications','notifications', 'created desc', query);
+      var self = this;
+      $rootScope.$on('notifications-received', function(event, notifications) {
+        self.notificationCollection = notifications;
+      });
+    },
+    getNotificationReceipts: function (uuid) {
+      this.getCollection('receipts', 'notifications/'+uuid+'/receipts');
+      var self = this;
+      $rootScope.$on('receipts-received', function(event, receipts) {
+        self.receiptsCollection = receipts;
+      });
+    },
+    getIndexes: function (path) {
+      var options = {
+        method:'GET',
+        endpoint: path + '/indexes'
+      }
+      this.client().request(options, function (err, data) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'Problem getting indexes: ' + data.error);
+        } else {
+          $rootScope.$broadcast('indexes-received', data.data);
+        }
+      });
+    },
+    sendNotification: function(path, body) {
+      var options = {
+        method:'POST',
+        endpoint: path,
+        body:body
+      }
+      this.client().request(options, function (err, data) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'Problem creating notification: ' + data.error);
+        } else {
+          $rootScope.$broadcast('send-notification-complete');
+        }
+      });
+    },
+    getRolesUsers: function (username) {
+      var self = this;
+      var options = {
+        type:'roles/users/'+username,
+        qs:{ql:'order by username'}
+      }
+      this.client().createCollection(options, function (err, users) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error getting users');
+        } else {
+          $rootScope.$broadcast('users-received', users);
+
+        }
+      });
+    },
+    getTypeAheadData: function (type, searchString, searchBy, orderBy) {
+
+      var self = this;
+      var search = '';
+      var qs = {limit: 100};
+      if (searchString) {
+        search = "select * where "+searchBy+" = '"+searchString+"'";
+      }
+      if (orderBy) {
+        search = search + " order by "+orderBy;
+      }
+      if (search) {
+        qs.ql = search;
+      }
+      var options = {
+        method:'GET',
+        endpoint: type,
+        qs:qs
+      }
+      this.client().request(options, function (err, data) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error getting '+type);
+        } else {
+          var entities = data.entities;
+          $rootScope.$broadcast(type +'-typeahead-received', entities);
+        }
+      });
+    },
+    getUsersTypeAhead: function (searchString) {
+      this.getTypeAheadData('users', searchString, 'username', 'username');
+    },
+    getGroupsTypeAhead: function (searchString) {
+      this.getTypeAheadData('groups', searchString, 'path', 'path');
+    },
+    getRolesTypeAhead: function (searchString) {
+      this.getTypeAheadData('roles', searchString, 'name', 'name');
+    },
+    getGroupsForUser: function (user) {
+      var self = this;
+      var options = {
+        type:'users/'+user+'/groups'
+      }
+      this.client().createCollection(options, function (err, groups) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error getting groups');
+        } else {
+
+          $rootScope.$broadcast('user-groups-received', groups);
+
+        }
+      });
+    },
+    addUserToGroup: function (user, group) {
+      var self = this;
+      var options = {
+        type:'users/'+user+'/groups/'+group
+      }
+      this.client().createEntity(options, function (err, entity) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error adding user to group');
+        } else {
+          $rootScope.$broadcast('user-added-to-group-received');
+        }
+      });
+    },
+    addUserToRole: function (user, role) {
+      var options = {
+        method:'POST',
+        endpoint:'roles/'+role+'/users/'+user
+      };
+      this.client().request(options, function (err, data) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error adding user to role');
+        } else {
+          $rootScope.$broadcast('role-update-received');
+        }
+      });
+    },
+    addGroupToRole: function (group, role) {
+      var options = {
+        method:'POST',
+        endpoint:'roles/'+role+'/groups/'+group
+      };
+      this.client().request(options, function (err, data) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error adding group to role');
+        } else {
+          $rootScope.$broadcast('role-update-received');
+        }
+      });
+    },
+    followUser: function (user) {
+      var self = this;
+      var username =  $rootScope.selectedUser.get('uuid');
+      var options = {
+        method:'POST',
+        endpoint:'users/'+username+'/following/users/'+user
+      };
+      this.client().request(options, function (err, data) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error following user');
+        } else {
+          $rootScope.$broadcast('follow-user-received');
+        }
+      });
+    },
+    newPermission: function (permission, type, entity) { //"get,post,put:/mypermission"
+      var options = {
+        method:'POST',
+        endpoint:type+'/'+entity+'/permissions',
+        body:{"permission":permission}
+      };
+      this.client().request(options, function (err, data) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error adding permission');
+        } else {
+          $rootScope.$broadcast('permission-update-received');
+        }
+      });
+    },
+    newUserPermission: function (permission, username) {
+      this.newPermission(permission,'users',username)
+    },
+    newGroupPermission: function (permission, path) {
+      this.newPermission(permission,'groups',path)
+    },
+    newRolePermission: function (permission, name) {
+      this.newPermission(permission,'roles',name)
+    },
+
+    deletePermission: function (permission, type, entity) { //"get,post,put:/mypermission"
+      var options = {
+        method:'DELETE',
+        endpoint:type+'/'+entity+'/permissions',
+        qs:{permission:permission}
+      };
+      this.client().request(options, function (err, data) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error deleting permission');
+        } else {
+          $rootScope.$broadcast('permission-update-received');
+        }
+      });
+    },
+    deleteUserPermission: function (permission, user) {
+      this.deletePermission(permission,'users',user);
+    },
+    deleteGroupPermission: function (permission, group) {
+      this.deletePermission(permission,'groups',group);
+    },
+    deleteRolePermission: function (permission, rolename) {
+      this.deletePermission(permission,'roles',rolename);
+    },
+    removeUserFromRole: function (user, role) { //"get,post,put:/mypermission"
+      var options = {
+        method:'DELETE',
+        endpoint:'roles/'+role+'/users/'+user
+      };
+      this.client().request(options, function (err, data) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error removing user from role');
+        } else {
+          $rootScope.$broadcast('role-update-received');
+        }
+      });
+    },
+    removeUserFromGroup: function (group, role) { //"get,post,put:/mypermission"
+      var options = {
+        method:'DELETE',
+        endpoint:'roles/'+role+'/groups/'+group
+      };
+      this.client().request(options, function (err, data) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error removing role from the group');
+        } else {
+          $rootScope.$broadcast('role-update-received');
+        }
+      });
+    },
+    createAndroidNotifier: function (name, APIkey) {
+      var options = {
+        method:'POST',
+        endpoint:'notifiers',
+        body:{"apiKey":APIkey,"name":name,"provider":"google"}
+      };
+      this.client().request(options, function (err, data) {
+        if (err) {
+          console.error(data);
+          $rootScope.$broadcast('alert', 'error', 'error creating notifier ');
+        } else {
+          $rootScope.$broadcast('alert', 'success', 'New notifier created successfully.');
+          $rootScope.$broadcast('notifier-update');
+        }
+      });
+
+    },
+    createAppleNotifier: function (file, name, environment, certificatePassword ) {
+
+      var provider = 'apple';
+
+      var formData = new FormData();
+      formData.append("p12Certificate", file);
+
+      formData.append('name', name);
+      formData.append('provider', provider);
+      formData.append('environment', environment);
+      formData.append('certificatePassword', certificatePassword);
+
+      var options = {
+        method:'POST',
+        endpoint:'notifiers',
+        body:'{"apiKey":APIkey,"name":name,"provider":"google"}',
+        formData:formData
+      };
+      this.client().request(options, function (err, data) {
+        if (err) {
+          console.error(data);
+          $rootScope.$broadcast('alert', 'error', 'error creating notifier.' );
+        } else {
+          $rootScope.$broadcast('alert', 'success', 'New notifier created successfully.');
+          $rootScope.$broadcast('notifier-update');
+        }
+      });
+
+    },
+    deleteNotifier: function (name) {
+      var options = {
+        method:'DELETE',
+        endpoint: 'notifiers/'+name
+      };
+      this.client().request(options, function (err, data) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error deleting notifier');
+        } else {
+          $rootScope.$broadcast('notifier-update');
+        }
+      });
+
+    },
+    initializeCurrentUser: function (callback) {
+      callback = callback || function(){};
+      if($rootScope.currentUser && !$rootScope.currentUser.reset){
+        callback($rootScope.currentUser);
+        return $rootScope.$broadcast('current-user-initialized', '');
+      }
+      var options = {
+        method:'GET',
+        endpoint:'management/users/'+ this.client().get('email'),
+        mQuery:true
+      };
+      this.client().request(options, function (err, data) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'Error getting user info');
+        } else {
+          $rootScope.currentUser = data.data;
+          $rootScope.currentUser.profileImg = utility.get_gravatar($rootScope.currentUser.email);
+          $rootScope.userEmail =$rootScope.currentUser.email;
+          callback($rootScope.currentUser);
+          $rootScope.$broadcast('current-user-initialized', $rootScope.currentUser);
+        }
+      });
+    },
+
+    updateUser: function (user) {
+      var body = $rootScope.currentUser;
+      body.username = user.username;
+      body.name = user.name;
+      body.email = user.email;
+      var options = {
+        method:'PUT',
+        endpoint:'management/users/' + user.uuid + '/',
+        mQuery:true,
+        body:body
+      };
+      var self = this;
+      this.client().request(options, function (err, data) {
+        self.client().set('email',user.email);
+        self.client().set('username',user.username);
+        if (err) {
+          return $rootScope.$broadcast('user-update-error',data);
+        }
+        $rootScope.currentUser.reset = true;
+        self.initializeCurrentUser(function(){
+          $rootScope.$broadcast('user-update-success', $rootScope.currentUser);
+        });
+      });
+    },
+
+    resetUserPassword: function (user) {
+      var pwdata = {};
+      pwdata.oldpassword = user.oldPassword;
+      pwdata.newpassword = user.newPassword;
+      pwdata.username = user.username;
+      var options = {
+        method:'PUT',
+        endpoint:'users/' + pwdata.uuid + '/',
+        body:pwdata
+      }
+      this.client().request(options, function (err, data) {
+        if (err) {
+         return  $rootScope.$broadcast('alert', 'error', 'Error resetting password');
+        }
+        //remove old and new password fields so they don't end up as part of the entity object
+        $rootScope.currentUser.oldPassword = '';
+        $rootScope.currentUser.newPassword = '';
+        $rootScope.$broadcast('user-reset-password-success', $rootScope.currentUser);
+      });
+
+    },
+    getOrgCredentials: function () {
+      var options = {
+        method:'GET',
+        endpoint:'management/organizations/'+this.client().get('orgName')+'/credentials',
+        mQuery:true
+      };
+      this.client().request(options, function (err, data) {
+        if (err && data.credentials) {
+          $rootScope.$broadcast('alert', 'error', 'Error getting credentials');
+        } else {
+          $rootScope.$broadcast('org-creds-updated', data.credentials);
+        }
+      });
+    },
+    regenerateOrgCredentials: function () {
+      var self = this;
+      var options = {
+        method:'POST',
+        endpoint:'management/organizations/'+ this.client().get('orgName') + '/credentials',
+        mQuery:true
+      };
+      this.client().request(options, function(err, data) {
+        if (err && data.credentials) {
+          $rootScope.$broadcast('alert', 'error', 'Error regenerating credentials');
+        } else {
+          $rootScope.$broadcast('alert', 'success', 'Regeneration of credentials complete.');
+          $rootScope.$broadcast('org-creds-updated', data.credentials);
+        }
+      });
+    },
+    getAppCredentials: function () {
+      var options = {
+        method:'GET',
+        endpoint:'credentials'
+      };
+      this.client().request(options, function (err, data) {
+        if (err && data.credentials) {
+          $rootScope.$broadcast('alert', 'error', 'Error getting credentials');
+        } else {
+          $rootScope.$broadcast('app-creds-updated', data.credentials);
+        }
+      });
+    },
+
+    regenerateAppCredentials: function () {
+      var self = this;
+      var options = {
+        method:'POST',
+        endpoint:'credentials'
+      };
+      this.client().request(options, function(err, data) {
+        if (err && data.credentials) {
+          $rootScope.$broadcast('alert', 'error', 'Error regenerating credentials');
+        } else {
+          $rootScope.$broadcast('alert', 'success', 'Regeneration of credentials complete.');
+          $rootScope.$broadcast('app-creds-updated', data.credentials);
+        }
+      });
+    },
+
+    signUpUser: function(orgName,userName,name,email,password){
+      var formData = {
+        "organization": orgName,
+        "username": userName,
+        "name": name,
+        "email": email,
+        "password": password
+      };
+      var options = {
+        method:'POST',
+        endpoint:'management/organizations',
+        body:formData,
+        mQuery:true
+      };
+      var client = this.client();
+      client.request(options, function(err, data) {
+        if (err) {
+          $rootScope.$broadcast('register-error', data);
+        } else {
+          $rootScope.$broadcast('register-success',data);
+        }
+      });
+    },
+    resendActivationLink: function(id){
+      var options = {
+        method: 'GET',
+        endpoint: 'management/users/'+id+'/reactivate',
+        mQuery:true
+      };
+      this.client().request(options, function (err, data) {
+        if (err) {
+          $rootScope.$broadcast('resend-activate-error', data);
+        } else {
+          $rootScope.$broadcast('resend-activate-success',data);
+        }
+      });
+    },
+    getAppSettings: function(){
+      $rootScope.$broadcast('app-settings-received',{});
+    },
+    getActivities: function(){
+        this.client().request({method:'GET',endpoint:'activities', qs:{limit:200}},function(err,data){
+          if(err) return $rootScope.$broadcast('app-activities-error',data);
+          var entities = data.entities;
+          //set picture if there is none and change gravatar to secure
+          entities.forEach(function(entity) {
+            if (!entity.actor.picture) {
+              entity.actor.picture = window.location.protocol+ "//" + window.location.host + window.location.pathname + "img/user_profile.png"
+            } else {
+              entity.actor.picture = entity.actor.picture.replace(/^http:\/\/www.gravatar/i, 'https://secure.gravatar');
+              //note: changing this to use the image on apigee.com - since the gravatar default won't work on any non-public domains such as localhost
+              //this_data.picture = this_data.picture + encodeURI("?d="+window.location.protocol+"//" + window.location.host + window.location.pathname + "images/user_profile.png");
+              if (~entity.actor.picture.indexOf('http')) {
+                entity.actor.picture = entity.actor.picture;
+              } else {
+                entity.actor.picture = 'https://apigee.com/usergrid/img/user_profile.png';
+              }
+            }
+        });
+          $rootScope.$broadcast('app-activities-received',data.entities);
+        });
+    },
+    getEntityActivities: function(entity){
+        var endpoint = entity.get('type') + '/' + entity.get('uuid') + '/activities' ;
+        var options = {
+          method:'GET',
+          endpoint:endpoint,
+          qs:{limit:200}
+        };
+        this.client().request(options, function (err, data) {
+          if(err){
+            $rootScope.$broadcast(entity.get('type')+'-activities-error',data);
+          }
+          data.entities.forEach(function(entityInstance) {
+            entityInstance.createdDate = (new Date( entityInstance.created)).toUTCString();
+          });
+          $rootScope.$broadcast(entity.get('type')+'-activities-received',data.entities);
+        });
+    },
+    addUserActivity:function(user,content){
+      var options = {
+        "actor": {
+        "displayName": user.get('username'),
+        "uuid": user.get('uuid'),
+        "username":user.get('username')
+          },
+        "verb": "post",
+        "content": content
+      };
+      this.client().createUserActivity(user.get('username'), options, function(err, activity) { //first argument can be 'me', a uuid, or a username
+        if (err) {
+          $rootScope.$broadcast('user-activity-add-error', err);
+        } else {
+          $rootScope.$broadcast('user-activity-add-success', activity);
+        }
+      });
+    },
+    runShellQuery:function(method,path,payload){
+      var options = {
+        "verb": method,
+          "endpoint":path
+      };
+      if(payload){
+        options["body"]=payload;
+      }
+      this.client().request(options,function(err,data){
+        if(err) {
+          $rootScope.$broadcast('shell-error', data);
+        }else{
+          $rootScope.$broadcast('shell-success', data);
+        }
+      });
+    },
+    addOrganization:function(user,orgName){
+      var options = {
+        method: 'POST',
+        endpoint: 'management/users/'+user.uuid+'/organizations',
+        body:{organization:orgName},
+        mQuery:true
+          }, client = this.client(),self=this;
+      client.request(options,function(err,data){
+        if(err){
+          $rootScope.$broadcast('user-add-org-error', data);
+        }else{
+          $rootScope.$broadcast('user-add-org-success', $rootScope.organizations);
+        }
+      });
+    },
+    leaveOrganization:function(user,org){
+      var options = {
+        method: 'DELETE',
+        endpoint: 'management/users/'+user.uuid+'/organizations/'+org.uuid,
+        mQuery:true
+      }
+      this.client().request(options,function(err,data){
+        if(err){
+          $rootScope.$broadcast('user-leave-org-error', data);
+        }else{
+          delete  $rootScope.organizations[org.name];
+          $rootScope.$broadcast('user-leave-org-success', $rootScope.organizations);
+        }
+      });
+    }
+  }
+});

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/global/util-directive.js
----------------------------------------------------------------------
diff --git a/portal/js/global/util-directive.js b/portal/js/global/util-directive.js
new file mode 100644
index 0000000..bbae34e
--- /dev/null
+++ b/portal/js/global/util-directive.js
@@ -0,0 +1,24 @@
+"use strict";
+
+AppServices.Directives.directive('ngFocus', ["$parse", function ($parse) {
+  return function(scope, element, attr) {
+    var fn = $parse(attr['ngFocus']);
+    element.bind('focus', function(event) {
+      scope.$apply(function() {
+        fn(scope, {$event:event});
+      });
+    });
+  }
+}])
+
+
+AppServices.Directives.directive('ngBlur', ["$parse", function ($parse) {
+  return function(scope, element, attr) {
+    var fn = $parse(attr['ngBlur']);
+    element.bind('blur', function(event) {
+      scope.$apply(function() {
+        fn(scope, {$event:event});
+      });
+    });
+  }
+}])
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/global/utility-service.js
----------------------------------------------------------------------
diff --git a/portal/js/global/utility-service.js b/portal/js/global/utility-service.js
new file mode 100755
index 0000000..254f5d2
--- /dev/null
+++ b/portal/js/global/utility-service.js
@@ -0,0 +1,52 @@
+AppServices.Services.factory('utility', function (configuration, $q, $http, $resource) {
+
+  return {
+
+    keys: function(o) {
+      var a = [];
+      for (var propertyName in o) {
+        a.push(propertyName);
+      }
+      return a;
+    },
+    get_gravatar: function(email, size) {
+      try {
+        var size = size || 50;
+        if (email.length) {
+          return 'https://secure.gravatar.com/avatar/' + MD5(email) + '?s=' + size ;
+        } else {
+          return 'https://apigee.com/usergrid/images/user_profile.png';
+        }
+      } catch(e) {
+        return 'https://apigee.com/usergrid/images/user_profile.png';
+      }
+    },
+    get_qs_params: function() {
+      var queryParams = {};
+      if (window.location.search) {
+        // split up the query string and store in an associative array
+        var params = window.location.search.slice(1).split("&");
+        for (var i = 0; i < params.length; i++) {
+          var tmp = params[i].split("=");
+          queryParams[tmp[0]] = unescape(tmp[1]);
+        }
+      }
+      return queryParams;
+    },
+
+    safeApply: function(fn) {
+      var phase = this.$root.$$phase;
+      if(phase == '$apply' || phase == '$digest') {
+        if(fn && (typeof(fn) === 'function')) {
+          fn();
+        }
+      } else {
+        this.$apply(fn);
+      }
+    }
+  };
+
+})
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/global/validate-directive.js
----------------------------------------------------------------------
diff --git a/portal/js/global/validate-directive.js b/portal/js/global/validate-directive.js
new file mode 100644
index 0000000..bf8e384
--- /dev/null
+++ b/portal/js/global/validate-directive.js
@@ -0,0 +1,40 @@
+
+AppServices.Directives.directive('ugValidate', ["$rootScope", function ($rootScope) {
+  return{
+    scope:true,
+    restrict: 'A',
+    require:'ng-model',
+    replace: true,
+    link: function linkFn(scope, element, attrs, ctrl) {
+      var validate = function(){
+        var id = element.attr('id');
+        var validator = id+'-validator';
+        var title = element.attr('title');
+        title = title && title.length  ? title : 'Please enter data' ;
+        $('#'+validator).remove();
+        if(!ctrl.$valid){
+          var validatorElem = '<div id="'+validator+'"><span  class="validator-error-message">'+title+'</span></div>';
+          $( '#'+id ).after( validatorElem);
+          element.addClass('has-error');
+        }else{
+          element.removeClass('has-error');
+          $('#'+validator).remove();
+        }
+      };
+
+      var firing = false;
+      element.bind('blur', function (evt) {
+        validate(scope,element,attrs,ctrl);
+      }).bind('input', function (evt) {
+            if(firing){
+              return ;
+            }
+            firing = true;
+            setTimeout(function(){
+              validate(scope,element,attrs,ctrl);
+              firing=false;
+            },500)
+          });
+    }
+  };
+}]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/groups/groups-activities-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/groups/groups-activities-controller.js b/portal/js/groups/groups-activities-controller.js
new file mode 100644
index 0000000..f9b3c94
--- /dev/null
+++ b/portal/js/groups/groups-activities-controller.js
@@ -0,0 +1,27 @@
+'use strict'
+
+AppServices.Controllers.controller('GroupsActivitiesCtrl', ['ug', '$scope', '$rootScope', '$location',
+  function (ug, $scope, $rootScope, $location) {
+
+    $scope.activitiesSelected = 'active';
+
+    if (!$rootScope.selectedGroup) {
+      $location.path('/groups');
+      return;
+    } else {
+      $rootScope.selectedGroup.activities = [];
+      $rootScope.selectedGroup.getActivities(function(err, data){
+        if (err) {
+
+        } else {
+//          $rootScope.selectedGroup.activities = data;
+          if(!$rootScope.$$phase) {
+            $rootScope.$apply();
+          }
+        }
+
+      });
+    }
+
+
+  }]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/groups/groups-activities.html
----------------------------------------------------------------------
diff --git a/portal/js/groups/groups-activities.html b/portal/js/groups/groups-activities.html
new file mode 100644
index 0000000..675bedf
--- /dev/null
+++ b/portal/js/groups/groups-activities.html
@@ -0,0 +1,24 @@
+<div class="content-page" ng-controller="GroupsActivitiesCtrl">
+
+  <br>
+  <div>
+    <table class="table table-striped">
+      <tbody>
+      <tr class="table-header">
+        <td>Date</td>
+        <td>Content</td>
+        <td>Verb</td>
+        <td>UUID</td>
+      </tr>
+      <tr class="zebraRows" ng-repeat="activity in selectedGroup.activities">
+        <td>{{activity.createdDate}}</td>
+        <td>{{activity.content}}</td>
+        <td>{{activity.verb}}</td>
+        <td>{{activity.uuid}}</td>
+      </tr>
+      </tbody>
+    </table>
+  </div>
+
+
+</div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/groups/groups-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/groups/groups-controller.js b/portal/js/groups/groups-controller.js
new file mode 100644
index 0000000..ae9ab35
--- /dev/null
+++ b/portal/js/groups/groups-controller.js
@@ -0,0 +1,119 @@
+'use strict'
+
+AppServices.Controllers.controller('GroupsCtrl', ['ug', '$scope', '$rootScope', '$location', '$route',
+  function (ug, $scope, $rootScope, $location, $route) {
+
+    $scope.groupsCollection = {};
+    $rootScope.selectedGroup = {};
+    $scope.previous_display = 'none';
+    $scope.next_display = 'none';
+    $scope.hasGroups = false;
+    $scope.newGroup = {path:'',title:''}
+
+    ug.getGroups();
+
+    $scope.currentGroupsPage = {};
+//  $scope.$route = $route;
+
+    $scope.selectGroupPage = function(route){
+      //lokup the template URL with the route. trying to preserve routes in the markup and not hard link to .html
+      $scope.currentGroupsPage.template = $route.routes[route].templateUrl;
+      $scope.currentGroupsPage.route = route;
+    }
+
+    $scope.newGroupDialog = function(modalId,form){
+      //todo: put more validate here
+      if ($scope.newGroup.path && $scope.newGroup.title) {
+        //$scope.path = $scope.path.replace(' ','');
+        ug.createGroup($scope.removeFirstSlash($scope.newGroup.path), $scope.newGroup.title);
+        $scope.hideModal(modalId);
+        $scope.newGroup = {path:'',title:''}
+      } else {
+        $rootScope.$broadcast('alert', 'error', 'Missing required information.');
+      }
+    };
+
+    $scope.deleteGroupsDialog = function(modalId){
+      $scope.deleteEntities($scope.groupsCollection, 'group-deleted', 'error deleting group');
+      $scope.hideModal(modalId);
+      $scope.newGroup = {path:'',title:''}
+    };
+    $scope.$on('group-deleted',function(){
+      $rootScope.$broadcast('alert', 'success', 'Group deleted successfully.');
+    });
+    $scope.$on('group-deleted-error',function(){
+      ug.getGroups();
+    });
+
+    $scope.$on("groups-create-success",function(){
+      $rootScope.$broadcast('alert', 'success', 'Group created successfully.');
+    });
+
+    $scope.$on("groups-create-error",function(){
+      $rootScope.$broadcast('alert', 'error', 'Error creating group. Make sure you don\'t have spaces in the path.');
+    });
+
+    $scope.$on('groups-received', function(event, groups) {
+      $scope.groupBoxesSelected = false;
+      $scope.groupsCollection = groups;
+      $scope.newGroup.path = '';
+      $scope.newGroup.title = '';
+      if(groups._list.length > 0 && (!$rootScope.selectedGroup._data || !groups._list.some(function(group){ return $rootScope.selectedGroup._data.uuid === group._data.uuid }))){ // if groups have been received already do not reselect
+        $scope.selectGroup(groups._list[0]._data.uuid)
+      }
+      $scope.hasGroups = groups._list.length > 0;
+      $scope.received = true;
+
+      $scope.checkNextPrev();
+      $scope.applyScope();
+    });
+
+    $scope.resetNextPrev = function() {
+      $scope.previous_display = 'none';
+      $scope.next_display = 'none';
+    }
+    $scope.checkNextPrev = function() {
+      $scope.resetNextPrev();
+      if ($scope.groupsCollection.hasPreviousPage()) {
+        $scope.previous_display = 'block';
+      }
+      if($scope.groupsCollection.hasNextPage()) {
+        $scope.next_display = 'block';
+      }
+    }
+
+    $scope.selectGroup = function(uuid){
+      $rootScope.selectedGroup = $scope.groupsCollection.getEntityByUUID(uuid);
+      $scope.currentGroupsPage.template = 'groups/groups-details.html';
+      $scope.currentGroupsPage.route = '/groups/details';
+      $rootScope.$broadcast('group-selection-changed', $rootScope.selectedGroup);
+    }
+
+    $scope.getPrevious = function () {
+      $scope.groupsCollection.getPreviousPage(function(err) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error getting previous page of groups');
+        }
+        $scope.checkNextPrev();
+        $scope.applyScope();
+      });
+    };
+
+    $scope.getNext = function () {
+
+      $scope.groupsCollection.getNextPage(function(err) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error getting next page of groups');
+        }
+        $scope.checkNextPrev();
+        $scope.applyScope();
+      });
+    };
+
+    $scope.$on('group-deleted', function(event) {
+      $route.reload();
+      $scope.master = '';
+    });
+
+
+  }]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/groups/groups-details-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/groups/groups-details-controller.js b/portal/js/groups/groups-details-controller.js
new file mode 100644
index 0000000..e9164ac
--- /dev/null
+++ b/portal/js/groups/groups-details-controller.js
@@ -0,0 +1,38 @@
+'use strict'
+
+AppServices.Controllers.controller('GroupsDetailsCtrl', ['ug', '$scope', '$rootScope', '$location',
+  function (ug, $scope, $rootScope, $location) {
+
+    var selectedGroup = $rootScope.selectedGroup.clone();
+    $scope.detailsSelected = 'active';
+    $scope.json = selectedGroup._json;
+    $scope.group = selectedGroup._data;
+    $scope.group.path =  $scope.group.path.indexOf('/')!=0 ? '/'+$scope.group.path : $scope.group.path;
+    $scope.group.title = $scope.group.title;
+
+    if (!$rootScope.selectedGroup) {
+      $location.path('/groups');
+      return;
+    }
+    $scope.$on('group-selection-changed',function(evt,selectedGroup){
+      $scope.group.path =  selectedGroup._data.path.indexOf('/')!=0 ? '/'+selectedGroup._data.path : selectedGroup._data.path;
+      $scope.group.title = selectedGroup._data.title;
+      $scope.detailsSelected = 'active';
+      $scope.json = selectedGroup._json || selectedGroup._data.stringifyJSON();
+
+    });
+
+    $rootScope.saveSelectedGroup = function(){
+      $rootScope.selectedGroup._data.title = $scope.group.title;
+      $rootScope.selectedGroup._data.path = $scope.removeFirstSlash( $scope.group.path);
+      $rootScope.selectedGroup.save(function(err) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error saving group');
+        } else {
+          $rootScope.$broadcast('alert', 'success', 'group saved');
+        }
+      });
+
+    }
+
+  }]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/groups/groups-details.html
----------------------------------------------------------------------
diff --git a/portal/js/groups/groups-details.html b/portal/js/groups/groups-details.html
new file mode 100644
index 0000000..1e55822
--- /dev/null
+++ b/portal/js/groups/groups-details.html
@@ -0,0 +1,28 @@
+<div class="content-page" ng-controller="GroupsDetailsCtrl">
+
+  <div>
+      <form name="updateGroupDetailForm" ng-submit="saveSelectedGroup()" novalidate>
+          <div style="float: left; padding-right: 30px;">
+              <h4 class="ui-dform-legend">Group Information</h4>
+              <label for="group-title" class="ui-dform-label">Group Title</label>
+              <input type="text" id="group-title" ng-pattern="titleRegex" ng-attr-title="{{titleRegexDescription}}" required class="ui-dform-text" ng-model="group.title" ug-validate>
+              <br/>
+            <label for="group-path" class="ui-dform-label">Group Path</label>
+            <input type="text" id="group-path" required ng-attr-title="{{pathRegexDescription}}" placeholder="ex: /mydata" ng-pattern="pathRegex" class="ui-dform-text" ng-model="group.path" ug-validate>
+            <br/>
+          </div>
+          <br style="clear:both"/>
+
+          <div style="width:100%;float:left;padding: 20px 0">
+              <input type="submit" value="Save Group" style="margin-right: 15px;" ng-disabled="!updateGroupDetailForm.$valid" class="btn btn-primary" />
+          </div>
+
+          <div class="content-container">
+              <h4>JSON Group Object</h4>
+              <pre>{{json}}</pre>
+          </div>
+      </form>
+  </div>
+
+
+</div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/groups/groups-members-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/groups/groups-members-controller.js b/portal/js/groups/groups-members-controller.js
new file mode 100644
index 0000000..b4c4c16
--- /dev/null
+++ b/portal/js/groups/groups-members-controller.js
@@ -0,0 +1,113 @@
+'use strict'
+
+AppServices.Controllers.controller('GroupsMembersCtrl', ['ug', '$scope', '$rootScope', '$location',
+  function (ug, $scope, $rootScope, $location) {
+
+    $scope.membersSelected = 'active';
+    $scope.previous_display = 'none';
+    $scope.next_display = 'none';
+    $scope.user = '';
+    $scope.master = '';
+    $scope.hasMembers = false
+
+
+    //todo find others and combine this into one controller
+    ug.getUsersTypeAhead();
+
+    $scope.usersTypeaheadValues = [];
+    $scope.$on('users-typeahead-received', function(event, users) {
+      $scope.usersTypeaheadValues = users;
+      $scope.applyScope();
+    });
+
+    $scope.addGroupToUserDialog = function(modalId){
+      if ($scope.user) {
+        var path =  $rootScope.selectedGroup.get('path');
+        ug.addUserToGroup($scope.user.uuid, path);
+        $scope.user = '';
+        $scope.hideModal(modalId)
+      } else {
+        $rootScope.$broadcast('alert', 'error', 'Please select a user.');
+      }
+    };
+
+    $scope.removeUsersFromGroupDialog = function(modalId){
+      $scope.deleteEntities($scope.groupsCollection.users, 'group-update-received', 'Error removing user from group');
+      $scope.hideModal(modalId)
+    };
+
+    $scope.get = function() {
+      if(!$rootScope.selectedGroup.get){
+        return;
+      }
+      var options = {
+        type:'groups/'+$rootScope.selectedGroup.get('path') +'/users'
+      }
+      $scope.groupsCollection.addCollection('users', options, function(err) {
+          $scope.groupMembersSelected = false;
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error getting users for group');
+        } else {
+          $scope.hasMembers =  $scope.groupsCollection.users._list.length > 0;
+          $scope.checkNextPrev();
+          $scope.applyScope();
+        }
+      });
+    }
+
+    $scope.resetNextPrev = function() {
+      $scope.previous_display = 'none';
+      $scope.next_display = 'none';
+    }
+    $scope.checkNextPrev = function() {
+      $scope.resetNextPrev();
+      if ($scope.groupsCollection.users.hasPreviousPage()) {
+        $scope.previous_display = 'block';
+      }
+
+      if($scope.groupsCollection.users.hasNextPage()) {
+        $scope.next_display = 'block';
+      }
+    }
+
+    if (!$rootScope.selectedGroup) {
+      $location.path('/groups');
+      return;
+    } else {
+      $scope.get();
+    }
+
+    $scope.getPrevious = function () {
+      $scope.groupsCollection.users.getPreviousPage(function(err) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error getting previous page of users');
+        }
+        $scope.checkNextPrev();
+        if(!$rootScope.$$phase) {
+          $rootScope.$apply();
+        }
+      });
+    };
+
+    $scope.getNext = function () {
+      $scope.groupsCollection.users.getNextPage(function(err) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error getting next page of users');
+        }
+        $scope.checkNextPrev();
+        if(!$rootScope.$$phase) {
+          $rootScope.$apply();
+        }
+      });
+    };
+
+    $scope.$on('group-update-received', function(event) {
+      $scope.get();
+    });
+
+    $scope.$on('user-added-to-group-received', function(event) {
+      $scope.get();
+    });
+
+
+  }]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/groups/groups-members.html
----------------------------------------------------------------------
diff --git a/portal/js/groups/groups-members.html b/portal/js/groups/groups-members.html
new file mode 100644
index 0000000..d2f5644
--- /dev/null
+++ b/portal/js/groups/groups-members.html
@@ -0,0 +1,60 @@
+<div class="content-page" ng-controller="GroupsMembersCtrl">
+
+
+  <bsmodal id="removeFromGroup"
+           title="Confirmation"
+           close="hideModal"
+           closelabel="Cancel"
+           extrabutton="removeUsersFromGroupDialog"
+           extrabuttonlabel="Delete"
+           ng-cloak>
+    <p>Are you sure you want to remove the users from the seleted group(s)?</p>
+  </bsmodal>
+
+  <bsmodal id="addGroupToUser"
+           title="Add user to group"
+           close="hideModal"
+           closelabel="Cancel"
+           extrabutton="addGroupToUserDialog"
+           extrabuttonlabel="Add"
+           ng-cloak>
+    <div class="btn-group">
+      <a class="btn dropdown-toggle filter-selector" data-toggle="dropdown">
+        <span class="filter-label">{{$parent.user != '' ? $parent.user.username : 'Select a user...'}}</span>
+        <span class="caret"></span>
+      </a>
+      <ul class="dropdown-menu">
+        <li ng-repeat="user in $parent.usersTypeaheadValues" class="filterItem"><a ng-click="$parent.$parent.user = user">{{user.username}}</a></li>
+      </ul>
+    </div>
+  </bsmodal>
+
+
+  <div class="button-strip">
+    <button class="btn btn-primary"  ng-click="showModal('addGroupToUser')">Add User to Group</button>
+    <button class="btn btn-primary" ng-disabled="!hasMembers || !valueSelected(groupsCollection.users._list)" ng-click="showModal('removeFromGroup')">Remove User(s) from Group</button>
+  </div>
+  <table class="table table-striped">
+    <tr class="table-header">
+      <td style="width: 30px;"><input type="checkbox" ng-show="hasMembers" id="selectAllCheckbox" ng-model="groupMembersSelected" ng-click="selectAllEntities(groupsCollection.users._list,this,'groupMembersSelected')"></td>
+      <td style="width: 50px;"></td>
+      <td>Username</td>
+      <td>Display Name</td>
+    </tr>
+    <tr class="zebraRows" ng-repeat="user in groupsCollection.users._list">
+      <td>
+        <input
+          type="checkbox"
+          ng-model="user.checked"
+          >
+      </td>
+      <td><img style="width:30px;height:30px;" ng-src="{{user._portal_image_icon}}"></td>
+      <td>{{user.get('username')}}</td>
+      <td>{{user.get('name')}}</td>
+    </tr>
+  </table>
+  <div style="padding: 10px 5px 10px 5px">
+    <button class="btn btn-primary" ng-click="getPrevious()" style="display:{{previous_display}}">< Previous</button>
+    <button class="btn btn-primary" ng-click="getNext()" style="display:{{next_display}}; float:right;">Next ></button>
+  </div>
+</div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/groups/groups-roles-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/groups/groups-roles-controller.js b/portal/js/groups/groups-roles-controller.js
new file mode 100644
index 0000000..e3a8004
--- /dev/null
+++ b/portal/js/groups/groups-roles-controller.js
@@ -0,0 +1,184 @@
+'use strict'
+
+AppServices.Controllers.controller('GroupsRolesCtrl', ['ug', '$scope', '$rootScope', '$location',
+  function (ug, $scope, $rootScope, $location) {
+
+
+    $scope.rolesSelected = 'active';
+    $scope.roles_previous_display = 'none';
+    $scope.roles_next_display = 'none';
+    $scope.name = '';
+    $scope.master = '';
+    $scope.hasRoles = false;
+    $scope.hasPermissions = false;
+    $scope.permissions = {};
+
+
+    $scope.addGroupToRoleDialog = function(modalId){
+      if ($scope.name) {
+        var path =  $rootScope.selectedGroup.get('path');
+        ug.addGroupToRole(path, $scope.name);
+        $scope.hideModal(modalId)
+        $scope.name='';
+      } else {
+        $rootScope.$broadcast('alert', 'error', 'You must specify a role name.');
+      }
+    };
+
+
+    $scope.leaveRoleDialog = function(modalId){
+      var path =  $rootScope.selectedGroup.get('path');
+      var roles = $scope.groupsCollection.roles._list;
+      for (var i=0;i<roles.length;i++) {
+        if (roles[i].checked) {
+          ug.removeUserFromGroup(path, roles[i]._data.name);
+        }
+      }
+      $scope.hideModal(modalId)
+    };
+
+    $scope.addGroupPermissionDialog = function(modalId){
+      if ($scope.permissions.path) {
+
+        var permission = $scope.createPermission(null,null,$scope.removeFirstSlash($scope.permissions.path),$scope.permissions);
+        var path =  $rootScope.selectedGroup.get('path');
+        ug.newGroupPermission(permission, path);
+        $scope.hideModal(modalId)
+        if($scope.permissions){
+          $scope.permissions = {};
+        }
+      } else {
+        $rootScope.$broadcast('alert', 'error', 'You must specify a name for the permission.');
+      }
+    };
+
+    $scope.deleteGroupPermissionDialog = function(modalId){
+      var path =  $rootScope.selectedGroup.get('path');
+      var permissions = $rootScope.selectedGroup.permissions;
+      for (var i=0;i<permissions.length;i++) {
+        if (permissions[i].checked) {
+          ug.deleteGroupPermission(permissions[i].perm, path);
+        }
+      }
+      $scope.hideModal(modalId)
+    };
+
+    $scope.resetNextPrev = function() {
+      $scope.roles_previous_display = 'none';
+      $scope.roles_next_display = 'none';
+      $scope.permissions_previous_display = 'none';
+      $scope.permissions_next_display = 'none';
+    }
+    $scope.resetNextPrev();
+    $scope.checkNextPrevRoles = function() {
+      $scope.resetNextPrev();
+      if ($scope.groupsCollection.roles.hasPreviousPage()) {
+        $scope.roles_previous_display = 'block';
+      }
+      if($scope.groupsCollection.roles.hasNextPage()) {
+        $scope.roles_next_display = 'block';
+      }
+    }
+    $scope.checkNextPrevPermissions = function() {
+      if ($scope.groupsCollection.permissions.hasPreviousPage()) {
+        $scope.permissions_previous_display = 'block';
+      }
+      if($scope.groupsCollection.permissions.hasNextPage()) {
+        $scope.permissions_next_display = 'block';
+      }
+    }
+
+    $scope.getRoles = function() {
+
+      var path = $rootScope.selectedGroup.get('path');
+      var options = {
+        type:'groups/'+ path +'/roles'
+      }
+      $scope.groupsCollection.addCollection('roles', options, function(err) {
+        $scope.groupRoleSelected = false;
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error getting roles for group');
+        } else {
+          $scope.hasRoles = $scope.groupsCollection.roles._list.length > 0;
+          $scope.checkNextPrevRoles();
+          $scope.applyScope();
+        }
+      });
+    }
+
+    $scope.getPermissions = function() {
+
+      $rootScope.selectedGroup.permissions = [];
+      $rootScope.selectedGroup.getPermissions(function(err, data){
+        $scope.groupPermissionsSelected = false;
+        $scope.hasPermissions = $scope.selectedGroup.permissions.length;
+        if (err) {
+
+        } else {
+          $scope.applyScope();
+        }
+      });
+
+    }
+
+    $scope.getPreviousRoles = function () {
+      $scope.groupsCollection.roles.getPreviousPage(function(err) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error getting previous page of roles');
+        }
+        $scope.checkNextPrevRoles();
+        $scope.applyScope();
+      });
+    };
+    $scope.getNextRoles = function () {
+      $scope.groupsCollection.roles.getNextPage(function(err) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error getting next page of roles');
+        }
+        $scope.checkNextPrevRoles();
+        $scope.applyScope();
+      });
+    };
+    $scope.getPreviousPermissions = function () {
+      $scope.groupsCollection.permissions.getPreviousPage(function(err) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error getting previous page of permissions');
+        }
+        $scope.checkNextPrevPermissions();
+        $scope.applyScope();
+      });
+    };
+    $scope.getNextPermissions = function () {
+      $scope.groupsCollection.permissions.getNextPage(function(err) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error getting next page of permissions');
+        }
+        $scope.checkNextPrevPermissions();
+        $scope.applyScope();
+      });
+    };
+
+    $scope.$on('role-update-received', function(event) {
+      $scope.getRoles();
+    });
+
+    $scope.$on('permission-update-received', function(event) {
+      $scope.getPermissions();
+    });
+
+    $scope.$on('groups-received',function(evt,data){
+      $scope.groupsCollection = data;
+      $scope.getRoles();
+      $scope.getPermissions();
+    })
+
+    if (!$rootScope.selectedGroup) {
+      $location.path('/groups');
+      return;
+    } else {
+      ug.getRolesTypeAhead();
+      ug.getGroups();
+    }
+
+
+  }]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/groups/groups-roles.html
----------------------------------------------------------------------
diff --git a/portal/js/groups/groups-roles.html b/portal/js/groups/groups-roles.html
new file mode 100644
index 0000000..f8b586b
--- /dev/null
+++ b/portal/js/groups/groups-roles.html
@@ -0,0 +1,127 @@
+<div class="content-page" ng-controller="GroupsRolesCtrl">
+
+  <bsmodal id="addGroupToRole"
+           title="Add group to role"
+           close="hideModal"
+           closelabel="Cancel"
+           extrabutton="addGroupToRoleDialog"
+           extrabuttonlabel="Add"
+           ng-cloak>
+    <div class="btn-group">
+      <a class="btn dropdown-toggle filter-selector" data-toggle="dropdown">
+        <span class="filter-label">{{$parent.name != '' ? $parent.name : 'Role name...'}}</span>
+        <span class="caret"></span>
+      </a>
+      <ul class="dropdown-menu">
+        <li ng-repeat="role in $parent.rolesTypeaheadValues" class="filterItem"><a ng-click="$parent.$parent.name = role.name">{{role.name}}</a></li>
+      </ul>
+    </div>
+  </bsmodal>
+
+  <bsmodal id="leaveRoleFromGroup"
+           title="Confirmation"
+           close="hideModal"
+           closelabel="Cancel"
+           extrabutton="leaveRoleDialog"
+           extrabuttonlabel="Leave"
+           ng-cloak>
+    <p>Are you sure you want to remove the group from the role(s)?</p>
+  </bsmodal>
+
+
+  <div class="button-strip">
+    <button class="btn btn-primary" ng-click="showModal('addGroupToRole')">Add Role to Group</button>
+    <button class="btn btn-primary" ng-disabled="!hasRoles || !valueSelected(groupsCollection.roles._list)" ng-click="showModal('leaveRoleFromGroup')">Remove Role(s) from Group</button>
+  </div>
+  <h4>Roles</h4>
+  <table class="table table-striped">
+    <tbody>
+    <tr class="table-header">
+      <td style="width: 30px;"><input type="checkbox" ng-show="hasRoles" id="groupsSelectAllCheckBox" ng-model="groupRoleSelected" ng-click="selectAllEntities(groupsCollection.roles._list,this,'groupRoleSelected')" ></td>
+      <td>Role Name</td>
+      <td>Role title</td>
+    </tr>
+    <tr class="zebraRows" ng-repeat="role in groupsCollection.roles._list">
+      <td>
+        <input
+          type="checkbox"
+          ng-model="role.checked"
+          >
+      </td>
+      <td>{{role._data.name}}</td>
+      <td>{{role._data.title}}</td>
+    </tr>
+    </tbody>
+  </table>
+  <div style="padding: 10px 5px 10px 5px">
+    <button class="btn btn-primary" ng-click="getPreviousRoles()" style="display:{{roles_previous_display}}">< Previous</button>
+    <button class="btn btn-primary" ng-click="getNextRoles()" style="display:{{roles_next_display}};float:right;">Next ></button>
+  </div>
+
+
+  <bsmodal id="deletePermission"
+           title="Confirmation"
+           close="hideModal"
+           closelabel="Cancel"
+           extrabutton="deleteGroupPermissionDialog"
+           extrabuttonlabel="Delete"
+           ng-cloak>
+    <p>Are you sure you want to delete the permission(s)?</p>
+  </bsmodal>
+
+
+  <bsmodal id="addPermission"
+           title="New Permission"
+           close="hideModal"
+           closelabel="Cancel"
+           extrabutton="addGroupPermissionDialog"
+           extrabuttonlabel="Add"
+           ng-cloak>
+    <p>Path: <input ng-model="$parent.permissions.path" placeholder="ex: /mydata" id="groupsrolespermissions" type="text" ng-pattern="pathRegex" ng-attr-title="{{pathRegexDescription}}" required ug-validate  /></p>
+    <div class="control-group">
+      <input type="checkbox" ng-model="$parent.permissions.getPerm"> GET
+    </div>
+    <div class="control-group">
+      <input type="checkbox" ng-model="$parent.permissions.postPerm"> POST
+    </div>
+    <div class="control-group">
+      <input type="checkbox" ng-model="$parent.permissions.putPerm"> PUT
+    </div>
+    <div class="control-group">
+      <input type="checkbox" ng-model="$parent.permissions.deletePerm"> DELETE
+    </div>
+  </bsmodal>
+
+
+  <div class="button-strip">
+    <button class="btn btn-primary" ng-click="showModal('addPermission')">Add Permission</button>
+    <button class="btn btn-primary" ng-disabled="!hasPermissions || !valueSelected(selectedGroup.permissions)" ng-click="showModal('deletePermission')">Delete Permission(s)</button>
+  </div>
+  <h4>Permissions</h4>
+  <table class="table table-striped">
+    <tbody>
+    <tr class="table-header">
+      <td style="width: 30px;"><input ng-show="hasPermissions" type="checkbox" id="permissionsSelectAllCheckBox" ng-model="groupPermissionsSelected" ng-click="selectAllEntities(selectedGroup.permissions,this,'groupPermissionsSelected')"  ></td>
+      <td>Path</td>
+      <td>GET</td>
+      <td>POST</td>
+      <td>PUT</td>
+      <td>DELETE</td>
+    </tr>
+    <tr class="zebraRows" ng-repeat="permission in selectedGroup.permissions">
+      <td>
+        <input
+          type="checkbox"
+          ng-model="permission.checked"
+          >
+      </td>
+      <td>{{permission.path}}</td>
+      <td>{{permission.operations.get}}</td>
+      <td>{{permission.operations.post}}</td>
+      <td>{{permission.operations.put}}</td>
+      <td>{{permission.operations.delete}}</td>
+    </tr>
+    </tbody>
+  </table>
+
+</div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/groups/groups-tabs.html
----------------------------------------------------------------------
diff --git a/portal/js/groups/groups-tabs.html b/portal/js/groups/groups-tabs.html
new file mode 100644
index 0000000..79d0a78
--- /dev/null
+++ b/portal/js/groups/groups-tabs.html
@@ -0,0 +1,31 @@
+<div class="content-page">
+
+  <section class="row-fluid">
+
+    <div class="span12">
+      <div class="page-filters">
+        <h1 class="title" class="pull-left"><i class="pictogram title">&#128101;</i> Groups</h1>
+      </div>
+    </div>
+
+  </section>
+
+  <div id="user-panel" class="panel-buffer">
+    <ul id="user-panel-tab-bar" class="nav nav-tabs">
+      <li><a href="javaScript:void(0);" ng-click="gotoPage('groups')">Group List</a></li>
+      <li ng-class="detailsSelected"><a href="javaScript:void(0);" ng-click="gotoPage('groups/details')">Details</a></li>
+      <li ng-class="membersSelected"><a href="javaScript:void(0);" ng-click="gotoPage('groups/members')">Users</a></li>
+      <li ng-class="activitiesSelected"><a href="javaScript:void(0);" ng-click="gotoPage('groups/activities')">Activities</a></li>
+      <li ng-class="rolesSelected"><a href="javaScript:void(0);" ng-click="gotoPage('groups/roles')">Roles &amp; Permissions</a></li>
+    </ul>
+  </div>
+
+  <div style="float: left; margin-right: 10px;">
+    <div style="float: left;">
+      <div class="user-header-title"><strong>Group Path: </strong>{{selectedGroup.get('path')}}</div>
+      <div class="user-header-title"><strong>Group Title: </strong>{{selectedGroup.get('title')}}</div>
+    </div>
+  </div>
+</div>
+<br>
+<br>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/groups/groups.html
----------------------------------------------------------------------
diff --git a/portal/js/groups/groups.html b/portal/js/groups/groups.html
new file mode 100644
index 0000000..4f81b18
--- /dev/null
+++ b/portal/js/groups/groups.html
@@ -0,0 +1,92 @@
+<div class="content-page">
+
+  <section class="row-fluid">
+
+    <div class="span12">
+      <div class="page-filters">
+        <h1 class="title" class="pull-left"><i class="pictogram title">&#128101;</i> Groups</h1>
+      </div>
+    </div>
+
+  </section>
+
+
+
+  <bsmodal id="newGroup"
+           title="New Group"
+           close="hideModal"
+           closelabel="Cancel"
+           extrabutton="newGroupDialog"
+           extrabuttonlabel="Add"
+           ng-model="dialog"
+           ng-cloak>
+    <fieldset>
+      <div class="control-group">
+        <label for="title">Title</label>
+        <div class="controls">
+          <input type="text" id="title" ng-pattern="titleRegex" ng-attr-title="{{titleRegexDescription}}" required ng-model="newGroup.title"class="input-xlarge" ug-validate/>
+        </div>
+      </div>
+      <div class="control-group">
+        <label for="path">Path</label>
+        <div class="controls">
+          <input id="path" type="text" ng-attr-title="{{pathRegexDescription}}" placeholder="ex: /mydata" ng-pattern="pathRegex" required ng-model="newGroup.path" class="input-xlarge" ug-validate/>
+        </div>
+      </div>
+    </fieldset>
+  </bsmodal>
+
+  <bsmodal id="deleteGroup"
+           title="Delete Group"
+           close="hideModal"
+           closelabel="Cancel"
+           extrabutton="deleteGroupsDialog"
+           extrabuttonlabel="Delete"
+           ng-cloak>
+    <p>Are you sure you want to delete the group(s)?</p>
+  </bsmodal>
+
+
+  <section class="row-fluid">
+    <div class="span3 user-col">
+
+      <div class="button-toolbar span12">
+        <a title="Select All" class="btn btn-primary select-all toolbar" ng-show="hasGroups" ng-click="selectAllEntities(groupsCollection._list,this,'groupBoxesSelected',true)"> <i class="pictogram">&#8863;</i></a>
+        <button title="Delete" class="btn btn-primary toolbar" ng-disabled="!hasGroups || !valueSelected(groupsCollection._list)" ng-click="showModal('deleteGroup')"><i class="pictogram">&#9749;</i></button>
+        <button title="Add" class="btn btn-primary toolbar" ng-click="showModal('newGroup')"><i class="pictogram">&#59136;</i></button>
+      </div>
+      <ul class="user-list">
+        <li ng-class="selectedGroup._data.uuid === group._data.uuid ? 'selected' : ''" ng-repeat="group in groupsCollection._list" ng-click="selectGroup(group._data.uuid)">
+          <input
+              type="checkbox"
+              ng-value="group._data.uuid"
+              ng-checked="group.checked"
+              ng-model="group.checked"
+              >
+          <a href="javaScript:void(0)" >{{group.get('title')}}</a>
+          <br/>
+          <span ng-if="group.get('path')" class="label">Path:</span>/{{group.get('path')}}
+        </li>
+      </ul>
+
+
+      <div style="padding: 10px 5px 10px 5px">
+        <button class="btn btn-primary" ng-click="getPrevious()" style="display:{{previous_display}}">< Previous</button>
+        <button class="btn btn-primary" ng-click="getNext()" style="display:{{next_display}}; float:right;">Next ></button>
+      </div>
+
+    </div>
+
+    <div class="span9 tab-content" ng-show="selectedGroup.get" >
+      <div class="menu-toolbar">
+        <ul class="inline" >
+          <li class="tab" ng-class="currentGroupsPage.route === '/groups/details' ? 'selected' : ''"><a class="btn btn-primary toolbar" ng-click="selectGroupPage('/groups/details')"><i class="pictogram">&#59170;</i>Details</a></li>
+          <li class="tab" ng-class="currentGroupsPage.route === '/groups/members' ? 'selected' : ''"><a class="btn btn-primary toolbar" ng-click="selectGroupPage('/groups/members')"><i class="pictogram">&#128101;</i>Users</a></li>
+          <li class="tab" ng-class="currentGroupsPage.route === '/groups/activities' ? 'selected' : ''"><a class="btn btn-primary toolbar" ng-click="selectGroupPage('/groups/activities')"><i class="pictogram">&#59194;</i>Activities</a></li>
+          <li class="tab" ng-class="currentGroupsPage.route === '/groups/roles' ? 'selected' : ''"><a class="btn btn-primary toolbar" ng-click="selectGroupPage('/groups/roles')"><i class="pictogram">&#127758;</i>Roles &amp; Permissions</a></li>
+        </ul>
+      </div>
+      <span ng-include="currentGroupsPage.template"></span>
+
+  </section>
+</div>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/lib/MD5.min.js
----------------------------------------------------------------------
diff --git a/portal/js/lib/MD5.min.js b/portal/js/lib/MD5.min.js
deleted file mode 100644
index 0bfc085..0000000
--- a/portal/js/lib/MD5.min.js
+++ /dev/null
@@ -1 +0,0 @@
-var MD5=function(a){function n(a){a=a.replace(/\r\n/g,"\n");var b="";for(var c=0;c<a.length;c++){var d=a.charCodeAt(c);if(d<128){b+=String.fromCharCode(d)}else if(d>127&&d<2048){b+=String.fromCharCode(d>>6|192);b+=String.fromCharCode(d&63|128)}else{b+=String.fromCharCode(d>>12|224);b+=String.fromCharCode(d>>6&63|128);b+=String.fromCharCode(d&63|128)}}return b}function m(a){var b="",c="",d,e;for(e=0;e<=3;e++){d=a>>>e*8&255;c="0"+d.toString(16);b=b+c.substr(c.length-2,2)}return b}function l(a){var b;var c=a.length;var d=c+8;var e=(d-d%64)/64;var f=(e+1)*16;var g=Array(f-1);var h=0;var i=0;while(i<c){b=(i-i%4)/4;h=i%4*8;g[b]=g[b]|a.charCodeAt(i)<<h;i++}b=(i-i%4)/4;h=i%4*8;g[b]=g[b]|128<<h;g[f-2]=c<<3;g[f-1]=c>>>29;return g}function k(a,d,e,f,h,i,j){a=c(a,c(c(g(d,e,f),h),j));return c(b(a,i),d)}function j(a,d,e,g,h,i,j){a=c(a,c(c(f(d,e,g),h),j));return c(b(a,i),d)}function i(a,d,f,g,h,i,j){a=c(a,c(c(e(d,f,g),h),j));return c(b(a,i),d)}function h(a,e,f,g,h,i,j){a=c(a,c(c(d(e,f,g),h),j));re
 turn c(b(a,i),e)}function g(a,b,c){return b^(a|~c)}function f(a,b,c){return a^b^c}function e(a,b,c){return a&c|b&~c}function d(a,b,c){return a&b|~a&c}function c(a,b){var c,d,e,f,g;e=a&2147483648;f=b&2147483648;c=a&1073741824;d=b&1073741824;g=(a&1073741823)+(b&1073741823);if(c&d){return g^2147483648^e^f}if(c|d){if(g&1073741824){return g^3221225472^e^f}else{return g^1073741824^e^f}}else{return g^e^f}}function b(a,b){return a<<b|a>>>32-b}var o=Array();var p,q,r,s,t,u,v,w,x;var y=7,z=12,A=17,B=22;var C=5,D=9,E=14,F=20;var G=4,H=11,I=16,J=23;var K=6,L=10,M=15,N=21;a=n(a);o=l(a);u=1732584193;v=4023233417;w=2562383102;x=271733878;for(p=0;p<o.length;p+=16){q=u;r=v;s=w;t=x;u=h(u,v,w,x,o[p+0],y,3614090360);x=h(x,u,v,w,o[p+1],z,3905402710);w=h(w,x,u,v,o[p+2],A,606105819);v=h(v,w,x,u,o[p+3],B,3250441966);u=h(u,v,w,x,o[p+4],y,4118548399);x=h(x,u,v,w,o[p+5],z,1200080426);w=h(w,x,u,v,o[p+6],A,2821735955);v=h(v,w,x,u,o[p+7],B,4249261313);u=h(u,v,w,x,o[p+8],y,1770035416);x=h(x,u,v,w,o[p+9],z,2336552
 879);w=h(w,x,u,v,o[p+10],A,4294925233);v=h(v,w,x,u,o[p+11],B,2304563134);u=h(u,v,w,x,o[p+12],y,1804603682);x=h(x,u,v,w,o[p+13],z,4254626195);w=h(w,x,u,v,o[p+14],A,2792965006);v=h(v,w,x,u,o[p+15],B,1236535329);u=i(u,v,w,x,o[p+1],C,4129170786);x=i(x,u,v,w,o[p+6],D,3225465664);w=i(w,x,u,v,o[p+11],E,643717713);v=i(v,w,x,u,o[p+0],F,3921069994);u=i(u,v,w,x,o[p+5],C,3593408605);x=i(x,u,v,w,o[p+10],D,38016083);w=i(w,x,u,v,o[p+15],E,3634488961);v=i(v,w,x,u,o[p+4],F,3889429448);u=i(u,v,w,x,o[p+9],C,568446438);x=i(x,u,v,w,o[p+14],D,3275163606);w=i(w,x,u,v,o[p+3],E,4107603335);v=i(v,w,x,u,o[p+8],F,1163531501);u=i(u,v,w,x,o[p+13],C,2850285829);x=i(x,u,v,w,o[p+2],D,4243563512);w=i(w,x,u,v,o[p+7],E,1735328473);v=i(v,w,x,u,o[p+12],F,2368359562);u=j(u,v,w,x,o[p+5],G,4294588738);x=j(x,u,v,w,o[p+8],H,2272392833);w=j(w,x,u,v,o[p+11],I,1839030562);v=j(v,w,x,u,o[p+14],J,4259657740);u=j(u,v,w,x,o[p+1],G,2763975236);x=j(x,u,v,w,o[p+4],H,1272893353);w=j(w,x,u,v,o[p+7],I,4139469664);v=j(v,w,x,u,o[p+10],J,320
 0236656);u=j(u,v,w,x,o[p+13],G,681279174);x=j(x,u,v,w,o[p+0],H,3936430074);w=j(w,x,u,v,o[p+3],I,3572445317);v=j(v,w,x,u,o[p+6],J,76029189);u=j(u,v,w,x,o[p+9],G,3654602809);x=j(x,u,v,w,o[p+12],H,3873151461);w=j(w,x,u,v,o[p+15],I,530742520);v=j(v,w,x,u,o[p+2],J,3299628645);u=k(u,v,w,x,o[p+0],K,4096336452);x=k(x,u,v,w,o[p+7],L,1126891415);w=k(w,x,u,v,o[p+14],M,2878612391);v=k(v,w,x,u,o[p+5],N,4237533241);u=k(u,v,w,x,o[p+12],K,1700485571);x=k(x,u,v,w,o[p+3],L,2399980690);w=k(w,x,u,v,o[p+10],M,4293915773);v=k(v,w,x,u,o[p+1],N,2240044497);u=k(u,v,w,x,o[p+8],K,1873313359);x=k(x,u,v,w,o[p+15],L,4264355552);w=k(w,x,u,v,o[p+6],M,2734768916);v=k(v,w,x,u,o[p+13],N,1309151649);u=k(u,v,w,x,o[p+4],K,4149444226);x=k(x,u,v,w,o[p+11],L,3174756917);w=k(w,x,u,v,o[p+2],M,718787259);v=k(v,w,x,u,o[p+9],N,3951481745);u=c(u,q);v=c(v,r);w=c(w,s);x=c(x,t)}var O=m(u)+m(v)+m(w)+m(x);return O.toLowerCase()}
\ No newline at end of file


[18/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular-resource.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular-resource.js b/portal/js/libs/angular-1.2.5/angular-resource.js
new file mode 100755
index 0000000..b027925
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular-resource.js
@@ -0,0 +1,565 @@
+/**
+ * @license AngularJS v1.2.5
+ * (c) 2010-2014 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, angular, undefined) {'use strict';
+
+var $resourceMinErr = angular.$$minErr('$resource');
+
+// Helper functions and regex to lookup a dotted path on an object
+// stopping at undefined/null.  The path must be composed of ASCII
+// identifiers (just like $parse)
+var MEMBER_NAME_REGEX = /^(\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/;
+
+function isValidDottedPath(path) {
+  return (path != null && path !== '' && path !== 'hasOwnProperty' &&
+      MEMBER_NAME_REGEX.test('.' + path));
+}
+
+function lookupDottedPath(obj, path) {
+  if (!isValidDottedPath(path)) {
+    throw $resourceMinErr('badmember', 'Dotted member path "@{0}" is invalid.', path);
+  }
+  var keys = path.split('.');
+  for (var i = 0, ii = keys.length; i < ii && obj !== undefined; i++) {
+    var key = keys[i];
+    obj = (obj !== null) ? obj[key] : undefined;
+  }
+  return obj;
+}
+
+/**
+ * Create a shallow copy of an object and clear other fields from the destination
+ */
+function shallowClearAndCopy(src, dst) {
+  dst = dst || {};
+
+  angular.forEach(dst, function(value, key){
+    delete dst[key];
+  });
+
+  for (var key in src) {
+    if (src.hasOwnProperty(key) && key.substr(0, 2) !== '$$') {
+      dst[key] = src[key];
+    }
+  }
+
+  return dst;
+}
+
+/**
+ * @ngdoc overview
+ * @name ngResource
+ * @description
+ *
+ * # ngResource
+ *
+ * The `ngResource` module provides interaction support with RESTful services
+ * via the $resource service.
+ *
+ * {@installModule resource}
+ *
+ * <div doc-module-components="ngResource"></div>
+ *
+ * See {@link ngResource.$resource `$resource`} for usage.
+ */
+
+/**
+ * @ngdoc object
+ * @name ngResource.$resource
+ * @requires $http
+ *
+ * @description
+ * A factory which creates a resource object that lets you interact with
+ * [RESTful](http://en.wikipedia.org/wiki/Representational_State_Transfer) server-side data sources.
+ *
+ * The returned resource object has action methods which provide high-level behaviors without
+ * the need to interact with the low level {@link ng.$http $http} service.
+ *
+ * Requires the {@link ngResource `ngResource`} module to be installed.
+ *
+ * @param {string} url A parametrized URL template with parameters prefixed by `:` as in
+ *   `/user/:username`. If you are using a URL with a port number (e.g.
+ *   `http://example.com:8080/api`), it will be respected.
+ *
+ *   If you are using a url with a suffix, just add the suffix, like this:
+ *   `$resource('http://example.com/resource.json')` or `$resource('http://example.com/:id.json')`
+ *   or even `$resource('http://example.com/resource/:resource_id.:format')`
+ *   If the parameter before the suffix is empty, :resource_id in this case, then the `/.` will be
+ *   collapsed down to a single `.`.  If you need this sequence to appear and not collapse then you
+ *   can escape it with `/\.`.
+ *
+ * @param {Object=} paramDefaults Default values for `url` parameters. These can be overridden in
+ *   `actions` methods. If any of the parameter value is a function, it will be executed every time
+ *   when a param value needs to be obtained for a request (unless the param was overridden).
+ *
+ *   Each key value in the parameter object is first bound to url template if present and then any
+ *   excess keys are appended to the url search query after the `?`.
+ *
+ *   Given a template `/path/:verb` and parameter `{verb:'greet', salutation:'Hello'}` results in
+ *   URL `/path/greet?salutation=Hello`.
+ *
+ *   If the parameter value is prefixed with `@` then the value of that parameter is extracted from
+ *   the data object (useful for non-GET operations).
+ *
+ * @param {Object.<Object>=} actions Hash with declaration of custom action that should extend the
+ *   default set of resource actions. The declaration should be created in the format of {@link
+ *   ng.$http#usage_parameters $http.config}:
+ *
+ *       {action1: {method:?, params:?, isArray:?, headers:?, ...},
+ *        action2: {method:?, params:?, isArray:?, headers:?, ...},
+ *        ...}
+ *
+ *   Where:
+ *
+ *   - **`action`** – {string} – The name of action. This name becomes the name of the method on
+ *     your resource object.
+ *   - **`method`** – {string} – HTTP request method. Valid methods are: `GET`, `POST`, `PUT`,
+ *     `DELETE`, and `JSONP`.
+ *   - **`params`** – {Object=} – Optional set of pre-bound parameters for this action. If any of
+ *     the parameter value is a function, it will be executed every time when a param value needs to
+ *     be obtained for a request (unless the param was overridden).
+ *   - **`url`** – {string} – action specific `url` override. The url templating is supported just
+ *     like for the resource-level urls.
+ *   - **`isArray`** – {boolean=} – If true then the returned object for this action is an array,
+ *     see `returns` section.
+ *   - **`transformRequest`** –
+ *     `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –
+ *     transform function or an array of such functions. The transform function takes the http
+ *     request body and headers and returns its transformed (typically serialized) version.
+ *   - **`transformResponse`** –
+ *     `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –
+ *     transform function or an array of such functions. The transform function takes the http
+ *     response body and headers and returns its transformed (typically deserialized) version.
+ *   - **`cache`** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the
+ *     GET request, otherwise if a cache instance built with
+ *     {@link ng.$cacheFactory $cacheFactory}, this cache will be used for
+ *     caching.
+ *   - **`timeout`** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise} that
+ *     should abort the request when resolved.
+ *   - **`withCredentials`** - `{boolean}` - whether to set the `withCredentials` flag on the
+ *     XHR object. See {@link https://developer.mozilla.org/en/http_access_control#section_5
+ *     requests with credentials} for more information.
+ *   - **`responseType`** - `{string}` - see {@link
+ *     https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType requestType}.
+ *   - **`interceptor`** - `{Object=}` - The interceptor object has two optional methods -
+ *     `response` and `responseError`. Both `response` and `responseError` interceptors get called
+ *     with `http response` object. See {@link ng.$http $http interceptors}.
+ *
+ * @returns {Object} A resource "class" object with methods for the default set of resource actions
+ *   optionally extended with custom `actions`. The default set contains these actions:
+ *
+ *       { 'get':    {method:'GET'},
+ *         'save':   {method:'POST'},
+ *         'query':  {method:'GET', isArray:true},
+ *         'remove': {method:'DELETE'},
+ *         'delete': {method:'DELETE'} };
+ *
+ *   Calling these methods invoke an {@link ng.$http} with the specified http method,
+ *   destination and parameters. When the data is returned from the server then the object is an
+ *   instance of the resource class. The actions `save`, `remove` and `delete` are available on it
+ *   as  methods with the `$` prefix. This allows you to easily perform CRUD operations (create,
+ *   read, update, delete) on server-side data like this:
+ *   <pre>
+        var User = $resource('/user/:userId', {userId:'@id'});
+        var user = User.get({userId:123}, function() {
+          user.abc = true;
+          user.$save();
+        });
+     </pre>
+ *
+ *   It is important to realize that invoking a $resource object method immediately returns an
+ *   empty reference (object or array depending on `isArray`). Once the data is returned from the
+ *   server the existing reference is populated with the actual data. This is a useful trick since
+ *   usually the resource is assigned to a model which is then rendered by the view. Having an empty
+ *   object results in no rendering, once the data arrives from the server then the object is
+ *   populated with the data and the view automatically re-renders itself showing the new data. This
+ *   means that in most cases one never has to write a callback function for the action methods.
+ *
+ *   The action methods on the class object or instance object can be invoked with the following
+ *   parameters:
+ *
+ *   - HTTP GET "class" actions: `Resource.action([parameters], [success], [error])`
+ *   - non-GET "class" actions: `Resource.action([parameters], postData, [success], [error])`
+ *   - non-GET instance actions:  `instance.$action([parameters], [success], [error])`
+ *
+ *   Success callback is called with (value, responseHeaders) arguments. Error callback is called
+ *   with (httpResponse) argument.
+ *
+ *   Class actions return empty instance (with additional properties below).
+ *   Instance actions return promise of the action.
+ *
+ *   The Resource instances and collection have these additional properties:
+ *
+ *   - `$promise`: the {@link ng.$q promise} of the original server interaction that created this
+ *     instance or collection.
+ *
+ *     On success, the promise is resolved with the same resource instance or collection object,
+ *     updated with data from server. This makes it easy to use in
+ *     {@link ngRoute.$routeProvider resolve section of $routeProvider.when()} to defer view
+ *     rendering until the resource(s) are loaded.
+ *
+ *     On failure, the promise is resolved with the {@link ng.$http http response} object, without
+ *     the `resource` property.
+ *
+ *   - `$resolved`: `true` after first server interaction is completed (either with success or
+ *      rejection), `false` before that. Knowing if the Resource has been resolved is useful in
+ *      data-binding.
+ *
+ * @example
+ *
+ * # Credit card resource
+ *
+ * <pre>
+     // Define CreditCard class
+     var CreditCard = $resource('/user/:userId/card/:cardId',
+      {userId:123, cardId:'@id'}, {
+       charge: {method:'POST', params:{charge:true}}
+      });
+
+     // We can retrieve a collection from the server
+     var cards = CreditCard.query(function() {
+       // GET: /user/123/card
+       // server returns: [ {id:456, number:'1234', name:'Smith'} ];
+
+       var card = cards[0];
+       // each item is an instance of CreditCard
+       expect(card instanceof CreditCard).toEqual(true);
+       card.name = "J. Smith";
+       // non GET methods are mapped onto the instances
+       card.$save();
+       // POST: /user/123/card/456 {id:456, number:'1234', name:'J. Smith'}
+       // server returns: {id:456, number:'1234', name: 'J. Smith'};
+
+       // our custom method is mapped as well.
+       card.$charge({amount:9.99});
+       // POST: /user/123/card/456?amount=9.99&charge=true {id:456, number:'1234', name:'J. Smith'}
+     });
+
+     // we can create an instance as well
+     var newCard = new CreditCard({number:'0123'});
+     newCard.name = "Mike Smith";
+     newCard.$save();
+     // POST: /user/123/card {number:'0123', name:'Mike Smith'}
+     // server returns: {id:789, number:'01234', name: 'Mike Smith'};
+     expect(newCard.id).toEqual(789);
+ * </pre>
+ *
+ * The object returned from this function execution is a resource "class" which has "static" method
+ * for each action in the definition.
+ *
+ * Calling these methods invoke `$http` on the `url` template with the given `method`, `params` and
+ * `headers`.
+ * When the data is returned from the server then the object is an instance of the resource type and
+ * all of the non-GET methods are available with `$` prefix. This allows you to easily support CRUD
+ * operations (create, read, update, delete) on server-side data.
+
+   <pre>
+     var User = $resource('/user/:userId', {userId:'@id'});
+     var user = User.get({userId:123}, function() {
+       user.abc = true;
+       user.$save();
+     });
+   </pre>
+ *
+ * It's worth noting that the success callback for `get`, `query` and other methods gets passed
+ * in the response that came from the server as well as $http header getter function, so one
+ * could rewrite the above example and get access to http headers as:
+ *
+   <pre>
+     var User = $resource('/user/:userId', {userId:'@id'});
+     User.get({userId:123}, function(u, getResponseHeaders){
+       u.abc = true;
+       u.$save(function(u, putResponseHeaders) {
+         //u => saved user object
+         //putResponseHeaders => $http header getter
+       });
+     });
+   </pre>
+ */
+angular.module('ngResource', ['ng']).
+  factory('$resource', ['$http', '$q', function($http, $q) {
+
+    var DEFAULT_ACTIONS = {
+      'get':    {method:'GET'},
+      'save':   {method:'POST'},
+      'query':  {method:'GET', isArray:true},
+      'remove': {method:'DELETE'},
+      'delete': {method:'DELETE'}
+    };
+    var noop = angular.noop,
+        forEach = angular.forEach,
+        extend = angular.extend,
+        copy = angular.copy,
+        isFunction = angular.isFunction;
+
+    /**
+     * We need our custom method because encodeURIComponent is too aggressive and doesn't follow
+     * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path
+     * segments:
+     *    segment       = *pchar
+     *    pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
+     *    pct-encoded   = "%" HEXDIG HEXDIG
+     *    unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
+     *    sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
+     *                     / "*" / "+" / "," / ";" / "="
+     */
+    function encodeUriSegment(val) {
+      return encodeUriQuery(val, true).
+        replace(/%26/gi, '&').
+        replace(/%3D/gi, '=').
+        replace(/%2B/gi, '+');
+    }
+
+
+    /**
+     * This method is intended for encoding *key* or *value* parts of query component. We need a
+     * custom method because encodeURIComponent is too aggressive and encodes stuff that doesn't
+     * have to be encoded per http://tools.ietf.org/html/rfc3986:
+     *    query       = *( pchar / "/" / "?" )
+     *    pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
+     *    unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
+     *    pct-encoded   = "%" HEXDIG HEXDIG
+     *    sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
+     *                     / "*" / "+" / "," / ";" / "="
+     */
+    function encodeUriQuery(val, pctEncodeSpaces) {
+      return encodeURIComponent(val).
+        replace(/%40/gi, '@').
+        replace(/%3A/gi, ':').
+        replace(/%24/g, '$').
+        replace(/%2C/gi, ',').
+        replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));
+    }
+
+    function Route(template, defaults) {
+      this.template = template;
+      this.defaults = defaults || {};
+      this.urlParams = {};
+    }
+
+    Route.prototype = {
+      setUrlParams: function(config, params, actionUrl) {
+        var self = this,
+            url = actionUrl || self.template,
+            val,
+            encodedVal;
+
+        var urlParams = self.urlParams = {};
+        forEach(url.split(/\W/), function(param){
+          if (param === 'hasOwnProperty') {
+            throw $resourceMinErr('badname', "hasOwnProperty is not a valid parameter name.");
+          }
+          if (!(new RegExp("^\\d+$").test(param)) && param &&
+               (new RegExp("(^|[^\\\\]):" + param + "(\\W|$)").test(url))) {
+            urlParams[param] = true;
+          }
+        });
+        url = url.replace(/\\:/g, ':');
+
+        params = params || {};
+        forEach(self.urlParams, function(_, urlParam){
+          val = params.hasOwnProperty(urlParam) ? params[urlParam] : self.defaults[urlParam];
+          if (angular.isDefined(val) && val !== null) {
+            encodedVal = encodeUriSegment(val);
+            url = url.replace(new RegExp(":" + urlParam + "(\\W|$)", "g"), encodedVal + "$1");
+          } else {
+            url = url.replace(new RegExp("(\/?):" + urlParam + "(\\W|$)", "g"), function(match,
+                leadingSlashes, tail) {
+              if (tail.charAt(0) == '/') {
+                return tail;
+              } else {
+                return leadingSlashes + tail;
+              }
+            });
+          }
+        });
+
+        // strip trailing slashes and set the url
+        url = url.replace(/\/+$/, '');
+        // then replace collapse `/.` if found in the last URL path segment before the query
+        // E.g. `http://url.com/id./format?q=x` becomes `http://url.com/id.format?q=x`
+        url = url.replace(/\/\.(?=\w+($|\?))/, '.');
+        // replace escaped `/\.` with `/.`
+        config.url = url.replace(/\/\\\./, '/.');
+
+
+        // set params - delegate param encoding to $http
+        forEach(params, function(value, key){
+          if (!self.urlParams[key]) {
+            config.params = config.params || {};
+            config.params[key] = value;
+          }
+        });
+      }
+    };
+
+
+    function resourceFactory(url, paramDefaults, actions) {
+      var route = new Route(url);
+
+      actions = extend({}, DEFAULT_ACTIONS, actions);
+
+      function extractParams(data, actionParams){
+        var ids = {};
+        actionParams = extend({}, paramDefaults, actionParams);
+        forEach(actionParams, function(value, key){
+          if (isFunction(value)) { value = value(); }
+          ids[key] = value && value.charAt && value.charAt(0) == '@' ?
+            lookupDottedPath(data, value.substr(1)) : value;
+        });
+        return ids;
+      }
+
+      function defaultResponseInterceptor(response) {
+        return response.resource;
+      }
+
+      function Resource(value){
+        shallowClearAndCopy(value || {}, this);
+      }
+
+      forEach(actions, function(action, name) {
+        var hasBody = /^(POST|PUT|PATCH)$/i.test(action.method);
+
+        Resource[name] = function(a1, a2, a3, a4) {
+          var params = {}, data, success, error;
+
+          /* jshint -W086 */ /* (purposefully fall through case statements) */
+          switch(arguments.length) {
+          case 4:
+            error = a4;
+            success = a3;
+            //fallthrough
+          case 3:
+          case 2:
+            if (isFunction(a2)) {
+              if (isFunction(a1)) {
+                success = a1;
+                error = a2;
+                break;
+              }
+
+              success = a2;
+              error = a3;
+              //fallthrough
+            } else {
+              params = a1;
+              data = a2;
+              success = a3;
+              break;
+            }
+          case 1:
+            if (isFunction(a1)) success = a1;
+            else if (hasBody) data = a1;
+            else params = a1;
+            break;
+          case 0: break;
+          default:
+            throw $resourceMinErr('badargs',
+              "Expected up to 4 arguments [params, data, success, error], got {0} arguments",
+              arguments.length);
+          }
+          /* jshint +W086 */ /* (purposefully fall through case statements) */
+
+          var isInstanceCall = this instanceof Resource;
+          var value = isInstanceCall ? data : (action.isArray ? [] : new Resource(data));
+          var httpConfig = {};
+          var responseInterceptor = action.interceptor && action.interceptor.response ||
+                                    defaultResponseInterceptor;
+          var responseErrorInterceptor = action.interceptor && action.interceptor.responseError ||
+                                    undefined;
+
+          forEach(action, function(value, key) {
+            if (key != 'params' && key != 'isArray' && key != 'interceptor') {
+              httpConfig[key] = copy(value);
+            }
+          });
+
+          if (hasBody) httpConfig.data = data;
+          route.setUrlParams(httpConfig,
+                             extend({}, extractParams(data, action.params || {}), params),
+                             action.url);
+
+          var promise = $http(httpConfig).then(function(response) {
+            var data = response.data,
+                promise = value.$promise;
+
+            if (data) {
+              // Need to convert action.isArray to boolean in case it is undefined
+              // jshint -W018
+              if (angular.isArray(data) !== (!!action.isArray)) {
+                throw $resourceMinErr('badcfg', 'Error in resource configuration. Expected ' +
+                  'response to contain an {0} but got an {1}',
+                  action.isArray?'array':'object', angular.isArray(data)?'array':'object');
+              }
+              // jshint +W018
+              if (action.isArray) {
+                value.length = 0;
+                forEach(data, function(item) {
+                  value.push(new Resource(item));
+                });
+              } else {
+                shallowClearAndCopy(data, value);
+                value.$promise = promise;
+              }
+            }
+
+            value.$resolved = true;
+
+            response.resource = value;
+
+            return response;
+          }, function(response) {
+            value.$resolved = true;
+
+            (error||noop)(response);
+
+            return $q.reject(response);
+          });
+
+          promise = promise.then(
+              function(response) {
+                var value = responseInterceptor(response);
+                (success||noop)(value, response.headers);
+                return value;
+              },
+              responseErrorInterceptor);
+
+          if (!isInstanceCall) {
+            // we are creating instance / collection
+            // - set the initial promise
+            // - return the instance / collection
+            value.$promise = promise;
+            value.$resolved = false;
+
+            return value;
+          }
+
+          // instance call
+          return promise;
+        };
+
+
+        Resource.prototype['$' + name] = function(params, success, error) {
+          if (isFunction(params)) {
+            error = success; success = params; params = {};
+          }
+          var result = Resource[name].call(this, params, this, success, error);
+          return result.$promise || result;
+        };
+      });
+
+      Resource.bind = function(additionalParamDefaults){
+        return resourceFactory(url, extend({}, paramDefaults, additionalParamDefaults), actions);
+      };
+
+      return Resource;
+    }
+
+    return resourceFactory;
+  }]);
+
+
+})(window, window.angular);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular-resource.min.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular-resource.min.js b/portal/js/libs/angular-1.2.5/angular-resource.min.js
new file mode 100755
index 0000000..e1bb723
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular-resource.min.js
@@ -0,0 +1,13 @@
+/*
+ AngularJS v1.2.5
+ (c) 2010-2014 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(H,a,z){'use strict';function C(q,l){l=l||{};a.forEach(l,function(a,h){delete l[h]});for(var h in q)q.hasOwnProperty(h)&&"$$"!==h.substr(0,2)&&(l[h]=q[h]);return l}var v=a.$$minErr("$resource"),B=/^(\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/;a.module("ngResource",["ng"]).factory("$resource",["$http","$q",function(q,l){function h(a,k){this.template=a;this.defaults=k||{};this.urlParams={}}function t(m,k,n){function E(c,d){var e={};d=w({},k,d);s(d,function(b,d){u(b)&&(b=b());var g;if(b&&b.charAt&&"@"==
+b.charAt(0)){g=c;var a=b.substr(1);if(null==a||""===a||"hasOwnProperty"===a||!B.test("."+a))throw v("badmember",a);for(var a=a.split("."),f=0,k=a.length;f<k&&g!==z;f++){var h=a[f];g=null!==g?g[h]:z}}else g=b;e[d]=g});return e}function e(a){return a.resource}function f(a){C(a||{},this)}var F=new h(m);n=w({},A,n);s(n,function(c,d){var k=/^(POST|PUT|PATCH)$/i.test(c.method);f[d]=function(b,d,g,h){var r={},m,n,x;switch(arguments.length){case 4:x=h,n=g;case 3:case 2:if(u(d)){if(u(b)){n=b;x=d;break}n=d;
+x=g}else{r=b;m=d;n=g;break}case 1:u(b)?n=b:k?m=b:r=b;break;case 0:break;default:throw v("badargs",arguments.length);}var t=this instanceof f,p=t?m:c.isArray?[]:new f(m),y={},A=c.interceptor&&c.interceptor.response||e,B=c.interceptor&&c.interceptor.responseError||z;s(c,function(a,b){"params"!=b&&("isArray"!=b&&"interceptor"!=b)&&(y[b]=G(a))});k&&(y.data=m);F.setUrlParams(y,w({},E(m,c.params||{}),r),c.url);r=q(y).then(function(b){var d=b.data,g=p.$promise;if(d){if(a.isArray(d)!==!!c.isArray)throw v("badcfg",
+c.isArray?"array":"object",a.isArray(d)?"array":"object");c.isArray?(p.length=0,s(d,function(b){p.push(new f(b))})):(C(d,p),p.$promise=g)}p.$resolved=!0;b.resource=p;return b},function(b){p.$resolved=!0;(x||D)(b);return l.reject(b)});r=r.then(function(b){var a=A(b);(n||D)(a,b.headers);return a},B);return t?r:(p.$promise=r,p.$resolved=!1,p)};f.prototype["$"+d]=function(b,a,g){u(b)&&(g=a,a=b,b={});b=f[d].call(this,b,this,a,g);return b.$promise||b}});f.bind=function(a){return t(m,w({},k,a),n)};return f}
+var A={get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}},D=a.noop,s=a.forEach,w=a.extend,G=a.copy,u=a.isFunction;h.prototype={setUrlParams:function(m,k,h){var l=this,e=h||l.template,f,q,c=l.urlParams={};s(e.split(/\W/),function(a){if("hasOwnProperty"===a)throw v("badname");!/^\d+$/.test(a)&&(a&&RegExp("(^|[^\\\\]):"+a+"(\\W|$)").test(e))&&(c[a]=!0)});e=e.replace(/\\:/g,":");k=k||{};s(l.urlParams,function(d,c){f=k.hasOwnProperty(c)?
+k[c]:l.defaults[c];a.isDefined(f)&&null!==f?(q=encodeURIComponent(f).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"%20").replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+"),e=e.replace(RegExp(":"+c+"(\\W|$)","g"),q+"$1")):e=e.replace(RegExp("(/?):"+c+"(\\W|$)","g"),function(a,d,c){return"/"==c.charAt(0)?c:d+c})});e=e.replace(/\/+$/,"");e=e.replace(/\/\.(?=\w+($|\?))/,".");m.url=e.replace(/\/\\\./,"/.");s(k,function(a,c){l.urlParams[c]||
+(m.params=m.params||{},m.params[c]=a)})}};return t}])})(window,window.angular);
+//# sourceMappingURL=angular-resource.min.js.map

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular-resource.min.js.map
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular-resource.min.js.map b/portal/js/libs/angular-1.2.5/angular-resource.min.js.map
new file mode 100755
index 0000000..dfbb687
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular-resource.min.js.map
@@ -0,0 +1,8 @@
+{
+"version":3,
+"file":"angular-resource.min.js",
+"lineCount":12,
+"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CA6BtCC,QAASA,EAAmB,CAACC,CAAD,CAAMC,CAAN,CAAW,CACrCA,CAAA,CAAMA,CAAN,EAAa,EAEbJ,EAAAK,QAAA,CAAgBD,CAAhB,CAAqB,QAAQ,CAACE,CAAD,CAAQC,CAAR,CAAY,CACvC,OAAOH,CAAA,CAAIG,CAAJ,CADgC,CAAzC,CAIA,KAAKA,IAAIA,CAAT,GAAgBJ,EAAhB,CACMA,CAAAK,eAAA,CAAmBD,CAAnB,CAAJ,EAAoD,IAApD,GAA+BA,CAAAE,OAAA,CAAW,CAAX,CAAc,CAAd,CAA/B,GACEL,CAAA,CAAIG,CAAJ,CADF,CACaJ,CAAA,CAAII,CAAJ,CADb,CAKF,OAAOH,EAb8B,CA3BvC,IAAIM,EAAkBV,CAAAW,SAAA,CAAiB,WAAjB,CAAtB,CAKIC,EAAoB,iCA4QxBZ,EAAAa,OAAA,CAAe,YAAf,CAA6B,CAAC,IAAD,CAA7B,CAAAC,QAAA,CACU,WADV,CACuB,CAAC,OAAD,CAAU,IAAV,CAAgB,QAAQ,CAACC,CAAD,CAAQC,CAAR,CAAY,CAsDvDC,QAASA,EAAK,CAACC,CAAD,CAAWC,CAAX,CAAqB,CACjC,IAAAD,SAAA,CAAgBA,CAChB,KAAAC,SAAA,CAAgBA,CAAhB,EAA4B,EAC5B,KAAAC,UAAA,CAAiB,EAHgB,CA+DnCC,QAASA,EAAe,CAACC,CAAD,CAAMC,CAAN,CAAqBC,CAArB,CAA8B,CAKpDC,QAASA,EAAa,CAACC,CAAD,CAAOC,CAAP,CAAoB,CACxC,IAAIC,EAAM,EACVD,EAAA,CAAeE,CAAA,CAAO,EAAP,CAAWN,CAAX,CAA0BI,CAA1B,CACftB,EAAA,CAAQsB,CAAR,CAAsB,QAAQ,
 CAACrB,CAAD,CAAQC,CAAR,CAAY,CACpCuB,CAAA,CAAWxB,CAAX,CAAJ,GAAyBA,CAAzB,CAAiCA,CAAA,EAAjC,CACW,KAAA,CAAA,IAAAA,CAAA,EAASA,CAAAyB,OAAT,EAA4C,GAA5C;AAAyBzB,CAAAyB,OAAA,CAAa,CAAb,CAAzB,CAAA,CACT,CAAA,CAAA,CAAA,KAAA,EAAA,CAAA,OAAA,CAAA,CAAA,CArYV,IALgB,IAKhB,EAAuBC,CAAvB,EALiC,EAKjC,GAAuBA,CAAvB,EALgD,gBAKhD,GAAuBA,CAAvB,EAJI,CAAApB,CAAAqB,KAAA,CAAuB,GAAvB,CAImBD,CAJnB,CAIJ,CACE,KAAMtB,EAAA,CAAgB,WAAhB,CAAsEsB,CAAtE,CAAN,CAGF,IADIE,IAAAA,EAAOF,CAAAG,MAAA,CAAW,GAAX,CAAPD,CACKE,EAAI,CADTF,CACYG,EAAKH,CAAAI,OAArB,CAAkCF,CAAlC,CAAsCC,CAAtC,EAA4CE,CAA5C,GAAoDtC,CAApD,CAA+DmC,CAAA,EAA/D,CAAoE,CAClE,IAAI7B,EAAM2B,CAAA,CAAKE,CAAL,CACVG,EAAA,CAAe,IAAT,GAACA,CAAD,CAAiBA,CAAA,CAAIhC,CAAJ,CAAjB,CAA4BN,CAFgC,CAgYjD,CAAA,IACiCK,EAAAA,CAAAA,CAD5CsB,EAAA,CAAIrB,CAAJ,CAAA,CAAW,CAF6B,CAA1C,CAKA,OAAOqB,EARiC,CAW1CY,QAASA,EAA0B,CAACC,CAAD,CAAW,CAC5C,MAAOA,EAAAC,SADqC,CAI9CC,QAASA,EAAQ,CAACrC,CAAD,CAAO,CACtBJ,CAAA,CAAoBI,CAApB,EAA6B,EAA7B,CAAiC,IAAjC,CADsB,CAnBxB,IAAIsC,EAAQ,IAAI3B,CAAJ,CAAUK,CAAV,CAEZE,EAAA
 ,CAAUK,CAAA,CAAO,EAAP,CAAWgB,CAAX,CAA4BrB,CAA5B,CAqBVnB,EAAA,CAAQmB,CAAR,CAAiB,QAAQ,CAACsB,CAAD,CAASC,CAAT,CAAe,CACtC,IAAIC,EAAU,qBAAAf,KAAA,CAA2Ba,CAAAG,OAA3B,CAEdN,EAAA,CAASI,CAAT,CAAA,CAAiB,QAAQ,CAACG,CAAD,CAAKC,CAAL,CAASC,CAAT,CAAaC,CAAb,CAAiB,CAAA,IACpCC,EAAS,EAD2B,CACvB5B,CADuB,CACjB6B,CADiB,CACRC,CAGhC,QAAOC,SAAAnB,OAAP,EACA,KAAK,CAAL,CACEkB,CACA,CADQH,CACR,CAAAE,CAAA,CAAUH,CAEZ,MAAK,CAAL,CACA,KAAK,CAAL,CACE,GAAItB,CAAA,CAAWqB,CAAX,CAAJ,CAAoB,CAClB,GAAIrB,CAAA,CAAWoB,CAAX,CAAJ,CAAoB,CAClBK,CAAA,CAAUL,CACVM,EAAA,CAAQL,CACR,MAHkB,CAMpBI,CAAA,CAAUJ,CACVK;CAAA,CAAQJ,CARU,CAApB,IAUO,CACLE,CAAA,CAASJ,CACTxB,EAAA,CAAOyB,CACPI,EAAA,CAAUH,CACV,MAJK,CAMT,KAAK,CAAL,CACMtB,CAAA,CAAWoB,CAAX,CAAJ,CAAoBK,CAApB,CAA8BL,CAA9B,CACSF,CAAJ,CAAatB,CAAb,CAAoBwB,CAApB,CACAI,CADA,CACSJ,CACd,MACF,MAAK,CAAL,CAAQ,KACR,SACE,KAAMxC,EAAA,CAAgB,SAAhB,CAEJ+C,SAAAnB,OAFI,CAAN,CA9BF,CAoCA,IAAIoB,EAAiB,IAAjBA,WAAiCf,EAArC,CACIrC,EAAQoD,CAAA,CAAiBhC,CAAjB,CAAyBoB,CAAAa,QAAA,CAAiB,EAAjB,CAAsB,IAAIhB,CAAJ,CAAajB,C
 AAb,CAD3D,CAEIkC,EAAa,EAFjB,CAGIC,EAAsBf,CAAAgB,YAAtBD,EAA4Cf,CAAAgB,YAAArB,SAA5CoB,EACsBrB,CAJ1B,CAKIuB,EAA2BjB,CAAAgB,YAA3BC,EAAiDjB,CAAAgB,YAAAE,cAAjDD,EACsB9D,CAE1BI,EAAA,CAAQyC,CAAR,CAAgB,QAAQ,CAACxC,CAAD,CAAQC,CAAR,CAAa,CACxB,QAAX,EAAIA,CAAJ,GAA8B,SAA9B,EAAuBA,CAAvB,EAAkD,aAAlD,EAA2CA,CAA3C,IACEqD,CAAA,CAAWrD,CAAX,CADF,CACoB0D,CAAA,CAAK3D,CAAL,CADpB,CADmC,CAArC,CAMI0C,EAAJ,GAAaY,CAAAlC,KAAb,CAA+BA,CAA/B,CACAkB,EAAAsB,aAAA,CAAmBN,CAAnB,CACmB/B,CAAA,CAAO,EAAP,CAAWJ,CAAA,CAAcC,CAAd,CAAoBoB,CAAAQ,OAApB,EAAqC,EAArC,CAAX,CAAqDA,CAArD,CADnB,CAEmBR,CAAAxB,IAFnB,CAII6C,EAAAA,CAAUpD,CAAA,CAAM6C,CAAN,CAAAQ,KAAA,CAAuB,QAAQ,CAAC3B,CAAD,CAAW,CAAA,IAClDf,EAAOe,CAAAf,KAD2C,CAElDyC,EAAU7D,CAAA+D,SAEd,IAAI3C,CAAJ,CAAU,CAGR,GAAI1B,CAAA2D,QAAA,CAAgBjC,CAAhB,CAAJ,GAA+B,CAAC,CAACoB,CAAAa,QAAjC,CACE,KAAMjD,EAAA,CAAgB,QAAhB;AAEJoC,CAAAa,QAAA,CAAe,OAAf,CAAuB,QAFnB,CAE6B3D,CAAA2D,QAAA,CAAgBjC,CAAhB,CAAA,CAAsB,OAAtB,CAA8B,QAF3D,CAAN,CAKEoB,CAAAa,QAAJ,EACErD,CAAAgC,OACA,CADe,CACf,CAAAjC,CAAA,CAAQqB,CAAR,
 CAAc,QAAQ,CAAC4C,CAAD,CAAO,CAC3BhE,CAAAiE,KAAA,CAAW,IAAI5B,CAAJ,CAAa2B,CAAb,CAAX,CAD2B,CAA7B,CAFF,GAMEpE,CAAA,CAAoBwB,CAApB,CAA0BpB,CAA1B,CACA,CAAAA,CAAA+D,SAAA,CAAiBF,CAPnB,CATQ,CAoBV7D,CAAAkE,UAAA,CAAkB,CAAA,CAElB/B,EAAAC,SAAA,CAAoBpC,CAEpB,OAAOmC,EA5B+C,CAA1C,CA6BX,QAAQ,CAACA,CAAD,CAAW,CACpBnC,CAAAkE,UAAA,CAAkB,CAAA,CAEjB,EAAAhB,CAAA,EAAOiB,CAAP,EAAahC,CAAb,CAED,OAAOzB,EAAA0D,OAAA,CAAUjC,CAAV,CALa,CA7BR,CAqCd0B,EAAA,CAAUA,CAAAC,KAAA,CACN,QAAQ,CAAC3B,CAAD,CAAW,CACjB,IAAInC,EAAQuD,CAAA,CAAoBpB,CAApB,CACX,EAAAc,CAAA,EAASkB,CAAT,EAAenE,CAAf,CAAsBmC,CAAAkC,QAAtB,CACD,OAAOrE,EAHU,CADb,CAMNyD,CANM,CAQV,OAAKL,EAAL,CAWOS,CAXP,EAIE7D,CAAA+D,SAGO/D,CAHU6D,CAGV7D,CAFPA,CAAAkE,UAEOlE,CAFW,CAAA,CAEXA,CAAAA,CAPT,CAxGwC,CAuH1CqC,EAAAiC,UAAA,CAAmB,GAAnB,CAAyB7B,CAAzB,CAAA,CAAiC,QAAQ,CAACO,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAAyB,CAC5D1B,CAAA,CAAWwB,CAAX,CAAJ,GACEE,CAAmC,CAA3BD,CAA2B,CAAlBA,CAAkB,CAARD,CAAQ,CAAAA,CAAA,CAAS,EAD9C,CAGIuB,EAAAA,CAASlC,CAAA,CAASI,CAAT,CAAA+B,KAAA,CAAoB,IAApB,CAA0BxB,CAA1B,C
 AAkC,IAAlC,CAAwCC,CAAxC,CAAiDC,CAAjD,CACb,OAAOqB,EAAAR,SAAP,EAA0BQ,CALsC,CA1H5B,CAAxC,CAmIAlC,EAAAoC,KAAA,CAAgBC,QAAQ,CAACC,CAAD,CAAyB,CAC/C,MAAO5D,EAAA,CAAgBC,CAAhB,CAAqBO,CAAA,CAAO,EAAP,CAAWN,CAAX,CAA0B0D,CAA1B,CAArB,CAAyEzD,CAAzE,CADwC,CAIjD,OAAOmB,EA/J6C,CArHC;AAEvD,IAAIE,EAAkB,KACV,QAAQ,KAAR,CADU,MAEV,QAAQ,MAAR,CAFU,OAGV,QAAQ,KAAR,SAAuB,CAAA,CAAvB,CAHU,QAIV,QAAQ,QAAR,CAJU,CAKpB,QALoB,CAKV,QAAQ,QAAR,CALU,CAAtB,CAOI4B,EAAOzE,CAAAyE,KAPX,CAQIpE,EAAUL,CAAAK,QARd,CASIwB,EAAS7B,CAAA6B,OATb,CAUIoC,EAAOjE,CAAAiE,KAVX,CAWInC,EAAa9B,CAAA8B,WA+CjBb,EAAA2D,UAAA,CAAkB,cACFV,QAAQ,CAACgB,CAAD,CAAS5B,CAAT,CAAiB6B,CAAjB,CAA4B,CAAA,IAC5CC,EAAO,IADqC,CAE5C9D,EAAM6D,CAAN7D,EAAmB8D,CAAAlE,SAFyB,CAG5CmE,CAH4C,CAI5CC,CAJ4C,CAM5ClE,EAAYgE,CAAAhE,UAAZA,CAA6B,EACjCf,EAAA,CAAQiB,CAAAa,MAAA,CAAU,IAAV,CAAR,CAAyB,QAAQ,CAACoD,CAAD,CAAO,CACtC,GAAc,gBAAd,GAAIA,CAAJ,CACE,KAAM7E,EAAA,CAAgB,SAAhB,CAAN,CAEI,CAAA,OAAAuB,KAAA,CAA0BsD,CAA1B,CAAN,GAA2CA,CAA3C,EACUC,MAAJ,CAAW,cAAX,CAA4BD,CAA5B,CAAoC,SAApC,CAAAtD,KAAA,C
 AAoDX,CAApD,CADN,IAEEF,CAAA,CAAUmE,CAAV,CAFF,CAEqB,CAAA,CAFrB,CAJsC,CAAxC,CASAjE,EAAA,CAAMA,CAAAmE,QAAA,CAAY,MAAZ,CAAoB,GAApB,CAENnC,EAAA,CAASA,CAAT,EAAmB,EACnBjD,EAAA,CAAQ+E,CAAAhE,UAAR,CAAwB,QAAQ,CAACsE,CAAD,CAAIC,CAAJ,CAAa,CAC3CN,CAAA,CAAM/B,CAAA9C,eAAA,CAAsBmF,CAAtB,CAAA;AAAkCrC,CAAA,CAAOqC,CAAP,CAAlC,CAAqDP,CAAAjE,SAAA,CAAcwE,CAAd,CACvD3F,EAAA4F,UAAA,CAAkBP,CAAlB,CAAJ,EAAsC,IAAtC,GAA8BA,CAA9B,EACEC,CACA,CAtCCO,kBAAA,CAqC6BR,CArC7B,CAAAI,QAAA,CACG,OADH,CACY,GADZ,CAAAA,QAAA,CAEG,OAFH,CAEY,GAFZ,CAAAA,QAAA,CAGG,MAHH,CAGW,GAHX,CAAAA,QAAA,CAIG,OAJH,CAIY,GAJZ,CAAAA,QAAA,CAKG,MALH,CAK8B,KAL9B,CAnBAA,QAAA,CACG,OADH,CACY,GADZ,CAAAA,QAAA,CAEG,OAFH,CAEY,GAFZ,CAAAA,QAAA,CAGG,OAHH,CAGY,GAHZ,CAyDD,CAAAnE,CAAA,CAAMA,CAAAmE,QAAA,CAAgBD,MAAJ,CAAW,GAAX,CAAiBG,CAAjB,CAA4B,SAA5B,CAAuC,GAAvC,CAAZ,CAAyDL,CAAzD,CAAsE,IAAtE,CAFR,EAIEhE,CAJF,CAIQA,CAAAmE,QAAA,CAAgBD,MAAJ,CAAW,OAAX,CAAsBG,CAAtB,CAAiC,SAAjC,CAA4C,GAA5C,CAAZ,CAA8D,QAAQ,CAACG,CAAD,CACxEC,CADwE,CACxDC,CADwD,CAClD,CACxB,MAAsB,GAAtB,EAAIA,CAAA
 jE,OAAA,CAAY,CAAZ,CAAJ,CACSiE,CADT,CAGSD,CAHT,CAG0BC,CAJF,CADpB,CANmC,CAA7C,CAkBA1E,EAAA,CAAMA,CAAAmE,QAAA,CAAY,MAAZ,CAAoB,EAApB,CAGNnE,EAAA,CAAMA,CAAAmE,QAAA,CAAY,mBAAZ,CAAiC,GAAjC,CAENP,EAAA5D,IAAA,CAAaA,CAAAmE,QAAA,CAAY,QAAZ,CAAsB,IAAtB,CAIbpF,EAAA,CAAQiD,CAAR,CAAgB,QAAQ,CAAChD,CAAD,CAAQC,CAAR,CAAY,CAC7B6E,CAAAhE,UAAA,CAAeb,CAAf,CAAL;CACE2E,CAAA5B,OACA,CADgB4B,CAAA5B,OAChB,EADiC,EACjC,CAAA4B,CAAA5B,OAAA,CAAc/C,CAAd,CAAA,CAAqBD,CAFvB,CADkC,CAApC,CA9CgD,CADlC,CA2NlB,OAAOe,EAvRgD,CAApC,CADvB,CAnRsC,CAArC,CAAA,CA+iBEtB,MA/iBF,CA+iBUA,MAAAC,QA/iBV;",
+"sources":["angular-resource.js"],
+"names":["window","angular","undefined","shallowClearAndCopy","src","dst","forEach","value","key","hasOwnProperty","substr","$resourceMinErr","$$minErr","MEMBER_NAME_REGEX","module","factory","$http","$q","Route","template","defaults","urlParams","resourceFactory","url","paramDefaults","actions","extractParams","data","actionParams","ids","extend","isFunction","charAt","path","test","keys","split","i","ii","length","obj","defaultResponseInterceptor","response","resource","Resource","route","DEFAULT_ACTIONS","action","name","hasBody","method","a1","a2","a3","a4","params","success","error","arguments","isInstanceCall","isArray","httpConfig","responseInterceptor","interceptor","responseErrorInterceptor","responseError","copy","setUrlParams","promise","then","$promise","item","push","$resolved","noop","reject","headers","prototype","result","call","bind","Resource.bind","additionalParamDefaults","config","actionUrl","self","val","encodedVal","param","RegExp","replace","_","urlParam","is
 Defined","encodeURIComponent","match","leadingSlashes","tail"]
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular-route.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular-route.js b/portal/js/libs/angular-1.2.5/angular-route.js
new file mode 100755
index 0000000..dbe6eca
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular-route.js
@@ -0,0 +1,911 @@
+/**
+ * @license AngularJS v1.2.5
+ * (c) 2010-2014 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, angular, undefined) {'use strict';
+
+/**
+ * @ngdoc overview
+ * @name ngRoute
+ * @description
+ *
+ * # ngRoute
+ *
+ * The `ngRoute` module provides routing and deeplinking services and directives for angular apps.
+ *
+ * ## Example
+ * See {@link ngRoute.$route#example $route} for an example of configuring and using `ngRoute`.
+ * 
+ * {@installModule route}
+ *
+ * <div doc-module-components="ngRoute"></div>
+ */
+ /* global -ngRouteModule */
+var ngRouteModule = angular.module('ngRoute', ['ng']).
+                        provider('$route', $RouteProvider);
+
+/**
+ * @ngdoc object
+ * @name ngRoute.$routeProvider
+ * @function
+ *
+ * @description
+ *
+ * Used for configuring routes.
+ * 
+ * ## Example
+ * See {@link ngRoute.$route#example $route} for an example of configuring and using `ngRoute`.
+ *
+ * ## Dependencies
+ * Requires the {@link ngRoute `ngRoute`} module to be installed.
+ */
+function $RouteProvider(){
+  function inherit(parent, extra) {
+    return angular.extend(new (angular.extend(function() {}, {prototype:parent}))(), extra);
+  }
+
+  var routes = {};
+
+  /**
+   * @ngdoc method
+   * @name ngRoute.$routeProvider#when
+   * @methodOf ngRoute.$routeProvider
+   *
+   * @param {string} path Route path (matched against `$location.path`). If `$location.path`
+   *    contains redundant trailing slash or is missing one, the route will still match and the
+   *    `$location.path` will be updated to add or drop the trailing slash to exactly match the
+   *    route definition.
+   *
+   *      * `path` can contain named groups starting with a colon: e.g. `:name`. All characters up
+   *        to the next slash are matched and stored in `$routeParams` under the given `name`
+   *        when the route matches.
+   *      * `path` can contain named groups starting with a colon and ending with a star:
+   *        e.g.`:name*`. All characters are eagerly stored in `$routeParams` under the given `name`
+   *        when the route matches.
+   *      * `path` can contain optional named groups with a question mark: e.g.`:name?`.
+   *
+   *    For example, routes like `/color/:color/largecode/:largecode*\/edit` will match
+   *    `/color/brown/largecode/code/with/slashs/edit` and extract:
+   *
+   *      * `color: brown`
+   *      * `largecode: code/with/slashs`.
+   *
+   *
+   * @param {Object} route Mapping information to be assigned to `$route.current` on route
+   *    match.
+   *
+   *    Object properties:
+   *
+   *    - `controller` – `{(string|function()=}` – Controller fn that should be associated with
+   *      newly created scope or the name of a {@link angular.Module#controller registered
+   *      controller} if passed as a string.
+   *    - `controllerAs` – `{string=}` – A controller alias name. If present the controller will be
+   *      published to scope under the `controllerAs` name.
+   *    - `template` – `{string=|function()=}` – html template as a string or a function that
+   *      returns an html template as a string which should be used by {@link
+   *      ngRoute.directive:ngView ngView} or {@link ng.directive:ngInclude ngInclude} directives.
+   *      This property takes precedence over `templateUrl`.
+   *
+   *      If `template` is a function, it will be called with the following parameters:
+   *
+   *      - `{Array.<Object>}` - route parameters extracted from the current
+   *        `$location.path()` by applying the current route
+   *
+   *    - `templateUrl` – `{string=|function()=}` – path or function that returns a path to an html
+   *      template that should be used by {@link ngRoute.directive:ngView ngView}.
+   *
+   *      If `templateUrl` is a function, it will be called with the following parameters:
+   *
+   *      - `{Array.<Object>}` - route parameters extracted from the current
+   *        `$location.path()` by applying the current route
+   *
+   *    - `resolve` - `{Object.<string, function>=}` - An optional map of dependencies which should
+   *      be injected into the controller. If any of these dependencies are promises, the router
+   *      will wait for them all to be resolved or one to be rejected before the controller is
+   *      instantiated.
+   *      If all the promises are resolved successfully, the values of the resolved promises are
+   *      injected and {@link ngRoute.$route#$routeChangeSuccess $routeChangeSuccess} event is
+   *      fired. If any of the promises are rejected the
+   *      {@link ngRoute.$route#$routeChangeError $routeChangeError} event is fired. The map object
+   *      is:
+   *
+   *      - `key` – `{string}`: a name of a dependency to be injected into the controller.
+   *      - `factory` - `{string|function}`: If `string` then it is an alias for a service.
+   *        Otherwise if function, then it is {@link api/AUTO.$injector#invoke injected}
+   *        and the return value is treated as the dependency. If the result is a promise, it is
+   *        resolved before its value is injected into the controller. Be aware that
+   *        `ngRoute.$routeParams` will still refer to the previous route within these resolve
+   *        functions.  Use `$route.current.params` to access the new route parameters, instead.
+   *
+   *    - `redirectTo` – {(string|function())=} – value to update
+   *      {@link ng.$location $location} path with and trigger route redirection.
+   *
+   *      If `redirectTo` is a function, it will be called with the following parameters:
+   *
+   *      - `{Object.<string>}` - route parameters extracted from the current
+   *        `$location.path()` by applying the current route templateUrl.
+   *      - `{string}` - current `$location.path()`
+   *      - `{Object}` - current `$location.search()`
+   *
+   *      The custom `redirectTo` function is expected to return a string which will be used
+   *      to update `$location.path()` and `$location.search()`.
+   *
+   *    - `[reloadOnSearch=true]` - {boolean=} - reload route when only `$location.search()`
+   *      or `$location.hash()` changes.
+   *
+   *      If the option is set to `false` and url in the browser changes, then
+   *      `$routeUpdate` event is broadcasted on the root scope.
+   *
+   *    - `[caseInsensitiveMatch=false]` - {boolean=} - match routes without being case sensitive
+   *
+   *      If the option is set to `true`, then the particular route can be matched without being
+   *      case sensitive
+   *
+   * @returns {Object} self
+   *
+   * @description
+   * Adds a new route definition to the `$route` service.
+   */
+  this.when = function(path, route) {
+    routes[path] = angular.extend(
+      {reloadOnSearch: true},
+      route,
+      path && pathRegExp(path, route)
+    );
+
+    // create redirection for trailing slashes
+    if (path) {
+      var redirectPath = (path[path.length-1] == '/')
+            ? path.substr(0, path.length-1)
+            : path +'/';
+
+      routes[redirectPath] = angular.extend(
+        {redirectTo: path},
+        pathRegExp(redirectPath, route)
+      );
+    }
+
+    return this;
+  };
+
+   /**
+    * @param path {string} path
+    * @param opts {Object} options
+    * @return {?Object}
+    *
+    * @description
+    * Normalizes the given path, returning a regular expression
+    * and the original path.
+    *
+    * Inspired by pathRexp in visionmedia/express/lib/utils.js.
+    */
+  function pathRegExp(path, opts) {
+    var insensitive = opts.caseInsensitiveMatch,
+        ret = {
+          originalPath: path,
+          regexp: path
+        },
+        keys = ret.keys = [];
+
+    path = path
+      .replace(/([().])/g, '\\$1')
+      .replace(/(\/)?:(\w+)([\?|\*])?/g, function(_, slash, key, option){
+        var optional = option === '?' ? option : null;
+        var star = option === '*' ? option : null;
+        keys.push({ name: key, optional: !!optional });
+        slash = slash || '';
+        return ''
+          + (optional ? '' : slash)
+          + '(?:'
+          + (optional ? slash : '')
+          + (star && '(.+?)' || '([^/]+)')
+          + (optional || '')
+          + ')'
+          + (optional || '');
+      })
+      .replace(/([\/$\*])/g, '\\$1');
+
+    ret.regexp = new RegExp('^' + path + '$', insensitive ? 'i' : '');
+    return ret;
+  }
+
+  /**
+   * @ngdoc method
+   * @name ngRoute.$routeProvider#otherwise
+   * @methodOf ngRoute.$routeProvider
+   *
+   * @description
+   * Sets route definition that will be used on route change when no other route definition
+   * is matched.
+   *
+   * @param {Object} params Mapping information to be assigned to `$route.current`.
+   * @returns {Object} self
+   */
+  this.otherwise = function(params) {
+    this.when(null, params);
+    return this;
+  };
+
+
+  this.$get = ['$rootScope',
+               '$location',
+               '$routeParams',
+               '$q',
+               '$injector',
+               '$http',
+               '$templateCache',
+               '$sce',
+      function($rootScope, $location, $routeParams, $q, $injector, $http, $templateCache, $sce) {
+
+    /**
+     * @ngdoc object
+     * @name ngRoute.$route
+     * @requires $location
+     * @requires $routeParams
+     *
+     * @property {Object} current Reference to the current route definition.
+     * The route definition contains:
+     *
+     *   - `controller`: The controller constructor as define in route definition.
+     *   - `locals`: A map of locals which is used by {@link ng.$controller $controller} service for
+     *     controller instantiation. The `locals` contain
+     *     the resolved values of the `resolve` map. Additionally the `locals` also contain:
+     *
+     *     - `$scope` - The current route scope.
+     *     - `$template` - The current route template HTML.
+     *
+     * @property {Array.<Object>} routes Array of all configured routes.
+     *
+     * @description
+     * `$route` is used for deep-linking URLs to controllers and views (HTML partials).
+     * It watches `$location.url()` and tries to map the path to an existing route definition.
+     *
+     * Requires the {@link ngRoute `ngRoute`} module to be installed.
+     *
+     * You can define routes through {@link ngRoute.$routeProvider $routeProvider}'s API.
+     *
+     * The `$route` service is typically used in conjunction with the
+     * {@link ngRoute.directive:ngView `ngView`} directive and the
+     * {@link ngRoute.$routeParams `$routeParams`} service.
+     *
+     * @example
+       This example shows how changing the URL hash causes the `$route` to match a route against the
+       URL, and the `ngView` pulls in the partial.
+
+       Note that this example is using {@link ng.directive:script inlined templates}
+       to get it working on jsfiddle as well.
+
+     <example module="ngViewExample" deps="angular-route.js">
+       <file name="index.html">
+         <div ng-controller="MainCntl">
+           Choose:
+           <a href="Book/Moby">Moby</a> |
+           <a href="Book/Moby/ch/1">Moby: Ch1</a> |
+           <a href="Book/Gatsby">Gatsby</a> |
+           <a href="Book/Gatsby/ch/4?key=value">Gatsby: Ch4</a> |
+           <a href="Book/Scarlet">Scarlet Letter</a><br/>
+
+           <div ng-view></div>
+           <hr />
+
+           <pre>$location.path() = {{$location.path()}}</pre>
+           <pre>$route.current.templateUrl = {{$route.current.templateUrl}}</pre>
+           <pre>$route.current.params = {{$route.current.params}}</pre>
+           <pre>$route.current.scope.name = {{$route.current.scope.name}}</pre>
+           <pre>$routeParams = {{$routeParams}}</pre>
+         </div>
+       </file>
+
+       <file name="book.html">
+         controller: {{name}}<br />
+         Book Id: {{params.bookId}}<br />
+       </file>
+
+       <file name="chapter.html">
+         controller: {{name}}<br />
+         Book Id: {{params.bookId}}<br />
+         Chapter Id: {{params.chapterId}}
+       </file>
+
+       <file name="script.js">
+         angular.module('ngViewExample', ['ngRoute'])
+
+         .config(function($routeProvider, $locationProvider) {
+           $routeProvider.when('/Book/:bookId', {
+             templateUrl: 'book.html',
+             controller: BookCntl,
+             resolve: {
+               // I will cause a 1 second delay
+               delay: function($q, $timeout) {
+                 var delay = $q.defer();
+                 $timeout(delay.resolve, 1000);
+                 return delay.promise;
+               }
+             }
+           });
+           $routeProvider.when('/Book/:bookId/ch/:chapterId', {
+             templateUrl: 'chapter.html',
+             controller: ChapterCntl
+           });
+
+           // configure html5 to get links working on jsfiddle
+           $locationProvider.html5Mode(true);
+         });
+
+         function MainCntl($scope, $route, $routeParams, $location) {
+           $scope.$route = $route;
+           $scope.$location = $location;
+           $scope.$routeParams = $routeParams;
+         }
+
+         function BookCntl($scope, $routeParams) {
+           $scope.name = "BookCntl";
+           $scope.params = $routeParams;
+         }
+
+         function ChapterCntl($scope, $routeParams) {
+           $scope.name = "ChapterCntl";
+           $scope.params = $routeParams;
+         }
+       </file>
+
+       <file name="scenario.js">
+         it('should load and compile correct template', function() {
+           element('a:contains("Moby: Ch1")').click();
+           var content = element('.doc-example-live [ng-view]').text();
+           expect(content).toMatch(/controller\: ChapterCntl/);
+           expect(content).toMatch(/Book Id\: Moby/);
+           expect(content).toMatch(/Chapter Id\: 1/);
+
+           element('a:contains("Scarlet")').click();
+           sleep(2); // promises are not part of scenario waiting
+           content = element('.doc-example-live [ng-view]').text();
+           expect(content).toMatch(/controller\: BookCntl/);
+           expect(content).toMatch(/Book Id\: Scarlet/);
+         });
+       </file>
+     </example>
+     */
+
+    /**
+     * @ngdoc event
+     * @name ngRoute.$route#$routeChangeStart
+     * @eventOf ngRoute.$route
+     * @eventType broadcast on root scope
+     * @description
+     * Broadcasted before a route change. At this  point the route services starts
+     * resolving all of the dependencies needed for the route change to occurs.
+     * Typically this involves fetching the view template as well as any dependencies
+     * defined in `resolve` route property. Once  all of the dependencies are resolved
+     * `$routeChangeSuccess` is fired.
+     *
+     * @param {Object} angularEvent Synthetic event object.
+     * @param {Route} next Future route information.
+     * @param {Route} current Current route information.
+     */
+
+    /**
+     * @ngdoc event
+     * @name ngRoute.$route#$routeChangeSuccess
+     * @eventOf ngRoute.$route
+     * @eventType broadcast on root scope
+     * @description
+     * Broadcasted after a route dependencies are resolved.
+     * {@link ngRoute.directive:ngView ngView} listens for the directive
+     * to instantiate the controller and render the view.
+     *
+     * @param {Object} angularEvent Synthetic event object.
+     * @param {Route} current Current route information.
+     * @param {Route|Undefined} previous Previous route information, or undefined if current is
+     * first route entered.
+     */
+
+    /**
+     * @ngdoc event
+     * @name ngRoute.$route#$routeChangeError
+     * @eventOf ngRoute.$route
+     * @eventType broadcast on root scope
+     * @description
+     * Broadcasted if any of the resolve promises are rejected.
+     *
+     * @param {Object} angularEvent Synthetic event object
+     * @param {Route} current Current route information.
+     * @param {Route} previous Previous route information.
+     * @param {Route} rejection Rejection of the promise. Usually the error of the failed promise.
+     */
+
+    /**
+     * @ngdoc event
+     * @name ngRoute.$route#$routeUpdate
+     * @eventOf ngRoute.$route
+     * @eventType broadcast on root scope
+     * @description
+     *
+     * The `reloadOnSearch` property has been set to false, and we are reusing the same
+     * instance of the Controller.
+     */
+
+    var forceReload = false,
+        $route = {
+          routes: routes,
+
+          /**
+           * @ngdoc method
+           * @name ngRoute.$route#reload
+           * @methodOf ngRoute.$route
+           *
+           * @description
+           * Causes `$route` service to reload the current route even if
+           * {@link ng.$location $location} hasn't changed.
+           *
+           * As a result of that, {@link ngRoute.directive:ngView ngView}
+           * creates new scope, reinstantiates the controller.
+           */
+          reload: function() {
+            forceReload = true;
+            $rootScope.$evalAsync(updateRoute);
+          }
+        };
+
+    $rootScope.$on('$locationChangeSuccess', updateRoute);
+
+    return $route;
+
+    /////////////////////////////////////////////////////
+
+    /**
+     * @param on {string} current url
+     * @param route {Object} route regexp to match the url against
+     * @return {?Object}
+     *
+     * @description
+     * Check if the route matches the current url.
+     *
+     * Inspired by match in
+     * visionmedia/express/lib/router/router.js.
+     */
+    function switchRouteMatcher(on, route) {
+      var keys = route.keys,
+          params = {};
+
+      if (!route.regexp) return null;
+
+      var m = route.regexp.exec(on);
+      if (!m) return null;
+
+      for (var i = 1, len = m.length; i < len; ++i) {
+        var key = keys[i - 1];
+
+        var val = 'string' == typeof m[i]
+              ? decodeURIComponent(m[i])
+              : m[i];
+
+        if (key && val) {
+          params[key.name] = val;
+        }
+      }
+      return params;
+    }
+
+    function updateRoute() {
+      var next = parseRoute(),
+          last = $route.current;
+
+      if (next && last && next.$$route === last.$$route
+          && angular.equals(next.pathParams, last.pathParams)
+          && !next.reloadOnSearch && !forceReload) {
+        last.params = next.params;
+        angular.copy(last.params, $routeParams);
+        $rootScope.$broadcast('$routeUpdate', last);
+      } else if (next || last) {
+        forceReload = false;
+        $rootScope.$broadcast('$routeChangeStart', next, last);
+        $route.current = next;
+        if (next) {
+          if (next.redirectTo) {
+            if (angular.isString(next.redirectTo)) {
+              $location.path(interpolate(next.redirectTo, next.params)).search(next.params)
+                       .replace();
+            } else {
+              $location.url(next.redirectTo(next.pathParams, $location.path(), $location.search()))
+                       .replace();
+            }
+          }
+        }
+
+        $q.when(next).
+          then(function() {
+            if (next) {
+              var locals = angular.extend({}, next.resolve),
+                  template, templateUrl;
+
+              angular.forEach(locals, function(value, key) {
+                locals[key] = angular.isString(value) ?
+                    $injector.get(value) : $injector.invoke(value);
+              });
+
+              if (angular.isDefined(template = next.template)) {
+                if (angular.isFunction(template)) {
+                  template = template(next.params);
+                }
+              } else if (angular.isDefined(templateUrl = next.templateUrl)) {
+                if (angular.isFunction(templateUrl)) {
+                  templateUrl = templateUrl(next.params);
+                }
+                templateUrl = $sce.getTrustedResourceUrl(templateUrl);
+                if (angular.isDefined(templateUrl)) {
+                  next.loadedTemplateUrl = templateUrl;
+                  template = $http.get(templateUrl, {cache: $templateCache}).
+                      then(function(response) { return response.data; });
+                }
+              }
+              if (angular.isDefined(template)) {
+                locals['$template'] = template;
+              }
+              return $q.all(locals);
+            }
+          }).
+          // after route change
+          then(function(locals) {
+            if (next == $route.current) {
+              if (next) {
+                next.locals = locals;
+                angular.copy(next.params, $routeParams);
+              }
+              $rootScope.$broadcast('$routeChangeSuccess', next, last);
+            }
+          }, function(error) {
+            if (next == $route.current) {
+              $rootScope.$broadcast('$routeChangeError', next, last, error);
+            }
+          });
+      }
+    }
+
+
+    /**
+     * @returns the current active route, by matching it against the URL
+     */
+    function parseRoute() {
+      // Match a route
+      var params, match;
+      angular.forEach(routes, function(route, path) {
+        if (!match && (params = switchRouteMatcher($location.path(), route))) {
+          match = inherit(route, {
+            params: angular.extend({}, $location.search(), params),
+            pathParams: params});
+          match.$$route = route;
+        }
+      });
+      // No route matched; fallback to "otherwise" route
+      return match || routes[null] && inherit(routes[null], {params: {}, pathParams:{}});
+    }
+
+    /**
+     * @returns interpolation of the redirect path with the parameters
+     */
+    function interpolate(string, params) {
+      var result = [];
+      angular.forEach((string||'').split(':'), function(segment, i) {
+        if (i === 0) {
+          result.push(segment);
+        } else {
+          var segmentMatch = segment.match(/(\w+)(.*)/);
+          var key = segmentMatch[1];
+          result.push(params[key]);
+          result.push(segmentMatch[2] || '');
+          delete params[key];
+        }
+      });
+      return result.join('');
+    }
+  }];
+}
+
+ngRouteModule.provider('$routeParams', $RouteParamsProvider);
+
+
+/**
+ * @ngdoc object
+ * @name ngRoute.$routeParams
+ * @requires $route
+ *
+ * @description
+ * The `$routeParams` service allows you to retrieve the current set of route parameters.
+ *
+ * Requires the {@link ngRoute `ngRoute`} module to be installed.
+ *
+ * The route parameters are a combination of {@link ng.$location `$location`}'s
+ * {@link ng.$location#methods_search `search()`} and {@link ng.$location#methods_path `path()`}.
+ * The `path` parameters are extracted when the {@link ngRoute.$route `$route`} path is matched.
+ *
+ * In case of parameter name collision, `path` params take precedence over `search` params.
+ *
+ * The service guarantees that the identity of the `$routeParams` object will remain unchanged
+ * (but its properties will likely change) even when a route change occurs.
+ *
+ * Note that the `$routeParams` are only updated *after* a route change completes successfully.
+ * This means that you cannot rely on `$routeParams` being correct in route resolve functions.
+ * Instead you can use `$route.current.params` to access the new route's parameters.
+ *
+ * @example
+ * <pre>
+ *  // Given:
+ *  // URL: http://server.com/index.html#/Chapter/1/Section/2?search=moby
+ *  // Route: /Chapter/:chapterId/Section/:sectionId
+ *  //
+ *  // Then
+ *  $routeParams ==> {chapterId:1, sectionId:2, search:'moby'}
+ * </pre>
+ */
+function $RouteParamsProvider() {
+  this.$get = function() { return {}; };
+}
+
+ngRouteModule.directive('ngView', ngViewFactory);
+ngRouteModule.directive('ngView', ngViewFillContentFactory);
+
+
+/**
+ * @ngdoc directive
+ * @name ngRoute.directive:ngView
+ * @restrict ECA
+ *
+ * @description
+ * # Overview
+ * `ngView` is a directive that complements the {@link ngRoute.$route $route} service by
+ * including the rendered template of the current route into the main layout (`index.html`) file.
+ * Every time the current route changes, the included view changes with it according to the
+ * configuration of the `$route` service.
+ *
+ * Requires the {@link ngRoute `ngRoute`} module to be installed.
+ *
+ * @animations
+ * enter - animation is used to bring new content into the browser.
+ * leave - animation is used to animate existing content away.
+ *
+ * The enter and leave animation occur concurrently.
+ *
+ * @scope
+ * @priority 400
+ * @example
+    <example module="ngViewExample" deps="angular-route.js" animations="true">
+      <file name="index.html">
+        <div ng-controller="MainCntl as main">
+          Choose:
+          <a href="Book/Moby">Moby</a> |
+          <a href="Book/Moby/ch/1">Moby: Ch1</a> |
+          <a href="Book/Gatsby">Gatsby</a> |
+          <a href="Book/Gatsby/ch/4?key=value">Gatsby: Ch4</a> |
+          <a href="Book/Scarlet">Scarlet Letter</a><br/>
+
+          <div class="view-animate-container">
+            <div ng-view class="view-animate"></div>
+          </div>
+          <hr />
+
+          <pre>$location.path() = {{main.$location.path()}}</pre>
+          <pre>$route.current.templateUrl = {{main.$route.current.templateUrl}}</pre>
+          <pre>$route.current.params = {{main.$route.current.params}}</pre>
+          <pre>$route.current.scope.name = {{main.$route.current.scope.name}}</pre>
+          <pre>$routeParams = {{main.$routeParams}}</pre>
+        </div>
+      </file>
+
+      <file name="book.html">
+        <div>
+          controller: {{book.name}}<br />
+          Book Id: {{book.params.bookId}}<br />
+        </div>
+      </file>
+
+      <file name="chapter.html">
+        <div>
+          controller: {{chapter.name}}<br />
+          Book Id: {{chapter.params.bookId}}<br />
+          Chapter Id: {{chapter.params.chapterId}}
+        </div>
+      </file>
+
+      <file name="animations.css">
+        .view-animate-container {
+          position:relative;
+          height:100px!important;
+          position:relative;
+          background:white;
+          border:1px solid black;
+          height:40px;
+          overflow:hidden;
+        }
+
+        .view-animate {
+          padding:10px;
+        }
+
+        .view-animate.ng-enter, .view-animate.ng-leave {
+          -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s;
+          transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s;
+
+          display:block;
+          width:100%;
+          border-left:1px solid black;
+
+          position:absolute;
+          top:0;
+          left:0;
+          right:0;
+          bottom:0;
+          padding:10px;
+        }
+
+        .view-animate.ng-enter {
+          left:100%;
+        }
+        .view-animate.ng-enter.ng-enter-active {
+          left:0;
+        }
+        .view-animate.ng-leave.ng-leave-active {
+          left:-100%;
+        }
+      </file>
+
+      <file name="script.js">
+        angular.module('ngViewExample', ['ngRoute', 'ngAnimate'],
+          function($routeProvider, $locationProvider) {
+            $routeProvider.when('/Book/:bookId', {
+              templateUrl: 'book.html',
+              controller: BookCntl,
+              controllerAs: 'book'
+            });
+            $routeProvider.when('/Book/:bookId/ch/:chapterId', {
+              templateUrl: 'chapter.html',
+              controller: ChapterCntl,
+              controllerAs: 'chapter'
+            });
+
+            // configure html5 to get links working on jsfiddle
+            $locationProvider.html5Mode(true);
+        });
+
+        function MainCntl($route, $routeParams, $location) {
+          this.$route = $route;
+          this.$location = $location;
+          this.$routeParams = $routeParams;
+        }
+
+        function BookCntl($routeParams) {
+          this.name = "BookCntl";
+          this.params = $routeParams;
+        }
+
+        function ChapterCntl($routeParams) {
+          this.name = "ChapterCntl";
+          this.params = $routeParams;
+        }
+      </file>
+
+      <file name="scenario.js">
+        it('should load and compile correct template', function() {
+          element('a:contains("Moby: Ch1")').click();
+          var content = element('.doc-example-live [ng-view]').text();
+          expect(content).toMatch(/controller\: ChapterCntl/);
+          expect(content).toMatch(/Book Id\: Moby/);
+          expect(content).toMatch(/Chapter Id\: 1/);
+
+          element('a:contains("Scarlet")').click();
+          content = element('.doc-example-live [ng-view]').text();
+          expect(content).toMatch(/controller\: BookCntl/);
+          expect(content).toMatch(/Book Id\: Scarlet/);
+        });
+      </file>
+    </example>
+ */
+
+
+/**
+ * @ngdoc event
+ * @name ngRoute.directive:ngView#$viewContentLoaded
+ * @eventOf ngRoute.directive:ngView
+ * @eventType emit on the current ngView scope
+ * @description
+ * Emitted every time the ngView content is reloaded.
+ */
+ngViewFactory.$inject = ['$route', '$anchorScroll', '$animate'];
+function ngViewFactory(   $route,   $anchorScroll,   $animate) {
+  return {
+    restrict: 'ECA',
+    terminal: true,
+    priority: 400,
+    transclude: 'element',
+    link: function(scope, $element, attr, ctrl, $transclude) {
+        var currentScope,
+            currentElement,
+            autoScrollExp = attr.autoscroll,
+            onloadExp = attr.onload || '';
+
+        scope.$on('$routeChangeSuccess', update);
+        update();
+
+        function cleanupLastView() {
+          if (currentScope) {
+            currentScope.$destroy();
+            currentScope = null;
+          }
+          if(currentElement) {
+            $animate.leave(currentElement);
+            currentElement = null;
+          }
+        }
+
+        function update() {
+          var locals = $route.current && $route.current.locals,
+              template = locals && locals.$template;
+
+          if (template) {
+            var newScope = scope.$new();
+            var current = $route.current;
+
+            // Note: This will also link all children of ng-view that were contained in the original
+            // html. If that content contains controllers, ... they could pollute/change the scope.
+            // However, using ng-view on an element with additional content does not make sense...
+            // Note: We can't remove them in the cloneAttchFn of $transclude as that
+            // function is called before linking the content, which would apply child
+            // directives to non existing elements.
+            var clone = $transclude(newScope, function(clone) {
+              $animate.enter(clone, null, currentElement || $element, function onNgViewEnter () {
+                if (angular.isDefined(autoScrollExp)
+                  && (!autoScrollExp || scope.$eval(autoScrollExp))) {
+                  $anchorScroll();
+                }
+              });
+              cleanupLastView();
+            });
+
+            currentElement = clone;
+            currentScope = current.scope = newScope;
+            currentScope.$emit('$viewContentLoaded');
+            currentScope.$eval(onloadExp);
+          } else {
+            cleanupLastView();
+          }
+        }
+    }
+  };
+}
+
+// This directive is called during the $transclude call of the first `ngView` directive.
+// It will replace and compile the content of the element with the loaded template.
+// We need this directive so that the element content is already filled when
+// the link function of another directive on the same element as ngView
+// is called.
+ngViewFillContentFactory.$inject = ['$compile', '$controller', '$route'];
+function ngViewFillContentFactory($compile, $controller, $route) {
+  return {
+    restrict: 'ECA',
+    priority: -400,
+    link: function(scope, $element) {
+      var current = $route.current,
+          locals = current.locals;
+
+      $element.html(locals.$template);
+
+      var link = $compile($element.contents());
+
+      if (current.controller) {
+        locals.$scope = scope;
+        var controller = $controller(current.controller, locals);
+        if (current.controllerAs) {
+          scope[current.controllerAs] = controller;
+        }
+        $element.data('$ngControllerController', controller);
+        $element.children().data('$ngControllerController', controller);
+      }
+
+      link(scope);
+    }
+  };
+}
+
+
+})(window, window.angular);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular-route.min.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular-route.min.js b/portal/js/libs/angular-1.2.5/angular-route.min.js
new file mode 100755
index 0000000..7dfef5c
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular-route.min.js
@@ -0,0 +1,14 @@
+/*
+ AngularJS v1.2.5
+ (c) 2010-2014 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(h,e,A){'use strict';function u(w,q,k){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,c,b,f,n){function y(){l&&(l.$destroy(),l=null);g&&(k.leave(g),g=null)}function v(){var b=w.current&&w.current.locals;if(b&&b.$template){var b=a.$new(),f=w.current;g=n(b,function(d){k.enter(d,null,g||c,function(){!e.isDefined(t)||t&&!a.$eval(t)||q()});y()});l=f.scope=b;l.$emit("$viewContentLoaded");l.$eval(h)}else y()}var l,g,t=b.autoscroll,h=b.onload||"";a.$on("$routeChangeSuccess",
+v);v()}}}function z(e,h,k){return{restrict:"ECA",priority:-400,link:function(a,c){var b=k.current,f=b.locals;c.html(f.$template);var n=e(c.contents());b.controller&&(f.$scope=a,f=h(b.controller,f),b.controllerAs&&(a[b.controllerAs]=f),c.data("$ngControllerController",f),c.children().data("$ngControllerController",f));n(a)}}}h=e.module("ngRoute",["ng"]).provider("$route",function(){function h(a,c){return e.extend(new (e.extend(function(){},{prototype:a})),c)}function q(a,e){var b=e.caseInsensitiveMatch,
+f={originalPath:a,regexp:a},h=f.keys=[];a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?|\*])?/g,function(a,e,b,c){a="?"===c?c:null;c="*"===c?c:null;h.push({name:b,optional:!!a});e=e||"";return""+(a?"":e)+"(?:"+(a?e:"")+(c&&"(.+?)"||"([^/]+)")+(a||"")+")"+(a||"")}).replace(/([\/$\*])/g,"\\$1");f.regexp=RegExp("^"+a+"$",b?"i":"");return f}var k={};this.when=function(a,c){k[a]=e.extend({reloadOnSearch:!0},c,a&&q(a,c));if(a){var b="/"==a[a.length-1]?a.substr(0,a.length-1):a+"/";k[b]=e.extend({redirectTo:a},
+q(b,c))}return this};this.otherwise=function(a){this.when(null,a);return this};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$http","$templateCache","$sce",function(a,c,b,f,n,q,v,l){function g(){var d=t(),m=r.current;if(d&&m&&d.$$route===m.$$route&&e.equals(d.pathParams,m.pathParams)&&!d.reloadOnSearch&&!x)m.params=d.params,e.copy(m.params,b),a.$broadcast("$routeUpdate",m);else if(d||m)x=!1,a.$broadcast("$routeChangeStart",d,m),(r.current=d)&&d.redirectTo&&(e.isString(d.redirectTo)?
+c.path(u(d.redirectTo,d.params)).search(d.params).replace():c.url(d.redirectTo(d.pathParams,c.path(),c.search())).replace()),f.when(d).then(function(){if(d){var a=e.extend({},d.resolve),c,b;e.forEach(a,function(d,c){a[c]=e.isString(d)?n.get(d):n.invoke(d)});e.isDefined(c=d.template)?e.isFunction(c)&&(c=c(d.params)):e.isDefined(b=d.templateUrl)&&(e.isFunction(b)&&(b=b(d.params)),b=l.getTrustedResourceUrl(b),e.isDefined(b)&&(d.loadedTemplateUrl=b,c=q.get(b,{cache:v}).then(function(a){return a.data})));
+e.isDefined(c)&&(a.$template=c);return f.all(a)}}).then(function(c){d==r.current&&(d&&(d.locals=c,e.copy(d.params,b)),a.$broadcast("$routeChangeSuccess",d,m))},function(c){d==r.current&&a.$broadcast("$routeChangeError",d,m,c)})}function t(){var a,b;e.forEach(k,function(f,k){var p;if(p=!b){var s=c.path();p=f.keys;var l={};if(f.regexp)if(s=f.regexp.exec(s)){for(var g=1,q=s.length;g<q;++g){var n=p[g-1],r="string"==typeof s[g]?decodeURIComponent(s[g]):s[g];n&&r&&(l[n.name]=r)}p=l}else p=null;else p=null;
+p=a=p}p&&(b=h(f,{params:e.extend({},c.search(),a),pathParams:a}),b.$$route=f)});return b||k[null]&&h(k[null],{params:{},pathParams:{}})}function u(a,c){var b=[];e.forEach((a||"").split(":"),function(a,d){if(0===d)b.push(a);else{var e=a.match(/(\w+)(.*)/),f=e[1];b.push(c[f]);b.push(e[2]||"");delete c[f]}});return b.join("")}var x=!1,r={routes:k,reload:function(){x=!0;a.$evalAsync(g)}};a.$on("$locationChangeSuccess",g);return r}]});h.provider("$routeParams",function(){this.$get=function(){return{}}});
+h.directive("ngView",u);h.directive("ngView",z);u.$inject=["$route","$anchorScroll","$animate"];z.$inject=["$compile","$controller","$route"]})(window,window.angular);
+//# sourceMappingURL=angular-route.min.js.map

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular-route.min.js.map
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular-route.min.js.map b/portal/js/libs/angular-1.2.5/angular-route.min.js.map
new file mode 100755
index 0000000..fecc2c6
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular-route.min.js.map
@@ -0,0 +1,8 @@
+{
+"version":3,
+"file":"angular-route.min.js",
+"lineCount":13,
+"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CAyyBtCC,QAASA,EAAa,CAAIC,CAAJ,CAAcC,CAAd,CAA+BC,CAA/B,CAAyC,CAC7D,MAAO,UACK,KADL,UAEK,CAAA,CAFL,UAGK,GAHL,YAIO,SAJP,MAKCC,QAAQ,CAACC,CAAD,CAAQC,CAAR,CAAkBC,CAAlB,CAAwBC,CAAxB,CAA8BC,CAA9B,CAA2C,CASrDC,QAASA,EAAe,EAAG,CACrBC,CAAJ,GACEA,CAAAC,SAAA,EACA,CAAAD,CAAA,CAAe,IAFjB,CAIGE,EAAH,GACEV,CAAAW,MAAA,CAAeD,CAAf,CACA,CAAAA,CAAA,CAAiB,IAFnB,CALyB,CAW3BE,QAASA,EAAM,EAAG,CAAA,IACZC,EAASf,CAAAgB,QAATD,EAA2Bf,CAAAgB,QAAAD,OAG/B,IAFeA,CAEf,EAFyBA,CAAAE,UAEzB,CAAc,CACRC,IAAAA,EAAWd,CAAAe,KAAA,EAAXD,CACAF,EAAUhB,CAAAgB,QAkBdJ,EAAA,CAVYJ,CAAAY,CAAYF,CAAZE,CAAsB,QAAQ,CAACA,CAAD,CAAQ,CAChDlB,CAAAmB,MAAA,CAAeD,CAAf,CAAsB,IAAtB,CAA4BR,CAA5B,EAA8CP,CAA9C,CAAwDiB,QAAuB,EAAG,CAC5E,CAAAzB,CAAA0B,UAAA,CAAkBC,CAAlB,CAAJ,EACOA,CADP,EACwB,CAAApB,CAAAqB,MAAA,CAAYD,CAAZ,CADxB,EAEEvB,CAAA,EAH8E,CAAlF,CAMAQ,EAAA,EAPgD,CAAtCW,CAWZV,EAAA,CAAeM,CAAAZ,MAAf,CAA+Bc,CAC/BR,EAAAgB,MAAA,CAAmB,oBAAnB,CACAhB,EAAAe,MAAA,CAAmBE,CAAnB,CAvBY,CAAd,IAyBElB,
 EAAA,EA7Bc,CApBmC,IACjDC,CADiD,CAEjDE,CAFiD,CAGjDY,EAAgBlB,CAAAsB,WAHiC,CAIjDD,EAAYrB,CAAAuB,OAAZF,EAA2B,EAE/BvB,EAAA0B,IAAA,CAAU,qBAAV;AAAiChB,CAAjC,CACAA,EAAA,EAPqD,CALpD,CADsD,CAoE/DiB,QAASA,EAAwB,CAACC,CAAD,CAAWC,CAAX,CAAwBjC,CAAxB,CAAgC,CAC/D,MAAO,UACK,KADL,UAEM,IAFN,MAGCG,QAAQ,CAACC,CAAD,CAAQC,CAAR,CAAkB,CAAA,IAC1BW,EAAUhB,CAAAgB,QADgB,CAE1BD,EAASC,CAAAD,OAEbV,EAAA6B,KAAA,CAAcnB,CAAAE,UAAd,CAEA,KAAId,EAAO6B,CAAA,CAAS3B,CAAA8B,SAAA,EAAT,CAEPnB,EAAAoB,WAAJ,GACErB,CAAAsB,OAMA,CANgBjC,CAMhB,CALIgC,CAKJ,CALiBH,CAAA,CAAYjB,CAAAoB,WAAZ,CAAgCrB,CAAhC,CAKjB,CAJIC,CAAAsB,aAIJ,GAHElC,CAAA,CAAMY,CAAAsB,aAAN,CAGF,CAHgCF,CAGhC,EADA/B,CAAAkC,KAAA,CAAc,yBAAd,CAAyCH,CAAzC,CACA,CAAA/B,CAAAmC,SAAA,EAAAD,KAAA,CAAyB,yBAAzB,CAAoDH,CAApD,CAPF,CAUAjC,EAAA,CAAKC,CAAL,CAlB8B,CAH3B,CADwD,CA11B7DqC,CAAAA,CAAgB5C,CAAA6C,OAAA,CAAe,SAAf,CAA0B,CAAC,IAAD,CAA1B,CAAAC,SAAA,CACa,QADb,CAkBpBC,QAAuB,EAAE,CACvBC,QAASA,EAAO,CAACC,CAAD,CAASC,CAAT,CAAgB,CAC9B,MAAOlD,EAAAmD,OAAA,CAAe,KAAKnD,CAAAmD,OAAA,CAAe,QAAQ,EAAG,E
 AA1B,CAA8B,WAAWF,CAAX,CAA9B,CAAL,CAAf,CAA0EC,CAA1E,CADuB,CA2IhCE,QAASA,EAAU,CAACC,CAAD,CAAOC,CAAP,CAAa,CAAA,IAC1BC,EAAcD,CAAAE,qBADY;AAE1BC,EAAM,cACUJ,CADV,QAEIA,CAFJ,CAFoB,CAM1BK,EAAOD,CAAAC,KAAPA,CAAkB,EAEtBL,EAAA,CAAOA,CAAAM,QAAA,CACI,UADJ,CACgB,MADhB,CAAAA,QAAA,CAEI,wBAFJ,CAE8B,QAAQ,CAACC,CAAD,CAAIC,CAAJ,CAAWC,CAAX,CAAgBC,CAAhB,CAAuB,CAC5DC,CAAAA,CAAsB,GAAX,GAAAD,CAAA,CAAiBA,CAAjB,CAA0B,IACrCE,EAAAA,CAAkB,GAAX,GAAAF,CAAA,CAAiBA,CAAjB,CAA0B,IACrCL,EAAAQ,KAAA,CAAU,MAAQJ,CAAR,UAAuB,CAAC,CAACE,CAAzB,CAAV,CACAH,EAAA,CAAQA,CAAR,EAAiB,EACjB,OAAO,EAAP,EACKG,CAAA,CAAW,EAAX,CAAgBH,CADrB,EAEI,KAFJ,EAGKG,CAAA,CAAWH,CAAX,CAAmB,EAHxB,GAIKI,CAJL,EAIa,OAJb,EAIwB,SAJxB,GAKKD,CALL,EAKiB,EALjB,EAMI,GANJ,EAOKA,CAPL,EAOiB,EAPjB,CALgE,CAF7D,CAAAL,QAAA,CAgBI,YAhBJ,CAgBkB,MAhBlB,CAkBPF,EAAAU,OAAA,CAAiBC,MAAJ,CAAW,GAAX,CAAiBf,CAAjB,CAAwB,GAAxB,CAA6BE,CAAA,CAAc,GAAd,CAAoB,EAAjD,CACb,OAAOE,EA3BuB,CAvIhC,IAAIY,EAAS,EAsGb,KAAAC,KAAA,CAAYC,QAAQ,CAAClB,CAAD,CAAOmB,CAAP,CAAc,CAChCH,CAAA,CAAOhB,CAAP,CAAA,CAAerD
 ,CAAAmD,OAAA,CACb,gBAAiB,CAAA,CAAjB,CADa,CAEbqB,CAFa,CAGbnB,CAHa,EAGLD,CAAA,CAAWC,CAAX,CAAiBmB,CAAjB,CAHK,CAOf,IAAInB,CAAJ,CAAU,CACR,IAAIoB,EAAuC,GACxB,EADCpB,CAAA,CAAKA,CAAAqB,OAAL,CAAiB,CAAjB,CACD,CAAXrB,CAAAsB,OAAA,CAAY,CAAZ,CAAetB,CAAAqB,OAAf,CAA2B,CAA3B,CAAW,CACXrB,CADW,CACL,GAEdgB,EAAA,CAAOI,CAAP,CAAA,CAAuBzE,CAAAmD,OAAA,CACrB,YAAaE,CAAb,CADqB;AAErBD,CAAA,CAAWqB,CAAX,CAAyBD,CAAzB,CAFqB,CALf,CAWV,MAAO,KAnByB,CA2ElC,KAAAI,UAAA,CAAiBC,QAAQ,CAACC,CAAD,CAAS,CAChC,IAAAR,KAAA,CAAU,IAAV,CAAgBQ,CAAhB,CACA,OAAO,KAFyB,CAMlC,KAAAC,KAAA,CAAY,CAAC,YAAD,CACC,WADD,CAEC,cAFD,CAGC,IAHD,CAIC,WAJD,CAKC,OALD,CAMC,gBAND,CAOC,MAPD,CAQR,QAAQ,CAACC,CAAD,CAAaC,CAAb,CAAwBC,CAAxB,CAAsCC,CAAtC,CAA0CC,CAA1C,CAAqDC,CAArD,CAA4DC,CAA5D,CAA4EC,CAA5E,CAAkF,CA4P5FC,QAASA,EAAW,EAAG,CAAA,IACjBC,EAAOC,CAAA,EADU,CAEjBC,EAAOxF,CAAAgB,QAEX,IAAIsE,CAAJ,EAAYE,CAAZ,EAAoBF,CAAAG,QAApB,GAAqCD,CAAAC,QAArC,EACO5F,CAAA6F,OAAA,CAAeJ,CAAAK,WAAf,CAAgCH,CAAAG,WAAhC,CADP,EAEO,CAACL,CAAAM,eAFR,EAE+B,CAACC,CAFhC,CAGEL,CAAAb,OAEA,CAF
 cW,CAAAX,OAEd,CADA9E,CAAAiG,KAAA,CAAaN,CAAAb,OAAb,CAA0BI,CAA1B,CACA,CAAAF,CAAAkB,WAAA,CAAsB,cAAtB,CAAsCP,CAAtC,CALF,KAMO,IAAIF,CAAJ,EAAYE,CAAZ,CACLK,CAeA,CAfc,CAAA,CAed,CAdAhB,CAAAkB,WAAA,CAAsB,mBAAtB,CAA2CT,CAA3C,CAAiDE,CAAjD,CAcA,EAbAxF,CAAAgB,QAaA,CAbiBsE,CAajB,GAXMA,CAAAU,WAWN,GAVQnG,CAAAoG,SAAA,CAAiBX,CAAAU,WAAjB,CAAJ;AACElB,CAAA5B,KAAA,CAAegD,CAAA,CAAYZ,CAAAU,WAAZ,CAA6BV,CAAAX,OAA7B,CAAf,CAAAwB,OAAA,CAAiEb,CAAAX,OAAjE,CAAAnB,QAAA,EADF,CAIEsB,CAAAsB,IAAA,CAAcd,CAAAU,WAAA,CAAgBV,CAAAK,WAAhB,CAAiCb,CAAA5B,KAAA,EAAjC,CAAmD4B,CAAAqB,OAAA,EAAnD,CAAd,CAAA3C,QAAA,EAMN,EAAAwB,CAAAb,KAAA,CAAQmB,CAAR,CAAAe,KAAA,CACO,QAAQ,EAAG,CACd,GAAIf,CAAJ,CAAU,CAAA,IACJvE,EAASlB,CAAAmD,OAAA,CAAe,EAAf,CAAmBsC,CAAAgB,QAAnB,CADL,CAEJC,CAFI,CAEMC,CAEd3G,EAAA4G,QAAA,CAAgB1F,CAAhB,CAAwB,QAAQ,CAAC2F,CAAD,CAAQ/C,CAAR,CAAa,CAC3C5C,CAAA,CAAO4C,CAAP,CAAA,CAAc9D,CAAAoG,SAAA,CAAiBS,CAAjB,CAAA,CACVzB,CAAA0B,IAAA,CAAcD,CAAd,CADU,CACazB,CAAA2B,OAAA,CAAiBF,CAAjB,CAFgB,CAA7C,CAKI7G,EAAA0B,UAAA,CAAkBgF,CAAlB,CAA6BjB,CAA
 AiB,SAA7B,CAAJ,CACM1G,CAAAgH,WAAA,CAAmBN,CAAnB,CADN,GAEIA,CAFJ,CAEeA,CAAA,CAASjB,CAAAX,OAAT,CAFf,EAIW9E,CAAA0B,UAAA,CAAkBiF,CAAlB,CAAgClB,CAAAkB,YAAhC,CAJX,GAKM3G,CAAAgH,WAAA,CAAmBL,CAAnB,CAIJ,GAHEA,CAGF,CAHgBA,CAAA,CAAYlB,CAAAX,OAAZ,CAGhB,EADA6B,CACA,CADcpB,CAAA0B,sBAAA,CAA2BN,CAA3B,CACd,CAAI3G,CAAA0B,UAAA,CAAkBiF,CAAlB,CAAJ,GACElB,CAAAyB,kBACA,CADyBP,CACzB,CAAAD,CAAA,CAAWrB,CAAAyB,IAAA,CAAUH,CAAV,CAAuB,OAAQrB,CAAR,CAAvB,CAAAkB,KAAA,CACF,QAAQ,CAACW,CAAD,CAAW,CAAE,MAAOA,EAAAzE,KAAT,CADjB,CAFb,CATF,CAeI1C;CAAA0B,UAAA,CAAkBgF,CAAlB,CAAJ,GACExF,CAAA,UADF,CACwBwF,CADxB,CAGA,OAAOvB,EAAAiC,IAAA,CAAOlG,CAAP,CA3BC,CADI,CADlB,CAAAsF,KAAA,CAiCO,QAAQ,CAACtF,CAAD,CAAS,CAChBuE,CAAJ,EAAYtF,CAAAgB,QAAZ,GACMsE,CAIJ,GAHEA,CAAAvE,OACA,CADcA,CACd,CAAAlB,CAAAiG,KAAA,CAAaR,CAAAX,OAAb,CAA0BI,CAA1B,CAEF,EAAAF,CAAAkB,WAAA,CAAsB,qBAAtB,CAA6CT,CAA7C,CAAmDE,CAAnD,CALF,CADoB,CAjCxB,CAyCK,QAAQ,CAAC0B,CAAD,CAAQ,CACb5B,CAAJ,EAAYtF,CAAAgB,QAAZ,EACE6D,CAAAkB,WAAA,CAAsB,mBAAtB,CAA2CT,CAA3C,CAAiDE,CAAjD,CAAuD0B,CAAvD
 ,CAFe,CAzCrB,CA1BmB,CA+EvB3B,QAASA,EAAU,EAAG,CAAA,IAEhBZ,CAFgB,CAERwC,CACZtH,EAAA4G,QAAA,CAAgBvC,CAAhB,CAAwB,QAAQ,CAACG,CAAD,CAAQnB,CAAR,CAAc,CACxC,IAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,IAAA,EAAA,CAAA,KAAA,EAzGbK,EAAAA,CAyGac,CAzGNd,KAAX,KACIoB,EAAS,EAEb,IAsGiBN,CAtGZL,OAAL,CAGA,GADIoD,CACJ,CAmGiB/C,CApGTL,OAAAqD,KAAA,CAAkBC,CAAlB,CACR,CAAA,CAEA,IATqC,IAS5BC,EAAI,CATwB,CASrBC,EAAMJ,CAAA7C,OAAtB,CAAgCgD,CAAhC,CAAoCC,CAApC,CAAyC,EAAED,CAA3C,CAA8C,CAC5C,IAAI5D,EAAMJ,CAAA,CAAKgE,CAAL,CAAS,CAAT,CAAV,CAEIE,EAAM,QACA,EADY,MAAOL,EAAA,CAAEG,CAAF,CACnB,CAAFG,kBAAA,CAAmBN,CAAA,CAAEG,CAAF,CAAnB,CAAE,CACFH,CAAA,CAAEG,CAAF,CAEJ5D,EAAJ,EAAW8D,CAAX,GACE9C,CAAA,CAAOhB,CAAAgE,KAAP,CADF,CACqBF,CADrB,CAP4C,CAW9C,CAAA,CAAO9C,CAbP,CAAA,IAAQ,EAAA,CAAO,IAHf,KAAmB,EAAA,CAAO,IAsGT;CAAA,CAAA,CAAA,CAAA,CAAX,CAAA,CAAJ,GACEwC,CAGA,CAHQtE,CAAA,CAAQwB,CAAR,CAAe,QACbxE,CAAAmD,OAAA,CAAe,EAAf,CAAmB8B,CAAAqB,OAAA,EAAnB,CAAuCxB,CAAvC,CADa,YAETA,CAFS,CAAf,CAGR,CAAAwC,CAAA1B,QAAA,CAAgBpB,CAJlB,CAD4C,CAA9C,CASA,OAA
 O8C,EAAP,EAAgBjD,CAAA,CAAO,IAAP,CAAhB,EAAgCrB,CAAA,CAAQqB,CAAA,CAAO,IAAP,CAAR,CAAsB,QAAS,EAAT,YAAwB,EAAxB,CAAtB,CAZZ,CAkBtBgC,QAASA,EAAW,CAAC0B,CAAD,CAASjD,CAAT,CAAiB,CACnC,IAAIkD,EAAS,EACbhI,EAAA4G,QAAA,CAAiBqB,CAAAF,CAAAE,EAAQ,EAARA,OAAA,CAAkB,GAAlB,CAAjB,CAAyC,QAAQ,CAACC,CAAD,CAAUR,CAAV,CAAa,CAC5D,GAAU,CAAV,GAAIA,CAAJ,CACEM,CAAA9D,KAAA,CAAYgE,CAAZ,CADF,KAEO,CACL,IAAIC,EAAeD,CAAAZ,MAAA,CAAc,WAAd,CAAnB,CACIxD,EAAMqE,CAAA,CAAa,CAAb,CACVH,EAAA9D,KAAA,CAAYY,CAAA,CAAOhB,CAAP,CAAZ,CACAkE,EAAA9D,KAAA,CAAYiE,CAAA,CAAa,CAAb,CAAZ,EAA+B,EAA/B,CACA,QAAOrD,CAAA,CAAOhB,CAAP,CALF,CAHqD,CAA9D,CAWA,OAAOkE,EAAAI,KAAA,CAAY,EAAZ,CAb4B,CA7VuD,IA8LxFpC,EAAc,CAAA,CA9L0E,CA+LxF7F,EAAS,QACCkE,CADD,QAeCgE,QAAQ,EAAG,CACjBrC,CAAA,CAAc,CAAA,CACdhB,EAAAsD,WAAA,CAAsB9C,CAAtB,CAFiB,CAfZ,CAqBbR,EAAA/C,IAAA,CAAe,wBAAf,CAAyCuD,CAAzC,CAEA,OAAOrF,EAtNqF,CARlF,CA5LW,CAlBL,CAqkBpByC,EAAAE,SAAA,CAAuB,cAAvB,CAoCAyF,QAA6B,EAAG,CAC9B,IAAAxD,KAAA,CAAYyD,QAAQ,EAAG,CAAE,MAAO,EAAT,CADO,CApChC,CAwCA5F;CAAA6F,UAAA,CAAwB,QAAxB,CA
 AkCvI,CAAlC,CACA0C,EAAA6F,UAAA,CAAwB,QAAxB,CAAkCvG,CAAlC,CAuKAhC,EAAAwI,QAAA,CAAwB,CAAC,QAAD,CAAW,eAAX,CAA4B,UAA5B,CAoExBxG,EAAAwG,QAAA,CAAmC,CAAC,UAAD,CAAa,aAAb,CAA4B,QAA5B,CA52BG,CAArC,CAAA,CAy4BE3I,MAz4BF,CAy4BUA,MAAAC,QAz4BV;",
+"sources":["angular-route.js"],
+"names":["window","angular","undefined","ngViewFactory","$route","$anchorScroll","$animate","link","scope","$element","attr","ctrl","$transclude","cleanupLastView","currentScope","$destroy","currentElement","leave","update","locals","current","$template","newScope","$new","clone","enter","onNgViewEnter","isDefined","autoScrollExp","$eval","$emit","onloadExp","autoscroll","onload","$on","ngViewFillContentFactory","$compile","$controller","html","contents","controller","$scope","controllerAs","data","children","ngRouteModule","module","provider","$RouteProvider","inherit","parent","extra","extend","pathRegExp","path","opts","insensitive","caseInsensitiveMatch","ret","keys","replace","_","slash","key","option","optional","star","push","regexp","RegExp","routes","when","this.when","route","redirectPath","length","substr","otherwise","this.otherwise","params","$get","$rootScope","$location","$routeParams","$q","$injector","$http","$templateCache","$sce","updateRoute","next","parseRoute",
 "last","$$route","equals","pathParams","reloadOnSearch","forceReload","copy","$broadcast","redirectTo","isString","interpolate","search","url","then","resolve","template","templateUrl","forEach","value","get","invoke","isFunction","getTrustedResourceUrl","loadedTemplateUrl","response","all","error","match","m","exec","on","i","len","val","decodeURIComponent","name","string","result","split","segment","segmentMatch","join","reload","$evalAsync","$RouteParamsProvider","this.$get","directive","$inject"]
+}


[15/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular-touch.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular-touch.js b/portal/js/libs/angular-1.2.5/angular-touch.js
new file mode 100755
index 0000000..95b7781
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular-touch.js
@@ -0,0 +1,563 @@
+/**
+ * @license AngularJS v1.2.5
+ * (c) 2010-2014 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, angular, undefined) {'use strict';
+
+/**
+ * @ngdoc overview
+ * @name ngTouch
+ * @description
+ *
+ * # ngTouch
+ *
+ * The `ngTouch` module provides touch events and other helpers for touch-enabled devices.
+ * The implementation is based on jQuery Mobile touch event handling 
+ * ([jquerymobile.com](http://jquerymobile.com/)).
+ *
+ * {@installModule touch}
+ *
+ * See {@link ngTouch.$swipe `$swipe`} for usage.
+ *
+ * <div doc-module-components="ngTouch"></div>
+ *
+ */
+
+// define ngTouch module
+/* global -ngTouch */
+var ngTouch = angular.module('ngTouch', []);
+
+/* global ngTouch: false */
+
+    /**
+     * @ngdoc object
+     * @name ngTouch.$swipe
+     *
+     * @description
+     * The `$swipe` service is a service that abstracts the messier details of hold-and-drag swipe
+     * behavior, to make implementing swipe-related directives more convenient.
+     *
+     * Requires the {@link ngTouch `ngTouch`} module to be installed.
+     *
+     * `$swipe` is used by the `ngSwipeLeft` and `ngSwipeRight` directives in `ngTouch`, and by
+     * `ngCarousel` in a separate component.
+     *
+     * # Usage
+     * The `$swipe` service is an object with a single method: `bind`. `bind` takes an element
+     * which is to be watched for swipes, and an object with four handler functions. See the
+     * documentation for `bind` below.
+     */
+
+ngTouch.factory('$swipe', [function() {
+  // The total distance in any direction before we make the call on swipe vs. scroll.
+  var MOVE_BUFFER_RADIUS = 10;
+
+  function getCoordinates(event) {
+    var touches = event.touches && event.touches.length ? event.touches : [event];
+    var e = (event.changedTouches && event.changedTouches[0]) ||
+        (event.originalEvent && event.originalEvent.changedTouches &&
+            event.originalEvent.changedTouches[0]) ||
+        touches[0].originalEvent || touches[0];
+
+    return {
+      x: e.clientX,
+      y: e.clientY
+    };
+  }
+
+  return {
+    /**
+     * @ngdoc method
+     * @name ngTouch.$swipe#bind
+     * @methodOf ngTouch.$swipe
+     *
+     * @description
+     * The main method of `$swipe`. It takes an element to be watched for swipe motions, and an
+     * object containing event handlers.
+     *
+     * The four events are `start`, `move`, `end`, and `cancel`. `start`, `move`, and `end`
+     * receive as a parameter a coordinates object of the form `{ x: 150, y: 310 }`.
+     *
+     * `start` is called on either `mousedown` or `touchstart`. After this event, `$swipe` is
+     * watching for `touchmove` or `mousemove` events. These events are ignored until the total
+     * distance moved in either dimension exceeds a small threshold.
+     *
+     * Once this threshold is exceeded, either the horizontal or vertical delta is greater.
+     * - If the horizontal distance is greater, this is a swipe and `move` and `end` events follow.
+     * - If the vertical distance is greater, this is a scroll, and we let the browser take over.
+     *   A `cancel` event is sent.
+     *
+     * `move` is called on `mousemove` and `touchmove` after the above logic has determined that
+     * a swipe is in progress.
+     *
+     * `end` is called when a swipe is successfully completed with a `touchend` or `mouseup`.
+     *
+     * `cancel` is called either on a `touchcancel` from the browser, or when we begin scrolling
+     * as described above.
+     *
+     */
+    bind: function(element, eventHandlers) {
+      // Absolute total movement, used to control swipe vs. scroll.
+      var totalX, totalY;
+      // Coordinates of the start position.
+      var startCoords;
+      // Last event's position.
+      var lastPos;
+      // Whether a swipe is active.
+      var active = false;
+
+      element.on('touchstart mousedown', function(event) {
+        startCoords = getCoordinates(event);
+        active = true;
+        totalX = 0;
+        totalY = 0;
+        lastPos = startCoords;
+        eventHandlers['start'] && eventHandlers['start'](startCoords, event);
+      });
+
+      element.on('touchcancel', function(event) {
+        active = false;
+        eventHandlers['cancel'] && eventHandlers['cancel'](event);
+      });
+
+      element.on('touchmove mousemove', function(event) {
+        if (!active) return;
+
+        // Android will send a touchcancel if it thinks we're starting to scroll.
+        // So when the total distance (+ or - or both) exceeds 10px in either direction,
+        // we either:
+        // - On totalX > totalY, we send preventDefault() and treat this as a swipe.
+        // - On totalY > totalX, we let the browser handle it as a scroll.
+
+        if (!startCoords) return;
+        var coords = getCoordinates(event);
+
+        totalX += Math.abs(coords.x - lastPos.x);
+        totalY += Math.abs(coords.y - lastPos.y);
+
+        lastPos = coords;
+
+        if (totalX < MOVE_BUFFER_RADIUS && totalY < MOVE_BUFFER_RADIUS) {
+          return;
+        }
+
+        // One of totalX or totalY has exceeded the buffer, so decide on swipe vs. scroll.
+        if (totalY > totalX) {
+          // Allow native scrolling to take over.
+          active = false;
+          eventHandlers['cancel'] && eventHandlers['cancel'](event);
+          return;
+        } else {
+          // Prevent the browser from scrolling.
+          event.preventDefault();
+          eventHandlers['move'] && eventHandlers['move'](coords, event);
+        }
+      });
+
+      element.on('touchend mouseup', function(event) {
+        if (!active) return;
+        active = false;
+        eventHandlers['end'] && eventHandlers['end'](getCoordinates(event), event);
+      });
+    }
+  };
+}]);
+
+/* global ngTouch: false */
+
+/**
+ * @ngdoc directive
+ * @name ngTouch.directive:ngClick
+ *
+ * @description
+ * A more powerful replacement for the default ngClick designed to be used on touchscreen
+ * devices. Most mobile browsers wait about 300ms after a tap-and-release before sending
+ * the click event. This version handles them immediately, and then prevents the
+ * following click event from propagating.
+ *
+ * Requires the {@link ngTouch `ngTouch`} module to be installed.
+ *
+ * This directive can fall back to using an ordinary click event, and so works on desktop
+ * browsers as well as mobile.
+ *
+ * This directive also sets the CSS class `ng-click-active` while the element is being held
+ * down (by a mouse click or touch) so you can restyle the depressed element if you wish.
+ *
+ * @element ANY
+ * @param {expression} ngClick {@link guide/expression Expression} to evaluate
+ * upon tap. (Event object is available as `$event`)
+ *
+ * @example
+    <doc:example>
+      <doc:source>
+        <button ng-click="count = count + 1" ng-init="count=0">
+          Increment
+        </button>
+        count: {{ count }}
+      </doc:source>
+    </doc:example>
+ */
+
+ngTouch.config(['$provide', function($provide) {
+  $provide.decorator('ngClickDirective', ['$delegate', function($delegate) {
+    // drop the default ngClick directive
+    $delegate.shift();
+    return $delegate;
+  }]);
+}]);
+
+ngTouch.directive('ngClick', ['$parse', '$timeout', '$rootElement',
+    function($parse, $timeout, $rootElement) {
+  var TAP_DURATION = 750; // Shorter than 750ms is a tap, longer is a taphold or drag.
+  var MOVE_TOLERANCE = 12; // 12px seems to work in most mobile browsers.
+  var PREVENT_DURATION = 2500; // 2.5 seconds maximum from preventGhostClick call to click
+  var CLICKBUSTER_THRESHOLD = 25; // 25 pixels in any dimension is the limit for busting clicks.
+
+  var ACTIVE_CLASS_NAME = 'ng-click-active';
+  var lastPreventedTime;
+  var touchCoordinates;
+
+
+  // TAP EVENTS AND GHOST CLICKS
+  //
+  // Why tap events?
+  // Mobile browsers detect a tap, then wait a moment (usually ~300ms) to see if you're
+  // double-tapping, and then fire a click event.
+  //
+  // This delay sucks and makes mobile apps feel unresponsive.
+  // So we detect touchstart, touchmove, touchcancel and touchend ourselves and determine when
+  // the user has tapped on something.
+  //
+  // What happens when the browser then generates a click event?
+  // The browser, of course, also detects the tap and fires a click after a delay. This results in
+  // tapping/clicking twice. So we do "clickbusting" to prevent it.
+  //
+  // How does it work?
+  // We attach global touchstart and click handlers, that run during the capture (early) phase.
+  // So the sequence for a tap is:
+  // - global touchstart: Sets an "allowable region" at the point touched.
+  // - element's touchstart: Starts a touch
+  // (- touchmove or touchcancel ends the touch, no click follows)
+  // - element's touchend: Determines if the tap is valid (didn't move too far away, didn't hold
+  //   too long) and fires the user's tap handler. The touchend also calls preventGhostClick().
+  // - preventGhostClick() removes the allowable region the global touchstart created.
+  // - The browser generates a click event.
+  // - The global click handler catches the click, and checks whether it was in an allowable region.
+  //     - If preventGhostClick was called, the region will have been removed, the click is busted.
+  //     - If the region is still there, the click proceeds normally. Therefore clicks on links and
+  //       other elements without ngTap on them work normally.
+  //
+  // This is an ugly, terrible hack!
+  // Yeah, tell me about it. The alternatives are using the slow click events, or making our users
+  // deal with the ghost clicks, so I consider this the least of evils. Fortunately Angular
+  // encapsulates this ugly logic away from the user.
+  //
+  // Why not just put click handlers on the element?
+  // We do that too, just to be sure. The problem is that the tap event might have caused the DOM
+  // to change, so that the click fires in the same position but something else is there now. So
+  // the handlers are global and care only about coordinates and not elements.
+
+  // Checks if the coordinates are close enough to be within the region.
+  function hit(x1, y1, x2, y2) {
+    return Math.abs(x1 - x2) < CLICKBUSTER_THRESHOLD && Math.abs(y1 - y2) < CLICKBUSTER_THRESHOLD;
+  }
+
+  // Checks a list of allowable regions against a click location.
+  // Returns true if the click should be allowed.
+  // Splices out the allowable region from the list after it has been used.
+  function checkAllowableRegions(touchCoordinates, x, y) {
+    for (var i = 0; i < touchCoordinates.length; i += 2) {
+      if (hit(touchCoordinates[i], touchCoordinates[i+1], x, y)) {
+        touchCoordinates.splice(i, i + 2);
+        return true; // allowable region
+      }
+    }
+    return false; // No allowable region; bust it.
+  }
+
+  // Global click handler that prevents the click if it's in a bustable zone and preventGhostClick
+  // was called recently.
+  function onClick(event) {
+    if (Date.now() - lastPreventedTime > PREVENT_DURATION) {
+      return; // Too old.
+    }
+
+    var touches = event.touches && event.touches.length ? event.touches : [event];
+    var x = touches[0].clientX;
+    var y = touches[0].clientY;
+    // Work around desktop Webkit quirk where clicking a label will fire two clicks (on the label
+    // and on the input element). Depending on the exact browser, this second click we don't want
+    // to bust has either (0,0) or negative coordinates.
+    if (x < 1 && y < 1) {
+      return; // offscreen
+    }
+
+    // Look for an allowable region containing this click.
+    // If we find one, that means it was created by touchstart and not removed by
+    // preventGhostClick, so we don't bust it.
+    if (checkAllowableRegions(touchCoordinates, x, y)) {
+      return;
+    }
+
+    // If we didn't find an allowable region, bust the click.
+    event.stopPropagation();
+    event.preventDefault();
+
+    // Blur focused form elements
+    event.target && event.target.blur();
+  }
+
+
+  // Global touchstart handler that creates an allowable region for a click event.
+  // This allowable region can be removed by preventGhostClick if we want to bust it.
+  function onTouchStart(event) {
+    var touches = event.touches && event.touches.length ? event.touches : [event];
+    var x = touches[0].clientX;
+    var y = touches[0].clientY;
+    touchCoordinates.push(x, y);
+
+    $timeout(function() {
+      // Remove the allowable region.
+      for (var i = 0; i < touchCoordinates.length; i += 2) {
+        if (touchCoordinates[i] == x && touchCoordinates[i+1] == y) {
+          touchCoordinates.splice(i, i + 2);
+          return;
+        }
+      }
+    }, PREVENT_DURATION, false);
+  }
+
+  // On the first call, attaches some event handlers. Then whenever it gets called, it creates a
+  // zone around the touchstart where clicks will get busted.
+  function preventGhostClick(x, y) {
+    if (!touchCoordinates) {
+      $rootElement[0].addEventListener('click', onClick, true);
+      $rootElement[0].addEventListener('touchstart', onTouchStart, true);
+      touchCoordinates = [];
+    }
+
+    lastPreventedTime = Date.now();
+
+    checkAllowableRegions(touchCoordinates, x, y);
+  }
+
+  // Actual linking function.
+  return function(scope, element, attr) {
+    var clickHandler = $parse(attr.ngClick),
+        tapping = false,
+        tapElement,  // Used to blur the element after a tap.
+        startTime,   // Used to check if the tap was held too long.
+        touchStartX,
+        touchStartY;
+
+    function resetState() {
+      tapping = false;
+      element.removeClass(ACTIVE_CLASS_NAME);
+    }
+
+    element.on('touchstart', function(event) {
+      tapping = true;
+      tapElement = event.target ? event.target : event.srcElement; // IE uses srcElement.
+      // Hack for Safari, which can target text nodes instead of containers.
+      if(tapElement.nodeType == 3) {
+        tapElement = tapElement.parentNode;
+      }
+
+      element.addClass(ACTIVE_CLASS_NAME);
+
+      startTime = Date.now();
+
+      var touches = event.touches && event.touches.length ? event.touches : [event];
+      var e = touches[0].originalEvent || touches[0];
+      touchStartX = e.clientX;
+      touchStartY = e.clientY;
+    });
+
+    element.on('touchmove', function(event) {
+      resetState();
+    });
+
+    element.on('touchcancel', function(event) {
+      resetState();
+    });
+
+    element.on('touchend', function(event) {
+      var diff = Date.now() - startTime;
+
+      var touches = (event.changedTouches && event.changedTouches.length) ? event.changedTouches :
+          ((event.touches && event.touches.length) ? event.touches : [event]);
+      var e = touches[0].originalEvent || touches[0];
+      var x = e.clientX;
+      var y = e.clientY;
+      var dist = Math.sqrt( Math.pow(x - touchStartX, 2) + Math.pow(y - touchStartY, 2) );
+
+      if (tapping && diff < TAP_DURATION && dist < MOVE_TOLERANCE) {
+        // Call preventGhostClick so the clickbuster will catch the corresponding click.
+        preventGhostClick(x, y);
+
+        // Blur the focused element (the button, probably) before firing the callback.
+        // This doesn't work perfectly on Android Chrome, but seems to work elsewhere.
+        // I couldn't get anything to work reliably on Android Chrome.
+        if (tapElement) {
+          tapElement.blur();
+        }
+
+        if (!angular.isDefined(attr.disabled) || attr.disabled === false) {
+          element.triggerHandler('click', [event]);
+        }
+      }
+
+      resetState();
+    });
+
+    // Hack for iOS Safari's benefit. It goes searching for onclick handlers and is liable to click
+    // something else nearby.
+    element.onclick = function(event) { };
+
+    // Actual click handler.
+    // There are three different kinds of clicks, only two of which reach this point.
+    // - On desktop browsers without touch events, their clicks will always come here.
+    // - On mobile browsers, the simulated "fast" click will call this.
+    // - But the browser's follow-up slow click will be "busted" before it reaches this handler.
+    // Therefore it's safe to use this directive on both mobile and desktop.
+    element.on('click', function(event, touchend) {
+      scope.$apply(function() {
+        clickHandler(scope, {$event: (touchend || event)});
+      });
+    });
+
+    element.on('mousedown', function(event) {
+      element.addClass(ACTIVE_CLASS_NAME);
+    });
+
+    element.on('mousemove mouseup', function(event) {
+      element.removeClass(ACTIVE_CLASS_NAME);
+    });
+
+  };
+}]);
+
+/* global ngTouch: false */
+
+/**
+ * @ngdoc directive
+ * @name ngTouch.directive:ngSwipeLeft
+ *
+ * @description
+ * Specify custom behavior when an element is swiped to the left on a touchscreen device.
+ * A leftward swipe is a quick, right-to-left slide of the finger.
+ * Though ngSwipeLeft is designed for touch-based devices, it will work with a mouse click and drag
+ * too.
+ *
+ * Requires the {@link ngTouch `ngTouch`} module to be installed.
+ *
+ * @element ANY
+ * @param {expression} ngSwipeLeft {@link guide/expression Expression} to evaluate
+ * upon left swipe. (Event object is available as `$event`)
+ *
+ * @example
+    <doc:example>
+      <doc:source>
+        <div ng-show="!showActions" ng-swipe-left="showActions = true">
+          Some list content, like an email in the inbox
+        </div>
+        <div ng-show="showActions" ng-swipe-right="showActions = false">
+          <button ng-click="reply()">Reply</button>
+          <button ng-click="delete()">Delete</button>
+        </div>
+      </doc:source>
+    </doc:example>
+ */
+
+/**
+ * @ngdoc directive
+ * @name ngTouch.directive:ngSwipeRight
+ *
+ * @description
+ * Specify custom behavior when an element is swiped to the right on a touchscreen device.
+ * A rightward swipe is a quick, left-to-right slide of the finger.
+ * Though ngSwipeRight is designed for touch-based devices, it will work with a mouse click and drag
+ * too.
+ *
+ * Requires the {@link ngTouch `ngTouch`} module to be installed.
+ *
+ * @element ANY
+ * @param {expression} ngSwipeRight {@link guide/expression Expression} to evaluate
+ * upon right swipe. (Event object is available as `$event`)
+ *
+ * @example
+    <doc:example>
+      <doc:source>
+        <div ng-show="!showActions" ng-swipe-left="showActions = true">
+          Some list content, like an email in the inbox
+        </div>
+        <div ng-show="showActions" ng-swipe-right="showActions = false">
+          <button ng-click="reply()">Reply</button>
+          <button ng-click="delete()">Delete</button>
+        </div>
+      </doc:source>
+    </doc:example>
+ */
+
+function makeSwipeDirective(directiveName, direction, eventName) {
+  ngTouch.directive(directiveName, ['$parse', '$swipe', function($parse, $swipe) {
+    // The maximum vertical delta for a swipe should be less than 75px.
+    var MAX_VERTICAL_DISTANCE = 75;
+    // Vertical distance should not be more than a fraction of the horizontal distance.
+    var MAX_VERTICAL_RATIO = 0.3;
+    // At least a 30px lateral motion is necessary for a swipe.
+    var MIN_HORIZONTAL_DISTANCE = 30;
+
+    return function(scope, element, attr) {
+      var swipeHandler = $parse(attr[directiveName]);
+
+      var startCoords, valid;
+
+      function validSwipe(coords) {
+        // Check that it's within the coordinates.
+        // Absolute vertical distance must be within tolerances.
+        // Horizontal distance, we take the current X - the starting X.
+        // This is negative for leftward swipes and positive for rightward swipes.
+        // After multiplying by the direction (-1 for left, +1 for right), legal swipes
+        // (ie. same direction as the directive wants) will have a positive delta and
+        // illegal ones a negative delta.
+        // Therefore this delta must be positive, and larger than the minimum.
+        if (!startCoords) return false;
+        var deltaY = Math.abs(coords.y - startCoords.y);
+        var deltaX = (coords.x - startCoords.x) * direction;
+        return valid && // Short circuit for already-invalidated swipes.
+            deltaY < MAX_VERTICAL_DISTANCE &&
+            deltaX > 0 &&
+            deltaX > MIN_HORIZONTAL_DISTANCE &&
+            deltaY / deltaX < MAX_VERTICAL_RATIO;
+      }
+
+      $swipe.bind(element, {
+        'start': function(coords, event) {
+          startCoords = coords;
+          valid = true;
+        },
+        'cancel': function(event) {
+          valid = false;
+        },
+        'end': function(coords, event) {
+          if (validSwipe(coords)) {
+            scope.$apply(function() {
+              element.triggerHandler(eventName);
+              swipeHandler(scope, {$event: event});
+            });
+          }
+        }
+      });
+    };
+  }]);
+}
+
+// Left is negative X-coordinate, right is positive.
+makeSwipeDirective('ngSwipeLeft', -1, 'swipeleft');
+makeSwipeDirective('ngSwipeRight', 1, 'swiperight');
+
+
+
+})(window, window.angular);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular-touch.min.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular-touch.min.js b/portal/js/libs/angular-1.2.5/angular-touch.min.js
new file mode 100755
index 0000000..7ea7d71
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular-touch.min.js
@@ -0,0 +1,13 @@
+/*
+ AngularJS v1.2.5
+ (c) 2010-2014 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(y,v,z){'use strict';function t(g,a,b){q.directive(g,["$parse","$swipe",function(l,n){var r=75,h=0.3,d=30;return function(p,m,k){function e(e){if(!u)return!1;var c=Math.abs(e.y-u.y);e=(e.x-u.x)*a;return f&&c<r&&0<e&&e>d&&c/e<h}var c=l(k[g]),u,f;n.bind(m,{start:function(e,c){u=e;f=!0},cancel:function(e){f=!1},end:function(a,f){e(a)&&p.$apply(function(){m.triggerHandler(b);c(p,{$event:f})})}})}}])}var q=v.module("ngTouch",[]);q.factory("$swipe",[function(){function g(a){var b=a.touches&&a.touches.length?
+a.touches:[a];a=a.changedTouches&&a.changedTouches[0]||a.originalEvent&&a.originalEvent.changedTouches&&a.originalEvent.changedTouches[0]||b[0].originalEvent||b[0];return{x:a.clientX,y:a.clientY}}return{bind:function(a,b){var l,n,r,h,d=!1;a.on("touchstart mousedown",function(a){r=g(a);d=!0;n=l=0;h=r;b.start&&b.start(r,a)});a.on("touchcancel",function(a){d=!1;b.cancel&&b.cancel(a)});a.on("touchmove mousemove",function(a){if(d&&r){var m=g(a);l+=Math.abs(m.x-h.x);n+=Math.abs(m.y-h.y);h=m;10>l&&10>n||
+(n>l?(d=!1,b.cancel&&b.cancel(a)):(a.preventDefault(),b.move&&b.move(m,a)))}});a.on("touchend mouseup",function(a){d&&(d=!1,b.end&&b.end(g(a),a))})}}}]);q.config(["$provide",function(g){g.decorator("ngClickDirective",["$delegate",function(a){a.shift();return a}])}]);q.directive("ngClick",["$parse","$timeout","$rootElement",function(g,a,b){function l(a,c,b){for(var f=0;f<a.length;f+=2)if(Math.abs(a[f]-c)<d&&Math.abs(a[f+1]-b)<d)return a.splice(f,f+2),!0;return!1}function n(a){if(!(Date.now()-m>h)){var c=
+a.touches&&a.touches.length?a.touches:[a],b=c[0].clientX,c=c[0].clientY;1>b&&1>c||l(k,b,c)||(a.stopPropagation(),a.preventDefault(),a.target&&a.target.blur())}}function r(b){b=b.touches&&b.touches.length?b.touches:[b];var c=b[0].clientX,d=b[0].clientY;k.push(c,d);a(function(){for(var a=0;a<k.length;a+=2)if(k[a]==c&&k[a+1]==d){k.splice(a,a+2);break}},h,!1)}var h=2500,d=25,p="ng-click-active",m,k;return function(a,c,d){function f(){q=!1;c.removeClass(p)}var h=g(d.ngClick),q=!1,s,t,w,x;c.on("touchstart",
+function(a){q=!0;s=a.target?a.target:a.srcElement;3==s.nodeType&&(s=s.parentNode);c.addClass(p);t=Date.now();a=a.touches&&a.touches.length?a.touches:[a];a=a[0].originalEvent||a[0];w=a.clientX;x=a.clientY});c.on("touchmove",function(a){f()});c.on("touchcancel",function(a){f()});c.on("touchend",function(a){var h=Date.now()-t,e=a.changedTouches&&a.changedTouches.length?a.changedTouches:a.touches&&a.touches.length?a.touches:[a],g=e[0].originalEvent||e[0],e=g.clientX,g=g.clientY,p=Math.sqrt(Math.pow(e-
+w,2)+Math.pow(g-x,2));q&&(750>h&&12>p)&&(k||(b[0].addEventListener("click",n,!0),b[0].addEventListener("touchstart",r,!0),k=[]),m=Date.now(),l(k,e,g),s&&s.blur(),v.isDefined(d.disabled)&&!1!==d.disabled||c.triggerHandler("click",[a]));f()});c.onclick=function(a){};c.on("click",function(b,c){a.$apply(function(){h(a,{$event:c||b})})});c.on("mousedown",function(a){c.addClass(p)});c.on("mousemove mouseup",function(a){c.removeClass(p)})}}]);t("ngSwipeLeft",-1,"swipeleft");t("ngSwipeRight",1,"swiperight")})(window,
+window.angular);
+//# sourceMappingURL=angular-touch.min.js.map

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular-touch.min.js.map
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular-touch.min.js.map b/portal/js/libs/angular-1.2.5/angular-touch.min.js.map
new file mode 100755
index 0000000..6681ba1
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular-touch.min.js.map
@@ -0,0 +1,8 @@
+{
+"version":3,
+"file":"angular-touch.min.js",
+"lineCount":12,
+"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CAiftCC,QAASA,EAAkB,CAACC,CAAD,CAAgBC,CAAhB,CAA2BC,CAA3B,CAAsC,CAC/DC,CAAAC,UAAA,CAAkBJ,CAAlB,CAAiC,CAAC,QAAD,CAAW,QAAX,CAAqB,QAAQ,CAACK,CAAD,CAASC,CAAT,CAAiB,CAE7E,IAAIC,EAAwB,EAA5B,CAEIC,EAAqB,GAFzB,CAIIC,EAA0B,EAE9B,OAAO,SAAQ,CAACC,CAAD,CAAQC,CAAR,CAAiBC,CAAjB,CAAuB,CAKpCC,QAASA,EAAU,CAACC,CAAD,CAAS,CAS1B,GAAI,CAACC,CAAL,CAAkB,MAAO,CAAA,CACzB,KAAIC,EAASC,IAAAC,IAAA,CAASJ,CAAAK,EAAT,CAAoBJ,CAAAI,EAApB,CACTC,EAAAA,EAAUN,CAAAO,EAAVD,CAAqBL,CAAAM,EAArBD,EAAsCnB,CAC1C,OAAOqB,EAAP,EACIN,CADJ,CACaT,CADb,EAEa,CAFb,CAEIa,CAFJ,EAGIA,CAHJ,CAGaX,CAHb,EAIIO,CAJJ,CAIaI,CAJb,CAIsBZ,CAhBI,CAJ5B,IAAIe,EAAelB,CAAA,CAAOO,CAAA,CAAKZ,CAAL,CAAP,CAAnB,CAEIe,CAFJ,CAEiBO,CAqBjBhB,EAAAkB,KAAA,CAAYb,CAAZ,CAAqB,OACVc,QAAQ,CAACX,CAAD,CAASY,CAAT,CAAgB,CAC/BX,CAAA,CAAcD,CACdQ,EAAA,CAAQ,CAAA,CAFuB,CADd,QAKTK,QAAQ,CAACD,CAAD,CAAQ,CACxBJ,CAAA,CAAQ,CAAA,CADgB,CALP,KAQZM,QAAQ,CAACd,CAAD,CAASY,CAAT,CAAgB,CACzBb,CAAA,CAAWC,CAAX,CAAJ,EACEJ,CAAAmB,OAA
 A,CAAa,QAAQ,EAAG,CACtBlB,CAAAmB,eAAA,CAAuB5B,CAAvB,CACAqB,EAAA,CAAab,CAAb,CAAoB,QAASgB,CAAT,CAApB,CAFsB,CAAxB,CAF2B,CARZ,CAArB,CAxBoC,CARuC,CAA9C,CAAjC,CAD+D,CA1djE,IAAIvB,EAAUN,CAAAkC,OAAA,CAAe,SAAf,CAA0B,EAA1B,CAuBd5B,EAAA6B,QAAA,CAAgB,QAAhB,CAA0B,CAAC,QAAQ,EAAG,CAIpCC,QAASA,EAAc,CAACP,CAAD,CAAQ,CAC7B,IAAIQ,EAAUR,CAAAQ,QAAA,EAAiBR,CAAAQ,QAAAC,OAAjB;AAAwCT,CAAAQ,QAAxC,CAAwD,CAACR,CAAD,CAClEU,EAAAA,CAAKV,CAAAW,eAALD,EAA6BV,CAAAW,eAAA,CAAqB,CAArB,CAA7BD,EACCV,CAAAY,cADDF,EACwBV,CAAAY,cAAAD,eADxBD,EAEIV,CAAAY,cAAAD,eAAA,CAAmC,CAAnC,CAFJD,EAGAF,CAAA,CAAQ,CAAR,CAAAI,cAHAF,EAG4BF,CAAA,CAAQ,CAAR,CAEhC,OAAO,GACFE,CAAAG,QADE,GAEFH,CAAAI,QAFE,CAPsB,CAa/B,MAAO,MA+BChB,QAAQ,CAACb,CAAD,CAAU8B,CAAV,CAAyB,CAAA,IAEjCC,CAFiC,CAEzBC,CAFyB,CAIjC5B,CAJiC,CAMjC6B,CANiC,CAQjCC,EAAS,CAAA,CAEblC,EAAAmC,GAAA,CAAW,sBAAX,CAAmC,QAAQ,CAACpB,CAAD,CAAQ,CACjDX,CAAA,CAAckB,CAAA,CAAeP,CAAf,CACdmB,EAAA,CAAS,CAAA,CAETF,EAAA,CADAD,CACA,CADS,CAETE,EAAA,CAAU7B,CACV0B,EAAA,MAAA,EAA0BA,CAAA,MAAA,CAAuB1B,CAAvB,CAAoCW,CAApC
 ,CANuB,CAAnD,CASAf,EAAAmC,GAAA,CAAW,aAAX,CAA0B,QAAQ,CAACpB,CAAD,CAAQ,CACxCmB,CAAA,CAAS,CAAA,CACTJ,EAAA,OAAA,EAA2BA,CAAA,OAAA,CAAwBf,CAAxB,CAFa,CAA1C,CAKAf,EAAAmC,GAAA,CAAW,qBAAX,CAAkC,QAAQ,CAACpB,CAAD,CAAQ,CAChD,GAAKmB,CAAL,EAQK9B,CARL,CAQA,CACA,IAAID,EAASmB,CAAA,CAAeP,CAAf,CAEbgB,EAAA,EAAUzB,IAAAC,IAAA,CAASJ,CAAAO,EAAT,CAAoBuB,CAAAvB,EAApB,CACVsB,EAAA,EAAU1B,IAAAC,IAAA,CAASJ,CAAAK,EAAT,CAAoByB,CAAAzB,EAApB,CAEVyB,EAAA,CAAU9B,CArFSiC,GAuFnB,CAAIL,CAAJ,EAvFmBK,EAuFnB,CAAmCJ,CAAnC;CAKIA,CAAJ,CAAaD,CAAb,EAEEG,CACA,CADS,CAAA,CACT,CAAAJ,CAAA,OAAA,EAA2BA,CAAA,OAAA,CAAwBf,CAAxB,CAH7B,GAOEA,CAAAsB,eAAA,EACA,CAAAP,CAAA,KAAA,EAAyBA,CAAA,KAAA,CAAsB3B,CAAtB,CAA8BY,CAA9B,CAR3B,CALA,CARA,CATgD,CAAlD,CAkCAf,EAAAmC,GAAA,CAAW,kBAAX,CAA+B,QAAQ,CAACpB,CAAD,CAAQ,CACxCmB,CAAL,GACAA,CACA,CADS,CAAA,CACT,CAAAJ,CAAA,IAAA,EAAwBA,CAAA,IAAA,CAAqBR,CAAA,CAAeP,CAAf,CAArB,CAA4CA,CAA5C,CAFxB,CAD6C,CAA/C,CA1DqC,CA/BlC,CAjB6B,CAAZ,CAA1B,CAsJAvB,EAAA8C,OAAA,CAAe,CAAC,UAAD,CAAa,QAAQ,CAACC,CAAD,CAAW,CAC7CA,CAAAC,UAAA,C
 AAmB,kBAAnB,CAAuC,CAAC,WAAD,CAAc,QAAQ,CAACC,CAAD,CAAY,CAEvEA,CAAAC,MAAA,EACA,OAAOD,EAHgE,CAAlC,CAAvC,CAD6C,CAAhC,CAAf,CAQAjD,EAAAC,UAAA,CAAkB,SAAlB,CAA6B,CAAC,QAAD,CAAW,UAAX,CAAuB,cAAvB,CACzB,QAAQ,CAACC,CAAD,CAASiD,CAAT,CAAmBC,CAAnB,CAAiC,CA0D3CC,QAASA,EAAqB,CAACC,CAAD,CAAmBpC,CAAnB,CAAsBF,CAAtB,CAAyB,CACrD,IAAK,IAAIuC,EAAI,CAAb,CAAgBA,CAAhB,CAAoBD,CAAAtB,OAApB,CAA6CuB,CAA7C,EAAkD,CAAlD,CACE,GARKzC,IAAAC,IAAA,CAQGuC,CAAAE,CAAiBD,CAAjBC,CARH,CAQ+CtC,CAR/C,CAQL,CARyBuC,CAQzB,EARkD3C,IAAAC,IAAA,CAQrBuC,CAAAI,CAAiBH,CAAjBG,CAAmB,CAAnBA,CARqB,CAQK1C,CARL,CAQlD,CARsEyC,CAQtE,CAEE,MADAH,EAAAK,OAAA,CAAwBJ,CAAxB,CAA2BA,CAA3B,CAA+B,CAA/B,CACO,CAAA,CAAA,CAGX,OAAO,CAAA,CAP8C,CAYvDK,QAASA,EAAO,CAACrC,CAAD,CAAQ,CACtB,GAAI,EAAAsC,IAAAC,IAAA,EAAA,CAAaC,CAAb,CAAiCC,CAAjC,CAAJ,CAAA,CAIA,IAAIjC;AAAUR,CAAAQ,QAAA,EAAiBR,CAAAQ,QAAAC,OAAjB,CAAwCT,CAAAQ,QAAxC,CAAwD,CAACR,CAAD,CAAtE,CACIL,EAAIa,CAAA,CAAQ,CAAR,CAAAK,QADR,CAEIpB,EAAIe,CAAA,CAAQ,CAAR,CAAAM,QAIA,EAAR,CAAInB,CAAJ,EAAiB,CAAjB,CAAaF,CAAb,EAOIqC,CA
 AA,CAAsBC,CAAtB,CAAwCpC,CAAxC,CAA2CF,CAA3C,CAPJ,GAYAO,CAAA0C,gBAAA,EAIA,CAHA1C,CAAAsB,eAAA,EAGA,CAAAtB,CAAA2C,OAAA,EAAgB3C,CAAA2C,OAAAC,KAAA,EAhBhB,CAVA,CADsB,CAiCxBC,QAASA,EAAY,CAAC7C,CAAD,CAAQ,CACvBQ,CAAAA,CAAUR,CAAAQ,QAAA,EAAiBR,CAAAQ,QAAAC,OAAjB,CAAwCT,CAAAQ,QAAxC,CAAwD,CAACR,CAAD,CACtE,KAAIL,EAAIa,CAAA,CAAQ,CAAR,CAAAK,QAAR,CACIpB,EAAIe,CAAA,CAAQ,CAAR,CAAAM,QACRiB,EAAAe,KAAA,CAAsBnD,CAAtB,CAAyBF,CAAzB,CAEAmC,EAAA,CAAS,QAAQ,EAAG,CAElB,IAAK,IAAII,EAAI,CAAb,CAAgBA,CAAhB,CAAoBD,CAAAtB,OAApB,CAA6CuB,CAA7C,EAAkD,CAAlD,CACE,GAAID,CAAA,CAAiBC,CAAjB,CAAJ,EAA2BrC,CAA3B,EAAgCoC,CAAA,CAAiBC,CAAjB,CAAmB,CAAnB,CAAhC,EAAyDvC,CAAzD,CAA4D,CAC1DsC,CAAAK,OAAA,CAAwBJ,CAAxB,CAA2BA,CAA3B,CAA+B,CAA/B,CACA,MAF0D,CAH5C,CAApB,CAQGS,CARH,CAQqB,CAAA,CARrB,CAN2B,CApG7B,IAAIA,EAAmB,IAAvB,CACIP,EAAwB,EAD5B,CAGIa,EAAoB,iBAHxB,CAIIP,CAJJ,CAKIT,CA+HJ,OAAO,SAAQ,CAAC/C,CAAD,CAAQC,CAAR,CAAiBC,CAAjB,CAAuB,CAQpC8D,QAASA,EAAU,EAAG,CACpBC,CAAA,CAAU,CAAA,CACVhE,EAAAiE,YAAA,CAAoBH,CAApB,CAFoB,CARc,IAChCI,EAAexE,CAAA,CAAO
 O,CAAAkE,QAAP,CADiB,CAEhCH,EAAU,CAAA,CAFsB,CAGhCI,CAHgC,CAIhCC,CAJgC,CAKhCC,CALgC,CAMhCC,CAOJvE,EAAAmC,GAAA,CAAW,YAAX;AAAyB,QAAQ,CAACpB,CAAD,CAAQ,CACvCiD,CAAA,CAAU,CAAA,CACVI,EAAA,CAAarD,CAAA2C,OAAA,CAAe3C,CAAA2C,OAAf,CAA8B3C,CAAAyD,WAEjB,EAA1B,EAAGJ,CAAAK,SAAH,GACEL,CADF,CACeA,CAAAM,WADf,CAIA1E,EAAA2E,SAAA,CAAiBb,CAAjB,CAEAO,EAAA,CAAYhB,IAAAC,IAAA,EAER/B,EAAAA,CAAUR,CAAAQ,QAAA,EAAiBR,CAAAQ,QAAAC,OAAjB,CAAwCT,CAAAQ,QAAxC,CAAwD,CAACR,CAAD,CAClEU,EAAAA,CAAIF,CAAA,CAAQ,CAAR,CAAAI,cAAJF,EAAgCF,CAAA,CAAQ,CAAR,CACpC+C,EAAA,CAAc7C,CAAAG,QACd2C,EAAA,CAAc9C,CAAAI,QAfyB,CAAzC,CAkBA7B,EAAAmC,GAAA,CAAW,WAAX,CAAwB,QAAQ,CAACpB,CAAD,CAAQ,CACtCgD,CAAA,EADsC,CAAxC,CAIA/D,EAAAmC,GAAA,CAAW,aAAX,CAA0B,QAAQ,CAACpB,CAAD,CAAQ,CACxCgD,CAAA,EADwC,CAA1C,CAIA/D,EAAAmC,GAAA,CAAW,UAAX,CAAuB,QAAQ,CAACpB,CAAD,CAAQ,CACrC,IAAI6D,EAAOvB,IAAAC,IAAA,EAAPsB,CAAoBP,CAAxB,CAEI9C,EAAWR,CAAAW,eAAD,EAAyBX,CAAAW,eAAAF,OAAzB,CAAwDT,CAAAW,eAAxD,CACRX,CAAAQ,QAAD,EAAkBR,CAAAQ,QAAAC,OAAlB,CAA0CT,CAAAQ,QAA1C,CAA0D,CAACR,CAAD,CAH/D
 ,CAIIU,EAAIF,CAAA,CAAQ,CAAR,CAAAI,cAAJF,EAAgCF,CAAA,CAAQ,CAAR,CAJpC,CAKIb,EAAIe,CAAAG,QALR,CAMIpB,EAAIiB,CAAAI,QANR,CAOIgD,EAAOvE,IAAAwE,KAAA,CAAWxE,IAAAyE,IAAA,CAASrE,CAAT;AAAa4D,CAAb,CAA0B,CAA1B,CAAX,CAA0ChE,IAAAyE,IAAA,CAASvE,CAAT,CAAa+D,CAAb,CAA0B,CAA1B,CAA1C,CAEPP,EAAJ,GAvLegB,GAuLf,CAAeJ,CAAf,EAtLiBK,EAsLjB,CAAsCJ,CAAtC,IA7DG/B,CAwED,GAvEFF,CAAA,CAAa,CAAb,CAAAsC,iBAAA,CAAiC,OAAjC,CAA0C9B,CAA1C,CAAmD,CAAA,CAAnD,CAEA,CADAR,CAAA,CAAa,CAAb,CAAAsC,iBAAA,CAAiC,YAAjC,CAA+CtB,CAA/C,CAA6D,CAAA,CAA7D,CACA,CAAAd,CAAA,CAAmB,EAqEjB,EAlEJS,CAkEI,CAlEgBF,IAAAC,IAAA,EAkEhB,CAhEJT,CAAA,CAAsBC,CAAtB,CAuDsBpC,CAvDtB,CAuDyBF,CAvDzB,CAgEI,CAJI4D,CAIJ,EAHEA,CAAAT,KAAA,EAGF,CAAKzE,CAAAiG,UAAA,CAAkBlF,CAAAmF,SAAlB,CAAL,EAA2D,CAAA,CAA3D,GAAyCnF,CAAAmF,SAAzC,EACEpF,CAAAmB,eAAA,CAAuB,OAAvB,CAAgC,CAACJ,CAAD,CAAhC,CAZJ,CAgBAgD,EAAA,EA1BqC,CAAvC,CA+BA/D,EAAAqF,QAAA,CAAkBC,QAAQ,CAACvE,CAAD,CAAQ,EAQlCf,EAAAmC,GAAA,CAAW,OAAX,CAAoB,QAAQ,CAACpB,CAAD,CAAQwE,CAAR,CAAkB,CAC5CxF,CAAAmB,OAAA,CAAa,QAAQ,EAAG,CACtBgD,C
 AAA,CAAanE,CAAb,CAAoB,QAAUwF,CAAV,EAAsBxE,CAAtB,CAApB,CADsB,CAAxB,CAD4C,CAA9C,CAMAf,EAAAmC,GAAA,CAAW,WAAX,CAAwB,QAAQ,CAACpB,CAAD,CAAQ,CACtCf,CAAA2E,SAAA,CAAiBb,CAAjB,CADsC,CAAxC,CAIA9D,EAAAmC,GAAA,CAAW,mBAAX,CAAgC,QAAQ,CAACpB,CAAD,CAAQ,CAC9Cf,CAAAiE,YAAA,CAAoBH,CAApB,CAD8C,CAAhD,CAxFoC,CAvIK,CADhB,CAA7B,CA4VA1E,EAAA,CAAmB,aAAnB,CAAmC,EAAnC,CAAsC,WAAtC,CACAA,EAAA,CAAmB,cAAnB,CAAmC,CAAnC,CAAsC,YAAtC,CAziBsC,CAArC,CAAA,CA6iBEH,MA7iBF;AA6iBUA,MAAAC,QA7iBV;",
+"sources":["angular-touch.js"],
+"names":["window","angular","undefined","makeSwipeDirective","directiveName","direction","eventName","ngTouch","directive","$parse","$swipe","MAX_VERTICAL_DISTANCE","MAX_VERTICAL_RATIO","MIN_HORIZONTAL_DISTANCE","scope","element","attr","validSwipe","coords","startCoords","deltaY","Math","abs","y","deltaX","x","valid","swipeHandler","bind","start","event","cancel","end","$apply","triggerHandler","module","factory","getCoordinates","touches","length","e","changedTouches","originalEvent","clientX","clientY","eventHandlers","totalX","totalY","lastPos","active","on","MOVE_BUFFER_RADIUS","preventDefault","config","$provide","decorator","$delegate","shift","$timeout","$rootElement","checkAllowableRegions","touchCoordinates","i","x1","CLICKBUSTER_THRESHOLD","y1","splice","onClick","Date","now","lastPreventedTime","PREVENT_DURATION","stopPropagation","target","blur","onTouchStart","push","ACTIVE_CLASS_NAME","resetState","tapping","removeClass","clickHandler","ngClick","tapElement","startTim
 e","touchStartX","touchStartY","srcElement","nodeType","parentNode","addClass","diff","dist","sqrt","pow","TAP_DURATION","MOVE_TOLERANCE","addEventListener","isDefined","disabled","onclick","element.onclick","touchend"]
+}


[49/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/css/usergrid.css
----------------------------------------------------------------------
diff --git a/portal/css/usergrid.css b/portal/css/usergrid.css
deleted file mode 100644
index 9ad390f..0000000
--- a/portal/css/usergrid.css
+++ /dev/null
@@ -1,6358 +0,0 @@
-/* line 17, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
-html, body, div, span, applet, object, iframe,
-h1, h2, h3, h4, h5, h6, p, blockquote, pre,
-a, abbr, acronym, address, big, cite, code,
-del, dfn, em, img, ins, kbd, q, s, samp,
-small, strike, strong, sub, sup, tt, var,
-b, u, i, center,
-dl, dt, dd, ol, ul, li,
-fieldset, form, label, legend,
-table, caption, tbody, tfoot, thead, tr, th, td,
-article, aside, canvas, details, embed,
-figure, figcaption, footer, header, hgroup,
-menu, nav, output, ruby, section, summary,
-time, mark, audio, video {
-  margin: 0;
-  padding: 0;
-  border: 0;
-  font: inherit;
-  font-size: 100%;
-  vertical-align: baseline;
-}
-
-/* line 22, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
-html {
-  line-height: 1;
-}
-
-/* line 24, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
-ol, ul {
-  list-style: none;
-}
-
-/* line 26, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
-table {
-  border-collapse: collapse;
-  border-spacing: 0;
-}
-
-/* line 28, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
-caption, th, td {
-  text-align: left;
-  font-weight: normal;
-  vertical-align: middle;
-}
-
-/* line 30, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
-q, blockquote {
-  quotes: none;
-}
-/* line 103, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
-q:before, q:after, blockquote:before, blockquote:after {
-  content: "";
-  content: none;
-}
-
-/* line 32, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
-a img {
-  border: none;
-}
-
-/* line 116, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
-article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
-  display: block;
-}
-
-/*
- * Bootstrap 2.0.0
- *
- * Copyright 2012 Twitter, Inc
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Designed and built with all the love in the world @twitter by @mdo and @fat.
- * Converted to SASS by Thomas McDonald
- */
-/* line 8, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_reset.scss */
-article, aside, details, figcaption, figure, footer, header, hgroup, nav, section {
-  display: block;
-}
-
-/* line 15, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_reset.scss */
-audio, canvas, video {
-  display: inline-block;
-  *display: inline;
-  *zoom: 1;
-}
-
-/* line 24, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_reset.scss */
-audio:not([controls]) {
-  display: none;
-}
-
-/* line 31, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_reset.scss */
-html {
-  font-size: 100%;
-  -webkit-text-size-adjust: 100%;
-  -ms-text-size-adjust: 100%;
-}
-
-/* line 37, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_reset.scss */
-a:focus {
-  outline: thin dotted;
-  outline: 5px auto -webkit-focus-ring-color;
-  outline-offset: -2px;
-}
-
-/* line 41, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_reset.scss */
-a:hover, a:active {
-  outline: 0;
-}
-
-/* line 48, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_reset.scss */
-sub, sup {
-  position: relative;
-  font-size: 75%;
-  line-height: 0;
-  vertical-align: baseline;
-}
-
-/* line 54, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_reset.scss */
-sup {
-  top: -0.5em;
-}
-
-/* line 57, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_reset.scss */
-sub {
-  bottom: -0.25em;
-}
-
-/* line 64, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_reset.scss */
-img {
-  max-width: 100%;
-  height: auto;
-  border: 0;
-  -ms-interpolation-mode: bicubic;
-}
-
-/* line 75, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_reset.scss */
-button, input, select, textarea {
-  margin: 0;
-  font-size: 100%;
-  vertical-align: middle;
-}
-
-/* line 80, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_reset.scss */
-button, input {
-  *overflow: visible;
-  line-height: normal;
-}
-
-/* line 84, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_reset.scss */
-button::-moz-focus-inner, input::-moz-focus-inner {
-  padding: 0;
-  border: 0;
-}
-
-/* line 88, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_reset.scss */
-button, input[type="button"], input[type="reset"], input[type="submit"] {
-  cursor: pointer;
-  -webkit-appearance: button;
-}
-
-/* line 92, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_reset.scss */
-input[type="search"] {
-  -webkit-appearance: textfield;
-  -webkit-box-sizing: content-box;
-  -moz-box-sizing: content-box;
-  box-sizing: content-box;
-}
-
-/* line 99, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_reset.scss */
-input[type="search"]::-webkit-search-decoration,
-input[type="search"]::-webkit-search-cancel-button {
-  -webkit-appearance: none;
-}
-
-/* line 102, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_reset.scss */
-textarea {
-  overflow: auto;
-  vertical-align: top;
-}
-
-/* line 9, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_scaffolding.scss */
-body {
-  margin: 0;
-  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
-  font-size: 13px;
-  line-height: 18px;
-  color: #333333;
-  background-color: white;
-}
-
-/* line 22, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_scaffolding.scss */
-a {
-  color: #1b97d1;
-  text-decoration: none;
-}
-
-/* line 26, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_scaffolding.scss */
-a:hover {
-  color: #12668d;
-  text-decoration: underline;
-}
-
-/* line 154, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.row {
-  margin-left: -20px;
-  *zoom: 1;
-}
-/* line 15, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.row:before, .row:after {
-  display: table;
-  content: "";
-}
-/* line 19, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.row:after {
-  clear: both;
-}
-
-/* line 159, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-[class*="span"] {
-  float: left;
-  margin-left: 20px;
-}
-
-/* line 164, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.span1 {
-  width: 60px;
-}
-
-/* line 164, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.span2 {
-  width: 140px;
-}
-
-/* line 164, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.span3 {
-  width: 220px;
-}
-
-/* line 164, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.span4 {
-  width: 300px;
-}
-
-/* line 164, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.span5 {
-  width: 380px;
-}
-
-/* line 164, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.span6 {
-  width: 460px;
-}
-
-/* line 164, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.span7 {
-  width: 540px;
-}
-
-/* line 164, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.span8 {
-  width: 620px;
-}
-
-/* line 164, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.span9 {
-  width: 700px;
-}
-
-/* line 164, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.span10 {
-  width: 780px;
-}
-
-/* line 164, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.span11 {
-  width: 860px;
-}
-
-/* line 164, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.span12 {
-  width: 940px;
-}
-
-/* line 166, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.container {
-  width: 940px;
-}
-
-/* line 170, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.offset1 {
-  margin-left: 100px;
-}
-
-/* line 170, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.offset2 {
-  margin-left: 180px;
-}
-
-/* line 170, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.offset3 {
-  margin-left: 260px;
-}
-
-/* line 170, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.offset4 {
-  margin-left: 340px;
-}
-
-/* line 170, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.offset5 {
-  margin-left: 420px;
-}
-
-/* line 170, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.offset6 {
-  margin-left: 500px;
-}
-
-/* line 170, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.offset7 {
-  margin-left: 580px;
-}
-
-/* line 170, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.offset8 {
-  margin-left: 660px;
-}
-
-/* line 170, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.offset9 {
-  margin-left: 740px;
-}
-
-/* line 170, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.offset10 {
-  margin-left: 820px;
-}
-
-/* line 170, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.offset11 {
-  margin-left: 900px;
-}
-
-/* line 186, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.row-fluid {
-  width: 100%;
-  *zoom: 1;
-}
-/* line 15, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.row-fluid:before, .row-fluid:after {
-  display: table;
-  content: "";
-}
-/* line 19, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.row-fluid:after {
-  clear: both;
-}
-/* line 191, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.row-fluid > [class*="span"] {
-  float: left;
-  margin-left: 2.12766%;
-}
-/* line 194, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.row-fluid > [class*="span"]:first-child {
-  margin-left: 0;
-}
-/* line 199, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.row-fluid .span1 {
-  width: 6.38298%;
-}
-/* line 199, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.row-fluid .span2 {
-  width: 14.89362%;
-}
-/* line 199, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.row-fluid .span3 {
-  width: 23.40426%;
-}
-/* line 199, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.row-fluid .span4 {
-  width: 31.91489%;
-}
-/* line 199, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.row-fluid .span5 {
-  width: 40.42553%;
-}
-/* line 199, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.row-fluid .span6 {
-  width: 48.93617%;
-}
-/* line 199, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.row-fluid .span7 {
-  width: 57.44681%;
-}
-/* line 199, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.row-fluid .span8 {
-  width: 65.95745%;
-}
-/* line 199, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.row-fluid .span9 {
-  width: 74.46809%;
-}
-/* line 199, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.row-fluid .span10 {
-  width: 82.97872%;
-}
-/* line 199, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.row-fluid .span11 {
-  width: 91.48936%;
-}
-/* line 199, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.row-fluid .span12 {
-  width: 100.0%;
-}
-
-/* line 8, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_layouts.scss */
-.container {
-  width: 940px;
-  margin-left: auto;
-  margin-right: auto;
-  *zoom: 1;
-}
-/* line 15, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.container:before, .container:after {
-  display: table;
-  content: "";
-}
-/* line 19, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.container:after {
-  clear: both;
-}
-
-/* line 13, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_layouts.scss */
-.container-fluid {
-  padding-left: 20px;
-  padding-right: 20px;
-  *zoom: 1;
-}
-/* line 15, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.container-fluid:before, .container-fluid:after {
-  display: table;
-  content: "";
-}
-/* line 19, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.container-fluid:after {
-  clear: both;
-}
-
-/* line 9, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-p {
-  margin: 0 0 9px;
-  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
-  font-size: 13px;
-  line-height: 18px;
-}
-/* line 14, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-p small {
-  font-size: 11px;
-  color: #999999;
-}
-
-/* line 19, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-.lead {
-  margin-bottom: 18px;
-  font-size: 20px;
-  font-weight: 200;
-  line-height: 27px;
-}
-
-/* line 29, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-h1, h2, h3, h4, h5, h6 {
-  margin: 0;
-  font-weight: bold;
-  color: #333333;
-  text-rendering: optimizelegibility;
-}
-/* line 34, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-h1 small, h2 small, h3 small, h4 small, h5 small, h6 small {
-  font-weight: normal;
-  color: #999999;
-}
-
-/* line 39, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-h1 {
-  font-size: 30px;
-  line-height: 36px;
-}
-/* line 42, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-h1 small {
-  font-size: 18px;
-}
-
-/* line 46, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-h2 {
-  font-size: 24px;
-  line-height: 36px;
-}
-/* line 49, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-h2 small {
-  font-size: 18px;
-}
-
-/* line 53, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-h3 {
-  line-height: 27px;
-  font-size: 18px;
-}
-/* line 56, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-h3 small {
-  font-size: 14px;
-}
-
-/* line 60, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-h4, h5, h6 {
-  line-height: 18px;
-}
-
-/* line 63, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-h4 {
-  font-size: 14px;
-}
-/* line 65, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-h4 small {
-  font-size: 12px;
-}
-
-/* line 69, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-h5 {
-  font-size: 12px;
-}
-
-/* line 72, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-h6 {
-  font-size: 11px;
-  color: #999999;
-  text-transform: uppercase;
-}
-
-/* line 79, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-.page-header {
-  padding-bottom: 17px;
-  margin: 18px 0;
-  border-bottom: 1px solid #eeeeee;
-}
-
-/* line 84, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-.page-header h1 {
-  line-height: 1;
-}
-
-/* line 94, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-ul, ol {
-  padding: 0;
-  margin: 0 0 9px 25px;
-}
-
-/* line 98, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-ul ul, ul ol, ol ol, ol ul {
-  margin-bottom: 0;
-}
-
-/* line 101, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-ul {
-  list-style: disc;
-}
-
-/* line 104, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-ol {
-  list-style: decimal;
-}
-
-/* line 107, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-li {
-  line-height: 18px;
-}
-
-/* line 110, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-ul.unstyled {
-  margin-left: 0;
-  list-style: none;
-}
-
-/* line 116, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-dl {
-  margin-bottom: 18px;
-}
-
-/* line 119, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-dt, dd {
-  line-height: 18px;
-}
-
-/* line 122, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-dt {
-  font-weight: bold;
-}
-
-/* line 125, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-dd {
-  margin-left: 9px;
-}
-
-/* line 133, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-hr {
-  margin: 18px 0;
-  border: 0;
-  border-top: 1px solid #e5e5e5;
-  border-bottom: 1px solid white;
-}
-
-/* line 141, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-strong {
-  font-weight: bold;
-}
-
-/* line 144, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-em {
-  font-style: italic;
-}
-
-/* line 147, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-.muted {
-  color: #999999;
-}
-
-/* line 152, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-abbr {
-  font-size: 90%;
-  text-transform: uppercase;
-  border-bottom: 1px dotted #dddddd;
-  cursor: help;
-}
-
-/* line 160, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-blockquote {
-  padding: 0 0 0 15px;
-  margin: 0 0 18px;
-  border-left: 5px solid #eeeeee;
-}
-/* line 164, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-blockquote p {
-  margin-bottom: 0;
-  font-size: 16px;
-  font-weight: 300;
-  line-height: 22.5px;
-}
-/* line 168, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-blockquote small {
-  display: block;
-  line-height: 18px;
-  color: #999999;
-}
-/* line 172, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-blockquote small:before {
-  content: '\2014 \00A0';
-}
-/* line 178, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-blockquote.pull-right {
-  float: right;
-  padding-left: 0;
-  padding-right: 15px;
-  border-left: 0;
-  border-right: 5px solid #eeeeee;
-}
-/* line 184, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-blockquote.pull-right p, blockquote.pull-right small {
-  text-align: right;
-}
-
-/* line 191, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-q:before, q:after, blockquote:before, blockquote:after {
-  content: "";
-}
-
-/* line 196, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-address {
-  display: block;
-  margin-bottom: 18px;
-  line-height: 18px;
-  font-style: normal;
-}
-
-/* line 204, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-small {
-  font-size: 100%;
-}
-
-/* line 207, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_type.scss */
-cite {
-  font-style: normal;
-}
-
-/* line 6, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_code.scss */
-code, pre {
-  padding: 0 3px 2px;
-  font-family: Menlo, Monaco, "Courier New", monospace;
-  font-size: 12px;
-  color: #333333;
-  -webkit-border-radius: 3px;
-  -moz-border-radius: 3px;
-  border-radius: 3px;
-}
-
-/* line 13, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_code.scss */
-code {
-  padding: 3px 4px;
-  color: #d14;
-  background-color: #f7f7f9;
-  border: 1px solid #e1e1e8;
-}
-
-/* line 19, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_code.scss */
-pre {
-  display: block;
-  padding: 8.5px;
-  margin: 0 0 9px;
-  font-size: 12px;
-  line-height: 18px;
-  background-color: #f5f5f5;
-  border: 1px solid #cccccc;
-  border: 1px solid rgba(0, 0, 0, 0.15);
-  -webkit-border-radius: 4px;
-  -moz-border-radius: 4px;
-  border-radius: 4px;
-  white-space: pre;
-  white-space: pre-wrap;
-  word-break: break-all;
-}
-/* line 34, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_code.scss */
-pre.prettyprint {
-  margin-bottom: 18px;
-}
-/* line 39, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_code.scss */
-pre code {
-  padding: 0;
-  background-color: transparent;
-}
-
-/* line 10, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-form {
-  margin: 0 0 18px;
-}
-
-/* line 14, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-fieldset {
-  padding: 0;
-  margin: 0;
-  border: 0;
-}
-
-/* line 21, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-legend {
-  display: block;
-  width: 100%;
-  padding: 0;
-  margin-bottom: 27px;
-  font-size: 19.5px;
-  line-height: 36px;
-  color: #333333;
-  border: 0;
-  border-bottom: 1px solid #eeeeee;
-}
-
-/* line 34, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-label, input, button, select, textarea {
-  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
-  font-size: 13px;
-  font-weight: normal;
-  line-height: 18px;
-}
-
-/* line 39, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-label {
-  display: block;
-  margin-bottom: 5px;
-  color: #333333;
-}
-
-/* line 46, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-input, textarea, select, .uneditable-input {
-  display: inline-block;
-  width: 210px;
-  height: 18px;
-  padding: 4px;
-  margin-bottom: 9px;
-  font-size: 13px;
-  line-height: 18px;
-  color: #555555;
-  border: 1px solid #cccccc;
-  -webkit-border-radius: 3px;
-  -moz-border-radius: 3px;
-  border-radius: 3px;
-}
-
-/* line 58, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.uneditable-textarea {
-  width: auto;
-  height: auto;
-}
-
-/* line 64, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-label input, label textarea, label select {
-  display: block;
-}
-
-/* line 69, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-input[type="image"], input[type="checkbox"], input[type="radio"] {
-  width: auto;
-  height: auto;
-  padding: 0;
-  margin: 3px 0;
-  *margin-top: 0;
-  /* IE7 */
-  line-height: normal;
-  border: 0;
-  cursor: pointer;
-  -webkit-border-radius: 0;
-  -moz-border-radius: 0;
-  border-radius: 0;
-}
-
-/* line 82, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-input[type="file"] {
-  padding: initial;
-  line-height: initial;
-  border: initial;
-  background-color: white;
-  background-color: initial;
-  -webkit-box-shadow: none;
-  -moz-box-shadow: none;
-  box-shadow: none;
-}
-
-/* line 92, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-input[type="button"], input[type="reset"], input[type="submit"] {
-  width: auto;
-  height: auto;
-}
-
-/* line 98, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-select, input[type="file"] {
-  height: 28px;
-  /* In IE7, the height of the select element cannot be changed by height, only font-size */
-  *margin-top: 4px;
-  /* For IE7, add top margin to align select with labels */
-  line-height: 28px;
-}
-
-/* line 105, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-select {
-  width: 220px;
-  background-color: white;
-}
-
-/* line 111, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-select[multiple], select[size] {
-  height: auto;
-}
-
-/* line 116, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-input[type="image"] {
-  -webkit-box-shadow: none;
-  -moz-box-shadow: none;
-  box-shadow: none;
-}
-
-/* line 121, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-textarea {
-  height: auto;
-}
-
-/* line 126, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-input[type="hidden"] {
-  display: none;
-}
-
-/* line 136, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.radio, .checkbox {
-  padding-left: 18px;
-}
-
-/* line 139, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.radio input[type="radio"], .checkbox input[type="checkbox"] {
-  float: left;
-  margin-left: -18px;
-}
-
-/* line 145, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.controls > .radio:first-child, .controls > .checkbox:first-child {
-  padding-top: 5px;
-}
-
-/* line 150, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.radio.inline, .checkbox.inline {
-  display: inline-block;
-  margin-bottom: 0;
-  vertical-align: middle;
-}
-
-/* line 155, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.radio.inline + .radio.inline, .checkbox.inline + .checkbox.inline {
-  margin-left: 10px;
-}
-
-/* line 159, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.controls > .radio.inline:first-child, .controls > .checkbox.inline:first-child {
-  padding-top: 0;
-}
-
-/* line 168, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-input, textarea {
-  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-  -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
-  -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
-  -ms-transition: border linear 0.2s, box-shadow linear 0.2s;
-  -o-transition: border linear 0.2s, box-shadow linear 0.2s;
-  transition: border linear 0.2s, box-shadow linear 0.2s;
-}
-
-/* line 173, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-input:focus, textarea:focus {
-  border-color: rgba(82, 168, 236, 0.8);
-  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
-  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
-  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
-  outline: 0;
-  outline: thin dotted \9;
-  /* IE6-8 */
-}
-
-/* line 180, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-input[type="file"]:focus, input[type="checkbox"]:focus, select:focus {
-  -webkit-box-shadow: none;
-  -moz-box-shadow: none;
-  box-shadow: none;
-  outline: thin dotted;
-  outline: 5px auto -webkit-focus-ring-color;
-  outline-offset: -2px;
-}
-
-/* line 191, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.input-mini {
-  width: 60px;
-}
-
-/* line 192, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.input-small {
-  width: 90px;
-}
-
-/* line 193, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.input-medium {
-  width: 150px;
-}
-
-/* line 194, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.input-large {
-  width: 210px;
-}
-
-/* line 195, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.input-xlarge {
-  width: 270px;
-}
-
-/* line 196, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.input-xxlarge {
-  width: 530px;
-}
-
-/* line 199, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-input[class*="span"], select[class*="span"], textarea[class*="span"], .uneditable-input {
-  float: none;
-  margin-left: 0;
-}
-
-/* line 214, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-input.span1, textarea.span1, .uneditable-input.span1 {
-  width: 50px;
-}
-/* line 214, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-input.span2, textarea.span2, .uneditable-input.span2 {
-  width: 130px;
-}
-/* line 214, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-input.span3, textarea.span3, .uneditable-input.span3 {
-  width: 210px;
-}
-/* line 214, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-input.span4, textarea.span4, .uneditable-input.span4 {
-  width: 290px;
-}
-/* line 214, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-input.span5, textarea.span5, .uneditable-input.span5 {
-  width: 370px;
-}
-/* line 214, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-input.span6, textarea.span6, .uneditable-input.span6 {
-  width: 450px;
-}
-/* line 214, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-input.span7, textarea.span7, .uneditable-input.span7 {
-  width: 530px;
-}
-/* line 214, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-input.span8, textarea.span8, .uneditable-input.span8 {
-  width: 610px;
-}
-/* line 214, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-input.span9, textarea.span9, .uneditable-input.span9 {
-  width: 690px;
-}
-/* line 214, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-input.span10, textarea.span10, .uneditable-input.span10 {
-  width: 770px;
-}
-/* line 214, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-input.span11, textarea.span11, .uneditable-input.span11 {
-  width: 850px;
-}
-/* line 214, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-input.span12, textarea.span12, .uneditable-input.span12 {
-  width: 930px;
-}
-
-/* line 218, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-input[disabled], select[disabled], textarea[disabled], input[readonly], select[readonly], textarea[readonly] {
-  background-color: #f5f5f5;
-  border-color: #ddd;
-  cursor: not-allowed;
-}
-
-/* line 233, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.control-group.warning > label, .control-group.warning .help-block, .control-group.warning .help-inline {
-  color: #c09853;
-}
-/* line 237, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.control-group.warning input, .control-group.warning select, .control-group.warning textarea {
-  color: #c09853;
-  border-color: #c09853;
-}
-/* line 240, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.control-group.warning input:focus, .control-group.warning select:focus, .control-group.warning textarea:focus {
-  border-color: #a47e3c;
-  -webkit-box-shadow: 0 0 6px #dbc59e;
-  -moz-box-shadow: 0 0 6px #dbc59e;
-  box-shadow: 0 0 6px #dbc59e;
-}
-/* line 246, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.control-group.warning .input-prepend .add-on, .control-group.warning .input-append .add-on {
-  color: #c09853;
-  background-color: #fcf8e3;
-  border-color: #c09853;
-}
-
-/* line 233, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.control-group.error > label, .control-group.error .help-block, .control-group.error .help-inline {
-  color: #b94a48;
-}
-/* line 237, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.control-group.error input, .control-group.error select, .control-group.error textarea {
-  color: #b94a48;
-  border-color: #b94a48;
-}
-/* line 240, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.control-group.error input:focus, .control-group.error select:focus, .control-group.error textarea:focus {
-  border-color: #953b39;
-  -webkit-box-shadow: 0 0 6px #d59392;
-  -moz-box-shadow: 0 0 6px #d59392;
-  box-shadow: 0 0 6px #d59392;
-}
-/* line 246, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.control-group.error .input-prepend .add-on, .control-group.error .input-append .add-on {
-  color: #b94a48;
-  background-color: #f2dede;
-  border-color: #b94a48;
-}
-
-/* line 233, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.control-group.success > label, .control-group.success .help-block, .control-group.success .help-inline {
-  color: #468847;
-}
-/* line 237, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.control-group.success input, .control-group.success select, .control-group.success textarea {
-  color: #468847;
-  border-color: #468847;
-}
-/* line 240, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.control-group.success input:focus, .control-group.success select:focus, .control-group.success textarea:focus {
-  border-color: #356635;
-  -webkit-box-shadow: 0 0 6px #7aba7b;
-  -moz-box-shadow: 0 0 6px #7aba7b;
-  box-shadow: 0 0 6px #7aba7b;
-}
-/* line 246, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.control-group.success .input-prepend .add-on, .control-group.success .input-append .add-on {
-  color: #468847;
-  background-color: #dff0d8;
-  border-color: #468847;
-}
-
-/* line 267, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-input:focus:required:invalid, textarea:focus:required:invalid, select:focus:required:invalid {
-  color: #b94a48;
-  border-color: #ee5f5b;
-}
-/* line 270, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-input:focus:required:invalid:focus, textarea:focus:required:invalid:focus, select:focus:required:invalid:focus {
-  border-color: #e9322d;
-  -webkit-box-shadow: 0 0 6px #f8b9b7;
-  -moz-box-shadow: 0 0 6px #f8b9b7;
-  box-shadow: 0 0 6px #f8b9b7;
-}
-
-/* line 281, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.form-actions {
-  padding: 17px 20px 18px;
-  margin-top: 18px;
-  margin-bottom: 18px;
-  background-color: #f5f5f5;
-  border-top: 1px solid #dddddd;
-}
-
-/* line 290, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.uneditable-input {
-  display: block;
-  background-color: white;
-  border-color: #eee;
-  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
-  -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
-  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
-  cursor: not-allowed;
-}
-
-/* line 84, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-:-moz-placeholder {
-  color: #999999;
-}
-
-/* line 87, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-::-webkit-input-placeholder {
-  color: #999999;
-}
-
-/* line 306, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.help-block {
-  margin-top: 5px;
-  margin-bottom: 0;
-  color: #999999;
-}
-
-/* line 312, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.help-inline {
-  display: inline-block;
-  *display: inline;
-  /* IE7 inline-block hack */
-  *zoom: 1;
-  margin-bottom: 9px;
-  vertical-align: middle;
-  padding-left: 5px;
-}
-
-/* line 326, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.input-prepend, .input-append {
-  margin-bottom: 5px;
-  *zoom: 1;
-}
-/* line 15, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.input-prepend:before, .input-prepend:after, .input-append:before, .input-append:after {
-  display: table;
-  content: "";
-}
-/* line 19, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.input-prepend:after, .input-append:after {
-  clear: both;
-}
-/* line 329, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.input-prepend input, .input-prepend .uneditable-input, .input-append input, .input-append .uneditable-input {
-  -webkit-border-radius: 0 3px 3px 0;
-  -moz-border-radius: 0 3px 3px 0;
-  border-radius: 0 3px 3px 0;
-}
-/* line 331, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.input-prepend input:focus, .input-prepend .uneditable-input:focus, .input-append input:focus, .input-append .uneditable-input:focus {
-  position: relative;
-  z-index: 2;
-}
-/* line 336, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.input-prepend .uneditable-input, .input-append .uneditable-input {
-  border-left-color: #ccc;
-}
-/* line 339, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.input-prepend .add-on, .input-append .add-on {
-  float: left;
-  display: block;
-  width: auto;
-  min-width: 16px;
-  height: 18px;
-  margin-right: -1px;
-  padding: 4px 5px;
-  font-weight: normal;
-  line-height: 18px;
-  color: #999999;
-  text-align: center;
-  text-shadow: 0 1px 0 white;
-  background-color: #f5f5f5;
-  border: 1px solid #cccccc;
-  -webkit-border-radius: 3px 0 0 3px;
-  -moz-border-radius: 3px 0 0 3px;
-  border-radius: 3px 0 0 3px;
-}
-/* line 356, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.input-prepend .active, .input-append .active {
-  background-color: #a9dba9;
-  border-color: #46a546;
-}
-
-/* line 362, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.input-prepend .add-on {
-  *margin-top: 1px;
-  /* IE6-7 */
-}
-
-/* line 367, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.input-append input, .input-append .uneditable-input {
-  float: left;
-  -webkit-border-radius: 3px 0 0 3px;
-  -moz-border-radius: 3px 0 0 3px;
-  border-radius: 3px 0 0 3px;
-}
-/* line 371, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.input-append .uneditable-input {
-  border-right-color: #ccc;
-}
-/* line 374, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.input-append .add-on {
-  margin-right: 0;
-  margin-left: -1px;
-  -webkit-border-radius: 0 3px 3px 0;
-  -moz-border-radius: 0 3px 3px 0;
-  border-radius: 0 3px 3px 0;
-}
-/* line 379, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.input-append input:first-child {
-  *margin-left: -160px;
-}
-/* line 384, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.input-append input:first-child + .add-on {
-  *margin-left: -21px;
-}
-
-/* line 395, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.search-query {
-  padding-left: 14px;
-  padding-right: 14px;
-  margin-bottom: 0;
-  -webkit-border-radius: 14px;
-  -moz-border-radius: 14px;
-  border-radius: 14px;
-}
-
-/* line 411, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.form-search input, .form-search textarea, .form-search select, .form-search .help-inline, .form-search .uneditable-input, .form-inline input, .form-inline textarea, .form-inline select, .form-inline .help-inline, .form-inline .uneditable-input, .form-horizontal input, .form-horizontal textarea, .form-horizontal select, .form-horizontal .help-inline, .form-horizontal .uneditable-input {
-  display: inline-block;
-  margin-bottom: 0;
-}
-
-/* line 416, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.form-search label, .form-inline label, .form-search .input-append, .form-inline .input-append, .form-search .input-prepend, .form-inline .input-prepend {
-  display: inline-block;
-}
-
-/* line 420, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.form-search .input-append .add-on, .form-inline .input-prepend .add-on, .form-search .input-append .add-on, .form-inline .input-prepend .add-on {
-  vertical-align: middle;
-}
-
-/* line 425, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.control-group {
-  margin-bottom: 9px;
-}
-
-/* line 434, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.form-horizontal legend + .control-group {
-  margin-top: 18px;
-  -webkit-margin-top-collapse: separate;
-}
-/* line 439, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.form-horizontal .control-group {
-  margin-bottom: 18px;
-  *zoom: 1;
-}
-/* line 15, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.form-horizontal .control-group:before, .form-horizontal .control-group:after {
-  display: table;
-  content: "";
-}
-/* line 19, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-.form-horizontal .control-group:after {
-  clear: both;
-}
-/* line 444, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.form-horizontal .control-group > label {
-  float: left;
-  width: 140px;
-  padding-top: 5px;
-  text-align: right;
-}
-/* line 451, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.form-horizontal .controls {
-  margin-left: 160px;
-}
-/* line 455, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_forms.scss */
-.form-horizontal .form-actions {
-  padding-left: 160px;
-}
-
-/* line 10, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-table {
-  max-width: 100%;
-  border-collapse: collapse;
-  border-spacing: 0;
-}
-
-/* line 19, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-.table {
-  width: 100%;
-  margin-bottom: 18px;
-}
-/* line 23, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-.table th, .table td {
-  padding: 8px;
-  line-height: 18px;
-  text-align: left;
-  border-top: 1px solid #dddddd;
-}
-/* line 29, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-.table th {
-  font-weight: bold;
-  vertical-align: bottom;
-}
-/* line 33, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-.table td {
-  vertical-align: top;
-}
-/* line 37, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-.table thead:first-child tr th, .table thead:first-child tr td {
-  border-top: 0;
-}
-/* line 41, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-.table tbody + tbody {
-  border-top: 2px solid #dddddd;
-}
-
-/* line 52, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-.table-condensed th, .table-condensed td {
-  padding: 4px 5px;
-}
-
-/* line 61, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-.table-bordered {
-  border: 1px solid #dddddd;
-  border-collapse: separate;
-  *border-collapse: collapsed;
-  -webkit-border-radius: 4px;
-  -moz-border-radius: 4px;
-  border-radius: 4px;
-}
-/* line 66, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-.table-bordered th + th, .table-bordered td + td, .table-bordered th + td, .table-bordered td + th {
-  border-left: 1px solid #dddddd;
-}
-/* line 70, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-.table-bordered thead:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child td {
-  border-top: 0;
-}
-/* line 74, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-.table-bordered thead:first-child tr:first-child th:first-child, .table-bordered tbody:first-child tr:first-child td:first-child {
-  -webkit-border-radius: 4px 0 0 0;
-  -moz-border-radius: 4px 0 0 0;
-  border-radius: 4px 0 0 0;
-}
-/* line 77, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-.table-bordered thead:first-child tr:first-child th:last-child, .table-bordered tbody:first-child tr:first-child td:last-child {
-  -webkit-border-radius: 0 4px 0 0;
-  -moz-border-radius: 0 4px 0 0;
-  border-radius: 0 4px 0 0;
-}
-/* line 81, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-.table-bordered thead:last-child tr:last-child th:first-child, .table-bordered tbody:last-child tr:last-child td:first-child {
-  -webkit-border-radius: 0 0 0 4px;
-  -moz-border-radius: 0 0 0 4px;
-  border-radius: 0 0 0 4px;
-}
-/* line 84, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-.table-bordered thead:last-child tr:last-child th:last-child, .table-bordered tbody:last-child tr:last-child td:last-child {
-  -webkit-border-radius: 0 0 4px 0;
-  -moz-border-radius: 0 0 4px 0;
-  border-radius: 0 0 4px 0;
-}
-
-/* line 96, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-.table-striped tbody tr:nth-child(odd) td, .table-striped tbody tr:nth-child(odd) th {
-  background-color: #f9f9f9;
-}
-
-/* line 115, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-table .span1 {
-  float: none;
-  width: 44px;
-  margin-left: 0;
-}
-/* line 115, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-table .span2 {
-  float: none;
-  width: 124px;
-  margin-left: 0;
-}
-/* line 115, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-table .span3 {
-  float: none;
-  width: 204px;
-  margin-left: 0;
-}
-/* line 115, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-table .span4 {
-  float: none;
-  width: 284px;
-  margin-left: 0;
-}
-/* line 115, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-table .span5 {
-  float: none;
-  width: 364px;
-  margin-left: 0;
-}
-/* line 115, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-table .span6 {
-  float: none;
-  width: 444px;
-  margin-left: 0;
-}
-/* line 115, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-table .span7 {
-  float: none;
-  width: 524px;
-  margin-left: 0;
-}
-/* line 115, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-table .span8 {
-  float: none;
-  width: 604px;
-  margin-left: 0;
-}
-/* line 115, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-table .span9 {
-  float: none;
-  width: 684px;
-  margin-left: 0;
-}
-/* line 115, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-table .span10 {
-  float: none;
-  width: 764px;
-  margin-left: 0;
-}
-/* line 115, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-table .span11 {
-  float: none;
-  width: 844px;
-  margin-left: 0;
-}
-/* line 115, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_tables.scss */
-table .span12 {
-  float: none;
-  width: 924px;
-  margin-left: 0;
-}
-
-/* line 17, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-[class^="icon-"] {
-  display: inline-block;
-  width: 14px;
-  height: 14px;
-  vertical-align: text-top;
-  background-image: url("/images/glyphicons-halflings.png");
-  background-position: 14px 14px;
-  background-repeat: no-repeat;
-  *margin-right: .3em;
-}
-/* line 66, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
-[class^="icon-"]:last-child {
-  *margin-left: 0;
-}
-
-/* line 28, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-white, #application-panel-buttons .active > a i, #app-end-users-buttons .active > a i, #notification-buttons .active > a i, #left-collections-content .active > a i {
-  background-image: url("/images/glyphicons-halflings-white.png");
-}
-
-/* line 32, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-glass {
-  background-position: 0 0;
-}
-
-/* line 33, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-music {
-  background-position: -24px 0;
-}
-
-/* line 34, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-search {
-  background-position: -48px 0;
-}
-
-/* line 35, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-envelope {
-  background-position: -72px 0;
-}
-
-/* line 36, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-heart {
-  background-position: -96px 0;
-}
-
-/* line 37, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-star {
-  background-position: -120px 0;
-}
-
-/* line 38, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-star-empty {
-  background-position: -144px 0;
-}
-
-/* line 39, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-user {
-  background-position: -168px 0;
-}
-
-/* line 40, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-film {
-  background-position: -192px 0;
-}
-
-/* line 41, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-th-large {
-  background-position: -216px 0;
-}
-
-/* line 42, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-th {
-  background-position: -240px 0;
-}
-
-/* line 43, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-th-list {
-  background-position: -264px 0;
-}
-
-/* line 44, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-ok {
-  background-position: -288px 0;
-}
-
-/* line 45, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-remove {
-  background-position: -312px 0;
-}
-
-/* line 46, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-zoom-in {
-  background-position: -336px 0;
-}
-
-/* line 47, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-zoom-out {
-  background-position: -360px 0;
-}
-
-/* line 48, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-off {
-  background-position: -384px 0;
-}
-
-/* line 49, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-signal {
-  background-position: -408px 0;
-}
-
-/* line 50, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-cog {
-  background-position: -432px 0;
-}
-
-/* line 51, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-trash {
-  background-position: -456px 0;
-}
-
-/* line 53, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-home {
-  background-position: 0 -24px;
-}
-
-/* line 54, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-file {
-  background-position: -24px -24px;
-}
-
-/* line 55, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-time {
-  background-position: -48px -24px;
-}
-
-/* line 56, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-road {
-  background-position: -72px -24px;
-}
-
-/* line 57, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-download-alt {
-  background-position: -96px -24px;
-}
-
-/* line 58, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-download {
-  background-position: -120px -24px;
-}
-
-/* line 59, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-upload {
-  background-position: -144px -24px;
-}
-
-/* line 60, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-inbox {
-  background-position: -168px -24px;
-}
-
-/* line 61, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-play-circle {
-  background-position: -192px -24px;
-}
-
-/* line 62, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-repeat {
-  background-position: -216px -24px;
-}
-
-/* line 63, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-refresh {
-  background-position: -240px -24px;
-}
-
-/* line 64, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-list-alt {
-  background-position: -264px -24px;
-}
-
-/* line 65, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-lock {
-  background-position: -287px -24px;
-}
-
-/* line 66, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-flag {
-  background-position: -312px -24px;
-}
-
-/* line 67, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-headphones {
-  background-position: -336px -24px;
-}
-
-/* line 68, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-volume-off {
-  background-position: -360px -24px;
-}
-
-/* line 69, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-volume-down {
-  background-position: -384px -24px;
-}
-
-/* line 70, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-volume-up {
-  background-position: -408px -24px;
-}
-
-/* line 71, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-qrcode {
-  background-position: -432px -24px;
-}
-
-/* line 72, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-barcode {
-  background-position: -456px -24px;
-}
-
-/* line 74, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-tag {
-  background-position: 0 -48px;
-}
-
-/* line 75, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-tags {
-  background-position: -25px -48px;
-}
-
-/* line 76, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-book {
-  background-position: -48px -48px;
-}
-
-/* line 77, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-bookmark {
-  background-position: -72px -48px;
-}
-
-/* line 78, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-print {
-  background-position: -96px -48px;
-}
-
-/* line 79, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-camera {
-  background-position: -120px -48px;
-}
-
-/* line 80, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-font {
-  background-position: -144px -48px;
-}
-
-/* line 81, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-bold {
-  background-position: -167px -48px;
-}
-
-/* line 82, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-italic {
-  background-position: -192px -48px;
-}
-
-/* line 83, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-text-height {
-  background-position: -216px -48px;
-}
-
-/* line 84, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-text-width {
-  background-position: -240px -48px;
-}
-
-/* line 85, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-align-left {
-  background-position: -264px -48px;
-}
-
-/* line 86, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-align-center {
-  background-position: -288px -48px;
-}
-
-/* line 87, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-align-right {
-  background-position: -312px -48px;
-}
-
-/* line 88, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-align-justify {
-  background-position: -336px -48px;
-}
-
-/* line 89, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-list {
-  background-position: -360px -48px;
-}
-
-/* line 90, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-indent-left {
-  background-position: -384px -48px;
-}
-
-/* line 91, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-indent-right {
-  background-position: -408px -48px;
-}
-
-/* line 92, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-facetime-video {
-  background-position: -432px -48px;
-}
-
-/* line 93, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-picture {
-  background-position: -456px -48px;
-}
-
-/* line 95, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-pencil {
-  background-position: 0 -72px;
-}
-
-/* line 96, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-map-marker {
-  background-position: -24px -72px;
-}
-
-/* line 97, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-adjust {
-  background-position: -48px -72px;
-}
-
-/* line 98, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-tint {
-  background-position: -72px -72px;
-}
-
-/* line 99, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-edit {
-  background-position: -96px -72px;
-}
-
-/* line 100, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-share {
-  background-position: -120px -72px;
-}
-
-/* line 101, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-check {
-  background-position: -144px -72px;
-}
-
-/* line 102, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-move {
-  background-position: -168px -72px;
-}
-
-/* line 103, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-step-backward {
-  background-position: -192px -72px;
-}
-
-/* line 104, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-fast-backward {
-  background-position: -216px -72px;
-}
-
-/* line 105, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-backward {
-  background-position: -240px -72px;
-}
-
-/* line 106, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-play {
-  background-position: -264px -72px;
-}
-
-/* line 107, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-pause {
-  background-position: -288px -72px;
-}
-
-/* line 108, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-stop {
-  background-position: -312px -72px;
-}
-
-/* line 109, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-forward {
-  background-position: -336px -72px;
-}
-
-/* line 110, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-fast-forward {
-  background-position: -360px -72px;
-}
-
-/* line 111, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-step-forward {
-  background-position: -384px -72px;
-}
-
-/* line 112, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-eject {
-  background-position: -408px -72px;
-}
-
-/* line 113, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-chevron-left {
-  background-position: -432px -72px;
-}
-
-/* line 114, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-chevron-right {
-  background-position: -456px -72px;
-}
-
-/* line 116, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-plus-sign {
-  background-position: 0 -96px;
-}
-
-/* line 117, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-minus-sign {
-  background-position: -24px -96px;
-}
-
-/* line 118, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-remove-sign {
-  background-position: -48px -96px;
-}
-
-/* line 119, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-ok-sign {
-  background-position: -72px -96px;
-}
-
-/* line 120, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-question-sign {
-  background-position: -96px -96px;
-}
-
-/* line 121, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-info-sign {
-  background-position: -120px -96px;
-}
-
-/* line 122, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-screenshot {
-  background-position: -144px -96px;
-}
-
-/* line 123, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-remove-circle {
-  background-position: -168px -96px;
-}
-
-/* line 124, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-ok-circle {
-  background-position: -192px -96px;
-}
-
-/* line 125, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-ban-circle {
-  background-position: -216px -96px;
-}
-
-/* line 126, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-arrow-left {
-  background-position: -240px -96px;
-}
-
-/* line 127, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-arrow-right {
-  background-position: -264px -96px;
-}
-
-/* line 128, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-arrow-up {
-  background-position: -289px -96px;
-}
-
-/* line 129, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-arrow-down {
-  background-position: -312px -96px;
-}
-
-/* line 130, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-share-alt {
-  background-position: -336px -96px;
-}
-
-/* line 131, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-resize-full {
-  background-position: -360px -96px;
-}
-
-/* line 132, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-resize-small {
-  background-position: -384px -96px;
-}
-
-/* line 133, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-plus {
-  background-position: -408px -96px;
-}
-
-/* line 134, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-minus {
-  background-position: -433px -96px;
-}
-
-/* line 135, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-asterisk {
-  background-position: -456px -96px;
-}
-
-/* line 137, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-exclamation-sign {
-  background-position: 0 -120px;
-}
-
-/* line 138, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-gift {
-  background-position: -24px -120px;
-}
-
-/* line 139, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-leaf {
-  background-position: -48px -120px;
-}
-
-/* line 140, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-fire {
-  background-position: -72px -120px;
-}
-
-/* line 141, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-eye-open {
-  background-position: -96px -120px;
-}
-
-/* line 142, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-eye-close {
-  background-position: -120px -120px;
-}
-
-/* line 143, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-warning-sign {
-  background-position: -144px -120px;
-}
-
-/* line 144, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-plane {
-  background-position: -168px -120px;
-}
-
-/* line 145, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-calendar {
-  background-position: -192px -120px;
-}
-
-/* line 146, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-random {
-  background-position: -216px -120px;
-}
-
-/* line 147, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-comment {
-  background-position: -240px -120px;
-}
-
-/* line 148, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-magnet {
-  background-position: -264px -120px;
-}
-
-/* line 149, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-chevron-up {
-  background-position: -288px -120px;
-}
-
-/* line 150, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-chevron-down {
-  background-position: -313px -119px;
-}
-
-/* line 151, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-retweet {
-  background-position: -336px -120px;
-}
-
-/* line 152, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-shopping-cart {
-  background-position: -360px -120px;
-}
-
-/* line 153, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-folder-close {
-  background-position: -384px -120px;
-}
-
-/* line 154, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-folder-open {
-  background-position: -408px -120px;
-}
-
-/* line 155, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-resize-vertical {
-  background-position: -432px -119px;
-}
-
-/* line 156, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_sprites.scss */
-.icon-resize-horizontal {
-  background-position: -456px -118px;
-}
-
-/* line 5, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_dropdowns.scss */
-.dropdown {
-  position: relative;
-}
-
-/* line 8, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_dropdowns.scss */
-.dropdown-toggle {
-  *margin-bottom: -3px;
-}
-
-/* line 12, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_dropdowns.scss */
-.dropdown-toggle:active, .open .dropdown-toggle {
-  outline: 0;
-}
-
-/* line 16, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_dropdowns.scss */
-.caret {
-  display: inline-block;
-  width: 0;
-  height: 0;
-  text-indent: -99999px;
-  *text-indent: 0;
-  vertical-align: top;
-  border-left: 4px solid transparent;
-  border-right: 4px solid transparent;
-  border-top: 4px solid black;
-  opacity: 0.3;
-  filter: alpha(opacity=30);
-  content: "\2193";
-}
-
-/* line 31, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_dropdowns.scss */
-.dropdown .caret {
-  margin-top: 8px;
-  margin-left: 2px;
-}
-
-/* line 35, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_dropdowns.scss */
-.dropdown:hover .caret, .open.dropdown .caret {
-  opacity: 1;
-  filter: alpha(opacity=100);
-}
-
-/* line 39, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_dropdowns.scss */
-.dropdown-menu {
-  position: absolute;
-  top: 100%;
-  left: 0;
-  z-index: 1000;
-  float: left;
-  display: none;
-  min-width: 160px;
-  max-width: 220px;
-  _width: 160px;
-  padding: 4px 0;
-  margin: 0;
-  list-style: none;
-  background-color: white;
-  border-color: #ccc;
-  border-color: rgba(0, 0, 0, 0.2);
-  border-style: solid;
-  border-width: 1px;
-  -webkit-border-radius: 0 0 5px 5px;
-  -moz-border-radius: 0 0 5px 5px;
-  border-radius: 0 0 5px 5px;
-  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-  -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-  -webkit-background-clip: padding-box;
-  -moz-background-clip: padding;
-  background-clip: padding-box;
-  *border-right-width: 2px;
-  *border-bottom-width: 2px;
-}
-/* line 66, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_dropdowns.scss */
-.dropdown-menu.bottom-up {
-  top: auto;
-  bottom: 100%;
-  margin-bottom: 2px;
-}
-/* line 73, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_dropdowns.scss */
-.dropdown-menu .divider {
-  height: 1px;
-  margin: 5px 1px;
-  overflow: hidden;
-  background-color: #e5e5e5;
-  border-bottom: 1px solid white;
-  *width: 100%;
-  *margin: -5px 0 5px;
-}
-/* line 89, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_dropdowns.scss */
-.dropdown-menu a {
-  display: block;
-  padding: 3px 15px;
-  clear: both;
-  font-weight: normal;
-  line-height: 18px;
-  color: #555555;
-  white-space: nowrap;
-}
-
-/* line 101, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_dropdowns.scss */
-.dropdown-menu li > a:hover, .dropdown-menu .active > a, .dropdown-menu .active > a:hover {
-  color: white;
-  text-decoration: none;
-  background-color: #1b97d1;
-}
-
-/* line 108, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_dropdowns.scss */
-.dropdown.open {
-  *z-index: 1000;
-}
-/* line 113, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_dropdowns.scss */
-.dropdown.open .dropdown-toggle {
-  color: white;
-  background: #ccc;
-  background: rgba(0, 0, 0, 0.3);
-}
-/* line 118, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_dropdowns.scss */
-.dropdown.open .dropdown-menu {
-  display: block;
-}
-
-/* line 124, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_dropdowns.scss */
-.typeahead {
-  margin-top: 2px;
-  -webkit-border-radius: 4px;
-  -moz-border-radius: 4px;
-  border-radius: 4px;
-}
-
-/* line 4, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_wells.scss */
-.well, .suggestionsBox {
-  min-height: 20px;
-  padding: 19px;
-  margin-bottom: 20px;
-  background-color: #f5f5f5;
-  border: 1px solid #eeeeee;
-  border: 1px solid rgba(0, 0, 0, 0.05);
-  -webkit-border-radius: 4px;
-  -moz-border-radius: 4px;
-  border-radius: 4px;
-  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
-  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
-  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
-}
-/* line 13, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_wells.scss */
-.well blockquote, .suggestionsBox blockquote {
-  border-color: #ddd;
-  border-color: rgba(0, 0, 0, 0.15);
-}
-
-/* line 4, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_component-animations.scss */
-.fade {
-  -webkit-transition: opacity 0.15s linear;
-  -moz-transition: opacity 0.15s linear;
-  -ms-transition: opacity 0.15s linear;
-  -o-transition: opacity 0.15s linear;
-  transition: opacity 0.15s linear;
-  opacity: 0;
-}
-/* line 7, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_component-animations.scss */
-.fade.in {
-  opacity: 1;
-}
-
-/* line 12, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_component-animations.scss */
-.collapse {
-  -webkit-transition: height 0.35s ease;
-  -moz-transition: height 0.35s ease;
-  -ms-transition: height 0.35s ease;
-  -o-transition: height 0.35s ease;
-  transition: height 0.35s ease;
-  position: relative;
-  overflow: hidden;
-  height: 0;
-}
-/* line 17, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_component-animations.scss */
-.collapse.in {
-  height: auto;
-}
-
-/* line 4, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_close.scss */
-.close {
-  float: right;
-  font-size: 20px;
-  font-weight: bold;
-  line-height: 18px;
-  color: black;
-  text-shadow: 0 1px 0 white;
-  opacity: 0.2;
-  filter: alpha(opacity=20);
-}
-/* line 12, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_close.scss */
-.close:hover {
-  color: black;
-  text-decoration: none;
-  opacity: 0.4;
-  filter: alpha(opacity=40);
-  cursor: pointer;
-}
-
-/* line 9, ../../opt/vagrant_ruby/lib/ruby/gems/1.8/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_buttons.scss */
-.btn {
-  display: inline-block;
-  padding: 4px 10px 4px;
-  font-size: 13px;
-  line-height: 18px;
-  color: #333333;
-  text-align: center;
-  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
-  background-color: #fafafa;
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(white), color-stop(25%, white), to(#e6e6e6));
-  background-image: -webkit-linear-gradient(white, white 25%, #e6e6e6);
-  background-image: -moz-linear-gradient(top, white, white 25%, #e6e6e6);
-  background-image: -ms-linear-gradient(white, white 25%, #e6e6e6);
-  background-image: -o-linear-gradient(white, white 25%, #e6e6e6);
-  background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-  background

<TRUNCATED>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/android-sdk-download.png
----------------------------------------------------------------------
diff --git a/portal/images/android-sdk-download.png b/portal/images/android-sdk-download.png
deleted file mode 100644
index 29019b8..0000000
Binary files a/portal/images/android-sdk-download.png and /dev/null differ


[44/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app/helpers.js
----------------------------------------------------------------------
diff --git a/portal/js/app/helpers.js b/portal/js/app/helpers.js
deleted file mode 100644
index 7e1d0f7..0000000
--- a/portal/js/app/helpers.js
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * This file contains helper functions: Stuff used all over the application but not necessarily part of a module/object/paradigm/something.
- *
- * If your can't find where a function is defined, it's probably here. :)
- *
- * They need to be cleaned up. SOON!
- *
- */
-
-var onIE = navigator.userAgent.indexOf("MSIE") >= 0;
-
-function indexOfFirstType(type, args) {
-  for (var i = 0; i < args.length; i++) {
-    if (!args[i]) return - 1;
-    if (typeof args[i] == type) return i;
-  }
-  return - 1;
-}
-
-function getByType(type, i, args) {
-  var j = indexOfFirstType(type, args);
-  if (j < 0) return null;
-  var k = 0;
-  while ((j < args.length) && (k <= i)) {
-    if (type == "object") {
-      if (args[j].constructor != Object) return null;
-    } else if (typeof args[j] != type) return null;
-    if (k == i) return args[j];
-    j++;
-    k++;
-  }
-  return null;
-}
-
-function countByType(type, args) {
-  var c = 0;
-  var j = indexOfFirstType(type, args);
-  if (j < 0) return c;
-  while (j < args.length) {
-    if (type == "object") {
-      if (args[j].constructor != Object) return c;
-    } else if (typeof args[j] != type) return c;
-    j++;
-    c++;
-  }
-  return null;
-}
-
-function encodeParams(params) {
-  tail = [];
-  if (params instanceof Array) {
-    for (i in params) {
-      var item = params[i];
-      if ((item instanceof Array) && (item.length > 1)) {
-        tail.push(item[0] + "=" + encodeURIComponent(item[1]));
-      }
-    }
-  } else {
-    for (var key in params) {
-      if (params.hasOwnProperty(key)) {
-        var value = params[key];
-        if (value instanceof Array) {
-          for (i in value) {
-            var item = value[i];
-            tail.push(key + "=" + encodeURIComponent(item));
-          }
-        } else {
-          tail.push(key + "=" + encodeURIComponent(value));
-        }
-      }
-    }
-  }
-  return tail.join("&");
-}
-
-function encodePathString(path, returnParams) {
-
-  var i = 0;
-  var segments = new Array();
-  var payload = null;
-  while (i < path.length) {
-    var c = path.charAt(i);
-    if (c == '{') {
-      var bracket_start = i;
-      i++;
-      var bracket_count = 1;
-      while ((i < path.length) && (bracket_count > 0)) {
-        c = path.charAt(i);
-        if (c == '{') {
-          bracket_count++;
-        } else if (c == '}') {
-          bracket_count--;
-        }
-        i++;
-      }
-      if (i > bracket_start) {
-        var segment = path.substring(bracket_start, i);
-        segments.push(JSON.parse(segment));
-      }
-      continue;
-    } else if (c == '/') {
-      i++;
-      var segment_start = i;
-      while (i < path.length) {
-        c = path.charAt(i);
-        if ((c == ' ') || (c == '/') || (c == '{')) {
-          break;
-        }
-        i++;
-      }
-      if (i > segment_start) {
-        var segment = path.substring(segment_start, i);
-        segments.push(segment);
-      }
-      continue;
-    } else if (c == ' ') {
-      i++;
-      var payload_start = i;
-      while (i < path.length) {
-        c = path.charAt(i);
-        i++;
-      }
-      if (i > payload_start) {
-        var json = path.substring(payload_start, i).trim();
-        payload = JSON.parse(json);
-      }
-      break;
-    }
-    i++;
-  }
-
-  var newPath = "";
-  for (i = 0; i < segments.length; i++) {
-    var segment = segments[i];
-    if (typeof segment === "string") {
-      newPath += "/" + segment;
-    } else {
-      if (i == (segments.length - 1)) {
-        if (returnParams) {
-          return {path : newPath, params: segment, payload: payload};
-        }
-        newPath += "?";
-      } else {
-        newPath += ";";
-      }
-      newPath += encodeParams(segment);
-    }
-  }
-  if (returnParams) {
-    return {path : newPath, params: null, payload: payload};
-  }
-  return newPath;
-}
-
-function getQueryParams() {
-  var query_params = {};
-  if (window.location.search) {
-    // split up the query string and store in an associative array
-    var params = window.location.search.slice(1).split("&");
-    for (var i = 0; i < params.length; i++) {
-      var tmp = params[i].split("=");
-      query_params[tmp[0]] = unescape(tmp[1]);
-    }
-  }
-
-  return query_params;
-}
-
-function prepareLocalStorage() {
-  if (!Storage.prototype.setObject) {
-    Storage.prototype.setObject = function(key, value) {
-      this.setItem(key, JSON.stringify(value));
-    };
-  }
-  if (!Storage.prototype.getObject) {
-    Storage.prototype.getObject = function(key) {
-      try {
-        return this.getItem(key) && JSON.parse(this.getItem(key));
-      } catch(err) {
-      }
-      return null;
-    };
-  }
-}
-
-// if all of our vars are in the query string, grab them and save them
-function parseParams() {
-  var query_params = {};
-  if (window.location.search) {
-    // split up the query string and store in an associative array
-    var params = window.location.search.slice(1).split("&");
-    for (var i = 0; i < params.length; i++) {
-      var tmp = params[i].split("=");
-      query_params[tmp[0]] = unescape(tmp[1]);
-    }
-  }
-
-  if (query_params.access_token && query_params.admin_email && query_params.uuid) {
-    Usergrid.userSession.setAccessToken(query_params.access_token);
-    Usergrid.userSession.setUserEmail(query_params.admin_email);
-    Usergrid.userSession.setUserUUID(query_params.uuid);
-    //then send the user to the parent
-    var new_target = window.location.host + window.location.pathname;
-
-    var separatorMark = '?';
-    if (query_params.api_url) {
-      new_target = new_target + separatorMark + 'api_url=' + query_params.api_url;
-      separatorMark = '&';
-    }
-
-    if (query_params.use_sso) {
-      new_target = new_target + separatorMark + 'use_sso=' + query_params.use_sso;
-      separatorMark = '&';
-    }
-
-    window.location = window.location.protocol + '//' + new_target;
-    throw "stop!";
-  }
-}
-
-function dateToString(numberDate){
-  var date = new Date(numberDate);
-  return date.toString('dd MMM yyyy - h:mm tt ');
-}
-
-/* move toggleablesections to console? */
-function toggleableSections() {
-  $(document).on('click', '.title', function() {
-    $(this).parent().parent().find('.hideable').toggle();
-  })
-}
-
-function selectFirstElement(object) {
-  var first = null;
-  for (first in object) {
-    break
-  }
-  return first
-}
-
-

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app/navigation.js
----------------------------------------------------------------------
diff --git a/portal/js/app/navigation.js b/portal/js/app/navigation.js
deleted file mode 100644
index f4b33eb..0000000
--- a/portal/js/app/navigation.js
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
-  * Usergrid.Navigation
-  *
-  * Functions to control the navigation of the Console client
-  *
-  * Uses:  Backbone.router
-  *
-  * Requires: Backbonejs, Underscore.js
-  *
-  */
-Usergrid.Navigation = Backbone.Router.extend({
-    routes: {
-      ":organization/:application/organization": "home",
-      ":organization/:application/dashboard": "dashboard",
-      ":organization/:application/users": "users",
-      ":organization/:application/groups": "groups",
-      ":organization/:application/roles": "roles",
-      ":organization/:application/activities": "activities",
-      ":organization/:application/collections": "collections",
-      ":organization/:application/sendNotification": "sendNotification",
-      ":organization/:application/messageHistory": "messageHistory",
-      ":organization/:application/configuration": "configuration",
-      ":organization/:application/getStarted": "getStarted",
-      ":organization/:application/analytics": "analytics",
-      ":organization/:application/properties": "properties",
-      ":organization/:application/shell": "shell",
-      ":organization/:application/account": "account",
-      ":organization/home": "home",
-      ":organization": "home",
-      "": "home"
-    },
-    //Router Methods
-    home: function(organization, application) {
-      if(organization) {
-        this.checkOrganization(organization);
-      }
-      this.checkApplication(application);
-      Pages.SelectPanel('organization');
-      $('#left2').hide();
-    },
-    dashboard: function(organization,application) {
-      this.checkOrganization(organization);
-      this.checkApplication(application);
-      Usergrid.console.pageSelect(application);
-      Pages.SelectPanel('dashboard');
-      $('#left2').hide();
-    },
-    users: function(organization, application) {
-      this.checkOrganization(organization);
-      this.checkApplication(application);
-      Pages.SelectPanel('users');
-      this.showAppUserContent();
-    },
-    groups: function(organization, application) {
-      this.checkOrganization(organization);
-      this.checkApplication(application);
-      Pages.SelectPanel('groups');
-      this.showAppUserContent();
-    },
-    roles: function(organization, application) {
-      this.checkOrganization(organization);
-      this.checkApplication(application);
-      Pages.SelectPanel('roles');
-      this.showAppUserContent();
-    },
-    activities: function(organization, application) {
-      this.checkOrganization(organization);
-      this.checkApplication(application);
-      Pages.SelectPanel('activities');
-      $('#left2').hide();
-    },
-    collections: function(organization, application) {
-      this.checkOrganization(organization);
-      this.checkApplication(application);
-      Pages.ActivatePanel("collections");
-      Pages.SelectPanel('collections');
-      this.showAppDataContent();
-    },
-    messageHistory: function(organization, application) {
-      this.checkOrganization(organization);
-      this.checkApplication(application);
-      Pages.ActivatePanel("messageHistory");
-      Pages.SelectPanel('messageHistory');
-    },
-    configuration: function(organization, application) {
-      this.checkOrganization(organization);
-      this.checkApplication(application);
-      Pages.ActivatePanel("configuration");
-      Pages.SelectPanel('configuration');
-    },
-    getStarted: function(organization, application) {
-      this.checkOrganization(organization);
-      this.checkApplication(application);
-      Pages.ActivatePanel("getStarted");
-      Pages.SelectPanel('getStarted');
-    },
-    analytics: function(organization, application) {
-      this.checkOrganization(organization);
-      this.checkApplication(application);
-      Pages.SelectPanel('analytics');
-      $('#left2').hide();
-    },
-    properties: function(organization, application) {
-      this.checkOrganization(organization);
-      this.checkApplication(application);
-      Pages.SelectPanel('properties');
-      $('#left2').hide();
-    },
-    shell: function(organization, application) {
-      this.checkOrganization(organization);
-      this.checkApplication(application);
-      Pages.SelectPanel('shell');
-      $('#left2').hide();
-    },
-    account: function(organization, application) {
-      Pages.SelectPanel('account');
-      $('#left2').hide();
-    },
-    //Utils
-    checkOrganization: function(org) {
-      if(!this.isActiveOrganization(org)) {
-        Usergrid.console.selectOrganization(org);
-      }
-    },
-    isActiveOrganization: function(org) {
-      if(org) {
-        if(Usergrid.ApiClient.getOrganizationName() === org ) {
-          return true
-        }
-      }
-      return false
-    },
-    checkApplication: function(app) {
-      if(app){
-        if(!this.isActiveApplication(app)) {
-          Usergrid.console.pageSelect(app);
-        }
-      }
-    },
-    isActiveApplication: function(app) {
-      if(app) {
-        if(Usergrid.ApiClient.getApplicationName() === app) {
-          return true
-        }
-      }
-      return false
-    },
-    getAppNameFromURL: function(){
-      name = '';
-      try  {
-        name = window.location.hash.split('/')[1];
-      } catch (e) {}
-      return name;
-    },
-    getOrgNameFromURL: function(){
-      name = '';
-      try  {
-        name = window.location.hash.split('/')[0];
-        name = name.replace("#","");
-      } catch (e) {}
-      return name;
-    },
-    showAppUserContent: function(){
-      $('#left2').show();
-      $('#sidebar-menu2').show();
-      $('#left-collections-menu').hide();
-    },
-    showAppDataContent: function(){
-      $('#left2').show();
-      $('#sidebar-menu2').hide();
-      $('#left-collections-menu').show();
-    },
-    navigateTo: function(address) {
-      var url;
-      url = Usergrid.ApiClient.getOrganizationName();
-      url += "/" + Usergrid.ApiClient.getApplicationName();
-      url += "/" + address;
-      // Backbone navigate only triggers page loading if url changes
-      // loading manually if the url hasn't changed is necessary.
-      if(Backbone.history.fragment === url) {
-        Backbone.history.loadUrl(url);
-      } else {
-        this.navigate(url, {trigger: true});
-      }
-    }
-  });
-
-Usergrid.Navigation.router = new Usergrid.Navigation();
-_.bindAll(Usergrid.Navigation.router);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app/pages.js
----------------------------------------------------------------------
diff --git a/portal/js/app/pages.js b/portal/js/app/pages.js
deleted file mode 100644
index 25c03f0..0000000
--- a/portal/js/app/pages.js
+++ /dev/null
@@ -1,154 +0,0 @@
-function ApigeePages() {
-  var self = {
-    pages: {},
-    panels: {},
-    resetPasswordUrl: ''
-    };
-
-  self.clearPage = function(){
-    $("#pages > div").hide();
-  };
-
-  self.ShowPage = function(pageName){
-    // console.log('showing ' + pageName);
-    $("#pages > div").hide();
-    var page = self.pages[pageName];
-    page.box.show();
-    $(".navbar li.active").removeClass('active');
-    $(".navbar .navbar-inner").hide();
-
-    if(page.link.parent().parent().hasClass("dropdown-menu")) {
-      page.link.parent().parent().parent().addClass('active');
-    } else {
-      page.menu.show();
-    }
-
-    if(page.showFunction) {
-      page.showFunction();
-    }
-
-    if(Usergrid.userSession.getBannerState() == 'true'){
-      this.showBanner();
-    }
-  };
-  self.showBanner = function(){
-    Usergrid.userSession.showBanner();
-    $('#banner').show();
-  };
-
-  self.hideBanner = function(){
-    Usergrid.userSession.hideBanner();
-    $("#banner").hide();
-  };
-
-  self.AddPage = function(page) {
-    if(!page.link)
-      page.link = $("#" + page.name + '-link');
-
-    if(!page.box)
-      page.box = $("#" + page.name + '-page');
-
-    page.link.click(function(e) {
-      e.preventDefault();
-      if(!page.link.hasClass("dropdown-toggle"))
-        self.ShowPage(page.name);
-    });
-
-    LoadPage(page);
-    self.pages[page.name] = page;
-  };
-
-  self.AddPanel = function(panelName, linkSelector, sublinkSelector,boxSelector,initFunction,showFunction, buttonHandler) {
-    if (!linkSelector) {
-      //linkSelector = "#sidebar-menu a[href='#" + panelName + "']";
-      linkSelector = "#" + panelName  + '-link';
-    }
-    if (!sublinkSelector) {
-      sublinkSelector = "#" + panelName  + '-sublink';
-    }
-
-    if (!boxSelector) {
-      boxSelector = "#" + panelName + '-panel';
-    }
-
-    var panel = {
-      name: panelName,
-      link: $(linkSelector),
-      sublink: $(sublinkSelector),
-      box: $(boxSelector),
-      initFunction: initFunction,
-      showFunction: showFunction
-    };
-
-    if(!buttonHandler) {
-      buttonHandler = function(e) {
-        e.preventDefault();
-        redrawBox(panel.box);
-        if(panel.name == "query") {
-          Usergrid.Navigation.router.navigateTo("collections");
-        } else {
-          Usergrid.Navigation.router.navigateTo(panel.name);
-        }
-      }
-    }
-    panel.link.click(buttonHandler);
-    panel.sublink.click(buttonHandler);
-
-    self.panels[panel.name] = panel;
-
-    if (panel.initFunction) {
-      panel.initFunction();
-    }
-  };
-
-  self.ActivatePanel = function(panelName){
-    var panel = self.panels[panelName];
-    $("#sidebar-menu li.active").removeClass('active');
-    $("#"+panelName+"-link").parent().addClass('active');
-
-    $("#left-notifications-menu li.active").removeClass('active');
-
-  }
-
-  self.SelectPanel = function (panelName){
-    var panel = self.panels[panelName];
-
-    $("#sidebar-menu li.active").removeClass('active');
-    $("#sidebar-menu2 li.active").removeClass('active');
-    panel.link.parent().addClass('active');
-    panel.sublink.parent().addClass('active');
-
-    Usergrid.console.setupMenu();
-    Usergrid.console.requestApplications();
-    if (panel.showFunction) {
-      panel.showFunction();
-    }
-
-    redrawBox(panel.box);
-
-  };
-
-  function LoadPage(page){
-
-    if (page.name=='forgot-password') {
-      $("#forgot-password-page iframe").attr("src", self.resetPasswordUrl);
-    } else if(page.name=='console-frame') {
-      $("#console-frame-page iframe").attr("src", "consoleFrame.html");
-    } else {
-      if (window.location.pathname.indexOf('app') > 0) {
-        $.ajaxSetup ({cache: false});
-        page.box.load(page.name + '.html',page.initFunction);
-        $.ajaxSetup ({cache: true});
-      } else if(page.initFunction) {
-        page.initFunction();
-      }
-    }
-  }
-
-  function redrawBox(box) {
-    $("#console-panels > div").hide();
-    box.show();
-
-  }
-  return self;
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app/params.js
----------------------------------------------------------------------
diff --git a/portal/js/app/params.js b/portal/js/app/params.js
deleted file mode 100644
index 16feeba..0000000
--- a/portal/js/app/params.js
+++ /dev/null
@@ -1,30 +0,0 @@
-
-(function (){
-  Usergrid.Params = function(){};
-
-  Usergrid.Params.prototype = {
-    queryParams : {},
-    parseParams : function(){
-      if (window.location.search) {
-        // split up the query string and store in an associative array
-        var params = window.location.search.slice(1).split("&");
-        for (var i = 0; i < params.length; i++) {
-          var tmp = params[i].split("=");
-          this.queryParams[tmp[0]] = unescape(tmp[1]);
-        }
-      }
-    },
-    getParsedParams : function(queryString){
-      var retParams = {};
-      var params = queryString.slice(0).split("&");
-      for (var i = 0; i < params.length; i++) {
-        var tmp = params[i].split("=");
-        retParams[tmp[0]] = unescape(tmp[1]);
-      }
-      return retParams;
-    }
-  };
-
-})(Usergrid);
-
-Usergrid.Params = new Usergrid.Params();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app/quickLogin.js
----------------------------------------------------------------------
diff --git a/portal/js/app/quickLogin.js b/portal/js/app/quickLogin.js
deleted file mode 100644
index b092ab1..0000000
--- a/portal/js/app/quickLogin.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
-  This file enables the page to quickly redirect the user to the SSO login page.
-  Requires:
-  Usergrid.Params - params.js
-  Usergrid.userSession -session.js
-
-  Its prefered that Usergrid.Params loads parameters before QuickLogin.init() is called.
- */
-
-(function(){
-  Usergrid.QuickLogin = function(){};
-
-  Usergrid.QuickLogin.prototype = {
-    init : function(queryParams, sessionExists, useSSO){
-      if(this.credentialsInParams(queryParams)){
-        Usergrid.userSession.setUserUUID(queryParams.uuid);
-        Usergrid.userSession.setUserEmail(queryParams.admin_email);
-        Usergrid.userSession.setAccessToken(queryParams.access_token);
-      }
-      if (!sessionExists && useSSO){
-        Usergrid.SSO.sendToSSOLoginPage();
-      }
-    },
-    credentialsInParams : function(params){
-      return(params.access_token && params.admin_email && params.uuid);
-    }
-  };
-})(Usergrid);
-
-Usergrid.QuickLogin = new Usergrid.QuickLogin();

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app/session.js
----------------------------------------------------------------------
diff --git a/portal/js/app/session.js b/portal/js/app/session.js
deleted file mode 100644
index 156743e..0000000
--- a/portal/js/app/session.js
+++ /dev/null
@@ -1,172 +0,0 @@
-
-window.Usergrid = window.Usergrid || {};
-Usergrid = Usergrid || {};
-(function() {
-  /**
-   *  Application is a class for holding application info
-   *
-   *  @class Application
-   *  @param {string} name the name of the application
-   *  @param {string} uuid the uuid of the application
-   */
-  Usergrid.Application = function(name, uuid) {
-    this._name = name;
-    this._uuid = uuid;
-  };
-  Usergrid.Application.prototype = {
-    getName: function() { 
-      return this._name;
-    },
-    setName: function(name) { 
-      this._name = name;
-    },
-    getUUID: function() { 
-      return this._uuid;
-    },
-    setUUID: function(uuid) {
-      this._uuid = uuid;
-    },
-    setCurrentApplication: function(app) {
-      this.setName(app.getName());
-      this.setUUID(app.getUUID());
-    }
-  };
-
-
-  /**
-   *  Organization is a class for holding application info
-   *
-   *  @class Organization
-   *  @param {string} name organization's name
-   *  @param {string} organization's uuid
-   *  @param {string} list organization's applications
-   */
-  Usergrid.Organization = function(name, uuid) {
-    this._name = name;
-    this._uuid = uuid;
-    this._list = [];
-  };
-
-  Usergrid.Organization.prototype = {
-    getName: function() {
-      return this._name;
-    },
-    setName: function(name) {
-      this._name = name;
-    },
-    getUUID: function() {
-      return this._uuid;
-    },
-    setUUID: function(uuid) {
-      this._uuid = uuid;
-    },
-    setCurrentOrganization: function(org) {
-      this._name = org.getName();
-      this._uuid = org.getUUID();
-      this._list = org.getList();
-    },
-    addItem: function(item) {
-      var count = this._list.length;
-      this._list[count] = item;
-    },
-    getItemByName: function(name) {
-      var count = this._list.length;
-      var i=0;
-      if(name){
-          for (i=0; i<count; i++) {
-            if (this._list[i].getName().toLowerCase() == name.toLowerCase()) {
-              return this._list[i];
-            }
-          }
-      }
-      return null;
-    },
-    getItemByUUID: function(UUID) {
-      var count = this._list.length;
-      var i=0;
-      for (i=0; i<count; i++) {
-        if (this._list[i].getUUID() == UUID) {
-          return this._list[i];
-        }
-      }
-      return null;
-    },
-    getFirstItem: function() {
-      var count = this._list.length;
-      if (count > 0) {
-        return this._list[0];
-      }
-      return null;
-    },
-    getList: function() {
-      return this._list;
-    },
-    setList: function(list) {
-      this._list = list;
-    },
-    clearList: function() {
-      this._list = [];
-    }
-  };
-
-  /**
-    *  Standardized methods for maintaining user and authentication state in the Application
-    *  @class UserSession
-    */
-  Usergrid.userSession = function(){};
-        
-  Usergrid.userSession.prototype = {
-    //access token access and setter methods
-    getAccessToken: function() {
-      var accessToken = localStorage.getItem('accessToken');
-      return accessToken;
-    },
-    setAccessToken: function setAccessToken(accessToken) {
-      localStorage.setItem('accessToken', accessToken);
-    },
-    //logged in user access and setter methods
-    getUserUUID: function () {
-      return localStorage.getItem('userUUID');
-    },
-    setUserUUID: function (uuid) {
-      localStorage.setItem('userUUID', uuid);
-    },
-    getUserEmail: function () {
-      return localStorage.getItem('userEmail');
-    },
-    setUserEmail: function (email) {
-      localStorage.setItem('userEmail', email);
-    },
-    hideBanner: function(){
-      localStorage.setItem('showBanner', 'false');
-    },
-    showBanner: function(){
-      localStorage.setItem('showBanner', 'true');
-    },
-    getBannerState: function(){
-      return localStorage.getItem('showBanner');
-    },
-    //convenience method to verify if user is logged in
-    loggedIn: function () {
-      var token = this.getAccessToken();
-      var email = this.getUserEmail();
-      return (token && email);
-    },
-
-    //convenience method for saving all active user vars at once
-    saveAll: function (uuid, email, accessToken) {
-      this.setUserUUID(uuid);
-      this.setUserEmail(email);
-      this.setAccessToken(accessToken);
-    },
-
-    //convenience method for clearing all active user vars at once
-    clearAll: function () {
-      localStorage.removeItem('userUUID');
-      localStorage.removeItem('userEmail');
-      localStorage.removeItem('accessToken');
-    }
-  };
-})(Usergrid);
-
-Usergrid.userSession = new Usergrid.userSession();

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app/sso.js
----------------------------------------------------------------------
diff --git a/portal/js/app/sso.js b/portal/js/app/sso.js
deleted file mode 100644
index ab9e9f5..0000000
--- a/portal/js/app/sso.js
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Usergrid.SSO
- * SSO functions apigee specific
- *
- * Requires:
- * Usergrid.ApiClient
- */
-(function () {
-  Usergrid.SSO = function () {
-  };
-
-  Usergrid.SSO.prototype = {
-
-    default : {
-    top_level_domain: "apigee.com",
-    use_sso: true, // flag to override use SSO if needed set to ?use_sso=no
-    login_url: "https://accounts.apigee.com/accounts/sign_in",
-    profile_url: "https://accounts.apigee.com/accounts/my_account",
-    logout_url: "https://accounts.apigee.com/accounts/sign_in",
-    api_url: "https://api.usergrid.com/"
-    },
-
-    isTopLevelDomain:function () {
-      return window.location.hostname === this.default.top_level_domain;
-    },
-
-    usingSSO:function () {
-      return this.getSSO() && this.isTopLevelDomain();
-    },
-
-    getSSO:function (){
-      return this.default.use_sso;
-    },
-
-    getSSOCallback:function (urlCallback) {
-
-       var url = this.buildBaseUrl();
-
-      if(urlCallback) {
-        url += "#" + urlCallback;
-      }
-
-
-      if (Usergrid.ApiClient.getApiUrl() !== undefined && (Usergrid.ApiClient.getApiUrl() !== this.default.api_url)) {
-        var separatorMark = '&';
-        url += separatorMark + 'api_url=' + Usergrid.ApiClient.getApiUrl();
-      }
-      console.log(url);
-      url = encodeURIComponent(url);
-      return'?callback=' + url;
-    },
-
-    buildBaseUrl:function () {
-      var baseUrl = window.location.protocol + '//' + window.location.host + window.location.pathname;
-      return baseUrl;
-    },
-
-    //Private
-    sendToPage:function (url, urlCallback) {
-      var newPage = url;
-        newPage += this.getSSOCallback(urlCallback);
-      //TODO: remove debug
-      console.log(newPage);
-      window.location = newPage;
-  },
-
-    sendToSSOLogoutPage:function (callbackUrl) {
-      this.sendToPage(this.default.logout_url, callbackUrl);
-    },
-
-    sendToSSOLoginPage:function () {
-      this.sendToPage(this.default.login_url);
-    },
-
-    sendToSSOProfilePage:function (callbackUrl) {
-      this.sendToPage(this.default.profile_url, callbackUrl);
-    },
-
-    setUseSSO:function (sso) {
-      if (sso ===( 'yes' || 'true')) {
-        this.default.use_sso = true;
-      } else if (sso === ('no' || 'false')) {
-        this.default.use_sso = false;
-      }
-    }
-  };
-})(Usergrid);
-
-Usergrid.SSO = new Usergrid.SSO();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app/status.js
----------------------------------------------------------------------
diff --git a/portal/js/app/status.js b/portal/js/app/status.js
deleted file mode 100644
index 19393d1..0000000
--- a/portal/js/app/status.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * User: David S
- * Date: 17/02/12
- * Time: 12:43 PM
- */
-var StatusBar = function () {
-  var self = {
-    box: null
-  };
-
-  self.Init = function(boxSelector){
-    self.box = $(boxSelector);
-  };
-
-  self.showAlert = function (msg, type) {
-    if (!type) {
-      type = 'info';
-    }
-
-    var closebutton = '<a onclick="closeErrorMessage();" class="close">&times;</a>'
-    var item = $('<div class="alert span3 alert-' + type + ' ">' + msg + closebutton + '</div>');
-    self.box.find(".alert").remove();
-    self.box.show().prepend(item);
-    item.show();
-
-  };
-
-  closeErrorMessage = function() {
-    self.box.hide();
-  };
-
-  return self;
-}();

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app/ui/collections.entity.js
----------------------------------------------------------------------
diff --git a/portal/js/app/ui/collections.entity.js b/portal/js/app/ui/collections.entity.js
deleted file mode 100644
index 83bc8e0..0000000
--- a/portal/js/app/ui/collections.entity.js
+++ /dev/null
@@ -1,320 +0,0 @@
-window.Usergrid = window.Usergrid || {};
-Usergrid.console = Usergrid.console || {};
-Usergrid.console.ui = Usergrid.console.ui || { };
-Usergrid.console.ui.collections = Usergrid.console.ui.collections || { };
-
-(function() {
-  // This code block *WILL* load before the document is complete
-
-  var entity_list_item = {
-    options: {
-    },
-
-    _create: function() {
-
-      var self = this;
-      var o = self.options;
-      var el = self.element;
-
-      var entity_id = el.dataset('entity-id');
-      var entity_type = el.dataset('entity-type');
-      var entity = Usergrid.console.getQueryResultEntity(entity_id);
-      if (!entity) return;
-      o.entity = entity;
-      o.path = el.dataset('collection-path');
-
-      o.header = self.getHeader();
-      o.collections = self.getCollections();
-      o.contents = self.getContents();
-      o.metadata = self.getMetadata();
-      o.json = self.getJson();
-
-      o.header.appendTo(el);
-      o.collections.appendTo(el);
-      o.contents.appendTo(el);
-      o.metadata.appendTo(el);
-      o.json.appendTo(el);
-
-      o.header.find(".button").button();
-
-      var contents_button = o.header.find(".query-result-header-toggle-contents");
-      contents_button.click(function() {
-        if (o.contents.css('display') == 'none') {
-          o.contents.show();
-          o.json.hide();
-          o.collections.hide();
-        } else {
-          o.contents.hide();
-        }
-        return false;
-      });
-
-      var json_button = o.header.find(".query-result-header-toggle-json");
-      json_button.click(function() {
-        if (o.json.css('display') == 'none') {
-          o.json.show();
-          o.contents.hide();
-          o.collections.hide();
-        } else {
-          o.json.hide();
-        }
-        return false;
-      });
-
-      var collections_button = o.header.find(".query-result-header-toggle-collections");
-      collections_button.click(function() {
-        if (o.collections.css('display') == 'none') {
-          o.collections.show();
-          o.contents.hide();
-          o.json.hide();
-        } else {
-          o.collections.hide();
-        }
-        return false;
-      });
-
-      var metadata_button = o.header.find(".query-result-header-toggle-metadata");
-      metadata_button.click(function() {
-        o.metadata.toggle();
-        return false;
-      });
-
-      var link_button = o.header.find(".query-result-header-link");
-    },
-
-    getHeader : function() {
-      var entity = this.options.entity,
-         name = entity.uuid + " : " + entity.type;
-
-      if (entity.name) {
-        name = name + " : " + entity.name;
-      } else if (entity.username) {
-        name = name + " : " + entity.username;
-      } else if (entity.title) {
-        name = name + " : " + entity.title;
-      }
-
-      var collections = {
-        entity : entity,
-        name : name,
-        path : this.options.path,
-        collections : !$.isEmptyObject((entity.metadata || { }).collections || (entity.metadata || { }).connections),
-        uri : (entity.metadata || { }).uri
-      }
-
-      if(entity.type === 'user' || entity.picture){
-        if (!entity.picture) {
-          entity.picture = "/images/user-photo.png"
-        } else {
-          entity.picture = entity.picture + "?d=http://" + window.location.host + window.location.pathname + "images/user-photo.png"
-        }
-        collections['picture'] = entity.picture;
-      }
-
-      return $.tmpl("apigee.ui.collections.entity.header.html",
-        collections);
-
-    },
-
-    getCollections : function() {
-      var entity = this.options.entity;
-
-      var collections = $.extend({ }, (entity.metadata || { }).collections, (entity.metadata || { }).connections);
-
-      if (!$.isEmptyObject(collections)) {
-        return $.tmpl("apigee.ui.collections.entity.collections.html", {
-          collections : collections
-        }, {
-          makeObjectTable : Usergrid.console.ui.makeObjectTable,
-          tableOpts : Usergrid.console.ui.standardTableOpts
-        });
-      }
-      return $("");
-    },
-
-    getContents : function() {
-      var entity_contents = $.extend( false, { }, this.options.entity);
-      try { // metadata may or may not be present
-        var path = entity_contents['metadata']['path'];
-        entity_contents = $.extend( false, entity_contents, {'path': path});
-        var sets = entity_contents['metadata']['sets'];
-        entity_contents = $.extend( false, entity_contents, {'sets': sets});
-        var collections = entity_contents['metadata']['collections'];
-        entity_contents = $.extend( false, entity_contents, {'collections': collections});
-        delete entity_contents['metadata'];
-      } catch(e) {}
-      return $.tmpl("apigee.ui.collections.entity.contents.html", {
-        entity : entity_contents
-      }, {
-        makeObjectTable : Usergrid.console.ui.makeObjectTable,
-        tableOpts : Usergrid.console.ui.standardTableOpts
-      });
-    },
-
-    getMetadata : function() {
-      var entity = this.options.entity;
-      if (!$.isEmptyObject(entity.metadata)) {
-        return $.tmpl("apigee.ui.collections.entity.metadata.html", {
-          metadata : entity.metadata
-        }, {
-          makeObjectTable : Usergrid.console.ui.makeObjectTable,
-          tableOpts : Usergrid.console.ui.metadataTableOpts
-        });
-      }
-      return $("");
-    },
-
-    getJson : function() {
-      return $.tmpl("apigee.ui.collections.entity.json.html", {
-        entity : this.options.entity
-      }, {
-        makeObjectTable : Usergrid.console.ui.makeObjectTable,
-        tableOpts : Usergrid.console.ui.standardTableOpts
-      });
-    },
-
-    destroy: function() {
-      this.element.html("");
-      this.options.entity = null;
-      this.options.header = null;
-      this.options.contents = null;
-      this.options.metadata = null;
-      this.options.collections = null;
-      this.options.json = null;
-    }
-
-  }
-  Usergrid.console.ui.collections.entity_list_item = entity_list_item;
-
-  var entity_detail = {
-    options: {
-    },
-
-    _create: function() {
-
-      var self = this;
-      var o = self.options;
-      var el = self.element;
-
-      var entity_id = el.dataset('entity-id');
-      var entity_type = el.dataset('entity-type');
-      var entity = Usergrid.console.getQueryResultEntity(entity_id);
-      if (!entity) return;
-      o.entity = entity;
-      o.path = el.dataset('collection-path');
-
-      o.details = self.getDetails();
-
-      o.details.appendTo(el);
-
-      o.collections = el.find(".query-result-collections");
-      o.details.find(".button").button();
-      o.contents = el.find(".query-result-contents");
-      o.json = el.find(".query-result-json");
-      o.formDiv = el.find(".query-result-form");
-
-      var content_button = o.details.find(".query-result-header-toggle-contents");
-      content_button.click(function() {
-        if (o.contents.css('display') == 'none') {
-          o.contents.show();
-          o.json.hide();
-          o.collections.hide();
-        } else {
-          o.contents.hide();
-        }
-        return false;
-      });
-
-      var collections_button = o.details.find(".query-result-header-toggle-collections");
-      collections_button.click(function() {
-        if (o.collections.css('display') == 'none') {
-          o.collections.show();
-          o.contents.hide();
-          o.json.hide();
-        } else {
-          o.collections.hide();
-        }
-        return false;
-      });
-
-      var json_button = o.details.find(".query-result-header-toggle-json");
-      json_button.click(function() {
-        if (o.json.css('display') == 'none') {
-          o.json.show();
-          o.contents.hide();
-          o.collections.hide();
-        } else {
-          o.json.hide();
-        }
-        return false;
-      });
-
-      var link_button = o.details.find(".query-result-header-link");
-    },
-
-    getDetails : function() {
-      var entity = this.options.entity,
-        name = entity.uuid + " : " + entity.type,
-        collections,
-        connections;
-
-      if (entity.name) {
-        name = name + " : " + entity.name;
-      } else if (entity.username) {
-        name = name + " : " + entity.username;
-      } else if (entity.title) {
-        name = name + " : " + entity.title;
-      }
-
-      if(entity.metadata.collections){
-        collections = entity.metadata.collections;
-      }
-
-      if(entity.metadata.connections){
-        connections = entity.metadata.connections;
-      }
-
-      var entity_contents = $.extend( false, { }, this.options.entity);
-      var path = entity_contents['metadata']['path'];
-      entity_contents = $.extend( false, entity_contents, {'path': path});
-      delete entity_contents['metadata'];
-
-      var metadata = entity.metadata;
-      if ($.isEmptyObject(metadata)) metadata = null;
-
-      return $.tmpl("apigee.ui.collections.entity.detail.html", {
-        entity : entity_contents,
-        name : name,
-        path : this.options.path,
-        collections : collections,
-        connections : connections,
-        metadata : metadata,
-        uri : (entity.metadata || { }).uri
-      }, {
-        makeObjectTable : Usergrid.console.ui.makeObjectTable,
-        tableOpts : Usergrid.console.ui.standardTableOpts,
-        metadataTableOpts : Usergrid.console.ui.metadataTableOpts
-      });
-
-    },
-
-    destroy: function() {
-      this.element.html("");
-      this.options.entity = null;
-      this.options.details.header = null;
-      this.options.json = null;
-      this.options.formDiv = null;
-    }
-
-  };
-  Usergrid.console.ui.collections.entity_detail = entity_detail;
-
-  (function($) {
-    // This code block *WILL NOT* load before the document is complete
-
-    $.widget("ui.apigee_collections_entity_list_item", entity_list_item);
-    $.widget("ui.apigee_collections_entity_detail", entity_detail);
-
-  })(jQuery);
-
-})();

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app/ui/collections.user.js
----------------------------------------------------------------------
diff --git a/portal/js/app/ui/collections.user.js b/portal/js/app/ui/collections.user.js
deleted file mode 100644
index 5b2c561..0000000
--- a/portal/js/app/ui/collections.user.js
+++ /dev/null
@@ -1,120 +0,0 @@
-window.Usergrid = window.Usergrid || {};
-Usergrid.console = Usergrid.console || {};
-Usergrid.console.ui = Usergrid.console.ui || { };
-Usergrid.console.ui.collections = Usergrid.console.ui.collections || { };
-
-(function($) {
-  //This code block *WILL NOT* load before the document is complete
-
-  // Simplified vcard in JSON Schema for demonstration purposes
-  // Every collection will have a JSON Schema available and downloadable from the server
-  // Empty collections will have a minimal schema that only contains the basic required entity properties
-  // Developers will be able to upload schemas to collections as well
-  var vcard_schema = {
-    "description":"A representation of a person, company, organization, or place",
-    "type":"object",
-    "properties":{
-      "username":{
-        "type":"string",
-        "optional": true,
-        "title" : "Username"
-      },
-      "name":{
-        "description":"Formatted Name",
-        "type":"string",
-        "optional":true,
-        "title" : "Full Name"
-      },
-      "title":{
-        "description":"User Title",
-        "type":"string",
-        "optional": true,
-        "title":"Title"
-      },
-      "url":{
-        "type":"string",
-        "format":"url",
-        "optional":true,
-        "title" : "Home Page"
-      },
-      "email":{
-        "type":"string",
-        "format":"email",
-        "optional":true,
-        "title" : "Email"
-      },
-      "tel":{
-        "type":"string",
-        "format":"phone",
-        "optional":true,
-        "title" : "Telephone"
-      },
-      "picture":{
-        "type":"string",
-        "format":"image",
-        "optional":true,
-        "title" : "Picture URL"
-      },
-      "bday":{
-        "type":"string",
-        "format":"date",
-        "optional":true,
-        "title" : "Birthday"
-      },
-      "adr":{
-        "type":"object",
-        "properties":{
-          "id":{
-            "type":"integer"
-          },
-          "addr1":{
-            "type":"string",
-            "title" : "Street 1"
-          },
-          "addr2":{
-            "type":"string",
-            "title" : "Street 2"
-          },
-          "city":{
-            "type":"string",
-            "title" : "City"
-          },
-          "state":{
-            "type":"string",
-            "title" : "State"
-          },
-          "zip":{
-            "type":"string",
-            "title" : "Zip"
-          },
-          "country":{
-            "type":"string",
-            "title" : "Country"
-          }
-        },
-        "optional":true,
-        "title" : "Address"
-      }
-    }
-  };
-  Usergrid.console.ui.collections.vcard_schema = vcard_schema;
-
-  var group_schema = {
-    "description":"A representation of a group",
-    "type":"object",
-    "properties":{
-      "path":{
-        "type":"string",
-        "optional": true,
-        "title" : "Group Path"
-      },
-      "title":{
-        "type":"string",
-        "optional":true,
-        "title" : "Display Name"
-      }
-    }
-  };
-  Usergrid.console.ui.collections.group_schema = group_schema;
-
-})(jQuery);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app/ui/ui.js
----------------------------------------------------------------------
diff --git a/portal/js/app/ui/ui.js b/portal/js/app/ui/ui.js
deleted file mode 100644
index 089bb92..0000000
--- a/portal/js/app/ui/ui.js
+++ /dev/null
@@ -1,415 +0,0 @@
-window.Usergrid = window.Usergrid || {};
-Usergrid.console = Usergrid.console || {};
-Usergrid.console.ui = Usergrid.console.ui || { };
-
-(function() {
-  //This code block *WILL* load before the document is complete
-
-  function loadTemplate(name) {
-    $.ajax({
-      type: "GET",
-      url: "templates/" + name,
-      complete: function(jqXHR, textStatus){
-        var html = jqXHR.responseText;
-        if (html) {
-          $.template(name, html);
-        }
-      }
-    });
-  }
-  Usergrid.console.ui.loadTemplate = loadTemplate;
-
-  var standardTableOpts = {
-    "base_css" : "query-result-table",
-    "links" : {
-      "metadata.collections*" : "<a href=\"#\" onclick=\"Usergrid.console.pageOpenQueryExplorer('${value}'); return false;\">${value}</a>",
-      "metadata.connections*" : "<a href=\"#\" onclick=\"Usergrid.console.pageOpenQueryExplorer('${value}'); return false;\">${value}</a>",
-      "all_collections*" : "<a href=\"#\" onclick=\"Usergrid.console.pageOpenQueryExplorer('${value}'); return false;\">${value}</a>",
-      "metadata.path" : "<a href=\"#\" onclick=\"Usergrid.console.pageOpenQueryExplorer('${value}'); return false;\">${value}</a>",
-      "*uri" : "<a href=\"${value}\">${value}</a>",
-      "*link" : "<a href=\"${value}\">${value}</a>"
-    }
-  };
-  Usergrid.console.ui.standardTableOpts = standardTableOpts;
-
-  var metadataTableOpts = {
-    "base_css" : "query-result-table",
-    "links" : {
-      "collections*" : "<a href=\"#\" onclick=\"Usergrid.console.pageOpenQueryExplorer('${value}'); return false;\">${value}</a>",
-      "connections*" : "<a href=\"#\" onclick=\"Usergrid.console.pageOpenQueryExplorer('${value}'); return false;\">${value}</a>",
-      "path" : "<a href=\"#\" onclick=\"Usergrid.console.pageOpenQueryExplorer('${value}'); return false;\">${value}</a>",
-      "uri" : "<a href=\"${value}\">${value}</a>"
-    }
-  };
-  Usergrid.console.ui.metadataTableOpts = metadataTableOpts;
-
-  var re1 = /[^a-zA-Z0-9-]/g;
-  var re2 = /--*/g;
-  var re3 = /\${value}/g;
-  function makeObjectTable(obj, opts, parent_k) {
-    var base_css = opts.base_css;
-    var doArray = ($.type(obj) == "array");
-
-    var t = "<table class=\"" + base_css + " " + base_css + "-obj\">";
-    if (doArray) {
-      t = "<table class=\"" + base_css + " " + base_css + "-list\">";
-    }
-
-    for (var k in obj) {
-      var v = obj[k];
-      var full_k = parent_k ? parent_k + "." + k : k;
-
-      var cs = k.replace(re1, "-").replace(re2, "-");
-
-      var vType = $.type(v);
-      if ((vType  == "object") || (vType  == "array")) {
-        v = makeObjectTable(v, opts, full_k);
-      }
-
-      if (vType  == "object") {
-        t += "<tr class=\"" + base_css + "-row-obj\">";
-      }
-      else if (vType  == "array") {
-        t += "<tr class=\"" + base_css + "-row-array\">";
-      }
-      else {
-        t += "<tr class=\"" + base_css + "-row-line\">";
-
-        var links = opts.links;
-        var link_href = links[full_k];
-        if (!link_href) {
-          link_href = links[parent_k + "*"];
-        }
-        if (!link_href) {
-          link_href = links["*" + k];
-        }
-        if (link_href) {
-          v = link_href.replace(re3, v);
-        }
-        v = "<div>" + v + "</div>";
-      }
-
-      if (doArray) {
-        t += "<td class=\"" + base_css + "-item\"><div>" + v + "</div></td>";
-      }
-      else {
-        t += "<td class=\"" + base_css + "-name\"><div data-path=\"" + full_k + "\">" + k + "</div></td>";
-        t += "<td class=\"" + base_css + "-value " + base_css + "-name-" + cs + "\">" + v + "</td>";
-      }
-
-      t += "</tr>";
-    }
-
-    t += "</table>";
-    return t;
-  }
-  Usergrid.console.ui.makeObjectTable = makeObjectTable;
-
-  function makeTableFromList(list, width, options) {
-    var getListItem = null;
-    var getListItemTemplateOptions = null;
-    var listItemTemplate = null;
-
-    var onRender = null;
-    var output = null;
-
-    var tableId = null;
-
-    var tableClass = null;
-    var rowClass = null;
-    var cellClass = null;
-
-    var tableStyle = null;
-    var rowStyle = null;
-    var cellStyle = null;
-
-    if (options) {
-      getListItem = options.getListItem;
-      getListItemTemplateOptions = options.getListItemTemplateOptions;
-      listItemTemplate = options.listItemTemplate;
-
-      onRender = options.onRender;
-      output = options.output;
-
-      tableId = options.tableId;
-
-      tableClass = options.tableClass;
-      rowClass = options.rowClass;
-      cellClass = options.cellClass;
-
-      tableStyle = options.tableStyle;
-      rowStyle = options.rowStyle;
-      cellStyle = options.cellStyle;
-    }
-
-    tableId = tableId ? " id=\"" + tableId + "\" " : "";
-
-    tableClass = tableClass ? " class=\"" + tableClass + "\" " : "";
-    rowClass = rowClass ? " class=\"" + rowClass + "\" " : "";
-    cellClass = cellClass ? " class=\"" + cellClass + "\" " : "";
-
-    tableStyle = tableStyle ? " style=\"" + tableStyle + "\" " : "";
-    rowStyle = rowStyle ? " style=\"" + rowStyle + "\" " : "";
-    cellStyle = cellStyle ? " style=\"" + cellStyle + "\" " : "";
-
-    var t = "<table" + tableId + tableClass + tableStyle + ">\n";
-    var i = 0;
-    if (!width || (width < 1)) width = 1;
-    var count = (Math.floor((list.length - 1) / width) + 1) * width;
-    while (i < count) {
-      if ((i % width) == 0) {
-        t += "<tr" + rowClass + rowStyle + ">\n";
-      }
-      t += "<td" + cellClass + cellStyle + ">";
-      if (i < list.length) {
-        if (getListItem) {
-          t += getListItem(i, i % count, Math.floor(i / count));
-        }
-        else {
-          t += list[i];
-        }
-      }
-      t += "</td>\n";
-      if (((i + 1) % width) == 0) {
-        t += "</tr>\n";
-      }
-      i++;
-    }
-    t += "</table>\n";
-    return t;
-  }
-  Usergrid.console.ui.makeTableFromList = makeTableFromList;
-
-  function jsonSchemaToDForm(schema, obj) {
-    var dform = { elements : [] };
-
-    for (var propName in schema.properties) {
-      var property = schema.properties[propName];
-      var type = property.type;
-      if (type == "string") {
-        var value = '';
-        try {
-          var value = obj[propName];
-        } catch (e) {}
-        if (!value) value = "";
-        var element = {
-          "name" : "ui-form-" + propName,
-          "id" : "ui-form-" + propName,
-          "caption" : property.title,
-          "type" : "text",
-          "value" : value
-        };
-        dform.elements.push(element);
-        dform.elements.push({
-          "type" : "br"
-        });
-      } else if (type == "object") {
-        var element = jsonSchemaToDForm(property, obj[propName]);
-        element.type = "fieldset";
-        element.caption = property.title;
-        dform.elements.push(element);
-      }
-    }
-    return dform;
-  }
-  Usergrid.console.ui.jsonSchemaToDForm = jsonSchemaToDForm;
-
-  function jsonSchemaToPayload(schema){
-    var payloadData = new Object();
-    var payload = '';
-    for (var propName in schema.properties) {
-      var property = schema.properties[propName];
-      var type = property.type;
-      if (type == "string") {
-        var value = $('#ui-form-'+propName).val();
-        if (!value) value = "";
-        payloadData[propName] = value;
-
-      } else if (type == "object") {
-        payloadData[propName] = {};
-        for (var propName2 in schema.properties[propName].properties) {
-          var property2 = schema.properties[propName].properties[propName2];
-          var type2 = property2.type;
-          if (type2 == "string") {
-            var value2 = $('#ui-form-'+propName2).val();
-            if (!value) value = "";
-            payloadData[propName][propName2] = value2;
-
-          }
-        }
-      }
-    }
-    return payloadData;
-  }
-  Usergrid.console.ui.jsonSchemaToPayload = jsonSchemaToPayload;
-
-  function displayEntityListResponse(query_results, options, response) {
-
-    query_results = query_results || {};
-
-    var getListItem = null;
-    var getListItemTemplateOptions = null;
-    var listItemTemplate = null;
-
-    var output = null;
-    var prevButton = null;
-    var nextButton = null;
-    var nextPrevDiv = null;
-
-    var noEntitiesMsg = "";
-
-    var onRender = null;
-    var onNoEntities = null;
-    var onError = null;
-    var onRawJson = null;
-
-    if (options) {
-      getListItem = options.getListItem;
-      getListItemTemplateOptions = options.getListItemTemplateOptions;
-      listItemTemplate = options.listItemTemplate;
-
-      output = options.output;
-
-      prevButton = options.prevButton;
-      nextButton = options.nextButton;
-      nextPrevDiv = options.nextPrevDiv;
-
-      noEntitiesMsg = options.noEntitiesMsg;
-
-      onRender = options.onRender;
-      onNoEntities = options.onNoEntities;
-      onError = options.onError;
-      onRawJson = options.onRawJson;
-    }
-
-    query_results.entities = null;
-    query_results.entities_by_id = null;
-    query_results.query = query_results.query || { };
-
-    var t = "";
-    if (response.entities && (response.entities.length > 0)) {
-
-      query_results.entities = response.entities;
-      query_results.entities_by_id = {};
-
-      // collections is the only one that uses this lower level item, and can't be trusted to be here
-      // so hardcoding this check for that type and loading it in a try to make sure we don't error out
-      // in other cases
-      try {
-        if (response.entities[0].metadata.collections &&
-            options.output == "#collections-response-table") {
-          query_results.entities = response.entities[0].metadata.collections;
-        }
-      } catch (e) {
-        //do nothing, this is only to trap errors
-      }
-
-      if (listItemTemplate) {
-        $(output).html("");
-      }
-
-      var path = response.path || "";
-      path = "" + path.match(/[^?]*/);
-
-      for (i in query_results.entities) {
-        var entity = query_results.entities[i];
-        query_results.entities_by_id[entity.uuid] = entity;
-
-        var entity_path = (entity.metadata || {}).path;
-        if ($.isEmptyObject(entity_path)) {
-          entity_path = path + "/" + entity.uuid;
-        }
-
-        if (getListItem) {
-          t += getListItem(entity, entity_path);
-        }
-        else if (listItemTemplate) {
-          var options = null;
-          if (getListItemTemplateOptions) {
-            options = getListItemTemplateOptions(entity, entity_path);
-          }
-          if (!options) {
-            options = {entity: entity, path: entity_path};
-          }
-          $.tmpl(listItemTemplate, options).appendTo(output);
-        }
-      }
-
-      if (!listItemTemplate) {
-        $(output).html(t);
-      }
-
-      if (onRender) {
-        onRender();
-      }
-
-      if (prevButton) {
-        if (query_results.query.hasPrevious && query_results.query.hasPrevious()) {
-          $(prevButton).click(query_results.query.getPrevious);
-          $(prevButton).show();
-        }
-        else {
-          $(prevButton).hide();
-        }
-      }
-
-      if (nextButton) {
-        if (query_results.query.hasNext && query_results.query.hasNext()) {
-          $(nextButton).click(query_results.query.getNext);
-          $(nextButton).show();
-        }
-        else {
-          $(nextButton).hide();
-        }
-      }
-
-      if (nextPrevDiv) {
-        if (query_results.query.hasPrevious && query_results.query.hasNext && (query_results.query.hasPrevious() || query_results.query.hasNext())) {
-          $(nextPrevDiv).show();
-        }
-        else {
-          $(nextPrevDiv).hide();
-        }
-      }
-
-    } else if (response.entities && (response.entities.length == 0)) {
-      if (nextPrevDiv) {
-        $(nextPrevDiv).hide();
-      }
-      var s = null;
-      if (onNoEntities) {
-        s = onNoEntities();
-      }
-      $(output).html("<div class=\"query-response-empty\">" + (s ? s : noEntitiesMsg) + "</div>");
-      // This is a hack, will be fixed in API
-    } else if (response.error && (
-      (response.error.exception == "org.usergrid.services.exceptions.ServiceResourceNotFoundException: Service resource not found") ||
-        (response.error.exception == "java.lang.IllegalArgumentException: Not a valid entity value type or null: null"))) {
-      if (nextPrevDiv) {
-        $(nextPrevDiv).hide();
-      }
-      var s = null;
-      if (onError) {
-        s = onError();
-      }
-      $(output).html("<div class=\"query-response-empty\">" + (s ? s : noEntitiesMsg) + "</div>");
-
-    } else {
-      $(output).html(
-        "<pre class=\"query-response-json\">"
-          + JSON.stringify(response, null, "  ") + "</pre>");
-      if (nextPrevDiv) {
-        $(nextPrevDiv).hide();
-      }
-      if (onRawJson) {
-        onRawJson();
-      }
-    }
-
-    $(output).find(".button").button();
-
-    return query_results;
-  }
-  Usergrid.console.ui.displayEntityListResponse = displayEntityListResponse;
-
-})();


[53/61] [abbrv] git commit: Merge branch 'master' of github.com:usergrid/usergrid

Posted by sn...@apache.org.
Merge branch 'master' of github.com:usergrid/usergrid


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/ebc5f18d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/ebc5f18d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/ebc5f18d

Branch: refs/pull/35/head
Commit: ebc5f18de24630370e2a6307356958308aa2e353
Parents: 508ef2f 2a01c30
Author: Rod Simpson <ro...@apigee.com>
Authored: Mon Jan 27 16:05:02 2014 -0700
Committer: Rod Simpson <ro...@apigee.com>
Committed: Mon Jan 27 16:05:02 2014 -0700

----------------------------------------------------------------------
 sdks/html5-javascript/Gruntfile.js              |   83 +
 sdks/html5-javascript/lib/Client.js             |  865 +++
 sdks/html5-javascript/lib/Collection.js         |  446 ++
 sdks/html5-javascript/lib/Counter.js            |  186 +
 sdks/html5-javascript/lib/Entity.js             |  646 +++
 sdks/html5-javascript/lib/Group.js              |  233 +
 sdks/html5-javascript/lib/Usergrid.js           |   87 +
 sdks/html5-javascript/package.json              |   22 +
 sdks/html5-javascript/tests/mocha/index.html    |   49 +
 sdks/html5-javascript/tests/mocha/test.js       |  325 ++
 .../tests/qunit/apigee_test.html                |   14 +
 sdks/html5-javascript/tests/qunit/tests.js      |    3 +
 .../resources/css/bootstrap-combined.min.css    |   18 +
 .../tests/resources/css/mocha.css               |  270 +
 .../tests/resources/css/styles.css              |   91 +
 .../tests/resources/images/apigee.png           |  Bin 0 -> 6010 bytes
 .../tests/resources/js/blanket_mocha.min.js     |    1 +
 .../tests/resources/js/json2.js                 |  486 ++
 .../tests/resources/js/mocha.js                 | 5341 ++++++++++++++++++
 sdks/html5-javascript/tests/test.html           |   37 +
 sdks/html5-javascript/tests/test.js             |  910 +++
 sdks/html5-javascript/usergrid.js               | 3078 +++++-----
 sdks/html5-javascript/usergrid.min.js           |    3 +-
 sdks/php/lib/vendor/Apigee/Usergrid/Client.php  |    7 +-
 stack/core/pom.xml                              |    6 +-
 .../org/usergrid/persistence/EntityManager.java |    6 +-
 .../usergrid/persistence/RelationManager.java   |    6 +-
 .../persistence/cassandra/CassandraService.java |   10 +
 .../cassandra/EntityManagerImpl.java            |   35 +-
 .../persistence/cassandra/QueryProcessor.java   |   18 +-
 .../cassandra/RelationManagerImpl.java          |   35 +-
 .../cassandra/index/IndexScanner.java           |    1 +
 .../usergrid/persistence/query/ir/OrNode.java   |   18 +-
 .../persistence/query/ir/SearchVisitor.java     |    4 +-
 .../query/ir/result/AbstractScanColumn.java     |   14 +-
 .../query/ir/result/IntersectionIterator.java   |    5 +-
 .../query/ir/result/SliceIterator.java          |   56 +-
 .../query/ir/result/UnionIterator.java          |  210 +-
 .../persistence/query/util/PeekingIterator.java |   64 -
 .../main/resources/usergrid-core-context.xml    |    2 +-
 .../batch/job/AbstractSchedulerRuntimeIT.java   |    1 +
 .../usergrid/batch/job/SchedulerRuntime1IT.java |   38 +-
 .../usergrid/batch/job/SchedulerRuntime2IT.java |   61 +-
 .../org/usergrid/batch/job/TestJobListener.java |   20 +-
 .../usergrid/batch/job/TestJobListenerTest.java |    8 +-
 .../count/BatchCountParallelismTest.java        |   29 +-
 .../count/CassandraCounterStoreTest.java        |   63 -
 .../org/usergrid/persistence/CollectionIT.java  |    8 +-
 .../query/AbstractIteratingQueryIT.java         |   20 +-
 .../persistence/query/AllInCollectionIT.java    |    2 +-
 .../persistence/query/AllInConnectionIT.java    |    2 +-
 .../query/AllInConnectionNoTypeIT.java          |   20 +-
 .../query/IntersectionUnionPagingIT.java        |  163 +
 .../query/MultiOrderByCollectionIT.java         |    2 +-
 .../MultiOrderByComplexUnionCollectionIT.java   |    2 +-
 .../MultiOrderByComplexUnionConnectionIT.java   |    2 +-
 .../query/MultiOrderByConnectionIT.java         |    2 +-
 .../query/NotOrderByCollectionIT.java           |    2 +-
 .../query/NotOrderByConnectionIT.java           |    2 +-
 ...gleOrderByBoundRangeScanAscCollectionIT.java |    2 +-
 ...gleOrderByBoundRangeScanAscConnectionIT.java |    2 +-
 ...leOrderByBoundRangeScanDescCollectionIT.java |    2 +-
 ...leOrderByBoundRangeScanDescConnectionIT.java |    2 +-
 ...eOrderByComplexIntersectionCollectionIT.java |    2 +-
 ...eOrderByComplexIntersectionConnectionIT.java |    2 +-
 .../SingleOrderByComplexUnionCollectionIT.java  |    2 +-
 .../SingleOrderByComplexUnionConnectionIT.java  |    2 +-
 .../SingleOrderByIntersectionCollectionIT.java  |    2 +-
 .../SingleOrderByIntersectionConnectionIT.java  |    2 +-
 .../SingleOrderByLessThanLimitCollectionIT.java |    2 +-
 .../SingleOrderByLessThanLimitConnectionIT.java |    2 +-
 .../SingleOrderByMaxLimitCollectionIT.java      |    2 +-
 .../SingleOrderByMaxLimitConnectionIT.java      |    2 +-
 ...SingleOrderByNoIntersectionCollectionIT.java |    2 +-
 ...SingleOrderByNoIntersectionConnectionIT.java |    2 +-
 .../query/SingleOrderByNotCollectionIT.java     |    2 +-
 .../query/SingleOrderByNotConnectionIT.java     |    2 +-
 ...OrderBySameRangeScanGreaterCollectionIT.java |    2 +-
 ...OrderBySameRangeScanGreaterConnectionIT.java |    2 +-
 ...meRangeScanGreaterThanEqualCollectionIT.java |    2 +-
 ...gleOrderBySameRangeScanLessCollectionIT.java |    2 +-
 ...gleOrderBySameRangeScanLessConnectionIT.java |    2 +-
 ...ySameRangeScanLessThanEqualCollectionIT.java |    2 +-
 ...ySameRangeScanLessThanEqualConnectionIT.java |    2 +-
 .../query/ir/result/AbstractScanColumnTest.java |   84 +
 .../query/ir/result/UnionIteratorTest.java      |  154 +-
 .../persistence/query/tree/GrammarTreeTest.java |   35 +
 stack/mongo-emulator/pom.xml                    |    2 +-
 stack/pom.xml                                   |    4 +-
 stack/rest/pom.xml                              |   12 +-
 .../applications/assets/AssetsResource.java     |   25 +-
 .../rest/applications/users/UserResource.java   |    6 +-
 .../rest/management/ManagementResource.java     |   18 +-
 .../rest/management/users/UserResource.java     |    2 +-
 .../queues/AbstractQueueResourceIT.java         |   30 +-
 .../rest/management/ManagementResourceIT.java   |   13 +-
 stack/services/pom.xml                          |   14 +-
 .../services/AbstractConnectionsService.java    |   13 +-
 stack/test-utils/pom.xml                        |    2 +-
 .../usergrid/cassandra/AvailablePortFinder.java |   30 +-
 .../usergrid/cassandra/CassandraResource.java   |   22 +-
 stack/tools/pom.xml                             |    2 +-
 stack/websocket/pom.xml                         |    2 +-
 103 files changed, 12769 insertions(+), 1889 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ebc5f18d/stack/pom.xml
----------------------------------------------------------------------


[13/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular.min.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular.min.js b/portal/js/libs/angular-1.2.5/angular.min.js
new file mode 100755
index 0000000..f17382b
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular.min.js
@@ -0,0 +1,201 @@
+/*
+ AngularJS v1.2.5
+ (c) 2010-2014 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(W,N,r){'use strict';function G(b){return function(){var a=arguments[0],c,a="["+(b?b+":":"")+a+"] http://errors.angularjs.org/1.2.5/"+(b?b+"/":"")+a;for(c=1;c<arguments.length;c++)a=a+(1==c?"?":"&")+"p"+(c-1)+"="+encodeURIComponent("function"==typeof arguments[c]?arguments[c].toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof arguments[c]?"undefined":"string"!=typeof arguments[c]?JSON.stringify(arguments[c]):arguments[c]);return Error(a)}}function pb(b){if(null==b||Aa(b))return!1;var a=
+b.length;return 1===b.nodeType&&a?!0:D(b)||L(b)||0===a||"number"===typeof a&&0<a&&a-1 in b}function q(b,a,c){var d;if(b)if(A(b))for(d in b)"prototype"!=d&&("length"!=d&&"name"!=d&&b.hasOwnProperty(d))&&a.call(c,b[d],d);else if(b.forEach&&b.forEach!==q)b.forEach(a,c);else if(pb(b))for(d=0;d<b.length;d++)a.call(c,b[d],d);else for(d in b)b.hasOwnProperty(d)&&a.call(c,b[d],d);return b}function Ob(b){var a=[],c;for(c in b)b.hasOwnProperty(c)&&a.push(c);return a.sort()}function Nc(b,a,c){for(var d=Ob(b),
+e=0;e<d.length;e++)a.call(c,b[d[e]],d[e]);return d}function Pb(b){return function(a,c){b(c,a)}}function Za(){for(var b=ja.length,a;b;){b--;a=ja[b].charCodeAt(0);if(57==a)return ja[b]="A",ja.join("");if(90==a)ja[b]="0";else return ja[b]=String.fromCharCode(a+1),ja.join("")}ja.unshift("0");return ja.join("")}function Qb(b,a){a?b.$$hashKey=a:delete b.$$hashKey}function w(b){var a=b.$$hashKey;q(arguments,function(a){a!==b&&q(a,function(a,c){b[c]=a})});Qb(b,a);return b}function R(b){return parseInt(b,
+10)}function Rb(b,a){return w(new (w(function(){},{prototype:b})),a)}function s(){}function Ba(b){return b}function ca(b){return function(){return b}}function H(b){return"undefined"===typeof b}function z(b){return"undefined"!==typeof b}function U(b){return null!=b&&"object"===typeof b}function D(b){return"string"===typeof b}function qb(b){return"number"===typeof b}function La(b){return"[object Date]"===$a.call(b)}function L(b){return"[object Array]"===$a.call(b)}function A(b){return"function"===typeof b}
+function ab(b){return"[object RegExp]"===$a.call(b)}function Aa(b){return b&&b.document&&b.location&&b.alert&&b.setInterval}function Oc(b){return!(!b||!(b.nodeName||b.on&&b.find))}function Pc(b,a,c){var d=[];q(b,function(b,g,f){d.push(a.call(c,b,g,f))});return d}function bb(b,a){if(b.indexOf)return b.indexOf(a);for(var c=0;c<b.length;c++)if(a===b[c])return c;return-1}function Ma(b,a){var c=bb(b,a);0<=c&&b.splice(c,1);return a}function ga(b,a){if(Aa(b)||b&&b.$evalAsync&&b.$watch)throw Na("cpws");if(a){if(b===
+a)throw Na("cpi");if(L(b))for(var c=a.length=0;c<b.length;c++)a.push(ga(b[c]));else{c=a.$$hashKey;q(a,function(b,c){delete a[c]});for(var d in b)a[d]=ga(b[d]);Qb(a,c)}}else(a=b)&&(L(b)?a=ga(b,[]):La(b)?a=new Date(b.getTime()):ab(b)?a=RegExp(b.source):U(b)&&(a=ga(b,{})));return a}function Qc(b,a){a=a||{};for(var c in b)b.hasOwnProperty(c)&&"$$"!==c.substr(0,2)&&(a[c]=b[c]);return a}function ta(b,a){if(b===a)return!0;if(null===b||null===a)return!1;if(b!==b&&a!==a)return!0;var c=typeof b,d;if(c==typeof a&&
+"object"==c)if(L(b)){if(!L(a))return!1;if((c=b.length)==a.length){for(d=0;d<c;d++)if(!ta(b[d],a[d]))return!1;return!0}}else{if(La(b))return La(a)&&b.getTime()==a.getTime();if(ab(b)&&ab(a))return b.toString()==a.toString();if(b&&b.$evalAsync&&b.$watch||a&&a.$evalAsync&&a.$watch||Aa(b)||Aa(a)||L(a))return!1;c={};for(d in b)if("$"!==d.charAt(0)&&!A(b[d])){if(!ta(b[d],a[d]))return!1;c[d]=!0}for(d in a)if(!c.hasOwnProperty(d)&&"$"!==d.charAt(0)&&a[d]!==r&&!A(a[d]))return!1;return!0}return!1}function Sb(){return N.securityPolicy&&
+N.securityPolicy.isActive||N.querySelector&&!(!N.querySelector("[ng-csp]")&&!N.querySelector("[data-ng-csp]"))}function rb(b,a){var c=2<arguments.length?ua.call(arguments,2):[];return!A(a)||a instanceof RegExp?a:c.length?function(){return arguments.length?a.apply(b,c.concat(ua.call(arguments,0))):a.apply(b,c)}:function(){return arguments.length?a.apply(b,arguments):a.call(b)}}function Rc(b,a){var c=a;"string"===typeof b&&"$"===b.charAt(0)?c=r:Aa(a)?c="$WINDOW":a&&N===a?c="$DOCUMENT":a&&(a.$evalAsync&&
+a.$watch)&&(c="$SCOPE");return c}function oa(b,a){return"undefined"===typeof b?r:JSON.stringify(b,Rc,a?"  ":null)}function Tb(b){return D(b)?JSON.parse(b):b}function Oa(b){b&&0!==b.length?(b=v(""+b),b=!("f"==b||"0"==b||"false"==b||"no"==b||"n"==b||"[]"==b)):b=!1;return b}function ha(b){b=x(b).clone();try{b.empty()}catch(a){}var c=x("<div>").append(b).html();try{return 3===b[0].nodeType?v(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+v(b)})}catch(d){return v(c)}}function Ub(b){try{return decodeURIComponent(b)}catch(a){}}
+function Vb(b){var a={},c,d;q((b||"").split("&"),function(b){b&&(c=b.split("="),d=Ub(c[0]),z(d)&&(b=z(c[1])?Ub(c[1]):!0,a[d]?L(a[d])?a[d].push(b):a[d]=[a[d],b]:a[d]=b))});return a}function Wb(b){var a=[];q(b,function(b,d){L(b)?q(b,function(b){a.push(va(d,!0)+(!0===b?"":"="+va(b,!0)))}):a.push(va(d,!0)+(!0===b?"":"="+va(b,!0)))});return a.length?a.join("&"):""}function sb(b){return va(b,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function va(b,a){return encodeURIComponent(b).replace(/%40/gi,
+"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,a?"%20":"+")}function Sc(b,a){function c(a){a&&d.push(a)}var d=[b],e,g,f=["ng:app","ng-app","x-ng-app","data-ng-app"],h=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;q(f,function(a){f[a]=!0;c(N.getElementById(a));a=a.replace(":","\\:");b.querySelectorAll&&(q(b.querySelectorAll("."+a),c),q(b.querySelectorAll("."+a+"\\:"),c),q(b.querySelectorAll("["+a+"]"),c))});q(d,function(a){if(!e){var b=h.exec(" "+a.className+" ");b?(e=a,g=
+(b[2]||"").replace(/\s+/g,",")):q(a.attributes,function(b){!e&&f[b.name]&&(e=a,g=b.value)})}});e&&a(e,g?[g]:[])}function Xb(b,a){var c=function(){b=x(b);if(b.injector()){var c=b[0]===N?"document":ha(b);throw Na("btstrpd",c);}a=a||[];a.unshift(["$provide",function(a){a.value("$rootElement",b)}]);a.unshift("ng");c=Yb(a);c.invoke(["$rootScope","$rootElement","$compile","$injector","$animate",function(a,b,c,d,e){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},d=/^NG_DEFER_BOOTSTRAP!/;
+if(W&&!d.test(W.name))return c();W.name=W.name.replace(d,"");Pa.resumeBootstrap=function(b){q(b,function(b){a.push(b)});c()}}function cb(b,a){a=a||"_";return b.replace(Tc,function(b,d){return(d?a:"")+b.toLowerCase()})}function tb(b,a,c){if(!b)throw Na("areq",a||"?",c||"required");return b}function Qa(b,a,c){c&&L(b)&&(b=b[b.length-1]);tb(A(b),a,"not a function, got "+(b&&"object"==typeof b?b.constructor.name||"Object":typeof b));return b}function wa(b,a){if("hasOwnProperty"===b)throw Na("badname",
+a);}function ub(b,a,c){if(!a)return b;a=a.split(".");for(var d,e=b,g=a.length,f=0;f<g;f++)d=a[f],b&&(b=(e=b)[d]);return!c&&A(b)?rb(e,b):b}function vb(b){var a=b[0];b=b[b.length-1];if(a===b)return x(a);var c=[a];do{a=a.nextSibling;if(!a)break;c.push(a)}while(a!==b);return x(c)}function Uc(b){var a=G("$injector"),c=G("ng");b=b.angular||(b.angular={});b.$$minErr=b.$$minErr||G;return b.module||(b.module=function(){var b={};return function(e,g,f){if("hasOwnProperty"===e)throw c("badname","module");g&&
+b.hasOwnProperty(e)&&(b[e]=null);return b[e]||(b[e]=function(){function b(a,d,e){return function(){c[e||"push"]([a,d,arguments]);return n}}if(!g)throw a("nomod",e);var c=[],d=[],m=b("$injector","invoke"),n={_invokeQueue:c,_runBlocks:d,requires:g,name:e,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:b("$provide","value"),constant:b("$provide","constant","unshift"),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),
+controller:b("$controllerProvider","register"),directive:b("$compileProvider","directive"),config:m,run:function(a){d.push(a);return this}};f&&m(f);return n}())}}())}function Ra(b){return b.replace(Vc,function(a,b,d,e){return e?d.toUpperCase():d}).replace(Wc,"Moz$1")}function wb(b,a,c,d){function e(b){var e=c&&b?[this.filter(b)]:[this],l=a,k,m,n,p,t,C;if(!d||null!=b)for(;e.length;)for(k=e.shift(),m=0,n=k.length;m<n;m++)for(p=x(k[m]),l?p.triggerHandler("$destroy"):l=!l,t=0,p=(C=p.children()).length;t<
+p;t++)e.push(Ca(C[t]));return g.apply(this,arguments)}var g=Ca.fn[b],g=g.$original||g;e.$original=g;Ca.fn[b]=e}function I(b){if(b instanceof I)return b;if(!(this instanceof I)){if(D(b)&&"<"!=b.charAt(0))throw xb("nosel");return new I(b)}if(D(b)){var a=N.createElement("div");a.innerHTML="<div>&#160;</div>"+b;a.removeChild(a.firstChild);yb(this,a.childNodes);x(N.createDocumentFragment()).append(this)}else yb(this,b)}function zb(b){return b.cloneNode(!0)}function Da(b){Zb(b);var a=0;for(b=b.childNodes||
+[];a<b.length;a++)Da(b[a])}function $b(b,a,c,d){if(z(d))throw xb("offargs");var e=ka(b,"events");ka(b,"handle")&&(H(a)?q(e,function(a,c){Ab(b,c,a);delete e[c]}):q(a.split(" "),function(a){H(c)?(Ab(b,a,e[a]),delete e[a]):Ma(e[a]||[],c)}))}function Zb(b,a){var c=b[db],d=Sa[c];d&&(a?delete Sa[c].data[a]:(d.handle&&(d.events.$destroy&&d.handle({},"$destroy"),$b(b)),delete Sa[c],b[db]=r))}function ka(b,a,c){var d=b[db],d=Sa[d||-1];if(z(c))d||(b[db]=d=++Xc,d=Sa[d]={}),d[a]=c;else return d&&d[a]}function ac(b,
+a,c){var d=ka(b,"data"),e=z(c),g=!e&&z(a),f=g&&!U(a);d||f||ka(b,"data",d={});if(e)d[a]=c;else if(g){if(f)return d&&d[a];w(d,a)}else return d}function Bb(b,a){return b.getAttribute?-1<(" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+a+" "):!1}function Cb(b,a){a&&b.setAttribute&&q(a.split(" "),function(a){b.setAttribute("class",aa((" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+aa(a)+" "," ")))})}function Db(b,a){if(a&&b.setAttribute){var c=(" "+
+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");q(a.split(" "),function(a){a=aa(a);-1===c.indexOf(" "+a+" ")&&(c+=a+" ")});b.setAttribute("class",aa(c))}}function yb(b,a){if(a){a=a.nodeName||!z(a.length)||Aa(a)?[a]:a;for(var c=0;c<a.length;c++)b.push(a[c])}}function bc(b,a){return eb(b,"$"+(a||"ngController")+"Controller")}function eb(b,a,c){b=x(b);9==b[0].nodeType&&(b=b.find("html"));for(a=L(a)?a:[a];b.length;){for(var d=0,e=a.length;d<e;d++)if((c=b.data(a[d]))!==r)return c;b=b.parent()}}
+function cc(b){for(var a=0,c=b.childNodes;a<c.length;a++)Da(c[a]);for(;b.firstChild;)b.removeChild(b.firstChild)}function dc(b,a){var c=fb[a.toLowerCase()];return c&&ec[b.nodeName]&&c}function Yc(b,a){var c=function(c,e){c.preventDefault||(c.preventDefault=function(){c.returnValue=!1});c.stopPropagation||(c.stopPropagation=function(){c.cancelBubble=!0});c.target||(c.target=c.srcElement||N);if(H(c.defaultPrevented)){var g=c.preventDefault;c.preventDefault=function(){c.defaultPrevented=!0;g.call(c)};
+c.defaultPrevented=!1}c.isDefaultPrevented=function(){return c.defaultPrevented||!1===c.returnValue};q(a[e||c.type],function(a){a.call(b,c)});8>=E?(c.preventDefault=null,c.stopPropagation=null,c.isDefaultPrevented=null):(delete c.preventDefault,delete c.stopPropagation,delete c.isDefaultPrevented)};c.elem=b;return c}function Ea(b){var a=typeof b,c;"object"==a&&null!==b?"function"==typeof(c=b.$$hashKey)?c=b.$$hashKey():c===r&&(c=b.$$hashKey=Za()):c=b;return a+":"+c}function Ta(b){q(b,this.put,this)}
+function fc(b){var a,c;"function"==typeof b?(a=b.$inject)||(a=[],b.length&&(c=b.toString().replace(Zc,""),c=c.match($c),q(c[1].split(ad),function(b){b.replace(bd,function(b,c,d){a.push(d)})})),b.$inject=a):L(b)?(c=b.length-1,Qa(b[c],"fn"),a=b.slice(0,c)):Qa(b,"fn",!0);return a}function Yb(b){function a(a){return function(b,c){if(U(b))q(b,Pb(a));else return a(b,c)}}function c(a,b){wa(a,"service");if(A(b)||L(b))b=n.instantiate(b);if(!b.$get)throw Ua("pget",a);return m[a+h]=b}function d(a,b){return c(a,
+{$get:b})}function e(a){var b=[],c,d,h,g;q(a,function(a){if(!k.get(a)){k.put(a,!0);try{if(D(a))for(c=Va(a),b=b.concat(e(c.requires)).concat(c._runBlocks),d=c._invokeQueue,h=0,g=d.length;h<g;h++){var f=d[h],l=n.get(f[0]);l[f[1]].apply(l,f[2])}else A(a)?b.push(n.invoke(a)):L(a)?b.push(n.invoke(a)):Qa(a,"module")}catch(m){throw L(a)&&(a=a[a.length-1]),m.message&&(m.stack&&-1==m.stack.indexOf(m.message))&&(m=m.message+"\n"+m.stack),Ua("modulerr",a,m.stack||m.message||m);}}});return b}function g(a,b){function c(d){if(a.hasOwnProperty(d)){if(a[d]===
+f)throw Ua("cdep",l.join(" <- "));return a[d]}try{return l.unshift(d),a[d]=f,a[d]=b(d)}finally{l.shift()}}function d(a,b,e){var h=[],g=fc(a),f,k,l;k=0;for(f=g.length;k<f;k++){l=g[k];if("string"!==typeof l)throw Ua("itkn",l);h.push(e&&e.hasOwnProperty(l)?e[l]:c(l))}a.$inject||(a=a[f]);return a.apply(b,h)}return{invoke:d,instantiate:function(a,b){var c=function(){},e;c.prototype=(L(a)?a[a.length-1]:a).prototype;c=new c;e=d(a,c,b);return U(e)||A(e)?e:c},get:c,annotate:fc,has:function(b){return m.hasOwnProperty(b+
+h)||a.hasOwnProperty(b)}}}var f={},h="Provider",l=[],k=new Ta,m={$provide:{provider:a(c),factory:a(d),service:a(function(a,b){return d(a,["$injector",function(a){return a.instantiate(b)}])}),value:a(function(a,b){return d(a,ca(b))}),constant:a(function(a,b){wa(a,"constant");m[a]=b;p[a]=b}),decorator:function(a,b){var c=n.get(a+h),d=c.$get;c.$get=function(){var a=t.invoke(d,c);return t.invoke(b,null,{$delegate:a})}}}},n=m.$injector=g(m,function(){throw Ua("unpr",l.join(" <- "));}),p={},t=p.$injector=
+g(p,function(a){a=n.get(a+h);return t.invoke(a.$get,a)});q(e(b),function(a){t.invoke(a||s)});return t}function cd(){var b=!0;this.disableAutoScrolling=function(){b=!1};this.$get=["$window","$location","$rootScope",function(a,c,d){function e(a){var b=null;q(a,function(a){b||"a"!==v(a.nodeName)||(b=a)});return b}function g(){var b=c.hash(),d;b?(d=f.getElementById(b))?d.scrollIntoView():(d=e(f.getElementsByName(b)))?d.scrollIntoView():"top"===b&&a.scrollTo(0,0):a.scrollTo(0,0)}var f=a.document;b&&d.$watch(function(){return c.hash()},
+function(){d.$evalAsync(g)});return g}]}function dd(b,a,c,d){function e(a){try{a.apply(null,ua.call(arguments,1))}finally{if(C--,0===C)for(;B.length;)try{B.pop()()}catch(b){c.error(b)}}}function g(a,b){(function la(){q(K,function(a){a()});u=b(la,a)})()}function f(){y=null;P!=h.url()&&(P=h.url(),q(ba,function(a){a(h.url())}))}var h=this,l=a[0],k=b.location,m=b.history,n=b.setTimeout,p=b.clearTimeout,t={};h.isMock=!1;var C=0,B=[];h.$$completeOutstandingRequest=e;h.$$incOutstandingRequestCount=function(){C++};
+h.notifyWhenNoOutstandingRequests=function(a){q(K,function(a){a()});0===C?a():B.push(a)};var K=[],u;h.addPollFn=function(a){H(u)&&g(100,n);K.push(a);return a};var P=k.href,Z=a.find("base"),y=null;h.url=function(a,c){k!==b.location&&(k=b.location);if(a){if(P!=a)return P=a,d.history?c?m.replaceState(null,"",a):(m.pushState(null,"",a),Z.attr("href",Z.attr("href"))):(y=a,c?k.replace(a):k.href=a),h}else return y||k.href.replace(/%27/g,"'")};var ba=[],Q=!1;h.onUrlChange=function(a){if(!Q){if(d.history)x(b).on("popstate",
+f);if(d.hashchange)x(b).on("hashchange",f);else h.addPollFn(f);Q=!0}ba.push(a);return a};h.baseHref=function(){var a=Z.attr("href");return a?a.replace(/^https?\:\/\/[^\/]*/,""):""};var Y={},X="",$=h.baseHref();h.cookies=function(a,b){var d,e,g,h;if(a)b===r?l.cookie=escape(a)+"=;path="+$+";expires=Thu, 01 Jan 1970 00:00:00 GMT":D(b)&&(d=(l.cookie=escape(a)+"="+escape(b)+";path="+$).length+1,4096<d&&c.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+d+" > 4096 bytes)!"));
+else{if(l.cookie!==X)for(X=l.cookie,d=X.split("; "),Y={},g=0;g<d.length;g++)e=d[g],h=e.indexOf("="),0<h&&(a=unescape(e.substring(0,h)),Y[a]===r&&(Y[a]=unescape(e.substring(h+1))));return Y}};h.defer=function(a,b){var c;C++;c=n(function(){delete t[c];e(a)},b||0);t[c]=!0;return c};h.defer.cancel=function(a){return t[a]?(delete t[a],p(a),e(s),!0):!1}}function ed(){this.$get=["$window","$log","$sniffer","$document",function(b,a,c,d){return new dd(b,d,a,c)}]}function fd(){this.$get=function(){function b(b,
+d){function e(a){a!=n&&(p?p==a&&(p=a.n):p=a,g(a.n,a.p),g(a,n),n=a,n.n=null)}function g(a,b){a!=b&&(a&&(a.p=b),b&&(b.n=a))}if(b in a)throw G("$cacheFactory")("iid",b);var f=0,h=w({},d,{id:b}),l={},k=d&&d.capacity||Number.MAX_VALUE,m={},n=null,p=null;return a[b]={put:function(a,b){var c=m[a]||(m[a]={key:a});e(c);if(!H(b))return a in l||f++,l[a]=b,f>k&&this.remove(p.key),b},get:function(a){var b=m[a];if(b)return e(b),l[a]},remove:function(a){var b=m[a];b&&(b==n&&(n=b.p),b==p&&(p=b.n),g(b.n,b.p),delete m[a],
+delete l[a],f--)},removeAll:function(){l={};f=0;m={};n=p=null},destroy:function(){m=h=l=null;delete a[b]},info:function(){return w({},h,{size:f})}}}var a={};b.info=function(){var b={};q(a,function(a,e){b[e]=a.info()});return b};b.get=function(b){return a[b]};return b}}function gd(){this.$get=["$cacheFactory",function(b){return b("templates")}]}function hc(b,a){var c={},d="Directive",e=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,g=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,f=/^(on[a-z]+|formaction)$/;this.directive=
+function l(a,e){wa(a,"directive");D(a)?(tb(e,"directiveFactory"),c.hasOwnProperty(a)||(c[a]=[],b.factory(a+d,["$injector","$exceptionHandler",function(b,d){var e=[];q(c[a],function(c,g){try{var f=b.invoke(c);A(f)?f={compile:ca(f)}:!f.compile&&f.link&&(f.compile=ca(f.link));f.priority=f.priority||0;f.index=g;f.name=f.name||a;f.require=f.require||f.controller&&f.name;f.restrict=f.restrict||"A";e.push(f)}catch(l){d(l)}});return e}])),c[a].push(e)):q(a,Pb(l));return this};this.aHrefSanitizationWhitelist=
+function(b){return z(b)?(a.aHrefSanitizationWhitelist(b),this):a.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=function(b){return z(b)?(a.imgSrcSanitizationWhitelist(b),this):a.imgSrcSanitizationWhitelist()};this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(a,b,m,n,p,t,C,B,K,u,P,Z){function y(a,b,c,d,e){a instanceof x||(a=x(a));q(a,function(b,c){3==b.nodeType&&
+b.nodeValue.match(/\S+/)&&(a[c]=x(b).wrap("<span></span>").parent()[0])});var g=Q(a,b,a,c,d,e);return function(b,c,d){tb(b,"scope");var e=c?Fa.clone.call(a):a;q(d,function(a,b){e.data("$"+b+"Controller",a)});d=0;for(var f=e.length;d<f;d++){var k=e[d];1!=k.nodeType&&9!=k.nodeType||e.eq(d).data("$scope",b)}ba(e,"ng-scope");c&&c(e,b);g&&g(b,e,e);return e}}function ba(a,b){try{a.addClass(b)}catch(c){}}function Q(a,b,c,d,e,g){function f(a,c,d,e){var g,l,m,p,n,t,C,da=[];n=0;for(t=c.length;n<t;n++)da.push(c[n]);
+C=n=0;for(t=k.length;n<t;C++)l=da[C],c=k[n++],g=k[n++],m=x(l),c?(c.scope?(p=a.$new(),m.data("$scope",p),ba(m,"ng-scope")):p=a,(m=c.transclude)||!e&&b?c(g,p,l,d,Y(a,m||b)):c(g,p,l,d,e)):g&&g(a,l.childNodes,r,e)}for(var k=[],l,m,p,n=0;n<a.length;n++)m=new Eb,l=X(a[n],[],m,0===n?d:r,e),l=(g=l.length?M(l,a[n],m,b,c,null,[],[],g):null)&&g.terminal||!a[n].childNodes||!a[n].childNodes.length?null:Q(a[n].childNodes,g?g.transclude:b),k.push(g),k.push(l),p=p||g||l,g=null;return p?f:null}function Y(a,b){return function(c,
+d,e){var g=!1;c||(c=a.$new(),g=c.$$transcluded=!0);d=b(c,d,e);if(g)d.on("$destroy",rb(c,c.$destroy));return d}}function X(a,b,c,d,f){var k=c.$attr,l;switch(a.nodeType){case 1:la(b,ma(Ga(a).toLowerCase()),"E",d,f);var m,p,n;l=a.attributes;for(var t=0,C=l&&l.length;t<C;t++){var B=!1,y=!1;m=l[t];if(!E||8<=E||m.specified){p=m.name;n=ma(p);xa.test(n)&&(p=cb(n.substr(6),"-"));var P=n.replace(/(Start|End)$/,"");n===P+"Start"&&(B=p,y=p.substr(0,p.length-5)+"end",p=p.substr(0,p.length-6));n=ma(p.toLowerCase());
+k[n]=p;c[n]=m=aa(E&&"href"==p?decodeURIComponent(a.getAttribute(p,2)):m.value);dc(a,n)&&(c[n]=!0);I(a,b,m,n);la(b,n,"A",d,f,B,y)}}a=a.className;if(D(a)&&""!==a)for(;l=g.exec(a);)n=ma(l[2]),la(b,n,"C",d,f)&&(c[n]=aa(l[3])),a=a.substr(l.index+l[0].length);break;case 3:v(b,a.nodeValue);break;case 8:try{if(l=e.exec(a.nodeValue))n=ma(l[1]),la(b,n,"M",d,f)&&(c[n]=aa(l[2]))}catch(K){}}b.sort(s);return b}function $(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw ia("uterdir",b,
+c);1==a.nodeType&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return x(d)}function O(a,b,c){return function(d,e,g,f,k){e=$(e[0],b,c);return a(d,e,g,f,k)}}function M(a,c,d,e,g,f,l,p,n){function B(a,b,c,d){if(a){c&&(a=O(a,c,d));a.require=F.require;if(Q===F||F.$$isolateScope)a=T(a,{isolateScope:!0});l.push(a)}if(b){c&&(b=O(b,c,d));b.require=F.require;if(Q===F||F.$$isolateScope)b=T(b,{isolateScope:!0});p.push(b)}}function P(a,b,c){var d,e="data",
+g=!1;if(D(a)){for(;"^"==(d=a.charAt(0))||"?"==d;)a=a.substr(1),"^"==d&&(e="inheritedData"),g=g||"?"==d;d=null;c&&"data"===e&&(d=c[a]);d=d||b[e]("$"+a+"Controller");if(!d&&!g)throw ia("ctreq",a,ea);}else L(a)&&(d=[],q(a,function(a){d.push(P(a,b,c))}));return d}function K(a,e,g,f,n){function B(a,b){var c;2>arguments.length&&(b=a,a=r);Ha&&(c=O);return n(a,b,c)}var y,da,Y,u,$,J,O={},X;y=c===g?d:Qc(d,new Eb(x(g),d.$attr));da=y.$$element;if(Q){var S=/^\s*([@=&])(\??)\s*(\w*)\s*$/;f=x(g);J=e.$new(!0);M&&
+M===Q.$$originalDirective?f.data("$isolateScope",J):f.data("$isolateScopeNoTemplate",J);ba(f,"ng-isolate-scope");q(Q.scope,function(a,c){var d=a.match(S)||[],g=d[3]||c,f="?"==d[2],d=d[1],l,m,n,p;J.$$isolateBindings[c]=d+g;switch(d){case "@":y.$observe(g,function(a){J[c]=a});y.$$observers[g].$$scope=e;y[g]&&(J[c]=b(y[g])(e));break;case "=":if(f&&!y[g])break;m=t(y[g]);p=m.literal?ta:function(a,b){return a===b};n=m.assign||function(){l=J[c]=m(e);throw ia("nonassign",y[g],Q.name);};l=J[c]=m(e);J.$watch(function(){var a=
+m(e);p(a,J[c])||(p(a,l)?n(e,a=J[c]):J[c]=a);return l=a},null,m.literal);break;case "&":m=t(y[g]);J[c]=function(a){return m(e,a)};break;default:throw ia("iscp",Q.name,c,a);}})}X=n&&B;Z&&q(Z,function(a){var b={$scope:a===Q||a.$$isolateScope?J:e,$element:da,$attrs:y,$transclude:X},c;$=a.controller;"@"==$&&($=y[a.name]);c=C($,b);O[a.name]=c;Ha||da.data("$"+a.name+"Controller",c);a.controllerAs&&(b.$scope[a.controllerAs]=c)});f=0;for(Y=l.length;f<Y;f++)try{u=l[f],u(u.isolateScope?J:e,da,y,u.require&&P(u.require,
+da,O),X)}catch(v){m(v,ha(da))}f=e;Q&&(Q.template||null===Q.templateUrl)&&(f=J);a&&a(f,g.childNodes,r,n);for(f=p.length-1;0<=f;f--)try{u=p[f],u(u.isolateScope?J:e,da,y,u.require&&P(u.require,da,O),X)}catch(hd){m(hd,ha(da))}}n=n||{};var Y=-Number.MAX_VALUE,u,Z=n.controllerDirectives,Q=n.newIsolateScopeDirective,M=n.templateDirective;n=n.nonTlbTranscludeDirective;for(var la=!1,Ha=!1,s=d.$$element=x(c),F,ea,v,w=e,G,I=0,E=a.length;I<E;I++){F=a[I];var xa=F.$$start,gb=F.$$end;xa&&(s=$(c,xa,gb));v=r;if(Y>
+F.priority)break;if(v=F.scope)u=u||F,F.templateUrl||(H("new/isolated scope",Q,F,s),U(v)&&(Q=F));ea=F.name;!F.templateUrl&&F.controller&&(v=F.controller,Z=Z||{},H("'"+ea+"' controller",Z[ea],F,s),Z[ea]=F);if(v=F.transclude)la=!0,F.$$tlb||(H("transclusion",n,F,s),n=F),"element"==v?(Ha=!0,Y=F.priority,v=$(c,xa,gb),s=d.$$element=x(N.createComment(" "+ea+": "+d[ea]+" ")),c=s[0],R(g,x(ua.call(v,0)),c),w=y(v,e,Y,f&&f.name,{nonTlbTranscludeDirective:n})):(v=x(zb(c)).contents(),s.empty(),w=y(v,e));if(F.template)if(H("template",
+M,F,s),M=F,v=A(F.template)?F.template(s,d):F.template,v=ic(v),F.replace){f=F;v=x("<div>"+aa(v)+"</div>").contents();c=v[0];if(1!=v.length||1!==c.nodeType)throw ia("tplrt",ea,"");R(g,s,c);E={$attr:{}};v=X(c,[],E);var V=a.splice(I+1,a.length-(I+1));Q&&S(v);a=a.concat(v).concat(V);gc(d,E);E=a.length}else s.html(v);if(F.templateUrl)H("template",M,F,s),M=F,F.replace&&(f=F),K=z(a.splice(I,a.length-I),s,d,g,w,l,p,{controllerDirectives:Z,newIsolateScopeDirective:Q,templateDirective:M,nonTlbTranscludeDirective:n}),
+E=a.length;else if(F.compile)try{G=F.compile(s,d,w),A(G)?B(null,G,xa,gb):G&&B(G.pre,G.post,xa,gb)}catch(W){m(W,ha(s))}F.terminal&&(K.terminal=!0,Y=Math.max(Y,F.priority))}K.scope=u&&!0===u.scope;K.transclude=la&&w;return K}function S(a){for(var b=0,c=a.length;b<c;b++)a[b]=Rb(a[b],{$$isolateScope:!0})}function la(b,e,g,f,k,n,p){if(e===k)return null;k=null;if(c.hasOwnProperty(e)){var t;e=a.get(e+d);for(var C=0,B=e.length;C<B;C++)try{t=e[C],(f===r||f>t.priority)&&-1!=t.restrict.indexOf(g)&&(n&&(t=Rb(t,
+{$$start:n,$$end:p})),b.push(t),k=t)}catch(y){m(y)}}return k}function gc(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;q(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});q(b,function(b,g){"class"==g?(ba(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):"style"==g?(e.attr("style",e.attr("style")+";"+b),a.style=(a.style?a.style+";":"")+b):"$"==g.charAt(0)||a.hasOwnProperty(g)||(a[g]=b,d[g]=c[g])})}function z(a,b,c,d,e,g,f,k){var l=[],m,t,C=b[0],B=a.shift(),
+y=w({},B,{templateUrl:null,transclude:null,replace:null,$$originalDirective:B}),P=A(B.templateUrl)?B.templateUrl(b,c):B.templateUrl;b.empty();n.get(u.getTrustedResourceUrl(P),{cache:p}).success(function(n){var p,K;n=ic(n);if(B.replace){n=x("<div>"+aa(n)+"</div>").contents();p=n[0];if(1!=n.length||1!==p.nodeType)throw ia("tplrt",B.name,P);n={$attr:{}};R(d,b,p);var u=X(p,[],n);U(B.scope)&&S(u);a=u.concat(a);gc(c,n)}else p=C,b.html(n);a.unshift(y);m=M(a,p,c,e,b,B,g,f,k);q(d,function(a,c){a==p&&(d[c]=
+b[0])});for(t=Q(b[0].childNodes,e);l.length;){n=l.shift();K=l.shift();var ba=l.shift(),Z=l.shift(),u=b[0];K!==C&&(u=zb(p),R(ba,x(K),u));K=m.transclude?Y(n,m.transclude):Z;m(t,n,u,d,K)}l=null}).error(function(a,b,c,d){throw ia("tpload",d.url);});return function(a,b,c,d,e){l?(l.push(b),l.push(c),l.push(d),l.push(e)):m(t,b,c,d,e)}}function s(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function H(a,b,c,d){if(b)throw ia("multidir",b.name,c.name,a,
+ha(d));}function v(a,c){var d=b(c,!0);d&&a.push({priority:0,compile:ca(function(a,b){var c=b.parent(),e=c.data("$binding")||[];e.push(d);ba(c.data("$binding",e),"ng-binding");a.$watch(d,function(a){b[0].nodeValue=a})})})}function G(a,b){if("srcdoc"==b)return u.HTML;var c=Ga(a);if("xlinkHref"==b||"FORM"==c&&"action"==b||"IMG"!=c&&("src"==b||"ngSrc"==b))return u.RESOURCE_URL}function I(a,c,d,e){var g=b(d,!0);if(g){if("multiple"===e&&"SELECT"===Ga(a))throw ia("selmulti",ha(a));c.push({priority:100,compile:function(){return{pre:function(c,
+d,l){d=l.$$observers||(l.$$observers={});if(f.test(e))throw ia("nodomevents");if(g=b(l[e],!0,G(a,e)))l[e]=g(c),(d[e]||(d[e]=[])).$$inter=!0,(l.$$observers&&l.$$observers[e].$$scope||c).$watch(g,function(a,b){"class"===e&&a!=b?l.$updateClass(a,b):l.$set(e,a)})}}}})}}function R(a,b,c){var d=b[0],e=b.length,g=d.parentNode,f,l;if(a)for(f=0,l=a.length;f<l;f++)if(a[f]==d){a[f++]=c;l=f+e-1;for(var k=a.length;f<k;f++,l++)l<k?a[f]=a[l]:delete a[f];a.length-=e-1;break}g&&g.replaceChild(c,d);a=N.createDocumentFragment();
+a.appendChild(d);c[x.expando]=d[x.expando];d=1;for(e=b.length;d<e;d++)g=b[d],x(g).remove(),a.appendChild(g),delete b[d];b[0]=c;b.length=1}function T(a,b){return w(function(){return a.apply(null,arguments)},a,b)}var Eb=function(a,b){this.$$element=a;this.$attr=b||{}};Eb.prototype={$normalize:ma,$addClass:function(a){a&&0<a.length&&P.addClass(this.$$element,a)},$removeClass:function(a){a&&0<a.length&&P.removeClass(this.$$element,a)},$updateClass:function(a,b){this.$removeClass(jc(b,a));this.$addClass(jc(a,
+b))},$set:function(a,b,c,d){var e=dc(this.$$element[0],a);e&&(this.$$element.prop(a,b),d=e);this[a]=b;d?this.$attr[a]=d:(d=this.$attr[a])||(this.$attr[a]=d=cb(a,"-"));e=Ga(this.$$element);if("A"===e&&"href"===a||"IMG"===e&&"src"===a)this[a]=b=Z(b,"src"===a);!1!==c&&(null===b||b===r?this.$$element.removeAttr(d):this.$$element.attr(d,b));(c=this.$$observers)&&q(c[a],function(a){try{a(b)}catch(c){m(c)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers={}),e=d[a]||(d[a]=[]);e.push(b);
+B.$evalAsync(function(){e.$$inter||b(c[a])});return b}};var ea=b.startSymbol(),Ha=b.endSymbol(),ic="{{"==ea||"}}"==Ha?Ba:function(a){return a.replace(/\{\{/g,ea).replace(/}}/g,Ha)},xa=/^ngAttr[A-Z]/;return y}]}function ma(b){return Ra(b.replace(id,""))}function jc(b,a){var c="",d=b.split(/\s+/),e=a.split(/\s+/),g=0;a:for(;g<d.length;g++){for(var f=d[g],h=0;h<e.length;h++)if(f==e[h])continue a;c+=(0<c.length?" ":"")+f}return c}function jd(){var b={},a=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(a,
+d){wa(a,"controller");U(a)?w(b,a):b[a]=d};this.$get=["$injector","$window",function(c,d){return function(e,g){var f,h,l;D(e)&&(f=e.match(a),h=f[1],l=f[3],e=b.hasOwnProperty(h)?b[h]:ub(g.$scope,h,!0)||ub(d,h,!0),Qa(e,h,!0));f=c.instantiate(e,g);if(l){if(!g||"object"!=typeof g.$scope)throw G("$controller")("noscp",h||e.name,l);g.$scope[l]=f}return f}}]}function kd(){this.$get=["$window",function(b){return x(b.document)}]}function ld(){this.$get=["$log",function(b){return function(a,c){b.error.apply(b,
+arguments)}}]}function kc(b){var a={},c,d,e;if(!b)return a;q(b.split("\n"),function(b){e=b.indexOf(":");c=v(aa(b.substr(0,e)));d=aa(b.substr(e+1));c&&(a[c]=a[c]?a[c]+(", "+d):d)});return a}function lc(b){var a=U(b)?b:r;return function(c){a||(a=kc(b));return c?a[v(c)]||null:a}}function mc(b,a,c){if(A(c))return c(b,a);q(c,function(c){b=c(b,a)});return b}function md(){var b=/^\s*(\[|\{[^\{])/,a=/[\}\]]\s*$/,c=/^\)\]\}',?\n/,d={"Content-Type":"application/json;charset=utf-8"},e=this.defaults={transformResponse:[function(d){D(d)&&
+(d=d.replace(c,""),b.test(d)&&a.test(d)&&(d=Tb(d)));return d}],transformRequest:[function(a){return U(a)&&"[object File]"!==$a.call(a)?oa(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},post:d,put:d,patch:d},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},g=this.interceptors=[],f=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,b,c,d,n,p){function t(a){function c(a){var b=w({},a,{data:mc(a.data,
+a.headers,d.transformResponse)});return 200<=a.status&&300>a.status?b:n.reject(b)}var d={transformRequest:e.transformRequest,transformResponse:e.transformResponse},g=function(a){function b(a){var c;q(a,function(b,d){A(b)&&(c=b(),null!=c?a[d]=c:delete a[d])})}var c=e.headers,d=w({},a.headers),g,f,c=w({},c.common,c[v(a.method)]);b(c);b(d);a:for(g in c){a=v(g);for(f in d)if(v(f)===a)continue a;d[g]=c[g]}return d}(a);w(d,a);d.headers=g;d.method=Ia(d.method);(a=Fb(d.url)?b.cookies()[d.xsrfCookieName||
+e.xsrfCookieName]:r)&&(g[d.xsrfHeaderName||e.xsrfHeaderName]=a);var f=[function(a){g=a.headers;var b=mc(a.data,lc(g),a.transformRequest);H(a.data)&&q(g,function(a,b){"content-type"===v(b)&&delete g[b]});H(a.withCredentials)&&!H(e.withCredentials)&&(a.withCredentials=e.withCredentials);return C(a,b,g).then(c,c)},r],h=n.when(d);for(q(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 k=f.shift(),h=h.then(a,k)}h.success=function(a){h.then(function(b){a(b.data,b.status,b.headers,d)});return h};h.error=function(a){h.then(null,function(b){a(b.data,b.status,b.headers,d)});return h};return h}function C(b,c,g){function f(a,b,c){u&&(200<=a&&300>a?u.put(r,[a,b,kc(c)]):u.remove(r));l(b,a,c);d.$$phase||d.$apply()}function l(a,c,d){c=Math.max(c,0);(200<=c&&300>c?p.resolve:p.reject)({data:a,status:c,headers:lc(d),config:b})}function k(){var a=bb(t.pendingRequests,b);-1!==a&&t.pendingRequests.splice(a,
+1)}var p=n.defer(),C=p.promise,u,q,r=B(b.url,b.params);t.pendingRequests.push(b);C.then(k,k);(b.cache||e.cache)&&(!1!==b.cache&&"GET"==b.method)&&(u=U(b.cache)?b.cache:U(e.cache)?e.cache:K);if(u)if(q=u.get(r),z(q)){if(q.then)return q.then(k,k),q;L(q)?l(q[1],q[0],ga(q[2])):l(q,200,{})}else u.put(r,C);H(q)&&a(b.method,r,c,f,g,b.timeout,b.withCredentials,b.responseType);return C}function B(a,b){if(!b)return a;var c=[];Nc(b,function(a,b){null===a||H(a)||(L(a)||(a=[a]),q(a,function(a){U(a)&&(a=oa(a));
+c.push(va(b)+"="+va(a))}))});return a+(-1==a.indexOf("?")?"?":"&")+c.join("&")}var K=c("$http"),u=[];q(g,function(a){u.unshift(D(a)?p.get(a):p.invoke(a))});q(f,function(a,b){var c=D(a)?p.get(a):p.invoke(a);u.splice(b,0,{response:function(a){return c(n.when(a))},responseError:function(a){return c(n.reject(a))}})});t.pendingRequests=[];(function(a){q(arguments,function(a){t[a]=function(b,c){return t(w(c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){q(arguments,function(a){t[a]=
+function(b,c,d){return t(w(d||{},{method:a,url:b,data:c}))}})})("post","put");t.defaults=e;return t}]}function nd(){this.$get=["$browser","$window","$document",function(b,a,c){return od(b,pd,b.defer,a.angular.callbacks,c[0])}]}function od(b,a,c,d,e){function g(a,b){var c=e.createElement("script"),d=function(){c.onreadystatechange=c.onload=c.onerror=null;e.body.removeChild(c);b&&b()};c.type="text/javascript";c.src=a;E&&8>=E?c.onreadystatechange=function(){/loaded|complete/.test(c.readyState)&&d()}:
+c.onload=c.onerror=function(){d()};e.body.appendChild(c);return d}var f=-1;return function(e,l,k,m,n,p,t,C){function B(){u=f;r&&r();y&&y.abort()}function K(a,d,e,g){var f=ya(l).protocol;ba&&c.cancel(ba);r=y=null;d="file"==f&&0===d?e?200:404:d;a(1223==d?204:d,e,g);b.$$completeOutstandingRequest(s)}var u;b.$$incOutstandingRequestCount();l=l||b.url();if("jsonp"==v(e)){var P="_"+(d.counter++).toString(36);d[P]=function(a){d[P].data=a};var r=g(l.replace("JSON_CALLBACK","angular.callbacks."+P),function(){d[P].data?
+K(m,200,d[P].data):K(m,u||-2);delete d[P]})}else{var y=new a;y.open(e,l,!0);q(n,function(a,b){z(a)&&y.setRequestHeader(b,a)});y.onreadystatechange=function(){if(4==y.readyState){var a=null,b=null;u!==f&&(a=y.getAllResponseHeaders(),b=y.responseType?y.response:y.responseText);K(m,u||y.status,b,a)}};t&&(y.withCredentials=!0);C&&(y.responseType=C);y.send(k||null)}if(0<p)var ba=c(B,p);else p&&p.then&&p.then(B)}}function qd(){var b="{{",a="}}";this.startSymbol=function(a){return a?(b=a,this):b};this.endSymbol=
+function(b){return b?(a=b,this):a};this.$get=["$parse","$exceptionHandler","$sce",function(c,d,e){function g(g,k,m){for(var n,p,t=0,C=[],B=g.length,K=!1,u=[];t<B;)-1!=(n=g.indexOf(b,t))&&-1!=(p=g.indexOf(a,n+f))?(t!=n&&C.push(g.substring(t,n)),C.push(t=c(K=g.substring(n+f,p))),t.exp=K,t=p+h,K=!0):(t!=B&&C.push(g.substring(t)),t=B);(B=C.length)||(C.push(""),B=1);if(m&&1<C.length)throw nc("noconcat",g);if(!k||K)return u.length=B,t=function(a){try{for(var b=0,c=B,f;b<c;b++)"function"==typeof(f=C[b])&&
+(f=f(a),f=m?e.getTrusted(m,f):e.valueOf(f),null===f||H(f)?f="":"string"!=typeof f&&(f=oa(f))),u[b]=f;return u.join("")}catch(h){a=nc("interr",g,h.toString()),d(a)}},t.exp=g,t.parts=C,t}var f=b.length,h=a.length;g.startSymbol=function(){return b};g.endSymbol=function(){return a};return g}]}function rd(){this.$get=["$rootScope","$window","$q",function(b,a,c){function d(d,f,h,l){var k=a.setInterval,m=a.clearInterval,n=c.defer(),p=n.promise,t=0,C=z(l)&&!l;h=z(h)?h:0;p.then(null,null,d);p.$$intervalId=
+k(function(){n.notify(t++);0<h&&t>=h&&(n.resolve(t),m(p.$$intervalId),delete e[p.$$intervalId]);C||b.$apply()},f);e[p.$$intervalId]=n;return p}var e={};d.cancel=function(a){return a&&a.$$intervalId in e?(e[a.$$intervalId].reject("canceled"),clearInterval(a.$$intervalId),delete e[a.$$intervalId],!0):!1};return d}]}function sd(){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 oc(b){b=b.split("/");for(var a=b.length;a--;)b[a]=sb(b[a]);return b.join("/")}function pc(b,a,c){b=ya(b,c);a.$$protocol=b.protocol;a.$$host=b.hostname;a.$$port=R(b.port)||td[b.protocol]||null}function qc(b,a,c){var d="/"!==b.charAt(0);d&&(b="/"+b);b=ya(b,c);a.$$path=decodeURIComponent(d&&"/"===b.pathname.charAt(0)?
+b.pathname.substring(1):b.pathname);a.$$search=Vb(b.search);a.$$hash=decodeURIComponent(b.hash);a.$$path&&"/"!=a.$$path.charAt(0)&&(a.$$path="/"+a.$$path)}function na(b,a){if(0===a.indexOf(b))return a.substr(b.length)}function Wa(b){var a=b.indexOf("#");return-1==a?b:b.substr(0,a)}function Gb(b){return b.substr(0,Wa(b).lastIndexOf("/")+1)}function rc(b,a){this.$$html5=!0;a=a||"";var c=Gb(b);pc(b,this,b);this.$$parse=function(a){var e=na(c,a);if(!D(e))throw Hb("ipthprfx",a,c);qc(e,this,b);this.$$path||
+(this.$$path="/");this.$$compose()};this.$$compose=function(){var a=Wb(this.$$search),b=this.$$hash?"#"+sb(this.$$hash):"";this.$$url=oc(this.$$path)+(a?"?"+a:"")+b;this.$$absUrl=c+this.$$url.substr(1)};this.$$rewrite=function(d){var e;if((e=na(b,d))!==r)return d=e,(e=na(a,e))!==r?c+(na("/",e)||e):b+d;if((e=na(c,d))!==r)return c+e;if(c==d+"/")return c}}function Ib(b,a){var c=Gb(b);pc(b,this,b);this.$$parse=function(d){var e=na(b,d)||na(c,d),e="#"==e.charAt(0)?na(a,e):this.$$html5?e:"";if(!D(e))throw Hb("ihshprfx",
+d,a);qc(e,this,b);d=this.$$path;var g=/^\/?.*?:(\/.*)/;0===e.indexOf(b)&&(e=e.replace(b,""));g.exec(e)||(d=(e=g.exec(d))?e[1]:d);this.$$path=d;this.$$compose()};this.$$compose=function(){var c=Wb(this.$$search),e=this.$$hash?"#"+sb(this.$$hash):"";this.$$url=oc(this.$$path)+(c?"?"+c:"")+e;this.$$absUrl=b+(this.$$url?a+this.$$url:"")};this.$$rewrite=function(a){if(Wa(b)==Wa(a))return a}}function sc(b,a){this.$$html5=!0;Ib.apply(this,arguments);var c=Gb(b);this.$$rewrite=function(d){var e;if(b==Wa(d))return d;
+if(e=na(c,d))return b+a+e;if(c===d+"/")return c}}function hb(b){return function(){return this[b]}}function tc(b,a){return function(c){if(H(c))return this[b];this[b]=a(c);this.$$compose();return this}}function ud(){var b="",a=!1;this.hashPrefix=function(a){return z(a)?(b=a,this):b};this.html5Mode=function(b){return z(b)?(a=b,this):a};this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(c,d,e,g){function f(a){c.$broadcast("$locationChangeSuccess",h.absUrl(),a)}var h,l=d.baseHref(),
+k=d.url();a?(l=k.substring(0,k.indexOf("/",k.indexOf("//")+2))+(l||"/"),e=e.history?rc:sc):(l=Wa(k),e=Ib);h=new e(l,"#"+b);h.$$parse(h.$$rewrite(k));g.on("click",function(a){if(!a.ctrlKey&&!a.metaKey&&2!=a.which){for(var b=x(a.target);"a"!==v(b[0].nodeName);)if(b[0]===g[0]||!(b=b.parent())[0])return;var e=b.prop("href"),f=h.$$rewrite(e);e&&(!b.attr("target")&&f&&!a.isDefaultPrevented())&&(a.preventDefault(),f!=d.url()&&(h.$$parse(f),c.$apply(),W.angular["ff-684208-preventDefault"]=!0))}});h.absUrl()!=
+k&&d.url(h.absUrl(),!0);d.onUrlChange(function(a){h.absUrl()!=a&&(c.$broadcast("$locationChangeStart",a,h.absUrl()).defaultPrevented?d.url(h.absUrl()):(c.$evalAsync(function(){var b=h.absUrl();h.$$parse(a);f(b)}),c.$$phase||c.$digest()))});var m=0;c.$watch(function(){var a=d.url(),b=h.$$replace;m&&a==h.absUrl()||(m++,c.$evalAsync(function(){c.$broadcast("$locationChangeStart",h.absUrl(),a).defaultPrevented?h.$$parse(a):(d.url(h.absUrl(),b),f(a))}));h.$$replace=!1;return m});return h}]}function vd(){var b=
+!0,a=this;this.debugEnabled=function(a){return z(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||s;return e.apply?function(){var a=[];q(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 pa(b,a){if("constructor"===b)throw za("isecfld",a);return b}function Xa(b,a){if(b){if(b.constructor===b)throw za("isecfn",a);if(b.document&&b.location&&b.alert&&b.setInterval)throw za("isecwindow",a);if(b.children&&(b.nodeName||b.on&&b.find))throw za("isecdom",a);}return b}function ib(b,a,c,d,e){e=e||{};a=a.split(".");for(var g,f=0;1<a.length;f++){g=pa(a.shift(),d);var h=b[g];
+h||(h={},b[g]=h);b=h;b.then&&e.unwrapPromises&&(qa(d),"$$v"in b||function(a){a.then(function(b){a.$$v=b})}(b),b.$$v===r&&(b.$$v={}),b=b.$$v)}g=pa(a.shift(),d);return b[g]=c}function uc(b,a,c,d,e,g,f){pa(b,g);pa(a,g);pa(c,g);pa(d,g);pa(e,g);return f.unwrapPromises?function(f,l){var k=l&&l.hasOwnProperty(b)?l:f,m;if(null===k||k===r)return k;(k=k[b])&&k.then&&(qa(g),"$$v"in k||(m=k,m.$$v=r,m.then(function(a){m.$$v=a})),k=k.$$v);if(!a||null===k||k===r)return k;(k=k[a])&&k.then&&(qa(g),"$$v"in k||(m=k,
+m.$$v=r,m.then(function(a){m.$$v=a})),k=k.$$v);if(!c||null===k||k===r)return k;(k=k[c])&&k.then&&(qa(g),"$$v"in k||(m=k,m.$$v=r,m.then(function(a){m.$$v=a})),k=k.$$v);if(!d||null===k||k===r)return k;(k=k[d])&&k.then&&(qa(g),"$$v"in k||(m=k,m.$$v=r,m.then(function(a){m.$$v=a})),k=k.$$v);if(!e||null===k||k===r)return k;(k=k[e])&&k.then&&(qa(g),"$$v"in k||(m=k,m.$$v=r,m.then(function(a){m.$$v=a})),k=k.$$v);return k}:function(g,f){var k=f&&f.hasOwnProperty(b)?f:g;if(null===k||k===r)return k;k=k[b];if(!a||
+null===k||k===r)return k;k=k[a];if(!c||null===k||k===r)return k;k=k[c];if(!d||null===k||k===r)return k;k=k[d];return e&&null!==k&&k!==r?k=k[e]:k}}function vc(b,a,c){if(Jb.hasOwnProperty(b))return Jb[b];var d=b.split("."),e=d.length,g;if(a.csp)g=6>e?uc(d[0],d[1],d[2],d[3],d[4],c,a):function(b,g){var f=0,h;do h=uc(d[f++],d[f++],d[f++],d[f++],d[f++],c,a)(b,g),g=r,b=h;while(f<e);return h};else{var f="var l, fn, p;\n";q(d,function(b,d){pa(b,c);f+="if(s === null || s === undefined) return s;\nl=s;\ns="+
+(d?"s":'((k&&k.hasOwnProperty("'+b+'"))?k:s)')+'["'+b+'"];\n'+(a.unwrapPromises?'if (s && s.then) {\n pw("'+c.replace(/(["\r\n])/g,"\\$1")+'");\n if (!("$$v" in s)) {\n p=s;\n p.$$v = undefined;\n p.then(function(v) {p.$$v=v;});\n}\n s=s.$$v\n}\n':"")});var f=f+"return s;",h=new Function("s","k","pw",f);h.toString=function(){return f};g=function(a,b){return h(a,b,qa)}}"hasOwnProperty"!==b&&(Jb[b]=g);return g}function wd(){var b={},a={csp:!1,unwrapPromises:!1,logPromiseWarnings:!0};this.unwrapPromises=
+function(b){return z(b)?(a.unwrapPromises=!!b,this):a.unwrapPromises};this.logPromiseWarnings=function(b){return z(b)?(a.logPromiseWarnings=b,this):a.logPromiseWarnings};this.$get=["$filter","$sniffer","$log",function(c,d,e){a.csp=d.csp;qa=function(b){a.logPromiseWarnings&&!wc.hasOwnProperty(b)&&(wc[b]=!0,e.warn("[$parse] Promise found in the expression `"+b+"`. Automatic unwrapping of promises in Angular expressions is deprecated."))};return function(d){var e;switch(typeof d){case "string":if(b.hasOwnProperty(d))return b[d];
+e=new Kb(a);e=(new Ya(e,c,a)).parse(d,!1);"hasOwnProperty"!==d&&(b[d]=e);return e;case "function":return d;default:return s}}}]}function xd(){this.$get=["$rootScope","$exceptionHandler",function(b,a){return yd(function(a){b.$evalAsync(a)},a)}]}function yd(b,a){function c(a){return a}function d(a){return f(a)}var e=function(){var h=[],l,k;return k={resolve:function(a){if(h){var c=h;h=r;l=g(a);c.length&&b(function(){for(var a,b=0,d=c.length;b<d;b++)a=c[b],l.then(a[0],a[1],a[2])})}},reject:function(a){k.resolve(f(a))},
+notify:function(a){if(h){var c=h;h.length&&b(function(){for(var b,d=0,e=c.length;d<e;d++)b=c[d],b[2](a)})}},promise:{then:function(b,f,g){var k=e(),C=function(d){try{k.resolve((A(b)?b:c)(d))}catch(e){k.reject(e),a(e)}},B=function(b){try{k.resolve((A(f)?f:d)(b))}catch(c){k.reject(c),a(c)}},K=function(b){try{k.notify((A(g)?g:c)(b))}catch(d){a(d)}};h?h.push([C,B,K]):l.then(C,B,K);return k.promise},"catch":function(a){return this.then(null,a)},"finally":function(a){function b(a,c){var d=e();c?d.resolve(a):
+d.reject(a);return d.promise}function d(e,f){var g=null;try{g=(a||c)()}catch(h){return b(h,!1)}return g&&A(g.then)?g.then(function(){return b(e,f)},function(a){return b(a,!1)}):b(e,f)}return this.then(function(a){return d(a,!0)},function(a){return d(a,!1)})}}}},g=function(a){return a&&A(a.then)?a:{then:function(c){var d=e();b(function(){d.resolve(c(a))});return d.promise}}},f=function(c){return{then:function(f,g){var m=e();b(function(){try{m.resolve((A(g)?g:d)(c))}catch(b){m.reject(b),a(b)}});return m.promise}}};
+return{defer:e,reject:f,when:function(h,l,k,m){var n=e(),p,t=function(b){try{return(A(l)?l:c)(b)}catch(d){return a(d),f(d)}},C=function(b){try{return(A(k)?k:d)(b)}catch(c){return a(c),f(c)}},B=function(b){try{return(A(m)?m:c)(b)}catch(d){a(d)}};b(function(){g(h).then(function(a){p||(p=!0,n.resolve(g(a).then(t,C,B)))},function(a){p||(p=!0,n.resolve(C(a)))},function(a){p||n.notify(B(a))})});return n.promise},all:function(a){var b=e(),c=0,d=L(a)?[]:{};q(a,function(a,e){c++;g(a).then(function(a){d.hasOwnProperty(e)||
+(d[e]=a,--c||b.resolve(d))},function(a){d.hasOwnProperty(e)||b.reject(a)})});0===c&&b.resolve(d);return b.promise}}}function zd(){var b=10,a=G("$rootScope"),c=null;this.digestTtl=function(a){arguments.length&&(b=a);return b};this.$get=["$injector","$exceptionHandler","$parse","$browser",function(d,e,g,f){function h(){this.$id=Za();this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this["this"]=this.$root=this;this.$$destroyed=!1;
+this.$$asyncQueue=[];this.$$postDigestQueue=[];this.$$listeners={};this.$$isolateBindings={}}function l(b){if(n.$$phase)throw a("inprog",n.$$phase);n.$$phase=b}function k(a,b){var c=g(a);Qa(c,b);return c}function m(){}h.prototype={constructor:h,$new:function(a){a?(a=new h,a.$root=this.$root,a.$$asyncQueue=this.$$asyncQueue,a.$$postDigestQueue=this.$$postDigestQueue):(a=function(){},a.prototype=this,a=new a,a.$id=Za());a["this"]=a;a.$$listeners={};a.$parent=this;a.$$watchers=a.$$nextSibling=a.$$childHead=
+a.$$childTail=null;a.$$prevSibling=this.$$childTail;this.$$childHead?this.$$childTail=this.$$childTail.$$nextSibling=a:this.$$childHead=this.$$childTail=a;return a},$watch:function(a,b,d){var e=k(a,"watch"),g=this.$$watchers,f={fn:b,last:m,get:e,exp:a,eq:!!d};c=null;if(!A(b)){var h=k(b||s,"listener");f.fn=function(a,b,c){h(c)}}if("string"==typeof a&&e.constant){var l=f.fn;f.fn=function(a,b,c){l.call(this,a,b,c);Ma(g,f)}}g||(g=this.$$watchers=[]);g.unshift(f);return function(){Ma(g,f)}},$watchCollection:function(a,
+b){var c=this,d,e,f=0,h=g(a),l=[],k={},m=0;return this.$watch(function(){e=h(c);var a,b;if(U(e))if(pb(e))for(d!==l&&(d=l,m=d.length=0,f++),a=e.length,m!==a&&(f++,d.length=m=a),b=0;b<a;b++)d[b]!==e[b]&&(f++,d[b]=e[b]);else{d!==k&&(d=k={},m=0,f++);a=0;for(b in e)e.hasOwnProperty(b)&&(a++,d.hasOwnProperty(b)?d[b]!==e[b]&&(f++,d[b]=e[b]):(m++,d[b]=e[b],f++));if(m>a)for(b in f++,d)d.hasOwnProperty(b)&&!e.hasOwnProperty(b)&&(m--,delete d[b])}else d!==e&&(d=e,f++);return f},function(){b(e,d,c)})},$digest:function(){var d,
+f,g,h,k=this.$$asyncQueue,q=this.$$postDigestQueue,r,v,y=b,s,x=[],z,X,$;l("$digest");c=null;do{v=!1;for(s=this;k.length;){try{$=k.shift(),$.scope.$eval($.expression)}catch(O){n.$$phase=null,e(O)}c=null}a:do{if(h=s.$$watchers)for(r=h.length;r--;)try{if(d=h[r])if((f=d.get(s))!==(g=d.last)&&!(d.eq?ta(f,g):"number"==typeof f&&"number"==typeof g&&isNaN(f)&&isNaN(g)))v=!0,c=d,d.last=d.eq?ga(f):f,d.fn(f,g===m?f:g,s),5>y&&(z=4-y,x[z]||(x[z]=[]),X=A(d.exp)?"fn: "+(d.exp.name||d.exp.toString()):d.exp,X+="; newVal: "+
+oa(f)+"; oldVal: "+oa(g),x[z].push(X));else if(d===c){v=!1;break a}}catch(M){n.$$phase=null,e(M)}if(!(h=s.$$childHead||s!==this&&s.$$nextSibling))for(;s!==this&&!(h=s.$$nextSibling);)s=s.$parent}while(s=h);if(v&&!y--)throw n.$$phase=null,a("infdig",b,oa(x));}while(v||k.length);for(n.$$phase=null;q.length;)try{q.shift()()}catch(S){e(S)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this!==n&&(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.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null)}},$eval:function(a,b){return g(a)(this,b)},$evalAsync:function(a){n.$$phase||n.$$asyncQueue.length||f.defer(function(){n.$$asyncQueue.length&&n.$digest()});this.$$asyncQueue.push({scope:this,expression:a})},
+$$postDigest:function(a){this.$$postDigestQueue.push(a)},$apply:function(a){try{return l("$apply"),this.$eval(a)}catch(b){e(b)}finally{n.$$phase=null;try{n.$digest()}catch(c){throw e(c),c;}}},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);return function(){c[bb(c,b)]=null}},$emit:function(a,b){var c=[],d,f=this,g=!1,h={name:a,targetScope:f,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},l=[h].concat(ua.call(arguments,
+1)),k,m;do{d=f.$$listeners[a]||c;h.currentScope=f;k=0;for(m=d.length;k<m;k++)if(d[k])try{d[k].apply(null,l)}catch(n){e(n)}else d.splice(k,1),k--,m--;if(g)break;f=f.$parent}while(f);return h},$broadcast:function(a,b){var c=this,d=this,f={name:a,targetScope:this,preventDefault:function(){f.defaultPrevented=!0},defaultPrevented:!1},g=[f].concat(ua.call(arguments,1)),h,k;do{c=d;f.currentScope=c;d=c.$$listeners[a]||[];h=0;for(k=d.length;h<k;h++)if(d[h])try{d[h].apply(null,g)}catch(l){e(l)}else d.splice(h,
+1),h--,k--;if(!(d=c.$$childHead||c!==this&&c.$$nextSibling))for(;c!==this&&!(d=c.$$nextSibling);)c=c.$parent}while(c=d);return f}};var n=new h;return n}]}function Ad(){var b=/^\s*(https?|ftp|mailto|tel|file):/,a=/^\s*(https?|ftp|file):|data:image\//;this.aHrefSanitizationWhitelist=function(a){return z(a)?(b=a,this):b};this.imgSrcSanitizationWhitelist=function(b){return z(b)?(a=b,this):a};this.$get=function(){return function(c,d){var e=d?a:b,g;if(!E||8<=E)if(g=ya(c).href,""!==g&&!g.match(e))return"unsafe:"+
+g;return c}}}function Bd(b){if("self"===b)return b;if(D(b)){if(-1<b.indexOf("***"))throw ra("iwcard",b);b=b.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08").replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*");return RegExp("^"+b+"$")}if(ab(b))return RegExp("^"+b.source+"$");throw ra("imatcher");}function xc(b){var a=[];z(b)&&q(b,function(b){a.push(Bd(b))});return a}function Cd(){this.SCE_CONTEXTS=fa;var b=["self"],a=[];this.resourceUrlWhitelist=function(a){arguments.length&&
+(b=xc(a));return b};this.resourceUrlBlacklist=function(b){arguments.length&&(a=xc(b));return a};this.$get=["$injector",function(c){function d(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};a&&(b.prototype=new a);b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()};b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()};return b}var e=function(a){throw ra("unsafe");};c.has("$sanitize")&&(e=c.get("$sanitize"));var g=d(),f={};f[fa.HTML]=d(g);
+f[fa.CSS]=d(g);f[fa.URL]=d(g);f[fa.JS]=d(g);f[fa.RESOURCE_URL]=d(f[fa.URL]);return{trustAs:function(a,b){var c=f.hasOwnProperty(a)?f[a]:null;if(!c)throw ra("icontext",a,b);if(null===b||b===r||""===b)return b;if("string"!==typeof b)throw ra("itype",a);return new c(b)},getTrusted:function(c,d){if(null===d||d===r||""===d)return d;var g=f.hasOwnProperty(c)?f[c]:null;if(g&&d instanceof g)return d.$$unwrapTrustedValue();if(c===fa.RESOURCE_URL){var g=ya(d.toString()),m,n,p=!1;m=0;for(n=b.length;m<n;m++)if("self"===
+b[m]?Fb(g):b[m].exec(g.href)){p=!0;break}if(p)for(m=0,n=a.length;m<n;m++)if("self"===a[m]?Fb(g):a[m].exec(g.href)){p=!1;break}if(p)return d;throw ra("insecurl",d.toString());}if(c===fa.HTML)return e(d);throw ra("unsafe");},valueOf:function(a){return a instanceof g?a.$$unwrapTrustedValue():a}}}]}function Dd(){var b=!0;this.enabled=function(a){arguments.length&&(b=!!a);return b};this.$get=["$parse","$sniffer","$sceDelegate",function(a,c,d){if(b&&c.msie&&8>c.msieDocumentMode)throw ra("iequirks");var e=
+ga(fa);e.isEnabled=function(){return b};e.trustAs=d.trustAs;e.getTrusted=d.getTrusted;e.valueOf=d.valueOf;b||(e.trustAs=e.getTrusted=function(a,b){return b},e.valueOf=Ba);e.parseAs=function(b,c){var d=a(c);return d.literal&&d.constant?d:function(a,c){return e.getTrusted(b,d(a,c))}};var g=e.parseAs,f=e.getTrusted,h=e.trustAs;q(fa,function(a,b){var c=v(b);e[Ra("parse_as_"+c)]=function(b){return g(a,b)};e[Ra("get_trusted_"+c)]=function(b){return f(a,b)};e[Ra("trust_as_"+c)]=function(b){return h(a,b)}});
+return e}]}function Ed(){this.$get=["$window","$document",function(b,a){var c={},d=R((/android (\d+)/.exec(v((b.navigator||{}).userAgent))||[])[1]),e=/Boxee/i.test((b.navigator||{}).userAgent),g=a[0]||{},f=g.documentMode,h,l=/^(Moz|webkit|O|ms)(?=[A-Z])/,k=g.body&&g.body.style,m=!1,n=!1;if(k){for(var p in k)if(m=l.exec(p)){h=m[0];h=h.substr(0,1).toUpperCase()+h.substr(1);break}h||(h="WebkitOpacity"in k&&"webkit");m=!!("transition"in k||h+"Transition"in k);n=!!("animation"in k||h+"Animation"in k);
+!d||m&&n||(m=D(g.body.style.webkitTransition),n=D(g.body.style.webkitAnimation))}return{history:!(!b.history||!b.history.pushState||4>d||e),hashchange:"onhashchange"in b&&(!f||7<f),hasEvent:function(a){if("input"==a&&9==E)return!1;if(H(c[a])){var b=g.createElement("div");c[a]="on"+a in b}return c[a]},csp:Sb(),vendorPrefix:h,transitions:m,animations:n,msie:E,msieDocumentMode:f}}]}function Fd(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(b,a,c,d){function e(e,h,l){var k=c.defer(),
+m=k.promise,n=z(l)&&!l;h=a.defer(function(){try{k.resolve(e())}catch(a){k.reject(a),d(a)}finally{delete g[m.$$timeoutId]}n||b.$apply()},h);m.$$timeoutId=h;g[h]=k;return m}var g={};e.cancel=function(b){return b&&b.$$timeoutId in g?(g[b.$$timeoutId].reject("canceled"),delete g[b.$$timeoutId],a.defer.cancel(b.$$timeoutId)):!1};return e}]}function ya(b,a){var c=b;E&&(T.setAttribute("href",c),c=T.href);T.setAttribute("href",c);return{href:T.href,protocol:T.protocol?T.protocol.replace(/:$/,""):"",host:T.host,
+search:T.search?T.search.replace(/^\?/,""):"",hash:T.hash?T.hash.replace(/^#/,""):"",hostname:T.hostname,port:T.port,pathname:"/"===T.pathname.charAt(0)?T.pathname:"/"+T.pathname}}function Fb(b){b=D(b)?ya(b):b;return b.protocol===yc.protocol&&b.host===yc.host}function Gd(){this.$get=ca(W)}function zc(b){function a(d,e){if(U(d)){var g={};q(d,function(b,c){g[c]=a(c,b)});return g}return b.factory(d+c,e)}var c="Filter";this.register=a;this.$get=["$injector",function(a){return function(b){return a.get(b+
+c)}}];a("currency",Ac);a("date",Bc);a("filter",Hd);a("json",Id);a("limitTo",Jd);a("lowercase",Kd);a("number",Cc);a("orderBy",Dc);a("uppercase",Ld)}function Hd(){return function(b,a,c){if(!L(b))return b;var d=typeof c,e=[];e.check=function(a){for(var b=0;b<e.length;b++)if(!e[b](a))return!1;return!0};"function"!==d&&(c="boolean"===d&&c?function(a,b){return Pa.equals(a,b)}:function(a,b){b=(""+b).toLowerCase();return-1<(""+a).toLowerCase().indexOf(b)});var g=function(a,b){if("string"==typeof b&&"!"===
+b.charAt(0))return!g(a,b.substr(1));switch(typeof a){case "boolean":case "number":case "string":return c(a,b);case "object":switch(typeof b){case "object":return c(a,b);default:for(var d in a)if("$"!==d.charAt(0)&&g(a[d],b))return!0}return!1;case "array":for(d=0;d<a.length;d++)if(g(a[d],b))return!0;return!1;default:return!1}};switch(typeof a){case "boolean":case "number":case "string":a={$:a};case "object":for(var f in a)"$"==f?function(){if(a[f]){var b=f;e.push(function(c){return g(c,a[b])})}}():
+function(){if("undefined"!=typeof a[f]){var b=f;e.push(function(c){return g(ub(c,b),a[b])})}}();break;case "function":e.push(a);break;default:return b}for(var d=[],h=0;h<b.length;h++){var l=b[h];e.check(l)&&d.push(l)}return d}}function Ac(b){var a=b.NUMBER_FORMATS;return function(b,d){H(d)&&(d=a.CURRENCY_SYM);return Ec(b,a.PATTERNS[1],a.GROUP_SEP,a.DECIMAL_SEP,2).replace(/\u00A4/g,d)}}function Cc(b){var a=b.NUMBER_FORMATS;return function(b,d){return Ec(b,a.PATTERNS[0],a.GROUP_SEP,a.DECIMAL_SEP,d)}}
+function Ec(b,a,c,d,e){if(isNaN(b)||!isFinite(b))return"";var g=0>b;b=Math.abs(b);var f=b+"",h="",l=[],k=!1;if(-1!==f.indexOf("e")){var m=f.match(/([\d\.]+)e(-?)(\d+)/);m&&"-"==m[2]&&m[3]>e+1?f="0":(h=f,k=!0)}if(k)0<e&&(-1<b&&1>b)&&(h=b.toFixed(e));else{f=(f.split(Fc)[1]||"").length;H(e)&&(e=Math.min(Math.max(a.minFrac,f),a.maxFrac));f=Math.pow(10,e);b=Math.round(b*f)/f;b=(""+b).split(Fc);f=b[0];b=b[1]||"";var m=0,n=a.lgSize,p=a.gSize;if(f.length>=n+p)for(m=f.length-n,k=0;k<m;k++)0===(m-k)%p&&0!==
+k&&(h+=c),h+=f.charAt(k);for(k=m;k<f.length;k++)0===(f.length-k)%n&&0!==k&&(h+=c),h+=f.charAt(k);for(;b.length<e;)b+="0";e&&"0"!==e&&(h+=d+b.substr(0,e))}l.push(g?a.negPre:a.posPre);l.push(h);l.push(g?a.negSuf:a.posSuf);return l.join("")}function Lb(b,a,c){var d="";0>b&&(d="-",b=-b);for(b=""+b;b.length<a;)b="0"+b;c&&(b=b.substr(b.length-a));return d+b}function V(b,a,c,d){c=c||0;return function(e){e=e["get"+b]();if(0<c||e>-c)e+=c;0===e&&-12==c&&(e=12);return Lb(e,a,d)}}function jb(b,a){return function(c,
+d){var e=c["get"+b](),g=Ia(a?"SHORT"+b:b);return d[g][e]}}function Bc(b){function a(a){var b;if(b=a.match(c)){a=new Date(0);var g=0,f=0,h=b[8]?a.setUTCFullYear:a.setFullYear,l=b[8]?a.setUTCHours:a.setHours;b[9]&&(g=R(b[9]+b[10]),f=R(b[9]+b[11]));h.call(a,R(b[1]),R(b[2])-1,R(b[3]));g=R(b[4]||0)-g;f=R(b[5]||0)-f;h=R(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));l.call(a,g,f,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){var g="",f=[],h,l;e=e||"mediumDate";e=b.DATETIME_FORMATS[e]||e;D(c)&&(c=Md.test(c)?R(c):a(c));qb(c)&&(c=new Date(c));if(!La(c))return c;for(;e;)(l=Nd.exec(e))?(f=f.concat(ua.call(l,1)),e=f.pop()):(f.push(e),e=null);q(f,function(a){h=Od[a];g+=h?h(c,b.DATETIME_FORMATS):a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function Id(){return function(b){return oa(b,!0)}}function Jd(){return function(b,a){if(!L(b)&&!D(b))return b;a=R(a);if(D(b))return a?0<=a?b.slice(0,a):b.slice(a,
+b.length):"";var c=[],d,e;a>b.length?a=b.length:a<-b.length&&(a=-b.length);0<a?(d=0,e=a):(d=b.length+a,e=b.length);for(;d<e;d++)c.push(b[d]);return c}}function Dc(b){return function(a,c,d){function e(a,b){return Oa(b)?function(b,c){return a(c,b)}:a}if(!L(a)||!c)return a;c=L(c)?c:[c];c=Pc(c,function(a){var c=!1,d=a||Ba;if(D(a)){if("+"==a.charAt(0)||"-"==a.charAt(0))c="-"==a.charAt(0),a=a.substring(1);d=b(a)}return e(function(a,b){var c;c=d(a);var e=d(b),f=typeof c,g=typeof e;f==g?("string"==f&&(c=
+c.toLowerCase(),e=e.toLowerCase()),c=c===e?0:c<e?-1:1):c=f<g?-1:1;return c},c)});for(var g=[],f=0;f<a.length;f++)g.push(a[f]);return g.sort(e(function(a,b){for(var d=0;d<c.length;d++){var e=c[d](a,b);if(0!==e)return e}return 0},d))}}function sa(b){A(b)&&(b={link:b});b.restrict=b.restrict||"AC";return ca(b)}function Gc(b,a){function c(a,c){c=c?"-"+cb(c,"-"):"";b.removeClass((a?kb:lb)+c).addClass((a?lb:kb)+c)}var d=this,e=b.parent().controller("form")||mb,g=0,f=d.$error={},h=[];d.$name=a.name||a.ngForm;
+d.$dirty=!1;d.$pristine=!0;d.$valid=!0;d.$invalid=!1;e.$addControl(d);b.addClass(Ja);c(!0);d.$addControl=function(a){wa(a.$name,"input");h.push(a);a.$name&&(d[a.$name]=a)};d.$removeControl=function(a){a.$name&&d[a.$name]===a&&delete d[a.$name];q(f,function(b,c){d.$setValidity(c,!0,a)});Ma(h,a)};d.$setValidity=function(a,b,h){var n=f[a];if(b)n&&(Ma(n,h),n.length||(g--,g||(c(b),d.$valid=!0,d.$invalid=!1),f[a]=!1,c(!0,a),e.$setValidity(a,!0,d)));else{g||c(b);if(n){if(-1!=bb(n,h))return}else f[a]=n=[],
+g++,c(!1,a),e.$setValidity(a,!1,d);n.push(h);d.$valid=!1;d.$invalid=!0}};d.$setDirty=function(){b.removeClass(Ja).addClass(nb);d.$dirty=!0;d.$pristine=!1;e.$setDirty()};d.$setPristine=function(){b.removeClass(nb).addClass(Ja);d.$dirty=!1;d.$pristine=!0;q(h,function(a){a.$setPristine()})}}function ob(b,a,c,d,e,g){var f=!1;a.on("compositionstart",function(){f=!0});a.on("compositionend",function(){f=!1});var h=function(){if(!f){var e=a.val();Oa(c.ngTrim||"T")&&(e=aa(e));d.$viewValue!==e&&b.$apply(function(){d.$setViewValue(e)})}};
+if(e.hasEvent("input"))a.on("input",h);else{var l,k=function(){l||(l=g.defer(function(){h();l=null}))};a.on("keydown",function(a){a=a.keyCode;91===a||(15<a&&19>a||37<=a&&40>=a)||k()});if(e.hasEvent("paste"))a.on("paste cut",k)}a.on("change",h);d.$render=function(){a.val(d.$isEmpty(d.$viewValue)?"":d.$viewValue)};var m=c.ngPattern,n=function(a,b){if(d.$isEmpty(b)||a.test(b))return d.$setValidity("pattern",!0),b;d.$setValidity("pattern",!1);return r};m&&((e=m.match(/^\/(.*)\/([gim]*)$/))?(m=RegExp(e[1],
+e[2]),e=function(a){return n(m,a)}):e=function(c){var d=b.$eval(m);if(!d||!d.test)throw G("ngPattern")("noregexp",m,d,ha(a));return n(d,c)},d.$formatters.push(e),d.$parsers.push(e));if(c.ngMinlength){var p=R(c.ngMinlength);e=function(a){if(!d.$isEmpty(a)&&a.length<p)return d.$setValidity("minlength",!1),r;d.$setValidity("minlength",!0);return a};d.$parsers.push(e);d.$formatters.push(e)}if(c.ngMaxlength){var t=R(c.ngMaxlength);e=function(a){if(!d.$isEmpty(a)&&a.length>t)return d.$setValidity("maxlength",
+!1),r;d.$setValidity("maxlength",!0);return a};d.$parsers.push(e);d.$formatters.push(e)}}function Mb(b,a){b="ngClass"+b;return function(){return{restrict:"AC",link:function(c,d,e){function g(b){if(!0===a||c.$index%2===a){var d=f(b||"");h?ta(b,h)||e.$updateClass(d,f(h)):e.$addClass(d)}h=ga(b)}function f(a){if(L(a))return a.join(" ");if(U(a)){var b=[];q(a,function(a,c){a&&b.push(c)});return b.join(" ")}return a}var h;c.$watch(e[b],g,!0);e.$observe("class",function(a){g(c.$eval(e[b]))});"ngClass"!==
+b&&c.$watch("$index",function(d,g){var h=d&1;if(h!==g&1){var n=f(c.$eval(e[b]));h===a?e.$addClass(n):e.$removeClass(n)}})}}}}var v=function(b){return D(b)?b.toLowerCase():b},Ia=function(b){return D(b)?b.toUpperCase():b},E,x,Ca,ua=[].slice,Pd=[].push,$a=Object.prototype.toString,Na=G("ng"),Pa=W.angular||(W.angular={}),Va,Ga,ja=["0","0","0"];E=R((/msie (\d+)/.exec(v(navigator.userAgent))||[])[1]);isNaN(E)&&(E=R((/trident\/.*; rv:(\d+)/.exec(v(navigator.userAgent))||[])[1]));s.$inject=[];Ba.$inject=
+[];var aa=function(){return String.prototype.trim?function(b){return D(b)?b.trim():b}:function(b){return D(b)?b.replace(/^\s\s*/,"").replace(/\s\s*$/,""):b}}();Ga=9>E?function(b){b=b.nodeName?b:b[0];return b.scopeName&&"HTML"!=b.scopeName?Ia(b.scopeName+":"+b.nodeName):b.nodeName}:function(b){return b.nodeName?b.nodeName:b[0].nodeName};var Tc=/[A-Z]/g,Qd={full:"1.2.5",major:1,minor:2,dot:5,codeName:"singularity-expansion"},Sa=I.cache={},db=I.expando="ng-"+(new Date).getTime(),Xc=1,Hc=W.document.addEventListener?
+function(b,a,c){b.addEventListener(a,c,!1)}:function(b,a,c){b.attachEvent("on"+a,c)},Ab=W.document.removeEventListener?function(b,a,c){b.removeEventListener(a,c,!1)}:function(b,a,c){b.detachEvent("on"+a,c)},Vc=/([\:\-\_]+(.))/g,Wc=/^moz([A-Z])/,xb=G("jqLite"),Fa=I.prototype={ready:function(b){function a(){c||(c=!0,b())}var c=!1;"complete"===N.readyState?setTimeout(a):(this.on("DOMContentLoaded",a),I(W).on("load",a))},toString:function(){var b=[];q(this,function(a){b.push(""+a)});return"["+b.join(", ")+
+"]"},eq:function(b){return 0<=b?x(this[b]):x(this[this.length+b])},length:0,push:Pd,sort:[].sort,splice:[].splice},fb={};q("multiple selected checked disabled readOnly required open".split(" "),function(b){fb[v(b)]=b});var ec={};q("input select option textarea button form details".split(" "),function(b){ec[Ia(b)]=!0});q({data:ac,inheritedData:eb,scope:function(b){return x(b).data("$scope")||eb(b.parentNode||b,["$isolateScope","$scope"])},isolateScope:function(b){return x(b).data("$isolateScope")||
+x(b).data("$isolateScopeNoTemplate")},controller:bc,injector:function(b){return eb(b,"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},hasClass:Bb,css:function(b,a,c){a=Ra(a);if(z(c))b.style[a]=c;else{var d;8>=E&&(d=b.currentStyle&&b.currentStyle[a],""===d&&(d="auto"));d=d||b.style[a];8>=E&&(d=""===d?r:d);return d}},attr:function(b,a,c){var d=v(a);if(fb[d])if(z(c))c?(b[a]=!0,b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||s).specified?
+d:r;else if(z(c))b.setAttribute(a,c);else if(b.getAttribute)return b=b.getAttribute(a,2),null===b?r:b},prop:function(b,a,c){if(z(c))b[a]=c;else return b[a]},text:function(){function b(b,d){var e=a[b.nodeType];if(H(d))return e?b[e]:"";b[e]=d}var a=[];9>E?(a[1]="innerText",a[3]="nodeValue"):a[1]=a[3]="textContent";b.$dv="";return b}(),val:function(b,a){if(H(a)){if("SELECT"===Ga(b)&&b.multiple){var c=[];q(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(H(a))return b.innerHTML;for(var c=0,d=b.childNodes;c<d.length;c++)Da(d[c]);b.innerHTML=a},empty:cc},function(b,a){I.prototype[a]=function(a,d){var e,g;if(b!==cc&&(2==b.length&&b!==Bb&&b!==bc?a:d)===r){if(U(a)){for(e=0;e<this.length;e++)if(b===ac)b(this[e],a);else for(g in a)b(this[e],g,a[g]);return this}e=b.$dv;g=e===r?Math.min(this.length,1):this.length;for(var f=0;f<g;f++){var h=b(this[f],a,d);e=e?e+h:h}return e}for(e=0;e<this.length;e++)b(this[e],a,d);return this}});q({removeData:Zb,
+dealoc:Da,on:function a(c,d,e,g){if(z(g))throw xb("onargs");var f=ka(c,"events"),h=ka(c,"handle");f||ka(c,"events",f={});h||ka(c,"handle",h=Yc(c,f));q(d.split(" "),function(d){var g=f[d];if(!g){if("mouseenter"==d||"mouseleave"==d){var m=N.body.contains||N.body.compareDocumentPosition?function(a,c){var d=9===a.nodeType?a.documentElement:a,e=c&&c.parentNode;return a===e||!!(e&&1===e.nodeType&&(d.contains?d.contains(e):a.compareDocumentPosition&&a.compareDocumentPosition(e)&16))}:function(a,c){if(c)for(;c=
+c.parentNode;)if(c===a)return!0;return!1};f[d]=[];a(c,{mouseleave:"mouseout",mouseenter:"mouseover"}[d],function(a){var c=a.relatedTarget;c&&(c===this||m(this,c))||h(a,d)})}else Hc(c,d,h),f[d]=[];g=f[d]}g.push(e)})},off:$b,replaceWith:function(a,c){var d,e=a.parentNode;Da(a);q(new I(c),function(c){d?e.insertBefore(c,d.nextSibling):e.replaceChild(c,a);d=c})},children:function(a){var c=[];q(a.childNodes,function(a){1===a.nodeType&&c.push(a)});return c},contents:function(a){return a.childNodes||[]},
+append:function(a,c){q(new I(c),function(c){1!==a.nodeType&&11!==a.nodeType||a.appendChild(c)})},prepend:function(a,c){if(1===a.nodeType){var d=a.firstChild;q(new I(c),function(c){a.insertBefore(c,d)})}},wrap:function(a,c){c=x(c)[0];var d=a.parentNode;d&&d.replaceChild(c,a);c.appendChild(a)},remove:function(a){Da(a);var c=a.parentNode;c&&c.removeChild(a)},after:function(a,c){var d=a,e=a.parentNode;q(new I(c),function(a){e.insertBefore(a,d.nextSibling);d=a})},addClass:Db,removeClass:Cb,toggleClass:function(a,
+c,d){H(d)&&(d=!Bb(a,c));(d?Db:Cb)(a,c)},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){if(a.nextElementSibling)return a.nextElementSibling;for(a=a.nextSibling;null!=a&&1!==a.nodeType;)a=a.nextSibling;return a},find:function(a,c){return a.getElementsByTagName?a.getElementsByTagName(c):[]},clone:zb,triggerHandler:function(a,c,d){c=(ka(a,"events")||{})[c];d=d||[];var e=[{preventDefault:s,stopPropagation:s}];q(c,function(c){c.apply(a,e.concat(d))})}},function(a,c){I.prototype[c]=
+function(c,e,g){for(var f,h=0;h<this.length;h++)H(f)?(f=a(this[h],c,e,g),z(f)&&(f=x(f))):yb(f,a(this[h],c,e,g));return z(f)?f:this};I.prototype.bind=I.prototype.on;I.prototype.unbind=I.prototype.off});Ta.prototype={put:function(a,c){this[Ea(a)]=c},get:function(a){return this[Ea(a)]},remove:function(a){var c=this[a=Ea(a)];delete this[a];return c}};var $c=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,ad=/,/,bd=/^\s*(_?)(\S+?)\1\s*$/,Zc=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ua=G("$injector"),Rd=G("$animate"),Sd=
+["$provide",function(a){this.$$selectors={};this.register=function(c,d){var e=c+"-animation";if(c&&"."!=c.charAt(0))throw Rd("notcsel",c);this.$$selectors[c.substr(1)]=e;a.factory(e,d)};this.$get=["$timeout",function(a){return{enter:function(d,e,g,f){g?g.after(d):(e&&e[0]||(e=g.parent()),e.append(d));f&&a(f,0,!1)},leave:function(d,e){d.remove();e&&a(e,0,!1)},move:function(a,c,g,f){this.enter(a,c,g,f)},addClass:function(d,e,g){e=D(e)?e:L(e)?e.join(" "):"";q(d,function(a){Db(a,e)});g&&a(g,0,!1)},removeClass:function(d,
+e,g){e=D(e)?e:L(e)?e.join(" "):"";q(d,function(a){Cb(a,e)});g&&a(g,0,!1)},enabled:s}}]}],ia=G("$compile");hc.$inject=["$provide","$$sanitizeUriProvider"];var id=/^(x[\:\-_]|data[\:\-_])/i,pd=W.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw G("$httpBackend")("noxhr");},nc=G("$interpolate"),Td=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,td={http:80,
+https:443,ftp:21},Hb=G("$location");sc.prototype=Ib.prototype=rc.prototype={$$html5:!1,$$replace:!1,absUrl:hb("$$absUrl"),url:function(a,c){if(H(a))return this.$$url;var d=Td.exec(a);d[1]&&this.path(decodeURIComponent(d[1]));(d[2]||d[1])&&this.search(d[3]||"");this.hash(d[5]||"",c);return this},protocol:hb("$$protocol"),host:hb("$$host"),port:hb("$$port"),path:tc("$$path",function(a){return"/"==a.charAt(0)?a:"/"+a}),search:function(a,c){switch(arguments.length){case 0:return this.$$search;case 1:if(D(a))this.$$search=
+Vb(a);else if(U(a))this.$$search=a;else throw Hb("isrcharg");break;default:H(c)||null===c?delete this.$$search[a]:this.$$search[a]=c}this.$$compose();return this},hash:tc("$$hash",Ba),replace:function(){this.$$replace=!0;return this}};var za=G("$parse"),wc={},qa,Ka={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:s,"+":function(a,c,d,e){d=d(a,c);e=e(a,c);return z(d)?z(e)?d+e:d:z(e)?e:r},"-":function(a,c,d,e){d=d(a,c);e=e(a,c);return(z(d)?d:0)-(z(e)?
+e:0)},"*":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)},"=":s,"===":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,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,e){return d(a,c)&e(a,c)},"|":function(a,c,d,e){return e(a,c)(a,c,d(a,c))},"!":function(a,c,d){return!d(a,c)}},Ud={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Kb=function(a){this.options=a};Kb.prototype={constructor:Kb,lex:function(a){this.text=a;this.index=0;this.ch=r;this.lastCh=":";this.tokens=[];var c;for(a=[];this.index<this.text.length;){this.ch=
+this.text.charAt(this.index);if(this.is("\"'"))this.readString(this.ch);else if(this.isNumber(this.ch)||this.is(".")&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(this.ch))this.readIdent(),this.was("{,")&&("{"===a[0]&&(c=this.tokens[this.tokens.length-1]))&&(c.json=-1===c.text.indexOf("."));else if(this.is("(){}[].,;:?"))this.tokens.push({index:this.index,text:this.ch,json:this.was(":[,")&&this.is("{[")||this.is("}]:,")}),this.is("{[")&&a.unshift(this.ch),this.is("}]")&&a.shift(),
+this.index++;else if(this.isWhitespace(this.ch)){this.index++;continue}else{var d=this.ch+this.peek(),e=d+this.peek(2),g=Ka[this.ch],f=Ka[d],h=Ka[e];h?(this.tokens.push({index:this.index,text:e,fn:h}),this.index+=3):f?(this.tokens.push({index:this.index,text:d,fn:f}),this.index+=2):g?(this.tokens.push({index:this.index,text:this.ch,fn:g,json:this.was("[,:")&&this.is("+-")}),this.index+=1):this.throwError("Unexpected next character ",this.index,this.index+1)}this.lastCh=this.ch}return this.tokens},
+is:function(a){return-1!==a.indexOf(this.ch)},was:function(a){return-1!==a.indexOf(this.lastCh)},peek:function(a){a=a||1;return this.index+a<this.text.length?this.text.charAt(this.index+a):!1},isNumber:function(a){return"0"<=a&&"9">=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=z(c)?"s "+c+"-"+this.index+" ["+this.text.substring(c,d)+"]":" "+d;throw za("lexerr",a,c,this.text);},readNumber:function(){for(var a="",c=this.index;this.index<this.text.length;){var d=v(this.text.charAt(this.index));if("."==d||this.isNumber(d))a+=d;else{var e=this.peek();if("e"==d&&this.isExpOperator(e))a+=d;else if(this.isExpOperator(d)&&e&&this.isNumber(e)&&"e"==a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||e&&this.isNumber(e)||"e"!=a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}a*=
+1;this.tokens.push({index:c,text:a,json:!0,fn:function(){return a}})},readIdent:function(){for(var a=this,c="",d=this.index,e,g,f,h;this.index<this.text.length;){h=this.text.charAt(this.index);if("."===h||this.isIdent(h)||this.isNumber(h))"."===h&&(e=this.index),c+=h;else break;this.index++}if(e)for(g=this.index;g<this.text.length;){h=this.text.charAt(g);if("("===h){f=c.substr(e-d+1);c=c.substr(0,e-d);this.index=g;break}if(this.isWhitespace(h))g++;else break}d={index:d,text:c};if(Ka.hasOwnProperty(c))d.fn=
+Ka[c],d.json=Ka[c];else{var l=vc(c,this.options,this.text);d.fn=w(function(a,c){return l(a,c)},{assign:function(d,e){return ib(d,c,e,a.text,a.options)}})}this.tokens.push(d);f&&(this.tokens.push({index:e,text:".",json:!1}),this.tokens.push({index:e+1,text:f,json:!1}))},readString:function(a){var c=this.index;this.index++;for(var d="",e=a,g=!1;this.index<this.text.length;){var f=this.text.charAt(this.index),e=e+f;if(g)"u"===f?(f=this.text.substring(this.index+1,this.index+5),f.match(/[\da-f]{4}/i)||
+this.throwError("Invalid unicode escape [\\u"+f+"]"),this.index+=4,d+=String.fromCharCode(parseInt(f,16))):d=(g=Ud[f])?d+g:d+f,g=!1;else if("\\"===f)g=!0;else{if(f===a){this.index++;this.tokens.push({index:c,text:e,string:d,json:!0,fn:function(){return d}});return}d+=f}this.index++}this.throwError("Unterminated quote",c)}};var Ya=function(a,c,d){this.lexer=a;this.$filter=c;this.options=d};Ya.ZERO=function(){return 0};Ya.prototype={constructor:Ya,parse:function(a,c){this.text=a;this.json=c;this.tokens=
+this.lexer.lex(a);c&&(this.assignment=this.logicalOR,this.functionCall=this.fieldAccess=this.objectIndex=this.filterChain=function(){this.throwError("is not valid json",{text:a,index:0})});var d=c?this.primary():this.statements();0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]);d.literal=!!d.literal;d.constant=!!d.constant;return d},primary:function(){var a;if(this.expect("("))a=this.filterChain(),this.consume(")");else if(this.expect("["))a=this.arrayDeclaration();
+else if(this.expect("{"))a=this.object();else{var c=this.expect();(a=c.fn)||this.throwError("not a primary expression",c);c.json&&(a.constant=!0,a.literal=!0)}for(var d;c=this.expect("(","[",".");)"("===c.text?(a=this.functionCall(a,d),d=null):"["===c.text?(d=a,a=this.objectIndex(a)):"."===c.text?(d=a,a=this.fieldAccess(a)):this.throwError("IMPOSSIBLE");return a},throwError:function(a,c){throw za("syntax",c.text,a,c.index+1,this.text,this.text.substring(c.index));},peekToken:function(){if(0===this.tokens.length)throw za("ueoe",
+this.text);return this.tokens[0]},peek:function(a,c,d,e){if(0<this.tokens.length){var g=this.tokens[0],f=g.text;if(f===a||f===c||f===d||f===e||!(a||c||d||e))return g}return!1},expect:function(a,c,d,e){return(a=this.peek(a,c,d,e))?(this.json&&!a.json&&this.throwError("is not valid json",a),this.tokens.shift(),a):!1},consume:function(a){this.expect(a)||this.throwError("is unexpected, expecting ["+a+"]",this.peek())},unaryFn:function(a,c){return w(function(d,e){return a(d,e,c)},{constant:c.constant})},
+ternaryFn:function(a,c,d){return w(function(e,g){return a(e,g)?c(e,g):d(e,g)},{constant:a.constant&&c.constant&&d.constant})},binaryFn:function(a,c,d){return w(function(e,g){return c(e,g,a,d)},{constant:a.constant&&d.constant})},statements:function(){for(var a=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&a.push(this.filterChain()),!this.expect(";"))return 1===a.length?a[0]:function(c,d){for(var e,g=0;g<a.length;g++){var f=a[g];f&&(e=f(c,d))}return e}},filterChain:function(){for(var a=
+this.expression(),c;;)if(c=this.expect("|"))a=this.binaryFn(a,c.fn,this.filter());else return a},filter:function(){for(var a=this.expect(),c=this.$filter(a.text),d=[];;)if(a=this.expect(":"))d.push(this.expression());else{var e=function(a,e,h){h=[h];for(var l=0;l<d.length;l++)h.push(d[l](a,e));return c.apply(a,h)};return function(){return e}}},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary(),c,d;return(d=this.expect("="))?(a.assign||this.throwError("implies assignment but ["+
+this.text.substring(0,d.index)+"] can not be assigned to",d),c=this.ternary(),function(d,g){return a.assign(d,c(d,g),g)}):a},ternary:function(){var a=this.logicalOR(),c,d;if(this.expect("?")){c=this.ternary();if(d=this.expect(":"))return this.ternaryFn(a,c,this.ternary());this.throwError("expected :",d)}else return a},logicalOR:function(){for(var a=this.logicalAND(),c;;)if(c=this.expect("||"))a=this.binaryFn(a,c.fn,this.logicalAND());else return a},logicalAND:function(){var a=this.equality(),c;if(c=
+this.expect("&&"))a=this.binaryFn(a,c.fn,this.logicalAND());return a},equality:function(){var a=this.relational(),c;if(c=this.expect("==","!=","===","!=="))a=this.binaryFn(a,c.fn,this.equality());return a},relational:function(){var a=this.additive(),c;if(c=this.expect("<",">","<=",">="))a=this.binaryFn(a,c.fn,this.relational());return a},additive:function(){for(var a=this.multiplicative(),c;c=this.expect("+","-");)a=this.binaryFn(a,c.fn,this.multiplicative());return a},multiplicative:function(){for(var a=
+this.unary(),c;c=this.expect("*","/","%");)a=this.binaryFn(a,c.fn,this.unary());return a},unary:function(){var a;return this.expect("+")?this.primary():(a=this.expect("-"))?this.binaryFn(Ya.ZERO,a.fn,this.unary()):(a=this.expect("!"))?this.unaryFn(a.fn,this.unary()):this.primary()},fieldAccess:function(a){var c=this,d=this.expect().text,e=vc(d,this.options,this.text);return w(function(c,d,h){return e(h||a(c,d),d)},{assign:function(e,f,h){return ib(a(e,h),d,f,c.text,c.options)}})},objectIndex:function(a){var c=
+this,d=this.expression();this.consume("]");return w(function(e,g){var f=a(e,g),h=d(e,g),l;if(!f)return r;(f=Xa(f[h],c.text))&&(f.then&&c.options.unwrapPromises)&&(l=f,"$$v"in f||(l.$$v=r,l.then(function(a){l.$$v=a})),f=f.$$v);return f},{assign:function(e,g,f){var h=d(e,f);return Xa(a(e,f),c.text)[h]=g}})},functionCall:function(a,c){var d=[];if(")"!==this.peekToken().text){do d.push(this.expression());while(this.expect(","))}this.consume(")");var e=this;return function(g,f){for(var h=[],l=c?c(g,f):
+g,k=0;k<d.length;k++)h.push(d[k](g,f));k=a(g,f,l)||s;Xa(l,e.text);Xa(k,e.text);h=k.apply?k.apply(l,h):k(h[0],h[1],h[2],h[3],h[4]);return Xa(h,e.text)}},arrayDeclaration:function(){var a=[],c=!0;if("]"!==this.peekToken().text){do{var d=this.expression();a.push(d);d.constant||(c=!1)}while(this.expect(","))}this.consume("]");return w(function(c,d){for(var f=[],h=0;h<a.length;h++)f.push(a[h](c,d));return f},{literal:!0,constant:c})},object:function(){var a=[],c=!0;if("}"!==this.peekToken().text){do{var d=
+this.expect(),d=d.string||d.text;this.consume(":");var e=this.expression();a.push({key:d,value:e});e.constant||(c=!1)}while(this.expect(","))}this.consume("}");return w(function(c,d){for(var e={},l=0;l<a.length;l++){var k=a[l];e[k.key]=k.value(c,d)}return e},{literal:!0,constant:c})}};var Jb={},ra=G("$sce"),fa={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},T=N.createElement("a"),yc=ya(W.location.href,!0);zc.$inject=["$provide"];Ac.$inject=["$locale"];Cc.$inject=["$locale"];var Fc=
+".",Od={yyyy:V("FullYear",4),yy:V("FullYear",2,0,!0),y:V("FullYear",1),MMMM:jb("Month"),MMM:jb("Month",!0),MM:V("Month",2,1),M:V("Month",1,1),dd:V("Date",2),d:V("Date",1),HH:V("Hours",2),H:V("Hours",1),hh:V("Hours",2,-12),h:V("Hours",1,-12),mm:V("Minutes",2),m:V("Minutes",1),ss:V("Seconds",2),s:V("Seconds",1),sss:V("Milliseconds",3),EEEE:jb("Day"),EEE:jb("Day",!0),a:function(a,c){return 12>a.getHours()?c.AMPMS[0]:c.AMPMS[1]},Z:function(a){a=-1*a.getTimezoneOffset();return a=(0<=a?"+":"")+(Lb(Math[0<
+a?"floor":"ceil"](a/60),2)+Lb(Math.abs(a%60),2))}},Nd=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,Md=/^\-?\d+$/;Bc.$inject=["$locale"];var Kd=ca(v),Ld=ca(Ia);Dc.$inject=["$parse"];var Vd=ca({restrict:"E",compile:function(a,c){8>=E&&(c.href||c.name||c.$set("href",""),a.append(N.createComment("IE fix")));if(!c.href&&!c.name)return function(a,c){c.on("click",function(a){c.attr("href")||a.preventDefault()})}}}),Nb={};q(fb,function(a,c){if("multiple"!=a){var d=ma("ng-"+
+c);Nb[d]=function(){return{priority:100,compile:function(){return function(a,g,f){a.$watch(f[d],function(a){f.$set(c,!!a)})}}}}}});q(["src","srcset","href"],function(a){var c=ma("ng-"+a);Nb[c]=function(){return{priority:99,link:function(d,e,g){g.$observe(c,function(c){c&&(g.$set(a,c),E&&e.prop(a,g[a]))})}}}});var mb={$addControl:s,$removeControl:s,$setValidity:s,$setDirty:s,$setPristine:s};Gc.$inject=["$element","$attrs","$scope"];var Ic=function(a){return["$timeout",function(c){return{name:"form",
+restrict:a?"EAC":"E",controller:Gc,compile:function(){return{pre:function(a,e,g,f){if(!g.action){var h=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1};Hc(e[0],"submit",h);e.on("$destroy",function(){c(function(){Ab(e[0],"submit",h)},0,!1)})}var l=e.parent().controller("form"),k=g.name||g.ngForm;k&&ib(a,k,f,k);if(l)e.on("$destroy",function(){l.$removeControl(f);k&&ib(a,k,r,k);w(f,mb)})}}}}}]},Wd=Ic(),Xd=Ic(!0),Yd=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,
+Zd=/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}$/,$d=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Jc={text:ob,number:function(a,c,d,e,g,f){ob(a,c,d,e,g,f);e.$parsers.push(function(a){var c=e.$isEmpty(a);if(c||$d.test(a))return e.$setValidity("number",!0),""===a?null:c?a:parseFloat(a);e.$setValidity("number",!1);return r});e.$formatters.push(function(a){return e.$isEmpty(a)?"":""+a});d.min&&(a=function(a){var c=parseFloat(d.min);if(!e.$isEmpty(a)&&a<c)return e.$setValidity("min",!1),r;e.$setValidity("min",
+!0);return a},e.$parsers.push(a),e.$formatters.push(a));d.max&&(a=function(a){var c=parseFloat(d.max);if(!e.$isEmpty(a)&&a>c)return e.$setValidity("max",!1),r;e.$setValidity("max",!0);return a},e.$parsers.push(a),e.$formatters.push(a));e.$formatters.push(function(a){if(e.$isEmpty(a)||qb(a))return e.$setValidity("number",!0),a;e.$setValidity("number",!1);return r})},url:function(a,c,d,e,g,f){ob(a,c,d,e,g,f);a=function(a){if(e.$isEmpty(a)||Yd.test(a))return e.$setValidity("url",!0),a;e.$setValidity("url",
+!1);return r};e.$formatters.push(a);e.$parsers.push(a)},email:function(a,c,d,e,g,f){ob(a,c,d,e,g,f);a=function(a){if(e.$isEmpty(a)||Zd.test(a))return e.$setValidity("email",!0),a;e.$setValidity("email",!1);return r};e.$formatters.push(a);e.$parsers.push(a)},radio:function(a,c,d,e){H(d.name)&&c.attr("name",Za());c.on("click",function(){c[0].checked&&a.$apply(function(){e.$setViewValue(d.value)})});e.$render=function(){c[0].checked=d.value==e.$viewValue};d.$observe("value",e.$render)},checkbox:function(a,
+c,d,e){var g=d.ngTrueValue,f=d.ngFalseValue;D(g)||(g=!0);D(f)||(f=!1);c.on("click",function(){a.$apply(function(){e.$setViewValue(c[0].checked)})});e.$render=function(){c[0].checked=e.$viewValue};e.$isEmpty=function(a){return a!==g};e.$formatters.push(function(a){return a===g});e.$parsers.push(function(a){return a?g:f})},hidden:s,button:s,submit:s,reset:s},Kc=["$browser","$sniffer",function(a,c){return{restrict:"E",require:"?ngModel",link:function(d,e,g,f){f&&(Jc[v(g.type)]||Jc.text)(d,e,g,f,c,a)}}}],
+lb="ng-valid",kb="ng-invalid",Ja="ng-pristine",nb="ng-dirty",ae=["$scope","$exceptionHandler","$attrs","$element","$parse",function(a,c,d,e,g){function f(a,c){c=c?"-"+cb(c,"-"):"";e.removeClass((a?kb:lb)+c).addClass((a?lb:kb)+c)}this.$modelValue=this.$viewValue=Number.NaN;this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$name=d.name;var h=g(d.ngModel),l=h.assign;if(!l)throw G("ngModel")("nonassign",d.ngModel,ha(e));
+this.$render=s;this.$isEmpty=function(a){return H(a)||""===a||null===a||a!==a};var k=e.inheritedData("$formController")||mb,m=0,n=this.$error={};e.addClass(Ja);f(!0);this.$setValidity=function(a,c){n[a]!==!c&&(c?(n[a]&&m--,m||(f(!0),this.$valid=!0,this.$invalid=!1)):(f(!1),this.$invalid=!0,this.$valid=!1,m++),n[a]=!c,f(c,a),k.$setValidity(a,c,this))};this.$setPristine=function(){this.$dirty=!1;this.$pristine=!0;e.removeClass(nb).addClass(Ja)};this.$setViewValue=function(d){this.$viewValue=d;this.$pristine&&
+(this.$dirty=!0,this.$pristine=!1,e.removeClass(Ja).addClass(nb),k.$setDirty());q(this.$parsers,function(a){d=a(d)});this.$modelValue!==d&&(this.$modelValue=d,l(a,d),q(this.$viewChangeListeners,function(a){try{a()}catch(d){c(d)}}))};var p=this;a.$watch(function(){var c=h(a);if(p.$modelValue!==c){var d=p.$formatters,e=d.length;for(p.$modelValue=c;e--;)c=d[e](c);p.$viewValue!==c&&(p.$viewValue=c,p.$render())}return c})}],be=function(){return{require:["ngModel","^?form"],controller:ae,link:function(a,
+c,d,e){var g=e[0],f=e[1]||mb;f.$addControl(g);a.$on("$destroy",function(){f.$removeControl(g)})}}},ce=ca({require:"ngModel",link:function(a,c,d,e){e.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),Lc=function(){return{require:"?ngModel",link:function(a,c,d,e){if(e){d.required=!0;var g=function(a){if(d.required&&e.$isEmpty(a))e.$setValidity("required",!1);else return e.$setValidity("required",!0),a};e.$formatters.push(g);e.$parsers.unshift(g);d.$observe("required",function(){g(e.$viewValue)})}}}},
+de=function(){return{require:"ngModel",link:function(a,c,d,e){var g=(a=/\/(.*)\//.exec(d.ngList))&&RegExp(a[1])||d.ngList||",";e.$parsers.push(function(a){if(!H(a)){var c=[];a&&q(a.split(g),function(a){a&&c.push(aa(a))});return c}});e.$formatters.push(function(a){return L(a)?a.join(", "):r});e.$isEmpty=function(a){return!a||!a.length}}}},ee=/^(true|false|\d+)$/,fe=function(){return{priority:100,compile:function(a,c){return ee.test(c.ngValue)?function(a,c,g){g.$set("value",a.$eval(g.ngValue))}:function(a,
+c,g){a.$watch(g.ngValue,function(a){g.$set("value",a)})}}}},ge=sa(function(a,c,d){c.addClass("ng-binding").data("$binding",d.ngBind);a.$watch(d.ngBind,function(a){c.text(a==r?"":a)})}),he=["$interpolate",function(a){return function(c,d,e){c=a(d.attr(e.$attr.ngBindTemplate));d.addClass("ng-binding").data("$binding",c);e.$observe("ngBindTemplate",function(a){d.text(a)})}}],ie=["$sce","$parse",function(a,c){return function(d,e,g){e.addClass("ng-binding").data("$binding",g.ngBindHtml);var f=c(g.ngBindHtml);
+d.$watch(function(){return(f(d)||"").toString()},function(c){e.html(a.getTrustedHtml(f(d))||"")})}}],je=Mb("",!0),ke=Mb("Odd",0),le=Mb("Even",1),me=sa({compile:function(a,c){c.$set("ngCloak",r);a.removeClass("ng-cloak")}}),ne=[function(){return{scope:!0,controller:"@",priority:500}}],Mc={};q("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var c=ma("ng-"+a);Mc[c]=["$parse",function(d){return{compile:function(e,
+g){var f=d(g[c]);return function(c,d,e){d.on(v(a),function(a){c.$apply(function(){f(c,{$event:a})})})}}}}]});var oe=["$animate",function(a){return{transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(c,d,e,g,f){var h,l;c.$watch(e.ngIf,function(g){Oa(g)?l||(l=c.$new(),f(l,function(c){c[c.length++]=N.createComment(" end ngIf: "+e.ngIf+" ");h={clone:c};a.enter(c,d.parent(),d)})):(l&&(l.$destroy(),l=null),h&&(a.leave(vb(h.clone)),h=null))})}}}],pe=["$http","$templateCache",
+"$anchorScroll","$animate","$sce",function(a,c,d,e,g){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Pa.noop,compile:function(f,h){var l=h.ngInclude||h.src,k=h.onload||"",m=h.autoscroll;return function(f,h,q,r,B){var s=0,u,v,x=function(){u&&(u.$destroy(),u=null);v&&(e.leave(v),v=null)};f.$watch(g.parseAsResourceUrl(l),function(g){var l=function(){!z(m)||m&&!f.$eval(m)||d()},q=++s;g?(a.get(g,{cache:c}).success(function(a){if(q===s){var c=f.$new();r.template=a;a=B(c,
+func

<TRUNCATED>

[43/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app/usergrid.appSDK.js
----------------------------------------------------------------------
diff --git a/portal/js/app/usergrid.appSDK.js b/portal/js/app/usergrid.appSDK.js
deleted file mode 100644
index fbe7a6b..0000000
--- a/portal/js/app/usergrid.appSDK.js
+++ /dev/null
@@ -1,2073 +0,0 @@
-/**
- *  App SDK is a collection of classes designed to make working with
- *  the Appigee App Services API as easy as possible.
- *  Learn more at http://apigee.com/docs
- *
- *   Copyright 2012 Apigee Corporation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-//define the console.log for IE
-window.console = window.console || {};
-window.console.log = window.console.log || function() {};
-
-//Usergrid namespace encapsulates this SDK
-window.Usergrid = window.Usergrid || {};
-Usergrid = Usergrid || {};
-Usergrid.SDK_VERSION = '0.9.9';
-
-/**
- *  Usergrid.Query is a class for holding all query information and paging state
- *
- *  @class Query
- *  @author Rod Simpson (rod@apigee.com)
- */
-
-(function () {
-
-  /**
-   *  @constructor
-   *  @param {string} method
-   *  @param {string} path
-   *  @param {object} jsonObj
-   *  @param {object} paramsObj
-   *  @param {function} successCallback
-   *  @param {function} failureCallback
-   */
-  Usergrid.Query = function(method, resource, jsonObj, paramsObj, successCallback, failureCallback) {
-    //query vars
-    this._method = method;
-    this._resource = resource;
-    this._jsonObj = jsonObj;
-    this._paramsObj = paramsObj;
-    this._successCallback = successCallback;
-    this._failureCallback = failureCallback;
-
-    //curl command - will be populated by runQuery function
-    this._curl = '';
-    this._token = false;
-
-    //paging vars
-    this._cursor = null;
-    this._next = null;
-    this._previous = [];
-    this._start = 0;
-    this._end = 0;
-  };
-
-  Usergrid.Query.prototype = {
-     setQueryStartTime: function() {
-       this._start = new Date().getTime();
-     },
-
-     setQueryEndTime: function() {
-       this._end = new Date().getTime();
-     },
-
-     getQueryTotalTime: function() {
-       var seconds = 0;
-       var time = this._end - this._start;
-       try {
-          seconds = ((time/10) / 60).toFixed(2);
-       } catch(e){ return 0; }
-       return this.getMethod() + " " + this.getResource() + " - " + seconds + " seconds";
-     },
-    /**
-     *  A method to set all settable parameters of the Query at one time
-     *
-     *  @public
-     *  @method validateUsername
-     *  @param {string} method
-     *  @param {string} path
-     *  @param {object} jsonObj
-     *  @param {object} paramsObj
-     *  @param {function} successCallback
-     *  @param {function} failureCallback
-     *  @return none
-     */
-    setAllQueryParams: function(method, resource, jsonObj, paramsObj, successCallback, failureCallback) {
-      this._method = method;
-      this._resource = resource;
-      this._jsonObj = jsonObj;
-      this._paramsObj = paramsObj;
-      this._successCallback = successCallback;
-      this._failureCallback = failureCallback;
-    },
-
-    /**
-     *  A method to reset all the parameters in one call
-     *
-     *  @public
-     *  @return none
-     */
-    clearAll: function() {
-      this._method = null;
-      this._resource = null;
-      this._jsonObj = {};
-      this._paramsObj = {};
-      this._successCallback = null;
-      this._failureCallback = null;
-    },
-    /**
-    * Returns the method
-    *
-    * @public
-    * @method getMethod
-    * @return {string} Returns method
-    */
-    getMethod: function() {
-      return this._method;
-    },
-
-    /**
-    * sets the method (POST, PUT, DELETE, GET)
-    *
-    * @public
-    * @method setMethod
-    * @return none
-    */
-    setMethod: function(method) {
-      this._method = method;
-    },
-
-    /**
-    * Returns the resource
-    *
-    * @public
-    * @method getResource
-    * @return {string} the resource
-    */
-    getResource: function() {
-      return this._resource;
-    },
-
-    /**
-    * sets the resource
-    *
-    * @public
-    * @method setResource
-    * @return none
-    */
-    setResource: function(resource) {
-      this._resource = resource;
-    },
-
-    /**
-    * Returns the json Object
-    *
-    * @public
-    * @method getJsonObj
-    * @return {object} Returns the json Object
-    */
-    getJsonObj: function() {
-      return this._jsonObj;
-    },
-
-    /**
-    * sets the json object
-    *
-    * @public
-    * @method setJsonObj
-    * @return none
-    */
-    setJsonObj: function(jsonObj) {
-      this._jsonObj = jsonObj;
-    },
-    /**
-    * Returns the Query Parameters object
-    *
-    * @public
-    * @method getQueryParams
-    * @return {object} Returns Query Parameters object
-    */
-    getQueryParams: function() {
-      return this._paramsObj;
-    },
-
-    /**
-    * sets the query parameter object
-    *
-    * @public
-    * @method setQueryParams
-    * @return none
-    */
-    setQueryParams: function(paramsObj) {
-      this._paramsObj = paramsObj;
-    },
-
-    /**
-    * Returns the success callback function
-    *
-    * @public
-    * @method getSuccessCallback
-    * @return {function} Returns the successCallback
-    */
-    getSuccessCallback: function() {
-      return this._successCallback;
-    },
-
-    /**
-    * sets the success callback function
-    *
-    * @public
-    * @method setSuccessCallback
-    * @return none
-    */
-    setSuccessCallback: function(successCallback) {
-      this._successCallback = successCallback;
-    },
-
-    /**
-    * Calls the success callback function
-    *
-    * @public
-    * @method callSuccessCallback
-    * @return {boolean} Returns true or false based on if there was a callback to call
-    */
-    callSuccessCallback: function(response) {
-      if (this._successCallback && typeof(this._successCallback ) === "function") {
-        this._successCallback(response);
-        return true;
-      } else {
-        return false;
-      }
-    },
-
-    /**
-    * Returns the failure callback function
-    *
-    * @public
-    * @method getFailureCallback
-    * @return {function} Returns the failureCallback
-    */
-    getFailureCallback: function() {
-      return this._failureCallback;
-    },
-
-    /**
-    * sets the failure callback function
-    *
-    * @public
-    * @method setFailureCallback
-    * @return none
-    */
-    setFailureCallback: function(failureCallback) {
-      this._failureCallback = failureCallback;
-    },
-
-    /**
-    * Calls the failure callback function
-    *
-    * @public
-    * @method callFailureCallback
-    * @return {boolean} Returns true or false based on if there was a callback to call
-    */
-    callFailureCallback: function(response) {
-      if (this._failureCallback && typeof(this._failureCallback) === "function") {
-        this._failureCallback(response);
-        return true;
-      } else {
-        return false;
-      }
-    },
-
-    /**
-    * Returns the curl call
-    *
-    * @public
-    * @method getCurl
-    * @return {function} Returns the curl call
-    */
-    getCurl: function() {
-      return this._curl;
-    },
-
-    /**
-    * sets the curl call
-    *
-    * @public
-    * @method setCurl
-    * @return none
-    */
-    setCurl: function(curl) {
-      this._curl = curl;
-    },
-
-    /**
-    * Returns the Token
-    *
-    * @public
-    * @method getToken
-    * @return {function} Returns the Token
-    */
-    getToken: function() {
-      return this._token;
-    },
-
-    /**
-    * Method to set
-    *
-    * @public
-    * @method setToken
-    * @return none
-    */
-    setToken: function(token) {
-      this._token = token;
-    },
-
-    /**
-    * Resets the paging pointer (back to original page)
-    *
-    * @public
-    * @method resetPaging
-    * @return none
-    */
-    resetPaging: function() {
-      this._previous = [];
-      this._next = null;
-      this._cursor = null;
-    },
-
-    /**
-    * Method to determine if there is a previous page of data
-    *
-    * @public
-    * @method hasPrevious
-    * @return {boolean} true or false based on if there is a previous page
-    */
-    hasPrevious: function() {
-      return (this._previous.length > 0);
-    },
-
-    /**
-    * Method to set the paging object to get the previous page of data
-    *
-    * @public
-    * @method getPrevious
-    * @return none
-    */
-    getPrevious: function() {
-      this._next=null; //clear out next so the comparison will find the next item
-      this._cursor = this._previous.pop();
-    },
-
-    /**
-    * Method to determine if there is a next page of data
-    *
-    * @public
-    * @method hasNext
-    * @return {boolean} true or false based on if there is a next page
-    */
-    hasNext: function(){
-      return (this._next);
-    },
-
-    /**
-    * Method to set the paging object to get the next page of data
-    *
-    * @public
-    * @method getNext
-    * @return none
-    */
-    getNext: function() {
-      this._previous.push(this._cursor);
-      this._cursor = this._next;
-    },
-
-    /**
-    * Method to save off the cursor just returned by the last API call
-    *
-    * @public
-    * @method saveCursor
-    * @return none
-    */
-    saveCursor: function(cursor) {
-      //if current cursor is different, grab it for next cursor
-      if (this._next !== cursor) {
-        this._next = cursor;
-      }
-    },
-
-    /**
-    * Method to determine if there is a next page of data
-    *
-    * @public
-    * @method getCursor
-    * @return {string} the current cursor
-    */
-    getCursor: function() {
-      return this._cursor;
-    }
-  };
-})(Usergrid);
-
-
-/**
- *  A class to Model a Usergrid Entity.
- *
- *  @class Entity
- *  @author Rod Simpson (rod@apigee.com)
- */
-(function () {
-  /**
-   *  Constructor for initializing an entity
-   *
-   *  @constructor
-   *  @param {string} collectionType - the type of collection to model
-   *  @param {uuid} uuid - (optional), the UUID of the collection if it is known
-   */
-  Usergrid.Entity = function(collectionType, uuid) {
-    this._collectionType = collectionType;
-    this._data = {};
-    this._uuid = uuid;
-  };
-
-  //inherit prototype from Query
-  Usergrid.Entity.prototype = new Usergrid.Query();
-
-  /**
-   *  gets the current Entity type
-   *
-   *  @method getCollectionType
-   *  @return {string} collection type
-   */
-  Usergrid.Entity.prototype.getCollectionType = function (){
-    return this._collectionType;
-  }
-
-  /**
-   *  sets the current Entity type
-   *
-   *  @method setCollectionType
-   *  @param {string} collectionType
-   *  @return none
-   */
-  Usergrid.Entity.prototype.setCollectionType = function (collectionType){
-    this._collectionType = collectionType;
-  }
-
-  /**
-   *  gets a specific field or the entire data object. If null or no argument
-   *  passed, will return all data, else, will return a specific field
-   *
-   *  @method get
-   *  @param {string} field
-   *  @return {string} || {object} data
-   */
-  Usergrid.Entity.prototype.get = function (field){
-    if (field) {
-      return this._data[field];
-    } else {
-      return this._data;
-    }
-  },
-
-  /**
-   *  adds a specific field or object to the Entity's data
-   *
-   *  @method set
-   *  @param {string} item || {object}
-   *  @param {string} value
-   *  @return none
-   */
-  Usergrid.Entity.prototype.set = function (item, value){
-    if (typeof item === 'object') {
-      for(field in item) {
-        this._data[field] = item[field];
-      }
-    } else if (typeof item === 'string') {
-      this._data[item] = value;
-    } else {
-      this._data = null;
-    }
-  }
-
-  /**
-   *  Saves the entity back to the database
-   *
-   *  @method save
-   *  @public
-   *  @param {function} successCallback
-   *  @param {function} errorCallback
-   *  @return none
-   */
-  Usergrid.Entity.prototype.save = function (successCallback, errorCallback){
-    var path = this.getCollectionType();
-    //TODO:  API will be changed soon to accomodate PUTs via name which create new entities
-    //       This function should be changed to PUT only at that time, and updated to use
-    //       either uuid or name
-    var method = 'POST';
-    if (this.get('uuid')) {
-      method = 'PUT';
-      if (Usergrid.validation.isUUID(this.get('uuid'))) {
-        path += "/" + this.get('uuid');
-      }
-    }
-
-    //if this is a user, update the password if it has been specified
-    var data = {};
-    if (path == 'users') {
-      data = this.get();
-      var pwdata = {};
-      //Note: we have a ticket in to change PUT calls to /users to accept the password change
-      //      once that is done, we will remove this call and merge it all into one
-      if (data.oldpassword && data.newpassword) {
-        pwdata.oldpassword = data.oldpassword;
-        pwdata.newpassword = data.newpassword;
-        this.runAppQuery(new Usergrid.Query('PUT', 'users/'+uuid+'/password', pwdata, null,
-          function (response) {
-            //not calling any callbacks - this section will be merged as soon as API supports
-            //   updating passwords in general PUT call
-          },
-          function (response) {
-
-          }
-        ));
-      }
-      //remove old and new password fields so they don't end up as part of the entity object
-      delete data.oldpassword;
-      delete data.newpassword;
-    }
-
-    //update the entity
-    var self = this;
-
-    data = {};
-    var entityData = this.get();
-    //remove system specific properties
-    for (var item in entityData) {
-      if (item == 'metadata' || item == 'created' || item == 'modified' ||
-          item == 'type' || item == 'activatted' ) { continue; }
-      data[item] = entityData[item];
-    }
-
-    this.setAllQueryParams(method, path, data, null,
-      function(response) {
-        try {
-          var entity = response.entities[0];
-          self.set(entity);
-          if (typeof(successCallback) === "function"){
-            successCallback(response);
-          }
-        } catch (e) {
-          if (typeof(errorCallback) === "function"){
-            errorCallback(response);
-          }
-        }
-      },
-      function(response) {
-        if (typeof(errorCallback) === "function"){
-          errorCallback(response);
-        }
-      }
-    );
-    Usergrid.ApiClient.runAppQuery(this);
-  }
-
-  /**
-   *  refreshes the entity by making a GET call back to the database
-   *
-   *  @method fetch
-   *  @public
-   *  @param {function} successCallback
-   *  @param {function} errorCallback
-   *  @return none
-   */
-  Usergrid.Entity.prototype.fetch = function (successCallback, errorCallback){
-    var path = this.getCollectionType();
-    //if a uuid is available, use that, otherwise, use the name
-    if (this.get('uuid')) {
-      path += "/" + this.get('uuid');
-    } else {
-      if (path == "users") {
-        if (this.get("username")) {
-          path += "/" + this.get("username");
-        } else {
-          console.log('no username specified');
-          if (typeof(errorCallback) === "function"){
-            console.log('no username specified');
-          }
-        }
-      } else {
-        if (this.get()) {
-          path += "/" + this.get();
-        } else {
-          console.log('no entity identifier specified');
-          if (typeof(errorCallback) === "function"){
-            console.log('no entity identifier specified');
-          }
-        }
-      }
-    }
-    var self = this;
-    this.setAllQueryParams('GET', path, null, null,
-      function(response) {
-        try {
-          if (response.user) {
-            self.set(response.user);
-          }
-          var entity = response.entities[0];
-          self.set(entity);
-          if (typeof(successCallback) === "function"){
-            successCallback(response);
-          }
-        } catch (e) {
-          if (typeof(errorCallback) === "function"){
-            errorCallback(response);
-          }
-        }
-      },
-      function(response) {
-        if (typeof(errorCallback) === "function"){
-            errorCallback(response);
-        }
-      }
-    );
-    Usergrid.ApiClient.runAppQuery(this);
-  }
-
-  /**
-   *  deletes the entity from the database - will only delete
-   *  if the object has a valid uuid
-   *
-   *  @method destroy
-   *  @public
-   *  @param {function} successCallback
-   *  @param {function} errorCallback
-   *  @return none
-   *
-   */
-  Usergrid.Entity.prototype.destroy = function (successCallback, errorCallback){
-    var path = this.getCollectionType();
-    if (this.get('uuid')) {
-      path += "/" + this.get('uuid');
-    } else {
-      console.log('Error trying to delete object - no uuid specified.');
-      if (typeof(errorCallback) === "function"){
-        errorCallback('Error trying to delete object - no uuid specified.');
-      }
-    }
-    var self = this;
-    this.setAllQueryParams('DELETE', path, null, null,
-      function(response) {
-        //clear out this object
-        self.set(null);
-        if (typeof(successCallback) === "function"){
-          successCallback(response);
-        }
-      },
-      function(response) {
-        if (typeof(errorCallback) === "function"){
-            errorCallback(response);
-        }
-      }
-    );
-    Usergrid.ApiClient.runAppQuery(this);
-  }
-
-})(Usergrid);
-
-
-/**
- *  The Collection class models Usergrid Collections.  It essentially
- *  acts as a container for holding Entity objects, while providing
- *  additional funcitonality such as paging, and saving
- *
- *  @class Collection
- *  @author Rod Simpson (rod@apigee.com)
- */
-(function () {
-  /**
-   *  Collection is a container class for holding entities
-   *
-   *  @constructor
-   *  @param {string} collectionPath - the type of collection to model
-   *  @param {uuid} uuid - (optional), the UUID of the collection if it is known
-   */
-  Usergrid.Collection = function(path, uuid) {
-    this._path = path;
-    this._uuid = uuid;
-    this._list = [];
-    this._Query = new Usergrid.Query();
-    this._iterator = -1; //first thing we do is increment, so set to -1
-  };
-
-  Usergrid.Collection.prototype = new Usergrid.Query();
-
-  /**
-   *  gets the current Collection path
-   *
-   *  @method getPath
-   *  @return {string} path
-   */
-  Usergrid.Collection.prototype.getPath = function (){
-    return this._path;
-  }
-
-  /**
-   *  sets the Collection path
-   *
-   *  @method setPath
-   *  @param {string} path
-   *  @return none
-   */
-  Usergrid.Collection.prototype.setPath = function (path){
-    this._path = path;
-  }
-
-  /**
-   *  gets the current Collection UUID
-   *
-   *  @method getUUID
-   *  @return {string} the uuid
-   */
-  Usergrid.Collection.prototype.getUUID = function (){
-    return this._uuid;
-  }
-
-  /**
-   *  sets the current Collection UUID
-   *  @method setUUID
-   *  @param {string} uuid
-   *  @return none
-   */
-  Usergrid.Collection.prototype.setUUID = function (uuid){
-    this._uuid = uuid;
-  }
-
-  /**
-   *  Adds an Entity to the collection (adds to the local object)
-   *
-   *  @method addEntity
-   *  @param {object} entity
-   *  @param {function} successCallback
-   *  @param {function} errorCallback
-   *  @return none
-   */
-  Usergrid.Collection.prototype.addEntity = function (entity){
-    //then add it to the list
-    var count = this._list.length;
-    this._list[count] = entity;
-  }
-
-  /**
-   *  Adds a new Entity to the collection (saves, then adds to the local object)
-   *
-   *  @method addNewEntity
-   *  @param {object} entity
-   *  @return none
-   */
-  Usergrid.Collection.prototype.addNewEntity = function (entity,successCallback, errorCallback) {
-    //add the entity to the list
-    this.addEntity(entity);
-    //then save the entity
-    entity.save(successCallback, errorCallback);
-  }
-
-  Usergrid.Collection.prototype.destroyEntity = function (entity) {
-    //first get the entities uuid
-    var uuid = entity.get('uuid');
-    //if the entity has a uuid, delete it
-    if (Usergrid.validation.isUUID(uuid)) {
-      //then remove it from the list
-      var count = this._list.length;
-      var i=0;
-      var reorder = false;
-      for (i=0; i<count; i++) {
-        if(reorder) {
-          this._list[i-1] = this._list[i];
-          this._list[i] = null;
-        }
-        if (this._list[i].get('uuid') == uuid) {
-          this._list[i] = null;
-          reorder=true;
-        }
-      }
-    }
-    //first destroy the entity on the server
-    entity.destroy();
-  }
-
-  /**
-   *  Looks up an Entity by a specific field - will return the first Entity that
-   *  has a matching field
-   *
-   *  @method getEntityByField
-   *  @param {string} field
-   *  @param {string} value
-   *  @return {object} returns an entity object, or null if it is not found
-   */
-  Usergrid.Collection.prototype.getEntityByField = function (field, value){
-    var count = this._list.length;
-    var i=0;
-    for (i=0; i<count; i++) {
-      if (this._list[i].getField(field) == value) {
-        return this._list[i];
-      }
-    }
-    return null;
-  }
-
-  /**
-   *  Looks up an Entity by UUID
-   *
-   *  @method getEntityByUUID
-   *  @param {string} UUID
-   *  @return {object} returns an entity object, or null if it is not found
-   */
-  Usergrid.Collection.prototype.getEntityByUUID = function (UUID){
-    var count = this._list.length;
-    var i=0;
-    for (i=0; i<count; i++) {
-      if (this._list[i].get('uuid') == UUID) {
-        return this._list[i];
-      }
-    }
-    return null;
-  }
-
-  /**
-   *  Returns the first Entity of the Entity list - does not affect the iterator
-   *
-   *  @method getFirstEntity
-   *  @return {object} returns an entity object
-   */
-  Usergrid.Collection.prototype.getFirstEntity = function (){
-    var count = this._list.length;
-      if (count > 0) {
-        return this._list[0];
-      }
-      return null;
-  }
-
-  /**
-   *  Returns the last Entity of the Entity list - does not affect the iterator
-   *
-   *  @method getLastEntity
-   *  @return {object} returns an entity object
-   */
-  Usergrid.Collection.prototype.getLastEntity = function (){
-    var count = this._list.length;
-      if (count > 0) {
-        return this._list[count-1];
-      }
-      return null;
-  }
-
-  /**
-   *  Entity iteration -Checks to see if there is a "next" entity
-   *  in the list.  The first time this method is called on an entity
-   *  list, or after the resetEntityPointer method is called, it will
-   *  return true referencing the first entity in the list
-   *
-   *  @method hasNextEntity
-   *  @return {boolean} true if there is a next entity, false if not
-   */
-  Usergrid.Collection.prototype.hasNextEntity = function (){
-    var next = this._iterator + 1;
-      if(next >=0 && next < this._list.length) {
-        return true;
-      }
-      return false;
-  }
-
-  /**
-   *  Entity iteration - Gets the "next" entity in the list.  The first
-   *  time this method is called on an entity list, or after the method
-   *  resetEntityPointer is called, it will return the,
-   *  first entity in the list
-   *
-   *  @method hasNextEntity
-   *  @return {object} entity
-   */
-  Usergrid.Collection.prototype.getNextEntity = function (){
-    this._iterator++;
-      if(this._iterator >= 0 && this._iterator <= this._list.length) {
-        return this._list[this._iterator];
-      }
-      return false;
-  }
-
-  /**
-   *  Entity iteration - Checks to see if there is a "previous"
-   *  entity in the list.
-   *
-   *  @method hasPreviousEntity
-   *  @return {boolean} true if there is a previous entity, false if not
-   */
-  Usergrid.Collection.prototype.hasPreviousEntity = function (){
-    var previous = this._iterator - 1;
-      if(previous >=0 && previous < this._list.length) {
-        return true;
-      }
-      return false;
-  }
-
-  /**
-   *  Entity iteration - Gets the "previous" entity in the list.
-   *
-   *  @method getPreviousEntity
-   *  @return {object} entity
-   */
-  Usergrid.Collection.prototype.getPreviousEntity = function (){
-     this._iterator--;
-      if(this._iterator >= 0 && this._iterator <= this._list.length) {
-        return this.list[this._iterator];
-      }
-      return false;
-  }
-
-  /**
-   *  Entity iteration - Resets the iterator back to the beginning
-   *  of the list
-   *
-   *  @method resetEntityPointer
-   *  @return none
-   */
-  Usergrid.Collection.prototype.resetEntityPointer = function (){
-     this._iterator  = -1;
-  }
-
-  /**
-   *  gets and array of all entities currently in the colleciton object
-   *
-   *  @method getEntityList
-   *  @return {array} returns an array of entity objects
-   */
-  Usergrid.Collection.prototype.getEntityList = function (){
-     return this._list;
-  }
-
-  /**
-   *  sets the entity list
-   *
-   *  @method setEntityList
-   *  @param {array} list - an array of Entity objects
-   *  @return none
-   */
-  Usergrid.Collection.prototype.setEntityList = function (list){
-    this._list = list;
-  }
-
-  /**
-   *  Paging -  checks to see if there is a next page od data
-   *
-   *  @method hasNextPage
-   *  @return {boolean} returns true if there is a next page of data, false otherwise
-   */
-  Usergrid.Collection.prototype.hasNextPage = function (){
-    return this.hasNext();
-  }
-
-  /**
-   *  Paging - advances the cursor and gets the next
-   *  page of data from the API.  Stores returned entities
-   *  in the Entity list.
-   *
-   *  @method getNextPage
-   *  @return none
-   */
-  Usergrid.Collection.prototype.getNextPage = function (){
-    if (this.hasNext()) {
-        //set the cursor to the next page of data
-        this.getNext();
-        //empty the list
-        this.setEntityList([]);
-        Usergrid.ApiClient.runAppQuery(this);
-      }
-  }
-
-  /**
-   *  Paging -  checks to see if there is a previous page od data
-   *
-   *  @method hasPreviousPage
-   *  @return {boolean} returns true if there is a previous page of data, false otherwise
-   */
-  Usergrid.Collection.prototype.hasPreviousPage = function (){
-    return this.hasPrevious();
-  }
-
-  /**
-   *  Paging - reverts the cursor and gets the previous
-   *  page of data from the API.  Stores returned entities
-   *  in the Entity list.
-   *
-   *  @method getPreviousPage
-   *  @return none
-   */
-  Usergrid.Collection.prototype.getPreviousPage = function (){
-    if (this.hasPrevious()) {
-        this.getPrevious();
-        //empty the list
-        this.setEntityList([]);
-        Usergrid.ApiClient.runAppQuery(this);
-      }
-  }
-
-  /**
-   *  clears the query parameters object
-   *
-   *  @method clearQuery
-   *  @return none
-   */
-  Usergrid.Collection.prototype.clearQuery = function (){
-    this.clearAll();
-  }
-
-  //The get() function is deprecated.  Including here for backwards compatibility
-  //with previous versions of the SDK
-  Usergrid.Collection.prototype.get = function (successCallback, errorCallback){
-    Usergrid.Collection.fetch(successCallback, errorCallback);
-  }
-
-  /**
-   *  A method to get all items in the collection, as dictated by the
-   *  cursor and the query.  By default, the API returns 10 items in
-   *  a given call.  This can be overriden so that more or fewer items
-   *  are returned.  The entities returned are all stored in the colleciton
-   *  object's entity list, and can be retrieved by calling getEntityList()
-   *
-   *  @method get
-   *  @param {function} successCallback
-   *  @param {function} errorCallback
-   *  @return none
-   */
-  Usergrid.Collection.prototype.fetch = function (successCallback, errorCallback){
-    var self = this;
-    var queryParams = this.getQueryParams();
-    //empty the list
-    this.setEntityList([]);
-    this.setAllQueryParams('GET', this.getPath(), null, queryParams,
-      function(response) {
-        if (response.entities) {
-          this.resetEntityPointer();
-          var count = response.entities.length;
-          for (var i=0;i<count;i++) {
-            var uuid = response.entities[i].uuid;
-            if (uuid) {
-              var entity = new Usergrid.Entity(self.getPath(), uuid);
-              //store the data in the entity
-              var data = response.entities[i] || {};
-              delete data.uuid; //remove uuid from the object
-              entity.set(data);
-              //store the new entity in this collection
-              self.addEntity(entity);
-            }
-          }
-          if (typeof(successCallback) === "function"){
-            successCallback(response);
-          }
-        } else {
-          if (typeof(errorCallback) === "function"){
-              errorCallback(response);
-          }
-        }
-      },
-      function(response) {
-        if (typeof(errorCallback) === "function"){
-            errorCallback(response);
-        }
-      }
-    );
-    Usergrid.ApiClient.runAppQuery(this);
-  }
-
-  /**
-   *  A method to save all items currently stored in the collection object
-   *  caveat with this method: we can't update anything except the items
-   *  currently stored in the collection.
-   *
-   *  @method save
-   *  @param {function} successCallback
-   *  @param {function} errorCallback
-   *  @return none
-   */
-  Usergrid.Collection.prototype.save = function (successCallback, errorCallback){
-    //loop across all entities and save each one
-    var entities = this.getEntityList();
-    var count = entities.length;
-    var jsonObj = [];
-    for (var i=0;i<count;i++) {
-      entity = entities[i];
-      data = entity.get();
-      if (entity.get('uuid')) {
-        data.uuid = entity.get('uuid');
-        jsonObj.push(data);
-      }
-      entity.save();
-    }
-    this.setAllQueryParams('PUT', this.getPath(), jsonObj, null,successCallback, errorCallback);
-    Usergrid.ApiClient.runAppQuery(this);
-  }
-})(Usergrid);
-
-
-/*
- *  Usergrid.ApiClient
- *
- *  A Singleton that is the main client for making calls to the API. Maintains
- *  state between calls for the following items:
- *
- *  Token
- *  User (username, email, name, uuid)
- *
- *  Main methods for making calls to the API are:
- *
- *  runAppQuery (Query)
- *  runManagementQuery(Query)
- *
- *  Create a new Usergrid.Query object and then pass it to either of these
- *  two methods for making calls directly to the API.
- *
- *  A method for logging in an app user (to get a OAuth token) also exists:
- *
- *  logInAppUser (username, password, successCallback, failureCallback)
- *
- *  @class Usergrid.ApiClient
- *  @author Rod Simpson (rod@apigee.com)
- *
- */
-Usergrid.M = 'ManagementQuery';
-Usergrid.A = 'ApplicationQuery';
-Usergrid.ApiClient = (function () {
-  //API endpoint
-  var _apiUrl = "https://api.usergrid.com/";
-  var _orgName = null;
-  var _appName = null;
-  var _token = null;
-  var _callTimeout = 30000;
-  var _queryType = null;
-  var _loggedInUser = null;
-  var _logoutCallback = null;
-  var _callTimeoutCallback = null;
-
-
-  /*
-   *  A method to set up the ApiClient with orgname and appname
-   *
-   *  @method init
-   *  @public
-   *  @param {string} orgName
-   *  @param {string} appName
-   *  @return none
-   *
-   */
-  function init(orgName, appName){
-    this.setOrganizationName(orgName);
-    this.setApplicationName(appName);
-  }
-
-  /*
-  *  Public method to run calls against the app endpoint
-  *
-  *  @method runAppQuery
-  *  @public
-  *  @params {object} Usergrid.Query - {method, path, jsonObj, params, successCallback, failureCallback}
-  *  @return none
-  */
-  function runAppQuery (Query) {
-    var endpoint = "/" + this.getOrganizationName() + "/" + this.getApplicationName() + "/";
-    setQueryType(Usergrid.A);
-    run(Query, endpoint);
-  }
-
-  /*
-  *  Public method to run calls against the management endpoint
-  *
-  *  @method runManagementQuery
-  *  @public
-  *  @params {object} Usergrid.Query - {method, path, jsonObj, params, successCallback, failureCallback}
-  *  @return none
-  */
-  function runManagementQuery (Query) {
-    var endpoint = "/management/";
-    setQueryType(Usergrid.M);
-    run(Query, endpoint)
-  }
-
-  /*
-    *  A public method to get the organization name to be used by the client
-    *
-    *  @method getOrganizationName
-    *  @public
-    *  @return {string} the organization name
-    */
-  function getOrganizationName() {
-    return _orgName;
-  }
-
-  /*
-    *  A public method to set the organization name to be used by the client
-    *
-    *  @method setOrganizationName
-    *  @param orgName - the organization name
-    *  @return none
-    */
-  function setOrganizationName(orgName) {
-    _orgName = orgName;
-  }
-
-  /*
-  *  A public method to get the application name to be used by the client
-  *
-  *  @method getApplicationName
-  *  @public
-  *  @return {string} the application name
-  */
-  function getApplicationName() {
-    return _appName;
-  }
-
-  /*
-  *  A public method to set the application name to be used by the client
-  *
-  *  @method setApplicationName
-  *  @public
-  *  @param appName - the application name
-  *  @return none
-  */
-  function setApplicationName(appName) {
-    _appName = appName;
-  }
-
-  /*
-  *  A public method to get current OAuth token
-  *
-  *  @method getToken
-  *  @public
-  *  @return {string} the current token
-  */
-  function getToken() {
-    return _token;
-  }
-
-  /*
-  *  A public method to set the current Oauth token
-  *
-  *  @method setToken
-  *  @public
-  *  @param token - the bearer token
-  *  @return none
-  */
-  function setToken(token) {
-    _token = token;
-  }
-
-  /*
-   *  A public method to return the API URL
-   *
-   *  @method getApiUrl
-   *  @public
-   *  @return {string} the API url
-   */
-  function getApiUrl() {
-    return _apiUrl;
-  }
-
-  /*
-   *  A public method to overide the API url
-   *
-   *  @method setApiUrl
-   *  @public
-   *  @return none
-   */
-  function setApiUrl(apiUrl) {
-    _apiUrl = apiUrl;
-  }
-
-  /*
-   *  A public method to return the call timeout amount
-   *
-   *  @method getCallTimeout
-   *  @public
-   *  @return {string} the timeout value (an integer) 30000 = 30 seconds
-   */
-  function getCallTimeout() {
-    return _callTimeout;
-  }
-
-  /*
-   *  A public method to override the call timeout amount
-   *
-   *  @method setCallTimeout
-   *  @public
-   *  @return none
-   */
-  function setCallTimeout(callTimeout) {
-    _callTimeout = callTimeout;
-  }
-
-  /*
-   * Returns the call timeout callback function
-   *
-   * @public
-   * @method setCallTimeoutCallback
-   * @return none
-   */
-  function setCallTimeoutCallback(callback) {
-    _callTimeoutCallback = callback;
-  }
-
-  /*
-   * Returns the call timeout callback function
-   *
-   * @public
-   * @method getCallTimeoutCallback
-   * @return {function} Returns the callTimeoutCallback
-   */
-  function getCallTimeoutCallback() {
-    return _callTimeoutCallback;
-  }
-
-  /*
-   * Calls the call timeout callback function
-   *
-   * @public
-   * @method callTimeoutCallback
-   * @return {boolean} Returns true or false based on if there was a callback to call
-   */
-  function callTimeoutCallback(response) {
-    if (_callTimeoutCallback && typeof(_callTimeoutCallback) === "function") {
-      _callTimeoutCallback(response);
-      return true;
-    } else {
-      return false;
-    }
-  }
-
-  /*
-   *  A public method to get the api url of the reset pasword endpoint
-   *
-   *  @method getResetPasswordUrl
-   *  @public
-   *  @return {string} the api rul of the reset password endpoint
-   */
-  function getResetPasswordUrl() {
-    return getApiUrl() + "management/users/resetpw"
-  }
-
-  /*
-   *  A public method to get an Entity object for the current logged in user
-   *
-   *  @method getLoggedInUser
-   *  @public
-   *  @return {object} user - Entity object of type user
-   */
-  function getLoggedInUser() {
-    return this._loggedInUser;
-  }
-
-  /*
-   *  A public method to set an Entity object for the current logged in user
-   *
-   *  @method setLoggedInUser
-   *  @public
-   *  @param {object} user - Entity object of type user
-   *  @return none
-   */
-  function setLoggedInUser(user) {
-    this._loggedInUser = user;
-  }
-
-  /*
-  *  A public method to log in an app user - stores the token for later use
-  *
-  *  @method logInAppUser
-  *  @public
-  *  @params {string} username
-  *  @params {string} password
-  *  @params {function} successCallback
-  *  @params {function} failureCallback
-  *  @return {response} callback functions return API response object
-  */
-  function logInAppUser (username, password, successCallback, failureCallback) {
-    var self = this;
-    var data = {"username": username, "password": password, "grant_type": "password"};
-    this.runAppQuery(new Usergrid.Query('POST', 'token', data, null,
-      function (response) {
-        var user = new Usergrid.Entity('users');
-        user.set('username', response.user.username);
-        user.set('name', response.user.name);
-        user.set('email', response.user.email);
-        user.set('uuid', response.user.uuid);
-        self.setLoggedInUser(user);
-        self.setToken(response.access_token);
-        if (successCallback && typeof(successCallback) === "function") {
-          successCallback(response);
-        }
-      },
-      function (response) {
-        if (failureCallback && typeof(failureCallback) === "function") {
-          failureCallback(response);
-        }
-      }
-     ));
-  }
-
-  /*
-   *  TODO:  NOT IMPLEMENTED YET - A method to renew an app user's token
-   *  Note: waiting for API implementation
-   *  @method renewAppUserToken
-   *  @public
-   *  @return none
-   */
-  function renewAppUserToken() {
-
-  }
-
-  /**
-   *  A public method to log out an app user - clears all user fields from client
-   *
-   *  @method logoutAppUser
-   *  @public
-   *  @return none
-   */
-  function logoutAppUser() {
-    this.setLoggedInUser(null);
-    this.setToken(null);
-  }
-
-  /**
-   *  A public method to test if a user is logged in - does not guarantee that the token is still valid,
-   *  but rather that one exists, and that there is a valid UUID
-   *
-   *  @method isLoggedInAppUser
-   *  @public
-   *  @params {object} Usergrid.Query - {method, path, jsonObj, params, successCallback, failureCallback}
-   *  @return {boolean} Returns true the user is logged in (has token and uuid), false if not
-   */
-  function isLoggedInAppUser() {
-    var user = this.getLoggedInUser();
-    return (this.getToken() && Usergrid.validation.isUUID(user.get('uuid')));
-  }
-
-   /*
-   *  A public method to get the logout callback, which is called
-   *
-   *  when the token is found to be invalid
-   *  @method getLogoutCallback
-   *  @public
-   *  @return {string} the api rul of the reset password endpoint
-   */
-  function getLogoutCallback() {
-    return _logoutCallback;
-  }
-
-  /*
-   *  A public method to set the logout callback, which is called
-   *
-   *  when the token is found to be invalid
-   *  @method setLogoutCallback
-   *  @public
-   *  @param {function} logoutCallback
-   *  @return none
-   */
-  function setLogoutCallback(logoutCallback) {
-    _logoutCallback = logoutCallback;
-  }
-
-  /*
-   *  A public method to call the logout callback, which is called
-   *
-   *  when the token is found to be invalid
-   *  @method callLogoutCallback
-   *  @public
-   *  @return none
-   */
-  function callLogoutCallback() {
-    if (_logoutCallback && typeof(_logoutCallback ) === "function") {
-      _logoutCallback();
-      return true;
-    } else {
-      return false;
-    }
-  }
-
-  /**
-   *  Private helper method to encode the query string parameters
-   *
-   *  @method encodeParams
-   *  @public
-   *  @params {object} params - an object of name value pairs that will be urlencoded
-   *  @return {string} Returns the encoded string
-   */
-  function encodeParams (params) {
-    tail = [];
-    var item = [];
-    if (params instanceof Array) {
-      for (i in params) {
-        item = params[i];
-        if ((item instanceof Array) && (item.length > 1)) {
-          tail.push(item[0] + "=" + encodeURIComponent(item[1]));
-        }
-      }
-    } else {
-      for (var key in params) {
-        if (params.hasOwnProperty(key)) {
-          var value = params[key];
-          if (value instanceof Array) {
-            for (i in value) {
-              item = value[i];
-              tail.push(key + "=" + encodeURIComponent(item));
-            }
-          } else {
-            tail.push(key + "=" + encodeURIComponent(value));
-          }
-        }
-      }
-    }
-    return tail.join("&");
-  }
-
-  /*
-   *  A private method to get the type of the current api call - (Management or Application)
-   *
-   *  @method getQueryType
-   *  @private
-   *  @return {string} the call type
-   */
-  function getQueryType() {
-    return _queryType;
-  }
-  /*
-   *  A private method to set the type of the current api call - (Management or Application)
-   *
-   *  @method setQueryType
-   *  @private
-   *  @param {string} call type
-   *  @return none
-   */
-  function setQueryType(type) {
-    _queryType = type;
-  }
-
-  /**
-   *  A private method to validate, prepare,, and make the calls to the API
-   *  Use runAppQuery or runManagementQuery to make your calls!
-   *
-   *  @method run
-   *  @private
-   *  @params {object} Usergrid.Query - {method, path, jsonObj, params, successCallback, failureCallback}
-   *  @params {string} endpoint - used to differentiate between management and app queries
-   *  @return {response} callback functions return API response object
-   */
-  function run (Query, endpoint) {
-    var curl = "curl";
-    //validate parameters
-    try {
-      //verify that the query object is valid
-      if(!(Query instanceof Usergrid.Query)) {
-        throw(new Error('Query is not a valid object.'));
-      }
-      //for timing, call start
-      Query.setQueryStartTime();
-      //peel the data out of the query object
-      var method = Query.getMethod().toUpperCase();
-      var path = Query.getResource();
-      var jsonObj = Query.getJsonObj() || {};
-      var params = Query.getQueryParams() || {};
-
-      //method - should be GET, POST, PUT, or DELETE only
-      if (method != 'GET' && method != 'POST' && method != 'PUT' && method != 'DELETE') {
-        throw(new Error('Invalid method - should be GET, POST, PUT, or DELETE.'));
-      }
-      //curl - add the method to the command (no need to add anything for GET)
-      if (method == "POST") {curl += " -X POST"; }
-      else if (method == "PUT") { curl += " -X PUT"; }
-      else if (method == "DELETE") { curl += " -X DELETE"; }
-      else { curl += " -X GET"; }
-
-      //curl - append the bearer token if this is not the sandbox app
-      var application_name = Usergrid.ApiClient.getApplicationName();
-      if (application_name) {
-        application_name = application_name.toUpperCase();
-      }
-      //if (application_name != 'SANDBOX' && Usergrid.ApiClient.getToken()) {
-      if ( (application_name != 'SANDBOX' && Usergrid.ApiClient.getToken()) || (getQueryType() == Usergrid.M && Usergrid.ApiClient.getToken())) {
-        curl += ' -i -H "Authorization: Bearer ' + Usergrid.ApiClient.getToken() + '"';
-        Query.setToken(true);
-      }
-
-      //params - make sure we have a valid json object
-      _params = JSON.stringify(params);
-      if (!JSON.parse(_params)) {
-        throw(new Error('Params object is not valid.'));
-      }
-
-      //add in the cursor if one is available
-      if (Query.getCursor()) {
-        params.cursor = Query.getCursor();
-      } else {
-        delete params.cursor;
-      }
-
-      //strip off the leading slash of the endpoint if there is one
-      endpoint = endpoint.indexOf('/') == 0 ? endpoint.substring(1) : endpoint;
-
-      //add the endpoint to the path
-      path = endpoint + path;
-
-      //make sure path never has more than one / together
-      if (path) {
-        //regex to strip multiple slashes
-        while(path.indexOf('//') != -1){
-          path = path.replace('//', '/');
-        }
-      }
-
-      //add the http:// bit on the front
-      path = Usergrid.ApiClient.getApiUrl() + path;
-
-      //curl - append the path
-      curl += ' "' + path;
-
-      //curl - append params to the path for curl prior to adding the timestamp
-      var curl_encoded_params = encodeParams(params);
-      if (curl_encoded_params) {
-        curl += "?" + curl_encoded_params;
-      }
-      curl += '"';
-
-      //add in a timestamp for gets and deletes - to avoid caching by the browser
-      if ((method == "GET") || (method == "DELETE")) {
-        params['_'] = new Date().getTime();
-      }
-
-      //append params to the path
-      var encoded_params = encodeParams(params);
-      if (encoded_params) {
-        path += "?" + encoded_params;
-      }
-
-      //jsonObj - make sure we have a valid json object
-      jsonObj = JSON.stringify(jsonObj)
-      if (!JSON.parse(jsonObj)) {
-        throw(new Error('JSON object is not valid.'));
-      }
-      if (jsonObj == '{}') {
-        jsonObj = null;
-      } else {
-        //curl - add in the json obj
-        curl += " -d '" + jsonObj + "'";
-      }
-
-    } catch (e) {
-      //parameter was invalid
-      console.log('error occured running query -' + e.message);
-      return false;
-    }
-    //log the curl command to the console
-    console.log(curl);
-    //store the curl command back in the object
-    Query.setCurl(curl);
-
-    //so far so good, so run the query
-    var xD = window.XDomainRequest ? true : false;
-    var xhr = getXHR(method, path, jsonObj);
-
-    // Handle response.
-    /*
-    xhr.onerror = function() {
-      //for timing, call end
-      Query.setQueryEndTime();
-      //for timing, log the total call time
-      console.log(Query.getQueryTotalTime());
-      //network error
-      clearTimeout(timeout);
-      console.log('API call failed at the network level.');
-      //send back an error (best we can do with what ie gives back)
-      Query.callFailureCallback(response.innerText);
-    };*/
-    xhr.xdomainOnload = function (response) {
-      //for timing, call end
-      Query.setQueryEndTime();
-      //for timing, log the total call time
-      console.log('Call timing: ' + Query.getQueryTotalTime());
-      //call completed
-      clearTimeout(timeout);
-      //decode the response
-      response = JSON.parse(xhr.responseText);
-      //if a cursor was present, grab it
-      try {
-        var cursor = response.cursor || null;
-        Query.saveCursor(cursor);
-      }catch(e) {}
-      Query.callSuccessCallback(response);
-    };
-    xhr.onload = function(response) {
-      //for timing, call end
-      Query.setQueryEndTime();
-      //for timing, log the total call time
-      console.log('Call timing: ' + Query.getQueryTotalTime());
-      //call completed
-      clearTimeout(timeout);
-      //decode the response
-      response = JSON.parse(xhr.responseText);
-      if (xhr.status != 200 && !xD)   {
-        //there was an api error
-        try {
-          var error = response.error;
-          console.log('API call failed: (status: '+xhr.status+') ' + response.error_description);
-          if ( (error == "auth_expired_session_token") ||
-               (error == "auth_missing_credentials")   ||
-               (error == "unauthorized")               ||
-               (error == "auth_invalid")) {
-            //this error type means the user is not authorized. If a logout function is defined, call it
-            console.log('Auth error: ' + error);
-            callLogoutCallback();
-          }
-        } catch(e){}
-        //otherwise, just call the failure callback
-        Query.callFailureCallback(response.error_description);
-        return;
-      } else {
-        //query completed succesfully, so store cursor
-        var cursor = response.cursor || null;
-        Query.saveCursor(cursor);
-        //then call the original callback
-        Query.callSuccessCallback(response);
-     }
-    };
-
-    var timeout = setTimeout(
-      function() {
-        xhr.abort();
-        if ( typeof(Usergrid.ApiClient.getCallTimeoutCallback()) === 'function') {
-          Usergrid.ApiClient.callTimeoutCallback('API CALL TIMEOUT');
-        } else if (typeof(Query.getFailureCallback()) === 'function'){
-          Query.callFailureCallback('API CALL TIMEOUT');
-        }
-      },
-      Usergrid.ApiClient.getCallTimeout()); //set for 30 seconds
-
-    xhr.send(jsonObj);
-  }
-
-   /**
-   *  A private method to return the XHR object
-   *
-   *  @method getXHR
-   *  @private
-   *  @params {string} method (GET,POST,PUT,DELETE)
-   *  @params {string} path - api endpoint to call
-   *  @return {object} jsonObj - the json object if there is one
-   */
-  function getXHR(method, path, jsonObj) {
-    var xhr;
-    if(window.XDomainRequest)
-    {
-      xhr = new window.XDomainRequest();
-      if (Usergrid.ApiClient.getToken()) {
-        if (path.indexOf("?")) {
-          path += '&access_token='+Usergrid.ApiClient.getToken();
-        } else {
-          path = '?access_token='+Usergrid.ApiClient.getToken();
-        }
-      }
-      xhr.open(method, path, true);
-    }
-    else
-    {
-      xhr = new XMLHttpRequest();
-      xhr.open(method, path, true);
-      //add content type = json if there is a json payload
-      if (jsonObj) {
-        xhr.setRequestHeader("Content-Type", "application/json");
-      }
-      if (Usergrid.ApiClient.getToken()) {
-        xhr.setRequestHeader("Authorization", "Bearer " + Usergrid.ApiClient.getToken());
-        xhr.withCredentials = true;
-      }
-    }
-    return xhr;
-  }
-
-  return {
-    init:init,
-    runAppQuery:runAppQuery,
-    runManagementQuery:runManagementQuery,
-    getOrganizationName:getOrganizationName,
-    setOrganizationName:setOrganizationName,
-    getApplicationName:getApplicationName,
-    setApplicationName:setApplicationName,
-    getToken:getToken,
-    setToken:setToken,
-    getCallTimeout:getCallTimeout,
-    setCallTimeout:setCallTimeout,
-    getCallTimeoutCallback:getCallTimeoutCallback,
-    setCallTimeoutCallback:setCallTimeoutCallback,
-    callTimeoutCallback:callTimeoutCallback,
-    getApiUrl:getApiUrl,
-    setApiUrl:setApiUrl,
-    getResetPasswordUrl:getResetPasswordUrl,
-    getLoggedInUser:getLoggedInUser,
-    setLoggedInUser:setLoggedInUser,
-    logInAppUser:logInAppUser,
-    renewAppUserToken:renewAppUserToken,
-    logoutAppUser:logoutAppUser,
-    isLoggedInAppUser:isLoggedInAppUser,
-    getLogoutCallback:getLogoutCallback,
-    setLogoutCallback:setLogoutCallback,
-    callLogoutCallback:callLogoutCallback
-  }
-})();
-
-/**
- * validation is a Singleton that provides methods for validating common field types
- *
- * @class Usergrid.validation
- * @author Rod Simpson (rod@apigee.com)
-**/
-Usergrid.validation = (function () {
-
-  var usernameRegex = new RegExp("^([0-9a-zA-Z\.\-])+$");
-  var nameRegex     = new RegExp("^([0-9a-zA-Z@#$%^&!?;:.,'\"~*-=+_\[\\](){}/\\ |])+$");
-  var emailRegex    = new RegExp("^(([0-9a-zA-Z]+[_\+.-]?)+@[0-9a-zA-Z]+[0-9,a-z,A-Z,.,-]*(.){1}[a-zA-Z]{2,4})+$");
-  var passwordRegex = new RegExp("^([0-9a-zA-Z@#$%^&!?<>;:.,'\"~*-=+_\[\\](){}/\\ |])+$");
-  var pathRegex     = new RegExp("^([0-9a-z./-])+$");
-  var titleRegex    = new RegExp("^([0-9a-zA-Z.!-?/])+$");
-
-  /**
-    * Tests the string against the allowed chars regex
-    *
-    * @public
-    * @method validateUsername
-    * @param {string} username - The string to test
-    * @param {function} failureCallback - (optional), the function to call on a failure
-    * @return {boolean} Returns true if string passes regex, false if not
-    */
-  function validateUsername(username, failureCallback) {
-    if (usernameRegex.test(username) && checkLength(username, 4, 80)) {
-      return true;
-    } else {
-      if (failureCallback && typeof(failureCallback) === "function") {
-        failureCallback(this.getUsernameAllowedChars());
-      }
-      return false;
-    }
-  }
-
-  /**
-    * Returns the regex of allowed chars
-    *
-    * @public
-    * @method getUsernameAllowedChars
-    * @return {string} Returns a string with the allowed chars
-    */
-  function getUsernameAllowedChars(){
-    return 'Length: min 4, max 80. Allowed: A-Z, a-z, 0-9, dot, and dash';
-  }
-
-  /**
-    * Tests the string against the allowed chars regex
-    *
-    * @public
-    * @method validateName
-    * @param {string} name - The string to test
-    * @param {function} failureCallback - (optional), the function to call on a failure
-    * @return {boolean} Returns true if string passes regex, false if not
-    */
-  function validateName(name, failureCallback) {
-    if (nameRegex.test(name) && checkLength(name, 4, 16)) {
-      return true;
-    } else {
-      if (failureCallback && typeof(failureCallback) === "function") {
-        failureCallback(this.getNameAllowedChars());
-      }
-      return false;
-    }
-  }
-
-  /**
-    * Returns the regex of allowed chars
-    *
-    * @public
-    * @method getNameAllowedChars
-    * @return {string} Returns a string with the allowed chars
-    */
-  function getNameAllowedChars(){
-    return 'Length: min 4, max 80. Allowed: A-Z, a-z, 0-9, ~ @ # % ^ & * ( ) - _ = + [ ] { } \\ | ; : \' " , . / ? !';
-  }
-
-  /**
-    * Tests the string against the allowed chars regex
-    *
-    * @public
-    * @method validatePassword
-    * @param {string} password - The string to test
-    * @param {function} failureCallback - (optional), the function to call on a failure
-    * @return {boolean} Returns true if string passes regex, false if not
-    */
-  function validatePassword(password, failureCallback) {
-    if (passwordRegex.test(password) && checkLength(password, 5, 16)) {
-      return true;
-    } else {
-      if (failureCallback && typeof(failureCallback) === "function") {
-        failureCallback(this.getPasswordAllowedChars());
-      }
-      return false;
-    }
-  }
-
-  /**
-    * Returns the regex of allowed chars
-    *
-    * @public
-    * @method getPasswordAllowedChars
-    * @return {string} Returns a string with the allowed chars
-    */
-  function getPasswordAllowedChars(){
-    return 'Length: min 5, max 16. Allowed: A-Z, a-z, 0-9, ~ @ # % ^ & * ( ) - _ = + [ ] { } \\ | ; : \' " , . < > / ? !';
-  }
-
-  /**
-    * Tests the string against the allowed chars regex
-    *
-    * @public
-    * @method validateEmail
-    * @param {string} email - The string to test
-    * @param {function} failureCallback - (optional), the function to call on a failure
-    * @return {boolean} Returns true if string passes regex, false if not
-    */
-  function validateEmail(email, failureCallback) {
-    if (emailRegex.test(email) && checkLength(email, 4, 80)) {
-      return true;
-    } else {
-      if (failureCallback && typeof(failureCallback) === "function") {
-        failureCallback(this.getEmailAllowedChars());
-      }
-      return false;
-    }
-  }
-
-  /**
-    * Returns the regex of allowed chars
-    *
-    * @public
-    * @method getEmailAllowedChars
-    * @return {string} Returns a string with the allowed chars
-    */
-  function getEmailAllowedChars(){
-    return 'Email must be in standard form: e.g. example@Usergrid.com';
-  }
-
-  /**
-    * Tests the string against the allowed chars regex
-    *
-    * @public
-    * @method validatePath
-    * @param {string} path - The string to test
-    * @param {function} failureCallback - (optional), the function to call on a failure
-    * @return {boolean} Returns true if string passes regex, false if not
-    */
-  function validatePath(path, failureCallback) {
-    if (pathRegex.test(path) && checkLength(path, 4, 80)) {
-      return true;
-    } else {
-      if (failureCallback && typeof(failureCallback) === "function") {
-        failureCallback(this.getPathAllowedChars());
-      }
-      return false;
-    }
-  }
-
-  /**
-    * Returns the regex of allowed chars
-    *
-    * @public
-    * @method getPathAllowedChars
-    * @return {string} Returns a string with the allowed chars
-    */
-  function getPathAllowedChars(){
-    return 'Length: min 4, max 80. Allowed: /, a-z, 0-9, dot, and dash';
-  }
-
-  /**
-    * Tests the string against the allowed chars regex
-    *
-    * @public
-    * @method validateTitle
-    * @param {string} title - The string to test
-    * @param {function} failureCallback - (optional), the function to call on a failure
-    * @return {boolean} Returns true if string passes regex, false if not
-    */
-  function validateTitle(title, failureCallback) {
-    if (titleRegex.test(title) && checkLength(title, 4, 80)) {
-      return true;
-    } else {
-      if (failureCallback && typeof(failureCallback) === "function") {
-        failureCallback(this.getTitleAllowedChars());
-      }
-      return false;
-    }
-  }
-
-  /**
-    * Returns the regex of allowed chars
-    *
-    * @public
-    * @method getTitleAllowedChars
-    * @return {string} Returns a string with the allowed chars
-    */
-  function getTitleAllowedChars(){
-    return 'Length: min 4, max 80. Allowed: space, A-Z, a-z, 0-9, dot, dash, /, !, and ?';
-  }
-
-  /**
-    * Tests if the string is the correct length
-    *
-    * @public
-    * @method checkLength
-    * @param {string} string - The string to test
-    * @param {integer} min - the lower bound
-    * @param {integer} max - the upper bound
-    * @return {boolean} Returns true if string is correct length, false if not
-    */
-  function checkLength(string, min, max) {
-    if (string.length > max || string.length < min) {
-      return false;
-    }
-    return true;
-  }
-
-  /**
-    * Tests if the string is a uuid
-    *
-    * @public
-    * @method isUUID
-    * @param {string} uuid The string to test
-    * @returns {Boolean} true if string is uuid
-    */
-  function isUUID (uuid) {
-    var uuidValueRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
-    if (!uuid) return false;
-    return uuidValueRegex.test(uuid);
-  }
-
-  return {
-    validateUsername:validateUsername,
-    getUsernameAllowedChars:getUsernameAllowedChars,
-    validateName:validateName,
-    getNameAllowedChars:getNameAllowedChars,
-    validatePassword:validatePassword,
-    getPasswordAllowedChars:getPasswordAllowedChars,
-    validateEmail:validateEmail,
-    getEmailAllowedChars:getEmailAllowedChars,
-    validatePath:validatePath,
-    getPathAllowedChars:getPathAllowedChars,
-    validateTitle:validateTitle,
-    getTitleAllowedChars:getTitleAllowedChars,
-    isUUID:isUUID
-  }
-})();


[32/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/highcharts.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/highcharts.js b/portal/js/libs/Highcharts-2.3.5/js/highcharts.js
new file mode 100644
index 0000000..7d9a0b1
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/highcharts.js
@@ -0,0 +1,250 @@
+/*
+ Highcharts JS v2.3.5 (2012-12-19)
+
+ (c) 2009-2012 Torstein Hønsi
+
+ License: www.highcharts.com/license
+*/
+(function(){function x(a,b){var c;a||(a={});for(c in b)a[c]=b[c];return a}function ia(){for(var a=0,b=arguments,c=b.length,d={};a<c;a++)d[b[a++]]=b[a];return d}function z(a,b){return parseInt(a,b||10)}function ja(a){return typeof a==="string"}function Y(a){return typeof a==="object"}function Ia(a){return Object.prototype.toString.call(a)==="[object Array]"}function Da(a){return typeof a==="number"}function ka(a){return K.log(a)/K.LN10}function aa(a){return K.pow(10,a)}function ta(a,b){for(var c=a.length;c--;)if(a[c]===
+b){a.splice(c,1);break}}function r(a){return a!==A&&a!==null}function w(a,b,c){var d,e;if(ja(b))r(c)?a.setAttribute(b,c):a&&a.getAttribute&&(e=a.getAttribute(b));else if(r(b)&&Y(b))for(d in b)a.setAttribute(d,b[d]);return e}function la(a){return Ia(a)?a:[a]}function n(){var a=arguments,b,c,d=a.length;for(b=0;b<d;b++)if(c=a[b],typeof c!=="undefined"&&c!==null)return c}function I(a,b){if(Ea&&b&&b.opacity!==A)b.filter="alpha(opacity="+b.opacity*100+")";x(a.style,b)}function T(a,b,c,d,e){a=C.createElement(a);
+b&&x(a,b);e&&I(a,{padding:0,border:Q,margin:0});c&&I(a,c);d&&d.appendChild(a);return a}function ba(a,b){var c=function(){};c.prototype=new a;x(c.prototype,b);return c}function Ja(a,b,c,d){var e=N.lang,f=a;b===-1?(b=(a||0).toString(),a=b.indexOf(".")>-1?b.split(".")[1].length:0):a=isNaN(b=M(b))?2:b;var b=a,c=c===void 0?e.decimalPoint:c,d=d===void 0?e.thousandsSep:d,e=f<0?"-":"",a=String(z(f=M(+f||0).toFixed(b))),g=a.length>3?a.length%3:0;return e+(g?a.substr(0,g)+d:"")+a.substr(g).replace(/(\d{3})(?=\d)/g,
+"$1"+d)+(b?c+M(f-a).toFixed(b).slice(2):"")}function ua(a,b){return Array((b||2)+1-String(a).length).join(0)+a}function hb(a,b,c,d){var e,c=n(c,1);e=a/c;b||(b=[1,2,2.5,5,10],d&&d.allowDecimals===!1&&(c===1?b=[1,2,5,10]:c<=0.1&&(b=[1/c])));for(d=0;d<b.length;d++)if(a=b[d],e<=(b[d]+(b[d+1]||b[d]))/2)break;a*=c;return a}function Ab(a,b){var c=b||[[Bb,[1,2,5,10,20,25,50,100,200,500]],[ib,[1,2,5,10,15,30]],[Va,[1,2,5,10,15,30]],[Ka,[1,2,3,4,6,8,12]],[ma,[1,2]],[Wa,[1,2]],[La,[1,2,3,4,6]],[va,null]],d=
+c[c.length-1],e=D[d[0]],f=d[1],g;for(g=0;g<c.length;g++)if(d=c[g],e=D[d[0]],f=d[1],c[g+1]&&a<=(e*f[f.length-1]+D[c[g+1][0]])/2)break;e===D[va]&&a<5*e&&(f=[1,2,5]);e===D[va]&&a<5*e&&(f=[1,2,5]);c=hb(a/e,f);return{unitRange:e,count:c,unitName:d[0]}}function Cb(a,b,c,d){var e=[],f={},g=N.global.useUTC,h,i=new Date(b),j=a.unitRange,k=a.count;if(r(b)){j>=D[ib]&&(i.setMilliseconds(0),i.setSeconds(j>=D[Va]?0:k*U(i.getSeconds()/k)));if(j>=D[Va])i[Db](j>=D[Ka]?0:k*U(i[jb]()/k));if(j>=D[Ka])i[Eb](j>=D[ma]?
+0:k*U(i[kb]()/k));if(j>=D[ma])i[lb](j>=D[La]?1:k*U(i[Ma]()/k));j>=D[La]&&(i[Fb](j>=D[va]?0:k*U(i[Xa]()/k)),h=i[Ya]());j>=D[va]&&(h-=h%k,i[Gb](h));if(j===D[Wa])i[lb](i[Ma]()-i[mb]()+n(d,1));b=1;h=i[Ya]();for(var d=i.getTime(),l=i[Xa](),m=i[Ma](),i=g?0:(864E5+i.getTimezoneOffset()*6E4)%864E5;d<c;)e.push(d),j===D[va]?d=Za(h+b*k,0):j===D[La]?d=Za(h,l+b*k):!g&&(j===D[ma]||j===D[Wa])?d=Za(h,l,m+b*k*(j===D[ma]?1:7)):(d+=j*k,j<=D[Ka]&&d%D[ma]===i&&(f[d]=ma)),b++;e.push(d)}e.info=x(a,{higherRanks:f,totalRange:j*
+k});return e}function Hb(){this.symbol=this.color=0}function Ib(a,b){var c=a.length,d,e;for(e=0;e<c;e++)a[e].ss_i=e;a.sort(function(a,c){d=b(a,c);return d===0?a.ss_i-c.ss_i:d});for(e=0;e<c;e++)delete a[e].ss_i}function Fa(a){for(var b=a.length,c=a[0];b--;)a[b]<c&&(c=a[b]);return c}function wa(a){for(var b=a.length,c=a[0];b--;)a[b]>c&&(c=a[b]);return c}function Ga(a,b){for(var c in a)a[c]&&a[c]!==b&&a[c].destroy&&a[c].destroy(),delete a[c]}function Na(a){$a||($a=T(ga));a&&$a.appendChild(a);$a.innerHTML=
+""}function Oa(a,b){var c="Highcharts error #"+a+": www.highcharts.com/errors/"+a;if(b)throw c;else L.console&&console.log(c)}function da(a){return parseFloat(a.toPrecision(14))}function xa(a,b){Pa=n(a,b.animation)}function Jb(){var a=N.global.useUTC,b=a?"getUTC":"get",c=a?"setUTC":"set";Za=a?Date.UTC:function(a,b,c,g,h,i){return(new Date(a,b,n(c,1),n(g,0),n(h,0),n(i,0))).getTime()};jb=b+"Minutes";kb=b+"Hours";mb=b+"Day";Ma=b+"Date";Xa=b+"Month";Ya=b+"FullYear";Db=c+"Minutes";Eb=c+"Hours";lb=c+"Date";
+Fb=c+"Month";Gb=c+"FullYear"}function ya(){}function Qa(a,b,c){this.axis=a;this.pos=b;this.type=c||"";this.isNew=!0;c||this.addLabel()}function nb(a,b){this.axis=a;if(b)this.options=b,this.id=b.id;return this}function Kb(a,b,c,d,e,f){var g=a.chart.inverted;this.axis=a;this.isNegative=c;this.options=b;this.x=d;this.stack=e;this.percent=f==="percent";this.alignOptions={align:b.align||(g?c?"left":"right":"center"),verticalAlign:b.verticalAlign||(g?"middle":c?"bottom":"top"),y:n(b.y,g?4:c?14:-6),x:n(b.x,
+g?c?-6:6:0)};this.textAlign=b.textAlign||(g?c?"right":"left":"center")}function ob(){this.init.apply(this,arguments)}function pb(a,b){var c=b.borderWidth,d=b.style,e=z(d.padding);this.chart=a;this.options=b;this.crosshairs=[];this.now={x:0,y:0};this.isHidden=!0;this.label=a.renderer.label("",0,0,b.shape,null,null,b.useHTML,null,"tooltip").attr({padding:e,fill:b.backgroundColor,"stroke-width":c,r:b.borderRadius,zIndex:8}).css(d).css({padding:0}).hide().add();V||this.label.shadow(b.shadow);this.shared=
+b.shared}function qb(a,b){var c=V?"":b.chart.zoomType;this.zoomX=/x/.test(c);this.zoomY=/y/.test(c);this.options=b;this.chart=a;this.init(a,b.tooltip)}function rb(a){this.init(a)}function sb(){this.init.apply(this,arguments)}var A,C=document,L=window,K=Math,u=K.round,U=K.floor,za=K.ceil,s=K.max,O=K.min,M=K.abs,W=K.cos,Z=K.sin,Aa=K.PI,ab=Aa*2/360,na=navigator.userAgent,Lb=L.opera,Ea=/msie/i.test(na)&&!Lb,Ra=C.documentMode===8,bb=/AppleWebKit/.test(na),cb=/Firefox/.test(na),Mb=/(Mobile|Android|Windows Phone)/.test(na),
+oa="http://www.w3.org/2000/svg",ca=!!C.createElementNS&&!!C.createElementNS(oa,"svg").createSVGRect,Sb=cb&&parseInt(na.split("Firefox/")[1],10)<4,V=!ca&&!Ea&&!!C.createElement("canvas").getContext,Sa,Ba=C.documentElement.ontouchstart!==A,Nb={},tb=0,$a,N,db,Pa,ub,D,pa=function(){},Ha=[],ga="div",Q="none",vb="rgba(192,192,192,"+(ca?1.0E-4:0.002)+")",Bb="millisecond",ib="second",Va="minute",Ka="hour",ma="day",Wa="week",La="month",va="year",wb="stroke-width",Za,jb,kb,mb,Ma,Xa,Ya,Db,Eb,lb,Fb,Gb,$={};L.Highcharts=
+{};db=function(a,b,c){if(!r(b)||isNaN(b))return"Invalid date";var a=n(a,"%Y-%m-%d %H:%M:%S"),d=new Date(b),e,f=d[kb](),g=d[mb](),h=d[Ma](),i=d[Xa](),j=d[Ya](),k=N.lang,l=k.weekdays,b={a:l[g].substr(0,3),A:l[g],d:ua(h),e:h,b:k.shortMonths[i],B:k.months[i],m:ua(i+1),y:j.toString().substr(2,2),Y:j,H:ua(f),I:ua(f%12||12),l:f%12||12,M:ua(d[jb]()),p:f<12?"AM":"PM",P:f<12?"am":"pm",S:ua(d.getSeconds()),L:ua(u(b%1E3),3)};for(e in b)for(;a.indexOf("%"+e)!==-1;)a=a.replace("%"+e,b[e]);return c?a.substr(0,1).toUpperCase()+
+a.substr(1):a};Hb.prototype={wrapColor:function(a){if(this.color>=a)this.color=0},wrapSymbol:function(a){if(this.symbol>=a)this.symbol=0}};D=ia(Bb,1,ib,1E3,Va,6E4,Ka,36E5,ma,864E5,Wa,6048E5,La,26784E5,va,31556952E3);ub={init:function(a,b,c){var b=b||"",d=a.shift,e=b.indexOf("C")>-1,f=e?7:3,g,b=b.split(" "),c=[].concat(c),h,i,j=function(a){for(g=a.length;g--;)a[g]==="M"&&a.splice(g+1,0,a[g+1],a[g+2],a[g+1],a[g+2])};e&&(j(b),j(c));a.isArea&&(h=b.splice(b.length-6,6),i=c.splice(c.length-6,6));if(d<=
+c.length/f)for(;d--;)c=[].concat(c).splice(0,f).concat(c);a.shift=0;if(b.length)for(a=c.length;b.length<a;)d=[].concat(b).splice(b.length-f,f),e&&(d[f-6]=d[f-2],d[f-5]=d[f-1]),b=b.concat(d);h&&(b=b.concat(h),c=c.concat(i));return[b,c]},step:function(a,b,c,d){var e=[],f=a.length;if(c===1)e=d;else if(f===b.length&&c<1)for(;f--;)d=parseFloat(a[f]),e[f]=isNaN(d)?a[f]:c*parseFloat(b[f]-d)+d;else e=b;return e}};(function(a){L.HighchartsAdapter=L.HighchartsAdapter||a&&{init:function(b){var c=a.fx,d=c.step,
+e,f=a.Tween,g=f&&f.propHooks;a.extend(a.easing,{easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c}});a.each(["cur","_default","width","height"],function(a,b){var e=d,k,l;b==="cur"?e=c.prototype:b==="_default"&&f&&(e=g[b],b="set");(k=e[b])&&(e[b]=function(c){c=a?c:this;l=c.elem;return l.attr?l.attr(c.prop,b==="cur"?A:c.now):k.apply(this,arguments)})});e=function(a){var c=a.elem,d;if(!a.started)d=b.init(c,c.d,c.toD),a.start=d[0],a.end=d[1],a.started=!0;c.attr("d",b.step(a.start,a.end,a.pos,c.toD))};
+f?g.d={set:e}:d.d=e;this.each=Array.prototype.forEach?function(a,b){return Array.prototype.forEach.call(a,b)}:function(a,b){for(var c=0,d=a.length;c<d;c++)if(b.call(a[c],a[c],c,a)===!1)return c}},getScript:a.getScript,inArray:a.inArray,adapterRun:function(b,c){return a(b)[c]()},grep:a.grep,map:function(a,c){for(var d=[],e=0,f=a.length;e<f;e++)d[e]=c.call(a[e],a[e],e,a);return d},merge:function(){var b=arguments;return a.extend(!0,null,b[0],b[1],b[2],b[3])},offset:function(b){return a(b).offset()},
+addEvent:function(b,c,d){a(b).bind(c,d)},removeEvent:function(b,c,d){var e=C.removeEventListener?"removeEventListener":"detachEvent";C[e]&&!b[e]&&(b[e]=function(){});a(b).unbind(c,d)},fireEvent:function(b,c,d,e){var f=a.Event(c),g="detached"+c,h;!Ea&&d&&(delete d.layerX,delete d.layerY);x(f,d);b[c]&&(b[g]=b[c],b[c]=null);a.each(["preventDefault","stopPropagation"],function(a,b){var c=f[b];f[b]=function(){try{c.call(f)}catch(a){b==="preventDefault"&&(h=!0)}}});a(b).trigger(f);b[g]&&(b[c]=b[g],b[g]=
+null);e&&!f.isDefaultPrevented()&&!h&&e(f)},washMouseEvent:function(a){var c=a.originalEvent||a;if(c.pageX===A)c.pageX=a.pageX,c.pageY=a.pageY;return c},animate:function(b,c,d){var e=a(b);if(c.d)b.toD=c.d,c.d=1;e.stop();e.animate(c,d)},stop:function(b){a(b).stop()}}})(L.jQuery);var ea=L.HighchartsAdapter,G=ea||{};ea&&ea.init.call(ea,ub);var eb=G.adapterRun,Tb=G.getScript,Ub=G.inArray,o=G.each,Ob=G.grep,Vb=G.offset,Ta=G.map,B=G.merge,J=G.addEvent,R=G.removeEvent,F=G.fireEvent,Pb=G.washMouseEvent,xb=
+G.animate,fb=G.stop,G={enabled:!0,align:"center",x:0,y:15,style:{color:"#666",fontSize:"11px",lineHeight:"14px"}};N={colors:"#4572A7,#AA4643,#89A54E,#80699B,#3D96AE,#DB843D,#92A8CD,#A47D7C,#B5CA92".split(","),symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),shortMonths:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),
+decimalPoint:".",numericSymbols:"k,M,G,T,P,E".split(","),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:","},global:{useUTC:!0,canvasToolsURL:"http://code.highcharts.com/2.3.5/modules/canvas-tools.js",VMLRadialGradientURL:"http://code.highcharts.com/2.3.5/gfx/vml-radial-gradient.png"},chart:{borderColor:"#4572A7",borderRadius:5,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacingTop:10,spacingRight:10,spacingBottom:15,spacingLeft:10,style:{fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif',
+fontSize:"12px"},backgroundColor:"#FFFFFF",plotBorderColor:"#C0C0C0",resetZoomButton:{theme:{zIndex:20},position:{align:"right",x:-10,y:10}}},title:{text:"Chart title",align:"center",y:15,style:{color:"#3E576F",fontSize:"16px"}},subtitle:{text:"",align:"center",y:30,style:{color:"#6D869F"}},plotOptions:{line:{allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},events:{},lineWidth:2,shadow:!0,marker:{enabled:!0,lineWidth:0,radius:4,lineColor:"#FFFFFF",states:{hover:{enabled:!0},select:{fillColor:"#FFFFFF",
+lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:B(G,{enabled:!1,formatter:function(){return this.y},verticalAlign:"bottom",y:0}),cropThreshold:300,pointRange:0,showInLegend:!0,states:{hover:{marker:{}},select:{marker:{}}},stickyTracking:!0}},labels:{style:{position:"absolute",color:"#3E576F"}},legend:{enabled:!0,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderWidth:1,borderColor:"#909090",borderRadius:5,navigation:{activeColor:"#3E576F",inactiveColor:"#CCC"},
+shadow:!1,itemStyle:{cursor:"pointer",color:"#3E576F",fontSize:"12px"},itemHoverStyle:{color:"#000"},itemHiddenStyle:{color:"#CCC"},itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},symbolWidth:16,symbolPadding:5,verticalAlign:"bottom",x:0,y:0},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"1em"},style:{position:"absolute",backgroundColor:"white",opacity:0.5,textAlign:"center"}},tooltip:{enabled:!0,backgroundColor:"rgba(255, 255, 255, .85)",borderWidth:2,borderRadius:5,
+dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},headerFormat:'<span style="font-size: 10px">{point.key}</span><br/>',pointFormat:'<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b><br/>',shadow:!0,shared:V,snap:Mb?25:10,style:{color:"#333333",fontSize:"12px",padding:"5px",whiteSpace:"nowrap"}},credits:{enabled:!0,
+text:"Highcharts.com",href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#909090",fontSize:"10px"}}};var X=N.plotOptions,ea=X.line;Jb();var qa=function(a){var b=[],c;(function(a){(c=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(a))?b=[z(c[1]),z(c[2]),z(c[3]),parseFloat(c[4],10)]:(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(a))&&(b=[z(c[1],16),z(c[2],16),z(c[3],
+16),1])})(a);return{get:function(c){return b&&!isNaN(b[0])?c==="rgb"?"rgb("+b[0]+","+b[1]+","+b[2]+")":c==="a"?b[3]:"rgba("+b.join(",")+")":a},brighten:function(a){if(Da(a)&&a!==0){var c;for(c=0;c<3;c++)b[c]+=z(a*255),b[c]<0&&(b[c]=0),b[c]>255&&(b[c]=255)}return this},setOpacity:function(a){b[3]=a;return this}}};ya.prototype={init:function(a,b){this.element=b==="span"?T(b):C.createElementNS(oa,b);this.renderer=a;this.attrSetters={}},animate:function(a,b,c){b=n(b,Pa,!0);fb(this);if(b){b=B(b);if(c)b.complete=
+c;xb(this,a,b)}else this.attr(a),c&&c()},attr:function(a,b){var c,d,e,f,g=this.element,h=g.nodeName.toLowerCase(),i=this.renderer,j,k=this.attrSetters,l=this.shadows,m,q,p=this;ja(a)&&r(b)&&(c=a,a={},a[c]=b);if(ja(a))c=a,h==="circle"?c={x:"cx",y:"cy"}[c]||c:c==="strokeWidth"&&(c="stroke-width"),p=w(g,c)||this[c]||0,c!=="d"&&c!=="visibility"&&(p=parseFloat(p));else for(c in a)if(j=!1,d=a[c],e=k[c]&&k[c].call(this,d,c),e!==!1){e!==A&&(d=e);if(c==="d")d&&d.join&&(d=d.join(" ")),/(NaN| {2}|^$)/.test(d)&&
+(d="M 0 0");else if(c==="x"&&h==="text"){for(e=0;e<g.childNodes.length;e++)f=g.childNodes[e],w(f,"x")===w(g,"x")&&w(f,"x",d);this.rotation&&w(g,"transform","rotate("+this.rotation+" "+d+" "+z(a.y||w(g,"y"))+")")}else if(c==="fill")d=i.color(d,g,c);else if(h==="circle"&&(c==="x"||c==="y"))c={x:"cx",y:"cy"}[c]||c;else if(h==="rect"&&c==="r")w(g,{rx:d,ry:d}),j=!0;else if(c==="translateX"||c==="translateY"||c==="rotation"||c==="verticalAlign")j=q=!0;else if(c==="stroke")d=i.color(d,g,c);else if(c==="dashstyle")if(c=
+"stroke-dasharray",d=d&&d.toLowerCase(),d==="solid")d=Q;else{if(d){d=d.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(e=d.length;e--;)d[e]=z(d[e])*a["stroke-width"];d=d.join(",")}}else if(c==="isTracker")this[c]=d;else if(c==="width")d=z(d);else if(c==="align")c="text-anchor",d={left:"start",center:"middle",right:"end"}[d];
+else if(c==="title")e=g.getElementsByTagName("title")[0],e||(e=C.createElementNS(oa,"title"),g.appendChild(e)),e.textContent=d;c==="strokeWidth"&&(c="stroke-width");if(c==="stroke-width"&&d===0&&(bb||i.forExport))d=1.0E-6;this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(c)&&(m||(this.symbolAttr(a),m=!0),j=!0);if(l&&/^(width|height|visibility|x|y|d|transform)$/.test(c))for(e=l.length;e--;)w(l[e],c,c==="height"?s(d-(l[e].cutHeight||0),0):d);if((c==="width"||c==="height")&&
+h==="rect"&&d<0)d=0;this[c]=d;q&&this.updateTransform();c==="text"?(d!==this.textStr&&delete this.bBox,this.textStr=d,this.added&&i.buildText(this)):j||w(g,c,d)}return p},symbolAttr:function(a){var b=this;o("x,y,r,start,end,width,height,innerR,anchorX,anchorY".split(","),function(c){b[c]=n(a[c],b[c])});b.attr({d:b.renderer.symbols[b.symbolName](b.x,b.y,b.width,b.height,b)})},clip:function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":Q)},crisp:function(a,b,c,d,e){var f,g=
+{},h={},i,a=a||this.strokeWidth||this.attr&&this.attr("stroke-width")||0;i=u(a)%2/2;h.x=U(b||this.x||0)+i;h.y=U(c||this.y||0)+i;h.width=U((d||this.width||0)-2*i);h.height=U((e||this.height||0)-2*i);h.strokeWidth=a;for(f in h)this[f]!==h[f]&&(this[f]=g[f]=h[f]);return g},css:function(a){var b=this.element,b=a&&a.width&&b.nodeName.toLowerCase()==="text",c,d="",e=function(a,b){return"-"+b.toLowerCase()};if(a&&a.color)a.fill=a.color;this.styles=a=x(this.styles,a);V&&b&&delete a.width;if(Ea&&!ca)b&&delete a.width,
+I(this.element,a);else{for(c in a)d+=c.replace(/([A-Z])/g,e)+":"+a[c]+";";this.attr({style:d})}b&&this.added&&this.renderer.buildText(this);return this},on:function(a,b){if(Ba&&a==="click")this.element.ontouchstart=function(a){a.preventDefault();b()};this.element["on"+a]=b;return this},setRadialReference:function(a){this.element.radialReference=a;return this},translate:function(a,b){return this.attr({translateX:a,translateY:b})},invert:function(){this.inverted=!0;this.updateTransform();return this},
+htmlCss:function(a){var b=this.element;if(b=a&&b.tagName==="SPAN"&&a.width)delete a.width,this.textWidth=b,this.updateTransform();this.styles=x(this.styles,a);I(this.element,a);return this},htmlGetBBox:function(){var a=this.element,b=this.bBox;if(!b){if(a.nodeName==="text")a.style.position="absolute";b=this.bBox={x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}}return b},htmlUpdateTransform:function(){if(this.added){var a=this.renderer,b=this.element,c=this.translateX||0,d=
+this.translateY||0,e=this.x||0,f=this.y||0,g=this.textAlign||"left",h={left:0,center:0.5,right:1}[g],i=g&&g!=="left",j=this.shadows;if(c||d)I(b,{marginLeft:c,marginTop:d}),j&&o(j,function(a){I(a,{marginLeft:c+1,marginTop:d+1})});this.inverted&&o(b.childNodes,function(c){a.invertChild(c,b)});if(b.tagName==="SPAN"){var k,l,j=this.rotation,m,q=0,p=1,q=0,y;m=z(this.textWidth);var t=this.xCorr||0,H=this.yCorr||0,ra=[j,g,b.innerHTML,this.textWidth].join(",");k={};if(ra!==this.cTT){if(r(j))a.isSVG?(t=Ea?
+"-ms-transform":bb?"-webkit-transform":cb?"MozTransform":Lb?"-o-transform":"",k[t]=k.transform="rotate("+j+"deg)"):(q=j*ab,p=W(q),q=Z(q),k.filter=j?["progid:DXImageTransform.Microsoft.Matrix(M11=",p,", M12=",-q,", M21=",q,", M22=",p,", sizingMethod='auto expand')"].join(""):Q),I(b,k);k=n(this.elemWidth,b.offsetWidth);l=n(this.elemHeight,b.offsetHeight);if(k>m&&/[ \-]/.test(b.textContent||b.innerText))I(b,{width:m+"px",display:"block",whiteSpace:"normal"}),k=m;m=a.fontMetrics(b.style.fontSize).b;t=
+p<0&&-k;H=q<0&&-l;y=p*q<0;t+=q*m*(y?1-h:h);H-=p*m*(j?y?h:1-h:1);i&&(t-=k*h*(p<0?-1:1),j&&(H-=l*h*(q<0?-1:1)),I(b,{textAlign:g}));this.xCorr=t;this.yCorr=H}I(b,{left:e+t+"px",top:f+H+"px"});if(bb)l=b.offsetHeight;this.cTT=ra}}else this.alignOnAdd=!0},updateTransform:function(){var a=this.translateX||0,b=this.translateY||0,c=this.inverted,d=this.rotation,e=[];c&&(a+=this.attr("width"),b+=this.attr("height"));(a||b)&&e.push("translate("+a+","+b+")");c?e.push("rotate(90) scale(-1,1)"):d&&e.push("rotate("+
+d+" "+(this.x||0)+" "+(this.y||0)+")");e.length&&w(this.element,"transform",e.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,b,c){a?(this.alignOptions=a,this.alignByTranslate=b,c||this.renderer.alignedObjects.push(this)):(a=this.alignOptions,b=this.alignByTranslate);var c=n(c,this.renderer),d=a.align,e=a.verticalAlign,f=(c.x||0)+(a.x||0),g=(c.y||0)+(a.y||0),h={};if(d==="right"||d==="center")f+=(c.width-(a.width||0))/{right:1,center:2}[d];
+h[b?"translateX":"x"]=u(f);if(e==="bottom"||e==="middle")g+=(c.height-(a.height||0))/({bottom:1,middle:2}[e]||1);h[b?"translateY":"y"]=u(g);this[this.placed?"animate":"attr"](h);this.placed=!0;this.alignAttr=h;return this},getBBox:function(){var a=this.bBox,b=this.renderer,c,d=this.rotation;c=this.element;var e=this.styles,f=d*ab;if(!a){if(c.namespaceURI===oa||b.forExport){try{a=c.getBBox?x({},c.getBBox()):{width:c.offsetWidth,height:c.offsetHeight}}catch(g){}if(!a||a.width<0)a={width:0,height:0}}else a=
+this.htmlGetBBox();if(b.isSVG){b=a.width;c=a.height;if(Ea&&e&&e.fontSize==="11px"&&c===22.700000762939453)a.height=c=14;if(d)a.width=M(c*Z(f))+M(b*W(f)),a.height=M(c*W(f))+M(b*Z(f))}this.bBox=a}return a},show:function(){return this.attr({visibility:"visible"})},hide:function(){return this.attr({visibility:"hidden"})},add:function(a){var b=this.renderer,c=a||b,d=c.element||b.box,e=d.childNodes,f=this.element,g=w(f,"zIndex"),h;if(a)this.parentGroup=a;this.parentInverted=a&&a.inverted;this.textStr!==
+void 0&&b.buildText(this);if(g)c.handleZ=!0,g=z(g);if(c.handleZ)for(c=0;c<e.length;c++)if(a=e[c],b=w(a,"zIndex"),a!==f&&(z(b)>g||!r(g)&&r(b))){d.insertBefore(f,a);h=!0;break}h||d.appendChild(f);this.added=!0;F(this,"add");return this},safeRemoveChild:function(a){var b=a.parentNode;b&&b.removeChild(a)},destroy:function(){var a=this,b=a.element||{},c=a.shadows,d,e;b.onclick=b.onmouseout=b.onmouseover=b.onmousemove=null;fb(a);if(a.clipPath)a.clipPath=a.clipPath.destroy();if(a.stops){for(e=0;e<a.stops.length;e++)a.stops[e]=
+a.stops[e].destroy();a.stops=null}a.safeRemoveChild(b);c&&o(c,function(b){a.safeRemoveChild(b)});ta(a.renderer.alignedObjects,a);for(d in a)delete a[d];return null},empty:function(){for(var a=this.element,b=a.childNodes,c=b.length;c--;)a.removeChild(b[c])},shadow:function(a,b,c){var d=[],e,f,g=this.element,h,i,j,k;if(a){i=n(a.width,3);j=(a.opacity||0.15)/i;k=this.parentInverted?"(-1,-1)":"("+n(a.offsetX,1)+", "+n(a.offsetY,1)+")";for(e=1;e<=i;e++){f=g.cloneNode(0);h=i*2+1-2*e;w(f,{isShadow:"true",
+stroke:a.color||"black","stroke-opacity":j*e,"stroke-width":h,transform:"translate"+k,fill:Q});if(c)w(f,"height",s(w(f,"height")-h,0)),f.cutHeight=h;b?b.element.appendChild(f):g.parentNode.insertBefore(f,g);d.push(f)}this.shadows=d}return this}};var sa=function(){this.init.apply(this,arguments)};sa.prototype={Element:ya,init:function(a,b,c,d){var e=location,f;f=this.createElement("svg").attr({xmlns:oa,version:"1.1"});a.appendChild(f.element);this.isSVG=!0;this.box=f.element;this.boxWrapper=f;this.alignedObjects=
+[];this.url=(cb||bb)&&C.getElementsByTagName("base").length?e.href.replace(/#.*?$/,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.defs=this.createElement("defs").add();this.forExport=d;this.gradients={};this.setSize(b,c,!1);var g;if(cb&&a.getBoundingClientRect)this.subPixelFix=b=function(){I(a,{left:0,top:0});g=a.getBoundingClientRect();I(a,{left:za(g.left)-g.left+"px",top:za(g.top)-g.top+"px"})},b(),J(L,"resize",b)},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var a=
+this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();Ga(this.gradients||{});this.gradients=null;if(a)this.defs=a.destroy();this.subPixelFix&&R(L,"resize",this.subPixelFix);return this.alignedObjects=null},createElement:function(a){var b=new this.Element;b.init(this,a);return b},draw:function(){},buildText:function(a){for(var b=a.element,c=n(a.textStr,"").toString().replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">').replace(/<a/g,
+"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(/<br.*?>/g),d=b.childNodes,e=/style="([^"]+)"/,f=/href="([^"]+)"/,g=w(b,"x"),h=a.styles,i=h&&h.width&&z(h.width),j=h&&h.lineHeight,k,h=d.length,l=[];h--;)b.removeChild(d[h]);i&&!a.added&&this.box.appendChild(b);c[c.length-1]===""&&c.pop();o(c,function(c,d){var h,y=0,t,c=c.replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||");h=c.split("|||");o(h,function(c){if(c!==""||h.length===1){var m={},n=C.createElementNS(oa,"tspan"),o;e.test(c)&&
+(o=c.match(e)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),w(n,"style",o));f.test(c)&&(w(n,"onclick",'location.href="'+c.match(f)[1]+'"'),I(n,{cursor:"pointer"}));c=(c.replace(/<(.|\n)*?>/g,"")||" ").replace(/&lt;/g,"<").replace(/&gt;/g,">");n.appendChild(C.createTextNode(c));y?m.dx=3:m.x=g;if(!y){if(d){!ca&&a.renderer.forExport&&I(n,{display:"block"});t=L.getComputedStyle&&z(L.getComputedStyle(k,null).getPropertyValue("line-height"));if(!t||isNaN(t)){var r;if(!(r=j))if(!(r=k.offsetHeight))l[d]=b.getBBox?
+b.getBBox().height:a.renderer.fontMetrics(b.style.fontSize).h,r=u(l[d]-(l[d-1]||0))||18;t=r}w(n,"dy",t)}k=n}w(n,m);b.appendChild(n);y++;if(i)for(var c=c.replace(/([^\^])-/g,"$1- ").split(" "),E=[];c.length||E.length;)delete a.bBox,r=a.getBBox().width,m=r>i,!m||c.length===1?(c=E,E=[],c.length&&(n=C.createElementNS(oa,"tspan"),w(n,{dy:j||16,x:g}),o&&w(n,"style",o),b.appendChild(n),r>i&&(i=r))):(n.removeChild(n.firstChild),E.unshift(c.pop())),c.length&&n.appendChild(C.createTextNode(c.join(" ").replace(/- /g,
+"-")))}})})},button:function(a,b,c,d,e,f,g){var h=this.label(a,b,c),i=0,j,k,l,m,q,a={x1:0,y1:0,x2:0,y2:1},e=B(ia(wb,1,"stroke","#999","fill",ia("linearGradient",a,"stops",[[0,"#FFF"],[1,"#DDD"]]),"r",3,"padding",3,"style",ia("color","black")),e);l=e.style;delete e.style;f=B(e,ia("stroke","#68A","fill",ia("linearGradient",a,"stops",[[0,"#FFF"],[1,"#ACF"]])),f);m=f.style;delete f.style;g=B(e,ia("stroke","#68A","fill",ia("linearGradient",a,"stops",[[0,"#9BD"],[1,"#CDF"]])),g);q=g.style;delete g.style;
+J(h.element,"mouseenter",function(){h.attr(f).css(m)});J(h.element,"mouseleave",function(){j=[e,f,g][i];k=[l,m,q][i];h.attr(j).css(k)});h.setState=function(a){(i=a)?a===2&&h.attr(g).css(q):h.attr(e).css(l)};return h.on("click",function(){d.call(h)}).attr(e).css(x({cursor:"default"},l))},crispLine:function(a,b){a[1]===a[4]&&(a[1]=a[4]=u(a[1])-b%2/2);a[2]===a[5]&&(a[2]=a[5]=u(a[2])+b%2/2);return a},path:function(a){var b={fill:Q};Ia(a)?b.d=a:Y(a)&&x(b,a);return this.createElement("path").attr(b)},circle:function(a,
+b,c){a=Y(a)?a:{x:a,y:b,r:c};return this.createElement("circle").attr(a)},arc:function(a,b,c,d,e,f){if(Y(a))b=a.y,c=a.r,d=a.innerR,e=a.start,f=a.end,a=a.x;return this.symbol("arc",a||0,b||0,c||0,c||0,{innerR:d||0,start:e||0,end:f||0})},rect:function(a,b,c,d,e,f){e=Y(a)?a.r:e;e=this.createElement("rect").attr({rx:e,ry:e,fill:Q});return e.attr(Y(a)?a:e.crisp(f,a,b,s(c,0),s(d,0)))},setSize:function(a,b,c){var d=this.alignedObjects,e=d.length;this.width=a;this.height=b;for(this.boxWrapper[n(c,!0)?"animate":
+"attr"]({width:a,height:b});e--;)d[e].align()},g:function(a){var b=this.createElement("g");return r(a)?b.attr({"class":"highcharts-"+a}):b},image:function(a,b,c,d,e){var f={preserveAspectRatio:Q};arguments.length>1&&x(f,{x:b,y:c,width:d,height:e});f=this.createElement("image").attr(f);f.element.setAttributeNS?f.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a):f.element.setAttribute("hc-svg-href",a);return f},symbol:function(a,b,c,d,e,f){var g,h=this.symbols[a],h=h&&h(u(b),u(c),d,e,
+f),i=/^url\((.*?)\)$/,j,k;h?(g=this.path(h),x(g,{symbolName:a,x:b,y:c,width:d,height:e}),f&&x(g,f)):i.test(a)&&(k=function(a,b){a.element&&(a.attr({width:b[0],height:b[1]}),a.alignByTranslate||a.translate(u((d-b[0])/2),u((e-b[1])/2)))},j=a.match(i)[1],a=Nb[j],g=this.image(j).attr({x:b,y:c}),a?k(g,a):(g.attr({width:0,height:0}),T("img",{onload:function(){k(g,Nb[j]=[this.width,this.height])},src:j})));return g},symbols:{circle:function(a,b,c,d){var e=0.166*c;return["M",a+c/2,b,"C",a+c+e,b,a+c+e,b+d,
+a+c/2,b+d,"C",a-e,b+d,a-e,b,a+c/2,b,"Z"]},square:function(a,b,c,d){return["M",a,b,"L",a+c,b,a+c,b+d,a,b+d,"Z"]},triangle:function(a,b,c,d){return["M",a+c/2,b,"L",a+c,b+d,a,b+d,"Z"]},"triangle-down":function(a,b,c,d){return["M",a,b,"L",a+c,b,a+c/2,b+d,"Z"]},diamond:function(a,b,c,d){return["M",a+c/2,b,"L",a+c,b+d/2,a+c/2,b+d,a,b+d/2,"Z"]},arc:function(a,b,c,d,e){var f=e.start,c=e.r||c||d,g=e.end-1.0E-6,d=e.innerR,h=e.open,i=W(f),j=Z(f),k=W(g),g=Z(g),e=e.end-f<Aa?0:1;return["M",a+c*i,b+c*j,"A",c,c,
+0,e,1,a+c*k,b+c*g,h?"M":"L",a+d*k,b+d*g,"A",d,d,0,e,0,a+d*i,b+d*j,h?"":"Z"]}},clipRect:function(a,b,c,d){var e="highcharts-"+tb++,f=this.createElement("clipPath").attr({id:e}).add(this.defs),a=this.rect(a,b,c,d,0).add(f);a.id=e;a.clipPath=f;return a},color:function(a,b,c){var d=this,e,f=/^rgba/,g,h,i,j,k,l,m,q=[];a&&a.linearGradient?g="linearGradient":a&&a.radialGradient&&(g="radialGradient");if(g){c=a[g];h=d.gradients;j=a.stops;b=b.radialReference;Ia(c)&&(a[g]=c={x1:c[0],y1:c[1],x2:c[2],y2:c[3],
+gradientUnits:"userSpaceOnUse"});g==="radialGradient"&&b&&!r(c.gradientUnits)&&x(c,{cx:b[0]-b[2]/2+c.cx*b[2],cy:b[1]-b[2]/2+c.cy*b[2],r:c.r*b[2],gradientUnits:"userSpaceOnUse"});for(m in c)m!=="id"&&q.push(m,c[m]);for(m in j)q.push(j[m]);q=q.join(",");h[q]?a=h[q].id:(c.id=a="highcharts-"+tb++,h[q]=i=d.createElement(g).attr(c).add(d.defs),i.stops=[],o(j,function(a){f.test(a[1])?(e=qa(a[1]),k=e.get("rgb"),l=e.get("a")):(k=a[1],l=1);a=d.createElement("stop").attr({offset:a[0],"stop-color":k,"stop-opacity":l}).add(i);
+i.stops.push(a)}));return"url("+d.url+"#"+a+")"}else return f.test(a)?(e=qa(a),w(b,c+"-opacity",e.get("a")),e.get("rgb")):(b.removeAttribute(c+"-opacity"),a)},text:function(a,b,c,d){var e=N.chart.style,f=V||!ca&&this.forExport;if(d&&!this.forExport)return this.html(a,b,c);b=u(n(b,0));c=u(n(c,0));a=this.createElement("text").attr({x:b,y:c,text:a}).css({fontFamily:e.fontFamily,fontSize:e.fontSize});f&&a.css({position:"absolute"});a.x=b;a.y=c;return a},html:function(a,b,c){var d=N.chart.style,e=this.createElement("span"),
+f=e.attrSetters,g=e.element,h=e.renderer;f.text=function(a){a!==g.innerHTML&&delete this.bBox;g.innerHTML=a;return!1};f.x=f.y=f.align=function(a,b){b==="align"&&(b="textAlign");e[b]=a;e.htmlUpdateTransform();return!1};e.attr({text:a,x:u(b),y:u(c)}).css({position:"absolute",whiteSpace:"nowrap",fontFamily:d.fontFamily,fontSize:d.fontSize});e.css=e.htmlCss;if(h.isSVG)e.add=function(a){var b,c=h.box.parentNode,d=[];if(a){if(b=a.div,!b){for(;a;)d.push(a),a=a.parentGroup;o(d.reverse(),function(a){var d;
+b=a.div=a.div||T(ga,{className:w(a.element,"class")},{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||0)+"px"},b||c);d=b.style;x(a.attrSetters,{translateX:function(a){d.left=a+"px"},translateY:function(a){d.top=a+"px"},visibility:function(a,b){d[b]=a}})})}}else b=c;b.appendChild(g);e.added=!0;e.alignOnAdd&&e.htmlUpdateTransform();return e};return e},fontMetrics:function(a){var a=z(a||11),a=a<24?a+4:u(a*1.2),b=u(a*0.8);return{h:a,b:b}},label:function(a,b,c,d,e,f,g,h,i){function j(){var a;
+a=y.element.style;H=(s===void 0||yb===void 0||p.styles.textAlign)&&y.getBBox();p.width=(s||H.width||0)+2*v;p.height=(yb||H.height||0)+2*v;zb=v+q.fontMetrics(a&&a.fontSize).b;if(z){if(!n)a=h?-zb:0,p.box=n=d?q.symbol(d,-ra*v,a,p.width,p.height):q.rect(-ra*v,a,p.width,p.height,0,w[wb]),n.add(p);n.attr(B({width:p.width,height:p.height},w));w=null}}function k(){var a=p.styles,a=a&&a.textAlign,b=v*(1-ra),c;c=h?0:zb;if(r(s)&&(a==="center"||a==="right"))b+={center:0.5,right:1}[a]*(s-H.width);(b!==y.x||c!==
+y.y)&&y.attr({x:b,y:c});y.x=b;y.y=c}function l(a,b){n?n.attr(a,b):w[a]=b}function m(){y.add(p);p.attr({text:a,x:b,y:c});n&&r(e)&&p.attr({anchorX:e,anchorY:f})}var q=this,p=q.g(i),y=q.text("",0,0,g).attr({zIndex:1}),n,H,ra=0,v=3,s,yb,E,S,Qb=0,w={},zb,g=p.attrSetters,z;J(p,"add",m);g.width=function(a){s=a;return!1};g.height=function(a){yb=a;return!1};g.padding=function(a){r(a)&&a!==v&&(v=a,k());return!1};g.align=function(a){ra={left:0,center:0.5,right:1}[a];return!1};g.text=function(a,b){y.attr(b,a);
+j();k();return!1};g[wb]=function(a,b){z=!0;Qb=a%2/2;l(b,a);return!1};g.stroke=g.fill=g.r=function(a,b){b==="fill"&&(z=!0);l(b,a);return!1};g.anchorX=function(a,b){e=a;l(b,a+Qb-E);return!1};g.anchorY=function(a,b){f=a;l(b,a-S);return!1};g.x=function(a){p.x=a;a-=ra*((s||H.width)+v);E=u(a);p.attr("translateX",E);return!1};g.y=function(a){S=p.y=u(a);p.attr("translateY",a);return!1};var C=p.css;return x(p,{css:function(a){if(a){var b={},a=B({},a);o("fontSize,fontWeight,fontFamily,color,lineHeight,width".split(","),
+function(c){a[c]!==A&&(b[c]=a[c],delete a[c])});y.css(b)}return C.call(p,a)},getBBox:function(){return{width:H.width+2*v,height:H.height+2*v,x:H.x-v,y:H.y-v}},shadow:function(a){n&&n.shadow(a);return p},destroy:function(){R(p,"add",m);R(p.element,"mouseenter");R(p.element,"mouseleave");y&&(y=y.destroy());n&&(n=n.destroy());ya.prototype.destroy.call(p);p=q=j=k=l=m=null}})}};Sa=sa;var ha;if(!ca&&!V){ha={init:function(a,b){var c=["<",b,' filled="f" stroked="f"'],d=["position: ","absolute",";"];(b===
+"shape"||b===ga)&&d.push("left:0;top:0;width:1px;height:1px;");Ra&&d.push("visibility: ",b===ga?"hidden":"visible");c.push(' style="',d.join(""),'"/>');if(b)c=b===ga||b==="span"||b==="img"?c.join(""):a.prepVML(c),this.element=T(c);this.renderer=a;this.attrSetters={}},add:function(a){var b=this.renderer,c=this.element,d=b.box,d=a?a.element||a:d;a&&a.inverted&&b.invertChild(c,d);d.appendChild(c);this.added=!0;this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform();F(this,"add");return this},
+updateTransform:ya.prototype.htmlUpdateTransform,attr:function(a,b){var c,d,e,f=this.element||{},g=f.style,h=f.nodeName,i=this.renderer,j=this.symbolName,k,l=this.shadows,m,q=this.attrSetters,p=this;ja(a)&&r(b)&&(c=a,a={},a[c]=b);if(ja(a))c=a,p=c==="strokeWidth"||c==="stroke-width"?this.strokeweight:this[c];else for(c in a)if(d=a[c],m=!1,e=q[c]&&q[c].call(this,d,c),e!==!1&&d!==null){e!==A&&(d=e);if(j&&/^(x|y|r|start|end|width|height|innerR|anchorX|anchorY)/.test(c))k||(this.symbolAttr(a),k=!0),m=
+!0;else if(c==="d"){d=d||[];this.d=d.join(" ");e=d.length;for(m=[];e--;)m[e]=Da(d[e])?u(d[e]*10)-5:d[e]==="Z"?"x":d[e];d=m.join(" ")||"x";f.path=d;if(l)for(e=l.length;e--;)l[e].path=l[e].cutOff?this.cutOffPath(d,l[e].cutOff):d;m=!0}else if(c==="visibility"){if(l)for(e=l.length;e--;)l[e].style[c]=d;h==="DIV"&&(d=d==="hidden"?"-999em":0,c="top");g[c]=d;m=!0}else if(c==="zIndex")d&&(g[c]=d),m=!0;else if(c==="width"||c==="height")d=s(0,d),this[c]=d,this.updateClipping?(this[c]=d,this.updateClipping()):
+g[c]=d,m=!0;else if(c==="x"||c==="y")this[c]=d,g[{x:"left",y:"top"}[c]]=d;else if(c==="class")f.className=d;else if(c==="stroke")d=i.color(d,f,c),c="strokecolor";else if(c==="stroke-width"||c==="strokeWidth")f.stroked=d?!0:!1,c="strokeweight",this[c]=d,Da(d)&&(d+="px");else if(c==="dashstyle")(f.getElementsByTagName("stroke")[0]||T(i.prepVML(["<stroke/>"]),null,null,f))[c]=d||"solid",this.dashstyle=d,m=!0;else if(c==="fill")if(h==="SPAN")g.color=d;else{if(h!=="IMG")f.filled=d!==Q?!0:!1,d=i.color(d,
+f,c,this),c="fillcolor"}else if(h==="shape"&&c==="rotation")this[c]=d,f.style.left=-u(Z(d*ab)+1)+"px",f.style.top=u(W(d*ab))+"px";else if(c==="translateX"||c==="translateY"||c==="rotation")this[c]=d,this.updateTransform(),m=!0;else if(c==="text")this.bBox=null,f.innerHTML=d,m=!0;m||(Ra?f[c]=d:w(f,c,d))}return p},clip:function(a){var b=this,c,d=b.element,e=d.parentNode;a?(c=a.members,ta(c,b),c.push(b),b.destroyClip=function(){ta(c,b)},e&&e.className==="highcharts-tracker"&&!Ra&&I(d,{visibility:"hidden"}),
+a=a.getCSS(b)):(b.destroyClip&&b.destroyClip(),a={clip:Ra?"inherit":"rect(auto)"});return b.css(a)},css:ya.prototype.htmlCss,safeRemoveChild:function(a){a.parentNode&&Na(a)},destroy:function(){this.destroyClip&&this.destroyClip();return ya.prototype.destroy.apply(this)},empty:function(){for(var a=this.element.childNodes,b=a.length,c;b--;)c=a[b],c.parentNode.removeChild(c)},on:function(a,b){this.element["on"+a]=function(){var a=L.event;a.target=a.srcElement;b(a)};return this},cutOffPath:function(a,
+b){var c,a=a.split(/[ ,]/);c=a.length;if(c===9||c===11)a[c-4]=a[c-2]=z(a[c-2])-10*b;return a.join(" ")},shadow:function(a,b,c){var d=[],e,f=this.element,g=this.renderer,h,i=f.style,j,k=f.path,l,m,q,p;k&&typeof k.value!=="string"&&(k="x");m=k;if(a){q=n(a.width,3);p=(a.opacity||0.15)/q;for(e=1;e<=3;e++){l=q*2+1-2*e;c&&(m=this.cutOffPath(k.value,l+0.5));j=['<shape isShadow="true" strokeweight="',l,'" filled="false" path="',m,'" coordsize="10 10" style="',f.style.cssText,'" />'];h=T(g.prepVML(j),null,
+{left:z(i.left)+n(a.offsetX,1),top:z(i.top)+n(a.offsetY,1)});if(c)h.cutOff=l+1;j=['<stroke color="',a.color||"black",'" opacity="',p*e,'"/>'];T(g.prepVML(j),null,null,h);b?b.element.appendChild(h):f.parentNode.insertBefore(h,f);d.push(h)}this.shadows=d}return this}};ha=ba(ya,ha);var fa={Element:ha,isIE8:na.indexOf("MSIE 8.0")>-1,init:function(a,b,c){var d,e;this.alignedObjects=[];d=this.createElement(ga);e=d.element;e.style.position="relative";a.appendChild(d.element);this.box=e;this.boxWrapper=d;
+this.setSize(b,c,!1);if(!C.namespaces.hcv)C.namespaces.add("hcv","urn:schemas-microsoft-com:vml"),C.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "},isHidden:function(){return!this.box.offsetWidth},clipRect:function(a,b,c,d){var e=this.createElement(),f=Y(a);return x(e,{members:[],left:f?a.x:a,top:f?a.y:b,width:f?a.width:c,height:f?a.height:d,getCSS:function(a){var b=a.inverted,c=this.top,d=this.left,e=d+this.width,
+f=c+this.height,c={clip:"rect("+u(b?d:c)+"px,"+u(b?f:e)+"px,"+u(b?e:f)+"px,"+u(b?c:d)+"px)"};!b&&Ra&&a.element.nodeName!=="IMG"&&x(c,{width:e+"px",height:f+"px"});return c},updateClipping:function(){o(e.members,function(a){a.css(e.getCSS(a))})}})},color:function(a,b,c,d){var e=this,f,g=/^rgba/,h,i,j=Q;a&&a.linearGradient?i="gradient":a&&a.radialGradient&&(i="pattern");if(i){var k,l,m=a.linearGradient||a.radialGradient,q,p,n,t,H,r="",a=a.stops,v,s=[],u=function(){h=['<fill colors="'+s.join(",")+'" opacity="',
+n,'" o:opacity2="',p,'" type="',i,'" ',r,'focus="100%" method="any" />'];T(e.prepVML(h),null,null,b)};q=a[0];v=a[a.length-1];q[0]>0&&a.unshift([0,q[1]]);v[0]<1&&a.push([1,v[1]]);o(a,function(a,b){g.test(a[1])?(f=qa(a[1]),k=f.get("rgb"),l=f.get("a")):(k=a[1],l=1);s.push(a[0]*100+"% "+k);b?(n=l,t=k):(p=l,H=k)});if(c==="fill")if(i==="gradient")c=m.x1||m[0]||0,a=m.y1||m[1]||0,q=m.x2||m[2]||0,m=m.y2||m[3]||0,r='angle="'+(90-K.atan((m-a)/(q-c))*180/Aa)+'"',u();else{var j=m.r,E=j*2,S=j*2,x=m.cx,A=m.cy,w=
+b.radialReference,z,j=function(){w&&(z=d.getBBox(),x+=(w[0]-z.x)/z.width-0.5,A+=(w[1]-z.y)/z.height-0.5,E*=w[2]/z.width,S*=w[2]/z.height);r='src="'+N.global.VMLRadialGradientURL+'" size="'+E+","+S+'" origin="0.5,0.5" position="'+x+","+A+'" color2="'+H+'" ';u()};d.added?j():J(d,"add",j);j=t}else j=k}else if(g.test(a)&&b.tagName!=="IMG")f=qa(a),h=["<",c,' opacity="',f.get("a"),'"/>'],T(this.prepVML(h),null,null,b),j=f.get("rgb");else{j=b.getElementsByTagName(c);if(j.length)j[0].opacity=1;j=a}return j},
+prepVML:function(a){var b=this.isIE8,a=a.join("");b?(a=a.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),a=a.indexOf('style="')===-1?a.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):a.replace('style="','style="display:inline-block;behavior:url(#default#VML);')):a=a.replace("<","<hcv:");return a},text:sa.prototype.html,path:function(a){var b={coordsize:"10 10"};Ia(a)?b.d=a:Y(a)&&x(b,a);return this.createElement("shape").attr(b)},circle:function(a,b,c){return this.symbol("circle").attr({x:a-
+c,y:b-c,width:2*c,height:2*c})},g:function(a){var b;a&&(b={className:"highcharts-"+a,"class":"highcharts-"+a});return this.createElement(ga).attr(b)},image:function(a,b,c,d,e){var f=this.createElement("img").attr({src:a});arguments.length>1&&f.attr({x:b,y:c,width:d,height:e});return f},rect:function(a,b,c,d,e,f){if(Y(a))b=a.y,c=a.width,d=a.height,f=a.strokeWidth,a=a.x;var g=this.symbol("rect");g.r=e;return g.attr(g.crisp(f,a,b,s(c,0),s(d,0)))},invertChild:function(a,b){var c=b.style;I(a,{flip:"x",
+left:z(c.width)-1,top:z(c.height)-1,rotation:-90})},symbols:{arc:function(a,b,c,d,e){var f=e.start,g=e.end,h=e.r||c||d,c=W(f),d=Z(f),i=W(g),j=Z(g),k=e.innerR,l=0.08/h,m=k&&0.1/k||0;if(g-f===0)return["x"];else 2*Aa-g+f<l?i=-l:g-f<m&&(i=W(f+m));f=["wa",a-h,b-h,a+h,b+h,a+h*c,b+h*d,a+h*i,b+h*j];e.open&&!k&&f.push("e","M",a,b);f.push("at",a-k,b-k,a+k,b+k,a+k*i,b+k*j,a+k*c,b+k*d,"x","e");return f},circle:function(a,b,c,d){return["wa",a,b,a+c,b+d,a+c,b+d/2,a+c,b+d/2,"e"]},rect:function(a,b,c,d,e){var f=
+a+c,g=b+d,h;!r(e)||!e.r?f=sa.prototype.symbols.square.apply(0,arguments):(h=O(e.r,c,d),f=["M",a+h,b,"L",f-h,b,"wa",f-2*h,b,f,b+2*h,f-h,b,f,b+h,"L",f,g-h,"wa",f-2*h,g-2*h,f,g,f,g-h,f-h,g,"L",a+h,g,"wa",a,g-2*h,a+2*h,g,a+h,g,a,g-h,"L",a,b+h,"wa",a,b,a+2*h,b+2*h,a,b+h,a+h,b,"x","e"]);return f}}};ha=function(){this.init.apply(this,arguments)};ha.prototype=B(sa.prototype,fa);Sa=ha}var gb,Rb;if(V)gb=function(){oa="http://www.w3.org/1999/xhtml"},gb.prototype.symbols={},Rb=function(){function a(){var a=b.length,
+d;for(d=0;d<a;d++)b[d]();b=[]}var b=[];return{push:function(c,d){b.length===0&&Tb(d,a);b.push(c)}}}();Sa=ha||gb||sa;Qa.prototype={addLabel:function(){var a=this.axis,b=a.options,c=a.chart,d=a.horiz,e=a.categories,f=this.pos,g=b.labels,h=a.tickPositions,d=e&&d&&e.length&&!g.step&&!g.staggerLines&&!g.rotation&&c.plotWidth/h.length||!d&&c.plotWidth/2,i=f===h[0],j=f===h[h.length-1],k=e&&r(e[f])?e[f]:f,e=this.label,h=h.info,l;a.isDatetimeAxis&&h&&(l=b.dateTimeLabelFormats[h.higherRanks[f]||h.unitName]);
+this.isFirst=i;this.isLast=j;b=a.labelFormatter.call({axis:a,chart:c,isFirst:i,isLast:j,dateTimeLabelFormat:l,value:a.isLog?da(aa(k)):k});f=d&&{width:s(1,u(d-2*(g.padding||10)))+"px"};f=x(f,g.style);if(r(e))e&&e.attr({text:b}).css(f);else{d={align:g.align};if(Da(g.rotation))d.rotation=g.rotation;this.label=r(b)&&g.enabled?c.renderer.text(b,0,0,g.useHTML).attr(d).css(f).add(a.labelGroup):null}},getLabelSize:function(){var a=this.label,b=this.axis;return a?(this.labelBBox=a.getBBox())[b.horiz?"height":
+"width"]:0},getLabelSides:function(){var a=this.axis.options.labels,b=this.labelBBox.width,a=b*{left:0,center:0.5,right:1}[a.align]-a.x;return[-a,b-a]},handleOverflow:function(a,b){var c=!0,d=this.axis,e=d.chart,f=this.isFirst,g=this.isLast,h=b.x,i=d.reversed,j=d.tickPositions;if(f||g){var k=this.getLabelSides(),l=k[0],k=k[1],e=e.plotLeft,m=e+d.len,j=(d=d.ticks[j[a+(f?1:-1)]])&&d.label.xy&&d.label.xy.x+d.getLabelSides()[f?0:1];f&&!i||g&&i?h+l<e&&(h=e-l,d&&h+k>j&&(c=!1)):h+k>m&&(h=m-k,d&&h+l<j&&(c=
+!1));b.x=h}return c},getPosition:function(a,b,c,d){var e=this.axis,f=e.chart,g=d&&f.oldChartHeight||f.chartHeight;return{x:a?e.translate(b+c,null,null,d)+e.transB:e.left+e.offset+(e.opposite?(d&&f.oldChartWidth||f.chartWidth)-e.right-e.left:0),y:a?g-e.bottom+e.offset-(e.opposite?e.height:0):g-e.translate(b+c,null,null,d)-e.transB}},getLabelPosition:function(a,b,c,d,e,f,g,h){var i=this.axis,j=i.transA,k=i.reversed,i=i.staggerLines,a=a+e.x-(f&&d?f*j*(k?-1:1):0),b=b+e.y-(f&&!d?f*j*(k?1:-1):0);r(e.y)||
+(b+=z(c.styles.lineHeight)*0.9-c.getBBox().height/2);i&&(b+=g/(h||1)%i*16);return{x:a,y:b}},getMarkPath:function(a,b,c,d,e,f){return f.crispLine(["M",a,b,"L",a+(e?0:-c),b+(e?c:0)],d)},render:function(a,b){var c=this.axis,d=c.options,e=c.chart.renderer,f=c.horiz,g=this.type,h=this.label,i=this.pos,j=d.labels,k=this.gridLine,l=g?g+"Grid":"grid",m=g?g+"Tick":"tick",q=d[l+"LineWidth"],p=d[l+"LineColor"],y=d[l+"LineDashStyle"],t=d[m+"Length"],l=d[m+"Width"]||0,o=d[m+"Color"],r=d[m+"Position"],m=this.mark,
+v=j.step,s=!0,u=c.tickmarkOffset,E=this.getPosition(f,i,u,b),S=E.x,E=E.y,x=c.staggerLines;if(q){i=c.getPlotLinePath(i+u,q,b);if(k===A){k={stroke:p,"stroke-width":q};if(y)k.dashstyle=y;if(!g)k.zIndex=1;this.gridLine=k=q?e.path(i).attr(k).add(c.gridGroup):null}if(!b&&k&&i)k[this.isNew?"attr":"animate"]({d:i})}if(l&&t)r==="inside"&&(t=-t),c.opposite&&(t=-t),g=this.getMarkPath(S,E,t,l,f,e),m?m.animate({d:g}):this.mark=e.path(g).attr({stroke:o,"stroke-width":l}).add(c.axisGroup);if(h&&!isNaN(S))h.xy=E=
+this.getLabelPosition(S,E,h,f,j,u,a,v),this.isFirst&&!n(d.showFirstLabel,1)||this.isLast&&!n(d.showLastLabel,1)?s=!1:!x&&f&&j.overflow==="justify"&&!this.handleOverflow(a,E)&&(s=!1),v&&a%v&&(s=!1),s?(h[this.isNew?"attr":"animate"](E),this.isNew=!1):h.attr("y",-9999)},destroy:function(){Ga(this,this.axis)}};nb.prototype={render:function(){var a=this,b=a.axis,c=b.horiz,d=(b.pointRange||0)/2,e=a.options,f=e.label,g=a.label,h=e.width,i=e.to,j=e.from,k=r(j)&&r(i),l=e.value,m=e.dashStyle,q=a.svgElem,p=
+[],y,t=e.color,o=e.zIndex,u=e.events,v=b.chart.renderer;b.isLog&&(j=ka(j),i=ka(i),l=ka(l));if(h){if(p=b.getPlotLinePath(l,h),d={stroke:t,"stroke-width":h},m)d.dashstyle=m}else if(k){if(j=s(j,b.min-d),i=O(i,b.max+d),p=b.getPlotBandPath(j,i,e),d={fill:t},e.borderWidth)d.stroke=e.borderColor,d["stroke-width"]=e.borderWidth}else return;if(r(o))d.zIndex=o;if(q)p?q.animate({d:p},null,q.onGetPath):(q.hide(),q.onGetPath=function(){q.show()});else if(p&&p.length&&(a.svgElem=q=v.path(p).attr(d).add(),u))for(y in e=
+function(b){q.on(b,function(c){u[b].apply(a,[c])})},u)e(y);if(f&&r(f.text)&&p&&p.length&&b.width>0&&b.height>0){f=B({align:c&&k&&"center",x:c?!k&&4:10,verticalAlign:!c&&k&&"middle",y:c?k?16:10:k?6:-4,rotation:c&&!k&&90},f);if(!g)a.label=g=v.text(f.text,0,0).attr({align:f.textAlign||f.align,rotation:f.rotation,zIndex:o}).css(f.style).add();b=[p[1],p[4],n(p[6],p[1])];p=[p[2],p[5],n(p[7],p[2])];c=Fa(b);k=Fa(p);g.align(f,!1,{x:c,y:k,width:wa(b)-c,height:wa(p)-k});g.show()}else g&&g.hide();return a},destroy:function(){ta(this.axis.plotLinesAndBands,
+this);Ga(this,this.axis)}};Kb.prototype={destroy:function(){Ga(this,this.axis)},setTotal:function(a){this.cum=this.total=a},render:function(a){var b=this.options.formatter.call(this);this.label?this.label.attr({text:b,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(b,0,0).css(this.options.style).attr({align:this.textAlign,rotation:this.options.rotation,visibility:"hidden"}).add(a)},setOffset:function(a,b){var c=this.axis,d=c.chart,e=d.inverted,f=this.isNegative,g=c.translate(this.percent?
+100:this.total,0,0,0,1),c=c.translate(0),c=M(g-c),h=d.xAxis[0].translate(this.x)+a,i=d.plotHeight,f={x:e?f?g:g-c:h,y:e?i-h-b:f?i-g-c:i-g,width:e?c:b,height:e?b:c};if(e=this.label)e.align(this.alignOptions,null,f),f=e.alignAttr,e.attr({visibility:this.options.crop===!1||d.isInsidePlot(f.x,f.y)?ca?"inherit":"visible":"hidden"})}};ob.prototype={defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},
+endOnTick:!1,gridLineColor:"#C0C0C0",labels:G,lineColor:"#C0D0E0",lineWidth:1,minPadding:0.01,maxPadding:0.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickColor:"#C0D0E0",tickLength:5,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",style:{color:"#6D869F",fontWeight:"bold"}},type:"linear"},defaultYAxisOptions:{endOnTick:!0,gridLineWidth:1,
+tickPixelInterval:72,showLastLabel:!0,labels:{align:"right",x:-8,y:3},lineWidth:0,maxPadding:0.05,minPadding:0.05,startOnTick:!0,tickWidth:0,title:{rotation:270,text:"Y-values"},stackLabels:{enabled:!1,formatter:function(){return this.total},style:G.style}},defaultLeftAxisOptions:{labels:{align:"right",x:-8,y:null},title:{rotation:270}},defaultRightAxisOptions:{labels:{align:"left",x:8,y:null},title:{rotation:90}},defaultBottomAxisOptions:{labels:{align:"center",x:0,y:14},title:{rotation:0}},defaultTopAxisOptions:{labels:{align:"center",
+x:0,y:-5},title:{rotation:0}},init:function(a,b){var c=b.isX;this.horiz=a.inverted?!c:c;this.xOrY=(this.isXAxis=c)?"x":"y";this.opposite=b.opposite;this.side=this.horiz?this.opposite?0:2:this.opposite?1:3;this.setOptions(b);var d=this.options,e=d.type,f=e==="datetime";this.labelFormatter=d.labels.formatter||this.defaultLabelFormatter;this.staggerLines=this.horiz&&d.labels.staggerLines;this.userOptions=b;this.minPixelPadding=0;this.chart=a;this.reversed=d.reversed;this.categories=d.categories;this.isLog=
+e==="logarithmic";this.isLinked=r(d.linkedTo);this.isDatetimeAxis=f;this.tickmarkOffset=d.categories&&d.tickmarkPlacement==="between"?0.5:0;this.ticks={};this.minorTicks={};this.plotLinesAndBands=[];this.alternateBands={};this.len=0;this.minRange=this.userMinRange=d.minRange||d.maxZoom;this.range=d.range;this.offset=d.offset||0;this.stacks={};this.min=this.max=null;var g,d=this.options.events;a.axes.push(this);a[c?"xAxis":"yAxis"].push(this);this.series=[];if(a.inverted&&c&&this.reversed===A)this.reversed=
+!0;this.removePlotLine=this.removePlotBand=this.removePlotBandOrLine;this.addPlotLine=this.addPlotBand=this.addPlotBandOrLine;for(g in d)J(this,g,d[g]);if(this.isLog)this.val2lin=ka,this.lin2val=aa},setOptions:function(a){this.options=B(this.defaultOptions,this.isXAxis?{}:this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],B(N[this.isXAxis?"xAxis":"yAxis"],a))},defaultLabelFormatter:function(){var a=
+this.axis,b=this.value,c=this.dateTimeLabelFormat,d=N.lang.numericSymbols,e=d&&d.length,f,g=a.isLog?b:a.tickInterval;if(a.categories)f=b;else if(c)f=db(c,b);else if(e&&g>=1E3)for(;e--&&f===A;)a=Math.pow(1E3,e+1),g>=a&&d[e]!==null&&(f=Ja(b/a,-1)+d[e]);f===A&&(f=b>=1E3?Ja(b,0):Ja(b,-1));return f},getSeriesExtremes:function(){var a=this,b=a.chart,c=a.stacks,d=[],e=[],f;a.hasVisibleSeries=!1;a.dataMin=a.dataMax=null;o(a.series,function(g){if(g.visible||!b.options.chart.ignoreHiddenSeries){var h=g.options,
+i,j,k,l,m,q,p,y,t,o=h.threshold,u,v=[],x=0;a.hasVisibleSeries=!0;if(a.isLog&&o<=0)o=h.threshold=null;if(a.isXAxis){if(h=g.xData,h.length)a.dataMin=O(n(a.dataMin,h[0]),Fa(h)),a.dataMax=s(n(a.dataMax,h[0]),wa(h))}else{var z,E,S,w=g.cropped,B=g.xAxis.getExtremes(),C=!!g.modifyValue;i=h.stacking;a.usePercentage=i==="percent";if(i)m=h.stack,l=g.type+n(m,""),q="-"+l,g.stackKey=l,j=d[l]||[],d[l]=j,k=e[q]||[],e[q]=k;if(a.usePercentage)a.dataMin=0,a.dataMax=99;h=g.processedXData;p=g.processedYData;u=p.length;
+for(f=0;f<u;f++)if(y=h[f],t=p[f],i&&(E=(z=t<o)?k:j,S=z?q:l,r(E[y])?(E[y]=da(E[y]+t),t=[t,E[y]]):E[y]=t,c[S]||(c[S]={}),c[S][y]||(c[S][y]=new Kb(a,a.options.stackLabels,z,y,m,i)),c[S][y].setTotal(E[y])),t!==null&&t!==A&&(C&&(t=g.modifyValue(t)),w||(h[f+1]||y)>=B.min&&(h[f-1]||y)<=B.max))if(y=t.length)for(;y--;)t[y]!==null&&(v[x++]=t[y]);else v[x++]=t;if(!a.usePercentage&&v.length)a.dataMin=O(n(a.dataMin,v[0]),Fa(v)),a.dataMax=s(n(a.dataMax,v[0]),wa(v));if(r(o))if(a.dataMin>=o)a.dataMin=o,a.ignoreMinPadding=
+!0;else if(a.dataMax<o)a.dataMax=o,a.ignoreMaxPadding=!0}}})},translate:function(a,b,c,d,e,f){var g=this.len,h=1,i=0,j=d?this.oldTransA:this.transA,d=d?this.oldMin:this.min,e=this.options.ordinal||this.isLog&&e;if(!j)j=this.transA;c&&(h*=-1,i=g);this.reversed&&(h*=-1,i-=h*g);b?(this.reversed&&(a=g-a),a=a/j+d,e&&(a=this.lin2val(a))):(e&&(a=this.val2lin(a)),a=h*(a-d)*j+i+h*this.minPixelPadding+(f?j*this.pointRange/2:0));return a},getPlotLinePath:function(a,b,c){var d=this.chart,e=this.left,f=this.top,
+g,h,i,a=this.translate(a,null,null,c),j=c&&d.oldChartHeight||d.chartHeight,k=c&&d.oldChartWidth||d.chartWidth,l;g=this.transB;c=h=u(a+g);g=i=u(j-a-g);if(isNaN(a))l=!0;else if(this.horiz){if(g=f,i=j-this.bottom,c<e||c>e+this.width)l=!0}else if(c=e,h=k-this.right,g<f||g>f+this.height)l=!0;return l?null:d.renderer.crispLine(["M",c,g,"L",h,i],b||0)},getPlotBandPath:function(a,b){var c=this.getPlotLinePath(b),d=this.getPlotLinePath(a);d&&c?d.push(c[4],c[5],c[1],c[2]):d=null;return d},getLinearTickPositions:function(a,
+b,c){for(var d,b=da(U(b/a)*a),c=da(za(c/a)*a),e=[];b<=c;){e.push(b);b=da(b+a);if(b===d)break;d=b}return e},getLogTickPositions:function(a,b,c,d){var e=this.options,f=this.len,g=[];if(!d)this._minorAutoInterval=null;if(a>=0.5)a=u(a),g=this.getLinearTickPositions(a,b,c);else if(a>=0.08)for(var f=U(b),h,i,j,k,l,e=a>0.3?[1,2,4]:a>0.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];f<c+1&&!l;f++){i=e.length;for(h=0;h<i&&!l;h++)j=ka(aa(f)*e[h]),j>b&&g.push(k),k>c&&(l=!0),k=j}else if(b=aa(b),c=aa(c),a=e[d?"minorTickInterval":
+"tickInterval"],a=n(a==="auto"?null:a,this._minorAutoInterval,(c-b)*(e.tickPixelInterval/(d?5:1))/((d?f/this.tickPositions.length:f)||1)),a=hb(a,null,K.pow(10,U(K.log(a)/K.LN10))),g=Ta(this.getLinearTickPositions(a,b,c),ka),!d)this._minorAutoInterval=a/5;if(!d)this.tickInterval=a;return g},getMinorTickPositions:function(){var a=this.options,b=this.tickPositions,c=this.minorTickInterval,d=[],e;if(this.isLog){e=b.length;for(a=1;a<e;a++)d=d.concat(this.getLogTickPositions(c,b[a-1],b[a],!0))}else if(this.isDatetimeAxis&&
+a.minorTickInterval==="auto")d=d.concat(Cb(Ab(c),this.min,this.max,a.startOfWeek));else for(b=this.min+(b[0]-this.min)%c;b<=this.max;b+=c)d.push(b);return d},adjustForMinRange:function(){var a=this.options,b=this.min,c=this.max,d,e=this.dataMax-this.dataMin>=this.minRange,f,g,h,i,j;if(this.isXAxis&&this.minRange===A&&!this.isLog)r(a.min)||r(a.max)?this.minRange=null:(o(this.series,function(a){i=a.xData;for(g=j=a.xIncrement?1:i.length-1;g>0;g--)if(h=i[g]-i[g-1],f===A||h<f)f=h}),this.minRange=O(f*5,
+this.dataMax-this.dataMin));if(c-b<this.minRange){var k=this.minRange;d=(k-c+b)/2;d=[b-d,n(a.min,b-d)];if(e)d[2]=this.dataMin;b=wa(d);c=[b+k,n(a.max,b+k)];if(e)c[2]=this.dataMax;c=Fa(c);c-b<k&&(d[0]=c-k,d[1]=n(a.min,c-k),b=wa(d))}this.min=b;this.max=c},setAxisTranslation:function(){var a=this.max-this.min,b=0,c,d=0,e=0,f=this.linkedParent,g=this.transA;if(this.isXAxis)f?(d=f.minPointOffset,e=f.pointRangePadding):o(this.series,function(a){var f=a.pointRange,g=a.options.pointPlacement,k=a.closestPointRange;
+b=s(b,f);d=s(d,g?0:f/2);e=s(e,g==="on"?0:f);!a.noSharedTooltip&&r(k)&&(c=r(c)?O(c,k):k)}),this.minPointOffset=d,this.pointRangePadding=e,this.pointRange=b,this.closestPointRange=c;this.oldTransA=g;this.translationSlope=this.transA=g=this.len/(a+e||1);this.transB=this.horiz?this.left:this.bottom;this.minPixelPadding=g*d},setTickPositions:function(a){var b=this,c=b.chart,d=b.options,e=b.isLog,f=b.isDatetimeAxis,g=b.isXAxis,h=b.isLinked,i=b.options.tickPositioner,j=d.maxPadding,k=d.minPadding,l=d.tickInterval,
+m=d.minTickInterval,q=d.tickPixelInterval,p=b.categories;h?(b.linkedParent=c[g?"xAxis":"yAxis"][d.linkedTo],c=b.linkedParent.getExtremes(),b.min=n(c.min,c.dataMin),b.max=n(c.max,c.dataMax),d.type!==b.linkedParent.options.type&&Oa(11,1)):(b.min=n(b.userMin,d.min,b.dataMin),b.max=n(b.userMax,d.max,b.dataMax));if(e)!a&&O(b.min,n(b.dataMin,b.min))<=0&&Oa(10,1),b.min=da(ka(b.min)),b.max=da(ka(b.max));if(b.range&&(b.userMin=b.min=s(b.min,b.max-b.range),b.userMax=b.max,a))b.range=null;b.adjustForMinRange();
+if(!p&&!b.usePercentage&&!h&&r(b.min)&&r(b.max)&&(c=b.max-b.min)){if(!r(d.min)&&!r(b.userMin)&&k&&(b.dataMin<0||!b.ignoreMinPadding))b.min-=c*k;if(!r(d.max)&&!r(b.userMax)&&j&&(b.dataMax>0||!b.ignoreMaxPadding))b.max+=c*j}b.tickInterval=b.min===b.max||b.min===void 0||b.max===void 0?1:h&&!l&&q===b.linkedParent.options.tickPixelInterval?b.linkedParent.tickInterval:n(l,p?1:(b.max-b.min)*q/(b.len||1));g&&!a&&o(b.series,function(a){a.processData(b.min!==b.oldMin||b.max!==b.oldMax)});b.setAxisTranslation(a);
+b.beforeSetTickPositions&&b.beforeSetTickPositions();if(b.postProcessTickInterval)b.tickInterval=b.postProcessTickInterval(b.tickInterval);if(!l&&b.tickInterval<m)b.tickInterval=m;if(!f&&!e&&(a=K.pow(10,U(K.log(b.tickInterval)/K.LN10)),!l))b.tickInterval=hb(b.tickInterval,null,a,d);b.minorTickInterval=d.minorTickInterval==="auto"&&b.tickInterval?b.tickInterval/5:d.minorTickInterval;b.tickPositions=i=d.tickPositions||i&&i.apply(b,[b.min,b.max]);if(!i)i=f?(b.getNonLinearTimeTicks||Cb)(Ab(b.tickInterval,
+d.units),b.min,b.max,d.startOfWeek,b.ordinalPositions,b.closestPointRange,!0):e?b.getLogTickPositions(b.tickInterval,b.min,b.max):b.getLinearTickPositions(b.tickInterval,b.min,b.max),b.tickPositions=i;if(!h)e=i[0],f=i[i.length-1],h=b.minPointOffset||0,d.startOnTick?b.min=e:b.min-h>e&&i.shift(),d.endOnTick?b.max=f:b.max+h<f&&i.pop(),i.length===1&&(b.min-=1.0E-9,b.max+=1.0E-9)},setMaxTicks:function(){var a=this.chart,b=a.maxTicks,c=this.tickPositions,d=this.xOrY;b||(b={x:0,y:0});if(!this.isLinked&&
+!this.isDatetimeAxis&&c.length>b[d]&&this.options.alignTicks!==!1)b[d]=c.length;a.maxTicks=b},adjustTickAmount:function(){var a=this.xOrY,b=this.tickPositions,c=this.chart.maxTicks;if(c&&c[a]&&!this.isDatetimeAxis&&!this.categories&&!this.isLinked&&this.options.alignTicks!==!1){var d=this.tickAmount,e=b.length;this.tickAmount=a=c[a];if(e<a){for(;b.length<a;)b.push(da(b[b.length-1]+this.tickInterval));this.transA*=(e-1)/(a-1);this.max=b[b.length-1]}if(r(d)&&a!==d)this.isDirty=!0}},setScale:function(){var a=
+this.stacks,b,c,d,e;this.oldMin=this.min;this.oldMax=this.max;this.oldAxisLength=this.len;this.setAxisSize();e=this.len!==this.oldAxisLength;o(this.series,function(a){if(a.isDirtyData||a.isDirty||a.xAxis.isDirty)d=!0});if(e||d||this.isLinked||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax)if(this.getSeriesExtremes(),this.setTickPositions(),this.oldUserMin=this.userMin,this.oldUserMax=this.userMax,!this.isDirty)this.isDirty=e||this.min!==this.oldMin||this.max!==this.oldMax;if(!this.isXAxis)for(b in a)for(c in a[b])a[b][c].cum=
+a[b][c].total;this.setMaxTicks()},setExtremes:function(a,b,c,d,e){var f=this,g=f.chart,c=n(c,!0),e=x(e,{min:a,max:b});F(f,"setExtremes",e,function(){f.userMin=a;f.userMax=b;f.isDirtyExtremes=!0;c&&g.redraw(d)})},zoom:function(a,b){this.setExtremes(a,b,!1,A,{trigger:"zoom"});return!0},setAxisSize:function(){var a=this.chart,b=this.options,c=b.offsetLeft||0,d=b.offsetRight||0;this.left=n(b.left,a.plotLeft+c);this.top=n(b.top,a.plotTop);this.width=n(b.width,a.plotWidth-c+d);this.height=n(b.height,a.plotHeight);
+this.bottom=a.chartHeight-this.height-this.top;this.right=a.chartWidth-this.width-this.left;this.len=s(this.horiz?this.width:this.height,0)},getExtremes:function(){var a=this.isLog;return{min:a?da(aa(this.min)):this.min,max:a?da(aa(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var b=this.isLog,c=b?aa(this.min):this.min,b=b?aa(this.max):this.max;c>a||a===null?a=c:b<a&&(a=b);return this.translate(a,0,1,0,1)},addPlotBandOrLine:function(a){a=
+(new nb(this,a)).render();this.plotLinesAndBands.push(a);return a},getOffset:function(){var a=this,b=a.chart,c=b.renderer,d=a.options,e=a.tickPositions,f=a.ticks,g=a.horiz,h=a.side,i,j=0,k,l=0,m=d.title,q=d.labels,p=0,y=b.axisOffset,t=[-1,1,1,-1][h],H;a.hasData=b=a.hasVisibleSeries||r(a.min)&&r(a.max)&&!!e;a.showAxis=i=b||n(d.showEmpty,!0);if(!a.axisGroup)a.gridGroup=c.g("grid").attr({zIndex:d.gridZIndex||1}).add(),a.axisGroup=c.g("axis").attr({zIndex:d.zIndex||2}).add(),a.labelGroup=c.g("axis-labels").attr({zIndex:q.zIndex||
+7}).add();if(b||a.isLinked)o(e,function(b){f[b]?f[b].addLabel():f[b]=new Qa(a,b)}),o(e,function(a){if(h===0||h===2||{1:"left",3:"right"}[h]===q.align)p=s(f[a].getLabelSize(),p)}),a.staggerLines&&(p+=(a.staggerLines-1)*16);else for(H in f)f[H].destroy(),delete f[H];if(m&&m.text){if(!a.axisTitle)a.axisTitle=c.text(m.text,0,0,m.useHTML).attr({zIndex:7,rotation:m.rotation||0,align:m.textAlign||{low:"left",middle:"center",high:"right"}[m.align]}).css(m.style).add(a.axisGroup),a.axisTitle.isNew=!0;if(i)j=
+a.axisTitle.getBBox()[g?"height":"width"],l=n(m.margin,g?5:10),k=m.offset;a.axisTitle[i?"show":"hide"]()}a.offset=t*n(d.offset,y[h]);a.axisTitleMargin=n(k,p+l+(h!==2&&p&&t*d.labels[g?"y":"x"]));y[h]=s(y[h],a.axisTitleMargin+j+t*a.offset)},getLinePath:function(a){var b=this.chart,c=this.opposite,d=this.offset,e=this.horiz,f=this.left+(c?this.width:0)+d;this.lineTop=c=b.chartHeight-this.bottom-(c?this.height:0)+d;return b.renderer.crispLine(["M",e?this.left:f,e?c:this.top,"L",e?b.chartWidth-this.right:
+f,e?c:b.chartHeight-this.bottom],a)},getTitlePosition:function(){var a=this.horiz,b=this.left,c=this.top,d=this.len,e=this.options.title,f=a?b:c,g=this.opposite,h=this.offset,i=z(e.style.fontSize||12),d={low:f+(a?0:d),middle:f+d/2,high:f+(a?d:0)}[e.align],b=(a?c+this.height:b)+(a?1:-1)*(g?-1:1)*this.axisTitleMargin+(this.side===2?i:0);return{x:a?d:b+(g?this.width:0)+h+(e.x||0),y:a?b-(g?this.height:0)+h:d+(e.y||0)}},render:function(){var a=this,b=a.chart,c=b.renderer,d=a.options,e=a.isLog,f=a.isLinked,
+g=a.tickPositions,h=a.axisTitle,i=a.stacks,j=a.ticks,k=a.minorTicks,l=a.alternateBands,m=d.stackLabels,q=d.alternateGridColor,p=a.tickmarkOffset,n=d.lineWidth,t,H=b.hasRendered&&r(a.oldMin)&&!isNaN(a.oldMin),u=a.showAxis,v,s;if(a.hasData||f)if(a.minorTickInterval&&!a.categories&&o(a.getMinorTickPositions(),function(b){k[b]||(k[b]=new Qa(a,b,"minor"));H&&k[b].isNew&&k[b].render(null,!0);k[b].isActive=!0;k[b].render()}),g.length&&o(g.slice(1).concat([g[0]]),function(b,c){c=c===g.length-1?0:c+1;if(!f||
+b>=a.min&&b<=a.max)j[b]||(j[b]=new Qa(a,b)),H&&j[b].isNew&&j[b].render(c,!0),j[b].isActive=!0,j[b].render(c)}),q&&o(g,function(b,c){if(c%2===0&&b<a.max)l[b]||(l[b]=new nb(a)),v=b+p,s=g[c+1]!==A?g[c+1]+p:a.max,l[b].options={from:e?aa(v):v,to:e?aa(s):s,color:q},l[b].render(),l[b].isActive=!0}),!a._addedPlotLB)o((d.plotLines||[]).concat(d.plotBands||[]),function(b){a.addPlotBandOrLine(b)}),a._addedPlotLB=!0;o([j,k,l],function(a){for(var b in a)a[b].isActive?a[b].isActive=!1:(a[b].destroy(),delete a[b])});
+if(n)t=a.getLinePath(n),a.axisLine?a.axisLine.animate({d:t}):a.axisLine=c.path(t).attr({stroke:d.lineColor,"stroke-width":n,zIndex:7}).add(a.axisGroup),a.axisLine[u?"show":"hide"]();if(h&&u)h[h.isNew?"attr":"animate"](a.getTitlePosition()),h.isNew=!1;if(m&&m.enabled){var x,E,d=a.stackTotalGroup;if(!d)a.stackTotalGroup=d=c.g("stack-labels").attr({visibility:"visible",zIndex:6}).add();d.translate(b.plotLeft,b.plotTop);for(x in i)for(E in b=i[x],b)b[E].render(d)}a.isDirty=!1},removePlotBandOrLine:function(a){for(var b=
+this.plotLinesAndBands,c=b.length;c--;)b[c].id===a&&b[c].destroy()},setTitle:function(a,b){var c=this.chart,d=this.options,e=this.axisTitle;d.title=B(d.title,a);this.axisTitle=e&&e.destroy();this.isDirty=!0;n(b,!0)&&c.redraw()},redraw:function(){var a=this.chart;a.tracker.resetTracker&&a.tracker.resetTracker(!0);this.render();o(this.plotLinesAndBands,function(a){a.render()});o(this.series,function(a){a.isDirty=!0})},setCategories:function(a,b){var c=this.chart;this.categories=this.userOptions.categories=
+a;o(this.series,function(a){a.translate();a.setTooltipPoints(!0)});this.isDirty=!0;n(b,!0)&&c.redraw()},destroy:function(){var a=this,b=a.stacks,c;R(a);for(c in b)Ga(b[c]),b[c]=null;o([a.ticks,a.minorTicks,a.alternateBands,a.plotLinesAndBands],function(a){Ga(a)});o("stackTotalGroup,axisLine,axisGroup,gridGroup,labelGroup,axisTitle".split(","),function(b){a[b]&&(a[b]=a[b].destroy())})}};pb.prototype={destroy:function(){o(this.crosshairs,function(a){a&&a.destroy()});if(this.label)this.label=this.label.destroy()},
+move:function(a,b,c,d){var e=this,f=e.now,g=e.options.animation!==!1&&!e.isHidden;x(f,{x:g?(2*f.x+a)/3:a,y:g?(f.y+b)/2:b,anchorX:g?(2*f.anchorX+c)/3:c,anchorY:g?(f.anchorY+d)/2:d});e.label.attr(f);if(g&&(M(a-f.x)>1||M(b-f.y)>1))clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){e&&e.move(a,b,c,d)},32)},hide:function(){if(!this.isHidden){var a=this.chart.hoverPoints;this.label.hide();a&&o(a,function(a){a.setState()});this.chart.hoverPoints=null;this.isHidden=!0}},hideCrosshairs:function(){o(this.crosshairs,
+function(a){a&&a.hide()})},getAnchor:function(a,b){var c,d=this.chart,e=d.inverted,f=0,g=0,h,a=la(a);c=a[0].tooltipPos;c||(o(a,function(a){h=a.series.yAxis;f+=a.plotX;g+=(a.plotLow?(a.plotLow+a.plotHigh)/2:a.plotY)+(!e&&h?h.top-d.plotTop:0)}),f/=a.length,g/=a.length,c=[e?d.plotWidth-g:f,this.shared&&!e&&a.length>1&&b?b.chartY-d.plotTop:e?d.plotHeight-f:g]);return Ta(c,u)},getPosition:function(a,b,c){var d=this.chart,e=d.plotLeft,f=d.plotTop,g=d.plotWidth,h=d.plotHeight,i=n(this.options.distance,12),
+j=c.plotX,c=c.plotY,d=j+e+(d.inverted?i:-a-i),k=c-b+f+15,l;d<7&&(d=e+s(j,0)+i);d+a>e+g&&(d-=d+a-(e+g),k=c-b+f-i,l=!0);k<f+5&&(k=f+5,l&&c>=k&&c<=k+b&&(k=c+f+i));k+b>f+h&&(k=s(f,f+h-b-i));return{x:d,y:k}},refresh:function(a,b){function c(){var a=this.points||la(this),b=a[0].series,c;c=[b.tooltipHeaderFormatter(a[0].key)];o(a,function(a){b=a.series;c.push(b.tooltipFormatter&&b.tooltipFormatter(a)||a.point.tooltipFormatter(b.tooltipOptions.pointFormat))});c.push(f.footerFormat||"");return c.join("")}
+var d=this.chart,e=this.label,f=this.options,g,h,i,j={},k,l=[];k=f.formatter||c;var j=d.hoverPoints,m,q=f.crosshairs;i=this.shared;h=this.getAnchor(a,b);g=h[0];h=h[1];i&&(!a.series||!a.series.noSharedTooltip)?(d.hoverPoints=a,j&&o(j,function(a){a.setState()}),o(a,function(a){a.setState("hover");l.push(a.getLabelConfig())}),j={x:a[0].category,y:a[0].y},j.points=l,a=a[0]):j=a.getLabelConfig();k=k.call(j);j=a.series;i=i||!j.isCartesian||j.tooltipOutsidePlot||d.isInsidePlot(g,h);k===!1||!i?this.hide():
+(this.isHidden&&e.show(),e.attr({text:k}),m=f.borderColor||a.color||j.color||"#606060",e.attr({stroke:m}),e=(f.positioner||this.getPosition).call(this,e.width,e.height,{plotX:g,plotY:h}),this.move(u(e.x),u(e.y),g+d.plotLeft,h+d.plotTop),this.isHidden=!1);if(q){q=la(q);for(e=q.length;e--;)if(i=a.series[e?"yAxis":"xAxis"],q[e]&&i)if(i=i.getPlotLinePath(e?n(a.stackY,a.y):a.x,1),this.crosshairs[e])this.crosshairs[e].attr({d:i,visibility:"visible"});else{j={"stroke-width":q[e].width||1,stroke:q[e].color||
+"#C0C0C0",zIndex:q[e].zIndex||2};if(q[e].dashStyle)j.dashstyle=q[e].dashStyle;this.crosshairs[e]=d.renderer.path(i).attr(j).add()}}F(d,"tooltipRefresh",{text:k,x:g+d.plotLeft,y:h+d.plotTop,borderColor:m})}};qb.prototype={normalizeMouseEvent:function(a){var b,c,d,a=a||L.event;if(!a.target)a.target=a.srcElement;a=Pb(a);d=a.touches?a.touches.item(0):a;this.chartPosition=b=Vb(this.chart.container);d.pageX===A?(c=a.x,b=a.y):(c=d.pageX-b.left,b=d.pageY-b.top);return x(a,{chartX:u(c),chartY:u(b)})},getMouseCoordinates:function(a){var b=
+{xAxis:[],yAxis:[]},c=this.chart;o(c.axes,function(d){var e=d.isXAxis;b[e?"xAxis":"yAxis"].push({axis:d,value:d.translate(((c.inverted?!e:e)?a.chartX-c.plotLeft:d.top+d.len-a.chartY)-d.minPixelPadding,!0)})});return b},getIndex:function(a){var b=this.chart;return b.inverted?b.plotHeight+b.plotTop-a.chartY:a.chartX-b.plotLeft},onmousemove:function(a){var b=this.chart,c=b.series,d=b.tooltip,e,f=b.hoverPoint,g=b.hoverSeries,h,i,j=b.chartWidth,k=this.getIndex(a);if(d&&this.options.tooltip.shared&&(!g||
+!g.noSharedTooltip)){e=[];h=c.length;for(i=0;i<h;i++)if(c[i].visible&&c[i].options.enableMouseTracking!==!1&&!c[i].noSharedTooltip&&c[i].tooltipPoints&&c[i].tooltipPoints.length)b=c[i].tooltipPoints[k],b._dist=M(k-b[c[i].xAxis.tooltipPosName||"plotX"]),j=O(j,b._dist),e.push(b);for(h=e.length;h--;)e[h]._dist>j&&e.splice(h,1);if(e.length&&e[0].plotX!==this.hoverX)d.refresh(e,a),this.hoverX=e[0].plotX}if(g&&g.tracker&&(b=g.tooltipPoints[k])&&b!==f)b.onMouseOver()},resetTracker:function(a){var b=this.chart,
+c=b.hoverSeries,d=b.hoverPoint,e=b.tooltip,b=e&&e.shared?b.hoverPoints:d;(a=a&&e&&b)&&la(b)[0].plotX===A&&(a=!1);if(a)e.refresh(b);else{if(d)d.onMouseOut();if(c)c.onMouseOut();e&&(e.hide(),e.hideCrosshairs());this.hoverX=null}},setDOMEvents:function(){function a(){if(b.selectionMarker){var f={xAxis:[],yAxis:[]},g=b.selectionMarker.getBBox(),h=g.x-c.plotLeft,l=g.y-c.plotTop,m;e&&(o(c.axes,function(a){if(a.options.zoomEnabled!==!1){var b=a.isXAxis,d=c.inverted?!b:b,e=a.translate(d?h:c.plotHeight-l-
+g.height,!0,0,0,1),d=a.translate((d?h+g.width:c.plotHeight-l)-2*a.minPixelPadding,!0,0,0,1);!isNaN(e)&&!isNaN(d)&&(f[b?"xAxis":"yAxis"].push({axis:a,min:O(e,d),max:s(e,d)}),m=!0)}}),m&&F(c,"selection",f,function(a){c.zoom(a)}));b.selectionMarker=b.selectionMarker.destroy()}if(c)I(d,{cursor:"auto"}),c.cancelClick=e,c.mouseIsDown=e=!1;R(C,"mouseup",a);Ba&&R(C,"touchend",a)}var b=this,c=b.chart,d=c.container,e,f=b.zoomX&&!c.inverted||b.zoomY&&c.inverted,g=b.zoomY&&!c.inverted||b.zoomX&&c.inverted;b.hideTooltipOnMouseMove=
+function(a){a=Pb(a);b.chartPosition&&c.hoverSeries&&c.hoverSeries.isCartesian&&!c.isInsidePlot(a.pageX-b.chartPosition.left-c.plotLeft,a.pageY-b.chartPosition.top-c.plotTop)&&b.resetTracker()};b.hideTooltipOnMouseLeave=function(){b.resetTracker();b.chartPosition=null};d.onmousedown=function(d){d=b.normalizeMouseEvent(d);d.type.indexOf("touch")===-1&&d.preventDefault&&d.preventDefault();c.mouseIsDown=!0;c.cancelClick=!1;c.mouseDownX=b.mouseDownX=d.chartX;b.mouseDownY=d.chartY;J(C,"mouseup",a);Ba&&
+J(C,"touchend",a)};var h=function(a){if(!a||!(a.touches&&a.touches.length>1)){var a=b.normalizeMouseEvent(a),d=a.type,h=a.chartX,l=a.chartY,m=!c.isInsidePlot(h-c.plotLeft,l-c.plotTop);if(d.indexOf("touch")===-1)a.returnValue=!1;d==="touchstart"&&(w(a.target,"isTracker")?c.runTrackerClick||a.preventDefault():!c.runChartClick&&!m&&a.preventDefault());if(m)h<c.plotLeft?h=c.plotLeft:h>c.plotLeft+c.plotWidth&&(h=c.plotLeft+c.plotWidth),l<c.plotTop?l=c.plotTop:l>c.plotTop+c.plotHeight&&(l=c.plotTop+c.plotHeight);
+if(c.mouseIsDown&&d!=="touchstart"&&(e=Math.sqrt(Math.pow(b.mouseDownX-h,2)+Math.pow(b.mouseDownY-l,2)),e>10)){d=c.isInsidePlot(b.mouseDownX-c.plotLeft,b.mouseDownY-c.plotTop);if(c.hasCartesianSeries&&(b.zoomX||b.zoomY)&&d&&!b.selectionMarker)b.selectionMarker=c.renderer.rect(c.plotLeft,c.plotTop,f?1:c.plotWidth,g?1:c.plotHeight,0).attr({fill:b.options.chart.selectionMarkerFill||"rgba(69,114,167,0.25)",zIndex:7}).add();if(b.selectionMarker&&f){var q=h-b.mouseDownX;b.selectionMarker.attr({width:M(q),
+x:(q>0?0:q)+b.mouseDownX})}b.selectionMarker&&g&&(l-=b.mouseDownY,b.selectionMarker.attr({height:M(l),y:(l>0?0:l)+b.mouseDownY}));d&&!b.selectionMarker&&b.options.chart.panning&&c.pan(h)}if(!m)b.onmousemove(a);return m||!c.hasCartesianSeries}};if(!/Android 4\.0/.test(na))d.onmousemove=h;J(d,"mouseleave",b.hideTooltipOnMouseLeave);Ba||J(C,"mousemove",b.hideTooltipOnMouseMove);d.ontouchstart=function(a){if(b.zoomX||b.zoomY)d.onmousedown(a);h(a)};d.ontouchmove=h;d.ontouchend=function(){e&&b.resetTracker()};
+d.onclick=function(a){var d=c.hoverPoint,e,f,a=b.normalizeMouseEvent(a);a.cancelBubble=!0;if(!c.cancelClick)d&&(w(a.target,"isTracker")||w(a.target.parentNode,"isTracker"))?(e=d.plotX,f=d.plotY,x(d,{pageX:b.chartPosition.left+c.plotLeft+(c.inverted?c.plotWidth-f:e),pageY:b.chartPosition.top+c.plotTop+(c.inverted?c.plotHeight-e:f)}),F(d.series,"click",x(a,{point:d})),d.firePointEvent("click",a)):(x(a,b.getMouseCoordinates(a)),c.isInsidePlot(a.chartX-c.plotLeft,a.chartY-c.plotTop)&&F(c,"click",a))}},
+destroy:function(){var a=this.chart,b=a.container;if(a.trackerGroup)a.trackerGroup=a.trackerGroup.destroy();R(b,"mouseleave",this.hideTooltipOnMouseLeave);R(C,"mousemove",this.hideTooltipOnMouseMove);b.onclick=b.onmousedown=b.onmousemove=b.ontouchstart=b.ontouchend=b.ontouchmove=null;clearInterval(this.tooltipTimeout)},init:function(a,b){if(!a.trackerGroup)a.trackerGroup=a.renderer.g("tracker").attr({zIndex:9}).add();if(b.enabled)a.tooltip=new pb(a,b);this.setDOMEvents()}};rb.prototype={init:function(a){var b=
+this,c=b.options=a.options.legend;if(c.enabled){var d=c.itemStyle,e=n(c.padding,8),f=c.itemMarginTop||0;b.baseline=z(d.fontSize)+3+f;b.itemStyle=d;b.itemHiddenStyle=B(d,c.itemHiddenStyle);b.itemMarginTop=f;b.padding=e;b.initialItemX=e;b.initialItemY=e-5;b.maxItemWidth=0;b.chart=a;b.itemHeight=0;b.lastLineHeight=0;b.render();J(b.chart,"endResize",function(){b.positionCheckboxes()})}},colorizeItem:function(a,b){var c=this.options,d=a.legendItem,e=a.legendLine,f=a.legendSymbol,g=this.itemHiddenStyle.color,
+c=b?c.itemStyle.color:g,h=b?a.color:g,g=a.options&&a.options.marker,i={stroke:h,fill:h},j;d&&d.css({fill:c});e&&e.attr({stroke:h});if(f){if(g)for(j in g=a.convertAttribs(g),g)d=g[j],d!==A&&(i[j]=d);f.attr(i)}},positionItem:function(a){var b=this.options,c=b.symbolPadding,b=!b.rtl,d=a._legendItemPos,e=d[0],d=d[1],f=a.checkbox;a.legendGroup&&a.legendGroup.translate(b?e:this.legendWidth-e-2*c-4,d);if(f)f.x=e,f.y=d},destroyItem:function(a){var b=a.checkbox;o(["legendItem","legendLine","legendSymbol",
+"legendGroup"],function(b){a[b]&&a[b].destroy()});b&&Na(a.checkbox)},destroy:function(){var a=this.group,b=this.box;if(b)this.box=b.destroy();if(a)this.group=a.destroy()},positionCheckboxes:function(a){var b=this.group.alignAttr,c,d=this.clipHeight||this.legendHeight;if(b)c=b.translateY,o(this.allItems,function(e){var f=e.checkbox,g;f&&(g=c+f.y+(a||0)+3,I(f,{left:b.translateX+e.legendItemWidth+f.x-20+"px",top:g+"px",display:g>c-6&&g<c+d-6?"":Q}))})},renderItem:function(a){var p;var b=this,c=b.chart,
+d=c.renderer,e=b.options,f=e.layout==="horizontal",g=e.symbolWidth,h=e.symbolPadding,i=b.itemStyle,j=b.itemHiddenStyle,k=b.padding,l=!e.rtl,m=e.width,q=e.itemMarginBottom||0,n=b.itemMarginTop,o=b.initialItemX,t=a.legendItem,r=a.series||a,u=r.options,v=u.showCheckbox,x=e.useHTML;if(!t&&(a.legendGroup=d.g("legend-item").attr({zIndex:1}).add(b.scrollGroup),r.drawLegendSymbol(b,a),a.legendItem=t=d.text(e.labelFormatter.call(a),l?g+h:-h,b.baseline,x).css(B(a.visible?i:j)).attr({align:l?"left":"right",
+zIndex:2}).add(a.legendGroup),(x?t:a.legendGroup).on("mouseover",function(){a.setState("hover");t.css(b.options.itemHoverStyle)}).on("mouseout",function(){t.css(a.visible?i:j);a.setState()}).on("click",function(b){var c=function(){a.setVisible()},b={browserEvent:b};a.firePointEvent?a.firePointEvent("legendItemClick",b,c):F(a,"legendItemClick",b,c)}),b.colorizeItem(a,a.visible),u&&v))a.checkbox=T("input",{type:"checkbox",checked:a.selected,defaultChecked:a.selected},e.itemCheckboxStyle,c.container),
+J(a.checkbox,"click",function(b){F(a,"checkboxClick",{checked:b.target.checked},function(){a.select()})});d=t.getBBox();p=a.legendItemWidth=e.itemWidth||g+h+d.width+k+(v?20:0),e=p;b.itemHeight=g=d.height;if(f&&b.itemX-o+e>(m||c.chartWidth-2*k-o))b.itemX=o,b.itemY+=n+b.lastLineHeight+q,b.lastLineHeight=0;b.maxItemWidth=s(b.maxItemWidth,e);b.lastItemY=n+b.itemY+q;b.lastLineHeight=s(g,b.lastLineHeight);a._legendItemPos=[b.itemX,b.itemY];f?b.itemX+=e:(b.itemY+=n+g+q,b.lastLineHeight=g);b.offsetWidth=
+m||s(f?b.itemX-o:e,b.offsetWidth)},render:function(){var a=this,b=a.chart,c=b.renderer,d=a.group,e,f,g,h,i=a.box,j=a.options,k=a.padding,l=j.borderWidth,m=j.backgroundColor;a.itemX=a.initialItemX;a.itemY=a.initialItemY;a.offsetWidth=0;a.lastItemY=0;if(!d)a.group=d=c.g("legend").attr({zIndex:7}).add(),a.contentGroup=c.g().attr({zIndex:1}).add(d),a.scrollGroup=c.g().add(a.contentGroup),a.clipRect=c.clipRect(0,0,9999,b.chartHeight),a.contentGroup.clip(a.clipRect);e=[];o(b.series,function(a){var b=a.options;
+b.showInLegend&&(e=e.concat(a.legendItems||(b.legendType==="point"?a.data:a)))});Ib(e,function(a,b){return(a.options&&a.options.legendIndex||0)-(b.options&&b.options.legendIndex||0)});j.reversed&&e.reverse();a.allItems=e;a.display=f=!!e.length;o(e,function(b){a.renderItem(b)});g=j.width||a.offsetWidth;h=a.lastItemY+a.lastLineHeight;h=a.handleOverflow(h);if(l||m){g+=k;h+=k;if(i){if(g>0&&h>0)i[i.isNew?"attr":"animate"](i.crisp(null,null,null,g,h)),i.isNew=!1}else a.box=i=c.rect(0,0,g,h,j.borderRadius,
+l||0).attr({stroke:j.borderColor,"stroke-width":l||0,fill:m||Q}).add(d).shadow(j.shadow),i.isNew=!0;i[f?"show":"hide"]()}a.legendWidth=g;a.legendHeight=h;o(e,function(b){a.positionItem(b)});f&&d.align(x({width:g,height:h},j),!0,b.spacingBox);b.isResizing||this.positionCheckboxes()},handleOverflow:function(a){var b=this,c=this.chart,d=c.renderer,e=this.options,f=e.y,f=c.spacingBox.height+(e.verticalAlign==="top"?-f:f)-this.padding,g=e.maxHeight,h=this.clipRect,i=e.navigation,j=n(i.animation,!0),k=
+i.arrowSize||12,l=this.nav;e.layout==="horizontal"&&(f/=2);g&&(f=O(f,g));if(a>f){this.clipHeight=c=f-20;this.pageCount=za(a/c);this.currentPage=n(this.currentPage,1);this.fullHeight=a;h.attr({height:c});if(!l)this.nav=l=d.g().attr({zIndex:1}).add(this.group),this.up=d.symbol("triangle",0,0,k,k).on("click",function(){b.scroll(-1,j)}).add(l),this.pager=d.text("",15,10).css(i.style).add(l),this.down=d.symbol("triangle-down",0,0,k,k).on("click",function(){b.scroll(1,j)}).add(l);b.scroll(0);a=f}else if(l)h.attr({height:c.chartHeight}),
+l.hide(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0;return a},scroll:function(a,b){var c=this.pageCount,d=this.currentPage+a,e=this.clipHeight,f=this.options.navigation,g=f.activeColor,h=f.inactiveColor,f=this.pager,i=this.padding;d>c&&(d=c);if(d>0)b!==A&&xa(b,this.chart),this.nav.attr({translateX:i,translateY:e+7,visibility:"visible"}),this.up.attr({fill:d===1?h:g}).css({cursor:d===1?"default":"pointer"}),f.attr({text:d+"/"+this.pageCount}),this.down.attr({x:18+this.pager.getBBox().width,
+fill:d===c?h:g}).css({cursor:d===c?"default":"pointer"}),e=-O(e*(d-1),this.fullHeight-e+i)+1,this.scrollGroup.animate({translateY:e}),f.attr({text:d+"/"+c}),this.currentPage=d,this.positionCheckboxes(e)}};sb.prototype={init:function(a,b){var c,d=a.series;a.series=null;c=B(N,a);c.series=a.series=d;var d=c.chart,e=d.margin,e=Y(e)?e:[e,e,e,e];this.optionsMarginTop=n(d.marginTop,e[0]);this.optionsMarginRight=n(d.marginRight,e[1]);this.optionsMarginBottom=n(d.marginBottom,e[2]);this.optionsMarginLeft=
+n(d.marginLeft,e[3]);this.runChartClick=(e=d.events)&&!!e.click;this.callback=b;this.isResizing=0;this.options=c;this.axes=[];this.series=[];this.hasCartesianSeries=d.showAxes;var f;this.index=Ha.length;Ha.push(this);d.reflow!==!1&&J(this,"load",this.initReflow);if(e)for(f in e)J(this,f,e[f]);this.xAxis=[];this.yAxis=[];this.animation=V?!1:n(d.animation,!0);this.pointCount=0;this.counters=new Hb;this.firstRender()},initSeries:function(a){var b=this.options.chart,b=new $[a.type||b.type||b.defaultSeriesType];
+b.init(this,a);return b},addSeries:function(a,b,c){var d,e=this;a&&(xa(c,e),b=n(b,!0),F(e,"addSeries",{options:a},function(){d=e.initSeries(a);e.isDirtyLegend=!0;b&&e.redraw()}));return d},isInsidePlot:function(a,b,c){var d=c?b:a,a=c?a:b;return d>=0&&d<=this.plotWidth&&a>=0&&a<=this.plotHeight},adjustTickAmounts:function(){this.options.chart.alignTicks!==!1&&o(this.axes,function(a){a.adjustTickAmount()});this.maxTicks=null},redraw:function(a){var b=this.axes,c=this.series,d=this.tracker,e=this.legend,
+f=this.isDirtyLegend,g,h=this.isDirtyBox,i=c.length,j=i,k=this.renderer,l=k.isHidden(),m=[];xa(a,this);for(l&&this.cloneRenderTo();j--;)if(a=c[j],a.isDirty&&a.options.stacking){g=!0;break}if(g)for(j=i;j--;)if(a=c[j],a.options.stacking)a.isDirty=!0;o(c,function(a){a.isDirty&&a.options.legendType==="point"&&(f=!0)});if(f&&e.options.enabled)e.render(),this.isDirtyLegend=!1;if(this.hasCartesianSeries){if(!this.isResizing)this.maxTicks=null,o(b,function(a){a.setScale()});this.adjustTickAmounts();this.getMargins();
+o(b,function(a){if(a.isDirtyExtremes)a.isDirtyExtremes=!1,m.push(function(){F(a,"afterSetExtremes",a.getExtremes())});if(a.isDirty||h||g)a.redraw(),h=!0})}h&&this.drawChartBox();o(c,function(a){a.isDirty&&a.visible&&(!a.isCartesian||a.xAxis)&&a.redraw()});d&&d.resetTracker&&d.resetTracker(!0);k.draw();F(this,"redraw");l&&this.cloneRenderTo(!0);o(m,function(a){a.call()})},showLoading:function(a){var b=this.options,c=this.loadingDiv,d=b.loading;if(!c)this.loadingDiv=c=T(ga,{className:"highcharts-loading"},
+x(d.style,{left:this.plotLeft+"px",top:this.plotTop+"px",width:this.plotWidth+"px",height:this.plotHeight+"px",zIndex:10,display:Q}),this.container),this.loadingSpan=T("span",null,d.labelStyle,c);this.loadingSpan.innerHTML=a||b.lang.loading;if(!this.loadingShown)I(c,{opacity:0,display:""}),xb(c,{opacity:d.style.opacity},{duration:d.showDuration||0}),this.loadingShown=!0},hideLoading:function(){var a=this.options,b=this.loadingDiv;b&&xb(b,{opacity:0},{duration:a.loading.hideDuration||100,complete:function(){I(b,
+{display:Q})}});this.loadingShown=!1},get:function(a){var b=this.axes,c=this.series,d,e;for(d=0;d<b.length;d++)if(b[d].options.id===a)return b[d];for(d=0;d<c.length;d++)if(c[d].options.id===a)return c[d];for(d=0;d<c.length;d++){e=c[d].points||[];for(b=0;b<e.length;b++)if(e[b].id===a)return e[b]}return null},getAxes:function(){var a=this,b=this.options,c=b.xAxis||{},b=b.yAxis||{},c=la(c);o(c,function(a,b){a.index=b;a.isX=!0});b=la(b);o(b,function(a,b){a.index=b});c=c.concat(b);o(c,function(b){new ob(a,
+b)});a.adjustTickAmounts()},getSelectedPoints:function(){var a=[];o(this.series,function(b){a=a.concat(Ob(b.points,function(a){return a.selected}))});return a},getSelectedSeries:function(){return Ob(this.series,function(a){return a.selected})},showResetZoom:function(){var a=this,b=N.lang,c=a.options.chart.resetZoomButton,d=c.theme,e=d.states,f=c.relativeTo==="chart"?null:"plotBox";this.resetZoomButton=a.renderer.button(b.resetZoom,null,null,function(){a.zoomOut()},d,e&&e.hover).attr({align:c.position.align,
+title:b.resetZoomTitle}).add().align(c.position,!1,a[f]);this.resetZoomButton.alignTo=f},zoomOut:function(){var a=this,b=a.resetZoomButton;F(a,"selection",{resetSelection:!0},function(){a.zoom()});if(b)a.resetZoomButton=b.destroy()},zoom:function(a){var b=this,c;!a||a.resetSelection?o(b.axes,function(a){c=a.zoom()}):o(a.xAxis.concat(a.yAxis),function(a){var e=a.axis;if(b.tracker[e.isXAxis?"zoomX":"zoomY"])c=e.zoom(a.min,a.max)});b.resetZoomButton||b.showResetZoom();c&&b.redraw(n(b.options.chart.animation,
+b.pointCount<100))},pan:function(a){var b=this.xAxis[0],c=this.mouseDownX,d=b.pointRange/2,e=b.getExtremes(),f=b.translate(c-a,!0)+d,c=b.translate(c+this.plotWidth-a,!0)-d;(d=this.hoverPoints)&&o(d,function(a){a.setState()});b.series.length&&f>O(e.dataMin,e.min)&&c<s(e.dataMax,e.max)&&b.setExtremes(f,c,!0,!1,{trigger:"pan"});this.mouseDownX=a;I(this.container,{cursor:"move"})},setTitle:function(a,b){var c=this,d=c.options,e;c.chartTitleOptions=e=B(d.title,a);c.chartSubtitleOptions=d=B(d.subtitle,
+b);o([["title",a,e],["subtitle",b,d]],function(a){var b=a[0],d=c[b],e=a[1],a=a[2];d&&e&&(c[b]=d=d.destroy());a&&a.text&&!d&&(c[b]=c.renderer.text(a.text,0,0,a.useHTML).attr({align:a.align,"class":"highcharts-"+b,zIndex:a.zIndex||4}).css(a.style).add().align(a,!1,c.spacingBox))})},getChartSize:function(){var a=this.options.chart,b=this.renderToClone||this.renderTo;this.containerWidth=eb(b,"width");this.containerHeight=eb(b,"height");this.chartWidth=s(0,n(a.width,this.containerWidth,600));this.chartHeight=
+s(0,n(a.height,this.containerHeight>19?this.containerHeight:400))},cloneRenderTo:function(a){var b=this.renderToClone,c=this.container;a?b&&(this.renderTo.appendChild(c),Na(b),delete this.renderToClone):(c&&this.renderTo.removeChild(c),this.renderToClone=b=this.renderTo.cloneNode(0),I(b,{position:"absolute",top:"-9999px",display:"block"}),C.body.appendChild(b),c&&b.appendChild(c))},getContainer:function(){var a,b=this.options.chart,c,d,e;this.renderTo=a=b.renderTo;e="highcharts-"+tb++;if(ja(a))this.renderTo=
+a=C.getElementById(a);a||Oa(13,!0);c=z(w(a,"data-highcharts-chart"));!isNaN(c)&&Ha[c]&&Ha[c].destroy();w(a,"data-highcharts-chart",this.index);a.innerHTML="";a.offsetWidth||this.cloneRenderTo();this.getChartSize();c=this.chartWidth;d=this.chartHeight;this.container=a=T(ga,{className:"highcharts-container"+(b.className?" "+b.className:""),id:e},x({position:"relative",overflow:"hidden",width:c+"px",height:d+"px",textAlign:"left",lineHeight:"normal",zIndex:0},b.style),this.renderToClone||a);this.renderer=
+b.forExport?new sa(a,c,d,!0):new Sa(a,c,d);V&&this.renderer.create(this,a,c,d)},getMargins:function(){var a=this.options.chart,b=a.spacingTop,c=a.spacingRight,d=a.spacingBottom,a=a.spacingLeft,e,f=this.legend,g=this.optionsMarginTop,h=this.optionsMarginLeft,i=this.optionsMarginRight,j=this.optionsMarginBottom,k=this.chartTitleOptions,l=this.chartSubtitleOptions,m=this.options.legend,q=n(m.margin,10),p=m.x,y=m.y,t=m.align,u=m.verticalAlign;this.resetMargins();e=this.axisOffset;if((this.title||this.subtitle)&&
+!r(this.optionsMarginTop))if(l=s(this.title&&!k.floating&&!k.verticalAlign&&k.y||0,this.subtitle&&!l.floating&&!l.verticalAlign&&l.y||0))this.plotTop=s(this.plotTop,l+n(k.margin,15)+b);if(f.display&&!m.floating)if(t==="right"){if(!r(i))this.marginRight=s(this.marginRight,f.legendWidth-p+q+c)}else if(t==="left"){if(!r(h))this.plotLeft=s(this.plotLeft,f.legendWidth+p+q+a)}else if(u==="top"){if(!r(g))this.plotTop=s(this.plotTop,f.legendHeight+y+q+b)}else if(u==="bottom"&&!r(j))this.marginBottom=s(this.marginBottom,
+f.legendHeight-y+q+d);this.extraBottomMargin&&(this.marginBottom+=this.extraBottomMargin);this.extraTopMargin&&(this.plotTop+=this.extraTopMargin);this.hasCartesianSeries&&o(this.axes,function(a){a.getOffset()});r(h)||(this.plotLeft+=e[3]);r(g)||(this.plotTop+=e[0]);r(j)||(this.marginBottom+=e[2]);r(i)||(this.marginRight+=e[1]);this.setChartSize()},initReflow:function(){function a(a){var g=c.width||eb(d,"width"),h=c.height||eb(d,"height"),a=a?a.target:L;if(!b.hasUserSize&&g&&h&&(a===L||a===C)){if(g!==
+b.containerWidth||h!==b.containerHeight)clearTimeout(e),b.reflowTimeout=e=setTimeout(function(){if(b.container)b.setSize(g,h,!1),b.hasUserSize=null},100);b.containerWidth=g;b.containerHeight=h}}var b=this,c=b.options.chart,d=b.renderTo,e;J(L,"resize",a);J(b,"destroy",function(){R(L,"resize",a)})},setSize:function(a,b,c){var d=this,e,f,g=d.resetZoomButton,h=d.title,i=d.subtitle,j;d.isResizing+=1;j=function(){d&&F(d,"endResize",null,function(){d.isResizing-=1})};xa(c,d);d.oldChartHeight=d.chartHeight;
+d.oldChartWidth=d.chartWidth;if(r(a))d.chartWidth=e=s(0,u(a)),d.hasUserSize=!!e;if(r(b))d.chartHeight=f=s(0,u(b));I(d.container,{width:e+"px",height:f+"px"});d.renderer.setSize(e,f,c);d.plotWidth=e-d.plotLeft-d.marginRight;d.plotHeight=f-d.plotTop-d.marginBottom;d.maxTicks=null;o(d.axes,function(a){a.isDirty=!0;a.setScale()});o(d.series,function(a){a.isDirty=!0});d.isDirtyLegend=!0;d.isDirtyBox=!0;d.getMargins();a=d.spacingBox;h&&h.align(null,null,a);i&&i.align(null,null,a);g&&g.align&&g.align(null,
+null,d[g.alignTo]);d.redraw(c);d.oldChartHeight=null;F(d,"resize");Pa===!1?j():setTimeout(j,Pa&&Pa.duration||500)},setChartSize:function(){var a=this.inverted,b=this.chartWidth,c=this.chartHeight,d=this.options.chart,e=d.spacingTop,f=d.spacingRight,g=d.spacingBottom,h=d.spacingLeft,i,j,k,l;this.plotLeft=i=u(this.plotLeft);this.plotTop=j=u(this.plotTop);this.plotWidth=k=s(0,u(b-i-this.marginRight));this.plotHeight=l=s(0,u(c-j-this.marginBottom));this.plotSizeX=a?l:k;this.plotSizeY=a?k:l;this.plotBorderWidth=
+a=d.plotBorderWidth||0;this.spacingBox={x:h,y:e,width:b-h-f,height:c-e-g};this.plotBox={x:i,y:j,width:k,height:l};this.clipBox={x:a/2,y:a/2,width:this.plotSizeX-a,height:this.plotSizeY-a};o(this.axes,function(a){a.setAxisSize();a.setAxisTranslation()})},resetMargins:function(){var a=this.options.chart,b=a.spacingRight,c=a.spacingBottom,d=a.spacingLeft;this.plotTop=n(this.optionsMarginTop,a.spacingTop);this.marginRight=n(this.optionsMarginRight,b);this.marginBottom=n(this.optionsMarginBottom,c);this.plotLeft=
+n(this.optionsMarginLeft,d);this.axisOffset=[0,0,0,0]},drawChartBox:function(){var a=this.options.chart,b=this.renderer,c=this.chartWidth,d=this.chartHeight,e=this.chartBackground,f=this.plotBackground,g=this.plotBorder,h=this.plotBGImage,i=a.borderWidth||0,j=a.backgroundColor,k=a.plotBackgroundColor,l=a.plotBackgroundImage,m=a.plotBorderWidth||0,n,p=this.plotLeft,o=this.plotTop,t=this.plotWidth,r=this.plotHeight,u=this.plotBox,v=this.clipRect,s=this.clipBox;n=i+(a.shadow?8:0);if(i||j)if(e)e.animate(e.crisp(null,
+null,null,c-n,d-n));else{e={fill:j||Q};if(i)e.stroke=a.borderColor,e["stroke-width"]=i;this.chartBackground=b.rect(n/2,n/2,c-n,d-n,a.borderRadius,i).attr(e).add().shadow(a.shadow)}if(k)f?f.animate(u):this.plotBackground=b.rect(p,o,t,r,0).attr({fill:k}).add().shadow(a.plotShadow);if(l)h?h.animate(u):this.plotBGImage=b.image(l,p,o,t,r).add();v?v.animate({width:s.width,height:s.height}):this.clipRect=b.clipRect(s);if(m)g?g.animate(g.crisp(null,p,o,t,r)):this.plotBorder=b.rect(p,o,t,r,0,m).attr({stroke:a.plotBorderColor,
+"stroke-width":m,zIndex:1}).add();this.isDirtyBox=!1},propFromSeries:function(){var a=this,b=a.options.chart,c,d=a.options.series,e,f;o(["inverted","angular","polar"],function(g){c=$[b.type||b.defaultSeriesType];f=a[g]||b[g]||c&&c.prototype[g];for(e=d&&d.length;!f&&e--;)(c=$[d[e].type])&&c.prototype[g]&&(f=!0);a[g]=f})},render:function(){var a=this,b=a.axes,c=a.renderer,d=a.options,e=d.labels,d=d.credits,f;a.setTitle();a.legend=new rb(a);o(b,function(a){a.setScale()});a.getMargins();a.maxTicks=null;
+o(b,function(a){a.setTickPositions(!0);a.setMaxTicks()});a.adjustTickAmounts();a.getMargins();a.drawChartBox();a.hasCartesianSeries&&o(b,function(a){a.render()});if(!a.seriesGroup)a.seriesGroup=c.g("series-group").attr({zIndex:3}).add();o(a.series,function(a){a.translate();a.setTooltipPoints();a.render()});e.items&&o(e.items,function(b){var d=x(e.style,b.style),f=z(d.left)+a.plotLeft,j=z(d.top)+a.

<TRUNCATED>

[59/61] [abbrv] git commit: added index template

Posted by sn...@apache.org.
added index template


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/5da8ea8e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/5da8ea8e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/5da8ea8e

Branch: refs/pull/35/head
Commit: 5da8ea8ea25a4a1d456dbffc763b25d8b3d62b35
Parents: db6f01c
Author: Rod Simpson <ro...@apigee.com>
Authored: Mon Jan 27 16:18:23 2014 -0700
Committer: Rod Simpson <ro...@apigee.com>
Committed: Mon Jan 27 16:18:23 2014 -0700

----------------------------------------------------------------------
 portal/index-template.html | 131 ++++++++++++++++++++++
 portal/index.html          | 238 ----------------------------------------
 2 files changed, 131 insertions(+), 238 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5da8ea8e/portal/index-template.html
----------------------------------------------------------------------
diff --git a/portal/index-template.html b/portal/index-template.html
new file mode 100644
index 0000000..3fc83ad
--- /dev/null
+++ b/portal/index-template.html
@@ -0,0 +1,131 @@
+<!doctype html>
+<html lang="en" ng-app="appservices">
+
+<head>
+  <meta charset="utf-8">
+  <title>Apigee App Services</title>
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <meta name="description" content="">
+  <meta name="author" content="">
+
+  <link href="js/libs/bootstrap/custom/css/bootstrap.css" rel="stylesheet"/>
+  <link href="css/dash.min.css" rel="stylesheet"/>
+
+  <!--styles for jquery ui calendar component-->
+  <link rel="stylesheet" type="text/css" href="js/libs/jqueryui/jquery-ui-1.8.9.custom.css"/>
+  <link rel="stylesheet" type="text/css" href="js/libs/jqueryui/jquery-ui-timepicker.css"/>
+</head>
+<body ng-controller="PageCtrl" >
+<!-- Google Tag Manager -->
+<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-N52333"
+                  height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
+<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
+    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
+    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
+    '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
+})(window,document,'script','dataLayer','GTM-N52333');</script>
+<!-- End Google Tag Manager -->
+<header>
+  <nav class="navbar navbar-static-top">
+    <div class="container-fluid">
+      <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+        <span class="icon-bar"></span>
+        <span class="icon-bar"></span>
+        <span class="icon-bar"></span>
+      </button>
+      <a class="brand" href="#"><img src="img/logo.gif"/></a>
+
+      <div appswitcher ></div>
+
+
+      <div class="nav-collapse collapse"  ng-show="loaded">
+
+        <div class="navbar-text pull-right" ng-if="activeUI">
+          <span class="navbar-text" id="userEmail" >{{userEmail || 'anonymous'}}</span> |
+          <span ng-controller="LoginCtrl"><a id="logout-link" ng-click="logout()" title="logout"><i class="pictogram">&#59201</i></a></span>
+          <span ><a ng-click="profile()" title="profile"><i class="pictogram">&#59170</i></a></span> |
+          <span><a href="archive/" target="_blank">Legacy Portal</a></span>
+        </div>
+
+      </div>
+    </div>
+  </nav>
+</header>
+<section class="side-menu"   ng-show="activeUI">
+  <div class="sidebar-nav">
+    <div class="nav-collapse collapse">
+
+      <org-menu context="orgmenu"  ></org-menu>
+
+    </div>
+    <div class="nav-collapse collapse" id="sideMenu">
+    </div>
+  </div>
+</section>
+
+<section class="main-content"   ng-show="loaded">
+  <div class="container-fluid">
+    <div class="row-fluid">
+      <div class="span12">
+
+        <!--header app/org context nav-->
+
+        <nav class="navbar secondary"    ng-show="activeUI">
+          <div class="container-fluid">
+            <div class="row-fluid">
+              <div class="span12">
+                <div class="span5">
+                  <app-menu></app-menu>
+                </div>
+                <div class="span7 button-area">
+                  <div class="nav-collapse collapse">
+                    <ul class="helper-links nav span12">
+                      <li class="sdks span12">
+                        <ul class="pull-right">
+                          <li class="title"><label>SDKs and Modules</label></li>
+                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#ios"><i class="sdk-icon-ios"></i></a></li>
+                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#android"><i class="sdk-icon-android"></i></a></li>
+                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#javascript"><i class="sdk-icon-js"></i></a></li>
+                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#nodejs"><i class="sdk-icon-node"></i></a></li>
+                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#ruby"><i class="sdk-icon-ruby"></i></a></li>
+                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#c"><i class="sdk-icon-net"></i></a></li>
+                        </ul>
+                      </li>
+                    </ul>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </nav>
+        <!--for demo mode-->
+        <!--todo - this needs a style applied only when shown ng-class-->
+        <div ng-controller="AlertCtrl" ng-cloak class="alert-holder main-alert">
+          <alerti ng-repeat="alert in alerts" type="alert.type" closeable="true" index="$index" ng-cloak>{{alert.msg}}</alerti>
+        </div>
+
+        <insecure-banner></insecure-banner>
+        <!--Dynamic Content-->
+        <div ng-view class="page-holder"></div>
+
+        <footer>
+          <hr>
+          <p class="pull-right">&copy; Apigee 2013</p>
+        </footer>
+      </div>
+    </div>
+  </div>
+</section>
+<script src="config.js"></script>
+
+<script src="js/libs/usergrid-libs.min.js"></script>
+<script src="js/libs/bootstrap/custom/js/bootstrap.min.js"></script>
+<!--todo - remove this. temporarily including jquery ui for calendar in push-->
+<script src="js/libs/jqueryui/jquery.ui.timepicker.min.js" type="text/javascript"></script>
+<!-- In dev use: <script src="js/libs/angular-1.1.5.js"></script> -->
+<!--<script type="text/javascript" src="js/libs/angular-ui-ng-grid/ng-grid-2.0.2.debug.js"></script>-->
+
+<script id="main-script" src="js/usergrid.min.js"></script>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5da8ea8e/portal/index.html
----------------------------------------------------------------------
diff --git a/portal/index.html b/portal/index.html
deleted file mode 100644
index 99a5577..0000000
--- a/portal/index.html
+++ /dev/null
@@ -1,238 +0,0 @@
-<!doctype html>
-<html lang="en" ng-app="appservices">
-<head>
-  <meta charset="utf-8">
-  <title>Apigee App Services</title>
-  <meta name="viewport" content="width=device-width, initial-scale=1.0">
-  <meta name="description" content="">
-  <meta name="author" content="">
-
-  <link href="js/libs/bootstrap/custom/css/bootstrap.css" rel="stylesheet">
-  <link href="css/dash.min.css" rel="stylesheet">
-  <link id="perf-script" href="bower_components/apigee.performance.ui/dist/css/performance.min.css" rel="stylesheet">
-
-  <!--styles for jquery ui calendar component-->
-  <link rel="stylesheet" type="text/css" href="js/libs/jqueryui/jquery-ui-1.8.9.custom.css">
-  <link rel="stylesheet" type="text/css" href="js/libs/jqueryui/jquery-ui-timepicker.css">
-</head>
-<body ng-controller="PageCtrl">
-<!-- Google Tag Manager -->
-<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-N52333" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
-<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
-    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
-    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
-    '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
-})(window,document,'script','dataLayer','GTM-N52333');</script>
-<!-- End Google Tag Manager -->
-<header>
-  <nav class="navbar navbar-static-top">
-    <div class="container-fluid">
-      <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
-        <span class="icon-bar"></span>
-        <span class="icon-bar"></span>
-        <span class="icon-bar"></span>
-      </button>
-      <a class="brand" href="#"><img src="img/logo.gif"></a>
-
-      <div appswitcher=""></div>
-
-
-      <div class="nav-collapse collapse" ng-show="loaded">
-
-        <div class="navbar-text pull-right" ng-if="activeUI">
-          <span class="navbar-text" id="userEmail">{{userEmail || 'anonymous'}}</span> |
-          <span ng-controller="LoginCtrl"><a id="logout-link" ng-click="logout()" title="logout"><i class="pictogram">&#59201</i></a></span>
-          <span><a ng-click="profile()" title="profile"><i class="pictogram">&#59170</i></a></span> |
-          <span><a href="archive/" target="_blank">Legacy Portal</a></span>
-        </div>
-
-      </div>
-    </div>
-  </nav>
-</header>
-<section class="side-menu" ng-show="activeUI">
-  <div class="sidebar-nav">
-    <div class="nav-collapse collapse">
-
-      <org-menu context="orgmenu"></org-menu>
-
-    </div>
-    <div class="nav-collapse collapse">
-      <ul class="nav nav-list" menu="sideMenu">
-        <li class="option active">
-          <a href="#!/org-overview"><i class="pictogram">&#128193</i>Org Overview</a>
-        </li>
-        <li class="option active">
-          <a href="#!/getting-started/setup"><i class="pictogram">&#128640;</i>Getting Started</a>
-        </li>
-
-        <li class="option">
-          <a href="#!/app-overview/summary"><i class="pictogram">&#59214;</i>App Overview</a>
-          <ul class="nav nav-list">
-            <li>
-              <a href="#!/app-overview/summary"><i class="pictogram sub">&#128241;</i> Summary</a>
-            </li>
-          </ul>
-        </li>
-
-
-        <li class="option">
-          <a href="#!/users"><i class="pictogram">&#128100;</i>Users</a>
-          <ul class="nav nav-list">
-            <li>
-              <a href="#!/users"><i class="pictogram sub">&#128100;</i>Users</a>
-            </li>
-            <li>
-              <a href="#!/groups"><i class="pictogram sub">&#128101;</i>Groups</a>
-            </li>
-            <li>
-              <a href="#!/roles"><i class="pictogram sub">&#59170;</i>Roles</a>
-            </li>
-          </ul>
-        </li>
-
-        <li class="option" id="perf-script">
-          <a href="#!/performance/app-usage?timeFilter={{selectedtimefilter.value}}&amp;sessionChartFilter={{selectedChartCriteria.chartCriteriaId}}&amp;currentCompare={{currentCompare}}"><i class="pictogram">&#128711;</i>Monitoring <div class="new-tag">new</div></a>
-          <ul class="nav nav-list">
-            <li><a href="#!/performance/app-usage?timeFilter={{selectedtimefilter.value}}&amp;sessionChartFilter={{selectedChartCriteria.chartCriteriaId}}&amp;currentCompare={{currentCompare}}"><i class="pictogram sub">&#128202;</i>App Usage</a></li>
-            <li><a href="#!/performance/errors-crashes?timeFilter={{selectedtimefilter.value}}&amp;logChartFilter={{selectedChartCriteria.chartCriteriaId}}&amp;currentCompare={{currentCompare}}"><i class="pictogram sub">&#9889;</i>Errors &amp;
-              Crashes</a></li>
-            <li><a href="#!/performance/api-perf?timeFilter={{selectedtimefilter.value}}&amp;networkChartFilter={{selectedChartCriteria.chartCriteriaId}}&amp;currentCompare={{currentCompare}}"><i class="pictogram sub">&#128200;</i>API Performance</a>
-            </li>
-          </ul>
-        </li>
-
-
-        <li class="option">
-          <a href="#!/push/sendNotification"><i class="pictogram">&#59200;</i>Push</a>
-          <ul class="nav nav-list">
-            <li>
-              <a href="#!/push/sendNotification"><i class="pictogram sub">&#128319;</i>Send
-                Notification</a>
-            </li>
-            <li>
-              <a href="#!/push/history"><i class="pictogram sub">&#9991;</i>Message History</a>
-            </li>
-            <li>
-              <a href="#!/push/configuration"><i class="pictogram sub">&#9874;</i>Configuration</a>
-            </li>
-            <li>
-              <a href="#!/push/getStarted"><i class="pictogram sub">&#59176;</i>Getting Started</a>
-            </li>
-          </ul>
-        </li>
-
-
-        <li class="option">
-          <a href="#!/data"><i class="pictogram">&#128248;</i>Data</a>
-          <ul class="nav nav-list">
-            <li>
-              <a href="#!/data"><i class="pictogram sub">&#128254;</i>Collections</a>
-            </li>
-            <!--li>
-              <a href="#!/data/shell"><i class="pictogram sub">&#128254;</i>Shell</a>
-            </li-->
-          </ul>
-        </li>
-
-        <li class="option">
-          <a href="#!/activities"><i class="pictogram ">&#59194;</i> Activities</a>
-        </li>
-
-
-        <li class="option" id="perf-script">
-          <a href="#!/configure/default-configs"><i class="pictogram">&#9874;</i>Configure</a>
-          <ul class="nav nav-list">
-            <li><a href="#!/configure/default-configs"><i class="pictogram sub">&#128214;</i>Default
-              Configs</a></li>
-            <li><a href="#!/configure/beta-configs"><i class="pictogram sub">&#59190;</i>Beta Testing Configs</a>
-            </li>
-            <li><a href="#!/configure/ab-configs"><i class="pictogram sub">&#59146;</i>A/B Testing
-              Configs</a></li>
-          </ul>
-        </li>
-        <li class="option">
-          <a href="#!/shell"><i class="pictogram">&#9000;</i>Shell</a>
-        </li>
-
-      </ul>
-    </div>
-  </div>
-</section>
-
-<section class="main-content" ng-show="loaded">
-  <div class="container-fluid">
-    <div class="row-fluid">
-      <div class="span12">
-
-        <!--header app/org context nav-->
-
-        <nav class="navbar secondary" ng-show="activeUI">
-          <div class="container-fluid">
-            <div class="row-fluid">
-              <div class="span12">
-                <div class="span5">
-                  <app-menu></app-menu>
-                </div>
-                <div class="span7 button-area">
-                  <div class="nav-collapse collapse">
-                    <ul class="helper-links nav span12">
-                      <li class="sdks span12">
-                        <ul class="pull-right">
-                          <li class="title"><label>SDKs and Modules</label></li>
-                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#ios"><i class="sdk-icon-ios"></i></a></li>
-                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#android"><i class="sdk-icon-android"></i></a></li>
-                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#javascript"><i class="sdk-icon-js"></i></a></li>
-                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#nodejs"><i class="sdk-icon-node"></i></a></li>
-                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#ruby"><i class="sdk-icon-ruby"></i></a></li>
-                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#c"><i class="sdk-icon-net"></i></a></li>
-                        </ul>
-                      </li>
-                    </ul>
-                  </div>
-                </div>
-              </div>
-            </div>
-          </div>
-        </nav>
-        <!--for demo mode-->
-        <!--todo - this needs a style applied only when shown ng-class-->
-        <div ng-controller="AlertCtrl" ng-cloak="" class="alert-holder main-alert">
-          <alerti ng-repeat="alert in alerts" type="alert.type" closeable="true" index="$index" ng-cloak="">{{alert.msg}}</alerti>
-        </div>
-
-        <insecure-banner></insecure-banner>
-        <!--Dynamic Content-->
-        <div ng-view="" class="page-holder"></div>
-
-        <footer>
-          <hr>
-          <p class="pull-right">&copy; Apigee 2013</p>
-        </footer>
-      </div>
-    </div>
-  </div>
-</section>
-<script src="config.js"></script>
-<script src="js/libs/usergrid-libs.min.js"></script>
-<script src="js/libs/bootstrap/custom/js/bootstrap.min.js"></script>
-<!--todo - remove this. temporarily including jquery ui for calendar in push-->
-<script src="js/libs/jqueryui/jquery.ui.timepicker.min.js" type="text/javascript"></script>
-<!-- In dev use: <script src="js/libs/angular-1.1.5.js"></script> -->
-<!--<script type="text/javascript" src="js/libs/angular-ui-ng-grid/ng-grid-2.0.2.debug.js"></script>-->
-<script id="main-script" src="js/usergrid.min.js"></script>
-
-<script type="text/javascript">
-  var _gaq = _gaq || [];
-  _gaq.push(['_setAccount', 'UA-4084158-4']);
-
-  (function() {
-    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
-    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
-    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
-  })();
-
-</script>
-
-<script id="perf-script" src="bower_components/apigee.performance.ui/dist/js/usergrid-perf.min.js"></script></body>
-</html>


[11/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/errors.json
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/errors.json b/portal/js/libs/angular-1.2.5/errors.json
new file mode 100755
index 0000000..388242e
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/errors.json
@@ -0,0 +1 @@
+{"id":"ng","generated":"Fri Dec 13 2013 11:01:57 GMT-0800 (PST)","errors":{"$cacheFactory":{"iid":"CacheId '{0}' is already taken!"},"ngModel":{"nonassign":"Expression '{0}' is non-assignable. Element: {1}"},"$sce":{"iequirks":"Strict Contextual Escaping does not support Internet Explorer version < 9 in quirks mode.  You can fix this by adding the text <!doctype html> to the top of your HTML document.  See http://docs.angularjs.org/api/ng.$sce for more information.","insecurl":"Blocked loading resource from url not allowed by $sceDelegate policy.  URL: {0}","icontext":"Attempted to trust a value in invalid context. Context: {0}; Value: {1}","imatcher":"Matchers may only be \"self\", string patterns or RegExp objects","iwcard":"Illegal sequence *** in string matcher.  String: {0}","itype":"Attempted to trust a non-string value in a content requiring a string: Context: {0}","unsafe":"Attempting to use an unsafe value in a safe context."},"$controller":{"noscp":"Cannot export controlle
 r '{0}' as '{1}'! No $scope object provided via `locals`."},"$compile":{"nodomevents":"Interpolations for HTML DOM event attributes are disallowed.  Please use the ng- versions (such as ng-click instead of onclick) instead.","multidir":"Multiple directives [{0}, {1}] asking for {2} on: {3}","nonassign":"Expression '{0}' used with directive '{1}' is non-assignable!","tplrt":"Template for directive '{0}' must have exactly one root element. {1}","selmulti":"Binding to the 'multiple' attribute is not supported. Element: {0}","tpload":"Failed to load template: {0}","iscp":"Invalid isolate scope definition for directive '{0}'. Definition: {... {1}: '{2}' ...}","ctreq":"Controller '{0}', required by directive '{1}', can't be found!","uterdir":"Unterminated attribute, found '{0}' but no matching '{1}' found."},"$injector":{"modulerr":"Failed to instantiate module {0} due to:\n{1}","unpr":"Unknown provider: {0}","itkn":"Incorrect injection token! Expected service name as string, got {0}","cd
 ep":"Circular dependency found: {0}","nomod":"Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.","pget":"Provider '{0}' must define $get factory method."},"$rootScope":{"inprog":"{0} already in progress","infdig":"{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}"},"ngPattern":{"noregexp":"Expected {0} to be a RegExp but was {1}. Element: {2}"},"$interpolate":{"noconcat":"Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required.  See http://docs.angularjs.org/api/ng.$sce","interr":"Can't interpolate: {0}\n{1}"},"jqLite":{"offargs":"jqLite#off() does not support the `selector` argument","onargs":"jqLite#on() does not support the `selector` or `eventData` parameters","nosel":"Looking up elements via selectors is not suppo
 rted by jqLite! See: http://docs.angularjs.org/api/angular.element"},"ngOptions":{"iexp":"Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}"},"ngRepeat":{"iidexp":"'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.","dupes":"Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}","iexp":"Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'."},"ng":{"areq":"Argument '{0}' is {1}","cpws":"Can't copy! Making copies of Window or Scope instances is not supported.","badname":"hasOwnProperty is not a valid {0} name","btstrpd":"App Already Bootstrapped with this Element '{0}'","cpi":"Can't copy! Source and destination are identical."},"$animate":{"notcsel":"Expecting class selector starting with '.' got '{0}'."},"ngTransclude":{"orphan":"Illegal use of ngTransc
 lude directive in the template! No parent directive that requires a transclusion found. Element: {0}"},"$parse":{"isecfld":"Referencing \"constructor\" field in Angular expressions is disallowed! Expression: {0}","syntax":"Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].","isecdom":"Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}","lexerr":"Lexer Error: {0} at column{1} in expression [{2}].","ueoe":"Unexpected end of expression: {0}","isecwindow":"Referencing the Window in Angular expressions is disallowed! Expression: {0}","isecfn":"Referencing Function in Angular expressions is disallowed! Expression: {0}"},"$httpBackend":{"noxhr":"This browser does not support XMLHttpRequest."},"$location":{"ipthprfx":"Invalid url \"{0}\", missing path prefix \"{1}\".","isrcharg":"The first argument of the `$location#search()` call must be a string or an object.","ihshprfx":"Invalid url \"{0}\", missing hash prefix \"{1}\"."},"$res
 ource":{"badargs":"Expected up to 4 arguments [params, data, success, error], got {0} arguments","badmember":"Dotted member path \"@{0}\" is invalid.","badcfg":"Error in resource configuration. Expected response to contain an {0} but got an {1}","badname":"hasOwnProperty is not a valid parameter name."},"$sanitize":{"badparse":"The sanitizer was unable to parse the following block of html: {0}"}}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/version.json
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/version.json b/portal/js/libs/angular-1.2.5/version.json
new file mode 100755
index 0000000..342ad55
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/version.json
@@ -0,0 +1 @@
+{"full":"1.2.5","major":"1","minor":"2","dot":"5","codename":"singularity-expansion","cdn":"1.2.4"}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/version.txt
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/version.txt b/portal/js/libs/angular-1.2.5/version.txt
new file mode 100755
index 0000000..3a1f10e
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/version.txt
@@ -0,0 +1 @@
+1.2.5
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angularitics/angularitics-0.8.5-google-analytics.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angularitics/angularitics-0.8.5-google-analytics.js b/portal/js/libs/angularitics/angularitics-0.8.5-google-analytics.js
new file mode 100644
index 0000000..4fae153
--- /dev/null
+++ b/portal/js/libs/angularitics/angularitics-0.8.5-google-analytics.js
@@ -0,0 +1,7 @@
+/**
+ * @license Angulartics v0.8.5
+ * (c) 2013 Luis Farzati http://luisfarzati.github.io/angulartics
+ * Universal Analytics update contributed by http://github.com/willmcclellan
+ * License: MIT
+ */
+!function(a){"use strict";a.module("angulartics.google.analytics",["angulartics"]).config(["$analyticsProvider",function(a){a.registerPageTrack(function(a){window._gaq&&_gaq.push(["_trackPageview",a]),window.ga&&ga("send","pageview",a)}),a.registerEventTrack(function(a,b){window._gaq&&_gaq.push(["_trackEvent",b.category,a,b.label,b.value]),window.ga&&ga("send","event",b.category,a,b.label,b.value)})}])}(angular);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angularitics/angularitics-0.8.5.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angularitics/angularitics-0.8.5.js b/portal/js/libs/angularitics/angularitics-0.8.5.js
new file mode 100644
index 0000000..8d9a350
--- /dev/null
+++ b/portal/js/libs/angularitics/angularitics-0.8.5.js
@@ -0,0 +1,6 @@
+/**
+ * @license Angulartics v0.8.5
+ * (c) 2013 Luis Farzati http://luisfarzati.github.io/angulartics
+ * License: MIT
+ */
+!function(a){"use strict";var b=window.angulartics||(window.angulartics={});b.waitForVendorApi=function(a,c,d){window.hasOwnProperty(a)?d(window[a]):setTimeout(function(){b.waitForVendorApi(a,c,d)},c)},a.module("angulartics",[]).provider("$analytics",function(){var b={pageTracking:{autoTrackFirstPage:!0,autoTrackVirtualPages:!0,basePath:"",bufferFlushDelay:1e3},eventTracking:{bufferFlushDelay:1e3}},c={pageviews:[],events:[]},d=function(a){c.pageviews.push(a)},e=function(a,b){c.events.push({name:a,properties:b})},f={settings:b,pageTrack:d,eventTrack:e},g=function(d){f.pageTrack=d,a.forEach(c.pageviews,function(a,c){setTimeout(function(){f.pageTrack(a)},c*b.pageTracking.bufferFlushDelay)})},h=function(d){f.eventTrack=d,a.forEach(c.events,function(a,c){setTimeout(function(){f.eventTrack(a.name,a.properties)},c*b.eventTracking.bufferFlushDelay)})};return{$get:function(){return f},settings:b,virtualPageviews:function(a){this.settings.pageTracking.autoTrackVirtualPages=a},firstPageview:fu
 nction(a){this.settings.pageTracking.autoTrackFirstPage=a},withBase:function(b){this.settings.pageTracking.basePath=b?a.element("base").attr("href"):""},registerPageTrack:g,registerEventTrack:h}}).run(["$rootScope","$location","$analytics",function(a,b,c){c.settings.pageTracking.autoTrackFirstPage&&c.pageTrack(b.absUrl()),c.settings.pageTracking.autoTrackVirtualPages&&a.$on("$routeChangeSuccess",function(a,d){if(!d||!(d.$$route||d).redirectTo){var e=c.settings.pageTracking.basePath+b.url();c.pageTrack(e)}})}]).directive("analyticsOn",["$analytics",function(b){function c(a){return["a:","button:","button:button","button:submit","input:button","input:submit"].indexOf(a.tagName.toLowerCase()+":"+(a.type||""))>=0}function d(a){return c(a)?"click":"click"}function e(a){return c(a)?a.innerText||a.value:a.id||a.name||a.tagName}function f(a){return"analytics"===a.substr(0,9)&&-1===["on","event"].indexOf(a.substr(10))}return{restrict:"A",scope:!1,link:function(c,g,h){var i=h.analyticsOn||d(g[
 0]),j=h.analyticsEvent||e(g[0]),k={};a.forEach(h.$attr,function(a,b){f(a)&&(k[b.slice(9).toLowerCase()]=h[b])}),a.element(g[0]).bind(i,function(){b.eventTrack(j,k)})}}}])}(angular);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/bootstrap/css/bootstrap-responsive.css
----------------------------------------------------------------------
diff --git a/portal/js/libs/bootstrap/css/bootstrap-responsive.css b/portal/js/libs/bootstrap/css/bootstrap-responsive.css
new file mode 100644
index 0000000..3a8cbce
--- /dev/null
+++ b/portal/js/libs/bootstrap/css/bootstrap-responsive.css
@@ -0,0 +1,1345 @@
+/*!
+ * Bootstrap Responsive v2.3.1
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */
+
+.clearfix {
+  *zoom: 1;
+}
+
+.clearfix:before,
+.clearfix:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.clearfix:after {
+  clear: both;
+}
+
+.hide-text {
+  font: 0/0 a;
+  color: transparent;
+  text-shadow: none;
+  background-color: transparent;
+  border: 0;
+}
+
+.input-block-level {
+  display: block;
+  width: 100%;
+  min-height: 30px;
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+}
+
+@-ms-viewport {
+  width: device-width;
+}
+
+.hidden {
+  display: none;
+  visibility: hidden;
+}
+
+.visible-phone {
+  display: none !important;
+}
+
+.visible-tablet {
+  display: none !important;
+}
+
+.hidden-desktop {
+  display: none !important;
+}
+
+.visible-desktop {
+  display: inherit !important;
+}
+
+@media (min-width: 768px) and (max-width: 979px) {
+  .hidden-desktop {
+    display: inherit !important;
+  }
+
+  .visible-desktop {
+    display: none !important;
+  }
+
+  .visible-tablet {
+    display: inherit !important;
+  }
+
+  .hidden-tablet {
+    display: none !important;
+  }
+}
+
+@media (max-width: 767px) {
+  .hidden-desktop {
+    display: inherit !important;
+  }
+
+  .visible-desktop {
+    display: none !important;
+  }
+
+  .visible-phone {
+    display: inherit !important;
+  }
+
+  .hidden-phone {
+    display: none !important;
+  }
+}
+
+.visible-print {
+  display: none !important;
+}
+
+@media print {
+  .visible-print {
+    display: inherit !important;
+  }
+
+  .hidden-print {
+    display: none !important;
+  }
+}
+
+@media (min-width: 1200px) {
+  .row {
+    margin-left: -30px;
+    *zoom: 1;
+  }
+
+  .row:before,
+  .row:after {
+    display: table;
+    line-height: 0;
+    content: "";
+  }
+
+  .row:after {
+    clear: both;
+  }
+
+  [class*="span"] {
+    float: left;
+    min-height: 1px;
+    margin-left: 30px;
+  }
+
+  .container,
+  .navbar-static-top .container,
+  .navbar-fixed-top .container,
+  .navbar-fixed-bottom .container {
+    width: 1170px;
+  }
+
+  .span12 {
+    width: 1170px;
+  }
+
+  .span11 {
+    width: 1070px;
+  }
+
+  .span10 {
+    width: 970px;
+  }
+
+  .span9 {
+    width: 870px;
+  }
+
+  .span8 {
+    width: 770px;
+  }
+
+  .span7 {
+    width: 670px;
+  }
+
+  .span6 {
+    width: 570px;
+  }
+
+  .span5 {
+    width: 470px;
+  }
+
+  .span4 {
+    width: 370px;
+  }
+
+  .span3 {
+    width: 270px;
+  }
+
+  .span2 {
+    width: 170px;
+  }
+
+  .span1 {
+    width: 70px;
+  }
+
+  .offset12 {
+    margin-left: 1230px;
+  }
+
+  .offset11 {
+    margin-left: 1130px;
+  }
+
+  .offset10 {
+    margin-left: 1030px;
+  }
+
+  .offset9 {
+    margin-left: 930px;
+  }
+
+  .offset8 {
+    margin-left: 830px;
+  }
+
+  .offset7 {
+    margin-left: 730px;
+  }
+
+  .offset6 {
+    margin-left: 630px;
+  }
+
+  .offset5 {
+    margin-left: 530px;
+  }
+
+  .offset4 {
+    margin-left: 430px;
+  }
+
+  .offset3 {
+    margin-left: 330px;
+  }
+
+  .offset2 {
+    margin-left: 230px;
+  }
+
+  .offset1 {
+    margin-left: 130px;
+  }
+
+  .row-fluid {
+    width: 100%;
+    *zoom: 1;
+  }
+
+  .row-fluid:before,
+  .row-fluid:after {
+    display: table;
+    line-height: 0;
+    content: "";
+  }
+
+  .row-fluid:after {
+    clear: both;
+  }
+
+  .row-fluid [class*="span"] {
+    display: block;
+    float: left;
+    width: 100%;
+    min-height: 30px;
+    margin-left: 2.564102564102564%;
+    *margin-left: 2.5109110747408616%;
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+  }
+
+  .row-fluid [class*="span"]:first-child {
+    margin-left: 0;
+  }
+
+  .row-fluid .controls-row [class*="span"] + [class*="span"] {
+    margin-left: 2.564102564102564%;
+  }
+
+  .row-fluid .span12 {
+    width: 100%;
+    *width: 99.94680851063829%;
+  }
+
+  .row-fluid .span11 {
+    width: 91.45299145299145%;
+    *width: 91.39979996362975%;
+  }
+
+  .row-fluid .span10 {
+    width: 82.90598290598291%;
+    *width: 82.8527914166212%;
+  }
+
+  .row-fluid .span9 {
+    width: 74.35897435897436%;
+    *width: 74.30578286961266%;
+  }
+
+  .row-fluid .span8 {
+    width: 65.81196581196582%;
+    *width: 65.75877432260411%;
+  }
+
+  .row-fluid .span7 {
+    width: 57.26495726495726%;
+    *width: 57.21176577559556%;
+  }
+
+  .row-fluid .span6 {
+    width: 48.717948717948715%;
+    *width: 48.664757228587014%;
+  }
+
+  .row-fluid .span5 {
+    width: 40.17094017094017%;
+    *width: 40.11774868157847%;
+  }
+
+  .row-fluid .span4 {
+    width: 31.623931623931625%;
+    *width: 31.570740134569924%;
+  }
+
+  .row-fluid .span3 {
+    width: 23.076923076923077%;
+    *width: 23.023731587561375%;
+  }
+
+  .row-fluid .span2 {
+    width: 14.52991452991453%;
+    *width: 14.476723040552828%;
+  }
+
+  .row-fluid .span1 {
+    width: 5.982905982905983%;
+    *width: 5.929714493544281%;
+  }
+
+  .row-fluid .offset12 {
+    margin-left: 105.12820512820512%;
+    *margin-left: 105.02182214948171%;
+  }
+
+  .row-fluid .offset12:first-child {
+    margin-left: 102.56410256410257%;
+    *margin-left: 102.45771958537915%;
+  }
+
+  .row-fluid .offset11 {
+    margin-left: 96.58119658119658%;
+    *margin-left: 96.47481360247316%;
+  }
+
+  .row-fluid .offset11:first-child {
+    margin-left: 94.01709401709402%;
+    *margin-left: 93.91071103837061%;
+  }
+
+  .row-fluid .offset10 {
+    margin-left: 88.03418803418803%;
+    *margin-left: 87.92780505546462%;
+  }
+
+  .row-fluid .offset10:first-child {
+    margin-left: 85.47008547008548%;
+    *margin-left: 85.36370249136206%;
+  }
+
+  .row-fluid .offset9 {
+    margin-left: 79.48717948717949%;
+    *margin-left: 79.38079650845607%;
+  }
+
+  .row-fluid .offset9:first-child {
+    margin-left: 76.92307692307693%;
+    *margin-left: 76.81669394435352%;
+  }
+
+  .row-fluid .offset8 {
+    margin-left: 70.94017094017094%;
+    *margin-left: 70.83378796144753%;
+  }
+
+  .row-fluid .offset8:first-child {
+    margin-left: 68.37606837606839%;
+    *margin-left: 68.26968539734497%;
+  }
+
+  .row-fluid .offset7 {
+    margin-left: 62.393162393162385%;
+    *margin-left: 62.28677941443899%;
+  }
+
+  .row-fluid .offset7:first-child {
+    margin-left: 59.82905982905982%;
+    *margin-left: 59.72267685033642%;
+  }
+
+  .row-fluid .offset6 {
+    margin-left: 53.84615384615384%;
+    *margin-left: 53.739770867430444%;
+  }
+
+  .row-fluid .offset6:first-child {
+    margin-left: 51.28205128205128%;
+    *margin-left: 51.175668303327875%;
+  }
+
+  .row-fluid .offset5 {
+    margin-left: 45.299145299145295%;
+    *margin-left: 45.1927623204219%;
+  }
+
+  .row-fluid .offset5:first-child {
+    margin-left: 42.73504273504273%;
+    *margin-left: 42.62865975631933%;
+  }
+
+  .row-fluid .offset4 {
+    margin-left: 36.75213675213675%;
+    *margin-left: 36.645753773413354%;
+  }
+
+  .row-fluid .offset4:first-child {
+    margin-left: 34.18803418803419%;
+    *margin-left: 34.081651209310785%;
+  }
+
+  .row-fluid .offset3 {
+    margin-left: 28.205128205128204%;
+    *margin-left: 28.0987452264048%;
+  }
+
+  .row-fluid .offset3:first-child {
+    margin-left: 25.641025641025642%;
+    *margin-left: 25.53464266230224%;
+  }
+
+  .row-fluid .offset2 {
+    margin-left: 19.65811965811966%;
+    *margin-left: 19.551736679396257%;
+  }
+
+  .row-fluid .offset2:first-child {
+    margin-left: 17.094017094017094%;
+    *margin-left: 16.98763411529369%;
+  }
+
+  .row-fluid .offset1 {
+    margin-left: 11.11111111111111%;
+    *margin-left: 11.004728132387708%;
+  }
+
+  .row-fluid .offset1:first-child {
+    margin-left: 8.547008547008547%;
+    *margin-left: 8.440625568285142%;
+  }
+
+  input,
+  textarea,
+  .uneditable-input {
+    margin-left: 0;
+  }
+
+  .controls-row [class*="span"] + [class*="span"] {
+    margin-left: 30px;
+  }
+
+  input.span12,
+  textarea.span12,
+  .uneditable-input.span12 {
+    width: 1156px;
+  }
+
+  input.span11,
+  textarea.span11,
+  .uneditable-input.span11 {
+    width: 1056px;
+  }
+
+  input.span10,
+  textarea.span10,
+  .uneditable-input.span10 {
+    width: 956px;
+  }
+
+  input.span9,
+  textarea.span9,
+  .uneditable-input.span9 {
+    width: 856px;
+  }
+
+  input.span8,
+  textarea.span8,
+  .uneditable-input.span8 {
+    width: 756px;
+  }
+
+  input.span7,
+  textarea.span7,
+  .uneditable-input.span7 {
+    width: 656px;
+  }
+
+  input.span6,
+  textarea.span6,
+  .uneditable-input.span6 {
+    width: 556px;
+  }
+
+  input.span5,
+  textarea.span5,
+  .uneditable-input.span5 {
+    width: 456px;
+  }
+
+  input.span4,
+  textarea.span4,
+  .uneditable-input.span4 {
+    width: 356px;
+  }
+
+  input.span3,
+  textarea.span3,
+  .uneditable-input.span3 {
+    width: 256px;
+  }
+
+  input.span2,
+  textarea.span2,
+  .uneditable-input.span2 {
+    width: 156px;
+  }
+
+  input.span1,
+  textarea.span1,
+  .uneditable-input.span1 {
+    width: 56px;
+  }
+
+  .thumbnails {
+    margin-left: -30px;
+  }
+
+  .thumbnails > li {
+    margin-left: 30px;
+  }
+
+  .row-fluid .thumbnails {
+    margin-left: 0;
+  }
+}
+
+@media (min-width: 768px) and (max-width: 979px) {
+  .row {
+    margin-left: -20px;
+    *zoom: 1;
+  }
+
+  .row:before,
+  .row:after {
+    display: table;
+    line-height: 0;
+    content: "";
+  }
+
+  .row:after {
+    clear: both;
+  }
+
+  [class*="span"] {
+    float: left;
+    min-height: 1px;
+    margin-left: 20px;
+  }
+
+  .container,
+  .navbar-static-top .container,
+  .navbar-fixed-top .container,
+  .navbar-fixed-bottom .container {
+    width: 724px;
+  }
+
+  .span12 {
+    width: 724px;
+  }
+
+  .span11 {
+    width: 662px;
+  }
+
+  .span10 {
+    width: 600px;
+  }
+
+  .span9 {
+    width: 538px;
+  }
+
+  .span8 {
+    width: 476px;
+  }
+
+  .span7 {
+    width: 414px;
+  }
+
+  .span6 {
+    width: 352px;
+  }
+
+  .span5 {
+    width: 290px;
+  }
+
+  .span4 {
+    width: 228px;
+  }
+
+  .span3 {
+    width: 166px;
+  }
+
+  .span2 {
+    width: 104px;
+  }
+
+  .span1 {
+    width: 42px;
+  }
+
+  .offset12 {
+    margin-left: 764px;
+  }
+
+  .offset11 {
+    margin-left: 702px;
+  }
+
+  .offset10 {
+    margin-left: 640px;
+  }
+
+  .offset9 {
+    margin-left: 578px;
+  }
+
+  .offset8 {
+    margin-left: 516px;
+  }
+
+  .offset7 {
+    margin-left: 454px;
+  }
+
+  .offset6 {
+    margin-left: 392px;
+  }
+
+  .offset5 {
+    margin-left: 330px;
+  }
+
+  .offset4 {
+    margin-left: 268px;
+  }
+
+  .offset3 {
+    margin-left: 206px;
+  }
+
+  .offset2 {
+    margin-left: 144px;
+  }
+
+  .offset1 {
+    margin-left: 82px;
+  }
+
+  .row-fluid {
+    width: 100%;
+    *zoom: 1;
+  }
+
+  .row-fluid:before,
+  .row-fluid:after {
+    display: table;
+    line-height: 0;
+    content: "";
+  }
+
+  .row-fluid:after {
+    clear: both;
+  }
+
+  .row-fluid [class*="span"] {
+    display: block;
+    float: left;
+    width: 100%;
+    min-height: 30px;
+    margin-left: 2.7624309392265194%;
+    *margin-left: 2.709239449864817%;
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+  }
+
+  .row-fluid [class*="span"]:first-child {
+    margin-left: 0;
+  }
+
+  .row-fluid .controls-row [class*="span"] + [class*="span"] {
+    margin-left: 2.7624309392265194%;
+  }
+
+  .row-fluid .span12 {
+    width: 100%;
+    *width: 99.94680851063829%;
+  }
+
+  .row-fluid .span11 {
+    width: 91.43646408839778%;
+    *width: 91.38327259903608%;
+  }
+
+  .row-fluid .span10 {
+    width: 82.87292817679558%;
+    *width: 82.81973668743387%;
+  }
+
+  .row-fluid .span9 {
+    width: 74.30939226519337%;
+    *width: 74.25620077583166%;
+  }
+
+  .row-fluid .span8 {
+    width: 65.74585635359117%;
+    *width: 65.69266486422946%;
+  }
+
+  .row-fluid .span7 {
+    width: 57.18232044198895%;
+    *width: 57.12912895262725%;
+  }
+
+  .row-fluid .span6 {
+    width: 48.61878453038674%;
+    *width: 48.56559304102504%;
+  }
+
+  .row-fluid .span5 {
+    width: 40.05524861878453%;
+    *width: 40.00205712942283%;
+  }
+
+  .row-fluid .span4 {
+    width: 31.491712707182323%;
+    *width: 31.43852121782062%;
+  }
+
+  .row-fluid .span3 {
+    width: 22.92817679558011%;
+    *width: 22.87498530621841%;
+  }
+
+  .row-fluid .span2 {
+    width: 14.3646408839779%;
+    *width: 14.311449394616199%;
+  }
+
+  .row-fluid .span1 {
+    width: 5.801104972375691%;
+    *width: 5.747913483013988%;
+  }
+
+  .row-fluid .offset12 {
+    margin-left: 105.52486187845304%;
+    *margin-left: 105.41847889972962%;
+  }
+
+  .row-fluid .offset12:first-child {
+    margin-left: 102.76243093922652%;
+    *margin-left: 102.6560479605031%;
+  }
+
+  .row-fluid .offset11 {
+    margin-left: 96.96132596685082%;
+    *margin-left: 96.8549429881274%;
+  }
+
+  .row-fluid .offset11:first-child {
+    margin-left: 94.1988950276243%;
+    *margin-left: 94.09251204890089%;
+  }
+
+  .row-fluid .offset10 {
+    margin-left: 88.39779005524862%;
+    *margin-left: 88.2914070765252%;
+  }
+
+  .row-fluid .offset10:first-child {
+    margin-left: 85.6353591160221%;
+    *margin-left: 85.52897613729868%;
+  }
+
+  .row-fluid .offset9 {
+    margin-left: 79.8342541436464%;
+    *margin-left: 79.72787116492299%;
+  }
+
+  .row-fluid .offset9:first-child {
+    margin-left: 77.07182320441989%;
+    *margin-left: 76.96544022569647%;
+  }
+
+  .row-fluid .offset8 {
+    margin-left: 71.2707182320442%;
+    *margin-left: 71.16433525332079%;
+  }
+
+  .row-fluid .offset8:first-child {
+    margin-left: 68.50828729281768%;
+    *margin-left: 68.40190431409427%;
+  }
+
+  .row-fluid .offset7 {
+    margin-left: 62.70718232044199%;
+    *margin-left: 62.600799341718584%;
+  }
+
+  .row-fluid .offset7:first-child {
+    margin-left: 59.94475138121547%;
+    *margin-left: 59.838368402492065%;
+  }
+
+  .row-fluid .offset6 {
+    margin-left: 54.14364640883978%;
+    *margin-left: 54.037263430116376%;
+  }
+
+  .row-fluid .offset6:first-child {
+    margin-left: 51.38121546961326%;
+    *margin-left: 51.27483249088986%;
+  }
+
+  .row-fluid .offset5 {
+    margin-left: 45.58011049723757%;
+    *margin-left: 45.47372751851417%;
+  }
+
+  .row-fluid .offset5:first-child {
+    margin-left: 42.81767955801105%;
+    *margin-left: 42.71129657928765%;
+  }
+
+  .row-fluid .offset4 {
+    margin-left: 37.01657458563536%;
+    *margin-left: 36.91019160691196%;
+  }
+
+  .row-fluid .offset4:first-child {
+    margin-left: 34.25414364640884%;
+    *margin-left: 34.14776066768544%;
+  }
+
+  .row-fluid .offset3 {
+    margin-left: 28.45303867403315%;
+    *margin-left: 28.346655695309746%;
+  }
+
+  .row-fluid .offset3:first-child {
+    margin-left: 25.69060773480663%;
+    *margin-left: 25.584224756083227%;
+  }
+
+  .row-fluid .offset2 {
+    margin-left: 19.88950276243094%;
+    *margin-left: 19.783119783707537%;
+  }
+
+  .row-fluid .offset2:first-child {
+    margin-left: 17.12707182320442%;
+    *margin-left: 17.02068884448102%;
+  }
+
+  .row-fluid .offset1 {
+    margin-left: 11.32596685082873%;
+    *margin-left: 11.219583872105325%;
+  }
+
+  .row-fluid .offset1:first-child {
+    margin-left: 8.56353591160221%;
+    *margin-left: 8.457152932878806%;
+  }
+
+  input,
+  textarea,
+  .uneditable-input {
+    margin-left: 0;
+  }
+
+  .controls-row [class*="span"] + [class*="span"] {
+    margin-left: 20px;
+  }
+
+  input.span12,
+  textarea.span12,
+  .uneditable-input.span12 {
+    width: 710px;
+  }
+
+  input.span11,
+  textarea.span11,
+  .uneditable-input.span11 {
+    width: 648px;
+  }
+
+  input.span10,
+  textarea.span10,
+  .uneditable-input.span10 {
+    width: 586px;
+  }
+
+  input.span9,
+  textarea.span9,
+  .uneditable-input.span9 {
+    width: 524px;
+  }
+
+  input.span8,
+  textarea.span8,
+  .uneditable-input.span8 {
+    width: 462px;
+  }
+
+  input.span7,
+  textarea.span7,
+  .uneditable-input.span7 {
+    width: 400px;
+  }
+
+  input.span6,
+  textarea.span6,
+  .uneditable-input.span6 {
+    width: 338px;
+  }
+
+  input.span5,
+  textarea.span5,
+  .uneditable-input.span5 {
+    width: 276px;
+  }
+
+  input.span4,
+  textarea.span4,
+  .uneditable-input.span4 {
+    width: 214px;
+  }
+
+  input.span3,
+  textarea.span3,
+  .uneditable-input.span3 {
+    width: 152px;
+  }
+
+  input.span2,
+  textarea.span2,
+  .uneditable-input.span2 {
+    width: 90px;
+  }
+
+  input.span1,
+  textarea.span1,
+  .uneditable-input.span1 {
+    width: 28px;
+  }
+}
+
+@media (max-width: 767px) {
+  body {
+    padding-right: 20px;
+    padding-left: 20px;
+  }
+
+  .navbar-fixed-top,
+  .navbar-fixed-bottom,
+  .navbar-static-top {
+    margin-right: -20px;
+    margin-left: -20px;
+  }
+
+  .container-fluid {
+    padding: 0;
+  }
+
+  .dl-horizontal dt {
+    float: none;
+    width: auto;
+    clear: none;
+    text-align: left;
+  }
+
+  .dl-horizontal dd {
+    margin-left: 0;
+  }
+
+  .container {
+    width: auto;
+  }
+
+  .row-fluid {
+    width: 100%;
+  }
+
+  .row,
+  .thumbnails {
+    margin-left: 0;
+  }
+
+  .thumbnails > li {
+    float: none;
+    margin-left: 0;
+  }
+
+  [class*="span"],
+  .uneditable-input[class*="span"],
+  .row-fluid [class*="span"] {
+    display: block;
+    float: none;
+    width: 100%;
+    margin-left: 0;
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+  }
+
+  .span12,
+  .row-fluid .span12 {
+    width: 100%;
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+  }
+
+  .row-fluid [class*="offset"]:first-child {
+    margin-left: 0;
+  }
+
+  .input-large,
+  .input-xlarge,
+  .input-xxlarge,
+  input[class*="span"],
+  select[class*="span"],
+  textarea[class*="span"],
+  .uneditable-input {
+    display: block;
+    width: 100%;
+    min-height: 30px;
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+  }
+
+  .input-prepend input,
+  .input-append input,
+  .input-prepend input[class*="span"],
+  .input-append input[class*="span"] {
+    display: inline-block;
+    width: auto;
+  }
+
+  .controls-row [class*="span"] + [class*="span"] {
+    margin-left: 0;
+  }
+
+  .modal {
+    position: fixed;
+    top: 20px;
+    right: 20px;
+    left: 20px;
+    width: auto;
+    margin: 0;
+  }
+
+  .modal.fade {
+    top: -100px;
+  }
+
+  .modal.fade.in {
+    top: 20px;
+  }
+}
+
+@media (max-width: 480px) {
+  .nav-collapse {
+    -webkit-transform: translate3d(0, 0, 0);
+  }
+
+  .page-header h1 small {
+    display: block;
+    line-height: 20px;
+  }
+
+  input[type="checkbox"],
+  input[type="radio"] {
+    border: 1px solid #ccc;
+  }
+
+  .form-horizontal .control-label {
+    float: none;
+    width: auto;
+    padding-top: 0;
+    text-align: left;
+  }
+
+  .form-horizontal .controls {
+    margin-left: 0;
+  }
+
+  .form-horizontal .control-list {
+    padding-top: 0;
+  }
+
+  .form-horizontal .form-actions {
+    padding-right: 10px;
+    padding-left: 10px;
+  }
+
+  .media .pull-left,
+  .media .pull-right {
+    display: block;
+    float: none;
+    margin-bottom: 10px;
+  }
+
+  .media-object {
+    margin-right: 0;
+    margin-left: 0;
+  }
+
+  .modal {
+    top: 10px;
+    right: 10px;
+    left: 10px;
+  }
+
+  .modal-header .close {
+    padding: 10px;
+    margin: -10px;
+  }
+
+  .carousel-caption {
+    position: static;
+  }
+}
+
+@media (max-width: 979px) {
+  body {
+    padding-top: 0;
+  }
+
+  .navbar-fixed-top,
+  .navbar-fixed-bottom {
+    position: static;
+  }
+
+  .navbar-fixed-top {
+    margin-bottom: 20px;
+  }
+
+  .navbar-fixed-bottom {
+    margin-top: 20px;
+  }
+
+  .navbar-fixed-top .navbar-inner,
+  .navbar-fixed-bottom .navbar-inner {
+    padding: 5px;
+  }
+
+  .navbar .container {
+    width: auto;
+    padding: 0;
+  }
+
+  .navbar .brand {
+    padding-right: 10px;
+    padding-left: 10px;
+    margin: 0 0 0 -5px;
+  }
+
+  .nav-collapse {
+    clear: both;
+  }
+
+  .nav-collapse .nav {
+    float: none;
+    margin: 0 0 10px;
+  }
+
+  .nav-collapse .nav > li {
+    float: none;
+  }
+
+  .nav-collapse .nav > li > a {
+    margin-bottom: 2px;
+  }
+
+  .nav-collapse .nav > .divider-vertical {
+    display: none;
+  }
+
+  .nav-collapse .nav .nav-header {
+    color: #777777;
+    text-shadow: none;
+  }
+
+  .nav-collapse .nav > li > a,
+  .nav-collapse .dropdown-menu a {
+    padding: 9px 15px;
+    font-weight: bold;
+    color: #777777;
+    -webkit-border-radius: 3px;
+    -moz-border-radius: 3px;
+    border-radius: 3px;
+  }
+
+  .nav-collapse .btn {
+    padding: 4px 10px 4px;
+    font-weight: normal;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+  }
+
+  .nav-collapse .dropdown-menu li + li a {
+    margin-bottom: 2px;
+  }
+
+  .nav-collapse .nav > li > a:hover,
+  .nav-collapse .nav > li > a:focus,
+  .nav-collapse .dropdown-menu a:hover,
+  .nav-collapse .dropdown-menu a:focus {
+    background-color: #f2f2f2;
+  }
+
+  .navbar-inverse .nav-collapse .nav > li > a,
+  .navbar-inverse .nav-collapse .dropdown-menu a {
+    color: #999999;
+  }
+
+  .navbar-inverse .nav-collapse .nav > li > a:hover,
+  .navbar-inverse .nav-collapse .nav > li > a:focus,
+  .navbar-inverse .nav-collapse .dropdown-menu a:hover,
+  .navbar-inverse .nav-collapse .dropdown-menu a:focus {
+    background-color: #111111;
+  }
+
+  .nav-collapse.in .btn-group {
+    padding: 0;
+    margin-top: 5px;
+  }
+
+  .nav-collapse .dropdown-menu {
+    position: static;
+    top: auto;
+    left: auto;
+    display: none;
+    float: none;
+    max-width: none;
+    padding: 0;
+    margin: 0 15px;
+    background-color: transparent;
+    border: none;
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+    -webkit-box-shadow: none;
+    -moz-box-shadow: none;
+    box-shadow: none;
+  }
+
+  .nav-collapse .open > .dropdown-menu {
+    display: block;
+  }
+
+  .nav-collapse .dropdown-menu:before,
+  .nav-collapse .dropdown-menu:after {
+    display: none;
+  }
+
+  .nav-collapse .dropdown-menu .divider {
+    display: none;
+  }
+
+  .nav-collapse .nav > li > .dropdown-menu:before,
+  .nav-collapse .nav > li > .dropdown-menu:after {
+    display: none;
+  }
+
+  .nav-collapse .navbar-form,
+  .nav-collapse .navbar-search {
+    float: none;
+    padding: 10px 15px;
+    margin: 10px 0;
+    border-top: 1px solid #f2f2f2;
+    border-bottom: 1px solid #f2f2f2;
+    -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
+    -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
+    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
+  }
+
+  .navbar-inverse .nav-collapse .navbar-form,
+  .navbar-inverse .nav-collapse .navbar-search {
+    border-top-color: #111111;
+    border-bottom-color: #111111;
+  }
+
+  .navbar .nav-collapse .nav.pull-right {
+    float: none;
+    margin-left: 0;
+  }
+
+  .nav-collapse,
+  .nav-collapse.collapse {
+    height: 0;
+    overflow: hidden;
+  }
+
+  .navbar .btn-navbar {
+    display: block;
+  }
+
+  .navbar-static .navbar-inner {
+    padding-right: 10px;
+    padding-left: 10px;
+  }
+}
+
+@media (min-width: 980px) {
+  .nav-collapse.collapse {
+    height: auto !important;
+    overflow: visible !important;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/bootstrap/css/bootstrap-responsive.min.css
----------------------------------------------------------------------
diff --git a/portal/js/libs/bootstrap/css/bootstrap-responsive.min.css b/portal/js/libs/bootstrap/css/bootstrap-responsive.min.css
new file mode 100644
index 0000000..5971f3c
--- /dev/null
+++ b/portal/js/libs/bootstrap/css/bootstrap-responsive.min.css
@@ -0,0 +1,1245 @@
+/*!
+ * Bootstrap Responsive v2.3.1
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */
+.clearfix {
+  *zoom: 1
+}
+
+.clearfix:before, .clearfix:after {
+  display: table;
+  line-height: 0;
+  content: ""
+}
+
+.clearfix:after {
+  clear: both
+}
+
+.hide-text {
+  font: 0/0 a;
+  color: transparent;
+  text-shadow: none;
+  background-color: transparent;
+  border: 0
+}
+
+.input-block-level {
+  display: block;
+  width: 100%;
+  min-height: 30px;
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box
+}
+
+@-ms-viewport{width:device-width} .hidden {
+                                    display: none;
+                                    visibility: hidden
+                                  }
+
+.visible-phone {
+  display: none !important
+}
+
+.visible-tablet {
+  display: none !important
+}
+
+.hidden-desktop {
+  display: none !important
+}
+
+.visible-desktop {
+  display: inherit !important
+}
+
+@media (min-width:768px) and (max-width:979px) {
+  .hidden-desktop {
+    display: inherit !important
+  }
+
+  .visible-desktop {
+    display: none !important
+  }
+
+  .visible-tablet {
+    display: inherit !important
+  }
+
+  .hidden-tablet {
+    display: none !important
+  }
+}
+
+@media (max-width:767px) {
+  .hidden-desktop {
+    display: inherit !important
+  }
+
+  .visible-desktop {
+    display: none !important
+  }
+
+  .visible-phone {
+    display: inherit !important
+  }
+
+  .hidden-phone {
+    display: none !important
+  }
+}
+
+.visible-print {
+  display: none !important
+}
+
+@media print {
+  .visible-print {
+    display: inherit !important
+  }
+
+  .hidden-print {
+    display: none !important
+  }
+}
+
+@media (min-width:1200px) {
+  .row {
+    margin-left: -30px;
+    *zoom: 1
+  }
+
+  .row:before, .row:after {
+    display: table;
+    line-height: 0;
+    content: ""
+  }
+
+  .row:after {
+    clear: both
+  }
+
+  [class*="span"] {
+    float: left;
+    min-height: 1px;
+    margin-left: 30px
+  }
+
+  .container, .navbar-static-top .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container {
+    width: 1170px
+  }
+
+  .span12 {
+    width: 1170px
+  }
+
+  .span11 {
+    width: 1070px
+  }
+
+  .span10 {
+    width: 970px
+  }
+
+  .span9 {
+    width: 870px
+  }
+
+  .span8 {
+    width: 770px
+  }
+
+  .span7 {
+    width: 670px
+  }
+
+  .span6 {
+    width: 570px
+  }
+
+  .span5 {
+    width: 470px
+  }
+
+  .span4 {
+    width: 370px
+  }
+
+  .span3 {
+    width: 270px
+  }
+
+  .span2 {
+    width: 170px
+  }
+
+  .span1 {
+    width: 70px
+  }
+
+  .offset12 {
+    margin-left: 1230px
+  }
+
+  .offset11 {
+    margin-left: 1130px
+  }
+
+  .offset10 {
+    margin-left: 1030px
+  }
+
+  .offset9 {
+    margin-left: 930px
+  }
+
+  .offset8 {
+    margin-left: 830px
+  }
+
+  .offset7 {
+    margin-left: 730px
+  }
+
+  .offset6 {
+    margin-left: 630px
+  }
+
+  .offset5 {
+    margin-left: 530px
+  }
+
+  .offset4 {
+    margin-left: 430px
+  }
+
+  .offset3 {
+    margin-left: 330px
+  }
+
+  .offset2 {
+    margin-left: 230px
+  }
+
+  .offset1 {
+    margin-left: 130px
+  }
+
+  .row-fluid {
+    width: 100%;
+    *zoom: 1
+  }
+
+  .row-fluid:before, .row-fluid:after {
+    display: table;
+    line-height: 0;
+    content: ""
+  }
+
+  .row-fluid:after {
+    clear: both
+  }
+
+  .row-fluid [class*="span"] {
+    display: block;
+    float: left;
+    width: 100%;
+    min-height: 30px;
+    margin-left: 2.564102564102564%;
+    *margin-left: 2.5109110747408616%;
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box
+  }
+
+  .row-fluid [class*="span"]:first-child {
+    margin-left: 0
+  }
+
+  .row-fluid .controls-row [class*="span"]+[class*="span"] {
+    margin-left: 2.564102564102564%
+  }
+
+  .row-fluid .span12 {
+    width: 100%;
+    *width: 99.94680851063829%
+  }
+
+  .row-fluid .span11 {
+    width: 91.45299145299145%;
+    *width: 91.39979996362975%
+  }
+
+  .row-fluid .span10 {
+    width: 82.90598290598291%;
+    *width: 82.8527914166212%
+  }
+
+  .row-fluid .span9 {
+    width: 74.35897435897436%;
+    *width: 74.30578286961266%
+  }
+
+  .row-fluid .span8 {
+    width: 65.81196581196582%;
+    *width: 65.75877432260411%
+  }
+
+  .row-fluid .span7 {
+    width: 57.26495726495726%;
+    *width: 57.21176577559556%
+  }
+
+  .row-fluid .span6 {
+    width: 48.717948717948715%;
+    *width: 48.664757228587014%
+  }
+
+  .row-fluid .span5 {
+    width: 40.17094017094017%;
+    *width: 40.11774868157847%
+  }
+
+  .row-fluid .span4 {
+    width: 31.623931623931625%;
+    *width: 31.570740134569924%
+  }
+
+  .row-fluid .span3 {
+    width: 23.076923076923077%;
+    *width: 23.023731587561375%
+  }
+
+  .row-fluid .span2 {
+    width: 14.52991452991453%;
+    *width: 14.476723040552828%
+  }
+
+  .row-fluid .span1 {
+    width: 5.982905982905983%;
+    *width: 5.929714493544281%
+  }
+
+  .row-fluid .offset12 {
+    margin-left: 105.12820512820512%;
+    *margin-left: 105.02182214948171%
+  }
+
+  .row-fluid .offset12:first-child {
+    margin-left: 102.56410256410257%;
+    *margin-left: 102.45771958537915%
+  }
+
+  .row-fluid .offset11 {
+    margin-left: 96.58119658119658%;
+    *margin-left: 96.47481360247316%
+  }
+
+  .row-fluid .offset11:first-child {
+    margin-left: 94.01709401709402%;
+    *margin-left: 93.91071103837061%
+  }
+
+  .row-fluid .offset10 {
+    margin-left: 88.03418803418803%;
+    *margin-left: 87.92780505546462%
+  }
+
+  .row-fluid .offset10:first-child {
+    margin-left: 85.47008547008548%;
+    *margin-left: 85.36370249136206%
+  }
+
+  .row-fluid .offset9 {
+    margin-left: 79.48717948717949%;
+    *margin-left: 79.38079650845607%
+  }
+
+  .row-fluid .offset9:first-child {
+    margin-left: 76.92307692307693%;
+    *margin-left: 76.81669394435352%
+  }
+
+  .row-fluid .offset8 {
+    margin-left: 70.94017094017094%;
+    *margin-left: 70.83378796144753%
+  }
+
+  .row-fluid .offset8:first-child {
+    margin-left: 68.37606837606839%;
+    *margin-left: 68.26968539734497%
+  }
+
+  .row-fluid .offset7 {
+    margin-left: 62.393162393162385%;
+    *margin-left: 62.28677941443899%
+  }
+
+  .row-fluid .offset7:first-child {
+    margin-left: 59.82905982905982%;
+    *margin-left: 59.72267685033642%
+  }
+
+  .row-fluid .offset6 {
+    margin-left: 53.84615384615384%;
+    *margin-left: 53.739770867430444%
+  }
+
+  .row-fluid .offset6:first-child {
+    margin-left: 51.28205128205128%;
+    *margin-left: 51.175668303327875%
+  }
+
+  .row-fluid .offset5 {
+    margin-left: 45.299145299145295%;
+    *margin-left: 45.1927623204219%
+  }
+
+  .row-fluid .offset5:first-child {
+    margin-left: 42.73504273504273%;
+    *margin-left: 42.62865975631933%
+  }
+
+  .row-fluid .offset4 {
+    margin-left: 36.75213675213675%;
+    *margin-left: 36.645753773413354%
+  }
+
+  .row-fluid .offset4:first-child {
+    margin-left: 34.18803418803419%;
+    *margin-left: 34.081651209310785%
+  }
+
+  .row-fluid .offset3 {
+    margin-left: 28.205128205128204%;
+    *margin-left: 28.0987452264048%
+  }
+
+  .row-fluid .offset3:first-child {
+    margin-left: 25.641025641025642%;
+    *margin-left: 25.53464266230224%
+  }
+
+  .row-fluid .offset2 {
+    margin-left: 19.65811965811966%;
+    *margin-left: 19.551736679396257%
+  }
+
+  .row-fluid .offset2:first-child {
+    margin-left: 17.094017094017094%;
+    *margin-left: 16.98763411529369%
+  }
+
+  .row-fluid .offset1 {
+    margin-left: 11.11111111111111%;
+    *margin-left: 11.004728132387708%
+  }
+
+  .row-fluid .offset1:first-child {
+    margin-left: 8.547008547008547%;
+    *margin-left: 8.440625568285142%
+  }
+
+  input, textarea, .uneditable-input {
+    margin-left: 0
+  }
+
+  .controls-row [class*="span"]+[class*="span"] {
+    margin-left: 30px
+  }
+
+  input.span12, textarea.span12, .uneditable-input.span12 {
+    width: 1156px
+  }
+
+  input.span11, textarea.span11, .uneditable-input.span11 {
+    width: 1056px
+  }
+
+  input.span10, textarea.span10, .uneditable-input.span10 {
+    width: 956px
+  }
+
+  input.span9, textarea.span9, .uneditable-input.span9 {
+    width: 856px
+  }
+
+  input.span8, textarea.span8, .uneditable-input.span8 {
+    width: 756px
+  }
+
+  input.span7, textarea.span7, .uneditable-input.span7 {
+    width: 656px
+  }
+
+  input.span6, textarea.span6, .uneditable-input.span6 {
+    width: 556px
+  }
+
+  input.span5, textarea.span5, .uneditable-input.span5 {
+    width: 456px
+  }
+
+  input.span4, textarea.span4, .uneditable-input.span4 {
+    width: 356px
+  }
+
+  input.span3, textarea.span3, .uneditable-input.span3 {
+    width: 256px
+  }
+
+  input.span2, textarea.span2, .uneditable-input.span2 {
+    width: 156px
+  }
+
+  input.span1, textarea.span1, .uneditable-input.span1 {
+    width: 56px
+  }
+
+  .thumbnails {
+    margin-left: -30px
+  }
+
+  .thumbnails>li {
+    margin-left: 30px
+  }
+
+  .row-fluid .thumbnails {
+    margin-left: 0
+  }
+}
+
+@media (min-width:768px) and (max-width:979px) {
+  .row {
+    margin-left: -20px;
+    *zoom: 1
+  }
+
+  .row:before, .row:after {
+    display: table;
+    line-height: 0;
+    content: ""
+  }
+
+  .row:after {
+    clear: both
+  }
+
+  [class*="span"] {
+    float: left;
+    min-height: 1px;
+    margin-left: 20px
+  }
+
+  .container, .navbar-static-top .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container {
+    width: 724px
+  }
+
+  .span12 {
+    width: 724px
+  }
+
+  .span11 {
+    width: 662px
+  }
+
+  .span10 {
+    width: 600px
+  }
+
+  .span9 {
+    width: 538px
+  }
+
+  .span8 {
+    width: 476px
+  }
+
+  .span7 {
+    width: 414px
+  }
+
+  .span6 {
+    width: 352px
+  }
+
+  .span5 {
+    width: 290px
+  }
+
+  .span4 {
+    width: 228px
+  }
+
+  .span3 {
+    width: 166px
+  }
+
+  .span2 {
+    width: 104px
+  }
+
+  .span1 {
+    width: 42px
+  }
+
+  .offset12 {
+    margin-left: 764px
+  }
+
+  .offset11 {
+    margin-left: 702px
+  }
+
+  .offset10 {
+    margin-left: 640px
+  }
+
+  .offset9 {
+    margin-left: 578px
+  }
+
+  .offset8 {
+    margin-left: 516px
+  }
+
+  .offset7 {
+    margin-left: 454px
+  }
+
+  .offset6 {
+    margin-left: 392px
+  }
+
+  .offset5 {
+    margin-left: 330px
+  }
+
+  .offset4 {
+    margin-left: 268px
+  }
+
+  .offset3 {
+    margin-left: 206px
+  }
+
+  .offset2 {
+    margin-left: 144px
+  }
+
+  .offset1 {
+    margin-left: 82px
+  }
+
+  .row-fluid {
+    width: 100%;
+    *zoom: 1
+  }
+
+  .row-fluid:before, .row-fluid:after {
+    display: table;
+    line-height: 0;
+    content: ""
+  }
+
+  .row-fluid:after {
+    clear: both
+  }
+
+  .row-fluid [class*="span"] {
+    display: block;
+    float: left;
+    width: 100%;
+    min-height: 30px;
+    margin-left: 2.7624309392265194%;
+    *margin-left: 2.709239449864817%;
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box
+  }
+
+  .row-fluid [class*="span"]:first-child {
+    margin-left: 0
+  }
+
+  .row-fluid .controls-row [class*="span"]+[class*="span"] {
+    margin-left: 2.7624309392265194%
+  }
+
+  .row-fluid .span12 {
+    width: 100%;
+    *width: 99.94680851063829%
+  }
+
+  .row-fluid .span11 {
+    width: 91.43646408839778%;
+    *width: 91.38327259903608%
+  }
+
+  .row-fluid .span10 {
+    width: 82.87292817679558%;
+    *width: 82.81973668743387%
+  }
+
+  .row-fluid .span9 {
+    width: 74.30939226519337%;
+    *width: 74.25620077583166%
+  }
+
+  .row-fluid .span8 {
+    width: 65.74585635359117%;
+    *width: 65.69266486422946%
+  }
+
+  .row-fluid .span7 {
+    width: 57.18232044198895%;
+    *width: 57.12912895262725%
+  }
+
+  .row-fluid .span6 {
+    width: 48.61878453038674%;
+    *width: 48.56559304102504%
+  }
+
+  .row-fluid .span5 {
+    width: 40.05524861878453%;
+    *width: 40.00205712942283%
+  }
+
+  .row-fluid .span4 {
+    width: 31.491712707182323%;
+    *width: 31.43852121782062%
+  }
+
+  .row-fluid .span3 {
+    width: 22.92817679558011%;
+    *width: 22.87498530621841%
+  }
+
+  .row-fluid .span2 {
+    width: 14.3646408839779%;
+    *width: 14.311449394616199%
+  }
+
+  .row-fluid .span1 {
+    width: 5.801104972375691%;
+    *width: 5.747913483013988%
+  }
+
+  .row-fluid .offset12 {
+    margin-left: 105.52486187845304%;
+    *margin-left: 105.41847889972962%
+  }
+
+  .row-fluid .offset12:first-child {
+    margin-left: 102.76243093922652%;
+    *margin-left: 102.6560479605031%
+  }
+
+  .row-fluid .offset11 {
+    margin-left: 96.96132596685082%;
+    *margin-left: 96.8549429881274%
+  }
+
+  .row-fluid .offset11:first-child {
+    margin-left: 94.1988950276243%;
+    *margin-left: 94.09251204890089%
+  }
+
+  .row-fluid .offset10 {
+    margin-left: 88.39779005524862%;
+    *margin-left: 88.2914070765252%
+  }
+
+  .row-fluid .offset10:first-child {
+    margin-left: 85.6353591160221%;
+    *margin-left: 85.52897613729868%
+  }
+
+  .row-fluid .offset9 {
+    margin-left: 79.8342541436464%;
+    *margin-left: 79.72787116492299%
+  }
+
+  .row-fluid .offset9:first-child {
+    margin-left: 77.07182320441989%;
+    *margin-left: 76.96544022569647%
+  }
+
+  .row-fluid .offset8 {
+    margin-left: 71.2707182320442%;
+    *margin-left: 71.16433525332079%
+  }
+
+  .row-fluid .offset8:first-child {
+    margin-left: 68.50828729281768%;
+    *margin-left: 68.40190431409427%
+  }
+
+  .row-fluid .offset7 {
+    margin-left: 62.70718232044199%;
+    *margin-left: 62.600799341718584%
+  }
+
+  .row-fluid .offset7:first-child {
+    margin-left: 59.94475138121547%;
+    *margin-left: 59.838368402492065%
+  }
+
+  .row-fluid .offset6 {
+    margin-left: 54.14364640883978%;
+    *margin-left: 54.037263430116376%
+  }
+
+  .row-fluid .offset6:first-child {
+    margin-left: 51.38121546961326%;
+    *margin-left: 51.27483249088986%
+  }
+
+  .row-fluid .offset5 {
+    margin-left: 45.58011049723757%;
+    *margin-left: 45.47372751851417%
+  }
+
+  .row-fluid .offset5:first-child {
+    margin-left: 42.81767955801105%;
+    *margin-left: 42.71129657928765%
+  }
+
+  .row-fluid .offset4 {
+    margin-left: 37.01657458563536%;
+    *margin-left: 36.91019160691196%
+  }
+
+  .row-fluid .offset4:first-child {
+    margin-left: 34.25414364640884%;
+    *margin-left: 34.14776066768544%
+  }
+
+  .row-fluid .offset3 {
+    margin-left: 28.45303867403315%;
+    *margin-left: 28.346655695309746%
+  }
+
+  .row-fluid .offset3:first-child {
+    margin-left: 25.69060773480663%;
+    *margin-left: 25.584224756083227%
+  }
+
+  .row-fluid .offset2 {
+    margin-left: 19.88950276243094%;
+    *margin-left: 19.783119783707537%
+  }
+
+  .row-fluid .offset2:first-child {
+    margin-left: 17.12707182320442%;
+    *margin-left: 17.02068884448102%
+  }
+
+  .row-fluid .offset1 {
+    margin-left: 11.32596685082873%;
+    *margin-left: 11.219583872105325%
+  }
+
+  .row-fluid .offset1:first-child {
+    margin-left: 8.56353591160221%;
+    *margin-left: 8.457152932878806%
+  }
+
+  input, textarea, .uneditable-input {
+    margin-left: 0
+  }
+
+  .controls-row [class*="span"]+[class*="span"] {
+    margin-left: 20px
+  }
+
+  input.span12, textarea.span12, .uneditable-input.span12 {
+    width: 710px
+  }
+
+  input.span11, textarea.span11, .uneditable-input.span11 {
+    width: 648px
+  }
+
+  input.span10, textarea.span10, .uneditable-input.span10 {
+    width: 586px
+  }
+
+  input.span9, textarea.span9, .uneditable-input.span9 {
+    width: 524px
+  }
+
+  input.span8, textarea.span8, .uneditable-input.span8 {
+    width: 462px
+  }
+
+  input.span7, textarea.span7, .uneditable-input.span7 {
+    width: 400px
+  }
+
+  input.span6, textarea.span6, .uneditable-input.span6 {
+    width: 338px
+  }
+
+  input.span5, textarea.span5, .uneditable-input.span5 {
+    width: 276px
+  }
+
+  input.span4, textarea.span4, .uneditable-input.span4 {
+    width: 214px
+  }
+
+  input.span3, textarea.span3, .uneditable-input.span3 {
+    width: 152px
+  }
+
+  input.span2, textarea.span2, .uneditable-input.span2 {
+    width: 90px
+  }
+
+  input.span1, textarea.span1, .uneditable-input.span1 {
+    width: 28px
+  }
+}
+
+@media (max-width:767px) {
+  body {
+    padding-right: 20px;
+    padding-left: 20px
+  }
+
+  .navbar-fixed-top, .navbar-fixed-bottom, .navbar-static-top {
+    margin-right: -20px;
+    margin-left: -20px
+  }
+
+  .container-fluid {
+    padding: 0
+  }
+
+  .dl-horizontal dt {
+    float: none;
+    width: auto;
+    clear: none;
+    text-align: left
+  }
+
+  .dl-horizontal dd {
+    margin-left: 0
+  }
+
+  .container {
+    width: auto
+  }
+
+  .row-fluid {
+    width: 100%
+  }
+
+  .row, .thumbnails {
+    margin-left: 0
+  }
+
+  .thumbnails>li {
+    float: none;
+    margin-left: 0
+  }
+
+  [class*="span"], .uneditable-input[class*="span"], .row-fluid [class*="span"] {
+    display: block;
+    float: none;
+    width: 100%;
+    margin-left: 0;
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box
+  }
+
+  .span12, .row-fluid .span12 {
+    width: 100%;
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box
+  }
+
+  .row-fluid [class*="offset"]:first-child {
+    margin-left: 0
+  }
+
+  .input-large, .input-xlarge, .input-xxlarge, input[class*="span"], select[class*="span"], textarea[class*="span"], .uneditable-input {
+    display: block;
+    width: 100%;
+    min-height: 30px;
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box
+  }
+
+  .input-prepend input, .input-append input, .input-prepend input[class*="span"], .input-append input[class*="span"] {
+    display: inline-block;
+    width: auto
+  }
+
+  .controls-row [class*="span"]+[class*="span"] {
+    margin-left: 0
+  }
+
+  .modal {
+    position: fixed;
+    top: 20px;
+    right: 20px;
+    left: 20px;
+    width: auto;
+    margin: 0
+  }
+
+  .modal.fade {
+    top: -100px
+  }
+
+  .modal.fade.in {
+    top: 20px
+  }
+}
+
+@media (max-width:480px) {
+  .nav-collapse {
+    -webkit-transform: translate3d(0, 0, 0)
+  }
+
+  .page-header h1 small {
+    display: block;
+    line-height: 20px
+  }
+
+  input[type="checkbox"], input[type="radio"] {
+    border: 1px solid #ccc
+  }
+
+  .form-horizontal .control-label {
+    float: none;
+    width: auto;
+    padding-top: 0;
+    text-align: left
+  }
+
+  .form-horizontal .controls {
+    margin-left: 0
+  }
+
+  .form-horizontal .control-list {
+    padding-top: 0
+  }
+
+  .form-horizontal .form-actions {
+    padding-right: 10px;
+    padding-left: 10px
+  }
+
+  .media .pull-left, .media .pull-right {
+    display: block;
+    float: none;
+    margin-bottom: 10px
+  }
+
+  .media-object {
+    margin-right: 0;
+    margin-left: 0
+  }
+
+  .modal {
+    top: 10px;
+    right: 10px;
+    left: 10px
+  }
+
+  .modal-header .close {
+    padding: 10px;
+    margin: -10px
+  }
+
+  .carousel-caption {
+    position: static
+  }
+}
+
+@media (max-width:979px) {
+  body {
+    padding-top: 0
+  }
+
+  .navbar-fixed-top, .navbar-fixed-bottom {
+    position: static
+  }
+
+  .navbar-fixed-top {
+    margin-bottom: 20px
+  }
+
+  .navbar-fixed-bottom {
+    margin-top: 20px
+  }
+
+  .navbar-fixed-top .navbar-inner, .navbar-fixed-bottom .navbar-inner {
+    padding: 5px
+  }
+
+  .navbar .container {
+    width: auto;
+    padding: 0
+  }
+
+  .navbar .brand {
+    padding-right: 10px;
+    padding-left: 10px;
+    margin: 0 0 0 -5px
+  }
+
+  .nav-collapse {
+    clear: both
+  }
+
+  .nav-collapse .nav {
+    float: none;
+    margin: 0 0 10px
+  }
+
+  .nav-collapse .nav>li {
+    float: none
+  }
+
+  .nav-collapse .nav>li>a {
+    margin-bottom: 2px
+  }
+
+  .nav-collapse .nav>.divider-vertical {
+    display: none
+  }
+
+  .nav-collapse .nav .nav-header {
+    color: #777;
+    text-shadow: none
+  }
+
+  .nav-collapse .nav>li>a, .nav-collapse .dropdown-menu a {
+    padding: 9px 15px;
+    font-weight: bold;
+    color: #777;
+    -webkit-border-radius: 3px;
+    -moz-border-radius: 3px;
+    border-radius: 3px
+  }
+
+  .nav-collapse .btn {
+    padding: 4px 10px 4px;
+    font-weight: normal;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px
+  }
+
+  .nav-collapse .dropdown-menu li+li a {
+    margin-bottom: 2px
+  }
+
+  .nav-collapse .nav>li>a:hover, .nav-collapse .nav>li>a:focus, .nav-collapse .dropdown-menu a:hover, .nav-collapse .dropdown-menu a:focus {
+    background-color: #f2f2f2
+  }
+
+  .navbar-inverse .nav-collapse .nav>li>a, .navbar-inverse .nav-collapse .dropdown-menu a {
+    color: #999
+  }
+
+  .navbar-inverse .nav-collapse .nav>li>a:hover, .navbar-inverse .nav-collapse .nav>li>a:focus, .navbar-inverse .nav-collapse .dropdown-menu a:hover, .navbar-inverse .nav-collapse .dropdown-menu a:focus {
+    background-color: #111
+  }
+
+  .nav-collapse.in .btn-group {
+    padding: 0;
+    margin-top: 5px
+  }
+
+  .nav-collapse .dropdown-menu {
+    position: static;
+    top: auto;
+    left: auto;
+    display: none;
+    float: none;
+    max-width: none;
+    padding: 0;
+    margin: 0 15px;
+    background-color: transparent;
+    border: 0;
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+    -webkit-box-shadow: none;
+    -moz-box-shadow: none;
+    box-shadow: none
+  }
+
+  .nav-collapse .open>.dropdown-menu {
+    display: block
+  }
+
+  .nav-collapse .dropdown-menu:before, .nav-collapse .dropdown-menu:after {
+    display: none
+  }
+
+  .nav-collapse .dropdown-menu .divider {
+    display: none
+  }
+
+  .nav-collapse .nav>li>.dropdown-menu:before, .nav-collapse .nav>li>.dropdown-menu:after {
+    display: none
+  }
+
+  .nav-collapse .navbar-form, .nav-collapse .navbar-search {
+    float: none;
+    padding: 10px 15px;
+    margin: 10px 0;
+    border-top: 1px solid #f2f2f2;
+    border-bottom: 1px solid #f2f2f2;
+    -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
+    -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
+    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1)
+  }
+
+  .navbar-inverse .nav-collapse .navbar-form, .navbar-inverse .nav-collapse .navbar-search {
+    border-top-color: #111;
+    border-bottom-color: #111
+  }
+
+  .navbar .nav-collapse .nav.pull-right {
+    float: none;
+    margin-left: 0
+  }
+
+  .nav-collapse, .nav-collapse.collapse {
+    height: 0;
+    overflow: hidden
+  }
+
+  .navbar .btn-navbar {
+    display: block
+  }
+
+  .navbar-static .navbar-inner {
+    padding-right: 10px;
+    padding-left: 10px
+  }
+}
+
+@media (min-width:980px) {
+  .nav-collapse.collapse {
+    height: auto !important;
+    overflow: visible !important
+  }
+}


[48/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/api-activity.gif
----------------------------------------------------------------------
diff --git a/portal/images/api-activity.gif b/portal/images/api-activity.gif
deleted file mode 100644
index eb43dac..0000000
Binary files a/portal/images/api-activity.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/apigee-logo.png
----------------------------------------------------------------------
diff --git a/portal/images/apigee-logo.png b/portal/images/apigee-logo.png
deleted file mode 100644
index edd7ce6..0000000
Binary files a/portal/images/apigee-logo.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/apigeetopbar.png
----------------------------------------------------------------------
diff --git a/portal/images/apigeetopbar.png b/portal/images/apigeetopbar.png
deleted file mode 100644
index 4449024..0000000
Binary files a/portal/images/apigeetopbar.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/btn-copyCurl-up.png
----------------------------------------------------------------------
diff --git a/portal/images/btn-copyCurl-up.png b/portal/images/btn-copyCurl-up.png
deleted file mode 100644
index a497ba7..0000000
Binary files a/portal/images/btn-copyCurl-up.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/clippy-bg.png
----------------------------------------------------------------------
diff --git a/portal/images/clippy-bg.png b/portal/images/clippy-bg.png
deleted file mode 100644
index 7a462e1..0000000
Binary files a/portal/images/clippy-bg.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/close.gif
----------------------------------------------------------------------
diff --git a/portal/images/close.gif b/portal/images/close.gif
deleted file mode 100755
index aea6e42..0000000
Binary files a/portal/images/close.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/dotnet-sdk-download.png
----------------------------------------------------------------------
diff --git a/portal/images/dotnet-sdk-download.png b/portal/images/dotnet-sdk-download.png
deleted file mode 100644
index 2b69215..0000000
Binary files a/portal/images/dotnet-sdk-download.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/down_arrow.png
----------------------------------------------------------------------
diff --git a/portal/images/down_arrow.png b/portal/images/down_arrow.png
deleted file mode 100644
index 8c86504..0000000
Binary files a/portal/images/down_arrow.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/error.png
----------------------------------------------------------------------
diff --git a/portal/images/error.png b/portal/images/error.png
deleted file mode 100755
index 8270104..0000000
Binary files a/portal/images/error.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/faviconApigee.ico
----------------------------------------------------------------------
diff --git a/portal/images/faviconApigee.ico b/portal/images/faviconApigee.ico
deleted file mode 100644
index f2f83a3..0000000
Binary files a/portal/images/faviconApigee.ico and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/glyphicons-halflings-white.png
----------------------------------------------------------------------
diff --git a/portal/images/glyphicons-halflings-white.png b/portal/images/glyphicons-halflings-white.png
deleted file mode 100644
index a20760b..0000000
Binary files a/portal/images/glyphicons-halflings-white.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/glyphicons-halflings.png
----------------------------------------------------------------------
diff --git a/portal/images/glyphicons-halflings.png b/portal/images/glyphicons-halflings.png
deleted file mode 100644
index 92d4445..0000000
Binary files a/portal/images/glyphicons-halflings.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/glyphicons_halflings_135_wrench-white2.pdn
----------------------------------------------------------------------
diff --git a/portal/images/glyphicons_halflings_135_wrench-white2.pdn b/portal/images/glyphicons_halflings_135_wrench-white2.pdn
deleted file mode 100644
index 2d6d0fd..0000000
Binary files a/portal/images/glyphicons_halflings_135_wrench-white2.pdn and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/glyphicons_halflings_135_wrench-white2.png
----------------------------------------------------------------------
diff --git a/portal/images/glyphicons_halflings_135_wrench-white2.png b/portal/images/glyphicons_halflings_135_wrench-white2.png
deleted file mode 100644
index 334b984..0000000
Binary files a/portal/images/glyphicons_halflings_135_wrench-white2.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/glyphicons_halflings_135_wrench.png
----------------------------------------------------------------------
diff --git a/portal/images/glyphicons_halflings_135_wrench.png b/portal/images/glyphicons_halflings_135_wrench.png
deleted file mode 100644
index a501ccd..0000000
Binary files a/portal/images/glyphicons_halflings_135_wrench.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/glyphicons_halflings_135_wrench_white.png
----------------------------------------------------------------------
diff --git a/portal/images/glyphicons_halflings_135_wrench_white.png b/portal/images/glyphicons_halflings_135_wrench_white.png
deleted file mode 100644
index eed258e..0000000
Binary files a/portal/images/glyphicons_halflings_135_wrench_white.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/glyphicons_halflings_wrench_white.png
----------------------------------------------------------------------
diff --git a/portal/images/glyphicons_halflings_wrench_white.png b/portal/images/glyphicons_halflings_wrench_white.png
deleted file mode 100644
index eb7f3bd..0000000
Binary files a/portal/images/glyphicons_halflings_wrench_white.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/grid.png
----------------------------------------------------------------------
diff --git a/portal/images/grid.png b/portal/images/grid.png
deleted file mode 100644
index 7fb3462..0000000
Binary files a/portal/images/grid.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/icons.png
----------------------------------------------------------------------
diff --git a/portal/images/icons.png b/portal/images/icons.png
deleted file mode 100644
index 47ca99a..0000000
Binary files a/portal/images/icons.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/ios-sdk-download.png
----------------------------------------------------------------------
diff --git a/portal/images/ios-sdk-download.png b/portal/images/ios-sdk-download.png
deleted file mode 100644
index 89a7c8b..0000000
Binary files a/portal/images/ios-sdk-download.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/javascript-sdk-download.png
----------------------------------------------------------------------
diff --git a/portal/images/javascript-sdk-download.png b/portal/images/javascript-sdk-download.png
deleted file mode 100644
index 032a371..0000000
Binary files a/portal/images/javascript-sdk-download.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/left_arrow.png
----------------------------------------------------------------------
diff --git a/portal/images/left_arrow.png b/portal/images/left_arrow.png
deleted file mode 100644
index 81ee40c..0000000
Binary files a/portal/images/left_arrow.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/logo-white.png
----------------------------------------------------------------------
diff --git a/portal/images/logo-white.png b/portal/images/logo-white.png
deleted file mode 100644
index fbe95b8..0000000
Binary files a/portal/images/logo-white.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/menuActiveTriangle.png
----------------------------------------------------------------------
diff --git a/portal/images/menuActiveTriangle.png b/portal/images/menuActiveTriangle.png
deleted file mode 100644
index 07db2d1..0000000
Binary files a/portal/images/menuActiveTriangle.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/nodejs-sdk-download.png
----------------------------------------------------------------------
diff --git a/portal/images/nodejs-sdk-download.png b/portal/images/nodejs-sdk-download.png
deleted file mode 100644
index d997a5f..0000000
Binary files a/portal/images/nodejs-sdk-download.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/notice.png
----------------------------------------------------------------------
diff --git a/portal/images/notice.png b/portal/images/notice.png
deleted file mode 100755
index 93c67f2..0000000
Binary files a/portal/images/notice.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/orange-arrow.png
----------------------------------------------------------------------
diff --git a/portal/images/orange-arrow.png b/portal/images/orange-arrow.png
deleted file mode 100644
index 92d02f3..0000000
Binary files a/portal/images/orange-arrow.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/right_arrow.png
----------------------------------------------------------------------
diff --git a/portal/images/right_arrow.png b/portal/images/right_arrow.png
deleted file mode 100644
index f37020a..0000000
Binary files a/portal/images/right_arrow.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/ruby-sdk-download.png
----------------------------------------------------------------------
diff --git a/portal/images/ruby-sdk-download.png b/portal/images/ruby-sdk-download.png
deleted file mode 100644
index c9e7562..0000000
Binary files a/portal/images/ruby-sdk-download.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/success.png
----------------------------------------------------------------------
diff --git a/portal/images/success.png b/portal/images/success.png
deleted file mode 100755
index 7786ac7..0000000
Binary files a/portal/images/success.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/swish_arrow.png
----------------------------------------------------------------------
diff --git a/portal/images/swish_arrow.png b/portal/images/swish_arrow.png
deleted file mode 100644
index 75b2150..0000000
Binary files a/portal/images/swish_arrow.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/topbackground.png
----------------------------------------------------------------------
diff --git a/portal/images/topbackground.png b/portal/images/topbackground.png
deleted file mode 100644
index b9559e4..0000000
Binary files a/portal/images/topbackground.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/up_arrow.png
----------------------------------------------------------------------
diff --git a/portal/images/up_arrow.png b/portal/images/up_arrow.png
deleted file mode 100644
index 926c7e0..0000000
Binary files a/portal/images/up_arrow.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/user-photo.png
----------------------------------------------------------------------
diff --git a/portal/images/user-photo.png b/portal/images/user-photo.png
deleted file mode 100644
index 9c2a29c..0000000
Binary files a/portal/images/user-photo.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/user_profile.png
----------------------------------------------------------------------
diff --git a/portal/images/user_profile.png b/portal/images/user_profile.png
deleted file mode 100644
index ea1cba3..0000000
Binary files a/portal/images/user_profile.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/usergrid_200.png
----------------------------------------------------------------------
diff --git a/portal/images/usergrid_200.png b/portal/images/usergrid_200.png
deleted file mode 100644
index c977d7c..0000000
Binary files a/portal/images/usergrid_200.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/usergrid_400.png
----------------------------------------------------------------------
diff --git a/portal/images/usergrid_400.png b/portal/images/usergrid_400.png
deleted file mode 100644
index 01435ea..0000000
Binary files a/portal/images/usergrid_400.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/images/warning.png
----------------------------------------------------------------------
diff --git a/portal/images/warning.png b/portal/images/warning.png
deleted file mode 100755
index 14776e2..0000000
Binary files a/portal/images/warning.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/appswitcher/apiPlatform_lg.png
----------------------------------------------------------------------
diff --git a/portal/img/appswitcher/apiPlatform_lg.png b/portal/img/appswitcher/apiPlatform_lg.png
new file mode 100644
index 0000000..61cac1c
Binary files /dev/null and b/portal/img/appswitcher/apiPlatform_lg.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/appswitcher/appServices_lg.png
----------------------------------------------------------------------
diff --git a/portal/img/appswitcher/appServices_lg.png b/portal/img/appswitcher/appServices_lg.png
new file mode 100644
index 0000000..1132815
Binary files /dev/null and b/portal/img/appswitcher/appServices_lg.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/appswitcher/console_lg.png
----------------------------------------------------------------------
diff --git a/portal/img/appswitcher/console_lg.png b/portal/img/appswitcher/console_lg.png
new file mode 100644
index 0000000..fba14b2
Binary files /dev/null and b/portal/img/appswitcher/console_lg.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/appswitcher/home_lg.png
----------------------------------------------------------------------
diff --git a/portal/img/appswitcher/home_lg.png b/portal/img/appswitcher/home_lg.png
new file mode 100755
index 0000000..16cf1c3
Binary files /dev/null and b/portal/img/appswitcher/home_lg.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/appswitcher/logo_color.png
----------------------------------------------------------------------
diff --git a/portal/img/appswitcher/logo_color.png b/portal/img/appswitcher/logo_color.png
new file mode 100755
index 0000000..0045a41
Binary files /dev/null and b/portal/img/appswitcher/logo_color.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/appswitcher/max_lg.png
----------------------------------------------------------------------
diff --git a/portal/img/appswitcher/max_lg.png b/portal/img/appswitcher/max_lg.png
new file mode 100644
index 0000000..0558e4c
Binary files /dev/null and b/portal/img/appswitcher/max_lg.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/appswitcher/triangleMenuItem_right.png
----------------------------------------------------------------------
diff --git a/portal/img/appswitcher/triangleMenuItem_right.png b/portal/img/appswitcher/triangleMenuItem_right.png
new file mode 100755
index 0000000..a6a7cca
Binary files /dev/null and b/portal/img/appswitcher/triangleMenuItem_right.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/appswitcher/triangleMenuItem_right_hover.png
----------------------------------------------------------------------
diff --git a/portal/img/appswitcher/triangleMenuItem_right_hover.png b/portal/img/appswitcher/triangleMenuItem_right_hover.png
new file mode 100644
index 0000000..da86a6f
Binary files /dev/null and b/portal/img/appswitcher/triangleMenuItem_right_hover.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/blue-bars.png
----------------------------------------------------------------------
diff --git a/portal/img/blue-bars.png b/portal/img/blue-bars.png
new file mode 100644
index 0000000..f99e370
Binary files /dev/null and b/portal/img/blue-bars.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/blue-bolt.png
----------------------------------------------------------------------
diff --git a/portal/img/blue-bolt.png b/portal/img/blue-bolt.png
new file mode 100644
index 0000000..be48f5e
Binary files /dev/null and b/portal/img/blue-bolt.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/blue-carat.png
----------------------------------------------------------------------
diff --git a/portal/img/blue-carat.png b/portal/img/blue-carat.png
new file mode 100644
index 0000000..e2200d2
Binary files /dev/null and b/portal/img/blue-carat.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/green_dot.png
----------------------------------------------------------------------
diff --git a/portal/img/green_dot.png b/portal/img/green_dot.png
new file mode 100644
index 0000000..c9e18eb
Binary files /dev/null and b/portal/img/green_dot.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/logo.gif
----------------------------------------------------------------------
diff --git a/portal/img/logo.gif b/portal/img/logo.gif
new file mode 100644
index 0000000..884b0f7
Binary files /dev/null and b/portal/img/logo.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/nav-device.gif
----------------------------------------------------------------------
diff --git a/portal/img/nav-device.gif b/portal/img/nav-device.gif
new file mode 100644
index 0000000..595ae30
Binary files /dev/null and b/portal/img/nav-device.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/nav-sprites.png
----------------------------------------------------------------------
diff --git a/portal/img/nav-sprites.png b/portal/img/nav-sprites.png
new file mode 100644
index 0000000..b799ceb
Binary files /dev/null and b/portal/img/nav-sprites.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/no-data1.png
----------------------------------------------------------------------
diff --git a/portal/img/no-data1.png b/portal/img/no-data1.png
new file mode 100644
index 0000000..6e74ed6
Binary files /dev/null and b/portal/img/no-data1.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/phone-small.gif
----------------------------------------------------------------------
diff --git a/portal/img/phone-small.gif b/portal/img/phone-small.gif
new file mode 100644
index 0000000..3780d44
Binary files /dev/null and b/portal/img/phone-small.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/push/APNS_cert_upload.png
----------------------------------------------------------------------
diff --git a/portal/img/push/APNS_cert_upload.png b/portal/img/push/APNS_cert_upload.png
new file mode 100644
index 0000000..2002b42
Binary files /dev/null and b/portal/img/push/APNS_cert_upload.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/push/APNS_certification.png
----------------------------------------------------------------------
diff --git a/portal/img/push/APNS_certification.png b/portal/img/push/APNS_certification.png
new file mode 100644
index 0000000..11848a3
Binary files /dev/null and b/portal/img/push/APNS_certification.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/push/android-notification.png
----------------------------------------------------------------------
diff --git a/portal/img/push/android-notification.png b/portal/img/push/android-notification.png
new file mode 100644
index 0000000..ac50bae
Binary files /dev/null and b/portal/img/push/android-notification.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/push/google_api_key.png
----------------------------------------------------------------------
diff --git a/portal/img/push/google_api_key.png b/portal/img/push/google_api_key.png
new file mode 100644
index 0000000..26f83f1
Binary files /dev/null and b/portal/img/push/google_api_key.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/push/iphone_message.png
----------------------------------------------------------------------
diff --git a/portal/img/push/iphone_message.png b/portal/img/push/iphone_message.png
new file mode 100644
index 0000000..6973699
Binary files /dev/null and b/portal/img/push/iphone_message.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/push/step_1.png
----------------------------------------------------------------------
diff --git a/portal/img/push/step_1.png b/portal/img/push/step_1.png
new file mode 100644
index 0000000..fef83c8
Binary files /dev/null and b/portal/img/push/step_1.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/push/step_2.png
----------------------------------------------------------------------
diff --git a/portal/img/push/step_2.png b/portal/img/push/step_2.png
new file mode 100644
index 0000000..87c1c53
Binary files /dev/null and b/portal/img/push/step_2.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/push/step_3.png
----------------------------------------------------------------------
diff --git a/portal/img/push/step_3.png b/portal/img/push/step_3.png
new file mode 100644
index 0000000..2f6be12
Binary files /dev/null and b/portal/img/push/step_3.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/red_dot.png
----------------------------------------------------------------------
diff --git a/portal/img/red_dot.png b/portal/img/red_dot.png
new file mode 100644
index 0000000..4f7fb26
Binary files /dev/null and b/portal/img/red_dot.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/sdk-sprites-large.png
----------------------------------------------------------------------
diff --git a/portal/img/sdk-sprites-large.png b/portal/img/sdk-sprites-large.png
new file mode 100644
index 0000000..27d2eb8
Binary files /dev/null and b/portal/img/sdk-sprites-large.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/sdk-sprites.png
----------------------------------------------------------------------
diff --git a/portal/img/sdk-sprites.png b/portal/img/sdk-sprites.png
new file mode 100644
index 0000000..478e5f7
Binary files /dev/null and b/portal/img/sdk-sprites.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/tablet-small.gif
----------------------------------------------------------------------
diff --git a/portal/img/tablet-small.gif b/portal/img/tablet-small.gif
new file mode 100644
index 0000000..82bffc1
Binary files /dev/null and b/portal/img/tablet-small.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/user-photo.png
----------------------------------------------------------------------
diff --git a/portal/img/user-photo.png b/portal/img/user-photo.png
new file mode 100644
index 0000000..9c2a29c
Binary files /dev/null and b/portal/img/user-photo.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/user_profile.png
----------------------------------------------------------------------
diff --git a/portal/img/user_profile.png b/portal/img/user_profile.png
new file mode 100644
index 0000000..ea1cba3
Binary files /dev/null and b/portal/img/user_profile.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/img/yellow_dot.png
----------------------------------------------------------------------
diff --git a/portal/img/yellow_dot.png b/portal/img/yellow_dot.png
new file mode 100644
index 0000000..37fed66
Binary files /dev/null and b/portal/img/yellow_dot.png differ


[28/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/modules/data.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/modules/data.js b/portal/js/libs/Highcharts-2.3.5/js/modules/data.js
new file mode 100644
index 0000000..9f6116a
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/modules/data.js
@@ -0,0 +1,14 @@
+/*
+ Data plugin for Highcharts v0.1
+
+ (c) 2012 Torstein Hønsi
+
+ License: www.highcharts.com/license
+*/
+(function(h){var l=h.each,m=function(a){this.init(a)};h.extend(m.prototype,{init:function(a){this.options=a;this.columns=a.columns||this.rowsToColumns(a.rows)||[];this.columns.length?this.dataFound():(this.parseCSV(),this.parseTable(),this.parseGoogleSpreadsheet())},dataFound:function(){this.parseTypes();this.findHeaderRow();this.parsed();this.complete()},parseCSV:function(){var a=this.options,b=a.csv,d=this.columns,c=a.startRow||0,g=a.endRow||Number.MAX_VALUE,f=a.startColumn||0,j=a.endColumn||Number.MAX_VALUE;
+b&&(b=b.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split(a.lineDelimiter||"\n"),l(b,function(b,k){if(k>=c&&k<=g){var e=b.split(a.itemDelimiter||",");l(e,function(a,b){b>=f&&b<=j&&(d[b-f]||(d[b-f]=[]),d[b-f][k-c]=a)})}}),this.dataFound())},parseTable:function(){var a=this.options,b=a.table,d=this.columns,c=a.startRow||0,g=a.endRow||Number.MAX_VALUE,f=a.startColumn||0,j=a.endColumn||Number.MAX_VALUE,i;b&&(typeof b==="string"&&(b=document.getElementById(b)),l(b.getElementsByTagName("tr"),function(a,b){i=
+0;b>=c&&b<=g&&l(a.childNodes,function(a){if((a.tagName==="TD"||a.tagName==="TH")&&i>=f&&i<=j)d[i]||(d[i]=[]),d[i][b-c]=a.innerHTML,i+=1})}),this.dataFound())},parseGoogleSpreadsheet:function(){var a=this,b=this.options,d=b.googleSpreadsheetKey,c=this.columns;d&&jQuery.getJSON("https://spreadsheets.google.com/feeds/cells/"+d+"/"+(b.googleSpreadsheetWorksheet||"od6")+"/public/values?alt=json-in-script&callback=?",function(b){var b=b.feed.entry,d,j=b.length,i=0,k=0,e;for(e=0;e<j;e++)d=b[e],i=Math.max(i,
+d.gs$cell.col),k=Math.max(k,d.gs$cell.row);for(e=0;e<i;e++)c[e]=Array(k);for(e=0;e<j;e++)d=b[e],c[d.gs$cell.col-1][d.gs$cell.row-1]=d.content.$t;a.dataFound()})},findHeaderRow:function(){l(this.columns,function(){});this.headerRow=0},trim:function(a){return typeof a==="string"?a.replace(/^\s+|\s+$/g,""):a},parseTypes:function(){for(var a=this.columns,b=a.length,d,c,g,f;b--;)for(d=a[b].length;d--;)c=a[b][d],g=parseFloat(c),f=this.trim(c),f==g?(a[b][d]=g,g>31536E6?a[b].isDatetime=!0:a[b].isNumeric=
+!0):(c=this.parseDate(c),b===0&&typeof c==="number"&&!isNaN(c)?(a[b][d]=c,a[b].isDatetime=!0):a[b][d]=f)},dateFormats:{"YYYY-mm-dd":{regex:"^([0-9]{4})-([0-9]{2})-([0-9]{2})$",parser:function(a){return Date.UTC(+a[1],a[2]-1,+a[3])}}},parseDate:function(a){var b=this.options.parseDate,d,c,g;b&&(d=b);if(typeof a==="string")for(c in this.dateFormats)b=this.dateFormats[c],(g=a.match(b.regex))&&(d=b.parser(g));return d},rowsToColumns:function(a){var b,d,c,g,f;if(a){f=[];d=a.length;for(b=0;b<d;b++){g=a[b].length;
+for(c=0;c<g;c++)f[c]||(f[c]=[]),f[c][b]=a[b][c]}}return f},parsed:function(){this.options.parsed&&this.options.parsed.call(this,this.columns)},complete:function(){var a=this.columns,b,d,c,g,f=this.options,j,i,k,e,h;if(f.complete){a.length>1&&(c=a.shift(),this.headerRow===0&&c.shift(),(b=c.isNumeric||c.isDatetime)||(d=c),c.isDatetime&&(g="datetime"));j=[];for(e=0;e<a.length;e++){this.headerRow===0&&(k=a[e].shift());i=[];for(h=0;h<a[e].length;h++)i[h]=a[e][h]!==void 0?b?[c[h],a[e][h]]:a[e][h]:null;
+j[e]={name:k,data:i}}f.complete({xAxis:{categories:d,type:g},series:j})}}});h.Data=m;h.data=function(a){return new m(a)};h.wrap(h.Chart.prototype,"init",function(a,b,d){var c=this;b&&b.data?h.data(h.extend(b.data,{complete:function(g){var f=[];l(g.series,function(a,b){f[b]=a.data;a.data=null});b=h.merge(g,b);l(f,function(a,c){b.series[c].data=a});a.call(c,b,d)}})):a.call(c,b,d)})})(Highcharts);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/modules/data.src.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/modules/data.src.js b/portal/js/libs/Highcharts-2.3.5/js/modules/data.src.js
new file mode 100644
index 0000000..ef328a2
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/modules/data.src.js
@@ -0,0 +1,512 @@
+/**
+ * @license Data plugin for Highcharts v0.1
+ *
+ * (c) 2012 Torstein Hønsi
+ *
+ * License: www.highcharts.com/license
+ */
+
+/*
+ * The Highcharts Data plugin is a utility to ease parsing of input sources like
+ * CSV, HTML tables or grid views into basic configuration options for use 
+ * directly in the Highcharts constructor.
+ *
+ * Demo: http://jsfiddle.net/highcharts/SnLFj/
+ *
+ * --- OPTIONS ---
+ *
+ * - columns : Array<Array<Mixed>>
+ * A two-dimensional array representing the input data on tabular form. This input can
+ * be used when the data is already parsed, for example from a grid view component.
+ * Each cell can be a string or number. If not switchRowsAndColumns is set, the columns
+ * are interpreted as series. See also the rows option.
+ *
+ * - complete : Function(chartOptions)
+ * The callback that is evaluated when the data is finished loading, optionally from an 
+ * external source, and parsed. The first argument passed is a finished chart options
+ * object, containing series and an xAxis with categories if applicable. Thise options
+ * can be extended with additional options and passed directly to the chart constructor.
+ *
+ * - csv : String
+ * A comma delimited string to be parsed. Related options are startRow, endRow, startColumn
+ * and endColumn to delimit what part of the table is used. The lineDelimiter and 
+ * itemDelimiter options define the CSV delimiter formats.
+ * 
+ * - endColumn : Integer
+ * In tabular input data, the first row (indexed by 0) to use. Defaults to the last 
+ * column containing data.
+ *
+ * - endRow : Integer
+ * In tabular input data, the last row (indexed by 0) to use. Defaults to the last row
+ * containing data.
+ *
+ * - googleSpreadsheetKey : String 
+ * A Google Spreadsheet key. See https://developers.google.com/gdata/samples/spreadsheet_sample
+ * for general information on GS.
+ *
+ * - googleSpreadsheetKey : String 
+ * The Google Spreadsheet worksheet. The available id's can be read from 
+ * https://spreadsheets.google.com/feeds/worksheets/{key}/public/basic
+ *
+ * - itemDilimiter : String
+ * Item or cell delimiter for parsing CSV. Defaults to ",".
+ *
+ * - lineDilimiter : String
+ * Line delimiter for parsing CSV. Defaults to "\n".
+ *
+ * - parsed : Function
+ * A callback function to access the parsed columns, the two-dimentional input data
+ * array directly, before they are interpreted into series data and categories.
+ *
+ * - parseDate : Function
+ * A callback function to parse string representations of dates into JavaScript timestamps.
+ * Return an integer on success.
+ *
+ * - rows : Array<Array<Mixed>>
+ * The same as the columns input option, but defining rows intead of columns.
+ *
+ * - startColumn : Integer
+ * In tabular input data, the first column (indexed by 0) to use. 
+ *
+ * - startRow : Integer
+ * In tabular input data, the first row (indexed by 0) to use.
+ *
+ * - table : String|HTMLElement
+ * A HTML table or the id of such to be parsed as input data. Related options ara startRow,
+ * endRow, startColumn and endColumn to delimit what part of the table is used.
+ */
+
+/*global jQuery */
+(function (Highcharts) {	
+	
+	// Utilities
+	var each = Highcharts.each;
+	
+	
+	// The Data constructor
+	var Data = function (options) {
+		this.init(options);
+	};
+	
+	// Set the prototype properties
+	Highcharts.extend(Data.prototype, {
+		
+	/**
+	 * Initialize the Data object with the given options
+	 */
+	init: function (options) {
+		this.options = options;
+		this.columns = options.columns || this.rowsToColumns(options.rows) || [];
+
+		// No need to parse or interpret anything
+		if (this.columns.length) {
+			this.dataFound();
+
+		// Parse and interpret
+		} else {
+
+			// Parse a CSV string if options.csv is given
+			this.parseCSV();
+			
+			// Parse a HTML table if options.table is given
+			this.parseTable();
+
+			// Parse a Google Spreadsheet 
+			this.parseGoogleSpreadsheet();	
+		}
+
+	},
+
+	dataFound: function () {
+		
+		// Interpret the values into right types
+		this.parseTypes();
+		
+		// Use first row for series names?
+		this.findHeaderRow();
+		
+		// Handle columns if a handleColumns callback is given
+		this.parsed();
+		
+		// Complete if a complete callback is given
+		this.complete();
+		
+	},
+	
+	/**
+	 * Parse a CSV input string
+	 */
+	parseCSV: function () {
+		var options = this.options,
+			csv = options.csv,
+			columns = this.columns,
+			startRow = options.startRow || 0,
+			endRow = options.endRow || Number.MAX_VALUE,
+			startColumn = options.startColumn || 0,
+			endColumn = options.endColumn || Number.MAX_VALUE,
+			lines;
+			
+		if (csv) {
+			
+			lines = csv
+				.replace(/\r\n/g, "\n") // Unix
+				.replace(/\r/g, "\n") // Mac
+				.split(options.lineDelimiter || "\n");
+			
+			each(lines, function (line, rowNo) {
+				if (rowNo >= startRow && rowNo <= endRow) {
+					var items = line.split(options.itemDelimiter || ',');
+					each(items, function (item, colNo) {
+						if (colNo >= startColumn && colNo <= endColumn) {
+							if (!columns[colNo - startColumn]) {
+								columns[colNo - startColumn] = [];					
+							}
+							
+							columns[colNo - startColumn][rowNo - startRow] = item;
+						}
+					});
+				}
+			}); 
+			this.dataFound();
+		}
+	},
+	
+	/**
+	 * Parse a HTML table
+	 */
+	parseTable: function () {
+		var options = this.options,
+			table = options.table,
+			columns = this.columns,
+			startRow = options.startRow || 0,
+			endRow = options.endRow || Number.MAX_VALUE,
+			startColumn = options.startColumn || 0,
+			endColumn = options.endColumn || Number.MAX_VALUE,
+			colNo;
+			
+		if (table) {
+			
+			if (typeof table === 'string') {
+				table = document.getElementById(table);
+			}
+			
+			each(table.getElementsByTagName('tr'), function (tr, rowNo) {
+				colNo = 0; 
+				if (rowNo >= startRow && rowNo <= endRow) {
+					each(tr.childNodes, function (item) {
+						if ((item.tagName === 'TD' || item.tagName === 'TH') && colNo >= startColumn && colNo <= endColumn) {
+							if (!columns[colNo]) {
+								columns[colNo] = [];					
+							}
+							columns[colNo][rowNo - startRow] = item.innerHTML;
+							
+							colNo += 1;
+						}
+					});
+				}
+			});
+
+			this.dataFound(); // continue
+		}
+	},
+
+	/**
+	 * TODO: 
+	 * - switchRowsAndColumns
+	 * - startRow, endRow etc.
+	 */
+	parseGoogleSpreadsheet: function () {
+		var self = this,
+			options = this.options,
+			googleSpreadsheetKey = options.googleSpreadsheetKey,
+			columns = this.columns;
+
+		if (googleSpreadsheetKey) {
+			jQuery.getJSON('https://spreadsheets.google.com/feeds/cells/' + 
+				  googleSpreadsheetKey + '/' + (options.googleSpreadsheetWorksheet || 'od6') +
+					  '/public/values?alt=json-in-script&callback=?',
+					  function (json) {
+					
+				// Prepare the data from the spreadsheat
+				var cells = json.feed.entry,
+					cell,
+					cellCount = cells.length,
+					colCount = 0,
+					rowCount = 0,
+					i;
+			
+				// First, find the total number of columns and rows that 
+				// are actually filled with data
+				for (i = 0; i < cellCount; i++) {
+					cell = cells[i];
+					colCount = Math.max(colCount, cell.gs$cell.col);
+					rowCount = Math.max(rowCount, cell.gs$cell.row);			
+				}
+			
+				// Set up arrays containing the column data
+				for (i = 0; i < colCount; i++) {
+					columns[i] = new Array(rowCount);
+				}
+				
+				// Loop over the cells and assign the value to the right
+				// place in the column arrays
+				for (i = 0; i < cellCount; i++) {
+					cell = cells[i];
+					columns[cell.gs$cell.col - 1][cell.gs$cell.row - 1] = 
+						cell.content.$t;
+				}
+				self.dataFound();
+			});
+		}
+	},
+	
+	/**
+	 * Find the header row. For now, we just check whether the first row contains
+	 * numbers or strings. Later we could loop down and find the first row with 
+	 * numbers.
+	 */
+	findHeaderRow: function () {
+		var headerRow = 0;
+		each(this.columns, function (column) {
+			if (typeof column[0] !== 'string') {
+				headerRow = null;
+			}
+		});
+		this.headerRow = 0;			
+	},
+	
+	/**
+	 * Trim a string from whitespace
+	 */
+	trim: function (str) {
+		//return typeof str === 'number' ? str : str.replace(/^\s+|\s+$/g, ''); // fails with spreadsheet
+		return typeof str === 'string' ? str.replace(/^\s+|\s+$/g, '') : str;
+	},
+	
+	/**
+	 * Parse numeric cells in to number types and date types in to true dates.
+	 * @param {Object} columns
+	 */
+	parseTypes: function () {
+		var columns = this.columns,
+			col = columns.length, 
+			row,
+			val,
+			floatVal,
+			trimVal,
+			dateVal;
+			
+		while (col--) {
+			row = columns[col].length;
+			while (row--) {
+				val = columns[col][row];
+				floatVal = parseFloat(val);
+				trimVal = this.trim(val);
+				/*jslint eqeq: true*/
+				if (trimVal == floatVal) { // is numeric
+				/*jslint eqeq: false*/
+					columns[col][row] = floatVal;
+					
+					// If the number is greater than milliseconds in a year, assume datetime
+					if (floatVal > 365 * 24 * 3600 * 1000) {
+						columns[col].isDatetime = true;
+					} else {
+						columns[col].isNumeric = true;
+					}					
+				
+				} else { // string, continue to determine if it is a date string or really a string
+					dateVal = this.parseDate(val);
+					
+					if (col === 0 && typeof dateVal === 'number' && !isNaN(dateVal)) { // is date
+						columns[col][row] = dateVal;
+						columns[col].isDatetime = true;
+					
+					} else { // string
+						columns[col][row] = trimVal;
+					}
+				}
+				
+			}
+		}
+	},
+	//*
+	dateFormats: {
+		'YYYY-mm-dd': {
+			regex: '^([0-9]{4})-([0-9]{2})-([0-9]{2})$',
+			parser: function (match) {
+				return Date.UTC(+match[1], match[2] - 1, +match[3]);
+			}
+		}
+	},
+	// */
+	/**
+	 * Parse a date and return it as a number. Overridable through options.parseDate.
+	 */
+	parseDate: function (val) {
+		var parseDate = this.options.parseDate,
+			ret,
+			key,
+			format,
+			match;
+
+		if (parseDate) {
+			ret = parseDate;
+		}
+			
+		if (typeof val === 'string') {
+			for (key in this.dateFormats) {
+				format = this.dateFormats[key];
+				match = val.match(format.regex);
+				if (match) {
+					ret = format.parser(match);
+				}
+			}
+		}
+		return ret;
+	},
+	
+	/**
+	 * Reorganize rows into columns
+	 */
+	rowsToColumns: function (rows) {
+		var row,
+			rowsLength,
+			col,
+			colsLength,
+			columns;
+
+		if (rows) {
+			columns = [];
+			rowsLength = rows.length;
+			for (row = 0; row < rowsLength; row++) {
+				colsLength = rows[row].length;
+				for (col = 0; col < colsLength; col++) {
+					if (!columns[col]) {
+						columns[col] = [];
+					}
+					columns[col][row] = rows[row][col];
+				}
+			}
+		}
+		return columns;
+	},
+	
+	/**
+	 * A hook for working directly on the parsed columns
+	 */
+	parsed: function () {
+		if (this.options.parsed) {
+			this.options.parsed.call(this, this.columns);
+		}
+	},
+	
+	/**
+	 * If a complete callback function is provided in the options, interpret the 
+	 * columns into a Highcharts options object.
+	 */
+	complete: function () {
+		
+		var columns = this.columns,
+			hasXData,
+			categories,
+			firstCol,
+			type,
+			options = this.options,
+			series,
+			data,
+			name,
+			i,
+			j;
+			
+		
+		if (options.complete) {
+			
+			// Use first column for X data or categories?
+			if (columns.length > 1) {
+				firstCol = columns.shift();
+				if (this.headerRow === 0) {
+					firstCol.shift(); // remove the first cell
+				}
+				
+				// Use the first column for categories or X values
+				hasXData = firstCol.isNumeric || firstCol.isDatetime;
+				if (!hasXData) { // means type is neither datetime nor linear
+					categories = firstCol;
+				}
+				
+				if (firstCol.isDatetime) {
+					type = 'datetime';
+				}
+			}
+			
+			// Use the next columns for series
+			series = [];
+			for (i = 0; i < columns.length; i++) {
+				if (this.headerRow === 0) {
+					name = columns[i].shift();
+				}
+				data = [];
+				for (j = 0; j < columns[i].length; j++) {
+					data[j] = columns[i][j] !== undefined ?
+						(hasXData ?
+							[firstCol[j], columns[i][j]] :
+							columns[i][j]
+						) :
+						null;
+				}
+				series[i] = {
+					name: name,
+					data: data
+				};
+			}
+			
+			// Do the callback
+			options.complete({
+				xAxis: {
+					categories: categories,
+					type: type
+				},
+				series: series
+			});
+		}
+	}
+	});
+	
+	// Register the Data prototype and data function on Highcharts
+	Highcharts.Data = Data;
+	Highcharts.data = function (options) {
+		return new Data(options);
+	};
+
+	// Extend Chart.init so that the Chart constructor accepts a new configuration
+	// option group, data.
+	Highcharts.wrap(Highcharts.Chart.prototype, 'init', function (proceed, userOptions, callback) {
+		var chart = this;
+
+		if (userOptions && userOptions.data) {
+			Highcharts.data(Highcharts.extend(userOptions.data, {
+				complete: function (dataOptions) {
+					var datasets = []; 
+					
+					// Don't merge the data arrays themselves
+					each(dataOptions.series, function (series, i) {
+						datasets[i] = series.data;
+						series.data = null;
+					});
+					
+					// Do the merge
+					userOptions = Highcharts.merge(dataOptions, userOptions);
+					
+					// Re-insert the data
+					each(datasets, function (data, i) {
+						userOptions.series[i].data = data;
+					});
+					proceed.call(chart, userOptions, callback);
+				}
+			}));
+		} else {
+			proceed.call(chart, userOptions, callback);
+		}
+	});
+
+}(Highcharts));

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/modules/exporting.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/modules/exporting.js b/portal/js/libs/Highcharts-2.3.5/js/modules/exporting.js
new file mode 100644
index 0000000..5c0d0e5
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/modules/exporting.js
@@ -0,0 +1,23 @@
+/*
+ Highcharts JS v2.3.5 (2012-12-19)
+ Exporting module
+
+ (c) 2010-2011 Torstein Hønsi
+
+ License: www.highcharts.com/license
+*/
+(function(e){function y(a){for(var b=a.length;b--;)typeof a[b]==="number"&&(a[b]=Math.round(a[b])-0.5);return a}var z=e.Chart,u=e.addEvent,B=e.removeEvent,j=e.createElement,v=e.discardElement,t=e.css,l=e.merge,k=e.each,o=e.extend,C=Math.max,i=document,D=window,E=e.isTouchDevice,A=e.Renderer.prototype.symbols,w=e.getOptions();o(w.lang,{downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image",exportButtonTitle:"Export to raster or vector image",
+printButtonTitle:"Print the chart"});w.navigation={menuStyle:{border:"1px solid #A0A0A0",background:"#FFFFFF"},menuItemStyle:{padding:"0 5px",background:"none",color:"#303030",fontSize:E?"14px":"11px"},menuItemHoverStyle:{background:"#4572A5",color:"#FFFFFF"},buttonOptions:{align:"right",backgroundColor:{linearGradient:[0,0,0,20],stops:[[0.4,"#F7F7F7"],[0.6,"#E3E3E3"]]},borderColor:"#B0B0B0",borderRadius:3,borderWidth:1,height:20,hoverBorderColor:"#909090",hoverSymbolFill:"#81A7CF",hoverSymbolStroke:"#4572A5",
+symbolFill:"#E0E0E0",symbolStroke:"#A0A0A0",symbolX:11.5,symbolY:10.5,verticalAlign:"top",width:24,y:10}};w.exporting={type:"image/png",url:"http://export.highcharts.com/",width:800,buttons:{exportButton:{symbol:"exportIcon",x:-10,symbolFill:"#A8BF77",hoverSymbolFill:"#768F3E",_id:"exportButton",_titleKey:"exportButtonTitle",menuItems:[{textKey:"downloadPNG",onclick:function(){this.exportChart()}},{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},{textKey:"downloadPDF",
+onclick:function(){this.exportChart({type:"application/pdf"})}},{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}]},printButton:{symbol:"printIcon",x:-36,symbolFill:"#B5C9DF",hoverSymbolFill:"#779ABF",_id:"printButton",_titleKey:"printButtonTitle",onclick:function(){this.print()}}}};e.post=function(a,b){var c,d;d=j("form",{method:"post",action:a,enctype:"multipart/form-data"},{display:"none"},i.body);for(c in b)j("input",{type:"hidden",name:c,value:b[c]},null,d);
+d.submit();v(d)};o(z.prototype,{getSVG:function(a){var b=this,c,d,f,g=l(b.options,a);if(!i.createElementNS)i.createElementNS=function(a,b){return i.createElement(b)};a=j("div",null,{position:"absolute",top:"-9999em",width:b.chartWidth+"px",height:b.chartHeight+"px"},i.body);o(g.chart,{renderTo:a,forExport:!0});g.exporting.enabled=!1;g.chart.plotBackgroundImage=null;g.series=[];k(b.series,function(a){f=l(a.options,{animation:!1,showCheckbox:!1,visible:a.visible});f.isInternal||g.series.push(f)});c=
+new e.Chart(g);k(["xAxis","yAxis"],function(a){k(b[a],function(b,d){var f=c[a][d],g=b.getExtremes(),e=g.userMin,g=g.userMax;(e!==void 0||g!==void 0)&&f.setExtremes(e,g,!0,!1)})});d=c.container.innerHTML;g=null;c.destroy();v(a);d=d.replace(/zIndex="[^"]+"/g,"").replace(/isShadow="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/isTracker="[^"]+"/g,"").replace(/url\([^#]+#/g,"url(#").replace(/<svg /,'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ').replace(/ href=/g,
+" xlink:href=").replace(/\n/," ").replace(/<\/svg>.*?$/,"</svg>").replace(/&nbsp;/g," ").replace(/&shy;/g,"­").replace(/<IMG /g,"<image ").replace(/height=([^" ]+)/g,'height="$1"').replace(/width=([^" ]+)/g,'width="$1"').replace(/hc-svg-href="([^"]+)">/g,'xlink:href="$1"/>').replace(/id=([^" >]+)/g,'id="$1"').replace(/class=([^" ]+)/g,'class="$1"').replace(/ transform /g," ").replace(/:(path|rect)/g,"$1").replace(/style="([^"]+)"/g,function(a){return a.toLowerCase()});d=d.replace(/(url\(#highcharts-[0-9]+)&quot;/g,
+"$1").replace(/&quot;/g,"'");d.match(/ xmlns="/g).length===2&&(d=d.replace(/xmlns="[^"]+"/,""));return d},exportChart:function(a,b){var c=this.options.exporting,d=this.getSVG(l(c.chartOptions,b)),a=l(c,a);e.post(a.url,{filename:a.filename||"chart",type:a.type,width:a.width,scale:a.scale||2,svg:d})},print:function(){var a=this,b=a.container,c=[],d=b.parentNode,f=i.body,g=f.childNodes;if(!a.isPrinting)a.isPrinting=!0,k(g,function(a,b){if(a.nodeType===1)c[b]=a.style.display,a.style.display="none"}),
+f.appendChild(b),D.print(),setTimeout(function(){d.appendChild(b);k(g,function(a,b){if(a.nodeType===1)a.style.display=c[b]});a.isPrinting=!1},1E3)},contextMenu:function(a,b,c,d,f,g){var e=this,p=e.options.navigation,i=p.menuItemStyle,q=e.chartWidth,r=e.chartHeight,s="cache-"+a,h=e[s],m=C(f,g),x,n,l;if(!h)e[s]=h=j("div",{className:"highcharts-"+a},{position:"absolute",zIndex:1E3,padding:m+"px"},e.container),x=j("div",null,o({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},
+p.menuStyle),h),n=function(){t(h,{display:"none"})},u(h,"mouseleave",function(){l=setTimeout(n,500)}),u(h,"mouseenter",function(){clearTimeout(l)}),k(b,function(a){if(a){var b=j("div",{onmouseover:function(){t(this,p.menuItemHoverStyle)},onmouseout:function(){t(this,i)},innerHTML:a.text||e.options.lang[a.textKey]},o({cursor:"pointer"},i),x);b.onclick=function(){n();a.onclick.apply(e,arguments)};e.exportDivElements.push(b)}}),e.exportDivElements.push(x,h),e.exportMenuWidth=h.offsetWidth,e.exportMenuHeight=
+h.offsetHeight;a={display:"block"};c+e.exportMenuWidth>q?a.right=q-c-f-m+"px":a.left=c-m+"px";d+g+e.exportMenuHeight>r?a.bottom=r-d-m+"px":a.top=d+g-m+"px";t(h,a)},addButton:function(a){function b(){r.attr(k);q.attr(m)}var c=this,d=c.renderer,f=l(c.options.navigation.buttonOptions,a),e=f.onclick,i=f.menuItems,p=f.width,j=f.height,q,r,s,h,a=f.borderWidth,m={stroke:f.borderColor},k={stroke:f.symbolStroke,fill:f.symbolFill},n=f.symbolSize||12;if(!c.btnCount)c.btnCount=0;h=c.btnCount++;if(!c.exportDivElements)c.exportDivElements=
+[],c.exportSVGElements=[];f.enabled!==!1&&(q=d.rect(0,0,p,j,f.borderRadius,a).align(f,!0).attr(o({fill:f.backgroundColor,"stroke-width":a,zIndex:19},m)).add(),s=d.rect(0,0,p,j,0).align(f).attr({id:f._id,fill:"rgba(255, 255, 255, 0.001)",title:c.options.lang[f._titleKey],zIndex:21}).css({cursor:"pointer"}).on("mouseover",function(){r.attr({stroke:f.hoverSymbolStroke,fill:f.hoverSymbolFill});q.attr({stroke:f.hoverBorderColor})}).on("mouseout",b).on("click",b).add(),i&&(e=function(){b();var a=s.getBBox();
+c.contextMenu("menu"+h,i,a.x,a.y,p,j)}),s.on("click",function(){e.apply(c,arguments)}),r=d.symbol(f.symbol,f.symbolX-n/2,f.symbolY-n/2,n,n).align(f,!0).attr(o(k,{"stroke-width":f.symbolStrokeWidth||1,zIndex:20})).add(),c.exportSVGElements.push(q,s,r))},destroyExport:function(){var a,b;for(a=0;a<this.exportSVGElements.length;a++)b=this.exportSVGElements[a],b.onclick=b.ontouchstart=null,this.exportSVGElements[a]=b.destroy();for(a=0;a<this.exportDivElements.length;a++)b=this.exportDivElements[a],B(b,
+"mouseleave"),this.exportDivElements[a]=b.onmouseout=b.onmouseover=b.ontouchstart=b.onclick=null,v(b)}});A.exportIcon=function(a,b,c,d){return y(["M",a,b+c,"L",a+c,b+d,a+c,b+d*0.8,a,b+d*0.8,"Z","M",a+c*0.5,b+d*0.8,"L",a+c*0.8,b+d*0.4,a+c*0.4,b+d*0.4,a+c*0.4,b,a+c*0.6,b,a+c*0.6,b+d*0.4,a+c*0.2,b+d*0.4,"Z"])};A.printIcon=function(a,b,c,d){return y(["M",a,b+d*0.7,"L",a+c,b+d*0.7,a+c,b+d*0.4,a,b+d*0.4,"Z","M",a+c*0.2,b+d*0.4,"L",a+c*0.2,b,a+c*0.8,b,a+c*0.8,b+d*0.4,"Z","M",a+c*0.2,b+d*0.7,"L",a,b+d,a+
+c,b+d,a+c*0.8,b+d*0.7,"Z"])};z.prototype.callbacks.push(function(a){var b,c=a.options.exporting,d=c.buttons;if(c.enabled!==!1){for(b in d)a.addButton(d[b]);u(a,"destroy",a.destroyExport)}})})(Highcharts);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/modules/exporting.src.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/modules/exporting.src.js b/portal/js/libs/Highcharts-2.3.5/js/modules/exporting.src.js
new file mode 100644
index 0000000..43d48d5
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/modules/exporting.src.js
@@ -0,0 +1,752 @@
+/**
+ * @license Highcharts JS v2.3.5 (2012-12-19)
+ * Exporting module
+ *
+ * (c) 2010-2011 Torstein Hønsi
+ *
+ * License: www.highcharts.com/license
+ */
+
+// JSLint options:
+/*global Highcharts, document, window, Math, setTimeout */
+
+(function (Highcharts) { // encapsulate
+
+// create shortcuts
+var Chart = Highcharts.Chart,
+	addEvent = Highcharts.addEvent,
+	removeEvent = Highcharts.removeEvent,
+	createElement = Highcharts.createElement,
+	discardElement = Highcharts.discardElement,
+	css = Highcharts.css,
+	merge = Highcharts.merge,
+	each = Highcharts.each,
+	extend = Highcharts.extend,
+	math = Math,
+	mathMax = math.max,
+	doc = document,
+	win = window,
+	isTouchDevice = Highcharts.isTouchDevice,
+	M = 'M',
+	L = 'L',
+	DIV = 'div',
+	HIDDEN = 'hidden',
+	NONE = 'none',
+	PREFIX = 'highcharts-',
+	ABSOLUTE = 'absolute',
+	PX = 'px',
+	UNDEFINED,
+	symbols = Highcharts.Renderer.prototype.symbols,
+	defaultOptions = Highcharts.getOptions();
+
+	// Add language
+	extend(defaultOptions.lang, {
+		downloadPNG: 'Download PNG image',
+		downloadJPEG: 'Download JPEG image',
+		downloadPDF: 'Download PDF document',
+		downloadSVG: 'Download SVG vector image',
+		exportButtonTitle: 'Export to raster or vector image',
+		printButtonTitle: 'Print the chart'
+	});
+
+// Buttons and menus are collected in a separate config option set called 'navigation'.
+// This can be extended later to add control buttons like zoom and pan right click menus.
+defaultOptions.navigation = {
+	menuStyle: {
+		border: '1px solid #A0A0A0',
+		background: '#FFFFFF'
+	},
+	menuItemStyle: {
+		padding: '0 5px',
+		background: NONE,
+		color: '#303030',
+		fontSize: isTouchDevice ? '14px' : '11px'
+	},
+	menuItemHoverStyle: {
+		background: '#4572A5',
+		color: '#FFFFFF'
+	},
+
+	buttonOptions: {
+		align: 'right',
+		backgroundColor: {
+			linearGradient: [0, 0, 0, 20],
+			stops: [
+				[0.4, '#F7F7F7'],
+				[0.6, '#E3E3E3']
+			]
+		},
+		borderColor: '#B0B0B0',
+		borderRadius: 3,
+		borderWidth: 1,
+		//enabled: true,
+		height: 20,
+		hoverBorderColor: '#909090',
+		hoverSymbolFill: '#81A7CF',
+		hoverSymbolStroke: '#4572A5',
+		symbolFill: '#E0E0E0',
+		//symbolSize: 12,
+		symbolStroke: '#A0A0A0',
+		//symbolStrokeWidth: 1,
+		symbolX: 11.5,
+		symbolY: 10.5,
+		verticalAlign: 'top',
+		width: 24,
+		y: 10
+	}
+};
+
+
+
+// Add the export related options
+defaultOptions.exporting = {
+	//enabled: true,
+	//filename: 'chart',
+	type: 'image/png',
+	url: 'http://export.highcharts.com/',
+	width: 800,
+	buttons: {
+		exportButton: {
+			//enabled: true,
+			symbol: 'exportIcon',
+			x: -10,
+			symbolFill: '#A8BF77',
+			hoverSymbolFill: '#768F3E',
+			_id: 'exportButton',
+			_titleKey: 'exportButtonTitle',
+			menuItems: [{
+				textKey: 'downloadPNG',
+				onclick: function () {
+					this.exportChart();
+				}
+			}, {
+				textKey: 'downloadJPEG',
+				onclick: function () {
+					this.exportChart({
+						type: 'image/jpeg'
+					});
+				}
+			}, {
+				textKey: 'downloadPDF',
+				onclick: function () {
+					this.exportChart({
+						type: 'application/pdf'
+					});
+				}
+			}, {
+				textKey: 'downloadSVG',
+				onclick: function () {
+					this.exportChart({
+						type: 'image/svg+xml'
+					});
+				}
+			}
+			// Enable this block to add "View SVG" to the dropdown menu
+			/*
+			,{
+
+				text: 'View SVG',
+				onclick: function () {
+					var svg = this.getSVG()
+						.replace(/</g, '\n&lt;')
+						.replace(/>/g, '&gt;');
+
+					doc.body.innerHTML = '<pre>' + svg + '</pre>';
+				}
+			} // */
+			]
+
+		},
+		printButton: {
+			//enabled: true,
+			symbol: 'printIcon',
+			x: -36,
+			symbolFill: '#B5C9DF',
+			hoverSymbolFill: '#779ABF',
+			_id: 'printButton',
+			_titleKey: 'printButtonTitle',
+			onclick: function () {
+				this.print();
+			}
+		}
+	}
+};
+
+// Add the Highcharts.post utility
+Highcharts.post = function (url, data) {
+	var name,
+		form;
+	
+	// create the form
+	form = createElement('form', {
+		method: 'post',
+		action: url,
+		enctype: 'multipart/form-data'
+	}, {
+		display: NONE
+	}, doc.body);
+
+	// add the data
+	for (name in data) {
+		createElement('input', {
+			type: HIDDEN,
+			name: name,
+			value: data[name]
+		}, null, form);
+	}
+
+	// submit
+	form.submit();
+
+	// clean up
+	discardElement(form);
+};
+
+extend(Chart.prototype, {
+	/**
+	 * Return an SVG representation of the chart
+	 *
+	 * @param additionalOptions {Object} Additional chart options for the generated SVG representation
+	 */
+	getSVG: function (additionalOptions) {
+		var chart = this,
+			chartCopy,
+			sandbox,
+			svg,
+			seriesOptions,
+			options = merge(chart.options, additionalOptions); // copy the options and add extra options
+
+		// IE compatibility hack for generating SVG content that it doesn't really understand
+		if (!doc.createElementNS) {
+			/*jslint unparam: true*//* allow unused parameter ns in function below */
+			doc.createElementNS = function (ns, tagName) {
+				return doc.createElement(tagName);
+			};
+			/*jslint unparam: false*/
+		}
+
+		// create a sandbox where a new chart will be generated
+		sandbox = createElement(DIV, null, {
+			position: ABSOLUTE,
+			top: '-9999em',
+			width: chart.chartWidth + PX,
+			height: chart.chartHeight + PX
+		}, doc.body);
+
+		// override some options
+		extend(options.chart, {
+			renderTo: sandbox,
+			forExport: true
+		});
+		options.exporting.enabled = false; // hide buttons in print
+		options.chart.plotBackgroundImage = null; // the converter doesn't handle images
+
+		// prepare for replicating the chart
+		options.series = [];
+		each(chart.series, function (serie) {
+			seriesOptions = merge(serie.options, {
+				animation: false, // turn off animation
+				showCheckbox: false,
+				visible: serie.visible
+			});
+
+			if (!seriesOptions.isInternal) { // used for the navigator series that has its own option set
+				options.series.push(seriesOptions);
+			}
+		});
+
+		// generate the chart copy
+		chartCopy = new Highcharts.Chart(options);
+
+		// reflect axis extremes in the export
+		each(['xAxis', 'yAxis'], function (axisType) {
+			each(chart[axisType], function (axis, i) {
+				var axisCopy = chartCopy[axisType][i],
+					extremes = axis.getExtremes(),
+					userMin = extremes.userMin,
+					userMax = extremes.userMax;
+
+				if (userMin !== UNDEFINED || userMax !== UNDEFINED) {
+					axisCopy.setExtremes(userMin, userMax, true, false);
+				}
+			});
+		});
+
+		// get the SVG from the container's innerHTML
+		svg = chartCopy.container.innerHTML;
+
+		// free up memory
+		options = null;
+		chartCopy.destroy();
+		discardElement(sandbox);
+
+		// sanitize
+		svg = svg
+			.replace(/zIndex="[^"]+"/g, '')
+			.replace(/isShadow="[^"]+"/g, '')
+			.replace(/symbolName="[^"]+"/g, '')
+			.replace(/jQuery[0-9]+="[^"]+"/g, '')
+			.replace(/isTracker="[^"]+"/g, '')
+			.replace(/url\([^#]+#/g, 'url(#')
+			.replace(/<svg /, '<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')
+			.replace(/ href=/g, ' xlink:href=')
+			.replace(/\n/, ' ')
+			.replace(/<\/svg>.*?$/, '</svg>') // any HTML added to the container after the SVG (#894)
+			/* This fails in IE < 8
+			.replace(/([0-9]+)\.([0-9]+)/g, function(s1, s2, s3) { // round off to save weight
+				return s2 +'.'+ s3[0];
+			})*/
+
+			// Replace HTML entities, issue #347
+			.replace(/&nbsp;/g, '\u00A0') // no-break space
+			.replace(/&shy;/g,  '\u00AD') // soft hyphen
+
+			// IE specific
+			.replace(/<IMG /g, '<image ')
+			.replace(/height=([^" ]+)/g, 'height="$1"')
+			.replace(/width=([^" ]+)/g, 'width="$1"')
+			.replace(/hc-svg-href="([^"]+)">/g, 'xlink:href="$1"/>')
+			.replace(/id=([^" >]+)/g, 'id="$1"')
+			.replace(/class=([^" ]+)/g, 'class="$1"')
+			.replace(/ transform /g, ' ')
+			.replace(/:(path|rect)/g, '$1')
+			.replace(/style="([^"]+)"/g, function (s) {
+				return s.toLowerCase();
+			});
+
+		// IE9 beta bugs with innerHTML. Test again with final IE9.
+		svg = svg.replace(/(url\(#highcharts-[0-9]+)&quot;/g, '$1')
+			.replace(/&quot;/g, "'");
+		if (svg.match(/ xmlns="/g).length === 2) {
+			svg = svg.replace(/xmlns="[^"]+"/, '');
+		}
+
+		return svg;
+	},
+
+	/**
+	 * Submit the SVG representation of the chart to the server
+	 * @param {Object} options Exporting options. Possible members are url, type and width.
+	 * @param {Object} chartOptions Additional chart options for the SVG representation of the chart
+	 */
+	exportChart: function (options, chartOptions) {
+		var exportingOptions = this.options.exporting,
+			svg = this.getSVG(merge(exportingOptions.chartOptions, chartOptions));
+
+		// merge the options
+		options = merge(exportingOptions, options);
+		
+		// do the post
+		Highcharts.post(options.url, {
+			filename: options.filename || 'chart',
+			type: options.type,
+			width: options.width,
+			scale: options.scale || 2,
+			svg: svg
+		});
+
+	},
+	
+	/**
+	 * Print the chart
+	 */
+	print: function () {
+
+		var chart = this,
+			container = chart.container,
+			origDisplay = [],
+			origParent = container.parentNode,
+			body = doc.body,
+			childNodes = body.childNodes;
+
+		if (chart.isPrinting) { // block the button while in printing mode
+			return;
+		}
+
+		chart.isPrinting = true;
+
+		// hide all body content
+		each(childNodes, function (node, i) {
+			if (node.nodeType === 1) {
+				origDisplay[i] = node.style.display;
+				node.style.display = NONE;
+			}
+		});
+
+		// pull out the chart
+		body.appendChild(container);
+
+		// print
+		win.print();
+
+		// allow the browser to prepare before reverting
+		setTimeout(function () {
+
+			// put the chart back in
+			origParent.appendChild(container);
+
+			// restore all body content
+			each(childNodes, function (node, i) {
+				if (node.nodeType === 1) {
+					node.style.display = origDisplay[i];
+				}
+			});
+
+			chart.isPrinting = false;
+
+		}, 1000);
+
+	},
+
+	/**
+	 * Display a popup menu for choosing the export type
+	 *
+	 * @param {String} name An identifier for the menu
+	 * @param {Array} items A collection with text and onclicks for the items
+	 * @param {Number} x The x position of the opener button
+	 * @param {Number} y The y position of the opener button
+	 * @param {Number} width The width of the opener button
+	 * @param {Number} height The height of the opener button
+	 */
+	contextMenu: function (name, items, x, y, width, height) {
+		var chart = this,
+			navOptions = chart.options.navigation,
+			menuItemStyle = navOptions.menuItemStyle,
+			chartWidth = chart.chartWidth,
+			chartHeight = chart.chartHeight,
+			cacheName = 'cache-' + name,
+			menu = chart[cacheName],
+			menuPadding = mathMax(width, height), // for mouse leave detection
+			boxShadow = '3px 3px 10px #888',
+			innerMenu,
+			hide,
+			hideTimer,
+			menuStyle;
+
+		// create the menu only the first time
+		if (!menu) {
+
+			// create a HTML element above the SVG
+			chart[cacheName] = menu = createElement(DIV, {
+				className: PREFIX + name
+			}, {
+				position: ABSOLUTE,
+				zIndex: 1000,
+				padding: menuPadding + PX
+			}, chart.container);
+
+			innerMenu = createElement(DIV, null,
+				extend({
+					MozBoxShadow: boxShadow,
+					WebkitBoxShadow: boxShadow,
+					boxShadow: boxShadow
+				}, navOptions.menuStyle), menu);
+
+			// hide on mouse out
+			hide = function () {
+				css(menu, { display: NONE });
+			};
+
+			// Hide the menu some time after mouse leave (#1357)
+			addEvent(menu, 'mouseleave', function () {
+				hideTimer = setTimeout(hide, 500);
+			});
+			addEvent(menu, 'mouseenter', function () {
+				clearTimeout(hideTimer);
+			});
+
+
+			// create the items
+			each(items, function (item) {
+				if (item) {
+					var div = createElement(DIV, {
+						onmouseover: function () {
+							css(this, navOptions.menuItemHoverStyle);
+						},
+						onmouseout: function () {
+							css(this, menuItemStyle);
+						},
+						innerHTML: item.text || chart.options.lang[item.textKey]
+					}, extend({
+						cursor: 'pointer'
+					}, menuItemStyle), innerMenu);
+
+					div.onclick = function () {
+						hide();
+						item.onclick.apply(chart, arguments);
+					};
+
+					// Keep references to menu divs to be able to destroy them
+					chart.exportDivElements.push(div);
+				}
+			});
+
+			// Keep references to menu and innerMenu div to be able to destroy them
+			chart.exportDivElements.push(innerMenu, menu);
+
+			chart.exportMenuWidth = menu.offsetWidth;
+			chart.exportMenuHeight = menu.offsetHeight;
+		}
+
+		menuStyle = { display: 'block' };
+
+		// if outside right, right align it
+		if (x + chart.exportMenuWidth > chartWidth) {
+			menuStyle.right = (chartWidth - x - width - menuPadding) + PX;
+		} else {
+			menuStyle.left = (x - menuPadding) + PX;
+		}
+		// if outside bottom, bottom align it
+		if (y + height + chart.exportMenuHeight > chartHeight) {
+			menuStyle.bottom = (chartHeight - y - menuPadding)  + PX;
+		} else {
+			menuStyle.top = (y + height - menuPadding) + PX;
+		}
+
+		css(menu, menuStyle);
+	},
+
+	/**
+	 * Add the export button to the chart
+	 */
+	addButton: function (options) {
+		var chart = this,
+			renderer = chart.renderer,
+			btnOptions = merge(chart.options.navigation.buttonOptions, options),
+			onclick = btnOptions.onclick,
+			menuItems = btnOptions.menuItems,
+			buttonWidth = btnOptions.width,
+			buttonHeight = btnOptions.height,
+			box,
+			symbol,
+			button,
+			menuKey,
+			borderWidth = btnOptions.borderWidth,
+			boxAttr = {
+				stroke: btnOptions.borderColor
+
+			},
+			symbolAttr = {
+				stroke: btnOptions.symbolStroke,
+				fill: btnOptions.symbolFill
+			},
+			symbolSize = btnOptions.symbolSize || 12;
+
+		if (!chart.btnCount) {
+			chart.btnCount = 0;
+		}
+		menuKey = chart.btnCount++;
+
+		// Keeps references to the button elements
+		if (!chart.exportDivElements) {
+			chart.exportDivElements = [];
+			chart.exportSVGElements = [];
+		}
+
+		if (btnOptions.enabled === false) {
+			return;
+		}
+
+		// element to capture the click
+		function revert() {
+			symbol.attr(symbolAttr);
+			box.attr(boxAttr);
+		}
+
+		// the box border
+		box = renderer.rect(
+			0,
+			0,
+			buttonWidth,
+			buttonHeight,
+			btnOptions.borderRadius,
+			borderWidth
+		)
+		//.translate(buttonLeft, buttonTop) // to allow gradients
+		.align(btnOptions, true)
+		.attr(extend({
+			fill: btnOptions.backgroundColor,
+			'stroke-width': borderWidth,
+			zIndex: 19
+		}, boxAttr)).add();
+
+		// the invisible element to track the clicks
+		button = renderer.rect(
+				0,
+				0,
+				buttonWidth,
+				buttonHeight,
+				0
+			)
+			.align(btnOptions)
+			.attr({
+				id: btnOptions._id,
+				fill: 'rgba(255, 255, 255, 0.001)',
+				title: chart.options.lang[btnOptions._titleKey],
+				zIndex: 21
+			}).css({
+				cursor: 'pointer'
+			})
+			.on('mouseover', function () {
+				symbol.attr({
+					stroke: btnOptions.hoverSymbolStroke,
+					fill: btnOptions.hoverSymbolFill
+				});
+				box.attr({
+					stroke: btnOptions.hoverBorderColor
+				});
+			})
+			.on('mouseout', revert)
+			.on('click', revert)
+			.add();
+
+		// add the click event
+		if (menuItems) {
+
+			onclick = function () {
+				revert();
+				var bBox = button.getBBox();
+				chart.contextMenu('menu' + menuKey, menuItems, bBox.x, bBox.y, buttonWidth, buttonHeight);
+			};
+		}
+		/*addEvent(button.element, 'click', function() {
+			onclick.apply(chart, arguments);
+		});*/
+		button.on('click', function () {
+			onclick.apply(chart, arguments);
+		});
+
+		// the icon
+		symbol = renderer.symbol(
+				btnOptions.symbol,
+				btnOptions.symbolX - (symbolSize / 2),
+				btnOptions.symbolY - (symbolSize / 2),
+				symbolSize,				
+				symbolSize
+			)
+			.align(btnOptions, true)
+			.attr(extend(symbolAttr, {
+				'stroke-width': btnOptions.symbolStrokeWidth || 1,
+				zIndex: 20
+			})).add();
+
+		// Keep references to the renderer element so to be able to destroy them later.
+		chart.exportSVGElements.push(box, button, symbol);
+	},
+
+	/**
+	 * Destroy the buttons.
+	 */
+	destroyExport: function () {
+		var i,
+			chart = this,
+			elem;
+
+		// Destroy the extra buttons added
+		for (i = 0; i < chart.exportSVGElements.length; i++) {
+			elem = chart.exportSVGElements[i];
+			// Destroy and null the svg/vml elements
+			elem.onclick = elem.ontouchstart = null;
+			chart.exportSVGElements[i] = elem.destroy();
+		}
+
+		// Destroy the divs for the menu
+		for (i = 0; i < chart.exportDivElements.length; i++) {
+			elem = chart.exportDivElements[i];
+
+			// Remove the event handler
+			removeEvent(elem, 'mouseleave');
+
+			// Remove inline events
+			chart.exportDivElements[i] = elem.onmouseout = elem.onmouseover = elem.ontouchstart = elem.onclick = null;
+
+			// Destroy the div by moving to garbage bin
+			discardElement(elem);
+		}
+	}
+});
+
+/**
+ * Crisp for 1px stroke width, which is default. In the future, consider a smarter,
+ * global function.
+ */
+function crisp(arr) {
+	var i = arr.length;
+	while (i--) {
+		if (typeof arr[i] === 'number') {
+			arr[i] = Math.round(arr[i]) - 0.5;		
+		}
+	}
+	return arr;
+}
+
+// Create the export icon
+symbols.exportIcon = function (x, y, width, height) {
+	return crisp([
+		M, // the disk
+		x, y + width,
+		L,
+		x + width, y + height,
+		x + width, y + height * 0.8,
+		x, y + height * 0.8,
+		'Z',
+		M, // the arrow
+		x + width * 0.5, y + height * 0.8,
+		L,
+		x + width * 0.8, y + height * 0.4,
+		x + width * 0.4, y + height * 0.4,
+		x + width * 0.4, y,
+		x + width * 0.6, y,
+		x + width * 0.6, y + height * 0.4,
+		x + width * 0.2, y + height * 0.4,
+		'Z'
+	]);
+};
+// Create the print icon
+symbols.printIcon = function (x, y, width, height) {
+	return crisp([
+		M, // the printer
+		x, y + height * 0.7,
+		L,
+		x + width, y + height * 0.7,
+		x + width, y + height * 0.4,
+		x, y + height * 0.4,
+		'Z',
+		M, // the upper sheet
+		x + width * 0.2, y + height * 0.4,
+		L,
+		x + width * 0.2, y,
+		x + width * 0.8, y,
+		x + width * 0.8, y + height * 0.4,
+		'Z',
+		M, // the lower sheet
+		x + width * 0.2, y + height * 0.7,
+		L,
+		x, y + height,
+		x + width, y + height,
+		x + width * 0.8, y + height * 0.7,
+		'Z'
+	]);
+};
+
+
+// Add the buttons on chart load
+Chart.prototype.callbacks.push(function (chart) {
+	var n,
+		exportingOptions = chart.options.exporting,
+		buttons = exportingOptions.buttons;
+
+	if (exportingOptions.enabled !== false) {
+
+		for (n in buttons) {
+			chart.addButton(buttons[n]);
+		}
+
+		// Destroy the export elements at chart destroy
+		addEvent(chart, 'destroy', chart.destroyExport);
+	}
+
+});
+
+
+}(Highcharts));

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/themes/dark-blue.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/themes/dark-blue.js b/portal/js/libs/Highcharts-2.3.5/js/themes/dark-blue.js
new file mode 100644
index 0000000..5650255
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/themes/dark-blue.js
@@ -0,0 +1,263 @@
+/**
+ * Dark blue theme for Highcharts JS
+ * @author Torstein Hønsi
+ */
+
+Highcharts.theme = {
+	colors: ["#DDDF0D", "#55BF3B", "#DF5353", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee",
+		"#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
+	chart: {
+		backgroundColor: {
+			linearGradient: { x1: 0, y1: 0, x2: 1, y2: 1 },
+			stops: [
+				[0, 'rgb(48, 48, 96)'],
+				[1, 'rgb(0, 0, 0)']
+			]
+		},
+		borderColor: '#000000',
+		borderWidth: 2,
+		className: 'dark-container',
+		plotBackgroundColor: 'rgba(255, 255, 255, .1)',
+		plotBorderColor: '#CCCCCC',
+		plotBorderWidth: 1
+	},
+	title: {
+		style: {
+			color: '#C0C0C0',
+			font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
+		}
+	},
+	subtitle: {
+		style: {
+			color: '#666666',
+			font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
+		}
+	},
+	xAxis: {
+		gridLineColor: '#333333',
+		gridLineWidth: 1,
+		labels: {
+			style: {
+				color: '#A0A0A0'
+			}
+		},
+		lineColor: '#A0A0A0',
+		tickColor: '#A0A0A0',
+		title: {
+			style: {
+				color: '#CCC',
+				fontWeight: 'bold',
+				fontSize: '12px',
+				fontFamily: 'Trebuchet MS, Verdana, sans-serif'
+
+			}
+		}
+	},
+	yAxis: {
+		gridLineColor: '#333333',
+		labels: {
+			style: {
+				color: '#A0A0A0'
+			}
+		},
+		lineColor: '#A0A0A0',
+		minorTickInterval: null,
+		tickColor: '#A0A0A0',
+		tickWidth: 1,
+		title: {
+			style: {
+				color: '#CCC',
+				fontWeight: 'bold',
+				fontSize: '12px',
+				fontFamily: 'Trebuchet MS, Verdana, sans-serif'
+			}
+		}
+	},
+	tooltip: {
+		backgroundColor: 'rgba(0, 0, 0, 0.75)',
+		style: {
+			color: '#F0F0F0'
+		}
+	},
+	toolbar: {
+		itemStyle: {
+			color: 'silver'
+		}
+	},
+	plotOptions: {
+		line: {
+			dataLabels: {
+				color: '#CCC'
+			},
+			marker: {
+				lineColor: '#333'
+			}
+		},
+		spline: {
+			marker: {
+				lineColor: '#333'
+			}
+		},
+		scatter: {
+			marker: {
+				lineColor: '#333'
+			}
+		},
+		candlestick: {
+			lineColor: 'white'
+		}
+	},
+	legend: {
+		itemStyle: {
+			font: '9pt Trebuchet MS, Verdana, sans-serif',
+			color: '#A0A0A0'
+		},
+		itemHoverStyle: {
+			color: '#FFF'
+		},
+		itemHiddenStyle: {
+			color: '#444'
+		}
+	},
+	credits: {
+		style: {
+			color: '#666'
+		}
+	},
+	labels: {
+		style: {
+			color: '#CCC'
+		}
+	},
+
+	navigation: {
+		buttonOptions: {
+			backgroundColor: {
+				linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+				stops: [
+					[0.4, '#606060'],
+					[0.6, '#333333']
+				]
+			},
+			borderColor: '#000000',
+			symbolStroke: '#C0C0C0',
+			hoverSymbolStroke: '#FFFFFF'
+		}
+	},
+
+	exporting: {
+		buttons: {
+			exportButton: {
+				symbolFill: '#55BE3B'
+			},
+			printButton: {
+				symbolFill: '#7797BE'
+			}
+		}
+	},
+
+	// scroll charts
+	rangeSelector: {
+		buttonTheme: {
+			fill: {
+				linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+				stops: [
+					[0.4, '#888'],
+					[0.6, '#555']
+				]
+			},
+			stroke: '#000000',
+			style: {
+				color: '#CCC',
+				fontWeight: 'bold'
+			},
+			states: {
+				hover: {
+					fill: {
+						linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+						stops: [
+							[0.4, '#BBB'],
+							[0.6, '#888']
+						]
+					},
+					stroke: '#000000',
+					style: {
+						color: 'white'
+					}
+				},
+				select: {
+					fill: {
+						linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+						stops: [
+							[0.1, '#000'],
+							[0.3, '#333']
+						]
+					},
+					stroke: '#000000',
+					style: {
+						color: 'yellow'
+					}
+				}
+			}
+		},
+		inputStyle: {
+			backgroundColor: '#333',
+			color: 'silver'
+		},
+		labelStyle: {
+			color: 'silver'
+		}
+	},
+
+	navigator: {
+		handles: {
+			backgroundColor: '#666',
+			borderColor: '#AAA'
+		},
+		outlineColor: '#CCC',
+		maskFill: 'rgba(16, 16, 16, 0.5)',
+		series: {
+			color: '#7798BF',
+			lineColor: '#A6C7ED'
+		}
+	},
+
+	scrollbar: {
+		barBackgroundColor: {
+				linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+				stops: [
+					[0.4, '#888'],
+					[0.6, '#555']
+				]
+			},
+		barBorderColor: '#CCC',
+		buttonArrowColor: '#CCC',
+		buttonBackgroundColor: {
+				linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+				stops: [
+					[0.4, '#888'],
+					[0.6, '#555']
+				]
+			},
+		buttonBorderColor: '#CCC',
+		rifleColor: '#FFF',
+		trackBackgroundColor: {
+			linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+			stops: [
+				[0, '#000'],
+				[1, '#333']
+			]
+		},
+		trackBorderColor: '#666'
+	},
+
+	// special colors for some of the
+	legendBackgroundColor: 'rgba(0, 0, 0, 0.5)',
+	legendBackgroundColorSolid: 'rgb(35, 35, 70)',
+	dataLabelsColor: '#444',
+	textColor: '#C0C0C0',
+	maskColor: 'rgba(255,255,255,0.3)'
+};
+
+// Apply the theme
+var highchartsOptions = Highcharts.setOptions(Highcharts.theme);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/themes/dark-green.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/themes/dark-green.js b/portal/js/libs/Highcharts-2.3.5/js/themes/dark-green.js
new file mode 100644
index 0000000..b51d8fa
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/themes/dark-green.js
@@ -0,0 +1,263 @@
+/**
+ * Dark blue theme for Highcharts JS
+ * @author Torstein Hønsi
+ */
+
+Highcharts.theme = {
+	colors: ["#DDDF0D", "#55BF3B", "#DF5353", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee",
+		"#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
+	chart: {
+		backgroundColor: {
+			linearGradient: [0, 0, 250, 500],
+			stops: [
+				[0, 'rgb(48, 96, 48)'],
+				[1, 'rgb(0, 0, 0)']
+			]
+		},
+		borderColor: '#000000',
+		borderWidth: 2,
+		className: 'dark-container',
+		plotBackgroundColor: 'rgba(255, 255, 255, .1)',
+		plotBorderColor: '#CCCCCC',
+		plotBorderWidth: 1
+	},
+	title: {
+		style: {
+			color: '#C0C0C0',
+			font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
+		}
+	},
+	subtitle: {
+		style: {
+			color: '#666666',
+			font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
+		}
+	},
+	xAxis: {
+		gridLineColor: '#333333',
+		gridLineWidth: 1,
+		labels: {
+			style: {
+				color: '#A0A0A0'
+			}
+		},
+		lineColor: '#A0A0A0',
+		tickColor: '#A0A0A0',
+		title: {
+			style: {
+				color: '#CCC',
+				fontWeight: 'bold',
+				fontSize: '12px',
+				fontFamily: 'Trebuchet MS, Verdana, sans-serif'
+
+			}
+		}
+	},
+	yAxis: {
+		gridLineColor: '#333333',
+		labels: {
+			style: {
+				color: '#A0A0A0'
+			}
+		},
+		lineColor: '#A0A0A0',
+		minorTickInterval: null,
+		tickColor: '#A0A0A0',
+		tickWidth: 1,
+		title: {
+			style: {
+				color: '#CCC',
+				fontWeight: 'bold',
+				fontSize: '12px',
+				fontFamily: 'Trebuchet MS, Verdana, sans-serif'
+			}
+		}
+	},
+	tooltip: {
+		backgroundColor: 'rgba(0, 0, 0, 0.75)',
+		style: {
+			color: '#F0F0F0'
+		}
+	},
+	toolbar: {
+		itemStyle: {
+			color: 'silver'
+		}
+	},
+	plotOptions: {
+		line: {
+			dataLabels: {
+				color: '#CCC'
+			},
+			marker: {
+				lineColor: '#333'
+			}
+		},
+		spline: {
+			marker: {
+				lineColor: '#333'
+			}
+		},
+		scatter: {
+			marker: {
+				lineColor: '#333'
+			}
+		},
+		candlestick: {
+			lineColor: 'white'
+		}
+	},
+	legend: {
+		itemStyle: {
+			font: '9pt Trebuchet MS, Verdana, sans-serif',
+			color: '#A0A0A0'
+		},
+		itemHoverStyle: {
+			color: '#FFF'
+		},
+		itemHiddenStyle: {
+			color: '#444'
+		}
+	},
+	credits: {
+		style: {
+			color: '#666'
+		}
+	},
+	labels: {
+		style: {
+			color: '#CCC'
+		}
+	},
+
+	navigation: {
+		buttonOptions: {
+			backgroundColor: {
+				linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+				stops: [
+					[0.4, '#606060'],
+					[0.6, '#333333']
+				]
+			},
+			borderColor: '#000000',
+			symbolStroke: '#C0C0C0',
+			hoverSymbolStroke: '#FFFFFF'
+		}
+	},
+
+	exporting: {
+		buttons: {
+			exportButton: {
+				symbolFill: '#55BE3B'
+			},
+			printButton: {
+				symbolFill: '#7797BE'
+			}
+		}
+	},
+
+	// scroll charts
+	rangeSelector: {
+		buttonTheme: {
+			fill: {
+				linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+				stops: [
+					[0.4, '#888'],
+					[0.6, '#555']
+				]
+			},
+			stroke: '#000000',
+			style: {
+				color: '#CCC',
+				fontWeight: 'bold'
+			},
+			states: {
+				hover: {
+					fill: {
+						linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+						stops: [
+							[0.4, '#BBB'],
+							[0.6, '#888']
+						]
+					},
+					stroke: '#000000',
+					style: {
+						color: 'white'
+					}
+				},
+				select: {
+					fill: {
+						linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+						stops: [
+							[0.1, '#000'],
+							[0.3, '#333']
+						]
+					},
+					stroke: '#000000',
+					style: {
+						color: 'yellow'
+					}
+				}
+			}
+		},
+		inputStyle: {
+			backgroundColor: '#333',
+			color: 'silver'
+		},
+		labelStyle: {
+			color: 'silver'
+		}
+	},
+
+	navigator: {
+		handles: {
+			backgroundColor: '#666',
+			borderColor: '#AAA'
+		},
+		outlineColor: '#CCC',
+		maskFill: 'rgba(16, 16, 16, 0.5)',
+		series: {
+			color: '#7798BF',
+			lineColor: '#A6C7ED'
+		}
+	},
+
+	scrollbar: {
+		barBackgroundColor: {
+				linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+				stops: [
+					[0.4, '#888'],
+					[0.6, '#555']
+				]
+			},
+		barBorderColor: '#CCC',
+		buttonArrowColor: '#CCC',
+		buttonBackgroundColor: {
+				linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+				stops: [
+					[0.4, '#888'],
+					[0.6, '#555']
+				]
+			},
+		buttonBorderColor: '#CCC',
+		rifleColor: '#FFF',
+		trackBackgroundColor: {
+			linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+			stops: [
+				[0, '#000'],
+				[1, '#333']
+			]
+		},
+		trackBorderColor: '#666'
+	},
+
+	// special colors for some of the
+	legendBackgroundColor: 'rgba(0, 0, 0, 0.5)',
+	legendBackgroundColorSolid: 'rgb(35, 35, 70)',
+	dataLabelsColor: '#444',
+	textColor: '#C0C0C0',
+	maskColor: 'rgba(255,255,255,0.3)'
+};
+
+// Apply the theme
+var highchartsOptions = Highcharts.setOptions(Highcharts.theme);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/themes/gray.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/themes/gray.js b/portal/js/libs/Highcharts-2.3.5/js/themes/gray.js
new file mode 100644
index 0000000..4dddaa8
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/themes/gray.js
@@ -0,0 +1,262 @@
+/**
+ * Gray theme for Highcharts JS
+ * @author Torstein Hønsi
+ */
+
+Highcharts.theme = {
+	colors: ["#DDDF0D", "#7798BF", "#55BF3B", "#DF5353", "#aaeeee", "#ff0066", "#eeaaee",
+		"#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
+	chart: {
+		backgroundColor: {
+			linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+			stops: [
+				[0, 'rgb(96, 96, 96)'],
+				[1, 'rgb(16, 16, 16)']
+			]
+		},
+		borderWidth: 0,
+		borderRadius: 15,
+		plotBackgroundColor: null,
+		plotShadow: false,
+		plotBorderWidth: 0
+	},
+	title: {
+		style: {
+			color: '#FFF',
+			font: '16px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+		}
+	},
+	subtitle: {
+		style: {
+			color: '#DDD',
+			font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+		}
+	},
+	xAxis: {
+		gridLineWidth: 0,
+		lineColor: '#999',
+		tickColor: '#999',
+		labels: {
+			style: {
+				color: '#999',
+				fontWeight: 'bold'
+			}
+		},
+		title: {
+			style: {
+				color: '#AAA',
+				font: 'bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+			}
+		}
+	},
+	yAxis: {
+		alternateGridColor: null,
+		minorTickInterval: null,
+		gridLineColor: 'rgba(255, 255, 255, .1)',
+		lineWidth: 0,
+		tickWidth: 0,
+		labels: {
+			style: {
+				color: '#999',
+				fontWeight: 'bold'
+			}
+		},
+		title: {
+			style: {
+				color: '#AAA',
+				font: 'bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+			}
+		}
+	},
+	legend: {
+		itemStyle: {
+			color: '#CCC'
+		},
+		itemHoverStyle: {
+			color: '#FFF'
+		},
+		itemHiddenStyle: {
+			color: '#333'
+		}
+	},
+	labels: {
+		style: {
+			color: '#CCC'
+		}
+	},
+	tooltip: {
+		backgroundColor: {
+			linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+			stops: [
+				[0, 'rgba(96, 96, 96, .8)'],
+				[1, 'rgba(16, 16, 16, .8)']
+			]
+		},
+		borderWidth: 0,
+		style: {
+			color: '#FFF'
+		}
+	},
+
+
+	plotOptions: {
+		line: {
+			dataLabels: {
+				color: '#CCC'
+			},
+			marker: {
+				lineColor: '#333'
+			}
+		},
+		spline: {
+			marker: {
+				lineColor: '#333'
+			}
+		},
+		scatter: {
+			marker: {
+				lineColor: '#333'
+			}
+		},
+		candlestick: {
+			lineColor: 'white'
+		}
+	},
+
+	toolbar: {
+		itemStyle: {
+			color: '#CCC'
+		}
+	},
+
+	navigation: {
+		buttonOptions: {
+			backgroundColor: {
+				linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+				stops: [
+					[0.4, '#606060'],
+					[0.6, '#333333']
+				]
+			},
+			borderColor: '#000000',
+			symbolStroke: '#C0C0C0',
+			hoverSymbolStroke: '#FFFFFF'
+		}
+	},
+
+	exporting: {
+		buttons: {
+			exportButton: {
+				symbolFill: '#55BE3B'
+			},
+			printButton: {
+				symbolFill: '#7797BE'
+			}
+		}
+	},
+
+	// scroll charts
+	rangeSelector: {
+		buttonTheme: {
+			fill: {
+				linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+				stops: [
+					[0.4, '#888'],
+					[0.6, '#555']
+				]
+			},
+			stroke: '#000000',
+			style: {
+				color: '#CCC',
+				fontWeight: 'bold'
+			},
+			states: {
+				hover: {
+					fill: {
+						linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+						stops: [
+							[0.4, '#BBB'],
+							[0.6, '#888']
+						]
+					},
+					stroke: '#000000',
+					style: {
+						color: 'white'
+					}
+				},
+				select: {
+					fill: {
+						linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+						stops: [
+							[0.1, '#000'],
+							[0.3, '#333']
+						]
+					},
+					stroke: '#000000',
+					style: {
+						color: 'yellow'
+					}
+				}
+			}
+		},
+		inputStyle: {
+			backgroundColor: '#333',
+			color: 'silver'
+		},
+		labelStyle: {
+			color: 'silver'
+		}
+	},
+
+	navigator: {
+		handles: {
+			backgroundColor: '#666',
+			borderColor: '#AAA'
+		},
+		outlineColor: '#CCC',
+		maskFill: 'rgba(16, 16, 16, 0.5)',
+		series: {
+			color: '#7798BF',
+			lineColor: '#A6C7ED'
+		}
+	},
+
+	scrollbar: {
+		barBackgroundColor: {
+				linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+				stops: [
+					[0.4, '#888'],
+					[0.6, '#555']
+				]
+			},
+		barBorderColor: '#CCC',
+		buttonArrowColor: '#CCC',
+		buttonBackgroundColor: {
+				linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+				stops: [
+					[0.4, '#888'],
+					[0.6, '#555']
+				]
+			},
+		buttonBorderColor: '#CCC',
+		rifleColor: '#FFF',
+		trackBackgroundColor: {
+			linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+			stops: [
+				[0, '#000'],
+				[1, '#333']
+			]
+		},
+		trackBorderColor: '#666'
+	},
+
+	// special colors for some of the demo examples
+	legendBackgroundColor: 'rgba(48, 48, 48, 0.8)',
+	legendBackgroundColorSolid: 'rgb(70, 70, 70)',
+	dataLabelsColor: '#444',
+	textColor: '#E0E0E0',
+	maskColor: 'rgba(255,255,255,0.3)'
+};
+
+// Apply the theme
+var highchartsOptions = Highcharts.setOptions(Highcharts.theme);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/themes/grid.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/themes/grid.js b/portal/js/libs/Highcharts-2.3.5/js/themes/grid.js
new file mode 100644
index 0000000..2f303d3
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/themes/grid.js
@@ -0,0 +1,95 @@
+/**
+ * Grid theme for Highcharts JS
+ * @author Torstein Hønsi
+ */
+
+Highcharts.theme = {
+	colors: ['#058DC7', '#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572', '#FF9655', '#FFF263', '#6AF9C4'],
+	chart: {
+		backgroundColor: {
+			linearGradient: { x1: 0, y1: 0, x2: 1, y2: 1 },
+			stops: [
+				[0, 'rgb(255, 255, 255)'],
+				[1, 'rgb(240, 240, 255)']
+			]
+		},
+		borderWidth: 2,
+		plotBackgroundColor: 'rgba(255, 255, 255, .9)',
+		plotShadow: true,
+		plotBorderWidth: 1
+	},
+	title: {
+		style: {
+			color: '#000',
+			font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
+		}
+	},
+	subtitle: {
+		style: {
+			color: '#666666',
+			font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
+		}
+	},
+	xAxis: {
+		gridLineWidth: 1,
+		lineColor: '#000',
+		tickColor: '#000',
+		labels: {
+			style: {
+				color: '#000',
+				font: '11px Trebuchet MS, Verdana, sans-serif'
+			}
+		},
+		title: {
+			style: {
+				color: '#333',
+				fontWeight: 'bold',
+				fontSize: '12px',
+				fontFamily: 'Trebuchet MS, Verdana, sans-serif'
+
+			}
+		}
+	},
+	yAxis: {
+		minorTickInterval: 'auto',
+		lineColor: '#000',
+		lineWidth: 1,
+		tickWidth: 1,
+		tickColor: '#000',
+		labels: {
+			style: {
+				color: '#000',
+				font: '11px Trebuchet MS, Verdana, sans-serif'
+			}
+		},
+		title: {
+			style: {
+				color: '#333',
+				fontWeight: 'bold',
+				fontSize: '12px',
+				fontFamily: 'Trebuchet MS, Verdana, sans-serif'
+			}
+		}
+	},
+	legend: {
+		itemStyle: {
+			font: '9pt Trebuchet MS, Verdana, sans-serif',
+			color: 'black'
+
+		},
+		itemHoverStyle: {
+			color: '#039'
+		},
+		itemHiddenStyle: {
+			color: 'gray'
+		}
+	},
+	labels: {
+		style: {
+			color: '#99b'
+		}
+	}
+};
+
+// Apply the theme
+var highchartsOptions = Highcharts.setOptions(Highcharts.theme);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/themes/skies.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/themes/skies.js b/portal/js/libs/Highcharts-2.3.5/js/themes/skies.js
new file mode 100644
index 0000000..9ade1fe
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/themes/skies.js
@@ -0,0 +1,89 @@
+/**
+ * Skies theme for Highcharts JS
+ * @author Torstein Hønsi
+ */
+
+Highcharts.theme = {
+	colors: ["#514F78", "#42A07B", "#9B5E4A", "#72727F", "#1F949A", "#82914E", "#86777F", "#42A07B"],
+	chart: {
+		className: 'skies',
+		borderWidth: 0,
+		plotShadow: true,
+		plotBackgroundImage: '/demo/gfx/skies.jpg',
+		plotBackgroundColor: {
+			linearGradient: [0, 0, 250, 500],
+			stops: [
+				[0, 'rgba(255, 255, 255, 1)'],
+				[1, 'rgba(255, 255, 255, 0)']
+			]
+		},
+		plotBorderWidth: 1
+	},
+	title: {
+		style: {
+			color: '#3E576F',
+			font: '16px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+		}
+	},
+	subtitle: {
+		style: {
+			color: '#6D869F',
+			font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+		}
+	},
+	xAxis: {
+		gridLineWidth: 0,
+		lineColor: '#C0D0E0',
+		tickColor: '#C0D0E0',
+		labels: {
+			style: {
+				color: '#666',
+				fontWeight: 'bold'
+			}
+		},
+		title: {
+			style: {
+				color: '#666',
+				font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+			}
+		}
+	},
+	yAxis: {
+		alternateGridColor: 'rgba(255, 255, 255, .5)',
+		lineColor: '#C0D0E0',
+		tickColor: '#C0D0E0',
+		tickWidth: 1,
+		labels: {
+			style: {
+				color: '#666',
+				fontWeight: 'bold'
+			}
+		},
+		title: {
+			style: {
+				color: '#666',
+				font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+			}
+		}
+	},
+	legend: {
+		itemStyle: {
+			font: '9pt Trebuchet MS, Verdana, sans-serif',
+			color: '#3E576F'
+		},
+		itemHoverStyle: {
+			color: 'black'
+		},
+		itemHiddenStyle: {
+			color: 'silver'
+		}
+	},
+	labels: {
+		style: {
+			color: '#3E576F'
+		}
+	}
+};
+
+// Apply the theme
+var highchartsOptions = Highcharts.setOptions(Highcharts.theme);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/MD5.min.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/MD5.min.js b/portal/js/libs/MD5.min.js
new file mode 100755
index 0000000..0bfc085
--- /dev/null
+++ b/portal/js/libs/MD5.min.js
@@ -0,0 +1 @@
+var MD5=function(a){function n(a){a=a.replace(/\r\n/g,"\n");var b="";for(var c=0;c<a.length;c++){var d=a.charCodeAt(c);if(d<128){b+=String.fromCharCode(d)}else if(d>127&&d<2048){b+=String.fromCharCode(d>>6|192);b+=String.fromCharCode(d&63|128)}else{b+=String.fromCharCode(d>>12|224);b+=String.fromCharCode(d>>6&63|128);b+=String.fromCharCode(d&63|128)}}return b}function m(a){var b="",c="",d,e;for(e=0;e<=3;e++){d=a>>>e*8&255;c="0"+d.toString(16);b=b+c.substr(c.length-2,2)}return b}function l(a){var b;var c=a.length;var d=c+8;var e=(d-d%64)/64;var f=(e+1)*16;var g=Array(f-1);var h=0;var i=0;while(i<c){b=(i-i%4)/4;h=i%4*8;g[b]=g[b]|a.charCodeAt(i)<<h;i++}b=(i-i%4)/4;h=i%4*8;g[b]=g[b]|128<<h;g[f-2]=c<<3;g[f-1]=c>>>29;return g}function k(a,d,e,f,h,i,j){a=c(a,c(c(g(d,e,f),h),j));return c(b(a,i),d)}function j(a,d,e,g,h,i,j){a=c(a,c(c(f(d,e,g),h),j));return c(b(a,i),d)}function i(a,d,f,g,h,i,j){a=c(a,c(c(e(d,f,g),h),j));return c(b(a,i),d)}function h(a,e,f,g,h,i,j){a=c(a,c(c(d(e,f,g),h),j));re
 turn c(b(a,i),e)}function g(a,b,c){return b^(a|~c)}function f(a,b,c){return a^b^c}function e(a,b,c){return a&c|b&~c}function d(a,b,c){return a&b|~a&c}function c(a,b){var c,d,e,f,g;e=a&2147483648;f=b&2147483648;c=a&1073741824;d=b&1073741824;g=(a&1073741823)+(b&1073741823);if(c&d){return g^2147483648^e^f}if(c|d){if(g&1073741824){return g^3221225472^e^f}else{return g^1073741824^e^f}}else{return g^e^f}}function b(a,b){return a<<b|a>>>32-b}var o=Array();var p,q,r,s,t,u,v,w,x;var y=7,z=12,A=17,B=22;var C=5,D=9,E=14,F=20;var G=4,H=11,I=16,J=23;var K=6,L=10,M=15,N=21;a=n(a);o=l(a);u=1732584193;v=4023233417;w=2562383102;x=271733878;for(p=0;p<o.length;p+=16){q=u;r=v;s=w;t=x;u=h(u,v,w,x,o[p+0],y,3614090360);x=h(x,u,v,w,o[p+1],z,3905402710);w=h(w,x,u,v,o[p+2],A,606105819);v=h(v,w,x,u,o[p+3],B,3250441966);u=h(u,v,w,x,o[p+4],y,4118548399);x=h(x,u,v,w,o[p+5],z,1200080426);w=h(w,x,u,v,o[p+6],A,2821735955);v=h(v,w,x,u,o[p+7],B,4249261313);u=h(u,v,w,x,o[p+8],y,1770035416);x=h(x,u,v,w,o[p+9],z,2336552
 879);w=h(w,x,u,v,o[p+10],A,4294925233);v=h(v,w,x,u,o[p+11],B,2304563134);u=h(u,v,w,x,o[p+12],y,1804603682);x=h(x,u,v,w,o[p+13],z,4254626195);w=h(w,x,u,v,o[p+14],A,2792965006);v=h(v,w,x,u,o[p+15],B,1236535329);u=i(u,v,w,x,o[p+1],C,4129170786);x=i(x,u,v,w,o[p+6],D,3225465664);w=i(w,x,u,v,o[p+11],E,643717713);v=i(v,w,x,u,o[p+0],F,3921069994);u=i(u,v,w,x,o[p+5],C,3593408605);x=i(x,u,v,w,o[p+10],D,38016083);w=i(w,x,u,v,o[p+15],E,3634488961);v=i(v,w,x,u,o[p+4],F,3889429448);u=i(u,v,w,x,o[p+9],C,568446438);x=i(x,u,v,w,o[p+14],D,3275163606);w=i(w,x,u,v,o[p+3],E,4107603335);v=i(v,w,x,u,o[p+8],F,1163531501);u=i(u,v,w,x,o[p+13],C,2850285829);x=i(x,u,v,w,o[p+2],D,4243563512);w=i(w,x,u,v,o[p+7],E,1735328473);v=i(v,w,x,u,o[p+12],F,2368359562);u=j(u,v,w,x,o[p+5],G,4294588738);x=j(x,u,v,w,o[p+8],H,2272392833);w=j(w,x,u,v,o[p+11],I,1839030562);v=j(v,w,x,u,o[p+14],J,4259657740);u=j(u,v,w,x,o[p+1],G,2763975236);x=j(x,u,v,w,o[p+4],H,1272893353);w=j(w,x,u,v,o[p+7],I,4139469664);v=j(v,w,x,u,o[p+10],J,320
 0236656);u=j(u,v,w,x,o[p+13],G,681279174);x=j(x,u,v,w,o[p+0],H,3936430074);w=j(w,x,u,v,o[p+3],I,3572445317);v=j(v,w,x,u,o[p+6],J,76029189);u=j(u,v,w,x,o[p+9],G,3654602809);x=j(x,u,v,w,o[p+12],H,3873151461);w=j(w,x,u,v,o[p+15],I,530742520);v=j(v,w,x,u,o[p+2],J,3299628645);u=k(u,v,w,x,o[p+0],K,4096336452);x=k(x,u,v,w,o[p+7],L,1126891415);w=k(w,x,u,v,o[p+14],M,2878612391);v=k(v,w,x,u,o[p+5],N,4237533241);u=k(u,v,w,x,o[p+12],K,1700485571);x=k(x,u,v,w,o[p+3],L,2399980690);w=k(w,x,u,v,o[p+10],M,4293915773);v=k(v,w,x,u,o[p+1],N,2240044497);u=k(u,v,w,x,o[p+8],K,1873313359);x=k(x,u,v,w,o[p+15],L,4264355552);w=k(w,x,u,v,o[p+6],M,2734768916);v=k(v,w,x,u,o[p+13],N,1309151649);u=k(u,v,w,x,o[p+4],K,4149444226);x=k(x,u,v,w,o[p+11],L,3174756917);w=k(w,x,u,v,o[p+2],M,718787259);v=k(v,w,x,u,o[p+9],N,3951481745);u=c(u,q);v=c(v,r);w=c(w,s);x=c(x,t)}var O=m(u)+m(v)+m(w)+m(x);return O.toLowerCase()}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.0.5/angular-cookies.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.0.5/angular-cookies.js b/portal/js/libs/angular-1.0.5/angular-cookies.js
new file mode 100644
index 0000000..fbf0acb
--- /dev/null
+++ b/portal/js/libs/angular-1.0.5/angular-cookies.js
@@ -0,0 +1,183 @@
+/**
+ * @license AngularJS v1.0.5
+ * (c) 2010-2012 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, angular, undefined) {
+'use strict';
+
+/**
+ * @ngdoc overview
+ * @name ngCookies
+ */
+
+
+angular.module('ngCookies', ['ng']).
+  /**
+   * @ngdoc object
+   * @name ngCookies.$cookies
+   * @requires $browser
+   *
+   * @description
+   * Provides read/write access to browser's cookies.
+   *
+   * Only a simple Object is exposed and by adding or removing properties to/from
+   * this object, new cookies are created/deleted at the end of current $eval.
+   *
+   * @example
+   <doc:example>
+     <doc:source>
+       <script>
+         function ExampleController($cookies) {
+           // Retrieving a cookie
+           var favoriteCookie = $cookies.myFavorite;
+           // Setting a cookie
+           $cookies.myFavorite = 'oatmeal';
+         }
+       </script>
+     </doc:source>
+   </doc:example>
+   */
+   factory('$cookies', ['$rootScope', '$browser', function ($rootScope, $browser) {
+      var cookies = {},
+          lastCookies = {},
+          lastBrowserCookies,
+          runEval = false,
+          copy = angular.copy,
+          isUndefined = angular.isUndefined;
+
+      //creates a poller fn that copies all cookies from the $browser to service & inits the service
+      $browser.addPollFn(function() {
+        var currentCookies = $browser.cookies();
+        if (lastBrowserCookies != currentCookies) { //relies on browser.cookies() impl
+          lastBrowserCookies = currentCookies;
+          copy(currentCookies, lastCookies);
+          copy(currentCookies, cookies);
+          if (runEval) $rootScope.$apply();
+        }
+      })();
+
+      runEval = true;
+
+      //at the end of each eval, push cookies
+      //TODO: this should happen before the "delayed" watches fire, because if some cookies are not
+      //      strings or browser refuses to store some cookies, we update the model in the push fn.
+      $rootScope.$watch(push);
+
+      return cookies;
+
+
+      /**
+       * Pushes all the cookies from the service to the browser and verifies if all cookies were stored.
+       */
+      function push() {
+        var name,
+            value,
+            browserCookies,
+            updated;
+
+        //delete any cookies deleted in $cookies
+        for (name in lastCookies) {
+          if (isUndefined(cookies[name])) {
+            $browser.cookies(name, undefined);
+          }
+        }
+
+        //update all cookies updated in $cookies
+        for(name in cookies) {
+          value = cookies[name];
+          if (!angular.isString(value)) {
+            if (angular.isDefined(lastCookies[name])) {
+              cookies[name] = lastCookies[name];
+            } else {
+              delete cookies[name];
+            }
+          } else if (value !== lastCookies[name]) {
+            $browser.cookies(name, value);
+            updated = true;
+          }
+        }
+
+        //verify what was actually stored
+        if (updated){
+          updated = false;
+          browserCookies = $browser.cookies();
+
+          for (name in cookies) {
+            if (cookies[name] !== browserCookies[name]) {
+              //delete or reset all cookies that the browser dropped from $cookies
+              if (isUndefined(browserCookies[name])) {
+                delete cookies[name];
+              } else {
+                cookies[name] = browserCookies[name];
+              }
+              updated = true;
+            }
+          }
+        }
+      }
+    }]).
+
+
+  /**
+   * @ngdoc object
+   * @name ngCookies.$cookieStore
+   * @requires $cookies
+   *
+   * @description
+   * Provides a key-value (string-object) storage, that is backed by session cookies.
+   * Objects put or retrieved from this storage are automatically serialized or
+   * deserialized by angular's toJson/fromJson.
+   * @example
+   */
+   factory('$cookieStore', ['$cookies', function($cookies) {
+
+      return {
+        /**
+         * @ngdoc method
+         * @name ngCookies.$cookieStore#get
+         * @methodOf ngCookies.$cookieStore
+         *
+         * @description
+         * Returns the value of given cookie key
+         *
+         * @param {string} key Id to use for lookup.
+         * @returns {Object} Deserialized cookie value.
+         */
+        get: function(key) {
+          return angular.fromJson($cookies[key]);
+        },
+
+        /**
+         * @ngdoc method
+         * @name ngCookies.$cookieStore#put
+         * @methodOf ngCookies.$cookieStore
+         *
+         * @description
+         * Sets a value for given cookie key
+         *
+         * @param {string} key Id for the `value`.
+         * @param {Object} value Value to be stored.
+         */
+        put: function(key, value) {
+          $cookies[key] = angular.toJson(value);
+        },
+
+        /**
+         * @ngdoc method
+         * @name ngCookies.$cookieStore#remove
+         * @methodOf ngCookies.$cookieStore
+         *
+         * @description
+         * Remove given cookie
+         *
+         * @param {string} key Id of the key-value pair to delete.
+         */
+        remove: function(key) {
+          delete $cookies[key];
+        }
+      };
+
+    }]);
+
+})(window, window.angular);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.0.5/angular-cookies.min.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.0.5/angular-cookies.min.js b/portal/js/libs/angular-1.0.5/angular-cookies.min.js
new file mode 100644
index 0000000..bd82c75
--- /dev/null
+++ b/portal/js/libs/angular-1.0.5/angular-cookies.min.js
@@ -0,0 +1,7 @@
+/*
+ AngularJS v1.0.5
+ (c) 2010-2012 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(m,f,l){'use strict';f.module("ngCookies",["ng"]).factory("$cookies",["$rootScope","$browser",function(d,c){var b={},g={},h,i=!1,j=f.copy,k=f.isUndefined;c.addPollFn(function(){var a=c.cookies();h!=a&&(h=a,j(a,g),j(a,b),i&&d.$apply())})();i=!0;d.$watch(function(){var a,e,d;for(a in g)k(b[a])&&c.cookies(a,l);for(a in b)e=b[a],f.isString(e)?e!==g[a]&&(c.cookies(a,e),d=!0):f.isDefined(g[a])?b[a]=g[a]:delete b[a];if(d)for(a in e=c.cookies(),b)b[a]!==e[a]&&(k(e[a])?delete b[a]:b[a]=e[a])});return b}]).factory("$cookieStore",
+["$cookies",function(d){return{get:function(c){return f.fromJson(d[c])},put:function(c,b){d[c]=f.toJson(b)},remove:function(c){delete d[c]}}}])})(window,window.angular);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.0.5/angular-loader.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.0.5/angular-loader.js b/portal/js/libs/angular-1.0.5/angular-loader.js
new file mode 100644
index 0000000..c4325dc
--- /dev/null
+++ b/portal/js/libs/angular-1.0.5/angular-loader.js
@@ -0,0 +1,276 @@
+/**
+ * @license AngularJS v1.0.5
+ * (c) 2010-2012 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+
+(
+
+/**
+ * @ngdoc interface
+ * @name angular.Module
+ * @description
+ *
+ * Interface for configuring angular {@link angular.module modules}.
+ */
+
+function setupModuleLoader(window) {
+
+  function ensure(obj, name, factory) {
+    return obj[name] || (obj[name] = factory());
+  }
+
+  return ensure(ensure(window, 'angular', Object), 'module', function() {
+    /** @type {Object.<string, angular.Module>} */
+    var modules = {};
+
+    /**
+     * @ngdoc function
+     * @name angular.module
+     * @description
+     *
+     * The `angular.module` is a global place for creating and registering Angular modules. All
+     * modules (angular core or 3rd party) that should be available to an application must be
+     * registered using this mechanism.
+     *
+     *
+     * # Module
+     *
+     * A module is a collocation of services, directives, filters, and configuration information. Module
+     * is used to configure the {@link AUTO.$injector $injector}.
+     *
+     * <pre>
+     * // Create a new module
+     * var myModule = angular.module('myModule', []);
+     *
+     * // register a new service
+     * myModule.value('appName', 'MyCoolApp');
+     *
+     * // configure existing services inside initialization blocks.
+     * myModule.config(function($locationProvider) {
+'use strict';
+     *   // Configure existing providers
+     *   $locationProvider.hashPrefix('!');
+     * });
+     * </pre>
+     *
+     * Then you can create an injector and load your modules like this:
+     *
+     * <pre>
+     * var injector = angular.injector(['ng', 'MyModule'])
+     * </pre>
+     *
+     * However it's more likely that you'll just use
+     * {@link ng.directive:ngApp ngApp} or
+     * {@link angular.bootstrap} to simplify this process for you.
+     *
+     * @param {!string} name The name of the module to create or retrieve.
+     * @param {Array.<string>=} requires If specified then new module is being created. If unspecified then the
+     *        the module is being retrieved for further configuration.
+     * @param {Function} configFn Optional configuration function for the module. Same as
+     *        {@link angular.Module#config Module#config()}.
+     * @returns {module} new module with the {@link angular.Module} api.
+     */
+    return function module(name, requires, configFn) {
+      if (requires && modules.hasOwnProperty(name)) {
+        modules[name] = null;
+      }
+      return ensure(modules, name, function() {
+        if (!requires) {
+          throw Error('No module: ' + name);
+        }
+
+        /** @type {!Array.<Array.<*>>} */
+        var invokeQueue = [];
+
+        /** @type {!Array.<Function>} */
+        var runBlocks = [];
+
+        var config = invokeLater('$injector', 'invoke');
+
+        /** @type {angular.Module} */
+        var moduleInstance = {
+          // Private state
+          _invokeQueue: invokeQueue,
+          _runBlocks: runBlocks,
+
+          /**
+           * @ngdoc property
+           * @name angular.Module#requires
+           * @propertyOf angular.Module
+           * @returns {Array.<string>} List of module names which must be loaded before this module.
+           * @description
+           * Holds the list of modules which the injector will load before the current module is loaded.
+           */
+          requires: requires,
+
+          /**
+           * @ngdoc property
+           * @name angular.Module#name
+           * @propertyOf angular.Module
+           * @returns {string} Name of the module.
+           * @description
+           */
+          name: name,
+
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#provider
+           * @methodOf angular.Module
+           * @param {string} name service name
+           * @param {Function} providerType Construction function for creating new instance of the service.
+           * @description
+           * See {@link AUTO.$provide#provider $provide.provider()}.
+           */
+          provider: invokeLater('$provide', 'provider'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#factory
+           * @methodOf angular.Module
+           * @param {string} name service name
+           * @param {Function} providerFunction Function for creating new instance of the service.
+           * @description
+           * See {@link AUTO.$provide#factory $provide.factory()}.
+           */
+          factory: invokeLater('$provide', 'factory'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#service
+           * @methodOf angular.Module
+           * @param {string} name service name
+           * @param {Function} constructor A constructor function that will be instantiated.
+           * @description
+           * See {@link AUTO.$provide#service $provide.service()}.
+           */
+          service: invokeLater('$provide', 'service'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#value
+           * @methodOf angular.Module
+           * @param {string} name service name
+           * @param {*} object Service instance object.
+           * @description
+           * See {@link AUTO.$provide#value $provide.value()}.
+           */
+          value: invokeLater('$provide', 'value'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#constant
+           * @methodOf angular.Module
+           * @param {string} name constant name
+           * @param {*} object Constant value.
+           * @description
+           * Because the constant are fixed, they get applied before other provide methods.
+           * See {@link AUTO.$provide#constant $provide.constant()}.
+           */
+          constant: invokeLater('$provide', 'constant', 'unshift'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#filter
+           * @methodOf angular.Module
+           * @param {string} name Filter name.
+           * @param {Function} filterFactory Factory function for creating new instance of filter.
+           * @description
+           * See {@link ng.$filterProvider#register $filterProvider.register()}.
+           */
+          filter: invokeLater('$filterProvider', 'register'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#controller
+           * @methodOf angular.Module
+           * @param {string} name Controller name.
+           * @param {Function} constructor Controller constructor function.
+           * @description
+           * See {@link ng.$controllerProvider#register $controllerProvider.register()}.
+           */
+          controller: invokeLater('$controllerProvider', 'register'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#directive
+           * @methodOf angular.Module
+           * @param {string} name directive name
+           * @param {Function} directiveFactory Factory function for creating new instance of
+           * directives.
+           * @description
+           * See {@link ng.$compileProvider#directive $compileProvider.directive()}.
+           */
+          directive: invokeLater('$compileProvider', 'directive'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#config
+           * @methodOf angular.Module
+           * @param {Function} configFn Execute this function on module load. Useful for service
+           *    configuration.
+           * @description
+           * Use this method to register work which needs to be performed on module loading.
+           */
+          config: config,
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#run
+           * @methodOf angular.Module
+           * @param {Function} initializationFn Execute this function after injector creation.
+           *    Useful for application initialization.
+           * @description
+           * Use this method to register work which should be performed when the injector is done
+           * loading all modules.
+           */
+          run: function(block) {
+            runBlocks.push(block);
+            return this;
+          }
+        };
+
+        if (configFn) {
+          config(configFn);
+        }
+
+        return  moduleInstance;
+
+        /**
+         * @param {string} provider
+         * @param {string} method
+         * @param {String=} insertMethod
+         * @returns {angular.Module}
+         */
+        function invokeLater(provider, method, insertMethod) {
+          return function() {
+            invokeQueue[insertMethod || 'push']([provider, method, arguments]);
+            return moduleInstance;
+          }
+        }
+      });
+    };
+  });
+
+}
+)(window);
+
+/**
+ * Closure compiler type information
+ *
+ * @typedef { {
+ *   requires: !Array.<string>,
+ *   invokeQueue: !Array.<Array.<*>>,
+ *
+ *   service: function(string, Function):angular.Module,
+ *   factory: function(string, Function):angular.Module,
+ *   value: function(string, *):angular.Module,
+ *
+ *   filter: function(string, Function):angular.Module,
+ *
+ *   init: function(Function):angular.Module
+ * } }
+ */
+angular.Module;
+

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.0.5/angular-loader.min.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.0.5/angular-loader.min.js b/portal/js/libs/angular-1.0.5/angular-loader.min.js
new file mode 100644
index 0000000..a264fbe
--- /dev/null
+++ b/portal/js/libs/angular-1.0.5/angular-loader.min.js
@@ -0,0 +1,7 @@
+/*
+ AngularJS v1.0.5
+ (c) 2010-2012 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(i){'use strict';function d(c,b,e){return c[b]||(c[b]=e())}return d(d(i,"angular",Object),"module",function(){var c={};return function(b,e,f){e&&c.hasOwnProperty(b)&&(c[b]=null);return d(c,b,function(){function a(a,b,d){return function(){c[d||"push"]([a,b,arguments]);return g}}if(!e)throw Error("No module: "+b);var c=[],d=[],h=a("$injector","invoke"),g={_invokeQueue:c,_runBlocks:d,requires:e,name:b,provider:a("$provide","provider"),factory:a("$provide","factory"),service:a("$provide","service"),
+value:a("$provide","value"),constant:a("$provide","constant","unshift"),filter:a("$filterProvider","register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:h,run:function(a){d.push(a);return this}};f&&h(f);return g})}})})(window);


[09/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/bootstrap/css/bootstrap.min.css
----------------------------------------------------------------------
diff --git a/portal/js/libs/bootstrap/css/bootstrap.min.css b/portal/js/libs/bootstrap/css/bootstrap.min.css
new file mode 100644
index 0000000..02761af
--- /dev/null
+++ b/portal/js/libs/bootstrap/css/bootstrap.min.css
@@ -0,0 +1,5469 @@
+/*!
+ * Bootstrap v2.3.1
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */
+.clearfix {
+  *zoom: 1
+}
+
+.clearfix:before, .clearfix:after {
+  display: table;
+  line-height: 0;
+  content: ""
+}
+
+.clearfix:after {
+  clear: both
+}
+
+.hide-text {
+  font: 0/0 a;
+  color: transparent;
+  text-shadow: none;
+  background-color: transparent;
+  border: 0
+}
+
+.input-block-level {
+  display: block;
+  width: 100%;
+  min-height: 30px;
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box
+}
+
+article, aside, details, figcaption, figure, footer, header, hgroup, nav, section {
+  display: block
+}
+
+audio, canvas, video {
+  display: inline-block;
+  *display: inline;
+  *zoom: 1
+}
+
+audio:not([controls]) {
+  display: none
+}
+
+html {
+  font-size: 100%;
+  -webkit-text-size-adjust: 100%;
+  -ms-text-size-adjust: 100%
+}
+
+a:focus {
+  outline: thin dotted #333;
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px
+}
+
+a:hover, a:active {
+  outline: 0
+}
+
+sub, sup {
+  position: relative;
+  font-size: 75%;
+  line-height: 0;
+  vertical-align: baseline
+}
+
+sup {
+  top: -0.5em
+}
+
+sub {
+  bottom: -0.25em
+}
+
+img {
+  width: auto\9;
+  height: auto;
+  max-width: 100%;
+  vertical-align: middle;
+  border: 0;
+  -ms-interpolation-mode: bicubic
+}
+
+#map_canvas img, .google-maps img {
+  max-width: none
+}
+
+button, input, select, textarea {
+  margin: 0;
+  font-size: 100%;
+  vertical-align: middle
+}
+
+button, input {
+  *overflow: visible;
+  line-height: normal
+}
+
+button::-moz-focus-inner, input::-moz-focus-inner {
+  padding: 0;
+  border: 0
+}
+
+button, html input[type="button"], input[type="reset"], input[type="submit"] {
+  cursor: pointer;
+  -webkit-appearance: button
+}
+
+label, select, button, input[type="button"], input[type="reset"], input[type="submit"], input[type="radio"], input[type="checkbox"] {
+  cursor: pointer
+}
+
+input[type="search"] {
+  -webkit-box-sizing: content-box;
+  -moz-box-sizing: content-box;
+  box-sizing: content-box;
+  -webkit-appearance: textfield
+}
+
+input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-cancel-button {
+  -webkit-appearance: none
+}
+
+textarea {
+  overflow: auto;
+  vertical-align: top
+}
+
+@media print {
+  * {
+    color: #000 !important;
+    text-shadow: none !important;
+    background: transparent !important;
+    box-shadow: none !important
+  }
+
+  a, a:visited {
+    text-decoration: underline
+  }
+
+  a[href]:after {
+    content: " (" attr(href) ")"
+  }
+
+  abbr[title]:after {
+    content: " (" attr(title) ")"
+  }
+
+  .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after {
+    content: ""
+  }
+
+  pre, blockquote {
+    border: 1px solid #999;
+    page-break-inside: avoid
+  }
+
+  thead {
+    display: table-header-group
+  }
+
+  tr, img {
+    page-break-inside: avoid
+  }
+
+  img {
+    max-width: 100% !important
+  }
+
+  @page {
+    margin: .5cm
+  }
+
+  p, h2, h3 {
+    orphans: 3;
+    widows: 3
+  }
+
+  h2, h3 {
+    page-break-after: avoid
+  }
+}
+
+body {
+  margin: 0;
+  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+  font-size: 14px;
+  line-height: 20px;
+  color: #333;
+  background-color: #fff
+}
+
+a {
+  color: #08c;
+  text-decoration: none
+}
+
+a:hover, a:focus {
+  color: #005580;
+  text-decoration: underline
+}
+
+.img-rounded {
+  -webkit-border-radius: 6px;
+  -moz-border-radius: 6px;
+  border-radius: 6px
+}
+
+.img-polaroid {
+  padding: 4px;
+  background-color: #fff;
+  border: 1px solid #ccc;
+  border: 1px solid rgba(0, 0, 0, 0.2);
+  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1)
+}
+
+.img-circle {
+  -webkit-border-radius: 500px;
+  -moz-border-radius: 500px;
+  border-radius: 500px
+}
+
+.row {
+  margin-left: -20px;
+  *zoom: 1
+}
+
+.row:before, .row:after {
+  display: table;
+  line-height: 0;
+  content: ""
+}
+
+.row:after {
+  clear: both
+}
+
+[class*="span"] {
+  float: left;
+  min-height: 1px;
+  margin-left: 20px
+}
+
+.container, .navbar-static-top .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container {
+  width: 940px
+}
+
+.span12 {
+  width: 940px
+}
+
+.span11 {
+  width: 860px
+}
+
+.span10 {
+  width: 780px
+}
+
+.span9 {
+  width: 700px
+}
+
+.span8 {
+  width: 620px
+}
+
+.span7 {
+  width: 540px
+}
+
+.span6 {
+  width: 460px
+}
+
+.span5 {
+  width: 380px
+}
+
+.span4 {
+  width: 300px
+}
+
+.span3 {
+  width: 220px
+}
+
+.span2 {
+  width: 140px
+}
+
+.span1 {
+  width: 60px
+}
+
+.offset12 {
+  margin-left: 980px
+}
+
+.offset11 {
+  margin-left: 900px
+}
+
+.offset10 {
+  margin-left: 820px
+}
+
+.offset9 {
+  margin-left: 740px
+}
+
+.offset8 {
+  margin-left: 660px
+}
+
+.offset7 {
+  margin-left: 580px
+}
+
+.offset6 {
+  margin-left: 500px
+}
+
+.offset5 {
+  margin-left: 420px
+}
+
+.offset4 {
+  margin-left: 340px
+}
+
+.offset3 {
+  margin-left: 260px
+}
+
+.offset2 {
+  margin-left: 180px
+}
+
+.offset1 {
+  margin-left: 100px
+}
+
+.row-fluid {
+  width: 100%;
+  *zoom: 1
+}
+
+.row-fluid:before, .row-fluid:after {
+  display: table;
+  line-height: 0;
+  content: ""
+}
+
+.row-fluid:after {
+  clear: both
+}
+
+.row-fluid [class*="span"] {
+  display: block;
+  float: left;
+  width: 100%;
+  min-height: 30px;
+  margin-left: 2.127659574468085%;
+  *margin-left: 2.074468085106383%;
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box
+}
+
+.row-fluid [class*="span"]:first-child {
+  margin-left: 0
+}
+
+.row-fluid .controls-row [class*="span"]+[class*="span"] {
+  margin-left: 2.127659574468085%
+}
+
+.row-fluid .span12 {
+  width: 100%;
+  *width: 99.94680851063829%
+}
+
+.row-fluid .span11 {
+  width: 91.48936170212765%;
+  *width: 91.43617021276594%
+}
+
+.row-fluid .span10 {
+  width: 82.97872340425532%;
+  *width: 82.92553191489361%
+}
+
+.row-fluid .span9 {
+  width: 74.46808510638297%;
+  *width: 74.41489361702126%
+}
+
+.row-fluid .span8 {
+  width: 65.95744680851064%;
+  *width: 65.90425531914893%
+}
+
+.row-fluid .span7 {
+  width: 57.44680851063829%;
+  *width: 57.39361702127659%
+}
+
+.row-fluid .span6 {
+  width: 48.93617021276595%;
+  *width: 48.88297872340425%
+}
+
+.row-fluid .span5 {
+  width: 40.42553191489362%;
+  *width: 40.37234042553192%
+}
+
+.row-fluid .span4 {
+  width: 31.914893617021278%;
+  *width: 31.861702127659576%
+}
+
+.row-fluid .span3 {
+  width: 23.404255319148934%;
+  *width: 23.351063829787233%
+}
+
+.row-fluid .span2 {
+  width: 14.893617021276595%;
+  *width: 14.840425531914894%
+}
+
+.row-fluid .span1 {
+  width: 6.382978723404255%;
+  *width: 6.329787234042553%
+}
+
+.row-fluid .offset12 {
+  margin-left: 104.25531914893617%;
+  *margin-left: 104.14893617021275%
+}
+
+.row-fluid .offset12:first-child {
+  margin-left: 102.12765957446808%;
+  *margin-left: 102.02127659574467%
+}
+
+.row-fluid .offset11 {
+  margin-left: 95.74468085106382%;
+  *margin-left: 95.6382978723404%
+}
+
+.row-fluid .offset11:first-child {
+  margin-left: 93.61702127659574%;
+  *margin-left: 93.51063829787232%
+}
+
+.row-fluid .offset10 {
+  margin-left: 87.23404255319149%;
+  *margin-left: 87.12765957446807%
+}
+
+.row-fluid .offset10:first-child {
+  margin-left: 85.1063829787234%;
+  *margin-left: 84.99999999999999%
+}
+
+.row-fluid .offset9 {
+  margin-left: 78.72340425531914%;
+  *margin-left: 78.61702127659572%
+}
+
+.row-fluid .offset9:first-child {
+  margin-left: 76.59574468085106%;
+  *margin-left: 76.48936170212764%
+}
+
+.row-fluid .offset8 {
+  margin-left: 70.2127659574468%;
+  *margin-left: 70.10638297872339%
+}
+
+.row-fluid .offset8:first-child {
+  margin-left: 68.08510638297872%;
+  *margin-left: 67.9787234042553%
+}
+
+.row-fluid .offset7 {
+  margin-left: 61.70212765957446%;
+  *margin-left: 61.59574468085106%
+}
+
+.row-fluid .offset7:first-child {
+  margin-left: 59.574468085106375%;
+  *margin-left: 59.46808510638297%
+}
+
+.row-fluid .offset6 {
+  margin-left: 53.191489361702125%;
+  *margin-left: 53.085106382978715%
+}
+
+.row-fluid .offset6:first-child {
+  margin-left: 51.063829787234035%;
+  *margin-left: 50.95744680851063%
+}
+
+.row-fluid .offset5 {
+  margin-left: 44.68085106382979%;
+  *margin-left: 44.57446808510638%
+}
+
+.row-fluid .offset5:first-child {
+  margin-left: 42.5531914893617%;
+  *margin-left: 42.4468085106383%
+}
+
+.row-fluid .offset4 {
+  margin-left: 36.170212765957444%;
+  *margin-left: 36.06382978723405%
+}
+
+.row-fluid .offset4:first-child {
+  margin-left: 34.04255319148936%;
+  *margin-left: 33.93617021276596%
+}
+
+.row-fluid .offset3 {
+  margin-left: 27.659574468085104%;
+  *margin-left: 27.5531914893617%
+}
+
+.row-fluid .offset3:first-child {
+  margin-left: 25.53191489361702%;
+  *margin-left: 25.425531914893618%
+}
+
+.row-fluid .offset2 {
+  margin-left: 19.148936170212764%;
+  *margin-left: 19.04255319148936%
+}
+
+.row-fluid .offset2:first-child {
+  margin-left: 17.02127659574468%;
+  *margin-left: 16.914893617021278%
+}
+
+.row-fluid .offset1 {
+  margin-left: 10.638297872340425%;
+  *margin-left: 10.53191489361702%
+}
+
+.row-fluid .offset1:first-child {
+  margin-left: 8.51063829787234%;
+  *margin-left: 8.404255319148938%
+}
+
+[class*="span"].hide, .row-fluid [class*="span"].hide {
+  display: none
+}
+
+[class*="span"].pull-right, .row-fluid [class*="span"].pull-right {
+  float: right
+}
+
+.container {
+  margin-right: auto;
+  margin-left: auto;
+  *zoom: 1
+}
+
+.container:before, .container:after {
+  display: table;
+  line-height: 0;
+  content: ""
+}
+
+.container:after {
+  clear: both
+}
+
+.container-fluid {
+  padding-right: 20px;
+  padding-left: 20px;
+  *zoom: 1
+}
+
+.container-fluid:before, .container-fluid:after {
+  display: table;
+  line-height: 0;
+  content: ""
+}
+
+.container-fluid:after {
+  clear: both
+}
+
+p {
+  margin: 0 0 10px
+}
+
+.lead {
+  margin-bottom: 20px;
+  font-size: 21px;
+  font-weight: 200;
+  line-height: 30px
+}
+
+small {
+  font-size: 85%
+}
+
+strong {
+  font-weight: bold
+}
+
+em {
+  font-style: italic
+}
+
+cite {
+  font-style: normal
+}
+
+.muted {
+  color: #999
+}
+
+a.muted:hover, a.muted:focus {
+  color: #808080
+}
+
+.text-warning {
+  color: #c09853
+}
+
+a.text-warning:hover, a.text-warning:focus {
+  color: #a47e3c
+}
+
+.text-error {
+  color: #b94a48
+}
+
+a.text-error:hover, a.text-error:focus {
+  color: #953b39
+}
+
+.text-info {
+  color: #3a87ad
+}
+
+a.text-info:hover, a.text-info:focus {
+  color: #2d6987
+}
+
+.text-success {
+  color: #468847
+}
+
+a.text-success:hover, a.text-success:focus {
+  color: #356635
+}
+
+.text-left {
+  text-align: left
+}
+
+.text-right {
+  text-align: right
+}
+
+.text-center {
+  text-align: center
+}
+
+h1, h2, h3, h4, h5, h6 {
+  margin: 10px 0;
+  font-family: inherit;
+  font-weight: bold;
+  line-height: 20px;
+  color: inherit;
+  text-rendering: optimizelegibility
+}
+
+h1 small, h2 small, h3 small, h4 small, h5 small, h6 small {
+  font-weight: normal;
+  line-height: 1;
+  color: #999
+}
+
+h1, h2, h3 {
+  line-height: 40px
+}
+
+h1 {
+  font-size: 38.5px
+}
+
+h2 {
+  font-size: 31.5px
+}
+
+h3 {
+  font-size: 24.5px
+}
+
+h4 {
+  font-size: 17.5px
+}
+
+h5 {
+  font-size: 14px
+}
+
+h6 {
+  font-size: 11.9px
+}
+
+h1 small {
+  font-size: 24.5px
+}
+
+h2 small {
+  font-size: 17.5px
+}
+
+h3 small {
+  font-size: 14px
+}
+
+h4 small {
+  font-size: 14px
+}
+
+.page-header {
+  padding-bottom: 9px;
+  margin: 20px 0 30px;
+  border-bottom: 1px solid #eee
+}
+
+ul, ol {
+  padding: 0;
+  margin: 0 0 10px 25px
+}
+
+ul ul, ul ol, ol ol, ol ul {
+  margin-bottom: 0
+}
+
+li {
+  line-height: 20px
+}
+
+ul.unstyled, ol.unstyled {
+  margin-left: 0;
+  list-style: none
+}
+
+ul.inline, ol.inline {
+  margin-left: 0;
+  list-style: none
+}
+
+ul.inline>li, ol.inline>li {
+  display: inline-block;
+  *display: inline;
+  padding-right: 5px;
+  padding-left: 5px;
+  *zoom: 1
+}
+
+dl {
+  margin-bottom: 20px
+}
+
+dt, dd {
+  line-height: 20px
+}
+
+dt {
+  font-weight: bold
+}
+
+dd {
+  margin-left: 10px
+}
+
+.dl-horizontal {
+  *zoom: 1
+}
+
+.dl-horizontal:before, .dl-horizontal:after {
+  display: table;
+  line-height: 0;
+  content: ""
+}
+
+.dl-horizontal:after {
+  clear: both
+}
+
+.dl-horizontal dt {
+  float: left;
+  width: 160px;
+  overflow: hidden;
+  clear: left;
+  text-align: right;
+  text-overflow: ellipsis;
+  white-space: nowrap
+}
+
+.dl-horizontal dd {
+  margin-left: 180px
+}
+
+hr {
+  margin: 20px 0;
+  border: 0;
+  border-top: 1px solid #eee;
+  border-bottom: 1px solid #fff
+}
+
+abbr[title], abbr[data-original-title] {
+  cursor: help;
+  border-bottom: 1px dotted #999
+}
+
+abbr.initialism {
+  font-size: 90%;
+  text-transform: uppercase
+}
+
+blockquote {
+  padding: 0 0 0 15px;
+  margin: 0 0 20px;
+  border-left: 5px solid #eee
+}
+
+blockquote p {
+  margin-bottom: 0;
+  font-size: 17.5px;
+  font-weight: 300;
+  line-height: 1.25
+}
+
+blockquote small {
+  display: block;
+  line-height: 20px;
+  color: #999
+}
+
+blockquote small:before {
+  content: '\2014 \00A0'
+}
+
+blockquote.pull-right {
+  float: right;
+  padding-right: 15px;
+  padding-left: 0;
+  border-right: 5px solid #eee;
+  border-left: 0
+}
+
+blockquote.pull-right p, blockquote.pull-right small {
+  text-align: right
+}
+
+blockquote.pull-right small:before {
+  content: ''
+}
+
+blockquote.pull-right small:after {
+  content: '\00A0 \2014'
+}
+
+q:before, q:after, blockquote:before, blockquote:after {
+  content: ""
+}
+
+address {
+  display: block;
+  margin-bottom: 20px;
+  font-style: normal;
+  line-height: 20px
+}
+
+code, pre {
+  padding: 0 3px 2px;
+  font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
+  font-size: 12px;
+  color: #333;
+  -webkit-border-radius: 3px;
+  -moz-border-radius: 3px;
+  border-radius: 3px
+}
+
+code {
+  padding: 2px 4px;
+  color: #d14;
+  white-space: nowrap;
+  background-color: #f7f7f9;
+  border: 1px solid #e1e1e8
+}
+
+pre {
+  display: block;
+  padding: 9.5px;
+  margin: 0 0 10px;
+  font-size: 13px;
+  line-height: 20px;
+  word-break: break-all;
+  word-wrap: break-word;
+  white-space: pre;
+  white-space: pre-wrap;
+  background-color: #f5f5f5;
+  border: 1px solid #ccc;
+  border: 1px solid rgba(0, 0, 0, 0.15);
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px
+}
+
+pre.prettyprint {
+  margin-bottom: 20px
+}
+
+pre code {
+  padding: 0;
+  color: inherit;
+  white-space: pre;
+  white-space: pre-wrap;
+  background-color: transparent;
+  border: 0
+}
+
+.pre-scrollable {
+  max-height: 340px;
+  overflow-y: scroll
+}
+
+form {
+  margin: 0 0 20px
+}
+
+fieldset {
+  padding: 0;
+  margin: 0;
+  border: 0
+}
+
+legend {
+  display: block;
+  width: 100%;
+  padding: 0;
+  margin-bottom: 20px;
+  font-size: 21px;
+  line-height: 40px;
+  color: #333;
+  border: 0;
+  border-bottom: 1px solid #e5e5e5
+}
+
+legend small {
+  font-size: 15px;
+  color: #999
+}
+
+label, input, button, select, textarea {
+  font-size: 14px;
+  font-weight: normal;
+  line-height: 20px
+}
+
+input, button, select, textarea {
+  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif
+}
+
+label {
+  display: block;
+  margin-bottom: 5px
+}
+
+select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input {
+  display: inline-block;
+  height: 20px;
+  padding: 4px 6px;
+  margin-bottom: 10px;
+  font-size: 14px;
+  line-height: 20px;
+  color: #555;
+  vertical-align: middle;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px
+}
+
+input, textarea, .uneditable-input {
+  width: 206px
+}
+
+textarea {
+  height: auto
+}
+
+textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input {
+  background-color: #fff;
+  border: 1px solid #ccc;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  -webkit-transition: border linear .2s, box-shadow linear .2s;
+  -moz-transition: border linear .2s, box-shadow linear .2s;
+  -o-transition: border linear .2s, box-shadow linear .2s;
+  transition: border linear .2s, box-shadow linear .2s
+}
+
+textarea:focus, input[type="text"]:focus, input[type="password"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="date"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, input[type="number"]:focus, input[type="email"]:focus, input[type="url"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="color"]:focus, .uneditable-input:focus {
+  border-color: rgba(82, 168, 236, 0.8);
+  outline: 0;
+  outline: thin dotted  \9;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6)
+}
+
+input[type="radio"], input[type="checkbox"] {
+  margin: 4px 0 0;
+  margin-top: 1px  \9;
+  *margin-top: 0;
+  line-height: normal
+}
+
+input[type="file"], input[type="image"], input[type="submit"], input[type="reset"], input[type="button"], input[type="radio"], input[type="checkbox"] {
+  width: auto
+}
+
+select, input[type="file"] {
+  height: 30px;
+  *margin-top: 4px;
+  line-height: 30px
+}
+
+select {
+  width: 220px;
+  background-color: #fff;
+  border: 1px solid #ccc
+}
+
+select[multiple], select[size] {
+  height: auto
+}
+
+select:focus, input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus {
+  outline: thin dotted #333;
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px
+}
+
+.uneditable-input, .uneditable-textarea {
+  color: #999;
+  cursor: not-allowed;
+  background-color: #fcfcfc;
+  border-color: #ccc;
+  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
+  -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
+  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025)
+}
+
+.uneditable-input {
+  overflow: hidden;
+  white-space: nowrap
+}
+
+.uneditable-textarea {
+  width: auto;
+  height: auto
+}
+
+input:-moz-placeholder, textarea:-moz-placeholder {
+  color: #999
+}
+
+input:-ms-input-placeholder, textarea:-ms-input-placeholder {
+  color: #999
+}
+
+input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
+  color: #999
+}
+
+.radio, .checkbox {
+  min-height: 20px;
+  padding-left: 20px
+}
+
+.radio input[type="radio"], .checkbox input[type="checkbox"] {
+  float: left;
+  margin-left: -20px
+}
+
+.controls>.radio:first-child, .controls>.checkbox:first-child {
+  padding-top: 5px
+}
+
+.radio.inline, .checkbox.inline {
+  display: inline-block;
+  padding-top: 5px;
+  margin-bottom: 0;
+  vertical-align: middle
+}
+
+.radio.inline+.radio.inline, .checkbox.inline+.checkbox.inline {
+  margin-left: 10px
+}
+
+.input-mini {
+  width: 60px
+}
+
+.input-small {
+  width: 90px
+}
+
+.input-medium {
+  width: 150px
+}
+
+.input-large {
+  width: 210px
+}
+
+.input-xlarge {
+  width: 270px
+}
+
+.input-xxlarge {
+  width: 530px
+}
+
+input[class*="span"], select[class*="span"], textarea[class*="span"], .uneditable-input[class*="span"], .row-fluid input[class*="span"], .row-fluid select[class*="span"], .row-fluid textarea[class*="span"], .row-fluid .uneditable-input[class*="span"] {
+  float: none;
+  margin-left: 0
+}
+
+.input-append input[class*="span"], .input-append .uneditable-input[class*="span"], .input-prepend input[class*="span"], .input-prepend .uneditable-input[class*="span"], .row-fluid input[class*="span"], .row-fluid select[class*="span"], .row-fluid textarea[class*="span"], .row-fluid .uneditable-input[class*="span"], .row-fluid .input-prepend [class*="span"], .row-fluid .input-append [class*="span"] {
+  display: inline-block
+}
+
+input, textarea, .uneditable-input {
+  margin-left: 0
+}
+
+.controls-row [class*="span"]+[class*="span"] {
+  margin-left: 20px
+}
+
+input.span12, textarea.span12, .uneditable-input.span12 {
+  width: 926px
+}
+
+input.span11, textarea.span11, .uneditable-input.span11 {
+  width: 846px
+}
+
+input.span10, textarea.span10, .uneditable-input.span10 {
+  width: 766px
+}
+
+input.span9, textarea.span9, .uneditable-input.span9 {
+  width: 686px
+}
+
+input.span8, textarea.span8, .uneditable-input.span8 {
+  width: 606px
+}
+
+input.span7, textarea.span7, .uneditable-input.span7 {
+  width: 526px
+}
+
+input.span6, textarea.span6, .uneditable-input.span6 {
+  width: 446px
+}
+
+input.span5, textarea.span5, .uneditable-input.span5 {
+  width: 366px
+}
+
+input.span4, textarea.span4, .uneditable-input.span4 {
+  width: 286px
+}
+
+input.span3, textarea.span3, .uneditable-input.span3 {
+  width: 206px
+}
+
+input.span2, textarea.span2, .uneditable-input.span2 {
+  width: 126px
+}
+
+input.span1, textarea.span1, .uneditable-input.span1 {
+  width: 46px
+}
+
+.controls-row {
+  *zoom: 1
+}
+
+.controls-row:before, .controls-row:after {
+  display: table;
+  line-height: 0;
+  content: ""
+}
+
+.controls-row:after {
+  clear: both
+}
+
+.controls-row [class*="span"], .row-fluid .controls-row [class*="span"] {
+  float: left
+}
+
+.controls-row .checkbox[class*="span"], .controls-row .radio[class*="span"] {
+  padding-top: 5px
+}
+
+input[disabled], select[disabled], textarea[disabled], input[readonly], select[readonly], textarea[readonly] {
+  cursor: not-allowed;
+  background-color: #eee
+}
+
+input[type="radio"][disabled], input[type="checkbox"][disabled], input[type="radio"][readonly], input[type="checkbox"][readonly] {
+  background-color: transparent
+}
+
+.control-group.warning .control-label, .control-group.warning .help-block, .control-group.warning .help-inline {
+  color: #c09853
+}
+
+.control-group.warning .checkbox, .control-group.warning .radio, .control-group.warning input, .control-group.warning select, .control-group.warning textarea {
+  color: #c09853
+}
+
+.control-group.warning input, .control-group.warning select, .control-group.warning textarea {
+  border-color: #c09853;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075)
+}
+
+.control-group.warning input:focus, .control-group.warning select:focus, .control-group.warning textarea:focus {
+  border-color: #a47e3c;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e
+}
+
+.control-group.warning .input-prepend .add-on, .control-group.warning .input-append .add-on {
+  color: #c09853;
+  background-color: #fcf8e3;
+  border-color: #c09853
+}
+
+.control-group.error .control-label, .control-group.error .help-block, .control-group.error .help-inline {
+  color: #b94a48
+}
+
+.control-group.error .checkbox, .control-group.error .radio, .control-group.error input, .control-group.error select, .control-group.error textarea {
+  color: #b94a48
+}
+
+.control-group.error input, .control-group.error select, .control-group.error textarea {
+  border-color: #b94a48;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075)
+}
+
+.control-group.error input:focus, .control-group.error select:focus, .control-group.error textarea:focus {
+  border-color: #953b39;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392
+}
+
+.control-group.error .input-prepend .add-on, .control-group.error .input-append .add-on {
+  color: #b94a48;
+  background-color: #f2dede;
+  border-color: #b94a48
+}
+
+.control-group.success .control-label, .control-group.success .help-block, .control-group.success .help-inline {
+  color: #468847
+}
+
+.control-group.success .checkbox, .control-group.success .radio, .control-group.success input, .control-group.success select, .control-group.success textarea {
+  color: #468847
+}
+
+.control-group.success input, .control-group.success select, .control-group.success textarea {
+  border-color: #468847;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075)
+}
+
+.control-group.success input:focus, .control-group.success select:focus, .control-group.success textarea:focus {
+  border-color: #356635;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b
+}
+
+.control-group.success .input-prepend .add-on, .control-group.success .input-append .add-on {
+  color: #468847;
+  background-color: #dff0d8;
+  border-color: #468847
+}
+
+.control-group.info .control-label, .control-group.info .help-block, .control-group.info .help-inline {
+  color: #3a87ad
+}
+
+.control-group.info .checkbox, .control-group.info .radio, .control-group.info input, .control-group.info select, .control-group.info textarea {
+  color: #3a87ad
+}
+
+.control-group.info input, .control-group.info select, .control-group.info textarea {
+  border-color: #3a87ad;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075)
+}
+
+.control-group.info input:focus, .control-group.info select:focus, .control-group.info textarea:focus {
+  border-color: #2d6987;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3
+}
+
+.control-group.info .input-prepend .add-on, .control-group.info .input-append .add-on {
+  color: #3a87ad;
+  background-color: #d9edf7;
+  border-color: #3a87ad
+}
+
+input:focus:invalid, textarea:focus:invalid, select:focus:invalid {
+  color: #b94a48;
+  border-color: #ee5f5b
+}
+
+input:focus:invalid:focus, textarea:focus:invalid:focus, select:focus:invalid:focus {
+  border-color: #e9322d;
+  -webkit-box-shadow: 0 0 6px #f8b9b7;
+  -moz-box-shadow: 0 0 6px #f8b9b7;
+  box-shadow: 0 0 6px #f8b9b7
+}
+
+.form-actions {
+  padding: 19px 20px 20px;
+  margin-top: 20px;
+  margin-bottom: 20px;
+  background-color: #f5f5f5;
+  border-top: 1px solid #e5e5e5;
+  *zoom: 1
+}
+
+.form-actions:before, .form-actions:after {
+  display: table;
+  line-height: 0;
+  content: ""
+}
+
+.form-actions:after {
+  clear: both
+}
+
+.help-block, .help-inline {
+  color: #595959
+}
+
+.help-block {
+  display: block;
+  margin-bottom: 10px
+}
+
+.help-inline {
+  display: inline-block;
+  *display: inline;
+  padding-left: 5px;
+  vertical-align: middle;
+  *zoom: 1
+}
+
+.input-append, .input-prepend {
+  display: inline-block;
+  margin-bottom: 10px;
+  font-size: 0;
+  white-space: nowrap;
+  vertical-align: middle
+}
+
+.input-append input, .input-prepend input, .input-append select, .input-prepend select, .input-append .uneditable-input, .input-prepend .uneditable-input, .input-append .dropdown-menu, .input-prepend .dropdown-menu, .input-append .popover, .input-prepend .popover {
+  font-size: 14px
+}
+
+.input-append input, .input-prepend input, .input-append select, .input-prepend select, .input-append .uneditable-input, .input-prepend .uneditable-input {
+  position: relative;
+  margin-bottom: 0;
+  *margin-left: 0;
+  vertical-align: top;
+  -webkit-border-radius: 0 4px 4px 0;
+  -moz-border-radius: 0 4px 4px 0;
+  border-radius: 0 4px 4px 0
+}
+
+.input-append input:focus, .input-prepend input:focus, .input-append select:focus, .input-prepend select:focus, .input-append .uneditable-input:focus, .input-prepend .uneditable-input:focus {
+  z-index: 2
+}
+
+.input-append .add-on, .input-prepend .add-on {
+  display: inline-block;
+  width: auto;
+  height: 20px;
+  min-width: 16px;
+  padding: 4px 5px;
+  font-size: 14px;
+  font-weight: normal;
+  line-height: 20px;
+  text-align: center;
+  text-shadow: 0 1px 0 #fff;
+  background-color: #eee;
+  border: 1px solid #ccc
+}
+
+.input-append .add-on, .input-prepend .add-on, .input-append .btn, .input-prepend .btn, .input-append .btn-group>.dropdown-toggle, .input-prepend .btn-group>.dropdown-toggle {
+  vertical-align: top;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0
+}
+
+.input-append .active, .input-prepend .active {
+  background-color: #a9dba9;
+  border-color: #46a546
+}
+
+.input-prepend .add-on, .input-prepend .btn {
+  margin-right: -1px
+}
+
+.input-prepend .add-on:first-child, .input-prepend .btn:first-child {
+  -webkit-border-radius: 4px 0 0 4px;
+  -moz-border-radius: 4px 0 0 4px;
+  border-radius: 4px 0 0 4px
+}
+
+.input-append input, .input-append select, .input-append .uneditable-input {
+  -webkit-border-radius: 4px 0 0 4px;
+  -moz-border-radius: 4px 0 0 4px;
+  border-radius: 4px 0 0 4px
+}
+
+.input-append input+.btn-group .btn:last-child, .input-append select+.btn-group .btn:last-child, .input-append .uneditable-input+.btn-group .btn:last-child {
+  -webkit-border-radius: 0 4px 4px 0;
+  -moz-border-radius: 0 4px 4px 0;
+  border-radius: 0 4px 4px 0
+}
+
+.input-append .add-on, .input-append .btn, .input-append .btn-group {
+  margin-left: -1px
+}
+
+.input-append .add-on:last-child, .input-append .btn:last-child, .input-append .btn-group:last-child>.dropdown-toggle {
+  -webkit-border-radius: 0 4px 4px 0;
+  -moz-border-radius: 0 4px 4px 0;
+  border-radius: 0 4px 4px 0
+}
+
+.input-prepend.input-append input, .input-prepend.input-append select, .input-prepend.input-append .uneditable-input {
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0
+}
+
+.input-prepend.input-append input+.btn-group .btn, .input-prepend.input-append select+.btn-group .btn, .input-prepend.input-append .uneditable-input+.btn-group .btn {
+  -webkit-border-radius: 0 4px 4px 0;
+  -moz-border-radius: 0 4px 4px 0;
+  border-radius: 0 4px 4px 0
+}
+
+.input-prepend.input-append .add-on:first-child, .input-prepend.input-append .btn:first-child {
+  margin-right: -1px;
+  -webkit-border-radius: 4px 0 0 4px;
+  -moz-border-radius: 4px 0 0 4px;
+  border-radius: 4px 0 0 4px
+}
+
+.input-prepend.input-append .add-on:last-child, .input-prepend.input-append .btn:last-child {
+  margin-left: -1px;
+  -webkit-border-radius: 0 4px 4px 0;
+  -moz-border-radius: 0 4px 4px 0;
+  border-radius: 0 4px 4px 0
+}
+
+.input-prepend.input-append .btn-group:first-child {
+  margin-left: 0
+}
+
+input.search-query {
+  padding-right: 14px;
+  padding-right: 4px  \9;
+  padding-left: 14px;
+  padding-left: 4px  \9;
+  margin-bottom: 0;
+  -webkit-border-radius: 15px;
+  -moz-border-radius: 15px;
+  border-radius: 15px
+}
+
+.form-search .input-append .search-query, .form-search .input-prepend .search-query {
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0
+}
+
+.form-search .input-append .search-query {
+  -webkit-border-radius: 14px 0 0 14px;
+  -moz-border-radius: 14px 0 0 14px;
+  border-radius: 14px 0 0 14px
+}
+
+.form-search .input-append .btn {
+  -webkit-border-radius: 0 14px 14px 0;
+  -moz-border-radius: 0 14px 14px 0;
+  border-radius: 0 14px 14px 0
+}
+
+.form-search .input-prepend .search-query {
+  -webkit-border-radius: 0 14px 14px 0;
+  -moz-border-radius: 0 14px 14px 0;
+  border-radius: 0 14px 14px 0
+}
+
+.form-search .input-prepend .btn {
+  -webkit-border-radius: 14px 0 0 14px;
+  -moz-border-radius: 14px 0 0 14px;
+  border-radius: 14px 0 0 14px
+}
+
+.form-search input, .form-inline input, .form-horizontal input, .form-search textarea, .form-inline textarea, .form-horizontal textarea, .form-search select, .form-inline select, .form-horizontal select, .form-search .help-inline, .form-inline .help-inline, .form-horizontal .help-inline, .form-search .uneditable-input, .form-inline .uneditable-input, .form-horizontal .uneditable-input, .form-search .input-prepend, .form-inline .input-prepend, .form-horizontal .input-prepend, .form-search .input-append, .form-inline .input-append, .form-horizontal .input-append {
+  display: inline-block;
+  *display: inline;
+  margin-bottom: 0;
+  vertical-align: middle;
+  *zoom: 1
+}
+
+.form-search .hide, .form-inline .hide, .form-horizontal .hide {
+  display: none
+}
+
+.form-search label, .form-inline label, .form-search .btn-group, .form-inline .btn-group {
+  display: inline-block
+}
+
+.form-search .input-append, .form-inline .input-append, .form-search .input-prepend, .form-inline .input-prepend {
+  margin-bottom: 0
+}
+
+.form-search .radio, .form-search .checkbox, .form-inline .radio, .form-inline .checkbox {
+  padding-left: 0;
+  margin-bottom: 0;
+  vertical-align: middle
+}
+
+.form-search .radio input[type="radio"], .form-search .checkbox input[type="checkbox"], .form-inline .radio input[type="radio"], .form-inline .checkbox input[type="checkbox"] {
+  float: left;
+  margin-right: 3px;
+  margin-left: 0
+}
+
+.control-group {
+  margin-bottom: 10px
+}
+
+legend+.control-group {
+  margin-top: 20px;
+  -webkit-margin-top-collapse: separate
+}
+
+.form-horizontal .control-group {
+  margin-bottom: 20px;
+  *zoom: 1
+}
+
+.form-horizontal .control-group:before, .form-horizontal .control-group:after {
+  display: table;
+  line-height: 0;
+  content: ""
+}
+
+.form-horizontal .control-group:after {
+  clear: both
+}
+
+.form-horizontal .control-label {
+  float: left;
+  width: 160px;
+  padding-top: 5px;
+  text-align: right
+}
+
+.form-horizontal .controls {
+  *display: inline-block;
+  *padding-left: 20px;
+  margin-left: 180px;
+  *margin-left: 0
+}
+
+.form-horizontal .controls:first-child {
+  *padding-left: 180px
+}
+
+.form-horizontal .help-block {
+  margin-bottom: 0
+}
+
+.form-horizontal input+.help-block, .form-horizontal select+.help-block, .form-horizontal textarea+.help-block, .form-horizontal .uneditable-input+.help-block, .form-horizontal .input-prepend+.help-block, .form-horizontal .input-append+.help-block {
+  margin-top: 10px
+}
+
+.form-horizontal .form-actions {
+  padding-left: 180px
+}
+
+table {
+  max-width: 100%;
+  background-color: transparent;
+  border-collapse: collapse;
+  border-spacing: 0
+}
+
+.table {
+  width: 100%;
+  margin-bottom: 20px
+}
+
+.table th, .table td {
+  padding: 8px;
+  line-height: 20px;
+  text-align: left;
+  vertical-align: top;
+  border-top: 1px solid #ddd
+}
+
+.table th {
+  font-weight: bold
+}
+
+.table thead th {
+  vertical-align: bottom
+}
+
+.table caption+thead tr:first-child th, .table caption+thead tr:first-child td, .table colgroup+thead tr:first-child th, .table colgroup+thead tr:first-child td, .table thead:first-child tr:first-child th, .table thead:first-child tr:first-child td {
+  border-top: 0
+}
+
+.table tbody+tbody {
+  border-top: 2px solid #ddd
+}
+
+.table .table {
+  background-color: #fff
+}
+
+.table-condensed th, .table-condensed td {
+  padding: 4px 5px
+}
+
+.table-bordered {
+  border: 1px solid #ddd;
+  border-collapse: separate;
+  *border-collapse: collapse;
+  border-left: 0;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px
+}
+
+.table-bordered th, .table-bordered td {
+  border-left: 1px solid #ddd
+}
+
+.table-bordered caption+thead tr:first-child th, .table-bordered caption+tbody tr:first-child th, .table-bordered caption+tbody tr:first-child td, .table-bordered colgroup+thead tr:first-child th, .table-bordered colgroup+tbody tr:first-child th, .table-bordered colgroup+tbody tr:first-child td, .table-bordered thead:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child td {
+  border-top: 0
+}
+
+.table-bordered thead:first-child tr:first-child>th:first-child, .table-bordered tbody:first-child tr:first-child>td:first-child, .table-bordered tbody:first-child tr:first-child>th:first-child {
+  -webkit-border-top-left-radius: 4px;
+  border-top-left-radius: 4px;
+  -moz-border-radius-topleft: 4px
+}
+
+.table-bordered thead:first-child tr:first-child>th:last-child, .table-bordered tbody:first-child tr:first-child>td:last-child, .table-bordered tbody:first-child tr:first-child>th:last-child {
+  -webkit-border-top-right-radius: 4px;
+  border-top-right-radius: 4px;
+  -moz-border-radius-topright: 4px
+}
+
+.table-bordered thead:last-child tr:last-child>th:first-child, .table-bordered tbody:last-child tr:last-child>td:first-child, .table-bordered tbody:last-child tr:last-child>th:first-child, .table-bordered tfoot:last-child tr:last-child>td:first-child, .table-bordered tfoot:last-child tr:last-child>th:first-child {
+  -webkit-border-bottom-left-radius: 4px;
+  border-bottom-left-radius: 4px;
+  -moz-border-radius-bottomleft: 4px
+}
+
+.table-bordered thead:last-child tr:last-child>th:last-child, .table-bordered tbody:last-child tr:last-child>td:last-child, .table-bordered tbody:last-child tr:last-child>th:last-child, .table-bordered tfoot:last-child tr:last-child>td:last-child, .table-bordered tfoot:last-child tr:last-child>th:last-child {
+  -webkit-border-bottom-right-radius: 4px;
+  border-bottom-right-radius: 4px;
+  -moz-border-radius-bottomright: 4px
+}
+
+.table-bordered tfoot+tbody:last-child tr:last-child td:first-child {
+  -webkit-border-bottom-left-radius: 0;
+  border-bottom-left-radius: 0;
+  -moz-border-radius-bottomleft: 0
+}
+
+.table-bordered tfoot+tbody:last-child tr:last-child td:last-child {
+  -webkit-border-bottom-right-radius: 0;
+  border-bottom-right-radius: 0;
+  -moz-border-radius-bottomright: 0
+}
+
+.table-bordered caption+thead tr:first-child th:first-child, .table-bordered caption+tbody tr:first-child td:first-child, .table-bordered colgroup+thead tr:first-child th:first-child, .table-bordered colgroup+tbody tr:first-child td:first-child {
+  -webkit-border-top-left-radius: 4px;
+  border-top-left-radius: 4px;
+  -moz-border-radius-topleft: 4px
+}
+
+.table-bordered caption+thead tr:first-child th:last-child, .table-bordered caption+tbody tr:first-child td:last-child, .table-bordered colgroup+thead tr:first-child th:last-child, .table-bordered colgroup+tbody tr:first-child td:last-child {
+  -webkit-border-top-right-radius: 4px;
+  border-top-right-radius: 4px;
+  -moz-border-radius-topright: 4px
+}
+
+.table-striped tbody>tr:nth-child(odd)>td, .table-striped tbody>tr:nth-child(odd)>th {
+  background-color: #f9f9f9
+}
+
+.table-hover tbody tr:hover>td, .table-hover tbody tr:hover>th {
+  background-color: #f5f5f5
+}
+
+table td[class*="span"], table th[class*="span"], .row-fluid table td[class*="span"], .row-fluid table th[class*="span"] {
+  display: table-cell;
+  float: none;
+  margin-left: 0
+}
+
+.table td.span1, .table th.span1 {
+  float: none;
+  width: 44px;
+  margin-left: 0
+}
+
+.table td.span2, .table th.span2 {
+  float: none;
+  width: 124px;
+  margin-left: 0
+}
+
+.table td.span3, .table th.span3 {
+  float: none;
+  width: 204px;
+  margin-left: 0
+}
+
+.table td.span4, .table th.span4 {
+  float: none;
+  width: 284px;
+  margin-left: 0
+}
+
+.table td.span5, .table th.span5 {
+  float: none;
+  width: 364px;
+  margin-left: 0
+}
+
+.table td.span6, .table th.span6 {
+  float: none;
+  width: 444px;
+  margin-left: 0
+}
+
+.table td.span7, .table th.span7 {
+  float: none;
+  width: 524px;
+  margin-left: 0
+}
+
+.table td.span8, .table th.span8 {
+  float: none;
+  width: 604px;
+  margin-left: 0
+}
+
+.table td.span9, .table th.span9 {
+  float: none;
+  width: 684px;
+  margin-left: 0
+}
+
+.table td.span10, .table th.span10 {
+  float: none;
+  width: 764px;
+  margin-left: 0
+}
+
+.table td.span11, .table th.span11 {
+  float: none;
+  width: 844px;
+  margin-left: 0
+}
+
+.table td.span12, .table th.span12 {
+  float: none;
+  width: 924px;
+  margin-left: 0
+}
+
+.table tbody tr.success>td {
+  background-color: #dff0d8
+}
+
+.table tbody tr.error>td {
+  background-color: #f2dede
+}
+
+.table tbody tr.warning>td {
+  background-color: #fcf8e3
+}
+
+.table tbody tr.info>td {
+  background-color: #d9edf7
+}
+
+.table-hover tbody tr.success:hover>td {
+  background-color: #d0e9c6
+}
+
+.table-hover tbody tr.error:hover>td {
+  background-color: #ebcccc
+}
+
+.table-hover tbody tr.warning:hover>td {
+  background-color: #faf2cc
+}
+
+.table-hover tbody tr.info:hover>td {
+  background-color: #c4e3f3
+}
+
+[class^="icon-"], [class*=" icon-"] {
+  display: inline-block;
+  width: 14px;
+  height: 14px;
+  margin-top: 1px;
+  *margin-right: .3em;
+  line-height: 14px;
+  vertical-align: text-top;
+  background-image: url("../img/glyphicons-halflings.png");
+  background-position: 14px 14px;
+  background-repeat: no-repeat
+}
+
+.icon-white, .nav-pills>.active>a>[class^="icon-"], .nav-pills>.active>a>[class*=" icon-"], .nav-list>.active>a>[class^="icon-"], .nav-list>.active>a>[class*=" icon-"], .navbar-inverse .nav>.active>a>[class^="icon-"], .navbar-inverse .nav>.active>a>[class*=" icon-"], .dropdown-menu>li>a:hover>[class^="icon-"], .dropdown-menu>li>a:focus>[class^="icon-"], .dropdown-menu>li>a:hover>[class*=" icon-"], .dropdown-menu>li>a:focus>[class*=" icon-"], .dropdown-menu>.active>a>[class^="icon-"], .dropdown-menu>.active>a>[class*=" icon-"], .dropdown-submenu:hover>a>[class^="icon-"], .dropdown-submenu:focus>a>[class^="icon-"], .dropdown-submenu:hover>a>[class*=" icon-"], .dropdown-submenu:focus>a>[class*=" icon-"] {
+  background-image: url("../img/glyphicons-halflings-white.png")
+}
+
+.icon-glass {
+  background-position: 0 0
+}
+
+.icon-music {
+  background-position: -24px 0
+}
+
+.icon-search {
+  background-position: -48px 0
+}
+
+.icon-envelope {
+  background-position: -72px 0
+}
+
+.icon-heart {
+  background-position: -96px 0
+}
+
+.icon-star {
+  background-position: -120px 0
+}
+
+.icon-star-empty {
+  background-position: -144px 0
+}
+
+.icon-user {
+  background-position: -168px 0
+}
+
+.icon-film {
+  background-position: -192px 0
+}
+
+.icon-th-large {
+  background-position: -216px 0
+}
+
+.icon-th {
+  background-position: -240px 0
+}
+
+.icon-th-list {
+  background-position: -264px 0
+}
+
+.icon-ok {
+  background-position: -288px 0
+}
+
+.icon-remove {
+  background-position: -312px 0
+}
+
+.icon-zoom-in {
+  background-position: -336px 0
+}
+
+.icon-zoom-out {
+  background-position: -360px 0
+}
+
+.icon-off {
+  background-position: -384px 0
+}
+
+.icon-signal {
+  background-position: -408px 0
+}
+
+.icon-cog {
+  background-position: -432px 0
+}
+
+.icon-trash {
+  background-position: -456px 0
+}
+
+.icon-home {
+  background-position: 0 -24px
+}
+
+.icon-file {
+  background-position: -24px -24px
+}
+
+.icon-time {
+  background-position: -48px -24px
+}
+
+.icon-road {
+  background-position: -72px -24px
+}
+
+.icon-download-alt {
+  background-position: -96px -24px
+}
+
+.icon-download {
+  background-position: -120px -24px
+}
+
+.icon-upload {
+  background-position: -144px -24px
+}
+
+.icon-inbox {
+  background-position: -168px -24px
+}
+
+.icon-play-circle {
+  background-position: -192px -24px
+}
+
+.icon-repeat {
+  background-position: -216px -24px
+}
+
+.icon-refresh {
+  background-position: -240px -24px
+}
+
+.icon-list-alt {
+  background-position: -264px -24px
+}
+
+.icon-lock {
+  background-position: -287px -24px
+}
+
+.icon-flag {
+  background-position: -312px -24px
+}
+
+.icon-headphones {
+  background-position: -336px -24px
+}
+
+.icon-volume-off {
+  background-position: -360px -24px
+}
+
+.icon-volume-down {
+  background-position: -384px -24px
+}
+
+.icon-volume-up {
+  background-position: -408px -24px
+}
+
+.icon-qrcode {
+  background-position: -432px -24px
+}
+
+.icon-barcode {
+  background-position: -456px -24px
+}
+
+.icon-tag {
+  background-position: 0 -48px
+}
+
+.icon-tags {
+  background-position: -25px -48px
+}
+
+.icon-book {
+  background-position: -48px -48px
+}
+
+.icon-bookmark {
+  background-position: -72px -48px
+}
+
+.icon-print {
+  background-position: -96px -48px
+}
+
+.icon-camera {
+  background-position: -120px -48px
+}
+
+.icon-font {
+  background-position: -144px -48px
+}
+
+.icon-bold {
+  background-position: -167px -48px
+}
+
+.icon-italic {
+  background-position: -192px -48px
+}
+
+.icon-text-height {
+  background-position: -216px -48px
+}
+
+.icon-text-width {
+  background-position: -240px -48px
+}
+
+.icon-align-left {
+  background-position: -264px -48px
+}
+
+.icon-align-center {
+  background-position: -288px -48px
+}
+
+.icon-align-right {
+  background-position: -312px -48px
+}
+
+.icon-align-justify {
+  background-position: -336px -48px
+}
+
+.icon-list {
+  background-position: -360px -48px
+}
+
+.icon-indent-left {
+  background-position: -384px -48px
+}
+
+.icon-indent-right {
+  background-position: -408px -48px
+}
+
+.icon-facetime-video {
+  background-position: -432px -48px
+}
+
+.icon-picture {
+  background-position: -456px -48px
+}
+
+.icon-pencil {
+  background-position: 0 -72px
+}
+
+.icon-map-marker {
+  background-position: -24px -72px
+}
+
+.icon-adjust {
+  background-position: -48px -72px
+}
+
+.icon-tint {
+  background-position: -72px -72px
+}
+
+.icon-edit {
+  background-position: -96px -72px
+}
+
+.icon-share {
+  background-position: -120px -72px
+}
+
+.icon-check {
+  background-position: -144px -72px
+}
+
+.icon-move {
+  background-position: -168px -72px
+}
+
+.icon-step-backward {
+  background-position: -192px -72px
+}
+
+.icon-fast-backward {
+  background-position: -216px -72px
+}
+
+.icon-backward {
+  background-position: -240px -72px
+}
+
+.icon-play {
+  background-position: -264px -72px
+}
+
+.icon-pause {
+  background-position: -288px -72px
+}
+
+.icon-stop {
+  background-position: -312px -72px
+}
+
+.icon-forward {
+  background-position: -336px -72px
+}
+
+.icon-fast-forward {
+  background-position: -360px -72px
+}
+
+.icon-step-forward {
+  background-position: -384px -72px
+}
+
+.icon-eject {
+  background-position: -408px -72px
+}
+
+.icon-chevron-left {
+  background-position: -432px -72px
+}
+
+.icon-chevron-right {
+  background-position: -456px -72px
+}
+
+.icon-plus-sign {
+  background-position: 0 -96px
+}
+
+.icon-minus-sign {
+  background-position: -24px -96px
+}
+
+.icon-remove-sign {
+  background-position: -48px -96px
+}
+
+.icon-ok-sign {
+  background-position: -72px -96px
+}
+
+.icon-question-sign {
+  background-position: -96px -96px
+}
+
+.icon-info-sign {
+  background-position: -120px -96px
+}
+
+.icon-screenshot {
+  background-position: -144px -96px
+}
+
+.icon-remove-circle {
+  background-position: -168px -96px
+}
+
+.icon-ok-circle {
+  background-position: -192px -96px
+}
+
+.icon-ban-circle {
+  background-position: -216px -96px
+}
+
+.icon-arrow-left {
+  background-position: -240px -96px
+}
+
+.icon-arrow-right {
+  background-position: -264px -96px
+}
+
+.icon-arrow-up {
+  background-position: -289px -96px
+}
+
+.icon-arrow-down {
+  background-position: -312px -96px
+}
+
+.icon-share-alt {
+  background-position: -336px -96px
+}
+
+.icon-resize-full {
+  background-position: -360px -96px
+}
+
+.icon-resize-small {
+  background-position: -384px -96px
+}
+
+.icon-plus {
+  background-position: -408px -96px
+}
+
+.icon-minus {
+  background-position: -433px -96px
+}
+
+.icon-asterisk {
+  background-position: -456px -96px
+}
+
+.icon-exclamation-sign {
+  background-position: 0 -120px
+}
+
+.icon-gift {
+  background-position: -24px -120px
+}
+
+.icon-leaf {
+  background-position: -48px -120px
+}
+
+.icon-fire {
+  background-position: -72px -120px
+}
+
+.icon-eye-open {
+  background-position: -96px -120px
+}
+
+.icon-eye-close {
+  background-position: -120px -120px
+}
+
+.icon-warning-sign {
+  background-position: -144px -120px
+}
+
+.icon-plane {
+  background-position: -168px -120px
+}
+
+.icon-calendar {
+  background-position: -192px -120px
+}
+
+.icon-random {
+  width: 16px;
+  background-position: -216px -120px
+}
+
+.icon-comment {
+  background-position: -240px -120px
+}
+
+.icon-magnet {
+  background-position: -264px -120px
+}
+
+.icon-chevron-up {
+  background-position: -288px -120px
+}
+
+.icon-chevron-down {
+  background-position: -313px -119px
+}
+
+.icon-retweet {
+  background-position: -336px -120px
+}
+
+.icon-shopping-cart {
+  background-position: -360px -120px
+}
+
+.icon-folder-close {
+  width: 16px;
+  background-position: -384px -120px
+}
+
+.icon-folder-open {
+  width: 16px;
+  background-position: -408px -120px
+}
+
+.icon-resize-vertical {
+  background-position: -432px -119px
+}
+
+.icon-resize-horizontal {
+  background-position: -456px -118px
+}
+
+.icon-hdd {
+  background-position: 0 -144px
+}
+
+.icon-bullhorn {
+  background-position: -24px -144px
+}
+
+.icon-bell {
+  background-position: -48px -144px
+}
+
+.icon-certificate {
+  background-position: -72px -144px
+}
+
+.icon-thumbs-up {
+  background-position: -96px -144px
+}
+
+.icon-thumbs-down {
+  background-position: -120px -144px
+}
+
+.icon-hand-right {
+  background-position: -144px -144px
+}
+
+.icon-hand-left {
+  background-position: -168px -144px
+}
+
+.icon-hand-up {
+  background-position: -192px -144px
+}
+
+.icon-hand-down {
+  background-position: -216px -144px
+}
+
+.icon-circle-arrow-right {
+  background-position: -240px -144px
+}
+
+.icon-circle-arrow-left {
+  background-position: -264px -144px
+}
+
+.icon-circle-arrow-up {
+  background-position: -288px -144px
+}
+
+.icon-circle-arrow-down {
+  background-position: -312px -144px
+}
+
+.icon-globe {
+  background-position: -336px -144px
+}
+
+.icon-wrench {
+  background-position: -360px -144px
+}
+
+.icon-tasks {
+  background-position: -384px -144px
+}
+
+.icon-filter {
+  background-position: -408px -144px
+}
+
+.icon-briefcase {
+  background-position: -432px -144px
+}
+
+.icon-fullscreen {
+  background-position: -456px -144px
+}
+
+.dropup, .dropdown {
+  position: relative
+}
+
+.dropdown-toggle {
+  *margin-bottom: -3px
+}
+
+.dropdown-toggle:active, .open .dropdown-toggle {
+  outline: 0
+}
+
+.caret {
+  display: inline-block;
+  width: 0;
+  height: 0;
+  vertical-align: top;
+  border-top: 4px solid #000;
+  border-right: 4px solid transparent;
+  border-left: 4px solid transparent;
+  content: ""
+}
+
+.dropdown .caret {
+  margin-top: 8px;
+  margin-left: 2px
+}
+
+.dropdown-menu {
+  position: absolute;
+  top: 100%;
+  left: 0;
+  z-index: 1000;
+  display: none;
+  float: left;
+  min-width: 160px;
+  padding: 5px 0;
+  margin: 2px 0 0;
+  list-style: none;
+  background-color: #fff;
+  border: 1px solid #ccc;
+  border: 1px solid rgba(0, 0, 0, 0.2);
+  *border-right-width: 2px;
+  *border-bottom-width: 2px;
+  -webkit-border-radius: 6px;
+  -moz-border-radius: 6px;
+  border-radius: 6px;
+  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+  -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+  -webkit-background-clip: padding-box;
+  -moz-background-clip: padding;
+  background-clip: padding-box
+}
+
+.dropdown-menu.pull-right {
+  right: 0;
+  left: auto
+}
+
+.dropdown-menu .divider {
+  *width: 100%;
+  height: 1px;
+  margin: 9px 1px;
+  *margin: -5px 0 5px;
+  overflow: hidden;
+  background-color: #e5e5e5;
+  border-bottom: 1px solid #fff
+}
+
+.dropdown-menu>li>a {
+  display: block;
+  padding: 3px 20px;
+  clear: both;
+  font-weight: normal;
+  line-height: 20px;
+  color: #333;
+  white-space: nowrap
+}
+
+.dropdown-menu>li>a:hover, .dropdown-menu>li>a:focus, .dropdown-submenu:hover>a, .dropdown-submenu:focus>a {
+  color: #fff;
+  text-decoration: none;
+  background-color: #0081c2;
+  background-image: -moz-linear-gradient(top, #08c, #0077b3);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#0077b3));
+  background-image: -webkit-linear-gradient(top, #08c, #0077b3);
+  background-image: -o-linear-gradient(top, #08c, #0077b3);
+  background-image: linear-gradient(to bottom, #08c, #0077b3);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0)
+}
+
+.dropdown-menu>.active>a, .dropdown-menu>.active>a:hover, .dropdown-menu>.active>a:focus {
+  color: #fff;
+  text-decoration: none;
+  background-color: #0081c2;
+  background-image: -moz-linear-gradient(top, #08c, #0077b3);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#0077b3));
+  background-image: -webkit-linear-gradient(top, #08c, #0077b3);
+  background-image: -o-linear-gradient(top, #08c, #0077b3);
+  background-image: linear-gradient(to bottom, #08c, #0077b3);
+  background-repeat: repeat-x;
+  outline: 0;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0)
+}
+
+.dropdown-menu>.disabled>a, .dropdown-menu>.disabled>a:hover, .dropdown-menu>.disabled>a:focus {
+  color: #999
+}
+
+.dropdown-menu>.disabled>a:hover, .dropdown-menu>.disabled>a:focus {
+  text-decoration: none;
+  cursor: default;
+  background-color: transparent;
+  background-image: none;
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false)
+}
+
+.open {
+  *z-index: 1000
+}
+
+.open>.dropdown-menu {
+  display: block
+}
+
+.pull-right>.dropdown-menu {
+  right: 0;
+  left: auto
+}
+
+.dropup .caret, .navbar-fixed-bottom .dropdown .caret {
+  border-top: 0;
+  border-bottom: 4px solid #000;
+  content: ""
+}
+
+.dropup .dropdown-menu, .navbar-fixed-bottom .dropdown .dropdown-menu {
+  top: auto;
+  bottom: 100%;
+  margin-bottom: 1px
+}
+
+.dropdown-submenu {
+  position: relative
+}
+
+.dropdown-submenu>.dropdown-menu {
+  top: 0;
+  left: 100%;
+  margin-top: -6px;
+  margin-left: -1px;
+  -webkit-border-radius: 0 6px 6px 6px;
+  -moz-border-radius: 0 6px 6px 6px;
+  border-radius: 0 6px 6px 6px
+}
+
+.dropdown-submenu:hover>.dropdown-menu {
+  display: block
+}
+
+.dropup .dropdown-submenu>.dropdown-menu {
+  top: auto;
+  bottom: 0;
+  margin-top: 0;
+  margin-bottom: -2px;
+  -webkit-border-radius: 5px 5px 5px 0;
+  -moz-border-radius: 5px 5px 5px 0;
+  border-radius: 5px 5px 5px 0
+}
+
+.dropdown-submenu>a:after {
+  display: block;
+  float: right;
+  width: 0;
+  height: 0;
+  margin-top: 5px;
+  margin-right: -10px;
+  border-color: transparent;
+  border-left-color: #ccc;
+  border-style: solid;
+  border-width: 5px 0 5px 5px;
+  content: " "
+}
+
+.dropdown-submenu:hover>a:after {
+  border-left-color: #fff
+}
+
+.dropdown-submenu.pull-left {
+  float: none
+}
+
+.dropdown-submenu.pull-left>.dropdown-menu {
+  left: -100%;
+  margin-left: 10px;
+  -webkit-border-radius: 6px 0 6px 6px;
+  -moz-border-radius: 6px 0 6px 6px;
+  border-radius: 6px 0 6px 6px
+}
+
+.dropdown .dropdown-menu .nav-header {
+  padding-right: 20px;
+  padding-left: 20px
+}
+
+.typeahead {
+  z-index: 1051;
+  margin-top: 2px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px
+}
+
+.well {
+  min-height: 20px;
+  padding: 19px;
+  margin-bottom: 20px;
+  background-color: #f5f5f5;
+  border: 1px solid #e3e3e3;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05)
+}
+
+.well blockquote {
+  border-color: #ddd;
+  border-color: rgba(0, 0, 0, 0.15)
+}
+
+.well-large {
+  padding: 24px;
+  -webkit-border-radius: 6px;
+  -moz-border-radius: 6px;
+  border-radius: 6px
+}
+
+.well-small {
+  padding: 9px;
+  -webkit-border-radius: 3px;
+  -moz-border-radius: 3px;
+  border-radius: 3px
+}
+
+.fade {
+  opacity: 0;
+  -webkit-transition: opacity .15s linear;
+  -moz-transition: opacity .15s linear;
+  -o-transition: opacity .15s linear;
+  transition: opacity .15s linear
+}
+
+.fade.in {
+  opacity: 1
+}
+
+.collapse {
+  position: relative;
+  height: 0;
+  overflow: hidden;
+  -webkit-transition: height .35s ease;
+  -moz-transition: height .35s ease;
+  -o-transition: height .35s ease;
+  transition: height .35s ease
+}
+
+.collapse.in {
+  height: auto
+}
+
+.close {
+  float: right;
+  font-size: 20px;
+  font-weight: bold;
+  line-height: 20px;
+  color: #000;
+  text-shadow: 0 1px 0 #fff;
+  opacity: .2;
+  filter: alpha(opacity=20)
+}
+
+.close:hover, .close:focus {
+  color: #000;
+  text-decoration: none;
+  cursor: pointer;
+  opacity: .4;
+  filter: alpha(opacity=40)
+}
+
+button.close {
+  padding: 0;
+  cursor: pointer;
+  background: transparent;
+  border: 0;
+  -webkit-appearance: none
+}
+
+.btn {
+  display: inline-block;
+  *display: inline;
+  padding: 4px 12px;
+  margin-bottom: 0;
+  *margin-left: .3em;
+  font-size: 14px;
+  line-height: 20px;
+  color: #333;
+  text-align: center;
+  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+  vertical-align: middle;
+  cursor: pointer;
+  background-color: #f5f5f5;
+  *background-color: #e6e6e6;
+  background-image: -moz-linear-gradient(top, #fff, #e6e6e6);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#e6e6e6));
+  background-image: -webkit-linear-gradient(top, #fff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #fff, #e6e6e6);
+  background-image: linear-gradient(to bottom, #fff, #e6e6e6);
+  background-repeat: repeat-x;
+  border: 1px solid #ccc;
+  *border: 0;
+  border-color: #e6e6e6 #e6e6e6 #bfbfbf;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  border-bottom-color: #b3b3b3;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+  *zoom: 1;
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05)
+}
+
+.btn:hover, .btn:focus, .btn:active, .btn.active, .btn.disabled, .btn[disabled] {
+  color: #333;
+  background-color: #e6e6e6;
+  *background-color: #d9d9d9
+}
+
+.btn:active, .btn.active {
+  background-color: #ccc  \9
+}
+
+.btn:first-child {
+  *margin-left: 0
+}
+
+.btn:hover, .btn:focus {
+  color: #333;
+  text-decoration: none;
+  background-position: 0 -15px;
+  -webkit-transition: background-position .1s linear;
+  -moz-transition: background-position .1s linear;
+  -o-transition: background-position .1s linear;
+  transition: background-position .1s linear
+}
+
+.btn:focus {
+  outline: thin dotted #333;
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px
+}
+
+.btn.active, .btn:active {
+  background-image: none;
+  outline: 0;
+  -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)
+}
+
+.btn.disabled, .btn[disabled] {
+  cursor: default;
+  background-image: none;
+  opacity: .65;
+  filter: alpha(opacity=65);
+  -webkit-box-shadow: none;
+  -moz-box-shadow: none;
+  box-shadow: none
+}
+
+.btn-large {
+  padding: 11px 19px;
+  font-size: 17.5px;
+  -webkit-border-radius: 6px;
+  -moz-border-radius: 6px;
+  border-radius: 6px
+}
+
+.btn-large [class^="icon-"], .btn-large [class*=" icon-"] {
+  margin-top: 4px
+}
+
+.btn-small {
+  padding: 2px 10px;
+  font-size: 11.9px;
+  -webkit-border-radius: 3px;
+  -moz-border-radius: 3px;
+  border-radius: 3px
+}
+
+.btn-small [class^="icon-"], .btn-small [class*=" icon-"] {
+  margin-top: 0
+}
+
+.btn-mini [class^="icon-"], .btn-mini [class*=" icon-"] {
+  margin-top: -1px
+}
+
+.btn-mini {
+  padding: 0 6px;
+  font-size: 10.5px;
+  -webkit-border-radius: 3px;
+  -moz-border-radius: 3px;
+  border-radius: 3px
+}
+
+.btn-block {
+  display: block;
+  width: 100%;
+  padding-right: 0;
+  padding-left: 0;
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box
+}
+
+.btn-block+.btn-block {
+  margin-top: 5px
+}
+
+input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="button"].btn-block {
+  width: 100%
+}
+
+.btn-primary.active, .btn-warning.active, .btn-danger.active, .btn-success.active, .btn-info.active, .btn-inverse.active {
+  color: rgba(255, 255, 255, 0.75)
+}
+
+.btn-primary {
+  color: #fff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #006dcc;
+  *background-color: #04c;
+  background-image: -moz-linear-gradient(top, #08c, #04c);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#04c));
+  background-image: -webkit-linear-gradient(top, #08c, #04c);
+  background-image: -o-linear-gradient(top, #08c, #04c);
+  background-image: linear-gradient(to bottom, #08c, #04c);
+  background-repeat: repeat-x;
+  border-color: #04c #04c #002a80;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false)
+}
+
+.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .btn-primary.disabled, .btn-primary[disabled] {
+  color: #fff;
+  background-color: #04c;
+  *background-color: #003bb3
+}
+
+.btn-primary:active, .btn-primary.active {
+  background-color: #039  \9
+}
+
+.btn-warning {
+  color: #fff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #faa732;
+  *background-color: #f89406;
+  background-image: -moz-linear-gradient(top, #fbb450, #f89406);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
+  background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
+  background-image: -o-linear-gradient(top, #fbb450, #f89406);
+  background-image: linear-gradient(to bottom, #fbb450, #f89406);
+  background-repeat: repeat-x;
+  border-color: #f89406 #f89406 #ad6704;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false)
+}
+
+.btn-warning:hover, .btn-warning:focus, .btn-warning:active, .btn-warning.active, .btn-warning.disabled, .btn-warning[disabled] {
+  color: #fff;
+  background-color: #f89406;
+  *background-color: #df8505
+}
+
+.btn-warning:active, .btn-warning.active {
+  background-color: #c67605  \9
+}
+
+.btn-danger {
+  color: #fff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #da4f49;
+  *background-color: #bd362f;
+  background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));
+  background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);
+  background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);
+  background-image: linear-gradient(to bottom, #ee5f5b, #bd362f);
+  background-repeat: repeat-x;
+  border-color: #bd362f #bd362f #802420;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false)
+}
+
+.btn-danger:hover, .btn-danger:focus, .btn-danger:active, .btn-danger.active, .btn-danger.disabled, .btn-danger[disabled] {
+  color: #fff;
+  background-color: #bd362f;
+  *background-color: #a9302a
+}
+
+.btn-danger:active, .btn-danger.active {
+  background-color: #942a25  \9
+}
+
+.btn-success {
+  color: #fff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #5bb75b;
+  *background-color: #51a351;
+  background-image: -moz-linear-gradient(top, #62c462, #51a351);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));
+  background-image: -webkit-linear-gradient(top, #62c462, #51a351);
+  background-image: -o-linear-gradient(top, #62c462, #51a351);
+  background-image: linear-gradient(to bottom, #62c462, #51a351);
+  background-repeat: repeat-x;
+  border-color: #51a351 #51a351 #387038;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false)
+}
+
+.btn-success:hover, .btn-success:focus, .btn-success:active, .btn-success.active, .btn-success.disabled, .btn-success[disabled] {
+  color: #fff;
+  background-color: #51a351;
+  *background-color: #499249
+}
+
+.btn-success:active, .btn-success.active {
+  background-color: #408140  \9
+}
+
+.btn-info {
+  color: #fff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #49afcd;
+  *background-color: #2f96b4;
+  background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));
+  background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4);
+  background-image: -o-linear-gradient(top, #5bc0de, #2f96b4);
+  background-image: linear-gradient(to bottom, #5bc0de, #2f96b4);
+  background-repeat: repeat-x;
+  border-color: #2f96b4 #2f96b4 #1f6377;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false)
+}
+
+.btn-info:hover, .btn-info:focus, .btn-info:active, .btn-info.active, .btn-info.disabled, .btn-info[disabled] {
+  color: #fff;
+  background-color: #2f96b4;
+  *background-color: #2a85a0
+}
+
+.btn-info:active, .btn-info.active {
+  background-color: #24748c  \9
+}
+
+.btn-inverse {
+  color: #fff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #363636;
+  *background-color: #222;
+  background-image: -moz-linear-gradient(top, #444, #222);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444), to(#222));
+  background-image: -webkit-linear-gradient(top, #444, #222);
+  background-image: -o-linear-gradient(top, #444, #222);
+  background-image: linear-gradient(to bottom, #444, #222);
+  background-repeat: repeat-x;
+  border-color: #222 #222 #000;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false)
+}
+
+.btn-inverse:hover, .btn-inverse:focus, .btn-inverse:active, .btn-inverse.active, .btn-inverse.disabled, .btn-inverse[disabled] {
+  color: #fff;
+  background-color: #222;
+  *background-color: #151515
+}
+
+.btn-inverse:active, .btn-inverse.active {
+  background-color: #080808  \9
+}
+
+button.btn, input[type="submit"].btn {
+  *padding-top: 3px;
+  *padding-bottom: 3px
+}
+
+button.btn::-moz-focus-inner, input[type="submit"].btn::-moz-focus-inner {
+  padding: 0;
+  border: 0
+}
+
+button.btn.btn-large, input[type="submit"].btn.btn-large {
+  *padding-top: 7px;
+  *padding-bottom: 7px
+}
+
+button.btn.btn-small, input[type="submit"].btn.btn-small {
+  *padding-top: 3px;
+  *padding-bottom: 3px
+}
+
+button.btn.btn-mini, input[type="submit"].btn.btn-mini {
+  *padding-top: 1px;
+  *padding-bottom: 1px
+}
+
+.btn-link, .btn-link:active, .btn-link[disabled] {
+  background-color: transparent;
+  background-image: none;
+  -webkit-box-shadow: none;
+  -moz-box-shadow: none;
+  box-shadow: none
+}
+
+.btn-link {
+  color: #08c;
+  cursor: pointer;
+  border-color: transparent;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0
+}
+
+.btn-link:hover, .btn-link:focus {
+  color: #005580;
+  text-decoration: underline;
+  background-color: transparent
+}
+
+.btn-link[disabled]:hover, .btn-link[disabled]:focus {
+  color: #333;
+  text-decoration: none
+}
+
+.btn-group {
+  position: relative;
+  display: inline-block;
+  *display: inline;
+  *margin-left: .3em;
+  font-size: 0;
+  white-space: nowrap;
+  vertical-align: middle;
+  *zoom: 1
+}
+
+.btn-group:first-child {
+  *margin-left: 0
+}
+
+.btn-group+.btn-group {
+  margin-left: 5px
+}
+
+.btn-toolbar {
+  margin-top: 10px;
+  margin-bottom: 10px;
+  font-size: 0
+}
+
+.btn-toolbar>.btn+.btn, .btn-toolbar>.btn-group+.btn, .btn-toolbar>.btn+.btn-group {
+  margin-left: 5px
+}
+
+.btn-group>.btn {
+  position: relative;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0
+}
+
+.btn-group>.btn+.btn {
+  margin-left: -1px
+}
+
+.btn-group>.btn, .btn-group>.dropdown-menu, .btn-group>.popover {
+  font-size: 14px
+}
+
+.btn-group>.btn-mini {
+  font-size: 10.5px
+}
+
+.btn-group>.btn-small {
+  font-size: 11.9px
+}
+
+.btn-group>.btn-large {
+  font-size: 17.5px
+}
+
+.btn-group>.btn:first-child {
+  margin-left: 0;
+  -webkit-border-bottom-left-radius: 4px;
+  border-bottom-left-radius: 4px;
+  -webkit-border-top-left-radius: 4px;
+  border-top-left-radius: 4px;
+  -moz-border-radius-bottomleft: 4px;
+  -moz-border-radius-topleft: 4px
+}
+
+.btn-group>.btn:last-child, .btn-group>.dropdown-toggle {
+  -webkit-border-top-right-radius: 4px;
+  border-top-right-radius: 4px;
+  -webkit-border-bottom-right-radius: 4px;
+  border-bottom-right-radius: 4px;
+  -moz-border-radius-topright: 4px;
+  -moz-border-radius-bottomright: 4px
+}
+
+.btn-group>.btn.large:first-child {
+  margin-left: 0;
+  -webkit-border-bottom-left-radius: 6px;
+  border-bottom-left-radius: 6px;
+  -webkit-border-top-left-radius: 6px;
+  border-top-left-radius: 6px;
+  -moz-border-radius-bottomleft: 6px;
+  -moz-border-radius-topleft: 6px
+}
+
+.btn-group>.btn.large:last-child, .btn-group>.large.dropdown-toggle {
+  -webkit-border-top-right-radius: 6px;
+  border-top-right-radius: 6px;
+  -webkit-border-bottom-right-radius: 6px;
+  border-bottom-right-radius: 6px;
+  -moz-border-radius-topright: 6px;
+  -moz-border-radius-bottomright: 6px
+}
+
+.btn-group>.btn:hover, .btn-group>.btn:focus, .btn-group>.btn:active, .btn-group>.btn.active {
+  z-index: 2
+}
+
+.btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle {
+  outline: 0
+}
+
+.btn-group>.btn+.dropdown-toggle {
+  *padding-top: 5px;
+  padding-right: 8px;
+  *padding-bottom: 5px;
+  padding-left: 8px;
+  -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05)
+}
+
+.btn-group>.btn-mini+.dropdown-toggle {
+  *padding-top: 2px;
+  padding-right: 5px;
+  *padding-bottom: 2px;
+  padding-left: 5px
+}
+
+.btn-group>.btn-small+.dropdown-toggle {
+  *padding-top: 5px;
+  *padding-bottom: 4px
+}
+
+.btn-group>.btn-large+.dropdown-toggle {
+  *padding-top: 7px;
+  padding-right: 12px;
+  *padding-bottom: 7px;
+  padding-left: 12px
+}
+
+.btn-group.open .dropdown-toggle {
+  background-image: none;
+  -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)
+}
+
+.btn-group.open .btn.dropdown-toggle {
+  background-color: #e6e6e6
+}
+
+.btn-group.open .btn-primary.dropdown-toggle {
+  background-color: #04c
+}
+
+.btn-group.open .btn-warning.dropdown-toggle {
+  background-color: #f89406
+}
+
+.btn-group.open .btn-danger.dropdown-toggle {
+  background-color: #bd362f
+}
+
+.btn-group.open .btn-success.dropdown-toggle {
+  background-color: #51a351
+}
+
+.btn-group.open .btn-info.dropdown-toggle {
+  background-color: #2f96b4
+}
+
+.btn-group.open .btn-inverse.dropdown-toggle {
+  background-color: #222
+}
+
+.btn .caret {
+  margin-top: 8px;
+  margin-left: 0
+}
+
+.btn-large .caret {
+  margin-top: 6px
+}
+
+.btn-large .caret {
+  border-top-width: 5px;
+  border-right-width: 5px;
+  border-left-width: 5px
+}
+
+.btn-mini .caret, .btn-small .caret {
+  margin-top: 8px
+}
+
+.dropup .btn-large .caret {
+  border-bottom-width: 5px
+}
+
+.btn-primary .caret, .btn-warning .caret, .btn-danger .caret, .btn-info .caret, .btn-success .caret, .btn-inverse .caret {
+  border-top-color: #fff;
+  border-bottom-color: #fff
+}
+
+.btn-group-vertical {
+  display: inline-block;
+  *display: inline;
+  *zoom: 1
+}
+
+.btn-group-vertical>.btn {
+  display: block;
+  float: none;
+  max-width: 100%;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0
+}
+
+.btn-group-vertical>.btn+.btn {
+  margin-top: -1px;
+  margin-left: 0
+}
+
+.btn-group-vertical>.btn:first-child {
+  -webkit-border-radius: 4px 4px 0 0;
+  -moz-border-radius: 4px 4px 0 0;
+  border-radius: 4px 4px 0 0
+}
+
+.btn-group-vertical>.btn:last-child {
+  -webkit-border-radius: 0 0 4px 4px;
+  -moz-border-radius: 0 0 4px 4px;
+  border-radius: 0 0 4px 4px
+}
+
+.btn-group-vertical>.btn-large:first-child {
+  -webkit-border-radius: 6px 6px 0 0;
+  -moz-border-radius: 6px 6px 0 0;
+  border-radius: 6px 6px 0 0
+}
+
+.btn-group-vertical>.btn-large:last-child {
+  -webkit-border-radius: 0 0 6px 6px;
+  -moz-border-radius: 0 0 6px 6px;
+  border-radius: 0 0 6px 6px
+}
+
+.alert {
+  padding: 8px 35px 8px 14px;
+  margin-bottom: 20px;
+  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+  background-color: #fcf8e3;
+  border: 1px solid #fbeed5;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px
+}
+
+.alert, .alert h4 {
+  color: #c09853
+}
+
+.alert h4 {
+  margin: 0
+}
+
+.alert .close {
+  position: relative;
+  top: -2px;
+  right: -21px;
+  line-height: 20px
+}
+
+.alert-success {
+  color: #468847;
+  background-color: #dff0d8;
+  border-color: #d6e9c6
+}
+
+.alert-success h4 {
+  color: #468847
+}
+
+.alert-danger, .alert-error {
+  color: #b94a48;
+  background-color: #f2dede;
+  border-color: #eed3d7
+}
+
+.alert-danger h4, .alert-error h4 {
+  color: #b94a48
+}
+
+.alert-info {
+  color: #3a87ad;
+  background-color: #d9edf7;
+  border-color: #bce8f1
+}
+
+.alert-info h4 {
+  color: #3a87ad
+}
+
+.alert-block {
+  padding-top: 14px;
+  padding-bottom: 14px
+}
+
+.alert-block>p, .alert-block>ul {
+  margin-bottom: 0
+}
+
+.alert-block p+p {
+  margin-top: 5px
+}
+
+.nav {
+  margin-bottom: 20px;
+  margin-left: 0;
+  list-style: none
+}
+
+.nav>li>a {
+  display: block
+}
+
+.nav>li>a:hover, .nav>li>a:focus {
+  text-decoration: none;
+  background-color: #eee
+}
+
+.nav>li>a>img {
+  max-width: none
+}
+
+.nav>.pull-right {
+  float: right
+}
+
+.nav-header {
+  display: block;
+  padding: 3px 15px;
+  font-size: 11px;
+  font-weight: bold;
+  line-height: 20px;
+  color: #999;
+  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+  text-transform: uppercase
+}
+
+.nav li+.nav-header {
+  margin-top: 9px
+}
+
+.nav-list {
+  padding-right: 15px;
+  padding-left: 15px;
+  margin-bottom: 0
+}
+
+.nav-list>li>a, .nav-list .nav-header {
+  margin-right: -15px;
+  margin-left: -15px;
+  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5)
+}
+
+.nav-list>li>a {
+  padding: 3px 15px
+}
+
+.nav-list>.active>a, .nav-list>.active>a:hover, .nav-list>.active>a:focus {
+  color: #fff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
+  background-color: #08c
+}
+
+.nav-list [class^="icon-"], .nav-list [class*=" icon-"] {
+  margin-right: 2px
+}
+
+.nav-list .divider {
+  *width: 100%;
+  height: 1px;
+  margin: 9px 1px;
+  *margin: -5px 0 5px;
+  overflow: hidden;
+  background-color: #e5e5e5;
+  border-bottom: 1px solid #fff
+}
+
+.nav-tabs, .nav-pills {
+  *zoom: 1
+}
+
+.nav-tabs:before, .nav-pills:before, .nav-tabs:after, .nav-pills:after {
+  display: table;
+  line-height: 0;
+  content: ""
+}
+
+.nav-tabs:after, .nav-pills:after {
+  clear: both
+}
+
+.nav-tabs>li, .nav-pills>li {
+  float: left
+}
+
+.nav-tabs>li>a, .nav-pills>li>a {
+  padding-right: 12px;
+  padding-left: 12px;
+  margin-right: 2px;
+  line-height: 14px
+}
+
+.nav-tabs {
+  border-bottom: 1px solid #ddd
+}
+
+.nav-tabs>li {
+  margin-bottom: -1px
+}
+
+.nav-tabs>li>a {
+  padding-top: 8px;
+  padding-bottom: 8px;
+  line-height: 20px;
+  border: 1px solid transparent;
+  -webkit-border-radius: 4px 4px 0 0;
+  -moz-border-radius: 4px 4px 0 0;
+  border-radius: 4px 4px 0 0
+}
+
+.nav-tabs>li>a:hover, .nav-tabs>li>a:focus {
+  border-color: #eee #eee #ddd
+}
+
+.nav-tabs>.active>a, .nav-tabs>.active>a:hover, .nav-tabs>.active>a:focus {
+  color: #555;
+  cursor: default;
+  background-color: #fff;
+  border: 1px solid #ddd;
+  border-bottom-color: transparent
+}
+
+.nav-pills>li>a {
+  padding-top: 8px;
+  padding-bottom: 8px;
+  margin-top: 2px;
+  margin-bottom: 2px;
+  -webkit-border-radius: 5px;
+  -moz-border-radius: 5px;
+  border-radius: 5px
+}
+
+.nav-pills>.active>a, .nav-pills>.active>a:hover, .nav-pills>.active>a:focus {
+  color: #fff;
+  background-color: #08c
+}
+
+.nav-stacked>li {
+  float: none
+}
+
+.nav-stacked>li>a {
+  margin-right: 0
+}
+
+.nav-tabs.nav-stacked {
+  border-bottom: 0
+}
+
+.nav-tabs.nav-stacked>li>a {
+  border: 1px solid #ddd;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0
+}
+
+.nav-tabs.nav-stacked>li:first-child>a {
+  -webkit-border-top-right-radius: 4px;
+  border-top-right-radius: 4px;
+  -webkit-border-top-left-radius: 4px;
+  border-top-left-radius: 4px;
+  -moz-border-radius-topright: 4px;
+  -moz-border-radius-topleft: 4px
+}
+
+.nav-tabs.nav-stacked>li:last-child>a {
+  -webkit-border-bottom-right-radius: 4px;
+  border-bottom-right-radius: 4px;
+  -webkit-border-bottom-left-radius: 4px;
+  border-bottom-left-radius: 4px;
+  -moz-border-radius-bottomright: 4px;
+  -moz-border-radius-bottomleft: 4px
+}
+
+.nav-tabs.nav-stacked>li>a:hover, .nav-tabs.nav-stacked>li>a:focus {
+  z-index: 2;
+  border-color: #ddd
+}
+
+.nav-pills.nav-stacked>li>a {
+  margin-bottom: 3px
+}
+
+.nav-pills.nav-stacked>li:last-child>a {
+  margin-bottom: 1px
+}
+
+.nav-tabs .dropdown-menu {
+  -webkit-border-radius: 0 0 6px 6px;
+  -moz-border-radius: 0 0 6px 6px;
+  border-radius: 0 0 6px 6px
+}
+
+.nav-pills .dropdown-menu {
+  -webkit-border-radius: 6px;
+  -moz-border-radius: 6px;
+  border-radius: 6px
+}
+
+.nav .dropdown-toggle .caret {
+  margin-top: 6px;
+  border-top-color: #08c;
+  border-bottom-color: #08c
+}
+
+.nav .dropdown-toggle:hover .caret, .nav .dropdown-toggle:focus .caret {
+  border-top-color: #005580;
+  border-bottom-color: #005580
+}
+
+.nav-tabs .dropdown-toggle .caret {
+  margin-top: 8px
+}
+
+.nav .active .dropdown-toggle .caret {
+  border-top-color: #fff;
+  border-bottom-color: #fff
+}
+
+.nav-tabs .active .dropdown-toggle .caret {
+  border-top-color: #555;
+  border-bottom-color: #555
+}
+
+.nav>.dropdown.active>a:hover, .nav>.dropdown.active>a:focus {
+  cursor: pointer
+}
+
+.nav-tabs .open .dropdown-toggle, .nav-pills .open .dropdown-toggle, .nav>li.dropdown.open.active>a:hover, .nav>li.dropdown.open.active>a:focus {
+  color: #fff;
+  background-color: #999;
+  border-color: #999
+}
+
+.nav li.dropdown.open .caret, .nav li.dropdown.open.active .caret, .nav li.dropdown.open a:hover .caret, .nav li.dropdown.open a:focus .caret {
+  border-top-color: #fff;
+  border-bottom-color: #fff;
+  opacity: 1;
+  filter: alpha(opacity=100)
+}
+
+.tabs-stacked .open>a:hover, .tabs-stacked .open>a:focus {
+  border-color: #999
+}
+
+.tabbable {
+  *zoom: 1
+}
+
+.tabbable:before, .tabbable:after {
+  display: table;
+  line-height: 0;
+  content: ""
+}
+
+.tabbable:after {
+  clear: both
+}
+
+.tab-content {
+  overflow: auto
+}
+
+.tabs-below>.nav-tabs, .tabs-right>.nav-tabs, .tabs-left>.nav-tabs {
+  border-bottom: 0
+}
+
+.tab-content>.tab-pane, .pill-content>.pill-pane {
+  display: none
+}
+
+.tab-content>.active, .pill-content>.active {
+  display: block
+}
+
+.tabs-below>.nav-tabs {
+  border-top: 1px solid #ddd
+}
+
+.tabs-below>.nav-tabs>li {
+  margin-top: -1px;
+  margin-bottom: 0
+}
+
+.tabs-below>.nav-tabs>li>a {
+  -webkit-border-radius: 0 0 4px 4px;
+  -moz-border-radius: 0 0 4px 4px;
+  border-radius: 0 0 4px 4px
+}
+
+.tabs-below>.nav-tabs>li>a:hover, .tabs-below>.nav-tabs>li>a:focus {
+  border-top-color: #ddd;
+  border-bottom-color: transparent
+}
+
+.tabs-below>.nav-tabs>.active>a, .tabs-below>.nav-tabs>.active>a:hover, .tabs-below>.nav-tabs>.active>a:focus {
+  border-color: transparent #ddd #ddd #ddd
+}
+
+.tabs-left>.nav-tabs>li, .tabs-right>.nav-tabs>li {
+  float: none
+}
+
+.tabs-left>.nav-tabs>li>a, .tabs-right>.nav-tabs>li>a {
+  min-width: 74px;
+  margin-right: 0;
+  margin-bottom: 3px
+}
+
+.tabs-left>.nav-tabs {
+  float: left;
+  margin-right: 19px;
+  border-right: 1px solid #ddd
+}
+
+.tabs-left>.nav-tabs>li>a {
+  margin-right: -1px;
+  -webkit-border-radius: 4px 0 0 4px;
+  -moz-border-radius: 4px 0 0 4px;
+  border-radius: 4px 0 0 4px
+}
+
+.tabs-left>.nav-tabs>li>a:hover, .tabs-left>.nav-tabs>li>a:focus {
+  border-color: #eee #ddd #eee #eee
+}
+
+.tabs-left>.nav-tabs .active>a, .tabs-left>.nav-tabs .active>a:hover, .tabs-left>.nav-tabs .active>a:focus {
+  border-color: #ddd transparent #ddd #ddd;
+  *border-right-color: #fff
+}
+
+.tabs-right>.nav-tabs {
+  float: right;
+  margin-left: 19px;
+  border-left: 1px solid #ddd
+}
+
+.tabs-right>.nav-tabs>li>a {
+  margin-left: -1px;
+  -webkit-border-radius: 0 4px 4px 0;
+  -moz-border-radius: 0 4px 4px 0;
+  border-radius: 0 4px 4px 0
+}
+
+.tabs-right>.nav-tabs>li>a:hover, .tabs-right>.nav-tabs>li>a:focus {
+  border-color: #eee #eee #eee #ddd
+}
+
+.tabs-right>.nav-tabs .active>a, .tabs-right>.nav-tabs .active>a:hover, .tabs-right>.nav-tabs .active>a:focus {
+  border-color: #ddd #ddd #ddd transparent;
+  *border-left-color: #fff
+}
+
+.nav>.disabled>a {
+  color: #999
+}
+
+.nav>.disabled>a:hover, .nav>.disabled>a:focus {
+  text-decoration: none;
+  cursor: default;
+  background-color: transparent
+}
+
+.navbar {
+  *position: relative;
+  *z-index: 2;
+  margin-bottom: 20px;
+  overflow: visible
+}
+
+.navbar-inner {
+  min-height: 40px;
+  padding-right: 20px;
+  padding-left: 20px;
+  background-color: #fafafa;
+  background-image: -moz-linear-gradient(top, #fff, #f2f2f2);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#f2f2f2));
+  background-image: -webkit-linear-gradient(top, #fff, #f2f2f2);
+  background-image: -o-linear-gradient(top, #fff, #f2f2f2);
+  background-image: linear-gradient(to bottom, #fff, #f2f2f2);
+  background-repeat: repeat-x;
+  border: 1px solid #d4d4d4;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);
+  *zoom: 1;
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065)
+}
+
+.navbar-inner:before, .navbar-inner:after {
+  display: table;
+  line-height: 0;
+  content: ""
+}
+
+.navbar-inner:after {
+  clear: both
+}
+
+.navbar .container {
+  width: auto
+}
+
+.nav-collapse.collapse {
+  height: auto;
+  overflow: visible
+}
+
+.navbar .brand {
+  display: block;
+  float: left;
+  padding: 10px 20px 10px;
+  margin-left: -20px;
+  font-size: 20px;
+  font-weight: 200;
+  color: #777;
+  text-shadow: 0 1px 0 #fff
+}
+
+.navbar .brand:hover, .navbar .brand:focus {
+  text-decoration: none
+}
+
+.navbar-text {
+  margin-bottom: 0;
+  line-height: 40px;
+  color: #777
+}
+
+.navbar-link {
+  color: #777
+}
+
+.navbar-link:hover, .navbar-link:focus {
+  color: #333
+}
+
+.navbar .divider-vertical {
+  height: 40px;
+  margin: 0 9px;
+  border-right: 1px solid #fff;
+  border-left: 1px solid #f2f2f2
+}
+
+.navbar .btn, .navbar .btn-group {
+  margin-top: 5px
+}
+
+.navbar .btn-group .btn, .navbar .input-prepend .btn, .navbar .input-append .btn, .navbar .input-prepend .btn-group, .navbar .input-append .btn-group {
+  margin-top: 0
+}
+
+.navbar-form {
+  margin-bottom: 0;
+  *zoom: 1
+}
+
+.navbar-form:before, .navbar-form:after {
+  display: table;
+  line-height: 0;
+  content: ""
+}
+
+.navbar-form:after {
+  clear: both
+}
+
+.navbar-form input, .navbar-form select, .navbar-form .radio, .navbar-form .checkbox {
+  margin-top: 5px
+}
+
+.navbar-form input, .navbar-form select, .navbar-form .btn {
+  display: inline-block;
+  margin-bottom: 0
+}
+
+.navbar-form input[type="image"], .navbar-form input[type="checkbox"], .navbar-form input[type="radio"] {
+  margin-top: 3px
+}
+
+.navbar-form .input-append, .navbar-form .input-prepend {
+  margin-top: 5px;
+  white-space: nowrap
+}
+
+.navbar-form .input-append input, .navbar-form .input-prepend input {
+  margin-top: 0
+}
+
+.navbar-search {
+  position: relative;
+  float: left;
+  margin-top: 5px;
+  margin-bottom: 0
+}
+
+.navbar-search .search-query {
+  padding: 4px 14px;
+  margin-bottom: 0;
+  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+  font-size: 13px;
+  font-weight: normal;
+  line-height: 1;
+  -webkit-border-radius: 15px;
+  -moz-border-radius: 15px;
+  border-radius: 15px
+}
+
+.navbar-static-top {
+  position: static;
+  margin-bottom: 0
+}
+
+.navbar-static-top .navbar-inner {
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0
+}
+
+.navbar-fixed-top, .navbar-fixed-bottom {
+  position: fixed;
+  right: 0;
+  left: 0;
+  z-index: 1030;
+  margin-bottom: 0
+}
+
+.navbar-fixed-top .navbar-inner, .navbar-static-top .navbar-inner {
+  border-width: 0 0 1px
+}
+
+.navbar-fixed-bottom .navbar-inner {
+  border-width: 1px 0 0
+}
+
+.navbar-fixed-top .navbar-inner, .navbar-fixed-bottom .navbar-inner {
+  padding-right: 0;
+  padding-left: 0;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0
+}
+
+.navbar-static-top .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container {
+  width: 940px
+}
+
+.navbar-fixed-top {
+  top: 0
+}
+
+.navbar-fixed-top .navbar-inner, .navbar-static-top .navbar-inner {
+  -webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
+  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1)
+}
+
+.navbar-fixed-bottom {
+  bottom: 0
+}
+
+.navbar-fixed-bottom .navbar-inner {
+  -webkit-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1);
+  box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1)
+}
+
+.navbar .nav {
+  position: relative;
+  left: 0;
+  display: block;
+  float: left;
+  margin: 0 10px 0 0
+}
+
+.navbar .nav.pull-right {
+  float: right;
+  margin-right: 0
+}
+
+.navbar .nav>li {
+  float: left
+}
+
+.navbar .nav>li>a {
+  float: none;
+  padding: 10px 15px 10px;
+  color: #777;
+  text-decoration: none;
+  text-shadow: 0 1px 0 #fff
+}
+
+.navbar .nav .dropdown-toggle .caret {
+  margin-top: 8px
+}
+
+.navbar .nav>li>a:focus, .navbar .nav>li>a:hover {
+  color: #333;
+  text-decoration: none;
+  background-color: transparent
+}
+
+.navbar .nav>.active>a, .navbar .nav>.active>a:hover, .navbar .nav>.active>a:focus {
+  color: #555;
+  text-decoration: none;
+  background-color: #e5e5e5;
+  -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
+  -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
+  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125)


<TRUNCATED>

[03/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/bootstrap/js/bootstrap.min.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/bootstrap/js/bootstrap.min.js b/portal/js/libs/bootstrap/js/bootstrap.min.js
new file mode 100644
index 0000000..d50de77
--- /dev/null
+++ b/portal/js/libs/bootstrap/js/bootstrap.min.js
@@ -0,0 +1,644 @@
+/*!
+ * Bootstrap.js by @fat & @mdo
+ * Copyright 2012 Twitter, Inc.
+ * http://www.apache.org/licenses/LICENSE-2.0.txt
+ */
+!function (e) {
+  "use strict";
+  e(function () {
+    e.support.transition = function () {
+      var e = function () {
+        var e = document.createElement("bootstrap"), t = {WebkitTransition: "webkitTransitionEnd", MozTransition: "transitionend", OTransition: "oTransitionEnd otransitionend", transition: "transitionend"}, n;
+        for (n in t)if (e.style[n] !== undefined)return t[n]
+      }();
+      return e && {end: e}
+    }()
+  })
+}(window.jQuery), !function (e) {
+  "use strict";
+  var t = '[data-dismiss="alert"]', n = function (n) {
+    e(n).on("click", t, this.close)
+  };
+  n.prototype.close = function (t) {
+    function s() {
+      i.trigger("closed").remove()
+    }
+
+    var n = e(this), r = n.attr("data-target"), i;
+    r || (r = n.attr("href"), r = r && r.replace(/.*(?=#[^\s]*$)/, "")), i = e(r), t && t.preventDefault(), i.length || (i = n.hasClass("alert") ? n : n.parent()), i.trigger(t = e.Event("close"));
+    if (t.isDefaultPrevented())return;
+    i.removeClass("in"), e.support.transition && i.hasClass("fade") ? i.on(e.support.transition.end, s) : s()
+  };
+  var r = e.fn.alert;
+  e.fn.alert = function (t) {
+    return this.each(function () {
+      var r = e(this), i = r.data("alert");
+      i || r.data("alert", i = new n(this)), typeof t == "string" && i[t].call(r)
+    })
+  }, e.fn.alert.Constructor = n, e.fn.alert.noConflict = function () {
+    return e.fn.alert = r, this
+  }, e(document).on("click.alert.data-api", t, n.prototype.close)
+}(window.jQuery), !function (e) {
+  "use strict";
+  var t = function (t, n) {
+    this.$element = e(t), this.options = e.extend({}, e.fn.button.defaults, n)
+  };
+  t.prototype.setState = function (e) {
+    var t = "disabled", n = this.$element, r = n.data(), i = n.is("input") ? "val" : "html";
+    e += "Text", r.resetText || n.data("resetText", n[i]()), n[i](r[e] || this.options[e]), setTimeout(function () {
+      e == "loadingText" ? n.addClass(t).attr(t, t) : n.removeClass(t).removeAttr(t)
+    }, 0)
+  }, t.prototype.toggle = function () {
+    var e = this.$element.closest('[data-toggle="buttons-radio"]');
+    e && e.find(".active").removeClass("active"), this.$element.toggleClass("active")
+  };
+  var n = e.fn.button;
+  e.fn.button = function (n) {
+    return this.each(function () {
+      var r = e(this), i = r.data("button"), s = typeof n == "object" && n;
+      i || r.data("button", i = new t(this, s)), n == "toggle" ? i.toggle() : n && i.setState(n)
+    })
+  }, e.fn.button.defaults = {loadingText: "loading..."}, e.fn.button.Constructor = t, e.fn.button.noConflict = function () {
+    return e.fn.button = n, this
+  }, e(document).on("click.button.data-api", "[data-toggle^=button]", function (t) {
+    var n = e(t.target);
+    n.hasClass("btn") || (n = n.closest(".btn")), n.button("toggle")
+  })
+}(window.jQuery), !function (e) {
+  "use strict";
+  var t = function (t, n) {
+    this.$element = e(t), this.$indicators = this.$element.find(".carousel-indicators"), this.options = n, this.options.pause == "hover" && this.$element.on("mouseenter", e.proxy(this.pause, this)).on("mouseleave", e.proxy(this.cycle, this))
+  };
+  t.prototype = {cycle: function (t) {
+    return t || (this.paused = !1), this.interval && clearInterval(this.interval), this.options.interval && !this.paused && (this.interval = setInterval(e.proxy(this.next, this), this.options.interval)), this
+  }, getActiveIndex: function () {
+    return this.$active = this.$element.find(".item.active"), this.$items = this.$active.parent().children(), this.$items.index(this.$active)
+  }, to: function (t) {
+    var n = this.getActiveIndex(), r = this;
+    if (t > this.$items.length - 1 || t < 0)return;
+    return this.sliding ? this.$element.one("slid", function () {
+      r.to(t)
+    }) : n == t ? this.pause().cycle() : this.slide(t > n ? "next" : "prev", e(this.$items[t]))
+  }, pause: function (t) {
+    return t || (this.paused = !0), this.$element.find(".next, .prev").length && e.support.transition.end && (this.$element.trigger(e.support.transition.end), this.cycle(!0)), clearInterval(this.interval), this.interval = null, this
+  }, next: function () {
+    if (this.sliding)return;
+    return this.slide("next")
+  }, prev: function () {
+    if (this.sliding)return;
+    return this.slide("prev")
+  }, slide: function (t, n) {
+    var r = this.$element.find(".item.active"), i = n || r[t](), s = this.interval, o = t == "next" ? "left" : "right", u = t == "next" ? "first" : "last", a = this, f;
+    this.sliding = !0, s && this.pause(), i = i.length ? i : this.$element.find(".item")[u](), f = e.Event("slide", {relatedTarget: i[0], direction: o});
+    if (i.hasClass("active"))return;
+    this.$indicators.length && (this.$indicators.find(".active").removeClass("active"), this.$element.one("slid", function () {
+      var t = e(a.$indicators.children()[a.getActiveIndex()]);
+      t && t.addClass("active")
+    }));
+    if (e.support.transition && this.$element.hasClass("slide")) {
+      this.$element.trigger(f);
+      if (f.isDefaultPrevented())return;
+      i.addClass(t), i[0].offsetWidth, r.addClass(o), i.addClass(o), this.$element.one(e.support.transition.end, function () {
+        i.removeClass([t, o].join(" ")).addClass("active"), r.removeClass(["active", o].join(" ")), a.sliding = !1, setTimeout(function () {
+          a.$element.trigger("slid")
+        }, 0)
+      })
+    } else {
+      this.$element.trigger(f);
+      if (f.isDefaultPrevented())return;
+      r.removeClass("active"), i.addClass("active"), this.sliding = !1, this.$element.trigger("slid")
+    }
+    return s && this.cycle(), this
+  }};
+  var n = e.fn.carousel;
+  e.fn.carousel = function (n) {
+    return this.each(function () {
+      var r = e(this), i = r.data("carousel"), s = e.extend({}, e.fn.carousel.defaults, typeof n == "object" && n), o = typeof n == "string" ? n : s.slide;
+      i || r.data("carousel", i = new t(this, s)), typeof n == "number" ? i.to(n) : o ? i[o]() : s.interval && i.pause().cycle()
+    })
+  }, e.fn.carousel.defaults = {interval: 5e3, pause: "hover"}, e.fn.carousel.Constructor = t, e.fn.carousel.noConflict = function () {
+    return e.fn.carousel = n, this
+  }, e(document).on("click.carousel.data-api", "[data-slide], [data-slide-to]", function (t) {
+    var n = e(this), r, i = e(n.attr("data-target") || (r = n.attr("href")) && r.replace(/.*(?=#[^\s]+$)/, "")), s = e.extend({}, i.data(), n.data()), o;
+    i.carousel(s), (o = n.attr("data-slide-to")) && i.data("carousel").pause().to(o).cycle(), t.preventDefault()
+  })
+}(window.jQuery), !function (e) {
+  "use strict";
+  var t = function (t, n) {
+    this.$element = e(t), this.options = e.extend({}, e.fn.collapse.defaults, n), this.options.parent && (this.$parent = e(this.options.parent)), this.options.toggle && this.toggle()
+  };
+  t.prototype = {constructor: t, dimension: function () {
+    var e = this.$element.hasClass("width");
+    return e ? "width" : "height"
+  }, show: function () {
+    var t, n, r, i;
+    if (this.transitioning || this.$element.hasClass("in"))return;
+    t = this.dimension(), n = e.camelCase(["scroll", t].join("-")), r = this.$parent && this.$parent.find("> .accordion-group > .in");
+    if (r && r.length) {
+      i = r.data("collapse");
+      if (i && i.transitioning)return;
+      r.collapse("hide"), i || r.data("collapse", null)
+    }
+    this.$element[t](0), this.transition("addClass", e.Event("show"), "shown"), e.support.transition && this.$element[t](this.$element[0][n])
+  }, hide: function () {
+    var t;
+    if (this.transitioning || !this.$element.hasClass("in"))return;
+    t = this.dimension(), this.reset(this.$element[t]()), this.transition("removeClass", e.Event("hide"), "hidden"), this.$element[t](0)
+  }, reset: function (e) {
+    var t = this.dimension();
+    return this.$element.removeClass("collapse")[t](e || "auto")[0].offsetWidth, this.$element[e !== null ? "addClass" : "removeClass"]("collapse"), this
+  }, transition: function (t, n, r) {
+    var i = this, s = function () {
+      n.type == "show" && i.reset(), i.transitioning = 0, i.$element.trigger(r)
+    };
+    this.$element.trigger(n);
+    if (n.isDefaultPrevented())return;
+    this.transitioning = 1, this.$element[t]("in"), e.support.transition && this.$element.hasClass("collapse") ? this.$element.one(e.support.transition.end, s) : s()
+  }, toggle: function () {
+    this[this.$element.hasClass("in") ? "hide" : "show"]()
+  }};
+  var n = e.fn.collapse;
+  e.fn.collapse = function (n) {
+    return this.each(function () {
+      var r = e(this), i = r.data("collapse"), s = e.extend({}, e.fn.collapse.defaults, r.data(), typeof n == "object" && n);
+      i || r.data("collapse", i = new t(this, s)), typeof n == "string" && i[n]()
+    })
+  }, e.fn.collapse.defaults = {toggle: !0}, e.fn.collapse.Constructor = t, e.fn.collapse.noConflict = function () {
+    return e.fn.collapse = n, this
+  }, e(document).on("click.collapse.data-api", "[data-toggle=collapse]", function (t) {
+    var n = e(this), r, i = n.attr("data-target") || t.preventDefault() || (r = n.attr("href")) && r.replace(/.*(?=#[^\s]+$)/, ""), s = e(i).data("collapse") ? "toggle" : n.data();
+    n[e(i).hasClass("in") ? "addClass" : "removeClass"]("collapsed"), e(i).collapse(s)
+  })
+}(window.jQuery), !function (e) {
+  "use strict";
+  function r() {
+    e(t).each(function () {
+      i(e(this)).removeClass("open")
+    })
+  }
+
+  function i(t) {
+    var n = t.attr("data-target"), r;
+    n || (n = t.attr("href"), n = n && /#/.test(n) && n.replace(/.*(?=#[^\s]*$)/, "")), r = n && e(n);
+    if (!r || !r.length)r = t.parent();
+    return r
+  }
+
+  var t = "[data-toggle=dropdown]", n = function (t) {
+    var n = e(t).on("click.dropdown.data-api", this.toggle);
+    e("html").on("click.dropdown.data-api", function () {
+      n.parent().removeClass("open")
+    })
+  };
+  n.prototype = {constructor: n, toggle: function (t) {
+    var n = e(this), s, o;
+    if (n.is(".disabled, :disabled"))return;
+    return s = i(n), o = s.hasClass("open"), r(), o || s.toggleClass("open"), n.focus(), !1
+  }, keydown: function (n) {
+    var r, s, o, u, a, f;
+    if (!/(38|40|27)/.test(n.keyCode))return;
+    r = e(this), n.preventDefault(), n.stopPropagation();
+    if (r.is(".disabled, :disabled"))return;
+    u = i(r), a = u.hasClass("open");
+    if (!a || a && n.keyCode == 27)return n.which == 27 && u.find(t).focus(), r.click();
+    s = e("[role=menu] li:not(.divider):visible a", u);
+    if (!s.length)return;
+    f = s.index(s.filter(":focus")), n.keyCode == 38 && f > 0 && f--, n.keyCode == 40 && f < s.length - 1 && f++, ~f || (f = 0), s.eq(f).focus()
+  }};
+  var s = e.fn.dropdown;
+  e.fn.dropdown = function (t) {
+    return this.each(function () {
+      var r = e(this), i = r.data("dropdown");
+      i || r.data("dropdown", i = new n(this)), typeof t == "string" && i[t].call(r)
+    })
+  }, e.fn.dropdown.Constructor = n, e.fn.dropdown.noConflict = function () {
+    return e.fn.dropdown = s, this
+  }, e(document).on("click.dropdown.data-api", r).on("click.dropdown.data-api", ".dropdown form",function (e) {
+    e.stopPropagation()
+  }).on("click.dropdown-menu",function (e) {
+    e.stopPropagation()
+  }).on("click.dropdown.data-api", t, n.prototype.toggle).on("keydown.dropdown.data-api", t + ", [role=menu]", n.prototype.keydown)
+}(window.jQuery), !function (e) {
+  "use strict";
+  var t = function (t, n) {
+    this.options = n, this.$element = e(t).delegate('[data-dismiss="modal"]', "click.dismiss.modal", e.proxy(this.hide, this)), this.options.remote && this.$element.find(".modal-body").load(this.options.remote)
+  };
+  t.prototype = {constructor: t, toggle: function () {
+    return this[this.isShown ? "hide" : "show"]()
+  }, show: function () {
+    var t = this, n = e.Event("show");
+    this.$element.trigger(n);
+    if (this.isShown || n.isDefaultPrevented())return;
+    this.isShown = !0, this.escape(), this.backdrop(function () {
+      var n = e.support.transition && t.$element.hasClass("fade");
+      t.$element.parent().length || t.$element.appendTo(document.body), t.$element.show(), n && t.$element[0].offsetWidth, t.$element.addClass("in").attr("aria-hidden", !1), t.enforceFocus(), n ? t.$element.one(e.support.transition.end, function () {
+        t.$element.focus().trigger("shown")
+      }) : t.$element.focus().trigger("shown")
+    })
+  }, hide: function (t) {
+    t && t.preventDefault();
+    var n = this;
+    t = e.Event("hide"), this.$element.trigger(t);
+    if (!this.isShown || t.isDefaultPrevented())return;
+    this.isShown = !1, this.escape(), e(document).off("focusin.modal"), this.$element.removeClass("in").attr("aria-hidden", !0), e.support.transition && this.$element.hasClass("fade") ? this.hideWithTransition() : this.hideModal()
+  }, enforceFocus: function () {
+    var t = this;
+    e(document).on("focusin.modal", function (e) {
+      t.$element[0] !== e.target && !t.$element.has(e.target).length && t.$element.focus()
+    })
+  }, escape: function () {
+    var e = this;
+    this.isShown && this.options.keyboard ? this.$element.on("keyup.dismiss.modal", function (t) {
+      t.which == 27 && e.hide()
+    }) : this.isShown || this.$element.off("keyup.dismiss.modal")
+  }, hideWithTransition: function () {
+    var t = this, n = setTimeout(function () {
+      t.$element.off(e.support.transition.end), t.hideModal()
+    }, 500);
+    this.$element.one(e.support.transition.end, function () {
+      clearTimeout(n), t.hideModal()
+    })
+  }, hideModal: function () {
+    var e = this;
+    this.$element.hide(), this.backdrop(function () {
+      e.removeBackdrop(), e.$element.trigger("hidden")
+    })
+  }, removeBackdrop: function () {
+    this.$backdrop && this.$backdrop.remove(), this.$backdrop = null
+  }, backdrop: function (t) {
+    var n = this, r = this.$element.hasClass("fade") ? "fade" : "";
+    if (this.isShown && this.options.backdrop) {
+      var i = e.support.transition && r;
+      this.$backdrop = e('<div class="modal-backdrop ' + r + '" />').appendTo(document.body), this.$backdrop.click(this.options.backdrop == "static" ? e.proxy(this.$element[0].focus, this.$element[0]) : e.proxy(this.hide, this)), i && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in");
+      if (!t)return;
+      i ? this.$backdrop.one(e.support.transition.end, t) : t()
+    } else!this.isShown && this.$backdrop ? (this.$backdrop.removeClass("in"), e.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one(e.support.transition.end, t) : t()) : t && t()
+  }};
+  var n = e.fn.modal;
+  e.fn.modal = function (n) {
+    return this.each(function () {
+      var r = e(this), i = r.data("modal"), s = e.extend({}, e.fn.modal.defaults, r.data(), typeof n == "object" && n);
+      i || r.data("modal", i = new t(this, s)), typeof n == "string" ? i[n]() : s.show && i.show()
+    })
+  }, e.fn.modal.defaults = {backdrop: !0, keyboard: !0, show: !0}, e.fn.modal.Constructor = t, e.fn.modal.noConflict = function () {
+    return e.fn.modal = n, this
+  }, e(document).on("click.modal.data-api", '[data-toggle="modal"]', function (t) {
+    var n = e(this), r = n.attr("href"), i = e(n.attr("data-target") || r && r.replace(/.*(?=#[^\s]+$)/, "")), s = i.data("modal") ? "toggle" : e.extend({remote: !/#/.test(r) && r}, i.data(), n.data());
+    t.preventDefault(), i.modal(s).one("hide", function () {
+      n.focus()
+    })
+  })
+}(window.jQuery), !function (e) {
+  "use strict";
+  var t = function (e, t) {
+    this.init("tooltip", e, t)
+  };
+  t.prototype = {constructor: t, init: function (t, n, r) {
+    var i, s, o, u, a;
+    this.type = t, this.$element = e(n), this.options = this.getOptions(r), this.enabled = !0, o = this.options.trigger.split(" ");
+    for (a = o.length; a--;)u = o[a], u == "click" ? this.$element.on("click." + this.type, this.options.selector, e.proxy(this.toggle, this)) : u != "manual" && (i = u == "hover" ? "mouseenter" : "focus", s = u == "hover" ? "mouseleave" : "blur", this.$element.on(i + "." + this.type, this.options.selector, e.proxy(this.enter, this)), this.$element.on(s + "." + this.type, this.options.selector, e.proxy(this.leave, this)));
+    this.options.selector ? this._options = e.extend({}, this.options, {trigger: "manual", selector: ""}) : this.fixTitle()
+  }, getOptions: function (t) {
+    return t = e.extend({}, e.fn[this.type].defaults, this.$element.data(), t), t.delay && typeof t.delay == "number" && (t.delay = {show: t.delay, hide: t.delay}), t
+  }, enter: function (t) {
+    var n = e.fn[this.type].defaults, r = {}, i;
+    this._options && e.each(this._options, function (e, t) {
+      n[e] != t && (r[e] = t)
+    }, this), i = e(t.currentTarget)[this.type](r).data(this.type);
+    if (!i.options.delay || !i.options.delay.show)return i.show();
+    clearTimeout(this.timeout), i.hoverState = "in", this.timeout = setTimeout(function () {
+      i.hoverState == "in" && i.show()
+    }, i.options.delay.show)
+  }, leave: function (t) {
+    var n = e(t.currentTarget)[this.type](this._options).data(this.type);
+    this.timeout && clearTimeout(this.timeout);
+    if (!n.options.delay || !n.options.delay.hide)return n.hide();
+    n.hoverState = "out", this.timeout = setTimeout(function () {
+      n.hoverState == "out" && n.hide()
+    }, n.options.delay.hide)
+  }, show: function () {
+    var t, n, r, i, s, o, u = e.Event("show");
+    if (this.hasContent() && this.enabled) {
+      this.$element.trigger(u);
+      if (u.isDefaultPrevented())return;
+      t = this.tip(), this.setContent(), this.options.animation && t.addClass("fade"), s = typeof this.options.placement == "function" ? this.options.placement.call(this, t[0], this.$element[0]) : this.options.placement, t.detach().css({top: 0, left: 0, display: "block"}), this.options.container ? t.appendTo(this.options.container) : t.insertAfter(this.$element), n = this.getPosition(), r = t[0].offsetWidth, i = t[0].offsetHeight;
+      switch (s) {
+        case"bottom":
+          o = {top: n.top + n.height, left: n.left + n.width / 2 - r / 2};
+          break;
+        case"top":
+          o = {top: n.top - i, left: n.left + n.width / 2 - r / 2};
+          break;
+        case"left":
+          o = {top: n.top + n.height / 2 - i / 2, left: n.left - r};
+          break;
+        case"right":
+          o = {top: n.top + n.height / 2 - i / 2, left: n.left + n.width}
+      }
+      this.applyPlacement(o, s), this.$element.trigger("shown")
+    }
+  }, applyPlacement: function (e, t) {
+    var n = this.tip(), r = n[0].offsetWidth, i = n[0].offsetHeight, s, o, u, a;
+    n.offset(e).addClass(t).addClass("in"), s = n[0].offsetWidth, o = n[0].offsetHeight, t == "top" && o != i && (e.top = e.top + i - o, a = !0), t == "bottom" || t == "top" ? (u = 0, e.left < 0 && (u = e.left * -2, e.left = 0, n.offset(e), s = n[0].offsetWidth, o = n[0].offsetHeight), this.replaceArrow(u - r + s, s, "left")) : this.replaceArrow(o - i, o, "top"), a && n.offset(e)
+  }, replaceArrow: function (e, t, n) {
+    this.arrow().css(n, e ? 50 * (1 - e / t) + "%" : "")
+  }, setContent: function () {
+    var e = this.tip(), t = this.getTitle();
+    e.find(".tooltip-inner")[this.options.html ? "html" : "text"](t), e.removeClass("fade in top bottom left right")
+  }, hide: function () {
+    function i() {
+      var t = setTimeout(function () {
+        n.off(e.support.transition.end).detach()
+      }, 500);
+      n.one(e.support.transition.end, function () {
+        clearTimeout(t), n.detach()
+      })
+    }
+
+    var t = this, n = this.tip(), r = e.Event("hide");
+    this.$element.trigger(r);
+    if (r.isDefaultPrevented())return;
+    return n.removeClass("in"), e.support.transition && this.$tip.hasClass("fade") ? i() : n.detach(), this.$element.trigger("hidden"), this
+  }, fixTitle: function () {
+    var e = this.$element;
+    (e.attr("title") || typeof e.attr("data-original-title") != "string") && e.attr("data-original-title", e.attr("title") || "").attr("title", "")
+  }, hasContent: function () {
+    return this.getTitle()
+  }, getPosition: function () {
+    var t = this.$element[0];
+    return e.extend({}, typeof t.getBoundingClientRect == "function" ? t.getBoundingClientRect() : {width: t.offsetWidth, height: t.offsetHeight}, this.$element.offset())
+  }, getTitle: function () {
+    var e, t = this.$element, n = this.options;
+    return e = t.attr("data-original-title") || (typeof n.title == "function" ? n.title.call(t[0]) : n.title), e
+  }, tip: function () {
+    return this.$tip = this.$tip || e(this.options.template)
+  }, arrow: function () {
+    return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
+  }, validate: function () {
+    this.$element[0].parentNode || (this.hide(), this.$element = null, this.options = null)
+  }, enable: function () {
+    this.enabled = !0
+  }, disable: function () {
+    this.enabled = !1
+  }, toggleEnabled: function () {
+    this.enabled = !this.enabled
+  }, toggle: function (t) {
+    var n = t ? e(t.currentTarget)[this.type](this._options).data(this.type) : this;
+    n.tip().hasClass("in") ? n.hide() : n.show()
+  }, destroy: function () {
+    this.hide().$element.off("." + this.type).removeData(this.type)
+  }};
+  var n = e.fn.tooltip;
+  e.fn.tooltip = function (n) {
+    return this.each(function () {
+      var r = e(this), i = r.data("tooltip"), s = typeof n == "object" && n;
+      i || r.data("tooltip", i = new t(this, s)), typeof n == "string" && i[n]()
+    })
+  }, e.fn.tooltip.Constructor = t, e.fn.tooltip.defaults = {animation: !0, placement: "top", selector: !1, template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>', trigger: "hover focus", title: "", delay: 0, html: !1, container: !1}, e.fn.tooltip.noConflict = function () {
+    return e.fn.tooltip = n, this
+  }
+}(window.jQuery), !function (e) {
+  "use strict";
+  var t = function (e, t) {
+    this.init("popover", e, t)
+  };
+  t.prototype = e.extend({}, e.fn.tooltip.Constructor.prototype, {constructor: t, setContent: function () {
+    var e = this.tip(), t = this.getTitle(), n = this.getContent();
+    e.find(".popover-title")[this.options.html ? "html" : "text"](t), e.find(".popover-content")[this.options.html ? "html" : "text"](n), e.removeClass("fade top bottom left right in")
+  }, hasContent: function () {
+    return this.getTitle() || this.getContent()
+  }, getContent: function () {
+    var e, t = this.$element, n = this.options;
+    return e = (typeof n.content == "function" ? n.content.call(t[0]) : n.content) || t.attr("data-content"), e
+  }, tip: function () {
+    return this.$tip || (this.$tip = e(this.options.template)), this.$tip
+  }, destroy: function () {
+    this.hide().$element.off("." + this.type).removeData(this.type)
+  }});
+  var n = e.fn.popover;
+  e.fn.popover = function (n) {
+    return this.each(function () {
+      var r = e(this), i = r.data("popover"), s = typeof n == "object" && n;
+      i || r.data("popover", i = new t(this, s)), typeof n == "string" && i[n]()
+    })
+  }, e.fn.popover.Constructor = t, e.fn.popover.defaults = e.extend({}, e.fn.tooltip.defaults, {placement: "right", trigger: "click", content: "", template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}), e.fn.popover.noConflict = function () {
+    return e.fn.popover = n, this
+  }
+}(window.jQuery), !function (e) {
+  "use strict";
+  function t(t, n) {
+    var r = e.proxy(this.process, this), i = e(t).is("body") ? e(window) : e(t), s;
+    this.options = e.extend({}, e.fn.scrollspy.defaults, n), this.$scrollElement = i.on("scroll.scroll-spy.data-api", r), this.selector = (this.options.target || (s = e(t).attr("href")) && s.replace(/.*(?=#[^\s]+$)/, "") || "") + " .nav li > a", this.$body = e("body"), this.refresh(), this.process()
+  }
+
+  t.prototype = {constructor: t, refresh: function () {
+    var t = this, n;
+    this.offsets = e([]), this.targets = e([]), n = this.$body.find(this.selector).map(function () {
+      var n = e(this), r = n.data("target") || n.attr("href"), i = /^#\w/.test(r) && e(r);
+      return i && i.length && [
+        [i.position().top + (!e.isWindow(t.$scrollElement.get(0)) && t.$scrollElement.scrollTop()), r]
+      ] || null
+    }).sort(function (e, t) {
+      return e[0] - t[0]
+    }).each(function () {
+      t.offsets.push(this[0]), t.targets.push(this[1])
+    })
+  }, process: function () {
+    var e = this.$scrollElement.scrollTop() + this.options.offset, t = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight, n = t - this.$scrollElement.height(), r = this.offsets, i = this.targets, s = this.activeTarget, o;
+    if (e >= n)return s != (o = i.last()[0]) && this.activate(o);
+    for (o = r.length; o--;)s != i[o] && e >= r[o] && (!r[o + 1] || e <= r[o + 1]) && this.activate(i[o])
+  }, activate: function (t) {
+    var n, r;
+    this.activeTarget = t, e(this.selector).parent(".active").removeClass("active"), r = this.selector + '[data-target="' + t + '"],' + this.selector + '[href="' + t + '"]', n = e(r).parent("li").addClass("active"), n.parent(".dropdown-menu").length && (n = n.closest("li.dropdown").addClass("active")), n.trigger("activate")
+  }};
+  var n = e.fn.scrollspy;
+  e.fn.scrollspy = function (n) {
+    return this.each(function () {
+      var r = e(this), i = r.data("scrollspy"), s = typeof n == "object" && n;
+      i || r.data("scrollspy", i = new t(this, s)), typeof n == "string" && i[n]()
+    })
+  }, e.fn.scrollspy.Constructor = t, e.fn.scrollspy.defaults = {offset: 10}, e.fn.scrollspy.noConflict = function () {
+    return e.fn.scrollspy = n, this
+  }, e(window).on("load", function () {
+    e('[data-spy="scroll"]').each(function () {
+      var t = e(this);
+      t.scrollspy(t.data())
+    })
+  })
+}(window.jQuery), !function (e) {
+  "use strict";
+  var t = function (t) {
+    this.element = e(t)
+  };
+  t.prototype = {constructor: t, show: function () {
+    var t = this.element, n = t.closest("ul:not(.dropdown-menu)"), r = t.attr("data-target"), i, s, o;
+    r || (r = t.attr("href"), r = r && r.replace(/.*(?=#[^\s]*$)/, ""));
+    if (t.parent("li").hasClass("active"))return;
+    i = n.find(".active:last a")[0], o = e.Event("show", {relatedTarget: i}), t.trigger(o);
+    if (o.isDefaultPrevented())return;
+    s = e(r), this.activate(t.parent("li"), n), this.activate(s, s.parent(), function () {
+      t.trigger({type: "shown", relatedTarget: i})
+    })
+  }, activate: function (t, n, r) {
+    function o() {
+      i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"), t.addClass("active"), s ? (t[0].offsetWidth, t.addClass("in")) : t.removeClass("fade"), t.parent(".dropdown-menu") && t.closest("li.dropdown").addClass("active"), r && r()
+    }
+
+    var i = n.find("> .active"), s = r && e.support.transition && i.hasClass("fade");
+    s ? i.one(e.support.transition.end, o) : o(), i.removeClass("in")
+  }};
+  var n = e.fn.tab;
+  e.fn.tab = function (n) {
+    return this.each(function () {
+      var r = e(this), i = r.data("tab");
+      i || r.data("tab", i = new t(this)), typeof n == "string" && i[n]()
+    })
+  }, e.fn.tab.Constructor = t, e.fn.tab.noConflict = function () {
+    return e.fn.tab = n, this
+  }, e(document).on("click.tab.data-api", '[data-toggle="tab"], [data-toggle="pill"]', function (t) {
+    t.preventDefault(), e(this).tab("show")
+  })
+}(window.jQuery), !function (e) {
+  "use strict";
+  var t = function (t, n) {
+    this.$element = e(t), this.options = e.extend({}, e.fn.typeahead.defaults, n), this.matcher = this.options.matcher || this.matcher, this.sorter = this.options.sorter || this.sorter, this.highlighter = this.options.highlighter || this.highlighter, this.updater = this.options.updater || this.updater, this.source = this.options.source, this.$menu = e(this.options.menu), this.shown = !1, this.listen()
+  };
+  t.prototype = {constructor: t, select: function () {
+    var e = this.$menu.find(".active").attr("data-value");
+    return this.$element.val(this.updater(e)).change(), this.hide()
+  }, updater: function (e) {
+    return e
+  }, show: function () {
+    var t = e.extend({}, this.$element.position(), {height: this.$element[0].offsetHeight});
+    return this.$menu.insertAfter(this.$element).css({top: t.top + t.height, left: t.left}).show(), this.shown = !0, this
+  }, hide: function () {
+    return this.$menu.hide(), this.shown = !1, this
+  }, lookup: function (t) {
+    var n;
+    return this.query = this.$element.val(), !this.query || this.query.length < this.options.minLength ? this.shown ? this.hide() : this : (n = e.isFunction(this.source) ? this.source(this.query, e.proxy(this.process, this)) : this.source, n ? this.process(n) : this)
+  }, process: function (t) {
+    var n = this;
+    return t = e.grep(t, function (e) {
+      return n.matcher(e)
+    }), t = this.sorter(t), t.length ? this.render(t.slice(0, this.options.items)).show() : this.shown ? this.hide() : this
+  }, matcher: function (e) {
+    return~e.toLowerCase().indexOf(this.query.toLowerCase())
+  }, sorter: function (e) {
+    var t = [], n = [], r = [], i;
+    while (i = e.shift())i.toLowerCase().indexOf(this.query.toLowerCase()) ? ~i.indexOf(this.query) ? n.push(i) : r.push(i) : t.push(i);
+    return t.concat(n, r)
+  }, highlighter: function (e) {
+    var t = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
+    return e.replace(new RegExp("(" + t + ")", "ig"), function (e, t) {
+      return"<strong>" + t + "</strong>"
+    })
+  }, render: function (t) {
+    var n = this;
+    return t = e(t).map(function (t, r) {
+      return t = e(n.options.item).attr("data-value", r), t.find("a").html(n.highlighter(r)), t[0]
+    }), t.first().addClass("active"), this.$menu.html(t), this
+  }, next: function (t) {
+    var n = this.$menu.find(".active").removeClass("active"), r = n.next();
+    r.length || (r = e(this.$menu.find("li")[0])), r.addClass("active")
+  }, prev: function (e) {
+    var t = this.$menu.find(".active").removeClass("active"), n = t.prev();
+    n.length || (n = this.$menu.find("li").last()), n.addClass("active")
+  }, listen: function () {
+    this.$element.on("focus", e.proxy(this.focus, this)).on("blur", e.proxy(this.blur, this)).on("keypress", e.proxy(this.keypress, this)).on("keyup", e.proxy(this.keyup, this)), this.eventSupported("keydown") && this.$element.on("keydown", e.proxy(this.keydown, this)), this.$menu.on("click", e.proxy(this.click, this)).on("mouseenter", "li", e.proxy(this.mouseenter, this)).on("mouseleave", "li", e.proxy(this.mouseleave, this))
+  }, eventSupported: function (e) {
+    var t = e in this.$element;
+    return t || (this.$element.setAttribute(e, "return;"), t = typeof this.$element[e] == "function"), t
+  }, move: function (e) {
+    if (!this.shown)return;
+    switch (e.keyCode) {
+      case 9:
+      case 13:
+      case 27:
+        e.preventDefault();
+        break;
+      case 38:
+        e.preventDefault(), this.prev();
+        break;
+      case 40:
+        e.preventDefault(), this.next()
+    }
+    e.stopPropagation()
+  }, keydown: function (t) {
+    this.suppressKeyPressRepeat = ~e.inArray(t.keyCode, [40, 38, 9, 13, 27]), this.move(t)
+  }, keypress: function (e) {
+    if (this.suppressKeyPressRepeat)return;
+    this.move(e)
+  }, keyup: function (e) {
+    switch (e.keyCode) {
+      case 40:
+      case 38:
+      case 16:
+      case 17:
+      case 18:
+        break;
+      case 9:
+      case 13:
+        if (!this.shown)return;
+        this.select();
+        break;
+      case 27:
+        if (!this.shown)return;
+        this.hide();
+        break;
+      default:
+        this.lookup()
+    }
+    e.stopPropagation(), e.preventDefault()
+  }, focus: function (e) {
+    this.focused = !0
+  }, blur: function (e) {
+    this.focused = !1, !this.mousedover && this.shown && this.hide()
+  }, click: function (e) {
+    e.stopPropagation(), e.preventDefault(), this.select(), this.$element.focus()
+  }, mouseenter: function (t) {
+    this.mousedover = !0, this.$menu.find(".active").removeClass("active"), e(t.currentTarget).addClass("active")
+  }, mouseleave: function (e) {
+    this.mousedover = !1, !this.focused && this.shown && this.hide()
+  }};
+  var n = e.fn.typeahead;
+  e.fn.typeahead = function (n) {
+    return this.each(function () {
+      var r = e(this), i = r.data("typeahead"), s = typeof n == "object" && n;
+      i || r.data("typeahead", i = new t(this, s)), typeof n == "string" && i[n]()
+    })
+  }, e.fn.typeahead.defaults = {source: [], items: 8, menu: '<ul class="typeahead dropdown-menu"></ul>', item: '<li><a href="#"></a></li>', minLength: 1}, e.fn.typeahead.Constructor = t, e.fn.typeahead.noConflict = function () {
+    return e.fn.typeahead = n, this
+  }, e(document).on("focus.typeahead.data-api", '[data-provide="typeahead"]', function (t) {
+    var n = e(this);
+    if (n.data("typeahead"))return;
+    n.typeahead(n.data())
+  })
+}(window.jQuery), !function (e) {
+  "use strict";
+  var t = function (t, n) {
+    this.options = e.extend({}, e.fn.affix.defaults, n), this.$window = e(window).on("scroll.affix.data-api", e.proxy(this.checkPosition, this)).on("click.affix.data-api", e.proxy(function () {
+      setTimeout(e.proxy(this.checkPosition, this), 1)
+    }, this)), this.$element = e(t), this.checkPosition()
+  };
+  t.prototype.checkPosition = function () {
+    if (!this.$element.is(":visible"))return;
+    var t = e(document).height(), n = this.$window.scrollTop(), r = this.$element.offset(), i = this.options.offset, s = i.bottom, o = i.top, u = "affix affix-top affix-bottom", a;
+    typeof i != "object" && (s = o = i), typeof o == "function" && (o = i.top()), typeof s == "function" && (s = i.bottom()), a = this.unpin != null && n + this.unpin <= r.top ? !1 : s != null && r.top + this.$element.height() >= t - s ? "bottom" : o != null && n <= o ? "top" : !1;
+    if (this.affixed === a)return;
+    this.affixed = a, this.unpin = a == "bottom" ? r.top - n : null, this.$element.removeClass(u).addClass("affix" + (a ? "-" + a : ""))
+  };
+  var n = e.fn.affix;
+  e.fn.affix = function (n) {
+    return this.each(function () {
+      var r = e(this), i = r.data("affix"), s = typeof n == "object" && n;
+      i || r.data("affix", i = new t(this, s)), typeof n == "string" && i[n]()
+    })
+  }, e.fn.affix.Constructor = t, e.fn.affix.defaults = {offset: 0}, e.fn.affix.noConflict = function () {
+    return e.fn.affix = n, this
+  }, e(window).on("load", function () {
+    e('[data-spy="affix"]').each(function () {
+      var t = e(this), n = t.data();
+      n.offset = n.offset || {}, n.offsetBottom && (n.offset.bottom = n.offsetBottom), n.offsetTop && (n.offset.top = n.offsetTop), t.affix(n)
+    })
+  })
+}(window.jQuery);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/google-viz-api.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/google-viz-api.js b/portal/js/libs/google-viz-api.js
new file mode 100644
index 0000000..b4cea3e
--- /dev/null
+++ b/portal/js/libs/google-viz-api.js
@@ -0,0 +1,49 @@
+if(!window['googleLT_']){window['googleLT_']=(new Date()).getTime();}if (!window['google']) {
+  window['google'] = {};
+}
+if (!window['google']['loader']) {
+  window['google']['loader'] = {};
+  google.loader.ServiceBase = 'https://www.google.com/uds';
+  google.loader.GoogleApisBase = 'https://ajax.googleapis.com/ajax';
+  google.loader.ApiKey = 'notsupplied';
+  google.loader.KeyVerified = true;
+  google.loader.LoadFailure = false;
+  google.loader.Secure = true;
+  google.loader.GoogleLocale = 'www.google.com';
+  google.loader.ClientLocation = {"latitude":34.12,"longitude":-84.465,"address":{"city":"Woodstock","region":"GA","country":"USA","country_code":"US"}};
+  google.loader.AdditionalParams = '';
+  (function() {var d=encodeURIComponent,g=window,h=document;function l(a,b){return a.load=b}var m="push",n="replace",q="charAt",r="indexOf",t="ServiceBase",u="name",v="getTime",w="length",x="prototype",y="setTimeout",z="loader",A="substring",B="join",C="toLowerCase";function D(a){return a in E?E[a]:E[a]=-1!=navigator.userAgent[C]()[r](a)}var E={};function F(a,b){var c=function(){};c.prototype=b[x];a.U=b[x];a.prototype=new c}
+    function G(a,b,c){var e=Array[x].slice.call(arguments,2)||[];return function(){var c=e.concat(Array[x].slice.call(arguments));return a.apply(b,c)}}function H(a){a=Error(a);a.toString=function(){return this.message};return a}function I(a,b){for(var c=a.split(/\./),e=g,f=0;f<c[w]-1;f++)e[c[f]]||(e[c[f]]={}),e=e[c[f]];e[c[c[w]-1]]=b}function J(a,b,c){a[b]=c}if(!K)var K=I;if(!L)var L=J;google[z].v={};K("google.loader.callbacks",google[z].v);var M={},N={};google[z].eval={};K("google.loader.eval",google[z].eval);
+    l(google,function(a,b,c){function e(a){var b=a.split(".");if(2<b[w])throw H("Module: '"+a+"' not found!");"undefined"!=typeof b[1]&&(f=b[0],c.packages=c.packages||[],c.packages[m](b[1]))}var f=a;c=c||{};if(a instanceof Array||a&&"object"==typeof a&&"function"==typeof a[B]&&"function"==typeof a.reverse)for(var k=0;k<a[w];k++)e(a[k]);else e(a);if(a=M[":"+f]){c&&(!c.language&&c.locale)&&(c.language=c.locale);c&&"string"==typeof c.callback&&(k=c.callback,k.match(/^[[\]A-Za-z0-9._]+$/)&&(k=g.eval(k),c.callback=
+      k));if((k=c&&null!=c.callback)&&!a.s(b))throw H("Module: '"+f+"' must be loaded before DOM onLoad!");k?a.m(b,c)?g[y](c.callback,0):a.load(b,c):a.m(b,c)||a.load(b,c)}else throw H("Module: '"+f+"' not found!");});K("google.load",google.load);
+    google.T=function(a,b){b?(0==O[w]&&(P(g,"load",Q),!D("msie")&&!D("safari")&&!D("konqueror")&&D("mozilla")||g.opera?g.addEventListener("DOMContentLoaded",Q,!1):D("msie")?h.write("<script defer onreadystatechange='google.loader.domReady()' src=//:>\x3c/script>"):(D("safari")||D("konqueror"))&&g[y](S,10)),O[m](a)):P(g,"load",a)};K("google.setOnLoadCallback",google.T);
+    function P(a,b,c){if(a.addEventListener)a.addEventListener(b,c,!1);else if(a.attachEvent)a.attachEvent("on"+b,c);else{var e=a["on"+b];a["on"+b]=null!=e?aa([c,e]):c}}function aa(a){return function(){for(var b=0;b<a[w];b++)a[b]()}}var O=[];google[z].P=function(){var a=g.event.srcElement;"complete"==a.readyState&&(a.onreadystatechange=null,a.parentNode.removeChild(a),Q())};K("google.loader.domReady",google[z].P);var ba={loaded:!0,complete:!0};function S(){ba[h.readyState]?Q():0<O[w]&&g[y](S,10)}
+    function Q(){for(var a=0;a<O[w];a++)O[a]();O.length=0}google[z].d=function(a,b,c){if(c){var e;"script"==a?(e=h.createElement("script"),e.type="text/javascript",e.src=b):"css"==a&&(e=h.createElement("link"),e.type="text/css",e.href=b,e.rel="stylesheet");(a=h.getElementsByTagName("head")[0])||(a=h.body.parentNode.appendChild(h.createElement("head")));a.appendChild(e)}else"script"==a?h.write('<script src="'+b+'" type="text/javascript">\x3c/script>'):"css"==a&&h.write('<link href="'+b+'" type="text/css" rel="stylesheet"></link>')};
+    K("google.loader.writeLoadTag",google[z].d);google[z].Q=function(a){N=a};K("google.loader.rfm",google[z].Q);google[z].S=function(a){for(var b in a)"string"==typeof b&&(b&&":"==b[q](0)&&!M[b])&&(M[b]=new T(b[A](1),a[b]))};K("google.loader.rpl",google[z].S);google[z].R=function(a){if((a=a.specs)&&a[w])for(var b=0;b<a[w];++b){var c=a[b];"string"==typeof c?M[":"+c]=new U(c):(c=new V(c[u],c.baseSpec,c.customSpecs),M[":"+c[u]]=c)}};K("google.loader.rm",google[z].R);google[z].loaded=function(a){M[":"+a.module].l(a)};
+    K("google.loader.loaded",google[z].loaded);google[z].O=function(){return"qid="+((new Date)[v]().toString(16)+Math.floor(1E7*Math.random()).toString(16))};K("google.loader.createGuidArg_",google[z].O);I("google_exportSymbol",I);I("google_exportProperty",J);google[z].a={};K("google.loader.themes",google[z].a);google[z].a.I="//www.google.com/cse/style/look/bubblegum.css";L(google[z].a,"BUBBLEGUM",google[z].a.I);google[z].a.K="//www.google.com/cse/style/look/greensky.css";L(google[z].a,"GREENSKY",google[z].a.K);
+    google[z].a.J="//www.google.com/cse/style/look/espresso.css";L(google[z].a,"ESPRESSO",google[z].a.J);google[z].a.M="//www.google.com/cse/style/look/shiny.css";L(google[z].a,"SHINY",google[z].a.M);google[z].a.L="//www.google.com/cse/style/look/minimalist.css";L(google[z].a,"MINIMALIST",google[z].a.L);google[z].a.N="//www.google.com/cse/style/look/v2/default.css";L(google[z].a,"V2_DEFAULT",google[z].a.N);function U(a){this.b=a;this.o=[];this.n={};this.e={};this.f={};this.j=!0;this.c=-1}
+    U[x].g=function(a,b){var c="";void 0!=b&&(void 0!=b.language&&(c+="&hl="+d(b.language)),void 0!=b.nocss&&(c+="&output="+d("nocss="+b.nocss)),void 0!=b.nooldnames&&(c+="&nooldnames="+d(b.nooldnames)),void 0!=b.packages&&(c+="&packages="+d(b.packages)),null!=b.callback&&(c+="&async=2"),void 0!=b.style&&(c+="&style="+d(b.style)),void 0!=b.noexp&&(c+="&noexp=true"),void 0!=b.other_params&&(c+="&"+b.other_params));if(!this.j){google[this.b]&&google[this.b].JSHash&&(c+="&sig="+d(google[this.b].JSHash));
+      var e=[],f;for(f in this.n)":"==f[q](0)&&e[m](f[A](1));for(f in this.e)":"==f[q](0)&&this.e[f]&&e[m](f[A](1));c+="&have="+d(e[B](","))}return google[z][t]+"/?file="+this.b+"&v="+a+google[z].AdditionalParams+c};U[x].t=function(a){var b=null;a&&(b=a.packages);var c=null;if(b)if("string"==typeof b)c=[a.packages];else if(b[w])for(c=[],a=0;a<b[w];a++)"string"==typeof b[a]&&c[m](b[a][n](/^\s*|\s*$/,"")[C]());c||(c=["default"]);b=[];for(a=0;a<c[w];a++)this.n[":"+c[a]]||b[m](c[a]);return b};
+    l(U[x],function(a,b){var c=this.t(b),e=b&&null!=b.callback;if(e)var f=new W(b.callback);for(var k=[],p=c[w]-1;0<=p;p--){var s=c[p];e&&f.B(s);if(this.e[":"+s])c.splice(p,1),e&&this.f[":"+s][m](f);else k[m](s)}if(c[w]){b&&b.packages&&(b.packages=c.sort()[B](","));for(p=0;p<k[w];p++)s=k[p],this.f[":"+s]=[],e&&this.f[":"+s][m](f);if(b||null==N[":"+this.b]||null==N[":"+this.b].versions[":"+a]||google[z].AdditionalParams||!this.j)b&&b.autoloaded||google[z].d("script",this.g(a,b),e);else{c=N[":"+this.b];
+      google[this.b]=google[this.b]||{};for(var R in c.properties)R&&":"==R[q](0)&&(google[this.b][R[A](1)]=c.properties[R]);google[z].d("script",google[z][t]+c.path+c.js,e);c.css&&google[z].d("css",google[z][t]+c.path+c.css,e)}this.j&&(this.j=!1,this.c=(new Date)[v](),1!=this.c%100&&(this.c=-1));for(p=0;p<k[w];p++)s=k[p],this.e[":"+s]=!0}});
+    U[x].l=function(a){-1!=this.c&&(X("al_"+this.b,"jl."+((new Date)[v]()-this.c),!0),this.c=-1);this.o=this.o.concat(a.components);google[z][this.b]||(google[z][this.b]={});google[z][this.b].packages=this.o.slice(0);for(var b=0;b<a.components[w];b++){this.n[":"+a.components[b]]=!0;this.e[":"+a.components[b]]=!1;var c=this.f[":"+a.components[b]];if(c){for(var e=0;e<c[w];e++)c[e].C(a.components[b]);delete this.f[":"+a.components[b]]}}};U[x].m=function(a,b){return 0==this.t(b)[w]};U[x].s=function(){return!0};
+    function W(a){this.F=a;this.q={};this.r=0}W[x].B=function(a){this.r++;this.q[":"+a]=!0};W[x].C=function(a){this.q[":"+a]&&(this.q[":"+a]=!1,this.r--,0==this.r&&g[y](this.F,0))};function V(a,b,c){this.name=a;this.D=b;this.p=c;this.u=this.h=!1;this.k=[];google[z].v[this[u]]=G(this.l,this)}F(V,U);l(V[x],function(a,b){var c=b&&null!=b.callback;c?(this.k[m](b.callback),b.callback="google.loader.callbacks."+this[u]):this.h=!0;b&&b.autoloaded||google[z].d("script",this.g(a,b),c)});V[x].m=function(a,b){return b&&null!=b.callback?this.u:this.h};V[x].l=function(){this.u=!0;for(var a=0;a<this.k[w];a++)g[y](this.k[a],0);this.k=[]};
+    var Y=function(a,b){return a.string?d(a.string)+"="+d(b):a.regex?b[n](/(^.*$)/,a.regex):""};V[x].g=function(a,b){return this.G(this.w(a),a,b)};
+    V[x].G=function(a,b,c){var e="";a.key&&(e+="&"+Y(a.key,google[z].ApiKey));a.version&&(e+="&"+Y(a.version,b));b=google[z].Secure&&a.ssl?a.ssl:a.uri;if(null!=c)for(var f in c)a.params[f]?e+="&"+Y(a.params[f],c[f]):"other_params"==f?e+="&"+c[f]:"base_domain"==f&&(b="http://"+c[f]+a.uri[A](a.uri[r]("/",7)));google[this[u]]={};-1==b[r]("?")&&e&&(e="?"+e[A](1));return b+e};V[x].s=function(a){return this.w(a).deferred};V[x].w=function(a){if(this.p)for(var b=0;b<this.p[w];++b){var c=this.p[b];if(RegExp(c.pattern).test(a))return c}return this.D};function T(a,b){this.b=a;this.i=b;this.h=!1}F(T,U);l(T[x],function(a,b){this.h=!0;google[z].d("script",this.g(a,b),!1)});T[x].m=function(){return this.h};T[x].l=function(){};T[x].g=function(a,b){if(!this.i.versions[":"+a]){if(this.i.aliases){var c=this.i.aliases[":"+a];c&&(a=c)}if(!this.i.versions[":"+a])throw H("Module: '"+this.b+"' with version '"+a+"' not found!");}return google[z].GoogleApisBase+"/libs/"+this.b+"/"+a+"/"+this.i.versions[":"+a
 ][b&&b.uncompressed?"uncompressed":"compressed"]};
+    T[x].s=function(){return!1};var ca=!1,Z=[],da=(new Date)[v](),fa=function(){ca||(P(g,"unload",ea),ca=!0)},ga=function(a,b){fa();if(!(google[z].Secure||google[z].Options&&!1!==google[z].Options.csi)){for(var c=0;c<a[w];c++)a[c]=d(a[c][C]()[n](/[^a-z0-9_.]+/g,"_"));for(c=0;c<b[w];c++)b[c]=d(b[c][C]()[n](/[^a-z0-9_.]+/g,"_"));g[y](G($,null,"//gg.google.com/csi?s=uds&v=2&action="+a[B](",")+"&it="+b[B](",")),1E4)}},X=function(a,b,c){c?ga([a],[b]):(fa(),Z[m]("r"+Z[w]+"="+d(a+(b?"|"+b:""))),g[y](ea,5<Z[w]?0:15E3))},ea=function(){if(Z[w]){var a=
+      google[z][t];0==a[r]("http:")&&(a=a[n](/^http:/,"https:"));$(a+"/stats?"+Z[B]("&")+"&nc="+(new Date)[v]()+"_"+((new Date)[v]()-da));Z.length=0}},$=function(a){var b=new Image,c=$.H++;$.A[c]=b;b.onload=b.onerror=function(){delete $.A[c]};b.src=a;b=null};$.A={};$.H=0;I("google.loader.recordCsiStat",ga);I("google.loader.recordStat",X);I("google.loader.createImageForLogging",$);
+
+  }) ();google.loader.rm({"specs":["feeds","spreadsheets","gdata","visualization",{"name":"sharing","baseSpec":{"uri":"http://www.google.com/s2/sharing/js","ssl":null,"key":{"string":"key"},"version":{"string":"v"},"deferred":false,"params":{"language":{"string":"hl"}}}},"search","orkut","ads","elements",{"name":"books","baseSpec":{"uri":"http://books.google.com/books/api.js","ssl":"https://encrypted.google.com/books/api.js","key":{"string":"key"},"version":{"string":"v"},"deferred":true,"params":{"callback":{"string":"callback"},"language":{"string":"hl"}}}},{"name":"friendconnect","baseSpec":{"uri":"http://www.google.com/friendconnect/script/friendconnect.js","ssl":null,"key":{"string":"key"},"version":{"string":"v"},"deferred":false,"params":{}}},"identitytoolkit","ima",{"name":"maps","baseSpec":{"uri":"http://maps.google.com/maps?file\u003dgoogleapi","ssl":"https://maps-api-ssl.google.com/maps?file\u003dgoogleapi","key":{"string":"key"},"version":{"string":"v"},"deferred":true,"
 params":{"callback":{"regex":"callback\u003d$1\u0026async\u003d2"},"language":{"string":"hl"}}},"customSpecs":[{"uri":"http://maps.googleapis.com/maps/api/js","ssl":"https://maps.googleapis.com/maps/api/js","version":{"string":"v"},"deferred":true,"params":{"callback":{"string":"callback"},"language":{"string":"hl"}},"pattern":"^(3|3..*)$"}]},"payments","wave","annotations_v2","earth","language",{"name":"annotations","baseSpec":{"uri":"http://www.google.com/reviews/scripts/annotations_bootstrap.js","ssl":null,"key":{"string":"key"},"version":{"string":"v"},"deferred":true,"params":{"callback":{"string":"callback"},"language":{"string":"hl"},"country":{"string":"gl"}}}},"picker"]});
+  google.loader.rfm({":search":{"versions":{":1":"1",":1.0":"1"},"path":"/api/search/1.0/351077565dad05b6847b1f7d41e36949/","js":"default+en.I.js","css":"default+en.css","properties":{":JSHash":"351077565dad05b6847b1f7d41e36949",":NoOldNames":false,":Version":"1.0"}},":language":{"versions":{":1":"1",":1.0":"1"},"path":"/api/language/1.0/72dfd738bc1b18a14ab936bb2690a4f0/","js":"default+en.I.js","properties":{":JSHash":"72dfd738bc1b18a14ab936bb2690a4f0",":Version":"1.0"}},":feeds":{"versions":{":1":"1",":1.0":"1"},"path":"/api/feeds/1.0/e658fb253c8b588196cf534cc43ab319/","js":"default+en.I.js","css":"default+en.css","properties":{":JSHash":"e658fb253c8b588196cf534cc43ab319",":Version":"1.0"}},":spreadsheets":{"versions":{":0":"1",":0.4":"1"},"path":"/api/spreadsheets/0.4/87ff7219e9f8a8164006cbf28d5e911a/","js":"default.I.js","properties":{":JSHash":"87ff7219e9f8a8164006cbf28d5e911a",":Version":"0.4"}},":ima":{"versions":{":3":"1",":3.0":"1"},"path":"/api/ima/3.0/28a914332232c9a8ac0ae
 8da68b1006e/","js":"default.I.js","properties":{":JSHash":"28a914332232c9a8ac0ae8da68b1006e",":Version":"3.0"}},":wave":{"versions":{":1":"1",":1.0":"1"},"path":"/api/wave/1.0/3b6f7573ff78da6602dda5e09c9025bf/","js":"default.I.js","properties":{":JSHash":"3b6f7573ff78da6602dda5e09c9025bf",":Version":"1.0"}},":annotations":{"versions":{":1":"1",":1.0":"1"},"path":"/api/annotations/1.0/bacce7b6155a1bbadda3c05d65391b22/","js":"default+en.I.js","properties":{":JSHash":"bacce7b6155a1bbadda3c05d65391b22",":Version":"1.0"}},":earth":{"versions":{":1":"1",":1.0":"1"},"path":"/api/earth/1.0/109c7b2bae7fe6cc34ea875176165d81/","js":"default.I.js","properties":{":JSHash":"109c7b2bae7fe6cc34ea875176165d81",":Version":"1.0"}},":picker":{"versions":{":1":"1",":1.0":"1"},"path":"/api/picker/1.0/27b625d21ca34b09c89dcd3d22f65143/","js":"default.I.js","css":"default.css","properties":{":JSHash":"27b625d21ca34b09c89dcd3d22f65143",":Version":"1.0"}}});
+  google.loader.rpl({":scriptaculous":{"versions":{":1.8.3":{"uncompressed":"scriptaculous.js","compressed":"scriptaculous.js"},":1.9.0":{"uncompressed":"scriptaculous.js","compressed":"scriptaculous.js"},":1.8.2":{"uncompressed":"scriptaculous.js","compressed":"scriptaculous.js"},":1.8.1":{"uncompressed":"scriptaculous.js","compressed":"scriptaculous.js"}},"aliases":{":1.8":"1.8.3",":1":"1.9.0",":1.9":"1.9.0"}},":yui":{"versions":{":2.6.0":{"uncompressed":"build/yuiloader/yuiloader.js","compressed":"build/yuiloader/yuiloader-min.js"},":2.9.0":{"uncompressed":"build/yuiloader/yuiloader.js","compressed":"build/yuiloader/yuiloader-min.js"},":2.7.0":{"uncompressed":"build/yuiloader/yuiloader.js","compressed":"build/yuiloader/yuiloader-min.js"},":2.8.0r4":{"uncompressed":"build/yuiloader/yuiloader.js","compressed":"build/yuiloader/yuiloader-min.js"},":2.8.2r1":{"uncompressed":"build/yuiloader/yuiloader.js","compressed":"build/yuiloader/yuiloader-min.js"},":2.8.1":{"uncompressed":"build/
 yuiloader/yuiloader.js","compressed":"build/yuiloader/yuiloader-min.js"},":3.3.0":{"uncompressed":"build/yui/yui.js","compressed":"build/yui/yui-min.js"}},"aliases":{":3":"3.3.0",":2":"2.9.0",":2.7":"2.7.0",":2.8.2":"2.8.2r1",":2.6":"2.6.0",":2.9":"2.9.0",":2.8":"2.8.2r1",":2.8.0":"2.8.0r4",":3.3":"3.3.0"}},":swfobject":{"versions":{":2.1":{"uncompressed":"swfobject_src.js","compressed":"swfobject.js"},":2.2":{"uncompressed":"swfobject_src.js","compressed":"swfobject.js"}},"aliases":{":2":"2.2"}},":webfont":{"versions":{":1.0.28":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.27":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.29":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.12":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.13":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.14":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.15":{"uncompressed":"webfont_debu
 g.js","compressed":"webfont.js"},":1.0.10":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.11":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.2":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.1":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.0":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.6":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.19":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.5":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.18":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.4":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.17":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.3":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.16":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.9":{"uncompressed":"webfont_d
 ebug.js","compressed":"webfont.js"},":1.0.21":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.22":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.25":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.26":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.23":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.24":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"}},"aliases":{":1":"1.0.29",":1.0":"1.0.29"}},":ext-core":{"versions":{":3.1.0":{"uncompressed":"ext-core-debug.js","compressed":"ext-core.js"},":3.0.0":{"uncompressed":"ext-core-debug.js","compressed":"ext-core.js"}},"aliases":{":3":"3.1.0",":3.0":"3.0.0",":3.1":"3.1.0"}},":mootools":{"versions":{":1.3.1":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.1.1":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.3.0":{"uncompressed":"mootools.js","compressed":"mootools-yui-co
 mpressed.js"},":1.3.2":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.1.2":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.2.3":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.2.4":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.2.1":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.2.2":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.2.5":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.4.0":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.4.1":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.4.2":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"}},"aliases":{":1":"1.1.2",":1.11":"1.1.1",":1.4":"1.4.2",":1.3":"1.3.2",":1.2":"1.2.5",":1.1":"1.1.2"}},":jqueryui":{"versions":{":1.8.0":{"uncompressed":"jquery-ui
 .js","compressed":"jquery-ui.min.js"},":1.8.2":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.1":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.15":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.14":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.13":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.12":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.11":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.10":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.17":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.16":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.6.0":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.9":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.7":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":
 1.8.8":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.7.2":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.5":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.7.3":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.6":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.7.0":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.7.1":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.4":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.5.3":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.5.2":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"}},"aliases":{":1.8":"1.8.17",":1.7":"1.7.3",":1.6":"1.6.0",":1":"1.8.17",":1.5":"1.5.3",":1.8.3":"1.8.4"}},":chrome-frame":{"versions":{":1.0.2":{"uncompressed":"CFInstall.js","compressed":"CFInstall.min.js"},":1.0.1":{"uncompressed":"CFInstall.js","compressed":"CFInsta
 ll.min.js"},":1.0.0":{"uncompressed":"CFInstall.js","compressed":"CFInstall.min.js"}},"aliases":{":1":"1.0.2",":1.0":"1.0.2"}},":prototype":{"versions":{":1.7.0.0":{"uncompressed":"prototype.js","compressed":"prototype.js"},":1.6.0.2":{"uncompressed":"prototype.js","compressed":"prototype.js"},":1.6.1.0":{"uncompressed":"prototype.js","compressed":"prototype.js"},":1.6.0.3":{"uncompressed":"prototype.js","compressed":"prototype.js"}},"aliases":{":1.7":"1.7.0.0",":1.6.1":"1.6.1.0",":1":"1.7.0.0",":1.6":"1.6.1.0",":1.7.0":"1.7.0.0",":1.6.0":"1.6.0.3"}},":jquery":{"versions":{":1.6.2":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.3.1":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.6.1":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.3.0":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.6.4":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.6.3":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.3.2":{"unco
 mpressed":"jquery.js","compressed":"jquery.min.js"},":1.6.0":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.2.3":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.7.0":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.7.1":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.2.6":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.4.3":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.4.4":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.5.1":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.5.0":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.4.0":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.5.2":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.4.1":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.4.2":{"uncompressed":"jquery.js","compressed":"jquery.min.js"}},"aliases":{":1.7":"1.7.1",":1.6":"1.6.4",":1":"1.7.1",":1.5":"1.5.2",":1.
 4":"1.4.4",":1.3":"1.3.2",":1.2":"1.2.6"}},":dojo":{"versions":{":1.3.1":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.3.0":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.6.1":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.1.1":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.3.2":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.6.0":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.2.3":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.7.2":{"uncompressed":"dojo/dojo.js.uncompressed.js","compressed":"dojo/dojo.js"},":1.7.0":{"uncompressed":"dojo/dojo.js.uncompressed.js","compressed":"dojo/dojo.js"},":1.7.1":{"uncompressed":"dojo/dojo.js.uncompressed.js","compressed":"dojo/dojo.js"},":1.4.3":{"uncompressed":"dojo/dojo.xd.js
 .uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.5.1":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.5.0":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.2.0":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.4.0":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.4.1":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"}},"aliases":{":1.7":"1.7.2",":1":"1.6.1",":1.6":"1.6.1",":1.5":"1.5.1",":1.4":"1.4.3",":1.3":"1.3.2",":1.2":"1.2.3",":1.1":"1.1.1"}}});
+}
+google.load("visualization","1.0",{"autoloaded":true,"packages":["corechart"]});
+if (window['google'] != undefined && window['google']['loader'] != undefined) {
+  if (!window['google']['visualization']) {
+    window['google']['visualization'] = {};
+    google.visualization.Version = '1.0';
+    google.visualization.JSHash = '00133a5412d5113dfca30a1ffd3afe93';
+    google.visualization.LoadArgs = 'file\75visualization\46v\0751.0\46packages\75corechart';
+  }
+  google.loader.writeLoadTag("script", google.loader.ServiceBase + "/api/visualization/1.0/00133a5412d5113dfca30a1ffd3afe93/format+en,default,corechart.I.js", false);
+}
\ No newline at end of file


[61/61] [abbrv] git commit: Merge 5da8ea8ea25a4a1d456dbffc763b25d8b3d62b35 into 2a01c30b6cb51b3fa5a2dc4c3bc4834f615ee08f

Posted by sn...@apache.org.
Merge 5da8ea8ea25a4a1d456dbffc763b25d8b3d62b35 into 2a01c30b6cb51b3fa5a2dc4c3bc4834f615ee08f


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/bed1ee83
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/bed1ee83
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/bed1ee83

Branch: refs/pull/35/merge
Commit: bed1ee8375a92f94a96849b6bb62c6992f128601
Parents: 2a01c30 5da8ea8
Author: Rod Simpson <ro...@rodsimpson.com>
Authored: Mon Jan 27 15:18:32 2014 -0800
Committer: Rod Simpson <ro...@rodsimpson.com>
Committed: Mon Jan 27 15:18:32 2014 -0800

----------------------------------------------------------------------
 .gitignore                                      |     5 +-
 portal/.gitignore                               |     8 -
 portal/.puppet/.gitignore                       |     2 -
 portal/.puppet/Puppetfile                       |     3 -
 portal/.puppet/Puppetfile.lock                  |    12 -
 portal/.puppet/bootstrap.sh                     |    18 -
 portal/.puppet/manifests/main.pp                |    49 -
 portal/.puppet/modules/.gitignore               |     2 -
 portal/.puppet/templates/vhost-ssl.conf.erb     |    33 -
 portal/Deployment.md                            |    23 +
 portal/Gruntfile.js                             |   304 +
 portal/LICENSE                                  |   202 -
 portal/README.md                                |   273 +-
 portal/UnitTests.md                             |    24 +
 portal/Vagrantfile                              |    23 -
 portal/bower.json                               |    12 +
 portal/build.sh                                 |    28 +
 portal/coming_soon.html                         |    31 -
 portal/config.js                                |    87 +-
 portal/css/apigeeGlobalNavigation.css           |   274 +
 .../css/arsmarquette/ARSMaquettePro-Light.otf   |   Bin 0 -> 184600 bytes
 .../css/arsmarquette/ARSMaquettePro-Medium.otf  |   Bin 0 -> 188020 bytes
 .../css/arsmarquette/ARSMaquettePro-Regular.otf |   Bin 0 -> 188096 bytes
 .../ui-bg_diagonals-thick_90_eeeeee_40x40.png   |   Bin 251 -> 0 bytes
 .../images/ui-bg_flat_100_deedf7_40x100.png     |   Bin 182 -> 0 bytes
 .../images/ui-bg_flat_100_e4f1fb_40x100.png     |   Bin 213 -> 0 bytes
 .../images/ui-bg_flat_100_f2f5f7_40x100.png     |   Bin 212 -> 0 bytes
 .../images/ui-bg_flat_15_cd0a0a_40x100.png      |   Bin 181 -> 0 bytes
 .../images/ui-bg_flat_50_3baae3_40x100.png      |   Bin 182 -> 0 bytes
 .../images/ui-bg_flat_80_d7ebf9_40x100.png      |   Bin 183 -> 0 bytes
 .../ui-bg_highlight-hard_70_000000_1x100.png    |   Bin 118 -> 0 bytes
 .../ui-bg_highlight-soft_25_ffef8f_1x100.png    |   Bin 153 -> 0 bytes
 .../images/ui-icons_000000_256x240.png          |   Bin 4369 -> 0 bytes
 .../images/ui-icons_2694e8_256x240.png          |   Bin 4369 -> 0 bytes
 .../images/ui-icons_2e83ff_256x240.png          |   Bin 4369 -> 0 bytes
 .../images/ui-icons_3d80b3_256x240.png          |   Bin 4369 -> 0 bytes
 .../images/ui-icons_72a7cf_256x240.png          |   Bin 4369 -> 0 bytes
 .../images/ui-icons_ffffff_256x240.png          |   Bin 4369 -> 0 bytes
 .../css/custom-theme/jquery-ui-1.8.9.custom.css |   573 -
 portal/css/entypo/entypo.eot                    |   Bin 0 -> 35540 bytes
 portal/css/entypo/entypo.svg                    |    13 +
 portal/css/entypo/entypo.ttf                    |   Bin 0 -> 35392 bytes
 portal/css/entypo/entypo.woff                   |   Bin 0 -> 21916 bytes
 portal/css/jquery-ui-timepicker.css             |    53 -
 portal/css/jquery.ui.statusbar.css              |    25 -
 portal/css/main.css                             |  1460 +
 portal/css/prettify.css                         |    52 -
 portal/css/usergrid.css                         |  6358 ----
 portal/images/android-sdk-download.png          |   Bin 4848 -> 0 bytes
 portal/images/api-activity.gif                  |   Bin 10819 -> 0 bytes
 portal/images/apigee-logo.png                   |   Bin 3647 -> 0 bytes
 portal/images/apigeetopbar.png                  |   Bin 4658 -> 0 bytes
 portal/images/btn-copyCurl-up.png               |   Bin 2762 -> 0 bytes
 portal/images/clippy-bg.png                     |   Bin 561 -> 0 bytes
 portal/images/close.gif                         |   Bin 718 -> 0 bytes
 portal/images/dotnet-sdk-download.png           |   Bin 7149 -> 0 bytes
 portal/images/down_arrow.png                    |   Bin 1285 -> 0 bytes
 portal/images/error.png                         |   Bin 2009 -> 0 bytes
 portal/images/faviconApigee.ico                 |   Bin 1150 -> 0 bytes
 portal/images/glyphicons-halflings-white.png    |   Bin 4352 -> 0 bytes
 portal/images/glyphicons-halflings.png          |   Bin 4352 -> 0 bytes
 .../glyphicons_halflings_135_wrench-white2.pdn  |   Bin 5400 -> 0 bytes
 .../glyphicons_halflings_135_wrench-white2.png  |   Bin 296 -> 0 bytes
 .../images/glyphicons_halflings_135_wrench.png  |   Bin 228 -> 0 bytes
 .../glyphicons_halflings_135_wrench_white.png   |   Bin 251 -> 0 bytes
 .../glyphicons_halflings_wrench_white.png       |   Bin 1016 -> 0 bytes
 portal/images/grid.png                          |   Bin 166 -> 0 bytes
 portal/images/icons.png                         |   Bin 13132 -> 0 bytes
 portal/images/ios-sdk-download.png              |   Bin 4886 -> 0 bytes
 portal/images/javascript-sdk-download.png       |   Bin 4618 -> 0 bytes
 portal/images/left_arrow.png                    |   Bin 1257 -> 0 bytes
 portal/images/logo-white.png                    |   Bin 2014 -> 0 bytes
 portal/images/menuActiveTriangle.png            |   Bin 315 -> 0 bytes
 portal/images/nodejs-sdk-download.png           |   Bin 5273 -> 0 bytes
 portal/images/notice.png                        |   Bin 2112 -> 0 bytes
 portal/images/orange-arrow.png                  |   Bin 242 -> 0 bytes
 portal/images/right_arrow.png                   |   Bin 1251 -> 0 bytes
 portal/images/ruby-sdk-download.png             |   Bin 6343 -> 0 bytes
 portal/images/success.png                       |   Bin 1863 -> 0 bytes
 portal/images/swish_arrow.png                   |   Bin 220 -> 0 bytes
 portal/images/topbackground.png                 |   Bin 2890 -> 0 bytes
 portal/images/up_arrow.png                      |   Bin 1292 -> 0 bytes
 portal/images/user-photo.png                    |   Bin 3849 -> 0 bytes
 portal/images/user_profile.png                  |   Bin 3775 -> 0 bytes
 portal/images/usergrid_200.png                  |   Bin 6397 -> 0 bytes
 portal/images/usergrid_400.png                  |   Bin 8746 -> 0 bytes
 portal/images/warning.png                       |   Bin 1179 -> 0 bytes
 portal/img/appswitcher/apiPlatform_lg.png       |   Bin 0 -> 2397 bytes
 portal/img/appswitcher/appServices_lg.png       |   Bin 0 -> 2295 bytes
 portal/img/appswitcher/console_lg.png           |   Bin 0 -> 1453 bytes
 portal/img/appswitcher/home_lg.png              |   Bin 0 -> 1522 bytes
 portal/img/appswitcher/logo_color.png           |   Bin 0 -> 3459 bytes
 portal/img/appswitcher/max_lg.png               |   Bin 0 -> 1970 bytes
 .../img/appswitcher/triangleMenuItem_right.png  |   Bin 0 -> 1158 bytes
 .../triangleMenuItem_right_hover.png            |   Bin 0 -> 1169 bytes
 portal/img/blue-bars.png                        |   Bin 0 -> 3635 bytes
 portal/img/blue-bolt.png                        |   Bin 0 -> 3942 bytes
 portal/img/blue-carat.png                       |   Bin 0 -> 1006 bytes
 portal/img/green_dot.png                        |   Bin 0 -> 3472 bytes
 portal/img/logo.gif                             |   Bin 0 -> 2279 bytes
 portal/img/nav-device.gif                       |   Bin 0 -> 2184 bytes
 portal/img/nav-sprites.png                      |   Bin 0 -> 7953 bytes
 portal/img/no-data1.png                         |   Bin 0 -> 45300 bytes
 portal/img/phone-small.gif                      |   Bin 0 -> 1300 bytes
 portal/img/push/APNS_cert_upload.png            |   Bin 0 -> 33956 bytes
 portal/img/push/APNS_certification.png          |   Bin 0 -> 16855 bytes
 portal/img/push/android-notification.png        |   Bin 0 -> 41629 bytes
 portal/img/push/google_api_key.png              |   Bin 0 -> 98118 bytes
 portal/img/push/iphone_message.png              |   Bin 0 -> 90307 bytes
 portal/img/push/step_1.png                      |   Bin 0 -> 1953 bytes
 portal/img/push/step_2.png                      |   Bin 0 -> 2117 bytes
 portal/img/push/step_3.png                      |   Bin 0 -> 2162 bytes
 portal/img/red_dot.png                          |   Bin 0 -> 3482 bytes
 portal/img/sdk-sprites-large.png                |   Bin 0 -> 14642 bytes
 portal/img/sdk-sprites.png                      |   Bin 0 -> 5027 bytes
 portal/img/tablet-small.gif                     |   Bin 0 -> 1390 bytes
 portal/img/user-photo.png                       |   Bin 0 -> 3849 bytes
 portal/img/user_profile.png                     |   Bin 0 -> 3775 bytes
 portal/img/yellow_dot.png                       |   Bin 0 -> 3475 bytes
 portal/index-template.html                      |   131 +
 portal/index.html                               |  1412 -
 portal/js/activities/activities-controller.js   |    11 +
 portal/js/activities/activities.html            |    33 +
 .../js/app-overview/app-overview-controller.js  |    76 +
 portal/js/app-overview/app-overview.html        |    34 +
 .../js/app-overview/doc-includes/android.html   |   209 +
 .../app-overview/doc-includes/images/verify.png |   Bin 0 -> 22934 bytes
 portal/js/app-overview/doc-includes/ios.html    |   173 +
 .../app-overview/doc-includes/javascript.html   |    94 +
 portal/js/app-overview/doc-includes/net.html    |     0
 portal/js/app-overview/doc-includes/node.html   |     0
 portal/js/app-overview/doc-includes/ruby.html   |     0
 .../app-overview/getting-started-controller.js  |    90 +
 portal/js/app-overview/getting-started.html     |   126 +
 portal/js/app.js                                |   125 +
 portal/js/app/app.js                            |   118 -
 portal/js/app/console.js                        |  4536 ---
 portal/js/app/helpers.js                        |   241 -
 portal/js/app/navigation.js                     |   189 -
 portal/js/app/pages.js                          |   154 -
 portal/js/app/params.js                         |    30 -
 portal/js/app/quickLogin.js                     |    30 -
 portal/js/app/session.js                        |   172 -
 portal/js/app/sso.js                            |    89 -
 portal/js/app/status.js                         |    33 -
 portal/js/app/ui/collections.entity.js          |   320 -
 portal/js/app/ui/collections.user.js            |   120 -
 portal/js/app/ui/ui.js                          |   415 -
 portal/js/app/usergrid.appSDK.js                |  2073 --
 portal/js/app/usergrid.appSDK.orig.js           |  2070 --
 portal/js/charts/chart-controller.js            |     6 +
 portal/js/charts/chart-directives.js            |   141 +
 portal/js/charts/chart-service.js               |   494 +
 portal/js/charts/highcharts.json                |   329 +
 portal/js/charts/sparklines.js                  |     2 +
 portal/js/data/data-controller.js               |   304 +
 portal/js/data/data.html                        |   121 +
 portal/js/data/display-generic.html             |    95 +
 portal/js/data/display-groups.html              |     0
 portal/js/data/display-roles.html               |     1 +
 portal/js/data/display-users.html               |    88 +
 portal/js/data/entity-controller.js             |    69 +
 portal/js/data/entity.html                      |    31 +
 portal/js/data/shell-controller.js              |     9 +
 portal/js/data/shell.html                       |    16 +
 portal/js/dialogs/balloon-directive.js          |    25 +
 portal/js/dialogs/modal-directive.js            |    41 +
 portal/js/dialogs/modal.html                    |    16 +
 portal/js/global/alert-controller.js            |    33 +
 portal/js/global/alert-directive.js             |    40 +
 portal/js/global/app-switcher-directive.js      |    35 +
 portal/js/global/appswitcher-template.html      |    34 +
 portal/js/global/insecure-banner.html           |     7 +
 portal/js/global/insecure-banner.js             |    46 +
 portal/js/global/page-constants.js              |    11 +
 portal/js/global/page-controller.js             |   392 +
 portal/js/global/page-service.js                |   214 +
 portal/js/global/temp.json                      |    18 +
 portal/js/global/ug-service.js                  |   987 +
 portal/js/global/util-directive.js              |    24 +
 portal/js/global/utility-service.js             |    52 +
 portal/js/global/validate-directive.js          |    40 +
 .../js/groups/groups-activities-controller.js   |    27 +
 portal/js/groups/groups-activities.html         |    24 +
 portal/js/groups/groups-controller.js           |   119 +
 portal/js/groups/groups-details-controller.js   |    38 +
 portal/js/groups/groups-details.html            |    28 +
 portal/js/groups/groups-members-controller.js   |   113 +
 portal/js/groups/groups-members.html            |    60 +
 portal/js/groups/groups-roles-controller.js     |   184 +
 portal/js/groups/groups-roles.html              |   127 +
 portal/js/groups/groups-tabs.html               |    31 +
 portal/js/groups/groups.html                    |    92 +
 portal/js/lib/MD5.min.js                        |     1 -
 portal/js/lib/backbone.js                       |  1431 -
 portal/js/lib/bootstrap.min.js                  |     7 -
 portal/js/lib/date.min.js                       |     2 -
 portal/js/lib/jquery-1.7.2.min.js               |     4 -
 portal/js/lib/jquery-ui-1.8.18.min.js           |    15 -
 portal/js/lib/jquery.dataset.min.js             |     1 -
 portal/js/lib/jquery.dform-0.1.3.min.js         |    16 -
 portal/js/lib/jquery.jsonp-2.3.1.min.js         |     3 -
 portal/js/lib/jquery.tmpl.min.js                |    10 -
 portal/js/lib/jquery.ui.statusbar.min.js        |     1 -
 portal/js/lib/jquery.ui.timepicker.min.js       |     1 -
 portal/js/lib/prettify.js                       |  1477 -
 portal/js/lib/underscore-min.js                 |     5 -
 portal/js/libs/Highcharts-2.3.5/index.htm       |    79 +
 .../js/adapters/mootools-adapter.js             |    13 +
 .../js/adapters/mootools-adapter.src.js         |   328 +
 .../js/adapters/prototype-adapter.js            |    16 +
 .../js/adapters/prototype-adapter.src.js        |   385 +
 .../libs/Highcharts-2.3.5/js/highcharts-more.js |    35 +
 .../Highcharts-2.3.5/js/highcharts-more.src.js  |  1581 +
 .../js/libs/Highcharts-2.3.5/js/highcharts.js   |   250 +
 .../libs/Highcharts-2.3.5/js/highcharts.src.js  | 15281 ++++++++
 .../Highcharts-2.3.5/js/modules/canvas-tools.js |   133 +
 .../js/modules/canvas-tools.src.js              |  3113 ++
 .../js/libs/Highcharts-2.3.5/js/modules/data.js |    14 +
 .../Highcharts-2.3.5/js/modules/data.src.js     |   512 +
 .../Highcharts-2.3.5/js/modules/exporting.js    |    23 +
 .../js/modules/exporting.src.js                 |   752 +
 .../Highcharts-2.3.5/js/themes/dark-blue.js     |   263 +
 .../Highcharts-2.3.5/js/themes/dark-green.js    |   263 +
 .../js/libs/Highcharts-2.3.5/js/themes/gray.js  |   262 +
 .../js/libs/Highcharts-2.3.5/js/themes/grid.js  |    95 +
 .../js/libs/Highcharts-2.3.5/js/themes/skies.js |    89 +
 portal/js/libs/MD5.min.js                       |     1 +
 portal/js/libs/angular-1.0.5/angular-cookies.js |   183 +
 .../libs/angular-1.0.5/angular-cookies.min.js   |     7 +
 portal/js/libs/angular-1.0.5/angular-loader.js  |   276 +
 .../js/libs/angular-1.0.5/angular-loader.min.js |     7 +
 portal/js/libs/angular-1.0.5/angular-mocks.js   |  1886 +
 .../js/libs/angular-1.0.5/angular-resource.js   |   445 +
 .../libs/angular-1.0.5/angular-resource.min.js  |    10 +
 .../js/libs/angular-1.0.5/angular-sanitize.js   |   535 +
 .../libs/angular-1.0.5/angular-sanitize.min.js  |    13 +
 portal/js/libs/angular-1.0.5/angular.js         | 14733 ++++++++
 portal/js/libs/angular-1.0.5/angular.min.js     |   161 +
 portal/js/libs/angular-1.0.5/version.txt        |     1 +
 portal/js/libs/angular-1.1.5/angular-1.1.5.js   | 16876 +++++++++
 .../js/libs/angular-1.1.5/angular-merge.min.js  |     8 +
 .../angular-1.1.5/angular-resource-1.1.5.js     |   537 +
 portal/js/libs/angular-1.2.5/angular-animate.js |  1323 +
 .../libs/angular-1.2.5/angular-animate.min.js   |    23 +
 .../angular-1.2.5/angular-animate.min.js.map    |     8 +
 portal/js/libs/angular-1.2.5/angular-cookies.js |   202 +
 .../libs/angular-1.2.5/angular-cookies.min.js   |     8 +
 .../angular-1.2.5/angular-cookies.min.js.map    |     8 +
 portal/js/libs/angular-1.2.5/angular-csp.css    |    24 +
 portal/js/libs/angular-1.2.5/angular-loader.js  |   410 +
 .../js/libs/angular-1.2.5/angular-loader.min.js |     9 +
 .../angular-1.2.5/angular-loader.min.js.map     |     8 +
 portal/js/libs/angular-1.2.5/angular-mocks.js   |  2116 ++
 .../js/libs/angular-1.2.5/angular-resource.js   |   565 +
 .../libs/angular-1.2.5/angular-resource.min.js  |    13 +
 .../angular-1.2.5/angular-resource.min.js.map   |     8 +
 portal/js/libs/angular-1.2.5/angular-route.js   |   911 +
 .../js/libs/angular-1.2.5/angular-route.min.js  |    14 +
 .../libs/angular-1.2.5/angular-route.min.js.map |     8 +
 .../js/libs/angular-1.2.5/angular-sanitize.js   |   622 +
 .../libs/angular-1.2.5/angular-sanitize.min.js  |    14 +
 .../angular-1.2.5/angular-sanitize.min.js.map   |     8 +
 .../js/libs/angular-1.2.5/angular-scenario.js   | 32374 +++++++++++++++++
 portal/js/libs/angular-1.2.5/angular-touch.js   |   563 +
 .../js/libs/angular-1.2.5/angular-touch.min.js  |    13 +
 .../libs/angular-1.2.5/angular-touch.min.js.map |     8 +
 portal/js/libs/angular-1.2.5/angular.js         | 20369 +++++++++++
 portal/js/libs/angular-1.2.5/angular.min.js     |   201 +
 portal/js/libs/angular-1.2.5/angular.min.js.map |     8 +
 portal/js/libs/angular-1.2.5/errors.json        |     1 +
 portal/js/libs/angular-1.2.5/version.json       |     1 +
 portal/js/libs/angular-1.2.5/version.txt        |     1 +
 .../angularitics-0.8.5-google-analytics.js      |     7 +
 .../js/libs/angularitics/angularitics-0.8.5.js  |     6 +
 .../libs/bootstrap/css/bootstrap-responsive.css |  1345 +
 .../bootstrap/css/bootstrap-responsive.min.css  |  1245 +
 portal/js/libs/bootstrap/css/bootstrap.css      |  6169 ++++
 portal/js/libs/bootstrap/css/bootstrap.min.css  |  5469 +++
 .../js/libs/bootstrap/custom/css/bootstrap.css  |  6315 ++++
 .../libs/bootstrap/custom/css/bootstrap.min.css |   874 +
 .../custom/img/glyphicons-halflings-white.png   |   Bin 0 -> 8777 bytes
 .../custom/img/glyphicons-halflings.png         |   Bin 0 -> 12799 bytes
 portal/js/libs/bootstrap/custom/js/bootstrap.js |  2291 ++
 .../libs/bootstrap/custom/js/bootstrap.min.js   |     7 +
 .../img/glyphicons-halflings-white.png          |   Bin 0 -> 8777 bytes
 .../libs/bootstrap/img/glyphicons-halflings.png |   Bin 0 -> 12799 bytes
 portal/js/libs/bootstrap/js/bootstrap.js        |  2117 ++
 portal/js/libs/bootstrap/js/bootstrap.min.js    |   644 +
 portal/js/libs/google-viz-api.js                |    49 +
 portal/js/libs/jquery/jquery-1.9.1.min.js       |     5 +
 .../js/libs/jquery/jquery-migrate-1.1.1.min.js  |     3 +
 portal/js/libs/jquery/jquery.sparkline.min.js   |     5 +
 portal/js/libs/jqueryui/date.min.js             |     2 +
 .../ui-bg_diagonals-thick_90_eeeeee_40x40.png   |   Bin 0 -> 251 bytes
 .../images/ui-bg_flat_100_deedf7_40x100.png     |   Bin 0 -> 182 bytes
 .../images/ui-bg_flat_100_e4f1fb_40x100.png     |   Bin 0 -> 213 bytes
 .../images/ui-bg_flat_100_f2f5f7_40x100.png     |   Bin 0 -> 212 bytes
 .../images/ui-bg_flat_15_cd0a0a_40x100.png      |   Bin 0 -> 181 bytes
 .../images/ui-bg_flat_50_3baae3_40x100.png      |   Bin 0 -> 182 bytes
 .../images/ui-bg_flat_80_d7ebf9_40x100.png      |   Bin 0 -> 183 bytes
 .../ui-bg_highlight-hard_70_000000_1x100.png    |   Bin 0 -> 118 bytes
 .../ui-bg_highlight-soft_25_ffef8f_1x100.png    |   Bin 0 -> 153 bytes
 .../jqueryui/images/ui-icons_000000_256x240.png |   Bin 0 -> 4369 bytes
 .../jqueryui/images/ui-icons_2694e8_256x240.png |   Bin 0 -> 4369 bytes
 .../jqueryui/images/ui-icons_2e83ff_256x240.png |   Bin 0 -> 4369 bytes
 .../jqueryui/images/ui-icons_3d80b3_256x240.png |   Bin 0 -> 4369 bytes
 .../jqueryui/images/ui-icons_72a7cf_256x240.png |   Bin 0 -> 4369 bytes
 .../jqueryui/images/ui-icons_ffffff_256x240.png |   Bin 0 -> 4369 bytes
 portal/js/libs/jqueryui/jquery-ui-1.8.18.min.js |    15 +
 .../js/libs/jqueryui/jquery-ui-1.8.9.custom.css |   573 +
 .../js/libs/jqueryui/jquery-ui-timepicker.css   |    53 +
 .../libs/jqueryui/jquery.ui.timepicker.min.js   |     1 +
 .../ui-bootstrap-custom-0.3.0.min.js            |     1 +
 .../ui-bootstrap-custom-tpls-0.3.0.min.js       |     1 +
 portal/js/libs/usergrid.sdk.js                  |  2469 ++
 portal/js/login/forgot-password-controller.js   |    12 +
 portal/js/login/forgot-password.html            |     5 +
 portal/js/login/loading.html                    |     3 +
 portal/js/login/login-controller.js             |    83 +
 portal/js/login/login.html                      |    48 +
 portal/js/login/logout-controller.js            |    10 +
 portal/js/login/logout.html                     |     1 +
 portal/js/login/register-controller.js          |    36 +
 portal/js/login/register.html                   |    80 +
 portal/js/menus/appMenu.html                    |    41 +
 portal/js/menus/menu-directives.js              |   434 +
 portal/js/menus/orgMenu.html                    |    13 +
 .../js/org-overview/org-overview-controller.js  |    86 +
 portal/js/org-overview/org-overview.html        |   121 +
 portal/js/profile/account-controller.js         |    18 +
 portal/js/profile/account.html                  |    18 +
 portal/js/profile/organizations-controller.js   |    73 +
 portal/js/profile/organizations.html            |    71 +
 portal/js/profile/profile-controller.js         |    40 +
 portal/js/profile/profile.html                  |    68 +
 portal/js/roles/roles-controller.js             |   112 +
 portal/js/roles/roles-groups-controller.js      |   113 +
 portal/js/roles/roles-groups.html               |    60 +
 portal/js/roles/roles-settings-controller.js    |    87 +
 portal/js/roles/roles-settings.html             |    80 +
 portal/js/roles/roles-tabs.html                 |    30 +
 portal/js/roles/roles-users-controller.js       |   112 +
 portal/js/roles/roles-users.html                |    59 +
 portal/js/roles/roles.html                      |    91 +
 portal/js/shell/shell-controller.js             |   216 +
 portal/js/shell/shell.html                      |    25 +
 portal/js/spec/client-tests.js                  |   159 -
 portal/js/spec/index.html                       |    20 -
 portal/js/spec/qunit-git.css                    |   238 -
 portal/js/spec/qunit-git.js                     |  1865 -
 portal/js/unit-tests/appSDK-tests.js            |   255 -
 portal/js/unit-tests/ie-jquery-tests.js         |   191 -
 portal/js/unit-tests/qunit.css                  |   231 -
 portal/js/unit-tests/qunit.js                   |  1934 -
 portal/js/users/users-activities-controller.js  |    40 +
 portal/js/users/users-activities.html           |    39 +
 portal/js/users/users-controller.js             |   115 +
 portal/js/users/users-graph-controller.js       |    67 +
 portal/js/users/users-graph.html                |    67 +
 portal/js/users/users-groups-controller.js      |   124 +
 portal/js/users/users-groups.html               |    67 +
 portal/js/users/users-profile-controller.js     |    32 +
 portal/js/users/users-profile.html              |    70 +
 portal/js/users/users-roles-controller.js       |   138 +
 portal/js/users/users-roles.html                |   129 +
 portal/js/users/users-tabs.html                 |     3 +
 portal/js/users/users.html                      |   126 +
 portal/loading.html                             |     9 -
 portal/package.json                             |    48 +
 portal/planned_outage.html                      |    48 -
 portal/sass/.gitignore                          |     1 -
 portal/sass/config.rb                           |    25 -
 portal/sass/usergrid.scss                       |  1855 -
 portal/scripts/e2e-test.bat                     |    11 +
 portal/scripts/e2e-test.sh                      |     9 +
 portal/scripts/test.bat                         |    11 +
 portal/scripts/test.sh                          |     9 +
 portal/scripts/watchr.rb                        |    19 +
 portal/scripts/web-server.js                    |   244 +
 portal/sdk/usergrid.0.10.4.js                   |  1402 +
 portal/sdk/usergrid.0.10.5.js                   |  1755 +
 portal/sdk/usergrid.0.10.7.js                   |  2265 ++
 portal/server.js                                |   244 +
 portal/service_down.html                        |    48 -
 .../apigee.ui.activities.table_rows.html        |    14 -
 .../templates/apigee.ui.admins.table_rows.html  |     8 -
 .../apigee.ui.applications.table_rows.html      |     4 -
 .../apigee.ui.collection.table_rows.html        |    65 -
 .../apigee.ui.collections.query.indexes.html    |     5 -
 .../apigee.ui.collections.table_rows.html       |     9 -
 .../apigee.ui.collections.user.header.html      |    21 -
 portal/templates/apigee.ui.curl.detail.html     |    11 -
 portal/templates/apigee.ui.feed.table_rows.html |    15 -
 .../templates/apigee.ui.groups.table_rows.html  |    14 -
 .../apigee.ui.panels.group.activities.html      |    28 -
 .../apigee.ui.panels.group.details.html         |    97 -
 .../apigee.ui.panels.group.memberships.html     |    40 -
 .../apigee.ui.panels.group.permissions.html     |    99 -
 .../apigee.ui.panels.role.permissions.html      |    58 -
 .../templates/apigee.ui.panels.role.users.html  |    38 -
 .../apigee.ui.panels.user.activities.html       |    40 -
 .../templates/apigee.ui.panels.user.graph.html  |    80 -
 .../apigee.ui.panels.user.memberships.html      |    40 -
 .../apigee.ui.panels.user.permissions.html      |   105 -
 .../apigee.ui.panels.user.profile.html          |   113 -
 .../apigee.ui.role.groups.table_rows.html       |    44 -
 .../templates/apigee.ui.roles.table_rows.html   |    15 -
 .../templates/apigee.ui.users.table_rows.html   |    18 -
 portal/templates/test/modalForm2.html           |    32 -
 portal/test/autocomplete.html                   |    25 -
 portal/test/modalForm.html                      |    32 -
 portal/tests/karma.conf.js                      |    68 +
 portal/tests/protractor/applications.spec.js    |    31 +
 portal/tests/protractor/data.spec.js            |    46 +
 portal/tests/protractor/forgotPassword.spec.js  |    28 +
 portal/tests/protractor/monitoring.spec.js      |    15 +
 portal/tests/protractor/organization.spec.js    |    40 +
 portal/tests/protractor/profile.spec.js         |    69 +
 portal/tests/protractor/push.spec.js            |    15 +
 portal/tests/protractor/users.spec.js           |    49 +
 portal/tests/protractor/util.js                 |    91 +
 portal/tests/protractorConf.js                  |    89 +
 portal/tests/selenium/chromedriver              |   Bin 0 -> 22034760 bytes
 .../selenium-server-standalone-2.37.0.jar       |   Bin 0 -> 34730734 bytes
 portal/tests/unit/sample.spec.js                |    46 +
 stack/pom.xml                                   |     2 +-
 427 files changed, 166572 insertions(+), 30508 deletions(-)
----------------------------------------------------------------------



[55/61] [abbrv] git commit: removed lingering puppet files

Posted by sn...@apache.org.
removed lingering puppet files


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/616641ea
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/616641ea
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/616641ea

Branch: refs/pull/35/head
Commit: 616641ead62b13623d10164197495b6f211fc3a2
Parents: ebc5f18
Author: Rod Simpson <ro...@apigee.com>
Authored: Mon Jan 27 16:05:58 2014 -0700
Committer: Rod Simpson <ro...@apigee.com>
Committed: Mon Jan 27 16:05:58 2014 -0700

----------------------------------------------------------------------
 portal/.puppet/.gitignore                   |  2 -
 portal/.puppet/Puppetfile                   |  3 --
 portal/.puppet/Puppetfile.lock              | 12 ------
 portal/.puppet/bootstrap.sh                 | 18 ---------
 portal/.puppet/manifests/main.pp            | 49 ------------------------
 portal/.puppet/modules/.gitignore           |  2 -
 portal/.puppet/templates/vhost-ssl.conf.erb | 33 ----------------
 7 files changed, 119 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/616641ea/portal/.puppet/.gitignore
----------------------------------------------------------------------
diff --git a/portal/.puppet/.gitignore b/portal/.puppet/.gitignore
deleted file mode 100644
index 0dca211..0000000
--- a/portal/.puppet/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-.librarian
-.tmp
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/616641ea/portal/.puppet/Puppetfile
----------------------------------------------------------------------
diff --git a/portal/.puppet/Puppetfile b/portal/.puppet/Puppetfile
deleted file mode 100644
index ac9c577..0000000
--- a/portal/.puppet/Puppetfile
+++ /dev/null
@@ -1,3 +0,0 @@
-forge "http://forge.puppetlabs.com"
-
-mod "puppetlabs/apache"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/616641ea/portal/.puppet/Puppetfile.lock
----------------------------------------------------------------------
diff --git a/portal/.puppet/Puppetfile.lock b/portal/.puppet/Puppetfile.lock
deleted file mode 100644
index 0f25dd0..0000000
--- a/portal/.puppet/Puppetfile.lock
+++ /dev/null
@@ -1,12 +0,0 @@
-FORGE
-  remote: http://forge.puppetlabs.com
-  specs:
-    puppetlabs/apache (0.6.0)
-      puppetlabs/firewall (>= 0.0.4)
-      puppetlabs/stdlib (>= 2.2.1)
-    puppetlabs/firewall (0.2.1)
-    puppetlabs/stdlib (3.2.0)
-
-DEPENDENCIES
-  puppetlabs/apache (>= 0)
-

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/616641ea/portal/.puppet/bootstrap.sh
----------------------------------------------------------------------
diff --git a/portal/.puppet/bootstrap.sh b/portal/.puppet/bootstrap.sh
deleted file mode 100644
index 2b2fb64..0000000
--- a/portal/.puppet/bootstrap.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-
-BOOTSTRAP_LOCK=/tmp/bootsrap.lock
-PUPPET_DIR=/vagrant/.puppet/
-
-if [ ! -f $BOOTSTRAP_LOCK ]; then
-    apt-get update
-    apt-get install git -y
-
-    if [ `gem query --local | grep librarian-puppet-maestrodev | wc -l` -eq 0 ]; then
-      gem install librarian-puppet-maestrodev
-      cd $PUPPET_DIR && librarian-puppet install --clean
-    fi
-
-    touch $BOOTSTRAP_LOCK
-fi
-
-cd $PUPPET_DIR && librarian-puppet update
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/616641ea/portal/.puppet/manifests/main.pp
----------------------------------------------------------------------
diff --git a/portal/.puppet/manifests/main.pp b/portal/.puppet/manifests/main.pp
deleted file mode 100644
index 9f23c27..0000000
--- a/portal/.puppet/manifests/main.pp
+++ /dev/null
@@ -1,49 +0,0 @@
-$server_name = 'usergrid.dev'
-$ssl_path = '/etc/apache2/ssl/'
-$key_path = "${ssl_path}${server_name}.key"
-$cert_path = "${ssl_path}${server_name}.cert"
-
-Exec { path => '/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin' }
-
-package { 'openssl':
-    ensure => installed
-}
-
-file { $ssl_path:
-    ensure => directory,
-    owner => "root",
-    group => "root"
-}
-
-exec { 'openssl-genrsa':
-    command => "openssl genrsa -out ${key_path} 2048",
-    creates => $key_path,
-    require => File[$ssl_path]
-}
-
-exec { 'openssl-req':
-    command => "openssl req -new -x509 -key ${key_path} -out ${cert_path} -days 3650 -subj /CN=${server_name}",
-    creates => $cert_path,
-    require => Exec['openssl-genrsa']
-}
-
-class { 'apache': }
-
-apache::mod { 'env': }
-
-apache::vhost { $server_name:
-    port     => '443',
-    docroot  => '/vagrant',
-    template => 'vhost-ssl.conf.erb',
-    require  => Exec['openssl-req']
-}
-
-package { 'compass':
-    ensure => present,
-    provider => gem
-}
-
-package { 'bootstrap-sass':
-    ensure => '2.0.0',
-    provider => gem
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/616641ea/portal/.puppet/modules/.gitignore
----------------------------------------------------------------------
diff --git a/portal/.puppet/modules/.gitignore b/portal/.puppet/modules/.gitignore
deleted file mode 100644
index c96a04f..0000000
--- a/portal/.puppet/modules/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*
-!.gitignore
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/616641ea/portal/.puppet/templates/vhost-ssl.conf.erb
----------------------------------------------------------------------
diff --git a/portal/.puppet/templates/vhost-ssl.conf.erb b/portal/.puppet/templates/vhost-ssl.conf.erb
deleted file mode 100644
index 3eb916c..0000000
--- a/portal/.puppet/templates/vhost-ssl.conf.erb
+++ /dev/null
@@ -1,33 +0,0 @@
-# ************************************
-# Managed by Puppet
-# ************************************
-
-NameVirtualHost <%= vhost_name %>:<%= port %>
-<VirtualHost <%= vhost_name %>:<%= port %>>
-  ServerName <%= srvname %>
-<% if serveradmin %>
-  ServerAdmin <%= serveradmin %>
-<% end %>
-<% if serveraliases.is_a? Array -%>
-<% serveraliases.each do |name| -%><%= "  ServerAlias #{name}\n" %><% end -%>
-<% elsif serveraliases != '' -%>
-<%= "  ServerAlias #{serveraliases}" %>
-<% end -%>
-  DocumentRoot <%= docroot %>
-  <Directory <%= docroot %>>
-    Options <%= options %>
-    AllowOverride <%= Array(override).join(' ') %>
-    Order allow,deny
-    allow from all
-  </Directory>
-  ErrorLog <%= logroot %>/<%= name %>_error.log
-  LogLevel warn
-  CustomLog <%= logroot %>/<%= name %>_access.log combined
-  ServerSignature Off
-
-  SSLEngine on
-  SSLCertificateKeyFile <%= key_path %>
-  SSLCertificateFile <%= cert_path %>
-  SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
-</VirtualHost>
-


[46/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app-overview/app-overview-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/app-overview/app-overview-controller.js b/portal/js/app-overview/app-overview-controller.js
new file mode 100644
index 0000000..0715c43
--- /dev/null
+++ b/portal/js/app-overview/app-overview-controller.js
@@ -0,0 +1,76 @@
+'use strict'
+
+AppServices.Controllers.controller('AppOverviewCtrl',
+    ['ug',
+      'data',
+      'charts',
+      '$scope',
+      '$rootScope',
+      '$log',
+      function (ug, data, charts, $scope, $rootScope, $log) {
+        //util
+        var createGradient = function (color1, color2) {
+          var perShapeGradient = {
+            x1: 0,
+            y1: 0,
+            x2: 0,
+            y2: 1
+          };
+          return {
+            linearGradient: perShapeGradient,
+            stops: [
+              [0, color1],
+              [1, color2]
+            ]
+          };
+        };
+        $scope.appOverview = {};
+
+        $scope.collections = [];
+        $scope.graph = '';
+        $scope.$on('top-collections-received', function (event, collections) {
+          var dataDescription = {
+            bar1: {
+              labels: ['Total'],
+              dataAttr: ['title', 'count'],
+              colors: [createGradient('rgba(36,151,212,0.6)', 'rgba(119,198,240,0.6)')],
+              borderColor: '#1b97d1'
+            }
+          };
+          //todo add this to charts service as helper
+          $scope.collections = collections;
+          var arr = [];
+          for (var i in collections) {
+            if (collections.hasOwnProperty(i)) {
+              arr.push(collections[i]);
+            }
+          }
+          $scope.appOverview = {};
+          if (!$rootScope.chartTemplate) {
+            //get the chart template for this view... right now it covers all charts...
+            data.get(null, 'js/charts/highcharts.json').then(function (success) {
+              $rootScope.chartTemplate = success;
+              $scope.appOverview.chart = angular.copy($rootScope.chartTemplate.pareto);
+              $scope.appOverview.chart = charts.convertParetoChart(arr, $scope.appOverview.chart, dataDescription.bar1, '1h', 'NOW');
+              $scope.applyScope();
+            }, function (fail) {
+              $log.error('Problem getting chart template', fail)
+            });
+          } else {
+            $scope.appOverview.chart = angular.copy($rootScope.chartTemplate.pareto);
+            $scope.appOverview.chart = charts.convertParetoChart(arr, $scope.appOverview.chart, dataDescription.bar1, '1h', 'NOW');
+            $scope.applyScope();
+
+          }
+
+
+        });
+        $scope.$on('app-initialized',function(){
+          ug.getTopCollections();
+        });
+        if($rootScope.activeUI){
+           ug.getTopCollections();
+        }
+
+
+      }]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app-overview/app-overview.html
----------------------------------------------------------------------
diff --git a/portal/js/app-overview/app-overview.html b/portal/js/app-overview/app-overview.html
new file mode 100644
index 0000000..797ad7a
--- /dev/null
+++ b/portal/js/app-overview/app-overview.html
@@ -0,0 +1,34 @@
+<div class="app-overview-content" >
+  <section class="row-fluid">
+
+    <div class="span12">
+      <div class="page-filters">
+        <h1 class="title" class="pull-left"><i class="pictogram title">&#128241;</i> Summary</h1>
+      </div>
+      <h2 class="title" id="app-overview-title">{{currentApp}}</h2>
+    </div>
+
+  </section>
+  <section class="row-fluid">
+
+    <div class="span6">
+      <chart id="appOverview"
+             chartdata="appOverview.chart"
+             type="column"></chart>
+    </div>
+
+    <div class="span6">
+      <table class="table table-striped">
+        <tr class="table-header">
+          <td>Path</td>
+          <td>Title</td>
+        </tr>
+        <tr class="zebraRows" ng-repeat="(k,v) in collections">
+          <td>{{v.title}}</td>
+          <td>{{v.count}}</td>
+        </tr>
+      </table>
+    </div>
+
+  </section>
+</div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app-overview/doc-includes/android.html
----------------------------------------------------------------------
diff --git a/portal/js/app-overview/doc-includes/android.html b/portal/js/app-overview/doc-includes/android.html
new file mode 100644
index 0000000..d0738f1
--- /dev/null
+++ b/portal/js/app-overview/doc-includes/android.html
@@ -0,0 +1,209 @@
+<h2>1. Integrate the SDK into your project</h2>
+<p>You can integrate Apigee features into your app by including the SDK in your project.&nbsp;&nbsp;You can do one of the following:</p>
+
+<ul class="nav nav-tabs" id="myTab">
+	<li class="active"><a data-toggle="tab" href="#existing_project">Existing project</a></li>
+	<li><a data-toggle="tab" href="#new_project">New project</a></li>
+</ul>
+
+<div class="tab-content">
+	<div class="tab-pane active" id="existing_project">
+		<a class="jumplink" name="add_the_sdk_to_an_existing_project"></a>
+		<p>If you've already got&nbsp;an Android&nbsp;project, you can integrate the&nbsp;Apigee&nbsp;SDK into your project as you normally would:</p>
+		<div id="collapse">
+			<a href="#jar_collapse" class="btn" data-toggle="collapse"><i class="icon-white icon-chevron-down"></i> Details</a>			
+		</div>
+		<div id="jar_collapse" class="collapse">
+			<p>Add <code>apigee-android-&lt;version&gt;.jar</code> to your class path by doing the following:</p>
+	
+			<h3>Android 4.0 (or later) projects</h3>
+			<p>Copy the jar file into the <code>/libs</code> folder in your project.</p>
+			
+			<h3>Android 3.0 (or earlier) projects</h3>
+			<ol>
+				<li>In the&nbsp;Eclipse <strong>Package Explorer</strong>, select your application's project folder.</li>
+				<li>Click the&nbsp;<strong>File &gt; Properties</strong>&nbsp;menu.</li>
+				<li>In the <strong>Java Build Path</strong> section, click the <strong>Libraries</strong> tab, click <strong>Add External JARs</strong>.</li>
+				<li>Browse to <code>apigee-android-&lt;version&gt;.jar</code>, then click&nbsp;<strong>Open</strong>.</li>
+				<li>Order the <code>apigee-android-&lt;version&gt;.jar</code> at the top of the class path:
+					<ol>
+						<li>In the Eclipse <strong>Package Explorer</strong>, select your application's project folder.</li>
+						<li>Click the&nbsp;<strong>File &gt; Properties</strong> menu.</li>
+						<li>In the properties dialog, in the&nbsp;<strong>Java Build Path</strong> section,&nbsp;click&nbsp;the <strong>Order and Export</strong>&nbsp;tab.</li>
+						<li>
+							<p><strong>IMPORTANT:</strong> Select the checkbox for <code>apigee-android-&lt;version&gt;.jar</code>, then click the <strong>Top</strong>&nbsp;button.</p>
+						</li>
+					</ol>
+				</li>
+			</ol>
+			<div class="warning">
+				<h3>Applications using Ant</h3>
+				<p>If you are using Ant to build your application, you must also copy <code>apigee-android-&lt;version&gt;.jar</code> to the <code>/libs</code> folder in your application.</p>
+			</div>
+		</div>
+	</div>
+	<div class="tab-pane" id="new_project">
+		<a class="jumplink" name="create_a_new_project_based_on_the_SDK"></a>
+		<p>If you don't have a&nbsp;project yet, you can begin by using the project template included with the SDK. The template includes support for SDK features.</p>
+		<ul>
+			<li>Locate the project template in the expanded SDK. It should be at the following location:
+				<pre>&lt;sdk_root&gt;/new-project-template</pre>
+			</li>
+		</ul>
+	</div>
+</div>
+<h2>2. Update permissions in AndroidManifest.xml</h2>
+<p>Add the following Internet permissions to your application's <code>AndroidManifest.xml</code> file if they have not already been added. Note that with the exception of INTERNET, enabling all other permissions are optional.</p>
+<pre>
+&lt;uses-permission android:name="android.permission.INTERNET" /&gt;
+&lt;uses-permission android:name="android.permission.READ_PHONE_STATE" /&gt;
+&lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
+&lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
+&lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt;
+</pre>
+<h2>3. Initialize the SDK</h2>
+<p>To initialize the App Services SDK, you must instantiate the <code>ApigeeClient</code> class. There are multiple ways to handle this step, but we recommend that you do the following:</p>
+<ol>
+	<li>Subclass the <code>Application</code> class, and add an instance variable for the <code>ApigeeClient</code> to it, along with getter and setter methods.
+		<pre>
+public class YourApplication extends Application
+{
+        
+        private ApigeeClient apigeeClient;
+        
+        public YourApplication()
+        {
+                this.apigeeClient = null;
+        }
+        
+        public ApigeeClient getApigeeClient()
+        {
+                return this.apigeeClient;
+        }
+        
+        public void setApigeeClient(ApigeeClient apigeeClient)
+        {
+                this.apigeeClient = apigeeClient;
+        }
+}			
+		</pre>
+	</li>
+	<li>Declare the <code>Application</code> subclass in your <code>AndroidManifest.xml</code>. For example:
+		<pre>
+&lt;application&gt;
+    android:allowBackup="true"
+    android:icon="@drawable/ic_launcher"
+    android:label="@string/app_name"
+    android:name=".YourApplication"
+	…
+&lt;/application&gt;			
+		</pre>
+	</li>
+	<li>Instantiate the <code>ApigeeClient</code> class in the <code>onCreate</code> method of your first <code>Activity</code> class:
+		<pre>
+import com.apigee.sdk.ApigeeClient;
+
+@Override
+protected void onCreate(Bundle savedInstanceState) {
+    super.onCreate(savedInstanceState);		
+	
+	String ORGNAME = "{{currentOrg}}";
+	String APPNAME = "{{currentApp}}";
+	
+	ApigeeClient apigeeClient = new ApigeeClient(ORGNAME,APPNAME,this.getBaseContext());
+
+	// hold onto the ApigeeClient instance in our application object.
+	yourApp = (YourApplication) getApplication;
+	yourApp.setApigeeClient(apigeeClient);			
+}
+		</pre>
+		<p>This will make the instance of <code>ApigeeClient</code> available to your <code>Application</code> class.</p>
+	</li>
+</ol>
+<h2>4. Import additional SDK classes</h2>
+<p>The following classes will enable you to call common SDK methods:</p>
+<pre>
+import com.apigee.sdk.data.client.DataClient; //App Services data methods
+import com.apigee.sdk.apm.android.MonitoringClient; //App Monitoring methods
+import com.apigee.sdk.data.client.callbacks.ApiResponseCallback; //API response handling
+import com.apigee.sdk.data.client.response.ApiResponse; //API response object
+</pre>
+		
+<h2>5. Verify SDK installation</h2>
+
+<p>Once initialized, App Services will also automatically instantiate the <code>MonitoringClient</code> class and begin logging usage, crash and error metrics for your app.</p>
+<p><img src="js/app-overview/doc-includes/images/verify.png" alt="screenshot of data in admin portal"/></p>
+<p>To verify that the SDK has been properly initialized, run your app, then go to 'Monitoring' > 'App Usage' in the <a href="https://www.apigee.com/usergrid">App Services admin portal</a> to verify that data is being sent.</p>
+<div class="warning">It may take up to two minutes for data to appear in the admin portal after you run your app.</div>
+
+<h2>Installation complete! Try these next steps</h2>
+<ul>
+	<li>
+		<h3><strong>Call additional SDK methods in your code</strong></h3>
+		<p>The <code>DataClient</code> and <code>MonitoringClient</code> classes are also automatically instantiated for you, and accessible with the following accessors:</p>
+		<ul>
+			<li>
+				<pre>DataClient dataClient = apigeeClient.getDataClient();</pre>
+				<p>Use this object to access the data methods of the App Services SDK, including those for push notifications, data store, and geolocation.</p>
+			</li>
+			<li>
+				<pre>MonitoringClient monitoringClient = apigeeClient.getMonitoringClient();</pre>
+				<p>Use this object to access the app configuration and monitoring methods of the App Services SDK, including advanced logging, and A/B testing.</p>
+			</li>
+		</ul>
+	</li>	
+	<li>	
+		<h3><strong>Add App Services features to your app</strong></h3>
+		<p>With App Services you can quickly add valuable features to your mobile or web app, including push notifications, a custom data store, geolocation and more. Check out these links to get started with a few of our most popular features:</p>
+		<ul>
+			<li><strong><a href="http://apigee.com/docs/node/8410">Push notifications</a></strong>: Send offers, alerts and other messages directly to user devices to dramatically increase engagement. With App Services you can send 10 million push notification per month for free!</li>
+			<li><strong>App Monitoring</strong>: When you initialize the App Services SDK, a suite of valuable, <a href="http://apigee.com/docs/node/13190">customizable</a> application monitoring features are automatically enabled that deliver the data you need to fine tune performance, analyze issues, and improve user experience.
+				<ul>
+					<li><strong><a href="http://apigee.com/docs/node/13176">App Usage Monitoring</a></strong>: Visit the <a href="https://apigee.com/usergrid">App Services admin portal</a> to view usage data for your app, including data on device models, platforms and OS versions running your app.</li>				
+					<li><strong><a href="http://apigee.com/docs/node/12861">API Performance Monitoring</a></strong>: Network performance is key to a solid user experience. In the <a href="https://apigee.com/usergrid">App Services admin portal</a> you can view key metrics, including response time, number of requests and raw API request logs.</li>	
+					<li><strong><a href="http://apigee.com/docs/node/13177">Error &amp; Crash Monitoring</a></strong>: Get alerted to any errors or crashes, then view them in the <a href="https://apigee.com/usergrid">App Services admin portal</a>, where you can also analyze raw error and crash logs.</li>
+				</ul>		
+			</li>
+			<li><strong><a href="http://apigee.com/docs/node/410">Geolocation</a></strong>: Target users or return result sets based on user location to keep your app highly-relevant.</li>
+			<li><strong><a href="http://apigee.com/docs/node/10152">Data storage</a></strong>: Store all your application data on our high-availability infrastructure, and never worry about dealing with a database ever again.</li>
+			<li><strong><a href="http://apigee.com/docs/node/376">User management and authentication</a></strong>: Every app needs users. Use App Services to easily implement user registration, as well as OAuth 2.0-compliant login and authentication.</li>
+		</ul>
+	</li>
+	<li>	
+		<h3><strong>Check out the sample apps</strong></h3>
+		<p>The SDK includes samples that illustrate Apigee&nbsp;features. You'll find the samples in the following location in your SDK download:</p>
+		<pre>
+apigee-android-sdk-&lt;version&gt;
+	...
+	/samples
+		</pre>
+		<div id="collapse">
+			<a href="#samples_collapse" class="btn" data-toggle="collapse"><i class="icon-white icon-chevron-down"></i> Details</a>
+		</div>
+		<div id="samples_collapse" class="collapse">
+			<p>The samples include the following:</p>
+			<table class="table">
+				<thead>
+					<tr>
+						<th scope="col">Sample</th>
+						<th scope="col">Description</th>
+					</tr>
+				</thead>
+				<tbody>
+					<tr>
+						<td>books</td>
+						<td>An app for storing a list of books that shows Apigee database operations such as reading, creating, and deleting.</td>
+					</tr>
+					<tr>
+						<td>messagee</td>
+						<td>An app for sending and receiving messages that shows Apigee database operations (reading, creating).</td>
+					</tr>
+					<tr>
+						<td>push</td>
+						<td>An app that uses the push feature to send notifications to the devices of users who have subscribed for them.</td>
+					</tr>
+				</tbody>
+			</table>
+		</div>
+	</li>
+</ul>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app-overview/doc-includes/images/verify.png
----------------------------------------------------------------------
diff --git a/portal/js/app-overview/doc-includes/images/verify.png b/portal/js/app-overview/doc-includes/images/verify.png
new file mode 100644
index 0000000..21b3712
Binary files /dev/null and b/portal/js/app-overview/doc-includes/images/verify.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app-overview/doc-includes/ios.html
----------------------------------------------------------------------
diff --git a/portal/js/app-overview/doc-includes/ios.html b/portal/js/app-overview/doc-includes/ios.html
new file mode 100644
index 0000000..ff4c0e2
--- /dev/null
+++ b/portal/js/app-overview/doc-includes/ios.html
@@ -0,0 +1,173 @@
+<h2>1. Integrate ApigeeiOSSDK.framework</h2>
+<a class="jumplink" name="add_the_sdk_to_an_existing_project"></a>
+<ul class="nav nav-tabs" id="myTab">
+	<li class="active"><a data-toggle="tab" href="#existing_project">Existing project</a></li>
+	<li><a data-toggle="tab" href="#new_project">New project</a></li>
+</ul>
+<div class="tab-content">
+	<div class="tab-pane active" id="existing_project">
+		<p>If you've already got&nbsp;an Xcode iOS project, add it into your project as you normally would.</p>
+		<div id="collapse"><a class="btn" data-toggle="collapse" href="#framework_collapse">Details</a></div>
+		<div class="collapse" id="framework_collapse">
+			<ol>
+				<li>
+					<p>Locate the SDK framework file so you can add it to your project. For example, you'll find the file at the following path:</p>
+					<pre>
+&lt;sdk_root&gt;/bin/ApigeeiOSSDK.framework</pre>
+				</li>
+				<li>In the <strong>Project Navigator</strong>, click on your project file, and then the <strong>Build Phases</strong> tab. Expand <strong>Link Binary With Libraries</strong>.</li>
+				<li>Link the Apigee iOS SDK into your project.
+					<ul>
+						<li>Drag ApigeeiOSSDK.framework into the Frameworks group created by Xcode.</li>
+					</ul>
+					<p>OR</p>
+					<ol>
+						<li>At the bottom of the <strong>Link Binary With Libraries</strong> group, click the <strong>+</strong> button. Then click&nbsp;<strong>Add Other</strong>.</li>
+						<li>Navigate to the directory that contains ApigeeiOSSDK.framework, and choose the ApigeeiOSSDK.framework folder.</li>
+					</ol>
+				</li>
+			</ol>
+		</div>
+	</div>
+	<div class="tab-pane" id="new_project"><a class="jumplink" name="create_a_new_project_based_on_the_SDK"></a>
+		<p>If you're starting with a clean slate (you don't have a&nbsp;project yet), you can begin by using the project template included with the SDK. The template includes support for SDK features.</p>
+		<ol>
+			<li>
+				<p>Locate the project template in the expanded SDK. It should be at the following location:</p>
+				<pre>
+&lt;sdk_root&gt;/new-project-template</pre>
+			</li>
+			<li>In the project template directory, open the project file:&nbsp;Apigee App Services iOS Template.xcodeproj.</li>
+			<li>Get acquainted with the template by looking at its readme file.</li>
+		</ol>
+	</div>
+</div>
+<h2>2. Add required iOS frameworks</h2>
+<p>Ensure that the following iOS frameworks are part of your project. To add them, under the <strong>Link Binary With Libraries</strong> group, click the <strong>+</strong> button, type the name of the framework you want to add, select the framework found by Xcode, then click <strong>Add</strong>.</p>
+<ul>
+	<li>QuartzCore.framework</li>
+	<li>CoreLocation.framework</li>
+	<li>CoreTelephony.framework&nbsp;</li>
+	<li>Security.framework</li>
+	<li>SystemConfiguration.framework</li>
+	<li>UIKit.framework</li>
+</ul>
+<h2>3. Update 'Other Linker Flags'</h2>
+<p>In the <strong>Build Settings</strong> panel, add the following under <strong>Other Linker Flags</strong>:</p>
+<pre>
+-ObjC -all_load</pre>
+<p>Confirm that flags are set for both <strong>DEBUG</strong> and <strong>RELEASE</strong>.</p>
+<h2>4. Initialize the SDK</h2>
+<p>The <em>ApigeeClient</em> class initializes the App Services SDK. To do this you will need your organization name and application name, which are available in the <em>Getting Started</em> tab of the <a href="https://www.apigee.com/usergrid/">App Service admin portal</a>, under <strong>Mobile SDK Keys</strong>.</p>
+<ol>
+	<li>Import the SDK
+		<p>Add the following to your source code to import the SDK:</p>
+		<pre>
+#import &lt;ApigeeiOSSDK/Apigee.h&gt;</pre>
+	</li>
+	<li>
+		<p>Declare the following properties in <code>AppDelegate.h</code>:</p>
+		<pre>
+@property (strong, nonatomic) ApigeeClient *apigeeClient; 
+@property (strong, nonatomic) ApigeeMonitoringClient *monitoringClient;
+@property (strong, nonatomic) ApigeeDataClient *dataClient;	
+		</pre>
+	</li>
+	<li>
+		<p>Instantiate the <code>ApigeeClient</code> class inside the <code>didFinishLaunching</code> method of <code>AppDelegate.m</code>:</p>
+		<pre>
+//Replace 'AppDelegate' with the name of your app delegate class to instantiate it
+AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
+
+//Sepcify your App Services organization and application names
+NSString *orgName = @"{{currentOrg}}";
+NSString *appName = @"{{currentApp}}";
+
+//Instantiate ApigeeClient to initialize the SDK
+appDelegate.apigeeClient = [[ApigeeClient alloc]
+                            initWithOrganizationId:orgName
+                            applicationId:appName];
+                            
+//Retrieve instances of ApigeeClient.monitoringClient and ApigeeClient.dataClient
+self.monitoringClient = [appDelegate.apigeeClient monitoringClient]; 
+self.dataClient = [appDelegate.apigeeClient dataClient]; 
+		</pre>
+	</li>
+</ol>
+
+<h2>5. Verify SDK installation</h2>
+
+<p>Once initialized, App Services will also automatically instantiate the <code>ApigeeMonitoringClient</code> class and begin logging usage, crash and error metrics for your app.</p>
+
+<p>To verify that the SDK has been properly initialized, run your app, then go to <strong>'Monitoring' > 'App Usage'</strong> in the <a href="https://www.apigee.com/usergrid">App Services admin portal</a> to verify that data is being sent.</p>
+<p><img src="js/app-overview/doc-includes/images/verify.png" alt="screenshot of data in admin portal"/></p>
+<div class="warning">It may take up to two minutes for data to appear in the admin portal after you run your app.</div>
+
+<h2>Installation complete! Try these next steps</h2>
+<ul>	
+	<li>
+		<h3><strong>Call additional SDK methods in your code</strong></h3>
+		<p>Create an instance of the AppDelegate class, then use <code>appDelegate.dataClient</code> or <code>appDelegate.monitoringClient</code> to call SDK methods:</p>
+		<div id="collapse"><a class="btn" data-toggle="collapse" href="#client_collapse">Details</a></div>
+		<div class="collapse" id="client_collapse">
+			<ul>
+				<li><code>appDelegate.dataClient</code>: Used to access the data methods of the App Services SDK, including those for push notifications, data store, and geolocation.</li>
+				<li><code>appDelegate.monitoringClient</code>: Used to access the app configuration and monitoring methods of the App Services SDK, including advanced logging, and A/B testing.</li>
+			</ul>
+			<h3>Example</h3>
+			<p>For example, you could create a new entity with the following:</p>
+			<pre>
+AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
+ApigeeClientResponse *response = [appDelegate.dataClient createEntity:entity];
+			</pre>
+		</div>
+
+	</li>
+	<li>
+		<h3><strong>Add App Services features to your app</strong></h3>
+		<p>With App Services you can quickly add valuable features to your mobile or web app, including push notifications, a custom data store, geolocation and more. Check out these links to get started with a few of our most popular features:</p>
+		<ul>
+			<li><strong><a href="http://apigee.com/docs/node/8410">Push notifications</a></strong>: Send offers, alerts and other messages directly to user devices to dramatically increase engagement. With App Services you can send 10 million push notification per month for free!</li>
+			<li><strong><a href="http://apigee.com/docs/node/410">Geolocation</a></strong>: Target users or return result sets based on user location to keep your app highly-relevant.</li>
+			<li><strong><a href="http://apigee.com/docs/node/10152">Data storage</a></strong>: Store all your application data on our high-availability infrastructure, and never worry about dealing with a database ever again.</li>
+			<li><strong><a href="http://apigee.com/docs/node/376">User management and authentication</a></strong>: Every app needs users. Use App Services to easily implement user registration, as well as OAuth 2.0-compliant login and authentication.</li>
+		</ul>
+	</li>
+	<li>
+		<h3><strong>Check out the sample apps</strong></h3>
+		<p>The SDK includes samples that illustrate Apigee&nbsp;features. To look at them, open the .xcodeproj file for each in Xcode. To get a sample app running, open its project file, then follow the steps described in the section, <a target="_blank" href="http://apigee.com/docs/app-services/content/installing-apigee-sdk-ios">Add the SDK to an existing project</a>.</p>
+		<p>You'll find the samples in the following location in your SDK download:</p>
+		<pre>
+apigee-ios-sdk-&lt;version&gt;
+    ...
+    /samples
+		</pre>
+		<div id="collapse"><a class="btn" data-toggle="collapse" href="#samples_collapse">Details</a></div>
+		<div class="collapse" id="samples_collapse">
+			<p>The samples include the following:</p>
+			<table class="table">
+				<thead>
+					<tr>
+						<th scope="col">Sample</th>
+						<th scope="col">Description</th>
+					</tr>
+				</thead>
+				<tbody>
+					<tr>
+						<td>books</td>
+						<td>An app for storing a list of books that shows Apigee database operations such as reading, creating, and deleting.</td>
+					</tr>
+					<tr>
+						<td>messagee</td>
+						<td>An app for sending and receiving messages that shows Apigee database operations (reading, creating).</td>
+					</tr>
+					<tr>
+						<td>push</td>
+						<td>An app that uses the push feature to send notifications to the devices of users who have subscribed for them.</td>
+					</tr>
+				</tbody>
+			</table>
+		</div>
+		<p>&nbsp;</p>
+	</li>
+</ul>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app-overview/doc-includes/javascript.html
----------------------------------------------------------------------
diff --git a/portal/js/app-overview/doc-includes/javascript.html b/portal/js/app-overview/doc-includes/javascript.html
new file mode 100644
index 0000000..66e047d
--- /dev/null
+++ b/portal/js/app-overview/doc-includes/javascript.html
@@ -0,0 +1,94 @@
+<h2>1. Import the SDK into your HTML</h2>
+<p>To enable support for Apigee-related functions in your HTML, you'll need to&nbsp;include <code>apigee.js</code> in your app. To do this, add the following to the <code>head</code> block of your HTML:</p>
+<pre>
+&lt;script type="text/javascript" src="path/to/js/sdk/apigee.js"&gt;&lt;/script&gt;
+</pre>
+<h2>2. Instantiate Apigee.Client</h2>
+<p>Apigee.Client initializes the App Services SDK, and gives you access to all of the App Services SDK methods.</p>
+<p>You will need to pass a JSON object with the UUID or name for your App Services organization and application when you instantiate it.</p>
+<pre>
+//Apigee account credentials, available in the App Services admin portal 
+var client_creds = {
+        orgName:'{{currentOrg}}',
+        appName:'{{currentApp}}'
+    }
+
+//Initializes the SDK. Also instantiates Apigee.MonitoringClient
+var dataClient = new Apigee.Client(client_creds);  
+</pre>
+
+<h2>3. Verify SDK installation</h2>
+
+<p>Once initialized, App Services will also automatically instantiate <code>Apigee.MonitoringClient</code> and begin logging usage, crash and error metrics for your app.</p>
+
+<p>To verify that the SDK has been properly initialized, run your app, then go to <strong>'Monitoring' > 'App Usage'</strong> in the <a href="https://www.apigee.com/usergrid">App Services admin portal</a> to verify that data is being sent.</p>
+<p><img src="js/app-overview/doc-includes/images/verify.png" alt="screenshot of data in admin portal"/></p>
+<div class="warning">It may take up to two minutes for data to appear in the admin portal after you run your app.</div>
+
+<h2>Installation complete! Try these next steps</h2>
+<ul>
+	<li>	
+		<h3><strong>Call additional SDK methods in your code</strong></h3>
+		<p>Use <code>dataClient</code> or <code>dataClient.monitor</code> to call SDK methods:</p>
+		<div id="collapse">
+			<a href="#client_collapse" class="btn" data-toggle="collapse"><i class="icon-white icon-chevron-down"></i> Details</a>
+		</div>
+		<div id="client_collapse" class="collapse">
+			<ul>
+				<li><code>dataClient</code>: Used to access the data methods of the App Services SDK, including those for push notifications, data store, and geolocation.</li>
+				<li><code>dataClient.monitor</code>: Used to access the app configuration and monitoring methods of the App Services SDK, including advanced logging, and A/B testing.</li>
+			</ul>
+		</div>
+	</li>	
+	<li>
+		<h3><strong>Add App Services features to your app</strong></h3>
+		<p>With App Services you can quickly add valuable features to your mobile or web app, including push notifications, a custom data store, geolocation and more. Check out these links to get started with a few of our most popular features:</p>
+		<ul>
+			<li><strong><a href="http://apigee.com/docs/node/8410">Push notifications</a></strong>: Send offers, alerts and other messages directly to user devices to dramatically increase engagement. With App Services you can send 10 million push notification per month for free!</li>
+			<li><strong><a href="http://apigee.com/docs/node/410">Geolocation</a></strong>: Keep your app highly-relevant by targeting users or returning result sets based on user location.</li>
+			<li><strong><a href="http://apigee.com/docs/node/10152">Data storage</a></strong>: Store all your application data on our high-availability infrastructure, and never worry about dealing with a database ever again.</li>
+			<li><strong><a href="http://apigee.com/docs/node/376">User management and authentication</a></strong>: Every app needs users. Use App Services to easily implement registration, login and OAuth 2.0-compliant authentication.</li>
+		</ul>
+	</li>
+	<li>
+		<h3><strong>Check out the sample apps</strong></h3>
+		<p>The SDK includes samples that illustrate Apigee&nbsp;features. To look at them, open the .xcodeproj file for each in Xcode. You'll find the samples in the following location in your SDK download:</p>
+		<pre>
+apigee-javascript-sdk-master
+    ...
+    /samples		
+		</pre>
+		<div id="collapse">
+			<a href="#samples_collapse" class="btn" data-toggle="collapse"><i class="icon-white icon-chevron-down"></i> Details</a>
+		</div>
+		<div id="samples_collapse" class="collapse">
+			<p>The samples include the following:</p>
+			<table class="table">
+				<thead>
+					<tr>
+						<th scope="col">Sample</th>
+						<th scope="col">Description</th>
+					</tr>
+				</thead>
+				<tbody>
+					<tr>
+						<td>booksSample.html</td>
+						<td>An app for storing a list of books that shows Apigee database operations such as reading, creating, and deleting.</td>
+					</tr>
+					<tr>
+						<td>messagee</td>
+						<td>An app for sending and receiving messages that shows Apigee database operations (reading, creating).</td>
+					</tr>
+					<tr>
+						<td>monitoringSample.html</td>
+						<td>Shows basic configuration and initialization of the HTML5 app monitoring functionality. Works in browser, PhoneGap, Appcelerator, and Trigger.io.</td>
+					</tr>
+					<tr>
+						<td>readmeSample.html</td>
+						<td>A simple app for reading data from an Apigee database.</td>
+					</tr>
+				</tbody>
+			</table>
+		</div>	
+	</li>				
+</ul>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app-overview/doc-includes/net.html
----------------------------------------------------------------------
diff --git a/portal/js/app-overview/doc-includes/net.html b/portal/js/app-overview/doc-includes/net.html
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app-overview/doc-includes/node.html
----------------------------------------------------------------------
diff --git a/portal/js/app-overview/doc-includes/node.html b/portal/js/app-overview/doc-includes/node.html
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app-overview/doc-includes/ruby.html
----------------------------------------------------------------------
diff --git a/portal/js/app-overview/doc-includes/ruby.html b/portal/js/app-overview/doc-includes/ruby.html
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app-overview/getting-started-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/app-overview/getting-started-controller.js b/portal/js/app-overview/getting-started-controller.js
new file mode 100644
index 0000000..3b49ddd
--- /dev/null
+++ b/portal/js/app-overview/getting-started-controller.js
@@ -0,0 +1,90 @@
+'use strict'
+
+AppServices.Controllers.controller('GettingStartedCtrl',
+    ['ug',
+      'data',
+      '$scope',
+      '$rootScope',
+      '$location',
+      '$timeout',
+      '$anchorScroll', function (ug, data, $scope, $rootScope, $location, $timeout, $anchorScroll) {
+
+
+      $scope.collections = [];
+      $scope.graph = '';
+
+
+      $scope.clientID = '';
+      $scope.clientSecret = '';
+      var getKeys = function () {
+        return data.jsonp_raw('credentials', '', {});
+      }
+
+      $scope.regenerateCredentialsDialog = function (modalId) {
+        $scope.orgAPICredentials = {client_id: 'regenerating...', client_secret: 'regenerating...'};
+        ug.regenerateAppCredentials();
+        $scope.hideModal(modalId);
+      };
+
+
+      $scope.$on('app-creds-updated', function (event, credentials) {
+        if (credentials) {
+          $scope.clientID = credentials.client_id;
+          $scope.clientSecret = credentials.client_secret;
+          if (!$scope.$$phase) {
+            $scope.$apply();
+          }
+        } else {
+          setTimeout(function () {
+            ug.getAppCredentials();
+          }, 5000)
+        }
+      });
+
+      ug.getAppCredentials();
+
+
+      $scope.contentTitle;
+
+      $scope.showSDKDetail = function (name) {
+        var introContainer = document.getElementById('intro-container');
+
+        //if no value then let link click happen and reset height to remove content
+        if (name === 'nocontent') {
+          introContainer.style.height = '0';
+          return true;
+        }
+
+        introContainer.style.opacity = .1;
+        introContainer.style.height = '0';
+        var timeout = 0;
+        if ($scope.contentTitle) {
+          timeout = 500;
+        }
+        $timeout(function () {
+          introContainer.style.height = '1000px';
+          introContainer.style.opacity = 1;
+        }, timeout);
+        $scope.optionName = name;
+        $scope.contentTitle = name;
+
+        $scope.sdkLink = 'http://apigee.com/docs/content/' + name + '-sdk-redirect';
+        $scope.docsLink = 'http://apigee.com/docs/app-services/content/installing-apigee-sdk-' + name;
+
+        $scope.getIncludeURL = function () {
+          return 'app-overview/doc-includes/' + $scope.optionName + '.html';
+        }
+//      $location.path('http://mktg-dev.apigee.com/docs/content/ios-sdk-redirect');
+      }
+
+
+      $scope.scrollToElement = function (elem) {
+        // set the location.hash to the id of
+        // the element you wish to scroll to.
+        $location.hash(elem);
+
+        // call $anchorScroll()
+        $anchorScroll();
+        return false;
+      }
+    }]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app-overview/getting-started.html
----------------------------------------------------------------------
diff --git a/portal/js/app-overview/getting-started.html b/portal/js/app-overview/getting-started.html
new file mode 100644
index 0000000..8953427
--- /dev/null
+++ b/portal/js/app-overview/getting-started.html
@@ -0,0 +1,126 @@
+<div class="setup-sdk-content" >
+
+  <bsmodal id="regenerateCredentials"
+           title="Confirmation"
+           close="hideModal"
+           closelabel="Cancel"
+           extrabutton="regenerateCredentialsDialog"
+           extrabuttonlabel="Yes"
+           ng-cloak>
+    Are you sure you want to regenerate the credentials?
+  </bsmodal>
+
+  <section class="row-fluid">
+
+    <div class="span12">
+      <div class="page-filters">
+        <h1 class="title" class="pull-left"><i class="pictogram title">&#128640;</i> Getting Started</h1>
+      </div>
+    </div>
+
+  </section>
+  <section class="row-fluid">
+
+
+
+
+    <div class="span8">
+
+      <h2 class="title">Install the SDK for app {{currentApp}}</h2>
+      <p>Click on a platform icon below to view SDK installation instructions for that platform.</p>
+      <ul class="inline unstyled">
+        <!--<li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#ios"><i class="sdk-icon-large-ios"></i></a></li>-->
+        <!--<li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#android"><i class="sdk-icon-large-android"></i></a></li>-->
+        <!--<li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#javascript"><i class="sdk-icon-large-js"></i></a></li>-->
+
+
+        <li ng-click="showSDKDetail('ios')"
+            analytics-on="click"
+            analytics-label="App Services"
+            analytics-category="Getting Started"
+            analytics-event="iOS SDK"><i class="sdk-icon-large-ios"></i></li>
+        <li ng-click="showSDKDetail('android')"
+            analytics-on="click"
+            analytics-label="App Services"
+            analytics-category="Getting Started"
+            analytics-event="Android SDK"><i class="sdk-icon-large-android"></i></li>
+        <li ng-click="showSDKDetail('javascript')"
+            analytics-on="click"
+            analytics-label="App Services"
+            analytics-category="Getting Started"
+            analytics-event="JS SDK"><i class="sdk-icon-large-js"></i></li>
+        <li><a target="_blank"
+               ng-click="showSDKDetail('nocontent')"
+               href="http://apigee.com/docs/usergrid/content/sdks-and-examples#nodejs"
+               analytics-on="click"
+               analytics-label="App Services"
+               analytics-category="Getting Started"
+               analytics-event="Node SDK"><i class="sdk-icon-large-node"></i></a></li>
+        <li><a target="_blank"
+               ng-click="showSDKDetail('nocontent')"
+               href="http://apigee.com/docs/usergrid/content/sdks-and-examples#ruby"
+               analytics-on="click"
+               analytics-label="App Services"
+               analytics-category="Getting Started"
+               analytics-event="Ruby SDK"><i class="sdk-icon-large-ruby"></i></a></li>
+        <li><a target="_blank"
+               ng-click="showSDKDetail('nocontent')"
+               href="http://apigee.com/docs/usergrid/content/sdks-and-examples#c"
+               analytics-on="click"
+               analytics-label="App Services"
+               analytics-category="Getting Started"
+               analytics-event="DotNet SDK"><i class="sdk-icon-large-net"></i></a></li>
+       </ul>
+
+      <section id="intro-container" class="row-fluid intro-container">
+
+        <div class="sdk-intro">
+        </div>
+
+        <div class="sdk-intro-content">
+
+          <a class="btn normal white pull-right" ng-href="{{sdkLink}}" target="_blank">
+            Download SDK
+          </a>
+          <a class="btn normal white pull-right" ng-href="{{docsLink}}" target="_blank">
+            More Docs
+          </a>
+          <h3 class="title"><i class="pictogram">&#128213;</i>{{contentTitle}}</h3>
+
+          <div ng-include="getIncludeURL()"></div>
+        </div>
+
+      </section>
+    </div>
+
+    <div class="span4 keys-creds">
+      <h2 class="title">Mobile sdk keys</h2>
+      <p>For mobile SDK initialization.</p>
+      <dl class="app-creds">
+        <dt>Org Name</dt>
+        <dd>{{currentOrg}}</dd>
+        <dt>App Name</dt>
+        <dd>{{currentApp}}</dd>
+      </dl>
+      <h2 class="title">Server app credentials</h2>
+      <p>For authenticating from a server side app (i.e. Ruby, .NET, etc.)</p>
+      <dl class="app-creds">
+        <dt>Client ID</dt>
+        <dd>{{clientID}}</dd>
+        <dt>Client Secret</dt>
+        <dd>{{clientSecret}}</dd>
+        <dt>
+           &nbsp;
+        </dt>
+        <dd>&nbsp;</dd>
+
+        <dt>
+          <a class="btn filter-selector" ng-click="showModal('regenerateCredentials')">Regenerate</a>
+        </dt>
+        <dd></dd>
+      </dl>
+
+    </div>
+
+  </section>
+</div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app.js
----------------------------------------------------------------------
diff --git a/portal/js/app.js b/portal/js/app.js
new file mode 100644
index 0000000..80f9cca
--- /dev/null
+++ b/portal/js/app.js
@@ -0,0 +1,125 @@
+'use strict';
+//todo - where does angular recommend we put polyfills????
+var polyfills = function(window,Object){
+  window.requestAnimFrame = (function(){
+    return  window.requestAnimationFrame       ||
+        window.webkitRequestAnimationFrame ||
+        window.mozRequestAnimationFrame    ||
+        window.oRequestAnimationFrame      ||
+        window.msRequestAnimationFrame     ||
+        function(/* function */ callback, /* DOMElement */ element){
+          window.setTimeout(callback, 1000 / 60);
+        };
+  })();
+
+  Object.defineProperty(Object.prototype, "clone", {
+    enumerable: false,
+    writable: true,
+    value: function () {
+      var i, newObj = (this instanceof Array) ? [] : {};
+      for (i in this) {
+        if (i === 'clone') {
+          continue;
+        }
+        if (this[i] && typeof this[i] === "object") {
+          newObj[i] = this[i].clone();
+        } else {
+          newObj[i] = this[i];
+        }
+      }
+      return newObj;
+    }
+  });
+
+  Object.defineProperty(Object.prototype, "stringifyJSON", {
+    enumerable: false,
+    writable: true,
+    value: function () {
+      return JSON.stringify(this, null, '\t') ;
+    }
+  });
+
+};
+
+polyfills(window,Object);
+
+var AppServices = AppServices || {};
+global.AppServices = global.AppServices || AppServices;
+
+AppServices.Constants = angular.module('appservices.constants', []);
+AppServices.Services = angular.module('appservices.services', []);
+AppServices.Controllers = angular.module('appservices.controllers', []);
+AppServices.Filters = angular.module('appservices.filters', []);
+AppServices.Directives = angular.module('appservices.directives', []);
+AppServices.Performance = angular.module('appservices.performance', []);
+AppServices.Push = angular.module('appservices.push', []);
+
+angular.module('appservices',
+    [ 'ngRoute',
+      'ngResource',
+      'ngSanitize',
+      'ui.bootstrap',
+      'angulartics',
+      'angulartics.google.analytics',
+      'appservices.filters',
+      'appservices.services',
+      'appservices.directives',
+      'appservices.constants',
+      'appservices.controllers',
+      'appservices.performance',
+      'appservices.push'
+    ]).config(['$routeProvider',
+                                          '$locationProvider',
+                                          '$sceDelegateProvider','$analyticsProvider', function ($routeProvider,
+                                                                            $locationProvider,
+                                                                            $sceDelegateProvider, $analyticsProvider) {
+    $routeProvider
+      .when('/org-overview', {templateUrl: 'org-overview/org-overview.html', controller: 'OrgOverviewCtrl'})
+      .when('/login', {templateUrl: 'login/login.html', controller: 'LoginCtrl'})
+      .when('/login/loading', {templateUrl: 'login/loading.html', controller: 'LoginCtrl'})
+      .when('/app-overview/summary', {templateUrl: 'app-overview/app-overview.html', controller: 'AppOverviewCtrl'})
+      .when('/getting-started/setup', {templateUrl: 'app-overview/getting-started.html', controller: 'GettingStartedCtrl'})
+      .when('/forgot-password', {templateUrl: 'login/forgot-password.html', controller: 'ForgotPasswordCtrl'})
+      .when('/register', {templateUrl: 'login/register.html', controller: 'RegisterCtrl'})
+      .when('/users', {templateUrl: 'users/users.html', controller: 'UsersCtrl'})
+      .when('/users/profile', {templateUrl: 'users/users-profile.html', controller: 'UsersProfileCtrl'})
+      .when('/users/groups', {templateUrl: 'users/users-groups.html', controller: 'UsersGroupsCtrl'})
+      .when('/users/activities', {templateUrl: 'users/users-activities.html', controller: 'UsersActivitiesCtrl'})
+      .when('/users/graph', {templateUrl: 'users/users-graph.html', controller: 'UsersGraphCtrl'})
+      .when('/users/roles', {templateUrl: 'users/users-roles.html', controller: 'UsersRolesCtrl'})
+      .when('/groups', {templateUrl: 'groups/groups.html', controller: 'GroupsCtrl'})
+      .when('/groups/details', {templateUrl: 'groups/groups-details.html', controller: 'GroupsDetailsCtrl'})
+      .when('/groups/members', {templateUrl: 'groups/groups-members.html', controller: 'GroupsMembersCtrl'})
+      .when('/groups/activities', {templateUrl: 'groups/groups-activities.html', controller: 'GroupsActivitiesCtrl'})
+      .when('/groups/roles', {templateUrl: 'groups/groups-roles.html', controller: 'GroupsRolesCtrl'})
+      .when('/roles', {templateUrl: 'roles/roles.html', controller: 'RolesCtrl'})
+      .when('/roles/settings', {templateUrl: 'roles/roles-settings.html', controller: 'RolesSettingsCtrl'})
+      .when('/roles/users', {templateUrl: 'roles/roles-users.html', controller: 'RolesUsersCtrl'})
+      .when('/roles/groups', {templateUrl: 'roles/roles-groups.html', controller: 'RolesGroupsCtrl'})
+      .when('/data', {templateUrl: 'data/data.html', controller: 'DataCtrl'})
+      .when('/data/entity', {templateUrl: 'data/entity.html', controller: 'EntityCtrl'})
+      .when('/data/shell', {templateUrl: 'data/shell.html', controller: 'ShellCtrl'})
+      .when('/profile/organizations', {templateUrl: 'profile/organizations.html', controller: 'OrgCtrl'})
+      .when('/profile/profile', {templateUrl: 'profile/profile.html', controller: 'ProfileCtrl'})
+      .when('/profile', {templateUrl: 'profile/account.html', controller: 'AccountCtrl'})
+      .when('/activities', {templateUrl: 'activities/activities.html', controller: 'ActivitiesCtrl'})
+      .when('/shell', {templateUrl: 'shell/shell.html', controller: 'ShellCtrl'})
+      .when('/logout',{templateUrl: 'login/logout.html',controller:'LogoutCtrl'})
+      .otherwise({redirectTo: '/org-overview'});
+
+    $locationProvider
+      .html5Mode(false)
+      .hashPrefix('!');
+
+    $sceDelegateProvider.resourceUrlWhitelist([
+      // Allow same origin resource loads.
+      'self',
+      // Allow loading from our assets domain.  Notice the difference between * and **.
+      'http://apigee-internal-prod.jupiter.apigee.net/**',
+      'http://apigee-internal-prod.mars.apigee.net/**',
+      'https://appservices.apigee.com/**',
+      'https://api.usergrid.com/**'
+    ]);
+
+      $analyticsProvider.virtualPageviews(false);
+  }]);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/app/app.js
----------------------------------------------------------------------
diff --git a/portal/js/app/app.js b/portal/js/app/app.js
deleted file mode 100644
index b05fa28..0000000
--- a/portal/js/app/app.js
+++ /dev/null
@@ -1,118 +0,0 @@
-Usergrid.organizations = new Usergrid.Organization();
-
-var Pages = new ApigeePages();
-
-
-
-$(document).ready(function () {
-
-  var query_params = Usergrid.Params.queryParams;
-  if (Usergrid.apiUrl) {
-    Usergrid.ApiClient.setApiUrl(Usergrid.apiUrl);
-  }
-  Pages.resetPasswordUrl = Usergrid.ApiClient.getResetPasswordUrl();
-
-  initCore();
-  initUI(query_params);
-  startApp();
-
-  function initCore() {
-    prepareLocalStorage();
-    parseParams();
-  }
-
-  function initUI(query_params) {
-    apigee_console_app(Pages, query_params);
-    initMenu();
-    StatusBar.Init('#statusbar-placeholder');
-    toggleableSections();
-  }
-
-  function startApp() {
-
-    if (!Usergrid.userSession.loggedIn()) {
-      // test to see if the Portal is running on apigee, if so, send to SSO, if not, fall through to login screen
-      if (Usergrid.SSO.usingSSO()) {
-        Pages.clearPage();
-        Usergrid.SSO.sendToSSOLoginPage();
-      } else if (query_params.goto_signup) {
-        Pages.ShowPage("signup");
-      } else {
-        Usergrid.console.showLoginForNonSSO();
-      }
-    } else {
-      Usergrid.console.autoLogin(
-        function () {
-          Usergrid.console.loginOk();
-        },
-        function () {
-          Usergrid.console.logout();
-        }
-      );
-    }
-  }
-
-  function initMenu() {
-    $('.navbar .dropdown-toggle').dropdown();
-    $('#sidebar-menu .dropdown-toggle').dropdown();
-    $('#logout-link').click(Usergrid.console.logout);
-    $('#hideBanner').click(Pages.hideBanner);
-
-    var publicMenu = $('#publicMenu');
-    var privateMenu = $('.privateMenu');
-
-    Pages.AddPage({name:'login', menu:publicMenu});
-    Pages.AddPage({name:'message', menu:publicMenu});
-    Pages.AddPage({name:'signup', menu:publicMenu});
-    Pages.AddPage({name:'forgot-password', menu:publicMenu});
-    Pages.AddPage({name:'post-signup', menu:publicMenu});
-    Pages.AddPage({name:'console', menu:privateMenu, initFunction:initConsole, showFunction: function() {
-      if(!Backbone.History.started){
-        Backbone.history.start();
-      }
-    }});
-  }
-
-  function initConsole() {
-    //Pages.AddPanel(pageName,linkSelector,boxSelector,initfunc,showfunc,buttonHandlerFunction);
-    Pages.AddPanel('organization', '.go-home', null,null, null, Usergrid.console.pageSelectHome,null);
-    Pages.AddPanel('console', null, null, null, null, null, null);
-    Pages.AddPanel('dashboard', null, null, null, null, Usergrid.console.pageSelectApplication,null);
-    Pages.AddPanel('user', null, "#users-sublink", null, null, null, function() {});
-    Pages.AddPanel('users', null, "#users-sublink", null, null, Usergrid.console.pageSelectUsers, null);
-    Pages.AddPanel('group', null, "#groups-sublink", null, null, null, function() {});
-    Pages.AddPanel('groups', null, null, null, null, Usergrid.console.pageSelectGroups, null);
-    Pages.AddPanel('roles',  null, null, null, null, Usergrid.console.pageSelectRoles, null);
-    Pages.AddPanel('activities', null, null, null, null, Usergrid.console.pageSelectActivities, null);
-    Pages.AddPanel('notifications', null, null, null, null, Usergrid.console.pageSelectNotifcations, null);
-    Pages.AddPanel('sendNotification', null, "#sendNotification-sublink", null, null, null, null);
-    Pages.AddPanel('messageHistory', null, "#messageHistory-sublink", null, null, null, null);
-    Pages.AddPanel('configuration', null, "#configuration-sublink", null, null, null, null);
-    Pages.AddPanel('getStarted', null, "#getStarted-sublink", null, null, null, null);
-    Pages.AddPanel('collections', "#collections-link", null, null, null, Usergrid.console.pageSelectCollections, null);
-    Pages.AddPanel('analytics', null, null, null, null, Usergrid.console.pageSelectAnalytics, null);
-    Pages.AddPanel('properties', null, null, null, null, Usergrid.console.pageSelectProperties, null);
-    Pages.AddPanel('shell', null, null, null, null, Usergrid.console.pageSelectShell, null);
-    Pages.AddPanel('account', "#account-link", null, null, null, null, accountRedirect);
-    //$("#sidebar-menu > ul > li > a").click(Pages.ShowPanel);
-
-  }
-
-  function accountRedirect(e) {
-    e.preventDefault();
-    Usergrid.console.requestAccountSettings(Backbone.history.getHash(window));
-  }
-
-  function initCenterPanels(){
-    $(window).resize(centerPanels);
-    $(window).resize();
-  }
-
-  function centerPanels(){
-    var panels = $("#console-page");
-    var freeSpace = $(window).width() - panels.width();
-    console.log("window: " + $(window).width() + " Panels:" + panels.width());
-    console.log("free space: "+freeSpace);
-    panels.css('margin-left',function(){return freeSpace / 2;});
-  }
-});


[21/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.1.5/angular-resource-1.1.5.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.1.5/angular-resource-1.1.5.js b/portal/js/libs/angular-1.1.5/angular-resource-1.1.5.js
new file mode 100644
index 0000000..acaa84c
--- /dev/null
+++ b/portal/js/libs/angular-1.1.5/angular-resource-1.1.5.js
@@ -0,0 +1,537 @@
+/**
+ * @license AngularJS v1.1.5
+ * (c) 2010-2012 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, angular, undefined) {
+'use strict';
+
+/**
+ * @ngdoc overview
+ * @name ngResource
+ * @description
+ */
+
+/**
+ * @ngdoc object
+ * @name ngResource.$resource
+ * @requires $http
+ *
+ * @description
+ * A factory which creates a resource object that lets you interact with
+ * [RESTful](http://en.wikipedia.org/wiki/Representational_State_Transfer) server-side data sources.
+ *
+ * The returned resource object has action methods which provide high-level behaviors without
+ * the need to interact with the low level {@link ng.$http $http} service.
+ *
+ * # Installation
+ * To use $resource make sure you have included the `angular-resource.js` that comes in Angular
+ * package. You can also find this file on Google CDN, bower as well as at
+ * {@link http://code.angularjs.org/ code.angularjs.org}.
+ *
+ * Finally load the module in your application:
+ *
+ *        angular.module('app', ['ngResource']);
+ *
+ * and you are ready to get started!
+ *
+ * @param {string} url A parametrized URL template with parameters prefixed by `:` as in
+ *   `/user/:username`. If you are using a URL with a port number (e.g.
+ *   `http://example.com:8080/api`), you'll need to escape the colon character before the port
+ *   number, like this: `$resource('http://example.com\\:8080/api')`.
+ *
+ *   If you are using a url with a suffix, just add the suffix, like this: 
+ *   `$resource('http://example.com/resource.json')` or `$resource('http://example.com/:id.json')
+ *   or even `$resource('http://example.com/resource/:resource_id.:format')` 
+ *   If the parameter before the suffix is empty, :resource_id in this case, then the `/.` will be
+ *   collapsed down to a single `.`.  If you need this sequence to appear and not collapse then you
+ *   can escape it with `/\.`.
+ *
+ * @param {Object=} paramDefaults Default values for `url` parameters. These can be overridden in
+ *   `actions` methods. If any of the parameter value is a function, it will be executed every time
+ *   when a param value needs to be obtained for a request (unless the param was overridden).
+ *
+ *   Each key value in the parameter object is first bound to url template if present and then any
+ *   excess keys are appended to the url search query after the `?`.
+ *
+ *   Given a template `/path/:verb` and parameter `{verb:'greet', salutation:'Hello'}` results in
+ *   URL `/path/greet?salutation=Hello`.
+ *
+ *   If the parameter value is prefixed with `@` then the value of that parameter is extracted from
+ *   the data object (useful for non-GET operations).
+ *
+ * @param {Object.<Object>=} actions Hash with declaration of custom action that should extend the
+ *   default set of resource actions. The declaration should be created in the format of {@link
+ *   ng.$http#Parameters $http.config}:
+ *
+ *       {action1: {method:?, params:?, isArray:?, headers:?, ...},
+ *        action2: {method:?, params:?, isArray:?, headers:?, ...},
+ *        ...}
+ *
+ *   Where:
+ *
+ *   - **`action`** – {string} – The name of action. This name becomes the name of the method on your
+ *     resource object.
+ *   - **`method`** – {string} – HTTP request method. Valid methods are: `GET`, `POST`, `PUT`, `DELETE`,
+ *     and `JSONP`.
+ *   - **`params`** – {Object=} – Optional set of pre-bound parameters for this action. If any of the
+ *     parameter value is a function, it will be executed every time when a param value needs to be
+ *     obtained for a request (unless the param was overridden).
+ *   - **`url`** – {string} – action specific `url` override. The url templating is supported just like
+ *     for the resource-level urls.
+ *   - **`isArray`** – {boolean=} – If true then the returned object for this action is an array, see
+ *     `returns` section.
+ *   - **`transformRequest`** – `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –
+ *     transform function or an array of such functions. The transform function takes the http
+ *     request body and headers and returns its transformed (typically serialized) version.
+ *   - **`transformResponse`** – `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –
+ *     transform function or an array of such functions. The transform function takes the http
+ *     response body and headers and returns its transformed (typically deserialized) version.
+ *   - **`cache`** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the
+ *     GET request, otherwise if a cache instance built with
+ *     {@link ng.$cacheFactory $cacheFactory}, this cache will be used for
+ *     caching.
+ *   - **`timeout`** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise} that
+ *     should abort the request when resolved.
+ *   - **`withCredentials`** - `{boolean}` - whether to to set the `withCredentials` flag on the
+ *     XHR object. See {@link https://developer.mozilla.org/en/http_access_control#section_5
+ *     requests with credentials} for more information.
+ *   - **`responseType`** - `{string}` - see {@link
+ *     https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType requestType}.
+ *
+ * @returns {Object} A resource "class" object with methods for the default set of resource actions
+ *   optionally extended with custom `actions`. The default set contains these actions:
+ *
+ *       { 'get':    {method:'GET'},
+ *         'save':   {method:'POST'},
+ *         'query':  {method:'GET', isArray:true},
+ *         'remove': {method:'DELETE'},
+ *         'delete': {method:'DELETE'} };
+ *
+ *   Calling these methods invoke an {@link ng.$http} with the specified http method,
+ *   destination and parameters. When the data is returned from the server then the object is an
+ *   instance of the resource class. The actions `save`, `remove` and `delete` are available on it
+ *   as  methods with the `$` prefix. This allows you to easily perform CRUD operations (create,
+ *   read, update, delete) on server-side data like this:
+ *   <pre>
+        var User = $resource('/user/:userId', {userId:'@id'});
+        var user = User.get({userId:123}, function() {
+          user.abc = true;
+          user.$save();
+        });
+     </pre>
+ *
+ *   It is important to realize that invoking a $resource object method immediately returns an
+ *   empty reference (object or array depending on `isArray`). Once the data is returned from the
+ *   server the existing reference is populated with the actual data. This is a useful trick since
+ *   usually the resource is assigned to a model which is then rendered by the view. Having an empty
+ *   object results in no rendering, once the data arrives from the server then the object is
+ *   populated with the data and the view automatically re-renders itself showing the new data. This
+ *   means that in most case one never has to write a callback function for the action methods.
+ *
+ *   The action methods on the class object or instance object can be invoked with the following
+ *   parameters:
+ *
+ *   - HTTP GET "class" actions: `Resource.action([parameters], [success], [error])`
+ *   - non-GET "class" actions: `Resource.action([parameters], postData, [success], [error])`
+ *   - non-GET instance actions:  `instance.$action([parameters], [success], [error])`
+ *
+ *
+ *   The Resource instances and collection have these additional properties:
+ *
+ *   - `$then`: the `then` method of a {@link ng.$q promise} derived from the underlying
+ *     {@link ng.$http $http} call.
+ *
+ *     The success callback for the `$then` method will be resolved if the underlying `$http` requests
+ *     succeeds.
+ *
+ *     The success callback is called with a single object which is the {@link ng.$http http response}
+ *     object extended with a new property `resource`. This `resource` property is a reference to the
+ *     result of the resource action — resource object or array of resources.
+ *
+ *     The error callback is called with the {@link ng.$http http response} object when an http
+ *     error occurs.
+ *
+ *   - `$resolved`: true if the promise has been resolved (either with success or rejection);
+ *     Knowing if the Resource has been resolved is useful in data-binding.
+ *
+ * @example
+ *
+ * # Credit card resource
+ *
+ * <pre>
+     // Define CreditCard class
+     var CreditCard = $resource('/user/:userId/card/:cardId',
+      {userId:123, cardId:'@id'}, {
+       charge: {method:'POST', params:{charge:true}}
+      });
+
+     // We can retrieve a collection from the server
+     var cards = CreditCard.query(function() {
+       // GET: /user/123/card
+       // server returns: [ {id:456, number:'1234', name:'Smith'} ];
+
+       var card = cards[0];
+       // each item is an instance of CreditCard
+       expect(card instanceof CreditCard).toEqual(true);
+       card.name = "J. Smith";
+       // non GET methods are mapped onto the instances
+       card.$save();
+       // POST: /user/123/card/456 {id:456, number:'1234', name:'J. Smith'}
+       // server returns: {id:456, number:'1234', name: 'J. Smith'};
+
+       // our custom method is mapped as well.
+       card.$charge({amount:9.99});
+       // POST: /user/123/card/456?amount=9.99&charge=true {id:456, number:'1234', name:'J. Smith'}
+     });
+
+     // we can create an instance as well
+     var newCard = new CreditCard({number:'0123'});
+     newCard.name = "Mike Smith";
+     newCard.$save();
+     // POST: /user/123/card {number:'0123', name:'Mike Smith'}
+     // server returns: {id:789, number:'01234', name: 'Mike Smith'};
+     expect(newCard.id).toEqual(789);
+ * </pre>
+ *
+ * The object returned from this function execution is a resource "class" which has "static" method
+ * for each action in the definition.
+ *
+ * Calling these methods invoke `$http` on the `url` template with the given `method`, `params` and `headers`.
+ * When the data is returned from the server then the object is an instance of the resource type and
+ * all of the non-GET methods are available with `$` prefix. This allows you to easily support CRUD
+ * operations (create, read, update, delete) on server-side data.
+
+   <pre>
+     var User = $resource('/user/:userId', {userId:'@id'});
+     var user = User.get({userId:123}, function() {
+       user.abc = true;
+       user.$save();
+     });
+   </pre>
+ *
+ * It's worth noting that the success callback for `get`, `query` and other method gets passed
+ * in the response that came from the server as well as $http header getter function, so one
+ * could rewrite the above example and get access to http headers as:
+ *
+   <pre>
+     var User = $resource('/user/:userId', {userId:'@id'});
+     User.get({userId:123}, function(u, getResponseHeaders){
+       u.abc = true;
+       u.$save(function(u, putResponseHeaders) {
+         //u => saved user object
+         //putResponseHeaders => $http header getter
+       });
+     });
+   </pre>
+
+ * # Buzz client
+
+   Let's look at what a buzz client created with the `$resource` service looks like:
+    <doc:example>
+      <doc:source jsfiddle="false">
+       <script>
+         function BuzzController($resource) {
+           this.userId = 'googlebuzz';
+           this.Activity = $resource(
+             'https://www.googleapis.com/buzz/v1/activities/:userId/:visibility/:activityId/:comments',
+             {alt:'json', callback:'JSON_CALLBACK'},
+             {get:{method:'JSONP', params:{visibility:'@self'}}, replies: {method:'JSONP', params:{visibility:'@self', comments:'@comments'}}}
+           );
+         }
+
+         BuzzController.prototype = {
+           fetch: function() {
+             this.activities = this.Activity.get({userId:this.userId});
+           },
+           expandReplies: function(activity) {
+             activity.replies = this.Activity.replies({userId:this.userId, activityId:activity.id});
+           }
+         };
+         BuzzController.$inject = ['$resource'];
+       </script>
+
+       <div ng-controller="BuzzController">
+         <input ng-model="userId"/>
+         <button ng-click="fetch()">fetch</button>
+         <hr/>
+         <div ng-repeat="item in activities.data.items">
+           <h1 style="font-size: 15px;">
+             <img src="{{item.actor.thumbnailUrl}}" style="max-height:30px;max-width:30px;"/>
+             <a href="{{item.actor.profileUrl}}">{{item.actor.name}}</a>
+             <a href ng-click="expandReplies(item)" style="float: right;">Expand replies: {{item.links.replies[0].count}}</a>
+           </h1>
+           {{item.object.content | html}}
+           <div ng-repeat="reply in item.replies.data.items" style="margin-left: 20px;">
+             <img src="{{reply.actor.thumbnailUrl}}" style="max-height:30px;max-width:30px;"/>
+             <a href="{{reply.actor.profileUrl}}">{{reply.actor.name}}</a>: {{reply.content | html}}
+           </div>
+         </div>
+       </div>
+      </doc:source>
+      <doc:scenario>
+      </doc:scenario>
+    </doc:example>
+ */
+angular.module('ngResource', ['ng']).
+  factory('$resource', ['$http', '$parse', function($http, $parse) {
+    var DEFAULT_ACTIONS = {
+      'get':    {method:'GET'},
+      'save':   {method:'POST'},
+      'query':  {method:'GET', isArray:true},
+      'remove': {method:'DELETE'},
+      'delete': {method:'DELETE'}
+    };
+    var noop = angular.noop,
+        forEach = angular.forEach,
+        extend = angular.extend,
+        copy = angular.copy,
+        isFunction = angular.isFunction,
+        getter = function(obj, path) {
+          return $parse(path)(obj);
+        };
+
+    /**
+     * We need our custom method because encodeURIComponent is too aggressive and doesn't follow
+     * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path
+     * segments:
+     *    segment       = *pchar
+     *    pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
+     *    pct-encoded   = "%" HEXDIG HEXDIG
+     *    unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
+     *    sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
+     *                     / "*" / "+" / "," / ";" / "="
+     */
+    function encodeUriSegment(val) {
+      return encodeUriQuery(val, true).
+        replace(/%26/gi, '&').
+        replace(/%3D/gi, '=').
+        replace(/%2B/gi, '+');
+    }
+
+
+    /**
+     * This method is intended for encoding *key* or *value* parts of query component. We need a custom
+     * method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be
+     * encoded per http://tools.ietf.org/html/rfc3986:
+     *    query       = *( pchar / "/" / "?" )
+     *    pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
+     *    unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
+     *    pct-encoded   = "%" HEXDIG HEXDIG
+     *    sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
+     *                     / "*" / "+" / "," / ";" / "="
+     */
+    function encodeUriQuery(val, pctEncodeSpaces) {
+      return encodeURIComponent(val).
+        replace(/%40/gi, '@').
+        replace(/%3A/gi, ':').
+        replace(/%24/g, '$').
+        replace(/%2C/gi, ',').
+        replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));
+    }
+
+    function Route(template, defaults) {
+      this.template = template;
+      this.defaults = defaults || {};
+      this.urlParams = {};
+    }
+
+    Route.prototype = {
+      setUrlParams: function(config, params, actionUrl) {
+        var self = this,
+            url = actionUrl || self.template,
+            val,
+            encodedVal;
+
+        var urlParams = self.urlParams = {};
+        forEach(url.split(/\W/), function(param){
+          if (param && (new RegExp("(^|[^\\\\]):" + param + "(\\W|$)").test(url))) {
+              urlParams[param] = true;
+          }
+        });
+        url = url.replace(/\\:/g, ':');
+
+        params = params || {};
+        forEach(self.urlParams, function(_, urlParam){
+          val = params.hasOwnProperty(urlParam) ? params[urlParam] : self.defaults[urlParam];
+          if (angular.isDefined(val) && val !== null) {
+            encodedVal = encodeUriSegment(val);
+            url = url.replace(new RegExp(":" + urlParam + "(\\W|$)", "g"), encodedVal + "$1");
+          } else {
+            url = url.replace(new RegExp("(\/?):" + urlParam + "(\\W|$)", "g"), function(match,
+                leadingSlashes, tail) {
+              if (tail.charAt(0) == '/') {
+                return tail;
+              } else {
+                return leadingSlashes + tail;
+              }
+            });
+          }
+        });
+
+        // strip trailing slashes and set the url
+        url = url.replace(/\/+$/, '');
+        // then replace collapse `/.` if found in the last URL path segment before the query
+        // E.g. `http://url.com/id./format?q=x` becomes `http://url.com/id.format?q=x`
+        url = url.replace(/\/\.(?=\w+($|\?))/, '.');
+        // replace escaped `/\.` with `/.`
+        config.url = url.replace(/\/\\\./, '/.');
+          
+
+        // set params - delegate param encoding to $http
+        forEach(params, function(value, key){
+          if (!self.urlParams[key]) {
+            config.params = config.params || {};
+            config.params[key] = value;
+          }
+        });
+      }
+    };
+
+
+    function ResourceFactory(url, paramDefaults, actions) {
+      var route = new Route(url);
+
+      actions = extend({}, DEFAULT_ACTIONS, actions);
+
+      function extractParams(data, actionParams){
+        var ids = {};
+        actionParams = extend({}, paramDefaults, actionParams);
+        forEach(actionParams, function(value, key){
+          if (isFunction(value)) { value = value(); }
+          ids[key] = value && value.charAt && value.charAt(0) == '@' ? getter(data, value.substr(1)) : value;
+        });
+        return ids;
+      }
+
+      function Resource(value){
+        copy(value || {}, this);
+      }
+
+      forEach(actions, function(action, name) {
+        action.method = angular.uppercase(action.method);
+        var hasBody = action.method == 'POST' || action.method == 'PUT' || action.method == 'PATCH';
+        Resource[name] = function(a1, a2, a3, a4) {
+          var params = {};
+          var data;
+          var success = noop;
+          var error = null;
+          var promise;
+
+          switch(arguments.length) {
+          case 4:
+            error = a4;
+            success = a3;
+            //fallthrough
+          case 3:
+          case 2:
+            if (isFunction(a2)) {
+              if (isFunction(a1)) {
+                success = a1;
+                error = a2;
+                break;
+              }
+
+              success = a2;
+              error = a3;
+              //fallthrough
+            } else {
+              params = a1;
+              data = a2;
+              success = a3;
+              break;
+            }
+          case 1:
+            if (isFunction(a1)) success = a1;
+            else if (hasBody) data = a1;
+            else params = a1;
+            break;
+          case 0: break;
+          default:
+            throw "Expected between 0-4 arguments [params, data, success, error], got " +
+              arguments.length + " arguments.";
+          }
+
+          var value = this instanceof Resource ? this : (action.isArray ? [] : new Resource(data));
+          var httpConfig = {},
+              promise;
+
+          forEach(action, function(value, key) {
+            if (key != 'params' && key != 'isArray' ) {
+              httpConfig[key] = copy(value);
+            }
+          });
+          httpConfig.data = data;
+          route.setUrlParams(httpConfig, extend({}, extractParams(data, action.params || {}), params), action.url);
+
+          function markResolved() { value.$resolved = true; }
+
+          promise = $http(httpConfig);
+          value.$resolved = false;
+
+          promise.then(markResolved, markResolved);
+          value.$then = promise.then(function(response) {
+            var data = response.data;
+            var then = value.$then, resolved = value.$resolved;
+
+            if (data) {
+              if (action.isArray) {
+                value.length = 0;
+                forEach(data, function(item) {
+                  value.push(new Resource(item));
+                });
+              } else {
+                copy(data, value);
+                value.$then = then;
+                value.$resolved = resolved;
+              }
+            }
+
+            (success||noop)(value, response.headers);
+
+            response.resource = value;
+            return response;
+          }, error).then;
+
+          return value;
+        };
+
+
+        Resource.prototype['$' + name] = function(a1, a2, a3) {
+          var params = extractParams(this),
+              success = noop,
+              error;
+
+          switch(arguments.length) {
+          case 3: params = a1; success = a2; error = a3; break;
+          case 2:
+          case 1:
+            if (isFunction(a1)) {
+              success = a1;
+              error = a2;
+            } else {
+              params = a1;
+              success = a2 || noop;
+            }
+          case 0: break;
+          default:
+            throw "Expected between 1-3 arguments [params, success, error], got " +
+              arguments.length + " arguments.";
+          }
+          var data = hasBody ? this : undefined;
+          Resource[name].call(this, params, data, success, error);
+        };
+      });
+
+      Resource.bind = function(additionalParamDefaults){
+        return ResourceFactory(url, extend({}, paramDefaults, additionalParamDefaults), actions);
+      };
+
+      return Resource;
+    }
+
+    return ResourceFactory;
+  }]);
+
+
+})(window, window.angular);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular-animate.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular-animate.js b/portal/js/libs/angular-1.2.5/angular-animate.js
new file mode 100755
index 0000000..9cdc9c2
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular-animate.js
@@ -0,0 +1,1323 @@
+/**
+ * @license AngularJS v1.2.5
+ * (c) 2010-2014 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, angular, undefined) {'use strict';
+
+/* jshint maxlen: false */
+
+/**
+ * @ngdoc overview
+ * @name ngAnimate
+ * @description
+ *
+ * # ngAnimate
+ *
+ * The `ngAnimate` module provides support for JavaScript, CSS3 transition and CSS3 keyframe animation hooks within existing core and custom directives.
+ *
+ * {@installModule animate}
+ *
+ * <div doc-module-components="ngAnimate"></div>
+ *
+ * # Usage
+ *
+ * To see animations in action, all that is required is to define the appropriate CSS classes
+ * or to register a JavaScript animation via the myModule.animation() function. The directives that support animation automatically are:
+ * `ngRepeat`, `ngInclude`, `ngIf`, `ngSwitch`, `ngShow`, `ngHide`, `ngView` and `ngClass`. Custom directives can take advantage of animation
+ * by using the `$animate` service.
+ *
+ * Below is a more detailed breakdown of the supported animation events provided by pre-existing ng directives:
+ *
+ * | Directive                                                 | Supported Animations                               |
+ * |---------------------------------------------------------- |----------------------------------------------------|
+ * | {@link ng.directive:ngRepeat#usage_animations ngRepeat}         | enter, leave and move                              |
+ * | {@link ngRoute.directive:ngView#usage_animations ngView}        | enter and leave                                    |
+ * | {@link ng.directive:ngInclude#usage_animations ngInclude}       | enter and leave                                    |
+ * | {@link ng.directive:ngSwitch#usage_animations ngSwitch}         | enter and leave                                    |
+ * | {@link ng.directive:ngIf#usage_animations ngIf}                 | enter and leave                                    |
+ * | {@link ng.directive:ngClass#usage_animations ngClass}           | add and remove                                     |
+ * | {@link ng.directive:ngShow#usage_animations ngShow & ngHide}    | add and remove (the ng-hide class value)           |
+ *
+ * You can find out more information about animations upon visiting each directive page.
+ *
+ * Below is an example of how to apply animations to a directive that supports animation hooks:
+ *
+ * <pre>
+ * <style type="text/css">
+ * .slide.ng-enter, .slide.ng-leave {
+ *   -webkit-transition:0.5s linear all;
+ *   transition:0.5s linear all;
+ * }
+ *
+ * .slide.ng-enter { }        /&#42; starting animations for enter &#42;/
+ * .slide.ng-enter-active { } /&#42; terminal animations for enter &#42;/
+ * .slide.ng-leave { }        /&#42; starting animations for leave &#42;/
+ * .slide.ng-leave-active { } /&#42; terminal animations for leave &#42;/
+ * </style>
+ *
+ * <!--
+ * the animate service will automatically add .ng-enter and .ng-leave to the element
+ * to trigger the CSS transition/animations
+ * -->
+ * <ANY class="slide" ng-include="..."></ANY>
+ * </pre>
+ *
+ * Keep in mind that if an animation is running, any child elements cannot be animated until the parent element's
+ * animation has completed.
+ *
+ * <h2>CSS-defined Animations</h2>
+ * The animate service will automatically apply two CSS classes to the animated element and these two CSS classes
+ * are designed to contain the start and end CSS styling. Both CSS transitions and keyframe animations are supported
+ * and can be used to play along with this naming structure.
+ *
+ * The following code below demonstrates how to perform animations using **CSS transitions** with Angular:
+ *
+ * <pre>
+ * <style type="text/css">
+ * /&#42;
+ *  The animate class is apart of the element and the ng-enter class
+ *  is attached to the element once the enter animation event is triggered
+ * &#42;/
+ * .reveal-animation.ng-enter {
+ *  -webkit-transition: 1s linear all; /&#42; Safari/Chrome &#42;/
+ *  transition: 1s linear all; /&#42; All other modern browsers and IE10+ &#42;/
+ *
+ *  /&#42; The animation preparation code &#42;/
+ *  opacity: 0;
+ * }
+ *
+ * /&#42;
+ *  Keep in mind that you want to combine both CSS
+ *  classes together to avoid any CSS-specificity
+ *  conflicts
+ * &#42;/
+ * .reveal-animation.ng-enter.ng-enter-active {
+ *  /&#42; The animation code itself &#42;/
+ *  opacity: 1;
+ * }
+ * </style>
+ *
+ * <div class="view-container">
+ *   <div ng-view class="reveal-animation"></div>
+ * </div>
+ * </pre>
+ *
+ * The following code below demonstrates how to perform animations using **CSS animations** with Angular:
+ *
+ * <pre>
+ * <style type="text/css">
+ * .reveal-animation.ng-enter {
+ *   -webkit-animation: enter_sequence 1s linear; /&#42; Safari/Chrome &#42;/
+ *   animation: enter_sequence 1s linear; /&#42; IE10+ and Future Browsers &#42;/
+ * }
+ * &#64-webkit-keyframes enter_sequence {
+ *   from { opacity:0; }
+ *   to { opacity:1; }
+ * }
+ * &#64keyframes enter_sequence {
+ *   from { opacity:0; }
+ *   to { opacity:1; }
+ * }
+ * </style>
+ *
+ * <div class="view-container">
+ *   <div ng-view class="reveal-animation"></div>
+ * </div>
+ * </pre>
+ *
+ * Both CSS3 animations and transitions can be used together and the animate service will figure out the correct duration and delay timing.
+ *
+ * Upon DOM mutation, the event class is added first (something like `ng-enter`), then the browser prepares itself to add
+ * the active class (in this case `ng-enter-active`) which then triggers the animation. The animation module will automatically
+ * detect the CSS code to determine when the animation ends. Once the animation is over then both CSS classes will be
+ * removed from the DOM. If a browser does not support CSS transitions or CSS animations then the animation will start and end
+ * immediately resulting in a DOM element that is at its final state. This final state is when the DOM element
+ * has no CSS transition/animation classes applied to it.
+ *
+ * <h3>CSS Staggering Animations</h3>
+ * A Staggering animation is a collection of animations that are issued with a slight delay in between each successive operation resulting in a
+ * curtain-like effect. The ngAnimate module, as of 1.2.0, supports staggering animations and the stagger effect can be
+ * performed by creating a **ng-EVENT-stagger** CSS class and attaching that class to the base CSS class used for
+ * the animation. The style property expected within the stagger class can either be a **transition-delay** or an
+ * **animation-delay** property (or both if your animation contains both transitions and keyframe animations).
+ *
+ * <pre>
+ * .my-animation.ng-enter {
+ *   /&#42; standard transition code &#42;/
+ *   -webkit-transition: 1s linear all;
+ *   transition: 1s linear all;
+ *   opacity:0;
+ * }
+ * .my-animation.ng-enter-stagger {
+ *   /&#42; this will have a 100ms delay between each successive leave animation &#42;/
+ *   -webkit-transition-delay: 0.1s;
+ *   transition-delay: 0.1s;
+ *
+ *   /&#42; in case the stagger doesn't work then these two values
+ *    must be set to 0 to avoid an accidental CSS inheritance &#42;/
+ *   -webkit-transition-duration: 0s;
+ *   transition-duration: 0s;
+ * }
+ * .my-animation.ng-enter.ng-enter-active {
+ *   /&#42; standard transition styles &#42;/
+ *   opacity:1;
+ * }
+ * </pre>
+ *
+ * Staggering animations work by default in ngRepeat (so long as the CSS class is defined). Outside of ngRepeat, to use staggering animations
+ * on your own, they can be triggered by firing multiple calls to the same event on $animate. However, the restrictions surrounding this
+ * are that each of the elements must have the same CSS className value as well as the same parent element. A stagger operation
+ * will also be reset if more than 10ms has passed after the last animation has been fired.
+ *
+ * The following code will issue the **ng-leave-stagger** event on the element provided:
+ *
+ * <pre>
+ * var kids = parent.children();
+ *
+ * $animate.leave(kids[0]); //stagger index=0
+ * $animate.leave(kids[1]); //stagger index=1
+ * $animate.leave(kids[2]); //stagger index=2
+ * $animate.leave(kids[3]); //stagger index=3
+ * $animate.leave(kids[4]); //stagger index=4
+ *
+ * $timeout(function() {
+ *   //stagger has reset itself
+ *   $animate.leave(kids[5]); //stagger index=0
+ *   $animate.leave(kids[6]); //stagger index=1
+ * }, 100, false);
+ * </pre>
+ *
+ * Stagger animations are currently only supported within CSS-defined animations.
+ *
+ * <h2>JavaScript-defined Animations</h2>
+ * In the event that you do not want to use CSS3 transitions or CSS3 animations or if you wish to offer animations on browsers that do not
+ * yet support CSS transitions/animations, then you can make use of JavaScript animations defined inside of your AngularJS module.
+ *
+ * <pre>
+ * //!annotate="YourApp" Your AngularJS Module|Replace this or ngModule with the module that you used to define your application.
+ * var ngModule = angular.module('YourApp', ['ngAnimate']);
+ * ngModule.animation('.my-crazy-animation', function() {
+ *   return {
+ *     enter: function(element, done) {
+ *       //run the animation here and call done when the animation is complete
+ *       return function(cancelled) {
+ *         //this (optional) function will be called when the animation
+ *         //completes or when the animation is cancelled (the cancelled
+ *         //flag will be set to true if cancelled).
+ *       };
+ *     },
+ *     leave: function(element, done) { },
+ *     move: function(element, done) { },
+ *
+ *     //animation that can be triggered before the class is added
+ *     beforeAddClass: function(element, className, done) { },
+ *
+ *     //animation that can be triggered after the class is added
+ *     addClass: function(element, className, done) { },
+ *
+ *     //animation that can be triggered before the class is removed
+ *     beforeRemoveClass: function(element, className, done) { },
+ *
+ *     //animation that can be triggered after the class is removed
+ *     removeClass: function(element, className, done) { }
+ *   };
+ * });
+ * </pre>
+ *
+ * JavaScript-defined animations are created with a CSS-like class selector and a collection of events which are set to run
+ * a javascript callback function. When an animation is triggered, $animate will look for a matching animation which fits
+ * the element's CSS class attribute value and then run the matching animation event function (if found).
+ * In other words, if the CSS classes present on the animated element match any of the JavaScript animations then the callback function will
+ * be executed. It should be also noted that only simple, single class selectors are allowed (compound class selectors are not supported).
+ *
+ * Within a JavaScript animation, an object containing various event callback animation functions is expected to be returned.
+ * As explained above, these callbacks are triggered based on the animation event. Therefore if an enter animation is run,
+ * and the JavaScript animation is found, then the enter callback will handle that animation (in addition to the CSS keyframe animation
+ * or transition code that is defined via a stylesheet).
+ *
+ */
+
+angular.module('ngAnimate', ['ng'])
+
+  /**
+   * @ngdoc object
+   * @name ngAnimate.$animateProvider
+   * @description
+   *
+   * The `$animateProvider` allows developers to register JavaScript animation event handlers directly inside of a module.
+   * When an animation is triggered, the $animate service will query the $animate service to find any animations that match
+   * the provided name value.
+   *
+   * Requires the {@link ngAnimate `ngAnimate`} module to be installed.
+   *
+   * Please visit the {@link ngAnimate `ngAnimate`} module overview page learn more about how to use animations in your application.
+   *
+   */
+  .config(['$provide', '$animateProvider', function($provide, $animateProvider) {
+    var noop = angular.noop;
+    var forEach = angular.forEach;
+    var selectors = $animateProvider.$$selectors;
+
+    var ELEMENT_NODE = 1;
+    var NG_ANIMATE_STATE = '$$ngAnimateState';
+    var NG_ANIMATE_CLASS_NAME = 'ng-animate';
+    var rootAnimateState = {running: true};
+
+    function extractElementNode(element) {
+      for(var i = 0; i < element.length; i++) {
+        var elm = element[i];
+        if(elm.nodeType == ELEMENT_NODE) {
+          return elm;
+        }
+      }
+    }
+
+    function isMatchingElement(elm1, elm2) {
+      return extractElementNode(elm1) == extractElementNode(elm2);
+    }
+
+    $provide.decorator('$animate', ['$delegate', '$injector', '$sniffer', '$rootElement', '$timeout', '$rootScope', '$document',
+                            function($delegate,   $injector,   $sniffer,   $rootElement,   $timeout,   $rootScope,   $document) {
+
+      $rootElement.data(NG_ANIMATE_STATE, rootAnimateState);
+
+      // disable animations during bootstrap, but once we bootstrapped, wait again
+      // for another digest until enabling animations. The reason why we digest twice
+      // is because all structural animations (enter, leave and move) all perform a
+      // post digest operation before animating. If we only wait for a single digest
+      // to pass then the structural animation would render its animation on page load.
+      // (which is what we're trying to avoid when the application first boots up.)
+      $rootScope.$$postDigest(function() {
+        $rootScope.$$postDigest(function() {
+          rootAnimateState.running = false;
+        });
+      });
+
+      function lookup(name) {
+        if (name) {
+          var matches = [],
+              flagMap = {},
+              classes = name.substr(1).split('.');
+
+          //the empty string value is the default animation
+          //operation which performs CSS transition and keyframe
+          //animations sniffing. This is always included for each
+          //element animation procedure if the browser supports
+          //transitions and/or keyframe animations
+          if ($sniffer.transitions || $sniffer.animations) {
+            classes.push('');
+          }
+
+          for(var i=0; i < classes.length; i++) {
+            var klass = classes[i],
+                selectorFactoryName = selectors[klass];
+            if(selectorFactoryName && !flagMap[klass]) {
+              matches.push($injector.get(selectorFactoryName));
+              flagMap[klass] = true;
+            }
+          }
+          return matches;
+        }
+      }
+
+      /**
+       * @ngdoc object
+       * @name ngAnimate.$animate
+       * @function
+       *
+       * @description
+       * The `$animate` service provides animation detection support while performing DOM operations (enter, leave and move) as well as during addClass and removeClass operations.
+       * When any of these operations are run, the $animate service
+       * will examine any JavaScript-defined animations (which are defined by using the $animateProvider provider object)
+       * as well as any CSS-defined animations against the CSS classes present on the element once the DOM operation is run.
+       *
+       * The `$animate` service is used behind the scenes with pre-existing directives and animation with these directives
+       * will work out of the box without any extra configuration.
+       *
+       * Requires the {@link ngAnimate `ngAnimate`} module to be installed.
+       *
+       * Please visit the {@link ngAnimate `ngAnimate`} module overview page learn more about how to use animations in your application.
+       *
+       */
+      return {
+        /**
+         * @ngdoc function
+         * @name ngAnimate.$animate#enter
+         * @methodOf ngAnimate.$animate
+         * @function
+         *
+         * @description
+         * Appends the element to the parentElement element that resides in the document and then runs the enter animation. Once
+         * the animation is started, the following CSS classes will be present on the element for the duration of the animation:
+         *
+         * Below is a breakdown of each step that occurs during enter animation:
+         *
+         * | Animation Step                                                                               | What the element class attribute looks like |
+         * |----------------------------------------------------------------------------------------------|---------------------------------------------|
+         * | 1. $animate.enter(...) is called                                                             | class="my-animation"                        |
+         * | 2. element is inserted into the parentElement element or beside the afterElement element     | class="my-animation"                        |
+         * | 3. $animate runs any JavaScript-defined animations on the element                            | class="my-animation ng-animate"             |
+         * | 4. the .ng-enter class is added to the element                                               | class="my-animation ng-animate ng-enter"    |
+         * | 5. $animate scans the element styles to get the CSS transition/animation duration and delay  | class="my-animation ng-animate ng-enter"    |
+         * | 6. $animate waits for 10ms (this performs a reflow)                                          | class="my-animation ng-animate ng-enter"    |
+         * | 7. the .ng-enter-active and .ng-animate-active classes are added (this triggers the CSS transition/animation) | class="my-animation ng-animate ng-animate-active ng-enter ng-enter-active" |
+         * | 8. $animate waits for X milliseconds for the animation to complete                           | class="my-animation ng-animate ng-animate-active ng-enter ng-enter-active" |
+         * | 9. The animation ends and all generated CSS classes are removed from the element             | class="my-animation"                        |
+         * | 10. The doneCallback() callback is fired (if provided)                                       | class="my-animation"                        |
+         *
+         * @param {jQuery/jqLite element} element the element that will be the focus of the enter animation
+         * @param {jQuery/jqLite element} parentElement the parent element of the element that will be the focus of the enter animation
+         * @param {jQuery/jqLite element} afterElement the sibling element (which is the previous element) of the element that will be the focus of the enter animation
+         * @param {function()=} doneCallback the callback function that will be called once the animation is complete
+        */
+        enter : function(element, parentElement, afterElement, doneCallback) {
+          this.enabled(false, element);
+          $delegate.enter(element, parentElement, afterElement);
+          $rootScope.$$postDigest(function() {
+            performAnimation('enter', 'ng-enter', element, parentElement, afterElement, noop, doneCallback);
+          });
+        },
+
+        /**
+         * @ngdoc function
+         * @name ngAnimate.$animate#leave
+         * @methodOf ngAnimate.$animate
+         * @function
+         *
+         * @description
+         * Runs the leave animation operation and, upon completion, removes the element from the DOM. Once
+         * the animation is started, the following CSS classes will be added for the duration of the animation:
+         *
+         * Below is a breakdown of each step that occurs during leave animation:
+         *
+         * | Animation Step                                                                               | What the element class attribute looks like |
+         * |----------------------------------------------------------------------------------------------|---------------------------------------------|
+         * | 1. $animate.leave(...) is called                                                             | class="my-animation"                        |
+         * | 2. $animate runs any JavaScript-defined animations on the element                            | class="my-animation ng-animate"             |
+         * | 3. the .ng-leave class is added to the element                                               | class="my-animation ng-animate ng-leave"    |
+         * | 4. $animate scans the element styles to get the CSS transition/animation duration and delay  | class="my-animation ng-animate ng-leave"    |
+         * | 5. $animate waits for 10ms (this performs a reflow)                                          | class="my-animation ng-animate ng-leave"    |
+         * | 6. the .ng-leave-active and .ng-animate-active classes is added (this triggers the CSS transition/animation) | class="my-animation ng-animate ng-animate-active ng-leave ng-leave-active" |
+         * | 7. $animate waits for X milliseconds for the animation to complete                           | class="my-animation ng-animate ng-animate-active ng-leave ng-leave-active" |
+         * | 8. The animation ends and all generated CSS classes are removed from the element             | class="my-animation"                        |
+         * | 9. The element is removed from the DOM                                                       | ...                                         |
+         * | 10. The doneCallback() callback is fired (if provided)                                       | ...                                         |
+         *
+         * @param {jQuery/jqLite element} element the element that will be the focus of the leave animation
+         * @param {function()=} doneCallback the callback function that will be called once the animation is complete
+        */
+        leave : function(element, doneCallback) {
+          cancelChildAnimations(element);
+          this.enabled(false, element);
+          $rootScope.$$postDigest(function() {
+            performAnimation('leave', 'ng-leave', element, null, null, function() {
+              $delegate.leave(element);
+            }, doneCallback);
+          });
+        },
+
+        /**
+         * @ngdoc function
+         * @name ngAnimate.$animate#move
+         * @methodOf ngAnimate.$animate
+         * @function
+         *
+         * @description
+         * Fires the move DOM operation. Just before the animation starts, the animate service will either append it into the parentElement container or
+         * add the element directly after the afterElement element if present. Then the move animation will be run. Once
+         * the animation is started, the following CSS classes will be added for the duration of the animation:
+         *
+         * Below is a breakdown of each step that occurs during move animation:
+         *
+         * | Animation Step                                                                               | What the element class attribute looks like |
+         * |----------------------------------------------------------------------------------------------|---------------------------------------------|
+         * | 1. $animate.move(...) is called                                                              | class="my-animation"                        |
+         * | 2. element is moved into the parentElement element or beside the afterElement element        | class="my-animation"                        |
+         * | 3. $animate runs any JavaScript-defined animations on the element                            | class="my-animation ng-animate"             |
+         * | 4. the .ng-move class is added to the element                                                | class="my-animation ng-animate ng-move"     |
+         * | 5. $animate scans the element styles to get the CSS transition/animation duration and delay  | class="my-animation ng-animate ng-move"     |
+         * | 6. $animate waits for 10ms (this performs a reflow)                                          | class="my-animation ng-animate ng-move"     |
+         * | 7. the .ng-move-active and .ng-animate-active classes is added (this triggers the CSS transition/animation) | class="my-animation ng-animate ng-animate-active ng-move ng-move-active" |
+         * | 8. $animate waits for X milliseconds for the animation to complete                           | class="my-animation ng-animate ng-animate-active ng-move ng-move-active" |
+         * | 9. The animation ends and all generated CSS classes are removed from the element             | class="my-animation"                        |
+         * | 10. The doneCallback() callback is fired (if provided)                                       | class="my-animation"                        |
+         *
+         * @param {jQuery/jqLite element} element the element that will be the focus of the move animation
+         * @param {jQuery/jqLite element} parentElement the parentElement element of the element that will be the focus of the move animation
+         * @param {jQuery/jqLite element} afterElement the sibling element (which is the previous element) of the element that will be the focus of the move animation
+         * @param {function()=} doneCallback the callback function that will be called once the animation is complete
+        */
+        move : function(element, parentElement, afterElement, doneCallback) {
+          cancelChildAnimations(element);
+          this.enabled(false, element);
+          $delegate.move(element, parentElement, afterElement);
+          $rootScope.$$postDigest(function() {
+            performAnimation('move', 'ng-move', element, parentElement, afterElement, noop, doneCallback);
+          });
+        },
+
+        /**
+         * @ngdoc function
+         * @name ngAnimate.$animate#addClass
+         * @methodOf ngAnimate.$animate
+         *
+         * @description
+         * Triggers a custom animation event based off the className variable and then attaches the className value to the element as a CSS class.
+         * Unlike the other animation methods, the animate service will suffix the className value with {@type -add} in order to provide
+         * the animate service the setup and active CSS classes in order to trigger the animation (this will be skipped if no CSS transitions
+         * or keyframes are defined on the -add or base CSS class).
+         *
+         * Below is a breakdown of each step that occurs during addClass animation:
+         *
+         * | Animation Step                                                                                 | What the element class attribute looks like |
+         * |------------------------------------------------------------------------------------------------|---------------------------------------------|
+         * | 1. $animate.addClass(element, 'super') is called                                               | class="my-animation"                        |
+         * | 2. $animate runs any JavaScript-defined animations on the element                              | class="my-animation ng-animate"             |
+         * | 3. the .super-add class are added to the element                                               | class="my-animation ng-animate super-add"   |
+         * | 4. $animate scans the element styles to get the CSS transition/animation duration and delay    | class="my-animation ng-animate super-add"   |
+         * | 5. $animate waits for 10ms (this performs a reflow)                                            | class="my-animation ng-animate super-add"   |
+         * | 6. the .super, .super-add-active and .ng-animate-active classes are added (this triggers the CSS transition/animation) | class="my-animation ng-animate ng-animate-active super super-add super-add-active"          |
+         * | 7. $animate waits for X milliseconds for the animation to complete                             | class="my-animation super-add super-add-active"  |
+         * | 8. The animation ends and all generated CSS classes are removed from the element               | class="my-animation super"                  |
+         * | 9. The super class is kept on the element                                                      | class="my-animation super"                  |
+         * | 10. The doneCallback() callback is fired (if provided)                                         | class="my-animation super"                  |
+         *
+         * @param {jQuery/jqLite element} element the element that will be animated
+         * @param {string} className the CSS class that will be added to the element and then animated
+         * @param {function()=} doneCallback the callback function that will be called once the animation is complete
+        */
+        addClass : function(element, className, doneCallback) {
+          performAnimation('addClass', className, element, null, null, function() {
+            $delegate.addClass(element, className);
+          }, doneCallback);
+        },
+
+        /**
+         * @ngdoc function
+         * @name ngAnimate.$animate#removeClass
+         * @methodOf ngAnimate.$animate
+         *
+         * @description
+         * Triggers a custom animation event based off the className variable and then removes the CSS class provided by the className value
+         * from the element. Unlike the other animation methods, the animate service will suffix the className value with {@type -remove} in
+         * order to provide the animate service the setup and active CSS classes in order to trigger the animation (this will be skipped if
+         * no CSS transitions or keyframes are defined on the -remove or base CSS classes).
+         *
+         * Below is a breakdown of each step that occurs during removeClass animation:
+         *
+         * | Animation Step                                                                                | What the element class attribute looks like     |
+         * |-----------------------------------------------------------------------------------------------|---------------------------------------------|
+         * | 1. $animate.removeClass(element, 'super') is called                                           | class="my-animation super"                  |
+         * | 2. $animate runs any JavaScript-defined animations on the element                             | class="my-animation super ng-animate"       |
+         * | 3. the .super-remove class are added to the element                                           | class="my-animation super ng-animate super-remove"|
+         * | 4. $animate scans the element styles to get the CSS transition/animation duration and delay   | class="my-animation super ng-animate super-remove"   |
+         * | 5. $animate waits for 10ms (this performs a reflow)                                           | class="my-animation super ng-animate super-remove"   |
+         * | 6. the .super-remove-active and .ng-animate-active classes are added and .super is removed (this triggers the CSS transition/animation) | class="my-animation ng-animate ng-animate-active super-remove super-remove-active"          |
+         * | 7. $animate waits for X milliseconds for the animation to complete                            | class="my-animation ng-animate ng-animate-active super-remove super-remove-active"   |
+         * | 8. The animation ends and all generated CSS classes are removed from the element              | class="my-animation"                        |
+         * | 9. The doneCallback() callback is fired (if provided)                                         | class="my-animation"                        |
+         *
+         *
+         * @param {jQuery/jqLite element} element the element that will be animated
+         * @param {string} className the CSS class that will be animated and then removed from the element
+         * @param {function()=} doneCallback the callback function that will be called once the animation is complete
+        */
+        removeClass : function(element, className, doneCallback) {
+          performAnimation('removeClass', className, element, null, null, function() {
+            $delegate.removeClass(element, className);
+          }, doneCallback);
+        },
+
+        /**
+         * @ngdoc function
+         * @name ngAnimate.$animate#enabled
+         * @methodOf ngAnimate.$animate
+         * @function
+         *
+         * @param {boolean=} value If provided then set the animation on or off.
+         * @param {jQuery/jqLite element=} element If provided then the element will be used to represent the enable/disable operation
+         * @return {boolean} Current animation state.
+         *
+         * @description
+         * Globally enables/disables animations.
+         *
+        */
+        enabled : function(value, element) {
+          switch(arguments.length) {
+            case 2:
+              if(value) {
+                cleanup(element);
+              } else {
+                var data = element.data(NG_ANIMATE_STATE) || {};
+                data.disabled = true;
+                element.data(NG_ANIMATE_STATE, data);
+              }
+            break;
+
+            case 1:
+              rootAnimateState.disabled = !value;
+            break;
+
+            default:
+              value = !rootAnimateState.disabled;
+            break;
+          }
+          return !!value;
+         }
+      };
+
+      /*
+        all animations call this shared animation triggering function internally.
+        The animationEvent variable refers to the JavaScript animation event that will be triggered
+        and the className value is the name of the animation that will be applied within the
+        CSS code. Element, parentElement and afterElement are provided DOM elements for the animation
+        and the onComplete callback will be fired once the animation is fully complete.
+      */
+      function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, doneCallback) {
+        var node = extractElementNode(element);
+        //transcluded directives may sometimes fire an animation using only comment nodes
+        //best to catch this early on to prevent any animation operations from occurring
+        if(!node) {
+          fireDOMOperation();
+          closeAnimation();
+          return;
+        }
+
+        var currentClassName = node.className;
+        var classes = currentClassName + ' ' + className;
+        var animationLookup = (' ' + classes).replace(/\s+/g,'.');
+        if (!parentElement) {
+          parentElement = afterElement ? afterElement.parent() : element.parent();
+        }
+
+        var matches = lookup(animationLookup);
+        var isClassBased = animationEvent == 'addClass' || animationEvent == 'removeClass';
+        var ngAnimateState = element.data(NG_ANIMATE_STATE) || {};
+
+        //skip the animation if animations are disabled, a parent is already being animated,
+        //the element is not currently attached to the document body or then completely close
+        //the animation if any matching animations are not found at all.
+        //NOTE: IE8 + IE9 should close properly (run closeAnimation()) in case a NO animation is not found.
+        if (animationsDisabled(element, parentElement) || matches.length === 0) {
+          fireDOMOperation();
+          closeAnimation();
+          return;
+        }
+
+        var animations = [];
+        //only add animations if the currently running animation is not structural
+        //or if there is no animation running at all
+        if(!ngAnimateState.running || !(isClassBased && ngAnimateState.structural)) {
+          forEach(matches, function(animation) {
+            //add the animation to the queue to if it is allowed to be cancelled
+            if(!animation.allowCancel || animation.allowCancel(element, animationEvent, className)) {
+              var beforeFn, afterFn = animation[animationEvent];
+
+              //Special case for a leave animation since there is no point in performing an
+              //animation on a element node that has already been removed from the DOM
+              if(animationEvent == 'leave') {
+                beforeFn = afterFn;
+                afterFn = null; //this must be falsy so that the animation is skipped for leave
+              } else {
+                beforeFn = animation['before' + animationEvent.charAt(0).toUpperCase() + animationEvent.substr(1)];
+              }
+              animations.push({
+                before : beforeFn,
+                after : afterFn
+              });
+            }
+          });
+        }
+
+        //this would mean that an animation was not allowed so let the existing
+        //animation do it's thing and close this one early
+        if(animations.length === 0) {
+          fireDOMOperation();
+          fireDoneCallbackAsync();
+          return;
+        }
+
+        //this value will be searched for class-based CSS className lookup. Therefore,
+        //we prefix and suffix the current className value with spaces to avoid substring
+        //lookups of className tokens
+        var futureClassName = ' ' + currentClassName + ' ';
+        if(ngAnimateState.running) {
+          //if an animation is currently running on the element then lets take the steps
+          //to cancel that animation and fire any required callbacks
+          $timeout.cancel(ngAnimateState.closeAnimationTimeout);
+          cleanup(element);
+          cancelAnimations(ngAnimateState.animations);
+
+          //if the class is removed during the reflow then it will revert the styles temporarily
+          //back to the base class CSS styling causing a jump-like effect to occur. This check
+          //here ensures that the domOperation is only performed after the reflow has commenced
+          if(ngAnimateState.beforeComplete) {
+            (ngAnimateState.done || noop)(true);
+          } else if(isClassBased && !ngAnimateState.structural) {
+            //class-based animations will compare element className values after cancelling the
+            //previous animation to see if the element properties already contain the final CSS
+            //class and if so then the animation will be skipped. Since the domOperation will
+            //be performed only after the reflow is complete then our element's className value
+            //will be invalid. Therefore the same string manipulation that would occur within the
+            //DOM operation will be performed below so that the class comparison is valid...
+            futureClassName = ngAnimateState.event == 'removeClass' ?
+              futureClassName.replace(ngAnimateState.className, '') :
+              futureClassName + ngAnimateState.className + ' ';
+          }
+        }
+
+        //There is no point in perform a class-based animation if the element already contains
+        //(on addClass) or doesn't contain (on removeClass) the className being animated.
+        //The reason why this is being called after the previous animations are cancelled
+        //is so that the CSS classes present on the element can be properly examined.
+        var classNameToken = ' ' + className + ' ';
+        if((animationEvent == 'addClass'    && futureClassName.indexOf(classNameToken) >= 0) ||
+           (animationEvent == 'removeClass' && futureClassName.indexOf(classNameToken) == -1)) {
+          fireDOMOperation();
+          fireDoneCallbackAsync();
+          return;
+        }
+
+        //the ng-animate class does nothing, but it's here to allow for
+        //parent animations to find and cancel child animations when needed
+        element.addClass(NG_ANIMATE_CLASS_NAME);
+
+        element.data(NG_ANIMATE_STATE, {
+          running:true,
+          event:animationEvent,
+          className:className,
+          structural:!isClassBased,
+          animations:animations,
+          done:onBeforeAnimationsComplete
+        });
+
+        //first we run the before animations and when all of those are complete
+        //then we perform the DOM operation and run the next set of animations
+        invokeRegisteredAnimationFns(animations, 'before', onBeforeAnimationsComplete);
+
+        function onBeforeAnimationsComplete(cancelled) {
+          fireDOMOperation();
+          if(cancelled === true) {
+            closeAnimation();
+            return;
+          }
+
+          //set the done function to the final done function
+          //so that the DOM event won't be executed twice by accident
+          //if the after animation is cancelled as well
+          var data = element.data(NG_ANIMATE_STATE);
+          if(data) {
+            data.done = closeAnimation;
+            element.data(NG_ANIMATE_STATE, data);
+          }
+          invokeRegisteredAnimationFns(animations, 'after', closeAnimation);
+        }
+
+        function invokeRegisteredAnimationFns(animations, phase, allAnimationFnsComplete) {
+          var endFnName = phase + 'End';
+          forEach(animations, function(animation, index) {
+            var animationPhaseCompleted = function() {
+              progress(index, phase);
+            };
+
+            //there are no before functions for enter + move since the DOM
+            //operations happen before the performAnimation method fires
+            if(phase == 'before' && (animationEvent == 'enter' || animationEvent == 'move')) {
+              animationPhaseCompleted();
+              return;
+            }
+
+            if(animation[phase]) {
+              animation[endFnName] = isClassBased ?
+                animation[phase](element, className, animationPhaseCompleted) :
+                animation[phase](element, animationPhaseCompleted);
+            } else {
+              animationPhaseCompleted();
+            }
+          });
+
+          function progress(index, phase) {
+            var phaseCompletionFlag = phase + 'Complete';
+            var currentAnimation = animations[index];
+            currentAnimation[phaseCompletionFlag] = true;
+            (currentAnimation[endFnName] || noop)();
+
+            for(var i=0;i<animations.length;i++) {
+              if(!animations[i][phaseCompletionFlag]) return;
+            }
+
+            allAnimationFnsComplete();
+          }
+        }
+
+        function fireDoneCallbackAsync() {
+          doneCallback && $timeout(doneCallback, 0, false);
+        }
+
+        //it is less complicated to use a flag than managing and cancelling
+        //timeouts containing multiple callbacks.
+        function fireDOMOperation() {
+          if(!fireDOMOperation.hasBeenRun) {
+            fireDOMOperation.hasBeenRun = true;
+            domOperation();
+          }
+        }
+
+        function closeAnimation() {
+          if(!closeAnimation.hasBeenRun) {
+            closeAnimation.hasBeenRun = true;
+            var data = element.data(NG_ANIMATE_STATE);
+            if(data) {
+              /* only structural animations wait for reflow before removing an
+                 animation, but class-based animations don't. An example of this
+                 failing would be when a parent HTML tag has a ng-class attribute
+                 causing ALL directives below to skip animations during the digest */
+              if(isClassBased) {
+                cleanup(element);
+              } else {
+                data.closeAnimationTimeout = $timeout(function() {
+                  cleanup(element);
+                }, 0, false);
+                element.data(NG_ANIMATE_STATE, data);
+              }
+            }
+            fireDoneCallbackAsync();
+          }
+        }
+      }
+
+      function cancelChildAnimations(element) {
+        var node = extractElementNode(element);
+        forEach(node.querySelectorAll('.' + NG_ANIMATE_CLASS_NAME), function(element) {
+          element = angular.element(element);
+          var data = element.data(NG_ANIMATE_STATE);
+          if(data) {
+            cancelAnimations(data.animations);
+            cleanup(element);
+          }
+        });
+      }
+
+      function cancelAnimations(animations) {
+        var isCancelledFlag = true;
+        forEach(animations, function(animation) {
+          if(!animations.beforeComplete) {
+            (animation.beforeEnd || noop)(isCancelledFlag);
+          }
+          if(!animations.afterComplete) {
+            (animation.afterEnd || noop)(isCancelledFlag);
+          }
+        });
+      }
+
+      function cleanup(element) {
+        if(isMatchingElement(element, $rootElement)) {
+          if(!rootAnimateState.disabled) {
+            rootAnimateState.running = false;
+            rootAnimateState.structural = false;
+          }
+        } else {
+          element.removeClass(NG_ANIMATE_CLASS_NAME);
+          element.removeData(NG_ANIMATE_STATE);
+        }
+      }
+
+      function animationsDisabled(element, parentElement) {
+        if (rootAnimateState.disabled) return true;
+
+        if(isMatchingElement(element, $rootElement)) {
+          return rootAnimateState.disabled || rootAnimateState.running;
+        }
+
+        do {
+          //the element did not reach the root element which means that it
+          //is not apart of the DOM. Therefore there is no reason to do
+          //any animations on it
+          if(parentElement.length === 0) break;
+
+          var isRoot = isMatchingElement(parentElement, $rootElement);
+          var state = isRoot ? rootAnimateState : parentElement.data(NG_ANIMATE_STATE);
+          var result = state && (!!state.disabled || !!state.running);
+          if(isRoot || result) {
+            return result;
+          }
+
+          if(isRoot) return true;
+        }
+        while(parentElement = parentElement.parent());
+
+        return true;
+      }
+    }]);
+
+    $animateProvider.register('', ['$window', '$sniffer', '$timeout', function($window, $sniffer, $timeout) {
+      // Detect proper transitionend/animationend event names.
+      var CSS_PREFIX = '', TRANSITION_PROP, TRANSITIONEND_EVENT, ANIMATION_PROP, ANIMATIONEND_EVENT;
+
+      // If unprefixed events are not supported but webkit-prefixed are, use the latter.
+      // Otherwise, just use W3C names, browsers not supporting them at all will just ignore them.
+      // Note: Chrome implements `window.onwebkitanimationend` and doesn't implement `window.onanimationend`
+      // but at the same time dispatches the `animationend` event and not `webkitAnimationEnd`.
+      // Register both events in case `window.onanimationend` is not supported because of that,
+      // do the same for `transitionend` as Safari is likely to exhibit similar behavior.
+      // Also, the only modern browser that uses vendor prefixes for transitions/keyframes is webkit
+      // therefore there is no reason to test anymore for other vendor prefixes: http://caniuse.com/#search=transition
+      if (window.ontransitionend === undefined && window.onwebkittransitionend !== undefined) {
+        CSS_PREFIX = '-webkit-';
+        TRANSITION_PROP = 'WebkitTransition';
+        TRANSITIONEND_EVENT = 'webkitTransitionEnd transitionend';
+      } else {
+        TRANSITION_PROP = 'transition';
+        TRANSITIONEND_EVENT = 'transitionend';
+      }
+
+      if (window.onanimationend === undefined && window.onwebkitanimationend !== undefined) {
+        CSS_PREFIX = '-webkit-';
+        ANIMATION_PROP = 'WebkitAnimation';
+        ANIMATIONEND_EVENT = 'webkitAnimationEnd animationend';
+      } else {
+        ANIMATION_PROP = 'animation';
+        ANIMATIONEND_EVENT = 'animationend';
+      }
+
+      var DURATION_KEY = 'Duration';
+      var PROPERTY_KEY = 'Property';
+      var DELAY_KEY = 'Delay';
+      var ANIMATION_ITERATION_COUNT_KEY = 'IterationCount';
+      var NG_ANIMATE_PARENT_KEY = '$$ngAnimateKey';
+      var NG_ANIMATE_CSS_DATA_KEY = '$$ngAnimateCSS3Data';
+      var NG_ANIMATE_FALLBACK_CLASS_NAME = 'ng-animate-start';
+      var NG_ANIMATE_FALLBACK_ACTIVE_CLASS_NAME = 'ng-animate-active';
+      var ELAPSED_TIME_MAX_DECIMAL_PLACES = 3;
+
+      var lookupCache = {};
+      var parentCounter = 0;
+
+      var animationReflowQueue = [], animationTimer, timeOut = false;
+      function afterReflow(callback) {
+        animationReflowQueue.push(callback);
+        $timeout.cancel(animationTimer);
+        animationTimer = $timeout(function() {
+          forEach(animationReflowQueue, function(fn) {
+            fn();
+          });
+          animationReflowQueue = [];
+          animationTimer = null;
+          lookupCache = {};
+        }, 10, false);
+      }
+
+      function getElementAnimationDetails(element, cacheKey) {
+        var data = cacheKey ? lookupCache[cacheKey] : null;
+        if(!data) {
+          var transitionDuration = 0;
+          var transitionDelay = 0;
+          var animationDuration = 0;
+          var animationDelay = 0;
+          var transitionDelayStyle;
+          var animationDelayStyle;
+          var transitionDurationStyle;
+          var transitionPropertyStyle;
+
+          //we want all the styles defined before and after
+          forEach(element, function(element) {
+            if (element.nodeType == ELEMENT_NODE) {
+              var elementStyles = $window.getComputedStyle(element) || {};
+
+              transitionDurationStyle = elementStyles[TRANSITION_PROP + DURATION_KEY];
+
+              transitionDuration = Math.max(parseMaxTime(transitionDurationStyle), transitionDuration);
+
+              transitionPropertyStyle = elementStyles[TRANSITION_PROP + PROPERTY_KEY];
+
+              transitionDelayStyle = elementStyles[TRANSITION_PROP + DELAY_KEY];
+
+              transitionDelay  = Math.max(parseMaxTime(transitionDelayStyle), transitionDelay);
+
+              animationDelayStyle = elementStyles[ANIMATION_PROP + DELAY_KEY];
+
+              animationDelay   = Math.max(parseMaxTime(animationDelayStyle), animationDelay);
+
+              var aDuration  = parseMaxTime(elementStyles[ANIMATION_PROP + DURATION_KEY]);
+
+              if(aDuration > 0) {
+                aDuration *= parseInt(elementStyles[ANIMATION_PROP + ANIMATION_ITERATION_COUNT_KEY], 10) || 1;
+              }
+
+              animationDuration = Math.max(aDuration, animationDuration);
+            }
+          });
+          data = {
+            total : 0,
+            transitionPropertyStyle: transitionPropertyStyle,
+            transitionDurationStyle: transitionDurationStyle,
+            transitionDelayStyle: transitionDelayStyle,
+            transitionDelay: transitionDelay,
+            transitionDuration: transitionDuration,
+            animationDelayStyle: animationDelayStyle,
+            animationDelay: animationDelay,
+            animationDuration: animationDuration
+          };
+          if(cacheKey) {
+            lookupCache[cacheKey] = data;
+          }
+        }
+        return data;
+      }
+
+      function parseMaxTime(str) {
+        var maxValue = 0;
+        var values = angular.isString(str) ?
+          str.split(/\s*,\s*/) :
+          [];
+        forEach(values, function(value) {
+          maxValue = Math.max(parseFloat(value) || 0, maxValue);
+        });
+        return maxValue;
+      }
+
+      function getCacheKey(element) {
+        var parentElement = element.parent();
+        var parentID = parentElement.data(NG_ANIMATE_PARENT_KEY);
+        if(!parentID) {
+          parentElement.data(NG_ANIMATE_PARENT_KEY, ++parentCounter);
+          parentID = parentCounter;
+        }
+        return parentID + '-' + extractElementNode(element).className;
+      }
+
+      function animateSetup(element, className) {
+        var cacheKey = getCacheKey(element);
+        var eventCacheKey = cacheKey + ' ' + className;
+        var stagger = {};
+        var ii = lookupCache[eventCacheKey] ? ++lookupCache[eventCacheKey].total : 0;
+
+        if(ii > 0) {
+          var staggerClassName = className + '-stagger';
+          var staggerCacheKey = cacheKey + ' ' + staggerClassName;
+          var applyClasses = !lookupCache[staggerCacheKey];
+
+          applyClasses && element.addClass(staggerClassName);
+
+          stagger = getElementAnimationDetails(element, staggerCacheKey);
+
+          applyClasses && element.removeClass(staggerClassName);
+        }
+
+        element.addClass(className);
+
+        var timings = getElementAnimationDetails(element, eventCacheKey);
+
+        /* there is no point in performing a reflow if the animation
+           timeout is empty (this would cause a flicker bug normally
+           in the page. There is also no point in performing an animation
+           that only has a delay and no duration */
+        var maxDuration = Math.max(timings.transitionDuration, timings.animationDuration);
+        if(maxDuration === 0) {
+          element.removeClass(className);
+          return false;
+        }
+
+        //temporarily disable the transition so that the enter styles
+        //don't animate twice (this is here to avoid a bug in Chrome/FF).
+        var activeClassName = '';
+        if(timings.transitionDuration > 0) {
+          element.addClass(NG_ANIMATE_FALLBACK_CLASS_NAME);
+          activeClassName += NG_ANIMATE_FALLBACK_ACTIVE_CLASS_NAME + ' ';
+          blockTransitions(element);
+        } else {
+          blockKeyframeAnimations(element);
+        }
+
+        forEach(className.split(' '), function(klass, i) {
+          activeClassName += (i > 0 ? ' ' : '') + klass + '-active';
+        });
+
+        element.data(NG_ANIMATE_CSS_DATA_KEY, {
+          className : className,
+          activeClassName : activeClassName,
+          maxDuration : maxDuration,
+          classes : className + ' ' + activeClassName,
+          timings : timings,
+          stagger : stagger,
+          ii : ii
+        });
+
+        return true;
+      }
+
+      function blockTransitions(element) {
+        extractElementNode(element).style[TRANSITION_PROP + PROPERTY_KEY] = 'none';
+      }
+
+      function blockKeyframeAnimations(element) {
+        extractElementNode(element).style[ANIMATION_PROP] = 'none 0s';
+      }
+
+      function unblockTransitions(element) {
+        var prop = TRANSITION_PROP + PROPERTY_KEY;
+        var node = extractElementNode(element);
+        if(node.style[prop] && node.style[prop].length > 0) {
+          node.style[prop] = '';
+        }
+      }
+
+      function unblockKeyframeAnimations(element) {
+        var prop = ANIMATION_PROP;
+        var node = extractElementNode(element);
+        if(node.style[prop] && node.style[prop].length > 0) {
+          node.style[prop] = '';
+        }
+      }
+
+      function animateRun(element, className, activeAnimationComplete) {
+        var data = element.data(NG_ANIMATE_CSS_DATA_KEY);
+        var node = extractElementNode(element);
+        if(node.className.indexOf(className) == -1 || !data) {
+          activeAnimationComplete();
+          return;
+        }
+
+        var timings = data.timings;
+        var stagger = data.stagger;
+        var maxDuration = data.maxDuration;
+        var activeClassName = data.activeClassName;
+        var maxDelayTime = Math.max(timings.transitionDelay, timings.animationDelay) * 1000;
+        var startTime = Date.now();
+        var css3AnimationEvents = ANIMATIONEND_EVENT + ' ' + TRANSITIONEND_EVENT;
+        var ii = data.ii;
+
+        var applyFallbackStyle, style = '', appliedStyles = [];
+        if(timings.transitionDuration > 0) {
+          var propertyStyle = timings.transitionPropertyStyle;
+          if(propertyStyle.indexOf('all') == -1) {
+            applyFallbackStyle = true;
+            var fallbackProperty = $sniffer.msie ? '-ms-zoom' : 'border-spacing';
+            style += CSS_PREFIX + 'transition-property: ' + propertyStyle + ', ' + fallbackProperty + '; ';
+            style += CSS_PREFIX + 'transition-duration: ' + timings.transitionDurationStyle + ', ' + timings.transitionDuration + 's; ';
+            appliedStyles.push(CSS_PREFIX + 'transition-property');
+            appliedStyles.push(CSS_PREFIX + 'transition-duration');
+          }
+        }
+
+        if(ii > 0) {
+          if(stagger.transitionDelay > 0 && stagger.transitionDuration === 0) {
+            var delayStyle = timings.transitionDelayStyle;
+            if(applyFallbackStyle) {
+              delayStyle += ', ' + timings.transitionDelay + 's';
+            }
+
+            style += CSS_PREFIX + 'transition-delay: ' +
+                     prepareStaggerDelay(delayStyle, stagger.transitionDelay, ii) + '; ';
+            appliedStyles.push(CSS_PREFIX + 'transition-delay');
+          }
+
+          if(stagger.animationDelay > 0 && stagger.animationDuration === 0) {
+            style += CSS_PREFIX + 'animation-delay: ' +
+                     prepareStaggerDelay(timings.animationDelayStyle, stagger.animationDelay, ii) + '; ';
+            appliedStyles.push(CSS_PREFIX + 'animation-delay');
+          }
+        }
+
+        if(appliedStyles.length > 0) {
+          //the element being animated may sometimes contain comment nodes in
+          //the jqLite object, so we're safe to use a single variable to house
+          //the styles since there is always only one element being animated
+          var oldStyle = node.getAttribute('style') || '';
+          node.setAttribute('style', oldStyle + ' ' + style);
+        }
+
+        element.on(css3AnimationEvents, onAnimationProgress);
+        element.addClass(activeClassName);
+
+        // This will automatically be called by $animate so
+        // there is no need to attach this internally to the
+        // timeout done method.
+        return function onEnd(cancelled) {
+          element.off(css3AnimationEvents, onAnimationProgress);
+          element.removeClass(activeClassName);
+          animateClose(element, className);
+          var node = extractElementNode(element);
+          for (var i in appliedStyles) {
+            node.style.removeProperty(appliedStyles[i]);
+          }
+        };
+
+        function onAnimationProgress(event) {
+          event.stopPropagation();
+          var ev = event.originalEvent || event;
+          var timeStamp = ev.$manualTimeStamp || ev.timeStamp || Date.now();
+          
+          /* Firefox (or possibly just Gecko) likes to not round values up
+           * when a ms measurement is used for the animation */
+          var elapsedTime = parseFloat(ev.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES));
+
+          /* $manualTimeStamp is a mocked timeStamp value which is set
+           * within browserTrigger(). This is only here so that tests can
+           * mock animations properly. Real events fallback to event.timeStamp,
+           * or, if they don't, then a timeStamp is automatically created for them.
+           * We're checking to see if the timeStamp surpasses the expected delay,
+           * but we're using elapsedTime instead of the timeStamp on the 2nd
+           * pre-condition since animations sometimes close off early */
+          if(Math.max(timeStamp - startTime, 0) >= maxDelayTime && elapsedTime >= maxDuration) {
+            activeAnimationComplete();
+          }
+        }
+      }
+
+      function prepareStaggerDelay(delayStyle, staggerDelay, index) {
+        var style = '';
+        forEach(delayStyle.split(','), function(val, i) {
+          style += (i > 0 ? ',' : '') +
+                   (index * staggerDelay + parseInt(val, 10)) + 's';
+        });
+        return style;
+      }
+
+      function animateBefore(element, className) {
+        if(animateSetup(element, className)) {
+          return function(cancelled) {
+            cancelled && animateClose(element, className);
+          };
+        }
+      }
+
+      function animateAfter(element, className, afterAnimationComplete) {
+        if(element.data(NG_ANIMATE_CSS_DATA_KEY)) {
+          return animateRun(element, className, afterAnimationComplete);
+        } else {
+          animateClose(element, className);
+          afterAnimationComplete();
+        }
+      }
+
+      function animate(element, className, animationComplete) {
+        //If the animateSetup function doesn't bother returning a
+        //cancellation function then it means that there is no animation
+        //to perform at all
+        var preReflowCancellation = animateBefore(element, className);
+        if(!preReflowCancellation) {
+          animationComplete();
+          return;
+        }
+
+        //There are two cancellation functions: one is before the first
+        //reflow animation and the second is during the active state
+        //animation. The first function will take care of removing the
+        //data from the element which will not make the 2nd animation
+        //happen in the first place
+        var cancel = preReflowCancellation;
+        afterReflow(function() {
+          unblockTransitions(element);
+          unblockKeyframeAnimations(element);
+          //once the reflow is complete then we point cancel to
+          //the new cancellation function which will remove all of the
+          //animation properties from the active animation
+          cancel = animateAfter(element, className, animationComplete);
+        });
+
+        return function(cancelled) {
+          (cancel || noop)(cancelled);
+        };
+      }
+
+      function animateClose(element, className) {
+        element.removeClass(className);
+        element.removeClass(NG_ANIMATE_FALLBACK_CLASS_NAME);
+        element.removeData(NG_ANIMATE_CSS_DATA_KEY);
+      }
+
+      return {
+        allowCancel : function(element, animationEvent, className) {
+          //always cancel the current animation if it is a
+          //structural animation
+          var oldClasses = (element.data(NG_ANIMATE_CSS_DATA_KEY) || {}).classes;
+          if(!oldClasses || ['enter','leave','move'].indexOf(animationEvent) >= 0) {
+            return true;
+          }
+
+          var parentElement = element.parent();
+          var clone = angular.element(extractElementNode(element).cloneNode());
+
+          //make the element super hidden and override any CSS style values
+          clone.attr('style','position:absolute; top:-9999px; left:-9999px');
+          clone.removeAttr('id');
+          clone.empty();
+
+          forEach(oldClasses.split(' '), function(klass) {
+            clone.removeClass(klass);
+          });
+
+          var suffix = animationEvent == 'addClass' ? '-add' : '-remove';
+          clone.addClass(suffixClasses(className, suffix));
+          parentElement.append(clone);
+
+          var timings = getElementAnimationDetails(clone);
+          clone.remove();
+
+          return Math.max(timings.transitionDuration, timings.animationDuration) > 0;
+        },
+
+        enter : function(element, animationCompleted) {
+          return animate(element, 'ng-enter', animationCompleted);
+        },
+
+        leave : function(element, animationCompleted) {
+          return animate(element, 'ng-leave', animationCompleted);
+        },
+
+        move : function(element, animationCompleted) {
+          return animate(element, 'ng-move', animationCompleted);
+        },
+
+        beforeAddClass : function(element, className, animationCompleted) {
+          var cancellationMethod = animateBefore(element, suffixClasses(className, '-add'));
+          if(cancellationMethod) {
+            afterReflow(function() {
+              unblockTransitions(element);
+              unblockKeyframeAnimations(element);
+              animationCompleted();
+            });
+            return cancellationMethod;
+          }
+          animationCompleted();
+        },
+
+        addClass : function(element, className, animationCompleted) {
+          return animateAfter(element, suffixClasses(className, '-add'), animationCompleted);
+        },
+
+        beforeRemoveClass : function(element, className, animationCompleted) {
+          var cancellationMethod = animateBefore(element, suffixClasses(className, '-remove'));
+          if(cancellationMethod) {
+            afterReflow(function() {
+              unblockTransitions(element);
+              unblockKeyframeAnimations(element);
+              animationCompleted();
+            });
+            return cancellationMethod;
+          }
+          animationCompleted();
+        },
+
+        removeClass : function(element, className, animationCompleted) {
+          return animateAfter(element, suffixClasses(className, '-remove'), animationCompleted);
+        }
+      };
+
+      function suffixClasses(classes, suffix) {
+        var className = '';
+        classes = angular.isArray(classes) ? classes : classes.split(/\s+/);
+        forEach(classes, function(klass, i) {
+          if(klass && klass.length > 0) {
+            className += (i > 0 ? ' ' : '') + klass + suffix;
+          }
+        });
+        return className;
+      }
+    }]);
+  }]);
+
+
+})(window, window.angular);


[08/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/bootstrap/custom/css/bootstrap.css
----------------------------------------------------------------------
diff --git a/portal/js/libs/bootstrap/custom/css/bootstrap.css b/portal/js/libs/bootstrap/custom/css/bootstrap.css
new file mode 100755
index 0000000..0e465de
--- /dev/null
+++ b/portal/js/libs/bootstrap/custom/css/bootstrap.css
@@ -0,0 +1,6315 @@
+/*!
+ * Bootstrap v2.3.2
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */
+.clearfix {
+  *zoom: 1;
+}
+.clearfix:before,
+.clearfix:after {
+  display: table;
+  content: "";
+  line-height: 0;
+}
+.clearfix:after {
+  clear: both;
+}
+.hide-text {
+  font: 0/0 a;
+  color: transparent;
+  text-shadow: none;
+  background-color: transparent;
+  border: 0;
+}
+.input-block-level {
+  display: block;
+  width: 100%;
+  min-height: 30px;
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+}
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+nav,
+section {
+  display: block;
+}
+audio,
+canvas,
+video {
+  display: inline-block;
+  *display: inline;
+  *zoom: 1;
+}
+audio:not([controls]) {
+  display: none;
+}
+html {
+  font-size: 100%;
+  -webkit-text-size-adjust: 100%;
+  -ms-text-size-adjust: 100%;
+}
+a:focus {
+  outline: thin dotted #333;
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
+}
+a:hover,
+a:active {
+  outline: 0;
+}
+sub,
+sup {
+  position: relative;
+  font-size: 75%;
+  line-height: 0;
+  vertical-align: baseline;
+}
+sup {
+  top: -0.5em;
+}
+sub {
+  bottom: -0.25em;
+}
+img {
+  /* Responsive images (ensure images don't scale beyond their parents) */
+
+  max-width: 100%;
+  /* Part 1: Set a maxium relative to the parent */
+
+  width: auto\9;
+  /* IE7-8 need help adjusting responsive images */
+
+  height: auto;
+  /* Part 2: Scale the height according to the width, otherwise you get stretching */
+
+  vertical-align: middle;
+  border: 0;
+  -ms-interpolation-mode: bicubic;
+}
+#map_canvas img,
+.google-maps img {
+  max-width: none;
+}
+button,
+input,
+select,
+textarea {
+  margin: 0;
+  font-size: 100%;
+  vertical-align: middle;
+}
+button,
+input {
+  *overflow: visible;
+  line-height: normal;
+}
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+  padding: 0;
+  border: 0;
+}
+button,
+html input[type="button"],
+input[type="reset"],
+input[type="submit"] {
+  -webkit-appearance: button;
+  cursor: pointer;
+}
+label,
+select,
+button,
+input[type="button"],
+input[type="reset"],
+input[type="submit"],
+input[type="radio"],
+input[type="checkbox"] {
+  cursor: pointer;
+}
+input[type="search"] {
+  -webkit-box-sizing: content-box;
+  -moz-box-sizing: content-box;
+  box-sizing: content-box;
+  -webkit-appearance: textfield;
+}
+input[type="search"]::-webkit-search-decoration,
+input[type="search"]::-webkit-search-cancel-button {
+  -webkit-appearance: none;
+}
+textarea {
+  overflow: auto;
+  vertical-align: top;
+}
+@media print {
+  * {
+    text-shadow: none !important;
+    color: #000 !important;
+    background: transparent !important;
+    box-shadow: none !important;
+  }
+  a,
+  a:visited {
+    text-decoration: underline;
+  }
+  a[href]:after {
+    content: " (" attr(href) ")";
+  }
+  abbr[title]:after {
+    content: " (" attr(title) ")";
+  }
+  .ir a:after,
+  a[href^="javascript:"]:after,
+  a[href^="#"]:after {
+    content: "";
+  }
+  pre,
+  blockquote {
+    border: 1px solid #999;
+    page-break-inside: avoid;
+  }
+  thead {
+    display: table-header-group;
+  }
+  tr,
+  img {
+    page-break-inside: avoid;
+  }
+  img {
+    max-width: 100% !important;
+  }
+  @page  {
+    margin: 0.5cm;
+  }
+  p,
+  h2,
+  h3 {
+    orphans: 3;
+    widows: 3;
+  }
+  h2,
+  h3 {
+    page-break-after: avoid;
+  }
+}
+body {
+  margin: 0;
+  font-family: marquette-light, 'Helvetica Neue', Helvetica, Arial, sans-serif;
+  font-size: 14px;
+  line-height: 20px;
+  color: #333333;
+  background-color: #ffffff;
+}
+a {
+  color: #0088cc;
+  text-decoration: none;
+}
+a:hover,
+a:focus {
+  color: #005580;
+  text-decoration: underline;
+}
+.img-rounded {
+  -webkit-border-radius: 6px;
+  -moz-border-radius: 6px;
+  border-radius: 6px;
+}
+.img-polaroid {
+  padding: 4px;
+  background-color: #fff;
+  border: 1px solid #ccc;
+  border: 1px solid rgba(0, 0, 0, 0.2);
+  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+}
+.img-circle {
+  -webkit-border-radius: 500px;
+  -moz-border-radius: 500px;
+  border-radius: 500px;
+}
+.row {
+  margin-left: -20px;
+  *zoom: 1;
+}
+.row:before,
+.row:after {
+  display: table;
+  content: "";
+  line-height: 0;
+}
+.row:after {
+  clear: both;
+}
+[class*="span"] {
+  float: left;
+  min-height: 1px;
+  margin-left: 20px;
+}
+.container,
+.navbar-static-top .container,
+.navbar-fixed-top .container,
+.navbar-fixed-bottom .container {
+  width: 940px;
+}
+.span12 {
+  width: 940px;
+}
+.span11 {
+  width: 860px;
+}
+.span10 {
+  width: 780px;
+}
+.span9 {
+  width: 700px;
+}
+.span8 {
+  width: 620px;
+}
+.span7 {
+  width: 540px;
+}
+.span6 {
+  width: 460px;
+}
+.span5 {
+  width: 380px;
+}
+.span4 {
+  width: 300px;
+}
+.span3 {
+  width: 220px;
+}
+.span2 {
+  width: 140px;
+}
+.span1 {
+  width: 60px;
+}
+.offset12 {
+  margin-left: 980px;
+}
+.offset11 {
+  margin-left: 900px;
+}
+.offset10 {
+  margin-left: 820px;
+}
+.offset9 {
+  margin-left: 740px;
+}
+.offset8 {
+  margin-left: 660px;
+}
+.offset7 {
+  margin-left: 580px;
+}
+.offset6 {
+  margin-left: 500px;
+}
+.offset5 {
+  margin-left: 420px;
+}
+.offset4 {
+  margin-left: 340px;
+}
+.offset3 {
+  margin-left: 260px;
+}
+.offset2 {
+  margin-left: 180px;
+}
+.offset1 {
+  margin-left: 100px;
+}
+.row-fluid {
+  width: 100%;
+  *zoom: 1;
+}
+.row-fluid:before,
+.row-fluid:after {
+  display: table;
+  content: "";
+  line-height: 0;
+}
+.row-fluid:after {
+  clear: both;
+}
+.row-fluid [class*="span"] {
+  display: block;
+  width: 100%;
+  min-height: 30px;
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+  float: left;
+  margin-left: 2.127659574468085%;
+  *margin-left: 2.074468085106383%;
+}
+.row-fluid [class*="span"]:first-child {
+  margin-left: 0;
+}
+.row-fluid .controls-row [class*="span"] + [class*="span"] {
+  margin-left: 2.127659574468085%;
+}
+.row-fluid .span12 {
+  width: 100%;
+  *width: 99.94680851063829%;
+}
+.row-fluid .span11 {
+  width: 91.48936170212765%;
+  *width: 91.43617021276594%;
+}
+.row-fluid .span10 {
+  width: 82.97872340425532%;
+  *width: 82.92553191489361%;
+}
+.row-fluid .span9 {
+  width: 74.46808510638297%;
+  *width: 74.41489361702126%;
+}
+.row-fluid .span8 {
+  width: 65.95744680851064%;
+  *width: 65.90425531914893%;
+}
+.row-fluid .span7 {
+  width: 57.44680851063829%;
+  *width: 57.39361702127659%;
+}
+.row-fluid .span6 {
+  width: 48.93617021276595%;
+  *width: 48.88297872340425%;
+}
+.row-fluid .span5 {
+  width: 40.42553191489362%;
+  *width: 40.37234042553192%;
+}
+.row-fluid .span4 {
+  width: 31.914893617021278%;
+  *width: 31.861702127659576%;
+}
+.row-fluid .span3 {
+  width: 23.404255319148934%;
+  *width: 23.351063829787233%;
+}
+.row-fluid .span2 {
+  width: 14.893617021276595%;
+  *width: 14.840425531914894%;
+}
+.row-fluid .span1 {
+  width: 6.382978723404255%;
+  *width: 6.329787234042553%;
+}
+.row-fluid .offset12 {
+  margin-left: 104.25531914893617%;
+  *margin-left: 104.14893617021275%;
+}
+.row-fluid .offset12:first-child {
+  margin-left: 102.12765957446808%;
+  *margin-left: 102.02127659574467%;
+}
+.row-fluid .offset11 {
+  margin-left: 95.74468085106382%;
+  *margin-left: 95.6382978723404%;
+}
+.row-fluid .offset11:first-child {
+  margin-left: 93.61702127659574%;
+  *margin-left: 93.51063829787232%;
+}
+.row-fluid .offset10 {
+  margin-left: 87.23404255319149%;
+  *margin-left: 87.12765957446807%;
+}
+.row-fluid .offset10:first-child {
+  margin-left: 85.1063829787234%;
+  *margin-left: 84.99999999999999%;
+}
+.row-fluid .offset9 {
+  margin-left: 78.72340425531914%;
+  *margin-left: 78.61702127659572%;
+}
+.row-fluid .offset9:first-child {
+  margin-left: 76.59574468085106%;
+  *margin-left: 76.48936170212764%;
+}
+.row-fluid .offset8 {
+  margin-left: 70.2127659574468%;
+  *margin-left: 70.10638297872339%;
+}
+.row-fluid .offset8:first-child {
+  margin-left: 68.08510638297872%;
+  *margin-left: 67.9787234042553%;
+}
+.row-fluid .offset7 {
+  margin-left: 61.70212765957446%;
+  *margin-left: 61.59574468085106%;
+}
+.row-fluid .offset7:first-child {
+  margin-left: 59.574468085106375%;
+  *margin-left: 59.46808510638297%;
+}
+.row-fluid .offset6 {
+  margin-left: 53.191489361702125%;
+  *margin-left: 53.085106382978715%;
+}
+.row-fluid .offset6:first-child {
+  margin-left: 51.063829787234035%;
+  *margin-left: 50.95744680851063%;
+}
+.row-fluid .offset5 {
+  margin-left: 44.68085106382979%;
+  *margin-left: 44.57446808510638%;
+}
+.row-fluid .offset5:first-child {
+  margin-left: 42.5531914893617%;
+  *margin-left: 42.4468085106383%;
+}
+.row-fluid .offset4 {
+  margin-left: 36.170212765957444%;
+  *margin-left: 36.06382978723405%;
+}
+.row-fluid .offset4:first-child {
+  margin-left: 34.04255319148936%;
+  *margin-left: 33.93617021276596%;
+}
+.row-fluid .offset3 {
+  margin-left: 27.659574468085104%;
+  *margin-left: 27.5531914893617%;
+}
+.row-fluid .offset3:first-child {
+  margin-left: 25.53191489361702%;
+  *margin-left: 25.425531914893618%;
+}
+.row-fluid .offset2 {
+  margin-left: 19.148936170212764%;
+  *margin-left: 19.04255319148936%;
+}
+.row-fluid .offset2:first-child {
+  margin-left: 17.02127659574468%;
+  *margin-left: 16.914893617021278%;
+}
+.row-fluid .offset1 {
+  margin-left: 10.638297872340425%;
+  *margin-left: 10.53191489361702%;
+}
+.row-fluid .offset1:first-child {
+  margin-left: 8.51063829787234%;
+  *margin-left: 8.404255319148938%;
+}
+[class*="span"].hide,
+.row-fluid [class*="span"].hide {
+  display: none;
+}
+[class*="span"].pull-right,
+.row-fluid [class*="span"].pull-right {
+  float: right;
+}
+.container {
+  margin-right: auto;
+  margin-left: auto;
+  *zoom: 1;
+}
+.container:before,
+.container:after {
+  display: table;
+  content: "";
+  line-height: 0;
+}
+.container:after {
+  clear: both;
+}
+.container-fluid {
+  padding-right: 20px;
+  padding-left: 20px;
+  *zoom: 1;
+}
+.container-fluid:before,
+.container-fluid:after {
+  display: table;
+  content: "";
+  line-height: 0;
+}
+.container-fluid:after {
+  clear: both;
+}
+p {
+  margin: 0 0 10px;
+}
+.lead {
+  margin-bottom: 20px;
+  font-size: 21px;
+  font-weight: 200;
+  line-height: 30px;
+}
+small {
+  font-size: 85%;
+}
+strong {
+  font-weight: bold;
+}
+em {
+  font-style: italic;
+}
+cite {
+  font-style: normal;
+}
+.muted {
+  color: #999999;
+}
+a.muted:hover,
+a.muted:focus {
+  color: #808080;
+}
+.text-warning {
+  color: #c09853;
+}
+a.text-warning:hover,
+a.text-warning:focus {
+  color: #a47e3c;
+}
+.text-error {
+  color: #b94a48;
+}
+a.text-error:hover,
+a.text-error:focus {
+  color: #953b39;
+}
+.text-info {
+  color: #3a87ad;
+}
+a.text-info:hover,
+a.text-info:focus {
+  color: #2d6987;
+}
+.text-success {
+  color: #468847;
+}
+a.text-success:hover,
+a.text-success:focus {
+  color: #356635;
+}
+.text-left {
+  text-align: left;
+}
+.text-right {
+  text-align: right;
+}
+.text-center {
+  text-align: center;
+}
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+  margin: 10px 0;
+  font-family: inherit;
+  font-weight: bold;
+  line-height: 20px;
+  color: inherit;
+  text-rendering: optimizelegibility;
+}
+h1 small,
+h2 small,
+h3 small,
+h4 small,
+h5 small,
+h6 small {
+  font-weight: normal;
+  line-height: 1;
+  color: #999999;
+}
+h1,
+h2,
+h3 {
+  line-height: 40px;
+}
+h1 {
+  font-size: 38.5px;
+}
+h2 {
+  font-size: 31.5px;
+}
+h3 {
+  font-size: 24.5px;
+}
+h4 {
+  font-size: 17.5px;
+}
+h5 {
+  font-size: 14px;
+}
+h6 {
+  font-size: 11.9px;
+}
+h1 small {
+  font-size: 24.5px;
+}
+h2 small {
+  font-size: 17.5px;
+}
+h3 small {
+  font-size: 14px;
+}
+h4 small {
+  font-size: 14px;
+}
+.page-header {
+  padding-bottom: 9px;
+  margin: 20px 0 30px;
+  border-bottom: 1px solid #eeeeee;
+}
+ul,
+ol {
+  padding: 0;
+  margin: 0 0 10px 25px;
+}
+ul ul,
+ul ol,
+ol ol,
+ol ul {
+  margin-bottom: 0;
+}
+li {
+  line-height: 20px;
+}
+ul.unstyled,
+ol.unstyled {
+  margin-left: 0;
+  list-style: none;
+}
+ul.inline,
+ol.inline {
+  margin-left: 0;
+  list-style: none;
+}
+ul.inline > li,
+ol.inline > li {
+  display: inline-block;
+  *display: inline;
+  /* IE7 inline-block hack */
+
+  *zoom: 1;
+  padding-left: 5px;
+  padding-right: 5px;
+}
+dl {
+  margin-bottom: 20px;
+}
+dt,
+dd {
+  line-height: 20px;
+}
+dt {
+  font-weight: bold;
+}
+dd {
+  margin-left: 10px;
+}
+.dl-horizontal {
+  *zoom: 1;
+}
+.dl-horizontal:before,
+.dl-horizontal:after {
+  display: table;
+  content: "";
+  line-height: 0;
+}
+.dl-horizontal:after {
+  clear: both;
+}
+.dl-horizontal dt {
+  float: left;
+  width: 160px;
+  clear: left;
+  text-align: right;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+.dl-horizontal dd {
+  margin-left: 180px;
+}
+hr {
+  margin: 20px 0;
+  border: 0;
+  border-top: 1px solid #eeeeee;
+  border-bottom: 1px solid #ffffff;
+}
+abbr[title],
+abbr[data-original-title] {
+  cursor: help;
+  border-bottom: 1px dotted #999999;
+}
+abbr.initialism {
+  font-size: 90%;
+  text-transform: uppercase;
+}
+blockquote {
+  padding: 0 0 0 15px;
+  margin: 0 0 20px;
+  border-left: 5px solid #eeeeee;
+}
+blockquote p {
+  margin-bottom: 0;
+  font-size: 17.5px;
+  font-weight: 300;
+  line-height: 1.25;
+}
+blockquote small {
+  display: block;
+  line-height: 20px;
+  color: #999999;
+}
+blockquote small:before {
+  content: '\2014 \00A0';
+}
+blockquote.pull-right {
+  float: right;
+  padding-right: 15px;
+  padding-left: 0;
+  border-right: 5px solid #eeeeee;
+  border-left: 0;
+}
+blockquote.pull-right p,
+blockquote.pull-right small {
+  text-align: right;
+}
+blockquote.pull-right small:before {
+  content: '';
+}
+blockquote.pull-right small:after {
+  content: '\00A0 \2014';
+}
+q:before,
+q:after,
+blockquote:before,
+blockquote:after {
+  content: "";
+}
+address {
+  display: block;
+  margin-bottom: 20px;
+  font-style: normal;
+  line-height: 20px;
+}
+code,
+pre {
+  padding: 0 3px 2px;
+  font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
+  font-size: 12px;
+  color: #333333;
+  -webkit-border-radius: 3px;
+  -moz-border-radius: 3px;
+  border-radius: 3px;
+}
+code {
+  padding: 2px 4px;
+  color: #d14;
+  background-color: #f7f7f9;
+  border: 1px solid #e1e1e8;
+  white-space: nowrap;
+}
+pre {
+  display: block;
+  padding: 9.5px;
+  margin: 0 0 10px;
+  font-size: 13px;
+  line-height: 20px;
+  word-break: break-all;
+  word-wrap: break-word;
+  white-space: pre;
+  white-space: pre-wrap;
+  background-color: #f5f5f5;
+  border: 1px solid #ccc;
+  border: 1px solid rgba(0, 0, 0, 0.15);
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+pre.prettyprint {
+  margin-bottom: 20px;
+}
+pre code {
+  padding: 0;
+  color: inherit;
+  white-space: pre;
+  white-space: pre-wrap;
+  background-color: transparent;
+  border: 0;
+}
+.pre-scrollable {
+  max-height: 340px;
+  overflow-y: scroll;
+}
+.label,
+.badge {
+  display: inline-block;
+  padding: 2px 4px;
+  font-size: 11.844px;
+  font-weight: bold;
+  line-height: 14px;
+  color: #ffffff;
+  vertical-align: baseline;
+  white-space: nowrap;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #999999;
+}
+.label {
+  -webkit-border-radius: 3px;
+  -moz-border-radius: 3px;
+  border-radius: 3px;
+}
+.badge {
+  padding-left: 9px;
+  padding-right: 9px;
+  -webkit-border-radius: 9px;
+  -moz-border-radius: 9px;
+  border-radius: 9px;
+}
+.label:empty,
+.badge:empty {
+  display: none;
+}
+a.label:hover,
+a.label:focus,
+a.badge:hover,
+a.badge:focus {
+  color: #ffffff;
+  text-decoration: none;
+  cursor: pointer;
+}
+.label-important,
+.badge-important {
+  background-color: #b94a48;
+}
+.label-important[href],
+.badge-important[href] {
+  background-color: #953b39;
+}
+.label-warning,
+.badge-warning {
+  background-color: #f89406;
+}
+.label-warning[href],
+.badge-warning[href] {
+  background-color: #c67605;
+}
+.label-success,
+.badge-success {
+  background-color: #468847;
+}
+.label-success[href],
+.badge-success[href] {
+  background-color: #356635;
+}
+.label-info,
+.badge-info {
+  background-color: #3a87ad;
+}
+.label-info[href],
+.badge-info[href] {
+  background-color: #2d6987;
+}
+.label-inverse,
+.badge-inverse {
+  background-color: #333333;
+}
+.label-inverse[href],
+.badge-inverse[href] {
+  background-color: #1a1a1a;
+}
+.btn .label,
+.btn .badge {
+  position: relative;
+  top: -1px;
+}
+.btn-mini .label,
+.btn-mini .badge {
+  top: 0;
+}
+table {
+  max-width: 100%;
+  background-color: transparent;
+  border-collapse: collapse;
+  border-spacing: 0;
+}
+.table {
+  width: 100%;
+  margin-bottom: 20px;
+}
+.table th,
+.table td {
+  padding: 8px;
+  line-height: 20px;
+  text-align: left;
+  vertical-align: top;
+  border-top: 1px solid #dddddd;
+}
+.table th {
+  font-weight: bold;
+}
+.table thead th {
+  vertical-align: bottom;
+}
+.table caption + thead tr:first-child th,
+.table caption + thead tr:first-child td,
+.table colgroup + thead tr:first-child th,
+.table colgroup + thead tr:first-child td,
+.table thead:first-child tr:first-child th,
+.table thead:first-child tr:first-child td {
+  border-top: 0;
+}
+.table tbody + tbody {
+  border-top: 2px solid #dddddd;
+}
+.table .table {
+  background-color: #ffffff;
+}
+.table-condensed th,
+.table-condensed td {
+  padding: 4px 5px;
+}
+.table-bordered {
+  border: 1px solid #dddddd;
+  border-collapse: separate;
+  *border-collapse: collapse;
+  border-left: 0;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+.table-bordered th,
+.table-bordered td {
+  border-left: 1px solid #dddddd;
+}
+.table-bordered caption + thead tr:first-child th,
+.table-bordered caption + tbody tr:first-child th,
+.table-bordered caption + tbody tr:first-child td,
+.table-bordered colgroup + thead tr:first-child th,
+.table-bordered colgroup + tbody tr:first-child th,
+.table-bordered colgroup + tbody tr:first-child td,
+.table-bordered thead:first-child tr:first-child th,
+.table-bordered tbody:first-child tr:first-child th,
+.table-bordered tbody:first-child tr:first-child td {
+  border-top: 0;
+}
+.table-bordered thead:first-child tr:first-child > th:first-child,
+.table-bordered tbody:first-child tr:first-child > td:first-child,
+.table-bordered tbody:first-child tr:first-child > th:first-child {
+  -webkit-border-top-left-radius: 0;
+  -moz-border-radius-topleft: 0;
+  border-top-left-radius: 0;
+}
+.table-bordered thead:first-child tr:first-child > th:last-child,
+.table-bordered tbody:first-child tr:first-child > td:last-child,
+.table-bordered tbody:first-child tr:first-child > th:last-child {
+  -webkit-border-top-right-radius: 0;
+  -moz-border-radius-topright: 0;
+  border-top-right-radius: 0;
+}
+.table-bordered thead:last-child tr:last-child > th:first-child,
+.table-bordered tbody:last-child tr:last-child > td:first-child,
+.table-bordered tbody:last-child tr:last-child > th:first-child,
+.table-bordered tfoot:last-child tr:last-child > td:first-child,
+.table-bordered tfoot:last-child tr:last-child > th:first-child {
+  -webkit-border-bottom-left-radius: 0;
+  -moz-border-radius-bottomleft: 0;
+  border-bottom-left-radius: 0;
+}
+.table-bordered thead:last-child tr:last-child > th:last-child,
+.table-bordered tbody:last-child tr:last-child > td:last-child,
+.table-bordered tbody:last-child tr:last-child > th:last-child,
+.table-bordered tfoot:last-child tr:last-child > td:last-child,
+.table-bordered tfoot:last-child tr:last-child > th:last-child {
+  -webkit-border-bottom-right-radius: 0;
+  -moz-border-radius-bottomright: 0;
+  border-bottom-right-radius: 0;
+}
+.table-bordered tfoot + tbody:last-child tr:last-child td:first-child {
+  -webkit-border-bottom-left-radius: 0;
+  -moz-border-radius-bottomleft: 0;
+  border-bottom-left-radius: 0;
+}
+.table-bordered tfoot + tbody:last-child tr:last-child td:last-child {
+  -webkit-border-bottom-right-radius: 0;
+  -moz-border-radius-bottomright: 0;
+  border-bottom-right-radius: 0;
+}
+.table-bordered caption + thead tr:first-child th:first-child,
+.table-bordered caption + tbody tr:first-child td:first-child,
+.table-bordered colgroup + thead tr:first-child th:first-child,
+.table-bordered colgroup + tbody tr:first-child td:first-child {
+  -webkit-border-top-left-radius: 0;
+  -moz-border-radius-topleft: 0;
+  border-top-left-radius: 0;
+}
+.table-bordered caption + thead tr:first-child th:last-child,
+.table-bordered caption + tbody tr:first-child td:last-child,
+.table-bordered colgroup + thead tr:first-child th:last-child,
+.table-bordered colgroup + tbody tr:first-child td:last-child {
+  -webkit-border-top-right-radius: 0;
+  -moz-border-radius-topright: 0;
+  border-top-right-radius: 0;
+}
+.table-striped tbody > tr:nth-child(odd) > td,
+.table-striped tbody > tr:nth-child(odd) > th {
+  background-color: #f9f9f9;
+}
+.table-hover tbody tr:hover > td,
+.table-hover tbody tr:hover > th {
+  background-color: #f5f5f5;
+}
+table td[class*="span"],
+table th[class*="span"],
+.row-fluid table td[class*="span"],
+.row-fluid table th[class*="span"] {
+  display: table-cell;
+  float: none;
+  margin-left: 0;
+}
+.table td.span1,
+.table th.span1 {
+  float: none;
+  width: 44px;
+  margin-left: 0;
+}
+.table td.span2,
+.table th.span2 {
+  float: none;
+  width: 124px;
+  margin-left: 0;
+}
+.table td.span3,
+.table th.span3 {
+  float: none;
+  width: 204px;
+  margin-left: 0;
+}
+.table td.span4,
+.table th.span4 {
+  float: none;
+  width: 284px;
+  margin-left: 0;
+}
+.table td.span5,
+.table th.span5 {
+  float: none;
+  width: 364px;
+  margin-left: 0;
+}
+.table td.span6,
+.table th.span6 {
+  float: none;
+  width: 444px;
+  margin-left: 0;
+}
+.table td.span7,
+.table th.span7 {
+  float: none;
+  width: 524px;
+  margin-left: 0;
+}
+.table td.span8,
+.table th.span8 {
+  float: none;
+  width: 604px;
+  margin-left: 0;
+}
+.table td.span9,
+.table th.span9 {
+  float: none;
+  width: 684px;
+  margin-left: 0;
+}
+.table td.span10,
+.table th.span10 {
+  float: none;
+  width: 764px;
+  margin-left: 0;
+}
+.table td.span11,
+.table th.span11 {
+  float: none;
+  width: 844px;
+  margin-left: 0;
+}
+.table td.span12,
+.table th.span12 {
+  float: none;
+  width: 924px;
+  margin-left: 0;
+}
+.table tbody tr.success > td {
+  background-color: #dff0d8;
+}
+.table tbody tr.error > td {
+  background-color: #f2dede;
+}
+.table tbody tr.warning > td {
+  background-color: #fcf8e3;
+}
+.table tbody tr.info > td {
+  background-color: #d9edf7;
+}
+.table-hover tbody tr.success:hover > td {
+  background-color: #d0e9c6;
+}
+.table-hover tbody tr.error:hover > td {
+  background-color: #ebcccc;
+}
+.table-hover tbody tr.warning:hover > td {
+  background-color: #faf2cc;
+}
+.table-hover tbody tr.info:hover > td {
+  background-color: #c4e3f3;
+}
+form {
+  margin: 0 0 20px;
+}
+fieldset {
+  padding: 0;
+  margin: 0;
+  border: 0;
+}
+legend {
+  display: block;
+  width: 100%;
+  padding: 0;
+  margin-bottom: 20px;
+  font-size: 21px;
+  line-height: 40px;
+  color: #333333;
+  border: 0;
+  border-bottom: 1px solid #e5e5e5;
+}
+legend small {
+  font-size: 15px;
+  color: #999999;
+}
+label,
+input,
+button,
+select,
+textarea {
+  font-size: 14px;
+  font-weight: normal;
+  line-height: 20px;
+}
+input,
+button,
+select,
+textarea {
+  font-family: marquette-light, 'Helvetica Neue', Helvetica, Arial, sans-serif;
+}
+label {
+  display: block;
+  margin-bottom: 5px;
+}
+select,
+textarea,
+input[type="text"],
+input[type="password"],
+input[type="datetime"],
+input[type="datetime-local"],
+input[type="date"],
+input[type="month"],
+input[type="time"],
+input[type="week"],
+input[type="number"],
+input[type="email"],
+input[type="url"],
+input[type="search"],
+input[type="tel"],
+input[type="color"],
+.uneditable-input {
+  display: inline-block;
+  height: 20px;
+  padding: 4px 6px;
+  margin-bottom: 10px;
+  font-size: 14px;
+  line-height: 20px;
+  color: #555555;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+  vertical-align: middle;
+}
+input,
+textarea,
+.uneditable-input {
+  width: 206px;
+}
+textarea {
+  height: auto;
+}
+textarea,
+input[type="text"],
+input[type="password"],
+input[type="datetime"],
+input[type="datetime-local"],
+input[type="date"],
+input[type="month"],
+input[type="time"],
+input[type="week"],
+input[type="number"],
+input[type="email"],
+input[type="url"],
+input[type="search"],
+input[type="tel"],
+input[type="color"],
+.uneditable-input {
+  background-color: #ffffff;
+  border: 1px solid #cccccc;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  -webkit-transition: border linear .2s, box-shadow linear .2s;
+  -moz-transition: border linear .2s, box-shadow linear .2s;
+  -o-transition: border linear .2s, box-shadow linear .2s;
+  transition: border linear .2s, box-shadow linear .2s;
+}
+textarea:focus,
+input[type="text"]:focus,
+input[type="password"]:focus,
+input[type="datetime"]:focus,
+input[type="datetime-local"]:focus,
+input[type="date"]:focus,
+input[type="month"]:focus,
+input[type="time"]:focus,
+input[type="week"]:focus,
+input[type="number"]:focus,
+input[type="email"]:focus,
+input[type="url"]:focus,
+input[type="search"]:focus,
+input[type="tel"]:focus,
+input[type="color"]:focus,
+.uneditable-input:focus {
+  border-color: rgba(82, 168, 236, 0.8);
+  outline: 0;
+  outline: thin dotted \9;
+  /* IE6-9 */
+
+  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
+  -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
+  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
+}
+input[type="radio"],
+input[type="checkbox"] {
+  margin: 4px 0 0;
+  *margin-top: 0;
+  /* IE7 */
+
+  margin-top: 1px \9;
+  /* IE8-9 */
+
+  line-height: normal;
+}
+input[type="file"],
+input[type="image"],
+input[type="submit"],
+input[type="reset"],
+input[type="button"],
+input[type="radio"],
+input[type="checkbox"] {
+  width: auto;
+}
+select,
+input[type="file"] {
+  height: 30px;
+  /* In IE7, the height of the select element cannot be changed by height, only font-size */
+
+  *margin-top: 4px;
+  /* For IE7, add top margin to align select with labels */
+
+  line-height: 30px;
+}
+select {
+  width: 220px;
+  border: 1px solid #cccccc;
+  background-color: #ffffff;
+}
+select[multiple],
+select[size] {
+  height: auto;
+}
+select:focus,
+input[type="file"]:focus,
+input[type="radio"]:focus,
+input[type="checkbox"]:focus {
+  outline: thin dotted #333;
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
+}
+.uneditable-input,
+.uneditable-textarea {
+  color: #999999;
+  background-color: #fcfcfc;
+  border-color: #cccccc;
+  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
+  -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
+  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
+  cursor: not-allowed;
+}
+.uneditable-input {
+  overflow: hidden;
+  white-space: nowrap;
+}
+.uneditable-textarea {
+  width: auto;
+  height: auto;
+}
+input:-moz-placeholder,
+textarea:-moz-placeholder {
+  color: #999999;
+}
+input:-ms-input-placeholder,
+textarea:-ms-input-placeholder {
+  color: #999999;
+}
+input::-webkit-input-placeholder,
+textarea::-webkit-input-placeholder {
+  color: #999999;
+}
+.radio,
+.checkbox {
+  min-height: 20px;
+  padding-left: 20px;
+}
+.radio input[type="radio"],
+.checkbox input[type="checkbox"] {
+  float: left;
+  margin-left: -20px;
+}
+.controls > .radio:first-child,
+.controls > .checkbox:first-child {
+  padding-top: 5px;
+}
+.radio.inline,
+.checkbox.inline {
+  display: inline-block;
+  padding-top: 5px;
+  margin-bottom: 0;
+  vertical-align: middle;
+}
+.radio.inline + .radio.inline,
+.checkbox.inline + .checkbox.inline {
+  margin-left: 10px;
+}
+.input-mini {
+  width: 60px;
+}
+.input-small {
+  width: 90px;
+}
+.input-medium {
+  width: 150px;
+}
+.input-large {
+  width: 210px;
+}
+.input-xlarge {
+  width: 270px;
+}
+.input-xxlarge {
+  width: 530px;
+}
+input[class*="span"],
+select[class*="span"],
+textarea[class*="span"],
+.uneditable-input[class*="span"],
+.row-fluid input[class*="span"],
+.row-fluid select[class*="span"],
+.row-fluid textarea[class*="span"],
+.row-fluid .uneditable-input[class*="span"] {
+  float: none;
+  margin-left: 0;
+}
+.input-append input[class*="span"],
+.input-append .uneditable-input[class*="span"],
+.input-prepend input[class*="span"],
+.input-prepend .uneditable-input[class*="span"],
+.row-fluid input[class*="span"],
+.row-fluid select[class*="span"],
+.row-fluid textarea[class*="span"],
+.row-fluid .uneditable-input[class*="span"],
+.row-fluid .input-prepend [class*="span"],
+.row-fluid .input-append [class*="span"] {
+  display: inline-block;
+}
+input,
+textarea,
+.uneditable-input {
+  margin-left: 0;
+}
+.controls-row [class*="span"] + [class*="span"] {
+  margin-left: 20px;
+}
+input.span12,
+textarea.span12,
+.uneditable-input.span12 {
+  width: 926px;
+}
+input.span11,
+textarea.span11,
+.uneditable-input.span11 {
+  width: 846px;
+}
+input.span10,
+textarea.span10,
+.uneditable-input.span10 {
+  width: 766px;
+}
+input.span9,
+textarea.span9,
+.uneditable-input.span9 {
+  width: 686px;
+}
+input.span8,
+textarea.span8,
+.uneditable-input.span8 {
+  width: 606px;
+}
+input.span7,
+textarea.span7,
+.uneditable-input.span7 {
+  width: 526px;
+}
+input.span6,
+textarea.span6,
+.uneditable-input.span6 {
+  width: 446px;
+}
+input.span5,
+textarea.span5,
+.uneditable-input.span5 {
+  width: 366px;
+}
+input.span4,
+textarea.span4,
+.uneditable-input.span4 {
+  width: 286px;
+}
+input.span3,
+textarea.span3,
+.uneditable-input.span3 {
+  width: 206px;
+}
+input.span2,
+textarea.span2,
+.uneditable-input.span2 {
+  width: 126px;
+}
+input.span1,
+textarea.span1,
+.uneditable-input.span1 {
+  width: 46px;
+}
+.controls-row {
+  *zoom: 1;
+}
+.controls-row:before,
+.controls-row:after {
+  display: table;
+  content: "";
+  line-height: 0;
+}
+.controls-row:after {
+  clear: both;
+}
+.controls-row [class*="span"],
+.row-fluid .controls-row [class*="span"] {
+  float: left;
+}
+.controls-row .checkbox[class*="span"],
+.controls-row .radio[class*="span"] {
+  padding-top: 5px;
+}
+input[disabled],
+select[disabled],
+textarea[disabled],
+input[readonly],
+select[readonly],
+textarea[readonly] {
+  cursor: not-allowed;
+  background-color: #eeeeee;
+}
+input[type="radio"][disabled],
+input[type="checkbox"][disabled],
+input[type="radio"][readonly],
+input[type="checkbox"][readonly] {
+  background-color: transparent;
+}
+.control-group.warning .control-label,
+.control-group.warning .help-block,
+.control-group.warning .help-inline {
+  color: #c09853;
+}
+.control-group.warning .checkbox,
+.control-group.warning .radio,
+.control-group.warning input,
+.control-group.warning select,
+.control-group.warning textarea {
+  color: #c09853;
+}
+.control-group.warning input,
+.control-group.warning select,
+.control-group.warning textarea {
+  border-color: #c09853;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+.control-group.warning input:focus,
+.control-group.warning select:focus,
+.control-group.warning textarea:focus {
+  border-color: #a47e3c;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+}
+.control-group.warning .input-prepend .add-on,
+.control-group.warning .input-append .add-on {
+  color: #c09853;
+  background-color: #fcf8e3;
+  border-color: #c09853;
+}
+.control-group.error .control-label,
+.control-group.error .help-block,
+.control-group.error .help-inline {
+  color: #b94a48;
+}
+.control-group.error .checkbox,
+.control-group.error .radio,
+.control-group.error input,
+.control-group.error select,
+.control-group.error textarea {
+  color: #b94a48;
+}
+.control-group.error input,
+.control-group.error select,
+.control-group.error textarea {
+  border-color: #b94a48;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+.control-group.error input:focus,
+.control-group.error select:focus,
+.control-group.error textarea:focus {
+  border-color: #953b39;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+}
+.control-group.error .input-prepend .add-on,
+.control-group.error .input-append .add-on {
+  color: #b94a48;
+  background-color: #f2dede;
+  border-color: #b94a48;
+}
+.control-group.success .control-label,
+.control-group.success .help-block,
+.control-group.success .help-inline {
+  color: #468847;
+}
+.control-group.success .checkbox,
+.control-group.success .radio,
+.control-group.success input,
+.control-group.success select,
+.control-group.success textarea {
+  color: #468847;
+}
+.control-group.success input,
+.control-group.success select,
+.control-group.success textarea {
+  border-color: #468847;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+.control-group.success input:focus,
+.control-group.success select:focus,
+.control-group.success textarea:focus {
+  border-color: #356635;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+}
+.control-group.success .input-prepend .add-on,
+.control-group.success .input-append .add-on {
+  color: #468847;
+  background-color: #dff0d8;
+  border-color: #468847;
+}
+.control-group.info .control-label,
+.control-group.info .help-block,
+.control-group.info .help-inline {
+  color: #3a87ad;
+}
+.control-group.info .checkbox,
+.control-group.info .radio,
+.control-group.info input,
+.control-group.info select,
+.control-group.info textarea {
+  color: #3a87ad;
+}
+.control-group.info input,
+.control-group.info select,
+.control-group.info textarea {
+  border-color: #3a87ad;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+.control-group.info input:focus,
+.control-group.info select:focus,
+.control-group.info textarea:focus {
+  border-color: #2d6987;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
+}
+.control-group.info .input-prepend .add-on,
+.control-group.info .input-append .add-on {
+  color: #3a87ad;
+  background-color: #d9edf7;
+  border-color: #3a87ad;
+}
+input:focus:invalid,
+textarea:focus:invalid,
+select:focus:invalid {
+  color: #b94a48;
+  border-color: #ee5f5b;
+}
+input:focus:invalid:focus,
+textarea:focus:invalid:focus,
+select:focus:invalid:focus {
+  border-color: #e9322d;
+  -webkit-box-shadow: 0 0 6px #f8b9b7;
+  -moz-box-shadow: 0 0 6px #f8b9b7;
+  box-shadow: 0 0 6px #f8b9b7;
+}
+.form-actions {
+  padding: 19px 20px 20px;
+  margin-top: 20px;
+  margin-bottom: 20px;
+  background-color: #f5f5f5;
+  border-top: 1px solid #e5e5e5;
+  *zoom: 1;
+}
+.form-actions:before,
+.form-actions:after {
+  display: table;
+  content: "";
+  line-height: 0;
+}
+.form-actions:after {
+  clear: both;
+}
+.help-block,
+.help-inline {
+  color: #595959;
+}
+.help-block {
+  display: block;
+  margin-bottom: 10px;
+}
+.help-inline {
+  display: inline-block;
+  *display: inline;
+  /* IE7 inline-block hack */
+
+  *zoom: 1;
+  vertical-align: middle;
+  padding-left: 5px;
+}
+.input-append,
+.input-prepend {
+  display: inline-block;
+  margin-bottom: 10px;
+  vertical-align: middle;
+  font-size: 0;
+  white-space: nowrap;
+}
+.input-append input,
+.input-prepend input,
+.input-append select,
+.input-prepend select,
+.input-append .uneditable-input,
+.input-prepend .uneditable-input,
+.input-append .dropdown-menu,
+.input-prepend .dropdown-menu,
+.input-append .popover,
+.input-prepend .popover {
+  font-size: 14px;
+}
+.input-append input,
+.input-prepend input,
+.input-append select,
+.input-prepend select,
+.input-append .uneditable-input,
+.input-prepend .uneditable-input {
+  position: relative;
+  margin-bottom: 0;
+  *margin-left: 0;
+  vertical-align: top;
+  -webkit-border-radius: 0 0 0 0;
+  -moz-border-radius: 0 0 0 0;
+  border-radius: 0 0 0 0;
+}
+.input-append input:focus,
+.input-prepend input:focus,
+.input-append select:focus,
+.input-prepend select:focus,
+.input-append .uneditable-input:focus,
+.input-prepend .uneditable-input:focus {
+  z-index: 2;
+}
+.input-append .add-on,
+.input-prepend .add-on {
+  display: inline-block;
+  width: auto;
+  height: 20px;
+  min-width: 16px;
+  padding: 4px 5px;
+  font-size: 14px;
+  font-weight: normal;
+  line-height: 20px;
+  text-align: center;
+  text-shadow: 0 1px 0 #ffffff;
+  background-color: #eeeeee;
+  border: 1px solid #ccc;
+}
+.input-append .add-on,
+.input-prepend .add-on,
+.input-append .btn,
+.input-prepend .btn,
+.input-append .btn-group > .dropdown-toggle,
+.input-prepend .btn-group > .dropdown-toggle {
+  vertical-align: top;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+.input-append .active,
+.input-prepend .active {
+  background-color: #a9dba9;
+  border-color: #46a546;
+}
+.input-prepend .add-on,
+.input-prepend .btn {
+  margin-right: -1px;
+}
+.input-prepend .add-on:first-child,
+.input-prepend .btn:first-child {
+  -webkit-border-radius: 0 0 0 0;
+  -moz-border-radius: 0 0 0 0;
+  border-radius: 0 0 0 0;
+}
+.input-append input,
+.input-append select,
+.input-append .uneditable-input {
+  -webkit-border-radius: 0 0 0 0;
+  -moz-border-radius: 0 0 0 0;
+  border-radius: 0 0 0 0;
+}
+.input-append input + .btn-group .btn:last-child,
+.input-append select + .btn-group .btn:last-child,
+.input-append .uneditable-input + .btn-group .btn:last-child {
+  -webkit-border-radius: 0 0 0 0;
+  -moz-border-radius: 0 0 0 0;
+  border-radius: 0 0 0 0;
+}
+.input-append .add-on,
+.input-append .btn,
+.input-append .btn-group {
+  margin-left: -1px;
+}
+.input-append .add-on:last-child,
+.input-append .btn:last-child,
+.input-append .btn-group:last-child > .dropdown-toggle {
+  -webkit-border-radius: 0 0 0 0;
+  -moz-border-radius: 0 0 0 0;
+  border-radius: 0 0 0 0;
+}
+.input-prepend.input-append input,
+.input-prepend.input-append select,
+.input-prepend.input-append .uneditable-input {
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+.input-prepend.input-append input + .btn-group .btn,
+.input-prepend.input-append select + .btn-group .btn,
+.input-prepend.input-append .uneditable-input + .btn-group .btn {
+  -webkit-border-radius: 0 0 0 0;
+  -moz-border-radius: 0 0 0 0;
+  border-radius: 0 0 0 0;
+}
+.input-prepend.input-append .add-on:first-child,
+.input-prepend.input-append .btn:first-child {
+  margin-right: -1px;
+  -webkit-border-radius: 0 0 0 0;
+  -moz-border-radius: 0 0 0 0;
+  border-radius: 0 0 0 0;
+}
+.input-prepend.input-append .add-on:last-child,
+.input-prepend.input-append .btn:last-child {
+  margin-left: -1px;
+  -webkit-border-radius: 0 0 0 0;
+  -moz-border-radius: 0 0 0 0;
+  border-radius: 0 0 0 0;
+}
+.input-prepend.input-append .btn-group:first-child {
+  margin-left: 0;
+}
+input.search-query {
+  padding-right: 14px;
+  padding-right: 4px \9;
+  padding-left: 14px;
+  padding-left: 4px \9;
+  /* IE7-8 doesn't have border-radius, so don't indent the padding */
+
+  margin-bottom: 0;
+  -webkit-border-radius: 15px;
+  -moz-border-radius: 15px;
+  border-radius: 15px;
+}
+/* Allow for input prepend/append in search forms */
+.form-search .input-append .search-query,
+.form-search .input-prepend .search-query {
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+.form-search .input-append .search-query {
+  -webkit-border-radius: 14px 0 0 14px;
+  -moz-border-radius: 14px 0 0 14px;
+  border-radius: 14px 0 0 14px;
+}
+.form-search .input-append .btn {
+  -webkit-border-radius: 0 14px 14px 0;
+  -moz-border-radius: 0 14px 14px 0;
+  border-radius: 0 14px 14px 0;
+}
+.form-search .input-prepend .search-query {
+  -webkit-border-radius: 0 14px 14px 0;
+  -moz-border-radius: 0 14px 14px 0;
+  border-radius: 0 14px 14px 0;
+}
+.form-search .input-prepend .btn {
+  -webkit-border-radius: 14px 0 0 14px;
+  -moz-border-radius: 14px 0 0 14px;
+  border-radius: 14px 0 0 14px;
+}
+.form-search input,
+.form-inline input,
+.form-horizontal input,
+.form-search textarea,
+.form-inline textarea,
+.form-horizontal textarea,
+.form-search select,
+.form-inline select,
+.form-horizontal select,
+.form-search .help-inline,
+.form-inline .help-inline,
+.form-horizontal .help-inline,
+.form-search .uneditable-input,
+.form-inline .uneditable-input,
+.form-horizontal .uneditable-input,
+.form-search .input-prepend,
+.form-inline .input-prepend,
+.form-horizontal .input-prepend,
+.form-search .input-append,
+.form-inline .input-append,
+.form-horizontal .input-append {
+  display: inline-block;
+  *display: inline;
+  /* IE7 inline-block hack */
+
+  *zoom: 1;
+  margin-bottom: 0;
+  vertical-align: middle;
+}
+.form-search .hide,
+.form-inline .hide,
+.form-horizontal .hide {
+  display: none;
+}
+.form-search label,
+.form-inline label,
+.form-search .btn-group,
+.form-inline .btn-group {
+  display: inline-block;
+}
+.form-search .input-append,
+.form-inline .input-append,
+.form-search .input-prepend,
+.form-inline .input-prepend {
+  margin-bottom: 0;
+}
+.form-search .radio,
+.form-search .checkbox,
+.form-inline .radio,
+.form-inline .checkbox {
+  padding-left: 0;
+  margin-bottom: 0;
+  vertical-align: middle;
+}
+.form-search .radio input[type="radio"],
+.form-search .checkbox input[type="checkbox"],
+.form-inline .radio input[type="radio"],
+.form-inline .checkbox input[type="checkbox"] {
+  float: left;
+  margin-right: 3px;
+  margin-left: 0;
+}
+.control-group {
+  margin-bottom: 10px;
+}
+legend + .control-group {
+  margin-top: 20px;
+  -webkit-margin-top-collapse: separate;
+}
+.form-horizontal .control-group {
+  margin-bottom: 20px;
+  *zoom: 1;
+}
+.form-horizontal .control-group:before,
+.form-horizontal .control-group:after {
+  display: table;
+  content: "";
+  line-height: 0;
+}
+.form-horizontal .control-group:after {
+  clear: both;
+}
+.form-horizontal .control-label {
+  float: left;
+  width: 160px;
+  padding-top: 5px;
+  text-align: right;
+}
+.form-horizontal .controls {
+  *display: inline-block;
+  *padding-left: 20px;
+  margin-left: 180px;
+  *margin-left: 0;
+}
+.form-horizontal .controls:first-child {
+  *padding-left: 180px;
+}
+.form-horizontal .help-block {
+  margin-bottom: 0;
+}
+.form-horizontal input + .help-block,
+.form-horizontal select + .help-block,
+.form-horizontal textarea + .help-block,
+.form-horizontal .uneditable-input + .help-block,
+.form-horizontal .input-prepend + .help-block,
+.form-horizontal .input-append + .help-block {
+  margin-top: 10px;
+}
+.form-horizontal .form-actions {
+  padding-left: 180px;
+}
+.btn {
+  display: inline-block;
+  *display: inline;
+  /* IE7 inline-block hack */
+
+  *zoom: 1;
+  padding: 4px 12px;
+  margin-bottom: 0;
+  font-size: 14px;
+  line-height: 20px;
+  text-align: center;
+  vertical-align: middle;
+  cursor: pointer;
+  color: #333333;
+  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+  background-color: #f5f5f5;
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
+  background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
+  border-color: #e6e6e6 #e6e6e6 #bfbfbf;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  *background-color: #e6e6e6;
+  /* Darken IE7 buttons by default so they stand out more given they won't have borders */
+
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  border: 1px solid #cccccc;
+  *border: 0;
+  border-bottom-color: #b3b3b3;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+  *margin-left: .3em;
+  -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
+  -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
+  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
+}
+.btn:hover,
+.btn:focus,
+.btn:active,
+.btn.active,
+.btn.disabled,
+.btn[disabled] {
+  color: #333333;
+  background-color: #e6e6e6;
+  *background-color: #d9d9d9;
+}
+.btn:active,
+.btn.active {
+  background-color: #cccccc \9;
+}
+.btn:first-child {
+  *margin-left: 0;
+}
+.btn:hover,
+.btn:focus {
+  color: #333333;
+  text-decoration: none;
+  background-position: 0 -15px;
+  -webkit-transition: background-position 0.1s linear;
+  -moz-transition: background-position 0.1s linear;
+  -o-transition: background-position 0.1s linear;
+  transition: background-position 0.1s linear;
+}
+.btn:focus {
+  outline: thin dotted #333;
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
+}
+.btn.active,
+.btn:active {
+  background-image: none;
+  outline: 0;
+  -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
+  -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
+  box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
+}
+.btn.disabled,
+.btn[disabled] {
+  cursor: default;
+  background-image: none;
+  opacity: 0.65;
+  filter: alpha(opacity=65);
+  -webkit-box-shadow: none;
+  -moz-box-shadow: none;
+  box-shadow: none;
+}
+.btn-large {
+  padding: 11px 19px;
+  font-size: 17.5px;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+.btn-large [class^="icon-"],
+.btn-large [class*=" icon-"] {
+  margin-top: 4px;
+}
+.btn-small {
+  padding: 2px 10px;
+  font-size: 11.9px;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+.btn-small [class^="icon-"],
+.btn-small [class*=" icon-"] {
+  margin-top: 0;
+}
+.btn-mini [class^="icon-"],
+.btn-mini [class*=" icon-"] {
+  margin-top: -1px;
+}
+.btn-mini {
+  padding: 0 6px;
+  font-size: 10.5px;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+.btn-block {
+  display: block;
+  width: 100%;
+  padding-left: 0;
+  padding-right: 0;
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+}
+.btn-block + .btn-block {
+  margin-top: 5px;
+}
+input[type="submit"].btn-block,
+input[type="reset"].btn-block,
+input[type="button"].btn-block {
+  width: 100%;
+}
+.btn-primary.active,
+.btn-warning.active,
+.btn-danger.active,
+.btn-success.active,
+.btn-info.active,
+.btn-inverse.active {
+  color: rgba(255, 255, 255, 0.75);
+}
+.btn-primary {
+  color: #ffffff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #006dcc;
+  background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
+  background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
+  background-image: -o-linear-gradient(top, #0088cc, #0044cc);
+  background-image: linear-gradient(to bottom, #0088cc, #0044cc);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);
+  border-color: #0044cc #0044cc #002a80;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  *background-color: #0044cc;
+  /* Darken IE7 buttons by default so they stand out more given they won't have borders */
+
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-primary:hover,
+.btn-primary:focus,
+.btn-primary:active,
+.btn-primary.active,
+.btn-primary.disabled,
+.btn-primary[disabled] {
+  color: #ffffff;
+  background-color: #0044cc;
+  *background-color: #003bb3;
+}
+.btn-primary:active,
+.btn-primary.active {
+  background-color: #003399 \9;
+}
+.btn-warning {
+  color: #ffffff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #faa732;
+  background-image: -moz-linear-gradient(top, #fbb450, #f89406);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
+  background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
+  background-image: -o-linear-gradient(top, #fbb450, #f89406);
+  background-image: linear-gradient(to bottom, #fbb450, #f89406);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);
+  border-color: #f89406 #f89406 #ad6704;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  *background-color: #f89406;
+  /* Darken IE7 buttons by default so they stand out more given they won't have borders */
+
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-warning:hover,
+.btn-warning:focus,
+.btn-warning:active,
+.btn-warning.active,
+.btn-warning.disabled,
+.btn-warning[disabled] {
+  color: #ffffff;
+  background-color: #f89406;
+  *background-color: #df8505;
+}
+.btn-warning:active,
+.btn-warning.active {
+  background-color: #c67605 \9;
+}
+.btn-danger {
+  color: #ffffff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #da4f49;
+  background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));
+  background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);
+  background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);
+  background-image: linear-gradient(to bottom, #ee5f5b, #bd362f);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);
+  border-color: #bd362f #bd362f #802420;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  *background-color: #bd362f;
+  /* Darken IE7 buttons by default so they stand out more given they won't have borders */
+
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-danger:hover,
+.btn-danger:focus,
+.btn-danger:active,
+.btn-danger.active,
+.btn-danger.disabled,
+.btn-danger[disabled] {
+  color: #ffffff;
+  background-color: #bd362f;
+  *background-color: #a9302a;
+}
+.btn-danger:active,
+.btn-danger.active {
+  background-color: #942a25 \9;
+}
+.btn-success {
+  color: #ffffff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #5bb75b;
+  background-image: -moz-linear-gradient(top, #62c462, #51a351);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));
+  background-image: -webkit-linear-gradient(top, #62c462, #51a351);
+  background-image: -o-linear-gradient(top, #62c462, #51a351);
+  background-image: linear-gradient(to bottom, #62c462, #51a351);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);
+  border-color: #51a351 #51a351 #387038;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  *background-color: #51a351;
+  /* Darken IE7 buttons by default so they stand out more given they won't have borders */
+
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-success:hover,
+.btn-success:focus,
+.btn-success:active,
+.btn-success.active,
+.btn-success.disabled,
+.btn-success[disabled] {
+  color: #ffffff;
+  background-color: #51a351;
+  *background-color: #499249;
+}
+.btn-success:active,
+.btn-success.active {
+  background-color: #408140 \9;
+}
+.btn-info {
+  color: #ffffff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #49afcd;
+  background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));
+  background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4);
+  background-image: -o-linear-gradient(top, #5bc0de, #2f96b4);
+  background-image: linear-gradient(to bottom, #5bc0de, #2f96b4);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);
+  border-color: #2f96b4 #2f96b4 #1f6377;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  *background-color: #2f96b4;
+  /* Darken IE7 buttons by default so they stand out more given they won't have borders */
+
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-info:hover,
+.btn-info:focus,
+.btn-info:active,
+.btn-info.active,
+.btn-info.disabled,
+.btn-info[disabled] {
+  color: #ffffff;
+  background-color: #2f96b4;
+  *background-color: #2a85a0;
+}
+.btn-info:active,
+.btn-info.active {
+  background-color: #24748c \9;
+}
+.btn-inverse {
+  color: #ffffff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #363636;
+  background-image: -moz-linear-gradient(top, #444444, #222222);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222));
+  background-image: -webkit-linear-gradient(top, #444444, #222222);
+  background-image: -o-linear-gradient(top, #444444, #222222);
+  background-image: linear-gradient(to bottom, #444444, #222222);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);
+  border-color: #222222 #222222 #000000;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  *background-color: #222222;
+  /* Darken IE7 buttons by default so they stand out more given they won't have borders */
+
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-inverse:hover,
+.btn-inverse:focus,
+.btn-inverse:active,
+.btn-inverse.active,
+.btn-inverse.disabled,
+.btn-inverse[disabled] {
+  color: #ffffff;
+  background-color: #222222;
+  *background-color: #151515;
+}
+.btn-inverse:active,
+.btn-inverse.active {
+  background-color: #080808 \9;
+}
+button.btn,
+input[type="submit"].btn {
+  *padding-top: 3px;
+  *padding-bottom: 3px;
+}
+button.btn::-moz-focus-inner,
+input[type="submit"].btn::-moz-focus-inner {
+  padding: 0;
+  border: 0;
+}
+button.btn.btn-large,
+input[type="submit"].btn.btn-large {
+  *padding-top: 7px;
+  *padding-bottom: 7px;
+}
+button.btn.btn-small,
+input[type="submit"].btn.btn-small {
+  *padding-top: 3px;
+  *padding-bottom: 3px;
+}
+button.btn.btn-mini,
+input[type="submit"].btn.btn-mini {
+  *padding-top: 1px;
+  *padding-bottom: 1px;
+}
+.btn-link,
+.btn-link:active,
+.btn-link[disabled] {
+  background-color: transparent;
+  background-image: none;
+  -webkit-box-shadow: none;
+  -moz-box-shadow: none;
+  box-shadow: none;
+}
+.btn-link {
+  border-color: transparent;
+  cursor: pointer;
+  color: #0088cc;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+.btn-link:hover,
+.btn-link:focus {
+  color: #005580;
+  text-decoration: underline;
+  background-color: transparent;
+}
+.btn-link[disabled]:hover,
+.btn-link[disabled]:focus {
+  color: #333333;
+  text-decoration: none;
+}
+[class^="icon-"],
+[class*=" icon-"] {
+  display: inline-block;
+  width: 14px;
+  height: 14px;
+  *margin-right: .3em;
+  line-height: 14px;
+  vertical-align: text-top;
+  background-image: url("../img/glyphicons-halflings.png");
+  background-position: 14px 14px;
+  background-repeat: no-repeat;
+  margin-top: 1px;
+}
+/* White icons with optional class, or on hover/focus/active states of certain elements */
+.icon-white,
+.nav-pills > .active > a > [class^="icon-"],
+.nav-pills > .active > a > [class*=" icon-"],
+.nav-list > .active > a > [class^="icon-"],
+.nav-list > .active > a > [class*=" icon-"],
+.navbar-inverse .nav > .active > a > [class^="icon-"],
+.navbar-inverse .nav > .active > a > [class*=" icon-"],
+.dropdown-menu > li > a:hover > [class^="icon-"],
+.dropdown-menu > li > a:focus > [class^="icon-"],
+.dropdown-menu > li > a:hover > [class*=" icon-"],
+.dropdown-menu > li > a:focus > [class*=" icon-"],
+.dropdown-menu > .active > a > [class^="icon-"],
+.dropdown-menu > .active > a > [class*=" icon-"],
+.dropdown-submenu:hover > a > [class^="icon-"],
+.dropdown-submenu:focus > a > [class^="icon-"],
+.dropdown-submenu:hover > a > [class*=" icon-"],
+.dropdown-submenu:focus > a > [class*=" icon-"] {
+  background-image: url("../img/glyphicons-halflings-white.png");
+}
+.icon-glass {
+  background-position: 0      0;
+}
+.icon-music {
+  background-position: -24px 0;
+}
+.icon-search {
+  background-position: -48px 0;
+}
+.icon-envelope {
+  background-position: -72px 0;
+}
+.icon-heart {
+  background-position: -96px 0;
+}
+.icon-star {
+  background-position: -120px 0;
+}
+.icon-star-empty {
+  background-position: -144px 0;
+}
+.icon-user {
+  background-position: -168px 0;
+}
+.icon-film {
+  background-position: -192px 0;
+}
+.icon-th-large {
+  background-position: -216px 0;
+}
+.icon-th {
+  background-position: -240px 0;
+}
+.icon-th-list {
+  background-position: -264px 0;
+}
+.icon-ok {
+  background-position: -288px 0;
+}
+.icon-remove {
+  background-position: -312px 0;
+}
+.icon-zoom-in {
+  background-position: -336px 0;
+}
+.icon-zoom-out {
+  background-position: -360px 0;
+}
+.icon-off {
+  background-position: -384px 0;
+}
+.icon-signal {
+  background-position: -408px 0;
+}
+.icon-cog {
+  background-position: -432px 0;
+}
+.icon-trash {
+  background-position: -456px 0;
+}
+.icon-home {
+  background-position: 0 -24px;
+}
+.icon-file {
+  background-position: -24px -24px;
+}
+.icon-time {
+  background-position: -48px -24px;
+}
+.icon-road {
+  background-position: -72px -24px;
+}
+.icon-download-alt {
+  background-position: -96px -24px;
+}
+.icon-download {
+  background-position: -120px -24px;
+}
+.icon-upload {
+  background-position: -144px -24px;
+}
+.icon-inbox {
+  background-position: -168px -24px;
+}
+.icon-play-circle {
+  background-position: -192px -24px;
+}
+.icon-repeat {
+  background-position: -216px -24px;
+}
+.icon-refresh {
+  background-position: -240px -24px;
+}
+.icon-list-alt {
+  background-position: -264px -24px;
+}
+.icon-lock {
+  background-position: -287px -24px;
+}
+.icon-flag {
+  background-position: -312px -24px;
+}
+.icon-headphones {
+  background-position: -336px -24px;
+}
+.icon-volume-off {
+  background-position: -360px -24px;
+}
+.icon-volume-down {
+  background-position: -384px -24px;
+}
+.icon-volume-up {
+  background-position: -408px -24px;
+}
+.icon-qrcode {
+  background-position: -432px -24px;
+}
+.icon-barcode {
+  background-position: -456px -24px;
+}
+.icon-tag {
+  background-position: 0 -48px;
+}
+.icon-tags {
+  background-position: -25px -48px;
+}
+.icon-book {
+  background-position: -48px -48px;
+}
+.icon-bookmark {
+  background-position: -72px -48px;
+}
+.icon-print {
+  background-position: -96px -48px;
+}
+.icon-camera {
+  background-position: -120px -48px;
+}
+.icon-font {
+  background-position: -144px -48px;
+}
+.icon-bold {
+  background-position: -167px -48px;
+}
+.icon-italic {
+  background-position: -192px -48px;
+}
+.icon-text-height {
+  background-position: -216px -48px;
+}
+.icon-text-width {
+  background-position: -240px -48px;
+}
+.icon-align-left {
+  background-position: -264px -48px;
+}
+.icon-align-center {
+  background-position: -288px -48px;
+}
+.icon-align-right {
+  background-position: -312px -48px;
+}
+.icon-align-justify {
+  background-position: -336px -48px;
+}
+.icon-list {
+  background-position: -360px -48px;
+}
+.icon-indent-left {
+  background-position: -384px -48px;
+}
+.icon-indent-right {
+  background-position: -408px -48px;
+}
+.icon-facetime-video {
+  background-position: -432px -48px;
+}
+.icon-picture {
+  background-position: -456px -48px;
+}
+.icon-pencil {
+  background-position: 0 -72px;
+}
+.icon-map-marker {
+  background-position: -24px -72px;
+}
+.icon-adjust {
+  background-position: -48px -72px;
+}
+.icon-tint {
+  background-position: -72px -72px;
+}
+.icon-edit {
+  background-position: -96px -72px;
+}
+.icon-share {
+  background-position: -120px -72px;
+}
+.icon-check {
+  background-position: -144px -72px;
+}
+.icon-move {
+  background-position: -168px -72px;
+}
+.icon-step-backward {
+  background-position: -192px -72px;
+}
+.icon-fast-backward {
+  background-position: -216px -72px;
+}
+.icon-backward {
+  background-position: -240px -72px;
+}
+.icon-play {
+  background-position: -264px -72px;
+}
+.icon-pause {
+  background-position: -288px -72px;
+}
+.icon-stop {
+  background-position: -312px -72px;
+}
+.icon-forward {
+  background-position: -336px -72px;
+}
+.icon-fast-forward {
+  background-position: -360px -72px;
+}
+.icon-step-forward {
+  background-position: -384px -72px;
+}
+.icon-eject {
+  background-position: -408px -72px;
+}
+.icon-chevron-left {
+  background-position: -432px -72px;
+}
+.icon-chevron-right {
+  background-position: -456px -72px;
+}
+.icon-plus-sign {
+  background-position: 0 -96px;
+}
+.icon-minus-sign {
+  background-position: -24px -96px;
+}
+.icon-remove-sign {
+  background-position: -48px -96px;
+}
+.icon-ok-sign {
+  background-position: -72px -96px;
+}
+.icon-question-sign {
+  background-position: -96px -96px;
+}
+.icon-info-sign {
+  background-position: -120px -96px;
+}
+.icon-screenshot {
+  background-position: -144px -96px;
+}
+.icon-remove-circle {
+  background-position: -168px -96px;
+}
+.icon-ok-circle {
+  background-position: -192px -96px;
+}
+.icon-ban-circle {
+  background-position: -216px -96px;
+}
+.icon-arrow-left {
+  background-position: -240px -96px;
+}
+.icon-arrow-right {
+  background-position: -264px -96px;
+}
+.icon-arrow-up {
+  background-position: -289px -96px;
+}
+.icon-arrow-down {
+  background-position: -312px -96px;
+}
+.icon-share-alt {
+  background-position: -336px -96px;
+}
+.icon-resize-full {
+  background-position: -360px -96px;
+}
+.icon-resize-small {
+  background-position: -384px -96px;
+}
+.icon-plus {
+  background-position: -408px -96px;
+}
+.icon-minus {
+  background-position: -433px -96px;
+}
+.icon-asterisk {
+  background-position: -456px -96px;
+}
+.icon-exclamation-sign {
+  background-position: 0 -120px;
+}
+.icon-gift {
+  background-position: -24px -120px;
+}
+.icon-leaf {
+  background-position: -48px -120px;
+}
+.icon-fire {
+  background-position: -72px -120px;
+}
+.icon-eye-open {
+  background-position: -96px -120px;
+}
+.icon-eye-close {
+  background-position: -120px -120px;
+}
+.icon-warning-sign {
+  background-position: -144px -120px;
+}
+.icon-plane {
+  background-position: -168px -120px;
+}
+.icon-calendar {
+  background-position: -192px -120px;
+}
+.icon-random {
+  background-position: -216px -120px;
+  width: 16px;
+}
+.icon-comment {
+  background-position: -240px -120px;
+}
+.icon-magnet {
+  background-position: -264px -120px;
+}
+.icon-chevron-up {
+  background-position: -288px -120px;
+}
+.icon-chevron-down {
+  background-position: -313px -119px;
+}
+.icon-retweet {
+  background-position: -336px -120px;
+}
+.icon-shopping-cart {
+  background-position: -360px -120px;
+}
+.icon-folder-close {
+  background-position: -384px -120px;
+  width: 16px;
+}
+.icon-folder-open {
+  background-position: -408px -120px;
+  width: 16px;
+}
+.icon-resize-vertical {
+  background-position: -432px -119px;
+}
+.icon-resize-horizontal {
+  background-position: -456px -118px;
+}
+.icon-hdd {
+  background-position: 0 -144px;
+}
+.icon-bullhorn {
+  background-position: -24px -144px;
+}
+.icon-bell {
+  background-position: -48px -144px;
+}
+.icon-certificate {
+  background-position: -72px -144px;
+}
+.icon-thumbs-up {
+  background-position: -96px -144px;
+}
+.icon-thumbs-down {
+  background-position: -120px -144px;
+}
+.icon-hand-right {
+  background-position: -144px -144px;
+}
+.icon-hand-left {
+  background-position: -168px -144px;
+}
+.icon-hand-up {
+  background-position: -192px -144px;
+}
+.icon-hand-down {
+  background-position: -216px -144px;
+}
+.icon-circle-arrow-right {
+  background-position: -240px -144px;
+}
+.icon-circle-arrow-left {
+  background-position: -264px -144px;
+}
+.icon-circle-arrow-up {
+  background-position: -288px -144px;
+}
+.icon-circle-arrow-down {
+  background-position: -312px -144px;
+}
+.icon-globe {
+  background-position: -336px -144px;
+}
+.icon-wrench {
+  background-position: -360px -144px;
+}
+.icon-tasks {
+  background-position: -384px -144px;
+}
+.icon-filter {
+  background-position: -408px -144px;
+}
+.icon-briefcase {
+  background-position: -432px -144px;
+}
+.icon-fullscreen {
+  background-position: -456px -144px;
+}
+.btn-group {
+  position: relative;
+  display: inline-block;
+  *display: inline;
+  /* IE7 inline-block hack */
+
+  *zoom: 1;
+  font-size: 0;
+  vertical-align: middle;
+  white-space: nowrap;
+  *margin-left: .3em;
+}
+.btn-group:first-child {
+  *margin-left: 0;
+}
+.btn-group + .btn-group {
+  margin-left: 5px;
+}
+.btn-toolbar {
+  font-size: 0;
+  margin-top: 10px;
+  margin-bottom: 10px;
+}
+.btn-toolbar > .btn + .btn,
+.btn-toolbar > .btn-group + .btn,
+.btn-toolbar > .btn + .btn-group {
+  margin-left: 5px;
+}
+.btn-group > .btn {
+  position: relative;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+.btn-group > .btn + .btn {
+  margin-left: -1px;
+}
+.btn-group > .btn,
+.btn-group > .dropdown-menu,
+.btn-group > .popover {
+  font-size: 14px;
+}
+.btn-group > .btn-mini {
+  font-size: 10.5px;
+}
+.btn-group > .btn-small {
+  font-size: 11.9px;
+}
+.btn-group > .btn-large {
+  font-size: 17.5px;
+}
+.btn-group > .btn:first-child {
+  margin-left: 0;
+  -webkit-border-top-left-radius: 0;
+  -moz-border-radius-topleft: 0;
+  border-top-left-radius: 0;
+  -webkit-border-bottom-left-radius: 0;
+  -moz-border-radius-bottomleft: 0;
+  border-bottom-left-radius: 0;
+}
+.btn-group > .btn:last-child,
+.btn-group > .dropdown-toggle {
+  -webkit-border-top-right-radius: 0;
+  -moz-border-radius-topright: 0;
+  border-top-right-radius: 0;
+  -webkit-border-bottom-right-radius: 0;
+  -moz-border-radius-bottomright: 0;
+  border-bottom-right-radius: 0;
+}
+.btn-group > .btn.large:first-child {
+  margin-left: 0;
+  -webkit-border-top-left-radius: 0;
+  -moz-border-radius-topleft: 0;
+  border-top-left-radius: 0;
+  -webkit-border-bottom-left-radius: 0;
+  -moz-border-radius-bottomleft: 0;
+  border-bottom-left-radius: 0;
+}
+.btn-group > .btn.large:last-child,
+.btn-group > .large.dropdown-toggle {
+  -webkit-border-top-right-radius: 0;
+  -moz-border-radius-topright: 0;
+  border-top-right-radius: 0;
+  -webkit-border-bottom-right-radius: 0;
+  -moz-border-radius-bottomright: 0;
+  border-bottom-right-radius: 0;
+}
+.btn-group > .btn:hover,
+.btn-group > .btn:focus,
+.btn-group > .btn:active,
+.btn-group > .btn.active {
+  z-index: 2;
+}
+.btn-group .dropdown-toggle:active,
+.btn-group.open .dropdown-toggle {
+  outline: 0;
+}
+.btn-group > .btn + .dropdown-toggle {
+  padding-left: 8px;
+  padding-right: 8px;
+  -webkit-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
+  -moz-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
+  box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
+  *padding-top: 5px;
+  *padding-bottom: 5px;
+}
+.btn-group > .btn-mini + .dropdown-toggle {
+  padding-left: 5px;
+  padding-right: 5px;
+  *padding-top: 2px;
+  *padding-bottom: 2px;
+}
+.btn-group > .btn-small + .dropdown-toggle {
+  *padding-top: 5px;
+  *padding-bottom: 4px;
+}
+.btn-group > .btn-large + .dropdown-toggle {
+  padding-left: 12px;
+  padding-right: 12px;
+  *padding-top: 7px;
+  *padding-bottom: 7px;
+}
+.btn-group.open .dropdown-toggle {
+  background-image: none;
+  -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
+  -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
+  box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
+}
+.btn-group.open .btn.dropdown-toggle {
+  background-color: #e6e6e6;
+}
+.btn-group.open .btn-primary.dropdown-toggle {
+  background-color: #0044cc;
+}
+.btn-group.open .btn-warning.dropdown-toggle {
+  background-color: #f89406;
+}
+.btn-group.open .btn-danger.dropdown-toggle {
+  background-color: #bd362f;
+}
+.btn-group.open .btn-success.dropdown-toggle {
+  background-color: #51a351;
+}
+.btn-group.open .btn-info.dropdown-toggle {
+  background-color: #2f96b4;
+}
+.btn-group.open .btn-inverse.dropdown-toggle {
+  background-color: #222222;
+}
+.btn .caret {
+  margin-top: 8px;
+  margin-left: 0;
+}
+.btn-large .caret {
+  margin-top: 6px;
+}
+.btn-large .caret {
+  border-left-width: 5px;
+  border-right-width: 5px;
+  border-top-width: 5px;
+}
+.btn-mini .caret,
+.btn-small .caret {
+  margin-top: 8px;
+}
+.dropup .btn-large .caret {
+  border-bottom-width: 5px;
+}
+.btn-primary .caret,
+.btn-warning .caret,
+.btn-danger .caret,
+.btn-info .caret,
+.btn-success .caret,
+.btn-inverse .caret {
+  border-top-color: #ffffff;
+  border-bottom-color: #ffffff;
+}
+.btn-group-vertical {
+  display: inline-block;
+  *display: inline;
+  /* IE7 inline-block hack */
+
+  *zoom: 1;
+}
+.btn-group-vertical > .btn {
+  display: block;
+  float: none;
+  max-width: 100%;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+.btn-group-vertical > .btn + .btn {
+  margin-left: 0;
+  margin-top: -1px;
+}
+.btn-group-vertical > .btn:first-child {
+  -webkit-border-radius: 0 0 0 0;
+  -moz-border-radius: 0 0 0 0;
+  border-radius: 0 0 0 0;
+}
+.btn-group-vertical > .btn:last-child {
+  -webkit-border-radius: 0 0 0 0;
+  -moz-border-radius: 0 0 0 0;
+  border-radius: 0 0 0 0;
+}
+.btn-group-vertical > .btn-large:first-child {
+  -webkit-border-radius: 0 0 0 0;
+  -moz-border-radius: 0 0 0 0;
+  border-radius: 0 0 0 0;
+}
+.btn-group-vertical > .btn-large:last-child {
+  -webkit-border-radius: 0 0 0 0;
+  -moz-border-radius: 0 0 0 0;
+  border-radius: 0 0 0 0;
+}
+.nav {
+  margin-left: 0;
+  margin-bottom: 20px;
+  list-style: none;
+}
+.nav > li > a {
+  display: block;
+}
+.nav > li > a:hover,
+.nav > li > a:focus {
+  text-decoration: none;
+  background-color: #eeeeee;
+}
+.nav > li > a > img {
+  max-width: none;
+}
+.nav > .pull-right {
+  float: right;
+}
+.nav-header {
+  display: block;
+  padding: 3px 15px;
+  font-size: 11px;
+  font-weight: bold;
+  line-height: 20px;
+  color: #999999;
+  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+  text-transform: uppercase;
+}
+.nav li + .nav-header {
+  margin-top: 9px;
+}
+.nav-list {
+  padding-left: 15px;
+  padding-right: 15px;
+  margin-bottom: 0;
+}
+.nav-list > li > a,
+.nav-list .nav-header {
+  margin-left: -15px;
+  margin-right: -15px;
+  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+}
+.nav-list > li > a {
+  padding: 3px 15px;
+}
+.nav-list > .active > a,
+.nav-list > .active > a:hover,
+.nav-list > .active > a:focus {
+  color: #ffffff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
+  background-color: #0088cc;
+}
+.nav-list [class^="icon-"],
+.nav-list [class*=" icon-"] {
+  margin-right: 2px;
+}
+.nav-list .divider {
+  *width: 100%;
+  height: 1px;
+  margin: 9px 1px;
+  *margin: -5px 0 5px;
+  overflow: hidden;
+  background-color: #e5e5e5;
+  border-bottom: 1px solid #ffffff;
+}
+.nav-tabs,
+.nav-pills {
+  *zoom: 1;
+}
+.nav-tabs:before,
+.nav-pills:before,
+.nav-tabs:after,
+.nav-pills:after {
+  display: table;
+  content: "";
+  line-height: 0;
+}
+.nav-tabs:after,
+.nav-pills:after {
+  clear: both;
+}
+.nav-tabs > li,
+.nav-pills > li {
+  float: left;
+}
+.nav-tabs > li > a,
+.nav-pills > li > a {
+  padding-right: 12px;
+  padding-left: 12px;
+  margin-right: 2px;
+  line-height: 14px;
+}
+.nav-tabs {
+  border-bottom: 1px solid #ddd;
+}
+.nav-tabs > li {
+  margin-bottom: -1px;
+}
+.nav-tabs > li > a {
+  padding-top: 8px;
+  padding-bottom: 8px;
+  line-height: 20px;
+  border: 1px solid transparent;
+  -webkit-border-radius: 4px 4px 0 0;
+  -moz-border-radius: 4px 4px 0 0;
+  border-radius: 4px 4px 0 0;
+}
+.nav-tabs > li > a:hover,
+.nav-tabs > li > a:focus {
+  border-color: #eeeeee #eeeeee #dddddd;
+}
+.nav-tabs > .active > a,
+.nav-tabs > .active > a:hover,
+.nav-tabs > .active > a:focus {
+  color: #555555;
+  background-color: #ffffff;
+  border: 1px solid #ddd;
+  border-bottom-color: transparent;
+  cursor: default;
+}
+.nav-pills > li > a {
+  padding-top: 8px;
+  padding-bottom: 8px;
+  margin-top: 2px;
+  margin-bottom: 2px;
+  -webkit-border-radius: 5px;
+  -moz-border-radius: 5px;
+  border-radius: 5px;
+}
+.nav-pills > .active > a,
+.nav-pills > .active > a:hover,
+.nav-pills > .active > a:focus {
+  color: #ffffff;
+  background-color: #0088cc;
+}
+.nav-stacked > li {
+  float: none;
+}
+.nav-stacked > li > a {
+  margin-right: 0;
+}
+.nav-tabs.nav-stacked {
+  border-bottom: 0;
+}
+.nav-tabs.nav-stacked > li > a {
+  border: 1px solid #ddd;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+.nav-tabs.nav-stacked > li:first-child > a {
+  -webkit-border-top-right-radius: 4px;
+  -moz-border-radius-topright: 4px;
+  border-top-right-radius: 4px;
+  -webkit-border-top-left-radius: 4px;
+  -moz-border-radius-topleft: 4px;
+  border-top-left-radius: 4px;
+}
+.nav-tabs.nav-stacked > li:last-child > a {
+  -webkit-border-bottom-right-radius: 4px;
+  -moz-border-radius-bottomright: 4px;
+  border-bottom-right-radius: 4px;
+  -webkit-border-bottom-left-radius: 4px;
+  -moz-border-radius-bottomleft: 4px;
+  border-bottom-left-radius: 4px;
+}
+.nav-tabs.nav-stacked > li > a:hover,
+.nav-tabs.nav-stacked > li > a:focus {
+  border-color: #ddd;
+  z-index: 2;
+}
+.nav-pills.nav-stacked > li > a {
+  margin-bottom: 3px;
+}
+.nav-pills.nav-stacked > li:last-child > a {
+  margin-bottom: 1px;
+}
+.nav-tabs .dropdown-menu {
+  -webkit-border-radius: 0 0 6px 6px;
+  -moz-border-radius: 0 0 6px 6px;
+  border-radius: 0 0 6px 6px;
+}
+.nav-pills .dropdown-menu {
+  -webkit-border-radius: 6px;
+  -moz-border-radius: 6px;
+  border-radius: 6px;
+}
+.nav .dropdown-toggle .caret {
+  border-top-color: #0088cc;
+  border-bottom-color: #0088cc;
+  margin-top: 6px;
+}
+.nav .dropdown-toggle:hover .caret,
+.nav .dropdown-toggle:focus .caret {
+  border-top-color: #005580;
+  border-bottom-color: #005580;
+}
+/* move down carets for tabs */
+.nav-tabs .dropdown-toggle .caret {
+  margin-top: 8px;
+}
+.nav .active .dropdown-toggle .caret {
+  border-top-color: #fff;
+  border-bottom-color: #fff;
+}
+.nav-tabs .active .dropdown-toggle .caret {
+  border-top-color: #555555;
+  border-bottom-color: #555555;
+}
+.nav > .dropdown.active > a:hover,
+.nav > .dropdown.active > a:focus {
+  cursor: pointer;
+}
+.nav-tabs .open .dropdown-toggle,
+.nav-pills .open .dropdown-toggle,
+.nav > li.dropdown.open.active > a:hover,
+.nav > li.dropdown.open.active > a:focus {
+  color: #ffffff;
+  background-color: #999999;
+  border-color: #999999;
+}
+.nav li.dropdown.open .caret,
+.nav li.dropdown.open.active .caret,
+.nav li.dropdown.open a:hover .caret,
+.nav li.dropdown.open a:focus .caret {
+  border-top-color: #ffffff;
+  border-bottom-color: #ffffff;
+  opacity: 1;
+  filter: alpha(opacity=100);
+}
+.tabs-stacked .open > a:hover,
+.tabs-stacked .open > a:focus {
+  border-color: #999999;
+}
+.tabbable {
+  *zoom: 1;
+}
+.tabbable:before,
+.tabbable:after {
+  display: table;
+  content: "";
+  line-height: 0;
+}
+.tabbable:after {
+  clear: both;
+}
+.tab-content {
+  overflow: auto;
+}
+.tabs-below > .nav-tabs,
+.tabs-right > .nav-tabs,
+.tabs-left > .nav-tabs {
+  border-bottom: 0;
+}
+.tab-content > .tab-pane,
+.pill-content > .pill-pane {
+  display: none;
+}
+.tab-content > .active,
+.pill-content > .active {
+  display: block;
+}
+.tabs-below > .nav-tabs {
+  border-top: 1px solid #ddd;
+}
+.tabs-below > .nav-tabs > li {
+  margin-top: -1px;
+  margin-bottom: 0;
+}
+.tabs-below > .nav-tabs > li > a {
+  -webkit-border-radius: 0 0 4px 4px;
+  -moz-border-radius: 0 0 4px 4px;
+  border-radius: 0 0 4px 4px;
+}
+.tabs-below > .nav-tabs > li > a:hover,
+.tabs-below > .nav-tabs > li > a:focus {
+  border-bottom-color: transparent;
+  border-top-color: #ddd;
+}
+.tabs-below > .nav-tabs > .active > a,
+.tabs-below > .nav-tabs > .active > a:hover,
+.tabs-below > .nav-tabs > .active > a:focus {
+  border-color: transparent #ddd #ddd #ddd;
+}
+.tabs-left > .nav-tabs > li,
+.tabs-right > .nav-tabs > li {
+  float: none;
+}
+.tabs-left > .nav-tabs > li > a,
+.tabs-right > .nav-tabs > li > a {
+  min-width: 74px;
+  margin-right: 0;
+  margin-bottom: 3px;
+}
+.tabs-left > .nav-tabs {
+  float: left;
+  margin-right: 19px;
+  border-right: 1px solid #ddd;
+}
+.tabs-left > .nav-tabs > li > a {
+  margin-right: -1px;
+  -webkit-border-radius: 4px 0 0 4px;
+  -moz-border-radius: 4px 0 0 4px;
+  border-radius: 4px 0 0 4px;
+}
+.tabs-left > .nav-tabs > li > a:hover,
+.tabs-left > .nav-tabs > li > a:focus {
+  border-color: #eeeeee #dddddd #eeeeee #eeeeee;
+}
+.tabs-left > .nav-tabs .active > a,
+.tabs-left > .nav-tabs .active > a:hover,
+.tabs-left > .nav-tabs .active > a:focus {
+  border-color: #ddd transparent #ddd #ddd;
+  *border-right-color: #ffffff;
+}
+.tabs-right > .nav-tabs {
+  float: right;
+  margin-left: 19px;
+  border-left: 1px solid #ddd;
+}
+.tabs-right > .nav-tabs > li > a {
+  margin-left: -1px;
+  -webkit-border-radius: 0 4px 4px 0;
+  -moz-border-radius: 0 4px 4px 0;
+  border-radius: 0 4px 4px 0;
+}
+.tabs-right > .nav-tabs > li > a:hover,
+.tabs-right > .nav-tabs > li > a:focus {
+  border-color: #eeeeee #eeeeee #eeeeee #dddddd;
+}
+.tabs-right > .nav-tabs .active > a,
+.tabs-right > .nav-tabs .active > a:hover,
+.tabs-right > .nav-tabs .active > a:focus {
+  border-color: #ddd #ddd #ddd transparent;
+  *border-left-color: #ffffff;
+}
+.nav > .disabled > a {
+  color: #999999;
+}
+.nav > .disabled > a:hover,
+.nav > .disabled > a:focus {
+  text-decoration: none;
+  background-color: transparent;
+  cursor: default;
+}
+.navbar {
+  overflow: visible;
+  margin-bottom: 20px;
+  *position: relative;
+  *z-index: 2;
+}
+.navbar-inner {
+  min-height: 40px;
+  padding-left: 20px;
+  padding-right: 20px;
+  background-color: #fafafa;
+  background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2));
+  background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2);
+  background-image: -o-linear-gradient(top, #ffffff, #f2f2f2);
+  background-image: linear-gradient(to bottom, #ffffff, #f2f2f2);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);
+  border: 1px solid #d4d4d4;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+  *zoom: 1;
+}
+.navbar-inner:before,
+.navbar-inner:after {
+  display: table;
+  content: "";
+  line-height: 0;
+}
+.navbar-inner:after {
+  clear: both;
+}
+.navbar .container {
+  width: auto;
+}
+.nav-collapse.collapse {
+  height: auto;
+  overflow: visible;
+}
+.navbar .brand {
+  float: left;
+  display: block;
+  padding: 10px 20px 10px;
+  margin-left: -20px;
+  font-size: 20px;
+  font-weight: 200;
+  color: #777777;
+  text-shadow: 0 1px 0 #ffffff;
+}
+.navbar .brand:hover,
+.navbar .brand:focus {
+  text-decoration: none;
+}
+.navbar-text {
+  margin-bottom: 0;
+  line-height: 40px;
+  color: #777777;
+}
+.navbar-link {
+  color: #777777;
+}
+.navbar-link:hover,
+.navbar-link:focus {
+  color: #333333;
+}
+.navbar .divider-vertical {
+  height: 40px;
+  margin: 0 9px;
+  border-left: 1px solid #f2f2f2;
+  border-right: 1px solid #ffffff;
+}
+.navbar .btn,
+.navbar .btn-group {
+  margin-top: 5px;
+}
+.navbar .btn-group .btn,
+.navbar .input-prepend .btn,
+.navbar .input-append .btn,
+.navbar .input-prepend .btn-group,
+.navbar .input-append .btn-group {
+  margin-top: 0;
+}
+.navbar-form {
+  margin-bottom: 0;
+  *zoom: 1;
+}
+.navbar-form:before,
+.navbar-form:after {
+  display: table;
+  content: "";
+  line-height: 0;
+}
+.navbar-form:after {
+  clear: both;
+}
+.navbar-form input,
+.navbar-form select,
+.navbar-form .radio,
+.navbar-form .checkbox {
+  margin-top: 5px;
+}
+.navbar-form input,
+.navbar-form select,
+.navbar-form .btn {
+  display: inline-block;
+  margin-bottom: 0;
+}
+.navbar-form input[type="image"],
+.navbar-form input[type="checkbox"],
+.navbar-form input[type="radio"] {
+  margin-top: 3px;
+}
+.navbar-form .input-append,
+.navbar-form .input-prepend {
+  margin-top: 5px;
+  white-space: nowrap;
+}
+.navbar-form .input-append input,
+.navbar-form .input-prepend input {
+  margin-top: 0;
+}
+.navbar-search {
+  position: relative;
+  float: left;
+  margin-top: 5px;
+  margin-bottom: 0;
+}
+.navbar-search .search-query {
+  margin-bottom: 0;
+  padding: 4px 14px;
+  font-family: marquette-light, 'Helvetica Neue', Helvetica, Arial, sans-serif;
+  font-size: 13px;
+  font-weight: normal;
+  line-height: 1;
+  -webkit-border-radius: 15px;
+  -moz-border-radius: 15px;
+  border-radius: 15px;
+}
+.navbar-static-top {
+  position: static;
+  margin-bottom: 0;
+}
+.navbar-static-top .navbar-inner {
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+.navbar-fixed-top,
+.navbar-fixed-bottom {
+  position: fixed;
+  right: 0;
+  left: 0;
+  z-index: 1030;
+  margin-bottom: 0;
+}
+.navbar-fixed-top .navbar-inner,
+.navbar-static-top .navbar-inner {
+  border-width: 0 0 1px;
+}
+.navbar-fixed-bottom .navbar-inner {
+  border-width: 1px 0 0;
+}
+.navbar-fixed-top .navbar-inner,
+.navbar-fixed-bottom .navbar-inner {
+  padding-left: 0;
+  padding-right: 0;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+.navbar-static-top .container,
+.navbar-fixed-top .container,
+.navbar-fixed-bottom .container {
+  width: 940px;
+}
+.navbar-fixed-top {
+  top: 0;
+}
+.navbar-fixed-top .navbar-inner,
+.navbar-static-top .navbar-inner {
+  -webkit-box-shadow: 0 1px 10px rgba(0,0,0,.1);
+  -moz-box-shadow: 0 1px 10px rgba(0,0,0,.1);
+  box-shadow: 0 1px 10px rgba(0,0,0,.1);
+}
+.navbar-fixed-bottom {
+  bottom: 0;
+}
+.navbar-fixed-bottom .navbar-inner {
+  -webkit-box-shadow: 0 -1px 10px rgba(0,0,0,.1);
+  -moz-box-shadow: 0 -1px 10px rgba(0,0,0,.1);
+  box-shadow: 0 -1px 10px rgba(0,0,0,.1);
+}
+.navbar .nav {
+  position: relative;
+  left: 0;
+  display: block;
+  float: left;
+  margin: 0 10px 0 0;
+}
+.navbar .nav.pull-right {
+  float: right;
+  margin-right: 0;
+}
+.navbar .nav > li {
+  float: left;
+}
+.navbar .nav > li > a {
+  float: none;
+  padding: 10px 15px 10px;
+  color: #777777;
+  text-decoration: none;
+  text-shadow: 0 1px 0 #ffffff;
+}
+.navbar .nav .dropdown-toggle .caret {
+  margin-top: 8px;
+}
+.navbar .nav > li > a:focus,
+.navbar .nav > li > a:hover {
+  background-color: transparent;
+  color: #333333;
+  text-decoration: none;
+}
+.navbar .nav > .active > a,
+.navbar .nav > .active > a:hover,
+.navbar .nav > .active > a:focus {
+  color: #555555;
+  text-decoration: none;
+  background-color: #e5e5e5;
+  -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
+  -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
+  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
+}
+.navbar .btn-navbar {
+  display: none;
+  float: right;
+  padding: 7px 10px;
+  margin-left: 5px;
+  margin-right: 5px;
+  color: #ffffff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #ededed;
+  background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5));
+  background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5);
+  background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5);
+  background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);
+  border-color: #e5e5e5 #e5e5e5 #bfbfbf;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  *background-color: #e5e5e5;
+  /* Darken IE7 buttons by default so they stand out more given they won't have borders */
+
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);
+  -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);
+  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);
+}
+.navbar .btn-navbar:hover,
+.navbar .btn-navbar:focus,
+.navbar .btn-navbar:active,
+.navbar .btn-navbar.active,
+.navbar .btn-navbar.disabled,
+.navbar .btn-navbar[disabled] {
+  color: #ffffff;
+  background-color: #e5e5e5;
+  *background-color: #d9d9d9;
+}
+.navbar .btn-navbar:active,
+.navbar .btn-navbar.active {
+  background-color: #cccccc \9;
+}
+.navbar .btn-navbar .icon-bar {
+  display: block;
+  width: 18px;
+  height: 2px;
+  background-color: #f5f5f5;
+  -webkit-border-radius: 1px;
+  -moz-border-radius: 1px;
+  border-radius: 1px;
+  -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+  -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+}
+.btn-navbar .icon-bar + .icon-bar {
+  margin-top: 3px;
+}
+.navbar .nav > li > .dropdown-menu:before {
+  content: '';
+  display: inline-block;
+  border-left: 7px solid transparent;
+  border-right: 7px solid transparent;
+  border-bottom: 7px solid #ccc;
+  border-bottom-color: rgba(0, 0, 0, 0.2);
+  position: absolute;
+  top: -7px;
+  left: 9px;
+}
+.navbar .nav > li > .dropdown-menu:after {
+  content: '';
+  display: inline-block;
+  border-left: 6px solid transparent;
+  border-right: 6px solid transparent;
+  border-bottom: 6px solid #ffffff;
+  position: absolute;
+  top: -6px;
+  left: 10px;
+}
+.navbar-fixed-bottom .nav > li > .dropdown-menu:before {
+  border-top: 7px solid #ccc;
+  border-top-color: rgba(0, 0, 0, 0.2);
+  border-bottom: 0;
+  bottom: -7px;
+  top: auto;
+}
+.navbar-fixed-bottom .nav > li > .dropdown-menu:after {
+  border-top: 6px solid #ffffff;
+  border-bottom: 0;
+  bottom: -6px;
+  top: auto;
+}
+.navbar .nav li.dropdown > a:hover .caret,
+.navbar .nav li.dropdown > a:focus .caret {
+  border-top-color: #333333;
+  border-bottom-color: #333333;
+}
+.navbar .nav li.dropdown.open > .dropdown-toggle,
+.navbar .nav li.dropdown.active > .dropdown-toggle,
+.navbar .nav li.dropdown.open.active > .dropdown-toggle {
+  background-color: #e5e5e5;
+  color: #555555;
+}
+.navbar .nav li.dropdown > .dropdown-toggle .caret {
+  border-top-color: #777777;
+  border-bottom-color: #777777;
+}
+.navbar .nav li.dropdown.open > .dropdown-toggle .caret,
+.navbar .nav li.dropdown.active > .dropdown-toggle .caret,
+.navbar .nav li.dropdown.open.active > .dropdown-toggle .caret {
+  border-top-color: #555555;
+  border-bottom-color: #555555;
+}
+.navbar .pull-right > li > .dropdown-menu,
+.navbar .nav > li > .dropdown-menu.pull-right {
+  left: auto;
+  right: 0;
+}
+.navbar .pull-right > li > .dropdown-menu:before,
+.navbar .nav > li > .dropdown-menu.pull-right:before {
+  left: auto;
+  right: 12px;
+}
+.navbar .pull-right > li > .dropdown-menu:after,
+.navbar .na

<TRUNCATED>

[52/61] [abbrv] git commit: Merge pull request #34 from r3b/counters

Posted by sn...@apache.org.
Merge pull request #34 from r3b/counters

Counters

Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/2a01c30b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/2a01c30b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/2a01c30b

Branch: refs/heads/master
Commit: 2a01c30b6cb51b3fa5a2dc4c3bc4834f615ee08f
Parents: 832017b 31d481a
Author: Rod Simpson <ro...@rodsimpson.com>
Authored: Mon Jan 27 15:04:23 2014 -0800
Committer: Rod Simpson <ro...@rodsimpson.com>
Committed: Mon Jan 27 15:04:23 2014 -0800

----------------------------------------------------------------------
 sdks/html5-javascript/Gruntfile.js              |   83 +
 sdks/html5-javascript/lib/Client.js             |  865 +++
 sdks/html5-javascript/lib/Collection.js         |  446 ++
 sdks/html5-javascript/lib/Counter.js            |  186 +
 sdks/html5-javascript/lib/Entity.js             |  646 +++
 sdks/html5-javascript/lib/Group.js              |  233 +
 sdks/html5-javascript/lib/Usergrid.js           |   87 +
 sdks/html5-javascript/package.json              |   22 +
 sdks/html5-javascript/tests/mocha/index.html    |   49 +
 sdks/html5-javascript/tests/mocha/test.js       |  325 ++
 .../tests/qunit/apigee_test.html                |   14 +
 sdks/html5-javascript/tests/qunit/tests.js      |    3 +
 .../resources/css/bootstrap-combined.min.css    |   18 +
 .../tests/resources/css/mocha.css               |  270 +
 .../tests/resources/css/styles.css              |   91 +
 .../tests/resources/images/apigee.png           |  Bin 0 -> 6010 bytes
 .../tests/resources/js/blanket_mocha.min.js     |    1 +
 .../tests/resources/js/json2.js                 |  486 ++
 .../tests/resources/js/mocha.js                 | 5341 ++++++++++++++++++
 sdks/html5-javascript/tests/test.html           |   37 +
 sdks/html5-javascript/tests/test.js             |  910 +++
 sdks/html5-javascript/usergrid.js               | 3078 +++++-----
 sdks/html5-javascript/usergrid.min.js           |    3 +-
 23 files changed, 11691 insertions(+), 1503 deletions(-)
----------------------------------------------------------------------



[60/61] [abbrv] git commit: added index template

Posted by sn...@apache.org.
added index template


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/5da8ea8e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/5da8ea8e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/5da8ea8e

Branch: refs/pull/35/merge
Commit: 5da8ea8ea25a4a1d456dbffc763b25d8b3d62b35
Parents: db6f01c
Author: Rod Simpson <ro...@apigee.com>
Authored: Mon Jan 27 16:18:23 2014 -0700
Committer: Rod Simpson <ro...@apigee.com>
Committed: Mon Jan 27 16:18:23 2014 -0700

----------------------------------------------------------------------
 portal/index-template.html | 131 ++++++++++++++++++++++
 portal/index.html          | 238 ----------------------------------------
 2 files changed, 131 insertions(+), 238 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5da8ea8e/portal/index-template.html
----------------------------------------------------------------------
diff --git a/portal/index-template.html b/portal/index-template.html
new file mode 100644
index 0000000..3fc83ad
--- /dev/null
+++ b/portal/index-template.html
@@ -0,0 +1,131 @@
+<!doctype html>
+<html lang="en" ng-app="appservices">
+
+<head>
+  <meta charset="utf-8">
+  <title>Apigee App Services</title>
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <meta name="description" content="">
+  <meta name="author" content="">
+
+  <link href="js/libs/bootstrap/custom/css/bootstrap.css" rel="stylesheet"/>
+  <link href="css/dash.min.css" rel="stylesheet"/>
+
+  <!--styles for jquery ui calendar component-->
+  <link rel="stylesheet" type="text/css" href="js/libs/jqueryui/jquery-ui-1.8.9.custom.css"/>
+  <link rel="stylesheet" type="text/css" href="js/libs/jqueryui/jquery-ui-timepicker.css"/>
+</head>
+<body ng-controller="PageCtrl" >
+<!-- Google Tag Manager -->
+<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-N52333"
+                  height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
+<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
+    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
+    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
+    '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
+})(window,document,'script','dataLayer','GTM-N52333');</script>
+<!-- End Google Tag Manager -->
+<header>
+  <nav class="navbar navbar-static-top">
+    <div class="container-fluid">
+      <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+        <span class="icon-bar"></span>
+        <span class="icon-bar"></span>
+        <span class="icon-bar"></span>
+      </button>
+      <a class="brand" href="#"><img src="img/logo.gif"/></a>
+
+      <div appswitcher ></div>
+
+
+      <div class="nav-collapse collapse"  ng-show="loaded">
+
+        <div class="navbar-text pull-right" ng-if="activeUI">
+          <span class="navbar-text" id="userEmail" >{{userEmail || 'anonymous'}}</span> |
+          <span ng-controller="LoginCtrl"><a id="logout-link" ng-click="logout()" title="logout"><i class="pictogram">&#59201</i></a></span>
+          <span ><a ng-click="profile()" title="profile"><i class="pictogram">&#59170</i></a></span> |
+          <span><a href="archive/" target="_blank">Legacy Portal</a></span>
+        </div>
+
+      </div>
+    </div>
+  </nav>
+</header>
+<section class="side-menu"   ng-show="activeUI">
+  <div class="sidebar-nav">
+    <div class="nav-collapse collapse">
+
+      <org-menu context="orgmenu"  ></org-menu>
+
+    </div>
+    <div class="nav-collapse collapse" id="sideMenu">
+    </div>
+  </div>
+</section>
+
+<section class="main-content"   ng-show="loaded">
+  <div class="container-fluid">
+    <div class="row-fluid">
+      <div class="span12">
+
+        <!--header app/org context nav-->
+
+        <nav class="navbar secondary"    ng-show="activeUI">
+          <div class="container-fluid">
+            <div class="row-fluid">
+              <div class="span12">
+                <div class="span5">
+                  <app-menu></app-menu>
+                </div>
+                <div class="span7 button-area">
+                  <div class="nav-collapse collapse">
+                    <ul class="helper-links nav span12">
+                      <li class="sdks span12">
+                        <ul class="pull-right">
+                          <li class="title"><label>SDKs and Modules</label></li>
+                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#ios"><i class="sdk-icon-ios"></i></a></li>
+                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#android"><i class="sdk-icon-android"></i></a></li>
+                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#javascript"><i class="sdk-icon-js"></i></a></li>
+                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#nodejs"><i class="sdk-icon-node"></i></a></li>
+                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#ruby"><i class="sdk-icon-ruby"></i></a></li>
+                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#c"><i class="sdk-icon-net"></i></a></li>
+                        </ul>
+                      </li>
+                    </ul>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </nav>
+        <!--for demo mode-->
+        <!--todo - this needs a style applied only when shown ng-class-->
+        <div ng-controller="AlertCtrl" ng-cloak class="alert-holder main-alert">
+          <alerti ng-repeat="alert in alerts" type="alert.type" closeable="true" index="$index" ng-cloak>{{alert.msg}}</alerti>
+        </div>
+
+        <insecure-banner></insecure-banner>
+        <!--Dynamic Content-->
+        <div ng-view class="page-holder"></div>
+
+        <footer>
+          <hr>
+          <p class="pull-right">&copy; Apigee 2013</p>
+        </footer>
+      </div>
+    </div>
+  </div>
+</section>
+<script src="config.js"></script>
+
+<script src="js/libs/usergrid-libs.min.js"></script>
+<script src="js/libs/bootstrap/custom/js/bootstrap.min.js"></script>
+<!--todo - remove this. temporarily including jquery ui for calendar in push-->
+<script src="js/libs/jqueryui/jquery.ui.timepicker.min.js" type="text/javascript"></script>
+<!-- In dev use: <script src="js/libs/angular-1.1.5.js"></script> -->
+<!--<script type="text/javascript" src="js/libs/angular-ui-ng-grid/ng-grid-2.0.2.debug.js"></script>-->
+
+<script id="main-script" src="js/usergrid.min.js"></script>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5da8ea8e/portal/index.html
----------------------------------------------------------------------
diff --git a/portal/index.html b/portal/index.html
deleted file mode 100644
index 99a5577..0000000
--- a/portal/index.html
+++ /dev/null
@@ -1,238 +0,0 @@
-<!doctype html>
-<html lang="en" ng-app="appservices">
-<head>
-  <meta charset="utf-8">
-  <title>Apigee App Services</title>
-  <meta name="viewport" content="width=device-width, initial-scale=1.0">
-  <meta name="description" content="">
-  <meta name="author" content="">
-
-  <link href="js/libs/bootstrap/custom/css/bootstrap.css" rel="stylesheet">
-  <link href="css/dash.min.css" rel="stylesheet">
-  <link id="perf-script" href="bower_components/apigee.performance.ui/dist/css/performance.min.css" rel="stylesheet">
-
-  <!--styles for jquery ui calendar component-->
-  <link rel="stylesheet" type="text/css" href="js/libs/jqueryui/jquery-ui-1.8.9.custom.css">
-  <link rel="stylesheet" type="text/css" href="js/libs/jqueryui/jquery-ui-timepicker.css">
-</head>
-<body ng-controller="PageCtrl">
-<!-- Google Tag Manager -->
-<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-N52333" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
-<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
-    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
-    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
-    '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
-})(window,document,'script','dataLayer','GTM-N52333');</script>
-<!-- End Google Tag Manager -->
-<header>
-  <nav class="navbar navbar-static-top">
-    <div class="container-fluid">
-      <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
-        <span class="icon-bar"></span>
-        <span class="icon-bar"></span>
-        <span class="icon-bar"></span>
-      </button>
-      <a class="brand" href="#"><img src="img/logo.gif"></a>
-
-      <div appswitcher=""></div>
-
-
-      <div class="nav-collapse collapse" ng-show="loaded">
-
-        <div class="navbar-text pull-right" ng-if="activeUI">
-          <span class="navbar-text" id="userEmail">{{userEmail || 'anonymous'}}</span> |
-          <span ng-controller="LoginCtrl"><a id="logout-link" ng-click="logout()" title="logout"><i class="pictogram">&#59201</i></a></span>
-          <span><a ng-click="profile()" title="profile"><i class="pictogram">&#59170</i></a></span> |
-          <span><a href="archive/" target="_blank">Legacy Portal</a></span>
-        </div>
-
-      </div>
-    </div>
-  </nav>
-</header>
-<section class="side-menu" ng-show="activeUI">
-  <div class="sidebar-nav">
-    <div class="nav-collapse collapse">
-
-      <org-menu context="orgmenu"></org-menu>
-
-    </div>
-    <div class="nav-collapse collapse">
-      <ul class="nav nav-list" menu="sideMenu">
-        <li class="option active">
-          <a href="#!/org-overview"><i class="pictogram">&#128193</i>Org Overview</a>
-        </li>
-        <li class="option active">
-          <a href="#!/getting-started/setup"><i class="pictogram">&#128640;</i>Getting Started</a>
-        </li>
-
-        <li class="option">
-          <a href="#!/app-overview/summary"><i class="pictogram">&#59214;</i>App Overview</a>
-          <ul class="nav nav-list">
-            <li>
-              <a href="#!/app-overview/summary"><i class="pictogram sub">&#128241;</i> Summary</a>
-            </li>
-          </ul>
-        </li>
-
-
-        <li class="option">
-          <a href="#!/users"><i class="pictogram">&#128100;</i>Users</a>
-          <ul class="nav nav-list">
-            <li>
-              <a href="#!/users"><i class="pictogram sub">&#128100;</i>Users</a>
-            </li>
-            <li>
-              <a href="#!/groups"><i class="pictogram sub">&#128101;</i>Groups</a>
-            </li>
-            <li>
-              <a href="#!/roles"><i class="pictogram sub">&#59170;</i>Roles</a>
-            </li>
-          </ul>
-        </li>
-
-        <li class="option" id="perf-script">
-          <a href="#!/performance/app-usage?timeFilter={{selectedtimefilter.value}}&amp;sessionChartFilter={{selectedChartCriteria.chartCriteriaId}}&amp;currentCompare={{currentCompare}}"><i class="pictogram">&#128711;</i>Monitoring <div class="new-tag">new</div></a>
-          <ul class="nav nav-list">
-            <li><a href="#!/performance/app-usage?timeFilter={{selectedtimefilter.value}}&amp;sessionChartFilter={{selectedChartCriteria.chartCriteriaId}}&amp;currentCompare={{currentCompare}}"><i class="pictogram sub">&#128202;</i>App Usage</a></li>
-            <li><a href="#!/performance/errors-crashes?timeFilter={{selectedtimefilter.value}}&amp;logChartFilter={{selectedChartCriteria.chartCriteriaId}}&amp;currentCompare={{currentCompare}}"><i class="pictogram sub">&#9889;</i>Errors &amp;
-              Crashes</a></li>
-            <li><a href="#!/performance/api-perf?timeFilter={{selectedtimefilter.value}}&amp;networkChartFilter={{selectedChartCriteria.chartCriteriaId}}&amp;currentCompare={{currentCompare}}"><i class="pictogram sub">&#128200;</i>API Performance</a>
-            </li>
-          </ul>
-        </li>
-
-
-        <li class="option">
-          <a href="#!/push/sendNotification"><i class="pictogram">&#59200;</i>Push</a>
-          <ul class="nav nav-list">
-            <li>
-              <a href="#!/push/sendNotification"><i class="pictogram sub">&#128319;</i>Send
-                Notification</a>
-            </li>
-            <li>
-              <a href="#!/push/history"><i class="pictogram sub">&#9991;</i>Message History</a>
-            </li>
-            <li>
-              <a href="#!/push/configuration"><i class="pictogram sub">&#9874;</i>Configuration</a>
-            </li>
-            <li>
-              <a href="#!/push/getStarted"><i class="pictogram sub">&#59176;</i>Getting Started</a>
-            </li>
-          </ul>
-        </li>
-
-
-        <li class="option">
-          <a href="#!/data"><i class="pictogram">&#128248;</i>Data</a>
-          <ul class="nav nav-list">
-            <li>
-              <a href="#!/data"><i class="pictogram sub">&#128254;</i>Collections</a>
-            </li>
-            <!--li>
-              <a href="#!/data/shell"><i class="pictogram sub">&#128254;</i>Shell</a>
-            </li-->
-          </ul>
-        </li>
-
-        <li class="option">
-          <a href="#!/activities"><i class="pictogram ">&#59194;</i> Activities</a>
-        </li>
-
-
-        <li class="option" id="perf-script">
-          <a href="#!/configure/default-configs"><i class="pictogram">&#9874;</i>Configure</a>
-          <ul class="nav nav-list">
-            <li><a href="#!/configure/default-configs"><i class="pictogram sub">&#128214;</i>Default
-              Configs</a></li>
-            <li><a href="#!/configure/beta-configs"><i class="pictogram sub">&#59190;</i>Beta Testing Configs</a>
-            </li>
-            <li><a href="#!/configure/ab-configs"><i class="pictogram sub">&#59146;</i>A/B Testing
-              Configs</a></li>
-          </ul>
-        </li>
-        <li class="option">
-          <a href="#!/shell"><i class="pictogram">&#9000;</i>Shell</a>
-        </li>
-
-      </ul>
-    </div>
-  </div>
-</section>
-
-<section class="main-content" ng-show="loaded">
-  <div class="container-fluid">
-    <div class="row-fluid">
-      <div class="span12">
-
-        <!--header app/org context nav-->
-
-        <nav class="navbar secondary" ng-show="activeUI">
-          <div class="container-fluid">
-            <div class="row-fluid">
-              <div class="span12">
-                <div class="span5">
-                  <app-menu></app-menu>
-                </div>
-                <div class="span7 button-area">
-                  <div class="nav-collapse collapse">
-                    <ul class="helper-links nav span12">
-                      <li class="sdks span12">
-                        <ul class="pull-right">
-                          <li class="title"><label>SDKs and Modules</label></li>
-                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#ios"><i class="sdk-icon-ios"></i></a></li>
-                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#android"><i class="sdk-icon-android"></i></a></li>
-                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#javascript"><i class="sdk-icon-js"></i></a></li>
-                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#nodejs"><i class="sdk-icon-node"></i></a></li>
-                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#ruby"><i class="sdk-icon-ruby"></i></a></li>
-                          <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#c"><i class="sdk-icon-net"></i></a></li>
-                        </ul>
-                      </li>
-                    </ul>
-                  </div>
-                </div>
-              </div>
-            </div>
-          </div>
-        </nav>
-        <!--for demo mode-->
-        <!--todo - this needs a style applied only when shown ng-class-->
-        <div ng-controller="AlertCtrl" ng-cloak="" class="alert-holder main-alert">
-          <alerti ng-repeat="alert in alerts" type="alert.type" closeable="true" index="$index" ng-cloak="">{{alert.msg}}</alerti>
-        </div>
-
-        <insecure-banner></insecure-banner>
-        <!--Dynamic Content-->
-        <div ng-view="" class="page-holder"></div>
-
-        <footer>
-          <hr>
-          <p class="pull-right">&copy; Apigee 2013</p>
-        </footer>
-      </div>
-    </div>
-  </div>
-</section>
-<script src="config.js"></script>
-<script src="js/libs/usergrid-libs.min.js"></script>
-<script src="js/libs/bootstrap/custom/js/bootstrap.min.js"></script>
-<!--todo - remove this. temporarily including jquery ui for calendar in push-->
-<script src="js/libs/jqueryui/jquery.ui.timepicker.min.js" type="text/javascript"></script>
-<!-- In dev use: <script src="js/libs/angular-1.1.5.js"></script> -->
-<!--<script type="text/javascript" src="js/libs/angular-ui-ng-grid/ng-grid-2.0.2.debug.js"></script>-->
-<script id="main-script" src="js/usergrid.min.js"></script>
-
-<script type="text/javascript">
-  var _gaq = _gaq || [];
-  _gaq.push(['_setAccount', 'UA-4084158-4']);
-
-  (function() {
-    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
-    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
-    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
-  })();
-
-</script>
-
-<script id="perf-script" src="bower_components/apigee.performance.ui/dist/js/usergrid-perf.min.js"></script></body>
-</html>


[04/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/bootstrap/js/bootstrap.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/bootstrap/js/bootstrap.js b/portal/js/libs/bootstrap/js/bootstrap.js
new file mode 100644
index 0000000..5111e9a
--- /dev/null
+++ b/portal/js/libs/bootstrap/js/bootstrap.js
@@ -0,0 +1,2117 @@
+/* ===================================================
+ * bootstrap-transition.js v2.3.1
+ * http://twitter.github.com/bootstrap/javascript.html#transitions
+ * ===================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+  /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
+   * ======================================================= */
+
+  $(function () {
+
+    $.support.transition = (function () {
+
+      var transitionEnd = (function () {
+
+        var el = document.createElement('bootstrap')
+            , transEndEventNames = {
+              'WebkitTransition': 'webkitTransitionEnd', 'MozTransition': 'transitionend', 'OTransition': 'oTransitionEnd otransitionend', 'transition': 'transitionend'
+            }
+            , name
+
+        for (name in transEndEventNames) {
+          if (el.style[name] !== undefined) {
+            return transEndEventNames[name]
+          }
+        }
+
+      }())
+
+      return transitionEnd && {
+        end: transitionEnd
+      }
+
+    })()
+
+  })
+
+}(window.jQuery);
+/* ==========================================================
+ * bootstrap-alert.js v2.3.1
+ * http://twitter.github.com/bootstrap/javascript.html#alerts
+ * ==========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+  /* ALERT CLASS DEFINITION
+   * ====================== */
+
+  var dismiss = '[data-dismiss="alert"]'
+      , Alert = function (el) {
+        $(el).on('click', dismiss, this.close)
+      }
+
+  Alert.prototype.close = function (e) {
+    var $this = $(this)
+        , selector = $this.attr('data-target')
+        , $parent
+
+    if (!selector) {
+      selector = $this.attr('href')
+      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+    }
+
+    $parent = $(selector)
+
+    e && e.preventDefault()
+
+    $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
+
+    $parent.trigger(e = $.Event('close'))
+
+    if (e.isDefaultPrevented()) return
+
+    $parent.removeClass('in')
+
+    function removeElement() {
+      $parent
+          .trigger('closed')
+          .remove()
+    }
+
+    $.support.transition && $parent.hasClass('fade') ?
+        $parent.on($.support.transition.end, removeElement) :
+        removeElement()
+  }
+
+
+  /* ALERT PLUGIN DEFINITION
+   * ======================= */
+
+  var old = $.fn.alert
+
+  $.fn.alert = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+          , data = $this.data('alert')
+      if (!data) $this.data('alert', (data = new Alert(this)))
+      if (typeof option == 'string') data[option].call($this)
+    })
+  }
+
+  $.fn.alert.Constructor = Alert
+
+
+  /* ALERT NO CONFLICT
+   * ================= */
+
+  $.fn.alert.noConflict = function () {
+    $.fn.alert = old
+    return this
+  }
+
+
+  /* ALERT DATA-API
+   * ============== */
+
+  $(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
+
+}(window.jQuery);
+/* ============================================================
+ * bootstrap-button.js v2.3.1
+ * http://twitter.github.com/bootstrap/javascript.html#buttons
+ * ============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+  /* BUTTON PUBLIC CLASS DEFINITION
+   * ============================== */
+
+  var Button = function (element, options) {
+    this.$element = $(element)
+    this.options = $.extend({}, $.fn.button.defaults, options)
+  }
+
+  Button.prototype.setState = function (state) {
+    var d = 'disabled'
+        , $el = this.$element
+        , data = $el.data()
+        , val = $el.is('input') ? 'val' : 'html'
+
+    state = state + 'Text'
+    data.resetText || $el.data('resetText', $el[val]())
+
+    $el[val](data[state] || this.options[state])
+
+    // push to event loop to allow forms to submit
+    setTimeout(function () {
+      state == 'loadingText' ?
+          $el.addClass(d).attr(d, d) :
+          $el.removeClass(d).removeAttr(d)
+    }, 0)
+  }
+
+  Button.prototype.toggle = function () {
+    var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
+
+    $parent && $parent
+        .find('.active')
+        .removeClass('active')
+
+    this.$element.toggleClass('active')
+  }
+
+
+  /* BUTTON PLUGIN DEFINITION
+   * ======================== */
+
+  var old = $.fn.button
+
+  $.fn.button = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+          , data = $this.data('button')
+          , options = typeof option == 'object' && option
+      if (!data) $this.data('button', (data = new Button(this, options)))
+      if (option == 'toggle') data.toggle()
+      else if (option) data.setState(option)
+    })
+  }
+
+  $.fn.button.defaults = {
+    loadingText: 'loading...'
+  }
+
+  $.fn.button.Constructor = Button
+
+
+  /* BUTTON NO CONFLICT
+   * ================== */
+
+  $.fn.button.noConflict = function () {
+    $.fn.button = old
+    return this
+  }
+
+
+  /* BUTTON DATA-API
+   * =============== */
+
+  $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) {
+    var $btn = $(e.target)
+    if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
+    $btn.button('toggle')
+  })
+
+}(window.jQuery);
+/* ==========================================================
+ * bootstrap-carousel.js v2.3.1
+ * http://twitter.github.com/bootstrap/javascript.html#carousel
+ * ==========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+  /* CAROUSEL CLASS DEFINITION
+   * ========================= */
+
+  var Carousel = function (element, options) {
+    this.$element = $(element)
+    this.$indicators = this.$element.find('.carousel-indicators')
+    this.options = options
+    this.options.pause == 'hover' && this.$element
+        .on('mouseenter', $.proxy(this.pause, this))
+        .on('mouseleave', $.proxy(this.cycle, this))
+  }
+
+  Carousel.prototype = {
+
+    cycle: function (e) {
+      if (!e) this.paused = false
+      if (this.interval) clearInterval(this.interval);
+      this.options.interval
+          && !this.paused
+      && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
+      return this
+    }, getActiveIndex: function () {
+      this.$active = this.$element.find('.item.active')
+      this.$items = this.$active.parent().children()
+      return this.$items.index(this.$active)
+    }, to: function (pos) {
+      var activeIndex = this.getActiveIndex()
+          , that = this
+
+      if (pos > (this.$items.length - 1) || pos < 0) return
+
+      if (this.sliding) {
+        return this.$element.one('slid', function () {
+          that.to(pos)
+        })
+      }
+
+      if (activeIndex == pos) {
+        return this.pause().cycle()
+      }
+
+      return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
+    }, pause: function (e) {
+      if (!e) this.paused = true
+      if (this.$element.find('.next, .prev').length && $.support.transition.end) {
+        this.$element.trigger($.support.transition.end)
+        this.cycle(true)
+      }
+      clearInterval(this.interval)
+      this.interval = null
+      return this
+    }, next: function () {
+      if (this.sliding) return
+      return this.slide('next')
+    }, prev: function () {
+      if (this.sliding) return
+      return this.slide('prev')
+    }, slide: function (type, next) {
+      var $active = this.$element.find('.item.active')
+          , $next = next || $active[type]()
+          , isCycling = this.interval
+          , direction = type == 'next' ? 'left' : 'right'
+          , fallback = type == 'next' ? 'first' : 'last'
+          , that = this
+          , e
+
+      this.sliding = true
+
+      isCycling && this.pause()
+
+      $next = $next.length ? $next : this.$element.find('.item')[fallback]()
+
+      e = $.Event('slide', {
+        relatedTarget: $next[0], direction: direction
+      })
+
+      if ($next.hasClass('active')) return
+
+      if (this.$indicators.length) {
+        this.$indicators.find('.active').removeClass('active')
+        this.$element.one('slid', function () {
+          var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
+          $nextIndicator && $nextIndicator.addClass('active')
+        })
+      }
+
+      if ($.support.transition && this.$element.hasClass('slide')) {
+        this.$element.trigger(e)
+        if (e.isDefaultPrevented()) return
+        $next.addClass(type)
+        $next[0].offsetWidth // force reflow
+        $active.addClass(direction)
+        $next.addClass(direction)
+        this.$element.one($.support.transition.end, function () {
+          $next.removeClass([type, direction].join(' ')).addClass('active')
+          $active.removeClass(['active', direction].join(' '))
+          that.sliding = false
+          setTimeout(function () {
+            that.$element.trigger('slid')
+          }, 0)
+        })
+      } else {
+        this.$element.trigger(e)
+        if (e.isDefaultPrevented()) return
+        $active.removeClass('active')
+        $next.addClass('active')
+        this.sliding = false
+        this.$element.trigger('slid')
+      }
+
+      isCycling && this.cycle()
+
+      return this
+    }
+
+  }
+
+
+  /* CAROUSEL PLUGIN DEFINITION
+   * ========================== */
+
+  var old = $.fn.carousel
+
+  $.fn.carousel = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+          , data = $this.data('carousel')
+          , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
+          , action = typeof option == 'string' ? option : options.slide
+      if (!data) $this.data('carousel', (data = new Carousel(this, options)))
+      if (typeof option == 'number') data.to(option)
+      else if (action) data[action]()
+      else if (options.interval) data.pause().cycle()
+    })
+  }
+
+  $.fn.carousel.defaults = {
+    interval: 5000, pause: 'hover'
+  }
+
+  $.fn.carousel.Constructor = Carousel
+
+
+  /* CAROUSEL NO CONFLICT
+   * ==================== */
+
+  $.fn.carousel.noConflict = function () {
+    $.fn.carousel = old
+    return this
+  }
+
+  /* CAROUSEL DATA-API
+   * ================= */
+
+  $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
+    var $this = $(this), href
+        , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
+        , options = $.extend({}, $target.data(), $this.data())
+        , slideIndex
+
+    $target.carousel(options)
+
+    if (slideIndex = $this.attr('data-slide-to')) {
+      $target.data('carousel').pause().to(slideIndex).cycle()
+    }
+
+    e.preventDefault()
+  })
+
+}(window.jQuery);
+/* =============================================================
+ * bootstrap-collapse.js v2.3.1
+ * http://twitter.github.com/bootstrap/javascript.html#collapse
+ * =============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+  /* COLLAPSE PUBLIC CLASS DEFINITION
+   * ================================ */
+
+  var Collapse = function (element, options) {
+    this.$element = $(element)
+    this.options = $.extend({}, $.fn.collapse.defaults, options)
+
+    if (this.options.parent) {
+      this.$parent = $(this.options.parent)
+    }
+
+    this.options.toggle && this.toggle()
+  }
+
+  Collapse.prototype = {
+
+    constructor: Collapse, dimension: function () {
+      var hasWidth = this.$element.hasClass('width')
+      return hasWidth ? 'width' : 'height'
+    }, show: function () {
+      var dimension
+          , scroll
+          , actives
+          , hasData
+
+      if (this.transitioning || this.$element.hasClass('in')) return
+
+      dimension = this.dimension()
+      scroll = $.camelCase(['scroll', dimension].join('-'))
+      actives = this.$parent && this.$parent.find('> .accordion-group > .in')
+
+      if (actives && actives.length) {
+        hasData = actives.data('collapse')
+        if (hasData && hasData.transitioning) return
+        actives.collapse('hide')
+        hasData || actives.data('collapse', null)
+      }
+
+      this.$element[dimension](0)
+      this.transition('addClass', $.Event('show'), 'shown')
+      $.support.transition && this.$element[dimension](this.$element[0][scroll])
+    }, hide: function () {
+      var dimension
+      if (this.transitioning || !this.$element.hasClass('in')) return
+      dimension = this.dimension()
+      this.reset(this.$element[dimension]())
+      this.transition('removeClass', $.Event('hide'), 'hidden')
+      this.$element[dimension](0)
+    }, reset: function (size) {
+      var dimension = this.dimension()
+
+      this.$element
+          .removeClass('collapse')
+          [dimension](size || 'auto')
+          [0].offsetWidth
+
+      this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
+
+      return this
+    }, transition: function (method, startEvent, completeEvent) {
+      var that = this
+          , complete = function () {
+            if (startEvent.type == 'show') that.reset()
+            that.transitioning = 0
+            that.$element.trigger(completeEvent)
+          }
+
+      this.$element.trigger(startEvent)
+
+      if (startEvent.isDefaultPrevented()) return
+
+      this.transitioning = 1
+
+      this.$element[method]('in')
+
+      $.support.transition && this.$element.hasClass('collapse') ?
+          this.$element.one($.support.transition.end, complete) :
+          complete()
+    }, toggle: function () {
+      this[this.$element.hasClass('in') ? 'hide' : 'show']()
+    }
+
+  }
+
+
+  /* COLLAPSE PLUGIN DEFINITION
+   * ========================== */
+
+  var old = $.fn.collapse
+
+  $.fn.collapse = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+          , data = $this.data('collapse')
+          , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
+      if (!data) $this.data('collapse', (data = new Collapse(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.collapse.defaults = {
+    toggle: true
+  }
+
+  $.fn.collapse.Constructor = Collapse
+
+
+  /* COLLAPSE NO CONFLICT
+   * ==================== */
+
+  $.fn.collapse.noConflict = function () {
+    $.fn.collapse = old
+    return this
+  }
+
+
+  /* COLLAPSE DATA-API
+   * ================= */
+
+  $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
+    var $this = $(this), href
+        , target = $this.attr('data-target')
+            || e.preventDefault()
+            || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
+        , option = $(target).data('collapse') ? 'toggle' : $this.data()
+    $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
+    $(target).collapse(option)
+  })
+
+}(window.jQuery);
+/* ============================================================
+ * bootstrap-dropdown.js v2.3.1
+ * http://twitter.github.com/bootstrap/javascript.html#dropdowns
+ * ============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+  /* DROPDOWN CLASS DEFINITION
+   * ========================= */
+
+  var toggle = '[data-toggle=dropdown]'
+      , Dropdown = function (element) {
+        var $el = $(element).on('click.dropdown.data-api', this.toggle)
+        $('html').on('click.dropdown.data-api', function () {
+          $el.parent().removeClass('open')
+        })
+      }
+
+  Dropdown.prototype = {
+
+    constructor: Dropdown, toggle: function (e) {
+      var $this = $(this)
+          , $parent
+          , isActive
+
+      if ($this.is('.disabled, :disabled')) return
+
+      $parent = getParent($this)
+
+      isActive = $parent.hasClass('open')
+
+      clearMenus()
+
+      if (!isActive) {
+        $parent.toggleClass('open')
+      }
+
+      $this.focus()
+
+      return false
+    }, keydown: function (e) {
+      var $this
+          , $items
+          , $active
+          , $parent
+          , isActive
+          , index
+
+      if (!/(38|40|27)/.test(e.keyCode)) return
+
+      $this = $(this)
+
+      e.preventDefault()
+      e.stopPropagation()
+
+      if ($this.is('.disabled, :disabled')) return
+
+      $parent = getParent($this)
+
+      isActive = $parent.hasClass('open')
+
+      if (!isActive || (isActive && e.keyCode == 27)) {
+        if (e.which == 27) $parent.find(toggle).focus()
+        return $this.click()
+      }
+
+      $items = $('[role=menu] li:not(.divider):visible a', $parent)
+
+      if (!$items.length) return
+
+      index = $items.index($items.filter(':focus'))
+
+      if (e.keyCode == 38 && index > 0) index--                                        // up
+      if (e.keyCode == 40 && index < $items.length - 1) index++                        // down
+      if (!~index) index = 0
+
+      $items
+          .eq(index)
+          .focus()
+    }
+
+  }
+
+  function clearMenus() {
+    $(toggle).each(function () {
+      getParent($(this)).removeClass('open')
+    })
+  }
+
+  function getParent($this) {
+    var selector = $this.attr('data-target')
+        , $parent
+
+    if (!selector) {
+      selector = $this.attr('href')
+      selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+    }
+
+    $parent = selector && $(selector)
+
+    if (!$parent || !$parent.length) $parent = $this.parent()
+
+    return $parent
+  }
+
+
+  /* DROPDOWN PLUGIN DEFINITION
+   * ========================== */
+
+  var old = $.fn.dropdown
+
+  $.fn.dropdown = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+          , data = $this.data('dropdown')
+      if (!data) $this.data('dropdown', (data = new Dropdown(this)))
+      if (typeof option == 'string') data[option].call($this)
+    })
+  }
+
+  $.fn.dropdown.Constructor = Dropdown
+
+
+  /* DROPDOWN NO CONFLICT
+   * ==================== */
+
+  $.fn.dropdown.noConflict = function () {
+    $.fn.dropdown = old
+    return this
+  }
+
+
+  /* APPLY TO STANDARD DROPDOWN ELEMENTS
+   * =================================== */
+
+  $(document)
+      .on('click.dropdown.data-api', clearMenus)
+      .on('click.dropdown.data-api', '.dropdown form', function (e) {
+        e.stopPropagation()
+      })
+      .on('click.dropdown-menu', function (e) {
+        e.stopPropagation()
+      })
+      .on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
+      .on('keydown.dropdown.data-api', toggle + ', [role=menu]', Dropdown.prototype.keydown)
+
+}(window.jQuery);
+/* =========================================================
+ * bootstrap-modal.js v2.3.1
+ * http://twitter.github.com/bootstrap/javascript.html#modals
+ * =========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================= */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+  /* MODAL CLASS DEFINITION
+   * ====================== */
+
+  var Modal = function (element, options) {
+    this.options = options
+    this.$element = $(element)
+        .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
+    this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
+  }
+
+  Modal.prototype = {
+
+    constructor: Modal, toggle: function () {
+      return this[!this.isShown ? 'show' : 'hide']()
+    }, show: function () {
+      var that = this
+          , e = $.Event('show')
+
+      this.$element.trigger(e)
+
+      if (this.isShown || e.isDefaultPrevented()) return
+
+      this.isShown = true
+
+      this.escape()
+
+      this.backdrop(function () {
+        var transition = $.support.transition && that.$element.hasClass('fade')
+
+        if (!that.$element.parent().length) {
+          that.$element.appendTo(document.body) //don't move modals dom position
+        }
+
+        that.$element.show()
+
+        if (transition) {
+          that.$element[0].offsetWidth // force reflow
+        }
+
+        that.$element
+            .addClass('in')
+            .attr('aria-hidden', false)
+
+        that.enforceFocus()
+
+        transition ?
+            that.$element.one($.support.transition.end, function () {
+              that.$element.focus().trigger('shown')
+            }) :
+            that.$element.focus().trigger('shown')
+
+      })
+    }, hide: function (e) {
+      e && e.preventDefault()
+
+      var that = this
+
+      e = $.Event('hide')
+
+      this.$element.trigger(e)
+
+      if (!this.isShown || e.isDefaultPrevented()) return
+
+      this.isShown = false
+
+      this.escape()
+
+      $(document).off('focusin.modal')
+
+      this.$element
+          .removeClass('in')
+          .attr('aria-hidden', true)
+
+      $.support.transition && this.$element.hasClass('fade') ?
+          this.hideWithTransition() :
+          this.hideModal()
+    }, enforceFocus: function () {
+      var that = this
+      $(document).on('focusin.modal', function (e) {
+        if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
+          that.$element.focus()
+        }
+      })
+    }, escape: function () {
+      var that = this
+      if (this.isShown && this.options.keyboard) {
+        this.$element.on('keyup.dismiss.modal', function (e) {
+          e.which == 27 && that.hide()
+        })
+      } else if (!this.isShown) {
+        this.$element.off('keyup.dismiss.modal')
+      }
+    }, hideWithTransition: function () {
+      var that = this
+          , timeout = setTimeout(function () {
+            that.$element.off($.support.transition.end)
+            that.hideModal()
+          }, 500)
+
+      this.$element.one($.support.transition.end, function () {
+        clearTimeout(timeout)
+        that.hideModal()
+      })
+    }, hideModal: function () {
+      var that = this
+      this.$element.hide()
+      this.backdrop(function () {
+        that.removeBackdrop()
+        that.$element.trigger('hidden')
+      })
+    }, removeBackdrop: function () {
+      this.$backdrop && this.$backdrop.remove()
+      this.$backdrop = null
+    }, backdrop: function (callback) {
+      var that = this
+          , animate = this.$element.hasClass('fade') ? 'fade' : ''
+
+      if (this.isShown && this.options.backdrop) {
+        var doAnimate = $.support.transition && animate
+
+        this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
+            .appendTo(document.body)
+
+        this.$backdrop.click(
+            this.options.backdrop == 'static' ?
+                $.proxy(this.$element[0].focus, this.$element[0])
+                : $.proxy(this.hide, this)
+        )
+
+        if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
+
+        this.$backdrop.addClass('in')
+
+        if (!callback) return
+
+        doAnimate ?
+            this.$backdrop.one($.support.transition.end, callback) :
+            callback()
+
+      } else if (!this.isShown && this.$backdrop) {
+        this.$backdrop.removeClass('in')
+
+        $.support.transition && this.$element.hasClass('fade') ?
+            this.$backdrop.one($.support.transition.end, callback) :
+            callback()
+
+      } else if (callback) {
+        callback()
+      }
+    }
+  }
+
+
+  /* MODAL PLUGIN DEFINITION
+   * ======================= */
+
+  var old = $.fn.modal
+
+  $.fn.modal = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+          , data = $this.data('modal')
+          , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
+      if (!data) $this.data('modal', (data = new Modal(this, options)))
+      if (typeof option == 'string') data[option]()
+      else if (options.show) data.show()
+    })
+  }
+
+  $.fn.modal.defaults = {
+    backdrop: true, keyboard: true, show: true
+  }
+
+  $.fn.modal.Constructor = Modal
+
+
+  /* MODAL NO CONFLICT
+   * ================= */
+
+  $.fn.modal.noConflict = function () {
+    $.fn.modal = old
+    return this
+  }
+
+
+  /* MODAL DATA-API
+   * ============== */
+
+  $(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) {
+    var $this = $(this)
+        , href = $this.attr('href')
+        , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
+        , option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
+
+    e.preventDefault()
+
+    $target
+        .modal(option)
+        .one('hide', function () {
+          $this.focus()
+        })
+  })
+
+}(window.jQuery);
+/* ===========================================================
+ * bootstrap-tooltip.js v2.3.1
+ * http://twitter.github.com/bootstrap/javascript.html#tooltips
+ * Inspired by the original jQuery.tipsy by Jason Frame
+ * ===========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+  /* TOOLTIP PUBLIC CLASS DEFINITION
+   * =============================== */
+
+  var Tooltip = function (element, options) {
+    this.init('tooltip', element, options)
+  }
+
+  Tooltip.prototype = {
+
+    constructor: Tooltip, init: function (type, element, options) {
+      var eventIn
+          , eventOut
+          , triggers
+          , trigger
+          , i
+
+      this.type = type
+      this.$element = $(element)
+      this.options = this.getOptions(options)
+      this.enabled = true
+
+      triggers = this.options.trigger.split(' ')
+
+      for (i = triggers.length; i--;) {
+        trigger = triggers[i]
+        if (trigger == 'click') {
+          this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
+        } else if (trigger != 'manual') {
+          eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
+          eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
+          this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
+          this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
+        }
+      }
+
+      this.options.selector ?
+          (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
+          this.fixTitle()
+    }, getOptions: function (options) {
+      options = $.extend({}, $.fn[this.type].defaults, this.$element.data(), options)
+
+      if (options.delay && typeof options.delay == 'number') {
+        options.delay = {
+          show: options.delay, hide: options.delay
+        }
+      }
+
+      return options
+    }, enter: function (e) {
+      var defaults = $.fn[this.type].defaults
+          , options = {}
+          , self
+
+      this._options && $.each(this._options, function (key, value) {
+        if (defaults[key] != value) options[key] = value
+      }, this)
+
+      self = $(e.currentTarget)[this.type](options).data(this.type)
+
+      if (!self.options.delay || !self.options.delay.show) return self.show()
+
+      clearTimeout(this.timeout)
+      self.hoverState = 'in'
+      this.timeout = setTimeout(function () {
+        if (self.hoverState == 'in') self.show()
+      }, self.options.delay.show)
+    }, leave: function (e) {
+      var self = $(e.currentTarget)[this.type](this._options).data(this.type)
+
+      if (this.timeout) clearTimeout(this.timeout)
+      if (!self.options.delay || !self.options.delay.hide) return self.hide()
+
+      self.hoverState = 'out'
+      this.timeout = setTimeout(function () {
+        if (self.hoverState == 'out') self.hide()
+      }, self.options.delay.hide)
+    }, show: function () {
+      var $tip
+          , pos
+          , actualWidth
+          , actualHeight
+          , placement
+          , tp
+          , e = $.Event('show')
+
+      if (this.hasContent() && this.enabled) {
+        this.$element.trigger(e)
+        if (e.isDefaultPrevented()) return
+        $tip = this.tip()
+        this.setContent()
+
+        if (this.options.animation) {
+          $tip.addClass('fade')
+        }
+
+        placement = typeof this.options.placement == 'function' ?
+            this.options.placement.call(this, $tip[0], this.$element[0]) :
+            this.options.placement
+
+        $tip
+            .detach()
+            .css({ top: 0, left: 0, display: 'block' })
+
+        this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
+
+        pos = this.getPosition()
+
+        actualWidth = $tip[0].offsetWidth
+        actualHeight = $tip[0].offsetHeight
+
+        switch (placement) {
+          case 'bottom':
+            tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
+            break
+          case 'top':
+            tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
+            break
+          case 'left':
+            tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
+            break
+          case 'right':
+            tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
+            break
+        }
+
+        this.applyPlacement(tp, placement)
+        this.$element.trigger('shown')
+      }
+    }, applyPlacement: function (offset, placement) {
+      var $tip = this.tip()
+          , width = $tip[0].offsetWidth
+          , height = $tip[0].offsetHeight
+          , actualWidth
+          , actualHeight
+          , delta
+          , replace
+
+      $tip
+          .offset(offset)
+          .addClass(placement)
+          .addClass('in')
+
+      actualWidth = $tip[0].offsetWidth
+      actualHeight = $tip[0].offsetHeight
+
+      if (placement == 'top' && actualHeight != height) {
+        offset.top = offset.top + height - actualHeight
+        replace = true
+      }
+
+      if (placement == 'bottom' || placement == 'top') {
+        delta = 0
+
+        if (offset.left < 0) {
+          delta = offset.left * -2
+          offset.left = 0
+          $tip.offset(offset)
+          actualWidth = $tip[0].offsetWidth
+          actualHeight = $tip[0].offsetHeight
+        }
+
+        this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
+      } else {
+        this.replaceArrow(actualHeight - height, actualHeight, 'top')
+      }
+
+      if (replace) $tip.offset(offset)
+    }, replaceArrow: function (delta, dimension, position) {
+      this
+          .arrow()
+          .css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
+    }, setContent: function () {
+      var $tip = this.tip()
+          , title = this.getTitle()
+
+      $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
+      $tip.removeClass('fade in top bottom left right')
+    }, hide: function () {
+      var that = this
+          , $tip = this.tip()
+          , e = $.Event('hide')
+
+      this.$element.trigger(e)
+      if (e.isDefaultPrevented()) return
+
+      $tip.removeClass('in')
+
+      function removeWithAnimation() {
+        var timeout = setTimeout(function () {
+          $tip.off($.support.transition.end).detach()
+        }, 500)
+
+        $tip.one($.support.transition.end, function () {
+          clearTimeout(timeout)
+          $tip.detach()
+        })
+      }
+
+      $.support.transition && this.$tip.hasClass('fade') ?
+          removeWithAnimation() :
+          $tip.detach()
+
+      this.$element.trigger('hidden')
+
+      return this
+    }, fixTitle: function () {
+      var $e = this.$element
+      if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
+        $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
+      }
+    }, hasContent: function () {
+      return this.getTitle()
+    }, getPosition: function () {
+      var el = this.$element[0]
+      return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
+        width: el.offsetWidth, height: el.offsetHeight
+      }, this.$element.offset())
+    }, getTitle: function () {
+      var title
+          , $e = this.$element
+          , o = this.options
+
+      title = $e.attr('data-original-title')
+          || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
+
+      return title
+    }, tip: function () {
+      return this.$tip = this.$tip || $(this.options.template)
+    }, arrow: function () {
+      return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
+    }, validate: function () {
+      if (!this.$element[0].parentNode) {
+        this.hide()
+        this.$element = null
+        this.options = null
+      }
+    }, enable: function () {
+      this.enabled = true
+    }, disable: function () {
+      this.enabled = false
+    }, toggleEnabled: function () {
+      this.enabled = !this.enabled
+    }, toggle: function (e) {
+      var self = e ? $(e.currentTarget)[this.type](this._options).data(this.type) : this
+      self.tip().hasClass('in') ? self.hide() : self.show()
+    }, destroy: function () {
+      this.hide().$element.off('.' + this.type).removeData(this.type)
+    }
+
+  }
+
+
+  /* TOOLTIP PLUGIN DEFINITION
+   * ========================= */
+
+  var old = $.fn.tooltip
+
+  $.fn.tooltip = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+          , data = $this.data('tooltip')
+          , options = typeof option == 'object' && option
+      if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.tooltip.Constructor = Tooltip
+
+  $.fn.tooltip.defaults = {
+    animation: true, placement: 'top', selector: false, template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>', trigger: 'hover focus', title: '', delay: 0, html: false, container: false
+  }
+
+
+  /* TOOLTIP NO CONFLICT
+   * =================== */
+
+  $.fn.tooltip.noConflict = function () {
+    $.fn.tooltip = old
+    return this
+  }
+
+}(window.jQuery);
+/* ===========================================================
+ * bootstrap-popover.js v2.3.1
+ * http://twitter.github.com/bootstrap/javascript.html#popovers
+ * ===========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+  /* POPOVER PUBLIC CLASS DEFINITION
+   * =============================== */
+
+  var Popover = function (element, options) {
+    this.init('popover', element, options)
+  }
+
+
+  /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
+   ========================================== */
+
+  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
+
+    constructor: Popover, setContent: function () {
+      var $tip = this.tip()
+          , title = this.getTitle()
+          , content = this.getContent()
+
+      $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
+      $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
+
+      $tip.removeClass('fade top bottom left right in')
+    }, hasContent: function () {
+      return this.getTitle() || this.getContent()
+    }, getContent: function () {
+      var content
+          , $e = this.$element
+          , o = this.options
+
+      content = (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
+          || $e.attr('data-content')
+
+      return content
+    }, tip: function () {
+      if (!this.$tip) {
+        this.$tip = $(this.options.template)
+      }
+      return this.$tip
+    }, destroy: function () {
+      this.hide().$element.off('.' + this.type).removeData(this.type)
+    }
+
+  })
+
+
+  /* POPOVER PLUGIN DEFINITION
+   * ======================= */
+
+  var old = $.fn.popover
+
+  $.fn.popover = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+          , data = $this.data('popover')
+          , options = typeof option == 'object' && option
+      if (!data) $this.data('popover', (data = new Popover(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.popover.Constructor = Popover
+
+  $.fn.popover.defaults = $.extend({}, $.fn.tooltip.defaults, {
+    placement: 'right', trigger: 'click', content: '', template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
+  })
+
+
+  /* POPOVER NO CONFLICT
+   * =================== */
+
+  $.fn.popover.noConflict = function () {
+    $.fn.popover = old
+    return this
+  }
+
+}(window.jQuery);
+/* =============================================================
+ * bootstrap-scrollspy.js v2.3.1
+ * http://twitter.github.com/bootstrap/javascript.html#scrollspy
+ * =============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+  /* SCROLLSPY CLASS DEFINITION
+   * ========================== */
+
+  function ScrollSpy(element, options) {
+    var process = $.proxy(this.process, this)
+        , $element = $(element).is('body') ? $(window) : $(element)
+        , href
+    this.options = $.extend({}, $.fn.scrollspy.defaults, options)
+    this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
+    this.selector = (this.options.target
+        || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
+        || '') + ' .nav li > a'
+    this.$body = $('body')
+    this.refresh()
+    this.process()
+  }
+
+  ScrollSpy.prototype = {
+
+    constructor: ScrollSpy, refresh: function () {
+      var self = this
+          , $targets
+
+      this.offsets = $([])
+      this.targets = $([])
+
+      $targets = this.$body
+          .find(this.selector)
+          .map(function () {
+            var $el = $(this)
+                , href = $el.data('target') || $el.attr('href')
+                , $href = /^#\w/.test(href) && $(href)
+            return ( $href
+                && $href.length
+                && [
+              [ $href.position().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]
+            ] ) || null
+          })
+          .sort(function (a, b) {
+            return a[0] - b[0]
+          })
+          .each(function () {
+            self.offsets.push(this[0])
+            self.targets.push(this[1])
+          })
+    }, process: function () {
+      var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
+          , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
+          , maxScroll = scrollHeight - this.$scrollElement.height()
+          , offsets = this.offsets
+          , targets = this.targets
+          , activeTarget = this.activeTarget
+          , i
+
+      if (scrollTop >= maxScroll) {
+        return activeTarget != (i = targets.last()[0])
+            && this.activate(i)
+      }
+
+      for (i = offsets.length; i--;) {
+        activeTarget != targets[i]
+            && scrollTop >= offsets[i]
+            && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
+        && this.activate(targets[i])
+      }
+    }, activate: function (target) {
+      var active
+          , selector
+
+      this.activeTarget = target
+
+      $(this.selector)
+          .parent('.active')
+          .removeClass('active')
+
+      selector = this.selector
+          + '[data-target="' + target + '"],'
+          + this.selector + '[href="' + target + '"]'
+
+      active = $(selector)
+          .parent('li')
+          .addClass('active')
+
+      if (active.parent('.dropdown-menu').length) {
+        active = active.closest('li.dropdown').addClass('active')
+      }
+
+      active.trigger('activate')
+    }
+
+  }
+
+
+  /* SCROLLSPY PLUGIN DEFINITION
+   * =========================== */
+
+  var old = $.fn.scrollspy
+
+  $.fn.scrollspy = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+          , data = $this.data('scrollspy')
+          , options = typeof option == 'object' && option
+      if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.scrollspy.Constructor = ScrollSpy
+
+  $.fn.scrollspy.defaults = {
+    offset: 10
+  }
+
+
+  /* SCROLLSPY NO CONFLICT
+   * ===================== */
+
+  $.fn.scrollspy.noConflict = function () {
+    $.fn.scrollspy = old
+    return this
+  }
+
+
+  /* SCROLLSPY DATA-API
+   * ================== */
+
+  $(window).on('load', function () {
+    $('[data-spy="scroll"]').each(function () {
+      var $spy = $(this)
+      $spy.scrollspy($spy.data())
+    })
+  })
+
+}(window.jQuery);
+/* ========================================================
+ * bootstrap-tab.js v2.3.1
+ * http://twitter.github.com/bootstrap/javascript.html#tabs
+ * ========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ======================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+  /* TAB CLASS DEFINITION
+   * ==================== */
+
+  var Tab = function (element) {
+    this.element = $(element)
+  }
+
+  Tab.prototype = {
+
+    constructor: Tab, show: function () {
+      var $this = this.element
+          , $ul = $this.closest('ul:not(.dropdown-menu)')
+          , selector = $this.attr('data-target')
+          , previous
+          , $target
+          , e
+
+      if (!selector) {
+        selector = $this.attr('href')
+        selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+      }
+
+      if ($this.parent('li').hasClass('active')) return
+
+      previous = $ul.find('.active:last a')[0]
+
+      e = $.Event('show', {
+        relatedTarget: previous
+      })
+
+      $this.trigger(e)
+
+      if (e.isDefaultPrevented()) return
+
+      $target = $(selector)
+
+      this.activate($this.parent('li'), $ul)
+      this.activate($target, $target.parent(), function () {
+        $this.trigger({
+          type: 'shown', relatedTarget: previous
+        })
+      })
+    }, activate: function (element, container, callback) {
+      var $active = container.find('> .active')
+          , transition = callback
+              && $.support.transition
+              && $active.hasClass('fade')
+
+      function next() {
+        $active
+            .removeClass('active')
+            .find('> .dropdown-menu > .active')
+            .removeClass('active')
+
+        element.addClass('active')
+
+        if (transition) {
+          element[0].offsetWidth // reflow for transition
+          element.addClass('in')
+        } else {
+          element.removeClass('fade')
+        }
+
+        if (element.parent('.dropdown-menu')) {
+          element.closest('li.dropdown').addClass('active')
+        }
+
+        callback && callback()
+      }
+
+      transition ?
+          $active.one($.support.transition.end, next) :
+          next()
+
+      $active.removeClass('in')
+    }
+  }
+
+
+  /* TAB PLUGIN DEFINITION
+   * ===================== */
+
+  var old = $.fn.tab
+
+  $.fn.tab = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+          , data = $this.data('tab')
+      if (!data) $this.data('tab', (data = new Tab(this)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.tab.Constructor = Tab
+
+
+  /* TAB NO CONFLICT
+   * =============== */
+
+  $.fn.tab.noConflict = function () {
+    $.fn.tab = old
+    return this
+  }
+
+
+  /* TAB DATA-API
+   * ============ */
+
+  $(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
+    e.preventDefault()
+    $(this).tab('show')
+  })
+
+}(window.jQuery);
+/* =============================================================
+ * bootstrap-typeahead.js v2.3.1
+ * http://twitter.github.com/bootstrap/javascript.html#typeahead
+ * =============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+  /* TYPEAHEAD PUBLIC CLASS DEFINITION
+   * ================================= */
+
+  var Typeahead = function (element, options) {
+    this.$element = $(element)
+    this.options = $.extend({}, $.fn.typeahead.defaults, options)
+    this.matcher = this.options.matcher || this.matcher
+    this.sorter = this.options.sorter || this.sorter
+    this.highlighter = this.options.highlighter || this.highlighter
+    this.updater = this.options.updater || this.updater
+    this.source = this.options.source
+    this.$menu = $(this.options.menu)
+    this.shown = false
+    this.listen()
+  }
+
+  Typeahead.prototype = {
+
+    constructor: Typeahead, select: function () {
+      var val = this.$menu.find('.active').attr('data-value')
+      this.$element
+          .val(this.updater(val))
+          .change()
+      return this.hide()
+    }, updater: function (item) {
+      return item
+    }, show: function () {
+      var pos = $.extend({}, this.$element.position(), {
+        height: this.$element[0].offsetHeight
+      })
+
+      this.$menu
+          .insertAfter(this.$element)
+          .css({
+            top: pos.top + pos.height, left: pos.left
+          })
+          .show()
+
+      this.shown = true
+      return this
+    }, hide: function () {
+      this.$menu.hide()
+      this.shown = false
+      return this
+    }, lookup: function (event) {
+      var items
+
+      this.query = this.$element.val()
+
+      if (!this.query || this.query.length < this.options.minLength) {
+        return this.shown ? this.hide() : this
+      }
+
+      items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source
+
+      return items ? this.process(items) : this
+    }, process: function (items) {
+      var that = this
+
+      items = $.grep(items, function (item) {
+        return that.matcher(item)
+      })
+
+      items = this.sorter(items)
+
+      if (!items.length) {
+        return this.shown ? this.hide() : this
+      }
+
+      return this.render(items.slice(0, this.options.items)).show()
+    }, matcher: function (item) {
+      return ~item.toLowerCase().indexOf(this.query.toLowerCase())
+    }, sorter: function (items) {
+      var beginswith = []
+          , caseSensitive = []
+          , caseInsensitive = []
+          , item
+
+      while (item = items.shift()) {
+        if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
+        else if (~item.indexOf(this.query)) caseSensitive.push(item)
+        else caseInsensitive.push(item)
+      }
+
+      return beginswith.concat(caseSensitive, caseInsensitive)
+    }, highlighter: function (item) {
+      var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
+      return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
+        return '<strong>' + match + '</strong>'
+      })
+    }, render: function (items) {
+      var that = this
+
+      items = $(items).map(function (i, item) {
+        i = $(that.options.item).attr('data-value', item)
+        i.find('a').html(that.highlighter(item))
+        return i[0]
+      })
+
+      items.first().addClass('active')
+      this.$menu.html(items)
+      return this
+    }, next: function (event) {
+      var active = this.$menu.find('.active').removeClass('active')
+          , next = active.next()
+
+      if (!next.length) {
+        next = $(this.$menu.find('li')[0])
+      }
+
+      next.addClass('active')
+    }, prev: function (event) {
+      var active = this.$menu.find('.active').removeClass('active')
+          , prev = active.prev()
+
+      if (!prev.length) {
+        prev = this.$menu.find('li').last()
+      }
+
+      prev.addClass('active')
+    }, listen: function () {
+      this.$element
+          .on('focus', $.proxy(this.focus, this))
+          .on('blur', $.proxy(this.blur, this))
+          .on('keypress', $.proxy(this.keypress, this))
+          .on('keyup', $.proxy(this.keyup, this))
+
+      if (this.eventSupported('keydown')) {
+        this.$element.on('keydown', $.proxy(this.keydown, this))
+      }
+
+      this.$menu
+          .on('click', $.proxy(this.click, this))
+          .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
+          .on('mouseleave', 'li', $.proxy(this.mouseleave, this))
+    }, eventSupported: function (eventName) {
+      var isSupported = eventName in this.$element
+      if (!isSupported) {
+        this.$element.setAttribute(eventName, 'return;')
+        isSupported = typeof this.$element[eventName] === 'function'
+      }
+      return isSupported
+    }, move: function (e) {
+      if (!this.shown) return
+
+      switch (e.keyCode) {
+        case 9: // tab
+        case 13: // enter
+        case 27: // escape
+          e.preventDefault()
+          break
+
+        case 38: // up arrow
+          e.preventDefault()
+          this.prev()
+          break
+
+        case 40: // down arrow
+          e.preventDefault()
+          this.next()
+          break
+      }
+
+      e.stopPropagation()
+    }, keydown: function (e) {
+      this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40, 38, 9, 13, 27])
+      this.move(e)
+    }, keypress: function (e) {
+      if (this.suppressKeyPressRepeat) return
+      this.move(e)
+    }, keyup: function (e) {
+      switch (e.keyCode) {
+        case 40: // down arrow
+        case 38: // up arrow
+        case 16: // shift
+        case 17: // ctrl
+        case 18: // alt
+          break
+
+        case 9: // tab
+        case 13: // enter
+          if (!this.shown) return
+          this.select()
+          break
+
+        case 27: // escape
+          if (!this.shown) return
+          this.hide()
+          break
+
+        default:
+          this.lookup()
+      }
+
+      e.stopPropagation()
+      e.preventDefault()
+    }, focus: function (e) {
+      this.focused = true
+    }, blur: function (e) {
+      this.focused = false
+      if (!this.mousedover && this.shown) this.hide()
+    }, click: function (e) {
+      e.stopPropagation()
+      e.preventDefault()
+      this.select()
+      this.$element.focus()
+    }, mouseenter: function (e) {
+      this.mousedover = true
+      this.$menu.find('.active').removeClass('active')
+      $(e.currentTarget).addClass('active')
+    }, mouseleave: function (e) {
+      this.mousedover = false
+      if (!this.focused && this.shown) this.hide()
+    }
+
+  }
+
+
+  /* TYPEAHEAD PLUGIN DEFINITION
+   * =========================== */
+
+  var old = $.fn.typeahead
+
+  $.fn.typeahead = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+          , data = $this.data('typeahead')
+          , options = typeof option == 'object' && option
+      if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.typeahead.defaults = {
+    source: [], items: 8, menu: '<ul class="typeahead dropdown-menu"></ul>', item: '<li><a href="#"></a></li>', minLength: 1
+  }
+
+  $.fn.typeahead.Constructor = Typeahead
+
+
+  /* TYPEAHEAD NO CONFLICT
+   * =================== */
+
+  $.fn.typeahead.noConflict = function () {
+    $.fn.typeahead = old
+    return this
+  }
+
+
+  /* TYPEAHEAD DATA-API
+   * ================== */
+
+  $(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
+    var $this = $(this)
+    if ($this.data('typeahead')) return
+    $this.typeahead($this.data())
+  })
+
+}(window.jQuery);
+/* ==========================================================
+ * bootstrap-affix.js v2.3.1
+ * http://twitter.github.com/bootstrap/javascript.html#affix
+ * ==========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+  /* AFFIX CLASS DEFINITION
+   * ====================== */
+
+  var Affix = function (element, options) {
+    this.options = $.extend({}, $.fn.affix.defaults, options)
+    this.$window = $(window)
+        .on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
+        .on('click.affix.data-api', $.proxy(function () {
+          setTimeout($.proxy(this.checkPosition, this), 1)
+        }, this))
+    this.$element = $(element)
+    this.checkPosition()
+  }
+
+  Affix.prototype.checkPosition = function () {
+    if (!this.$element.is(':visible')) return
+
+    var scrollHeight = $(document).height()
+        , scrollTop = this.$window.scrollTop()
+        , position = this.$element.offset()
+        , offset = this.options.offset
+        , offsetBottom = offset.bottom
+        , offsetTop = offset.top
+        , reset = 'affix affix-top affix-bottom'
+        , affix
+
+    if (typeof offset != 'object') offsetBottom = offsetTop = offset
+    if (typeof offsetTop == 'function') offsetTop = offset.top()
+    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
+
+    affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
+        false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
+        'bottom' : offsetTop != null && scrollTop <= offsetTop ?
+        'top' : false
+
+    if (this.affixed === affix) return
+
+    this.affixed = affix
+    this.unpin = affix == 'bottom' ? position.top - scrollTop : null
+
+    this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
+  }
+
+
+  /* AFFIX PLUGIN DEFINITION
+   * ======================= */
+
+  var old = $.fn.affix
+
+  $.fn.affix = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+          , data = $this.data('affix')
+          , options = typeof option == 'object' && option
+      if (!data) $this.data('affix', (data = new Affix(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.affix.Constructor = Affix
+
+  $.fn.affix.defaults = {
+    offset: 0
+  }
+
+
+  /* AFFIX NO CONFLICT
+   * ================= */
+
+  $.fn.affix.noConflict = function () {
+    $.fn.affix = old
+    return this
+  }
+
+
+  /* AFFIX DATA-API
+   * ============== */
+
+  $(window).on('load', function () {
+    $('[data-spy="affix"]').each(function () {
+      var $spy = $(this)
+          , data = $spy.data()
+
+      data.offset = data.offset || {}
+
+      data.offsetBottom && (data.offset.bottom = data.offsetBottom)
+      data.offsetTop && (data.offset.top = data.offsetTop)
+
+      $spy.affix(data)
+    })
+  })
+
+
+}(window.jQuery);
\ No newline at end of file


[02/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/jquery/jquery-1.9.1.min.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/jquery/jquery-1.9.1.min.js b/portal/js/libs/jquery/jquery-1.9.1.min.js
new file mode 100644
index 0000000..2fa0a33
--- /dev/null
+++ b/portal/js/libs/jquery/jquery-1.9.1.min.js
@@ -0,0 +1,5 @@
+/*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license
+ //@ sourceMappingURL=jquery.min.map
+ */(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e
 ){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:func
 tion(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:fu
 nction(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;
 return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nod
 eName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==
 r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addE
 ventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function
 (){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",
 r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):-
 -i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,chec
 kOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bu
 bbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:
 1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s
 ;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e
 [b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="dat
 a-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>
 arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend
 ({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&
 &(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null=
 =o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length
 ||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",co
 lspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.speci
 fied?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(
 e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.ev
 ents={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sor
 t(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.
 )"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],
 c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,ha
 ndlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.docume
 ntElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.
 removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagat
 ion()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;
+  return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.a
 dd(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n
 ,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1=
 ==arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("
 +F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){
 return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--)l[u]=g+dt(l[u])
 ;m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="<a name='"+x+"'
 ></a><div name='"+x+"'></div>",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode
 !==A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").le
 ngth||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e]
 ,l=[t];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expres
 sion: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find
 :{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAt
 tribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[
 x]={}))[e])&&l[0]===N)f=l[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: 
 "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},
 button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W
 ," ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r
 )),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++)if(i.relative[e[r].type])break;return yt(u>1&&gt(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)
 ),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++])m(x,y,u,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[
 a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type])break;if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t
 ++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){va
 r n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.conten
 tDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){ret
 urn b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Nt=/^(?:checkbox|radio)$/i,Ct=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></t
 able>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t
 =b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild
 (n)));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNod
 e;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return t
 his}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML
 )&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.su
 pport.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild
 ,i=o&&o.childNodes.length;while(i--)b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l)
+}b.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;for(;null!=(n=e[s]);s++)if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events)for(r in a.events)f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle);l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+
 ")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.
 length;i>s;s++)a[n[s]]=b.css(e,n[s],!1,o);return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"
 ),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle
 },Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parse
 Float(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=ln(e,t),Pt.detach()),Gt[e]=n),n}function ln(e,t){var n=b(t.createElement(e)).appendTo(t.body),r=b.css(n[0],"display");return n.remove(),r}b.each(["height","width"],function(e,n){b.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(b.css(e,"display"))?b.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,i),i):0)}}}),b.support.opacity||(b.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":"
 "},set:function(e,t){var n=e.style,r=e.currentStyle,i=b.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===b.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),b(function(){b.support.reliableMarginRight||(b.cssHooks.marginRight={get:function(e,n){return n?b.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!b.support.pixelPosition&&b.fn.position&&b.each(["top","left"],function(e,n){b.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?b(e).position()[n]+"px":r):t}}})}),b.expr&&b.expr.filters&&(b.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!b.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||b.css(e,"display"))},b.expr.filters.visible=function(e){return!b.expr.filters.hidden(e)}),b.each({margin:"",padding:"",border:"Width"},function(e,t){b.cssHooks[e+t]={expand:function(n){var
  r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(b.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Nt.test(e))}).map(function(e,t){var n=b(this).val();return null==n?null:b.isArray(n)?b.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),b.param=function(e,n){var r,i=[],o=function(e,t){t=b.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=b.ajaxSettings&&b.ajaxSettings.traditional),b.isArra
 y(e)||e.jquery&&!b.isPlainObject(e))b.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(b.isArray(t))b.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==b.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}b.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){b.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),b.fn.hover=function(e,t){return this.mouseenter(e).mouseleave(t||e)};var mn,yn,vn=b.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Nn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Cn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=b.fn
 .load,An={},jn={},Dn="*/".concat("*");try{yn=a.href}catch(Ln){yn=o.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(w)||[];if(b.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(u){var l;return o[u]=!0,b.each(e[u]||[],function(e,u){var c=u(n,r,i);return"string"!=typeof c||a||o[c]?a?!(l=c):t:(n.dataTypes.unshift(c),s(c),!1)}),l}return s(n.dataTypes[0])||!o["*"]&&s("*")}function Mn(e,n){var r,i,o=b.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&b.extend(!0,e,r),e}b.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,u=e.indexOf(" ");return u>=0&&(i=e.slice(u,e.length),e=e.slice(0,u)),b.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&b.ajax({
 url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?b("<div>").append(b.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){b.fn[t]=function(e){return this.on(t,e)}}),b.each(["get","post"],function(e,n){b[n]=function(e,r,i,o){return b.isFunction(r)&&(o=o||i,i=r,r=t),b.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Nn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":b.parseJSON,"text xml":b.parseXML}
 ,flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Mn(Mn(e,b.ajaxSettings),t):Mn(b.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,u,l,c,p=b.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?b(f):b.event,h=b.Deferred(),g=b.Callbacks("once memory"),m=p.statusCode||{},y={},v={},x=0,T="canceled",N={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)m[t]=[m[t],e[t]];else N.always(e[N.status]);return this},abort:function(e){var t=e||T;return l&&l.abort(t),k(0,t),this}};if(h.promise(N).complete=g.add,N.success=N.d
 one,N.error=N.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=b.trim(p.dataType||"*").toLowerCase().match(w)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?80:443))==(mn[3]||("http:"===mn[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=b.param(p.data,p.traditional)),qn(An,p,n,N),2===x)return N;u=p.global,u&&0===b.active++&&b.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Cn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(b.lastModified[o]&&N.setRequestHeader("If-Modified-Since",b.lastModified[o]),b.etag[o]&&N.setRequestHeader("If-None-Match",b.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&N.setRequestHeader(
 "Content-Type",p.contentType),N.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)N.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,N,p)===!1||2===x))return N.abort();T="abort";for(i in{success:1,error:1,complete:1})N[i](p[i]);if(l=qn(jn,p,n,N)){N.readyState=1,u&&d.trigger("ajaxSend",[N,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){N.abort("timeout")},p.timeout));try{x=1,l.send(y,k)}catch(C){if(!(2>x))throw C;k(-1,C)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,C=n;2!==x&&(x=2,s&&clearTimeout(s),l=t,a=i||"",N.readyState=e>0?4:0,r&&(w=_n(p,N,r)),e>=200&&300>e||304===e?(p.ifModified&&(T=N.getResponseHeader("Last-Modified"),T&&(b.lastModified[o]=T),T=N.getResponseHeader("etag"),T&&(b.etag[o]=T)),204===e?(c=!0,C="nocontent"):304===e?(c=!0,C="notmodified"):(c=Fn(p,w),C=c.state,y=c.data,v=c.error,c=!v)):(v=C,(e||!C)&&(C="er
 ror",0>e&&(e=0))),N.status=e,N.statusText=(n||C)+"",c?h.resolveWith(f,[y,C,N]):h.rejectWith(f,[N,C,v]),N.statusCode(m),m=t,u&&d.trigger(c?"ajaxSuccess":"ajaxError",[N,p,c?y:v]),g.fireWith(f,[N,C]),u&&(d.trigger("ajaxComplete",[N,p]),--b.active||b.event.trigger("ajaxStop")))}return N},getScript:function(e,n){return b.get(e,t,n,"script")},getJSON:function(e,t,n){return b.get(e,t,n,"json")}});function _n(e,n,r){var i,o,a,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(s in c)s in r&&(n[c[s]]=r[s]);while("*"===l[0])l.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in u)if(u[s]&&u[s].test(o)){l.unshift(s);break}if(l[0]in r)a=l[0];else{for(s in r){if(!l[0]||e.converters[s+" "+l[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==l[0]&&l.unshift(a),r[a]):t}function Fn(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u[1])for(i in e.converters)a[i.toLowerCase()]=e.converters[i];for(;r=u[++s];)if("*"!==r){if("*"
 !==l&&l!==r){if(i=a[l+" "+r]||a["* "+r],!i)for(n in a)if(o=n.split(" "),o[1]===r&&(i=a[l+" "+o[0]]||a["* "+o[0]])){i===!0?i=a[n]:a[n]!==!0&&(r=o[0],u.splice(s--,0,r));break}if(i!==!0)if(i&&e["throws"])t=i(t);else try{t=i(t)}catch(c){return{state:"parsererror",error:i?c:"No conversion from "+l+" to "+r}}}l=r}return{state:"success",data:t}}b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),b.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=o.head||b("head")[0]||o.documentElement;return{send:function(t,i){n=o.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readySta
 te))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var On=[],Bn=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=On.pop()||b.expando+"_"+vn++;return this[e]=!0,e}}),b.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=b.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||b.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,On.push(o)),s&&b.isFunction(a)&&a(s[0
 ]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}b.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=b.ajaxSettings.xhr(),b.support.cors=!!Rn&&"withCredentials"in Rn,Rn=b.support.ajax=!!Rn,Rn&&b.ajaxTransport(function(n){if(!n.crossDomain||b.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,p;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=b.n
 oop,$n&&delete Pn[a]),i)4!==u.readyState&&u.abort();else{p={},s=u.status,l=u.getAllResponseHeaders(),"string"==typeof u.responseText&&(p.text=u.responseText);try{c=u.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,l)},n.async?4===u.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},b(e).unload($n)),Pn[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+x+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=Yn.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(b.cssNumber[e]?"":"px"),"px"!==r&&s){s=b.css(i.elem,e,!0)||n||1;do u=u||".5",s/=u,b.style(i.elem,e,s+r);while(u!==(u=i.cur()/a)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=b.now()}function Zn(e,t){b.each(t,function(t,n){var r=(Qn[t]||[]).concat
 (Qn["*"]),i=0,o=r.length;for(;o>i;i++)if(r[i].call(e,t,n))return})}function er(e,t,n){var r,i,o=0,a=Gn.length,s=b.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;for(;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=b.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(tr(c,l.opts.specialEasing);a>o;o++)if(r=Gn[o].call(l,e,c,l.opts))return r;return Zn(l,c),b.isFunction(l.opts.start)&&l.opts.start.call(e,l),b.fx.tim
 er(b.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function tr(e,t){var n,r,i,o,a;for(i in e)if(r=b.camelCase(i),o=t[r],n=e[i],b.isArray(n)&&(o=n[1],n=e[i]=n[0]),i!==r&&(e[r]=n,delete e[i]),a=b.cssHooks[r],a&&"expand"in a){n=a.expand(n),delete e[r];for(i in n)i in e||(e[i]=n[i],t[i]=o)}else t[r]=o}b.Animation=b.extend(er,{tweener:function(e,t){b.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,u,l,c,p,f=this,d=e.style,h={},g=[],m=e.nodeType&&nn(e);n.queue||(c=b._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,p=c.empty.fire,c.empty.fire=function(){c.unqueued||p()}),c.unqueued++,f.always(function(){f.always(function(){c.unqueued--,b.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overfl
 ow=[d.overflow,d.overflowX,d.overflowY],"inline"===b.css(e,"display")&&"none"===b.css(e,"float")&&(b.support.inlineBlockNeedsLayout&&"inline"!==un(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",b.support.shrinkWrapBlocks||f.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(i in t)if(a=t[i],Vn.exec(a)){if(delete t[i],u=u||"toggle"===a,a===(m?"hide":"show"))continue;g.push(i)}if(o=g.length){s=b._data(e,"fxshow")||b._data(e,"fxshow",{}),"hidden"in s&&(m=s.hidden),u&&(s.hidden=!m),m?b(e).show():f.done(function(){b(e).hide()}),f.done(function(){var t;b._removeData(e,"fxshow");for(t in h)b.style(e,t,h[t])});for(i=0;o>i;i++)r=g[i],l=f.createTween(r,m?s[r]:0),h[r]=s[r]||b.style(e,r),r in s||(s[r]=l.start,m&&(l.end=l.start,l.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}b.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this
 .prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(b.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=b.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[b.cssProps[e.prop]]||b.cssHooks[e.prop])?b.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scroll
 Top=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.each(["toggle","show","hide"],function(e,t){var n=b.fn[t];b.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),b.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=b.isEmptyObject(e),o=b.speed(t,n,r),a=function(){var t=er(this,b.extend({},e),o);a.finish=function(){t.stop(!0)},(i||b._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=b.timers,a=b._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].ele
 m!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&b.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=b._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=b.timers,a=r?r.length:0;for(n.finish=!0,b.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}b.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){b.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),b.speed=function(e,t,n){var r=e&&"object"==typeof e?b.extend({}

<TRUNCATED>

[27/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.0.5/angular-mocks.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.0.5/angular-mocks.js b/portal/js/libs/angular-1.0.5/angular-mocks.js
new file mode 100644
index 0000000..c7e5ec5
--- /dev/null
+++ b/portal/js/libs/angular-1.0.5/angular-mocks.js
@@ -0,0 +1,1886 @@
+/**
+ * @license AngularJS v1.1.5
+ * (c) 2010-2012 Google, Inc. http://angularjs.org
+ * License: MIT
+ *
+ * TODO(vojta): wrap whole file into closure during build
+ */
+
+/**
+ * @ngdoc overview
+ * @name angular.mock
+ * @description
+ *
+ * Namespace from 'angular-mocks.js' which contains testing related code.
+ */
+angular.mock = {};
+
+/**
+ * ! This is a private undocumented service !
+ *
+ * @name ngMock.$browser
+ *
+ * @description
+ * This service is a mock implementation of {@link ng.$browser}. It provides fake
+ * implementation for commonly used browser apis that are hard to test, e.g. setTimeout, xhr,
+ * cookies, etc...
+ *
+ * The api of this service is the same as that of the real {@link ng.$browser $browser}, except
+ * that there are several helper methods available which can be used in tests.
+ */
+angular.mock.$BrowserProvider = function() {
+  this.$get = function(){
+    return new angular.mock.$Browser();
+  };
+};
+
+angular.mock.$Browser = function() {
+  var self = this;
+
+  this.isMock = true;
+  self.$$url = "http://server/";
+  self.$$lastUrl = self.$$url; // used by url polling fn
+  self.pollFns = [];
+
+  // TODO(vojta): remove this temporary api
+  self.$$completeOutstandingRequest = angular.noop;
+  self.$$incOutstandingRequestCount = angular.noop;
+
+
+  // register url polling fn
+
+  self.onUrlChange = function(listener) {
+    self.pollFns.push(
+        function() {
+          if (self.$$lastUrl != self.$$url) {
+            self.$$lastUrl = self.$$url;
+            listener(self.$$url);
+          }
+        }
+    );
+
+    return listener;
+  };
+
+  self.cookieHash = {};
+  self.lastCookieHash = {};
+  self.deferredFns = [];
+  self.deferredNextId = 0;
+
+  self.defer = function(fn, delay) {
+    delay = delay || 0;
+    self.deferredFns.push({time:(self.defer.now + delay), fn:fn, id: self.deferredNextId});
+    self.deferredFns.sort(function(a,b){ return a.time - b.time;});
+    return self.deferredNextId++;
+  };
+
+
+  self.defer.now = 0;
+
+
+  self.defer.cancel = function(deferId) {
+    var fnIndex;
+
+    angular.forEach(self.deferredFns, function(fn, index) {
+      if (fn.id === deferId) fnIndex = index;
+    });
+
+    if (fnIndex !== undefined) {
+      self.deferredFns.splice(fnIndex, 1);
+      return true;
+    }
+
+    return false;
+  };
+
+
+  /**
+   * @name ngMock.$browser#defer.flush
+   * @methodOf ngMock.$browser
+   *
+   * @description
+   * Flushes all pending requests and executes the defer callbacks.
+   *
+   * @param {number=} number of milliseconds to flush. See {@link #defer.now}
+   */
+  self.defer.flush = function(delay) {
+    if (angular.isDefined(delay)) {
+      self.defer.now += delay;
+    } else {
+      if (self.deferredFns.length) {
+        self.defer.now = self.deferredFns[self.deferredFns.length-1].time;
+      } else {
+        throw Error('No deferred tasks to be flushed');
+      }
+    }
+
+    while (self.deferredFns.length && self.deferredFns[0].time <= self.defer.now) {
+      self.deferredFns.shift().fn();
+    }
+  };
+  /**
+   * @name ngMock.$browser#defer.now
+   * @propertyOf ngMock.$browser
+   *
+   * @description
+   * Current milliseconds mock time.
+   */
+
+  self.$$baseHref = '';
+  self.baseHref = function() {
+    return this.$$baseHref;
+  };
+};
+angular.mock.$Browser.prototype = {
+
+  /**
+   * @name ngMock.$browser#poll
+   * @methodOf ngMock.$browser
+   *
+   * @description
+   * run all fns in pollFns
+   */
+  poll: function poll() {
+    angular.forEach(this.pollFns, function(pollFn){
+      pollFn();
+    });
+  },
+
+  addPollFn: function(pollFn) {
+    this.pollFns.push(pollFn);
+    return pollFn;
+  },
+
+  url: function(url, replace) {
+    if (url) {
+      this.$$url = url;
+      return this;
+    }
+
+    return this.$$url;
+  },
+
+  cookies:  function(name, value) {
+    if (name) {
+      if (value == undefined) {
+        delete this.cookieHash[name];
+      } else {
+        if (angular.isString(value) &&       //strings only
+            value.length <= 4096) {          //strict cookie storage limits
+          this.cookieHash[name] = value;
+        }
+      }
+    } else {
+      if (!angular.equals(this.cookieHash, this.lastCookieHash)) {
+        this.lastCookieHash = angular.copy(this.cookieHash);
+        this.cookieHash = angular.copy(this.cookieHash);
+      }
+      return this.cookieHash;
+    }
+  },
+
+  notifyWhenNoOutstandingRequests: function(fn) {
+    fn();
+  }
+};
+
+
+/**
+ * @ngdoc object
+ * @name ngMock.$exceptionHandlerProvider
+ *
+ * @description
+ * Configures the mock implementation of {@link ng.$exceptionHandler} to rethrow or to log errors passed
+ * into the `$exceptionHandler`.
+ */
+
+/**
+ * @ngdoc object
+ * @name ngMock.$exceptionHandler
+ *
+ * @description
+ * Mock implementation of {@link ng.$exceptionHandler} that rethrows or logs errors passed
+ * into it. See {@link ngMock.$exceptionHandlerProvider $exceptionHandlerProvider} for configuration
+ * information.
+ *
+ *
+ * <pre>
+ *   describe('$exceptionHandlerProvider', function() {
+ *
+ *     it('should capture log messages and exceptions', function() {
+ *
+ *       module(function($exceptionHandlerProvider) {
+ *         $exceptionHandlerProvider.mode('log');
+ *       });
+ *
+ *       inject(function($log, $exceptionHandler, $timeout) {
+ *         $timeout(function() { $log.log(1); });
+ *         $timeout(function() { $log.log(2); throw 'banana peel'; });
+ *         $timeout(function() { $log.log(3); });
+ *         expect($exceptionHandler.errors).toEqual([]);
+ *         expect($log.assertEmpty());
+ *         $timeout.flush();
+ *         expect($exceptionHandler.errors).toEqual(['banana peel']);
+ *         expect($log.log.logs).toEqual([[1], [2], [3]]);
+ *       });
+ *     });
+ *   });
+ * </pre>
+ */
+
+angular.mock.$ExceptionHandlerProvider = function() {
+  var handler;
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$exceptionHandlerProvider#mode
+   * @methodOf ngMock.$exceptionHandlerProvider
+   *
+   * @description
+   * Sets the logging mode.
+   *
+   * @param {string} mode Mode of operation, defaults to `rethrow`.
+   *
+   *   - `rethrow`: If any errors are passed into the handler in tests, it typically
+   *                means that there is a bug in the application or test, so this mock will
+   *                make these tests fail.
+   *   - `log`: Sometimes it is desirable to test that an error is thrown, for this case the `log` mode stores an
+   *            array of errors in `$exceptionHandler.errors`, to allow later assertion of them.
+   *            See {@link ngMock.$log#assertEmpty assertEmpty()} and
+   *             {@link ngMock.$log#reset reset()}
+   */
+  this.mode = function(mode) {
+    switch(mode) {
+      case 'rethrow':
+        handler = function(e) {
+          throw e;
+        };
+        break;
+      case 'log':
+        var errors = [];
+
+        handler = function(e) {
+          if (arguments.length == 1) {
+            errors.push(e);
+          } else {
+            errors.push([].slice.call(arguments, 0));
+          }
+        };
+
+        handler.errors = errors;
+        break;
+      default:
+        throw Error("Unknown mode '" + mode + "', only 'log'/'rethrow' modes are allowed!");
+    }
+  };
+
+  this.$get = function() {
+    return handler;
+  };
+
+  this.mode('rethrow');
+};
+
+
+/**
+ * @ngdoc service
+ * @name ngMock.$log
+ *
+ * @description
+ * Mock implementation of {@link ng.$log} that gathers all logged messages in arrays
+ * (one array per logging level). These arrays are exposed as `logs` property of each of the
+ * level-specific log function, e.g. for level `error` the array is exposed as `$log.error.logs`.
+ *
+ */
+angular.mock.$LogProvider = function() {
+
+  function concat(array1, array2, index) {
+    return array1.concat(Array.prototype.slice.call(array2, index));
+  }
+
+
+  this.$get = function () {
+    var $log = {
+      log: function() { $log.log.logs.push(concat([], arguments, 0)); },
+      warn: function() { $log.warn.logs.push(concat([], arguments, 0)); },
+      info: function() { $log.info.logs.push(concat([], arguments, 0)); },
+      error: function() { $log.error.logs.push(concat([], arguments, 0)); }
+    };
+
+    /**
+     * @ngdoc method
+     * @name ngMock.$log#reset
+     * @methodOf ngMock.$log
+     *
+     * @description
+     * Reset all of the logging arrays to empty.
+     */
+    $log.reset = function () {
+      /**
+       * @ngdoc property
+       * @name ngMock.$log#log.logs
+       * @propertyOf ngMock.$log
+       *
+       * @description
+       * Array of messages logged using {@link ngMock.$log#log}.
+       *
+       * @example
+       * <pre>
+       * $log.log('Some Log');
+       * var first = $log.log.logs.unshift();
+       * </pre>
+       */
+      $log.log.logs = [];
+      /**
+       * @ngdoc property
+       * @name ngMock.$log#warn.logs
+       * @propertyOf ngMock.$log
+       *
+       * @description
+       * Array of messages logged using {@link ngMock.$log#warn}.
+       *
+       * @example
+       * <pre>
+       * $log.warn('Some Warning');
+       * var first = $log.warn.logs.unshift();
+       * </pre>
+       */
+      $log.warn.logs = [];
+      /**
+       * @ngdoc property
+       * @name ngMock.$log#info.logs
+       * @propertyOf ngMock.$log
+       *
+       * @description
+       * Array of messages logged using {@link ngMock.$log#info}.
+       *
+       * @example
+       * <pre>
+       * $log.info('Some Info');
+       * var first = $log.info.logs.unshift();
+       * </pre>
+       */
+      $log.info.logs = [];
+      /**
+       * @ngdoc property
+       * @name ngMock.$log#error.logs
+       * @propertyOf ngMock.$log
+       *
+       * @description
+       * Array of messages logged using {@link ngMock.$log#error}.
+       *
+       * @example
+       * <pre>
+       * $log.log('Some Error');
+       * var first = $log.error.logs.unshift();
+       * </pre>
+       */
+      $log.error.logs = [];
+    };
+
+    /**
+     * @ngdoc method
+     * @name ngMock.$log#assertEmpty
+     * @methodOf ngMock.$log
+     *
+     * @description
+     * Assert that the all of the logging methods have no logged messages. If messages present, an exception is thrown.
+     */
+    $log.assertEmpty = function() {
+      var errors = [];
+      angular.forEach(['error', 'warn', 'info', 'log'], function(logLevel) {
+        angular.forEach($log[logLevel].logs, function(log) {
+          angular.forEach(log, function (logItem) {
+            errors.push('MOCK $log (' + logLevel + '): ' + String(logItem) + '\n' + (logItem.stack || ''));
+          });
+        });
+      });
+      if (errors.length) {
+        errors.unshift("Expected $log to be empty! Either a message was logged unexpectedly, or an expected " +
+            "log message was not checked and removed:");
+        errors.push('');
+        throw new Error(errors.join('\n---------\n'));
+      }
+    };
+
+    $log.reset();
+    return $log;
+  };
+};
+
+
+(function() {
+  var R_ISO8061_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?:\:?(\d\d)(?:\:?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/;
+
+  function jsonStringToDate(string){
+    var match;
+    if (match = string.match(R_ISO8061_STR)) {
+      var date = new Date(0),
+          tzHour = 0,
+          tzMin  = 0;
+      if (match[9]) {
+        tzHour = int(match[9] + match[10]);
+        tzMin = int(match[9] + match[11]);
+      }
+      date.setUTCFullYear(int(match[1]), int(match[2]) - 1, int(match[3]));
+      date.setUTCHours(int(match[4]||0) - tzHour, int(match[5]||0) - tzMin, int(match[6]||0), int(match[7]||0));
+      return date;
+    }
+    return string;
+  }
+
+  function int(str) {
+    return parseInt(str, 10);
+  }
+
+  function padNumber(num, digits, trim) {
+    var neg = '';
+    if (num < 0) {
+      neg =  '-';
+      num = -num;
+    }
+    num = '' + num;
+    while(num.length < digits) num = '0' + num;
+    if (trim)
+      num = num.substr(num.length - digits);
+    return neg + num;
+  }
+
+
+  /**
+   * @ngdoc object
+   * @name angular.mock.TzDate
+   * @description
+   *
+   * *NOTE*: this is not an injectable instance, just a globally available mock class of `Date`.
+   *
+   * Mock of the Date type which has its timezone specified via constructor arg.
+   *
+   * The main purpose is to create Date-like instances with timezone fixed to the specified timezone
+   * offset, so that we can test code that depends on local timezone settings without dependency on
+   * the time zone settings of the machine where the code is running.
+   *
+   * @param {number} offset Offset of the *desired* timezone in hours (fractions will be honored)
+   * @param {(number|string)} timestamp Timestamp representing the desired time in *UTC*
+   *
+   * @example
+   * !!!! WARNING !!!!!
+   * This is not a complete Date object so only methods that were implemented can be called safely.
+   * To make matters worse, TzDate instances inherit stuff from Date via a prototype.
+   *
+   * We do our best to intercept calls to "unimplemented" methods, but since the list of methods is
+   * incomplete we might be missing some non-standard methods. This can result in errors like:
+   * "Date.prototype.foo called on incompatible Object".
+   *
+   * <pre>
+   * var newYearInBratislava = new TzDate(-1, '2009-12-31T23:00:00Z');
+   * newYearInBratislava.getTimezoneOffset() => -60;
+   * newYearInBratislava.getFullYear() => 2010;
+   * newYearInBratislava.getMonth() => 0;
+   * newYearInBratislava.getDate() => 1;
+   * newYearInBratislava.getHours() => 0;
+   * newYearInBratislava.getMinutes() => 0;
+   * newYearInBratislava.getSeconds() => 0;
+   * </pre>
+   *
+   */
+  angular.mock.TzDate = function (offset, timestamp) {
+    var self = new Date(0);
+    if (angular.isString(timestamp)) {
+      var tsStr = timestamp;
+
+      self.origDate = jsonStringToDate(timestamp);
+
+      timestamp = self.origDate.getTime();
+      if (isNaN(timestamp))
+        throw {
+          name: "Illegal Argument",
+          message: "Arg '" + tsStr + "' passed into TzDate constructor is not a valid date string"
+        };
+    } else {
+      self.origDate = new Date(timestamp);
+    }
+
+    var localOffset = new Date(timestamp).getTimezoneOffset();
+    self.offsetDiff = localOffset*60*1000 - offset*1000*60*60;
+    self.date = new Date(timestamp + self.offsetDiff);
+
+    self.getTime = function() {
+      return self.date.getTime() - self.offsetDiff;
+    };
+
+    self.toLocaleDateString = function() {
+      return self.date.toLocaleDateString();
+    };
+
+    self.getFullYear = function() {
+      return self.date.getFullYear();
+    };
+
+    self.getMonth = function() {
+      return self.date.getMonth();
+    };
+
+    self.getDate = function() {
+      return self.date.getDate();
+    };
+
+    self.getHours = function() {
+      return self.date.getHours();
+    };
+
+    self.getMinutes = function() {
+      return self.date.getMinutes();
+    };
+
+    self.getSeconds = function() {
+      return self.date.getSeconds();
+    };
+
+    self.getMilliseconds = function() {
+      return self.date.getMilliseconds();
+    };
+
+    self.getTimezoneOffset = function() {
+      return offset * 60;
+    };
+
+    self.getUTCFullYear = function() {
+      return self.origDate.getUTCFullYear();
+    };
+
+    self.getUTCMonth = function() {
+      return self.origDate.getUTCMonth();
+    };
+
+    self.getUTCDate = function() {
+      return self.origDate.getUTCDate();
+    };
+
+    self.getUTCHours = function() {
+      return self.origDate.getUTCHours();
+    };
+
+    self.getUTCMinutes = function() {
+      return self.origDate.getUTCMinutes();
+    };
+
+    self.getUTCSeconds = function() {
+      return self.origDate.getUTCSeconds();
+    };
+
+    self.getUTCMilliseconds = function() {
+      return self.origDate.getUTCMilliseconds();
+    };
+
+    self.getDay = function() {
+      return self.date.getDay();
+    };
+
+    // provide this method only on browsers that already have it
+    if (self.toISOString) {
+      self.toISOString = function() {
+        return padNumber(self.origDate.getUTCFullYear(), 4) + '-' +
+            padNumber(self.origDate.getUTCMonth() + 1, 2) + '-' +
+            padNumber(self.origDate.getUTCDate(), 2) + 'T' +
+            padNumber(self.origDate.getUTCHours(), 2) + ':' +
+            padNumber(self.origDate.getUTCMinutes(), 2) + ':' +
+            padNumber(self.origDate.getUTCSeconds(), 2) + '.' +
+            padNumber(self.origDate.getUTCMilliseconds(), 3) + 'Z'
+      }
+    }
+
+    //hide all methods not implemented in this mock that the Date prototype exposes
+    var unimplementedMethods = ['getUTCDay',
+      'getYear', 'setDate', 'setFullYear', 'setHours', 'setMilliseconds',
+      'setMinutes', 'setMonth', 'setSeconds', 'setTime', 'setUTCDate', 'setUTCFullYear',
+      'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds',
+      'setYear', 'toDateString', 'toGMTString', 'toJSON', 'toLocaleFormat', 'toLocaleString',
+      'toLocaleTimeString', 'toSource', 'toString', 'toTimeString', 'toUTCString', 'valueOf'];
+
+    angular.forEach(unimplementedMethods, function(methodName) {
+      self[methodName] = function() {
+        throw Error("Method '" + methodName + "' is not implemented in the TzDate mock");
+      };
+    });
+
+    return self;
+  };
+
+  //make "tzDateInstance instanceof Date" return true
+  angular.mock.TzDate.prototype = Date.prototype;
+})();
+
+/**
+ * @ngdoc function
+ * @name angular.mock.createMockWindow
+ * @description
+ *
+ * This function creates a mock window object useful for controlling access ot setTimeout, but mocking out
+ * sufficient window's properties to allow Angular to execute.
+ *
+ * @example
+ *
+ * <pre>
+ beforeEach(module(function($provide) {
+      $provide.value('$window', window = angular.mock.createMockWindow());
+    }));
+
+ it('should do something', inject(function($window) {
+      var val = null;
+      $window.setTimeout(function() { val = 123; }, 10);
+      expect(val).toEqual(null);
+      window.setTimeout.expect(10).process();
+      expect(val).toEqual(123);
+    });
+ * </pre>
+ *
+ */
+angular.mock.createMockWindow = function() {
+  var mockWindow = {};
+  var setTimeoutQueue = [];
+
+  mockWindow.document = window.document;
+  mockWindow.getComputedStyle = angular.bind(window, window.getComputedStyle);
+  mockWindow.scrollTo = angular.bind(window, window.scrollTo);
+  mockWindow.navigator = window.navigator;
+  mockWindow.setTimeout = function(fn, delay) {
+    setTimeoutQueue.push({fn: fn, delay: delay});
+  };
+  mockWindow.setTimeout.queue = setTimeoutQueue;
+  mockWindow.setTimeout.expect = function(delay) {
+    if (setTimeoutQueue.length > 0) {
+      return {
+        process: function() {
+          var tick = setTimeoutQueue.shift();
+          expect(tick.delay).toEqual(delay);
+          tick.fn();
+        }
+      };
+    } else {
+      expect('SetTimoutQueue empty. Expecting delay of ').toEqual(delay);
+    }
+  };
+
+  return mockWindow;
+};
+
+/**
+ * @ngdoc function
+ * @name angular.mock.dump
+ * @description
+ *
+ * *NOTE*: this is not an injectable instance, just a globally available function.
+ *
+ * Method for serializing common angular objects (scope, elements, etc..) into strings, useful for debugging.
+ *
+ * This method is also available on window, where it can be used to display objects on debug console.
+ *
+ * @param {*} object - any object to turn into string.
+ * @return {string} a serialized string of the argument
+ */
+angular.mock.dump = function(object) {
+  return serialize(object);
+
+  function serialize(object) {
+    var out;
+
+    if (angular.isElement(object)) {
+      object = angular.element(object);
+      out = angular.element('<div></div>');
+      angular.forEach(object, function(element) {
+        out.append(angular.element(element).clone());
+      });
+      out = out.html();
+    } else if (angular.isArray(object)) {
+      out = [];
+      angular.forEach(object, function(o) {
+        out.push(serialize(o));
+      });
+      out = '[ ' + out.join(', ') + ' ]';
+    } else if (angular.isObject(object)) {
+      if (angular.isFunction(object.$eval) && angular.isFunction(object.$apply)) {
+        out = serializeScope(object);
+      } else if (object instanceof Error) {
+        out = object.stack || ('' + object.name + ': ' + object.message);
+      } else {
+        out = angular.toJson(object, true);
+      }
+    } else {
+      out = String(object);
+    }
+
+    return out;
+  }
+
+  function serializeScope(scope, offset) {
+    offset = offset ||  '  ';
+    var log = [offset + 'Scope(' + scope.$id + '): {'];
+    for ( var key in scope ) {
+      if (scope.hasOwnProperty(key) && !key.match(/^(\$|this)/)) {
+        log.push('  ' + key + ': ' + angular.toJson(scope[key]));
+      }
+    }
+    var child = scope.$$childHead;
+    while(child) {
+      log.push(serializeScope(child, offset + '  '));
+      child = child.$$nextSibling;
+    }
+    log.push('}');
+    return log.join('\n' + offset);
+  }
+};
+
+/**
+ * @ngdoc object
+ * @name ngMock.$httpBackend
+ * @description
+ * Fake HTTP backend implementation suitable for unit testing applications that use the
+ * {@link ng.$http $http service}.
+ *
+ * *Note*: For fake HTTP backend implementation suitable for end-to-end testing or backend-less
+ * development please see {@link ngMockE2E.$httpBackend e2e $httpBackend mock}.
+ *
+ * During unit testing, we want our unit tests to run quickly and have no external dependencies so
+ * we don’t want to send {@link https://developer.mozilla.org/en/xmlhttprequest XHR} or
+ * {@link http://en.wikipedia.org/wiki/JSONP JSONP} requests to a real server. All we really need is
+ * to verify whether a certain request has been sent or not, or alternatively just let the
+ * application make requests, respond with pre-trained responses and assert that the end result is
+ * what we expect it to be.
+ *
+ * This mock implementation can be used to respond with static or dynamic responses via the
+ * `expect` and `when` apis and their shortcuts (`expectGET`, `whenPOST`, etc).
+ *
+ * When an Angular application needs some data from a server, it calls the $http service, which
+ * sends the request to a real server using $httpBackend service. With dependency injection, it is
+ * easy to inject $httpBackend mock (which has the same API as $httpBackend) and use it to verify
+ * the requests and respond with some testing data without sending a request to real server.
+ *
+ * There are two ways to specify what test data should be returned as http responses by the mock
+ * backend when the code under test makes http requests:
+ *
+ * - `$httpBackend.expect` - specifies a request expectation
+ * - `$httpBackend.when` - specifies a backend definition
+ *
+ *
+ * # Request Expectations vs Backend Definitions
+ *
+ * Request expectations provide a way to make assertions about requests made by the application and
+ * to define responses for those requests. The test will fail if the expected requests are not made
+ * or they are made in the wrong order.
+ *
+ * Backend definitions allow you to define a fake backend for your application which doesn't assert
+ * if a particular request was made or not, it just returns a trained response if a request is made.
+ * The test will pass whether or not the request gets made during testing.
+ *
+ *
+ * <table class="table">
+ *   <tr><th width="220px"></th><th>Request expectations</th><th>Backend definitions</th></tr>
+ *   <tr>
+ *     <th>Syntax</th>
+ *     <td>.expect(...).respond(...)</td>
+ *     <td>.when(...).respond(...)</td>
+ *   </tr>
+ *   <tr>
+ *     <th>Typical usage</th>
+ *     <td>strict unit tests</td>
+ *     <td>loose (black-box) unit testing</td>
+ *   </tr>
+ *   <tr>
+ *     <th>Fulfills multiple requests</th>
+ *     <td>NO</td>
+ *     <td>YES</td>
+ *   </tr>
+ *   <tr>
+ *     <th>Order of requests matters</th>
+ *     <td>YES</td>
+ *     <td>NO</td>
+ *   </tr>
+ *   <tr>
+ *     <th>Request required</th>
+ *     <td>YES</td>
+ *     <td>NO</td>
+ *   </tr>
+ *   <tr>
+ *     <th>Response required</th>
+ *     <td>optional (see below)</td>
+ *     <td>YES</td>
+ *   </tr>
+ * </table>
+ *
+ * In cases where both backend definitions and request expectations are specified during unit
+ * testing, the request expectations are evaluated first.
+ *
+ * If a request expectation has no response specified, the algorithm will search your backend
+ * definitions for an appropriate response.
+ *
+ * If a request didn't match any expectation or if the expectation doesn't have the response
+ * defined, the backend definitions are evaluated in sequential order to see if any of them match
+ * the request. The response from the first matched definition is returned.
+ *
+ *
+ * # Flushing HTTP requests
+ *
+ * The $httpBackend used in production, always responds to requests with responses asynchronously.
+ * If we preserved this behavior in unit testing, we'd have to create async unit tests, which are
+ * hard to write, follow and maintain. At the same time the testing mock, can't respond
+ * synchronously because that would change the execution of the code under test. For this reason the
+ * mock $httpBackend has a `flush()` method, which allows the test to explicitly flush pending
+ * requests and thus preserving the async api of the backend, while allowing the test to execute
+ * synchronously.
+ *
+ *
+ * # Unit testing with mock $httpBackend
+ *
+ * <pre>
+ // controller
+ function MyController($scope, $http) {
+     $http.get('/auth.py').success(function(data) {
+       $scope.user = data;
+     });
+
+     this.saveMessage = function(message) {
+       $scope.status = 'Saving...';
+       $http.post('/add-msg.py', message).success(function(response) {
+         $scope.status = '';
+       }).error(function() {
+         $scope.status = 'ERROR!';
+       });
+     };
+   }
+
+ // testing controller
+ var $httpBackend;
+
+ beforeEach(inject(function($injector) {
+     $httpBackend = $injector.get('$httpBackend');
+
+     // backend definition common for all tests
+     $httpBackend.when('GET', '/auth.py').respond({userId: 'userX'}, {'A-Token': 'xxx'});
+   }));
+
+
+ afterEach(function() {
+     $httpBackend.verifyNoOutstandingExpectation();
+     $httpBackend.verifyNoOutstandingRequest();
+   });
+
+
+ it('should fetch authentication token', function() {
+     $httpBackend.expectGET('/auth.py');
+     var controller = scope.$new(MyController);
+     $httpBackend.flush();
+   });
+
+
+ it('should send msg to server', function() {
+     // now you don’t care about the authentication, but
+     // the controller will still send the request and
+     // $httpBackend will respond without you having to
+     // specify the expectation and response for this request
+     $httpBackend.expectPOST('/add-msg.py', 'message content').respond(201, '');
+
+     var controller = scope.$new(MyController);
+     $httpBackend.flush();
+     controller.saveMessage('message content');
+     expect(controller.status).toBe('Saving...');
+     $httpBackend.flush();
+     expect(controller.status).toBe('');
+   });
+
+
+ it('should send auth header', function() {
+     $httpBackend.expectPOST('/add-msg.py', undefined, function(headers) {
+       // check if the header was send, if it wasn't the expectation won't
+       // match the request and the test will fail
+       return headers['Authorization'] == 'xxx';
+     }).respond(201, '');
+
+     var controller = scope.$new(MyController);
+     controller.saveMessage('whatever');
+     $httpBackend.flush();
+   });
+ </pre>
+ */
+angular.mock.$HttpBackendProvider = function() {
+  this.$get = ['$rootScope', createHttpBackendMock];
+};
+
+/**
+ * General factory function for $httpBackend mock.
+ * Returns instance for unit testing (when no arguments specified):
+ *   - passing through is disabled
+ *   - auto flushing is disabled
+ *
+ * Returns instance for e2e testing (when `$delegate` and `$browser` specified):
+ *   - passing through (delegating request to real backend) is enabled
+ *   - auto flushing is enabled
+ *
+ * @param {Object=} $delegate Real $httpBackend instance (allow passing through if specified)
+ * @param {Object=} $browser Auto-flushing enabled if specified
+ * @return {Object} Instance of $httpBackend mock
+ */
+function createHttpBackendMock($rootScope, $delegate, $browser) {
+  var definitions = [],
+      expectations = [],
+      responses = [],
+      responsesPush = angular.bind(responses, responses.push);
+
+  function createResponse(status, data, headers) {
+    if (angular.isFunction(status)) return status;
+
+    return function() {
+      return angular.isNumber(status)
+          ? [status, data, headers]
+          : [200, status, data];
+    };
+  }
+
+  // TODO(vojta): change params to: method, url, data, headers, callback
+  function $httpBackend(method, url, data, callback, headers, timeout) {
+    var xhr = new MockXhr(),
+        expectation = expectations[0],
+        wasExpected = false;
+
+    function prettyPrint(data) {
+      return (angular.isString(data) || angular.isFunction(data) || data instanceof RegExp)
+          ? data
+          : angular.toJson(data);
+    }
+
+    function wrapResponse(wrapped) {
+      if (!$browser && timeout && timeout.then) timeout.then(handleTimeout);
+
+      return handleResponse;
+
+      function handleResponse() {
+        var response = wrapped.response(method, url, data, headers);
+        xhr.$$respHeaders = response[2];
+        callback(response[0], response[1], xhr.getAllResponseHeaders());
+      }
+
+      function handleTimeout() {
+        for (var i = 0, ii = responses.length; i < ii; i++) {
+          if (responses[i] === handleResponse) {
+            responses.splice(i, 1);
+            callback(-1, undefined, '');
+            break;
+          }
+        }
+      }
+    }
+
+    if (expectation && expectation.match(method, url)) {
+      if (!expectation.matchData(data))
+        throw Error('Expected ' + expectation + ' with different data\n' +
+            'EXPECTED: ' + prettyPrint(expectation.data) + '\nGOT:      ' + data);
+
+      if (!expectation.matchHeaders(headers))
+        throw Error('Expected ' + expectation + ' with different headers\n' +
+            'EXPECTED: ' + prettyPrint(expectation.headers) + '\nGOT:      ' +
+            prettyPrint(headers));
+
+      expectations.shift();
+
+      if (expectation.response) {
+        responses.push(wrapResponse(expectation));
+        return;
+      }
+      wasExpected = true;
+    }
+
+    var i = -1, definition;
+    while ((definition = definitions[++i])) {
+      if (definition.match(method, url, data, headers || {})) {
+        if (definition.response) {
+          // if $browser specified, we do auto flush all requests
+          ($browser ? $browser.defer : responsesPush)(wrapResponse(definition));
+        } else if (definition.passThrough) {
+          $delegate(method, url, data, callback, headers, timeout);
+        } else throw Error('No response defined !');
+        return;
+      }
+    }
+    throw wasExpected ?
+        Error('No response defined !') :
+        Error('Unexpected request: ' + method + ' ' + url + '\n' +
+            (expectation ? 'Expected ' + expectation : 'No more request expected'));
+  }
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#when
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new backend definition.
+   *
+   * @param {string} method HTTP method.
+   * @param {string|RegExp} url HTTP url.
+   * @param {(string|RegExp)=} data HTTP request body.
+   * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
+   *   object and returns true if the headers match the current definition.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   *   request is handled.
+   *
+   *  - respond – `{function([status,] data[, headers])|function(function(method, url, data, headers)}`
+   *    – The respond method takes a set of static data to be returned or a function that can return
+   *    an array containing response status (number), response data (string) and response headers
+   *    (Object).
+   */
+  $httpBackend.when = function(method, url, data, headers) {
+    var definition = new MockHttpExpectation(method, url, data, headers),
+        chain = {
+          respond: function(status, data, headers) {
+            definition.response = createResponse(status, data, headers);
+          }
+        };
+
+    if ($browser) {
+      chain.passThrough = function() {
+        definition.passThrough = true;
+      };
+    }
+
+    definitions.push(definition);
+    return chain;
+  };
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#whenGET
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new backend definition for GET requests. For more info see `when()`.
+   *
+   * @param {string|RegExp} url HTTP url.
+   * @param {(Object|function(Object))=} headers HTTP headers.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   * request is handled.
+   */
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#whenHEAD
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new backend definition for HEAD requests. For more info see `when()`.
+   *
+   * @param {string|RegExp} url HTTP url.
+   * @param {(Object|function(Object))=} headers HTTP headers.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   * request is handled.
+   */
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#whenDELETE
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new backend definition for DELETE requests. For more info see `when()`.
+   *
+   * @param {string|RegExp} url HTTP url.
+   * @param {(Object|function(Object))=} headers HTTP headers.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   * request is handled.
+   */
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#whenPOST
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new backend definition for POST requests. For more info see `when()`.
+   *
+   * @param {string|RegExp} url HTTP url.
+   * @param {(string|RegExp)=} data HTTP request body.
+   * @param {(Object|function(Object))=} headers HTTP headers.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   * request is handled.
+   */
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#whenPUT
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new backend definition for PUT requests.  For more info see `when()`.
+   *
+   * @param {string|RegExp} url HTTP url.
+   * @param {(string|RegExp)=} data HTTP request body.
+   * @param {(Object|function(Object))=} headers HTTP headers.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   * request is handled.
+   */
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#whenJSONP
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new backend definition for JSONP requests. For more info see `when()`.
+   *
+   * @param {string|RegExp} url HTTP url.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   * request is handled.
+   */
+  createShortMethods('when');
+
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#expect
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new request expectation.
+   *
+   * @param {string} method HTTP method.
+   * @param {string|RegExp} url HTTP url.
+   * @param {(string|RegExp)=} data HTTP request body.
+   * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
+   *   object and returns true if the headers match the current expectation.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   *  request is handled.
+   *
+   *  - respond – `{function([status,] data[, headers])|function(function(method, url, data, headers)}`
+   *    – The respond method takes a set of static data to be returned or a function that can return
+   *    an array containing response status (number), response data (string) and response headers
+   *    (Object).
+   */
+  $httpBackend.expect = function(method, url, data, headers) {
+    var expectation = new MockHttpExpectation(method, url, data, headers);
+    expectations.push(expectation);
+    return {
+      respond: function(status, data, headers) {
+        expectation.response = createResponse(status, data, headers);
+      }
+    };
+  };
+
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#expectGET
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new request expectation for GET requests. For more info see `expect()`.
+   *
+   * @param {string|RegExp} url HTTP url.
+   * @param {Object=} headers HTTP headers.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   * request is handled. See #expect for more info.
+   */
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#expectHEAD
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new request expectation for HEAD requests. For more info see `expect()`.
+   *
+   * @param {string|RegExp} url HTTP url.
+   * @param {Object=} headers HTTP headers.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   *   request is handled.
+   */
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#expectDELETE
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new request expectation for DELETE requests. For more info see `expect()`.
+   *
+   * @param {string|RegExp} url HTTP url.
+   * @param {Object=} headers HTTP headers.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   *   request is handled.
+   */
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#expectPOST
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new request expectation for POST requests. For more info see `expect()`.
+   *
+   * @param {string|RegExp} url HTTP url.
+   * @param {(string|RegExp)=} data HTTP request body.
+   * @param {Object=} headers HTTP headers.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   *   request is handled.
+   */
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#expectPUT
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new request expectation for PUT requests. For more info see `expect()`.
+   *
+   * @param {string|RegExp} url HTTP url.
+   * @param {(string|RegExp)=} data HTTP request body.
+   * @param {Object=} headers HTTP headers.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   *   request is handled.
+   */
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#expectPATCH
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new request expectation for PATCH requests. For more info see `expect()`.
+   *
+   * @param {string|RegExp} url HTTP url.
+   * @param {(string|RegExp)=} data HTTP request body.
+   * @param {Object=} headers HTTP headers.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   *   request is handled.
+   */
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#expectJSONP
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Creates a new request expectation for JSONP requests. For more info see `expect()`.
+   *
+   * @param {string|RegExp} url HTTP url.
+   * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+   *   request is handled.
+   */
+  createShortMethods('expect');
+
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#flush
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Flushes all pending requests using the trained responses.
+   *
+   * @param {number=} count Number of responses to flush (in the order they arrived). If undefined,
+   *   all pending requests will be flushed. If there are no pending requests when the flush method
+   *   is called an exception is thrown (as this typically a sign of programming error).
+   */
+  $httpBackend.flush = function(count) {
+    $rootScope.$digest();
+    if (!responses.length) throw Error('No pending request to flush !');
+
+    if (angular.isDefined(count)) {
+      while (count--) {
+        if (!responses.length) throw Error('No more pending request to flush !');
+        responses.shift()();
+      }
+    } else {
+      while (responses.length) {
+        responses.shift()();
+      }
+    }
+    $httpBackend.verifyNoOutstandingExpectation();
+  };
+
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#verifyNoOutstandingExpectation
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Verifies that all of the requests defined via the `expect` api were made. If any of the
+   * requests were not made, verifyNoOutstandingExpectation throws an exception.
+   *
+   * Typically, you would call this method following each test case that asserts requests using an
+   * "afterEach" clause.
+   *
+   * <pre>
+   *   afterEach($httpBackend.verifyExpectations);
+   * </pre>
+   */
+  $httpBackend.verifyNoOutstandingExpectation = function() {
+    $rootScope.$digest();
+    if (expectations.length) {
+      throw Error('Unsatisfied requests: ' + expectations.join(', '));
+    }
+  };
+
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#verifyNoOutstandingRequest
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Verifies that there are no outstanding requests that need to be flushed.
+   *
+   * Typically, you would call this method following each test case that asserts requests using an
+   * "afterEach" clause.
+   *
+   * <pre>
+   *   afterEach($httpBackend.verifyNoOutstandingRequest);
+   * </pre>
+   */
+  $httpBackend.verifyNoOutstandingRequest = function() {
+    if (responses.length) {
+      throw Error('Unflushed requests: ' + responses.length);
+    }
+  };
+
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$httpBackend#resetExpectations
+   * @methodOf ngMock.$httpBackend
+   * @description
+   * Resets all request expectations, but preserves all backend definitions. Typically, you would
+   * call resetExpectations during a multiple-phase test when you want to reuse the same instance of
+   * $httpBackend mock.
+   */
+  $httpBackend.resetExpectations = function() {
+    expectations.length = 0;
+    responses.length = 0;
+  };
+
+  return $httpBackend;
+
+
+  function createShortMethods(prefix) {
+    angular.forEach(['GET', 'DELETE', 'JSONP'], function(method) {
+      $httpBackend[prefix + method] = function(url, headers) {
+        return $httpBackend[prefix](method, url, undefined, headers)
+      }
+    });
+
+    angular.forEach(['PUT', 'POST', 'PATCH'], function(method) {
+      $httpBackend[prefix + method] = function(url, data, headers) {
+        return $httpBackend[prefix](method, url, data, headers)
+      }
+    });
+  }
+}
+
+function MockHttpExpectation(method, url, data, headers) {
+
+  this.data = data;
+  this.headers = headers;
+
+  this.match = function(m, u, d, h) {
+    if (method != m) return false;
+    if (!this.matchUrl(u)) return false;
+    if (angular.isDefined(d) && !this.matchData(d)) return false;
+    if (angular.isDefined(h) && !this.matchHeaders(h)) return false;
+    return true;
+  };
+
+  this.matchUrl = function(u) {
+    if (!url) return true;
+    if (angular.isFunction(url.test)) return url.test(u);
+    return url == u;
+  };
+
+  this.matchHeaders = function(h) {
+    if (angular.isUndefined(headers)) return true;
+    if (angular.isFunction(headers)) return headers(h);
+    return angular.equals(headers, h);
+  };
+
+  this.matchData = function(d) {
+    if (angular.isUndefined(data)) return true;
+    if (data && angular.isFunction(data.test)) return data.test(d);
+    if (data && !angular.isString(data)) return angular.toJson(data) == d;
+    return data == d;
+  };
+
+  this.toString = function() {
+    return method + ' ' + url;
+  };
+}
+
+function MockXhr() {
+
+  // hack for testing $http, $httpBackend
+  MockXhr.$$lastInstance = this;
+
+  this.open = function(method, url, async) {
+    this.$$method = method;
+    this.$$url = url;
+    this.$$async = async;
+    this.$$reqHeaders = {};
+    this.$$respHeaders = {};
+  };
+
+  this.send = function(data) {
+    this.$$data = data;
+  };
+
+  this.setRequestHeader = function(key, value) {
+    this.$$reqHeaders[key] = value;
+  };
+
+  this.getResponseHeader = function(name) {
+    // the lookup must be case insensitive, that's why we try two quick lookups and full scan at last
+    var header = this.$$respHeaders[name];
+    if (header) return header;
+
+    name = angular.lowercase(name);
+    header = this.$$respHeaders[name];
+    if (header) return header;
+
+    header = undefined;
+    angular.forEach(this.$$respHeaders, function(headerVal, headerName) {
+      if (!header && angular.lowercase(headerName) == name) header = headerVal;
+    });
+    return header;
+  };
+
+  this.getAllResponseHeaders = function() {
+    var lines = [];
+
+    angular.forEach(this.$$respHeaders, function(value, key) {
+      lines.push(key + ': ' + value);
+    });
+    return lines.join('\n');
+  };
+
+  this.abort = angular.noop;
+}
+
+
+/**
+ * @ngdoc function
+ * @name ngMock.$timeout
+ * @description
+ *
+ * This service is just a simple decorator for {@link ng.$timeout $timeout} service
+ * that adds a "flush" and "verifyNoPendingTasks" methods.
+ */
+
+angular.mock.$TimeoutDecorator = function($delegate, $browser) {
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$timeout#flush
+   * @methodOf ngMock.$timeout
+   * @description
+   *
+   * Flushes the queue of pending tasks.
+   */
+  $delegate.flush = function() {
+    $browser.defer.flush();
+  };
+
+  /**
+   * @ngdoc method
+   * @name ngMock.$timeout#verifyNoPendingTasks
+   * @methodOf ngMock.$timeout
+   * @description
+   *
+   * Verifies that there are no pending tasks that need to be flushed.
+   */
+  $delegate.verifyNoPendingTasks = function() {
+    if ($browser.deferredFns.length) {
+      throw Error('Deferred tasks to flush (' + $browser.deferredFns.length + '): ' +
+          formatPendingTasksAsString($browser.deferredFns));
+    }
+  };
+
+  function formatPendingTasksAsString(tasks) {
+    var result = [];
+    angular.forEach(tasks, function(task) {
+      result.push('{id: ' + task.id + ', ' + 'time: ' + task.time + '}');
+    });
+
+    return result.join(', ');
+  }
+
+  return $delegate;
+};
+
+/**
+ *
+ */
+angular.mock.$RootElementProvider = function() {
+  this.$get = function() {
+    return angular.element('<div ng-app></div>');
+  }
+};
+
+/**
+ * @ngdoc overview
+ * @name ngMock
+ * @description
+ *
+ * The `ngMock` is an angular module which is used with `ng` module and adds unit-test configuration as well as useful
+ * mocks to the {@link AUTO.$injector $injector}.
+ */
+angular.module('ngMock', ['ng']).provider({
+  $browser: angular.mock.$BrowserProvider,
+  $exceptionHandler: angular.mock.$ExceptionHandlerProvider,
+  $log: angular.mock.$LogProvider,
+  $httpBackend: angular.mock.$HttpBackendProvider,
+  $rootElement: angular.mock.$RootElementProvider
+}).config(function($provide) {
+      $provide.decorator('$timeout', angular.mock.$TimeoutDecorator);
+    });
+
+/**
+ * @ngdoc overview
+ * @name ngMockE2E
+ * @description
+ *
+ * The `ngMockE2E` is an angular module which contains mocks suitable for end-to-end testing.
+ * Currently there is only one mock present in this module -
+ * the {@link ngMockE2E.$httpBackend e2e $httpBackend} mock.
+ */
+angular.module('ngMockE2E', ['ng']).config(function($provide) {
+  $provide.decorator('$httpBackend', angular.mock.e2e.$httpBackendDecorator);
+});
+
+/**
+ * @ngdoc object
+ * @name ngMockE2E.$httpBackend
+ * @description
+ * Fake HTTP backend implementation suitable for end-to-end testing or backend-less development of
+ * applications that use the {@link ng.$http $http service}.
+ *
+ * *Note*: For fake http backend implementation suitable for unit testing please see
+ * {@link ngMock.$httpBackend unit-testing $httpBackend mock}.
+ *
+ * This implementation can be used to respond with static or dynamic responses via the `when` api
+ * and its shortcuts (`whenGET`, `whenPOST`, etc) and optionally pass through requests to the
+ * real $httpBackend for specific requests (e.g. to interact with certain remote apis or to fetch
+ * templates from a webserver).
+ *
+ * As opposed to unit-testing, in an end-to-end testing scenario or in scenario when an application
+ * is being developed with the real backend api replaced with a mock, it is often desirable for
+ * certain category of requests to bypass the mock and issue a real http request (e.g. to fetch
+ * templates or static files from the webserver). To configure the backend with this behavior
+ * use the `passThrough` request handler of `when` instead of `respond`.
+ *
+ * Additionally, we don't want to manually have to flush mocked out requests like we do during unit
+ * testing. For this reason the e2e $httpBackend automatically flushes mocked out requests
+ * automatically, closely simulating the behavior of the XMLHttpRequest object.
+ *
+ * To setup the application to run with this http backend, you have to create a module that depends
+ * on the `ngMockE2E` and your application modules and defines the fake backend:
+ *
+ * <pre>
+ *   myAppDev = angular.module('myAppDev', ['myApp', 'ngMockE2E']);
+ *   myAppDev.run(function($httpBackend) {
+ *     phones = [{name: 'phone1'}, {name: 'phone2'}];
+ *
+ *     // returns the current list of phones
+ *     $httpBackend.whenGET('/phones').respond(phones);
+ *
+ *     // adds a new phone to the phones array
+ *     $httpBackend.whenPOST('/phones').respond(function(method, url, data) {
+ *       phones.push(angular.fromJSON(data));
+ *     });
+ *     $httpBackend.whenGET(/^\/templates\//).passThrough();
+ *     //...
+ *   });
+ * </pre>
+ *
+ * Afterwards, bootstrap your app with this new module.
+ */
+
+/**
+ * @ngdoc method
+ * @name ngMockE2E.$httpBackend#when
+ * @methodOf ngMockE2E.$httpBackend
+ * @description
+ * Creates a new backend definition.
+ *
+ * @param {string} method HTTP method.
+ * @param {string|RegExp} url HTTP url.
+ * @param {(string|RegExp)=} data HTTP request body.
+ * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
+ *   object and returns true if the headers match the current definition.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ *   control how a matched request is handled.
+ *
+ *  - respond – `{function([status,] data[, headers])|function(function(method, url, data, headers)}`
+ *    – The respond method takes a set of static data to be returned or a function that can return
+ *    an array containing response status (number), response data (string) and response headers
+ *    (Object).
+ *  - passThrough – `{function()}` – Any request matching a backend definition with `passThrough`
+ *    handler, will be pass through to the real backend (an XHR request will be made to the
+ *    server.
+ */
+
+/**
+ * @ngdoc method
+ * @name ngMockE2E.$httpBackend#whenGET
+ * @methodOf ngMockE2E.$httpBackend
+ * @description
+ * Creates a new backend definition for GET requests. For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ *   control how a matched request is handled.
+ */
+
+/**
+ * @ngdoc method
+ * @name ngMockE2E.$httpBackend#whenHEAD
+ * @methodOf ngMockE2E.$httpBackend
+ * @description
+ * Creates a new backend definition for HEAD requests. For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ *   control how a matched request is handled.
+ */
+
+/**
+ * @ngdoc method
+ * @name ngMockE2E.$httpBackend#whenDELETE
+ * @methodOf ngMockE2E.$httpBackend
+ * @description
+ * Creates a new backend definition for DELETE requests. For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ *   control how a matched request is handled.
+ */
+
+/**
+ * @ngdoc method
+ * @name ngMockE2E.$httpBackend#whenPOST
+ * @methodOf ngMockE2E.$httpBackend
+ * @description
+ * Creates a new backend definition for POST requests. For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {(string|RegExp)=} data HTTP request body.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ *   control how a matched request is handled.
+ */
+
+/**
+ * @ngdoc method
+ * @name ngMockE2E.$httpBackend#whenPUT
+ * @methodOf ngMockE2E.$httpBackend
+ * @description
+ * Creates a new backend definition for PUT requests.  For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {(string|RegExp)=} data HTTP request body.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ *   control how a matched request is handled.
+ */
+
+/**
+ * @ngdoc method
+ * @name ngMockE2E.$httpBackend#whenPATCH
+ * @methodOf ngMockE2E.$httpBackend
+ * @description
+ * Creates a new backend definition for PATCH requests.  For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {(string|RegExp)=} data HTTP request body.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ *   control how a matched request is handled.
+ */
+
+/**
+ * @ngdoc method
+ * @name ngMockE2E.$httpBackend#whenJSONP
+ * @methodOf ngMockE2E.$httpBackend
+ * @description
+ * Creates a new backend definition for JSONP requests. For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ *   control how a matched request is handled.
+ */
+angular.mock.e2e = {};
+angular.mock.e2e.$httpBackendDecorator = ['$rootScope', '$delegate', '$browser', createHttpBackendMock];
+
+
+angular.mock.clearDataCache = function() {
+  var key,
+      cache = angular.element.cache;
+
+  for(key in cache) {
+    if (cache.hasOwnProperty(key)) {
+      var handle = cache[key].handle;
+
+      handle && angular.element(handle.elem).unbind();
+      delete cache[key];
+    }
+  }
+};
+
+
+window.jstestdriver && (function(window) {
+  /**
+   * Global method to output any number of objects into JSTD console. Useful for debugging.
+   */
+  window.dump = function() {
+    var args = [];
+    angular.forEach(arguments, function(arg) {
+      args.push(angular.mock.dump(arg));
+    });
+    jstestdriver.console.log.apply(jstestdriver.console, args);
+    if (window.console) {
+      window.console.log.apply(window.console, args);
+    }
+  };
+})(window);
+
+
+(window.jasmine || window.mocha) && (function(window) {
+
+  var currentSpec = null;
+
+  beforeEach(function() {
+    currentSpec = this;
+  });
+
+  afterEach(function() {
+    var injector = currentSpec.$injector;
+
+    currentSpec.$injector = null;
+    currentSpec.$modules = null;
+    currentSpec = null;
+
+    if (injector) {
+      injector.get('$rootElement').unbind();
+      injector.get('$browser').pollFns.length = 0;
+    }
+
+    angular.mock.clearDataCache();
+
+    // clean up jquery's fragment cache
+    angular.forEach(angular.element.fragments, function(val, key) {
+      delete angular.element.fragments[key];
+    });
+
+    MockXhr.$$lastInstance = null;
+
+    angular.forEach(angular.callbacks, function(val, key) {
+      delete angular.callbacks[key];
+    });
+    angular.callbacks.counter = 0;
+  });
+
+  function isSpecRunning() {
+    return currentSpec && (window.mocha || currentSpec.queue.running);
+  }
+
+  /**
+   * @ngdoc function
+   * @name angular.mock.module
+   * @description
+   *
+   * *NOTE*: This function is also published on window for easy access.<br>
+   *
+   * This function registers a module configuration code. It collects the configuration information
+   * which will be used when the injector is created by {@link angular.mock.inject inject}.
+   *
+   * See {@link angular.mock.inject inject} for usage example
+   *
+   * @param {...(string|Function)} fns any number of modules which are represented as string
+   *        aliases or as anonymous module initialization functions. The modules are used to
+   *        configure the injector. The 'ng' and 'ngMock' modules are automatically loaded.
+   */
+  window.module = angular.mock.module = function() {
+    var moduleFns = Array.prototype.slice.call(arguments, 0);
+    return isSpecRunning() ? workFn() : workFn;
+    /////////////////////
+    function workFn() {
+      if (currentSpec.$injector) {
+        throw Error('Injector already created, can not register a module!');
+      } else {
+        var modules = currentSpec.$modules || (currentSpec.$modules = []);
+        angular.forEach(moduleFns, function(module) {
+          modules.push(module);
+        });
+      }
+    }
+  };
+
+  /**
+   * @ngdoc function
+   * @name angular.mock.inject
+   * @description
+   *
+   * *NOTE*: This function is also published on window for easy access.<br>
+   *
+   * The inject function wraps a function into an injectable function. The inject() creates new
+   * instance of {@link AUTO.$injector $injector} per test, which is then used for
+   * resolving references.
+   *
+   * See also {@link angular.mock.module module}
+   *
+   * Example of what a typical jasmine tests looks like with the inject method.
+   * <pre>
+   *
+   *   angular.module('myApplicationModule', [])
+   *       .value('mode', 'app')
+   *       .value('version', 'v1.0.1');
+   *
+   *
+   *   describe('MyApp', function() {
+   *
+   *     // You need to load modules that you want to test,
+   *     // it loads only the "ng" module by default.
+   *     beforeEach(module('myApplicationModule'));
+   *
+   *
+   *     // inject() is used to inject arguments of all given functions
+   *     it('should provide a version', inject(function(mode, version) {
+   *       expect(version).toEqual('v1.0.1');
+   *       expect(mode).toEqual('app');
+   *     }));
+   *
+   *
+   *     // The inject and module method can also be used inside of the it or beforeEach
+   *     it('should override a version and test the new version is injected', function() {
+   *       // module() takes functions or strings (module aliases)
+   *       module(function($provide) {
+   *         $provide.value('version', 'overridden'); // override version here
+   *       });
+   *
+   *       inject(function(version) {
+   *         expect(version).toEqual('overridden');
+   *       });
+   *     ));
+   *   });
+   *
+   * </pre>
+   *
+   * @param {...Function} fns any number of functions which will be injected using the injector.
+   */
+  window.inject = angular.mock.inject = function() {
+    var blockFns = Array.prototype.slice.call(arguments, 0);
+    var errorForStack = new Error('Declaration Location');
+    return isSpecRunning() ? workFn() : workFn;
+    /////////////////////
+    function workFn() {
+      var modules = currentSpec.$modules || [];
+
+      modules.unshift('ngMock');
+      modules.unshift('ng');
+      var injector = currentSpec.$injector;
+      if (!injector) {
+        injector = currentSpec.$injector = angular.injector(modules);
+      }
+      for(var i = 0, ii = blockFns.length; i < ii; i++) {
+        try {
+          injector.invoke(blockFns[i] || angular.noop, this);
+        } catch (e) {
+          if(e.stack && errorForStack) e.stack +=  '\n' + errorForStack.stack;
+          throw e;
+        } finally {
+          errorForStack = null;
+        }
+      }
+    }
+  };
+})(window);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.0.5/angular-resource.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.0.5/angular-resource.js b/portal/js/libs/angular-1.0.5/angular-resource.js
new file mode 100644
index 0000000..a74c483
--- /dev/null
+++ b/portal/js/libs/angular-1.0.5/angular-resource.js
@@ -0,0 +1,445 @@
+/**
+ * @license AngularJS v1.0.5
+ * (c) 2010-2012 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, angular, undefined) {
+'use strict';
+
+/**
+ * @ngdoc overview
+ * @name ngResource
+ * @description
+ */
+
+/**
+ * @ngdoc object
+ * @name ngResource.$resource
+ * @requires $http
+ *
+ * @description
+ * A factory which creates a resource object that lets you interact with
+ * [RESTful](http://en.wikipedia.org/wiki/Representational_State_Transfer) server-side data sources.
+ *
+ * The returned resource object has action methods which provide high-level behaviors without
+ * the need to interact with the low level {@link ng.$http $http} service.
+ *
+ * @param {string} url A parameterized URL template with parameters prefixed by `:` as in
+ *   `/user/:username`. If you are using a URL with a port number (e.g. 
+ *   `http://example.com:8080/api`), you'll need to escape the colon character before the port
+ *   number, like this: `$resource('http://example.com\\:8080/api')`.
+ *
+ * @param {Object=} paramDefaults Default values for `url` parameters. These can be overridden in
+ *   `actions` methods.
+ *
+ *   Each key value in the parameter object is first bound to url template if present and then any
+ *   excess keys are appended to the url search query after the `?`.
+ *
+ *   Given a template `/path/:verb` and parameter `{verb:'greet', salutation:'Hello'}` results in
+ *   URL `/path/greet?salutation=Hello`.
+ *
+ *   If the parameter value is prefixed with `@` then the value of that parameter is extracted from
+ *   the data object (useful for non-GET operations).
+ *
+ * @param {Object.<Object>=} actions Hash with declaration of custom action that should extend the
+ *   default set of resource actions. The declaration should be created in the following format:
+ *
+ *       {action1: {method:?, params:?, isArray:?},
+ *        action2: {method:?, params:?, isArray:?},
+ *        ...}
+ *
+ *   Where:
+ *
+ *   - `action` – {string} – The name of action. This name becomes the name of the method on your
+ *     resource object.
+ *   - `method` – {string} – HTTP request method. Valid methods are: `GET`, `POST`, `PUT`, `DELETE`,
+ *     and `JSONP`
+ *   - `params` – {object=} – Optional set of pre-bound parameters for this action.
+ *   - isArray – {boolean=} – If true then the returned object for this action is an array, see
+ *     `returns` section.
+ *
+ * @returns {Object} A resource "class" object with methods for the default set of resource actions
+ *   optionally extended with custom `actions`. The default set contains these actions:
+ *
+ *       { 'get':    {method:'GET'},
+ *         'save':   {method:'POST'},
+ *         'query':  {method:'GET', isArray:true},
+ *         'remove': {method:'DELETE'},
+ *         'delete': {method:'DELETE'} };
+ *
+ *   Calling these methods invoke an {@link ng.$http} with the specified http method,
+ *   destination and parameters. When the data is returned from the server then the object is an
+ *   instance of the resource class. The actions `save`, `remove` and `delete` are available on it
+ *   as  methods with the `$` prefix. This allows you to easily perform CRUD operations (create,
+ *   read, update, delete) on server-side data like this:
+ *   <pre>
+        var User = $resource('/user/:userId', {userId:'@id'});
+        var user = User.get({userId:123}, function() {
+          user.abc = true;
+          user.$save();
+        });
+     </pre>
+ *
+ *   It is important to realize that invoking a $resource object method immediately returns an
+ *   empty reference (object or array depending on `isArray`). Once the data is returned from the
+ *   server the existing reference is populated with the actual data. This is a useful trick since
+ *   usually the resource is assigned to a model which is then rendered by the view. Having an empty
+ *   object results in no rendering, once the data arrives from the server then the object is
+ *   populated with the data and the view automatically re-renders itself showing the new data. This
+ *   means that in most case one never has to write a callback function for the action methods.
+ *
+ *   The action methods on the class object or instance object can be invoked with the following
+ *   parameters:
+ *
+ *   - HTTP GET "class" actions: `Resource.action([parameters], [success], [error])`
+ *   - non-GET "class" actions: `Resource.action([parameters], postData, [success], [error])`
+ *   - non-GET instance actions:  `instance.$action([parameters], [success], [error])`
+ *
+ *
+ * @example
+ *
+ * # Credit card resource
+ *
+ * <pre>
+     // Define CreditCard class
+     var CreditCard = $resource('/user/:userId/card/:cardId',
+      {userId:123, cardId:'@id'}, {
+       charge: {method:'POST', params:{charge:true}}
+      });
+
+     // We can retrieve a collection from the server
+     var cards = CreditCard.query(function() {
+       // GET: /user/123/card
+       // server returns: [ {id:456, number:'1234', name:'Smith'} ];
+
+       var card = cards[0];
+       // each item is an instance of CreditCard
+       expect(card instanceof CreditCard).toEqual(true);
+       card.name = "J. Smith";
+       // non GET methods are mapped onto the instances
+       card.$save();
+       // POST: /user/123/card/456 {id:456, number:'1234', name:'J. Smith'}
+       // server returns: {id:456, number:'1234', name: 'J. Smith'};
+
+       // our custom method is mapped as well.
+       card.$charge({amount:9.99});
+       // POST: /user/123/card/456?amount=9.99&charge=true {id:456, number:'1234', name:'J. Smith'}
+     });
+
+     // we can create an instance as well
+     var newCard = new CreditCard({number:'0123'});
+     newCard.name = "Mike Smith";
+     newCard.$save();
+     // POST: /user/123/card {number:'0123', name:'Mike Smith'}
+     // server returns: {id:789, number:'01234', name: 'Mike Smith'};
+     expect(newCard.id).toEqual(789);
+ * </pre>
+ *
+ * The object returned from this function execution is a resource "class" which has "static" method
+ * for each action in the definition.
+ *
+ * Calling these methods invoke `$http` on the `url` template with the given `method` and `params`.
+ * When the data is returned from the server then the object is an instance of the resource type and
+ * all of the non-GET methods are available with `$` prefix. This allows you to easily support CRUD
+ * operations (create, read, update, delete) on server-side data.
+
+   <pre>
+     var User = $resource('/user/:userId', {userId:'@id'});
+     var user = User.get({userId:123}, function() {
+       user.abc = true;
+       user.$save();
+     });
+   </pre>
+ *
+ * It's worth noting that the success callback for `get`, `query` and other method gets passed
+ * in the response that came from the server as well as $http header getter function, so one
+ * could rewrite the above example and get access to http headers as:
+ *
+   <pre>
+     var User = $resource('/user/:userId', {userId:'@id'});
+     User.get({userId:123}, function(u, getResponseHeaders){
+       u.abc = true;
+       u.$save(function(u, putResponseHeaders) {
+         //u => saved user object
+         //putResponseHeaders => $http header getter
+       });
+     });
+   </pre>
+
+ * # Buzz client
+
+   Let's look at what a buzz client created with the `$resource` service looks like:
+    <doc:example>
+      <doc:source jsfiddle="false">
+       <script>
+         function BuzzController($resource) {
+           this.userId = 'googlebuzz';
+           this.Activity = $resource(
+             'https://www.googleapis.com/buzz/v1/activities/:userId/:visibility/:activityId/:comments',
+             {alt:'json', callback:'JSON_CALLBACK'},
+             {get:{method:'JSONP', params:{visibility:'@self'}}, replies: {method:'JSONP', params:{visibility:'@self', comments:'@comments'}}}
+           );
+         }
+
+         BuzzController.prototype = {
+           fetch: function() {
+             this.activities = this.Activity.get({userId:this.userId});
+           },
+           expandReplies: function(activity) {
+             activity.replies = this.Activity.replies({userId:this.userId, activityId:activity.id});
+           }
+         };
+         BuzzController.$inject = ['$resource'];
+       </script>
+
+       <div ng-controller="BuzzController">
+         <input ng-model="userId"/>
+         <button ng-click="fetch()">fetch</button>
+         <hr/>
+         <div ng-repeat="item in activities.data.items">
+           <h1 style="font-size: 15px;">
+             <img src="{{item.actor.thumbnailUrl}}" style="max-height:30px;max-width:30px;"/>
+             <a href="{{item.actor.profileUrl}}">{{item.actor.name}}</a>
+             <a href ng-click="expandReplies(item)" style="float: right;">Expand replies: {{item.links.replies[0].count}}</a>
+           </h1>
+           {{item.object.content | html}}
+           <div ng-repeat="reply in item.replies.data.items" style="margin-left: 20px;">
+             <img src="{{reply.actor.thumbnailUrl}}" style="max-height:30px;max-width:30px;"/>
+             <a href="{{reply.actor.profileUrl}}">{{reply.actor.name}}</a>: {{reply.content | html}}
+           </div>
+         </div>
+       </div>
+      </doc:source>
+      <doc:scenario>
+      </doc:scenario>
+    </doc:example>
+ */
+angular.module('ngResource', ['ng']).
+  factory('$resource', ['$http', '$parse', function($http, $parse) {
+    var DEFAULT_ACTIONS = {
+      'get':    {method:'GET'},
+      'save':   {method:'POST'},
+      'query':  {method:'GET', isArray:true},
+      'remove': {method:'DELETE'},
+      'delete': {method:'DELETE'}
+    };
+    var noop = angular.noop,
+        forEach = angular.forEach,
+        extend = angular.extend,
+        copy = angular.copy,
+        isFunction = angular.isFunction,
+        getter = function(obj, path) {
+          return $parse(path)(obj);
+        };
+
+    /**
+     * We need our custom method because encodeURIComponent is too aggressive and doesn't follow
+     * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path
+     * segments:
+     *    segment       = *pchar
+     *    pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
+     *    pct-encoded   = "%" HEXDIG HEXDIG
+     *    unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
+     *    sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
+     *                     / "*" / "+" / "," / ";" / "="
+     */
+    function encodeUriSegment(val) {
+      return encodeUriQuery(val, true).
+        replace(/%26/gi, '&').
+        replace(/%3D/gi, '=').
+        replace(/%2B/gi, '+');
+    }
+
+
+    /**
+     * This method is intended for encoding *key* or *value* parts of query component. We need a custom
+     * method becuase encodeURIComponent is too agressive and encodes stuff that doesn't have to be
+     * encoded per http://tools.ietf.org/html/rfc3986:
+     *    query       = *( pchar / "/" / "?" )
+     *    pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
+     *    unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
+     *    pct-encoded   = "%" HEXDIG HEXDIG
+     *    sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
+     *                     / "*" / "+" / "," / ";" / "="
+     */
+    function encodeUriQuery(val, pctEncodeSpaces) {
+      return encodeURIComponent(val).
+        replace(/%40/gi, '@').
+        replace(/%3A/gi, ':').
+        replace(/%24/g, '$').
+        replace(/%2C/gi, ',').
+        replace((pctEncodeSpaces ? null : /%20/g), '+');
+    }
+
+    function Route(template, defaults) {
+      this.template = template = template + '#';
+      this.defaults = defaults || {};
+      var urlParams = this.urlParams = {};
+      forEach(template.split(/\W/), function(param){
+        if (param && (new RegExp("(^|[^\\\\]):" + param + "\\W").test(template))) {
+          urlParams[param] = true;
+        }
+      });
+      this.template = template.replace(/\\:/g, ':');
+    }
+
+    Route.prototype = {
+      url: function(params) {
+        var self = this,
+            url = this.template,
+            val,
+            encodedVal;
+
+        params = params || {};
+        forEach(this.urlParams, function(_, urlParam){
+          val = params.hasOwnProperty(urlParam) ? params[urlParam] : self.defaults[urlParam];
+          if (angular.isDefined(val) && val !== null) {
+            encodedVal = encodeUriSegment(val);
+            url = url.replace(new RegExp(":" + urlParam + "(\\W)", "g"), encodedVal + "$1");
+          } else {
+            url = url.replace(new RegExp("(\/?):" + urlParam + "(\\W)", "g"), function(match,
+                leadingSlashes, tail) {
+              if (tail.charAt(0) == '/') {
+                return tail;
+              } else {
+                return leadingSlashes + tail;
+              }
+            });
+          }
+        });
+        url = url.replace(/\/?#$/, '');
+        var query = [];
+        forEach(params, function(value, key){
+          if (!self.urlParams[key]) {
+            query.push(encodeUriQuery(key) + '=' + encodeUriQuery(value));
+          }
+        });
+        query.sort();
+        url = url.replace(/\/*$/, '');
+        return url + (query.length ? '?' + query.join('&') : '');
+      }
+    };
+
+
+    function ResourceFactory(url, paramDefaults, actions) {
+      var route = new Route(url);
+
+      actions = extend({}, DEFAULT_ACTIONS, actions);
+
+      function extractParams(data, actionParams){
+        var ids = {};
+        actionParams = extend({}, paramDefaults, actionParams);
+        forEach(actionParams, function(value, key){
+          ids[key] = value.charAt && value.charAt(0) == '@' ? getter(data, value.substr(1)) : value;
+        });
+        return ids;
+      }
+
+      function Resource(value){
+        copy(value || {}, this);
+      }
+
+      forEach(actions, function(action, name) {
+        action.method = angular.uppercase(action.method);
+        var hasBody = action.method == 'POST' || action.method == 'PUT' || action.method == 'PATCH';
+        Resource[name] = function(a1, a2, a3, a4) {
+          var params = {};
+          var data;
+          var success = noop;
+          var error = null;
+          switch(arguments.length) {
+          case 4:
+            error = a4;
+            success = a3;
+            //fallthrough
+          case 3:
+          case 2:
+            if (isFunction(a2)) {
+              if (isFunction(a1)) {
+                success = a1;
+                error = a2;
+                break;
+              }
+
+              success = a2;
+              error = a3;
+              //fallthrough
+            } else {
+              params = a1;
+              data = a2;
+              success = a3;
+              break;
+            }
+          case 1:
+            if (isFunction(a1)) success = a1;
+            else if (hasBody) data = a1;
+            else params = a1;
+            break;
+          case 0: break;
+          default:
+            throw "Expected between 0-4 arguments [params, data, success, error], got " +
+              arguments.length + " arguments.";
+          }
+
+          var value = this instanceof Resource ? this : (action.isArray ? [] : new Resource(data));
+          $http({
+            method: action.method,
+            url: route.url(extend({}, extractParams(data, action.params || {}), params)),
+            data: data
+          }).then(function(response) {
+              var data = response.data;
+
+              if (data) {
+                if (action.isArray) {
+                  value.length = 0;
+                  forEach(data, function(item) {
+                    value.push(new Resource(item));
+                  });
+                } else {
+                  copy(data, value);
+                }
+              }
+              (success||noop)(value, response.headers);
+            }, error);
+
+          return value;
+        };
+
+
+        Resource.prototype['$' + name] = function(a1, a2, a3) {
+          var params = extractParams(this),
+              success = noop,
+              error;
+
+          switch(arguments.length) {
+          case 3: params = a1; success = a2; error = a3; break;
+          case 2:
+          case 1:
+            if (isFunction(a1)) {
+              success = a1;
+              error = a2;
+            } else {
+              params = a1;
+              success = a2 || noop;
+            }
+          case 0: break;
+          default:
+            throw "Expected between 1-3 arguments [params, success, error], got " +
+              arguments.length + " arguments.";
+          }
+          var data = hasBody ? this : undefined;
+          Resource[name].call(this, params, data, success, error);
+        };
+      });
+
+      Resource.bind = function(additionalParamDefaults){
+        return ResourceFactory(url, extend({}, paramDefaults, additionalParamDefaults), actions);
+      };
+
+      return Resource;
+    }
+
+    return ResourceFactory;
+  }]);
+
+})(window, window.angular);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.0.5/angular-resource.min.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.0.5/angular-resource.min.js b/portal/js/libs/angular-1.0.5/angular-resource.min.js
new file mode 100644
index 0000000..f37559c
--- /dev/null
+++ b/portal/js/libs/angular-1.0.5/angular-resource.min.js
@@ -0,0 +1,10 @@
+/*
+ AngularJS v1.0.5
+ (c) 2010-2012 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(C,d,w){'use strict';d.module("ngResource",["ng"]).factory("$resource",["$http","$parse",function(x,y){function s(b,e){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(e?null:/%20/g,"+")}function t(b,e){this.template=b+="#";this.defaults=e||{};var a=this.urlParams={};h(b.split(/\W/),function(f){f&&RegExp("(^|[^\\\\]):"+f+"\\W").test(b)&&(a[f]=!0)});this.template=b.replace(/\\:/g,":")}function u(b,e,a){function f(m,a){var b=
+{},a=o({},e,a);h(a,function(a,z){var c;a.charAt&&a.charAt(0)=="@"?(c=a.substr(1),c=y(c)(m)):c=a;b[z]=c});return b}function g(a){v(a||{},this)}var k=new t(b),a=o({},A,a);h(a,function(a,b){a.method=d.uppercase(a.method);var e=a.method=="POST"||a.method=="PUT"||a.method=="PATCH";g[b]=function(b,c,d,B){var j={},i,l=p,q=null;switch(arguments.length){case 4:q=B,l=d;case 3:case 2:if(r(c)){if(r(b)){l=b;q=c;break}l=c;q=d}else{j=b;i=c;l=d;break}case 1:r(b)?l=b:e?i=b:j=b;break;case 0:break;default:throw"Expected between 0-4 arguments [params, data, success, error], got "+
+arguments.length+" arguments.";}var n=this instanceof g?this:a.isArray?[]:new g(i);x({method:a.method,url:k.url(o({},f(i,a.params||{}),j)),data:i}).then(function(b){var c=b.data;if(c)a.isArray?(n.length=0,h(c,function(a){n.push(new g(a))})):v(c,n);(l||p)(n,b.headers)},q);return n};g.prototype["$"+b]=function(a,d,h){var m=f(this),j=p,i;switch(arguments.length){case 3:m=a;j=d;i=h;break;case 2:case 1:r(a)?(j=a,i=d):(m=a,j=d||p);case 0:break;default:throw"Expected between 1-3 arguments [params, success, error], got "+
+arguments.length+" arguments.";}g[b].call(this,m,e?this:w,j,i)}});g.bind=function(d){return u(b,o({},e,d),a)};return g}var A={get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}},p=d.noop,h=d.forEach,o=d.extend,v=d.copy,r=d.isFunction;t.prototype={url:function(b){var e=this,a=this.template,f,g,b=b||{};h(this.urlParams,function(h,c){f=b.hasOwnProperty(c)?b[c]:e.defaults[c];d.isDefined(f)&&f!==null?(g=s(f,!0).replace(/%26/gi,"&").replace(/%3D/gi,
+"=").replace(/%2B/gi,"+"),a=a.replace(RegExp(":"+c+"(\\W)","g"),g+"$1")):a=a.replace(RegExp("(/?):"+c+"(\\W)","g"),function(a,b,c){return c.charAt(0)=="/"?c:b+c})});var a=a.replace(/\/?#$/,""),k=[];h(b,function(a,b){e.urlParams[b]||k.push(s(b)+"="+s(a))});k.sort();a=a.replace(/\/*$/,"");return a+(k.length?"?"+k.join("&"):"")}};return u}])})(window,window.angular);


[30/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/modules/canvas-tools.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/modules/canvas-tools.js b/portal/js/libs/Highcharts-2.3.5/js/modules/canvas-tools.js
new file mode 100644
index 0000000..3425fc7
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/modules/canvas-tools.js
@@ -0,0 +1,133 @@
+/*
+ A class to parse color values
+ @author Stoyan Stefanov <ss...@gmail.com>
+ @link   http://www.phpied.com/rgb-color-parser-in-javascript/
+ Use it if you like it
+
+ canvg.js - Javascript SVG parser and renderer on Canvas
+ MIT Licensed 
+ Gabe Lerner (gabelerner@gmail.com)
+ http://code.google.com/p/canvg/
+
+ Requires: rgbcolor.js - http://www.phpied.com/rgb-color-parser-in-javascript/
+
+ Highcharts JS v2.3.5 (2012-12-19)
+ CanVGRenderer Extension module
+
+ (c) 2011-2012 Torstein Hønsi, Erik Olsson
+
+ License: www.highcharts.com/license
+*/
+function RGBColor(m){this.ok=!1;m.charAt(0)=="#"&&(m=m.substr(1,6));var m=m.replace(/ /g,""),m=m.toLowerCase(),a={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",
+darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",
+gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",
+lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",
+oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",
+slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},c;for(c in a)m==c&&(m=a[c]);var d=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(b){return[parseInt(b[1]),parseInt(b[2]),parseInt(b[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,
+example:["#00ff00","336699"],process:function(b){return[parseInt(b[1],16),parseInt(b[2],16),parseInt(b[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(b){return[parseInt(b[1]+b[1],16),parseInt(b[2]+b[2],16),parseInt(b[3]+b[3],16)]}}];for(c=0;c<d.length;c++){var b=d[c].process,k=d[c].re.exec(m);if(k)channels=b(k),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r;this.g=this.g<0||isNaN(this.g)?0:
+this.g>255?255:this.g;this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b;this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"};this.toHex=function(){var b=this.r.toString(16),a=this.g.toString(16),d=this.b.toString(16);b.length==1&&(b="0"+b);a.length==1&&(a="0"+a);d.length==1&&(d="0"+d);return"#"+b+a+d};this.getHelpXML=function(){for(var b=[],k=0;k<d.length;k++)for(var c=d[k].example,j=0;j<c.length;j++)b[b.length]=c[j];for(var h in a)b[b.length]=h;c=document.createElement("ul");
+c.setAttribute("id","rgbcolor-examples");for(k=0;k<b.length;k++)try{var l=document.createElement("li"),o=new RGBColor(b[k]),n=document.createElement("div");n.style.cssText="margin: 3px; border: 1px solid black; background:"+o.toHex()+"; color:"+o.toHex();n.appendChild(document.createTextNode("test"));var q=document.createTextNode(" "+b[k]+" -> "+o.toRGB()+" -> "+o.toHex());l.appendChild(n);l.appendChild(q);c.appendChild(l)}catch(p){}return c}}
+if(!window.console)window.console={},window.console.log=function(){},window.console.dir=function(){};if(!Array.prototype.indexOf)Array.prototype.indexOf=function(m){for(var a=0;a<this.length;a++)if(this[a]==m)return a;return-1};
+(function(){function m(){var a={FRAMERATE:30,MAX_VIRTUAL_PIXELS:3E4};a.init=function(c){a.Definitions={};a.Styles={};a.Animations=[];a.Images=[];a.ctx=c;a.ViewPort=new function(){this.viewPorts=[];this.Clear=function(){this.viewPorts=[]};this.SetCurrent=function(a,b){this.viewPorts.push({width:a,height:b})};this.RemoveCurrent=function(){this.viewPorts.pop()};this.Current=function(){return this.viewPorts[this.viewPorts.length-1]};this.width=function(){return this.Current().width};this.height=function(){return this.Current().height};
+this.ComputeSize=function(a){return a!=null&&typeof a=="number"?a:a=="x"?this.width():a=="y"?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}};a.init();a.ImagesLoaded=function(){for(var c=0;c<a.Images.length;c++)if(!a.Images[c].loaded)return!1;return!0};a.trim=function(a){return a.replace(/^\s+|\s+$/g,"")};a.compressSpaces=function(a){return a.replace(/[\s\r\t\n]+/gm," ")};a.ajax=function(a){var d;return(d=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"))?
+(d.open("GET",a,!1),d.send(null),d.responseText):null};a.parseXml=function(a){if(window.DOMParser)return(new DOMParser).parseFromString(a,"text/xml");else{var a=a.replace(/<!DOCTYPE svg[^>]*>/,""),d=new ActiveXObject("Microsoft.XMLDOM");d.async="false";d.loadXML(a);return d}};a.Property=function(c,d){this.name=c;this.value=d;this.hasValue=function(){return this.value!=null&&this.value!==""};this.numValue=function(){if(!this.hasValue())return 0;var b=parseFloat(this.value);(this.value+"").match(/%$/)&&
+(b/=100);return b};this.valueOrDefault=function(b){return this.hasValue()?this.value:b};this.numValueOrDefault=function(b){return this.hasValue()?this.numValue():b};var b=this;this.Color={addOpacity:function(d){var c=b.value;if(d!=null&&d!=""){var f=new RGBColor(b.value);f.ok&&(c="rgba("+f.r+", "+f.g+", "+f.b+", "+d+")")}return new a.Property(b.name,c)}};this.Definition={getDefinition:function(){var d=b.value.replace(/^(url\()?#([^\)]+)\)?$/,"$2");return a.Definitions[d]},isUrl:function(){return b.value.indexOf("url(")==
+0},getFillStyle:function(b){var d=this.getDefinition();return d!=null&&d.createGradient?d.createGradient(a.ctx,b):d!=null&&d.createPattern?d.createPattern(a.ctx,b):null}};this.Length={DPI:function(){return 96},EM:function(b){var d=12,c=new a.Property("fontSize",a.Font.Parse(a.ctx.font).fontSize);c.hasValue()&&(d=c.Length.toPixels(b));return d},toPixels:function(d){if(!b.hasValue())return 0;var c=b.value+"";return c.match(/em$/)?b.numValue()*this.EM(d):c.match(/ex$/)?b.numValue()*this.EM(d)/2:c.match(/px$/)?
+b.numValue():c.match(/pt$/)?b.numValue()*1.25:c.match(/pc$/)?b.numValue()*15:c.match(/cm$/)?b.numValue()*this.DPI(d)/2.54:c.match(/mm$/)?b.numValue()*this.DPI(d)/25.4:c.match(/in$/)?b.numValue()*this.DPI(d):c.match(/%$/)?b.numValue()*a.ViewPort.ComputeSize(d):b.numValue()}};this.Time={toMilliseconds:function(){if(!b.hasValue())return 0;var a=b.value+"";if(a.match(/s$/))return b.numValue()*1E3;a.match(/ms$/);return b.numValue()}};this.Angle={toRadians:function(){if(!b.hasValue())return 0;var a=b.value+
+"";return a.match(/deg$/)?b.numValue()*(Math.PI/180):a.match(/grad$/)?b.numValue()*(Math.PI/200):a.match(/rad$/)?b.numValue():b.numValue()*(Math.PI/180)}}};a.Font=new function(){this.Styles=["normal","italic","oblique","inherit"];this.Variants=["normal","small-caps","inherit"];this.Weights="normal,bold,bolder,lighter,100,200,300,400,500,600,700,800,900,inherit".split(",");this.CreateFont=function(d,b,c,e,f,g){g=g!=null?this.Parse(g):this.CreateFont("","","","","",a.ctx.font);return{fontFamily:f||
+g.fontFamily,fontSize:e||g.fontSize,fontStyle:d||g.fontStyle,fontWeight:c||g.fontWeight,fontVariant:b||g.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var c=this;this.Parse=function(d){for(var b={},d=a.trim(a.compressSpaces(d||"")).split(" "),k=!1,e=!1,f=!1,g=!1,j="",h=0;h<d.length;h++)if(!e&&c.Styles.indexOf(d[h])!=-1){if(d[h]!="inherit")b.fontStyle=d[h];e=!0}else if(!g&&c.Variants.indexOf(d[h])!=-1){if(d[h]!="inherit")b.fontVariant=
+d[h];e=g=!0}else if(!f&&c.Weights.indexOf(d[h])!=-1){if(d[h]!="inherit")b.fontWeight=d[h];e=g=f=!0}else if(k)d[h]!="inherit"&&(j+=d[h]);else{if(d[h]!="inherit")b.fontSize=d[h].split("/")[0];e=g=f=k=!0}if(j!="")b.fontFamily=j;return b}};a.ToNumberArray=function(c){for(var c=a.trim(a.compressSpaces((c||"").replace(/,/g," "))).split(" "),d=0;d<c.length;d++)c[d]=parseFloat(c[d]);return c};a.Point=function(a,d){this.x=a;this.y=d;this.angleTo=function(b){return Math.atan2(b.y-this.y,b.x-this.x)};this.applyTransform=
+function(b){var a=this.x*b[1]+this.y*b[3]+b[5];this.x=this.x*b[0]+this.y*b[2]+b[4];this.y=a}};a.CreatePoint=function(c){c=a.ToNumberArray(c);return new a.Point(c[0],c[1])};a.CreatePath=function(c){for(var c=a.ToNumberArray(c),d=[],b=0;b<c.length;b+=2)d.push(new a.Point(c[b],c[b+1]));return d};a.BoundingBox=function(a,d,b,k){this.y2=this.x2=this.y1=this.x1=Number.NaN;this.x=function(){return this.x1};this.y=function(){return this.y1};this.width=function(){return this.x2-this.x1};this.height=function(){return this.y2-
+this.y1};this.addPoint=function(b,a){if(b!=null){if(isNaN(this.x1)||isNaN(this.x2))this.x2=this.x1=b;if(b<this.x1)this.x1=b;if(b>this.x2)this.x2=b}if(a!=null){if(isNaN(this.y1)||isNaN(this.y2))this.y2=this.y1=a;if(a<this.y1)this.y1=a;if(a>this.y2)this.y2=a}};this.addX=function(b){this.addPoint(b,null)};this.addY=function(b){this.addPoint(null,b)};this.addBoundingBox=function(b){this.addPoint(b.x1,b.y1);this.addPoint(b.x2,b.y2)};this.addQuadraticCurve=function(b,a,d,c,k,l){d=b+2/3*(d-b);c=a+2/3*(c-
+a);this.addBezierCurve(b,a,d,d+1/3*(k-b),c,c+1/3*(l-a),k,l)};this.addBezierCurve=function(b,a,d,c,k,l,o,n){var q=[b,a],p=[d,c],t=[k,l],m=[o,n];this.addPoint(q[0],q[1]);this.addPoint(m[0],m[1]);for(i=0;i<=1;i++)b=function(b){return Math.pow(1-b,3)*q[i]+3*Math.pow(1-b,2)*b*p[i]+3*(1-b)*Math.pow(b,2)*t[i]+Math.pow(b,3)*m[i]},a=6*q[i]-12*p[i]+6*t[i],d=-3*q[i]+9*p[i]-9*t[i]+3*m[i],c=3*p[i]-3*q[i],d==0?a!=0&&(a=-c/a,0<a&&a<1&&(i==0&&this.addX(b(a)),i==1&&this.addY(b(a)))):(c=Math.pow(a,2)-4*c*d,c<0||(k=
+(-a+Math.sqrt(c))/(2*d),0<k&&k<1&&(i==0&&this.addX(b(k)),i==1&&this.addY(b(k))),a=(-a-Math.sqrt(c))/(2*d),0<a&&a<1&&(i==0&&this.addX(b(a)),i==1&&this.addY(b(a)))))};this.isPointInBox=function(b,a){return this.x1<=b&&b<=this.x2&&this.y1<=a&&a<=this.y2};this.addPoint(a,d);this.addPoint(b,k)};a.Transform=function(c){var d=this;this.Type={};this.Type.translate=function(b){this.p=a.CreatePoint(b);this.apply=function(b){b.translate(this.p.x||0,this.p.y||0)};this.applyToPoint=function(b){b.applyTransform([1,
+0,0,1,this.p.x||0,this.p.y||0])}};this.Type.rotate=function(b){b=a.ToNumberArray(b);this.angle=new a.Property("angle",b[0]);this.cx=b[1]||0;this.cy=b[2]||0;this.apply=function(b){b.translate(this.cx,this.cy);b.rotate(this.angle.Angle.toRadians());b.translate(-this.cx,-this.cy)};this.applyToPoint=function(b){var a=this.angle.Angle.toRadians();b.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0]);b.applyTransform([Math.cos(a),Math.sin(a),-Math.sin(a),Math.cos(a),0,0]);b.applyTransform([1,0,0,1,-this.p.x||
+0,-this.p.y||0])}};this.Type.scale=function(b){this.p=a.CreatePoint(b);this.apply=function(b){b.scale(this.p.x||1,this.p.y||this.p.x||1)};this.applyToPoint=function(b){b.applyTransform([this.p.x||0,0,0,this.p.y||0,0,0])}};this.Type.matrix=function(b){this.m=a.ToNumberArray(b);this.apply=function(b){b.transform(this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5])};this.applyToPoint=function(b){b.applyTransform(this.m)}};this.Type.SkewBase=function(b){this.base=d.Type.matrix;this.base(b);this.angle=
+new a.Property("angle",b)};this.Type.SkewBase.prototype=new this.Type.matrix;this.Type.skewX=function(b){this.base=d.Type.SkewBase;this.base(b);this.m=[1,0,Math.tan(this.angle.Angle.toRadians()),1,0,0]};this.Type.skewX.prototype=new this.Type.SkewBase;this.Type.skewY=function(b){this.base=d.Type.SkewBase;this.base(b);this.m=[1,Math.tan(this.angle.Angle.toRadians()),0,1,0,0]};this.Type.skewY.prototype=new this.Type.SkewBase;this.transforms=[];this.apply=function(b){for(var a=0;a<this.transforms.length;a++)this.transforms[a].apply(b)};
+this.applyToPoint=function(b){for(var a=0;a<this.transforms.length;a++)this.transforms[a].applyToPoint(b)};for(var c=a.trim(a.compressSpaces(c)).split(/\s(?=[a-z])/),b=0;b<c.length;b++){var k=c[b].split("(")[0],e=c[b].split("(")[1].replace(")","");this.transforms.push(new this.Type[k](e))}};a.AspectRatio=function(c,d,b,k,e,f,g,j,h,l){var d=a.compressSpaces(d),d=d.replace(/^defer\s/,""),o=d.split(" ")[0]||"xMidYMid",d=d.split(" ")[1]||"meet",n=b/k,q=e/f,p=Math.min(n,q),m=Math.max(n,q);d=="meet"&&(k*=
+p,f*=p);d=="slice"&&(k*=m,f*=m);h=new a.Property("refX",h);l=new a.Property("refY",l);h.hasValue()&&l.hasValue()?c.translate(-p*h.Length.toPixels("x"),-p*l.Length.toPixels("y")):(o.match(/^xMid/)&&(d=="meet"&&p==q||d=="slice"&&m==q)&&c.translate(b/2-k/2,0),o.match(/YMid$/)&&(d=="meet"&&p==n||d=="slice"&&m==n)&&c.translate(0,e/2-f/2),o.match(/^xMax/)&&(d=="meet"&&p==q||d=="slice"&&m==q)&&c.translate(b-k,0),o.match(/YMax$/)&&(d=="meet"&&p==n||d=="slice"&&m==n)&&c.translate(0,e-f));o=="none"?c.scale(n,
+q):d=="meet"?c.scale(p,p):d=="slice"&&c.scale(m,m);c.translate(g==null?0:-g,j==null?0:-j)};a.Element={};a.Element.ElementBase=function(c){this.attributes={};this.styles={};this.children=[];this.attribute=function(b,d){var c=this.attributes[b];if(c!=null)return c;c=new a.Property(b,"");d==!0&&(this.attributes[b]=c);return c};this.style=function(b,d){var c=this.styles[b];if(c!=null)return c;c=this.attribute(b);if(c!=null&&c.hasValue())return c;c=this.parent;if(c!=null&&(c=c.style(b),c!=null&&c.hasValue()))return c;
+c=new a.Property(b,"");d==!0&&(this.styles[b]=c);return c};this.render=function(b){if(this.style("display").value!="none"&&this.attribute("visibility").value!="hidden"){b.save();this.setContext(b);if(this.attribute("mask").hasValue()){var a=this.attribute("mask").Definition.getDefinition();a!=null&&a.apply(b,this)}else this.style("filter").hasValue()?(a=this.style("filter").Definition.getDefinition(),a!=null&&a.apply(b,this)):this.renderChildren(b);this.clearContext(b);b.restore()}};this.setContext=
+function(){};this.clearContext=function(){};this.renderChildren=function(b){for(var a=0;a<this.children.length;a++)this.children[a].render(b)};this.addChild=function(b,d){var c=b;d&&(c=a.CreateElement(b));c.parent=this;this.children.push(c)};if(c!=null&&c.nodeType==1){for(var d=0;d<c.childNodes.length;d++){var b=c.childNodes[d];b.nodeType==1&&this.addChild(b,!0)}for(d=0;d<c.attributes.length;d++)b=c.attributes[d],this.attributes[b.nodeName]=new a.Property(b.nodeName,b.nodeValue);b=a.Styles[c.nodeName];
+if(b!=null)for(var k in b)this.styles[k]=b[k];if(this.attribute("class").hasValue())for(var d=a.compressSpaces(this.attribute("class").value).split(" "),e=0;e<d.length;e++){b=a.Styles["."+d[e]];if(b!=null)for(k in b)this.styles[k]=b[k];b=a.Styles[c.nodeName+"."+d[e]];if(b!=null)for(k in b)this.styles[k]=b[k]}if(this.attribute("style").hasValue()){b=this.attribute("style").value.split(";");for(d=0;d<b.length;d++)a.trim(b[d])!=""&&(c=b[d].split(":"),k=a.trim(c[0]),c=a.trim(c[1]),this.styles[k]=new a.Property(k,
+c))}this.attribute("id").hasValue()&&a.Definitions[this.attribute("id").value]==null&&(a.Definitions[this.attribute("id").value]=this)}};a.Element.RenderedElementBase=function(c){this.base=a.Element.ElementBase;this.base(c);this.setContext=function(d){if(this.style("fill").Definition.isUrl()){var b=this.style("fill").Definition.getFillStyle(this);if(b!=null)d.fillStyle=b}else if(this.style("fill").hasValue())b=this.style("fill"),this.style("fill-opacity").hasValue()&&(b=b.Color.addOpacity(this.style("fill-opacity").value)),
+d.fillStyle=b.value=="none"?"rgba(0,0,0,0)":b.value;if(this.style("stroke").Definition.isUrl()){if(b=this.style("stroke").Definition.getFillStyle(this),b!=null)d.strokeStyle=b}else if(this.style("stroke").hasValue())b=this.style("stroke"),this.style("stroke-opacity").hasValue()&&(b=b.Color.addOpacity(this.style("stroke-opacity").value)),d.strokeStyle=b.value=="none"?"rgba(0,0,0,0)":b.value;if(this.style("stroke-width").hasValue())d.lineWidth=this.style("stroke-width").Length.toPixels();if(this.style("stroke-linecap").hasValue())d.lineCap=
+this.style("stroke-linecap").value;if(this.style("stroke-linejoin").hasValue())d.lineJoin=this.style("stroke-linejoin").value;if(this.style("stroke-miterlimit").hasValue())d.miterLimit=this.style("stroke-miterlimit").value;if(typeof d.font!="undefined")d.font=a.Font.CreateFont(this.style("font-style").value,this.style("font-variant").value,this.style("font-weight").value,this.style("font-size").hasValue()?this.style("font-size").Length.toPixels()+"px":"",this.style("font-family").value).toString();
+this.attribute("transform").hasValue()&&(new a.Transform(this.attribute("transform").value)).apply(d);this.attribute("clip-path").hasValue()&&(b=this.attribute("clip-path").Definition.getDefinition(),b!=null&&b.apply(d));if(this.style("opacity").hasValue())d.globalAlpha=this.style("opacity").numValue()}};a.Element.RenderedElementBase.prototype=new a.Element.ElementBase;a.Element.PathElementBase=function(c){this.base=a.Element.RenderedElementBase;this.base(c);this.path=function(d){d!=null&&d.beginPath();
+return new a.BoundingBox};this.renderChildren=function(d){this.path(d);a.Mouse.checkPath(this,d);d.fillStyle!=""&&d.fill();d.strokeStyle!=""&&d.stroke();var b=this.getMarkers();if(b!=null){if(this.style("marker-start").Definition.isUrl()){var c=this.style("marker-start").Definition.getDefinition();c.render(d,b[0][0],b[0][1])}if(this.style("marker-mid").Definition.isUrl())for(var c=this.style("marker-mid").Definition.getDefinition(),e=1;e<b.length-1;e++)c.render(d,b[e][0],b[e][1]);this.style("marker-end").Definition.isUrl()&&
+(c=this.style("marker-end").Definition.getDefinition(),c.render(d,b[b.length-1][0],b[b.length-1][1]))}};this.getBoundingBox=function(){return this.path()};this.getMarkers=function(){return null}};a.Element.PathElementBase.prototype=new a.Element.RenderedElementBase;a.Element.svg=function(c){this.base=a.Element.RenderedElementBase;this.base(c);this.baseClearContext=this.clearContext;this.clearContext=function(d){this.baseClearContext(d);a.ViewPort.RemoveCurrent()};this.baseSetContext=this.setContext;
+this.setContext=function(d){d.strokeStyle="rgba(0,0,0,0)";d.lineCap="butt";d.lineJoin="miter";d.miterLimit=4;this.baseSetContext(d);this.attribute("x").hasValue()&&this.attribute("y").hasValue()&&d.translate(this.attribute("x").Length.toPixels("x"),this.attribute("y").Length.toPixels("y"));var b=a.ViewPort.width(),c=a.ViewPort.height();if(typeof this.root=="undefined"&&this.attribute("width").hasValue()&&this.attribute("height").hasValue()){var b=this.attribute("width").Length.toPixels("x"),c=this.attribute("height").Length.toPixels("y"),
+e=0,f=0;this.attribute("refX").hasValue()&&this.attribute("refY").hasValue()&&(e=-this.attribute("refX").Length.toPixels("x"),f=-this.attribute("refY").Length.toPixels("y"));d.beginPath();d.moveTo(e,f);d.lineTo(b,f);d.lineTo(b,c);d.lineTo(e,c);d.closePath();d.clip()}a.ViewPort.SetCurrent(b,c);if(this.attribute("viewBox").hasValue()){var e=a.ToNumberArray(this.attribute("viewBox").value),f=e[0],g=e[1],b=e[2],c=e[3];a.AspectRatio(d,this.attribute("preserveAspectRatio").value,a.ViewPort.width(),b,a.ViewPort.height(),
+c,f,g,this.attribute("refX").value,this.attribute("refY").value);a.ViewPort.RemoveCurrent();a.ViewPort.SetCurrent(e[2],e[3])}}};a.Element.svg.prototype=new a.Element.RenderedElementBase;a.Element.rect=function(c){this.base=a.Element.PathElementBase;this.base(c);this.path=function(d){var b=this.attribute("x").Length.toPixels("x"),c=this.attribute("y").Length.toPixels("y"),e=this.attribute("width").Length.toPixels("x"),f=this.attribute("height").Length.toPixels("y"),g=this.attribute("rx").Length.toPixels("x"),
+j=this.attribute("ry").Length.toPixels("y");this.attribute("rx").hasValue()&&!this.attribute("ry").hasValue()&&(j=g);this.attribute("ry").hasValue()&&!this.attribute("rx").hasValue()&&(g=j);d!=null&&(d.beginPath(),d.moveTo(b+g,c),d.lineTo(b+e-g,c),d.quadraticCurveTo(b+e,c,b+e,c+j),d.lineTo(b+e,c+f-j),d.quadraticCurveTo(b+e,c+f,b+e-g,c+f),d.lineTo(b+g,c+f),d.quadraticCurveTo(b,c+f,b,c+f-j),d.lineTo(b,c+j),d.quadraticCurveTo(b,c,b+g,c),d.closePath());return new a.BoundingBox(b,c,b+e,c+f)}};a.Element.rect.prototype=
+new a.Element.PathElementBase;a.Element.circle=function(c){this.base=a.Element.PathElementBase;this.base(c);this.path=function(d){var b=this.attribute("cx").Length.toPixels("x"),c=this.attribute("cy").Length.toPixels("y"),e=this.attribute("r").Length.toPixels();d!=null&&(d.beginPath(),d.arc(b,c,e,0,Math.PI*2,!0),d.closePath());return new a.BoundingBox(b-e,c-e,b+e,c+e)}};a.Element.circle.prototype=new a.Element.PathElementBase;a.Element.ellipse=function(c){this.base=a.Element.PathElementBase;this.base(c);
+this.path=function(d){var b=4*((Math.sqrt(2)-1)/3),c=this.attribute("rx").Length.toPixels("x"),e=this.attribute("ry").Length.toPixels("y"),f=this.attribute("cx").Length.toPixels("x"),g=this.attribute("cy").Length.toPixels("y");d!=null&&(d.beginPath(),d.moveTo(f,g-e),d.bezierCurveTo(f+b*c,g-e,f+c,g-b*e,f+c,g),d.bezierCurveTo(f+c,g+b*e,f+b*c,g+e,f,g+e),d.bezierCurveTo(f-b*c,g+e,f-c,g+b*e,f-c,g),d.bezierCurveTo(f-c,g-b*e,f-b*c,g-e,f,g-e),d.closePath());return new a.BoundingBox(f-c,g-e,f+c,g+e)}};a.Element.ellipse.prototype=
+new a.Element.PathElementBase;a.Element.line=function(c){this.base=a.Element.PathElementBase;this.base(c);this.getPoints=function(){return[new a.Point(this.attribute("x1").Length.toPixels("x"),this.attribute("y1").Length.toPixels("y")),new a.Point(this.attribute("x2").Length.toPixels("x"),this.attribute("y2").Length.toPixels("y"))]};this.path=function(d){var b=this.getPoints();d!=null&&(d.beginPath(),d.moveTo(b[0].x,b[0].y),d.lineTo(b[1].x,b[1].y));return new a.BoundingBox(b[0].x,b[0].y,b[1].x,b[1].y)};
+this.getMarkers=function(){var a=this.getPoints(),b=a[0].angleTo(a[1]);return[[a[0],b],[a[1],b]]}};a.Element.line.prototype=new a.Element.PathElementBase;a.Element.polyline=function(c){this.base=a.Element.PathElementBase;this.base(c);this.points=a.CreatePath(this.attribute("points").value);this.path=function(d){var b=new a.BoundingBox(this.points[0].x,this.points[0].y);d!=null&&(d.beginPath(),d.moveTo(this.points[0].x,this.points[0].y));for(var c=1;c<this.points.length;c++)b.addPoint(this.points[c].x,
+this.points[c].y),d!=null&&d.lineTo(this.points[c].x,this.points[c].y);return b};this.getMarkers=function(){for(var a=[],b=0;b<this.points.length-1;b++)a.push([this.points[b],this.points[b].angleTo(this.points[b+1])]);a.push([this.points[this.points.length-1],a[a.length-1][1]]);return a}};a.Element.polyline.prototype=new a.Element.PathElementBase;a.Element.polygon=function(c){this.base=a.Element.polyline;this.base(c);this.basePath=this.path;this.path=function(a){var b=this.basePath(a);a!=null&&(a.lineTo(this.points[0].x,
+this.points[0].y),a.closePath());return b}};a.Element.polygon.prototype=new a.Element.polyline;a.Element.path=function(c){this.base=a.Element.PathElementBase;this.base(c);c=this.attribute("d").value;c=c.replace(/,/gm," ");c=c.replace(/([MmZzLlHhVvCcSsQqTtAa])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2");c=c.replace(/([MmZzLlHhVvCcSsQqTtAa])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2");c=c.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm,"$1 $2");c=c.replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2");c=c.replace(/([0-9])([+\-])/gm,
+"$1 $2");c=c.replace(/(\.[0-9]*)(\.)/gm,"$1 $2");c=c.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $3 $4 ");c=a.compressSpaces(c);c=a.trim(c);this.PathParser=new function(d){this.tokens=d.split(" ");this.reset=function(){this.i=-1;this.previousCommand=this.command="";this.start=new a.Point(0,0);this.control=new a.Point(0,0);this.current=new a.Point(0,0);this.points=[];this.angles=[]};this.isEnd=function(){return this.i>=this.tokens.length-1};this.isCommandOrEnd=function(){return this.isEnd()?
+!0:this.tokens[this.i+1].match(/^[A-Za-z]$/)!=null};this.isRelativeCommand=function(){return this.command==this.command.toLowerCase()};this.getToken=function(){this.i+=1;return this.tokens[this.i]};this.getScalar=function(){return parseFloat(this.getToken())};this.nextCommand=function(){this.previousCommand=this.command;this.command=this.getToken()};this.getPoint=function(){return this.makeAbsolute(new a.Point(this.getScalar(),this.getScalar()))};this.getAsControlPoint=function(){var b=this.getPoint();
+return this.control=b};this.getAsCurrentPoint=function(){var b=this.getPoint();return this.current=b};this.getReflectedControlPoint=function(){return this.previousCommand.toLowerCase()!="c"&&this.previousCommand.toLowerCase()!="s"?this.current:new a.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y)};this.makeAbsolute=function(b){if(this.isRelativeCommand())b.x=this.current.x+b.x,b.y=this.current.y+b.y;return b};this.addMarker=function(b,a,d){d!=null&&this.angles.length>0&&this.angles[this.angles.length-
+1]==null&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(d));this.addMarkerAngle(b,a==null?null:a.angleTo(b))};this.addMarkerAngle=function(b,a){this.points.push(b);this.angles.push(a)};this.getMarkerPoints=function(){return this.points};this.getMarkerAngles=function(){for(var b=0;b<this.angles.length;b++)if(this.angles[b]==null)for(var a=b+1;a<this.angles.length;a++)if(this.angles[a]!=null){this.angles[b]=this.angles[a];break}return this.angles}}(c);this.path=function(d){var b=
+this.PathParser;b.reset();var c=new a.BoundingBox;for(d!=null&&d.beginPath();!b.isEnd();)switch(b.nextCommand(),b.command.toUpperCase()){case "M":var e=b.getAsCurrentPoint();b.addMarker(e);c.addPoint(e.x,e.y);d!=null&&d.moveTo(e.x,e.y);for(b.start=b.current;!b.isCommandOrEnd();)e=b.getAsCurrentPoint(),b.addMarker(e,b.start),c.addPoint(e.x,e.y),d!=null&&d.lineTo(e.x,e.y);break;case "L":for(;!b.isCommandOrEnd();){var f=b.current,e=b.getAsCurrentPoint();b.addMarker(e,f);c.addPoint(e.x,e.y);d!=null&&
+d.lineTo(e.x,e.y)}break;case "H":for(;!b.isCommandOrEnd();)e=new a.Point((b.isRelativeCommand()?b.current.x:0)+b.getScalar(),b.current.y),b.addMarker(e,b.current),b.current=e,c.addPoint(b.current.x,b.current.y),d!=null&&d.lineTo(b.current.x,b.current.y);break;case "V":for(;!b.isCommandOrEnd();)e=new a.Point(b.current.x,(b.isRelativeCommand()?b.current.y:0)+b.getScalar()),b.addMarker(e,b.current),b.current=e,c.addPoint(b.current.x,b.current.y),d!=null&&d.lineTo(b.current.x,b.current.y);break;case "C":for(;!b.isCommandOrEnd();){var g=
+b.current,f=b.getPoint(),j=b.getAsControlPoint(),e=b.getAsCurrentPoint();b.addMarker(e,j,f);c.addBezierCurve(g.x,g.y,f.x,f.y,j.x,j.y,e.x,e.y);d!=null&&d.bezierCurveTo(f.x,f.y,j.x,j.y,e.x,e.y)}break;case "S":for(;!b.isCommandOrEnd();)g=b.current,f=b.getReflectedControlPoint(),j=b.getAsControlPoint(),e=b.getAsCurrentPoint(),b.addMarker(e,j,f),c.addBezierCurve(g.x,g.y,f.x,f.y,j.x,j.y,e.x,e.y),d!=null&&d.bezierCurveTo(f.x,f.y,j.x,j.y,e.x,e.y);break;case "Q":for(;!b.isCommandOrEnd();)g=b.current,j=b.getAsControlPoint(),
+e=b.getAsCurrentPoint(),b.addMarker(e,j,j),c.addQuadraticCurve(g.x,g.y,j.x,j.y,e.x,e.y),d!=null&&d.quadraticCurveTo(j.x,j.y,e.x,e.y);break;case "T":for(;!b.isCommandOrEnd();)g=b.current,j=b.getReflectedControlPoint(),b.control=j,e=b.getAsCurrentPoint(),b.addMarker(e,j,j),c.addQuadraticCurve(g.x,g.y,j.x,j.y,e.x,e.y),d!=null&&d.quadraticCurveTo(j.x,j.y,e.x,e.y);break;case "A":for(;!b.isCommandOrEnd();){var g=b.current,h=b.getScalar(),l=b.getScalar(),f=b.getScalar()*(Math.PI/180),o=b.getScalar(),j=b.getScalar(),
+e=b.getAsCurrentPoint(),n=new a.Point(Math.cos(f)*(g.x-e.x)/2+Math.sin(f)*(g.y-e.y)/2,-Math.sin(f)*(g.x-e.x)/2+Math.cos(f)*(g.y-e.y)/2),q=Math.pow(n.x,2)/Math.pow(h,2)+Math.pow(n.y,2)/Math.pow(l,2);q>1&&(h*=Math.sqrt(q),l*=Math.sqrt(q));o=(o==j?-1:1)*Math.sqrt((Math.pow(h,2)*Math.pow(l,2)-Math.pow(h,2)*Math.pow(n.y,2)-Math.pow(l,2)*Math.pow(n.x,2))/(Math.pow(h,2)*Math.pow(n.y,2)+Math.pow(l,2)*Math.pow(n.x,2)));isNaN(o)&&(o=0);var p=new a.Point(o*h*n.y/l,o*-l*n.x/h),g=new a.Point((g.x+e.x)/2+Math.cos(f)*
+p.x-Math.sin(f)*p.y,(g.y+e.y)/2+Math.sin(f)*p.x+Math.cos(f)*p.y),m=function(b,a){return(b[0]*a[0]+b[1]*a[1])/(Math.sqrt(Math.pow(b[0],2)+Math.pow(b[1],2))*Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2)))},s=function(b,a){return(b[0]*a[1]<b[1]*a[0]?-1:1)*Math.acos(m(b,a))},o=s([1,0],[(n.x-p.x)/h,(n.y-p.y)/l]),q=[(n.x-p.x)/h,(n.y-p.y)/l],p=[(-n.x-p.x)/h,(-n.y-p.y)/l],n=s(q,p);if(m(q,p)<=-1)n=Math.PI;m(q,p)>=1&&(n=0);j==0&&n>0&&(n-=2*Math.PI);j==1&&n<0&&(n+=2*Math.PI);q=new a.Point(g.x-h*Math.cos((o+n)/
+2),g.y-l*Math.sin((o+n)/2));b.addMarkerAngle(q,(o+n)/2+(j==0?1:-1)*Math.PI/2);b.addMarkerAngle(e,n+(j==0?1:-1)*Math.PI/2);c.addPoint(e.x,e.y);d!=null&&(m=h>l?h:l,e=h>l?1:h/l,h=h>l?l/h:1,d.translate(g.x,g.y),d.rotate(f),d.scale(e,h),d.arc(0,0,m,o,o+n,1-j),d.scale(1/e,1/h),d.rotate(-f),d.translate(-g.x,-g.y))}break;case "Z":d!=null&&d.closePath(),b.current=b.start}return c};this.getMarkers=function(){for(var a=this.PathParser.getMarkerPoints(),b=this.PathParser.getMarkerAngles(),c=[],e=0;e<a.length;e++)c.push([a[e],
+b[e]]);return c}};a.Element.path.prototype=new a.Element.PathElementBase;a.Element.pattern=function(c){this.base=a.Element.ElementBase;this.base(c);this.createPattern=function(d){var b=new a.Element.svg;b.attributes.viewBox=new a.Property("viewBox",this.attribute("viewBox").value);b.attributes.x=new a.Property("x",this.attribute("x").value);b.attributes.y=new a.Property("y",this.attribute("y").value);b.attributes.width=new a.Property("width",this.attribute("width").value);b.attributes.height=new a.Property("height",
+this.attribute("height").value);b.children=this.children;var c=document.createElement("canvas");c.width=this.attribute("width").Length.toPixels("x");c.height=this.attribute("height").Length.toPixels("y");b.render(c.getContext("2d"));return d.createPattern(c,"repeat")}};a.Element.pattern.prototype=new a.Element.ElementBase;a.Element.marker=function(c){this.base=a.Element.ElementBase;this.base(c);this.baseRender=this.render;this.render=function(d,b,c){d.translate(b.x,b.y);this.attribute("orient").valueOrDefault("auto")==
+"auto"&&d.rotate(c);this.attribute("markerUnits").valueOrDefault("strokeWidth")=="strokeWidth"&&d.scale(d.lineWidth,d.lineWidth);d.save();var e=new a.Element.svg;e.attributes.viewBox=new a.Property("viewBox",this.attribute("viewBox").value);e.attributes.refX=new a.Property("refX",this.attribute("refX").value);e.attributes.refY=new a.Property("refY",this.attribute("refY").value);e.attributes.width=new a.Property("width",this.attribute("markerWidth").value);e.attributes.height=new a.Property("height",
+this.attribute("markerHeight").value);e.attributes.fill=new a.Property("fill",this.attribute("fill").valueOrDefault("black"));e.attributes.stroke=new a.Property("stroke",this.attribute("stroke").valueOrDefault("none"));e.children=this.children;e.render(d);d.restore();this.attribute("markerUnits").valueOrDefault("strokeWidth")=="strokeWidth"&&d.scale(1/d.lineWidth,1/d.lineWidth);this.attribute("orient").valueOrDefault("auto")=="auto"&&d.rotate(-c);d.translate(-b.x,-b.y)}};a.Element.marker.prototype=
+new a.Element.ElementBase;a.Element.defs=function(c){this.base=a.Element.ElementBase;this.base(c);this.render=function(){}};a.Element.defs.prototype=new a.Element.ElementBase;a.Element.GradientBase=function(c){this.base=a.Element.ElementBase;this.base(c);this.gradientUnits=this.attribute("gradientUnits").valueOrDefault("objectBoundingBox");this.stops=[];for(c=0;c<this.children.length;c++)this.stops.push(this.children[c]);this.getGradient=function(){};this.createGradient=function(d,b){var c=this;this.attribute("xlink:href").hasValue()&&
+(c=this.attribute("xlink:href").Definition.getDefinition());for(var e=this.getGradient(d,b),f=0;f<c.stops.length;f++)e.addColorStop(c.stops[f].offset,c.stops[f].color);if(this.attribute("gradientTransform").hasValue()){c=a.ViewPort.viewPorts[0];f=new a.Element.rect;f.attributes.x=new a.Property("x",-a.MAX_VIRTUAL_PIXELS/3);f.attributes.y=new a.Property("y",-a.MAX_VIRTUAL_PIXELS/3);f.attributes.width=new a.Property("width",a.MAX_VIRTUAL_PIXELS);f.attributes.height=new a.Property("height",a.MAX_VIRTUAL_PIXELS);
+var g=new a.Element.g;g.attributes.transform=new a.Property("transform",this.attribute("gradientTransform").value);g.children=[f];f=new a.Element.svg;f.attributes.x=new a.Property("x",0);f.attributes.y=new a.Property("y",0);f.attributes.width=new a.Property("width",c.width);f.attributes.height=new a.Property("height",c.height);f.children=[g];g=document.createElement("canvas");g.width=c.width;g.height=c.height;c=g.getContext("2d");c.fillStyle=e;f.render(c);return c.createPattern(g,"no-repeat")}return e}};
+a.Element.GradientBase.prototype=new a.Element.ElementBase;a.Element.linearGradient=function(c){this.base=a.Element.GradientBase;this.base(c);this.getGradient=function(a,b){var c=b.getBoundingBox(),e=this.gradientUnits=="objectBoundingBox"?c.x()+c.width()*this.attribute("x1").numValue():this.attribute("x1").Length.toPixels("x"),f=this.gradientUnits=="objectBoundingBox"?c.y()+c.height()*this.attribute("y1").numValue():this.attribute("y1").Length.toPixels("y"),g=this.gradientUnits=="objectBoundingBox"?
+c.x()+c.width()*this.attribute("x2").numValue():this.attribute("x2").Length.toPixels("x"),c=this.gradientUnits=="objectBoundingBox"?c.y()+c.height()*this.attribute("y2").numValue():this.attribute("y2").Length.toPixels("y");return a.createLinearGradient(e,f,g,c)}};a.Element.linearGradient.prototype=new a.Element.GradientBase;a.Element.radialGradient=function(c){this.base=a.Element.GradientBase;this.base(c);this.getGradient=function(a,b){var c=b.getBoundingBox(),e=this.gradientUnits=="objectBoundingBox"?
+c.x()+c.width()*this.attribute("cx").numValue():this.attribute("cx").Length.toPixels("x"),f=this.gradientUnits=="objectBoundingBox"?c.y()+c.height()*this.attribute("cy").numValue():this.attribute("cy").Length.toPixels("y"),g=e,j=f;this.attribute("fx").hasValue()&&(g=this.gradientUnits=="objectBoundingBox"?c.x()+c.width()*this.attribute("fx").numValue():this.attribute("fx").Length.toPixels("x"));this.attribute("fy").hasValue()&&(j=this.gradientUnits=="objectBoundingBox"?c.y()+c.height()*this.attribute("fy").numValue():
+this.attribute("fy").Length.toPixels("y"));c=this.gradientUnits=="objectBoundingBox"?(c.width()+c.height())/2*this.attribute("r").numValue():this.attribute("r").Length.toPixels();return a.createRadialGradient(g,j,0,e,f,c)}};a.Element.radialGradient.prototype=new a.Element.GradientBase;a.Element.stop=function(c){this.base=a.Element.ElementBase;this.base(c);this.offset=this.attribute("offset").numValue();c=this.style("stop-color");this.style("stop-opacity").hasValue()&&(c=c.Color.addOpacity(this.style("stop-opacity").value));
+this.color=c.value};a.Element.stop.prototype=new a.Element.ElementBase;a.Element.AnimateBase=function(c){this.base=a.Element.ElementBase;this.base(c);a.Animations.push(this);this.duration=0;this.begin=this.attribute("begin").Time.toMilliseconds();this.maxDuration=this.begin+this.attribute("dur").Time.toMilliseconds();this.getProperty=function(){var a=this.attribute("attributeType").value,b=this.attribute("attributeName").value;return a=="CSS"?this.parent.style(b,!0):this.parent.attribute(b,!0)};this.initialValue=
+null;this.removed=!1;this.calcValue=function(){return""};this.update=function(a){if(this.initialValue==null)this.initialValue=this.getProperty().value;if(this.duration>this.maxDuration)if(this.attribute("repeatCount").value=="indefinite")this.duration=0;else return this.attribute("fill").valueOrDefault("remove")=="remove"&&!this.removed?(this.removed=!0,this.getProperty().value=this.initialValue,!0):!1;this.duration+=a;a=!1;if(this.begin<this.duration)a=this.calcValue(),this.attribute("type").hasValue()&&
+(a=this.attribute("type").value+"("+a+")"),this.getProperty().value=a,a=!0;return a};this.progress=function(){return(this.duration-this.begin)/(this.maxDuration-this.begin)}};a.Element.AnimateBase.prototype=new a.Element.ElementBase;a.Element.animate=function(c){this.base=a.Element.AnimateBase;this.base(c);this.calcValue=function(){var a=this.attribute("from").numValue(),b=this.attribute("to").numValue();return a+(b-a)*this.progress()}};a.Element.animate.prototype=new a.Element.AnimateBase;a.Element.animateColor=
+function(c){this.base=a.Element.AnimateBase;this.base(c);this.calcValue=function(){var a=new RGBColor(this.attribute("from").value),b=new RGBColor(this.attribute("to").value);if(a.ok&&b.ok){var c=a.r+(b.r-a.r)*this.progress(),e=a.g+(b.g-a.g)*this.progress(),a=a.b+(b.b-a.b)*this.progress();return"rgb("+parseInt(c,10)+","+parseInt(e,10)+","+parseInt(a,10)+")"}return this.attribute("from").value}};a.Element.animateColor.prototype=new a.Element.AnimateBase;a.Element.animateTransform=function(c){this.base=
+a.Element.animate;this.base(c)};a.Element.animateTransform.prototype=new a.Element.animate;a.Element.font=function(c){this.base=a.Element.ElementBase;this.base(c);this.horizAdvX=this.attribute("horiz-adv-x").numValue();this.isArabic=this.isRTL=!1;this.missingGlyph=this.fontFace=null;this.glyphs=[];for(c=0;c<this.children.length;c++){var d=this.children[c];if(d.type=="font-face")this.fontFace=d,d.style("font-family").hasValue()&&(a.Definitions[d.style("font-family").value]=this);else if(d.type=="missing-glyph")this.missingGlyph=
+d;else if(d.type=="glyph")d.arabicForm!=""?(this.isArabic=this.isRTL=!0,typeof this.glyphs[d.unicode]=="undefined"&&(this.glyphs[d.unicode]=[]),this.glyphs[d.unicode][d.arabicForm]=d):this.glyphs[d.unicode]=d}};a.Element.font.prototype=new a.Element.ElementBase;a.Element.fontface=function(c){this.base=a.Element.ElementBase;this.base(c);this.ascent=this.attribute("ascent").value;this.descent=this.attribute("descent").value;this.unitsPerEm=this.attribute("units-per-em").numValue()};a.Element.fontface.prototype=
+new a.Element.ElementBase;a.Element.missingglyph=function(c){this.base=a.Element.path;this.base(c);this.horizAdvX=0};a.Element.missingglyph.prototype=new a.Element.path;a.Element.glyph=function(c){this.base=a.Element.path;this.base(c);this.horizAdvX=this.attribute("horiz-adv-x").numValue();this.unicode=this.attribute("unicode").value;this.arabicForm=this.attribute("arabic-form").value};a.Element.glyph.prototype=new a.Element.path;a.Element.text=function(c){this.base=a.Element.RenderedElementBase;
+this.base(c);if(c!=null){this.children=[];for(var d=0;d<c.childNodes.length;d++){var b=c.childNodes[d];b.nodeType==1?this.addChild(b,!0):b.nodeType==3&&this.addChild(new a.Element.tspan(b),!1)}}this.baseSetContext=this.setContext;this.setContext=function(b){this.baseSetContext(b);if(this.style("dominant-baseline").hasValue())b.textBaseline=this.style("dominant-baseline").value;if(this.style("alignment-baseline").hasValue())b.textBaseline=this.style("alignment-baseline").value};this.renderChildren=
+function(b){for(var a=this.style("text-anchor").valueOrDefault("start"),c=this.attribute("x").Length.toPixels("x"),d=this.attribute("y").Length.toPixels("y"),j=0;j<this.children.length;j++){var h=this.children[j];h.attribute("x").hasValue()?h.x=h.attribute("x").Length.toPixels("x"):(h.attribute("dx").hasValue()&&(c+=h.attribute("dx").Length.toPixels("x")),h.x=c);c=h.measureText(b);if(a!="start"&&(j==0||h.attribute("x").hasValue())){for(var l=c,o=j+1;o<this.children.length;o++){var n=this.children[o];
+if(n.attribute("x").hasValue())break;l+=n.measureText(b)}h.x-=a=="end"?l:l/2}c=h.x+c;h.attribute("y").hasValue()?h.y=h.attribute("y").Length.toPixels("y"):(h.attribute("dy").hasValue()&&(d+=h.attribute("dy").Length.toPixels("y")),h.y=d);d=h.y;h.render(b)}}};a.Element.text.prototype=new a.Element.RenderedElementBase;a.Element.TextElementBase=function(c){this.base=a.Element.RenderedElementBase;this.base(c);this.getGlyph=function(a,b,c){var e=b[c],f=null;if(a.isArabic){var g="isolated";if((c==0||b[c-
+1]==" ")&&c<b.length-2&&b[c+1]!=" ")g="terminal";c>0&&b[c-1]!=" "&&c<b.length-2&&b[c+1]!=" "&&(g="medial");if(c>0&&b[c-1]!=" "&&(c==b.length-1||b[c+1]==" "))g="initial";typeof a.glyphs[e]!="undefined"&&(f=a.glyphs[e][g],f==null&&a.glyphs[e].type=="glyph"&&(f=a.glyphs[e]))}else f=a.glyphs[e];if(f==null)f=a.missingGlyph;return f};this.renderChildren=function(c){var b=this.parent.style("font-family").Definition.getDefinition();if(b!=null){var k=this.parent.style("font-size").numValueOrDefault(a.Font.Parse(a.ctx.font).fontSize),
+e=this.parent.style("font-style").valueOrDefault(a.Font.Parse(a.ctx.font).fontStyle),f=this.getText();b.isRTL&&(f=f.split("").reverse().join(""));for(var g=a.ToNumberArray(this.parent.attribute("dx").value),j=0;j<f.length;j++){var h=this.getGlyph(b,f,j),l=k/b.fontFace.unitsPerEm;c.translate(this.x,this.y);c.scale(l,-l);var o=c.lineWidth;c.lineWidth=c.lineWidth*b.fontFace.unitsPerEm/k;e=="italic"&&c.transform(1,0,0.4,1,0,0);h.render(c);e=="italic"&&c.transform(1,0,-0.4,1,0,0);c.lineWidth=o;c.scale(1/
+l,-1/l);c.translate(-this.x,-this.y);this.x+=k*(h.horizAdvX||b.horizAdvX)/b.fontFace.unitsPerEm;typeof g[j]!="undefined"&&!isNaN(g[j])&&(this.x+=g[j])}}else c.strokeStyle!=""&&c.strokeText(a.compressSpaces(this.getText()),this.x,this.y),c.fillStyle!=""&&c.fillText(a.compressSpaces(this.getText()),this.x,this.y)};this.getText=function(){};this.measureText=function(c){var b=this.parent.style("font-family").Definition.getDefinition();if(b!=null){var c=this.parent.style("font-size").numValueOrDefault(a.Font.Parse(a.ctx.font).fontSize),
+k=0,e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var f=a.ToNumberArray(this.parent.attribute("dx").value),g=0;g<e.length;g++){var j=this.getGlyph(b,e,g);k+=(j.horizAdvX||b.horizAdvX)*c/b.fontFace.unitsPerEm;typeof f[g]!="undefined"&&!isNaN(f[g])&&(k+=f[g])}return k}b=a.compressSpaces(this.getText());if(!c.measureText)return b.length*10;c.save();this.setContext(c);b=c.measureText(b).width;c.restore();return b}};a.Element.TextElementBase.prototype=new a.Element.RenderedElementBase;
+a.Element.tspan=function(c){this.base=a.Element.TextElementBase;this.base(c);this.text=c.nodeType==3?c.nodeValue:c.childNodes.length>0?c.childNodes[0].nodeValue:c.text;this.getText=function(){return this.text}};a.Element.tspan.prototype=new a.Element.TextElementBase;a.Element.tref=function(c){this.base=a.Element.TextElementBase;this.base(c);this.getText=function(){var a=this.attribute("xlink:href").Definition.getDefinition();if(a!=null)return a.children[0].getText()}};a.Element.tref.prototype=new a.Element.TextElementBase;
+a.Element.a=function(c){this.base=a.Element.TextElementBase;this.base(c);this.hasText=!0;for(var d=0;d<c.childNodes.length;d++)if(c.childNodes[d].nodeType!=3)this.hasText=!1;this.text=this.hasText?c.childNodes[0].nodeValue:"";this.getText=function(){return this.text};this.baseRenderChildren=this.renderChildren;this.renderChildren=function(b){if(this.hasText){this.baseRenderChildren(b);var c=new a.Property("fontSize",a.Font.Parse(a.ctx.font).fontSize);a.Mouse.checkBoundingBox(this,new a.BoundingBox(this.x,
+this.y-c.Length.toPixels("y"),this.x+this.measureText(b),this.y))}else c=new a.Element.g,c.children=this.children,c.parent=this,c.render(b)};this.onclick=function(){window.open(this.attribute("xlink:href").value)};this.onmousemove=function(){a.ctx.canvas.style.cursor="pointer"}};a.Element.a.prototype=new a.Element.TextElementBase;a.Element.image=function(c){this.base=a.Element.RenderedElementBase;this.base(c);a.Images.push(this);this.img=document.createElement("img");this.loaded=!1;var d=this;this.img.onload=
+function(){d.loaded=!0};this.img.src=this.attribute("xlink:href").value;this.renderChildren=function(b){var c=this.attribute("x").Length.toPixels("x"),d=this.attribute("y").Length.toPixels("y"),f=this.attribute("width").Length.toPixels("x"),g=this.attribute("height").Length.toPixels("y");f==0||g==0||(b.save(),b.translate(c,d),a.AspectRatio(b,this.attribute("preserveAspectRatio").value,f,this.img.width,g,this.img.height,0,0),b.drawImage(this.img,0,0),b.restore())}};a.Element.image.prototype=new a.Element.RenderedElementBase;
+a.Element.g=function(c){this.base=a.Element.RenderedElementBase;this.base(c);this.getBoundingBox=function(){for(var c=new a.BoundingBox,b=0;b<this.children.length;b++)c.addBoundingBox(this.children[b].getBoundingBox());return c}};a.Element.g.prototype=new a.Element.RenderedElementBase;a.Element.symbol=function(c){this.base=a.Element.RenderedElementBase;this.base(c);this.baseSetContext=this.setContext;this.setContext=function(c){this.baseSetContext(c);if(this.attribute("viewBox").hasValue()){var b=
+a.ToNumberArray(this.attribute("viewBox").value),k=b[0],e=b[1];width=b[2];height=b[3];a.AspectRatio(c,this.attribute("preserveAspectRatio").value,this.attribute("width").Length.toPixels("x"),width,this.attribute("height").Length.toPixels("y"),height,k,e);a.ViewPort.SetCurrent(b[2],b[3])}}};a.Element.symbol.prototype=new a.Element.RenderedElementBase;a.Element.style=function(c){this.base=a.Element.ElementBase;this.base(c);for(var c=c.childNodes[0].nodeValue+(c.childNodes.length>1?c.childNodes[1].nodeValue:
+""),c=c.replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,""),c=a.compressSpaces(c),c=c.split("}"),d=0;d<c.length;d++)if(a.trim(c[d])!="")for(var b=c[d].split("{"),k=b[0].split(","),b=b[1].split(";"),e=0;e<k.length;e++){var f=a.trim(k[e]);if(f!=""){for(var g={},j=0;j<b.length;j++){var h=b[j].indexOf(":"),l=b[j].substr(0,h),h=b[j].substr(h+1,b[j].length-h);l!=null&&h!=null&&(g[a.trim(l)]=new a.Property(a.trim(l),a.trim(h)))}a.Styles[f]=g;if(f=="@font-face"){f=g["font-family"].value.replace(/"/g,
+"");g=g.src.value.split(",");for(j=0;j<g.length;j++)if(g[j].indexOf('format("svg")')>0){l=g[j].indexOf("url");h=g[j].indexOf(")",l);l=g[j].substr(l+5,h-l-6);l=a.parseXml(a.ajax(l)).getElementsByTagName("font");for(h=0;h<l.length;h++){var o=a.CreateElement(l[h]);a.Definitions[f]=o}}}}}};a.Element.style.prototype=new a.Element.ElementBase;a.Element.use=function(c){this.base=a.Element.RenderedElementBase;this.base(c);this.baseSetContext=this.setContext;this.setContext=function(a){this.baseSetContext(a);
+this.attribute("x").hasValue()&&a.translate(this.attribute("x").Length.toPixels("x"),0);this.attribute("y").hasValue()&&a.translate(0,this.attribute("y").Length.toPixels("y"))};this.getDefinition=function(){var a=this.attribute("xlink:href").Definition.getDefinition();if(this.attribute("width").hasValue())a.attribute("width",!0).value=this.attribute("width").value;if(this.attribute("height").hasValue())a.attribute("height",!0).value=this.attribute("height").value;return a};this.path=function(a){var b=
+this.getDefinition();b!=null&&b.path(a)};this.renderChildren=function(a){var b=this.getDefinition();b!=null&&b.render(a)}};a.Element.use.prototype=new a.Element.RenderedElementBase;a.Element.mask=function(c){this.base=a.Element.ElementBase;this.base(c);this.apply=function(a,b){var c=this.attribute("x").Length.toPixels("x"),e=this.attribute("y").Length.toPixels("y"),f=this.attribute("width").Length.toPixels("x"),g=this.attribute("height").Length.toPixels("y"),j=b.attribute("mask").value;b.attribute("mask").value=
+"";var h=document.createElement("canvas");h.width=c+f;h.height=e+g;var l=h.getContext("2d");this.renderChildren(l);var o=document.createElement("canvas");o.width=c+f;o.height=e+g;var n=o.getContext("2d");b.render(n);n.globalCompositeOperation="destination-in";n.fillStyle=l.createPattern(h,"no-repeat");n.fillRect(0,0,c+f,e+g);a.fillStyle=n.createPattern(o,"no-repeat");a.fillRect(0,0,c+f,e+g);b.attribute("mask").value=j};this.render=function(){}};a.Element.mask.prototype=new a.Element.ElementBase;a.Element.clipPath=
+function(c){this.base=a.Element.ElementBase;this.base(c);this.apply=function(a){for(var b=0;b<this.children.length;b++)this.children[b].path&&(this.children[b].path(a),a.clip())};this.render=function(){}};a.Element.clipPath.prototype=new a.Element.ElementBase;a.Element.filter=function(c){this.base=a.Element.ElementBase;this.base(c);this.apply=function(a,b){var c=b.getBoundingBox(),e=this.attribute("x").Length.toPixels("x"),f=this.attribute("y").Length.toPixels("y");if(e==0||f==0)e=c.x1,f=c.y1;var g=
+this.attribute("width").Length.toPixels("x"),j=this.attribute("height").Length.toPixels("y");if(g==0||j==0)g=c.width(),j=c.height();c=b.style("filter").value;b.style("filter").value="";var h=0.2*g,l=0.2*j,o=document.createElement("canvas");o.width=g+2*h;o.height=j+2*l;var n=o.getContext("2d");n.translate(-e+h,-f+l);b.render(n);for(var q=0;q<this.children.length;q++)this.children[q].apply(n,0,0,g+2*h,j+2*l);a.drawImage(o,0,0,g+2*h,j+2*l,e-h,f-l,g+2*h,j+2*l);b.style("filter",!0).value=c};this.render=
+function(){}};a.Element.filter.prototype=new a.Element.ElementBase;a.Element.feGaussianBlur=function(c){function d(a,c,d,f,g){for(var j=0;j<g;j++)for(var h=0;h<f;h++)for(var l=a[j*f*4+h*4+3]/255,o=0;o<4;o++){for(var n=d[0]*(l==0?255:a[j*f*4+h*4+o])*(l==0||o==3?1:l),q=1;q<d.length;q++){var p=Math.max(h-q,0),m=a[j*f*4+p*4+3]/255,p=Math.min(h+q,f-1),p=a[j*f*4+p*4+3]/255,s=d[q],r;m==0?r=255:(r=Math.max(h-q,0),r=a[j*f*4+r*4+o]);m=r*(m==0||o==3?1:m);p==0?r=255:(r=Math.min(h+q,f-1),r=a[j*f*4+r*4+o]);n+=
+s*(m+r*(p==0||o==3?1:p))}c[h*g*4+j*4+o]=n}}this.base=a.Element.ElementBase;this.base(c);this.apply=function(a,c,e,f,g){var e=this.attribute("stdDeviation").numValue(),c=a.getImageData(0,0,f,g),e=Math.max(e,0.01),j=Math.ceil(e*4)+1;mask=[];for(var h=0;h<j;h++)mask[h]=Math.exp(-0.5*(h/e)*(h/e));e=mask;j=0;for(h=1;h<e.length;h++)j+=Math.abs(e[h]);j=2*j+Math.abs(e[0]);for(h=0;h<e.length;h++)e[h]/=j;tmp=[];d(c.data,tmp,e,f,g);d(tmp,c.data,e,g,f);a.clearRect(0,0,f,g);a.putImageData(c,0,0)}};a.Element.filter.prototype=
+new a.Element.feGaussianBlur;a.Element.title=function(){};a.Element.title.prototype=new a.Element.ElementBase;a.Element.desc=function(){};a.Element.desc.prototype=new a.Element.ElementBase;a.Element.MISSING=function(a){console.log("ERROR: Element '"+a.nodeName+"' not yet implemented.")};a.Element.MISSING.prototype=new a.Element.ElementBase;a.CreateElement=function(c){var d=c.nodeName.replace(/^[^:]+:/,""),d=d.replace(/\-/g,""),b=null,b=typeof a.Element[d]!="undefined"?new a.Element[d](c):new a.Element.MISSING(c);
+b.type=c.nodeName;return b};a.load=function(c,d){a.loadXml(c,a.ajax(d))};a.loadXml=function(c,d){a.loadXmlDoc(c,a.parseXml(d))};a.loadXmlDoc=function(c,d){a.init(c);var b=function(a){for(var b=c.canvas;b;)a.x-=b.offsetLeft,a.y-=b.offsetTop,b=b.offsetParent;window.scrollX&&(a.x+=window.scrollX);window.scrollY&&(a.y+=window.scrollY);return a};if(a.opts.ignoreMouse!=!0)c.canvas.onclick=function(c){c=b(new a.Point(c!=null?c.clientX:event.clientX,c!=null?c.clientY:event.clientY));a.Mouse.onclick(c.x,c.y)},
+c.canvas.onmousemove=function(c){c=b(new a.Point(c!=null?c.clientX:event.clientX,c!=null?c.clientY:event.clientY));a.Mouse.onmousemove(c.x,c.y)};var k=a.CreateElement(d.documentElement),e=k.root=!0,f=function(){a.ViewPort.Clear();c.canvas.parentNode&&a.ViewPort.SetCurrent(c.canvas.parentNode.clientWidth,c.canvas.parentNode.clientHeight);if(a.opts.ignoreDimensions!=!0){if(k.style("width").hasValue())c.canvas.width=k.style("width").Length.toPixels("x"),c.canvas.style.width=c.canvas.width+"px";if(k.style("height").hasValue())c.canvas.height=
+k.style("height").Length.toPixels("y"),c.canvas.style.height=c.canvas.height+"px"}var b=c.canvas.clientWidth||c.canvas.width,d=c.canvas.clientHeight||c.canvas.height;a.ViewPort.SetCurrent(b,d);if(a.opts!=null&&a.opts.offsetX!=null)k.attribute("x",!0).value=a.opts.offsetX;if(a.opts!=null&&a.opts.offsetY!=null)k.attribute("y",!0).value=a.opts.offsetY;if(a.opts!=null&&a.opts.scaleWidth!=null&&a.opts.scaleHeight!=null){var f=1,g=1;k.attribute("width").hasValue()&&(f=k.attribute("width").Length.toPixels("x")/
+a.opts.scaleWidth);k.attribute("height").hasValue()&&(g=k.attribute("height").Length.toPixels("y")/a.opts.scaleHeight);k.attribute("width",!0).value=a.opts.scaleWidth;k.attribute("height",!0).value=a.opts.scaleHeight;k.attribute("viewBox",!0).value="0 0 "+b*f+" "+d*g;k.attribute("preserveAspectRatio",!0).value="none"}a.opts.ignoreClear!=!0&&c.clearRect(0,0,b,d);k.render(c);e&&(e=!1,a.opts!=null&&typeof a.opts.renderCallback=="function"&&a.opts.renderCallback())},g=!0;a.ImagesLoaded()&&(g=!1,f());
+a.intervalID=setInterval(function(){var b=!1;g&&a.ImagesLoaded()&&(g=!1,b=!0);a.opts.ignoreMouse!=!0&&(b|=a.Mouse.hasEvents());if(a.opts.ignoreAnimation!=!0)for(var c=0;c<a.Animations.length;c++)b|=a.Animations[c].update(1E3/a.FRAMERATE);a.opts!=null&&typeof a.opts.forceRedraw=="function"&&a.opts.forceRedraw()==!0&&(b=!0);b&&(f(),a.Mouse.runEvents())},1E3/a.FRAMERATE)};a.stop=function(){a.intervalID&&clearInterval(a.intervalID)};a.Mouse=new function(){this.events=[];this.hasEvents=function(){return this.events.length!=
+0};this.onclick=function(a,d){this.events.push({type:"onclick",x:a,y:d,run:function(a){if(a.onclick)a.onclick()}})};this.onmousemove=function(a,d){this.events.push({type:"onmousemove",x:a,y:d,run:function(a){if(a.onmousemove)a.onmousemove()}})};this.eventElements=[];this.checkPath=function(a,d){for(var b=0;b<this.events.length;b++){var k=this.events[b];d.isPointInPath&&d.isPointInPath(k.x,k.y)&&(this.eventElements[b]=a)}};this.checkBoundingBox=function(a,d){for(var b=0;b<this.events.length;b++){var k=
+this.events[b];d.isPointInBox(k.x,k.y)&&(this.eventElements[b]=a)}};this.runEvents=function(){a.ctx.canvas.style.cursor="";for(var c=0;c<this.events.length;c++)for(var d=this.events[c],b=this.eventElements[c];b;)d.run(b),b=b.parent;this.events=[];this.eventElements=[]}};return a}this.canvg=function(a,c,d){if(a==null&&c==null&&d==null)for(var c=document.getElementsByTagName("svg"),b=0;b<c.length;b++){a=c[b];d=document.createElement("canvas");d.width=a.clientWidth;d.height=a.clientHeight;a.parentNode.insertBefore(d,
+a);a.parentNode.removeChild(a);var k=document.createElement("div");k.appendChild(a);canvg(d,k.innerHTML)}else d=d||{},typeof a=="string"&&(a=document.getElementById(a)),a.svg==null?(b=m(),a.svg=b):(b=a.svg,b.stop()),b.opts=d,a=a.getContext("2d"),typeof c.documentElement!="undefined"?b.loadXmlDoc(a,c):c.substr(0,1)=="<"?b.loadXml(a,c):b.load(a,c)}})();
+if(CanvasRenderingContext2D)CanvasRenderingContext2D.prototype.drawSvg=function(m,a,c,d,b){canvg(this.canvas,m,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:a,offsetY:c,scaleWidth:d,scaleHeight:b})};
+(function(m){var a=m.css,c=m.CanVGRenderer,d=m.SVGRenderer,b=m.extend,k=m.merge,e=m.addEvent,f=m.createElement,g=m.discardElement;b(c.prototype,d.prototype);b(c.prototype,{create:function(a,b,c,d){this.setContainer(b,c,d);this.configure(a)},setContainer:function(a,b,c){var d=a.style,e=a.parentNode,g=d.left,d=d.top,k=a.offsetWidth,m=a.offsetHeight,s={visibility:"hidden",position:"absolute"};this.init.apply(this,[a,b,c]);this.canvas=f("canvas",{width:k,height:m},{position:"relative",left:g,top:d},a);
+this.ttLine=f("div",null,s,e);this.ttDiv=f("div",null,s,e);this.ttTimer=void 0;this.hiddenSvg=a=f("div",{width:k,height:m},{visibility:"hidden",left:g,top:d},e);a.appendChild(this.box)},configure:function(b){var c=this,d=b.options.tooltip,f=d.borderWidth,g=c.ttDiv,m=d.style,p=c.ttLine,t=parseInt(m.padding,10),m=k(m,{padding:t+"px","background-color":d.backgroundColor,"border-style":"solid","border-width":f+"px","border-radius":d.borderRadius+"px"});d.shadow&&(m=k(m,{"box-shadow":"1px 1px 3px gray",
+"-webkit-box-shadow":"1px 1px 3px gray"}));a(g,m);a(p,{"border-left":"1px solid darkgray"});e(b,"tooltipRefresh",function(d){var e=b.container,f=e.offsetLeft,e=e.offsetTop,k;g.innerHTML=d.text;k=b.tooltip.getPosition(g.offsetWidth,g.offsetHeight,{plotX:d.x,plotY:d.y});a(g,{visibility:"visible",left:k.x+"px",top:k.y+"px","border-color":d.borderColor});a(p,{visibility:"visible",left:f+d.x+"px",top:e+b.plotTop+"px",height:b.plotHeight+"px"});c.ttTimer!==void 0&&clearTimeout(c.ttTimer);c.ttTimer=setTimeout(function(){a(g,
+{visibility:"hidden"});a(p,{visibility:"hidden"})},3E3)})},destroy:function(){g(this.canvas);this.ttTimer!==void 0&&clearTimeout(this.ttTimer);g(this.ttLine);g(this.ttDiv);g(this.hiddenSvg);return d.prototype.destroy.apply(this)},color:function(a,b,c){a&&a.linearGradient&&(a=a.stops[a.stops.length-1][1]);return d.prototype.color.call(this,a,b,c)},draw:function(){window.canvg(this.canvas,this.hiddenSvg.innerHTML)}})})(Highcharts);


[35/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/lib/jquery.dataset.min.js
----------------------------------------------------------------------
diff --git a/portal/js/lib/jquery.dataset.min.js b/portal/js/lib/jquery.dataset.min.js
deleted file mode 100644
index 4dc2168..0000000
--- a/portal/js/lib/jquery.dataset.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(a){function h(a){var c,d=a&&a.length;if(d===undefined){for(c in a){this.removeAttr(b+c)}}else{for(c=0;c<d;c++){this.removeAttr(b+a[c])}}return this}function g(a){if(typeof a=="string"){return this.removeAttr(b+a)}return h(a)}function f(a){for(var c in a){this.attr(b+c,a[c])}return this}function e(){return this.foldAttr(function(a,b,d){var e=c.exec(this.name);if(e)d[e[1]]=this.value})}function d(a,c){if(c!==undefined){return this.attr(b+a,c)}switch(typeof a){case"string":return this.attr(b+a);case"object":return f.call(this,a);case"undefined":return e.call(this);default:throw"dataset: invalid argument "+a}}var b="data-",c=/^data\-(.*)$/;a.fn.dataset=d;a.fn.removeDataset=h})(jQuery);(function(a){function e(a,b){if(b===undefined)b=[];return d(this,a,b)}function d(a,b,c){var d=a&&a.length;if(c===undefined)c={};if(!a)return c;if(d!==undefined){for(var e=0,f=a[e];e<d&&b.call(f,e,f,c)!==false;f=a[++e]){};}else{for(var g in a){if(b.call(a[g],g,a[g],c)===false)break}}return c}funct
 ion c(a,b){return d(this.length>0&&this[0].attributes,a,b)}function b(b){if(this.length>0){a.each(this[0].attributes,b)}return this}a.fn.eachAttr=b;a.fn.foldAttr=c;a.fn.fold=e;a.fold=d})(jQuery)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/lib/jquery.dform-0.1.3.min.js
----------------------------------------------------------------------
diff --git a/portal/js/lib/jquery.dform-0.1.3.min.js b/portal/js/lib/jquery.dform-0.1.3.min.js
deleted file mode 100644
index 3d1c3ec..0000000
--- a/portal/js/lib/jquery.dform-0.1.3.min.js
+++ /dev/null
@@ -1,16 +0,0 @@
-(function(a){function h(b,c,e){if(typeof c=="string"){a.isArray(b[c])||(b[c]=[]);b[c].push(e)}else typeof c=="object"&&a.each(c,function(g,i){h(b,g,i)})}var f={},d={};a.fn.extend({runSubscription:function(b,c,e){var g=this;a.dform.hasSubscription(b)&&a.each(f[b],function(i,j){j.call(g,c,e)});return this},runAll:function(b){var c=b.type,e=this;this.runSubscription("[pre]",b,c);a.each(b,function(g,i){a(e).runSubscription(g,i,c)});this.runSubscription("[post]",b,c);return this},formElement:function(b){var c=
-a.dform.createElement(b);this.append(a(c));a(c).runAll(b);return this},buildForm:function(b,c,e){if(typeof b=="string"){var g=a(this);a.get(b,c,function(i,j,k){a(g).buildForm(i);a.isFunction(e)&&e(i,j,k)},a.dform.options.ajaxFormat)}else if(b.type)this.formElement(b);else{c=this.is("form")?this:this.append("<form>").children("form:last");b=a.extend({type:"form"},b);a(c).dformAttr(b);a(c).runAll(b)}return this},dformAttr:function(b,c){var e=a.keyset(f);a.isArray(c)&&a.merge(e,c);this.attr(a.withoutKeys(b,
-e));return this}});a.extend(a,{keyset:function(b){var c=[];a.each(b,function(e){c.push(e)});return c},withKeys:function(b,c){var e={};a.each(c,function(g,i){if(b[i])e[i]=b[i]});return e},withoutKeys:function(b,c){var e={};a.each(b,function(g,i){if(a.inArray(g,c)==-1)e[g]=i});return e},getValueAt:function(b,c){for(var e=a.isArray(c)?c:c.split("."),g=b,i=0;i<e.length;i++){var j=e[i];if(!g[j])return false;g=g[j]}return g}});a.dform={options:{prefix:"ui-dform-",ajaxFormat:"json",defaultType:function(b){return a("<"+
-b.type+">").dformAttr(b)}},removeType:function(b){delete d[b]},typeNames:function(){return a.keyset(d)},addType:function(b,c){h(d,b,c)},addTypeIf:function(b,c,e){b&&a.dform.addType(c,e)},subscriberNames:function(){return a.keyset(f)},subscribe:function(b,c){h(f,b,c)},subscribeIf:function(b,c,e){b&&a.dform.subscribe(c,e)},removeSubscription:function(b){delete f[b]},hasSubscription:function(b){return f[b]?true:false},createElement:function(b){var c=b.type;if(!c)throw"No element type given! Must always exist.";
-var e=null;if(d[c]){var g=a.withoutKeys(b,"type");a.each(d[c],function(i,j){e=j.call(e,g)})}else e=a.dform.options.defaultType(b);return a(e)}}})(jQuery);
-(function(a){a.fn.placeholder=function(h){var f=this;a(this).data("placeholder",h);a(this).val(h);a(this).focus(function(){a(this).val()==a(this).data("placeholder")&&a(this).val("")});a(this).blur(function(){a(this).val()==""&&a(this).val(a(this).data("placeholder"))});a(this).parents("form").submit(function(){a(f).val()==a(f).data("placeholder")&&a(f).val("")});return this}})(jQuery);
-(function(a){function h(f,d){return function(b){return a(f).dformAttr(b,d)}}a.dform.addType({text:h('<input type="text" />'),password:h('<input type="password" />'),submit:h('<input type="submit" />'),reset:h('<input type="reset" />'),hidden:h('<input type="hidden" />'),radio:h('<input type="radio" />'),checkbox:h('<input type="checkbox" />'),checkboxes:h("<div>",["name"]),radiobuttons:h("<div>",["name"]),container:h("<div>"),file:h('<input type="file" />')});a.dform.subscribe({"class":function(f){this.addClass(f)},
-html:function(f){this.html(f)},elements:function(f){var d=a(this);a.each(f,function(b,c){if(typeof b=="string")c.name=name;a(d).formElement(c)})},value:function(f){this.val(f)},options:function(f,d){var b=a(this);if(d=="select")a.each(f,function(c,e){var g;if(typeof e=="string")g=a("<option>").attr("value",c).html(e);if(typeof e=="object")g=h("<option>",{})(a.withoutKeys(e,["value"])).html(e.value);a(b).append(g)});else if(d=="checkboxes"||d=="radiobuttons"){b=this;a.each(f,function(c,e){var g=d==
-"radiobuttons"?{type:"radio"}:{type:"checkbox"};if(typeof e=="string")g.caption=e;else a.extend(g,e);g.value=c;a(b).formElement(g)})}},caption:function(f,d){var b={};if(typeof f=="string")b.html=f;else a.extend(b,f);if(d=="fieldset"){b.type="legend";var c=a.dform.createElement(b);this.prepend(c);a(c).runAll(b)}else{b.type="label";if(this.attr("id"))b["for"]=this.attr("id");c=a.dform.createElement(b);d=="checkbox"||d=="radio"?this.parent().append(a(c)):a(c).insertBefore(a(this));a(c).runAll(b)}},type:function(f,
-d){a.dform.options.prefix&&this.addClass(a.dform.options.prefix+d)},"[post]":function(f,d){if(d=="checkboxes"||d=="radiobuttons")this.children("[type="+(d=="checkboxes"?"checkbox":"radio")+"]").each(function(){a(this).attr("name",f.name)})}})})(jQuery);
-(function(a){function h(d,b){var c=a.keyset(a.ui[d].prototype.options);return a.withKeys(b,c)}function f(d){d=d.split(".");if(d.length>1){var b=d.shift();if(b=jQuery.global.localize(b))return a.getValueAt(b,d)}return false}a.dform.subscribeIf(a.isFunction(a.fn.placeholder),"placeholder",function(d,b){if(b=="text"||b=="textarea")a(this).placeholder(d)});a.dform.addTypeIf(a.isFunction(a.fn.progressbar),"progressbar",function(d){return a("<div>").dformAttr(d).progressbar(h("progressbar",d))});a.dform.addTypeIf(a.isFunction(a.fn.slider),
-"slider",function(d){return a("<div>").dformAttr(d).slider(h("slider",d))});a.dform.addTypeIf(a.isFunction(a.fn.accordion),"accordion",function(d){return a("<div>").dformAttr(d)});a.dform.addTypeIf(a.isFunction(a.fn.tabs),"tabs",function(d){return a("<div>").dformAttr(d)});a.dform.subscribeIf(a.isFunction(a.fn.accordion),"entries",function(d,b){var c=this;b=="accordion"&&a.each(d,function(e,g){a.extend(g,{type:"container"});a(c).formElement(g);a(c).children("div:last").prev().wrapInner(a("<a>").attr("href",
-"#"))})});a.dform.subscribeIf(a.isFunction(a.fn.tabs),"entries",function(d,b){var c=this;if(b=="tabs"){this.append("<ul>");var e=a(c).children("ul:first");a.each(d,function(g,i){var j=i.id?i.id:g;a.extend(i,{type:"container",id:j});a(c).formElement(i);var k=a(c).children("div:last").prev();a(k).wrapInner(a("<a>").attr("href","#"+j));a(e).append(a("<li>").wrapInner(k))})}});a.dform.subscribeIf(a.isFunction(a.fn.dialog),"dialog",function(d,b){if(b=="form"||b=="fieldset")this.dialog(d)});a.dform.subscribeIf(a.isFunction(a.fn.resizable),
-"resizable",function(d){this.resizable(d)});a.dform.subscribeIf(a.isFunction(a.fn.datepicker),"datepicker",function(d,b){b=="text"&&this.datepicker(d)});a.dform.subscribeIf(a.isFunction(a.fn.autocomplete),"autocomplete",function(d,b){b=="text"&&this.autocomplete(d)});a.dform.subscribe("[post]",function(d,b){if(this.parents("form").hasClass("ui-widget")){if((b=="button"||b=="submit")&&a.isFunction(a.fn.button))this.button();a.inArray(b,["text","textarea","password","fieldset"])!=-1&&this.addClass("ui-widget-content ui-corner-all")}if(b==
-"accordion"){var c=h(b,d);a.extend(c,{header:"label"});this.accordion(c)}else if(b=="tabs"){c=h(b,d);this.tabs(c)}});a.dform.subscribeIf(a.isFunction(a.fn.validate),{"[pre]":function(d,b){if(b=="form"){var c={};if(this.hasClass("ui-widget"))c={highlight:function(e){a(e).addClass("ui-state-highlight")},unhighlight:function(e){a(e).removeClass("ui-state-highlight")}};this.validate(c)}},validate:function(d){this.rules("add",d)}});a.dform.subscribeIf(a.isFunction(a.fn.ajaxForm),"ajax",function(d,b){b==
-"form"&&this.ajaxForm(d)});a.dform.subscribeIf(a.global&&a.isFunction(a.global.localize),"html",function(d){(d=f(d))&&a(this).html(d)});a.dform.subscribeIf(a.global,"options",function(d,b){if(b=="select"&&typeof d=="string"){a(this).html("");var c=f(d);c&&a(this).runSubscription("options",c,b)}});a.dform.subscribeIf(a.isFunction(a.fn.wysiwyg),"wysiwyg",function(){})})(jQuery);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/lib/jquery.jsonp-2.3.1.min.js
----------------------------------------------------------------------
diff --git a/portal/js/lib/jquery.jsonp-2.3.1.min.js b/portal/js/lib/jquery.jsonp-2.3.1.min.js
deleted file mode 100644
index 25a6997..0000000
--- a/portal/js/lib/jquery.jsonp-2.3.1.min.js
+++ /dev/null
@@ -1,3 +0,0 @@
-// jquery.jsonp 2.3.1 (c)2012 Julian Aubourg | MIT License
-// https://github.com/jaubourg/jquery-jsonp
-(function(a){function b(){}function c(a){A=[a]}function d(a,b,c,d){try{d=a&&a.apply(b.context||b,c)}catch(e){d=!1}return d}function e(a){return/\?/.test(a)?"&":"?"}function D(l){function Y(a){Q++||(R(),K&&(y[M]={s:[a]}),G&&(a=G.apply(l,[a])),d(D,l,[a,t]),d(F,l,[l,t]))}function Z(a){Q++||(R(),K&&a!=u&&(y[M]=a),d(E,l,[l,a]),d(F,l,[l,a]))}l=a.extend({},B,l);var D=l.success,E=l.error,F=l.complete,G=l.dataFilter,H=l.callbackParameter,I=l.callback,J=l.cache,K=l.pageCache,L=l.charset,M=l.url,N=l.data,O=l.timeout,P,Q=0,R=b,S,T,U,V,W,X;return w&&w(function(a){a.done(D).fail(E),D=a.resolve,E=a.reject}).promise(l),l.abort=function(){!(Q++)&&R()},d(l.beforeSend,l,[l])===!1||Q?l:(M=M||h,N=N?typeof N=="string"?N:a.param(N,l.traditional):h,M+=N?e(M)+N:h,H&&(M+=e(M)+encodeURIComponent(H)+"=?"),!J&&!K&&(M+=e(M)+"_"+(new Date).getTime()+"="),M=M.replace(/=\?(&|$)/,"="+I+"$1"),K&&(P=y[M])?P.s?Y(P.s[0]):Z(P):(v[I]=c,V=a(s)[0],V.id=k+z++,L&&(V[g]=L),C&&C.version()<11.6?(W=a(s)[0]).text="document.getElem
 entById('"+V.id+"')."+n+"()":V[f]=f,p in V&&(V.htmlFor=V.id,V.event=m),V[o]=V[n]=V[p]=function(a){if(!V[q]||!/i/.test(V[q])){try{V[m]&&V[m]()}catch(b){}a=A,A=0,a?Y(a[0]):Z(i)}},V.src=M,R=function(a){X&&clearTimeout(X),V[p]=V[o]=V[n]=null,x[r](V),W&&x[r](W)},x[j](V,U=x.firstChild),W&&x[j](W,U),X=O>0&&setTimeout(function(){Z(u)},O)),l)}var f="async",g="charset",h="",i="error",j="insertBefore",k="_jqjsp",l="on",m=l+"click",n=l+i,o=l+"load",p=l+"readystatechange",q="readyState",r="removeChild",s="<script>",t="success",u="timeout",v=window,w=a.Deferred,x=a("head")[0]||document.documentElement,y={},z=0,A,B={callback:k,url:location.href},C=v.opera;D.setup=function(b){a.extend(B,b)},a.jsonp=D})(jQuery)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/lib/jquery.tmpl.min.js
----------------------------------------------------------------------
diff --git a/portal/js/lib/jquery.tmpl.min.js b/portal/js/lib/jquery.tmpl.min.js
deleted file mode 100644
index 5d61533..0000000
--- a/portal/js/lib/jquery.tmpl.min.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * jQuery Templates Plugin 1.0.0pre
- * http://github.com/jquery/jquery-tmpl
- * Requires jQuery 1.4.2
- *
- * Copyright Software Freedom Conservancy, Inc.
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- */
-(function(a){var r=a.fn.domManip,d="_tmplitem",q=/^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,b={},f={},e,p={key:0,data:{}},i=0,c=0,l=[];function g(g,d,h,e){var c={data:e||(e===0||e===false)?e:d?d.data:{},_wrap:d?d._wrap:null,tmpl:null,parent:d||null,nodes:[],calls:u,nest:w,wrap:x,html:v,update:t};g&&a.extend(c,g,{nodes:[],parent:d});if(h){c.tmpl=h;c._ctnt=c._ctnt||c.tmpl(a,c);c.key=++i;(l.length?f:b)[i]=c}return c}a.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(f,d){a.fn[f]=function(n){var g=[],i=a(n),k,h,m,l,j=this.length===1&&this[0].parentNode;e=b||{};if(j&&j.nodeType===11&&j.childNodes.length===1&&i.length===1){i[d](this[0]);g=this}else{for(h=0,m=i.length;h<m;h++){c=h;k=(h>0?this.clone(true):this).get();a(i[h])[d](k);g=g.concat(k)}c=0;g=this.pushStack(g,f,i.selector)}l=e;e=null;a.tmpl.complete(l);return g}});a.fn.extend({tmpl:function(d,c,b){return a.tmpl(this[0],d,c,b)},tmplItem:function(){return a.tmplItem(this[0
 ])},template:function(b){return a.template(b,this[0])},domManip:function(d,m,k){if(d[0]&&a.isArray(d[0])){var g=a.makeArray(arguments),h=d[0],j=h.length,i=0,f;while(i<j&&!(f=a.data(h[i++],"tmplItem")));if(f&&c)g[2]=function(b){a.tmpl.afterManip(this,b,k)};r.apply(this,g)}else r.apply(this,arguments);c=0;!e&&a.tmpl.complete(b);return this}});a.extend({tmpl:function(d,h,e,c){var i,k=!c;if(k){c=p;d=a.template[d]||a.template(null,d);f={}}else if(!d){d=c.tmpl;b[c.key]=c;c.nodes=[];c.wrapped&&n(c,c.wrapped);return a(j(c,null,c.tmpl(a,c)))}if(!d)return[];if(typeof h==="function")h=h.call(c||{});e&&e.wrapped&&n(e,e.wrapped);i=a.isArray(h)?a.map(h,function(a){return a?g(e,c,d,a):null}):[g(e,c,d,h)];return k?a(j(c,null,i)):i},tmplItem:function(b){var c;if(b instanceof a)b=b[0];while(b&&b.nodeType===1&&!(c=a.data(b,"tmplItem"))&&(b=b.parentNode));return c||p},template:function(c,b){if(b){if(typeof b==="string")b=o(b);else if(b instanceof a)b=b[0]||{};if(b.nodeType)b=a.data(b,"tmpl")||a.data(b,
 "tmpl",o(b.innerHTML));return typeof c==="string"?(a.template[c]=b):b}return c?typeof c!=="string"?a.template(null,c):a.template[c]||a.template(null,q.test(c)?c:a(c)):null},encode:function(a){return(""+a).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;")}});a.extend(a.tmpl,{tag:{tmpl:{_default:{$2:"null"},open:"if($notnull_1){__=__.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(__,$1,$2);__=[];",close:"call=$item.calls();__=call._.concat($item.wrap(call,__));"},each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{open:"if($notnull_1){__.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){__.push($.encode($1a));}"},"!":{open:""}},complete:function(){b={}},afterManip:function(f,b,d){var e=b.nodeType===11?a.makeArray(b.child
 Nodes):b.nodeType===1?[b]:[];d.call(f,b);m(e);c++}});function j(e,g,f){var b,c=f?a.map(f,function(a){return typeof a==="string"?e.key?a.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+d+'="'+e.key+'" $2'):a:j(a,e,a._ctnt)}):e;if(g)return c;c=c.join("");c.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,function(f,c,e,d){b=a(e).get();m(b);if(c)b=k(c).concat(b);if(d)b=b.concat(k(d))});return b?b:k(c)}function k(c){var b=document.createElement("div");b.innerHTML=c;return a.makeArray(b.childNodes)}function o(b){return new Function("jQuery","$item","var $=jQuery,call,__=[],$data=$item.data;with($data){__.push('"+a.trim(b).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,function(m,l,k,g,b,c,d){var j=a.tmpl.tag[k],i,e,f;if(!j)throw"Unknown template tag: "+k;i=j._default||[];if(c&&!/\w$/.test(b)){b+=c;c=""}if(b){b=h(b);d=d
 ?","+h(d)+")":c?")":"";e=c?b.indexOf(".")>-1?b+h(c):"("+b+").call($item"+d:b;f=c?e:"(typeof("+b+")==='function'?("+b+").call($item):("+b+"))"}else f=e=i.$1||"null";g=h(g);return"');"+j[l?"close":"open"].split("$notnull_1").join(b?"typeof("+b+")!=='undefined' && ("+b+")!=null":"true").split("$1a").join(f).split("$1").join(e).split("$2").join(g||i.$2||"")+"__.push('"})+"');}return __;")}function n(c,b){c._wrap=j(c,true,a.isArray(b)?b:[q.test(b)?b:a(b).html()]).join("")}function h(a){return a?a.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function s(b){var a=document.createElement("div");a.appendChild(b.cloneNode(true));return a.innerHTML}function m(o){var n="_"+c,k,j,l={},e,p,h;for(e=0,p=o.length;e<p;e++){if((k=o[e]).nodeType!==1)continue;j=k.getElementsByTagName("*");for(h=j.length-1;h>=0;h--)m(j[h]);m(k)}function m(j){var p,h=j,k,e,m;if(m=j.getAttribute(d)){while(h.parentNode&&(h=h.parentNode).nodeType===1&&!(p=h.getAttribute(d)));if(p!==m){h=h.parentNode?h.nodeType===11?0:h.getAt
 tribute(d)||0:0;if(!(e=b[m])){e=f[m];e=g(e,b[h]||f[h]);e.key=++i;b[i]=e}c&&o(m)}j.removeAttribute(d)}else if(c&&(e=a.data(j,"tmplItem"))){o(e.key);b[e.key]=e;h=a.data(j.parentNode,"tmplItem");h=h?h.key:0}if(e){k=e;while(k&&k.key!=h){k.nodes.push(j);k=k.parent}delete e._ctnt;delete e._wrap;a.data(j,"tmplItem",e)}function o(a){a=a+n;e=l[a]=l[a]||g(e,b[e.parent.key+n]||e.parent)}}}function u(a,d,c,b){if(!a)return l.pop();l.push({_:a,tmpl:d,item:this,data:c,options:b})}function w(d,c,b){return a.tmpl(a.template(d),c,b,this)}function x(b,d){var c=b.options||{};c.wrapped=d;return a.tmpl(a.template(b.tmpl),b.data,c,b.item)}function v(d,c){var b=this._wrap;return a.map(a(a.isArray(b)?b.join(""):b).filter(d||"*"),function(a){return c?a.innerText||a.textContent:a.outerHTML||s(a)})}function t(){var b=this.nodes;a.tmpl(null,null,null,this).insertBefore(b[0]);a(b).remove()}})(jQuery)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/lib/jquery.ui.statusbar.min.js
----------------------------------------------------------------------
diff --git a/portal/js/lib/jquery.ui.statusbar.min.js b/portal/js/lib/jquery.ui.statusbar.min.js
deleted file mode 100644
index e9b149b..0000000
--- a/portal/js/lib/jquery.ui.statusbar.min.js
+++ /dev/null
@@ -1 +0,0 @@
-$.widget("ui.statusbar",{options:{hideAfter:10,hidden:true},_create:function(){this.element.html("<ul></ul>");this.element.addClass("ui-statusbar");if(this.options.hidden){this.element.hide()}else{this.element.show()}this._init()},_init:function(){},add:function(a,b,c){var d="ui-state-default";var e="ui-icon-info";if(c=="alert"){d="ui-state-highlight";e="ui-icon-notice"}else if(c=="error"){d="ui-state-error";e="ui-icon-alert"}var f="<span class='ui-icon "+e+"' style='float:left;margin-right:0.3em;'></span> ";var g=$("<li class='"+d+"'>"+f+a+"</li>");this.element.find("ul").prepend(g);this._trigger("messageadd",{},a);this.element.show();var h=this;var i=(b||h.options.hideAfter)*1e3;setTimeout(function(){g.fadeOut("slow",function(){g.remove();h._trigger("messageremove",{},a)})},i)},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments);this.element.empty()}})
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/lib/jquery.ui.timepicker.min.js
----------------------------------------------------------------------
diff --git a/portal/js/lib/jquery.ui.timepicker.min.js b/portal/js/lib/jquery.ui.timepicker.min.js
deleted file mode 100644
index 64946b5..0000000
--- a/portal/js/lib/jquery.ui.timepicker.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function($,undefined){function extendRemove(a,b){$.extend(a,b);for(var c in b)if(b[c]==null||b[c]==undefined)a[c]=b[c];return a}function Timepicker(){this.debug=true;this._curInst=null;this._isInline=false;this._disabledInputs=[];this._timepickerShowing=false;this._inDialog=false;this._dialogClass="ui-timepicker-dialog";this._mainDivId="ui-timepicker-div";this._inlineClass="ui-timepicker-inline";this._currentClass="ui-timepicker-current";this._dayOverClass="ui-timepicker-days-cell-over";this.regional=[];this.regional[""]={hourText:"Hour",minuteText:"Minute",amPmText:["AM","PM"]};this._defaults={showOn:"focus",button:null,showAnim:"fadeIn",showOptions:{},appendText:"",onSelect:null,onClose:null,timeSeparator:":",showPeriod:false,showPeriodLabels:true,showLeadingZero:true,showMinutesLeadingZero:true,altField:"",defaultTime:"now",onHourShow:null,onMinuteShow:null,zIndex:null,hours:{starts:0,ends:23},minutes:{starts:0,ends:55,interval:5},rows:4};$.extend(this._defaults,this.regional[""
 ]);this.tpDiv=$('<div id="'+this._mainDivId+'" class="ui-timepicker ui-widget ui-helper-clearfix ui-corner-all " style="display: none"></div>')}$.extend($.ui,{timepicker:{version:"0.2.3"}});var PROP_NAME="timepicker";var tpuuid=(new Date).getTime();$.extend(Timepicker.prototype,{markerClassName:"hasTimepicker",log:function(){if(this.debug)console.log.apply("",arguments)},_widgetTimepicker:function(){return this.tpDiv},_getTimeTimepicker:function(a){return a?a.value:""},setDefaults:function(a){extendRemove(this._defaults,a||{});return this},_attachTimepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("time:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=nodeName=="div"||nodeName=="span";if(!target.id){this.uuid+=1;target.id="tp"+this.uuid}var inst=this
 ._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectTimepicker(target,inst)}else if(inline){this._inlineTimepicker(target,inst)}},_newInst:function(a,b){var c=a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:c,input:a,inline:b,tpDiv:!b?this.tpDiv:$('<div class="'+this._inlineClass+' ui-timepicker ui-widget  ui-helper-clearfix"></div>')}},_connectTimepicker:function(a,b){var c=$(a);b.append=$([]);b.trigger=$([]);if(c.hasClass(this.markerClassName)){return}this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keyup(this._doKeyUp).bind("setData.timepicker",function(a,c,d){b.settings[c]=d}).bind("getData.timepicker",function(a,c){return this._get(b,c)});$.data(a,PROP_NAME,b)},_doKeyDown:function(a){var b=$.timepicker._getInst(a.target);var c=true;b._keyEvent=true;if($.timepicker._timepickerShowing){switch(a.keyCode){case 9:$.timepicker._hideTimepicker();c=false;break;case 13:$.timepic
 ker._updateSelectedValue(b);$.timepicker._hideTimepicker();return false;break;case 27:$.timepicker._hideTimepicker();break;default:c=false}}else if(a.keyCode==36&&a.ctrlKey){$.timepicker._showTimepicker(this)}else{c=false}if(c){a.preventDefault();a.stopPropagation()}},_doKeyUp:function(a){var b=$.timepicker._getInst(a.target);$.timepicker._setTimeFromField(b);$.timepicker._updateTimepicker(b)},_attachments:function(a,b){var c=this._get(b,"appendText");var d=this._get(b,"isRTL");if(b.append){b.append.remove()}if(c){b.append=$('<span class="'+this._appendClass+'">'+c+"</span>");a[d?"before":"after"](b.append)}a.unbind("focus.timepicker",this._showTimepicker);if(b.trigger){b.trigger.remove()}var e=this._get(b,"showOn");if(e=="focus"||e=="both"){a.bind("focus.timepicker",this._showTimepicker)}if(e=="button"||e=="both"){var f=this._get(b,"button");$(f).bind("click.timepicker",function(){if($.timepicker._timepickerShowing&&$.timepicker._lastInput==a[0]){$.timepicker._hideTimepicker()}else
 {$.timepicker._showTimepicker(a[0])}return false})}},_inlineTimepicker:function(a,b){var c=$(a);if(c.hasClass(this.markerClassName))return;c.addClass(this.markerClassName).append(b.tpDiv).bind("setData.timepicker",function(a,c,d){b.settings[c]=d}).bind("getData.timepicker",function(a,c){return this._get(b,c)});$.data(a,PROP_NAME,b);this._setTimeFromField(b);this._updateTimepicker(b);b.tpDiv.show()},_showTimepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input"){a=$("input",a.parentNode)[0]}if($.timepicker._isDisabledTimepicker(a)||$.timepicker._lastInput==a){return}$.timepicker._hideTimepicker();var b=$.timepicker._getInst(a);if($.timepicker._curInst&&$.timepicker._curInst!=b){$.timepicker._curInst.tpDiv.stop(true,true)}var c=$.timepicker._get(b,"beforeShow");extendRemove(b.settings,c?c.apply(a,[a,b]):{});b.lastVal=null;$.timepicker._lastInput=a;$.timepicker._setTimeFromField(b);if($.timepicker._inDialog){a.value=""}if(!$.timepicker._pos){$.timepicker._pos=$.timepick
 er._findPos(a);$.timepicker._pos[1]+=a.offsetHeight}var d=false;$(a).parents().each(function(){d|=$(this).css("position")=="fixed";return!d});if(d&&$.browser.opera){$.timepicker._pos[0]-=document.documentElement.scrollLeft;$.timepicker._pos[1]-=document.documentElement.scrollTop}var e={left:$.timepicker._pos[0],top:$.timepicker._pos[1]};$.timepicker._pos=null;b.tpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.timepicker._updateTimepicker(b);b._hoursClicked=false;b._minutesClicked=false;e=$.timepicker._checkOffset(b,e,d);b.tpDiv.css({position:$.timepicker._inDialog&&$.blockUI?"static":d?"fixed":"absolute",display:"none",left:e.left+"px",top:e.top+"px"});if(!b.inline){var f=$.timepicker._get(b,"showAnim");var g=$.timepicker._get(b,"duration");var h=$.timepicker._get(b,"zIndex");var i=function(){$.timepicker._timepickerShowing=true;var a=$.timepicker._getBorders(b.tpDiv);b.tpDiv.find("iframe.ui-timepicker-cover").css({left:-a[0],top:-a[1],width:b.tpDiv.outerWidth(),heig
 ht:b.tpDiv.outerHeight()})};if(!h){h=$(a).zIndex()+1}b.tpDiv.zIndex(h);if($.effects&&$.effects[f]){b.tpDiv.show(f,$.timepicker._get(b,"showOptions"),g,i)}else{b.tpDiv[f||"show"](f?g:null,i)}if(!f||!g){i()}if(b.input.is(":visible")&&!b.input.is(":disabled")){b.input.focus()}$.timepicker._curInst=b}},_updateTimepicker:function(a){var b=this;var c=$.timepicker._getBorders(a.tpDiv);a.tpDiv.empty().append(this._generateHTML(a)).find("iframe.ui-timepicker-cover").css({left:-c[0],top:-c[1],width:a.tpDiv.outerWidth(),height:a.tpDiv.outerHeight()}).end().find(".ui-timepicker-minute-cell").bind("click",{fromDoubleClick:false},$.proxy($.timepicker.selectMinutes,this)).bind("dblclick",{fromDoubleClick:true},$.proxy($.timepicker.selectMinutes,this)).end().find(".ui-timepicker-hour-cell").bind("click",{fromDoubleClick:false},$.proxy($.timepicker.selectHours,this)).bind("dblclick",{fromDoubleClick:true},$.proxy($.timepicker.selectHours,this)).end().find(".ui-timepicker td a").bind("mouseout",funct
 ion(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-timepicker-prev")!=-1)$(this).removeClass("ui-timepicker-prev-hover");if(this.className.indexOf("ui-timepicker-next")!=-1)$(this).removeClass("ui-timepicker-next-hover")}).bind("mouseover",function(){if(!b._isDisabledTimepicker(a.inline?a.tpDiv.parent()[0]:a.input[0])){$(this).parents(".ui-timepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-timepicker-prev")!=-1)$(this).addClass("ui-timepicker-prev-hover");if(this.className.indexOf("ui-timepicker-next")!=-1)$(this).addClass("ui-timepicker-next-hover")}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end()},_generateHTML:function(a){var b,c,d,e="",f=this._get(a,"showPeriod")==true,g=this._get(a,"showPeriodLabels")==true,h=this._get(a,"showLeadingZero")==true,i=this._get(a,"amPmText"),j=this._get(a,"rows"),k=j/2,l=k+1,m=Array(),n=this._get(a,"hours"),o=null,p=0,q=this._get(
 a,"hourText");for(b=n.starts;b<=n.ends;b++){m.push(b)}o=Math.round(m.length/j+.49);e='<table class="ui-timepicker-table ui-widget-content ui-corner-all"><tr>'+'<td class="ui-timepicker-hours">'+'<div class="ui-timepicker-title ui-widget-header ui-helper-clearfix ui-corner-all">'+q+"</div>"+'<table class="ui-timepicker">';for(d=1;d<=j;d++){e+="<tr>";if(d==1&&g){e+='<th rowspan="'+k.toString()+'" class="periods">'+i[0]+"</th>"}if(d==l&&g){e+='<th rowspan="'+k.toString()+'" class="periods">'+i[1]+"</th>"}while(p<o*d){e+=this._generateHTMLHourCell(a,m[p],f,h);p++}e+="</tr>"}e+="</tr></table>"+"</td>"+'<td class="ui-timepicker-minutes">';e+=this._generateHTMLMinutes(a);e+="</td></tr></table>";e+=$.browser.msie&&parseInt($.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-timepicker-cover" frameborder="0"></iframe>':"";return e},_updateMinuteDisplay:function(a){var b=this._generateHTMLMinutes(a);a.tpDiv.find("td.ui-timepicker-minutes").html(b).find(".ui-timepicke
 r-minute-cell").bind("click",{fromDoubleClick:false},$.proxy($.timepicker.selectMinutes,this)).bind("dblclick",{fromDoubleClick:true},$.proxy($.timepicker.selectMinutes,this))},_generateHTMLMinutes:function(a){var b,c,d="",e=this._get(a,"rows"),f=Array(),g=this._get(a,"minutes"),h=null,i=0,j=this._get(a,"showMinutesLeadingZero")==true,k=this._get(a,"onMinuteShow"),l=this._get(a,"minuteText");if(!g.starts){g.starts=0}if(!g.ends){g.ends=59}for(b=g.starts;b<=g.ends;b+=g.interval){f.push(b)}h=Math.round(f.length/e+.49);if(k&&k.apply(a.input?a.input[0]:null,[a.hours,a.minutes])==false){for(i=0;i<f.length;i+=1){b=f[i];if(k.apply(a.input?a.input[0]:null,[a.hours,b])){a.minutes=b;break}}}d+='<div class="ui-timepicker-title ui-widget-header ui-helper-clearfix ui-corner-all">'+l+"</div>"+'<table class="ui-timepicker">';i=0;for(c=1;c<=e;c++){d+="<tr>";while(i<c*h){var b=f[i];var m="";if(b!==undefined){m=b<10&&j?"0"+b.toString():b.toString()}d+=this._generateHTMLMinuteCell(a,b,m);i++}d+="</tr>"
 }d+="</table>";return d},_generateHTMLHourCell:function(a,b,c,d){var e=b;if(b>12&&c){e=b-12}if(e==0&&c){e=12}if(e<10&&d){e="0"+e}var f="";var g=true;var h=this._get(a,"onHourShow");if(b==undefined){f='<td class="ui-state-default ui-state-disabled"> </td>';return f}if(h){g=h.apply(a.input?a.input[0]:null,[b])}if(g){f='<td class="ui-timepicker-hour-cell" data-timepicker-instance-id="#'+a.id.replace("\\\\","\\")+'" data-hour="'+b.toString()+'">'+'<a class="ui-state-default '+(b==a.hours?"ui-state-active":"")+'">'+e.toString()+"</a></td>"}else{f="<td>"+'<span class="ui-state-default ui-state-disabled '+(b==a.hours?" ui-state-active ":" ")+'">'+e.toString()+"</span>"+"</td>"}return f},_generateHTMLMinuteCell:function(a,b,c){var d="";var e=true;var f=this._get(a,"onMinuteShow");if(f){e=f.apply(a.input?a.input[0]:null,[a.hours,b])}if(b==undefined){d='<td class=ui-state-default ui-state-disabled"> </td>';return d}if(e){d='<td class="ui-timepicker-minute-cell" data-timepicker-instance-id="
 #'+a.id.replace("\\\\","\\")+'" data-minute="'+b.toString()+'" >'+'<a class="ui-state-default '+(b==a.minutes?"ui-state-active":"")+'" >'+c+"</a></td>"}else{d="<td>"+'<span class="ui-state-default ui-state-disabled" >'+c+"</span>"+"</td>"}return d},_isDisabledTimepicker:function(a){if(!a){return false}for(var b=0;b<this._disabledInputs.length;b++){if(this._disabledInputs[b]==a){return true}}return false},_checkOffset:function(a,b,c){var d=a.tpDiv.outerWidth();var e=a.tpDiv.outerHeight();var f=a.input?a.input.outerWidth():0;var g=a.input?a.input.outerHeight():0;var h=document.documentElement.clientWidth+$(document).scrollLeft();var i=document.documentElement.clientHeight+$(document).scrollTop();b.left-=this._get(a,"isRTL")?d-f:0;b.left-=c&&b.left==a.input.offset().left?$(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+g?$(document).scrollTop():0;b.left-=Math.min(b.left,b.left+d>h&&h>d?Math.abs(b.left+d-h):0);b.top-=Math.min(b.top,b.top+e>i&&i>e?Math.abs(e+g):0);return 
 b},_findPos:function(a){var b=this._getInst(a);var c=this._get(b,"isRTL");while(a&&(a.type=="hidden"||a.nodeType!=1)){a=a[c?"previousSibling":"nextSibling"]}var d=$(a).offset();return[d.left,d.top]},_getBorders:function(a){var b=function(a){return{thin:1,medium:2,thick:3}[a]||a};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkExternalClick:function(a){if(!$.timepicker._curInst){return}var b=$(a.target);if(b[0].id!=$.timepicker._mainDivId&&b.parents("#"+$.timepicker._mainDivId).length==0&&!b.hasClass($.timepicker.markerClassName)&&!b.hasClass($.timepicker._triggerClass)&&$.timepicker._timepickerShowing&&!($.timepicker._inDialog&&$.blockUI))$.timepicker._hideTimepicker()},_hideTimepicker:function(a){var b=this._curInst;if(!b||a&&b!=$.data(a,PROP_NAME)){return}if(this._timepickerShowing){var c=this._get(b,"showAnim");var d=this._get(b,"duration");var e=function(){$.timepicker._tidyDialog(b);this._curInst=null};if($.effects&&$.effects[c]
 ){b.tpDiv.hide(c,$.timepicker._get(b,"showOptions"),d,e)}else{b.tpDiv[c=="slideDown"?"slideUp":c=="fadeIn"?"fadeOut":"hide"](c?d:null,e)}if(!c){e()}var f=this._get(b,"onClose");if(f){f.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b])}this._timepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.tpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.tpDiv.removeClass(this._dialogClass).unbind(".ui-timepicker")},_getInst:function(a){try{return $.data(a,PROP_NAME)}catch(b){throw"Missing instance data for this timepicker"}},_get:function(a,b){return a.settings[b]!==undefined?a.settings[b]:this._defaults[b]},_setTimeFromField:function(a){if(a.input.val()==a.lastVal){return}var b=this._get(a,"defaultTime");var c=b=="now"?this._getCurrentTimeRounded(a):b;if(a.inline==false&&a.input.val()!=""){c=a.input.val()}var d=a.lastVal=c;if(c==""){a.hours=-1;a.minut
 es=-1}else{var e=this.parseTime(a,d);a.hours=e.hours;a.minutes=e.minutes}$.timepicker._updateTimepicker(a)},_setTimeTimepicker:function(a,b){var c=this._getInst(a);if(c){this._setTime(c,b);this._updateTimepicker(c);this._updateAlternate(c,b)}},_setTime:function(a,b,c){var d=a.hours;var e=a.minutes;var b=this.parseTime(a,b);a.hours=b.hours;a.minutes=b.minutes;if((d!=a.hours||e!=a.minuts)&&!c){a.input.trigger("change")}this._updateTimepicker(a);this._updateSelectedValue(a)},_getCurrentTimeRounded:function(a){var b=new Date;var c=this._get(a,"timeSeparator");var d=b.getMinutes();d=Math.round(d/5)*5;return b.getHours().toString()+c+d.toString()},parseTime:function(a,b){var c=new Object;c.hours=-1;c.minutes=-1;var d=this._get(a,"timeSeparator");var e=this._get(a,"amPmText");var f=b.indexOf(d);if(f==-1){return c}c.hours=parseInt(b.substr(0,f),10);c.minutes=parseInt(b.substr(f+1),10);var g=this._get(a,"showPeriod")==true;var h=b.toUpperCase();if(c.hours<12&&g&&h.indexOf(e[1].toUpperCase())
 !=-1){c.hours+=12}if(c.hours==12&&g&&h.indexOf(e[0].toUpperCase())!=-1){c.hours=0}return c},selectHours:function(a){var b=$(a.currentTarget);var c=b.attr("data-timepicker-instance-id");var d=b.attr("data-hour");var e=a.data.fromDoubleClick;var f=$(c);var g=this._getInst(f[0]);b.parents(".ui-timepicker-hours:first").find("a").removeClass("ui-state-active");b.children("a").addClass("ui-state-active");g.hours=d;this._updateSelectedValue(g);g._hoursClicked=true;if(g._minutesClicked||e){$.timepicker._hideTimepicker();return false}var h=this._get(g,"onMinuteShow");if(h){this._updateMinuteDisplay(g)}return false},selectMinutes:function(a){var b=$(a.currentTarget);var c=b.attr("data-timepicker-instance-id");var d=b.attr("data-minute");var e=a.data.fromDoubleClick;var f=$(c);var g=this._getInst(f[0]);b.parents(".ui-timepicker-minutes:first").find("a").removeClass("ui-state-active");b.children("a").addClass("ui-state-active");g.minutes=d;this._updateSelectedValue(g);g._minutesClicked=true;if(
 g._hoursClicked||e){$.timepicker._hideTimepicker();return false}return false},_updateSelectedValue:function(a){if(a.hours<0||a.hours>23){a.hours=12}if(a.minutes<0||a.minutes>59){a.minutes=0}var b="";var c=this._get(a,"showPeriod")==true;var d=this._get(a,"showLeadingZero")==true;var e=this._get(a,"amPmText");var f=a.hours?a.hours:0;var g=a.minutes?a.minutes:0;var h=f;if(!h){h=0}if(c){if(a.hours==0){h=12}if(a.hours<12){b=e[0]}else{b=e[1];if(h>12){h-=12}}}var i=h.toString();if(d&&h<10){i="0"+i}var j=g.toString();if(g<10){j="0"+j}var k=i+this._get(a,"timeSeparator")+j;if(b.length>0){k+=" "+b}if(a.input){a.input.val(k);a.input.trigger("change")}var l=this._get(a,"onSelect");if(l){l.apply(a.input?a.input[0]:null,[k,a])}this._updateAlternate(a,k);return k},_updateAlternate:function(a,b){var c=this._get(a,"altField");if(c){$(c).each(function(a,c){$(c).val(b)})}}});$.fn.timepicker=function(a){if(!$.timepicker.initialized){$(document).mousedown($.timepicker._checkExternalClick).find("body").
 append($.timepicker.tpDiv);$.timepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getTime"||a=="widget"))return $.timepicker["_"+a+"Timepicker"].apply($.timepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return $.timepicker["_"+a+"Timepicker"].apply($.timepicker,[this[0]].concat(b));return this.each(function(){typeof a=="string"?$.timepicker["_"+a+"Timepicker"].apply($.timepicker,[this].concat(b)):$.timepicker._attachTimepicker(this,a)})};$.timepicker=new Timepicker;$.timepicker.initialized=false;$.timepicker.uuid=(new Date).getTime();$.timepicker.version="0.2.3";window["TP_jQuery_"+tpuuid]=$})(jQuery)


[38/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/lib/date.min.js
----------------------------------------------------------------------
diff --git a/portal/js/lib/date.min.js b/portal/js/lib/date.min.js
deleted file mode 100644
index 261327a..0000000
--- a/portal/js/lib/date.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-Date.CultureInfo={name:"en-US",englishName:"English (United States)",nativeName:"English (United States)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"M/d/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"
 },regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|aft(er)?|from|hence)/i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^yes(terday)?/i,today:/^t(od(ay)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min(ute)?s?/i,hour:/^h(our)?s?/i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^d(ay)?s?/i,year:/^y(ear)?s?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|utc)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a(?!u|p)|p
 )/i},timezones:[{name:"UTC",offset:"-000"},{name:"GMT",offset:"-000"},{name:"EST",offset:"-0500"},{name:"EDT",offset:"-0400"},{name:"CST",offset:"-0600"},{name:"CDT",offset:"-0500"},{name:"MST",offset:"-0700"},{name:"MDT",offset:"-0600"},{name:"PST",offset:"-0800"},{name:"PDT",offset:"-0700"}]};(function(){var a=Date,b=a.prototype,c=a.CultureInfo,d=function(a,b){if(!b){b=2}return("000"+a).slice(b*-1)};b.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};b.setTimeToNow=function(){var a=new Date;this.setHours(a.getHours());this.setMinutes(a.getMinutes());this.setSeconds(a.getSeconds());this.setMilliseconds(a.getMilliseconds());return this};a.today=function(){return(new Date).clearTime()};a.compare=function(a,b){if(isNaN(a)||isNaN(b)){throw new Error(a+" - "+b)}else if(a instanceof Date&&b instanceof Date){return a<b?-1:a>b?1:0}else{throw new TypeError(a+" - "+b)}};a.equals=function(a,b){return a.compareTo(b)===0};a.getDayNu
 mberFromName=function(a){var b=c.dayNames,d=c.abbreviatedDayNames,e=c.shortestDayNames,f=a.toLowerCase();for(var g=0;g<b.length;g++){if(b[g].toLowerCase()==f||d[g].toLowerCase()==f||e[g].toLowerCase()==f){return g}}return-1};a.getMonthNumberFromName=function(a){var b=c.monthNames,d=c.abbreviatedMonthNames,e=a.toLowerCase();for(var f=0;f<b.length;f++){if(b[f].toLowerCase()==e||d[f].toLowerCase()==e){return f}}return-1};a.isLeapYear=function(a){return a%4===0&&a%100!==0||a%400===0};a.getDaysInMonth=function(b,c){return[31,a.isLeapYear(b)?29:28,31,30,31,30,31,31,30,31,30,31][c]};a.getTimezoneAbbreviation=function(a){var b=c.timezones,d;for(var e=0;e<b.length;e++){if(b[e].offset===a){return b[e].name}}return null};a.getTimezoneOffset=function(a){var b=c.timezones,d;for(var e=0;e<b.length;e++){if(b[e].name===a.toUpperCase()){return b[e].offset}}return null};b.clone=function(){return new Date(this.getTime())};b.compareTo=function(a){return Date.compare(this,a)};b.equals=function(a){return
  Date.equals(this,a||new Date)};b.between=function(a,b){return this.getTime()>=a.getTime()&&this.getTime()<=b.getTime()};b.isAfter=function(a){return this.compareTo(a||new Date)===1};b.isBefore=function(a){return this.compareTo(a||new Date)===-1};b.isToday=function(){return this.isSameDay(new Date)};b.isSameDay=function(a){return this.clone().clearTime().equals(a.clone().clearTime())};b.addMilliseconds=function(a){this.setMilliseconds(this.getMilliseconds()+a);return this};b.addSeconds=function(a){return this.addMilliseconds(a*1e3)};b.addMinutes=function(a){return this.addMilliseconds(a*6e4)};b.addHours=function(a){return this.addMilliseconds(a*36e5)};b.addDays=function(a){this.setDate(this.getDate()+a);return this};b.addWeeks=function(a){return this.addDays(a*7)};b.addMonths=function(b){var c=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+b);this.setDate(Math.min(c,a.getDaysInMonth(this.getFullYear(),this.getMonth())));return this};b.addYears=function(a){return this.a
 ddMonths(a*12)};b.add=function(a){if(typeof a=="number"){this._orient=a;return this}var b=a;if(b.milliseconds){this.addMilliseconds(b.milliseconds)}if(b.seconds){this.addSeconds(b.seconds)}if(b.minutes){this.addMinutes(b.minutes)}if(b.hours){this.addHours(b.hours)}if(b.weeks){this.addWeeks(b.weeks)}if(b.months){this.addMonths(b.months)}if(b.years){this.addYears(b.years)}if(b.days){this.addDays(b.days)}return this};var e,f,g;b.getWeek=function(){var a,b,c,d,h,i,j,k,l,m;e=!e?this.getFullYear():e;f=!f?this.getMonth()+1:f;g=!g?this.getDate():g;if(f<=2){a=e-1;b=(a/4|0)-(a/100|0)+(a/400|0);c=((a-1)/4|0)-((a-1)/100|0)+((a-1)/400|0);l=b-c;h=0;i=g-1+31*(f-1)}else{a=e;b=(a/4|0)-(a/100|0)+(a/400|0);c=((a-1)/4|0)-((a-1)/100|0)+((a-1)/400|0);l=b-c;h=l+1;i=g+(153*(f-3)+2)/5+58+l}j=(a+b)%7;d=(i+j-h)%7;k=i+3-d|0;if(k<0){m=53-((j-l)/5|0)}else if(k>364+l){m=1}else{m=(k/7|0)+1}e=f=g=null;return m};b.getISOWeek=function(){e=this.getUTCFullYear();f=this.getUTCMonth()+1;g=this.getUTCDate();return d(this.
 getWeek())};b.setWeek=function(a){return this.moveToDayOfWeek(1).addWeeks(a-this.getWeek())};a._validate=function(a,b,c,d){if(typeof a=="undefined"){return false}else if(typeof a!="number"){throw new TypeError(a+" is not a Number.")}else if(a<b||a>c){throw new RangeError(a+" is not a valid value for "+d+".")}return true};a.validateMillisecond=function(b){return a._validate(b,0,999,"millisecond")};a.validateSecond=function(b){return a._validate(b,0,59,"second")};a.validateMinute=function(b){return a._validate(b,0,59,"minute")};a.validateHour=function(b){return a._validate(b,0,23,"hour")};a.validateDay=function(b,c,d){return a._validate(b,1,a.getDaysInMonth(c,d),"day")};a.validateMonth=function(b){return a._validate(b,0,11,"month")};a.validateYear=function(b){return a._validate(b,0,9999,"year")};b.set=function(b){if(a.validateMillisecond(b.millisecond)){this.addMilliseconds(b.millisecond-this.getMilliseconds())}if(a.validateSecond(b.second)){this.addSeconds(b.second-this.getSeconds())
 }if(a.validateMinute(b.minute)){this.addMinutes(b.minute-this.getMinutes())}if(a.validateHour(b.hour)){this.addHours(b.hour-this.getHours())}if(a.validateMonth(b.month)){this.addMonths(b.month-this.getMonth())}if(a.validateYear(b.year)){this.addYears(b.year-this.getFullYear())}if(a.validateDay(b.day,this.getFullYear(),this.getMonth())){this.addDays(b.day-this.getDate())}if(b.timezone){this.setTimezone(b.timezone)}if(b.timezoneOffset){this.setTimezoneOffset(b.timezoneOffset)}if(b.week&&a._validate(b.week,0,53,"week")){this.setWeek(b.week)}return this};b.moveToFirstDayOfMonth=function(){return this.set({day:1})};b.moveToLastDayOfMonth=function(){return this.set({day:a.getDaysInMonth(this.getFullYear(),this.getMonth())})};b.moveToNthOccurrence=function(a,b){var c=0;if(b>0){c=b-1}else if(b===-1){this.moveToLastDayOfMonth();if(this.getDay()!==a){this.moveToDayOfWeek(a,-1)}return this}return this.moveToFirstDayOfMonth().addDays(-1).moveToDayOfWeek(a,+1).addWeeks(c)};b.moveToDayOfWeek=func
 tion(a,b){var c=(a-this.getDay()+7*(b||+1))%7;return this.addDays(c===0?c+=7*(b||+1):c)};b.moveToMonth=function(a,b){var c=(a-this.getMonth()+12*(b||+1))%12;return this.addMonths(c===0?c+=12*(b||+1):c)};b.getOrdinalNumber=function(){return Math.ceil((this.clone().clearTime()-new Date(this.getFullYear(),0,1))/864e5)+1};b.getTimezone=function(){return a.getTimezoneAbbreviation(this.getUTCOffset())};b.setTimezoneOffset=function(a){var b=this.getTimezoneOffset(),c=Number(a)*-6/10;return this.addMinutes(c-b)};b.setTimezone=function(b){return this.setTimezoneOffset(a.getTimezoneOffset(b))};b.hasDaylightSavingTime=function(){return Date.today().set({month:0,day:1}).getTimezoneOffset()!==Date.today().set({month:6,day:1}).getTimezoneOffset()};b.isDaylightSavingTime=function(){return this.hasDaylightSavingTime()&&(new Date).getTimezoneOffset()===Date.today().set({month:6,day:1}).getTimezoneOffset()};b.getUTCOffset=function(){var a=this.getTimezoneOffset()*-10/6,b;if(a<0){b=(a-1e4).toString();
 return b.charAt(0)+b.substr(2)}else{b=(a+1e4).toString();return"+"+b.substr(1)}};b.getElapsed=function(a){return(a||new Date)-this};if(!b.toISOString){b.toISOString=function(){function a(a){return a<10?"0"+a:a}return'"'+this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+'Z"'}}b._toString=b.toString;b.toString=function(a){var b=this;if(a&&a.length==1){var e=c.formatPatterns;b.t=b.toString;switch(a){case"d":return b.t(e.shortDate);case"D":return b.t(e.longDate);case"F":return b.t(e.fullDateTime);case"m":return b.t(e.monthDay);case"r":return b.t(e.rfc1123);case"s":return b.t(e.sortableDateTime);case"t":return b.t(e.shortTime);case"T":return b.t(e.longTime);case"u":return b.t(e.universalSortableDateTime);case"y":return b.t(e.yearMonth)}}var f=function(a){switch(a*1){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};return a?a.
 replace(/(\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S)/g,function(a){if(a.charAt(0)==="\\"){return a.replace("\\","")}b.h=b.getHours;switch(a){case"hh":return d(b.h()<13?b.h()===0?12:b.h():b.h()-12);case"h":return b.h()<13?b.h()===0?12:b.h():b.h()-12;case"HH":return d(b.h());case"H":return b.h();case"mm":return d(b.getMinutes());case"m":return b.getMinutes();case"ss":return d(b.getSeconds());case"s":return b.getSeconds();case"yyyy":return d(b.getFullYear(),4);case"yy":return d(b.getFullYear());case"dddd":return c.dayNames[b.getDay()];case"ddd":return c.abbreviatedDayNames[b.getDay()];case"dd":return d(b.getDate());case"d":return b.getDate();case"MMMM":return c.monthNames[b.getMonth()];case"MMM":return c.abbreviatedMonthNames[b.getMonth()];case"MM":return d(b.getMonth()+1);case"M":return b.getMonth()+1;case"t":return b.h()<12?c.amDesignator.substring(0,1):c.pmDesignator.substring(0,1);case"tt":return b.h()<12?c.amDesignator:c.pmDesignator;case"S":return f(b.getDate());default:
 return a}}):this._toString()}})();(function(){var a=Date,b=a.prototype,c=a.CultureInfo,d=Number.prototype;b._orient=+1;b._nth=null;b._is=false;b._same=false;b._isSecond=false;d._dateElement="day";b.next=function(){this._orient=+1;return this};a.next=function(){return a.today().next()};b.last=b.prev=b.previous=function(){this._orient=-1;return this};a.last=a.prev=a.previous=function(){return a.today().last()};b.is=function(){this._is=true;return this};b.same=function(){this._same=true;this._isSecond=false;return this};b.today=function(){return this.same().day()};b.weekday=function(){if(this._is){this._is=false;return!this.is().sat()&&!this.is().sun()}return false};b.at=function(b){return typeof b==="string"?a.parse(this.toString("d")+" "+b):this.set(b)};d.fromNow=d.after=function(a){var b={};b[this._dateElement]=this;return(!a?new Date:a.clone()).add(b)};d.ago=d.before=function(a){var b={};b[this._dateElement]=this*-1;return(!a?new Date:a.clone()).add(b)};var e="sunday monday tuesday
  wednesday thursday friday saturday".split(/\s/),f="january february march april may june july august september october november december".split(/\s/),g="Millisecond Second Minute Hour Day Week Month Year".split(/\s/),h="Milliseconds Seconds Minutes Hours Date Week Month FullYear".split(/\s/),i="final first second third fourth fifth".split(/\s/),j;b.toObject=function(){var a={};for(var b=0;b<g.length;b++){a[g[b].toLowerCase()]=this["get"+h[b]]()}return a};a.fromObject=function(a){a.week=null;return Date.today().set(a)};var k=function(b){return function(){if(this._is){this._is=false;return this.getDay()==b}if(this._nth!==null){if(this._isSecond){this.addSeconds(this._orient*-1)}this._isSecond=false;var c=this._nth;this._nth=null;var d=this.clone().moveToLastDayOfMonth();this.moveToNthOccurrence(b,c);if(this>d){throw new RangeError(a.getDayName(b)+" does not occur "+c+" times in the month of "+a.getMonthName(d.getMonth())+" "+d.getFullYear()+".")}return this}return this.moveToDayOfWee
 k(b,this._orient)}};var l=function(b){return function(){var d=a.today(),e=b-d.getDay();if(b===0&&c.firstDayOfWeek===1&&d.getDay()!==0){e=e+7}return d.addDays(e)}};for(var m=0;m<e.length;m++){a[e[m].toUpperCase()]=a[e[m].toUpperCase().substring(0,3)]=m;a[e[m]]=a[e[m].substring(0,3)]=l(m);b[e[m]]=b[e[m].substring(0,3)]=k(m)}var n=function(a){return function(){if(this._is){this._is=false;return this.getMonth()===a}return this.moveToMonth(a,this._orient)}};var o=function(b){return function(){return a.today().set({month:b,day:1})}};for(var p=0;p<f.length;p++){a[f[p].toUpperCase()]=a[f[p].toUpperCase().substring(0,3)]=p;a[f[p]]=a[f[p].substring(0,3)]=o(p);b[f[p]]=b[f[p].substring(0,3)]=n(p)}var q=function(a){return function(){if(this._isSecond){this._isSecond=false;return this}if(this._same){this._same=this._is=false;var b=this.toObject(),c=(arguments[0]||new Date).toObject(),d="",e=a.toLowerCase();for(var f=g.length-1;f>-1;f--){d=g[f].toLowerCase();if(b[d]!=c[d]){return false}if(e==d){br
 eak}}return true}if(a.substring(a.length-1)!="s"){a+="s"}return this["add"+a](this._orient)}};var r=function(a){return function(){this._dateElement=a;return this}};for(var s=0;s<g.length;s++){j=g[s].toLowerCase();b[j]=b[j+"s"]=q(g[s]);d[j]=d[j+"s"]=r(j)}b._ss=q("Second");var t=function(a){return function(b){if(this._same){return this._ss(arguments[0])}if(b||b===0){return this.moveToNthOccurrence(b,a)}this._nth=a;if(a===2&&(b===undefined||b===null)){this._isSecond=true;return this.addSeconds(this._orient)}return this}};for(var u=0;u<i.length;u++){b[i[u]]=u===0?t(-1):t(u)}})();(function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var a=Date.Parsing;var b=a.Operators={rtoken:function(b){return function(c){var d=c.match(b);if(d){return[d[0],c.substring(d[0].length)]}else{throw new a.Exception(c)}}},token:function(a){return function(a){return b.rtoken(new RegExp("^s*"+a+"s*"))(a)}},stoken:function(a){return b.rtoken(new RegExp("^"+a))
 },until:function(a){return function(b){var c=[],d=null;while(b.length){try{d=a.call(this,b)}catch(e){c.push(d[0]);b=d[1];continue}break}return[c,b]}},many:function(a){return function(b){var c=[],d=null;while(b.length){try{d=a.call(this,b)}catch(e){return[c,b]}c.push(d[0]);b=d[1]}return[c,b]}},optional:function(a){return function(b){var c=null;try{c=a.call(this,b)}catch(d){return[null,b]}return[c[0],c[1]]}},not:function(b){return function(c){try{b.call(this,c)}catch(d){return[null,c]}throw new a.Exception(c)}},ignore:function(a){return a?function(b){var c=null;c=a.call(this,b);return[null,c[1]]}:null},product:function(){var a=arguments[0],c=Array.prototype.slice.call(arguments,1),d=[];for(var e=0;e<a.length;e++){d.push(b.each(a[e],c))}return d},cache:function(b){var c={},d=null;return function(e){try{d=c[e]=c[e]||b.call(this,e)}catch(f){d=c[e]=f}if(d instanceof a.Exception){throw d}else{return d}}},any:function(){var b=arguments;return function(c){var d=null;for(var e=0;e<b.length;e+
 +){if(b[e]==null){continue}try{d=b[e].call(this,c)}catch(f){d=null}if(d){return d}}throw new a.Exception(c)}},each:function(){var b=arguments;return function(c){var d=[],e=null;for(var f=0;f<b.length;f++){if(b[f]==null){continue}try{e=b[f].call(this,c)}catch(g){throw new a.Exception(c)}d.push(e[0]);c=e[1]}return[d,c]}},all:function(){var a=arguments,b=b;return b.each(b.optional(a))},sequence:function(c,d,e){d=d||b.rtoken(/^\s*/);e=e||null;if(c.length==1){return c[0]}return function(b){var f=null,g=null;var h=[];for(var i=0;i<c.length;i++){try{f=c[i].call(this,b)}catch(j){break}h.push(f[0]);try{g=d.call(this,f[1])}catch(k){g=null;break}b=g[1]}if(!f){throw new a.Exception(b)}if(g){throw new a.Exception(g[1])}if(e){try{f=e.call(this,f[1])}catch(l){throw new a.Exception(f[1])}}return[h,f?f[1]:b]}},between:function(a,c,d){d=d||a;var e=b.each(b.ignore(a),c,b.ignore(d));return function(a){var b=e.call(this,a);return[[b[0][0],r[0][2]],b[1]]}},list:function(a,c,d){c=c||b.rtoken(/^\s*/);d=d||
 null;return a instanceof Array?b.each(b.product(a.slice(0,-1),b.ignore(c)),a.slice(-1),b.ignore(d)):b.each(b.many(b.each(a,b.ignore(c))),px,b.ignore(d))},set:function(c,d,e){d=d||b.rtoken(/^\s*/);e=e||null;return function(f){var g=null,h=null,i=null,j=null,k=[[],f],l=false;for(var m=0;m<c.length;m++){i=null;h=null;g=null;l=c.length==1;try{g=c[m].call(this,f)}catch(n){continue}j=[[g[0]],g[1]];if(g[1].length>0&&!l){try{i=d.call(this,g[1])}catch(o){l=true}}else{l=true}if(!l&&i[1].length===0){l=true}if(!l){var p=[];for(var q=0;q<c.length;q++){if(m!=q){p.push(c[q])}}h=b.set(p,d).call(this,i[1]);if(h[0].length>0){j[0]=j[0].concat(h[0]);j[1]=h[1]}}if(j[1].length<k[1].length){k=j}if(k[1].length===0){break}}if(k[0].length===0){return k}if(e){try{i=e.call(this,k[1])}catch(r){throw new a.Exception(k[1])}k[1]=i[1]}return k}},forward:function(a,b){return function(c){return a[b].call(this,c)}},replace:function(a,b){return function(c){var d=a.call(this,c);return[b,d[1]]}},process:function(a,b){ret
 urn function(c){var d=a.call(this,c);return[b.call(this,d[0]),d[1]]}},min:function(b,c){return function(d){var e=c.call(this,d);if(e[0].length<b){throw new a.Exception(d)}return e}}};var c=function(a){return function(){var b=null,c=[];if(arguments.length>1){b=Array.prototype.slice.call(arguments)}else if(arguments[0]instanceof Array){b=arguments[0]}if(b){for(var d=0,e=b.shift();d<e.length;d++){b.unshift(e[d]);c.push(a.apply(null,b));b.shift();return c}}else{return a.apply(null,arguments)}}};var d="optional not ignore cache".split(/\s/);for(var e=0;e<d.length;e++){b[d[e]]=c(b[d[e]])}var f=function(a){return function(){if(arguments[0]instanceof Array){return a.apply(null,arguments[0])}else{return a.apply(null,arguments)}}};var g="each any all".split(/\s/);for(var h=0;h<g.length;h++){b[g[h]]=f(b[g[h]])}})();(function(){var a=Date,b=a.prototype,c=a.CultureInfo;var d=function(a){var b=[];for(var c=0;c<a.length;c++){if(a[c]instanceof Array){b=b.concat(d(a[c]))}else{if(a[c]){b.push(a[c])}}
 }return b};a.Grammar={};a.Translator={hour:function(a){return function(){this.hour=Number(a)}},minute:function(a){return function(){this.minute=Number(a)}},second:function(a){return function(){this.second=Number(a)}},meridian:function(a){return function(){this.meridian=a.slice(0,1).toLowerCase()}},timezone:function(a){return function(){var b=a.replace(/[^\d\+\-]/g,"");if(b.length){this.timezoneOffset=Number(b)}else{this.timezone=a.toLowerCase()}}},day:function(a){var b=a[0];return function(){this.day=Number(b.match(/\d+/)[0])}},month:function(a){return function(){this.month=a.length==3?"jan feb mar apr may jun jul aug sep oct nov dec".indexOf(a)/4:Number(a)-1}},year:function(a){return function(){var b=Number(a);this.year=a.length>2?b:b+(b+2e3<c.twoDigitYearMax?2e3:1900)}},rday:function(a){return function(){switch(a){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break}}},finishExact:function(b){b=
 b instanceof Array?b:[b];for(var c=0;c<b.length;c++){if(b[c]){b[c].call(this)}}var d=new Date;if((this.hour||this.minute)&&!this.month&&!this.year&&!this.day){this.day=d.getDate()}if(!this.year){this.year=d.getFullYear()}if(!this.month&&this.month!==0){this.month=d.getMonth()}if(!this.day){this.day=1}if(!this.hour){this.hour=0}if(!this.minute){this.minute=0}if(!this.second){this.second=0}if(this.meridian&&this.hour){if(this.meridian=="p"&&this.hour<12){this.hour=this.hour+12}else if(this.meridian=="a"&&this.hour==12){this.hour=0}}if(this.day>a.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.")}var e=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){e.set({timezone:this.timezone})}else if(this.timezoneOffset){e.set({timezoneOffset:this.timezoneOffset})}return e},finish:function(b){b=b instanceof Array?d(b):[b];if(b.length===0){return null}for(var c=0;c<b.length;c++){if(typeof b[c]=="function
 "){b[c].call(this)}}var e=a.today();if(this.now&&!this.unit&&!this.operator){return new Date}else if(this.now){e=new Date}var f=!!(this.days&&this.days!==null||this.orient||this.operator);var g,h,i;i=this.orient=="past"||this.operator=="subtract"?-1:1;if(!this.now&&"hour minute second".indexOf(this.unit)!=-1){e.setTimeToNow()}if(this.month||this.month===0){if("year day hour minute second".indexOf(this.unit)!=-1){this.value=this.month+1;this.month=null;f=true}}if(!f&&this.weekday&&!this.day&&!this.days){var j=Date[this.weekday]();this.day=j.getDate();if(!this.month){this.month=j.getMonth()}this.year=j.getFullYear()}if(f&&this.weekday&&this.unit!="month"){this.unit="day";g=a.getDayNumberFromName(this.weekday)-e.getDay();h=7;this.days=g?(g+i*h)%h:i*h}if(this.month&&this.unit=="day"&&this.operator){this.value=this.month+1;this.month=null}if(this.value!=null&&this.month!=null&&this.year!=null){this.day=this.value*1}if(this.month&&!this.day&&this.value){e.set({day:this.value*1});if(!f){th
 is.day=this.value*1}}if(!this.month&&this.value&&this.unit=="month"&&!this.now){this.month=this.value;f=true}if(f&&(this.month||this.month===0)&&this.unit!="year"){this.unit="month";g=this.month-e.getMonth();h=12;this.months=g?(g+i*h)%h:i*h;this.month=null}if(!this.unit){this.unit="day"}if(!this.value&&this.operator&&this.operator!==null&&this[this.unit+"s"]&&this[this.unit+"s"]!==null){this[this.unit+"s"]=this[this.unit+"s"]+(this.operator=="add"?1:-1)+(this.value||0)*i}else if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1}this[this.unit+"s"]=this.value*i}if(this.meridian&&this.hour){if(this.meridian=="p"&&this.hour<12){this.hour=this.hour+12}else if(this.meridian=="a"&&this.hour==12){this.hour=0}}if(this.weekday&&!this.day&&!this.days){var j=Date[this.weekday]();this.day=j.getDate();if(j.getMonth()!==e.getMonth()){this.month=j.getMonth()}}if((this.month||this.month===0)&&!this.day){this.day=1}if(!this.orient&&!this.operator&&this.unit=="week"&&this.v
 alue&&!this.day&&!this.month){return Date.today().setWeek(this.value)}if(f&&this.timezone&&this.day&&this.days){this.day=this.days}return f?e.add(this):e.set(this)}};var e=a.Parsing.Operators,f=a.Grammar,g=a.Translator,h;f.datePartDelimiter=e.rtoken(/^([\s\-\.\,\/\x27]+)/);f.timePartDelimiter=e.stoken(":");f.whiteSpace=e.rtoken(/^\s*/);f.generalDelimiter=e.rtoken(/^(([\s\,]|at|@|on)+)/);var i={};f.ctoken=function(a){var b=i[a];if(!b){var d=c.regexPatterns;var f=a.split(/\s+/),g=[];for(var h=0;h<f.length;h++){g.push(e.replace(e.rtoken(d[f[h]]),f[h]))}b=i[a]=e.any.apply(null,g)}return b};f.ctoken2=function(a){return e.rtoken(c.regexPatterns[a])};f.h=e.cache(e.process(e.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),g.hour));f.hh=e.cache(e.process(e.rtoken(/^(0[0-9]|1[0-2])/),g.hour));f.H=e.cache(e.process(e.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),g.hour));f.HH=e.cache(e.process(e.rtoken(/^([0-1][0-9]|2[0-3])/),g.hour));f.m=e.cache(e.process(e.rtoken(/^([0-5][0-9]|[0-9])/),g.minute));f.mm=e.cache(e.pro
 cess(e.rtoken(/^[0-5][0-9]/),g.minute));f.s=e.cache(e.process(e.rtoken(/^([0-5][0-9]|[0-9])/),g.second));f.ss=e.cache(e.process(e.rtoken(/^[0-5][0-9]/),g.second));f.hms=e.cache(e.sequence([f.H,f.m,f.s],f.timePartDelimiter));f.t=e.cache(e.process(f.ctoken2("shortMeridian"),g.meridian));f.tt=e.cache(e.process(f.ctoken2("longMeridian"),g.meridian));f.z=e.cache(e.process(e.rtoken(/^((\+|\-)\s*\d\d\d\d)|((\+|\-)\d\d\:?\d\d)/),g.timezone));f.zz=e.cache(e.process(e.rtoken(/^((\+|\-)\s*\d\d\d\d)|((\+|\-)\d\d\:?\d\d)/),g.timezone));f.zzz=e.cache(e.process(f.ctoken2("timezone"),g.timezone));f.timeSuffix=e.each(e.ignore(f.whiteSpace),e.set([f.tt,f.zzz]));f.time=e.each(e.optional(e.ignore(e.stoken("T"))),f.hms,f.timeSuffix);f.d=e.cache(e.process(e.each(e.rtoken(/^([0-2]\d|3[0-1]|\d)/),e.optional(f.ctoken2("ordinalSuffix"))),g.day));f.dd=e.cache(e.process(e.each(e.rtoken(/^([0-2]\d|3[0-1])/),e.optional(f.ctoken2("ordinalSuffix"))),g.day));f.ddd=f.dddd=e.cache(e.process(f.ctoken("sun mon tue wed 
 thu fri sat"),function(a){return function(){this.weekday=a}}));f.M=e.cache(e.process(e.rtoken(/^(1[0-2]|0\d|\d)/),g.month));f.MM=e.cache(e.process(e.rtoken(/^(1[0-2]|0\d)/),g.month));f.MMM=f.MMMM=e.cache(e.process(f.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),g.month));f.y=e.cache(e.process(e.rtoken(/^(\d\d?)/),g.year));f.yy=e.cache(e.process(e.rtoken(/^(\d\d)/),g.year));f.yyy=e.cache(e.process(e.rtoken(/^(\d\d?\d?\d?)/),g.year));f.yyyy=e.cache(e.process(e.rtoken(/^(\d\d\d\d)/),g.year));h=function(){return e.each(e.any.apply(null,arguments),e.not(f.ctoken2("timeContext")))};f.day=h(f.d,f.dd);f.month=h(f.M,f.MMM);f.year=h(f.yyyy,f.yy);f.orientation=e.process(f.ctoken("past future"),function(a){return function(){this.orient=a}});f.operator=e.process(f.ctoken("add subtract"),function(a){return function(){this.operator=a}});f.rday=e.process(f.ctoken("yesterday tomorrow today now"),g.rday);f.unit=e.process(f.ctoken("second minute hour day week month year"),function(a){retur
 n function(){this.unit=a}});f.value=e.process(e.rtoken(/^\d\d?(st|nd|rd|th)?/),function(a){return function(){this.value=a.replace(/\D/g,"")}});f.expression=e.set([f.rday,f.operator,f.value,f.unit,f.orientation,f.ddd,f.MMM]);h=function(){return e.set(arguments,f.datePartDelimiter)};f.mdy=h(f.ddd,f.month,f.day,f.year);f.ymd=h(f.ddd,f.year,f.month,f.day);f.dmy=h(f.ddd,f.day,f.month,f.year);f.date=function(a){return(f[c.dateElementOrder]||f.mdy).call(this,a)};f.format=e.process(e.many(e.any(e.process(e.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(b){if(f[b]){return f[b]}else{throw a.Parsing.Exception(b)}}),e.process(e.rtoken(/^[^dMyhHmstz]+/),function(a){return e.ignore(e.stoken(a))}))),function(a){return e.process(e.each.apply(null,a),g.finishExact)});var j={};var k=function(a){return j[a]=j[a]||f.format(a)[0]};f.formats=function(a){if(a instanceof Array){var b=[];for(var c=0;c<a.length;c++){b.push(k(a[c]))}return e.any.apply(null,b)}else{return k(a)}};f._for
 mats=f.formats(['"yyyy-MM-ddTHH:mm:ssZ"',"yyyy-MM-ddTHH:mm:ssZ","yyyy-MM-ddTHH:mm:ssz","yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mmZ","yyyy-MM-ddTHH:mmz","yyyy-MM-ddTHH:mm","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","MMddyyyy","ddMMyyyy","Mddyyyy","ddMyyyy","Mdyyyy","dMyyyy","yyyy","Mdyy","dMyy","d"]);f._start=e.process(e.set([f.date,f.time,f.expression],f.generalDelimiter,f.whiteSpace),g.finish);f.start=function(a){try{var b=f._formats.call({},a);if(b[1].length===0){return b}}catch(c){}return f._start.call({},a)};a._parse=a.parse;a.parse=function(b){var c=null;if(!b){return null}if(b instanceof Date){return b}try{c=a.Grammar.start.call({},b.replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1"))}catch(d){return null}return c[1].length===0?c[0]:null};a.getParseFunction=function(b){var c=a.Grammar.formats(b);return function(a){var b=null;try{b=c.call({},a)}catch(d){return null}return b[1].length===0?b[0]:null}};a.parseExact=function(b,c){return a.getParseFunction(c)(b)}})()
-


[31/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/highcharts.src.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/highcharts.src.js b/portal/js/libs/Highcharts-2.3.5/js/highcharts.src.js
new file mode 100644
index 0000000..b36bf1e
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/highcharts.src.js
@@ -0,0 +1,15281 @@
+// ==ClosureCompiler==
+// @compilation_level SIMPLE_OPTIMIZATIONS
+
+/**
+ * @license Highcharts JS v2.3.5 (2012-12-19)
+ *
+ * (c) 2009-2012 Torstein Hønsi
+ *
+ * License: www.highcharts.com/license
+ */
+
+// JSLint options:
+/*global Highcharts, document, window, navigator, setInterval, clearInterval, clearTimeout, setTimeout, location, jQuery, $, console */
+
+(function () {
+// encapsulated variables
+var UNDEFINED,
+	doc = document,
+	win = window,
+	math = Math,
+	mathRound = math.round,
+	mathFloor = math.floor,
+	mathCeil = math.ceil,
+	mathMax = math.max,
+	mathMin = math.min,
+	mathAbs = math.abs,
+	mathCos = math.cos,
+	mathSin = math.sin,
+	mathPI = math.PI,
+	deg2rad = mathPI * 2 / 360,
+
+
+	// some variables
+	userAgent = navigator.userAgent,
+	isOpera = win.opera,
+	isIE = /msie/i.test(userAgent) && !isOpera,
+	docMode8 = doc.documentMode === 8,
+	isWebKit = /AppleWebKit/.test(userAgent),
+	isFirefox = /Firefox/.test(userAgent),
+	isTouchDevice = /(Mobile|Android|Windows Phone)/.test(userAgent),
+	SVG_NS = 'http://www.w3.org/2000/svg',
+	hasSVG = !!doc.createElementNS && !!doc.createElementNS(SVG_NS, 'svg').createSVGRect,
+	hasBidiBug = isFirefox && parseInt(userAgent.split('Firefox/')[1], 10) < 4, // issue #38
+	useCanVG = !hasSVG && !isIE && !!doc.createElement('canvas').getContext,
+	Renderer,
+	hasTouch = doc.documentElement.ontouchstart !== UNDEFINED,
+	symbolSizes = {},
+	idCounter = 0,
+	garbageBin,
+	defaultOptions,
+	dateFormat, // function
+	globalAnimation,
+	pathAnim,
+	timeUnits,
+	noop = function () {},
+	charts = [],
+
+	// some constants for frequently used strings
+	DIV = 'div',
+	ABSOLUTE = 'absolute',
+	RELATIVE = 'relative',
+	HIDDEN = 'hidden',
+	PREFIX = 'highcharts-',
+	VISIBLE = 'visible',
+	PX = 'px',
+	NONE = 'none',
+	M = 'M',
+	L = 'L',
+	/*
+	 * Empirical lowest possible opacities for TRACKER_FILL
+	 * IE6: 0.002
+	 * IE7: 0.002
+	 * IE8: 0.002
+	 * IE9: 0.00000000001 (unlimited)
+	 * IE10: 0.0001 (exporting only)
+	 * FF: 0.00000000001 (unlimited)
+	 * Chrome: 0.000001
+	 * Safari: 0.000001
+	 * Opera: 0.00000000001 (unlimited)
+	 */
+	TRACKER_FILL = 'rgba(192,192,192,' + (hasSVG ? 0.0001 : 0.002) + ')', // invisible but clickable
+	//TRACKER_FILL = 'rgba(192,192,192,0.5)',
+	NORMAL_STATE = '',
+	HOVER_STATE = 'hover',
+	SELECT_STATE = 'select',
+	MILLISECOND = 'millisecond',
+	SECOND = 'second',
+	MINUTE = 'minute',
+	HOUR = 'hour',
+	DAY = 'day',
+	WEEK = 'week',
+	MONTH = 'month',
+	YEAR = 'year',
+
+	// constants for attributes
+	FILL = 'fill',
+	LINEAR_GRADIENT = 'linearGradient',
+	STOPS = 'stops',
+	STROKE = 'stroke',
+	STROKE_WIDTH = 'stroke-width',
+
+	// time methods, changed based on whether or not UTC is used
+	makeTime,
+	getMinutes,
+	getHours,
+	getDay,
+	getDate,
+	getMonth,
+	getFullYear,
+	setMinutes,
+	setHours,
+	setDate,
+	setMonth,
+	setFullYear,
+
+
+	// lookup over the types and the associated classes
+	seriesTypes = {};
+
+// The Highcharts namespace
+win.Highcharts = {};
+
+/**
+ * Extend an object with the members of another
+ * @param {Object} a The object to be extended
+ * @param {Object} b The object to add to the first one
+ */
+function extend(a, b) {
+	var n;
+	if (!a) {
+		a = {};
+	}
+	for (n in b) {
+		a[n] = b[n];
+	}
+	return a;
+}
+
+/**
+ * Take an array and turn into a hash with even number arguments as keys and odd numbers as
+ * values. Allows creating constants for commonly used style properties, attributes etc.
+ * Avoid it in performance critical situations like looping
+ */
+function hash() {
+	var i = 0,
+		args = arguments,
+		length = args.length,
+		obj = {};
+	for (; i < length; i++) {
+		obj[args[i++]] = args[i];
+	}
+	return obj;
+}
+
+/**
+ * Shortcut for parseInt
+ * @param {Object} s
+ * @param {Number} mag Magnitude
+ */
+function pInt(s, mag) {
+	return parseInt(s, mag || 10);
+}
+
+/**
+ * Check for string
+ * @param {Object} s
+ */
+function isString(s) {
+	return typeof s === 'string';
+}
+
+/**
+ * Check for object
+ * @param {Object} obj
+ */
+function isObject(obj) {
+	return typeof obj === 'object';
+}
+
+/**
+ * Check for array
+ * @param {Object} obj
+ */
+function isArray(obj) {
+	return Object.prototype.toString.call(obj) === '[object Array]';
+}
+
+/**
+ * Check for number
+ * @param {Object} n
+ */
+function isNumber(n) {
+	return typeof n === 'number';
+}
+
+function log2lin(num) {
+	return math.log(num) / math.LN10;
+}
+function lin2log(num) {
+	return math.pow(10, num);
+}
+
+/**
+ * Remove last occurence of an item from an array
+ * @param {Array} arr
+ * @param {Mixed} item
+ */
+function erase(arr, item) {
+	var i = arr.length;
+	while (i--) {
+		if (arr[i] === item) {
+			arr.splice(i, 1);
+			break;
+		}
+	}
+	//return arr;
+}
+
+/**
+ * Returns true if the object is not null or undefined. Like MooTools' $.defined.
+ * @param {Object} obj
+ */
+function defined(obj) {
+	return obj !== UNDEFINED && obj !== null;
+}
+
+/**
+ * Set or get an attribute or an object of attributes. Can't use jQuery attr because
+ * it attempts to set expando properties on the SVG element, which is not allowed.
+ *
+ * @param {Object} elem The DOM element to receive the attribute(s)
+ * @param {String|Object} prop The property or an abject of key-value pairs
+ * @param {String} value The value if a single property is set
+ */
+function attr(elem, prop, value) {
+	var key,
+		setAttribute = 'setAttribute',
+		ret;
+
+	// if the prop is a string
+	if (isString(prop)) {
+		// set the value
+		if (defined(value)) {
+
+			elem[setAttribute](prop, value);
+
+		// get the value
+		} else if (elem && elem.getAttribute) { // elem not defined when printing pie demo...
+			ret = elem.getAttribute(prop);
+		}
+
+	// else if prop is defined, it is a hash of key/value pairs
+	} else if (defined(prop) && isObject(prop)) {
+		for (key in prop) {
+			elem[setAttribute](key, prop[key]);
+		}
+	}
+	return ret;
+}
+/**
+ * Check if an element is an array, and if not, make it into an array. Like
+ * MooTools' $.splat.
+ */
+function splat(obj) {
+	return isArray(obj) ? obj : [obj];
+}
+
+
+/**
+ * Return the first value that is defined. Like MooTools' $.pick.
+ */
+function pick() {
+	var args = arguments,
+		i,
+		arg,
+		length = args.length;
+	for (i = 0; i < length; i++) {
+		arg = args[i];
+		if (typeof arg !== 'undefined' && arg !== null) {
+			return arg;
+		}
+	}
+}
+
+/**
+ * Set CSS on a given element
+ * @param {Object} el
+ * @param {Object} styles Style object with camel case property names
+ */
+function css(el, styles) {
+	if (isIE) {
+		if (styles && styles.opacity !== UNDEFINED) {
+			styles.filter = 'alpha(opacity=' + (styles.opacity * 100) + ')';
+		}
+	}
+	extend(el.style, styles);
+}
+
+/**
+ * Utility function to create element with attributes and styles
+ * @param {Object} tag
+ * @param {Object} attribs
+ * @param {Object} styles
+ * @param {Object} parent
+ * @param {Object} nopad
+ */
+function createElement(tag, attribs, styles, parent, nopad) {
+	var el = doc.createElement(tag);
+	if (attribs) {
+		extend(el, attribs);
+	}
+	if (nopad) {
+		css(el, {padding: 0, border: NONE, margin: 0});
+	}
+	if (styles) {
+		css(el, styles);
+	}
+	if (parent) {
+		parent.appendChild(el);
+	}
+	return el;
+}
+
+/**
+ * Extend a prototyped class by new members
+ * @param {Object} parent
+ * @param {Object} members
+ */
+function extendClass(parent, members) {
+	var object = function () {};
+	object.prototype = new parent();
+	extend(object.prototype, members);
+	return object;
+}
+
+/**
+ * How many decimals are there in a number
+ */
+function getDecimals(number) {
+	
+	number = (number || 0).toString();
+	
+	return number.indexOf('.') > -1 ? 
+		number.split('.')[1].length :
+		0;
+}
+
+/**
+ * Format a number and return a string based on input settings
+ * @param {Number} number The input number to format
+ * @param {Number} decimals The amount of decimals
+ * @param {String} decPoint The decimal point, defaults to the one given in the lang options
+ * @param {String} thousandsSep The thousands separator, defaults to the one given in the lang options
+ */
+function numberFormat(number, decimals, decPoint, thousandsSep) {
+	var lang = defaultOptions.lang,
+		// http://kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_number_format/
+		n = number,
+		c = decimals === -1 ?
+			getDecimals(number) :
+			(isNaN(decimals = mathAbs(decimals)) ? 2 : decimals),
+		d = decPoint === undefined ? lang.decimalPoint : decPoint,
+		t = thousandsSep === undefined ? lang.thousandsSep : thousandsSep,
+		s = n < 0 ? "-" : "",
+		i = String(pInt(n = mathAbs(+n || 0).toFixed(c))),
+		j = i.length > 3 ? i.length % 3 : 0;
+
+	return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) +
+		(c ? d + mathAbs(n - i).toFixed(c).slice(2) : "");
+}
+
+/**
+ * Pad a string to a given length by adding 0 to the beginning
+ * @param {Number} number
+ * @param {Number} length
+ */
+function pad(number, length) {
+	// Create an array of the remaining length +1 and join it with 0's
+	return new Array((length || 2) + 1 - String(number).length).join(0) + number;
+}
+
+/**
+ * Wrap a method with extended functionality, preserving the original function
+ * @param {Object} obj The context object that the method belongs to 
+ * @param {String} method The name of the method to extend
+ * @param {Function} func A wrapper function callback. This function is called with the same arguments
+ * as the original function, except that the original function is unshifted and passed as the first 
+ * argument. 
+ */
+function wrap(obj, method, func) {
+	var proceed = obj[method];
+	obj[method] = function () {
+		var args = Array.prototype.slice.call(arguments);
+		args.unshift(proceed);
+		return func.apply(this, args);
+	};
+}
+
+/**
+ * Based on http://www.php.net/manual/en/function.strftime.php
+ * @param {String} format
+ * @param {Number} timestamp
+ * @param {Boolean} capitalize
+ */
+dateFormat = function (format, timestamp, capitalize) {
+	if (!defined(timestamp) || isNaN(timestamp)) {
+		return 'Invalid date';
+	}
+	format = pick(format, '%Y-%m-%d %H:%M:%S');
+
+	var date = new Date(timestamp),
+		key, // used in for constuct below
+		// get the basic time values
+		hours = date[getHours](),
+		day = date[getDay](),
+		dayOfMonth = date[getDate](),
+		month = date[getMonth](),
+		fullYear = date[getFullYear](),
+		lang = defaultOptions.lang,
+		langWeekdays = lang.weekdays,
+		/* // uncomment this and the 'W' format key below to enable week numbers
+		weekNumber = function () {
+			var clone = new Date(date.valueOf()),
+				day = clone[getDay]() == 0 ? 7 : clone[getDay](),
+				dayNumber;
+			clone.setDate(clone[getDate]() + 4 - day);
+			dayNumber = mathFloor((clone.getTime() - new Date(clone[getFullYear](), 0, 1, -6)) / 86400000);
+			return 1 + mathFloor(dayNumber / 7);
+		},
+		*/
+
+		// list all format keys
+		replacements = {
+
+			// Day
+			'a': langWeekdays[day].substr(0, 3), // Short weekday, like 'Mon'
+			'A': langWeekdays[day], // Long weekday, like 'Monday'
+			'd': pad(dayOfMonth), // Two digit day of the month, 01 to 31
+			'e': dayOfMonth, // Day of the month, 1 through 31
+
+			// Week (none implemented)
+			//'W': weekNumber(),
+
+			// Month
+			'b': lang.shortMonths[month], // Short month, like 'Jan'
+			'B': lang.months[month], // Long month, like 'January'
+			'm': pad(month + 1), // Two digit month number, 01 through 12
+
+			// Year
+			'y': fullYear.toString().substr(2, 2), // Two digits year, like 09 for 2009
+			'Y': fullYear, // Four digits year, like 2009
+
+			// Time
+			'H': pad(hours), // Two digits hours in 24h format, 00 through 23
+			'I': pad((hours % 12) || 12), // Two digits hours in 12h format, 00 through 11
+			'l': (hours % 12) || 12, // Hours in 12h format, 1 through 12
+			'M': pad(date[getMinutes]()), // Two digits minutes, 00 through 59
+			'p': hours < 12 ? 'AM' : 'PM', // Upper case AM or PM
+			'P': hours < 12 ? 'am' : 'pm', // Lower case AM or PM
+			'S': pad(date.getSeconds()), // Two digits seconds, 00 through  59
+			'L': pad(mathRound(timestamp % 1000), 3) // Milliseconds (naming from Ruby)
+		};
+
+
+	// do the replaces
+	for (key in replacements) {
+		while (format.indexOf('%' + key) !== -1) { // regex would do it in one line, but this is faster
+			format = format.replace('%' + key, replacements[key]);
+		}
+	}
+
+	// Optionally capitalize the string and return
+	return capitalize ? format.substr(0, 1).toUpperCase() + format.substr(1) : format;
+};
+
+/**
+ * Take an interval and normalize it to multiples of 1, 2, 2.5 and 5
+ * @param {Number} interval
+ * @param {Array} multiples
+ * @param {Number} magnitude
+ * @param {Object} options
+ */
+function normalizeTickInterval(interval, multiples, magnitude, options) {
+	var normalized, i;
+
+	// round to a tenfold of 1, 2, 2.5 or 5
+	magnitude = pick(magnitude, 1);
+	normalized = interval / magnitude;
+
+	// multiples for a linear scale
+	if (!multiples) {
+		multiples = [1, 2, 2.5, 5, 10];
+
+		// the allowDecimals option
+		if (options && options.allowDecimals === false) {
+			if (magnitude === 1) {
+				multiples = [1, 2, 5, 10];
+			} else if (magnitude <= 0.1) {
+				multiples = [1 / magnitude];
+			}
+		}
+	}
+
+	// normalize the interval to the nearest multiple
+	for (i = 0; i < multiples.length; i++) {
+		interval = multiples[i];
+		if (normalized <= (multiples[i] + (multiples[i + 1] || multiples[i])) / 2) {
+			break;
+		}
+	}
+
+	// multiply back to the correct magnitude
+	interval *= magnitude;
+
+	return interval;
+}
+
+/**
+ * Get a normalized tick interval for dates. Returns a configuration object with
+ * unit range (interval), count and name. Used to prepare data for getTimeTicks. 
+ * Previously this logic was part of getTimeTicks, but as getTimeTicks now runs
+ * of segments in stock charts, the normalizing logic was extracted in order to 
+ * prevent it for running over again for each segment having the same interval. 
+ * #662, #697.
+ */
+function normalizeTimeTickInterval(tickInterval, unitsOption) {
+	var units = unitsOption || [[
+				MILLISECOND, // unit name
+				[1, 2, 5, 10, 20, 25, 50, 100, 200, 500] // allowed multiples
+			], [
+				SECOND,
+				[1, 2, 5, 10, 15, 30]
+			], [
+				MINUTE,
+				[1, 2, 5, 10, 15, 30]
+			], [
+				HOUR,
+				[1, 2, 3, 4, 6, 8, 12]
+			], [
+				DAY,
+				[1, 2]
+			], [
+				WEEK,
+				[1, 2]
+			], [
+				MONTH,
+				[1, 2, 3, 4, 6]
+			], [
+				YEAR,
+				null
+			]],
+		unit = units[units.length - 1], // default unit is years
+		interval = timeUnits[unit[0]],
+		multiples = unit[1],
+		count,
+		i;
+		
+	// loop through the units to find the one that best fits the tickInterval
+	for (i = 0; i < units.length; i++) {
+		unit = units[i];
+		interval = timeUnits[unit[0]];
+		multiples = unit[1];
+
+
+		if (units[i + 1]) {
+			// lessThan is in the middle between the highest multiple and the next unit.
+			var lessThan = (interval * multiples[multiples.length - 1] +
+						timeUnits[units[i + 1][0]]) / 2;
+
+			// break and keep the current unit
+			if (tickInterval <= lessThan) {
+				break;
+			}
+		}
+	}
+
+	// prevent 2.5 years intervals, though 25, 250 etc. are allowed
+	if (interval === timeUnits[YEAR] && tickInterval < 5 * interval) {
+		multiples = [1, 2, 5];
+	}
+	
+	// prevent 2.5 years intervals, though 25, 250 etc. are allowed
+	if (interval === timeUnits[YEAR] && tickInterval < 5 * interval) {
+		multiples = [1, 2, 5];
+	}
+
+	// get the count
+	count = normalizeTickInterval(tickInterval / interval, multiples);
+	
+	return {
+		unitRange: interval,
+		count: count,
+		unitName: unit[0]
+	};
+}
+
+/**
+ * Set the tick positions to a time unit that makes sense, for example
+ * on the first of each month or on every Monday. Return an array
+ * with the time positions. Used in datetime axes as well as for grouping
+ * data on a datetime axis.
+ *
+ * @param {Object} normalizedInterval The interval in axis values (ms) and the count
+ * @param {Number} min The minimum in axis values
+ * @param {Number} max The maximum in axis values
+ * @param {Number} startOfWeek
+ */
+function getTimeTicks(normalizedInterval, min, max, startOfWeek) {
+	var tickPositions = [],
+		i,
+		higherRanks = {},
+		useUTC = defaultOptions.global.useUTC,
+		minYear, // used in months and years as a basis for Date.UTC()
+		minDate = new Date(min),
+		interval = normalizedInterval.unitRange,
+		count = normalizedInterval.count;
+
+	if (defined(min)) { // #1300
+		if (interval >= timeUnits[SECOND]) { // second
+			minDate.setMilliseconds(0);
+			minDate.setSeconds(interval >= timeUnits[MINUTE] ? 0 :
+				count * mathFloor(minDate.getSeconds() / count));
+		}
+	
+		if (interval >= timeUnits[MINUTE]) { // minute
+			minDate[setMinutes](interval >= timeUnits[HOUR] ? 0 :
+				count * mathFloor(minDate[getMinutes]() / count));
+		}
+	
+		if (interval >= timeUnits[HOUR]) { // hour
+			minDate[setHours](interval >= timeUnits[DAY] ? 0 :
+				count * mathFloor(minDate[getHours]() / count));
+		}
+	
+		if (interval >= timeUnits[DAY]) { // day
+			minDate[setDate](interval >= timeUnits[MONTH] ? 1 :
+				count * mathFloor(minDate[getDate]() / count));
+		}
+	
+		if (interval >= timeUnits[MONTH]) { // month
+			minDate[setMonth](interval >= timeUnits[YEAR] ? 0 :
+				count * mathFloor(minDate[getMonth]() / count));
+			minYear = minDate[getFullYear]();
+		}
+	
+		if (interval >= timeUnits[YEAR]) { // year
+			minYear -= minYear % count;
+			minDate[setFullYear](minYear);
+		}
+	
+		// week is a special case that runs outside the hierarchy
+		if (interval === timeUnits[WEEK]) {
+			// get start of current week, independent of count
+			minDate[setDate](minDate[getDate]() - minDate[getDay]() +
+				pick(startOfWeek, 1));
+		}
+	
+	
+		// get tick positions
+		i = 1;
+		minYear = minDate[getFullYear]();
+		var time = minDate.getTime(),
+			minMonth = minDate[getMonth](),
+			minDateDate = minDate[getDate](),
+			timezoneOffset = useUTC ? 
+				0 : 
+				(24 * 3600 * 1000 + minDate.getTimezoneOffset() * 60 * 1000) % (24 * 3600 * 1000); // #950
+	
+		// iterate and add tick positions at appropriate values
+		while (time < max) {
+			tickPositions.push(time);
+	
+			// if the interval is years, use Date.UTC to increase years
+			if (interval === timeUnits[YEAR]) {
+				time = makeTime(minYear + i * count, 0);
+	
+			// if the interval is months, use Date.UTC to increase months
+			} else if (interval === timeUnits[MONTH]) {
+				time = makeTime(minYear, minMonth + i * count);
+	
+			// if we're using global time, the interval is not fixed as it jumps
+			// one hour at the DST crossover
+			} else if (!useUTC && (interval === timeUnits[DAY] || interval === timeUnits[WEEK])) {
+				time = makeTime(minYear, minMonth, minDateDate +
+					i * count * (interval === timeUnits[DAY] ? 1 : 7));
+	
+			// else, the interval is fixed and we use simple addition
+			} else {
+				time += interval * count;
+				
+				// mark new days if the time is dividable by day
+				if (interval <= timeUnits[HOUR] && time % timeUnits[DAY] === timezoneOffset) {
+					higherRanks[time] = DAY;
+				}
+			}
+	
+			i++;
+		}
+	
+		// push the last time
+		tickPositions.push(time);
+	}
+
+	// record information on the chosen unit - for dynamic label formatter
+	tickPositions.info = extend(normalizedInterval, {
+		higherRanks: higherRanks,
+		totalRange: interval * count
+	});
+
+	return tickPositions;
+}
+
+/**
+ * Helper class that contains variuos counters that are local to the chart.
+ */
+function ChartCounters() {
+	this.color = 0;
+	this.symbol = 0;
+}
+
+ChartCounters.prototype =  {
+	/**
+	 * Wraps the color counter if it reaches the specified length.
+	 */
+	wrapColor: function (length) {
+		if (this.color >= length) {
+			this.color = 0;
+		}
+	},
+
+	/**
+	 * Wraps the symbol counter if it reaches the specified length.
+	 */
+	wrapSymbol: function (length) {
+		if (this.symbol >= length) {
+			this.symbol = 0;
+		}
+	}
+};
+
+
+/**
+ * Utility method that sorts an object array and keeping the order of equal items.
+ * ECMA script standard does not specify the behaviour when items are equal.
+ */
+function stableSort(arr, sortFunction) {
+	var length = arr.length,
+		sortValue,
+		i;
+
+	// Add index to each item
+	for (i = 0; i < length; i++) {
+		arr[i].ss_i = i; // stable sort index
+	}
+
+	arr.sort(function (a, b) {
+		sortValue = sortFunction(a, b);
+		return sortValue === 0 ? a.ss_i - b.ss_i : sortValue;
+	});
+
+	// Remove index from items
+	for (i = 0; i < length; i++) {
+		delete arr[i].ss_i; // stable sort index
+	}
+}
+
+/**
+ * Non-recursive method to find the lowest member of an array. Math.min raises a maximum
+ * call stack size exceeded error in Chrome when trying to apply more than 150.000 points. This
+ * method is slightly slower, but safe.
+ */
+function arrayMin(data) {
+	var i = data.length,
+		min = data[0];
+
+	while (i--) {
+		if (data[i] < min) {
+			min = data[i];
+		}
+	}
+	return min;
+}
+
+/**
+ * Non-recursive method to find the lowest member of an array. Math.min raises a maximum
+ * call stack size exceeded error in Chrome when trying to apply more than 150.000 points. This
+ * method is slightly slower, but safe.
+ */
+function arrayMax(data) {
+	var i = data.length,
+		max = data[0];
+
+	while (i--) {
+		if (data[i] > max) {
+			max = data[i];
+		}
+	}
+	return max;
+}
+
+/**
+ * Utility method that destroys any SVGElement or VMLElement that are properties on the given object.
+ * It loops all properties and invokes destroy if there is a destroy method. The property is
+ * then delete'ed.
+ * @param {Object} The object to destroy properties on
+ * @param {Object} Exception, do not destroy this property, only delete it.
+ */
+function destroyObjectProperties(obj, except) {
+	var n;
+	for (n in obj) {
+		// If the object is non-null and destroy is defined
+		if (obj[n] && obj[n] !== except && obj[n].destroy) {
+			// Invoke the destroy
+			obj[n].destroy();
+		}
+
+		// Delete the property from the object.
+		delete obj[n];
+	}
+}
+
+
+/**
+ * Discard an element by moving it to the bin and delete
+ * @param {Object} The HTML node to discard
+ */
+function discardElement(element) {
+	// create a garbage bin element, not part of the DOM
+	if (!garbageBin) {
+		garbageBin = createElement(DIV);
+	}
+
+	// move the node and empty bin
+	if (element) {
+		garbageBin.appendChild(element);
+	}
+	garbageBin.innerHTML = '';
+}
+
+/**
+ * Provide error messages for debugging, with links to online explanation 
+ */
+function error(code, stop) {
+	var msg = 'Highcharts error #' + code + ': www.highcharts.com/errors/' + code;
+	if (stop) {
+		throw msg;
+	} else if (win.console) {
+		console.log(msg);
+	}
+}
+
+/**
+ * Fix JS round off float errors
+ * @param {Number} num
+ */
+function correctFloat(num) {
+	return parseFloat(
+		num.toPrecision(14)
+	);
+}
+
+/**
+ * Set the global animation to either a given value, or fall back to the
+ * given chart's animation option
+ * @param {Object} animation
+ * @param {Object} chart
+ */
+function setAnimation(animation, chart) {
+	globalAnimation = pick(animation, chart.animation);
+}
+
+/**
+ * The time unit lookup
+ */
+/*jslint white: true*/
+timeUnits = hash(
+	MILLISECOND, 1,
+	SECOND, 1000,
+	MINUTE, 60000,
+	HOUR, 3600000,
+	DAY, 24 * 3600000,
+	WEEK, 7 * 24 * 3600000,
+	MONTH, 31 * 24 * 3600000,
+	YEAR, 31556952000
+);
+/*jslint white: false*/
+/**
+ * Path interpolation algorithm used across adapters
+ */
+pathAnim = {
+	/**
+	 * Prepare start and end values so that the path can be animated one to one
+	 */
+	init: function (elem, fromD, toD) {
+		fromD = fromD || '';
+		var shift = elem.shift,
+			bezier = fromD.indexOf('C') > -1,
+			numParams = bezier ? 7 : 3,
+			endLength,
+			slice,
+			i,
+			start = fromD.split(' '),
+			end = [].concat(toD), // copy
+			startBaseLine,
+			endBaseLine,
+			sixify = function (arr) { // in splines make move points have six parameters like bezier curves
+				i = arr.length;
+				while (i--) {
+					if (arr[i] === M) {
+						arr.splice(i + 1, 0, arr[i + 1], arr[i + 2], arr[i + 1], arr[i + 2]);
+					}
+				}
+			};
+
+		if (bezier) {
+			sixify(start);
+			sixify(end);
+		}
+
+		// pull out the base lines before padding
+		if (elem.isArea) {
+			startBaseLine = start.splice(start.length - 6, 6);
+			endBaseLine = end.splice(end.length - 6, 6);
+		}
+
+		// if shifting points, prepend a dummy point to the end path
+		if (shift <= end.length / numParams) {
+			while (shift--) {
+				end = [].concat(end).splice(0, numParams).concat(end);
+			}
+		}
+		elem.shift = 0; // reset for following animations
+
+		// copy and append last point until the length matches the end length
+		if (start.length) {
+			endLength = end.length;
+			while (start.length < endLength) {
+
+				//bezier && sixify(start);
+				slice = [].concat(start).splice(start.length - numParams, numParams);
+				if (bezier) { // disable first control point
+					slice[numParams - 6] = slice[numParams - 2];
+					slice[numParams - 5] = slice[numParams - 1];
+				}
+				start = start.concat(slice);
+			}
+		}
+
+		if (startBaseLine) { // append the base lines for areas
+			start = start.concat(startBaseLine);
+			end = end.concat(endBaseLine);
+		}
+		return [start, end];
+	},
+
+	/**
+	 * Interpolate each value of the path and return the array
+	 */
+	step: function (start, end, pos, complete) {
+		var ret = [],
+			i = start.length,
+			startVal;
+
+		if (pos === 1) { // land on the final path without adjustment points appended in the ends
+			ret = complete;
+
+		} else if (i === end.length && pos < 1) {
+			while (i--) {
+				startVal = parseFloat(start[i]);
+				ret[i] =
+					isNaN(startVal) ? // a letter instruction like M or L
+						start[i] :
+						pos * (parseFloat(end[i] - startVal)) + startVal;
+
+			}
+		} else { // if animation is finished or length not matching, land on right value
+			ret = end;
+		}
+		return ret;
+	}
+};
+
+(function ($) {
+	/**
+	 * The default HighchartsAdapter for jQuery
+	 */
+	win.HighchartsAdapter = win.HighchartsAdapter || ($ && {
+		
+		/**
+		 * Initialize the adapter by applying some extensions to jQuery
+		 */
+		init: function (pathAnim) {
+			
+			// extend the animate function to allow SVG animations
+			var Fx = $.fx,
+				Step = Fx.step,
+				dSetter,
+				Tween = $.Tween,
+				propHooks = Tween && Tween.propHooks;
+			
+			/*jslint unparam: true*//* allow unused param x in this function */
+			$.extend($.easing, {
+				easeOutQuad: function (x, t, b, c, d) {
+					return -c * (t /= d) * (t - 2) + b;
+				}
+			});
+			/*jslint unparam: false*/
+		
+		
+			// extend some methods to check for elem.attr, which means it is a Highcharts SVG object
+			$.each(['cur', '_default', 'width', 'height'], function (i, fn) {
+				var obj = Step,
+					base,
+					elem;
+					
+				// Handle different parent objects
+				if (fn === 'cur') {
+					obj = Fx.prototype; // 'cur', the getter, relates to Fx.prototype
+				
+				} else if (fn === '_default' && Tween) { // jQuery 1.8 model
+					obj = propHooks[fn];
+					fn = 'set';
+				}
+		
+				// Overwrite the method
+				base = obj[fn];
+				if (base) { // step.width and step.height don't exist in jQuery < 1.7
+		
+					// create the extended function replacement
+					obj[fn] = function (fx) {
+		
+						// Fx.prototype.cur does not use fx argument
+						fx = i ? fx : this;
+		
+						// shortcut
+						elem = fx.elem;
+		
+						// Fx.prototype.cur returns the current value. The other ones are setters
+						// and returning a value has no effect.
+						return elem.attr ? // is SVG element wrapper
+							elem.attr(fx.prop, fn === 'cur' ? UNDEFINED : fx.now) : // apply the SVG wrapper's method
+							base.apply(this, arguments); // use jQuery's built-in method
+					};
+				}
+			});
+			
+			
+			// Define the setter function for d (path definitions)
+			dSetter = function (fx) {
+				var elem = fx.elem,
+					ends;
+		
+				// Normally start and end should be set in state == 0, but sometimes,
+				// for reasons unknown, this doesn't happen. Perhaps state == 0 is skipped
+				// in these cases
+				if (!fx.started) {
+					ends = pathAnim.init(elem, elem.d, elem.toD);
+					fx.start = ends[0];
+					fx.end = ends[1];
+					fx.started = true;
+				}
+		
+		
+				// interpolate each value of the path
+				elem.attr('d', pathAnim.step(fx.start, fx.end, fx.pos, elem.toD));
+			};
+			
+			// jQuery 1.8 style
+			if (Tween) {
+				propHooks.d = {
+					set: dSetter
+				};
+			// pre 1.8
+			} else {
+				// animate paths
+				Step.d = dSetter;
+			}
+			
+			/**
+			 * Utility for iterating over an array. Parameters are reversed compared to jQuery.
+			 * @param {Array} arr
+			 * @param {Function} fn
+			 */
+			this.each = Array.prototype.forEach ?
+				function (arr, fn) { // modern browsers
+					return Array.prototype.forEach.call(arr, fn);
+					
+				} : 
+				function (arr, fn) { // legacy
+					var i = 0, 
+						len = arr.length;
+					for (; i < len; i++) {
+						if (fn.call(arr[i], arr[i], i, arr) === false) {
+							return i;
+						}
+					}
+				};
+			
+			// Register Highcharts as a jQuery plugin
+			// TODO: MooTools and prototype as well?
+			// TODO: StockChart
+			/*$.fn.highcharts = function(options, callback) {
+		        options.chart = merge(options.chart, { renderTo: this[0] });
+		        this.chart = new Chart(options, callback);
+		        return this;
+		    };*/
+		},
+	
+		/**
+		 * Downloads a script and executes a callback when done.
+		 * @param {String} scriptLocation
+		 * @param {Function} callback
+		 */
+		getScript: $.getScript,
+		
+		/**
+		 * Return the index of an item in an array, or -1 if not found
+		 */
+		inArray: $.inArray,
+		
+		/**
+		 * A direct link to jQuery methods. MooTools and Prototype adapters must be implemented for each case of method.
+		 * @param {Object} elem The HTML element
+		 * @param {String} method Which method to run on the wrapped element
+		 */
+		adapterRun: function (elem, method) {
+			return $(elem)[method]();
+		},
+	
+		/**
+		 * Filter an array
+		 */
+		grep: $.grep,
+	
+		/**
+		 * Map an array
+		 * @param {Array} arr
+		 * @param {Function} fn
+		 */
+		map: function (arr, fn) {
+			//return jQuery.map(arr, fn);
+			var results = [],
+				i = 0,
+				len = arr.length;
+			for (; i < len; i++) {
+				results[i] = fn.call(arr[i], arr[i], i, arr);
+			}
+			return results;
+	
+		},
+	
+		/**
+		 * Deep merge two objects and return a third object
+		 */
+		merge: function () {
+			var args = arguments;
+			return $.extend(true, null, args[0], args[1], args[2], args[3]);
+		},
+	
+		/**
+		 * Get the position of an element relative to the top left of the page
+		 */
+		offset: function (el) {
+			return $(el).offset();
+		},
+	
+		/**
+		 * Add an event listener
+		 * @param {Object} el A HTML element or custom object
+		 * @param {String} event The event type
+		 * @param {Function} fn The event handler
+		 */
+		addEvent: function (el, event, fn) {
+			$(el).bind(event, fn);
+		},
+	
+		/**
+		 * Remove event added with addEvent
+		 * @param {Object} el The object
+		 * @param {String} eventType The event type. Leave blank to remove all events.
+		 * @param {Function} handler The function to remove
+		 */
+		removeEvent: function (el, eventType, handler) {
+			// workaround for jQuery issue with unbinding custom events:
+			// http://forum.jQuery.com/topic/javascript-error-when-unbinding-a-custom-event-using-jQuery-1-4-2
+			var func = doc.removeEventListener ? 'removeEventListener' : 'detachEvent';
+			if (doc[func] && !el[func]) {
+				el[func] = function () {};
+			}
+	
+			$(el).unbind(eventType, handler);
+		},
+	
+		/**
+		 * Fire an event on a custom object
+		 * @param {Object} el
+		 * @param {String} type
+		 * @param {Object} eventArguments
+		 * @param {Function} defaultFunction
+		 */
+		fireEvent: function (el, type, eventArguments, defaultFunction) {
+			var event = $.Event(type),
+				detachedType = 'detached' + type,
+				defaultPrevented;
+	
+			// Remove warnings in Chrome when accessing layerX and layerY. Although Highcharts
+			// never uses these properties, Chrome includes them in the default click event and
+			// raises the warning when they are copied over in the extend statement below.
+			//
+			// To avoid problems in IE (see #1010) where we cannot delete the properties and avoid
+			// testing if they are there (warning in chrome) the only option is to test if running IE.
+			if (!isIE && eventArguments) {
+				delete eventArguments.layerX;
+				delete eventArguments.layerY;
+			}
+	
+			extend(event, eventArguments);
+	
+			// Prevent jQuery from triggering the object method that is named the
+			// same as the event. For example, if the event is 'select', jQuery
+			// attempts calling el.select and it goes into a loop.
+			if (el[type]) {
+				el[detachedType] = el[type];
+				el[type] = null;
+			}
+	
+			// Wrap preventDefault and stopPropagation in try/catch blocks in
+			// order to prevent JS errors when cancelling events on non-DOM
+			// objects. #615.
+			/*jslint unparam: true*/
+			$.each(['preventDefault', 'stopPropagation'], function (i, fn) {
+				var base = event[fn];
+				event[fn] = function () {
+					try {
+						base.call(event);
+					} catch (e) {
+						if (fn === 'preventDefault') {
+							defaultPrevented = true;
+						}
+					}
+				};
+			});
+			/*jslint unparam: false*/
+	
+			// trigger it
+			$(el).trigger(event);
+	
+			// attach the method
+			if (el[detachedType]) {
+				el[type] = el[detachedType];
+				el[detachedType] = null;
+			}
+	
+			if (defaultFunction && !event.isDefaultPrevented() && !defaultPrevented) {
+				defaultFunction(event);
+			}
+		},
+		
+		/**
+		 * Extension method needed for MooTools
+		 */
+		washMouseEvent: function (e) {
+			var ret = e.originalEvent || e;
+			
+			// computed by jQuery, needed by IE8
+			if (ret.pageX === UNDEFINED) { // #1236
+				ret.pageX = e.pageX;
+				ret.pageY = e.pageY;
+			}
+			
+			return ret;
+		},
+	
+		/**
+		 * Animate a HTML element or SVG element wrapper
+		 * @param {Object} el
+		 * @param {Object} params
+		 * @param {Object} options jQuery-like animation options: duration, easing, callback
+		 */
+		animate: function (el, params, options) {
+			var $el = $(el);
+			if (params.d) {
+				el.toD = params.d; // keep the array form for paths, used in $.fx.step.d
+				params.d = 1; // because in jQuery, animating to an array has a different meaning
+			}
+	
+			$el.stop();
+			$el.animate(params, options);
+	
+		},
+		/**
+		 * Stop running animation
+		 */
+		stop: function (el) {
+			$(el).stop();
+		}
+	});
+}(win.jQuery));
+
+
+// check for a custom HighchartsAdapter defined prior to this file
+var globalAdapter = win.HighchartsAdapter,
+	adapter = globalAdapter || {};
+	
+// Initialize the adapter
+if (globalAdapter) {
+	globalAdapter.init.call(globalAdapter, pathAnim);
+}
+
+
+	// Utility functions. If the HighchartsAdapter is not defined, adapter is an empty object
+	// and all the utility functions will be null. In that case they are populated by the
+	// default adapters below.
+var adapterRun = adapter.adapterRun,
+	getScript = adapter.getScript,
+	inArray = adapter.inArray,
+	each = adapter.each,
+	grep = adapter.grep,
+	offset = adapter.offset,
+	map = adapter.map,
+	merge = adapter.merge,
+	addEvent = adapter.addEvent,
+	removeEvent = adapter.removeEvent,
+	fireEvent = adapter.fireEvent,
+	washMouseEvent = adapter.washMouseEvent,
+	animate = adapter.animate,
+	stop = adapter.stop;
+
+
+
+/* ****************************************************************************
+ * Handle the options                                                         *
+ *****************************************************************************/
+var
+
+defaultLabelOptions = {
+	enabled: true,
+	// rotation: 0,
+	align: 'center',
+	x: 0,
+	y: 15,
+	/*formatter: function () {
+		return this.value;
+	},*/
+	style: {
+		color: '#666',
+		fontSize: '11px',
+		lineHeight: '14px'
+	}
+};
+
+defaultOptions = {
+	colors: ['#4572A7', '#AA4643', '#89A54E', '#80699B', '#3D96AE',
+		'#DB843D', '#92A8CD', '#A47D7C', '#B5CA92'],
+	symbols: ['circle', 'diamond', 'square', 'triangle', 'triangle-down'],
+	lang: {
+		loading: 'Loading...',
+		months: ['January', 'February', 'March', 'April', 'May', 'June', 'July',
+				'August', 'September', 'October', 'November', 'December'],
+		shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+		weekdays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
+		decimalPoint: '.',
+		numericSymbols: ['k', 'M', 'G', 'T', 'P', 'E'], // SI prefixes used in axis labels
+		resetZoom: 'Reset zoom',
+		resetZoomTitle: 'Reset zoom level 1:1',
+		thousandsSep: ','
+	},
+	global: {
+		useUTC: true,
+		canvasToolsURL: 'http://code.highcharts.com/2.3.5/modules/canvas-tools.js',
+		VMLRadialGradientURL: 'http://code.highcharts.com/2.3.5/gfx/vml-radial-gradient.png'
+	},
+	chart: {
+		//animation: true,
+		//alignTicks: false,
+		//reflow: true,
+		//className: null,
+		//events: { load, selection },
+		//margin: [null],
+		//marginTop: null,
+		//marginRight: null,
+		//marginBottom: null,
+		//marginLeft: null,
+		borderColor: '#4572A7',
+		//borderWidth: 0,
+		borderRadius: 5,
+		defaultSeriesType: 'line',
+		ignoreHiddenSeries: true,
+		//inverted: false,
+		//shadow: false,
+		spacingTop: 10,
+		spacingRight: 10,
+		spacingBottom: 15,
+		spacingLeft: 10,
+		style: {
+			fontFamily: '"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif', // default font
+			fontSize: '12px'
+		},
+		backgroundColor: '#FFFFFF',
+		//plotBackgroundColor: null,
+		plotBorderColor: '#C0C0C0',
+		//plotBorderWidth: 0,
+		//plotShadow: false,
+		//zoomType: ''
+		resetZoomButton: {
+			theme: {
+				zIndex: 20
+			},
+			position: {
+				align: 'right',
+				x: -10,
+				//verticalAlign: 'top',
+				y: 10
+			}
+			// relativeTo: 'plot'
+		}
+	},
+	title: {
+		text: 'Chart title',
+		align: 'center',
+		// floating: false,
+		// margin: 15,
+		// x: 0,
+		// verticalAlign: 'top',
+		y: 15,
+		style: {
+			color: '#3E576F',
+			fontSize: '16px'
+		}
+
+	},
+	subtitle: {
+		text: '',
+		align: 'center',
+		// floating: false
+		// x: 0,
+		// verticalAlign: 'top',
+		y: 30,
+		style: {
+			color: '#6D869F'
+		}
+	},
+
+	plotOptions: {
+		line: { // base series options
+			allowPointSelect: false,
+			showCheckbox: false,
+			animation: {
+				duration: 1000
+			},
+			//connectNulls: false,
+			//cursor: 'default',
+			//clip: true,
+			//dashStyle: null,
+			//enableMouseTracking: true,
+			events: {},
+			//legendIndex: 0,
+			lineWidth: 2,
+			shadow: true,
+			// stacking: null,
+			marker: {
+				enabled: true,
+				//symbol: null,
+				lineWidth: 0,
+				radius: 4,
+				lineColor: '#FFFFFF',
+				//fillColor: null,
+				states: { // states for a single point
+					hover: {
+						enabled: true
+						//radius: base + 2
+					},
+					select: {
+						fillColor: '#FFFFFF',
+						lineColor: '#000000',
+						lineWidth: 2
+					}
+				}
+			},
+			point: {
+				events: {}
+			},
+			dataLabels: merge(defaultLabelOptions, {
+				enabled: false,
+				formatter: function () {
+					return this.y;
+				},
+				verticalAlign: 'bottom', // above singular point
+				y: 0
+				// backgroundColor: undefined,
+				// borderColor: undefined,
+				// borderRadius: undefined,
+				// borderWidth: undefined,
+				// padding: 3,
+				// shadow: false
+			}),
+			cropThreshold: 300, // draw points outside the plot area when the number of points is less than this
+			pointRange: 0,
+			//pointStart: 0,
+			//pointInterval: 1,
+			showInLegend: true,
+			states: { // states for the entire series
+				hover: {
+					//enabled: false,
+					//lineWidth: base + 1,
+					marker: {
+						// lineWidth: base + 1,
+						// radius: base + 1
+					}
+				},
+				select: {
+					marker: {}
+				}
+			},
+			stickyTracking: true
+			//tooltip: {
+				//pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b>'
+				//valueDecimals: null,
+				//xDateFormat: '%A, %b %e, %Y',
+				//valuePrefix: '',
+				//ySuffix: ''				
+			//}
+			// turboThreshold: 1000
+			// zIndex: null
+		}
+	},
+	labels: {
+		//items: [],
+		style: {
+			//font: defaultFont,
+			position: ABSOLUTE,
+			color: '#3E576F'
+		}
+	},
+	legend: {
+		enabled: true,
+		align: 'center',
+		//floating: false,
+		layout: 'horizontal',
+		labelFormatter: function () {
+			return this.name;
+		},
+		borderWidth: 1,
+		borderColor: '#909090',
+		borderRadius: 5,
+		navigation: {
+			// animation: true,
+			activeColor: '#3E576F',
+			// arrowSize: 12
+			inactiveColor: '#CCC'
+			// style: {} // text styles
+		},
+		// margin: 10,
+		// reversed: false,
+		shadow: false,
+		// backgroundColor: null,
+		/*style: {
+			padding: '5px'
+		},*/
+		itemStyle: {
+			cursor: 'pointer',
+			color: '#3E576F',
+			fontSize: '12px'
+		},
+		itemHoverStyle: {
+			//cursor: 'pointer', removed as of #601
+			color: '#000'
+		},
+		itemHiddenStyle: {
+			color: '#CCC'
+		},
+		itemCheckboxStyle: {
+			position: ABSOLUTE,
+			width: '13px', // for IE precision
+			height: '13px'
+		},
+		// itemWidth: undefined,
+		symbolWidth: 16,
+		symbolPadding: 5,
+		verticalAlign: 'bottom',
+		// width: undefined,
+		x: 0,
+		y: 0
+	},
+
+	loading: {
+		// hideDuration: 100,
+		labelStyle: {
+			fontWeight: 'bold',
+			position: RELATIVE,
+			top: '1em'
+		},
+		// showDuration: 0,
+		style: {
+			position: ABSOLUTE,
+			backgroundColor: 'white',
+			opacity: 0.5,
+			textAlign: 'center'
+		}
+	},
+
+	tooltip: {
+		enabled: true,
+		//crosshairs: null,
+		backgroundColor: 'rgba(255, 255, 255, .85)',
+		borderWidth: 2,
+		borderRadius: 5,
+		dateTimeLabelFormats: { 
+			millisecond: '%A, %b %e, %H:%M:%S.%L',
+			second: '%A, %b %e, %H:%M:%S',
+			minute: '%A, %b %e, %H:%M',
+			hour: '%A, %b %e, %H:%M',
+			day: '%A, %b %e, %Y',
+			week: 'Week from %A, %b %e, %Y',
+			month: '%B %Y',
+			year: '%Y'
+		},
+		//formatter: defaultFormatter,
+		headerFormat: '<span style="font-size: 10px">{point.key}</span><br/>',
+		pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b><br/>',
+		shadow: true,
+		shared: useCanVG,
+		snap: isTouchDevice ? 25 : 10,
+		style: {
+			color: '#333333',
+			fontSize: '12px',
+			padding: '5px',
+			whiteSpace: 'nowrap'
+		}
+		//xDateFormat: '%A, %b %e, %Y',
+		//valueDecimals: null,
+		//valuePrefix: '',
+		//valueSuffix: ''
+	},
+
+	credits: {
+		enabled: true,
+		text: 'Highcharts.com',
+		href: 'http://www.highcharts.com',
+		position: {
+			align: 'right',
+			x: -10,
+			verticalAlign: 'bottom',
+			y: -5
+		},
+		style: {
+			cursor: 'pointer',
+			color: '#909090',
+			fontSize: '10px'
+		}
+	}
+};
+
+
+
+
+// Series defaults
+var defaultPlotOptions = defaultOptions.plotOptions,
+	defaultSeriesOptions = defaultPlotOptions.line;
+
+// set the default time methods
+setTimeMethods();
+
+
+
+/**
+ * Set the time methods globally based on the useUTC option. Time method can be either
+ * local time or UTC (default).
+ */
+function setTimeMethods() {
+	var useUTC = defaultOptions.global.useUTC,
+		GET = useUTC ? 'getUTC' : 'get',
+		SET = useUTC ? 'setUTC' : 'set';
+
+	makeTime = useUTC ? Date.UTC : function (year, month, date, hours, minutes, seconds) {
+		return new Date(
+			year,
+			month,
+			pick(date, 1),
+			pick(hours, 0),
+			pick(minutes, 0),
+			pick(seconds, 0)
+		).getTime();
+	};
+	getMinutes =  GET + 'Minutes';
+	getHours =    GET + 'Hours';
+	getDay =      GET + 'Day';
+	getDate =     GET + 'Date';
+	getMonth =    GET + 'Month';
+	getFullYear = GET + 'FullYear';
+	setMinutes =  SET + 'Minutes';
+	setHours =    SET + 'Hours';
+	setDate =     SET + 'Date';
+	setMonth =    SET + 'Month';
+	setFullYear = SET + 'FullYear';
+
+}
+
+/**
+ * Merge the default options with custom options and return the new options structure
+ * @param {Object} options The new custom options
+ */
+function setOptions(options) {
+	
+	// Pull out axis options and apply them to the respective default axis options 
+	/*defaultXAxisOptions = merge(defaultXAxisOptions, options.xAxis);
+	defaultYAxisOptions = merge(defaultYAxisOptions, options.yAxis);
+	options.xAxis = options.yAxis = UNDEFINED;*/
+	
+	// Merge in the default options
+	defaultOptions = merge(defaultOptions, options);
+	
+	// Apply UTC
+	setTimeMethods();
+
+	return defaultOptions;
+}
+
+/**
+ * Get the updated default options. Merely exposing defaultOptions for outside modules
+ * isn't enough because the setOptions method creates a new object.
+ */
+function getOptions() {
+	return defaultOptions;
+}
+
+
+
+/**
+ * Handle color operations. The object methods are chainable.
+ * @param {String} input The input color in either rbga or hex format
+ */
+var Color = function (input) {
+	// declare variables
+	var rgba = [], result;
+
+	/**
+	 * Parse the input color to rgba array
+	 * @param {String} input
+	 */
+	function init(input) {
+
+		// rgba
+		result = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(input);
+		if (result) {
+			rgba = [pInt(result[1]), pInt(result[2]), pInt(result[3]), parseFloat(result[4], 10)];
+		} else { // hex
+			result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(input);
+			if (result) {
+				rgba = [pInt(result[1], 16), pInt(result[2], 16), pInt(result[3], 16), 1];
+			}
+		}
+
+	}
+	/**
+	 * Return the color a specified format
+	 * @param {String} format
+	 */
+	function get(format) {
+		var ret;
+
+		// it's NaN if gradient colors on a column chart
+		if (rgba && !isNaN(rgba[0])) {
+			if (format === 'rgb') {
+				ret = 'rgb(' + rgba[0] + ',' + rgba[1] + ',' + rgba[2] + ')';
+			} else if (format === 'a') {
+				ret = rgba[3];
+			} else {
+				ret = 'rgba(' + rgba.join(',') + ')';
+			}
+		} else {
+			ret = input;
+		}
+		return ret;
+	}
+
+	/**
+	 * Brighten the color
+	 * @param {Number} alpha
+	 */
+	function brighten(alpha) {
+		if (isNumber(alpha) && alpha !== 0) {
+			var i;
+			for (i = 0; i < 3; i++) {
+				rgba[i] += pInt(alpha * 255);
+
+				if (rgba[i] < 0) {
+					rgba[i] = 0;
+				}
+				if (rgba[i] > 255) {
+					rgba[i] = 255;
+				}
+			}
+		}
+		return this;
+	}
+	/**
+	 * Set the color's opacity to a given alpha value
+	 * @param {Number} alpha
+	 */
+	function setOpacity(alpha) {
+		rgba[3] = alpha;
+		return this;
+	}
+
+	// initialize: parse the input
+	init(input);
+
+	// public methods
+	return {
+		get: get,
+		brighten: brighten,
+		setOpacity: setOpacity
+	};
+};
+
+
+/**
+ * A wrapper object for SVG elements
+ */
+function SVGElement() {}
+
+SVGElement.prototype = {
+	/**
+	 * Initialize the SVG renderer
+	 * @param {Object} renderer
+	 * @param {String} nodeName
+	 */
+	init: function (renderer, nodeName) {
+		var wrapper = this;
+		wrapper.element = nodeName === 'span' ?
+			createElement(nodeName) :
+			doc.createElementNS(SVG_NS, nodeName);
+		wrapper.renderer = renderer;
+		/**
+		 * A collection of attribute setters. These methods, if defined, are called right before a certain
+		 * attribute is set on an element wrapper. Returning false prevents the default attribute
+		 * setter to run. Returning a value causes the default setter to set that value. Used in
+		 * Renderer.label.
+		 */
+		wrapper.attrSetters = {};
+	},
+	/**
+	 * Animate a given attribute
+	 * @param {Object} params
+	 * @param {Number} options The same options as in jQuery animation
+	 * @param {Function} complete Function to perform at the end of animation
+	 */
+	animate: function (params, options, complete) {
+		var animOptions = pick(options, globalAnimation, true);
+		stop(this); // stop regardless of animation actually running, or reverting to .attr (#607)
+		if (animOptions) {
+			animOptions = merge(animOptions);
+			if (complete) { // allows using a callback with the global animation without overwriting it
+				animOptions.complete = complete;
+			}
+			animate(this, params, animOptions);
+		} else {
+			this.attr(params);
+			if (complete) {
+				complete();
+			}
+		}
+	},
+	/**
+	 * Set or get a given attribute
+	 * @param {Object|String} hash
+	 * @param {Mixed|Undefined} val
+	 */
+	attr: function (hash, val) {
+		var wrapper = this,
+			key,
+			value,
+			result,
+			i,
+			child,
+			element = wrapper.element,
+			nodeName = element.nodeName.toLowerCase(), // Android2 requires lower for "text"
+			renderer = wrapper.renderer,
+			skipAttr,
+			titleNode,
+			attrSetters = wrapper.attrSetters,
+			shadows = wrapper.shadows,
+			hasSetSymbolSize,
+			doTransform,
+			ret = wrapper;
+
+		// single key-value pair
+		if (isString(hash) && defined(val)) {
+			key = hash;
+			hash = {};
+			hash[key] = val;
+		}
+
+		// used as a getter: first argument is a string, second is undefined
+		if (isString(hash)) {
+			key = hash;
+			if (nodeName === 'circle') {
+				key = { x: 'cx', y: 'cy' }[key] || key;
+			} else if (key === 'strokeWidth') {
+				key = 'stroke-width';
+			}
+			ret = attr(element, key) || wrapper[key] || 0;
+
+			if (key !== 'd' && key !== 'visibility') { // 'd' is string in animation step
+				ret = parseFloat(ret);
+			}
+
+		// setter
+		} else {
+
+			for (key in hash) {
+				skipAttr = false; // reset
+				value = hash[key];
+
+				// check for a specific attribute setter
+				result = attrSetters[key] && attrSetters[key].call(wrapper, value, key);
+
+				if (result !== false) {
+					if (result !== UNDEFINED) {
+						value = result; // the attribute setter has returned a new value to set
+					}
+
+					// paths
+					if (key === 'd') {
+						if (value && value.join) { // join path
+							value = value.join(' ');
+						}
+						if (/(NaN| {2}|^$)/.test(value)) {
+							value = 'M 0 0';
+						}
+						//wrapper.d = value; // shortcut for animations
+
+					// update child tspans x values
+					} else if (key === 'x' && nodeName === 'text') {
+						for (i = 0; i < element.childNodes.length; i++) {
+							child = element.childNodes[i];
+							// if the x values are equal, the tspan represents a linebreak
+							if (attr(child, 'x') === attr(element, 'x')) {
+								//child.setAttribute('x', value);
+								attr(child, 'x', value);
+							}
+						}
+
+						if (wrapper.rotation) {
+							attr(element, 'transform', 'rotate(' + wrapper.rotation + ' ' + value + ' ' +
+								pInt(hash.y || attr(element, 'y')) + ')');
+						}
+
+					// apply gradients
+					} else if (key === 'fill') {
+						value = renderer.color(value, element, key);
+
+					// circle x and y
+					} else if (nodeName === 'circle' && (key === 'x' || key === 'y')) {
+						key = { x: 'cx', y: 'cy' }[key] || key;
+
+					// rectangle border radius
+					} else if (nodeName === 'rect' && key === 'r') {
+						attr(element, {
+							rx: value,
+							ry: value
+						});
+						skipAttr = true;
+
+					// translation and text rotation
+					} else if (key === 'translateX' || key === 'translateY' || key === 'rotation' || key === 'verticalAlign') {
+						doTransform = true;
+						skipAttr = true;
+
+					// apply opacity as subnode (required by legacy WebKit and Batik)
+					} else if (key === 'stroke') {
+						value = renderer.color(value, element, key);
+
+					// emulate VML's dashstyle implementation
+					} else if (key === 'dashstyle') {
+						key = 'stroke-dasharray';
+						value = value && value.toLowerCase();
+						if (value === 'solid') {
+							value = NONE;
+						} else if (value) {
+							value = value
+								.replace('shortdashdotdot', '3,1,1,1,1,1,')
+								.replace('shortdashdot', '3,1,1,1')
+								.replace('shortdot', '1,1,')
+								.replace('shortdash', '3,1,')
+								.replace('longdash', '8,3,')
+								.replace(/dot/g, '1,3,')
+								.replace('dash', '4,3,')
+								.replace(/,$/, '')
+								.split(','); // ending comma
+
+							i = value.length;
+							while (i--) {
+								value[i] = pInt(value[i]) * hash['stroke-width'];
+							}
+							value = value.join(',');
+						}
+
+					// special
+					} else if (key === 'isTracker') {
+						wrapper[key] = value;
+
+					// IE9/MooTools combo: MooTools returns objects instead of numbers and IE9 Beta 2
+					// is unable to cast them. Test again with final IE9.
+					} else if (key === 'width') {
+						value = pInt(value);
+
+					// Text alignment
+					} else if (key === 'align') {
+						key = 'text-anchor';
+						value = { left: 'start', center: 'middle', right: 'end' }[value];
+
+					// Title requires a subnode, #431
+					} else if (key === 'title') {
+						titleNode = element.getElementsByTagName('title')[0];
+						if (!titleNode) {
+							titleNode = doc.createElementNS(SVG_NS, 'title');
+							element.appendChild(titleNode);
+						}
+						titleNode.textContent = value;
+					}
+
+					// jQuery animate changes case
+					if (key === 'strokeWidth') {
+						key = 'stroke-width';
+					}
+
+					// Chrome/Win < 6 bug (http://code.google.com/p/chromium/issues/detail?id=15461), #1369
+					if (key === 'stroke-width' && value === 0 && (isWebKit || renderer.forExport)) {
+						value = 0.000001;
+					}
+
+					// symbols
+					if (wrapper.symbolName && /^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(key)) {
+
+
+						if (!hasSetSymbolSize) {
+							wrapper.symbolAttr(hash);
+							hasSetSymbolSize = true;
+						}
+						skipAttr = true;
+					}
+
+					// let the shadow follow the main element
+					if (shadows && /^(width|height|visibility|x|y|d|transform)$/.test(key)) {
+						i = shadows.length;
+						while (i--) {
+							attr(
+								shadows[i], 
+								key, 
+								key === 'height' ? 
+									mathMax(value - (shadows[i].cutHeight || 0), 0) :
+									value
+							);
+						}
+					}
+
+					// validate heights
+					if ((key === 'width' || key === 'height') && nodeName === 'rect' && value < 0) {
+						value = 0;
+					}
+
+					// Record for animation and quick access without polling the DOM
+					wrapper[key] = value;
+					
+					// Update transform
+					if (doTransform) {
+						wrapper.updateTransform();
+					}
+
+
+					if (key === 'text') {
+						// Delete bBox memo when the text changes
+						if (value !== wrapper.textStr) {
+							delete wrapper.bBox;
+						}
+						wrapper.textStr = value;
+						if (wrapper.added) {
+							renderer.buildText(wrapper);
+						}
+					} else if (!skipAttr) {
+						attr(element, key, value);
+					}
+
+				}
+
+			}
+
+		}
+		
+		return ret;
+	},
+
+	/**
+	 * If one of the symbol size affecting parameters are changed,
+	 * check all the others only once for each call to an element's
+	 * .attr() method
+	 * @param {Object} hash
+	 */
+	symbolAttr: function (hash) {
+		var wrapper = this;
+
+		each(['x', 'y', 'r', 'start', 'end', 'width', 'height', 'innerR', 'anchorX', 'anchorY'], function (key) {
+			wrapper[key] = pick(hash[key], wrapper[key]);
+		});
+
+		wrapper.attr({
+			d: wrapper.renderer.symbols[wrapper.symbolName](wrapper.x, wrapper.y, wrapper.width, wrapper.height, wrapper)
+		});
+	},
+
+	/**
+	 * Apply a clipping path to this object
+	 * @param {String} id
+	 */
+	clip: function (clipRect) {
+		return this.attr('clip-path', clipRect ? 'url(' + this.renderer.url + '#' + clipRect.id + ')' : NONE);
+	},
+
+	/**
+	 * Calculate the coordinates needed for drawing a rectangle crisply and return the
+	 * calculated attributes
+	 * @param {Number} strokeWidth
+	 * @param {Number} x
+	 * @param {Number} y
+	 * @param {Number} width
+	 * @param {Number} height
+	 */
+	crisp: function (strokeWidth, x, y, width, height) {
+
+		var wrapper = this,
+			key,
+			attribs = {},
+			values = {},
+			normalizer;
+
+		strokeWidth = strokeWidth || wrapper.strokeWidth || (wrapper.attr && wrapper.attr('stroke-width')) || 0;
+		normalizer = mathRound(strokeWidth) % 2 / 2; // mathRound because strokeWidth can sometimes have roundoff errors
+
+		// normalize for crisp edges
+		values.x = mathFloor(x || wrapper.x || 0) + normalizer;
+		values.y = mathFloor(y || wrapper.y || 0) + normalizer;
+		values.width = mathFloor((width || wrapper.width || 0) - 2 * normalizer);
+		values.height = mathFloor((height || wrapper.height || 0) - 2 * normalizer);
+		values.strokeWidth = strokeWidth;
+
+		for (key in values) {
+			if (wrapper[key] !== values[key]) { // only set attribute if changed
+				wrapper[key] = attribs[key] = values[key];
+			}
+		}
+
+		return attribs;
+	},
+
+	/**
+	 * Set styles for the element
+	 * @param {Object} styles
+	 */
+	css: function (styles) {
+		/*jslint unparam: true*//* allow unused param a in the regexp function below */
+		var elemWrapper = this,
+			elem = elemWrapper.element,
+			textWidth = styles && styles.width && elem.nodeName.toLowerCase() === 'text',
+			n,
+			serializedCss = '',
+			hyphenate = function (a, b) { return '-' + b.toLowerCase(); };
+		/*jslint unparam: false*/
+
+		// convert legacy
+		if (styles && styles.color) {
+			styles.fill = styles.color;
+		}
+
+		// Merge the new styles with the old ones
+		styles = extend(
+			elemWrapper.styles,
+			styles
+		);
+
+		// store object
+		elemWrapper.styles = styles;
+		
+		
+		// Don't handle line wrap on canvas
+		if (useCanVG && textWidth) {
+			delete styles.width;
+		}
+			
+		// serialize and set style attribute
+		if (isIE && !hasSVG) { // legacy IE doesn't support setting style attribute
+			if (textWidth) {
+				delete styles.width;
+			}
+			css(elemWrapper.element, styles);
+		} else {
+			for (n in styles) {
+				serializedCss += n.replace(/([A-Z])/g, hyphenate) + ':' + styles[n] + ';';
+			}
+			elemWrapper.attr({
+				style: serializedCss
+			});
+		}
+
+
+		// re-build text
+		if (textWidth && elemWrapper.added) {
+			elemWrapper.renderer.buildText(elemWrapper);
+		}
+
+		return elemWrapper;
+	},
+
+	/**
+	 * Add an event listener
+	 * @param {String} eventType
+	 * @param {Function} handler
+	 */
+	on: function (eventType, handler) {
+		// touch
+		if (hasTouch && eventType === 'click') {
+			this.element.ontouchstart = function (e) {
+				e.preventDefault();
+				handler();
+			};
+		}
+		// simplest possible event model for internal use
+		this.element['on' + eventType] = handler;
+		return this;
+	},
+	
+	/**
+	 * Set the coordinates needed to draw a consistent radial gradient across
+	 * pie slices regardless of positioning inside the chart. The format is
+	 * [centerX, centerY, diameter] in pixels.
+	 */
+	setRadialReference: function (coordinates) {
+		this.element.radialReference = coordinates;
+		return this;
+	},
+
+	/**
+	 * Move an object and its children by x and y values
+	 * @param {Number} x
+	 * @param {Number} y
+	 */
+	translate: function (x, y) {
+		return this.attr({
+			translateX: x,
+			translateY: y
+		});
+	},
+
+	/**
+	 * Invert a group, rotate and flip
+	 */
+	invert: function () {
+		var wrapper = this;
+		wrapper.inverted = true;
+		wrapper.updateTransform();
+		return wrapper;
+	},
+
+	/**
+	 * Apply CSS to HTML elements. This is used in text within SVG rendering and
+	 * by the VML renderer
+	 */
+	htmlCss: function (styles) {
+		var wrapper = this,
+			element = wrapper.element,
+			textWidth = styles && element.tagName === 'SPAN' && styles.width;
+
+		if (textWidth) {
+			delete styles.width;
+			wrapper.textWidth = textWidth;
+			wrapper.updateTransform();
+		}
+
+		wrapper.styles = extend(wrapper.styles, styles);
+		css(wrapper.element, styles);
+
+		return wrapper;
+	},
+
+
+
+	/**
+	 * VML and useHTML method for calculating the bounding box based on offsets
+	 * @param {Boolean} refresh Whether to force a fresh value from the DOM or to
+	 * use the cached value
+	 *
+	 * @return {Object} A hash containing values for x, y, width and height
+	 */
+
+	htmlGetBBox: function () {
+		var wrapper = this,
+			element = wrapper.element,
+			bBox = wrapper.bBox;
+
+		// faking getBBox in exported SVG in legacy IE
+		if (!bBox) {
+			// faking getBBox in exported SVG in legacy IE (is this a duplicate of the fix for #1079?)
+			if (element.nodeName === 'text') {
+				element.style.position = ABSOLUTE;
+			}
+
+			bBox = wrapper.bBox = {
+				x: element.offsetLeft,
+				y: element.offsetTop,
+				width: element.offsetWidth,
+				height: element.offsetHeight
+			};
+		}
+
+		return bBox;
+	},
+
+	/**
+	 * VML override private method to update elements based on internal
+	 * properties based on SVG transform
+	 */
+	htmlUpdateTransform: function () {
+		// aligning non added elements is expensive
+		if (!this.added) {
+			this.alignOnAdd = true;
+			return;
+		}
+
+		var wrapper = this,
+			renderer = wrapper.renderer,
+			elem = wrapper.element,
+			translateX = wrapper.translateX || 0,
+			translateY = wrapper.translateY || 0,
+			x = wrapper.x || 0,
+			y = wrapper.y || 0,
+			align = wrapper.textAlign || 'left',
+			alignCorrection = { left: 0, center: 0.5, right: 1 }[align],
+			nonLeft = align && align !== 'left',
+			shadows = wrapper.shadows;
+
+		// apply translate
+		if (translateX || translateY) {
+			css(elem, {
+				marginLeft: translateX,
+				marginTop: translateY
+			});
+			if (shadows) { // used in labels/tooltip
+				each(shadows, function (shadow) {
+					css(shadow, {
+						marginLeft: translateX + 1,
+						marginTop: translateY + 1
+					});
+				});
+			}
+		}
+
+		// apply inversion
+		if (wrapper.inverted) { // wrapper is a group
+			each(elem.childNodes, function (child) {
+				renderer.invertChild(child, elem);
+			});
+		}
+
+		if (elem.tagName === 'SPAN') {
+
+			var width, height,
+				rotation = wrapper.rotation,
+				baseline,
+				radians = 0,
+				costheta = 1,
+				sintheta = 0,
+				quad,
+				textWidth = pInt(wrapper.textWidth),
+				xCorr = wrapper.xCorr || 0,
+				yCorr = wrapper.yCorr || 0,
+				currentTextTransform = [rotation, align, elem.innerHTML, wrapper.textWidth].join(','),
+				rotationStyle = {},
+				cssTransformKey;
+
+			if (currentTextTransform !== wrapper.cTT) { // do the calculations and DOM access only if properties changed
+
+				if (defined(rotation)) {
+					
+					if (renderer.isSVG) { // #916
+						cssTransformKey = isIE ? '-ms-transform' : isWebKit ? '-webkit-transform' : isFirefox ? 'MozTransform' : isOpera ? '-o-transform' : '';
+						rotationStyle[cssTransformKey] = rotationStyle.transform = 'rotate(' + rotation + 'deg)';
+						
+					} else {
+						radians = rotation * deg2rad; // deg to rad
+						costheta = mathCos(radians);
+						sintheta = mathSin(radians);
+	
+						// Adjust for alignment and rotation. Rotation of useHTML content is not yet implemented
+						// but it can probably be implemented for Firefox 3.5+ on user request. FF3.5+
+						// has support for CSS3 transform. The getBBox method also needs to be updated
+						// to compensate for the rotation, like it currently does for SVG.
+						// Test case: http://highcharts.com/tests/?file=text-rotation
+						rotationStyle.filter = rotation ? ['progid:DXImageTransform.Microsoft.Matrix(M11=', costheta,
+								', M12=', -sintheta, ', M21=', sintheta, ', M22=', costheta,
+								', sizingMethod=\'auto expand\')'].join('') : NONE;
+					}
+					css(elem, rotationStyle);
+				}
+
+				width = pick(wrapper.elemWidth, elem.offsetWidth);
+				height = pick(wrapper.elemHeight, elem.offsetHeight);
+
+				// update textWidth
+				if (width > textWidth && /[ \-]/.test(elem.textContent || elem.innerText)) { // #983, #1254
+					css(elem, {
+						width: textWidth + PX,
+						display: 'block',
+						whiteSpace: 'normal'
+					});
+					width = textWidth;
+				}
+
+				// correct x and y
+				baseline = renderer.fontMetrics(elem.style.fontSize).b;
+				xCorr = costheta < 0 && -width;
+				yCorr = sintheta < 0 && -height;
+
+				// correct for baseline and corners spilling out after rotation
+				quad = costheta * sintheta < 0;
+				xCorr += sintheta * baseline * (quad ? 1 - alignCorrection : alignCorrection);
+				yCorr -= costheta * baseline * (rotation ? (quad ? alignCorrection : 1 - alignCorrection) : 1);
+
+				// correct for the length/height of the text
+				if (nonLeft) {
+					xCorr -= width * alignCorrection * (costheta < 0 ? -1 : 1);
+					if (rotation) {
+						yCorr -= height * alignCorrection * (sintheta < 0 ? -1 : 1);
+					}
+					css(elem, {
+						textAlign: align
+					});
+				}
+
+				// record correction
+				wrapper.xCorr = xCorr;
+				wrapper.yCorr = yCorr;
+			}
+
+			// apply position with correction
+			css(elem, {
+				left: (x + xCorr) + PX,
+				top: (y + yCorr) + PX
+			});
+			
+			// force reflow in webkit to apply the left and top on useHTML element (#1249)
+			if (isWebKit) {
+				height = elem.offsetHeight; // assigned to height for JSLint purpose
+			}
+
+			// record current text transform
+			wrapper.cTT = currentTextTransform;
+		}
+	},
+
+	/**
+	 * Private method to update the transform attribute based on internal
+	 * properties
+	 */
+	updateTransform: function () {
+		var wrapper = this,
+			translateX = wrapper.translateX || 0,
+			translateY = wrapper.translateY || 0,
+			inverted = wrapper.inverted,
+			rotation = wrapper.rotation,
+			transform = [];
+
+		// flipping affects translate as adjustment for flipping around the group's axis
+		if (inverted) {
+			translateX += wrapper.attr('width');
+			translateY += wrapper.attr('height');
+		}
+
+		// apply translate
+		if (translateX || translateY) {
+			transform.push('translate(' + translateX + ',' + translateY + ')');
+		}
+
+		// apply rotation
+		if (inverted) {
+			transform.push('rotate(90) scale(-1,1)');
+		} else if (rotation) { // text rotation
+			transform.push('rotate(' + rotation + ' ' + (wrapper.x || 0) + ' ' + (wrapper.y || 0) + ')');
+		}
+
+		if (transform.length) {
+			attr(wrapper.element, 'transform', transform.join(' '));
+		}
+	},
+	/**
+	 * Bring the element to the front
+	 */
+	toFront: function () {
+		var element = this.element;
+		element.parentNode.appendChild(element);
+		return this;
+	},
+
+
+	/**
+	 * Break down alignment options like align, verticalAlign, x and y
+	 * to x and y relative to the chart.
+	 *
+	 * @param {Object} alignOptions
+	 * @param {Boolean} alignByTranslate
+	 * @param {Object} box The box to align to, needs a width and height
+	 *
+	 */
+	align: function (alignOptions, alignByTranslate, box) {
+		var elemWrapper = this;
+
+		if (!alignOptions) { // called on resize
+			alignOptions = elemWrapper.alignOptions;
+			alignByTranslate = elemWrapper.alignByTranslate;
+		} else { // first call on instanciate
+			elemWrapper.alignOptions = alignOptions;
+			elemWrapper.alignByTranslate = alignByTranslate;
+			if (!box) { // boxes other than renderer handle this internally
+				elemWrapper.renderer.alignedObjects.push(elemWrapper);
+			}
+		}
+
+		box = pick(box, elemWrapper.renderer);
+
+		var align = alignOptions.align,
+			vAlign = alignOptions.verticalAlign,
+			x = (box.x || 0) + (alignOptions.x || 0), // default: left align
+			y = (box.y || 0) + (alignOptions.y || 0), // default: top align
+			attribs = {};
+
+
+		// align
+		if (align === 'right' || align === 'center') {
+			x += (box.width - (alignOptions.width || 0)) /
+					{ right: 1, center: 2 }[align];
+		}
+		attribs[alignByTranslate ? 'translateX' : 'x'] = mathRound(x);
+
+
+		// vertical align
+		if (vAlign === 'bottom' || vAlign === 'middle') {
+			y += (box.height - (alignOptions.height || 0)) /
+					({ bottom: 1, middle: 2 }[vAlign] || 1);
+
+		}
+		attribs[alignByTranslate ? 'translateY' : 'y'] = mathRound(y);
+
+		// animate only if already placed
+		elemWrapper[elemWrapper.placed ? 'animate' : 'attr'](attribs);
+		elemWrapper.placed = true;
+		elemWrapper.alignAttr = attribs;
+
+		return elemWrapper;
+	},
+
+	/**
+	 * Get the bounding box (width, height, x and y) for the element
+	 */
+	getBBox: function () {
+		var wrapper = this,
+			bBox = wrapper.bBox,
+			renderer = wrapper.renderer,
+			width,
+			height,
+			rotation = wrapper.rotation,
+			element = wrapper.element,
+			styles = wrapper.styles,
+			rad = rotation * deg2rad;
+			
+		if (!bBox) {
+			// SVG elements
+			if (element.namespaceURI === SVG_NS || renderer.forExport) {
+				try { // Fails in Firefox if the container has display: none.
+					
+					bBox = element.getBBox ?
+						// SVG: use extend because IE9 is not allowed to change width and height in case
+						// of rotation (below)
+						extend({}, element.getBBox()) :
+						// Canvas renderer and legacy IE in export mode
+						{
+							width: element.offsetWidth,
+							height: element.offsetHeight
+						};
+				} catch (e) {}
+				
+				// If the bBox is not set, the try-catch block above failed. The other condition
+				// is for Opera that returns a width of -Infinity on hidden elements.
+				if (!bBox || bBox.width < 0) {
+					bBox = { width: 0, height: 0 };
+				}
+				
+	
+			// VML Renderer or useHTML within SVG
+			} else {
+				
+				bBox = wrapper.htmlGetBBox();
+				
+			}
+			
+			// True SVG elements as well as HTML elements in modern browsers using the .useHTML option
+			// need to compensated for rotation
+			if (renderer.isSVG) {
+				width = bBox.width;
+				height = bBox.height;
+				
+				// Workaround for wrong bounding box in IE9 and IE10 (#1101)
+				if (isIE && styles && styles.fontSize === '11px' && height === 22.700000762939453) {
+					bBox.height = height = 14;
+				}
+			
+				// Adjust for rotated text
+				if (rotation) {
+					bBox.width = mathAbs(height * mathSin(rad)) + mathAbs(width * mathCos(rad));
+					bBox.height = mathAbs(height * mathCos(rad)) + mathAbs(width * mathSin(rad));
+				}
+			}
+			
+			wrapper.bBox = bBox;
+		}
+		return bBox;
+	},
+
+	/**
+	 * Show the element
+	 */
+	show: function () {
+		return this.attr({ visibility: VISIBLE });
+	},
+
+	/**
+	 * Hide the element
+	 */
+	hide: function () {
+		return this.attr({ visibility: HIDDEN });
+	},
+	
+	/**
+	 * Add the element
+	 * @param {Object|Undefined} parent Can be an element, an element wrapper or undefined
+	 *    to append the element to the renderer.box.
+	 */
+	add: function (parent) {
+
+		var renderer = this.renderer,
+			parentWrapper = parent || renderer,
+			parentNode = parentWrapper.element || renderer.box,
+			childNodes = parentNode.childNodes,
+			element = this.element,
+			zIndex = attr(element, 'zIndex'),
+			otherElement,
+			otherZIndex,
+			i,
+			inserted;
+			
+		if (parent) {
+			this.parentGroup = parent;
+		}
+
+		// mark as inverted
+		this.parentInverted = parent && parent.inverted;
+
+		// build formatted text
+		if (this.textStr !== undefined) {
+			renderer.buildText(this);
+		}
+
+		// mark the container as having z indexed children
+		if (zIndex) {
+			parentWrapper.handleZ = true;
+			zIndex = pInt(zIndex);
+		}
+
+		// insert according to this and other elements' zIndex
+		if (parentWrapper.handleZ) { // this element or any of its siblings has a z index
+			for (i = 0; i < childNodes.length; i++) {
+				otherElement = childNodes[i];
+				otherZIndex = attr(otherElement, 'zIndex');
+				if (otherElement !== element && (
+						// insert before the first element with a higher zIndex
+						pInt(otherZIndex) > zIndex ||
+						// if no zIndex given, insert before the first element with a zIndex
+						(!defined(zIndex) && defined(otherZIndex))
+
+						)) {
+					parentNode.insertBefore(element, otherElement);
+					inserted = true;
+					break;
+				}
+			}
+		}
+
+		// default: append at the end
+		if (!inserted) {
+			parentNode.appendChild(element);
+		}
+
+		// mark as added
+		this.added = true;
+
+		// fire an event for internal hooks
+		fireEvent(this, 'add');
+
+		return this;
+	},
+
+	/**
+	 * Removes a child either by removeChild or move to garbageBin.
+	 * Issue 490; in VML removeChild results in Orphaned nodes according to sIEve, discardElement does not.
+	 */
+	safeRemoveChild: function (element) {
+		var parentNode = element.parentNode;
+		if (parentNode) {
+			parentNode.removeChild(element);
+		}
+	},
+
+	/**
+	 * Destroy the element and element wrapper
+	 */
+	destroy: function () {
+		var wrapper = this,
+			element = wrapper.element || {},
+			shadows = wrapper.shadows,
+			key,
+			i;
+
+		// remove events
+		element.onclick = element.onmouseout = element.onmouseover = element.onmousemove = null;
+		stop(wrapper); // stop running animations
+
+		if (wrapper.clipPath) {
+			wrapper.clipPath = wrapper.clipPath.destroy();
+		}
+
+		// Destroy stops in case this is a gradient object
+		if (wrapper.stops) {
+			for (i = 0; i < wrapper.stops.length; i++) {
+				wrapper.stops[i] = wrapper.stops[i].destroy();
+			}
+			wrapper.stops = null;
+		}
+
+		// remove element
+		wrapper.safeRemoveChild(element);
+
+		// destroy shadows
+		if (shadows) {
+			each(shadows, function (shadow) {
+				wrapper.safeRemoveChild(shadow);
+			});
+		}
+
+		// remove from alignObjects
+		erase(wrapper.renderer.alignedObjects, wrapper);
+
+		for (key in wrapper) {
+			delete wrapper[key];
+		}
+
+		return null;
+	},
+
+	/**
+	 * Empty a group element
+	 */
+	empty: function () {
+		var element = this.element,
+			childNodes = element.childNodes,
+			i = childNodes.length;
+
+		while (i--) {
+			element.removeChild(childNodes[i]);
+		}
+	},
+
+	/**
+	 * Add a shadow to the element. Must be done after the element is added to the DOM
+	 * @param {Boolean|Object} shadowOptions
+	 */
+	shadow: function (shadowOptions, group, cutOff) {
+		var shadows = [],
+			i,
+			shadow,
+			element = this.element,
+			strokeWidth,
+			shadowWidth,
+			shadowElementOpacity,
+
+			// compensate for inverted plot area
+			transform;
+
+
+		if (shadowOptions) {
+			shadowWidth = pick(shadowOptions.width, 3);
+			shadowElementOpacity = (shadowOptions.opacity || 0.15) / shadowWidth;
+			transform = this.parentInverted ? 
+				'(-1,-1)' : 
+				'(' + pick(shadowOptions.offsetX, 1) + ', ' + pick(shadowOptions.offsetY, 1) + ')';
+			for (i = 1; i <= shadowWidth; i++) {
+				shadow = element.cloneNode(0);
+				strokeWidth = (shadowWidth * 2) + 1 - (2 * i);
+				attr(shadow, {
+					'isShadow': 'true',
+					'stroke': shadowOptions.color || 'black',
+					'stroke-opacity': shadowElementOpacity * i,
+					'stroke-width': strokeWidth,
+					'transform': 'translate' + transform,
+					'fill': NONE
+				});
+				if (cutOff) {
+					attr(shadow, 'height', mathMax(attr(shadow, 'height') - strokeWidth, 0));
+					shadow.cutHeight = strokeWidth;
+				}
+
+				if (group) {
+					group.element.appendChild(shadow);
+				} else {
+					element.parentNode.insertBefore(shadow, element);
+				}
+
+				shadows.push(shadow);
+			}
+
+			this.shadows = shadows;
+		}
+		return this;
+
+	}
+};
+
+
+/**
+ * The default SVG renderer
+ */
+var SVGRenderer = function () {
+	this.init.apply(this, arguments);
+};
+SVGRenderer.prototype = {
+	Element: SVGElement,
+
+	/**
+	 * Initialize the SVGRenderer
+	 * @param {Object} container
+	 * @param {Number} width
+	 * @param {Number} height
+	 * @param {Boolean} forExport
+	 */
+	init: function (container, width, height, forExport) {
+		var renderer = this,
+			loc = location,
+			boxWrapper;
+
+		boxWrapper = renderer.createElement('svg')
+			.attr({
+				xmlns: SVG_NS,
+				version: '1.1'
+			});
+		container.appendChild(boxWrapper.element);
+
+		// object properties
+		renderer.isSVG = true;
+		renderer.box = boxWrapper.element;
+		renderer.boxWrapper = boxWrapper;
+		renderer.alignedObjects = [];
+		
+		// Page url used for internal references. #24, #672, #1070
+		renderer.url = (isFirefox || isWebKit) && doc.getElementsByTagName('base').length ? 
+			loc.href
+				.replace(/#.*?$/, '') // remove the hash
+				.replace(/([\('\)])/g, '\\$1') // escape parantheses and quotes
+				.replace(/ /g, '%20') : // replace spaces (needed for Safari only)
+			''; 
+			
+		renderer.defs = this.createElement('defs').add();
+		renderer.forExport = forExport;
+		renderer.gradients = {}; // Object where gradient SvgElements are stored
+
+		renderer.setSize(width, height, false);
+
+
+
+		// Issue 110 workaround:
+		// In Firefox, if a div is positioned by percentage, its pixel position may land
+		// between pixels. The container itself doesn't display this, but an SVG element
+		// inside this container will be drawn at subpixel precision. In order to draw
+		// sharp lines, this must be compensated for. This doesn't seem to work inside
+		// iframes though (like in jsFiddle).
+		var subPixelFix, rect;
+		if (isFirefox && container.getBoundingClientRect) {
+			renderer.subPixelFix = subPixelFix = function () {
+				css(container, { left: 0, top: 0 });
+				rect = container.getBoundingClientRect();
+				css(container, {
+					left: (mathCeil(rect.left) - rect.left) + PX,
+					top: (mathCeil(rect.top) - rect.top) + PX
+				});
+			};
+
+			// run the fix now
+			subPixelFix();
+
+			// run it on resize
+			addEvent(win, 'resize', subPixelFix);
+		}
+	},
+
+	/**
+	 * Detect whether the renderer is hidden. This happens when one of the parent elements
+	 * has display: none. #608.
+	 */
+	isHidden: function () {
+		return !this.boxWrapper.getBBox().width;			
+	},
+
+	/**
+	 * Destroys the renderer and its allocated members.
+	 */
+	destroy: function () {
+		var renderer = this,
+			rendererDefs = renderer.defs;
+		renderer.box = null;
+		renderer.boxWrapper = renderer.boxWrapper.destroy();
+
+		// Call destroy on all gradient elements
+		destroyObjectProperties(renderer.gradients || {});
+		renderer.gradients = null;
+
+		// Defs are null in VMLRenderer
+		// Otherwise, destroy them here.
+		if (rendererDefs) {
+			renderer.defs = rendererDefs.destroy();
+		}
+
+		// Remove sub pixel fix handler
+		// We need to check that there is a handler, otherwise all functions that are registered for event 'resize' are removed
+		// See issue #982
+		if (renderer.subPixelFix) {
+			removeEvent(win, 'resize', renderer.subPixelFix);
+		}
+
+		renderer.alignedObjects = null;
+
+		return null;
+	},
+
+	/**
+	 * Create a wrapper for an SVG element
+	 * @param {Object} nodeName
+	 */
+	createElement: function (nodeName) {
+		var wrapper = new this.Element();
+		wrapper.init(this, nodeName);
+		return wrapper;
+	},
+
+	/**
+	 * Dummy function for use in canvas renderer
+	 */
+	draw: function () {},
+
+	/**
+	 * Parse a simple HTML string into SVG tspans
+	 *
+	 * @param {Object} textNode The parent text SVG node
+	 */
+	buildText: function (wrapper) {
+		var textNode = wrapper.element,
+			lines = pick(wrapper.textStr, '').toString()
+				.replace(/<(b|strong)>/g, '<span style="font-weight:bold">')
+				.replace(/<(i|em)>/g, '<span style="font-style:italic">')
+				.replace(/<a/g, '<span')
+				.replace(/<\/(b|strong|i|em|a)>/g, '</span>')
+				.split(/<br.*?>/g),
+			childNodes = textNode.childNodes,
+			styleRegex = /style="([^"]+)"/,
+			hrefRegex = /href="([^"]+)"/,
+			parentX = attr(textNode, 'x'),
+			textStyles = wrapper.styles,
+			width = textStyles && textStyles.width && pInt(textStyles.width),
+			textLineHeight = textStyles && textStyles.lineHeight,
+			lastLine,
+			GET_COMPUTED_STYLE = 'getComputedStyle',
+			i = childNodes.length,
+			linePositions = [];
+		
+		// Needed in IE9 because it doesn't report tspan's offsetHeight (#893)
+		function getLineHeightByBBox(lineNo) {
+			linePositions[lineNo] = textNode.getBBox ?
+				textNode.getBBox().height :
+				wrapper.renderer.fontMetrics(textNode.style.fontSize).h; // #990
+			return mathRound(linePositions[lineNo] - (linePositions[lineNo - 1] || 0));
+		}
+
+		// remove old text
+		while (i--) {
+			textNode.removeChild(childNodes[i]);
+		}
+
+		if (width && !wrapper.added) {
+			this.box.appendChild(textNode); // attach it to the DOM to read offset width
+		}
+
+		// remove empty line at end
+		if (lines[lines.length - 1] === '') {
+			lines.pop();
+		}
+
+		// build the lines
+		each(lines, function (line, lineNo) {
+			var spans, spanNo = 0, lineHeight;
+
+			line = line.replace(/<span/g, '|||<span').replace(/<\/span>/g, '</span>|||');
+			spans = line.split('|||');
+
+			each(spans, function (span) {
+				if (span !== '' || spans.length === 1) {
+					var attributes = {},
+						tspan = doc.createElementNS(SVG_NS, 'tspan'),
+						spanStyle; // #390
+					if (styleRegex.test(span)) {
+						spanStyle = span.match(styleRegex)[1].replace(/(;| |^)color([ :])/, '$1fill$2');
+						attr(tspan, 'style', spanStyle);
+					}
+					if (hrefRegex.test(span)) {
+						attr(tspan, 'onclick', 'location.href=\"' + span.match(hrefRegex)[1] + '\"');
+						css(tspan, { cursor: 'pointer' });
+					}
+
+					span = (span.replace(/<(.|\n)*?>/g, '') || ' ')
+						.replace(/&lt;/g, '<')
+						.replace(/&gt;/g, '>');
+
+					// issue #38 workaround.
+					/*if (reverse) {
+						arr = [];
+						i = span.length;
+						while (i--) {
+							arr.push(span.charAt(i));
+						}
+						span = arr.join('');
+					}*/
+
+					// add the text node
+					tspan.appendChild(doc.createTextNode(span));
+
+					if (!spanNo) { // first span in a line, align it to the left
+						attributes.x = parentX;
+					} else {
+						// Firefox ignores spaces at the front or end of the tspan
+						attributes.dx = 3; // space
+					}
+
+					// first span on subsequent line, add the line height
+					if (!spanNo) {
+						if (lineNo) {
+
+							// allow getting the right offset height in exporting in IE
+							if (!hasSVG && wrapper.renderer.forExport) {
+								css(tspan, { display: 'block' });
+							}
+
+							// Webkit and opera sometimes return 'normal' as the line height. In that
+							// case, webkit uses offsetHeight, while Opera falls back to 18
+							lineHeight = win[GET_COMPUTED_STYLE] &&
+								pInt(win[GET_COMPUTED_STYLE](lastLine, null).getPropertyValue('line-height'));
+
+							if (!lineHeight || isNaN(lineHeight)) {
+								lineHeight = textLineHeight || lastLine.offsetHeight || getLineHeightByBBox(lineNo) || 18;
+							}
+							attr(tspan, 'dy', lineHeight);
+						}
+						lastLine = tspan; // record for use in next line
+					}
+
+					// add attributes
+					attr(tspan, attributes);
+
+					// append it
+					textNode.appendChild(tspan);
+
+					spanNo++;
+
+					// check width and apply soft breaks
+					if (width) {
+						var words = span.replace(/([^\^])-/g, '$1- ').split(' '), // #1273
+							tooLong,
+							actualWidth,
+							rest = [];
+
+						while (words.length || rest.length) {
+							delete wrapper.bBox; // delete cache
+							actualWidth = wrapper.getBBox().width;
+							tooLong = actualWidth > width;
+							if (!tooLong || words.length === 1) { // new line needed
+								words = rest;
+								rest = [];
+								if (words.length) {
+									tspan = doc.createElementNS(SVG_NS, 'tspan');
+									attr(tspan, {
+										dy: textLineHeight || 16,
+										x: parentX
+									});
+									if (spanStyle) { // #390
+										attr(tspan, 'style', spanStyle);
+									}
+									textNode.appendChild(tspan);
+
+									if (actualWidth > width) { // a single word is pressing it out
+										width = actualWidth;
+									}
+								}
+							} else { // append to existing line tspan
+								tspan.removeChild(tspan.firstChild);
+								rest.unshift(words.pop());
+							}
+							if (words.length) {
+								tspan.appendChild(doc.createTextNode(words.join(' ').replace(/- /g, '-')));
+							}
+						}
+					}
+				}
+			});
+		});
+	},
+
+	/**
+	 * Create a button with preset states
+	 * @param {String} text
+	 * @param {Number} x
+	 * @param {Number} y
+	 * @param {Function} callback
+	 * @param {Object} normalState
+	 * @param {Object} hoverState
+	 * @param {Object} pressedState
+	 */
+	button: function (text, x, y, callback, normalState, hoverState, pressedState) {
+		var label = this.label(text, x, y),
+			curState = 0,
+			stateOptions,
+			stateStyle,
+			normalStyle,
+			hoverStyle,
+			pressedStyle,
+			STYLE = 'style',
+			verticalGradient = { x1: 0, y1: 0, x2: 0, y2: 1 };
+
+		// prepare the attributes
+		/*jslint white: true*/
+		normalState = merge(hash(
+			STROKE_WIDTH, 1,
+			STROKE, '#999',
+			FILL, hash(
+				LINEAR_GRADIENT, verticalGradient,
+				STOPS, [
+					[0, '#FFF'],
+					[1, '#DDD']
+				]
+			),
+			'r', 3,
+			'padding', 3,
+			STYLE, hash(
+				'color', 'black'
+			)
+		), normalState);
+		/*jslint white: false*/
+		normalStyle = normalState[STYLE];
+		delete normalState[STYLE];
+
+		/*jslint white: true*/
+		hoverState = merge(normalState, hash(
+			STROKE, '#68A',
+			FILL, hash(
+				LINEAR_GRADIENT, verticalGradient,
+				STOPS, [
+					[0, '#FFF'],
+					[1, '#ACF']
+				]
+			)
+		), hoverState);
+		/*jslint white: false*/
+		hoverStyle = hoverState[STYLE];
+		delete hoverState[STYLE];
+
+		/*jslint white: true*/
+		pressedState = merge(normalState, hash(
+			STROKE, '#68A',
+			FILL, hash(
+				LINEAR_GRADIENT, verticalGradient,
+				STOPS, [
+					[0, '#9BD'],
+					[1, '#CDF']
+				]
+			)
+		), pressedState);
+		/*jslint white: false*/
+		pressedStyle = pressedState[STYLE];
+		delete pressedState[STYLE];
+
+		// add the events
+		addEvent(label.element, 'mouseenter', function () {
+			label.attr(hoverState)
+				.css(hoverStyle);
+		});
+		addEvent(label.element, 'mouseleave', function () {
+			stateOptions = [normalState, hoverState, pressedState][curState];
+			stateStyle = [normalStyle, hoverStyle, pressedStyle][curState];
+			label.attr(stateOptions)
+				.css(stateStyle);
+		});
+
+		label.setState = function (state) {
+			curState = state;
+			if (!state) {
+				label.attr(normalState)
+					.css(normalStyle);
+			} else if (state === 2) {
+				label.attr(pressedState)
+					.css(pressedStyle);
+			}
+		};
+
+		return label
+			.on('click', function () {
+				callback.call(label);
+			})
+			.attr(normalState)
+			.css(extend({ cursor: 'default' }, normalStyle));
+	},
+
+	/**
+	 * Make a straight line crisper by not spilling out to neighbour pixels
+	 * @param {Array} points
+	 * @param {Number} width
+	 */
+	crispLine: function (points, width) {
+		// points format: [M, 0, 0, L, 100, 0]
+		// normalize to a crisp line
+		if (points[1] === points[4]) {
+			// Substract due to #1129. Now bottom and left axis gridlines behave the same.
+			points[1] = points[4] = mathRound(points[1]) - (width % 2 / 2); 
+		}
+		if (points[2] === points[5]) {
+			points[2] = points[5] = mathRound(points[2]) + (width % 2 / 2);
+		}
+		return points;
+	},
+
+
+	/**
+	 * Draw a path
+	 * @param {Array} path An SVG path in array form
+	 */
+	path: function (path) {
+		var attr = {
+			fill: NONE
+		};
+		if (isArray(path)) {
+			attr.d = path;
+		} else if (isObject(path)) { // attributes
+			extend(attr, path);
+		}
+		return this.createElement('path').attr(attr);
+	},
+
+	/**
+	 * Draw and return an SVG circle
+	 * @param {Number} x The x position
+	 * @param {Number} y The y position
+	 * @param {Number} r The radius
+	 */
+	circle: function (x, y, r) {
+		var attr = isObject(x) ?
+			x :
+			{
+				x: x,
+				y: y,
+				r: r
+			};
+
+		return this.createElement('circle').attr(attr);
+	},
+
+	/**
+	 * Draw and return an arc
+	 * @param {Number} x X position
+	 * @param {Number} y Y position
+	 * @param {Number} r Radius
+	 * @param {Number} innerR Inner radius like used in donut charts
+	 * @param {Number} start Starting angle
+	 * @param {Number} end Ending angle
+	 */
+	arc: function (x, y, r, innerR, start, end) {
+		// arcs are defined as symbols for the ability to set
+		// attributes in attr and animate
+
+		if (isObject(x)) {
+			y = x.y;
+			r = x.r;
+			innerR = x.innerR;
+			start = x.start;
+			end = x.end;
+			x = x.x;
+		}
+		return this.symbol('arc', x || 0, y || 0, r || 0, r || 0, {
+			innerR: innerR || 0,
+			start: start || 0,
+			end: end || 0
+		});
+	},
+	
+	/**
+	 * Draw and return a rectangle
+	 * @param {Number} x Left position
+	 * @param {Number} y Top position
+	 * @param {Number} width
+	 * @param {Number} height
+	 * @param {Number} r Border corner radius
+	 * @param {Number} strokeWidth A stroke width can be supplied to allow crisp drawing
+	 */
+	rect: function (x, y, width, height, r, strokeWidth) {
+		
+		r = isObject(x) ? x.r : r;
+		
+		var wrapper = this.createElement('rect').attr({
+				rx: r,
+				ry: r,
+				fill: NONE
+			});
+		return wrapper.attr(
+				isObject(x) ? 
+					x : 
+					// do not crispify when an object is passed in (as in column charts)
+					wrapper.crisp(strokeWidth, x, y, mathMax(width, 0), mathMax(height, 0))
+			);
+	},
+
+	/**
+	 * Resize the box and re-align all aligned elements
+	 * @param {Object} width
+	 * @param {Object} height
+	 * @param {Boolean} animate
+	 *
+	 */
+	setSize: function (width, height, animate) {
+		var renderer = this,
+			alignedObjects = renderer.alignedObjects,
+			i = alignedObjects.length;
+
+		renderer.width = width;
+		renderer.height = height;
+
+		renderer.boxWrapper[pick(animate, true) ? 'animate' : 'attr']({
+			width: width,


<TRUNCATED>

[14/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.2.5/angular.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.2.5/angular.js b/portal/js/libs/angular-1.2.5/angular.js
new file mode 100755
index 0000000..b27cc84
--- /dev/null
+++ b/portal/js/libs/angular-1.2.5/angular.js
@@ -0,0 +1,20369 @@
+/**
+ * @license AngularJS v1.2.5
+ * (c) 2010-2014 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, document, undefined) {'use strict';
+
+/**
+ * @description
+ *
+ * This object provides a utility for producing rich Error messages within
+ * Angular. It can be called as follows:
+ *
+ * var exampleMinErr = minErr('example');
+ * throw exampleMinErr('one', 'This {0} is {1}', foo, bar);
+ *
+ * The above creates an instance of minErr in the example namespace. The
+ * resulting error will have a namespaced error code of example.one.  The
+ * resulting error will replace {0} with the value of foo, and {1} with the
+ * value of bar. The object is not restricted in the number of arguments it can
+ * take.
+ *
+ * If fewer arguments are specified than necessary for interpolation, the extra
+ * interpolation markers will be preserved in the final string.
+ *
+ * Since data will be parsed statically during a build step, some restrictions
+ * are applied with respect to how minErr instances are created and called.
+ * Instances should have names of the form namespaceMinErr for a minErr created
+ * using minErr('namespace') . Error codes, namespaces and template strings
+ * should all be static strings, not variables or general expressions.
+ *
+ * @param {string} module The namespace to use for the new minErr instance.
+ * @returns {function(string, string, ...): Error} instance
+ */
+
+function minErr(module) {
+  return function () {
+    var code = arguments[0],
+      prefix = '[' + (module ? module + ':' : '') + code + '] ',
+      template = arguments[1],
+      templateArgs = arguments,
+      stringify = function (obj) {
+        if (typeof obj === 'function') {
+          return obj.toString().replace(/ \{[\s\S]*$/, '');
+        } else if (typeof obj === 'undefined') {
+          return 'undefined';
+        } else if (typeof obj !== 'string') {
+          return JSON.stringify(obj);
+        }
+        return obj;
+      },
+      message, i;
+
+    message = prefix + template.replace(/\{\d+\}/g, function (match) {
+      var index = +match.slice(1, -1), arg;
+
+      if (index + 2 < templateArgs.length) {
+        arg = templateArgs[index + 2];
+        if (typeof arg === 'function') {
+          return arg.toString().replace(/ ?\{[\s\S]*$/, '');
+        } else if (typeof arg === 'undefined') {
+          return 'undefined';
+        } else if (typeof arg !== 'string') {
+          return toJson(arg);
+        }
+        return arg;
+      }
+      return match;
+    });
+
+    message = message + '\nhttp://errors.angularjs.org/1.2.5/' +
+      (module ? module + '/' : '') + code;
+    for (i = 2; i < arguments.length; i++) {
+      message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' +
+        encodeURIComponent(stringify(arguments[i]));
+    }
+
+    return new Error(message);
+  };
+}
+
+/* We need to tell jshint what variables are being exported */
+/* global
+    -angular,
+    -msie,
+    -jqLite,
+    -jQuery,
+    -slice,
+    -push,
+    -toString,
+    -ngMinErr,
+    -_angular,
+    -angularModule,
+    -nodeName_,
+    -uid,
+
+    -lowercase,
+    -uppercase,
+    -manualLowercase,
+    -manualUppercase,
+    -nodeName_,
+    -isArrayLike,
+    -forEach,
+    -sortedKeys,
+    -forEachSorted,
+    -reverseParams,
+    -nextUid,
+    -setHashKey,
+    -extend,
+    -int,
+    -inherit,
+    -noop,
+    -identity,
+    -valueFn,
+    -isUndefined,
+    -isDefined,
+    -isObject,
+    -isString,
+    -isNumber,
+    -isDate,
+    -isArray,
+    -isFunction,
+    -isRegExp,
+    -isWindow,
+    -isScope,
+    -isFile,
+    -isBoolean,
+    -trim,
+    -isElement,
+    -makeMap,
+    -map,
+    -size,
+    -includes,
+    -indexOf,
+    -arrayRemove,
+    -isLeafNode,
+    -copy,
+    -shallowCopy,
+    -equals,
+    -csp,
+    -concat,
+    -sliceArgs,
+    -bind,
+    -toJsonReplacer,
+    -toJson,
+    -fromJson,
+    -toBoolean,
+    -startingTag,
+    -tryDecodeURIComponent,
+    -parseKeyValue,
+    -toKeyValue,
+    -encodeUriSegment,
+    -encodeUriQuery,
+    -angularInit,
+    -bootstrap,
+    -snake_case,
+    -bindJQuery,
+    -assertArg,
+    -assertArgFn,
+    -assertNotHasOwnProperty,
+    -getter,
+    -getBlockElements,
+
+*/
+
+////////////////////////////////////
+
+/**
+ * @ngdoc function
+ * @name angular.lowercase
+ * @function
+ *
+ * @description Converts the specified string to lowercase.
+ * @param {string} string String to be converted to lowercase.
+ * @returns {string} Lowercased string.
+ */
+var lowercase = function(string){return isString(string) ? string.toLowerCase() : string;};
+
+
+/**
+ * @ngdoc function
+ * @name angular.uppercase
+ * @function
+ *
+ * @description Converts the specified string to uppercase.
+ * @param {string} string String to be converted to uppercase.
+ * @returns {string} Uppercased string.
+ */
+var uppercase = function(string){return isString(string) ? string.toUpperCase() : string;};
+
+
+var manualLowercase = function(s) {
+  /* jshint bitwise: false */
+  return isString(s)
+      ? s.replace(/[A-Z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) | 32);})
+      : s;
+};
+var manualUppercase = function(s) {
+  /* jshint bitwise: false */
+  return isString(s)
+      ? s.replace(/[a-z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) & ~32);})
+      : s;
+};
+
+
+// String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish
+// locale, for this reason we need to detect this case and redefine lowercase/uppercase methods
+// with correct but slower alternatives.
+if ('i' !== 'I'.toLowerCase()) {
+  lowercase = manualLowercase;
+  uppercase = manualUppercase;
+}
+
+
+var /** holds major version number for IE or NaN for real browsers */
+    msie,
+    jqLite,           // delay binding since jQuery could be loaded after us.
+    jQuery,           // delay binding
+    slice             = [].slice,
+    push              = [].push,
+    toString          = Object.prototype.toString,
+    ngMinErr          = minErr('ng'),
+
+
+    _angular          = window.angular,
+    /** @name angular */
+    angular           = window.angular || (window.angular = {}),
+    angularModule,
+    nodeName_,
+    uid               = ['0', '0', '0'];
+
+/**
+ * IE 11 changed the format of the UserAgent string.
+ * See http://msdn.microsoft.com/en-us/library/ms537503.aspx
+ */
+msie = int((/msie (\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]);
+if (isNaN(msie)) {
+  msie = int((/trident\/.*; rv:(\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]);
+}
+
+
+/**
+ * @private
+ * @param {*} obj
+ * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments,
+ *                   String ...)
+ */
+function isArrayLike(obj) {
+  if (obj == null || isWindow(obj)) {
+    return false;
+  }
+
+  var length = obj.length;
+
+  if (obj.nodeType === 1 && length) {
+    return true;
+  }
+
+  return isString(obj) || isArray(obj) || length === 0 ||
+         typeof length === 'number' && length > 0 && (length - 1) in obj;
+}
+
+/**
+ * @ngdoc function
+ * @name angular.forEach
+ * @function
+ *
+ * @description
+ * Invokes the `iterator` function once for each item in `obj` collection, which can be either an
+ * object or an array. The `iterator` function is invoked with `iterator(value, key)`, where `value`
+ * is the value of an object property or an array element and `key` is the object property key or
+ * array element index. Specifying a `context` for the function is optional.
+ *
+ * Note: this function was previously known as `angular.foreach`.
+ *
+   <pre>
+     var values = {name: 'misko', gender: 'male'};
+     var log = [];
+     angular.forEach(values, function(value, key){
+       this.push(key + ': ' + value);
+     }, log);
+     expect(log).toEqual(['name: misko', 'gender:male']);
+   </pre>
+ *
+ * @param {Object|Array} obj Object to iterate over.
+ * @param {Function} iterator Iterator function.
+ * @param {Object=} context Object to become context (`this`) for the iterator function.
+ * @returns {Object|Array} Reference to `obj`.
+ */
+function forEach(obj, iterator, context) {
+  var key;
+  if (obj) {
+    if (isFunction(obj)){
+      for (key in obj) {
+        if (key != 'prototype' && key != 'length' && key != 'name' && obj.hasOwnProperty(key)) {
+          iterator.call(context, obj[key], key);
+        }
+      }
+    } else if (obj.forEach && obj.forEach !== forEach) {
+      obj.forEach(iterator, context);
+    } else if (isArrayLike(obj)) {
+      for (key = 0; key < obj.length; key++)
+        iterator.call(context, obj[key], key);
+    } else {
+      for (key in obj) {
+        if (obj.hasOwnProperty(key)) {
+          iterator.call(context, obj[key], key);
+        }
+      }
+    }
+  }
+  return obj;
+}
+
+function sortedKeys(obj) {
+  var keys = [];
+  for (var key in obj) {
+    if (obj.hasOwnProperty(key)) {
+      keys.push(key);
+    }
+  }
+  return keys.sort();
+}
+
+function forEachSorted(obj, iterator, context) {
+  var keys = sortedKeys(obj);
+  for ( var i = 0; i < keys.length; i++) {
+    iterator.call(context, obj[keys[i]], keys[i]);
+  }
+  return keys;
+}
+
+
+/**
+ * when using forEach the params are value, key, but it is often useful to have key, value.
+ * @param {function(string, *)} iteratorFn
+ * @returns {function(*, string)}
+ */
+function reverseParams(iteratorFn) {
+  return function(value, key) { iteratorFn(key, value); };
+}
+
+/**
+ * A consistent way of creating unique IDs in angular. The ID is a sequence of alpha numeric
+ * characters such as '012ABC'. The reason why we are not using simply a number counter is that
+ * the number string gets longer over time, and it can also overflow, where as the nextId
+ * will grow much slower, it is a string, and it will never overflow.
+ *
+ * @returns an unique alpha-numeric string
+ */
+function nextUid() {
+  var index = uid.length;
+  var digit;
+
+  while(index) {
+    index--;
+    digit = uid[index].charCodeAt(0);
+    if (digit == 57 /*'9'*/) {
+      uid[index] = 'A';
+      return uid.join('');
+    }
+    if (digit == 90  /*'Z'*/) {
+      uid[index] = '0';
+    } else {
+      uid[index] = String.fromCharCode(digit + 1);
+      return uid.join('');
+    }
+  }
+  uid.unshift('0');
+  return uid.join('');
+}
+
+
+/**
+ * Set or clear the hashkey for an object.
+ * @param obj object
+ * @param h the hashkey (!truthy to delete the hashkey)
+ */
+function setHashKey(obj, h) {
+  if (h) {
+    obj.$$hashKey = h;
+  }
+  else {
+    delete obj.$$hashKey;
+  }
+}
+
+/**
+ * @ngdoc function
+ * @name angular.extend
+ * @function
+ *
+ * @description
+ * Extends the destination object `dst` by copying all of the properties from the `src` object(s)
+ * to `dst`. You can specify multiple `src` objects.
+ *
+ * @param {Object} dst Destination object.
+ * @param {...Object} src Source object(s).
+ * @returns {Object} Reference to `dst`.
+ */
+function extend(dst) {
+  var h = dst.$$hashKey;
+  forEach(arguments, function(obj){
+    if (obj !== dst) {
+      forEach(obj, function(value, key){
+        dst[key] = value;
+      });
+    }
+  });
+
+  setHashKey(dst,h);
+  return dst;
+}
+
+function int(str) {
+  return parseInt(str, 10);
+}
+
+
+function inherit(parent, extra) {
+  return extend(new (extend(function() {}, {prototype:parent}))(), extra);
+}
+
+/**
+ * @ngdoc function
+ * @name angular.noop
+ * @function
+ *
+ * @description
+ * A function that performs no operations. This function can be useful when writing code in the
+ * functional style.
+   <pre>
+     function foo(callback) {
+       var result = calculateResult();
+       (callback || angular.noop)(result);
+     }
+   </pre>
+ */
+function noop() {}
+noop.$inject = [];
+
+
+/**
+ * @ngdoc function
+ * @name angular.identity
+ * @function
+ *
+ * @description
+ * A function that returns its first argument. This function is useful when writing code in the
+ * functional style.
+ *
+   <pre>
+     function transformer(transformationFn, value) {
+       return (transformationFn || angular.identity)(value);
+     };
+   </pre>
+ */
+function identity($) {return $;}
+identity.$inject = [];
+
+
+function valueFn(value) {return function() {return value;};}
+
+/**
+ * @ngdoc function
+ * @name angular.isUndefined
+ * @function
+ *
+ * @description
+ * Determines if a reference is undefined.
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is undefined.
+ */
+function isUndefined(value){return typeof value === 'undefined';}
+
+
+/**
+ * @ngdoc function
+ * @name angular.isDefined
+ * @function
+ *
+ * @description
+ * Determines if a reference is defined.
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is defined.
+ */
+function isDefined(value){return typeof value !== 'undefined';}
+
+
+/**
+ * @ngdoc function
+ * @name angular.isObject
+ * @function
+ *
+ * @description
+ * Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not
+ * considered to be objects.
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is an `Object` but not `null`.
+ */
+function isObject(value){return value != null && typeof value === 'object';}
+
+
+/**
+ * @ngdoc function
+ * @name angular.isString
+ * @function
+ *
+ * @description
+ * Determines if a reference is a `String`.
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is a `String`.
+ */
+function isString(value){return typeof value === 'string';}
+
+
+/**
+ * @ngdoc function
+ * @name angular.isNumber
+ * @function
+ *
+ * @description
+ * Determines if a reference is a `Number`.
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is a `Number`.
+ */
+function isNumber(value){return typeof value === 'number';}
+
+
+/**
+ * @ngdoc function
+ * @name angular.isDate
+ * @function
+ *
+ * @description
+ * Determines if a value is a date.
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is a `Date`.
+ */
+function isDate(value){
+  return toString.call(value) === '[object Date]';
+}
+
+
+/**
+ * @ngdoc function
+ * @name angular.isArray
+ * @function
+ *
+ * @description
+ * Determines if a reference is an `Array`.
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is an `Array`.
+ */
+function isArray(value) {
+  return toString.call(value) === '[object Array]';
+}
+
+
+/**
+ * @ngdoc function
+ * @name angular.isFunction
+ * @function
+ *
+ * @description
+ * Determines if a reference is a `Function`.
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is a `Function`.
+ */
+function isFunction(value){return typeof value === 'function';}
+
+
+/**
+ * Determines if a value is a regular expression object.
+ *
+ * @private
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is a `RegExp`.
+ */
+function isRegExp(value) {
+  return toString.call(value) === '[object RegExp]';
+}
+
+
+/**
+ * Checks if `obj` is a window object.
+ *
+ * @private
+ * @param {*} obj Object to check
+ * @returns {boolean} True if `obj` is a window obj.
+ */
+function isWindow(obj) {
+  return obj && obj.document && obj.location && obj.alert && obj.setInterval;
+}
+
+
+function isScope(obj) {
+  return obj && obj.$evalAsync && obj.$watch;
+}
+
+
+function isFile(obj) {
+  return toString.call(obj) === '[object File]';
+}
+
+
+function isBoolean(value) {
+  return typeof value === 'boolean';
+}
+
+
+var trim = (function() {
+  // native trim is way faster: http://jsperf.com/angular-trim-test
+  // but IE doesn't have it... :-(
+  // TODO: we should move this into IE/ES5 polyfill
+  if (!String.prototype.trim) {
+    return function(value) {
+      return isString(value) ? value.replace(/^\s\s*/, '').replace(/\s\s*$/, '') : value;
+    };
+  }
+  return function(value) {
+    return isString(value) ? value.trim() : value;
+  };
+})();
+
+
+/**
+ * @ngdoc function
+ * @name angular.isElement
+ * @function
+ *
+ * @description
+ * Determines if a reference is a DOM element (or wrapped jQuery element).
+ *
+ * @param {*} value Reference to check.
+ * @returns {boolean} True if `value` is a DOM element (or wrapped jQuery element).
+ */
+function isElement(node) {
+  return !!(node &&
+    (node.nodeName  // we are a direct element
+    || (node.on && node.find)));  // we have an on and find method part of jQuery API
+}
+
+/**
+ * @param str 'key1,key2,...'
+ * @returns {object} in the form of {key1:true, key2:true, ...}
+ */
+function makeMap(str){
+  var obj = {}, items = str.split(","), i;
+  for ( i = 0; i < items.length; i++ )
+    obj[ items[i] ] = true;
+  return obj;
+}
+
+
+if (msie < 9) {
+  nodeName_ = function(element) {
+    element = element.nodeName ? element : element[0];
+    return (element.scopeName && element.scopeName != 'HTML')
+      ? uppercase(element.scopeName + ':' + element.nodeName) : element.nodeName;
+  };
+} else {
+  nodeName_ = function(element) {
+    return element.nodeName ? element.nodeName : element[0].nodeName;
+  };
+}
+
+
+function map(obj, iterator, context) {
+  var results = [];
+  forEach(obj, function(value, index, list) {
+    results.push(iterator.call(context, value, index, list));
+  });
+  return results;
+}
+
+
+/**
+ * @description
+ * Determines the number of elements in an array, the number of properties an object has, or
+ * the length of a string.
+ *
+ * Note: This function is used to augment the Object type in Angular expressions. See
+ * {@link angular.Object} for more information about Angular arrays.
+ *
+ * @param {Object|Array|string} obj Object, array, or string to inspect.
+ * @param {boolean} [ownPropsOnly=false] Count only "own" properties in an object
+ * @returns {number} The size of `obj` or `0` if `obj` is neither an object nor an array.
+ */
+function size(obj, ownPropsOnly) {
+  var count = 0, key;
+
+  if (isArray(obj) || isString(obj)) {
+    return obj.length;
+  } else if (isObject(obj)){
+    for (key in obj)
+      if (!ownPropsOnly || obj.hasOwnProperty(key))
+        count++;
+  }
+
+  return count;
+}
+
+
+function includes(array, obj) {
+  return indexOf(array, obj) != -1;
+}
+
+function indexOf(array, obj) {
+  if (array.indexOf) return array.indexOf(obj);
+
+  for (var i = 0; i < array.length; i++) {
+    if (obj === array[i]) return i;
+  }
+  return -1;
+}
+
+function arrayRemove(array, value) {
+  var index = indexOf(array, value);
+  if (index >=0)
+    array.splice(index, 1);
+  return value;
+}
+
+function isLeafNode (node) {
+  if (node) {
+    switch (node.nodeName) {
+    case "OPTION":
+    case "PRE":
+    case "TITLE":
+      return true;
+    }
+  }
+  return false;
+}
+
+/**
+ * @ngdoc function
+ * @name angular.copy
+ * @function
+ *
+ * @description
+ * Creates a deep copy of `source`, which should be an object or an array.
+ *
+ * * If no destination is supplied, a copy of the object or array is created.
+ * * If a destination is provided, all of its elements (for array) or properties (for objects)
+ *   are deleted and then all elements/properties from the source are copied to it.
+ * * If `source` is not an object or array (inc. `null` and `undefined`), `source` is returned.
+ * * If `source` is identical to 'destination' an exception will be thrown.
+ *
+ * @param {*} source The source that will be used to make a copy.
+ *                   Can be any type, including primitives, `null`, and `undefined`.
+ * @param {(Object|Array)=} destination Destination into which the source is copied. If
+ *     provided, must be of the same type as `source`.
+ * @returns {*} The copy or updated `destination`, if `destination` was specified.
+ *
+ * @example
+ <doc:example>
+ <doc:source>
+ <div ng-controller="Controller">
+ <form novalidate class="simple-form">
+ Name: <input type="text" ng-model="user.name" /><br />
+ E-mail: <input type="email" ng-model="user.email" /><br />
+ Gender: <input type="radio" ng-model="user.gender" value="male" />male
+ <input type="radio" ng-model="user.gender" value="female" />female<br />
+ <button ng-click="reset()">RESET</button>
+ <button ng-click="update(user)">SAVE</button>
+ </form>
+ <pre>form = {{user | json}}</pre>
+ <pre>master = {{master | json}}</pre>
+ </div>
+
+ <script>
+ function Controller($scope) {
+    $scope.master= {};
+
+    $scope.update = function(user) {
+      // Example with 1 argument
+      $scope.master= angular.copy(user);
+    };
+
+    $scope.reset = function() {
+      // Example with 2 arguments
+      angular.copy($scope.master, $scope.user);
+    };
+
+    $scope.reset();
+  }
+ </script>
+ </doc:source>
+ </doc:example>
+ */
+function copy(source, destination){
+  if (isWindow(source) || isScope(source)) {
+    throw ngMinErr('cpws',
+      "Can't copy! Making copies of Window or Scope instances is not supported.");
+  }
+
+  if (!destination) {
+    destination = source;
+    if (source) {
+      if (isArray(source)) {
+        destination = copy(source, []);
+      } else if (isDate(source)) {
+        destination = new Date(source.getTime());
+      } else if (isRegExp(source)) {
+        destination = new RegExp(source.source);
+      } else if (isObject(source)) {
+        destination = copy(source, {});
+      }
+    }
+  } else {
+    if (source === destination) throw ngMinErr('cpi',
+      "Can't copy! Source and destination are identical.");
+    if (isArray(source)) {
+      destination.length = 0;
+      for ( var i = 0; i < source.length; i++) {
+        destination.push(copy(source[i]));
+      }
+    } else {
+      var h = destination.$$hashKey;
+      forEach(destination, function(value, key){
+        delete destination[key];
+      });
+      for ( var key in source) {
+        destination[key] = copy(source[key]);
+      }
+      setHashKey(destination,h);
+    }
+  }
+  return destination;
+}
+
+/**
+ * Create a shallow copy of an object
+ */
+function shallowCopy(src, dst) {
+  dst = dst || {};
+
+  for(var key in src) {
+    // shallowCopy is only ever called by $compile nodeLinkFn, which has control over src
+    // so we don't need to worry about using our custom hasOwnProperty here
+    if (src.hasOwnProperty(key) && key.substr(0, 2) !== '$$') {
+      dst[key] = src[key];
+    }
+  }
+
+  return dst;
+}
+
+
+/**
+ * @ngdoc function
+ * @name angular.equals
+ * @function
+ *
+ * @description
+ * Determines if two objects or two values are equivalent. Supports value types, regular
+ * expressions, arrays and objects.
+ *
+ * Two objects or values are considered equivalent if at least one of the following is true:
+ *
+ * * Both objects or values pass `===` comparison.
+ * * Both objects or values are of the same type and all of their properties are equal by
+ *   comparing them with `angular.equals`.
+ * * Both values are NaN. (In JavaScript, NaN == NaN => false. But we consider two NaN as equal)
+ * * Both values represent the same regular expression (In JavasScript,
+ *   /abc/ == /abc/ => false. But we consider two regular expressions as equal when their textual
+ *   representation matches).
+ *
+ * During a property comparison, properties of `function` type and properties with names
+ * that begin with `$` are ignored.
+ *
+ * Scope and DOMWindow objects are being compared only by identify (`===`).
+ *
+ * @param {*} o1 Object or value to compare.
+ * @param {*} o2 Object or value to compare.
+ * @returns {boolean} True if arguments are equal.
+ */
+function equals(o1, o2) {
+  if (o1 === o2) return true;
+  if (o1 === null || o2 === null) return false;
+  if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN
+  var t1 = typeof o1, t2 = typeof o2, length, key, keySet;
+  if (t1 == t2) {
+    if (t1 == 'object') {
+      if (isArray(o1)) {
+        if (!isArray(o2)) return false;
+        if ((length = o1.length) == o2.length) {
+          for(key=0; key<length; key++) {
+            if (!equals(o1[key], o2[key])) return false;
+          }
+          return true;
+        }
+      } else if (isDate(o1)) {
+        return isDate(o2) && o1.getTime() == o2.getTime();
+      } else if (isRegExp(o1) && isRegExp(o2)) {
+        return o1.toString() == o2.toString();
+      } else {
+        if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2) || isArray(o2)) return false;
+        keySet = {};
+        for(key in o1) {
+          if (key.charAt(0) === '$' || isFunction(o1[key])) continue;
+          if (!equals(o1[key], o2[key])) return false;
+          keySet[key] = true;
+        }
+        for(key in o2) {
+          if (!keySet.hasOwnProperty(key) &&
+              key.charAt(0) !== '$' &&
+              o2[key] !== undefined &&
+              !isFunction(o2[key])) return false;
+        }
+        return true;
+      }
+    }
+  }
+  return false;
+}
+
+
+function csp() {
+  return (document.securityPolicy && document.securityPolicy.isActive) ||
+      (document.querySelector &&
+      !!(document.querySelector('[ng-csp]') || document.querySelector('[data-ng-csp]')));
+}
+
+
+function concat(array1, array2, index) {
+  return array1.concat(slice.call(array2, index));
+}
+
+function sliceArgs(args, startIndex) {
+  return slice.call(args, startIndex || 0);
+}
+
+
+/* jshint -W101 */
+/**
+ * @ngdoc function
+ * @name angular.bind
+ * @function
+ *
+ * @description
+ * Returns a function which calls function `fn` bound to `self` (`self` becomes the `this` for
+ * `fn`). You can supply optional `args` that are prebound to the function. This feature is also
+ * known as [partial application](http://en.wikipedia.org/wiki/Partial_application), as
+ * distinguished from [function currying](http://en.wikipedia.org/wiki/Currying#Contrast_with_partial_function_application).
+ *
+ * @param {Object} self Context which `fn` should be evaluated in.
+ * @param {function()} fn Function to be bound.
+ * @param {...*} args Optional arguments to be prebound to the `fn` function call.
+ * @returns {function()} Function that wraps the `fn` with all the specified bindings.
+ */
+/* jshint +W101 */
+function bind(self, fn) {
+  var curryArgs = arguments.length > 2 ? sliceArgs(arguments, 2) : [];
+  if (isFunction(fn) && !(fn instanceof RegExp)) {
+    return curryArgs.length
+      ? function() {
+          return arguments.length
+            ? fn.apply(self, curryArgs.concat(slice.call(arguments, 0)))
+            : fn.apply(self, curryArgs);
+        }
+      : function() {
+          return arguments.length
+            ? fn.apply(self, arguments)
+            : fn.call(self);
+        };
+  } else {
+    // in IE, native methods are not functions so they cannot be bound (note: they don't need to be)
+    return fn;
+  }
+}
+
+
+function toJsonReplacer(key, value) {
+  var val = value;
+
+  if (typeof key === 'string' && key.charAt(0) === '$') {
+    val = undefined;
+  } else if (isWindow(value)) {
+    val = '$WINDOW';
+  } else if (value &&  document === value) {
+    val = '$DOCUMENT';
+  } else if (isScope(value)) {
+    val = '$SCOPE';
+  }
+
+  return val;
+}
+
+
+/**
+ * @ngdoc function
+ * @name angular.toJson
+ * @function
+ *
+ * @description
+ * Serializes input into a JSON-formatted string. Properties with leading $ characters will be
+ * stripped since angular uses this notation internally.
+ *
+ * @param {Object|Array|Date|string|number} obj Input to be serialized into JSON.
+ * @param {boolean=} pretty If set to true, the JSON output will contain newlines and whitespace.
+ * @returns {string|undefined} JSON-ified string representing `obj`.
+ */
+function toJson(obj, pretty) {
+  if (typeof obj === 'undefined') return undefined;
+  return JSON.stringify(obj, toJsonReplacer, pretty ? '  ' : null);
+}
+
+
+/**
+ * @ngdoc function
+ * @name angular.fromJson
+ * @function
+ *
+ * @description
+ * Deserializes a JSON string.
+ *
+ * @param {string} json JSON string to deserialize.
+ * @returns {Object|Array|Date|string|number} Deserialized thingy.
+ */
+function fromJson(json) {
+  return isString(json)
+      ? JSON.parse(json)
+      : json;
+}
+
+
+function toBoolean(value) {
+  if (value && value.length !== 0) {
+    var v = lowercase("" + value);
+    value = !(v == 'f' || v == '0' || v == 'false' || v == 'no' || v == 'n' || v == '[]');
+  } else {
+    value = false;
+  }
+  return value;
+}
+
+/**
+ * @returns {string} Returns the string representation of the element.
+ */
+function startingTag(element) {
+  element = jqLite(element).clone();
+  try {
+    // turns out IE does not let you set .html() on elements which
+    // are not allowed to have children. So we just ignore it.
+    element.empty();
+  } catch(e) {}
+  // As Per DOM Standards
+  var TEXT_NODE = 3;
+  var elemHtml = jqLite('<div>').append(element).html();
+  try {
+    return element[0].nodeType === TEXT_NODE ? lowercase(elemHtml) :
+        elemHtml.
+          match(/^(<[^>]+>)/)[1].
+          replace(/^<([\w\-]+)/, function(match, nodeName) { return '<' + lowercase(nodeName); });
+  } catch(e) {
+    return lowercase(elemHtml);
+  }
+
+}
+
+
+/////////////////////////////////////////////////
+
+/**
+ * Tries to decode the URI component without throwing an exception.
+ *
+ * @private
+ * @param str value potential URI component to check.
+ * @returns {boolean} True if `value` can be decoded
+ * with the decodeURIComponent function.
+ */
+function tryDecodeURIComponent(value) {
+  try {
+    return decodeURIComponent(value);
+  } catch(e) {
+    // Ignore any invalid uri component
+  }
+}
+
+
+/**
+ * Parses an escaped url query string into key-value pairs.
+ * @returns Object.<(string|boolean)>
+ */
+function parseKeyValue(/**string*/keyValue) {
+  var obj = {}, key_value, key;
+  forEach((keyValue || "").split('&'), function(keyValue){
+    if ( keyValue ) {
+      key_value = keyValue.split('=');
+      key = tryDecodeURIComponent(key_value[0]);
+      if ( isDefined(key) ) {
+        var val = isDefined(key_value[1]) ? tryDecodeURIComponent(key_value[1]) : true;
+        if (!obj[key]) {
+          obj[key] = val;
+        } else if(isArray(obj[key])) {
+          obj[key].push(val);
+        } else {
+          obj[key] = [obj[key],val];
+        }
+      }
+    }
+  });
+  return obj;
+}
+
+function toKeyValue(obj) {
+  var parts = [];
+  forEach(obj, function(value, key) {
+    if (isArray(value)) {
+      forEach(value, function(arrayValue) {
+        parts.push(encodeUriQuery(key, true) +
+                   (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true)));
+      });
+    } else {
+    parts.push(encodeUriQuery(key, true) +
+               (value === true ? '' : '=' + encodeUriQuery(value, true)));
+    }
+  });
+  return parts.length ? parts.join('&') : '';
+}
+
+
+/**
+ * We need our custom method because encodeURIComponent is too aggressive and doesn't follow
+ * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path
+ * segments:
+ *    segment       = *pchar
+ *    pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
+ *    pct-encoded   = "%" HEXDIG HEXDIG
+ *    unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
+ *    sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
+ *                     / "*" / "+" / "," / ";" / "="
+ */
+function encodeUriSegment(val) {
+  return encodeUriQuery(val, true).
+             replace(/%26/gi, '&').
+             replace(/%3D/gi, '=').
+             replace(/%2B/gi, '+');
+}
+
+
+/**
+ * This method is intended for encoding *key* or *value* parts of query component. We need a custom
+ * method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be
+ * encoded per http://tools.ietf.org/html/rfc3986:
+ *    query       = *( pchar / "/" / "?" )
+ *    pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
+ *    unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
+ *    pct-encoded   = "%" HEXDIG HEXDIG
+ *    sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
+ *                     / "*" / "+" / "," / ";" / "="
+ */
+function encodeUriQuery(val, pctEncodeSpaces) {
+  return encodeURIComponent(val).
+             replace(/%40/gi, '@').
+             replace(/%3A/gi, ':').
+             replace(/%24/g, '$').
+             replace(/%2C/gi, ',').
+             replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));
+}
+
+
+/**
+ * @ngdoc directive
+ * @name ng.directive:ngApp
+ *
+ * @element ANY
+ * @param {angular.Module} ngApp an optional application
+ *   {@link angular.module module} name to load.
+ *
+ * @description
+ *
+ * Use this directive to **auto-bootstrap** an AngularJS application. The `ngApp` directive
+ * designates the **root element** of the application and is typically placed near the root element
+ * of the page - e.g. on the `<body>` or `<html>` tags.
+ *
+ * Only one AngularJS application can be auto-bootstrapped per HTML document. The first `ngApp`
+ * found in the document will be used to define the root element to auto-bootstrap as an
+ * application. To run multiple applications in an HTML document you must manually bootstrap them using
+ * {@link angular.bootstrap} instead. AngularJS applications cannot be nested within each other.
+ *
+ * You can specify an **AngularJS module** to be used as the root module for the application.  This
+ * module will be loaded into the {@link AUTO.$injector} when the application is bootstrapped and
+ * should contain the application code needed or have dependencies on other modules that will
+ * contain the code. See {@link angular.module} for more information.
+ *
+ * In the example below if the `ngApp` directive were not placed on the `html` element then the
+ * document would not be compiled, the `AppController` would not be instantiated and the `{{ a+b }}`
+ * would not be resolved to `3`.
+ *
+ * `ngApp` is the easiest, and most common, way to bootstrap an application.
+ *
+ <example module="ngAppDemo">
+   <file name="index.html">
+   <div ng-controller="ngAppDemoController">
+     I can add: {{a}} + {{b}} =  {{ a+b }}
+   </file>
+   <file name="script.js">
+   angular.module('ngAppDemo', []).controller('ngAppDemoController', function($scope) {
+     $scope.a = 1;
+     $scope.b = 2;
+   });
+   </file>
+ </example>
+ *
+ */
+function angularInit(element, bootstrap) {
+  var elements = [element],
+      appElement,
+      module,
+      names = ['ng:app', 'ng-app', 'x-ng-app', 'data-ng-app'],
+      NG_APP_CLASS_REGEXP = /\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;
+
+  function append(element) {
+    element && elements.push(element);
+  }
+
+  forEach(names, function(name) {
+    names[name] = true;
+    append(document.getElementById(name));
+    name = name.replace(':', '\\:');
+    if (element.querySelectorAll) {
+      forEach(element.querySelectorAll('.' + name), append);
+      forEach(element.querySelectorAll('.' + name + '\\:'), append);
+      forEach(element.querySelectorAll('[' + name + ']'), append);
+    }
+  });
+
+  forEach(elements, function(element) {
+    if (!appElement) {
+      var className = ' ' + element.className + ' ';
+      var match = NG_APP_CLASS_REGEXP.exec(className);
+      if (match) {
+        appElement = element;
+        module = (match[2] || '').replace(/\s+/g, ',');
+      } else {
+        forEach(element.attributes, function(attr) {
+          if (!appElement && names[attr.name]) {
+            appElement = element;
+            module = attr.value;
+          }
+        });
+      }
+    }
+  });
+  if (appElement) {
+    bootstrap(appElement, module ? [module] : []);
+  }
+}
+
+/**
+ * @ngdoc function
+ * @name angular.bootstrap
+ * @description
+ * Use this function to manually start up angular application.
+ *
+ * See: {@link guide/bootstrap Bootstrap}
+ *
+ * Note that ngScenario-based end-to-end tests cannot use this function to bootstrap manually.
+ * They must use {@link api/ng.directive:ngApp ngApp}.
+ *
+ * @param {Element} element DOM element which is the root of angular application.
+ * @param {Array<String|Function|Array>=} modules an array of modules to load into the application.
+ *     Each item in the array should be the name of a predefined module or a (DI annotated)
+ *     function that will be invoked by the injector as a run block.
+ *     See: {@link angular.module modules}
+ * @returns {AUTO.$injector} Returns the newly created injector for this app.
+ */
+function bootstrap(element, modules) {
+  var doBootstrap = function() {
+    element = jqLite(element);
+
+    if (element.injector()) {
+      var tag = (element[0] === document) ? 'document' : startingTag(element);
+      throw ngMinErr('btstrpd', "App Already Bootstrapped with this Element '{0}'", tag);
+    }
+
+    modules = modules || [];
+    modules.unshift(['$provide', function($provide) {
+      $provide.value('$rootElement', element);
+    }]);
+    modules.unshift('ng');
+    var injector = createInjector(modules);
+    injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector', '$animate',
+       function(scope, element, compile, injector, animate) {
+        scope.$apply(function() {
+          element.data('$injector', injector);
+          compile(element)(scope);
+        });
+      }]
+    );
+    return injector;
+  };
+
+  var NG_DEFER_BOOTSTRAP = /^NG_DEFER_BOOTSTRAP!/;
+
+  if (window && !NG_DEFER_BOOTSTRAP.test(window.name)) {
+    return doBootstrap();
+  }
+
+  window.name = window.name.replace(NG_DEFER_BOOTSTRAP, '');
+  angular.resumeBootstrap = function(extraModules) {
+    forEach(extraModules, function(module) {
+      modules.push(module);
+    });
+    doBootstrap();
+  };
+}
+
+var SNAKE_CASE_REGEXP = /[A-Z]/g;
+function snake_case(name, separator){
+  separator = separator || '_';
+  return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {
+    return (pos ? separator : '') + letter.toLowerCase();
+  });
+}
+
+function bindJQuery() {
+  // bind to jQuery if present;
+  jQuery = window.jQuery;
+  // reset to jQuery or default to us.
+  if (jQuery) {
+    jqLite = jQuery;
+    extend(jQuery.fn, {
+      scope: JQLitePrototype.scope,
+      isolateScope: JQLitePrototype.isolateScope,
+      controller: JQLitePrototype.controller,
+      injector: JQLitePrototype.injector,
+      inheritedData: JQLitePrototype.inheritedData
+    });
+    // Method signature:
+    //     jqLitePatchJQueryRemove(name, dispatchThis, filterElems, getterIfNoArguments)
+    jqLitePatchJQueryRemove('remove', true, true, false);
+    jqLitePatchJQueryRemove('empty', false, false, false);
+    jqLitePatchJQueryRemove('html', false, false, true);
+  } else {
+    jqLite = JQLite;
+  }
+  angular.element = jqLite;
+}
+
+/**
+ * throw error if the argument is falsy.
+ */
+function assertArg(arg, name, reason) {
+  if (!arg) {
+    throw ngMinErr('areq', "Argument '{0}' is {1}", (name || '?'), (reason || "required"));
+  }
+  return arg;
+}
+
+function assertArgFn(arg, name, acceptArrayAnnotation) {
+  if (acceptArrayAnnotation && isArray(arg)) {
+      arg = arg[arg.length - 1];
+  }
+
+  assertArg(isFunction(arg), name, 'not a function, got ' +
+      (arg && typeof arg == 'object' ? arg.constructor.name || 'Object' : typeof arg));
+  return arg;
+}
+
+/**
+ * throw error if the name given is hasOwnProperty
+ * @param  {String} name    the name to test
+ * @param  {String} context the context in which the name is used, such as module or directive
+ */
+function assertNotHasOwnProperty(name, context) {
+  if (name === 'hasOwnProperty') {
+    throw ngMinErr('badname', "hasOwnProperty is not a valid {0} name", context);
+  }
+}
+
+/**
+ * Return the value accessible from the object by path. Any undefined traversals are ignored
+ * @param {Object} obj starting object
+ * @param {string} path path to traverse
+ * @param {boolean=true} bindFnToScope
+ * @returns value as accessible by path
+ */
+//TODO(misko): this function needs to be removed
+function getter(obj, path, bindFnToScope) {
+  if (!path) return obj;
+  var keys = path.split('.');
+  var key;
+  var lastInstance = obj;
+  var len = keys.length;
+
+  for (var i = 0; i < len; i++) {
+    key = keys[i];
+    if (obj) {
+      obj = (lastInstance = obj)[key];
+    }
+  }
+  if (!bindFnToScope && isFunction(obj)) {
+    return bind(lastInstance, obj);
+  }
+  return obj;
+}
+
+/**
+ * Return the DOM siblings between the first and last node in the given array.
+ * @param {Array} array like object
+ * @returns jQlite object containing the elements
+ */
+function getBlockElements(nodes) {
+  var startNode = nodes[0],
+      endNode = nodes[nodes.length - 1];
+  if (startNode === endNode) {
+    return jqLite(startNode);
+  }
+
+  var element = startNode;
+  var elements = [element];
+
+  do {
+    element = element.nextSibling;
+    if (!element) break;
+    elements.push(element);
+  } while (element !== endNode);
+
+  return jqLite(elements);
+}
+
+/**
+ * @ngdoc interface
+ * @name angular.Module
+ * @description
+ *
+ * Interface for configuring angular {@link angular.module modules}.
+ */
+
+function setupModuleLoader(window) {
+
+  var $injectorMinErr = minErr('$injector');
+  var ngMinErr = minErr('ng');
+
+  function ensure(obj, name, factory) {
+    return obj[name] || (obj[name] = factory());
+  }
+
+  var angular = ensure(window, 'angular', Object);
+
+  // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap
+  angular.$$minErr = angular.$$minErr || minErr;
+
+  return ensure(angular, 'module', function() {
+    /** @type {Object.<string, angular.Module>} */
+    var modules = {};
+
+    /**
+     * @ngdoc function
+     * @name angular.module
+     * @description
+     *
+     * The `angular.module` is a global place for creating, registering and retrieving Angular
+     * modules.
+     * All modules (angular core or 3rd party) that should be available to an application must be
+     * registered using this mechanism.
+     *
+     * When passed two or more arguments, a new module is created.  If passed only one argument, an
+     * existing module (the name passed as the first argument to `module`) is retrieved.
+     *
+     *
+     * # Module
+     *
+     * A module is a collection of services, directives, filters, and configuration information.
+     * `angular.module` is used to configure the {@link AUTO.$injector $injector}.
+     *
+     * <pre>
+     * // Create a new module
+     * var myModule = angular.module('myModule', []);
+     *
+     * // register a new service
+     * myModule.value('appName', 'MyCoolApp');
+     *
+     * // configure existing services inside initialization blocks.
+     * myModule.config(function($locationProvider) {
+     *   // Configure existing providers
+     *   $locationProvider.hashPrefix('!');
+     * });
+     * </pre>
+     *
+     * Then you can create an injector and load your modules like this:
+     *
+     * <pre>
+     * var injector = angular.injector(['ng', 'MyModule'])
+     * </pre>
+     *
+     * However it's more likely that you'll just use
+     * {@link ng.directive:ngApp ngApp} or
+     * {@link angular.bootstrap} to simplify this process for you.
+     *
+     * @param {!string} name The name of the module to create or retrieve.
+     * @param {Array.<string>=} requires If specified then new module is being created. If
+     *        unspecified then the the module is being retrieved for further configuration.
+     * @param {Function} configFn Optional configuration function for the module. Same as
+     *        {@link angular.Module#methods_config Module#config()}.
+     * @returns {module} new module with the {@link angular.Module} api.
+     */
+    return function module(name, requires, configFn) {
+      var assertNotHasOwnProperty = function(name, context) {
+        if (name === 'hasOwnProperty') {
+          throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);
+        }
+      };
+
+      assertNotHasOwnProperty(name, 'module');
+      if (requires && modules.hasOwnProperty(name)) {
+        modules[name] = null;
+      }
+      return ensure(modules, name, function() {
+        if (!requires) {
+          throw $injectorMinErr('nomod', "Module '{0}' is not available! You either misspelled " +
+             "the module name or forgot to load it. If registering a module ensure that you " +
+             "specify the dependencies as the second argument.", name);
+        }
+
+        /** @type {!Array.<Array.<*>>} */
+        var invokeQueue = [];
+
+        /** @type {!Array.<Function>} */
+        var runBlocks = [];
+
+        var config = invokeLater('$injector', 'invoke');
+
+        /** @type {angular.Module} */
+        var moduleInstance = {
+          // Private state
+          _invokeQueue: invokeQueue,
+          _runBlocks: runBlocks,
+
+          /**
+           * @ngdoc property
+           * @name angular.Module#requires
+           * @propertyOf angular.Module
+           * @returns {Array.<string>} List of module names which must be loaded before this module.
+           * @description
+           * Holds the list of modules which the injector will load before the current module is
+           * loaded.
+           */
+          requires: requires,
+
+          /**
+           * @ngdoc property
+           * @name angular.Module#name
+           * @propertyOf angular.Module
+           * @returns {string} Name of the module.
+           * @description
+           */
+          name: name,
+
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#provider
+           * @methodOf angular.Module
+           * @param {string} name service name
+           * @param {Function} providerType Construction function for creating new instance of the
+           *                                service.
+           * @description
+           * See {@link AUTO.$provide#provider $provide.provider()}.
+           */
+          provider: invokeLater('$provide', 'provider'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#factory
+           * @methodOf angular.Module
+           * @param {string} name service name
+           * @param {Function} providerFunction Function for creating new instance of the service.
+           * @description
+           * See {@link AUTO.$provide#factory $provide.factory()}.
+           */
+          factory: invokeLater('$provide', 'factory'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#service
+           * @methodOf angular.Module
+           * @param {string} name service name
+           * @param {Function} constructor A constructor function that will be instantiated.
+           * @description
+           * See {@link AUTO.$provide#service $provide.service()}.
+           */
+          service: invokeLater('$provide', 'service'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#value
+           * @methodOf angular.Module
+           * @param {string} name service name
+           * @param {*} object Service instance object.
+           * @description
+           * See {@link AUTO.$provide#value $provide.value()}.
+           */
+          value: invokeLater('$provide', 'value'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#constant
+           * @methodOf angular.Module
+           * @param {string} name constant name
+           * @param {*} object Constant value.
+           * @description
+           * Because the constant are fixed, they get applied before other provide methods.
+           * See {@link AUTO.$provide#constant $provide.constant()}.
+           */
+          constant: invokeLater('$provide', 'constant', 'unshift'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#animation
+           * @methodOf angular.Module
+           * @param {string} name animation name
+           * @param {Function} animationFactory Factory function for creating new instance of an
+           *                                    animation.
+           * @description
+           *
+           * **NOTE**: animations take effect only if the **ngAnimate** module is loaded.
+           *
+           *
+           * Defines an animation hook that can be later used with
+           * {@link ngAnimate.$animate $animate} service and directives that use this service.
+           *
+           * <pre>
+           * module.animation('.animation-name', function($inject1, $inject2) {
+           *   return {
+           *     eventName : function(element, done) {
+           *       //code to run the animation
+           *       //once complete, then run done()
+           *       return function cancellationFunction(element) {
+           *         //code to cancel the animation
+           *       }
+           *     }
+           *   }
+           * })
+           * </pre>
+           *
+           * See {@link ngAnimate.$animateProvider#register $animateProvider.register()} and
+           * {@link ngAnimate ngAnimate module} for more information.
+           */
+          animation: invokeLater('$animateProvider', 'register'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#filter
+           * @methodOf angular.Module
+           * @param {string} name Filter name.
+           * @param {Function} filterFactory Factory function for creating new instance of filter.
+           * @description
+           * See {@link ng.$filterProvider#register $filterProvider.register()}.
+           */
+          filter: invokeLater('$filterProvider', 'register'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#controller
+           * @methodOf angular.Module
+           * @param {string|Object} name Controller name, or an object map of controllers where the
+           *    keys are the names and the values are the constructors.
+           * @param {Function} constructor Controller constructor function.
+           * @description
+           * See {@link ng.$controllerProvider#register $controllerProvider.register()}.
+           */
+          controller: invokeLater('$controllerProvider', 'register'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#directive
+           * @methodOf angular.Module
+           * @param {string|Object} name Directive name, or an object map of directives where the
+           *    keys are the names and the values are the factories.
+           * @param {Function} directiveFactory Factory function for creating new instance of
+           * directives.
+           * @description
+           * See {@link ng.$compileProvider#methods_directive $compileProvider.directive()}.
+           */
+          directive: invokeLater('$compileProvider', 'directive'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#config
+           * @methodOf angular.Module
+           * @param {Function} configFn Execute this function on module load. Useful for service
+           *    configuration.
+           * @description
+           * Use this method to register work which needs to be performed on module loading.
+           */
+          config: config,
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#run
+           * @methodOf angular.Module
+           * @param {Function} initializationFn Execute this function after injector creation.
+           *    Useful for application initialization.
+           * @description
+           * Use this method to register work which should be performed when the injector is done
+           * loading all modules.
+           */
+          run: function(block) {
+            runBlocks.push(block);
+            return this;
+          }
+        };
+
+        if (configFn) {
+          config(configFn);
+        }
+
+        return  moduleInstance;
+
+        /**
+         * @param {string} provider
+         * @param {string} method
+         * @param {String=} insertMethod
+         * @returns {angular.Module}
+         */
+        function invokeLater(provider, method, insertMethod) {
+          return function() {
+            invokeQueue[insertMethod || 'push']([provider, method, arguments]);
+            return moduleInstance;
+          };
+        }
+      });
+    };
+  });
+
+}
+
+/* global
+    angularModule: true,
+    version: true,
+    
+    $LocaleProvider,
+    $CompileProvider,
+    
+    htmlAnchorDirective,
+    inputDirective,
+    inputDirective,
+    formDirective,
+    scriptDirective,
+    selectDirective,
+    styleDirective,
+    optionDirective,
+    ngBindDirective,
+    ngBindHtmlDirective,
+    ngBindTemplateDirective,
+    ngClassDirective,
+    ngClassEvenDirective,
+    ngClassOddDirective,
+    ngCspDirective,
+    ngCloakDirective,
+    ngControllerDirective,
+    ngFormDirective,
+    ngHideDirective,
+    ngIfDirective,
+    ngIncludeDirective,
+    ngIncludeFillContentDirective,
+    ngInitDirective,
+    ngNonBindableDirective,
+    ngPluralizeDirective,
+    ngRepeatDirective,
+    ngShowDirective,
+    ngStyleDirective,
+    ngSwitchDirective,
+    ngSwitchWhenDirective,
+    ngSwitchDefaultDirective,
+    ngOptionsDirective,
+    ngTranscludeDirective,
+    ngModelDirective,
+    ngListDirective,
+    ngChangeDirective,
+    requiredDirective,
+    requiredDirective,
+    ngValueDirective,
+    ngAttributeAliasDirectives,
+    ngEventDirectives,
+
+    $AnchorScrollProvider,
+    $AnimateProvider,
+    $BrowserProvider,
+    $CacheFactoryProvider,
+    $ControllerProvider,
+    $DocumentProvider,
+    $ExceptionHandlerProvider,
+    $FilterProvider,
+    $InterpolateProvider,
+    $IntervalProvider,
+    $HttpProvider,
+    $HttpBackendProvider,
+    $LocationProvider,
+    $LogProvider,
+    $ParseProvider,
+    $RootScopeProvider,
+    $QProvider,
+    $$SanitizeUriProvider,
+    $SceProvider,
+    $SceDelegateProvider,
+    $SnifferProvider,
+    $TemplateCacheProvider,
+    $TimeoutProvider,
+    $WindowProvider
+*/
+
+
+/**
+ * @ngdoc property
+ * @name angular.version
+ * @description
+ * An object that contains information about the current AngularJS version. This object has the
+ * following properties:
+ *
+ * - `full` – `{string}` – Full version string, such as "0.9.18".
+ * - `major` – `{number}` – Major version number, such as "0".
+ * - `minor` – `{number}` – Minor version number, such as "9".
+ * - `dot` – `{number}` – Dot version number, such as "18".
+ * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
+ */
+var version = {
+  full: '1.2.5',    // all of these placeholder strings will be replaced by grunt's
+  major: 1,    // package task
+  minor: 2,
+  dot: 5,
+  codeName: 'singularity-expansion'
+};
+
+
+function publishExternalAPI(angular){
+  extend(angular, {
+    'bootstrap': bootstrap,
+    'copy': copy,
+    'extend': extend,
+    'equals': equals,
+    'element': jqLite,
+    'forEach': forEach,
+    'injector': createInjector,
+    'noop':noop,
+    'bind':bind,
+    'toJson': toJson,
+    'fromJson': fromJson,
+    'identity':identity,
+    'isUndefined': isUndefined,
+    'isDefined': isDefined,
+    'isString': isString,
+    'isFunction': isFunction,
+    'isObject': isObject,
+    'isNumber': isNumber,
+    'isElement': isElement,
+    'isArray': isArray,
+    'version': version,
+    'isDate': isDate,
+    'lowercase': lowercase,
+    'uppercase': uppercase,
+    'callbacks': {counter: 0},
+    '$$minErr': minErr,
+    '$$csp': csp
+  });
+
+  angularModule = setupModuleLoader(window);
+  try {
+    angularModule('ngLocale');
+  } catch (e) {
+    angularModule('ngLocale', []).provider('$locale', $LocaleProvider);
+  }
+
+  angularModule('ng', ['ngLocale'], ['$provide',
+    function ngModule($provide) {
+      // $$sanitizeUriProvider needs to be before $compileProvider as it is used by it.
+      $provide.provider({
+        $$sanitizeUri: $$SanitizeUriProvider
+      });
+      $provide.provider('$compile', $CompileProvider).
+        directive({
+            a: htmlAnchorDirective,
+            input: inputDirective,
+            textarea: inputDirective,
+            form: formDirective,
+            script: scriptDirective,
+            select: selectDirective,
+            style: styleDirective,
+            option: optionDirective,
+            ngBind: ngBindDirective,
+            ngBindHtml: ngBindHtmlDirective,
+            ngBindTemplate: ngBindTemplateDirective,
+            ngClass: ngClassDirective,
+            ngClassEven: ngClassEvenDirective,
+            ngClassOdd: ngClassOddDirective,
+            ngCloak: ngCloakDirective,
+            ngController: ngControllerDirective,
+            ngForm: ngFormDirective,
+            ngHide: ngHideDirective,
+            ngIf: ngIfDirective,
+            ngInclude: ngIncludeDirective,
+            ngInit: ngInitDirective,
+            ngNonBindable: ngNonBindableDirective,
+            ngPluralize: ngPluralizeDirective,
+            ngRepeat: ngRepeatDirective,
+            ngShow: ngShowDirective,
+            ngStyle: ngStyleDirective,
+            ngSwitch: ngSwitchDirective,
+            ngSwitchWhen: ngSwitchWhenDirective,
+            ngSwitchDefault: ngSwitchDefaultDirective,
+            ngOptions: ngOptionsDirective,
+            ngTransclude: ngTranscludeDirective,
+            ngModel: ngModelDirective,
+            ngList: ngListDirective,
+            ngChange: ngChangeDirective,
+            required: requiredDirective,
+            ngRequired: requiredDirective,
+            ngValue: ngValueDirective
+        }).
+        directive({
+          ngInclude: ngIncludeFillContentDirective
+        }).
+        directive(ngAttributeAliasDirectives).
+        directive(ngEventDirectives);
+      $provide.provider({
+        $anchorScroll: $AnchorScrollProvider,
+        $animate: $AnimateProvider,
+        $browser: $BrowserProvider,
+        $cacheFactory: $CacheFactoryProvider,
+        $controller: $ControllerProvider,
+        $document: $DocumentProvider,
+        $exceptionHandler: $ExceptionHandlerProvider,
+        $filter: $FilterProvider,
+        $interpolate: $InterpolateProvider,
+        $interval: $IntervalProvider,
+        $http: $HttpProvider,
+        $httpBackend: $HttpBackendProvider,
+        $location: $LocationProvider,
+        $log: $LogProvider,
+        $parse: $ParseProvider,
+        $rootScope: $RootScopeProvider,
+        $q: $QProvider,
+        $sce: $SceProvider,
+        $sceDelegate: $SceDelegateProvider,
+        $sniffer: $SnifferProvider,
+        $templateCache: $TemplateCacheProvider,
+        $timeout: $TimeoutProvider,
+        $window: $WindowProvider
+      });
+    }
+  ]);
+}
+
+/* global
+
+  -JQLitePrototype,
+  -addEventListenerFn,
+  -removeEventListenerFn,
+  -BOOLEAN_ATTR
+*/
+
+//////////////////////////////////
+//JQLite
+//////////////////////////////////
+
+/**
+ * @ngdoc function
+ * @name angular.element
+ * @function
+ *
+ * @description
+ * Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element.
+ *
+ * If jQuery is available, `angular.element` is an alias for the
+ * [jQuery](http://api.jquery.com/jQuery/) function. If jQuery is not available, `angular.element`
+ * delegates to Angular's built-in subset of jQuery, called "jQuery lite" or "jqLite."
+ *
+ * <div class="alert alert-success">jqLite is a tiny, API-compatible subset of jQuery that allows
+ * Angular to manipulate the DOM in a cross-browser compatible way. **jqLite** implements only the most
+ * commonly needed functionality with the goal of having a very small footprint.</div>
+ *
+ * To use jQuery, simply load it before `DOMContentLoaded` event fired.
+ *
+ * <div class="alert">**Note:** all element references in Angular are always wrapped with jQuery or
+ * jqLite; they are never raw DOM references.</div>
+ *
+ * ## Angular's jqLite
+ * jqLite provides only the following jQuery methods:
+ *
+ * - [`addClass()`](http://api.jquery.com/addClass/)
+ * - [`after()`](http://api.jquery.com/after/)
+ * - [`append()`](http://api.jquery.com/append/)
+ * - [`attr()`](http://api.jquery.com/attr/)
+ * - [`bind()`](http://api.jquery.com/on/) - Does not support namespaces, selectors or eventData
+ * - [`children()`](http://api.jquery.com/children/) - Does not support selectors
+ * - [`clone()`](http://api.jquery.com/clone/)
+ * - [`contents()`](http://api.jquery.com/contents/)
+ * - [`css()`](http://api.jquery.com/css/)
+ * - [`data()`](http://api.jquery.com/data/)
+ * - [`empty()`](http://api.jquery.com/empty/)
+ * - [`eq()`](http://api.jquery.com/eq/)
+ * - [`find()`](http://api.jquery.com/find/) - Limited to lookups by tag name
+ * - [`hasClass()`](http://api.jquery.com/hasClass/)
+ * - [`html()`](http://api.jquery.com/html/)
+ * - [`next()`](http://api.jquery.com/next/) - Does not support selectors
+ * - [`on()`](http://api.jquery.com/on/) - Does not support namespaces, selectors or eventData
+ * - [`off()`](http://api.jquery.com/off/) - Does not support namespaces or selectors
+ * - [`parent()`](http://api.jquery.com/parent/) - Does not support selectors
+ * - [`prepend()`](http://api.jquery.com/prepend/)
+ * - [`prop()`](http://api.jquery.com/prop/)
+ * - [`ready()`](http://api.jquery.com/ready/)
+ * - [`remove()`](http://api.jquery.com/remove/)
+ * - [`removeAttr()`](http://api.jquery.com/removeAttr/)
+ * - [`removeClass()`](http://api.jquery.com/removeClass/)
+ * - [`removeData()`](http://api.jquery.com/removeData/)
+ * - [`replaceWith()`](http://api.jquery.com/replaceWith/)
+ * - [`text()`](http://api.jquery.com/text/)
+ * - [`toggleClass()`](http://api.jquery.com/toggleClass/)
+ * - [`triggerHandler()`](http://api.jquery.com/triggerHandler/) - Passes a dummy event object to handlers.
+ * - [`unbind()`](http://api.jquery.com/off/) - Does not support namespaces
+ * - [`val()`](http://api.jquery.com/val/)
+ * - [`wrap()`](http://api.jquery.com/wrap/)
+ *
+ * ## jQuery/jqLite Extras
+ * Angular also provides the following additional methods and events to both jQuery and jqLite:
+ *
+ * ### Events
+ * - `$destroy` - AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires this event
+ *    on all DOM nodes being removed.  This can be used to clean up any 3rd party bindings to the DOM
+ *    element before it is removed.
+ *
+ * ### Methods
+ * - `controller(name)` - retrieves the controller of the current element or its parent. By default
+ *   retrieves controller associated with the `ngController` directive. If `name` is provided as
+ *   camelCase directive name, then the controller for this directive will be retrieved (e.g.
+ *   `'ngModel'`).
+ * - `injector()` - retrieves the injector of the current element or its parent.
+ * - `scope()` - retrieves the {@link api/ng.$rootScope.Scope scope} of the current
+ *   element or its parent.
+ * - `isolateScope()` - retrieves an isolate {@link api/ng.$rootScope.Scope scope} if one is attached directly to the
+ *   current element. This getter should be used only on elements that contain a directive which starts a new isolate
+ *   scope. Calling `scope()` on this element always returns the original non-isolate scope.
+ * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top
+ *   parent element is reached.
+ *
+ * @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery.
+ * @returns {Object} jQuery object.
+ */
+
+var jqCache = JQLite.cache = {},
+    jqName = JQLite.expando = 'ng-' + new Date().getTime(),
+    jqId = 1,
+    addEventListenerFn = (window.document.addEventListener
+      ? function(element, type, fn) {element.addEventListener(type, fn, false);}
+      : function(element, type, fn) {element.attachEvent('on' + type, fn);}),
+    removeEventListenerFn = (window.document.removeEventListener
+      ? function(element, type, fn) {element.removeEventListener(type, fn, false); }
+      : function(element, type, fn) {element.detachEvent('on' + type, fn); });
+
+function jqNextId() { return ++jqId; }
+
+
+var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
+var MOZ_HACK_REGEXP = /^moz([A-Z])/;
+var jqLiteMinErr = minErr('jqLite');
+
+/**
+ * Converts snake_case to camelCase.
+ * Also there is special case for Moz prefix starting with upper case letter.
+ * @param name Name to normalize
+ */
+function camelCase(name) {
+  return name.
+    replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
+      return offset ? letter.toUpperCase() : letter;
+    }).
+    replace(MOZ_HACK_REGEXP, 'Moz$1');
+}
+
+/////////////////////////////////////////////
+// jQuery mutation patch
+//
+// In conjunction with bindJQuery intercepts all jQuery's DOM destruction apis and fires a
+// $destroy event on all DOM nodes being removed.
+//
+/////////////////////////////////////////////
+
+function jqLitePatchJQueryRemove(name, dispatchThis, filterElems, getterIfNoArguments) {
+  var originalJqFn = jQuery.fn[name];
+  originalJqFn = originalJqFn.$original || originalJqFn;
+  removePatch.$original = originalJqFn;
+  jQuery.fn[name] = removePatch;
+
+  function removePatch(param) {
+    // jshint -W040
+    var list = filterElems && param ? [this.filter(param)] : [this],
+        fireEvent = dispatchThis,
+        set, setIndex, setLength,
+        element, childIndex, childLength, children;
+
+    if (!getterIfNoArguments || param != null) {
+      while(list.length) {
+        set = list.shift();
+        for(setIndex = 0, setLength = set.length; setIndex < setLength; setIndex++) {
+          element = jqLite(set[setIndex]);
+          if (fireEvent) {
+            element.triggerHandler('$destroy');
+          } else {
+            fireEvent = !fireEvent;
+          }
+          for(childIndex = 0, childLength = (children = element.children()).length;
+              childIndex < childLength;
+              childIndex++) {
+            list.push(jQuery(children[childIndex]));
+          }
+        }
+      }
+    }
+    return originalJqFn.apply(this, arguments);
+  }
+}
+
+/////////////////////////////////////////////
+function JQLite(element) {
+  if (element instanceof JQLite) {
+    return element;
+  }
+  if (!(this instanceof JQLite)) {
+    if (isString(element) && element.charAt(0) != '<') {
+      throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element');
+    }
+    return new JQLite(element);
+  }
+
+  if (isString(element)) {
+    var div = document.createElement('div');
+    // Read about the NoScope elements here:
+    // http://msdn.microsoft.com/en-us/library/ms533897(VS.85).aspx
+    div.innerHTML = '<div>&#160;</div>' + element; // IE insanity to make NoScope elements work!
+    div.removeChild(div.firstChild); // remove the superfluous div
+    jqLiteAddNodes(this, div.childNodes);
+    var fragment = jqLite(document.createDocumentFragment());
+    fragment.append(this); // detach the elements from the temporary DOM div.
+  } else {
+    jqLiteAddNodes(this, element);
+  }
+}
+
+function jqLiteClone(element) {
+  return element.cloneNode(true);
+}
+
+function jqLiteDealoc(element){
+  jqLiteRemoveData(element);
+  for ( var i = 0, children = element.childNodes || []; i < children.length; i++) {
+    jqLiteDealoc(children[i]);
+  }
+}
+
+function jqLiteOff(element, type, fn, unsupported) {
+  if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument');
+
+  var events = jqLiteExpandoStore(element, 'events'),
+      handle = jqLiteExpandoStore(element, 'handle');
+
+  if (!handle) return; //no listeners registered
+
+  if (isUndefined(type)) {
+    forEach(events, function(eventHandler, type) {
+      removeEventListenerFn(element, type, eventHandler);
+      delete events[type];
+    });
+  } else {
+    forEach(type.split(' '), function(type) {
+      if (isUndefined(fn)) {
+        removeEventListenerFn(element, type, events[type]);
+        delete events[type];
+      } else {
+        arrayRemove(events[type] || [], fn);
+      }
+    });
+  }
+}
+
+function jqLiteRemoveData(element, name) {
+  var expandoId = element[jqName],
+      expandoStore = jqCache[expandoId];
+
+  if (expandoStore) {
+    if (name) {
+      delete jqCache[expandoId].data[name];
+      return;
+    }
+
+    if (expandoStore.handle) {
+      expandoStore.events.$destroy && expandoStore.handle({}, '$destroy');
+      jqLiteOff(element);
+    }
+    delete jqCache[expandoId];
+    element[jqName] = undefined; // ie does not allow deletion of attributes on elements.
+  }
+}
+
+function jqLiteExpandoStore(element, key, value) {
+  var expandoId = element[jqName],
+      expandoStore = jqCache[expandoId || -1];
+
+  if (isDefined(value)) {
+    if (!expandoStore) {
+      element[jqName] = expandoId = jqNextId();
+      expandoStore = jqCache[expandoId] = {};
+    }
+    expandoStore[key] = value;
+  } else {
+    return expandoStore && expandoStore[key];
+  }
+}
+
+function jqLiteData(element, key, value) {
+  var data = jqLiteExpandoStore(element, 'data'),
+      isSetter = isDefined(value),
+      keyDefined = !isSetter && isDefined(key),
+      isSimpleGetter = keyDefined && !isObject(key);
+
+  if (!data && !isSimpleGetter) {
+    jqLiteExpandoStore(element, 'data', data = {});
+  }
+
+  if (isSetter) {
+    data[key] = value;
+  } else {
+    if (keyDefined) {
+      if (isSimpleGetter) {
+        // don't create data in this case.
+        return data && data[key];
+      } else {
+        extend(data, key);
+      }
+    } else {
+      return data;
+    }
+  }
+}
+
+function jqLiteHasClass(element, selector) {
+  if (!element.getAttribute) return false;
+  return ((" " + (element.getAttribute('class') || '') + " ").replace(/[\n\t]/g, " ").
+      indexOf( " " + selector + " " ) > -1);
+}
+
+function jqLiteRemoveClass(element, cssClasses) {
+  if (cssClasses && element.setAttribute) {
+    forEach(cssClasses.split(' '), function(cssClass) {
+      element.setAttribute('class', trim(
+          (" " + (element.getAttribute('class') || '') + " ")
+          .replace(/[\n\t]/g, " ")
+          .replace(" " + trim(cssClass) + " ", " "))
+      );
+    });
+  }
+}
+
+function jqLiteAddClass(element, cssClasses) {
+  if (cssClasses && element.setAttribute) {
+    var existingClasses = (' ' + (element.getAttribute('class') || '') + ' ')
+                            .replace(/[\n\t]/g, " ");
+
+    forEach(cssClasses.split(' '), function(cssClass) {
+      cssClass = trim(cssClass);
+      if (existingClasses.indexOf(' ' + cssClass + ' ') === -1) {
+        existingClasses += cssClass + ' ';
+      }
+    });
+
+    element.setAttribute('class', trim(existingClasses));
+  }
+}
+
+function jqLiteAddNodes(root, elements) {
+  if (elements) {
+    elements = (!elements.nodeName && isDefined(elements.length) && !isWindow(elements))
+      ? elements
+      : [ elements ];
+    for(var i=0; i < elements.length; i++) {
+      root.push(elements[i]);
+    }
+  }
+}
+
+function jqLiteController(element, name) {
+  return jqLiteInheritedData(element, '$' + (name || 'ngController' ) + 'Controller');
+}
+
+function jqLiteInheritedData(element, name, value) {
+  element = jqLite(element);
+
+  // if element is the document object work with the html element instead
+  // this makes $(document).scope() possible
+  if(element[0].nodeType == 9) {
+    element = element.find('html');
+  }
+  var names = isArray(name) ? name : [name];
+
+  while (element.length) {
+
+    for (var i = 0, ii = names.length; i < ii; i++) {
+      if ((value = element.data(names[i])) !== undefined) return value;
+    }
+    element = element.parent();
+  }
+}
+
+function jqLiteEmpty(element) {
+  for (var i = 0, childNodes = element.childNodes; i < childNodes.length; i++) {
+    jqLiteDealoc(childNodes[i]);
+  }
+  while (element.firstChild) {
+    element.removeChild(element.firstChild);
+  }
+}
+
+//////////////////////////////////////////
+// Functions which are declared directly.
+//////////////////////////////////////////
+var JQLitePrototype = JQLite.prototype = {
+  ready: function(fn) {
+    var fired = false;
+
+    function trigger() {
+      if (fired) return;
+      fired = true;
+      fn();
+    }
+
+    // check if document already is loaded
+    if (document.readyState === 'complete'){
+      setTimeout(trigger);
+    } else {
+      this.on('DOMContentLoaded', trigger); // works for modern browsers and IE9
+      // we can not use jqLite since we are not done loading and jQuery could be loaded later.
+      // jshint -W064
+      JQLite(window).on('load', trigger); // fallback to window.onload for others
+      // jshint +W064
+    }
+  },
+  toString: function() {
+    var value = [];
+    forEach(this, function(e){ value.push('' + e);});
+    return '[' + value.join(', ') + ']';
+  },
+
+  eq: function(index) {
+      return (index >= 0) ? jqLite(this[index]) : jqLite(this[this.length + index]);
+  },
+
+  length: 0,
+  push: push,
+  sort: [].sort,
+  splice: [].splice
+};
+
+//////////////////////////////////////////
+// Functions iterating getter/setters.
+// these functions return self on setter and
+// value on get.
+//////////////////////////////////////////
+var BOOLEAN_ATTR = {};
+forEach('multiple,selected,checked,disabled,readOnly,required,open'.split(','), function(value) {
+  BOOLEAN_ATTR[lowercase(value)] = value;
+});
+var BOOLEAN_ELEMENTS = {};
+forEach('input,select,option,textarea,button,form,details'.split(','), function(value) {
+  BOOLEAN_ELEMENTS[uppercase(value)] = true;
+});
+
+function getBooleanAttrName(element, name) {
+  // check dom last since we will most likely fail on name
+  var booleanAttr = BOOLEAN_ATTR[name.toLowerCase()];
+
+  // booleanAttr is here twice to minimize DOM access
+  return booleanAttr && BOOLEAN_ELEMENTS[element.nodeName] && booleanAttr;
+}
+
+forEach({
+  data: jqLiteData,
+  inheritedData: jqLiteInheritedData,
+
+  scope: function(element) {
+    // Can't use jqLiteData here directly so we stay compatible with jQuery!
+    return jqLite(element).data('$scope') || jqLiteInheritedData(element.parentNode || element, ['$isolateScope', '$scope']);
+  },
+
+  isolateScope: function(element) {
+    // Can't use jqLiteData here directly so we stay compatible with jQuery!
+    return jqLite(element).data('$isolateScope') || jqLite(element).data('$isolateScopeNoTemplate');
+  },
+
+  controller: jqLiteController ,
+
+  injector: function(element) {
+    return jqLiteInheritedData(element, '$injector');
+  },
+
+  removeAttr: function(element,name) {
+    element.removeAttribute(name);
+  },
+
+  hasClass: jqLiteHasClass,
+
+  css: function(element, name, value) {
+    name = camelCase(name);
+
+    if (isDefined(value)) {
+      element.style[name] = value;
+    } else {
+      var val;
+
+      if (msie <= 8) {
+        // this is some IE specific weirdness that jQuery 1.6.4 does not sure why
+        val = element.currentStyle && element.currentStyle[name];
+        if (val === '') val = 'auto';
+      }
+
+      val = val || element.style[name];
+
+      if (msie <= 8) {
+        // jquery weirdness :-/
+        val = (val === '') ? undefined : val;
+      }
+
+      return  val;
+    }
+  },
+
+  attr: function(element, name, value){
+    var lowercasedName = lowercase(name);
+    if (BOOLEAN_ATTR[lowercasedName]) {
+      if (isDefined(value)) {
+        if (!!value) {
+          element[name] = true;
+          element.setAttribute(name, lowercasedName);
+        } else {
+          element[name] = false;
+          element.removeAttribute(lowercasedName);
+        }
+      } else {
+        return (element[name] ||
+                 (element.attributes.getNamedItem(name)|| noop).specified)
+               ? lowercasedName
+               : undefined;
+      }
+    } else if (isDefined(value)) {
+      element.setAttribute(name, value);
+    } else if (element.getAttribute) {
+      // the extra argument "2" is to get the right thing for a.href in IE, see jQuery code
+      // some elements (e.g. Document) don't have get attribute, so return undefined
+      var ret = element.getAttribute(name, 2);
+      // normalize non-existing attributes to undefined (as jQuery)
+      return ret === null ? undefined : ret;
+    }
+  },
+
+  prop: function(element, name, value) {
+    if (isDefined(value)) {
+      element[name] = value;
+    } else {
+      return element[name];
+    }
+  },
+
+  text: (function() {
+    var NODE_TYPE_TEXT_PROPERTY = [];
+    if (msie < 9) {
+      NODE_TYPE_TEXT_PROPERTY[1] = 'innerText';    /** Element **/
+      NODE_TYPE_TEXT_PROPERTY[3] = 'nodeValue';    /** Text **/
+    } else {
+      NODE_TYPE_TEXT_PROPERTY[1] =                 /** Element **/
+      NODE_TYPE_TEXT_PROPERTY[3] = 'textContent';  /** Text **/
+    }
+    getText.$dv = '';
+    return getText;
+
+    function getText(element, value) {
+      var textProp = NODE_TYPE_TEXT_PROPERTY[element.nodeType];
+      if (isUndefined(value)) {
+        return textProp ? element[textProp] : '';
+      }
+      element[textProp] = value;
+    }
+  })(),
+
+  val: function(element, value) {
+    if (isUndefined(value)) {
+      if (nodeName_(element) === 'SELECT' && element.multiple) {
+        var result = [];
+        forEach(element.options, function (option) {
+          if (option.selected) {
+            result.push(option.value || option.text);
+          }
+        });
+        return result.length === 0 ? null : result;
+      }
+      return element.value;
+    }
+    element.value = value;
+  },
+
+  html: function(element, value) {
+    if (isUndefined(value)) {
+      return element.innerHTML;
+    }
+    for (var i = 0, childNodes = element.childNodes; i < childNodes.length; i++) {
+      jqLiteDealoc(childNodes[i]);
+    }
+    element.innerHTML = value;
+  },
+
+  empty: jqLiteEmpty
+}, function(fn, name){
+  /**
+   * Properties: writes return selection, reads return first value
+   */
+  JQLite.prototype[name] = function(arg1, arg2) {
+    var i, key;
+
+    // jqLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it
+    // in a way that survives minification.
+    // jqLiteEmpty takes no arguments but is a setter.
+    if (fn !== jqLiteEmpty &&
+        (((fn.length == 2 && (fn !== jqLiteHasClass && fn !== jqLiteController)) ? arg1 : arg2) === undefined)) {
+      if (isObject(arg1)) {
+
+        // we are a write, but the object properties are the key/values
+        for (i = 0; i < this.length; i++) {
+          if (fn === jqLiteData) {
+            // data() takes the whole object in jQuery
+            fn(this[i], arg1);
+          } else {
+            for (key in arg1) {
+              fn(this[i], key, arg1[key]);
+            }
+          }
+        }
+        // return self for chaining
+        return this;
+      } else {
+        // we are a read, so read the first child.
+        var value = fn.$dv;
+        // Only if we have $dv do we iterate over all, otherwise it is just the first element.
+        var jj = (value === undefined) ? Math.min(this.length, 1) : this.length;
+        for (var j = 0; j < jj; j++) {
+          var nodeValue = fn(this[j], arg1, arg2);
+          value = value ? value + nodeValue : nodeValue;
+        }
+        return value;
+      }
+    } else {
+      // we are a write, so apply to all children
+      for (i = 0; i < this.length; i++) {
+        fn(this[i], arg1, arg2);
+      }
+      // return self for chaining
+      return this;
+    }
+  };
+});
+
+function createEventHandler(element, events) {
+  var eventHandler = function (event, type) {
+    if (!event.preventDefault) {
+      event.preventDefault = function() {
+        event.returnValue = false; //ie
+      };
+    }
+
+    if (!event.stopPropagation) {
+      event.stopPropagation = function() {
+        event.cancelBubble = true; //ie
+      };
+    }
+
+    if (!event.target) {
+      event.target = event.srcElement || document;
+    }
+
+    if (isUndefined(event.defaultPrevented)) {
+      var prevent = event.preventDefault;
+      event.preventDefault = function() {
+        event.defaultPrevented = true;
+        prevent.call(event);
+      };
+      event.defaultPrevented = false;
+    }
+
+    event.isDefaultPrevented = function() {
+      return event.defaultPrevented || event.returnValue === false;
+    };
+
+    forEach(events[type || event.type], function(fn) {
+      fn.call(element, event);
+    });
+
+    // Remove monkey-patched methods (IE),
+    // as they would cause memory leaks in IE8.
+    if (msie <= 8) {
+      // IE7/8 does not allow to delete property on native object
+      event.preventDefault = null;
+      event.stopPropagation = null;
+      event.isDefaultPrevented = null;
+    } else {
+      // It shouldn't affect normal browsers (native methods are defined on prototype).
+      delete event.preventDefault;
+      delete event.stopPropagation;
+      delete event.isDefaultPrevented;
+    }
+  };
+  eventHandler.elem = element;
+  return eventHandler;
+}
+
+//////////////////////////////////////////
+// Functions iterating traversal.
+// These functions chain results into a single
+// selector.
+//////////////////////////////////////////
+forEach({
+  removeData: jqLiteRemoveData,
+
+  dealoc: jqLiteDealoc,
+
+  on: function onFn(element, type, fn, unsupported){
+    if (isDefined(unsupported)) throw jqLiteMinErr('onargs', 'jqLite#on() does not support the `selector` or `eventData` parameters');
+
+    var events = jqLiteExpandoStore(element, 'events'),
+        handle = jqLiteExpandoStore(element, 'handle');
+
+    if (!events) jqLiteExpandoStore(element, 'events', events = {});
+    if (!handle) jqLiteExpandoStore(element, 'handle', handle = createEventHandler(element, events));
+
+    forEach(type.split(' '), function(type){
+      var eventFns = events[type];
+
+      if (!eventFns) {
+        if (type == 'mouseenter' || type == 'mouseleave') {
+          var contains = document.body.contains || document.body.compareDocumentPosition ?
+          function( a, b ) {
+            // jshint bitwise: false
+            var adown = a.nodeType === 9 ? a.documentElement : a,
+            bup = b && b.parentNode;
+            return a === bup || !!( bup && bup.nodeType === 1 && (
+              adown.contains ?
+              adown.contains( bup ) :
+              a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
+              ));
+            } :
+            function( a, b ) {
+              if ( b ) {
+                while ( (b = b.parentNode) ) {
+                  if ( b === a ) {
+                    return true;
+                  }
+                }
+              }
+              return false;
+            };
+
+          events[type] = [];
+
+          // Refer to jQuery's implementation of mouseenter & mouseleave
+          // Read about mouseenter and mouseleave:
+          // http://www.quirksmode.org/js/events_mouse.html#link8
+          var eventmap = { mouseleave : "mouseout", mouseenter : "mouseover"};
+
+          onFn(element, eventmap[type], function(event) {
+            var target = this, related = event.relatedTarget;
+            // For mousenter/leave call the handler if related is outside the target.
+            // NB: No relatedTarget if the mouse left/entered the browser window
+            if ( !related || (related !== target && !contains(target, related)) ){
+              handle(event, type);
+            }
+          });
+
+        } else {
+          addEventListenerFn(element, type, handle);
+          events[type] = [];
+        }
+        eventFns = events[type];
+      }
+      eventFns.push(fn);
+    });
+  },
+
+  off: jqLiteOff,
+
+  replaceWith: function(element, replaceNode) {
+    var index, parent = element.parentNode;
+    jqLiteDealoc(element);
+    forEach(new JQLite(replaceNode), function(node){
+      if (index) {
+        parent.insertBefore(node, index.nextSibling);
+      } else {
+        parent.replaceChild(node, element);
+      }
+      index = node;
+    });
+  },
+
+  children: function(element) {
+    var children = [];
+    forEach(element.childNodes, function(element){
+      if (element.nodeType === 1)
+        children.push(element);
+    });
+    return children;
+  },
+
+  contents: function(element) {
+    return element.childNodes || [];
+  },
+
+  append: function(element, node) {
+    forEach(new JQLite(node), function(child){
+      if (element.nodeType === 1 || element.nodeType === 11) {
+        element.appendChild(child);
+      }
+    });
+  },
+
+  prepend: function(element, node) {
+    if (element.nodeType === 1) {
+      var index = element.firstChild;
+      forEach(new JQLite(node), function(child){
+        element.insertBefore(child, index);
+      });
+    }
+  },
+
+  wrap: function(element, wrapNode) {
+    wrapNode = jqLite(wrapNode)[0];
+    var parent = element.parentNode;
+    if (parent) {
+      parent.replaceChild(wrapNode, element);
+    }
+    wrapNode.appendChild(element);
+  },
+
+  remove: function(element) {
+    jqLiteDealoc(element);
+    var parent = element.parentNode;
+    if (parent) parent.removeChild(element);
+  },
+
+  after: function(element, newElement) {
+    var index = element, parent = element.parentNode;
+    forEach(new JQLite(newElement), function(node){
+      parent.insertBefore(node, index.nextSibling);
+      index = node;
+    });
+  },
+
+  addClass: jqLiteAddClass,
+  removeClass: jqLiteRemoveClass,
+
+  toggleClass: function(element, selector, condition) {
+    if (isUndefined(condition)) {
+      condition = !jqLiteHasClass(element, selector);
+    }
+    (condition ? jqLiteAddClass : jqLiteRemoveClass)(element, selector);
+  },
+
+  parent: function(element) {
+    var parent = element.parentNode;
+    return parent && parent.nodeType !== 11 ? parent : null;
+  },
+
+  next: function(element) {
+    if (element.nextElementSibling) {
+      return element.nextElementSibling;
+    }
+
+    // IE8 doesn't have nextElementSibling
+    var elm = element.nextSibling;
+    while (elm != null && elm.nodeType !== 1) {
+      elm = elm.nextSibling;
+    }
+    return elm;
+  },
+
+  find: function(element, selector) {
+    if (element.getElementsByTagName) {
+      return element.getElementsByTagName(selector);
+    } else {
+      return [];
+    }
+  },
+
+  clone: jqLiteClone,
+
+  triggerHandler: function(element, eventName, eventData) {
+    var eventFns = (jqLiteExpandoStore(element, 'events') || {})[eventName];
+
+    eventData = eventData || [];
+
+    var event = [{
+      preventDefault: noop,
+      stopPropagation: noop
+    }];
+
+    forEach(eventFns, function(fn) {
+      fn.apply(element, event.concat(eventData));
+    });
+  }
+}, function(fn, name){
+  /**
+   * chaining functions
+   */
+  JQLite.prototype[name] = function(arg1, arg2, arg3) {
+    var value;
+    for(var i=0; i < this.length; i++) {
+      if (isUndefined(value)) {
+        value = fn(this[i], arg1, arg2, arg3);
+        if (isDefined(value)) {
+          // any function which returns a value needs to be wrapped
+          value = jqLite(value);
+        }
+      } else {
+        jqLiteAddNodes(value, fn(this[i], arg1, arg2, arg3));
+      }
+    }
+    return isDefined(value) ? value : this;
+  };
+
+  // bind legacy bind/unbind to on/off
+  JQLite.prototype.bind = JQLite.prototype.on;
+  JQLite.prototype.unbind = JQLite.prototype.off;
+});
+
+/**
+ * Computes a hash of an 'obj'.
+ * Hash of a:
+ *  string is string
+ *  number is number as string
+ *  object is either result of calling $$hashKey function on the object or uniquely generated id,
+ *         that is also assigned to the $$hashKey property of the object.
+ *
+ * @param obj
+ * @returns {string} hash string such that the same input will have the same hash string.
+ *         The resulting string key is in 'type:hashKey' format.
+ */
+function hashKey(obj) {
+  var objType = typeof obj,
+      key;
+
+  if (objType == 'object' && obj !== null) {
+    if (typeof (key = obj.$$hashKey) == 'function') {
+      // must invoke on object to keep the right this
+      key = obj.$$hashKey();
+    } else if (key === undefined) {
+      key = obj.$$hashKey = nextUid();
+    }
+  } else {
+    key = obj;
+  }
+
+  return objType + ':' + key;
+}
+
+/**
+ * HashMap which can use objects as keys
+ */
+function HashMap(array){
+  forEach(array, this.put, this);
+}
+HashMap.prototype = {
+  /**
+   * Store key value pair
+   * @param key key to store can be any type
+   * @param value value to store can be any 

<TRUNCATED>

[07/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/bootstrap/custom/css/bootstrap.min.css
----------------------------------------------------------------------
diff --git a/portal/js/libs/bootstrap/custom/css/bootstrap.min.css b/portal/js/libs/bootstrap/custom/css/bootstrap.min.css
new file mode 100755
index 0000000..097f41b
--- /dev/null
+++ b/portal/js/libs/bootstrap/custom/css/bootstrap.min.css
@@ -0,0 +1,874 @@
+/*!
+ * Bootstrap v2.3.2
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */
+.clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";line-height:0;}
+.clearfix:after{clear:both;}
+.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;}
+.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}
+article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
+audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
+audio:not([controls]){display:none;}
+html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
+a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
+a:hover,a:active{outline:0;}
+sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;}
+sup{top:-0.5em;}
+sub{bottom:-0.25em;}
+img{max-width:100%;width:auto\9;height:auto;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic;}
+#map_canvas img,.google-maps img{max-width:none;}
+button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;}
+button,input{*overflow:visible;line-height:normal;}
+button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;}
+button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer;}
+label,select,button,input[type="button"],input[type="reset"],input[type="submit"],input[type="radio"],input[type="checkbox"]{cursor:pointer;}
+input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield;}
+input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;}
+textarea{overflow:auto;vertical-align:top;}
+@media print{*{text-shadow:none !important;color:#000 !important;background:transparent !important;box-shadow:none !important;} a,a:visited{text-decoration:underline;} a[href]:after{content:" (" attr(href) ")";} abbr[title]:after{content:" (" attr(title) ")";} .ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:"";} pre,blockquote{border:1px solid #999;page-break-inside:avoid;} thead{display:table-header-group;} tr,img{page-break-inside:avoid;} img{max-width:100% !important;} @page {margin:0.5cm;}p,h2,h3{orphans:3;widows:3;} h2,h3{page-break-after:avoid;}}body{margin:0;font-family:marquette-light,'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333333;background-color:#ffffff;}
+a{color:#0088cc;text-decoration:none;}
+a:hover,a:focus{color:#005580;text-decoration:underline;}
+.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
+.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.2);-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);}
+.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px;}
+.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";line-height:0;}
+.row:after{clear:both;}
+[class*="span"]{float:left;min-height:1px;margin-left:20px;}
+.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;}
+.span12{width:940px;}
+.span11{width:860px;}
+.span10{width:780px;}
+.span9{width:700px;}
+.span8{width:620px;}
+.span7{width:540px;}
+.span6{width:460px;}
+.span5{width:380px;}
+.span4{width:300px;}
+.span3{width:220px;}
+.span2{width:140px;}
+.span1{width:60px;}
+.offset12{margin-left:980px;}
+.offset11{margin-left:900px;}
+.offset10{margin-left:820px;}
+.offset9{margin-left:740px;}
+.offset8{margin-left:660px;}
+.offset7{margin-left:580px;}
+.offset6{margin-left:500px;}
+.offset5{margin-left:420px;}
+.offset4{margin-left:340px;}
+.offset3{margin-left:260px;}
+.offset2{margin-left:180px;}
+.offset1{margin-left:100px;}
+.row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0;}
+.row-fluid:after{clear:both;}
+.row-fluid [class*="span"]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;}
+.row-fluid [class*="span"]:first-child{margin-left:0;}
+.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.127659574468085%;}
+.row-fluid .span12{width:100%;*width:99.94680851063829%;}
+.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%;}
+.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%;}
+.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%;}
+.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%;}
+.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%;}
+.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%;}
+.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%;}
+.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%;}
+.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%;}
+.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%;}
+.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%;}
+.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%;}
+.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%;}
+.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%;}
+.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%;}
+.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%;}
+.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%;}
+.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%;}
+.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%;}
+.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%;}
+.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%;}
+.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%;}
+.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%;}
+.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%;}
+.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%;}
+.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%;}
+.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%;}
+.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%;}
+.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%;}
+.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%;}
+.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%;}
+.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%;}
+.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%;}
+.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%;}
+.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%;}
+[class*="span"].hide,.row-fluid [class*="span"].hide{display:none;}
+[class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right;}
+.container{margin-right:auto;margin-left:auto;*zoom:1;}.container:before,.container:after{display:table;content:"";line-height:0;}
+.container:after{clear:both;}
+.container-fluid{padding-right:20px;padding-left:20px;*zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";line-height:0;}
+.container-fluid:after{clear:both;}
+p{margin:0 0 10px;}
+.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px;}
+small{font-size:85%;}
+strong{font-weight:bold;}
+em{font-style:italic;}
+cite{font-style:normal;}
+.muted{color:#999999;}
+a.muted:hover,a.muted:focus{color:#808080;}
+.text-warning{color:#c09853;}
+a.text-warning:hover,a.text-warning:focus{color:#a47e3c;}
+.text-error{color:#b94a48;}
+a.text-error:hover,a.text-error:focus{color:#953b39;}
+.text-info{color:#3a87ad;}
+a.text-info:hover,a.text-info:focus{color:#2d6987;}
+.text-success{color:#468847;}
+a.text-success:hover,a.text-success:focus{color:#356635;}
+.text-left{text-align:left;}
+.text-right{text-align:right;}
+.text-center{text-align:center;}
+h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:20px;color:inherit;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999999;}
+h1,h2,h3{line-height:40px;}
+h1{font-size:38.5px;}
+h2{font-size:31.5px;}
+h3{font-size:24.5px;}
+h4{font-size:17.5px;}
+h5{font-size:14px;}
+h6{font-size:11.9px;}
+h1 small{font-size:24.5px;}
+h2 small{font-size:17.5px;}
+h3 small{font-size:14px;}
+h4 small{font-size:14px;}
+.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eeeeee;}
+ul,ol{padding:0;margin:0 0 10px 25px;}
+ul ul,ul ol,ol ol,ol ul{margin-bottom:0;}
+li{line-height:20px;}
+ul.unstyled,ol.unstyled{margin-left:0;list-style:none;}
+ul.inline,ol.inline{margin-left:0;list-style:none;}ul.inline>li,ol.inline>li{display:inline-block;*display:inline;*zoom:1;padding-left:5px;padding-right:5px;}
+dl{margin-bottom:20px;}
+dt,dd{line-height:20px;}
+dt{font-weight:bold;}
+dd{margin-left:10px;}
+.dl-horizontal{*zoom:1;}.dl-horizontal:before,.dl-horizontal:after{display:table;content:"";line-height:0;}
+.dl-horizontal:after{clear:both;}
+.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
+.dl-horizontal dd{margin-left:180px;}
+hr{margin:20px 0;border:0;border-top:1px solid #eeeeee;border-bottom:1px solid #ffffff;}
+abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999999;}
+abbr.initialism{font-size:90%;text-transform:uppercase;}
+blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eeeeee;}blockquote p{margin-bottom:0;font-size:17.5px;font-weight:300;line-height:1.25;}
+blockquote small{display:block;line-height:20px;color:#999999;}blockquote small:before{content:'\2014 \00A0';}
+blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eeeeee;border-left:0;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;}
+blockquote.pull-right small:before{content:'';}
+blockquote.pull-right small:after{content:'\00A0 \2014';}
+q:before,q:after,blockquote:before,blockquote:after{content:"";}
+address{display:block;margin-bottom:20px;font-style:normal;line-height:20px;}
+code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;white-space:nowrap;}
+pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}pre.prettyprint{margin-bottom:20px;}
+pre code{padding:0;color:inherit;white-space:pre;white-space:pre-wrap;background-color:transparent;border:0;}
+.pre-scrollable{max-height:340px;overflow-y:scroll;}
+.label,.badge{display:inline-block;padding:2px 4px;font-size:11.844px;font-weight:bold;line-height:14px;color:#ffffff;vertical-align:baseline;white-space:nowrap;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#999999;}
+.label{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+.badge{padding-left:9px;padding-right:9px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;}
+.label:empty,.badge:empty{display:none;}
+a.label:hover,a.label:focus,a.badge:hover,a.badge:focus{color:#ffffff;text-decoration:none;cursor:pointer;}
+.label-important,.badge-important{background-color:#b94a48;}
+.label-important[href],.badge-important[href]{background-color:#953b39;}
+.label-warning,.badge-warning{background-color:#f89406;}
+.label-warning[href],.badge-warning[href]{background-color:#c67605;}
+.label-success,.badge-success{background-color:#468847;}
+.label-success[href],.badge-success[href]{background-color:#356635;}
+.label-info,.badge-info{background-color:#3a87ad;}
+.label-info[href],.badge-info[href]{background-color:#2d6987;}
+.label-inverse,.badge-inverse{background-color:#333333;}
+.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a;}
+.btn .label,.btn .badge{position:relative;top:-1px;}
+.btn-mini .label,.btn-mini .badge{top:0;}
+table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0;}
+.table{width:100%;margin-bottom:20px;}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #dddddd;}
+.table th{font-weight:bold;}
+.table thead th{vertical-align:bottom;}
+.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0;}
+.table tbody+tbody{border-top:2px solid #dddddd;}
+.table .table{background-color:#ffffff;}
+.table-condensed th,.table-condensed td{padding:4px 5px;}
+.table-bordered{border:1px solid #dddddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}.table-bordered th,.table-bordered td{border-left:1px solid #dddddd;}
+.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;}
+.table-bordered thead:first-child tr:first-child>th:first-child,.table-bordered tbody:first-child tr:first-child>td:first-child,.table-bordered tbody:first-child tr:first-child>th:first-child{-webkit-border-top-left-radius:0;-moz-border-radius-topleft:0;border-top-left-radius:0;}
+.table-bordered thead:first-child tr:first-child>th:last-child,.table-bordered tbody:first-child tr:first-child>td:last-child,.table-bordered tbody:first-child tr:first-child>th:last-child{-webkit-border-top-right-radius:0;-moz-border-radius-topright:0;border-top-right-radius:0;}
+.table-bordered thead:last-child tr:last-child>th:first-child,.table-bordered tbody:last-child tr:last-child>td:first-child,.table-bordered tbody:last-child tr:last-child>th:first-child,.table-bordered tfoot:last-child tr:last-child>td:first-child,.table-bordered tfoot:last-child tr:last-child>th:first-child{-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;}
+.table-bordered thead:last-child tr:last-child>th:last-child,.table-bordered tbody:last-child tr:last-child>td:last-child,.table-bordered tbody:last-child tr:last-child>th:last-child,.table-bordered tfoot:last-child tr:last-child>td:last-child,.table-bordered tfoot:last-child tr:last-child>th:last-child{-webkit-border-bottom-right-radius:0;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;}
+.table-bordered tfoot+tbody:last-child tr:last-child td:first-child{-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;}
+.table-bordered tfoot+tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:0;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;}
+.table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:0;-moz-border-radius-topleft:0;border-top-left-radius:0;}
+.table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:0;-moz-border-radius-topright:0;border-top-right-radius:0;}
+.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9;}
+.table-hover tbody tr:hover>td,.table-hover tbody tr:hover>th{background-color:#f5f5f5;}
+table td[class*="span"],table th[class*="span"],.row-fluid table td[class*="span"],.row-fluid table th[class*="span"]{display:table-cell;float:none;margin-left:0;}
+.table td.span1,.table th.span1{float:none;width:44px;margin-left:0;}
+.table td.span2,.table th.span2{float:none;width:124px;margin-left:0;}
+.table td.span3,.table th.span3{float:none;width:204px;margin-left:0;}
+.table td.span4,.table th.span4{float:none;width:284px;margin-left:0;}
+.table td.span5,.table th.span5{float:none;width:364px;margin-left:0;}
+.table td.span6,.table th.span6{float:none;width:444px;margin-left:0;}
+.table td.span7,.table th.span7{float:none;width:524px;margin-left:0;}
+.table td.span8,.table th.span8{float:none;width:604px;margin-left:0;}
+.table td.span9,.table th.span9{float:none;width:684px;margin-left:0;}
+.table td.span10,.table th.span10{float:none;width:764px;margin-left:0;}
+.table td.span11,.table th.span11{float:none;width:844px;margin-left:0;}
+.table td.span12,.table th.span12{float:none;width:924px;margin-left:0;}
+.table tbody tr.success>td{background-color:#dff0d8;}
+.table tbody tr.error>td{background-color:#f2dede;}
+.table tbody tr.warning>td{background-color:#fcf8e3;}
+.table tbody tr.info>td{background-color:#d9edf7;}
+.table-hover tbody tr.success:hover>td{background-color:#d0e9c6;}
+.table-hover tbody tr.error:hover>td{background-color:#ebcccc;}
+.table-hover tbody tr.warning:hover>td{background-color:#faf2cc;}
+.table-hover tbody tr.info:hover>td{background-color:#c4e3f3;}
+form{margin:0 0 20px;}
+fieldset{padding:0;margin:0;border:0;}
+legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333333;border:0;border-bottom:1px solid #e5e5e5;}legend small{font-size:15px;color:#999999;}
+label,input,button,select,textarea{font-size:14px;font-weight:normal;line-height:20px;}
+input,button,select,textarea{font-family:marquette-light,'Helvetica Neue',Helvetica,Arial,sans-serif;}
+label{display:block;margin-bottom:5px;}
+select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555555;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;vertical-align:middle;}
+input,textarea,.uneditable-input{width:206px;}
+textarea{height:auto;}
+textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#ffffff;border:1px solid #cccccc;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-webkit-transition:border linear .2s, box-shadow linear .2s;-moz-transition:border linear .2s, box-shadow linear .2s;-o-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="num
 ber"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82, 168, 236, 0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);}
+input[type="radio"],input[type="checkbox"]{margin:4px 0 0;*margin-top:0;margin-top:1px \9;line-height:normal;}
+input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto;}
+select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px;}
+select{width:220px;border:1px solid #cccccc;background-color:#ffffff;}
+select[multiple],select[size]{height:auto;}
+select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
+.uneditable-input,.uneditable-textarea{color:#999999;background-color:#fcfcfc;border-color:#cccccc;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);cursor:not-allowed;}
+.uneditable-input{overflow:hidden;white-space:nowrap;}
+.uneditable-textarea{width:auto;height:auto;}
+input:-moz-placeholder,textarea:-moz-placeholder{color:#999999;}
+input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999999;}
+input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999999;}
+.radio,.checkbox{min-height:20px;padding-left:20px;}
+.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-20px;}
+.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px;}
+.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle;}
+.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px;}
+.input-mini{width:60px;}
+.input-small{width:90px;}
+.input-medium{width:150px;}
+.input-large{width:210px;}
+.input-xlarge{width:270px;}
+.input-xxlarge{width:530px;}
+input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0;}
+.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block;}
+input,textarea,.uneditable-input{margin-left:0;}
+.controls-row [class*="span"]+[class*="span"]{margin-left:20px;}
+input.span12,textarea.span12,.uneditable-input.span12{width:926px;}
+input.span11,textarea.span11,.uneditable-input.span11{width:846px;}
+input.span10,textarea.span10,.uneditable-input.span10{width:766px;}
+input.span9,textarea.span9,.uneditable-input.span9{width:686px;}
+input.span8,textarea.span8,.uneditable-input.span8{width:606px;}
+input.span7,textarea.span7,.uneditable-input.span7{width:526px;}
+input.span6,textarea.span6,.uneditable-input.span6{width:446px;}
+input.span5,textarea.span5,.uneditable-input.span5{width:366px;}
+input.span4,textarea.span4,.uneditable-input.span4{width:286px;}
+input.span3,textarea.span3,.uneditable-input.span3{width:206px;}
+input.span2,textarea.span2,.uneditable-input.span2{width:126px;}
+input.span1,textarea.span1,.uneditable-input.span1{width:46px;}
+.controls-row{*zoom:1;}.controls-row:before,.controls-row:after{display:table;content:"";line-height:0;}
+.controls-row:after{clear:both;}
+.controls-row [class*="span"],.row-fluid .controls-row [class*="span"]{float:left;}
+.controls-row .checkbox[class*="span"],.controls-row .radio[class*="span"]{padding-top:5px;}
+input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eeeeee;}
+input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent;}
+.control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853;}
+.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853;}
+.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #dbc59e;}
+.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853;}
+.control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48;}
+.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48;}
+.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #d59392;}
+.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48;}
+.control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847;}
+.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847;}
+.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7aba7b;}
+.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847;}
+.control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad;}
+.control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad;}
+.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7ab5d3;}
+.control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad;}
+input:focus:invalid,textarea:focus:invalid,select:focus:invalid{color:#b94a48;border-color:#ee5f5b;}input:focus:invalid:focus,textarea:focus:invalid:focus,select:focus:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;}
+.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1;}.form-actions:before,.form-actions:after{display:table;content:"";line-height:0;}
+.form-actions:after{clear:both;}
+.help-block,.help-inline{color:#595959;}
+.help-block{display:block;margin-bottom:10px;}
+.help-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;padding-left:5px;}
+.input-append,.input-prepend{display:inline-block;margin-bottom:10px;vertical-align:middle;font-size:0;white-space:nowrap;}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input,.input-append .dropdown-menu,.input-prepend .dropdown-menu,.input-append .popover,.input-prepend .popover{font-size:14px;}
+.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:top;-webkit-border-radius:0 0 0 0;-moz-border-radius:0 0 0 0;border-radius:0 0 0 0;}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2;}
+.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #ffffff;background-color:#eeeeee;border:1px solid #ccc;}
+.input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn,.input-append .btn-group>.dropdown-toggle,.input-prepend .btn-group>.dropdown-toggle{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546;}
+.input-prepend .add-on,.input-prepend .btn{margin-right:-1px;}
+.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:0 0 0 0;-moz-border-radius:0 0 0 0;border-radius:0 0 0 0;}
+.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:0 0 0 0;-moz-border-radius:0 0 0 0;border-radius:0 0 0 0;}.input-append input+.btn-group .btn:last-child,.input-append select+.btn-group .btn:last-child,.input-append .uneditable-input+.btn-group .btn:last-child{-webkit-border-radius:0 0 0 0;-moz-border-radius:0 0 0 0;border-radius:0 0 0 0;}
+.input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px;}
+.input-append .add-on:last-child,.input-append .btn:last-child,.input-append .btn-group:last-child>.dropdown-toggle{-webkit-border-radius:0 0 0 0;-moz-border-radius:0 0 0 0;border-radius:0 0 0 0;}
+.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn,.input-prepend.input-append .uneditable-input+.btn-group .btn{-webkit-border-radius:0 0 0 0;-moz-border-radius:0 0 0 0;border-radius:0 0 0 0;}
+.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:0 0 0 0;-moz-border-radius:0 0 0 0;border-radius:0 0 0 0;}
+.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 0 0 0;-moz-border-radius:0 0 0 0;border-radius:0 0 0 0;}
+.input-prepend.input-append .btn-group:first-child{margin-left:0;}
+input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}
+.form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px;}
+.form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0;}
+.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0;}
+.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px;}
+.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;*zoom:1;margin-bottom:0;vertical-align:middle;}
+.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none;}
+.form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block;}
+.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0;}
+.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle;}
+.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0;}
+.control-group{margin-bottom:10px;}
+legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate;}
+.form-horizontal .control-group{margin-bottom:20px;*zoom:1;}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:"";line-height:0;}
+.form-horizontal .control-group:after{clear:both;}
+.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right;}
+.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0;}.form-horizontal .controls:first-child{*padding-left:180px;}
+.form-horizontal .help-block{margin-bottom:0;}
+.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block,.form-horizontal .uneditable-input+.help-block,.form-horizontal .input-prepend+.help-block,.form-horizontal .input-append+.help-block{margin-top:10px;}
+.form-horizontal .form-actions{padding-left:180px;}
+.btn{display:inline-block;*display:inline;*zoom:1;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333333;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);background-color:#f5f5f5;background-image:-moz-linear-gradient(top, #ffffff, #e6e6e6);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(top, #ffffff, #e6e6e6);background-image:-o-linear-gradient(top, #ffffff, #e6e6e6);background-image:linear-gradient(to bottom, #ffffff, #e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);border:1px solid #cccccc;*border:0;border-bottom-color:#b3b3b3;-w
 ebkit-border-radius:0;-moz-border-radius:0;border-radius:0;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);}.btn:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333333;background-color:#e6e6e6;*background-color:#d9d9d9;}
+.btn:active,.btn.active{background-color:#cccccc \9;}
+.btn:first-child{*margin-left:0;}
+.btn:hover,.btn:focus{color:#333333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position 0.1s linear;-moz-transition:background-position 0.1s linear;-o-transition:background-position 0.1s linear;transition:background-position 0.1s linear;}
+.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
+.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);}
+.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
+.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.btn-large [class^="icon-"],.btn-large [class*=" icon-"]{margin-top:4px;}
+.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.btn-small [class^="icon-"],.btn-small [class*=" icon-"]{margin-top:0;}
+.btn-mini [class^="icon-"],.btn-mini [class*=" icon-"]{margin-top:-1px;}
+.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.btn-block{display:block;width:100%;padding-left:0;padding-right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}
+.btn-block+.btn-block{margin-top:5px;}
+input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%;}
+.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255, 255, 255, 0.75);}
+.btn-primary{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#006dcc;background-image:-moz-linear-gradient(top, #0088cc, #0044cc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));background-image:-webkit-linear-gradient(top, #0088cc, #0044cc);background-image:-o-linear-gradient(top, #0088cc, #0044cc);background-image:linear-gradient(to bottom, #0088cc, #0044cc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);border-color:#0044cc #0044cc #002a80;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#0044cc;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#ffffff;background-color:#0044cc;*background-color:#003bb3;}
+.btn-primary:active,.btn-primary.active{background-color:#003399 \9;}
+.btn-warning{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(to bottom, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#f89406;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#ffffff;background-color:#f89406;*background-color:#df8505;}
+.btn-warning:active,.btn-warning.active{background-color:#c67605 \9;}
+.btn-danger{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#da4f49;background-image:-moz-linear-gradient(top, #ee5f5b, #bd362f);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));background-image:-webkit-linear-gradient(top, #ee5f5b, #bd362f);background-image:-o-linear-gradient(top, #ee5f5b, #bd362f);background-image:linear-gradient(to bottom, #ee5f5b, #bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);border-color:#bd362f #bd362f #802420;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#bd362f;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#ffffff;background-color:#bd362f;*background-color:#a9302a;}
+.btn-danger:active,.btn-danger.active{background-color:#942a25 \9;}
+.btn-success{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#5bb75b;background-image:-moz-linear-gradient(top, #62c462, #51a351);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));background-image:-webkit-linear-gradient(top, #62c462, #51a351);background-image:-o-linear-gradient(top, #62c462, #51a351);background-image:linear-gradient(to bottom, #62c462, #51a351);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);border-color:#51a351 #51a351 #387038;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#51a351;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#ffffff;background-color:#51a351;*background-color:#499249;}
+.btn-success:active,.btn-success.active{background-color:#408140 \9;}
+.btn-info{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#49afcd;background-image:-moz-linear-gradient(top, #5bc0de, #2f96b4);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));background-image:-webkit-linear-gradient(top, #5bc0de, #2f96b4);background-image:-o-linear-gradient(top, #5bc0de, #2f96b4);background-image:linear-gradient(to bottom, #5bc0de, #2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#2f96b4;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#ffffff;background-color:#2f96b4;*background-color:#2a85a0;}
+.btn-info:active,.btn-info.active{background-color:#24748c \9;}
+.btn-inverse{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#363636;background-image:-moz-linear-gradient(top, #444444, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222));background-image:-webkit-linear-gradient(top, #444444, #222222);background-image:-o-linear-gradient(top, #444444, #222222);background-image:linear-gradient(to bottom, #444444, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);border-color:#222222 #222222 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#222222;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-inverse:hover,.btn-inverse:focus,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#ffffff;background-color:#222222;*background-color:#151515;}
+.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9;}
+button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px;}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0;}
+button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px;}
+button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px;}
+button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px;}
+.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
+.btn-link{border-color:transparent;cursor:pointer;color:#0088cc;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.btn-link:hover,.btn-link:focus{color:#005580;text-decoration:underline;background-color:transparent;}
+.btn-link[disabled]:hover,.btn-link[disabled]:focus{color:#333333;text-decoration:none;}
+[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat;margin-top:1px;}
+.icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:focus>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>li>a:focus>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:focus>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"],.dropdown-submenu:focus>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png");}
+.icon-glass{background-position:0 0;}
+.icon-music{background-position:-24px 0;}
+.icon-search{background-position:-48px 0;}
+.icon-envelope{background-position:-72px 0;}
+.icon-heart{background-position:-96px 0;}
+.icon-star{background-position:-120px 0;}
+.icon-star-empty{background-position:-144px 0;}
+.icon-user{background-position:-168px 0;}
+.icon-film{background-position:-192px 0;}
+.icon-th-large{background-position:-216px 0;}
+.icon-th{background-position:-240px 0;}
+.icon-th-list{background-position:-264px 0;}
+.icon-ok{background-position:-288px 0;}
+.icon-remove{background-position:-312px 0;}
+.icon-zoom-in{background-position:-336px 0;}
+.icon-zoom-out{background-position:-360px 0;}
+.icon-off{background-position:-384px 0;}
+.icon-signal{background-position:-408px 0;}
+.icon-cog{background-position:-432px 0;}
+.icon-trash{background-position:-456px 0;}
+.icon-home{background-position:0 -24px;}
+.icon-file{background-position:-24px -24px;}
+.icon-time{background-position:-48px -24px;}
+.icon-road{background-position:-72px -24px;}
+.icon-download-alt{background-position:-96px -24px;}
+.icon-download{background-position:-120px -24px;}
+.icon-upload{background-position:-144px -24px;}
+.icon-inbox{background-position:-168px -24px;}
+.icon-play-circle{background-position:-192px -24px;}
+.icon-repeat{background-position:-216px -24px;}
+.icon-refresh{background-position:-240px -24px;}
+.icon-list-alt{background-position:-264px -24px;}
+.icon-lock{background-position:-287px -24px;}
+.icon-flag{background-position:-312px -24px;}
+.icon-headphones{background-position:-336px -24px;}
+.icon-volume-off{background-position:-360px -24px;}
+.icon-volume-down{background-position:-384px -24px;}
+.icon-volume-up{background-position:-408px -24px;}
+.icon-qrcode{background-position:-432px -24px;}
+.icon-barcode{background-position:-456px -24px;}
+.icon-tag{background-position:0 -48px;}
+.icon-tags{background-position:-25px -48px;}
+.icon-book{background-position:-48px -48px;}
+.icon-bookmark{background-position:-72px -48px;}
+.icon-print{background-position:-96px -48px;}
+.icon-camera{background-position:-120px -48px;}
+.icon-font{background-position:-144px -48px;}
+.icon-bold{background-position:-167px -48px;}
+.icon-italic{background-position:-192px -48px;}
+.icon-text-height{background-position:-216px -48px;}
+.icon-text-width{background-position:-240px -48px;}
+.icon-align-left{background-position:-264px -48px;}
+.icon-align-center{background-position:-288px -48px;}
+.icon-align-right{background-position:-312px -48px;}
+.icon-align-justify{background-position:-336px -48px;}
+.icon-list{background-position:-360px -48px;}
+.icon-indent-left{background-position:-384px -48px;}
+.icon-indent-right{background-position:-408px -48px;}
+.icon-facetime-video{background-position:-432px -48px;}
+.icon-picture{background-position:-456px -48px;}
+.icon-pencil{background-position:0 -72px;}
+.icon-map-marker{background-position:-24px -72px;}
+.icon-adjust{background-position:-48px -72px;}
+.icon-tint{background-position:-72px -72px;}
+.icon-edit{background-position:-96px -72px;}
+.icon-share{background-position:-120px -72px;}
+.icon-check{background-position:-144px -72px;}
+.icon-move{background-position:-168px -72px;}
+.icon-step-backward{background-position:-192px -72px;}
+.icon-fast-backward{background-position:-216px -72px;}
+.icon-backward{background-position:-240px -72px;}
+.icon-play{background-position:-264px -72px;}
+.icon-pause{background-position:-288px -72px;}
+.icon-stop{background-position:-312px -72px;}
+.icon-forward{background-position:-336px -72px;}
+.icon-fast-forward{background-position:-360px -72px;}
+.icon-step-forward{background-position:-384px -72px;}
+.icon-eject{background-position:-408px -72px;}
+.icon-chevron-left{background-position:-432px -72px;}
+.icon-chevron-right{background-position:-456px -72px;}
+.icon-plus-sign{background-position:0 -96px;}
+.icon-minus-sign{background-position:-24px -96px;}
+.icon-remove-sign{background-position:-48px -96px;}
+.icon-ok-sign{background-position:-72px -96px;}
+.icon-question-sign{background-position:-96px -96px;}
+.icon-info-sign{background-position:-120px -96px;}
+.icon-screenshot{background-position:-144px -96px;}
+.icon-remove-circle{background-position:-168px -96px;}
+.icon-ok-circle{background-position:-192px -96px;}
+.icon-ban-circle{background-position:-216px -96px;}
+.icon-arrow-left{background-position:-240px -96px;}
+.icon-arrow-right{background-position:-264px -96px;}
+.icon-arrow-up{background-position:-289px -96px;}
+.icon-arrow-down{background-position:-312px -96px;}
+.icon-share-alt{background-position:-336px -96px;}
+.icon-resize-full{background-position:-360px -96px;}
+.icon-resize-small{background-position:-384px -96px;}
+.icon-plus{background-position:-408px -96px;}
+.icon-minus{background-position:-433px -96px;}
+.icon-asterisk{background-position:-456px -96px;}
+.icon-exclamation-sign{background-position:0 -120px;}
+.icon-gift{background-position:-24px -120px;}
+.icon-leaf{background-position:-48px -120px;}
+.icon-fire{background-position:-72px -120px;}
+.icon-eye-open{background-position:-96px -120px;}
+.icon-eye-close{background-position:-120px -120px;}
+.icon-warning-sign{background-position:-144px -120px;}
+.icon-plane{background-position:-168px -120px;}
+.icon-calendar{background-position:-192px -120px;}
+.icon-random{background-position:-216px -120px;width:16px;}
+.icon-comment{background-position:-240px -120px;}
+.icon-magnet{background-position:-264px -120px;}
+.icon-chevron-up{background-position:-288px -120px;}
+.icon-chevron-down{background-position:-313px -119px;}
+.icon-retweet{background-position:-336px -120px;}
+.icon-shopping-cart{background-position:-360px -120px;}
+.icon-folder-close{background-position:-384px -120px;width:16px;}
+.icon-folder-open{background-position:-408px -120px;width:16px;}
+.icon-resize-vertical{background-position:-432px -119px;}
+.icon-resize-horizontal{background-position:-456px -118px;}
+.icon-hdd{background-position:0 -144px;}
+.icon-bullhorn{background-position:-24px -144px;}
+.icon-bell{background-position:-48px -144px;}
+.icon-certificate{background-position:-72px -144px;}
+.icon-thumbs-up{background-position:-96px -144px;}
+.icon-thumbs-down{background-position:-120px -144px;}
+.icon-hand-right{background-position:-144px -144px;}
+.icon-hand-left{background-position:-168px -144px;}
+.icon-hand-up{background-position:-192px -144px;}
+.icon-hand-down{background-position:-216px -144px;}
+.icon-circle-arrow-right{background-position:-240px -144px;}
+.icon-circle-arrow-left{background-position:-264px -144px;}
+.icon-circle-arrow-up{background-position:-288px -144px;}
+.icon-circle-arrow-down{background-position:-312px -144px;}
+.icon-globe{background-position:-336px -144px;}
+.icon-wrench{background-position:-360px -144px;}
+.icon-tasks{background-position:-384px -144px;}
+.icon-filter{background-position:-408px -144px;}
+.icon-briefcase{background-position:-432px -144px;}
+.icon-fullscreen{background-position:-456px -144px;}
+.btn-group{position:relative;display:inline-block;*display:inline;*zoom:1;font-size:0;vertical-align:middle;white-space:nowrap;*margin-left:.3em;}.btn-group:first-child{*margin-left:0;}
+.btn-group+.btn-group{margin-left:5px;}
+.btn-toolbar{font-size:0;margin-top:10px;margin-bottom:10px;}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group{margin-left:5px;}
+.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.btn-group>.btn+.btn{margin-left:-1px;}
+.btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px;}
+.btn-group>.btn-mini{font-size:10.5px;}
+.btn-group>.btn-small{font-size:11.9px;}
+.btn-group>.btn-large{font-size:17.5px;}
+.btn-group>.btn:first-child{margin-left:0;-webkit-border-top-left-radius:0;-moz-border-radius-topleft:0;border-top-left-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;}
+.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:0;-moz-border-radius-topright:0;border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;}
+.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-top-left-radius:0;-moz-border-radius-topleft:0;border-top-left-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;}
+.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:0;-moz-border-radius-topright:0;border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;}
+.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2;}
+.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0;}
+.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);*padding-top:5px;*padding-bottom:5px;}
+.btn-group>.btn-mini+.dropdown-toggle{padding-left:5px;padding-right:5px;*padding-top:2px;*padding-bottom:2px;}
+.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px;}
+.btn-group>.btn-large+.dropdown-toggle{padding-left:12px;padding-right:12px;*padding-top:7px;*padding-bottom:7px;}
+.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);}
+.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6;}
+.btn-group.open .btn-primary.dropdown-toggle{background-color:#0044cc;}
+.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406;}
+.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f;}
+.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351;}
+.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4;}
+.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222222;}
+.btn .caret{margin-top:8px;margin-left:0;}
+.btn-large .caret{margin-top:6px;}
+.btn-large .caret{border-left-width:5px;border-right-width:5px;border-top-width:5px;}
+.btn-mini .caret,.btn-small .caret{margin-top:8px;}
+.dropup .btn-large .caret{border-bottom-width:5px;}
+.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;}
+.btn-group-vertical{display:inline-block;*display:inline;*zoom:1;}
+.btn-group-vertical>.btn{display:block;float:none;max-width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.btn-group-vertical>.btn+.btn{margin-left:0;margin-top:-1px;}
+.btn-group-vertical>.btn:first-child{-webkit-border-radius:0 0 0 0;-moz-border-radius:0 0 0 0;border-radius:0 0 0 0;}
+.btn-group-vertical>.btn:last-child{-webkit-border-radius:0 0 0 0;-moz-border-radius:0 0 0 0;border-radius:0 0 0 0;}
+.btn-group-vertical>.btn-large:first-child{-webkit-border-radius:0 0 0 0;-moz-border-radius:0 0 0 0;border-radius:0 0 0 0;}
+.btn-group-vertical>.btn-large:last-child{-webkit-border-radius:0 0 0 0;-moz-border-radius:0 0 0 0;border-radius:0 0 0 0;}
+.nav{margin-left:0;margin-bottom:20px;list-style:none;}
+.nav>li>a{display:block;}
+.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eeeeee;}
+.nav>li>a>img{max-width:none;}
+.nav>.pull-right{float:right;}
+.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999999;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);text-transform:uppercase;}
+.nav li+.nav-header{margin-top:9px;}
+.nav-list{padding-left:15px;padding-right:15px;margin-bottom:0;}
+.nav-list>li>a,.nav-list .nav-header{margin-left:-15px;margin-right:-15px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}
+.nav-list>li>a{padding:3px 15px;}
+.nav-list>.active>a,.nav-list>.active>a:hover,.nav-list>.active>a:focus{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.2);background-color:#0088cc;}
+.nav-list [class^="icon-"],.nav-list [class*=" icon-"]{margin-right:2px;}
+.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;}
+.nav-tabs,.nav-pills{*zoom:1;}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:"";line-height:0;}
+.nav-tabs:after,.nav-pills:after{clear:both;}
+.nav-tabs>li,.nav-pills>li{float:left;}
+.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px;}
+.nav-tabs{border-bottom:1px solid #ddd;}
+.nav-tabs>li{margin-bottom:-1px;}
+.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}.nav-tabs>li>a:hover,.nav-tabs>li>a:focus{border-color:#eeeeee #eeeeee #dddddd;}
+.nav-tabs>.active>a,.nav-tabs>.active>a:hover,.nav-tabs>.active>a:focus{color:#555555;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default;}
+.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}
+.nav-pills>.active>a,.nav-pills>.active>a:hover,.nav-pills>.active>a:focus{color:#ffffff;background-color:#0088cc;}
+.nav-stacked>li{float:none;}
+.nav-stacked>li>a{margin-right:0;}
+.nav-tabs.nav-stacked{border-bottom:0;}
+.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;}
+.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;}
+.nav-tabs.nav-stacked>li>a:hover,.nav-tabs.nav-stacked>li>a:focus{border-color:#ddd;z-index:2;}
+.nav-pills.nav-stacked>li>a{margin-bottom:3px;}
+.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px;}
+.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;}
+.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
+.nav .dropdown-toggle .caret{border-top-color:#0088cc;border-bottom-color:#0088cc;margin-top:6px;}
+.nav .dropdown-toggle:hover .caret,.nav .dropdown-toggle:focus .caret{border-top-color:#005580;border-bottom-color:#005580;}
+.nav-tabs .dropdown-toggle .caret{margin-top:8px;}
+.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff;}
+.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555555;border-bottom-color:#555555;}
+.nav>.dropdown.active>a:hover,.nav>.dropdown.active>a:focus{cursor:pointer;}
+.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover,.nav>li.dropdown.open.active>a:focus{color:#ffffff;background-color:#999999;border-color:#999999;}
+.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret,.nav li.dropdown.open a:focus .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;opacity:1;filter:alpha(opacity=100);}
+.tabs-stacked .open>a:hover,.tabs-stacked .open>a:focus{border-color:#999999;}
+.tabbable{*zoom:1;}.tabbable:before,.tabbable:after{display:table;content:"";line-height:0;}
+.tabbable:after{clear:both;}
+.tab-content{overflow:auto;}
+.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0;}
+.tab-content>.tab-pane,.pill-content>.pill-pane{display:none;}
+.tab-content>.active,.pill-content>.active{display:block;}
+.tabs-below>.nav-tabs{border-top:1px solid #ddd;}
+.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0;}
+.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}.tabs-below>.nav-tabs>li>a:hover,.tabs-below>.nav-tabs>li>a:focus{border-bottom-color:transparent;border-top-color:#ddd;}
+.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover,.tabs-below>.nav-tabs>.active>a:focus{border-color:transparent #ddd #ddd #ddd;}
+.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none;}
+.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px;}
+.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd;}
+.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;}
+.tabs-left>.nav-tabs>li>a:hover,.tabs-left>.nav-tabs>li>a:focus{border-color:#eeeeee #dddddd #eeeeee #eeeeee;}
+.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover,.tabs-left>.nav-tabs .active>a:focus{border-color:#ddd transparent #ddd #ddd;*border-right-color:#ffffff;}
+.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd;}
+.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
+.tabs-right>.nav-tabs>li>a:hover,.tabs-right>.nav-tabs>li>a:focus{border-color:#eeeeee #eeeeee #eeeeee #dddddd;}
+.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover,.tabs-right>.nav-tabs .active>a:focus{border-color:#ddd #ddd #ddd transparent;*border-left-color:#ffffff;}
+.nav>.disabled>a{color:#999999;}
+.nav>.disabled>a:hover,.nav>.disabled>a:focus{text-decoration:none;background-color:transparent;cursor:default;}
+.navbar{overflow:visible;margin-bottom:20px;*position:relative;*z-index:2;}
+.navbar-inner{min-height:40px;padding-left:20px;padding-right:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top, #ffffff, #f2f2f2);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2));background-image:-webkit-linear-gradient(top, #ffffff, #f2f2f2);background-image:-o-linear-gradient(top, #ffffff, #f2f2f2);background-image:linear-gradient(to bottom, #ffffff, #f2f2f2);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);border:1px solid #d4d4d4;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:0 1px 4px rgba(0, 0, 0, 0.065);-moz-box-shadow:0 1px 4px rgba(0, 0, 0, 0.065);box-shadow:0 1px 4px rgba(0, 0, 0, 0.065);*zoom:1;}.navbar-inner:before,.navbar-inner:after{display:table;content:"";line-height:0;}
+.navbar-inner:after{clear:both;}
+.navbar .container{width:auto;}
+.nav-collapse.collapse{height:auto;overflow:visible;}
+.navbar .brand{float:left;display:block;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#777777;text-shadow:0 1px 0 #ffffff;}.navbar .brand:hover,.navbar .brand:focus{text-decoration:none;}
+.navbar-text{margin-bottom:0;line-height:40px;color:#777777;}
+.navbar-link{color:#777777;}.navbar-link:hover,.navbar-link:focus{color:#333333;}
+.navbar .divider-vertical{height:40px;margin:0 9px;border-left:1px solid #f2f2f2;border-right:1px solid #ffffff;}
+.navbar .btn,.navbar .btn-group{margin-top:5px;}
+.navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn,.navbar .input-prepend .btn-group,.navbar .input-append .btn-group{margin-top:0;}
+.navbar-form{margin-bottom:0;*zoom:1;}.navbar-form:before,.navbar-form:after{display:table;content:"";line-height:0;}
+.navbar-form:after{clear:both;}
+.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px;}
+.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0;}
+.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px;}
+.navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap;}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0;}
+.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0;}.navbar-search .search-query{margin-bottom:0;padding:4px 14px;font-family:marquette-light,'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}
+.navbar-static-top{position:static;margin-bottom:0;}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0;}
+.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px;}
+.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0;}
+.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-left:0;padding-right:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;}
+.navbar-fixed-top{top:0;}
+.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:0 1px 10px rgba(0,0,0,.1);-moz-box-shadow:0 1px 10px rgba(0,0,0,.1);box-shadow:0 1px 10px rgba(0,0,0,.1);}
+.navbar-fixed-bottom{bottom:0;}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:0 -1px 10px rgba(0,0,0,.1);-moz-box-shadow:0 -1px 10px rgba(0,0,0,.1);box-shadow:0 -1px 10px rgba(0,0,0,.1);}
+.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0;}
+.navbar .nav.pull-right{float:right;margin-right:0;}
+.navbar .nav>li{float:left;}
+.navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#777777;text-decoration:none;text-shadow:0 1px 0 #ffffff;}
+.navbar .nav .dropdown-toggle .caret{margin-top:8px;}
+.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{background-color:transparent;color:#333333;text-decoration:none;}
+.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0, 0, 0, 0.125);-moz-box-shadow:inset 0 3px 8px rgba(0, 0, 0, 0.125);box-shadow:inset 0 3px 8px rgba(0, 0, 0, 0.125);}
+.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-left:5px;margin-right:5px;color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#ededed;background-image:-moz-linear-gradient(top, #f2f2f2, #e5e5e5);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5));background-image:-webkit-linear-gradient(top, #f2f2f2, #e5e5e5);background-image:-o-linear-gradient(top, #f2f2f2, #e5e5e5);background-image:linear-gradient(to bottom, #f2f2f2, #e5e5e5);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#e5e5e5;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 r
 gba(255,255,255,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);}.navbar .btn-navbar:hover,.navbar .btn-navbar:focus,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#ffffff;background-color:#e5e5e5;*background-color:#d9d9d9;}
+.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#cccccc \9;}
+.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);-moz-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);}
+.btn-navbar .icon-bar+.icon-bar{margin-top:3px;}
+.navbar .nav>li>.dropdown-menu:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0, 0, 0, 0.2);position:absolute;top:-7px;left:9px;}
+.navbar .nav>li>.dropdown-menu:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #ffffff;position:absolute;top:-6px;left:10px;}
+.navbar-fixed-bottom .nav>li>.dropdown-menu:before{border-top:7px solid #ccc;border-top-color:rgba(0, 0, 0, 0.2);border-bottom:0;bottom:-7px;top:auto;}
+.navbar-fixed-bottom .nav>li>.dropdown-menu:after{border-top:6px solid #ffffff;border-bottom:0;bottom:-6px;top:auto;}
+.navbar .nav li.dropdown>a:hover .caret,.navbar .nav li.dropdown>a:focus .caret{border-top-color:#333333;border-bottom-color:#333333;}
+.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{background-color:#e5e5e5;color:#555555;}
+.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777777;border-bottom-color:#777777;}
+.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555555;border-bottom-color:#555555;}
+.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{left:auto;right:0;}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{left:auto;right:12px;}
+.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{left:auto;right:13px;}
+.navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{left:auto;right:100%;margin-left:0;margin-right:-1px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px;}
+.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top, #222222, #111111);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111));background-image:-webkit-linear-gradient(top, #222222, #111111);background-image:-o-linear-gradient(top, #222222, #111111);background-image:linear-gradient(to bottom, #222222, #111111);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0);border-color:#252525;}
+.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999999;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover,.navbar-inverse .brand:focus,.navbar-inverse .nav>li>a:focus{color:#ffffff;}
+.navbar-inverse .brand{color:#999999;}
+.navbar-inverse .navbar-text{color:#999999;}
+.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{background-color:transparent;color:#ffffff;}
+.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#ffffff;background-color:#111111;}
+.navbar-inverse .navbar-link{color:#999999;}.navbar-inverse .navbar-link:hover,.navbar-inverse .navbar-link:focus{color:#ffffff;}
+.navbar-inverse .divider-vertical{border-left-color:#111111;border-right-color:#222222;}
+.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{background-color:#111111;color:#ffffff;}
+.navbar-inverse .nav li.dropdown>a:hover .caret,.navbar-inverse .nav li.dropdown>a:focus .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;}
+.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999999;border-bottom-color:#999999;}
+.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;}
+.navbar-inverse .navbar-search .search-query{color:#ffffff;background-color:#515151;border-color:#111111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);box-shadow:inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none;}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#cccccc;}
+.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#cccccc;}
+.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#cccccc;}
+.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333333;text-shadow:0 1px 0 #ffffff;background-color:#ffffff;border:0;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);outline:0;}
+.navbar-inverse .btn-navbar{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#0e0e0e;background-image:-moz-linear-gradient(top, #151515, #040404);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404));background-image:-webkit-linear-gradient(top, #151515, #040404);background-image:-o-linear-gradient(top, #151515, #040404);background-image:linear-gradient(to bottom, #151515, #040404);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0);border-color:#040404 #040404 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#040404;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{
 color:#ffffff;background-color:#040404;*background-color:#000000;}
+.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000000 \9;}
+.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}.breadcrumb>li{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 0 #ffffff;}.breadcrumb>li>.divider{padding:0 5px;color:#ccc;}
+.breadcrumb>.active{color:#999999;}
+.pagination{margin:20px 0;}
+.pagination ul{display:inline-block;*display:inline;*zoom:1;margin-left:0;margin-bottom:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);}
+.pagination ul>li{display:inline;}
+.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#ffffff;border:1px solid #dddddd;border-left-width:0;}
+.pagination ul>li>a:hover,.pagination ul>li>a:focus,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5;}
+.pagination ul>.active>a,.pagination ul>.active>span{color:#999999;cursor:default;}
+.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>a:focus{color:#999999;background-color:transparent;cursor:default;}
+.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-top-left-radius:0;-moz-border-radius-topleft:0;border-top-left-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;}
+.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:0;-moz-border-radius-topright:0;border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;}
+.pagination-centered{text-align:center;}
+.pagination-right{text-align:right;}
+.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px;}
+.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-top-left-radius:0;-moz-border-radius-topleft:0;border-top-left-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;}
+.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:0;-moz-border-radius-topright:0;border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;}
+.pagination-mini ul>li:first-child>a,.pagination-small ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>span{-webkit-border-top-left-radius:0;-moz-border-radius-topleft:0;border-top-left-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;}
+.pagination-mini ul>li:last-child>a,.pagination-small ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:0;-moz-border-radius-topright:0;border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;}
+.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px;}
+.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px;}
+.pager{margin:20px 0;list-style:none;text-align:center;*zoom:1;}.pager:before,.pager:after{display:table;content:"";line-height:0;}
+.pager:after{clear:both;}
+.pager li{display:inline;}
+.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}
+.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#f5f5f5;}
+.pager .next>a,.pager .next>span{float:right;}
+.pager .previous>a,.pager .previous>span{float:left;}
+.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999999;background-color:#fff;cursor:default;}
+.thumbnails{margin-left:-20px;list-style:none;*zoom:1;}.thumbnails:before,.thumbnails:after{display:table;content:"";line-height:0;}
+.thumbnails:after{clear:both;}
+.row-fluid .thumbnails{margin-left:0;}
+.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px;}
+.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.055);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.055);box-shadow:0 1px 3px rgba(0, 0, 0, 0.055);-webkit-transition:all 0.2s ease-in-out;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;}
+a.thumbnail:hover,a.thumbnail:focus{border-color:#0088cc;-webkit-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);-moz-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);}
+.thumbnail>img{display:block;max-width:100%;margin-left:auto;margin-right:auto;}
+.thumbnail .caption{padding:9px;color:#555555;}
+.alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.alert,.alert h4{color:#c09853;}
+.alert h4{margin:0;}
+.alert .close{position:relative;top:-2px;right:-21px;line-height:20px;}
+.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#468847;}
+.alert-success h4{color:#468847;}
+.alert-danger,.alert-error{background-color:#f2dede;border-color:#eed3d7;color:#b94a48;}
+.alert-danger h4,.alert-error h4{color:#b94a48;}
+.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#3a87ad;}
+.alert-info h4{color:#3a87ad;}
+.alert-block{padding-top:14px;padding-bottom:14px;}
+.alert-block>p,.alert-block>ul{margin-bottom:0;}
+.alert-block p+p{margin-top:5px;}
+@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-o-keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}@keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f7f7f7;background-image:-moz-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));background-image:-webkit-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-o-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:linear-gradient(to bottom, #f5f5f5, #f9f9f9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=
 '#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.progress .bar{width:0%;height:100%;color:#ffffff;float:left;font-size:12px;text-align:center;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top, #149bdf, #0480be);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));background-image:-webkit-linear-gradient(top, #149bdf, #0480be);background-image:-o-linear-gradient(top, #149bdf, #0480be);background-image:linear-gradient(to bottom, #149bdf, #0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width 0.6s ease;-moz-transition:width 0.6s ease;-o-transition:width 0.6s ease;transition:width 0.6s ease;}
+.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);}
+.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, r
 gba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px;}
+.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:pro

<TRUNCATED>

[05/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/bootstrap/custom/js/bootstrap.min.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/bootstrap/custom/js/bootstrap.min.js b/portal/js/libs/bootstrap/custom/js/bootstrap.min.js
new file mode 100755
index 0000000..319a85d
--- /dev/null
+++ b/portal/js/libs/bootstrap/custom/js/bootstrap.min.js
@@ -0,0 +1,7 @@
+/**
+* Bootstrap.js by @fat & @mdo
+* plugins: bootstrap-transition.js, bootstrap-modal.js, bootstrap-dropdown.js, bootstrap-scrollspy.js, bootstrap-tab.js, bootstrap-tooltip.js, bootstrap-popover.js, bootstrap-affix.js, bootstrap-alert.js, bootstrap-button.js, bootstrap-collapse.js, bootstrap-carousel.js, bootstrap-typeahead.js
+* Copyright 2012 Twitter, Inc.
+* http://www.apache.org/licenses/LICENSE-2.0.txt
+*/
+!function(a){a(function(){a.support.transition=function(){var a=function(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},c;for(c in b)if(a.style[c]!==undefined)return b[c]}();return a&&{end:a}}()})}(window.jQuery),!function(a){var b=function(b,c){this.options=c,this.$element=a(b).delegate('[data-dismiss="modal"]',"click.dismiss.modal",a.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};b.prototype={constructor:b,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var b=this,c=a.Event("show");this.$element.trigger(c);if(this.isShown||c.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.backdrop(function(){var c=a.support.transition&&b.$element.hasClass("fade");b.$element.parent().length||b.$element.appendTo(document.body),b.$element.show(),c&&b.$element[0]
 .offsetWidth,b.$element.addClass("in").attr("aria-hidden",!1),b.enforceFocus(),c?b.$element.one(a.support.transition.end,function(){b.$element.focus().trigger("shown")}):b.$element.focus().trigger("shown")})},hide:function(b){b&&b.preventDefault();var c=this;b=a.Event("hide"),this.$element.trigger(b);if(!this.isShown||b.isDefaultPrevented())return;this.isShown=!1,this.escape(),a(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),a.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var b=this;a(document).on("focusin.modal",function(a){b.$element[0]!==a.target&&!b.$element.has(a.target).length&&b.$element.focus()})},escape:function(){var a=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(b){b.which==27&&a.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var b=this,c=setTimeout(function(){b.$element.
 off(a.support.transition.end),b.hideModal()},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),b.hideModal()})},hideModal:function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a('<div class="modal-backdrop '+d+'" />').appendTo(document.body),this.$backdrop.click(this.options.backdrop=="static"?a.proxy(this.$element[0].focus,this.$element[0]):a.proxy(this.hide,this)),e&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in");if(!b)return;e?this.$backdrop.one(a.support.transition.end,b):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.e
 nd,b):b()):b&&b()}};var c=a.fn.modal;a.fn.modal=function(c){return this.each(function(){var d=a(this),e=d.data("modal"),f=a.extend({},a.fn.modal.defaults,d.data(),typeof c=="object"&&c);e||d.data("modal",e=new b(this,f)),typeof c=="string"?e[c]():f.show&&e.show()})},a.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());b.preventDefault(),e.modal(f).one("hide",function(){c.focus()})})}(window.jQuery),!function(a){function d(){a(".dropdown-backdrop").remove(),a(b).each(function(){e(a(this)).removeClass("open")})}function e(b){var c=b.attr("data-target"),d;c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,"")),d=c&&a(c);if(!d||!d.length)d=b.pare
 nt();return d}var b="[data-toggle=dropdown]",c=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(b){var c=a(this),f,g;if(c.is(".disabled, :disabled"))return;return f=e(c),g=f.hasClass("open"),d(),g||("ontouchstart"in document.documentElement&&a('<div class="dropdown-backdrop"/>').insertBefore(a(this)).on("click",d),f.toggleClass("open")),c.focus(),!1},keydown:function(c){var d,f,g,h,i,j;if(!/(38|40|27)/.test(c.keyCode))return;d=a(this),c.preventDefault(),c.stopPropagation();if(d.is(".disabled, :disabled"))return;h=e(d),i=h.hasClass("open");if(!i||i&&c.keyCode==27)return c.which==27&&h.find(b).focus(),d.click();f=a("[role=menu] li:not(.divider):visible a",h);if(!f.length)return;j=f.index(f.filter(":focus")),c.keyCode==38&&j>0&&j--,c.keyCode==40&&j<f.length-1&&j++,~j||(j=0),f.eq(j).focus()}};var f=a.fn.dropdown;a.fn.dropdown=function(b){return t
 his.each(function(){var d=a(this),e=d.data("dropdown");e||d.data("dropdown",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.dropdown.Constructor=c,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=f,this},a(document).on("click.dropdown.data-api",d).on("click.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.dropdown.data-api",b,c.prototype.toggle).on("keydown.dropdown.data-api",b+", [role=menu]",c.prototype.keydown)}(window.jQuery),!function(a){function b(b,c){var d=a.proxy(this.process,this),e=a(b).is("body")?a(window):a(b),f;this.options=a.extend({},a.fn.scrollspy.defaults,c),this.$scrollElement=e.on("scroll.scroll-spy.data-api",d),this.selector=(this.options.target||(f=a(b).attr("href"))&&f.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=a("body"),this.refresh(),this.process()}b.prototype={constructor:b,refresh:function(){var b=this,c;this.offsets=a([]),this.targets=a([]),c=this.$body.find(this.selector).map(function(){var 
 c=a(this),d=c.data("target")||c.attr("href"),e=/^#\w/.test(d)&&a(d);return e&&e.length&&[[e.position().top+(!a.isWindow(b.$scrollElement.get(0))&&b.$scrollElement.scrollTop()),d]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},process:function(){var a=this.$scrollElement.scrollTop()+this.options.offset,b=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,c=b-this.$scrollElement.height(),d=this.offsets,e=this.targets,f=this.activeTarget,g;if(a>=c)return f!=(g=e.last()[0])&&this.activate(g);for(g=d.length;g--;)f!=e[g]&&a>=d[g]&&(!d[g+1]||a<=d[g+1])&&this.activate(e[g])},activate:function(b){var c,d;this.activeTarget=b,a(this.selector).parent(".active").removeClass("active"),d=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',c=a(d).parent("li").addClass("active"),c.parent(".dropdown-menu").length&&(c=c.closest("li.dropdown").addClass("active")),c.trigger("activate")}};var c=a.fn.scrollsp
 y;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("scrollspy"),f=typeof c=="object"&&c;e||d.data("scrollspy",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.defaults={offset:10},a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),!function(a){var b=function(b){this.element=a(b)};b.prototype={constructor:b,show:function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target"),e,f,g;d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,""));if(b.parent("li").hasClass("active"))return;e=c.find(".active:last a")[0],g=a.Event("show",{relatedTarget:e}),b.trigger(g);if(g.isDefaultPrevented())return;f=a(d),this.activate(b.parent("li"),c),this.activate(f,f.parent(),function(){b.trigger({type:"shown",relatedTarget:e})})},activate:function(b,c,d){function g
 (){e.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),f?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var e=c.find("> .active"),f=d&&a.support.transition&&e.hasClass("fade");f?e.one(a.support.transition.end,g):g(),e.removeClass("in")}};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("tab");e||d.data("tab",e=new b(this)),typeof c=="string"&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(window.jQuery),!function(a){var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f,g,h,i;this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,g=this.options.trigger.split(" ");for
 (i=g.length;i--;)h=g[i],h=="click"?this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this)):h!="manual"&&(e=h=="hover"?"mouseenter":"focus",f=h=="hover"?"mouseleave":"blur",this.$element.on(e+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f+"."+this.type,this.options.selector,a.proxy(this.leave,this)));this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,this.$element.data(),b),b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c=a.fn[this.type].defaults,d={},e;this._options&&a.each(this._options,function(a,b){c[a]!=b&&(d[a]=b)},this),e=a(b.currentTarget)[this.type](d).data(this.type);if(!e.options.delay||!e.options.delay.show)return e.show();clearTimeout(this.timeout),e.hoverState="in",this.timeout=setTimeout(function(){e.hoverState=="in"&&e.show()},e.o
 ptions.delay.show)},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!c.options.delay||!c.options.delay.hide)return c.hide();c.hoverState="out",this.timeout=setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide)},show:function(){var b,c,d,e,f,g,h=a.Event("show");if(this.hasContent()&&this.enabled){this.$element.trigger(h);if(h.isDefaultPrevented())return;b=this.tip(),this.setContent(),this.options.animation&&b.addClass("fade"),f=typeof this.options.placement=="function"?this.options.placement.call(this,b[0],this.$element[0]):this.options.placement,b.detach().css({top:0,left:0,display:"block"}),this.options.container?b.appendTo(this.options.container):b.insertAfter(this.$element),c=this.getPosition(),d=b[0].offsetWidth,e=b[0].offsetHeight;switch(f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g=
 {top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}this.applyPlacement(g,f),this.$element.trigger("shown")}},applyPlacement:function(a,b){var c=this.tip(),d=c[0].offsetWidth,e=c[0].offsetHeight,f,g,h,i;c.offset(a).addClass(b).addClass("in"),f=c[0].offsetWidth,g=c[0].offsetHeight,b=="top"&&g!=e&&(a.top=a.top+e-g,i=!0),b=="bottom"||b=="top"?(h=0,a.left<0&&(h=a.left*-2,a.left=0,c.offset(a),f=c[0].offsetWidth,g=c[0].offsetHeight),this.replaceArrow(h-d+f,f,"left")):this.replaceArrow(g-e,g,"top"),i&&c.offset(a)},replaceArrow:function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},setContent:function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},hide:function(){function e(){var b=setTimeout(function(){c.off(a.support.transition.end).detach()},500);c.one(a.support.transition.end,function(){clearTimeout(b),c.detach()})}var b=this,c=this
 .tip(),d=a.Event("hide");this.$element.trigger(d);if(d.isDefaultPrevented())return;return c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?e():c.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var b=this.$element[0];return a.extend({},typeof b.getBoundingClientRect=="function"?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},getTitle:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title),a},tip:function(){return this.$tip=this.$tip||a(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(th
 is.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(b){var c=b?a(b.currentTarget)[this.type](this._options).data(this.type):this;c.tip().hasClass("in")?c.hide():c.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f=typeof c=="object"&&c;e||d.data("tooltip",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(window.jQuery),!function(a){var b=function(a,b){this.init("popover",a,b)};b.prototype=a.
 extend({},a.fn.tooltip.Constructor.prototype,{constructor:b,setContent:function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var a,b=this.$element,c=this.options;return a=(typeof c.content=="function"?c.content.call(b[0]):c.content)||b.attr("data-content"),a},tip:function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("popover"),f=typeof c=="object"&&c;e||d.data("popover",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.defaults=a.extend({},a.fn.tooltip.defaults,{placement:"right",tr
 igger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(window.jQuery),!function(a){var b=function(b,c){this.options=a.extend({},a.fn.affix.defaults,c),this.$window=a(window).on("scroll.affix.data-api",a.proxy(this.checkPosition,this)).on("click.affix.data-api",a.proxy(function(){setTimeout(a.proxy(this.checkPosition,this),1)},this)),this.$element=a(b),this.checkPosition()};b.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var b=a(document).height(),c=this.$window.scrollTop(),d=this.$element.offset(),e=this.options.offset,f=e.bottom,g=e.top,h="affix affix-top affix-bottom",i;typeof e!="object"&&(f=g=e),typeof g=="function"&&(g=e.top()),typeof f=="function"&&(f=e.bottom()),i=this.unpin!=null&&c+this.unpin<=d.top?!1:f!=null&&d.top+this.$element.height()>=b-f?"bottom":g!=null&&c<=g?"top":!1;if(thi
 s.affixed===i)return;this.affixed=i,this.unpin=i=="bottom"?d.top-c:null,this.$element.removeClass(h).addClass("affix"+(i?"-"+i:""))};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("affix"),f=typeof c=="object"&&c;e||d.data("affix",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.defaults={offset:0},a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(window.jQuery),!function(a){var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function f(){e.trigger("closed").remove()}var c=a(this),d=c.attr("data-target"),e;d||(d=c.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),e=a(d),b&&b.preventDefault(),e.length||(e=c.hasClass("alert")?c
 :c.parent()),e.trigger(b=a.Event("close"));if(b.isDefaultPrevented())return;e.removeClass("in"),a.support.transition&&e.hasClass("fade")?e.on(a.support.transition.end,f):f()};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.alert.data-api",b,c.prototype.close)}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){a=="loadingText"?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons-radio"]');a&&a.find(".active
 ").removeClass("active"),this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f=typeof c=="object"&&c;e||d.data("button",e=new b(this,f)),c=="toggle"?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle")})}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b,c,d,e;if(this.transitioning||this.$element.hasClass("in"))return;b=this.dimension(),c=a.ca
 melCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find("> .accordion-group > .in");if(d&&d.length){e=d.data("collapse");if(e&&e.transitioning)return;d.collapse("hide"),e||d.data("collapse",null)}this.$element[b](0),this.transition("addClass",a.Event("show"),"shown"),a.support.transition&&this.$element[b](this.$element[0][c])},hide:function(){var b;if(this.transitioning||!this.$element.hasClass("in"))return;b=this.dimension(),this.reset(this.$element[b]()),this.transition("removeClass",a.Event("hide"),"hidden"),this.$element[b](0)},reset:function(a){var b=this.dimension();return this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element[a!==null?"addClass":"removeClass"]("collapse"),this},transition:function(b,c,d){var e=this,f=function(){c.type=="show"&&e.reset(),e.transitioning=0,e.$element.trigger(d)};this.$element.trigger(c);if(c.isDefaultPrevented())return;this.transitioning=1,this.$element[b]("in"),a.support.transition&&this.$element.hasClass("c
 ollapse")?this.$element.one(a.support.transition.end,f):f()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=a.extend({},a.fn.collapse.defaults,d.data(),typeof c=="object"&&c);e||d.data("collapse",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c=a(this),d,e=c.attr("data-target")||b.preventDefault()||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":c.data();c[a(e).hasClass("in")?"addClass":"removeClass"]("collapsed"),a(e).collapse(f)})}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.options.pause=="hover"&&this.$e
 lement.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.prototype={cycle:function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(b){var c=this.getActiveIndex(),d=this;if(b>this.$items.length-1||b<0)return;return this.sliding?this.$element.one("slid",function(){d.to(b)}):c==b?this.pause().cycle():this.slide(b>c?"next":"prev",a(this.$items[b]))},pause:function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")
 },prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g=b=="next"?"left":"right",h=b=="next"?"first":"last",i=this,j;this.sliding=!0,f&&this.pause(),e=e.length?e:this.$element.find(".item")[h](),j=a.Event("slide",{relatedTarget:e[0],direction:g});if(e.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")}));if(a.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(j);if(j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),this.$element.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)})}else{this.$element.trigger(j);if(
 j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return f&&this.cycle(),this}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=a.extend({},a.fn.carousel.defaults,typeof c=="object"&&c),g=typeof c=="string"?c:f.slide;e||d.data("carousel",e=new b(this,f)),typeof c=="number"?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.defaults={interval:5e3,pause:"hover"},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),c.data()),g;e.carousel(f),(g=c.attr("data-slide-to"))&&e.data("carousel").pause().to(g).cycle(),b.preventDefault()})}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.o
 ptions=a.extend({},a.fn.typeahead.defaults,c),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=a(this.options.menu),this.shown=!1,this.listen()};b.prototype={constructor:b,select:function(){var a=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(a)).change(),this.hide()},updater:function(a){return a},show:function(){var b=a.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:b.top+b.height,left:b.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(b){var c;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(c=a.isFunction(this.source)?this.source(this.query
 ,a.proxy(this.process,this)):this.source,c?this.process(c):this)},process:function(b){var c=this;return b=a.grep(b,function(a){return c.matcher(a)}),b=this.sorter(b),b.length?this.render(b.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(a){return~a.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(a){var b=[],c=[],d=[],e;while(e=a.shift())e.toLowerCase().indexOf(this.query.toLowerCase())?~e.indexOf(this.query)?c.push(e):d.push(e):b.push(e);return b.concat(c,d)},highlighter:function(a){var b=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return a.replace(new RegExp("("+b+")","ig"),function(a,b){return"<strong>"+b+"</strong>"})},render:function(b){var c=this;return b=a(b).map(function(b,d){return b=a(c.options.item).attr("data-value",d),b.find("a").html(c.highlighter(d)),b[0]}),b.first().addClass("active"),this.$menu.html(b),this},next:function(b){var c=this.$menu.find(".active").removeClass("active"),d=c.next();d.length||(d=a
 (this.$menu.find("li")[0])),d.addClass("active")},prev:function(a){var b=this.$menu.find(".active").removeClass("active"),c=b.prev();c.length||(c=this.$menu.find("li").last()),c.addClass("active")},listen:function(){this.$element.on("focus",a.proxy(this.focus,this)).on("blur",a.proxy(this.blur,this)).on("keypress",a.proxy(this.keypress,this)).on("keyup",a.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",a.proxy(this.keydown,this)),this.$menu.on("click",a.proxy(this.click,this)).on("mouseenter","li",a.proxy(this.mouseenter,this)).on("mouseleave","li",a.proxy(this.mouseleave,this))},eventSupported:function(a){var b=a in this.$element;return b||(this.$element.setAttribute(a,"return;"),b=typeof this.$element[a]=="function"),b},move:function(a){if(!this.shown)return;switch(a.keyCode){case 9:case 13:case 27:a.preventDefault();break;case 38:a.preventDefault(),this.prev();break;case 40:a.preventDefault(),this.next()}a.stopPropagation()},keydown:function(b){
 this.suppressKeyPressRepeat=~a.inArray(b.keyCode,[40,38,9,13,27]),this.move(b)},keypress:function(a){if(this.suppressKeyPressRepeat)return;this.move(a)},keyup:function(a){switch(a.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}a.stopPropagation(),a.preventDefault()},focus:function(a){this.focused=!0},blur:function(a){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(a){a.stopPropagation(),a.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(b){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),a(b.currentTarget).addClass("active")},mouseleave:function(a){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var c=a.fn.typeahead;a.fn.typeahead=function(c){return this.each(function(){var d=a(this),e=d.data("typeahead"),f=typeof c=="object"&&c;e||d.data("typeahead",e=new b(this,f)),ty
 peof c=="string"&&e[c]()})},a.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},a.fn.typeahead.Constructor=b,a.fn.typeahead.noConflict=function(){return a.fn.typeahead=c,this},a(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(b){var c=a(this);if(c.data("typeahead"))return;c.typeahead(c.data())})}(window.jQuery)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/bootstrap/img/glyphicons-halflings-white.png
----------------------------------------------------------------------
diff --git a/portal/js/libs/bootstrap/img/glyphicons-halflings-white.png b/portal/js/libs/bootstrap/img/glyphicons-halflings-white.png
new file mode 100644
index 0000000..3bf6484
Binary files /dev/null and b/portal/js/libs/bootstrap/img/glyphicons-halflings-white.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/bootstrap/img/glyphicons-halflings.png
----------------------------------------------------------------------
diff --git a/portal/js/libs/bootstrap/img/glyphicons-halflings.png b/portal/js/libs/bootstrap/img/glyphicons-halflings.png
new file mode 100644
index 0000000..a996999
Binary files /dev/null and b/portal/js/libs/bootstrap/img/glyphicons-halflings.png differ


[22/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.1.5/angular-merge.min.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.1.5/angular-merge.min.js b/portal/js/libs/angular-1.1.5/angular-merge.min.js
new file mode 100644
index 0000000..4271a83
--- /dev/null
+++ b/portal/js/libs/angular-1.1.5/angular-merge.min.js
@@ -0,0 +1,8 @@
+/*! apigee-usergrid@1.1.0 2013-11-25 */
+(function(window,document,undefined){"use strict";var lowercase=function(string){return isString(string)?string.toLowerCase():string};var uppercase=function(string){return isString(string)?string.toUpperCase():string};var manualLowercase=function(s){return isString(s)?s.replace(/[A-Z]/g,function(ch){return String.fromCharCode(ch.charCodeAt(0)|32)}):s};var manualUppercase=function(s){return isString(s)?s.replace(/[a-z]/g,function(ch){return String.fromCharCode(ch.charCodeAt(0)&~32)}):s};if("i"!=="I".toLowerCase()){lowercase=manualLowercase;uppercase=manualUppercase}var msie=int((/msie (\d+)/.exec(lowercase(navigator.userAgent))||[])[1]),jqLite,jQuery,slice=[].slice,push=[].push,toString=Object.prototype.toString,_angular=window.angular,angular=window.angular||(window.angular={}),angularModule,nodeName_,uid=["0","0","0"];function noConflict(){var a=window.angular;window.angular=_angular;return a}function isArrayLike(obj){if(!obj||typeof obj.length!=="number")return false;if(typeof obj
 .hasOwnProperty!="function"&&typeof obj.constructor!="function"){return true}else{return obj instanceof JQLite||jQuery&&obj instanceof jQuery||toString.call(obj)!=="[object Object]"||typeof obj.callee==="function"}}function forEach(obj,iterator,context){var key;if(obj){if(isFunction(obj)){for(key in obj){if(key!="prototype"&&key!="length"&&key!="name"&&obj.hasOwnProperty(key)){iterator.call(context,obj[key],key)}}}else if(obj.forEach&&obj.forEach!==forEach){obj.forEach(iterator,context)}else if(isArrayLike(obj)){for(key=0;key<obj.length;key++)iterator.call(context,obj[key],key)}else{for(key in obj){if(obj.hasOwnProperty(key)){iterator.call(context,obj[key],key)}}}}return obj}function sortedKeys(obj){var keys=[];for(var key in obj){if(obj.hasOwnProperty(key)){keys.push(key)}}return keys.sort()}function forEachSorted(obj,iterator,context){var keys=sortedKeys(obj);for(var i=0;i<keys.length;i++){iterator.call(context,obj[keys[i]],keys[i])}return keys}function reverseParams(iteratorFn){r
 eturn function(value,key){iteratorFn(key,value)}}function nextUid(){var index=uid.length;var digit;while(index){index--;digit=uid[index].charCodeAt(0);if(digit==57){uid[index]="A";return uid.join("")}if(digit==90){uid[index]="0"}else{uid[index]=String.fromCharCode(digit+1);return uid.join("")}}uid.unshift("0");return uid.join("")}function setHashKey(obj,h){if(h){obj.$$hashKey=h}else{delete obj.$$hashKey}}function extend(dst){var h=dst.$$hashKey;forEach(arguments,function(obj){if(obj!==dst){forEach(obj,function(value,key){dst[key]=value})}});setHashKey(dst,h);return dst}function int(str){return parseInt(str,10)}function inherit(parent,extra){return extend(new(extend(function(){},{prototype:parent})),extra)}var START_SPACE=/^\s*/;var END_SPACE=/\s*$/;function stripWhitespace(str){return isString(str)?str.replace(START_SPACE,"").replace(END_SPACE,""):str}function noop(){}noop.$inject=[];function identity($){return $}identity.$inject=[];function valueFn(value){return function(){return v
 alue}}function isUndefined(value){return typeof value=="undefined"}function isDefined(value){return typeof value!="undefined"}function isObject(value){return value!=null&&typeof value=="object"}function isString(value){return typeof value=="string"}function isNumber(value){return typeof value=="number"}function isDate(value){return toString.apply(value)=="[object Date]"}function isArray(value){return toString.apply(value)=="[object Array]"}function isFunction(value){return typeof value=="function"}function isWindow(obj){return obj&&obj.document&&obj.location&&obj.alert&&obj.setInterval}function isScope(obj){return obj&&obj.$evalAsync&&obj.$watch}function isFile(obj){return toString.apply(obj)==="[object File]"}function isBoolean(value){return typeof value=="boolean"}function trim(value){return isString(value)?value.replace(/^\s*/,"").replace(/\s*$/,""):value}function isElement(node){return node&&(node.nodeName||node.bind&&node.find)}function makeMap(str){var obj={},items=str.split("
 ,"),i;for(i=0;i<items.length;i++)obj[items[i]]=true;return obj}if(msie<9){nodeName_=function(element){element=element.nodeName?element:element[0];return element.scopeName&&element.scopeName!="HTML"?uppercase(element.scopeName+":"+element.nodeName):element.nodeName}}else{nodeName_=function(element){return element.nodeName?element.nodeName:element[0].nodeName}}function map(obj,iterator,context){var results=[];forEach(obj,function(value,index,list){results.push(iterator.call(context,value,index,list))});return results}function size(obj,ownPropsOnly){var size=0,key;if(isArray(obj)||isString(obj)){return obj.length}else if(isObject(obj)){for(key in obj)if(!ownPropsOnly||obj.hasOwnProperty(key))size++}return size}function includes(array,obj){return indexOf(array,obj)!=-1}function indexOf(array,obj){if(array.indexOf)return array.indexOf(obj);for(var i=0;i<array.length;i++){if(obj===array[i])return i}return-1}function arrayRemove(array,value){var index=indexOf(array,value);if(index>=0)array
 .splice(index,1);return value}function isLeafNode(node){if(node){switch(node.nodeName){case"OPTION":case"PRE":case"TITLE":return true}}return false}function copy(source,destination){if(isWindow(source)||isScope(source))throw Error("Can't copy Window or Scope");if(!destination){destination=source;if(source){if(isArray(source)){destination=copy(source,[])}else if(isDate(source)){destination=new Date(source.getTime())}else if(isObject(source)){destination=copy(source,{})}}}else{if(source===destination)throw Error("Can't copy equivalent objects or arrays");if(isArray(source)){destination.length=0;for(var i=0;i<source.length;i++){destination.push(copy(source[i]))}}else{var h=destination.$$hashKey;forEach(destination,function(value,key){delete destination[key]});for(var key in source){destination[key]=copy(source[key])}setHashKey(destination,h)}}return destination}function shallowCopy(src,dst){dst=dst||{};for(var key in src){if(src.hasOwnProperty(key)&&key.substr(0,2)!=="$$"){dst[key]=src
 [key]}}return dst}function equals(o1,o2){if(o1===o2)return true;if(o1===null||o2===null)return false;if(o1!==o1&&o2!==o2)return true;var t1=typeof o1,t2=typeof o2,length,key,keySet;if(t1==t2){if(t1=="object"){if(isArray(o1)){if((length=o1.length)==o2.length){for(key=0;key<length;key++){if(!equals(o1[key],o2[key]))return false}return true}}else if(isDate(o1)){return isDate(o2)&&o1.getTime()==o2.getTime()}else{if(isScope(o1)||isScope(o2)||isWindow(o1)||isWindow(o2))return false;keySet={};for(key in o1){if(key.charAt(0)==="$"||isFunction(o1[key]))continue;if(!equals(o1[key],o2[key]))return false;keySet[key]=true}for(key in o2){if(!keySet[key]&&key.charAt(0)!=="$"&&o2[key]!==undefined&&!isFunction(o2[key]))return false}return true}}}return false}function concat(array1,array2,index){return array1.concat(slice.call(array2,index))}function sliceArgs(args,startIndex){return slice.call(args,startIndex||0)}function bind(self,fn){var curryArgs=arguments.length>2?sliceArgs(arguments,2):[];if(is
 Function(fn)&&!(fn instanceof RegExp)){return curryArgs.length?function(){return arguments.length?fn.apply(self,curryArgs.concat(slice.call(arguments,0))):fn.apply(self,curryArgs)}:function(){return arguments.length?fn.apply(self,arguments):fn.call(self)}}else{return fn}}function toJsonReplacer(key,value){var val=value;if(/^\$+/.test(key)){val=undefined}else if(isWindow(value)){val="$WINDOW"}else if(value&&document===value){val="$DOCUMENT"}else if(isScope(value)){val="$SCOPE"}return val}function toJson(obj,pretty){return JSON.stringify(obj,toJsonReplacer,pretty?"  ":null)}function fromJson(json){return isString(json)?JSON.parse(json):json}function toBoolean(value){if(value&&value.length!==0){var v=lowercase(""+value);value=!(v=="f"||v=="0"||v=="false"||v=="no"||v=="n"||v=="[]")}else{value=false}return value}function startingTag(element){element=jqLite(element).clone();try{element.html("")}catch(e){}var TEXT_NODE=3;var elemHtml=jqLite("<div>").append(element).html();try{return elemen
 t[0].nodeType===TEXT_NODE?lowercase(elemHtml):elemHtml.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(match,nodeName){return"<"+lowercase(nodeName)})}catch(e){return lowercase(elemHtml)}}function parseKeyValue(keyValue){var obj={},key_value,key;forEach((keyValue||"").split("&"),function(keyValue){if(keyValue){key_value=keyValue.split("=");key=decodeURIComponent(key_value[0]);obj[key]=isDefined(key_value[1])?decodeURIComponent(key_value[1]):true}});return obj}function toKeyValue(obj){var parts=[];forEach(obj,function(value,key){parts.push(encodeUriQuery(key,true)+(value===true?"":"="+encodeUriQuery(value,true)))});return parts.length?parts.join("&"):""}function encodeUriSegment(val){return encodeUriQuery(val,true).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function encodeUriQuery(val,pctEncodeSpaces){return encodeURIComponent(val).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,pctEncodeSpaces?"%20":"+")}fun
 ction angularInit(element,bootstrap){var elements=[element],appElement,module,names=["ng:app","ng-app","x-ng-app","data-ng-app"],NG_APP_CLASS_REGEXP=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;function append(element){element&&elements.push(element)}forEach(names,function(name){names[name]=true;append(document.getElementById(name));name=name.replace(":","\\:");if(element.querySelectorAll){forEach(element.querySelectorAll("."+name),append);forEach(element.querySelectorAll("."+name+"\\:"),append);forEach(element.querySelectorAll("["+name+"]"),append)}});forEach(elements,function(element){if(!appElement){var className=" "+element.className+" ";var match=NG_APP_CLASS_REGEXP.exec(className);if(match){appElement=element;module=(match[2]||"").replace(/\s+/g,",")}else{forEach(element.attributes,function(attr){if(!appElement&&names[attr.name]){appElement=element;module=attr.value}})}}});if(appElement){bootstrap(appElement,module?[module]:[])}}function bootstrap(element,modules){var resumeBootstrapIn
 ternal=function(){element=jqLite(element);modules=modules||[];modules.unshift(["$provide",function($provide){$provide.value("$rootElement",element)}]);modules.unshift("ng");var injector=createInjector(modules);injector.invoke(["$rootScope","$rootElement","$compile","$injector","$animator",function(scope,element,compile,injector,animator){scope.$apply(function(){element.data("$injector",injector);compile(element)(scope)});animator.enabled(true)}]);return injector};var NG_DEFER_BOOTSTRAP=/^NG_DEFER_BOOTSTRAP!/;if(window&&!NG_DEFER_BOOTSTRAP.test(window.name)){return resumeBootstrapInternal()}window.name=window.name.replace(NG_DEFER_BOOTSTRAP,"");angular.resumeBootstrap=function(extraModules){forEach(extraModules,function(module){modules.push(module)});resumeBootstrapInternal()}}var SNAKE_CASE_REGEXP=/[A-Z]/g;function snake_case(name,separator){separator=separator||"_";return name.replace(SNAKE_CASE_REGEXP,function(letter,pos){return(pos?separator:"")+letter.toLowerCase()})}function bi
 ndJQuery(){jQuery=window.jQuery;if(jQuery){jqLite=jQuery;extend(jQuery.fn,{scope:JQLitePrototype.scope,controller:JQLitePrototype.controller,injector:JQLitePrototype.injector,inheritedData:JQLitePrototype.inheritedData});JQLitePatchJQueryRemove("remove",true);JQLitePatchJQueryRemove("empty");JQLitePatchJQueryRemove("html")}else{jqLite=JQLite}angular.element=jqLite}function assertArg(arg,name,reason){if(!arg){throw new Error("Argument '"+(name||"?")+"' is "+(reason||"required"))}return arg}function assertArgFn(arg,name,acceptArrayAnnotation){if(acceptArrayAnnotation&&isArray(arg)){arg=arg[arg.length-1]}assertArg(isFunction(arg),name,"not a function, got "+(arg&&typeof arg=="object"?arg.constructor.name||"Object":typeof arg));return arg}function setupModuleLoader(window){function ensure(obj,name,factory){return obj[name]||(obj[name]=factory())}return ensure(ensure(window,"angular",Object),"module",function(){var modules={};return function module(name,requires,configFn){if(requires&&mo
 dules.hasOwnProperty(name)){modules[name]=null}return ensure(modules,name,function(){if(!requires){throw Error("No module: "+name)}var invokeQueue=[];var runBlocks=[];var config=invokeLater("$injector","invoke");var moduleInstance={_invokeQueue:invokeQueue,_runBlocks:runBlocks,requires:requires,name:name,provider:invokeLater("$provide","provider"),factory:invokeLater("$provide","factory"),service:invokeLater("$provide","service"),value:invokeLater("$provide","value"),constant:invokeLater("$provide","constant","unshift"),animation:invokeLater("$animationProvider","register"),filter:invokeLater("$filterProvider","register"),controller:invokeLater("$controllerProvider","register"),directive:invokeLater("$compileProvider","directive"),config:config,run:function(block){runBlocks.push(block);return this}};if(configFn){config(configFn)}return moduleInstance;function invokeLater(provider,method,insertMethod){return function(){invokeQueue[insertMethod||"push"]([provider,method,arguments]);re
 turn moduleInstance}}})}})}var version={full:"1.1.5",major:1,minor:1,dot:5,codeName:"triangle-squarification"};function publishExternalAPI(angular){extend(angular,{bootstrap:bootstrap,copy:copy,extend:extend,equals:equals,element:jqLite,forEach:forEach,injector:createInjector,noop:noop,bind:bind,toJson:toJson,fromJson:fromJson,identity:identity,isUndefined:isUndefined,isDefined:isDefined,isString:isString,isFunction:isFunction,isObject:isObject,isNumber:isNumber,isElement:isElement,isArray:isArray,version:version,isDate:isDate,lowercase:lowercase,uppercase:uppercase,callbacks:{counter:0},noConflict:noConflict});angularModule=setupModuleLoader(window);try{angularModule("ngLocale")}catch(e){angularModule("ngLocale",[]).provider("$locale",$LocaleProvider)}angularModule("ng",["ngLocale"],["$provide",function ngModule($provide){$provide.provider("$compile",$CompileProvider).directive({a:htmlAnchorDirective,input:inputDirective,textarea:inputDirective,form:formDirective,script:scriptDirec
 tive,select:selectDirective,style:styleDirective,option:optionDirective,ngBind:ngBindDirective,ngBindHtmlUnsafe:ngBindHtmlUnsafeDirective,ngBindTemplate:ngBindTemplateDirective,ngClass:ngClassDirective,ngClassEven:ngClassEvenDirective,ngClassOdd:ngClassOddDirective,ngCsp:ngCspDirective,ngCloak:ngCloakDirective,ngController:ngControllerDirective,ngForm:ngFormDirective,ngHide:ngHideDirective,ngIf:ngIfDirective,ngInclude:ngIncludeDirective,ngInit:ngInitDirective,ngNonBindable:ngNonBindableDirective,ngPluralize:ngPluralizeDirective,ngRepeat:ngRepeatDirective,ngShow:ngShowDirective,ngSubmit:ngSubmitDirective,ngStyle:ngStyleDirective,ngSwitch:ngSwitchDirective,ngSwitchWhen:ngSwitchWhenDirective,ngSwitchDefault:ngSwitchDefaultDirective,ngOptions:ngOptionsDirective,ngView:ngViewDirective,ngTransclude:ngTranscludeDirective,ngModel:ngModelDirective,ngList:ngListDirective,ngChange:ngChangeDirective,required:requiredDirective,ngRequired:requiredDirective,ngValue:ngValueDirective}).directive(ngA
 ttributeAliasDirectives).directive(ngEventDirectives);$provide.provider({$anchorScroll:$AnchorScrollProvider,$animation:$AnimationProvider,$animator:$AnimatorProvider,$browser:$BrowserProvider,$cacheFactory:$CacheFactoryProvider,$controller:$ControllerProvider,$document:$DocumentProvider,$exceptionHandler:$ExceptionHandlerProvider,$filter:$FilterProvider,$interpolate:$InterpolateProvider,$http:$HttpProvider,$httpBackend:$HttpBackendProvider,$location:$LocationProvider,$log:$LogProvider,$parse:$ParseProvider,$route:$RouteProvider,$routeParams:$RouteParamsProvider,$rootScope:$RootScopeProvider,$q:$QProvider,$sniffer:$SnifferProvider,$templateCache:$TemplateCacheProvider,$timeout:$TimeoutProvider,$window:$WindowProvider})}])}var jqCache=JQLite.cache={},jqName=JQLite.expando="ng-"+(new Date).getTime(),jqId=1,addEventListenerFn=window.document.addEventListener?function(element,type,fn){element.addEventListener(type,fn,false)}:function(element,type,fn){element.attachEvent("on"+type,fn)},r
 emoveEventListenerFn=window.document.removeEventListener?function(element,type,fn){element.removeEventListener(type,fn,false)}:function(element,type,fn){element.detachEvent("on"+type,fn)};function jqNextId(){return++jqId}var SPECIAL_CHARS_REGEXP=/([\:\-\_]+(.))/g;var MOZ_HACK_REGEXP=/^moz([A-Z])/;function camelCase(name){return name.replace(SPECIAL_CHARS_REGEXP,function(_,separator,letter,offset){return offset?letter.toUpperCase():letter}).replace(MOZ_HACK_REGEXP,"Moz$1")}function JQLitePatchJQueryRemove(name,dispatchThis){var originalJqFn=jQuery.fn[name];originalJqFn=originalJqFn.$original||originalJqFn;removePatch.$original=originalJqFn;jQuery.fn[name]=removePatch;function removePatch(){var list=[this],fireEvent=dispatchThis,set,setIndex,setLength,element,childIndex,childLength,children,fns,events;while(list.length){set=list.shift();for(setIndex=0,setLength=set.length;setIndex<setLength;setIndex++){element=jqLite(set[setIndex]);if(fireEvent){element.triggerHandler("$destroy")}else
 {fireEvent=!fireEvent}for(childIndex=0,childLength=(children=element.children()).length;childIndex<childLength;childIndex++){list.push(jQuery(children[childIndex]))}}}return originalJqFn.apply(this,arguments)}}function JQLite(element){if(element instanceof JQLite){return element}if(!(this instanceof JQLite)){if(isString(element)&&element.charAt(0)!="<"){throw Error("selectors not implemented")}return new JQLite(element)}if(isString(element)){var div=document.createElement("div");div.innerHTML="<div>&#160;</div>"+element;div.removeChild(div.firstChild);JQLiteAddNodes(this,div.childNodes);this.remove()}else{JQLiteAddNodes(this,element)}}function JQLiteClone(element){return element.cloneNode(true)}function JQLiteDealoc(element){JQLiteRemoveData(element);for(var i=0,children=element.childNodes||[];i<children.length;i++){JQLiteDealoc(children[i])}}function JQLiteUnbind(element,type,fn){var events=JQLiteExpandoStore(element,"events"),handle=JQLiteExpandoStore(element,"handle");if(!handle)
 return;if(isUndefined(type)){forEach(events,function(eventHandler,type){removeEventListenerFn(element,type,eventHandler);delete events[type]})}else{if(isUndefined(fn)){removeEventListenerFn(element,type,events[type]);delete events[type]}else{arrayRemove(events[type],fn)}}}function JQLiteRemoveData(element){var expandoId=element[jqName],expandoStore=jqCache[expandoId];if(expandoStore){if(expandoStore.handle){expandoStore.events.$destroy&&expandoStore.handle({},"$destroy");JQLiteUnbind(element)}delete jqCache[expandoId];element[jqName]=undefined}}function JQLiteExpandoStore(element,key,value){var expandoId=element[jqName],expandoStore=jqCache[expandoId||-1];if(isDefined(value)){if(!expandoStore){element[jqName]=expandoId=jqNextId();expandoStore=jqCache[expandoId]={}}expandoStore[key]=value}else{return expandoStore&&expandoStore[key]}}function JQLiteData(element,key,value){var data=JQLiteExpandoStore(element,"data"),isSetter=isDefined(value),keyDefined=!isSetter&&isDefined(key),isSimpl
 eGetter=keyDefined&&!isObject(key);if(!data&&!isSimpleGetter){JQLiteExpandoStore(element,"data",data={})}if(isSetter){data[key]=value}else{if(keyDefined){if(isSimpleGetter){return data&&data[key]}else{extend(data,key)}}else{return data}}}function JQLiteHasClass(element,selector){return(" "+element.className+" ").replace(/[\n\t]/g," ").indexOf(" "+selector+" ")>-1}function JQLiteRemoveClass(element,cssClasses){if(cssClasses){forEach(cssClasses.split(" "),function(cssClass){element.className=trim((" "+element.className+" ").replace(/[\n\t]/g," ").replace(" "+trim(cssClass)+" "," "))})}}function JQLiteAddClass(element,cssClasses){if(cssClasses){forEach(cssClasses.split(" "),function(cssClass){if(!JQLiteHasClass(element,cssClass)){element.className=trim(element.className+" "+trim(cssClass))}})}}function JQLiteAddNodes(root,elements){if(elements){elements=!elements.nodeName&&isDefined(elements.length)&&!isWindow(elements)?elements:[elements];for(var i=0;i<elements.length;i++){root.push(e
 lements[i])}}}function JQLiteController(element,name){return JQLiteInheritedData(element,"$"+(name||"ngController")+"Controller")}function JQLiteInheritedData(element,name,value){element=jqLite(element);if(element[0].nodeType==9){element=element.find("html")}while(element.length){if(value=element.data(name))return value;element=element.parent()}}var JQLitePrototype=JQLite.prototype={ready:function(fn){var fired=false;function trigger(){if(fired)return;fired=true;fn()}if(document.readyState==="complete"){setTimeout(trigger)}else{this.bind("DOMContentLoaded",trigger);JQLite(window).bind("load",trigger)}},toString:function(){var value=[];forEach(this,function(e){value.push(""+e)});return"["+value.join(", ")+"]"},eq:function(index){return index>=0?jqLite(this[index]):jqLite(this[this.length+index])},length:0,push:push,sort:[].sort,splice:[].splice};var BOOLEAN_ATTR={};forEach("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(value){BOOLEAN_ATTR[lowercase(va
 lue)]=value});var BOOLEAN_ELEMENTS={};forEach("input,select,option,textarea,button,form,details".split(","),function(value){BOOLEAN_ELEMENTS[uppercase(value)]=true});function getBooleanAttrName(element,name){var booleanAttr=BOOLEAN_ATTR[name.toLowerCase()];return booleanAttr&&BOOLEAN_ELEMENTS[element.nodeName]&&booleanAttr}forEach({data:JQLiteData,inheritedData:JQLiteInheritedData,scope:function(element){return JQLiteInheritedData(element,"$scope")},controller:JQLiteController,injector:function(element){return JQLiteInheritedData(element,"$injector")},removeAttr:function(element,name){element.removeAttribute(name)},hasClass:JQLiteHasClass,css:function(element,name,value){name=camelCase(name);if(isDefined(value)){element.style[name]=value}else{var val;if(msie<=8){val=element.currentStyle&&element.currentStyle[name];if(val==="")val="auto"}val=val||element.style[name];if(msie<=8){val=val===""?undefined:val}return val}},attr:function(element,name,value){var lowercasedName=lowercase(name
 );if(BOOLEAN_ATTR[lowercasedName]){if(isDefined(value)){if(!!value){element[name]=true;element.setAttribute(name,lowercasedName)}else{element[name]=false;element.removeAttribute(lowercasedName)}}else{return element[name]||(element.attributes.getNamedItem(name)||noop).specified?lowercasedName:undefined}}else if(isDefined(value)){element.setAttribute(name,value)}else if(element.getAttribute){var ret=element.getAttribute(name,2);return ret===null?undefined:ret}},prop:function(element,name,value){if(isDefined(value)){element[name]=value}else{return element[name]}},text:extend(msie<9?function(element,value){if(element.nodeType==1){if(isUndefined(value))return element.innerText;element.innerText=value}else{if(isUndefined(value))return element.nodeValue;element.nodeValue=value}}:function(element,value){if(isUndefined(value)){return element.textContent}element.textContent=value},{$dv:""}),val:function(element,value){if(isUndefined(value)){return element.value}element.value=value},html:funct
 ion(element,value){if(isUndefined(value)){return element.innerHTML}for(var i=0,childNodes=element.childNodes;i<childNodes.length;i++){JQLiteDealoc(childNodes[i])}element.innerHTML=value}},function(fn,name){JQLite.prototype[name]=function(arg1,arg2){var i,key;if((fn.length==2&&(fn!==JQLiteHasClass&&fn!==JQLiteController)?arg1:arg2)===undefined){if(isObject(arg1)){for(i=0;i<this.length;i++){if(fn===JQLiteData){fn(this[i],arg1)}else{for(key in arg1){fn(this[i],key,arg1[key])}}}return this}else{if(this.length)return fn(this[0],arg1,arg2)}}else{for(i=0;i<this.length;i++){fn(this[i],arg1,arg2)}return this}return fn.$dv}});function createEventHandler(element,events){var eventHandler=function(event,type){if(!event.preventDefault){event.preventDefault=function(){event.returnValue=false}}if(!event.stopPropagation){event.stopPropagation=function(){event.cancelBubble=true}}if(!event.target){event.target=event.srcElement||document}if(isUndefined(event.defaultPrevented)){var prevent=event.prevent
 Default;event.preventDefault=function(){event.defaultPrevented=true;prevent.call(event)};event.defaultPrevented=false}event.isDefaultPrevented=function(){return event.defaultPrevented||event.returnValue==false};forEach(events[type||event.type],function(fn){fn.call(element,event)});if(msie<=8){event.preventDefault=null;event.stopPropagation=null;event.isDefaultPrevented=null}else{delete event.preventDefault;delete event.stopPropagation;delete event.isDefaultPrevented}};eventHandler.elem=element;return eventHandler}forEach({removeData:JQLiteRemoveData,dealoc:JQLiteDealoc,bind:function bindFn(element,type,fn){var events=JQLiteExpandoStore(element,"events"),handle=JQLiteExpandoStore(element,"handle");if(!events)JQLiteExpandoStore(element,"events",events={});if(!handle)JQLiteExpandoStore(element,"handle",handle=createEventHandler(element,events));forEach(type.split(" "),function(type){var eventFns=events[type];if(!eventFns){if(type=="mouseenter"||type=="mouseleave"){var contains=document
 .body.contains||document.body.compareDocumentPosition?function(a,b){var adown=a.nodeType===9?a.documentElement:a,bup=b&&b.parentNode;return a===bup||!!(bup&&bup.nodeType===1&&(adown.contains?adown.contains(bup):a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16))}:function(a,b){if(b){while(b=b.parentNode){if(b===a){return true}}}return false};events[type]=[];var eventmap={mouseleave:"mouseout",mouseenter:"mouseover"};bindFn(element,eventmap[type],function(event){var ret,target=this,related=event.relatedTarget;if(!related||related!==target&&!contains(target,related)){handle(event,type)}})}else{addEventListenerFn(element,type,handle);events[type]=[]}eventFns=events[type]}eventFns.push(fn)})},unbind:JQLiteUnbind,replaceWith:function(element,replaceNode){var index,parent=element.parentNode;JQLiteDealoc(element);forEach(new JQLite(replaceNode),function(node){if(index){parent.insertBefore(node,index.nextSibling)}else{parent.replaceChild(node,element)}index=node})},children:funct
 ion(element){var children=[];forEach(element.childNodes,function(element){if(element.nodeType===1)children.push(element)});return children},contents:function(element){return element.childNodes||[]},append:function(element,node){forEach(new JQLite(node),function(child){if(element.nodeType===1||element.nodeType===11){element.appendChild(child)}})},prepend:function(element,node){if(element.nodeType===1){var index=element.firstChild;forEach(new JQLite(node),function(child){if(index){element.insertBefore(child,index)}else{element.appendChild(child);index=child}})}},wrap:function(element,wrapNode){wrapNode=jqLite(wrapNode)[0];var parent=element.parentNode;if(parent){parent.replaceChild(wrapNode,element)}wrapNode.appendChild(element)},remove:function(element){JQLiteDealoc(element);var parent=element.parentNode;if(parent)parent.removeChild(element)},after:function(element,newElement){var index=element,parent=element.parentNode;forEach(new JQLite(newElement),function(node){parent.insertBefor
 e(node,index.nextSibling);index=node})},addClass:JQLiteAddClass,removeClass:JQLiteRemoveClass,toggleClass:function(element,selector,condition){if(isUndefined(condition)){condition=!JQLiteHasClass(element,selector)}(condition?JQLiteAddClass:JQLiteRemoveClass)(element,selector)},parent:function(element){var parent=element.parentNode;return parent&&parent.nodeType!==11?parent:null},next:function(element){if(element.nextElementSibling){return element.nextElementSibling}var elm=element.nextSibling;while(elm!=null&&elm.nodeType!==1){elm=elm.nextSibling}return elm},find:function(element,selector){return element.getElementsByTagName(selector)},clone:JQLiteClone,triggerHandler:function(element,eventName){var eventFns=(JQLiteExpandoStore(element,"events")||{})[eventName];var event;forEach(eventFns,function(fn){fn.call(element,{preventDefault:noop})})}},function(fn,name){JQLite.prototype[name]=function(arg1,arg2){var value;for(var i=0;i<this.length;i++){if(value==undefined){value=fn(this[i],ar
 g1,arg2);if(value!==undefined){value=jqLite(value)}}else{JQLiteAddNodes(value,fn(this[i],arg1,arg2))}}return value==undefined?this:value}});function hashKey(obj){var objType=typeof obj,key;if(objType=="object"&&obj!==null){if(typeof(key=obj.$$hashKey)=="function"){key=obj.$$hashKey()}else if(key===undefined){key=obj.$$hashKey=nextUid()}}else{key=obj}return objType+":"+key}function HashMap(array){forEach(array,this.put,this)}HashMap.prototype={put:function(key,value){this[hashKey(key)]=value},get:function(key){return this[hashKey(key)]},remove:function(key){var value=this[key=hashKey(key)];delete this[key];return value}};var FN_ARGS=/^function\s*[^\(]*\(\s*([^\)]*)\)/m;var FN_ARG_SPLIT=/,/;var FN_ARG=/^\s*(_?)(\S+?)\1\s*$/;var STRIP_COMMENTS=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;function annotate(fn){var $inject,fnText,argDecl,last;if(typeof fn=="function"){if(!($inject=fn.$inject)){$inject=[];fnText=fn.toString().replace(STRIP_COMMENTS,"");argDecl=fnText.match(FN_ARGS);forEach(argDecl[
 1].split(FN_ARG_SPLIT),function(arg){arg.replace(FN_ARG,function(all,underscore,name){$inject.push(name)})});fn.$inject=$inject}}else if(isArray(fn)){last=fn.length-1;assertArgFn(fn[last],"fn");$inject=fn.slice(0,last)}else{assertArgFn(fn,"fn",true)}return $inject}function createInjector(modulesToLoad){var INSTANTIATING={},providerSuffix="Provider",path=[],loadedModules=new HashMap,providerCache={$provide:{provider:supportObject(provider),factory:supportObject(factory),service:supportObject(service),value:supportObject(value),constant:supportObject(constant),decorator:decorator}},providerInjector=providerCache.$injector=createInternalInjector(providerCache,function(){throw Error("Unknown provider: "+path.join(" <- "))}),instanceCache={},instanceInjector=instanceCache.$injector=createInternalInjector(instanceCache,function(servicename){var provider=providerInjector.get(servicename+providerSuffix);return instanceInjector.invoke(provider.$get,provider)});forEach(loadModules(modulesToLo
 ad),function(fn){instanceInjector.invoke(fn||noop)});return instanceInjector;function supportObject(delegate){return function(key,value){if(isObject(key)){forEach(key,reverseParams(delegate))}else{return delegate(key,value)}}}function provider(name,provider_){if(isFunction(provider_)||isArray(provider_)){provider_=providerInjector.instantiate(provider_)}if(!provider_.$get){throw Error("Provider "+name+" must define $get factory method.")}return providerCache[name+providerSuffix]=provider_}function factory(name,factoryFn){return provider(name,{$get:factoryFn})}function service(name,constructor){return factory(name,["$injector",function($injector){return $injector.instantiate(constructor)}])}function value(name,value){return factory(name,valueFn(value))}function constant(name,value){providerCache[name]=value;instanceCache[name]=value}function decorator(serviceName,decorFn){var origProvider=providerInjector.get(serviceName+providerSuffix),orig$get=origProvider.$get;origProvider.$get=fu
 nction(){var origInstance=instanceInjector.invoke(orig$get,origProvider);return instanceInjector.invoke(decorFn,null,{$delegate:origInstance})}}function loadModules(modulesToLoad){var runBlocks=[];forEach(modulesToLoad,function(module){if(loadedModules.get(module))return;loadedModules.put(module,true);if(isString(module)){var moduleFn=angularModule(module);runBlocks=runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks);try{for(var invokeQueue=moduleFn._invokeQueue,i=0,ii=invokeQueue.length;i<ii;i++){var invokeArgs=invokeQueue[i],provider=providerInjector.get(invokeArgs[0]);provider[invokeArgs[1]].apply(provider,invokeArgs[2])}}catch(e){if(e.message)e.message+=" from "+module;throw e}}else if(isFunction(module)){try{runBlocks.push(providerInjector.invoke(module))}catch(e){if(e.message)e.message+=" from "+module;throw e}}else if(isArray(module)){try{runBlocks.push(providerInjector.invoke(module))}catch(e){if(e.message)e.message+=" from "+String(module[module.len
 gth-1]);throw e}}else{assertArgFn(module,"module")}});return runBlocks}function createInternalInjector(cache,factory){function getService(serviceName){if(typeof serviceName!=="string"){throw Error("Service name expected")
+}if(cache.hasOwnProperty(serviceName)){if(cache[serviceName]===INSTANTIATING){throw Error("Circular dependency: "+path.join(" <- "))}return cache[serviceName]}else{try{path.unshift(serviceName);cache[serviceName]=INSTANTIATING;return cache[serviceName]=factory(serviceName)}finally{path.shift()}}}function invoke(fn,self,locals){var args=[],$inject=annotate(fn),length,i,key;for(i=0,length=$inject.length;i<length;i++){key=$inject[i];args.push(locals&&locals.hasOwnProperty(key)?locals[key]:getService(key))}if(!fn.$inject){fn=fn[length]}switch(self?-1:args.length){case 0:return fn();case 1:return fn(args[0]);case 2:return fn(args[0],args[1]);case 3:return fn(args[0],args[1],args[2]);case 4:return fn(args[0],args[1],args[2],args[3]);case 5:return fn(args[0],args[1],args[2],args[3],args[4]);case 6:return fn(args[0],args[1],args[2],args[3],args[4],args[5]);case 7:return fn(args[0],args[1],args[2],args[3],args[4],args[5],args[6]);case 8:return fn(args[0],args[1],args[2],args[3],args[4],args[
 5],args[6],args[7]);case 9:return fn(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8]);case 10:return fn(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9]);default:return fn.apply(self,args)}}function instantiate(Type,locals){var Constructor=function(){},instance,returnedValue;Constructor.prototype=(isArray(Type)?Type[Type.length-1]:Type).prototype;instance=new Constructor;returnedValue=invoke(Type,instance,locals);return isObject(returnedValue)?returnedValue:instance}return{invoke:invoke,instantiate:instantiate,get:getService,annotate:annotate,has:function(name){return providerCache.hasOwnProperty(name+providerSuffix)||cache.hasOwnProperty(name)}}}}function $AnchorScrollProvider(){var autoScrollingEnabled=true;this.disableAutoScrolling=function(){autoScrollingEnabled=false};this.$get=["$window","$location","$rootScope",function($window,$location,$rootScope){var document=$window.document;function getFirstAnchor(list){var result=nu
 ll;forEach(list,function(element){if(!result&&lowercase(element.nodeName)==="a")result=element});return result}function scroll(){var hash=$location.hash(),elm;if(!hash)$window.scrollTo(0,0);else if(elm=document.getElementById(hash))elm.scrollIntoView();else if(elm=getFirstAnchor(document.getElementsByName(hash)))elm.scrollIntoView();else if(hash==="top")$window.scrollTo(0,0)}if(autoScrollingEnabled){$rootScope.$watch(function autoScrollWatch(){return $location.hash()},function autoScrollWatchAction(){$rootScope.$evalAsync(scroll)})}return scroll}]}$AnimationProvider.$inject=["$provide"];function $AnimationProvider($provide){var suffix="Animation";this.register=function(name,factory){$provide.factory(camelCase(name)+suffix,factory)};this.$get=["$injector",function($injector){return function $animation(name){if(name){var animationName=camelCase(name)+suffix;if($injector.has(animationName)){return $injector.get(animationName)}}}}]}var $AnimatorProvider=function(){var NG_ANIMATE_CONTROL
 LER="$ngAnimateController";var rootAnimateController={running:true};this.$get=["$animation","$window","$sniffer","$rootElement","$rootScope",function($animation,$window,$sniffer,$rootElement,$rootScope){$rootElement.data(NG_ANIMATE_CONTROLLER,rootAnimateController);var AnimatorService=function(scope,attrs){var animator={};animator.enter=animateActionFactory("enter",insert,noop);animator.leave=animateActionFactory("leave",noop,remove);animator.move=animateActionFactory("move",move,noop);animator.show=animateActionFactory("show",show,noop);animator.hide=animateActionFactory("hide",noop,hide);animator.animate=function(event,element){animateActionFactory(event,noop,noop)(element)};return animator;function animateActionFactory(type,beforeFn,afterFn){return function(element,parent,after){var ngAnimateValue=scope.$eval(attrs.ngAnimate);var className=ngAnimateValue?isObject(ngAnimateValue)?ngAnimateValue[type]:ngAnimateValue+"-"+type:"";var animationPolyfill=$animation(className);var polyfi
 llSetup=animationPolyfill&&animationPolyfill.setup;var polyfillStart=animationPolyfill&&animationPolyfill.start;var polyfillCancel=animationPolyfill&&animationPolyfill.cancel;if(!className){beforeFn(element,parent,after);afterFn(element,parent,after)}else{var activeClassName=className+"-active";if(!parent){parent=after?after.parent():element.parent()}if(!$sniffer.transitions&&!polyfillSetup&&!polyfillStart||(parent.inheritedData(NG_ANIMATE_CONTROLLER)||noop).running){beforeFn(element,parent,after);afterFn(element,parent,after);return}var animationData=element.data(NG_ANIMATE_CONTROLLER)||{};if(animationData.running){(polyfillCancel||noop)(element);animationData.done()}element.data(NG_ANIMATE_CONTROLLER,{running:true,done:done});element.addClass(className);beforeFn(element,parent,after);if(element.length==0)return done();var memento=(polyfillSetup||noop)(element);$window.setTimeout(beginAnimation,1)}function parseMaxTime(str){var total=0,values=isString(str)?str.split(/\s*,\s*/):[];f
 orEach(values,function(value){total=Math.max(parseFloat(value)||0,total)});return total}function beginAnimation(){element.addClass(activeClassName);if(polyfillStart){polyfillStart(element,done,memento)}else if(isFunction($window.getComputedStyle)){var w3cAnimationProp="animation";var w3cTransitionProp="transition";var vendorAnimationProp=$sniffer.vendorPrefix+"Animation";var vendorTransitionProp=$sniffer.vendorPrefix+"Transition";var durationKey="Duration",delayKey="Delay",animationIterationCountKey="IterationCount",duration=0;var ELEMENT_NODE=1;forEach(element,function(element){if(element.nodeType==ELEMENT_NODE){var w3cProp=w3cTransitionProp,vendorProp=vendorTransitionProp,iterations=1,elementStyles=$window.getComputedStyle(element)||{};if(parseFloat(elementStyles[w3cAnimationProp+durationKey])>0||parseFloat(elementStyles[vendorAnimationProp+durationKey])>0){w3cProp=w3cAnimationProp;vendorProp=vendorAnimationProp;iterations=Math.max(parseInt(elementStyles[w3cProp+animationIteration
 CountKey])||0,parseInt(elementStyles[vendorProp+animationIterationCountKey])||0,iterations)}var parsedDelay=Math.max(parseMaxTime(elementStyles[w3cProp+delayKey]),parseMaxTime(elementStyles[vendorProp+delayKey]));var parsedDuration=Math.max(parseMaxTime(elementStyles[w3cProp+durationKey]),parseMaxTime(elementStyles[vendorProp+durationKey]));duration=Math.max(parsedDelay+iterations*parsedDuration,duration)}});$window.setTimeout(done,duration*1e3)}else{done()}}function done(){if(!done.run){done.run=true;afterFn(element,parent,after);element.removeClass(className);element.removeClass(activeClassName);element.removeData(NG_ANIMATE_CONTROLLER)}}}}function show(element){element.css("display","")}function hide(element){element.css("display","none")}function insert(element,parent,after){if(after){after.after(element)}else{parent.append(element)}}function remove(element){element.remove()}function move(element,parent,after){insert(element,parent,after)}};AnimatorService.enabled=function(value
 ){if(arguments.length){rootAnimateController.running=!value}return!rootAnimateController.running};return AnimatorService}]};function Browser(window,document,$log,$sniffer){var self=this,rawDocument=document[0],location=window.location,history=window.history,setTimeout=window.setTimeout,clearTimeout=window.clearTimeout,pendingDeferIds={};self.isMock=false;var outstandingRequestCount=0;var outstandingRequestCallbacks=[];self.$$completeOutstandingRequest=completeOutstandingRequest;self.$$incOutstandingRequestCount=function(){outstandingRequestCount++};function completeOutstandingRequest(fn){try{fn.apply(null,sliceArgs(arguments,1))}finally{outstandingRequestCount--;if(outstandingRequestCount===0){while(outstandingRequestCallbacks.length){try{outstandingRequestCallbacks.pop()()}catch(e){$log.error(e)}}}}}self.notifyWhenNoOutstandingRequests=function(callback){forEach(pollFns,function(pollFn){pollFn()});if(outstandingRequestCount===0){callback()}else{outstandingRequestCallbacks.push(call
 back)}};var pollFns=[],pollTimeout;self.addPollFn=function(fn){if(isUndefined(pollTimeout))startPoller(100,setTimeout);pollFns.push(fn);return fn};function startPoller(interval,setTimeout){(function check(){forEach(pollFns,function(pollFn){pollFn()});pollTimeout=setTimeout(check,interval)})()}var lastBrowserUrl=location.href,baseElement=document.find("base");self.url=function(url,replace){if(url){if(lastBrowserUrl==url)return;lastBrowserUrl=url;if($sniffer.history){if(replace)history.replaceState(null,"",url);else{history.pushState(null,"",url);baseElement.attr("href",baseElement.attr("href"))}}else{if(replace)location.replace(url);else location.href=url}return self}else{return location.href.replace(/%27/g,"'")}};var urlChangeListeners=[],urlChangeInit=false;function fireUrlChange(){if(lastBrowserUrl==self.url())return;lastBrowserUrl=self.url();forEach(urlChangeListeners,function(listener){listener(self.url())})}self.onUrlChange=function(callback){if(!urlChangeInit){if($sniffer.hist
 ory)jqLite(window).bind("popstate",fireUrlChange);if($sniffer.hashchange)jqLite(window).bind("hashchange",fireUrlChange);else self.addPollFn(fireUrlChange);urlChangeInit=true}urlChangeListeners.push(callback);return callback};self.baseHref=function(){var href=baseElement.attr("href");return href?href.replace(/^https?\:\/\/[^\/]*/,""):""};var lastCookies={};var lastCookieString="";var cookiePath=self.baseHref();self.cookies=function(name,value){var cookieLength,cookieArray,cookie,i,index;if(name){if(value===undefined){rawDocument.cookie=escape(name)+"=;path="+cookiePath+";expires=Thu, 01 Jan 1970 00:00:00 GMT"}else{if(isString(value)){cookieLength=(rawDocument.cookie=escape(name)+"="+escape(value)+";path="+cookiePath).length+1;if(cookieLength>4096){$log.warn("Cookie '"+name+"' possibly not set or overflowed because it was too large ("+cookieLength+" > 4096 bytes)!")}}}}else{if(rawDocument.cookie!==lastCookieString){lastCookieString=rawDocument.cookie;cookieArray=lastCookieString.spli
 t("; ");lastCookies={};for(i=0;i<cookieArray.length;i++){cookie=cookieArray[i];index=cookie.indexOf("=");if(index>0){var name=unescape(cookie.substring(0,index));if(lastCookies[name]===undefined){lastCookies[name]=unescape(cookie.substring(index+1))}}}}return lastCookies}};self.defer=function(fn,delay){var timeoutId;outstandingRequestCount++;timeoutId=setTimeout(function(){delete pendingDeferIds[timeoutId];completeOutstandingRequest(fn)},delay||0);pendingDeferIds[timeoutId]=true;return timeoutId};self.defer.cancel=function(deferId){if(pendingDeferIds[deferId]){delete pendingDeferIds[deferId];clearTimeout(deferId);completeOutstandingRequest(noop);return true}return false}}function $BrowserProvider(){this.$get=["$window","$log","$sniffer","$document",function($window,$log,$sniffer,$document){return new Browser($window,$document,$log,$sniffer)}]}function $CacheFactoryProvider(){this.$get=function(){var caches={};function cacheFactory(cacheId,options){if(cacheId in caches){throw Error("
 cacheId "+cacheId+" taken")}var size=0,stats=extend({},options,{id:cacheId}),data={},capacity=options&&options.capacity||Number.MAX_VALUE,lruHash={},freshEnd=null,staleEnd=null;return caches[cacheId]={put:function(key,value){var lruEntry=lruHash[key]||(lruHash[key]={key:key});refresh(lruEntry);if(isUndefined(value))return;if(!(key in data))size++;data[key]=value;if(size>capacity){this.remove(staleEnd.key)}return value},get:function(key){var lruEntry=lruHash[key];if(!lruEntry)return;refresh(lruEntry);return data[key]},remove:function(key){var lruEntry=lruHash[key];if(!lruEntry)return;if(lruEntry==freshEnd)freshEnd=lruEntry.p;if(lruEntry==staleEnd)staleEnd=lruEntry.n;link(lruEntry.n,lruEntry.p);delete lruHash[key];delete data[key];size--},removeAll:function(){data={};size=0;lruHash={};freshEnd=staleEnd=null},destroy:function(){data=null;stats=null;lruHash=null;delete caches[cacheId]},info:function(){return extend({},stats,{size:size})}};function refresh(entry){if(entry!=freshEnd){if(!
 staleEnd){staleEnd=entry}else if(staleEnd==entry){staleEnd=entry.n}link(entry.n,entry.p);link(entry,freshEnd);freshEnd=entry;freshEnd.n=null}}function link(nextEntry,prevEntry){if(nextEntry!=prevEntry){if(nextEntry)nextEntry.p=prevEntry;if(prevEntry)prevEntry.n=nextEntry}}}cacheFactory.info=function(){var info={};forEach(caches,function(cache,cacheId){info[cacheId]=cache.info()});return info};cacheFactory.get=function(cacheId){return caches[cacheId]};return cacheFactory}}function $TemplateCacheProvider(){this.$get=["$cacheFactory",function($cacheFactory){return $cacheFactory("templates")}]}var NON_ASSIGNABLE_MODEL_EXPRESSION="Non-assignable model expression: ";$CompileProvider.$inject=["$provide"];function $CompileProvider($provide){var hasDirectives={},Suffix="Directive",COMMENT_DIRECTIVE_REGEXP=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,CLASS_DIRECTIVE_REGEXP=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,MULTI_ROOT_TEMPLATE_ERROR="Template must have exactly one root element. was: ",urlSanitizati
 onWhitelist=/^\s*(https?|ftp|mailto|file):/;this.directive=function registerDirective(name,directiveFactory){if(isString(name)){assertArg(directiveFactory,"directive");if(!hasDirectives.hasOwnProperty(name)){hasDirectives[name]=[];$provide.factory(name+Suffix,["$injector","$exceptionHandler",function($injector,$exceptionHandler){var directives=[];forEach(hasDirectives[name],function(directiveFactory){try{var directive=$injector.invoke(directiveFactory);if(isFunction(directive)){directive={compile:valueFn(directive)}}else if(!directive.compile&&directive.link){directive.compile=valueFn(directive.link)}directive.priority=directive.priority||0;directive.name=directive.name||name;directive.require=directive.require||directive.controller&&directive.name;directive.restrict=directive.restrict||"A";directives.push(directive)}catch(e){$exceptionHandler(e)}});return directives}])}hasDirectives[name].push(directiveFactory)}else{forEach(name,reverseParams(registerDirective))}return this};this.u
 rlSanitizationWhitelist=function(regexp){if(isDefined(regexp)){urlSanitizationWhitelist=regexp;return this}return urlSanitizationWhitelist};this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document",function($injector,$interpolate,$exceptionHandler,$http,$templateCache,$parse,$controller,$rootScope,$document){var Attributes=function(element,attr){this.$$element=element;this.$attr=attr||{}};Attributes.prototype={$normalize:directiveNormalize,$set:function(key,value,writeAttr,attrName){var booleanKey=getBooleanAttrName(this.$$element[0],key),$$observers=this.$$observers,normalizedVal;if(booleanKey){this.$$element.prop(key,value);attrName=booleanKey}this[key]=value;if(attrName){this.$attr[key]=attrName}else{attrName=this.$attr[key];if(!attrName){this.$attr[key]=attrName=snake_case(key,"-")}}if(nodeName_(this.$$element[0])==="A"&&key==="href"){urlSanitizationNode.setAttribute("href",value);normalizedVal=urlSanitizat
 ionNode.href;if(!normalizedVal.match(urlSanitizationWhitelist)){this[key]=value="unsafe:"+normalizedVal}}if(writeAttr!==false){if(value===null||value===undefined){this.$$element.removeAttr(attrName)}else{this.$$element.attr(attrName,value)}}$$observers&&forEach($$observers[key],function(fn){try{fn(value)}catch(e){$exceptionHandler(e)}})},$observe:function(key,fn){var attrs=this,$$observers=attrs.$$observers||(attrs.$$observers={}),listeners=$$observers[key]||($$observers[key]=[]);listeners.push(fn);$rootScope.$evalAsync(function(){if(!listeners.$$inter){fn(attrs[key])}});return fn}};var urlSanitizationNode=$document[0].createElement("a"),startSymbol=$interpolate.startSymbol(),endSymbol=$interpolate.endSymbol(),denormalizeTemplate=startSymbol=="{{"||endSymbol=="}}"?identity:function denormalizeTemplate(template){return template.replace(/\{\{/g,startSymbol).replace(/}}/g,endSymbol)},NG_ATTR_BINDING=/^ngAttr[A-Z]/;return compile;function compile($compileNodes,transcludeFn,maxPriority){
 if(!($compileNodes instanceof jqLite)){$compileNodes=jqLite($compileNodes)}forEach($compileNodes,function(node,index){if(node.nodeType==3&&node.nodeValue.match(/\S+/)){$compileNodes[index]=jqLite(node).wrap("<span></span>").parent()[0]}});var compositeLinkFn=compileNodes($compileNodes,transcludeFn,$compileNodes,maxPriority);return function publicLinkFn(scope,cloneConnectFn){assertArg(scope,"scope");var $linkNode=cloneConnectFn?JQLitePrototype.clone.call($compileNodes):$compileNodes;for(var i=0,ii=$linkNode.length;i<ii;i++){var node=$linkNode[i];if(node.nodeType==1||node.nodeType==9){$linkNode.eq(i).data("$scope",scope)}}safeAddClass($linkNode,"ng-scope");if(cloneConnectFn)cloneConnectFn($linkNode,scope);if(compositeLinkFn)compositeLinkFn(scope,$linkNode,$linkNode);return $linkNode}}function wrongMode(localName,mode){throw Error("Unsupported '"+mode+"' for '"+localName+"'.")}function safeAddClass($element,className){try{$element.addClass(className)}catch(e){}}function compileNodes(no
 deList,transcludeFn,$rootElement,maxPriority){var linkFns=[],nodeLinkFn,childLinkFn,directives,attrs,linkFnFound;for(var i=0;i<nodeList.length;i++){attrs=new Attributes;directives=collectDirectives(nodeList[i],[],attrs,maxPriority);nodeLinkFn=directives.length?applyDirectivesToNode(directives,nodeList[i],attrs,transcludeFn,$rootElement):null;childLinkFn=nodeLinkFn&&nodeLinkFn.terminal||!nodeList[i].childNodes||!nodeList[i].childNodes.length?null:compileNodes(nodeList[i].childNodes,nodeLinkFn?nodeLinkFn.transclude:transcludeFn);linkFns.push(nodeLinkFn);linkFns.push(childLinkFn);linkFnFound=linkFnFound||nodeLinkFn||childLinkFn}return linkFnFound?compositeLinkFn:null;function compositeLinkFn(scope,nodeList,$rootElement,boundTranscludeFn){var nodeLinkFn,childLinkFn,node,childScope,childTranscludeFn,i,ii,n;var stableNodeList=[];for(i=0,ii=nodeList.length;i<ii;i++){stableNodeList.push(nodeList[i])}for(i=0,n=0,ii=linkFns.length;i<ii;n++){node=stableNodeList[n];nodeLinkFn=linkFns[i++];child
 LinkFn=linkFns[i++];if(nodeLinkFn){if(nodeLinkFn.scope){childScope=scope.$new(isObject(nodeLinkFn.scope));jqLite(node).data("$scope",childScope)}else{childScope=scope}childTranscludeFn=nodeLinkFn.transclude;if(childTranscludeFn||!boundTranscludeFn&&transcludeFn){nodeLinkFn(childLinkFn,childScope,node,$rootElement,function(transcludeFn){return function(cloneFn){var transcludeScope=scope.$new();transcludeScope.$$transcluded=true;return transcludeFn(transcludeScope,cloneFn).bind("$destroy",bind(transcludeScope,transcludeScope.$destroy))}}(childTranscludeFn||transcludeFn))}else{nodeLinkFn(childLinkFn,childScope,node,undefined,boundTranscludeFn)}}else if(childLinkFn){childLinkFn(scope,node.childNodes,undefined,boundTranscludeFn)}}}}function collectDirectives(node,directives,attrs,maxPriority){var nodeType=node.nodeType,attrsMap=attrs.$attr,match,className;switch(nodeType){case 1:addDirective(directives,directiveNormalize(nodeName_(node).toLowerCase()),"E",maxPriority);for(var attr,name,n
 Name,ngAttrName,value,nAttrs=node.attributes,j=0,jj=nAttrs&&nAttrs.length;j<jj;j++){attr=nAttrs[j];if(attr.specified){name=attr.name;ngAttrName=directiveNormalize(name);if(NG_ATTR_BINDING.test(ngAttrName)){name=ngAttrName.substr(6).toLowerCase()}nName=directiveNormalize(name.toLowerCase());attrsMap[nName]=name;attrs[nName]=value=trim(msie&&name=="href"?decodeURIComponent(node.getAttribute(name,2)):attr.value);if(getBooleanAttrName(node,nName)){attrs[nName]=true}addAttrInterpolateDirective(node,directives,value,nName);addDirective(directives,nName,"A",maxPriority)}}className=node.className;if(isString(className)&&className!==""){while(match=CLASS_DIRECTIVE_REGEXP.exec(className)){nName=directiveNormalize(match[2]);if(addDirective(directives,nName,"C",maxPriority)){attrs[nName]=trim(match[3])}className=className.substr(match.index+match[0].length)}}break;case 3:addTextInterpolateDirective(directives,node.nodeValue);break;case 8:try{match=COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);i
 f(match){nName=directiveNormalize(match[1]);if(addDirective(directives,nName,"M",maxPriority)){attrs[nName]=trim(match[2])}}}catch(e){}break}directives.sort(byPriority);return directives}function applyDirectivesToNode(directives,compileNode,templateAttrs,transcludeFn,jqCollection){var terminalPriority=-Number.MAX_VALUE,preLinkFns=[],postLinkFns=[],newScopeDirective=null,newIsolateScopeDirective=null,templateDirective=null,$compileNode=templateAttrs.$$element=jqLite(compileNode),directive,directiveName,$template,transcludeDirective,childTranscludeFn=transcludeFn,controllerDirectives,linkFn,directiveValue;for(var i=0,ii=directives.length;i<ii;i++){directive=directives[i];$template=undefined;if(terminalPriority>directive.priority){break}if(directiveValue=directive.scope){assertNoDuplicate("isolated scope",newIsolateScopeDirective,directive,$compileNode);if(isObject(directiveValue)){safeAddClass($compileNode,"ng-isolate-scope");newIsolateScopeDirective=directive}safeAddClass($compileNod
 e,"ng-scope");newScopeDirective=newScopeDirective||directive}directiveName=directive.name;if(directiveValue=directive.controller){controllerDirectives=controllerDirectives||{};assertNoDuplicate("'"+directiveName+"' controller",controllerDirectives[directiveName],directive,$compileNode);controllerDirectives[directiveName]=directive}if(directiveValue=directive.transclude){assertNoDuplicate("transclusion",transcludeDirective,directive,$compileNode);transcludeDirective=directive;terminalPriority=directive.priority;if(directiveValue=="element"){$template=jqLite(compileNode);$compileNode=templateAttrs.$$element=jqLite(document.createComment(" "+directiveName+": "+templateAttrs[directiveName]+" "));compileNode=$compileNode[0];replaceWith(jqCollection,jqLite($template[0]),compileNode);childTranscludeFn=compile($template,transcludeFn,terminalPriority)}else{$template=jqLite(JQLiteClone(compileNode)).contents();$compileNode.html("");childTranscludeFn=compile($template,transcludeFn)}}if(directi
 ve.template){assertNoDuplicate("template",templateDirective,directive,$compileNode);templateDirective=directive;directiveValue=isFunction(directive.template)?directive.template($compileNode,templateAttrs):directive.template;directiveValue=denormalizeTemplate(directiveValue);if(directive.replace){$template=jqLite("<div>"+trim(directiveValue)+"</div>").contents();compileNode=$template[0];if($template.length!=1||compileNode.nodeType!==1){throw new Error(MULTI_ROOT_TEMPLATE_ERROR+directiveValue)}replaceWith(jqCollection,$compileNode,compileNode);var newTemplateAttrs={$attr:{}};directives=directives.concat(collectDirectives(compileNode,directives.splice(i+1,directives.length-(i+1)),newTemplateAttrs));mergeTemplateAttributes(templateAttrs,newTemplateAttrs);ii=directives.length}else{$compileNode.html(directiveValue)}}if(directive.templateUrl){assertNoDuplicate("template",templateDirective,directive,$compileNode);templateDirective=directive;nodeLinkFn=compileTemplateUrl(directives.splice(i,
 directives.length-i),nodeLinkFn,$compileNode,templateAttrs,jqCollection,directive.replace,childTranscludeFn);ii=directives.length}else if(directive.compile){try{linkFn=directive.compile($compileNode,templateAttrs,childTranscludeFn);if(isFunction(linkFn)){addLinkFns(null,linkFn)}else if(linkFn){addLinkFns(linkFn.pre,linkFn.post)}}catch(e){$exceptionHandler(e,startingTag($compileNode))}}if(directive.terminal){nodeLinkFn.terminal=true;terminalPriority=Math.max(terminalPriority,directive.priority)}}nodeLinkFn.scope=newScopeDirective&&newScopeDirective.scope;nodeLinkFn.transclude=transcludeDirective&&childTranscludeFn;return nodeLinkFn;function addLinkFns(pre,post){if(pre){pre.require=directive.require;preLinkFns.push(pre)}if(post){post.require=directive.require;postLinkFns.push(post)}}function getControllers(require,$element){var value,retrievalMethod="data",optional=false;if(isString(require)){while((value=require.charAt(0))=="^"||value=="?"){require=require.substr(1);if(value=="^"){re
 trievalMethod="inheritedData"}optional=optional||value=="?"}value=$element[retrievalMethod]("$"+require+"Controller");if(!value&&!optional){throw Error("No controller: "+require)}return value}else if(isArray(require)){value=[];forEach(require,function(require){value.push(getControllers(require,$element))})}return value}function nodeLinkFn(childLinkFn,scope,linkNode,$rootElement,boundTranscludeFn){var attrs,$element,i,ii,linkFn,controller;if(compileNode===linkNode){attrs=templateAttrs}else{attrs=shallowCopy(templateAttrs,new Attributes(jqLite(linkNode),templateAttrs.$attr))}$element=attrs.$$element;if(newIsolateScopeDirective){var LOCAL_REGEXP=/^\s*([@=&])(\??)\s*(\w*)\s*$/;var parentScope=scope.$parent||scope;forEach(newIsolateScopeDirective.scope,function(definiton,scopeName){var match=definiton.match(LOCAL_REGEXP)||[],attrName=match[3]||scopeName,optional=match[2]=="?",mode=match[1],lastValue,parentGet,parentSet;scope.$$isolateBindings[scopeName]=mode+attrName;switch(mode){case"@"
 :{attrs.$observe(attrName,function(value){scope[scopeName]=value});attrs.$$observers[attrName].$$scope=parentScope;if(attrs[attrName]){scope[scopeName]=$interpolate(attrs[attrName])(parentScope)}break}case"=":{if(optional&&!attrs[attrName]){return}parentGet=$parse(attrs[attrName]);parentSet=parentGet.assign||function(){lastValue=scope[scopeName]=parentGet(parentScope);throw Error(NON_ASSIGNABLE_MODEL_EXPRESSION+attrs[attrName]+" (directive: "+newIsolateScopeDirective.name+")")};lastValue=scope[scopeName]=parentGet(parentScope);scope.$watch(function parentValueWatch(){var parentValue=parentGet(parentScope);if(parentValue!==scope[scopeName]){if(parentValue!==lastValue){lastValue=scope[scopeName]=parentValue}else{parentSet(parentScope,parentValue=lastValue=scope[scopeName])}}return parentValue});break}case"&":{parentGet=$parse(attrs[attrName]);scope[scopeName]=function(locals){return parentGet(parentScope,locals)};break}default:{throw Error("Invalid isolate scope definition for directi
 ve "+newIsolateScopeDirective.name+": "+definiton)}}})}if(controllerDirectives){forEach(controllerDirectives,function(directive){var locals={$scope:scope,$element:$element,$attrs:attrs,$transclude:boundTranscludeFn};controller=directive.controller;if(controller=="@"){controller=attrs[directive.name]}$element.data("$"+directive.name+"Controller",$controller(controller,locals))})}for(i=0,ii=preLinkFns.length;i<ii;i++){try{linkFn=preLinkFns[i];linkFn(scope,$element,attrs,linkFn.require&&getControllers(linkFn.require,$element))}catch(e){$exceptionHandler(e,startingTag($element))}}childLinkFn&&childLinkFn(scope,linkNode.childNodes,undefined,boundTranscludeFn);for(i=0,ii=postLinkFns.length;i<ii;i++){try{linkFn=postLinkFns[i];linkFn(scope,$element,attrs,linkFn.require&&getControllers(linkFn.require,$element))}catch(e){$exceptionHandler(e,startingTag($element))}}}}function addDirective(tDirectives,name,location,maxPriority){var match=false;if(hasDirectives.hasOwnProperty(name)){for(var dire
 ctive,directives=$injector.get(name+Suffix),i=0,ii=directives.length;i<ii;i++){try{directive=directives[i];if((maxPriority===undefined||maxPriority>directive.priority)&&directive.restrict.indexOf(location)!=-1){tDirectives.push(directive);match=true}}catch(e){$exceptionHandler(e)}}}return match}function mergeTemplateAttributes(dst,src){var srcAttr=src.$attr,dstAttr=dst.$attr,$element=dst.$$element;forEach(dst,function(value,key){if(key.charAt(0)!="$"){if(src[key]){value+=(key==="style"?";":" ")+src[key]}dst.$set(key,value,true,srcAttr[key])}});forEach(src,function(value,key){if(key=="class"){safeAddClass($element,value);dst["class"]=(dst["class"]?dst["class"]+" ":"")+value}else if(key=="style"){$element.attr("style",$element.attr("style")+";"+value)}else if(key.charAt(0)!="$"&&!dst.hasOwnProperty(key)){dst[key]=value;dstAttr[key]=srcAttr[key]}})}function compileTemplateUrl(directives,beforeTemplateNodeLinkFn,$compileNode,tAttrs,$rootElement,replace,childTranscludeFn){var linkQueue=[
 ],afterTemplateNodeLinkFn,afterTemplateChildLinkFn,beforeTemplateCompileNode=$compileNode[0],origAsyncDirective=directives.shift(),derivedSyncDirective=extend({},origAsyncDirective,{controller:null,templateUrl:null,transclude:null,scope:null}),templateUrl=isFunction(origAsyncDirective.templateUrl)?origAsyncDirective.templateUrl($compileNode,tAttrs):origAsyncDirective.templateUrl;$compileNode.html("");$http.get(templateUrl,{cache:$templateCache}).success(function(content){var compileNode,tempTemplateAttrs,$template;content=denormalizeTemplate(content);if(replace){$template=jqLite("<div>"+trim(content)+"</div>").contents();compileNode=$template[0];if($template.length!=1||compileNode.nodeType!==1){throw new Error(MULTI_ROOT_TEMPLATE_ERROR+content)}tempTemplateAttrs={$attr:{}};replaceWith($rootElement,$compileNode,compileNode);collectDirectives(compileNode,directives,tempTemplateAttrs);mergeTemplateAttributes(tAttrs,tempTemplateAttrs)}else{compileNode=beforeTemplateCompileNode;$compileN
 ode.html(content)}directives.unshift(derivedSyncDirective);afterTemplateNodeLinkFn=applyDirectivesToNode(directives,compileNode,tAttrs,childTranscludeFn);afterTemplateChildLinkFn=compileNodes($compileNode[0].childNodes,childTranscludeFn);while(linkQueue.length){var scope=linkQueue.shift(),beforeTemplateLinkNode=linkQueue.shift(),linkRootElement=linkQueue.shift(),controller=linkQueue.shift(),linkNode=compileNode;if(beforeTemplateLinkNode!==beforeTemplateCompileNode){linkNode=JQLiteClone(compileNode);replaceWith(linkRootElement,jqLite(beforeTemplateLinkNode),linkNode)}afterTemplateNodeLinkFn(function(){beforeTemplateNodeLinkFn(afterTemplateChildLinkFn,scope,linkNode,$rootElement,controller)},scope,linkNode,$rootElement,controller)}linkQueue=null}).error(function(response,code,headers,config){throw Error("Failed to load template: "+config.url)});return function delayedNodeLinkFn(ignoreChildLinkFn,scope,node,rootElement,controller){if(linkQueue){linkQueue.push(scope);linkQueue.push(node
 );linkQueue.push(rootElement);linkQueue.push(controller)}else{afterTemplateNodeLinkFn(function(){beforeTemplateNodeLinkFn(afterTemplateChildLinkFn,scope,node,rootElement,controller)},scope,node,rootElement,controller)}}}function byPriority(a,b){return b.priority-a.priority}function assertNoDuplicate(what,previousDirective,directive,element){if(previousDirective){throw Error("Multiple directives ["+previousDirective.name+", "+directive.name+"] asking for "+what+" on: "+startingTag(element))}}function addTextInterpolateDirective(directives,text){var interpolateFn=$interpolate(text,true);if(interpolateFn){directives.push({priority:0,compile:valueFn(function textInterpolateLinkFn(scope,node){var parent=node.parent(),bindings=parent.data("$binding")||[];bindings.push(interpolateFn);safeAddClass(parent.data("$binding",bindings),"ng-binding");scope.$watch(interpolateFn,function interpolateFnWatchAction(value){node[0].nodeValue=value})})})}}function addAttrInterpolateDirective(node,directiv
 es,value,name){var interpolateFn=$interpolate(value,true);if(!interpolateFn)return;directives.push({priority:100,compile:valueFn(function attrInterpolateLinkFn(scope,element,attr){var $$observers=attr.$$observers||(attr.$$observers={});interpolateFn=$interpolate(attr[name],true);if(!interpolateFn)return;attr[name]=interpolateFn(scope);($$observers[name]||($$observers[name]=[])).$$inter=true;(attr.$$observers&&attr.$$observers[name].$$scope||scope).$watch(interpolateFn,function interpolateFnWatchAction(value){attr.$set(name,value)})})})}function replaceWith($rootElement,$element,newNode){var oldNode=$element[0],parent=oldNode.parentNode,i,ii;if($rootElement){for(i=0,ii=$rootElement.length;i<ii;i++){if($rootElement[i]==oldNode){$rootElement[i]=newNode;break}}}if(parent){parent.replaceChild(newNode,oldNode)}newNode[jqLite.expando]=oldNode[jqLite.expando];$element[0]=newNode}}]}var PREFIX_REGEXP=/^(x[\:\-_]|data[\:\-_])/i;function directiveNormalize(name){return camelCase(name.replace(P
 REFIX_REGEXP,""))}function nodesetLinkingFn(scope,nodeList,rootElement,boundTranscludeFn){}function directiveLinkingFn(nodesetLinkingFn,scope,node,rootElement,boundTranscludeFn){}function $ControllerProvider(){var controllers={},CNTRL_REG=/^(\S+)(\s+as\s+(\w+))?$/;
+this.register=function(name,constructor){if(isObject(name)){extend(controllers,name)}else{controllers[name]=constructor}};this.$get=["$injector","$window",function($injector,$window){return function(expression,locals){var instance,match,constructor,identifier;if(isString(expression)){match=expression.match(CNTRL_REG),constructor=match[1],identifier=match[3];expression=controllers.hasOwnProperty(constructor)?controllers[constructor]:getter(locals.$scope,constructor,true)||getter($window,constructor,true);assertArgFn(expression,constructor,true)}instance=$injector.instantiate(expression,locals);if(identifier){if(typeof locals.$scope!=="object"){throw new Error('Can not export controller as "'+identifier+'". '+"No scope object provided!")}locals.$scope[identifier]=instance}return instance}}]}function $DocumentProvider(){this.$get=["$window",function(window){return jqLite(window.document)}]}function $ExceptionHandlerProvider(){this.$get=["$log",function($log){return function(exception,c
 ause){$log.error.apply($log,arguments)}}]}function $InterpolateProvider(){var startSymbol="{{";var endSymbol="}}";this.startSymbol=function(value){if(value){startSymbol=value;return this}else{return startSymbol}};this.endSymbol=function(value){if(value){endSymbol=value;return this}else{return endSymbol}};this.$get=["$parse","$exceptionHandler",function($parse,$exceptionHandler){var startSymbolLength=startSymbol.length,endSymbolLength=endSymbol.length;function $interpolate(text,mustHaveExpression){var startIndex,endIndex,index=0,parts=[],length=text.length,hasInterpolation=false,fn,exp,concat=[];while(index<length){if((startIndex=text.indexOf(startSymbol,index))!=-1&&(endIndex=text.indexOf(endSymbol,startIndex+startSymbolLength))!=-1){index!=startIndex&&parts.push(text.substring(index,startIndex));parts.push(fn=$parse(exp=text.substring(startIndex+startSymbolLength,endIndex)));fn.exp=exp;index=endIndex+endSymbolLength;hasInterpolation=true}else{index!=length&&parts.push(text.substrin
 g(index));index=length}}if(!(length=parts.length)){parts.push("");length=1}if(!mustHaveExpression||hasInterpolation){concat.length=length;fn=function(context){try{for(var i=0,ii=length,part;i<ii;i++){if(typeof(part=parts[i])=="function"){part=part(context);if(part==null||part==undefined){part=""}else if(typeof part!="string"){part=toJson(part)}}concat[i]=part}return concat.join("")}catch(err){var newErr=new Error("Error while interpolating: "+text+"\n"+err.toString());$exceptionHandler(newErr)}};fn.exp=text;fn.parts=parts;return fn}}$interpolate.startSymbol=function(){return startSymbol};$interpolate.endSymbol=function(){return endSymbol};return $interpolate}]}var SERVER_MATCH=/^([^:]+):\/\/(\w+:{0,1}\w*@)?(\{?[\w\.-]*\}?)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/,PATH_MATCH=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,DEFAULT_PORTS={http:80,https:443,ftp:21};function encodePath(path){var segments=path.split("/"),i=segments.length;while(i--){segments[i]=encodeUriSegment(segments[i])}return
  segments.join("/")}function matchUrl(url,obj){var match=SERVER_MATCH.exec(url);obj.$$protocol=match[1];obj.$$host=match[3];obj.$$port=int(match[5])||DEFAULT_PORTS[match[1]]||null}function matchAppUrl(url,obj){var match=PATH_MATCH.exec(url);obj.$$path=decodeURIComponent(match[1]);obj.$$search=parseKeyValue(match[3]);obj.$$hash=decodeURIComponent(match[5]||"");if(obj.$$path&&obj.$$path.charAt(0)!="/")obj.$$path="/"+obj.$$path}function composeProtocolHostPort(protocol,host,port){return protocol+"://"+host+(port==DEFAULT_PORTS[protocol]?"":":"+port)}function beginsWith(begin,whole,otherwise){return whole.indexOf(begin)==0?whole.substr(begin.length):otherwise}function stripHash(url){var index=url.indexOf("#");return index==-1?url:url.substr(0,index)}function stripFile(url){return url.substr(0,stripHash(url).lastIndexOf("/")+1)}function serverBase(url){return url.substring(0,url.indexOf("/",url.indexOf("//")+2))}function LocationHtml5Url(appBase,basePrefix){basePrefix=basePrefix||"";var 
 appBaseNoFile=stripFile(appBase);this.$$parse=function(url){var parsed={};matchUrl(url,parsed);var pathUrl=beginsWith(appBaseNoFile,url);if(!isString(pathUrl)){throw Error('Invalid url "'+url+'", missing path prefix "'+appBaseNoFile+'".')}matchAppUrl(pathUrl,parsed);extend(this,parsed);if(!this.$$path){this.$$path="/"}this.$$compose()};this.$$compose=function(){var search=toKeyValue(this.$$search),hash=this.$$hash?"#"+encodeUriSegment(this.$$hash):"";this.$$url=encodePath(this.$$path)+(search?"?"+search:"")+hash;this.$$absUrl=appBaseNoFile+this.$$url.substr(1)};this.$$rewrite=function(url){var appUrl,prevAppUrl;if((appUrl=beginsWith(appBase,url))!==undefined){prevAppUrl=appUrl;if((appUrl=beginsWith(basePrefix,appUrl))!==undefined){return appBaseNoFile+(beginsWith("/",appUrl)||appUrl)}else{return appBase+prevAppUrl}}else if((appUrl=beginsWith(appBaseNoFile,url))!==undefined){return appBaseNoFile+appUrl}else if(appBaseNoFile==url+"/"){return appBaseNoFile}}}function LocationHashbangUr
 l(appBase,hashPrefix){var appBaseNoFile=stripFile(appBase);this.$$parse=function(url){matchUrl(url,this);var withoutBaseUrl=beginsWith(appBase,url)||beginsWith(appBaseNoFile,url);if(!isString(withoutBaseUrl)){throw new Error('Invalid url "'+url+'", does not start with "'+appBase+'".')}var withoutHashUrl=withoutBaseUrl.charAt(0)=="#"?beginsWith(hashPrefix,withoutBaseUrl):withoutBaseUrl;if(!isString(withoutHashUrl)){throw new Error('Invalid url "'+url+'", missing hash prefix "'+hashPrefix+'".')}matchAppUrl(withoutHashUrl,this);this.$$compose()};this.$$compose=function(){var search=toKeyValue(this.$$search),hash=this.$$hash?"#"+encodeUriSegment(this.$$hash):"";this.$$url=encodePath(this.$$path)+(search?"?"+search:"")+hash;this.$$absUrl=appBase+(this.$$url?hashPrefix+this.$$url:"")};this.$$rewrite=function(url){if(stripHash(appBase)==stripHash(url)){return url}}}function LocationHashbangInHtml5Url(appBase,hashPrefix){LocationHashbangUrl.apply(this,arguments);var appBaseNoFile=stripFile(
 appBase);this.$$rewrite=function(url){var appUrl;if(appBase==stripHash(url)){return url}else if(appUrl=beginsWith(appBaseNoFile,url)){return appBase+hashPrefix+appUrl}else if(appBaseNoFile===url+"/"){return appBaseNoFile}}}LocationHashbangInHtml5Url.prototype=LocationHashbangUrl.prototype=LocationHtml5Url.prototype={$$replace:false,absUrl:locationGetter("$$absUrl"),url:function(url,replace){if(isUndefined(url))return this.$$url;var match=PATH_MATCH.exec(url);if(match[1])this.path(decodeURIComponent(match[1]));if(match[2]||match[1])this.search(match[3]||"");this.hash(match[5]||"",replace);return this},protocol:locationGetter("$$protocol"),host:locationGetter("$$host"),port:locationGetter("$$port"),path:locationGetterSetter("$$path",function(path){return path.charAt(0)=="/"?path:"/"+path}),search:function(search,paramValue){if(isUndefined(search))return this.$$search;if(isDefined(paramValue)){if(paramValue===null){delete this.$$search[search]}else{this.$$search[search]=paramValue}}els
 e{this.$$search=isString(search)?parseKeyValue(search):search}this.$$compose();return this},hash:locationGetterSetter("$$hash",identity),replace:function(){this.$$replace=true;return this}};function locationGetter(property){return function(){return this[property]}}function locationGetterSetter(property,preprocess){return function(value){if(isUndefined(value))return this[property];this[property]=preprocess(value);this.$$compose();return this}}function $LocationProvider(){var hashPrefix="",html5Mode=false;this.hashPrefix=function(prefix){if(isDefined(prefix)){hashPrefix=prefix;return this}else{return hashPrefix}};this.html5Mode=function(mode){if(isDefined(mode)){html5Mode=mode;return this}else{return html5Mode}};this.$get=["$rootScope","$browser","$sniffer","$rootElement",function($rootScope,$browser,$sniffer,$rootElement){var $location,LocationMode,baseHref=$browser.baseHref(),initialUrl=$browser.url(),appBase;if(html5Mode){appBase=baseHref?serverBase(initialUrl)+baseHref:initialUrl;
 LocationMode=$sniffer.history?LocationHtml5Url:LocationHashbangInHtml5Url}else{appBase=stripHash(initialUrl);LocationMode=LocationHashbangUrl}$location=new LocationMode(appBase,"#"+hashPrefix);$location.$$parse($location.$$rewrite(initialUrl));$rootElement.bind("click",function(event){if(event.ctrlKey||event.metaKey||event.which==2)return;var elm=jqLite(event.target);while(lowercase(elm[0].nodeName)!=="a"){if(elm[0]===$rootElement[0]||!(elm=elm.parent())[0])return}var absHref=elm.prop("href");var rewrittenUrl=$location.$$rewrite(absHref);if(absHref&&!elm.attr("target")&&rewrittenUrl&&!event.isDefaultPrevented()){event.preventDefault();if(rewrittenUrl!=$browser.url()){$location.$$parse(rewrittenUrl);$rootScope.$apply();window.angular["ff-684208-preventDefault"]=true}}});if($location.absUrl()!=initialUrl){$browser.url($location.absUrl(),true)}$browser.onUrlChange(function(newUrl){if($location.absUrl()!=newUrl){if($rootScope.$broadcast("$locationChangeStart",newUrl,$location.absUrl()).
 defaultPrevented){$browser.url($location.absUrl());return}$rootScope.$evalAsync(function(){var oldUrl=$location.absUrl();$location.$$parse(newUrl);afterLocationChange(oldUrl)});if(!$rootScope.$$phase)$rootScope.$digest()}});var changeCounter=0;$rootScope.$watch(function $locationWatch(){var oldUrl=$browser.url();var currentReplace=$location.$$replace;if(!changeCounter||oldUrl!=$location.absUrl()){changeCounter++;$rootScope.$evalAsync(function(){if($rootScope.$broadcast("$locationChangeStart",$location.absUrl(),oldUrl).defaultPrevented){$location.$$parse(oldUrl)}else{$browser.url($location.absUrl(),currentReplace);afterLocationChange(oldUrl)}})}$location.$$replace=false;return changeCounter});return $location;function afterLocationChange(oldUrl){$rootScope.$broadcast("$locationChangeSuccess",$location.absUrl(),oldUrl)}}]}function $LogProvider(){var debug=true,self=this;this.debugEnabled=function(flag){if(isDefined(flag)){debug=flag;return this}else{return debug}};this.$get=["$window"
 ,function($window){return{log:consoleLog("log"),warn:consoleLog("warn"),info:consoleLog("info"),error:consoleLog("error"),debug:function(){var fn=consoleLog("debug");return function(){if(debug){fn.apply(self,arguments)}}}()};function formatError(arg){if(arg instanceof Error){if(arg.stack){arg=arg.message&&arg.stack.indexOf(arg.message)===-1?"Error: "+arg.message+"\n"+arg.stack:arg.stack}else if(arg.sourceURL){arg=arg.message+"\n"+arg.sourceURL+":"+arg.line}}return arg}function consoleLog(type){var console=$window.console||{},logFn=console[type]||console.log||noop;if(logFn.apply){return function(){var args=[];forEach(arguments,function(arg){args.push(formatError(arg))});return logFn.apply(console,args)}}return function(arg1,arg2){logFn(arg1,arg2)}}}]}var OPERATORS={"null":function(){return null},"true":function(){return true},"false":function(){return false},undefined:noop,"+":function(self,locals,a,b){a=a(self,locals);b=b(self,locals);if(isDefined(a)){if(isDefined(b)){return a+b}ret
 urn a}return isDefined(b)?b:undefined},"-":function(self,locals,a,b){a=a(self,locals);b=b(self,locals);return(isDefined(a)?a:0)-(isDefined(b)?b:0)},"*":function(self,locals,a,b){return a(self,locals)*b(self,locals)},"/":function(self,locals,a,b){return a(self,locals)/b(self,locals)},"%":function(self,locals,a,b){return a(self,locals)%b(self,locals)},"^":function(self,locals,a,b){return a(self,locals)^b(self,locals)},"=":noop,"===":function(self,locals,a,b){return a(self,locals)===b(self,locals)},"!==":function(self,locals,a,b){return a(self,locals)!==b(self,locals)},"==":function(self,locals,a,b){return a(self,locals)==b(self,locals)},"!=":function(self,locals,a,b){return a(self,locals)!=b(self,locals)},"<":function(self,locals,a,b){return a(self,locals)<b(self,locals)},">":function(self,locals,a,b){return a(self,locals)>b(self,locals)},"<=":function(self,locals,a,b){return a(self,locals)<=b(self,locals)},">=":function(self,locals,a,b){return a(self,locals)>=b(self,locals)},"&&":fun
 ction(self,locals,a,b){return a(self,locals)&&b(self,locals)},"||":function(self,locals,a,b){return a(self,locals)||b(self,locals)},"&":function(self,locals,a,b){return a(self,locals)&b(self,locals)},"|":function(self,locals,a,b){return b(self,locals)(self,locals,a(self,locals))},"!":function(self,locals,a){return!a(self,locals)}};var ESCAPE={n:"\n",f:"\f",r:"\r",t:"	",v:"","'":"'",'"':'"'};function lex(text,csp){var tokens=[],token,index=0,json=[],ch,lastCh=":";while(index<text.length){ch=text.charAt(index);if(is("\"'")){readString(ch)}else if(isNumber(ch)||is(".")&&isNumber(peek())){readNumber()}else if(isIdent(ch)){readIdent();if(was("{,")&&json[0]=="{"&&(token=tokens[tokens.length-1])){token.json=token.text.indexOf(".")==-1}}else if(is("(){}[].,;:?")){tokens.push({index:index,text:ch,json:was(":[,")&&is("{[")||is("}]:,")});if(is("{["))json.unshift(ch);if(is("}]"))json.shift();index++}else if(isWhitespace(ch)){index++;continue}else{var ch2=ch+peek(),ch3=ch2+peek(2),fn=OPERATORS[
 ch],fn2=OPERATORS[ch2],fn3=OPERATORS[ch3];if(fn3){tokens.push({index:index,text:ch3,fn:fn3});index+=3}else if(fn2){tokens.push({index:index,text:ch2,fn:fn2});index+=2}else if(fn){tokens.push({index:index,text:ch,fn:fn,json:was("[,:")&&is("+-")});index+=1}else{throwError("Unexpected next character ",index,index+1)}}lastCh=ch}return tokens;function is(chars){return chars.indexOf(ch)!=-1}function was(chars){return chars.indexOf(lastCh)!=-1}function peek(i){var num=i||1;return index+num<text.length?text.charAt(index+num):false}function isNumber(ch){return"0"<=ch&&ch<="9"}function isWhitespace(ch){return ch==" "||ch=="\r"||ch=="	"||ch=="\n"||ch==""||ch==" "}function isIdent(ch){return"a"<=ch&&ch<="z"||"A"<=ch&&ch<="Z"||"_"==ch||ch=="$"}function isExpOperator(ch){return ch=="-"||ch=="+"||isNumber(ch)}function throwError(error,start,end){end=end||index;throw Error("Lexer Error: "+error+" at column"+(isDefined(start)?"s "+start+"-"+index+" ["+text.substring(start,end)+"]":" "+end)+" in ex
 pression ["+text+"].")}function readNumber(){var number="";var start=index;while(index<text.length){var ch=lowercase(text.charAt(index));if(ch=="."||isNumber(ch)){number+=ch}else{var peekCh=peek();if(ch=="e"&&isExpOperator(peekCh)){number+=ch}else if(isExpOperator(ch)&&peekCh&&isNumber(peekCh)&&number.charAt(number.length-1)=="e"){number+=ch}else if(isExpOperator(ch)&&(!peekCh||!isNumber(peekCh))&&number.charAt(number.length-1)=="e"){throwError("Invalid exponent")}else{break}}index++}number=1*number;tokens.push({index:start,text:number,json:true,fn:function(){return number}})}function readIdent(){var ident="",start=index,lastDot,peekIndex,methodName,ch;while(index<text.length){ch=text.charAt(index);if(ch=="."||isIdent(ch)||isNumber(ch)){if(ch==".")lastDot=index;ident+=ch}else{break}index++}if(lastDot){peekIndex=index;while(peekIndex<text.length){ch=text.charAt(peekIndex);if(ch=="("){methodName=ident.substr(lastDot-start+1);ident=ident.substr(0,lastDot-start);index=peekIndex;break}if
 (isWhitespace(ch)){peekIndex++}else{break}}}var token={index:start,text:ident};if(OPERATORS.hasOwnProperty(ident)){token.fn=token.json=OPERATORS[ident]}else{var getter=getterFn(ident,csp);token.fn=extend(function(self,locals){return getter(self,locals)},{assign:function(self,value){return setter(self,ident,value)}})}tokens.push(token);if(methodName){tokens.push({index:lastDot,text:".",json:false});tokens.push({index:lastDot+1,text:methodName,json:false})}}function readString(quote){var start=index;index++;var string="";var rawString=quote;var escape=false;while(index<text.length){var ch=text.charAt(index);rawString+=ch;if(escape){if(ch=="u"){var hex=text.substring(index+1,index+5);if(!hex.match(/[\da-f]{4}/i))throwError("Invalid unicode escape [\\u"+hex+"]");index+=4;string+=String.fromCharCode(parseInt(hex,16))}else{var rep=ESCAPE[ch];if(rep){string+=rep}else{string+=ch}}escape=false}else if(ch=="\\"){escape=true}else if(ch==quote){index++;tokens.push({index:start,text:rawString,st
 ring:string,json:true,fn:function(){return string}});return}else{string+=ch}index++}throwError("Unterminated quote",start)}}function parser(text,json,$filter,csp){var ZERO=valueFn(0),value,tokens=lex(text,csp),assignment=_assignment,functionCall=_functionCall,fieldAccess=_fieldAccess,objectIndex=_objectIndex,filterChain=_filterChain;if(json){assignment=logicalOR;functionCall=fieldAccess=objectIndex=filterChain=function(){throwError("is not valid json",{text:text,index:0})};value=primary()}else{value=statements()}if(tokens.length!==0){throwError("is an unexpected token",tokens[0])}value.literal=!!value.literal;value.constant=!!value.constant;return value;function throwError(msg,token){throw Error("Syntax Error: Token '"+token.text+"' "+msg+" at column "+(token.index+1)+" of the expression ["+text+"] starting at ["+text.substring(token.index)+"].")}function peekToken(){if(tokens.length===0)throw Error("Unexpected end of expression: "+text);return tokens[0]}function peek(e1,e2,e3,e4){i
 f(tokens.length>0){var token=tokens[0];var t=token.text;if(t==e1||t==e2||t==e3||t==e4||!e1&&!e2&&!e3&&!e4){return token}}return false}function expect(e1,e2,e3,e4){var token=peek(e1,e2,e3,e4);if(token){if(json&&!token.json){throwError("is not valid json",token)}tokens.shift();return token}return false}function consume(e1){if(!expect(e1)){throwError("is unexpected, expecting ["+e1+"]",peek())}}function unaryFn(fn,right){return extend(function(self,locals){return fn(self,locals,right)},{constant:right.constant})}function ternaryFn(left,middle,right){return extend(function(self,locals){return left(self,locals)?middle(self,locals):right(self,locals)},{constant:left.constant&&middle.constant&&right.constant})}function binaryFn(left,fn,right){return extend(function(self,locals){return fn(self,locals,left,right)},{constant:left.constant&&right.constant})}function statements(){var statements=[];while(true){if(tokens.length>0&&!peek("}",")",";","]"))statements.push(filterChain());if(!expect("
 ;")){return statements.length==1?statements[0]:function(self,locals){var value;for(var i=0;i<statements.length;i++){var statement=statements[i];if(statement)value=statement(self,locals)}return value}}}}function _filterChain(){var left=expression();var token;while(true){if(token=expect("|")){left=binaryFn(left,token.fn,filter())}else{return left}}}function filter(){var token=expect();var fn=$filter(token.text);var argsFn=[];while(true){if(token=expect(":")){argsFn.push(expression())}else{var fnInvoke=function(self,locals,input){var args=[input];for(var i=0;i<argsFn.length;i++){args.push(argsFn[i](self,locals))}return fn.apply(self,args)};return function(){return fnInvoke}}}}function expression(){return assignment()}function _assignment(){var left=ternary();var right;var token;if(token=expect("=")){if(!left.assign){throwError("implies assignment but ["+text.substring(0,token.index)+"] can not be assigned to",token)}right=ternary();return function(scope,locals){return left.assign(scope
 ,right(scope,locals),locals)}}else{return left}}function ternary(){var left=logicalOR();var middle;var token;if(token=expect("?")){middle=ternary();if(token=expect(":")){return ternaryFn(left,middle,ternary())}else{throwError("expected :",token)}}else{return left}}function logicalOR(){var left=logicalAND();var token;while(true){if(token=expect("||")){left=binaryFn(left,token.fn,logicalAND())}else{return left}}}function logicalAND(){var left=equality();var token;if(token=expect("&&")){left=binaryFn(left,token.fn,logicalAND())}return left}function equality(){var left=relational();var token;if(token=expect("==","!=","===","!==")){left=binaryFn(left,token.fn,equality())}return left}function relational(){var left=additive();var token;if(token=expect("<",">","<=",">=")){left=binaryFn(left,token.fn,relational())}return left}function additive(){var left=multiplicative();var token;while(token=expect("+","-")){left=binaryFn(left,token.fn,multiplicative())}return left}function multiplicative()
 {var left=unary();var token;while(token=expect("*","/","%")){left=binaryFn(left,token.fn,unary())}return left}function unary(){var token;if(expect("+")){return primary()}else if(token=expect("-")){return binaryFn(ZERO,token.fn,unary())}else if(token=expect("!")){return unaryFn(token.fn,unary())}else{return primary()}}function primary(){var primary;if(expect("(")){primary=filterChain();consume(")")}else if(expect("[")){primary=arrayDeclaration()}else if(expect("{")){primary=object()}else{var token=expect();primary=token.fn;if(!primary){throwError("not a primary expression",token)}if(token.json){primary.constant=primary.literal=true}}var next,context;while(next=expect("(","[",".")){if(next.text==="("){primary=functionCall(primary,context);context=null}else if(next.text==="["){context=primary;primary=objectIndex(primary)}else if(next.text==="."){context=primary;primary=fieldAccess(primary)}else{throwError("IMPOSSIBLE")}}return primary}function _fieldAccess(object){var field=expect().te
 xt;var getter=getterFn(field,csp);return extend(function(scope,locals,self){return getter(self||object(scope,locals),locals)},{assign:function(scope,value,locals){return setter(object(scope,locals),field,value)}})}function _objectIndex(obj){var indexFn=expression();consume("]");return extend(function(self,locals){var o=obj(self,locals),i=indexFn(self,locals),v,p;if(!o)return undefined;v=o[i];if(v&&v.then){p=v;if(!("$$v"in v)){p.$$v=undefined;p.then(function(val){p.$$v=val})}v=v.$$v}return v},{assign:function(self,value,locals){return obj(self,locals)[indexFn(self,locals)]=value}})}function _functionCall(fn,contextGetter){var argsFn=[];if(peekToken().text!=")"){do{argsFn.push(expression())}while(expect(","))}consume(")");return function(scope,locals){var args=[],context=contextGetter?contextGetter(scope,locals):scope;for(var i=0;i<argsFn.length;i++){args.push(argsFn[i](scope,locals))}var fnPtr=fn(scope,locals,context)||noop;return fnPtr.apply?fnPtr.apply(context,args):fnPtr(args[0],a
 rgs[1],args[2],args[3],args[4])}}function arrayDeclaration(){var elementFns=[];var allConstant=true;if(peekToken().text!="]"){do{var elementFn=expression();elementFns.push(elementFn);if(!elementFn.constant){allConstant=false}}while(expect(","))}consume("]");return extend(function(self,locals){var array=[];for(var i=0;i<elementFns.length;i++){array.push(elementFns[i](self,locals))}return array},{literal:true,constant:allConstant})}function object(){var keyValues=[];var allConstant=true;if(peekToken().text!="}"){do{var token=expect(),key=token.string||token.text;consume(":");var value=expression();keyValues.push({key:key,value:value});if(!value.constant){allConstant=false}}while(expect(","))}consume("}");return extend(function(self,locals){var object={};for(var i=0;i<keyValues.length;i++){var keyValue=keyValues[i];object[keyValue.key]=keyValue.value(self,locals)}return object},{literal:true,constant:allConstant})}}function setter(obj,path,setValue){var element=path.split(".");for(var 
 i=0;element.length>1;i++){var key=element.shift();var propertyObj=obj[key];if(!propertyObj){propertyObj={};obj[key]=propertyObj}obj=propertyObj}obj[element.shift()]=setValue;return setValue}function getter(obj,path,bindFnToScope){if(!path)return obj;var keys=path.split(".");var key;var lastInstance=obj;var len=keys.length;for(var i=0;i<len;i++){key=keys[i];if(obj){obj=(lastInstance=obj)[key]}}if(!bindFnToScope&&isFunction(obj)){return bind(lastInstance,obj)}return obj}var getterFnCache={};function cspSafeGetterFn(key0,key1,key2,key3,key4){return function(scope,locals){var pathVal=locals&&locals.hasOwnProperty(key0)?locals:scope,promise;if(pathVal===null||pathVal===undefined)return pathVal;pathVal=pathVal[key0];if(pathVal&&pathVal.then){if(!("$$v"in pathVal)){promise=pathVal;promise.$$v=undefined;promise.then(function(val){promise.$$v=val})}pathVal=pathVal.$$v}if(!key1||pathVal===null||pathVal===undefined)return pathVal;pathVal=pathVal[key1];if(pathVal&&pathVal.then){if(!("$$v"in pat
 hVal)){promise=pathVal;promise.$$v=undefined;promise.then(function(val){promise.$$v=val})}pathVal=pathVal.$$v}if(!key2||pathVal===null||pathVal===undefined)return pathVal;pathVal=pathVal[key2];if(pathVal&&pathVal.then){if(!("$$v"in pathVal)){promise=pathVal;promise.$$v=undefined;promise.then(function(val){promise.$$v=val})}pathVal=pathVal.$$v}if(!key3||pathVal===null||pathVal===undefined)return pathVal;pathVal=pathVal[key3];if(pathVal&&pathVal.then){if(!("$$v"in pathVal)){promise=pathVal;promise.$$v=undefined;promise.then(function(val){promise.$$v=val})}pathVal=pathVal.$$v}if(!key4||pathVal===null||pathVal===undefined)return pathVal;pathVal=pathVal[key4];if(pathVal&&pathVal.then){if(!("$$v"in pathVal)){promise=pathVal;promise.$$v=undefined;promise.then(function(val){promis

<TRUNCATED>

[41/61] [abbrv] [partial] updated to latest Angular-based admin portal

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/charts/sparklines.js
----------------------------------------------------------------------
diff --git a/portal/js/charts/sparklines.js b/portal/js/charts/sparklines.js
new file mode 100644
index 0000000..29551c5
--- /dev/null
+++ b/portal/js/charts/sparklines.js
@@ -0,0 +1,2 @@
+$('.sessions-bar').sparkline([ 3, 5, 6, 3, 4, 5, 6, 7, 8, 4, 3, 5, 6, 3, 4, 5, 6, 7, 8, 4, 3, 5, 6, 3, 4, 5, 6, 7, 8, 4, 3, 5, 6, 3, 4, 5, 6, 7, 8, 4, 3, 5, 6, 3, 4, 5, 6, 7, 8, 4, 3, 5, 6, 3, 4, 5, 6, 7, 8, 1 ], {type: 'bar', barColor: '#c5c5c5', width: '800px', height: 100, barWidth: 12, barSpacing: '1px'});
+// $('.sessions-bar canvas').width('100%')
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/data/data-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/data/data-controller.js b/portal/js/data/data-controller.js
new file mode 100644
index 0000000..6644a4e
--- /dev/null
+++ b/portal/js/data/data-controller.js
@@ -0,0 +1,304 @@
+'use strict'
+
+AppServices.Controllers.controller('DataCtrl', ['ug', '$scope', '$rootScope', '$location',
+  function (ug, $scope, $rootScope, $location) {
+
+    var init = function () {
+      $scope.verb = 'GET';
+      $scope.display = '';
+
+      $scope.queryBodyDetail = {};
+
+      $scope.queryBodyDisplay = 'none';
+      $scope.queryLimitDisplay = 'block';
+      $scope.queryStringDisplay = 'block';
+      $scope.entitySelected = {};
+      $scope.newCollection = {};
+      $rootScope.queryCollection = {};
+      $scope.data = {};
+      $scope.data.queryPath = '';
+      $scope.data.queryBody = '{ "name":"value" }';
+      $scope.data.searchString = '';
+      $scope.data.queryLimit = '';
+    };
+    var runQuery = function(verb){
+      $scope.loading = true;
+      //get the parameters
+      var queryPath = $scope.removeFirstSlash($scope.data.queryPath || '');
+      var searchString = $scope.data.searchString || '';
+      var queryLimit = $scope.data.queryLimit || '';
+      var body = JSON.parse($scope.data.queryBody || '{}');
+
+      if (verb == 'POST' && $scope.validateJson(true)) {
+        ug.runDataPOSTQuery(queryPath, body);
+      } else if (verb == 'PUT' && $scope.validateJson(true)) {
+        ug.runDataPutQuery(queryPath, searchString, queryLimit, body);
+      } else if (verb == 'DELETE') {
+        ug.runDataDeleteQuery(queryPath, searchString, queryLimit);
+      } else {
+        //GET
+        ug.runDataQuery(queryPath, searchString, queryLimit);
+      }
+    };
+
+    $scope.$on('top-collections-received', function(event, collectionList) {
+      $scope.loading = false;
+      var ignoredCollections = ['events'];
+      //remove some elements from the collection
+      ignoredCollections.forEach(function(ignoredCollection){
+         collectionList.hasOwnProperty(ignoredCollection)  //important check that this is objects own property, not from prototype prop inherited
+          && delete collectionList[ignoredCollection]
+         ;
+      });
+      $scope.collectionList = collectionList;
+      $scope.queryBoxesSelected = false;
+      if(!$scope.queryPath){
+        $scope.loadCollection('/'+collectionList[Object.keys(collectionList).sort()[0]].name);
+      }
+      $scope.applyScope();
+    });
+    $scope.$on('error-running-query', function(event) {
+      $scope.loading = false;
+      runQuery('GET');
+      $scope.applyScope();
+    });
+
+
+    $scope.$on('entity-deleted', function(event) {
+      $scope.deleteLoading = false;
+      $rootScope.$broadcast('alert','success', 'Entities deleted sucessfully');
+      $scope.queryBoxesSelected = false;
+      $scope.checkNextPrev();
+      $scope.applyScope();
+
+    });
+    $scope.$on('entity-deleted-error', function(event) {
+      $scope.deleteLoading = false;
+      runQuery('GET');
+      $scope.applyScope();
+    });
+
+    $scope.$on('collection-created',function(){
+      $scope.newCollection.name = '';
+    });
+
+    $scope.$on('query-received', function(event, collection) {
+      $scope.loading = false;
+      $rootScope.queryCollection = collection;
+      ug.getIndexes($scope.data.queryPath);
+      //$rootScope.$broadcast('alert','success', 'API call completed sucessfully');
+
+      $scope.setDisplayType();
+
+      $scope.checkNextPrev();
+      $scope.applyScope();
+      $scope.queryBoxesSelected = false;
+
+    });
+
+    $scope.$on('indexes-received', function(event, indexes) {
+      //todo - do something with the indexes
+      var fred = indexes;
+    });
+
+    $scope.$on('app-changed',function(){
+      init();
+    });
+
+    $scope.setDisplayType = function() {
+      $scope.display = 'generic';
+    }
+
+    $scope.deleteEntitiesDialog = function(modalId){
+      $scope.deleteLoading = false;
+      $scope.deleteEntities($rootScope.queryCollection, 'entity-deleted', 'error deleting entity');
+
+      $scope.hideModal(modalId)
+    };
+
+    $scope.newCollectionDialog = function(modalId){
+      if ($scope.newCollection.name) {
+        ug.createCollection($scope.newCollection.name);
+        ug.getTopCollections();
+        $rootScope.$broadcast('alert', 'success', 'Collection created successfully.');
+        $scope.hideModal(modalId)
+      } else {
+        $rootScope.$broadcast('alert', 'error', 'You must specify a collection name.');
+      }
+    };
+
+    $scope.addToPath = function(uuid){
+      $scope.data.queryPath = '/' + $rootScope.queryCollection._type + '/' + uuid;
+    }
+
+    $scope.isDeep = function(item){
+      //can be better, just see if object for now
+      return (Object.prototype.toString.call(item) === "[object Object]");
+    };
+
+    //get collection list
+    $scope.loadCollection = function(type) {
+      $scope.data.queryPath = '/'+type.substring(1,type.length);
+      $scope.data.searchString = '';
+      $scope.data.queryLimit = '';
+      $scope.data.body = '{ "name":"value" }';
+      $scope.selectGET();
+      $scope.applyScope();
+      $scope.run();
+    }
+    $scope.selectGET = function() {
+      $scope.queryBodyDisplay = 'none';
+      $scope.queryLimitDisplay = 'block';
+      $scope.queryStringDisplay = 'block';
+      $scope.verb = 'GET';
+    }
+    $scope.selectPOST = function() {
+      $scope.queryBodyDisplay = 'block';
+      $scope.queryLimitDisplay = 'none';
+      $scope.queryStringDisplay = 'none';
+      $scope.verb = 'POST';
+    }
+    $scope.selectPUT = function() {
+      $scope.queryBodyDisplay = 'block';
+      $scope.queryLimitDisplay = 'block';
+      $scope.queryStringDisplay = 'block';
+      $scope.verb = 'PUT';
+    }
+    $scope.selectDELETE = function() {
+      $scope.queryBodyDisplay = 'none';
+      $scope.queryLimitDisplay = 'block';
+      $scope.queryStringDisplay = 'block';
+      $scope.verb = 'DELETE';
+    }
+
+    $scope.validateJson = function(skipMessage) {
+      var queryBody = $scope.data.queryBody;
+
+      try {
+        queryBody = JSON.parse(queryBody);
+      } catch (e) {
+        $rootScope.$broadcast('alert', 'error', 'JSON is not valid');
+        return false;
+      }
+
+      queryBody = JSON.stringify(queryBody,null,2);
+
+      !skipMessage && $rootScope.$broadcast('alert','success', 'JSON is valid');
+
+      $scope.data.queryBody = queryBody;
+      return true;
+    }
+
+
+    $scope.saveEntity = function(entity){
+      if (!$scope.validateJson()) {
+        return false;
+      }
+      var queryBody = entity._json;
+      queryBody = JSON.parse(queryBody);
+      $rootScope.selectedEntity.set(); //clears out all entities
+      $rootScope.selectedEntity.set(queryBody);
+      $rootScope.selectedEntity.set('type', entity._data.type);
+      $rootScope.selectedEntity.set('uuid', entity._data.uuid);
+      $rootScope.selectedEntity.save(function(err, data){
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error: ' + data.error_description);
+        } else {
+          $rootScope.$broadcast('alert', 'success', 'entity saved');
+        }
+
+      });
+    }
+
+    $scope.run = function() {
+      //clear the current data
+      $rootScope.queryCollection = '';
+
+      var verb = $scope.verb;
+      runQuery(verb);
+    }
+
+    $scope.hasProperty = function(prop){
+      //checks each object in array for a given property - used for hiding/showing UI data in table
+      var retval = false;
+      if(typeof $rootScope.queryCollection._list !== 'undefined'){
+        angular.forEach($rootScope.queryCollection._list, function(value, key){
+          //no way to break angular loop :(
+          if(!retval){
+            if(value._data[prop]){
+              retval = true;
+            }
+          }
+        });
+      }
+      return retval;
+    }
+
+    $scope.resetNextPrev = function() {
+      $scope.previous_display = 'none';
+      $scope.next_display = 'none';
+    }
+
+    $scope.checkNextPrev = function() {
+      $scope.resetNextPrev();
+      if ($rootScope.queryCollection.hasPreviousPage()) {
+        $scope.previous_display = 'default';
+      }
+      if($rootScope.queryCollection.hasNextPage()) {
+        $scope.next_display = 'default';
+      }
+    }
+
+    $scope.selectEntity = function(uuid){
+      $rootScope.selectedEntity = $rootScope.queryCollection.getEntityByUUID(uuid);
+      $scope.addToPath(uuid);
+    }
+
+    $scope.getJSONView = function(entity){
+      var tempjson  = entity.get();
+
+      //rip out the system elements.  Stringify first because we don't want to rip them out of the actual object
+      var queryBody = JSON.stringify(tempjson, null, 2);
+      queryBody = JSON.parse(queryBody);
+      delete queryBody.metadata;
+      delete queryBody.uuid;
+      delete queryBody.created;
+      delete queryBody.modified;
+      delete queryBody.type;
+
+      $scope.queryBody = JSON.stringify(queryBody, null, 2);
+    }
+
+    $scope.getPrevious = function () {
+      $rootScope.queryCollection.getPreviousPage(function(err) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error getting previous page of data');
+        }
+        $scope.checkNextPrev();
+        $scope.applyScope();
+      });
+    };
+
+    $scope.getNext = function () {
+      $rootScope.queryCollection.getNextPage(function(err) {
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error getting next page of data');
+        }
+        $scope.checkNextPrev();
+        $scope.applyScope();
+      });
+    };
+
+    init();
+    //persistent vars (stay around when you drill down to an entity detail view)
+    $rootScope.queryCollection = $rootScope.queryCollection  || {};
+    $rootScope.selectedEntity = {};
+    if ($rootScope.queryCollection && $rootScope.queryCollection._type) {
+      $scope.loadCollection($rootScope.queryCollection._type);
+      $scope.setDisplayType();
+    }
+    ug.getTopCollections();
+    $scope.resetNextPrev();
+
+
+  }]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/data/data.html
----------------------------------------------------------------------
diff --git a/portal/js/data/data.html b/portal/js/data/data.html
new file mode 100644
index 0000000..2a0158c
--- /dev/null
+++ b/portal/js/data/data.html
@@ -0,0 +1,121 @@
+<div class="content-page">
+
+  <bsmodal id="newCollection"
+           title="Create new collection"
+           close="hideModal"
+           closelabel="Cancel"
+           extrabutton="newCollectionDialog"
+           extrabuttonlabel="Create"
+           buttonid="collection"
+           ng-cloak>
+    <fieldset>
+      <div class="control-group">
+        <label for="new-collection-name">Collection Name:</label>
+        <div class="controls">
+          <input type="text" ug-validate required ng-pattern="collectionNameRegex" ng-attr-title="{{collectionNameRegexDescription}}" ng-model="$parent.newCollection.name" name="collection" id="new-collection-name" class="input-xlarge"/>
+          <p class="help-block hide"></p>
+        </div>
+      </div>
+    </fieldset>
+  </bsmodal>
+
+  <section class="row-fluid">
+
+    <div class="span12">
+      <div class="page-filters">
+        <h1 class="title" class="pull-left"><i class="pictogram title">&#128254;</i> Collections</h1>
+      </div>
+    </div>
+
+  </section>
+  <section class="row-fluid">
+    <div class="span3 user-col">
+        <a class="btn btn-primary" id="new-collection-link" ng-click="showModal('newCollection')">New Collection</a>
+        <ul  class="user-list">
+          <li ng-class="queryCollection._type === entity.name ? 'selected' : ''" ng-repeat="entity in collectionList" ng-click="loadCollection('/'+entity.name);">
+            <a id="collection-{{entity.name}}-link" href="javaScript:void(0)">/{{entity.name}} </a>
+          </li>
+        </ul>
+
+  </div>
+
+    <div class="span9 tab-content">
+      <div class="content-page">
+      <form name="dataForm" ng-submit="run();">
+        <fieldset>
+          <div class="control-group">
+            <div class="" data-toggle="buttons-radio">
+              <!--a class="btn" id="button-query-back">&#9664; Back</a-->
+              <!--Added disabled class to change the way button looks but their functionality is as usual -->
+              <label class="control-label" style="display:none"><strong>Method</strong> <a id="query-method-help" href="#" class="help-link">get help</a></label>
+              <input type="radio" id="create-rb" name="query-action" style="margin-top: -2px;" ng-click="selectPOST();" ng-checked="verb=='POST'"> CREATE &nbsp; &nbsp;
+              <input type="radio" id="read-rb" name="query-action" style="margin-top: -2px;" ng-click="selectGET();" ng-checked="verb=='GET'"> READ &nbsp; &nbsp;
+              <input type="radio" id="update-rb" name="query-action" style="margin-top: -2px;" ng-click="selectPUT();" ng-checked="verb=='PUT'"> UPDATE &nbsp; &nbsp;
+              <input type="radio" id="delete-rb" name="query-action" style="margin-top: -2px;" ng-click="selectDELETE();" ng-checked="verb=='DELETE'"> DELETE
+            </div>
+          </div>
+
+          <div class="control-group">
+            <strong>Path </strong>
+            <div class="controls">
+              <input ng-model="data.queryPath" type="text" ug-validate id="pathDataQuery" ng-attr-title="{{pathRegexDescription}}" ng-pattern="pathRegex" class="span6" autocomplete="off" placeholder="ex: /users" required/>
+            </div>
+          </div>
+          <div class="control-group">
+            <a id="back-to-collection" class="outside-link" style="display:none">Back to collection</a>
+          </div>
+          <div class="control-group">
+            <strong>Query</strong>
+            <div class="controls">
+              <input ng-model="data.searchString" type="text" class="span6" autocomplete="off" placeholder="ex: select * where name='fred'"/>
+              <div style="display:none">
+                <a class="btn dropdown-toggle " data-toggle="dropdown">
+                  <span id="query-collections-caret" class="caret"></span>
+                </a>
+                <ul id="query-collections-indexes-list" class="dropdown-menu ">
+                </ul>
+              </div>
+            </div>
+          </div>
+
+
+          <div class="control-group" ng-show="verb=='GET' || verb=='DELETE'">
+            <label class="control-label" for="query-limit"><strong>Limit</strong> <a id="query-limit-help" href="#" ng-show="false" class="help-link">get help</a></label>
+            <div class="controls">
+              <div class="input-append">
+                <input ng-model="data.queryLimit" type="text" class="span5" id="query-limit" placeholder="ex: 10">
+              </div>
+            </div>
+          </div>
+
+          <div class="control-group" style="display:{{queryBodyDisplay}}">
+            <label class="control-label" for="query-source"><strong>JSON Body</strong> <a id="query-json-help" href="#" ng-show="false" class="help-link">get help</a></label>
+            <div class="controls">
+            <textarea ng-model="data.queryBody" id="query-source" class="span6 pull-left" rows="4">
+      { "name":"value" }
+            </textarea>
+              <br>
+            <a class="btn pull-left" ng-click="validateJson();">Validate JSON</a>
+            </div>
+          </div>
+          <div style="clear: both; height: 10px;"></div>
+          <div class="control-group">
+            <input type="submit" ng-disabled="!dataForm.$valid || loading" class="btn btn-primary" id="button-query"  value="{{loading ? loadingText : 'Run Query'}}"/>
+          </div>
+        </fieldset>
+       </form>
+        <div ng-include="display=='generic' ? 'data/display-generic.html' : ''"></div>
+        <div ng-include="display=='users' ? 'data/display-users.html' : ''"></div>
+        <div ng-include="display=='groups' ? 'data/display-groups.html' : ''"></div>
+        <div ng-include="display=='roles' ? 'data/display-roles.html' : ''"></div>
+
+      </div>
+
+      </div>
+    </section>
+
+
+
+
+</div>
+

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/data/display-generic.html
----------------------------------------------------------------------
diff --git a/portal/js/data/display-generic.html b/portal/js/data/display-generic.html
new file mode 100644
index 0000000..ce4f4f6
--- /dev/null
+++ b/portal/js/data/display-generic.html
@@ -0,0 +1,95 @@
+
+
+<bsmodal id="deleteEntities"
+         title="Are you sure you want to delete the entities(s)?"
+         close="hideModal"
+         closelabel="Cancel"
+         extrabutton="deleteEntitiesDialog"
+         extrabuttonlabel="Delete"
+         buttonid="del-entity"
+         ng-cloak>
+    <fieldset>
+        <div class="control-group">
+        </div>
+    </fieldset>
+</bsmodal>
+
+<span  class="button-strip">
+  <button class="btn btn-primary" ng-disabled="!valueSelected(queryCollection._list) || deleteLoading" ng-click="deleteEntitiesDialog()">{{deleteLoading ? loadingText : 'Delete Entity(s)'}}</button>
+</span>
+<table class="table table-striped collection-list">
+  <thead>
+  <tr class="table-header">
+    <th><input type="checkbox" ng-show="queryCollection._list.length > 0" id="selectAllCheckbox" ng-model="queryBoxesSelected" ng-click="selectAllEntities(queryCollection._list,$parent,'queryBoxesSelected',true)"></th>
+    <th ng-if="hasProperty('name')">Name</th>
+    <th>UUID</th>
+    <th></th>
+  </tr>
+  </thead>
+  <tbody ng-repeat="entity in queryCollection._list">
+  <tr class="zebraRows" >
+    <td>
+      <input
+        type="checkbox"
+        id="entity-{{entity._data.name}}-cb"
+        ng-value="entity._data.uuid"
+        ng-model="entity.checked"
+        >
+    </td>
+    <td ng-if="hasProperty('name')">{{entity._data.name}}</td>
+    <td>{{entity._data.uuid}}</td>
+    <td><a href="javaScript:void(0)" ng-click="entitySelected[$index] = !entitySelected[$index];selectEntity(entity._data.uuid)">{{entitySelected[$index] ? 'Hide' : 'View'}} Details</a></td>
+  </tr>
+  <tr ng-if="entitySelected[$index]">
+    <td colspan="5">
+
+
+      <h4 style="margin: 0 0 20px 0">Entity Detail</h4>
+
+
+      <ul class="formatted-json">
+        <li ng-repeat="(k,v) in entity._data track by $index">
+          <span class="key">{{k}} :</span>
+          <!--todo - doing manual recursion to get this out the door for launch, please fix-->
+          <span ng-switch on="isDeep(v)">
+            <ul ng-switch-when="true">
+              <li ng-repeat="(k2,v2) in v"><span class="key">{{k2}} :</span>
+
+                <span ng-switch on="isDeep(v2)">
+                  <ul ng-switch-when="true">
+                    <li ng-repeat="(k3,v3) in v2"><span class="key">{{k3}} :</span><span class="value">{{v3}}</span></li>
+                  </ul>
+                  <span ng-switch-when="false">
+                    <span class="value">{{v2}}</span>
+                  </span>
+                </span>
+              </li>
+            </ul>
+            <span ng-switch-when="false">
+              <span class="value">{{v}}</span>
+            </span>
+          </span>
+        </li>
+      </ul>
+
+    <div class="control-group">
+      <h4 style="margin: 20px 0 20px 0">Edit Entity</h4>
+      <div class="controls">
+        <textarea ng-model="entity._json" class="span12" rows="12"></textarea>
+        <br>
+        <a class="btn btn-primary toolbar pull-left" ng-click="validateJson();">Validate JSON</a><button type="button" class="btn btn-primary pull-right" id="button-query" ng-click="saveEntity(entity);">Save</button>
+      </div>
+    </div>
+  </td>
+  </tr>
+
+  <tr ng-show="queryCollection._list.length == 0">
+    <td colspan="4">No data found</td>
+  </tr>
+  </tbody>
+</table>
+<div style="padding: 10px 5px 10px 5px">
+  <button class="btn btn-primary toolbar" ng-click="getPrevious()" style="display:{{previous_display}}">< Previous</button>
+  <button class="btn btn-primary toolbar" ng-click="getNext()" style="display:{{next_display}}; float:right;">Next ></button>
+</div>
+

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/data/display-groups.html
----------------------------------------------------------------------
diff --git a/portal/js/data/display-groups.html b/portal/js/data/display-groups.html
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/data/display-roles.html
----------------------------------------------------------------------
diff --git a/portal/js/data/display-roles.html b/portal/js/data/display-roles.html
new file mode 100644
index 0000000..91ce3be
--- /dev/null
+++ b/portal/js/data/display-roles.html
@@ -0,0 +1 @@
+roles---------------------------------
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/data/display-users.html
----------------------------------------------------------------------
diff --git a/portal/js/data/display-users.html b/portal/js/data/display-users.html
new file mode 100644
index 0000000..278e303
--- /dev/null
+++ b/portal/js/data/display-users.html
@@ -0,0 +1,88 @@
+
+<table id="query-response-table" class="table">
+  <tbody>
+  <tr class="zebraRows users-row">
+    <td class="checkboxo">
+      <input type="checkbox" onclick="Usergrid.console.selectAllEntities(this);"></td>
+    <td class="gravatar50-td">&nbsp;</td>
+    <td class="user-details bold-header">Username</td>
+    <td class="user-details bold-header">Display Name</td>
+    <td class="user-details bold-header">UUID</td>
+    <td class="view-details">&nbsp;</td>
+  </tr>
+  <tr class="zebraRows users-row">
+    <td class="checkboxo">
+      <input class="listItem" type="checkbox" name="/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7" value="bf9a95da-d508-11e2-bf44-236d2eee13a7">
+    </td>
+    <td class="gravatar50-td">
+      <img src="http://www.gravatar.com/avatar/01b37aa66496988ca780b3f515bc768e" class="gravatar50">
+    </td>
+    <td class="details">
+      <a onclick="Usergrid.console.getCollection('GET', '/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/'+'bf9a95da-d508-11e2-bf44-236d2eee13a7'); $('#data-explorer').show(); return false;" class="view-details">10</a>
+    </td>
+    <td class="details">      #"&gt;&lt;img src=x onerror=prompt(1);&gt;   </td>
+    <td class="details">     bf9a95da-d508-11e2-bf44-236d2eee13a7   </td>
+    <td class="view-details">
+      <a href="" onclick="$('#query-row-bf9a95da-d508-11e2-bf44-236d2eee13a7').toggle(); $('#data-explorer').show(); return false;" class="view-details">Details</a>
+    </td>
+  </tr>
+  <tr id="query-row-bf9a95da-d508-11e2-bf44-236d2eee13a7" style="display:none">
+    <td colspan="5">
+      <div>
+        <div style="padding-bottom: 10px;">
+          <button type="button" class="btn btn-small query-button active" id="button-query-show-row-JSON" onclick="Usergrid.console.activateQueryRowJSONButton(); $('#query-row-JSON-bf9a95da-d508-11e2-bf44-236d2eee13a7').show(); $('#query-row-content-bf9a95da-d508-11e2-bf44-236d2eee13a7').hide(); return false;">JSON</button>
+          <button type="button" class="btn btn-small query-button disabled" id="button-query-show-row-content" onclick="Usergrid.console.activateQueryRowContentButton();$('#query-row-content-bf9a95da-d508-11e2-bf44-236d2eee13a7').show(); $('#query-row-JSON-bf9a95da-d508-11e2-bf44-236d2eee13a7').hide(); return false;">Content</button>
+        </div>
+        <div id="query-row-JSON-bf9a95da-d508-11e2-bf44-236d2eee13a7">
+              <pre>{
+  "picture": "http://www.gravatar.com/avatar/01b37aa66496988ca780b3f515bc768e",
+  "uuid": "bf9a95da-d508-11e2-bf44-236d2eee13a7",
+  "type": "user",
+  "name": "#"&gt;&lt;img src=x onerror=prompt(1);&gt;",
+  "created": 1371224432557,
+  "modified": 1371851347024,
+  "username": "10",
+  "email": "fdsafdsa@ookfd.com",
+  "activated": "true",
+  "adr": {
+    "addr1": "",
+    "addr2": "",
+    "city": "",
+    "state": "",
+    "zip": "",
+    "country": ""
+  },
+  "metadata": {
+    "path": "/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7",
+    "sets": {
+      "rolenames": "/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/rolenames",
+      "permissions": "/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/permissions"
+    },
+    "collections": {
+      "activities": "/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/activities",
+      "devices": "/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/devices",
+      "feed": "/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/feed",
+      "groups": "/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/groups",
+      "roles": "/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/roles",
+      "following": "/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/following",
+      "followers": "/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/followers"
+    }
+  },
+  "title": "#"&gt;&lt;img src=x onerror=prompt(1);&gt;"
+}</pre>
+        </div>
+        <div id="query-row-content-bf9a95da-d508-11e2-bf44-236d2eee13a7" style="display:none">
+          <table>
+            <tbody>
+            <tr>
+              <td>picture</td>
+              <td>http://www.gravatar.com/avatar/01b37aa66496988ca780b3f515bc768e</td></tr><tr><td>uuid</td><td>bf9a95da-d508-11e2-bf44-236d2eee13a7</td></tr><tr><td>type</td><td>user</td></tr><tr><td>name</td><td>#&amp;quot;&amp;gt;&amp;lt;img src=x onerror=prompt(1);&amp;gt;</td></tr><tr><td>created</td><td>1371224432557</td></tr><tr><td>modified</td><td>1371851347024</td></tr><tr><td>username</td><td>10</td></tr><tr><td>email</td><td>fdsafdsa@ookfd.com</td></tr><tr><td>activated</td><td>true</td></tr><tr><td></td><td style="padding: 0"><table><tbody><tr></tr><tr><td>addr1</td><td></td></tr><tr><td>addr2</td><td></td></tr><tr><td>city</td><td></td></tr><tr><td>state</td><td></td></tr><tr><td>zip</td><td></td></tr><tr><td>country</td><td></td></tr></tbody></table></td></tr><tr><td></td><td style="padding: 0"><table><tbody><tr></tr><tr><td>path</td><td>/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7</td></tr><tr><td></td><td style="padding:
  0"><table><tbody><tr></tr><tr><td>rolenames</td><td>/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/rolenames</td></tr><tr><td>permissions</td><td>/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/permissions</td></tr></tbody></table></td></tr><tr><td></td><td style="padding: 0"><table><tbody><tr></tr><tr><td>activities</td><td>/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/activities</td></tr><tr><td>devices</td><td>/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/devices</td></tr><tr><td>feed</td><td>/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/feed</td></tr><tr><td>groups</td><td>/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/groups</td></tr><tr><td>roles</td><td>/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95d
 a-d508-11e2-bf44-236d2eee13a7/roles</td></tr><tr><td>following</td><td>/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/following</td></tr><tr><td>followers</td><td>/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/followers</td></tr></tbody></table></td></tr></tbody></table></td></tr><tr><td>title</td><td>#&amp;quot;&amp;gt;&amp;lt;img src=x onerror=prompt(1);&amp;gt;</td>
+            </tr>
+            </tbody>
+          </table>
+        </div>
+      </div>
+    </td>
+  </tr>
+  </tbody>
+</table>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/data/entity-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/data/entity-controller.js b/portal/js/data/entity-controller.js
new file mode 100644
index 0000000..0d741d6
--- /dev/null
+++ b/portal/js/data/entity-controller.js
@@ -0,0 +1,69 @@
+'use strict'
+
+AppServices.Controllers.controller('EntityCtrl', ['ug', '$scope', '$rootScope', '$location',
+  function (ug, $scope, $rootScope, $location) {
+
+    if (!$rootScope.selectedEntity) {
+      $location.path('/data');
+      return;
+    }
+
+    $scope.entityUUID  = $rootScope.selectedEntity.get('uuid');
+    $scope.entityType  = $rootScope.selectedEntity.get('type');
+    var tempjson  = $rootScope.selectedEntity.get();
+
+    //rip out the system elements.  Stringify first because we don't want to rip them out of the actual object
+    var queryBody = JSON.stringify(tempjson, null, 2);
+    queryBody = JSON.parse(queryBody);
+    delete queryBody.metadata;
+    delete queryBody.uuid;
+    delete queryBody.created;
+    delete queryBody.modified;
+    delete queryBody.type;
+
+    $scope.queryBody = JSON.stringify(queryBody, null, 2);
+
+    $scope.validateJson = function() {
+      var queryBody = $scope.queryBody;
+
+      try {
+        queryBody = JSON.parse(queryBody);
+      } catch (e) {
+        $rootScope.$broadcast('alert', 'error', 'JSON is not valid');
+        return false;
+      }
+
+      queryBody = JSON.stringify(queryBody,null,2);
+
+      $rootScope.$broadcast('alert','success', 'JSON is valid');
+
+      $scope.queryBody = queryBody;
+      return true;
+
+    }
+
+    $scope.saveEntity = function(){
+      if (!$scope.validateJson()) {
+        return false;
+      }
+      var queryBody = $scope.queryBody;
+      queryBody = JSON.parse(queryBody);
+      $rootScope.selectedEntity.set(); //clears out all entities
+      $rootScope.selectedEntity.set(queryBody);
+      $rootScope.selectedEntity.set('type', $scope.entityType);
+      $rootScope.selectedEntity.set('uuid', $scope.entityUUID);
+      $rootScope.selectedEntity.save(function(err, data){
+        if (err) {
+          $rootScope.$broadcast('alert', 'error', 'error: ' + data.error_description);
+        } else {
+          $rootScope.$broadcast('alert', 'success', 'entity saved');
+        }
+
+      });
+    }
+
+
+
+
+
+  }]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/data/entity.html
----------------------------------------------------------------------
diff --git a/portal/js/data/entity.html b/portal/js/data/entity.html
new file mode 100644
index 0000000..6b9d476
--- /dev/null
+++ b/portal/js/data/entity.html
@@ -0,0 +1,31 @@
+<div class="content-page">
+
+  <h4>Entity Detail</h4>
+  <div class="well">
+    <a href="#!/data" class="outside-link"><< Back to collection</a>
+  </div>
+  <fieldset>
+    <div class="control-group">
+      <strong>Path </strong>
+      <div class="controls">
+        {{entityType}}/{{entityUUID}}
+      </div>
+    </div>
+
+    <div class="control-group">
+      <label class="control-label" for="query-source"><strong>JSON Body</strong></label>
+      <div class="controls">
+        <textarea ng-model="queryBody" class="span6 pull-left" rows="12">{{queryBody}}</textarea>
+        <br>
+        <a class="btn pull-left" ng-click="validateJson();">Validate JSON</a>
+      </div>
+    </div>
+    <div style="clear: both; height: 10px;"></div>
+    <div class="control-group">
+      <button type="button" class="btn btn-primary" id="button-query" ng-click="saveEntity();">Save</button>
+      <!--button type="button" class="btn btn-primary" id="button-query" ng-click="run();">Delete</button-->
+    </div>
+  </fieldset>
+
+</div>
+

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/data/shell-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/data/shell-controller.js b/portal/js/data/shell-controller.js
new file mode 100644
index 0000000..b06bd9b
--- /dev/null
+++ b/portal/js/data/shell-controller.js
@@ -0,0 +1,9 @@
+'use strict'
+
+AppServices.Controllers.controller('ShellCtrl', ['ug', '$scope', '$rootScope', '$location',
+  function (ug, $scope, $rootScope, $location) {
+
+
+
+
+  }]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/data/shell.html
----------------------------------------------------------------------
diff --git a/portal/js/data/shell.html b/portal/js/data/shell.html
new file mode 100644
index 0000000..b977d81
--- /dev/null
+++ b/portal/js/data/shell.html
@@ -0,0 +1,16 @@
+<div class="content-page">
+  <div class="well">
+    <h2>Interactive Shell</h2>
+    <div style="float:right"><a target="_blank" href="http://apigee.com/docs/usergrid/content/usergrid-admin-portal" class="notifications-links">Learn more in our docs</a></div>
+  </div>
+
+  <div class="console-section-contents">
+    <div id="shell-input-div">
+      <p>   Type "help" to view a list of the available commands.</p><hr>
+      <span>&nbsp;&gt;&gt; </span>
+      <!--textarea id="shell-input" rows="2" autofocus="autofocus"></textarea-->
+    </div>
+    <pre id="shell-output" class="prettyprint lang-js" style="overflow-x: auto; height: 400px;"><span class="pln">                      </span><p><span class="pln">  </span><span class="typ">Response</span><span class="pun">:</span></p><hr><span class="pln">
+    </span></pre>
+  </div>
+</div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/dialogs/balloon-directive.js
----------------------------------------------------------------------
diff --git a/portal/js/dialogs/balloon-directive.js b/portal/js/dialogs/balloon-directive.js
new file mode 100644
index 0000000..1145622
--- /dev/null
+++ b/portal/js/dialogs/balloon-directive.js
@@ -0,0 +1,25 @@
+'use strict';
+
+AppServices.Directives.directive('balloon', ['$window','$timeout', function ($window,$timeout) {
+  return{
+    restrict: 'ECA',
+    scope: '=',
+    template: '' +
+      '<div class="baloon {{direction}}" ng-transclude>' +
+      '</div>',
+    replace: true,
+    transclude: true,
+    link: function linkFn(scope, lElement, attrs) {
+      scope.direction = attrs.direction;
+      var runScroll = true;
+      var windowEl = angular.element($window);
+      windowEl.on('scroll', function() {
+        if(runScroll){
+          lElement.addClass('fade-out');
+          $timeout(function(){lElement.addClass('hide')},1000)
+          runScroll = false;
+        }
+      });
+    }
+  }
+}])
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/dialogs/modal-directive.js
----------------------------------------------------------------------
diff --git a/portal/js/dialogs/modal-directive.js b/portal/js/dialogs/modal-directive.js
new file mode 100644
index 0000000..2b1619c
--- /dev/null
+++ b/portal/js/dialogs/modal-directive.js
@@ -0,0 +1,41 @@
+'use strict';
+
+AppServices.Directives.directive('bsmodal', ["$rootScope", function ($rootScope) {
+  return{
+    restrict: 'ECA',
+    scope: {
+      title: '@title',
+      buttonid:'=buttonid',
+      footertext: '=footertext',
+      closelabel: '=closelabel'
+    },
+    transclude: true,
+    templateUrl: 'dialogs/modal.html',
+    replace: true,
+    link: function linkFn(scope, lElement, attrs, parentCtrl) {
+      scope.title = attrs.title;
+      scope.footertext = attrs.footertext;
+      scope.closelabel = attrs.closelabel;
+      scope.close = attrs.close;
+      scope.extrabutton = attrs.extrabutton;
+      scope.extrabuttonlabel = attrs.extrabuttonlabel;
+      scope.buttonId = attrs.buttonid;
+
+
+      scope.closeDelegate = function(attr){
+        //always call method in parent controller scope
+        scope.$parent[attr](attrs.id,scope)
+      }
+
+      scope.extraDelegate = function(attr){
+        if(scope.dialogForm.$valid){
+          console.log(parentCtrl);
+          //always call method in parent controller scope
+          scope.$parent[attr](attrs.id)
+        }else{
+          $rootScope.$broadcast('alert','error','Please check your form input and resubmit.')
+        }
+      }
+    }
+  }
+}]);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/dialogs/modal.html
----------------------------------------------------------------------
diff --git a/portal/js/dialogs/modal.html b/portal/js/dialogs/modal.html
new file mode 100644
index 0000000..6dcdaaa
--- /dev/null
+++ b/portal/js/dialogs/modal.html
@@ -0,0 +1,16 @@
+    <div class="modal show fade" tabindex="-1" role="dialog" aria-hidden="true">
+        <form ng-submit="extraDelegate(extrabutton)" name="dialogForm" novalidate>
+
+        <div class="modal-header">
+            <h1 class="title">{{title}}</h1>
+        </div>
+
+        <div class="modal-body" ng-transclude></div>
+        <div class="modal-footer">
+            {{footertext}}
+            <input type="submit" class="btn" id="dialogButton-{{buttonId}}" ng-if="extrabutton" ng-disabled="!dialogForm.$valid" aria-hidden="true" ng-value="extrabuttonlabel"/>
+            <button class="btn cancel pull-left" data-dismiss="modal" aria-hidden="true"
+                    ng-click="closeDelegate(close)">{{closelabel}}
+            </button>
+        </div>
+        </form>    </div>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/global/alert-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/global/alert-controller.js b/portal/js/global/alert-controller.js
new file mode 100644
index 0000000..6afb01f
--- /dev/null
+++ b/portal/js/global/alert-controller.js
@@ -0,0 +1,33 @@
+'use strict'
+
+AppServices.Controllers.controller('AlertCtrl', ['$scope', '$rootScope', '$timeout',
+  function ($scope, $rootScope, $timeout) {
+
+    $scope.alertDisplay = 'none';
+    $scope.alerts = [];
+
+    //alert types error,success,warning,info
+
+    $scope.$on('alert', function(event, type, message, permanent) {
+      $scope.addAlert(type, message, permanent);
+    });
+
+    $scope.$on('clear-alerts', function(event, message) {
+      $scope.alerts = [];
+    });
+
+    $scope.addAlert = function(type, message, permanent) {
+      $scope.alertDisplay = 'block';
+      $scope.alerts.push({type:type, msg:message});
+      $scope.applyScope();
+      if(!permanent){
+        $timeout(function(){$scope.alerts.shift()},5000);
+      }
+    };
+
+    $scope.closeAlert = function(index) {
+      $scope.alerts.splice(index, 1);
+    };
+
+
+  }]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/global/alert-directive.js
----------------------------------------------------------------------
diff --git a/portal/js/global/alert-directive.js b/portal/js/global/alert-directive.js
new file mode 100644
index 0000000..1baff4b
--- /dev/null
+++ b/portal/js/global/alert-directive.js
@@ -0,0 +1,40 @@
+'use strict';
+
+AppServices.Directives.directive('alerti', ["$rootScope","$timeout", function ($rootScope,$timeout) {
+  return{
+    restrict: 'ECA',
+    scope: {
+      type: '=type',
+      closeable: '@closeable',
+      index: '&index'
+    },
+    template: '<div class="alert" ng-class="type && \'alert-\' + type">' +
+              '    <button ng-show="closeable" type="button" class="close" ng-click="closeAlert(index)">&times;</button>' +
+              '    <i ng-if="type === \'warning\'" class="pictogram pull-left" style="font-size:3em;line-height:0.4">&#128165;</i>' +
+      '    <i ng-if="type === \'info\'" class="pictogram pull-left">&#8505;</i>' +
+      '    <i ng-if="type === \'error\'" class="pictogram pull-left">&#9889;</i>' +
+      '    <i ng-if="type === \'success\'" class="pictogram pull-left">&#128077;</i>' +
+      '<div ng-transclude></div>' +
+              '</div>',
+    replace: true,
+    transclude: true,
+    link: function linkFn(scope, lElement, attrs) {
+
+//      if($rootScope.alertClick){
+
+      $timeout(function(){lElement.addClass('fade-out')},4000)
+
+      lElement.click(function(){
+
+        if(attrs.index){
+          scope.$parent.closeAlert(attrs.index);
+        }
+
+      });
+
+//      }
+      //need to do a 10ms timeout to apply animation :(
+      setTimeout(function(){lElement.addClass('alert-animate');},10)
+    }
+  }
+}])
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/global/app-switcher-directive.js
----------------------------------------------------------------------
diff --git a/portal/js/global/app-switcher-directive.js b/portal/js/global/app-switcher-directive.js
new file mode 100644
index 0000000..56cc77b
--- /dev/null
+++ b/portal/js/global/app-switcher-directive.js
@@ -0,0 +1,35 @@
+'use strict';
+
+AppServices.Directives.directive('appswitcher', ["$rootScope", function ($rootScope) {
+  return{
+    restrict: 'ECA',
+    scope: "=",
+    templateUrl: 'global/appswitcher-template.html',
+    replace: true,
+    transclude: true,
+    link: function linkFn(scope, lElement, attrs) {
+
+      var classNameOpen = 'open';
+      $('ul.nav li.dropdownContainingSubmenu').hover(
+        function () {
+          $(this).addClass(classNameOpen);
+        },
+        function () {
+          $(this).removeClass(classNameOpen);
+        }
+      );
+      $('#globalNav > a').mouseover(globalNavDetail);
+      $('#globalNavDetail').mouseover(globalNavDetail);
+      $('#globalNavSubmenuContainer ul li').mouseover(
+        function () {
+          $('#globalNavDetail > div').removeClass(classNameOpen);
+          $('#' + this.getAttribute('data-globalNavDetail')).addClass(classNameOpen);
+        }
+      );
+      function globalNavDetail() {
+        $('#globalNavDetail > div').removeClass(classNameOpen);
+        $('#globalNavDetailApiPlatform').addClass(classNameOpen);
+      }
+    }
+  }
+}])
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/global/appswitcher-template.html
----------------------------------------------------------------------
diff --git a/portal/js/global/appswitcher-template.html b/portal/js/global/appswitcher-template.html
new file mode 100644
index 0000000..8bdd6aa
--- /dev/null
+++ b/portal/js/global/appswitcher-template.html
@@ -0,0 +1,34 @@
+<li id="globalNav" class="dropdown dropdownContainingSubmenu active">
+  <a class="dropdown-toggle" data-toggle="dropdown">API Platform<b class="caret"></b></a>
+  <ul class="dropdown-menu pull-right">
+    <li id="globalNavSubmenuContainer">
+      <ul>
+        <li data-globalNavDetail="globalNavDetailApigeeHome"><a target="_blank" href="http://apigee.com">Apigee Home</a></li>
+        <li data-globalNavDetail="globalNavDetailAppServices" class="active"><a target="_blank" href="https://apigee.com/usergrid/">App Services</a></li>
+        <li data-globalNavDetail="globalNavDetailApiPlatform" ><a target="_blank" href="https://enterprise.apigee.com">API Platform</a></li>
+        <li data-globalNavDetail="globalNavDetailApiConsoles"><a target="_blank" href="http://apigee.com/providers">API Consoles</a></li>
+      </ul>
+    </li>
+    <li id="globalNavDetail">
+      <div id="globalNavDetailApigeeHome">
+        <div class="globalNavDetailApigeeLogo"></div>
+        <div class="globalNavDetailDescription">You need apps and apps need APIs. Apigee is the leading API platform for enterprises and developers.</div>
+      </div>
+      <div id="globalNavDetailAppServices">
+        <div class="globalNavDetailSubtitle">For App Developers</div>
+        <div class="globalNavDetailTitle">App Services</div>
+        <div class="globalNavDetailDescription">Build engaging applications, store data, manage application users, and more.</div>
+      </div>
+      <div id="globalNavDetailApiPlatform">
+        <div class="globalNavDetailSubtitle">For API Developers</div>
+        <div class="globalNavDetailTitle">API Platform</div>
+        <div class="globalNavDetailDescription">Create, configure, manage and analyze your APIs and resources.</div>
+      </div>
+      <div id="globalNavDetailApiConsoles">
+        <div class="globalNavDetailSubtitle">For API Developers</div>
+        <div class="globalNavDetailTitle">API Consoles</div>
+        <div class="globalNavDetailDescription">Explore over 100 APIs with the Apigee API Console, or create and embed your own API Console.</div>
+      </div>
+    </li>
+  </ul>
+</li>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/global/insecure-banner.html
----------------------------------------------------------------------
diff --git a/portal/js/global/insecure-banner.html b/portal/js/global/insecure-banner.html
new file mode 100644
index 0000000..78f90c7
--- /dev/null
+++ b/portal/js/global/insecure-banner.html
@@ -0,0 +1,7 @@
+<div ng-if="securityWarning" ng-cloak class="demo-holder">
+    <div class="alert alert-demo alert-animate">
+        <div class="alert-text">
+            <i class="pictogram">&#9888;</i>Warning: This application has "sandbox" permissions and is not production ready. <a target="_blank" href="http://apigee.com/docs/app-services/content/securing-your-app">Please go to our security documentation to find out more.</a></span>
+        </div>
+    </div>
+</div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/global/insecure-banner.js
----------------------------------------------------------------------
diff --git a/portal/js/global/insecure-banner.js b/portal/js/global/insecure-banner.js
new file mode 100644
index 0000000..f4859e5
--- /dev/null
+++ b/portal/js/global/insecure-banner.js
@@ -0,0 +1,46 @@
+
+AppServices.Directives.directive('insecureBanner', ['$rootScope','ug', function ($rootScope,ug) {
+  return{
+    restrict: 'E',
+    transclude: true,
+    templateUrl:'global/insecure-banner.html',
+    link: function linkFn(scope, lElement, attrs) {
+      scope.securityWarning = false;
+
+      scope.$on('roles-received',function(evt,roles){
+        scope.securityWarning = false;
+        if(!roles || !roles._list)
+          return;
+        roles._list.forEach(function(roleHolder){
+          var role = roleHolder._data;
+          if(role.name.toUpperCase()==='GUEST'){
+            roleHolder.getPermissions(function(err, data){
+              if (!err) {
+                if(roleHolder.permissions){
+                  roleHolder.permissions.forEach(function(permission){
+                    if(permission.path.indexOf('/**')>=0){
+                      scope.securityWarning = true;
+                      scope.applyScope();
+                    }
+                  });
+                }
+              }
+            });
+
+          }
+        });
+      });
+
+      var initialized = false;
+      scope.$on('app-initialized',function(){
+        !initialized && ug.getRoles();
+        initialized=true;
+      });
+
+      scope.$on('app-changed',function(){
+        scope.securityWarning = false;
+        ug.getRoles();
+      });
+    }
+  }
+}]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/global/page-constants.js
----------------------------------------------------------------------
diff --git a/portal/js/global/page-constants.js b/portal/js/global/page-constants.js
new file mode 100644
index 0000000..f77b384
--- /dev/null
+++ b/portal/js/global/page-constants.js
@@ -0,0 +1,11 @@
+'use strict'
+
+/**
+ * Defines application-wide key value pairs
+ */
+
+AppServices.Constants.constant('configuration', {
+
+  ITEMS_URL: 'global/temp.json'
+
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/global/page-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/global/page-controller.js b/portal/js/global/page-controller.js
new file mode 100644
index 0000000..81aafcb
--- /dev/null
+++ b/portal/js/global/page-controller.js
@@ -0,0 +1,392 @@
+'use strict'
+
+AppServices.Controllers.controller('PageCtrl',
+  [ 'data',
+    'ug',
+    'utility',
+    '$scope',
+    '$rootScope',
+    '$location',
+    '$routeParams',
+    '$q',
+    '$route',
+    '$log',
+    '$analytics', function (data,
+                     ug,
+                     utility,
+                     $scope,
+                     $rootScope,
+                     $location,
+                     $routeParams,
+                     $q,
+                     $route,
+                     $log,
+                     $analytics) {
+
+  var initScopeVariables = function(){
+    //$rootScope.urls()... will determine which URL should be used for a given environment
+    $scope.loadingText = 'Loading...';
+    $scope.use_sso = false;
+    $scope.newApp = {name: ''};
+    $scope.getPerm = '';
+    $scope.postPerm = '';
+    $scope.putPerm = '';
+    $scope.deletePerm = '';
+    $scope.usersTypeaheadValues = [];
+    $scope.groupsTypeaheadValues = [];
+    $scope.rolesTypeaheadValues = [];
+    $rootScope.sdkActive = false;
+    $rootScope.demoData = false;
+    $scope.queryStringApplied = false;
+    $rootScope.loaded = $rootScope.activeUI = false;
+    for (var key in Usergrid.regex) {
+      $scope[key] = Usergrid.regex[key];
+    }
+
+    $scope.options = Usergrid.options;
+
+    var getQuery = function () {
+      var result = {}, queryString = location.search.slice(1),
+          re = /([^&=]+)=([^&]*)/g, m;
+      while (m = re.exec(queryString)) {
+        result[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);
+      }
+      return result;
+    };
+    $scope.queryString = getQuery();
+  };
+
+  initScopeVariables();
+
+  $rootScope.urls = function(){
+    var BASE_URL = '';
+    var DATA_URL = '';
+    var qs = $location.search();
+
+    switch(true){
+      case $location.host() === 'appservices.apigee.com' && location.pathname.indexOf('/dit') >= 0 :
+        //DIT
+        BASE_URL = 'https://accounts.jupiter.apigee.net';
+        DATA_URL = 'http://apigee-internal-prod.jupiter.apigee.net';
+        $scope.use_sso = true;
+        break;
+      case $location.host() === 'appservices.apigee.com' && location.pathname.indexOf('/mars') >= 0  :
+        //staging
+        BASE_URL = 'https://accounts.mars.apigee.net';
+        DATA_URL = 'http://apigee-internal-prod.mars.apigee.net';
+        $scope.use_sso = true;
+        break;
+      case $location.host() === 'appservices.apigee.com' :
+        //enterprise portals
+        DATA_URL = Usergrid.overrideUrl;
+        break;
+      case $location.host() === 'apigee.com' :
+        //prod
+        BASE_URL = 'https://accounts.apigee.com';
+        DATA_URL = 'https://api.usergrid.com';
+        $scope.use_sso = true;
+        break;
+      case $location.host() === 'usergrid.dev':
+        //development
+        DATA_URL = 'https://api.usergrid.com';
+        break;
+      default :
+        DATA_URL = Usergrid.overrideUrl;
+        break;
+    }
+    //override with querystring
+    DATA_URL =  qs.api_url || DATA_URL;
+    $scope.apiUrl = DATA_URL = DATA_URL.lastIndexOf('/') === DATA_URL.length - 1 ? DATA_URL.substring(0,DATA_URL.length-1) : DATA_URL;
+
+    return {
+      DATA_URL: DATA_URL,
+      LOGIN_URL: BASE_URL + '/accounts/sign_in',
+      PROFILE_URL: BASE_URL + '/accounts/my_account',
+      LOGOUT_URL: BASE_URL + '/accounts/sign_out'
+    }
+  }
+
+  //used in users
+  $rootScope.gotoPage = function(path){
+    $location.path(path);
+  }
+
+  var notRegistration = function(){
+    return  "/forgot-password"!==$location.path() && "/register"!==$location.path();
+  };
+
+    //called in ng-init on main index page (first method called at app startup and every main navigation)
+  var verifyUser = function(){
+    //avoid polluting our target route with login path
+     if ($location.path().slice(0, '/login'.length) !== '/login') {
+       $rootScope.currentPath = $location.path();
+       //show loading screen during verify process
+       //      $location.path('/login/loading');
+     }
+
+     //first check to see if there is a token in the query string, if so, save it
+     if ($routeParams.access_token && $routeParams.admin_email && $routeParams.uuid) {
+       ug.set('token', $routeParams.access_token);
+       ug.set('email', $routeParams.admin_email);
+       ug.set('uuid', $routeParams.uuid);
+       var clean_uri = location.protocol + "//" + location.host + location.pathname;
+       window.history.replaceState({}, document.title, clean_uri);
+     }
+
+     $scope.deferredLogin = $q.defer();
+     //use a promise so we can update afterwards in other UI areas
+     //next try to quick login
+     ug.checkAuthentication();
+  };
+
+
+    $scope.profile = function(){
+      if($scope.use_sso){
+        window.location = $rootScope.urls().PROFILE_URL + '?callback=' + encodeURIComponent($location.absUrl());
+      }else{
+        $location.path('/profile')
+      }
+
+    };
+
+    $scope.showModal = function(id){
+      $('#' + id).modal('show')
+    };
+
+    $scope.hideModal = function(id){
+      $('#' + id).modal('hide')
+    };
+
+
+    //adding this here for now
+    //todo - create a controller for usergrid functionality where all UG pages inherit
+    $scope.deleteEntities = function(collection, successBroadcast, errorMessage) {
+      collection.resetEntityPointer();
+      var entitiesToDelete = []
+      while(collection.hasNextEntity()) {
+        var entity = collection.getNextEntity();
+        var checked = entity.checked;
+        if(checked){
+          entitiesToDelete.push(entity);
+        }
+      }
+      var count = 0,success=false;
+      for(var i=0; i<entitiesToDelete.length; i++) {
+        var entity = entitiesToDelete[i];
+        collection.destroyEntity(entity, function(err){
+          count++;
+          if(err){
+            $rootScope.$broadcast('alert', 'error', errorMessage);
+            $rootScope.$broadcast(successBroadcast+'-error',err);
+          }else{
+            success=true;
+          }
+
+          if(count===entitiesToDelete.length){
+            success && $rootScope.$broadcast(successBroadcast);
+            $scope.applyScope();
+          }
+        });
+      }
+    };
+
+    $scope.selectAllEntities = function(list,that,varName,setValue){
+      varName = varName || 'master';
+      var val = that[varName] ;
+      if(setValue == undefined){
+        setValue = true;
+      }
+
+      if(setValue){
+        that[varName] = val = !val;
+      }
+      list.forEach(function(entitiy){
+        entitiy.checked = val;
+      });
+    };
+
+
+    $scope.createPermission = function(type, entity, path, permissions) {
+      //e.g.: "get,post,put:/mypermission"
+//      var path = $scope.path;
+
+      if(path.charAt(0) != '/') {
+        path = '/'+path;
+      }
+      var ops = "";
+      var s = "";
+      if (permissions.getPerm) {
+        ops = "get";
+        s = ",";
+      }
+      if (permissions.postPerm) {
+        ops = ops + s + "post";
+        s = ",";
+      }
+      if (permissions.putPerm) {
+        ops =  ops + s + "put";
+        s = ",";
+      }
+      if (permissions.deletePerm) {
+        ops =  ops + s + "delete";
+        s = ",";
+      }
+      var permission = ops + ":" + path;
+
+      return permission
+    };
+
+    $scope.formatDate = function(date){
+      return new Date(date).toUTCString();
+    };
+
+    $scope.clearCheckbox = function(id){
+      if($('#'+id).attr('checked')){
+        $('#'+id).click();
+      }
+    };
+
+    $scope.removeFirstSlash = function(path){
+      return path.indexOf('/') === 0 ?  path.substring(1,path.length): path;
+    };
+
+    $scope.applyScope = function(cb){
+      cb = typeof cb === 'function' ? cb : function(){};
+      if(!this.$$phase) {
+        return this.$apply(cb);
+      }else{
+        cb();
+      }
+    }
+
+    $scope.valueSelected = function(list){
+      return list &&  (list.some(function(item){return item.checked;}));
+    };
+
+    $scope.$on('users-typeahead-received', function(event, users) {
+      $scope.usersTypeaheadValues = users;
+      if(!$scope.$$phase) {
+        $scope.$apply();
+      }
+    });
+    $scope.$on('groups-typeahead-received', function(event, groups) {
+      $scope.groupsTypeaheadValues = groups;
+      if(!$scope.$$phase) {
+        $scope.$apply();
+      }
+    });
+    $scope.$on('roles-typeahead-received', function(event, roles) {
+      $scope.rolesTypeaheadValues = roles;
+      if(!$scope.$$phase) {
+        $scope.$apply();
+      }
+    });
+
+    $scope.$on('checkAuthentication-success', function () {
+      //all is well - repopulate objects
+      $scope.loaded = true;
+      $rootScope.activeUI = true;
+      $scope.applyScope();
+
+
+      if(!$scope.queryStringApplied){
+        $scope.queryStringApplied = true;
+        setTimeout(function(){
+          //if querystring exists then operate on it.
+          if ($scope.queryString.org) {
+            $rootScope.$broadcast('change-org',$scope.queryString.org);
+          }
+        }, 1000)
+      }
+
+      $scope.deferredLogin && $scope.deferredLogin.resolve();
+      $rootScope.$broadcast('app-initialized');
+
+      //boolean defines is top level ui menus/buttons should be active/shown
+    });
+
+    $scope.$on('checkAuthentication-error', function (args,err, missingData,email) {
+      $scope.loaded = true;
+      if (err && !$scope.use_sso && notRegistration()) {
+        //there was an error on re-auth lite, immediately send to login
+        ug.logout();
+        $location.path('/login');
+        $scope.applyScope();
+      } else {
+        if (missingData && notRegistration()) {
+          if (!email && $scope.use_sso) {
+            window.location = $rootScope.urls().LOGIN_URL + '?callback=' +  encodeURIComponent($location.absUrl().split('?')[0]);
+            return;
+          }
+          ug.reAuthenticate(email);
+        }
+      }
+    });
+
+    $scope.$on('reAuthenticate-success', function (args,err, data, user, organizations, applications) {
+
+      //the user is authenticated
+      $rootScope.$broadcast('loginSuccesful', user, organizations, applications);
+      $rootScope.$emit('loginSuccesful', user, organizations, applications);
+      $rootScope.$broadcast('checkAuthentication-success');
+      $scope.applyScope(function () {
+        $scope.deferredLogin.resolve();
+        $location.path('/org-overview');
+      })
+    });
+
+    $scope.$on('reAuthenticate-error', function () {
+      //user is not authenticated, send to SSO if enabled
+      if ($scope.use_sso) {
+        //go to sso
+        window.location = $rootScope.urls().LOGIN_URL + '?callback=' +  encodeURIComponent($location.absUrl().split('?')[0]);
+      } else {
+        //go to login page
+        if (notRegistration()) {
+          ug.logout();
+          $location.path('/login');
+          $scope.applyScope();
+        }
+      }
+    });
+
+    $scope.$on('loginSuccessful',function(){
+      $rootScope.activeUI = true;
+    });
+
+    $scope.$on('app-changed',function(args,oldVal,newVal,preventReload){
+      if(newVal!==oldVal && !preventReload){
+        $route.reload();
+      }
+    });
+
+    $scope.$on('org-changed',function(args, oldOrg,newOrg){
+      ug.getApplications();
+      $route.reload();
+    });
+
+    $scope.$on('app-settings-received',function(evt,data){
+    });
+
+
+    //verify on every route change
+    $scope.$on('$routeChangeSuccess', function () {
+      //todo possibly do a date check here for token expiry
+      //so we don't call this on every nav change
+      verifyUser();
+      $scope.showDemoBar = $location.path().slice(0,'/performance'.length) === '/performance';
+      if(!$scope.showDemoBar){
+        $rootScope.demoData = false;
+      }
+      $analytics.pageTrack($location.path());
+    });
+    $scope.$on('applications-received', function (event, applications) {
+      $scope.applications = applications;
+      $scope.hasApplications = Object.keys(applications).length > 0;
+    });
+
+    //init app
+    ug.getAppSettings();
+
+  }]);
+

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/global/page-service.js
----------------------------------------------------------------------
diff --git a/portal/js/global/page-service.js b/portal/js/global/page-service.js
new file mode 100644
index 0000000..d1d08de
--- /dev/null
+++ b/portal/js/global/page-service.js
@@ -0,0 +1,214 @@
+AppServices.Services.factory('data', function (configuration, $q, $http, $resource, $rootScope, $log, $analytics) {
+
+  function reportError(data,config){
+    try {
+      $analytics.eventTrack('error', {
+        category: 'App Services', label: data + ':' + config.url + ':' + (sessionStorage['apigee_uuid'] || 'na')
+      });
+    } catch (e) {
+      console.log(e)
+    }
+  };
+  var getAccessToken = function(){
+    return sessionStorage.getItem('accessToken');
+  };
+
+  return {
+
+    /**
+     * Retrieves page data
+     * @param {string} id the name of the single page item to get (a key in the JSON) can be null.
+     * @param {string} url location of the file/endpoint.
+     * @return {Promise} Resolves to JSON.
+     */
+    get: function (id, url) {
+      var items, deferred;
+
+      deferred = $q.defer();
+
+      $http.get((url || configuration.ITEMS_URL)).
+          success(function (data, status, headers, config) {
+            var result;
+            if (id) {
+              angular.forEach(data, function (obj, index) {
+                if (obj.id === id) {
+                  result = obj;
+                }
+              });
+            } else {
+              result = data;
+            }
+            deferred.resolve(result);
+          }).
+          error(function (data, status, headers, config) {
+            $log.error(data, status, headers, config);
+            reportError(data,config);
+            deferred.reject(data);
+          });
+
+      return deferred.promise;
+    },
+
+//    getLocal: function (url) {
+//      var retdata;
+//      $http.get(url).
+//          success(function (data, status, headers, config) {
+//            retdata = data;
+//          }).
+//          error(function (data, status, headers, config) {
+//          $log.error(data, status, headers, config);
+//          });
+//
+//      return retdata;
+//    },
+
+    /**
+     * Retrieves page data via jsonp
+     * @param {string} url the location of the JSON/RESTful endpoint.
+     * @param {string} successCallback function called on success.
+     */
+//    jsonp: function (url,successCallback) {
+//      var self = this;
+//      $http.jsonp(url).
+//          success(function(data, status, headers, config) {
+//            successCallback(data,status,headers,config);
+//          }).
+//          error(function(data, status, headers, config) {
+//            console.log("ERROR: Could not get data. " + url);
+//          });
+//    },
+
+    jsonp: function (objectType,criteriaId,params,successCallback) {
+      if(!params){
+        params = {};
+      }
+
+      params.demoApp = $rootScope.demoData;
+      params.access_token = getAccessToken();
+      params.callback = 'JSON_CALLBACK';
+
+
+      $rootScope.$broadcast("ajax_loading", objectType);
+
+      $http.jsonp($rootScope.urls().DATA_URL  + '/' + $rootScope.currentOrg + '/' + $rootScope.currentApp + '/apm/' + objectType + '/' + criteriaId,{params:params,headers:{}}).
+        success(function(data, status, headers, config) {
+          successCallback(data,status,headers,config);
+
+          $rootScope.$broadcast("ajax_finished", objectType);
+
+
+        }).
+        error(function(data, status, headers, config) {
+          $log.error("ERROR: Could not get jsonp data. " + $rootScope.urls().DATA_URL + objectType + '/' + criteriaId);
+          reportError(data,config);
+        });
+    },
+
+    jsonp_simple: function (objectType,appId,params) {
+      if(!params){
+        params = {};
+      }
+
+      params.access_token = getAccessToken();
+      params.callback = 'JSON_CALLBACK';
+
+
+      var deferred = $q.defer();
+
+      $http.jsonp($rootScope.urls().DATA_URL  + '/' + $rootScope.currentOrg + '/' + $rootScope.currentApp + '/apm/' + objectType + "/" + appId,{params:params}).
+        success(function(data, status, headers, config) {
+          deferred.resolve(data);
+        }).
+        error(function(data, status, headers, config) {
+          $log.error("ERROR: Could not get jsonp data. " + $rootScope.urls().DATA_URL  + '/' + $rootScope.currentOrg + '/' + $rootScope.currentApp + '/apm/' + objectType + "/" + appId);
+          reportError(data,config);
+          deferred.reject(data);
+        });
+
+      return deferred.promise;
+    },
+
+    jsonp_raw: function (objectType,appId,params) {
+      if(!params){
+        params = {};
+      }
+
+      params.access_token = getAccessToken();
+      params.callback = 'JSON_CALLBACK';
+
+
+      var deferred = $q.defer();
+
+      $http.jsonp($rootScope.urls().DATA_URL  + '/' + $rootScope.currentOrg + '/' + $rootScope.currentApp + '/' + objectType,{params:params}).
+        success(function(data, status, headers, config) {
+          deferred.resolve(data);
+        }).
+        error(function(data, status, headers, config) {
+          $log.error("ERROR: Could not get jsonp data. " + $rootScope.urls().DATA_URL + objectType + '/' + appId);
+          reportError(data,config);
+          deferred.reject(data);
+        });
+
+      return deferred.promise;
+    },
+
+    resource: function(params,isArray) {
+      //temporary url for REST endpoints
+
+      return $resource($rootScope.urls().DATA_URL + '/:orgname/:appname/:username/:endpoint',
+          {
+
+          },
+          {
+            get: {
+              method:'JSONP',
+              isArray: isArray,
+              params: params
+            },
+            login: {
+              method:'GET',
+              url: $rootScope.urls().DATA_URL + '/management/token',
+              isArray: false,
+              params: params
+            },
+            save: {
+              url: $rootScope.urls().DATA_URL + '/' + params.orgname + '/' + params.appname,
+              method:'PUT',
+              isArray: false,
+              params: params
+            }
+          });
+    },
+
+    post: function(url,callback,payload,headers){
+
+      var accessToken = getAccessToken();
+
+      if(payload){
+        payload.access_token = accessToken;
+      }else{
+        payload = {access_token:accessToken}
+      }
+
+      if(!headers){
+        headers = {Bearer:accessToken};
+      }
+
+      $http({method: 'POST', url: url, data: payload, headers: headers}).
+        success(function(data, status, headers, config) {
+          callback(data)
+        }).
+        error(function(data, status, headers, config) {
+          reportError(data,config);
+          callback(data)
+        });
+
+    }
+
+
+
+  }
+
+
+});
+

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/global/temp.json
----------------------------------------------------------------------
diff --git a/portal/js/global/temp.json b/portal/js/global/temp.json
new file mode 100644
index 0000000..f8c400a
--- /dev/null
+++ b/portal/js/global/temp.json
@@ -0,0 +1,18 @@
+[
+  {
+    "id": "appOverview",
+    "top5Crashes": {
+
+      "testdata": 123
+
+    }
+  },
+  {
+    "id": "errorsCrashes",
+    "top5Errors": {
+
+      "testdata": 456
+
+    }
+  }
+]
\ No newline at end of file