text: /*Original Source: https://github.com/phstc/jquery-dateFormat; Modified by: Akhilesh Gupta, salesforce.com <http://salesforce.com> , inc.*/
  (function(c){c.format=function(){function c(e){e="function"==typeof e.startsWith&&e.startsWith("0")?e.substring(1):e;switch(parseInt(e)){case 0:return"Sunday";case 1:return"Monday";case 2:return"Tuesday";case 3:return"Wednesday";case 4:return"Thursday";case 5:return"Friday";case 6:return"Saturday";default:return e}}function a(e){e="function"==typeof e.startsWith&&e.startsWith("0")?e.substring(1):e;switch(parseInt(e)){case 1:return"Jan";case 2:return"Feb";case 3:return"Mar";case 4:return"Apr";case 5:return"May";
  case 6:return"Jun";case 7:return"Jul";case 8:return"Aug";case 9:return"Sep";case 10:return"Oct";case 11:return"Nov";case 12:return"Dec";default:return e}}var i=function(e){switch(e){case "Jan":return"01";case "Feb":return"02";case "Mar":return"03";case "Apr":return"04";case "May":return"05";case "Jun":return"06";case "Jul":return"07";case "Aug":return"08";case "Sep":return"09";case "Oct":return"10";case "Nov":return"11";case "Dec":return"12";default:return e}},g=function(e){var a="";-1!==e.indexOf(".")&&
  (a=e.split("."),e=a[0],a=a[1]);var b=e.split(":");return 3===b.length?(hour=b[0],minute=b[1],second=b[2],{time:e,hour:hour,minute:minute,second:second,millis:a}):{time:"",hour:"",minute:"",second:"",millis:""}};return{toDate:function(a){var d;a:{var b=null,c=d=b=null,f=null;if("function"===typeof a.getFullYear)b=a,f=g(a.toTimeString());else if(-1!=a.search(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.?\d{0,3}\+\d{2}:?\d{2}/))a=a.split(/[T\+-]/),b=a[0],d=a[1],c=a[2],f=g(a[3].split(".")[0]),b=new Date(b,d-
  1,c);else switch(a=a.split(" "),a.length){case 6:b=a[5];d=i(a[1]);c=a[2];f=g(a[3]);b=new Date(b,d-1,c);break;case 1:case 2:c=a[0].split("-");b=c[0];d=c[1];c=c[2];f=2==a.length?g(a[1]):"";b=new Date(b,d-1,c);break;case 7:case 9:case 10:b=a[3];d=i(a[1]);c=a[2];f=g(a[4]);b=new Date(b,d-1,c);break;default:d=void 0;break a}d={date:b,time:f}}if(!d||!d.date)return null;b=d.date;d=d.time;return"object"==typeof d?(d=new Date(b.getFullYear(),b.getMonth(),b.getDate(),d.hour,d.minute,d.second,d.millis),d.getMinutes()&&
  d.setMinutes(d.getMinutes()-d.getTimezoneOffset()),d):b},date:function(e,d){try{var b=this.toDate(e);if(!b)return e;for(var i=b.getFullYear(),g=b.getMonth()+1,l=b.getDate(),p=b.getDay(),k=b.getHours(),n=b.getMinutes(),q=b.getSeconds(),r=b.getMilliseconds(),h=b="",j=0;j<d.length;j++){var m=d.charAt(j),b=b+m;switch(b){case "ddd":h+=c(p);b="";break;case "dd":if("d"==d.charAt(j+1))break;1===(""+l).length&&(l="0"+l);h+=l;b="";break;case "MMM":h+=a(g);b="";break;case "MM":if("M"==d.charAt(j+1))break;1===
  (""+g).length&&(g="0"+g);h+=g;b="";break;case "yyyy":h+=i;b="";break;case "HH":h+=k;b="";break;case "hh":h+=0==k?12:13>k?k:k-12;b="";break;case "mm":h+=10>n?"0"+n:n;b="";break;case "ss":h+=(""+q).substring(0,2);b="";break;case "SSS":h+=(""+r).substring(0,3);b="";break;case "a":h+=12<=k?"PM":"AM";b="";break;case " ":h+=m;b="";break;case "/":h+=m;b="";break;case ":":h+=m;b="";break;case "(":for(;")"!=d.charAt(++j);)h+=d.charAt(j);b="";break;default:2===b.length&&0!==b.indexOf("y")&&"SS"!=b?(h+=b.substring(0,
  1),b=b.substring(1,2)):3===b.length&&-1===b.indexOf("yyy")&&(b="")}}return h}catch(s){return console.log(s),e}}}}()})(jQuery);
  /*http://topzindex.googlecode.com/ Copyright (c) 2009-2011 Todd NorthropLicensed under GPL 3, see  <http://www.gnu.org/licenses/>*/
  (function(c){c.topZIndex=function(f){return Math.max(0,Math.max.apply(null,c.map("*"===(f||"*")?c.makeArray(document.getElementsByTagName("*")):c(f),function(a){return parseFloat(c(a).css("z-index"))||null})))};c.fn.topZIndex=function(f){if(0===this.length)return this;var f=c.extend({increment:1},f),a=c.topZIndex(f.selector),i=f.increment;return this.each(function(){this.style.zIndex=a+=i})}})(jQuery);
  /*Copyright (c) 2011, salesforce.com <http://salesforce.com> , inc.*/
  var vendor=/webkit/i.test(navigator.appVersion)?"webkit":/firefox/i.test(navigator.userAgent)?"Moz":"opera"in window?"O":"";
  (function(c){function j(a,e){this.element=$j(a);this.options=e||{};if(window.Touch)this.element.off("touchstart").on("touchstart",this.eventListener(this))}var b;j.prototype={eventListener:function(a){return function(e){return a.handleEvent.apply(a,[e.originalEvent])}},handleEvent:function(a){switch(a.type){case "touchstart":this.onTouchStart(a);break;case "touchmove":this.onTouchMove(a);break;case "touchend":this.onTouchEnd(a)}},onTouchStart:function(a){a.preventDefault();this.moved=!1;this.theTarget=
  document.elementFromPoint(a.targetTouches[0].clientX,a.targetTouches[0].clientY);3==this.theTarget.nodeType&&(this.theTarget=this.theTarget.parentNode);if("function"==typeof this.options.onTapStart)this.options.onTapStart(this.theTarget);this.options.pressedClass&&this.theTarget.addClass(this.options.pressedClass);this.targetParent=this.element.has(this.theTarget);this.targetParent.length||(this.targetParent=this.element.filter(this.theTarget));this.targetParent[0].addEventListener("touchmove",this,
  !1);this.targetParent[0].addEventListener("touchend",this,!1)},onTouchMove:function(){this.moved=!0;if("function"==typeof this.options.onTapCancel)this.options.onTapCancel(this.theTarget);this.options.pressedClass&&this.theTarget.removeClass(this.options.pressedClass)},onTouchEnd:function(){var a=this.theTarget;this.targetParent[0].removeEventListener("touchmove",this,!1);this.targetParent[0].removeEventListener("touchend",this,!1);!this.moved&&this.theTarget&&(this.options.pressedClass&&this.theTarget.removeClass(this.options.pressedClass),
  setTimeout(function(){var e=document.createEvent("MouseEvents");e.initEvent("click",!0,!0);a.dispatchEvent(e)},0));this.targetParent=this.theTarget=void 0}};c.fn.changePage=function(a,e,d){var g=this,f="object"==typeof a?a:c(a),b=g.parent(),a=b.width();b.is(f.parent())&&(e?(b.css("-webkit-transform","translate3d("+-1*a+"px, 0, 0)"),g.css("-webkit-transform","translate3d("+a+"px, 0, 0)"),a=0):(f.css("-webkit-transform","translate3d("+a+"px, 0, 0)"),a*=-1),e=function(){g.css("visibility","hidden").css("-webkit-transform",
  "translate3d(0, 0, 0)");b.css("-webkit-transform","translate3d(0, 0, 0)");f.css("-webkit-transform","translate3d(0, 0, 0)");typeof d=="function"&&d()},f.css("visibility","visible"),b.slide("translate3d("+a+"px, 0, 0)",e))};c.fn.scrollHeight=function(){return this[0].scrollHeight};c.fn.slide=function(a,e){var d=this,c="-"+vendor.toLowerCase()+"-transform";this.off("webkitTransitionEnd").on("webkitTransitionEnd",function(a){d.is(a.target)&&(d.removeClass("transitionSettings").css(vendor+"TransitionProperty",
  "none"),d.off("webkitTransitionEnd"),"function"==typeof e&&e())});this.addClass("transitionSettings").css("visibility","visible");setTimeout(function(){d.css(vendor+"TransitionProperty",c).css(vendor+"Transform",a)},10)};c.fn.slideIn=function(a,e,d,c){var b,h;switch(a.toUpperCase()){case "X":b="translate3d("+e+"px, 0px, 0px)";h="translate3d("+d+"px, 0px, 0px)";break;case "Y":b="translate3d(0px, "+e+"px, 0px)",h="translate3d(0px, "+d+"px, 0px)"}this.css("visibility","hidden").css(vendor+"TransitionProperty",
  "none").css(vendor+"Transform",b);this.slide(h,c)};c.fn.slideOut=function(a,e,d){var c=this,b;switch(a.toUpperCase()){case "X":b="translate3d("+e+"px, 0px, 0px)";break;case "Y":b="translate3d(0px, "+e+"px, 0px)"}this.slide(b,function(){c.css("visibility","hidden");"function"==typeof d&&d()})};c.fn.slideInLeft=function(a){var e=this.parent().width()-this.outerWidth();this.slideIn("X",this.parent().width(),e,a)};c.fn.slideOutRight=function(a){"block"==this.css("display")&&this.slideOut("X",this.parent().width(),
  a)};c.fn.showActivityInd=function(a,e){var d;e&&(d=this.addOverlay());b?b.hide().off():(b=c("<div></div>").hide().append('<div id="spinner" style="position:relative; top:15px;"/>').append('<div id="text" style="margin: 45px 0 -5px 0;"/>'),b.appendTo(document.body));b[0].style.cssText="background-color:black; position: absolute; padding: 20px; color:white;-webkit-border-radius: 10px; text-align: center; z-index:1000";b.children("#text").text(a||"Loading...");var g=this.offset(),g=g?g:{left:0,top:0},
  f=g.left+(this.width()-b.outerWidth(!1))/2,g=g.top+(this.height()-b.outerHeight(!1))/2;b.css("left",f).css("top",g);b[0].style.cssText+=";-webkit-transition:-webkit-transform 100ms ease-out;";b.show().children("#spinner").spin("large","white");return{hide:function(){b.css("-webkit-transition-property","-webkit-transform, opacity");b.on("webkitTransitionEnd",function(){b.hide()});b.css({webkitTransform:"scale3d(0.5, 0.5, 1)",opacity:"0"});b.children("#spinner").spin(false);d&&d.hide()}}};c.fn.addOverlay=
  function(){var a=this,e=c.topZIndex(a),d=c("<div></div>").hide();d[0].style.cssText="background-color: black; border: none; opacity: 0.5; position: absolute; z-index:"+(e+10)+";";d.css({width:a.width(),height:a.height()});d.appendTo(a).show().offset(a.offset());d.orientationChange(function(){d.offset(a.offset());d.css({width:a.width(),height:a.height()})});return{elem:d,hide:function(){d.off("orientationchange").hide().remove()}}};c.fn.positionCenterOf=function(a){var e=$j(a).height()/2-this.outerHeight()/
  2,a=$j(a).width()/2-this.outerWidth()/2;this.offset({top:e,left:a})};c.fn.orientationChange=function(a){if(/AppleWebKit/i.test(navigator.appVersion)&&"orientation"in window&&"onorientationchange"in window)this.on("orientationchange",a);else $j(window).resize(a);return this};c.fn.unbindOrientationChange=function(a){/AppleWebKit/i.test(navigator.appVersion)&&window.onorientationchange?this.off("orientationchange",a):$j(window).off("resize",a);return this};c.fn.touch=function(a){if(window.Touch)this.on("touchstart",
  a);else this.on("click",a);return this};c.fn.unbindTouch=function(a){window.Touch?this.off("touchstart",a):this.off("click",a);return this};c.fn.enableTap=function(a){new j(this,a);return this};c.fn.setText=function(a,e,d){this.text("");var d=d||this,c=d.width();" "==a?this.html("&nbsp;"):this.text(a);for(var b=d.width()+1;e&&3<a.length&&d.width()>c&&d.width()<b;)a=a.substring(0,Math.max(0,a.length-4))+"...",b=d.width(),this.text(a);return this};c.fn.windowTouch=function(a,e,d){var c=this,b=function(b){var f=
  b.target,i=!0;c.data("windowTouch")&&(3==f.nodeType&&(f=f.parentNode),$j(f).is(c)||0<c.has(f).length?"function"==typeof a&&(i=a(b)):"function"==typeof e&&(i=e(b)),(d||i)&&c.unbindWindowTouch())};this.data("windowTouch",{handler:b});$j(window).touch(b);return this};c.fn.unbindWindowTouch=function(){if(this.data("windowTouch")){var a=this.data("windowTouch").handler;this.removeData("windowTouch");a&&$j(window).unbindTouch(a)}return this};c.fn.textfill=function(a){var a=a.maxFontPixels,b=c("span:visible:first",
  this),d=c(this).height(),g=c(this).width(),f,h;do b.css("font-size",a),f=b.height(),h=b.width(),a-=1;while((f>d||h>g)&&3<a);return this}})(jQuery);
  //fgnass.github.com/spin.js#v1.2.3
  (function(a,b,c){function n(a){var b={x:a.offsetLeft,y:a.offsetTop};while(a=a.offsetParent)b.x+=a.offsetLeft,b.y+=a.offsetTop;return b}function m(a){for(var b=1;b<arguments.length;b++){var d=arguments[b];for(var e in d)a[e]===c&&(a[e]=d[e])}return a}function l(a,b){for(var c in b)a.style[k(a,c)||c]=b[c];return a}function k(a,b){var e=a.style,f,g;if(e[b]!==c)return b;b=b.charAt(0).toUpperCase()+b.slice(1);for(g=0;g<d.length;g++){f=d[g]+b;if(e[f]!==c)return f}}function j(a,b,c,d){var g=["opacity",b,~~(a*100),c,d].join("-"),h=.01+c/d*100,j=Math.max(1-(1-a)/b*(100-h),a),k=f.substring(0,f.indexOf("Animation")).toLowerCase(),l=k&&"-"+k+"-"||"";e[g]||(i.insertRule("@"+l+"keyframes "+g+"{"+"0%{opacity:"+j+"}"+h+"%{opacity:"+a+"}"+(h+.01)+"%{opacity:1}"+(h+b)%100+"%{opacity:"+a+"}"+"100%{opacity:"+j+"}"+"}",0),e[g]=1);return g}function h(a){for(var b=1,c=arguments.length;b<c;b++)a.appendChild(arguments[b]);return a}function g(a,c){var d=b.createElement(a||"div"),e;for(e in c)d[e]=c[e];return d}var d=["webkit","Moz","ms","O"],e={},f,i=function(){var a=g("style");h(b.getElementsByTagName("head")[0],a);return a.sheet||a.styleSheet}(),o=function r(a){if(!this.spin)return new r(a);this.opts=m(a||{},r.defaults,p)},p=o.defaults={lines:12,length:7,width:5,radius:10,color:"#000",speed:1,trail:100,opacity:.25,fps:20},q=o.prototype={spin:function(a){this.stop();var b=this,c=b.el=l(g(),{position:"relative"}),d,e;a&&(a.insertBefore(c,a.firstChild||null),e=n(a),d=n(c),l(c,{left:(a.offsetWidth>>1)-d.x+e.x+"px",top:(a.offsetHeight>>1)-d.y+e.y+"px"})),c.setAttribute("aria-role","progressbar"),b.lines(c,b.opts);if(!f){var h=b.opts,i=0,j=h.fps,k=j/h.speed,m=(1-h.opacity)/(k*h.trail/100),o=k/h.lines;(function p(){i++;for(var a=h.lines;a;a--){var d=Math.max(1-(i+a*o)%k*m,h.opacity);b.opacity(c,h.lines-a,d,h)}b.timeout=b.el&&setTimeout(p,~~(1e3/j))})()}return b},stop:function(){var a=this.el;a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=c);return this}};q.lines=function(a,b){function e(a,d){return l(g(),{position:"absolute",width:b.length+b.width+"px",height:b.width+"px",background:a,boxShadow:d,transformOrigin:"left",transform:"rotate("+~~(360/b.lines*c)+"deg) translate("+b.radius+"px"+",0)",borderRadius:(b.width>>1)+"px"})}var c=0,d;for(;c<b.lines;c++)d=l(g(),{position:"absolute",top:1+~(b.width/2)+"px",transform:b.hwaccel?"translate3d(0,0,0)":"",opacity:b.opacity,animation:f&&j(b.opacity,b.trail,c,b.lines)+" "+1/b.speed+"s linear infinite"}),b.shadow&&h(d,l(e("#000","0 0 4px #000"),{top:"2px"})),h(a,h(d,e(b.color,"0 0 1px rgba(0,0,0,.1)")));return a},q.opacity=function(a,b,c){b<a.childNodes.length&&(a.childNodes[b].style.opacity=c)},function(){var a=l(g("group"),{behavior:"url(#default#VML)"}),b;if(!k(a,"transform")&&a.adj){for(b=4;b--;)i.addRule(["group","roundrect","fill","stroke"][b],"behavior:url(#default#VML)");q.lines=function(a,b){function k(a,d,i){h(f,h(l(e(),{rotation:360/b.lines*a+"deg",left:~~d}),h(l(g("roundrect",{arcsize:1}),{width:c,height:b.width,left:b.radius,top:-b.width>>1,filter:i}),g("fill",{color:b.color,opacity:b.opacity}),g("stroke",{opacity:0}))))}function e(){return l(g("group",{coordsize:d+" "+d,coordorigin:-c+" "+ -c}),{width:d,height:d})}var c=b.length+b.width,d=2*c,f=e(),i=~(b.length+b.radius+b.width)+"px",j;if(b.shadow)for(j=1;j<=b.lines;j++)k(j,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(j=1;j<=b.lines;j++)k(j);return h(l(a,{margin:i+" 0 0 "+i,zoom:1}),f)},q.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d<e.childNodes.length&&(e=e.childNodes[b+d],e=e&&e.firstChild,e=e&&e.firstChild,e&&(e.opacity=c))}}else f=k(a,"animation")}(),a.Spinner=o})(window,document);
  (function(c){c.fn.spin=function(a,d){var e={tiny:{lines:8,length:2,width:2,radius:3},small:{lines:8,length:4,width:3,radius:5},large:{lines:10,length:8,width:4,radius:8}};if(Spinner)return this.each(function(){var f=c(this),b=f.data();b.spinner&&(b.spinner.stop(),delete b.spinner);!1!==a&&("string"===typeof a&&(a=a in e?e[a]:{},d&&(a.color=d)),b.spinner=(new Spinner(c.extend({color:f.css("color")},a))).spin(this))});throw"Spinner class not available.";}})(window.Zepto||window.jQuery);