(function(n,t){function gt(n){var t=n.length,r=i.type(n);return i.isWindow(n)?!1:n.nodeType===1&&t?!0:r==="array"||r!=="function"&&(t===0||typeof t=="number"&&t>0&&t-1 in n)}function te(n){var t=ni[n]={};return i.each(n.match(s)||[],function(n,i){t[i]=!0}),t}function ur(n,r,u,f){if(i.acceptData(n)){var h,o,c=i.expando,l=n.nodeType,s=l?i.cache:n,e=l?n[c]:n[c]&&c;if(e&&s[e]&&(f||s[e].data)||u!==t||typeof r!="string")return e||(e=l?n[c]=b.pop()||i.guid++:c),s[e]||(s[e]=l?{}:{toJSON:i.noop}),(typeof r=="object"||typeof r=="function")&&(f?s[e]=i.extend(s[e],r):s[e].data=i.extend(s[e].data,r)),o=s[e],f||(o.data||(o.data={}),o=o.data),u!==t&&(o[i.camelCase(r)]=u),typeof r=="string"?(h=o[r],h==null&&(h=o[i.camelCase(r)])):h=o,h}}function fr(n,t,r){if(i.acceptData(n)){var f,o,s=n.nodeType,u=s?i.cache:n,e=s?n[i.expando]:i.expando;if(u[e]){if(t&&(f=r?u[e]:u[e].data,f)){for(i.isArray(t)?t=t.concat(i.map(t,i.camelCase)):(t in f)?t=[t]:(t=i.camelCase(t),t=t in f?[t]:t.split(" ")),o=t.length;o--;)delete f[t[o]];if(r?!ti(f):!i.isEmptyObject(f))return}(r||(delete u[e].data,ti(u[e])))&&(s?i.cleanData([n],!0):i.support.deleteExpando||u!=u.window?delete u[e]:u[e]=null)}}}function er(n,r,u){if(u===t&&n.nodeType===1){var f="data-"+r.replace(rr,"-$1").toLowerCase();if(u=n.getAttribute(f),typeof u=="string"){try{u=u==="true"?!0:u==="false"?!1:u==="null"?null:+u+""===u?+u:ir.test(u)?i.parseJSON(u):u}catch(e){}i.data(n,r,u)}else u=t}return u}function ti(n){for(var t in n)if((t!=="data"||!i.isEmptyObject(n[t]))&&t!=="toJSON")return!1;return!0}function ct(){return!0}function g(){return!1}function cr(){try{return r.activeElement}catch(n){}}function ar(n,t){do n=n[t];while(n&&n.nodeType!==1);return n}function fi(n,t,r){if(i.isFunction(t))return i.grep(n,function(n,i){return!!t.call(n,i,n)!==r});if(t.nodeType)return i.grep(n,function(n){return n===t!==r});if(typeof t=="string"){if(oe.test(t))return i.filter(t,n,r);t=i.filter(t,n)}return i.grep(n,function(n){return i.inArray(n,t)>=0!==r})}function vr(n){var i=yr.split("|"),t=n.createDocumentFragment();if(t.createElement)while(i.length)t.createElement(i.pop());return t}function gr(n,t){return i.nodeName(n,"table")&&i.nodeName(t.nodeType===1?t:t.firstChild,"tr")?n.getElementsByTagName("tbody")[0]||n.appendChild(n.ownerDocument.createElement("tbody")):n}function nu(n){return n.type=(i.find.attr(n,"type")!==null)+"/"+n.type,n}function tu(n){var t=ye.exec(n.type);return t?n.type=t[1]:n.removeAttribute("type"),n}function hi(n,t){for(var u,r=0;(u=n[r])!=null;r++)i._data(u,"globalEval",!t||i._data(t[r],"globalEval"))}function iu(n,t){if(t.nodeType===1&&i.hasData(n)){var u,f,o,s=i._data(n),r=i._data(t,s),e=s.events;if(e){delete r.handle;r.events={};for(u in e)for(f=0,o=e[u].length;f<o;f++)i.event.add(t,u,e[u][f])}r.data&&(r.data=i.extend({},r.data))}}function be(n,t){var r,f,u;if(t.nodeType===1){if(r=t.nodeName.toLowerCase(),!i.support.noCloneEvent&&t[i.expando]){u=i._data(t);for(f in u.events)i.removeEvent(t,f,u.handle);t.removeAttribute(i.expando)}r==="script"&&t.text!==n.text?(nu(t).text=n.text,tu(t)):r==="object"?(t.parentNode&&(t.outerHTML=n.outerHTML),i.support.html5Clone&&n.innerHTML&&!i.trim(t.innerHTML)&&(t.innerHTML=n.innerHTML)):r==="input"&&oi.test(n.type)?(t.defaultChecked=t.checked=n.checked,t.value!==n.value&&(t.value=n.value)):r==="option"?t.defaultSelected=t.selected=n.defaultSelected:(r==="input"||r==="textarea")&&(t.defaultValue=n.defaultValue)}}function u(n,r){var s,e,h=0,f=typeof n.getElementsByTagName!==o?n.getElementsByTagName(r||"*"):typeof n.querySelectorAll!==o?n.querySelectorAll(r||"*"):t;if(!f)for(f=[],s=n.childNodes||n;(e=s[h])!=null;h++)!r||i.nodeName(e,r)?f.push(e):i.merge(f,u(e,r));return r===t||r&&i.nodeName(n,r)?i.merge([n],f):f}function ke(n){oi.test(n.type)&&(n.defaultChecked=n.checked)}function ou(n,t){if(t in n)return t;for(var r=t.charAt(0).toUpperCase()+t.slice(1),u=t,i=eu.length;i--;)if(t=eu[i]+r,t in n)return t;return u}function ut(n,t){return n=t||n,i.css(n,"display")==="none"||!i.contains(n.ownerDocument,n)}function su(n,t){for(var f,r,o,e=[],u=0,s=n.length;u<s;u++)(r=n[u],r.style)&&(e[u]=i._data(r,"olddisplay"),f=r.style.display,t?(e[u]||f!=="none"||(r.style.display=""),r.style.display===""&&ut(r)&&(e[u]=i._data(r,"olddisplay",au(r.nodeName)))):e[u]||(o=ut(r),(f&&f!=="none"||!o)&&i._data(r,"olddisplay",o?f:i.css(r,"display"))));for(u=0;u<s;u++)(r=n[u],r.style)&&(t&&r.style.display!=="none"&&r.style.display!==""||(r.style.display=t?e[u]||"":"none"));return n}function hu(n,t,i){var r=to.exec(t);return r?Math.max(0,r[1]-(i||0))+(r[2]||"px"):t}function cu(n,t,r,u,f){for(var e=r===(u?"border":"content")?4:t==="width"?1:0,o=0;e<4;e+=2)r==="margin"&&(o+=i.css(n,r+p[e],!0,f)),u?(r==="content"&&(o-=i.css(n,"padding"+p[e],!0,f)),r!=="margin"&&(o-=i.css(n,"border"+p[e]+"Width",!0,f))):(o+=i.css(n,"padding"+p[e],!0,f),r!=="padding"&&(o+=i.css(n,"border"+p[e]+"Width",!0,f)));return o}function lu(n,t,r){var e=!0,u=t==="width"?n.offsetWidth:n.offsetHeight,f=v(n),o=i.support.boxSizing&&i.css(n,"boxSizing",!1,f)==="border-box";if(u<=0||u==null){if(u=y(n,t,f),(u<0||u==null)&&(u=n.style[t]),lt.test(u))return u;e=o&&(i.support.boxSizingReliable||u===n.style[t]);u=parseFloat(u)||0}return u+cu(n,t,r||(o?"border":"content"),e,f)+"px"}function au(n){var u=r,t=uu[n];return t||(t=vu(n,u),t!=="none"&&t||(rt=(rt||i("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(u.documentElement),u=(rt[0].contentWindow||rt[0].contentDocument).document,u.write("<!doctype html><html><body>"),u.close(),t=vu(n,u),rt.detach()),uu[n]=t),t}function vu(n,t){var r=i(t.createElement(n)).appendTo(t.body),u=i.css(r[0],"display");return r.remove(),u}function li(n,t,r,u){var f;if(i.isArray(t))i.each(t,function(t,i){r||fo.test(n)?u(n,i):li(n+"["+(typeof i=="object"?t:"")+"]",i,r,u)});else if(r||i.type(t)!=="object")u(n,t);else for(f in t)li(n+"["+f+"]",t[f],r,u)}function gu(n){return function(t,r){typeof t!="string"&&(r=t,t="*");var u,f=0,e=t.toLowerCase().match(s)||[];if(i.isFunction(r))while(u=e[f++])u[0]==="+"?(u=u.slice(1)||"*",(n[u]=n[u]||[]).unshift(r)):(n[u]=n[u]||[]).push(r)}}function nf(n,t,r,u){function e(s){var h;return f[s]=!0,i.each(n[s]||[],function(n,i){var s=i(t,r,u);if(typeof s!="string"||o||f[s]){if(o)return!(h=s)}else return t.dataTypes.unshift(s),e(s),!1}),h}var f={},o=n===yi;return e(t.dataTypes[0])||!f["*"]&&e("*")}function pi(n,r){var f,u,e=i.ajaxSettings.flatOptions||{};for(u in r)r[u]!==t&&((e[u]?n:f||(f={}))[u]=r[u]);return f&&i.extend(!0,n,f),n}function ao(n,i,r){for(var s,o,f,e,h=n.contents,u=n.dataTypes;u[0]==="*";)u.shift(),o===t&&(o=n.mimeType||i.getResponseHeader("Content-Type"));if(o)for(e in h)if(h[e]&&h[e].test(o)){u.unshift(e);break}if(u[0]in r)f=u[0];else{for(e in r){if(!u[0]||n.converters[e+" "+u[0]]){f=e;break}s||(s=e)}f=f||s}if(f)return f!==u[0]&&u.unshift(f),r[f]}function vo(n,t,i,r){var h,u,f,s,e,o={},c=n.dataTypes.slice();if(c[1])for(f in n.converters)o[f.toLowerCase()]=n.converters[f];for(u=c.shift();u;)if(n.responseFields[u]&&(i[n.responseFields[u]]=t),!e&&r&&n.dataFilter&&(t=n.dataFilter(t,n.dataType)),e=u,u=c.shift(),u)if(u==="*")u=e;else if(e!=="*"&&e!==u){if(f=o[e+" "+u]||o["* "+u],!f)for(h in o)if(s=h.split(" "),s[1]===u&&(f=o[e+" "+s[0]]||o["* "+s[0]],f)){f===!0?f=o[h]:o[h]!==!0&&(u=s[0],c.unshift(s[1]));break}if(f!==!0)if(f&&n.throws)t=f(t);else try{t=f(t)}catch(l){return{state:"parsererror",error:f?l:"No conversion from "+e+" to "+u}}}return{state:"success",data:t}}function rf(){try{return new n.XMLHttpRequest}catch(t){}}function yo(){try{return new n.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function ff(){return setTimeout(function(){it=t}),it=i.now()}function ef(n,t,i){for(var u,f=(ft[t]||[]).concat(ft["*"]),r=0,e=f.length;r<e;r++)if(u=f[r].call(i,t,n))return u}function of(n,t,r){var e,o,s=0,l=pt.length,f=i.Deferred().always(function(){delete c.elem}),c=function(){if(o)return!1;for(var s=it||ff(),t=Math.max(0,u.startTime+u.duration-s),h=t/u.duration||0,i=1-h,r=0,e=u.tweens.length;r<e;r++)u.tweens[r].run(i);return f.notifyWith(n,[u,i,t]),i<1&&e?t:(f.resolveWith(n,[u]),!1)},u=f.promise({elem:n,props:i.extend({},t),opts:i.extend(!0,{specialEasing:{}},r),originalProperties:t,originalOptions:r,startTime:it||ff(),duration:r.duration,tweens:[],createTween:function(t,r){var f=i.Tween(n,u.opts,t,r,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(f),f},stop:function(t){var i=0,r=t?u.tweens.length:0;if(o)return this;for(o=!0;i<r;i++)u.tweens[i].run(1);return t?f.resolveWith(n,[u,t]):f.rejectWith(n,[u,t]),this}}),h=u.props;for(bo(h,u.opts.specialEasing);s<l;s++)if(e=pt[s].call(u,n,h,u.opts),e)return e;return i.map(h,ef,u),i.isFunction(u.opts.start)&&u.opts.start.call(n,u),i.fx.timer(i.extend(c,{elem:n,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function bo(n,t){var r,f,e,u,o;for(r in n)if(f=i.camelCase(r),e=t[f],u=n[r],i.isArray(u)&&(e=u[1],u=n[r]=u[0]),r!==f&&(n[f]=u,delete n[r]),o=i.cssHooks[f],o&&"expand"in o){u=o.expand(u);delete n[f];for(r in u)r in n||(n[r]=u[r],t[r]=e)}else t[f]=e}function ko(n,t,r){var u,a,v,c,e,y,s=this,l={},o=n.style,h=n.nodeType&&ut(n),f=i._data(n,"fxshow");r.queue||(e=i._queueHooks(n,"fx"),e.unqueued==null&&(e.unqueued=0,y=e.empty.fire,e.empty.fire=function(){e.unqueued||y()}),e.unqueued++,s.always(function(){s.always(function(){e.unqueued--;i.queue(n,"fx").length||e.empty.fire()})}));n.nodeType===1&&("height"in t||"width"in t)&&(r.overflow=[o.overflow,o.overflowX,o.overflowY],i.css(n,"display")==="inline"&&i.css(n,"float")==="none"&&(i.support.inlineBlockNeedsLayout&&au(n.nodeName)!=="inline"?o.zoom=1:o.display="inline-block"));r.overflow&&(o.overflow="hidden",i.support.shrinkWrapBlocks||s.always(function(){o.overflow=r.overflow[0];o.overflowX=r.overflow[1];o.overflowY=r.overflow[2]}));for(u in t)if(a=t[u],po.exec(a)){if(delete t[u],v=v||a==="toggle",a===(h?"hide":"show"))continue;l[u]=f&&f[u]||i.style(n,u)}if(!i.isEmptyObject(l)){f?"hidden"in f&&(h=f.hidden):f=i._data(n,"fxshow",{});v&&(f.hidden=!h);h?i(n).show():s.done(function(){i(n).hide()});s.done(function(){var t;i._removeData(n,"fxshow");for(t in l)i.style(n,t,l[t])});for(u in l)c=ef(h?f[u]:0,u,s),u in f||(f[u]=c.start,h&&(c.end=c.start,c.start=u==="width"||u==="height"?1:0))}}function f(n,t,i,r,u){return new f.prototype.init(n,t,i,r,u)}function wt(n,t){var r,i={height:n},u=0;for(t=t?1:0;u<4;u+=2-t)r=p[u],i["margin"+r]=i["padding"+r]=n;return t&&(i.opacity=i.width=n),i}function sf(n){return i.isWindow(n)?n:n.nodeType===9?n.defaultView||n.parentWindow:!1}var et,bi,o=typeof t,hf=n.location,r=n.document,ki=r.documentElement,cf=n.jQuery,lf=n.$,ot={},b=[],bt="1.10.2",di=b.concat,kt=b.push,l=b.slice,gi=b.indexOf,af=ot.toString,k=ot.hasOwnProperty,dt=bt.trim,i=function(n,t){return new i.fn.init(n,t,bi)},st=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,s=/\S+/g,vf=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,yf=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,nr=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,pf=/^[\],:{}\s]*$/,wf=/(?:^|:|,)(?:\s*\[)+/g,bf=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,kf=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,df=/^-ms-/,gf=/-([\da-z])/gi,ne=function(n,t){return t.toUpperCase()},h=function(n){(r.addEventListener||n.type==="load"||r.readyState==="complete")&&(tr(),i.ready())},tr=function(){r.addEventListener?(r.removeEventListener("DOMContentLoaded",h,!1),n.removeEventListener("load",h,!1)):(r.detachEvent("onreadystatechange",h),n.detachEvent("onload",h))},ni,ir,rr,wi,at,nt,tt,tf,vt;i.fn=i.prototype={jquery:bt,constructor:i,init:function(n,u,f){var e,o;if(!n)return this;if(typeof n=="string"){if(e=n.charAt(0)==="<"&&n.charAt(n.length-1)===">"&&n.length>=3?[null,n,null]:yf.exec(n),e&&(e[1]||!u)){if(e[1]){if(u=u instanceof i?u[0]:u,i.merge(this,i.parseHTML(e[1],u&&u.nodeType?u.ownerDocument||u:r,!0)),nr.test(e[1])&&i.isPlainObject(u))for(e in u)i.isFunction(this[e])?this[e](u[e]):this.attr(e,u[e]);return this}if(o=r.getElementById(e[2]),o&&o.parentNode){if(o.id!==e[2])return f.find(n);this.length=1;this[0]=o}return this.context=r,this.selector=n,this}return!u||u.jquery?(u||f).find(n):this.constructor(u).find(n)}return n.nodeType?(this.context=this[0]=n,this.length=1,this):i.isFunction(n)?f.ready(n):(n.selector!==t&&(this.selector=n.selector,this.context=n.context),i.makeArray(n,this))},selector:"",length:0,toArray:function(){return l.call(this)},get:function(n){return n==null?this.toArray():n<0?this[this.length+n]:this[n]},pushStack:function(n){var t=i.merge(this.constructor(),n);return t.prevObject=this,t.context=this.context,t},each:function(n,t){return i.each(this,n,t)},ready:function(n){return i.ready.promise().done(n),this},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(n){var i=this.length,t=+n+(n<0?i:0);return this.pushStack(t>=0&&t<i?[this[t]]:[])},map:function(n){return this.pushStack(i.map(this,function(t,i){return n.call(t,i,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:kt,sort:[].sort,splice:[].splice};i.fn.init.prototype=i.fn;i.extend=i.fn.extend=function(){var u,o,r,e,s,h,n=arguments[0]||{},f=1,l=arguments.length,c=!1;for(typeof n=="boolean"&&(c=n,n=arguments[1]||{},f=2),typeof n=="object"||i.isFunction(n)||(n={}),l===f&&(n=this,--f);f<l;f++)if((s=arguments[f])!=null)for(e in s)(u=n[e],r=s[e],n!==r)&&(c&&r&&(i.isPlainObject(r)||(o=i.isArray(r)))?(o?(o=!1,h=u&&i.isArray(u)?u:[]):h=u&&i.isPlainObject(u)?u:{},n[e]=i.extend(c,h,r)):r!==t&&(n[e]=r));return n};i.extend({expando:"jQuery"+(bt+Math.random()).replace(/\D/g,""),noConflict:function(t){return n.$===i&&(n.$=lf),t&&n.jQuery===i&&(n.jQuery=cf),i},isReady:!1,readyWait:1,holdReady:function(n){n?i.readyWait++:i.ready(!0)},ready:function(n){if(n===!0?!--i.readyWait:!i.isReady){if(!r.body)return setTimeout(i.ready);(i.isReady=!0,n!==!0&&--i.readyWait>0)||(et.resolveWith(r,[i]),i.fn.trigger&&i(r).trigger("ready").off("ready"))}},isFunction:function(n){return i.type(n)==="function"},isArray:Array.isArray||function(n){return i.type(n)==="array"},isWindow:function(n){return n!=null&&n==n.window},isNumeric:function(n){return!isNaN(parseFloat(n))&&isFinite(n)},type:function(n){return n==null?String(n):typeof n=="object"||typeof n=="function"?ot[af.call(n)]||"object":typeof n},isPlainObject:function(n){var r;if(!n||i.type(n)!=="object"||n.nodeType||i.isWindow(n))return!1;try{if(n.constructor&&!k.call(n,"constructor")&&!k.call(n.constructor.prototype,"isPrototypeOf"))return!1}catch(u){return!1}if(i.support.ownLast)for(r in n)return k.call(n,r);for(r in n);return r===t||k.call(n,r)},isEmptyObject:function(n){for(var t in n)return!1;return!0},error:function(n){throw new Error(n);},parseHTML:function(n,t,u){if(!n||typeof n!="string")return null;typeof t=="boolean"&&(u=t,t=!1);t=t||r;var f=nr.exec(n),e=!u&&[];return f?[t.createElement(f[1])]:(f=i.buildFragment([n],t,e),e&&i(e).remove(),i.merge([],f.childNodes))},parseJSON:function(t){if(n.JSON&&n.JSON.parse)return n.JSON.parse(t);if(t===null)return t;if(typeof t=="string"&&(t=i.trim(t),t&&pf.test(t.replace(bf,"@").replace(kf,"]").replace(wf,""))))return new Function("return "+t)();i.error("Invalid JSON: "+t)},parseXML:function(r){var u,f;if(!r||typeof r!="string")return null;try{n.DOMParser?(f=new DOMParser,u=f.parseFromString(r,"text/xml")):(u=new ActiveXObject("Microsoft.XMLDOM"),u.async="false",u.loadXML(r))}catch(e){u=t}return u&&u.documentElement&&!u.getElementsByTagName("parsererror").length||i.error("Invalid XML: "+r),u},noop:function(){},globalEval:function(t){t&&i.trim(t)&&(n.execScript||function(t){n.eval.call(n,t)})(t)},camelCase:function(n){return n.replace(df,"ms-").replace(gf,ne)},nodeName:function(n,t){return n.nodeName&&n.nodeName.toLowerCase()===t.toLowerCase()},each:function(n,t,i){var u,r=0,f=n.length,e=gt(n);if(i){if(e){for(;r<f;r++)if(u=t.apply(n[r],i),u===!1)break}else for(r in n)if(u=t.apply(n[r],i),u===!1)break}else if(e){for(;r<f;r++)if(u=t.call(n[r],r,n[r]),u===!1)break}else for(r in n)if(u=t.call(n[r],r,n[r]),u===!1)break;return n},trim:dt&&!dt.call("﻿ ")?function(n){return n==null?"":dt.call(n)}:function(n){return n==null?"":(n+"").replace(vf,"")},makeArray:function(n,t){var r=t||[];return n!=null&&(gt(Object(n))?i.merge(r,typeof n=="string"?[n]:n):kt.call(r,n)),r},inArray:function(n,t,i){var r;if(t){if(gi)return gi.call(t,n,i);for(r=t.length,i=i?i<0?Math.max(0,r+i):i:0;i<r;i++)if(i in t&&t[i]===n)return i}return-1},merge:function(n,i){var f=i.length,u=n.length,r=0;if(typeof f=="number")for(;r<f;r++)n[u++]=i[r];else while(i[r]!==t)n[u++]=i[r++];return n.length=u,n},grep:function(n,t,i){var u,f=[],r=0,e=n.length;for(i=!!i;r<e;r++)u=!!t(n[r],r),i!==u&&f.push(n[r]);return f},map:function(n,t,i){var u,r=0,e=n.length,o=gt(n),f=[];if(o)for(;r<e;r++)u=t(n[r],r,i),u!=null&&(f[f.length]=u);else for(r in n)u=t(n[r],r,i),u!=null&&(f[f.length]=u);return di.apply([],f)},guid:1,proxy:function(n,r){var f,u,e;return(typeof r=="string"&&(e=n[r],r=n,n=e),!i.isFunction(n))?t:(f=l.call(arguments,2),u=function(){return n.apply(r||this,f.concat(l.call(arguments)))},u.guid=n.guid=n.guid||i.guid++,u)},access:function(n,r,u,f,e,o,s){var h=0,l=n.length,c=u==null;if(i.type(u)==="object"){e=!0;for(h in u)i.access(n,r,h,u[h],!0,o,s)}else if(f!==t&&(e=!0,i.isFunction(f)||(s=!0),c&&(s?(r.call(n,f),r=null):(c=r,r=function(n,t,r){return c.call(i(n),r)})),r))for(;h<l;h++)r(n[h],u,s?f:f.call(n[h],h,r(n[h],u)));return e?n:c?r.call(n):l?r(n[0],u):o},now:function(){return(new Date).getTime()},swap:function(n,t,i,r){var f,u,e={};for(u in t)e[u]=n.style[u],n.style[u]=t[u];f=i.apply(n,r||[]);for(u in t)n.style[u]=e[u];return f}});i.ready.promise=function(t){if(!et)if(et=i.Deferred(),r.readyState==="complete")setTimeout(i.ready);else if(r.addEventListener)r.addEventListener("DOMContentLoaded",h,!1),n.addEventListener("load",h,!1);else{r.attachEvent("onreadystatechange",h);n.attachEvent("onload",h);var u=!1;try{u=n.frameElement==null&&r.documentElement}catch(e){}u&&u.doScroll&&function f(){if(!i.isReady){try{u.doScroll("left")}catch(n){return setTimeout(f,50)}tr();i.ready()}}()}return et.promise(t)};i.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(n,t){ot["[object "+t+"]"]=t.toLowerCase()});bi=i(r),function(n,t){function u(n,t,i,r){var p,u,f,l,w,a,k,c,g,d;if((t?t.ownerDocument||t:y)!==s&&nt(t),t=t||s,i=i||[],!n||typeof n!="string")return i;if((l=t.nodeType)!==1&&l!==9)return[];if(v&&!r){if(p=or.exec(n))if(f=p[1]){if(l===9)if(u=t.getElementById(f),u&&u.parentNode){if(u.id===f)return i.push(u),i}else return i;else if(t.ownerDocument&&(u=t.ownerDocument.getElementById(f))&&ot(t,u)&&u.id===f)return i.push(u),i}else{if(p[2])return b.apply(i,t.getElementsByTagName(n)),i;if((f=p[3])&&e.getElementsByClassName&&t.getElementsByClassName)return b.apply(i,t.getElementsByClassName(f)),i}if(e.qsa&&(!h||!h.test(n))){if(c=k=o,g=t,d=l===9&&n,l===1&&t.nodeName.toLowerCase()!=="object"){for(a=pt(n),(k=t.getAttribute("id"))?c=k.replace(cr,"\\$&"):t.setAttribute("id",c),c="[id='"+c+"'] ",w=a.length;w--;)a[w]=c+wt(a[w]);g=ti.test(n)&&t.parentNode||t;d=a.join(",")}if(d)try{return b.apply(i,g.querySelectorAll(d)),i}catch(tt){}finally{k||t.removeAttribute("id")}}}return pr(n.replace(vt,"$1"),t,i,r)}function ri(){function n(i,u){return t.push(i+=" ")>r.cacheLength&&delete n[t.shift()],n[i]=u}var t=[];return n}function c(n){return n[o]=!0,n}function l(n){var t=s.createElement("div");try{return!!n(t)}catch(i){return!1}finally{t.parentNode&&t.parentNode.removeChild(t);t=null}}function ui(n,t){for(var u=n.split("|"),i=n.length;i--;)r.attrHandle[u[i]]=t}function bi(n,t){var i=t&&n,r=i&&n.nodeType===1&&t.nodeType===1&&(~t.sourceIndex||vi)-(~n.sourceIndex||vi);if(r)return r;if(i)while(i=i.nextSibling)if(i===t)return-1;return n?1:-1}function lr(n){return function(t){var i=t.nodeName.toLowerCase();return i==="input"&&t.type===n}}function ar(n){return function(t){var i=t.nodeName.toLowerCase();return(i==="input"||i==="button")&&t.type===n}}function rt(n){return c(function(t){return t=+t,c(function(i,r){for(var u,f=n([],i.length,t),e=f.length;e--;)i[u=f[e]]&&(i[u]=!(r[u]=i[u]))})})}function ki(){}function pt(n,t){var e,f,s,o,i,h,c,l=li[n+" "];if(l)return t?0:l.slice(0);for(i=n,h=[],c=r.preFilter;i;){(!e||(f=ir.exec(i)))&&(f&&(i=i.slice(f[0].length)||i),h.push(s=[]));e=!1;(f=rr.exec(i))&&(e=f.shift(),s.push({value:e,type:f[0].replace(vt," ")}),i=i.slice(e.length));for(o in r.filter)(f=yt[o].exec(i))&&(!c[o]||(f=c[o](f)))&&(e=f.shift(),s.push({value:e,type:o,matches:f}),i=i.slice(e.length));if(!e)break}return t?i.length:i?u.error(n):li(n,h).slice(0)}function wt(n){for(var t=0,r=n.length,i="";t<r;t++)i+=n[t].value;return i}function fi(n,t,i){var r=t.dir,u=i&&r==="parentNode",f=di++;return t.first?function(t,i,f){while(t=t[r])if(t.nodeType===1||u)return n(t,i,f)}:function(t,i,e){var h,s,c,l=p+" "+f;if(e){while(t=t[r])if((t.nodeType===1||u)&&n(t,i,e))return!0}else while(t=t[r])if(t.nodeType===1||u)if(c=t[o]||(t[o]={}),(s=c[r])&&s[0]===l){if((h=s[1])===!0||h===ht)return h===!0}else if(s=c[r]=[l],s[1]=n(t,i,e)||ht,s[1]===!0)return!0}}function ei(n){return n.length>1?function(t,i,r){for(var u=n.length;u--;)if(!n[u](t,i,r))return!1;return!0}:n[0]}function bt(n,t,i,r,u){for(var e,o=[],f=0,s=n.length,h=t!=null;f<s;f++)(e=n[f])&&(!i||i(e,r,u))&&(o.push(e),h&&t.push(f));return o}function oi(n,t,i,r,u,f){return r&&!r[o]&&(r=oi(r)),u&&!u[o]&&(u=oi(u,f)),c(function(f,e,o,s){var l,c,a,p=[],y=[],w=e.length,k=f||yr(t||"*",o.nodeType?[o]:o,[]),v=n&&(f||!t)?bt(k,p,n,o,s):k,h=i?u||(f?n:w||r)?[]:e:v;if(i&&i(v,h,o,s),r)for(l=bt(h,y),r(l,[],o,s),c=l.length;c--;)(a=l[c])&&(h[y[c]]=!(v[y[c]]=a));if(f){if(u||n){if(u){for(l=[],c=h.length;c--;)(a=h[c])&&l.push(v[c]=a);u(null,h=[],l,s)}for(c=h.length;c--;)(a=h[c])&&(l=u?it.call(f,a):p[c])>-1&&(f[l]=!(e[l]=a))}}else h=bt(h===e?h.splice(w,h.length):h),u?u(null,e,h,s):b.apply(e,h)})}function si(n){for(var s,u,i,e=n.length,h=r.relative[n[0].type],c=h||r.relative[" "],t=h?1:0,l=fi(function(n){return n===s},c,!0),a=fi(function(n){return it.call(s,n)>-1},c,!0),f=[function(n,t,i){return!h&&(i||t!==lt)||((s=t).nodeType?l(n,t,i):a(n,t,i))}];t<e;t++)if(u=r.relative[n[t].type])f=[fi(ei(f),u)];else{if(u=r.filter[n[t].type].apply(null,n[t].matches),u[o]){for(i=++t;i<e;i++)if(r.relative[n[i].type])break;return oi(t>1&&ei(f),t>1&&wt(n.slice(0,t-1).concat({value:n[t-2].type===" "?"*":""})).replace(vt,"$1"),u,t<i&&si(n.slice(t,i)),i<e&&si(n=n.slice(i)),i<e&&wt(n))}f.push(u)}return ei(f)}function vr(n,t){var f=0,i=t.length>0,e=n.length>0,o=function(o,h,c,l,a){var y,g,k,w=[],d=0,v="0",nt=o&&[],tt=a!=null,it=lt,ut=o||e&&r.find.TAG("*",a&&h.parentNode||h),rt=p+=it==null?1:Math.random()||.1;for(tt&&(lt=h!==s&&h,ht=f);(y=ut[v])!=null;v++){if(e&&y){for(g=0;k=n[g++];)if(k(y,h,c)){l.push(y);break}tt&&(p=rt,ht=++f)}i&&((y=!k&&y)&&d--,o&&nt.push(y))}if(d+=v,i&&v!==d){for(g=0;k=t[g++];)k(nt,w,h,c);if(o){if(d>0)while(v--)nt[v]||w[v]||(w[v]=nr.call(l));w=bt(w)}b.apply(l,w);tt&&!o&&w.length>0&&d+t.length>1&&u.uniqueSort(l)}return tt&&(p=rt,lt=it),nt};return i?c(o):o}function yr(n,t,i){for(var r=0,f=t.length;r<f;r++)u(n,t[r],i);return i}function pr(n,t,i,u){var s,f,o,c,l,h=pt(n);if(!u&&h.length===1){if(f=h[0]=h[0].slice(0),f.length>2&&(o=f[0]).type==="ID"&&e.getById&&t.nodeType===9&&v&&r.relative[f[1].type]){if(t=(r.find.ID(o.matches[0].replace(k,d),t)||[])[0],!t)return i;n=n.slice(f.shift().value.length)}for(s=yt.needsContext.test(n)?0:f.length;s--;){if(o=f[s],r.relative[c=o.type])break;if((l=r.find[c])&&(u=l(o.matches[0].replace(k,d),ti.test(f[0].type)&&t.parentNode||t))){if(f.splice(s,1),n=u.length&&wt(f),!n)return b.apply(i,u),i;break}}}return kt(n,h)(u,t,!v,i,ti.test(n)),i}var ut,e,ht,r,ct,hi,kt,lt,g,nt,s,a,v,h,tt,at,ot,o="sizzle"+-new Date,y=n.document,p=0,di=0,ci=ri(),li=ri(),ai=ri(),ft=!1,dt=function(n,t){return n===t?(ft=!0,0):0},st=typeof t,vi=-2147483648,gi={}.hasOwnProperty,w=[],nr=w.pop,tr=w.push,b=w.push,yi=w.slice,it=w.indexOf||function(n){for(var t=0,i=this.length;t<i;t++)if(this[t]===n)return t;return-1},gt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",f="[\\x20\\t\\r\\n\\f]",et="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",pi=et.replace("w","w#"),wi="\\["+f+"*("+et+")"+f+"*(?:([*^$|!~]?=)"+f+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+pi+")|)|)"+f+"*\\]",ni=":("+et+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+wi.replace(3,8)+")*)|.*)\\)|)",vt=new RegExp("^"+f+"+|((?:^|[^\\\\])(?:\\\\.)*)"+f+"+$","g"),ir=new RegExp("^"+f+"*,"+f+"*"),rr=new RegExp("^"+f+"*([>+~]|"+f+")"+f+"*"),ti=new RegExp(f+"*[+~]"),ur=new RegExp("="+f+"*([^\\]'\"]*)"+f+"*\\]","g"),fr=new RegExp(ni),er=new RegExp("^"+pi+"$"),yt={ID:new RegExp("^#("+et+")"),CLASS:new RegExp("^\\.("+et+")"),TAG:new RegExp("^("+et.replace("w","w*")+")"),ATTR:new RegExp("^"+wi),PSEUDO:new RegExp("^"+ni),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+f+"*(even|odd|(([+-]|)(\\d*)n|)"+f+"*(?:([+-]|)"+f+"*(\\d+)|))"+f+"*\\)|)","i"),bool:new RegExp("^(?:"+gt+")$","i"),needsContext:new RegExp("^"+f+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+f+"*((?:-\\d)?\\d*)"+f+"*\\)|)(?=[^-]|$)","i")},ii=/^[^{]+\{\s*\[native \w/,or=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,sr=/^(?:input|select|textarea|button)$/i,hr=/^h\d$/i,cr=/'|\\/g,k=new RegExp("\\\\([\\da-f]{1,6}"+f+"?|("+f+")|.)","ig"),d=function(n,t,i){var r="0x"+t-65536;return r!==r||i?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,r&1023|56320)};try{b.apply(w=yi.call(y.childNodes),y.childNodes);w[y.childNodes.length].nodeType}catch(wr){b={apply:w.length?function(n,t){tr.apply(n,yi.call(t))}:function(n,t){for(var i=n.length,r=0;n[i++]=t[r++];);n.length=i-1}}}hi=u.isXML=function(n){var t=n&&(n.ownerDocument||n).documentElement;return t?t.nodeName!=="HTML":!1};e=u.support={};nt=u.setDocument=function(n){var t=n?n.ownerDocument||n:y,i=t.defaultView;return t===s||t.nodeType!==9||!t.documentElement?s:(s=t,a=t.documentElement,v=!hi(t),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){nt()}),e.attributes=l(function(n){return n.className="i",!n.getAttribute("className")}),e.getElementsByTagName=l(function(n){return n.appendChild(t.createComment("")),!n.getElementsByTagName("*").length}),e.getElementsByClassName=l(function(n){return n.innerHTML="<div class='a'><\/div><div class='a i'><\/div>",n.firstChild.className="i",n.getElementsByClassName("i").length===2}),e.getById=l(function(n){return a.appendChild(n).id=o,!t.getElementsByName||!t.getElementsByName(o).length}),e.getById?(r.find.ID=function(n,t){if(typeof t.getElementById!==st&&v){var i=t.getElementById(n);return i&&i.parentNode?[i]:[]}},r.filter.ID=function(n){var t=n.replace(k,d);return function(n){return n.getAttribute("id")===t}}):(delete r.find.ID,r.filter.ID=function(n){var t=n.replace(k,d);return function(n){var i=typeof n.getAttributeNode!==st&&n.getAttributeNode("id");return i&&i.value===t}}),r.find.TAG=e.getElementsByTagName?function(n,t){if(typeof t.getElementsByTagName!==st)return t.getElementsByTagName(n)}:function(n,t){var i,r=[],f=0,u=t.getElementsByTagName(n);if(n==="*"){while(i=u[f++])i.nodeType===1&&r.push(i);return r}return u},r.find.CLASS=e.getElementsByClassName&&function(n,t){if(typeof t.getElementsByClassName!==st&&v)return t.getElementsByClassName(n)},tt=[],h=[],(e.qsa=ii.test(t.querySelectorAll))&&(l(function(n){n.innerHTML="<select><option selected=''><\/option><\/select>";n.querySelectorAll("[selected]").length||h.push("\\["+f+"*(?:value|"+gt+")");n.querySelectorAll(":checked").length||h.push(":checked")}),l(function(n){var i=t.createElement("input");i.setAttribute("type","hidden");n.appendChild(i).setAttribute("t","");n.querySelectorAll("[t^='']").length&&h.push("[*^$]="+f+"*(?:''|\"\")");n.querySelectorAll(":enabled").length||h.push(":enabled",":disabled");n.querySelectorAll("*,:x");h.push(",.*:")})),(e.matchesSelector=ii.test(at=a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&l(function(n){e.disconnectedMatch=at.call(n,"div");at.call(n,"[s!='']:x");tt.push("!=",ni)}),h=h.length&&new RegExp(h.join("|")),tt=tt.length&&new RegExp(tt.join("|")),ot=ii.test(a.contains)||a.compareDocumentPosition?function(n,t){var r=n.nodeType===9?n.documentElement:n,i=t&&t.parentNode;return n===i||!!(i&&i.nodeType===1&&(r.contains?r.contains(i):n.compareDocumentPosition&&n.compareDocumentPosition(i)&16))}:function(n,t){if(t)while(t=t.parentNode)if(t===n)return!0;return!1},dt=a.compareDocumentPosition?function(n,i){if(n===i)return ft=!0,0;var r=i.compareDocumentPosition&&n.compareDocumentPosition&&n.compareDocumentPosition(i);return r?r&1||!e.sortDetached&&i.compareDocumentPosition(n)===r?n===t||ot(y,n)?-1:i===t||ot(y,i)?1:g?it.call(g,n)-it.call(g,i):0:r&4?-1:1:n.compareDocumentPosition?-1:1}:function(n,i){var r,u=0,o=n.parentNode,s=i.parentNode,f=[n],e=[i];if(n===i)return ft=!0,0;if(o&&s){if(o===s)return bi(n,i)}else return n===t?-1:i===t?1:o?-1:s?1:g?it.call(g,n)-it.call(g,i):0;for(r=n;r=r.parentNode;)f.unshift(r);for(r=i;r=r.parentNode;)e.unshift(r);while(f[u]===e[u])u++;return u?bi(f[u],e[u]):f[u]===y?-1:e[u]===y?1:0},t)};u.matches=function(n,t){return u(n,null,null,t)};u.matchesSelector=function(n,t){if((n.ownerDocument||n)!==s&&nt(n),t=t.replace(ur,"='$1']"),e.matchesSelector&&v&&(!tt||!tt.test(t))&&(!h||!h.test(t)))try{var i=at.call(n,t);if(i||e.disconnectedMatch||n.document&&n.document.nodeType!==11)return i}catch(r){}return u(t,s,null,[n]).length>0};u.contains=function(n,t){return(n.ownerDocument||n)!==s&&nt(n),ot(n,t)};u.attr=function(n,i){(n.ownerDocument||n)!==s&&nt(n);var f=r.attrHandle[i.toLowerCase()],u=f&&gi.call(r.attrHandle,i.toLowerCase())?f(n,i,!v):t;return u===t?e.attributes||!v?n.getAttribute(i):(u=n.getAttributeNode(i))&&u.specified?u.value:null:u};u.error=function(n){throw new Error("Syntax error, unrecognized expression: "+n);};u.uniqueSort=function(n){var r,u=[],t=0,i=0;if(ft=!e.detectDuplicates,g=!e.sortStable&&n.slice(0),n.sort(dt),ft){while(r=n[i++])r===n[i]&&(t=u.push(i));while(t--)n.splice(u[t],1)}return n};ct=u.getText=function(n){var r,i="",u=0,t=n.nodeType;if(t){if(t===1||t===9||t===11){if(typeof n.textContent=="string")return n.textContent;for(n=n.firstChild;n;n=n.nextSibling)i+=ct(n)}else if(t===3||t===4)return n.nodeValue}else for(;r=n[u];u++)i+=ct(r);return i};r=u.selectors={cacheLength:50,createPseudo:c,match:yt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(n){return n[1]=n[1].replace(k,d),n[3]=(n[4]||n[5]||"").replace(k,d),n[2]==="~="&&(n[3]=" "+n[3]+" "),n.slice(0,4)},CHILD:function(n){return n[1]=n[1].toLowerCase(),n[1].slice(0,3)==="nth"?(n[3]||u.error(n[0]),n[4]=+(n[4]?n[5]+(n[6]||1):2*(n[3]==="even"||n[3]==="odd")),n[5]=+(n[7]+n[8]||n[3]==="odd")):n[3]&&u.error(n[0]),n},PSEUDO:function(n){var r,i=!n[5]&&n[2];return yt.CHILD.test(n[0])?null:(n[3]&&n[4]!==t?n[2]=n[4]:i&&fr.test(i)&&(r=pt(i,!0))&&(r=i.indexOf(")",i.length-r)-i.length)&&(n[0]=n[0].slice(0,r),n[2]=i.slice(0,r)),n.slice(0,3))}},filter:{TAG:function(n){var t=n.replace(k,d).toLowerCase();return n==="*"?function(){return!0}:function(n){return n.nodeName&&n.nodeName.toLowerCase()===t}},CLASS:function(n){var t=ci[n+" "];return t||(t=new RegExp("(^|"+f+")"+n+"("+f+"|$)"))&&ci(n,function(n){return t.test(typeof n.className=="string"&&n.className||typeof n.getAttribute!==st&&n.getAttribute("class")||"")})},ATTR:function(n,t,i){return function(r){var f=u.attr(r,n);return f==null?t==="!=":t?(f+="",t==="="?f===i:t==="!="?f!==i:t==="^="?i&&f.indexOf(i)===0:t==="*="?i&&f.indexOf(i)>-1:t==="$="?i&&f.slice(-i.length)===i:t==="~="?(" "+f+" ").indexOf(i)>-1:t==="|="?f===i||f.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(n,t,i,r,u){var s=n.slice(0,3)!=="nth",e=n.slice(-4)!=="last",f=t==="of-type";return r===1&&u===0?function(n){return!!n.parentNode}:function(t,i,h){var a,k,c,l,v,w,b=s!==e?"nextSibling":"previousSibling",y=t.parentNode,g=f&&t.nodeName.toLowerCase(),d=!h&&!f;if(y){if(s){while(b){for(c=t;c=c[b];)if(f?c.nodeName.toLowerCase()===g:c.nodeType===1)return!1;w=b=n==="only"&&!w&&"nextSibling"}return!0}if(w=[e?y.firstChild:y.lastChild],e&&d){for(k=y[o]||(y[o]={}),a=k[n]||[],v=a[0]===p&&a[1],l=a[0]===p&&a[2],c=v&&y.childNodes[v];c=++v&&c&&c[b]||(l=v=0)||w.pop();)if(c.nodeType===1&&++l&&c===t){k[n]=[p,v,l];break}}else if(d&&(a=(t[o]||(t[o]={}))[n])&&a[0]===p)l=a[1];else while(c=++v&&c&&c[b]||(l=v=0)||w.pop())if((f?c.nodeName.toLowerCase()===g:c.nodeType===1)&&++l&&(d&&((c[o]||(c[o]={}))[n]=[p,l]),c===t))break;return l-=u,l===r||l%r==0&&l/r>=0}}},PSEUDO:function(n,t){var f,i=r.pseudos[n]||r.setFilters[n.toLowerCase()]||u.error("unsupported pseudo: "+n);return i[o]?i(t):i.length>1?(f=[n,n,"",t],r.setFilters.hasOwnProperty(n.toLowerCase())?c(function(n,r){for(var u,f=i(n,t),e=f.length;e--;)u=it.call(n,f[e]),n[u]=!(r[u]=f[e])}):function(n){return i(n,0,f)}):i}},pseudos:{not:c(function(n){var i=[],r=[],t=kt(n.replace(vt,"$1"));return t[o]?c(function(n,i,r,u){for(var e,o=t(n,null,u,[]),f=n.length;f--;)(e=o[f])&&(n[f]=!(i[f]=e))}):function(n,u,f){return i[0]=n,t(i,null,f,r),!r.pop()}}),has:c(function(n){return function(t){return u(n,t).length>0}}),contains:c(function(n){return function(t){return(t.textContent||t.innerText||ct(t)).indexOf(n)>-1}}),lang:c(function(n){return er.test(n||"")||u.error("unsupported lang: "+n),n=n.replace(k,d).toLowerCase(),function(t){var i;do if(i=v?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return i=i.toLowerCase(),i===n||i.indexOf(n+"-")===0;while((t=t.parentNode)&&t.nodeType===1);return!1}}),target:function(t){var i=n.location&&n.location.hash;return i&&i.slice(1)===t.id},root:function(n){return n===a},focus:function(n){return n===s.activeElement&&(!s.hasFocus||s.hasFocus())&&!!(n.type||n.href||~n.tabIndex)},enabled:function(n){return n.disabled===!1},disabled:function(n){return n.disabled===!0},checked:function(n){var t=n.nodeName.toLowerCase();return t==="input"&&!!n.checked||t==="option"&&!!n.selected},selected:function(n){return n.parentNode&&n.parentNode.selectedIndex,n.selected===!0},empty:function(n){for(n=n.firstChild;n;n=n.nextSibling)if(n.nodeName>"@"||n.nodeType===3||n.nodeType===4)return!1;return!0},parent:function(n){return!r.pseudos.empty(n)},header:function(n){return hr.test(n.nodeName)},input:function(n){return sr.test(n.nodeName)},button:function(n){var t=n.nodeName.toLowerCase();return t==="input"&&n.type==="button"||t==="button"},text:function(n){var t;return n.nodeName.toLowerCase()==="input"&&n.type==="text"&&((t=n.getAttribute("type"))==null||t.toLowerCase()===n.type)},first:rt(function(){return[0]}),last:rt(function(n,t){return[t-1]}),eq:rt(function(n,t,i){return[i<0?i+t:i]}),even:rt(function(n,t){for(var i=0;i<t;i+=2)n.push(i);return n}),odd:rt(function(n,t){for(var i=1;i<t;i+=2)n.push(i);return n}),lt:rt(function(n,t,i){for(var r=i<0?i+t:i;--r>=0;)n.push(r);return n}),gt:rt(function(n,t,i){for(var r=i<0?i+t:i;++r<t;)n.push(r);return n})}};r.pseudos.nth=r.pseudos.eq;for(ut in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[ut]=lr(ut);for(ut in{submit:!0,reset:!0})r.pseudos[ut]=ar(ut);ki.prototype=r.filters=r.pseudos;r.setFilters=new ki;kt=u.compile=function(n,t){var r,u=[],f=[],i=ai[n+" "];if(!i){for(t||(t=pt(n)),r=t.length;r--;)i=si(t[r]),i[o]?u.push(i):f.push(i);i=ai(n,vr(f,u))}return i};e.sortStable=o.split("").sort(dt).join("")===o;e.detectDuplicates=ft;nt();e.sortDetached=l(function(n){return n.compareDocumentPosition(s.createElement("div"))&1});l(function(n){return n.innerHTML="<a href='#'><\/a>",n.firstChild.getAttribute("href")==="#"})||ui("type|href|height|width",function(n,t,i){if(!i)return n.getAttribute(t,t.toLowerCase()==="type"?1:2)});e.attributes&&l(function(n){return n.innerHTML="<input/>",n.firstChild.setAttribute("value",""),n.firstChild.getAttribute("value")===""})||ui("value",function(n,t,i){if(!i&&n.nodeName.toLowerCase()==="input")return n.defaultValue});l(function(n){return n.getAttribute("disabled")==null})||ui(gt,function(n,t,i){var r;if(!i)return(r=n.getAttributeNode(t))&&r.specified?r.value:n[t]===!0?t.toLowerCase():null});i.find=u;i.expr=u.selectors;i.expr[":"]=i.expr.pseudos;i.unique=u.uniqueSort;i.text=u.getText;i.isXMLDoc=u.isXML;i.contains=u.contains}(n);ni={};i.Callbacks=function(n){n=typeof n=="string"?ni[n]||te(n):i.extend({},n);var s,f,c,e,o,l,r=[],u=!n.once&&[],a=function(t){for(f=n.memory&&t,c=!0,o=l||0,l=0,e=r.length,s=!0;r&&o<e;o++)if(r[o].apply(t[0],t[1])===!1&&n.stopOnFalse){f=!1;break}s=!1;r&&(u?u.length&&a(u.shift()):f?r=[]:h.disable())},h={add:function(){if(r){var t=r.length;(function u(t){i.each(t,function(t,f){var e=i.type(f);e==="function"?n.unique&&h.has(f)||r.push(f):f&&f.length&&e!=="string"&&u(f)})})(arguments);s?e=r.length:f&&(l=t,a(f))}return this},remove:function(){return r&&i.each(arguments,function(n,t){for(var u;(u=i.inArray(t,r,u))>-1;)r.splice(u,1),s&&(u<=e&&e--,u<=o&&o--)}),this},has:function(n){return n?i.inArray(n,r)>-1:!!(r&&r.length)},empty:function(){return r=[],e=0,this},disable:function(){return r=u=f=t,this},disabled:function(){return!r},lock:function(){return u=t,f||h.disable(),this},locked:function(){return!u},fireWith:function(n,t){return r&&(!c||u)&&(t=t||[],t=[n,t.slice?t.slice():t],s?u.push(t):a(t)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!c}};return h};i.extend({Deferred:function(n){var u=[["resolve","done",i.Callbacks("once memory"),"resolved"],["reject","fail",i.Callbacks("once memory"),"rejected"],["notify","progress",i.Callbacks("memory")]],f="pending",r={state:function(){return f},always:function(){return t.done(arguments).fail(arguments),this},then:function(){var n=arguments;return i.Deferred(function(f){i.each(u,function(u,e){var s=e[0],o=i.isFunction(n[u])&&n[u];t[e[1]](function(){var n=o&&o.apply(this,arguments);n&&i.isFunction(n.promise)?n.promise().done(f.resolve).fail(f.reject).progress(f.notify):f[s+"With"](this===r?f.promise():this,o?[n]:arguments)})});n=null}).promise()},promise:function(n){return n!=null?i.extend(n,r):r}},t={};return r.pipe=r.then,i.each(u,function(n,i){var e=i[2],o=i[3];r[i[1]]=e.add;o&&e.add(function(){f=o},u[n^1][2].disable,u[2][2].lock);t[i[0]]=function(){return t[i[0]+"With"](this===t?r:this,arguments),this};t[i[0]+"With"]=e.fireWith}),r.promise(t),n&&n.call(t,t),t},when:function(n){var t=0,u=l.call(arguments),r=u.length,e=r!==1||n&&i.isFunction(n.promise)?r:0,f=e===1?n:i.Deferred(),h=function(n,t,i){return function(r){t[n]=this;i[n]=arguments.length>1?l.call(arguments):r;i===o?f.notifyWith(t,i):--e||f.resolveWith(t,i)}},o,c,s;if(r>1)for(o=new Array(r),c=new Array(r),s=new Array(r);t<r;t++)u[t]&&i.isFunction(u[t].promise)?u[t].promise().done(h(t,s,u)).fail(f.reject).progress(h(t,c,o)):--e;return e||f.resolveWith(s,u),f.promise()}});i.support=function(t){var a,e,f,h,c,l,v,y,s,u=r.createElement("div");if(u.setAttribute("className","t"),u.innerHTML="  <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>",a=u.getElementsByTagName("*")||[],e=u.getElementsByTagName("a")[0],!e||!e.style||!a.length)return t;h=r.createElement("select");l=h.appendChild(r.createElement("option"));f=u.getElementsByTagName("input")[0];e.style.cssText="top:1px;float:left;opacity:.5";t.getSetAttribute=u.className!=="t";t.leadingWhitespace=u.firstChild.nodeType===3;t.tbody=!u.getElementsByTagName("tbody").length;t.htmlSerialize=!!u.getElementsByTagName("link").length;t.style=/top/.test(e.getAttribute("style"));t.hrefNormalized=e.getAttribute("href")==="/a";t.opacity=/^0.5/.test(e.style.opacity);t.cssFloat=!!e.style.cssFloat;t.checkOn=!!f.value;t.optSelected=l.selected;t.enctype=!!r.createElement("form").enctype;t.html5Clone=r.createElement("nav").cloneNode(!0).outerHTML!=="<:nav><\/:nav>";t.inlineBlockNeedsLayout=!1;t.shrinkWrapBlocks=!1;t.pixelPosition=!1;t.deleteExpando=!0;t.noCloneEvent=!0;t.reliableMarginRight=!0;t.boxSizingReliable=!0;f.checked=!0;t.noCloneChecked=f.cloneNode(!0).checked;h.disabled=!0;t.optDisabled=!l.disabled;try{delete u.test}catch(p){t.deleteExpando=!1}f=r.createElement("input");f.setAttribute("value","");t.input=f.getAttribute("value")==="";f.value="t";f.setAttribute("type","radio");t.radioValue=f.value==="t";f.setAttribute("checked","t");f.setAttribute("name","t");c=r.createDocumentFragment();c.appendChild(f);t.appendChecked=f.checked;t.checkClone=c.cloneNode(!0).cloneNode(!0).lastChild.checked;u.attachEvent&&(u.attachEvent("onclick",function(){t.noCloneEvent=!1}),u.cloneNode(!0).click());for(s in{submit:!0,change:!0,focusin:!0})u.setAttribute(v="on"+s,"t"),t[s+"Bubbles"]=v in n||u.attributes[v].expando===!1;u.style.backgroundClip="content-box";u.cloneNode(!0).style.backgroundClip="";t.clearCloneStyle=u.style.backgroundClip==="content-box";for(s in i(t))break;return t.ownLast=s!=="0",i(function(){var h,e,f,c="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",s=r.getElementsByTagName("body")[0];s&&(h=r.createElement("div"),h.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",s.appendChild(h).appendChild(u),u.innerHTML="<table><tr><td><\/td><td>t<\/td><\/tr><\/table>",f=u.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",y=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",t.reliableHiddenOffsets=y&&f[0].offsetHeight===0,u.innerHTML="",u.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",i.swap(s,s.style.zoom!=null?{zoom:1}:{},function(){t.boxSizing=u.offsetWidth===4}),n.getComputedStyle&&(t.pixelPosition=(n.getComputedStyle(u,null)||{}).top!=="1%",t.boxSizingReliable=(n.getComputedStyle(u,null)||{width:"4px"}).width==="4px",e=u.appendChild(r.createElement("div")),e.style.cssText=u.style.cssText=c,e.style.marginRight=e.style.width="0",u.style.width="1px",t.reliableMarginRight=!parseFloat((n.getComputedStyle(e,null)||{}).marginRight)),typeof u.style.zoom!==o&&(u.innerHTML="",u.style.cssText=c+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=u.offsetWidth===3,u.style.display="block",u.innerHTML="<div><\/div>",u.firstChild.style.width="5px",t.shrinkWrapBlocks=u.offsetWidth!==3,t.inlineBlockNeedsLayout&&(s.style.zoom=1)),s.removeChild(h),h=u=f=e=null)}),a=h=c=l=e=f=null,t}({});ir=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/;rr=/([A-Z])/g;i.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(n){return n=n.nodeType?i.cache[n[i.expando]]:n[i.expando],!!n&&!ti(n)},data:function(n,t,i){return ur(n,t,i)},removeData:function(n,t){return fr(n,t)},_data:function(n,t,i){return ur(n,t,i,!0)},_removeData:function(n,t){return fr(n,t,!0)},acceptData:function(n){if(n.nodeType&&n.nodeType!==1&&n.nodeType!==9)return!1;var t=n.nodeName&&i.noData[n.nodeName.toLowerCase()];return!t||t!==!0&&n.getAttribute("classid")===t}});i.fn.extend({data:function(n,r){var e,f,o=null,s=0,u=this[0];if(n===t){if(this.length&&(o=i.data(u),u.nodeType===1&&!i._data(u,"parsedAttrs"))){for(e=u.attributes;s<e.length;s++)f=e[s].name,f.indexOf("data-")===0&&(f=i.camelCase(f.slice(5)),er(u,f,o[f]));i._data(u,"parsedAttrs",!0)}return o}return typeof n=="object"?this.each(function(){i.data(this,n)}):arguments.length>1?this.each(function(){i.data(this,n,r)}):u?er(u,n,i.data(u,n)):null},removeData:function(n){return this.each(function(){i.removeData(this,n)})}});i.extend({queue:function(n,t,r){var u;if(n)return t=(t||"fx")+"queue",u=i._data(n,t),r&&(!u||i.isArray(r)?u=i._data(n,t,i.makeArray(r)):u.push(r)),u||[]},dequeue:function(n,t){t=t||"fx";var r=i.queue(n,t),e=r.length,u=r.shift(),f=i._queueHooks(n,t),o=function(){i.dequeue(n,t)};u==="inprogress"&&(u=r.shift(),e--);u&&(t==="fx"&&r.unshift("inprogress"),delete f.stop,u.call(n,o,f));!e&&f&&f.empty.fire()},_queueHooks:function(n,t){var r=t+"queueHooks";return i._data(n,r)||i._data(n,r,{empty:i.Callbacks("once memory").add(function(){i._removeData(n,t+"queue");i._removeData(n,r)})})}});i.fn.extend({queue:function(n,r){var u=2;return(typeof n!="string"&&(r=n,n="fx",u--),arguments.length<u)?i.queue(this[0],n):r===t?this:this.each(function(){var t=i.queue(this,n,r);i._queueHooks(this,n);n==="fx"&&t[0]!=="inprogress"&&i.dequeue(this,n)})},dequeue:function(n){return this.each(function(){i.dequeue(this,n)})},delay:function(n,t){return n=i.fx?i.fx.speeds[n]||n:n,t=t||"fx",this.queue(t,function(t,i){var r=setTimeout(t,n);i.stop=function(){clearTimeout(r)}})},clearQueue:function(n){return this.queue(n||"fx",[])},promise:function(n,r){var u,e=1,o=i.Deferred(),f=this,s=this.length,h=function(){--e||o.resolveWith(f,[f])};for(typeof n!="string"&&(r=n,n=t),n=n||"fx";s--;)u=i._data(f[s],n+"queueHooks"),u&&u.empty&&(e++,u.empty.add(h));return h(),o.promise(r)}});var d,or,ii=/[\t\r\n\f]/g,ie=/\r/g,re=/^(?:input|select|textarea|button|object)$/i,ue=/^(?:a|area)$/i,ri=/^(?:checked|selected)$/i,a=i.support.getSetAttribute,ht=i.support.input;i.fn.extend({attr:function(n,t){return i.access(this,i.attr,n,t,arguments.length>1)},removeAttr:function(n){return this.each(function(){i.removeAttr(this,n)})},prop:function(n,t){return i.access(this,i.prop,n,t,arguments.length>1)},removeProp:function(n){return n=i.propFix[n]||n,this.each(function(){try{this[n]=t;delete this[n]}catch(i){}})},addClass:function(n){var e,t,r,u,o,f=0,h=this.length,c=typeof n=="string"&&n;if(i.isFunction(n))return this.each(function(t){i(this).addClass(n.call(this,t,this.className))});if(c)for(e=(n||"").match(s)||[];f<h;f++)if(t=this[f],r=t.nodeType===1&&(t.className?(" "+t.className+" ").replace(ii," "):" "),r){for(o=0;u=e[o++];)r.indexOf(" "+u+" ")<0&&(r+=u+" ");t.className=i.trim(r)}return this},removeClass:function(n){var e,r,t,u,o,f=0,h=this.length,c=arguments.length===0||typeof n=="string"&&n;if(i.isFunction(n))return this.each(function(t){i(this).removeClass(n.call(this,t,this.className))});if(c)for(e=(n||"").match(s)||[];f<h;f++)if(r=this[f],t=r.nodeType===1&&(r.className?(" "+r.className+" ").replace(ii," "):""),t){for(o=0;u=e[o++];)while(t.indexOf(" "+u+" ")>=0)t=t.replace(" "+u+" "," ");r.className=n?i.trim(t):""}return this},toggleClass:function(n,t){var r=typeof n;return typeof t=="boolean"&&r==="string"?t?this.addClass(n):this.removeClass(n):i.isFunction(n)?this.each(function(r){i(this).toggleClass(n.call(this,r,this.className,t),t)}):this.each(function(){if(r==="string")for(var t,f=0,u=i(this),e=n.match(s)||[];t=e[f++];)u.hasClass(t)?u.removeClass(t):u.addClass(t);else(r===o||r==="boolean")&&(this.className&&i._data(this,"__className__",this.className),this.className=this.className||n===!1?"":i._data(this,"__className__")||"")})},hasClass:function(n){for(var i=" "+n+" ",t=0,r=this.length;t<r;t++)if(this[t].nodeType===1&&(" "+this[t].className+" ").replace(ii," ").indexOf(i)>=0)return!0;return!1},val:function(n){var u,r,e,f=this[0];return arguments.length?(e=i.isFunction(n),this.each(function(u){var f;this.nodeType===1&&(f=e?n.call(this,u,i(this).val()):n,f==null?f="":typeof f=="number"?f+="":i.isArray(f)&&(f=i.map(f,function(n){return n==null?"":n+""})),r=i.valHooks[this.type]||i.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,f,"value")!==t||(this.value=f))})):f?(r=i.valHooks[f.type]||i.valHooks[f.nodeName.toLowerCase()],r&&"get"in r&&(u=r.get(f,"value"))!==t)?u:(u=f.value,typeof u=="string"?u.replace(ie,""):u==null?"":u):void 0}});i.extend({valHooks:{option:{get:function(n){var t=i.find.attr(n,"value");return t!=null?t:n.text}},select:{get:function(n){for(var e,t,o=n.options,r=n.selectedIndex,u=n.type==="select-one"||r<0,s=u?null:[],h=u?r+1:o.length,f=r<0?h:u?r:0;f<h;f++)if(t=o[f],(t.selected||f===r)&&(i.support.optDisabled?!t.disabled:t.getAttribute("disabled")===null)&&(!t.parentNode.disabled||!i.nodeName(t.parentNode,"optgroup"))){if(e=i(t).val(),u)return e;s.push(e)}return s},set:function(n,t){for(var u,r,f=n.options,e=i.makeArray(t),o=f.length;o--;)r=f[o],(r.selected=i.inArray(i(r).val(),e)>=0)&&(u=!0);return u||(n.selectedIndex=-1),e}}},attr:function(n,r,u){var f,e,s=n.nodeType;if(n&&s!==3&&s!==8&&s!==2){if(typeof n.getAttribute===o)return i.prop(n,r,u);if(s===1&&i.isXMLDoc(n)||(r=r.toLowerCase(),f=i.attrHooks[r]||(i.expr.match.bool.test(r)?or:d)),u!==t)if(u===null)i.removeAttr(n,r);else return f&&"set"in f&&(e=f.set(n,u,r))!==t?e:(n.setAttribute(r,u+""),u);else return f&&"get"in f&&(e=f.get(n,r))!==null?e:(e=i.find.attr(n,r),e==null?t:e)}},removeAttr:function(n,t){var r,u,e=0,f=t&&t.match(s);if(f&&n.nodeType===1)while(r=f[e++])u=i.propFix[r]||r,i.expr.match.bool.test(r)?ht&&a||!ri.test(r)?n[u]=!1:n[i.camelCase("default-"+r)]=n[u]=!1:i.attr(n,r,""),n.removeAttribute(a?r:u)},attrHooks:{type:{set:function(n,t){if(!i.support.radioValue&&t==="radio"&&i.nodeName(n,"input")){var r=n.value;return n.setAttribute("type",t),r&&(n.value=r),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(n,r,u){var e,f,s,o=n.nodeType;if(n&&o!==3&&o!==8&&o!==2)return s=o!==1||!i.isXMLDoc(n),s&&(r=i.propFix[r]||r,f=i.propHooks[r]),u!==t?f&&"set"in f&&(e=f.set(n,u,r))!==t?e:n[r]=u:f&&"get"in f&&(e=f.get(n,r))!==null?e:n[r]},propHooks:{tabIndex:{get:function(n){var t=i.find.attr(n,"tabindex");return t?parseInt(t,10):re.test(n.nodeName)||ue.test(n.nodeName)&&n.href?0:-1}}}});or={set:function(n,t,r){return t===!1?i.removeAttr(n,r):ht&&a||!ri.test(r)?n.setAttribute(!a&&i.propFix[r]||r,r):n[i.camelCase("default-"+r)]=n[r]=!0,r}};i.each(i.expr.match.bool.source.match(/\w+/g),function(n,r){var u=i.expr.attrHandle[r]||i.find.attr;i.expr.attrHandle[r]=ht&&a||!ri.test(r)?function(n,r,f){var e=i.expr.attrHandle[r],o=f?t:(i.expr.attrHandle[r]=t)!=u(n,r,f)?r.toLowerCase():null;return i.expr.attrHandle[r]=e,o}:function(n,r,u){return u?t:n[i.camelCase("default-"+r)]?r.toLowerCase():null}});ht&&a||(i.attrHooks.value={set:function(n,t,r){if(i.nodeName(n,"input"))n.defaultValue=t;else return d&&d.set(n,t,r)}});a||(d={set:function(n,i,r){var u=n.getAttributeNode(r);return u||n.setAttributeNode(u=n.ownerDocument.createAttribute(r)),u.value=i+="",r==="value"||i===n.getAttribute(r)?i:t}},i.expr.attrHandle.id=i.expr.attrHandle.name=i.expr.attrHandle.coords=function(n,i,r){var u;return r?t:(u=n.getAttributeNode(i))&&u.value!==""?u.value:null},i.valHooks.button={get:function(n,i){var r=n.getAttributeNode(i);return r&&r.specified?r.value:t},set:d.set},i.attrHooks.contenteditable={set:function(n,t,i){d.set(n,t===""?!1:t,i)}},i.each(["width","height"],function(n,t){i.attrHooks[t]={set:function(n,i){if(i==="")return n.setAttribute(t,"auto"),i}}}));i.support.hrefNormalized||i.each(["href","src"],function(n,t){i.propHooks[t]={get:function(n){return n.getAttribute(t,4)}}});i.support.style||(i.attrHooks.style={get:function(n){return n.style.cssText||t},set:function(n,t){return n.style.cssText=t+""}});i.support.optSelected||(i.propHooks.selected={get:function(n){var t=n.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}});i.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){i.propFix[this.toLowerCase()]=this});i.support.enctype||(i.propFix.enctype="encoding");i.each(["radio","checkbox"],function(){i.valHooks[this]={set:function(n,t){if(i.isArray(t))return n.checked=i.inArray(i(n).val(),t)>=0}};i.support.checkOn||(i.valHooks[this].get=function(n){return n.getAttribute("value")===null?"on":n.value})});var ui=/^(?:input|select|textarea)$/i,fe=/^key/,ee=/^(?:mouse|contextmenu)|click/,sr=/^(?:focusinfocus|focusoutblur)$/,hr=/^([^.]*)(?:\.(.+)|)$/;i.event={global:{},add:function(n,r,u,f,e){var b,p,k,w,c,l,a,v,h,d,g,y=i._data(n);if(y){for(u.handler&&(w=u,u=w.handler,e=w.selector),u.guid||(u.guid=i.guid++),(p=y.events)||(p=y.events={}),(l=y.handle)||(l=y.handle=function(n){return typeof i!==o&&(!n||i.event.triggered!==n.type)?i.event.dispatch.apply(l.elem,arguments):t},l.elem=n),r=(r||"").match(s)||[""],k=r.length;k--;)(b=hr.exec(r[k])||[],h=g=b[1],d=(b[2]||"").split(".").sort(),h)&&(c=i.event.special[h]||{},h=(e?c.delegateType:c.bindType)||h,c=i.event.special[h]||{},a=i.extend({type:h,origType:g,data:f,handler:u,guid:u.guid,selector:e,needsContext:e&&i.expr.match.needsContext.test(e),namespace:d.join(".")},w),(v=p[h])||(v=p[h]=[],v.delegateCount=0,c.setup&&c.setup.call(n,f,d,l)!==!1||(n.addEventListener?n.addEventListener(h,l,!1):n.attachEvent&&n.attachEvent("on"+h,l))),c.add&&(c.add.call(n,a),a.handler.guid||(a.handler.guid=u.guid)),e?v.splice(v.delegateCount++,0,a):v.push(a),i.event.global[h]=!0);n=null}},remove:function(n,t,r,u,f){var y,o,h,b,p,a,c,l,e,w,k,v=i.hasData(n)&&i._data(n);if(v&&(a=v.events)){for(t=(t||"").match(s)||[""],p=t.length;p--;){if(h=hr.exec(t[p])||[],e=k=h[1],w=(h[2]||"").split(".").sort(),!e){for(e in a)i.event.remove(n,e+t[p],r,u,!0);continue}for(c=i.event.special[e]||{},e=(u?c.delegateType:c.bindType)||e,l=a[e]||[],h=h[2]&&new RegExp("(^|\\.)"+w.join("\\.(?:.*\\.|)")+"(\\.|$)"),b=y=l.length;y--;)o=l[y],(f||k===o.origType)&&(!r||r.guid===o.guid)&&(!h||h.test(o.namespace))&&(!u||u===o.selector||u==="**"&&o.selector)&&(l.splice(y,1),o.selector&&l.delegateCount--,c.remove&&c.remove.call(n,o));b&&!l.length&&(c.teardown&&c.teardown.call(n,w,v.handle)!==!1||i.removeEvent(n,e,v.handle),delete a[e])}i.isEmptyObject(a)&&(delete v.handle,i._removeData(n,"events"))}},trigger:function(u,f,e,o){var a,v,s,w,l,c,b,p=[e||r],h=k.call(u,"type")?u.type:u,y=k.call(u,"namespace")?u.namespace.split("."):[];if((s=c=e=e||r,e.nodeType!==3&&e.nodeType!==8)&&!sr.test(h+i.event.triggered)&&(h.indexOf(".")>=0&&(y=h.split("."),h=y.shift(),y.sort()),v=h.indexOf(":")<0&&"on"+h,u=u[i.expando]?u:new i.Event(h,typeof u=="object"&&u),u.isTrigger=o?2:3,u.namespace=y.join("."),u.namespace_re=u.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,u.result=t,u.target||(u.target=e),f=f==null?[u]:i.makeArray(f,[u]),l=i.event.special[h]||{},o||!l.trigger||l.trigger.apply(e,f)!==!1)){if(!o&&!l.noBubble&&!i.isWindow(e)){for(w=l.delegateType||h,sr.test(w+h)||(s=s.parentNode);s;s=s.parentNode)p.push(s),c=s;c===(e.ownerDocument||r)&&p.push(c.defaultView||c.parentWindow||n)}for(b=0;(s=p[b++])&&!u.isPropagationStopped();)u.type=b>1?w:l.bindType||h,a=(i._data(s,"events")||{})[u.type]&&i._data(s,"handle"),a&&a.apply(s,f),a=v&&s[v],a&&i.acceptData(s)&&a.apply&&a.apply(s,f)===!1&&u.preventDefault();if(u.type=h,!o&&!u.isDefaultPrevented()&&(!l._default||l._default.apply(p.pop(),f)===!1)&&i.acceptData(e)&&v&&e[h]&&!i.isWindow(e)){c=e[v];c&&(e[v]=null);i.event.triggered=h;try{e[h]()}catch(d){}i.event.triggered=t;c&&(e[v]=c)}return u.result}},dispatch:function(n){n=i.event.fix(n);var o,e,r,u,s,h=[],c=l.call(arguments),a=(i._data(this,"events")||{})[n.type]||[],f=i.event.special[n.type]||{};if(c[0]=n,n.delegateTarget=this,!f.preDispatch||f.preDispatch.call(this,n)!==!1){for(h=i.event.handlers.call(this,n,a),o=0;(u=h[o++])&&!n.isPropagationStopped();)for(n.currentTarget=u.elem,s=0;(r=u.handlers[s++])&&!n.isImmediatePropagationStopped();)(!n.namespace_re||n.namespace_re.test(r.namespace))&&(n.handleObj=r,n.data=r.data,e=((i.event.special[r.origType]||{}).handle||r.handler).apply(u.elem,c),e!==t&&(n.result=e)===!1&&(n.preventDefault(),n.stopPropagation()));return f.postDispatch&&f.postDispatch.call(this,n),n.result}},handlers:function(n,r){var e,o,f,s,c=[],h=r.delegateCount,u=n.target;if(h&&u.nodeType&&(!n.button||n.type!=="click"))for(;u!=this;u=u.parentNode||this)if(u.nodeType===1&&(u.disabled!==!0||n.type!=="click")){for(f=[],s=0;s<h;s++)o=r[s],e=o.selector+" ",f[e]===t&&(f[e]=o.needsContext?i(e,this).index(u)>=0:i.find(e,this,null,[u]).length),f[e]&&f.push(o);f.length&&c.push({elem:u,handlers:f})}return h<r.length&&c.push({elem:this,handlers:r.slice(h)}),c},fix:function(n){if(n[i.expando])return n;var e,o,s,u=n.type,f=n,t=this.fixHooks[u];for(t||(this.fixHooks[u]=t=ee.test(u)?this.mouseHooks:fe.test(u)?this.keyHooks:{}),s=t.props?this.props.concat(t.props):this.props,n=new i.Event(f),e=s.length;e--;)o=s[e],n[o]=f[o];return n.target||(n.target=f.srcElement||r),n.target.nodeType===3&&(n.target=n.target.parentNode),n.metaKey=!!n.metaKey,t.filter?t.filter(n,f):n},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(n,t){return n.which==null&&(n.which=t.charCode!=null?t.charCode:t.keyCode),n}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(n,i){var u,o,f,e=i.button,s=i.fromElement;return n.pageX==null&&i.clientX!=null&&(o=n.target.ownerDocument||r,f=o.documentElement,u=o.body,n.pageX=i.clientX+(f&&f.scrollLeft||u&&u.scrollLeft||0)-(f&&f.clientLeft||u&&u.clientLeft||0),n.pageY=i.clientY+(f&&f.scrollTop||u&&u.scrollTop||0)-(f&&f.clientTop||u&&u.clientTop||0)),!n.relatedTarget&&s&&(n.relatedTarget=s===n.target?i.toElement:s),n.which||e===t||(n.which=e&1?1:e&2?3:e&4?2:0),n}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cr()&&this.focus)try{return this.focus(),!1}catch(n){}},delegateType:"focusin"},blur:{trigger:function(){if(this===cr()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if(i.nodeName(this,"input")&&this.type==="checkbox"&&this.click)return this.click(),!1},_default:function(n){return i.nodeName(n.target,"a")}},beforeunload:{postDispatch:function(n){n.result!==t&&(n.originalEvent.returnValue=n.result)}}},simulate:function(n,t,r,u){var f=i.extend(new i.Event,r,{type:n,isSimulated:!0,originalEvent:{}});u?i.event.trigger(f,null,t):i.event.dispatch.call(t,f);f.isDefaultPrevented()&&r.preventDefault()}};i.removeEvent=r.removeEventListener?function(n,t,i){n.removeEventListener&&n.removeEventListener(t,i,!1)}:function(n,t,i){var r="on"+t;n.detachEvent&&(typeof n[r]===o&&(n[r]=null),n.detachEvent(r,i))};i.Event=function(n,t){if(!(this instanceof i.Event))return new i.Event(n,t);n&&n.type?(this.originalEvent=n,this.type=n.type,this.isDefaultPrevented=n.defaultPrevented||n.returnValue===!1||n.getPreventDefault&&n.getPreventDefault()?ct:g):this.type=n;t&&i.extend(this,t);this.timeStamp=n&&n.timeStamp||i.now();this[i.expando]=!0};i.Event.prototype={isDefaultPrevented:g,isPropagationStopped:g,isImmediatePropagationStopped:g,preventDefault:function(){var n=this.originalEvent;(this.isDefaultPrevented=ct,n)&&(n.preventDefault?n.preventDefault():n.returnValue=!1)},stopPropagation:function(){var n=this.originalEvent;(this.isPropagationStopped=ct,n)&&(n.stopPropagation&&n.stopPropagation(),n.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ct;this.stopPropagation()}};i.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(n,t){i.event.special[n]={delegateType:t,bindType:t,handle:function(n){var u,f=this,r=n.relatedTarget,e=n.handleObj;return r&&(r===f||i.contains(f,r))||(n.type=e.origType,u=e.handler.apply(this,arguments),n.type=t),u}}});i.support.submitBubbles||(i.event.special.submit={setup:function(){if(i.nodeName(this,"form"))return!1;i.event.add(this,"click._submit keypress._submit",function(n){var u=n.target,r=i.nodeName(u,"input")||i.nodeName(u,"button")?u.form:t;r&&!i._data(r,"submitBubbles")&&(i.event.add(r,"submit._submit",function(n){n._submit_bubble=!0}),i._data(r,"submitBubbles",!0))})},postDispatch:function(n){n._submit_bubble&&(delete n._submit_bubble,this.parentNode&&!n.isTrigger&&i.event.simulate("submit",this.parentNode,n,!0))},teardown:function(){if(i.nodeName(this,"form"))return!1;i.event.remove(this,"._submit")}});i.support.changeBubbles||(i.event.special.change={setup:function(){if(ui.test(this.nodeName))return(this.type==="checkbox"||this.type==="radio")&&(i.event.add(this,"propertychange._change",function(n){n.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),i.event.add(this,"click._change",function(n){this._just_changed&&!n.isTrigger&&(this._just_changed=!1);i.event.simulate("change",this,n,!0)})),!1;i.event.add(this,"beforeactivate._change",function(n){var t=n.target;ui.test(t.nodeName)&&!i._data(t,"changeBubbles")&&(i.event.add(t,"change._change",function(n){!this.parentNode||n.isSimulated||n.isTrigger||i.event.simulate("change",this.parentNode,n,!0)}),i._data(t,"changeBubbles",!0))})},handle:function(n){var t=n.target;if(this!==t||n.isSimulated||n.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return n.handleObj.handler.apply(this,arguments)},teardown:function(){return i.event.remove(this,"._change"),!ui.test(this.nodeName)}});i.support.focusinBubbles||i.each({focus:"focusin",blur:"focusout"},function(n,t){var u=0,f=function(n){i.event.simulate(t,n.target,i.event.fix(n),!0)};i.event.special[t]={setup:function(){u++==0&&r.addEventListener(n,f,!0)},teardown:function(){--u==0&&r.removeEventListener(n,f,!0)}}});i.fn.extend({on:function(n,r,u,f,e){var s,o;if(typeof n=="object"){typeof r!="string"&&(u=u||r,r=t);for(s in n)this.on(s,r,u,n[s],e);return this}if(u==null&&f==null?(f=r,u=r=t):f==null&&(typeof r=="string"?(f=u,u=t):(f=u,u=r,r=t)),f===!1)f=g;else if(!f)return this;return e===1&&(o=f,f=function(n){return i().off(n),o.apply(this,arguments)},f.guid=o.guid||(o.guid=i.guid++)),this.each(function(){i.event.add(this,n,f,u,r)})},one:function(n,t,i,r){return this.on(n,t,i,r,1)},off:function(n,r,u){var f,e;if(n&&n.preventDefault&&n.handleObj)return f=n.handleObj,i(n.delegateTarget).off(f.namespace?f.origType+"."+f.namespace:f.origType,f.selector,f.handler),this;if(typeof n=="object"){for(e in n)this.off(e,r,n[e]);return this}return(r===!1||typeof r=="function")&&(u=r,r=t),u===!1&&(u=g),this.each(function(){i.event.remove(this,n,u,r)})},trigger:function(n,t){return this.each(function(){i.event.trigger(n,t,this)})},triggerHandler:function(n,t){var r=this[0];if(r)return i.event.trigger(n,t,r,!0)}});var oe=/^.[^:#\[\.,]*$/,se=/^(?:parents|prev(?:Until|All))/,lr=i.expr.match.needsContext,he={children:!0,contents:!0,next:!0,prev:!0};i.fn.extend({find:function(n){var t,r=[],u=this,f=u.length;if(typeof n!="string")return this.pushStack(i(n).filter(function(){for(t=0;t<f;t++)if(i.contains(u[t],this))return!0}));for(t=0;t<f;t++)i.find(n,u[t],r);return r=this.pushStack(f>1?i.unique(r):r),r.selector=this.selector?this.selector+" "+n:n,r},has:function(n){var t,r=i(n,this),u=r.length;return this.filter(function(){for(t=0;t<u;t++)if(i.contains(this,r[t]))return!0})},not:function(n){return this.pushStack(fi(this,n||[],!0))},filter:function(n){return this.pushStack(fi(this,n||[],!1))},is:function(n){return!!fi(this,typeof n=="string"&&lr.test(n)?i(n):n||[],!1).length},closest:function(n,t){for(var r,f=0,o=this.length,u=[],e=lr.test(n)||typeof n!="string"?i(n,t||this.context):0;f<o;f++)for(r=this[f];r&&r!==t;r=r.parentNode)if(r.nodeType<11&&(e?e.index(r)>-1:r.nodeType===1&&i.find.matchesSelector(r,n))){r=u.push(r);break}return this.pushStack(u.length>1?i.unique(u):u)},index:function(n){return n?typeof n=="string"?i.inArray(this[0],i(n)):i.inArray(n.jquery?n[0]:n,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(n,t){var r=typeof n=="string"?i(n,t):i.makeArray(n&&n.nodeType?[n]:n),u=i.merge(this.get(),r);return this.pushStack(i.unique(u))},addBack:function(n){return this.add(n==null?this.prevObject:this.prevObject.filter(n))}});i.each({parent:function(n){var t=n.parentNode;return t&&t.nodeType!==11?t:null},parents:function(n){return i.dir(n,"parentNode")},parentsUntil:function(n,t,r){return i.dir(n,"parentNode",r)},next:function(n){return ar(n,"nextSibling")},prev:function(n){return ar(n,"previousSibling")},nextAll:function(n){return i.dir(n,"nextSibling")},prevAll:function(n){return i.dir(n,"previousSibling")},nextUntil:function(n,t,r){return i.dir(n,"nextSibling",r)},prevUntil:function(n,t,r){return i.dir(n,"previousSibling",r)},siblings:function(n){return i.sibling((n.parentNode||{}).firstChild,n)},children:function(n){return i.sibling(n.firstChild)},contents:function(n){return i.nodeName(n,"iframe")?n.contentDocument||n.contentWindow.document:i.merge([],n.childNodes)}},function(n,t){i.fn[n]=function(r,u){var f=i.map(this,t,r);return n.slice(-5)!=="Until"&&(u=r),u&&typeof u=="string"&&(f=i.filter(u,f)),this.length>1&&(he[n]||(f=i.unique(f)),se.test(n)&&(f=f.reverse())),this.pushStack(f)}});i.extend({filter:function(n,t,r){var u=t[0];return r&&(n=":not("+n+")"),t.length===1&&u.nodeType===1?i.find.matchesSelector(u,n)?[u]:[]:i.find.matches(n,i.grep(t,function(n){return n.nodeType===1}))},dir:function(n,r,u){for(var e=[],f=n[r];f&&f.nodeType!==9&&(u===t||f.nodeType!==1||!i(f).is(u));)f.nodeType===1&&e.push(f),f=f[r];return e},sibling:function(n,t){for(var i=[];n;n=n.nextSibling)n.nodeType===1&&n!==t&&i.push(n);return i}});var yr="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ce=/ jQuery\d+="(?:null|\d+)"/g,pr=new RegExp("<(?:"+yr+")[\\s/>]","i"),ei=/^\s+/,wr=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,br=/<([\w:]+)/,kr=/<tbody/i,le=/<|&#?\w+;/,ae=/<(?:script|style|link)/i,oi=/^(?:checkbox|radio)$/i,ve=/checked\s*(?:[^=]|=\s*.checked.)/i,dr=/^$|\/(?:java|ecma)script/i,ye=/^true\/(.*)/,pe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,e={option:[1,"<select multiple='multiple'>","<\/select>"],legend:[1,"<fieldset>","<\/fieldset>"],area:[1,"<map>","<\/map>"],param:[1,"<object>","<\/object>"],thead:[1,"<table>","<\/table>"],tr:[2,"<table><tbody>","<\/tbody><\/table>"],col:[2,"<table><tbody><\/tbody><colgroup>","<\/colgroup><\/table>"],td:[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],_default:i.support.htmlSerialize?[0,"",""]:[1,"X<div>","<\/div>"]},we=vr(r),si=we.appendChild(r.createElement("div"));e.optgroup=e.option;e.tbody=e.tfoot=e.colgroup=e.caption=e.thead;e.th=e.td;i.fn.extend({text:function(n){return i.access(this,function(n){return n===t?i.text(this):this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(n))},null,n,arguments.length)},append:function(){return this.domManip(arguments,function(n){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=gr(this,n);t.appendChild(n)}})},prepend:function(){return this.domManip(arguments,function(n){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=gr(this,n);t.insertBefore(n,t.firstChild)}})},before:function(){return this.domManip(arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this)})},after:function(){return this.domManip(arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling)})},remove:function(n,t){for(var r,e=n?i.filter(n,this):this,f=0;(r=e[f])!=null;f++)t||r.nodeType!==1||i.cleanData(u(r)),r.parentNode&&(t&&i.contains(r.ownerDocument,r)&&hi(u(r,"script")),r.parentNode.removeChild(r));return this},empty:function(){for(var n,t=0;(n=this[t])!=null;t++){for(n.nodeType===1&&i.cleanData(u(n,!1));n.firstChild;)n.removeChild(n.firstChild);n.options&&i.nodeName(n,"select")&&(n.options.length=0)}return this},clone:function(n,t){return n=n==null?!1:n,t=t==null?n:t,this.map(function(){return i.clone(this,n,t)})},html:function(n){return i.access(this,function(n){var r=this[0]||{},f=0,o=this.length;if(n===t)return r.nodeType===1?r.innerHTML.replace(ce,""):t;if(typeof n=="string"&&!ae.test(n)&&(i.support.htmlSerialize||!pr.test(n))&&(i.support.leadingWhitespace||!ei.test(n))&&!e[(br.exec(n)||["",""])[1].toLowerCase()]){n=n.replace(wr,"<$1><\/$2>");try{for(;f<o;f++)r=this[f]||{},r.nodeType===1&&(i.cleanData(u(r,!1)),r.innerHTML=n);r=0}catch(s){}}r&&this.empty().append(n)},null,n,arguments.length)},replaceWith:function(){var t=i.map(this,function(n){return[n.nextSibling,n.parentNode]}),n=0;return this.domManip(arguments,function(r){var u=t[n++],f=t[n++];f&&(u&&u.parentNode!==f&&(u=this.nextSibling),i(this).remove(),f.insertBefore(r,u))},!0),n?this:this.remove()},detach:function(n){return this.remove(n,!0)},domManip:function(n,t,r){n=di.apply([],n);var h,f,c,o,v,s,e=0,l=this.length,p=this,w=l-1,a=n[0],y=i.isFunction(a);if(y||!(l<=1||typeof a!="string"||i.support.checkClone||!ve.test(a)))return this.each(function(i){var u=p.eq(i);y&&(n[0]=a.call(this,i,u.html()));u.domManip(n,t,r)});if(l&&(s=i.buildFragment(n,this[0].ownerDocument,!1,!r&&this),h=s.firstChild,s.childNodes.length===1&&(s=h),h)){for(o=i.map(u(s,"script"),nu),c=o.length;e<l;e++)f=s,e!==w&&(f=i.clone(f,!0,!0),c&&i.merge(o,u(f,"script"))),t.call(this[e],f,e);if(c)for(v=o[o.length-1].ownerDocument,i.map(o,tu),e=0;e<c;e++)f=o[e],dr.test(f.type||"")&&!i._data(f,"globalEval")&&i.contains(v,f)&&(f.src?i._evalUrl(f.src):i.globalEval((f.text||f.textContent||f.innerHTML||"").replace(pe,"")));s=h=null}return this}});i.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(n,t){i.fn[n]=function(n){for(var u,r=0,f=[],e=i(n),o=e.length-1;r<=o;r++)u=r===o?this:this.clone(!0),i(e[r])[t](u),kt.apply(f,u.get());return this.pushStack(f)}});i.extend({clone:function(n,t,r){var f,h,o,e,s,c=i.contains(n.ownerDocument,n);if(i.support.html5Clone||i.isXMLDoc(n)||!pr.test("<"+n.nodeName+">")?o=n.cloneNode(!0):(si.innerHTML=n.outerHTML,si.removeChild(o=si.firstChild)),(!i.support.noCloneEvent||!i.support.noCloneChecked)&&(n.nodeType===1||n.nodeType===11)&&!i.isXMLDoc(n))for(f=u(o),s=u(n),e=0;(h=s[e])!=null;++e)f[e]&&be(h,f[e]);if(t)if(r)for(s=s||u(n),f=f||u(o),e=0;(h=s[e])!=null;e++)iu(h,f[e]);else iu(n,o);return f=u(o,"script"),f.length>0&&hi(f,!c&&u(n,"script")),f=s=h=null,o},buildFragment:function(n,t,r,f){for(var h,o,w,s,y,p,l,b=n.length,a=vr(t),c=[],v=0;v<b;v++)if(o=n[v],o||o===0)if(i.type(o)==="object")i.merge(c,o.nodeType?[o]:o);else if(le.test(o)){for(s=s||a.appendChild(t.createElement("div")),y=(br.exec(o)||["",""])[1].toLowerCase(),l=e[y]||e._default,s.innerHTML=l[1]+o.replace(wr,"<$1><\/$2>")+l[2],h=l[0];h--;)s=s.lastChild;if(!i.support.leadingWhitespace&&ei.test(o)&&c.push(t.createTextNode(ei.exec(o)[0])),!i.support.tbody)for(o=y==="table"&&!kr.test(o)?s.firstChild:l[1]==="<table>"&&!kr.test(o)?s:0,h=o&&o.childNodes.length;h--;)i.nodeName(p=o.childNodes[h],"tbody")&&!p.childNodes.length&&o.removeChild(p);for(i.merge(c,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=a.lastChild}else c.push(t.createTextNode(o));for(s&&a.removeChild(s),i.support.appendChecked||i.grep(u(c,"input"),ke),v=0;o=c[v++];)if((!f||i.inArray(o,f)===-1)&&(w=i.contains(o.ownerDocument,o),s=u(a.appendChild(o),"script"),w&&hi(s),r))for(h=0;o=s[h++];)dr.test(o.type||"")&&r.push(o);return s=null,a},cleanData:function(n,t){for(var r,e,u,f,c=0,s=i.expando,h=i.cache,l=i.support.deleteExpando,a=i.event.special;(r=n[c])!=null;c++)if((t||i.acceptData(r))&&(u=r[s],f=u&&h[u],f)){if(f.events)for(e in f.events)a[e]?i.event.remove(r,e):i.removeEvent(r,e,f.handle);h[u]&&(delete h[u],l?delete r[s]:typeof r.removeAttribute!==o?r.removeAttribute(s):r[s]=null,b.push(u))}},_evalUrl:function(n){return i.ajax({url:n,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})}});i.fn.extend({wrapAll:function(n){if(i.isFunction(n))return this.each(function(t){i(this).wrapAll(n.call(this,t))});if(this[0]){var t=i(n,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]);t.map(function(){for(var n=this;n.firstChild&&n.firstChild.nodeType===1;)n=n.firstChild;return n}).append(this)}return this},wrapInner:function(n){return i.isFunction(n)?this.each(function(t){i(this).wrapInner(n.call(this,t))}):this.each(function(){var t=i(this),r=t.contents();r.length?r.wrapAll(n):t.append(n)})},wrap:function(n){var t=i.isFunction(n);return this.each(function(r){i(this).wrapAll(t?n.call(this,r):n)})},unwrap:function(){return this.parent().each(function(){i.nodeName(this,"body")||i(this).replaceWith(this.childNodes)}).end()}});var rt,v,y,ci=/alpha\([^)]*\)/i,de=/opacity\s*=\s*([^)]*)/,ge=/^(top|right|bottom|left)$/,no=/^(none|table(?!-c[ea]).+)/,ru=/^margin/,to=new RegExp("^("+st+")(.*)$","i"),lt=new RegExp("^("+st+")(?!px)[a-z%]+$","i"),io=new RegExp("^([+-])=("+st+")","i"),uu={BODY:"block"},ro={position:"absolute",visibility:"hidden",display:"block"},fu={letterSpacing:0,fontWeight:400},p=["Top","Right","Bottom","Left"],eu=["Webkit","O","Moz","ms"];i.fn.extend({css:function(n,r){return i.access(this,function(n,r,u){var e,o,s={},f=0;if(i.isArray(r)){for(o=v(n),e=r.length;f<e;f++)s[r[f]]=i.css(n,r[f],!1,o);return s}return u!==t?i.style(n,r,u):i.css(n,r)},n,r,arguments.length>1)},show:function(){return su(this,!0)},hide:function(){return su(this)},toggle:function(n){return typeof n=="boolean"?n?this.show():this.hide():this.each(function(){ut(this)?i(this).show():i(this).hide()})}});i.extend({cssHooks:{opacity:{get:function(n,t){if(t){var i=y(n,"opacity");return i===""?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:i.support.cssFloat?"cssFloat":"styleFloat"},style:function(n,r,u,f){if(n&&n.nodeType!==3&&n.nodeType!==8&&n.style){var o,s,e,h=i.camelCase(r),c=n.style;if(r=i.cssProps[h]||(i.cssProps[h]=ou(c,h)),e=i.cssHooks[r]||i.cssHooks[h],u!==t){if(s=typeof u,s==="string"&&(o=io.exec(u))&&(u=(o[1]+1)*o[2]+parseFloat(i.css(n,r)),s="number"),u==null||s==="number"&&isNaN(u))return;if(s!=="number"||i.cssNumber[h]||(u+="px"),i.support.clearCloneStyle||u!==""||r.indexOf("background")!==0||(c[r]="inherit"),!e||!("set"in e)||(u=e.set(n,u,f))!==t)try{c[r]=u}catch(l){}}else return e&&"get"in e&&(o=e.get(n,!1,f))!==t?o:c[r]}},css:function(n,r,u,f){var h,e,o,s=i.camelCase(r);return(r=i.cssProps[s]||(i.cssProps[s]=ou(n.style,s)),o=i.cssHooks[r]||i.cssHooks[s],o&&"get"in o&&(e=o.get(n,!0,u)),e===t&&(e=y(n,r,f)),e==="normal"&&r in fu&&(e=fu[r]),u===""||u)?(h=parseFloat(e),u===!0||i.isNumeric(h)?h||0:e):e}});n.getComputedStyle?(v=function(t){return n.getComputedStyle(t,null)},y=function(n,r,u){var s,h,c,o=u||v(n),e=o?o.getPropertyValue(r)||o[r]:t,f=n.style;return o&&(e!==""||i.contains(n.ownerDocument,n)||(e=i.style(n,r)),lt.test(e)&&ru.test(r)&&(s=f.width,h=f.minWidth,c=f.maxWidth,f.minWidth=f.maxWidth=f.width=e,e=o.width,f.width=s,f.minWidth=h,f.maxWidth=c)),e}):r.documentElement.currentStyle&&(v=function(n){return n.currentStyle},y=function(n,i,r){var s,e,o,h=r||v(n),u=h?h[i]:t,f=n.style;return u==null&&f&&f[i]&&(u=f[i]),lt.test(u)&&!ge.test(i)&&(s=f.left,e=n.runtimeStyle,o=e&&e.left,o&&(e.left=n.currentStyle.left),f.left=i==="fontSize"?"1em":u,u=f.pixelLeft+"px",f.left=s,o&&(e.left=o)),u===""?"auto":u});i.each(["height","width"],function(n,t){i.cssHooks[t]={get:function(n,r,u){if(r)return n.offsetWidth===0&&no.test(i.css(n,"display"))?i.swap(n,ro,function(){return lu(n,t,u)}):lu(n,t,u)},set:function(n,r,u){var f=u&&v(n);return hu(n,r,u?cu(n,t,u,i.support.boxSizing&&i.css(n,"boxSizing",!1,f)==="border-box",f):0)}}});i.support.opacity||(i.cssHooks.opacity={get:function(n,t){return de.test((t&&n.currentStyle?n.currentStyle.filter:n.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(n,t){var r=n.style,u=n.currentStyle,e=i.isNumeric(t)?"alpha(opacity="+t*100+")":"",f=u&&u.filter||r.filter||"";(r.zoom=1,(t>=1||t==="")&&i.trim(f.replace(ci,""))===""&&r.removeAttribute&&(r.removeAttribute("filter"),t===""||u&&!u.filter))||(r.filter=ci.test(f)?f.replace(ci,e):f+" "+e)}});i(function(){i.support.reliableMarginRight||(i.cssHooks.marginRight={get:function(n,t){if(t)return i.swap(n,{display:"inline-block"},y,[n,"marginRight"])}});!i.support.pixelPosition&&i.fn.position&&i.each(["top","left"],function(n,t){i.cssHooks[t]={get:function(n,r){if(r)return r=y(n,t),lt.test(r)?i(n).position()[t]+"px":r}}})});i.expr&&i.expr.filters&&(i.expr.filters.hidden=function(n){return n.offsetWidth<=0&&n.offsetHeight<=0||!i.support.reliableHiddenOffsets&&(n.style&&n.style.display||i.css(n,"display"))==="none"},i.expr.filters.visible=function(n){return!i.expr.filters.hidden(n)});i.each({margin:"",padding:"",border:"Width"},function(n,t){i.cssHooks[n+t]={expand:function(i){for(var r=0,f={},u=typeof i=="string"?i.split(" "):[i];r<4;r++)f[n+p[r]+t]=u[r]||u[r-2]||u[0];return f}};ru.test(n)||(i.cssHooks[n+t].set=hu)});var uo=/%20/g,fo=/\[\]$/,yu=/\r?\n/g,eo=/^(?:submit|button|image|reset|file)$/i,oo=/^(?:input|select|textarea|keygen)/i;i.fn.extend({serialize:function(){return i.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var n=i.prop(this,"elements");return n?i.makeArray(n):this}).filter(function(){var n=this.type;return this.name&&!i(this).is(":disabled")&&oo.test(this.nodeName)&&!eo.test(n)&&(this.checked||!oi.test(n))}).map(function(n,t){var r=i(this).val();return r==null?null:i.isArray(r)?i.map(r,function(n){return{name:t.name,value:n.replace(yu,"\r\n")}}):{name:t.name,value:r.replace(yu,"\r\n")}}).get()}});i.param=function(n,r){var u,f=[],e=function(n,t){t=i.isFunction(t)?t():t==null?"":t;f[f.length]=encodeURIComponent(n)+"="+encodeURIComponent(t)};if(r===t&&(r=i.ajaxSettings&&i.ajaxSettings.traditional),i.isArray(n)||n.jquery&&!i.isPlainObject(n))i.each(n,function(){e(this.name,this.value)});else for(u in n)li(u,n[u],r,e);return f.join("&").replace(uo,"+")};i.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(n,t){i.fn[t]=function(n,i){return arguments.length>0?this.on(t,null,n,i):this.trigger(t)}});i.fn.extend({hover:function(n,t){return this.mouseenter(n).mouseleave(t||n)},bind:function(n,t,i){return this.on(n,null,t,i)},unbind:function(n,t){return this.off(n,null,t)},delegate:function(n,t,i,r){return this.on(t,n,i,r)},undelegate:function(n,t,i){return arguments.length===1?this.off(n,"**"):this.off(t,n||"**",i)}});var w,c,ai=i.now(),vi=/\?/,so=/#.*$/,pu=/([?&])_=[^&]*/,ho=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,co=/^(?:GET|HEAD)$/,lo=/^\/\//,wu=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,bu=i.fn.load,ku={},yi={},du="*/".concat("*");try{c=hf.href}catch(go){c=r.createElement("a");c.href="";c=c.href}w=wu.exec(c.toLowerCase())||[];i.fn.load=function(n,r,u){if(typeof n!="string"&&bu)return bu.apply(this,arguments);var f,s,h,e=this,o=n.indexOf(" ");return o>=0&&(f=n.slice(o,n.length),n=n.slice(0,o)),i.isFunction(r)?(u=r,r=t):r&&typeof r=="object"&&(h="POST"),e.length>0&&i.ajax({url:n,type:h,dataType:"html",data:r}).done(function(n){s=arguments;e.html(f?i("<div>").append(i.parseHTML(n)).find(f):n)}).complete(u&&function(n,t){e.each(u,s||[n.responseText,t,n])}),this};i.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(n,t){i.fn[t]=function(n){return this.on(t,n)}});i.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:c,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(w[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":du,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":i.parseJSON,"text xml":i.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(n,t){return t?pi(pi(n,i.ajaxSettings),t):pi(i.ajaxSettings,n)},ajaxPrefilter:gu(ku),ajaxTransport:gu(yi),ajax:function(n,r){function k(n,r,s,c){var a,rt,k,p,w,l=r;o!==2&&(o=2,g&&clearTimeout(g),v=t,d=c||"",f.readyState=n>0?4:0,a=n>=200&&n<300||n===304,s&&(p=ao(u,f,s)),p=vo(u,p,f,a),a?(u.ifModified&&(w=f.getResponseHeader("Last-Modified"),w&&(i.lastModified[e]=w),w=f.getResponseHeader("etag"),w&&(i.etag[e]=w)),n===204||u.type==="HEAD"?l="nocontent":n===304?l="notmodified":(l=p.state,rt=p.data,k=p.error,a=!k)):(k=l,(n||!l)&&(l="error",n<0&&(n=0))),f.status=n,f.statusText=(r||l)+"",a?tt.resolveWith(h,[rt,l,f]):tt.rejectWith(h,[f,l,k]),f.statusCode(b),b=t,y&&nt.trigger(a?"ajaxSuccess":"ajaxError",[f,u,a?rt:k]),it.fireWith(h,[f,l]),y&&(nt.trigger("ajaxComplete",[f,u]),--i.active||i.event.trigger("ajaxStop")))}typeof n=="object"&&(r=n,n=t);r=r||{};var l,a,e,d,g,y,v,p,u=i.ajaxSetup({},r),h=u.context||u,nt=u.context&&(h.nodeType||h.jquery)?i(h):i.event,tt=i.Deferred(),it=i.Callbacks("once memory"),b=u.statusCode||{},rt={},ut={},o=0,ft="canceled",f={readyState:0,getResponseHeader:function(n){var t;if(o===2){if(!p)for(p={};t=ho.exec(d);)p[t[1].toLowerCase()]=t[2];t=p[n.toLowerCase()]}return t==null?null:t},getAllResponseHeaders:function(){return o===2?d:null},setRequestHeader:function(n,t){var i=n.toLowerCase();return o||(n=ut[i]=ut[i]||n,rt[n]=t),this},overrideMimeType:function(n){return o||(u.mimeType=n),this},statusCode:function(n){var t;if(n)if(o<2)for(t in n)b[t]=[b[t],n[t]];else f.always(n[f.status]);return this},abort:function(n){var t=n||ft;return v&&v.abort(t),k(0,t),this}};if(tt.promise(f).complete=it.add,f.success=f.done,f.error=f.fail,u.url=((n||u.url||c)+"").replace(so,"").replace(lo,w[1]+"//"),u.type=r.method||r.type||u.method||u.type,u.dataTypes=i.trim(u.dataType||"*").toLowerCase().match(s)||[""],u.crossDomain==null&&(l=wu.exec(u.url.toLowerCase()),u.crossDomain=!!(l&&(l[1]!==w[1]||l[2]!==w[2]||(l[3]||(l[1]==="http:"?"80":"443"))!==(w[3]||(w[1]==="http:"?"80":"443"))))),u.data&&u.processData&&typeof u.data!="string"&&(u.data=i.param(u.data,u.traditional)),nf(ku,u,r,f),o===2)return f;y=u.global;y&&i.active++==0&&i.event.trigger("ajaxStart");u.type=u.type.toUpperCase();u.hasContent=!co.test(u.type);e=u.url;u.hasContent||(u.data&&(e=u.url+=(vi.test(e)?"&":"?")+u.data,delete u.data),u.cache===!1&&(u.url=pu.test(e)?e.replace(pu,"$1_="+ai++):e+(vi.test(e)?"&":"?")+"_="+ai++));u.ifModified&&(i.lastModified[e]&&f.setRequestHeader("If-Modified-Since",i.lastModified[e]),i.etag[e]&&f.setRequestHeader("If-None-Match",i.etag[e]));(u.data&&u.hasContent&&u.contentType!==!1||r.contentType)&&f.setRequestHeader("Content-Type",u.contentType);f.setRequestHeader("Accept",u.dataTypes[0]&&u.accepts[u.dataTypes[0]]?u.accepts[u.dataTypes[0]]+(u.dataTypes[0]!=="*"?", "+du+"; q=0.01":""):u.accepts["*"]);for(a in u.headers)f.setRequestHeader(a,u.headers[a]);if(u.beforeSend&&(u.beforeSend.call(h,f,u)===!1||o===2))return f.abort();ft="abort";for(a in{success:1,error:1,complete:1})f[a](u[a]);if(v=nf(yi,u,r,f),v){f.readyState=1;y&&nt.trigger("ajaxSend",[f,u]);u.async&&u.timeout>0&&(g=setTimeout(function(){f.abort("timeout")},u.timeout));try{o=1;v.send(rt,k)}catch(et){if(o<2)k(-1,et);else throw et;}}else k(-1,"No Transport");return f},getJSON:function(n,t,r){return i.get(n,t,r,"json")},getScript:function(n,r){return i.get(n,t,r,"script")}});i.each(["get","post"],function(n,r){i[r]=function(n,u,f,e){return i.isFunction(u)&&(e=e||f,f=u,u=t),i.ajax({url:n,type:r,dataType:e,data:u,success:f})}});i.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(n){return i.globalEval(n),n}}});i.ajaxPrefilter("script",function(n){n.cache===t&&(n.cache=!1);n.crossDomain&&(n.type="GET",n.global=!1)});i.ajaxTransport("script",function(n){if(n.crossDomain){var u,f=r.head||i("head")[0]||r.documentElement;return{send:function(t,i){u=r.createElement("script");u.async=!0;n.scriptCharset&&(u.charset=n.scriptCharset);u.src=n.url;u.onload=u.onreadystatechange=function(n,t){(t||!u.readyState||/loaded|complete/.test(u.readyState))&&(u.onload=u.onreadystatechange=null,u.parentNode&&u.parentNode.removeChild(u),u=null,t||i(200,"success"))};f.insertBefore(u,f.firstChild)},abort:function(){if(u)u.onload(t,!0)}}}});wi=[];at=/(=)\?(?=&|$)|\?\?/;i.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var n=wi.pop()||i.expando+"_"+ai++;return this[n]=!0,n}});i.ajaxPrefilter("json jsonp",function(r,u,f){var e,s,o,h=r.jsonp!==!1&&(at.test(r.url)?"url":typeof r.data=="string"&&!(r.contentType||"").indexOf("application/x-www-form-urlencoded")&&at.test(r.data)&&"data");if(h||r.dataTypes[0]==="jsonp")return e=r.jsonpCallback=i.isFunction(r.jsonpCallback)?r.jsonpCallback():r.jsonpCallback,h?r[h]=r[h].replace(at,"$1"+e):r.jsonp!==!1&&(r.url+=(vi.test(r.url)?"&":"?")+r.jsonp+"="+e),r.converters["script json"]=function(){return o||i.error(e+" was not called"),o[0]},r.dataTypes[0]="json",s=n[e],n[e]=function(){o=arguments},f.always(function(){n[e]=s;r[e]&&(r.jsonpCallback=u.jsonpCallback,wi.push(e));o&&i.isFunction(s)&&s(o[0]);o=s=t}),"script"});tf=0;vt=n.ActiveXObject&&function(){for(var n in nt)nt[n](t,!0)};i.ajaxSettings.xhr=n.ActiveXObject?function(){return!this.isLocal&&rf()||yo()}:rf;tt=i.ajaxSettings.xhr();i.support.cors=!!tt&&"withCredentials"in tt;tt=i.support.ajax=!!tt;tt&&i.ajaxTransport(function(r){if(!r.crossDomain||i.support.cors){var u;return{send:function(f,e){var h,s,o=r.xhr();if(r.username?o.open(r.type,r.url,r.async,r.username,r.password):o.open(r.type,r.url,r.async),r.xhrFields)for(s in r.xhrFields)o[s]=r.xhrFields[s];r.mimeType&&o.overrideMimeType&&o.overrideMimeType(r.mimeType);r.crossDomain||f["X-Requested-With"]||(f["X-Requested-With"]="XMLHttpRequest");try{for(s in f)o.setRequestHeader(s,f[s])}catch(c){}o.send(r.hasContent&&r.data||null);u=function(n,f){var s,a,l,c;try{if(u&&(f||o.readyState===4))if(u=t,h&&(o.onreadystatechange=i.noop,vt&&delete nt[h]),f)o.readyState!==4&&o.abort();else{c={};s=o.status;a=o.getAllResponseHeaders();typeof o.responseText=="string"&&(c.text=o.responseText);try{l=o.statusText}catch(y){l=""}s||!r.isLocal||r.crossDomain?s===1223&&(s=204):s=c.text?200:404}}catch(v){f||e(-1,v)}c&&e(s,l,c,a)};r.async?o.readyState===4?setTimeout(u):(h=++tf,vt&&(nt||(nt={},i(n).unload(vt)),nt[h]=u),o.onreadystatechange=u):u()},abort:function(){u&&u(t,!0)}}}});var it,yt,po=/^(?:toggle|show|hide)$/,uf=new RegExp("^(?:([+-])=|)("+st+")([a-z%]*)$","i"),wo=/queueHooks$/,pt=[ko],ft={"*":[function(n,t){var f=this.createTween(n,t),s=f.cur(),u=uf.exec(t),e=u&&u[3]||(i.cssNumber[n]?"":"px"),r=(i.cssNumber[n]||e!=="px"&&+s)&&uf.exec(i.css(f.elem,n)),o=1,h=20;if(r&&r[3]!==e){e=e||r[3];u=u||[];r=+s||1;do o=o||".5",r=r/o,i.style(f.elem,n,r+e);while(o!==(o=f.cur()/s)&&o!==1&&--h)}return u&&(r=f.start=+r||+s||0,f.unit=e,f.end=u[1]?r+(u[1]+1)*u[2]:+u[2]),f}]};i.Animation=i.extend(of,{tweener:function(n,t){i.isFunction(n)?(t=n,n=["*"]):n=n.split(" ");for(var r,u=0,f=n.length;u<f;u++)r=n[u],ft[r]=ft[r]||[],ft[r].unshift(t)},prefilter:function(n,t){t?pt.unshift(n):pt.push(n)}});i.Tween=f;f.prototype={constructor:f,init:function(n,t,r,u,f,e){this.elem=n;this.prop=r;this.easing=f||"swing";this.options=t;this.start=this.now=this.cur();this.end=u;this.unit=e||(i.cssNumber[r]?"":"px")},cur:function(){var n=f.propHooks[this.prop];return n&&n.get?n.get(this):f.propHooks._default.get(this)},run:function(n){var t,r=f.propHooks[this.prop];return this.pos=this.options.duration?t=i.easing[this.easing](n,this.options.duration*n,0,1,this.options.duration):t=n,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),r&&r.set?r.set(this):f.propHooks._default.set(this),this}};f.prototype.init.prototype=f.prototype;f.propHooks={_default:{get:function(n){var t;return n.elem[n.prop]!=null&&(!n.elem.style||n.elem.style[n.prop]==null)?n.elem[n.prop]:(t=i.css(n.elem,n.prop,""),!t||t==="auto"?0:t)},set:function(n){i.fx.step[n.prop]?i.fx.step[n.prop](n):n.elem.style&&(n.elem.style[i.cssProps[n.prop]]!=null||i.cssHooks[n.prop])?i.style(n.elem,n.prop,n.now+n.unit):n.elem[n.prop]=n.now}}};f.propHooks.scrollTop=f.propHooks.scrollLeft={set:function(n){n.elem.nodeType&&n.elem.parentNode&&(n.elem[n.prop]=n.now)}};i.each(["toggle","show","hide"],function(n,t){var r=i.fn[t];i.fn[t]=function(n,i,u){return n==null||typeof n=="boolean"?r.apply(this,arguments):this.animate(wt(t,!0),n,i,u)}});i.fn.extend({fadeTo:function(n,t,i,r){return this.filter(ut).css("opacity",0).show().end().animate({opacity:t},n,i,r)},animate:function(n,t,r,u){var o=i.isEmptyObject(n),e=i.speed(t,r,u),f=function(){var t=of(this,i.extend({},n),e);(o||i._data(this,"finish"))&&t.stop(!0)};return f.finish=f,o||e.queue===!1?this.each(f):this.queue(e.queue,f)},stop:function(n,r,u){var f=function(n){var t=n.stop;delete n.stop;t(u)};return typeof n!="string"&&(u=r,r=n,n=t),r&&n!==!1&&this.queue(n||"fx",[]),this.each(function(){var o=!0,t=n!=null&&n+"queueHooks",e=i.timers,r=i._data(this);if(t)r[t]&&r[t].stop&&f(r[t]);else for(t in r)r[t]&&r[t].stop&&wo.test(t)&&f(r[t]);for(t=e.length;t--;)e[t].elem===this&&(n==null||e[t].queue===n)&&(e[t].anim.stop(u),o=!1,e.splice(t,1));(o||!u)&&i.dequeue(this,n)})},finish:function(n){return n!==!1&&(n=n||"fx"),this.each(function(){var t,f=i._data(this),r=f[n+"queue"],e=f[n+"queueHooks"],u=i.timers,o=r?r.length:0;for(f.finish=!0,i.queue(this,n,[]),e&&e.stop&&e.stop.call(this,!0),t=u.length;t--;)u[t].elem===this&&u[t].queue===n&&(u[t].anim.stop(!0),u.splice(t,1));for(t=0;t<o;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete f.finish})}});i.each({slideDown:wt("show"),slideUp:wt("hide"),slideToggle:wt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(n,t){i.fn[n]=function(n,i,r){return this.animate(t,n,i,r)}});i.speed=function(n,t,r){var u=n&&typeof n=="object"?i.extend({},n):{complete:r||!r&&t||i.isFunction(n)&&n,duration:n,easing:r&&t||t&&!i.isFunction(t)&&t};return u.duration=i.fx.off?0:typeof u.duration=="number"?u.duration:u.duration in i.fx.speeds?i.fx.speeds[u.duration]:i.fx.speeds._default,(u.queue==null||u.queue===!0)&&(u.queue="fx"),u.old=u.complete,u.complete=function(){i.isFunction(u.old)&&u.old.call(this);u.queue&&i.dequeue(this,u.queue)},u};i.easing={linear:function(n){return n},swing:function(n){return.5-Math.cos(n*Math.PI)/2}};i.timers=[];i.fx=f.prototype.init;i.fx.tick=function(){var u,n=i.timers,r=0;for(it=i.now();r<n.length;r++)u=n[r],u()||n[r]!==u||n.splice(r--,1);n.length||i.fx.stop();it=t};i.fx.timer=function(n){n()&&i.timers.push(n)&&i.fx.start()};i.fx.interval=13;i.fx.start=function(){yt||(yt=setInterval(i.fx.tick,i.fx.interval))};i.fx.stop=function(){clearInterval(yt);yt=null};i.fx.speeds={slow:600,fast:200,_default:400};i.fx.step={};i.expr&&i.expr.filters&&(i.expr.filters.animated=function(n){return i.grep(i.timers,function(t){return n===t.elem}).length});i.fn.offset=function(n){if(arguments.length)return n===t?this:this.each(function(t){i.offset.setOffset(this,n,t)});var r,e,f={top:0,left:0},u=this[0],s=u&&u.ownerDocument;if(s)return(r=s.documentElement,!i.contains(r,u))?f:(typeof u.getBoundingClientRect!==o&&(f=u.getBoundingClientRect()),e=sf(s),{top:f.top+(e.pageYOffset||r.scrollTop)-(r.clientTop||0),left:f.left+(e.pageXOffset||r.scrollLeft)-(r.clientLeft||0)})};i.offset={setOffset:function(n,t,r){var f=i.css(n,"position");f==="static"&&(n.style.position="relative");var e=i(n),o=e.offset(),l=i.css(n,"top"),a=i.css(n,"left"),v=(f==="absolute"||f==="fixed")&&i.inArray("auto",[l,a])>-1,u={},s={},h,c;v?(s=e.position(),h=s.top,c=s.left):(h=parseFloat(l)||0,c=parseFloat(a)||0);i.isFunction(t)&&(t=t.call(n,r,o));t.top!=null&&(u.top=t.top-o.top+h);t.left!=null&&(u.left=t.left-o.left+c);"using"in t?t.using.call(n,u):e.css(u)}};i.fn.extend({position:function(){if(this[0]){var n,r,t={top:0,left:0},u=this[0];return i.css(u,"position")==="fixed"?r=u.getBoundingClientRect():(n=this.offsetParent(),r=this.offset(),i.nodeName(n[0],"html")||(t=n.offset()),t.top+=i.css(n[0],"borderTopWidth",!0),t.left+=i.css(n[0],"borderLeftWidth",!0)),{top:r.top-t.top-i.css(u,"marginTop",!0),left:r.left-t.left-i.css(u,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var n=this.offsetParent||ki;n&&!i.nodeName(n,"html")&&i.css(n,"position")==="static";)n=n.offsetParent;return n||ki})}});i.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,r){var u=/Y/.test(r);i.fn[n]=function(f){return i.access(this,function(n,f,e){var o=sf(n);if(e===t)return o?r in o?o[r]:o.document.documentElement[f]:n[f];o?o.scrollTo(u?i(o).scrollLeft():e,u?e:i(o).scrollTop()):n[f]=e},n,f,arguments.length,null)}});i.each({Height:"height",Width:"width"},function(n,r){i.each({padding:"inner"+n,content:r,"":"outer"+n},function(u,f){i.fn[f]=function(f,e){var o=arguments.length&&(u||typeof f!="boolean"),s=u||(f===!0||e===!0?"margin":"border");return i.access(this,function(r,u,f){var e;return i.isWindow(r)?r.document.documentElement["client"+n]:r.nodeType===9?(e=r.documentElement,Math.max(r.body["scroll"+n],e["scroll"+n],r.body["offset"+n],e["offset"+n],e["client"+n])):f===t?i.css(r,u,s):i.style(r,u,f,s)},r,o?f:t,o,null)}})});i.fn.size=function(){return this.length};i.fn.andSelf=i.fn.addBack;typeof module=="object"&&module&&typeof module.exports=="object"?module.exports=i:(n.jQuery=n.$=i,typeof define=="function"&&define.amd&&define("jquery",[],function(){return i}))})(window),function(n){"use strict";function l(n,t){return t=t||Error,function(){var f=2,i=arguments,o=i[0],u="["+(n?n+":":"")+o+"] ",s=i[1],e,r;for(u+=s.replace(/\{\d+\}/g,function(n){var r=+n.slice(1,-1),t=r+f;return t<i.length?ws(i[t]):n}),u+="\nhttp://errors.angularjs.org/1.5.11/"+(n?n+"/":"")+o,r=f,e="?";r<i.length;r++,e="&")u+=e+"p"+(r-f)+"="+encodeURIComponent(ws(i[r]));return new t(u)}}function ii(n){if(n==null||or(n))return!1;if(c(n)||o(n)||e&&n instanceof e)return!0;var t="length"in Object(n)&&n.length;return g(t)&&(t>=0&&(t-1 in n||n instanceof Array)||typeof n.item=="function")}function t(n,i,r){var u,e,o;if(n)if(f(n))for(u in n)u!=="prototype"&&u!=="length"&&u!=="name"&&(!n.hasOwnProperty||n.hasOwnProperty(u))&&i.call(r,n[u],u,n);else if(c(n)||ii(n))for(o=typeof n!="object",u=0,e=n.length;u<e;u++)(o||u in n)&&i.call(r,n[u],u,n);else if(n.forEach&&n.forEach!==t)n.forEach(i,r,n);else if(is(n))for(u in n)i.call(r,n[u],u,n);else if(typeof n.hasOwnProperty=="function")for(u in n)n.hasOwnProperty(u)&&i.call(r,n[u],u,n);else for(u in n)vt.call(n,u)&&i.call(r,n[u],u,n);return n}function ko(n,t,i){for(var r=Object.keys(n).sort(),u=0;u<r.length;u++)t.call(i,n[r[u]],r[u]);return r}function go(n){return function(t,i){n(i,t)}}function vu(){return++fv}function ns(n,t){t?n.$$hashKey=t:delete n.$$hashKey}function kf(n,t,i){for(var e,l,o,a,u,r,v=n.$$hashKey,s=0,y=t.length;s<y;++s)if(e=t[s],h(e)||f(e))for(l=Object.keys(e),o=0,a=l.length;o<a;o++)u=l[o],r=e[u],i&&h(r)?ot(r)?n[u]=new Date(r.valueOf()):er(r)?n[u]=new RegExp(r):r.nodeName?n[u]=r.cloneNode(!0):ne(r)?n[u]=r.clone():(h(n[u])||(n[u]=c(r)?[]:{}),kf(n[u],[r],!0)):n[u]=r;return ns(n,v),n}function v(n){return kf(n,bi.call(arguments,1),!1)}function ev(n){return kf(n,bi.call(arguments,1),!0)}function tt(n){return parseInt(n,10)}function df(n,t){return v(Object.create(n),t)}function s(){}function fr(n){return n}function ct(n){return function(){return n}}function ts(n){return f(n.toString)&&n.toString!==ut}function r(n){return typeof n=="undefined"}function u(n){return typeof n!="undefined"}function h(n){return n!==null&&typeof n=="object"}function is(n){return n!==null&&typeof n=="object"&&!bo(n)}function o(n){return typeof n=="string"}function g(n){return typeof n=="number"}function ot(n){return ut.call(n)==="[object Date]"}function f(n){return typeof n=="function"}function er(n){return ut.call(n)==="[object RegExp]"}function or(n){return n&&n.window===n}function sr(n){return n&&n.$evalAsync&&n.$watch}function ov(n){return ut.call(n)==="[object File]"}function sv(n){return ut.call(n)==="[object FormData]"}function hv(n){return ut.call(n)==="[object Blob]"}function si(n){return typeof n=="boolean"}function yu(n){return n&&f(n.then)}function cv(n){return n&&g(n.length)&&rs.test(ut.call(n))}function lv(n){return ut.call(n)==="[object ArrayBuffer]"}function ne(n){return!!(n&&(n.nodeName||n.prop&&n.attr&&n.find))}function av(n){for(var i={},r=n.split(","),t=0;t<r.length;t++)i[r[t]]=!0;return i}function yt(n){return a(n.nodeName||n[0]&&n[0].nodeName)}function hr(n,t){var i=n.indexOf(t);return i>=0&&n.splice(i,1),i}function dt(n,i){function o(n,t){var e=t.$$hashKey,i,u,f;if(c(n))for(u=0,f=n.length;u<f;u++)t.push(r(n[u]));else if(is(n))for(i in n)t[i]=r(n[i]);else if(n&&typeof n.hasOwnProperty=="function")for(i in n)n.hasOwnProperty(i)&&(t[i]=r(n[i]));else for(i in n)vt.call(n,i)&&(t[i]=r(n[i]));return ns(t,e),t}function r(n){var i,r,t;if(!h(n))return n;if(i=u.indexOf(n),i!==-1)return e[i];if(or(n)||sr(n))throw oi("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");return r=!1,t=s(n),t===undefined&&(t=c(n)?[]:Object.create(bo(n)),r=!0),u.push(n),e.push(t),r?o(n,t):t}function s(n){var t,i;switch(ut.call(n)){case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return new n.constructor(r(n.buffer),n.byteOffset,n.length);case"[object ArrayBuffer]":return n.slice?n.slice(0):(t=new ArrayBuffer(n.byteLength),new Uint8Array(t).set(new Uint8Array(n)),t);case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new n.constructor(n.valueOf());case"[object RegExp]":return i=new RegExp(n.source,n.toString().match(/[^/]*$/)[0]),i.lastIndex=n.lastIndex,i;case"[object Blob]":return new n.constructor([n],{type:n.type})}if(f(n.cloneNode))return n.cloneNode(!0)}var u=[],e=[];if(i){if(cv(i)||lv(i))throw oi("cpta","Can't copy! TypedArray destination cannot be mutated.");if(n===i)throw oi("cpi","Can't copy! Source and destination are identical.");return c(i)?i.length=0:t(i,function(n,t){t!=="$$hashKey"&&delete i[t]}),u.push(n),e.push(i),o(n,i)}return r(n)}function ft(n,t){if(n===t)return!0;if(n===null||t===null)return!1;if(n!==n&&t!==t)return!0;var e=typeof n,s=typeof t,o,i,r;if(e===s&&e==="object")if(c(n)){if(!c(t))return!1;if((o=n.length)===t.length){for(i=0;i<o;i++)if(!ft(n[i],t[i]))return!1;return!0}}else{if(ot(n))return ot(t)?ft(n.getTime(),t.getTime()):!1;if(er(n))return er(t)?n.toString()===t.toString():!1;if(sr(n)||sr(t)||or(n)||or(t)||c(t)||ot(t)||er(t))return!1;r=p();for(i in n)if(i.charAt(0)!=="$"&&!f(n[i])){if(!ft(n[i],t[i]))return!1;r[i]=!0}for(i in t)if(!(i in r)&&i.charAt(0)!=="$"&&u(t[i])&&!f(t[i]))return!1;return!0}return!1}function lr(n,t,i){return n.concat(bi.call(t,i))}function ar(n,t){return bi.call(n,t||0)}function vr(n,t){var i=arguments.length>2?ar(arguments,2):[];return!f(t)||t instanceof RegExp?t:i.length?function(){return arguments.length?t.apply(n,lr(i,arguments,0)):t.apply(n,i)}:function(){return arguments.length?t.apply(n,arguments):t.call(n)}}function us(t,i){var r=i;return typeof t=="string"&&t.charAt(0)==="$"&&t.charAt(1)==="$"?r=undefined:or(i)?r="$WINDOW":i&&n.document===i?r="$DOCUMENT":sr(i)&&(r="$SCOPE"),r}function yr(n,t){return r(n)?undefined:(g(t)||(t=t?2:null),JSON.stringify(n,us,t))}function fs(n){return o(n)?JSON.parse(n):n}function os(n,t){n=n.replace(es,"");var i=Date.parse("Jan 01, 1970 00:00:00 "+n)/6e4;return it(i)?t:i}function vv(n,t){return n=new Date(n.getTime()),n.setMinutes(n.getMinutes()+t),n}function te(n,t,i){i=i?-1:1;var r=n.getTimezoneOffset(),u=os(t,r);return vv(n,i*(u-r))}function pt(n){n=e(n).clone();try{n.empty()}catch(i){}var t=e("<div>").append(n).html();try{return n[0].nodeType===ci?a(t):t.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/,function(n,t){return"<"+a(t)})}catch(i){return a(t)}}function ss(n){try{return decodeURIComponent(n)}catch(t){}}function hs(n){var i={};return t((n||"").split("&"),function(n){var f,t,r;n&&(t=n=n.replace(/\+/g,"%20"),f=n.indexOf("="),f!==-1&&(t=n.substring(0,f),r=n.substring(f+1)),t=ss(t),u(t)&&(r=u(r)?ss(r):!0,vt.call(i,t)?c(i[t])?i[t].push(r):i[t]=[i[t],r]:i[t]=r))}),i}function ie(n){var i=[];return t(n,function(n,r){c(n)?t(n,function(n){i.push(lt(r,!0)+(n===!0?"":"="+lt(n,!0)))}):i.push(lt(r,!0)+(n===!0?"":"="+lt(n,!0)))}),i.length?i.join("&"):""}function pu(n){return lt(n,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function lt(n,t){return encodeURIComponent(n).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}function yv(n,t){for(var i,u=hi.length,r=0;r<u;++r)if(i=hi[r]+t,o(i=n.getAttribute(i)))return i;return null}function pv(n){var i=n.currentScript,r=i&&i.getAttribute("src"),t;if(!r||(t=n.createElement("a"),t.href=r,n.location.origin===t.origin))return!0;switch(t.protocol){case"http:":case"https:":case"ftp:":case"blob:":case"file:":case"data:":return!0;default:return!1}}function wv(i,r){var u,f,e={};if(t(hi,function(n){var t=n+"app";!u&&i.hasAttribute&&i.hasAttribute(t)&&(u=i,f=i.getAttribute(t))}),t(hi,function(n){var r=n+"app",t;!u&&(t=i.querySelector("["+r.replace(":","\\:")+"]"))&&(u=t,f=t.getAttribute(r))}),u){if(!cs){n.console.error("Angular: disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match.");return}e.strictDi=yv(u,"strict-di")!==null;r(u,f?[f]:[],e)}}function ls(i,r,u){var o;h(u)||(u={});o={strictDi:!1};u=v(o,u);var s=function(){var f,t;if(i=e(i),i.injector()){f=i[0]===n.document?"document":pt(i);throw oi("btstrpd","App already bootstrapped with this element '{0}'",f.replace(/</,"&lt;").replace(/>/,"&gt;"));}return r=r||[],r.unshift(["$provide",function(n){n.value("$rootElement",i)}]),u.debugInfoEnabled&&r.push(["$compileProvider",function(n){n.debugInfoEnabled(!0)}]),r.unshift("ng"),t=tu(r,u.strictDi),t.invoke(["$rootScope","$rootElement","$compile","$injector",function(n,t,i,r){n.$apply(function(){t.data("$injector",r);i(t)(n)})}]),t},c=/^NG_ENABLE_DEBUG_INFO!/,l=/^NG_DEFER_BOOTSTRAP!/;if(n&&c.test(n.name)&&(u.debugInfoEnabled=!0,n.name=n.name.replace(c,"")),n&&!l.test(n.name))return s();n.name=n.name.replace(l,"");et.resumeBootstrap=function(n){return t(n,function(n){r.push(n)}),s()};f(et.resumeDeferredBootstrap)&&et.resumeDeferredBootstrap()}function bv(){n.name="NG_ENABLE_DEBUG_INFO!"+n.name;n.location.reload()}function kv(n){var t=et.element(n).injector();if(!t)throw oi("test","no injector found for element argument to getTestability");return t.get("$$testability")}function vs(n,t){return t=t||"_",n.replace(as,function(n,i){return(i?t:"")+n.toLowerCase()})}function dv(){var i,t;re||(t=cr(),kt=r(t)?n.jQuery:t?n[t]:undefined,kt&&kt.fn.on?(e=kt,v(kt.fn,{scope:li.scope,isolateScope:li.isolateScope,controller:li.controller,injector:li.injector,inheritedData:li.inheritedData}),i=kt.cleanData,kt.cleanData=function(n){for(var t,u=0,r;(r=n[u])!=null;u++)t=kt._data(r,"events"),t&&t.$destroy&&kt(r).triggerHandler("$destroy");i(n)}):e=w,et.element=e,re=!0)}function pr(n,t,i){if(!n)throw oi("areq","Argument '{0}' is {1}",t||"?",i||"required");return n}function ki(n,t,i){return i&&c(n)&&(n=n[n.length-1]),pr(f(n),t,"not a function, got "+(n&&typeof n=="object"?n.constructor.name||"Object":typeof n)),n}function di(n,t){if(n==="hasOwnProperty")throw oi("badname","hasOwnProperty is not a valid {0} name",t);}function ys(n,t,i){var r;if(!t)return n;var u=t.split("."),e,o=n,s=u.length;for(r=0;r<s;r++)e=u[r],n&&(n=(o=n)[e]);return!i&&f(n)?vr(o,n):n}function wu(n){for(var t=n[0],u=n[n.length-1],i,r=1;t!==u&&(t=t.nextSibling);r++)(i||n[r]!==t)&&(i||(i=e(bi.call(n,0,r))),i.push(t));return i||n}function p(){return Object.create(null)}function ny(n){function t(n,t,i){return n[t]||(n[t]=i())}var r=l("$injector"),u=l("ng"),i=t(n,"angular",Object);return i.$$minErr=i.$$minErr||l,t(i,"module",function(){var n={};return function(i,e,o){var s=function(n,t){if(n==="hasOwnProperty")throw u("badname","hasOwnProperty is not a valid {0} name",t);};return s(i,"module"),e&&n.hasOwnProperty(i)&&(n[i]=null),t(n,i,function(){function s(n,i,r,f){return f||(f=t),function(){return f[r||"push"]([n,i,arguments]),u}}function n(n,r){return function(e,o){return o&&f(o)&&(o.$$moduleName=i),t.push([n,r,arguments]),u}}if(!e)throw r("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",i);var t=[],h=[],c=[],l=s("$injector","invoke","push",h),u={_invokeQueue:t,_configBlocks:h,_runBlocks:c,requires:e,name:i,provider:n("$provide","provider"),factory:n("$provide","factory"),service:n("$provide","service"),value:s("$provide","value"),constant:s("$provide","constant","unshift"),decorator:n("$provide","decorator"),animation:n("$animateProvider","register"),filter:n("$filterProvider","register"),controller:n("$controllerProvider","register"),directive:n("$compileProvider","directive"),component:n("$compileProvider","component"),config:l,run:function(n){return c.push(n),this}};return o&&l(o),u})}})}function st(n,t){var i,u,r;if(c(n))for(t=t||[],i=0,u=n.length;i<u;i++)t[i]=n[i];else if(h(n)){t=t||{};for(r in n)r.charAt(0)==="$"&&r.charAt(1)==="$"||(t[r]=n[r])}return t||n}function ty(n){var t=[];return JSON.stringify(n,function(n,i){if(i=us(n,i),h(i)){if(t.indexOf(i)>=0)return"...";t.push(i)}return i})}function ws(n){return typeof n=="function"?n.toString().replace(/ \{[\s\S]*$/,""):r(n)?"undefined":typeof n!="string"?ty(n):n}function iy(i){v(i,{bootstrap:ls,copy:dt,extend:v,merge:ev,equals:ft,element:e,forEach:t,injector:tu,noop:s,bind:vr,toJson:yr,fromJson:fs,identity:fr,isUndefined:r,isDefined:u,isString:o,isFunction:f,isObject:h,isNumber:g,isElement:ne,isArray:c,version:bs,isDate:ot,lowercase:a,uppercase:ur,callbacks:{$$counter:0},getTestability:kv,$$minErr:l,$$csp:ri,reloadWithDebugInfo:bv});bf=ny(n);bf("ng",["ngLocale"],["$provide",function(n){n.provider({$$sanitizeUri:gb});n.provider("$compile",hh).directive({a:bl,input:ea,textarea:ea,form:id,script:an,select:wn,option:bn,ngBind:gd,ngBindHtml:tg,ngBindTemplate:ng,ngClass:rg,ngClassEven:fg,ngClassOdd:ug,ngCloak:eg,ngController:og,ngForm:rd,ngHide:fn,ngIf:hg,ngInclude:cg,ngInit:ag,ngNonBindable:kg,ngPluralize:tn,ngRepeat:rn,ngShow:un,ngStyle:en,ngSwitch:on,ngSwitchWhen:sn,ngSwitchDefault:hn,ngOptions:nn,ngTransclude:ln,ngModel:pg,ngList:vg,ngChange:ig,pattern:ka,ngPattern:ka,required:ba,ngRequired:ba,minlength:ga,ngMinlength:ga,maxlength:da,ngMaxlength:da,ngValue:dd,ngModelOptions:bg}).directive({ngInclude:lg}).directive(ou).directive(oa);n.provider({$anchorScroll:op,$animate:vp,$animateCss:wp,$$animateJs:lp,$$animateQueue:ap,$$AnimateRunner:pp,$$animateAsyncRun:yp,$browser:kp,$cacheFactory:dp,$controller:iw,$document:rw,$exceptionHandler:uw,$filter:fl,$$forceReflow:fw,$interpolate:bw,$interval:kw,$http:vw,$httpParamSerializer:cw,$httpParamSerializerJQLike:lw,$httpBackend:pw,$xhrFactory:yw,$jsonpCallbacks:dw,$location:rb,$log:ub,$parse:pb,$rootScope:db,$q:wb,$$q:bb,$sce:ik,$sceDelegate:tk,$sniffer:rk,$templateCache:gp,$templateRequest:uk,$$testability:fk,$timeout:ek,$window:ok,$$rAF:kb,$$jqLite:dy,$$HashMap:gy,$$cookieReader:sk})}])}function uy(){return++ry}function dr(n){return n.replace(fy,function(n,t,i,r){return r?i.toUpperCase():i}).replace(ey,"Moz$1")}function ee(n){return!sy.test(n)}function ks(n){var t=n.nodeType;return t===gt||!t||t===ps}function ly(n){for(var t in br[n.ng339])return!0;return!1}function ay(n){for(var t=0,i=n.length;t<i;t++)gr(n[t])}function ds(n,i){var r,o,f,u=i.createDocumentFragment(),e=[],s;if(ee(n))e.push(i.createTextNode(n));else{for(r=u.appendChild(i.createElement("div")),o=(hy.exec(n)||["",""])[1].toLowerCase(),f=at[o]||at._default,r.innerHTML=f[1]+n.replace(cy,"<$1><\/$2>")+f[2],s=f[0];s--;)r=r.lastChild;e=lr(e,r.childNodes);r=u.firstChild;r.textContent=""}return u.textContent="",u.innerHTML="",t(e,function(n){u.appendChild(n)}),u}function vy(t,i){i=i||n.document;var r;return(r=oy.exec(t))?[i.createElement(r[1])]:(r=ds(t,i))?r.childNodes:[]}function gs(n,t){var i=n.parentNode;i&&i.replaceChild(t,n);t.appendChild(n)}function w(n){if(n instanceof w)return n;var t;if(o(n)&&(n=y(n),t=!0),!(this instanceof w)){if(t&&n.charAt(0)!=="<")throw fe("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new w(n)}t?he(this,vy(n)):he(this,n)}function oe(n){return n.cloneNode(!0)}function du(n,t){var r,i,u;if(t||gr(n),n.querySelectorAll)for(r=n.querySelectorAll("*"),i=0,u=r.length;i<u;i++)gr(r[i])}function th(n,i,r,f){var h;if(u(f))throw fe("offargs","jqLite#off() does not support the `selector` argument");var e=gu(n),o=e&&e.events,s=e&&e.handle;if(s)if(i)h=function(t){var i=o[t];u(r)&&hr(i||[],r);u(r)&&i&&i.length>0||(kr(n,t,s),delete o[t])},t(i.split(" "),function(n){h(n);ku[n]&&h(ku[n])});else for(i in o)i!=="$destroy"&&kr(n,i,s),delete o[i]}function gr(n,t){var r=n.ng339,i=r&&br[r];if(i){if(t){delete i.data[t];return}i.handle&&(i.events.$destroy&&i.handle({},"$destroy"),th(n));delete br[r];n.ng339=undefined}}function gu(n,t){var i=n.ng339,r=i&&br[i];return t&&!r&&(n.ng339=i=uy(),r=br[i]={events:{},data:{},handle:undefined}),r}function se(n,t,i){if(ks(n)){var f=u(i),e=!f&&t&&!h(t),s=!t,o=gu(n,!e),r=o&&o.data;if(f)r[t]=i;else{if(s)return r;if(e)return r&&r[t];v(r,t)}}}function nf(n,t){return n.getAttribute?(" "+(n.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1:!1}function tf(n,i){i&&n.setAttribute&&t(i.split(" "),function(t){n.setAttribute("class",y((" "+(n.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+y(t)+" "," ")))})}function rf(n,i){if(i&&n.setAttribute){var r=(" "+(n.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");t(i.split(" "),function(n){n=y(n);r.indexOf(" "+n+" ")===-1&&(r+=n+" ")});n.setAttribute("class",y(r))}}function he(n,t){var i,r;if(t)if(t.nodeType)n[n.length++]=t;else if(i=t.length,typeof i=="number"&&t.window!==t){if(i)for(r=0;r<i;r++)n[n.length++]=t[r]}else n[n.length++]=t}function ih(n,t){return uf(n,"$"+(t||"ngController")+"Controller")}function uf(n,t,i){var f,r,o;for(n.nodeType===ps&&(n=n.documentElement),f=c(t)?t:[t];n;){for(r=0,o=f.length;r<o;r++)if(u(i=e.data(n,f[r])))return i;n=n.parentNode||n.nodeType===ue&&n.host}}function rh(n){for(du(n,!0);n.firstChild;)n.removeChild(n.firstChild)}function ff(n,t){t||du(n);var i=n.parentNode;i&&i.removeChild(n)}function yy(t,i){if(i=i||n,i.document.readyState==="complete")i.setTimeout(t);else e(i).on("load",t)}function uh(n,t){var i=nu[t.toLowerCase()];return i&&ce[yt(n)]&&i}function py(n){return le[n]}function wy(n,t){var i=function(i,u){var f,e,s,h,o;if(i.isDefaultPrevented=function(){return i.defaultPrevented},f=t[u||i.type],e=f?f.length:0,e)for(r(i.immediatePropagationStopped)&&(s=i.stopImmediatePropagation,i.stopImmediatePropagation=function(){i.immediatePropagationStopped=!0;i.stopPropagation&&i.stopPropagation();s&&s.call(i)}),i.isImmediatePropagationStopped=function(){return i.immediatePropagationStopped===!0},h=f.specialHandlerWrapper||by,e>1&&(f=st(f)),o=0;o<e;o++)i.isImmediatePropagationStopped()||h(n,i,f[o])};return i.elem=n,i}function by(n,t,i){i.call(n,t)}function ky(n,t,i){var r=t.relatedTarget;r&&(r===n||nh.call(n,r))||i.call(n,t)}function dy(){this.$get=function(){return v(w,{hasClass:function(n,t){return n.attr&&(n=n[0]),nf(n,t)},addClass:function(n,t){return n.attr&&(n=n[0]),rf(n,t)},removeClass:function(n,t){return n.attr&&(n=n[0]),tf(n,t)}})}}function ai(n,t){var r=n&&n.$$hashKey,i;return r?(typeof r=="function"&&(r=n.$$hashKey()),r):(i=typeof n,i==="function"||i==="object"&&n!==null?n.$$hashKey=i+":"+(t||vu)():i+":"+n)}function gi(n,i){if(i){var r=0;this.nextUid=function(){return++r}}t(n,this.put,this)}function fh(n){return Function.prototype.toString.call(n)+" "}function eh(n){var t=fh(n).replace(up,"");return t.match(np)||t.match(tp)}function fp(n){var t=eh(n);return t?"function("+(t[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function ep(n,i,r){var u,e,f;if(typeof n=="function"){if(!(u=n.$inject)){if(u=[],n.length){if(i){o(r)&&r||(r=n.name||fp(n));throw vi("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",r);}e=eh(n);t(e[1].split(ip),function(n){n.replace(rp,function(n,t,i){u.push(i)})})}n.$inject=u}}else c(n)?(f=n.length-1,ki(n[f],"fn"),u=n.slice(0,f)):ki(n,"fn",!0);return u}function tu(n,i){function v(n){return function(i,r){if(h(i))t(i,go(n));else return n(i,r)}}function g(n,t){if(di(n,"service"),(f(t)||c(t))&&(t=s.instantiate(t)),!t.$get)throw vi("pget","Provider '{0}' must define $get factory method.",n);return e[n+l]=t}function it(n,t){return function(){var i=u.invoke(t,this);if(r(i))throw vi("undef","Provider '{0}' must return a value from $get factory method.",n);return i}}function w(n,t,i){return g(n,{$get:i!==!1?it(n,t):t})}function rt(n,t){return w(n,["$injector",function(n){return n.instantiate(t)}])}function ut(n,t){return w(n,ct(t),!1)}function ft(n,t){di(n,"constant");e[n]=t;k[n]=t}function ot(n,t){var i=s.get(n+l),r=i.$get;i.$get=function(){var n=u.invoke(r,i);return u.invoke(t,null,{$delegate:n})}}function nt(n){pr(r(n)||c(n),"modulesToLoad","not an array");var i=[],u;return t(n,function(n){function r(n){for(var i,r,t=0,u=n.length;t<u;t++)i=n[t],r=s.get(i[0]),r[i[1]].apply(r,i[2])}if(!b.get(n)){b.put(n,!0);try{o(n)?(u=bf(n),i=i.concat(nt(u.requires)).concat(u._runBlocks),r(u._invokeQueue),r(u._configBlocks)):f(n)?i.push(s.invoke(n)):c(n)?i.push(s.invoke(n)):ki(n,"module")}catch(t){c(n)&&(n=n[n.length-1]);t.message&&t.stack&&t.stack.indexOf(t.message)===-1&&(t=t.message+"\n"+t.stack);throw vi("modulerr","Failed to instantiate module {0} due to:\n{1}",n,t.stack||t.message||t);}}}),i}function tt(n,t){function r(i,r){if(n.hasOwnProperty(i)){if(n[i]===y)throw vi("cdep","Circular dependency found: {0}",i+" <- "+a.join(" <- "));return n[i]}try{return a.unshift(i),n[i]=y,n[i]=t(i,r),n[i]}catch(u){n[i]===y&&delete n[i];throw u;}finally{a.shift()}}function u(n,t,u){for(var f,o=[],s=tu.$$annotate(n,i,u),e=0,h=s.length;e<h;e++){if(f=s[e],typeof f!="string")throw vi("itkn","Incorrect injection token! Expected service name as string, got {0}",f);o.push(t&&t.hasOwnProperty(f)?t[f]:r(f,u))}return o}function f(n){return ti<=11?!1:typeof n=="function"&&/^(?:class\b|constructor\()/.test(fh(n))}function o(n,t,i,r){typeof i=="string"&&(r=i,i=null);var e=u(n,i,r);return c(n)&&(n=n[n.length-1]),f(n)?(e.unshift(null),new(Function.prototype.bind.apply(n,e))):n.apply(t,e)}function s(n,t,i){var f=c(n)?n[n.length-1]:n,r=u(n,t,i);return r.unshift(null),new(Function.prototype.bind.apply(f,r))}return{invoke:o,instantiate:s,get:r,annotate:tu.$$annotate,has:function(t){return e.hasOwnProperty(t+l)||n.hasOwnProperty(t)}}}var d;i=i===!0;var y={},l="Provider",a=[],b=new gi([],!0),e={$provide:{provider:v(g),factory:v(w),service:v(rt),value:v(ut),constant:v(ft),decorator:ot}},s=e.$injector=tt(e,function(n,t){et.isString(t)&&a.push(t);throw vi("unpr","Unknown provider: {0}",a.join(" <- "));}),k={},p=tt(k,function(n,t){var i=s.get(n+l,t);return u.invoke(i.$get,i,undefined,n)}),u=p;return e["$injector"+l]={$get:ct(p)},d=nt(n),u=p.get("$injector"),u.strictDi=i,t(d,function(n){n&&u.invoke(n)}),u}function op(){var n=!0;this.disableAutoScrolling=function(){n=!1};this.$get=["$window","$location","$rootScope",function(t,i,r){function h(n){var t=null;return Array.prototype.some.call(n,function(n){if(yt(n)==="a")return t=n,!0}),t}function c(){var n=e.yOffset,i,r;return f(n)?n=n():ne(n)?(i=n[0],r=t.getComputedStyle(i),n=r.position!=="fixed"?0:i.getBoundingClientRect().bottom):g(n)||(n=0),n}function u(n){var i,r;n?(n.scrollIntoView(),i=c(),i&&(r=n.getBoundingClientRect().top,t.scrollBy(0,r-i))):t.scrollTo(0,0)}function e(n){n=o(n)?n:g(n)?n.toString():i.hash();var t;n?(t=s.getElementById(n))?u(t):(t=h(s.getElementsByName(n)))?u(t):n==="top"&&u(null):u(null)}var s=t.document;return n&&r.$watch(function(){return i.hash()},function(n,t){(n!==t||n!=="")&&yy(function(){r.$evalAsync(e)})}),e}]}function iu(n,t){return!n&&!t?"":n?t?(c(n)&&(n=n.join(" ")),c(t)&&(t=t.join(" ")),n+" "+t):n:t}function hp(n){for(var i,t=0;t<n.length;t++)if(i=n[t],i.nodeType===sp)return i}function cp(n){o(n)&&(n=n.split(" "));var i=p();return t(n,function(n){n.length&&(i[n]=!0)}),i}function yi(n){return h(n)?n:{}}function bp(n,i,u,f){function d(n){try{n.apply(null,ar(arguments,1))}finally{if(l--,l===0)while(b.length)try{b.pop()()}catch(t){u.error(t)}}}function ot(n){var t=n.indexOf("#");return t===-1?"":n.substr(t)}function tt(){y=null;it();rt()}function it(){h=ht();h=r(h)?null:h;ft(h,k)&&(h=k);k=h}function rt(){(v!==o.url()||a!==h)&&(v=o.url(),a=h,t(g,function(n){n(o.url(),h)}))}var o=this,c=n.location,p=n.history,ut=n.setTimeout,et=n.clearTimeout,w={},l,b,g,nt,k;o.isMock=!1;l=0;b=[];o.$$completeOutstandingRequest=d;o.$$incOutstandingRequestCount=function(){l++};o.notifyWhenNoOutstandingRequests=function(n){l===0?n():b.push(n)};var h,a,v=c.href,st=i.find("base"),y=null,ht=f.history?function(){try{return p.state}catch(n){}}:s;it();a=h;o.url=function(t,i,u){var s,e;return r(u)&&(u=null),c!==n.location&&(c=n.location),p!==n.history&&(p=n.history),t?(s=a===u,v===t&&(!f.history||s))?o:(e=v&&pi(v)===pi(t),v=t,a=u,!f.history||e&&s?(e||(y=t),i?c.replace(t):e?c.hash=ot(t):c.href=t,c.href!==t&&(y=t)):(p[i?"replaceState":"pushState"](u,"",t),it(),a=h),y&&(y=t),o):y||c.href.replace(/%27/g,"'")};o.state=function(){return h};g=[];nt=!1;k=null;o.onUrlChange=function(t){if(!nt){if(f.history)e(n).on("popstate",tt);e(n).on("hashchange",tt);nt=!0}return g.push(t),t};o.$$applicationDestroyed=function(){e(n).off("hashchange popstate",tt)};o.$$checkUrlChange=rt;o.baseHref=function(){var n=st.attr("href");return n?n.replace(/^(https?:)?\/\/[^/]*/,""):""};o.defer=function(n,t){var i;return l++,i=ut(function(){delete w[i];d(n)},t||0),w[i]=!0,i};o.defer.cancel=function(n){return w[n]?(delete w[n],et(n),d(s),!0):!1}}function kp(){this.$get=["$window","$log","$sniffer","$document",function(n,t,i,r){return new bp(n,r,t,i)}]}function dp(){this.$get=function(){function i(t,i){function y(n){n!==o&&(u?u===n&&(u=n.n):u=n,c(n.n,n.p),c(n,o),o=n,o.n=null)}function c(n,t){n!==t&&(n&&(n.p=t),t&&(t.n=n))}if(t in n)throw l("$cacheFactory")("iid","CacheId '{0}' is already taken!",t);var s=0,a=v({},i,{id:t}),f=p(),h=i&&i.capacity||Number.MAX_VALUE,e=p(),o=null,u=null;return n[t]={put:function(n,t){if(!r(t)){if(h<Number.MAX_VALUE){var i=e[n]||(e[n]={key:n});y(i)}return n in f||s++,f[n]=t,s>h&&this.remove(u.key),t}},get:function(n){if(h<Number.MAX_VALUE){var t=e[n];if(!t)return;y(t)}return f[n]},remove:function(n){if(h<Number.MAX_VALUE){var t=e[n];if(!t)return;t===o&&(o=t.p);t===u&&(u=t.n);c(t.n,t.p);delete e[n]}n in f&&(delete f[n],s--)},removeAll:function(){f=p();s=0;e=p();o=u=null},destroy:function(){f=null;a=null;e=null;delete n[t]},info:function(){return v({},a,{size:s})}}}var n={};return i.info=function(){var i={};return t(n,function(n,t){i[t]=n.info()}),i},i.get=function(t){return n[t]},i}}function gp(){this.$get=["$cacheFactory",function(n){return n("templates")}]}function nw(){}function hh(i,l){function et(n,i,r){var f=/^\s*([@&<]|=(\*?))(\??)\s*([\w$]*)\s*$/,u=p();return t(n,function(n,t){if(n in rt){u[t]=rt[n];return}var e=n.match(f);if(!e)throw k("iscp","Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}",i,t,n,r?"controller bindings definition":"isolate scope definition");u[t]={mode:e[1][0],collection:e[2]==="*",optional:e[3]==="?",attrName:e[4]||t};e[4]&&(rt[n]=u[t])}),u}function bt(n,t){var i={isolateScope:null,bindToController:null};if(h(n.scope)&&(n.bindToController===!0?(i.bindToController=et(n.scope,t,!0),i.isolateScope={}):i.isolateScope=et(n.scope,t,!1)),h(n.bindToController)&&(i.bindToController=et(n.bindToController,t,!0)),i.bindToController&&!n.controller)throw k("noctrl","Cannot bind to controller without directive '{0}'s controller.",t);return i}function kt(n){var t=n.charAt(0);if(!t||t!==a(t))throw k("baddir","Directive/Component name '{0}' is invalid. The first character must be a lowercase letter",n);if(n!==n.trim())throw k("baddir","Directive/Component name '{0}' is invalid. The name should not contain leading or trailing whitespaces",n);}function dt(n){var i=n.require||n.controller&&n.name;return!c(i)&&h(i)&&t(i,function(n,t){var r=n.match(ot),u=n.substring(r[0].length);u||(i[t]=r[0]+t)}),i}function ni(n,t){if(n&&!(o(n)&&/[EACM]/.test(n)))throw k("badrestrict","Restrict property '{0}' of directive '{1}' is invalid",n,t);return n||"EA"}var b={},it="Directive",st=/^\s*directive:\s*([\w-]+)\s+(.*)$/,ht=/(([\w-]+)(?::([^;]+))?;?)/,lt=av("ngSrc,ngSrcset,src,srcset"),ot=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,at=/^(on[a-z]+|formaction)$/,rt=p(),w,g,d,nt,tt;this.directive=function ii(n,r){return pr(n,"name"),di(n,"directive"),o(n)?(kt(n),pr(r,"directiveFactory"),b.hasOwnProperty(n)||(b[n]=[],i.factory(n+it,["$injector","$exceptionHandler",function(i,r){var u=[];return t(b[n],function(t,e){try{var o=i.invoke(t);f(o)?o={compile:ct(o)}:!o.compile&&o.link&&(o.compile=ct(o.link));o.priority=o.priority||0;o.index=e;o.name=o.name||n;o.require=dt(o);o.restrict=ni(o.restrict,n);o.$$moduleName=t.$$moduleName;u.push(o)}catch(s){r(s)}}),u}])),b[n].push(r)):t(n,go(ii)),this};this.component=function(n,i){function u(n){function u(t){return f(t)||c(t)?function(i,r){return n.invoke(t,this,{$element:i,$attrs:r})}:t}var o=!i.template&&!i.templateUrl?"":i.template,e={controller:r,controllerAs:tw(i.controller)||i.controllerAs||"$ctrl",template:u(o),templateUrl:u(i.templateUrl),transclude:i.transclude,scope:{},bindToController:i.bindings||{},restrict:"E",require:i.require};return t(i,function(n,t){t.charAt(0)==="$"&&(e[t]=n)}),e}var r=i.controller||function(){};return t(i,function(n,t){t.charAt(0)==="$"&&(u[t]=n,f(r)&&(r[t]=n))}),u.$inject=["$injector"],this.directive(n,u)};this.aHrefSanitizationWhitelist=function(n){return u(n)?(l.aHrefSanitizationWhitelist(n),this):l.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=function(n){return u(n)?(l.imgSrcSanitizationWhitelist(n),this):l.imgSrcSanitizationWhitelist()};w=!0;this.debugInfoEnabled=function(n){return u(n)?(w=n,this):w};g=!0;this.preAssignBindingsEnabled=function(n){return u(n)?(g=n,this):g};d=10;this.onChangesTtl=function(n){return arguments.length?(d=n,this):d};nt=!0;this.commentDirectivesEnabled=function(n){return arguments.length?(nt=n,this):nt};tt=!0;this.cssClassDirectivesEnabled=function(n){return arguments.length?(tt=n,this):tt};this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate","$$sanitizeUri",function(i,l,rt,et,ct,kt,dt,ni,ii,ri){function tu(){try{if(!--tr){fi=undefined;throw k("infchng","{0} $onChanges() iterations reached. Aborting!\n",d);}dt.$apply(function(){for(var n=[],t=0,i=fi.length;t<i;++t)try{fi[t]()}catch(r){n.push(r)}if(fi=undefined,n.length)throw n;})}finally{tr++}}function pi(n,t){if(t)for(var u=Object.keys(t),r,i=0,f=u.length;i<f;i++)r=u[i],this[r]=t[r];else this.$attr={};this.$$element=n}function iu(n,t,i){nr.innerHTML="<span "+t+">";var u=nr.firstChild.attributes,r=u[0];u.removeNamedItem(r.name);r.value=i;n.attributes.setNamedItem(r)}function wi(n,t){try{n.addClass(t)}catch(i){}}function ui(t,i,r,u,f){var l,o,a,h,c,s;for(t instanceof e||(t=e(t)),l=/\S+/,o=0,a=t.length;o<a;o++)h=t[o],h.nodeType===ci&&h.nodeValue.match(l)&&gs(h,t[o]=n.document.createElement("span"));return c=bi(t,i,t,r,u,f),ui.$$addScopeClass(t),s=null,function(n,i,r){var u,l;pr(n,"scope");f&&f.needsNewScope&&(n=n.$parent.$new());r=r||{};var o=r.parentBoundTranscludeFn,h=r.transcludeControllers,a=r.futureParentElement;if(o&&o.$$boundTransclude&&(o=o.$$boundTransclude),s||(s=fu(a)),u=s!=="html"?e(gi(s,e("<div>").append(t).html())):i?li.clone.call(t):t,h)for(l in h)u.data("$"+l+"Controller",h[l].instance);return ui.$$addScopeInfo(u,n),i&&i(u,n),c&&c(n,u,u,o),u}}function fu(n){var t=n&&n[0];return t?yt(t)!=="foreignobject"&&ut.call(t).match(/SVG/)?"svg":"html":"html"}function bi(n,t,i,r,u,f){function w(n,i,r,u){var o,h,c,l,f,p,v,w,a,b;if(y)for(b=i.length,a=new Array(b),f=0;f<s.length;f+=3)v=s[f],a[v]=i[v];else a=i;for(f=0,p=s.length;f<p;)c=a[s[f++]],o=s[f++],h=s[f++],o?(o.scope?(l=n.$new(),ui.$$addScopeInfo(e(c),l)):l=n,w=o.transcludeOnThisElement?oi(n,o.transclude,u):!o.templateOnThisElement&&u?u:!u&&t?oi(n,t):null,o(h,l,c,r,w)):h&&h(n,c.childNodes,undefined,u)}for(var s=[],c,l,o,a,v,p,y,h=0;h<n.length;h++)c=new pi,l=ki(n[h],[],c,h===0?r:undefined,u),o=l.length?cr(l,n[h],c,t,i,null,[],[],f):null,o&&o.scope&&ui.$$addScopeClass(c.$$element),v=o&&o.terminal||!(a=n[h].childNodes)||!a.length?null:bi(a,o?(o.transcludeOnThisElement||!o.templateOnThisElement)&&o.transclude:t),(o||v)&&(s.push(h,o,v),p=!0,y=y||o),f=null;return p?w:null}function oi(n,t,i){function u(r,u,f,e,o){return r||(r=n.$new(!1,o),r.$$transcluded=!0),t(r,u,{parentBoundTranscludeFn:i,transcludeControllers:f,futureParentElement:e})}var f=u.$$slots=p();for(var r in t.$$slots)f[r]=t.$$slots[r]?oi(n,t.$$slots[r],i):null;return u}function ki(n,t,i,r,u){var tt=n.nodeType,it=i.$attr,c,a,s,d,g,nt;switch(tt){case gt:a=yt(n);ai(t,wt(a),"E",r,u);for(var v,f,e,p,w,l,b=n.attributes,k=0,rt=b&&b.length;k<rt;k++)d=!1,g=!1,v=b[k],f=v.name,w=y(v.value),p=wt(f),l=ru.test(p),l&&(f=f.replace(ae,"").substr(8).replace(/_(.)/g,function(n,t){return t.toUpperCase()})),nt=p.match(uu),nt&&su(nt[1])&&(d=f,g=f.substr(0,f.length-5)+"end",f=f.substr(0,f.length-6)),e=wt(f.toLowerCase()),it[e]=f,(l||!i.hasOwnProperty(e))&&(i[e]=w,uh(n,e)&&(i[e]=!0)),vu(n,t,w,e,l),ai(t,e,"A",r,u,d,g);if(a==="input"&&n.getAttribute("type")==="hidden"&&n.setAttribute("autocomplete","off"),!nu)break;if(s=n.className,h(s)&&(s=s.animVal),o(s)&&s!=="")while(c=ht.exec(s))e=wt(c[2]),ai(t,e,"C",r,u)&&(i[e]=y(c[3])),s=s.substr(c.index+c[0].length);break;case ci:if(ti===11)while(n.parentNode&&n.nextSibling&&n.nextSibling.nodeType===ci)n.nodeValue=n.nodeValue+n.nextSibling.nodeValue,n.parentNode.removeChild(n.nextSibling);lu(t,n.nodeValue);break;case wr:if(!gr)break;eu(n,t,i,r,u)}return t.sort(cu),t}function eu(n,t,i,r,u){var f,e;try{f=st.exec(n.nodeValue);f&&(e=wt(f[1]),ai(t,e,"M",r,u)&&(i[e]=y(f[2])))}catch(o){}}function er(n,t,i){var r=[],u=0;if(t&&n.hasAttribute&&n.hasAttribute(t)){do{if(!n)throw k("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,i);n.nodeType===gt&&(n.hasAttribute(t)&&u++,n.hasAttribute(i)&&u--);r.push(n);n=n.nextSibling}while(u>0)}else r.push(n);return e(r)}function or(n,t,i){return function(r,u,f,e,o){return u=er(u[0],t,i),n(r,u,f,e,o)}}function di(n,t,i,r,u,f){var e;return n?ui(t,i,r,u,f):function(){return e||(e=ui(t,i,r,u,f),t=i=f=null),e.apply(this,arguments)}}function cr(n,i,u,o,s,l,a,w,b){function fr(n,t,i,r){n&&(i&&(n=or(n,i,r)),n.require=d.require,n.directiveName=st,(nt===d||d.$$isolateScope)&&(n=br(n,{isolateScope:!0})),a.push(n));t&&(i&&(t=or(t,i,r)),t.require=d.require,t.directiveName=st,(nt===d||d.$$isolateScope)&&(t=br(t,{isolateScope:!0})),w.push(t))}function lt(n,o,s,l,y){function dt(n,t,i,u){var e,f;if(sr(n)||(u=i,i=t,t=n,n=undefined),ti&&(e=it),i||(i=ti?p.parent():p),u){if(f=y.$$slots[u],f)return f(n,t,e,i,at);if(r(f))throw k("noslot",'No parent directive that requires a transclusion with slot name "{0}". Element: {1}',u,pt(p));}else return y(n,t,e,i,at)}var et,kt,d,tt,st,it,ht,p,ut,wt,bt,yt,at;i===s?(ut=u,p=u.$$element):(p=e(s),ut=new pi(p,u));st=o;nt?tt=o.$new(!0):ft&&(st=o.$parent);y&&(ht=dt,ht.$$boundTransclude=y,ht.isSlotFilled=function(n){return!!y.$$slots[n]});ot&&(it=ou(p,ut,ht,ot,tt,o,nt));nt&&(ui.$$addScopeInfo(p,tt,!0,!(ct&&(ct===nt||ct===nt.$$originalDirective))),ui.$$addScopeClass(p,!0),tt.$$isolateBindings=nt.$$isolateBindings,wt=yi(o,ut,tt,tt.$$isolateBindings,nt),wt.removeWatches&&tt.$on("$destroy",wt.removeWatches));for(bt in it){var lt=ot[bt],b=it[bt],vt=lt.$$bindings.bindToController;g?(b.bindingInfo=vt?yi(st,ut,b.instance,vt,lt):{},yt=b(),yt!==b.instance&&(b.instance=yt,p.data("$"+lt.name+"Controller",yt),b.bindingInfo.removeWatches&&b.bindingInfo.removeWatches(),b.bindingInfo=yi(st,ut,b.instance,vt,lt))):(b.instance=b(),p.data("$"+lt.name+"Controller",b.instance),b.bindingInfo=yi(st,ut,b.instance,vt,lt))}for(t(ot,function(n,t){var i=n.require;n.bindToController&&!c(i)&&h(i)&&v(it[t].instance,hi(t,i,p,it))}),t(it,function(n){var t=n.instance;if(f(t.$onChanges))try{t.$onChanges(n.bindingInfo.initialChanges)}catch(i){rt(i)}if(f(t.$onInit))try{t.$onInit()}catch(i){rt(i)}f(t.$doCheck)&&(st.$watch(function(){t.$doCheck()}),t.$doCheck());f(t.$onDestroy)&&st.$on("$destroy",function(){t.$onDestroy()})}),et=0,kt=a.length;et<kt;et++)d=a[et],kr(d,d.isolateScope?tt:o,p,ut,d.require&&hi(d.directiveName,d.require,p,it),ht);for(at=o,nt&&(nt.template||nt.templateUrl===null)&&(at=tt),n&&n(at,s.childNodes,undefined,y),et=w.length-1;et>=0;et--)d=w[et],kr(d,d.isolateScope?tt:o,p,ut,d.require&&hi(d.directiveName,d.require,p,it),ht);t(it,function(n){var t=n.instance;f(t.$postLink)&&t.$postLink()})}var ht,fi,dt,oi,bt,tr,et,bi,si,ci,li;b=b||{};var kt=-Number.MAX_VALUE,ft=b.newScopeDirective,ot=b.controllerDirectives,nt=b.newIsolateScopeDirective,ct=b.templateDirective,ni=b.nonTlbTranscludeDirective,ai=!1,wi=!1,ti=b.hasElementTranscludeDirective,tt=u.$$element=e(i),d,st,ut,ii=l,at=o,vt,nr=!1,ri=!1,it;for(ht=0,fi=n.length;ht<fi;ht++){if(d=n[ht],dt=d.$$start,oi=d.$$end,dt&&(tt=er(i,dt,oi)),ut=undefined,kt>d.priority)break;if(it=d.scope,it&&(d.templateUrl||(h(it)?(ei("new/isolated scope",nt||ft,d,tt),nt=d):ei("new/isolated scope",nt,d,tt)),ft=ft||d),st=d.name,!nr&&(d.replace&&(d.templateUrl||d.template)||d.transclude&&!d.$$tlb)){for(tr=ht+1;bt=n[tr++];)if(bt.transclude&&!bt.$$tlb||bt.replace&&(bt.templateUrl||bt.template)){ri=!0;break}nr=!0}if(!d.templateUrl&&d.controller&&(ot=ot||p(),ei("'"+st+"' controller",ot[st],d,tt),ot[st]=d),it=d.transclude,it)if(ai=!0,d.$$tlb||(ei("transclusion",ni,d,tt),ni=d),it==="element")ti=!0,kt=d.priority,ut=tt,tt=u.$$element=e(ui.$$createComment(st,u[st])),i=tt[0],vi(s,ar(ut),i),ut[0].$$parentNode=ut[0].parentNode,at=di(ri,ut,o,kt,ii&&ii.name,{nonTlbTranscludeDirective:ni});else{if(et=p(),ut=e(oe(i)).contents(),h(it)){ut=[];bi=p();si=p();t(it,function(n,t){var i=n.charAt(0)==="?";n=i?n.substring(1):n;bi[n]=t;et[t]=null;si[t]=i});t(tt.contents(),function(n){var t=bi[wt(yt(n))];t?(si[t]=!0,et[t]=et[t]||[],et[t].push(n)):ut.push(n)});t(si,function(n,t){if(!n)throw k("reqslot","Required transclusion slot `{0}` was not filled.",t);});for(ci in et)et[ci]&&(et[ci]=di(ri,et[ci],o))}tt.empty();at=di(ri,ut,o,undefined,undefined,{needsNewScope:d.$$isolateScope||d.$$newScope});at.$$slots=et}if(d.template)if(wi=!0,ei("template",ct,d,tt),ct=d,it=f(d.template)?d.template(tt,u):d.template,it=ur(it),d.replace){if(ii=d,ut=ee(it)?[]:lh(gi(d.templateNamespace,y(it))),i=ut[0],ut.length!==1||i.nodeType!==gt)throw k("tplrt","Template for directive '{0}' must have exactly one root element. {1}",st,"");vi(s,tt,i);var ir={$attr:{}},rr=ki(i,[],ir),hr=n.splice(ht+1,n.length-(ht+1));(nt||ft)&&lr(rr,nt,ft);n=n.concat(rr).concat(hr);yr(u,ir);fi=n.length}else tt.html(it);if(d.templateUrl)wi=!0,ei("template",ct,d,tt),ct=d,d.replace&&(ii=d),lt=hu(n.splice(ht,n.length-ht),tt,u,s,ai&&at,a,w,{controllerDirectives:ot,newScopeDirective:ft!==d&&ft,newIsolateScopeDirective:nt,templateDirective:ct,nonTlbTranscludeDirective:ni}),fi=n.length;else if(d.compile)try{vt=d.compile(tt,u,at);li=d.$$originalDirective||d;f(vt)?fr(null,vr(li,vt),dt,oi):vt&&fr(vr(li,vt.pre),vr(li,vt.post),dt,oi)}catch(cr){rt(cr,pt(tt))}d.terminal&&(lt.terminal=!0,kt=Math.max(kt,d.priority))}return lt.scope=ft&&ft.scope===!0,lt.transcludeOnThisElement=ai,lt.templateOnThisElement=wi,lt.transclude=at,b.hasElementTranscludeDirective=ti,lt}function hi(n,i,r,u){var f,a,e,y;if(o(i)){var s=i.match(ot),l=i.substring(s[0].length),v=s[1]||s[3],p=s[2]==="?";if(v==="^^"?r=r.parent():(f=u&&u[l],f=f&&f.instance),f||(a="$"+l+"Controller",f=v?r.inheritedData(a):r.data(a)),!f&&!p)throw k("ctreq","Controller '{0}', required by directive '{1}', can't be found!",l,n);}else if(c(i))for(f=[],e=0,y=i.length;e<y;e++)f[e]=hi(n,i[e],r,u);else h(i)&&(f={},t(i,function(t,i){f[i]=hi(n,t,r,u)}));return f||null}function ou(n,t,i,r,u,f,e){var c=p(),l,h;for(l in r){var o=r[l],a={$scope:o===e||o.$$isolateScope?u:f,$element:n,$attrs:t,$transclude:i},s=o.controller;s==="@"&&(s=t[o.name]);h=kt(s,a,!0,o.controllerAs);c[o.name]=h;n.data("$"+o.name+"Controller",h.instance)}return c}function lr(n,t,i){for(var r=0,u=n.length;r<u;r++)n[r]=df(n[r],{$$isolateScope:t,$$newScope:i})}function ai(n,t,u,f,e,o,s){var l,v;if(t===e)return null;if(l=null,b.hasOwnProperty(t))for(var c,y=i.get(t+it),a=0,p=y.length;a<p;a++)c=y[a],(r(f)||f>c.priority)&&c.restrict.indexOf(u)!==-1&&(o&&(c=df(c,{$$start:o,$$end:s})),c.$$bindings||(v=c.$$bindings=bt(c,c.name),h(v.isolateScope)&&(c.$$isolateBindings=v.isolateScope)),n.push(c),l=c);return l}function su(n){if(b.hasOwnProperty(n))for(var r,u=i.get(n+it),t=0,f=u.length;t<f;t++)if(r=u[t],r.multiElement)return!0;return!1}function yr(n,i){var r=i.$attr,u=n.$attr;t(n,function(t,u){u.charAt(0)!=="$"&&(i[u]&&i[u]!==t&&(t+=(u==="style"?";":" ")+i[u]),n.$set(u,t,!0,r[u]))});t(i,function(t,i){n.hasOwnProperty(i)||i.charAt(0)==="$"||(n[i]=t,i!=="class"&&i!=="style"&&(u[i]=r[i]))})}function hu(n,i,r,u,o,s,c,l){var v=[],p,w,b=i[0],a=n.shift(),g=df(a,{templateUrl:null,transclude:null,replace:null,$$originalDirective:a}),d=f(a.templateUrl)?a.templateUrl(i,r):a.templateUrl,nt=a.templateNamespace;return i.empty(),et(d).then(function(f){var tt,rt,ut,st,ft,ct;if(f=ur(f),a.replace){if(ut=ee(f)?[]:lh(gi(nt,y(f))),tt=ut[0],ut.length!==1||tt.nodeType!==gt)throw k("tplrt","Template for directive '{0}' must have exactly one root element. {1}",a.name,d);rt={$attr:{}};vi(u,i,tt);ft=ki(tt,[],rt);h(a.scope)&&lr(ft,!0);n=ft.concat(n);yr(r,rt)}else tt=b,i.html(f);for(n.unshift(g),p=cr(n,tt,r,o,i,a,s,c,l),t(u,function(n,t){n===tt&&(u[t]=i[0])}),w=bi(i[0].childNodes,o);v.length;){var et=v.shift(),ot=v.shift(),lt=v.shift(),ht=v.shift(),it=i[0];et.$$destroyed||(ot!==b&&(ct=ot.className,l.hasElementTranscludeDirective&&a.replace||(it=oe(tt)),vi(lt,e(ot),it),wi(e(it),ct)),st=p.transcludeOnThisElement?oi(et,p.transclude,ht):ht,p(w,et,it,u,st))}v=null}),function(n,t,i,r,u){var f=u;t.$$destroyed||(v?v.push(t,i,r,f):(p.transcludeOnThisElement&&(f=oi(t,p.transclude,u)),p(w,t,i,r,f)))}}function cu(n,t){var i=t.priority-n.priority;return i!==0?i:n.name!==t.name?n.name<t.name?-1:1:n.index-t.index}function ei(n,t,i,r){function u(n){return n?" (module: "+n+")":""}if(t)throw k("multidir","Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}",t.name,u(t.$$moduleName),i.name,u(i.$$moduleName),n,pt(r));}function lu(n,t){var i=l(t,!0);i&&n.push({priority:0,compile:function(n){var t=n.parent(),r=!!t.length;return r&&ui.$$addBindingClass(t),function(n,t){var u=t.parent();r||ui.$$addBindingClass(u);ui.$$addBindingInfo(u,i.expressions);n.$watch(i,function(n){t[0].nodeValue=n})}}})}function gi(t,i){t=a(t||"html");switch(t){case"svg":case"math":var r=n.document.createElement("div");return r.innerHTML="<"+t+">"+i+"<\/"+t+">",r.childNodes[0].childNodes;default:return i}}function au(n,t){if(t==="srcdoc")return ni.HTML;var i=yt(n);if(t==="src"||t==="ngSrc"){if(["img","video","audio","source","track"].indexOf(i)===-1)return ni.RESOURCE_URL}else if(t==="xlinkHref"||i==="form"&&t==="action")return ni.RESOURCE_URL}function vu(n,t,i,r,u){var e=au(n,r),s=!u,o=lt[r]||u,f=l(i,s,e,o);if(f){if(r==="multiple"&&yt(n)==="select")throw k("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",pt(n));t.push({priority:100,compile:function(){return{pre:function(n,t,u){var h=u.$$observers||(u.$$observers=p()),s;if(at.test(r))throw k("nodomevents","Interpolations for HTML DOM event attributes are disallowed.  Please use the ng- versions (such as ng-click instead of onclick) instead.");(s=u[r],s!==i&&(f=s&&l(s,!0,e,o),i=s),f)&&(u[r]=f(n),(h[r]||(h[r]=[])).$$inter=!0,(u.$$observers&&u.$$observers[r].$$scope||n).$watch(f,function(n,t){r==="class"&&n!==t?u.$updateClass(n,t):u.$set(r,n)}))}}}})}}function vi(t,i,r){var f=i[0],s=i.length,l=f.parentNode,u,a,c;if(t)for(u=0,a=t.length;u<a;u++)if(t[u]===f){t[u++]=r;for(var o=u,h=o+s-1,v=t.length;o<v;o++,h++)h<v?t[o]=t[h]:delete t[o];t.length-=s-1;t.context===f&&(t.context=r);break}for(l&&l.replaceChild(r,f),c=n.document.createDocumentFragment(),u=0;u<s;u++)c.appendChild(i[u]);for(e.hasData(f)&&(e.data(r,e.data(f)),e(f).off("$destroy")),e.cleanData(c.querySelectorAll("*")),u=1;u<s;u++)delete i[u];i[0]=r;i.length=1}function br(n,t){return v(function(){return n.apply(null,arguments)},n,t)}function kr(n,t,i,r,u,f){try{n(t,i,r,u,f)}catch(e){rt(e,pt(i))}}function yi(n,i,r,u,e){function v(t,i,u){f(r.$onChanges)&&i!==u&&(i===i||u===u)&&(fi||(n.$$postDigest(tu),fi=[]),h||(h={},fi.push(y)),h[t]&&(u=h[t].previousValue),h[t]=new of(u,i))}function y(){r.$onChanges(h);h=undefined}var c=[],a={},h;return t(u,function(t,u){var f=t.attrName,p=t.optional,it=t.mode,y,h,tt,g,w,b,nt,d;switch(it){case"@":p||vt.call(i,f)||(r[u]=i[f]=undefined);w=i.$observe(f,function(n){if(o(n)||si(n)){var t=r[u];v(u,n,t);r[u]=n}});i.$$observers[f].$$scope=n;y=i[f];o(y)?r[u]=l(y)(n):si(y)&&(r[u]=y);a[u]=new of(ef,r[u]);c.push(w);break;case"=":if(!vt.call(i,f)){if(p)break;i[f]=undefined}if(p&&!i[f])break;h=ct(i[f]);g=h.literal?ft:function(n,t){return n===t||n!==n&&t!==t};tt=h.assign||function(){y=r[u]=h(n);throw k("nonassign","Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!",i[f],f,e.name);};y=r[u]=h(n);b=function(t){return g(t,r[u])||(g(t,y)?tt(n,t=r[u]):r[u]=t),y=t};b.$stateful=!0;w=t.collection?n.$watchCollection(i[f],b):n.$watch(ct(i[f],b),null,h.literal);c.push(w);break;case"<":if(!vt.call(i,f)){if(p)break;i[f]=undefined}if(p&&!i[f])break;h=ct(i[f]);nt=h.literal;d=r[u]=h(n);a[u]=new of(ef,r[u]);w=n.$watch(h,function(n,t){if(t===n){if(t===d||nt&&ft(t,d))return;t=d}v(u,n,t);r[u]=n},nt);c.push(w);break;case"&":if(h=i.hasOwnProperty(f)?ct(i[f]):s,h===s&&p)break;r[u]=function(t){return h(n,t)}}}),{initialChanges:a,removeWatches:c.length&&function(){for(var n=0,t=c.length;n<t;++n)c[n]()}}}var dr=/^\w/,nr=n.document.createElement("div"),gr=nt,nu=tt,tr=d,fi;pi.prototype={$normalize:wt,$addClass:function(n){n&&n.length>0&&ii.addClass(this.$$element,n)},$removeClass:function(n){n&&n.length>0&&ii.removeClass(this.$$element,n)},$updateClass:function(n,t){var r=ch(n,t),i;r&&r.length&&ii.addClass(this.$$element,r);i=ch(t,n);i&&i.length&&ii.removeClass(this.$$element,i)},$set:function(n,i,f,e){var d=this.$$element[0],w=uh(d,n),a=py(n),b=n,h,s,v,l,p;if(w?(this.$$element.prop(n,i),e=w):a&&(this[a]=i,b=a),this[n]=i,e?this.$attr[n]=e:(e=this.$attr[n],e||(this.$attr[n]=e=vs(n,"-"))),h=yt(this.$$element),h==="a"&&(n==="href"||n==="xlinkHref")||h==="img"&&n==="src")this[n]=i=ri(i,n==="src");else if(h==="img"&&n==="srcset"&&u(i)){var o="",k=y(i),g=/\s/.test(k)?/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/:/(,)/,c=k.split(g),nt=Math.floor(c.length/2);for(s=0;s<nt;s++)v=s*2,o+=ri(y(c[v]),!0),o+=" "+y(c[v+1]);l=y(c[s*2]).split(/\s/);o+=ri(y(l[0]),!0);l.length===2&&(o+=" "+y(l[1]));this[n]=i=o}f!==!1&&(i===null||r(i)?this.$$element.removeAttr(e):dr.test(e)?this.$$element.attr(e,i):iu(this.$$element[0],e,i));p=this.$$observers;p&&t(p[b],function(n){try{n(i)}catch(t){rt(t)}})},$observe:function(n,t){var i=this,f=i.$$observers||(i.$$observers=p()),u=f[n]||(f[n]=[]);return u.push(t),dt.$evalAsync(function(){u.$$inter||!i.hasOwnProperty(n)||r(i[n])||t(i[n])}),function(){hr(u,t)}}};var ir=l.startSymbol(),rr=l.endSymbol(),ur=ir==="{{"&&rr==="}}"?fr:function(n){return n.replace(/\{\{/g,ir).replace(/}}/g,rr)},ru=/^ngAttr[A-Z]/,uu=/^(.+)Start$/;return ui.$$addBindingInfo=w?function(n,t){var i=n.data("$binding")||[];c(t)?i=i.concat(t):i.push(t);n.data("$binding",i)}:s,ui.$$addBindingClass=w?function(n){wi(n,"ng-binding")}:s,ui.$$addScopeInfo=w?function(n,t,i,r){var u=i?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope";n.data(u,t)}:s,ui.$$addScopeClass=w?function(n,t){wi(n,t?"ng-isolate-scope":"ng-scope")}:s,ui.$$createComment=function(t,i){var r="";return w&&(r=" "+(t||"")+": ",i&&(r+=i+" ")),n.document.createComment(r)},ui}]}function of(n,t){this.previousValue=n;this.currentValue=t}function wt(n){return dr(n.replace(ae,""))}function ch(n,t){var u="",e=n.split(/\s+/),o=t.split(/\s+/),i,f,r;n:for(i=0;i<e.length;i++){for(f=e[i],r=0;r<o.length;r++)if(f===o[r])continue n;u+=(u.length>0?" ":"")+f}return u}function lh(n){var t,i;if(n=e(n),t=n.length,t<=1)return n;while(t--)i=n[t],(i.nodeType===wr||i.nodeType===ci&&i.nodeValue.trim()==="")&&rv.call(n,t,1);return n}function tw(n,t){if(t&&o(t))return t;if(o(n)){var i=ye.exec(n);if(i)return i[3]}}function iw(){var n={},t=!1;this.has=function(t){return n.hasOwnProperty(t)};this.register=function(t,i){di(t,"controller");h(t)?v(n,t):n[t]=i};this.allowGlobals=function(){t=!0};this.$get=["$injector","$window",function(i,r){function u(n,t,i,r){if(!(n&&h(n.$scope)))throw l("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",r,t);n.$scope[t]=i}return function(e,s,l,a){var p,b,y,w,k;if(l=l===!0,a&&o(a)&&(w=a),o(e)){if(b=e.match(ye),!b)throw ve("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",e);if(y=b[1],w=w||b[3],e=n.hasOwnProperty(y)?n[y]:ys(s.$scope,y,!0)||(t?ys(r,y,!0):undefined),!e)throw ve("ctrlreg","The controller with the name '{0}' is not registered.",y);ki(e,y,!0)}return l?(k=(c(e)?e[e.length-1]:e).prototype,p=Object.create(k||null),w&&u(s,w,p,y||e.name),v(function(){var n=i.invoke(e,p,s,y);return n!==p&&(h(n)||f(n))&&(p=n,w&&u(s,w,p,y||e.name)),p},{instance:p,identifier:w})):(p=i.instantiate(e,s,y),w&&u(s,w,p,y||e.name),p)}}]}function rw(){this.$get=["$window",function(n){return e(n.document)}]}function uw(){this.$get=["$log",function(n){return function(){n.error.apply(n,arguments)}}]}function we(n){return h(n)?ot(n)?n.toISOString():yr(n):n}function cw(){this.$get=function(){return function(n){if(!n)return"";var i=[];return ko(n,function(n,u){n===null||r(n)||(c(n)?t(n,function(n){i.push(lt(u)+"="+lt(we(n)))}):i.push(lt(u)+"="+lt(we(n))))}),i.join("&")}}}function lw(){this.$get=function(){return function(n){function i(n,f,e){n===null||r(n)||(c(n)?t(n,function(n,t){i(n,f+"["+(h(n)?t:"")+"]")}):h(n)&&!ot(n)?ko(n,function(n,t){i(n,f+(e?"":"[")+t+(e?"":"]"))}):u.push(lt(f)+"="+lt(we(n))))}if(!n)return"";var u=[];return i(n,"",!0),u.join("&")}}}function be(n,t){var i,r;return o(n)&&(i=n.replace(sw,"").trim(),i&&(r=t("Content-Type"),(r&&r.indexOf(ah)===0||aw(i))&&(n=fs(i)))),n}function aw(n){var t=n.match(ew);return t&&ow[t[0]].test(n)}function yh(n){function u(n,t){n&&(i[n]=i[n]?i[n]+", "+t:t)}var i=p(),r;return o(n)?t(n.split("\n"),function(n){r=n.indexOf(":");u(a(y(n.substr(0,r))),y(n.substr(r+1)))}):h(n)&&t(n,function(n,t){u(a(t),y(n))}),i}function ph(n){var t;return function(i){if(t||(t=yh(n)),i){var r=t[a(i)];return r===undefined&&(r=null),r}return t}}function wh(n,i,r,u){return f(u)?u(n,i,r):(t(u,function(t){n=t(n,i,r)}),n)}function ke(n){return 200<=n&&n<300}function vw(){var n=this.defaults={transformResponse:[be],transformRequest:[function(n){return h(n)&&!ov(n)&&!hv(n)&&!sv(n)?yr(n):n}],headers:{common:{Accept:"application/json, text/plain, */*"},post:st(pe),put:st(pe),patch:st(pe)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},i=!1,e,s;this.useApplyAsync=function(n){return u(n)?(i=!!n,this):i};e=!0;this.useLegacyPromiseExtensions=function(n){return u(n)?(e=!!n,this):e};s=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(y,p,w,b,k,d){function g(i){function p(n,t){for(var u,f,i=0,r=t.length;i<r;)u=t[i++],f=t[i++],n=n.then(u,f);return t.length=0,n}function b(n,i){var r,u={};return t(n,function(n,t){f(n)?(r=n(i),r!=null&&(u[t]=r)):u[t]=n}),u}function g(t){var i=n.headers,u=v({},t.headers),r,f,e;i=v({},i.common,i[a(t.method)]);n:for(r in i){f=a(r);for(e in u)if(a(e)===f)continue n;u[r]=i[r]}return b(u,st(t))}function tt(i){var u=i.headers,f=wh(i.data,ph(u),undefined,i.transformRequest);return r(f)&&t(u,function(n,t){a(t)==="content-type"&&delete u[t]}),r(i.withCredentials)&&!r(n.withCredentials)&&(i.withCredentials=n.withCredentials),ut(i,f).then(w,w)}function w(n){var t=v({},n);return t.data=wh(n.data,n.headers,n.status,s.transformResponse),ke(n.status)?t:k.reject(t)}var s;if(!h(i))throw l("$http")("badreq","Http request configuration must be an object.  Received: {0}",i);if(!o(i.url))throw l("$http")("badreq","Http request configuration url must be a string.  Received: {0}",i.url);s=v({method:"get",transformRequest:n.transformRequest,transformResponse:n.transformResponse,paramSerializer:n.paramSerializer},i);s.headers=g(i);s.method=ur(s.method);s.paramSerializer=o(s.paramSerializer)?d.get(s.paramSerializer):s.paramSerializer;var c=[],y=[],u=k.when(s);return t(nt,function(n){(n.request||n.requestError)&&c.unshift(n.request,n.requestError);(n.response||n.responseError)&&y.push(n.response,n.responseError)}),u=p(u,c),u=u.then(tt),u=p(u,y),e?(u.success=function(n){return ki(n,"fn"),u.then(function(t){n(t.data,t.status,t.headers,s)}),u},u.error=function(n){return ki(n,"fn"),u.then(null,function(t){n(t.data,t.status,t.headers,s)}),u}):(u.success=vh("success"),u.error=vh("error")),u}function it(){t(arguments,function(n){g[n]=function(t,i){return g(v({},i||{},{method:n,url:t}))}})}function rt(){t(arguments,function(n){g[n]=function(t,i,r){return g(v({},r||{},{method:n,url:t,data:i}))}})}function ut(f,e){function it(n){if(n){var r={};return t(n,function(n,t){r[t]=function(t){function r(){n(t)}i?b.$applyAsync(r):b.$$phase?r():b.$apply(r)}}),r}}function et(n,t,r,u){function f(){a(t,n,r,u)}s&&(ke(n)?s.put(l,[n,t,yh(r),u]):s.remove(l));i?b.$applyAsync(f):(f(),b.$$phase||b.$apply())}function a(n,t,i,r){t=t>=-1?t:0;(ke(t)?v.resolve:v.reject)({data:n,status:t,headers:ph(i),config:f,statusText:r})}function rt(n){a(n.data,n.status,st(n.headers()),n.statusText)}function ut(){var n=g.pendingRequests.indexOf(f);n!==-1&&g.pendingRequests.splice(n,1)}var v=k.defer(),w=v.promise,s,o,nt=f.headers,l=ft(f.url,f.paramSerializer(f.params)),d;return g.pendingRequests.push(f),w.then(ut,ut),(f.cache||n.cache)&&f.cache!==!1&&(f.method==="GET"||f.method==="JSONP")&&(s=h(f.cache)?f.cache:h(n.cache)?n.cache:tt),s&&(o=s.get(l),u(o)?yu(o)?o.then(rt,rt):c(o)?a(o[1],o[0],st(o[2]),o[3]):a(o,200,{},"OK"):s.put(l,w)),r(o)&&(d=rl(f.url)?p()[f.xsrfCookieName||n.xsrfCookieName]:undefined,d&&(nt[f.xsrfHeaderName||n.xsrfHeaderName]=d),y(f.method,l,e,et,nt,f.timeout,f.withCredentials,f.responseType,it(f.eventHandlers),it(f.uploadEventHandlers))),w}function ft(n,t){return t.length>0&&(n+=(n.indexOf("?")===-1?"?":"&")+t),n}var tt=w("$http"),nt;return n.paramSerializer=o(n.paramSerializer)?d.get(n.paramSerializer):n.paramSerializer,nt=[],t(s,function(n){nt.unshift(o(n)?d.get(n):d.invoke(n))}),g.pendingRequests=[],it("get","delete","head","jsonp"),rt("post","put","patch"),g.defaults=n,g}]}function yw(){this.$get=function(){return function(){return new n.XMLHttpRequest}}}function pw(){this.$get=["$browser","$jsonpCallbacks","$document","$xhrFactory",function(n,t,i,r){return ww(n,r,n.defer,t,i[0])}]}function ww(n,i,f,e,o){function h(n,t,i){n=n.replace("JSON_CALLBACK",t);var r=o.createElement("script"),u=null;return r.type="text/javascript",r.src=n,r.async=!0,u=function(n){kr(r,"load",u);kr(r,"error",u);o.body.removeChild(r);r=null;var f=-1,s="unknown";n&&(n.type!=="load"||e.wasCalled(t)||(n={type:"error"}),s=n.type,f=n.type==="error"?404:200);i&&i(f,s)},bu(r,"load",u),bu(r,"error",u),o.body.appendChild(r),u}return function(o,c,l,v,y,p,w,b,k,d){function ft(){tt&&tt();g&&g.abort()}function ut(t,i,r,e,o){u(rt)&&f.cancel(rt);tt=g=null;t(i,r,e,o);n.$$completeOutstandingRequest(s)}var nt,tt,g,it,rt;if(n.$$incOutstandingRequestCount(),c=c||n.url(),a(o)==="jsonp")nt=e.createCallback(c),tt=h(c,nt,function(n,t){var i=n===200&&e.getResponse(nt);ut(v,n,i,"",t);e.removeCallback(nt)});else{if(g=i(o,c),g.open(o,c,!0),t(y,function(n,t){u(n)&&g.setRequestHeader(t,n)}),g.onload=function(){var i=g.statusText||"",t="response"in g?g.response:g.responseText,n=g.status===1223?204:g.status;n===0&&(n=t?200:ei(c).protocol==="file"?404:0);ut(v,n,t,g.getAllResponseHeaders(),i)},it=function(){ut(v,-1,null,null,"")},g.onerror=it,g.onabort=it,g.ontimeout=it,t(k,function(n,t){g.addEventListener(t,n)}),t(d,function(n,t){g.upload.addEventListener(t,n)}),w&&(g.withCredentials=!0),b)try{g.responseType=b}catch(et){if(b!=="json")throw et;}g.send(r(l)?null:l)}p>0?rt=f(ft,p):yu(p)&&p.then(ft)}}function bw(){var n="{{",t="}}";this.startSymbol=function(t){return t?(n=t,this):n};this.endSymbol=function(n){return n?(t=n,this):t};this.$get=["$parse","$exceptionHandler","$sce",function(i,e,o){function l(n){return"\\\\\\"+n}function s(i){return i.replace(y,n).replace(p,t)}function w(n){if(n==null)return"";switch(typeof n){case"string":break;case"number":n=""+n;break;default:n=yr(n)}return n}function b(n,t,i,r){var u=n.$watch(function(n){return u(),r(n)},t,i);return u}function h(h,l,y,p){function lt(n){try{return n=ht(n),p&&!u(n)?n:w(n)}catch(t){e(ui.interr(h,t))}}var g,et,ft,ht;if(!h.length||h.indexOf(n)===-1)return l||(et=s(h),g=ct(et),g.exp=h,g.expressions=[],g.$$watchDelegate=b),g;p=!!p;for(var nt,it,k=0,tt=[],rt=[],ot=h.length,ut,d=[],st=[];k<ot;)if((nt=h.indexOf(n,k))!==-1&&(it=h.indexOf(t,nt+c))!==-1)k!==nt&&d.push(s(h.substring(k,nt))),ut=h.substring(nt+c,it),tt.push(ut),rt.push(i(ut,lt)),k=it+a,st.push(d.length),d.push("");else{k!==ot&&d.push(s(h.substring(k)));break}return y&&d.length>1&&ui.throwNoconcat(h),!l||tt.length?(ft=function(n){for(var t=0,i=tt.length;t<i;t++){if(p&&r(n[t]))return;d[st[t]]=n[t]}return d.join("")},ht=function(n){return y?o.getTrusted(y,n):o.valueOf(n)},v(function(n){var t=0,i=tt.length,r=new Array(i);try{for(;t<i;t++)r[t]=rt[t](n);return ft(r)}catch(u){e(ui.interr(h,u))}},{exp:h,expressions:tt,$$watchDelegate:function(n,t){var i;return n.$watchGroup(rt,function(r,u){var e=ft(r);f(t)&&t.call(this,e,r!==u?i:e,n);i=e})}})):void 0}var c=n.length,a=t.length,y=new RegExp(n.replace(/./g,l),"g"),p=new RegExp(t.replace(/./g,l),"g");return h.startSymbol=function(){return n},h.endSymbol=function(){return t},h}]}function kw(){this.$get=["$rootScope","$window","$q","$$q","$browser",function(n,t,i,r,f){function o(o,s,h,c){function w(){p?o.apply(null,b):o(a)}var p=arguments.length>4,b=p?ar(arguments,4):[],k=t.setInterval,d=t.clearInterval,a=0,y=u(c)&&!c,v=(y?r:i).defer(),l=v.promise;return h=u(h)?h:0,l.$$intervalId=k(function(){y?f.defer(w):n.$evalAsync(w);v.notify(a++);h>0&&a>=h&&(v.resolve(a),d(l.$$intervalId),delete e[l.$$intervalId]);y||n.$apply()},s),e[l.$$intervalId]=v,l}var e={};return o.cancel=function(n){return n&&n.$$intervalId in e?(e[n.$$intervalId].reject("canceled"),t.clearInterval(n.$$intervalId),delete e[n.$$intervalId],!0):!1},o}]}function de(n){for(var t=n.split("/"),i=t.length;i--;)t[i]=pu(t[i]);return t.join("/")}function bh(n,t){var i=ei(n);t.$$protocol=i.protocol;t.$$host=i.hostname;t.$$port=tt(i.port)||nb[i.protocol]||null}function dh(n,t){var r,i;if(kh.test(n))throw ru("badpath",'Invalid url "{0}".',n);r=n.charAt(0)!=="/";r&&(n="/"+n);i=ei(n);t.$$path=decodeURIComponent(r&&i.pathname.charAt(0)==="/"?i.pathname.substring(1):i.pathname);t.$$search=hs(i.search);t.$$hash=decodeURIComponent(i.hash);t.$$path&&t.$$path.charAt(0)!=="/"&&(t.$$path="/"+t.$$path)}function gh(n,t){return n.slice(0,t.length)===t}function bt(n,t){if(gh(t,n))return t.substr(n.length)}function pi(n){var t=n.indexOf("#");return t===-1?n:n.substr(0,t)}function uu(n){return n.replace(/(#.+)|#$/,"$1")}function tb(n){return n.substr(0,pi(n).lastIndexOf("/")+1)}function ib(n){return n.substring(0,n.indexOf("/",n.indexOf("//")+2))}function ge(n,t,i){this.$$html5=!0;i=i||"";bh(n,this);this.$$parse=function(n){var i=bt(t,n);if(!o(i))throw ru("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',n,t);dh(i,this);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var n=ie(this.$$search),i=this.$$hash?"#"+pu(this.$$hash):"";this.$$url=de(this.$$path)+(n?"?"+n:"")+i;this.$$absUrl=t+this.$$url.substr(1)};this.$$parseLinkUrl=function(r,f){if(f&&f[0]==="#")return this.hash(f.slice(1)),!0;var e,s,o;return u(e=bt(n,r))?(s=e,o=i&&u(e=bt(i,e))?t+(bt("/",e)||e):n+s):u(e=bt(t,r))?o=t+e:t===r+"/"&&(o=t),o&&this.$$parse(o),!!o}}function no(n,t,i){bh(n,this);this.$$parse=function(u){function o(n,t,i){var u=/^\/[A-Z]:(\/.*)/,r;return(gh(t,i)&&(t=t.replace(i,"")),u.exec(t))?n:(r=u.exec(n),r?r[1]:n)}var e=bt(n,u)||bt(t,u),f;r(e)||e.charAt(0)!=="#"?this.$$html5?f=e:(f="",r(e)&&(n=u,this.replace())):(f=bt(i,e),r(f)&&(f=e));dh(f,this);this.$$path=o(this.$$path,f,n);this.$$compose()};this.$$compose=function(){var t=ie(this.$$search),r=this.$$hash?"#"+pu(this.$$hash):"";this.$$url=de(this.$$path)+(t?"?"+t:"")+r;this.$$absUrl=n+(this.$$url?i+this.$$url:"")};this.$$parseLinkUrl=function(t){return pi(n)===pi(t)?(this.$$parse(t),!0):!1}}function nc(n,t,i){this.$$html5=!0;no.apply(this,arguments);this.$$parseLinkUrl=function(r,u){if(u&&u[0]==="#")return this.hash(u.slice(1)),!0;var f,e;return n===pi(r)?f=r:(e=bt(t,r))?f=n+i+e:t===r+"/"&&(f=t),f&&this.$$parse(f),!!f};this.$$compose=function(){var t=ie(this.$$search),r=this.$$hash?"#"+pu(this.$$hash):"";this.$$url=de(this.$$path)+(t?"?"+t:"")+r;this.$$absUrl=n+i+this.$$url}}function sf(n){return function(){return this[n]}}function ic(n,t){return function(i){return r(i)?this[n]:(this[n]=t(i),this.$$compose(),this)}}function rb(){var t="",n={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(n){return u(n)?(t=n,this):t};this.html5Mode=function(t){return si(t)?(n.enabled=t,this):h(t)?(si(t.enabled)&&(n.enabled=t.enabled),si(t.requireBase)&&(n.requireBase=t.requireBase),(si(t.rewriteLinks)||o(t.rewriteLinks))&&(n.rewriteLinks=t.rewriteLinks),this):n};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(i,u,f,s,c){function d(n,t,i){var r=l.url(),f=l.$$state;try{u.url(n,t,i);l.$$state=u.state()}catch(e){l.url(r);l.$$state=f;throw e;}}function g(n,t){i.$broadcast("$locationChangeSuccess",l.absUrl(),n,l.$$state,t)}var l,p,b=u.baseHref(),a=u.url(),v,w,k,y;if(n.enabled){if(!b&&n.requireBase)throw ru("nobase","$location in HTML5 mode requires a <base> tag to be present!");v=ib(a)+(b||"/");p=f.history?ge:nc}else v=pi(a),p=no;w=tb(v);l=new p(v,w,"#"+t);l.$$parseLinkUrl(a,a);l.$$state=u.state();k=/^\s*(javascript|mailto):/i;s.on("click",function(t){var v=n.rewriteLinks,f,a,y;if(v&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey&&t.which!==2&&t.button!==2){for(f=e(t.target);yt(f[0])!=="a";)if(f[0]===s[0]||!(f=f.parent())[0])return;o(v)&&r(f.attr(v))||(a=f.prop("href"),y=f.attr("href")||f.attr("xlink:href"),h(a)&&a.toString()==="[object SVGAnimatedString]"&&(a=ei(a.animVal).href),k.test(a))||!a||f.attr("target")||t.isDefaultPrevented()||l.$$parseLinkUrl(a,y)&&(t.preventDefault(),l.absUrl()!==u.url()&&(i.$apply(),c.angular["ff-684208-preventDefault"]=!0))}});uu(l.absUrl())!==uu(a)&&u.url(l.absUrl(),!0);y=!0;u.onUrlChange(function(n,t){if(r(bt(w,n))){c.location.href=n;return}i.$evalAsync(function(){var r=l.absUrl(),u=l.$$state,f;(n=uu(n),l.$$parse(n),l.$$state=t,f=i.$broadcast("$locationChangeStart",n,r,t,u).defaultPrevented,l.absUrl()===n)&&(f?(l.$$parse(r),l.$$state=u,d(r,!1,u)):(y=!1,g(r,u)))});i.$$phase||i.$digest()});return i.$watch(function(){var t=uu(u.url()),e=uu(l.absUrl()),n=u.state(),o=l.$$replace,r=t!==e||l.$$html5&&f.history&&n!==l.$$state;(y||r)&&(y=!1,i.$evalAsync(function(){var u=l.absUrl(),f=i.$broadcast("$locationChangeStart",u,t,l.$$state,n).defaultPrevented;l.absUrl()===u&&(f?(l.$$parse(t),l.$$state=n):(r&&d(u,o,n===l.$$state?null:l.$$state),g(t,n)))}));l.$$replace=!1}),l}]}function ub(){var n=!0,i=this;this.debugEnabled=function(t){return u(t)?(n=t,this):n};this.$get=["$window",function(r){function f(n){return n instanceof Error&&(n.stack?n=n.message&&n.stack.indexOf(n.message)===-1?"Error: "+n.message+"\n"+n.stack:n.stack:n.sourceURL&&(n=n.message+"\n"+n.sourceURL+":"+n.line)),n}function u(n){var i=r.console||{},u=i[n]||i.log||s,e=!1;try{e=!!u.apply}catch(o){}return e?function(){var n=[];return t(arguments,function(t){n.push(f(t))}),u.apply(i,n)}:function(n,t){u(n,t==null?"":t)}}return{log:u("log"),info:u("info"),warn:u("warn"),error:u("error"),debug:function(){var t=u("debug");return function(){n&&t.apply(i,arguments)}}()}}]}function nr(n,t){if(n==="__defineGetter__"||n==="__defineSetter__"||n==="__lookupGetter__"||n==="__lookupSetter__"||n==="__proto__")throw rt("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",t);return n}function cc(n){return n+""}function fi(n,t){if(n)if(n.constructor===n)throw rt("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);else if(n.window===n)throw rt("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);else if(n.children&&(n.nodeName||n.prop&&n.attr&&n.find))throw rt("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t);else if(n===Object)throw rt("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",t);return n}function lc(n,t){if(n)if(n.constructor===n)throw rt("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);else if(n===hb||n===cb||n===lb)throw rt("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",t);}function cf(n,t){if(n&&(n===rc||n===uc||n===fc||n===ec||n===oc||n===sc||n===fb||n===eb||n===hf||n===ob||n===hc||n===sb))throw rt("isecaf","Assigning to a constructor or its prototype is disallowed! Expression: {0}",t);}function vb(n,t){return typeof n!="undefined"?n:t}function vc(n,t){return typeof n=="undefined"?t:typeof t=="undefined"?n:n+t}function yb(n,t){var i=n(t);return!i.$stateful}function b(n,r){var u,f,e;switch(n.type){case i.Program:u=!0;t(n.body,function(n){b(n.expression,r);u=u&&n.expression.constant});n.constant=u;break;case i.Literal:n.constant=!0;n.toWatch=[];break;case i.UnaryExpression:b(n.argument,r);n.constant=n.argument.constant;n.toWatch=n.argument.toWatch;break;case i.BinaryExpression:b(n.left,r);b(n.right,r);n.constant=n.left.constant&&n.right.constant;n.toWatch=n.left.toWatch.concat(n.right.toWatch);break;case i.LogicalExpression:b(n.left,r);b(n.right,r);n.constant=n.left.constant&&n.right.constant;n.toWatch=n.constant?[]:[n];break;case i.ConditionalExpression:b(n.test,r);b(n.alternate,r);b(n.consequent,r);n.constant=n.test.constant&&n.alternate.constant&&n.consequent.constant;n.toWatch=n.constant?[]:[n];break;case i.Identifier:n.constant=!1;n.toWatch=[n];break;case i.MemberExpression:b(n.object,r);n.computed&&b(n.property,r);n.constant=n.object.constant&&(!n.computed||n.property.constant);n.toWatch=[n];break;case i.CallExpression:e=n.filter?yb(r,n.callee.name):!1;u=e;f=[];t(n.arguments,function(n){b(n,r);u=u&&n.constant;n.constant||f.push.apply(f,n.toWatch)});n.constant=u;n.toWatch=e?f:[n];break;case i.AssignmentExpression:b(n.left,r);b(n.right,r);n.constant=n.left.constant&&n.right.constant;n.toWatch=[n];break;case i.ArrayExpression:u=!0;f=[];t(n.elements,function(n){b(n,r);u=u&&n.constant;n.constant||f.push.apply(f,n.toWatch)});n.constant=u;n.toWatch=f;break;case i.ObjectExpression:u=!0;f=[];t(n.properties,function(n){b(n.value,r);u=u&&n.value.constant&&!n.computed;n.value.constant||f.push.apply(f,n.value.toWatch)});n.constant=u;n.toWatch=f;break;case i.ThisExpression:n.constant=!1;n.toWatch=[];break;case i.LocalsExpression:n.constant=!1;n.toWatch=[]}}function yc(n){if(n.length===1){var i=n[0].expression,t=i.toWatch;return t.length!==1?t:t[0]!==i?t:undefined}}function pc(n){return n.type===i.Identifier||n.type===i.MemberExpression}function wc(n){if(n.body.length===1&&pc(n.body[0].expression))return{type:i.AssignmentExpression,left:n.body[0].expression,right:{type:i.NGValueParameter},operator:"="}}function bc(n){return n.body.length===0||n.body.length===1&&(n.body[0].expression.type===i.Literal||n.body[0].expression.type===i.ArrayExpression||n.body[0].expression.type===i.ObjectExpression)}function kc(n){return n.constant}function dc(n,t){this.astBuilder=n;this.$filter=t}function gc(n,t){this.astBuilder=n;this.$filter=t}function vf(n){return n==="constructor"}function to(n){return f(n.valueOf)?n.valueOf():ab.call(n)}function pb(){var e=p(),o=p(),r={"true":!0,"false":!1,"null":null,undefined:undefined},n,i;this.addLiteral=function(n,t){r[n]=t};this.setIdentifierFns=function(t,r){return n=t,i=r,this};this.$get=["$filter",function(h){function w(n,t,i){var r,l,u,f;i=i||c;switch(typeof n){case"string":if(n=n.trim(),u=n,f=i?o:e,r=f[u],!r){n.charAt(0)===":"&&n.charAt(1)===":"&&(l=!0,n=n.substring(2));var p=i?g:d,w=new lf(p),tt=new af(w,h,p);r=tt.parse(n);r.constant?r.$$watchDelegate=nt:l?r.$$watchDelegate=r.literal?k:b:r.inputs&&(r.$$watchDelegate=v);i&&(r=a(r));f[u]=r}return y(r,t);case"function":return y(n,t);default:return y(s,t)}}function a(n){function t(t,i,r,u){var f=c;c=!0;try{return n(t,i,r,u)}finally{c=f}}if(!n)return n;t.$$watchDelegate=n.$$watchDelegate;t.assign=a(n.assign);t.constant=n.constant;t.literal=n.literal;for(var i=0;n.inputs&&i<n.inputs.length;++i)n.inputs[i]=a(n.inputs[i]);return t.inputs=n.inputs,t}function l(n,t){return n==null||t==null?n===t:typeof n=="object"&&(n=to(n),typeof n=="object")?!1:n===t||n!==n&&t!==t}function v(n,t,i,r,u){var f=r.inputs,o,c,s,h,e,a;if(f.length===1)return c=l,f=f[0],n.$watch(function(n){var t=f(n);return l(t,c)||(o=r(n,undefined,undefined,[t]),c=t&&to(t)),o},t,i,u);for(s=[],h=[],e=0,a=f.length;e<a;e++)s[e]=l,h[e]=null;return n.$watch(function(n){for(var i,u=!1,t=0,e=f.length;t<e;t++)i=f[t](n),(u||(u=!l(i,s[t])))&&(h[t]=i,s[t]=i&&to(i));return u&&(o=r(n,undefined,undefined,h)),o},t,i,u)}function b(n,t,i,r){var e,o;return e=n.$watch(function(n){return r(n)},function(n,i,r){o=n;f(t)&&t.apply(this,arguments);u(n)&&r.$$postDigest(function(){u(o)&&e()})},i)}function k(n,i,r,e){function h(n){var i=!0;return t(n,function(n){u(n)||(i=!1)}),i}var o,s;return o=n.$watch(function(n){return e(n)},function(n,t,r){s=n;f(i)&&i.call(this,n,t,r);h(n)&&r.$$postDigest(function(){h(s)&&o()})},r)}function nt(n,t,i,r){var u=n.$watch(function(n){return u(),r(n)},t,i);return u}function y(n,t){if(!t)return n;var r=n.$$watchDelegate,f=!1,e=r!==k&&r!==b,i=e?function(i,r,u,e){var o=f&&e?e[0]:n(i,r,u,e);return t(o,i,r)}:function(i,r,f,e){var o=n(i,r,f,e),s=t(o,i,r);return u(o)?s:o};return n.$$watchDelegate&&n.$$watchDelegate!==v?i.$$watchDelegate=n.$$watchDelegate:t.$stateful||(i.$$watchDelegate=v,f=!n.inputs,i.inputs=n.inputs?n.inputs:[n]),i}var p=ri().noUnsafeEval,d={csp:p,expensiveChecks:!1,literals:dt(r),isIdentifierStart:f(n)&&n,isIdentifierContinue:f(i)&&i},g={csp:p,expensiveChecks:!0,literals:dt(r),isIdentifierStart:f(n)&&n,isIdentifierContinue:f(i)&&i},c=!1;return w.$$runningExpensiveChecks=function(){return c},w}]}function wb(){this.$get=["$rootScope","$exceptionHandler",function(n,t){return nl(function(t){n.$evalAsync(t)},t)}]}function bb(){this.$get=["$browser","$exceptionHandler",function(n,t){return nl(function(t){n.defer(t)},t)}]}function nl(n,i){function k(){var n=new e;return n.resolve=o(n,n.resolve),n.reject=o(n,n.reject),n.notify=o(n,n.notify),n}function y(){this.$$state={status:0}}function o(n,t){return function(i){t.call(n,i)}}function g(n){var e,t,u,r,o;for(u=n.pending,n.processScheduled=!1,n.pending=undefined,r=0,o=u.length;r<o;++r){t=u[r][0];e=u[r][n.status];try{f(e)?t.resolve(e(n.value)):n.status===1?t.resolve(n.value):t.reject(n.value)}catch(s){t.reject(s);i(s)}}}function p(t){!t.processScheduled&&t.pending&&(t.processScheduled=!0,n(function(){g(t)}))}function e(){this.promise=new y}function s(n){var t=new e;return t.reject(n),t.promise}function d(n,t,i){var r=null;try{f(i)&&(r=i())}catch(u){return s(u)}return yu(r)?r.then(function(){return t(n)},s):t(n)}function a(n,t,i,r){var u=new e;return u.resolve(n),u.promise.then(t,i,r)}function nt(n){var i=new e,r=0,u=c(n)?[]:{};return t(n,function(n,t){r++;a(n).then(function(n){u[t]=n;--r||i.resolve(u)},function(n){i.reject(n)})}),r===0&&i.resolve(u),i.promise}function tt(n){var i=k();return t(n,function(n){a(n).then(i.resolve,i.reject)}),i.promise}function u(n){function i(n){t.resolve(n)}function r(n){t.reject(n)}if(!f(n))throw b("norslvr","Expected resolverFn, got '{0}'",n);var t=new e;return n(i,r),t.promise}var b=l("$q",TypeError),w;return v(y.prototype,{then:function(n,t,i){if(r(n)&&r(t)&&r(i))return this;var u=new e;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([u,n,t,i]),this.$$state.status>0&&p(this.$$state),u.promise},"catch":function(n){return this.then(null,n)},"finally":function(n,t){return this.then(function(t){return d(t,w,n)},function(t){return d(t,s,n)},t)}}),v(e.prototype,{resolve:function(n){this.promise.$$state.status||(n===this.promise?this.$$reject(b("qcycle","Expected promise to be resolved with value other than itself '{0}'",n)):this.$$resolve(n))},$$resolve:function(n){function c(n){t||(t=!0,u.$$resolve(n))}function s(n){t||(t=!0,u.$$reject(n))}var r,u=this,t=!1;try{(h(n)||f(n))&&(r=n&&n.then);f(r)?(this.promise.$$state.status=-1,r.call(n,c,s,o(this,this.notify))):(this.promise.$$state.value=n,this.promise.$$state.status=1,p(this.promise.$$state))}catch(e){s(e);i(e)}},reject:function(n){this.promise.$$state.status||this.$$reject(n)},$$reject:function(n){this.promise.$$state.value=n;this.promise.$$state.status=2;p(this.promise.$$state)},notify:function(t){var r=this.promise.$$state.pending;this.promise.$$state.status<=0&&r&&r.length&&n(function(){for(var u,e,n=0,o=r.length;n<o;n++){e=r[n][0];u=r[n][3];try{e.notify(f(u)?u(t):t)}catch(s){i(s)}}})}}),w=a,u.prototype=y.prototype,u.defer=k,u.reject=s,u.when=a,u.resolve=w,u.all=nt,u.race=tt,u}function kb(){this.$get=["$window","$timeout",function(n,t){var i=n.requestAnimationFrame||n.webkitRequestAnimationFrame,f=n.cancelAnimationFrame||n.webkitCancelAnimationFrame||n.webkitCancelRequestAnimationFrame,r=!!i,u=r?function(n){var t=i(n);return function(){f(t)}}:function(n){var i=t(n,16.66,!1);return function(){t.cancel(i)}};return u.supported=r,u}]}function db(){function o(n){function t(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$id=vu();this.$$ChildScope=null}return t.prototype=n,t}var u=10,e=l("$rootScope"),n=null,i=null;this.digestTtl=function(n){return arguments.length&&(u=n),u};this.$get=["$exceptionHandler","$parse","$browser",function(c,l,a){function ot(n){n.currentScope.$$destroyed=!0}function b(n){ti===9&&(n.$$childHead&&b(n.$$childHead),n.$$nextSibling&&b(n.$$nextSibling));n.$parent=n.$$nextSibling=n.$$prevSibling=n.$$childHead=n.$$childTail=n.$root=n.$$watchers=null}function p(){this.$id=vu();this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this.$root=this;this.$$destroyed=!1;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$$isolateBindings=null}function tt(n){if(v.$$phase)throw e("inprog","{0} already in progress",v.$$phase);v.$$phase=n}function g(){v.$$phase=null}function nt(n,t){do n.$$watchersCount+=t;while(n=n.$parent)}function rt(n,t,i){do n.$$listenerCount[i]-=t,n.$$listenerCount[i]===0&&delete n.$$listenerCount[i];while(n=n.$parent)}function ut(){}function et(){while(k.length)try{k.shift()()}catch(n){c(n)}i=null}function st(){i===null&&(i=a.defer(function(){v.$apply(et)}))}p.prototype={constructor:p,$new:function(n,t){var i;return t=t||this,n?(i=new p,i.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=o(this)),i=new this.$$ChildScope),i.$parent=t,i.$$prevSibling=t.$$childTail,t.$$childHead?(t.$$childTail.$$nextSibling=i,t.$$childTail=i):t.$$childHead=t.$$childTail=i,(n||t!==this)&&i.$on("$destroy",ot),i},$watch:function(t,i,r,u){var o=l(t);if(o.$$watchDelegate)return o.$$watchDelegate(this,i,r,o,t);var h=this,e=h.$$watchers,c={fn:i,last:ut,get:o,exp:u||t,eq:!!r};return n=null,f(i)||(c.fn=s),e||(e=h.$$watchers=[],e.$$digestWatchIndex=-1),e.unshift(c),e.$$digestWatchIndex++,nt(this,1),function(){var t=hr(e,c);t>=0&&(nt(h,-1),t<e.$$digestWatchIndex&&e.$$digestWatchIndex--);n=null}},$watchGroup:function(n,i){function c(){o=!1;h?(h=!1,i(r,r,u)):i(r,f,u)}var f=new Array(n.length),r=new Array(n.length),e=[],u=this,o=!1,h=!0,s;return n.length?n.length===1?this.$watch(n[0],function(n,t,u){r[0]=n;f[0]=t;i(r,n===t?r:f,u)}):(t(n,function(n,t){var i=u.$watch(n,function(n,i){r[t]=n;f[t]=i;o||(o=!0,u.$evalAsync(c))});e.push(i)}),function(){while(e.length)e.shift()()}):(s=!0,u.$evalAsync(function(){s&&i(r,r,u)}),function(){s=!1})},$watchCollection:function(n,t){function y(n){var l,o,y,t,s,v;if(i=n,!r(i)){if(h(i))if(ii(i))for(u!==c&&(u=c,e=u.length=0,f++),l=i.length,e!==l&&(f++,u.length=e=l),v=0;v<l;v++)s=u[v],t=i[v],y=s!==s&&t!==t,y||s===t||(f++,u[v]=t);else{u!==a&&(u=a={},e=0,f++);l=0;for(o in i)vt.call(i,o)&&(l++,t=i[o],s=u[o],o in u?(y=s!==s&&t!==t,y||s===t||(f++,u[o]=t)):(e++,u[o]=t,f++));if(e>l){f++;for(o in u)vt.call(i,o)||(e--,delete u[o])}}else u!==i&&(u=i,f++);return f}}function b(){var n,r;if(v?(v=!1,t(i,i,s)):t(i,o,s),p)if(h(i))if(ii(i))for(o=new Array(i.length),n=0;n<i.length;n++)o[n]=i[n];else{o={};for(r in i)vt.call(i,r)&&(o[r]=i[r])}else o=i}y.$stateful=!0;var s=this,i,u,o,p=t.length>1,f=0,w=l(n,y),c=[],a={},v=!0,e=0;return this.$watch(w,b)},$digest:function(){var t,o,s,ct,lt,h,l,rt=u,ot,r,st=this,p=[],b,k,nt;tt("$digest");a.$$checkUrlChange();this===v&&i!==null&&(a.defer.cancel(i),et());n=null;do{for(l=!1,r=st,nt=0;nt<y.length;nt++){try{k=y[nt];k.scope.$eval(k.expression,k.locals)}catch(ht){c(ht)}n=null}y.length=0;n:do{if(h=r.$$watchers)for(h.$$digestWatchIndex=h.length;h.$$digestWatchIndex--;)try{if(t=h[h.$$digestWatchIndex],t)if(lt=t.get,(o=lt(r))===(s=t.last)||(t.eq?ft(o,s):it(o)&&it(s))){if(t===n){l=!1;break n}}else l=!0,n=t,t.last=t.eq?dt(o,null):o,ct=t.fn,ct(o,s===ut?o:s,r),rt<5&&(b=4-rt,p[b]||(p[b]=[]),p[b].push({msg:f(t.exp)?"fn: "+(t.exp.name||t.exp.toString()):t.exp,newVal:o,oldVal:s}))}catch(ht){c(ht)}if(!(ot=r.$$watchersCount&&r.$$childHead||r!==st&&r.$$nextSibling))while(r!==st&&!(ot=r.$$nextSibling))r=r.$parent}while(r=ot);if((l||y.length)&&!rt--){g();throw e("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",u,p);}}while(l||y.length);for(g();d<w.length;)try{w[d++]()}catch(ht){c(ht)}w.length=d=0},$destroy:function(){var n,t;if(!this.$$destroyed){n=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this===v&&a.$$applicationDestroyed();nt(this,-this.$$watchersCount);for(t in this.$$listenerCount)rt(this,this.$$listenerCount[t],t);n&&n.$$childHead===this&&(n.$$childHead=this.$$nextSibling);n&&n.$$childTail===this&&(n.$$childTail=this.$$prevSibling);this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling);this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=s;this.$on=this.$watch=this.$watchGroup=function(){return s};this.$$listeners={};this.$$nextSibling=null;b(this)}},$eval:function(n,t){return l(n)(this,t)},$evalAsync:function(n,t){v.$$phase||y.length||a.defer(function(){y.length&&v.$digest()});y.push({scope:this,expression:l(n),locals:t})},$$postDigest:function(n){w.push(n)},$apply:function(n){try{tt("$apply");try{return this.$eval(n)}finally{g()}}catch(t){c(t)}finally{try{v.$digest()}catch(t){c(t);throw t;}}},$applyAsync:function(n){function i(){t.$eval(n)}var t=this;n&&k.push(i);n=l(n);st()},$on:function(n,t){var r=this.$$listeners[n],i,u;r||(this.$$listeners[n]=r=[]);r.push(t);i=this;do i.$$listenerCount[n]||(i.$$listenerCount[n]=0),i.$$listenerCount[n]++;while(i=i.$parent);return u=this,function(){var i=r.indexOf(t);i!==-1&&(r[i]=null,rt(u,1,n))}},$emit:function(n){var o=[],u,r=this,e=!1,t={name:n,targetScope:r,stopPropagation:function(){e=!0},preventDefault:function(){t.defaultPrevented=!0},defaultPrevented:!1},s=lr([t],arguments,1),i,f;do{for(u=r.$$listeners[n]||o,t.currentScope=r,i=0,f=u.length;i<f;i++){if(!u[i]){u.splice(i,1);i--;f--;continue}try{u[i].apply(null,s)}catch(h){c(h)}}if(e)return t.currentScope=null,t;r=r.$parent}while(r);return t.currentScope=null,t},$broadcast:function(n){var r=this,t=r,e=r,u={name:n,targetScope:r,preventDefault:function(){u.defaultPrevented=!0},defaultPrevented:!1},s,f,i,o;if(!r.$$listenerCount[n])return u;for(s=lr([u],arguments,1);t=e;){for(u.currentScope=t,f=t.$$listeners[n]||[],i=0,o=f.length;i<o;i++){if(!f[i]){f.splice(i,1);i--;o--;continue}try{f[i].apply(null,s)}catch(h){c(h)}}if(!(e=t.$$listenerCount[n]&&t.$$childHead||t!==r&&t.$$nextSibling))while(t!==r&&!(e=t.$$nextSibling))t=t.$parent}return u.currentScope=null,u}};var v=new p,y=v.$$asyncQueue=[],w=v.$$postDigestQueue=[],k=v.$$applyAsyncQueue=[],d=0;return v}]}function gb(){var n=/^\s*(https?|ftp|mailto|tel|file):/,t=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(t){return u(t)?(n=t,this):n};this.imgSrcSanitizationWhitelist=function(n){return u(n)?(t=n,this):t};this.$get=function(){return function(i,r){var f=r?t:n,u;return(u=ei(i).href,u!==""&&!u.match(f))?"unsafe:"+u:i}}}function nk(n){if(n==="self")return n;if(o(n)){if(n.indexOf("***")>-1)throw ni("iwcard","Illegal sequence *** in string matcher.  String: {0}",n);return n=gf(n).replace(/\\\*\\\*/g,".*").replace(/\\\*/g,"[^:/.?&;]*"),new RegExp("^"+n+"$")}if(er(n))return new RegExp("^"+n.source+"$");throw ni("imatcher",'Matchers may only be "self", string patterns or RegExp objects');}function tl(n){var i=[];return u(n)&&t(n,function(n){i.push(nk(n))}),i}function tk(){this.SCE_CONTEXTS=ht;var n=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(n=tl(t)),n};this.resourceUrlBlacklist=function(n){return arguments.length&&(t=tl(n)),t};this.$get=["$injector",function(i){function s(n,t){return n==="self"?rl(t):!!n.exec(t.href)}function h(i){for(var e=ei(i.toString()),f=!1,r=0,u=n.length;r<u;r++)if(s(n[r],e)){f=!0;break}if(f)for(r=0,u=t.length;r<u;r++)if(s(t[r],e)){f=!1;break}return f}function f(n){var t=function(n){this.$$unwrapTrustedValue=function(){return n}};return n&&(t.prototype=new n),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}function c(n,t){var i=u.hasOwnProperty(n)?u[n]:null;if(!i)throw ni("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",n,t);if(t===null||r(t)||t==="")return t;if(typeof t!="string")throw ni("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",n);return new i(t)}function l(n){return n instanceof e?n.$$unwrapTrustedValue():n}function a(n,t){if(t===null||r(t)||t==="")return t;var i=u.hasOwnProperty(n)?u[n]:null;if(i&&t instanceof i)return t.$$unwrapTrustedValue();if(n===ht.RESOURCE_URL){if(h(t))return t;throw ni("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy.  URL: {0}",t.toString());}else if(n===ht.HTML)return o(t);throw ni("unsafe","Attempting to use an unsafe value in a safe context.");}var o=function(){throw ni("unsafe","Attempting to use an unsafe value in a safe context.");},e,u;return i.has("$sanitize")&&(o=i.get("$sanitize")),e=f(),u={},u[ht.HTML]=f(e),u[ht.CSS]=f(e),u[ht.URL]=f(e),u[ht.JS]=f(e),u[ht.RESOURCE_URL]=f(u[ht.URL]),{trustAs:c,getTrusted:a,valueOf:l}}]}function ik(){var n=!0;this.enabled=function(t){return arguments.length&&(n=!!t),n};this.$get=["$parse","$sceDelegate",function(i,r){var u;if(n&&ti<8)throw ni("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode.  You can fix this by adding the text <!doctype html> to the top of your HTML document.  See http://docs.angularjs.org/api/ng.$sce for more information.");u=st(ht);u.isEnabled=function(){return n};u.trustAs=r.trustAs;u.getTrusted=r.getTrusted;u.valueOf=r.valueOf;n||(u.trustAs=u.getTrusted=function(n,t){return t},u.valueOf=fr);u.parseAs=function(n,t){var r=i(t);return r.literal&&r.constant?r:i(t,function(t){return u.getTrusted(n,t)})};var f=u.parseAs,e=u.getTrusted,o=u.trustAs;return t(ht,function(n,t){var i=a(t);u[dr("parse_as_"+i)]=function(t){return f(n,t)};u[dr("get_trusted_"+i)]=function(t){return e(n,t)};u[dr("trust_as_"+i)]=function(t){return o(n,t)}}),u}]}function rk(){this.$get=["$window","$document",function(n,t){var s={},y=n.chrome&&(n.chrome.app&&n.chrome.app.runtime||!n.chrome.app&&n.chrome.runtime&&n.chrome.runtime.id),p=!y&&n.history&&n.history.pushState,h=tt((/android (\d+)/.exec(a((n.navigator||{}).userAgent))||[])[1]),w=/Boxee/i.test((n.navigator||{}).userAgent),c=t[0]||{},i,u=c.body&&c.body.style,f=!1,e=!1,l,v;if(u){for(v in u)if(l=/^(Moz|webkit|ms)(?=[A-Z])/.exec(v)){i=l[0];i=i[0].toUpperCase()+i.substr(1);break}i||(i="WebkitOpacity"in u&&"webkit");f=!!("transition"in u||i+"Transition"in u);e=!!("animation"in u||i+"Animation"in u);!h||f&&e||(f=o(u.webkitTransition),e=o(u.webkitAnimation))}return{history:!!(p&&!(h<4)&&!w),hasEvent:function(n){if(n==="input"&&ti<=11)return!1;if(r(s[n])){var t=c.createElement("div");s[n]="on"+n in t}return s[n]},csp:ri(),vendorPrefix:i,transitions:f,animations:e,android:h}}]}function uk(){var n;this.httpOptions=function(t){return t?(n=t,this):n};this.$get=["$templateCache","$http","$q","$sce",function(t,i,u,f){function e(s,h){function a(n){if(!h)throw il("tpload","Failed to load template: {0} (HTTP status: {1} {2})",s,n.status,n.statusText);return u.reject(n)}e.totalPendingRequests++;(!o(s)||r(t.get(s)))&&(s=f.getTrustedResourceUrl(s));var l=i.defaults&&i.defaults.transformResponse;return c(l)?l=l.filter(function(n){return n!==be}):l===be&&(l=null),i.get(s,v({cache:t,transformResponse:l},n))["finally"](function(){e.totalPendingRequests--}).then(function(n){return t.put(s,n.data),n.data},a)}return e.totalPendingRequests=0,e}]}function fk(){this.$get=["$rootScope","$browser","$location",function(n,i,r){var u={};return u.findBindings=function(n,i,r){var f=n.getElementsByClassName("ng-binding"),u=[];return t(f,function(n){var f=et.element(n).data("$binding");f&&t(f,function(t){if(r){var f=new RegExp("(^|\\s)"+gf(i)+"(\\s|\\||$)");f.test(t)&&u.push(n)}else t.indexOf(i)!==-1&&u.push(n)})}),u},u.findModels=function(n,t,i){for(var u=["ng-","data-ng-","ng\\:"],r=0;r<u.length;++r){var e=i?"=":"*=",o="["+u[r]+"model"+e+'"'+t+'"]',f=n.querySelectorAll(o);if(f.length)return f}},u.getLocation=function(){return r.url()},u.setLocation=function(t){t!==r.url()&&(r.url(t),n.$digest())},u.whenStable=function(n){i.notifyWhenNoOutstandingRequests(n)},u}]}function ek(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(n,t,i,r,e){function h(h,c,l){f(h)||(l=c,c=h,h=s);var w=ar(arguments,3),p=u(l)&&!l,a=(p?r:i).defer(),v=a.promise,y;return y=t.defer(function(){try{a.resolve(h.apply(null,w))}catch(t){a.reject(t);e(t)}finally{delete o[v.$$timeoutId]}p||n.$apply()},c),v.$$timeoutId=y,o[y]=a,v}var o={};return h.cancel=function(n){return n&&n.$$timeoutId in o?(o[n.$$timeoutId].reject("canceled"),delete o[n.$$timeoutId],t.defer.cancel(n.$$timeoutId)):!1},h}]}function ei(n){var t=n;return ti&&(d.setAttribute("href",t),t=d.href),d.setAttribute("href",t),{href:d.href,protocol:d.protocol?d.protocol.replace(/:$/,""):"",host:d.host,search:d.search?d.search.replace(/^\?/,""):"",hash:d.hash?d.hash.replace(/^#/,""):"",hostname:d.hostname,port:d.port,pathname:d.pathname.charAt(0)==="/"?d.pathname:"/"+d.pathname}}function rl(n){var t=o(n)?ei(n):n;return t.protocol===io.protocol&&t.host===io.host}function ok(){this.$get=ct(n)}function ul(n){function e(n){try{return n.cookie||""}catch(t){return""}}function u(n){try{return decodeURIComponent(n)}catch(t){return n}}var f=n[0]||{},t={},i="";return function(){var h,n,o,s,c,l=e(f);if(l!==i)for(i=l,h=i.split("; "),t={},o=0;o<h.length;o++)n=h[o],s=n.indexOf("="),s>0&&(c=u(n.substring(0,s)),r(t[c])&&(t[c]=u(n.substring(s+1))));return t}}function sk(){this.$get=ul}function fl(n){function i(u,f){if(h(u)){var e={};return t(u,function(n,t){e[t]=i(t,n)}),e}return n.factory(u+r,f)}var r="Filter";this.register=i;this.$get=["$injector",function(n){return function(t){return n.get(t+r)}}];i("currency",sl);i("date",vl);i("filter",hk);i("json",gk);i("limitTo",nd);i("lowercase",yl);i("number",hl);i("orderBy",wl);i("uppercase",pl)}function hk(){return function(n,t,i,r){if(!ii(n)){if(n==null)return n;throw l("filter")("notarray","Expected array but received: {0}",n);}r=r||"$";var e=ro(t),u,f;switch(e){case"function":u=t;break;case"boolean":case"null":case"number":case"string":f=!0;case"object":u=ck(t,i,r,f);break;default:return n}return Array.prototype.filter.call(n,u)}}function ck(n,t,i,u){var e=h(n)&&i in n;return t===!0?t=ft:f(t)||(t=function(n,t){return r(n)?!1:n===null||t===null?n===t:h(t)||h(n)&&!ts(n)?!1:(n=a(""+n),t=a(""+t),n.indexOf(t)!==-1)}),function(r){return e&&!h(r)?wi(r,n[i],t,i,!1):wi(r,n,t,i,u)}}function wi(n,t,i,u,e,o){var y=ro(n),a=ro(t),s,h,l,v;if(a==="string"&&t.charAt(0)==="!")return!wi(n,t.substring(1),i,u,e);if(c(n))return n.some(function(n){return wi(n,t,i,u,e)});switch(y){case"object":if(e){for(s in n)if(s.charAt(0)!=="$"&&wi(n[s],t,i,u,!0))return!0;return o?!1:wi(n,t,i,u,!1)}if(a==="object"){for(s in t)if((h=t[s],!f(h)&&!r(h))&&(l=s===u,v=l?n:n[s],!wi(v,h,i,u,l,l)))return!1;return!0}return i(n,t);case"function":return!1;default:return i(n,t)}}function ro(n){return n===null?"null":typeof n}function sl(n){var t=n.NUMBER_FORMATS;return function(n,i,u){return r(i)&&(i=t.CURRENCY_SYM),r(u)&&(u=t.PATTERNS[1].maxFrac),n==null?n:cl(n,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,u).replace(/\u00A4/g,i)}}function hl(n){var t=n.NUMBER_FORMATS;return function(n,i){return n==null?n:cl(n,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,i)}}function lk(n){var e=0,r,t,i,f,u;for((t=n.indexOf(ol))>-1&&(n=n.replace(ol,"")),(i=n.search(/e/i))>0?(t<0&&(t=i),t+=+n.slice(i+1),n=n.substring(0,i)):t<0&&(t=n.length),i=0;n.charAt(i)===uo;i++);if(i===(u=n.length))r=[0],t=1;else{for(u--;n.charAt(u)===uo;)u--;for(t-=i,r=[],f=0;i<=u;i++,f++)r[f]=+n.charAt(i)}return t>el&&(r=r.splice(0,el-1),e=t-1,t=1),{d:r,e:e,i:t}}function ak(n,t,i,u){var f=n.d,o=f.length-n.i,e,a,s,h,c,l;if(t=r(t)?Math.min(Math.max(i,o),u):+t,e=t+n.i,a=f[e],e>0)for(f.splice(Math.max(n.i,e)),s=e;s<f.length;s++)f[s]=0;else for(o=Math.max(0,o),n.i=1,f.length=Math.max(1,e=t+1),f[0]=0,h=1;h<e;h++)f[h]=0;if(a>=5)if(e-1<0){for(c=0;c>e;c--)f.unshift(0),n.i++;f.unshift(1);n.i++}else f[e-1]++;for(;o<Math.max(0,t);o++)f.push(0);l=f.reduceRight(function(n,t,i,r){return t=t+n,r[i]=t%10,Math.floor(t/10)},0);l&&(f.unshift(l),n.i++)}function cl(n,t,i,r,u){var h;if(!(o(n)||g(n))||isNaN(n))return"";var y=!isFinite(n),a=!1,p=Math.abs(n)+"",e="",s;if(y)e="∞";else{s=lk(p);ak(s,u,t.minFrac,t.maxFrac);var f=s.d,c=s.i,v=s.e,l=[];for(a=f.reduce(function(n,t){return n&&!t},!0);c<0;)f.unshift(0),c++;for(c>0?l=f.splice(c,f.length):(l=f,f=[0]),h=[],f.length>=t.lgSize&&h.unshift(f.splice(-t.lgSize,f.length).join(""));f.length>t.gSize;)h.unshift(f.splice(-t.gSize,f.length).join(""));f.length&&h.unshift(f.join(""));e=h.join(i);l.length&&(e+=r+l.join(""));v&&(e+="e+"+v)}return n<0&&!a?t.negPre+e+t.negSuf:t.posPre+e+t.posSuf}function yf(n,t,i,r){var u="";for((n<0||r&&n<=0)&&(r?n=-n+1:(n=-n,u="-")),n=""+n;n.length<t;)n=uo+n;return i&&(n=n.substr(n.length-t)),u+n}function nt(n,t,i,r,u){return i=i||0,function(f){var e=f["get"+n]();return(i>0||e>-i)&&(e+=i),e===0&&i===-12&&(e=12),yf(e,t,r,u)}}function eu(n,t,i){return function(r,u){var f=r["get"+n](),e=(i?"STANDALONE":"")+(t?"SHORT":""),o=ur(e+n);return u[o][f]}}function vk(n,t,i){var r=-1*i,u=r>=0?"+":"";return u+(yf(Math[r>0?"floor":"ceil"](r/60),2)+yf(Math.abs(r%60),2))}function ll(n){var t=new Date(n,0,1).getDay();return new Date(n,0,(t<=4?5:12)-t)}function yk(n){return new Date(n.getFullYear(),n.getMonth(),n.getDate()+(4-n.getDay()))}function al(n){return function(t){var i=ll(t.getFullYear()),r=yk(t),u=+r-+i,f=1+Math.round(u/6048e5);return yf(f,n)}}function pk(n,t){return n.getHours()<12?t.AMPMS[0]:t.AMPMS[1]}function fo(n,t){return n.getFullYear()<=0?t.ERAS[0]:t.ERAS[1]}function wk(n,t){return n.getFullYear()<=0?t.ERANAMES[0]:t.ERANAMES[1]}function vl(n){function r(n){var t;if(t=n.match(i)){var r=new Date(0),u=0,f=0,e=t[8]?r.setUTCFullYear:r.setFullYear,o=t[8]?r.setUTCHours:r.setHours;t[9]&&(u=tt(t[9]+t[10]),f=tt(t[9]+t[11]));e.call(r,tt(t[1]),tt(t[2])-1,tt(t[3]));var s=tt(t[4]||0)-u,h=tt(t[5]||0)-f,c=tt(t[6]||0),l=Math.round(parseFloat("0."+(t[7]||0))*1e3);return o.call(r,s,h,c,l),r}return n}var i=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(i,u,f){var l="",e=[],h,c,s;if(u=u||"mediumDate",u=n.DATETIME_FORMATS[u]||u,o(i)&&(i=dk.test(i)?tt(i):r(i)),g(i)&&(i=new Date(i)),!ot(i)||!isFinite(i.getTime()))return i;while(u)c=kk.exec(u),c?(e=lr(e,c,1),u=e.pop()):(e.push(u),u=null);return s=i.getTimezoneOffset(),f&&(s=os(f,s),i=te(i,f,!0)),t(e,function(t){h=bk[t];l+=h?h(i,n.DATETIME_FORMATS,s):t==="''"?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}}function gk(){return function(n,t){return r(t)&&(t=2),yr(n,t)}}function nd(){return function(n,t,i){return(t=Math.abs(Number(t))===Infinity?Number(t):tt(t),it(t))?n:(g(n)&&(n=n.toString()),!ii(n))?n:(i=!i||isNaN(i)?0:tt(i),i=i<0?Math.max(0,n.length+i):i,t>=0?eo(n,i,i+t):i===0?eo(n,t,n.length):eo(n,Math.max(0,i+t),i))}}function eo(n,t,i){return o(n)?n.slice(t,i):bi.call(n,t,i)}function wl(n){function i(t){return t.map(function(t){var r=1,i=fr,u;return f(t)?i=t:o(t)&&((t.charAt(0)==="+"||t.charAt(0)==="-")&&(r=t.charAt(0)==="-"?-1:1,t=t.substring(1)),t!==""&&(i=n(t),i.constant&&(u=i(),i=function(n){return n[u]}))),{get:i,descending:r}})}function t(n){switch(typeof n){case"number":case"boolean":case"string":return!0;default:return!1}}function r(n){return f(n.valueOf)&&(n=n.valueOf(),t(n))?n:(ts(n)&&(n=n.toString(),t(n)),n)}function u(n,t){var i=typeof n;return n===null?(i="string",n="null"):i==="object"&&(n=r(n)),{value:n,type:i,index:t}}function e(n,t){var f=0,u=n.type,e=t.type,i,r;return u===e?(i=n.value,r=t.value,u==="string"?(i=i.toLowerCase(),r=r.toLowerCase()):u==="object"&&(h(i)&&(i=n.index),h(r)&&(r=t.index)),i!==r&&(f=i<r?-1:1)):f=u<e?-1:1,f}return function(n,t,r,o){function y(n,t){return{value:n,tieBreaker:{value:t,type:"number",index:t},predicateValues:s.map(function(i){return u(i.get(n),t)})}}function p(n,t){for(var r,i=0,u=s.length;i<u;i++)if(r=a(n.predicateValues[i],t.predicateValues[i]),r)return r*s[i].descending*h;return a(n.tieBreaker,t.tieBreaker)*h}if(n==null)return n;if(!ii(n))throw l("orderBy")("notarray","Expected array but received: {0}",n);c(t)||(t=[t]);t.length===0&&(t=["+"]);var s=i(t),h=r?-1:1,a=f(o)?o:e,v=Array.prototype.map.call(n,y);return v.sort(p),v.map(function(n){return n.value})}}function tr(n){return f(n)&&(n={link:n}),n.restrict=n.restrict||"AC",ct(n)}function td(n,t){n.$name=t}function kl(n,i,r,u,f){var e=this,o=[];e.$error={};e.$$success={};e.$pending=undefined;e.$name=f(i.name||i.ngForm||"")(r);e.$dirty=!1;e.$pristine=!0;e.$valid=!0;e.$invalid=!1;e.$submitted=!1;e.$$parentForm=su;e.$rollbackViewValue=function(){t(o,function(n){n.$rollbackViewValue()})};e.$commitViewValue=function(){t(o,function(n){n.$commitViewValue()})};e.$addControl=function(n){di(n.$name,"input");o.push(n);n.$name&&(e[n.$name]=n);n.$$parentForm=e};e.$$renameControl=function(n,t){var i=n.$name;e[i]===n&&delete e[i];e[t]=n;n.$name=t};e.$removeControl=function(n){n.$name&&e[n.$name]===n&&delete e[n.$name];t(e.$pending,function(t,i){e.$setValidity(i,null,n)});t(e.$error,function(t,i){e.$setValidity(i,null,n)});t(e.$$success,function(t,i){e.$setValidity(i,null,n)});hr(o,n);n.$$parentForm=su};va({ctrl:this,$element:n,set:function(n,t,i){var r=n[t],u;r?(u=r.indexOf(i),u===-1&&r.push(i)):n[t]=[i]},unset:function(n,t,i){var r=n[t];r&&(hr(r,i),r.length===0&&delete n[t])},$animate:u});e.$setDirty=function(){u.removeClass(n,rr);u.addClass(n,wf);e.$dirty=!0;e.$pristine=!1;e.$$parentForm.$setDirty()};e.$setPristine=function(){u.setClass(n,rr,wf+" "+oo);e.$dirty=!1;e.$pristine=!0;e.$submitted=!1;t(o,function(n){n.$setPristine()})};e.$setUntouched=function(){t(o,function(n){n.$setUntouched()})};e.$setSubmitted=function(){u.addClass(n,oo);e.$submitted=!0;e.$$parentForm.$setSubmitted()}}function co(n){n.$formatters.push(function(t){return n.$isEmpty(t)?t:t.toString()})}function hd(n,t,i,r,u,f){ir(n,t,i,r,u,f);co(r)}function ir(n,t,i,r,u,f){var h=a(t[0].type),s,e,o,c;if(!u.android){s=!1;t.on("compositionstart",function(){s=!0});t.on("compositionend",function(){s=!1;o()})}if(o=function(n){if(e&&(f.defer.cancel(e),e=null),!s){var u=t.val(),o=n&&n.type;h==="password"||i.ngTrim&&i.ngTrim==="false"||(u=y(u));(r.$viewValue!==u||u===""&&r.$$hasNativeValidators)&&r.$setViewValue(u,o)}},u.hasEvent("input"))t.on("input",o);else{c=function(n,t,i){e||(e=f.defer(function(){e=null;t&&t.value===i||o(n)}))};t.on("keydown",function(n){var t=n.keyCode;t===91||15<t&&t<19||37<=t&&t<=40||c(n,this,this.value)});if(u.hasEvent("paste"))t.on("paste cut",c)}t.on("change",o);if(ra[h]&&r.$$hasNativeValidators&&h===i.type)t.on(sd,function(n){if(!e){var t=this[wo],i=t.badInput,r=t.typeMismatch;e=f.defer(function(){e=null;(t.badInput!==i||t.typeMismatch!==r)&&o(n)})}});r.$render=function(){var n=r.$isEmpty(r.$viewValue)?"":r.$viewValue;t.val()!==n&&t.val(n)}}function cd(n,t){var i;if(ot(n))return n;if(o(n)&&(so.lastIndex=0,i=so.exec(n),i)){var r=+i[1],h=+i[2],u=0,f=0,e=0,s=0,c=ll(r),l=(h-1)*7;return t&&(u=t.getHours(),f=t.getMinutes(),e=t.getSeconds(),s=t.getMilliseconds()),new Date(r,0,c.getDate()+l,u,f,e,s)}return NaN}function pf(n,i){return function(r,u){var e,f;if(ot(r))return r;if(o(r)){if(r.charAt(0)==='"'&&r.charAt(r.length-1)==='"'&&(r=r.substring(1,r.length-1)),ud.test(r))return new Date(r);if(n.lastIndex=0,e=n.exec(r),e)return e.shift(),f=u?{yyyy:u.getFullYear(),MM:u.getMonth()+1,dd:u.getDate(),HH:u.getHours(),mm:u.getMinutes(),ss:u.getSeconds(),sss:u.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},t(e,function(n,t){t<i.length&&(f[i[t]]=+n)}),new Date(f.yyyy,f.MM-1,f.dd,f.HH,f.mm,f.ss||0,f.sss*1e3||0)}return NaN}}function hu(n,t,i,f){return function(e,o,s,h,c,l,a){function b(n){return n&&!(n.getTime&&n.getTime()!==n.getTime())}function k(n){return u(n)&&!ot(n)?i(n)||undefined:n}var v,y,p,w;lo(e,o,s,h);ir(e,o,s,h,c,l);v=h&&h.$options&&h.$options.timezone;h.$$parserName=n;h.$parsers.push(function(n){if(h.$isEmpty(n))return null;if(t.test(n)){var r=i(n,y);return v&&(r=te(r,v)),r}return undefined});h.$formatters.push(function(n){if(n&&!ot(n))throw au("datefmt","Expected `{0}` to be a date",n);return b(n)?(y=n,y&&v&&(y=te(y,v,!0)),a("date")(n,f,v)):(y=null,"")});(u(s.min)||s.ngMin)&&(h.$validators.min=function(n){return!b(n)||r(p)||i(n)>=p},s.$observe("min",function(n){p=k(n);h.$validate()}));(u(s.max)||s.ngMax)&&(h.$validators.max=function(n){return!b(n)||r(w)||i(n)<=w},s.$observe("max",function(n){w=k(n);h.$validate()}))}}function lo(n,t,i,r){var u=t[0],f=r.$$hasNativeValidators=h(u.validity);f&&r.$parsers.push(function(n){var i=t.prop(wo)||{};return i.badInput||i.typeMismatch?undefined:n})}function ua(n){n.$$parserName="number";n.$parsers.push(function(t){return n.$isEmpty(t)?null:od.test(t)?parseFloat(t):undefined});n.$formatters.push(function(t){if(!n.$isEmpty(t)){if(!g(t))throw au("numfmt","Expected `{0}` to be a number",t);t=t.toString()}return t})}function cu(n){return u(n)&&!g(n)&&(n=parseFloat(n)),it(n)?undefined:n}function ao(n){return(n|0)===n}function vo(n){var t=n.toString(),r=t.indexOf("."),i;return r===-1?-1<n&&n<1&&(i=/e-(\d+)$/.exec(t),i)?Number(i[1]):0:t.length-r-1}function ld(n,t,i){var r=Number(n),f,u;return ao(r)&&ao(t)&&ao(i)||(f=Math.max(vo(r),vo(t),vo(i)),u=Math.pow(10,f),r=r*u,t=t*u,i=i*u),(r-t)%i==0}function ad(n,t,i,f,e,o){lo(n,t,i,f);ir(n,t,i,f,e,o);ua(f);var s,h;(u(i.min)||i.ngMin)&&(f.$validators.min=function(n){return f.$isEmpty(n)||r(s)||n>=s},i.$observe("min",function(n){s=cu(n);f.$validate()}));(u(i.max)||i.ngMax)&&(f.$validators.max=function(n){return f.$isEmpty(n)||r(h)||n<=h},i.$observe("max",function(n){h=cu(n);f.$validate()}))}function vd(n,t,i,f,e,o){function v(n,r){t.attr(n,i[n]);i.$observe(n,r)}function k(n){if(h=cu(n),!it(f.$modelValue))if(s){var i=t.val();h>i&&(i=h,t.val(i));f.$setViewValue(i)}else f.$validate()}function d(n){if(c=cu(n),!it(f.$modelValue))if(s){var i=t.val();c<i&&(t.val(c),i=c<h?h:c);f.$setViewValue(i)}else f.$validate()}function g(n){(l=cu(n),it(f.$modelValue))||(s&&f.$viewValue!==t.val()?f.$setViewValue(t.val()):f.$validate())}lo(n,t,i,f);ua(f);ir(n,t,i,f,e,o);var s=f.$$hasNativeValidators&&t[0].type==="range",h=s?0:undefined,c=s?100:undefined,l=s?1:undefined,a=t[0].validity,p=u(i.min),w=u(i.max),b=u(i.step),y=f.$render;f.$render=s&&u(a.rangeUnderflow)&&u(a.rangeOverflow)?function(){y();f.$setViewValue(t.val())}:y;p&&(f.$validators.min=s?function(){return!0}:function(n,t){return f.$isEmpty(t)||r(h)||t>=h},v("min",k));w&&(f.$validators.max=s?function(){return!0}:function(n,t){return f.$isEmpty(t)||r(c)||t<=c},v("max",d));b&&(f.$validators.step=s?function(){return!a.stepMismatch}:function(n,t){return f.$isEmpty(t)||r(l)||ld(t,h||0,l)},v("step",g))}function yd(n,t,i,r,u,f){ir(n,t,i,r,u,f);co(r);r.$$parserName="url";r.$validators.url=function(n,t){var i=n||t;return r.$isEmpty(i)||fd.test(i)}}function pd(n,t,i,r,u,f){ir(n,t,i,r,u,f);co(r);r.$$parserName="email";r.$validators.email=function(n,t){var i=n||t;return r.$isEmpty(i)||ed.test(i)}}function wd(n,t,i,u){r(i.name)&&t.attr("name",vu());var f=function(n){t[0].checked&&u.$setViewValue(i.value,n&&n.type)};t.on("click",f);u.$render=function(){var n=i.value;t[0].checked=n==u.$viewValue};i.$observe("value",u.$render)}function fa(n,t,i,r,f){var e;if(u(r)){if(e=n(r),!e.constant)throw au("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",i,r);return e(t)}return f}function bd(n,t,i,r,u,f,e,o){var s=fa(o,n,"ngTrueValue",i.ngTrueValue,!0),h=fa(o,n,"ngFalseValue",i.ngFalseValue,!1),c=function(n){r.$setViewValue(t[0].checked,n&&n.type)};t.on("click",c);r.$render=function(){t[0].checked=r.$viewValue};r.$isEmpty=function(n){return n===!1};r.$formatters.push(function(n){return ft(n,s)});r.$parsers.push(function(n){return n?s:h})}function yo(n,i){return n="ngClass"+n,["$animate",function(r){function f(n,t){var f=[],i,u,r;n:for(i=0;i<n.length;i++){for(u=n[i],r=0;r<t.length;r++)if(u===t[r])continue n;f.push(u)}return f}function u(n){var i=[];return c(n)?(t(n,function(n){i=i.concat(u(n))}),i):o(n)?n.split(" "):h(n)?(t(n,function(n,t){n&&(i=i.concat(t.split(" ")))}),i):n}return{restrict:"AC",link:function(e,o,s){function a(n){var t=l(n,1);s.$addClass(t)}function y(n){var t=l(n,-1);s.$removeClass(t)}function l(n,i){var r=o.data("$classCounts")||p(),u=[];return t(n,function(n){(i>0||r[n])&&(r[n]=(r[n]||0)+i,r[n]===+(i>0)&&u.push(n))}),o.data("$classCounts",r),u.join(" ")}function w(n,t){var i=f(t,n),u=f(n,t);i=l(i,1);u=l(u,-1);i&&i.length&&r.addClass(o,i);u&&u.length&&r.removeClass(o,u)}function v(n){var t,r;(i===!0||(e.$index&1)===i)&&(t=u(n||[]),h?ft(n,h)||(r=u(h),w(r,t)):a(t));h=c(n)?n.map(function(n){return st(n)}):st(n)}var h;s.$observe("class",function(){v(e.$eval(s[n]))});n!=="ngClass"&&e.$watch("$index",function(n,t){var f=n&1,r;f!==(t&1)&&(r=u(h),f===i?a(r):y(r))});e.$watch(s[n],v,!0)}}}]}function va(n){function c(n,i,e){r(i)?l("$pending",n,e):a("$pending",n,e);si(i)?i?(u(t.$error,n,e),o(t.$$success,n,e)):(o(t.$error,n,e),u(t.$$success,n,e)):(u(t.$error,n,e),u(t.$$success,n,e));t.$pending?(f(ca,!0),t.$valid=t.$invalid=undefined,s("",null)):(f(ca,!1),t.$valid=ya(t.$error),t.$invalid=!t.$valid,s("",t.$valid));var h;h=t.$pending&&t.$pending[n]?undefined:t.$error[n]?!1:t.$$success[n]?!0:null;s(n,h);t.$$parentForm.$setValidity(n,h,t)}function l(n,i,r){t[n]||(t[n]={});o(t[n],i,r)}function a(n,i,r){t[n]&&u(t[n],i,r);ya(t[n])&&(t[n]=undefined)}function f(n,t){t&&!i[n]?(h.addClass(e,n),i[n]=!0):!t&&i[n]&&(h.removeClass(e,n),i[n]=!1)}function s(n,t){n=n?"-"+vs(n,"-"):"";f(lu+n,t===!0);f(sa+n,t===!1)}var t=n.ctrl,e=n.$element,i={},o=n.set,u=n.unset,h=n.$animate;i[sa]=!(i[lu]=e.hasClass(lu));t.$setValidity=c}function ya(n){if(n)for(var t in n)if(n.hasOwnProperty(t))return!1;return!0}function yn(n){n[0].hasAttribute("selected")&&(n[0].selected=!0)}var nv=/^\/(.+)\/([a-z]*)$/,wo="validity",vt=Object.prototype.hasOwnProperty,a=function(n){return o(n)?n.toLowerCase():n},ur=function(n){return o(n)?n.toUpperCase():n},tv=function(n){return o(n)?n.replace(/[A-Z]/g,function(n){return String.fromCharCode(n.charCodeAt(0)|32)}):n},iv=function(n){return o(n)?n.replace(/[a-z]/g,function(n){return String.fromCharCode(n.charCodeAt(0)&-33)}):n},it,c,rs,y,gf,ri,cr,es,hi,cs,as,re,bs,nh,li,nu,ce,le,k,ef,ae,ve,ye,ui,kh,tc,fu,ac,lf,i,af,ni,ht,il,d,io,yl,pl,bl,ou,su,oo,ho;"i"!=="I".toLowerCase()&&(a=tv,ur=iv);var ti,e,kt,bi=[].slice,rv=[].splice,uv=[].push,ut=Object.prototype.toString,bo=Object.getPrototypeOf,oi=l("ng"),et=n.angular||(n.angular={}),bf,fv=0;ti=n.document.documentMode;it=Number.isNaN||function(n){return n!==n};s.$inject=[];fr.$inject=[];c=Array.isArray;rs=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array]$/;y=function(n){return o(n)?n.trim():n};gf=function(n){return n.replace(/([-()[\]{}+?*.$^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")};ri=function(){function r(){try{return new Function(""),!1}catch(n){return!0}}var i,t;return u(ri.rules)||(i=n.document.querySelector("[ng-csp]")||n.document.querySelector("[data-ng-csp]"),i?(t=i.getAttribute("ng-csp")||i.getAttribute("data-ng-csp"),ri.rules={noUnsafeEval:!t||t.indexOf("no-unsafe-eval")!==-1,noInlineStyle:!t||t.indexOf("no-inline-style")!==-1}):ri.rules={noUnsafeEval:r(),noInlineStyle:!1}),ri.rules};cr=function(){if(u(cr.name_))return cr.name_;for(var i,e=hi.length,r,f,t=0;t<e;++t)if(r=hi[t],i=n.document.querySelector("["+r.replace(":","\\:")+"jq]"),i){f=i.getAttribute(r+"jq");break}return cr.name_=f};es=/:/g;hi=["ng-","data-ng-","ng:","x-ng-"];cs=pv(n.document);as=/[A-Z]/g;re=!1;var gt=1,gv=2,ci=3,wr=8,ps=9,ue=11;bs={full:"1.5.11",major:1,minor:5,dot:11,codeName:"princely-quest"};w.expando="ng339";var br=w.cache={},ry=1,bu=function(n,t,i){n.addEventListener(t,i,!1)},kr=function(n,t,i){n.removeEventListener(t,i,!1)};w._data=function(n){return this.cache[n[this.expando]]||{}};var fy=/([:\-_]+(.))/g,ey=/^moz([A-Z])/,ku={mouseleave:"mouseout",mouseenter:"mouseover"},fe=l("jqLite");var oy=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,sy=/<|&#?\w+;/,hy=/<([\w:-]+)/,cy=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,at={option:[1,'<select multiple="multiple">',"<\/select>"],thead:[1,"<table>","<\/table>"],col:[2,"<table><colgroup>","<\/colgroup><\/table>"],tr:[2,"<table><tbody>","<\/tbody><\/table>"],td:[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],_default:[0,"",""]};at.optgroup=at.option;at.tbody=at.tfoot=at.colgroup=at.caption=at.thead;at.th=at.td;nh=n.Node.prototype.contains||function(n){return!!(this.compareDocumentPosition(n)&16)};li=w.prototype={ready:function(t){function i(){r||(r=!0,t())}var r=!1;if(n.document.readyState==="complete")n.setTimeout(i);else{this.on("DOMContentLoaded",i);w(n).on("load",i)}},toString:function(){var n=[];return t(this,function(t){n.push(""+t)}),"["+n.join(", ")+"]"},eq:function(n){return n>=0?e(this[n]):e(this[this.length+n])},length:0,push:uv,sort:[].sort,splice:[].splice};nu={};t("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(n){nu[a(n)]=n});ce={};t("input,select,option,textarea,button,form,details".split(","),function(n){ce[n]=!0});le={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};t({data:se,removeData:gr,hasData:ly,cleanData:ay},function(n,t){w[t]=n});t({data:se,inheritedData:uf,scope:function(n){return e.data(n,"$scope")||uf(n.parentNode||n,["$isolateScope","$scope"])},isolateScope:function(n){return e.data(n,"$isolateScope")||e.data(n,"$isolateScopeNoTemplate")},controller:ih,injector:function(n){return uf(n,"$injector")},removeAttr:function(n,t){n.removeAttribute(t)},hasClass:nf,css:function(n,t,i){if(t=dr(t),u(i))n.style[t]=i;else return n.style[t]},attr:function(n,t,i){var f=n.nodeType,r,e;if(f!==ci&&f!==gv&&f!==wr)if(r=a(t),nu[r])if(u(i))i?(n[t]=!0,n.setAttribute(t,r)):(n[t]=!1,n.removeAttribute(r));else return n[t]||(n.attributes.getNamedItem(t)||s).specified?r:undefined;else if(u(i))n.setAttribute(t,i);else if(n.getAttribute)return e=n.getAttribute(t,2),e===null?undefined:e},prop:function(n,t,i){if(u(i))n[t]=i;else return n[t]},text:function(){function n(n,t){if(r(t)){var i=n.nodeType;return i===gt||i===ci?n.textContent:""}n.textContent=t}return n.$dv="",n}(),val:function(n,i){if(r(i)){if(n.multiple&&yt(n)==="select"){var u=[];return t(n.options,function(n){n.selected&&u.push(n.value||n.text)}),u.length===0?null:u}return n.value}n.value=i},html:function(n,t){if(r(t))return n.innerHTML;du(n,!0);n.innerHTML=t},empty:rh},function(n,t){w.prototype[t]=function(t,i){var u,s,e=this.length,f,l,o,c;if(n!==rh&&r(n.length===2&&n!==nf&&n!==ih?t:i)){if(h(t)){for(u=0;u<e;u++)if(n===se)n(this[u],t);else for(s in t)n(this[u],s,t[s]);return this}for(f=n.$dv,l=r(f)?Math.min(e,1):e,o=0;o<l;o++)c=n(this[o],t,i),f=f?f+c:c;return f}for(u=0;u<e;u++)n(this[u],t,i);return this}});t({removeData:gr,on:function(n,t,i,r){if(u(r))throw fe("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(ks(n)){var f=gu(n,!0),e=f.events,o=f.handle;o||(o=f.handle=wy(n,e));for(var h=t.indexOf(" ")>=0?t.split(" "):[t],c=h.length,s=function(t,r,u){var f=e[t];f||(f=e[t]=[],f.specialHandlerWrapper=r,t==="$destroy"||u||bu(n,t,o));f.push(i)};c--;)t=h[c],ku[t]?(s(ku[t],ky),s(t,undefined,!0)):s(t)}},off:th,one:function(n,t,i){n=e(n);n.on(t,function r(){n.off(t,i);n.off(t,r)});n.on(t,i)},replaceWith:function(n,i){var r,u=n.parentNode;du(n);t(new w(i),function(t){r?u.insertBefore(t,r.nextSibling):u.replaceChild(t,n);r=t})},children:function(n){var i=[];return t(n.childNodes,function(n){n.nodeType===gt&&i.push(n)}),i},contents:function(n){return n.contentDocument||n.childNodes||[]},append:function(n,t){var r=n.nodeType,i,u,f;if(r===gt||r===ue)for(t=new w(t),i=0,u=t.length;i<u;i++)f=t[i],n.appendChild(f)},prepend:function(n,i){if(n.nodeType===gt){var r=n.firstChild;t(new w(i),function(t){n.insertBefore(t,r)})}},wrap:function(n,t){gs(n,e(t).eq(0).clone()[0])},remove:ff,detach:function(n){ff(n,!0)},after:function(n,t){var u=n,f=n.parentNode,i,e,r;if(f)for(t=new w(t),i=0,e=t.length;i<e;i++)r=t[i],f.insertBefore(r,u.nextSibling),u=r},addClass:rf,removeClass:tf,toggleClass:function(n,i,u){i&&t(i.split(" "),function(t){var i=u;r(i)&&(i=!nf(n,t));(i?rf:tf)(n,t)})},parent:function(n){var t=n.parentNode;return t&&t.nodeType!==ue?t:null},next:function(n){return n.nextElementSibling},find:function(n,t){return n.getElementsByTagName?n.getElementsByTagName(t):[]},clone:oe,triggerHandler:function(n,i,r){var u,f,e,o=i.type||i,h=gu(n),c=h&&h.events,l=c&&c[o];l&&(u={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:s,type:o,target:n},i.type&&(u=v(u,i)),f=st(l),e=r?[u].concat(r):[u],t(f,function(t){u.isImmediatePropagationStopped()||t.apply(n,e)}))}},function(n,t){w.prototype[t]=function(t,i,f){for(var o,s=0,h=this.length;s<h;s++)r(o)?(o=n(this[s],t,i,f),u(o)&&(o=e(o))):he(o,n(this[s],t,i,f));return u(o)?o:this}});w.prototype.bind=w.prototype.on;w.prototype.unbind=w.prototype.off;gi.prototype={put:function(n,t){this[ai(n,this.nextUid)]=t},get:function(n){return this[ai(n,this.nextUid)]},remove:function(n){var t=this[n=ai(n,this.nextUid)];return delete this[n],t}};var gy=[function(){this.$get=[function(){return gi}]}],np=/^([^(]+?)=>/,tp=/^[^(]*\(\s*([^)]*)\)/m,ip=/,/,rp=/^\s*(_?)(\S+?)\1\s*$/,up=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,vi=l("$injector");tu.$$annotate=ep;var oh=l("$animate"),sp=1,sh="ng-animate";var lp=function(){this.$get=s},ap=function(){var n=new gi,i=[];this.$get=["$$AnimateRunner","$rootScope",function(r,u){function f(n,i,r){var u=!1;return i&&(i=o(i)?i.split(" "):c(i)?i:[],t(i,function(t){t&&(u=!0,n[t]=r)})),u}function e(){t(i,function(i){var f=n.get(i);if(f){var e=cp(i.attr("class")),r="",u="";t(f,function(n,t){var i=!!e[t];n!==i&&(n?r+=(r.length?" ":"")+t:u+=(u.length?" ":"")+t)});t(i,function(n){r&&rf(n,r);u&&tf(n,u)});n.remove(i)}});i.length=0}function h(t,r,o){var s=n.get(t)||{},h=f(s,r,!0),c=f(s,o,!1);(h||c)&&(n.put(t,s),i.push(t),i.length===1&&u.$$postDigest(e))}return{enabled:s,on:s,off:s,pin:s,push:function(n,t,i,u){u&&u();i=i||{};i.from&&n.css(i.from);i.to&&n.css(i.to);(i.addClass||i.removeClass)&&h(n,i.addClass,i.removeClass);var f=new r;return f.complete(),f}}}]},vp=["$provide",function(n){var t=this;this.$$registeredAnimations=Object.create(null);this.register=function(i,r){if(i&&i.charAt(0)!==".")throw oh("notcsel","Expecting class selector starting with '.' got '{0}'.",i);var u=i+"-animation";t.$$registeredAnimations[i.substr(1)]=u;n.factory(u,r)};this.classNameFilter=function(n){if(arguments.length===1&&(this.$$classNameFilter=n instanceof RegExp?n:null,this.$$classNameFilter)){var t=new RegExp("(\\s+|\\/)"+sh+"(\\s+|\\/)");if(t.test(this.$$classNameFilter.toString()))throw oh("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',sh);}return this.$$classNameFilter};this.$get=["$$animateQueue",function(n){function t(n,t,i){if(i){var r=hp(i);!r||r.parentNode||r.previousElementSibling||(i=null)}i?i.after(n):t.prepend(n)}return{on:n.on,off:n.off,pin:n.pin,enabled:n.enabled,cancel:function(n){n.end&&n.end()},enter:function(i,r,u,f){return r=r&&e(r),u=u&&e(u),r=r||u.parent(),t(i,r,u),n.push(i,"enter",yi(f))},move:function(i,r,u,f){return r=r&&e(r),u=u&&e(u),r=r||u.parent(),t(i,r,u),n.push(i,"move",yi(f))},leave:function(t,i){return n.push(t,"leave",yi(i),function(){t.remove()})},addClass:function(t,i,r){return r=yi(r),r.addClass=iu(r.addclass,i),n.push(t,"addClass",r)},removeClass:function(t,i,r){return r=yi(r),r.removeClass=iu(r.removeClass,i),n.push(t,"removeClass",r)},setClass:function(t,i,r,u){return u=yi(u),u.addClass=iu(u.addClass,i),u.removeClass=iu(u.removeClass,r),n.push(t,"setClass",u)},animate:function(t,i,r,u,f){return f=yi(f),f.from=f.from?v(f.from,i):i,f.to=f.to?v(f.to,r):r,u=u||"ng-inline-animate",f.tempClasses=iu(f.tempClasses,u),n.push(t,"animate",f)}}}]}],yp=function(){this.$get=["$$rAF",function(n){function i(i){(t.push(i),t.length>1)||n(function(){for(var n=0;n<t.length;n++)t[n]();t=[]})}var t=[];return function(){var n=!1;return i(function(){n=!0}),function(t){n?t():i(t)}}}]},pp=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$document","$timeout",function(n,i,r,u,f){function e(n){this.setHost(n);var t=r(),i=function(n){f(n,0,!1)};this._doneCallbacks=[];this._tick=function(n){var r=u[0];r&&r.hidden?i(n):t(n)};this._state=0}var h=0,c=1,o=2;return e.chain=function(n,t){function r(){if(i===n.length){t(!0);return}n[i](function(n){if(n===!1){t(!1);return}i++;r()})}var i=0;r()},e.all=function(n,i){function f(t){r=r&&t;++u===n.length&&i(r)}var u=0,r=!0;t(n,function(n){n.done(f)})},e.prototype={setHost:function(n){this.host=n||{}},done:function(n){this._state===o?n():this._doneCallbacks.push(n)},progress:s,getPromise:function(){if(!this.promise){var t=this;this.promise=n(function(n,i){t.done(function(t){t===!1?i():n()})})}return this.promise},then:function(n,t){return this.getPromise().then(n,t)},"catch":function(n){return this.getPromise()["catch"](n)},"finally":function(n){return this.getPromise()["finally"](n)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end();this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel();this._resolve(!1)},complete:function(n){var t=this;t._state===h&&(t._state=c,t._tick(function(){t._resolve(n)}))},_resolve:function(n){this._state!==o&&(t(this._doneCallbacks,function(t){t(n)}),this._doneCallbacks.length=0,this._state=o)}},e}]},wp=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function(n,t,i){return function(t,r){function o(){return n(function(){s();e||f.complete();e=!0}),f}function s(){u.addClass&&(t.addClass(u.addClass),u.addClass=null);u.removeClass&&(t.removeClass(u.removeClass),u.removeClass=null);u.to&&(t.css(u.to),u.to=null)}var u=r||{},e,f;return u.$$prepared||(u=dt(u)),u.cleanupStyles&&(u.from=u.to=null),u.from&&(t.css(u.from),u.from=null),f=new i,{start:o,end:o}}}]};k=l("$compile");ef=new nw;hh.$inject=["$provide","$$sanitizeUriProvider"];of.prototype.isFirstChange=function(){return this.previousValue===ef};ae=/^((?:x|data)[:\-_])/i;ve=l("$controller");ye=/^(\S+)(\s+as\s+([\w$]+))?$/;var fw=function(){this.$get=["$document",function(n){return function(t){return t?!t.nodeType&&t instanceof e&&(t=t[0]):t=n[0].body,t.offsetWidth+1}}]},ah="application/json",pe={"Content-Type":ah+";charset=utf-8"},ew=/^\[|^\{(?!\{)/,ow={"[":/]$/,"{":/}$/},sw=/^\)]\}',?\n/,hw=l("$http"),vh=function(n){return function(){throw hw("legacy","The method `{0}` on the promise returned from `$http` has been disabled.",n);}};ui=et.$interpolateMinErr=l("$interpolate");ui.throwNoconcat=function(n){throw ui("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required.  See http://docs.angularjs.org/api/ng.$sce",n);};ui.interr=function(n,t){return ui("interr","Can't interpolate: {0}\n{1}",n,t.toString())};var dw=function(){this.$get=["$window",function(n){function r(n){var t=function(n){t.data=n;t.called=!0};return t.id=n,t}var i=n.angular.callbacks,t={};return{createCallback:function(){var n="_"+(i.$$counter++).toString(36),u="angular.callbacks."+n,f=r(n);return t[u]=i[n]=f,u},wasCalled:function(n){return t[n].called},getResponse:function(n){return t[n].data},removeCallback:function(n){var r=t[n];delete i[r.id];delete t[n]}}}]},gw=/^([^?#]*)(\?([^#]*))?(#(.*))?$/,nb={http:80,https:443,ftp:21},ru=l("$location");kh=/^\s*[\\/]{2,}/;tc={$$absUrl:"",$$html5:!1,$$replace:!1,absUrl:sf("$$absUrl"),url:function(n){if(r(n))return this.$$url;var t=gw.exec(n);return(t[1]||n==="")&&this.path(decodeURIComponent(t[1])),(t[2]||t[1]||n==="")&&this.search(t[3]||""),this.hash(t[5]||""),this},protocol:sf("$$protocol"),host:sf("$$host"),port:sf("$$port"),path:ic("$$path",function(n){return n=n!==null?n.toString():"",n.charAt(0)==="/"?n:"/"+n}),search:function(n,i){switch(arguments.length){case 0:return this.$$search;case 1:if(o(n)||g(n))n=n.toString(),this.$$search=hs(n);else if(h(n))n=dt(n,{}),t(n,function(t,i){t==null&&delete n[i]}),this.$$search=n;else throw ru("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");break;default:r(i)||i===null?delete this.$$search[n]:this.$$search[n]=i}return this.$$compose(),this},hash:ic("$$hash",function(n){return n!==null?n.toString():""}),replace:function(){return this.$$replace=!0,this}};t([nc,no,ge],function(n){n.prototype=Object.create(tc);n.prototype.state=function(t){if(!arguments.length)return this.$$state;if(n!==ge||!this.$$html5)throw ru("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=r(t)?null:t,this}});var rt=l("$parse"),rc=[].constructor,uc=(!1).constructor,fc=Function.constructor,ec=0..constructor,oc={}.constructor,sc="".constructor,fb=rc.prototype,eb=uc.prototype,hf=fc.prototype,ob=ec.prototype,hc=oc.prototype,sb=sc.prototype,hb=hf.call,cb=hf.apply,lb=hf.bind,ab=hc.valueOf;fu=p();t("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(n){fu[n]=!0});ac={n:"\n",f:"\f",r:"\r",t:"\t",v:'\v',"'":"'",'"':'"'};lf=function(n){this.options=n};lf.prototype={constructor:lf,lex:function(n){var t,r;for(this.text=n,this.index=0,this.tokens=[];this.index<this.text.length;)if(t=this.text.charAt(this.index),t==='"'||t==="'")this.readString(t);else if(this.isNumber(t)||t==="."&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdentifierStart(this.peekMultichar()))this.readIdent();else if(this.is(t,"(){}[].,;:?"))this.tokens.push({index:this.index,text:t}),this.index++;else if(this.isWhitespace(t))this.index++;else{var i=t+this.peek(),u=i+this.peek(2),o=fu[t],f=fu[i],e=fu[u];o||f||e?(r=e?u:f?i:t,this.tokens.push({index:this.index,text:r,operator:!0}),this.index+=r.length):this.throwError("Unexpected next character ",this.index,this.index+1)}return this.tokens},is:function(n,t){return t.indexOf(n)!==-1},peek:function(n){var t=n||1;return this.index+t<this.text.length?this.text.charAt(this.index+t):!1},isNumber:function(n){return"0"<=n&&n<="9"&&typeof n=="string"},isWhitespace:function(n){return n===" "||n==="\r"||n==="\t"||n==="\n"||n==='\v'||n===" "},isIdentifierStart:function(n){return this.options.isIdentifierStart?this.options.isIdentifierStart(n,this.codePointAt(n)):this.isValidIdentifierStart(n)},isValidIdentifierStart:function(n){return"a"<=n&&n<="z"||"A"<=n&&n<="Z"||"_"===n||n==="$"},isIdentifierContinue:function(n){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(n,this.codePointAt(n)):this.isValidIdentifierContinue(n)},isValidIdentifierContinue:function(n,t){return this.isValidIdentifierStart(n,t)||this.isNumber(n)},codePointAt:function(n){return n.length===1?n.charCodeAt(0):(n.charCodeAt(0)<<10)+n.charCodeAt(1)-56613888},peekMultichar:function(){var n=this.text.charAt(this.index),t=this.peek(),i,r;return t?(i=n.charCodeAt(0),r=t.charCodeAt(0),i>=55296&&i<=56319&&r>=56320&&r<=57343)?n+t:n:n},isExpOperator:function(n){return n==="-"||n==="+"||this.isNumber(n)},throwError:function(n,t,i){i=i||this.index;var r=u(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,i)+"]":" "+i;throw rt("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",n,r,this.text);},readNumber:function(){for(var n="",r=this.index,t,i;this.index<this.text.length;){if(t=a(this.text.charAt(this.index)),t==="."||this.isNumber(t))n+=t;else if(i=this.peek(),t==="e"&&this.isExpOperator(i))n+=t;else if(this.isExpOperator(t)&&i&&this.isNumber(i)&&n.charAt(n.length-1)==="e")n+=t;else if(!this.isExpOperator(t)||i&&this.isNumber(i)||n.charAt(n.length-1)!=="e")break;else this.throwError("Invalid exponent");this.index++}this.tokens.push({index:r,text:n,constant:!0,value:Number(n)})},readIdent:function(){var t=this.index,n;for(this.index+=this.peekMultichar().length;this.index<this.text.length;){if(n=this.peekMultichar(),!this.isIdentifierContinue(n))break;this.index+=n.length}this.tokens.push({index:t,text:this.text.slice(t,this.index),identifier:!0})},readString:function(n){var f=this.index,t,r,o;this.index++;for(var i="",e=n,u=!1;this.index<this.text.length;){if(t=this.text.charAt(this.index),e+=t,u)t==="u"?(r=this.text.substring(this.index+1,this.index+5),r.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+r+"]"),this.index+=4,i+=String.fromCharCode(parseInt(r,16))):(o=ac[t],i=i+(o||t)),u=!1;else if(t==="\\")u=!0;else{if(t===n){this.index++;this.tokens.push({index:f,text:e,constant:!0,value:i});return}i+=t}this.index++}this.throwError("Unterminated quote",f)}};i=function(n,t){this.lexer=n;this.options=t};i.Program="Program";i.ExpressionStatement="ExpressionStatement";i.AssignmentExpression="AssignmentExpression";i.ConditionalExpression="ConditionalExpression";i.LogicalExpression="LogicalExpression";i.BinaryExpression="BinaryExpression";i.UnaryExpression="UnaryExpression";i.CallExpression="CallExpression";i.MemberExpression="MemberExpression";i.Identifier="Identifier";i.Literal="Literal";i.ArrayExpression="ArrayExpression";i.Property="Property";i.ObjectExpression="ObjectExpression";i.ThisExpression="ThisExpression";i.LocalsExpression="LocalsExpression";i.NGValueParameter="NGValueParameter";i.prototype={ast:function(n){this.text=n;this.tokens=this.lexer.lex(n);var t=this.program();return this.tokens.length!==0&&this.throwError("is an unexpected token",this.tokens[0]),t},program:function(){for(var n=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&n.push(this.expressionStatement()),!this.expect(";"))return{type:i.Program,body:n}},expressionStatement:function(){return{type:i.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var n=this.expression();this.expect("|");)n=this.filter(n);return n},expression:function(){return this.assignment()},assignment:function(){var n=this.ternary();if(this.expect("=")){if(!pc(n))throw rt("lval","Trying to assign a value to a non l-value");n={type:i.AssignmentExpression,left:n,right:this.assignment(),operator:"="}}return n},ternary:function(){var n=this.logicalOR(),t,r;return this.expect("?")&&(t=this.expression(),this.consume(":"))?(r=this.expression(),{type:i.ConditionalExpression,test:n,alternate:t,consequent:r}):n},logicalOR:function(){for(var n=this.logicalAND();this.expect("||");)n={type:i.LogicalExpression,operator:"||",left:n,right:this.logicalAND()};return n},logicalAND:function(){for(var n=this.equality();this.expect("&&");)n={type:i.LogicalExpression,operator:"&&",left:n,right:this.equality()};return n},equality:function(){for(var n=this.relational(),t;t=this.expect("==","!=","===","!==");)n={type:i.BinaryExpression,operator:t.text,left:n,right:this.relational()};return n},relational:function(){for(var n=this.additive(),t;t=this.expect("<",">","<=",">=");)n={type:i.BinaryExpression,operator:t.text,left:n,right:this.additive()};return n},additive:function(){for(var n=this.multiplicative(),t;t=this.expect("+","-");)n={type:i.BinaryExpression,operator:t.text,left:n,right:this.multiplicative()};return n},multiplicative:function(){for(var n=this.unary(),t;t=this.expect("*","/","%");)n={type:i.BinaryExpression,operator:t.text,left:n,right:this.unary()};return n},unary:function(){var n;return(n=this.expect("+","-","!"))?{type:i.UnaryExpression,operator:n.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var n,t;for(this.expect("(")?(n=this.filterChain(),this.consume(")")):this.expect("[")?n=this.arrayDeclaration():this.expect("{")?n=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?n=dt(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?n={type:i.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?n=this.identifier():this.peek().constant?n=this.constant():this.throwError("not a primary expression",this.peek());t=this.expect("(","[",".");)t.text==="("?(n={type:i.CallExpression,callee:n,arguments:this.parseArguments()},this.consume(")")):t.text==="["?(n={type:i.MemberExpression,object:n,property:this.expression(),computed:!0},this.consume("]")):t.text==="."?n={type:i.MemberExpression,object:n,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return n},filter:function(n){for(var t=[n],r={type:i.CallExpression,callee:this.identifier(),arguments:t,filter:!0};this.expect(":");)t.push(this.expression());return r},parseArguments:function(){var n=[];if(this.peekToken().text!==")")do n.push(this.filterChain());while(this.expect(","));return n},identifier:function(){var n=this.consume();return n.identifier||this.throwError("is not a valid identifier",n),{type:i.Identifier,name:n.text}},constant:function(){return{type:i.Literal,value:this.consume().value}},arrayDeclaration:function(){var n=[];if(this.peekToken().text!=="]")do{if(this.peek("]"))break;n.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:i.ArrayExpression,elements:n}},object:function(){var t=[],n;if(this.peekToken().text!=="}")do{if(this.peek("}"))break;n={type:i.Property,kind:"init"};this.peek().constant?(n.key=this.constant(),n.computed=!1,this.consume(":"),n.value=this.expression()):this.peek().identifier?(n.key=this.identifier(),n.computed=!1,this.peek(":")?(this.consume(":"),n.value=this.expression()):n.value=n.key):this.peek("[")?(this.consume("["),n.key=this.expression(),this.consume("]"),n.computed=!0,this.consume(":"),n.value=this.expression()):this.throwError("invalid key",this.peek());t.push(n)}while(this.expect(","));return this.consume("}"),{type:i.ObjectExpression,properties:t}},throwError:function(n,t){throw rt("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",t.text,n,t.index+1,this.text,this.text.substring(t.index));},consume:function(n){if(this.tokens.length===0)throw rt("ueoe","Unexpected end of expression: {0}",this.text);var t=this.expect(n);return t||this.throwError("is unexpected, expecting ["+n+"]",this.peek()),t},peekToken:function(){if(this.tokens.length===0)throw rt("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(n,t,i,r){return this.peekAhead(0,n,t,i,r)},peekAhead:function(n,t,i,r,u){if(this.tokens.length>n){var e=this.tokens[n],f=e.text;if(f===t||f===i||f===r||f===u||!t&&!i&&!r&&!u)return e}return!1},expect:function(n,t,i,r){var u=this.peek(n,t,i,r);return u?(this.tokens.shift(),u):!1},selfReferential:{"this":{type:i.ThisExpression},$locals:{type:i.LocalsExpression}}};dc.prototype={compile:function(n,i){var r=this,u=this.astBuilder.ast(n),e,s,o,h,c,f;return this.state={nextId:0,filters:{},expensiveChecks:i,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},b(u,r.$filter),e="",this.stage="assign",(s=wc(u))&&(this.state.computing="assign",o=this.nextId(),this.recurse(s,o),this.return_(o),e="fn.assign="+this.generateFunction("assign","s,v,l")),h=yc(u.body),r.stage="inputs",t(h,function(n,t){var i="fn"+t,u;r.state[i]={vars:[],body:[],own:{}};r.state.computing=i;u=r.nextId();r.recurse(n,u);r.return_(u);r.state.inputs.push(i);n.watchId=t}),this.state.computing="fn",this.stage="main",this.recurse(u),c='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+e+this.watchFns()+"return fn;",f=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",c)(this.$filter,nr,fi,lc,cc,cf,vb,vc,n),this.state=this.stage=undefined,f.literal=bc(u),f.constant=kc(u),f},USE:"use",STRICT:"strict",watchFns:function(){var n=[],i=this.state.inputs,r=this;return t(i,function(t){n.push("var "+t+"="+r.generateFunction(t,"s"))}),i.length&&n.push("fn.inputs=["+i.join(",")+"];"),n.join("")},generateFunction:function(n,t){return"function("+t+"){"+this.varsPrefix(n)+this.body(n)+"};"},filterPrefix:function(){var n=[],i=this;return(t(this.state.filters,function(t,r){n.push(t+"=$filter("+i.escape(r)+")")}),n.length)?"var "+n.join(",")+";":""},varsPrefix:function(n){return this.state[n].vars.length?"var "+this.state[n].vars.join(",")+";":""},body:function(n){return this.state[n].body.join("")},recurse:function(n,r,f,e,o,h){var l,v,c=this,y,a,p;if(e=e||s,!h&&u(n.watchId)){r=r||this.nextId();this.if_("i",this.lazyAssign(r,this.computedMember("i",n.watchId)),this.lazyRecurse(n,r,f,e,o,!0));return}switch(n.type){case i.Program:t(n.body,function(t,i){c.recurse(t.expression,undefined,undefined,function(n){v=n});i!==n.body.length-1?c.current().body.push(v,";"):c.return_(v)});break;case i.Literal:a=this.escape(n.value);this.assign(r,a);e(a);break;case i.UnaryExpression:this.recurse(n.argument,undefined,undefined,function(n){v=n});a=n.operator+"("+this.ifDefined(v,0)+")";this.assign(r,a);e(a);break;case i.BinaryExpression:this.recurse(n.left,undefined,undefined,function(n){l=n});this.recurse(n.right,undefined,undefined,function(n){v=n});a=n.operator==="+"?this.plus(l,v):n.operator==="-"?this.ifDefined(l,0)+n.operator+this.ifDefined(v,0):"("+l+")"+n.operator+"("+v+")";this.assign(r,a);e(a);break;case i.LogicalExpression:r=r||this.nextId();c.recurse(n.left,r);c.if_(n.operator==="&&"?r:c.not(r),c.lazyRecurse(n.right,r));e(r);break;case i.ConditionalExpression:r=r||this.nextId();c.recurse(n.test,r);c.if_(r,c.lazyRecurse(n.alternate,r),c.lazyRecurse(n.consequent,r));e(r);break;case i.Identifier:r=r||this.nextId();f&&(f.context=c.stage==="inputs"?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",n.name)+"?l:s"),f.computed=!1,f.name=n.name);nr(n.name);c.if_(c.stage==="inputs"||c.not(c.getHasOwnProperty("l",n.name)),function(){c.if_(c.stage==="inputs"||"s",function(){o&&o!==1&&c.if_(c.not(c.nonComputedMember("s",n.name)),c.lazyAssign(c.nonComputedMember("s",n.name),"{}"));c.assign(r,c.nonComputedMember("s",n.name))})},r&&c.lazyAssign(r,c.nonComputedMember("l",n.name)));(c.state.expensiveChecks||vf(n.name))&&c.addEnsureSafeObject(r);e(r);break;case i.MemberExpression:l=f&&(f.context=this.nextId())||this.nextId();r=r||this.nextId();c.recurse(n.object,l,undefined,function(){c.if_(c.notNull(l),function(){o&&o!==1&&c.addEnsureSafeAssignContext(l);n.computed?(v=c.nextId(),c.recurse(n.property,v),c.getStringValue(v),c.addEnsureSafeMemberName(v),o&&o!==1&&c.if_(c.not(c.computedMember(l,v)),c.lazyAssign(c.computedMember(l,v),"{}")),a=c.ensureSafeObject(c.computedMember(l,v)),c.assign(r,a),f&&(f.computed=!0,f.name=v)):(nr(n.property.name),o&&o!==1&&c.if_(c.not(c.nonComputedMember(l,n.property.name)),c.lazyAssign(c.nonComputedMember(l,n.property.name),"{}")),a=c.nonComputedMember(l,n.property.name),(c.state.expensiveChecks||vf(n.property.name))&&(a=c.ensureSafeObject(a)),c.assign(r,a),f&&(f.computed=!1,f.name=n.property.name))},function(){c.assign(r,"undefined")});e(r)},!!o);break;case i.CallExpression:r=r||this.nextId();n.filter?(v=c.filter(n.callee.name),y=[],t(n.arguments,function(n){var t=c.nextId();c.recurse(n,t);y.push(t)}),a=v+"("+y.join(",")+")",c.assign(r,a),e(r)):(v=c.nextId(),l={},y=[],c.recurse(n.callee,v,l,function(){c.if_(c.notNull(v),function(){c.addEnsureSafeFunction(v);t(n.arguments,function(n){c.recurse(n,c.nextId(),undefined,function(n){y.push(c.ensureSafeObject(n))})});l.name?(c.state.expensiveChecks||c.addEnsureSafeObject(l.context),a=c.member(l.context,l.name,l.computed)+"("+y.join(",")+")"):a=v+"("+y.join(",")+")";a=c.ensureSafeObject(a);c.assign(r,a)},function(){c.assign(r,"undefined")});e(r)}));break;case i.AssignmentExpression:v=this.nextId();l={};this.recurse(n.left,undefined,l,function(){c.if_(c.notNull(l.context),function(){c.recurse(n.right,v);c.addEnsureSafeObject(c.member(l.context,l.name,l.computed));c.addEnsureSafeAssignContext(l.context);a=c.member(l.context,l.name,l.computed)+n.operator+v;c.assign(r,a);e(r||a)})},1);break;case i.ArrayExpression:y=[];t(n.elements,function(n){c.recurse(n,c.nextId(),undefined,function(n){y.push(n)})});a="["+y.join(",")+"]";this.assign(r,a);e(a);break;case i.ObjectExpression:y=[];p=!1;t(n.properties,function(n){n.computed&&(p=!0)});p?(r=r||this.nextId(),this.assign(r,"{}"),t(n.properties,function(n){n.computed?(l=c.nextId(),c.recurse(n.key,l)):l=n.key.type===i.Identifier?n.key.name:""+n.key.value;v=c.nextId();c.recurse(n.value,v);c.assign(c.member(r,l,n.computed),v)})):(t(n.properties,function(t){c.recurse(t.value,n.constant?undefined:c.nextId(),undefined,function(n){y.push(c.escape(t.key.type===i.Identifier?t.key.name:""+t.key.value)+":"+n)})}),a="{"+y.join(",")+"}",this.assign(r,a));e(r||a);break;case i.ThisExpression:this.assign(r,"s");e("s");break;case i.LocalsExpression:this.assign(r,"l");e("l");break;case i.NGValueParameter:this.assign(r,"v");e("v")}},getHasOwnProperty:function(n,t){var i=n+"."+t,r=this.current().own;return r.hasOwnProperty(i)||(r[i]=this.nextId(!1,n+"&&("+this.escape(t)+" in "+n+")")),r[i]},assign:function(n,t){if(n)return this.current().body.push(n,"=",t,";"),n},filter:function(n){return this.state.filters.hasOwnProperty(n)||(this.state.filters[n]=this.nextId(!0)),this.state.filters[n]},ifDefined:function(n,t){return"ifDefined("+n+","+this.escape(t)+")"},plus:function(n,t){return"plus("+n+","+t+")"},return_:function(n){this.current().body.push("return ",n,";")},if_:function(n,t,i){if(n===!0)t();else{var r=this.current().body;r.push("if(",n,"){");t();r.push("}");i&&(r.push("else{"),i(),r.push("}"))}},not:function(n){return"!("+n+")"},notNull:function(n){return n+"!=null"},nonComputedMember:function(n,t){return/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(t)?n+"."+t:n+'["'+t.replace(/[^$_a-zA-Z0-9]/g,this.stringEscapeFn)+'"]'},computedMember:function(n,t){return n+"["+t+"]"},member:function(n,t,i){return i?this.computedMember(n,t):this.nonComputedMember(n,t)},addEnsureSafeObject:function(n){this.current().body.push(this.ensureSafeObject(n),";")},addEnsureSafeMemberName:function(n){this.current().body.push(this.ensureSafeMemberName(n),";")},addEnsureSafeFunction:function(n){this.current().body.push(this.ensureSafeFunction(n),";")},addEnsureSafeAssignContext:function(n){this.current().body.push(this.ensureSafeAssignContext(n),";")},ensureSafeObject:function(n){return"ensureSafeObject("+n+",text)"},ensureSafeMemberName:function(n){return"ensureSafeMemberName("+n+",text)"},ensureSafeFunction:function(n){return"ensureSafeFunction("+n+",text)"},getStringValue:function(n){this.assign(n,"getStringValue("+n+")")},ensureSafeAssignContext:function(n){return"ensureSafeAssignContext("+n+",text)"},lazyRecurse:function(n,t,i,r,u,f){var e=this;return function(){e.recurse(n,t,i,r,u,f)}},lazyAssign:function(n,t){var i=this;return function(){i.assign(n,t)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(n){return"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)},escape:function(n){if(o(n))return"'"+n.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(g(n))return n.toString();if(n===!0)return"true";if(n===!1)return"false";if(n===null)return"null";if(typeof n=="undefined")return"undefined";throw rt("esc","IMPOSSIBLE");},nextId:function(n,t){var i="v"+this.state.nextId++;return n||this.current().vars.push(i+(t?"="+t:"")),i},current:function(){return this.state[this.state.computing]}};gc.prototype={compile:function(n,i){var o=this,r=this.astBuilder.ast(n),l,h,c,f,e,u;return this.expression=n,this.expensiveChecks=i,b(r,o.$filter),(l=wc(r))&&(h=this.recurse(l)),c=yc(r.body),c&&(f=[],t(c,function(n,t){var i=o.recurse(n);n.input=i;f.push(i);n.watchId=t})),e=[],t(r.body,function(n){e.push(o.recurse(n.expression))}),u=r.body.length===0?s:r.body.length===1?e[0]:function(n,i){var r;return t(e,function(t){r=t(n,i)}),r},h&&(u.assign=function(n,t,i){return h(n,i,t)}),f&&(u.inputs=f),u.literal=bc(r),u.constant=kc(r),u},recurse:function(n,r,u){var s,o,e=this,f;if(n.input)return this.inputs(n.input,n.watchId);switch(n.type){case i.Literal:return this.value(n.value,r);case i.UnaryExpression:return o=this.recurse(n.argument),this["unary"+n.operator](o,r);case i.BinaryExpression:return s=this.recurse(n.left),o=this.recurse(n.right),this["binary"+n.operator](s,o,r);case i.LogicalExpression:return s=this.recurse(n.left),o=this.recurse(n.right),this["binary"+n.operator](s,o,r);case i.ConditionalExpression:return this["ternary?:"](this.recurse(n.test),this.recurse(n.alternate),this.recurse(n.consequent),r);case i.Identifier:return nr(n.name,e.expression),e.identifier(n.name,e.expensiveChecks||vf(n.name),r,u,e.expression);case i.MemberExpression:return s=this.recurse(n.object,!1,!!u),n.computed||(nr(n.property.name,e.expression),o=n.property.name),n.computed&&(o=this.recurse(n.property)),n.computed?this.computedMember(s,o,r,u,e.expression):this.nonComputedMember(s,o,e.expensiveChecks,r,u,e.expression);case i.CallExpression:return f=[],t(n.arguments,function(n){f.push(e.recurse(n))}),n.filter&&(o=this.$filter(n.callee.name)),n.filter||(o=this.recurse(n.callee,!0)),n.filter?function(n,t,i,u){for(var s,h=[],e=0;e<f.length;++e)h.push(f[e](n,t,i,u));return s=o.apply(undefined,h,u),r?{context:undefined,name:undefined,value:s}:s}:function(n,t,i,u){var s=o(n,t,i,u),c,l,h;if(s.value!=null){for(fi(s.context,e.expression),lc(s.value,e.expression),l=[],h=0;h<f.length;++h)l.push(fi(f[h](n,t,i,u),e.expression));c=fi(s.value.apply(s.context,l),e.expression)}return r?{value:c}:c};case i.AssignmentExpression:return s=this.recurse(n.left,!0,1),o=this.recurse(n.right),function(n,t,i,u){var f=s(n,t,i,u),h=o(n,t,i,u);return fi(f.value,e.expression),cf(f.context),f.context[f.name]=h,r?{value:h}:h};case i.ArrayExpression:return f=[],t(n.elements,function(n){f.push(e.recurse(n))}),function(n,t,i,u){for(var e=[],o=0;o<f.length;++o)e.push(f[o](n,t,i,u));return r?{value:e}:e};case i.ObjectExpression:return f=[],t(n.properties,function(n){n.computed?f.push({key:e.recurse(n.key),computed:!0,value:e.recurse(n.value)}):f.push({key:n.key.type===i.Identifier?n.key.name:""+n.key.value,computed:!1,value:e.recurse(n.value)})}),function(n,t,i,u){for(var o={},e=0;e<f.length;++e)f[e].computed?o[f[e].key(n,t,i,u)]=f[e].value(n,t,i,u):o[f[e].key]=f[e].value(n,t,i,u);return r?{value:o}:o};case i.ThisExpression:return function(n){return r?{value:n}:n};case i.LocalsExpression:return function(n,t){return r?{value:t}:t};case i.NGValueParameter:return function(n,t,i){return r?{value:i}:i}}},"unary+":function(n,t){return function(i,r,f,e){var o=n(i,r,f,e);return o=u(o)?+o:0,t?{value:o}:o}},"unary-":function(n,t){return function(i,r,f,e){var o=n(i,r,f,e);return o=u(o)?-o:0,t?{value:o}:o}},"unary!":function(n,t){return function(i,r,u,f){var e=!n(i,r,u,f);return t?{value:e}:e}},"binary+":function(n,t,i){return function(r,u,f,e){var s=n(r,u,f,e),h=t(r,u,f,e),o=vc(s,h);return i?{value:o}:o}},"binary-":function(n,t,i){return function(r,f,e,o){var s=n(r,f,e,o),h=t(r,f,e,o),c=(u(s)?s:0)-(u(h)?h:0);return i?{value:c}:c}},"binary*":function(n,t,i){return function(r,u,f,e){var o=n(r,u,f,e)*t(r,u,f,e);return i?{value:o}:o}},"binary/":function(n,t,i){return function(r,u,f,e){var o=n(r,u,f,e)/t(r,u,f,e);return i?{value:o}:o}},"binary%":function(n,t,i){return function(r,u,f,e){var o=n(r,u,f,e)%t(r,u,f,e);return i?{value:o}:o}},"binary===":function(n,t,i){return function(r,u,f,e){var o=n(r,u,f,e)===t(r,u,f,e);return i?{value:o}:o}},"binary!==":function(n,t,i){return function(r,u,f,e){var o=n(r,u,f,e)!==t(r,u,f,e);return i?{value:o}:o}},"binary==":function(n,t,i){return function(r,u,f,e){var o=n(r,u,f,e)==t(r,u,f,e);return i?{value:o}:o}},"binary!=":function(n,t,i){return function(r,u,f,e){var o=n(r,u,f,e)!=t(r,u,f,e);return i?{value:o}:o}},"binary<":function(n,t,i){return function(r,u,f,e){var o=n(r,u,f,e)<t(r,u,f,e);return i?{value:o}:o}},"binary>":function(n,t,i){return function(r,u,f,e){var o=n(r,u,f,e)>t(r,u,f,e);return i?{value:o}:o}},"binary<=":function(n,t,i){return function(r,u,f,e){var o=n(r,u,f,e)<=t(r,u,f,e);return i?{value:o}:o}},"binary>=":function(n,t,i){return function(r,u,f,e){var o=n(r,u,f,e)>=t(r,u,f,e);return i?{value:o}:o}},"binary&&":function(n,t,i){return function(r,u,f,e){var o=n(r,u,f,e)&&t(r,u,f,e);return i?{value:o}:o}},"binary||":function(n,t,i){return function(r,u,f,e){var o=n(r,u,f,e)||t(r,u,f,e);return i?{value:o}:o}},"ternary?:":function(n,t,i,r){return function(u,f,e,o){var s=n(u,f,e,o)?t(u,f,e,o):i(u,f,e,o);return r?{value:s}:s}},value:function(n,t){return function(){return t?{context:undefined,name:undefined,value:n}:n}},identifier:function(n,t,i,r,u){return function(f,e){var o=e&&n in e?e:f,s;return r&&r!==1&&o&&!o[n]&&(o[n]={}),s=o?o[n]:undefined,t&&fi(s,u),i?{context:o,name:n,value:s}:s}},computedMember:function(n,t,i,r,u){return function(f,e,o,s){var c=n(f,e,o,s),h,l;return c!=null&&(h=t(f,e,o,s),h=cc(h),nr(h,u),r&&r!==1&&(cf(c),c&&!c[h]&&(c[h]={})),l=c[h],fi(l,u)),i?{context:c,name:h,value:l}:l}},nonComputedMember:function(n,t,i,r,u,f){return function(e,o,s,h){var c=n(e,o,s,h),l;return u&&u!==1&&(cf(c),c&&!c[t]&&(c[t]={})),l=c!=null?c[t]:undefined,(i||vf(t))&&fi(l,f),r?{context:c,name:t,value:l}:l}},inputs:function(n,t){return function(i,r,u,f){return f?f[t]:n(i,r,u)}}};af=function(n,t,r){this.lexer=n;this.$filter=t;this.options=r;this.ast=new i(n,r);this.astCompiler=r.csp?new gc(this.ast,t):new dc(this.ast,t)};af.prototype={constructor:af,parse:function(n){return this.astCompiler.compile(n,this.options.expensiveChecks)}};ni=l("$sce");ht={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"};il=l("$compile");d=n.document.createElement("a");io=ei(n.location.href);ul.$inject=["$document"];fl.$inject=["$provide"];var el=22,ol=".",uo="0";sl.$inject=["$locale"];hl.$inject=["$locale"];var bk={yyyy:nt("FullYear",4,0,!1,!0),yy:nt("FullYear",2,0,!0,!0),y:nt("FullYear",1,0,!1,!0),MMMM:eu("Month"),MMM:eu("Month",!0),MM:nt("Month",2,1),M:nt("Month",1,1),LLLL:eu("Month",!1,!0),dd:nt("Date",2),d:nt("Date",1),HH:nt("Hours",2),H:nt("Hours",1),hh:nt("Hours",2,-12),h:nt("Hours",1,-12),mm:nt("Minutes",2),m:nt("Minutes",1),ss:nt("Seconds",2),s:nt("Seconds",1),sss:nt("Milliseconds",3),EEEE:eu("Day"),EEE:eu("Day",!0),a:pk,Z:vk,ww:al(2),w:al(1),G:fo,GG:fo,GGG:fo,GGGG:wk},kk=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,dk=/^-?\d+$/;vl.$inject=["$locale"];yl=ct(a);pl=ct(ur);wl.$inject=["$parse"];bl=ct({restrict:"E",compile:function(n,t){if(!t.href&&!t.xlinkHref)return function(n,t){if(t[0].nodeName.toLowerCase()==="a"){var i=ut.call(t.prop("href"))==="[object SVGAnimatedString]"?"xlink:href":"href";t.on("click",function(n){t.attr(i)||n.preventDefault()})}}}});ou={};t(nu,function(n,t){function r(n,r,u){n.$watch(u[i],function(n){u.$set(t,!!n)})}if(n!=="multiple"){var i=wt("ng-"+t),u=r;n==="checked"&&(u=function(n,t,u){u.ngModel!==u[i]&&r(n,t,u)});ou[i]=function(){return{restrict:"A",priority:100,link:u}}}});t(le,function(n,t){ou[t]=function(){return{priority:100,link:function(n,i,r){if(t==="ngPattern"&&r.ngPattern.charAt(0)==="/"){var u=r.ngPattern.match(nv);if(u){r.$set("ngPattern",new RegExp(u[1],u[2]));return}}n.$watch(r[t],function(n){r.$set(t,n)})}}}});t(["src","srcset","href"],function(n){var t=wt("ng-"+n);ou[t]=function(){return{priority:99,link:function(i,r,u){var e=n,f=n;n==="href"&&ut.call(r.prop("href"))==="[object SVGAnimatedString]"&&(f="xlinkHref",u.$attr[f]="xlink:href",e=null);u.$observe(t,function(t){if(!t){n==="href"&&u.$set(f,null);return}u.$set(f,t);ti&&e&&r.prop(e,u[f])})}}}});su={$addControl:s,$$renameControl:td,$removeControl:s,$setValidity:s,$setDirty:s,$setPristine:s,$setSubmitted:s};oo="ng-submitted";kl.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var dl=function(n){return["$timeout","$parse",function(t,i){function r(n){return n===""?i('this[""]').assign:i(n).assign||s}return{name:"form",restrict:n?"EAC":"E",require:["form","^^?form"],controller:kl,compile:function(i,u){i.addClass(rr).addClass(lu);var f=u.name?"name":n&&u.ngForm?"ngForm":!1;return{pre:function(n,i,u,e){var o=e[0],c,l,h;if(!("action"in u)){c=function(t){n.$apply(function(){o.$commitViewValue();o.$setSubmitted()});t.preventDefault()};bu(i[0],"submit",c);i.on("$destroy",function(){t(function(){kr(i[0],"submit",c)},0,!1)})}l=e[1]||o.$$parentForm;l.$addControl(o);h=f?r(o.$name):s;f&&(h(n,o),u.$observe(f,function(t){o.$name!==t&&(h(n,undefined),o.$$parentForm.$$renameControl(o,t),h=r(o.$name),h(n,o))}));i.on("$destroy",function(){o.$$parentForm.$removeControl(o);h(n,undefined);v(o,su)})}}}}}]},id=dl(),rd=dl(!0),ud=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,fd=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,ed=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,od=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,gl=/^(\d{4,})-(\d{2})-(\d{2})$/,na=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,so=/^(\d{4,})-W(\d\d)$/,ta=/^(\d{4,})-(\d\d)$/,ia=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,sd="keydown wheel mousedown",ra=p();t("date,datetime-local,month,time,week".split(","),function(n){ra[n]=!0});ho={text:hd,date:hu("date",gl,pf(gl,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":hu("datetimelocal",na,pf(na,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:hu("time",ia,pf(ia,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:hu("week",so,cd,"yyyy-Www"),month:hu("month",ta,pf(ta,["yyyy","MM"]),"yyyy-MM"),number:ad,url:yd,email:pd,radio:wd,range:vd,checkbox:bd,hidden:s,button:s,submit:s,reset:s,file:s};var ea=["$browser","$sniffer","$filter","$parse",function(n,t,i,r){return{restrict:"E",require:["?ngModel"],link:{pre:function(u,f,e,o){if(o[0]){var s=a(e.type);s!=="range"||e.hasOwnProperty("ngInputRange")||(s="text");(ho[s]||ho.text)(u,f,e,o[0],t,n,i,r)}}}}}],kd=/^(true|false|\d+)$/,dd=function(){return{restrict:"A",priority:100,compile:function(n,t){return kd.test(t.ngValue)?function(n,t,i){i.$set("value",n.$eval(i.ngValue))}:function(n,t,i){n.$watch(i.ngValue,function(n){i.$set("value",n)})}}}},gd=["$compile",function(n){return{restrict:"AC",compile:function(t){return n.$$addBindingClass(t),function(t,i,u){n.$$addBindingInfo(i,u.ngBind);i=i[0];t.$watch(u.ngBind,function(n){i.textContent=r(n)?"":n})}}}}],ng=["$interpolate","$compile",function(n,t){return{compile:function(i){return t.$$addBindingClass(i),function(i,u,f){var e=n(u.attr(f.$attr.ngBindTemplate));t.$$addBindingInfo(u,e.expressions);u=u[0];f.$observe("ngBindTemplate",function(n){u.textContent=r(n)?"":n})}}}}],tg=["$sce","$parse","$compile",function(n,t,i){return{restrict:"A",compile:function(r,u){var f=t(u.ngBindHtml),e=t(u.ngBindHtml,function(t){return n.valueOf(t)});return i.$$addBindingClass(r),function(t,r,u){i.$$addBindingInfo(r,u.ngBindHtml);t.$watch(e,function(){var i=f(t);r.html(n.getTrustedHtml(i)||"")})}}}}],ig=ct({restrict:"A",require:"ngModel",link:function(n,t,i,r){r.$viewChangeListeners.push(function(){n.$eval(i.ngChange)})}});var rg=yo("",!0),ug=yo("Odd",0),fg=yo("Even",1),eg=tr({compile:function(n,t){t.$set("ngCloak",undefined);n.removeClass("ng-cloak")}}),og=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],oa={},sg={blur:!0,focus:!0};t("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(n){var t=wt("ng-"+n);oa[t]=["$parse","$rootScope",function(i,r){return{restrict:"A",compile:function(u,f){var e=i(f[t],null,!0);return function(t,i){i.on(n,function(i){var u=function(){e(t,{$event:i})};sg[n]&&r.$$phase?t.$evalAsync(u):t.$apply(u)})}}}}]});var hg=["$animate","$compile",function(n,t){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(i,r,u,f,e){var h,s,o;i.$watch(u.ngIf,function(i){i?s||e(function(i,f){s=f;i[i.length++]=t.$$createComment("end ngIf",u.ngIf);h={clone:i};n.enter(i,r.parent(),r)}):(o&&(o.remove(),o=null),s&&(s.$destroy(),s=null),h&&(o=wu(h.clone),n.leave(o).done(function(n){n!==!1&&(o=null)}),h=null))})}}}],cg=["$templateRequest","$anchorScroll","$animate",function(n,t,i){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:et.noop,compile:function(r,f){var o=f.ngInclude||f.src,s=f.onload||"",e=f.autoscroll;return function(r,f,h,c,l){var p=0,a,v,y,w=function(){v&&(v.remove(),v=null);a&&(a.$destroy(),a=null);y&&(i.leave(y).done(function(n){n!==!1&&(v=null)}),v=y,y=null)};r.$watch(o,function(o){var v=function(n){n!==!1&&u(e)&&(!e||r.$eval(e))&&t()},h=++p;o?(n(o,!0).then(function(n){var t,u;r.$$destroyed||h===p&&(t=r.$new(),c.template=n,u=l(t,function(n){w();i.enter(n,null,f).done(v)}),a=t,y=u,a.$emit("$includeContentLoaded",o),r.$eval(s))},function(){r.$$destroyed||h===p&&(w(),r.$emit("$includeContentError",o))}),r.$emit("$includeContentRequested",o)):(w(),c.template=null)})}}}}],lg=["$compile",function(t){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(i,r,u,f){if(ut.call(r[0]).match(/SVG/)){r.empty();t(ds(f.template,n.document).childNodes)(i,function(n){r.append(n)},{futureParentElement:r});return}r.html(f.template);t(r.contents())(i)}}}],ag=tr({priority:450,compile:function(){return{pre:function(n,t,i){n.$eval(i.ngInit)}}}}),vg=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(n,i,u,f){var e=i.attr(u.$attr.ngList)||", ",o=u.ngTrim!=="false",s=o?y(e):e,h=function(n){if(!r(n)){var i=[];return n&&t(n.split(s),function(n){n&&i.push(o?y(n):n)}),i}};f.$parsers.push(h);f.$formatters.push(function(n){return c(n)?n.join(e):undefined});f.$isEmpty=function(n){return!n||!n.length}}}},lu="ng-valid",sa="ng-invalid",rr="ng-pristine",wf="ng-dirty",po="ng-untouched",ha="ng-touched",ca="ng-pending",la="ng-empty",aa="ng-not-empty",au=l("ngModel"),yg=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(n,i,e,o,h,c,l,a,v,y){var k;this.$viewValue=Number.NaN;this.$modelValue=Number.NaN;this.$$rawModelValue=undefined;this.$validators={};this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$untouched=!0;this.$touched=!1;this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$error={};this.$$success={};this.$pending=undefined;this.$name=y(e.name||"",!1)(n);this.$$parentForm=su;var b=h(e.ngModel),tt=b.assign,nt=b,rt=tt,d=null,w,p=this;this.$$setOptions=function(n){if(p.$options=n,n&&n.getterSetter){var t=h(e.ngModel+"()"),i=h(e.ngModel+"($$$p)");nt=function(n){var i=b(n);return f(i)&&(i=t(n)),i};rt=function(n,t){f(b(n))?i(n,{$$$p:t}):tt(n,t)}}else if(!b.assign)throw au("nonassign","Expression '{0}' is non-assignable. Element: {1}",e.ngModel,pt(o));};this.$render=s;this.$isEmpty=function(n){return r(n)||n===""||n===null||n!==n};this.$$updateEmptyClasses=function(n){p.$isEmpty(n)?(c.removeClass(o,aa),c.addClass(o,la)):(c.removeClass(o,la),c.addClass(o,aa))};k=0;va({ctrl:this,$element:o,set:function(n,t){n[t]=!0},unset:function(n,t){delete n[t]},$animate:c});this.$setPristine=function(){p.$dirty=!1;p.$pristine=!0;c.removeClass(o,wf);c.addClass(o,rr)};this.$setDirty=function(){p.$dirty=!0;p.$pristine=!1;c.removeClass(o,rr);c.addClass(o,wf);p.$$parentForm.$setDirty()};this.$setUntouched=function(){p.$touched=!1;p.$untouched=!0;c.setClass(o,po,ha)};this.$setTouched=function(){p.$touched=!0;p.$untouched=!1;c.setClass(o,ha,po)};this.$rollbackViewValue=function(){l.cancel(d);p.$viewValue=p.$$lastCommittedViewValue;p.$render()};this.$validate=function(){if(!it(p.$modelValue)){var t=p.$$lastCommittedViewValue,n=p.$$rawModelValue,i=p.$valid,r=p.$modelValue,u=p.$options&&p.$options.allowInvalid;p.$$runValidators(n,t,function(t){u||i===t||(p.$modelValue=t?n:undefined,p.$modelValue!==r&&p.$$writeModelToScope())})}};this.$$runValidators=function(n,i,u){function h(){var n=p.$$parserName||"parse";if(r(w))f(n,null);else return w||(t(p.$validators,function(n,t){f(t,null)}),t(p.$asyncValidators,function(n,t){f(t,null)})),f(n,w),w;return!0}function c(){var r=!0;return(t(p.$validators,function(t,u){var e=t(n,i);r=r&&e;f(u,e)}),!r)?(t(p.$asyncValidators,function(n,t){f(t,null)}),!1):!0}function l(){var r=[],u=!0;t(p.$asyncValidators,function(t,e){var o=t(n,i);if(!yu(o))throw au("nopromise","Expected asynchronous validator to return a promise but got '{0}' instead.",o);f(e,undefined);r.push(o.then(function(){f(e,!0)},function(){u=!1;f(e,!1)}))});r.length?v.all(r).then(function(){e(u)},s):e(!0)}function f(n,t){o===k&&p.$setValidity(n,t)}function e(n){o===k&&u(n)}k++;var o=k;if(!h()){e(!1);return}if(!c()){e(!1);return}l()};this.$commitViewValue=function(){var n=p.$viewValue;(l.cancel(d),p.$$lastCommittedViewValue!==n||n===""&&p.$$hasNativeValidators)&&(p.$$updateEmptyClasses(n),p.$$lastCommittedViewValue=n,p.$pristine&&this.$setDirty(),this.$$parseAndValidate())};this.$$parseAndValidate=function(){function e(){p.$modelValue!==f&&p.$$writeModelToScope()}var o=p.$$lastCommittedViewValue,t=o,i,f,u;if(w=r(t)?undefined:!0,w)for(i=0;i<p.$parsers.length;i++)if(t=p.$parsers[i](t),r(t)){w=!1;break}it(p.$modelValue)&&(p.$modelValue=nt(n));f=p.$modelValue;u=p.$options&&p.$options.allowInvalid;p.$$rawModelValue=t;u&&(p.$modelValue=t,e());p.$$runValidators(t,p.$$lastCommittedViewValue,function(n){u||(p.$modelValue=n?t:undefined,e())})};this.$$writeModelToScope=function(){rt(n,p.$modelValue);t(p.$viewChangeListeners,function(n){try{n()}catch(t){i(t)}})};this.$setViewValue=function(n,t){p.$viewValue=n;(!p.$options||p.$options.updateOnDefault)&&p.$$debounceViewValueCommit(t)};this.$$debounceViewValueCommit=function(t){var r=0,f=p.$options,i;f&&u(f.debounce)&&(i=f.debounce,g(i)?r=i:g(i[t])?r=i[t]:g(i["default"])&&(r=i["default"]));l.cancel(d);r?d=l(function(){p.$commitViewValue()},r):a.$$phase?p.$commitViewValue():n.$apply(function(){p.$commitViewValue()})};n.$watch(function(){var t=nt(n);if(t!==p.$modelValue&&(p.$modelValue===p.$modelValue||t===t)){p.$modelValue=p.$$rawModelValue=t;w=undefined;for(var r=p.$formatters,u=r.length,i=t;u--;)i=r[u](i);p.$viewValue!==i&&(p.$$updateEmptyClasses(i),p.$viewValue=p.$$lastCommittedViewValue=i,p.$render(),p.$$runValidators(p.$modelValue,p.$viewValue,s))}return t})}],pg=["$rootScope",function(n){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:yg,priority:1,compile:function(t){return t.addClass(rr).addClass(po).addClass(lu),{pre:function(n,t,i,r){var u=r[0],f=r[1]||u.$$parentForm;u.$$setOptions(r[2]&&r[2].$options);f.$addControl(u);i.$observe("name",function(n){u.$name!==n&&u.$$parentForm.$$renameControl(u,n)});n.$on("$destroy",function(){u.$$parentForm.$removeControl(u)})},post:function(t,i,r,u){var f=u[0];if(f.$options&&f.$options.updateOn)i.on(f.$options.updateOn,function(n){f.$$debounceViewValueCommit(n&&n.type)});i.on("blur",function(){f.$touched||(n.$$phase?t.$evalAsync(f.$setTouched):t.$apply(f.$setTouched))})}}}}}],wg=/(\s+|^)default(\s+|$)/,bg=function(){return{restrict:"A",controller:["$scope","$attrs",function(n,t){var i=this;this.$options=dt(n.$eval(t.ngModelOptions));u(this.$options.updateOn)?(this.$options.updateOnDefault=!1,this.$options.updateOn=y(this.$options.updateOn.replace(wg,function(){return i.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}};var kg=tr({terminal:!0,priority:1e3}),dg=l("ngOptions"),gg=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([$\w][$\w]*)|(?:\(\s*([$\w][$\w]*)\s*,\s*([$\w][$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,nn=["$compile","$document","$parse",function(i,r,f){function h(n,t,i){function tt(n,t,i,r,u){this.selectValue=n;this.viewValue=t;this.label=i;this.group=r;this.disabled=u}function w(n){var t,i;if(!s&&ii(n))t=n;else{t=[];for(i in n)n.hasOwnProperty(i)&&i.charAt(0)!=="$"&&t.push(i)}return t}var r=n.match(gg);if(!r)throw dg("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",n,pt(t));var o=r[5]||r[7],s=r[6],l=/ as /.test(r[0])&&r[1],u=r[9],b=f(r[2]?r[1]:o),k=l&&f(l),d=k||b,g=u&&f(u),h=u?function(n,t){return g(i,t)}:function(n){return ai(n)},a=function(n,t){return h(n,c(n,t))},v=f(r[2]||r[1]),nt=f(r[3]||""),y=f(r[4]||""),p=f(r[8]),e={},c=s?function(n,t){return e[s]=t,e[o]=n,e}:function(n){return e[o]=n,e};return{trackBy:u,getTrackByValue:a,getWatchables:f(p,function(n){var u=[],f,o,t,a,p;for(n=n||[],f=w(n),o=f.length,t=0;t<o;t++){var s=n===f?t:f[t],l=n[s],e=c(l,s),b=h(l,e);u.push(b);(r[2]||r[1])&&(a=v(i,e),u.push(a));r[4]&&(p=y(i,e),u.push(p))}return u}),getOptions:function(){for(var o=[],r={},f=p(i)||[],e=w(f),g=e.length,t=0;t<g;t++){var s=f===e?t:e[t],it=f[s],n=c(it,s),l=d(i,n),b=h(l,n),rt=v(i,n),ut=nt(i,n),ft=y(i,n),k=new tt(b,l,rt,ut,ft);o.push(k);r[b]=k}return{items:o,selectValueMap:r,getOptionFromViewValue:function(n){return r[a(n)]},getViewValueFromOption:function(n){return u?dt(n.viewValue):n.viewValue}}}}}function a(n,f,s,a){function ot(n,t){var i=o.cloneNode(!1);t.appendChild(i);at(n,i)}function at(n,t){n.element=t;t.disabled=n.disabled;n.label!==t.label&&(t.label=n.label,t.textContent=n.label);t.value=n.selectValue}function st(){var r=y&&w.readValue(),n,t,e,i,o;if(y)for(n=y.items.length-1;n>=0;n--)t=y.items[n],u(t.group)?ff(t.element.parentNode):ff(t.element);y=b.getOptions();e={};d&&f.prepend(v);y.items.forEach(function(n){var t;u(n.group)?(t=e[n.group],t||(t=l.cloneNode(!1),it.appendChild(t),t.label=n.group===null?"null":n.group,e[n.group]=t),ot(n,t)):ot(n,it)});f[0].appendChild(it);p.$render();p.$isEmpty(r)||(i=w.readValue(),o=b.trackBy||et,(o?ft(r,i):r===i)||(p.$setViewValue(i),p.$render()))}for(var w=a[0],p=a[1],et=s.multiple,v,nt=0,tt=f.children(),ht=tt.length;nt<ht;nt++)if(tt[nt].value===""){v=tt.eq(nt);break}var d=!!v,k=!1,g=e(o.cloneNode(!1));g.val("?");var y,b=h(s.ngOptions,f,n),it=r[0].createDocumentFragment(),ct=function(){d||f.prepend(v);f.val("");k&&(v.prop("selected",!0),v.attr("selected",!0))},rt=function(){d?k&&v.removeAttr("selected"):v.remove()},lt=function(){f.prepend(g);f.val("?");g.prop("selected",!0);g.attr("selected",!0)},ut=function(){g.remove()};et?(p.$isEmpty=function(n){return!n||n.length===0},w.writeValue=function(n){y.items.forEach(function(n){n.element.selected=!1});n&&n.forEach(function(n){var t=y.getOptionFromViewValue(n);t&&(t.element.selected=!0)})},w.readValue=function(){var i=f.val()||[],n=[];return t(i,function(t){var i=y.selectValueMap[t];i&&!i.disabled&&n.push(y.getViewValueFromOption(i))}),n},b.trackBy&&n.$watchCollection(function(){if(c(p.$viewValue))return p.$viewValue.map(function(n){return b.getTrackByValue(n)})},function(){p.$render()})):(w.writeValue=function(n){var i=y.selectValueMap[f.val()],t=y.getOptionFromViewValue(n);i&&i.element.removeAttribute("selected");t?(f[0].value!==t.selectValue&&(ut(),rt(),f[0].value=t.selectValue,t.element.selected=!0),t.element.setAttribute("selected","selected")):n===null||d?(ut(),ct()):(rt(),lt())},w.readValue=function(){var n=y.selectValueMap[f.val()];return n&&!n.disabled?(rt(),ut(),y.getViewValueFromOption(n)):null},b.trackBy&&n.$watch(function(){return b.getTrackByValue(p.$viewValue)},function(){p.$render()}));d?(v.remove(),i(v)(n),v[0].nodeType===wr?(k=!1,w.registerOption=function(n,t){if(t.val()===""){k=!0;v=t;v.removeClass("ng-scope");p.$render();t.on("$destroy",function(){v=undefined;k=!1})}}):(v.removeClass("ng-scope"),k=!0)):v=e(o.cloneNode(!1));f.empty();st();n.$watchCollection(b.getWatchables,st)}var o=n.document.createElement("option"),l=n.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(n,t,i,r){r[0].registerOption=s},post:a}}}],tn=["$locale","$interpolate","$log",function(n,i,u){var f=/{}/g,e=/^when(Minus)?(.+)$/;return{link:function(o,h,c){function d(n){h.text(n||"")}var p=c.count,w=c.$attr.when&&h.attr(c.$attr.when),b=c.offset||0,l=o.$eval(w)||{},k={},g=i.startSymbol(),nt=i.endSymbol(),tt=g+p+"-"+b+nt,v=et.noop,y;t(c,function(n,t){var i=e.exec(t),r;i&&(r=(i[1]?"-":"")+a(i[2]),l[r]=h.attr(c.$attr[t]))});t(l,function(n,t){k[t]=i(n.replace(f,tt))});o.$watch(p,function(t){var i=parseFloat(t),e=it(i),f;e||i in l||(i=n.pluralCat(i-b));i===y||e&&it(y)||(v(),f=k[i],r(f)?(t!=null&&u.debug("ngPluralize: no rule defined for '"+i+"' in "+w),v=s,d()):v=o.$watch(f,d),y=i)})}}}],rn=["$parse","$animate","$compile",function(n,i,r){var f="$$NG_REMOVED",u=l("ngRepeat"),e=function(n,t,i,r,u,f,e){n[i]=r;u&&(n[u]=f);n.$index=t;n.$first=t===0;n.$last=t===e-1;n.$middle=!(n.$first||n.$last);n.$odd=!(n.$even=(t&1)==0)},o=function(n){return n.clone[0]},s=function(n){return n.clone[n.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(h,c){var w=c.ngRepeat,rt=r.$$createComment("end ngRepeat",w),l=w.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/),b,v,k,d,tt,it,y;if(!l)throw u("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",w);var g=l[1],ut=l[2],a=l[3],nt=l[4];if(l=g.match(/^(?:(\s*[$\w]+)|\(\s*([$\w]+)\s*,\s*([$\w]+)\s*\))$/),!l)throw u("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",g);if(b=l[3]||l[1],v=l[2],a&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(a)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(a)))throw u("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",a);return y={$id:ai},nt?k=n(nt):(tt=function(n,t){return ai(t)},it=function(n){return n}),function(n,r,h,c,l){k&&(d=function(t,i,r){return v&&(y[v]=t),y[b]=i,y.$index=r,k(n,y)});var g=p();n.$watchCollection(ut,function(h){var c,pt,st=r[0],ft,ht=p(),et,ut,ot,k,yt,nt,y,ct,lt,at,wt;if(a&&(n[a]=h),ii(h))nt=h,yt=d||tt;else{yt=d||it;nt=[];for(at in h)vt.call(h,at)&&at.charAt(0)!=="$"&&nt.push(at)}for(et=nt.length,ct=new Array(et),c=0;c<et;c++)if(ut=h===nt?c:nt[c],ot=h[ut],k=yt(ut,ot,c),g[k])y=g[k],delete g[k],ht[k]=y,ct[c]=y;else if(ht[k]){t(ct,function(n){n&&n.scope&&(g[n.id]=n)});throw u("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",w,k,ot);}else ct[c]={id:k,scope:undefined,clone:undefined},ht[k]=!0;for(wt in g){if(y=g[wt],lt=wu(y.clone),i.leave(lt),lt[0].parentNode)for(c=0,pt=lt.length;c<pt;c++)lt[c][f]=!0;y.scope.$destroy()}for(c=0;c<et;c++)if(ut=h===nt?c:nt[c],ot=h[ut],y=ct[c],y.scope){ft=st;do ft=ft.nextSibling;while(ft&&ft[f]);o(y)!==ft&&i.move(wu(y.clone),null,st);st=s(y);e(y.scope,c,b,ot,v,ut,et)}else l(function(n,t){y.scope=t;var r=rt.cloneNode(!1);n[n.length++]=r;i.enter(n,null,st);st=r;y.clone=n;ht[y.id]=y;e(y.scope,c,b,ot,v,ut,et)});g=ht})}}}}],pa="ng-hide",wa="ng-hide-animate",un=["$animate",function(n){return{restrict:"A",multiElement:!0,link:function(t,i,r){t.$watch(r.ngShow,function(t){n[t?"removeClass":"addClass"](i,pa,{tempClasses:wa})})}}}],fn=["$animate",function(n){return{restrict:"A",multiElement:!0,link:function(t,i,r){t.$watch(r.ngHide,function(t){n[t?"addClass":"removeClass"](i,pa,{tempClasses:wa})})}}}],en=tr(function(n,i,r){n.$watch(r.ngStyle,function(n,r){r&&n!==r&&t(r,function(n,t){i.css(t,"")});n&&i.css(n)},!0)}),on=["$animate","$compile",function(n,i){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(r,u,f,e){var l=f.ngSwitch||f.on,c=[],h=[],o=[],s=[],a=function(n,t){return function(i){i!==!1&&n.splice(t,1)}};r.$watch(l,function(r){for(var u,f,l,v;o.length;)n.cancel(o.pop());for(u=0,f=s.length;u<f;++u)l=wu(h[u].clone),s[u].$destroy(),v=o[u]=n.leave(l),v.done(a(o,u));h.length=0;s.length=0;(c=e.cases["!"+r]||e.cases["?"])&&t(c,function(t){t.transclude(function(r,u){var f,e;s.push(u);f=t.element;r[r.length++]=i.$$createComment("end ngSwitchWhen");e={clone:r};h.push(e);n.enter(r,f.parent(),f)})})})}}}],sn=tr({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(n,i,r,u,f){var e=r.ngSwitchWhen.split(r.ngSwitchWhenSeparator).sort().filter(function(n,t,i){return i[t-1]!==n});t(e,function(n){u.cases["!"+n]=u.cases["!"+n]||[];u.cases["!"+n].push({transclude:f,element:i})})}}),hn=tr({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(n,t,i,r,u){r.cases["?"]=r.cases["?"]||[];r.cases["?"].push({transclude:u,element:t})}}),cn=l("ngTransclude"),ln=["$compile",function(n){return{restrict:"EAC",terminal:!0,compile:function(t){var i=n(t.contents());return t.empty(),function(n,t,r,u,f){function s(n,i){n.length?t.append(n):(o(),i.$destroy())}function o(){i(n,function(n){t.append(n)})}if(!f)throw cn("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",pt(t));r.ngTransclude===r.$attr.ngTransclude&&(r.ngTransclude="");var e=r.ngTransclude||r.ngTranscludeSlot;f(s,null,e);e&&!f.isSlotFilled(e)&&o()}}}}],an=["$templateCache",function(n){return{restrict:"E",terminal:!0,compile:function(t,i){if(i.type==="text/ng-template"){var r=i.id,u=t[0].text;n.put(r,u)}}}}],vn={$setViewValue:s,$render:s};var pn=["$element","$scope",function(t,i){var r=this,f=new gi;r.ngModelCtrl=vn;r.unknownOption=e(n.document.createElement("option"));r.renderUnknownOption=function(n){var i="? "+ai(n)+" ?";r.unknownOption.val(i);t.prepend(r.unknownOption);t.val(i)};i.$on("$destroy",function(){r.renderUnknownOption=s});r.removeUnknownOption=function(){r.unknownOption.parent()&&r.unknownOption.remove()};r.readValue=function(){return r.removeUnknownOption(),t.val()};r.writeValue=function(n){r.hasOption(n)?(r.removeUnknownOption(),t.val(n),n===""&&r.emptyOption.prop("selected",!0)):n==null&&r.emptyOption?(r.removeUnknownOption(),t.val("")):r.renderUnknownOption(n)};r.addOption=function(n,t){if(t[0].nodeType!==wr){di(n,'"option value"');n===""&&(r.emptyOption=t);var i=f.get(n)||0;f.put(n,i+1);r.ngModelCtrl.$render();yn(t)}};r.removeOption=function(n){var t=f.get(n);t&&(t===1?(f.remove(n),n===""&&(r.emptyOption=undefined)):f.put(n,t-1))};r.hasOption=function(n){return!!f.get(n)};r.registerOption=function(n,t,i,f,e){if(f){var o;i.$observe("value",function(n){u(o)&&r.removeOption(o);o=n;r.addOption(n,t)})}else e?n.$watch(e,function(n,u){i.$set("value",n);u!==n&&r.removeOption(u);r.addOption(n,t)}):r.addOption(i.value,t);t.on("$destroy",function(){r.removeOption(i.value);r.ngModelCtrl.$render()})}}],wn=function(){function n(n,i,r,f){var e=f[1],o,h,s;if(e){o=f[0];o.ngModelCtrl=e;i.on("change",function(){n.$apply(function(){e.$setViewValue(o.readValue())})});r.multiple&&(o.readValue=function(){var n=[];return t(i.find("option"),function(t){t.selected&&n.push(t.value)}),n},o.writeValue=function(n){var r=new gi(n);t(i.find("option"),function(n){n.selected=u(r.get(n.value))})},s=NaN,n.$watch(function(){s!==e.$viewValue||ft(h,e.$viewValue)||(h=st(e.$viewValue),e.$render());s=e.$viewValue}),e.$isEmpty=function(n){return!n||n.length===0})}}function i(n,t,i,r){var u=r[1],f;u&&(f=r[0],u.$render=function(){f.writeValue(u.$viewValue)})}return{restrict:"E",require:["select","?ngModel"],controller:pn,priority:1,link:{pre:n,post:i}}},bn=["$interpolate",function(n){return{restrict:"E",priority:100,compile:function(t,i){var r,f;return u(i.ngValue)?r=!0:u(i.value)?r=n(i.value,!0):(f=n(t.text(),!0),f||i.$set("value",t.text())),function(n,t,i){var u="$selectController",e=t.parent(),o=e.data(u)||e.parent().data(u);o&&o.registerOption(n,t,i,r,f)}}}}],ba=function(){return{restrict:"A",require:"?ngModel",link:function(n,t,i,r){r&&(i.required=!0,r.$validators.required=function(n,t){return!i.required||!r.$isEmpty(t)},i.$observe("required",function(){r.$validate()}))}}},ka=function(){return{restrict:"A",require:"?ngModel",link:function(n,t,i,u){if(u){var f,e=i.ngPattern||i.pattern;i.$observe("pattern",function(n){if(o(n)&&n.length>0&&(n=new RegExp("^"+n+"$")),n&&!n.test)throw l("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",e,n,pt(t));f=n||undefined;u.$validate()});u.$validators.pattern=function(n,t){return u.$isEmpty(t)||r(f)||f.test(t)}}}}},da=function(){return{restrict:"A",require:"?ngModel",link:function(n,t,i,r){if(r){var u=-1;i.$observe("maxlength",function(n){var t=tt(n);u=it(t)?-1:t;r.$validate()});r.$validators.maxlength=function(n,t){return u<0||r.$isEmpty(t)||t.length<=u}}}}},ga=function(){return{restrict:"A",require:"?ngModel",link:function(n,t,i,r){if(r){var u=0;i.$observe("minlength",function(n){u=tt(n)||0;r.$validate()});r.$validators.minlength=function(n,t){return r.$isEmpty(t)||t.length>=u}}}}};if(n.angular.bootstrap){n.console&&console.log("WARNING: Tried to load angular more than once.");return}dv();iy(et);et.module("ngLocale",[],["$provide",function(n){function i(n){n=n+"";var t=n.indexOf(".");return t==-1?0:n.length-t-1}function r(n,t){var r=t,u,f;return undefined===r&&(r=Math.min(i(n),3)),u=Math.pow(10,r),f=(n*u|0)%u,{v:r,f:f}}var t={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};n.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],STANDALONEMONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a",short:"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(n,i){var u=n|0,f=r(n,i);return u==1&&f.v==0?t.ONE:t.OTHER}})}]);e(n.document).ready(function(){wv(n.document,ls)})}(window);window.angular.$$csp().noInlineStyle||window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}<\/style>'),function(n,t){"use strict";function si(n,t,i){if(!n)throw gi("areq","Argument '{0}' is {1}",t||"?",i||"required");return n}function hi(n,t){return!n&&!t?"":n?t?(c(n)&&(n=n.join(" ")),c(t)&&(t=t.join(" ")),n+" "+t):n:t}function nr(n){var t={};return n&&(n.to||n.from)&&(t.to=n.to,t.from=n.from),t}function h(n,t,r){var u="";return n=c(n)?n:n&&o(n)&&n.length?n.split(/\s+/):[],i(n,function(n,i){n&&n.length>0&&(u+=i>0?" ":"",u+=r?t+n:n+t)}),u}function tr(n,t){var i=n.indexOf(t);t>=0&&n.splice(i,1)}function ir(n){if(n instanceof u)switch(n.length){case 0:return n;case 1:if(n[0].nodeType===b)return n;break;default:return u(vt(n))}if(n.nodeType===b)return u(n)}function vt(n){var t,i;if(!n[0])return n;for(t=0;t<n.length;t++)if(i=n[t],i.nodeType===b)return i}function rr(n,t,r){i(t,function(t){n.addClass(t,r)})}function ur(n,t,r){i(t,function(t){n.removeClass(t,r)})}function k(n){return function(t,i){i.addClass&&(rr(n,t,i.addClass),i.addClass=null);i.removeClass&&(ur(n,t,i.removeClass),i.removeClass=null)}}function d(n){if(n=n||{},!n.$$prepared){var t=n.domOperation||f;n.domOperation=function(){n.$$domOperationFired=!0;t();t=f};n.$$prepared=!0}return n}function y(n,t){ci(n,t);li(n,t)}function ci(n,t){t.from&&(n.css(t.from),t.from=null)}function li(n,t){t.to&&(n.css(t.to),t.to=null)}function g(n,t,i){var r=t.options||{},u=i.options||{},s=(r.addClass||"")+" "+(u.addClass||""),h=(r.removeClass||"")+" "+(u.removeClass||""),e=fr(n.attr("class"),s,h),o;return u.preparationClasses&&(r.preparationClasses=tt(u.preparationClasses,r.preparationClasses),delete u.preparationClasses),o=r.domOperation!==f?r.domOperation:null,dt(r,u),o&&(r.domOperation=o),r.addClass=e.addClass?e.addClass:null,r.removeClass=e.removeClass?e.removeClass:null,t.addClass=r.addClass,t.removeClass=r.removeClass,r}function fr(n,t,r){function s(n){o(n)&&(n=n.split(" "));var t={};return i(n,function(n){n.length&&(t[n]=!0)}),t}var e=1,h=-1,f={},u;return n=s(n),t=s(t),i(t,function(n,t){f[t]=e}),r=s(r),i(r,function(n,t){f[t]=f[t]===e?null:h}),u={addClass:"",removeClass:""},i(f,function(t,i){var r,f;t===e?(r="addClass",f=!n[i]||n[i+et]):t===h&&(r="removeClass",f=n[i]||n[i+ft]);f&&(u[r].length&&(u[r]+=" "),u[r]+=i)}),u}function r(n){return n instanceof u?n[0]:n}function er(n,t,i){var r="";t&&(r=h(t,ti,!0));i.addClass&&(r=tt(r,h(i.addClass,ft)));i.removeClass&&(r=tt(r,h(i.removeClass,et)));r.length&&(i.preparationClasses=r,n.addClass(r))}function or(n,t){t.preparationClasses&&(n.removeClass(t.preparationClasses),t.preparationClasses=null);t.activeClasses&&(n.removeClass(t.activeClasses),t.activeClasses=null)}function nt(n,t){var i=t?"-"+t+"s":"";return p(n,[v,i]),[v,i]}function yt(n,t){var i=t?"paused":"",r=s+ki;return p(n,[r,i]),[r,i]}function p(n,t){var i=t[0],r=t[1];n.style[i]=r}function tt(n,t){return n?t?n+" "+t:n:t}function yr(n){return[at,n+"s"]}function pt(n,t){var i=t?lt:v;return[i,n+"s"]}function ai(n,t,r){var u=Object.create(null),f=n.getComputedStyle(t)||{};return i(r,function(n,t){var i=f[n],r;i&&(r=i.charAt(0),(r==="-"||r==="+"||r>=0)&&(i=pr(i)),i===0&&(i=null),u[t]=i)}),u}function pr(n){var t=0,r=n.split(/\s*,\s*/);return i(r,function(n){n.charAt(n.length-1)==="s"&&(n=n.substring(0,n.length-1));n=parseFloat(n)||0;t=t?Math.max(n,t):n}),t}function wt(n){return n===0||n!=null}function vi(n,t){var i=e,r=n+"s";return t?i+=ct:r+=" linear all",[i,r]}function yi(){var n=Object.create(null);return{flush:function(){n=Object.create(null)},count:function(t){var i=n[t];return i?i.total:0},get:function(t){var i=n[t];return i&&i.value},put:function(t,i){n[t]?n[t].total++:n[t]={total:1,value:i}}}}function pi(n,t,r){i(r,function(i){n[i]=gt(n[i])?n[i]:t.style.getPropertyValue(i)})}var b=1,ft="-add",et="-remove",ti="ng-",wi="-active",bi="-prepare",ii="ng-animate",ot="$$ngAnimateChildren",ri="",e,st,s,ht;n.ontransitionend===undefined&&n.onwebkittransitionend!==undefined?(ri="-webkit-",e="WebkitTransition",st="webkitTransitionEnd transitionend"):(e="transition",st="transitionend");n.onanimationend===undefined&&n.onwebkitanimationend!==undefined?(ri="-webkit-",s="WebkitAnimation",ht="webkitAnimationEnd animationend"):(s="animation",ht="animationend");var ct="Duration",ui="Property",fi="Delay",ei="TimingFunction",ki="PlayState",di=9999,lt=s+fi,at=s+ct,v=e+fi,oi=e+ct,gi=t.$$minErr("ng");var sr=["$$rAF",function(n){function r(n){i=i.concat(n);u()}function u(){var f,r;if(i.length){for(f=i.shift(),r=0;r<f.length;r++)f[r]();t||n(function(){t||u()})}}var i,t;return i=r.queue=[],r.waitUntilQuiet=function(i){t&&t();t=n(function(){t=null;i();u()})},r}],hr=["$interpolate",function(n){return{link:function(t,i,r){function f(n){n=n==="on"||n==="true";i.data(ot,n)}var u=r.ngAnimateChildren;o(u)&&u.length===0?i.data(ot,!0):(f(n(u)(t)),r.$observe("ngAnimateChildren",f))}}}],l="$$animateCss",w=1e3,cr=3,lr=1.5,ar={transitionDuration:oi,transitionDelay:v,transitionProperty:e+ui,animationDuration:at,animationDelay:lt,animationIterationCount:s+"IterationCount"},vr={transitionDuration:oi,transitionDelay:v,animationDuration:at,animationDelay:lt};var wr=["$animateProvider",function(){var n=yi(),t=yi();this.$get=["$window","$$jqLite","$$AnimateRunner","$timeout","$$forceReflow","$sniffer","$$rAFScheduler","$$animateQueue",function(u,o,a,v,b,g,tt,it){function ot(n,t){var i="$$ngAnimateParentKey",r=n.parentNode,u=r[i]||(r[i]=++at);return u+"-"+n.getAttribute("class")+"-"+t}function vt(t,i,r,f){var e=n.get(r);return e||(e=ai(u,t,f),e.animationIterationCount==="infinite"&&(e.animationIterationCount=1)),n.put(r,e),e}function bt(i,r,f,e){var s,c;return n.count(f)>0&&(s=t.get(f),s||(c=h(r,"-stagger"),o.addClass(i,c),s=ai(u,i,e),s.animationDuration=Math.max(s.animationDuration,0),s.transitionDuration=Math.max(s.transitionDuration,0),o.removeClass(i,c),t.put(f,s))),s||{}}function ct(i){rt.push(i);tt.waitUntilQuiet(function(){var r,i;for(n.flush(),t.flush(),r=b(),i=0;i<rt.length;i++)rt[i](r);rt.length=0})}function lt(n,t,i){var r=vt(n,t,i,ar),u=r.animationDelay,f=r.transitionDelay;return r.maxDelay=u&&f?Math.max(u,f):u||f,r.maxDuration=Math.max(r.animationDuration*r.animationIterationCount,r.transitionDuration),r}var ut=k(o),at=0,rt=[];return function(t,u){function or(){ni()}function uu(){ni(!0)}function ni(n){if(!ki&&(!hr||!ri)){ki=!0;ri=!1;b.$$skipPreparationClasses||o.removeClass(t,si);o.removeClass(t,iu);yt(tt,!1);nt(tt,!1);i(at,function(n){tt.style[n[0]]=""});ut(t,b);y(t,b);Object.keys(bi).length&&i(bi,function(n,t){n?tt.style.setProperty(t,n):tt.style.removeProperty(t)});b.onDone&&b.onDone();fi&&fi.length&&t.off(fi.join(" "),eu);var r=t.data(l);r&&(v.cancel(r[0].timer),t.removeData(l));hi&&hi.complete(!n)}}function fu(n){k.blockTransition&&nt(tt,n);k.blockKeyframeAnimation&&yt(tt,!!n)}function sr(){return hi=new a({end:or,cancel:uu}),ct(f),ni(),{$$willAnimate:!1,start:function(){return hi},end:or}}function eu(n){n.stopPropagation();var t=n.originalEvent||n,i=t.$manualTimeStamp||Date.now(),r=parseFloat(t.elapsedTime.toFixed(cr));Math.max(i-pr,0)>=rr&&r>=vt&&(hr=!0,ni())}function cu(){function u(){var n,u,c,p;if(!ki){if(fu(!1),i(at,function(n){var t=n[0],i=n[1];tt.style[t]=i}),ut(t,b),o.addClass(t,iu),k.recalculateTimingStyles){if(gi=tt.className+" "+si,yi=ot(tt,gi),rt=lt(tt,gi,yi),gt=rt.maxDelay,ai=Math.max(gt,0),vt=rt.maxDuration,vt===0){ni();return}k.hasTransitions=rt.transitionDuration>0;k.hasAnimations=rt.animationDuration>0}k.applyAnimationDelay&&(gt=typeof b.delay!="boolean"&&wt(b.delay)?parseFloat(b.delay):gt,ai=Math.max(gt,0),rt.animationDelay=gt,ii=pt(gt,!0),at.push(ii),tt.style[ii[0]]=ii[1]);rr=ai*w;ar=vt*w;b.easing&&(u=b.easing,k.hasTransitions&&(n=e+ei,at.push([n,u]),tt.style[n]=u),k.hasAnimations&&(n=s+ei,at.push([n,u]),tt.style[n]=u));rt.transitionDuration&&fi.push(st);rt.animationDuration&&fi.push(ht);pr=Date.now();var a=rr+lr*ar,y=pr+a,r=t.data(l)||[],h=!0;if(r.length&&(c=r[0],h=y>c.expectedEndTime,h?v.cancel(c.timer):r.push(ni)),h&&(p=v(f,a,!1),r[0]={timer:p,expectedEndTime:y},r.push(ni),t.data(l,r)),fi.length)t.on(fi.join(" "),eu);b.to&&(b.cleanupStyles&&pi(bi,tt,Object.keys(b.to)),li(t,b))}}function f(){var i=t.data(l),n;if(i){for(n=1;n<i.length;n++)i[n]();t.removeData(l)}}if(!ki){if(!tt.parentNode){ni();return}var n=function(n){if(hr)ri&&n&&(ri=!1,ni());else if(ri=!n,rt.animationDuration){var t=yt(tt,ri);ri?at.push(t):tr(at,t)}},r=er>0&&(rt.transitionDuration&&dt.transitionDuration===0||rt.animationDuration&&dt.animationDuration===0)&&Math.max(dt.animationDelay,dt.transitionDelay);r?v(u,Math.floor(r*er*w),!1):u();ir.resume=function(){n(!0)};ir.pause=function(){n(!1)}}}var b=u||{},bi,tt,yi,dt,br,fr,kr,dr,gr,er,nu,rt,gt,k,ii;if(b.$$prepared||(b=d(kt(b))),bi={},tt=r(t),!tt||!tt.parentNode||!it.enabled())return sr();var at=[],ou=t.attr("class"),tu=nr(b),ki,ri,hr,hi,ir,ai,rr,vt,ar,pr,fi=[];if(b.duration===0||!g.animations&&!g.transitions)return sr();var ur=b.event&&c(b.event)?b.event.join(" "):b.event,su=ur&&b.structural,wr="",oi="";su?wr=h(ur,ti,!0):ur&&(wr=ur);b.addClass&&(oi+=h(b.addClass,ft));b.removeClass&&(oi.length&&(oi+=" "),oi+=h(b.removeClass,et));b.applyClassesEarly&&oi.length&&ut(t,b);var si=[wr,oi].join(" ").trim(),gi=ou+" "+si,iu=h(si,wi),ru=tu.to&&Object.keys(tu.to).length>0,hu=(b.keyframeStyle||"").length>0;return!hu&&!ru&&!si?sr():(b.stagger>0?(br=parseFloat(b.stagger),dt={transitionDelay:br,animationDelay:br,transitionDuration:0,animationDuration:0}):(yi=ot(tt,gi),dt=bt(tt,si,yi,vr)),b.$$skipPreparationClasses||o.addClass(t,si),b.transitionStyle&&(kr=[e,b.transitionStyle],p(tt,kr),at.push(kr)),b.duration>=0&&(fr=tt.style[e].length>0,dr=vi(b.duration,fr),p(tt,dr),at.push(dr)),b.keyframeStyle&&(gr=[s,b.keyframeStyle],p(tt,gr),at.push(gr)),er=dt?b.staggerIndex>=0?b.staggerIndex:n.count(yi):0,nu=er===0,nu&&!b.skipBlocking&&nt(tt,di),rt=lt(tt,gi,yi),gt=rt.maxDelay,ai=Math.max(gt,0),vt=rt.maxDuration,k={},k.hasTransitions=rt.transitionDuration>0,k.hasAnimations=rt.animationDuration>0,k.hasTransitionAll=k.hasTransitions&&rt.transitionProperty==="all",k.applyTransitionDuration=ru&&(k.hasTransitions&&!k.hasTransitionAll||k.hasAnimations&&!k.hasTransitions),k.applyAnimationDuration=b.duration&&k.hasAnimations,k.applyTransitionDelay=wt(b.delay)&&(k.applyTransitionDuration||k.hasTransitions),k.applyAnimationDelay=wt(b.delay)&&k.hasAnimations,k.recalculateTimingStyles=oi.length>0,(k.applyTransitionDuration||k.applyAnimationDuration)&&(vt=b.duration?parseFloat(b.duration):vt,k.applyTransitionDuration&&(k.hasTransitions=!0,rt.transitionDuration=vt,fr=tt.style[e+ui].length>0,at.push(vi(vt,fr))),k.applyAnimationDuration&&(k.hasAnimations=!0,rt.animationDuration=vt,at.push(yr(vt)))),vt===0&&!k.recalculateTimingStyles)?sr():(b.delay!=null&&(typeof b.delay!="boolean"&&(ii=parseFloat(b.delay),ai=Math.max(ii,0)),k.applyTransitionDelay&&at.push(pt(ii)),k.applyAnimationDelay&&at.push(pt(ii,!0))),b.duration==null&&rt.transitionDuration>0&&(k.recalculateTimingStyles=k.recalculateTimingStyles||nu),rr=ai*w,ar=vt*w,b.skipBlocking||(k.blockTransition=rt.transitionDuration>0,k.blockKeyframeAnimation=rt.animationDuration>0&&dt.animationDelay>0&&dt.animationDuration===0),b.from&&(b.cleanupStyles&&pi(bi,tt,Object.keys(b.from)),ci(t,b)),k.blockTransition||k.blockKeyframeAnimation?fu(vt):b.skipBlocking||nt(tt,!1),{$$willAnimate:!0,end:or,start:function(){if(!ki)return ir={end:or,cancel:uu,resume:null,pause:null},hi=new a(ir),ct(cu),hi}})}}]}],br=["$$animationProvider",function(n){function c(n){return n.parentNode&&n.parentNode.nodeType===11}n.drivers.push("$$animateCssDriver");var t="ng-animate-shim",s="ng-anchor",e="ng-anchor-out",h="ng-anchor-in";this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$sniffer","$$jqLite","$document",function(n,l,a,v,y,p,w){function g(n){return n.replace(/\bng-\S+\b/g,"")}function nt(n,t){return o(n)&&(n=n.split(" ")),o(t)&&(t=t.split(" ")),n.filter(function(n){return t.indexOf(n)===-1}).join(" ")}function rt(f,o,c){function d(n){var t={},u=r(n).getBoundingClientRect();return i(["width","height","top","left"],function(n){var i=u[n];switch(n){case"top":i+=b.scrollTop;break;case"left":i+=b.scrollLeft}t[n]=Math.floor(i)+"px"}),t}function ut(){var t=n(v,{addClass:e,delay:!0,from:d(o)});return t.$$willAnimate?t:null}function tt(n){return n.attr("class")||""}function rt(){var t=g(tt(c)),r=nt(t,w),u=nt(w,t),i=n(v,{to:d(c),addClass:h+" "+r,removeClass:e+" "+u,delay:!0});return i.$$willAnimate?i:null}function p(){v.remove();o.removeClass(t);c.removeClass(t)}var v=u(r(o).cloneNode(!0)),w=g(tt(v)),l,y,k;return(o.addClass(t),c.addClass(t),v.addClass(s),it.append(v),y=ut(),!y&&(l=rt(),!l))?p():(k=y||l,{start:function(){function i(){n&&n.end()}var t,n=k.start();return n.done(function(){if(n=null,!l&&(l=rt(),l))return n=l.start(),n.done(function(){n=null;p();t.complete()}),n;p();t.complete()}),t=new a({end:i,cancel:i})}})}function ut(n,t,r,u){var e=d(n,f),o=d(t,f),s=[];if(i(u,function(n){var i=n.out,u=n["in"],t=rt(r,i,u);t&&s.push(t)}),e||o||s.length!==0)return{start:function(){function r(){i(n,function(n){n.end()})}var n=[],t;return e&&n.push(e.start()),o&&n.push(o.start()),i(s,function(t){n.push(t.start())}),t=new a({end:r,cancel:r}),a.all(n,function(n){t.complete(n)}),t}}}function d(t){var u=t.element,i=t.options||{},r;return t.structural&&(i.event=t.event,i.structural=!0,i.applyClassesEarly=!0,t.event==="leave"&&(i.onDone=i.domOperation)),i.preparationClasses&&(i.event=tt(i.event,i.preparationClasses)),r=n(u,i),r.$$willAnimate?r:null}if(!y.animations&&!y.transitions)return f;var b=w[0].body,k=r(v),it=u(c(k)||b.contains(k)?k:b);return function(n){return n.from&&n.to?ut(n.from,n.to,n.classes,n.anchors):d(n)}}]}],kr=["$animateProvider",function(n){this.$get=["$injector","$$AnimateRunner","$$jqLite",function(t,r,u){function o(i){var f,e,r,u,o;for(i=c(i)?i:i.split(" "),f=[],e={},r=0;r<i.length;r++)u=i[r],o=n.$$registeredAnimations[u],o&&!e[u]&&(f.push(t.get(o)),e[u]=!0);return f}var e=k(u);return function(n,t,u,s){function b(){s.domOperation();e(n,s)}function tt(){k=!0;b();y(n,s)}function rt(n,t,i,u,e){var s,o;switch(i){case"animate":s=[t,u.from,u.to,e];break;case"setClass":s=[t,g,nt,e];break;case"addClass":s=[t,g,e];break;case"removeClass":s=[t,nt,e];break;default:s=[t,e]}if(s.push(u),o=n.apply(n,s),o)if(ni(o.start)&&(o=o.start()),o instanceof r)o.done(e);else if(ni(o))return o;return f}function c(n,t,u,e,o){var s=[];return i(e,function(i){var e=i[o];e&&s.push(function(){var i,s,h=!1,o=function(n){h||(h=!0,(s||f)(n),i.complete(!n))};return i=new r({end:function(){o()},cancel:function(){o(!0)}}),s=rt(e,n,t,u,function(n){var t=n===!1;o(t)}),i})}),s}function it(n,t,u,f,e){var o=c(n,t,u,f,e),s,h;if(o.length===0&&(e==="beforeSetClass"?(s=c(n,"removeClass",u,f,"beforeRemoveClass"),h=c(n,"addClass",u,f,"beforeAddClass")):e==="setClass"&&(s=c(n,"removeClass",u,f,"removeClass"),h=c(n,"addClass",u,f,"addClass")),s&&(o=o.concat(s)),h&&(o=o.concat(h))),o.length!==0)return function(n){var t=[];return o.length&&i(o,function(n){t.push(n())}),t.length?r.all(t,n):n(),function(n){i(t,function(t){n?t.cancel():t.end()})}}}var k=!1,p,w,h;arguments.length===3&&ut(u)&&(s=u,u=null);s=d(s);u||(u=n.attr("class")||"",s.addClass&&(u+=" "+s.addClass),s.removeClass&&(u+=" "+s.removeClass));var g=s.addClass,nt=s.removeClass,v=o(u),l,a;if(v.length&&(t==="leave"?(w="leave",p="afterLeave"):(w="before"+t.charAt(0).toUpperCase()+t.substr(1),p=t),t!=="enter"&&t!=="move"&&(l=it(n,t,s,v,w)),a=it(n,t,s,v,p)),l||a)return{$$willAnimate:!0,end:function(){return h?h.end():(tt(),h=new r,h.complete(!0)),h},start:function(){function i(n){tt(n);h.complete(n)}function u(n){k||((t||f)(n),i(n))}if(h)return h;h=new r;var t,n=[];return l&&n.push(function(n){t=l(n)}),n.length?n.push(function(n){b();n(!0)}):b(),a&&n.push(function(n){t=a(n)}),h.setHost({end:function(){u()},cancel:function(){u(!0)}}),r.chain(n,i),h}}}}]}],dr=["$$animationProvider",function(n){n.drivers.push("$$animateJsDriver");this.$get=["$$animateJs","$$AnimateRunner",function(n,t){function r(t){var i=t.element,r=t.event,u=t.options,f=t.classes;return n(i,r,f,u)}return function(n){if(n.from&&n.to){var u=r(n.from),f=r(n.to);return!u&&!f?void 0:{start:function(){function e(){return function(){i(n,function(n){n.end()})}}function o(n){r.complete(n)}var n=[],r;return u&&n.push(u.start()),f&&n.push(f.start()),t.all(n,o),r=new t({end:e(),cancel:e()})}}}return r(n)}}]}],it="data-ng-animate",bt="$ngAnimatePin",gr=["$animateProvider",function(t){function w(n){if(!n)return null;var r=n.split(v),t=Object.create(null);return i(r,function(n){t[n]=!0}),t}function p(n,t){if(n&&t){var i=w(t);return n.split(v).some(function(n){return i[n]})}}function l(n,t,i,r){return f[n].some(function(n){return n(t,i,r)})}function s(n,t){var i=(n.addClass||"").length>0,r=(n.removeClass||"").length>0;return t?i&&r:i||r}var h=1,e=2,v=" ",f=this.rules={skip:[],cancel:[],join:[]};f.join.push(function(n,t){return!t.structural&&s(t)});f.skip.push(function(n,t){return!t.structural&&!s(t)});f.skip.push(function(n,t,i){return i.event==="leave"&&t.structural});f.skip.push(function(n,t,i){return i.structural&&i.state===e&&!t.structural});f.cancel.push(function(n,t,i){return i.structural&&t.structural});f.cancel.push(function(n,t,i){return i.state===e&&t.structural});f.cancel.push(function(n,t,i){if(i.structural)return!1;var r=t.addClass,u=t.removeClass,f=i.addClass,e=i.removeClass;return a(r)&&a(u)||a(f)&&a(e)?!1:p(r,e)||p(u,f)});this.$get=["$$rAF","$rootScope","$rootElement","$document","$$HashMap","$$animation","$$AnimateRunner","$templateRequest","$$jqLite","$$forceReflow",function(f,v,p,w,nt,tt,ft,et,st){function oi(){var n=!1;return function(t){n?t():v.$$postDigest(function(){n=!0;t()})}}function ii(n,t){return g(n,t,{})}function li(n,t,u){var o=r(t),s=r(n),f=[],e=ct[u];return e&&i(e,function(n){ri.call(n.node,o)?f.push(n.callback):u==="leave"&&ri.call(n.node,s)&&f.push(n.callback)}),f}function ui(n,t,i){var r=vt(t);return n.filter(function(n){var t=n.node===r&&(!i||n.callback===i);return!t})}function fi(n,t){n!=="close"||t[0].parentNode||pt.off(t)}function ai(n,t,u){function ct(t,r,u,e){pt(function(){var t=li(vt,n,r);t.length?f(function(){i(t,function(t){t(n,u,e)});fi(u,n)}):fi(u,n)});t.progress(r,u,e)}function it(t){or(n,a);ti(n,a);y(n,a);a.domOperation();k.complete(!t)}var a=kt(u),nt,vt,k,pt,bt,b,gt,ni,ri,ot,st;if((n=ir(n),n&&(nt=r(n),vt=n.parent()),a=d(a),k=new ft,pt=oi(),c(a.addClass)&&(a.addClass=a.addClass.join(" ")),a.addClass&&!o(a.addClass)&&(a.addClass=null),c(a.removeClass)&&(a.removeClass=a.removeClass.join(" ")),a.removeClass&&!o(a.removeClass)&&(a.removeClass=null),a.from&&!ut(a.from)&&(a.from=null),a.to&&!ut(a.to)&&(a.to=null),!nt)||(bt=[nt.className,a.addClass,a.removeClass].join(" "),!ci(bt)))return it(),k;var rt=["enter","move","leave"].indexOf(t)>=0,yt=w[0].hidden,et=!at||yt||lt.get(nt),p=!et&&ht.get(nt)||{},dt=!!p.state;if(et||dt&&p.state===h||(et=!yi(n,vt,t)),et)return yt&&ct(k,t,"start"),it(),yt&&ct(k,t,"close"),k;if(rt&&vi(n),b={structural:rt,element:n,event:t,addClass:a.addClass,removeClass:a.removeClass,close:it,options:a,runner:k},dt){if(gt=l("skip",n,b,p),gt)return p.state===e?(it(),k):(g(n,p,b),p.runner);if(ni=l("cancel",n,b,p),ni)if(p.state===e)p.runner.end();else if(p.structural)p.close();else return g(n,p,b),p.runner;else if(ri=l("join",n,b,p),ri)if(p.state===e)ii(n,b);else return er(n,rt?t:null,a),t=b.event=p.event,a=g(n,p,b),p.runner}else ii(n,b);return(ot=b.structural,ot||(ot=b.event==="animate"&&Object.keys(b.options.to||{}).length>0||s(b)),!ot)?(it(),wt(n),k):(st=(p.counter||0)+1,b.counter=st,ei(n,h,b),v.$$postDigest(function(){var i=ht.get(nt),u=!i,h,f,o;if(i=i||{},h=n.parent()||[],f=h.length>0&&(i.event==="animate"||i.structural||s(i)),u||i.counter!==st||!f){u&&(ti(n,a),y(n,a));(u||rt&&i.event!==t)&&(a.domOperation(),k.end());f||wt(n);return}t=!i.structural&&s(i,!0)?"setClass":i.event;ei(n,e);o=tt(n,t,i.options);k.setHost(o);ct(k,t,"start",{});o.done(function(i){it(!i);var u=ht.get(nt);u&&u.counter===st&&wt(r(n));ct(k,t,"close",{})})}),k)}function vi(n){var t=r(n),u=t.querySelectorAll("["+it+"]");i(u,function(n){var i=parseInt(n.getAttribute(it),10),t=ht.get(n);if(t)switch(i){case e:t.runner.end();case h:ht.remove(n)}})}function wt(n){var t=r(n);t.removeAttribute(it);ht.remove(t)}function yt(n,t){return r(n)===r(t)}function yi(n,t){var v=u(w[0].body),o=yt(n,v)||n[0].nodeName==="HTML",i=yt(n,p),s=!1,f,h=lt.get(r(n)),e=u.data(n[0],bt),y,c,l,k;for(e&&(t=e),t=r(t);t;){if(i||(i=yt(t,p)),t.nodeType!==b)break;if(y=ht.get(t)||{},!s){if(c=lt.get(t),c===!0&&h!==!1){h=!0;break}else c===!1&&(h=!1);s=y.structural}if((a(f)||f===!0)&&(l=u.data(t,ot),gt(l)&&(f=l)),s&&f===!1)break;if(o||(o=yt(t,v)),o&&i)break;if(!i&&(e=u.data(t,bt),e)){t=r(e);continue}t=t.parentNode}return k=(!s||f)&&h!==!0,k&&i&&o}function ei(n,t,i){var u,f,e;i=i||{};i.state=t;u=r(n);u.setAttribute(it,t);f=ht.get(u);e=f?dt(f,i):i;ht.put(u,e)}var ht=new nt,lt=new nt,at=null,hi=v.$watch(function(){return et.totalPendingRequests===0},function(n){n&&(hi(),v.$$postDigest(function(){v.$$postDigest(function(){at===null&&(at=!0)})}))}),ct=Object.create(null),ni=t.classNameFilter(),ci=ni?function(n){return ni.test(n)}:function(){return!0},ti=k(st),ri=n.Node.prototype.contains||function(n){return this===n||!!(this.compareDocumentPosition(n)&16)},pt={on:function(n,t,i){var r=vt(t);ct[n]=ct[n]||[];ct[n].push({node:r,callback:i});u(t).on("$destroy",function(){var u=ht.get(r);u||pt.off(n,t,i)})},off:function(n,t,i){var r,u;if(arguments.length===1&&!o(arguments[0])){t=arguments[0];for(r in ct)ct[r]=ui(ct[r],t);return}(u=ct[n],u)&&(ct[n]=arguments.length===1?null:ui(u,t,i))},pin:function(n,t){si(rt(n),"element","not an element");si(rt(t),"parentElement","not an element");n.data(bt,t)},push:function(n,t,i,r){return i=i||{},i.domOperation=r,ai(n,t,i)},enabled:function(n,t){var u=arguments.length,f,i;return u===0?t=!!at:(f=rt(n),f?(i=r(n),u===1?t=!lt.get(i):lt.put(i,!t)):t=at=!!n),t}};return pt}]}],nu=["$animateProvider",function(){function o(n,t){n.data(e,t)}function s(n){n.removeData(e)}function t(n){return n.data(e)}var n="ng-animate-ref",f=this.drivers=[],e="$$animationRunner";this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$HashMap","$$rAFScheduler",function(e,h,c,l,a,v){function b(n){function f(n){var e,i,t;if(n.processed)return n;for(n.processed=!0,e=n.domNode,i=e.parentNode,r.put(e,n);i;){if(t=r.get(i),t){t.processed||(t=f(t));break}i=i.parentNode}return(t||u).children.push(n),n}function e(n){for(var u=[],i=[],o,t=0;t<n.children.length;t++)i.push(n.children[t]);var f=i.length,e=0,r=[];for(t=0;t<i.length;t++)o=i[t],f<=0&&(f=e,e=0,u.push(r),r=[]),r.push(o.fn),o.children.forEach(function(n){e++;i.push(n)}),f--;return r.length&&u.push(r),u}for(var u={children:[]},r=new a,i,t=0;t<n.length;t++)i=n[t],r.put(i.domNode,n[t]={domNode:i.domNode,fn:i.fn,children:[]});for(t=0;t<n.length;t++)f(n[t]);return e(u)}var p=[],w=k(e);return function(a,k,g){function ot(t){var u="["+n+"]",f=t.hasAttribute(n)?[t]:t.querySelectorAll(u),r=[];return i(f,function(t){var i=t.getAttribute(n);i&&i.length&&r.push(t)}),r}function st(t){var f=[],e={},s,o;return i(t,function(t,o){var c=t.element,l=r(c),a=t.event,v=["enter","move"].indexOf(a)>=0,s=t.structural?ot(l):[],h;s.length?(h=v?"to":"from",i(s,function(t){var i=t.getAttribute(n);e[i]=e[i]||{};e[i][h]={animationID:o,element:u(t)}})):f.push(t)}),s={},o={},i(e,function(n){var i=n.from,e=n.to,h,c,a;if(!i||!e){h=i?i.animationID:e.animationID;c=h.toString();s[c]||(s[c]=!0,f.push(t[h]));return}var r=t[i.animationID],u=t[e.animationID],l=i.animationID.toString();o[l]||(a=o[l]={structural:!0,beforeStart:function(){r.beforeStart();u.beforeStart()},close:function(){r.close();u.close()},classes:ht(r.classes,u.classes),from:r,to:u,anchors:[]},a.classes.length?f.push(a):(f.push(r),f.push(u)));o[l].anchors.push({out:i.element,"in":e.element})}),f}function ht(n,t){var f,i,r,u;for(n=n.split(" "),t=t.split(" "),f=[],i=0;i<n.length;i++)if(r=n[i],r.substring(0,3)!=="ng-")for(u=0;u<t.length;u++)if(r===t[u]){f.push(r);break}return f.join(" ")}function ct(n){for(var t=f.length-1;t>=0;t--){var r=f[t],u=c.get(r),i=u(n);if(i)return i}}function lt(){a.addClass(ii);nt&&e.addClass(a,nt);it&&(e.removeClass(a,it),it=null)}function at(n,i){function r(n){var r=t(n);r&&r.setHost(i)}n.from&&n.to?(r(n.from.element),r(n.to.element)):r(n.element)}function et(){var n=t(a);n&&(k!=="leave"||!g.$$domOperationFired)&&n.end()}function rt(n){a.off("$destroy",et);s(a);w(a,g);y(a,g);g.domOperation();nt&&e.removeClass(a,nt);a.removeClass(ii);tt.complete(!n)}var ut,tt,ft,nt,it;if(g=d(g),ut=["enter","move","leave"].indexOf(k)>=0,tt=new l({end:function(){rt()},cancel:function(){rt(!0)}}),!f.length)return rt(),tt;o(a,tt);ft=hi(a.attr("class"),hi(g.addClass,g.removeClass));nt=g.tempClasses;nt&&(ft+=" "+nt,g.tempClasses=null);ut&&(it="ng-"+k+bi,e.addClass(a,it));p.push({element:a,classes:ft,event:k,structural:ut,options:g,beforeStart:lt,close:rt});a.on("$destroy",et);return p.length>1?tt:(h.$$postDigest(function(){var u=[],f,n;i(p,function(n){t(n.element)?u.push(n):n.close()});p.length=0;f=st(u);n=[];i(f,function(i){n.push({domNode:r(i.from?i.from.element:i.element),fn:function(){var n,r,e,u,f;i.beforeStart();r=i.close;e=i.anchors?i.from.element||i.to.element:i.element;t(e)&&(u=ct(i),u&&(n=u.start));n?(f=n(),f.done(function(n){r(!n)}),at(i,f)):r()}})});v(b(n))}),tt)}}]}],tu=["$animate","$rootScope",function(n){return{restrict:"A",transclude:"element",terminal:!0,priority:600,link:function(t,i,r,u,f){var o,e;t.$watchCollection(r.ngAnimateSwap||r["for"],function(r){o&&n.leave(o);e&&(e.$destroy(),e=null);(r||r===0)&&(e=t.$new(),f(e,function(t){o=t;n.enter(t,null,i)}))})}}}],kt,dt,i,c,gt,rt,ni,ut,o,a,u,f;t.module("ngAnimate",[],function(){f=t.noop;kt=t.copy;dt=t.extend;u=t.element;i=t.forEach;c=t.isArray;o=t.isString;ut=t.isObject;a=t.isUndefined;gt=t.isDefined;ni=t.isFunction;rt=t.isElement}).directive("ngAnimateSwap",tu).directive("ngAnimateChildren",hr).factory("$$rAFScheduler",sr).provider("$$animateQueue",gr).provider("$$animation",nu).provider("$animateCss",wr).provider("$$animateCssDriver",br).provider("$$animateJs",kr).provider("$$animateJsDriver",dr)}(window,window.angular),function(n,t){"use strict";function i(n,i,r){function e(n,r,f){var s,e,o,h;return f=f||{},e=f.expires,s=t.isDefined(f.path)?f.path:u,t.isUndefined(r)&&(e="Thu, 01 Jan 1970 00:00:00 GMT",r=""),t.isString(e)&&(e=new Date(e)),o=encodeURIComponent(n)+"="+encodeURIComponent(r),o+=s?";path="+s:"",o+=f.domain?";domain="+f.domain:"",o+=e?";expires="+e.toUTCString():"",o+=f.secure?";secure":"",h=o.length+1,h>4096&&i.warn("Cookie '"+n+"' possibly not set or overflowed because it was too large ("+h+" > 4096 bytes)!"),o}var u=r.baseHref(),f=n[0];return function(n,t,i){f.cookie=e(n,t,i)}}t.module("ngCookies",["ng"]).provider("$cookies",[function(){function i(i){return i?t.extend({},n,i):n}var n=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(n,r){return{get:function(t){return n()[t]},getObject:function(n){var i=this.get(n);return i?t.fromJson(i):i},getAll:function(){return n()},put:function(n,t,u){r(n,t,i(u))},putObject:function(n,i,r){this.put(n,t.toJson(i),r)},remove:function(n,t){r(n,undefined,i(t))}}}]}]);t.module("ngCookies").factory("$cookieStore",["$cookies",function(n){return{get:function(t){return n.getObject(t)},put:function(t,i){n.putObject(t,i)},remove:function(t){n.remove(t)}}}]);i.$inject=["$document","$log","$browser"];t.module("ngCookies").provider("$$cookieWriter",function(){this.$get=i})}(window,window.angular),function(n,t){"use strict";function e(){function n(n,t){if(n)return u(n)?n.indexOf(t)>=0:n.hasOwnProperty(t)}return["$animate",function(t){return{restrict:"AE",transclude:"element",priority:1,terminal:!0,require:"^^ngMessages",link:function(i,r,f,e,o){var l=r[0],a,y=f.ngMessage||f.when,h=f.ngMessageExp||f.whenExp,c=function(n){a=n?u(n)?n:n.split(/[\s,]+/):null;e.reRender()},s,v;h?(c(i.$eval(h)),i.$watchCollection(h,c)):c(y);e.register(l,v={test:function(t){return n(a,t)},attach:function(){s||o(function(n,i){t.enter(n,null,r);s=n;var u=s.$$attachId=e.getAttachId();s.on("$destroy",function(){s&&s.$$attachId===u&&(e.deregister(l),v.detach());i.$destroy()})})},detach:function(){if(s){var n=s;s=null;t.leave(n)}}})}}}]}var i,u,r,f;t.module("ngMessages",[],function(){i=t.forEach;u=t.isArray;r=t.isString;f=t.element}).directive("ngMessages",["$animate",function(n){function f(n,t){return r(t)&&t.length===0||e(n.$eval(t))}function e(n){return r(n)?n.length:!!n}var t="ng-active",u="ng-inactive";return{require:"ngMessages",restrict:"AE",controller:["$element","$scope","$attrs",function(r,o,s){function y(n,t){for(var i=t,u=[],r;i&&i!==n;){if(r=i.$$ngMessageNode,r&&r.length)return c[r];i.childNodes.length&&u.indexOf(i)===-1?(u.push(i),i=i.childNodes[i.childNodes.length-1]):i.previousSibling?i=i.previousSibling:(i=i.parentNode,u.push(i))}}function w(n,t,i){var r=c[i],u;h.head?(u=y(n,t),u?(r.next=u.next,u.next=r):(r.next=h.head,h.head=r)):h.head=r}function b(n,t,i){var r=c[i],u=y(n,t);u?u.next=r.next:h.head=r.next}var h=this,v=0,p=0,c,l,a;this.getAttachId=function(){return p++};c=this.messages={};this.render=function(c){var y,p;c=c||{};l=!1;a=c;for(var g=f(o,s.ngMessagesMultiple)||f(o,s.multiple),w=[],b={},v=h.head,k=!1,d=0;v!=null;)d++,y=v.message,p=!1,k||i(c,function(n,t){if(!p&&e(n)&&y.test(t)){if(b[t])return;b[t]=!0;p=!0;y.attach()}}),p?k=!g:w.push(y),v=v.next;i(w,function(n){n.detach()});w.length!==d?n.setClass(r,t,u):n.setClass(r,u,t)};o.$watchCollection(s.ngMessages||s["for"],h.render);r.on("$destroy",function(){i(c,function(n){n.message.detach()})});this.reRender=function(){l||(l=!0,o.$evalAsync(function(){l&&a&&h.render(a)}))};this.register=function(n,t){var i=v.toString();c[i]={message:t};w(r[0],n,i);n.$$ngMessageNode=i;v++;h.reRender()};this.deregister=function(n){var t=n.$$ngMessageNode;delete n.$$ngMessageNode;b(r[0],n,t);delete c[t];h.reRender()}}]}}]).directive("ngMessagesInclude",["$templateRequest","$document","$compile",function(n,t,i){function u(n,r){var u=i.$$createComment?i.$$createComment("ngMessagesInclude",r):t[0].createComment(" ngMessagesInclude: "+r+" "),e=f(u);n.after(e);n.remove()}return{restrict:"AE",require:"^^ngMessages",link:function(t,f,e){var o=e.ngMessagesInclude||e.src;n(o).then(function(n){t.$$destroyed||(r(n)&&!n.trim()?u(f,o):i(n)(t,function(n){f.after(n);u(f,o)}))})}}}]).directive("ngMessage",e()).directive("ngMessageExp",e())}(window,window.angular),function(n,t){"use strict";function o(n,t){var i,e,f;if(r(n))for(t=t||[],i=0,e=n.length;i<e;i++)t[i]=n[i];else if(u(n)){t=t||{};for(f in n)f.charAt(0)==="$"&&f.charAt(1)==="$"||(t[f]=n[f])}return t||n}function h(){function i(n,i){return t.extend(Object.create(n),i)}function f(n,t){var r=t.caseInsensitiveMatch,i={originalPath:n,regexp:n},u=i.keys=[];return n=n.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)(\*\?|[?*])?/g,function(n,t,i,r){var f=r==="?"||r==="*?"?"?":null,e=r==="*"||r==="*?"?"*":null;return u.push({name:i,optional:!!f}),t=t||"",""+(f?"":t)+"(?:"+(f?t:"")+(e&&"(.+?)"||"([^/]+)")+(f||"")+")"+(f||"")}).replace(/([/$*])/g,"\\$1"),i.regexp=new RegExp("^"+n+"$",r?"i":""),i}r=t.isArray;u=t.isObject;var n={};this.when=function(i,r){var u=o(r),e;return t.isUndefined(u.reloadOnSearch)&&(u.reloadOnSearch=!0),t.isUndefined(u.caseInsensitiveMatch)&&(u.caseInsensitiveMatch=this.caseInsensitiveMatch),n[i]=t.extend(u,i&&f(i,u)),i&&(e=i[i.length-1]==="/"?i.substr(0,i.length-1):i+"/",n[e]=t.extend({redirectTo:i},f(e,u))),this};this.caseInsensitiveMatch=!1;this.otherwise=function(n){return typeof n=="string"&&(n={redirectTo:n}),this.when(null,n),this};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(r,u,f,e,o,h,c){function k(n,t){var s=t.keys,e={},r,i,o,u,f;if(!t.regexp||(r=t.regexp.exec(n),!r))return null;for(i=1,o=r.length;i<o;++i)u=s[i-1],f=r[i],u&&f&&(e[u.name]=f);return e}function p(n){var i=a.current;l=nt();y=l&&i&&l.$$route===i.$$route&&t.equals(l.pathParams,i.pathParams)&&!l.reloadOnSearch&&!v;!y&&(i||l)&&r.$broadcast("$routeChangeStart",l,i).defaultPrevented&&n&&n.preventDefault()}function w(){var i=a.current,n=l;y?(i.params=n.params,t.copy(i.params,f),r.$broadcast("$routeUpdate",i)):(n||i)&&(v=!1,a.current=n,n&&n.redirectTo&&(t.isString(n.redirectTo)?u.path(b(n.redirectTo,n.params)).search(n.params).replace():u.url(n.redirectTo(n.pathParams,u.path(),u.search())).replace()),e.when(n).then(d).then(function(u){n===a.current&&(n&&(n.locals=u,t.copy(n.params,f)),r.$broadcast("$routeChangeSuccess",n,i))},function(t){n===a.current&&r.$broadcast("$routeChangeError",n,i,t)}))}function d(n){var i,r;if(n)return i=t.extend({},n.resolve),t.forEach(i,function(n,r){i[r]=t.isString(n)?o.get(n):o.invoke(n,null,null,r)}),r=g(n),t.isDefined(r)&&(i.$template=r),e.all(i)}function g(n){var r,i;return t.isDefined(r=n.template)?t.isFunction(r)&&(r=r(n.params)):t.isDefined(i=n.templateUrl)&&(t.isFunction(i)&&(i=i(n.params)),t.isDefined(i)&&(n.loadedTemplateUrl=c.valueOf(i),r=h(i))),r}function nt(){var f,r;return t.forEach(n,function(n){!r&&(f=k(u.path(),n))&&(r=i(n,{params:t.extend({},u.search(),f),pathParams:f}),r.$$route=n)}),r||n[null]&&i(n[null],{params:{},pathParams:{}})}function b(n,i){var r=[];return t.forEach((n||"").split(":"),function(n,t){if(t===0)r.push(n);else{var u=n.match(/(\w+)(?:[?*])?(.*)/),f=u[1];r.push(i[f]);r.push(u[2]||"");delete i[f]}}),r.join("")}var v=!1,l,y,a={routes:n,reload:function(){v=!0;var n={defaultPrevented:!1,preventDefault:function(){this.defaultPrevented=!0;v=!1}};r.$evalAsync(function(){p(n);n.defaultPrevented||w()})},updateParams:function(n){if(this.current&&this.current.$$route)n=t.extend({},this.current.params,n),u.path(b(this.current.$$route.originalPath,n)),u.search(n);else throw s("norout","Tried updating route when with no current route");}};return r.$on("$locationChangeStart",p),r.$on("$locationChangeSuccess",w),a}]}function c(){this.$get=function(){return{}}}function f(n,i,r){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(u,f,e,o,s){function v(){c&&(r.cancel(c),c=null);h&&(h.$destroy(),h=null);l&&(c=r.leave(l),c.done(function(n){n!==!1&&(c=null)}),l=null)}function y(){var e=n.current&&n.current.locals,c=e&&e.$template;if(t.isDefined(c)){var o=u.$new(),y=n.current,w=s(o,function(n){r.enter(n,null,l||f).done(function(n){n!==!1&&t.isDefined(a)&&(!a||u.$eval(a))&&i()});v()});l=w;h=y.scope=o;h.$emit("$viewContentLoaded");h.$eval(p)}else v()}var h,l,c,a=e.autoscroll,p=e.onload||"";u.$on("$routeChangeSuccess",y);y()}}}function e(n,t,i){return{restrict:"ECA",priority:-400,link:function(r,u){var f=i.current,e=f.locals,s,o;u.html(e.$template);s=n(u.contents());f.controller&&(e.$scope=r,o=t(f.controller,e),f.controllerAs&&(r[f.controllerAs]=o),u.data("$ngControllerController",o),u.children().data("$ngControllerController",o));r[f.resolveAs||"$resolve"]=e;s(r)}}}var r,u,i=t.module("ngRoute",["ng"]).provider("$route",h),s=t.$$minErr("ngRoute");i.provider("$routeParams",c);i.directive("ngView",f);i.directive("ngView",e);f.$inject=["$route","$anchorScroll","$animate"];e.$inject=["$compile","$controller","$route"]}(window,window.angular),function(n,t){"use strict";function l(){function a(n,t){for(var f={},u=n.split(","),i=0;i<u.length;i++)f[t?r(u[i]):u[i]]=!0;return f}function ct(t,i){var e,r,u;t===null||t===undefined?t="":typeof t!="string"&&(t=""+t);l.innerHTML=t;e=5;do{if(e===0)throw f("uinput","Failed to sanitize html because the input is unstable");e--;n.document.documentMode&&g(l);t=l.innerHTML;l.innerHTML=t}while(t!==l.innerHTML);for(r=l.firstChild;r;){switch(r.nodeType){case 1:i.start(r.nodeName.toLowerCase(),lt(r.attributes));break;case 3:i.chars(r.textContent)}if(!(u=r.firstChild)&&(r.nodeType===1&&i.end(r.nodeName.toLowerCase()),u=r.nextSibling,!u))while(u==null){if(r=r.parentNode,r===l)break;u=r.nextSibling;r.nodeType===1&&i.end(r.nodeName.toLowerCase())}r=u}while(r=l.firstChild)l.removeChild(r)}function lt(n){for(var i,r={},t=0,u=n.length;t<u;t++)i=n[t],r[i.name]=i.value;return r}function d(n){return n.replace(/&/g,"&amp;").replace(nt,function(n){var t=n.charCodeAt(0),i=n.charCodeAt(1);return"&#"+((t-55296)*1024+(i-56320)+65536)+";"}).replace(tt,function(n){return"&#"+n.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function at(n,t){var u=!1,i=e(n,n.push);return{start:function(n,f){n=r(n);!u&&et[n]&&(u=n);u||y[n]!==!0||(i("<"),i(n),o(f,function(u,f){var e=r(f),o=n==="img"&&e==="src"||e==="background";ht[e]===!0&&(k[e]!==!0||t(u,o))&&(i(" "),i(f),i('="'),i(d(u)),i('"'))}),i(">"))},end:function(n){n=r(n);u||y[n]!==!0||p[n]===!0||(i("<\/"),i(n),i(">"));n==u&&(u=!1)},chars:function(n){u||i(d(n))}}}function g(t){for(var r,i,u,f,e,o;t;){if(t.nodeType===n.Node.ELEMENT_NODE)for(r=t.attributes,i=0,u=r.length;i<u;i++)f=r[i],e=f.name.toLowerCase(),(e==="xmlns:ns1"||e.lastIndexOf("ns1:",0)===0)&&(t.removeAttributeNode(f),i--,u--);o=t.firstChild;o&&g(o);t=t.nextSibling}}var v=!1,l;this.$get=["$$sanitizeUri",function(n){return v&&i(y,ft),function(t){var i=[];return c(t,u(i,function(t,i){return!/^unsafe:/.test(n(t,i))})),i.join("")}}];this.enableSvg=function(n){return s(n)?(v=n,this):v};e=t.bind;i=t.extend;o=t.forEach;s=t.isDefined;r=t.lowercase;h=t.noop;c=ct;u=at;var nt=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,tt=/([^#-~ |!])/g,p=a("area,br,col,hr,img,wbr"),w=a("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),b=a("rp,rt"),it=i({},b,w),rt=i({},w,a("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),ut=i({},b,a("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),ft=a("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),et=a("script,style"),y=i({},p,rt,ut,it),k=a("background,cite,href,longdesc,src,xlink:href"),ot=a("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),st=a("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),ht=i({},k,st,ot);(function(n){var t,u,i,r;if(n.document&&n.document.implementation)t=n.document.implementation.createHTMLDocument("inert");else throw f("noinert","Can't create an inert html document");u=t.documentElement||t.getDocumentElement();i=u.getElementsByTagName("body");i.length===1?l=i[0]:(r=t.createElement("html"),l=t.createElement("body"),r.appendChild(l),t.appendChild(r))})(n)}function a(n){var t=[],i=u(t,h);return i.chars(n),t.join("")}var f=t.$$minErr("$sanitize"),e,i,o,s,r,h,c,u;t.module("ngSanitize",[]).provider("$sanitize",l);t.module("ngSanitize").filter("linky",["$sanitize",function(n){var i=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,r=/^mailto:/i,u=t.$$minErr("linky"),f=t.isDefined,e=t.isFunction,o=t.isObject,s=t.isString;return function(t,h,c){function b(n){n&&v.push(a(n))}function d(n,t){var i,r=k(n);v.push("<a ");for(i in r)v.push(i+'="'+r[i]+'" ');!f(h)||"target"in r||v.push('target="',h,'" ');v.push('href="',n.replace(/"/g,"&quot;"),'">');b(t);v.push("<\/a>")}if(t==null||t==="")return t;if(!s(t))throw u("notstring","Expected string but received: {0}",t);for(var k=e(c)?c:o(c)?function(){return c}:function(){return{}},l,y=t,v=[],p,w;l=y.match(i);)p=l[0],l[2]||l[4]||(p=(l[3]?"http://":"mailto:")+p),w=l.index,b(y.substr(0,w)),d(p,l[0].replace(r,"")),y=y.substring(w+l[0].length);return b(y),n(v.join(""))}}])}(window,window.angular),function(n,t){"use strict";function e(n){return t.lowercase(n.nodeName||n[0]&&n[0].nodeName)}function u(n,i){var u=!1,f=!1;this.ngClickOverrideEnabled=function(e){return t.isDefined(e)?(e&&!f&&(f=!0,r.$$moduleName="ngTouch",i.directive("ngClick",r),n.decorator("ngClickDirective",["$delegate",function(n){if(u)n.shift();else for(var t=n.length-1;t>=0;){if(n[t].$$moduleName==="ngTouch"){n.splice(t,1);break}t--}return n}])),u=e,this):u};this.$get=function(){return{ngClickOverrideEnabled:function(){return u}}}}function f(n,r,u){i.directive(n,["$parse","$swipe",function(i,f){var e=75,o=.3,s=30;return function(h,c,l){function w(n){if(!a)return!1;var i=Math.abs(n.y-a.y),t=(n.x-a.x)*r;return v&&i<e&&t>0&&t>s&&i/t<o}var p=i(l[n]),a,v,y=["touch"];t.isDefined(l.ngSwipeDisableMouse)||y.push("mouse");f.bind(c,{start:function(n){a=n;v=!0},cancel:function(){v=!1},end:function(n,t){w(n)&&h.$apply(function(){c.triggerHandler(u);p(h,{$event:t})})}},y)}}])}var i=t.module("ngTouch",[]),r;i.provider("$touch",u);u.$inject=["$provide","$compileProvider"];i.factory("$swipe",[function(){function i(n){var t=n.originalEvent||n,r=t.touches&&t.touches.length?t.touches:[t],i=t.changedTouches&&t.changedTouches[0]||r[0];return{x:i.clientX,y:i.clientY}}function n(n,i){var r=[];return t.forEach(n,function(n){var t=u[n][i];t&&r.push(t)}),r.join(" ")}var r=10,u={mouse:{start:"mousedown",move:"mousemove",end:"mouseup"},touch:{start:"touchstart",move:"touchmove",end:"touchend",cancel:"touchcancel"},pointer:{start:"pointerdown",move:"pointermove",end:"pointerup",cancel:"pointercancel"}};return{bind:function(t,u,f){var o,s,h,c,e=!1,l;f=f||["mouse","touch","pointer"];t.on(n(f,"start"),function(n){h=i(n);e=!0;o=0;s=0;c=h;u.start&&u.start(h,n)});if(l=n(f,"cancel"),l)t.on(l,function(n){e=!1;u.cancel&&u.cancel(n)});t.on(n(f,"move"),function(n){if(e&&h){var t=i(n);if(o+=Math.abs(t.x-c.x),s+=Math.abs(t.y-c.y),c=t,!(o<r)||!(s<r)){if(s>o){e=!1;u.cancel&&u.cancel(n);return}n.preventDefault();u.move&&u.move(t,n)}}});t.on(n(f,"end"),function(n){e&&(e=!1,u.end&&u.end(i(n),n))})}}}]);r=["$parse","$timeout","$rootElement",function(n,i,r){function y(n,t,i,r){return Math.abs(n-i)<h&&Math.abs(t-r)<h}function l(n,t,i){for(var r=0;r<n.length;r+=2)if(y(n[r],n[r+1],t,i))return n.splice(r,r+2),!0;return!1}function p(n){if(!(Date.now()-c>s)){var r=n.touches&&n.touches.length?n.touches:[n],t=r[0].clientX,i=r[0].clientY;t<1&&i<1||f&&f[0]===t&&f[1]===i||(f&&(f=null),e(n.target)==="label"&&(f=[t,i]),l(u,t,i))||(n.stopPropagation(),n.preventDefault(),n.target&&n.target.blur&&n.target.blur())}}function w(n){var t=n.touches&&n.touches.length?n.touches:[n],r=t[0].clientX,f=t[0].clientY;u.push(r,f);i(function(){for(var n=0;n<u.length;n+=2)if(u[n]===r&&u[n+1]===f){u.splice(n,n+2);return}},s,!1)}function b(n,t){u||(r[0].addEventListener("click",p,!0),r[0].addEventListener("touchstart",w,!0),u=[]);c=Date.now();l(u,n,t)}var a=750,v=12,s=2500,h=25,o="ng-click-active",c,u,f;return function(i,r,u){function l(){e=!1;r.removeClass(o)}var y=n(u.ngClick),e=!1,f,s,h,c;r.on("touchstart",function(n){e=!0;f=n.target?n.target:n.srcElement;f.nodeType===3&&(f=f.parentNode);r.addClass(o);s=Date.now();var t=n.originalEvent||n,u=t.touches&&t.touches.length?t.touches:[t],i=u[0];h=i.clientX;c=i.clientY});r.on("touchcancel",function(){l()});r.on("touchend",function(n){var w=Date.now()-s,i=n.originalEvent||n,k=i.changedTouches&&i.changedTouches.length?i.changedTouches:i.touches&&i.touches.length?i.touches:[i],o=k[0],y=o.clientX,p=o.clientY,d=Math.sqrt(Math.pow(y-h,2)+Math.pow(p-c,2));e&&w<a&&d<v&&(b(y,p),f&&f.blur(),t.isDefined(u.disabled)&&u.disabled!==!1||r.triggerHandler("click",[n]));l()});r.onclick=function(){};r.on("click",function(n,t){i.$apply(function(){y(i,{$event:t||n})})});r.on("mousedown",function(){r.addClass(o)});r.on("mousemove mouseup",function(){r.removeClass(o)})}}];f("ngSwipeLeft",-1,"swipeleft");f("ngSwipeRight",1,"swiperight")}(window,window.angular),function(n,t){"use strict";typeof define=="function"&&define.amd?define(t):typeof exports=="object"?module.exports=t():n.returnExports=t()}(this,function(){var k=Array,n=k.prototype,u=Object,g=u.prototype,pt=Function.prototype,o=String,l=o.prototype,f=Number,wt=f.prototype,a=n.slice,bt=n.splice,s=n.push,di=n.unshift,kt=n.concat,nt=pt.call,b=Math.max,ft=Math.min,et=g.toString,ot=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",e,gi=Function.prototype.toString,nr=function(n){try{return gi.call(n),!0}catch(t){return!1}},tr="[object Function]",ir="[object GeneratorFunction]",lt,at,ni,ti,ii,ri,ui,fi,ai,yi,t,yt,wi,bi,ki;e=function(n){if(typeof n!="function")return!1;if(ot)return nr(n);var t=et.call(n);return t===tr||t===ir};var st,rr=RegExp.prototype.exec,ur=function(n){try{return rr.call(n),!0}catch(t){return!1}},fr="[object RegExp]";st=function(n){return typeof n!="object"?!1:ot?ur(n):et.call(n)===fr};var h,er=String.prototype.valueOf,or=function(n){try{return er.call(n),!0}catch(t){return!1}},sr="[object String]";h=function(n){return typeof n=="string"?!0:typeof n!="object"?!1:ot?or(n):et.call(n)===sr};var r=function(n){var i=u.defineProperty&&function(){var n,t;try{n={};u.defineProperty(n,"x",{enumerable:!1,value:n});for(t in n)return!1;return n.x===n}catch(i){return!1}}(),t;return t=i?function(n,t,i,r){!r&&t in n||u.defineProperty(n,t,{configurable:!0,enumerable:!1,writable:!0,value:i})}:function(n,t,i,r){!r&&t in n||(n[t]=i)},function(i,r,u){for(var f in r)n.call(r,f)&&t(i,f,r[f],u)}}(g.hasOwnProperty),tt=function(n){var t=typeof n;return n===null||t!=="object"&&t!=="function"},it=f.isNaN||function(n){return n!==n},i={ToInteger:function(n){var t=+n;return it(t)?t=0:t!==0&&t!==1/0&&t!==-(1/0)&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t},ToPrimitive:function(n){var t,i,r;if(tt(n))return n;if((i=n.valueOf,e(i)&&(t=i.call(n),tt(t)))||(r=n.toString,e(r)&&(t=r.call(n),tt(t))))return t;throw new TypeError;},ToObject:function(n){if(n==null)throw new TypeError("can't convert "+n+" to object");return u(n)},ToUint32:function(n){return n>>>0}},ht=function(){};r(pt,{bind:function(n){var t=this,r;if(!e(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);var f=a.call(arguments,1),i,h=function(){if(this instanceof i){var r=t.apply(this,kt.call(f,a.call(arguments)));return u(r)===r?r:this}return t.apply(n,kt.call(f,a.call(arguments)))},c=b(0,t.length-f.length),o=[];for(r=0;r<c;r++)s.call(o,"$"+r);return i=Function("binder","return function ("+o.join(",")+"){ return binder.apply(this, arguments); }")(h),t.prototype&&(ht.prototype=t.prototype,i.prototype=new ht,ht.prototype=null),i}});var p=nt.bind(g.hasOwnProperty),dt=nt.bind(g.toString),v=nt.bind(l.slice),c=nt.bind(l.split),ct=k.isArray||function(n){return dt(n)==="[object Array]"},hr=[].unshift(0)!==1;r(n,{unshift:function(){return di.apply(this,arguments),this.length}},hr);r(k,{isArray:ct});var gt=u("a"),y=gt[0]!=="a"||!(0 in gt),d=function(n){var t=!0,i=!0;return n&&(n.call("foo",function(n,i,r){typeof r!="object"&&(t=!1)}),n.call([1],function(){"use strict";i=typeof this=="string"},"x")),!!n&&t&&i};r(n,{forEach:function(n){var u=i.ToObject(this),r=y&&h(this)?c(this,""):u,t=-1,o=i.ToUint32(r.length),f;if(arguments.length>1&&(f=arguments[1]),!e(n))throw new TypeError("Array.prototype.forEach callback must be a function");while(++t<o)t in r&&(typeof f=="undefined"?n(r[t],t,u):n.call(f,r[t],t,u))}},!d(n.forEach));r(n,{map:function(n){var u=i.ToObject(this),r=y&&h(this)?c(this,""):u,o=i.ToUint32(r.length),s=k(o),f,t;if(arguments.length>1&&(f=arguments[1]),!e(n))throw new TypeError("Array.prototype.map callback must be a function");for(t=0;t<o;t++)t in r&&(s[t]=typeof f=="undefined"?n(r[t],t,u):n.call(f,r[t],t,u));return s}},!d(n.map));r(n,{filter:function(n){var u=i.ToObject(this),f=y&&h(this)?c(this,""):u,a=i.ToUint32(f.length),l=[],r,o,t;if(arguments.length>1&&(o=arguments[1]),!e(n))throw new TypeError("Array.prototype.filter callback must be a function");for(t=0;t<a;t++)t in f&&(r=f[t],(typeof o=="undefined"?n(r,t,u):n.call(o,r,t,u))&&s.call(l,r));return l}},!d(n.filter));r(n,{every:function(n){var u=i.ToObject(this),r=y&&h(this)?c(this,""):u,o=i.ToUint32(r.length),f,t;if(arguments.length>1&&(f=arguments[1]),!e(n))throw new TypeError("Array.prototype.every callback must be a function");for(t=0;t<o;t++)if(t in r&&!(typeof f=="undefined"?n(r[t],t,u):n.call(f,r[t],t,u)))return!1;return!0}},!d(n.every));r(n,{some:function(n){var u=i.ToObject(this),r=y&&h(this)?c(this,""):u,o=i.ToUint32(r.length),f,t;if(arguments.length>1&&(f=arguments[1]),!e(n))throw new TypeError("Array.prototype.some callback must be a function");for(t=0;t<o;t++)if(t in r&&(typeof f=="undefined"?n(r[t],t,u):n.call(f,r[t],t,u)))return!0;return!1}},!d(n.some));lt=!1;n.reduce&&(lt=typeof n.reduce.call("es5",function(n,t,i,r){return r})=="object");r(n,{reduce:function(n){var o=i.ToObject(this),r=y&&h(this)?c(this,""):o,f=i.ToUint32(r.length),t,u;if(!e(n))throw new TypeError("Array.prototype.reduce callback must be a function");if(f===0&&arguments.length===1)throw new TypeError("reduce of empty array with no initial value");if(t=0,arguments.length>=2)u=arguments[1];else do{if(t in r){u=r[t++];break}if(++t>=f)throw new TypeError("reduce of empty array with no initial value");}while(1);for(;t<f;t++)t in r&&(u=n(u,r[t],t,o));return u}},!lt);at=!1;n.reduceRight&&(at=typeof n.reduceRight.call("es5",function(n,t,i,r){return r})=="object");r(n,{reduceRight:function(n){var f=i.ToObject(this),u=y&&h(this)?c(this,""):f,o=i.ToUint32(u.length),r,t;if(!e(n))throw new TypeError("Array.prototype.reduceRight callback must be a function");if(o===0&&arguments.length===1)throw new TypeError("reduceRight of empty array with no initial value");if(t=o-1,arguments.length>=2)r=arguments[1];else do{if(t in u){r=u[t--];break}if(--t<0)throw new TypeError("reduceRight of empty array with no initial value");}while(1);if(t<0)return r;do t in u&&(r=n(r,u[t],t,f));while(t--);return r}},!at);ni=n.indexOf&&[0,1].indexOf(1,2)!==-1;r(n,{indexOf:function(n){var r=y&&h(this)?c(this,""):i.ToObject(this),u=i.ToUint32(r.length),t;if(u===0)return-1;for(t=0,arguments.length>1&&(t=i.ToInteger(arguments[1])),t=t>=0?t:b(0,u+t);t<u;t++)if(t in r&&r[t]===n)return t;return-1}},ni);ti=n.lastIndexOf&&[0,1].lastIndexOf(0,-3)!==-1;r(n,{lastIndexOf:function(n){var r=y&&h(this)?c(this,""):i.ToObject(this),u=i.ToUint32(r.length),t;if(u===0)return-1;for(t=u-1,arguments.length>1&&(t=ft(t,i.ToInteger(arguments[1]))),t=t>=0?t:u-Math.abs(t);t>=0;t--)if(t in r&&n===r[t])return t;return-1}},ti);ii=function(){var n=[1,2],t=n.splice();return n.length===2&&ct(t)&&t.length===0}();r(n,{splice:function(){return arguments.length===0?[]:bt.apply(this,arguments)}},!ii);ri=function(){var t={};return n.splice.call(t,0,0,1),t.length===1}();r(n,{splice:function(n,t){if(arguments.length===0)return[];var r=arguments;return this.length=b(i.ToInteger(this.length),0),arguments.length>0&&typeof t!="number"&&(r=a.call(arguments),r.length<2?s.call(r,this.length-n):r[1]=i.ToInteger(t)),bt.apply(this,r)}},!ri);ui=function(){var n=new k(1e5);return n[8]="x",n.splice(1,1),n.indexOf("x")===7}();fi=function(){var n=256,t=[];return t[n]="a",t.splice(n+1,0,"b"),t[n]==="a"}();r(n,{splice:function(n,t){for(var u=i.ToObject(this),k=[],s=i.ToUint32(u.length),w=i.ToInteger(n),l=w<0?b(s+w,0):ft(w,s),f=ft(b(i.ToInteger(t),0),s-l),r=0,e,v,h,c,y;r<f;)e=o(l+r),p(u,e)&&(k[r]=u[e]),r+=1;if(v=a.call(arguments,2),h=v.length,h<f){for(r=l;r<s-f;)e=o(r+f),c=o(r+h),p(u,e)?u[c]=u[e]:delete u[c],r+=1;for(r=s;r>s-f+h;)delete u[r-1],r-=1}else if(h>f)for(r=s-f;r>l;)e=o(r+f-1),c=o(r+h-1),p(u,e)?u[c]=u[e]:delete u[c],r-=1;for(r=l,y=0;y<v.length;++y)u[r]=v[y],r+=1;return u.length=s-f+h,k}},!ui||!fi);var cr=!{toString:null}.propertyIsEnumerable("toString"),lr=function(){}.propertyIsEnumerable("prototype"),ar=!p("x","0"),vt=function(n){var t=n.constructor;return t&&t.prototype===n},vr={$window:!0,$console:!0,$parent:!0,$self:!0,$frame:!0,$frames:!0,$frameElement:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0},yr=function(){if(typeof window=="undefined")return!1;for(var n in window)try{!vr["$"+n]&&p(window,n)&&window[n]!==null&&typeof window[n]=="object"&&vt(window[n])}catch(t){return!0}return!1}(),pr=function(n){if(typeof window=="undefined"||!yr)return vt(n);try{return vt(n)}catch(t){return!1}},ei=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],wr=ei.length,oi=function(n){return dt(n)==="[object Arguments]"},br=function(n){return n!==null&&typeof n=="object"&&typeof n.length=="number"&&n.length>=0&&!ct(n)&&e(n.callee)},si=oi(arguments)?oi:br;r(u,{keys:function(n){var l=e(n),c=si(n),a=n!==null&&typeof n=="object",w=a&&h(n),t,v,i,r,y,u,f;if(!a&&!l&&!c)throw new TypeError("Object.keys called on a non-object");if(t=[],v=lr&&l,w&&ar||c)for(i=0;i<n.length;++i)s.call(t,o(i));if(!c)for(r in n)v&&r==="prototype"||!p(n,r)||s.call(t,o(r));if(cr)for(y=pr(n),u=0;u<wr;u++)f=ei[u],y&&f==="constructor"||!p(n,f)||s.call(t,f);return t}});var kr=u.keys&&function(){return u.keys(arguments).length===2}(1,2),dr=u.keys&&function(){var n=u.keys(arguments);return arguments.length!==1||n.length!==1||n[0]!==1}(1),hi=u.keys;r(u,{keys:function(n){return si(n)?hi(a.call(n)):hi(n)}},!kr||dr);var ci=-621987552e5,li="-000001",gr=Date.prototype.toISOString&&new Date(ci).toISOString().indexOf(li)===-1,nu=Date.prototype.toISOString&&new Date(-1).toISOString()!=="1969-12-31T23:59:59.999Z";r(Date.prototype,{toISOString:function(){var t,r,u,n,i;if(!isFinite(this))throw new RangeError("Date.prototype.toISOString called on non-finite value.");for(n=this.getUTCFullYear(),i=this.getUTCMonth(),n+=Math.floor(i/12),i=(i%12+12)%12,t=[i+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()],n=(n<0?"-":n>9999?"+":"")+v("00000"+Math.abs(n),0<=n&&n<=9999?-4:-6),r=t.length;r--;)u=t[r],u<10&&(t[r]="0"+u);return n+"-"+a.call(t,0,2).join("-")+"T"+a.call(t,2).join(":")+"."+v("000"+this.getUTCMilliseconds(),-3)+"Z"}},gr||nu);ai=function(){try{return Date.prototype.toJSON&&new Date(NaN).toJSON()===null&&new Date(ci).toJSON().indexOf(li)!==-1&&Date.prototype.toJSON.call({toISOString:function(){return!0}})}catch(n){return!1}}();ai||(Date.prototype.toJSON=function(){var n=u(this),r=i.ToPrimitive(n),t;if(typeof r=="number"&&!isFinite(r))return null;if(t=n.toISOString,!e(t))throw new TypeError("toISOString property is not callable");return t.call(n)});var tu=Date.parse("+033658-09-27T01:46:40.000Z")===1e15,iu=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z"))||!isNaN(Date.parse("2012-12-31T23:59:60.000Z")),ru=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));if(ru||iu||!tu){var w=Math.pow(2,31)-1,ff=Math.floor(w/1e3),vi=it(new Date(1970,0,1,0,0,0,w+1).getTime());Date=function(n){var t=function(i,u,f,e,s,h,c){var l=arguments.length,a,v,y,b,p;return this instanceof n?(v=h,y=c,vi&&l>=7&&c>w&&(b=Math.floor(c/w)*w,p=Math.floor(b/1e3),v+=p,y-=p*1e3),a=l===1&&o(i)===i?new n(t.parse(i)):l>=7?new n(i,u,f,e,s,v,y):l>=6?new n(i,u,f,e,s,v):l>=5?new n(i,u,f,e,s):l>=4?new n(i,u,f,e):l>=3?new n(i,u,f):l>=2?new n(i,u):l>=1?new n(i):new n):a=n.apply(this,arguments),tt(a)||r(a,{constructor:t},!0),a},s=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),h=[0,31,59,90,120,151,181,212,243,273,304,334,365],u=function(n,t){var i=t>1?1:0;return h[t]+Math.floor((n-1969+i)/4)-Math.floor((n-1901+i)/100)+Math.floor((n-1601+i)/400)+365*(n-1970)},c=function(t){var u=0,i=t,e,r;return vi&&i>w&&(e=Math.floor(i/w)*w,r=Math.floor(e/1e3),u+=r,i-=r*1e3),f(new n(1970,0,1,0,0,u,i))},i,e;for(i in n)p(n,i)&&(t[i]=n[i]);return r(t,{now:n.now,UTC:n.UTC},!0),t.prototype=n.prototype,r(t.prototype,{constructor:t},!0),e=function(t){var i=s.exec(t);if(i){var o=f(i[1]),e=f(i[2]||1)-1,h=f(i[3]||1)-1,y=f(i[4]||0),l=f(i[5]||0),a=f(i[6]||0),v=Math.floor(f(i[7]||0)*1e3),k=Boolean(i[4]&&!i[8]),p=i[9]==="-"?1:-1,w=f(i[10]||0),b=f(i[11]||0),r,d=l>0||a>0||v>0;return y<(d?24:25)&&l<60&&a<60&&v<1e3&&e>-1&&e<12&&w<24&&b<60&&h>-1&&h<u(o,e+1)-u(o,e)&&(r=((u(o,e)+h)*24+y+w*p)*60,r=((r+l+b*p)*60+a)*1e3+v,k&&(r=c(r)),-864e13<=r&&r<=864e13)?r:NaN}return n.parse.apply(this,arguments)},r(t,{parse:e}),t}(Date)}Date.now||(Date.now=function(){return(new Date).getTime()});yi=wt.toFixed&&(8e-5.toFixed(3)!=="0.000"||.9.toFixed(0)!=="1"||1.255.toFixed(2)!=="1.25"||1000000000000000128..toFixed(0)!=="1000000000000000128");t={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function(n,i){for(var u=-1,r=i;++u<t.size;)r+=n*t.data[u],t.data[u]=r%t.base,r=Math.floor(r/t.base)},divide:function(n){for(var r=t.size,i=0;--r>=0;)i+=t.data[r],t.data[r]=Math.floor(i/n),i=i%n*t.base},numToString:function(){for(var i=t.size,n="",r;--i>=0;)(n!==""||i===0||t.data[i]!==0)&&(r=o(t.data[i]),n===""?n=r:n+=v("0000000",0,7-r.length)+r);return n},pow:function pi(n,t,i){return t===0?i:t%2==1?pi(n,t-1,i*n):pi(n*n,t/2,i)},log:function(n){for(var i=0,t=n;t>=4096;)i+=12,t/=4096;while(t>=2)i+=1,t/=2;return i}};r(wt,{toFixed:function(n){var i,r,h,u,e,l,s,c;if(i=f(n),i=it(i)?0:Math.floor(i),i<0||i>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(r=f(this),it(r))return"NaN";if(r<=-1e21||r>=1e21)return o(r);if(h="",r<0&&(h="-",r=-r),u="0",r>1e-21)if(e=t.log(r*t.pow(2,69,1))-69,l=e<0?r*t.pow(2,-e,1):r/t.pow(2,e,1),l*=4503599627370496,e=52-e,e>0){for(t.multiply(0,l),s=i;s>=7;)t.multiply(1e7,0),s-=7;for(t.multiply(t.pow(10,s,1),0),s=e-1;s>=23;)t.divide(8388608),s-=23;t.divide(1<<s);t.multiply(1,1);t.divide(2);u=t.numToString()}else t.multiply(0,l),t.multiply(1<<-e,0),u=t.numToString()+v("0.00000000000000000000",2,2+i);return i>0?(c=u.length,u=c<=i?h+v("0.0000000000000000000",0,i-c+2)+u:h+v(u,0,c-i)+"."+v(u,c-i)):u=h+u,u}},yi);"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||"tesst".split(/(s)*/)[1]==="t"||"test".split(/(?:)/,-1).length!==4||"".split(/.?/).length||".".split(/()()/).length>1?function(){var n=typeof/()??/.exec("")[1]=="undefined",t=Math.pow(2,32)-1;l.split=function(r,u){var o=this,y;if(typeof r=="undefined"&&u===0)return[];if(!st(r))return c(this,r,u);var e=[],w=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(r.sticky?"y":""),l=0,b,f,p,k,h=new RegExp(r.source,w+"g");for(o+="",n||(b=new RegExp("^"+h.source+"$(?!\\s)",w)),y=typeof u=="undefined"?t:i.ToUint32(u),f=h.exec(o);f;){if(p=f.index+f[0].length,p>l&&(s.call(e,v(o,l,f.index)),!n&&f.length>1&&f[0].replace(b,function(){for(var n=1;n<arguments.length-2;n++)typeof arguments[n]=="undefined"&&(f[n]=void 0)}),f.length>1&&f.index<o.length&&s.apply(e,a.call(f,1)),k=f[0].length,l=p,e.length>=y))break;h.lastIndex===f.index&&h.lastIndex++;f=h.exec(o)}return l===o.length?(k||!h.test(""))&&s.call(e,""):s.call(e,v(o,l)),e.length>y?arraySlice(e,0,y):e}}():"0".split(void 0,0).length&&(l.split=function(n,t){return typeof n=="undefined"&&t===0?[]:c(this,n,t)});yt=l.replace;wi=function(){var n=[];return"x".replace(/x(.)?/g,function(t,i){s.call(n,i)}),n.length===1&&typeof n[0]=="undefined"}();wi||(l.replace=function(n,t){var r=e(t),u=st(n)&&/\)[*?]/.test(n.source),i;return r&&u?(i=function(i){var u=arguments.length,f=n.lastIndex,r;return n.lastIndex=0,r=n.exec(i)||[],n.lastIndex=f,s.call(r,arguments[u-2],arguments[u-1]),t.apply(this,r)},yt.call(this,n,i)):yt.call(this,n,t)});bi=l.substr;ki="".substr&&"0b".substr(-1)!=="b";r(l,{substr:function(n,t){var i=n;return n<0&&(i=b(this.length+n,0)),bi.call(this,i,t)}},ki);var rt="\t\n\x0b\f\r   ᠎             　\u2028\u2029﻿",ut="["+rt+"]",uu=new RegExp("^"+ut+ut+"*"),fu=new RegExp(ut+ut+"*$"),eu=l.trim&&(rt.trim()||!"​".trim());r(l,{trim:function(){if(typeof this=="undefined"||this===null)throw new TypeError("can't convert "+this+" to object");return o(this).replace(uu,"").replace(fu,"")}},eu);(parseInt(rt+"08")!==8||parseInt(rt+"0x16")!==22)&&(parseInt=function(n){var t=/^0[xX]/;return function(i,r){var u=o(i).trim(),e=f(r)||(t.test(u)?16:10);return n(u,e)}}(parseInt))}),function(n,t){typeof define=="function"&&define.amd?define(["jquery"],t):typeof exports=="object"?module.exports=t(require("jquery")):t(n.jQuery)}(this,function(n){function f(n){var i,f,t,r;if(n in u.style)return n;for(i=["Moz","Webkit","O","ms"],f=n.charAt(0).toUpperCase()+n.substr(1),t=0;t<i.length;++t)if(r=i[t]+f,r in u.style)return r}function p(){return u.style[t.transform]="",u.style[t.transform]="rotateY(90deg)",u.style[t.transform]!==""}function o(n){return typeof n=="string"&&this.parse(n),this}function a(n,t,i){t===!0?n.queue(i):t?n.queue(t,i):n.each(function(){i.call(this)})}function w(i){var r=[];return n.each(i,function(i){i=n.camelCase(i);i=n.transit.propertyMap[i]||n.cssProps[i]||i;i=y(i);t[i]&&(i=y(t[i]));n.inArray(i,r)===-1&&r.push(i)}),r}function v(t,i,r,u){var o=w(t),f,e;return n.cssEase[r]&&(r=n.cssEase[r]),f=""+h(i)+" "+r,parseInt(u,10)>0&&(f+=" "+h(u)),e=[],n.each(o,function(n,t){e.push(t+" "+f)}),e.join(", ")}function i(i,r){r||(n.cssNumber[i]=!0);n.transit.propertyMap[i]=t.transform;n.cssHooks[i]={get:function(t){var r=n(t).css("transit:transform");return r.get(i)},set:function(t,r){var u=n(t).css("transit:transform");u.setFromString(i,r);n(t).css({"transit:transform":u})}}}function y(n){return n.replace(/([A-Z])/g,function(n){return"-"+n.toLowerCase()})}function r(n,t){return typeof n!="string"||n.match(/^[\-0-9\.]+$/)?""+n+t:n}function h(t){var i=t;return typeof i!="string"||i.match(/^[\-0-9\.]+/)||(i=n.fx.speeds[i]||n.fx.speeds._default),r(i,"ms")}var u,t,c,l,s,e;n.transit={version:"0.9.12",propertyMap:{marginLeft:"margin",marginRight:"margin",marginBottom:"margin",marginTop:"margin",paddingLeft:"padding",paddingRight:"padding",paddingBottom:"padding",paddingTop:"padding"},enabled:!0,useTransitionEnd:!1};u=document.createElement("div");t={};c=navigator.userAgent.toLowerCase().indexOf("chrome")>-1;t.transition=f("transition");t.transitionDelay=f("transitionDelay");t.transform=f("transform");t.transformOrigin=f("transformOrigin");t.filter=f("Filter");t.transform3d=p();l={transition:"transitionend",MozTransition:"transitionend",OTransition:"oTransitionEnd",WebkitTransition:"webkitTransitionEnd",msTransition:"MSTransitionEnd"};s=t.transitionEnd=l[t.transition]||null;for(e in t)t.hasOwnProperty(e)&&typeof n.support[e]=="undefined"&&(n.support[e]=t[e]);return u=null,n.cssEase={_default:"ease","in":"ease-in",out:"ease-out","in-out":"ease-in-out",snap:"cubic-bezier(0,1,.5,1)",easeInCubic:"cubic-bezier(.550,.055,.675,.190)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"},n.cssHooks["transit:transform"]={get:function(t){return n(t).data("transform")||new o},set:function(i,r){var u=r;u instanceof o||(u=new o(u));i.style[t.transform]=t.transform!=="WebkitTransform"||c?u.toString():u.toString(!0);n(i).data("transform",u)}},n.cssHooks.transform={set:n.cssHooks["transit:transform"].set},n.cssHooks.filter={get:function(n){return n.style[t.filter]},set:function(n,i){n.style[t.filter]=i}},n.fn.jquery<"1.8"&&(n.cssHooks.transformOrigin={get:function(n){return n.style[t.transformOrigin]},set:function(n,i){n.style[t.transformOrigin]=i}},n.cssHooks.transition={get:function(n){return n.style[t.transition]},set:function(n,i){n.style[t.transition]=i}}),i("scale"),i("scaleX"),i("scaleY"),i("translate"),i("rotate"),i("rotateX"),i("rotateY"),i("rotate3d"),i("perspective"),i("skewX"),i("skewY"),i("x",!0),i("y",!0),o.prototype={setFromString:function(n,t){var i=typeof t=="string"?t.split(","):t.constructor===Array?t:[t];i.unshift(n);o.prototype.set.apply(this,i)},set:function(n){var t=Array.prototype.slice.apply(arguments,[1]);this.setter[n]?this.setter[n].apply(this,t):this[n]=t.join(",")},get:function(n){return this.getter[n]?this.getter[n].apply(this):this[n]||0},setter:{rotate:function(n){this.rotate=r(n,"deg")},rotateX:function(n){this.rotateX=r(n,"deg")},rotateY:function(n){this.rotateY=r(n,"deg")},scale:function(n,t){t===undefined&&(t=n);this.scale=n+","+t},skewX:function(n){this.skewX=r(n,"deg")},skewY:function(n){this.skewY=r(n,"deg")},perspective:function(n){this.perspective=r(n,"px")},x:function(n){this.set("translate",n,null)},y:function(n){this.set("translate",null,n)},translate:function(n,t){this._translateX===undefined&&(this._translateX=0);this._translateY===undefined&&(this._translateY=0);n!==null&&n!==undefined&&(this._translateX=r(n,"px"));t!==null&&t!==undefined&&(this._translateY=r(t,"px"));this.translate=this._translateX+","+this._translateY}},getter:{x:function(){return this._translateX||0},y:function(){return this._translateY||0},scale:function(){var n=(this.scale||"1,1").split(",");return n[0]&&(n[0]=parseFloat(n[0])),n[1]&&(n[1]=parseFloat(n[1])),n[0]===n[1]?n[0]:n},rotate3d:function(){for(var n=(this.rotate3d||"0,0,0,0deg").split(","),t=0;t<=3;++t)n[t]&&(n[t]=parseFloat(n[t]));return n[3]&&(n[3]=r(n[3],"deg")),n}},parse:function(n){var t=this;n.replace(/([a-zA-Z0-9]+)\((.*?)\)/g,function(n,i,r){t.setFromString(i,r)})},toString:function(n){var r=[];for(var i in this)if(this.hasOwnProperty(i)){if(!t.transform3d&&(i==="rotateX"||i==="rotateY"||i==="perspective"||i==="transformOrigin"))continue;i[0]!=="_"&&(n&&i==="scale"?r.push(i+"3d("+this[i]+",1)"):n&&i==="translate"?r.push(i+"3d("+this[i]+",0)"):r.push(i+"("+this[i]+")"))}return r.join(" ")}},n.fn.transition=n.fn.transit=function(i,r,u,f){var o=this,l=0,y=!0,e=n.extend(!0,{},i),p;typeof r=="function"&&(f=r,r=undefined);typeof r=="object"&&(u=r.easing,l=r.delay||0,y=typeof r.queue=="undefined"?!0:r.queue,f=r.complete,r=r.duration);typeof u=="function"&&(f=u,u=undefined);typeof e.easing!="undefined"&&(u=e.easing,delete e.easing);typeof e.duration!="undefined"&&(r=e.duration,delete e.duration);typeof e.complete!="undefined"&&(f=e.complete,delete e.complete);typeof e.queue!="undefined"&&(y=e.queue,delete e.queue);typeof e.delay!="undefined"&&(l=e.delay,delete e.delay);typeof r=="undefined"&&(r=n.fx.speeds._default);typeof u=="undefined"&&(u=n.cssEase._default);r=h(r);var w=v(e,r,u,l),b=n.transit.enabled&&t.transition,c=b?parseInt(r,10)+parseInt(l,10):0;if(c===0)return p=function(n){o.css(e);f&&f.apply(o);n&&n()},a(o,y,p),o;var k={},d=function(i){var u=!1,r=function(){u&&o.unbind(s,r);c>0&&o.each(function(){this.style[t.transition]=k[this]||null});typeof f=="function"&&f.apply(o);typeof i=="function"&&i()};c>0&&s&&n.transit.useTransitionEnd?(u=!0,o.bind(s,r)):window.setTimeout(r,c);o.each(function(){c>0&&(this.style[t.transition]=w);n(this).css(e)})},g=function(n){this.offsetWidth;d(n)};return a(o,y,g),this},n.transit.getTransitionValue=v,n}),function(){function f(t,r){function l(n){var e,i,a,t,s,f,u;if(l[n]!==h)return l[n];if(n=="bug-string-char-index")e="a"[0]!="a";else if(n=="json")e=l("json-stringify")&&l("json-parse");else{if(a='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}',n=="json-stringify"){if(t=r.stringify,s=typeof t=="function"&&c,s){(i=function(){return 1}).toJSON=i;try{s=t(0)==="0"&&t(new lt)==="0"&&t(new et)=='""'&&t(o)===h&&t(h)===h&&t()===h&&t(i)==="1"&&t([i])=="[1]"&&t([h])=="[null]"&&t(null)=="null"&&t([h,o,null])=="[null,null,null]"&&t({a:[i,!0,!1,null,"\x00\b\n\f\r\t"]})==a&&t(null,i)==="1"&&t([1,2],null,1)=="[\n 1,\n 2\n]"&&t(new w(-864e13))=='"-271821-04-20T00:00:00.000Z"'&&t(new w(864e13))=='"+275760-09-13T00:00:00.000Z"'&&t(new w(-621987552e5))=='"-000001-01-01T00:00:00.000Z"'&&t(new w(-1))=='"1969-12-31T23:59:59.999Z"'}catch(v){s=!1}}e=s}if(n=="json-parse"){if(f=r.parse,typeof f=="function")try{if(f("0")===0&&!f(!1)&&(i=f(a),u=i.a.length==5&&i.a[0]===1,u)){try{u=!f('"\t"')}catch(v){}if(u)try{u=f("01")!==1}catch(v){}if(u)try{u=f("1.")!==1}catch(v){}}}catch(v){u=!1}e=u}}return l[n]=!!e}t||(t=n.Object());r||(r=n.Object());var lt=t.Number||n.Number,et=t.String||n.String,at=t.Object||n.Object,w=t.Date||n.Date,vt=t.SyntaxError||n.SyntaxError,yt=t.TypeError||n.TypeError,pt=t.Math||n.Math,g=t.JSON||n.JSON;typeof g=="object"&&g&&(r.stringify=g.stringify,r.parse=g.parse);var ot=at.prototype,o=ot.toString,s,p,h,c=new w(-0xc782b5b800cec);try{c=c.getUTCFullYear()==-109252&&c.getUTCMonth()===0&&c.getUTCDate()===1&&c.getUTCHours()==10&&c.getUTCMinutes()==37&&c.getUTCSeconds()==6&&c.getUTCMilliseconds()==708}catch(ri){}if(!l("json")){var b="[object Function]",wt="[object Date]",nt="[object Number]",tt="[object String]",it="[object Array]",bt="[object Boolean]",k=l("bug-string-char-index");if(!c)var a=pt.floor,kt=[0,31,59,90,120,151,181,212,243,273,304,334],d=function(n,t){return kt[t]+365*(n-1970)+a((n-1969+(t=+(t>1)))/4)-a((n-1901+t)/100)+a((n-1601+t)/400)};if((s=ot.hasOwnProperty)||(s=function(n){var t={},i;return(t.__proto__=null,t.__proto__={toString:1},t).toString!=o?s=function(n){var t=this.__proto__,i=n in(this.__proto__=null,this);return this.__proto__=t,i}:(i=t.constructor,s=function(n){var t=(this.constructor||i).prototype;return n in this&&!(n in t&&this[n]===t[n])}),t=null,s.call(this,n)}),p=function(n,t){var u=0,f,r,e;(f=function(){this.valueOf=0}).prototype.valueOf=0;r=new f;for(e in r)s.call(r,e)&&u++;return f=r=null,u?p=u==2?function(n,t){var r={},u=o.call(n)==b;for(var i in n)u&&i=="prototype"||s.call(r,i)||!(r[i]=1)||!s.call(n,i)||t(i)}:function(n,t){var u=o.call(n)==b,i,r;for(i in n)u&&i=="prototype"||!s.call(n,i)||(r=i==="constructor")||t(i);(r||s.call(n,i="constructor"))&&t(i)}:(r=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],p=function(n,t){var f=o.call(n)==b,u,e,h=!f&&typeof n.constructor!="function"&&i[typeof n.hasOwnProperty]&&n.hasOwnProperty||s;for(u in n)f&&u=="prototype"||!h.call(n,u)||t(u);for(e=r.length;u=r[--e];h.call(n,u)&&t(u));}),p(n,t)},!l("json-stringify")){var dt={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},gt="000000",v=function(n,t){return(gt+(t||0)).slice(-n)},ni="\\u00",st=function(n){for(var r='"',t=0,u=n.length,f=!k||u>10,e=f&&(k?n.split(""):n),i;t<u;t++){i=n.charCodeAt(t);switch(i){case 8:case 9:case 10:case 12:case 13:case 34:case 92:r+=dt[i];break;default:if(i<32){r+=ni+v(2,i.toString(16));break}r+=f?e[t]:n.charAt(t)}}return r+'"'},ut=function(n,t,i,r,u,f,e){var c,y,l,k,w,g,et,ot,ht,ct,b,lt,ft,rt,at,vt;try{c=t[n]}catch(pt){}if(typeof c=="object"&&c)if(y=o.call(c),y!=wt||s.call(c,"toJSON"))typeof c.toJSON=="function"&&(y!=nt&&y!=tt&&y!=it||s.call(c,"toJSON"))&&(c=c.toJSON(n));else if(c>-1/0&&c<1/0){if(d){for(w=a(c/864e5),l=a(w/365.2425)+1970-1;d(l+1,0)<=w;l++);for(k=a((w-d(l,0))/30.42);d(l,k+1)<=w;k++);w=1+w-d(l,k);g=(c%864e5+864e5)%864e5;et=a(g/36e5)%24;ot=a(g/6e4)%60;ht=a(g/1e3)%60;ct=g%1e3}else l=c.getUTCFullYear(),k=c.getUTCMonth(),w=c.getUTCDate(),et=c.getUTCHours(),ot=c.getUTCMinutes(),ht=c.getUTCSeconds(),ct=c.getUTCMilliseconds();c=(l<=0||l>=1e4?(l<0?"-":"+")+v(6,l<0?-l:l):v(4,l))+"-"+v(2,k+1)+"-"+v(2,w)+"T"+v(2,et)+":"+v(2,ot)+":"+v(2,ht)+"."+v(3,ct)+"Z"}else c=null;if(i&&(c=i.call(t,n,c)),c===null)return"null";if(y=o.call(c),y==bt)return""+c;if(y==nt)return c>-1/0&&c<1/0?""+c:"null";if(y==tt)return st(""+c);if(typeof c=="object"){for(rt=e.length;rt--;)if(e[rt]===c)throw yt();if(e.push(c),b=[],at=f,f+=u,y==it){for(ft=0,rt=c.length;ft<rt;ft++)lt=ut(ft,c,i,r,u,f,e),b.push(lt===h?"null":lt);vt=b.length?u?"[\n"+f+b.join(",\n"+f)+"\n"+at+"]":"["+b.join(",")+"]":"[]"}else p(r||c,function(n){var t=ut(n,c,i,r,u,f,e);t!==h&&b.push(st(n)+":"+(u?" ":"")+t)}),vt=b.length?u?"{\n"+f+b.join(",\n"+f)+"\n"+at+"}":"{"+b.join(",")+"}":"{}";return e.pop(),vt}};r.stringify=function(n,t,r){var e,c,s,u,h,l,f;if(i[typeof t]&&t)if((u=o.call(t))==b)c=t;else if(u==it)for(s={},h=0,l=t.length;h<l;f=t[h++],(u=o.call(f),u==tt||u==nt)&&(s[f]=1));if(r)if((u=o.call(r))==nt){if((r-=r%1)>0)for(e="",r>10&&(r=10);e.length<r;e+=" ");}else u==tt&&(e=r.length<=10?r:r.slice(0,10));return ut("",(f={},f[""]=n,f),c,s,e,"",[])}}if(!l("json-parse")){var ti=et.fromCharCode,ii={92:"\\",34:'"',47:"/",98:"\b",116:"\t",110:"\n",102:"\f",114:"\r"},u,rt,e=function(){u=rt=null;throw vt();},y=function(){for(var t=rt,o=t.length,r,f,i,s,n;u<o;){n=t.charCodeAt(u);switch(n){case 9:case 10:case 13:case 32:u++;break;case 123:case 125:case 91:case 93:case 58:case 44:return r=k?t.charAt(u):t[u],u++,r;case 34:for(r="@",u++;u<o;)if(n=t.charCodeAt(u),n<32)e();else if(n==92){n=t.charCodeAt(++u);switch(n){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:r+=ii[n];u++;break;case 117:for(f=++u,i=u+4;u<i;u++)n=t.charCodeAt(u),n>=48&&n<=57||n>=97&&n<=102||n>=65&&n<=70||e();r+=ti("0x"+t.slice(f,u));break;default:e()}}else{if(n==34)break;for(n=t.charCodeAt(u),f=u;n>=32&&n!=92&&n!=34;)n=t.charCodeAt(++u);r+=t.slice(f,u)}if(t.charCodeAt(u)==34)return u++,r;e();default:if(f=u,n==45&&(s=!0,n=t.charCodeAt(++u)),n>=48&&n<=57){for(n==48&&(n=t.charCodeAt(u+1),n>=48&&n<=57)&&e(),s=!1;u<o&&(n=t.charCodeAt(u),n>=48&&n<=57);u++);if(t.charCodeAt(u)==46){for(i=++u;i<o&&(n=t.charCodeAt(i),n>=48&&n<=57);i++);i==u&&e();u=i}if(n=t.charCodeAt(u),n==101||n==69){for(n=t.charCodeAt(++u),(n==43||n==45)&&u++,i=u;i<o&&(n=t.charCodeAt(i),n>=48&&n<=57);i++);i==u&&e();u=i}return+t.slice(f,u)}if(s&&e(),t.slice(u,u+4)=="true")return u+=4,!0;if(t.slice(u,u+5)=="false")return u+=5,!1;if(t.slice(u,u+4)=="null")return u+=4,null;e()}}return"$"},ft=function(n){var t,i;if(n=="$"&&e(),typeof n=="string"){if((k?n.charAt(0):n[0])=="@")return n.slice(1);if(n=="["){for(t=[];;i||(i=!0)){if(n=y(),n=="]")break;i&&(n==","?(n=y(),n=="]"&&e()):e());n==","&&e();t.push(ft(n))}return t}if(n=="{"){for(t={};;i||(i=!0)){if(n=y(),n=="}")break;i&&(n==","?(n=y(),n=="}"&&e()):e());(n==","||typeof n!="string"||(k?n.charAt(0):n[0])!="@"||y()!=":")&&e();t[n.slice(1)]=ft(y())}return t}e()}return n},ht=function(n,t,i){var r=ct(n,t,i);r===h?delete n[t]:n[t]=r},ct=function(n,t,i){var r=n[t],u;if(typeof r=="object"&&r)if(o.call(r)==it)for(u=r.length;u--;)ht(r,u,i);else p(r,function(n){ht(r,n,i)});return i.call(n,t,r)};r.parse=function(n,t){var i,r;return u=0,rt=""+n,i=ft(y()),y()!="$"&&e(),u=rt=null,t&&o.call(t)==b?ct((r={},r[""]=i,r),"",t):i}}}return r.runInContext=f,r}var e=typeof define=="function"&&define.amd,i={"function":!0,object:!0},u=i[typeof exports]&&exports&&!exports.nodeType&&exports,n=i[typeof window]&&window||this,t=u&&i[typeof module]&&module&&!module.nodeType&&typeof global=="object"&&global;if(t&&(t.global===t||t.window===t||t.self===t)&&(n=t),u&&!e)f(n,u);else{var o=n.JSON,s=n.JSON3,h=!1,r=f(n,n.JSON3={noConflict:function(){return h||(h=!0,n.JSON=o,n.JSON3=s,o=s=null),r}});n.JSON={parse:r.parse,stringify:r.stringify}}e&&define(function(){return r})}.call(this),function(n,t){"use strict";var i=t.module("ngResize",[]);i.provider("resize",[function(){this.throttle=100;this.initBind=1;this.$get=["$rootScope","$window","$interval",function(n,i,r){function c(n){u.throttle=n}function l(){return u.throttle}function o(t){var t=t||n;t.$broadcast("resize",{width:i.innerWidth,height:i.innerHeight})}function h(){if(!f){var n=t.element(i);n.on("resize",function(){e||(s=r(function(){e&&(e=0,r.cancel(s),o())},u.throttle));e=1});f=1;n.triggerHandler("resize")}}function a(){if(f){var n=t.element(i);n.off("resize");f=0}}var u=this,f=0,s=0,e=0;return u.initBind&&h(),{getThrottle:l,setThrottle:c,trigger:o,bind:h,unbind:a}}]}]);i.directive("ngResize",["$parse","$timeout","resize",function(n,t){return{compile:function(i,r){var u=n(r.ngResize);return function(n){n.$on("resize",function(i,r){t(function(){n.$apply(function(){u(n,{$event:r})})})})}}}}])}(window,window.angular),function(n,t){"use strict";typeof define=="function"&&define.amd?define(["angular"],t):n.hasOwnProperty("angular")?t(n.angular):typeof exports=="object"&&(module.exports=t(require("angular")))}(this,function(n){"use strict";function t(n,t){var i,r;try{i=n[t]}catch(u){i=!1}if(i){r="__"+Math.round(Math.random()*1e7);try{n[t].setItem(r,r);n[t].removeItem(r,r)}catch(u){i=!1}}return i}function i(i){var r=t(window,i);return function(){var u="ngStorage-",e,f;this.setKeyPrefix=function(n){if(typeof n!="string")throw new TypeError("[ngStorage] - "+i+"Provider.setKeyPrefix() expects a String.");u=n};e=n.toJson;f=n.fromJson;this.setSerializer=function(n){if(typeof n!="function")throw new TypeError("[ngStorage] - "+i+"Provider.setSerializer expects a function.");e=n};this.setDeserializer=function(n){if(typeof n!="function")throw new TypeError("[ngStorage] - "+i+"Provider.setDeserializer expects a function.");f=n};this.supported=function(){return!!r};this.get=function(n){return r&&f(r.getItem(u+n))};this.set=function(n,t){return r&&r.setItem(u+n,e(t))};this.remove=function(n){r&&r.removeItem(u+n)};this.$get=["$rootScope","$window","$log","$timeout","$document",function(r,o,s,h,c){var v=u.length,w=t(o,i),a=w||(s.warn("This browser does not support Web Storage!"),{setItem:n.noop,getItem:n.noop,removeItem:n.noop}),l={$default:function(t){for(var i in t)n.isDefined(l[i])||(l[i]=n.copy(t[i]));return l.$sync(),l},$reset:function(n){for(var t in l)"$"===t[0]||delete l[t]&&a.removeItem(u+t);return l.$default(n)},$sync:function(){for(var t=0,i=a.length,n;t<i;t++)(n=a.key(t))&&u===n.slice(0,v)&&(l[n.slice(v)]=f(a.getItem(n)))},$apply:function(){var t,i;if(p=null,!n.equals(l,y)){t=n.copy(y);n.forEach(l,function(i,r){n.isDefined(i)&&"$"!==r[0]&&(a.setItem(u+r,e(i)),delete t[r])});for(i in t)a.removeItem(u+i);y=n.copy(l)}},$supported:function(){return!!w}},y,p;return l.$sync(),y=n.copy(l),r.$watch(function(){p||(p=h(l.$apply,100,!1))}),o.addEventListener&&o.addEventListener("storage",function(t){if(t.key){var i=c[0];i.hasFocus&&i.hasFocus()||u!==t.key.slice(0,v)||(t.newValue?l[t.key.slice(v)]=f(t.newValue):delete l[t.key.slice(v)],y=n.copy(l),r.$apply())}}),o.addEventListener&&o.addEventListener("beforeunload",function(){l.$apply()}),l}]}}return n=n&&n.module?n:window.angular,n.module("ngStorage",[]).provider("$localStorage",i("localStorage")).provider("$sessionStorage",i("sessionStorage"))}),function(){function ut(t){function r(n,i,r,u,f,e){for(;f>=0&&f<e;f+=t){var o=u?u[f]:f;r=i(r,n[o],o,n)}return r}return function(u,f,o,s){f=e(f,s,4);var h=!i(u)&&n.keys(u),l=(h||u).length,c=t>0?0:l-1;return arguments.length<3&&(o=u[h?h[c]:c],c+=t),r(u,f,o,h,c,l)}}function ft(n){return function(i,r,f){r=t(r,f);for(var o=u(i),e=n>0?0:o-1;e>=0&&e<o;e+=n)if(r(i[e],e,i))return e;return-1}}function et(t,i,f){return function(e,o,s){var c=0,h=u(e);if(typeof s=="number")t>0?c=s>=0?s:Math.max(s+h,c):h=s>=0?Math.min(s+1,h):s+h+1;else if(f&&s&&h)return s=f(e,o),e[s]===o?s:-1;if(o!==o)return s=i(r.call(e,c,h),n.isNaN),s>=0?s+c:-1;for(s=t>0?c:h-1;s>=0&&s<h;s+=t)if(e[s]===o)return s;return-1}}function ot(t,i){var u=d.length,f=t.constructor,e=n.isFunction(f)&&f.prototype||v,r="constructor";for(n.has(t,r)&&!n.contains(i,r)&&i.push(r);u--;)r=d[u],r in t&&t[r]!==e[r]&&!n.contains(i,r)&&i.push(r)}var a=this,lt=a._,s=Array.prototype,v=Object.prototype,at=Function.prototype,vt=s.push,r=s.slice,o=v.toString,yt=v.hasOwnProperty,pt=Array.isArray,nt=Object.keys,y=at.bind,tt=Object.create,p=function(){},n=function(t){if(t instanceof n)return t;if(!(this instanceof n))return new n(t);this._wrapped=t},e,t,h,f,b,k,d,c,ct,l;typeof exports!="undefined"?(typeof module!="undefined"&&module.exports&&(exports=module.exports=n),exports._=n):a._=n;n.VERSION="1.8.3";e=function(n,t,i){if(t===void 0)return n;switch(i==null?3:i){case 1:return function(i){return n.call(t,i)};case 2:return function(i,r){return n.call(t,i,r)};case 3:return function(i,r,u){return n.call(t,i,r,u)};case 4:return function(i,r,u,f){return n.call(t,i,r,u,f)}}return function(){return n.apply(t,arguments)}};t=function(t,i,r){return t==null?n.identity:n.isFunction(t)?e(t,i,r):n.isObject(t)?n.matcher(t):n.property(t)};n.iteratee=function(n,i){return t(n,i,Infinity)};var w=function(n,t){return function(i){var e=arguments.length,r,u,f;if(e<2||i==null)return i;for(r=1;r<e;r++){var o=arguments[r],s=n(o),h=s.length;for(u=0;u<h;u++)f=s[u],t&&i[f]!==void 0||(i[f]=o[f])}return i}},it=function(t){if(!n.isObject(t))return{};if(tt)return tt(t);p.prototype=t;var i=new p;return p.prototype=null,i},rt=function(n){return function(t){if(t!=null)return t[n]}},wt=Math.pow(2,53)-1,u=rt("length"),i=function(n){var t=u(n);return typeof t=="number"&&t>=0&&t<=wt};n.each=n.forEach=function(t,r,u){var f,o,s;if(r=e(r,u),i(t))for(f=0,o=t.length;f<o;f++)r(t[f],f,t);else for(s=n.keys(t),f=0,o=s.length;f<o;f++)r(t[s[f]],s[f],t);return t};n.map=n.collect=function(r,u,f){var e,s;u=t(u,f);var o=!i(r)&&n.keys(r),h=(o||r).length,c=Array(h);for(e=0;e<h;e++)s=o?o[e]:e,c[e]=u(r[s],s,r);return c};n.reduce=n.foldl=n.inject=ut(1);n.reduceRight=n.foldr=ut(-1);n.find=n.detect=function(t,r,u){var f;return f=i(t)?n.findIndex(t,r,u):n.findKey(t,r,u),f!==void 0&&f!==-1?t[f]:void 0};n.filter=n.select=function(i,r,u){var f=[];return r=t(r,u),n.each(i,function(n,t,i){r(n,t,i)&&f.push(n)}),f};n.reject=function(i,r,u){return n.filter(i,n.negate(t(r)),u)};n.every=n.all=function(r,u,f){var o,h,e,s;for(u=t(u,f),o=!i(r)&&n.keys(r),h=(o||r).length,e=0;e<h;e++)if(s=o?o[e]:e,!u(r[s],s,r))return!1;return!0};n.some=n.any=function(r,u,f){var o,h,e,s;for(u=t(u,f),o=!i(r)&&n.keys(r),h=(o||r).length,e=0;e<h;e++)if(s=o?o[e]:e,u(r[s],s,r))return!0;return!1};n.contains=n.includes=n.include=function(t,r,u,f){return i(t)||(t=n.values(t)),(typeof u!="number"||f)&&(u=0),n.indexOf(t,r,u)>=0};n.invoke=function(t,i){var u=r.call(arguments,2),f=n.isFunction(i);return n.map(t,function(n){var t=f?i:n[i];return t==null?t:t.apply(n,u)})};n.pluck=function(t,i){return n.map(t,n.property(i))};n.where=function(t,i){return n.filter(t,n.matcher(i))};n.findWhere=function(t,i){return n.find(t,n.matcher(i))};n.max=function(r,u,f){var e=-Infinity,c=-Infinity,h,o,s,l;if(u==null&&r!=null)for(r=i(r)?r:n.values(r),s=0,l=r.length;s<l;s++)h=r[s],h>e&&(e=h);else u=t(u,f),n.each(r,function(n,t,i){o=u(n,t,i);(o>c||o===-Infinity&&e===-Infinity)&&(e=n,c=o)});return e};n.min=function(r,u,f){var e=Infinity,c=Infinity,h,o,s,l;if(u==null&&r!=null)for(r=i(r)?r:n.values(r),s=0,l=r.length;s<l;s++)h=r[s],h<e&&(e=h);else u=t(u,f),n.each(r,function(n,t,i){o=u(n,t,i);(o<c||o===Infinity&&e===Infinity)&&(e=n,c=o)});return e};n.shuffle=function(t){for(var e=i(t)?t:n.values(t),o=e.length,u=Array(o),r=0,f;r<o;r++)f=n.random(0,r),f!==r&&(u[r]=u[f]),u[f]=e[r];return u};n.sample=function(t,r,u){return r==null||u?(i(t)||(t=n.values(t)),t[n.random(t.length-1)]):n.shuffle(t).slice(0,Math.max(0,r))};n.sortBy=function(i,r,u){return r=t(r,u),n.pluck(n.map(i,function(n,t,i){return{value:n,index:t,criteria:r(n,t,i)}}).sort(function(n,t){var i=n.criteria,r=t.criteria;if(i!==r){if(i>r||i===void 0)return 1;if(i<r||r===void 0)return-1}return n.index-t.index}),"value")};h=function(i){return function(r,u,f){var e={};return u=t(u,f),n.each(r,function(n,t){var f=u(n,t,r);i(e,n,f)}),e}};n.groupBy=h(function(t,i,r){n.has(t,r)?t[r].push(i):t[r]=[i]});n.indexBy=h(function(n,t,i){n[i]=t});n.countBy=h(function(t,i,r){n.has(t,r)?t[r]++:t[r]=1});n.toArray=function(t){return t?n.isArray(t)?r.call(t):i(t)?n.map(t,n.identity):n.values(t):[]};n.size=function(t){return t==null?0:i(t)?t.length:n.keys(t).length};n.partition=function(i,r,u){r=t(r,u);var f=[],e=[];return n.each(i,function(n,t,i){(r(n,t,i)?f:e).push(n)}),[f,e]};n.first=n.head=n.take=function(t,i,r){if(t!=null)return i==null||r?t[0]:n.initial(t,t.length-i)};n.initial=function(n,t,i){return r.call(n,0,Math.max(0,n.length-(t==null||i?1:t)))};n.last=function(t,i,r){if(t!=null)return i==null||r?t[t.length-1]:n.rest(t,Math.max(0,t.length-i))};n.rest=n.tail=n.drop=function(n,t,i){return r.call(n,t==null||i?1:t)};n.compact=function(t){return n.filter(t,n.identity)};f=function(t,r,e,o){for(var s,l,a,h=[],v=0,c=o||0,y=u(t);c<y;c++)if(s=t[c],i(s)&&(n.isArray(s)||n.isArguments(s)))for(r||(s=f(s,r,e)),l=0,a=s.length,h.length+=a;l<a;)h[v++]=s[l++];else e||(h[v++]=s);return h};n.flatten=function(n,t){return f(n,t,!1)};n.without=function(t){return n.difference(t,r.call(arguments,1))};n.uniq=n.unique=function(i,r,f,e){var s,c,h,a,o,l;for(n.isBoolean(r)||(e=f,f=r,r=!1),f!=null&&(f=t(f,e)),s=[],c=[],h=0,a=u(i);h<a;h++)o=i[h],l=f?f(o,h,i):o,r?(h&&c===l||s.push(o),c=l):f?n.contains(c,l)||(c.push(l),s.push(o)):n.contains(s,o)||s.push(o);return s};n.union=function(){return n.uniq(f(arguments,!0,!0))};n.intersection=function(t){for(var r,i,f=[],o=arguments.length,e=0,s=u(t);e<s;e++)if(r=t[e],!n.contains(f,r)){for(i=1;i<o;i++)if(!n.contains(arguments[i],r))break;i===o&&f.push(r)}return f};n.difference=function(t){var i=f(arguments,!0,!0,1);return n.filter(t,function(t){return!n.contains(i,t)})};n.zip=function(){return n.unzip(arguments)};n.unzip=function(t){for(var r=t&&n.max(t,u).length||0,f=Array(r),i=0;i<r;i++)f[i]=n.pluck(t,i);return f};n.object=function(n,t){for(var r={},i=0,f=u(n);i<f;i++)t?r[n[i]]=t[i]:r[n[i][0]]=n[i][1];return r};n.findIndex=ft(1);n.findLastIndex=ft(-1);n.sortedIndex=function(n,i,r,f){var o;r=t(r,f,1);for(var h=r(i),e=0,s=u(n);e<s;)o=Math.floor((e+s)/2),r(n[o])<h?e=o+1:s=o;return e};n.indexOf=et(1,n.findIndex,n.sortedIndex);n.lastIndexOf=et(-1,n.findLastIndex);n.range=function(n,t,i){var u,f,r;for(t==null&&(t=n||0,n=0),i=i||1,u=Math.max(Math.ceil((t-n)/i),0),f=Array(u),r=0;r<u;r++,n+=i)f[r]=n;return f};b=function(t,i,r,u,f){if(!(u instanceof i))return t.apply(r,f);var e=it(t.prototype),o=t.apply(e,f);return n.isObject(o)?o:e};n.bind=function(t,i){if(y&&t.bind===y)return y.apply(t,r.call(arguments,1));if(!n.isFunction(t))throw new TypeError("Bind must be called on a function");var f=r.call(arguments,2),u=function(){return b(t,u,i,this,f.concat(r.call(arguments)))};return u};n.partial=function(t){var i=r.call(arguments,1),u=function(){for(var f=0,o=i.length,e=Array(o),r=0;r<o;r++)e[r]=i[r]===n?arguments[f++]:i[r];while(f<arguments.length)e.push(arguments[f++]);return b(t,u,this,this,e)};return u};n.bindAll=function(t){var i,u=arguments.length,r;if(u<=1)throw new Error("bindAll must be passed function names");for(i=1;i<u;i++)r=arguments[i],t[r]=n.bind(t[r],t);return t};n.memoize=function(t,i){var r=function(u){var f=r.cache,e=""+(i?i.apply(this,arguments):u);return n.has(f,e)||(f[e]=t.apply(this,arguments)),f[e]};return r.cache={},r};n.delay=function(n,t){var i=r.call(arguments,2);return setTimeout(function(){return n.apply(null,i)},t)};n.defer=n.partial(n.delay,n,1);n.throttle=function(t,i,r){var f,e,s,u=null,o=0,h;return r||(r={}),h=function(){o=r.leading===!1?0:n.now();u=null;s=t.apply(f,e);u||(f=e=null)},function(){var l=n.now(),c;return o||r.leading!==!1||(o=l),c=i-(l-o),f=this,e=arguments,c<=0||c>i?(u&&(clearTimeout(u),u=null),o=l,s=t.apply(f,e),u||(f=e=null)):u||r.trailing===!1||(u=setTimeout(h,c)),s}};n.debounce=function(t,i,r){var u,f,e,s,o,h=function(){var c=n.now()-s;c<i&&c>=0?u=setTimeout(h,i-c):(u=null,r||(o=t.apply(e,f),u||(e=f=null)))};return function(){e=this;f=arguments;s=n.now();var c=r&&!u;return u||(u=setTimeout(h,i)),c&&(o=t.apply(e,f),e=f=null),o}};n.wrap=function(t,i){return n.partial(i,t)};n.negate=function(n){return function(){return!n.apply(this,arguments)}};n.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,i=n[t].apply(this,arguments);r--;)i=n[r].call(this,i);return i}};n.after=function(n,t){return function(){if(--n<1)return t.apply(this,arguments)}};n.before=function(n,t){var i;return function(){return--n>0&&(i=t.apply(this,arguments)),n<=1&&(t=null),i}};n.once=n.partial(n.before,2);k=!{toString:null}.propertyIsEnumerable("toString");d=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];n.keys=function(t){var i,r;if(!n.isObject(t))return[];if(nt)return nt(t);i=[];for(r in t)n.has(t,r)&&i.push(r);return k&&ot(t,i),i};n.allKeys=function(t){var i,r;if(!n.isObject(t))return[];i=[];for(r in t)i.push(r);return k&&ot(t,i),i};n.values=function(t){for(var r=n.keys(t),u=r.length,f=Array(u),i=0;i<u;i++)f[i]=t[r[i]];return f};n.mapObject=function(i,r,u){var e;r=t(r,u);var o=n.keys(i),h=o.length,s={},f;for(e=0;e<h;e++)f=o[e],s[f]=r(i[f],f,i);return s};n.pairs=function(t){for(var r=n.keys(t),u=r.length,f=Array(u),i=0;i<u;i++)f[i]=[r[i],t[r[i]]];return f};n.invert=function(t){for(var u={},r=n.keys(t),i=0,f=r.length;i<f;i++)u[t[r[i]]]=r[i];return u};n.functions=n.methods=function(t){var i=[];for(var r in t)n.isFunction(t[r])&&i.push(r);return i.sort()};n.extend=w(n.allKeys);n.extendOwn=n.assign=w(n.keys);n.findKey=function(i,r,u){var o,f,e,s;for(r=t(r,u),o=n.keys(i),e=0,s=o.length;e<s;e++)if(f=o[e],r(i[f],f,i))return f};n.pick=function(t,i,r){var c={},u=t,l,o,s,v,h,a;if(u==null)return c;for(n.isFunction(i)?(o=n.allKeys(u),l=e(i,r)):(o=f(arguments,!1,!1,1),l=function(n,t,i){return t in i},u=Object(u)),s=0,v=o.length;s<v;s++)h=o[s],a=u[h],l(a,h,u)&&(c[h]=a);return c};n.omit=function(t,i,r){if(n.isFunction(i))i=n.negate(i);else{var u=n.map(f(arguments,!1,!1,1),String);i=function(t,i){return!n.contains(u,i)}}return n.pick(t,i,r)};n.defaults=w(n.allKeys,!0);n.create=function(t,i){var r=it(t);return i&&n.extendOwn(r,i),r};n.clone=function(t){return n.isObject(t)?n.isArray(t)?t.slice():n.extend({},t):t};n.tap=function(n,t){return t(n),n};n.isMatch=function(t,i){var e=n.keys(i),o=e.length,f,r,u;if(t==null)return!o;for(f=Object(t),r=0;r<o;r++)if(u=e[r],i[u]!==f[u]||!(u in f))return!1;return!0};c=function(t,i,r,u){var h,a,e,s,f,v,l;if(t===i)return t!==0||1/t==1/i;if(t==null||i==null)return t===i;if(t instanceof n&&(t=t._wrapped),i instanceof n&&(i=i._wrapped),h=o.call(t),h!==o.call(i))return!1;switch(h){case"[object RegExp]":case"[object String]":return""+t==""+i;case"[object Number]":return+t!=+t?+i!=+i:+t==0?1/+t==1/i:+t==+i;case"[object Date]":case"[object Boolean]":return+t==+i}if(a=h==="[object Array]",!a&&(typeof t!="object"||typeof i!="object"||(e=t.constructor,s=i.constructor,e!==s&&!(n.isFunction(e)&&e instanceof e&&n.isFunction(s)&&s instanceof s)&&"constructor"in t&&"constructor"in i)))return!1;for(r=r||[],u=u||[],f=r.length;f--;)if(r[f]===t)return u[f]===i;if(r.push(t),u.push(i),a){if(f=t.length,f!==i.length)return!1;while(f--)if(!c(t[f],i[f],r,u))return!1}else{if(v=n.keys(t),f=v.length,n.keys(i).length!==f)return!1;while(f--)if(l=v[f],!(n.has(i,l)&&c(t[l],i[l],r,u)))return!1}return r.pop(),u.pop(),!0};n.isEqual=function(n,t){return c(n,t)};n.isEmpty=function(t){return t==null?!0:i(t)&&(n.isArray(t)||n.isString(t)||n.isArguments(t))?t.length===0:n.keys(t).length===0};n.isElement=function(n){return!!(n&&n.nodeType===1)};n.isArray=pt||function(n){return o.call(n)==="[object Array]"};n.isObject=function(n){var t=typeof n;return t==="function"||t==="object"&&!!n};n.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){n["is"+t]=function(n){return o.call(n)==="[object "+t+"]"}});n.isArguments(arguments)||(n.isArguments=function(t){return n.has(t,"callee")});typeof/./!="function"&&typeof Int8Array!="object"&&(n.isFunction=function(n){return typeof n=="function"||!1});n.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))};n.isNaN=function(t){return n.isNumber(t)&&t!==+t};n.isBoolean=function(n){return n===!0||n===!1||o.call(n)==="[object Boolean]"};n.isNull=function(n){return n===null};n.isUndefined=function(n){return n===void 0};n.has=function(n,t){return n!=null&&yt.call(n,t)};n.noConflict=function(){return a._=lt,this};n.identity=function(n){return n};n.constant=function(n){return function(){return n}};n.noop=function(){};n.property=rt;n.propertyOf=function(n){return n==null?function(){}:function(t){return n[t]}};n.matcher=n.matches=function(t){return t=n.extendOwn({},t),function(i){return n.isMatch(i,t)}};n.times=function(n,t,i){var u=Array(Math.max(0,n)),r;for(t=e(t,i,1),r=0;r<n;r++)u[r]=t(r);return u};n.random=function(n,t){return t==null&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))};n.now=Date.now||function(){return(new Date).getTime()};var st={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},bt=n.invert(st),ht=function(t){var r=function(n){return t[n]},i="(?:"+n.keys(t).join("|")+")",u=RegExp(i),f=RegExp(i,"g");return function(n){return n=n==null?"":""+n,u.test(n)?n.replace(f,r):n}};n.escape=ht(st);n.unescape=ht(bt);n.result=function(t,i,r){var u=t==null?void 0:t[i];return u===void 0&&(u=r),n.isFunction(u)?u.call(t):u};ct=0;n.uniqueId=function(n){var t=++ct+"";return n?n+t:t};n.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var g=/(.)^/,kt={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},dt=/\\|'|\r|\n|\u2028|\u2029/g,gt=function(n){return"\\"+kt[n]};n.template=function(t,i,r){var o,f,h;!i&&r&&(i=r);i=n.defaults({},i,n.templateSettings);var c=RegExp([(i.escape||g).source,(i.interpolate||g).source,(i.evaluate||g).source].join("|")+"|$","g"),e=0,u="__p+='";t.replace(c,function(n,i,r,f,o){return u+=t.slice(e,o).replace(dt,gt),e=o+n.length,i?u+="'+\n((__t=("+i+"))==null?'':_.escape(__t))+\n'":r?u+="'+\n((__t=("+r+"))==null?'':__t)+\n'":f&&(u+="';\n"+f+"\n__p+='"),n});u+="';\n";i.variable||(u="with(obj||{}){\n"+u+"}\n");u="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+u+"return __p;\n";try{o=new Function(i.variable||"obj","_",u)}catch(s){s.source=u;throw s;}return f=function(t){return o.call(this,t,n)},h=i.variable||"obj",f.source="function("+h+"){\n"+u+"}",f};n.chain=function(t){var i=n(t);return i._chain=!0,i};l=function(t,i){return t._chain?n(i).chain():i};n.mixin=function(t){n.each(n.functions(t),function(i){var r=n[i]=t[i];n.prototype[i]=function(){var t=[this._wrapped];return vt.apply(t,arguments),l(this,r.apply(n,t))}})};n.mixin(n);n.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var i=s[t];n.prototype[t]=function(){var n=this._wrapped;return i.apply(n,arguments),(t==="shift"||t==="splice")&&n.length===0&&delete n[0],l(this,n)}});n.each(["concat","join","slice"],function(t){var i=s[t];n.prototype[t]=function(){return l(this,i.apply(this._wrapped,arguments))}});n.prototype.value=function(){return this._wrapped};n.prototype.valueOf=n.prototype.toJSON=n.prototype.value;n.prototype.toString=function(){return""+this._wrapped};typeof define=="function"&&define.amd&&define("underscore",[],function(){return n})}.call(this),function(){"use strict";function p(n){return n=String(n),n.charAt(0).toUpperCase()+n.slice(1)}function tt(n,t,i){var r={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return t&&i&&/^Win/i.test(n)&&!/^Windows Phone /i.test(n)&&(r=r[/[\d.]+$/.exec(n)])&&(n="Windows "+r),n=String(n),t&&i&&(n=n.replace(RegExp(t,"i"),i)),o(n.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}function it(n,t){var r=-1,i=n?n.length:0;if(typeof i=="number"&&i>-1&&i<=d)while(++r<i)t(n[r],r,n);else s(n,t)}function o(n){return n=b(n),/^(?:webOS|i(?:OS|P))/.test(n)?n:p(n)}function s(n,t){for(var i in n)nt.call(n,i)&&t(n[i],i,n)}function t(n){return n==null?p(n):y.call(n).slice(8,-1)}function w(n,t){var i=n!=null?typeof n[t]:"number";return!/^(?:boolean|number|string|undefined)$/.test(i)&&(i=="object"?!!n[t]:!0)}function i(n){return String(n).replace(/([ -])(?!$)/g,"$1?")}function r(n,t){var i=null;return it(n,function(r,u){i=t(i,r,u,n)}),i}function b(n){return String(n).replace(/^ +| +$/g,"")}function h(n){function fi(t){return r(t,function(t,r){return t||RegExp("\\b"+(r.pattern||i(r))+"\\b","i").exec(n)&&(r.label||r)})}function ei(t){return r(t,function(t,r,u){return t||(r[p]||r[/^[a-z]+(?: +[a-z]+\b)*/i.exec(p)]||RegExp("\\b"+i(u)+"(?:\\b|\\w*\\d)","i").exec(n))&&u})}function oi(t){return r(t,function(t,r){return t||RegExp("\\b"+(r.pattern||i(r))+"\\b","i").exec(n)&&(r.label||r)})}function si(t){return r(t,function(t,r){var u=r.pattern||i(r);return!t&&(t=RegExp("\\b"+u+"(?:/[\\d.]+|[ \\w.]*)","i").exec(n))&&(t=tt(t,u,r.label||r)),t})}function wt(t){return r(t,function(t,r){var u=r.pattern||i(r);return!t&&(t=RegExp("\\b"+u+" *\\d+[.\\w_]*","i").exec(n)||RegExp("\\b"+u+" *\\w+-[\\w]*","i").exec(n)||RegExp("\\b"+u+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(n))&&((t=String(r.label&&!RegExp(u,"i").test(r.label)?r.label:t).split("/"))[1]&&!/[\d.]+/.test(t[0])&&(t[0]+=" "+t[1]),r=r.label||r,t=o(t[0].replace(RegExp(u,"i"),r).replace(RegExp("; *(?:"+r+"[_-])?","i")," ").replace(RegExp("("+r+")[-_.]?(\\w)","i"),"$1 $2"))),t})}function hi(t){return r(t,function(t,i){return t||(RegExp(i+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(n)||0)[1]||null})}function ci(){return this.description||""}var nt=u,ut=n&&typeof n=="object"&&t(n)!="String",ot,at,it;ut&&(nt=n,n=null);ot=nt.navigator||{};at=ot.userAgent||"";n||(n=at);var bt=ut||g==k,kt=ut?!!ot.likeChrome:/\bChrome\b/.test(n)&&!/internal|\n/i.test(y.toString()),vt="Object",dt=ut?vt:"ScriptBridgingProxyObject",gt=ut?vt:"Environment",ni=ut&&nt.java?"JavaPackage":t(nt.java),ti=ut?vt:"RuntimeObject",st=/\bJava/.test(ni)&&nt.java,ii=st&&t(nt.environment)==gt,ri=st?"a":"α",ui=st?"b":"β",yt=nt.document||{},ft=nt.operamini||nt.opera,ht=e.test(ht=ut&&ft?ft["[[Class]]"]:t(ft))?ht:ft=null,f,ct=n,v=[],lt=null,et=n==at,a=et&&ft&&typeof ft.version=="function"&&ft.version(),pt,d=fi([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),c=oi(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),p=wt([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),rt=ei({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}}),l=si(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);if(d&&(d=[d]),rt&&!p&&(p=wt([rt])),(f=/\bGoogle TV\b/.exec(p))&&(p=f[0]),/\bSimulator\b/i.test(n)&&(p=(p?p+" ":"")+"Simulator"),c=="Opera Mini"&&/\bOPiOS\b/.test(n)&&v.push("running in Turbo/Uncompressed mode"),c=="IE"&&/\blike iPhone OS\b/.test(n)?(f=h(n.replace(/like iPhone OS/,"")),rt=f.manufacturer,p=f.product):/^iP/.test(p)?(c||(c="Safari"),l="iOS"+((f=/ OS ([\d_]+)/i.exec(n))?" "+f[1].replace(/_/g,"."):"")):c!="Konqueror"||/buntu/i.test(l)?rt&&rt!="Google"&&(/Chrome/.test(c)&&!/\bMobile Safari\b/i.test(n)||/\bVita\b/.test(p))||/\bAndroid\b/.test(l)&&/^Chrome/.test(c)&&/\bVersion\//i.test(n)?(c="Android Browser",l=/\bAndroid\b/.test(l)?l:"Android"):c=="Silk"?(/\bMobi/i.test(n)||(l="Android",v.unshift("desktop mode")),/Accelerated *= *true/i.test(n)&&v.unshift("accelerated")):c=="PaleMoon"&&(f=/\bFirefox\/([\d.]+)\b/.exec(n))?v.push("identifying as Firefox "+f[1]):c=="Firefox"&&(f=/\b(Mobile|Tablet|TV)\b/i.exec(n))?(l||(l="Firefox OS"),p||(p=f[1])):!c||(f=!/\bMinefield\b/i.test(n)&&/\b(?:Firefox|Safari)\b/.exec(c))?(c&&!p&&/[\/,]|^[^(]+?\)/.test(n.slice(n.indexOf(f+"/")+8))&&(c=null),(f=p||rt||l)&&(p||rt||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(l))&&(c=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(l)?l:f)+" Browser")):c=="Electron"&&(f=(/\bChrome\/([\d.]+)\b/.exec(n)||0)[1])&&v.push("Chromium "+f):l="Kubuntu",a||(a=hi(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",i(c),"(?:Firefox|Minefield|NetFront)"])),(f=d=="iCab"&&parseFloat(a)>3&&"WebKit"||/\bOpera\b/.test(c)&&(/\bOPR\b/.test(n)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(n)&&!/^(?:Trident|EdgeHTML)$/.test(d)&&"WebKit"||!d&&/\bMSIE\b/i.test(n)&&(l=="Mac OS"?"Tasman":"Trident")||d=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(c)&&"NetFront")&&(d=[f]),c=="IE"&&(f=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(n)||0)[1])?(c+=" Mobile",l="Windows Phone "+(/\+$/.test(f)?f:f+".x"),v.unshift("desktop mode")):/\bWPDesktop\b/i.test(n)?(c="IE Mobile",l="Windows Phone 8.x",v.unshift("desktop mode"),a||(a=(/\brv:([\d.]+)/.exec(n)||0)[1])):c!="IE"&&d=="Trident"&&(f=/\brv:([\d.]+)/.exec(n))&&(c&&v.push("identifying as "+c+(a?" "+a:"")),c="IE",a=f[1]),et){if(w(nt,"global"))if(st&&(f=st.lang.System,ct=f.getProperty("os.arch"),l=l||f.getProperty("os.name")+" "+f.getProperty("os.version")),bt&&w(nt,"system")&&(f=[nt.system])[0]){l||(l=f[0].os||null);try{f[1]=nt.require("ringo/engine").version;a=f[1].join(".");c="RingoJS"}catch(li){f[0].global.system==nt.system&&(c="Narwhal")}}else typeof nt.process=="object"&&!nt.process.browser&&(f=nt.process)?typeof f.versions=="object"?typeof f.versions.electron=="string"?(v.push("Node "+f.versions.node),c="Electron",a=f.versions.electron):typeof f.versions.nw=="string"&&(v.push("Chromium "+a,"Node "+f.versions.node),c="NW.js",a=f.versions.nw):(c="Node.js",ct=f.arch,l=f.platform,a=/[\d.]+/.exec(f.version),a=a?a[0]:"unknown"):ii&&(c="Rhino");else t(f=nt.runtime)==dt?(c="Adobe AIR",l=f.flash.system.Capabilities.os):t(f=nt.phantom)==ti?(c="PhantomJS",a=(f=f.version||null)&&f.major+"."+f.minor+"."+f.patch):typeof yt.documentMode=="number"&&(f=/\bTrident\/(\d+)/i.exec(n))?(a=[a,yt.documentMode],(f=+f[1]+4)!=a[1]&&(v.push("IE "+a[1]+" mode"),d&&(d[1]=""),a[1]=f),a=c=="IE"?String(a[1].toFixed(1)):a[0]):typeof yt.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(c)&&(v.push("masking as "+c+" "+a),c="IE",a="11.0",d=["Trident"],l="Windows");l=l&&o(l)}if(a&&(f=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(a)||/(?:alpha|beta)(?: ?\d)?/i.exec(n+";"+(et&&ot.appMinorVersion))||/\bMinefield\b/i.test(n)&&"a")&&(lt=/b/i.test(f)?"beta":"alpha",a=a.replace(RegExp(f+"\\+?$"),"")+(lt=="beta"?ui:ri)+(/\d+\+?/.exec(f)||"")),c=="Fennec"||c=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(l))c="Firefox Mobile";else if(c=="Maxthon"&&a)a=a.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(p))p=="Xbox 360"&&(l=null),p=="Xbox 360"&&/\bIEMobile\b/.test(n)&&v.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(c)||c&&!p&&!/Browser|Mobi/.test(c))&&(l=="Windows CE"||/Mobi/i.test(n)))c+=" Mobile";else if(c=="IE"&&et)try{nt.external===null&&v.unshift("platform preview")}catch(li){v.unshift("embedded")}else(/\bBlackBerry\b/.test(p)||/\bBB10\b/.test(n))&&(f=(RegExp(p.replace(/ +/g," *")+"/([.\\d]+)","i").exec(n)||0)[1]||a)?(f=[f,/BB10/.test(n)],l=(f[1]?(p=null,rt="BlackBerry"):"Device Software")+" "+f[0],a=null):this!=s&&p!="Wii"&&(et&&ft||/Opera/.test(c)&&/\b(?:MSIE|Firefox)\b/i.test(n)||c=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(l)||c=="IE"&&(l&&!/^Win/.test(l)&&a>5.5||/\bWindows XP\b/.test(l)&&a>8||a==8&&!/\bTrident\b/.test(n)))&&!e.test(f=h.call(s,n.replace(e,"")+";"))&&f.name&&(f="ing as "+f.name+((f=f.version)?" "+f:""),e.test(c)?(/\bIE\b/.test(f)&&l=="Mac OS"&&(l=null),f="identify"+f):(f="mask"+f,c=ht?o(ht.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(f)&&(l=null),et||(a=null)),d=["Presto"],v.push(f));return(f=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(n)||0)[1])&&(f=[parseFloat(f.replace(/\.(\d)$/,".0$1")),f],c=="Safari"&&f[1].slice(-1)=="+"?(c="WebKit Nightly",lt="alpha",a=f[1].slice(0,-1)):(a==f[1]||a==(f[2]=(/\bSafari\/([\d.]+\+?)/i.exec(n)||0)[1]))&&(a=null),f[1]=(/\bChrome\/([\d.]+)/i.exec(n)||0)[1],f[0]==537.36&&f[2]==537.36&&parseFloat(f[1])>=28&&d=="WebKit"&&(d=["Blink"]),et&&(kt||f[1])?(d&&(d[1]="like Chrome"),f=f[1]||(f=f[0],f<530?1:f<532?2:f<532.05?3:f<533?4:f<534.03?5:f<534.07?6:f<534.1?7:f<534.13?8:f<534.16?9:f<534.24?10:f<534.3?11:f<535.01?12:f<535.02?"13+":f<535.07?15:f<535.11?16:f<535.19?17:f<536.05?18:f<536.1?19:f<537.01?20:f<537.11?"21+":f<537.13?23:f<537.18?24:f<537.24?25:f<537.36?26:d!="Blink"?"27":"28")):(d&&(d[1]="like Safari"),f=(f=f[0],f<400?1:f<500?2:f<526?3:f<533?4:f<534?"4+":f<535?5:f<537?6:f<538?7:f<601?8:"8")),d&&(d[1]+=" "+(f+=typeof f=="number"?".x":/[.+]/.test(f)?"":"+")),c=="Safari"&&(!a||parseInt(a)>45)&&(a=f)),c=="Opera"&&(f=/\bzbov|zvav$/.exec(l))?(c+=" ",v.unshift("desktop mode"),f=="zvav"?(c+="Mini",a=null):c+="Mobile",l=l.replace(RegExp(" *"+f+"$"),"")):c=="Safari"&&/\bChrome\b/.exec(d&&d[1])&&(v.unshift("desktop mode"),c="Chrome Mobile",a=null,/\bOS X\b/.test(l)?(rt="Apple",l="iOS 4.3+"):l=null),a&&a.indexOf(f=/[\d.]+$/.exec(l))==0&&n.indexOf("/"+f+"-")>-1&&(l=b(l.replace(f,""))),d&&!/\b(?:Avant|Nook)\b/.test(c)&&(/Browser|Lunascape|Maxthon/.test(c)||c!="Safari"&&/^iOS/.test(l)&&/\bSafari\b/.test(d[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(c)&&d[1])&&(f=d[d.length-1])&&v.push(f),v.length&&(v=["("+v.join("; ")+")"]),rt&&p&&p.indexOf(rt)<0&&v.push("on "+rt),p&&v.push((/^on /.test(v[v.length-1])?"":"on ")+p),l&&(f=/ ([\d.+]+)$/.exec(l),pt=f&&l.charAt(l.length-f[0].length-1)=="/",l={architecture:32,family:f&&!pt?l.replace(f[0],""):l,version:f?f[1]:null,toString:function(){var n=this.version;return this.family+(n&&!pt?" "+n:"")+(this.architecture==64?" 64-bit":"")}}),(f=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(ct))&&!/\bi686\b/i.test(ct)?(l&&(l.architecture=64,l.family=l.family.replace(RegExp(" *"+f),"")),c&&(/\bWOW64\b/i.test(n)||et&&/\w(?:86|32)$/.test(ot.cpuClass||ot.platform)&&!/\bWin64; x64\b/i.test(n))&&v.unshift("32-bit")):l&&/^OS X/.test(l.family)&&c=="Chrome"&&parseFloat(a)>=39&&(l.architecture=64),n||(n=null),it={},it.description=n,it.layout=d&&d[0],it.manufacturer=rt,it.name=c,it.prerelease=lt,it.product=p,it.ua=n,it.version=c&&a,it.os=l||{architecture:null,family:null,version:null,toString:function(){return"null"}},it.parse=h,it.toString=ci,it.version&&v.unshift(a),it.name&&v.unshift(c),!l||!c||l==String(l).split(" ")[0]&&(l==c.split(" ")[0]||p)||v.push(p?"("+l+")":"on "+l),v.length&&(it.description=v.join(" ")),it}var c={"function":!0,object:!0},u=c[typeof window]&&window||this,k=u,l=c[typeof exports]&&exports,a=c[typeof module]&&module&&!module.nodeType&&module,n=l&&a&&typeof global=="object"&&global,f;n&&(n.global===n||n.window===n||n.self===n)&&(u=n);var d=Math.pow(2,53)-1,e=/\bOpera/,g=this,v=Object.prototype,nt=v.hasOwnProperty,y=v.toString;f=h();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(u.platform=f,define(function(){return f})):l&&a?s(f,function(n,t){l[t]=n}):u.platform=f}.call(this),function(){"use strict";function n(t,r){function h(n,t){return function(){return n.apply(t,arguments)}}var o,f,e,u,s;if(r=r||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=r.touchBoundary||10,this.layer=t,this.tapDelay=r.tapDelay||200,this.tapTimeout=r.tapTimeout||700,!n.notNeeded(t)){for(f=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],e=this,u=0,s=f.length;u<s;u++)e[f[u]]=h(e[f[u]],e);i&&(t.addEventListener("mouseover",this.onMouse,!0),t.addEventListener("mousedown",this.onMouse,!0),t.addEventListener("mouseup",this.onMouse,!0));t.addEventListener("click",this.onClick,!0);t.addEventListener("touchstart",this.onTouchStart,!1);t.addEventListener("touchmove",this.onTouchMove,!1);t.addEventListener("touchend",this.onTouchEnd,!1);t.addEventListener("touchcancel",this.onTouchCancel,!1);Event.prototype.stopImmediatePropagation||(t.removeEventListener=function(n,i,r){var u=Node.prototype.removeEventListener;n==="click"?u.call(t,n,i.hijacked||i,r):u.call(t,n,i,r)},t.addEventListener=function(n,i,r){var u=Node.prototype.addEventListener;n==="click"?u.call(t,n,i.hijacked||(i.hijacked=function(n){n.propagationStopped||i(n)}),r):u.call(t,n,i,r)});typeof t.onclick=="function"&&(o=t.onclick,t.addEventListener("click",function(n){o(n)},!1),t.onclick=null)}}var r=navigator.userAgent.indexOf("Windows Phone")>=0,i=navigator.userAgent.indexOf("Android")>0&&!r,t=/iP(ad|hone|od)/.test(navigator.userAgent)&&!r,u=t&&/OS 4_\d(_\d)?/.test(navigator.userAgent),f=t&&/OS [6-7]_\d/.test(navigator.userAgent),e=navigator.userAgent.indexOf("BB10")>0;n.prototype.needsClick=function(n){switch(n.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(n.disabled)return!0;break;case"input":if(t&&n.type==="file"||n.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(n.className)};n.prototype.needsFocus=function(n){switch(n.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!i;case"input":switch(n.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!n.disabled&&!n.readOnly;default:return/\bneedsfocus\b/.test(n.className)}};n.prototype.sendClick=function(n,t){var r,i;document.activeElement&&document.activeElement!==n&&document.activeElement.blur();i=t.changedTouches[0];r=document.createEvent("MouseEvents");r.initMouseEvent(this.determineEventType(n),!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null);r.forwardedTouchEvent=!0;n.dispatchEvent(r)};n.prototype.determineEventType=function(n){return i&&n.tagName.toLowerCase()==="select"?"mousedown":"click"};n.prototype.focus=function(n){var i;t&&n.setSelectionRange&&n.type.indexOf("date")!==0&&n.type!=="time"&&n.type!=="month"?(i=n.value.length,n.setSelectionRange(i,i)):n.focus()};n.prototype.updateScrollParent=function(n){var i,t;if(i=n.fastClickScrollParent,!i||!i.contains(n)){t=n;do{if(t.scrollHeight>t.offsetHeight){i=t;n.fastClickScrollParent=t;break}t=t.parentElement}while(t)}i&&(i.fastClickLastScrollTop=i.scrollTop)};n.prototype.getTargetElementFromEventTarget=function(n){return n.nodeType===Node.TEXT_NODE?n.parentNode:n};n.prototype.onTouchStart=function(n){var r,i,f;if(n.targetTouches.length>1)return!0;if(r=this.getTargetElementFromEventTarget(n.target),i=n.targetTouches[0],t){if(f=window.getSelection(),f.rangeCount&&!f.isCollapsed)return!0;if(!u){if(i.identifier&&i.identifier===this.lastTouchIdentifier)return n.preventDefault(),!1;this.lastTouchIdentifier=i.identifier;this.updateScrollParent(r)}}return this.trackingClick=!0,this.trackingClickStart=n.timeStamp,this.targetElement=r,this.touchStartX=i.pageX,this.touchStartY=i.pageY,n.timeStamp-this.lastClickTime<this.tapDelay&&n.preventDefault(),!0};n.prototype.touchHasMoved=function(n){var t=n.changedTouches[0],i=this.touchBoundary;return Math.abs(t.pageX-this.touchStartX)>i||Math.abs(t.pageY-this.touchStartY)>i?!0:!1};n.prototype.onTouchMove=function(n){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(n.target)||this.touchHasMoved(n))&&(this.trackingClick=!1,this.targetElement=null),!0):!0};n.prototype.findControl=function(n){return n.control!==undefined?n.control:n.htmlFor?document.getElementById(n.htmlFor):n.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")};n.prototype.onTouchEnd=function(n){var s,c,e,o,h,r=this.targetElement;if(!this.trackingClick)return!0;if(n.timeStamp-this.lastClickTime<this.tapDelay)return this.cancelNextClick=!0,!0;if(n.timeStamp-this.trackingClickStart>this.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=n.timeStamp,c=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,f&&(h=n.changedTouches[0],r=document.elementFromPoint(h.pageX-window.pageXOffset,h.pageY-window.pageYOffset)||r,r.fastClickScrollParent=this.targetElement.fastClickScrollParent),e=r.tagName.toLowerCase(),e==="label"){if(s=this.findControl(r),s){if(this.focus(r),i)return!1;r=s}}else if(this.needsFocus(r))return n.timeStamp-c>100||t&&window.top!==window&&e==="input"?(this.targetElement=null,!1):(this.focus(r),this.sendClick(r,n),t&&e==="select"||(this.targetElement=null,n.preventDefault()),!1);return t&&!u&&(o=r.fastClickScrollParent,o&&o.fastClickLastScrollTop!==o.scrollTop)?!0:(this.needsClick(r)||(n.preventDefault(),this.sendClick(r,n)),!1)};n.prototype.onTouchCancel=function(){this.trackingClick=!1;this.targetElement=null};n.prototype.onMouse=function(n){return this.targetElement?n.forwardedTouchEvent?!0:n.cancelable?!this.needsClick(this.targetElement)||this.cancelNextClick?(n.stopImmediatePropagation?n.stopImmediatePropagation():n.propagationStopped=!0,n.stopPropagation(),n.preventDefault(),!1):!0:!0:!0};n.prototype.onClick=function(n){var t;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):n.target.type==="submit"&&n.detail===0?!0:(t=this.onMouse(n),t||(this.targetElement=null),t)};n.prototype.destroy=function(){var n=this.layer;i&&(n.removeEventListener("mouseover",this.onMouse,!0),n.removeEventListener("mousedown",this.onMouse,!0),n.removeEventListener("mouseup",this.onMouse,!0));n.removeEventListener("click",this.onClick,!0);n.removeEventListener("touchstart",this.onTouchStart,!1);n.removeEventListener("touchmove",this.onTouchMove,!1);n.removeEventListener("touchend",this.onTouchEnd,!1);n.removeEventListener("touchcancel",this.onTouchCancel,!1)};n.notNeeded=function(n){var t,r,u,f;if(typeof ontouchstart=="undefined")return!0;if(r=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],r)if(i){if(t=document.querySelector("meta[name=viewport]"),t&&(t.content.indexOf("user-scalable=no")!==-1||r>31&&document.documentElement.scrollWidth<=window.outerWidth))return!0}else return!0;return e&&(u=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),u[1]>=10&&u[2]>=3&&(t=document.querySelector("meta[name=viewport]"),t&&(t.content.indexOf("user-scalable=no")!==-1||document.documentElement.scrollWidth<=window.outerWidth)))?!0:n.style.msTouchAction==="none"||n.style.touchAction==="manipulation"?!0:(f=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],f>=27&&(t=document.querySelector("meta[name=viewport]"),t&&(t.content.indexOf("user-scalable=no")!==-1||document.documentElement.scrollWidth<=window.outerWidth)))?!0:n.style.touchAction==="none"||n.style.touchAction==="manipulation"?!0:!1};n.attach=function(t,i){return new n(t,i)};typeof define=="function"&&typeof define.amd=="object"&&define.amd?define(function(){return n}):typeof module!="undefined"&&module.exports?(module.exports=n.attach,module.exports.FastClick=n):window.FastClick=n}(),function(n,t,i){function e(n,t){return typeof n===t}function ut(){var i,n,u,f,o,s,t;for(var c in h)if(h.hasOwnProperty(c)){if(i=[],n=h[c],n.name&&(i.push(n.name.toLowerCase()),n.options&&n.options.aliases&&n.options.aliases.length))for(u=0;u<n.options.aliases.length;u++)i.push(n.options.aliases[u].toLowerCase());for(f=e(n.fn,"function")?n.fn():n.fn,o=0;o<i.length;o++)s=i[o],t=s.split("."),t.length===1?r[t[0]]=f:(!r[t[0]]||r[t[0]]instanceof Boolean||(r[t[0]]=new Boolean(r[t[0]])),r[t[0]][t[1]]=f),b.push((f?"":"no-")+t.join("-"))}}function s(){return typeof t.createElement!="function"?t.createElement(arguments[0]):a?t.createElementNS.call(t,"http://www.w3.org/2000/svg",arguments[0]):t.createElement.apply(t,arguments)}function ft(n,t){return!!~(""+n).indexOf(t)}function et(){var n=t.body;return n||(n=s(a?"svg":"body"),n.fake=!0),n}function k(n,i,r,u){var c="modernizr",e,a,l,v,h=s("div"),f=et();if(parseInt(r,10))while(r--)l=s("div"),l.id=u?u[r]:c+(r+1),h.appendChild(l);return e=s("style"),e.type="text/css",e.id="s"+c,(f.fake?f:h).appendChild(e),f.appendChild(h),e.styleSheet?e.styleSheet.cssText=n:e.appendChild(t.createTextNode(n)),h.id=c,f.fake&&(f.style.background="",f.style.overflow="hidden",v=o.style.overflow,o.style.overflow="hidden",o.appendChild(f)),a=i(h,n),f.fake?(f.parentNode.removeChild(f),o.style.overflow=v,o.offsetHeight):h.parentNode.removeChild(h),!!a}function d(n){return n.replace(/([A-Z])/g,function(n,t){return"-"+t.toLowerCase()}).replace(/^ms-/,"-ms-")}function ot(t,r){var f=t.length,u;if("CSS"in n&&"supports"in n.CSS){while(f--)if(n.CSS.supports(d(t[f]),r))return!0;return!1}if("CSSSupportsRule"in n){for(u=[];f--;)u.push("("+d(t[f])+":"+r+")");return u=u.join(" or "),k("@supports ("+u+") { #modernizr { position: absolute; } }",function(n){return getComputedStyle(n,null).position=="absolute"})}return i}function st(n){return n.replace(/([a-z])-([a-z])/g,function(n,t,i){return t+i.toUpperCase()}).replace(/^-/,"")}function ht(n,t,r,u){function l(){a&&(delete f.style,delete f.modElem)}var c,a,h,v,o,y,p;if(u=e(u,"undefined")?!1:u,!e(r,"undefined")&&(c=ot(n,r),!e(c,"undefined")))return c;for(p=["modernizr","tspan"];!f.style;)a=!0,f.modElem=s(p.shift()),f.style=f.modElem.style;for(v=n.length,h=0;h<v;h++)if(o=n[h],y=f.style[o],ft(o,"-")&&(o=st(o)),f.style[o]!==i){if(u||e(r,"undefined"))return l(),t=="pfx"?o:!0;try{f.style[o]=r}catch(w){}if(f.style[o]!=y)return l(),t=="pfx"?o:!0}return l(),!1}function ct(n,t){return function(){return n.apply(t,arguments)}}function lt(n,t,i){var r;for(var u in n)if(n[u]in t)return i===!1?n[u]:(r=t[n[u]],e(r,"function"))?ct(r,i||t):r;return!1}function g(n,t,i,r,u){var f=n.charAt(0).toUpperCase()+n.slice(1),o=(n+" "+y.join(f+" ")+f).split(" ");return e(t,"string")||e(t,"undefined")?ht(o,t,r,u):(o=(n+" "+w.join(f+" ")+f).split(" "),lt(o,t,i))}function nt(n,t,r){return g(n,i,i,t,r)}var h=[],u={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(n,t){var i=this;setTimeout(function(){t(i[n])},0)},addTest:function(n,t,i){h.push({name:n,fn:t,options:i})},addAsyncTest:function(n){h.push({name:null,fn:n})}},r=function(){},b,o,a,c,v,y,p,f,w,tt,it,rt,l;for(r.prototype=u,r=new r,b=[],o=t.documentElement,a=o.nodeName.toLowerCase()==="svg",c=u._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):[],u._prefixes=c,v="Moz O ms Webkit",y=u._config.usePrefixes?v.split(" "):[],u._cssomPrefixes=y,p={elem:s("modernizr")},r._q.push(function(){delete p.elem}),f={style:p.elem.style},r._q.unshift(function(){delete f.style}),w=u._config.usePrefixes?v.toLowerCase().split(" "):[],u._domPrefixes=w,u.testAllProps=g,u.testAllProps=nt,tt=("CSS"in n)&&("supports"in n.CSS),it=("supportsCSS"in n),r.addTest("supports",tt||it),r.addTest("cssfilters",function(){if(r.supports)return nt("filter","blur(2px)");var n=s("a");return n.style.cssText=c.join("filter:blur(2px); "),!!n.style.length&&(t.documentMode===i||t.documentMode>9)}),rt=u.testStyles=k,r.addTest("touchevents",function(){var i,r;return"ontouchstart"in n||n.DocumentTouch&&t instanceof DocumentTouch?i=!0:(r=["@media (",c.join("touch-enabled),("),"heartz",")","{#modernizr{top:9px;position:absolute}}"].join(""),rt(r,function(n){i=n.offsetTop===9})),i}),ut(),delete u.addTest,delete u.addAsyncTest,l=0;l<r._q.length;l++)r._q[l]();n.Modernizr=r}(window,document);window.onerror=function(n,t,i,r,u){var f={message:n,url:window.location.href,metaData:{type:"external error",fileUrl:t,fileName:typeof u=="object"?u.fileName:"",lineNumber:i,stackTrace:typeof u=="object"?u.stack:""}};window.qfx&&window.qfx.logger&&f&&window.qfx.logger.log(f,"Error")};angular.module("qfxWebFrameworkApp",["ngAnimate","ngCookies","ngMessages","ngRoute","ngSanitize","ngTouch","ngStorage","ngResize"]);angular.module("qfxWebFrameworkApp").provider("jQuery",["$windowProvider",function(n){var t=n.$get();this.$get=function(){return t.jQuery}}]);angular.module("qfxWebFrameworkApp").provider("underscore",[function(){this.$get=function(){return window._}}]);angular.module("qfxWebFrameworkApp").factory("qfxAppConfig",["$window",function(n){return n.qfx?n.qfx.appConfig||{}:{}}]);angular.module("qfxWebFrameworkApp").filter("trustHtml",["$sce",function(n){return function(t){return n.trustAsHtml(t)}}]);angular.module("qfxWebFrameworkApp").filter("trustUrl",["$sce",function(n){return function(t){return n.trustAsResourceUrl(t)}}]);angular.module("qfxWebFrameworkApp").config(["$provide",function(n){n.decorator("$exceptionHandler",["$delegate","$injector",function(n,t){return function(i,r){try{var s=t.get("$window"),f=t.get("serilogService"),e=t.get("$location"),u={url:e.absUrl(),metaData:{type:"application exception",fileName:i.fileName,lineNumber:i.lineNumber,stackTrace:i.stack}};typeof i=="object"&&i.message?u.message=i.message:typeof i=="string"&&(u.message=i);f.error(u)}catch(o){console&&console.log&&console.log(o)}n(i,r)}}])}]);angular.module("qfxWebFrameworkApp").filter("truncate",function(){return function(n,t,i,r){var f,u;if(isNaN(t))return n;if(t<=0)return"";if(f=i||"...",n&&n.length>t){if(n=n.substring(0,t),r)while(n.charAt(n.length-1)===" ")n=n.substr(0,n.length-1);else u=n.lastIndexOf(" "),u!==-1&&(n=n.substr(0,u));return n+f}return n}});angular.module("qfxWebFrameworkApp").filter("arrayToObject",["underscore",function(n){function i(t){return n.filter(t,function(n){return n.name?n.name.indexOf(".")<0:!1})}function r(i){var r=n.chain(i).filter(function(n){return n.name?n.name.indexOf(".")>0:!1}).groupBy(function(n){return n.name.split(/\.(.+)?/)[0]}).value();for(var u in r)r[u]=t(n.map(r[u],function(n){return{name:n.name.split(/\.(.+)?/)[1],value:n.value}}));return r}var t=function(t){var o=i(t),u=r(t),f=n.object(n.map(o,function(n){return[n.name,n.value]}));for(var e in u)f[e]=u[e];return f};return t}]);angular.module("qfxWebFrameworkApp").factory("cacheBusterInterceptor",["$log",function(n){return{request:function(t){return t.cache===!1&&(n.debug("cacheBusterInterceptor: Adding no-cache header to request -"+t.url),t.headers["Cache-Control"]="no-cache, no-store, must-revalidate",t.headers["If-Modified-Since"]=0,t.headers.Pragma="no-cache"),t}}}]);angular.module("qfxWebFrameworkApp").service("browserHistoryService",["$log",function(n){var t=this;return t.saveState=function(t,i){var r=history.state;r||(r={});r[t]=i;history.replaceState(r,"PageState");n.debug("browserHistoryService: Saved state - "+t)},t.clearState=function(t){var i=history.state;i||(i={});delete i[t];history.replaceState(i,"PageState");n.debug("browserHistoryService: Removed Saved state - "+t)},t.getState=function(t){if(!history||!history.state)return null;var i=history.state[t];return i&&n.debug("browserHistoryService: Found state"+t),i},{saveState:t.saveState,clearState:t.clearState,getState:t.getState}}]);angular.module("qfxWebFrameworkApp").service("mousePosition",["$window",function(n){var t=this,i=!1;return t.mouseCoords={x:0,y:0},angular.element(n).bind("mousedown mousemove touchstart touchmove",function(n){var r=n.originalEvent||n;r.touches&&r.touches[0]&&(r=r.touches[0]);typeof r.clientX!="undefined"&&r.clientX>=0&&typeof r.clientY!="undefined"&&r.clientY>=0&&(t.mouseCoords.x=r.clientX,t.mouseCoords.y=r.clientY);i&&console.log(t.mouseCoords)}),t.getMouseCoords=function(){return t.mouseCoords},{getMouseCoords:t.getMouseCoords}}]);angular.module("qfxWebFrameworkApp").service("qfxEasingFunctions",function(){var n=this;return n.linearEase=function(n,t,i,r){return i*n/r+t},n.easeInQuad=function(n,t,i,r){return i*(n/=r)*n+t},n.easeOutQuad=function(n,t,i,r){return-i*(n/=r)*(n-2)+t},n.easeInOutQuad=function(n,t,i,r){return(n/=r/2)<1?i/2*n*n+t:-i/2*(--n*(n-2)-1)+t},n.easeInCubic=function(n,t,i,r){return i*Math.pow(n/r,3)+t},n.easeOutCubic=function(n,t,i,r){return i*(Math.pow(n/r-1,3)+1)+t},n.easeInOutCubic=function(n,t,i,r){return(n/=r/2)<1?i/2*Math.pow(n,3)+t:i/2*(Math.pow(n-2,3)+2)+t},n.easeInQuart=function(n,t,i,r){return i*Math.pow(n/r,4)+t},n.easeOutQuart=function(n,t,i,r){return-i*(Math.pow(n/r-1,4)-1)+t},n.easeInOutQuart=function(n,t,i,r){return(n/=r/2)<1?i/2*Math.pow(n,4)+t:-i/2*(Math.pow(n-2,4)-2)+t},n.easeInQuint=function(n,t,i,r){return i*Math.pow(n/r,5)+t},n.easeOutQuint=function(n,t,i,r){return i*(Math.pow(n/r-1,5)+1)+t},n.easeInOutQuint=function(n,t,i,r){return(n/=r/2)<1?i/2*Math.pow(n,5)+t:i/2*(Math.pow(n-2,5)+2)+t},n.easeInSine=function(n,t,i,r){return i*(1-Math.cos(n/r*(Math.PI/2)))+t},n.easeOutSine=function(n,t,i,r){return i*Math.sin(n/r*(Math.PI/2))+t},n.easeInOutSine=function(n,t,i,r){return i/2*(1-Math.cos(Math.PI*n/r))+t},n.easeInExpo=function(n,t,i,r){return i*Math.pow(2,10*(n/r-1))+t},n.easeOutExpo=function(n,t,i,r){return i*(-Math.pow(2,-10*n/r)+1)+t},n.easeInOutExpo=function(n,t,i,r){return(n/=r/2)<1?i/2*Math.pow(2,10*(n-1))+t:i/2*(-Math.pow(2,-10*--n)+2)+t},n.easeInCirc=function(n,t,i,r){return i*(1-Math.sqrt(1-(n/=r)*n))+t},n.easeOutCirc=function(n,t,i,r){return i*Math.sqrt(1-(n=n/r-1)*n)+t},n.easeInOutCirc=function(n,t,i,r){return(n/=r/2)<1?i/2*(1-Math.sqrt(1-n*n))+t:i/2*(Math.sqrt(1-(n-=2)*n)+1)+t},{linear:n.linearEase,easeIn:n.easeInOutCubic,easeOut:n.easeOutCubic,easeOutQuart:n.easeOutQuart,easeInOut:n.easeInOutCubic}});angular.module("qfxWebFrameworkApp").service("scrollPosition",["$window","$rootScope",function(n,t){var i=this;return i.lastScrollPosition=n.scrollTop,i.currentScrollPosition=n.scrollY,i.turningPoint=n.scrollTop,angular.element(n).bind("scroll",function(){var r={};i.lastScrollPosition=i.currentScrollPosition;i.currentScrollPosition=n.scrollY;r.currentY=i.currentScrollPosition;r.turningPoint=i.turningPoint;r.offset=i.currentScrollPosition-i.turningPoint;r.bottomOfView=r.currentY+n.innerHeight;r.direction=i.currentScrollPosition>i.lastScrollPosition?"down":"up";t.$broadcast("qfx:scroll",r)}),i.getScrollDirection=function(){return i.currentScrollPosition>i.lastScrollPosition?"down":"up"},t.$watch(i.getScrollDirection,function(){i.turningPoint=i.currentScrollPosition}),i.getCurrentY=function(){return i.currentScrollPosition},{getScrollDirection:i.getScrollDirection,getCurrentY:i.getCurrentY}}]);angular.module("qfxWebFrameworkApp").service("serilogService",["$http","qfxAppConfig","$timeout","qfxLogger","$rootScope","$location",function(n,t,i,r){var u;return u=this,u.info=function(n){try{r.log(n,"Information")}catch(t){}},u.warn=function(n){try{r.log(n,"Warning")}catch(t){}},u.error=function(n){try{r.log(n,"Error")}catch(t){}},{info:u.info,warn:u.warn,error:u.error}}]);angular.module("qfxWebFrameworkApp").service("queryStringService",["$log",function(n){var t=this,i=function(n,t){return t!=null||t!=undefined?n+"="+encodeURIComponent(t):""};t.ObjectToQueryString=function(t,r){var e,u,l,s,f,o,c,a,h;e={};n.debug("Map Object to QueryString");for(u in t)if(t[u])if(r&&t[u].constructor===Array){for(l=r===!0?"|":r,s="",f=0;f<t[u].length;f++)f>=1&&(s+=l),s+=t[u][f];s&&(e[u]=s)}else e[u]=t[u];o="";c=0;for(u in e){if(e[u].constructor===Array)for(a=0,h=e[u],f=0;f<h.length;f++)(h[f]!=null||h[f]!=undefined)&&(o+="&",o+=i(u,h[f]),a++);else c>=1&&(o+="&"),o+=i(u,e[u]);c++}return n.debug("QueryString:"+o),o};t.getQueryStringParam=function(n,t,i){var e=function(n){return decodeURIComponent(n.replace(/\+/g," "))},f,r,u;for(n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),f=new RegExp("(?:\\?|&(?:amp;)?)("+n+")(?:=?([^&#]*))","gi"),r=[],u=f.exec(location.search);u;)r.push(e(u[2])),u=f.exec(location.search);return t?i?r[0]?r[0].split("|"):[]:r:r[0]}}]);angular.module("qfxWebFrameworkApp").directive("bindHtmlCompile",["$compile",function(n){return{restrict:"A",link:function(t,i,r){t.$watch(function(){return t.$eval(r.bindHtmlCompile)},function(u){i.html(u&&u.toString());var f=t;r.bindHtmlScope&&(f=t.$eval(r.bindHtmlScope));n(i.contents())(f)})}}}]);angular.module("qfxWebFrameworkApp").directive("qfxClickSuppressThreshold",["$timeout",function(n){return{restrict:"A",scope:{threshold:"&qfxClickSuppressThreshold"},link:function(t,i){i.on("click",function(){t.$$postDigest(function(){i.attr("disabled",!0);n(function(){i.removeAttr("disabled")},t.threshold())})})}}}]);angular.module("qfxWebFrameworkApp").directive("jqfxSpinner",function(){return{restrict:"E",link:function(n,t,i){var r=parseInt(i.spinnerRadius,10)||19,u=parseInt(i.spinnerWidth,10)||4,f=parseInt(i.spinnerLength,10)||19,e=i.spinnerColour||"#000",o={length:f,width:u,radius:r,color:e},s=new Spinner(o).spin();$(t).html(s.el)}}});angular.module("qfxWebFrameworkApp").directive("qfxNoAutoComplete",[function(){return{restrict:"A",link:function(n,t,i){i.$set("autocomplete","off");t.append('<input autocomplete="false" name="hidden" type="text" style="display:none;">')}}}]);angular.module("qfxWebFrameworkApp").directive("qfxOneClick",[function(){return{restrict:"A",link:function(n,t){t.on("click",function(){t.attr("disabled",!0)})}}}]);angular.module("qfxWebFrameworkApp").directive("scrolledIntoView",["$window","$document","$parse","$log","$rootScope",function(n,t,i,r,u){return{restrict:"A",link:function(f,e,o){var c=function(){if(o.scrollOffset){var n=i(o.scrollOffset)(f,{});return parseInt(n)}return 0},s=function(t){var h=e[0].offsetTop,l=h+e[0].offsetHeight,r=c(),s=n.scrollY||n.pageYOffset,a=n.innerHeight,v={};o.id&&(v.sourceId=o.id);(l>s-r&&l<s+a+r||h>s-r&&h<s+a+r)&&(u.$broadcast("qfx:scrolledIntoView",v),o.scrolledIntoView&&f.$applyAsync(function(){i(o.scrolledIntoView)(f,{$event:t})}))},h=function(){t.off("scroll",s);l()},l=f.$on("qfx:scrolledIntoView:killWatch",function(n,t){t&&t.sourceId===o.id&&(r.debug("Killing watches for scrolled into view on element with id "+o.id+" in scope "+f.$id),h())});t.on("scroll",s);f.$on("$destroy",h)}}}]);angular.module("qfxWebFrameworkApp").directive("qfxScrolledOutOfView",["$log",function(n){return{restrict:"EA",link:function(t,i,r){var u,f;r.qfxOffsetFor&&(n.debug("offset for: "+r.qfxOffsetFor),t.offsetTop=$("#"+r.qfxOffsetFor)?$("#"+r.qfxOffsetFor)[0].clientHeight:0,n.debug("offset: "+t.offsetTop));u=t.$on("qfx:scroll",function(n,u){var f,o,e;f=i[0].offsetTop;o=f+i[0].offsetHeight;e={};r.id&&(e.sourceId=r.id);(o<u.currentY+t.offsetTop||f>u.bottomOfView)&&t.$broadcast("qfx:scrolledOutOfView",e)});f=t.on("qfx:scrolledOutOfView:killWatch",function(t,i){i&&i.sourceId===r.id&&(n.debug("Killing watches for scrolled into view"),u(),f())})}}}]);angular.module("qfxWebFrameworkApp").directive("qfxEnter",[function(){return{restrict:"A",link:function(n,t,i){t.bind("keypress",function(t){t.which===13&&n.$apply(function(){n.$eval(i.qfxEnter)})})}}}]);angular.module("qfxWebFrameworkApp").directive("qfxPaginator",["$log","underscore","$anchorScroll","$window",function(n,t,i,r){return{templateUrl:"views/tpl/qfx-paginator.tpl.html",restrict:"E",scope:{href:"@qfxDataHref",id:"@?qfxPaginatorId",handleAction:"&qfxHandleAction",attrPageCount:"=?qfxDataPageCount",attrCurrentPageIndex:"=?qfxDataCurrentIndex",maxRange:"=?qfxDataMaxRange",suppressScrollOnPage:"&qfxSuppressScrollOnPage"},controller:["$scope","$element","$attrs","$rootScope",function(n,u,f,e){var o=this;return n._=t,o.getBaseUrl=function(){return n.href},o.getPageCount=function(){return n.$parent.pageCount?n.$parent.pageCount:n.attrPageCount},o.getCurrentIndex=function(){return n.$parent.currentPageIndex?n.$parent.currentPageIndex:n.attrCurrentPageIndex},o.setPageIndex=function(t){n.$parent.currentPageIndex&&(n.$parent.currentPageIndex=t);var i=n.attrCurrentPageIndex;n.attrCurrentPageIndex=t;n.$emit("qfx:pagination:pageChange",{id:n.id,previous:i,current:t})},o.changePage=function(t){o.setPageIndex(t);n.handleAction();n.suppressScrollOnPage()||i()},n.maxRange=n.maxRange||3,n.range=0,n.attrPageCount=o.getPageCount()||1,n.attrCurrentPageIndex=o.getCurrentIndex()||1,n.getPageCount=function(){return o.getPageCount()},n.getCurrentIndex=function(){return o.getCurrentIndex()},n.showPaging=function(){return o.getPageCount()>1},n.showFrontDivider=function(){return o.getCurrentIndex()-n.range>3&&(o.getCurrentIndex()+n.range<o.getPageCount()-1||o.getCurrentIndex()+n.range>=o.getPageCount()-1&&3<o.getCurrentIndex()-n.range-(o.getCurrentIndex()+n.range+2-o.getPageCount()))},n.showEndDivider=function(){return o.getCurrentIndex()+n.range<o.getPageCount()-2&&(o.getCurrentIndex()-n.range>2||o.getCurrentIndex()-n.range<=2&&o.getPageCount()-2>o.getCurrentIndex()+n.range-(o.getCurrentIndex()-n.range-3))},n.doResize=function(){e.$$postDigest(function(){n.calculateRange()})},n.calculateRange=function(){var t=n.range,f=u[0],e=f.offsetWidth,i;if(e){if(i=f.querySelector(".pagination"),!i)return;var o=function(n){var e=angular.element('<span class="'+n+'" id="tempButton"><\/span>');e.css("visibility","hidden").css("position","absolute");angular.element(i).append(e);var t=f.querySelector("#tempButton"),u=r.getComputedStyle(t)||t.currentStyle,o=parseInt(u.width,10)+parseInt(u.marginLeft,10)+parseInt(u.marginRight,10);return i.removeChild(t),o},s=o("pageLink number"),h=o("pageLink prev"),c=e-2*h-5*s-10;t=Math.floor(c/s/2);t=Math.max(t,0);t=Math.min(t,n.maxRange);t!=n.range&&(n.range=t)}},n.getSizeClass=function(){return{smaller:u[0].offsetWidth<=500,medium:u[0].offsetWidth>500&&u[0].offsetWidth<650}},n.killWatch=n.$watch(function(){return u.find("div").length},function(t){t&&(n.calculateRange(),n.killWatch())}),{getBaseUrl:o.getBaseUrl,getPageCount:o.getPageCount,getCurrentIndex:o.getCurrentIndex,changePage:o.changePage,setPageIndex:o.setPageIndex}}]}}]).directive("qfxPageSelector",[function(){return{require:"^qfxPaginator",templateUrl:"views/tpl/qfx-page-selector.tpl.html",restrict:"E",scope:{pageNumber:"@qfxDataPageNumber",selectorType:"@qfxDataType"},link:function(n,t,i,r){n.getPageNumber=function(){return parseInt(n.pageNumber,10)};n.buttonLabel=function(){return n.selectorType?"":n.getPageNumber()};n.isCurrent=function(){return r.getCurrentIndex()===n.getPageNumber()};n.isDisabled=function(){return n.selectorType==="prev"&&n.getPageNumber()<1||n.selectorType==="next"&&n.getPageNumber()>r.getPageCount()};n.getClass=function(){return{current:n.isCurrent(),disabled:n.isDisabled(),number:!n.selectorType}};n.getPageLink=function(){if(!n.isDisabled()&&r.getBaseUrl()){var t=r.getBaseUrl();return t+(t.charAt(t.length-1)==="/Page/"?"":"/Page/")+n.getPageNumber()}return null};n.handlePageChange=function(){n.isDisabled()||r.changePage(n.getPageNumber())}}}}]).filter("inRange",[function(){return function(n,t,i){return n.filter(function(r){return r>1&&r<n.length&&(r>=t-i&&r<=t+i||t-i-1==2&&r===2||t+i+1===n.length-1&&r===n.length-1||t-i<=2&&(r<=t+i-(t-i-3)||r===n.length-1&&n.length-1==t+i-(t-i-3)+1)||t+i>=n.length-1&&(r>=t-i-(t+i+2-n.length)||r===2&&2==t-i-(t+i+2-n.length)-1))})}}]);angular.module("qfxWebFrameworkApp").directive("qfxInputPin",["qfxIdGenerator",function(n){return{require:"ngModel",templateUrl:"views/tpl/qfx-input-pin.tpl.html",restrict:"E",scope:{classes:"@qfxDataClasses"},link:function(t,i,r,u){t.pinputId=n.generateId("pinput");t.obfuscateCheckboxId=n.generateId("pin");t.getDynamicClasses=function(){return t.showPin?"":"obfuscate"};t.getLabelClasses=function(){return t.showPin?"hide":""};t.clearPin=function(){t.underlyingModel=null};t.$watch(function(){return t.underlyingModel},function(n){u.$setViewValue(n)})}}}]);angular.module("qfxWebFrameworkApp").directive("qfxTabOptions",["$rootScope",function(n){return{templateUrl:"views/tpl/qfx-tab-options.tpl.html",restrict:"EA",transclude:!0,require:"qfxTabOptions",link:function(t,i,r,u){t.isDropdown=!1;t.activeTab&&angular.forEach(t.options,function(n,i){(n||n===0)&&(i||i===0)&&n.label===t.activeTab&&(t.activeIndex=i)});t.tabsToDropdown=function(){var n,r;t.isDropdown||(n=i.find(".tab-options .tab"),t.conversionWidth=10,n.each(function(n,i){t.conversionWidth+=Math.ceil($(i).outerWidth(!0))}));r=i.find(".tab-options");r.outerWidth()<=t.conversionWidth?(t.isDropdown=!0,t.isOpened=!1):t.isDropdown=!1};t.toggleDropdown=function(){t.isDropdown&&(t.isOpened=!t.isOpened)};t.getContainerClass=function(){return t.isDropdown?t.isOpened?"dropdown-menu opened":"dropdown-menu":"tabs-container"};t.activate=function(i){(i||i===0)&&(t.activeIndex=i,t.activeLabel=t.options[t.activeIndex].label,n.$broadcast("qfx:tabs:activated",{index:t.activeIndex,label:t.activeLabel}))};t.isActiveIndex=function(n){return n===t.activeIndex};t.$$postDigest(function(){t.activate(t.activeIndex);t.tabsToDropdown()});t.$on("qfx:tabs:setActive",function(n,i){var r,f;i.label?(r=u.indexOf(i.label),r>=0&&t.activate(r)):i.index&&!isNaN(i.index)&&(f=Math.min(Math.max(0,parseInt(i.index,10)),t.options.length||0),t.activate(f))})},controller:["$scope","underscore",function(n,t){var i=this;return n.options=[],n.activeIndex=0,i.isActiveOption=function(t){return n.options[n.activeIndex].label===t},i.registerOption=function(t){t.orderRegistered=n.options.length+1;n.options.push(t);i.sortOptions();n.tabsToDropdown&&n.tabsToDropdown()},i.updateIndex=function(t,r){n.options[i.indexOf(t)].index=r;i.sortOptions()},i.indexOf=function(i){return t.findIndex(n.options,function(n){return n.label===i})},i.sortOptions=function(){var t=n.options[n.activeIndex].label;n.options.sort(function(n,t){if(n.index!=t.index)if(isNaN(n.index)||isNaN(t.index))if(isNaN(n.index)){if(!isNaN(t.index))return 1}else return-1;else return n.index-t.index;return n.orderRegistered-t.orderRegistered});n.activeIndex=i.indexOf(t)},{isActiveOption:i.isActiveOption,registerOption:i.registerOption,updateIndex:i.updateIndex,indexOf:i.indexOf}}]}}]).directive("qfxTabOption",[function(){return{template:'<div ng-transclude ng-if="isActive()"><\/div>',restrict:"EA",require:"^^qfxTabOptions",transclude:!0,scope:{label:"@qfxDataLabel",index:"=?qfxDataIndex",route:"@?qfxDataRoute"},link:function(n,t,i,r){n.parseIndex=function(){var t=parseFloat(n.index);return isNaN(t)?undefined:t};n.currentIndex=n.parseIndex();n.isActive=function(){return r.isActiveOption(n.label)};n.getIndex=function(){return r.indexOf(n.label)};n.$watch(function(){return n.index},function(t,i){t&&t!=n.currentIndex&&t!=i&&(n.currentIndex=n.parseIndex(),r.updateIndex(n.label,n.currentIndex))});r.registerOption({index:n.currentIndex,label:n.label,route:n.route})}}}]);angular.module("qfxWebFrameworkApp").service("qfxCmsService",["$http","$q","$log","qfxAppConfig",function(n,t,i,r){var u=this;return u.websiteFacadeUrl=r.websiteFacadeUrl,u.getResourceValue=function(r){var f,e;return f=t.defer(),e=u.websiteFacadeUrl+"/GetResourceValue?resourceKey="+r,n.get(e,{withCredentials:!0}).success(function(n){i.debug("ResourceKey: "+r+", ResourceValue: "+n);f.resolve(n)}).error(function(n){i.debug("Failed to get resource value");f.reject(n)}),f.promise},{getResourceValue:u.getResourceValue}}]),function(n){var t={};t.MAX_VERTICAL_DISTANCE=200;t.MAX_VERTICAL_RATIO=.6;t.MIN_HORIZONTAL_DISTANCE=30;t.create=function(t){n.module("qfxWebFrameworkApp").directive(t.directiveName,["$parse","$swipe",function(i,r){return function(u,f,e){function l(n){var r,i;return s?(r=Math.abs(n.y-s.y),i=(n.x-s.x)*t.direction,o&&r<t.maxVerticalDistance&&i>0&&i>t.minHorizontalDistance&&r/i<t.maxVerticalRatio):!1}var c,s,o,h;if(c=i(e[t.directiveName]),h=["touch"],!n.isDefined(e.ngSwipeDisableMouse)){h.push("mouse");f.on("mouseleave",function(){o=!1})}r.bind(f,{start:function(n){s=n;o=!0},cancel:function(){o=!1},move:function(n,i){l(n)&&u.$apply(function(){f.triggerHandler(t.eventName);c(u,{$event:i});o=!1})},end:function(){o=!1}},h)}}])};t.create({directiveName:"qfxSwipeLeft",direction:-1,eventName:"swipeleft",maxVerticalDistance:t.MAX_VERTICAL_DISTANCE,maxVerticalRatio:t.MAX_VERTICAL_RATIO,minHorizontalDistance:t.MIN_HORIZONTAL_DISTANCE});t.create({directiveName:"qfxSwipeRight",direction:1,eventName:"swiperight",maxVerticalDistance:t.MAX_VERTICAL_DISTANCE,maxVerticalRatio:t.MAX_VERTICAL_RATIO,minHorizontalDistance:t.MIN_HORIZONTAL_DISTANCE})}(window.angular);angular.module("qfxWebFrameworkApp").directive("qfxStarRating",["$rootScope",function(n){return{restrict:"E",templateUrl:"views/tpl/qfx-star-rating.tpl.html",scope:{id:"@ratingId",defaultRating:"@?",userRating:"=?",size:"@?"},controller:["$scope","$element","$log",function(n,t,i){var r=this;r.getId=function(){return n.id};r.setUserRating=function(t){var r=parseInt(t,10);r>=0&&r<=n.ratings.length?n.userRating=t:i.error("Setting rating for star-rating-input with id "+n.id+" failed as the given rating ("+t+") is not in range")};r.enableInput=function(){n.allowInput=!0;t.removeAttr("disable-input")};r.disableInput=function(){n.allowInput=!1};r.addEventListener=function(t,i){n.$on(t,i)}}],link:function(t,i,r){t.size||(t.size="medium");t.ratings=[1,2,3,4,5];t.allowInput=!("disableInput"in r);t.defaultRating=t.defaultRating||0;t.activeRating=null;t.clickedRating=null;t.roundedDefaultRating=Math.round(t.defaultRating*2)/2;t.getClass=function(n){var i={selected:!1,hover:!1,pulse:!1,faded:!1,full:!1,half:!1};return t.clickedRating?n<t.clickedRating?(i.selected=!0,i.pulse=!0):n==t.clickedRating&&(i.selected=!0,i.pulse=!0,i.clicked=!0):t.activeRating?n<=t.activeRating&&(t.activeRating==t.userRating?(i.selected=!0,i.faded=!0):(i.full=!0,i.hover=!0)):t.userRating?n<=t.userRating&&(i.selected=!0):n<=t.roundedDefaultRating?i.full=!0:n<t.roundedDefaultRating+1&&(i.half=!0),i};t.handleClick=function(i){var r=t.userRating;i!=t.userRating?(t.clickedRating=i,t.userRating=i,t.$emit("qfx-rating-changed",{id:t.id,newRating:i,oldRating:r})):(t.clickedRating=null,t.userRating=null,t.$emit("qfx-rating-deleted",{id:t.id,oldRating:r}));n.$broadcast("qfx-rating-update",{id:t.id,newRating:t.userRating,oldRating:r})};t.handleEnter=function(n){t.activeRating=n;t.clickedRating=null;t.$emit("qfx:star-rating:hoverStart",{rating:n})};t.handleLeave=function(n){t.activeRating=null;t.$emit("qfx:star-rating:hoverEnd",{rating:n})};t.$on("qfx-rating-update",function(n,i){i.id==t.id&&t.$applyAsync(function(){t.userRating=i.newRating||null;t.clickedRating&&i.newRating&&t.clickedRating!=i.newRating&&(t.clickedRating=null)})})}}}]);angular.module("qfxWebFrameworkApp").directive("qfxStarRatingTitles",function(){return{template:'<p class="rating-title">{{ratingTitle}}<\/p>',restrict:"E",link:function(n){n.getRatingName=function(n){switch(n){case 1:return"Missable";case 2:return"So-So";case 3:return"Entertaining";case 4:return"Great";case 5:return"Awesome";default:return""}};n.$on("qfx:star-rating:hoverStart",function(t,i){n.ratingTitle=n.getRatingName(i.rating)});n.$on("qfx:star-rating:hoverEnd",function(){n.ratingTitle=""})}}});angular.module("qfxWebFrameworkApp").directive("qfxTemplate",function(){return{restrict:"E",template:'<ng-include src="getTemplateUrl()"/>',scope:{path:"=path",model:"=model"},controller:["$scope","$log",function(n,t){n.getTemplateUrl=function(){return t.debug("getTemplateUrl: ",n.path),n.path};t.debug("templateModel: ",n.model);n.$watch(function(){return n.model},function(){t.debug("updating templateModel",n.model);for(var i in n.model)n[i]=n.model[i]});t.debug("Scope for template:",n)}]}});angular.module("qfxWebFrameworkApp").service("qfxCatalogueFunctionService",["$location",function(n){var t=this;return t.getCatalogueFunction=function(){var t,i;return t=n.search().catalogueFunction||n.search().CatalogueFunction||n.search().catalogueFunctionId||n.search().CatalogueFunctionId||n.search().catalogueFunctionID||n.search().CatalogueFunctionID,i=n.search().listId||n.search().ListId||n.search().listID||n.search().ListID,t||i==="dl-2107"&&(t="DvdChristmasCampaign"),t||"Unknown"},{getCatalogueFunction:t.getCatalogueFunction}}]);angular.module("qfxWebFrameworkApp").factory("httpStatusInterceptor",["$rootScope","$log",function(n,t){return{responseError:function(i){switch(i.status){case 401:t.error("Unauthorised.  Broadcasting qfx:httpStatus:unauthorized");n.$broadcast("qfx:httpStatus:unauthorized",i);break;case 403:t.error("Forbidden.  Broadcasting qfx:httpStatus:forbidden");n.$broadcast("qfx:httpStatus:forbidden",i)}return i}}}]);angular.module("qfxWebFrameworkApp").directive("qfxIntegerOnlyModel",["$log",function(n){return{require:"ngModel",restrict:"A",link:function(t,i,r,u){u.$parsers.push(function(t){var i;return t?(i=t.replace(/[^0-9]/g,""),i!==t&&(u.$setViewValue(i),u.$render()),n.debug("qfxIntegerOnlyModel:Transformed input: "+i),i):t})}}}]);angular.module("qfxWebFrameworkApp").directive("qfxWaitIndicator",["$animate",function(n){return{template:'<div class="{{indicatorType}}"><\/div>',restrict:"E",scope:{type:"@"},link:function(t,i){n.enabled(i,!1);t.type=t.type?t.type.toLowerCase():"spinner";switch(t.type){case"spinner":t.indicatorType="sp-circle";break;case"loading-bar":t.indicatorType="sp-3balls";break;case"pulsing-balls":t.indicatorType="pulsing-balls"}}}}]);angular.module("qfxWebFrameworkApp").directive("sameAs",["$parse",function(n){return{require:"?ngModel",restrict:"A",link:function(t,i,r,u){function f(){var n=e(t);return angular.isObject(n)&&n.hasOwnProperty("$viewValue")&&(n=n.$viewValue),n}var e=n(r.sameAs);t.$watch(f,function(){u.$validate()});u.$validators.sameAs=function(){return u.$viewValue===f()}}}}]);angular.module("qfxWebFrameworkApp").animation(".message-animate",[function(){return{enter:function(n,t){n.css({opacity:0,marginTop:-n[0].offsetHeight+"px"});n.transition({opacity:1,marginTop:0},200,"ease",function(){t()})},leave:function(n,t){parseInt(n.css("opacity"),10)?(n.css({opacity:1,marginTop:0}),n.transition({opacity:0,marginTop:-n[0].offsetHeight+"px"},200,"ease",function(){t()})):(n.attr("style",""),t())}}}]);angular.module("qfxWebFrameworkApp").factory("qfxPlatform",["$window",function(n){var t=angular.extend({},n.platform,{}),i;return t.manufacturer||(i=t.name&&t.name.toLowerCase()||"",(i=="chrome"||i=="chrome mobile")&&(t.manufacturer="Google"),(i=="ie"||i=="ie mobile"||i=="edge")&&(t.manufacturer="Microsoft"),i=="firefox"&&(t.manufacturer="Mozilla"),i=="safari"&&(t.manufacturer="Apple")),t}]);angular.module("qfxWebFrameworkApp").service("qfxIdGenerator",function(){var n=this;return n.generateId=function(n){return(n||"id")+"-"+Math.floor(Math.random()*1e7)},{generateId:n.generateId}});angular.module("qfxWebFrameworkApp").service("qfxUrlBuilder",["$location","$log","qfxAppConfig","$window",function(n,t,i,r){var u=this;return u.NO_DIGITAL_CODE_ERROR="No digital code given so can't determine link to details page.",u.CATALOGUE_FUNCTION_PARAM="catalogueFunction",u.getBaseUrlForContext=function(t){var r="";if(typeof t=="string"&&i.enableDiscCatalogue===!0){switch(t.toLowerCase()){case"digital":case"streaming":i.applicationName.toLowerCase()!=="streaming"&&(r=n.protocol()+"://"+n.host().replace("dvd","streaming"));break;case"physical":case"dvd":i.applicationName.toLowerCase()!=="dvd"&&(r=n.protocol()+"://"+n.host().replace("streaming","dvd"))}r&&n.port()&&(r+=":"+n.port())}return r},u.getDetailsLink=function(n,i,r,f){var e=u.getBaseUrlForContext(f);return n?(e+="/Details",i&&(e+="/"+u.toUrlFriendlyString(i)),e+="/"+n,r&&(e+="?"+u.CATALOGUE_FUNCTION_PARAM+"="+r)):t.error(u.NO_DIGITAL_CODE_ERROR),e},u.getItemLink=function(n,i,r,f,e){var s,o;if(o=u.getBaseUrlForContext(e),n){if(i)switch(i.toLowerCase()){case"title":case"titles":s="Movies";break;case"series":s="Series";break;case"season":case"seasons":s="Seasons";break;case"episode":case"episodes":s="Episodes"}o+="/Catalogue/"+(s||"Items");r&&(o+="/"+u.toUrlFriendlyString(r));o+="/"+n;f&&(o+="?"+u.CATALOGUE_FUNCTION_PARAM+"="+f)}else t.error(u.NO_DIGITAL_CODE_ERROR);return o},u.getPlanSelectionUrl=function(t,i){var r=i?"/MyAccount/SelectPlan/"+t:"/Join/"+t;return r+"?returnUrl="+n.absUrl()},u.getPlayUrl=function(n){return"/Play/"+n},u.getJoinLinkModel=function(n,t){if(n)if(t)switch(t.toLowerCase()){case"cancelled":case"close":return{text:"Restart Subscription","class":"restart",url:"/MyAccount"}}else return{text:"Get Started","class":"get-started",url:"/Plans"};else return{text:"Join Quickflix","class":"join",url:"/Join"}},u.formatUrl=function(n,t){var i=n,r,f;for(r in t)f=new RegExp("{s?"+r+"s?}"),i=i.replace(f,u.toUrlFriendlyString(t[r]));return i},u.toUrlFriendlyString=function(n,t){if(typeof n=="string"){var i=n;return t?(i=i.replace(/[*<> ]/g,""),i=r.encodeURI(i)):(i=i.replace(/['!"#$%&\\*+,./:;=<>?@\[\]\^`‌​{|}~ ']/g,""),i=r.encodeURIComponent(i)),i}},{getDetailsLink:u.getDetailsLink,getItemLink:u.getItemLink,getPlanSelectionUrl:u.getPlanSelectionUrl,getPlayUrl:u.getPlayUrl,getJoinLinkModel:u.getJoinLinkModel,toUrlFriendlyString:u.toUrlFriendlyString,formatUrl:u.formatUrl}}]);angular.module("qfxWebFrameworkApp").directive("qfxClassification",[function(){return{restrict:"E",templateUrl:"views/tpl/qfx-classification.tpl.html",scope:{classification:"=",styles:"@classificationStyle"},link:function(n){n.getMainClass=function(){return n.classification.Scheme?{au:n.classification.Scheme.toLowerCase()==="oflc-au",nz:n.classification.Scheme.toLowerCase()==="oflc-nz"}:{}};n.getRatingClass=function(){return n.classification.Rating?n.classification.Rating.replace(/[^a-zA-Z0-9]+/ig,"").toLowerCase():""}}}}]);angular.module("qfxWebFrameworkApp").filter("qfxDigitalCodeToSuffix",function(){return function(n){if(n&&typeof n=="string"){var t=n.charAt(0);switch(t.toLowerCase()){case"s":return"Season";case"e":return"Episode";default:return""}}}});angular.module("qfxWebFrameworkApp").filter("updateQueryString",[function(){return function(n,t,i){var u=new RegExp("([?&])"+t+"=.*?(&|#|$)","i"),r,f;return n.match(u)?n.replace(u,"$1"+t+"="+i+"$2"):(r="",n.indexOf("#")!==-1&&(r=n.replace(/.*#/,"#"),n=n.replace(/#.*/,"")),f=n.indexOf("?")!==-1?"&":"?",n+f+t+"="+i+r)}}]);angular.module("qfxWebFrameworkApp").config(["$provide",function(n){n.decorator("$log",["$delegate","$injector",function(n,t){var i={},r=t;return i.info=function(t,u){try{var f=r.get("$rootScope");f.$broadcast("qfx:log:info",{message:t,object:u});n.info(t)}catch(e){i.error("Something went wrong logging to info "+e)}},i.warn=function(t,u){try{var f=r.get("$rootScope");f.$broadcast("qfx:log:warn",{message:t,object:u});n.warn(t)}catch(e){i.error("Something went wrong logging to info "+e)}},i.error=function(t,i){try{var u=r.get("$rootScope");u.$broadcast("qfx:log:error",{message:t,object:i});n.error(t)}catch(f){}},i.debug=function(t,u){try{var f=r.get("$rootScope");f.$broadcast("qfx:log:debug",{message:t,object:u});n.debug(t)}catch(e){i.error("Something went wrong logging to info "+e)}},{log:n.log,info:i.info,warn:i.warn,error:i.error,debug:i.debug}}])}]);window.qfx||(window.qfx={});window.qfx.logger=function(){function e(f,e){var o,c;try{if(typeof f=="object"&&typeof e=="string"&&i<=t[e]){if(!f.message||typeof f.message=="string"&&(f.message.toLowerCase().match("access is denied")||f.message.toLowerCase().match("security error")||f.message.toLowerCase().match("the operation is insecure")||f.message.toLowerCase().match("couldn't fetch member details as this site doesn't have an authenticated context."))||window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.toLowerCase().match("baidu")||window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.toLowerCase().match("googlebot"))return;o=h(f.message);typeof f.message!="string"||n[o]?(n[o].logEvent.metaData.occurrences+=1,n[o].pending=!0):(f.metaData=f.metaData||{},f.metaData.occurrences=0,c={logEvent:f,logLevel:e,pending:!0},n[o]=c);u();r||(r=setTimeout(s,5e3))}}catch(l){console&&console.log&&l&&console.log("failed to log exception: "+l)}}function u(){var r,t,i;if(n&&Object.keys(n).length>0)for(r in n)if(t=n[r],i=t.logEvent,t.pending&&i.metaData.occurrences===0||i.metaData.occurrences>0&&i.metaData.occurrences%10==0&&Date.now()-t.lastSent>1e3||i.metaData.occurrences>1e3){var u=window.qfx&&window.qfx.appConfig?window.qfx.appConfig.websiteFacadeUrl:"/Api",e=u+"/Log/"+t.logLevel;t.lastSent=Date.now();t.pending=!1;f.post(e,i,o,!0)}}function o(n){try{var r=JSON.parse(n);i=typeof r.level=="string"?t[r.level]:typeof r.level=="number"?r.level:t.length+1}catch(u){}}function s(){u();n={};r=null}function h(n){var t=0,i,r;if(n.length==0)return t;for(i=0;i<n.length;i++)r=n.charCodeAt(i),t=(t<<5)-t+r,t=t&t;return t}var f={xhr:function(){var t,i,n;if(typeof XMLHttpRequest!="undefined")return new XMLHttpRequest;for(t=["MSXML2.XmlHttp.6.0","MSXML2.XmlHttp.5.0","MSXML2.XmlHttp.4.0","MSXML2.XmlHttp.3.0","MSXML2.XmlHttp.2.0","Microsoft.XmlHttp"],n=0;n<t.length;n++)try{i=new ActiveXObject(t[n]);break}catch(r){}return i},send:function(n,t,i,r,u){var f=this.xhr();f.open(i,n,u);f.onreadystatechange=function(){try{f&&f.readyState==4&&t(f.responseText)}catch(n){console&&console.log&&console.log("failed to log exception"+n)}};i=="POST"&&f.setRequestHeader("Content-type","application/json");f.send(r)},get:function(n,t,i,r){var u=[];for(var f in t)u.push(encodeURIComponent(f)+"="+encodeURIComponent(t[f]));this.send(n+(u.length?"?"+u.join("&"):""),i,"GET",null,r)},post:function(n,t,i,r){this.send(n,i,"POST",JSON.stringify(t),r)}},n={},t={Verbose:0,Debug:1,Information:2,Warning:3,Error:4,Fatal:5},i=window.qfx&&window.qfx.appConfig&&window.qfx.appConfig.remoteLogLevel?t[window.qfx.appConfig.remoteLogLevel]:t.Error,r;return{log:e}}();angular.module("qfxWebFrameworkApp").factory("qfxLogger",["$window",function(n){return n.qfx&&n.qfx.logger?n.qfx.logger:{}}]);angular.module("qfxWebFrameworkApp").directive("qfxImgLoad",["$parse",function(n){return{restrict:"A",link:function(t,i,r){var u=n(r.qfxImgLoad);i.on("load",function(){u(t)})}}}]);angular.module("qfxWebFrameworkApp").provider("Modernizr",["$windowProvider",function(n){var t=n.$get();this.$get=function(){return t.Modernizr||{}}}]);angular.module("qfxWebFrameworkApp").filter("qfxCatalogueItemLink",["qfxUrlBuilder",function(n){return function(t,i){return typeof t=="object"?n.getItemLink(t.DigitalCode,t.Type,t.Name,i):""}}]);angular.module("qfxWebFrameworkApp").directive("qfxTooltip",["$window",function(n){return{template:'<div class="tooltip" ng-class="[ position, {showing: isShowing }]" ng-resize="positionTooltip()" ng-click="toggleTooltip()"><div class="tooltip-text" ng-transclude><\/div><\/div>',transclude:!0,restrict:"E",scope:{},link:function(t,i){t.isShowing=!1;t.position="";t.toggleTooltip=function(){t.isShowing=!t.isShowing;t.isShowing&&t.positionTooltip()};t.positionTooltip=function(){var e=$(n).width(),o=i.outerWidth(),r=i.offset().left,u=i.find(".tooltip-text"),f=u.outerWidth();u.css({left:""});r+2*o+f<e?t.position="right":r-o-f>0?t.position="left":(t.position="under",u.css("left",Math.min(r/2+(e-(r+f))/2-r,0)))}}}}]);angular.module("qfxWebFrameworkApp").directive("qfxValidation",[function(){return{restrict:"E",template:'<div class="validation-wrapper" ng-class="getClass()" ng-transclude><\/div>',transclude:!0,scope:!0,link:function(n){n.getClass=function(){if(n.model&&n.model.$dirty){if(n.model.$pending)return"pending";if(n.model.$valid)return n.model.$$success.ServerValidation?"valid server":"valid";if(n.model.$invalid)return n.model.$error.ServerValidation?"invalid server":"invalid"}}},controller:["$scope",function(n){var t=this;return t.registerModel=function(t){n.model=t},{registerModel:t.registerModel}}]}}]).directive("qfxValidationInput",[function(){return{restrict:"A",require:["^^?qfxValidation","?ngModel"],link:function(n,t,i,r){var u=r[0],f=r[1];u&&f&&u.registerModel(f)}}}]);angular.module("qfxWebFrameworkApp").filter("qfxUrlFriendly",["qfxUrlBuilder",function(n){return function(t,i){if(typeof t=="string")return n.toUrlFriendlyString(t,i)}}]);angular.module("qfxWebFrameworkApp").filter("floor",function(){return function(n){return Math.floor(n)}});angular.module("qfxWebFrameworkApp").filter("pricePart",function(){return function(n,t){var i=parseFloat(n),r,u;if(angular.isNumber(i)&&i>0&&typeof t=="string")switch(t.toLowerCase()){case"dollar":case"dollars":case"d":case"$":return Math.floor(i);case"cent":case"cents":case"c":return r="00",u=""+Math.round((i%1*100).toPrecision(2)),r.substring(0,r.length-u.length)+u}return""}});angular.module("qfxWebFrameworkApp").filter("friendlyString",function(){return function(n){return n.replace(/\s+/g,"-").toLowerCase()}});angular.module("qfxWebFrameworkApp").component("qfxJsonLd",{restrict:"E",template:function(){return'<script type="application/ld+json" ng-bind-html="vm.onGetJson()"><\/script>'},bindings:{json:"<jsonLd"},controllerAs:"vm",controller:["$sce","$filter",function(n,t){this.onGetJson=function(){return n.trustAsHtml(t("json")(this.json))}}]});angular.module("qfxWebFrameworkApp").run(["$templateCache",function(n){"use strict";n.put("views/tpl/qfx-classification.tpl.html",'<div class="classification {{::styles}}" ng-class="::getMainClass()"> <div class="rating-image" ng-class="::getRatingClass()">{{::classification.Rating}}<\/div> <div class="consumer-advice">{{::classification.ConsumerAdvice}}<\/div> <\/div>');n.put("views/tpl/qfx-input-pin.tpl.html",'<input id="{{pinputId}}" type="text" pattern="[0-9]*" ng-model="underlyingModel" qfx-integer-only-model maxlength="4" class="pinput" ng-class="getDynamicClasses()" ng-focus="clearPin()"> <input id="{{obfuscateCheckboxId}}" type="checkbox" ng-model="showPin"> <label for="{{obfuscateCheckboxId}}" ng-class="getLabelClasses()"><\/label>');n.put("views/tpl/qfx-page-selector.tpl.html",'<a ng-if="getPageLink()" ng-href="{{getPageLink()}}" class="pageLink {{selectorType}}" ng-class="getClass()">{{buttonLabel()}}<\/a> <span ng-if="!getPageLink()" ng-click="handlePageChange()" class="pageLink {{selectorType}}" ng-class="getClass()">{{buttonLabel()}}<\/span>');n.put("views/tpl/qfx-paginator.tpl.html",'<div class="pagination" ng-if="showPaging()" ng-resize="doResize()" ng-class="getSizeClass()"> <qfx-page-selector qfx-data-type="prev" qfx-data-page-number="{{getCurrentIndex() - 1}}"><\/qfx-page-selector> <qfx-page-selector qfx-data-page-number="1"><\/qfx-page-selector> <span class="pageDivider" ng-if="showFrontDivider()"><\/span> <qfx-page-selector ng-repeat="page in _.range(1,getPageCount()+1) | inRange:getCurrentIndex():range" qfx-data-page-number="{{page}}"><\/qfx-page-selector> <span class="pageDivider" ng-if="showEndDivider()"><\/span> <qfx-page-selector qfx-data-page-number="{{getPageCount()}}"><\/qfx-page-selector> <qfx-page-selector qfx-data-type="next" qfx-data-page-number="{{getCurrentIndex() + 1}}"><\/qfx-page-selector> <\/div>');n.put("views/tpl/qfx-star-rating.tpl.html",'<div class="star-rating allow-input {{size}}" ng-if="allowInput" default-rating="{{defaultRating}}" user-rating="{{userRating}}"> <span ng-repeat="rating in ::ratings" class="rating" ng-class="getClass(rating)" ng-click="handleClick(rating)" ng-mouseenter="handleEnter(rating)" ng-mouseleave="handleLeave(rating)"><\/span> <\/div> <div class="star-rating {{size}}" ng-if="!allowInput"> <span ng-repeat="rating in ::ratings" class="rating" ng-class="getClass(rating)"><\/span> <\/div>');n.put("views/tpl/qfx-tab-options.tpl.html",'<div class="tabs-container" ng-class="getContainerClass()" ng-click="toggleDropdown()"> <div class="dropdown-label" ng-if="isDropdown" bind-html-compile="activeLabel"><\/div> <ul class="tab-options" ng-resize="tabsToDropdown()"> <li class="tab" ng-repeat="tab in options" ng-click="activate($index)" ng-class="{active: isActiveIndex($index)}"> <a ng-href="{{tab.route}}" bind-html-compile="tab.label"><\/a> <\/li> <\/ul> <\/div> <!-- The contents of each option will be inserted within the following ng-transclude element --> <ng-transclude><\/ng-transclude>')}]),function(n,t){"use strict";function f(n){return n!=null&&n!==""&&n!=="hasOwnProperty"&&u.test("."+n)}function e(n,r){var e,u,o,s;if(!f(r))throw i("badmember",'Dotted member path "@{0}" is invalid.',r);for(e=r.split("."),u=0,o=e.length;u<o&&t.isDefined(n);u++)s=e[u],n=n!==null?n[s]:undefined;return n}function r(n,i){i=i||{};t.forEach(i,function(n,t){delete i[t]});for(var r in n)!n.hasOwnProperty(r)||r.charAt(0)==="$"&&r.charAt(1)==="$"||(i[r]=n[r]);return i}var i=t.$$minErr("$resource"),u=/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;t.module("ngResource",["ng"]).provider("$resource",function(){var u=/^https?:\/\/[^/]*/,n=this;this.defaults={stripTrailingSlashes:!0,cancellable:!1,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}};this.$get=["$http","$log","$q","$timeout",function(f,o,s,h){function nt(n){return w(n,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function w(n,t){return encodeURIComponent(n).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,t?"%20":"+")}function b(t,i){this.template=t;this.defaults=l({},n.defaults,i);this.urlParams={}}function k(t,u,w,nt){function rt(n,t){var i={};return t=l({},u,t),c(t,function(t,r){a(t)&&(t=t(n));i[r]=t&&t.charAt&&t.charAt(0)==="@"?e(n,t.substr(1)):t}),i}function ut(n){return n.resource}function tt(n){r(n||{},this)}var it=new b(t,nt);return w=l({},n.defaults.actions,w),tt.prototype.toJSON=function(){var n=l({},this);return delete n.$promise,delete n.$resolved,delete n.$cancelRequest,n},c(w,function(n,t){var w=/^(POST|PUT|PATCH)$/i.test(n.method),u=n.timeout,e=p(n.cancellable)?n.cancellable:it.defaults.cancellable;u&&!g(u)&&(o.debug("ngResource:\n  Only numeric values are allowed as `timeout`.\n  Promises are not supported in $resource, because the same value would be used for multiple requests. If you are looking for a way to cancel requests, you should use the `cancellable` option."),delete n.timeout,u=null);tt[t]=function(o,p,b,k){var lt={},ft,et,ht,ot;switch(arguments.length){case 4:ht=k;et=b;case 3:case 2:if(a(p)){if(a(o)){et=o;ht=p;break}et=p;ht=b}else{lt=o;ft=p;et=b;break}case 1:a(o)?et=o:w?ft=o:lt=o;break;case 0:break;default:throw i("badargs","Expected up to 4 arguments [params, data, success, error], got {0} arguments",arguments.length);}var ct=this instanceof tt,g=ct?ft:n.isArray?[]:new tt(ft),nt={},vt=n.interceptor&&n.interceptor.response||ut,yt=n.interceptor&&n.interceptor.responseError||undefined,st,at;return(c(n,function(n,t){switch(t){default:nt[t]=d(n);break;case"params":case"isArray":case"interceptor":case"cancellable":}}),!ct&&e&&(st=s.defer(),nt.timeout=st.promise,u&&(at=h(st.resolve,u))),w&&(nt.data=ft),it.setUrlParams(nt,l({},rt(ft,n.params||{}),lt),n.url),ot=f(nt).then(function(u){var f=u.data,e;if(f){if(y(f)!==!!n.isArray)throw i("badcfg","Error in resource configuration for action `{0}`. Expected response to contain an {1} but got an {2} (Request: {3} {4})",t,n.isArray?"array":"object",y(f)?"array":"object",nt.method,nt.url);n.isArray?(g.length=0,c(f,function(n){typeof n=="object"?g.push(new tt(n)):g.push(n)})):(e=g.$promise,r(f,g),g.$promise=e)}return u.resource=g,u},function(n){return(ht||v)(n),s.reject(n)}),ot["finally"](function(){g.$resolved=!0;!ct&&e&&(g.$cancelRequest=v,h.cancel(at),st=at=nt.timeout=null)}),ot=ot.then(function(n){var t=vt(n);return(et||v)(t,n.headers,n.status,n.statusText),t},yt),!ct)?(g.$promise=ot,g.$resolved=!1,e&&(g.$cancelRequest=st.resolve),g):ot};tt.prototype["$"+t]=function(n,i,r){a(n)&&(r=i,i=n,n={});var u=tt[t].call(this,n,this,i,r);return u.$promise||u}}),tt.bind=function(n){var i=l({},u,n);return k(t,i,w,nt)},tt}var v=t.noop,c=t.forEach,l=t.extend,d=t.copy,y=t.isArray,p=t.isDefined,a=t.isFunction,g=t.isNumber;return b.prototype={setUrlParams:function(n,t,r){var e=this,f=r||e.template,o,s,h="",l=e.urlParams={};c(f.split(/\W/),function(n){if(n==="hasOwnProperty")throw i("badname","hasOwnProperty is not a valid parameter name.");!new RegExp("^\\d+$").test(n)&&n&&new RegExp("(^|[^\\\\]):"+n+"(\\W|$)").test(f)&&(l[n]={isQueryParamValue:new RegExp("\\?.*=:"+n+"(?:\\W|$)").test(f)})});f=f.replace(/\\:/g,":");f=f.replace(u,function(n){return h=n,""});t=t||{};c(e.urlParams,function(n,i){o=t.hasOwnProperty(i)?t[i]:e.defaults[i];p(o)&&o!==null?(s=n.isQueryParamValue?w(o,!0):nt(o),f=f.replace(new RegExp(":"+i+"(\\W|$)","g"),function(n,t){return s+t})):f=f.replace(new RegExp("(/?):"+i+"(\\W|$)","g"),function(n,t,i){return i.charAt(0)==="/"?i:t+i})});e.defaults.stripTrailingSlashes&&(f=f.replace(/\/+$/,"")||"/");f=f.replace(/\/\.(?=\w+($|\?))/,".");n.url=h+f.replace(/\/\\\./,"/.");c(t,function(t,i){e.urlParams[i]||(n.params=n.params||{},n.params[i]=t)})}},k}]})}(window,window.angular);angular.module("qfxApiClientDiscoveryApp",["qfxWebFrameworkApp","ngResource"]);angular.module("qfxApiClientDiscoveryApp").service("catalogueSearchService",["$http","$q","$log","qfxAppConfig","queryStringService",function(n,t,i,r,u){var f=this;f.searchCatalogue=function(r,f){var e=t.defer(),s={term:r,format:f},o="/api/search?"+u.ObjectToQueryString(s);return n.get(o,{withCredentials:!0}).success(function(n){i.debug("Successfully fetched carousel items from url  "+o);e.resolve(n)}).error(function(n,t){i.error("Failed to fetch carousel items from url "+o+"; Status: "+t);e.reject(n)}),e.promise}}]);angular.module("qfxApiClientDiscoveryApp").service("CatalogueService",["$q","$http","$log","qfxAppConfig","queryStringService",function(n,t,i,r,u){var f=this;return f.getCarousel=function(r){var u;return u=n.defer(),t.get(r,{withCredentials:!0}).success(function(n){i.debug("Successfully fetched carousel items from url  "+r);u.resolve(n)}).error(function(n,t){i.error("Failed to fetch carousel items from url "+r+"; Status: "+t);u.reject(n)}),u.promise},f.getCarouselsByCategory=function(f,e,o,s,h,c){var l,a,v={siteType:f,collectionType:e,category:o,contentAvailability:s,batchSize:h,batchNumber:c};return l=n.defer(),a=r.websiteFacadeUrl+"/carousels?"+u.ObjectToQueryString(v),t.get(a,{withCredentials:!0}).success(function(n){var r,t,u;if(i.debug("Successfully fetched carousel items for the category "+o+"and collectionType "+e),r=[],n&&n.length){for(t=0;t<h;t++)u=h*(c-1)+t,r.push({index:u,carousel:n[t]});l.resolve(r)}else i.error("There were no carousels returned from the service for collectionType: "+e+"; category: "+o+"; batch size: "+h+"; batch number: "+c)}).error(function(n,t){i.error("Failed to fetch carousel items for the collectionType: "+e+"; category "+o+"; batch size: "+h+"; batch number: "+c+"; Status: "+t);l.reject(n)}),l.promise},{getCarousel:f.getCarousel,getCarouselsByCategory:f.getCarouselsByCategory}}]);angular.module("qfxApiClientDiscoveryApp").service("ContentService",["$http","$templateCache","$q","$log","qfxAppConfig",function(n,t,i,r,u){var f=this;return f.getContentList=function(t,f){var e,o;return e=i.defer(),f||e.reject("catalogueId not specified"),o=u.contentApiUrl+"/ContentList/"+f+"?pageSize="+t,n.get(o,{cache:!0}).success(function(n,i){r.debug("Successfully fetched content with status "+i+" and a page size of "+t+". The total number of records is "+n.Count+".  Resolving deferred");e.resolve(n)}).error(function(n,t){r.error("Failed to fetch content with status "+t+".  Rejecting deferred");e.reject(t)}),e.promise},f.getClassifications=function(){var t,f,e,o;return t=i.defer(),f="Catalogue/Classifications",e="?classificationScheme=OFLC-"+u.regionCode,o=u.discoveryApiUrl+"/"+f+e,n.get(o,{cache:!0}).success(function(n){r.debug("Successfully fetched classification");t.resolve(n)}).error(function(n,i){r.error("Error fetching classifications. Data: "+n+"; Status: "+i);t.reject(n)}),t.promise},{getContentList:f.getContentList,getClassifications:f.getClassifications}}]);angular.module("qfxApiClientDiscoveryApp").service("RecommendationsService",["$q","$http","$log","qfxAppConfig","queryStringService",function(n,t,i,r,u){var f=this;return f.getRateAndRecommend=function(f,e,o){var s,h,c={siteType:r.applicationName,contentType:f,category:e,contentAvailability:r.applicationName.toLowerCase()==="dvd"?"disc-dvd":r.applicationName.toLowerCase()==="streaming"?"streaming":null,skipDigitalCodes:o};return s=n.defer(),h="/api/Carousel/rr-0?"+u.ObjectToQueryString(c,","),t.get(h,{withCredentials:!0,cache:!1}).success(function(n){var r,t;i.debug("Successfully fetched item to rate and recommend for the category "+e+" and collectionType "+f);n&&n.Items.length?(r=n.Items,t={itemToRate:r.splice(0,1)[0],recommendedTitles:{Items:r}},s.resolve(t)):(t={itemToRate:null,recommendedTitles:{Items:[]}},n?i.debug("There were no items return from the service for contentType: "+f+"; category: "+e):i.error("Unexpected response while fetching items to rate and recommend: "+f+"; category: "+e),s.resolve(t))}).error(function(n,t){i.error("Failed to fetch item to rate and recommend for the contentType: "+f+"; category "+e+"; Status: "+t);s.reject(n)}),s.promise},{getRateAndRecommend:f.getRateAndRecommend}}]);angular.module("qfxApiClientDiscoveryApp").service("qfxCatalogueItemService",["$q","underscore","CatalogueItems","Titles","Episodes","Seasons","Series",function(n,t,i,r,u,f,e){var o=this;return o.getCatalogueItem=function(t,r){var u,f;return u=n.defer(),f=r||"details",i.load({digitalCode:t,expand:f},function(n){u.resolve(n)},function(n){u.reject(n)}),u.promise},o.getCatalogueItemResource=function(t,o){var s=n.defer();return i.load({digitalCode:t,expand:o},function(n){if(n.Type){var i=n.Type.toLowerCase();switch(i){case"title":s.resolve(r);break;case"episode":s.resolve(u);break;case"season":s.resolve(f);break;case"series":s.resolve(e);break;default:s.reject("Unknown type specified for "+t+". Given type: "+i)}}else s.reject("Catalogue Item didn't return item type")},function(n){s.reject(n)}),s.promise},o.getCatalogueItemOfType=function(t,i,o){var h,c,s;h=n.defer();c=o||"details";t=t.toLowerCase();switch(t){case"title":s=r;break;case"episode":s=u;break;case"season":s=f;break;case"series":s=e;break;default:h.reject("Unknown type specified for "+i+". Given type: "+t)}return s&&s.load({digitalCode:i,expand:c},function(n){h.resolve(n)},function(n){h.reject(n)}),h.promise},o.getParentCatalogueItemForType=function(t,i){var r=n.defer();return o.getCatalogueItemOfType(t,i).then(function(n){if(n&&typeof n.Type=="string")switch(n.Type.toLowerCase()){case"episode":r.resolve(n.Season);break;case"season":r.resolve(n.Series);break;case"series":case"title":default:r.resolve(null)}else r.reject("Catalogue item didn't have a type when it was returned from the API")},function(n){r.reject(n)}),r.promise},o.streamingProductTypes=["TVOD","EST","SVOD"],o.discProductTypes=["DVD","BluRay","BluRay3D"],o.getProductAvailability=function(n){var i=n&&n.AvailableProductTypes||[],r=n&&n.Flags||[];return{availableOn:{streaming:!!t.intersection(o.streamingProductTypes,i).length,disc:!!t.intersection(o.discProductTypes,i).length},comingSoonTo:{streaming:r.some(function(n){return n.toLowerCase()=="streamingcomingsoon"}),disc:r.some(function(n){return n.toLowerCase()=="comingsoon"})}}},{getCatalogueItem:o.getCatalogueItem,getCatalogueItemResource:o.getCatalogueItemResource,getCatalogueItemOfType:o.getCatalogueItemOfType,getProductAvailability:o.getProductAvailability,getParentCatalogueItemForType:o.getParentCatalogueItemForType}}]);angular.module("qfxApiClientDiscoveryApp").factory("CatalogueItems",["$resource","qfxAppConfig","qfxHttpHeaders",function(n,t,i){var f,r,u;if(t&&t.discoveryApiUrl)return f=t.discoveryApiUrl+"/Catalogue/CatalogueItems/:digitalCode",r={load:{method:"get",headers:i}},u=n(f,null,r),u.actions=r,u;throw"Could not find the Url for the API Facade in the given config";}]);angular.module("qfxApiClientDiscoveryApp").factory("Episodes",["$resource","qfxAppConfig","qfxHttpHeaders",function(n,t,i){var f,r,u;if(t&&t.discoveryApiUrl)return f=t.discoveryApiUrl+"/Catalogue/Episodes/:digitalCode",r={load:{method:"get",headers:i}},u=n(f,null,r),u.actions=r,u;throw"Could not find the Url for the API Facade in the given config";}]);angular.module("qfxApiClientDiscoveryApp").factory("Seasons",["$resource","qfxAppConfig","qfxHttpHeaders",function(n,t,i){var f,r,u;if(t&&t.discoveryApiUrl)return f=t.discoveryApiUrl+"/Catalogue/Seasons/:digitalCode",r={load:{method:"get",headers:i}},u=n(f,null,r),u.actions=r,u;throw"Could not find the Url for the API Facade in the given config";}]);angular.module("qfxApiClientDiscoveryApp").factory("Series",["$resource","qfxAppConfig","qfxHttpHeaders",function(n,t,i){var f,r,u;if(t&&t.discoveryApiUrl)return f=t.discoveryApiUrl+"/Catalogue/Series/:digitalCode",r={load:{method:"get",headers:i}},u=n(f,null,r),u.actions=r,u;throw"Could not find the Url for the API Facade in the given config";}]);angular.module("qfxApiClientDiscoveryApp").factory("Titles",["$resource","qfxAppConfig","qfxHttpHeaders",function(n,t,i){var f,r,u;if(t&&t.discoveryApiUrl)return f=t.discoveryApiUrl+"/Catalogue/Titles/:digitalCode",r={load:{method:"get",headers:i}},u=n(f,null,r),u.actions=r,u;throw"Could not find the Url for the API Facade in the given config";}]);angular.module("qfxApiClientDiscoveryApp").factory("Actors",["$resource","qfxAppConfig","qfxHttpHeaders",function(n,t,i){var f,r,u;if(t&&t.discoveryApiUrl)return f=t.discoveryApiUrl+"/Catalogue/Actors/:id",r={load:{method:"get",headers:i}},u=n(f,null,r),u.actions=r,u;throw"Could not find the Url for the API Facade in the given config";}]);angular.module("qfxApiClientDiscoveryApp").factory("ActorCredits",["$resource","qfxAppConfig","qfxHttpHeaders",function(n,t,i){var f,r,u;if(t&&t.discoveryApiUrl)return f=t.discoveryApiUrl+"/Catalogue/Actors/:id/Credits",r={load:{method:"get",headers:i}},u=n(f,null,r),u.actions=r,u;throw"Could not find the Url for the API Facade in the given config";}]);angular.module("qfxApiClientDiscoveryApp").factory("Curations",["$resource","qfxAppConfig","qfxHttpHeaders",function(n,t,i){var f,r,u;if(t&&t.discoveryApiUrl)return f=t.discoveryApiUrl+"/Catalogue/Curations/:curationId",r={load:{method:"get",headers:i}},u=n(f,null,r),u.actions=r,u;throw"Could not find the Url for the API Facade in the given config";}]);angular.module("qfxApiClientDiscoveryApp").factory("Collections",["$resource","qfxAppConfig","qfxHttpHeaders",function(n,t,i){var f,r,u;if(t&&t.discoveryApiUrl)return f=t.discoveryApiUrl+"/Catalogue/Collections",r={load:{method:"get",headers:i}},u=n(f,null,r),u.actions=r,u;throw"Could not find the Url for the API Facade in the given config";}]);angular.module("qfxApiClientDiscoveryApp").factory("Directors",["$resource","qfxAppConfig","qfxHttpHeaders",function(n,t,i){var f,r,u;if(t&&t.discoveryApiUrl)return f=t.discoveryApiUrl+"/Catalogue/Directors/:id",r={load:{method:"get",headers:i}},u=n(f,null,r),u.actions=r,u;throw"Could not find the Url for the API Facade in the given config";}]);angular.module("qfxApiClientDiscoveryApp").factory("DirectorCredits",["$resource","qfxAppConfig","qfxHttpHeaders",function(n,t,i){var f,r,u;if(t&&t.discoveryApiUrl)return f=t.discoveryApiUrl+"/Catalogue/Directors/:id/Credits",r={load:{method:"get",headers:i}},u=n(f,null,r),u.actions=r,u;throw"Could not find the Url for the API Facade in the given config";}]);angular.module("qfxApiClientDiscoveryApp").factory("Search",["$resource","qfxAppConfig","qfxHttpHeaders",function(n,t,i){var f,r,u;if(t&&t.discoveryApiUrl)return f=t.discoveryApiUrl+"/Catalogue/Search/",r={query:{method:"get",headers:i},load:{method:"get",headers:i,transformResponse:function(n){var t=angular.fromJson(n);return t.CatalogueItems=t.CatalogueItems[0],t}}},u=n(f,null,r),u.actions=r,u;throw"Could not find the Url for the API Facade in the given config";}]);angular.module("qfxApiClientDiscoveryApp").factory("SimilarTitles",["$resource","qfxAppConfig","qfxHttpHeaders",function(n,t,i){var f,r,u;if(t&&t.discoveryApiUrl)return f=t.discoveryApiUrl+"/Catalogue/CatalogueItems/:digitalCode/Similar",r={load:{method:"get",headers:i}},u=n(f,null,r),u.actions=r,u;throw"Could not find the Url for the API Facade in the given config";}]);angular.module("qfxApiClientDiscoveryApp").service("CollectionService",["$q","$log","$resource",function(n,t,i){var r=this;return r.prepareCollection=function(u,f){var e=n.defer();if(!f.load)throw new Error("Expected collection resource action 'load'. Please ensure the collection resource used follows the convention.");return u.$promise.then(function(n){var u=function(u,e,o){var s="GET",c=e||null,h=null;return(o||n.Params)&&(s="POST",h=o||n.Params),i(u,c,{load:angular.extend({},f.load,{method:s})}).load(h,function(n){r.prepareCollection(n,f)},function(n){t.error(n)})};n.Params&&n.Links&&n.Links.Self&&(n.applyFilters=function(t,i){return u(n.Links.Self,t,i)});n.CatalogueItems&&n.CatalogueItems.Links&&(n.CatalogueItems.Links.Self&&(n.reloadPage=function(){return u(n.CatalogueItems.Links.Self)}),n.CatalogueItems.Links.Previous&&(n.getPreviousPage=function(){return u(n.CatalogueItems.Links.Previous)}),n.CatalogueItems.Links.Next&&(n.getNextPage=function(){return u(n.CatalogueItems.Links.Next)}),e.resolve(n))},function(n){t.error("Unable to prepare collection due to error fetching HttpHeaders. Error: ",n);e.reject(n)}),e.promise},{prepareCollection:r.prepareCollection}}]);angular.module("qfxApiClientDiscoveryApp").factory("Keywords",["$resource","qfxAppConfig","qfxHttpHeaders",function(n,t,i){var f,r,u;if(t&&t.discoveryApiUrl)return f=t.discoveryApiUrl+"/Catalogue/Keywords/:id",r={load:{method:"get",headers:i}},u=n(f,null,r),u.actions=r,u;throw"Could not find the Url for the API Facade in the given config";}]);angular.module("qfxApiClientDiscoveryApp").factory("Classifications",["$resource","qfxAppConfig","qfxHttpHeaders",function(n,t,i){var f,r,u;if(t&&t.discoveryApiUrl)return f=t.discoveryApiUrl+"/Catalogue/Classifications",r={load:{method:"get",headers:i}},u=n(f,null,r),u.actions=r,u;throw"Could not find the Url for the API Facade in the given config";}]);angular.module("qfxApiClientDiscoveryApp").factory("MemberReviews",["$resource","qfxAppConfig","qfxHttpHeaders",function(n,t,i){var f,r,u;if(t&&t.discoveryApiUrl)return f=t.discoveryApiUrl+"/Catalogue/Reviews/Member/:memberGuid",r={load:{method:"get",headers:i}},u=n(f,null,r),u.actions=r,u;throw"Could not find the Url for the API Facade in the given config";}]);angular.module("qfxApiClientDiscoveryApp").factory("Articles",["$resource","qfxAppConfig","qfxHttpHeaders",function(n,t,i){var f,r,u;if(t&&t.discoveryApiUrl)return f=t.discoveryApiUrl+"/Catalogue/Articles",r={load:{method:"get",headers:i}},u=n(f,null,r),u.actions=r,u;throw"Could not find the Url for the API Facade in the given config";}]);angular.module("qfxApiClientDvdApp",["qfxWebFrameworkApp","ngResource"]);angular.module("qfxApiClientDvdApp").service("dvdApiService",["$http","$q","$log","qfxAppConfig",function(n,t,i,r){var u=this;return u.getQueues=function(){var u,f,e,o;return u=t.defer(),f="Queues",e=r.dvdApiUrl+"/"+f,o={pageNumber:1,pageSize:10},n.get(e,{withCredentials:!0}).success(function(n){i.debug("Successfully fetched queues");u.resolve(n)}).error(function(n,t){i.error("Error fetching member queues. Data: "+n+";Status: "+t);u.reject(n.Message)}),u.promise},u.activateQueue=function(u){var f,e,o,s;return f=t.defer(),e="Queues",o=r.dvdApiUrl+"/"+e,s={QueueName:u},n.post(o,s,{withCredentials:!0}).success(function(n){i.debug("Successfully activated kids queue");f.resolve(n)}).error(function(n,t){i.error("Error activating kids queue. Data: "+n+";Status: "+t);f.reject(n)}),f.promise},u.deactivateQueue=function(r){var u;return u=t.defer(),n.delete(r,{withCredentials:!0}).success(function(n){i.debug("Successfully deactivated queue");u.resolve(n)}).error(function(n,t){i.error("Error deactivating queue. Data: "+n+";Status: "+t);u.reject(n)}),u.promise},u.allocateQueue=function(r,u){var f,e;return f=t.defer(),e={RentalSpaces:u},n.put(r,e,{withCredentials:!0}).success(function(n){i.debug("Successfully allocated "+u+" rental space to queue");f.resolve(n)}).error(function(n,t){i.error("Error allocating "+u+" rental space to queue. Data: "+n+";Status: "+t);f.reject(n)}),f.promise},{getQueues:u.getQueues,activateQueue:u.activateQueue,deactivateQueue:u.deactivateQueue,allocateQueue:u.allocateQueue}}]);angular.module("qfxApiClientDvdApp").service("manageQueueItemService",["$q","$http","$log",function(n,t,i){var r=this;return r.fetchItem=function(r,u){var f;return f=n.defer(),t.get("Api/MyQueue/ManageItemOptions?listId="+r+"&itemId="+u,{cache:!1}).success(function(n){i.debug("Successfully fetched options to manage queue item "+u);f.resolve(n)}).error(function(n,t){f.reject("Failed to fetch options to manage queue item "+u+" with status: "+t+"; "+n)}),f.promise},r.deleteChildItem=function(r,u,f,e,o){var s=n.defer(),h={queueId:r,queueItemId:u,startPage:f,endPage:e,pageSize:o};return t.post("/Api/MyQueue/DeleteChildItem",h,{withCredentials:!0,cache:!1}).success(function(n){i.debug("Successfully deleted item "+u+" from queue "+r);s.resolve(n)}).error(function(n,t){s.reject("Failed to delete item "+u+" from queue "+r+" with status: "+t+"; "+n)}),s.promise},r.transferItem=function(r,u,f,e,o,s){var h=n.defer(),c={queueId:r,queueItemId:u,destinationQueueId:f,startPage:e,endPage:o,pageSize:s};return t.post("Api/MyQueue/TransferItem",c,{cache:!1}).success(function(n){i.debug("Successfully transferred item "+u+" from queue "+r+" to queue "+f);h.resolve(n)}).error(function(n,t){h.reject("Failed to transfer item "+u+" from queue "+r+" to queue "+f+" with status: "+t+"; "+n)}),h.promise},{fetchItem:r.fetchItem,deleteChildItem:r.deleteChildItem,transferItem:r.transferItem}}]);angular.module("qfxApiClientDvdApp").service("myDiscsService",["$q","$http","$log","qfxAppConfig",function(n,t,i,r){var u=this;return u.fetchDiscs=function(u,f,e){var o=n.defer(),s=r.websiteFacadeUrl+"/MyQueue/GetDiscs?status="+u+"&pageNumber="+f+"&pageSize="+e;return t.get(s,{cache:!1}).success(function(n){i.debug("Successfully fetched '"+u+"' discs");o.resolve(n)}).error(function(n,t){o.reject("Failed to fetch page "+f+" of '"+u+"' discs with status: "+t)}),o.promise},u.fetchDiscIssues=function(){var u=n.defer(),f=r.websiteFacadeUrl+"/MyQueue/GetDiscIssueTypes";return t.get(f,{cache:!1}).success(function(n){i.debug("Successfully fetched disc issue types");u.resolve(n)}).error(function(n,t){i.error("Failed to get disc issue types with status: "+t);u.reject(n)}),u.promise},u.submitReport=function(u,f){var e=n.defer(),o=r.websiteFacadeUrl+"/MyQueue/SubmitDiscReport",s={discId:u,report:f};return t.post(o,s,{cache:!1}).success(function(n){i.debug("Successfully submitted disc report");e.resolve(n)}).error(function(n,t){i.error("Failed to submit disc report with status: "+t);e.reject(n)}),e.promise},u.prenotifyDisc=function(u){var f=n.defer(),e=r.websiteFacadeUrl+"/MyQueue/PrenotifyDisc";return t.post(e,{discId:u},{cache:!1}).success(function(n){i.debug("Successfully prenotified disc");f.resolve(n)}).error(function(n,t){i.error("Failed to prenotify disc with status: "+t);f.reject(n)}),f.promise},{fetchDiscs:u.fetchDiscs,fetchDiscIssues:u.fetchDiscIssues,submitReport:u.submitReport,prenotifyDisc:u.prenotifyDisc}}]);angular.module("qfxApiClientDvdApp").service("myQueueService",["$q","$http","$log",function(n,t,i){var r=this;return r.getMyQueue=function(){var r;return r=n.defer(),t.get("Api/MyQueue?pageNumber="+pageNumber+"&pageSize="+pageSize,{cache:!1}).success(function(n){i.debug("Successfully loaded my queue page "+pageNumber);r.resolve(n)}).error(function(n,t){r.reject("Failed to load my queue page "+pageNumber+" with status: "+t+"; "+n)}),r.promise},{getMyQueue:r.getMyQueue}}]);angular.module("qfxApiClientDvdApp").factory("QueueCatalogueItemStatus",["$q","$resource","qfxAppConfig","qfxHttpHeaders",function(n,t,i,r){var e,u,f;return e=i.dvdApiUrl+"/CatalogueItems/:digitalCode/Status",u={load:{method:"get",withCredentials:!0,cache:!1,headers:r}},f=t(e,null,u),f.actions=u,f}]);angular.module("qfxApiClientMemberApp",["qfxWebFrameworkApp","ngResource"]);angular.module("qfxApiClientMemberApp").service("memberAPIService",["$http","$q","$log","qfxAppConfig","underscore",function(n,t,i,r,u){var f=this;return f.getCurrent=function(){if(f.currentMemberPromise)return t.when(f.currentMemberPromise.promise);var n=t.defer();return f.currentMemberPromise=n,f.getMemberDetails().then(function(t){n.resolve(t)},function(t,i){i===401?n.resolve(null):n.reject(t)}),n.promise},f.login=function(u,e,o){var s,h,c;return s=t.defer(),h="Login",c=r.membersApiUrl+"/"+h,u&&e||s.reject("email and/or password is missing"),n.post(c,{Email:u,Password:e,RememberMe:o},{withCredentials:!0}).success(function(n){i.debug("Successfully SignedIn");f.member=n;s.resolve(f.member)}).error(function(n){i.error("Failed to Signin");i.error(n);s.reject(n)}),s.promise},f.loginAndLinkSocialMedia=function(u,e,o,s){var h,c,l;return h=t.defer(),c="Login/LoginRadiusLink",l=r.membersApiUrl+"/"+c,u&&e&&o&&s||h.reject("invalid request"),n.post(l,{Email:u,Password:e,SocialMediaId:o,SocialMediaProvider:s},{withCredentials:!0}).success(function(n){i.debug("Successfully SignedIn and linked account");f.member=n;h.resolve(f.member)}).error(function(n){i.error("Failed to Signin");i.error(n);h.reject(n)}),h.promise},f.logout=function(){var u,e,o;return u=t.defer(),e="Logout",o=r.membersApiUrl+"/"+e,n.post(o,null,{withCredentials:!0}).success(function(n){i.debug("Successfully logged out");f.member=null;u.resolve(n)}).error(function(n,t){i.error("Failed to log out");u.reject(t)}),u.promise},f.getMemberDetails=function(u){var e,s,o,h;return e=t.defer(),o=u,!o&&f.member&&(o=f.member.ClientID),s="Members/"+(o||""),h=r.membersApiUrl+"/"+s,n.get(h,{withCredentials:!0}).success(function(n){n||e.reject("Server returned no data for member");e.resolve(n)}).error(function(n,t){u||t!==401?(i.error("Failed to fetch Member's details. Error code: "+t),e.reject(t)):(f.member=null,e.resolve(f.member))}),e.promise},f.getMemberCreditHistory=function(e,o,s){var h;return h=t.defer(),f.getCurrent().then(function(t){t?f.getBillingAccounts().then(function(f){var c,p,a,v,l,y,w=e||1,b=o||20,k=s||"";c=u.findWhere(f.Items,{Type:"MemberCredit"});c&&c.AccountId?(a="Members/"+t.GlobalID+"/MemberCredit/"+c.AccountId+"/Credits",y="?Page="+w+"&PageSize="+b+"&Sort="+k,v=r.membersApiUrl+"/"+a+y,n.get(v,{withCredentials:!0}).success(function(n){if(i.debug("Successfully fetched Member Credit History"),n.Items&&n.Items.length)for(l=0;l<n.Items.length;l++)n.Items[l].ExpiryDateTime&&(n.Items[l].ExpiryDateTime=Date.parse(n.Items[l].ExpiryDateTime));n.billingAccountId=c.AccountId;n.totalRemainingBalance=c.Balance;h.resolve(n)}).error(function(n,t){i.error("Failed to fetch Member Credit History");h.reject(t)})):h.reject("Could not find a member credit account for member "+p)},function(n){h.reject(n)}):h.reject("No authenticated member")}),h.promise},f.getTvodRights=function(){var u,s,e,o;return u=t.defer(),f.getCurrent().then(function(t){t?(e="Members/"+t.GlobalID+"/TvodRights",o=r.membersApiUrl+"/"+e,n.get(o,{withCredentials:!0,cache:!0}).success(function(n){u.resolve(n)}).error(function(n,t){i.error("Failed to get tvod rights for member: "+s+"; Data: "+n);u.reject(t)})):u.reject("No authenticated member")},function(){u.reject("No authenticated member")}),u.promise},f.getBillingAccounts=function(){var u,s,e,o;return u=t.defer(),f.getCurrent().then(function(t){t?(e="Members/"+t.GlobalID+"/MemberCredit",o=r.membersApiUrl+"/"+e,n.get(o,{withCredentials:!0,cache:!0}).success(function(n){u.resolve(n)}).error(function(n,t){i.error("Failed to get billing accounts for member: "+s+"; Data: "+n);u.reject(t)})):u.reject("No authenticated member")}),u.promise},f.getMemberContactPreferences=function(){var u,e,o;return u=t.defer(),f.getCurrent().then(function(t){t?(e="Members/"+t.GlobalID+"/ContactPreferences",o=r.membersApiUrl+"/"+e,n.get(o,{withCredentials:!0}).success(function(n){i.debug("Successfully fetched Member's contact preferences");u.resolve(n)}).error(function(n,t){i.error("Failed to fetch Member's contact preferences. Error code: "+t);u.reject(t)})):u.reject("No authenticated member")}),u.promise},f.updateMemberContactPreferences=function(i,u,e,o){var s,h,c,l;return s=t.defer(),f.getCurrent().then(function(t){t?(h="Members/"+t.GlobalID+"/ContactPreferences",c=r.membersApiUrl+"/"+h,l={Id:i,Name:u,IsEnabled:e,DataExtensionPropertyName:o},n.put(c,l,{withCredentials:!0}).success(function(n){s.resolve(n)}).error(function(n,t){s.reject(n,t)})):s.reject("No authenticated member")}),s.promise},f.getPaymentDetails=function(){var u,e,o;return u=t.defer(),f.getCurrent().then(function(t){t?(e="Members/"+t.GlobalID+"/PaymentMethods/",o=r.membersApiUrl+"/"+e,n.get(o,{withCredentials:!0}).success(function(n){i.info("Successfully fetched payment details");u.resolve(n)}).error(function(n,t){var r="An unexpected error has occurred";i.error("An error occurred while getting payment details. Status code: "+t);n&&n.MessageDetail&&(r=n.MessageDetail);u.reject(r)})):u.reject("No authenticated member")}),u.promise},f.removePaymentDetails=function(u){var e,o,s;return e=t.defer(),f.getCurrent().then(function(t){t?(o="Members/"+t.GlobalID+"/PaymentMethods/"+u,s=r.membersApiUrl+"/"+o,n.delete(s,{withCredentials:!0}).success(function(){i.info("RemovePaymentDetails: Payment details successfully removed");e.resolve()}).error(function(n,t){var r="An unexpected error has occurred";i.error("An error occurred while removing payment method. Status code: "+t);n&&n.MessageDetail&&(r=n.MessageDetail);e.reject(r)})):e.reject("No authenticated member")}),e.promise},f.updatePaymentPin=function(u){var e,o,s;return e=t.defer(),f.getCurrent().then(function(t){t?(o="Members/"+t.GlobalID+"/PaymentPin/",s=r.membersApiUrl+"/"+o,n.put(s,u,{withCredentials:!0}).success(function(){i.info("ChangePin: Pin changed successfully");e.resolve()}).error(function(n,t){i.error("An error occurred while updating payment pin. Status code: "+t);e.reject(n.Message)})):e.reject("No authenticated member")}),e.promise},f.resetPaymentPin=function(u){var e,o,s;return e=t.defer(),f.getCurrent().then(function(t){t?(o="Members/"+t.GlobalID+"/PaymentPin/Reset/SendEmail/",s=r.membersApiUrl+"/"+o,n.post(s,u,{withCredentials:!0}).success(function(){i.info("ChangePin: Pin changed successfully");e.resolve()}).error(function(n,t){i.error("An error occurred while updating payment pin. Status code: "+t);e.reject(n.Message)})):e.reject("No authenticated member")},function(n){e.reject(n)}),e.promise},f.updateMemberContactDetails=function(u){var e,o,s,h;return e=t.defer(),f.getCurrent().then(function(t){t?(o="Members/"+t.GlobalID,s=r.membersApiUrl+"/"+o,h=u,n.put(s,h,{withCredentials:!0}).success(function(n,t){t<400?(i.info("UpdateContactDetails: Contact details updated successfully"),e.resolve(n)):e.reject(n,t)}).error(function(n,t){i.error("An error occurred while updating contact details. Status code:"+t);e.reject(n,t)})):e.reject("No authenticated member")}),e.promise},f.changeEmail=function(u){var e,o,s;return e=t.defer(),f.getCurrent().then(function(t){t?(o="Members/"+t.GlobalID+"/Email",s=r.membersApiUrl+"/"+o,n.put(s,u,{withCredentials:!0}).success(function(n,t){t<400?(i.info("ChangeEmail: Email Address changed successfully"),e.resolve(n)):e.reject(n,t)}).error(function(n,t){i.error("An error occurred while updating email address. Status code: "+t);e.reject(n,t)})):e.reject("No authenticated member")}),e.promise},f.changePassword=function(u){var e,o,s;return e=t.defer(),f.getCurrent().then(function(t){t?(o="Members/"+t.GlobalID+"/Password",s=r.membersApiUrl+"/"+o,n.put(s,u,{withCredentials:!0}).success(function(n,t){t<400?(i.info("ChangePassword: Password changed successfully"),e.resolve(n)):e.reject(n,t)}).error(function(n,t){i.error("An error occurred while updating password. Status code: "+t);e.reject(n,t)})):e.reject("No authenticated member")}),e.promise},f.getActiveDevices=function(){var u,e,o;return u=t.defer(),f.getCurrent().then(function(t){t?(e="Members/"+t.GlobalID+"/Devices",o=r.membersApiUrl+"/"+e,n.get(o,{withCredentials:!0}).success(function(n){i.debug("Fetched members active devices");u.resolve(n)}).error(function(n,t){var r="An unexpected error has occurred";i.error("An error occurred while fetching member's active devices. Status code: "+t);n&&n.MessageDetail&&(r=n.MessageDetail);u.reject(r)})):u.reject("No authenticated member")}),u.promise},f.updateDeviceName=function(u,e){var o,s,h,c;return o=t.defer(),f.getCurrent().then(function(t){t?(s="Members/"+t.GlobalID+"/Devices/"+u+"/Name",h=r.membersApiUrl+"/"+s,c={DeviceName:e},n.put(h,c,{withCredentials:!0}).success(function(n){i.debug("updateDeviceName: Device name updated");o.resolve(n)}).error(function(n,t){var r="An unexpected error has occurred";i.error("An error occurred while updating device name. Status code: "+t);n&&n.MessageDetail&&(r=n.MessageDetail);o.reject(r)})):o.reject("No authenticated member")}),o.promise},f.deRegisterDevice=function(u){var e,o,s;return e=t.defer(),f.getCurrent().then(function(t){t?(o="Members/"+t.GlobalID+"/Devices/"+u,s=r.membersApiUrl+"/"+o,n.delete(s,{withCredentials:!0}).success(function(n){e.resolve(n)}).error(function(n,t){i.error("Failed to deregister device: "+n+"; status: "+t);e.reject(n)})):e.reject("No authenticated member")}),e.promise},f.getMemberSocialMediaSettings=function(){var u,e,o;return u=t.defer(),f.getCurrent().then(function(t){t?(e="Members/"+t.GlobalID+"/SocialMedia",o=r.membersApiUrl+"/"+e,n.get(o,{withCredentials:!0}).success(function(n){i.info("Successfully fetched member social media settings.");i.debug(n);u.resolve(n.Items)}).error(function(n,t){i.error("Error fetching member social media settings. Status code: "+t);u.reject(n)})):u.reject("No authenticated member")}),u.promise},f.unlinkSocialAccount=function(u){var e,o,s;return e=t.defer(),f.getCurrent().then(function(t){t?(o="Members/"+t.GlobalID+"/SocialMedia",s=r.membersApiUrl+"/"+o,n.delete(s,{withCredentials:!0,headers:{"Content-type":"application/json"},data:{SocialMediaSite:u}}).success(function(n){i.info("UnLinkSocialAccount: UnLinked Social account successfully");e.resolve(n)}).error(function(n,t){i.error("An error occurred while unlinking social account. Status code: "+t);e.reject(n)})):e.reject("No authenticated member")}),e.promise},f.getParentalControls=function(){var u,e,o;return u=t.defer(),f.getCurrent().then(function(t){t?(e="Members/"+t.GlobalID+"/ParentalControls",o=r.membersApiUrl+"/"+e,n.get(o,{withCredentials:!0}).success(function(n){i.debug("Successfully fetched Parental Controls Settings");u.resolve(n.Items[0])}).error(function(n,t){i.error("Failed to fetch Parental Controls Settings; Status: "+t);u.reject(n)})):u.reject("No authenticated member")}),u.promise},f.deleteParentalControls=function(u){var e,o,s;return e=t.defer(),f.getCurrent().then(function(t){t?(o="Members/"+t.GlobalID+"/ParentalControls",s=r.membersApiUrl+"/"+o,n.delete(s,{headers:{"Content-Type":"application/json"},data:{Pin:u},withCredentials:!0}).success(function(n){i.debug("Successfully deleted Parental Controls");e.resolve(n)}).error(function(n,t){i.error("Failed to Delete Parental Control; Status: "+t);e.reject(n)})):e.reject("No authenticated member")}),e.promise},f.createParentalControls=function(u,e,o){var s,h,c,l;return s=t.defer(),f.getCurrent().then(function(t){t?(h="Members/"+t.GlobalID+"/ParentalControls",c=r.membersApiUrl+"/"+h,l={Password:u,Pin:e,MaxRatingAllowedForPlayBack:o},n.post(c,l,{withCredentials:!0}).success(function(n){i.debug("Successfully created parental controls");s.resolve(n)}).error(function(n,t){i.error("Failed to create parental controls.  Data: "+n+"; Status: "+t);s.reject(n)})):s.reject("No authenticated member")}),s.promise},f.updateParentalControls=function(u,e){var o,s,h,c;return o=t.defer(),f.getCurrent().then(function(t){t?(s="Members/"+t.GlobalID+"/ParentalControls",h=r.membersApiUrl+"/"+s,c={Pin:u,MaxRatingAllowedForPlayBack:e},n.put(h,c,{withCredentials:!0}).success(function(n){i.debug("Successfully updated parental controls");o.resolve(n)}).error(function(n,t){i.error("Failed to update Parental Controls. Data: "+n+";Status: "+t);o.reject(n)})):o.reject("No authenticated member")}),o.promise},f.getSubscriptions=function(){var u,e,o;return u=t.defer(),f.memberSubscriptions?u.resolve(f.memberSubscriptions):f.getCurrent().then(function(t){t?(e="Members/"+t.GlobalID+"/Subscriptions",o=r.membersApiUrl+"/"+e,n.get(o,{withCredentials:!0}).success(function(n){i.info("GetSubscriptions: Successfully retrieved member subscription information.");f.memberSubscriptions=n;u.resolve(n)}).error(function(n,t){i.error("GetSubscriptions: An error occurred while getting subscription information. Status code: "+t);f.memberSubscriptions=null;u.reject(n)})):u.reject("No authenticated member")}),u.promise},f.pauseSubscription=function(u,e){var o,s,h;return o=t.defer(),f.getCurrent().then(function(t){t?(s="Members/"+t.GlobalID+"/Subscriptions/"+e+"/Suspend",h=r.membersApiUrl+"/"+s,n.put(h,u,{withCredentials:!0}).success(function(n){i.info("PauseSubscription: Subscription is paused.");f.memberSubscriptions=null;o.resolve(n)}).error(function(n,t){i.error("An error occurred while pausing subscription. Status code: "+t);f.memberSubscriptions=null;o.reject(n)})):o.reject("No authenticated member")}),o.promise},f.resumeSubscription=function(u){var e,o,s;return e=t.defer(),f.getCurrent().then(function(t){t?(o="Members/"+t.GlobalID+"/Subscriptions/"+u+"/Resume",s=r.membersApiUrl+"/"+o,n.put(s,null,{withCredentials:!0}).success(function(n){i.info("ResumeSubscription: Subscription is resumed.");f.memberSubscriptions=null;e.resolve(n)}).error(function(n,t){i.error("An error occurred while resuming subscription. Status code: "+t);f.memberSubscriptions=null;e.reject(n)})):e.reject("No authenticated member")}),e.promise},f.continueSubscription=function(u){var e,o,s;return e=t.defer(),f.getCurrent().then(function(t){t?(o="Members/"+t.GlobalID+"/Subscriptions/"+u+"/Continue",s=r.membersApiUrl+"/"+o,n.post(s,null,{withCredentials:!0}).success(function(n){i.info("ContinueSubscription: Subscription will be continued.");f.memberSubscriptions=null;e.resolve(n)}).error(function(n,t){i.error("An error occurred while continuing subscription. Status code: "+t);f.memberSubscriptions=null;e.reject(n)})):e.reject("No authenticated member")}),e.promise},f.cancelSubscription=function(u){var e,o,s,h;return e=t.defer(),f.getCurrent().then(function(t){t?(o="Members/"+t.GlobalID+"/Subscriptions/"+u+"/Cancel",s=r.membersApiUrl+"/"+o,h={Id:u},n.post(s,h,{withCredentials:!0}).success(function(n){i.info("CancelSubscription: Subscription will be cancelled.");f.memberSubscriptions=null;e.resolve(n)}).error(function(n,t){i.error("An error occurred while cancelled subscription. Status code: "+t);f.memberSubscriptions=null;e.reject(n)})):e.reject("No authenticated member")}),e.promise},f.getTransactionInvoiceDetails=function(r){var u,f;return u=t.defer(),f="/MyAccount/TransactionHistory/InvoiceDetails?invoiceId="+r,n.get(f,{withCredentials:!0}).success(function(n){i.info("Successfully fetched invoice details.");u.resolve(n)}).error(function(n,t){i.error("An error occurred while tring to get invoice details. Status code: "+t);u.reject(n)}),u.promise},f.getCreditInvoiceDetails=function(r,u){var f,e;return f=t.defer(),e="/MyAccount/TransactionHistory/MemberCreditDetails?billingAccountId="+r+"&creditTransactionId="+u,n.get(e,{withCredentials:!0}).success(function(n){i.info("Successfully fetched credit details.");f.resolve(n)}).error(function(n,t){i.error("An error occurred while tring to get credit details. Status code: "+t);f.reject(n)}),f.promise},{login:f.login,loginAndLinkSocialMedia:f.loginAndLinkSocialMedia,logout:f.logout,getMemberDetails:f.getMemberDetails,getMemberCreditHistory:f.getMemberCreditHistory,getTvodRights:f.getTvodRights,getMemberContactPreferences:f.getMemberContactPreferences,updateMemberContactPreferences:f.updateMemberContactPreferences,getPaymentDetails:f.getPaymentDetails,removePaymentDetails:f.removePaymentDetails,updatePaymentPin:f.updatePaymentPin,resetPaymentPin:f.resetPaymentPin,updateMemberContactDetails:f.updateMemberContactDetails,getActiveDevices:f.getActiveDevices,updateDeviceName:f.updateDeviceName,changePassword:f.changePassword,changeEmail:f.changeEmail,deRegisterDevice:f.deRegisterDevice,getParentalControls:f.getParentalControls,deleteParentalControls:f.deleteParentalControls,createParentalControls:f.createParentalControls,updateParentalControls:f.updateParentalControls,getMemberSocialMediaSettings:f.getMemberSocialMediaSettings,unlinkSocialAccount:f.unlinkSocialAccount,getSubscriptions:f.getSubscriptions,pauseSubscription:f.pauseSubscription,resumeSubscription:f.resumeSubscription,continueSubscription:f.continueSubscription,cancelSubscription:f.cancelSubscription,getTransactionInvoiceDetails:f.getTransactionInvoiceDetails,getCreditInvoiceDetails:f.getCreditInvoiceDetails,getCurrent:f.getCurrent}}]);angular.module("qfxApiClientMemberApp").service("memberRatingService",["$http","$q","$log","qfxAppConfig","qfxUserContext",function(n,t,i,r,u){var f=this;return f.protocol="https",f.getCatalogueItemRating=function(f){var e,o,s;return e=t.defer(),u.getMemberGuid().then(function(t){t?(o="Members/"+t+"/Ratings/"+f,s=r.membersApiUrl+"/"+o,n.get(s,{withCredentials:!0,cache:!1}).success(function(n){i.debug("Successfully fetched rating for digitalCode "+f,n);e.resolve(n)}).error(function(n,t){i.error("Failed to fetch rating for digitalCode: "+f+" with status: "+t);e.reject(n,t)})):e.reject("Not logged in")},function(){e.reject("Error getting member GUID")}),e.promise},f.rateCatalogueItem=function(f,e){var o,s,h;return o=t.defer(),u.getMemberGuid().then(function(t){t?(s="Members/"+t+"/Ratings/"+f,h=r.membersApiUrl+"/"+s,f&&e!==null&&e!==undefined?n.post(h,{Rating:e},{withCredentials:!0,cache:!1}).success(function(n){i.debug("Successfully rated digitalCode: "+f+" rating: "+e);o.resolve(n)}).error(function(n,t){i.error("Failed to rate digitalCode: "+f+" rating: "+e+"status:"+t);o.reject(n,t)}):o.reject("digitalCode and/or rating is missing")):o.reject("Not logged in")},function(){o.reject("Error getting member GUID")}),o.promise},f.deleteCatalogueItemRating=function(f){var e,o,s;return e=t.defer(),u.getMemberGuid().then(function(t){t?(o="Members/"+t+"/Ratings/"+f,s=r.membersApiUrl+"/"+o,n.delete(s,{withCredentials:!0,cache:!1}).success(function(n){i.debug("Successfully deleted rating for digitalCode: "+f);e.resolve(n)}).error(function(n,t){i.error("Failed to delete rating for digitalCode: "+f+" with status:"+t);e.reject(n,t)})):e.reject("Not logged in")},function(){e.reject("Error getting member GUID")}),e.promise},{getCatalogueItemRating:f.getCatalogueItemRating,rateCatalogueItem:f.rateCatalogueItem,deleteCatalogueItemRating:f.deleteCatalogueItemRating}}]);angular.module("qfxApiClientMemberApp").factory("qfxUserContext",["$q","$log","underscore","Members","MemberSubscriptions",function(n,t,i,r,u){var f=this;return f.init=function(){r.then(function(n){f.member=n},function(){});u.then(function(n){f.memberSubscriptions=n},function(n){t.error(n)});f.member=f.member||{};f.memberSubscriptions=f.memberSubscriptions||{}},f.getMemberGuid=function(){var t;return t=n.defer(),r.then(function(n){t.resolve(n.GlobalID)},function(n){t.reject(n)}),t.promise},f.hasStreamingAccess=function(){return i.any(f.memberSubscriptions.Items,function(n){return n.Status==="OK"&&n.IsStreamingSubscription===!0})},f.hasDiscRentalAccess=function(){return i.any(f.memberSubscriptions.Items,function(n){return n.Status==="OK"&&n.IsRentalSubscription===!0})},f.hasMemberDiscount=function(){return i.any(f.memberSubscriptions.Items,function(n){return n.Status==="OK"&&n.HasMemberDiscount===!0})},f.init(),{member:f.member,memberSubscriptions:f.memberSubscriptions,getMemberGuid:f.getMemberGuid,hasStreamingAccess:f.hasStreamingAccess,hasDiscRentalAccess:f.hasDiscRentalAccess,hasMemberDiscount:f.hasMemberDiscount}}]);angular.module("qfxApiClientMemberApp").directive("catalogueItemRating",["memberRatingService",function(n){return{restrict:"A",require:"qfxStarRating",link:function(t,i,r,u){var f=u.getId();f&&(n.getCatalogueItemRating(f).then(function(n){n.MemberRating&&u.setUserRating(n.MemberRating)},function(){u.disableInput()}),u.addEventListener("qfx-rating-changed",function(t,i){i.id&&i.id==f&&i.newRating>=0&&n.rateCatalogueItem(i.id,i.newRating)}),u.addEventListener("qfx-rating-deleted",function(t,i){i.id&&i.id==f&&n.deleteCatalogueItemRating(i.id)}))}}}]);angular.module("qfxApiClientMemberApp").filter("QfxPaymentAccountTypeFilter",function(){return function(n){switch(n){case"IPPayment":return"Credit/Debit Card";default:return n}}});angular.module("qfxApiClientMemberApp").factory("Members",["$resource","$q","qfxAppConfig","qfxHttpHeaders",function(n,t,i,r){var o,u,f,e;return i.canAppBeAuthenticated?(o=i.membersApiUrl+"/Members",u={load:{method:"get",headers:r}},f=n(o,null,u),f.actions=u,f.load().$promise):(e=t.defer(),e.reject("Couldn't fetch member details as this site doesn't have an authenticated context."),e.promise)}]);angular.module("qfxApiClientMemberApp").factory("MemberSubscriptions",["$q","$resource","qfxAppConfig","qfxHttpHeaders","Members",function(n,t,i,r,u){var s,e,o,f=n.defer();return u.then(function(n){s=i.membersApiUrl+"/Members/"+n.GlobalID+"/Subscriptions";e={load:{method:"get",headers:r}};o=t(s,null,e);o.actions=e;o.load({},function(n){f.resolve(n)},function(n){f.reject(n)})},function(n){f.reject(n)}),f.promise}]);angular.module("qfxApiClientMemberApp").factory("MemberReviewSubmissions",["$resource","$q","qfxAppConfig","qfxHttpHeaders","$log",function(n,t,i,r,u){var f,e,o;return i&&i.membersApiUrl?(f=i.membersApiUrl+"/Members/:memberGuid/MemberReviews/:digitalCode",e={load:{method:"get",headers:r},submit:{method:"post",headers:r}},o=n(f,null,e)):u.error("Could not find the Url for the membersApiUrl in the given config",i),o}]);angular.module("qfxApiClientOffersApp",["qfxWebFrameworkApp","qfxApiClientMemberApp"]);angular.module("qfxApiClientOffersApp").service("offersApiService",["$http","$q","$log","qfxAppConfig","qfxUserContext",function(n,t,i,r,u){var f=this;return f.baseUrl=r.offersApiUrl||"",f.currentOffers=function(){var r,e;return r=t.defer(),u.getMemberGuid().then(function(t){e=f.baseUrl+"/CurrentOffers";n.post(e,{memberId:t},{withCredentials:!0,cache:!0}).success(function(n){i.debug("Successfully fetched offer details");r.resolve(n)}).error(function(n,t){i.error("Failed to fetch offer details. Error code: "+t);r.reject(t)})}),r.promise},f.GetCancellationOffer=function(){var r,e;return r=t.defer(),u.getMemberGuid().then(function(t){e=f.baseUrl+"/GetCancellationOffer";n.post(e,{memberId:t},{withCredentials:!0}).success(function(n){i.debug("Successfully fetched cancellation offer details");r.resolve(n)}).error(function(n,t){i.error("Failed to fetch cancellation offer details. Error code: "+t);r.reject(t)})}),r.promise},f.getBonusOffer=function(r,u,e,o){var s,h;return s=t.defer(),h=f.baseUrl+"/GetBonusOffer",n.post(h,{offerRedemptionId:r,offerName:u,promocode:e,planId:o},{withCredentials:!0}).success(function(n){i.debug("Successfully fetched bonus offer details");s.resolve(n)}).error(function(n,t){i.error("Failed to fetch bonus offer details. Error code: "+t);s.reject(t)}),s.promise},{currentOffers:f.currentOffers,GetCancellationOffer:f.GetCancellationOffer,getBonusOffer:f.getBonusOffer}}]);angular.module("qfxApiClientStreamingApp",["qfxWebFrameworkApp","qfxApiClientOffersApp"]);angular.module("qfxApiClientStreamingApp").service("playlistService",["$q","$http","$log","qfxAppConfig",function(n,t,i,r){var u=this,f;return u.getPlaylists=function(){var i;return i=n.defer(),t.get(r.streamingApiUrl+"/Playlists",{withCredentials:!0,cache:!1}).success(function(n){i.resolve(n)}).error(function(n){i.reject(n)}),i.promise},f=r.playlistServiceApiUrl,u.addCatalogueItem=function(r,u){var e,o;return e=n.defer(),o={digitalCode:r,catalogueFunctionString:u},t.post(f+"/Add",o,{withCredentials:!0,cache:!1}).success(function(n){i.debug("Successfully added "+r+"to playlist");e.resolve(n)}).error(function(n,t){var u="Failed to add "+r+" to playlist : "+t+"; "+n;i.debug(u);e.reject(u)}),e.promise},u.removeCatalogueItem=function(r){var u,e;return u=n.defer(),e={digitalCode:r},t.post(f+"/Remove",e,{withCredentials:!0,cache:!1}).success(function(n){i.debug("Successfully removed "+r+"from playlist");u.resolve(n)}).error(function(n,t){var f="Failed to remove "+r+" from playlist : "+t+"; "+n;i.debug(f);u.reject(f)}),u.promise},u.loadPlaylist=function(r,u){var e;return e=n.defer(),t.get(f+"/GetItems?pageNumber="+r+"&pageSize="+u,{cache:!1}).success(function(n){i.debug("Successfully loaded playlist page "+r);e.resolve(n)}).error(function(n,t){e.reject("Failed to load playlist page "+r+" with status: "+t+"; "+n)}),e.promise},u.moveItemPositionInPlaylist=function(r,u,e,o,s,h){var c,l,a;return c=n.defer(),l=f+"/MoveToPosition",a={playlistId:r,playlistItemId:u,position:e,startPage:o,endPage:s,pageSize:h},t.post(l,a,{withCredentials:!0,cache:!1}).success(function(n){i.debug("Moved item");c.resolve(n)}).error(function(n,t){i.debug("Failed to move item");c.reject("Failed to move playlist item with status: "+t+"; "+n)}),c.promise},u.deleteItem=function(r){var u;return u=n.defer(),t.post(r,{withCredentials:!0,cache:!1}).success(function(n){i.debug("Successfully deleted item");u.resolve(n)}).error(function(n,t){u.reject("Failed to delete playlist item with status: "+t+"; "+n)}),u.promise},u.moveItemToTop=function(r){var u;return u=n.defer(),t.post(r,null,{withCredentials:!0,cache:!1}).success(function(n){i.debug("Successfully moved item to top");u.resolve(n)}).error(function(n,t){u.reject("Failed to move item to top with status: "+t+"; "+n)}),u.promise},u.moveItemToBottom=function(r){var u;return u=n.defer(),t.post(r,null,{withCredentials:!0,cache:!1}).success(function(n){i.debug("Successfully moved item to bottom");u.resolve(n)}).error(function(n,t){u.reject("Failed to move item to bottom with status: "+t+"; "+n)}),u.promise},u.fetchOptionsForItem=function(r){var u;return u=n.defer(),t.get(f+"/GetOptions?playlistItemId="+r,{cache:!1}).success(function(n){i.debug("Fetched options for item "+r);u.resolve(n)}).error(function(n,t){i.debug("Failed to move item");u.reject("Failed to get options for item "+r+": "+t+"; "+n)}),u.promise},u.catalogueItemStatus=function(r){var u;return u=n.defer(),t.get(f+"/Status/"+r,{withCredentials:!0,cache:!1}).success(function(n){i.debug("Fetched playlist status for "+r);u.resolve(n)}).error(function(n,t){i.debug("Failed to get playlist status for item "+r);u.reject("Failed to get playlist status for item "+r+": "+t+"; "+n)}),u.promise},{getPlaylists:u.getPlaylists,addCatalogueItem:u.addCatalogueItem,removeCatalogueItem:u.removeCatalogueItem,loadPlaylist:u.loadPlaylist,moveItemPositionInPlaylist:u.moveItemPositionInPlaylist,deleteItem:u.deleteItem,moveItemToTop:u.moveItemToTop,moveItemToBottom:u.moveItemToBottom,fetchOptionsForItem:u.fetchOptionsForItem,catalogueItemStatus:u.catalogueItemStatus}}]);angular.module("qfxApiClientStreamingApp").service("qfxStreamingProductService",["$window","$q","$http","$log","qfxAppConfig","qfxUserContext","qfxUrlBuilder","offersApiService","queryStringService","underscore",function(n,t,i,r,u,f,e,o,s,h){var c=this;return c.getPersonalisedPricing=function(n){var f,e;return f=t.defer(),e=u.productServiceApiUrl+"/"+n+"?siteType="+u.applicationName,i.get(e,{withCredentials:!0,cache:!1}).success(function(t){r.debug("qfxStreamingProductService: Successfully fetched personalised pricing for "+n);f.resolve(t)}).error(function(t,i){r.debug("qfxStreamingProductService: Failed to fetched personalised pricing for "+n,t);f.reject("qfxStreamingProductService: Failed to fetch personalised pricing for "+n+" with status code: "+i+", Returned data: "+t)}),f.promise},c.getProductGroups=function(n){var i;return i=t.defer(),c.getPersonalisedPricing(n).then(function(n){n?i.resolve({productGroups:n.ProductGroups}):i.reject("no data")},function(n){i.reject(n)}),i.promise},c.getLowestPricedProductGroup=function(n){var f,e;return f=t.defer(),e=u.productServiceApiUrl+"/"+n+"/MinPrice?siteType="+u.applicationName,i.get(e,{withCredentials:!0,cache:!1}).success(function(t){r.debug("qfxStreamingProductService: Successfully fetched lowest priced product group for "+n);f.resolve(t)}).error(function(t,i){r.debug("qfxStreamingProductService: Failed to fetched lowest priced product group for "+n,t);f.reject("qfxStreamingProductService: Failed to fetch lowest priced product group for "+n+" with status code: "+i+", Returned data: "+t)}),f.promise},c.purchaseProduct=function(t){if(t&&t.DigitalCode&&t.Resolution){var i="everyone";f.getMemberGuid().then(function(n){n&&(i="member")}).finally(function(){var r,f;f={digitalCode:t.DigitalCode,resolutionCode:t.Resolution,targetUser:i};t.Type.toLowerCase()=="est"?r=u.offerSiteUrl+"/OWN?"+s.ObjectToQueryString(f):t.Type.toLowerCase()=="tvod"?r=u.offerSiteUrl+"/RENT?"+s.ObjectToQueryString(f):t.Type.toLowerCase()=="svod"&&(r=e.getPlayUrl(f.digitalCode));r&&(n.location.href=r)})}},c.getProductModalData=function(n,i,r){var u=t.defer(),l=h.chain(i.Products).any(function(n){return!(n.BasePrice==n.RetailPrice&&n.BasePrice==n.PersonalisedPrice)}).value(),s=c.getProductModalTemplate(i),e={id:s.id,template:s.path,openFrom:r,catalogueItem:n,productGroup:i,displayPriceBreakdown:l,purchaseProduct:c.purchaseProduct,planSelection:c.goToPlanSelection,hasStreamingAccess:f.hasStreamingAccess(),hasDiscRentalAccess:f.hasDiscRentalAccess()};return c.requiresSubscription(i)?o.currentOffers().then(function(n){e.streamingPlan=h.chain(n).filter(function(n){if(f.hasDiscRentalAccess()){if(n.PlanDetail&&n.PlanDetail.Type==="Combo")return!0}else if(n.PlanDetail&&n.PlanDetail.Type==="Streaming")return!0}).min(function(n){return n&&n.Payment?n.Payment.Amount:0}).value();u.resolve(e)}):u.resolve(e),u.promise},c.getProductModalTemplate=function(n){var t={};return n.IsDiscounted&&!f.hasMemberDiscount()?(t.id="subscribe-to-premium-pass",t.path="views/modals/qfx-premium-pass-modal.tpl.html"):c.requiresSubscription(n)?(t.id="subscribe-to-streaming",t.path="views/modals/qfx-svod-subscription-modal.tpl.html"):(t.id="products-modal",t.path="views/modals/qfx-products-modal.tpl.html"),t},c.goToPlanSelection=function(t){f.getMemberGuid().then(function(i){var r=e.getPlanSelectionUrl(t,i);n.location.href=r})},c.requiresSubscription=function(n){return!f.hasStreamingAccess()&&n.Type.toLowerCase()=="svod"},c.isPurchased=function(n){return h.any(n.Products,function(n){return n.PurchaseState==="IsPurchased"})},{getPersonalisedPricing:c.getPersonalisedPricing,getProductGroups:c.getProductGroups,getLowestPricedProductGroup:c.getLowestPricedProductGroup,purchaseProduct:c.purchaseProduct,getProductModalData:c.getProductModalData,getProductModalTemplate:c.getProductModalTemplate,goToPlanSelection:c.goToPlanSelection,requiresSubscription:c.requiresSubscription,isPurchased:c.isPurchased}}]);angular.module("qfxApiClientStreamingApp").run(["$templateCache",function(n){"use strict";n.put("views/main.html",'<div class="jumbotron"> <h1>\'Allo, \'Allo!<\/h1> <p class="lead"> <img src="images/yeoman.png" alt="I\'m Yeoman"><br> Always a pleasure scaffolding your apps. <\/p> <p><a class="btn btn-lg btn-success" ng-href="#/">Splendid!<span class="glyphicon glyphicon-ok"><\/span><\/a><\/p> <\/div> <div class="row marketing"> <h4>HTML5 Boilerplate<\/h4> <p> HTML5 Boilerplate is a professional front-end template for building fast, robust, and adaptable web apps or sites. <\/p> <h4>Angular<\/h4> <p> AngularJS is a toolset for building the framework most suited to your application development. <\/p> <h4>Karma<\/h4> <p>Spectacular Test Runner for JavaScript.<\/p> <\/div>')}]);angular.module("qfxAddressApp",["qfxWebFrameworkApp","ngFormFixes"]);angular.module("qfxAddressApp").directive("qfxPredictiveAddressInput",["$document","$timeout","$log","jQuery","predictiveAddressService","$compile","$templateRequest","$parse",function(n,t,i,r,u,f,e){return{restrict:"A",transclude:!0,require:"ngModel",scope:{enabled:"=qfxPredictiveAddressInput"},link:function(r,o,s,h){r.id="predictive-address-results-"+Math.floor(Math.random()*1e3+1);r.pendingPredicitionCount=0;r.predictionAttempts=0;r.canPredict=!0;r.active=!1;r.predictAddress=function(n){r.enabled&&(n&&n.length!==0||(r.couldNotFindAddress=!1,r.addressPredictions=null),r.predictionAttempts++,n&&n.length>4&&(r.canPredict&&r.pendingPredicitionCount==0||r.predictionAttempts>3)&&(r.canPredict=!1,r.predictionAttempts=0,r.pendingPredicitionCount++,i.debug("qfx-predirctive-address-input: Performing search for "+n),u.predictAddress(n).then(function(n){r.addressPredictions=n.Addresses;r.activeAddressIndex=null;r.active=!0},function(n){i.error(n);r.enabled=!1}).finally(function(){r.pendingPredicitionCount--;r.predictionAttempts=0}),t(function(){r.canPredict=!0},300)))};r.selectAddress=function(n){n!==null&&n!==undefined&&n>=0?u.selectAddress(r.addressPredictions[n].Id).then(function(n){r.$root.$broadcast("qfx:predict-address:resolved",n);r.deactivate()},function(n){i.error("qfxPredictiveAddressInput:selectAddress",n)}):(n===-1||n!==null||n!==undefined)&&(r.couldNotFindAddress=!0,r.deactivate())};r.focusAddress=function(n){r.addressPredictions&&r.addressPredictions.length>0&&(r.activeAddressIndex!=null&&r.activeAddressIndex!=undefined&&r.activeAddressIndex>=0&&r.activeAddressIndex<r.addressPredictions.length&&(r.addressPredictions[r.activeAddressIndex].active=!1),typeof r.activeAddressIndex=="number"?n.keyCode===38?r.activeAddressIndex=r.activeAddressIndex===-1?r.addressPredictions.length-1:r.activeAddressIndex>0?r.activeAddressIndex-1:0:n.keyCode===40&&(r.activeAddressIndex>=0&&r.activeAddressIndex<r.addressPredictions.length-1?r.activeAddressIndex+=1:r.activeAddressIndex=-1):r.activeAddressIndex=0,r.activeAddressIndex!=-1&&(r.addressPredictions[r.activeAddressIndex].active=!0))};r.clearPredictions=function(){r.activeAddressIndex=null;r.addressPredictions=null};r.hasPendingPredictions=function(){return r.pendingPredicitionCount>0};r.handleKeyEvent=function(n){n.keyCode===9?r.deactivate():n.keyCode===40||n.keyCode===38?(n.preventDefault(),r.focusAddress(n)):n.keyCode===13?(n.preventDefault(),r.selectAddress(r.activeAddressIndex)):((n.keyCode>=48&&n.keyCode)<=90||n.keyCode===8)&&r.predictAddress(h.$modelValue);r.$apply()};r.deactivate=function(){r.clearPredictions();r.active=!1};o.on("keydown",r.handleKeyEvent);angular.element(n.context).on("click",function(){r.deactivate();r.$apply()});e("views/tpl/qfx-predictive-address-input.tpl.html").then(function(n){var t=angular.element(n),i=f(t)(r);o.after(i)})}}}]);angular.module("qfxAddressApp").service("predictiveAddressService",["$q","$http","$log","qfxAppConfig",function(n,t,i,r){var u=this;return u.baseUrl=r.membersApiUrl+"/PredictiveAddress",u.predictAddress=function(r,f){var e,o,s;return e=n.defer(),o=u.baseUrl+"/list",s={inputText:r,resultLimit:f},t.post(o,s,{withCredentials:!0}).success(function(n){e.resolve(n)}).error(function(n,t){e.reject("Failed to fetch address prediction from "+o+" with status "+t);i.error(n)}),e.promise},u.selectAddress=function(r){var f,e,o;return f=n.defer(),e=u.baseUrl+"/resolve",o={Id:r},t.post(e,o,{withCredentials:!0}).success(function(n){f.resolve(n)}).error(function(n,t){f.reject("Failed to resolve address with id "+r+" from "+e+" with status "+t);i.error(n)}),f.promise},{predictAddress:u.predictAddress,selectAddress:u.selectAddress}}]);angular.module("qfxAddressApp").component("qfxAddress",{templateUrl:"views/tpl/qfx-address.tpl.html",restrict:"E",controllerAs:"vm",bindings:{address:"=ngModel",validator:"=?",disableSearch:"<?",isRequired:"<?"},controller:["$log","qfxAppConfig","$scope","underscore",function(n,t,i){var r=this;r.$onInit=function(){r.region=t.region;r.showSearchLabel="Change my address";r.updateState();i.$watch("vm.address",function(){r.updateState()},!0);i.$on("qfx:address-search:select",function(n,t){r.address=t;r.showAddress()});i.$on("qfx:address-search:cancel",function(){r.showAddress(!0)});i.$on("qfx:address-search:disabled",function(){r.showAddress(!0)})};r.showAddress=function(n){r.displaySearch=!1;r.displayAddress=!0;n||!r.isAddress(r.address)?(r.isAddressEditable=!0,r.showSearchLabel="Find my address"):r.isAddressEditable=!1};r.showSearch=function(){r.disableSearch?r.showAddress(!0):(r.displaySearch=!0,r.displayAddress=!1,r.isAddressEditable=!1,r.showSearchLabel="Change my address",r.isAddress(r.address)&&(r.address=null))};r.updateState=function(){(r.isAddressEditable!==!0||r.displayAddress!==!0)&&(r.isAddress(r.address)?r.showAddress(r.disableSearch):r.showSearch())};r.isAddress=function(n){var t=!1;return n&&typeof n=="object"&&(n.AddressLine1||n.AddressLine2||n.City||n.Suburb||n.State||n.Postcode)&&(t=!0),t}}]});angular.module("qfxAddressApp").component("qfxAddressSearch",{restrict:"E",templateUrl:"views/tpl/qfx-address-search.tpl.html",controllerAs:"vm",bindings:{address:"=ngModel",validator:"=?",disableSearch:"<?",isRequired:"<?"},controller:["$timeout","$log","predictiveAddressService","$scope","$element",function(n,t,i,r,u){var f=this;f.id="predictive-address-results-"+Math.floor(Math.random()*1e3+1);f.pendingPredicitionCount=0;f.predictionAttempts=0;f.canPredict=!0;f.active=!1;f.resultLimit=50;f.searchInput="";f.minInputLength=3;f.addressPredictions=[];f.resultListElement=u.find("#address-search-predictions");f.$onInit=function(){f.modelOptions={updateOn:"default change blur",updateOnDefault:!0,allowInvalid:!0};f.resultListElement=u.find("#address-search-predictions");r.$watch("vm.addressSearchForm",function(n){if(n){f.addressSearchForm.warning||(f.addressSearchForm.warning={});var t=f.addressSearchForm["vm.addressSearchForm"];f.validator&&(f.validator.isAsync?angular.extend(t.$asyncValidators,f.validator.conditions):angular.extend(t.$validators,f.validator.conditions))}})};f.predictAddress=function(u){u&&u.length!==0||(f.couldNotFindAddress=!1,f.addressPredictions=null);f.predictionAttempts++;u&&u.length>f.minInputLength&&(f.canPredict&&f.pendingPredicitionCount==0||f.predictionAttempts>3)&&(f.canPredict=!1,f.predictionAttempts=0,f.pendingPredicitionCount++,t.debug("qfxAddressSearch: Performing search for "+u),i.predictAddress(u,f.resultLimit).then(function(n){f.addressPredictions=n.Addresses;f.activeAddressIndex=null;f.active=!0;f.resultListElement&&f.resultListElement.scrollTop(0)},function(n){t.error(n);r.$root.$broadcast("qfx:address-search:disabled",n);f.predictiveAddressServiceDown=!0}).finally(function(){f.pendingPredicitionCount--;f.predictionAttempts=0}),n(function(){f.canPredict=!0},300))};f.selectAddress=function(){f.activeAddressIndex!==null&&f.activeAddressIndex!==undefined&&f.activeAddressIndex>=0&&i.selectAddress(f.addressPredictions[f.activeAddressIndex].Id).then(function(n){r.$root.$broadcast("qfx:address-search:select",n)},function(n){t.error("qfxAddressSearch:selectAddress",n);r.predictiveAddressServiceDown=!0;r.$root.$broadcast("qfx:address-search:disabled",n)})};f.getPredictionsClasses=function(){return{"no-results":f.searchInput&&f.searchInput.length>=f.minInputLength&&(!f.addressPredictions||f.addressPredictions.length<=0),"no-input":(!f.searchInput||f.searchInput.length<f.minInputLength)&&(!f.addressPredictions||f.addressPredictions.length<=0)}};f.activateMatch=function(n){f.addressPredictions&&f.addressPredictions.length>0&&(f.activeAddressIndex!=null&&f.activeAddressIndex!=undefined&&f.activeAddressIndex>=0&&f.activeAddressIndex<f.addressPredictions.length&&(f.addressPredictions[f.activeAddressIndex].active=!1),f.activeAddressIndex=n>0&&n<f.addressPredictions.length?n:0,f.addressPredictions[f.activeAddressIndex].active=!0)};f.incrementSelection=function(n){var i,t;f.addressPredictions&&f.addressPredictions.length>0&&(i=f.activeAddressIndex!==null&&f.activeAddressIndex!==undefined?n?f.activeAddressIndex-1:f.activeAddressIndex===f.addressPredictions.length-1?f.activeAddressIndex:f.activeAddressIndex+1:n?f.addressPredictions.length-1:0,f.activateMatch(i),f.resultListElement&&(t=f.resultListElement.children().get(f.activeAddressIndex),t&&t.scrollIntoView()))};f.keyDownHandler=function(n){n.which===38?f.incrementSelection(!0):n.which===40?f.incrementSelection(!1):n.which===13&&(n.preventDefault(),n.stopPropagation(),f.selectAddress())};f.cancelSearch=function(){r.$root.$broadcast("qfx:address-search:cancel",{userCanceled:!0})};f.canSelectAddress=function(){return typeof f.activeAddressIndex=="number"&&f.activeAddressIndex>=0&&f.activeAddressIndex<f.addressPredictions.length};f.clearPredictions=function(){f.activeAddressIndex=null;f.addressPredictions=null};f.hasPendingPredictions=function(){return f.pendingPredicitionCount>0}}]});angular.module("qfxAddressApp").factory("qfxAddressValidator",function(){return{isAsync:!1,modelOptions:{updateOn:"default blur",debounce:{"default":1e3,blur:0},allowInvalid:!0},conditions:{allRequiredFields:function(n){var t=!0;return n&&n.AddressLine1&&(n.Suburb||n.City)&&n.State&&n.Postcode||(t=!1),t}},messages:{allRequiredFields:"Please enter all of the required fields"}}});angular.module("qfxAddressApp").component("qfxAddressInput",{templateUrl:"views/tpl/qfx-address-input.tpl.html",restrict:"E",transclude:!0,controllerAs:"vm",bindings:{address:"=ngModel",validator:"=?",displayAddress:"=",region:"=",isAddressEditable:"=editable",isRequired:"<?"},controller:["$log","qfxAppConfig","$scope",function(n,t,i){var r=this;r.$onInit=function(){r.modelOptions=r.validator&&r.validator.modelOptions?r.validator.modelOptions:{updateOnDefault:!0,allowInvalid:!0};i.$watch("vm.addressForm",function(n){if(n){r.addressForm.warning||(r.addressForm.warning={});var t=r.addressForm["vm.addressForm"];r.validator&&(r.validator.isAsync?angular.extend(t.$asyncValidators,r.validator.conditions):angular.extend(t.$validators,r.validator.conditions))}})};i.$watch("vm.address",function(n,t){if(n!==null&&n!==undefined&&!_.isEqual(n,t)&&(n.Id!==null&&n.Id!==undefined&&n.Id.length>0&&(!t||n.Id!==t.Id)?r.address.AddressEnteredUsingValidation=!0:(r.address.AddressEnteredUsingValidation=!1,r.address.Id=null),r.addressForm)){var i=r.addressForm["vm.addressForm"];i&&i.$validate()}},!0)}]});var module=angular.module("ngFormFixes",[]);module.directive("form",function(){return{restrict:"E",require:"form",link:function(n,t,i,r){n.$watch(function(){return r.$submitted},function(t){t&&n.$broadcast("$submitted")})}}});module.directive("ngForm",function(){return{restrict:"EA",require:"form",link:function(n,t,i,r){n.$on("$submitted",function(){r.$setSubmitted()})}}});angular.module("qfxAddressApp").run(["$templateCache",function(n){"use strict";n.put("views/tpl/qfx-address-form-au.tpl.html",'<div class="address-fields"> <label for="Address_AddressLine1" ng-class="{\'required\': vm.isRequired}">Address Line 1<\/label> <qfx-validation> <input qfx-validation-input id="Address_AddressLine1" name="addressLine1" ng-model="vm.address.AddressLine1" ng-required="vm.isRequired" ng-maxlength="100" type="text" value="{{vm.address.AddressLine1}}" ng-disabled="!vm.isAddressEditable"> <\/qfx-validation> <ng-messages for="vm.addressForm.addressLine1.$error" ng-if="vm.addressForm.addressLine1.$dirty" class="message-animate"> <ng-message when="required">Please enter an Address.<\/ng-message> <ng-message when="maxlength">Please enter an Address that is less than 100 characters long.<\/ng-message> <\/ng-messages> <label for="Address_AddressLine2">Address Line 2<\/label> <qfx-validation> <input qfx-validation-input id="Address_AddressLine2" name="addressLine2" ng-maxlength="100" ng-model="vm.address.AddressLine2" type="text" value="{{vm.address.AddressLine2}}" ng-disabled="!vm.isAddressEditable"> <\/qfx-validation> <ng-messages for="vm.addressForm.addressLine2.$error" ng-if="vm.addressForm.addressLine2.$dirty" class="message-animate"> <ng-message when="maxlength">Please enter an Address that is less than 100 characters long.<\/ng-message> <\/ng-messages> <label for="Address_Suburb" ng-class="{\'required\': vm.isRequired}">Suburb<\/label> <qfx-validation> <input qfx-validation-input id="Address_Suburb" name="suburb" ng-model="vm.address.Suburb" ng-maxlength="50" type="text" value="{{vm.address.Suburb}}" ng-required="vm.isRequired" ng-disabled="!vm.isAddressEditable"> <\/qfx-validation> <ng-messages for="vm.addressForm.suburb.$error" ng-show="vm.addressForm.suburb.$dirty" class="message-animate"> <ng-message when="required">Please enter a suburb.<\/ng-message> <ng-message when="maxlength">Please enter a suburb that is less than 50 characters long.<\/ng-message> <\/ng-messages> <div class="state select-wrapper small"> <label for="Address_State" ng-class="{\'required\': vm.isRequired}">State<\/label> <qfx-validation> <select qfx-validation-input id="Address_State" class="small" name="state" ng-model="vm.address.State" ng-required="vm.isRequired" ng-disabled="!vm.isAddressEditable"> <option disabled selected value="" style="display:none">State<\/option> <option value="ACT">ACT<\/option> <option value="NSW">NSW<\/option> <option value="NT">NT<\/option> <option value="QLD">QLD<\/option> <option value="SA">SA<\/option> <option value="TAS">TAS<\/option> <option value="VIC">VIC<\/option> <option value="WA">WA<\/option> <\/select> <\/qfx-validation> <\/div> <div class="postcode"> <label for="Address_Postcode" ng-class="{\'required\': vm.isRequired}">Postcode<\/label> <qfx-validation> <input qfx-validation-input id="Address_Postcode" class="small" name="postcode" maxlength="4" ng-model="vm.address.Postcode" type="text" value="{{vm.address.Postcode}}" ng-required="vm.isRequired" ng-disabled="!vm.isAddressEditable"> <\/qfx-validation> <\/div> <ng-messages for="vm.addressForm.state.$error" ng-show="vm.addressForm.state.$dirty" class="message-animate"> <ng-message when="required">Please select a State.<\/ng-message> <\/ng-messages> <ng-messages for="vm.addressForm.postcode.$error" ng-show="vm.addressForm.postcode.$dirty" class="message-animate"> <ng-message when="required">Please enter a postcode.<\/ng-message> <ng-message when="maxlength">Australian postcodes are no longer than 4 characters.<\/ng-message> <\/ng-messages> <\/div>');n.put("views/tpl/qfx-address-form-nz.tpl.html",'<div class="address-fields"> <label for="Address_AddressLine1" ng-class="{\'required\': vm.isRequired}">Address Line 1<\/label> <qfx-validation> <input qfx-validation-input id="Address_AddressLine1" name="addressLine1" ng-model="vm.address.AddressLine1" ng-required="vm.isRequired" ng-maxlength="100" type="text" value="{{vm.address.AddressLine1}}"> <\/qfx-validation> <ng-messages for="vm.addressForm.addressLine1.$error" ng-if="vm.addressForm.addressLine1.$dirty" class="message-animate"> <ng-message when="required">Please enter an Address.<\/ng-message> <ng-message when="maxlength">Please enter an Address that is less than 100 characters long.<\/ng-message> <\/ng-messages> <label for="Address_AddressLine2">Address Line 2<\/label> <qfx-validation> <input qfx-validation-input id="Address_AddressLine2" name="addressLine2" ng-maxlength="100" ng-model="vm.address.AddressLine2" type="text" value="{{vm.address.AddressLine2}}"> <\/qfx-validation> <ng-messages for="vm.addressForm.addressLine2.$error" ng-if="vm.addressForm.addressLine2.$dirty" class="message-animate"> <ng-message when="maxlength">Please enter an Address that is less than 100 characters long.<\/ng-message> <\/ng-messages> <label for="Address_City" ng-class="{\'required\': vm.isRequired}">City<\/label> <qfx-validation> <input qfx-validation-input id="Address_City" name="city" ng-model="vm.address.City" ng-maxlength="50" type="text" value="{{vm.address.City}}" ng-required="vm.isRequired"> <\/qfx-validation> <ng-messages for="vm.addressForm.city.$error" ng-show="vm.addressForm.city.$dirty" class="message-animate"> <ng-message when="maxlength">Please enter a suburb that is less than 50 characters long.<\/ng-message> <\/ng-messages> <div class="postcode"> <label for="Address_Postcode" ng-class="{\'required\': vm.isRequired}">Postcode<\/label> <qfx-validation> <input qfx-validation-input id="Address_Postcode" class="small" name="postcode" ng-model="vm.address.Postcode" type="text" value="{{vm.address.Postcode}}" ng-required="vm.isRequired"> <\/qfx-validation> <\/div> <ng-messages for="vm.addressForm.postcode.$error" ng-show="vm.addressForm.postcode.$dirty" class="message-animate"> <ng-message when="required">Please enter a postcode.<\/ng-message> <\/ng-messages> <\/div>');n.put("views/tpl/qfx-address-input.tpl.html",'<div class="address-input" ng-show="vm.displayAddress"> <!--Note: ng-modelOptions will throw an error when the value is null se we make sure we default to something--> <!--Note: ng-form name must begin with the the controllerAs name to bind to the controller scope --> <ng-form name="vm.addressForm" ng-model-options="vm.modelOptions || { updateOnDefault: true,  allowInvalid: true }" novalidate ng-model="vm.address"> <ng-include ng-if="vm.region === \'AU\'" src="\'views/tpl/qfx-address-form-au.tpl.html\'"><\/ng-include> <ng-include ng-if="vm.region === \'NZ\'" src="\'views/tpl/qfx-address-form-nz.tpl.html\'"><\/ng-include> <ng-messages for="vm.addressForm.$error" class="message-animate"> <ng-message ng-repeat="(key, message) in vm.validator.messages" when="{{key}}">{{message}}<\/ng-message> <\/ng-messages> <\/ng-form> <div ng-transclude class="actions"> <\/div> <\/div>');n.put("views/tpl/qfx-address-search.tpl.html",'<div class="address-search"> <!--Note: ng-modelOptions will throw an error when the value is null se we make sure we default to something--> <!--Note: ng-form name must begin with the the controllerAs name to bind to the controller scope --> <ng-form name="vm.addressSearchForm" ng-model-options="vm.modelOptions || { updateOnDefault: true,  allowInvalid: true }" novalidate ng-model="vm.address"> <label for="address-search-input" ng-class="{\'required\': vm.isRequired}">Search for your address<\/label> <qfx-validation> <input name="Address.SearchInput" type="text" id="address-search-input" placeholder="eg. 114 Broadway St, Sydney, 2000" ng-change="vm.predictAddress(vm.searchInput)" ng-keydown="vm.keyDownHandler($event)" ng-model="vm.searchInput" ng-required="vm.isRequired" qfx-validation-input> <\/qfx-validation> <ng-messages ng-if="(!vm.addressSearchForm.$pristine || vm.addressSearchForm.$submitted) && !vm.addressSearchForm.$valid" for="vm.addressSearchForm.$error" class="message-animate"> <ng-message ng-repeat="(key, message) in vm.validator.messages" when="{{key}}">{{message}}<\/ng-message> <div ng-message="required">Please find and select your address.<\/div> <\/ng-messages> <!--<label for="address-search-predictions">Select your address from the list<\/label>--> <ul id="address-search-predictions" class="" id="{{id}}" ng-class="vm.getPredictionsClasses()"> <li ng-repeat="match in vm.addressPredictions" class="result" ng-class="{ \'active\' : match.active}" ng-click="vm.activateMatch($index)"> {{match.Address}} <\/li> <\/ul> <a ng-click="vm.cancelSearch()">I can\'t find my address...<\/a> <button type="button" ng-click="vm.selectAddress()" ng-disabled="!vm.canSelectAddress()">Select Address<\/button> <\/ng-form> <\/div>');n.put("views/tpl/qfx-address.tpl.html",'<div class="address-finder"> <qfx-address-search ng-show="vm.displaySearch" is-required="vm.displaySearch && vm.isRequired" validator="vm.validator"><\/qfx-address-search> <qfx-address-input ng-model="vm.address" is-required="vm.isRequired" validator="vm.validator" region="vm.region" display-address="vm.displayAddress" editable="vm.isAddressEditable"> <a ng-click="vm.showSearch()" ng-show="!vm.disableSearch">{{vm.showSearchLabel}}<\/a> <\/qfx-address-input> <\/div>');n.put("views/tpl/qfx-predictive-address-input.tpl.html",'<ul ng-if="active && !couldNotFindAddress" class="address-predictions" id="{{id}}"> <li ng-repeat="match in addressPredictions" class="result" ng-click="selectAddress($index)" ng-class="{ \'active\' : match.active}">{{match.Address}}<\/li> <li class="result" ng-click="selectAddress()" tabindex="{{addressPredictions.length}}" ng-class="{ \'active\' : activeAddressIndex === -1}">I can\'t find my address...<\/li> <\/ul>')}]);angular.module("qfxNotificationApp",["qfxWebFrameworkApp","qfxApiClientMemberApp","ngResize"]);angular.module("qfxNotificationApp").controller("QfxToastController",["$scope","$timeout","qfxToastService",function(n,t){n.toaster=[];n.timers={};n.$on("qfx:notification:toast",function(i,r){t(function(){n.toaster.push(r);n.setupTimer(r)},0)});n.removeToast=function(t){var i=n.toaster.map(function(n){return String(n.Id)}).indexOf(String(t.Id));i>=0&&(n.cancelTimerForToast(t),n.removeToastByIndex(i))};n.removeToastByIndex=function(t){n.toaster.splice(t,1)};n.cancelTimerForToast=function(i){t.cancel(n.timers[i.Id])};n.setupTimer=function(i,r){var u=r||i.Timer;i.Timer!=0&&u&&(n.timers[i.Id]=t(function(){n.removeToast(i)},u))}}]).animation(".toast",[function(){return{enter:function(n,t){var i=$(n),r=i.outerHeight(),u=i.css("opacity");$.fn.transition?(i.css({height:0,scale:0,opacity:0}),i.transition({height:r,scale:1.1,opacity:u},300,function(){i.transition({scale:1},100,function(){i.removeAttr("style");t()})})):(i.css({height:0,opacity:0}),i.animate({height:r,opacity:u},300,function(){i.removeAttr("style");t()}))},leave:function(n,t){var i=$(n),u=i.outerHeight(),r;i.css({height:u});$.fn.transition?i.transition({scale:.75},200,"linear",function(){var n=i.find(".outer-wrapper");n.css({zIndex:98});n.transition({y:"-100px"},200,"linear");i.transition({height:0,scale:.75,opacity:0,marginBottom:0},200,"linear",function(){i.removeAttr("style");t()})}):(r=i.find(".outer-wrapper"),r.css({zIndex:98}),i.animate({height:0,opacity:0,marginBottom:0},200,"linear",function(){i.removeAttr("style");t()}))}}}]);angular.module("qfxNotificationApp").directive("qfxNotificationToaster",[function(){return{template:'<div ng-repeat="toast in toaster" class="toast" ng-class="getToastClass(toast)" ng-mouseover="onMouseover(toast)" ng-mouseleave="onMouseleave(toast)" ng-include="toast.TemplatePath"><\/div>',restrict:"E",link:function(n){n.getToastClass=function(n){var t=[];return n.Type&&t.push(n.Type.toLowerCase()),n.Content.Image&&t.push("with-image"),n.Class&&t.push(n.Class),n.Template&&t.push(n.Template),t.join(" ")};n.onMouseover=function(t){n.cancelTimerForToast(t)};n.onMouseleave=function(t){n.setupTimer(t,1e3)}}}}]);angular.module("qfxWebFrameworkApp").directive("qfxModal",["resize","$window",function(){return{templateUrl:"views/tpl/qfx-modal.tpl.html",restrict:"EA",transclude:!0,scope:{qfxModalId:"@",qfxDockToElement:"@"},link:function(n){var t=function(t){for(var i in t)n[i]=t[i]};n.close=function(){n.$emit("qfx:modal:close",n.modal.Id);n.modal=null};n.$on("qfx:modal:display",function(i,r){r.templateModel&&t(r.templateModel);n.modal=r});n.$on("qfx:modal:hide",function(){n.modal=null})}}}]).animation(".action-modal-overlay",[function(){return{enter:function(n){var t=$(n);t.removeClass("transition")},leave:function(n,t){var i=$(n),r=$(".action-modal"),u=n.data("qfxDockTo"),o=$(window).width()/2,s=$(window).height()/2,f,e;u&&$("."+u).length?(f=$("."+u).offset().left+$("."+u).width()/2,e=$("."+u).height()/2,r.addClass("minimized"),i.css({background:"transparent"}),i.animate({scale:.1},300,function(){i.css({top:s,left:o,width:0,height:0});r.css({width:"30rem","min-height":"20rem"});r.animate({},200,function(){r.css("position","absolute");r.animate({padding:0,width:"20rem",height:"10rem"},10,function(){r.animate({borderRadius:200},500);r.addClass("dock")});i.animate({top:e,left:f},500,function(){r.children().hide();i.animate({opacity:0},800,function(){i.css("z-index",0)})});i.addClass("transition");i.animate({opacity:0},800,function(){i.css("z-index",0)})})})):(r.animate({opacity:0},200,function(){t()}),i.animate({opacity:0},200,function(){t()}))}}}]);angular.module("qfxNotificationApp").service("qfxNotificationService",["$http","$q","$log","qfxAppConfig","$localStorage",function(n,t,i,r,u){var f=this;return f.getMemberTrayAlerts=function(){var u,f;return u=t.defer(),f=r.notificationsServiceApiUrl+"/GetMemberTrayAlerts",n.get(f,{withCredentials:!0}).success(function(n){u.resolve(n);i.debug("Successfully fetched member tray notification alerts")}).error(function(n,t){u.reject("http error: "+t);i.debug("Failed to fetch fetched member tray notification alerts")}),u.promise},f.getModalNotifications=function(e){var o,s;return o=t.defer(),s=r.notificationsServiceApiUrl+"/GetNotifications?requestReferrer="+e,n.get(s,{withCredentials:!0}).success(function(n){f.purgeExpiredNotifications();var t=n;u.notifications&&(t=n.filter(function(n){var t=!0;return u.notifications.forEach(function(i){n.AlertName.toLowerCase()==i.AlertName.toLowerCase()&&(t=!1)}),t}));o.resolve(t);i.debug("Successfully fetched member modal notifications")}).error(function(n,t){o.reject("http error: "+t);i.debug("Failed to fetch fetched member modal notifications")}),o.promise},f.storeNotification=function(n){var i=t.defer();return u.notifications||(u.notifications=[]),u.notifications=u.notifications.filter(function(t){return t.AlertName!=n}),u.notifications.push({AlertName:n,DateAdded:new Date}),i.resolve(),i.promise},f.purgeExpiredNotifications=function(){u.notifications&&(u.notifications=u.notifications.filter(function(n){var t=new Date(n.DateAdded),i=new Date,r=new Date(i-t)/864e5;return r<1}))},{getMemberTrayAlerts:f.getMemberTrayAlerts,getModalNotifications:f.getModalNotifications,storeNotification:f.storeNotification}}]);angular.module("qfxNotificationApp").service("qfxToastService",["$rootScope",function(n){var t=this;return t.createToast=function(i){if(t.isToastValid(i)){var r=t.processToast(i);n.$broadcast("qfx:notification:toast",r)}},t.createErrorToast=function(n){var i={Type:"error"};i.Content=typeof n=="string"?{Heading:"Oops",Message:n}:n;t.createToast(i)},t.createSuccessToast=function(n){var i={Type:"success"};i.Content=typeof n=="string"?{Heading:"Success",Message:n}:n;t.createToast(i)},t.isToastValid=function(n){return n!==null&&typeof n=="object"&&(n.Content.Message||n.Content.Heading)?!0:!1},t.processToast=function(n){var t=n;return t.Id=Math.random()*100000000000000000,t.Type=n.Type.toLowerCase(),t.Type=="information"&&(t.Type="info"),t.Template!=null&&typeof t.Template=="string"?(t.Template=t.Template.toLowerCase(),t.TemplatePath="views/toasts/"+t.Template+".html"):(t.Template="default",t.TemplatePath="views/toasts/default.html"),t.Timer!=null&&parseInt(t.Timer)>=0?t.Timer>0&&(t.Timer=Math.max(1e3,t.Timer)):t.Timer=3e3,t},{createToast:t.createToast,createErrorToast:t.createErrorToast,createSuccessToast:t.createSuccessToast}}]);angular.module("qfxWebFrameworkApp").service("qfxModalService",["$rootScope","$q","$http","$templateCache",function(n,t,i,r){var u=this,f;return u.isValidConfig=function(n){return typeof n=="object"&&n.Id&&n.templatePath},u.showModal=function(t){n.$broadcast("qfx:modal:display",t)},u.hideModal=function(){n.$broadcast("qfx:modal:hide")},u.createModal=function(t){u.isValidConfig(t)&&n.$broadcast("qfx:modal:display",t)},f=function(n){var f=t.defer(),u=n;return u.outsideClose=typeof n.outsideClose!="undefined"?!!n.outsideClose:!0,n.template?(u.template=n.template.indexOf(".html")>=0?n.template:"views/modals/"+n.template+".html",r.get(u.template)?f.resolve(u):i.get(u.template).then(function(n){n&&n.data&&n.data.indexOf(!1)&&(u.template="views/modals/default.html")},function(){u.template="views/modals/default.html"}).finally(function(){f.resolve(u)})):(u.template="views/modals/default.html",f.resolve(u)),f.promise},u.displayModal=function(t){typeof t=="object"&&f(t).then(function(t){n.$broadcast("qfx:notification:modal:display",t)})},u.closeModal=function(){n.$broadcast("qfx:notification:modal:close")},{showModal:u.showModal,hideModal:u.hideModal,createModal:u.createModal,displayModal:u.displayModal,closeModal:u.closeModal}}]);angular.module("qfxNotificationApp").directive("qfxNotificationModal",["$timeout","$window",function(n,t){return{templateUrl:"views/tpl/qfx-notification-modal.tpl.html",restrict:"E",scope:{},link:function(i,r){i.modal=null;i.modalQueue=[];i.$on("qfx:notification:modal:display",function(t,r){n(function(){i.modal?i.modalQueue.push(r):(i.modal=r,i.openingModal=!0)})});i.$on("qfx:notification:modal:close",function(){n(function(){if(i.modal&&!i.closingModal)var n=i.$watch("openingModal",function(t){t||(n(),i.close())})})});i.$on("qfx:notification:modal:remove",function(){n(function(){f();i.afterClose()})});i.afterClose=function(){i.$applyAsync(function(){i.openingModal=!1;i.closingModal=!1;i.showingModal=!1;typeof i.modal.onClose=="function"&&i.modal.onClose();i.modal=null;n(function(){i.modal=i.modalQueue.shift();i.modal&&(i.openingModal=!0)})})};i.$on("$includeContentLoaded",function(){n(function(){var f;if(i.modal){var s=r.find(".modal"),t=r.find("#content"),n=i.getTransform(i.modal.openFrom),o=u(n.translateX,n.translateY);e();t.css({x:n.translateX,y:n.translateY,z:0,scale:[n.scaleX,n.scaleY],opacity:0});i.showingModal=!0;f=function(){t.transition({x:0,y:0,z:0,scale:[1,1],opacity:1},o,"ease",function(){t.removeAttr("style");i.$applyAsync(function(){i.openingModal=!1})})};i.modal.openFrom?t.transition({opacity:.3},100,f):f()}})});i.close=function(){var s=r.find(".modal"),t=r.find("#content"),e=i.modal&&i.modal.closeTo,n=i.getTransform(e),o=u(n.translateX,n.translateY);f();t.css({x:0,y:0,z:0,scale:[1,1],opacity:1});i.showingModal=!1;i.closingModal=!0;t.transition({x:n.translateX,y:n.translateY,z:0,scale:[n.scaleX,n.scaleY],opacity:e?.2:0},o,"ease").transition({opacity:0},e?200:0,function(){t.removeAttr("style");i.closingModal=!1;i.afterClose()})};i.getTransform=function(n){var u,f,t,i,e={translateX:0,translateY:0,scaleX:.5,scaleY:.5};return n&&n!=""&&(u=angular.element(n)[0],f=r.find("#content")[0],u&&f&&(t=u.getBoundingClientRect(),i=f.getBoundingClientRect(),e={translateX:t.left+t.width/2-(i.left+i.width/2),translateY:t.top+t.height/2-(i.top+i.height/2),scaleX:Math.round(100*Math.min(.5,t.width/i.width))/100,scaleY:Math.round(100*Math.min(.5,t.height/i.height))/100})),e};i.modalClasses=function(){return{showing:i.showingModal,closing:i.closingModal}};i.getWrapperClasses=function(){return{"close-trigger":i.modal.outsideClose}};i.onWrapperClick=function(n){n.target.id!="scrollWrapper"&&n.target.id!="outerWrapper"&&n.target.id!="innerWrapper"||!i.modal.outsideClose||i.openingModal||i.closingModal||i.close()};var u=function(n,t){n=n||0;t=t||0;var i,r=Math.sqrt(Math.pow(n,2)+Math.pow(t,2));return i=r,Math.min(1e3,Math.max(400,i))},e=function(){var i=angular.element("html"),n=angular.element("body"),r=angular.element("qfx-menu-bar"),f=angular.element(".modal"),u=n.outerWidth();n.css("top",-t.scrollY+"px");i.addClass("modal-open");n.add(r).css("paddingRight",n.outerWidth()-u)},f=function(){var i=angular.element("html"),n=angular.element("body"),r=angular.element("qfx-menu-bar"),f=angular.element(".modal"),u=parseInt(n.css("top"),10)*-1;i.removeClass("modal-open");n.css("top","");t.scrollTo(0,u);n.add(r).css("paddingRight","")}}}}]);angular.module("qfxNotificationApp").controller("QfxModalController",["$scope","$timeout",function(n,t){n.modal=null;n.modalQueue=[];n.$on("qfx:modal:display",function(i,r){t(function(){n.modal?n.modalQueue.push(r):n.modal=r},0)});n.afterClose=function(){n.$applyAsync(function(){typeof n.modal.onClose=="function"&&n.modal.onClose();n.modal=null;t(function(){n.modal=n.modalQueue.shift()})})}}]);angular.module("qfxNotificationApp").controller("QfxNotificationController",["$scope","$log","qfxNotificationService","$location","qfxModalService","qfxAppConfig",function(n,t,i,r,u,f){function e(){i.getModalNotifications(r.absUrl()).then(function(n){n&&typeof n.forEach=="function"?n.forEach(function(n){(n.AlertType.toLowerCase()=="critical"||n.AlertType.toLowerCase()=="interruption")&&u.displayModal({template:n.AlertName.toLowerCase(),id:n.AlertName.toLowerCase(),heading:n.MessageHeading,message:n.MessageDescription,openFrom:n.AlertType.toLowerCase()=="critical"?"header .settings":"",closeTo:n.AlertType.toLowerCase()=="critical"?"header .settings":"",onClose:function(){i.storeNotification(n.AlertName)}})}):t.error("Invalid data from notification service: "+n)},function(n){t.error(n)}).finally(function(){})}f.canAppBeAuthenticated&&e()}]);angular.module("qfxNotificationApp").run(["$templateCache",function(n){"use strict";n.put("views/modals/default.html","<h1>{{modal.heading}}<\/h1> <p>{{modal.message}}<\/p>");n.put("views/modals/deregisterdevice.html",'<div class="deregister-modal modal-content"> <h3>Confirm Device Deregistration<\/h3> <p class="error-message"><\/p> <span>Are you sure you want to deregister the device <\/span><strong><span class="modal-devicetype">{{modal.deregisterDeviceType}}<\/span><\/strong><span>?<\/span> <div class="submit-buttons"> <button id="deregisterDevice" class="cta" ng-click="modal.deregister()">Yes<\/button> <button id="noDeregister" ng-click="modal.cancel()">No<\/button> <\/div> <\/div>');n.put("views/modals/parentalcontrols.html",'<div ng-controller="ParentalControlPinInputController"> <h2>Parental Control<\/h2> <p ng-if="subHeading">{{subHeading}}<\/p> <p class="error-message" ng-repeat="error in errorMessages">{{error}}<\/p> <form name="authForm"> <fieldset ng-if="passwordRequired()"> <label>Password<\/label> <input type="password" name="password" ng-model="form.password" placeholder="Enter your Password" required> <ng-messages for="authForm.password.$error" ng-show="authForm.password.$touched"> <ng-message class="message-animate" when="required">Password required<\/ng-message> <\/ng-messages> <\/fieldset> <fieldset ng-if="pinRequired()"> <label>Parental PIN <a href="/resetpin" class="small" ng-if="showResetPin()">Forgotten PIN?<\/a><\/label> <qfx-input-pin name="pin" qfx-data-input-type="password" ng-model="form.pin" required minlength="4" maxlength="4" ng-pattern="/[0-9]*/"><\/qfx-input-pin> <ng-messages for="authForm.pin.$error" ng-show="authForm.pin.$dirty"> <ng-message class="message-animate" when="required">Please enter a 4 digit parental pin<\/ng-message> <ng-message class="message-animate" when="minlength,maxlength">Pin should be 4 digits long<\/ng-message> <ng-message class="message-animate" when="pattern">Pin should only use numbers<\/ng-message> <\/ng-messages> <\/fieldset> <fieldset ng-if="confirmPinRequired()"> <label>Confirm Parental PIN<\/label> <qfx-input-pin name="confirmPin" qfx-data-input-type="password" ng-model="form.confirmPin" required minlength="4" maxlength="4" ng-pattern="/[0-9]*/" same-as="form.pin"><\/qfx-input-pin> <ng-messages for="authForm.confirmPin.$error" ng-show="authForm.confirmPin.$dirty"> <ng-message class="message-animate" when="required">Please enter a 4 digit parental pin<\/ng-message> <ng-message class="message-animate" when="minlength,maxlength">Pin should be 4 digits long<\/ng-message> <ng-message class="message-animate" when="pattern">Pin should only use numbers<\/ng-message> <ng-message class="message-animate" when="sameAs">Confirm pin doesn\'t match<\/ng-message> <\/ng-messages> <\/fieldset> <\/form> <button class="submit cta" type="submit" ng-click="submit()" ng-disabled="authForm.$invalid">{{buttonText}}<\/button> <\/div>');n.put("views/toasts/default.html",'<div class="outer-wrapper" ng-click="removeToastByIndex($index)" qfx-swipe-right="removeToastByIndex($index)"> <div class="image-container"> <img ng-src="{{toast.Content.Image}}" ng-if="toast.Content.Image"> <\/div> <div class="message-container"> <div class="heading" ng-bind="toast.Content.Heading"><\/div> <div class="message" ng-bind-html="toast.Content.Message"><\/div> <\/div> <\/div>');n.put("views/tpl/qfx-modal.tpl.html",'<!-- Note: This is (along with the qfx-modal directive) have been replaced by qfx-notification-modal, but currently being kept until all modals are converted --> <div class="action-modal-overlay" ng-if="(qfxModalId && modal.Id===qfxModalId)" data-qfx-dock-to="{{qfxDockToElement}}"> <div class="action-modal" ng-cloak> <div class="content"> <span class="icon close" ng-click="close()"><\/span> <!-- TODO - might be possible to consolidate the 3 methods of displaying content into the template based system--> <div ng-if="modal.Content" ng-bind-html="modal.Content |trustHtml"><\/div> <div ng-if="modal.templatePath" ng-include="modal.templatePath"><\/div> <ng-transclude><\/ng-transclude> <\/div> <\/div> <\/div>');n.put("views/tpl/qfx-notification-modal.tpl.html",'<div class="modal" id="{{modal.id}}" ng-if="modal" ng-resize="calculatePosition()" ng-class="modalClasses()"> <div id="overlay"><\/div> <div id="scrollWrapper" ng-class="getWrapperClasses()" ng-click="onWrapperClick($event)"> <div id="outerWrapper"> <div id="innerWrapper"> <div id="content"> <span class="icon close" ng-click="close()"><\/span> <div ng-include="modal.template"><\/div> <\/div> <\/div> <\/div> <\/div> <\/div>')}]),function(){"use strict";angular.module("angularLoad",[]).service("angularLoad",["$document","$q","$timeout",function(n,t,i){function u(n){var r={};return function(u){if(typeof r[u]=="undefined"){var e=t.defer(),f=n(u);f.onload=f.onreadystatechange=function(n){f.readyState&&f.readyState!=="complete"&&f.readyState!=="loaded"||i(function(){e.resolve(n)})};f.onerror=function(n){i(function(){e.reject(n)})};r[u]=e.promise}return r[u]}}var r=n[0];this.loadScript=u(function(n){var t=r.createElement("script");return t.src=n,r.body.appendChild(t),t});this.loadCSS=u(function(n){var t=r.createElement("link");return t.rel="stylesheet",t.type="text/css",t.href=n,r.head.appendChild(t),t})}])}();angular.module("qfxCoverApp",["ngResource","qfxWebFrameworkApp","qfxApiClientDiscoveryApp","qfxApiClientStreamingApp","qfxApiClientDvdApp","qfxApiClientOffersApp","qfxNotificationApp","angularLoad"]);angular.module("qfxCoverApp").directive("qfxCarousel",["$window","$log","$timeout","carouselAnimatorService","coverService","qfxUrlBuilder","qfxAppConfig",function(n,t,i,r,u,f,e){return{templateUrl:"views/tpl/qfx-carousel.tpl.html",restrict:"E",scope:{carousel:"=?qfxDataCarousel",headingUrl:"@?qfxDataHref",hidePlaceholders:"@qfxDataHidePlaceholders",coverType:"@?",catalogueFunction:"@?"},link:function(n,t,u){n.headingUrl&&(n.carousel.Url=n.headingUrl);n.viewIndex=0;n.itemsInView=0;n.itemWidth=0;n.moving=!1;n.hideCarousel=n.hidePlaceholders;n.siteType=e.applicationName;n.isOfferCarousel="memberOffers"in u;n.isOfferCarousel&&i(function(){n.doResize()});n.getCarouselClasses=function(){return{"offer-carousel":n.isOfferCarousel}};n.getItemLink=function(t){return f.getItemLink(t.DigitalCode,t.Type,t.Name,n.catalogueFunction)};n.placeholders=function(){return new Array(n.itemsInView)};n.doResize=function(){n.hideCarousel||(n.itemsInView=n.calculateItemsInView(),n.carousel&&n.carousel.Items&&n.carousel.Items.length&&n.itemsRight()<0&&(n.viewIndex=Math.max(n.viewIndex+n.itemsRight(),0)))};n.getItemWidth=function(){var i=$(t).find(".carousel .wrapper"),n=i.find(".item").first(),r;return(n&&n.length||(i.find(".items").append('<div class="temp item"><\/div>'),n=i.find(".temp.item")),!n||!n.length)?0:(r=n[0].getBoundingClientRect().width+parseFloat(n.css("marginLeft").replace("px",""))+parseFloat(n.css("marginRight").replace("px","")),i.find(".temp.item").remove(),r)};n.calculateItemsInView=function(){var i,r;return i=$(t).find(".carousel .wrapper"),r=i.innerWidth(),n.itemWidth=n.getItemWidth(),Math.round(r/n.itemWidth)||0};n.itemsLeft=function(){return n.viewIndex};n.itemsRight=function(){return n.carousel.Items&&n.carousel.Items.length?n.carousel.Items.length+(n.carousel.HasNextPage?1:0)-(n.viewIndex+n.itemsInView):0};n.moveItems=function(i,u){n.moving=!0;var f=$(t).find(".items"),e=n.itemsInView;i.toLowerCase()==="left"?(n.viewIndex=n.viewIndex-u,n.itemsInView+=u,r.translateX(e,f,-u*n.itemWidth,0,function(){n.itemsInView-=u;n.moving=!1;n.$apply()})):i.toLowerCase()==="right"&&(n.itemsInView+=u,r.translateX(e,f,0,-u*n.itemWidth,function(){n.itemsInView-=u;n.viewIndex=n.viewIndex+u;n.moving=!1;f.removeAttr("style");n.$apply()}))};n.moveLeft=function(){if(n.itemsLeft()>0&&!n.moving){var t=Math.min(n.itemsLeft(),n.itemsInView);n.moveItems("left",t)}};n.moveRight=function(){if(n.itemsRight()>0&&!n.moving){var t=Math.min(n.itemsRight(),n.itemsInView);n.moveItems("right",t)}};n.initialise=function(){n.hideCarousel||(n.itemsInView=n.calculateItemsInView())};n.$watch("hideCarousel",function(){n.initialise()});n.$watch("carousel.Items",function(){n.carousel&&n.carousel.Items&&n.carousel.Items.length||(n.viewIndex=0)});n.initialise()}}}]).filter("inView",[function(){return function(n,t,i){if(n)return n.filter(function(n,r){return r>=t&&r<t+i})}}]).service("carouselAnimatorService",["$log","qfxEasingFunctions",function(n,t){var i=this;return i.translateX=function(n,t,r,u,f){var e,o;n<5&&window.requestAnimationFrame?i.rafTranslateX(n,t,r,u,f):(e=i.calculateDuration(n),o="ease-in-out",t.css({x:r}),t.transition({x:u},e,o,f))},i.rafTranslateX=function(r,u,f,e,o){function v(i){h=h||i;c=i-h;c<l?(s=t.easeInOut(c,f,a,l),u.css({transform:"translate3d("+s+"px, 0, 0)","-webkit-transform":"translate3d("+s+"px, 0, 0)"}),n.debug("Performed transform to xPosition: "+s+"; Requesting next frame"),window.requestAnimationFrame(v)):(u.css({transform:"translate3d("+e+"px, 0, 0)","-webkit-transform":"translate3d("+e+"px, 0, 0)"}),n.debug("Finished moving to x: "+e),typeof o=="function"&&o())}var h,c,l,a,s;l=i.calculateDuration(r);a=e-f;u.css({transform:"translate3d("+f+"px, 0, 0)","-webkit-transform":"translate3d("+f+"px, 0, 0)"});window.requestAnimationFrame(v)},i.calculateDuration=function(n){return Math.min(n*256,1024)},{translateX:i.translateX}}]);angular.module("qfxCoverApp").directive("cover",["coverService",function(n){return{templateUrl:"views/tpl/cover-old.tpl.html",transclude:!0,restrict:"E",replace:!0,scope:{bindOptions:"&",item:"=",suppressFade:"=?qfxSuppressFade",itemIndex:"=?qfxItemIndex"},controller:["$rootScope","$scope","$element","$log","$http","qfxAppConfig",function(t,i,r,u,f,e){var o=this;return i.events=[],i.settings={detailsSelector:".details",optionsButtonSelector:"a.more-options",optionsSelector:".options",revealSpeed:400,resizing:!1},i.element=$(r[0]),i.areDetailsEnabled=function(){return $(r).find(i.settings.detailsSelector).is(":visible")},o.getSettings=function(){return i.settings},o.showDetails=function(){if(n.hasDetails()&&i.areDetailsEnabled()){var t={};t.id=i.item.Id;o.unregisterHideDetailsListener||o.registerHideDetailsListener();i.$emit("qfx:cover:showDetails",t)}},o.hideDetails=function(){var n={};n.id=i.item.Id;t.$broadcast("qfx:cover:hideDetails",n)},o.bindDetails=function(){var n=$(r).find(i.settings.detailsSelector);if(n&&n.length>0){$(r).on("tap",function(n){!i.isDetailsShowing&&i.areDetailsEnabled()&&(n.preventDefault(),n.stopPropagation(),o.hideDetails(),o.showDetails())});r.on("mouseenter",o.showDetails);r.on("mouseleave",o.hideDetails)}o.registerShowDetailsListener()},o.registerShowDetailsListener=function(){o.unregisterShowDetailsListener=i.$on("qfx:cover:showDetails",function(){var n,t,o;u.debug("Showing details for: "+i.item.DigitalCode);i.element.addClass("details-shown").find(i.settings.detailsSelector).clearQueue().transition({y:-i.element.innerHeight()},i.settings.revealSpeed,"ease",function(){i.isDetailsShowing=!0});$(r).attr("data-state")==="unbound"&&(n={length:19,width:4,radius:19,color:"#F7F7F7"},t=new Spinner(n).spin(),$(r).find(i.settings.detailsSelector+" .loading-container").html(t.el),o="/Details/GetCoverDetails/"+i.item.DigitalCode+"?hideControls="+i.item.HideControls+"&linkType="+i.item.LinkType+"&catalogueFunction="+i.item.CatalogueFunction,f.get(o,{withCredentials:!0,cache:!1}).then(function(n){$(r).find(".details").html(n.data);u.debug("BINDCOVERS: Hydrating");$(r).find(".add-to-playlist").addToPlayListOrQueue({itemType:"Playlist"}).checkIfInList();$(r).find(".add-to-queue").addToPlayListOrQueue({itemType:"Queue"}).checkIfInList();$(r).find(".star-rating-input").rating({submitOnSelect:!0}).initialise().updateUserRating();$(r).purchasing({baseUrl:e.deviceApiUrl,digitalCode:i.item.DigitalCode});$(r).attr("data-state","bound");$(r).removeClass("cover-activating")}))})},o.registerHideDetailsListener=function(){o.unregisterHideDetailsListener=i.$on("qfx:cover:hideDetails",function(){u.debug("Hiding details for: "+i.item.DigitalCode);i.element.removeClass("details-shown").find(i.settings.detailsSelector).clearQueue().transition({y:0},i.settings.revealSpeed,"ease",function(){i.isDetailsShowing=!1});o.unregisterHideDetailsListener&&(o.unregisterHideDetailsListener(),o.unregisterHideDetailsListener=null)})},o.getIndex=function(){return i.itemIndex},{getSettings:o.getSettings,showDetails:o.showDetails,hideDetails:o.hideDetails,bindDetails:o.bindDetails,getIndex:o.getIndex,displaySubTitle:i.item.SubTitle?!0:!1,displayPlayStatus:i.item.DisplayPlayStatus}}],link:function(t,i){if(t.img=i.find("img"),t.suppressFade)$(t.img).addClass("loaded");else t.img.on("load",function(){$(t.img).addClass("loaded")});var r=t.item.CatalogueItem.DigitalCode;t.item.ImageUrl=n.getCoverImageUrl(r,t.item.ItemCoverType,$(i).innerWidth());t.bindOptions&&t.bindOptions()}}}]).directive("coverDetails",[function(){return{templateUrl:"views/tpl/cover-details.tpl.html",restrict:"E",require:"^^cover",link:function(n,t,i,r){r.bindDetails()}}}]).directive("coverSubtitle",[function(){return{template:'<p ng-if="item.SubTitle" class="sub-title" ng-class="{selected: item.SubTitle}">{{item.SubTitle}}<\/p>',restrict:"E",link:function(n,t){n.$parent.item.SubTitle&&t.addClass("sub-title-shown")}}}]).directive("coverOptions",["$rootScope","$q",function(n,t){return{templateUrl:"views/tpl/cover-options.tpl.html",restrict:"E",require:"^^cover",scope:{options:"=qfxOptionsList",fetchOptions:"&qfxFetchOptions",selectionHandler:"&qfxOptionSelectionHandler"},link:function(i,r,u,f){var e,o;i.optionsClasses=[];i.$parent.item&&i.$parent.item.Availability&&(i.availability=i.$parent.item.Availability.toLowerCase(),i.optionsClasses.push(i.availability));i.toggleOptions=function(){i.isOptionsShowing?n.$broadcast("qfx:cover:hideDisplayOptions",{}):(i.isOptionsShowing=!0,i.fetchOptions&&(i.fetchingOptions=!0,t.when(i.fetchOptions()(f.getIndex())).then(function(){i.fetchingOptions=!1})),e=r.find(f.getSettings().optionsSelector),e.clearQueue().transition({y:-e.innerHeight()},f.getSettings().revealSpeed,"ease"),n.$broadcast("qfx:cover:hideDisplayOptions",{}),o=i.$on("qfx:cover:hideDisplayOptions",function(){o();i.isOptionsShowing=!1;e.clearQueue().transition({y:0},f.getSettings().revealSpeed,"ease")}))};i.selectOption=function(n){i.selectionHandler()(n,f.getIndex())}}}}]).directive("coverPlayStatus",["$http","$log","qfxAppConfig",function(n,t,i){return{templateUrl:"views/tpl/cover-play-status.tpl.html",restrict:"E",link:function(r){r.$parent.item.DisplayPlayStatus&&n.get(i.deviceApiUrl+"Member/PlayProgressStatus?digitalCodes="+r.$parent.item.CatalogueItem.DigitalCode).then(function(n){n&&n.data&&n.data.Items&&n.data.Items.length&&(r.playStatus=n.data.Items[0])},function(n){t.error("Error fetching play status for digital code "+r.$parent.item.CatalogueItem.DigitalCode+": "+n)})}}}]).directive("coverAvailability",[function(){return{template:'<p ng-if="label" class="title-status" ng-class="classes">{{label}}<\/p>',restrict:"E",link:function(n){var t=n.$parent.item.Availability.toLowerCase();n.classes=t;switch(t){case"longwait":n.label="Long Wait";break;case"quickpick":n.label="Quickpick"}}}}]);angular.module("qfxCoverApp").service("coverService",["$window","$q","$http","$log","contentOptionsService","qfxAppConfig",function(n,t,i,r,u,f){var o=!1,e=this;return e.digitalFolders={},e.physicalFolders={},e.calculateBestSize=function(n,t){var r,i;for(t=t||{},r=(t.length||0)-1,i=0;i<t.length;i++)if(t[i].Width>=n){r=i;break}else if(t[i].Width+10>=n&&t[i+1]&&t[i+1].Width-n>=50){r=i;break}return t[r].FolderName},e.getCoverImageUrl=function(t,i,f){var h,c,s,l="";return f*=n.devicePixelRatio,c=i&&i.toLowerCase()==="digital",c?(e.digitalFolders[f]||(s=u.getDigitalOptions(),e.digitalFolders[f]=e.calculateBestSize(f,s)),l=e.digitalFolders[f]):(e.physicalFolders[f]||(s=u.getPhysicalOptions(),e.physicalFolders[f]=e.calculateBestSize(f,s)),l=e.physicalFolders[f]),h="https://images.quickflix.com.au/"+(c?"Digital":"")+"Covers/ByDigitalCode/"+l+"/"+t+".jpg",o&&r.debug("Image Url calculated as: "+h),h},e.fetchImage=function(n,u){var s=t.defer(),f=e.getCoverImageUrl(n.DigitalCode,n.CoverType,u);return i.get(f,{headers:{"X-Requested-With":undefined}}).success(function(){s.resolve(f);o&&r.debug("successfully pre-fetched image at url: "+f)}).error(function(n){s.reject("Failed to pre-fetch image at url: "+f+"; with status "+n)}),s.promise},e.hasDetails=function(){return f.applicationName==="Dvd"||f.applicationName==="Streaming"||f.applicationName==="Public"},{getCoverImageUrl:e.getCoverImageUrl,fetchImage:e.fetchImage,hasDetails:e.hasDetails}}]);angular.module("qfxCoverApp").directive("qfxCollection",["$window","$log","$anchorScroll",function(n,t,i){return{templateUrl:"views/tpl/qfx-collection.tpl.html",restrict:"E",link:function(n,t,r){n.collectionAttrObj={category:r.category,contentAvailability:r.contentavailability,contentType:r.contenttype};n.scrollTop=function(){i(0)};n.$emit("qfx:collections:load",n.collectionAttrObj)}}}]);angular.module("qfxCoverApp").directive("qfxCoverImage",["$parse","$log","$q","underscore","coverService","qfxCoverHeuristics",function(n,t,i,r,u,f){return{template:'<img class="cover-image" ng-src="{{imageUrl}}" width="100%" height="100%" />',restrict:"E",scope:!0,link:function(r,e,o){var s={},h=function(){return s.CoverType||t.warn("Defaulting to physical cover art for "+s.DigitalCode+" since we couldn't determine otherwise."),r.imageUrl=u.getCoverImageUrl(s.DigitalCode,s.CoverType,e.innerWidth())};if("catalogueItem"in o)s=n(o.catalogueItem)(r,{});else if("digitalCode"in o)s.DigitalCode=n(o.digitalCode)(r,{});else if(r.item)s=r.item;else throw Error("No catalogue item or digital code given to cover image");if(!s.DigitalCode)throw Error("Could not determine digital code for cover");"coverType"in o?s.CoverType=n(o.coverType)(r,{})||o.coverType:!s.CoverType&&(r.coverType||r.CoverType)&&(s.CoverType=r.coverType||r.CoverType);!s.CoverType&&s.AvailableProductTypes&&s.AvailableProductTypes.length?i.when(f.determineCoverType(s)).then(function(n){s.CoverType=n},function(n){t.error("Something went wrong when calling qfxCoverHeuristics service: ",n)}).finally(h):h()}}}]);angular.module("qfxCoverApp").directive("qfxCover",["$document","$parse","$animate","$q","$log","$filter","$location","$routeParams","underscore","qfxUrlBuilder","coverService","qfxCoverHeuristics","serilogService",function(n,t,i,r,u,f,e,o,s,h,c,l,a){return{templateUrl:"views/tpl/qfx-cover.tpl.html",transclude:!0,restrict:"E",scope:{catalogueItemGetter:"&item",coverType:"@?",catalogueFunction:"@?"},require:"qfxCover",controller:["$scope","$element","$attrs",function(n,t){var i=this;n.catalogueItem=n.catalogueItemGetter();n.catalogueItem.CoverType=typeof l.determineCoverType=="function"&&l.determineCoverType(n.catalogueItem,n.catalogueItem.CoverType||n.coverType)||null;n.catalogueFunction=n.catalogueFunction||o.catalogueFunction;i.getItem=function(){return n.catalogueItem};i.isActive=function(){return n.active};i.areDetailsEnabled=function(){return t.find(".details").is(":visible")};i.getCatalogueFunction=function(){return n.catalogueFunction};i.getItemLink=function(){return h.getItemLink(n.catalogueItem.DigitalCode,n.catalogueItem.Type,n.catalogueItem.Name,i.getCatalogueFunction(),n.coverType)};i.getCoverType=function(){return n.catalogueItem.CoverType}}],link:function(t,r,u,o){var s=r.find(".cover"),h,v,y;t.itemLink=o.getItemLink();i.enabled(r,!1);t.catalogueItem.CoverType||(t.catalogueItem.CoverType=typeof l.determineCoverType=="function"&&l.determineCoverType(t.catalogueItem,t.catalogueItem.CoverType||t.coverType)||null,t.catalogueItem.CoverType?a.warn("Possible race condition with cover. Cover type had to be determined a second time for digital code "+t.catalogueItem.DigitalCode,e.absUrl()):(h={message:"No cover type determined from heuristics for catalogue item with digital code "+t.catalogueItem.DigitalCode,productTypes:t.catalogueItem.AvailableProductTypes},a.error(f("json")(h),e.absUrl()),t.catalogueItem.CoverType="digital"));r.on("mouseenter",function(){t.active=!0;t.$digest()});r.on("mouseleave",function(){t.active=!1;t.$digest()});r.on("tap",function(i){!t.active&&o.areDetailsEnabled()&&(i.preventDefault(),t.active=!0,t.$digest(),n.bind("tap",function(n){var i=r.find(n.target);i&&i.length<=0&&(t.active=!1,t.$digest(),$(this).off(n))}))});t.catalogueItem.Flags&&(v=typeof l.getCoverClasses=="function"&&l.getCoverClasses(t.catalogueItem.Flags,t.catalogueItem.CoverType)||[],s.addClass(v.join(" ")));y=t.$watch(function(){return s.is(":visible")},function(n){n&&(y(),t.getCoverImage())});t.getCoverImage=function(){t.catalogueItem.ImageUrl=c.getCoverImageUrl(t.catalogueItem.DigitalCode,t.catalogueItem.CoverType,s.innerWidth())};r.on("$destroy",function(){r.off("mouseenter");r.off("mouseleave");r.off("tap")})}}}]);angular.module("qfxCoverApp").service("contentOptionsService",[function(){var n=this;return n.getDigitalOptions=function(){return[{FolderName:"110x150",Width:110,Height:150,Quality:60},{FolderName:"118x166",Width:118,Height:166,Quality:60},{FolderName:"130x190",Width:130,Height:190,Quality:60},{FolderName:"170x240",Width:170,Height:240,Quality:60},{FolderName:"186x270",Width:186,Height:270,Quality:60},{FolderName:"215x305",Width:215,Height:305,Quality:65},{FolderName:"218x324",Width:218,Height:324,Quality:60},{FolderName:"410x596",Width:410,Height:596,Quality:35}]},n.getPhysicalOptions=function(){return[{FolderName:"Small",Width:40,Height:60,Quality:60},{FolderName:"Big",Width:110,Height:150,Quality:70},{FolderName:"125x177",Width:125,Height:177,Quality:60},{FolderName:"160x227",Width:160,Height:277,Quality:60},{FolderName:"215x305",Width:215,Height:305,Quality:65},{FolderName:"410x596",Width:410,Height:596,Quality:35}]},{getDigitalOptions:n.getDigitalOptions,getPhysicalOptions:n.getPhysicalOptions}}]);angular.module("qfxCoverApp").directive("qfxPlayButton",["qfxModalService","$filter","$window","qfxUserContext","qfxUrlBuilder","qfxStreamingProductService","$log","$location",function(n,t,i,r,u,f,e){return{templateUrl:"views/tpl/qfx-play-button.html",restrict:"E",scope:{catalogueItem:"=qfxCatalogueItem",productGroup:"=?qfxProductGroup",iconOnly:"@qfxIconOnly",showSuffix:"=?qfxShowSuffix",showPrefix:"=?qfxShowPrefix",catalogueFunction:"@qfxCatalogueFunction",buttonClasses:"=?qfxButtonClasses"},link:function(r,o){r.label="Play...";r.isDisabled=!0;r.init=function(){if(!r.catalogueItem)return r.isDisabled=!0;r.itemUrl=u.getItemLink(r.catalogueItem.DigitalCode,r.catalogueItem.Type,r.catalogueItem.Name,r.catalogueFunction,r.coverType);!r.productGroup&&r.catalogueItem&&r.catalogueItem.DigitalCode?f.getLowestPricedProductGroup(r.catalogueItem.DigitalCode).then(function(n){typeof n=="object"?(r.productGroup=n,r.setLabel(),r.isDisabled=!1):(r.productGroup={UnavailableReason:"Unavailable"},r.isDisabled=!0)}).catch(function(n){e.error("qfxPlayButton: Failed to fetch product group for catalogueItem: "+r.catalogueItem.DigitalCode,n);r.productGroup={UnavailableReason:"Unavailable"};r.isDisabled=!0}):(r.setLabel(),r.isDisabled=!1)};r.setLabel=function(){r.label=r.productGroup&&r.productGroup.MinPrice?t("currency")(r.productGroup.MinPrice):"Play "+(r.showSuffix?r.catalogueItem.Type:"")};r.play=function(){var n;f.isPurchased(r.productGroup)?(n=u.getPlayUrl(r.catalogueItem.DigitalCode,r.catalogueFunction),n&&(i.location=n)):r.displayProductModal()};r.displayProductModal=function(){f.getProductModalData(r.catalogueItem,r.productGroup,o.find("button")).then(function(t){n.displayModal(t)})};r.init()}}}]);angular.module("qfxCoverApp").directive("qfxAddToPlaylistButton",["qfxCatalogueFunctionService","playlistService",function(n,t){return{templateUrl:"views/tpl/qfx-add-to-playlist-button.tpl.html",restrict:"E",scope:{digitalCode:"@qfxDigitalCode",iconOnly:"@qfxIconOnly",catalogueFunction:"@qfxCatalogueFunction",buttonClasses:"=?qfxButtonClasses"},link:function(i){i.label="Checking";i.isDisabled=!0;i.toggleState=function(){i.updateState(!i.isOnPlaylist)};i.updateState=function(n){i.isOnPlaylist=n;i.label=i.isOnPlaylist?"Remove":"Add to Playlist"};i.addOrRemove=function(){i.isOnPlaylist?t.removeCatalogueItem(i.digitalCode).then(i.toggleState()):t.addCatalogueItem(i.digitalCode,i.catalogueFunction||n.getCatalogueFunction()).then(function(){i.toggleState()})};t.catalogueItemStatus(i.digitalCode).then(function(n){n&&n.IsOnPlaylist!==undefined&&n.IsOnPlaylist!==null?(i.updateState(n.IsOnPlaylist),i.isDisabled=!1):(i.updateState(!1),i.isDisabled=!0)},function(){i.updateState(!1);i.isDisabled=!0})}}}]);angular.module("qfxCoverApp").directive("qfxAddToQueueButton",["$rootScope","$resource","qfxCatalogueFunctionService","qfxToastService","QueueCatalogueItemStatus","memberAPIService","$log","qfxModalService","underscore",function(n,t,i,r,u,f,e,o){return{templateUrl:"views/tpl/qfx-add-to-queue-button.tpl.html",restrict:"E",scope:{digitalCode:"@qfxDigitalCode",discId:"@?qfxDiscId",availability:"@qfxAvailability",iconOnly:"@qfxIconOnly",catalogueFunction:"@qfxCatalogueFunction",buttonClasses:"=?qfxButtonClasses"},link:function(s,h){var c,l,a;s.checkingStatus=!0;s.actions={};s.queueStatus={};s.itemId=typeof s.discId=="string"&&s.discId.length>0?s.discId:s.digitalCode;c={inQueue:"InQueue",dispatched:"Dispatched",prenotified:"Prenotified",neverAdded:"NeverAdded",dispatchedPreviously:"DispatchedPreviously",boxsetPartiallyAdded:"BoxsetPartiallyAdded"};l={future:"Future",highDemand:"HighDemand",longWait:"LongWait",normal:"Normal",notOnDvd:"NotOnDVD",quickPick:"QuickPick",unavailable:"Unavailable"};s.getButtonText=function(){return v()+p()};var v=function(){return s.checkingStatus?"Checking":!s.actions.Add?!s.actions.Delete?s.queueStatus.Status==c.prenotified?"Returning":s.queueStatus.Status==c.dispatched?"Dispatched":s.queueStatus.Status||"Unavailable":"Remove":"Add to Queue"},p=function(){var n=[];return!s.actions.Add||(s.queueStatus.Status==c.dispatchedPreviously&&n.push("Watch Again"),s.availability==l.longWait&&n.push("Long Wait"),s.availability==l.future&&n.push("Coming Soon"),s.availability==l.quickPick&&n.push("Quickpick")),n.slice(0,2).map(function(n){return'<span class="subtext">'+n+"<\/span>"}).join("")},w=function(){f.getSubscriptions().then(function(n){if(n){var t=n.Items?n.Items[0]:null;t&&t.IsRentalSubscription||o.displayModal({template:"views/modals/qfx-subscribe-to-dvd-modal.tpl.html",id:"subscribe-to-dvd",digitalCode:s.digitalCode,openFrom:h.find("button")});e.debug("SubscriptionInfo",n)}else e.error("AddToQueue: No subscription details available")},function(){e.error("AddToQueue: failed to retrieve member subscription information")})};s.getAltText=function(){return s.queueStatus.Status==c.dispatchedPreviously?'You\'ve already received and returned this disc. Click "Add to Queue" if you would like us to send it to you again.':v()};s.getButtonClass=function(){return{"hide-text":s.iconOnly,"icon-queue":!!s.actions.Add||!!s.actions.Delete,"in-queue":!!s.actions.Delete}};s.isDisabled=function(){return s.actions?!s.actions.Add&&!s.actions.Delete:!0};s.addOrRemove=function(){s.queueStatus.Status==c.inQueue?t(s.actions.Delete,null,{remove:{method:"DELETE",cache:!1,withCredentials:!0}}).remove({},function(){y()},function(n){e.error(n)}):(w(),t(s.actions.Add,null,{add:{method:"POST",cache:!1,withCredentials:!0}}).add({DigitalCode:s.itemId,CatalogueFunction:s.catalogueFunction||i.getCatalogueFunction()},function(n){k(n);y()},function(n){e.error(n)}))};a=function(){u.load({digitalCode:s.itemId},function(n){s.queueStatus=n;b()},function(n){e.error("qfx-add-to-queue-button: Failed to check item status",n)}).$promise.finally(function(){s.checkingStatus=!1})};a();s.$on("qfx:queue:statusChanged:"+s.digitalCode,a);s.$on("qfx:queue:checkStatus",a);var b=function(){s.actions=s.queueStatus.Links?s.queueStatus.Links:s.queueStatus.QueueItem&&s.queueStatus.QueueItem.Links?s.queueStatus.QueueItem.Links:s.queueStatus.Dispatch&&s.queueStatus.Dispatch.Links?s.queueStatus.Dispatch.Links:{}},y=function(){n.$broadcast("qfx:queue:statusChanged:"+s.digitalCode);n.$broadcast("qfx:queue:statusChanged",{digitalCode:s.itemId})},k=function(n){n.AlertMessage&&n.AlertMessage.forEach(function(n){n.AlertType=="Notification"&&r.createToast({Type:n.AlertLevel,Content:{Heading:n.Header,Message:n.AlertMessage},Timer:n.DisplayDurationInSecond*1e3})})}}}}]);angular.module("qfxCoverApp").filter("qfxCatalogueItemToType",function(){return function(n){if(n&&typeof n.Type=="string")switch(n.Type.toLowerCase()){case"title":return"Movie";case"episode":case"season":case"series":return"TV Show";default:return n.Type}}});angular.module("qfxCoverApp").filter("qfxProductToAction",function(){return function(n){if(n&&n.Type)switch(n.Type){case"SVOD":return"Stream";case"TVOD":return"Rent";case"EST":return"Own";default:return"Play"}}});angular.module("qfxCoverApp").service("qfxCoverHeuristics",["$log","underscore","qfxAppConfig","qfxCatalogueItemService",function(n,t,i,r){var u=this;return u.determineCollectionCoverType=function(n,t){var r,u;if(r=n&&n.Params&&n.Params.Filters&&n.Params.Filters.ContentAvailability&&n.Params.Filters.ContentAvailability.length?n.Params.Filters.ContentAvailability[0]:n&&n.CatalogueItems&&n.CatalogueItems.SearchExpandOption?n.CatalogueItems.SearchExpandOption:t,r&&r!="All"&&i.applicationName){switch(i.applicationName.toLowerCase()){case"public":r.toLowerCase().indexOf("streaming")>=0?u="digital":r.toLowerCase().indexOf("disc")>=0&&(u="physical")}return u}return null},u.determineCoverType=function(n,t){if(!i.enableDiscCatalogue)return"digital";var e=typeof t=="string"&&t.toLowerCase()||u.getDefaultCoverTypeForSite(),f=r.getProductAvailability(n);if(e=="physical"){if(f.availableOn.disc||f.comingSoonTo.disc)return"physical";if(f.availableOn.streaming||f.comingSoonTo.streaming)return"digital"}else{if(f.availableOn.streaming||f.comingSoonTo.streaming)return"digital";if(f.availableOn.disc||f.comingSoonTo.disc)return"physical"}return e=="physical"?"physical":"digital"},u.getDefaultCoverTypeForSite=function(){if(i.applicationName)switch(i.applicationName.toLowerCase()){case"dvd":return"physical";case"streaming":case"public":default:return"digital"}else throw"AppConfigError: Cover heuristics service unable to determine site type from config";},u.determineCoverControls=function(n,t){if(n&&i.applicationName){t||(t=u.determineCoverType(n));var f="not-available",e=r.getProductAvailability(n).availableOn;switch(i.applicationName.toLowerCase()){case"dvd":t=="physical"&&e.disc&&(f="disc");break;case"streaming":t=="digital"&&e.streaming&&(f="streaming");break;case"public":f="viewing-options"}return f}},u.getCoverClasses=function(n,t){var i,r,u;if(!t)throw"Need to know the cover type to determine what classes to apply";i=[];switch(t.toLowerCase()){case"digital":r=n.some(function(n){return typeof n=="string"&&n.toLowerCase()==="premium"});r&&i.push("premium");break;case"physical":u=n.some(function(n){return typeof n=="string"&&n.toLowerCase()==="bluray"});u&&i.push("bluray")}return i},{determineCoverType:u.determineCoverType,determineCollectionCoverType:u.determineCollectionCoverType,determineCoverControls:u.determineCoverControls,getCoverClasses:u.getCoverClasses}}]);angular.module("qfxCoverApp").directive("qfxCoverDetails",["$log","qfxCatalogueItemService","qfxStreamingProductService","qfxCoverHeuristics",function(n,t,i,r){return{templateUrl:"views/tpl/qfx-cover-details.tpl.html",restrict:"E",require:"^^qfxCover",link:function(u,f,e,o){u.coverType=o.getCoverType();u.catalogueItem=o.getItem();u.itemLink=o.getItemLink();u.controlType=typeof r.determineCoverControls=="function"&&r.determineCoverControls(u.catalogueItem,u.catalogueItem.CoverType)||null;var s=u.$watch(function(){return o.isActive()},function(r){r&&o.areDetailsEnabled()&&(u.activated=!0,u.catalogueItem.Details||t.getCatalogueItemOfType(u.catalogueItem.Type,u.catalogueItem.DigitalCode).then(function(n){u.catalogueItem=angular.extend(n,u.catalogueItem)}),i.getProductGroups(u.catalogueItem.DigitalCode).then(function(n){u.productGroup=n[0]},function(t){n.error(t)}),s())});u.detailsClasses=function(){return{active:o.isActive()}}}}}]);angular.module("qfxCoverApp").controller("QfxSubscribeToDVDModalController",["$scope","memberAPIService","$log","CatalogueItems","offersApiService",function(n,t,i,r,u){var f=function(){t.getSubscriptions().then(function(t){if(t){var i=t.Items?t.Items[0]:null;n.hasStreamingSubscription=i&&i.IsStreamingSubscription?!0:!1}o()},function(){i.error("SubscribeToDVDModal: failed to retrieve member subscription information")})},e=function(){r.load({digitalCode:n.modal.digitalCode},function(t){n.catalogueItem=t;n.catalogueItemLoaded=!0},function(t){i.error("Failed to load Catalogue Item with digital code "+n.modal.digitalCode+"; "+t)})},o=function(){u.currentOffers().then(function(t){n.dvdPlan=_.chain(t).filter(function(t){if(n.hasStreamingSubscription){if(t.PlanDetail&&t.PlanDetail.Type=="Combo")return!0}else if(t.PlanDetail&&t.PlanDetail.Type=="Disc")return!0}).min(function(n){return n&&n.Payment?n.Payment.Amount:0}).value();n.offersLoaded=!0})};f();e()}]);angular.module("qfxCoverApp").directive("qfxDispatchControl",["$http","qfxToastService",function(n,t){return{templateUrl:"views/tpl/qfx-dispatch-control.tpl.html",restrict:"E",scope:{queues:"=qfxQueues"},link:function(i){i.canEdit=function(n){return n.Links&&n.Links.Edit};i.canIncrease=function(n){return!i.updating&&i.canEdit(n)&&n.Links.IncrementRentalSpaces};i.canDecrease=function(n){return!i.updating&&i.canEdit(n)&&n.Links.DecrementRentalSpaces&&n.RentalSpaces>0};i.getTotal=function(){var n=0;return i.queues.forEach(function(t){n+=t.RentalSpaces}),n};i.increase=function(n){i.canIncrease(n)&&i.changeRentalSpace(n,n.Links.IncrementRentalSpaces)};i.decrease=function(n){i.canDecrease(n)&&i.changeRentalSpace(n,n.Links.DecrementRentalSpaces)};i.changeRentalSpace=function(r,u){i.updating=!0;i.showLoader=!1;n.post(u,{}).then(function(n){n&&n.data&&n.data.Items&&n.data.Items.length&&n.data.Items[0].Links&&!isNaN(n.data.Items[0].RentalSpaces)?angular.copy(n.data.Items,i.queues):t.createErrorToast("An error has occurred trying to update your disc allocation.")},function(){t.createErrorToast("An error has occurred trying to update your disc allocation.")}).finally(function(){i.updating=!1;i.showLoader=!1})}}}}]);angular.module("qfxCoverApp").directive("qfxMyDiscs",["$rootScope","$log","$compile","$timeout","myDiscsService","qfxModalService","qfxUrlBuilder","MemberSubscriptions","qfxUserContext","qfxToastService",function(n,t,i,r,u,f,e,o,s,h){return{templateUrl:"views/tpl/qfx-my-discs.tpl.html",restrict:"E",scope:!0,link:function(i,r,c){if(i.discs=[],c.qfxDispatchStatus)i.status=c.qfxDispatchStatus.toLowerCase();else throw"No status given for qfx-disc-list directive";i.isSent=i.status=="out";i.isReturning=i.status=="prenotified";i.isReturned=i.status=="returned";i.currentPageIndex=1;i.pageSize=20;i.pageCount=0;i.fetchPage=function(){i.loadingDiscs=!0;u.fetchDiscs(i.status,i.currentPageIndex,i.pageSize).then(function(t){i.isReturning&&n.$broadcast("qfx:myDiscs:discsReturningCount",{count:t&&t.Items&&t.Items.length||0});i.discs=t.Items;i.pageCount=t.TotalPageCount},function(n){t.error(n)}).finally(function(){i.loadingDiscs=!1})};i.fetchPage();i.hasRentalAccess=!1;o.then(function(){i.hasRentalAccess=s.hasDiscRentalAccess()});i.paginatorId=i.status+"-discs";i.$on("qfx:pagination:pageChange",function(n,t){(t.id=i.paginatorId)&&(n&&typeof n.stopPropagation=="function"&&n.stopPropagation(),i.currentPageIndex=t.current||1,i.fetchPage())});i.$on("qfx:myDiscs:discPrenotified",function(){i.isReturning&&i.fetchPage()});i.getItemUrl=function(n){return e.getItemLink(n.DigitalCode,n.CatalogueItem.Type,n.TitleName)};i.hasLinks=function(n){if(n.Links)for(var t in n.Links)if(n.Links.hasOwnProperty(t))return t.toLowerCase()=="prenotify"||t.toLowerCase()=="discproblem";return!1};i.prenotifyDisc=function(t){u.prenotifyDisc(t.Id).then(function(){i.discs.splice(i.discs.indexOf(t),1);n.$broadcast("qfx:myDiscs:discPrenotified")},function(n){n&&typeof n.Message=="string"?h.createErrorToast(n.Message):h.createErrorToast('Something went wrong. Please see our <a href="https://help.quickflix.com.au/hc/en-us/articles/201117249" target="_blank">Help Center article<\/a> for more information.')})};i.reportDiscProblem=function(n,t){t.MemberRecordedFaultDateTime||f.displayModal({template:"report-disc-modal",id:"report-disc",openFrom:n.target,closeTo:n.target,reportingDisc:t,onSuccess:function(){f.closeModal();t.MemberRecordedFaultDateTime="submitted"},onError:function(n){f.closeModal();h.createErrorToast(n)}})}}}}]);angular.module("qfxCoverApp").controller("QfxReportDiscController",["$scope","myDiscsService",function(n,t){n.report={SendCustomerSameTitleAgain:"false"};t.fetchDiscIssues().then(function(t){n.issues=t});n.submitDiscReport=function(){n.submittingReport=!0;t.submitReport(n.modal.reportingDisc.Id,n.report).then(function(){n.modal.onSuccess&&n.modal.onSuccess()},function(t){var i=t&&t.Message||"Error submitting disc report";n.modal.onError&&n.modal.onError(i)}).finally(function(){n.submittingReport=!1})}}]),function(n){var t={};t.create=function(t){n.module("qfxCoverApp").controller(t.controller,["$compile","$rootScope","$scope","$log","$q",t.service,"qfxToastService","qfxAppConfig",function(n,t,i,r,u,f,e){var o=!1,s;i.model={Items:[]};i.currentPage=0;i.pageSize=30;i.getItemId=function(n){return i.model.Items[n].Id};i.getIndexOfId=function(n){return i.model.Items.map(function(n){return String(n.Id)}).indexOf(String(n))};i.draggedId="";i.initialPosition=0;i.initialIndex=0;i.newPosition=0;i.newIndex=0;i.$on("qfx:dragAndDrop:dragstart",function(n,t){i.draggedId=t.dragModel.Id;i.initialPosition=t.dragModel.Position;i.initialIndex=i.getIndexOfId(t.dragModel.Id);i.$apply();o&&r.debug("CURRENTLY DRAGGING "+i.draggedId+" FROM POSITION "+i.initialPosition)});i.$on("qfx:dragAndDrop:dragend",function(){if(o&&r.debug("ITEM DROPPED. MOVING ITEM "+i.draggedId+" TO POSITION "+i.newPosition),i.draggedId&&i.newPosition){var n=Math.ceil((Math.min(i.initialIndex,i.newIndex)+1)/i.pageSize),t=Math.ceil((Math.max(i.initialIndex,i.newIndex)+1)/i.pageSize);f.moveItemToPosition(i.listId,i.draggedId,i.newPosition,n,t,i.pageSize).then(function(n){i.refreshItems(n)},function(n){e.createErrorToast("Try again. Contact us if you still can’t move covers.");r.error(n)})}});i.$on("qfx:dragAndDrop:dragenter",function(n,t){var u,e,r;u=$(".being-dragged");e=t.element;t.dropModel.Id!=i.draggedId&&(r=f.calculateTemporaryPosition(u,e,t.dropModel,i.initialPosition),i.newPosition=r.actual,i.model.Items[i.getIndexOfId(i.draggedId)].Position=r.temp,i.newIndex=i.getIndexOfId(t.dropModel.Id),i.$apply())});i.fetchOptions=function(n){var t=u.defer();return f.fetchOptionsForItem(i.listId,i.model.Items[n].Id).then(function(r){i.model.Items[n].Options=r;t.resolve(r)}),t.promise};i.optionClickHandler=function(t,u){var o,s,h;switch(t.Class){case"delete":i.model.Items.splice(u,1);o=Math.ceil((u+1)/i.pageSize);s=i.currentPage;h=t.Url+"&startPage="+o+"&endPage="+s+"&pageSize="+i.pageSize;f.deleteItem(h).then(function(n){i.refreshItems(n);i.noMoreItems||i.getPage(i.currentPage*i.pageSize,1)},function(n){e.createErrorToast("Try again. Contact us if you still can’t delete.");r.error(n)});break;case"move-to-top":i.model.Items[u].Position=.5;o=1;s=Math.ceil((u+1)/i.pageSize);h=t.Url+"&startPage="+o+"&endPage="+s+"&pageSize="+i.pageSize;f.moveItemToTop(h).then(function(n){i.refreshItems(n)},function(n){e.createErrorToast("Try again. Contact us if you still can’t move covers.");r.error(n)});break;case"move-to-bottom":i.noMoreItems?i.model.Items[u].Position=i.model.Items[i.model.Items.length-1].Position+.5:i.model.Items.splice(u,1);o=Math.ceil((u+1)/i.pageSize);s=i.currentPage;h=t.Url+"&startPage="+o+"&endPage="+s+"&pageSize="+i.pageSize;f.moveItemToBottom(h).then(function(n){i.refreshItems(n);i.noMoreItems||i.getPage(i.currentPage*i.pageSize,1)},function(n){e.createErrorToast("Try again. Contact us if you still can’t move covers.");r.error(n)});break;case"manage":i.manageTemplate="views/tpl/qfx-manage-queue-item.tpl.html";i.managingItemDetails={queueId:i.model.QueueId,itemId:i.model.Items[u].Id};$.modal({content:'<ng-include src="manageTemplate"><\/ng-include>',onShow:function(){n($(".modal"))(i)}})}};i.refreshItems=function(n){function o(n,t){return n.Position<t.Position?-1:n.Position>t.Position?1:0}var f,u,r,e;for(t.$broadcast("qfx:cover:hideDisplayOptions",{}),f=n.map(function(n){return n.Id}),i.model.Items.forEach(function(t){var i=f.indexOf(t.Id);i>=0&&n[i].Position>=0&&t.Position!=n[i].Position&&(t.Position=n[i].Position)}),i.model.Items.sort(o),u=0,r=0,e=i.model.Items.length;r<e;r++){if(i.model.Items[r].Position==u||!Number.isInteger(i.model.Items[r].Position)){i.refreshList();break}u=i.model.Items[r].Position}};i.refreshList=function(){i.noMoreItems=!1;i.currentPage=0;i.getPage()};i.getPage=function(n,t){if(i.supressFade=!1,!i.loadingPage&&!i.noMoreItems&&!i.isDirty){r.debug("Loading page "+n+" of page size "+t);i.loadingPage=!0;var u,e=i.pageSize;n&&n>0?(u=n,t&&t>0&&(e=t)):u=++i.currentPage;f.loadList(i.listId,u,e).then(function(n){u===1?i.model=n:Array.prototype.push.apply(i.model.Items,n.Items);i.currentPage>=n.TotalPageCount&&(i.noMoreItems=!0);i.loadingPage=!1})}};s=i.$watch("listId",function(){i.listId&&(s(),i.getPage())})}])};t.create({controller:"PlayListController",service:"PlayListService"});t.create({controller:"MyQueueListController",service:"MyQueueService"})}(window.angular);angular.module("qfxCoverApp").controller("QueueListController",["$compile","$rootScope","$scope","$log","$q","MyQueueService","qfxToastService","qfxAppConfig",function(n,t,i,r,u,f,e){var o;i.model={Items:[]};i.currentPage=0;i.pageSize=30;i.sort={value:""};i.getItemId=function(n){return i.model.Items[n].Id};i.getIndexOfId=function(n){return i.model.Items.map(function(n){return String(n.Id)}).indexOf(String(n))};i.fetchOptions=function(n){var t=u.defer();return f.fetchOptionsForItem(i.listId,i.model.Items[n].Id).then(function(r){i.model.Items[n].Options=r;t.resolve(r)}),t.promise};i.optionClickHandler=function(u,o){var s,h,c;switch(u.Class){case"delete":i.model.Items.splice(o,1);s=Math.ceil((o+1)/i.pageSize);h=i.currentPage;c=u.Url+"&startPage="+s+"&endPage="+h+"&pageSize="+i.pageSize;f.deleteItem(c).then(function(){i.noMoreItems||i.getPage(i.currentPage*i.pageSize,1)},function(n){e.createErrorToast("Try again. Contact us if you still can’t delete.");r.error(n)});break;case"set-priority":f.setPriority(u.Url).then(function(){t.$broadcast("qfx:cover:hideDisplayOptions",{});i.model.Items[o].IsPriority=!0},function(n){e.createErrorToast("Something went wrong. Please try again or contact us if it still won't work.");r.error(n)});break;case"remove-priority":f.removePriority(u.Url).then(function(){t.$broadcast("qfx:cover:hideDisplayOptions",{});i.model.Items[o].IsPriority=!1},function(n){e.createErrorToast("Something went wrong. Please try again or contact us if it still won't work.");r.error(n)});break;case"manage":i.manageTemplate="views/tpl/qfx-manage-queue-item.tpl.html";i.managingItemDetails={queueId:i.model.QueueId,itemId:i.model.Items[o].Id};$.modal({content:'<ng-include src="manageTemplate"><\/ng-include>',onShow:function(){n($(".modal"))(i)}})}};i.refreshItems=function(){t.$broadcast("qfx:cover:hideDisplayOptions",{})};i.refreshList=function(){i.noMoreItems=!1;i.currentPage=0;i.getPage()};i.getPage=function(n,t){if(i.supressFade=!1,!i.loadingPage&&!i.noMoreItems&&!i.isDirty){r.debug("Loading page "+n+" of page size "+t);i.loadingPage=!0;var u,e=i.pageSize;n&&n>0?(u=n,t&&t>0&&(e=t)):u=++i.currentPage;f.loadList(i.listId,u,e,i.sort.value).then(function(n){u===1?i.model=n:Array.prototype.push.apply(i.model.Items,n.Items);i.currentPage>=n.TotalPageCount&&(i.noMoreItems=!0);i.loadingPage=!1})}};o=i.$watch("listId",function(){i.listId&&(o(),i.getPage())})}]);angular.module("qfxCoverApp").controller("ManageQueueItemController",["$scope","manageQueueItemService",function(n,t){n.fetchItem=function(){t.fetchItem(n.managingItemDetails.queueId,n.managingItemDetails.itemId).then(function(t){n.coverViewModel=t.coverViewModel;n.childItems=t.childItems;n.transferableQueues=t.transferableQueues;n.numberOfTransferableQueues=Object.keys(n.transferableQueues).length;n.$$postDigest(function(){$(".modal").trigger("reposition")})})};n.fetchItem();n.queueButtonLabel=function(n){return"Move to "+n+(n.toLowerCase().indexOf("queue")<0?" Queue":"")};n.removeChildItem=function(i){t.deleteChildItem(n.managingItemDetails.queueId,i.DigitalCode,1,1,1).then(function(){n.childItems.splice(n.childItems.indexOf(i),1);n.refreshList();n.childItems.length?(n.managingItemDetails.itemId=n.childItems[0].Id,n.fetchItem(),$(".modal").trigger("reposition")):$.modal.close()})};n.transferToQueue=function(i){var r=n.getIndexOfId(n.managingItemDetails.itemId),u=Math.ceil((r+1)/n.pageSize),f=n.currentPage;n.model.Items.splice(r,1);t.transferItem(n.managingItemDetails.queueId,n.managingItemDetails.itemId,i,u,f,n.pagesize).then(function(t){n.refreshItems(t);$.modal.close()})}}]),function(n){var t={};t.create=function(t){n.module("qfxCoverApp").service(t.service,["$q","$http","$log","jQuery","qfxAppConfig",function(n,i,r,u,f){var e=this;return t.baseUrl=f.websiteFacadeUrl+t.baseUrl,e.loadList=function(u,f,e,o){var s,h=t.baseUrl+"GetItems?listId="+u+"&pageNumber="+f+"&pageSize="+e;return typeof o!="undefined"&&(h+="&sort="+o),s=n.defer(),i.get(h,{withCredentials:!0,cache:!1,headers:{"Cache-Control":"no-cache"}}).success(function(n){r.debug("Successfully loaded playlist page "+f);s.resolve(n)}).error(function(n,t){s.reject("Failed to load playlist page "+f+" with status: "+t+"; "+n)}),s.promise},e.moveItemToPosition=function(u,f,e,o,s,h){var c,l,a;return c=n.defer(),l=t.baseUrl+"MoveToPosition",a={listId:u,itemId:f,position:e,startPage:o,endPage:s,pageSize:h},i.post(l,a,{withCredentials:!0,cache:!1}).success(function(n){r.debug("Moved item");c.resolve(n)}).error(function(n,t){r.debug("Failed to move item");c.reject("Failed to move item with status: "+t+"; "+n)}),c.promise},e.deleteItem=function(t){var u;return u=n.defer(),i.post(t,{withCredentials:!0,cache:!1}).success(function(n){r.debug("Successfully deleted item");u.resolve(n)}).error(function(n,t){u.reject("Failed to delete item with status: "+t+"; "+n)}),u.promise},e.moveItemToTop=function(t){var u;return u=n.defer(),i.post(t,null,{withCredentials:!0,cache:!1}).success(function(n){r.debug("Successfully moved item to top");u.resolve(n)}).error(function(n,t){u.reject("Failed to move item to top with status: "+t+"; "+n)}),u.promise},e.moveItemToBottom=function(t){var u;return u=n.defer(),i.post(t,null,{withCredentials:!0,cache:!1}).success(function(n){r.debug("Successfully moved item to bottom");u.resolve(n)}).error(function(n,t){u.reject("Failed to move item to bottom with status: "+t+"; "+n)}),u.promise},e.setPriority=function(t){var r;return r=n.defer(),i.post(t,{cache:!1}).success(function(n){r.resolve(n)}).error(function(n,t){r.reject("Failed to set priority for item with status: "+t+"; "+n)}),r.promise},e.removePriority=function(t){var r;return r=n.defer(),i.post(t,{cache:!1}).success(function(n){r.resolve(n)}).error(function(n,t){r.reject("Failed to remove priority for item with status: "+t+"; "+n)}),r.promise},e.fetchOptionsForItem=function(u,f){var e;return e=n.defer(),i.get(t.baseUrl+"GetOptions?listId="+u+"&itemId="+f,{cache:!1}).success(function(n){r.debug("Fetched options for item "+f);e.resolve(n)}).error(function(n,t){r.debug("Failed to move item");e.reject("Failed to get options for item "+f+": "+t+"; "+n)}),e.promise},e.calculateTemporaryPosition=function(n,t,i,f){var e,o,h,s;if(t!==n)return e=u(n).nextAll().filter(t).length,o=0,e&&i.Position<f&&(o+=1),!e&&i.Position>f&&(o-=1),h=i.Position+o,r.debug("NEW POSITION  "+h),s=i.Position,e?s+=.5:s-=.5,{actual:h,temp:s}},{loadList:e.loadList,moveItemToPosition:e.moveItemToPosition,deleteItem:e.deleteItem,moveItemToTop:e.moveItemToTop,moveItemToBottom:e.moveItemToBottom,setPriority:e.setPriority,removePriority:e.removePriority,fetchOptionsForItem:e.fetchOptionsForItem,calculateTemporaryPosition:e.calculateTemporaryPosition}}])};t.create({service:"PlayListService",baseUrl:"/Playlist/"});t.create({service:"MyQueueService",baseUrl:"/MyQueue/"})}(window.angular);angular.module("qfxCoverApp").run(["$templateCache",function(n){"use strict";n.put("views/modals/qfx-premium-pass-modal.tpl.html",'<div class="premium-pass-modal"> <h3>Premium Pass<\/h3> <p> Grab your Premium Pass today to access exclusive member-only discounts, like this one. Plus, a new release movie rental from our Premium collection every month. <\/p> <div class="side-lines"><span class="sub-text">Premium Pass Prices<\/span><\/div> <table class="product-group"> <tr class="product" ng-repeat="product in modal.productGroup.Products"> <td>{{modal.catalogueItem.Name}} in {{product.Resolution}}<\/td> <td><span class="discount">{{product.Discount}}% OFF<\/span><\/td> <td> <div class="price"> <span class="amount">{{product.PersonalisedPrice | currency}}<\/span> <span class="discount-amount">You save {{(product.BasePrice - product.PersonalisedPrice) | currency}}<\/span> <\/div> <\/td> <\/tr> <\/table> <div class="controls"> <button class="cta" ng-click="modal.planSelection(\'Premium\')">Grab my Premium Pass<\/button> <\/div> <\/div>');n.put("views/modals/qfx-products-modal.tpl.html",'<h3> {{modal.productGroup.Name}} <div class="description">{{modal.productGroup.Description}}<\/div> <\/h3> <!--<h3>{{productGroup | qfxProductToAction}} {{catalogueItem.Details.Title}}<\/h3>--> <p ng-if="modal.productGroup.Type == \'TVOD\' && !modal.productGroup.IsDiscounted"> Rent now and stream on all of your connected devices. Super simple! <\/p> <p ng-if="modal.productGroup.Type == \'EST\' && !modal.productGroup.IsDiscounted"> Purchase once, yours forever. Stream and enjoy anytime, anywhere on your connected devices. <span ng-if="modal.catalogueItem.Type.toLowerCase() == \'season\'">Buy the entire season and save!<\/span> <\/p> <p ng-if="modal.productGroup.Type == \'TVOD\' && modal.productGroup.IsDiscounted"> Save with your Premium Pass. Rent, stream and enjoy this {{modal.catalogueItem | qfxCatalogueItemToType}} and many more with access to exclusive member-only discounts and your monthly new release movie credit. <\/p> <p ng-if="modal.productGroup.Type == \'EST\' && modal.productGroup.IsDiscounted"> Save on this {{modal.catalogueItem | qfxCatalogueItemToType}} and more with your Premium Pass. Purchase once, yours forever! Stream anywhere, anytime on your connected devices. <\/p> <div class="side-lines"><span>Purchase Options<\/span><\/div> <table class="products"> <thead> <tr> <th><p>{{modal.productGroup.PersonalisedPriceDescription}}<\/p><\/th> <\/tr> <\/thead> <tbody> <tr ng-repeat="product in modal.productGroup.Products"> <td> <button class="cta purchase" ng-class="{ featured: modal.productGroup.IsDiscounted }" ng-click="modal.purchaseProduct(product)"> {{product | qfxProductToAction}} in {{product.Resolution}} {{product.PersonalisedPrice | currency}} <qfx-ribbon label="Save {{product.Discount}}%" class="discount-ribbon" data-rotation="35" data-disabled="(!product.Discount || (!product.IsDiscounted && product.Discount < 10))"><\/qfx-ribbon> <\/button> <div class="sub-text" ng-if="product.Resolution==\'HD\'"><b>Note:<\/b> HD playback only available on <a href="/Devices">supported devices<\/a><\/div> <\/td> <\/tr> <\/tbody> <\/table>');n.put("views/modals/qfx-subscribe-to-dvd-modal.tpl.html",'<div ng-controller="QfxSubscribeToDVDModalController"> <div class="wait-wrapper" ng-if="!offersLoaded || !catalogueItemLoaded"> <qfx-wait-indicator data-type="spinner"><\/qfx-wait-indicator> <\/div> <div ng-if="offersLoaded && catalogueItemLoaded"> <h2>Get {{catalogueItem.Name}} delivered to your letterbox!<\/h2> <p>{{catalogueItem.Name}} is available as part of our {{dvdPlan.PlanDetail.Type}} subscription. <\/p> <p>For one monthly price, you can choose from over 60,000 movie & TV rentals, including latest releases. <\/p> <p>No postage fees, no late fees, unlimited disc exchanges.<\/p> <ul class="plans"> <li class="dvd full-plan"> <div ng-if="hasStreamingSubscription"> <div class="name">Combo subscription<\/div> <p>Get the best of both worlds by adding a new DVD & Blu-ray subscription to your existing Streaming subscription at special pricing. Combo subscriptions start from<\/p> <\/div> <div ng-if="!hasStreamingSubscription"> <div class="name">DVD & Blu-ray subscription<\/div> <p>Get a Quickflix DVD & Blu-ray subscription starting from<\/p> <\/div> <div class="center-container"> <div class="price-wrapper"> <div class="from">From<\/div> <div class="currency">$<\/div> <div class="dollar">{{::dvdPlan.Payment.Amount | pricePart:\'dollars\'}}<\/div> <div class="wrap"> <div class="cents">.{{::dvdPlan.Payment.Amount | pricePart:\'cents\'}}<\/div> <div class="unit">/month<\/div> <\/div> <\/div> <\/div> <a class="button cta" href="/MyAccount/SelectPlan/DVD" ng-if="!hasStreamingSubscription">Get Started<\/a> <a class="button cta" href="/MyAccount/SelectPlan/Combo" ng-if="hasStreamingSubscription">Update Subscription<\/a> <div style="margin-top: 1rem">P.S. We’ve added {{catalogueItem.Name}} to your Queue so, if you do take up a {{dvdPlan.PlanDetail.Type}} subscription, we can post it out to you <\/div> <\/li> <\/ul> <\/div> <\/div>');n.put("views/modals/qfx-svod-subscription-modal.tpl.html",'<div ng-if="!modal.hasStreamingAccess && modal.hasDiscRentalAccess"> <h2>Stream {{modal.catalogueItem.Details.Title}} on Quickflix Streaming<\/h2> <p>This {{modal.catalogueItem | qfxCatalogueItemToType}} is available as part of our subscription streaming service.<\/p> <p>A streaming subscription includes 4 new release blockbusters every month and access to 100\'s of bonus movies and TV shows to watch on a wide range of connected <a href="/devices" target="_blank">devices<\/a> including Smart TVs, game consoles, mobiles, tablets, PC & Mac and Chromecast.<\/p> <ul class="plans"> <li class="stream full-plan"> <div class="name">Combo Plan<\/div> <p>Get the best of both worlds by adding a new streaming subscription to your existing DVD & Blu-ray subscription at special pricing.<\/p> <div class="center-container"> <div class="price-wrapper"> <div class="from">From<\/div> <div class="currency">$<\/div> <div class="dollar">{{::modal.streamingPlan.Payment.Amount | pricePart:\'dollars\'}}<\/div> <div class="wrap"> <div class="cents">.{{::modal.streamingPlan.Payment.Amount | pricePart:\'cents\'}}<\/div> <div class="unit">/month<\/div> <\/div> <\/div> <\/div> <button class="button cta" ng-click="modal.planSelection(\'Combo\')" target="_blank">Update Subscription<\/button> <\/li> <\/ul> <\/div> <div ng-if="!modal.hasStreamingAccess && !modal.hasDiscRentalAccess"> <h2>Stream {{modal.catalogueItem.Details.Title}} on Quickflix Streaming<\/h2> <p>This {{modal.catalogueItem | qfxCatalogueItemToType}} is available as part of our subscription streaming service.<\/p> <p>One monthly price includes 4 new release blockbusters every month and access to 100\'s of bonus movies and TV shows to watch on a wide range of connected <a href="/devices" target="_blank">devices<\/a> including Smart TVs, game consoles, mobiles, tablets, PC & Mac and Chromecast.<\/p> <ul class="plans"> <li class="stream full-plan"> <div class="name">Streaming Plan<\/div> <p>Get a Quickflix Streaming plan from<\/p> <div class="center-container"> <div class="price-wrapper"> <div class="currency">$<\/div> <div class="dollar">{{::modal.streamingPlan.Payment.Amount | pricePart:\'dollars\'}}<\/div> <div class="wrap"> <div class="cents">.{{::modal.streamingPlan.Payment.Amount | pricePart:\'cents\'}}<\/div> <div class="unit">/month<\/div> <\/div> <\/div> <\/div> <button class="button cta" ng-click="modal.planSelection(\'Streaming\')" target="_blank">Get Started<\/button> <\/li> <\/ul> <\/div>');n.put("views/modals/queue-allocation-modal.html",'<p>Some message can go here explaining what this is for?<\/p> <qfx-dispatch-control qfx-queues="modal.queues" qfx-show-tooltip="false"><\/qfx-dispatch-control>');n.put("views/modals/report-disc-modal.html",'<!-- Should move to app catalogue once it doesn\'t need to be shared with site web --> <form id="reportForm" ng-submit="submitDiscReport()" ng-controller="QfxReportDiscController"> <h3 id="title" ng-bind="modal.reportingDisc.TitleName"><\/h3> <label>Issue: <small>(required)<\/small><\/label> <span class="select-wrapper normal"> <select name="IssueType" ng-model="report.IssueType" ng-options="i as i for i in issues" required> <option selected style="display:none" value="">Select an issue<\/option> <\/select> <\/span> <label>Send me this disc again:<\/label> <div id="sendAgain"> <span id="noLabel">No<\/span> <input type="radio" name="SendCustomerSameTitleAgain" value="false" ng-model="report.SendCustomerSameTitleAgain"> <span id="yesLabel">Yes<\/span> <input type="radio" name="SendCustomerSameTitleAgain" value="true" ng-model="report.SendCustomerSameTitleAgain"> <\/div> <label>Time issue occurs on disc: <small class="">(optional)<\/small><\/label> <div id="time"> <span> <small>Hour<\/small> <input type="number" name="DiscFaultPositionHr" ng-model="report.DiscFaultPositionHr" min="0" max="4" maxlength="1"> <\/span> <span> <small>Minute<\/small> <input type="number" name="DiscFaultPositionMin" ng-model="report.DiscFaultPositionMin" min="0" max="59" maxlength="2"> <\/span> <\/div> <input class="button submit" type="submit" value="Submit Report" ng-if="!submittingReport"> <qfx-wait-indicator ng-if="submittingReport"><\/qfx-wait-indicator> <\/form>');n.put("views/tpl/cover-details.tpl.html",'<div class="details"> <div class="loading-container"><\/div> <\/div>');n.put("views/tpl/cover-old.tpl.html",'<div id="catalogueItem-{{item.CatalogueItem.DigitalCode}}" class="cover {{item.ClassIdentifiers}} play-status" data-state="unbound" data-digitalcode="{{item.CatalogueItem.DigitalCode}}" data-cataloguefunction="{{item.CatalogueFunction}}"> <a href="{{item.ItemUrl}}" title="Watch {{item.CatalogueItem.Details.Title}}"> <!--<img ng-show="item.LazyLoadImage" class="art lazy" data-original="{{item.ImageUrl}}" alt="{{item.CatalogueItem.Details.Title}}" width="100%" height="100%" />--> <img class="art" ng-src="{{item.ImageUrl}}" alt="{{item.CatalogueItem.Details.Title}}" width="100%" height="100%"> <!--disable lazy loading for now as the transition was not working well with angular--> <\/a> <ng-transclude>This is where the contents of the cover element will be placed :)<\/ng-transclude> <\/div>');n.put("views/tpl/cover-options.tpl.html",'<a ng-click="toggleOptions()" class="icon more-options"><\/a> <div class="options" ng-class="optionsClasses"> <jqfx-spinner ng-if="fetchingOptions" spinner-colour="#ffffff"><\/jqfx-spinner> <ul ng-if="!fetchingOptions" class="option-items"> <li ng-repeat="option in options track by option.Url"> <a ng-click="selectOption(option, itemIndex)" class="option-link {{option.Class}}" data-itemid="{{option.ItemId}}" data-link="{{option.Url}}"> <span class="icon {{option.IconClass}}"><\/span> <span class="item-text">{{option.DisplayText}}<\/span> <\/a> <\/li> <\/ul> <div ng-if="availability" ng-switch="availability" class="availability"> <span ng-switch-when="longwait">We are trying our very best to get this to you. In the meantime, you could add Quickpicks to your Queue<\/span> <span ng-switch-when="quickpick">Good news, this movie or TV season is available to send to you!<\/span> <\/div> <\/div>');n.put("views/tpl/cover-play-status.tpl.html",'<div class="progress-indicator" ng-if="playStatus.PlayProgressPercentage > 0 && playStatus.PlayProgressPercentage <= 95"> <div class="progress-value"><\/div> <p class="progress-bar" ng-style="{width: playStatus.PlayProgressPercentage+\'%\'}"><\/p> <div class="personalized-playinfo"><\/div> <\/div> <div class="complete-overlay" ng-if="playStatus.PlayProgressPercentage > 95"> <span>Watched<\/span> <\/div>');n.put("views/tpl/qfx-add-to-playlist-button.tpl.html",'<button class="button add-to-playlist icon-playlist" ng-class="[buttonClasses,{\'hide-text\': iconOnly, \'in-playlist\': isOnPlaylist }]" ng-disabled="isDisabled" ng-click="addOrRemove()" title="{{label}}">{{label}}<\/button>');n.put("views/tpl/qfx-add-to-queue-button.tpl.html",'<button class="button dvd add-to-queue" ng-class="[buttonClasses, getButtonClass()]" ng-disabled="isDisabled()" ng-click="addOrRemove()" title="{{getAltText()}}" ng-bind-html="getButtonText()"><\/button>');n.put("views/tpl/qfx-carousel.tpl.html",'<section ng-if="!hideCarousel" id="carousel-{{carousel.ListId}}" class="sub-section carousel-container" ng-resize="doResize()" qfx-swipe-left="moveRight()" qfx-swipe-right="moveLeft()" ng-class="getCarouselClasses()"> <div class="pad"> <h2 ng-if="!carousel.Name">Loading...<\/h2> <h2 ng-if="carousel.Name && !carousel.Url">{{carousel.Name}}<\/h2> <h2 ng-if="carousel.Name && carousel.Url"> <a href="{{carousel.Url}}" title="{{carousel.Name}}">{{carousel.Name}}<\/a> <\/h2> <\/div> <div class="carousel" data-count="{{carousel.Items.length}}"> <div class="wrapper"> <div class="items"> <div ng-if="!carousel.Items || !carousel.Items.length" ng-repeat="x in placeholders() track by $index" class="item placeholder"><\/div> <div ng-if="!isOfferCarousel" ng-repeat="carouselItem in carousel.Items | inView:viewIndex:itemsInView" class="item"> <qfx-cover item="carouselItem" cover-type="{{coverType}}" catalogue-function="{{catalogueFunction}}"> <qfx-cover-details catalogue-function="{{catalogueFunction}}"><\/qfx-cover-details> <\/qfx-cover> <\/div> <div ng-if="isOfferCarousel" ng-repeat="carouselItem in carousel.Items | inView:viewIndex:itemsInView" class="item"> <a ng-href="{{::getItemLink(carouselItem)}}"> <img ng-src="{{\'//images.quickflix.com.au/site/bluesky/premiumoffers/\'+carouselItem.DigitalCode+\'.jpg\'}}"> <\/a> <\/div> <div ng-if="carousel.HasNextPage" class="item"> <div class="cover carousel-view-more"> <a href="{{carousel.Url}}"> <p>View All<\/p> <\/a> <\/div> <\/div> <\/div> <\/div> <a ng-class="{enabled: itemsLeft() > 0}" ng-click="moveLeft()" class="control left"><\/a> <a ng-class="{enabled: itemsRight() > 0}" ng-click="moveRight()" class="control right"><\/a> <\/div> <\/section>');n.put("views/tpl/qfx-collection.tpl.html",'<ul id="items" ng-if="collectionArray"> <!--Added span inbetween ul and li to repeat collectionArray which is an hack because ng-repeat in ul create issue in the style of collections page as ul is a blocked element.\r\n  Only this way worked for performance improvement--> <span ng-repeat="collectionItems in collectionArray"> <li ng-repeat="collectionItem in collectionItems.Items" id="item-{{collectionItem.CatalogueItem.DigitalCode}}" class="item"> <scrolled-into-view scroll-trigger="loadNextPage()" ng-if="$last && $parent.$last"><\/scrolled-into-view> <div> <qfx-cover item="collectionItem" on-show-options="false"> <qfx-cover-details><\/qfx-cover-details> <\/qfx-cover> <\/div> <\/li> <\/span> <\/ul> <div ng-if="!errorMessage" class="pad">{{errorMessage}}<\/div> <div class="loading loader invert" ng-if="showLoader || pageLoading">Loading<\/div> <div class="end pad" ng-if="!hasNextPage"> <div class="container">You have reached the end of this list. <a href="#top" ng-click="scrollTop()">Return to top of page.<\/a><\/div> <\/div>');n.put("views/tpl/qfx-cover-details.tpl.html",'<div class="details" ng-class="detailsClasses()"> <span ng-if="activated"> <a title="Watch {{::catalogueItem.Name}}" class="overlay-link" ng-href="{{::itemLink}}"><\/a> <div class="row"> <span class="title">{{::catalogueItem.Name}} <span class="release-year">{{::catalogueItem.Details.ReleaseYear}}<\/span><\/span> <qfx-classification ng-if="catalogueItem.Classification" classification="catalogueItem.Classification" classification-style="small"><\/qfx-classification> <\/div> <qfx-wait-indicator ng-if="!catalogueItem.Details"><\/qfx-wait-indicator> <div class="row rating-control" ng-if="catalogueItem.Details"> <qfx-star-rating catalogue-item-rating rating-id="{{::catalogueItem.DigitalCode}}" default-rating="{{::catalogueItem.Details.Rating}}"><\/qfx-star-rating> <\/div> <div class="synopsis"> {{::catalogueItem.Details.ShortSynopsis}} <\/div> <!-- ng-if for different sites? --> <div ng-if="catalogueItem && catalogueItem.Details"> <div class="controls public" ng-if="controlType === \'viewing-options\'"> <a class="alt button" ng-href="{{::itemLink}}">Viewing Options<\/a> <\/div> <div class="controls dvd" ng-if="controlType === \'disc\'"> <qfx-add-to-queue-button qfx-digital-code="{{::catalogueItem.DigitalCode}}" qfx-availability="{{::catalogueItem.Details.DiscAvailability}}" qfx-catalogue-function="{{::catalogueFunction}}"><\/qfx-add-to-queue-button> <\/div> <div class="controls streaming" ng-if="controlType === \'streaming\'"> <qfx-play-button qfx-catalogue-item="catalogueItem" qfx-product-group="productGroup" qfx-icon-only="{{::iconOnly}}" qfx-show-suffix="false" qfx-catalogue-function="{{::catalogueFunction}}"><\/qfx-play-button> <qfx-add-to-playlist-button qfx-digital-code="{{::catalogueItem.DigitalCode}}" qfx-icon-only="true" qfx-catalogue-function="{{::catalogueFunction}}" qfx-button-classes="\'alt\'"><\/qfx-add-to-playlist-button> <\/div> <\/div> <\/span> <\/div>');n.put("views/tpl/qfx-cover.tpl.html",'<div class="cover" data-digitalcode="{{::catalogueItem.DigitalCode}}"> <!-- item.Flags stuff might need to be added as classes (i.e premium, etc) --> <a ng-href="{{::itemLink}}" ng-title="{{::catalogueItem.Name}}"> <img class="cover-image" ng-src="{{::catalogueItem.ImageUrl}}" alt="{{::catalogueItem.Name}}" width="100%" height="100%"> <\/a> <ng-transclude><\/ng-transclude> <\/div>');n.put("views/tpl/qfx-dispatch-control.tpl.html",'<div class="counters"> <div class="counter-container" ng-repeat="queue in queues | filter:canEdit as editableQueues" ng-class="{last: $last && !$index}"> <div class="counter"> <a class="step increase" ng-class="{disabled: !canIncrease(queue)}" title="Increase" ng-click="increase(queue)"><\/a> <div class="value" ng-if="!showLoader">{{queue.RentalSpaces}}<\/div> <qfx-wait-indicator class="value" ng-if="showLoader"><\/qfx-wait-indicator> <a class="step decrease" ng-class="{disabled: !canDecrease(queue)}" title="Decrease" ng-click="decrease(queue)"><\/a> <\/div> <label class="counter-label">{{queue.Name}}<\/label> <\/div> <div class="counter-container total" ng-if="editableQueues.length > 1"> <div class="counter"> <a class="step"><\/a> <div class="value" ng-if="!showLoader">{{getTotal()}}<\/div> <qfx-wait-indicator class="value" ng-if="showLoader"><\/qfx-wait-indicator> <a class="step"><\/a> <\/div> <label class="counter-label">Total<\/label> <\/div> <\/div>');n.put("views/tpl/qfx-my-discs.tpl.html",'<span ng-if="!loadingDiscs && (hasRentalAccess || discs.length)" ng-switch on="status"> <h2 ng-switch-when="out">Discs sent to me<\/h2> <\/span> <qfx-wait-indicator ng-if="loadingDiscs" ng-class="{\'next-page\': discs.length}"><\/qfx-wait-indicator> <div class="disc-row" ng-repeat="disc in discs"> <div class="title"> <a ng-href="{{::getItemUrl(disc)}}" title="{{::disc.TitleName}}">{{::disc.TitleName}}<\/a> <\/div> <div class="rating-wrapper"> <qfx-star-rating catalogue-item-rating rating-id="{{::disc.DigitalCode}}" default-rating="{{::disc.CatalogueItem.Details.Rating}}"><\/qfx-star-rating> <\/div> <div class="date-wrapper" ng-switch on="status"> <div ng-switch-when="out" class="date">{{::disc.DateSent | date : \'dd MMM yyyy\'}}<\/div> <div ng-switch-when="prenotified" class="date">{{::disc.DatePrenotified | date : \'dd MMM yyyy\'}}<\/div> <div ng-switch-when="returned" class="dates">{{::disc.DateSent | date : \'dd MMM yyyy\'}} - {{::disc.DateReturned | date : \'dd MMM yyyy\'}}<\/div> <\/div> <div class="actions" ng-if="hasLinks(disc)"> <span ng-repeat="(name, url) in disc.Links" ng-switch on="name | lowercase"> <button ng-switch-when="prenotify" class="cta return" ng-click="prenotifyDisc(disc)">Return<\/button> <button ng-switch-when="discproblem" class="cta dvd report" ng-click="reportDiscProblem($event, disc)" ng-disabled="disc.MemberRecordedFaultDateTime">{{disc.MemberRecordedFaultDateTime ? "Reported" : "Report"}}<\/button> <\/span> <\/div> <\/div> <qfx-paginator ng-if="pageCount" qfx-paginator-id="{{paginatorId}}"><\/qfx-paginator> <span ng-if="!loadingDiscs && !discs.length" ng-switch on="status" class="empty-message"> <div ng-switch-when="out" ng-if="hasRentalAccess"> <p>Looks like you currently have no discs out!<\/p> <p>Make sure you have topped up your Queue so that we can send you a new disc as soon as possible.<\/p> <\/div> <p ng-switch-when="prenotified">You have no discs returning.<\/p> <p ng-switch-when="returned">You haven\'t returned any discs.<\/p> <\/span>');n.put("views/tpl/qfx-play-button.html",'<button ng-if="!productGroup.UnavailableReason" class="button play icon-play cta product-group multiple" ng-class="[buttonClasses, { featured: productGroup.IsDiscounted && productGroup.MinDiscount }]" ng-click="play()" ng-disabled="isDisabled"> <span ng-if="showPrefix && productGroup.MinPrice" class="prefix">from<\/span>{{label}} <\/button> <div class="unavailable" ng-if="productGroup.UnavailableReason && productGroup.UnavailableReason !== \'Episodes only\'"> <p>{{productGroup.UnavailableReason}}<\/p> <\/div> <a ng-href="{{itemUrl}}" class="button cta own-episodes" ng-if="productGroup.UnavailableReason == \'Episodes only\'">Own Episodes<\/a>');n.put("views/tpl/qfx-star-wars-theme-toggler.tpl.html",'<!-- TODO: When this is no longer needed and gets removed, remove the dependency on angularLoad in the bower.json file and app.js (unless something else is depending it, but at the time of writing this nothing else is...) --> <div class="side-selection-wrapper" ng-if="cssLoaded"> <ul class="side-selection"> <li class="side light-select" ng-click="applyLightSideTheme()"> <span class="side-text">The Resistance<\/span> <span class="img-container"> <img src="//images.quickflix.com.au/site/bluesky/img/streaming/custom/themes/star-wars/light-side.png" alt="The Light Side of the Force"> <\/span> <\/li> <li class="side dark-select" ng-click="applyDarkSideTheme()"> <span class="side-text">First Order<\/span> <span class="img-container"> <img src="//images.quickflix.com.au/site/bluesky/img/streaming/custom/themes/star-wars/dark-side.png" alt="The Dark Side of the Force"> <\/span> <\/li> <li class="side reset-select" ng-click="resetTheme()"> <span class="side-text">Neutral<\/span> <span class="img-container"> <img src="//images.quickflix.com.au/site/bluesky/img/streaming/custom/themes/star-wars/quickflix.png" alt="Normal Side"> <\/span> <\/li> <\/ul> <\/div>')}]);angular.module("qfxLayoutApp",["qfxWebFrameworkApp","qfxApiClientMemberApp"]);angular.module("qfxLayoutApp").directive("qfxSearchInput",["$rootScope","$document","$timeout","qfxIdGenerator","$log",function(n,t,i,r){return{templateUrl:"views/tpl/qfx-search-input.tpl.html",restrict:"E",scope:!0,link:function(t,u){t.searchInputId=r.generateId("qfx-search-input");t.search={};t.previousSearch={};t.activeQueries=0;var e=u.find(".search-btn"),o=u.find(".clear-btn"),f=u.find("input");t.broadcastInput=function(){n.$broadcast("qfx:search:input",{text:t.search.text,last:t.previousSearch.text});t.previousSearch.text=t.search.text};t.getWrapperClasses=function(){return{showing:t.showing,"has-content":t.search.text}};t.showInput=function(i){t.activeQueries=0;i&&(t.search.text=i,t.previousSearch.text=t.search.text);t.showing||(t.showing=!0,n.$broadcast("qfx:search:showing",{}));t.focusInput()};t.clearInput=function(){t.search.text="";t.broadcastInput();t.focusInput()};t.hideInput=function(){t.showing=!1;t.search.text=null;n.$broadcast("qfx:search:hiding",{});t.justHid=!0;i(function(){t.justHid=!1},150)};t.focusInput=function(){i(function(){f.focus()})};t.handleSearch=function(n){n.preventDefault();f.blur()};t.$on("qfx:search:show",function(n,i){var r=i&&i.text?i.text:null;t.showInput(r)});t.$on("qfx:search:hide",function(){t.hideInput()});t.$on("qfx:search:clear",function(){t.clearInput()});t.$on("qfx:search:start-query",function(){t.activeQueries++});t.$on("qfx:search:end-query",function(){t.activeQueries>=1?t.activeQueries--:t.activeQueries=0});f.bind("focus",function(){i(function(){n.$broadcast("qfx:search:focused")})});e.bind("click",function(){i(function(){t.justHid||t.showInput()})});o.bind("click",function(){i(function(){t.clearInput()})});f.bind("blur",function(){i(function(){n.$broadcast("qfx:search:blurred",{text:t.search.text})})})}}}]);angular.module("qfxLayoutApp").directive("qfxMenuBar",["$rootScope","$document","$timeout","$location","$window","Modernizr",function(n,t,i,r,u,f){return{templateUrl:"views/tpl/qfx-menu-bar.tpl.html",restrict:"E",transclude:!0,link:function(e){var o={},s,c=function(){e.$applyAsync(function(){o.resetMenu()})},l=function(){e.$applyAsync(function(){o.resetMenu()})},a=function(){i.cancel(s)},v=function(){e.activeItem&&(s=i(o.resetMenu,1e3))},h;o.setActiveItem=function(t){i.cancel(h);e.activeItem=t;n.$broadcast("qfx:menuBar:activeItem",{activeItemId:t});o.enableHideEvents()};o.resetMenu=function(){e.activeItem=null;n.$broadcast("qfx:menuBar:reset");i.cancel(s);o.disableHideEvents()};o.eventsEnabled=!1;o.enableHideEvents=function(){if(!o.eventsEnabled){o.eventsEnabled=!0;angular.element(t).on("click",c);angular.element(t).on("scroll",l);angular.element("header").on("mouseleave",v);angular.element("header").on("mouseenter",a)}};o.disableHideEvents=function(){o.eventsEnabled=!1;angular.element(t).off("click",c);angular.element(t).off("scroll",l);angular.element("header").off("mouseleave",v);angular.element("header").off("mouseenter",a)};e.doMouseenter=function(n){h=i(function(){o.setActiveItem(n.id)},150)};e.doMouseleave=function(){i.cancel(h)};e.doClick=function(n,t){t.hasMegaMenu&&e.activeItem!==t.id&&f.touchevents?(n.preventDefault(),n.stopPropagation(),o.setActiveItem(t.id)):o.resetMenu()};e.isCurrent=function(n){if(!n)return!1;n=n.split("?")[0];n=n.charAt(0)!="/"?"/"+n:n;n.length>1&&(n=n.charAt(n.length-1)=="/"?n.slice(0,-1):n);var t=new RegExp("^"+n+"(/.*|$)");return t.test(r.path())||t.test(u.location.pathname)}}}}]);angular.module("qfxLayoutApp").directive("qfxMegaMenu",[function(){return{templateUrl:"views/tpl/qfx-mega-menu.tpl.html",restrict:"E",scope:{megaMenuModel:"=qfxMegaMenuModel"},link:function(n){n.megaMenuModel.navGroups.forEach(function(n){n.limitedItems=[];for(var i=5,t=0,r=n.items.length;t<r;t+=i)n.limitedItems.push(n.items.slice(t,t+i))});n.$on("qfx:menuBar:activeItem",function(t,i){i&&n.megaMenuModel&&i.activeItemId===n.megaMenuModel.id?n.isActive=!0:(n.isActive=!1,n.activeIndex=null)});n.$on("qfx:menuBar:reset",function(){n.isActive=!1;n.activeIndex=null});n.select=function(t,i){$(t.target).closest("a").length||(t.stopPropagation(),n.activeIndex=n.activeIndex!=i?i:null)}}}}]);angular.module("qfxLayoutApp").directive("qfxAnchorTarget",function(){return{restrict:"A",scope:{target:"@qfxAnchorTarget"},link:function(n,t){n.target&&t.attr("target",n.target)}}});angular.module("qfxLayoutApp").directive("qfxFooter",["$log","Members","qfxAppConfig",function(n,t,i){return{templateUrl:"views/tpl/qfx-footer.tpl.html",restrict:"E",link:function(r){r.config=i;r.copyright=(new Date).getFullYear()+" "+i.divisionName+" Limited";t.then(function(t){n.debug("received member resource",t);r.member=t},function(){})}}}]);angular.module("qfxLayoutApp").directive("qfxMenuTray",[function(){return{templateUrl:"views/tpl/qfx-menu-tray.tpl.html",restrict:"E",transclude:!0,link:function(n){n.$on("qfx:menuBar:activeItem",function(t,i){i&&(n.isActive=i.activeItemId==="account")});n.$on("qfx:menuBar:reset",function(){n.isActive=!1})}}}]);angular.module("qfxLayoutApp").run(["$templateCache",function(n){"use strict";n.put("views/tpl/qfx-footer.tpl.html",'<section ng-if="config" class="sub-section footer"> <div class="container pad"> <div class="divider flourish"><\/div> <ul ng-if="member && member.Email" class="footer-section"> <li class="section-header">Your {{config.companyName}} Account<\/li> <li>Signed in as {{member.Email}}<\/li> <li><a href="/MyAccount">Manage Account &amp; Settings<\/a><\/li> <li ng-if="config.applicationName && config.applicationName.toLowerCase() == \'streaming\'"><a href="/MyLibrary">My Playlist<\/a><\/li> <li ng-if="config.applicationName && config.applicationName.toLowerCase() == \'streaming\'"><a href="/MyLibrary/Purchases">Purchases<\/a><\/li> <li ng-if="config.applicationName && config.applicationName.toLowerCase() == \'streaming\'"><a href="/MyLibrary/History">History<\/a><\/li> <li ng-if="config.applicationName && config.applicationName.toLowerCase() == \'dvd\'"><a href="/MyQueue">My Queue<\/a><\/li> <li ng-if="config.applicationName && config.applicationName.toLowerCase() == \'dvd\'"><a href="/MyQueue?tab=My%20History">History<\/a><\/li> <li><a href="/Logout">Sign out<\/a><\/li> <\/ul> <ul class="footer-section"> <li class="section-header">Info<\/li> <li><a href="/About">Company Profile<\/a><\/li> <li><a href="/Terms">Terms &amp; Conditions<\/a><\/li> <li><a href="/Privacy">Privacy<\/a><\/li> <li><a href="http://investor.quickflix.com.au">Investors<\/a><\/li> <\/ul> <ul class="footer-section"> <li class="section-header">Help<\/li> <li><a href="{{config.offerSiteUrl}}/RedeemCode">Redeem a code or voucher<\/a><\/li> <li> <a href="/Help">Help Centre<\/a> <\/li> <li><a href="/Devices">Devices<\/a><\/li> <li><a href="{{config.helpSiteUrl}}/hc/en-us/requests/new">Contact us<\/a><\/li> <\/ul> <ul class="footer-section right"> <li class="section-header">&copy; {{copyright}}<\/li> <li ng-if="config.region && config.region.toLowerCase() == \'au\'"><a class="social-button twitter" href="https://www.twitter.com/quickflix">Quickflix on Twitter<\/a><a class="social-button facebook" href="https://www.facebook.com/quickflix">Quickflix on Facebook<\/a><\/li> <li ng-if="config.region && config.region.toLowerCase() == \'nz\'"><a class="social-button twitter" href="https://www.twitter.com/quickflixnz">Quickflix on Twitter<\/a><a class="social-button facebook" href="https://www.facebook.com/quickflixnz">Quickflix on Facebook<\/a><\/li> <\/ul> <\/div> <\/section>');n.put("views/tpl/qfx-mega-menu.tpl.html",'<nav class="mega-menu" ng-class="{active: isActive}" id="menu-{{megaMenuModel.id}}"> <div class="container"> <div class="mega-menu-overlay pad-all"> <h2>{{::megaMenuModel.heading}}<\/h2> <div ng-if="::megaMenuModel.intro" class="nav-group intro"> <h3>{{::megaMenuModel.intro.heading}}<\/h3> <p>{{::megaMenuModel.intro.blurb}}<\/p> <\/div> <div ng-repeat="group in ::megaMenuModel.navGroups" class="nav-group {{\'group-\'+($index+1)}} {{group.class}} icon" ng-class="{selected: activeIndex == $index}" ng-click="select($event, $index)"> <h3>{{::group.name}}<\/h3> <ul ng-repeat="subGroup in ::group.limitedItems" class="nav-items" ng-class="{last: $last}"> <li ng-repeat="navItem in ::subGroup" ng-class="navItem.classes"> <a ng-href="{{::(navItem.href | updateQueryString:\'catalogueFunction\':\'MenuNav\')}}" qfx-anchor-target="{{::navItem.target}}">{{::navItem.name}}<\/a> <\/li> <\/ul> <ul class="nav-items drop-down"> <li ng-repeat="navItem in ::group.items" ng-class="navItem.classes"> <a ng-href="{{::(navItem.href | updateQueryString:\'catalogueFunction\':\'MenuNav\')}}" qfx-anchor-target="{{::navItem.target}}">{{::navItem.name}}<\/a> <\/li> <\/ul> <\/div> <\/div> <\/div> <\/nav>');n.put("views/tpl/qfx-menu-bar.tpl.html",'<div class="container pad" ng-cloak> <nav> <ul class="main-nav"> <li ng-repeat="navItem in navItems" ng-mouseenter="doMouseenter(navItem)" ng-mouseleave="doMouseleave()" ng-click="doClick($event, navItem)" id="nav-{{navItem.id}}" ng-class="{current: isCurrent(navItem.href)}"> <a ng-href="{{navItem.href}}" qfx-anchor-target="{{navItem.target}}" ng-class="navItem.classes"> <span class="label">{{navItem.name}}<\/span> <\/a> <\/li> <\/ul> <!-- Any tools can be transcluded here rather than using a model and template as the markup and scope is not predictable--> <ng-transclude><\/ng-transclude> <\/nav> <\/div>');n.put("views/tpl/qfx-menu-tray.tpl.html",'<nav class="mega-menu account" ng-class="{active: isActive}"> <div class="container pad"> <ul class="member-tray"> <li id="user" class=""> <a href="/MyAccount" target="_self" class="user-identity"> <span class="icon-cog"><\/span> <span id="identity">{{qfxMember.Email}}<\/span> <\/a> <a href="/Logout" target="_self" class="logout">Sign out<\/a> <\/li> <li id="alerts"> <qfx-wait-indicator ng-if="!alertsLoaded"><\/qfx-wait-indicator> <div> <ul> <li class="no-notifications" ng-if="alertsLoaded && !notifications.length">No Notifications<\/li> <li ng-repeat="notification in notifications" class=""> <a ng-href="{{notification.ActionUrl}}" target="_self" ng-class="{\'disabled-link\' : !notification.ActionUrl}"> <div> <span class="value" ng-if="notification.Value">{{notification.Value}}<\/span> <span class="message">{{notification.MessageHeading}}<\/span> <\/div> <\/a> <\/li> <\/ul> <\/div> <\/li> <ng-transclude><\/ng-transclude> <li class="manage-account"> <a href="/MyAccount">Manage account<\/a> <\/li> <\/ul> <\/div> <\/nav>');n.put("views/tpl/qfx-search-input.tpl.html",'<div class="search-outer-wrapper" ng-class="getWrapperClasses()"> <div class="icon search-btn"><\/div> <div class="search-input-wrapper"> <form action="." ng-submit="handleSearch($event)"> <input id="{{searchInputId}}" type="search" ng-model="search.text" ng-change="broadcastInput()" ng-disabled="!showing" placeholder="Movie, TV, actor, director, or genre"> <\/form> <div class="icon clear-btn" ng-click="clearInput()" ng-if="!activeQueries && showing"><\/div> <qfx-wait-indicator ng-if="activeQueries && showing"><\/qfx-wait-indicator> <\/div> <\/div>')}]);angular.module("qfxDragAndDropApp",["qfxWebFrameworkApp"]);angular.module("qfxDragAndDropApp").directive("qfxDraggable",["$rootScope","$filter","$log","$parse",function(n,t,i,r){return{restrict:"A",require:"?ngModel",link:function(u,f,e,o){var c=!1,s=!1,l=function(r){var u,e;c&&i.debug("dragstart");f.on("MSHoldVisual",h);f.on("contextmenu",h);u={element:f};o&&(u.dragModel=o.$modelValue,e=t("json")(o.$modelValue),r.originalEvent.dataTransfer.effectAllowed="move",r.originalEvent.dataTransfer.dropEffect="move",r.originalEvent.dataTransfer.setData("text",e));n.$broadcast("qfx:dragAndDrop:dragstart",u)},a=function(){c&&i.debug("drag");f.hasClass("being-dragged")||f.addClass("being-dragged")},v=function(){c&&i.debug("dragend");f.removeClass("being-dragged");var t={element:f};o&&(t.dragModel=o.$modelValue);n.$broadcast("qfx:dragAndDrop:dragend",t);f.off("MSHoldVisual",h);f.off("contextmenu",h)},h=function(n){n.preventDefault()},y=function(){f.off("dragstart",l);f.off("drag",a);f.off("dragend",v)},p=function(){y();f.on("dragstart",l);f.on("drag",a);f.on("dragend",v)};u.$watch(function(){var n=r(e.qfxDraggable)(u);return s=!!n||typeof n=="undefined"},function(){e.$set("draggable",s);s?p():y()})}}}]);angular.module("qfxDragAndDropApp").directive("qfxDropTarget",["$rootScope","$log","$parse",function(n,t,i){return{restrict:"A",require:"?ngModel",link:function(r,u,f,e){var o=!1,s=!1,h=function(){o&&t.debug("dragenter");u.addClass("drag-hover");var i={element:u};e&&(i.dropModel=e.$modelValue);n.$broadcast("qfx:dragAndDrop:dragenter",i)},c=function(i){i.stopPropagation();i.preventDefault();u.removeClass("drag-hover");o&&t.debug("drop");var r={};r.dragModel=angular.fromJson(i.originalEvent.dataTransfer.getData("text"));e&&(r.dropModel=e.$modelValue);n.$broadcast("qfx:dragAndDrop:dropped",r)},l=function(n){n.preventDefault();o&&t.debug("dragover");u.hasClass("drag-hover")||u.addClass("drag-hover")},a=function(){o&&t.debug("dragleave");u.removeClass("drag-hover")},v=function(){u.off("dragenter",h);u.off("drop",c);u.off("dragover",l);u.off("dragleave",a)},y=function(){v();u.on("dragenter",h);u.on("drop",c);u.on("dragover",l);u.on("dragleave",a)};r.$watch(function(){var n=i(f.qfxDropTarget)(r);return s=!!n||typeof n=="undefined"},function(){s?y():v()})}}}]);angular.module("qfxDragAndDropApp").directive("qfxDragScroll",["$window","$document","$log","qfxEasingFunctions",function(n,t,i,r){return{restrict:"A",link:function(i,u){i.topArea=$('<div class="scroll-area-top"><\/div>');i.bottomArea=$('<div class="scroll-area-bot"><\/div>');i.bothAreas=i.topArea.add(i.bottomArea);$(u).append(i.bothAreas);i.bothAreas.hide();$(document).on("dragstart",function(n){$(n.target).attr("draggable")&&i.bothAreas.show()});$(document).on("dragend",function(){i.bothAreas.hide()});i.topArea.on("dragenter",function(){i.scroll(-i.getScrollableHeight())});i.bottomArea.on("dragenter",function(){i.scroll(i.getScrollableHeight())});i.bothAreas.on("dragleave",function(){n.cancelAnimationFrame(i.animationFrameId);i.animationFrameId=null});i.getScrollableHeight=function(){var n,t;return n=document.documentElement,t=document.body,Math.max(n.clientHeight,n.scrollHeight,n.offsetHeight,t.scrollHeight,t.offsetHeight)};i.scroll=function(u){function s(h){var c,l;o=o||h;c=h-o;c<f?(l=r.linear(c,e,u,f),t.context.body.scrollTop=l,i.animationFrameId=n.requestAnimationFrame(s)):(t.context.body.scrollTop=e+u,i.animationFrameId=null)}var f,e,o;(f=Math.abs(u*2),e=n.scrollY,i.animationFrameId)||(i.animationFrameId=n.requestAnimationFrame(s))}}}}]),function(n){function a(h){var c,a;if(h=h||{},h.enableEnterLeave=!0,i=navigator.userAgent.match(/OS [1-4](?:_\d+)+ like Mac/)?"page":"client",a=function(){var n=document.createElement("div");return"draggable"in n||"ondragstart"in n&&"ondrop"in n},c=Modernizr.touchevents&&!a()||/Mobile|iPad|iPhone|iPod|Android|Windows\sPhone|KFAPWI/.test(navigator.userAgent),t((c?"":"not ")+"patching html5 drag drop"),c){if("ontouchstart"in window)e="touchstart",r="touchmove",u="touchend",f="touchcancel";else if(window.navigator.pointerEnabled)e="pointerdown",r="pointermove",u="pointerup",f="pointercancel";else if(window.navigator.msPointerEnabled)e="MSPointerDown",r="MSPointerMove",u="MSPointerUp",f="MSPointerCancel";else return;h.enableEnterLeave||(s.prototype.synthesizeEnterLeave=l);n.addEventListener(e,v);window.addEventListener("scroll",function(){console.log("OnScroll");o=!0})}}function s(n,i){this.dragData={};this.dragDataTypes=[];this.dragImage=null;this.dragImageTransform=null;this.dragImageWebKitTransform=null;this.el=i||n.target;t("dragstart");this.dispatchDragStart();this.createDragImage();this.listen()}function v(e){function b(n){n&&n.changedTouches&&n.changedTouches[0]&&(c=n.changedTouches[0],g=c[i+"X"],nt=c[i+"Y"])}function l(n){a=!1;o=!1;h&&l&&h.removeEventListener(n,l)}var h,a,c,k,d,g,nt,v,tt,it;window.dragDropInstance||(tt=10,it=100,h=e.target,a=!0,c=e.changedTouches[0],k=c[i+"X"],d=c[i+"Y"],h.addEventListener(r,b),h.addEventListener(u,l),h.addEventListener(f,l),setTimeout(function(){var anchors,i;if(v=w(k,d,g,nt),t("touchDisplacement: "+v),a&&v<tt){y();do if(h.getAttribute&&h.getAttribute("draggable")==="true"){if(h.tagName.toLowerCase()!=="a"||eval($(h).attr("draggable")))for(anchors=$(h).find("a"),i=0;i<anchors.length;i++)anchors[i].disabled="disabled";else e.preventDefault();window.dragDropInstance=new s(e,h)}while((h=h.parentNode)&&h!==n.body)}setTimeout(function(){p()},100);h&&b&&h.removeEventListener(r,b);window.dragDropInstance=null},it))}function y(){$("html, body").animate({scrollTop:"+=1"},1)}function p(){$("html, body").removeAttr("style")}function w(n,t,i,r){var u,f,e,o;return u=n||0,e=i||n||0,f=t||0,o=r||t||0,Math.abs(Math.sqrt(Math.pow(e-u,2)+Math.pow(o-f,2)))}function c(t,r){var u=r.changedTouches[0];return n.elementFromPoint(u[i+"X"],u[i+"Y"])}function h(n,t,i,r){return r&&(i=i.bind(r)),n.addEventListener(t,i),{off:function(){return n.removeEventListener(t,i)}}}function b(n,t,i,r){function u(r){return i(r),n.removeEventListener(t,u)}return r&&(i=i.bind(r)),n.addEventListener(t,u)}function t(n){console.log(n)}function l(){}var i,e,r,u,f,o;t=l;s.prototype={listen:function(){function l(n){o=!1;this.dragend(n,n.target);i.call(this)}function i(){return o=!1,t("cleanup"),this.dragDataTypes=[],this.dragImage!=null&&(this.dragImage.parentNode.removeChild(this.dragImage),this.dragImage=null,this.dragImageTransform=null,this.dragImageWebKitTransform=null),this.el=this.dragData=null,[e,s,c].forEach(function(n){return n.off()})}var e=h(n,r,this.move,this),s=h(n,u,l,this),c=h(n,f,i,this)},move:function(i){i.cancelable&&(i.stopPropagation(),i.preventDefault()),function(n,i,r){var u,f;u=n[i].pageX-parseInt(r.dragImage.offsetWidth,10)/2;f=n[i].pageY-parseInt(r.dragImage.offsetHeight,10)/2;r.translateDragImage(u,f,function(){t("Translation is done")})}(i.changedTouches,i.changedTouches.length-1,this);this.synthesizeEnterLeave(i);var r=n.createEvent("Event");r.initEvent("drag",!0,!0);this.el.dispatchEvent(r)},hideDragImage:function(){this.dragImage&&this.dragImage.style.display!="none"&&(this.dragImageDisplay=this.dragImage.style.display,this.dragImage.style.display="none")},showDragImage:function(){this.dragImage&&(this.dragImage.style.display=this.dragImageDisplay?this.dragImageDisplay:"block")},translateDragImage:function(n,i,r){function l(a){var v,y;a>=e?(f.style["-webkit-transform"]=f.style.transform="translate3d("+n+"px,"+i+"px, 0)",u.animationFrameId=null,typeof r=="function"&&r()):(v=o+a/e*h,y=s+a/e*c,f.style["-webkit-transform"]=f.style.transform="translate3d("+v+"px,"+y+"px, 0)",t("Requesting next frame"),u.animationFrameId=window.requestAnimationFrame(l))}var u,f,e,o,s,h,c;u=this;f=u.dragImage;e=1;o=$(f).offset().left;s=$(f).offset().top;h=n-o;c=i-s;u.animationFrameId&&(window.cancelAnimationFrame(u.animationFrameId),t("Cancelling animation with id: "+u.animationFrameId));u.animationFrameId=window.requestAnimationFrame(l)},synthesizeEnterLeave:function(n){this.hideDragImage();var t=c(this.el,n);this.showDragImage();t!=this.lastEnter&&(this.lastEnter&&this.dispatchLeave(n),this.lastEnter=t,this.lastEnter&&this.dispatchEnter(n));this.lastEnter&&this.dispatchOver(n)},dragend:function(i){var r,u;t("dragend");this.lastEnter&&this.dispatchLeave(i);this.hideDragImage();r=c(this.el,i);this.showDragImage();r?(t("found drop target "+r.tagName),this.dispatchDrop(r,i)):t("no drop target");u=n.createEvent("Event");u.initEvent("dragend",!0,!0);this.el.dispatchEvent(u)},dispatchDrop:function(r,u){var f=n.createEvent("Event");f.initEvent("drop",!0,!0);var e=u.changedTouches[0],o=e[i+"X"],s=e[i+"Y"];f.offsetX=o-r.x;f.offsetY=s-r.y;f.dataTransfer={types:this.dragDataTypes,getData:function(n){return this.dragData[n]}.bind(this)};f.preventDefault=function(){}.bind(this);b(n,"drop",function(){t("drop event not canceled")},this);r.dispatchEvent(f)},dispatchEnter:function(t){var i=n.createEvent("Event"),r;i.initEvent("dragenter",!0,!0);i.dataTransfer={types:this.dragDataTypes,getData:function(n){return this.dragData[n]}.bind(this)};r=t.changedTouches[0];i.pageX=r.pageX;i.pageY=r.pageY;this.lastEnter.dispatchEvent(i)},dispatchOver:function(t){var i=n.createEvent("Event"),r;i.initEvent("dragover",!0,!0);i.dataTransfer={types:this.dragDataTypes,getData:function(n){return this.dragData[n]}.bind(this)};r=t.changedTouches[0];i.pageX=r.pageX;i.pageY=r.pageY;this.lastEnter.dispatchEvent(i)},dispatchLeave:function(t){var i=n.createEvent("Event"),r;i.initEvent("dragleave",!0,!0);i.dataTransfer={types:this.dragDataTypes,getData:function(n){return this.dragData[n]}.bind(this)};r=t.changedTouches[0];i.pageX=r.pageX;i.pageY=r.pageY;this.lastEnter.dispatchEvent(i);this.lastEnter=null},dispatchDragStart:function(){var t=n.createEvent("Event");t.initEvent("dragstart",!0,!0);t.dataTransfer={setData:function(n,t){return this.dragData[n]=t,this.dragDataTypes.indexOf(n)==-1&&(this.dragDataTypes[this.dragDataTypes.length]=n),t}.bind(this),dropEffect:"move"};this.el.dispatchEvent(t)},createDragImage:function(){t("create drag image");this.dragImage=this.el.cloneNode(!0);this.dragImage.setAttribute("class","shim-drag-clone");this.dragImage.style.height=this.el.clientHeight+"px";this.dragImage.style.width=this.el.clientWidth+"px";this.dragImage.style.opacity="0.5";this.dragImage.style.position="absolute";this.dragImage.style.left="0px";this.dragImage.style.top="0px";this.dragImage.style["z-index"]="999999";this.dragImage.style["pointer-events"]="none";this.dragImage.style["-webkit-transform"]=this.dragImage.style.transform="translate3d("+$(this.el).offset().left+"px,"+$(this.el).offset().top+"px, 0)";n.body.appendChild(this.dragImage)}};a({})}(document);angular.module("qfxPlanApp",["qfxWebFrameworkApp"]);angular.module("qfxPlanApp").controller("QfxPlansController",["$scope","qfxPlansService",function(n,t){t.getPlans(n.promocode,n.redemptioncode).then(function(t){n.plans=t});n.init=function(t,i){n.promocode=t;n.redemptioncode=i};n.toggleNote=function(){$(".icon-down-arrow",event.target).toggleClass("icon-up-arrow");$("#freeTrialDetails").slideToggle("fast")}}]);angular.module("qfxPlanApp").directive("qfxPlans",["jQuery",function(n){return{templateUrl:"views/tpl/qfx-plans.tpl.html",restrict:"E",link:function(t){t.showTrialNote=!0;t.selectPlan=function(i){var r=i.target.attributes["data-offer-url"];r&&r.value?window.location=r.value:(t.activePlanType!=n(i.currentTarget).data("option")&&n(i.currentTarget).data("hassubplan")?(t.activePlanType=null,t.activePlanType=n(i.currentTarget).data("option")):t.activePlanType=null,t.toggleFreeTrialModal(n(i.currentTarget)))};t.isExpanded=function(n){return n===t.activePlanType};t.toggleFreeTrialModal=function(i){t.showTrialNote=n(i).data("option")=="premium"?!1:!0}}}}]);angular.module("qfxPlanApp").service("qfxPlansService",["$http","$q","$log","qfxAppConfig","$location",function(n,t,i,r,u){var f=this;return f.websiteFacadeUrl=r.websiteFacadeUrl,f.getPlans=function(r,e){var o,s;return o=t.defer(),r||(r=""),e||(e=""),s=f.websiteFacadeUrl+"/GetPlans?planName="+u.search().plan+"&promocode="+r+"&redemptioncode="+e,n.get(s,{withCredentials:!0}).success(function(n){i.debug("Successfully fetched plans");o.resolve(n)}).error(function(){i.debug("Failed to fetch plans");o.reject(data)}),o.promise},{getPlans:f.getPlans}}]);angular.module("qfxPlanApp").directive("qfxPlanChoices",function(){return{restrict:"A",templateUrl:"views/tpl/qfx-plan-choices.tpl.html",link:function(){}}});angular.module("qfxPlanApp").directive("qfxPlanGroupSelector",function(){return{templateUrl:"views/tpl/qfx-plan-group-selector.tpl.html",restrict:"E",link:function(){}}});angular.module("qfxPlanApp").run(["$templateCache",function(n){"use strict";n.put("views/tpl/qfx-plan-choices.tpl.html",'<!-- DVD and bluray --> <div class="type au-content {{plan.PlanType}}" ng-repeat="plan in plans" ng-if="plan.SubPlans.length && isExpanded(plan.PlanType)"> <h3>{{plan.Heading}}<\/h3> <div class="plan-content"> <div class="plan-row" ng-repeat="subplan in plan.SubPlans" ng-class="($index + 1 == plan.SubPlans.length) ? \'last\' : \'\'"> <div class="price" ng-repeat="planFee in subplan.PlanFees"> <div class="price plan-price"> <div class="dollar-sign"> $ <\/div> <div class="dollars"> {{planFee.PlanDollarFee}} <\/div> <div class="cents"> .{{planFee.PlanCentFee}} <\/div> <div class="period" ng-if="planFee.FeePeriod"> /{{planFee.FeePeriod}} <\/div> <\/div> <\/div> <div class="plan-icon"> <img ng-src="{{subplan.PlanIconUrl}}" alt="{{plan.Description}}"> <\/div> <div class="details" ng-bind-html="subplan.Description | trustHtml"><\/div> <div class="buttons"><a href="javascript:;" data-offer-url="{{subplan.OfferUrl}}" ng-click="selectPlan($event)" class="button cta">{{subplan.ButtonText}}<\/a><\/div> <\/div> <\/div> <\/div>');n.put("views/tpl/qfx-plan-group-selector.tpl.html",'<div class="plan-description"> <h3>Subscription Streaming - 1 month free trial<\/h3> <div class="description">Stream one Premium movie rental plus member discount on selective Premium titles for $5/mo<\/div> <\/div>');n.put("views/tpl/qfx-plans.tpl.html",'<!-- Options --> <div class="options" qfx-sub-plans="{{loadSubPlans()}}" ng-class="activePlanType ? \'subplans-active\' : \'\'"> <div class="option {{plan.PlanType}}" data-option="{{plan.PlanType}}" ng-repeat="plan in plans" ng-class="isExpanded(plan.PlanType) ? \'expand\' : \'shrink\'" data-item-expanded="isExpanded(plan.PlanType)" data-hassubplan="{{plan.SubPlans.length}}" ng-click="selectPlan($event)" qfx-trial-note="{{trialNote(showTrialNote)}}"> <h3>{{plan.Heading}}<\/h3> <p ng-bind-html="plan.Description | trustHtml"><\/p> <div class="main-price"> <div class="top-plan"> <div class="pricing" ng-class="($index + 1 == plan.PlanFees.length) ? \'last\' : \'\'" ng-repeat="planFee in plan.PlanFees"> <div class="from" ng-bind-html="planFee.FeeDescription | trustHtml"><\/div> <div class="price option-price single"> <div class="dollar-sign single"> $ <\/div> <div class="dollars single"> {{planFee.PlanDollarFee}} <\/div> <div class="cents"> .{{planFee.PlanCentFee}} <\/div> <div class="period" ng-if="planFee.FeePeriod"> /{{planFee.FeePeriod}} <\/div> <\/div> <\/div> <a href="javascript:;" class="button cta" data-offer-url="{{plan.OfferUrl}}" data-wording="{{plan.Heading}}">{{plan.ButtonText}}<\/a> <div class="joiner-container" ng-if="isExpanded(plan.PlanType)"> <div class="joiner">&nbsp;<\/div> <\/div> <\/div> <div class="bottom-plan" qfx-plan-choices><\/div> <\/div> <\/div> <\/div> <div id="planChoices" class="plan-choices" ng-if="activePlanType" qfx-plan-choices><\/div>')}]);angular.module("qfxSiteWebApp",["qfxWebFrameworkApp","qfxApiClientMemberApp","qfxApiClientDvdApp","qfxApiClientStreamingApp","qfxApiClientDiscoveryApp","qfxApiClientOffersApp","qfxAddressApp","qfxCoverApp","qfxLayoutApp","qfxNotificationApp","qfxDragAndDropApp","qfxPlanApp","ngResource"]).config(["$httpProvider","$locationProvider",function(n,t){n.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";n.defaults.withCredentials=!0;n.interceptors.push("cacheBusterInterceptor");t.html5Mode({enabled:!0,requireBase:!1,rewriteLinks:!1})}]).run(["$document",function(n){window&&window.FastClick&&window.FastClick.attach(n[0].body)}]);angular.module("qfxSiteWebApp").controller("QfxRateRecommendController",["$scope","RecommendationsService","memberRatingService","$rootScope","browserHistoryService","$timeout",function(n,t,i,r,u,f){n.recommended={Items:[]};n.itemToRate=null;n.recommendedTitles={Items:[]};n.showRateRecommend=undefined;n.skipDigitalCodes=[];n.itemRated=!1;r.$on("qfx-ratingsent-event",function(){n.itemRated=!0;n.showCarousel();n.saveState()});n.dontRate=function(){var t=n.itemToRate.CatalogueItem.DigitalCode;n.reset();i.rateCatalogueItem(t,0).then(function(){n.loadNext()},function(){n.showRateRecommend=!1})};n.skip=function(){var t=n.itemToRate.CatalogueItem.DigitalCode;n.skipDigitalCodes.indexOf(t)==-1&&n.skipDigitalCodes.push(t);n.loadNext()};n.next=function(){n.loadNext()};n.reset=function(){n.itemToRate&&(n.itemToRate=null,n.recommended.Items=[],n.recommendedTitles.Items=[],n.itemRated=!1,n.showRateRecommend&&n.resetCarousel&&n.resetCarousel())};n.loadNext=function(){n.reset();t.getRateAndRecommend(null,null,n.skipDigitalCodes).then(function(t){n.itemToRate=t.itemToRate;n.recommendedTitles=t.recommendedTitles;n.showRateRecommend===undefined?n.showRateRecommend=n.itemToRate?!0:!1:n.itemToRate||(n.complete=!0,f(function(){n.showRateRecommend=!1},3e3));n.clearState();n.initialise&&n.initialise()})};n.saveState=function(){u.saveState("RateRecommend",{itemToRate:n.itemToRate,recommendedTitles:n.recommendedTitles,recommended:n.recommended,showRateRecommend:n.showRateRecommend,itemRated:n.itemRated,skipDigitalCodes:n.skipDigitalCodes})};n.clearState=function(){u.clearState("RateRecommend")};var e=u.getState("RateRecommend");e?(n.itemToRate=e.itemToRate,n.recommendedTitles=e.recommendedTitles,n.recommended=e.recommended,n.showRateRecommend=e.showRateRecommend,n.itemRated=e.itemRated,n.skipDigitalCodes=e.skipDigitalCodes):n.loadNext()}]);angular.module("qfxSiteWebApp").controller("RootQueueController",["$scope","$location","$log","myDiscsService","dvdApiService","Members","qfxModalService","MemberSubscriptions","qfxUserContext",function(n,t,i,r,u,f,e,o,s){n.root={};n.root.discsReturning=0;r.fetchDiscs("prenotified",1,10).then(function(t){n.root.discsReturning=t.Items.length});n.$on("qfx:myDiscs:discsReturningCount",function(t,i){n.root.discsReturning=i&&i.count||0});n.$on("qfx:tabs:activated",function(t,i){var r=i&&typeof i.label=="string"?i.label.toLowerCase():"";n.root.quicktip=r.indexOf("returning")>=0||r.indexOf("history")>=0?"Quicktip: tell us what you like so we can get it right! The more movies and TV shows you rate, the more personalised your recommendations will be.":r.indexOf("kids")>=0?'Quicktip: you can change your ratio of kids&apos; to grown-up disc deliveries anytime you like. Kid-free week coming up? Let us know through your <a href="/MyAccount/QueueSettings">"Queue Settings"<\/a> and we&apos;ll be sure to only send grown-up DVDs until you tell us otherwise.':r.indexOf("reserved")>=0?"Quicktip: movies and TV shows in your Reserved Queue will automatically move into your main Queue as soon as they become available.":"Quicktip: you can tell us what you&apos;d like to receive next by moving movies and TV shows to the top of your Queue. To reorder, simply drag and drop or click on the three dots in the top left corner of the cover and select &apos;Move to top&apos;. All done!"});n.activeTab=t.search().tab;n.fetchingQueues=!0;f.then(function(t){t&&u.getQueues().then(function(t){n.queues=t.Items},function(t){n.errorFetchingQueues=!0;i.error("MyQueue error fetching queues: "+t)}).finally(function(){n.fetchingQueues=!1})},function(t){n.memberError=!0;i.error("MyQueue error fetching member: "+t)});o.then(function(){n.hasRentalAccess=s.hasDiscRentalAccess()});n.showAllocationModal=function(t){e.displayModal({template:"queue-allocation-modal",id:"queue-allocation-modal",queues:n.queues,openFrom:t.target})}}]);angular.module("qfxSiteWebApp").directive("qfxSocialLoginIcon",["qfxAppConfig",function(n){return{templateUrl:"views/tpl/qfx-social-login-icon.tpl.html",restrict:"E",scope:{qfxDataIconOnly:"@qfxDataIconOnly",qfxSocialLoginCallbackUrl:"@qfxSocialLoginCallbackUrl"},link:function(t){t.isDataIconOnly=function(){return t.qfxDataIconOnly};var i={};$LRIC.util.ready(function(){$LRIC.util.tmpl=function r(n,t){var u=/\W/.test(n)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+n.replace(/[\r\t\n]/g," ").split("<#").join("\t").replace(/((^|#>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)#>/g,"',$1,'").split("\t").join("');").split("#>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):i[n]=i[n]||r($LRIC.util.elementById(n).innerHTML);return t?u(t):u};var t={};t.apikey=n.loginRadiusApiKey;t.templatename="loginradiuscustom_tmpl";$LRIC.renderInterface("interface_container",t)})}}}]);angular.module("qfxSiteWebApp").directive("qfxRateRecommend",["resize","$timeout",function(n,t){return{templateUrl:"views/tpl/qfx-rate-recommend.tpl.html",restrict:"E",link:function(i,r){i.initialise=function(){var n=$(r).find(".rate-rec .sub-section");i.messageContainerStyle={height:n.innerHeight(),width:n.innerWidth(),position:"relative"};i.messageStyle={}};i.showCarousel=function(){var t=$(r).find(".feature-container"),u,f;t.is(".complete")||(u=t.find(".carousel-container").outerHeight()>0,f=".instructions",t.find(".carousel-container").is(":visible")&&u||(f=".lead-area, .instructions"),t.find(f).fadeOut(500,function(){t.addClass("complete");u&&(t.find(".lead-area").css("display",""),$(".instructions").fadeIn(500));i.recommended=i.recommendedTitles;i.$apply();n.trigger(i);t.find(".carousel-container .cover").css("top","100%");var r=100,f=1e3;t.find(".carousel-container .cover").each(function(n){var t=$(this);setTimeout(function(){t.transition({top:0},f,"easeInOutBack")},r*n)})}))};i.resetCarousel=function(){var n=$(r).find(".feature-container"),t,u;n.is(".complete")&&(t=n.find(".carousel-container").outerHeight()>0,u=".instructions",(n.find(".carousel-container").is(":visible")||!t)&&(u=".lead-area, .instructions"),n.find(u).fadeOut(500,function(){n.removeClass("complete");t&&(n.find(".lead-area").css("display",""),$(".instructions").fadeIn(500));i.recommended=[];i.$apply()}))};i.$watch(function(n){return n.itemRated},function(n){n&&t(function(){i.showCarousel()},300)})}}}]);angular.module("qfxSiteWebApp").directive("qfxHeightOffset",function(){return{restrict:"A",require:"?^^qfxHeightOffsetAdvertiser",link:function(n,t,i,r){r&&r.addHeightOffset(t[0].clientHeight)}}});angular.module("qfxSiteWebApp").directive("qfxHeightOffsetAdvertiser",[function(){return{restrict:"A",controller:["$scope",function(n){var t=this;return n.heightOffset=0,t.addHeightOffset=function(t){n.heightOffset+=t},t.getHeightOffset=function(){return n.heightOffset},{addHeightOffset:t.addHeightOffset,getHeightOffset:t.getHeightOffset}}]}}]);angular.module("qfxSiteWebApp").directive("qfxShyComponent",["$window","$anchorScroll","$animate","$log","resize","scrollPosition",function(n,t,i,r){return{restrict:"A",require:"?^^qfxHeightOffsetAdvertiser",link:function(u,f,e,o){u.assessHeight=function(){f[0].clientHeight>n.document.documentElement.clientHeight/2?(t(),i.removeClass(f,"shy-active"),i.removeClass(f,"being-shy"),u.activatable=!1):(u.activatable=!0,u.activationY=f[0].offsetTop,o&&(u.activationY+=o.getHeightOffset()),Math.max(u.activationY,0),u.deactivationY=f[0].offsetTop,o&&(u.deactivationY-=o.getHeightOffset()),Math.max(u.deactivationY,0))};u.assessHeight();u.$on("resize",function(){u.assessHeight();r.debug("resize fired")});u.$on("qfx:scroll",function(n,t){u.activatable&&(t.direction==="up"?(t.currentY<=u.deactivationY&&(u.active=!1,i.removeClass(f,"shy-active")),i.removeClass(f,"being-shy")):(t.currentY>=u.activationY&&(u.active=!0,i.addClass(f,"shy-active")),i.addClass(f,"being-shy")),u.$apply())})}}}]);angular.module("qfxSiteWebApp").directive("qfxTransactionHistoryInvoice",["$location","qfxCmsService",function(n,t){return{templateUrl:"views/tpl/qfx-transaction-history-invoice.tpl.html",restrict:"E",scope:{qfxInvoice:"@qfxInvoice"},link:function(i){i.invoice=angular.fromJson(i.qfxInvoice);i.siteUrl=n.host();t.getResourceValue("CompanyTradingName").then(function(n){i.companyTradingName=n});t.getResourceValue("CompanyTradingIdentity").then(function(n){i.companyTradingIdentity=n})}}}]);angular.module("qfxSiteWebApp").directive("qfxCreditHistoryInvoice",[function(){return{templateUrl:"views/tpl/qfx-credit-history-invoice.tpl.html",restrict:"E",scope:{qfxInvoice:"@qfxInvoice"},link:function(n){n.invoice=angular.fromJson(n.qfxInvoice)}}}]);angular.module("qfxSiteWebApp").directive("qfxViewingOptions",function(){return{templateUrl:"views/tpl/qfx-viewing-options.tpl.html",restrict:"E",scope:!0,link:function(){}}});angular.module("qfxSiteWebApp").service("qfxPurchasingService",["$q","$http","$log","qfxAppConfig",function(n,t,i,r){var u=this;return u.personalisedPricing=function(u){var f,e;return f=n.defer(),e=r.websiteFacadeUrl+"/purchasing/products/"+u+"?siteType="+r.applicationName,t.get(e,{withCredentials:!0,cache:!1}).success(function(n){i.debug("qfxPurchasingService: Successfully fetched personalised pricing for "+u);f.resolve(n)}).error(function(n,t){i.debug("qfxPurchasingService: Failed to fetched personalised pricing for "+u,n);f.reject("qfxPurchasingService: Failed to fetch personalised pricing for "+u+" with status code: "+t+", Returned data: "+n)}),f.promise},{personalisedPricing:u.personalisedPricing}}]);angular.module("qfxSiteWebApp").controller("QfxViewingOptionsController",["$scope","qfxPurchasingService","$window","underscore","$rootScope","$log","$location","qfxAppConfig","queryStringService","Members","MemberSubscriptions",function(n,t,i,r,u,f,e,o,s,h,c){n.canAddToPlaylist=o.applicationName.toLowerCase()==="streaming";n.canAddToQueue=o.applicationName.toLowerCase()==="dvd";n.displayProducts=o.applicationName.toLowerCase()!=="dvd";n.enableDiscCatalogue=o.enableDiscCatalogue;console.log("qs: ",e.search().catalogueFunction);n.catalogueFunction=e.search().catalogueFunction;n.unavailableMessage=function(){return"Sorry, this title is not available on Quickflix"+(o.applicationName.toLowerCase()=="streaming"?" Streaming.":o.applicationName.toLowerCase()=="dvd"?" DVD & Blu-Ray.":".")};n.isInitialised=function(){return n.productsInitialised&&n.subscriptionInfoInitialised};n.isAvailable=function(){return n.available!=undefined?n.available:(n.available=!1,n.streamingAvailable&&n.isInitialised()&&n.productGroups&&(n.available=!0),n.dvdAvailable&&(n.available=!0),n.available)};n.planSelection=function(t){var u=o.websiteRoot||"",r=t==="Subscription-Streaming"&&!n.enableDiscCatalogue?"Streaming":"Combo";h.then(function(n){var t=n?"/MyAccount/SelectPlan/"+r:"/Join/"+r;i.location.href=u+t+"?returnUrl="+e.absUrl()},function(){i.location.href=u+"/Join/"+r+"?returnUrl="+e.absUrl()})};h.then(function(t){t?(n.memberDetails=r.first(t.Items),f.debug(n.memberDetails)):f.error("Unauthenticated")},function(){});c.then(function(t){t?n.subscriptions=t.Items:f.error("No subscription details available")},function(n){f.error(n)}).finally(function(){n.subscriptionInfoInitialised=!0});n.displayProducts?t.personalisedPricing(n.digitalCode).then(function(t){if(t){n.catalogueItem=t.CatalogueItem;n.productGroups=t.ProductGroups;n.productsInitialised=!0;var i=r.max(n.productGroups,"MinDiscount");i.IsDiscounted&&i.MinDiscount&&u.$broadcast("qfx:discount-badge:display",i.MinDiscount)}},function(t){f.error("QfxViewingOptionsController: Failed to load personalised pricing",t);n.productsInitialised=!0}):n.productsInitialised=!0}]);angular.module("qfxSiteWebApp").directive("qfxDiscountBadge",function(){return{template:'<div class="discount-badge starburst" ng-if="discountAmount"><div class="prefix">Save<\/div><div class="discount-amount">{{discountAmount}}<span class="suffix">%<\/span><\/div><\/div>',restrict:"E",link:function(n){n.$on("qfx:discount-badge:display",function(t,i){n.discountAmount=i})}}});angular.module("qfxSiteWebApp").directive("qfxRibbon",function(){return{template:'<div class="ribbon-content">{{label}}<\/div>',restrict:"E",scope:{label:"@","class":"@",rotation:"@",disabled:"="},link:function(n,t,i){var r=n.disabled;"disabled"in i&&(n.disabled===undefined||n.disabled===null)&&(r=!0);t.addClass("ribbon ng-cloack"+(r==!0?" disabled":""));n.rotation||(n.rotation="45");t.find(".ribbon-content").css({"-webkit-transform":"rotate("+n.rotation+"deg)","-moz-transform":"rotate("+n.rotation+"deg)","-ms-transform":"rotate("+n.rotation+"deg)","-o-transform":"rotate("+n.rotation+"deg)"})}}});angular.module("qfxSiteWebApp").controller("DetailsController",["$scope","qfxModalService","$http","$log","$location","qfxSiteWebHeuristicsService","SimilarTitles","qfxAppConfig","qfxUrlBuilder",function(n,t,i,r,u,f,e,o,s){n.contentAvailability=f.getContentAvailability()||"";n.catalogueFunction=u.search().catalogueFunction;var h;n.$on("qfx:queue:statusChanged",function(){n.$broadcast("qfx:queue:checkStatus")});n.playTrailer=function(n,r){function u(){t.displayModal({heading:"Sorry,",message:"Unable to play the requested trailer at this point in time."})}i.get("/Details/GetTrailer?player="+n+"&videoId="+r,{withCredentials:!0}).success(function(n){n.Player&&n.Video?t.displayModal({template:"trailers",id:"trailerModal",player:n.Player,video:n.Video}):u()}).error(function(){u()})};h=n.$watch(function(){return n.digitalCode},function(t){t&&(n.itemLink=s.getItemLink(n.digitalCode,n.itemType,n.itemUrlName),e.load({digitalCode:t,contentAvailability:n.contentAvailability},function(i){n.$applyAsync(function(){n.carousel=i;n.CatalogueFunction="SimilarTitles";n.carousel.Url="/Catalogue/Items/"+t+"/Similar/"+n.contentAvailability+"?catalogueFunction=SimilarTitles";n.carousel.Title||(n.carousel.Title=i.Name)});h()}))});n.config=o}]);angular.module("qfxSiteWebApp").factory("qfxHttpHeaders",["$location","qfxPlatform","qfxAppConfig",function(n,t,i){if(i&&i.applicationName)return{"X-Requested-With":"XMLHttpRequest","X-QFX-DeviceType":"Web","X-QFX-Application":i.applicationName,"X-QFX-ApplicationVersion":"0.0.1","X-QFX-OS":t.os?t.os.toString():"","X-QFX-OSVersion":t.os?t.os.version:"","X-QFX-Manufacturer":t.manufacturer,"X-QFX-ModelCode":t.version};throw"Could not find websiteFacade.headers in config";}]);angular.module("qfxSiteWebApp").directive("qfxIvaPlayer",["$timeout",function(n){return{template:'<div id="{{playerId}}" class="iva-before-init"><\/div>',restrict:"E",scope:{videoId:"@"},link:function(t){t.playerId="IVA-"+t.videoId;n(function(){IVAPlayer.init(t.playerId,{customerid:22077,publishedid:t.videoId,reporttag:"not-set",autolist:"",minrate:"",maxrate:"",playerid:921})})}}}]);angular.module("qfxSiteWebApp").service("qfxSiteWebHeuristicsService",["qfxAppConfig",function(n){var t=this;return t.getContentAvailability=function(){var r=n.region,t=n.applicationName,i;return typeof r=="string"&&typeof t=="string"&&(r.toUpperCase()==="NZ"||t.toLowerCase()==="streaming"?i="streaming":t.toLowerCase()==="dvd"?i="disc":t.toLowerCase()==="public"&&(i="all")),i},{getContentAvailability:t.getContentAvailability}}]);angular.module("qfxSiteWebApp").filter("qfxCardExpiryFilter",function(){return function(n){if(!n&&!n.Month&&!n.Year)return"";var t=n.Year.toString().length==2?"20"+n.Year:n.Year;return n.Month>=1&&n.Month<=12?["January","February","March","April","May","June","July","August","September","October","November","December"][n.Month-1]+" "+t:n.Month+"/"+t}});angular.module("qfxSiteWebApp").controller("WebHeaderController",["$scope","$log","$location","$window","qfxAppConfig","Members","MemberSubscriptions","qfxHeaderService","qfxNotificationService","qfxUserContext","qfxUrlBuilder","memberAPIService",function(n,t,i,r,u,f,e,o,s,h,c,l){n.streamingSite=u&&u.applicationName&&u.applicationName.toLowerCase()=="streaming";n.dvdSite=u&&u.applicationName&&u.applicationName.toLowerCase()=="dvd";o.getNavItems(u.applicationName,u.region).then(function(t){n.navItems=t});o.getMegaMenus(u.applicationName,u.region).then(function(t){n.megaMenus=t});n.accountNavItem={id:"account",hasMegaMenu:!0};f.then(function(r){n.qfxMember=r;e.then(function(t){var f=h.hasStreamingAccess(),e=h.hasDiscRentalAccess(),o;u.region.toLowerCase()=="au"&&(u.applicationName.toLowerCase()=="streaming"&&(e||!f)?n.otherSite={label:"Go to DVD & Blu-ray","class":"dvd",url:function(){return i.absUrl().replace("//streaming","//dvd")}}:u.applicationName.toLowerCase()=="dvd"&&(f||!e)&&(n.otherSite={label:"Go to Streaming","class":"streaming",url:function(){return i.absUrl().replace("//dvd","//streaming")}}));o=t&&t.Items&&t.Items.length&&t.Items[0].Status?t.Items[0].Status:"";n.joinLink=c.getJoinLinkModel(r,o)},function(i){t.debug(i);n.joinLink=c.getJoinLinkModel(r)});n.streamingSite&&l.getTvodRights().then(function(t){n.movieCredits=t&&t.TotalCount||0},function(){});n.criticalNotifications=[];var f=n.$on("qfx:menuBar:activeItem",function(i,r){r&&r.activeItemId==="account"&&!n.alertsLoaded&&s.getMemberTrayAlerts().then(function(t){n.notifications=t;n.criticalNotifications=_.where(t,{AlertType:"Critical"})},function(n){t.error("Failed to load member notifications: "+n)}).finally(function(){n.alertsLoaded=!0;f()})})},function(i){t.debug(i);n.joinLink=c.getJoinLinkModel()}).finally(function(){n.memberChecked=!0});n.getSignInUrl=function(){var n=r.location.search;return r.location.pathname!="/Login"&&(n="?ReturnUrl="+r.location.pathname+encodeURIComponent(r.location.search)),"/Login"+n}}]);angular.module("qfxSiteWebApp").service("qfxHeaderService",["$q","qfxAppConfig",function(n){var t=this;return t.getNavItems=function(t,i){var r;if(r=n.defer(),i.toLowerCase()==="au")switch(t.toLowerCase()){case"dvd":r.resolve([{id:"home",name:"Home",href:"/Catalogue/Curations/DiscAU",classes:"logo",hasMegaMenu:!1},{id:"tv",name:"TV",href:"/Catalogue/Curations/DiscTVAU",classes:"icon tv",hasMegaMenu:!0},{id:"movies",name:"Movies",href:"/Catalogue/Curations/DiscMoviesAU",classes:"icon movies",hasMegaMenu:!0},{id:"my_queue",name:"My Queue",href:"/MyQueue",target:"_self",classes:"icon myqueue"}]);break;case"streaming":r.resolve([{id:"home",name:"Home",href:"/Catalogue/Curations/StreamingAU",classes:"logo",hasMegaMenu:!0},{id:"prem-movies",name:"Premium Movies",href:"/Catalogue/Curations/StreamingPremiumMoviesAU",classes:"icon prem-movies",hasMegaMenu:!0},{id:"bonus",name:"Bonus Movies",href:"/Catalogue/Curations/StreamingSubscriptionAU",classes:"icon bonus",hasMegaMenu:!1}]);break;case"public":default:r.resolve([{id:"home",name:"Home",href:"/",target:"_self",classes:"logo",hasMegaMenu:!1},{id:"streaming",name:"Streaming",href:"/Catalogue/Curations/StreamingPublicAU",classes:"icon streaming",hasMegaMenu:!1},{id:"dvd",name:"DVD & Blu-ray",href:"/Catalogue/Curations/DiscPublicAU",classes:"icon dvd",hasMegaMenu:!1}])}else switch(t.toLowerCase()){case"public":r.resolve([{id:"home",name:"Home",href:"/",target:"_self",classes:"logo",hasMegaMenu:!1},{id:"prem-movies",name:"Premium Movies",href:"/Catalogue/Curations/PublicPremiumMoviesNZ",classes:"icon prem-movies",hasMegaMenu:!1},{id:"bonus",name:"Bonus Movies",href:"/Catalogue/Curations/StreamingPublicSubscriptionNZ",classes:"icon bonus",hasMegaMenu:!1}]);break;case"streaming":default:r.resolve([{id:"home",name:"Home",href:"/Catalogue/Curations/StreamingNZ",classes:"logo",hasMegaMenu:!0},{id:"prem-movies",name:"Premium Movies",href:"/Catalogue/Curations/StreamingPremiumMoviesNZ",classes:"icon prem-movies",hasMegaMenu:!0},{id:"bonus",name:"Bonus Movies",href:"/Catalogue/Curations/StreamingSubscriptionNZ",classes:"icon bonus",hasMegaMenu:!1}])}return r.promise},t.getMegaMenus=function(i,r){var u;if(u=n.defer(),r.toLowerCase()==="au")switch(i.toLowerCase()){case"dvd":u.resolve([t.megaMenus.tv_dvd_au,t.megaMenus.movies_dvd_au]);break;case"streaming":u.resolve([t.megaMenus.home_streaming_au,t.megaMenus.movies_streaming_au])}else switch(i.toLowerCase()){case"streaming":u.resolve([t.megaMenus.home_streaming_nz,t.megaMenus.movies_streaming_nz])}return u.promise},t.megaMenus={home_streaming_au:{id:"home",navGroups:[{name:"Quick Links","class":"main",items:[{name:"Premium Movies ",href:"/Catalogue/Curations/StreamingPremiumMovies"},{name:"Free Bonus Content",href:"/Catalogue/Curations/StreamingSubscription"},{name:"Devices",href:"/Devices",target:"_self"},{name:"Help Centre",href:"/Help",target:"_self"}]}]},movies_streaming_au:{id:"prem-movies",heading:"New release movies & family favourites",navGroups:[{name:"Genres",items:[{name:"All Movies",href:"/Catalogue/Keywords/All/Streaming/Movies"},{name:"Action",href:"/Catalogue/Keywords/Action/Streaming/Movies"},{name:"Adventure",href:"/Catalogue/Keywords/Adventure/Streaming/Movies"},{name:"Animated",href:"/Catalogue/Keywords/Animated/Streaming/Movies"},{name:"Australian",href:"/Catalogue/Keywords/Australian/Streaming/Movies"},{name:"Comedy",href:"/Catalogue/Keywords/Comedy/Streaming/Movies"},{name:"Crime",href:"/Catalogue/Keywords/Crime/Streaming/Movies"},{name:"Disney",href:"/Catalogue/Keywords/Disney/Streaming/Movies"},{name:"Documentary",href:"/Catalogue/Keywords/Documentary/Streaming/Movies"},{name:"Drama",href:"/Catalogue/Keywords/Drama/Streaming/Movies"},{name:"Family",href:"/Catalogue/Keywords/Family/Streaming/Movies"},{name:"Fantasy",href:"/Catalogue/Keywords/Fantasy/Streaming/Movies"},{name:"Foreign",href:"/Catalogue/Keywords/Foreign/Streaming/Movies"},{name:"Horror",href:"/Catalogue/Keywords/Horror/Streaming/Movies"},{name:"Kids",href:"/Catalogue/Keywords/Kids/Streaming/Movies"},{name:"Romance",href:"/Catalogue/Keywords/Romance/Streaming/Movies"},{name:"Sci-Fi",href:"/Catalogue/Keywords/Sci-Fi/Streaming/Movies"},{name:"Thriller",href:"/Catalogue/Keywords/Thriller/Streaming/Movies"},{name:"War",href:"/Catalogue/Keywords/War/Streaming/Movies"},{name:"Western",href:"/Catalogue/Keywords/Western/Streaming/Movies"}]}]},tv_dvd_au:{id:"tv",heading:"TV without the interruptions",navGroups:[{name:"Quick Links","class":"main",items:[{name:"My Recommendations",href:"/Catalogue/Lists/RL-1/Disc/TV"},{name:"Latest TV",href:"/Catalogue/Lists/DL-914/Disc/TV"},{name:"Highly Rated",href:"/Catalogue/Lists/DL-2448/Disc/TV"},{name:"Top 100",href:"/Catalogue/Lists/DL-2450/Disc/TV"},{name:"Coming Soon",href:"/Catalogue/Lists/DL-2447/Disc/TV"}]},{name:"Genres",items:[{name:"All TV",href:"/Catalogue/Keywords/All/Disc/TV"},{name:"Animated",href:"/Catalogue/Keywords/Animated/Disc/TV"},{name:"Comedy",href:"/Catalogue/Keywords/Comedy/Disc/TV"},{name:"Crime",href:"/Catalogue/Keywords/Crime/Disc/TV"},{name:"Documentary",href:"/Catalogue/Keywords/Documentary/Disc/TV"},{name:"Drama",href:"/Catalogue/Keywords/Drama/Disc/TV"},{name:"Kids & Teens",href:"/Catalogue/Keywords/Kids/Disc/TV"},{name:"Reality",href:"/Catalogue/Keywords/Reality/Disc/TV"},{name:"Sci-Fi",href:"/Catalogue/Keywords/Sci-fi/Disc/TV"},{name:"Stand-up Comedy",href:"/Catalogue/Keywords/Stand-Up/Disc/TV"}]},{name:"Collections",items:[{name:"Blu-ray",href:"/Catalogue/Keywords/All/Disc-Bluray/TV"},{name:"ABC",href:"/Catalogue/Keywords/ABC/Disc/TV"},{name:"Best Of British",href:"/Catalogue/Keywords/BBC/Disc/TV"},{name:"Australian TV",href:"/Catalogue/Keywords/Australian/Disc/TV"},{name:"Foreign TV",href:"/Catalogue/Keywords/Foreign/Disc/TV"}]}]},movies_dvd_au:{id:"movies",heading:"New release movies & family favourites",navGroups:[{name:"Quick Links","class":"main",items:[{name:"My Recommendations",href:"/Catalogue/Lists/RL-1/Disc/Movies"},{name:"New Releases",href:"/Catalogue/Lists/DL-2440/Disc/Movies"},{name:"Highly Rated",href:"/Catalogue/Lists/DL-2439/Disc/Movies"},{name:"Top 100",href:"/Catalogue/Lists/DL-5/Disc/Movies"},{name:"Coming Soon",href:"/Catalogue/Lists/DL-2446/Disc/Movies"}]},{name:"Genres",items:[{name:"All Movies",href:"/Catalogue/Keywords/All/Disc/Movies"},{name:"Action",href:"/Catalogue/Keywords/Action/Disc/Movies"},{name:"Adventure",href:"/Catalogue/Keywords/Adventure/Disc/Movies"},{name:"Animated",href:"/Catalogue/Keywords/Animated/Disc/Movies"},{name:"Australian",href:"/Catalogue/Keywords/Australian/Disc/Movies"},{name:"Comedy",href:"/Catalogue/Keywords/Comedy/Disc/Movies"},{name:"Crime",href:"/Catalogue/Keywords/Crime/Disc/Movies"},{name:"Documentary",href:"/Catalogue/Keywords/Documentary/Disc/Movies"},{name:"Drama",href:"/Catalogue/Keywords/Drama/Disc/Movies"},{name:"Family",href:"/Catalogue/Keywords/Family/Disc/Movies"},{name:"Fantasy",href:"/Catalogue/Keywords/Fantasy/Disc/Movies"},{name:"Horror",href:"/Catalogue/Keywords/Horror/Disc/Movies"},{name:"Kids",href:"/Catalogue/Keywords/Kids/Disc/Movies"},{name:"Musicals",href:"/Catalogue/Keywords/Musicals/Disc/Movies"},{name:"Romance",href:"/Catalogue/Keywords/Romance/Disc/Movies"},{name:"Sci-Fi",href:"/Catalogue/Keywords/Sci-Fi/Disc/Movies"},{name:"Thriller",href:"/Catalogue/Keywords/Thriller/Disc/Movies"},{name:"War",href:"/Catalogue/Keywords/War/Disc/Movies"},{name:"Western",href:"/Catalogue/Keywords/Western/Disc/Movies"},{name:"World Cinema",href:"/Catalogue/Keywords/Foreign/Disc/Movies"}]},{name:"Collections",items:[{name:"Blu-ray",href:"/Catalogue/Keywords/All/Disc-Bluray/Movies"},{name:"Disney",href:"/Catalogue/Keywords/Disney/Disc/Movies"},{name:"Film Festivals",href:"/Catalogue/Lists/DL-1187/Disc/Movies"},{name:"In Cinemas",href:"/Catalogue/Lists/DL-296/Disc/Movies"},{name:"Queer Cinema",href:"/Catalogue/Lists/DL-1126/Disc/Movies"}]}]},home_streaming_nz:{id:"home",heading:"Welcome to Quickflix",navGroups:[{name:"Quick Links","class":"main",items:[{name:"Premium Movies ",href:"/Catalogue/Curations/StreamingPremiumMovies"},{name:"Free Bonus Content",href:"/Catalogue/Curations/StreamingSubscription"},{name:"Devices",href:"/Devices",target:"_self"},{name:"Help Centre",href:"/Help",target:"_self"}]}]},movies_streaming_nz:{id:"prem-movies",heading:"New release movies & family favourites",navGroups:[{name:"Genres",items:[{name:"All Movies",href:"/Catalogue/Keywords/All/Streaming/Movies"},{name:"Action",href:"/Catalogue/Keywords/Action/Streaming/Movies"},{name:"Adventure",href:"/Catalogue/Keywords/Adventure/Streaming/Movies"},{name:"Animated",href:"/Catalogue/Keywords/Animated/Streaming/Movies"},{name:"Comedy",href:"/Catalogue/Keywords/Comedy/Streaming/Movies"},{name:"Crime",href:"/Catalogue/Keywords/Crime/Streaming/Movies"},{name:"Disney",href:"/Catalogue/Keywords/Disney/Streaming/Movies"},{name:"Documentary",href:"/Catalogue/Keywords/Documentary/Streaming/Movies"},{name:"Drama",href:"/Catalogue/Keywords/Drama/Streaming/Movies"},{name:"Family",href:"/Catalogue/Keywords/Family/Streaming/Movies"},{name:"Fantasy",href:"/Catalogue/Keywords/Fantasy/Streaming/Movies"},{name:"Foreign",href:"/Catalogue/Keywords/Foreign/Streaming/Movies"},{name:"Horror",href:"/Catalogue/Keywords/Horror/Streaming/Movies"},{name:"Kids",href:"/Catalogue/Keywords/Kids/Streaming/Movies"},{name:"Kiwi",href:"/Catalogue/Keywords/New Zealand/Streaming/Movies"},{name:"Romance",href:"/Catalogue/Keywords/Romance/Streaming/Movies"},{name:"Sci-Fi",href:"/Catalogue/Keywords/Sci-Fi/Streaming/Movies"},{name:"Thriller",href:"/Catalogue/Keywords/Thriller/Streaming/Movies"},{name:"War",href:"/Catalogue/Keywords/War/Streaming/Movies"},{name:"Western",href:"/Catalogue/Keywords/Western/Streaming/Movies"}]}]}},{getNavItems:t.getNavItems,getMegaMenus:t.getMegaMenus}}]);angular.module("qfxSiteWebApp").controller("LoginPageController",["$scope","$filter","$log","memberAPIService",function(n,t,i,r){n.signInFailed=!1;n.signInFailedMessage="";n.signIn=function(u){if(u.preventDefault(),$("#signIn").validate().form()===!0){n.signInFailed=!1;n.signInFailedMessage="";var e=$("#signIn"),f=$(e).serializeArray();f=t("arrayToObject")(f);i.debug("SignInDetails:  Signin user...");r.login(f.LoginEmail,f.LoginPassword,f.RememberMe).then(function(n){i.debug("SignInDetails:  User successfully signedIn",n);window.location=f.ReturnUrl===undefined?"/":f.ReturnUrl},function(t){n.signInFailed=!0;n.signInFailedMessage=t&&t.Message?t.Message:"Failed to login: Unexpected Error";i.debug("SignInDetails Error:  ",t.Message)})}};n.signInAndLinkSocialMedia=function(u){if(u.preventDefault(),$("#signInAndLinkSocialMedia").validate().form()===!0){n.signInFailed=!1;n.signInFailedMessage="";var e=$("#signInAndLinkSocialMedia"),f=$(e).serializeArray();f=t("arrayToObject")(f);i.debug("signInAndLinkSocialMedia: Link and Signin user...");r.loginAndLinkSocialMedia(f.LoginEmail,f.LoginPassword,f.LoginRadiusId,f.LoginRadiusProvider).then(function(n){i.debug("SignInDetails:  User successfully signedIn and linked social media account",n);window.location=f.ReturnUrl===undefined?"/":f.ReturnUrl},function(t){n.signInFailed=!0;n.signInFailedMessage=t.Message;i.debug("SignInDetails Error:  ",t.Message)})}}}]);angular.module("qfxSiteWebApp").run(["$templateCache",function(n){"use strict";n.put("views/modals/trailers.html",'<div ng-switch="modal.player"> <video ng-switch-when="quickflix" ng-src="{{modal.video | trustUrl}}" controls autoplay><\/video> <qfx-iva-player ng-switch-when="iva" video-id="{{modal.video}}"><\/qfx-iva-player> <\/div>');n.put("views/tpl/qfx-add-to-playlist-viewing-option.tpl.html",'<div class="viewing-option"> <div class="description"> <p class="lead"><strong>Save<\/strong> to watch later<\/p> <\/div> <button class="button add-to-playlist icon-playlist" data-digitalcode="{{catalogueItem.DigitalCode}}" title="Add to Playlist" data-cataloguefuntionid="79" data-state="Ready">Add to Playlist<\/button> <\/div>');n.put("views/tpl/qfx-credit-history-invoice.tpl.html",'<section class="member-credit-details invoice-details"> <h1>Usage History<\/h1> <div id="UsageHistory" ng-if="invoice"> <p class="ref"><strong>Reference no.: <\/strong>{{invoice.MemberCreditTransaction.Id}}<\/p> <div> <dl> <dt>Created Date<\/dt> <dd ng-if="invoice.MemberCreditTransaction.CreatedDateTime">{{invoice.MemberCreditTransaction.CreatedDateTime | date:\'d MMM y\'}} <\/dd> <dt>Expiry Date<\/dt> <dd ng-if="invoice.MemberCreditTransaction.ExpiryDateTime">{{invoice.MemberCreditTransaction.ExpiryDateTime | date:\'d MMM y\'}} <\/dd> <dd ng-if="!invoice.MemberCreditTransaction.ExpiryDateTime">Never<\/dd> <dt>Original Value<\/dt> <dd><span>${{invoice.MemberCreditTransaction.Amount}}<\/span><\/dd> <dt>Remaining balance<\/dt> <dd><span>${{invoice.MemberCreditTransaction.Balance}}<\/span><\/dd> <\/dl> <\/div> <table ng-if="invoice.MemberCreditUsage && invoice.MemberCreditUsage.Items && invoice.MemberCreditUsage.Items.length"> <thead> <tr> <th>Invoice ID<\/th> <th>Purchase Date<\/th> <th>Description<\/th> <th>Amount<\/th> <\/tr> <\/thead> <tbody> <tr class="alternate" ng-repeat="credit in invoice.MemberCreditUsage.Items"> <td data-th="Invoice ID">{{credit.Id}}<\/td> <td data-th="Purchase Date">{{credit.CreatedDateTime | date:\'d MMM y\'}}<\/td> <td data-th="Description">{{credit.Description}}<\/td> <td data-th="Amount" class="amount"><span>${{credit.Amount}}<\/span><\/td> <\/tr> <\/tbody> <\/table> <div ng-if="!invoice.MemberCreditUsage || !invoice.MemberCreditUsage.Items || !invoice.MemberCreditUsage.Items.length">No Transactions<\/div> <\/div> <\/section> <a class="print cta button" href="javascript:window.print();">Print<\/a>');n.put("views/tpl/qfx-manage-queue-item.tpl.html",'<div class="manage-item-modal" ng-controller="ManageQueueItemController"> <h2>Manage options for {{coverViewModel.CatalogueItem.Details.Title}}<\/h2> <table> <tr> <td> <cover ng-if="coverViewModel" item="coverViewModel"><\/cover> <\/td> <td> <div ng-if="childItems.length"> <h4>Remove discs from the boxset<\/h4> <p>You can edit the items in the boxset easily by just removing individual discs you don\'t want delivered.<\/p> <div class="child-boxset-items"> <div class="boxset-section"> <div class="boxset-item" ng-repeat="childItem in childItems"> <span id="remove-boxset-item" class="cta button" ng-click="removeChildItem(childItem)">Remove Disc<\/span> <span><strong>{{childItem.Title}}<\/strong><\/span> <\/div> <\/div> <\/div> <\/div> <hr ng-if="childItems.length && numberOfTransferableQueues"> <span class="transfer-item cta button" ng-repeat="(queueId, queueName) in transferableQueues" ng-click="transferToQueue(queueId)">{{queueButtonLabel(queueName)}}<\/span> <\/td> <\/tr> <\/table> <\/div>');n.put("views/tpl/qfx-premium-pass-modal.tpl.html",'<div class="premium-pass-modal"> <h3>Premium Pass<\/h3> <p> Grab your Premium Pass today to access exclusive member-only discounts, like this on. Plus, a new release movie rental from our Premium collection every month. <\/p> <div class="side-lines"><span class="sub-text">Premium Pass Prices<\/span><\/div> <table class="product-group"> <tr class="product" ng-repeat="product in productGroup.Products"> <td>{{catalogueItem.Details.Title}} in {{product.Resolution}}<\/td> <td><span class="discount">{{product.Discount}}% OFF<\/span><\/td> <td> <div class="price"> <span class="amount">{{product.PersonalisedPrice |currency}}<\/span> <span class="discount-amount">You save {{(product.BasePrice - product.PersonalisedPrice) | currency}}<\/span> <\/div> <\/td> <\/tr> <\/table> <div class="controls"> <button class="cta" ng-click="planSelection(\'Premium\')">Grab my Premium Pass<\/button> <\/div> <\/div>');n.put("views/tpl/qfx-products-modal.tpl.html",'<div class="products-modal"> <h3> {{productGroup.Name}} <div class="description">{{productGroup.Description}}<\/div> <\/h3> <!--<h3>{{productGroup | qfxProductToAction}} {{catalogueItem.Details.Title}}<\/h3>--> <p ng-if="productGroup.Type == \'TVOD\' && !productGroup.IsDiscounted"> Rent now and stream on all of your connected devices. Super simple! <\/p> <p ng-if="productGroup.Type == \'EST\' && !productGroup.IsDiscounted"> Purchase once, yours forever. Stream and enjoy anytime, anywhere on your connected devices. <span ng-if="catalogueItem.Type.toLowerCase() == \'season\'">Buy the entire season and save!<\/span> <\/p> <p ng-if="productGroup.Type == \'TVOD\' && productGroup.IsDiscounted"> Save with your Premium Pass. Rent, stream and enjoy this {{catalogueItem | qfxCatalogueItemToType}} and many more with access to exclusive member-only discounts and your monthly new release movie credit. <\/p> <p ng-if="productGroup.Type == \'EST\' && productGroup.IsDiscounted"> Save on this {{catalogueItem | qfxCatalogueItemToType}} and more with your Premium Pass. Purchase once, yours forever! Stream anywhere, anytime on your connected devices. <\/p> <div class="side-lines"><span>Purchase Options<\/span><\/div> <table class="products"> <thead> <th><p>{{productGroup.PersonalisedPriceDescription}}<\/p><\/th> <\/thead> <tbody> <tr ng-repeat="product in productGroup.Products"> <td> <button class="cta purchase" ng-class="{ featured: productGroup.IsDiscounted }" ng-click="purchaseProduct(product)"> {{product | qfxProductToAction}} in {{product.Resolution}} {{product.PersonalisedPrice | currency}} <qfx-ribbon label="Save {{product.Discount}}%" class="discount-ribbon" data-rotation="35" data-disabled="(!product.Discount || (!product.IsDiscounted && product.Discount < 10))"><\/qfx-ribbon> <\/button> <\/td> <\/tr> <\/tbody> <\/table> <\/div>');n.put("views/tpl/qfx-rate-recommend.tpl.html",'<div class="feature-container double-lead rate-rec" ng-if="showRateRecommend"> <section class="sub-section pad"> <h2 ng-if="!complete">Rate to get recommendations<\/h2> <div class="lead-area" ng-if="!complete"> <div class="item"> <cover item="itemToRate" on-show-options="false" ng-if="itemToRate"> <\/cover> <\/div> <div class="text-wrapper"> <div class="rating-container" ng-if="itemToRate"> <h4 ng-if="!itemRated">Rate me:<\/h4> <h4 ng-if="itemRated">You rated:<\/h4> <qfx-star-rating digital-code="{{itemToRate.CatalogueItem.DigitalCode}}" average-rating="0" size="large"><\/qfx-star-rating> <\/div> <div class="instructions" ng-if="itemToRate" ng-if="!itemRated"> <div class="please-rate" data-fittext="0.08"> <p>What did you think of <br><b>{{itemToRate.CatalogueItem.Details.Title|truncate:40}}<\/b>?<\/p> <p class="sub-paragraph">Click on the stars to rate and we’ll suggest some more movies for you.<\/p> <ul class="options"> <li class="icon swap"><a href="" ng-click="skip()" title="I don’t want to rate this movie now but remind me again later.">Rate later<\/a> <\/li> <li class="icon cross"><a href="" ng-click="dontRate()" title="I don’t want to rate this movie and I don’t want to see it again.">No thanks<\/a><\/li> <\/ul> <\/div> <div class="rating-complete-message" ng-if="itemRated"> <p>Thanks for rating.<\/p> <p>Here’s some movies we think you might like<\/p> <ul class="options"> <li class="icon refresh"><a href="" ng-click="next()">Rate another<\/a><\/li> <\/ul> <\/div> <\/div> <div class="spinner" ng-if="!itemToRate && !complete"> <jqfx-spinner><\/jqfx-spinner> <\/div> <\/div> <\/div> <qfx-carousel id="recommendedTitles" qfx-data-carousel="recommended" scrolled-into-view ng-if="!complete" class="recommendations"><\/qfx-carousel> <div class="complete-message" ng-if="complete" ng-style="messageContainerStyle"> <!--<h3>Nothing left to rate!<\/h3>--> <p>Great work. You’re all caught up on your ratings!<\/p> <\/div> <\/section> <\/div>');n.put("views/tpl/qfx-social-login-icon.tpl.html",'<script type="text/html" id="loginradiuscustom_tmpl" ng-if="isDataIconOnly()"><a id="socialLoginIcon" href="javascript:void()" onclick="return $LRIC.util.openWindow(\'<#=Endpoint#>&callback=\' + window.location.protocol + \'//\' + window.location.host +\'/myaccount/loginradius/callback\')" class="login-radius <#=Name.toLowerCase()#>">\r\n    <span class="social-media <#=Name.toLowerCase()#>"><\/span>\r\n    <span class="label">Link your <#=Name#> Account<\/span>\r\n  <\/a><\/script>');n.put("views/tpl/qfx-subscribe-to-dvd-modal.tpl.html",'<div ng-controller="QfxSubscribeToDVDModalController"> <div class="wait-wrapper" ng-if="!offersLoaded || !catalogueItemLoaded"> <qfx-wait-indicator data-type="spinner"><\/qfx-wait-indicator> <\/div> <div ng-if="offersLoaded && catalogueItemLoaded"> <h2>Get {{catalogueItem.Name}} delivered to your letterbox!<\/h2> <p>{{catalogueItem.Name}} is available as part of our {{dvdPlan.PlanDetail.Type}} subscription. <\/p> <p>For one monthly price, you can choose from over 60,000 movie & TV rentals, including latest releases. <\/p> <p>No postage fees, no late fees, unlimited disc exchanges.<\/p> <ul class="plans"> <li class="dvd full-plan"> <!--<div ng-if="!addDvdToSubscription">--> <!--<div class="name">DVD & Blu-ray subscription<\/div>--> <!--<div class="price">--> <!--<p class="cents"><span>@Resource.DvdPlanPriceOption1<\/span><span class="period">MONTHLY<\/span><\/p>--> <!--<\/div>--> <!--<\/div>--> <div> <div class="name">{{dvdPlan.PlanDetail.Type}} subscription<\/div> <p ng-if="hasStreamingSubscription">Get the best of both worlds by adding a new DVD & Blu-ray subscription to your existing Streaming subscription at special pricing. Combo subscription start from<\/p> <p ng-if="!hasStreamingSubscription">When you sign up for a DVD & Blu-ray subscription, you get the first month free, then from<\/p> <div class="price"> <p class="cents"><span>{{dvdPlan.Payment.Amount}}<\/span><span class="period">MONTHLY<\/span><\/p> <\/div> <\/div> <a class="button cta" href="/MyAccount/SelectPlan/DVD" ng-if="!hasStreamingSubscription">Get Started<\/a> <a class="button cta" href="/MyAccount/SelectPlan/Combo" ng-if="hasStreamingSubscription">Update Subscription<\/a> <div style="margin-top: 1rem">P.S. We’ve added {{catalogueItem.Name}} to your Queue so, if you do take up a {{dvdPlan.PlanDetail.Type}} subscription, we can post it out to you <\/div> <\/li> <\/ul> <\/div> <\/div>');n.put("views/tpl/qfx-svod-subscription-modal.tpl.html",'<div ng-if="!hasStreamingAccess && hasDiscRentalAccess"> <h2>Stream {{catalogueItem.Details.Title}} on Quickflix Streaming<\/h2> <p>This {{catalogueItem | qfxCatalogueItemToType}} is available as part of our subscription streaming service.<\/p> <p>Having a streaming subscription would allow you to access movies and TV shows like this title on a wide range of internet connected <a href="/devices" target="_blank">devices<\/a> including your computer, tablet and gaming console. You could connect up to 6 devices and stream on 3 of them at once. <\/p> <ul class="plans"> <li class="stream full-plan"> <div class="name">Combo Plan<\/div> <p>Get the best of both worlds by adding a new streaming subscription to your existing DVD & Blu-ray subscription at special pricing.<\/p> <div class="price"><span class="message">Combo plans start from<\/span> <p class="cents"><span>{{streamingPlan.Payment.Amount | currency}}<\/span><span class="period">MONTHLY<\/span><\/p> <\/div> <button class="button cta" ng-click="planSelection(\'Dvd\')" target="_blank">Update Subscription<\/button> <\/li> <\/ul> <\/div> <div ng-if="!hasStreamingAccess && !hasDiscRentalAccess"> <h2>Stream {{catalogueItem.Details.Title}} on Quickflix Streaming<\/h2> <p>This {{catalogueItem | qfxCatalogueItemToType}} is available as part of our subscription streaming service.<\/p> <p>One monthly price gives you access to movies and TV shows on a wide range of connected devices including Smart TVs, game consoles, mobiles, tablets, PC & Mac and Chromecast. You can connect up to 6 devices and stream on 3 of them at the same time.<\/p> <ul class="plans"> <li class="stream full-plan"> <div class="name">Streaming Plan<\/div> <p>When you sign up to the streaming plan you get the first month free – that makes it 2 months for only {{streamingPlan.Payment.Amount | currency}}!<\/p> <div class="price"> <p class="cents"><span>{{streamingPlan.Payment.Amount | currency}}<\/span><span class="period">MONTHLY<\/span><\/p> <\/div> <button class="button cta" ng-click="planSelection(\'Streaming\')" target="_blank">Get Started<\/button> <\/li> <\/ul> <\/div>');n.put("views/tpl/qfx-transaction-history-invoice.tpl.html",'<section class="invoice-details" id="invoice-details"> <div class="error-message" ng-if="invoice.IsOutstanding"> <p> This transaction is currently outstanding due to <strong>{{invoice.ErrorDescription}}<\/strong>. <\/p> <p> Click <a class="paymentDetailsPopup" href="/PaymentDetails" target="_blank">here<\/a> to update your payment details. <\/p> <\/div> <div class="details-left"> <h3>Billed to:<\/h3> <p>{{invoice.BilledTo.FirstName}} {{invoice.BilledTo.LastName}}<\/p> <p>{{invoice.BilledTo.Address.AddressLine1}}<\/p> <p>{{invoice.BilledTo.Address.State}}, {{invoice.BilledTo.Address.Postcode}}<\/p> <\/div> <div class="details-right"> <div> <table> <tr> <th>Invoice Number:<\/th> <td>{{invoice.Id}}<\/td> <\/tr> <tr> <th>Date created:<\/th> <td>{{invoice.CreatedOn | date:\'d MMM y\'}}<\/td> <\/tr> <tr> <th>Paid date:<\/th> <td ng-if="invoice.PaidOn">{{invoice.PaidOn | date:\'d MMM y\'}}<\/td> <td ng-if="!invoice.PaidOn">Outstanding<\/td> <\/tr> <\/table> <\/div> <\/div> <div class="clear"><\/div> <div class="transactions"> <table> <thead> <tr class="header"> <th>Description<\/th> <th>Amount<\/th> <\/tr> <\/thead> <tbody> <tr ng-repeat="invoiceItem in invoice.InvoiceLines"> <td class="desc">{{invoiceItem.Description}}<\/td> <td class="showprice">${{invoiceItem.Amount}} {{invoiceItem.Currency}}<\/td> <\/tr> <tr class="total"> <td class="desc"><strong>TOTAL<\/strong><\/td> <td class="showprice"><strong>${{invoice.Amount}} {{invoice.Currency}}<\/strong><\/td> <\/tr> <\/tbody> <\/table> <table ng-if="invoice.PaidOn"> <thead> <tr class="header"> <th>Charged To<\/th> <th>Value<\/th> <\/tr> <\/thead> <tbody> <tr ng-repeat="transaction in invoice.Transactions"> <td class="chargedto">{{transaction.PaidWith}}<\/td> <td class="showprice">${{transaction.Amount}} {{transaction.Currency}}<\/td> <\/tr> <tr class="total"> <td class="chargedto"><strong>TOTAL<\/strong><\/td> <td class="showprice"><strong>${{invoice.Amount}} {{invoice.Currency}}<\/strong><\/td> <\/tr> <\/tbody> <\/table> <\/div> <div class="invoiceInformation"> <div> <p>Please retain for your records.<\/p> <p>Please see below for Terms and Conditions pertaining to this order.<\/p> <\/div> <div> <p>{{companyTradingName}}.<\/p> <p>{{companyTradingIdentity}}. Total includes GST.<\/p> <\/div> <div> <p> You can find the term of Sale and Sale Policies at <a href="/termsandconditions" target="_blank">{{siteUrl}}/termsandconditions<\/a> <\/p> <p>Quickflix respects your privacy.<\/p> <p> Information regarding your personal information can be viewed at <a href="/privacy" target="_blank">{{siteUrl}}/privacy<\/a> <\/p> <\/div> <p>Copyright &copy; 2014 {{companyTradingName}}. All rights reserved<\/p> <\/div> <\/section> <a class="print cta button" href="javascript:window.print();">Print<\/a>');n.put("views/tpl/qfx-viewing-options-products.tpl.html",'<div class="viewing-option product-group" ng-if="productGroups && catalogueItem" ng-repeat="productGroup in productGroups"> <div ng-switch on="productGroup.Type"> <!--Subscription Products--> <div ng-switch-when="Subscription-DVD" ng-if="enableDiscCatalogue"> <div class="description"> <p class="lead">Available with a <strong>DVD & Blu-ray<\/strong> subscription<\/p> <!--{{catalogueItem.DigitalCode | qfxDigitalCodeToSuffix | lowercase}}--> <!--<p class="discount-description">Available with a DVD & Blu-ray subscription<\/p>--> <\/div> <button class="button dvd icon-dvd cta product-group multiple" ng-click="planSelection(productGroup.Type)"> <span class="prefix">From<\/span>{{productGroup.MinPrice | currency}}<span class="suffix">/month<\/span> <\/button> <\/div> <div ng-switch-when="Subscription-Streaming"> <div class="description"> <p class="lead">Available with a <strong>Streaming<\/strong> subscription<\/p> <!--{{catalogueItem.DigitalCode | qfxDigitalCodeToSuffix | lowercase}}--> <!--<p class="discount-description">Available with a DVD & Blu-ray subscription<\/p>--> <\/div> <button class="button play icon-play cta product-group multiple" ng-click="planSelection(productGroup.Type)"> <span class="prefix">From<\/span>{{productGroup.MinPrice | currency}}<span class="suffix">/month<\/span> <\/button> <\/div> <!--SVOD--> <div ng-switch-when="SVOD"> <div class="description"> <p class="lead"><strong>{{productGroup | qfxProductToAction}}<\/strong> now {{catalogueItem.DigitalCode | qfxDigitalCodeToSuffix | lowercase}}<\/p> <\/div> <!--Play--> <qfx-play-button qfx-product-group="productGroup" qfx-catalogue-item="catalogueItem" qfx-subscriptions="subscriptions" qfx-catalogue-function="{{catalogueFunction}}"><\/qfx-play-button> <\/div> <!--EST/TVOD Products--> <div ng-switch-default> <div class="description"> <p class="lead"><strong>{{productGroup | qfxProductToAction}}<\/strong> and stream {{catalogueItem.DigitalCode | qfxDigitalCodeToSuffix | lowercase}} <span class="discount-message" ng-if="productGroup.IsDiscounted && productGroup.MinDiscount">with <strong>Premium Pass<\/strong><\/span> <\/p> <p class="discount-description" ng-if="productGroup.IsDiscounted && productGroup.MinDiscount">Premium Pass member discount {{productGroup.MinDiscount}}% off<\/p> <\/div> <!--Play--> <qfx-play-button qfx-product-group="productGroup" qfx-catalogue-item="catalogueItem" qfx-show-prefix="true" qfx-show-suffix="true" qfx-catalogue-function="{{catalogueFunction}}"><\/qfx-play-button> <\/div> <\/div> <\/div>');n.put("views/tpl/qfx-viewing-options.tpl.html",'<div class="viewing-options" ng-controller="QfxViewingOptionsController"> <jqfx-spinner ng-if="!isInitialised()" class="contained"><\/jqfx-spinner> <div ng-if="isInitialised() && isAvailable()"> <!--Products--> <div ng-if="displayProducts" ng-include="\'views/tpl/qfx-viewing-options-products.tpl.html\'"><\/div> <!--Add to playlist--> <div class="viewing-option add-to-playlist" ng-if="canAddToPlaylist"> <div class="description"> <p class="lead"><strong>Watch<\/strong> later<\/p> <\/div> <qfx-add-to-playlist-button qfx-digital-code="{{digitalCode}}" qfx-catalogue-function="{{catalogueFunction}}"><\/qfx-add-to-playlist-button> <\/div> <!--Add to Queue--> <div class="viewing-option add-to-queue" ng-if="canAddToQueue"> <div class="description"> <p class="lead">Available with a <strong>DVD & Blu-ray<\/strong> subscription<\/p> <\/div> <qfx-add-to-queue-button qfx-digital-code="{{digitalCode}}" qfx-catalogue-function="{{catalogueFunction}}"><\/qfx-add-to-queue-button> <\/div> <\/div> <!--Unavailable--> <div ng-if="isInitialised() && !isAvailable()" class="not-available-message">{{unavailableMessage()}}<\/div> <\/div>')}]);angular.module("qfxSiteWebApp").controller("CancelSubscriptionController",["$scope","offersApiService","qfxAppConfig",function(n,t){t.GetCancellationOffer().then(function(t){n.offer=t;n.bannerStyles(t)},function(){});n.hasOffer=function(){return n.offer};n.buttonText=function(){return n.hasOffer()?"Cancel, I don't want this great offer":"Cancel"};n.bannerStyles=function(t){if(n.hasOffer()){var i="url('//images.quickflix.com.au/site/bluesky/img/streaming/offer/banners/"+t.BannerImage+".jpg')";$(".lead-section").css("background-image",i)}else $(".lead-section").hide()}}])