text: /*!
   * Copyright 2014 Drifty Co.
   * http://drifty.com/
   *
   * Ionic, v0.9.26
   * A powerful HTML5 mobile app framework.
   * http://ionicframework.com/
   *
   * By @maxlynch, @benjsperry, @adamdbradley <3
   *
   * Licensed under the MIT license. Please see LICENSE for more information.
   *
   */
  function $LocationDecorator(a,b){return a.__hash=a.hash,a.hash=function(c){return angular.isDefined(c)&&b(function(){var a=document.querySelector(".scroll-content");a&&(a.scrollTop=0)},0,!1),a.__hash(c)},a}angular.module("ionic.service",["ionic.service.bind","ionic.service.platform","ionic.service.actionSheet","ionic.service.gesture","ionic.service.loading","ionic.service.modal","ionic.service.popup","ionic.service.templateLoad","ionic.service.view","ionic.decorator.location"]),angular.module("ionic.ui.service",["ionic.ui.service.scrollDelegate","ionic.ui.service.slideBoxDelegate","ionic.ui.service.sideMenuDelegate"]),angular.module("ionic.ui",["ionic.ui.content","ionic.ui.scroll","ionic.ui.tabs","ionic.ui.viewState","ionic.ui.header","ionic.ui.sideMenu","ionic.ui.slideBox","ionic.ui.list","ionic.ui.checkbox","ionic.ui.toggle","ionic.ui.radio","ionic.ui.touch"]),angular.module("ionic",["ionic.service","ionic.ui.service","ionic.ui","ngAnimate","ngSanitize","ui.router"]),angular.element.prototype.addClass=function(a){var b,c,d,e,f,g;if(a&&"ng-scope"!=a&&"ng-isolate-scope"!=a)for(b=0;b<this.length;b++)if(e=this[b],e.setAttribute)if(a.indexOf(" ")<0)e.classList.add(a);else{for(g=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),f=a.split(" "),c=0;c<f.length;c++)d=f[c].trim(),-1===g.indexOf(" "+d+" ")&&(g+=d+" ");e.setAttribute("class",g.trim())}return this},angular.element.prototype.removeClass=function(a){var b,c,d,e,f;if(a)for(b=0;b<this.length;b++)if(f=this[b],f.getAttribute)if(a.indexOf(" ")<0)f.classList.remove(a);else for(d=a.split(" "),c=0;c<d.length;c++)e=d[c],f.setAttribute("class",(" "+(f.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+e.trim()+" "," ").trim());return this},angular.module("ionic.decorator.location",[]).config(["$provide",function(a){a.decorator("$location",["$delegate","$timeout",$LocationDecorator])}]),function(){"use strict";angular.module("ionic.ui.service.scrollDelegate",[]).factory("$ionicScrollDelegate",["$rootScope","$timeout","$q","$anchorScroll","$location","$document",function(a,b,c,d,e){return{scrollTop:function(b){a.$broadcast("scroll.scrollTop",b)},scrollBottom:function(b){a.$broadcast("scroll.scrollBottom",b)},scrollTo:function(b,c,d){a.$broadcast("scroll.scrollTo",b,c,d)},resize:function(){a.$broadcast("scroll.resize")},anchorScroll:function(b){a.$broadcast("scroll.anchorScroll",b)},tapScrollToTop:function(a,b){var c=this;angular.isDefined(b)||(b=!0),ionic.on("tap",function(d){var e=d.target;if(!ionic.DomUtil.getParentOrSelfWithClass(e,"button")){var f=a[0],g=f.getBoundingClientRect();ionic.DomUtil.rectContains(d.gesture.touches[0].pageX,d.gesture.touches[0].pageY,g.left,g.top,g.left+g.width,g.top+20)&&c.scrollTop(b)}},a[0])},finishRefreshing:function(a){a.$broadcast("scroll.refreshComplete")},getScrollView:function(a){return a.scrollView},register:function(a,c,d){function f(){return b(function(){d.resize()})}var g=c[0];c.on("scroll",function(b){var c=(b.originalEvent||b).detail||{};a.$onScroll&&a.$onScroll({event:b,scrollTop:c.scrollTop||0,scrollLeft:c.scrollLeft||0})}),a.$parent.$on("scroll.resize",f),a.$parent.$on("scroll.refreshComplete",function(){d.finishPullToRefresh()}),a.$parent.$on("scroll.anchorScroll",function(a,b){f().then(function(){var a,c=e.hash();if(c&&(a=document.getElementById(c))){var f=ionic.DomUtil.getPositionInParent(a,g);d.scrollTo(f.left,f.top,!!b)}else d.scrollTo(0,0,!!b)})}),a.$parent.$on("scroll.scrollTo",function(a,b,c,e){f().then(function(){d.scrollTo(b,c,!!e)})}),a.$parent.$on("scroll.scrollTop",function(a,b){f().then(function(){d.scrollTo(0,0,!!b)})}),a.$parent.$on("scroll.scrollBottom",function(a,b){f().then(function(){var a=d;if(a){var c=a.getScrollMax();a.scrollTo(c.left,c.top,!!b)}})})}}}])}(ionic),function(){"use strict";angular.module("ionic.ui.service.sideMenuDelegate",[]).factory("$ionicSideMenuDelegate",["$rootScope","$timeout","$q",function(){return{getSideMenuController:function(a){return a.sideMenuController},close:function(a){a.sideMenuController&&a.sideMenuController.close()},toggleLeft:function(a){a.sideMenuController&&a.sideMenuController.toggleLeft()},toggleRight:function(a){a.sideMenuController&&a.sideMenuController.toggleRight()},openLeft:function(a){a.sideMenuController&&a.sideMenuController.openPercentage(100)},openRight:function(a){a.sideMenuController&&a.sideMenuController.openPercentage(-100)}}}])}(),function(){"use strict";angular.module("ionic.ui.service.slideBoxDelegate",[]).factory("$ionicSlideBoxDelegate",["$rootScope","$timeout",function(a,b){return{update:function(){a.$broadcast("slideBox.update")},register:function(a){a.$parent.$on("slideBox.update",function(c){c.defaultPrevented||(b(function(){a.$parent.slideBox.setup()}),c.preventDefault())})}}}])}(ionic),angular.module("ionic.service.actionSheet",["ionic.service.templateLoad","ionic.service.platform","ionic.ui.actionSheet","ngAnimate"]).factory("$ionicActionSheet",["$rootScope","$document","$compile","$animate","$timeout","$ionicTemplateLoader","$ionicPlatform",function(a,b,c,d,e,f,g){return{show:function(e){var f=a.$new(!0);angular.extend(f,e);var h=c('<ion-action-sheet buttons="buttons"></ion-action-sheet>')(f),i=angular.element(h[0].querySelector(".action-sheet-wrapper")),j=function(a){d.leave(i,function(){a&&e.cancel()}),d.removeClass(h,"active",function(){f.$destroy()}),b[0].body.classList.remove("action-sheet-open")},k=function(){j()};f.$on("$destroy",function(){g.offHardwareBackButton(k)}),g.onHardwareBackButton(k),f.cancel=function(){j(!0)},f.buttonClicked=function(a){(e.buttonClicked&&e.buttonClicked(a))===!0&&j(!1)},f.destructiveButtonClicked=function(){(e.destructiveButtonClicked&&e.destructiveButtonClicked())===!0&&j(!1)},b[0].body.appendChild(h[0]),b[0].body.classList.add("action-sheet-open");var l=new ionic.views.ActionSheet({el:h[0]});return f.sheet=l,d.addClass(h,"active"),d.enter(i,h,null,function(){}),l}}}]),angular.module("ionic.service.bind",[]).factory("$ionicBind",["$parse","$interpolate",function(a,b){var c=/^\s*([@=&])(\??)\s*(\w*)\s*$/;return function(d,e,f){angular.forEach(f||{},function(f,g){var h,i,j=f.match(c)||[],k=j[3]||g,l=j[1];switch(l){case"@":if(!e[k])return;e.$observe(k,function(a){d[g]=a}),e[k]&&(d[g]=b(e[k])(d));break;case"=":if(!e[k])return;i=d.$watch(e[k],function(a){d[g]=a}),d.$on("$destroy",i);break;case"&":if(e[k]&&e[k].match(RegExp(g+"(.*?)")))throw new Error('& expression binding "'+g+'" looks like it will recursively call "'+e[k]+'" and cause a stack overflow! Please choose a different scopeName.');h=a(e[k]),d[g]=function(a){return h(d,a)}}})}}]),angular.module("ionic.service.gesture",[]).factory("$ionicGesture",[function(){return{on:function(a,b,c){return window.ionic.onGesture(a,b,c[0])},off:function(a,b,c){return window.ionic.offGesture(a,b,c)}}}]),angular.module("ionic.service.loading",["ionic.ui.loading"]).factory("$ionicLoading",["$rootScope","$document","$compile",function(a,b,c){return{show:function(d){var e={content:"",animation:"fade-in",showBackdrop:!0,maxWidth:200,showDelay:0};d=angular.extend(e,d);var f=a.$new(!0);angular.extend(f,d);var g=angular.element(b[0].querySelector(".loading-backdrop"));g.length&&g.remove();var h=c("<ion-loading>"+d.content+"</ion-loading>")(f);b[0].body.appendChild(h[0]);var i=new ionic.views.Loading({el:h[0],maxWidth:d.maxWidth,showDelay:d.showDelay});return i.show(),f.loading=i,i}}}]),angular.module("ionic.service.modal",["ionic.service.templateLoad","ionic.service.platform","ngAnimate"]).factory("$ionicModal",["$rootScope","$document","$compile","$animate","$q","$timeout","$ionicPlatform","$ionicTemplateLoader",function(a,b,c,d,e,f,g,h){function i(){document.body.classList.remove("modal-open")}var j=ionic.views.Modal.inherit({initialize:function(a){ionic.views.Modal.prototype.initialize.call(this,a),this.animation=a.animation||"slide-in-up"},show:function(){var a=this,c=angular.element(this.el);if(document.body.classList.add("modal-open"),a._isShown=!0,c.parent().length?d.addClass(c,this.animation,function(){}):(c.addClass(this.animation),d.enter(c,angular.element(b[0].body),null,function(){}),ionic.views.Modal.prototype.show.call(a)),!this.didInitEvents){var e=function(){a.hide()};a.scope.$on("$destroy",function(){g.offHardwareBackButton(e)}),g.onHardwareBackButton(e),this.didInitEvents=!0}this.scope.$parent.$broadcast("modal.shown",this)},hide:function(){this._isShown=!1;var a=angular.element(this.el);d.removeClass(a,this.animation,function(){i(a[0])}),ionic.views.Modal.prototype.hide.call(this),this.scope.$parent.$broadcast("modal.hidden",this)},remove:function(){var a=this,b=angular.element(this.el);this._isShown=!1,d.leave(angular.element(this.el),function(){i(b[0]),a.scope.$parent.$broadcast("modal.removed",a),a.scope.$destroy()})},isShown:function(){return!!this._isShown}}),k=function(b,d){var e=d.scope&&d.scope.$new()||a.$new(!0),f=c(b)(e);d.el=f[0];var g=new j(d);return g.scope=e,d.scope||(e.modal=g),g};return{fromTemplate:function(a,b){var c=k(a,b||{});return c},fromTemplateUrl:function(a,b,c){return h.load(a).then(function(a){var d=k(a,c||{});return b?b(d):null,d})}}}]),function(a){"use strict";angular.module("ionic.service.platform",[]).provider("$ionicPlatform",function(){return{$get:["$q",function(b){return{onHardwareBackButton:function(b){a.Platform.ready(function(){document.addEventListener("backbutton",b,!1)})},offHardwareBackButton:function(b){a.Platform.ready(function(){document.removeEventListener("backbutton",b)})},is:function(b){return a.Platform.is(b)},ready:function(c){var d=b.defer();return a.Platform.ready(function(){d.resolve(),c()}),d.promise}}}]}})}(ionic),angular.module("ionic.service.popup",["ionic.service.templateLoad"]).factory("$ionicPopup",["$rootScope","$document","$compile","TemplateLoader",function(a,b,c){var d=function(){var a=angular.element(b[0].querySelector(".popup"));if(a.length){var c=a.scope();if(c.popup)return c}};return{alert:function(e,f){var g=d();if(g)return g.popup.alert(e);var h={title:e,animation:"fade-in"};opts=angular.extend(h,opts);var i=f&&f.$new()||a.$new(!0);angular.extend(i,opts);var j=c("<popup>"+opts.content+"</popup>")(i);b[0].body.appendChild(j[0]);var k=new ionic.views.Popup({el:j[0]});return k.alert(e),i.popup=k,k},confirm:function(){},prompt:function(){},show:function(){}}}]),angular.module("ionic.service.templateLoad",[]).factory("$ionicTemplateLoader",["$q","$http","$templateCache",function(a,b,c){return{load:function(a){return b.get(a,{cache:c}).then(function(a){return a.data&&a.data.trim()})}}}]),angular.module("ionic.service.view",["ui.router","ionic.service.platform"]).run(["$rootScope","$state","$location","$document","$animate","$ionicPlatform",function(a,b,c,d,e,f){function g(b){return a.$viewHistory.backView?a.$viewHistory.backView.go():ionic.Platform.exitApp(),b.preventDefault(),!1}a.$viewHistory={histories:{root:{historyId:"root",parentHistoryId:null,stack:[],cursor:-1}},backView:null,forwardView:null,currentView:null,disabledRegistrableTagNames:[]},a.$on("viewState.changeHistory",function(d,e){if(e){var f=e.historyId?a.$viewHistory.histories[e.historyId]:null;if(f&&f.cursor>-1&&f.cursor<f.stack.length){var g=f.stack[f.cursor];return g.go(e)}!e.url&&e.uiSref&&(e.url=b.href(e.uiSref)),e.url&&(0===e.url.indexOf("#")&&(e.url=e.url.replace("#","")),e.url!==c.url()&&c.url(e.url))}}),a.$on("viewState.viewEnter",function(a,b){b&&b.title&&(d[0].title=b.title)}),f.onHardwareBackButton(g)}]).factory("$ionicViewService",["$rootScope","$state","$location","$window","$injector",function(a,b,c,d,e){function f(){return ionic.Utils.nextUid()}var g=e.has("$animate")?e.get("$animate"):!1,h=function(){};return h.prototype.initialize=function(a){if(a){for(var b in a)this[b]=a[b];return this}return null},h.prototype.go=function(){return this.stateName?b.go(this.stateName,this.stateParams):this.url&&this.url!==c.url()?a.$viewHistory.backView===this?d.history.go(-1):a.$viewHistory.forwardView===this?d.history.go(1):void c.url(this.url):null},h.prototype.destory=function(){this.scope&&(this.scope.destory&&this.scope.destory(),this.scope=null)},{register:function(b,d){var e=a.$viewHistory,g=this.getCurrentStateId(),h=this._getHistory(b),i=e.currentView,j=e.backView,k=e.forwardView,l={viewId:null,navAction:null,navDirection:null,historyId:h.historyId};if(d&&!this.isTagNameRegistrable(d))return l.navAction="disabledByTagName",l;if(i&&i.stateId===g&&i.historyId===h.historyId)return l.navAction="noChange",l;if(e.forcedNav)ionic.Utils.extend(l,e.forcedNav),a.$viewHistory.forcedNav=null;else if(j&&j.stateId===g)l.viewId=j.viewId,l.navAction="moveBack",i.scrollValues={},j.historyId===i.historyId&&(l.navDirection="back");else if(k&&k.stateId===g){l.viewId=k.viewId,l.navAction="moveForward",k.historyId===i.historyId&&(l.navDirection="forward");var m=this._getParentHistoryObj(b);k.historyId&&m.scope&&(m.scope.$historyId=k.historyId,l.historyId=k.historyId)}else if(i&&i.historyId!==h.historyId&&h.cursor>-1&&h.stack.length>0&&h.cursor<h.stack.length&&h.stack[h.cursor].stateId===g)l.viewId=h.stack[h.cursor].viewId,l.navAction="moveBack";else{if(l.viewId=f(g),i){if(i.forwardViewId=l.viewId,h.historyId===i.historyId&&(l.navDirection="forward"),l.navAction="newView",k&&i.stateId!==k.stateId){var n=this._getView(k.historyId);if(n)for(var o=n.stack.length-1;o>=k.index;o--)n.stack[o].destory(),n.stack.splice(o)}}else l.navAction="initialView";e.histories[l.viewId]=this.createView({viewId:l.viewId,index:h.stack.length,historyId:h.historyId,backViewId:i&&i.viewId?i.viewId:null,forwardViewId:null,stateId:g,stateName:this.getCurrentStateName(),stateParams:this.getCurrentStateParams(),url:c.url(),scrollValues:null}),h.stack.push(e.histories[l.viewId])}return this.setNavViews(l.viewId),h.cursor=e.currentView.index,l},setNavViews:function(b){var c=a.$viewHistory;c.currentView=this._getView(b),c.backView=this._getBackView(c.currentView),c.forwardView=this._getForwardView(c.currentView),a.$broadcast("$viewHistory.historyChange",{showBack:c.backView&&c.backView.historyId===c.currentView.historyId})},registerHistory:function(a){a.$historyId=ionic.Utils.nextUid()},createView:function(a){var b=new h;return b.initialize(a)},getCurrentView:function(){return a.$viewHistory.currentView},getBackView:function(){return a.$viewHistory.backView},getForwardView:function(){return a.$viewHistory.forwardView},getNavDirection:function(){return a.$viewHistory.navDirection},getCurrentStateName:function(){return b&&b.current?b.current.name:null},isCurrentStateNavView:function(a){return b&&b.current&&b.current.views&&b.current.views[a]?!0:!1},getCurrentStateParams:function(){var a;if(b&&b.params)for(var c in b.params)b.params.hasOwnProperty(c)&&(a=a||{},a[c]=b.params[c]);return a},getCurrentStateId:function(){var a;if(b&&b.current&&b.current.name){if(a=b.current.name,b.params)for(var c in b.params)b.params.hasOwnProperty(c)&&b.params[c]&&(a+="_"+c+"="+b.params[c]);return a}return ionic.Utils.nextUid()},goToHistoryRoot:function(b){if(b){var c=a.$viewHistory.histories[b];if(c&&c.stack.length){if(a.$viewHistory.currentView&&a.$viewHistory.currentView.viewId===c.stack[0].viewId)return;a.$viewHistory.forcedNav={viewId:c.stack[0].viewId,navAction:"moveBack",navDirection:"back"},c.stack[0].go()}}},_getView:function(b){return b?a.$viewHistory.histories[b]:null},_getBackView:function(a){return a?this._getView(a.backViewId):null},_getForwardView:function(a){return a?this._getView(a.forwardViewId):null},_getHistory:function(b){var c=this._getParentHistoryObj(b);return a.$viewHistory.histories[c.historyId]||(a.$viewHistory.histories[c.historyId]={historyId:c.historyId,parentHistoryId:this._getParentHistoryObj(c.scope.$parent).historyId,stack:[],cursor:-1}),a.$viewHistory.histories[c.historyId]},_getParentHistoryObj:function(b){for(var c=b;c;){if(c.hasOwnProperty("$historyId"))return{historyId:c.$historyId,scope:c};c=c.$parent}return{historyId:"root",scope:a}},getRenderer:function(a,b,c){function d(a){for(var b="";!b&&a;)b=a.getAttribute("animation"),a=a.parentElement;return b}function e(){j&&a[0].classList.add(j),"back"===f.navDirection?a[0].classList.add("reverse"):a[0].classList.remove("reverse")}var f,h,i=this,j=angular.isDefined(c.$nextAnimation)?c.$nextAnimation:d(a[0]);return c.$nextAnimation=void 0,function(b){return{enter:function(c){return h&&b?(e(),c.addClass("ng-enter"),document.body.classList.add("disable-pointer-events"),void g.enter(c,a,null,function(){document.body.classList.remove("disable-pointer-events"),j&&a[0].classList.remove(j)})):void a.append(c)},leave:function(){var c=a.contents();return h&&b?(e(),void g.leave(c,function(){c.remove()})):void c.remove()},register:function(a){return f=i.register(c,a),h=null!==j&&null!==f.navDirection,f}}}},disableRegisterByTagName:function(b){a.$viewHistory.disabledRegistrableTagNames.push(b.toUpperCase())},isTagNameRegistrable:function(b){var c,d,e=a.$viewHistory.disabledRegistrableTagNames;for(c=0;c<b.length;c++)if(1===b[c].nodeType)for(d=0;d<e.length;d++)if(b[c].tagName===e[d])return!1;return!0},clearHistory:function(){var b,c=a.$viewHistory.histories,d=a.$viewHistory.currentView;for(b in c)c[b].stack&&(c[b].stack=[],c[b].cursor=-1),d.historyId===b?(d.backViewId=null,d.forwardViewId=null,c[b].stack.push(d)):c[b].destroy&&c[b].destroy();this.setNavViews(d.viewId)}}}]),angular.module("ionic.ui.navAnimation",[]).directive("ionNavAnimation",function(){return{restrict:"A",require:"^?ionNavView",link:function(a,b,c,d){d&&ionic.on("tap",function(){d.setNextAnimation(c.ionNavAnimation)},b[0])}}}),function(){"use strict";angular.module("ionic.ui.actionSheet",[]).directive("ionActionSheet",["$document",function(a){return{restrict:"E",scope:!0,replace:!0,link:function(b,c){var d=function(a){27==a.which&&(b.cancel(),b.$apply())},e=function(a){a.target==c[0]&&(b.cancel(),b.$apply())};b.$on("$destroy",function(){c.remove(),a.unbind("keyup",d)}),a.bind("keyup",d),c.bind("click",e)},template:'<div class="action-sheet-backdrop"><div class="action-sheet-wrapper action-sheet-up"><div class="action-sheet"><div class="action-sheet-group"><div class="action-sheet-title" ng-if="titleText">{{titleText}}</div><button class="button" ng-click="buttonClicked($index)" ng-repeat="button in buttons">{{button.text}}</button></div><div class="action-sheet-group" ng-if="destructiveText"><button class="button destructive" ng-click="destructiveButtonClicked()">{{destructiveText}}</button></div><div class="action-sheet-group" ng-if="cancelText"><button class="button" ng-click="cancel()">{{cancelText}}</button></div></div></div></div>'}}])}(),function(a){"use strict";angular.module("ionic.ui.header",["ngAnimate","ngSanitize"]).directive("barHeader",["$ionicScrollDelegate",function(a){return{restrict:"C",link:function(b,c){a.tapScrollToTop(c)}}}]).directive("ionHeaderBar",["$ionicScrollDelegate",function(){return{restrict:"E",replace:!0,transclude:!0,template:'<header class="bar bar-header">                <div class="buttons">                  <button ng-repeat="button in leftButtons" class="button no-animation" ng-class="button.type" ng-click="button.tap($event, $index)" ng-bind-html="button.content">                  </button>                </div>                <h1 class="title" ng-bind-html="title"></h1>                <div class="buttons">                  <button ng-repeat="button in rightButtons" class="button no-animation" ng-class="button.type" ng-click="button.tap($event, $index)" ng-bind-html="button.content">                  </button>                </div>              </header>',scope:{leftButtons:"=",rightButtons:"=",title:"=",type:"@",alignTitle:"@"},link:function(b,c){var d=new a.views.HeaderBar({el:c[0],alignTitle:b.alignTitle||"center"});c.addClass(b.type),b.headerBarView=d,b.$watch("leftButtons",function(){d.align()}),b.$watch("rightButtons",function(){d.align()}),b.$watch("title",function(){d.align()})}}}]).directive("ionFooterBar",function(){return{restrict:"E",replace:!0,transclude:!0,template:'<footer class="bar bar-footer" ng-transclude>              </footer>',scope:{type:"@"},link:function(a,b){b.addClass(a.type)}}})}(ionic),function(){"use strict";angular.module("ionic.ui.checkbox",[]).directive("ionCheckbox",function(){return{restrict:"E",replace:!0,require:"?ngModel",scope:{ngModel:"=?",ngValue:"=?",ngChecked:"=?",ngChange:"&"},transclude:!0,template:'<div class="item item-checkbox disable-pointer-events"><label class="checkbox enable-pointer-events"><input type="checkbox" ng-model="ngModel" ng-value="ngValue" ng-change="ngChange()"></label><div class="item-content" ng-transclude></div></div>',compile:function(a,b){var c=a.find("input");b.name&&c.attr("name",b.name),b.ngChecked&&c.attr("ng-checked","ngChecked"),b.ngTrueValue&&c.attr("ng-true-value",b.ngTrueValue),b.ngFalseValue&&c.attr("ng-false-value",b.ngFalseValue)}}})}(),function(){"use strict";angular.module("ionic.ui.content",["ionic.ui.service","ionic.ui.scroll"]).directive("ionPane",function(){return{restrict:"E",link:function(a,b){b.addClass("pane")}}}).directive("ionContent",["$parse","$timeout","$ionicScrollDelegate","$controller","$ionicBind",function(a,b,c,d,e){return{restrict:"E",replace:!0,transclude:!0,require:"^?ionNavView",scope:!0,template:'<div class="scroll-content"><div class="scroll"></div></div>',compile:function(a,c,f){function g(a,g,h){var i,j,k=angular.element(g[0].querySelector(".scroll"));if(f(a,function(a){k.append(a)}),e(a,h,{$onRefresh:"&onRefresh",$onRefreshOpening:"&onRefreshOpening",$onScroll:"&onScroll",$onScrollComplete:"&onScrollComplete",$onInfiniteScroll:"&onInfiniteScroll",refreshComplete:"=",infiniteScrollDistance:"@",hasBouncing:"@",scroll:"@",padding:"@",hasScrollX:"@",hasScrollY:"@",scrollbarX:"@",scrollbarY:"@",startX:"@",startY:"@",scrollEventInterval:"@"}),"false"!==a.scroll){if("true"===c.overflowScroll)return void g.addClass("overflow-scroll");j=d("$ionicScroll",{$scope:a,scrollViewOptions:{el:g[0],bouncing:a.$eval(a.hasBouncing),startX:a.$eval(a.startX)||0,startY:a.$eval(a.startY)||0,scrollbarX:a.$eval(a.scrollbarX)!==!1,scrollbarY:a.$eval(a.scrollbarY)!==!1,scrollingX:a.$eval(a.hasScrollX)===!0,scrollingY:a.$eval(a.hasScrollY)!==!1,scrollEventInterval:parseInt(a.scrollEventInterval,10)||20,scrollingComplete:function(){a.$onScrollComplete({scrollTop:this.__scrollTop,scrollLeft:this.__scrollLeft})}}}),i=a.$parent.scrollView=j.scrollView,a.$on("$viewContentLoaded",function(c,d){d||(d={});var e=d.scrollValues;e&&b(function(){i.scrollTo(+e.left||null,+e.top||null)},0),a.$on("$destroy",function(){d.scrollValues=i.getValues()})}),c.refreshComplete&&(a.refreshComplete=function(){a.scrollView&&(j.refresher&&j.refresher.classList.remove("active"),i.finishPullToRefresh(),a.$parent.$broadcast("scroll.onRefreshComplete"))})}}return"true"==c.hasHeader&&a.addClass("has-header"),"true"==c.hasSubheader&&a.addClass("has-subheader"),"true"==c.hasFooter&&a.addClass("has-footer"),"true"==c.hasTabs&&a.addClass("has-tabs"),"true"==c.padding&&a.find("div").addClass("padding"),{pre:g}}}}]).directive("ionRefresher",function(){return{restrict:"E",replace:!0,require:["^?ionContent","^?ionList"],template:'<div class="scroll-refresher"><div class="ionic-refresher-content"><i class="icon ion-arrow-down-c icon-pulling"></i><i class="icon ion-loading-d icon-refreshing"></i></div></div>',scope:!0}}).directive("ionScrollRefresher",function(){return{restrict:"E",replace:!0,transclude:!0,template:'<div class="scroll-refresher"><div class="scroll-refresher-content" ng-transclude></div></div>'}}).directive("ionInfiniteScroll",["$ionicBind",function(a){return{restrict:"E",require:"^?$ionicScroll",template:'<div class="scroll-infinite"><div class="scroll-infinite-content"><i class="icon ion-loading-d icon-refreshing"></i></div></div>',link:function(b,c,d){setTimeout(function(){function e(){var a=b.distance||"1%";return a.indexOf("%")>-1?g.getScrollMax().top*(1-parseInt(a,10)/100):g.getScrollMax().top-parseInt(a,10)}var f=c.controller("$ionicScroll"),g=f.scrollView;a(b,d,{distance:"@infiniteScrollDistance"});var h=!1;b.$on("scroll.infiniteScrollComplete",function(){c[0].classList.remove("active"),setTimeout(function(){g.resize()}),h=!1}),f.$element.on("scroll",ionic.animationFrameThrottle(function(){!h&&g.getValues().top>=e()&&(c[0].classList.add("active"),h=!0,b.$apply(angular.bind(b,b.$onInfiniteScroll)))}))})}}}])}(),function(){"use strict";angular.module("ionic.ui.list",["ngAnimate"]).directive("ionItem",["$timeout","$parse",function(){return{restrict:"E",require:"?^ionList",replace:!0,transclude:!0,scope:{item:"=",itemType:"@",canDelete:"@",canReorder:"@",canSwipe:"@",onDelete:"&",optionButtons:"&",deleteIcon:"@",reorderIcon:"@"},template:'<div class="item item-complex">            <div class="item-edit" ng-if="deleteClick !== undefined">              <button class="button button-icon icon" ng-class="deleteIconClass" ng-click="deleteClick()" ion-stop-event="click"></button>            </div>            <a class="item-content" ng-href="{{ href }}" ng-transclude></a>            <div class="item-drag" ng-if="reorderIconClass !== undefined">              <button data-ionic-action="reorder" class="button button-icon icon" ng-class="reorderIconClass"></button>            </div>            <div class="item-options" ng-if="itemOptionButtons">             <button ng-click="b.onTap(item, b)" ion-stop-event="click" class="button" ng-class="b.type" ng-repeat="b in itemOptionButtons" ng-bind="b.text"></button>           </div>          </div>',link:function(a,b,c,d){if(d){var e=d.scope,f=d.attrs;c.$observe("href",function(b){b&&(a.href=b.trim())}),a.itemType||(a.itemType=e.itemType),b.addClass(a.itemType||e.itemType),a.itemClass=a.itemType,"false"!==(c.canDelete?a.canDelete:e.canDelete)&&(c.onDelete||f.onDelete)&&(a.deleteClick=function(){c.onDelete?a.onDelete({item:a.item}):f.onDelete&&e.onDelete({item:a.item})},a.deleteIconClass=a.deleteIcon||e.deleteIcon||"ion-minus-circled"),"true"===(c.canReorder?a.canReorder:e.canReorder)&&(a.reorderIconClass=a.reorderIcon||e.reorderIcon||"ion-navicon"),"false"!==(c.canSwipe?a.canSwipe:e.canSwipe)&&(a.itemOptionButtons=a.optionButtons(),"undefined"==typeof a.itemOptionButtons&&(a.itemOptionButtons=e.optionButtons()))}}}}]).directive("ionList",["$timeout",function(a){return{restrict:"E",replace:!0,transclude:!0,require:"^?$ionicScroll",scope:{itemType:"@",canDelete:"@",canReorder:"@",canSwipe:"@",showDelete:"=",showReorder:"=",onDelete:"&",onReorder:"&",optionButtons:"&",deleteIcon:"@",reorderIcon:"@"},template:"<div class=\"list\" ng-class=\"{'list-editing': showDelete, 'list-reordering': showReorder}\" ng-transclude></div>",controller:["$scope","$attrs",function(a,b){this.scope=a,this.attrs=b}],link:function(b,c,d,e){b.listView=new ionic.views.ListView({el:c[0],listEl:c[0].children[0],scrollEl:e&&e.element,scrollView:e&&e.scrollView,onReorder:function(a,c,d){b.$apply(function(){b.onReorder({el:a,start:c,end:d})})}}),d.animation&&c[0].classList.add(d.animation);var f=b.$watch("showReorder",function(b){b?c[0].classList.add("item-options-hide"):b===!1&&a(function(){c[0].classList.remove("item-options-hide")},250)});b.$on("$destroy",function(){f()})}}}])}(),function(){"use strict";angular.module("ionic.ui.loading",[]).directive("ionLoading",function(){return{restrict:"E",replace:!0,transclude:!0,link:function(a,b){b.addClass(a.animation||"")},template:'<div class="loading-backdrop" ng-class="{enabled: showBackdrop}"><div class="loading" ng-transclude></div></div>'}})}(),function(a){"use strict";angular.module("ionic.ui.radio",[]).directive("ionRadio",function(){return{restrict:"E",replace:!0,require:"?ngModel",scope:{ngModel:"=?",ngValue:"=?",ngChange:"&",icon:"@"},transclude:!0,template:'<label class="item item-radio"><input type="radio" name="radio-group" ng-model="ngModel" ng-value="ngValue" ng-change="ngChange()"><div class="item-content disable-pointer-events" ng-transclude></div><i class="radio-icon disable-pointer-events icon ion-checkmark"></i></label>',compile:function(a,b){b.name&&a.children().eq(0).attr("name",b.name),b.icon&&a.children().eq(2).removeClass("ion-checkmark").addClass(b.icon)}}}).directive("ionRadioButtons",function(){return{restrict:"E",replace:!0,require:"?ngModel",scope:{value:"@"},transclude:!0,template:'<div class="button-bar button-bar-inline" ng-transclude></div>',controller:["$scope","$element",function(a,b){this.select=function(a){for(var c,d=b.children(),e=0;e<d.length;e++)c=d[e],c!=a[0]&&c.classList.remove("active")}}],link:function(a,b,c,d){d&&(d.$render=function(){for(var c=b.children(),e=0;e<c.length;e++)c[e].classList.remove("active");a.$parent.$broadcast("radioButton.select",d.$viewValue)})}}}).directive("ionButtonRadio",function(){return{restrict:"CA",require:["?^ngModel","?^ionRadioButtons"],link:function(b,c,d,e){var f=e[0],g=e[1];if(f&&g){var h=function(){c.addClass("active"),f.$setViewValue(b.$eval(d.ngValue)),g.select(c)},i=function(){h()};b.$on("radioButton.select",function(a,e){e==b.$eval(d.ngValue)&&c.addClass("active")}),a.on("tap",i,c[0]),b.$on("$destroy",function(){a.off("tap",i)})}}}})}(window.ionic),function(){"use strict";angular.module("ionic.ui.scroll",[]).directive("ionScroll",["$parse","$timeout","$controller",function(a,b,c){return{restrict:"E",replace:!0,template:'<div class="scroll-view"><div class="scroll" ng-transclude></div></div>',transclude:!0,scope:{direction:"@",paging:"@",onRefresh:"&",onScroll:"&",refreshComplete:"=",scroll:"@",scrollbarX:"@",scrollbarY:"@"},controller:function(){},compile:function(a,b){function d(a,d){var e,f,g=d[0].children[0];"true"==b.padding&&g.classList.add("padding"),a.$eval(a.paging)===!0&&g.classList.add("scroll-paging"),a.direction||(a.direction="y");var h=a.$eval(a.paging)===!0,i={el:d[0],paging:h,scrollbarX:a.$eval(a.scrollbarX)!==!1,scrollbarY:a.$eval(a.scrollbarY)!==!1,scrollingX:a.direction.indexOf("x")>=0,scrollingY:a.direction.indexOf("y")>=0};h&&(i.speedMultiplier=.8,i.bouncing=!1),f=c("$ionicScroll",{$scope:a,scrollViewOptions:i}),e=a.$parent.scrollView=f.scrollView}return{pre:d}}}}])}(),function(){"use strict";angular.module("ionic.ui.sideMenu",["ionic.service.gesture","ionic.service.view"]).run(["$ionicViewService",function(a){a.disableRegisterByTagName("ion-side-menus")}]).directive("ionSideMenus",function(){return{restrict:"ECA",controller:["$scope","$attrs",function(a){angular.extend(this,ionic.controllers.SideMenuController.prototype),ionic.controllers.SideMenuController.call(this,{left:{width:275},right:{width:275}}),a.sideMenuContentTranslateX=0,a.sideMenuController=this}],replace:!0,transclude:!0,template:'<div class="view" ng-transclude></div>'}}).directive("ionSideMenuContent",["$timeout","$ionicGesture",function(a,b){return{restrict:"AC",require:"^ionSideMenus",scope:!0,compile:function(c,d){return function(c,e,f,g){e.addClass("menu-content"),angular.isDefined(d.dragContent)?c.$watch(d.dragContent,function(a){c.dragContent=a}):c.dragContent=!0;var h=!1,i=!1,j=function(a){if(c.dragContent){if(h||a.gesture.srcEvent.defaultPrevented)return;i=!0,g._handleDrag(a),a.gesture.srcEvent.preventDefault()}},k=function(a){i&&a.gesture.srcEvent.preventDefault()},l=b.on("dragright",j,e),m=b.on("dragleft",j,e),n=b.on("dragup",k,e),o=b.on("dragdown",k,e),p=function(a){i=!1,h||g._endDrag(a),h=!1},q=b.on("release",p,e);g.setContent({onDrag:function(){},endDrag:function(){},getTranslateX:function(){return c.sideMenuContentTranslateX||0},setTranslateX:ionic.animationFrameThrottle(function(b){e[0].style[ionic.CSS.TRANSFORM]=0===b?"none":"translate3d("+b+"px, 0, 0)",a(function(){c.sideMenuContentTranslateX=b})}),enableAnimation:function(){c.animationEnabled=!0,e[0].classList.add("menu-animated")},disableAnimation:function(){c.animationEnabled=!1,e[0].classList.remove("menu-animated")}}),c.$on("$destroy",function(){b.off(m,"dragleft",j),b.off(l,"dragright",j),b.off(n,"dragup",j),b.off(o,"dragdown",j),b.off(q,"release",p)})}}}}]).directive("ionSideMenu",function(){return{restrict:"E",require:"^ionSideMenus",replace:!0,transclude:!0,scope:!0,template:'<div class="menu menu-{{side}}"></div>',compile:function(a,b,c){return angular.isUndefined(b.isEnabled)&&b.$set("isEnabled","true"),angular.isUndefined(b.width)&&b.$set("width","275"),function(a,b,d,e){a.side=d.side;
  var f=e[a.side]=new ionic.views.SideMenu({width:275,el:b[0],isEnabled:!0});a.$watch(d.width,function(a){var b=+a;b&&b==a&&f.setWidth(+a)}),a.$watch(d.isEnabled,function(a){f.setIsEnabled(!!a)}),c(a,function(a){b.append(a)})}}}})}(),function(){"use strict";angular.module("ionic.ui.slideBox",[]).directive("ionSlideBox",["$timeout","$compile","$ionicSlideBoxDelegate",function(a,b,c){return{restrict:"E",replace:!0,transclude:!0,scope:{doesContinue:"@",slideInterval:"@",showPager:"@",disableScroll:"@",onSlideChanged:"&",activeSlide:"=?"},controller:["$scope","$element",function(b,d){var e=b.$eval(b.doesContinue)===!0,f=e?b.$eval(b.slideInterval)||4e3:0,g=new ionic.views.Slider({el:d[0],auto:f,disableScroll:b.$eval(b.disableScroll)===!0||!1,continuous:e,startSlide:b.activeSlide,slidesChanged:function(){b.currentSlide=g.getPos(),a(function(){})},callback:function(c){b.currentSlide=c,b.onSlideChanged({index:b.currentSlide}),b.$parent.$broadcast("slideBox.slideChanged",c),b.activeSlide=c,a(function(){})}});b.$watch("activeSlide",function(a){angular.isDefined(a)&&g.slide(a)}),b.$on("slideBox.nextSlide",function(){g.next()}),b.$on("slideBox.prevSlide",function(){g.prev()}),b.$on("slideBox.setSlide",function(a,b){g.slide(b)}),b.$parent.slideBox=g,c.register(b,d),this.getNumSlides=function(){return g.getNumSlides()},a(function(){g.load()})}],template:'<div class="slider">            <div class="slider-slides" ng-transclude>            </div>          </div>',link:function(a,c){if(a.$eval(a.showPager)!==!1){var d=a.$new(),e=angular.element("<ion-pager></ion-pager>");c.append(e),b(e)(d)}}}}]).directive("ionSlide",function(){return{restrict:"E",require:"^ionSlideBox",compile:function(a){return a.addClass("slider-slide"),function(){}}}}).directive("ionPager",function(){return{restrict:"E",replace:!0,require:"^ionSlideBox",template:'<div class="slider-pager"><span class="slider-pager-page" ng-repeat="slide in numSlides() track by $index" ng-class="{active: $index == currentSlide}"><i class="icon ion-record"></i></span></div>',link:function(a,b,c,d){var e=function(a){for(var c=b[0].children,d=c.length,e=0;d>e;e++)e==a?c[e].classList.add("active"):c[e].classList.remove("active")};a.numSlides=function(){return new Array(d.getNumSlides())},a.$watch("currentSlide",function(a){e(a)})}}})}(),angular.module("ionic.ui.tabs",["ionic.service.view"]).run(["$ionicViewService",function(a){a.disableRegisterByTagName("ion-tabs")}]).controller("$ionicTabs",["$scope","$ionicViewService","$element",function(a,b){var c=a.tabsController=this;c.tabs=[],c.selectedTab=null,c.add=function(a){b.registerHistory(a),c.tabs.push(a),1===c.tabs.length&&c.select(a)},c.remove=function(a){var b=c.tabs.indexOf(a);if(-1!==b){if(a.$tabSelected)if(c.deselect(a),1===c.tabs.length);else{var d=b===c.tabs.length-1?b-1:b+1;c.select(c.tabs[d])}c.tabs.splice(b,1)}},c.getTabIndex=function(a){return c.tabs.indexOf(a)},c.deselect=function(a){a.$tabSelected&&(c.selectedTab=null,a.$tabSelected=!1,(a.onDeselect||angular.noop)())},c.select=function(d,e){var f;if(angular.isNumber(d)?(f=d,d=c.tabs[f]):f=c.tabs.indexOf(d),!d||-1==f)throw new Error('Cannot select tab "'+f+'"!');if(c.selectedTab&&c.selectedTab.$historyId==d.$historyId)e&&b.goToHistoryRoot(d.$historyId);else if(angular.forEach(c.tabs,function(a){c.deselect(a)}),c.selectedTab=d,d.$tabSelected=!0,(d.onSelect||angular.noop)(),e){var g={type:"tab",tabIndex:f,historyId:d.$historyId,navViewName:d.navViewName,hasNavView:!!d.navViewName,title:d.title,url:d.href,uiSref:d.uiSref};a.$emit("viewState.changeHistory",g)}}}]).directive("ionTabs",["$ionicViewService","$ionicBind",function(a,b){return{restrict:"E",replace:!0,scope:!0,transclude:!0,controller:"$ionicTabs",template:'<div class="view {{$animation}}"><div class="tabs {{$tabsStyle}} {{$tabsType}}"></div></div>',compile:function(a,c,d){return angular.isUndefined(c.tabsType)&&c.$set("tabsType","tabs-positive"),function(a,c,e,f){b(a,e,{$animation:"@animation",$tabsStyle:"@tabsStyle",$tabsType:"@tabsType"}),f.$scope=a,f.$element=c,f.$tabsElement=angular.element(c[0].querySelector(".tabs")),d(a,function(a){c.append(a)})}}}}]).controller("$ionicTab",["$scope","$ionicViewService","$rootScope","$element",function(a){this.$scope=a}]).directive("ionTab",["$rootScope","$animate","$ionicBind","$compile","$ionicViewService",function(a,b,c,d,e){function f(a,b){return angular.isDefined(b)?" "+a+'="'+b+'"':""}return{restrict:"E",require:["^ionTabs","ionTab"],replace:!0,transclude:"element",controller:"$ionicTab",scope:!0,compile:function(a,g,h){return function(a,i,j,k){function l(){e.isCurrentStateNavView(a.navViewName)&&tabsCtrl.select(a)}var m,n,o;tabsCtrl=k[0],tabCtrl=k[1],c(a,j,{animate:"=",leftButtons:"=",rightButtons:"=",onSelect:"&",onDeselect:"&",title:"@",uiSref:"@",href:"@"}),o=angular.element("<ion-tab-nav"+f("title",g.title)+f("icon",g.icon)+f("icon-on",g.iconOn)+f("icon-off",g.iconOff)+f("badge",g.badge)+f("badge-style",g.badgeStyle)+"></ion-tab-nav>"),o.data("$ionTabsController",tabsCtrl),o.data("$ionTabController",tabCtrl),tabsCtrl.$tabsElement.append(d(o)(a)),tabsCtrl.add(a),a.$on("$destroy",function(){tabsCtrl.remove(a),o.isolateScope().$destroy(),o.remove()}),a.$watch("$tabSelected",function(c){c||a.$broadcast("tab.hidden",a),m&&m.$destroy(),m=null,n&&b.leave(n),n=null,c&&(m=a.$new(),h(m,function(a){a[0].removeAttribute("title"),b.enter(a,tabsCtrl.$element),a.addClass("pane"),n=a}),a.$broadcast("tab.shown",a))}),h(a,function(b){var c=b[0].querySelector("ion-nav-view");c&&(a.navViewName=c.getAttribute("name"),l(),a.$on("$stateChangeSuccess",l))})}}}}]).directive("ionTabNav",function(){return{restrict:"E",replace:!0,require:["^ionTabs","^ionTab"],template:'<a ng-class="{active: isTabActive(), \'has-badge\':badge}" ng-click="selectTab($event)" class="tab-item"><span class="badge {{badgeStyle}}" ng-if="badge">{{badge}}</span><i class="icon {{iconOn}}" ng-if="iconOn && isTabActive()"></i><i class="icon {{iconOff}}" ng-if="iconOff && !isTabActive()"></i><span class="tab-title" ng-bind-html="title"></span></a>',scope:{title:"@",icon:"@",iconOn:"@",iconOff:"@",badge:"=",badgeStyle:"@"},compile:function(a,b){return b.icon&&(b.$set("iconOn",b.icon),b.$set("iconOff",b.icon)),function(a,b,c,d){var e=d[0],f=d[1];a.isTabActive=function(){return e.selectedTab===f.$scope},a.selectTab=function(a){a.preventDefault(),e.select(f.$scope,!0)}}}}}),function(){"use strict";angular.module("ionic.ui.toggle",[]).directive("ionToggle",function(){return{restrict:"E",replace:!0,require:"?ngModel",scope:{ngModel:"=?",ngValue:"=?",ngChecked:"=?",ngChange:"&",ngDisabled:"=?"},transclude:!0,template:'<div class="item item-toggle disable-pointer-events"><div ng-transclude></div><label class="toggle enable-pointer-events"><input type="checkbox" ng-model="ngModel" ng-value="ngValue" ng-change="ngChange()" ng-disabled="ngDisabled"><div class="track disable-pointer-events"><div class="handle"></div></div></label></div>',compile:function(a,b){var c=a.find("input");b.name&&c.attr("name",b.name),b.ngChecked&&c.attr("ng-checked","ngChecked"),b.ngTrueValue&&c.attr("ng-true-value",b.ngTrueValue),b.ngFalseValue&&c.attr("ng-false-value",b.ngFalseValue)}}})}(window.ionic),function(a,b){"use strict";a.module("ionic.ui.touch",[]).config(["$provide",function(a){a.decorator("ngClickDirective",["$delegate",function(a){return a.shift(),a}])}]).directive("ngClick",["$parse",function(a){function c(a){b.tapElement(a.target,a)}return function(d,e,f){var g=a(f.ngClick);e.on("click",function(a){d.$apply(function(){g(d,{$event:a})})}),b.on("tap",c,e[0]),e.onclick=function(){},d.$on("$destroy",function(){b.off("tap",c,e[0])})}}]).directive("ionStopEvent",function(){function a(a){a.stopPropagation()}return{restrict:"A",link:function(b,c,d){c.bind(d.ionStopEvent,a)}}})}(window.angular,window.ionic),function(){"use strict";angular.module("ionic.ui.viewState",["ionic.service.view","ionic.service.gesture","ngSanitize"]).directive("ionNavBar",["$ionicViewService","$rootScope","$animate","$compile",function(a,b,c,d){return{restrict:"E",replace:!0,scope:{animation:"@",type:"@",backType:"@backButtonType",backLabel:"@backButtonLabel",backIcon:"@backButtonIcon",alignTitle:"@"},controller:function(){},template:'<header class="bar bar-header nav-bar{{navBarClass()}}"><ion-nav-back-button ng-if="(backType || backLabel || backIcon)" type="backType" label="backLabel" icon="backIcon" class="hide" ng-class="{\'hide\': !backButtonEnabled}"></ion-nav-back-button><div class="buttons left-buttons"> <button ng-click="button.tap($event)" ng-repeat="button in leftButtons" class="button no-animation {{button.type}}" ng-bind-html="button.content"></button></div><h1 ng-bind-html="title" class="title"></h1><div class="buttons right-buttons"> <button ng-click="button.tap($event)" ng-repeat="button in rightButtons" class="button no-animation {{button.type}}" ng-bind-html="button.content"></button></div></header>',compile:function(){return function(a,b){function e(b){return angular.isDefined(b.hideBackButton)&&(a.backButtonEnabled=!!b.hideBackButton),a.isReverse="back"==b.navDirection,a.animateEnabled=!(!b.navDirection||b.animate===!1),a.leftButtons=b.leftButtons,a.rightButtons=b.rightButtons,a.oldTitle=a.title,a.title=b&&b.title||"",a.animateEnabled?void f():void g.align()}function f(){var e,f,h;h=b[0].querySelectorAll(".title"),h.length&&(e=d('<h1 ng-bind-html="oldTitle" class="title"></h1>')(a),angular.element(h[0]).replaceWith(e)),f=d('<h1 class="title invisible" ng-bind-html="title"></h1>')(a),ionic.requestAnimationFrame(function(){e&&c.leave(angular.element(e));var d=e&&angular.element(e)||null;c.enter(f,b,d,function(){g.align()}),angular.forEach(h,function(a){a&&a.parentNode&&angular.element(a).remove()}),a.$digest(),ionic.requestAnimationFrame(function(){f[0].classList.remove("invisible")})})}a.backButtonEnabled=!1,a.animateEnabled=!0,a.isReverse=!1,a.isInvisible=!0,a.navBarClass=function(){return(a.type?" "+a.type:"")+(a.isReverse?" reverse":"")+(a.isInvisible?" invisible":"")+(!a.animationDisabled&&a.animation?" "+a.animation:"")};var g=new ionic.views.HeaderBar({el:b[0],alignTitle:a.alignTitle||"center"});a.headerBarView=g,a.$on("viewState.viewEnter",function(a,b){e(b)}),a.$on("viewState.showNavBar",function(b,c){a.isInvisible=!c});var h=[a.$parent.$on("$viewHistory.historyChange",function(b,c){a.backButtonEnabled=!!c.showBack}),a.$parent.$on("viewState.leftButtonsChanged",function(b,c){a.leftButtons=c}),a.$parent.$on("viewState.rightButtonsChanged",function(b,c){a.rightButtons=c}),a.$parent.$on("viewState.showBackButton",function(b,c){a.backButtonEnabled=!!c}),a.$parent.$on("viewState.titleUpdated",function(b,c){a.title=c&&c.title||""})];a.$on("$destroy",function(){for(var a=0;a<h.length;a++)h[a]()})}}}}]).directive("ionNavBarTitle",function(){return{restrict:"A",require:"^ionNavBar",link:function(a,b){a.headerBarView&&a.headerBarView.align(),b.on("$animate:close",function(){a.headerBarView&&a.headerBarView.align()})}}}).directive("ionAsyncVisible",function(){return function(a,b){ionic.requestAnimationFrame(function(){b[0].classList.remove("invisible")})}}).directive("ionView",["$ionicViewService","$rootScope","$animate",function(a,b){return{restrict:"EA",priority:1e3,scope:{leftButtons:"=",rightButtons:"=",title:"=",icon:"@",iconOn:"@",iconOff:"@",type:"@",alignTitle:"@",hideBackButton:"@",hideNavBar:"@",animation:"@"},compile:function(a){return a.addClass("pane"),a[0].removeAttribute("title"),function(a){b.$broadcast("viewState.viewEnter",{title:a.title,navDirection:a.$navDirection||a.$parent.$navDirection}),a.hideBackButton=a.$eval(a.hideBackButton),a.hideBackButton&&b.$broadcast("viewState.showBackButton",!1),b.$broadcast("viewState.showNavBar","true"!==a.hideNavBar),a.$watch("leftButtons",function(){a.$emit("viewState.leftButtonsChanged",a.leftButtons)}),a.$watch("rightButtons",function(){a.$emit("viewState.rightButtonsChanged",a.rightButtons)}),a.$watch("title",function(){a.$emit("viewState.titleUpdated",a)})}}}}]).directive("ionNavBackButton",["$ionicViewService","$rootScope",function(a){function b(b){var c=a.getBackView();return c&&c.go(),b.alreadyHandled=!0,!1}return{restrict:"E",scope:{type:"=",label:"=",icon:"="},replace:!0,template:'<button ng-click="goBack($event)" class="button back-button {{type}} {{(icon && !label) ? \'icon \' + icon : \'\'}}"><i ng-if="icon && label" class="icon {{icon}}"></i> {{label}}</button>',link:function(a){a.goBack=b}}}]).directive("ionNavView",["$ionicViewService","$state","$compile","$controller","$animate",function(a,b,c,d,e){var f=!1,g={restrict:"E",terminal:!0,priority:2e3,transclude:!0,controller:["$scope",function(a){this.setNextAnimation=function(b){a.$nextAnimation=b}}],compile:function(h,i,j){return function(h,i,k){function l(f){e.enabled()===!1&&(f=!1);var g=b.$current&&b.$current.locals[o];if(g!==n){var j=a.getRenderer(i,k,h);if(m&&(m.$destroy(),m=null),!g)return n=null,s.state=null,i.append(q);var l=angular.element("<div></div>").html(g.$template).contents(),r=j().register(l);j(f).leave(),n=g,s.state=g.$$state,j(f).enter(l);var t=c(l);if(m=h.$new(),m.$navDirection=r.navDirection,g.$$controller){g.$scope=m;var u=d(g.$$controller,g);i.children().data("$ngControllerController",u)}t(m);var v=a._getView(r.viewId)||{};m.$broadcast("$viewContentLoaded",v),p&&m.$eval(p),l=null}}var m,n,o=k[g.name]||k.name||"",p=k.onload||"",q=j(h);i.append(q);var r=i.parent().inheritedData("$uiView");o.indexOf("@")<0&&(o=o+"@"+(r?r.state.name:""));var s={name:o,state:null};i.data("$uiView",s);var t=function(){if(!f){f=!0;try{l(!0)}catch(a){throw f=!1,a}f=!1}};h.$on("$stateChangeSuccess",t),h.$on("$viewContentLoading",t),l(!1)}}};return g}])}(),function(){"use strict";angular.module("ionic.ui.virtRepeat",[]).directive("ionVirtRepeat",function(){return{require:["?ngModel","^virtualList"],transclude:"element",priority:1e3,terminal:!0,compile:function(){return function(a,b,c,d){var e=d[1];e.listView.renderViewport=function(){}}}}})}(ionic),function(){"use strict";function a(a){var b=a.match(/^\s*([\$\w]+)\s+in\s+(\S*)\s*$/);if(!b)throw new Error("Expected sfVirtualRepeat in form of '_item_ in _collection_' but got '"+a+"'.");return{value:b[1],collection:b[2]}}function b(a){var b={overflow:"auto"},c=window.getComputedStyle?window.getComputedStyle(a[0]):a[0].currentStyle,d=c&&c.getPropertyValue("max-height"),e=c&&c.getPropertyValue("height");d&&"0px"!==d?b.maxHeight=d:b.height=e&&"0px"!==e?e:window.innerHeight,a.css(b)}function c(a){var b={margin:0,padding:0,border:0,"box-sizing":"border-box"};a.css(b)}function d(a){var b=window.getComputedStyle?window.getComputedStyle(a):a.currentStyle,c=b&&b.getPropertyValue("max-height"),d=b&&b.getPropertyValue("height");if(d&&"0px"!==d&&"auto"!==d)$log.info('Row height is "%s" from css height',d);else if(c&&"0px"!==c&&"none"!==c)d=c,$log.info('Row height is "%s" from css max-height',d);else{if(!a.clientHeight)throw new Error("Unable to compute height of row");d=a.clientHeight+"px",$log.info('Row height is "%s" from client height',d)}return angular.element(a).css("height",d),parseInt(d,10)}angular.module("ionic.ui.virtualRepeat",[]).directive("ionVirtualRepeat",["$log",function(e){return{require:["?ngModel, ^virtualList"],transclude:"element",priority:1e3,terminal:!0,compile:function(f,g){var h=a(g.sfVirtualRepeat);return function(a,f,g,i){function j(a,b,c){var d=c.$new();return d[h.value]=b[a],d.$index=a,d.$first=0===a,d.$last=a===b.length-1,d.$middle=!(d.$first||d.$last),d.$watch(function(){d[h.value]=b[a]}),d}function k(a,b,c,d,e){var f,g,h,i=document.createDocumentFragment(),k=[];for(g=a;g!==b;g++)h=j(g,c,d),f=linker(h,angular.noop),k.push(f),i.appendChild(f[0]);return e.after(i),k}function l(){var a=clip(v.firstActive,v.firstVisible-v.lowWater,v.firstVisible-v.highWater),b=clip(v.firstActive+v.active,v.firstVisible+v.visible+v.lowWater,v.firstVisible+v.visible+v.highWater);v.firstActive=Math.max(0,a),v.active=Math.min(b,v.total)-v.firstActive}function m(b){s&&a.$apply(function(){v.firstVisible=Math.floor(b.target.scrollTop/s),v.visible=Math.ceil(u.viewport[0].clientHeight/s),e.log("scroll to row %o",v.firstVisible),t=b.target.scrollTop+b.target.clientHeight>=b.target.scrollHeight,l(),e.log(" state is now %o",v),e.log(" sticky = %o",t)})}function n(a){var b=a.$eval(h.collection);return b.length!==v.total&&(v.total=b.length,l()),{start:v.firstActive,active:v.active,len:b.length}}function o(a,b){var c,d,e=Array.prototype[a];for(d=0;b>d;d++)c=e.call(r),c.scope().$destroy(),c.remove()}function p(a,b,c){var g,i=b.start+b.active,j=c.$eval(h.collection);if(a===b)e.info("initial listen"),g=k(a.start,i,j,c,f),r=g,r.length&&(s=d(g[0][0]));else{var l=a.start+a.active,m=a.start>=b.start,n=m?a.start-b.start:b.start-a.start,p=l>=i?l-i:i-l,q=n<(m?b.active:a.active);if(e.info("change by %o,%o rows %s",n,p,m?"forward":"backward"),q){if(m?(e.info("need to remove from the top"),o("shift",n)):n&&(e.info("need to add at the top"),g=k(a.start,b.start,j,c,f),r=g.concat(r)),i>l)e.info("need to remove from the bottom"),o("pop",i-l);else if(p){var v=r[r.length-1];e.info("need to add to the bottom"),g=k(i,l,j,c,v),r=r.concat(g)}}else e.info("non-contiguous change"),o("pop",r.length),r=k(a.start,l,j,c,f);!s&&r.length&&(s=d(r[0][0])),u.content.css({"padding-top":a.start*s+"px"})}u.content.css({height:a.len*s+"px"}),t&&(u.viewport[0].scrollTop=u.viewport[0].clientHeight+u.viewport[0].scrollHeight)}var q=i[1],r=[],s=0,t=!1,u=q.element,v="ngModel"in g?a.$eval(g.ngModel):{};v.firstActive=0,v.firstVisible=0,v.visible=0,v.active=0,v.total=0,v.lowWater=v.lowWater||100,v.highWater=v.highWater||300,c(u.content),b(u.viewport),u.bind("momentumScrolled",m),a.$on("$destroy",function(){u.unbind("momentumScrolled",m)}),a.$watch(n,p,!0)}}}}])}(ionic),function(){"use strict";angular.module("ionic.ui.scroll").controller("$ionicScroll",["$scope","scrollViewOptions","$timeout","$ionicScrollDelegate","$window",function(a,b,c,d,e){function f(){i.resize()}var g=this,h=this.element=b.el,i=this.scrollView=new ionic.views.Scroll(b);angular.isDefined(b.bouncing)||ionic.Platform.ready(function(){i.options.bouncing=!ionic.Platform.isAndroid()});var j=this.$element=angular.element(h);j.data("$$ionicScrollController",this),d.register(a,j,i),e.addEventListener("resize",f),a.$on("$destroy",function(){e.removeEventListener("resize",f)}),c(function(){if(i.run(),g.refresher=h.querySelector(".scroll-refresher"),g.refresher){var b=g.refresher.clientHeight||0;i.activatePullToRefresh(b,function(){g.refresher.classList.add("active"),a.$onRefreshOpening&&a.$onRefreshOpening()},function(){g.refresher.classList.remove("refreshing"),g.refresher.classList.remove("active")},function(){g.refresher.classList.add("refreshing"),a.$onRefresh&&a.$onRefresh(),a.$parent.$broadcast("scroll.onRefresh")})}})}])}();