UNPKG

cordova-plugin-progressindicator

Version:
16 lines (15 loc) 69 kB
/*! * Copyright 2014 Drifty Co. * http://drifty.com/ * * Ionic, v1.0.0-beta.9 * 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(){function e(e){var t,n=typeof e;return"object"==n&&null!==e?"function"==typeof(t=e.$$hashKey)?t=e.$$hashKey():void 0===t&&(t=e.$$hashKey=ionic.Utils.nextUid()):t=e,n+":"+t}function t(e){if(e.$root!==e){var t=e.$parent;e.$$disconnected=!0,t.$$childHead===e&&(t.$$childHead=e.$$nextSibling),t.$$childTail===e&&(t.$$childTail=e.$$prevSibling),e.$$prevSibling&&(e.$$prevSibling.$$nextSibling=e.$$nextSibling),e.$$nextSibling&&(e.$$nextSibling.$$prevSibling=e.$$prevSibling),e.$$nextSibling=e.$$prevSibling=null}}function n(e){if(e.$root!==e&&e.$$disconnected){var t=e.$parent;e.$$disconnected=!1,e.$$prevSibling=t.$$childTail,t.$$childHead?(t.$$childTail.$$nextSibling=e,t.$$childTail=e):t.$$childHead=t.$$childTail=e}}function i(e){return["$log",function(t){function n(e){this.handle=e}var i=this,o=this._instances=[];this._registerInstance=function(e,t){return e.$$delegateHandle=t,o.push(e),function(){var t=o.indexOf(e);-1!==t&&o.splice(t,1)}},this.$getByHandle=function(e){return e?new n(e):i},e.forEach(function(e){n.prototype[e]=function(){var n,i,r=this.handle,a=arguments,s=0;return o.forEach(function(t){t.$$delegateHandle===r&&(s++,i=t[e].apply(t,a),1===s&&(n=i))}),s?n:t.warn('Delegate for handle "'+this.handle+'" could not find a corresponding element with delegate-handle="'+this.handle+'"! '+e+"() was not called!\nPossible cause: If you are calling "+e+'() immediately, and your element with delegate-handle="'+this.handle+'" is a child of your controller, then your element may not be compiled yet. Put a $timeout around your call to '+e+"() and try again.")},i[e]=function(){var t,n,i=arguments;return o.forEach(function(o,r){n=o[e].apply(o,i),0===r&&(t=n)}),t}})}]}function o(e){return["$ionicGesture","$parse",function(t,n){var i=e.substr(2).toLowerCase();return function(o,r,a){var s=n(a[e]),c=function(e){o.$apply(function(){s(o,{$event:e})})},l=t.on(i,c,r);o.$on("$destroy",function(){t.off(l,i,c)})}}]}function r(){return["$ionicScrollDelegate",function(e){return{restrict:"E",link:function(t,n,i){function o(t){for(var i=3,o=t.target;i--&&o;){if(o.classList.contains("button")||o.tagName.match(/input|textarea|select/i)||o.isContentEditable)return;o=o.parentNode}var r=t.gesture&&t.gesture.touches[0]||t.detail.touches[0],a=n[0].getBoundingClientRect();ionic.DomUtil.rectContains(r.pageX,r.pageY,a.left,a.top-20,a.left+a.width,a.top+a.height)&&e.scrollTop(!0)}"true"!=i.noTapScroll&&(ionic.on("tap",o,n[0]),t.$on("$destroy",function(){ionic.off("tap",o,n[0])}))}}}]}function a(e){return[function(){return{restrict:"E",compile:function(t){function n(t,n,i){var o=(new ionic.views.HeaderBar({el:n[0],alignTitle:i.alignTitle||"center"}),n[0]);e?(t.$watch(function(){return o.className},function(e){var n=-1===e.indexOf("ng-hide"),i=-1!==e.indexOf("bar-subheader");t.$hasHeader=n&&!i,t.$hasSubheader=n&&i}),t.$on("$destroy",function(){delete t.$hasHeader,delete t.$hasSubheader})):(t.$watch(function(){return o.className},function(e){var n=-1===e.indexOf("ng-hide"),i=-1!==e.indexOf("bar-subfooter");t.$hasFooter=n&&!i,t.$hasSubfooter=n&&i}),t.$on("$destroy",function(){delete t.$hasFooter,delete t.$hasSubfooter}),t.$watch("$hasTabs",function(e){n.toggleClass("has-tabs",!!e)}))}return t.addClass(e?"bar bar-header":"bar bar-footer"),{pre:n}}}}]}function s(e){return e.clientHeight}function c(e){e.stopPropagation()}var l={method:function(e,t,n){var i=!1;return function(){return i||(i=!0,t(e)),n.apply(this,arguments)}},field:function(e,t,n,i,o){var r=!1,a=function(){return r||(r=!0,t(e)),o},s=function(n){return r||(r=!0,t(e)),o=n,n};Object.defineProperty(n,i,{get:a,set:s,enumerable:!0})}},u=angular.module("ionic",["ngAnimate","ngSanitize","ui.router"]),d=angular.extend,h=angular.forEach,f=angular.isDefined,p=angular.isString,v=angular.element;u.factory("$ionicActionSheet",["$rootScope","$document","$compile","$animate","$timeout","$ionicTemplateLoader","$ionicPlatform",function(e,t,n,i,o,r,a){function s(r){var s=e.$new(!0);angular.extend(s,{cancel:angular.noop,destructiveButtonClicked:angular.noop,buttonClicked:angular.noop,$deregisterBackButton:angular.noop,buttons:[],cancelOnStateChange:!0},r||{});var c=s.element=n('<ion-action-sheet buttons="buttons"></ion-action-sheet>')(s),l=v(c[0].querySelector(".action-sheet-wrapper")),u=s.cancelOnStateChange?e.$on("$stateChangeSuccess",function(){s.cancel()}):angular.noop;return s.removeSheet=function(e){s.removed||(s.removed=!0,l.removeClass("action-sheet-up"),t[0].body.classList.remove("action-sheet-open"),s.$deregisterBackButton(),u(),i.removeClass(c,"active",function(){s.$destroy(),c.remove(),s.cancel.$scope=null,(e||angular.noop)()}))},s.showSheet=function(e){s.removed||(t[0].body.appendChild(c[0]),t[0].body.classList.add("action-sheet-open"),i.addClass(c,"active",function(){s.removed||(e||angular.noop)()}),o(function(){s.removed||l.addClass("action-sheet-up")},20,!1))},s.$deregisterBackButton=a.registerBackButtonAction(s.cancel,k),s.cancel=function(){s.removeSheet(r.cancel)},s.buttonClicked=function(e){r.buttonClicked(e,r.buttons[e])===!0&&s.removeSheet()},s.destructiveButtonClicked=function(){r.destructiveButtonClicked()===!0&&s.removeSheet()},s.showSheet(),s.cancel.$scope=s,s.cancel}return{show:s}}]),v.prototype.addClass=function(e){var t,n,i,o,r,a;if(e&&"ng-scope"!=e&&"ng-isolate-scope"!=e)for(t=0;t<this.length;t++)if(o=this[t],o.setAttribute)if(e.indexOf(" ")<0)o.classList.add(e);else{for(a=(" "+(o.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),r=e.split(" "),n=0;n<r.length;n++)i=r[n].trim(),-1===a.indexOf(" "+i+" ")&&(a+=i+" ");o.setAttribute("class",a.trim())}return this},v.prototype.removeClass=function(e){var t,n,i,o,r;if(e)for(t=0;t<this.length;t++)if(r=this[t],r.getAttribute)if(e.indexOf(" ")<0)r.classList.remove(e);else for(i=e.split(" "),n=0;n<i.length;n++)o=i[n],r.setAttribute("class",(" "+(r.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+o.trim()+" "," ").trim());return this},u.provider("$ionicAnimation",function(){var e=!1;this.setSlowAnimations=function(t){e=t},this.create=function(e){return ionic.Animation.create(e)},this.$get=[function(){return function(t){return t.useSlowAnimations=e,ionic.Animation.create(t)}}]}),u.factory("$ionicBackdrop",["$document",function(e){function t(){1===++r&&(o.addClass("visible"),ionic.requestAnimationFrame(function(){r&&o.addClass("active")}))}function n(){0===--r&&(o.removeClass("active"),setTimeout(function(){!r&&o.removeClass("visible")},100))}function i(){return o}var o=v('<div class="backdrop">'),r=0;return e[0].body.appendChild(o[0]),{retain:t,release:n,getElement:i,_element:o}}]),u.factory("$ionicBind",["$parse","$interpolate",function(e,t){var n=/^\s*([@=&])(\??)\s*(\w*)\s*$/;return function(i,o,r){h(r||{},function(r,a){var s,c,l=r.match(n)||[],u=l[3]||a,d=l[1];switch(d){case"@":if(!o[u])return;o.$observe(u,function(e){i[a]=e}),o[u]&&(i[a]=t(o[u])(i));break;case"=":if(!o[u])return;c=i.$watch(o[u],function(e){i[a]=e}),i.$on("$destroy",c);break;case"&":if(o[u]&&o[u].match(RegExp(a+"(.*?)")))throw new Error('& expression binding "'+a+'" looks like it will recursively call "'+o[u]+'" and cause a stack overflow! Please choose a different scopeName.');s=e(o[u]),i[a]=function(e){return s(i,e)}}})}}]),u.factory("$collectionDataSource",["$cacheFactory","$parse","$rootScope",function(i,o,r){function a(t){var n=this;if(this.scope=t.scope,this.transcludeFn=t.transcludeFn,this.transcludeParent=t.transcludeParent,this.keyExpr=t.keyExpr,this.listExpr=t.listExpr,this.trackByExpr=t.trackByExpr,this.heightGetter=t.heightGetter,this.widthGetter=t.widthGetter,this.dimensions=[],this.data=[],this.trackByExpr){var i=o(this.trackByExpr),r={$id:e};this.itemHashGetter=function(e,t){return r[n.keyExpr]=t,r.$index=e,i(n.scope,r)}}else this.itemHashGetter=function(t,n){return e(n)};this.attachedItems={},this.BACKUP_ITEMS_LENGTH=10,this.backupItemsArray=[]}return a.prototype={setup:function(){for(var e=0;e<this.BACKUP_ITEMS_LENGTH;e++)this.detachItem(this.createItem())},destroy:function(){this.dimensions.length=0,this.data=null,this.backupItemsArray.length=0,this.attachedItems={}},calculateDataDimensions:function(){var e={};this.dimensions=this.data.map(function(t,n){return e[this.keyExpr]=t,e.$index=n,{width:this.widthGetter(this.scope,e),height:this.heightGetter(this.scope,e)}},this)},createItem:function(){var e={};return e.scope=this.scope.$new(),this.transcludeFn(e.scope,function(t){t.css("position","absolute"),e.element=t}),this.transcludeParent.append(e.element),e},getItem:function(e){return window.AMOUNT=window.AMOUNT||0,(item=this.attachedItems[e])||((item=this.backupItemsArray.pop())?n(item.scope):(AMOUNT++,item=this.createItem())),item},attachItemAtIndex:function(e){var t=this.data[e],n=this.itemHashGetter(e,t),i=this.getItem(n);return(i.scope.$index!==e||i.scope[this.keyExpr]!==t)&&(i.scope[this.keyExpr]=t,i.scope.$index=e,i.scope.$first=0===e,i.scope.$last=e===this.getLength()-1,i.scope.$middle=!(i.scope.$first||i.scope.$last),i.scope.$odd=!(i.scope.$even=0===(1&e)),r.$$phase||i.scope.$digest()),i.hash=n,this.attachedItems[n]=i,i},destroyItem:function(e){e.element.remove(),e.scope.$destroy(),e.scope=null,e.element=null},detachItem:function(e){delete this.attachedItems[e.hash],this.backupItemsArray.length>=this.BACKUP_ITEMS_LENGTH?this.destroyItem(e):(this.backupItemsArray.push(e),e.element.css(ionic.CSS.TRANSFORM,"translate3d(-2000px,-2000px,0)"),t(e.scope))},getLength:function(){return this.data&&this.data.length||0},setData:function(e){this.data=e||[],this.calculateDataDimensions()}},a}]),u.factory("$collectionRepeatManager",["$rootScope","$timeout",function(){function e(e){function t(){return n.viewportSize}var n=this;this.dataSource=e.dataSource,this.element=e.element,this.scrollView=e.scrollView,this.isVertical=!!this.scrollView.options.scrollingY,this.renderedItems={},this.dimensions=[],this.setCurrentIndex(0),this.scrollView.__$callback=this.scrollView.__callback,this.scrollView.__callback=angular.bind(this,this.renderScroll),this.isVertical?(this.scrollView.options.getContentHeight=t,this.scrollValue=function(){return this.scrollView.__scrollTop},this.scrollMaxValue=function(){return this.scrollView.__maxScrollTop},this.scrollSize=function(){return this.scrollView.__clientHeight},this.secondaryScrollSize=function(){return this.scrollView.__clientWidth},this.transformString=function(e,t){return"translate3d("+t+"px,"+e+"px,0)"},this.primaryDimension=function(e){return e.height},this.secondaryDimension=function(e){return e.width}):(this.scrollView.options.getContentWidth=t,this.scrollValue=function(){return this.scrollView.__scrollLeft},this.scrollMaxValue=function(){return this.scrollView.__maxScrollLeft},this.scrollSize=function(){return this.scrollView.__clientWidth},this.secondaryScrollSize=function(){return this.scrollView.__clientHeight},this.transformString=function(e,t){return"translate3d("+e+"px,"+t+"px,0)"},this.primaryDimension=function(e){return e.width},this.secondaryDimension=function(e){return e.height})}return e.prototype={destroy:function(){this.renderedItems={},this.render=angular.noop,this.calculateDimensions=angular.noop,this.dimensions=[]},calculateDimensions:function(){var e,t=0,n=0,i=this.secondaryScrollSize();return this.dataSource.dimensions.map(function(o){var r={primarySize:this.primaryDimension(o),secondarySize:Math.min(this.secondaryDimension(o),i)};return e&&(n+=e.secondarySize,e.primaryPos===t&&n+r.secondarySize>i&&(n=0,t+=e.primarySize)),r.primaryPos=t,r.secondaryPos=n,e=r,r},this)},resize:function(){this.dimensions=this.calculateDimensions();var e=this.dimensions[this.dimensions.length-1];this.viewportSize=e?e.primaryPos+e.primarySize:0,this.setCurrentIndex(0),this.render(!0),this.dataSource.backupItemsArray.length||this.dataSource.setup()},setCurrentIndex:function(e){var t=(this.dimensions[e]||{}).primaryPos||0;this.currentIndex=e,this.hasPrevIndex=e>0,this.hasPrevIndex&&(this.previousPos=Math.max(t-this.dimensions[e-1].primarySize,this.dimensions[e-1].primaryPos)),this.hasNextIndex=e+1<this.dataSource.getLength(),this.hasNextIndex&&(this.nextPos=Math.min(t+this.dimensions[e+1].primarySize,this.dimensions[e+1].primaryPos))},renderScroll:ionic.animationFrameThrottle(function(e,t,n,i){return this.renderIfNeeded(this.isVertical?t:e),this.scrollView.__$callback(e,t,n,i)}),renderIfNeeded:function(e){(this.hasNextIndex&&e>=this.nextPos||this.hasPrevIndex&&e<this.previousPos)&&this.render()},getIndexForScrollValue:function(e,t){var n;if(t<=this.dimensions[e].primaryPos)for(;(n=this.dimensions[e-1])&&n.primaryPos>t;)e--;else for(;(n=this.dimensions[e+1])&&n.primaryPos<t;)e++;return e},render:function(e){var t,n=this.currentIndex>=this.dataSource.getLength();if(n||e){for(t in this.renderedItems)this.removeItem(t);if(n)return}for(var i,o=this.scrollValue(),r=this.scrollSize(),a=r+o,s=this.getIndexForScrollValue(this.currentIndex,o),c=Math.max(s-1,0);c>0&&(i=this.dimensions[c])&&i.primaryPos===this.dimensions[s-1].primaryPos;)c--;for(t=c;(i=this.dimensions[t])&&i.primaryPos-i.primarySize<a;)this.renderItem(t,i.primaryPos,i.secondaryPos),t++;var l=t-1;for(t in this.renderedItems)(c>t||t>l)&&this.removeItem(t);this.setCurrentIndex(s)},renderItem:function(e,t,n){var i=this.dataSource.attachItemAtIndex(e);i&&i.element?((i.primaryPos!==t||i.secondaryPos!==n)&&(i.element.css(ionic.CSS.TRANSFORM,this.transformString(t,n)),i.primaryPos=t,i.secondaryPos=n),this.renderedItems[e]=i):delete this.renderedItems[e]},removeItem:function(e){var t=this.renderedItems[e];t&&(t.primaryPos=t.secondaryPos=null,this.dataSource.detachItem(t),delete this.renderedItems[e])}},e}]),u.factory("$ionicGesture",[function(){return{on:function(e,t,n){return window.ionic.onGesture(e,t,n[0])},off:function(e,t,n){return window.ionic.offGesture(e,t,n)}}}]);var g='<div class="loading"></div>',m="$ionicLoading instance.hide() has been deprecated. Use $ionicLoading.hide().",$="$ionicLoading instance.show() has been deprecated. Use $ionicLoading.show().",w="$ionicLoading instance.setContent() has been deprecated. Use $ionicLoading.show({ template: 'my content' }).";u.factory("$ionicLoading",["$document","$ionicTemplateLoader","$ionicBackdrop","$timeout","$q","$log","$compile","$ionicPlatform",function(e,t,n,i,o,r,a,s){function c(){return h||(h=t.compile({template:g,appendTo:e[0].body}).then(function(e){var r=e;return e.show=function(e){var s=e.templateUrl?t.load(e.templateUrl):o.when(e.template||e.content||"");this.isShown||(this.hasBackdrop=!e.noBackdrop&&e.showBackdrop!==!1,this.hasBackdrop&&(n.retain(),n.getElement().addClass("backdrop-loading"))),e.duration&&(i.cancel(this.durationTimeout),this.durationTimeout=i(angular.bind(this,this.hide),+e.duration)),s.then(function(e){e&&(r.element.html(e),a(r.element.contents())(r.scope)),r.isShown&&(r.element.addClass("visible"),ionic.DomUtil.centerElementByMarginTwice(r.element[0]),ionic.requestAnimationFrame(function(){r.isShown&&r.element.addClass("active"),ionic.DomUtil.centerElementByMarginTwice(r.element[0])}))}),this.isShown=!0},e.hide=function(){this.isShown&&(this.hasBackdrop&&(n.release(),n.getElement().removeClass("backdrop-loading")),r.element.removeClass("active"),setTimeout(function(){!r.isShown&&r.element.removeClass("visible")},200)),i.cancel(this.durationTimeout),this.isShown=!1},e})),h}function u(e){e||(e={});var t=e.delay||e.showDelay||0;return p&&i.cancel(p),p=i(angular.noop,t),p.then(c).then(function(t){return f(),f=s.registerBackButtonAction(angular.noop,C),t.show(e)}),{hide:l.method(m,r.error,d),show:l.method($,r.error,function(){u(e)}),setContent:l.method(w,r.error,function(e){c().then(function(t){t.show({template:e})})})}}function d(){f(),i.cancel(p),c().then(function(e){e.hide()})}var h,f=angular.noop,p=o.when();return{show:u,hide:d,_getLoader:c}}]),u.factory("$ionicModal",["$rootScope","$document","$compile","$timeout","$ionicPlatform","$ionicTemplateLoader","$q","$log",function(e,t,n,i,o,r,a,s){var c=ionic.views.Modal.inherit({initialize:function(e){ionic.views.Modal.prototype.initialize.call(this,e),this.animation=e.animation||"slide-in-up"},show:function(){var e=this;if(e.scope.$$destroyed)return void s.error("Cannot call modal.show() after remove(). Please create a new modal instance using $ionicModal.");var n=v(e.modalEl);return e.el.classList.remove("hide"),i(function(){t[0].body.classList.add("modal-open")},400),e.el.parentElement||(n.addClass(e.animation),t[0].body.appendChild(e.el)),n.addClass("ng-enter active").removeClass("ng-leave ng-leave-active"),e._isShown=!0,e._deregisterBackButton=o.registerBackButtonAction(e.hardwareBackButtonClose?angular.bind(e,e.hide):angular.noop,S),e._isOpenPromise=a.defer(),ionic.views.Modal.prototype.show.call(e),i(function(){n.addClass("ng-enter-active"),e.scope.$parent&&e.scope.$parent.$broadcast("modal.shown",e),e.el.classList.add("active")},20),i(function(){e.$el.on("click",function(t){e.backdropClickToClose&&t.target===e.el&&e.hide()})},400)},hide:function(){var e=this,n=v(e.modalEl);return e.el.classList.remove("active"),n.addClass("ng-leave"),i(function(){n.addClass("ng-leave-active").removeClass("ng-enter ng-enter-active active")},20),e.$el.off("click"),e._isShown=!1,e.scope.$parent&&e.scope.$parent.$broadcast("modal.hidden",e),e._deregisterBackButton&&e._deregisterBackButton(),ionic.views.Modal.prototype.hide.call(e),i(function(){t[0].body.classList.remove("modal-open"),e.el.classList.add("hide")},500)},remove:function(){var e=this;return e.scope.$parent&&e.scope.$parent.$broadcast("modal.removed",e),e.hide().then(function(){e.scope.$destroy(),e.$el.remove()})},isShown:function(){return!!this._isShown}}),l=function(t,i){var o=i.scope&&i.scope.$new()||e.$new(!0);d(o,{$hasHeader:!1,$hasSubheader:!1,$hasFooter:!1,$hasSubfooter:!1,$hasTabs:!1,$hasTabsTop:!1});var r=n("<ion-modal>"+t+"</ion-modal>")(o);i.$el=r,i.el=r[0],i.modalEl=i.el.querySelector(".modal");var a=new c(i);return a.scope=o,i.scope||(o.modal=a),a};return{fromTemplate:function(e,t){var n=l(e,t||{});return n},fromTemplateUrl:function(e,t,n){var i;return angular.isFunction(t)&&(i=t,t=n),r.load(e).then(function(e){var n=l(e,t||{});return i&&i(n),n})}}}]),u.service("$ionicNavBarDelegate",i(["back","align","showBackButton","showBar","setTitle","changeTitle","getTitle","getPreviousTitle"]));var b=100,y=150,S=200,k=300,I=400,C=500;u.constant("$ionicPlatformDefaults",{ios:{$ionicNavBarConfig:{transition:"nav-title-slide-ios7",alignTitle:"center",backButtonIcon:"ion-ios7-arrow-back"},$ionicNavViewConfig:{transition:"slide-left-right-ios7"},$ionicTabsConfig:{type:"",position:""}},android:{$ionicNavBarConfig:{transition:"nav-title-slide-ios7",alignTitle:"center",backButtonIcon:"ion-ios7-arrow-back"},$ionicNavViewConfig:{transition:"slide-left-right-ios7"},$ionicTabsConfig:{type:"tabs-striped",position:""}}}),u.config(["$ionicPlatformDefaults","$injector",function(e,t){var n=ionic.Platform.platform(),i=function(e){h(e,function(e,n){d(t.get(n),e)})};switch(n){case"ios":i(e.ios);break;case"android":i(e.android)}}]),u.provider("$ionicPlatform",function(){return{$get:["$q","$rootScope",function(e){var t={onHardwareBackButton:function(e){ionic.Platform.ready(function(){document.addEventListener("backbutton",e,!1)})},offHardwareBackButton:function(e){ionic.Platform.ready(function(){document.removeEventListener("backbutton",e)})},$backButtonActions:{},registerBackButtonAction:function(e,n,i){t._hasBackButtonHandler||(t.$backButtonActions={},t.onHardwareBackButton(t.hardwareBackButtonClick),t._hasBackButtonHandler=!0);var o={id:i?i:ionic.Utils.nextUid(),priority:n?n:0,fn:e};return t.$backButtonActions[o.id]=o,function(){delete t.$backButtonActions[o.id]}},hardwareBackButtonClick:function(e){var n,i;for(i in t.$backButtonActions)(!n||t.$backButtonActions[i].priority>=n.priority)&&(n=t.$backButtonActions[i]);return n?(n.fn(e),n):void 0},is:function(e){return ionic.Platform.is(e)},ready:function(t){var n=e.defer();return ionic.Platform.ready(function(){n.resolve(),t&&t()}),n.promise}};return t}]}});var T='<div class="popup"><div class="popup-head"><h3 class="popup-title" ng-bind-html="title"></h3><h5 class="popup-sub-title" ng-bind-html="subTitle" ng-if="subTitle"></h5></div><div class="popup-body"></div><div class="popup-buttons row"><button ng-repeat="button in buttons" ng-click="$buttonTapped(button, $event)" class="button col" ng-class="button.type || \'button-default\'" ng-bind-html="button.text"></button></div></div>';u.factory("$ionicPopup",["$ionicTemplateLoader","$ionicBackdrop","$q","$timeout","$rootScope","$document","$compile","$ionicPlatform",function(e,t,n,i,o,r,a,s){function c(t){t=d({scope:null,title:"",buttons:[]},t||{});var o=e.compile({template:T,scope:t.scope&&t.scope.$new(),appendTo:r[0].body}),s=t.templateUrl?e.load(t.templateUrl):n.when(t.template||t.content||"");return n.all([o,s]).then(function(e){var o=e[0],r=e[1],s=n.defer();o.responseDeferred=s;var c=v(o.element[0].querySelector(".popup-body"));return r?(c.html(r),a(c.contents())(o.scope)):c.remove(),d(o.scope,{title:t.title,buttons:t.buttons,subTitle:t.subTitle,$buttonTapped:function(e,t){var n=(e.onTap||angular.noop)(t);t=t.originalEvent||t,t.defaultPrevented||s.resolve(n)}}),o.show=function(){o.isShown||(o.isShown=!0,ionic.requestAnimationFrame(function(){o.isShown&&(o.element[0].offsetHeight>window.innerHeight-20&&(o.element[0].style.height=window.innerHeight-20+"px",popupBody=o.element[0].querySelectorAll(".popup-body"),popupHead=o.element[0].querySelectorAll(".popup-head"),popupButtons=o.element[0].querySelectorAll(".popup-buttons"),o.element.addClass("popup-tall"),newHeight=window.innerHeight-popupHead[0].offsetHeight-popupButtons[0].offsetHeight-20,popupBody[0].style.height=newHeight+"px"),o.element.removeClass("popup-hidden"),o.element.addClass("popup-showing active"),ionic.DomUtil.centerElementByMarginTwice(o.element[0]),h(o.element))}))},o.hide=function(e){return e=e||angular.noop,o.isShown?(o.isShown=!1,o.element.removeClass("active"),o.element.addClass("popup-hidden"),void i(e,250)):e()},o.remove=function(){o.removed||(o.hide(function(){o.element.remove(),o.scope.$destroy()}),o.removed=!0)},o})}function l(){$[0]&&$[0].responseDeferred.resolve()}function u(e){function n(e){o.then(function(t){t.removed||t.responseDeferred.resolve(e)})}var o=w._createPopup(e),r=$[0];r&&r.hide();var a=i(angular.noop,r?m.stackPushDelay:0).then(function(){return o}).then(function(e){return r||(document.body.classList.add("popup-open"),t.retain(),w._backButtonActionDone=s.registerBackButtonAction(l,I)),$.unshift(e),e.show(),e.responseDeferred.notify({close:a.close}),e.responseDeferred.promise.then(function(n){var i=$.indexOf(e);-1!==i&&$.splice(i,1),e.remove();var o=$[0];return o?o.show():(document.body.classList.remove("popup-open"),t.release(),(w._backButtonActionDone||angular.noop)()),n})});return a.close=n,a}function h(e){var t=e[0].querySelector("input[autofocus]");if(!t&&(t=e[0].querySelector("input"),!t)){var n=e[0].querySelectorAll("button");t=n[n.length-1]}t&&t.focus()}function f(e){return u(d({buttons:[{text:e.okText||"OK",type:e.okType||"button-positive",onTap:function(){return!0}}]},e||{}))}function p(e){return u(d({buttons:[{text:e.cancelText||"Cancel",type:e.cancelType||"button-default",onTap:function(){return!1}},{text:e.okText||"OK",type:e.okType||"button-positive",onTap:function(){return!0}}]},e||{}))}function g(e){var t=o.$new(!0);return t.data={},u(d({template:'<input ng-model="data.response" type="'+(e.inputType||"text")+'" placeholder="'+(e.inputPlaceholder||"")+'">',scope:t,buttons:[{text:e.cancelText||"Cancel",type:e.cancelType||"button-default",onTap:function(){}},{text:e.okText||"OK",type:e.okType||"button-positive",onTap:function(){return t.data.response||""}}]},e||{}))}var m={stackPushDelay:50},$=[],w={show:u,alert:f,confirm:p,prompt:g,_createPopup:c,_popupStack:$};return w}]),u.service("$ionicScrollDelegate",i(["resize","scrollTop","scrollBottom","scrollTo","scrollBy","getScrollPosition","anchorScroll","getScrollView","rememberScrollPosition","forgetScrollPosition","scrollToRememberedPosition"])),u.service("$ionicSideMenuDelegate",i(["toggleLeft","toggleRight","getOpenRatio","isOpen","isOpenLeft","isOpenRight","canDragContent"])),u.service("$ionicSlideBoxDelegate",i(["update","slide","enableSlide","previous","next","stop","start","currentIndex","slidesCount"])),u.service("$ionicTabsDelegate",i(["select","selectedIndex"])),u.factory("$ionicTemplateLoader",["$compile","$controller","$http","$q","$rootScope","$templateCache",function(e,t,n,i,o,r){function a(e){return n.get(e,{cache:r}).then(function(e){return e.data&&e.data.trim()})}function s(n){n=d({template:"",templateUrl:"",scope:null,controller:null,locals:{},appendTo:null},n||{});var r=n.templateUrl?this.load(n.templateUrl):i.when(n.template);return r.then(function(i){var r,a=n.scope||o.$new(),s=v("<div>").html(i).contents();return n.controller&&(r=t(n.controller,d(n.locals,{$scope:a})),s.children().data("$ngControllerController",r)),n.appendTo&&v(n.appendTo).append(s),e(s)(a),{element:s,scope:a}})}return{load:a,compile:s}}]),u.run(["$rootScope","$state","$location","$document","$animate","$ionicPlatform","$ionicViewService",function(e,t,n,i,o,r,a){function s(t){return e.$viewHistory.backView?e.$viewHistory.backView.go():ionic.Platform.exitApp(),t.preventDefault(),!1}e.$viewHistory={histories:{root:{historyId:"root",parentHistoryId:null,stack:[],cursor:-1}},views:{},backView:null,forwardView:null,currentView:null,disabledRegistrableTagNames:[]},a.disableRegisterByTagName&&(a.disableRegisterByTagName("ion-tabs"),a.disableRegisterByTagName("ion-side-menus")),e.$on("viewState.changeHistory",function(i,o){if(o){var r=o.historyId?e.$viewHistory.histories[o.historyId]:null;if(r&&r.cursor>-1&&r.cursor<r.stack.length){var a=r.stack[r.cursor];return a.go(o)}!o.url&&o.uiSref&&(o.url=t.href(o.uiSref)),o.url&&(0===o.url.indexOf("#")&&(o.url=o.url.replace("#","")),o.url!==n.url()&&n.url(o.url))}}),e.$on("viewState.viewEnter",function(e,t){t&&t.title&&(i[0].title=t.title)}),r.registerBackButtonAction(s,b)}]).factory("$ionicViewService",["$rootScope","$state","$location","$window","$injector","$animate","$ionicNavViewConfig",function(e,t,n,i,o,r,a){function s(){return ionic.Utils.nextUid()}var c=function(){};return c.prototype.initialize=function(e){if(e){for(var t in e)this[t]=e[t];return this}return null},c.prototype.go=function(){return this.stateName?t.go(this.stateName,this.stateParams):this.url&&this.url!==n.url()?e.$viewHistory.backView===this?i.history.go(-1):e.$viewHistory.forwardView===this?i.history.go(1):void n.url(this.url):null},c.prototype.destroy=function(){this.scope&&(this.scope.$destroy&&this.scope.$destroy(),this.scope=null)},{register:function(t,i){var o=e.$viewHistory,r=this.getCurrentStateId(),a=this._getHistory(t),c=o.currentView,l=o.backView,u=o.forwardView,d=this.nextViewOptions(),h={viewId:null,navAction:null,navDirection:null,historyId:a.historyId};if(i&&!this.isTagNameRegistrable(i))return h.navAction="disabledByTagName",h;if(c&&c.stateId===r&&c.historyId===a.historyId)return h.navAction="noChange",h;if(o.forcedNav)ionic.Utils.extend(h,o.forcedNav),e.$viewHistory.forcedNav=null;else if(l&&l.stateId===r)h.viewId=l.viewId,h.navAction="moveBack",h.viewId=l.viewId,l.historyId===c.historyId&&(h.navDirection="back");else if(u&&u.stateId===r){h.viewId=u.viewId,h.navAction="moveForward",u.historyId===c.historyId&&(h.navDirection="forward");var f=this._getParentHistoryObj(t);u.historyId&&f.scope&&(f.scope.$historyId=u.historyId,h.historyId=u.historyId)}else if(c&&c.historyId!==a.historyId&&a.cursor>-1&&a.stack.length>0&&a.cursor<a.stack.length&&a.stack[a.cursor].stateId===r)h.viewId=a.stack[a.cursor].viewId,h.navAction="moveBack";else{if(h.viewId=s(r),c){if(c.forwardViewId=h.viewId,a.historyId===c.historyId&&(h.navDirection="forward"),h.navAction="newView",u&&c.stateId!==u.stateId){var p=this._getHistoryById(u.historyId);if(p)for(var v=p.stack.length-1;v>=u.index;v--)p.stack[v].destroy(),p.stack.splice(v)}}else h.navAction="initialView";o.views[h.viewId]=this.createView({viewId:h.viewId,index:a.stack.length,historyId:a.historyId,backViewId:c&&c.viewId?c.viewId:null,forwardViewId:null,stateId:r,stateName:this.getCurrentStateName(),stateParams:this.getCurrentStateParams(),url:n.url()}),"moveBack"==h.navAction&&e.$emit("$viewHistory.viewBack",c.viewId,h.viewId),a.stack.push(o.views[h.viewId])}return d&&(d.disableAnimate&&(h.navDirection=null),d.disableBack&&(o.views[h.viewId].backViewId=null),this.nextViewOptions(null)),this.setNavViews(h.viewId),a.cursor=o.currentView.index,h},setNavViews:function(t){var n=e.$viewHistory;n.currentView=this._getViewById(t),n.backView=this._getBackView(n.currentView),n.forwardView=this._getForwardView(n.currentView),e.$broadcast("$viewHistory.historyChange",{showBack:n.backView&&n.backView.historyId===n.currentView.historyId})},registerHistory:function(e){e.$historyId=ionic.Utils.nextUid()},createView:function(e){var t=new c;return t.initialize(e)},getCurrentView:function(){return e.$viewHistory.currentView},getBackView:function(){return e.$viewHistory.backView},getForwardView:function(){return e.$viewHistory.forwardView},getNavDirection:function(){return e.$viewHistory.navDirection},getCurrentStateName:function(){return t&&t.current?t.current.name:null},isCurrentStateNavView:function(e){return t&&t.current&&t.current.views&&t.current.views[e]?!0:!1},getCurrentStateParams:function(){var e;if(t&&t.params)for(var n in t.params)t.params.hasOwnProperty(n)&&(e=e||{},e[n]=t.params[n]);return e},getCurrentStateId:function(){var e;if(t&&t.current&&t.current.name){if(e=t.current.name,t.params)for(var n in t.params)t.params.hasOwnProperty(n)&&t.params[n]&&(e+="_"+n+"="+t.params[n]);return e}return ionic.Utils.nextUid()},goToHistoryRoot:function(t){if(t){var n=e.$viewHistory.histories[t];if(n&&n.stack.length){if(e.$viewHistory.currentView&&e.$viewHistory.currentView.viewId===n.stack[0].viewId)return;e.$viewHistory.forcedNav={viewId:n.stack[0].viewId,navAction:"moveBack",navDirection:"back"},n.stack[0].go()}}},_getViewById:function(t){return t?e.$viewHistory.views[t]:null},_getBackView:function(e){return e?this._getViewById(e.backViewId):null},_getForwardView:function(e){return e?this._getViewById(e.forwardViewId):null},_getHistoryById:function(t){return t?e.$viewHistory.histories[t]:null},_getHistory:function(t){var n=this._getParentHistoryObj(t);return e.$viewHistory.histories[n.historyId]||(e.$viewHistory.histories[n.historyId]={historyId:n.historyId,parentHistoryId:this._getParentHistoryObj(n.scope.$parent).historyId,stack:[],cursor:-1}),e.$viewHistory.histories[n.historyId]},_getParentHistoryObj:function(t){for(var n=t;n;){if(n.hasOwnProperty("$historyId"))return{historyId:n.$historyId,scope:n};n=n.$parent}return{historyId:"root",scope:e}},nextViewOptions:function(e){return arguments.length?void(this._nextOpts=e):this._nextOpts},getRenderer:function(e,t,n){function i(e){for(var t="";!t&&e;)t=e.getAttribute("animation"),e=e.parentElement;return t?t:a.transition}function o(){u&&e[0].classList.add(u),"back"===s.navDirection?e[0].classList.add("reverse"):e[0].classList.remove("reverse")}var s,c,l=this,u=i(e[0]);return function(t){return{enter:function(n){return c&&t?(o(),n.addClass("ng-enter"),document.body.classList.add("disable-pointer-events"),void r.enter(n,e,null,function(){document.body.classList.remove("disable-pointer-events"),u&&e[0].classList.remove(u)})):void e.append(n)},leave:function(){var n=e.contents();return c&&t?(o(),void r.leave(n,function(){n.remove()})):void n.remove()},register:function(e){return s=l.register(n,e),c=null!==u&&null!==s.navDirection,s}}}},disableRegisterByTagName:function(t){e.$viewHistory.disabledRegistrableTagNames.push(t.toUpperCase())},isTagNameRegistrable:function(t){var n,i,o=e.$viewHistory.disabledRegistrableTagNames;for(n=0;n<t.length;n++)if(1===t[n].nodeType)for(i=0;i<o.length;i++)if(t[n].tagName===o[i])return!1;return!0},clearHistory:function(){var t=e.$viewHistory.histories,n=e.$viewHistory.currentView; for(var i in t)t[i].stack&&(t[i].stack=[],t[i].cursor=-1),n.historyId===i?(n.backViewId=null,n.forwardViewId=null,t[i].stack.push(n)):t[i].destroy&&t[i].destroy();for(var o in e.$viewHistory.views)o!==n.viewId&&delete e.$viewHistory.views[o];this.setNavViews(n.viewId)}}}]),u.config(["$provide",function(e){function t(e,t){return e.__hash=e.hash,e.hash=function(n){return angular.isDefined(n)&&t(function(){var e=document.querySelector(".scroll-content");e&&(e.scrollTop=0)},0,!1),e.__hash(n)},e}e.decorator("$location",["$delegate","$timeout",t])}]),u.service("$ionicListDelegate",i(["showReorder","showDelete","canSwipeItems","closeOptionButtons"])).controller("$ionicList",["$scope","$attrs","$parse","$ionicListDelegate",function(e,t,n,i){var o=!0,r=!1,a=!1,s=i._registerInstance(this,t.delegateHandle);e.$on("$destroy",s),this.showReorder=function(e){return arguments.length&&(r=!!e),r},this.showDelete=function(e){return arguments.length&&(a=!!e),a},this.canSwipeItems=function(e){return arguments.length&&(o=!!e),o},this.closeOptionButtons=function(){this.listView&&this.listView.clearDragEffects()}}]),u.controller("$ionicNavBar",["$scope","$element","$attrs","$ionicViewService","$animate","$compile","$ionicNavBarDelegate",function(e,t,n,i,o,r,a){t.parent().data("$ionNavBarController",this);var s=a._registerInstance(this,n.delegateHandle);e.$on("$destroy",s);var c=this;this.leftButtonsElement=v(t[0].querySelector(".buttons.left-buttons")),this.rightButtonsElement=v(t[0].querySelector(".buttons.right-buttons")),this.back=function(){var e=i.getBackView();return e&&e.go(),!1},this.align=function(e){this._headerBarView.align(e)},this.showBackButton=function(t){return arguments.length&&(e.backButtonShown=!!t),!(!e.hasBackButton||!e.backButtonShown)},this.showBar=function(t){return arguments.length&&(e.isInvisible=!t,e.$parent.$hasHeader=!!t),!e.isInvisible},this.setTitle=function(t){e.title!==t&&(e.oldTitle=e.title,e.title=t||"")},this.changeTitle=function(t,n){return e.title===t?!1:(this.setTitle(t),e.isReverse="back"==n,e.shouldAnimate=!!n,e.shouldAnimate?this._animateTitles():this._headerBarView.align(),!0)},this.getTitle=function(){return e.title||""},this.getPreviousTitle=function(){return e.oldTitle||""},this._animateTitles=function(){var n,i,a;a=t[0].querySelectorAll(".title"),a.length&&(n=r('<h1 class="title" ng-bind-html="oldTitle"></h1>')(e),v(a[0]).replaceWith(n)),i=r('<h1 class="title invisible" ng-bind-html="title"></h1>')(e),ionic.requestAnimationFrame(function(){n&&o.leave(v(n));var r=n&&v(n)||null;o.enter(i,t,r,function(){c._headerBarView.align()}),h(a,function(e){e&&e.parentNode&&v(e).remove()}),e.$digest(),ionic.requestAnimationFrame(function(){i[0].classList.remove("invisible")})})}}]),u.factory("$$scrollValueCache",function(){return{}}).controller("$ionicScroll",["$scope","scrollViewOptions","$timeout","$window","$$scrollValueCache","$location","$rootScope","$document","$ionicScrollDelegate",function(e,t,n,i,o,r,a,s,c){var l=this;this._scrollViewOptions=t;var u=this.element=t.el,d=this.$element=v(u),h=this.scrollView=new ionic.views.Scroll(t);(d.parent().length?d.parent():d).data("$$ionicScrollController",this);var f=c._registerInstance(this,t.delegateHandle);angular.isDefined(t.bouncing)||ionic.Platform.ready(function(){h.options.bouncing=!0,ionic.Platform.isAndroid()&&(h.options.bouncing=!1,h.options.deceleration=.95)});var p=angular.bind(h,h.resize);ionic.on("resize",p,i);var g=angular.noop;e.$on("$destroy",function(){f(),h.__removeEventHandlers(),ionic.off("resize",p,i),i.removeEventListener("resize",p),g(),l._rememberScrollId&&(o[l._rememberScrollId]=h.getValues())}),d.on("scroll",function(t){var n=(t.originalEvent||t).detail||{};e.$onScroll&&e.$onScroll({event:t,scrollTop:n.scrollTop||0,scrollLeft:n.scrollLeft||0})}),e.$on("$viewContentLoaded",function(t,i){if(!t.defaultPrevented){t.preventDefault();var o=i&&i.viewId||e.$historyId;o&&n(function(){l.rememberScrollPosition(o),l.scrollToRememberedPosition(),g=a.$on("$viewHistory.viewBack",function(e,t){o===t&&l.forgetScrollPosition()})},0,!1)}}),n(function(){h.run()}),this._rememberScrollId=null,this.getScrollView=function(){return this.scrollView},this.getScrollPosition=function(){return this.scrollView.getValues()},this.resize=function(){return n(p)},this.scrollTop=function(e){this.resize().then(function(){h.scrollTo(0,0,!!e)})},this.scrollBottom=function(e){this.resize().then(function(){var t=h.getScrollMax();h.scrollTo(t.left,t.top,!!e)})},this.scrollTo=function(e,t,n){this.resize().then(function(){h.scrollTo(e,t,!!n)})},this.scrollBy=function(e,t,n){this.resize().then(function(){h.scrollBy(e,t,!!n)})},this.anchorScroll=function(e){this.resize().then(function(){var t=r.hash(),n=t&&s[0].getElementById(t);if(t&&n){var i=ionic.DomUtil.getPositionInParent(n,l.$element);h.scrollTo(i.left,i.top,!!e)}else h.scrollTo(0,0,!!e)})},this.rememberScrollPosition=function(e){if(!e)throw new Error("Must supply an id to remember the scroll by!");this._rememberScrollId=e},this.forgetScrollPosition=function(){delete o[this._rememberScrollId],this._rememberScrollId=null},this.scrollToRememberedPosition=function(e){var t=o[this._rememberScrollId];t&&this.resize().then(function(){h.scrollTo(+t.left,+t.top,e)})},this._setRefresher=function(e,t){var n=this.refresher=t,i=l.refresher.clientHeight||0;h.activatePullToRefresh(i,function(){n.classList.add("active"),e.$onPulling()},function(){n.classList.remove("refreshing"),n.classList.remove("active")},function(){n.classList.add("refreshing"),e.$onRefresh()})}}]),u.controller("$ionicSideMenus",["$scope","$attrs","$ionicSideMenuDelegate","$ionicPlatform",function(e,t,n,i){var o=this;d(this,ionic.controllers.SideMenuController.prototype),this.$scope=e,ionic.controllers.SideMenuController.call(this,{left:{width:275},right:{width:275}}),this.canDragContent=function(t){return arguments.length&&(e.dragContent=!!t),e.dragContent},this.isDraggableTarget=function(t){return e.dragContent&&!t.gesture.srcEvent.defaultPrevented&&!t.target.tagName.match(/input|textarea|select|object|embed/i)&&!t.target.isContentEditable&&!(t.target.dataset?t.target.dataset.preventScroll:"true"==t.target.getAttribute("data-prevent-default"))},e.sideMenuContentTranslateX=0;var r=angular.noop,a=angular.bind(this,this.close);e.$watch(function(){return 0!==o.getOpenAmount()},function(e){r(),e&&(r=i.registerBackButtonAction(a,y))});var s=n._registerInstance(this,t.delegateHandle);e.$on("$destroy",function(){s(),r()})}]),u.controller("$ionicTab",["$scope","$ionicViewService","$attrs","$location","$state",function(e,t,n,i,o){this.$scope=e,this.hrefMatchesState=function(){return n.href&&0===i.path().indexOf(n.href.replace(/^#/,"").replace(/\/$/,""))},this.srefMatchesState=function(){return n.uiSref&&o.includes(n.uiSref.split("(")[0])},this.navNameMatchesState=function(){return this.navViewName&&t.isCurrentStateNavView(this.navViewName)},this.tabMatchesState=function(){return this.hrefMatchesState()||this.srefMatchesState()||this.navNameMatchesState()}}]),u.controller("$ionicTabs",["$scope","$ionicViewService","$element",function(e,t){var n=null,i=this;i.tabs=[],i.selectedIndex=function(){return i.tabs.indexOf(n)},i.selectedTab=function(){return n},i.add=function(e){t.registerHistory(e),i.tabs.push(e),1===i.tabs.length&&i.select(e)},i.remove=function(e){var t=i.tabs.indexOf(e);if(-1!==t){if(e.$tabSelected)if(i.deselect(e),1===i.tabs.length);else{var n=t===i.tabs.length-1?t-1:t+1;i.select(i.tabs[n])}i.tabs.splice(t,1)}},i.deselect=function(e){e.$tabSelected&&(n=null,e.$tabSelected=!1,(e.onDeselect||angular.noop)())},i.select=function(o,r){var a;if(angular.isNumber(o)?(a=o,o=i.tabs[a]):a=i.tabs.indexOf(o),!o||-1==a)throw new Error('Cannot select tab "'+a+'"!');if(n&&n.$historyId==o.$historyId)r&&t.goToHistoryRoot(o.$historyId);else if(h(i.tabs,function(e){i.deselect(e)}),n=o,o.$tabSelected=!0,(o.onSelect||angular.noop)(),r){var s={type:"tab",tabIndex:a,historyId:o.$historyId,navViewName:o.navViewName,hasNavView:!!o.navViewName,title:o.title,url:o.href,uiSref:o.uiSref};e.$emit("viewState.changeHistory",s)}}}]),u.directive("ionActionSheet",["$document",function(e){return{restrict:"E",scope:!0,replace:!0,link:function(t,n){var i=function(e){27==e.which&&(t.cancel(),t.$apply())},o=function(e){e.target==n[0]&&(t.cancel(),t.$apply())};t.$on("$destroy",function(){n.remove(),e.unbind("keyup",i)}),e.bind("keyup",i),n.bind("click",o)},template:'<div class="action-sheet-backdrop"><div class="action-sheet-wrapper"><div class="action-sheet"><div class="action-sheet-group"><div class="action-sheet-title" ng-if="titleText" ng-bind-html="titleText"></div><button class="button" ng-click="buttonClicked($index)" ng-repeat="button in buttons" ng-bind-html="button.text"></button></div><div class="action-sheet-group" ng-if="destructiveText"><button class="button destructive" ng-click="destructiveButtonClicked()" ng-bind-html="destructiveText"></button></div><div class="action-sheet-group" ng-if="cancelText"><button class="button" ng-click="cancel()" ng-bind-html="cancelText"></button></div></div></div></div>'}}]),u.directive("ionCheckbox",function(){return{restrict:"E",replace:!0,require:"?ngModel",transclude:!0,template:'<label class="item item-checkbox"><div class="checkbox checkbox-input-hidden disable-pointer-events"><input type="checkbox"><i class="checkbox-icon"></i></div><div class="item-content disable-pointer-events" ng-transclude></div></label>',compile:function(e,t){var n=e.find("input");h({name:t.name,"ng-value":t.ngValue,"ng-model":t.ngModel,"ng-checked":t.ngChecked,"ng-disabled":t.ngDisabled,"ng-true-value":t.ngTrueValue,"ng-false-value":t.ngFalseValue,"ng-change":t.ngChange},function(e,t){f(e)&&n.attr(t,e)})}}});var x="Cannot create a collection-repeat within a scrollView that is scrollable on both x and y axis. Choose either x direction or y direction.",B="collection-repeat expected attribute collection-item-height to be a an expression that returns a number (in pixels) or percentage.",V="collection-repeat expected attribute collection-item-width to be a an expression that returns a number (in pixels) or percentage.",_="collection-repeat expected expression in form of '_item_ in _collection_[ track by _id_]' but got '%'";u.directive("collectionRepeat",["$collectionRepeatManager","$collectionDataSource","$parse",function(e,t,n){return{priority:1e3,transclude:"element",terminal:!0,$$tlb:!0,require:"^$ionicScroll",link:function(i,o,r,a,s){function c(e){u.resize(),y.setData(e),S.resize()}function l(){c(i.$eval(w))}var u=a.scrollView;if(u.options.scrollingX&&u.options.scrollingY)throw new Error(x);var d=!!u.options.scrollingY;if(d&&!r.collectionItemHeight)throw new Error(B);if(!d&&!r.collectionItemWidth)throw new Error(V);var h=n(r.collectionItemHeight||'"100%"'),f=n(r.collectionItemWidth||'"100%"'),v=function(e,t){var n=h(e,t);return p(n)&&n.indexOf("%")>-1?Math.floor(parseInt(n,10)/100*u.__clientHeight):n},g=function(e,t){var n=f(e,t);return p(n)&&n.indexOf("%")>-1?Math.floor(parseInt(n,10)/100*u.__clientWidth):n},m=r.collectionRepeat.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!m)throw new Error(_.replace("%",r.collectionRepeat));var $=m[1],w=m[2],b=m[3],y=new t({scope:i,transcludeFn:s,transcludeParent:o.parent(),keyExpr:$,listExpr:w,trackByExpr:b,heightGetter:v,widthGetter:g}),S=new e({dataSource:y,element:a.$element,scrollView:a.scrollView});i.$watchCollection(w,function(e){if(e&&!angular.isArray(e))throw new Error("collection-repeat expects an array to repeat over, but instead got '"+typeof e+"'.");c(e)}),ionic.on("resize",l,window),i.$on("$destroy",function(){S.destroy(),y.destroy(),ionic.off("resize",l,window)})}}}]),u.directive("ionContent",["$timeout","$controller","$ionicBind",function(e,t,n){return{restrict:"E",require:"^?ionNavView",scope:!0,priority:800,compile:function(e,i){function o(e,o,a){var s=e.$parent;e.$watch(function(){return(s.$hasHeader?" has-header":"")+(s.$hasSubheader?" has-subheader":"")+(s.$hasFooter?" has-footer":"")+(s.$hasSubfooter?" has-subfooter":"")+(s.$hasTabs?" has-tabs":"")+(s.$hasTabsTop?" has-tabs-top":"")},function(e,t){o.removeClass(t),o.addClass(e)}),e.$hasHeader=e.$hasSubheader=e.$hasFooter=e.$hasSubfooter=e.$hasTabs=e.$hasTabsTop=!1,n(e,a,{$onScroll:"&onScroll",$onScrollComplete:"&onScrollComplete",hasBouncing:"@",padding:"@",direction:"@",scrollbarX:"@",scrollbarY:"@",startX:"@",startY:"@",scrollEventInterval:"@"}),e.direction=e.direction||"y",angular.isDefined(a.padding)&&e.$watch(a.padding,function(e){(r||o).toggleClass("padding",!!e)}),"false"===a.scroll||("true"===i.overflowScroll?o.addClass("overflow-scroll"):t("$ionicScroll",{$scope:e,scrollViewOptions:{el:o[0],delegateHandle:i.delegateHandle,bouncing:e.$eval(e.hasBouncing),startX:e.$eval(e.startX)||0,startY:e.$eval(e.startY)||0,scrollbarX:e.$eval(e.scrollbarX)!==!1,scrollbarY:e.$eval(e.scrollbarY)!==!1,scrollingX:e.direction.indexOf("x")>=0,scrollingY:e.direction.indexOf("y")>=0,scrollEventInterval:parseInt(e.scrollEventInterval,10)||10,scrollingComplete:function(){e.$onScrollComplete({scrollTop:this.__scrollTop,scrollLeft:this.__scrollLeft})}}}))}var r;return e.addClass("scroll-content ionic-scroll"),"false"!=i.scroll?(r=v('<div class="scroll"></div>'),r.append(e.contents()),e.append(r)):e.addClass("scroll-content-false"),{pre:o}}}}]),h("onHold onTap onTouch onRelease onDrag onDragUp onDragRight onDragDown onDragLeft onSwipe onSwipeUp onSwipeRight onSwipeBottom onSwipeLeft".split(" "),function(e){u.directive(e,o(e))}),u.directive("ionNavBar",r()).directive("ionHeaderBar",r()).directive("ionHeaderBar",a(!0)).directive("ionFooterBar",a(!1)),u.directive("ionInfiniteScroll",["$timeout",function(e){function t(e,t,n){return n?t*(1-parseInt(e,10)/100):t-parseInt(e,10)}return{restrict:"E",require:["^$ionicScroll","ionInfiniteScroll"],template:'<div class="scroll-infinite"><div class="scroll-infinite-content"><i class="icon {{icon()}} icon-refreshing"></i></div></div>',scope:!0,controller:["$scope","$attrs",function(e,n){this.isLoading=!1,this.scrollView=null,this.getMaxScroll=function(){var e=(n.distance||"1%").trim(),i=-1!==e.indexOf("%"),o=this.scrollView.getScrollMax();return{left:this.scrollView.options.scrollingX?t(e,o.left,i):-1,top:this.scrollView.options.scrollingY?t(e,o.top,i):-1}}}],link:function(t,n,i,o){function r(){if(!s.isLoading){var e=c.getValues(),t=s.getMaxScroll();(-1!==t.left&&e.left>=t.left||-1!==t.top&&e.top>=t.top)&&l()}}var a=o[0],s=o[1],c=s.scrollView=a.scrollView;t.icon=function(){return angular.isDefined(i.icon)?i.icon:"ion-loading-d"};var l=function(){n[0].classList.add("active"),s.isLoading=!0,t.$parent&&t.$parent.$apply(i.onInfinite||"")},u=function(){n[0].classList.remove("active"),e(function(){c.resize()},0,!1),s.isLoading=!1};t.$on("scroll.infiniteScrollComplete",function(){u()}),t.$on("$destroy",function(){a.$element.off("scroll",d)});var d=ionic.animationFrameThrottle(r);setTimeout(d),a.$element.on("scroll",d)}}}]);var D='<a class="item-content" ng-href="{{$href()}}" target="{{$target()}}"></a>',E='<div class="item-content"></div>';u.directive("ionItem",["$animate","$compile",function(){return{restrict:"E",controller:["$scope","$element",function(e,t){this.$scope=e,this.$element=t}],scope:!0,compile:function(e,t){var n=angular.isDefined(t.href)||angular.isDefined(t.ngHref)||angular.isDefined(t.uiSref),i=n||/ion-(delete|option|reorder)-button/i.test(e.html());if(i){var o=v(n?D:E);o.append(e.contents()),e.append(o),e.addClass("item item-complex")}else e.addClass("item");return function(e,t,n){e.$href=function(){return n.href||n.ngHref},e.$target=function(){return n.target||"_self"}}}}}]);var A='<div class="item-left-edit item-delete ng-hide"></div>';u.directive("ionDeleteButton",["$animate",function(e){return{restrict:"E",require:["^ionItem","^ionList"],priority:Number.MAX_VALUE,compile:function(t,n){return n.$set("class",(n["class"]||"")+" button icon button-icon",!0),function(t,n,i,o){var r=o[0],a=o[1],s=v(A);s.append(n),r.$element.append(s).addClass("item-left-editable"),a.showDelete()&&e.removeClass(s,"ng-hide")}}}}]),u.directive("itemFloatingLabel",function(){return{restrict:"C",link:function(e,t){var n=t[0],i=n.querySelector("input, textarea"),o=n.querySelector(".input-label");if(i&&o){var r=function(){i.value?o.classList.add("has-input"):o.classList.remove("has-input")};i.addEventListener("input",r);var a=angular.element(i).controller("ngModel");a&&(a.$render=function(){i.value=a.$viewValue||"",r()}),e.$on("$destroy",function(){i.removeEventListener("input",r)})}}}});var H='<div class="item-options invisible"></div>';u.directive("ionOptionButton",["$compile",function(){function e(e){e.stopPropagation()}return{restrict:"E",require:"^ionItem",priority:Number.MAX_VALUE,compile:function(t,n){return n.$set("class",(n["class"]||"")+" button",!0),function(t,n,i,o){o.optionsContainer||(o.optionsContainer=v(H),o.$element.append(o.optionsContainer)),o.optionsContainer.append(n),n.on("click",e)}}}}]);var P='<div data-prevent-scroll="true" class="item-right-edit item-reorder ng-hide"></div>';u.directive("ionReorderButton",["$animate",function(e){return{restrict:"E",require:["^ionItem","^ionList"],priority:Number.MAX_VALUE,compile:function(t,n){return n.$set("class",(n["class"]||"")+" button icon button-icon",!0),t[0].setAttribute("data-prevent-scroll",!0),function(t,n,i,o){var r=o[0],a=o[1];t.$onReorder=function(e,n){t.$eval(i.onReorder,{$fromIndex:e,$toIndex:n})};var s=v(P);s.append(n),r.$element.append(s).addClass("item-right-editable"),a.showReorder()&&e.removeClass(s,"ng-hide")}}}}]),u.directive("keybo